diff --git a/.gitignore b/.gitignore index edd6964c..e7a8d0cc 100644 --- a/.gitignore +++ b/.gitignore @@ -46,7 +46,7 @@ config/initializers/secret_token.rb bower.json # Node dependency directories -node_modules +node_modules/ # Ignore pow environment settings .powenv @@ -54,4 +54,6 @@ node_modules # Ignore Byebug command history file. .byebug_history -*~ \ No newline at end of file +*~ + +public/assets/css/app.css diff --git a/Gemfile b/Gemfile index 882d1c2c..95b79f1a 100644 --- a/Gemfile +++ b/Gemfile @@ -50,6 +50,9 @@ gem 'rails_12factor', group: :production gem 'puma' gem 'active_model_serializers', '~> 0.10.0' + +gem 'react-autocomplete-rails' + # Use ActiveModel has_secure_password # gem 'bcrypt', '~> 3.1.7' diff --git a/Gemfile.lock b/Gemfile.lock index f823f820..f06b366e 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -20,11 +20,11 @@ GEM erubis (~> 2.7.0) rails-dom-testing (~> 1.0, >= 1.0.5) rails-html-sanitizer (~> 1.0, >= 1.0.2) - active_model_serializers (0.10.7) + active_model_serializers (0.10.4) actionpack (>= 4.1, < 6) activemodel (>= 4.1, < 6) case_transform (>= 0.2) - jsonapi-renderer (>= 0.1.1.beta1, < 0.3) + jsonapi (= 0.1.1.beta6) activejob (4.2.7.1) activesupport (= 4.2.7.1) globalid (>= 0.3.0) @@ -41,40 +41,40 @@ GEM minitest (~> 5.1) thread_safe (~> 0.3, >= 0.3.4) tzinfo (~> 1.1) - addressable (2.5.2) - public_suffix (>= 2.0.2, < 4.0) + addressable (2.5.0) + public_suffix (~> 2.0, >= 2.0.2) arel (6.0.4) - aws-sdk (2.11.32) - aws-sdk-resources (= 2.11.32) - aws-sdk-core (2.11.32) + aws-sdk (2.7.2) + aws-sdk-resources (= 2.7.2) + aws-sdk-core (2.7.2) aws-sigv4 (~> 1.0) jmespath (~> 1.0) - aws-sdk-resources (2.11.32) - aws-sdk-core (= 2.11.32) - aws-sigv4 (1.0.2) + aws-sdk-resources (2.7.2) + aws-sdk-core (= 2.7.2) + aws-sigv4 (1.0.0) babel-source (5.8.35) babel-transpiler (0.7.0) babel-source (>= 4.0, < 6) execjs (~> 2.0) bcrypt (3.1.11) - binding_of_caller (0.8.0) + binding_of_caller (0.7.2) debug_inspector (>= 0.0.1) - browserify-rails (4.2.0) + browserify-rails (3.4.0) addressable (>= 2.4.0) - railties (>= 4.0.0, < 5.2) - sprockets (>= 3.6.0) + railties (>= 4.0.0, < 5.1) + sprockets (>= 3.5.2) builder (3.2.3) - byebug (10.0.2) - capybara (3.0.1) + byebug (9.0.6) + capybara (2.12.0) addressable - mini_mime (>= 0.1.3) - nokogiri (~> 1.8) - rack (>= 1.6.0) - rack-test (>= 0.6.3) - xpath (~> 3.0) + mime-types (>= 1.16) + nokogiri (>= 1.3.3) + rack (>= 1.0.0) + rack-test (>= 0.5.4) + xpath (~> 2.0) case_transform (0.2) activesupport - coderay (1.1.2) + coderay (1.1.1) coffee-rails (4.1.1) coffee-script (>= 2.2.0) railties (>= 4.0.0, < 5.1.x) @@ -84,68 +84,76 @@ GEM coffee-script-source (1.12.2) concurrent-ruby (1.0.5) connection_pool (2.2.1) - crass (1.0.4) - debug_inspector (0.0.3) - devise (4.4.3) + crass (1.0.3) + debug_inspector (0.0.2) + devise (4.2.0) bcrypt (~> 3.0) orm_adapter (~> 0.1) - railties (>= 4.1.0, < 6.0) + railties (>= 4.1.0, < 5.1) responders warden (~> 1.2.3) diff-lcs (1.3) - docile (1.3.0) - dotenv (2.2.2) - dotenv-rails (2.2.2) - dotenv (= 2.2.2) - railties (>= 3.2, < 6.0) + docile (1.1.5) + dotenv (2.1.2) + dotenv-rails (2.1.2) + dotenv (= 2.1.2) + railties (>= 3.2, < 5.1) erubis (2.7.0) execjs (2.7.0) - factory_girl (4.9.0) + factory_girl (4.8.0) activesupport (>= 3.0.0) - factory_girl_rails (4.9.0) - factory_girl (~> 4.9.0) + factory_girl_rails (4.8.0) + factory_girl (~> 4.8.0) railties (>= 3.0.0) globalid (0.4.1) activesupport (>= 4.2.0) - i18n (0.9.5) + i18n (0.9.1) concurrent-ruby (~> 1.0) - jbuilder (2.7.0) - activesupport (>= 4.2.0) - multi_json (>= 1.2) - jmespath (1.4.0) - jquery-rails (4.3.1) + jbuilder (2.6.1) + activesupport (>= 3.0.0, < 5.1) + multi_json (~> 1.2) + jmespath (1.3.1) + jquery-rails (4.2.2) rails-dom-testing (>= 1, < 3) railties (>= 4.2.0) thor (>= 0.14, < 2.0) json (1.8.6) - jsonapi-renderer (0.2.0) + jsonapi (0.1.1.beta6) + jsonapi-parser (= 0.1.1.beta3) + jsonapi-renderer (= 0.1.1.beta1) + jsonapi-parser (0.1.1.beta3) + jsonapi-renderer (0.1.1.beta1) launchy (2.4.3) addressable (~> 2.3) - libv8 (3.16.14.19) - lodash-rails (4.17.5) + libv8 (3.16.14.17) + lodash-rails (4.17.2) railties (>= 3.1) - loofah (2.2.2) + loofah (2.1.1) crass (~> 1.0.2) nokogiri (>= 1.5.9) mail (2.7.0) mini_mime (>= 0.1.1) - method_source (0.9.0) + method_source (0.8.2) + mime-types (3.1) + mime-types-data (~> 3.2015) + mime-types-data (3.2016.0521) mini_mime (1.0.0) mini_portile2 (2.3.0) - minitest (5.11.3) - multi_json (1.13.1) - nokogiri (1.8.2) + minitest (5.11.1) + multi_json (1.12.1) + nokogiri (1.8.1) mini_portile2 (~> 2.3.0) orm_adapter (0.5.0) - pg (0.21.0) - pry (0.11.3) + pg (0.19.0) + pry (0.10.4) coderay (~> 1.1.0) - method_source (~> 0.9.0) - public_suffix (3.0.2) - puma (3.11.3) + method_source (~> 0.8.1) + slop (~> 3.4) + public_suffix (2.0.5) + puma (3.8.2) pundit (1.1.0) activesupport (>= 3.0.0) - rack (1.6.9) + rack (1.6.8) rack-test (0.6.3) rack (>= 1.0) rails (4.2.7.1) @@ -165,8 +173,8 @@ GEM activesupport (>= 4.2.0, < 5.0) nokogiri (~> 1.6) rails-deprecated_sanitizer (>= 1.0.1) - rails-html-sanitizer (1.0.4) - loofah (~> 2.2, >= 2.2.2) + rails-html-sanitizer (1.0.3) + loofah (~> 2.0) rails_12factor (0.0.3) rails_serve_static_assets rails_stdout_logging @@ -177,8 +185,9 @@ GEM activesupport (= 4.2.7.1) rake (>= 0.8.7) thor (>= 0.18.1, < 2.0) - rake (12.3.1) + rake (12.3.0) rdoc (4.3.0) + react-autocomplete-rails (1.3.1) react-rails (1.5.0) babel-transpiler (>= 0.7.0) coffee-script-source (~> 1.8) @@ -187,36 +196,36 @@ GEM rails (>= 3.2) tilt ref (2.0.0) - responders (2.4.0) - actionpack (>= 4.2.0, < 5.3) - railties (>= 4.2.0, < 5.3) - rspec-core (3.7.1) - rspec-support (~> 3.7.0) - rspec-expectations (3.7.0) + responders (2.3.0) + railties (>= 4.2.0, < 5.1) + rspec-core (3.5.4) + rspec-support (~> 3.5.0) + rspec-expectations (3.5.0) diff-lcs (>= 1.2.0, < 2.0) - rspec-support (~> 3.7.0) - rspec-mocks (3.7.0) + rspec-support (~> 3.5.0) + rspec-mocks (3.5.0) diff-lcs (>= 1.2.0, < 2.0) - rspec-support (~> 3.7.0) - rspec-rails (3.7.2) + rspec-support (~> 3.5.0) + rspec-rails (3.5.2) actionpack (>= 3.0) activesupport (>= 3.0) railties (>= 3.0) - rspec-core (~> 3.7.0) - rspec-expectations (~> 3.7.0) - rspec-mocks (~> 3.7.0) - rspec-support (~> 3.7.0) - rspec-support (3.7.1) + rspec-core (~> 3.5.0) + rspec-expectations (~> 3.5.0) + rspec-mocks (~> 3.5.0) + rspec-support (~> 3.5.0) + rspec-support (3.5.0) sdoc (0.4.2) json (~> 1.7, >= 1.7.7) rdoc (~> 4.0) - shoulda-matchers (3.1.2) + shoulda-matchers (3.1.1) activesupport (>= 4.0.0) - simplecov (0.16.1) - docile (~> 1.1) + simplecov (0.13.0) + docile (~> 1.1.0) json (>= 1.8, < 3) simplecov-html (~> 0.10.0) - simplecov-html (0.10.2) + simplecov-html (0.10.0) + slop (3.6.0) spring (2.0.2) activesupport (>= 4.2) sprockets (3.7.1) @@ -235,10 +244,10 @@ GEM ref thor (0.20.0) thread_safe (0.3.6) - tilt (2.0.8) - tzinfo (1.2.5) + tilt (2.0.6) + tzinfo (1.2.4) thread_safe (~> 0.1) - uglifier (4.1.8) + uglifier (3.0.4) execjs (>= 0.3.0, < 3) warden (1.2.7) rack (>= 1.0) @@ -248,8 +257,8 @@ GEM railties (>= 4.0) sprockets-rails (>= 2.0, < 4.0) will_paginate (3.1.6) - xpath (3.0.0) - nokogiri (~> 1.8) + xpath (2.0.0) + nokogiri (~> 1.3) PLATFORMS ruby @@ -274,6 +283,7 @@ DEPENDENCIES pundit rails (= 4.2.7.1) rails_12factor + react-autocomplete-rails react-rails (~> 1.5.0) rspec-rails (~> 3.4) sdoc (~> 0.4.0) diff --git a/README.md b/README.md index 2853dde5..580f6154 100644 --- a/README.md +++ b/README.md @@ -86,6 +86,9 @@ To start the application locally, run: ```shell rails server ``` + +You will also need to run `./local_dev.sh` to compile some stylesheets for the archive. + Then, visit the app at [http://localhost:3000](http://localhost:3000). <%= csrf_meta_tags %> - + diff --git a/app/views/videos/index.html.erb b/app/views/videos/index.html.erb new file mode 100644 index 00000000..421ab9c1 --- /dev/null +++ b/app/views/videos/index.html.erb @@ -0,0 +1,4 @@ +<%= react_component( + 'ArchiveApp', + { data: @videos }) %> + diff --git a/app/views/videos/video.html.erb b/app/views/videos/video.html.erb new file mode 100644 index 00000000..7f9c8ad1 --- /dev/null +++ b/app/views/videos/video.html.erb @@ -0,0 +1,8 @@ +<%= react_component( + 'ArchiveVideoFocus', + { + data: @video, + urls: @video_url + }) + %> + diff --git a/archive/resources/video_data.csv b/archive/resources/video_data.csv new file mode 100644 index 00000000..50f8e55f --- /dev/null +++ b/archive/resources/video_data.csv @@ -0,0 +1,1163 @@ +IDv2,Speakers,Source,Date added,Raw Thumbnail,Branded Thumbnail,Languages by ISO Code,Captions by ISO Code,Languages Used,Alternate Name,Speaker Notes,Intake notes,Video Nation,Youtube Publish Schedule,Public (Youtube),Licenses,Publicity Clause,Transcribed,Transcription,Translation,Notes,italki call to action,italki active language,italki video has link,Publish order,Secondary Publish,Published on (Facebook),Facebook URL,Languages per video,Youtube Banners Updated,Youtube ID,Youtube URL,Demographics,Geneaology,Top level genealogy per language,Given language name,Video Description,Continent,.IDv1,Record Created At,Video Territory,Caption File Link +Dr.KarelOliva_20160330_ces+eng+bul+ita+deu+rus,Dr.KarelOliva__20160330,Vojta_Smekal_,3/30/2016,Dr.KarelOliva_20160330_ces+eng+bul+ita+deu+rus.png (https://dl.airtable.com/0BtJh7VrQgaqE7dUVaPC_Dr.KarelOliva_20160330_ces%2Beng%2Bbul%2Bita%2Bdeu%2Brus.png),Dr.KarelOliva_20160330_ces+eng+bul+ita+deu+rus.jpg (https://dl.airtable.com/Z1x2vYPtRlu2F0NK7sK3_Dr.KarelOliva_20160330_ces%2Beng%2Bbul%2Bita%2Bdeu%2Brus.jpg),"ces,eng,bul,ita,deu,rus",,"Czech, English, Bulgarian, Italian, German, Standard, Russian",,,,,9/14/2017,Public,Standard,,,,,,"Get a free Czech lesson with italki: http://promos.italki.com/wikitongues_ces, Get a free English lesson with italki: http://promos.italki.com/wikitongues_eng, Get a free Bulgarian lesson with italki: http://promos.italki.com/wikitongues_bul, Get a free Italian lesson with italki: http://promos.italki.com/wikitongues_ita, Get a free German, Standard lesson with italki: http://promos.italki.com/wikitongues_deu, Get a free Russian lesson with italki: http://promos.italki.com/wikitongues_rus",6 checked out of 6,,99,,,,6,,CwGK0BmHbmY,https://youtu.be/CwGK0BmHbmY,"10,400,000 in Czech Republic (ELDIA 2012). Population total all countries: 10,619,340., 55,600,000 in United Kingdom (ELDIA 2012). Population total all countries: 335,148,868. L2 users: 1,500,000 in United Kingdom (Crystal 2003). L2 users worldwide: 505,000,000., 7,020,000 in Bulgaria (ELDIA 2012). Population total all countries: 8,157,770., 57,700,000 in Italy (ELDIA 2012). Population total all countries: 63,655,047., 69,800,000 in Germany (ELDIA 2012). Population total all countries: 78,245,280. L2 users: 8,000,000 in Germany (ELDIA 2012)., 137,000,000 in Russian Federation (2010 census). Population total all countries: 167,332,230.","Indo-European, Slavic, West, Czech-Slovak, Indo-European, Germanic, West, English, Indo-European, Slavic, South, Eastern, Indo-European, Italic, Romance, Italo-Western, Italo-Dalmatian, Indo-European, Germanic, West, High German, German, Middle German, East Middle German, Indo-European, Slavic, East",Indo-European,§,,"Eurasia, Eurasia, Eurasia, Eurasia, Eurasia, Eurasia, Eurasia, Eurasia, Eurasia, Eurasia",,2016-3-30,, +Ibrahim_20160229_fra+dje+gux+ful+mey+taq,Ibrahim_Najum_20160229,Teddy_Nee_20141005,2/29/2016,"""Ibrahim_s6__20160229_fra,ara,tmh,dje,gux,ful.png (https://dl.airtable.com/3mICF6gSpqKNI67efpQd_Ibrahim_s6__20160229_fra%2Cara%2Ctmh%2Cdje%2Cgux%2Cful.png)""","""Ibrahim_s6__20160229_fra,ara,tmh,dje,gux,ful.jpg (https://dl.airtable.com/Q1FhmenLR8qIApKmwcll_Ibrahim_s6__20160229_fra%2Cara%2Ctmh%2Cdje%2Cgux%2Cful.jpg)""","fra,dje,gux,ful,mey,taq",,"French, Zarma, Gourmanchéma, Fulah, Hassaniyya, Tamasheq",,,,,5/11/2016,Public,Standard,,,,,,Get a free French lesson with italki: http://promos.italki.com/wikitongues_fra,6 checked out of 6,,31,,,,6,checked,7EJud2CMRyo,https://youtu.be/7EJud2CMRyo,"60,000,000 in France (ELDIA 2012). Population total all countries: 74,980,460., 2,350,000 in Niger (2006). Population total all countries: 2,438,900., 600,000 in Burkina Faso (1999 SIL). Population total all countries: 813,000., Population total all languages: 22,331,400., 2,770,000 in Mauritania (2006), increasing. Population total all countries: 3,278,190., 250,000 in Mali (1991). Population total all countries: 281,200.","Indo-European, Italic, Romance, Italo-Western, Western, Gallo-Iberian, Gallo-Romance, Gallo-Rhaetian, Oïl, French, Nilo-Saharan, Songhai, Southern, Niger-Congo, Atlantic-Congo, Volta-Congo, North, Gur, Central, Northern, Oti-Volta, Gurma, Afro-Asiatic, Semitic, Central, South, Arabic, Afro-Asiatic, Berber, Tamasheq, Southern",Indo-European,§,,"Eurasia, Eurasia, Americas, Eurasia, Eurasia, Africa, Africa, Africa, Africa, Africa",,2016-3-30,, +Stéfane_20161205_jpn+fra+eng+por,Stéfane_Hélder_20161130,Stefan_Hélder_,12/5/2016,Stéfane_20161205_jpn+fra+eng+por.png (https://dl.airtable.com/vrPy4d2zRzejxh9Xs6k4_Ste%CC%81fane_20161205_jpn%2Bfra%2Beng%2Bpor.png),Stefane_20161205_jpn+fra+eng+por.jpg (https://dl.airtable.com/3E8mAYeQJuDgmYKp93Je_Stefane_20161205_jpn%2Bfra%2Beng%2Bpor.jpg),"jpn,fra,eng,por",,"Japanese, French, English, Portuguese",,,,,9/28/2017,Public,Standard,,,,,,"Get a free Japanese lesson with italki: http://promos.italki.com/wikitongues_jpn, Get a free French lesson with italki: http://promos.italki.com/wikitongues_fra, Get a free English lesson with italki: http://promos.italki.com/wikitongues_eng, Get a free Portuguese lesson with italki: http://promos.italki.com/wikitongues_por",4 checked out of 4,,,,,,4,,8jAAPdvTld0,https://youtu.be/8jAAPdvTld0,"121,000,000 in Japan (1985). Population figure may include other ethnic groups. Population total all countries: 122,056,940. L2 users: 1,000,000 in Japan., 60,000,000 in France (ELDIA 2012). Population total all countries: 74,980,460., 55,600,000 in United Kingdom (ELDIA 2012). Population total all countries: 335,148,868. L2 users: 1,500,000 in United Kingdom (Crystal 2003). L2 users worldwide: 505,000,000., 10,000,000 in Portugal (ELDIA 2012). Population total all countries: 203,349,200.","Japonic, Indo-European, Italic, Romance, Italo-Western, Western, Gallo-Iberian, Gallo-Romance, Gallo-Rhaetian, Oïl, French, Indo-European, Germanic, West, English, Indo-European, Italic, Romance, Italo-Western, Western, Gallo-Iberian, Ibero-Romance, West Iberian, Portuguese-Galician",Japonic,§,,"Eurasia, Eurasia, Eurasia, Americas, Eurasia, Eurasia, Eurasia, Eurasia, Eurasia, Eurasia",,2016-12-5,, +Labaram_20160702_bqg,Labaram__20160702,Sophia_Leenay_,7/2/2016,Screen Shot 2016-09-02 at 4.58.48 PM.png (https://dl.airtable.com/jkdoBmhHQFaij0fhi7Xs_Screen%20Shot%202016-09-02%20at%204.58.48%20PM.png),Labaram_s1_M_20160702_bqg.jpg (https://dl.airtable.com/5kxuKwGQNyZzM7g2jqJq_Labaram_s1_M_20160702_bqg.jpg),bqg,,Bago-Kusuntu,Koussountou,,,,9/3/2016,Public,Standard,,,,,,,1 checked out of 1,,,,,,1,,YTgDOQuuvdc,https://youtu.be/YTgDOQuuvdc,"7,500 (2000). Ethnic population: 8,000.","Niger-Congo, Atlantic-Congo, Volta-Congo, North, Gur, Central, Southern, Grusi, Eastern",Niger-Congo,§Koussountou,,Africa,,2016-7-5,, +Isaaka_20160628_kdh,Isaaka_Ouro-Wetchire_20160628,Sophia_Leenay_,6/28/2016,Isaaka_s1_M_20160628_kdh.png (https://dl.airtable.com/kiUiaAPHRGpqXMmsfPV4_Isaaka_s1_M_20160628_kdh.png),Isaaka_s1_M_20160628_kdh.jpg (https://dl.airtable.com/I5ev6xoGRYuy4d9dX4KR_Isaaka_s1_M_20160628_kdh.jpg),kdh,,Tem,,,,,11/17/2016,Public,Standard,,,,,,,1 checked out of 1,,,,,,1,,TPWT57Wuwac,https://youtu.be/TPWT57Wuwac,"204,000 in Togo (1991). Population total all countries: 307,000.","Niger-Congo, Atlantic-Congo, Volta-Congo, North, Gur, Central, Southern, Grusi, Eastern",Niger-Congo,§,,Africa,,2016-7-5,, +Navas_20160925_-byu,Navas__20160925,Sidhique_Kappan_,9/25/2016,Screen Shot 2016-11-29 at 19.21.52.png (https://dl.airtable.com/dryNBzI2SFaVc6LvgniL_Screen%20Shot%202016-11-29%20at%2019.21.52.png),Navas_s1_M_20160925_-byu.jpg (https://dl.airtable.com/UbYvRM01S3e53aIysRb5_Navas_s1_M_20160925_-byu.jpg),-byu,,Beary,Byari,,,,11/29/2016,Public,CC BY-NC 3.0,checked,,,,,,1 checked out of 1,,,,,,1,,pmwUGyC-Hh0,https://youtu.be/pmwUGyC-Hh0,,,,§Byari,,Eurasia,,2016-9-26,, +Nitesh_20160614_bgc,Nitesh__20160614,Satdeep_Gill_,6/14/2016,Nitesh_s1_F_20160614_bgc.png (https://dl.airtable.com/06TF2JC7TCqCFtutw9QE_Nitesh_s1_F_20160614_bgc.png),Nitesh_s1_F_20160614_bgc.jpg (https://dl.airtable.com/vykd9zPSuW5Y9JPO0fP1_Nitesh_s1_F_20160614_bgc.jpg),bgc,eng,Haryanvi,,,,,7/9/2016,Public,CC BY-SA 4.0,checked,,,,,,1 checked out of 1,,,Facebook,2018-1-12,https://www.facebook.com/wikitongues/videos/1694236013974252/,1,,a0TKySIPH0E,https://youtu.be/a0TKySIPH0E,"8,000,000 (2001 census). Ethnic population: 16,000,000 (1992 SIL).","Indo-European, Indo-Iranian, Indo-Aryan, Central zone, Western Hindi, Unclassified",Indo-European,§,,Eurasia,,2016-6-14,,https://www.dropbox.com/sh/slwg2kb63y98kzm/AABT8QAimtj2dPgzfTTwdpdCa?dl=0 +Raphael_20160721_aka,Raphael__20160721,Satdeep_Gill_,7/21/2016,Screen Shot 2016-08-12 at 14.06.51.png (https://dl.airtable.com/Ca8XZpVkRAez5VcyFN7A_Screen%20Shot%202016-08-12%20at%2014.06.51.png),Raphael_s1_M_20160721_aka.jpg (https://dl.airtable.com/fY2T9oCmTharPg2SDxB9_Raphael_s1_M_20160721_aka.jpg),aka,,Akan,Twi,"Twi ISO to be reconciled when we update database in accordance with ISO + +",Classification,,8/12/2016,Public,CC BY-SA 4.0,checked,,,,,,1 checked out of 1,,,,,,1,,zUDEten_j9o,https://youtu.be/zUDEten_j9o,"8,300,000 in Ghana (2004 SIL). Population includes 2,800,000 Asante Twi, 1,900,000 Fante, 555,000 Akuapem Twi (2004). Population total all countries: 8,314,600. L2 users: 1,000,000 in Ghana.","Niger-Congo, Atlantic-Congo, Volta-Congo, Kwa, Nyo, Potou-Tano, Tano, Central, Akan",Niger-Congo,§Twi,,Africa,,2016-7-22,, +Mohammad_20160721_bqi,Mohammad__20160721,Satdeep_Gill_,7/21/2016,Screen Shot 2016-11-02 at 22.04.20.png (https://dl.airtable.com/Ao78yZJKTheH1mPQNt1c_Screen%20Shot%202016-11-02%20at%2022.04.20.png),Mohammad_s1_M_20160721_bqi.jpg (https://dl.airtable.com/dUA8EgqdRIu5LgYDIYRF_Mohammad_s1_M_20160721_bqi.jpg),bqi,eng,Bakhtiâri,Bakhtiari Farsi,,,,11/2/2016,Public,CC BY-SA 4.0,checked,,,,,,1 checked out of 1,,,,,,1,,oMeQ8llXq6o,https://youtu.be/oMeQ8llXq6o,"1,000,000 (2001). 350,000 monolinguals. Ethnic population: 1,000,000 (2001).","Indo-European, Indo-Iranian, Iranian, Western, Southwestern, Luri",Indo-European,§Bakhtiari Farsi,,Eurasia,,2016-7-22,, +Mounir_20160721_aeb,Mounir__20160721,Satdeep_Gill_,7/21/2016,Screen Shot 2017-01-18 at 14.25.09.png (https://dl.airtable.com/sCRwwwXUSyGMW18vFPeH_Screen%20Shot%202017-01-18%20at%2014.25.09.png),Mounir_s1_M_20160721_aeb.jpg (https://dl.airtable.com/5dieSmMPQGG7J9SY5Q8Z_Mounir_s1_M_20160721_aeb.jpg),aeb,,"Arabic, Tunisian Spoken",Tunisian Arabic,,,,1/19/2017,Public,CC BY-SA 4.0,checked,,,,,,1 checked out of 1,,,,,,1,,qxXq9iP-CGw,https://youtu.be/qxXq9iP-CGw,"9,000,000 in Tunisia (1995). Population total all countries: 9,406,900.","Afro-Asiatic, Semitic, Central, South, Arabic",Afro-Asiatic,§Tunisian Arabic,,Africa,,2016-7-22,, +Krishna_20160721_bho,Krishna__20160721,Satdeep_Gill_,7/21/2016,Screen Shot 2017-01-31 at 16.19.36.png (https://dl.airtable.com/g3sfPtjSPWcdUU15hRdA_Screen%20Shot%202017-01-31%20at%2016.19.36.png),Krishna_s1_M_20160721_bho.jpg (https://dl.airtable.com/qw1vjPjxTV2wS03RuKcG_Krishna_s1_M_20160721_bho.jpg),bho,,Bhojpuri,,,,,2/23/2017,Public,CC BY-SA 4.0,checked,,,,,,1 checked out of 1,,,,,,1,,c05NPQFxnlc,https://youtu.be/c05NPQFxnlc,"37,800,000 in India (2001 census). Population total all countries: 39,716,000.","Indo-European, Indo-Iranian, Indo-Aryan, Eastern zone, Bihari",Indo-European,§,,Eurasia,,2016-7-22,, +Raj_20160622_bgq,Raj_Kamal_20160622,Satdeep_Gill_,6/22/2016,Raj_20160622_bgq.png (https://dl.airtable.com/8Vsr2HIRKj8BO3zajrQ8_Raj_20160622_bgq.png),Raj_20160622_bgq.jpg (https://dl.airtable.com/T2iiQvLRLWVGZZlIWdFE_Raj_20160622_bgq.jpg),bgq,eng,Bagri,,,,,9/19/2017,Public,CC BY-SA 4.0,,,,,,,1 checked out of 1,,,,,,1,,F4xgvj4kSnU,https://youtu.be/F4xgvj4kSnU,"647,000 in India (2001 census). Population total all countries: 847,000. 162,000 monolinguals.","Indo-European, Indo-Iranian, Indo-Aryan, Central zone, Rajasthani, Unclassified",Indo-European,§," This video was recorded by Satdeep Gill in Patiala, Punjab, India, where Raj lives and studies. Bagri is spoken by at least two million people, primarily in the north Indian states of Rajasthan, Punjab, and Haryana. An Indo-European language of the Indo-Aryan linguistic family, it is considered by linguists to be a member of the Rajasthani subgroup, bearing close resemblance to several other languages, including Marwari, Malvi, and Mewati. As such, these mother tongues are sometimes described as dialects of a single ‘Rajasthani language’. Politically, Bagri is only recognized in the latter form, as ‘Rajasthani’ is one of Rajasthan’s official languages. As Bagri, the language goes unrecognized, though still actively spoken nonetheless.",Eurasia,,2016-6-22,,https://www.dropbox.com/sh/ym4rhp7441s45j7/AAB8thn6Poml7EDxG-GXr8oYa?dl=0 +Valentine_20160713_ibo,Valentine__20160713,Noah_Sullivan_20160610,7/13/2016,,Valentine_s1_M_20160713_ibo.jpg (https://dl.airtable.com/eMagrMYaTsOgd3xZXsng_Valentine_s1_M_20160713_ibo.jpg),ibo,,Igbo,,,,,9/9/2016,Public,CC BY-NC 3.0,,,,,,,1 checked out of 1,,,,,,1,,iXUwLs4kNvc,https://youtu.be/iXUwLs4kNvc,"18,000,000 (Wiesenfeld 1999).","Niger-Congo, Atlantic-Congo, Volta-Congo, Benue-Congo, Igboid, Igbo",Niger-Congo,§,,Africa,,2016-7-13,, +Noah_20160610_eng+gle,Noah_Sullivan_20160610,Noah_Sullivan_20160610,6/10/2016,Screen Shot 2016-12-02 at 13.07.59.png (https://dl.airtable.com/vmvCZNhWQWODmppkgSu4_Screen%20Shot%202016-12-02%20at%2013.07.59.png),Noah_s2_M_20160610_eng+gle.jpg (https://dl.airtable.com/ZwK6u3TKSbmlZ1DmnuSW_Noah_s2_M_20160610_eng%2Bgle.jpg),"eng,gle",,"English, Irish",,,,,12/2/2016,Public,CC BY-NC 3.0,checked,,,,,"Get a free English lesson with italki: http://promos.italki.com/wikitongues_eng, Get a free Irish lesson with italki: http://promos.italki.com/wikitongues_gle",2 checked out of 2,,,,,,2,,TzN8Kl3SBME,https://youtu.be/TzN8Kl3SBME,"55,600,000 in United Kingdom (ELDIA 2012). Population total all countries: 335,148,868. L2 users: 1,500,000 in United Kingdom (Crystal 2003). L2 users worldwide: 505,000,000., 138,000 in Ireland (ELDIA 2012). Population total all countries: 276,310. L2 users: 1,000,000 in Ireland (ELDIA 2012).","Indo-European, Germanic, West, English, Indo-European, Celtic, Insular, Goidelic",Indo-European,§,,"Eurasia, Eurasia, Eurasia",,2016-6-22,, +Ngawang_20161226_tsj,Ngawang_Zepa_20161226,"Phurba_Wangdi_,Ngawang_Zepa_",12/26/2016,,,tsj,,Tshangla,,,,,,To Upload,CC BY-NC 3.0,checked,,,,,,1 checked out of 1,,,,,,1,,,No ID,"140,000 in Bhutan (1999 SIL). Population total all countries: 158,200.","Sino-Tibetan, Tibeto-Burman, Western Tibeto-Burman, Bodish",Sino-Tibetan,§,,Eurasia,,2016-12-27,, +Manuel_20161114_yua,Manuel_Poot_20161114,Nat_Pendleton_20161101,11/14/2016,,,yua,,"Maya, Yucatec",,,,,,To Upload,CC BY-SA 4.0,,,,,,,1 checked out of 1,,,,,,1,,,No ID,"735,000 in Mexico (2000 INALI). Population total all countries: 766,000. 58,800 monolinguals (2007).","Mayan, Yucatecan-Core Mayan, Yucatecan, Yucatec-Lacandon",Mayan,§,,Americas,,2016-11-17,, +Nat_20161101_yua,Nat_Pendleton_20161101,Nat_Pendleton_20161101,11/1/2016,,,yua,,"Maya, Yucatec",,,,,,To Upload,CC BY-NC 3.0,checked,,,,,,1 checked out of 1,,,,,,1,,,No ID,"735,000 in Mexico (2000 INALI). Population total all countries: 766,000. 58,800 monolinguals (2007).","Mayan, Yucatecan-Core Mayan, Yucatecan, Yucatec-Lacandon",Mayan,§,,Americas,,2016-11-17,, +Hilario_20161101_yua,Hilario_ChiCanul_20161101,Nat_Pendleton_20161101,11/1/2016,Hilario_s1_M_20161101_yua.png (https://dl.airtable.com/IlBgZdcR1KzpNreLMYSo_Hilario_s1_M_20161101_yua.png),Hilario_s1_M_20161101_yua.jpg (https://dl.airtable.com/bjik2b3pTZCqwR4Lnhlj_Hilario_s1_M_20161101_yua.jpg),yua,,"Maya, Yucatec",,,,,12/11/2016,Public,CC BY-NC 3.0,,,"[First I asked him what work he did with Apocalypto, then he describes that work in these words) Tene' ti' Apocalyptoe', ba'ax tin beetaje'... Tin beetaj jun p'éel sut ts'íib, tuláakal u analte'il Apocalypto beeta'abe' (...) ka taalen túun t'anbile', ka a'alab ten ka xi'iken in wil le meyaj beeta'abo', tumen túun ts'oka'an u su'utul ka'ach ich maaya, chen ba'axe' a'ala'abe' le maaya yaan te'elo' k'a'ana'an u yila'al tumen jun túul máak jach jach u yáax t'aanae' maaya, ka'ap u máan kaxbil tuláakal yóok'ol lu'um, ka beeta'ab casting Estados Unidos, México, Candá te' tu'ux ojelta'an yaan maaya'obo', ka k'ucho'ob wey Cancúune' ka binen in beet casting (a casting call). In túukul ka'ache' táak ka'ach in jóok'ol te' cha'ano', je'ex actor , jaaj wa je ba'ax bey taak u beeta'alo', ts'áa e'esaj bix u ya'ala'alo'. Je'elo', kin wa'alike', pus ma' in wóojel bix úuch u jóok'ol beyo', tene' ka binene' ka'ap in wa'alik ti'obe', tene' in wóojel maaya, kin t'anik maaya, yaan ten mejen meyajo'ob in beetmaj tu yóok'ol maaya'ob tu'ux ka'ach tin xooke', ti' in we'esik bix yanik le paalitsiltalo', wa le esclavitud; le paalitsilil ku ya'ala'al úuchilo', Je'elo', ka'ap in we'esik túun ti'ob in mejen meyaj bey ti'obo', le mejen videoo', le táabsaj óochelo'ob beyo', ka tu yilo'ob. Mij jach... mij jach ich u wi'inalil octubre ka taalen t'anbil, ka a'alab tene' tin t'a'anal Méejico ka xi'iken in wil le meyajo', ts'oka'an u beeta'al, chen ba'axe' je'el u páajtal in meyaj xane', ka a'ala'ab tene' chen óox p'éel k'iin:\"táas a nook' chen ti' óox p'éel k'íin\", ken ts'o'okoke' ka ka'a suut, ka binen Méejico, ka binen in wa'al ti' in na' yéetel in láak'o'ob yano'ob Naranjal Poniente, kajakbalo'ob yáanal ts'u' k'áax te' báantaa. Je'elo', ka binen, ka k'uchen túun tu noj kaajil Méejicoe' ka káaj in meyaj, ka ila'ab bix in meyaje', ka a'ala'ab tene' ma' an bin hasta u ts'o'ol le meyaja'.","Hilario talks of his experience as the voice coach for the actors in Mel Gibson\'s Apocalypto. The film needed to have a genuine Maya script, so he reviewed the script and made it genuine. Hilario knew and knows Maya the way it used to be and this is what he taught. (Pre-hispanic Maya: note that modern Maya uses several Spanish loan words.) /// He taught actors from various Indian Nations (from the US, Canada and Mexico) how to pronounce their lines in Yucatec Maya. They had to look all over the world to find some one who had a full depth knowledge of (pre-hispanic) Maya. For example, the word Slavery or paalitsilil as it was called previously (previous to Spanish invasion). He went to a casting call in Cancun, was selected and then he went to Mexico City to get the script. Then in a period of 3 days after checking with his family in Naranjal Poniente, he produced a (revised, pure Maya) script and went back to Mexico where he stayed until he finished the work (of teaching the actors to pronounce and speak Maya correctly). +Optional Message: Here ",,,1 checked out of 1,,,,,,1,,z8eTwjQCCuA,https://youtu.be/z8eTwjQCCuA,"735,000 in Mexico (2000 INALI). Population total all countries: 766,000. 58,800 monolinguals (2007).","Mayan, Yucatecan-Core Mayan, Yucatecan, Yucatec-Lacandon",Mayan,§,,Americas,,2016-11-17,, +Naoki_20161227_ryu+myv+xal+prg,Naoki_Watanabe_20161227,"Lindie_Botes_20130919,Naoki_Watanabe(渡辺尚輝)_",12/27/2016,Screen Shot 2017-01-19 at 15.14.27.png (https://dl.airtable.com/dWRdMbsbTQSootRRSWe3_Screen%20Shot%202017-01-19%20at%2015.14.27.png),Naoki_s4_M_20161227_ryu+myv+xal+prg.jpg (https://dl.airtable.com/0YasGIPjTg0ngc1lkiiT_Naoki_s4_M_20161227_ryu%2Bmyv%2Bxal%2Bprg.jpg),"ryu,myv,xal,prg",,"Okinawan, Central, Erzya, Kalmyk-Oirat, Prussian",Kalmyk,,,,1/28/2017,Public,CC BY-NC 3.0,,,"Okinawan + +くれーや我(わ)ー沖縄口(うちなーぐち)ぬ胴挨拶(どぅーえーさち)ぬ 試(くくる)みやいびーん。御総様(ぐすーよー)、今日拝なびら(ちゅうをぅがなびら)。頑丈(がんじゅう)やみしぇーみ?初みてぃ拝(をぅが)なびら。我(わ)んぬ名(なー)や渡辺 尚輝(わたーなび しゅーち)やいびーん。我んねー埼玉県ぬ戸田市から来(ちゃ)たる帰国子女やいびーん。ミシガンとぅインディアナんじ十一(じゅういち)年(にん)暮(く)らさびーたん。うふぇ一沖縄口いゆーすん話(はな)しーゆーさびーん。我んねー沖縄や好(し)ちゃびーん。 我んねー沖縄口 習(なりゃ)とーびーんやいびーん。我んや2013年(にせんじゅーさんにん)に沖縄(うちなー)んかいんじゃるばすに沖縄口ぬ勉強(びんちょう)初(はじ)みやびたん。沖縄口使(ちか)てぃやー我びけー無(ねー)やびらんたん。沖縄(うちなー)や沖縄人(うちなーんちゅ)ぬ所(とぅくる)ぬくとぅ覚(うび)てぃ呉(くぃ)りよー。沖縄人ぬちゃー!生まり島ぬ言葉(くとぅば)忘(わし)りーねー国(くに)ん忘りゆん。沖縄やー沖縄人ぬ物(むん)どぅやる。一杯御拝(いっぺーにふぇー)でーびーる!宜(ゆた)しく御願(うにげー)さびら。今(なま)から行(ん)じ来ゃ(ちゃ)ーびら! + +This is my attempt to introduce myself in Okinawan. Greetings everyone. How are you? Pleased to meet you. My name is Watanabe Naoki (Wataanabi Shuuchi in Okinawan). I am a Kikokushijo from Toda, Saitama. I lived in Michigan and Indiana for 11 years. I speak a little Okinawan. I'm learning Okinawan. I started learning Okinawan in 2013 when I went to Okinawa for my school trip. I was the only person in my school who attempted to use Okinawan. Remember, Okinawa is the land of Okinawan. Okinawans! Forget your birth island's language, forget your nation. Thank you very much! Pleased to be acquainted with you. Good bye! + +これは私の沖縄語での自己紹介。皆さん、こんにちは。元気ですか?初めまして。私の名前は渡辺尚輝と申します。埼玉県戸田市出身の帰国子女です。11年間ミシガンとインディアナに住んでいました。沖縄語を少し話せます。沖縄語を学んでいます。2013年に学校の修学旅行のため沖縄に行った時に沖縄語を学び始めました。高内私だけが沖縄語を話そうとした。沖縄は沖縄人の土地のことを覚えていてください。沖縄人達!自分の故郷の言語を忘れることは自分の民族を忘れることだ。どうもありがとうございました。よろしくお願いします。さよなら! + +Kalmyk + +Эн видео болн мини келсн үг Нарт-делкә деер бәәдг геедерҗәх келдин WikiTongues гидг сайтын төлә кесн бәәнә. Мини эңкр нәәҗнр – күндтә Хальмгуд болн талдан олн-әмтн – мана алдр иньгллтин нерн деерәс би таднд менд күргҗәнәв. Мини нерн Наоки (尚輝) гидг, та цуһар меднәт. Би 19 наста оютн. Би танас холд бәәнәв - Япон орн-нутгин Сайтама района Тода гидг балһснд. Болв, баһ насндан, 11 җил күртл би Америкад бәәләв. Би ода Токиоин София Ик Сурһульд даснав. Өдгә цагт Хальмг келн баһар меддүв болв би Хальмг келн дасчанав, юңгад гихлә нанд Хальмг Таңһч йир таасгдна. Европад Хальмгуд – һанцхн Моңhл болн Бурхн Багшин Номин улс. Миниһәр болхла Хальмг тууҗ болн Хальмг келн йир соньн. Харм төрхд, олн Хальмг баhчуд төрскн келн медшшго. Эн болхла ик гидг зовлң. Би Хальмг келнә босллһнд иткҗәнәв. Ода Хальмг келн дасчанав болн Хальмгар шүлгүд бичнәв. Энҗл, Туула сарин дөрвнлә, Диснейин «Frozen» гидг фильмин «Let It Go» гидг дууна орчулвран чиләчкув. 

Мини күндтә Хальмгуд, оньган өгтн! Тана улсин заян тадна hарт бәәнә. Диилвр эврән ирдм биш, эркн биш терүнә төлә ноолддм гиhич. Альд йовв чигн, сан, тана өвкнр кезәнк сәәд әмтн билә, та теднә салтр болҗанат, тер учрас, таднд му йовдл һарһх зөв уга. Цуһар менд амулң болтха! Мана Хальмг Таңһч мандатха! 

Хальмг тууҗ, Хальмг сойл, болн Хальмг келн мөңкртхә! 
Нәәҗнр, буйн болтха, шин Хальмг босллһн төлә, Хальмгаһар күүндий! 
Хальмг төрскн орн-нутг төлә, төрскн келән бичә марттн! Хальмгуд уралан! 
Төрскн нутгтан күчән нерәдәд, 
Толһа менд җирһий! 
Төрскн нутгтан күчән нерәдәд, 
Шин Хальмг босллһн төлә! 

Англь Келәр Oрулх/English Translation
This video and my speech is for the endangered language site WikiTongues. My dear friends –– dear Kalmyks and other peoples –– on behalf of our glorious friendship I greet you. As you know, my name is Naoki (尚輝). I’m a 19 year old student. I live far from you ––in the town of Toda, in the Japanese Prefecture of Saitama. However, I’ve lived in America for 11 years. I currently study at Sophia University in Tokyo. Currently I speak only a little Kalmyk but I’m learning Kalmyk because I love Kalmykia. The Kalmyks are the only Mongolic and Buddhist nation in Europe. I think Kalmyk history and language is fascinating. Alas, many young Kalmyks don’t know their native language. This is a significant problem. I desire the preservation and revival of the Kalmyk language. I’m now learning Kalmyk and I write poetry in Kalmyk. This year, on January 4th, I finished translating the song “Let It Go” from the Disney film “Frozen” into Kalmyk. 

My dear Kalmyk friends, give me your attention! The fate of your nation is in your hands. Victory doesn’t come by itself, it must be earned! Remember always, you are descendants of an ancient and noble people, and therefore have no right to an unworthy act. May everything go well! Prosperity to our Kalmykia! 

Long live Kalmyk history, Kalmyk culture, and Kalmyk language! 
Comrades, please, for the new Kalmyk revival, speak Kalmyk! 
For the Kalmyk homeland, never forget your native language! Forwards, Kalmyks! 
Let's devote our power to the homeland, 
and live long happily! 
Let's devote our power to the homeland, 
For the new Kalmyk revival!

Япон Келәр Oрулх/日本語訳
このビデオとスピーチはWikiTonguesと言う危機に瀕する言語をサポートするサイトのためです。皆さん–カルムイク人とその他の人々–我々の偉大な友情のため挨拶を申し上げます。皆さんは知っていますが、私は尚輝と申します。19歳の大学生です。私は皆さんから遠く住んでいます。埼玉県の戸田市に住んでいます。だが、11年間アメリカで過ごしました。現在東京の上智大学で学んでいます。カルムイク語は少ししか話せませんが、カルムイキアが好きなので勉強しています。カルムイク人はヨーロッパ唯一の仏教徒•モンゴル系の民族です。カルムイク史とカルムイク語は素晴らしいと思います。だが、多くの若いカルムイク人は自国の母語を知りません。これは大変な問題です。私はカルムイク語の復活を望みます。私は現在カルムイク語を学び、カルムイク語で詩を書いています。今年の1月4日に、ディズニー映画の『アナと雪の女王』の『ありのまま』と言う歌のカルムイク語訳を作り上げました。 

愛しいカルムイク人の皆さん、これに注目してください!自分の民族の運命は自分の手にあります。勝利は自動的に来るものでは無く、値されるものです。あなた達は古い、立派な人々の子孫であり、ふさわしくない行動を行う権利は無い。全てがよく行くように!我等のカルムイキアに繁榮を! 

カルムイクの歴史、文化、言語万歳! 
皆さん、新たなカルムイクの復活のために、カルムイク語で話してください! 
カルムイク母国のため、母語を絶対忘れるな!カルムイク人、進撃しろ! 
祖国に力を与えましょう、 
豊かな人生のために! 
祖国に力を与えましょう、 
新たなカルムイクの復活のために! + +Erzya + +Шумбратадо паро Эрзят! Кода тевтне? Теевтяно содавиксэкс. Монь лемем Уатанабэ Наоки. Мон университетэнь тонавтниця Япониясто ды монень 19 (кевейксэе) иеть. Мон Тайванень фирмань «Glossika»-нь, конёвксонь «Japanese For Teenagers» сёрмадыця. Мон эринь Америкасо 11 (кевейкее) иеть. 

Монь вечкевикст тевть: Ю-Ги-О, шахматат, Айкидо, ловномс валморот, романт, ды фанфикт. Монь тиринь келем - Япононь кель. Ней мон парсте кортан Американонь Англань ды Япононь кельтнесэ ды аламодо содан Мадьяронь, Рузонь, Манчжуронь ды Калмыкень келест. Пек аламодо содан Окинавонь, Пруссонь кельть ды Япононь Кедевкель. 

Мон вечкан Эрзянь Масторонть. Монь ули мелем эрямс Эрзятнень марто ялгаксчисэ секс мекс монь ули мелем тонавтнемс Эрзянь келенть. Ней мон Эрзянь кельсэ арас кортан, мон ансяк КАРМАН ушодан тонавтнеме. Мон ушодынь Эрзянь кельде секскак мон вечкан Эрзянь моронть ""Колмо Штатолт"" ды ули мелем ловномс ""Масторава""де. Мон арсян Эрзянь культурась ды эрямопингесь интересной ды вадря ды мон Эрзямассонь Олёна ды Инязор Пургазонтьак вечкан. Шумбрачи Эрзянь Мастор! Эряк ламо иестэ Эрзянь Масторось! Уледе шумбрат, Эрзянь ялгат, инескеть, кортадо Эрзякс, Эрзянь Масторонть кисэ! Весе масторонь Эрзят, веинзадо! Покш сюкпря ваноманть кисэ!

Англань ютавтома/English translation:

Hello good Erzyans! How are you? Let's get acquainted. My name is Naoki Watanabe. I’m a university student from Japan and I'm 19 years old. I'm the author of ""Japanese For Teenagers"" by the Taiwanese company ""Glossika"". I've lived in America for 11 years.

My hobbies are Yu-Gi-Oh, chess, Aikido, and reading poetry, novels, and fanfiction. My native language is Japanese. I'm currently fluent in American English and Japanese and I can speak some Hungarian, Russian, manchu and Kalmyk. I'm also a beginner in Okinawan, Prussian, and Japanese Sign Language.

I love Erzyan Mastor (the Erzya land). I'd like to befriend Erzyans to improve my Erzya. Currently I don’t speak Erzya but I WILL learn it. I’m interested in Erzya because I love the Erzya song «Kolmo Shtatolt» and also want to read the «Mastorava». I think Erzya culture and history is interesting and great and I also love Erzyamassonj Olyona and Inäzor Purgaz. Long live Erzyan Mastor! May Erzyan Mastor last forever! Dear Erzyan comrades, please, speak Erzya, for Erzyan Mastor! Erzyans of all countries, unite! Thank you very much for your attention!

Япононь ютавтома/日本語訳:

エルジャ人達、こんにちは!元気ですか?知り合いになりましょう。私の名前は渡辺尚輝です。私は日本出身の19歳の大学生です。台湾の企業GlossikaのJapanese For Teeangersと言う本の作者です。11年間アメリカで過ごしました。

私の趣味は遊戯王、チェス、合気道、と読書(詩歌、小説、ファンフィクション)です。私の母語は日本語です。現在私はアメリカ英語と日本語を流暢に話し、ハンガリー語、ロシア語、満州語、とカルムイク語を少し話すことができます。沖縄語、プロシア語、と日本手話も少しできます。

エルジャン•マストル(エルジャの祖国)が好きです。エルジャ語を向上させるためにエルジャ人の友達を作りたいです。現在エルジャ語を話すことができませんが絶対学びます。エルジャ語に関心をもった理由はエルジャ語の歌「コルモ•シュタトルト」が気に入ったことと「マストラヴァ」を読みたいからです。エルジャの文化と歴史は面白いし凄いと思いますし、エルジャマソニ•オリョーナとプルがズ大公も好きです。エルジャン•マストル万歳!エルジャン•マストルが永遠に続くように!愛しいエルジャ人達、エルジャン•マストルのためにエルジャ語を話してください!万国のエルジャ人よ、団結せよ!見ていただきありがとうございます! + +Prussian + +Wisēimans, kaīls! Kāi tebbei ēit di? Majs emmens ast Naoki Watanabe. As asma iz Japānija be as asma 19 (Newīnadesimt) wāran. As ni bilāi labban Prūsiskan adder as studijja, pēr as mīli Prūsa be Prūsiskai istōrija be kultūri. Niwārai māise prūsiskan gedda, beggi ni bēi tērpautan. Adder as nadruwēi kitawīdintun stan dīwai. Beggi as wīrst pradīwuns waitjātwei prūsiskai tūls! Stu tūls laimīngiskan pēr nusā Nawa Prūsiskai skatīsnā! Mīlai tin pazinātun! Prūsiskan Emprābutskan! + +Ēngliska Talkausnā + +Hello everyone! How are you? My name is Naoki Watanabe. I’m from Japan and I’m 19 years old. I don’t speak Prussian well but I study it because I love Prussia and Prussian history and culture. Recently my Prussian has decayed from lack of use but I hope to change that soon as I will start practicing Prussian more!  In the name of prosperity for our Neo Prussian movement! Nice to meet you! Prussian Forever! + +Japāniska Talkausnā + +皆さん、こんにちは!元気ですか?私の名前は渡辺尚輝。日本出身の19歳です。プロシア語は流暢に話せませんがプロシアをプロシアの歴史と文化が気に入ったから勉強しています。近頃私のプロシア語は練習不足により悪化しましたが、プロシア語もっと練習するつもりなのでそれを変えることを考えています。我等の新プロシア運動の繁栄のために!よろしくお願いします!永遠にプロシア語を!",,,,4 checked out of 4,,,,,,4,,k3x-2IhJwjo,https://youtu.be/k3x-2IhJwjo,"984,000 (2000). Ethnic population: 1,200,000 (2000 Yukio Uemura)., 36,700 in Russian Federation (2010 census). Population total all countries: 119,330. Ethnic population: 57,000 (2010 census)., 80,500 in Russian Federation (2010 census). Population total all countries: 360,500. Ethnic population: 183,000 (2010 census)., No known L1 speakers. L2 users: 50.","Japonic, Ryukyuan, Amami-Okinawan, Southern Amami-Okinawan, Uralic, Mordvin, Altaic, Mongolic, Eastern, Oirat-Khalkha, Oirat-Kalmyk-Darkhat, Indo-European, Baltic, Western",Japonic,§Kalmyk,,"Eurasia, Eurasia, Eurasia, Eurasia",,2016-12-27,, +Hans_20160601_srn,Hans__20160601,Marcos_VanLukaña_,6/1/2016,Screen Shot 2016-07-05 at 23.42.33.png (https://dl.airtable.com/i6Efryx7S46uLAOnXYEs_Screen%20Shot%202016-07-05%20at%2023.42.33.png),Hans_s1_M_20160601_srn.jpg (https://dl.airtable.com/WDWkBkqRvGV9n8eHxQx0_Hans_s1_M_20160601_srn.jpg),srn,,Sranan,Surinamés,,,,7/6/2016,Public,Standard,,,,,,,1 checked out of 1,,,,,,1,,VnVR__nf0HI,https://youtu.be/VnVR__nf0HI,"120,000 in Suriname (1993). Population total all countries: 126,400. L2 users: 300,000 in Suriname.","English Creole, Atlantic, Suriname",English Creole,§Surinamés,,Americas,,2016-6-3,, +Linh_20170516_vie,Linh__20170516,Lena_Nitsche_,5/16/2017,,,vie,,Vietnamese,Southern Vietnamese,,,,,To Upload,Standard,,,,,,Get a free Vietnamese lesson with italki: http://promos.italki.com/wikitongues_vie,1 checked out of 1,,,,,,1,,,No ID,"65,800,000 in Viet Nam (1999 census). Population total all countries: 67,778,030. Ethnic population: 73,600,000 (2009 census).","Austro-Asiatic, Mon-Khmer, Viet-Muong, Vietnamese",Austro-Asiatic,§Southern Vietnamese,,Eurasia,,2017-1-24,, +Khady_20160329_wol,Khady_Ndoyé_20160329,Khady_Ndoyé_20160329,3/29/2016,Screen Shot 2016-04-04 at 17.43.38.png (https://dl.airtable.com/gky5QOyIRVNwtAG6CVrw_Screen%20Shot%202016-04-04%20at%2017.43.38.png),Khady speaking Wolof and French.jpg (https://dl.airtable.com/ue4tdgPUTpSMkl83f8cg_Khady%20speaking%20Wolof%20and%20French.jpg),wol,,Wolof,,,,,4/4/2016,Public,Standard,,,,,,,1 checked out of 1,,99,,,,1,checked,tZOsIs1wIBg,https://youtu.be/tZOsIs1wIBg,"3,930,000 in Senegal (2006). Population total all countries: 3,976,500.","Niger-Congo, Atlantic-Congo, Atlantic, Northern, Senegambian, Fula-Wolof, Wolof",Niger-Congo,§,,Africa,,2016-3-30,, +Kevin_20160301_por,Kevin__20160301,Kevin__20160301,3/1/2016,,Kevin speaking Portuguese.jpg (https://dl.airtable.com/9pemRC2HTZettOtBr7QK_Kevin%20speaking%20Portuguese.jpg),por,,Portuguese,,,,,3/15/2016,Public,CC BY-NC 3.0,,checked,,,,Get a free Portuguese lesson with italki: http://promos.italki.com/wikitongues_por,1 checked out of 1,,,,,,1,checked,IToXFdBAPeU,https://youtu.be/IToXFdBAPeU,"10,000,000 in Portugal (ELDIA 2012). Population total all countries: 203,349,200.","Indo-European, Italic, Romance, Italo-Western, Western, Gallo-Iberian, Ibero-Romance, West Iberian, Portuguese-Galician",Indo-European,§,,"Eurasia, Eurasia",,2016-3-14,, +Jack_20161128_lad,Jack_Benmayor_20161128,John_Kazaklis_20160415,11/28/2016,Screen Shot 2016-12-19 at 09.17.39.png (https://dl.airtable.com/mFSrfbPfRYqJjb1GpdYU_Screen%20Shot%202016-12-19%20at%2009.17.39.png),Jack_s1_M_20161128_lad.jpg (https://dl.airtable.com/mErDZjUXQLeAVmQxOKlv_Jack_s1_M_20161128_lad.jpg),lad,,Ladino,,,,,12/20/2016,Public,Standard,,,,,,,1 checked out of 1,,,,,,1,,xMaydZp_J30,https://youtu.be/xMaydZp_J30,"100,000 in Israel (1985). Population total all countries: 112,130.","Indo-European, Italic, Romance, Italo-Western, Western, Gallo-Iberian, Ibero-Romance, West Iberian, Castilian",Indo-European,§,,Eurasia,,2016-11-30,, +Sali_20161130_bul,Sali__20161130,John_Kazaklis_20160415,11/30/2016,Sali_s1_M_20161130_bul.png (https://dl.airtable.com/rdOyfQNFQ0yxzfMllpRH_Sali_s1_M_20161130_bul.png),tPyPf2wR3yMXWIC1lPse_Sali_s1_M_20161130_bul.jpg (https://dl.airtable.com/E97Di5OTlCBSEsYbAuNN_tPyPf2wR3yMXWIC1lPse_Sali_s1_M_20161130_bul.jpg),bul,,Bulgarian,Pomak,,,,3/7/2017,Public,CC BY-NC 3.0,checked,,,,,Get a free Bulgarian lesson with italki: http://promos.italki.com/wikitongues_bul,1 checked out of 1,,,,,,1,,xYUS0HFhkW0,https://youtu.be/xYUS0HFhkW0,"7,020,000 in Bulgaria (ELDIA 2012). Population total all countries: 8,157,770.","Indo-European, Slavic, South, Eastern",Indo-European,§Pomak,,Eurasia,,2016-12-2,, +Asimenia_20161130_ell+pnt,Asimenia__20161130,John_Kazaklis_20160415,11/30/2016,Screen Shot 2017-04-03 at 15.34.35.png (https://dl.airtable.com/tmoExI3SQqz2UXDfalZk_Screen%20Shot%202017-04-03%20at%2015.34.35.png),Asimenia_s2_F_20161130_ell+pnt.jpg (https://dl.airtable.com/N7bxISG8QSG7RqU3KnCF_Asimenia_s2_F_20161130_ell%2Bpnt.jpg),"ell,pnt",eng,"Greek, Pontic","Demotic Greek, Caucasus Greek",,,,4/20/2017,Public,CC BY-NC 3.0,checked,,,,,,2 checked out of 2,,,,,,2,,vHWpv_3NmBs,https://youtu.be/vHWpv_3NmBs,"10,700,000 in Greece (ELDIA 2012). Population total all countries: 13,432,940., 400,000 in Greece (2009 Z. Diakonikolaou). Population total all countries: 1,178,000.","Indo-European, Greek, Attic, Indo-European, Greek, Attic",Indo-European,"§Demotic Greek, Caucasus Greek",,"Eurasia, Eurasia, Eurasia",,2016-12-2,, +Julia_20160716_gsw,Julia__20160716,Geoffrey_Roger_,7/16/2016,Screen Shot 2016-12-19 at 09.24.01.png (https://dl.airtable.com/rOLaZ7sbRkG5RrqS9Oge_Screen%20Shot%202016-12-19%20at%2009.24.01.png),Julia_s1_F_20160716_gsw.jpg (https://dl.airtable.com/IVHHr4hMQ0GyYFMntwQl_Julia_s1_F_20160716_gsw.jpg),gsw,,"German, Swiss",,"Basel dialect + +",,,12/23/2016,Public,CC BY-NC 3.0,,,,,,,1 checked out of 1,,,,,,1,,Mwgy2kuoBBU,https://youtu.be/Mwgy2kuoBBU,"4,640,000 in Switzerland (2000 census). Population total all countries: 6,469,000.","Indo-European, Germanic, West, High German, German, Upper German, Alemannic",Indo-European,§,,"Eurasia, Eurasia",,2016-7-18,, +Semere_20160815_amh,Semere__20160815,Elise_Lieberman_20160622,8/15/2016,,,amh,,Amharic,,,,,,To Upload,CC BY-NC 3.0,,,,,,Get a free Amharic lesson with italki: http://promos.italki.com/wikitongues_amh,1 checked out of 1,,,,,,1,,,No ID,"21,600,000 in Ethiopia (2007 census). Population total all countries: 21,811,600. 14,800,000 monolinguals. L2 users: 4,000,000 in Ethiopia.","Afro-Asiatic, Semitic, South, Ethiopian, South, Transversal, Amharic-Argobba",Afro-Asiatic,§,,Africa,,2016-8-18,, +Kinley_20160816_dzo,Kinley__20160816,Elise_Lieberman_20160622,8/16/2016,,,dzo,,Dzongkha,,,,,,To Upload,CC BY-NC 3.0,,,,,,,1 checked out of 1,,,,,,1,,,No ID,"160,000 in Bhutan (2006). Population total all countries: 171,080.","Sino-Tibetan, Tibeto-Burman, Western Tibeto-Burman, Bodish, Central Bodish, Central, Southern",Sino-Tibetan,§,,Eurasia,,2016-8-18,, +Adam_20160927_uzb,Adam__20160927,Elise_Lieberman_20160622,9/27/2016,Screen Shot 2016-10-19 at 12.50.25.png (https://dl.airtable.com/7ejkD3RcG8KsF97KHbSQ_Screen%20Shot%202016-10-19%20at%2012.50.25.png),Adam_s1_M_20160927_uzb.jpg (https://dl.airtable.com/VtGsSrl6QkGuF0y2Kbmx_Adam_s1_M_20160927_uzb.jpg),uzb,,Uzbek,,,,,10/18/2016,Public,CC BY-NC 3.0,,,,,,Get a free Uzbek lesson with italki: http://promos.italki.com/wikitongues_uzb,1 checked out of 1,,,,,,1,,5u4r0SUv10g,https://youtu.be/5u4r0SUv10g,"Population total all languages: 21,930,230.",,,§,,Eurasia,,2016-9-13,, +Islem_20160827_prs,Islem__20160827,Elise_Lieberman_20160622,8/27/2016,Screen Shot 2016-10-21 at 19.04.46.png (https://dl.airtable.com/m1bSJZ3TrzwB3P0E4OwC_Screen%20Shot%202016-10-21%20at%2019.04.46.png),Islem_s1_M_20160827_prs.jpg (https://dl.airtable.com/ltysFHMRGSXVkjsaN2Ir_Islem_s1_M_20160827_prs.jpg),prs,eng,Dari,,,,,10/21/2016,Public,CC BY-NC 3.0,,,,,,,1 checked out of 1,,,,,,1,,j48ZhSpCczs,https://youtu.be/j48ZhSpCczs,"7,600,000 in Afghanistan (2011 census), increasing. Population total all countries: 9,600,000. Ethnic population: 7,600,000. L2 users: All other language groups have Dari speakers, especially those who live in the city of Kabul.","Indo-European, Indo-Iranian, Iranian, Western, Southwestern, Persian",Indo-European,§,,Eurasia,,2016-9-13,,https://www.dropbox.com/sh/vfirjh566xkmnpo/AACzsQ89R8BPp-bNY-seyovwa?dl=0 +Zerovsho_20160828_tgk,Zerovsho__20160828,Elise_Lieberman_20160622,8/28/2016,Screen Shot 2016-10-25 at 15.23.28.png (https://dl.airtable.com/fApbut1dRhChzL8rzDzC_Screen%20Shot%202016-10-25%20at%2015.23.28.png),Zerovsho_s1_M_20160828_tgk.jpg (https://dl.airtable.com/PPb1wwzoQBeEjr6Yj4T8_Zerovsho_s1_M_20160828_tgk.jpg),tgk,,Tajiki,,,,,10/25/2016,Public,CC BY-NC 3.0,,,,,,,1 checked out of 1,,,,,,1,,VkeAbRwP-lY,https://youtu.be/VkeAbRwP-lY,"3,340,000 in Tajikistan (1991). Population total all countries: 4,479,650.","Indo-European, Indo-Iranian, Iranian, Western, Southwestern, Persian",Indo-European,§,,Eurasia,,2016-9-13,, +Aboubacar_20160818_dje+eng,Aboubacar_Adamou_20160818,"Elise_Lieberman_20160622,Daniel_BogreUdell_20130101",8/18/2016,Screen Shot 2017-01-17 at 19.07.25.png (https://dl.airtable.com/pyYnF8bToG6gk32IF4ai_Screen%20Shot%202017-01-17%20at%2019.07.25.png),Aboubacar_s2_M_20160818_dje+eng.jpg (https://dl.airtable.com/PyyZMe17SQO1a3bP5Tz3_Aboubacar_s2_M_20160818_dje%2Beng.jpg),"dje,eng",,"Zarma, English",Zerma,,,,2/2/2017,Public,Standard,,,,,,Get a free English lesson with italki: http://promos.italki.com/wikitongues_eng,2 checked out of 2,,,,,,2,,QUoTxiFdOmY,https://youtu.be/QUoTxiFdOmY,"2,350,000 in Niger (2006). Population total all countries: 2,438,900., 55,600,000 in United Kingdom (ELDIA 2012). Population total all countries: 335,148,868. L2 users: 1,500,000 in United Kingdom (Crystal 2003). L2 users worldwide: 505,000,000.","Nilo-Saharan, Songhai, Southern, Indo-European, Germanic, West, English",Nilo-Saharan,§Zerma,,"Africa, Eurasia, Eurasia",,2016-8-18,, +Chernet_20160717_eng+spa,Chernet__20160717,Daniel_BogreUdell_20130101,7/17/2016,,,"eng,spa",,"English, Spanish",,,Spelling,,,To Upload,Standard,,,,,,"Get a free English lesson with italki: http://promos.italki.com/wikitongues_eng, Get a free Spanish lesson with italki: http://promos.italki.com/wikitongues_spa",2 checked out of 2,,,,,,2,,,No ID,"55,600,000 in United Kingdom (ELDIA 2012). Population total all countries: 335,148,868. L2 users: 1,500,000 in United Kingdom (Crystal 2003). L2 users worldwide: 505,000,000., 38,400,000 in Spain (ELDIA 2012). Population total all countries: 414,170,030. L2 users: 7,490,000 in Spain (ELDIA 2006).","Indo-European, Germanic, West, English, Indo-European, Italic, Romance, Italo-Western, Western, Gallo-Iberian, Ibero-Romance, West Iberian, Castilian",Indo-European,§,,"Eurasia, Eurasia, Eurasia, Eurasia",,2016-7-18,, +Churmin_20160717_xsr,Churmin__20160717,Daniel_BogreUdell_20130101,7/17/2016,,,xsr,,Sherpa,,,,,,To Upload,Standard,,,,,,,1 checked out of 1,,,,,,1,,,No ID,"145,000 in Nepal (2011 census), decreasing. Population total all countries: 168,800. A few elderly monolinguals in remote villages (UNESCO). Ethnic population: 155,000 (2001 census). L2 users: Some non-Sherpas who work in the trekking trade learn some Sherpa.","Sino-Tibetan, Tibeto-Burman, Western Tibeto-Burman, Bodish, Central Bodish, Central, gTsang",Sino-Tibetan,§,,Eurasia,,2016-7-18,, +Phunjo_20160717_xsr,Phunjo__20160717,Daniel_BogreUdell_20130101,7/17/2016,,,xsr,,Sherpa,,,,,,To Upload,Standard,,,,,,,1 checked out of 1,,,,,,1,,,No ID,"145,000 in Nepal (2011 census), decreasing. Population total all countries: 168,800. A few elderly monolinguals in remote villages (UNESCO). Ethnic population: 155,000 (2001 census). L2 users: Some non-Sherpas who work in the trekking trade learn some Sherpa.","Sino-Tibetan, Tibeto-Burman, Western Tibeto-Burman, Bodish, Central Bodish, Central, gTsang",Sino-Tibetan,§,,Eurasia,,2016-7-18,, +Carrie_20160717_yue,Carrie_Zhau_20160717,Daniel_BogreUdell_20130101,7/17/2016,,,yue,,"Chinese, Yue",Cantonese,,,,,To Upload,Standard,,,,,,,1 checked out of 1,,,,,,1,,,No ID,"52,000,000 in China (1984). Population total all countries: 62,221,560.","Sino-Tibetan, Chinese",Sino-Tibetan,§Cantonese,,Eurasia,,2016-7-18,, +Aaku_20160717_new,Aaku__20160717,Daniel_BogreUdell_20130101,7/17/2016,Screen Shot 2016-10-25 at 15.29.34 1.png (https://dl.airtable.com/sNp43baTGZ5Kh66jpaAG_Screen%20Shot%202016-10-25%20at%2015.29.34%201.png),Aaku_s1_F_20160717_new.jpg (https://dl.airtable.com/WnGRaRHvTu27av6hgxcQ_Aaku_s1_F_20160717_new.jpg),new,,Newar,,,,,10/25/2016,Public,Standard,,,,,,,1 checked out of 1,,,,,,1,,Bozt5oUv74w,https://youtu.be/Bozt5oUv74w,"847,000 in Nepal (2011 census), decreasing. Population total all countries: 861,000. Many women are monolingual. Ethnic population: 1,260,000. Includes 1,245,000 Newar and 11,500 Pahari.","Sino-Tibetan, Tibeto-Burman, Western Tibeto-Burman, Himalayan, Central Himalayan, Newar",Sino-Tibetan,§,,Eurasia,,2016-7-18,, +Venecia_20160526_jam+eng,Venecia_Parchment_20160526,Daniel_BogreUdell_20130101,5/26/2016,Venecia_s2_F_20160526_jam+eng.png (https://dl.airtable.com/Z92YX2USQ6jQsRRqBn8A_Venecia_s2_F_20160526_jam%2Beng.png),Venecia_s2_F_20160526_jam+eng.jpg (https://dl.airtable.com/7UlH6K3iQe2ujF7dnrs4_Venecia_s2_F_20160526_jam%2Beng.jpg),"jam,eng",,"Jamaican Creole English, English",Jamaican Patois,,,,12/9/2016,Public,CC BY-NC 3.0,,,,,,Get a free English lesson with italki: http://promos.italki.com/wikitongues_eng,2 checked out of 2,,,,,,2,,tFoIGW7FLUk,https://youtu.be/tFoIGW7FLUk,"2,670,000 in Jamaica (2001). Population total all countries: 3,205,000., 55,600,000 in United Kingdom (ELDIA 2012). Population total all countries: 335,148,868. L2 users: 1,500,000 in United Kingdom (Crystal 2003). L2 users worldwide: 505,000,000.","English Creole, Atlantic, Western, Indo-European, Germanic, West, English",English Creole,§Jamaican Patois,,"Americas, Eurasia, Eurasia",,2016-5-31,, +Dolma_20160717_nep,Dolma_Sherpa_20160717,Daniel_BogreUdell_20130101,7/17/2016,Screen Shot 2017-01-17 at 17.15.01.png (https://dl.airtable.com/EUXirCWRJe8WJjocgwr6_Screen%20Shot%202017-01-17%20at%2017.15.01.png),Dolma_s1_F_20160717_xsr.jpg (https://dl.airtable.com/RdaMyVSTWSx4qEmjFn3l_Dolma_s1_F_20160717_xsr.jpg),nep,,Nepali,,,,,1/17/2017,Public,Standard,,,,,,Get a free Nepali lesson with italki: http://promos.italki.com/wikitongues_nep,1 checked out of 1,,,,,,1,,ISFBfGJWiU8,https://youtu.be/ISFBfGJWiU8,"Population total all languages: 16,148,100.",,,§,,Eurasia,,2016-7-18,, +Tenzin_20160717_bod,Tenzin__20160717,Daniel_BogreUdell_20130101,7/17/2016,Screen Shot 2017-01-17 at 17.31.39.png (https://dl.airtable.com/cG0OgtmfSMynd4Bqnpwi_Screen%20Shot%202017-01-17%20at%2017.31.39.png),Tenzin_s1_F_20160717_bod.jpg (https://dl.airtable.com/l6EQcsQOT1yWK7KTKPxQ_Tenzin_s1_F_20160717_bod.jpg),bod,,"Tibetan, Central",,,,,1/24/2017,Public,Standard,,,,,,,1 checked out of 1,,,,,,1,,I2sFAUpUhI0,https://youtu.be/I2sFAUpUhI0,"1,070,000 in China (1990 census). 570,000 Dbus, 460,000 Gtsang, 40,000 Mngahris out of 4,593,000 in the official nationality. Population total all countries: 1,172,940. 920,000 monolinguals.","Sino-Tibetan, Tibeto-Burman, Western Tibeto-Burman, Bodish, Central Bodish, Central",Sino-Tibetan,§,,Eurasia,,2016-7-18,, +Namrata_20160717_nep,Namrata__20160717,Daniel_BogreUdell_20130101,7/17/2016,Screen Shot 2017-01-31 at 11.20.18.png (https://dl.airtable.com/8or1yktXTtG5Q8uNNmov_Screen%20Shot%202017-01-31%20at%2011.20.18.png),Namrata_s1_F_20160717_nep.jpg (https://dl.airtable.com/0FpFVIJiQoiHamrg2OMA_Namrata_s1_F_20160717_nep.jpg),nep,,Nepali,,,,,2/28/2017,Public,Standard,,,,,,Get a free Nepali lesson with italki: http://promos.italki.com/wikitongues_nep,1 checked out of 1,,,,,,1,,yorpVTOyeSE,https://youtu.be/yorpVTOyeSE,"Population total all languages: 16,148,100.",,,§,,Eurasia,,2016-7-18,, +Bety_20160525_toj,Bety__20160525,Crawford_Hunt_,5/25/2016,Screen Shot 2016-07-31 at 9.40.23 PM.png (https://dl.airtable.com/MGIibMFNRvC3zDqgvKUw_Screen%20Shot%202016-07-31%20at%209.40.23%20PM.png),Bety_s1_F_20160525_toj.jpg (https://dl.airtable.com/k0axjEUQRUGFP6s0o4fp_Bety_s1_F_20160525_toj.jpg),toj,,Tojolabal,,,,,7/19/2016,Public,Standard,,,,,,,1 checked out of 1,,,,,,1,,MEe25QALOn0,https://youtu.be/MEe25QALOn0,"34,300 (2000 INALI). 7,700 monolinguals.","Mayan, Yucatecan-Core Mayan, Q’anjob’alan-Chujean, Chujean",Mayan,§,,Americas,,2016-5-31,, +SisterCookson+SisterSooalo_20161025_ton,"SisterCookson__20161025,SisterSooalo__20161025",Argo_Cayhadi_20150418,10/25/2016,Screen Shot 2016-12-19 at 09.47.08.png (https://dl.airtable.com/M29f6HTJSSdbxWprXN9c_Screen%20Shot%202016-12-19%20at%2009.47.08.png),Sister & Sister_s1_FF_20161025_ton.jpg (https://dl.airtable.com/pYj2eBVTlGoGlrVHID1e_Sister%20%26%20Sister_s1_FF_20161025_ton.jpg),ton,,Tongan,,,,,1/11/2017,Public,CC BY-NC 3.0,checked,,,,,,1 checked out of 1,,,,,,1,,Ui1fZPJ_Wr4,https://youtu.be/Ui1fZPJ_Wr4,"96,300 in Tonga (1998). Population total all countries: 169,120.","Austronesian, Malayo-Polynesian, Central-Eastern Malayo-Polynesian, Eastern Malayo-Polynesian, Oceanic, Central-Eastern Oceanic, Remote Oceanic, Central Pacific, East Fijian-Polynesian, Polynesian, Tongic",Austronesian,§,,Oceania,,2016-10-26,, +SisterSooalo_20161025_smo,SisterSooalo__20161025,Argo_Cayhadi_20150418,10/25/2016,Screen Shot 2017-05-02 at 15.46.48.png (https://dl.airtable.com/4OTdANksRECqXlglRfIn_Screen%20Shot%202017-05-02%20at%2015.46.48.png),Sister_s1_F_20161025_smo.jpg (https://dl.airtable.com/LIGfoH4RSk2KrWvR4Rg8_Sister_s1_F_20161025_smo.jpg),smo,eng,Samoan,,,,,5/25/2017,Public,CC BY-NC 3.0,checked,,,,,,1 checked out of 1,,,Facebook,2017-12-14,https://www.facebook.com/wikitongues/videos/1665321713532349/,1,,uv_6J0heNVc,https://youtu.be/uv_6J0heNVc,"199,000 in Samoa (1999). Population total all countries: 413,257.","Austronesian, Malayo-Polynesian, Central-Eastern Malayo-Polynesian, Eastern Malayo-Polynesian, Oceanic, Central-Eastern Oceanic, Remote Oceanic, Central Pacific, East Fijian-Polynesian, Polynesian, Nuclear, Samoic-Outlier, Samoan",Austronesian,§,,Oceania,,2016-10-26,,https://www.dropbox.com/sh/n5canzriuej1jjc/AACHazLuO94zlyOrcqaAwl-Qa?dl=0 +Hussein_20160718_prs,Hussein__20160718,Alexandra_Werner_20150326,7/18/2016,Screen Shot 2016-09-15 at 12.03.08 1.png (https://dl.airtable.com/jVeuqyGAQEu9FKnKGRYC_Screen%20Shot%202016-09-15%20at%2012.03.08%201.png),Hussein_s1_M_20160718_prs.jpg (https://dl.airtable.com/g8vwWcoITSCmxoFj85mD_Hussein_s1_M_20160718_prs.jpg),prs,,Dari,,,,,9/15/2016,Public,Standard,,,,,,,1 checked out of 1,,,,,,1,,UOZOR4sBEEY,https://youtu.be/UOZOR4sBEEY,"7,600,000 in Afghanistan (2011 census), increasing. Population total all countries: 9,600,000. Ethnic population: 7,600,000. L2 users: All other language groups have Dari speakers, especially those who live in the city of Kabul.","Indo-European, Indo-Iranian, Iranian, Western, Southwestern, Persian",Indo-European,§,,Eurasia,,2016-7-18,, +Stéfane_20161130_por,Stéfane_Hélder_20161130,Stefan_Hélder_,11/30/2016,Screen Shot 2017-01-30 at 20.47.14.png (https://dl.airtable.com/xzbXtv5HQka8QpRdhBJy_Screen%20Shot%202017-01-30%20at%2020.47.14.png),Stéfane_s1_M_20161130_por.jpg (https://dl.airtable.com/WHXblcmQqCUNrZJPdrHt_Ste%CC%81fane_s1_M_20161130_por.jpg),por,,Portuguese,Angolan Portuguese,,,Angola,2/21/2017,Public,CC BY-NC 3.0,checked,checked,"Olá, bom dia, boa tarde ou boa noite. Tudo bem? Eu estou muito bem, obrigado. +Chamo-me Hélder Stéfane e estou a falar português, que é a língua mais usada em Angola. Angola fica em África +e ao redor de Angola temos a Republica Democrática do Congo, a Zâmbia, Namíbia e temos o oceano atlântico. + +Para terem uma ideia de onde fica Angola. No sul do continente africano. Lá em baixo no mapa temos a África do +sul, por cima da África do Sul, Namíbia e Botswana e depois Angola, que está ao lado da Zâmbia. + +Apesar de a língua oficial de Angola ser o Português. Há muitas outras línguas que são de Angola, faladas +por vários grupos étnicos. Umbundu, Kimbundu, Kikongo, Chocué, Kwanhama e o Ganguela. + +O português de Angola recebe muita influência linguística dessas línguas. Muitas palavras e expressões +usadas no dia-a-dia são derivadas dessas línguas nacionais. Por exemplo, chamamos os mais velhos, ou pessoas +de mais idade, de kota. Kota vem da palavra \"Dikota\" em kimbundu, chamamos de caçula, ao filho mais novo +e essa expressão vem do termo \"Kasule\" em kimbundu que significa filho mais novo. + +O português de Angola é uma língua muito interessante e foi bom partilhar essas informações convosco. + +Um forte abraço e... tenham um óptimo dia.","Hello! Good morning, good afternoon, good evening. How are you? I am very well, thanks. +My name is Hélder Stéfane and I\'m speaking Portuguese, which is the most used language in Angola. Angola is in Africa, and around Angola we have the Democratic Republic of the Congo, Zambia, Namibia and we have the Atlantic Ocean. + +To get an idea of ​​where Angola is: in the south of the African continent, down the map we have +South Africa, over South Africa_> Namibia and Botswana and then Angola, which is next to Zambia. + +Although the official language of Angola is Portuguese, there are many other languages ​​spoken in Angola by various ethnic groups: Umbundu, Kimbundu, Kikongo, Chocué, Kwanhama and the Ganguela. + +Portuguese from Angola receives a lot of linguistic influence from these languages. Many words and expressions +in everyday life are derived from these national languages. For example, we call elders, or older people, of kota. Kota comes from the word \"Dikota\" in Kimbundu. We call \"caçula\", the youngest son, +and this expression comes from the term \"Kasule\" in Kimbundu which means younger son. + +Angola\'s Portuguese is a very interesting language and it was good to share this information with you. + +A big hug and ... have a great day.","My goal making this video was: +- To show where my country is located. +- What\'s the main language spoked there. +- What languages we have in Angola and how they influence the Angolan Portuguese.",Get a free Portuguese lesson with italki: http://promos.italki.com/wikitongues_por,1 checked out of 1,,,,,,1,,xMmfbZIIclw,https://youtu.be/xMmfbZIIclw,"10,000,000 in Portugal (ELDIA 2012). Population total all countries: 203,349,200.","Indo-European, Italic, Romance, Italo-Western, Western, Gallo-Iberian, Ibero-Romance, West Iberian, Portuguese-Galician",Indo-European,§Angolan Portuguese,,"Eurasia, Eurasia",,2016-12-2,, +António_20170924_kmb,António_Zua_20170924,Stefan_Hélder_,9/24/2017,Screen Shot 2017-11-05 at 4.50.12 PM.png (https://dl.airtable.com/Q3IkMhbfQhisiSA59ixO_Screen%20Shot%202017-11-05%20at%204.50.12%20PM.png),Antonio_20170924_kmb.png (https://dl.airtable.com/flwYdxPGREC9dHSQoUMA_Antonio_20170924_kmb.png),kmb,,Kimbundu,,,,Angola,11/30/2017,Public,CC BY-SA 4.0,checked,checked,,,Luanda province,,1 checked out of 1,,,,,,1,,,No ID,"4,000,000 (2012 World Factbook).","Niger-Congo, Atlantic-Congo, Volta-Congo, Benue-Congo, Bantoid, Southern, Narrow Bantu, Central, H, Kimbundu (H.21)",,,"This video was recorded by Stéfane Helder in Luanda Province, Angola, where António lives and works. The Kimbundu language is spoken by as many as four million people, primarily in the Luanda, Bengo, and Malanje provinces of the southern African nation of Angola. It is one of the country’s most widely spoken Bantu languages, having contributed significantly to the vocabulary of both Angolan and Brazilian Portuguese. Though Portuguese is Angola’s sole language of administration, Kimbundu is a recognized ‘national language’ alongside Kikongo, Chokwe, Umbundu, Nganguela and Kwanyama.",Africa,,2017-9-24,, +Ricky_20140312_eng+mri+spa,Ricky__20140312,Ricky__20140312,3/12/2014,ricky.png (https://dl.airtable.com/FZsU9pGS76nkizMvHvVA_ricky.png),Ricky_s3_M_20140312_eng+mri+spa.jpg (https://dl.airtable.com/dpkgvqbToO7BETk3vLf3_Ricky_s3_M_20140312_eng%2Bmri%2Bspa.jpg),"eng,mri,spa",,"English, Maori, Spanish",,,,Argentina,4/2/2014,Public,Standard,,,,,,"Get a free English lesson with italki: http://promos.italki.com/wikitongues_eng, Get a free Spanish lesson with italki: http://promos.italki.com/wikitongues_spa",3 checked out of 3,checked,,,,,3,checked,OFHx0-4wU38,https://youtu.be/OFHx0-4wU38,"55,600,000 in United Kingdom (ELDIA 2012). Population total all countries: 335,148,868. L2 users: 1,500,000 in United Kingdom (Crystal 2003). L2 users worldwide: 505,000,000., 148,000 in New Zealand (2013 census). 100,000 understand but do not speak it (1995 Maori Language Commission); 30,000–50,000 adult speakers over 15 years old (1995). Population total all countries: 148,660. Ethnic population: 599,000 (2013 census)., 38,400,000 in Spain (ELDIA 2012). Population total all countries: 414,170,030. L2 users: 7,490,000 in Spain (ELDIA 2006).","Indo-European, Germanic, West, English, Austronesian, Malayo-Polynesian, Central-Eastern Malayo-Polynesian, Eastern Malayo-Polynesian, Oceanic, Central-Eastern Oceanic, Remote Oceanic, Central Pacific, East Fijian-Polynesian, Polynesian, Nuclear, East, Central, Tahitic, Indo-European, Italic, Romance, Italo-Western, Western, Gallo-Iberian, Ibero-Romance, West Iberian, Castilian",Indo-European,"English,Maori,Spanish,,,",,"Eurasia, Eurasia, Oceania, Eurasia, Eurasia",,2014-12-22,, +María_20150924_gug,María__20150924,"Daniel_BogreUdell_20130101,Maxi_Salomone_20140821",9/24/2015,Screen Shot 2016-06-15 at 4.49.39 PM.png (https://dl.airtable.com/cjjxGvFDTti4SEWds1ep_Screen%20Shot%202016-06-15%20at%204.49.39%20PM.png),maxresdefault (4).jpg (https://dl.airtable.com/xjXA1cHaSViBw8YqQ97E_maxresdefault%20(4).jpg),gug,,"Guaraní, Paraguayan",Guarani,,,Argentina,9/24/2015,Public,Standard,,,,,,,1 checked out of 1,,,,,,1,checked,eLX1KG3FnBg,https://youtu.be/eLX1KG3FnBg,"4,650,000 in Paraguay (1995), decreasing. Population total all countries: 4,850,000. 2,500,000 monolinguals (2002 census).","Tupian, Tupí-Guaraní, Guaraní, Guaraní",Tupian,"Guarani,,,,,",,Americas,,2015-2-7,, +Isabel_20140729_spa,Isabel__20140729,"Daniel_BogreUdell_20130101,Maxi_Salomone_20140821",7/29/2014,6XQIg7jKTjyJGl4OgzVu_isabel-spa-thumb-raw.png (https://dl.airtable.com/bWn6BQ4Q3S558UBEFGIA_6XQIg7jKTjyJGl4OgzVu_isabel-spa-thumb-raw.png),Isabel_s1_F_20140729_spa.jpg (https://dl.airtable.com/Tcs1lgNtSnGrdMCJ6jbt_Isabel_s1_F_20140729_spa.jpg),spa,spa,Spanish,,,,Argentina,2/14/2017,Public,Standard,,,,,"Ethnic Mapuche from Trenque Lauquen, Argentina",Get a free Spanish lesson with italki: http://promos.italki.com/wikitongues_spa,1 checked out of 1,,77,,,,1,,sPeI8MR9fCU,https://youtu.be/sPeI8MR9fCU,"38,400,000 in Spain (ELDIA 2012). Population total all countries: 414,170,030. L2 users: 7,490,000 in Spain (ELDIA 2006).","Indo-European, Italic, Romance, Italo-Western, Western, Gallo-Iberian, Ibero-Romance, West Iberian, Castilian",Indo-European,§,,"Eurasia, Eurasia",,2015-2-7,, +Maxi_20140821_spa+eng+por+cat+ita,Maxi_Salomone_20140821,Maxi_Salomone_20140821,8/21/2014,maxi.png (https://dl.airtable.com/uDSfv7Q0QmO5sX2T25zg_maxi.png),Maxi_s5_M_20140821_spa+eng+por+cat+ita.jpg (https://dl.airtable.com/bWOW8y8eSB2oeHERBo0m_Maxi_s5_M_20140821_spa%2Beng%2Bpor%2Bcat%2Bita.jpg),"spa,eng,por,cat,ita",,"Spanish, English, Portuguese, Catalan, Italian",,,,Argentina,8/21/2014,Public,Standard,,,,,,"Get a free Spanish lesson with italki: http://promos.italki.com/wikitongues_spa, Get a free English lesson with italki: http://promos.italki.com/wikitongues_eng, Get a free Portuguese lesson with italki: http://promos.italki.com/wikitongues_por, Get a free Catalan lesson with italki: http://promos.italki.com/wikitongues_cat, Get a free Italian lesson with italki: http://promos.italki.com/wikitongues_ita",5 checked out of 5,checked,,,,,5,checked,0GsYpjHWDis,https://youtu.be/0GsYpjHWDis,"38,400,000 in Spain (ELDIA 2012). Population total all countries: 414,170,030. L2 users: 7,490,000 in Spain (ELDIA 2006)., 55,600,000 in United Kingdom (ELDIA 2012). Population total all countries: 335,148,868. L2 users: 1,500,000 in United Kingdom (Crystal 2003). L2 users worldwide: 505,000,000., 10,000,000 in Portugal (ELDIA 2012). Population total all countries: 203,349,200., 3,750,000 in Spain (ELDIA 2012). Population total all countries: 4,079,420. L2 users: 5,150,000 in Spain (ELDIA 2012)., 57,700,000 in Italy (ELDIA 2012). Population total all countries: 63,655,047.","Indo-European, Italic, Romance, Italo-Western, Western, Gallo-Iberian, Ibero-Romance, West Iberian, Castilian, Indo-European, Germanic, West, English, Indo-European, Italic, Romance, Italo-Western, Western, Gallo-Iberian, Ibero-Romance, West Iberian, Portuguese-Galician, Indo-European, Italic, Romance, Italo-Western, Western, Gallo-Iberian, Ibero-Romance, East Iberian, Indo-European, Italic, Romance, Italo-Western, Italo-Dalmatian",Indo-European,"Spanish,English,Portuguese,Catalan,Italian,",,"Eurasia, Eurasia, Eurasia, Eurasia, Eurasia, Eurasia, Eurasia, Eurasia, Eurasia, Eurasia",,2014-12-22,, +Devika_20141012_eng+rwr+mar+hin,Devika__20141012,Maxi_Salomone_20140821,10/12/2014,devika.png (https://dl.airtable.com/VY3vL79eTPqDRvozHvFa_devika.png),Devika_s4_F_20141012_eng+rwr+mar+hin.png (https://dl.airtable.com/AbQp1AvTShyljXpuEhM9_Devika_s4_F_20141012_eng%2Brwr%2Bmar%2Bhin.png),"eng,rwr,mar,hin",,"English, Marwari, Marathi, Hindi",,,,Argentina,10/12/2014,Public,Standard,,,,,,"Get a free English lesson with italki: http://promos.italki.com/wikitongues_eng, Get a free Marathi lesson with italki: http://promos.italki.com/wikitongues_mar, Get a free Hindi lesson with italki: http://promos.italki.com/wikitongues_hin",4 checked out of 4,checked,,Facebook,2016-8-14,https://www.facebook.com/wikitongues/videos/1173634379367754/,4,checked,GZcV67w2o1g,https://youtu.be/GZcV67w2o1g,"55,600,000 in United Kingdom (ELDIA 2012). Population total all countries: 335,148,868. L2 users: 1,500,000 in United Kingdom (Crystal 2003). L2 users worldwide: 505,000,000., 5,600,000 in India (2007 SIL). Population total all countries: 5,622,600., 71,700,000 in India (2001 census). Population total all countries: 71,780,660. L2 users: 3,000,000 in India., 258,000,000 in India (2001 census). Population total all countries: 260,333,620. L2 users: 120,000,000 in India (Wiesenfeld 1999).","Indo-European, Germanic, West, English, Indo-European, Indo-Iranian, Indo-Aryan, Central zone, Rajasthani, Marwari, Indo-European, Indo-Iranian, Indo-Aryan, Southern zone, Indo-European, Indo-Iranian, Indo-Aryan, Central zone, Western Hindi, Hindustani",Indo-European,"English,Marwadi,Marathi,Hindi,,",,"Eurasia, Eurasia, Eurasia, Eurasia, Eurasia",,2014-12-22,, +Enrique_20151210_spa,Enrique__20151210,Maxi_Salomone_20140821,12/10/2015,enrique.png (https://dl.airtable.com/7r7X2YH0TyuwxSNxLo4j_enrique.png),Enrique_s1_M_20151210_spa.jpg (https://dl.airtable.com/v1PJRWlbQfOkBpGa9LRa_Enrique_s1_M_20151210_spa.jpg),spa,,Spanish,,,,Argentina,1/10/2015,Public,Standard,,,,,,Get a free Spanish lesson with italki: http://promos.italki.com/wikitongues_spa,1 checked out of 1,checked,,,,,1,checked,30CWWm0BcNs,https://youtu.be/30CWWm0BcNs,"38,400,000 in Spain (ELDIA 2012). Population total all countries: 414,170,030. L2 users: 7,490,000 in Spain (ELDIA 2006).","Indo-European, Italic, Romance, Italo-Western, Western, Gallo-Iberian, Ibero-Romance, West Iberian, Castilian",Indo-European,"Spanish,,,,,",,"Eurasia, Eurasia",,2014-12-22,, +Candela_20150221_aed,Candela__20150221,Maxi_Salomone_20140821,2/21/2015,candela-aed-thumb-raw.png (https://dl.airtable.com/ohkVdCQNm6G1VDdVFAAx_candela-aed-thumb-raw.png),Candela_s1_F_20150221_aed.png (https://dl.airtable.com/cWOsdmwQvGbfvpEN3gHU_Candela_s1_F_20150221_aed.png),aed,,Argentine Sign Language,Argentinian Sign Language,,,Argentina,2/21/2015,Public,Standard,,,,,,,1 checked out of 1,,,Facebook,2016-10-3,https://www.facebook.com/wikitongues/videos/1221212167943308/,1,checked,lhufdY1uT3k,https://youtu.be/lhufdY1uT3k,,Deaf sign language,,"Argentinian Sign Language,,,,,",,Americas,,2015-2-20,, +José_20140729_spa,José__20140729,Daniel_BogreUdell_20130101,7/29/2014,jose-spa-thumb-raw.png (https://dl.airtable.com/jeZs9MD3TX6HRv7xobAS_jose-spa-thumb-raw.png),,spa,,Spanish,,,,Argentina,,To Upload,Standard,,,,,"Video from Córdoba, Argentina +",Get a free Spanish lesson with italki: http://promos.italki.com/wikitongues_spa,1 checked out of 1,,90,,,,1,,,No ID,"38,400,000 in Spain (ELDIA 2012). Population total all countries: 414,170,030. L2 users: 7,490,000 in Spain (ELDIA 2006).","Indo-European, Italic, Romance, Italo-Western, Western, Gallo-Iberian, Ibero-Romance, West Iberian, Castilian",Indo-European,§,,"Eurasia, Eurasia",,2015-2-7,, +Sebastian_20151121_bar,Sebastian__20151121,Daniel_BogreUdell_20130101,11/21/2015,sebastian-bar-thumb-raw.png (https://dl.airtable.com/PUG0dyXlROStp4zAShep_sebastian-bar-thumb-raw.png),sebastian-bar-thumb.jpg (https://dl.airtable.com/7CtJ8qxQjyUt8jYi1mRs_sebastian-bar-thumb.jpg),bar,,Bavarian,,,,Argentina,11/21/2015,Public,Standard,,,,,,,1 checked out of 1,,,,,,1,checked,ux9UuNoCruo,https://youtu.be/ux9UuNoCruo,"7,830,000 in Austria (ELDIA 2012). Population total all countries: 14,089,000.","Indo-European, Germanic, West, High German, German, Upper German, Bavarian-Austrian",Indo-European,"Bavarian,,,,,",,Eurasia,,2015-2-7,, +Vseslav_20140927_rus,Vseslav__20140927,Vseslav__20140927,9/27/2014,vseslav-rus-thumb-raw.png (https://dl.airtable.com/cPSKnoq5QsWfxokUbJ0n_vseslav-rus-thumb-raw.png),Vseslav_s1_M_20140927_rus.jpg (https://dl.airtable.com/k02OIKXkQRu90GPUgQAJ_Vseslav_s1_M_20140927_rus.jpg),rus,,Russian,,,,Australia,11/2/2014,Public,Standard,,checked,"[00:00:00.00] Nagmare en lo, aê i mbe bông su renga tlap [00:00:09.04] na dal êr, aê merakô merakô mbe na ôt Vanuatu [00:00:17.00] watêtê aelan su aê mbe Pentekos aê [00:00:21.07] gema saru ran dlogema aê sêtê mbe Sa [00:00:26.12] aê Sa aê nagmare en lo aê gem saru ran ronga [00:00:32.18] watlojiêr makolo ne bama, aê geam saru ran, aê dal, dal en be Sa, aê i teamat [00:00:39.04] geam sasaru ran ronga [00:00:43.03] menok têre o","[00:00:00.00] Today is an important day [00:00:09.04] a day for all languages, and we are both from Vanuatu [00:00:17.00] we are from a small island called Pentecost Island [00:00:21.07] we speak our own language which is called Sa [00:00:26.12] and today we are still speaking the Sa language [00:00:32.18] and when the next generation of children grow, we will speak our language to them and the Sa language will never die [00:00:39.04] we will still speak our language [00:00:43.03] that's all!","Video from Australia +""Sa is one of the 105 language of Vanuatu which per capita (population 250,000) is the most multilingual country in the world.""",Get a free Russian lesson with italki: http://promos.italki.com/wikitongues_rus,1 checked out of 1,checked,,,,,1,checked,vPY5v6SBkxM,https://youtu.be/vPY5v6SBkxM,"137,000,000 in Russian Federation (2010 census). Population total all countries: 167,332,230.","Indo-European, Slavic, East",Indo-European,"Russian,,,,,",,"Eurasia, Eurasia",,2014-12-22,, +Tarlan_20140729_azj,Tarlan__20140729,Madeleine_Koerner_,7/29/2014,,,azj,,"Azerbaijani, North",Azeri,,,Azerbaijan,,To Upload,Standard,,,,,"Full name: Tarlan Ahmedov. Tourism office in Zaqatala, Azerbaijan","Get a free Azerbaijani, North lesson with italki: http://promos.italki.com/wikitongues_azj",1 checked out of 1,,99,,,,1,,,No ID,"6,100,000 in Azerbaijan (2007 census). Population total all countries: 7,324,060. 4,000,000 monolinguals. Ethnic population: 6,230,000. L2 users: 8,000,000 in Azerbaijan.","Altaic, Turkic, Southern, Azerbaijani",Altaic,§Azeri,,Eurasia,,2014-12-22,, +Anonymous_20150924_jdt,.Anonymous__,Madeleine_Koerner_,9/24/2015,,,jdt,,Judeo-Tat,Lahij,,,Azerbaijan,,To Upload,Standard,,,,,"MISSING; Lahji, Azerbaijan; Barber",,1 checked out of 1,,99,,,,1,,,No ID,"2,010 in Russian Federation (2010 census). Census includes Tat ,. Population total all countries: 96,010.","Indo-European, Indo-Iranian, Iranian, Western, Southwestern, Tat",Indo-European,§Lahij,,Eurasia,,2014-12-22,, +Anonymous_20141215_tkr,.Anonymous__,Madeleine_Koerner_,12/15/2014,,,tkr,,Tsakhur,,,,Azerbaijan,,To Upload,Standard,,,,,"Zaqatala, Azerbaijan; Works at a hotel",,1 checked out of 1,,99,,,,1,,,No ID,"13,000 in Azerbaijan (1989 census). Population total all countries: 23,673. Ethnic population: 13,300 (1989 census).","North Caucasian, East Caucasian, Lezgic, Nuclear Lezgic, West Lezgic",North Caucasian,§,,Eurasia,,2014-12-22,, +Anonymous_20151114_ttt,.Anonymous__,Madeleine_Koerner_,11/14/2015,,,ttt,,"Tat, Muslim",Tat,,,Azerbaijan,,To Upload,Standard,,,,,"MISSING; Baku, Azerbaijan; Journalist",,1 checked out of 1,,99,,,,1,,,No ID,"18,000 in Azerbaijan (1989 census). Population total all countries: 28,010. Ethnic population: 22,000 (1990 A. Kibrik).","Indo-European, Indo-Iranian, Iranian, Western, Southwestern, Tat",Indo-European,§Tat,,Eurasia,,2014-12-22,, +Anonymous_20141215_udi,.Anonymous__,Madeleine_Koerner_,12/15/2014,,,udi,,Udi,,,,Azerbaijan,,To Upload,Standard,,,,,"Oghuz, Azerbaijan",,1 checked out of 1,,99,,,,1,,,No ID,"3,800 in Azerbaijan (2009 census). Population total all countries: 6,590.","North Caucasian, East Caucasian, Lezgic, Udi",North Caucasian,§,,Eurasia,,2014-12-22,, +Isayev_20141029_ava,Isayev__20141029,Madeleine_Koerner_,10/29/2014,isayev-avar-thumb-raw.png (https://dl.airtable.com/8C2LEDYrR4e0Xb2NrVXp_isayev-avar-thumb-raw.png),Isayev_s1_M_20141029_ava.png (https://dl.airtable.com/MeJvUM4Tuiipb40RsZjU_Isayev_s1_M_20141029_ava.png),ava,,Avar,,,,Azerbaijan,9/8/2015,Public,Standard,,,,,"Full name: Isayev Mahammad. +Zaqatala, Azerbaijan",,1 checked out of 1,,,,,,1,checked,JFp2hDgjIyM,https://youtu.be/JFp2hDgjIyM,"715,000 in Russian Federation (2010 census). Population total all countries: 761,960. Ethnic population: 912,000 (2010 census).","North Caucasian, East Caucasian, Avar-Andic, Avar",North Caucasian,"Avar,,,,,",,Eurasia,,2014-12-22,, +Gustavo_20150804_por,Gustavo__20150804,Gustavo__20150804,8/4/2015,gustavo-por-thumb-raw.png (https://dl.airtable.com/KdIBNdeiRCuW9ojqj2zP_gustavo-por-thumb-raw.png),Gustavo_s1_M_20150804_por.png (https://dl.airtable.com/nErfr9N5RliCK8cP1ljH_Gustavo_s1_M_20150804_por.png),por,,Portuguese,,,,Brazil,8/4/2015,Public,Standard,,,,,,Get a free Portuguese lesson with italki: http://promos.italki.com/wikitongues_por,1 checked out of 1,checked,,Facebook,2016-5-10,https://www.facebook.com/wikitongues/videos/1105152249549301/,1,checked,1fBDgdfX4vk,https://youtu.be/1fBDgdfX4vk,"10,000,000 in Portugal (ELDIA 2012). Population total all countries: 203,349,200.","Indo-European, Italic, Romance, Italo-Western, Western, Gallo-Iberian, Ibero-Romance, West Iberian, Portuguese-Galician",Indo-European,"Portuguese,,,,,",,"Eurasia, Eurasia",,2015-7-20,, +Diego_20170403_por+spa+ita+fra+eng+deu,Diego_Martins_20170403,Diego_Martins_20170403,4/3/2017,Screen Shot 2017-04-20 at 16.32.04.png (https://dl.airtable.com/FSSQzf3PSUSt6ffK88xb_Screen%20Shot%202017-04-20%20at%2016.32.04.png),Diego_s6_M_20170403_por+spa+ita+fra+eng+deu.jpg (https://dl.airtable.com/kCkHevppTnCmYtSLerhL_Diego_s6_M_20170403_por%2Bspa%2Bita%2Bfra%2Beng%2Bdeu.jpg),"por,spa,ita,fra,eng,deu",,"Portuguese, Spanish, Italian, French, English, German, Standard",,"I really wish you all the best! This thing you're doing is just huge! I hope I can collaborate more, somehow. Cheers! diegomatheusmartins@gmail.com",,Brazil,4/22/2017,Public,CC BY-SA 4.0,checked,,"[PORTUGUESE] +Olá, meu nome é Diego. Tenho 26 anos e sou brasileiro. + +[ENGLISH] +I am very happy to collaborate with this project, Wikitongues, because it has a very noble purpose, which is to register languages from all around the globe, to preserve them and also the cultural aspects that they represent. Each time you learn a new language, you get the opportunity to share something new, something that could have never been shared before, without knowing other language, for example. + +[SPANISH] +Yo he estudiado idiomas, simplemente utilizando el internet, desde hace casi 10 años. No hablo todos los idiomas con la misma fluidez, ni la misma facilidad, pero lo que verdaderamente importa es la experiencia del aprendizaje. Y además… con dedicación, disciplina, paciencia y sin miedo de los errores eventuales, se puede aprender muchas cosas. + +[FRENCH] +C'est un projet très intéressant, parce qu'il va promouvoir l'enregistrement des langues différentes, mais aussi l'interaction entre des différentes personnes dans le monde… à ce sujet de l'apprentissage des langues, notamment. Et certainement, ça sera une forte motivation pour ceux qui veulent vraiment apprendre des nouvelles langues et des nouvelles cultures. + +[PORTUGUESE] +Esse aprendizado te permite crescer de formas que, antes, eram desconhecidas. Aprender novas línguas e novas culturas não significa que você vá se diluir em você mesmo, mas que você vai ampliar suas percepções e conhecimentos objetivos das coisas, né?. Quando você aprende uma língua, você fatalmente acaba se tornando um herdeiro cultural dela. + +[ITALIAN] +Questo progetto ci dà l'opportunità di viaggiare in tutto il mondo, sentendo lingue diverse, no? E spesso completamente sconosciute, ma attraverso storie che sono molte... storie che sembrano come la nostra storia. Siamo tutti diversi, però in sostanza spesso, non sempre ma abbastanza spesso, su ciò che conta davvero, siamo molto simili. Perché siamo tutti umani. Siamo simili. + +[GERMAN] +Und wie hat der Deutscher Philosoph, Ludwig Wittgenstein, gesagt: ""Die Grenzen meiner Sprache bedeuten die Grenzen meiner Welt"". Also, egal wer wir sind, oder woher wir kommen... wir können immer, immer mehr lernen! + +[ENGLISH] +So, thank you very much Wikitongues. I wish you all the best in your journey and godspeed!","[ENGLISH] Hello, my name is Diego. I'm 26 years old and am Brazilian. I am very happy to collaborate with this project, Wikitongues, because it has a very noble purpose, which is to register languages from all around the globe, to preserve them and also the cultural aspects that they represent. Each time you learn a new language, you get the opportunity to share something new, something that could have never been shared before, without knowing other language, for example. I have studied languages, simply using the internet, for almost 10 years now. I don't speak them all with the same fluency, nor the same easiness, but what really matters is the experience of the learning process. Besides, with dedication, discipline, patience and without being afraid of making mistakes, one can learn a lot. This is a very interesting project, because it will record different languages, but will also promote interaction among different people in the world, on the subject of language learning, especially. And certainly, that will be a great motivation for those who really want to learn new languages and new cultures. This learning process allows you to grow in certains ways that were previously unknown. To learn new languages and new cultures doesn't mean that you will be diluted in yourself, but that you will enlarge your perceptions and objective knowledge of things. When you learn a language, you wind up becoming a cultural heir of its legacy. This project gives us the opportunity to travel across the world, listening to different languages, sometimes completely unknown, but through stories that are very similar to our own. We are all different, but in essence - not always, but usually - we are very much alike. Because we are all humans. We are equal. Und wie hat der Deutscher Philosoph, Ludwig Wittgenstein, gesagt: ""Die Grenzen meiner Sprache bedeuten die Grenzen meiner Welt"". Also, egal wer wir sind, oder woher wir kommen... wir können immer, immer mehr lernen! And as the German philosopher, Ludwig Wittgenstein, has said: ""The limits of my language means the limits of my world"". So, no matter who we are, or where we come from... we can always, always learn more! So, thank you very much Wikitongues. I wish you all the best in your journey and godspeed! + +[PORTUGUESE] Olá, meu nome é Diego. Tenho 26 anos e sou brasileiro. Eu estou muito feliz por colaborar com este projeto, Wikitongues, porque ele tem um propósito muito nobre, que é registrar línguas de todo o mundo, para preservá-las e também os aspectos que elas representam. Cada vez que você aprende uma nova língua, você ganha a oportunidade de compartilhar algo novo, algo que jamais poderia ser compartilhado antes, sem saber outra língua, por exemplo. Tenho estudado idiomas, simplesmente utilizando a internet, há quase 10 anos. Não falo todos os idiomas com a mesma fluência, nem a mesma facilidade, mas o que realmente importa é a experiência da aprendizagem. Além disso, com dedicação, disciplina, paciência e sem medo dos erros eventuais, pode-se aprender muitas coisas. Este projeto é muito interessante, porque vai promover o registro de línguas diferentes, mas também a interação entre diferentes pessoas no mundo, a respeito da aprendizagem de línguas, especialmente. E certamente, essa será uma grande motivação para aqueles que querem realmente aprender novas línguas e novas culturas. Esse aprendizado te permite crescer de formas que, antes, eram desconhecidas. Aprender novas línguas e novas culturas não significa que você vá se diluir em você mesmo, mas que você vai ampliar suas percepções e conhecimentos objetivos das coisas, né? Quando você aprende uma língua, você fatalmente acaba se tornando um herdeiro cultural dela. Este projeto nos dá a oportunidade de viajar em todo o mundo, ouvindo línguas diversas, frequentemente desconhecidas, através de histórias que se parecem com a nossa própria. Somos todos diversos, mas em essência - nem sempre, mas geralmente - naquilo que conta de verdade, somos muito parecidos. Porque somos todos humanos. Somos iguais. Und wie hat der Deutscher Philosoph, Ludwig Wittgenstein, gesagt: ""Die Grenzen meiner Sprache bedeuten die Grenzen meiner Welt"". Also, egal wer wir sind, oder woher wir kommen... wir können immer, immer mehr lernen! E como disse o filósofo alemão, Ludwig Wittgenstein: ""Os limites da minha língua são os limites do meu mundo"". Então, não importa quem somos, ou de onde viemos... nós podemos sempre, sempre aprender mais! Portanto, muito obrigado, Wikitongues. Eu te desejo tudo de melhor na sua jornada. Boa sorte e sucesso!",,"Get a free Portuguese lesson with italki: http://promos.italki.com/wikitongues_por, Get a free Spanish lesson with italki: http://promos.italki.com/wikitongues_spa, Get a free Italian lesson with italki: http://promos.italki.com/wikitongues_ita, Get a free French lesson with italki: http://promos.italki.com/wikitongues_fra, Get a free English lesson with italki: http://promos.italki.com/wikitongues_eng, Get a free German, Standard lesson with italki: http://promos.italki.com/wikitongues_deu",6 checked out of 6,,,,,,6,,2bhYs6APqtU,https://youtu.be/2bhYs6APqtU,"10,000,000 in Portugal (ELDIA 2012). Population total all countries: 203,349,200., 38,400,000 in Spain (ELDIA 2012). Population total all countries: 414,170,030. L2 users: 7,490,000 in Spain (ELDIA 2006)., 57,700,000 in Italy (ELDIA 2012). Population total all countries: 63,655,047., 60,000,000 in France (ELDIA 2012). Population total all countries: 74,980,460., 55,600,000 in United Kingdom (ELDIA 2012). Population total all countries: 335,148,868. L2 users: 1,500,000 in United Kingdom (Crystal 2003). L2 users worldwide: 505,000,000., 69,800,000 in Germany (ELDIA 2012). Population total all countries: 78,245,280. L2 users: 8,000,000 in Germany (ELDIA 2012).","Indo-European, Italic, Romance, Italo-Western, Western, Gallo-Iberian, Ibero-Romance, West Iberian, Portuguese-Galician, Indo-European, Italic, Romance, Italo-Western, Western, Gallo-Iberian, Ibero-Romance, West Iberian, Castilian, Indo-European, Italic, Romance, Italo-Western, Italo-Dalmatian, Indo-European, Italic, Romance, Italo-Western, Western, Gallo-Iberian, Gallo-Romance, Gallo-Rhaetian, Oïl, French, Indo-European, Germanic, West, English, Indo-European, Germanic, West, High German, German, Middle German, East Middle German",Indo-European,§,,"Eurasia, Eurasia, Eurasia, Eurasia, Eurasia, Eurasia, Eurasia, Eurasia, Americas, Eurasia, Eurasia, Eurasia, Eurasia, Eurasia, Eurasia",,2017-4-6,, +Julia_20140729_por,Julia__20140729,Daniel_BogreUdell_20130101,7/29/2014,julia-por-thumb-raw.png (https://dl.airtable.com/4SO9geGSpaVzJe1T4gJd_julia-por-thumb-raw.png),Julia_s1_F_20140729_por.jpg (https://dl.airtable.com/3T379fKpQkupAQBUBaO7_Julia_s1_F_20140729_por.jpg),por,,Portuguese,,,,Brazil,6/11/2016,Public,Standard,,,,,"Rio de Janeiro, Brazil +",Get a free Portuguese lesson with italki: http://promos.italki.com/wikitongues_por,1 checked out of 1,,39,,,,1,,RJVqf4vz-rQ,https://youtu.be/RJVqf4vz-rQ,"10,000,000 in Portugal (ELDIA 2012). Population total all countries: 203,349,200.","Indo-European, Italic, Romance, Italo-Western, Western, Gallo-Iberian, Ibero-Romance, West Iberian, Portuguese-Galician",Indo-European,§,,"Eurasia, Eurasia",,2015-2-7,, +Augusto_20140729_por,Augusto__20140729,Daniel_BogreUdell_20130101,7/29/2014,augusto-por-thumb-raw.png (https://dl.airtable.com/1OmwO9BEQtiBgUPBeclJ_augusto-por-thumb-raw.png),Augusto_s1_M_20140729_por.jpg (https://dl.airtable.com/mkDP5eZATM2GJlfCMN1o_Augusto_s1_M_20140729_por.jpg),por,,Portuguese,,,,Brazil,4/27/2017,Public,Standard,,,,,"Video from Natal, Brazil +",Get a free Portuguese lesson with italki: http://promos.italki.com/wikitongues_por,1 checked out of 1,,74,,,,1,,UibNKykq4do,https://youtu.be/UibNKykq4do,"10,000,000 in Portugal (ELDIA 2012). Population total all countries: 203,349,200.","Indo-European, Italic, Romance, Italo-Western, Western, Gallo-Iberian, Ibero-Romance, West Iberian, Portuguese-Galician",Indo-European,§,,"Eurasia, Eurasia",,2015-2-7,, +Tony_20150506_epo,Tony__20150506,Tony__20150506,5/6/2015,tony-epo-thumb-raw.png (https://dl.airtable.com/d22pjHp0Tn6t06LzlDE8_tony-epo-thumb-raw.png),Tony_s1_M_20150506_epo.jpg (https://dl.airtable.com/2ebrOYERH2cxNqzd8tvp_Tony_s1_M_20150506_epo.jpg),epo,,Esperanto,,,,Canada,7/15/2015,Public,CC BY-NC 3.0,,,,,,Get a free Esperanto lesson with italki: http://promos.italki.com/wikitongues_epo,1 checked out of 1,checked,,,2016-8-31,,1,checked,vkheU0nXKKY,https://youtu.be/vkheU0nXKKY,"L2 users: 2,000,000 (Wiesenfeld 1999).",Constructed language,,"Esperanto,,,,,",,Eurasia,,2015-6-28,, +Tommy_20150501_eng+fra+moe+por+que+spa,Tommy__20150501,Tommy__20150501,5/1/2015,tommy-quenskporfraeng-thumb-raw.png (https://dl.airtable.com/aqUIgKGfRFmDjPTyakhz_tommy-quenskporfraeng-thumb-raw.png),Tommy_s5_M_20150501_eng+fra+por+que+moe.jpg (https://dl.airtable.com/fxDILpa2QveYIXvN2vZY_Tommy_s5_M_20150501_eng%2Bfra%2Bpor%2Bque%2Bmoe.jpg),"eng,fra,moe,por,que,spa",,"English, French, Montagnais, Portuguese, Quechua, Spanish","Innu-Aimun, not Naskapi",,Unknown Variant,Canada,7/2/2015,Public,CC BY-NC 3.0,,,,,,"Get a free English lesson with italki: http://promos.italki.com/wikitongues_eng, Get a free French lesson with italki: http://promos.italki.com/wikitongues_fra, Get a free Portuguese lesson with italki: http://promos.italki.com/wikitongues_por, Get a free Spanish lesson with italki: http://promos.italki.com/wikitongues_spa",6 checked out of 6,checked,,,,,6,checked,9TCr5HMZp2w,https://youtu.be/9TCr5HMZp2w,"55,600,000 in United Kingdom (ELDIA 2012). Population total all countries: 335,148,868. L2 users: 1,500,000 in United Kingdom (Crystal 2003). L2 users worldwide: 505,000,000., 60,000,000 in France (ELDIA 2012). Population total all countries: 74,980,460., 11,000 (2011 census)., 10,000,000 in Portugal (ELDIA 2012). Population total all countries: 203,349,200., Population total all languages: 8,912,820., 38,400,000 in Spain (ELDIA 2012). Population total all countries: 414,170,030. L2 users: 7,490,000 in Spain (ELDIA 2006).","Indo-European, Germanic, West, English, Indo-European, Italic, Romance, Italo-Western, Western, Gallo-Iberian, Gallo-Romance, Gallo-Rhaetian, Oïl, French, Algic, Algonquian, Cree-Montagnais, Indo-European, Italic, Romance, Italo-Western, Western, Gallo-Iberian, Ibero-Romance, West Iberian, Portuguese-Galician, Indo-European, Italic, Romance, Italo-Western, Western, Gallo-Iberian, Ibero-Romance, West Iberian, Castilian",Indo-European,"English,French,Innu-Aimun,Spanish,Portuguese,Quechua",,"Eurasia, Eurasia, Eurasia, Eurasia, Americas, Eurasia, Eurasia, Americas, Eurasia, Eurasia, Americas, Eurasia, Eurasia",,2015-6-28,, +Chaofen+Changjiu_20170615_cmn,"Chaofen__20170615,Changjiu__20170615",Brian_Zhao_20170615,6/15/2017,Screen Shot 2017-08-03 at 1.18.46 PM.png (https://dl.airtable.com/2UhN5gdtQYGELVjdxaXN_Screen%20Shot%202017-08-03%20at%201.18.46%20PM.png),Chaofen+Changjiu_20170615_cmn.jpg (https://dl.airtable.com/iItKdZVYTROOgStBYdzM_Chaofen%2BChangjiu_20170615_cmn.jpg),cmn,cmn,"Chinese, Mandarin",Southwestern Mandarin (Guiyangese dialect),,,Canada,9/5/2017,Public,CC BY-SA 4.0,checked,,,,"feel free to use ""Southwestern Mandarin"" and exclude the ""Guiyangese dialect"" label, as I couldn't find any sources for Guiyangese save for the Chinese Wikipedia + +please do note in the description that it is the Guiyangese dialect if you choose to exempt it from the thumbnail/title",,1 checked out of 1,,,,,,1,,CbiVj4rV3dY,https://youtu.be/CbiVj4rV3dY,"840,000,000 in China (2000 census), increasing. 70% of Chinese language users speak a Mandarin dialect as L1. Population total all countries: 847,808,270. L2 users: 178,000,000 in China.","Sino-Tibetan, Chinese",Sino-Tibetan,,"This video was recorded by Brian Zhao in Richmond Hill, Ontario, Canada. Guiyangese is a variety of Southwestern Mandarin, which is spoken by as many as 260 million people across central China, as well as by diaspora communities worldwide. It is considered by linguists to be a primary branch of the Mandarin Chinese language which, with nearly a billion native speakers, is one of the world’s most widely spoken mother tongues. The Southwestern variety to which Guiyangese belongs is spoken primarily in the Chinese provinces of Sichuan, Yunnan, Chongqing, and Guizhou, as well as in parts of Hubei, Hunan, Guangxi, Shaanxi and Gansu. Some varieties are not mutually intelligible with Standard Chinese.",Eurasia,,2017-6-22,,https://www.dropbox.com/sh/14hu0nv6ulx13mm/AAAHqVFa1BOUmd_OEUsGdp31a?dl=0 +Ying_20170924_cmn,Ying_Li_20170924,Ying_Li_20170924,9/24/2017,Screen Shot 2017-11-03 at 7.00.56 PM.png (https://dl.airtable.com/1tPGkDAESLOji410OBFb_Screen%20Shot%202017-11-03%20at%207.00.56%20PM.png),Ying_20170924_cmn.png (https://dl.airtable.com/nLVvNiHAS86CXd9TsoWU_Ying_20170924_cmn.png),cmn,eng,"Chinese, Mandarin",Henan dialect,,,China,11/7/2017,Public,CC BY-SA 4.0,checked,,,,Academically this is called Central Plains Mandarin. Has an ISO-639-6 id as well as a glottolog classification,,1 checked out of 1,,,,,,1,,LZoRgfFdXXQ,https://youtu.be/LZoRgfFdXXQ,"840,000,000 in China (2000 census), increasing. 70% of Chinese language users speak a Mandarin dialect as L1. Population total all countries: 847,808,270. L2 users: 178,000,000 in China.","Sino-Tibetan, Chinese",,,"This video was submitted by Ying Li from Nanyang City, China. The Henan dialect is a form of Central Plains Mandarin, which is spoken by as many as 170 million people across central and western China, as well as by diaspora communities worldwide. It is considered by linguists to be a primary branch of the Mandarin Chinese language which, with nearly a billion native speakers, is one of the world’s most widely spoken mother tongues. The Central Plains variety to which the Henan dialect belongs is spoken primarily in the Chinese provinces of Shaanxi, Henan, Shanxi, and Gansu, as well as in parts of Hebei, Anhui, Jiangsu, Xinjiang and Shandong provinces. Some varieties are not mutually intelligible with Standard Chinese. ",Eurasia,,2017-9-24,Henan Province_CN,https://www.dropbox.com/sh/g5ukbpdbfgtpx4u/AAC-ZsFrNLS3dA1Y9U5fDuxWa?dl=0 +Timothy_20140217_pne,Timothy__20140217,Lindie_Botes_20130919,2/17/2014,timothy.png (https://dl.airtable.com/M0iwg6MTTsm86QHfyDXU_timothy.png),Timothy_s1_M_20140217_pne.jpg (https://dl.airtable.com/D8tQT4FQC6oyBMRhebNQ_Timothy_s1_M_20140217_pne.jpg),pne,,"Penan, Western",Penang Hokkien,,Unknown Variant,China,2/17/2014,Public,Standard,,,,,,,1 checked out of 1,,,,,,1,checked,Oz0hBgB5ixs,https://youtu.be/Oz0hBgB5ixs,"3,400 (2007 SIL).","Austronesian, Malayo-Polynesian, North Borneo, North Sarawakan, Kayan-Kenyah, Penan",Austronesian,"Penang Hokkien,,,,,",,Eurasia,,2014-12-22,, +KK_20170801_hks,KK_Kong_20170813,Kelly_Wing_20170809,8/1/2017,KK_20170801_hks.png (https://dl.airtable.com/UtU0tOzPTLK2oybPgdCO_KK_20170801_hks.png),KK_20170801_hks.jpg (https://dl.airtable.com/X5pJtB3QmCa8GEXeHSDf_KK_20170801_hks.jpg),hks,cmn,Hong Kong Sign Language,,,,China,9/9/2017,Public,CC BY-NC 3.0,checked,,,,"Hong Kong +",,1 checked out of 1,,,,,,1,,aXeID-fJdt8,https://youtu.be/aXeID-fJdt8,"20,000 (2007).",Deaf sign language,,,"This video was recorded by Kelly Wing in Hong Kong, China, where she and KK live. Hong Kong Sign Language, often abbreviated as HKSL or 香港手語, is spoken by as many as 20,000 people, primarily in the Chinese territories of Hong Kong and Macau. It is considered by linguists to be an offshoot of Chinese Sign Language, having emerged in the mid-twentieth century when educators from Shanghai’s deaf community began tutoring signers in Hong Kong. Though both HKSL and Chinese Sign Language remain unrecognized by the government, a growing activist movement is working to improve deaf education across the country, with schools dedicated to sign language education in Beijing, Nanjing, Shanghai, Chengdu, Kunming, Yantai, and Hong Kong.",,,2017-8-9,Hong Kong_CN,https://www.dropbox.com/sh/rr6mejnhfrk1ap7/AAAiIvPZRvI0ZDzqzeSt-Ucaa?dl=0 +Ivy_20151214_wuu,Ivy_Chen_20151214,Ivan_Batishchev_,12/14/2015,,Ivy_s1_F_20151214_wuu.jpg (https://dl.airtable.com/NvkeQfSEQt2wQwjRpyFg_Ivy_s1_F_20151214_wuu.jpg),wuu,,"Chinese, Wu","Shanghainese, Shanghai Hua",,,China,3/29/2016,Public,CC BY-NC 3.0,checked,,,,,"Get a free Chinese, Wu lesson with italki: http://promos.italki.com/wikitongues_wuu",1 checked out of 1,,28,,,,1,checked,gaUt3gTwwzU,https://youtu.be/gaUt3gTwwzU,"77,200,000 in China (1984). Population total all countries: 77,202,480.","Sino-Tibetan, Chinese",Sino-Tibetan,"§Shanghainese, Shanghai Hua",,Eurasia,,2016-1-9,, +Charles_20151215_wuu,Charles_Cai_20151215,Ivan_Batishchev_,12/15/2015,Screen Shot 2016-06-29 at 12.26.43.png (https://dl.airtable.com/wJLGewe9S4iugWte65oH_Screen%20Shot%202016-06-29%20at%2012.26.43.png),Charles Cai_s1_M_20151215_wuu.jpg (https://dl.airtable.com/JkjpX1E2RHSqeQJZL57q_Charles%20Cai_s1_M_20151215_wuu.jpg),wuu,,"Chinese, Wu","Linhainese, Linhai Hua",,,China,6/29/2016,Public,CC BY-NC 3.0,checked,,,,,"Get a free Chinese, Wu lesson with italki: http://promos.italki.com/wikitongues_wuu",1 checked out of 1,,41,,,,1,,TmWrYi9qZrs,https://youtu.be/TmWrYi9qZrs,"77,200,000 in China (1984). Population total all countries: 77,202,480.","Sino-Tibetan, Chinese",Sino-Tibetan,"§Linhainese, Linhai Hua",,Eurasia,,2016-1-9,, +Roberta_20151214_lmo,Roberta_Zanibelli_20151214,Ivan_Batishchev_,12/14/2015,Screen Shot 2017-01-31 at 15.39.58.png (https://dl.airtable.com/TKLZhqtRPqw6V4WScqqz_Screen%20Shot%202017-01-31%20at%2015.39.58.png),Roberta_s1_F_20151214_lmo.jpg (https://dl.airtable.com/2mAEvhsvRXeTAL6NM1ji_Roberta_s1_F_20151214_lmo.jpg),lmo,,Lombard,Trigolese,,,China,2/7/2017,Public,CC BY-NC 3.0,checked,,,,,,1 checked out of 1,,51,Facebook,2017-10-27,https://www.facebook.com/wikitongues/videos/1611988485532339/,1,,_jJyzGnFfSE,https://youtu.be/_jJyzGnFfSE,"3,600,000 in Italy (2002). Population total all countries: 3,903,000.","Indo-European, Italic, Romance, Italo-Western, Western, Gallo-Iberian, Gallo-Romance, Gallo-Italian",Indo-European,§Trigolese,"Lombard is spoken by nearly four million people, primarily in the northern Italian regions of Lombardy and Piedmont, as well as in pockets of Switzerland. A literary language since at least the 13th century, Lombard experienced a decline in speakers towards the end of 20th century thanks in part to government marginalization. Since the dawn of the 21st century, however, a revivalist movement has flourished with Lombard being used in music and popular culture, even on Wikipedia.",Eurasia,,2016-1-9,, +Yan_20141208_wuu,Yan__20141208,Lindie_Botes_20130919,12/8/2014,,,wuu,,"Chinese, Wu",Hangzounese,,,"United States,China",12/8/2014,Removed,CC BY-NC 3.0,,,,,"Removed upon request +","Get a free Chinese, Wu lesson with italki: http://promos.italki.com/wikitongues_wuu",1 checked out of 1,,,,,,1,,,No ID,"77,200,000 in China (1984). Population total all countries: 77,202,480.","Sino-Tibetan, Chinese",Sino-Tibetan,§Hangzounese,,Eurasia,,2015-2-7,, +Daniel_20151224_gum,Daniel__20151224,Andersson_Cauyá_,12/24/2015,Screen Shot 2017-01-18 at 15.05.28.png (https://dl.airtable.com/5HSaZ9dXSN2UPqsqgcn4_Screen%20Shot%202017-01-18%20at%2015.05.28.png),Daniel_s1_M_20151224_gum.jpg (https://dl.airtable.com/Sx35T2egR6OJbyrdSHUa_Daniel_s1_M_20151224_gum.jpg),gum,,Guambiano,Nam Trik,,,Colombia,1/21/2017,Public,Standard,,,,,,,1 checked out of 1,,99,,,,1,,sNDAfGlc-4c,https://youtu.be/sNDAfGlc-4c,"21,000 (Civallero 2008), increasing. 2,100 monolinguals.","Paezan, Coconuco",Paezan,§Nam Trik,,Americas,,2015-10-20,, +Aneli_20170425_eng+hrv+fra+spa+por,Aneli_Jovanovic_20170425,Aneli_Jovanovic_20170425,4/25/2017,Screen Shot 2017-05-02 at 15.02.42.png (https://dl.airtable.com/QYCQInAARdGmUc7vig2c_Screen%20Shot%202017-05-02%20at%2015.02.42.png),Aneli_s5_F_20170425_eng+hrv+fra+spa+por.jpg (https://dl.airtable.com/YSm3Xyx2SiqK3A6nm1Dx_Aneli_s5_F_20170425_eng%2Bhrv%2Bfra%2Bspa%2Bpor.jpg),"eng,hrv,fra,spa,por",,"English, Croatian, French, Spanish, Portuguese",,,,Croatia,5/13/2017,Public,CC BY-NC 3.0,checked,,,,,"Get a free English lesson with italki: http://promos.italki.com/wikitongues_eng, Get a free French lesson with italki: http://promos.italki.com/wikitongues_fra, Get a free Spanish lesson with italki: http://promos.italki.com/wikitongues_spa, Get a free Portuguese lesson with italki: http://promos.italki.com/wikitongues_por",5 checked out of 5,,,,,,5,,whHnH3a-olo,https://youtu.be/whHnH3a-olo,"55,600,000 in United Kingdom (ELDIA 2012). Population total all countries: 335,148,868. L2 users: 1,500,000 in United Kingdom (Crystal 2003). L2 users worldwide: 505,000,000., 4,200,000 in Croatia (ELDIA 2006). Population total all countries: 5,752,090., 60,000,000 in France (ELDIA 2012). Population total all countries: 74,980,460., 38,400,000 in Spain (ELDIA 2012). Population total all countries: 414,170,030. L2 users: 7,490,000 in Spain (ELDIA 2006)., 10,000,000 in Portugal (ELDIA 2012). Population total all countries: 203,349,200.","Indo-European, Germanic, West, English, Indo-European, Slavic, South, Western, Indo-European, Italic, Romance, Italo-Western, Western, Gallo-Iberian, Gallo-Romance, Gallo-Rhaetian, Oïl, French, Indo-European, Italic, Romance, Italo-Western, Western, Gallo-Iberian, Ibero-Romance, West Iberian, Castilian, Indo-European, Italic, Romance, Italo-Western, Western, Gallo-Iberian, Ibero-Romance, West Iberian, Portuguese-Galician",Indo-European,§,,"Eurasia, Eurasia, Eurasia, Eurasia, Eurasia, Eurasia, Eurasia, Americas, Eurasia, Eurasia, Eurasia, Eurasia, Eurasia, Eurasia",,2017-4-25,, +Memmed_20150609_eng+ces+azj,Memmed__20150609,Vojta_Smekal_,6/9/2015,memmed-azjceseng-thumb-raw.png (https://dl.airtable.com/cBhXlWJWReC9cvSP6eUl_memmed-azjceseng-thumb-raw.png),Memmed_s3_M_20150609_eng+ces+azj.png (https://dl.airtable.com/mhGpD8qHSFVmdQbknDt3_Memmed_s3_M_20150609_eng%2Bces%2Bazj.png),"eng,ces,azj",,"English, Czech, Azerbaijani, North",Azeri,,,Czech Republic,7/17/2015,Public,CC BY-NC 3.0,,,,,,"Get a free English lesson with italki: http://promos.italki.com/wikitongues_eng, Get a free Czech lesson with italki: http://promos.italki.com/wikitongues_ces, Get a free Azerbaijani, North lesson with italki: http://promos.italki.com/wikitongues_azj",3 checked out of 3,checked,,,,,3,checked,kb3Xs56iCg8,https://youtu.be/kb3Xs56iCg8,"55,600,000 in United Kingdom (ELDIA 2012). Population total all countries: 335,148,868. L2 users: 1,500,000 in United Kingdom (Crystal 2003). L2 users worldwide: 505,000,000., 10,400,000 in Czech Republic (ELDIA 2012). Population total all countries: 10,619,340., 6,100,000 in Azerbaijan (2007 census). Population total all countries: 7,324,060. 4,000,000 monolinguals. Ethnic population: 6,230,000. L2 users: 8,000,000 in Azerbaijan.","Indo-European, Germanic, West, English, Indo-European, Slavic, West, Czech-Slovak, Altaic, Turkic, Southern, Azerbaijani",Indo-European,"English,Czech,Azeri,,,",,"Eurasia, Eurasia, Eurasia, Eurasia",,2015-6-28,, +Anna_20150609_eng+fra+ces+rus+lvs,Anna__20150609,Vojta_Smekal_,6/9/2015,anna.png (https://dl.airtable.com/2BvOVXLgSQK5dqaiJG4P_anna.png),Anna_s5_F_20150609_eng+fra+rus+ces+lvs.jpg (https://dl.airtable.com/O7McaNG9QyglaC5FFv3w_Anna_s5_F_20150609_eng%2Bfra%2Brus%2Bces%2Blvs.jpg),"eng,fra,ces,rus,lvs",,"English, French, Czech, Russian, Latvian, Standard",,,,Czech Republic,7/21/2015,Public,CC BY-NC 3.0,,,,,,"Get a free English lesson with italki: http://promos.italki.com/wikitongues_eng, Get a free French lesson with italki: http://promos.italki.com/wikitongues_fra, Get a free Czech lesson with italki: http://promos.italki.com/wikitongues_ces, Get a free Russian lesson with italki: http://promos.italki.com/wikitongues_rus",5 checked out of 5,checked,,,,,5,checked,8i4EEb5QMgU,https://youtu.be/8i4EEb5QMgU,"55,600,000 in United Kingdom (ELDIA 2012). Population total all countries: 335,148,868. L2 users: 1,500,000 in United Kingdom (Crystal 2003). L2 users worldwide: 505,000,000., 60,000,000 in France (ELDIA 2012). Population total all countries: 74,980,460., 10,400,000 in Czech Republic (ELDIA 2012). Population total all countries: 10,619,340., 137,000,000 in Russian Federation (2010 census). Population total all countries: 167,332,230., 1,470,000 in Latvia (ELDIA 2012). Population total all countries: 1,552,260. L2 users: 497,000 in Latvia (ELDIA 2012).","Indo-European, Germanic, West, English, Indo-European, Italic, Romance, Italo-Western, Western, Gallo-Iberian, Gallo-Romance, Gallo-Rhaetian, Oïl, French, Indo-European, Slavic, West, Czech-Slovak, Indo-European, Slavic, East, Indo-European, Baltic, Eastern",Indo-European,"English,French,Czech,Russian,Latvian,",,"Eurasia, Eurasia, Eurasia, Eurasia, Americas, Eurasia, Eurasia, Eurasia, Eurasia, Eurasia, Eurasia",,2015-6-28,, +Nastya_20150609_deu+fra+rus+ces+eng,Nastya__20150609,Vojta_Smekal_,6/9/2015,nastya-rusdeufraeng-thumb-raw.png (https://dl.airtable.com/6GRNjkZ0SmJ6jReCHzm9_nastya-rusdeufraeng-thumb-raw.png),Nastya_s4_F_20150609_eng+fra+deu+rus.jpg (https://dl.airtable.com/1mcSaLLR1ShLfRWHj8pN_Nastya_s4_F_20150609_eng%2Bfra%2Bdeu%2Brus.jpg),"deu,fra,rus,ces,eng",,"German, Standard, French, Russian, Czech, English",,,,Czech Republic,8/27/2015,Public,CC BY-NC 3.0,,,,,,"Get a free German, Standard lesson with italki: http://promos.italki.com/wikitongues_deu, Get a free French lesson with italki: http://promos.italki.com/wikitongues_fra, Get a free Russian lesson with italki: http://promos.italki.com/wikitongues_rus, Get a free Czech lesson with italki: http://promos.italki.com/wikitongues_ces, Get a free English lesson with italki: http://promos.italki.com/wikitongues_eng",5 checked out of 5,checked,,,,,5,checked,KBEQH7Ad7H8,https://youtu.be/KBEQH7Ad7H8,"69,800,000 in Germany (ELDIA 2012). Population total all countries: 78,245,280. L2 users: 8,000,000 in Germany (ELDIA 2012)., 60,000,000 in France (ELDIA 2012). Population total all countries: 74,980,460., 137,000,000 in Russian Federation (2010 census). Population total all countries: 167,332,230., 10,400,000 in Czech Republic (ELDIA 2012). Population total all countries: 10,619,340., 55,600,000 in United Kingdom (ELDIA 2012). Population total all countries: 335,148,868. L2 users: 1,500,000 in United Kingdom (Crystal 2003). L2 users worldwide: 505,000,000.","Indo-European, Germanic, West, High German, German, Middle German, East Middle German, Indo-European, Italic, Romance, Italo-Western, Western, Gallo-Iberian, Gallo-Romance, Gallo-Rhaetian, Oïl, French, Indo-European, Slavic, East, Indo-European, Slavic, West, Czech-Slovak, Indo-European, Germanic, West, English",Indo-European,"German,French,Russian,Czech,English,",,"Eurasia, Eurasia, Eurasia, Eurasia, Americas, Eurasia, Eurasia, Eurasia, Eurasia, Eurasia, Eurasia, Eurasia",,2015-6-28,, +Nikoloz_20150609_kat,Nikoloz__20150609,Vojta_Smekal_,6/9/2015,nikoloz-kat-thumb-raw.png (https://dl.airtable.com/Bme0aKBTT3ShSc0rjPdI_nikoloz-kat-thumb-raw.png),Nikoloz_s1_M_20150609_kat.jpg (https://dl.airtable.com/IRbBzluXShylFuY84v5j_Nikoloz_s1_M_20150609_kat.jpg),kat,,Georgian,,,,Czech Republic,8/29/2015,Public,CC BY-NC 3.0,,,,,,,1 checked out of 1,,,,,,1,checked,EqvGJERHbOY,https://youtu.be/EqvGJERHbOY,"3,900,000 in Georgia (1993 UBS). Population total all countries: 4,237,710. Ethnic population: 3,980,000 (1993 UBS).","Kartvelian, Georgian",Kartvelian,"Georgian,,,,,",,Eurasia,,2015-6-28,, +Otmar_20170816_szl,Otmar__20170816,Robert_Keresztesy_,8/16/2017,Otmar_20170816_szl.png (https://dl.airtable.com/7QtnStQWC3dvpnSwDsaA_Otmar_20170816_szl.png),Otmar_20170816_szl.jpg (https://dl.airtable.com/RUnjPll2Sbiq1YmIyi1A_Otmar_20170816_szl.jpg),szl,,Silesian,Po Naszymu,,,Czech Republic,9/12/2017,Public,CC BY-SA 4.0,checked,,,,,,1 checked out of 1,,,,,,1,,t6a5LmxqW6c,https://youtu.be/t6a5LmxqW6c,"60,000 (2002 census).","Indo-European, Slavic, West, Lechitic",,,,Eurasia,,2017-8-16,, +Abdurrahim_20160611_eng+kaz+deu+ces+rus,Abdurrahim_Samirov_20160611,Abdurrahim_Samirov_20160611,6/11/2016,Screen Shot 2016-06-13 at 5.42.03 PM.png (https://dl.airtable.com/sQhOYJbKS1SMJssVxHg0_Screen%20Shot%202016-06-13%20at%205.42.03%20PM.png),Abdurrahim_s5_M_20160611_eng+kaz+deu+ces+rus.jpg (https://dl.airtable.com/BZDVGJ5QMmtSbDhdWKQP_Abdurrahim_s5_M_20160611_eng%2Bkaz%2Bdeu%2Bces%2Brus.jpg),"eng,kaz,deu,ces,rus",,"English, Kazakh, German, Standard, Czech, Russian",,,,Czech Republic,6/25/2016,Public,Standard,,,,,,"Get a free English lesson with italki: http://promos.italki.com/wikitongues_eng, Get a free Kazakh lesson with italki: http://promos.italki.com/wikitongues_kaz, Get a free German, Standard lesson with italki: http://promos.italki.com/wikitongues_deu, Get a free Czech lesson with italki: http://promos.italki.com/wikitongues_ces, Get a free Russian lesson with italki: http://promos.italki.com/wikitongues_rus",5 checked out of 5,,,,,,5,,jOlXLLU2fgg,https://youtu.be/jOlXLLU2fgg,"55,600,000 in United Kingdom (ELDIA 2012). Population total all countries: 335,148,868. L2 users: 1,500,000 in United Kingdom (Crystal 2003). L2 users worldwide: 505,000,000., 5,290,000 in Kazakhstan (1979 census). Population total all countries: 8,077,770., 69,800,000 in Germany (ELDIA 2012). Population total all countries: 78,245,280. L2 users: 8,000,000 in Germany (ELDIA 2012)., 10,400,000 in Czech Republic (ELDIA 2012). Population total all countries: 10,619,340., 137,000,000 in Russian Federation (2010 census). Population total all countries: 167,332,230.","Indo-European, Germanic, West, English, Altaic, Turkic, Western, Aralo-Caspian, Indo-European, Germanic, West, High German, German, Middle German, East Middle German, Indo-European, Slavic, West, Czech-Slovak, Indo-European, Slavic, East",Indo-European,§,,"Eurasia, Eurasia, Eurasia, Eurasia, Eurasia, Eurasia, Eurasia, Eurasia",,2016-6-13,, +Yabi_20161001_amh,Yabi__20161001,Elise_Lieberman_20160622,10/1/2016,Screen Shot 2017-06-01 at 13.52.42.png (https://dl.airtable.com/vMWqri7TRLSI49zfy8vv_Screen%20Shot%202017-06-01%20at%2013.52.42.png),Yabi_s1_F_20161001_amh.png (https://dl.airtable.com/lhA0wnFIQkaKTGDrQLx6_Yabi_s1_F_20161001_amh.png),amh,,Amharic,,,,Ethiopia,6/15/2017,Public,CC BY-NC 3.0,,,,,,Get a free Amharic lesson with italki: http://promos.italki.com/wikitongues_amh,1 checked out of 1,,,,,,1,,i_B6BJFumno,https://youtu.be/i_B6BJFumno,"21,600,000 in Ethiopia (2007 census). Population total all countries: 21,811,600. 14,800,000 monolinguals. L2 users: 4,000,000 in Ethiopia.","Afro-Asiatic, Semitic, South, Ethiopian, South, Transversal, Amharic-Argobba",Afro-Asiatic,Amharic,"This video was recorded by Elise Lieberman in New York City, USA, where she and Yabi grew up. Amharic is spoken by as many as 37 million people, primarily in the East African nation of Ethiopia, where it is the de facto national language, as well as by diaspora communities worldwide, especially in the United States and Israel. Though Amharic emerged as a spoken language in the 14th century CE, it was rarely used in literary contexts until the 1800s. Today, the language is written using the 2,000 year-old Ge'ez syllabary, and is widely supported by operating systems and other digital language toolkits. It is one of the world's most widely spoken Semitic languages, second only to Arabic.",Africa,,2016-10-6,, +Mila_20141016_fij,Mila__20141016,Sarah_Doyle_,10/16/2014,mila.png (https://dl.airtable.com/ensOQcuSQnqUQBhYuvSN_mila.png),Mila_s1_F_20141016_fij.jpg (https://dl.airtable.com/qeJSPztXTXSAExGXHgx9_Mila_s1_F_20141016_fij.jpg),fij,,Fijian,,,,Fiji,10/16/2014,Public,Standard,,,,,,,1 checked out of 1,,,,,,1,checked,pFXjD9J-JE0,https://youtu.be/pFXjD9J-JE0,"330,000 in Fiji (1996 census). 10,000 in Kadavu (1,500 Nabukelevu), 20,000 in Northeast Viti Levu. Population total all countries: 337,320. L2 users: 320,000 in Fiji (1991 UBS).","Austronesian, Malayo-Polynesian, Central-Eastern Malayo-Polynesian, Eastern Malayo-Polynesian, Oceanic, Central-Eastern Oceanic, Remote Oceanic, Central Pacific, East Fijian-Polynesian, East Fijian",Austronesian,"Fijian,,,,,",,Oceania,,2014-12-22,, +Ratulevu_20150530_fij,Ratulevu__20150530,Sarah_Doyle_,5/30/2015,Screen Shot 2016-07-25 at 4.56.01 PM.png (https://dl.airtable.com/qHk1oZzTPe6aJVfpNPiD_Screen%20Shot%202016-07-25%20at%204.56.01%20PM.png),Ratulevu_s1_M_20150530_fij.jpg (https://dl.airtable.com/GbsF9iAdQZURrwQLzMnV_Ratulevu_s1_M_20150530_fij.jpg),fij,,Fijian,Kadavu,,,Fiji,5/30/2015,Public,CC BY-NC 3.0,checked,,,,,,1 checked out of 1,,,Facebook,2016-6-27,https://www.facebook.com/wikitongues/videos,1,checked,yiVuJhiTyrE,https://youtu.be/yiVuJhiTyrE,"330,000 in Fiji (1996 census). 10,000 in Kadavu (1,500 Nabukelevu), 20,000 in Northeast Viti Levu. Population total all countries: 337,320. L2 users: 320,000 in Fiji (1991 UBS).","Austronesian, Malayo-Polynesian, Central-Eastern Malayo-Polynesian, Eastern Malayo-Polynesian, Oceanic, Central-Eastern Oceanic, Remote Oceanic, Central Pacific, East Fijian-Polynesian, East Fijian",Austronesian,"Kadavu,,,,,",,Oceania,,2016-1-19,, +Eetu_20170709_fse,Eetu__20170709,Kristen_Tcherneshoff_,7/9/2017,Screen Shot 2017-08-03 at 1.17.25 PM.png (https://dl.airtable.com/wLEgjB9MR3PhBoXufVYW_Screen%20Shot%202017-08-03%20at%201.17.25%20PM.png),Eetu_20170709_fse.png (https://dl.airtable.com/14kIaadTgy4HCAlP1S4D_Eetu_20170709_fse.png),fse,eng,Finnish Sign Language,,,,Finland,8/15/2017,Public,CC BY-SA 4.0,checked,,,,"@Daniel Bogre Udell +""Hey, Eetu is going to translate the interview after his summer vacation in July. So he was hoping we could wait to post it until after he translates it!"" + + +Helsinki",,1 checked out of 1,,,,,,1,,M34j7R6biR0,https://youtu.be/M34j7R6biR0,"5,000 (Van Cleve 1986).",Deaf sign language,,,"This video was recorded in Helsinki, Finland by Kristen Tcherneshoff, where she and Eetu live. Finnish Sign Language is spoken by as many as 15,000 people, primarily in the Northern European nation of Finland, where it has been politically recognized since 1995 alongside Finnish, Swedish, and Saami. A member of the Swedish Sign family of languages, Finnish SL is related to both the Swedish and Portuguese sign languages, and potentially to British Sign Language, although this is a matter of debate among linguists. It is believed to have emerged as a separate language in the nineteenth century, when Finland seceded from the Kingdom of Sweden and joined the Russian Empire.",Eurasia,,2017-7-9,,https://www.dropbox.com/sh/xkeu3qdsrzzj2mx/AACvOlskHbnXect8FQ_yYfaGa?dl=0 +Myrizinn_20170710_bre,Myrizinn_Boucher-Durand_20170710,Timothy_McKeon_,7/10/2017,Screen Shot 2017-08-03 at 1.12.05 PM.png (https://dl.airtable.com/ljltxEhWROeu2tnO9g6p_Screen%20Shot%202017-08-03%20at%201.12.05%20PM.png),Myrizinn_20170710_bre.png (https://dl.airtable.com/ruCUtnISFTWBS4zhUwDF_Myrizinn_20170710_bre.png),bre,,Breton,,,,France,8/17/2017,Public,CC BY-NC 3.0,,,,,"Just an FYI: Myrzinn is speaking a Vannetais dialect of Breton, but we both decided to just label it as Breton so as not to further encourage factioning and exclusion of Vannetais as something other than Breton.",,1 checked out of 1,,,,,,1,,nYLSU5faTIM,https://youtu.be/nYLSU5faTIM,"206,000 (2013 R. Milin), decreasing.","Indo-European, Celtic, Insular, Brythonic",Indo-European,,"This video was recorded by Timothy McKeon in Quimper, Brittany, France, where Myrizinn lives. Breton is spoken by as many as 210,000 people, primarily in the Brittany and Île-de-France regions of northern France. A Celtic language of the Indo-European linguistic family, Breton shares its roots with the non-Germanic languages of the British Isles, in particular Cornish and Welsh. Due in large part to persecution by the central government of France, Breton speakers began abandoning their language over the course of the 20th century and, as a result, the fluent population had declined by 80% by the year 2000. Nevertheless, a lively revitalization movement has emerged over the past two decades, with the number of children in bilingual education rapidly increasing.",Eurasia,,2017-7-10,, +Yann_20170710_bre,Yann_Guillamot_20170710,Timothy_McKeon_,7/10/2017,Screen Shot 2018-02-28 at 5.52.38 PM.png (https://dl.airtable.com/zIu3Vl01QA2XbEcKndWF_Screen%20Shot%202018-02-28%20at%205.52.38%20PM.png),Yann_20170710_bre.jpg (https://dl.airtable.com/mjf3oadMTYe1R7grtIHx_Yann_20170710_bre.jpg),bre,bre,Breton,,,,France,2/28/2018,To Upload,CC BY-NC 3.0,,checked,,,,,1 checked out of 1,,,,,,1,,IyBNVrLQ2-A,https://youtu.be/IyBNVrLQ2-A,"206,000 (2013 R. Milin), decreasing.","Indo-European, Celtic, Insular, Brythonic",Indo-European,,"This video was recorded by Timothy McKeon in Quimper, Brittany, France, where Yann lives. Breton is spoken by as many as 210,000 people, primarily in the Brittany and Île-de-France regions of northern France. A Celtic language of the Indo-European linguistic family, Breton shares its roots with the non-Germanic languages of the British Isles, in particular Cornish and Welsh. Due in large part to persecution by the central government of France, Breton speakers began abandoning their language over the course of the 20th century and, as a result, the fluent population had declined by 80% by the year 2000. Nevertheless, a lively revitalization movement has emerged over the past two decades, with the number of children in bilingual education rapidly increasing.",Eurasia,,2017-7-10,,https://www.dropbox.com/sh/eni8qhhlaxwrt07/AACZ2D_tf7YmLSwPsczUtgbWa?dl=0 +Afou_20170623_sev,Afou__20170623,Kristen_Tcherneshoff_,6/23/2017,Screen Shot 2017-08-03 at 1.21.05 PM.png (https://dl.airtable.com/0NFlSm1PSwa2R62dNWOW_Screen%20Shot%202017-08-03%20at%201.21.05%20PM.png),Afou_20170623_sev.png (https://dl.airtable.com/gGMcQxpoTfmTR7WZKov6_Afou_20170623_sev.png),sev,,"Sénoufo, Nyarafolo","Senoufo (Nyarafolo), from the Ferkessédougou area","Senoufo (Nyarafolo), from the Ferkessédougou area",,France,8/22/2017,Public,CC BY-SA 4.0,checked,,,"I could maybe send her the video and have her translate it to French then I can also translate that into English, if we want? Not sure if she will say yes, but she probably will because she was very kind!","Recorded in Paris, France - during the Refugee Food Festival :D ",,1 checked out of 1,,,,,,1,,Z2lYJyGr0vc,https://youtu.be/Z2lYJyGr0vc,"60,000 (2009 L. Boese).","Niger-Congo, Atlantic-Congo, Volta-Congo, North, Gur, Senufo, Tagwana-Djimini",Niger-Congo,,"This video was recorded by Kristen Tcherneshoff in Paris, France, where Afou lives, during the Refugee Food Festival. Nyarafolo, also known as Niafolo, is spoken by as many as 60,000 people, primarily in the Ferkessédougou Department of the West African nation of Côte d'Ivoire, where Afou is originally from. A Niger-Congo language, Nyarafolo is a member of the Senufo linguistic group, which includes some fourteen other mother tongues spoken throughout West Africa: in addition to Côte d'Ivoire, in Mali, Burkina Faso, and Ghana. It remains a primarily spoken language without a wide body of print or digital media.",Africa,,2017-6-23,, +Hugo_20140916_arn+que,Hugo_Campbell_20140916,Hugo_Campbell_20140916,9/16/2014,hugo.png (https://dl.airtable.com/C8s3lLuzTNeUOJEq1hhw_hugo.png),Hugo_s2_M_20140916_que+arn.png (https://dl.airtable.com/XrSaaAPSde14aqsybzqZ_Hugo_s2_M_20140916_que%2Barn.png),"arn,que",,"Mapudungun, Quechua",,,Unknown Variant,France,9/16/2014,Public,Standard,,,,,,,2 checked out of 2,,,,,,2,checked,9p-xnXddSy8,https://youtu.be/9p-xnXddSy8,"250,000 in Chile (Crevels 2007). Population total all countries: 258,620. Ethnic population: 604,000 (2002)., Population total all languages: 8,912,820.",Mapudungu,,"Mapudungun,Quechua,,,,",,"Americas, Eurasia, Americas",,2014-12-22,, +Danio_20150820_rgn,Danio__20150820,Hugo_Campbell_20140916,8/20/2015,danio-rgn-thumb-raw.png (https://dl.airtable.com/sCezWY6QS3O9iMQuB5cu_danio-rgn-thumb-raw.png),Danio_s1_M_20150820_rgn.png (https://dl.airtable.com/OFuMlb0QZKUHwtLVZxf9_Danio_s1_M_20150820_rgn.png),rgn,,Romagnol,,,,France,8/20/2015,Public,Standard,,,,,,,1 checked out of 1,,,Facebook,2016-6-23,https://www.facebook.com/wikitongues/videos/1127494390648420/,1,checked,b8WMfsLoUAo,https://youtu.be/b8WMfsLoUAo,"No known L1 speakers in Italy. Ethnic population: 1,100,000.","Indo-European, Italic, Romance, Italo-Western, Western, Gallo-Iberian, Gallo-Romance, Gallo-Italian",Indo-European,"Romagnolo,,,,,",,Eurasia,,2015-7-25,, +Marco_20150926_ita+vec+cim,Marco__20150926,Hugo_Campbell_20140916,9/26/2015,marco-itaveccim-thumb-raw.png (https://dl.airtable.com/y5mCr3KYRrKQUmJiT9fY_marco-itaveccim-thumb-raw.png),Marco_s3_M_20150926_ita+vec+cim.jpg (https://dl.airtable.com/IaWxyOoCSyiVE6q66hZ8_Marco_s3_M_20150926_ita%2Bvec%2Bcim.jpg),"ita,vec,cim",,"Italian, Venetian, Cimbrian",,,,France,9/26/2015,Public,Standard,,,,,,Get a free Italian lesson with italki: http://promos.italki.com/wikitongues_ita,3 checked out of 3,checked,,,,,3,checked,P2PYuwhtwro,https://youtu.be/P2PYuwhtwro,"57,700,000 in Italy (ELDIA 2012). Population total all countries: 63,655,047., 3,800,000 in Italy (2002). Population total all countries: 3,852,500., 2,230. 500 in Lusernese Cimbrian in Trentino Alto Oolige 40 km southeast from Trento, plus 1,500 Sette Comuni Cimbrian (40% of Roana (Rowan), 70% of Messaselva di Roana Rotzo) in Veneto around 60 km north of Vicenza (Kloss 1978), and 230 or 65% of Giazza (Ijetzan) Veneto, 43 km northeast of Verona (1992 R. Zamponi). 22,700 were in Sieben Gemeinde and 12,400 in Dreizehn Gemeinde in 1854.","Indo-European, Italic, Romance, Italo-Western, Italo-Dalmatian, Indo-European, Italic, Romance, Italo-Western, Western, Gallo-Iberian, Gallo-Romance, Gallo-Italian, Indo-European, Germanic, West, High German, German, Upper German, Bavarian-Austrian",Indo-European,"Italian,Venetian,Cimbrian,,,",,"Eurasia, Eurasia, Eurasia, Eurasia",,2015-2-19,, +Saro_20151024_nyf,Saro__20151024,Hugo_Campbell_20140916,10/24/2015,Screen Shot 2017-05-11 at 19.40.16.png (https://dl.airtable.com/wpCEWi6SQWMgoeSlhNxZ_Screen%20Shot%202017-05-11%20at%2019.40.16.png),saro-nyf-thumb.jpg (https://dl.airtable.com/2iZkeaypSWufKEQAykQo_saro-nyf-thumb.jpg),nyf,,Kigiryama,Kigiryama,,Classification,France,10/28/2015,Public,Standard,,,,,"dialect not yet clarified + +",,1 checked out of 1,,,,,,1,checked,w8iwYaa41uo,https://youtu.be/w8iwYaa41uo,"944,000 (2009 census), increasing. 752,000 Giryama; 25,400 Kambe; 98,700 Rabai; 14,500 Ribe; 52,900 Kauma.","Niger-Congo, Atlantic-Congo, Volta-Congo, Benue-Congo, Bantoid, Southern, Narrow Bantu, Central, E, Nyika-Taita (E.72)",Niger-Congo,"Kigiryama,,,,,",,Africa,,2015-2-19,, +Andrea_20151117_lld,Andrea__20151117,Hugo_Campbell_20140916,11/17/2015,andrea-lld-thumb-raw.png (https://dl.airtable.com/uURrbQSzQeW2loA67eYX_andrea-lld-thumb-raw.png),andrea-lld-thumb.jpg (https://dl.airtable.com/De5Sz063T5mM7cGSyQx9_andrea-lld-thumb.jpg),lld,,Ladin,Solandro,,Classification,France,11/17/2015,Public,Standard,,,,,,,1 checked out of 1,,,,,,1,checked,Sra5evn--8c,https://youtu.be/Sra5evn--8c,"31,000 in Italy (2013). Ethnic population: 38,000.","Indo-European, Italic, Romance, Italo-Western, Western, Gallo-Iberian, Gallo-Romance, Gallo-Rhaetian, Rhaetian",Indo-European,"Solandro,,,,,",,Eurasia,,2015-2-19,, +Victor_20140729_arn,Victor__20140729,Hugo_Campbell_20140916,7/29/2014,victor-arn.png (https://dl.airtable.com/WsCNkUUtSO6WCRWWzx19_victor-arn.png),Victor_s1_M_20140729_arn.jpg (https://dl.airtable.com/S9lvWOleTVis2fEj0UeU_Victor_s1_M_20140729_arn.jpg),arn,,Mapudungun,,,,France,8/21/2016,Public,Standard,,,,,,,1 checked out of 1,,65,,,,1,,DcPu6zLpZoQ,https://youtu.be/DcPu6zLpZoQ,"250,000 in Chile (Crevels 2007). Population total all countries: 258,620. Ethnic population: 604,000 (2002).",Mapudungu,,§,,"Americas, Eurasia",,2015-2-19,, +Elisa_20140729_vec,Elisa__20140729,Hugo_Campbell_20140916,7/29/2014,tvkM2xpSm2VXFqvXj1tA_large_Screen%20Shot%202017-06-01%20at%2013.55.42.png (https://dl.airtable.com/U5HTXr0RhCObPL96xOZ8_tvkM2xpSm2VXFqvXj1tA_large_Screen%2520Shot%25202017-06-01%2520at%252013.55.42.png),Elisa_s1_F_20140729_vec.png (https://dl.airtable.com/WjC6prdUTmaj5AJxK8vD_Elisa_s1_F_20140729_vec.png),vec,,Venetian,Veronese,,,France,6/20/2017,Public,Standard,,,,,,,1 checked out of 1,,91,,,,1,,_N4HGvswrjE,https://youtu.be/_N4HGvswrjE,"3,800,000 in Italy (2002). Population total all countries: 3,852,500.","Indo-European, Italic, Romance, Italo-Western, Western, Gallo-Iberian, Gallo-Romance, Gallo-Italian",Indo-European,Veronese,"This video was recorded by Hugo Campbell in Italy, where he was visiting at the time. Veronese is a variety of the Venetian language, spoken in its entirety by as many as four million people, primarily in the Italian region of Venice. It is also spoken by diaspora communities worldwide, especially in the Americas. A literary language since the 13th century CE, Venetian enjoyed a considerable amount of prestige throughout the Mediterranean, as a lingua franca of trade and commerce through the turn of the nineteenth century, when it was displaced in its official capacity by Italian. Nonetheless, the language has been recognized as co-official in Venice since 2007 and is used actively online today.",Eurasia,,2015-2-19,, +Fabiola_20140729_ita,Fabiola__20140729,Hugo_Campbell_20140916,7/29/2014,fabiola-ita-thumb-raw.png (https://dl.airtable.com/L2EG79MNRnGkr3L9hNww_fabiola-ita-thumb-raw.png),Fabiola_20140729_ita.jpg (https://dl.airtable.com/6acbVvXmTVC7ayleyaJ2_Fabiola_20140729_ita.jpg),ita,,Italian,Trentino,,Classification,France,9/30/2017,Public,Standard,,,,,"Possibly Ladin + +",Get a free Italian lesson with italki: http://promos.italki.com/wikitongues_ita,1 checked out of 1,,85,,,,1,,ok7DGXbk8Mk,https://youtu.be/ok7DGXbk8Mk,"57,700,000 in Italy (ELDIA 2012). Population total all countries: 63,655,047.","Indo-European, Italic, Romance, Italo-Western, Italo-Dalmatian",Indo-European,§Trentino,,"Eurasia, Eurasia",,2015-2-19,, +Jean-Luc_20160608_bre,Jean-Luc_Bleunven_20160608,Geoffrey_Roger_,6/8/2016,Screen Shot 2016-07-01 at 14.34.03.png (https://dl.airtable.com/0mA8lKpqQVWqk8blvG4u_Screen%20Shot%202016-07-01%20at%2014.34.03.png),BRETON.jpg (https://dl.airtable.com/q0dHqu8YSYqnd9Z4rlb4_BRETON.jpg),bre,,Breton,,,,France,7/4/2016,Public,CC BY-NC 3.0,,,,,,,1 checked out of 1,,,,,,1,,29euYj0k1Kk,https://youtu.be/29euYj0k1Kk,"206,000 (2013 R. Milin), decreasing.","Indo-European, Celtic, Insular, Brythonic",Indo-European,§,,Eurasia,,2016-6-9,, +Paul_20160608_-gbc,Paul_Molac_20160608,Geoffrey_Roger_,6/8/2016,Screen Shot 2016-08-19 at 13.06.07.png (https://dl.airtable.com/4yhUoJwJRuOxzVk920w6_Screen%20Shot%202016-08-19%20at%2013.06.07.png),Paul_s1_M_20160608_-gbc.jpg (https://dl.airtable.com/rooHHzzlSv2ucWf6fbX0_Paul_s1_M_20160608_-gbc.jpg),-gbc,,Gallo,,,,France,8/19/2016,Public,CC BY-NC 3.0,,,,,,,1 checked out of 1,,,,,,1,,Rm9fBd0k1LY,https://youtu.be/Rm9fBd0k1LY,,,,§,,Eurasia,,2016-6-9,, +Kiem_20151215_vie,Kiem__20151215,Daniel_BogreUdell_20130101,12/15/2015,kiem-vie-thumb-raw.png (https://dl.airtable.com/QCpKtNQQf6fMpmdItY3U_kiem-vie-thumb-raw.png),,vie,,Vietnamese,,,,France,,To Upload,Standard,,,,,,Get a free Vietnamese lesson with italki: http://promos.italki.com/wikitongues_vie,1 checked out of 1,checked,38,,,,1,,,No ID,"65,800,000 in Viet Nam (1999 census). Population total all countries: 67,778,030. Ethnic population: 73,600,000 (2009 census).","Austro-Asiatic, Mon-Khmer, Viet-Muong, Vietnamese",Austro-Asiatic,§,,Eurasia,,2014-12-22,, +Majid_20131019_fas,Majid__20131019,Daniel_BogreUdell_20130101,10/19/2013,majid.png (https://dl.airtable.com/M7RDf6xyR0ykmvoPQ87o_majid.png),Majid_s1_M_20131019_fas.jpg (https://dl.airtable.com/5KrmnyG2RquQTQsFMong_Majid_s1_M_20131019_fas.jpg),fas,eng,Persian,Farsi,,,France,10/19/2013,Public,Standard,,,,,,Get a free Persian lesson with italki: http://promos.italki.com/wikitongues_fas,1 checked out of 1,,,,,,1,checked,Yxrq9zhgla8,https://youtu.be/Yxrq9zhgla8,"Population total all languages: 56,645,100.",,,"Farsi,,,,,",,Eurasia,,2014-12-22,, +Mark_20131019_ltz,Mark__20131019,Daniel_BogreUdell_20130101,10/19/2013,Mark_s1_M_20131019_ltz.png (https://dl.airtable.com/4OXnbw9mTgmcAEpfthhQ_Mark_s1_M_20131019_ltz.png),Mark_s1_M_20131019_ltz.jpg (https://dl.airtable.com/6k5JVVSSLFgtSIMeY7Aa_Mark_s1_M_20131019_ltz.jpg),ltz,,Luxembourgish,,,,France,10/19/2013,Public,Standard,,,,,,Get a free Luxembourgish lesson with italki: http://promos.italki.com/wikitongues_ltz,1 checked out of 1,checked,,,,,1,checked,z1Jfor9KJdE,https://youtu.be/z1Jfor9KJdE,"266,000 in Luxembourg (ELDIA 2012). Population total all countries: 336,710. L2 users: 50,000 in Luxembourg.","Indo-European, Germanic, West, High German, German, Middle German, West Middle German, Moselle Franconian",Indo-European,"Luxembourgish,,,,,",,Eurasia,,2014-12-22,, +Sebastiano_20131103_ita,Sebastiano__20131103,Daniel_BogreUdell_20130101,11/3/2013,sebastiano.png (https://dl.airtable.com/tpFN6hL8RU2e2KLBSAXX_sebastiano.png),Sebastiano_s1_M_20131103_ita.jpg (https://dl.airtable.com/6tkeC3aeRR6ACViTB9F7_Sebastiano_s1_M_20131103_ita.jpg),ita,ita,Italian,,,,France,11/3/2013,Public,Standard,,,,,,Get a free Italian lesson with italki: http://promos.italki.com/wikitongues_ita,1 checked out of 1,checked,,,,,1,checked,jjiXgRO8qDw,https://youtu.be/jjiXgRO8qDw,"57,700,000 in Italy (ELDIA 2012). Population total all countries: 63,655,047.","Indo-European, Italic, Romance, Italo-Western, Italo-Dalmatian",Indo-European,"Italian,,,,,",,"Eurasia, Eurasia",,2014-12-22,,https://www.dropbox.com/sh/ljwrz6undok61zx/AACrqHWgKRD4XINsfcdvVL1Ma?dl=0 +Joan-Lluís_20131201_cat,Joan-Lluís__20131201,Daniel_BogreUdell_20130101,12/1/2013,joanlluis.png (https://dl.airtable.com/CddjtHapTXieOlIx1ECy_joanlluis.png),JoanLluis_s1_M_20131201_cat.jpg (https://dl.airtable.com/Jn6HbgGHQDWLU6gpTegQ_JoanLluis_s1_M_20131201_cat.jpg),cat,,Catalan,,,,France,12/1/2013,Public,Standard,,,,,,Get a free Catalan lesson with italki: http://promos.italki.com/wikitongues_cat,1 checked out of 1,checked,,,,,1,checked,wdiVss0X6V0,https://youtu.be/wdiVss0X6V0,"3,750,000 in Spain (ELDIA 2012). Population total all countries: 4,079,420. L2 users: 5,150,000 in Spain (ELDIA 2012).","Indo-European, Italic, Romance, Italo-Western, Western, Gallo-Iberian, Ibero-Romance, East Iberian",Indo-European,"Catalan,,,,,",,"Eurasia, Eurasia",,2014-12-22,, +Sedday_20150217_eng+swa+som,Sedday__20150217,Daniel_BogreUdell_20130101,2/17/2015,sedday-engswasom-thumb-raw.png (https://dl.airtable.com/CywmTkB0Tda9nojFrm2s_sedday-engswasom-thumb-raw.png),Sedday_s3_M_20150217_swa+som+eng.jpg (https://dl.airtable.com/urBHnjvJQB2vtcOrVOQ3_Sedday_s3_M_20150217_swa%2Bsom%2Beng.jpg),"eng,swa,som",,"English, Swahili, Somali",,,,France,2/17/2015,Public,Standard,,,,,,"Get a free English lesson with italki: http://promos.italki.com/wikitongues_eng, Get a free Swahili lesson with italki: http://promos.italki.com/wikitongues_swa",3 checked out of 3,checked,,,,,3,checked,Ribtybmtb3k,https://youtu.be/Ribtybmtb3k,"55,600,000 in United Kingdom (ELDIA 2012). Population total all countries: 335,148,868. L2 users: 1,500,000 in United Kingdom (Crystal 2003). L2 users worldwide: 505,000,000., Population total all languages: 15,458,390., 6,460,000 in Somalia (2002). Population total all countries: 14,679,300.","Indo-European, Germanic, West, English, Niger–Congo, Atlantic–Congo, Benue–Congo, Southern Bantoid Bantu, Northeast Coast Bantu, Sabaki, Swahili, Afro-Asiatic, Cushitic, East, Somali",Indo-European,"English,Swahili,Somali,,,",,"Eurasia, Eurasia, Africa, Africa, Africa",,2014-12-22,, +Francesco_20151124_fur,Francesco__20151124,Daniel_BogreUdell_20130101,11/24/2015,francesco-fur-thumb-raw.png (https://dl.airtable.com/IX9IefBR0mwm3fTwfTAe_francesco-fur-thumb-raw.png),francesco-fur-thumb.jpg (https://dl.airtable.com/R1oUjtXPRJuiLL0jd8wS_francesco-fur-thumb.jpg),fur,,Friulian,Friulano,,,France,11/24/2015,Public,Standard,,,,,,,1 checked out of 1,,,,,,1,checked,A2brIzxJvkM,https://youtu.be/A2brIzxJvkM,"300,000 (2002).","Indo-European, Italic, Romance, Italo-Western, Western, Gallo-Iberian, Gallo-Romance, Gallo-Rhaetian, Rhaetian",Indo-European,"Friulian,,,,,",,Eurasia,,2015-9-7,, +Clara_20130218_fra,Clara__20130218,Clara__20130218,2/18/2013,Clara_s1_F_20130218_fra.png (https://dl.airtable.com/RDX9MZi2Qf26vIbzN5TK_Clara_s1_F_20130218_fra.png),Clara_s1_F_20130218_fra.jpg (https://dl.airtable.com/BQxsh5m0TMyeFj7qirY7_Clara_s1_F_20130218_fra.jpg),fra,,French,,,,France,2/18/2013,Public,Standard,,,,,,Get a free French lesson with italki: http://promos.italki.com/wikitongues_fra,1 checked out of 1,checked,,,,,1,checked,VgzHAbJjteQ,https://youtu.be/VgzHAbJjteQ,"60,000,000 in France (ELDIA 2012). Population total all countries: 74,980,460.","Indo-European, Italic, Romance, Italo-Western, Western, Gallo-Iberian, Gallo-Romance, Gallo-Rhaetian, Oïl, French",Indo-European,"French,,,,,",,"Eurasia, Eurasia, Americas, Eurasia, Eurasia",,2014-12-22,, +Cal_20160406_por+eng+fra,Cal__20160406,Cal__20160406,4/6/2016,,Cal_s3_M_20160406_por+eng+fra.jpg (https://dl.airtable.com/eVkeTPgqRxSuNLdjKTLy_Cal_s3_M_20160406_por%2Beng%2Bfra.jpg),"por,eng,fra",,"Portuguese, English, French",,,,France,4/15/2016,Public,CC BY-NC 3.0,checked,,,,,"Get a free Portuguese lesson with italki: http://promos.italki.com/wikitongues_por, Get a free English lesson with italki: http://promos.italki.com/wikitongues_eng, Get a free French lesson with italki: http://promos.italki.com/wikitongues_fra",3 checked out of 3,,,,,,3,checked,hCwfqiqDLWw,https://youtu.be/hCwfqiqDLWw,"10,000,000 in Portugal (ELDIA 2012). Population total all countries: 203,349,200., 55,600,000 in United Kingdom (ELDIA 2012). Population total all countries: 335,148,868. L2 users: 1,500,000 in United Kingdom (Crystal 2003). L2 users worldwide: 505,000,000., 60,000,000 in France (ELDIA 2012). Population total all countries: 74,980,460.","Indo-European, Italic, Romance, Italo-Western, Western, Gallo-Iberian, Ibero-Romance, West Iberian, Portuguese-Galician, Indo-European, Germanic, West, English, Indo-European, Italic, Romance, Italo-Western, Western, Gallo-Iberian, Gallo-Romance, Gallo-Rhaetian, Oïl, French",Indo-European,§,,"Eurasia, Eurasia, Eurasia, Eurasia, Eurasia, Eurasia, Americas, Eurasia, Eurasia",,2016-4-6,, +Anonymous_20141215_sva,.Anonymous__,Madeleine_Koerner_,12/15/2014,,,sva,,Svan,,,,Georgia,,To Upload,Standard,,,,,"MISSING; Mestia, Georgia",,1 checked out of 1,,99,,,,1,,,No ID,"15,000 (2000 A. Kibrik). Ethnic population: 15,000 (2000 A. Kibrik).","Kartvelian, Svan",Kartvelian,§,,"Eurasia, Eurasia",,2014-12-22,, +Valerian_20151114_xmf,Valerian__20151114,Madeleine_Koerner_,11/14/2015,valerian-xmf-thumb-raw.png (https://dl.airtable.com/euKzsOyQQhuS21SaurV6_valerian-xmf-thumb-raw.png),valerian-xmf-thumb.jpg (https://dl.airtable.com/kVxhBfhT6a6JQ58nigxR_valerian-xmf-thumb.jpg),xmf,,Mingrelian,Megrelian,,Spelling,Georgia,11/14/2015,Public,Standard,,,,,"Zugdidi, Georgia",,1 checked out of 1,,,,,,1,checked,t5mO8vWRPo8,https://youtu.be/t5mO8vWRPo8,"500,000 (1989 B. Hewitt).","Kartvelian, Zan",Kartvelian,"Mingrelian,,,,,",,"Eurasia, Eurasia",,2014-12-22,, +Ron_20141108_lim,Ron__20141108,Ron__20141108,11/8/2014,ron-lim-thumb-raw.png (https://dl.airtable.com/RFAVXlXQau5h6bI8Xybi_ron-lim-thumb-raw.png),Ron_s1_M_20141108_lim.jpg (https://dl.airtable.com/vGhrWuADTBCy2h0Bqkhe_Ron_s1_M_20141108_lim.jpg),lim,"eng,lim",Limburgish,,,,Germany,11/9/2014,Public,Standard,,checked,"Hi, miene naam is Ron en ich kall noe plat met dich. Plat, of auch waal bekint es Limburgs, is ’n Neder-Frankische taal die gesproake wurt in Belgisch Limburg, Nederlands Limburg en in ’n deil van Dutsjland. In Dutsjland rondom Oake en ’n bietsjke richting Kölle. + +Limburgs wurt auch waal ’n dialekt genumt, mèr ’t versjil tösje ’n dialekt en ’n taal is eigenlik neet duudelik. Sommige taaldeskundige zêgge dat ’n taal, dat is ’n dialekt mêt ’n eige leger. Woadoeër ’t zich zelf es stjandaart kint opdringe aan luj die angers kalle. + +In Limburg zint d’r net zoeë vöël versjille tösje luj, wie luj kalle in dörp of in stjèhe es wie in ’n anger taal sproake is. Beveurbilt in Mestreech doa zit d’r mieë Frans in ’t dialekt en in Kirchroade zit d’r mieë hoog-deutsch in ‘t dialekt. + +Limburgs is binne de regio woa ’t gesproake wurt, vergelieëke mit de talen die d’r rondomheen gesproake wère, ’n unieke taal omdat ’t aspekte van ’n toontaal hat. +’n Toontaal, dat wil zegge dat ‘tzelfde woeërt doeër ’n toeënverangering van beteikenis verangert. +In ’t Limburgs wurt dat miestal gebroek om de meervoudsvorming aan te gève. +Beveurbilt: eine knieën - twieë knieën, ein pèèërd - twieë pèèërt, eine sjoon - twieë sjoon. + +Limburgs is ’n taal die nog dageliks gesproake wurt. Gewoeën auch op stjroat, mèr doe kins d’r auch mit in ’t gemeintehoeës of in ’t ziekehoeës mit de luj. D’r zint d’r auch genog die plat met dich kalle. +Op de schoeël echter, offisjèl wurt d’r dan in de klas hollisj gekallt. Dus de kinger die liere dan sjrieve en lèèëze in ’t hollisj op schoeël. + +Nou dat woar ’t eigenlik wat ich wouw zegge. En dan zeg ich op z’n plat: hoije!","Hi, my name is Ron and I speak plat to you now. Plat, or also known as Limburgish, is a Low-Frankish language spoken in Belgian Limburg, Netherlands Limburg and in a part of Germany. In Germany in the neighborhood of Aachen and a little in the direction of Köln. + +Limburgish is also called a dialect, but the difference between a dialect and a language is unclear. Some language experts say that a language is a dialect with its own army. Therefore they can force themselves as a standard upon people who speak differently. + +In Limburg there are just as much differences between people, as people talk in villages and cities as in another language. For example in Maastricht there’s a little French in the dialect and in Kerkrade there’s more High German in the dialect. + +Limburgish is in the region where it’s spoken unique as compared to the languages spoken in the neighborhood because it has got aspects of a tone language. +A tone language is meant to when the same word changes its meaning through a tone change. +In Limburgish that’s mostly used for the plural. +For instance: one rabit – two rabbits, one horse – two horses, one shoe – two shoes. + +Limburgish is a language that’s spoken daily. At street, but you can also speak it with people in the city hall or in the hospital. There are enough people who’ll talk Limburgish with you. +On school though, officially, they speak Dutch in the classroom. So, the children learn to write and read in Dutch at school. + +So, that’s what I wanted to say. +And I say in plat: Take Care !",,,1 checked out of 1,,,,,,1,checked,cyhc6ddqdhc,https://youtu.be/cyhc6ddqdhc,"700,000 in Netherlands (2001). Population total all countries: 1,300,000.","Indo-European, Germanic, West, High German, German, Middle German, West Middle German, Rhenisch Franconian",Indo-European,"Limburgish,,,,,",,Eurasia,,2014-12-22,, +Thomas_20170421_-gmw,Thomas__20170421,Robert_Keresztesy_,4/21/2017,Screen Shot 2017-05-02 at 15.32.49.png (https://dl.airtable.com/491Kb6MEQWibHsaZLBTG_Screen%20Shot%202017-05-02%20at%2015.32.49.png),Thomas_s1_M_20170421_-gmw.jpg (https://dl.airtable.com/LuaKOFS4iYc874C67Fww_Thomas_s1_M_20170421_-gmw.jpg),-gmw,,Transylvanian Saxon,,"Freiberg am Neckar, Baden-Württemberg",,Germany,5/18/2017,Public,CC BY-SA 4.0,checked,,,,,,1 checked out of 1,,,,,,1,,0cj-CL9sRR0,https://youtu.be/0cj-CL9sRR0,,"Transylvanian Saxon, Central Franconian, West Central German, High German, West Germanic, Germanic, Indo-European",Transylvanian Saxon,§,,Eurasia,,2017-4-21,, +Marvin_20150625_deu,Marvin__20150625,Marvin__20150625,6/25/2015,marvin-deu-thumb-raw.png (https://dl.airtable.com/nYRQRLkHQa1NWqnSbNe1_marvin-deu-thumb-raw.png),Marvin_s1_M_20150625_deu.jpg (https://dl.airtable.com/CReu0iaS3mAf6CFdTn6K_Marvin_s1_M_20150625_deu.jpg),deu,,"German, Standard",German,,,Germany,8/18/2015,Public,CC BY-NC 3.0,checked,,,,,"Get a free German, Standard lesson with italki: http://promos.italki.com/wikitongues_deu",1 checked out of 1,checked,,Facebook,2016-6-10,https://www.facebook.com/wikitongues/videos/1126442630753596/,1,checked,mfprxIS-ANg,https://youtu.be/mfprxIS-ANg,"69,800,000 in Germany (ELDIA 2012). Population total all countries: 78,245,280. L2 users: 8,000,000 in Germany (ELDIA 2012).","Indo-European, Germanic, West, High German, German, Middle German, East Middle German",Indo-European,"German,,,,,",,"Eurasia, Eurasia",,2015-8-10,, +Irena_20160517_sme,Irena_Dahl_20160517,"Ivan_Batishchev_,Irena_Dahl_",5/17/2016,Screen Shot 2016-06-10 at 19.45.32.png (https://dl.airtable.com/mMAy2nTAG44ljiPdsolg_Screen%20Shot%202016-06-10%20at%2019.45.32.png),Irena_s1_F_20160517_sme.jpg (https://dl.airtable.com/q6IHeFd1Q7aqXn1xPuMA_Irena_s1_F_20160517_sme.jpg),sme,eng,"Saami, North",Davvisámegiella,,,Germany,6/9/2016,Public,CC BY-NC 3.0,checked,,,,,,1 checked out of 1,,,,,,1,,wjwQkOzzSAg,https://youtu.be/wjwQkOzzSAg,"15,000 in Norway (Krauss 1992). Population total all countries: 20,700. Ethnic population: 30,000 (1995 M. Krauss). 30,000–40,000.","Uralic, Sami, Western, Northern",Uralic,§Davvisámegiella,,Eurasia,,2016-5-18,,https://www.dropbox.com/sh/t35xbevh2ajb1bg/AACUAYSF1n_-rNFD1Ue_coh6a?dl=0 +Ronnie_20170622_nan+-sgl,Ronnie__20170622,Fiel_Sahir_20170609,6/22/2017,,,"nan,-sgl",,"Chinese, Min Nan, Singlish","Singlish, Hokkien",,,Germany,,To Upload,CC BY-NC 3.0,,,,,Ronnie is speaking Singlish with a little bit of Hokkien and even less of Cantonese. ,,2 checked out of 2,,,,,,2,,,No ID,"25,700,000 in China (Johnstone and Mandryk 2001). Population total all countries: 46,619,500.","Sino-Tibetan, Chinese",Sino-Tibetan,,,"Eurasia, Eurasia",,2017-6-22,, +Huldah_20170622_tam,Huldah__20170622,Fiel_Sahir_20170609,6/22/2017,,,tam,,Tamil,,,,Germany,,To Upload,CC BY-NC 3.0,,,,,Huldah sings a Tamil Hymn taken from Psalm 1. ,Get a free Tamil lesson with italki: http://promos.italki.com/wikitongues_tam,1 checked out of 1,,,,,,1,,,No ID,"60,700,000 in India (2001 census). Population total all countries: 68,763,360. L2 users: 8,000,000 in India.","Dravidian, Southern, Tamil-Kannada, Tamil-Kodagu, Tamil-Malayalam, Tamil",Dravidian,,,Eurasia,,2017-6-22,, +Paul_20170622_tam,Paul__20170622,Fiel_Sahir_20170609,6/22/2017,,,tam,,Tamil,Indian Tamil,,,Germany,,To Upload,CC BY-SA 4.0,checked,,,,,Get a free Tamil lesson with italki: http://promos.italki.com/wikitongues_tam,1 checked out of 1,,,,,,1,,,No ID,"60,700,000 in India (2001 census). Population total all countries: 68,763,360. L2 users: 8,000,000 in India.","Dravidian, Southern, Tamil-Kannada, Tamil-Kodagu, Tamil-Malayalam, Tamil",Dravidian,,,Eurasia,,2017-6-22,, +Theresa_20170622_aka,Theresa__20170622,Fiel_Sahir_20170609,6/22/2017,Screen Shot 2017-08-03 at 1.06.07 PM.png (https://dl.airtable.com/ONmx4YroT1S28ItVdd8a_Screen%20Shot%202017-08-03%20at%201.06.07%20PM.png),Theresa_20170622_aka.png (https://dl.airtable.com/bLseZl6iR7f0BOHfc4r3_Theresa_20170622_aka.png),aka,eng,Akan,Twi,,,Germany,8/12/2017,Public,CC BY-NC 3.0,,,,,,,1 checked out of 1,,,,,,1,,NAhK_HlNNJM,https://youtu.be/NAhK_HlNNJM,"8,300,000 in Ghana (2004 SIL). Population includes 2,800,000 Asante Twi, 1,900,000 Fante, 555,000 Akuapem Twi (2004). Population total all countries: 8,314,600. L2 users: 1,000,000 in Ghana.","Niger-Congo, Atlantic-Congo, Volta-Congo, Kwa, Nyo, Potou-Tano, Tano, Central, Akan",Niger-Congo,,"This video was recorded by Fiel Sahir in Düsseldorf, Germany, where Theresa lives and works. Twi, also called Asanti Twi, is spoken by as many as nine million people, primarily in the Ashanti region of Ghana, where it is nationally official and the most widely-spoken African language. It is also spoken in parts of Côte d'Ivoire and by diaspora communities worldwide. A member of the Niger-Congo linguistic family, Twi is related to more than a thousand other languages across western and southern Africa, including Igbo, Yoruba, and Shona. It derives from from Asante and Akuapem, two former literary dialects of the Akan language. Though Twi is a primarily spoken language, there has been a consolidated orthography since 1978.",Africa,,2017-6-22,,https://www.dropbox.com/sh/9ov02nrlpna2z07/AACH36fCYMifDEjPn0H4Cv8da?dl=0 +Priya_20170622_tam,Priya__20170622,Fiel_Sahir_20170609,6/22/2017,Priya_20170622_tam.png (https://dl.airtable.com/tYOpy5VzQ5WVQNs3Cjml_Priya_20170622_tam.png),,tam,,Tamil,Sri Lankan Tamil,,,Germany,1/27/2018,Public,CC BY-NC 3.0,,,,,,Get a free Tamil lesson with italki: http://promos.italki.com/wikitongues_tam,1 checked out of 1,,,,,,1,,4sgX-jvskfI,https://youtu.be/4sgX-jvskfI,"60,700,000 in India (2001 census). Population total all countries: 68,763,360. L2 users: 8,000,000 in India.","Dravidian, Southern, Tamil-Kannada, Tamil-Kodagu, Tamil-Malayalam, Tamil",Dravidian,,"This video was recorded by Fiel Sahir (http://Between3worlds.com) in Dusseldorf, Germany, where he and Priya live. Tamil is spoken by as many as 70 million people, primarily in India and Sri Lanka, where it is an official language, as well as other regions of South Asia, and by diaspora communities worldwide. A Dravidian language, Tamil is related to more than 80 mother tongues, including Kannada and Telugu. Tamil has been a literary language for more than 2,000 years, making it perhaps humanity's only classical language with a widely distributed population of first language speakers. Priya’s variety of the language, Sri Lankan Tamil, is spoken by at least three million people and is dialectically diverse, to the extent that it is not always mutually intelligible with Tamil varieties in India. Despite this wide diversity in speech, however, there are relatively few variations in its written form, a discrepancy typically called ‘diglossia’. ",Eurasia,,2017-6-22,, +Giorgos_20141215_ell,Giorgos__20141215,Madeleine_Koerner_,12/15/2014,giorgios-ell-thumb-raw.png (https://dl.airtable.com/QwTxYc4NSOK03I2SEWWa_giorgios-ell-thumb-raw.png),,ell,,Greek,,,,Greece,,Private,Standard,,,,,"Music store in Athens, Greece",,1 checked out of 1,,68,,,,1,,,No ID,"10,700,000 in Greece (ELDIA 2012). Population total all countries: 13,432,940.","Indo-European, Greek, Attic",Indo-European,§,,"Eurasia, Eurasia",,2014-12-22,, +Pavlin_20140729_sqi,Pavlin__20140729,Madeleine_Koerner_,7/29/2014,,,sqi,,Albanian,Albanian (Standard),,,Greece,,To Upload,Standard,,,,,Greek Beach,,1 checked out of 1,,99,,,,1,,,No ID,"Population total all languages: 5,414,300.",,,§Albanian (Standard),,Eurasia,,2014-12-22,, +Manolis_20141215_tsd,Manolis__20141215,Madeleine_Koerner_,12/15/2014,manolis-tsd-thumb-raw.png (https://dl.airtable.com/hrGreKX8RO2yoQVcvff2_manolis-tsd-thumb-raw.png),Manolis_s1_M_20141215_tsd.jpg (https://dl.airtable.com/u4tcv5AmQAapKEjEhpmF_Manolis_s1_M_20141215_tsd.jpg),tsd,,Tsakonian,,,Spelling,Greece,9/22/2015,Public,Standard,,,,,"Ayios Andreas, Greece",,1 checked out of 1,,,,,,1,checked,321JX9QiME0,https://youtu.be/321JX9QiME0,200 (Salminen 2007).,"Indo-European, Greek, Doric",Indo-European,"Tsakonian,,,,,",,Eurasia,,2014-12-22,, +Carlos_20180105_quc,Carlos__20180105,Lindsay_Williams_,1/5/2018,Carlos_20180105_quc.png (https://dl.airtable.com/G0IlIjQvTpOGLXV6OYbw_Carlos_20180105_quc.png),,quc,,K’iche’,,,,Guatemala,1/26/2018,Public,CC BY-NC 3.0,,,,,,,1 checked out of 1,,,,,,1,,k-uKyuTveuA,https://youtu.be/k-uKyuTveuA,"2,330,000. 300,000 monolinguals.","Mayan, Yucatecan-Core Mayan, K’ichean-Mamean, K’ichean, Poqom-K’ichean, Core K’ichean",,,"This video was recorded by Lindsay Williams in Pajumujuyup, Guatemala, where Carlos lives and works. K’iche’ is spoken by at least two million people, primarily in the Central American nation of Guatemala, and by diaspora communities worldwide. It is the second-most widely spoken language in Guatemala after Spanish, and the most widely spoken Mayan language of any country. It has been a literary language since at least the 16th century CE, when it featured prominently in Classical Mayan literature, such as the Popol Vuh, as well as other religious, mythological, and historical texts. Following the Spanish Conquest of America and subsequent centuries of Spanish-only education, literacy in K’iche decreased and remains relatively low today; however, thanks to the work of cultural activists, it has been recognized as an official minority language by the Guatemalan government. As a result, it is increasingly taught in schools and features ever more prominently in local media.",Americas,,2018-1-5,, +Mária_20170703_swg+hun,Mária_Pregitzer_20170703,Márton_Tóth_20170701,7/3/2017,Mária_20170703_swg+hun.png (https://dl.airtable.com/RRYPWZyMRKu1qoeBjVF1_Ma%CC%81ria_20170703_swg%2Bhun.png),Mária_20170703_swg+hun.png (https://dl.airtable.com/clXjNsN7SvCkfIfgNqHG_Ma%CC%81ria_20170703_swg%2Bhun.png),"swg,hun",,"Swabian, Hungarian",,,,Hungary,7/13/2017,Public,CC BY-SA 4.0,checked,checked,"e uses the Hungarian word 'társaság') we would sit and dance - everybody liked us. Wherever we were people always liked us, we were 'put in the foUnfortunately, some parts / words are missing. +Sections marked with * are in Hungarian. + +Tenk daran, Marika. Mit dem Foder sam a for toges um finf uhr ausikama am oka. Sogt e ""Schama to slovi oli."" *Hát jó, persze.* Mi keme ausi im oka, un e is fra kama, un i pin hin kama. Un hamzu pin i fra kama, un e is hin kama, ja hamzu rene di rese pesse. Nun hob i locht, e hob sein tumheit mocht, un hod e sogt ""Pazli, jetz keme wi ham, tuts tu kauhe, un keme wi ausi im oka, tawai is nimer warm."" Un hod e sogt mi ""Pazli, hat tu a zwibel stupfa, des wirs tu douch kene, wen tu di grinzoig nit anbau kans, kene tu di zwibel stupfa."" Un e olwes schaut, obi undli hob i mocht. ""*Hát,*"" sogt i ""Sofi kan i douch kene, zwibel stupfa."" Un hob e sogt i süi di ovus obproukke, i süi di fizujn obproukke, un di krumbi hama wi ausmocht miteinand schein... Mi sama olwes miteinand mocht, mi zwa. +Kans tu erinnern wen tu kukruz ausproukke pis kama? *Hát ez...* Stog schicht has tu's mocht. Öcsi is au kama, un dann hob e eingetan i sag, un hamfid. *Ennyi elég most egyelőre? Még eszembe jut valami...* + +Wen i for en u fufzig ohr pin hirkama, gleich san keni kinder kwest, dann sama wi mit dem Foder gangen, i hob so a grosi freid hobt. Sogt e ""Pazli, schein lekt di an"" un dann hob e sogt ""Pazlim so schein pist"". *Na, hát...* Un dann hab wi in *társaság* seisen un tanzen - mi hab oli gern hobt. + +- This part is missing - + +Oli mi san vorzogn kwest, uns hab ned zruckstöjd. ""Dein foder is von ei undlichi famüli"" des hobt di Vávi sogt. ""Maris, deini schwigeleid san die flezige leid kwest."" + +Di Al hod hamtrog as gros a puckli, jo had schon kuh un rese, nun hod si nime mer hamtrog. Kuh had hob, rese had hob, un mit den hob si di oka ausiforn. Gut kwest es sen. Hob oles is ihn voxen, drei grund hob si hobt, zwa weingarten, unten un oba. Di füli oubst was si hob habn. Oles. I pin so kwein zu oka ausigehn. Mit eninand sama gegangen. So is gut kwest.","English translation (rough) + +Imagine, Marika (her daughter). We woke up at 5 in the morning with your father to go out to the field. He said ""Well look, everyone's still asleep"". *Well, of course.* When we were going he would be wlaking in the front and I would be walking in the back. On the way home I would be walking in front, and he in back. Of course the horses pull faster on the way home... I laughed because he was joking around. He said ""Well, Pazli (~'old lady', endearing), when we get home you'll cook supper and then we'll head out again to the field when it's not so warm anymore."" And then he said ""Pazli, plant the onions, you can at least do that even if you can't do the other vegetables"". He would always watch if I was doing it correctly... I said (sarcastically) ""Well I think I can at least manage this, planting the onions"". He then told me to pick the peas, the green beans... We picked to potatoes nicely together. We always did everything together, us two. Do you remember when you came to 'break the corn'? (don't really know how to translate this, it's basically breaking the kernels off the dry cob to be fed to chickens) You did it very nicely. Öcsi (her son) also came, he put it into bags and took it home. + +When I came here over 51 years ago I didn't have children right away. Your father and I would go out often, I loved that. He told me ""Pazli, dress up nicely"" and then ""You look nice/beaufitul"". Well, I'll be - I said. At the party (shrefront', we were never 'played down'. ""Your father is from a decent family"" said Vávi (her friend). ""Maris (to my grandma), your father-in-law and mother-in-law are some hardworking folks."" + +Al (means grandma, but she's referring to her mother here), would carry the bales of hay on her back, until we got cows and horses. After that she'd take those to field with her. This was good. They (her parents) produced everything themselves, they had three fields, two for grapes, over and down the hill. All the fruit they had... +I was so used to going to the field. We went together. It was good that way.","This is my grandma speaking in her native dialect about her life when she was younger. She's a Danube Swabian ( https://en.wikipedia.org/wiki/Germans_of_Hungary ), one of the few in our village who still speak 'Sváb'. My mom is the only one in the family who can understand her when she's not speaking Hungarian, and she was kind enough to make a transcript, which I'll include along with a rough English translation. ",,2 checked out of 2,,,,,,2,,mfRie6DsS44,https://youtu.be/mfRie6DsS44,"819,000 (2006). Ethnic population: 820,000 (2000)., 9,840,000 in Hungary (ELDIA 2012). Population total all countries: 12,606,130.","Indo-European, Germanic, West, High German, German, Upper German, Alemannic, Uralic","Indo-European,Indo-European","§Swabian,§Hungarian","This video was recored by Mária's grandson Márton Tóth in Perbál, Hungary, where she lives. She is a member of the Danube Swabian community, descendents of German-speaking peoples who settled southeastern Europe between the 17th and 18th centuries. Her native language, Swabian, known locally as 'Sváb', is spoken by over 800,000 people, principally in the Swabia region of southwestern Germany, as well as in parts of Hungary and Romania; it remains politically unrecognized by all three governments. A Germanic language, it is closely related to German, Bavarian, and Dutch, among others. Mária's other primary language, Hungarian, is spoken by as many as 13 million people worlwide.","Eurasia, Eurasia",,2017-7-3,, +Ljóni_20160404_isl,Ljóni__20160404,Ljóni__20160404,4/4/2016,Screen Shot 2016-04-04 at 7.26.32 PM.png (https://dl.airtable.com/si4uaJTSovVqC1Mk9iEA_Screen%20Shot%202016-04-04%20at%207.26.32%20PM.png),Ljóni speaking Icelandic.jpg (https://dl.airtable.com/tFJ7w0htSs6YySHHTyje_Ljo%CC%81ni%20speaking%20Icelandic.jpg),isl,,Icelandic,,,,Iceland,4/7/2016,Public,CC BY-NC 3.0,,,,,,Get a free Icelandic lesson with italki: http://promos.italki.com/wikitongues_isl,1 checked out of 1,,,Facebook,2017-2-2,https://www.facebook.com/wikitongues/videos/1347416525322871/,1,checked,SvlLbX3oyAk,https://youtu.be/SvlLbX3oyAk,"230,000 in Iceland (1980). Population total all countries: 243,840.","Indo-European, Germanic, North, West Scandinavian",Indo-European,§,,Eurasia,,2016-4-4,, +Keely_20151012_eng+spa+cat,Keely__20151012,Keely__20151012,10/12/2015,keely-engspacat-thumb-raw.jpg (https://dl.airtable.com/JyrhgucTZeFXZjqzSAZw_keely-engspacat-thumb-raw.jpg),keely-engspacat-thumb.jpg (https://dl.airtable.com/wdQ52AcQy2bwF3AodGLh_keely-engspacat-thumb.jpg),"eng,spa,cat",,"English, Spanish, Catalan",,,,Iceland,10/18/2015,Public,Standard,,,,,Keely Algar,"Get a free English lesson with italki: http://promos.italki.com/wikitongues_eng, Get a free Spanish lesson with italki: http://promos.italki.com/wikitongues_spa, Get a free Catalan lesson with italki: http://promos.italki.com/wikitongues_cat",3 checked out of 3,,,,,,3,checked,RTr00PeXZ6I,https://youtu.be/RTr00PeXZ6I,"55,600,000 in United Kingdom (ELDIA 2012). Population total all countries: 335,148,868. L2 users: 1,500,000 in United Kingdom (Crystal 2003). L2 users worldwide: 505,000,000., 38,400,000 in Spain (ELDIA 2012). Population total all countries: 414,170,030. L2 users: 7,490,000 in Spain (ELDIA 2006)., 3,750,000 in Spain (ELDIA 2012). Population total all countries: 4,079,420. L2 users: 5,150,000 in Spain (ELDIA 2012).","Indo-European, Germanic, West, English, Indo-European, Italic, Romance, Italo-Western, Western, Gallo-Iberian, Ibero-Romance, West Iberian, Castilian, Indo-European, Italic, Romance, Italo-Western, Western, Gallo-Iberian, Ibero-Romance, East Iberian",Indo-European,"English,Spanish,Catalan,,,",,"Eurasia, Eurasia, Eurasia, Eurasia, Eurasia, Eurasia",,2015-10-6,, +Anonymous_20170313_dty,.Anonymous__,Subhashish_Panigrahi_,3/13/2017,Screen Shot 2017-04-03 at 15.20.04.png (https://dl.airtable.com/awfVZklaS1GuiTaTjzdg_Screen%20Shot%202017-04-03%20at%2015.20.04.png),Anonymous_s1_F_20170313_dty.jpg (https://dl.airtable.com/Hp4PPUEqRVqTt21mBW2J_Anonymous_s1_F_20170313_dty.jpg),dty,,Dotyali,Achhami dialect of Doteli,"An Achhami woman from Nepal explaining recipe of mutton curry/dry mutton preparation, and recipe of fish. She explains all the steps of the cooking process and gives a bit idea of what they cook during any local festival.",,India,4/13/2017,Public,CC BY-SA 4.0,checked,,,"Nepali (translated by Janak Bhatta) नेपालबाट एक अछामी महिला मटन करी/सुख्खा मटनको परिकार र माछा करीको परिकार तयार गर्ने बिधि बताउँदै । अछामी भाषा नेपालको अछाम जिल्ला बासीको मातृभाषा हो र डोटेली भाषाको उपभाषा हो । सन् २०११ को जनगणना अनुसार १४३,००० जना अछामी भाषी रहेका छन् । Doteli (translated by Janak Bhatta): नेपालबठे एक अछामै महिला मटन करी/सुख्खा मटनो परिकार रे माछा करीको परिकार बनुन्या बिधि बतुनलारयान् । अछामी भाषा नेपालो अछाम जिल्ला बासीको मातृभाषा हो रे डोटेली भाषाको उपभाषा लै हो । सन् २०११ को जनगणना अनुसार १४३,००० जना अछामी भाषी रया छन् ।","From Bengaluru, Karnataka",,1 checked out of 1,,,,,,1,,p45O8FiMED4,https://youtu.be/p45O8FiMED4,"788,000 in Nepal (2011 census).","Indo-European, Indo-Iranian, Indo-Aryan, Northern zone, Eastern Pahari",Indo-European,§Achhami dialect of Doteli,,Eurasia,,2017-3-17,, +Musamoni_20170426_ori,Musamoni__20170426,Subhashish_Panigrahi_,4/26/2017,Screen Shot 2017-05-02 at 14.53.27.png (https://dl.airtable.com/YyJTmH6YQtiSiKOya1Eo_Screen%20Shot%202017-05-02%20at%2014.53.27.png),Musamoni_s1_F_20170426_ori.jpg (https://dl.airtable.com/e7xemKU5RFWNhdlMYv0n_Musamoni_s1_F_20170426_ori.jpg),ori,,Oriya,Balesori/Baleswari,,,India,5/9/2017,Public,CC BY-SA 4.0,checked,,,,Bahuna Gita - the mourning song,,1 checked out of 1,,,,,,1,,YEij6a6wt0Y,https://youtu.be/YEij6a6wt0Y,"Population total all languages: 32,656,870.",,,§Balesori/Baleswari,,Eurasia,,2017-4-26,, +Jaswant_20160514_bfr,Jaswant__20160514,"Parveer_Grewal_,Satdeep_Gill_",5/14/2016,Screen Shot 2016-06-14 at 22.05.01.png (https://dl.airtable.com/9O2diO7rQPmJsY2e8PdQ_Screen%20Shot%202016-06-14%20at%2022.05.01.png),Jaswant_s1_M_20160514_bfr.jpg (https://dl.airtable.com/yDiLoRqUSSWnaAII49fv_Jaswant_s1_M_20160514_bfr.jpg),bfr,,Bazigar,Bazigar Boli,,,India,6/14/2016,Public,CC BY-SA 4.0,checked,,,,,,1 checked out of 1,,,Facebook,2017-10-30,https://www.facebook.com/wikitongues/videos/1611993342198520/,1,,SZyN7kXmwLU,https://youtu.be/SZyN7kXmwLU,"58,200 (1981 census). Ethnic population: 800,000.","Dravidian, Unclassified",Dravidian,§Bazigar Boli,,Eurasia,,2016-5-16,, +Randeep_20160419_pan,Randeep__20160419,Satdeep_Gill_,4/19/2016,Screen Shot 2016-04-30 at 14.30.10.png (https://dl.airtable.com/vnizRSHXQlapqCujA10P_Screen%20Shot%202016-04-30%20at%2014.30.10.png),Randeep_s1_M_20160419_pan.jpg (https://dl.airtable.com/oJOY2lfRQrqB4psXQpfW_Randeep_s1_M_20160419_pan.jpg),pan,,"Panjabi, Eastern",Powadhi Punjabi,,,India,5/16/2016,Public,CC BY-SA 4.0,checked,,,,,"Get a free Panjabi, Eastern lesson with italki: http://promos.italki.com/wikitongues_pan",1 checked out of 1,,,Facebook,2016-10-21,https://www.facebook.com/wikitongues/videos/1238792506185274/,1,checked,rJYH4xad_fE,https://youtu.be/rJYH4xad_fE,"28,200,000 in India (2001 census). Population total all countries: 29,514,770.","Indo-European, Indo-Iranian, Indo-Aryan, Central zone, Panjabi",Indo-European,§Powadhi Punjabi,,Eurasia,,2016-4-21,, +Lillotama_20160514_skr,Lillotama__20160514,"Satdeep_Gill_,Parveer_Grewal_",5/14/2016,Screen Shot 2016-05-31 at 16.40.35.png (https://dl.airtable.com/XNi9xlanSymyWb6Mlj5L_Screen%20Shot%202016-05-31%20at%2016.40.35.png),Lillotama_s1_F_20160514_skr.jpg (https://dl.airtable.com/OFmPa3T1e0y7aFW5u3WA_Lillotama_s1_F_20160514_skr.jpg),skr,,Seraiki,Bahawalpuri ,,,India,5/31/2016,Public,CC BY-SA 4.0,checked,,,,,,1 checked out of 1,,,Facebook,2017-10-7,https://www.facebook.com/wikitongues/videos/1574425205955334/,1,checked,ozo3HCJVJEA,https://youtu.be/ozo3HCJVJEA,"13,900,000 in Pakistan (1998 census). Population total all countries: 13,968,000.","Indo-European, Indo-Iranian, Indo-Aryan, Northwestern zone, Lahnda",Indo-European,§Bahawalpuri ,,Eurasia,,2016-5-16,, +Yusuf_20180129_sun,Yusuf_Hidayat_20180129,Yusuf_Hidayat_20180129,1/29/2018,Yusuf_20180129_sun.png (https://dl.airtable.com/ZybGG00BSaStHsB2QxSy_Yusuf_20180129_sun.png),Yusuf_20180129_sun.jpg (https://dl.airtable.com/ZAsIZYXwRJedgCHlyNbM_Yusuf_20180129_sun.jpg),sun,eng,Sunda,Sundanese,,,Indonesia,2/19/2018,To Upload,CC BY-SA 4.0,checked,,,,Introduction to the Sundanese language,,1 checked out of 1,,,,,,1,,8ieQ9HfbqwY,https://youtu.be/8ieQ9HfbqwY,"34,000,000 (2000 census).","Austronesian, Malayo-Polynesian, Sundanese",,,"This video was recorded by Yusuf Hidayat in Ciamis, Indonesia. Sundanese is spoken by as many as a 40 million people, primarily on the Indonesian islands of Java and Sumatra, where it is recognized as a regional language by the provincial governments of Banten and West Java. A member of the Austronesian language family, Sundanese bears relation in grammar, vocabulary, and genealogy to more than 1,000 mother tongues across South Asia and the Pacific, including Madurese, Balinese, and Indonesian. It has been a literary language for centuries, having developed a unique writing system by the 14th century CE. Today, Sundanese speakers write the language with a modern variant of this script, sometimes in conjunction with the Javanese script and Latin alphabet.",Eurasia,,2018-1-29,,https://www.dropbox.com/sh/bi4tgz1acwc0a08/AACND9-BlgklqQN5MBGatClBa?dl=0 +Nurkhalis_20170530_bjn,Nurkhalis_Akbar_20170530,Nurkhalis_Akbar_20170530,5/30/2017,Screen Shot 2017-06-01 at 13.30.49.png (https://dl.airtable.com/kWPuSd2MTIS5zGbM2qMD_Screen%20Shot%202017-06-01%20at%2013.30.49.png),Nurkhalis_s1_M_20170530_bjn.png (https://dl.airtable.com/1esAxw4iQSSnnxTOMu7l_Nurkhalis_s1_M_20170530_bjn.png),bjn,,Banjar,,,,Indonesia,6/8/2017,Public,CC BY-SA 4.0,checked,,,,,,1 checked out of 1,,,,2018-1-17,https://www.facebook.com/wikitongues/videos/1694245913973262/,1,,oGVRFnENVlI,https://youtu.be/oGVRFnENVlI,"3,500,000 in Indonesia (2000 census), increasing. Population total all countries: 3,505,000.","Austronesian, Malayo-Polynesian, Malayo-Chamic, Malayic, Malay",Austronesian,Banjar,"This video was submitted by Nurkhalis from the city of Banjarmasin, Indonesia. Banjar, known natively as Bahasa Banjar, is spoken by about 3.5 million people, principally in Indonesia's South Kalimantan province, located on the island of Borneo. Though it remains unrecognized by the government at both the national and provincial levels, Banjar is an important lingua franca in Kalimantan and surrounding areas. An Austronesian language of the Malayan family, Banjar is closely related to languages such as Indonesian, Jambi Malay, and Temuan, and more distantly so to Formosan and Polynesian languages. It is written using Latin characters, as well as Jawi, a variant of the Arabic alphabet.",Eurasia,,2017-5-30,, +WayanPindi_20160229_bqy,WayanPindi__20160229,Ivan_Batishchev_,2/29/2016,Screen Shot 2016-03-18 at 6.01.39 PM.png (https://dl.airtable.com/6CSyllflTGCzKtBRGRk4_Screen%20Shot%202016-03-18%20at%206.01.39%20PM.png),Thumbnail - Wayan Pindi signing Kata Kolok.jpg (https://dl.airtable.com/Lfj4xurTGqsGDG2O2VQH_Thumbnail%20-%20Wayan%20Pindi%20signing%20Kata%20Kolok.jpg),bqy,,Bengkala Sign Language,Kata Kolok,,,Indonesia,3/18/2016,Public,CC BY-NC 3.0,checked,,,,,,1 checked out of 1,,99,,,,1,checked,3PZd-DmY_dE,https://youtu.be/3PZd-DmY_dE,"41 (2007 SIL). More than 1,200 Kata Kolok signers; about 50 of them are deaf (2011 C. de Vos). 40 monolinguals.",Deaf sign language,,§Kata Kolok,,Eurasia,,2016-2-29,, +Alex_20170823_afr,Alex__20170823,Fiel_Sahir_20170609,8/23/2017,,,afr,,Afrikaans,,,,Indonesia,,To Upload,CC BY-NC 3.0,,,,,"Polyglot Indonesia Jakarta Meetup. + +Possible addition to bio at the bottom, all tentative that we can add/edit with time. + +Polyglot Indonesia is a collective of language enthusiasts from around the archipelago coming together to celebrate diversity.",Get a free Afrikaans lesson with italki: http://promos.italki.com/wikitongues_afr,1 checked out of 1,,,,,,1,,,No ID,"6,860,000 in South Africa (2011 census), decreasing. Population total all countries: 7,096,810. L2 users: 10,300,000 in South Africa.","Indo-European, Germanic, West, Low Saxon-Low Franconian, Low Franconian",,,,Africa,,2017-9-2,Jakarta Special Capital Region_ID, +Mira+Marten_20170823_deu,"Mira__20170823,Marten__20170823",Fiel_Sahir_20170609,8/23/2017,,,deu,,"German, Standard",Austrian German,,,Indonesia,,To Upload,CC BY-NC 3.0,,,,,"Polyglot Indonesia Jakarta Meetup. + +Possible addition to bio at the bottom, all tentative that we can add/edit with time. + +Polyglot Indonesia is a collective of language enthusiasts from around the archipelago coming together to celebrate diversity.","Get a free German, Standard lesson with italki: http://promos.italki.com/wikitongues_deu",1 checked out of 1,,,,,,1,,,No ID,"69,800,000 in Germany (ELDIA 2012). Population total all countries: 78,245,280. L2 users: 8,000,000 in Germany (ELDIA 2012).","Indo-European, Germanic, West, High German, German, Middle German, East Middle German",,,,"Eurasia, Eurasia",,2017-9-2,Jakarta Special Capital Region_ID, +Tessa_20170823_ind+jav,Tessa__20170823,Fiel_Sahir_20170609,8/23/2017,,,"ind,jav",,"Indonesian, Javanese",,,,Indonesia,,To Upload,CC BY-NC 3.0,,,,,This is more of Indonesian with a Javanese accent. Should we just label it Indonesian?? ,Get a free Indonesian lesson with italki: http://promos.italki.com/wikitongues_ind,2 checked out of 2,,,,,,2,,,No ID,"22,800,000 in Indonesia (2000), increasing. Population total all countries: 23,200,480. L2 users: 140,000,000 in Indonesia., 84,300,000 in Indonesia (2000 census). 25,000 in south Sulawesi, and 69,000,000 on Java, 500,000 of them being in Banten region and 2,500,000 in Cirebon region of Java. Population total all countries: 84,308,740.","Austronesian, Malayo-Polynesian, Malayo-Chamic, Malayic, Malay, Austronesian, Malayo-Polynesian, Javanese",,,,"Eurasia, Eurasia",,2017-9-2,Jakarta Special Capital Region_ID, +Donna_20170823_min,Donna__20170823,Fiel_Sahir_20170609,8/23/2017,Donna_20170823_min.png (https://dl.airtable.com/S15Gr7zjQMSDhPOmeT7w_Donna_20170823_min.png),,min,,Minangkabau,,,,Indonesia,,To Upload,CC BY-NC 3.0,,,"Here's Dona's email. She said she was interested in helping transcribe: + +Pm_dona@yahoo.com + +IF it doesn't work, lmk! ",,"Polyglot Indonesia Jakarta Meetup. + +Possible addition to bio at the bottom, all tentative that we can add/edit with time. + +Polyglot Indonesia is a collective of language enthusiasts from around the archipelago coming together to celebrate diversity.",,1 checked out of 1,,,,,,1,,,No ID,"5,530,000 (2007). 500,000 in Jakarta.","Austronesian, Malayo-Polynesian, Malayo-Chamic, Malayic, Malay",,,"This video was recorded by Fiel Sahir in Yogyakarta, Indonesia, where he and Donna met at a Polyglot Indonesia Jakarta meetup event. Minangkabau is spoken by more than 5 million people, principally in the Indonesian province of West Sumatra, where it is a regionally official language, and neighboring North Sumatra, where it functions as a lingua franca between a diverse array of communities. It is also spoken in parts of Malaysia, especially the state of Negeri Sembilan, where it is also official and sometimes referred to as a local variety of Malay. Minangkabau is a dialectically diverse language, with significant differences emerging between different towns and cities. This diversity is also manifest in the language’s written form: Minangkabau speakers do not use a single literary standard. An Austronesian language of the Malayo-Polynesian family, Minangkabau is closely related to Malay, as well as Balinese, Indonesian, and a myriad of mother tongues. It is the mother tongue of the eponymously identifying Minangkabau people, who are among Indonesia’s matrilineal societies. They are also known internationally for their traditional ‘rumah gadang’ or ‘big house’ architecture, defined by dramatically curved roof structures.",Eurasia,,2017-9-2,Jakarta Special Capital Region_ID, +Rama_20170823_jav,Rama__20170823,Fiel_Sahir_20170609,8/23/2017,Screen Shot 2017-11-05 at 4.55.52 PM.png (https://dl.airtable.com/u5L0y765SuLIlRGIFS4H_Screen%20Shot%202017-11-05%20at%204.55.52%20PM.png),Rama_20170823_jav.png (https://dl.airtable.com/mnLxvO0JRLuhbfWcsSSG_Rama_20170823_jav.png),jav,,Javanese,,,,Indonesia,11/14/2017,Public,CC BY-NC 3.0,,,,,"Polyglot Indonesia Jakarta Meetup. + +Possible addition to bio at the bottom, all tentative that we can add/edit with time. + +Polyglot Indonesia is a collective of language enthusiasts from around the archipelago coming together to celebrate diversity.",,1 checked out of 1,,,,,,1,,,No ID,"84,300,000 in Indonesia (2000 census). 25,000 in south Sulawesi, and 69,000,000 on Java, 500,000 of them being in Banten region and 2,500,000 in Cirebon region of Java. Population total all countries: 84,308,740.","Austronesian, Malayo-Polynesian, Javanese",,,"This video was recorded by Fiel Sahir in Yogyakarta, Indonesia, where he and Rama met at a Polyglot Indonesia Jakarta meetup event. Javanese is spoken by more than 80 million people, principally on the island of Java in Indonesia and by diaspora communities worldwide. A literary language since at least the fifth century CE, Javanese has been written using three writing systems: the Latin and Arabic alphabets, as well as a native Javanese script of Indian and Aramaic influence. The language emerged in its modern written form with the rise of the Mataram Sultanate in the 16th century, and is among Wikipedia's 100 most-used languages today. An Austronesian language, Javanese is most closely related to Malay, Sundanese and Balinese, and more distantly so to Chamorro and Kiribatese.",Eurasia,,2017-9-2,Jakarta Special Capital Region_ID, +Ihsan+Septiadi_20170823_mui,"Ihsan__20170823,Septiadi__20170823",Fiel_Sahir_20170609,8/23/2017,Screen Shot 2017-11-05 at 5.14.16 PM.png (https://dl.airtable.com/8GRKxqyRm6NalJYjQEVg_Screen%20Shot%202017-11-05%20at%205.14.16%20PM.png),Ihsan+Septiadi_20170823_mui.png (https://dl.airtable.com/nzJw7UQXROSOoV4RHxvd_Ihsan%2BSeptiadi_20170823_mui.png),mui,,Musi,Palembangnese,,,Indonesia,11/29/2017,Public,CC BY-SA 4.0,checked,,,,"Polyglot Indonesia Jakarta Meetup. + +Possible addition to bio at the bottom, all tentative that we can add/edit with time. + +Polyglot Indonesia is a collective of language enthusiasts from around the archipelago coming together to celebrate diversity.",,1 checked out of 1,,,,,,1,,,No ID,"3,105,000 (2000 census).","Austronesian, Malayo-Polynesian, Malayo-Chamic, Malayic, Malay",,,"This video was recorded by Fiel Sahir in Yogyakarta, Indonesia, where he met Ihsan and Septiadi at a Polyglot Indonesia Jakarta meetup event. Musi, also known as Palembangese, is spoken by more than three million people, primarily in the Indonesian province of South Sumatra. It is a member of the Malayan family of languages, and is therefore also known as ‘Palembang Malay’ for the city of Palembang, the capital of South Sumatra. It is also called Basa Pelembang Sari-sari and Sekayu. Having emerged in the 18th century CE as the language of Javanese settlers in Sumatra, Musi shares vocabulary with Javanese. In recent decades, it has emerged as a lingua franca for much of South Sumatra, which, like other Indonesian provinces is linguistically diverse.",Eurasia,,2017-9-2,Jakarta Special Capital Region_ID, +Ayu_20170823_jav,Ayu_Assyamsi_20170823,Fiel_Sahir_20170609,8/23/2017,Screen Shot 2017-12-07 at 6.50.11 PM.png (https://dl.airtable.com/JUb8ElVWRU68LzrznAZZ_Screen%20Shot%202017-12-07%20at%206.50.11%20PM.png),Ayu_20170823_jav.jpg (https://dl.airtable.com/qFrRSxZtTCuDOfz3O5gH_Ayu_20170823_jav.jpg),jav,,Javanese,Javanese (Multiple Variaties) ,,,Indonesia,12/24/2017,Public,CC BY-NC 3.0,,,,,"Polyglot Indonesia National Gathering Yogyakarta 2017 + +""Ayu said she's more than happy to transcribe and if not we can find people who will do it. Slight problem is that dialects are often considered not ""proper"" for writing with the native script so it may or may not be hard. REMIND ME!! """,,1 checked out of 1,,,,,,1,,gs3rmilVQLM,https://youtu.be/gs3rmilVQLM,"84,300,000 in Indonesia (2000 census). 25,000 in south Sulawesi, and 69,000,000 on Java, 500,000 of them being in Banten region and 2,500,000 in Cirebon region of Java. Population total all countries: 84,308,740.","Austronesian, Malayo-Polynesian, Javanese",,,"This video was recorded by Fiel Sahir in Yogyakarta, Indonesia, where he and Rama met at a Polyglot Indonesia Jakarta meetup event. Javanese is spoken by more than 80 million people, principally on the island of Java in Indonesia, and by diaspora communities worldwide. A literary language since at least the fifth century CE, Javanese has been written using three writing systems: the Latin and Arabic alphabets, as well as a native Javanese script of Indian and Aramaic influence. The language emerged in its modern written form with the rise of the Mataram Sultanate in the 16th century CE, and is among Wikipedia's 100 most-used languages today. An Austronesian language, Javanese is most closely related to Malay, Sundanese and Balinese, and more distantly so to Chamorro and Kiribatese.",Eurasia,,2017-9-2,Jakarta Special Capital Region_ID, +Sita_20151201_mqy,Sita__20151201,Athina_Ardhyanto_,12/1/2015,mqy-thumb-raw.png (https://dl.airtable.com/WqeMAvt6SFKzQzPEEj1a_mqy-thumb-raw.png),Sita_s1_F_20151201_mqy.jpg (https://dl.airtable.com/8Kjog2SFRmy1ZULqXqeq_Sita_s1_F_20151201_mqy.jpg),mqy,,Manggarai,Wae Rebo Manggarai,,,Indonesia,2/16/2016,Public,Standard,,,,,,,1 checked out of 1,,10,,,,1,checked,fZmLy_Acth8,https://youtu.be/fZmLy_Acth8,900000,"Austronesian, Malayo-Polynesian, Central-Eastern Malayo-Polynesian, Bima-Lembata",Austronesian,§Wae Rebo Manggarai,,Eurasia,,2015-12-1,, +Argo_20150418_ind,Argo_Cayhadi_20150418,Argo_Cayhadi_20150418,4/18/2015,argo.png (https://dl.airtable.com/VlZysNoSRqZWtFhPqPwI_argo.png),Argo_s1_M_20150418_ind.jpg (https://dl.airtable.com/xfepF0vcTUKFA6tMUoU0_Argo_s1_M_20150418_ind.jpg),ind,,Indonesian,,,,Indonesia,4/18/2015,Public,CC BY-NC 3.0,,checked,"Halo semua, apa kabar? Saya Argo, Saya dari Indonesia, saya disini berbicara dalam Bahasa Indonesia yang dipakai kurang lebih 90% (sembilan puluh persen) dari seluruh penduduk Indonesia yang kurang lebih berjumlah 240.000.000 (dua ratus empat puluh juta) orang, atau kurang lebih penuturnya sekitar 200.000.000 (dua ratus juta) orang, dan juga dipakai oleh 5.000.000 (lima juta) orang Indonesia yang tinggal di luar negeri. Bahasa ini disepakati ketika Sumpah Pemuda tahun 1928 (seribu sembilan ratus dua puluh delapan) yang ketika itu disepakati sebagai bahasa nasional (dan) bahasa persatuan karena Indonesia terdiri dari berbagai macam kultur dan etnik, menggantikan bahasa melayu yang ketika itu dipakai sebagai bahasa administrasi atau perdagangan oleh pemerintah Belanda. Hal ini kemudian diperkuat ketika Indonesia merdeka 17 (tujuh belas) Agustus 1945 (seribu sembilan ratus empat puluh lima), dibentuklah Undang-Undang Dasar yang ketika itu menyepakati bahwa Indonesia memiliki identitas diantaranya adalah Bendera Merah Putih, Bahasa Indonesia, Lagu Kebangsaan Indonesia Raya, dan juga Lambang Negara Garuda Pancasila, serta Semboyan Negara Bhineka Tunggal Ika. Untuk yang belum mengetahui tentang Indonesia sendiri, Indonesia adalah negara kepulauan, terdiri dari (kurang lebih) 17.000 pulau, membentang dari Aceh hingga (pulau) Papua (bagian) Barat. Mungkin kalau masyarakat di seluruh dunia lebih mengenal Bali daripada Indonesia sendiri, karena Bali merupakan salah satu tempat pariwisata. Bali merupakan salah satu dari 34 Provinsi yang ada di Indonesia. Karena kami terdiri dari berbagai macam etnik, kita selalu berpegang pada semboyan negara kami, yaitu Bhineka Tunggal Ika yang artinya berbeda-beda tetapi tetap satu. Perkembangan tata bahasa dan linguistik, terutama di bahasa Indonesia, sejak masa kolonial sangat berkembang sekali, terutama karena lima tahun sekali para ahli-ahli bahasa di Indonesia menyelenggarakan kongres Bahasa Indonesia, yang di situ menghasilkan beberapa kesepakatan penting, seperti pada tahun 1972 (seribu sembilan ratus tujuh puluh dua) itu disepakati tentang ejaan (baku), terutama ejaan yang kita pakai hari ini, yaitu Ejaan Yang Disempurnakan, kemudian tahun 1988 (seribu Sembilan ratus delapan puluh delapan), dibentuklah Kamus Besar Bahasa Indonesia. Selain Bahasa Indonesia sendiri sebetulnya seluruh Warga Negara Indonesia hampir bisa dibilang mayoritas juga berbicara dalam bahasa etniknya masing-masing yang berjumlah lebih dari 700 (tujuh ratus) bahasa. Seperti yang telah saya sebutkan tadi, Bahasa Melayu yang dulu sempat dipakai ketika pemerintah kolonial Belanda, saat ini juga tetap masih dipakai terutama di bagian pesisir timur (pulau) Sumatera, kemudian di pesisir barat (pulau) Kalimantan, serta di Negara tetangga seperti Malaysia, Singapura, dan Brunei Darussalam. Karena saya sendiri, orang tua saya dari suku Jawa, maka saya juga bisa berbicara dalam Bahasa Jawa, dimana Bahasa Jawa sendiri dipakai kurang lebih 40% (empat puluh persen) oleh penduduk Indonesia (atau) kurang lebih 80.000.000 (delapan puluh juta) orang. Kemudian bahasa Sunda, juga karena saya tinggal di Bandung, Bahasa Sunda adalah bahasa etnik yang dipakai di sini oleh suku Sunda, kurang lebih dituturkan oleh hampir 38.000.000 (tiga puluh delapan juta) orang. Bahasa Indonesia sendiri sebetulnya terbentuk dari berbagai macam kosakata (bahasa) yang ada di seluruh dunia, terutama Portugis, Belanda, China, Arab, Melayu, Bahasa Inggris, dan juga dari Sanskrit atau Sansekerta. Kemudian juga banyak sekali kosa kata dari bahasa daerah yang pada akhirnya dipakai dalam bahasa Indonesia. Mungkin kata-kata dari Bahasa Portugis yang saya tahu diantaranya adalah Gereja, Bangku, Dansa, Garpu, Lemari, Roda, dan juga Sepatu. Kemudian di dalam Bahasa Belanda, banyak sekali kosakata bahasa belanda yang kita pakai juga, yang sampai hari ini pun masih kita sering dengar sehari-hari diantaranya Abonemen, Persneling, Verboden, Karcis, Indekost, Prasmanan, Kulkas, dan lain-lain. Sebetulnya seperti berbagai macam bahasa di dunia, kita juga punya tata bahasa resmi dan juga untuk sehari-hari kita berbicara dalam bahasa yang tidak resmi bahkan tidak jarang pakai bahasa “slang” atau bahasa pergaulan. Dan bahasa pergaulan sendiri pun berbeda-beda antar kota, misalnya kalau di kota-kota besar seperti Jakarta, Bandung, Semarang, Surabaya, Medan, Palembang, Makassar, Jogja, itu semua masing-masing dipengaruhi oleh dialek etniknya masing-masing. Jadi kadang-kadang bahasa slang atau bahasa pergaulan yang kita temui di Jakarta belum tentu dimengerti oleh teman-teman yang ada di Bandung dan sebagainya. Di tingkat Internasional bahasa Indonesia dipakai di kurang lebih 45 (empat puluh lima) Negara di dunia, terutama oleh orang-orang Indonesia yang tinggal di luar negeri, kemudian menurut beberapa sumber, mulai banyak dipelajari di Australia dan juga Vietnam, kemudian pemerintah Indonesia kabarnya (akan) mengusahakan bahasa Indonesia menjadi salah satu bahasa Internasional di Perserikatan Bangsa-Bangsa dengan mempertimbangkan kemapanan bahasa, jumlah penuturnya yang mungkin lebih dari 300.000.000 (tiga ratus juta) orang, dan juga kepopulerannya di tingkat Internasional. Jadi apakah kalian tertarik untuk belajar Bahasa Indonesia?","Hello all, how are you? I’m Argo, I’m from Indonesia. Here I am speaking in Indonesian which used by approximately 90% from all of 240,000,000 Indonesian residents, or approximately spoken by 200,000,000 persons, and also used by 5,000,000 Indonesians living abroad. This language was agreed on the youth pledge congress in 1928, when it is agreed as the national language and the language of unity because Indonesia consists of various tribes and ethnics, replacing Malay language as it used as the language of administration and trade by Dutch government. This was later confirmed when Indonesia became independent on August 17th, 1945, then formed the Constitution which was agreed that Indonesia has the identity: the Red and White Flag, Indonesian Language, Anthem Indonesia Raya, and also the State emblem of Garuda Pancasila, as well as the state motto of Bhineka Tunggal Ika. For who do not know about Indonesia, Indonesia is an archipelago, consisting of (approximately) 17,000 islands, stretching from Aceh to (Western island of) Papua. Perhaps if people around the world know more about Bali than Indonesia itself, because Bali is one of the tourist places. Bali is one of the 34 province in Indonesia. Because we consist of various ethnic, we have always adhered to the motto of our country, Bhineka Tunggal Ika, which means unity in diversity. The development of grammar and linguistics is highly evolved since the colonial period, especially on Indonesian language congress that involved Indonesian language expertise every five years, in which resulted in several important agreements, such as in 1972 was agreed on (formal) spelling, especially spelling we use today, called Ejaan Yang Disempurnakan (Enhanced Spelling), then in 1988 they formed Indonesian Big Dictionary. Besides Indonesian, the majority of Indonesian citizen also could speak their own ethnic language, which accounted for more than 700 language. As I mentioned earlier, Malay who once had worn when the Dutch colonial government, today is still used especially in the east coast (island of) Sumatra, also on the west coast (island of) Kalimantan/Borneo, as well as in neighboring countries such as Malaysia, Singapore and Brunei Darussalam. Because of my own, my parents from the Javanese, then I can also speak in Javanese, where the Java language itself used approximately 40% of the population of Indonesia (or) approximately 80,000,000 people. Then Sundanese, also because I live in Bandung, Sundanese are ethnic languages spoken here, which is spoken by nearly 38 million people. Indonesian itself is actually made up of a wide range of vocabulary (language) that exist throughout the world, especially the Portuguese, Dutch, Chinese, Arabic, Malay, English, and also from the Sanskrit. Then also a lot of the vocabulary of the ethnical language that ultimately used in Indonesian. Perhaps the words of Portuguese that I know of which is the Igreja (Church), Banco (Bench), Dança (Dancing), Garfo (fork), Armário (Wardrobe), Roda (Wheel), and also Sapatos (Shoes). Later on in Dutch, a lot of vocabulary that we use the Dutch language as well, which to this day still we often hear them everyday such as Abonnement (Subscription), Versnellings (Gearboxes), Verboden (Forbidden), Kaartje (Tickets), Indekost (Boarding House), Fransman (Buffet), Koelkazt (Refrigerator), and many others. Actually, like many languages in the world, we also have a formal grammar and also informal form for everyday speaking. We also used ""slang"" language or lingua franca. And lingua franca itself also vary between cities, for example if in big cities such as Jakarta, Bandung, Semarang, Surabaya, Medan, Palembang, Makassar, Yogyakarta, it all each influenced by ethnic dialects respectively. Sometimes slang language or lingua franca that we encountered in Jakarta is not necessarily understood by friends in Bandung and so on. In International level, Indonesian used in approximately 45 countries in the world, mainly by the Indonesian people who live abroad, and according to some sources, ranging widely studied in Australia and also Vietnam. Then the Indonesian government reportedly (will) seek Indonesian become one of the international language in the United Nations, considering the reliability of the language, the number of speakers who may be more than 300,000,000 people, and also its popularity at international level. So, are you interested to learn Indonesian?",,Get a free Indonesian lesson with italki: http://promos.italki.com/wikitongues_ind,1 checked out of 1,checked,,Facebook,2016-5-31,https://www.facebook.com/wikitongues/videos/1122690891128770/,1,checked,M5alRFKK43Y,https://youtu.be/M5alRFKK43Y,"22,800,000 in Indonesia (2000), increasing. Population total all countries: 23,200,480. L2 users: 140,000,000 in Indonesia.","Austronesian, Malayo-Polynesian, Malayo-Chamic, Malayic, Malay",Austronesian,"Indonesian,,,,,",,Eurasia,,2015-4-18,, +Julius_20151020_bbc,Julius__20151020,Argo_Cayhadi_20150418,10/20/2015,julius-bbc-thumb.png (https://dl.airtable.com/T68WVwWPTPyQwDNrhcPA_julius-bbc-thumb.png),julius-bbc-thumb.jpg (https://dl.airtable.com/xILtc7hyRzuCH7V8em1r_julius-bbc-thumb.jpg),bbc,,Batak Toba,,,,Indonesia,10/20/2015,Public,CC BY-NC 3.0,,checked,"Horas! Goarku Julius Siregar, ahu sian Medan, Jala di si ma ahu tubu, di Medan i. Ahu halak Batak, jadi na hu pakkeon ima hata Batak, Batak toba lebih tepatna, ala di Batak adong tujuh sub-etnik: Batak Toba, Batak Karo, Simalungun, dohot na lainna. Jadi, anggo na hu dokkon sinangkina ni: Horas, ima sebenarna hata sapaan na dipakke anggo pajumpang tu halak na asing manang naeng manjou halak. ima nanidokna Horas. Ahu tubu di Medan, ale intor pinda muse tu huta ima di Samosir, jala di si ma ahu balga. Di sima ahu dohot bapakku dohot omakku tinggal sahat muse anon balek tu Medan. Jadi ahu marga Siregar, bapakku pe marga Siregar. Ala di halak Batak, marga ibuat sian garis bapa dang garis omak. Jala omakku marga Sinaga, ale anggo di halak Batak marga di borua dang di dokkon marga Sinaga ale boru Sinaga. Jadi Bapakku marga Siregar dohot omakku boru Sinaga. Anggo di hami sakaluarga adong tolu itoku jala sada abangku manang hahaku. Jadi lima ma hami sude. Anggo di halak batak adong ma na di dokkon Tarombo. Tarombo ima partuturan ni halak batak tu halak na asing. Jadi molo pajumpang tu halak di halak Batak an apalagi di huta an, molo pajumpang dang goarna parjolo di dokkon. molo marsitandaan tu halak na parjolo di dokkon ima margana. marga aha au? marga aha i mana? Dung isi ma hami boi marsitandaan, jala di si ma hami boi martutur, diboto hami tarombo nami masing-masing. Jala diboto hami ma manjou aha tu dongan nami. Misalna pajumpang tu marga Siregar, hu dokkon annon Appara. Pajumpang tu marga Nainggolan hu dokkon annon Appara. Molo pajumpang ahu tu marga Sinaga, ala omakku Sinaga intor hu boto ma manjou aha, manjou Tulang, ala manjou Opung. Songon i ma partuturan manang panjouion di halak Batakan. Dungi, asing ni i adong muse na didokkon Amangboru, Bapatua, Tulang. I, ro ma i sian partuturon-partuturon sinangkinani sian partuturan ni marga jala tu partuturon ni keluarga. Molo adong nangkin keluarga baoa sian omakku, intor hu jou ma i tulang. Na dialap ni Tulang, ima na hu jou Nantulang. Molo adong muse keluarga baoa sian bapa ima na hu jou Bapatua manang Bapauda. Bapatua ima haha ni bapaku, Bapauda ima anggini bapaku. Ale anggo ito ni bapaku, ima na hu jou Namboru jala na mangalap Namboru ima Amangboru. Songoni ma jo hira-hira partuturani halak Batak. Muse, molo di halak Batak adong sada adat na porlu taboto ima na didotna Dalihan Na Tolu. Dalihan Na Tolu ma adat na paling timbo di halak Batak. ima nanidok: Somba mar Hula-hula, elek marboru manang / jala manat mardongan tubu. Somba marhula-hula ima lapatanna: Ikkon ta somba, ta hormati jala ikkon ta burju-burjui ma tu hula-hula ta, ala sian i ma annon ro pariban ta sude. Hula-hula i ma sude pinompar ni sian oma, sian pihak boru-boru, sian inong ta. Ima na tadokna tulang. adong ma di si Tulang Rorobot, adong ma di si Tulang Mataniari, ima sude halak ima hula-hula. Dungi, adong na didokna elek marboru jala adong sada nai manat mardongan tubu. Ima anggo di adat ni halak Batak diparpestaan manang di hangoluan ni halak Batak di sadari manang di hangoluan ni siapari. Di halak Batak, adong muse na didokni pelengkap adat di si ma adong tarian, di si ma adong musik. Tarian anggo di halak Batak ima na nidokni Tortor. Anggo didokkon Manortor, ima tarian na adong di halak Batak an na dipakke biasana di pesta, manang hamatean, adong hatutubuon, manang adong na mangoli manang di sude pesta pasti adong na didokna manortor. Ala i do salasada identitas ni halak Batak, Manortor. di si ma adong sude upacara, di si ma adong paruning-uningan. Paruning-uningan i ma anggo na ta boto di basa modern Musik, Uning-uningan ma didokkon di halak Batak an. Adong uningan-uningan bolon, adong uningan gondang hasapi. I ma sude na adong di halak Batak an. Jadi songon i ma jo na boi hu patupa na boi hu dokkon, na boi hu patorangkon jala na hu pakke di hata Batak on. Mauliate. Horas!","Horas, my name Julius Siregar, I am from Medan (North Sumatera - Indonesia), And there is (also) where i was born, in Medan. I am Batak people, so, what I am using (to speak) now is Batak language, precisely Batak Toba. Because there are seven sub-ethnic of Batak: Batak Toba, Batak Karo, Simalungun, with the others. So what I have mentioned earlier: Horas, that's actually the word used for greeting when meet with other people, or when calling people. That's Horas. I was born in Medan, then immediately moved to the village, in Samosir (North Sumatera - Indonesia), and I grew up there. There is where I lived along with my father and my mother, then later we back again to Medan. So, I am Siregar clan, my father was Siregar clan. Because in Batak culture, clan lineages taken from father, not from mother. My mother clan is Sinaga, but in Batak, clan for (married) women are not referred as Sinaga, but (we called) Boru Sinaga. So for my father's clan title is Siregar, and my mother is Boru Sinaga. In my family, I have three older sisters, and one brother. we are five brothers. In Batak people, there's something called ""Tarombo"". ""Tarombo"" is about how we (Batak people) speaks to the others (based on clan tree or Genealogy). So, when Batak people meet each other especially in villages, we did not introduce the name on the encounter. When we introduced ourselves, the first to be said is clan. What clan I was? and what his/her clan? after that we can know each other. And there we were able to speak and adjust based on ""Tarombo"" respectively. So that we know what we should call to each other. For example, when meeting with Siregar clan, I'll call him ""Appara"". Met with Nainggolan clan (still close clan relation on genealogy), I also call ""Appara"". If met with Sinaga clan, because my mother also Sinaga, I immediately know what to call, that should call ""Tulang"" or ""Opung"". That's how to speak or how to determine the call in Batak peoples. In addition to that, there is also a call like ""Amangboru"", ""Bapatua"", ""Tulang"". All calls had come from the lineage clan linked to the family lineage. if there is a family man from the mother, I have to call him ""Tulang"", and ""Nantulang"" is Tulang's wife. If there is also a family man from the father, who should I call it with ""Bapatua"" or ""Bapauda"". Bapatua is the elder brother of the father, while Bapauda is the younger brother of the father. But for all the sister from the father, I called her ""Namboru"", and her husband I called ""Amangboru"". That's more or less how to speak in the Batak. Then there is a traditional Batak custom we need to know, which is called ""Dalihan na Tolu"" (three feet firebox). It is the highest custom of Batak people, which consists of: ""Somba mar Hula-hula"", ""Elek marabou"", and ""Manat Mardongan Tubu"". Somba Mar Hula-hula means we must raise, respect, and must be nice to Hula-Hula, because of the Hula-hula was all Pariban (future wife) would come. Hula-hula is all male relatives of the mother. They are the ones that we call ""Tulang"" (Uncle). There is a term ""Tulang Rorobot"" (Uncle from wife, Uncle from Uncle's wife from Mother relations), and also the term ""Tulang Mataniari"" (Uncle from far relatives from mothers). All that known as ""Hula-hula"". Then there are a term ""Elek Marboru"" (persuade/ask nicely with a sister/female relatives), and another one ""Manat Mardongan Tubu"" (live in harmony with a related friends or friends with same clan). That is the customary in Batak people both in the celebration/party also in everyday life. For Batak people, there is also something that complete our customary: the dance and music. dances of Batak people called ""Tortor"". If we said ""Menortor"", that means dancing which Batak people are usually used at the celebration/party, either party of death, birth or wedding, or at all existing celebration/parties. because that's one of the identity of the Batak people, namely Manortor. In ceremony and party there is something we called Paruning-uningan. Paruning-uningan in modern language we know as music. There are Uning-uningan Bolon (big/complete ensemble music), and also Uningan Gondang Hasapi (set of musical instruments without percussion). That's all ours life as Batak people. So that is what i can tell, inform, and explained, and everything I speak in Batak language. Thank you. Horas!","Poor audio quality + +",,1 checked out of 1,,,,2016-8-4,,1,checked,SSOxL2VRIeE,https://youtu.be/SSOxL2VRIeE,"2,000,000 (1991 UBS).","Austronesian, Malayo-Polynesian, Northwest Sumatra-Barrier Islands, Batak, Southern",Austronesian,"Batak Toba,,,,,",,Eurasia,,2015-4-20,, +IbnuSinaSam_20151029_bjn,IbnuSinaSam__20151029,Argo_Cayhadi_20150418,10/29/2015,ibnusinasam-bjn-thumb-raw.png (https://dl.airtable.com/Ex3mKn6TU65oEZfWp8Ol_ibnusinasam-bjn-thumb-raw.png),saro-nyf-thumb.jpg (https://dl.airtable.com/YqZdVaSWSyuHlbQNuMbl_saro-nyf-thumb.jpg),bjn,,Banjar,,,,Indonesia,10/29/2015,Public,Standard,,,,"Assalamualaikum for all my friends, my name is Ibnu Sina Sam, originally from Banjarmasin (Kalimantan Selatan/South Borneo, Indonesia), precisely from Regency of Hulu Sungai Tengah (Barabai), District of Pandawan, Jatuh Village. Because I'm Banjarmasin people, I speak Banjarese, which used as everyday language in Banjarmasin. Banjarmasin (people) religion majority here is Islam, even some others also exist. We have two (big) ethnic group here in Banjarmasin: Dayak and Banjar. I'm a mix-blood descent from my Dayak mother and Banjar father, but our everyday language at house is Banjarese. Banjarmasin in Kalimantan Selatan well-known as river (delta) city. But actually not only river, we also have hilly/mountain area here. As Banjarese, we can distinguish between mountain people and river people from the way they walk. First, mountain people, usually from Dayak (ethnic group), they always walk tandem and in-line when they go anywhere such as market. Why is it? It is because they used to walk in mountain footpath. Second, river people, to differentiate them with mountain people, they usually swinging their hands cause they used to paddling boat/canoe. For everyday life, most of Banjarese are (rice) farmers, harverster, and dry-field farmers. There are also some of rubber tappers, chili, tomato, and so on. Rarely who works as fisherman. But recently we have some issues here, such as coal mining, which harm our land. The next problem is crude palm oil (company) plantations, cause they consume huge amount of water from the ground, causing dry soil even outside the plantation. As a result, the crops that farm by people not get enough water to nurture their lands. In here the special and famous dishes here are Ketupat Kandangan (a coconut leaf wrapped steamed rice dish with coconut milk soup, can be served with either chicken or snakehead fish meat), and Soto Banjar (kind of soup). If you going there you must try that two dishes. Moreover if you eat that in floating market (in Muara Kuin, Barito river), on the traditional boat. But you should deal with the tide, cause if you can't handle it, you will vomit. Beside dishes, another famous (place) here is Martapura, the gemstone center, from agate to diamond. Other things that unique here, if in Java (island) they have Batik pattern fabrics, in here we also have pattern fabrics called Sasirangan. That's all the story from me, thank you very much, Assalamualaikum. Wr. Wb.","Video from Bandung, Indonesia + +",,1 checked out of 1,,,,,,1,checked,y3RQlAZSNfk,https://youtu.be/y3RQlAZSNfk,"3,500,000 in Indonesia (2000 census), increasing. Population total all countries: 3,505,000.","Austronesian, Malayo-Polynesian, Malayo-Chamic, Malayic, Malay",Austronesian,"Banjar,,,,,",,Eurasia,,2015-9-14,, +Darma_20151217_min,Darma__20151217,Argo_Cayhadi_20150418,12/17/2015,darma-min-thumb-raw.png (https://dl.airtable.com/RuSJz6WTsyDJV9ZYYdlT_darma-min-thumb-raw.png),Darma_s1_M_20151217_min.jpg (https://dl.airtable.com/37soTPT9S26xBccSMA20_Darma_s1_M_20151217_min.jpg),min,,Minangkabau,,,,Indonesia,1/21/2016,Public,CC BY-NC 3.0,checked,,,"My name is Darma, I am Minang(kabau) people. I was born in Bukittinggi, but I grow up in Padang (West Sumatra, Indonesia). What is Minang/Minangkabau? Minangkabau is one of three or two ethnical group (in the world) who still embrace matrilineal culture. That means as Minang people, our genealogy is passing down from mother line, so that the tribe head or usually we called Panghulu is from mother descent. Minang people well known as nomad/settled foreigner who live anywhere. In Java, Kalimantan, Sulawesi, Malaysia, Brunei, Japan, even Britain, Minang people are exist. They usually work as traders, selling rice (food stall) as you can see everywhere, there are lot of Nasi Padang (Padang ethnic food) restaurant everywhere (mostly in Indonesia big town/city). Some say that Padang restaurant also exist in Japan. That's why lot of people said that Minang people are well known as traders. Besides opening restaurant, cloth trade/tailor, anything possible works will be done by Minang people for living. Minang people have a philosophy: ""Alam takambang jadi guru"" (Nature evolved as teacher). What is that mean? It's mean that anything happens in nature, we can get the lesson from it. For example bamboo with cliff. Bamboo and cliff are tied up together. Bamboo supporting cliff from landslide, and cliff provide soil for bamboo to live. It means in life we should support each other. Minang people also like to tell a story or tale. If you chit-chat with Minang people it will takes all night non stop. That's why the legend story, Tambo (Minang wisdom), or Kaba (Minang literature/poem), rarely recorded in writing. They spread by word of mouth usually by poem accompanied by Saluang (bamboo flute) and Rabab (traditional violin) which will takes all night long. The unique thing in Minang language is we do not have language level as other ethnical group spoke adjusting whom they speak with. The difference only on (subjects) pronouns, for example Ambo (I), used in formal occasion or speaking with older people. But if we speak with friends or in equal position, we use Aden. Also Kamu (You, in formal occasion) can be replaced by Wa'ang (in casual conditions). Or if in formal condition, It's better to call the name. That's all from me, thank you!","Video from Bandung, Indonesia",,1 checked out of 1,,1,,,,1,checked,8n-c4DIqBuw,https://youtu.be/8n-c4DIqBuw,"5,530,000 (2007). 500,000 in Jakarta.","Austronesian, Malayo-Polynesian, Malayo-Chamic, Malayic, Malay",Austronesian,§,,Eurasia,,2015-9-22,, +Thressia_20151201_row,Thressia_Tamelan_20151201,Argo_Cayhadi_20150418,12/1/2015,thressia-row-thumb-raw.png (https://dl.airtable.com/WMXFtM9eTfCxn0VfZD3a_thressia-row-thumb-raw.png),thressia-row-thumb.jpg (https://dl.airtable.com/DHLsxfqXQ4S7DpgYcApT_thressia-row-thumb.jpg),row,,Dela-Oenale,Dela,,,Indonesia,2/20/2016,Public,CC BY-NC 3.0,checked,,,,,,1 checked out of 1,,12,Facebook,2016-8-16,https://www.facebook.com/wikitongues/videos/vb.408106989253834/1173637662700759/?type=2&theater,1,checked,8v2n3lBibWk,https://youtu.be/8v2n3lBibWk,"7,000 (2002 UKAW).","Austronesian, Malayo-Polynesian, Central-Eastern Malayo-Polynesian, Timor-Babar, Nuclear Timor, Rote",Austronesian,§Dela,,Eurasia,,2015-12-1,, +Mazhar_20160515_bug,Mazhar__20160515,Argo_Cayhadi_20150418,5/15/2016,Screen Shot 2016-07-25 at 4.26.57 PM.png (https://dl.airtable.com/5k2shbx5Rqa9xgCZevUc_Screen%20Shot%202016-07-25%20at%204.26.57%20PM.png),Mazhar_s1_M_20160515_bug.jpg (https://dl.airtable.com/kLS9FDx9TAeHzb03dJNV_Mazhar_s1_M_20160515_bug.jpg),bug,,Bugis,,,,Indonesia,7/18/2016,Public,Standard,,,,,,,1 checked out of 1,,,,,,1,,vistydJ8zRM,https://youtu.be/vistydJ8zRM,"5,000,000 in Indonesia (2000 census), increasing. Population total all countries: 5,017,800. L2 users: 500,000 in Indonesia.","Austronesian, Malayo-Polynesian, South Sulawesi, Bugis",Austronesian,§,,Eurasia,,2016-5-16,, +Ryan_20160415_yol,Ryan__20160415,Ryan__20160415,4/15/2016,,Ryan_s1_M_20160415_yol.jpg (https://dl.airtable.com/MEgN0fu6Qb2iyDcaPY72_Ryan_s1_M_20160415_yol.jpg),yol,,Yola,,,,Ireland,4/20/2016,Public,Standard,,,"Fade teil! Fade ich taalke gist bi Yola, a deed Germanish taalke spak amang the gurles o' inglis sattlers i Baronies Fourthe an Bargy fho avancit aamzil Irishmen. Mi zpeechcraft bi drazed, ich be wafur an cornee, so ich gist reade dhrugh a dhingeen vreem a...letter? Ich kente nocht zei letter! A letter; vreem the fowk o Fourthe t'ye General Governor y'Ireland, Constantine Harrie Phipps.","Hello! What I speak now is Yola, an extinct Germanic language spoken among English colonists in Barony Forth and Bargy in the east of Ireland who came to regard themselves as Irishmen. My knowledge of it is threadbare and I don't feel comfortable speaking it, so I read now a small excerpt from a...'letter'? I don't know the word for 'letter'! Anyway, a letter from the people of Forth written to the General Governor of Ireland, Constantine Henry Phipps.",,,1 checked out of 1,,,,,,1,checked,RJ9-r7owNrI,https://youtu.be/RJ9-r7owNrI,,,,§,,Eurasia,,2016-4-18,, +Nir_20160502_heb+rus,Nir__20160502,Teddy_Nee_20141005,5/2/2016,Screen Shot 2016-12-19 at 09.34.45.png (https://dl.airtable.com/d2DgMY9bQuekZ4pfTuuE_Screen%20Shot%202016-12-19%20at%2009.34.45.png),Nir_s2_M_20160502_heb+rus.jpg (https://dl.airtable.com/sknRb4lGSC2CjIb8Y2C0_Nir_s2_M_20160502_heb%2Brus.jpg),"heb,rus",,"Hebrew, Russian",,,,Israel,12/26/2016,Public,Standard,,,,,,"Get a free Hebrew lesson with italki: http://promos.italki.com/wikitongues_heb, Get a free Russian lesson with italki: http://promos.italki.com/wikitongues_rus",2 checked out of 2,,99,,,,2,,MRjC-OyprJU,https://youtu.be/MRjC-OyprJU,"4,850,000 in Israel (1998). Spoken by all Israelis as L1 or L2. Some who use it as L1 now in Israel learned it as L2 originally. Population total all countries: 5,302,770., 137,000,000 in Russian Federation (2010 census). Population total all countries: 167,332,230.","Afro-Asiatic, Semitic, Central, South, Canaanite, Indo-European, Slavic, East",Afro-Asiatic,§,,"Eurasia, Eurasia, Eurasia",,2016-5-4,, +Stefano_20180105_nap,Stefano_Carulli_20180105,Stefano_Carulli_20180105,1/5/2018,Stefano_20180105_nap.png (https://dl.airtable.com/HQxrn9VpQiuobh0HsDau_Stefano_20180105_nap.png),,nap,ita,Napoletano-Calabrese,Abruzzese,,,Italy,1/27/2018,Public,CC BY-SA 4.0,checked,,,,"Crecchio +",,1 checked out of 1,,,,,,1,,tvNW5-lnx0g,https://youtu.be/tvNW5-lnx0g,"5,700,000 (2002).","Indo-European, Italic, Romance, Italo-Western, Italo-Dalmatian",,,"This video was recorded by Stefano Carulli in Crecchio, Italy. Abruzzese is spoken by as many as 1.3 million, primarily in the Italian region of Abbruzzo. It is a variety of the Neapolitan language, which is sometimes described by linguists as Napoletano-Calabrese and is spoken by as many as 5.4 million people across the southern regions of continental Italy. It is also spoken by diaspora communities worldwide, particularly in the Americas. It has been a literary language since at least the 16th century CE, when the author Giambattista Basile was active. Though Neapolitan remains unrecognized by the Italian government and absent from public school curricula, it still features prominently in popular music, including the works of the late singer-songwriter Pino Daniele, who passed away in 2015. ",Eurasia,,2018-1-5,Abruzzo_IT,https://www.dropbox.com/sh/se2qqc0grd25d2g/AABpdxjoD0Mp3yulA_qW86wqa?dl=0 +Simon_20160128_pms,Simon__20160128,Simon__20160128,1/28/2016,simon-pms-thumb-raw.png (https://dl.airtable.com/4kw7P71xTr6jsyFBweQS_simon-pms-thumb-raw.png),simon-pms-thumb.jpg (https://dl.airtable.com/nBSnNgQBSjq83XeGrSSd_simon-pms-thumb.jpg),pms,eng,Piemontese,,,,Italy,2/2/2016,Public,Standard,,checked,"PIEDMONTESE:Cerea, mi im ciamo Simon, i l'hai vintun agn, i son dla Provinsa 'd Turin e la lenga ch'i parl as ciama piemontèis, ch'a l'é na lenga ch'as parla ant ël nòrd-òvest ëd l'Italia, ant na region ch'as ciama Piemont. E i trovreve ch'a l'é na lenga assé diferenta da l'italian,combin che an Italia as preferiss ciamélo mach ""dialèt"", përchè, com i seve bin, quand na lenga a l'é diferenta da n'àutra, as ciama dialèt. E bin, i l'oma decidù che an Italia lecòse a venta capìje nen, alora as decid ëd fé confusion ansima le paròle, parèj la gent a capiss pi gnente… e as oten lòn ch'as veul oten-e ch'a l'é chité tute se lenghe e tuta sta varietà, che ant l'Ëstat italian a l'é (n-a tròpa, e donca i l'oma nen damanca ëd tute ste sità che mincadun-a sità a l'ha soa manera 'd parlé. Alora i l'oma decidù ëd piantéla lì, e 'd fé diferent, e al dì d'ancheuj as parla mach an italian.Mi i ston ëd ca belessì ant la prima sintura-sconda sintura 'd Turin e, për dì, s'i seurt d'antëcà am ven pròpe malfé parlé an piemontèis, përchè a-i é pòca gent ch'a l'é costumà a sente parlé piemontèis da 'n (eul. E al dì d'ancheuj a l'é tacà a essie pròpe la gent ch'a l'ha di(coltà a capìlo, a l'ha di(coltà a capì lòn ch'it ses an camin ëd dì. S'ittire fòra la paròla giusta piemontèisa at capisso nen, anlora it deuve tiré fòra la paròla giusta an italian al pòst ëd la paròla piemontèisa, parèj it l'has na frisa pi dë speransa ch'at capisso, na frisa 'd pi dë speransa ch'a capiran toa esigensa 'd parlé piemontèis e na frisa 'd pi… sai nen. An tùit ij cas lòn ch'i l'oma otnì al dì d'ancheuj a l'é che ant ël nòrd-òvest ëd l'Italia le lenghe locaj as parlo squasi pi nen, mentre se un a va an d'àutri pòst ëd l'Italia le lenghe locaj magara a son na frisa pi arzistente, ma an tùit ij cas a son an camin ch'as perdo, dzortut përchè as mës-cio, tant, talment con l'italian, e l'arzultà a l'é ch'a son dventà lòn ch'a l'ero nen, valadì dle varietà d'italian.Al dì d'ancheuj as podrìo fé 'd ròbe bele, ëd ròbe giuste, ma a-i ventrìa, a-i sarìa damanca d'un pòch ëd sostegn. Ël sostegn a riva nen e a riva nen përchè gnun a veul ch'a riva. E a-i é semper queicòs ëd pi bel, e 'd pi giust e 'd pi bon da fé, an leu ëd salvé la varietà lenghìstica ëd l'Italia. E peui la pipart ëd le përson-e a dis, ma sì parloma an italian! parloma an anglèis! Parloma an cinèis! E peui magara, se pròpe an antëressa, i podoma tiré fòra l'acent, l'acsan, nò? La cadensa e 'l ghëddo. Ël ghëddo piemontèis ch'a l'era 'l caràter dël pòpol piemontèis dla gent ch'a vivìa ambelessì, ch'a l'avìa soa manera 'd fé e i podoma portélo torna an vita ant le comedie, podoma portélo torna an vita… ma nen ant la vita real, d'acòrd? Përchè a l'é na ròba veja, frusta, splufrìa e a-i é pi nen damanca 'd tenla an vita, nò?E peui d'àutre còse ch'a-i é da dì a l'é che ël piemontèis an realtà a l'é nen na lenga dle bale, ant ël sens ch'a-i é dcò na scritura, a-i é na tradission literaria, a l'avìa già coj trat ch'a son tìpich ëd le lenghe ch'a së struturo, Ch'a sërco 'd dzorvive, d'essie! Nò? Epura, gnun a lo sa, e donca se gnun a lo sa i podoma sté fresch. Via, i dovoma mai perdse dë spìrit, i dovoma parlélo dësgenà e serché ëd veje lòn ch'a càpita.I l'hai pensà 'd pijé part al progèt dël Wikitongues giusta për feve scoté 'l son ch'a l'ha sta lenga, che magara a l'é nen comun da sente an gir. E bòn. Cerea, e bondì, e stè bin, e parlè vòste lenghe.","ENGLISH: Hello, my name is Simon, I'm 21, I'm from the Turin Province and the language that I speak is called Piedmontese, which is spoken in north-western Italy, in a region which is called Piedmont. You will (nd that this language is quite di*erent from Italian, even ifin Italy it is preferred to call it a ""dialect"", because, as you can easily guess, when a language is di*erent from another you call it a ""dialect"". Well, we decided that in Italy things do not need to be understood, so words are very confused, and people can't understand anything… so we reached what we wanted to reach, and these languages and the variety is quitted, because the Italian State thinks it is too much, and so we donot need so much original variety, with each town having its own speech. So it has been decided to give up and speak Italian.I live here in the (rst suburb of Turin and if I go out I (nd it very di/cult to speak Piedmontese, because very few people are used at hearing a young person speaking Piedmontese. Nowadays some people really cannot understand it, they (nd it di/culties at undestanding what on earth you are saying. If you use the right Piedmontese word they don't understand you, so you have to use an Italian-like word instead of Piedmontese ones, so you have a little bit more hope to be easily undestood, and also a little bit more hope they will accept your need to speak Piedmontese, I dunno…By the way what we've got at the moment is that in North-Western Italy the local languages are nearly no longer spoken, meanwhile if you got in other places in Italy the local languages may be somehow stronger, but in all cases they are being gradually forgotten, particularly because they are really mixing up with Italian loans, and the result is that they're turning in Italian dialects, even if they weren't.Nowadays good things could be done, rightful things, but it would be necessary some help. None receives any help, and that's because nobody wants it to be. And there is always something more beautiful and rightful and good than rescuing the linguistic diversity proper of Italy.And then most of people says: Yes, let's speak Italian! Let's speak English! Let's speak Chinese! And then only if someone is really into it, we can remember the accent, get it? The accent and the style. The Piedmontese style, meaning the features of the people who inhabited this place, who had its way of life, and we can remember it in comedies, we can bring it back alive… but not in real life, that's the agreement. Because it's old, rusty, decrepit stu* and we no longer need to keep it alive, get it?And then other things that we have to say is the Piedmontese isn't a crappy language at all, because it also has its writing, its literature, and it keeps the features of a language which tries to give itself a structure, an tries to survive, to be there in the world! Isn't it? And yet nobody remembers that, and if nobody knows that we'll be cold… we'll be cold. Nontheless we shouldn't feel beaten, we have to speak it shamelessly and try to see what happens then.I thought to take part to the Wikitongues project in order to let you hear the sound of this language, which may be not very common to hear around. Well, bye bye and havea nice day, be happy and speak you tongue.","From Turin, Piedmont + +",,1 checked out of 1,,4,,2016-6-29,,1,checked,ofWA7ERRwzs,https://youtu.be/ofWA7ERRwzs,"1,600,000 in Italy (2002).","Indo-European, Italic, Romance, Italo-Western, Western, Gallo-Iberian, Gallo-Romance, Gallo-Italian",Indo-European,§,,Eurasia,,2016-2-1,,https://www.dropbox.com/sh/wq16gkpxeufvfe7/AAAH0ncTV8yFUQ8bqWmWB9rGa?dl=0 +Pietro_20140524_lmo,Pietro__20140524,Pietro__20140524,5/24/2014,pietro.png (https://dl.airtable.com/7IZJDZkKT3aH9l5fsHtA_pietro.png),Pietro_s1_M_20140524_lmo.jpg (https://dl.airtable.com/TaxZyvCHQmmbDjq5OOOw_Pietro_s1_M_20140524_lmo.jpg),lmo,,Lombard,,,,Italy,12/4/2014,Public,Standard,,checked,"Bondì a tucc! Mì se ciami Peder (“Pietro” in Italian) e son dree a parlavv in Lombard. +El Lombard che l’è… cosa l’è ‘l Lombard?, disarii vialter; el Lombard l’è ona lengua neolatina ocidental (compagn del Frances, del Spagnoeul, del Portoghes, del Catalan…) che l’è parlada in d’un gross tocch de l’Italia del Nord. Disemm, per vess pussee precis: in de la Lombardia (oviament), in del Piemont oriental, in d’un tocchellin del Trentin e in tutta la Svizzera italiana (donca Canton Tesin e un tocch del Canton Grison). + +Donca l’è parlada in d’un bell tocch de terra. Purtropp al dì d’incoeu l’è dree a sparì. Perchè? +Perchè i sgent che le parlen i sann nò, i creden nò che la sia una lengua: pensen che la sia domà un “dialett”; e ‘l dialett l’è un termen, una parolla che chì in Italia la g’ha minga un significad positiv, perchè gh’è la “lengua” e gh’è ‘l “dialett”. E ‘l dialett l’è, purtropp, una “lengua de serie B”, e donca la g’ha nò importanza, pu de tant. L’è considerada una lengua del passad, una lengua de vegg, una lengua anca un poo “razzista”, purtropp: una lengua per sarrass su in del sò restell inveci che derviss al mond. +Donca purtropp al dì d’incoeu el Lombard l’è parlad semper meno: e soratutt, quell che l’è pussee grav l’è che i nonni e i pader ghe parlen minga in Lombard ai sò nevod e ai sò fioeul. E donca se ris’cia che tra una quai desena d’agn el Lombard el sarà rivad a l’estinzion. + +Mì pensi che ‘l sia proppi un peccad, per tante reson. Prima de tutt perchè l’è sbajad pensà che ‘l sia un dialett, e che ghe sien di lengove de serie A e de serie B: l’è una roba che la sta minga in pee. E poeu perchè pensi che ‘l sia sbajad, che la sia proppi una desgrazzia fà morì una lengua che la g’ha un valor coltural: e numm in Italia semm quanto l’è importanta la coltura, ma anca una lengua l’è coltura, e minga domà la lengua de Statt, ma anca la lengua regional. + +E donca mì hoo scominciad un quai ann fa prima de tutt a imparà el Lombard, perchè mì el savevi nò: mì parlavi domà italian (e lo parlo anche abbastanza bene, diciamo, essendo madrelingua italiano). L’hoo imparad che seri sgiamò grand. E poeu hoo taccad a scrivel, e donca mì tucc i dì scrivi e proeuvi a parlà in Lombard (per quell che poeudi) per cercà de tegnì viva quella lengua chì. +Perchè l’unega manera per tegnì viva una lengua l’è parlalla, l’è dopralla in tutte i ocasion che se pò: provà a parlalla. + +E mì la parli, anca denanz a una videocamera che la me pò minga respond. Però, insomma, mì credi che la sia ‘na bataja giusta e la sia ‘na bataja bella e che la val la pena combattela. E donca voo inanz e speri che insemm a mì ghe sarà tanta oltra sgent. Gh’è sgiamò un poo de sgent che l’è dree a combatt per el Lombard, e per tutte i oltre lengove d’Italia, perchè gh’è anca el Piemontes, el Sicilian, el Napoletan… e via inscì. +Però mì speri che ghe ne sarà anmò pussee. E speri che con quell video chì un quai olter el poeuda interessass a la quistion lenguistega italiana, perchè pensi che la sia proppi vun di lavorà pussee important e pussee bei +per el mè paes, che l’è l’Italia +per la mia region, che l’è la Lombardia +per la mia citaa, che l’è Milan + +donca inanz inscì (almeno per mì: poeu, speri che anca i olter…)! Ciao!","Hi! My name is Peder (Pietro in Italian) and I’m speaking in Lombard, a Western Romance language spoken in a big part of Northern Italy (Lombardy, Eastern Piedmont, Western Trentino, Italian Switzerland). +Unfortunately, Lombard is a seriously endangered language. I think that is a disgrace for our culture. For this reason I’ve learned to speak and write in Lombard, and I’m trying to keep it alive, every day. + +I hope that many other people will understand the importance of this battle. Italian languages (not only Lombard: there are also Piedmontese, Sicilian, Genoese, Neapolitan…) are a very important part of our culture, and we have to save them.",,,1 checked out of 1,,,Facebook,2016-5-12,https://www.facebook.com/wikitongues/videos/1105194492878410/,1,checked,1JWnPIXkXeA,https://youtu.be/1JWnPIXkXeA,"3,600,000 in Italy (2002). Population total all countries: 3,903,000.","Indo-European, Italic, Romance, Italo-Western, Western, Gallo-Iberian, Gallo-Romance, Gallo-Italian",Indo-European,"Lombard,,,,,",,Eurasia,,2014-12-22,, +Gi_20170509_lmo+ita,Gi__20170509,Pau_Mateo_,5/9/2017,Screen Shot 2017-12-07 at 7.15.28 PM.png (https://dl.airtable.com/ECWBm1uITKSjXDeu6f7Q_Screen%20Shot%202017-12-07%20at%207.15.28%20PM.png),Gi_20170509_lmo+ita.jpg (https://dl.airtable.com/l4cL7dlsQnOgXK7KofCO_Gi_20170509_lmo%2Bita.jpg),"lmo,ita",,"Lombard, Italian",,,,Italy,12/31/2017,Removed,CC BY-SA 4.0,checked,,,,,Get a free Italian lesson with italki: http://promos.italki.com/wikitongues_ita,2 checked out of 2,,,,,,2,,myE6g_P44_0,https://youtu.be/myE6g_P44_0,"3,600,000 in Italy (2002). Population total all countries: 3,903,000., 57,700,000 in Italy (ELDIA 2012). Population total all countries: 63,655,047.","Indo-European, Italic, Romance, Italo-Western, Western, Gallo-Iberian, Gallo-Romance, Gallo-Italian, Indo-European, Italic, Romance, Italo-Western, Italo-Dalmatian",Indo-European,§,"This video was recorded by Pau Mateo in Parma, Italy, where he and Gi were traveling at the time. Lombard is spoken by nearly four million people, primarily in the northern Italian regions of Lombardy and Piedmont, as well as in pockets of Switzerland. A Romance language of the Indo-European family, Lombard emerged in the ninth century CE, and is closely related to languages like Catalan, Occitan, and French, all of which developed from the balkanization of the Latin-speaking world. Of these, it is perhaps most closely related to the Ligurian, Piedmontese, and Emilian-Romagnol languages of Northern Italy. A literary language since at least the 13th century CE, Lombard experienced a decline in speakers towards the end of the 20th century thanks in part to government marginalization. Since the dawn of the 21st century, however, a revivalist movement has flourished with Lombard being used in music and popular culture, and even on Wikipedia.","Eurasia, Eurasia, Eurasia",,2017-5-9,Emilia-Romagna_IT, +Paolo_20170727_egl,Paolo_Tirelli_20170727,Paolo_Tirelli_20170727,7/27/2017,,,egl,,Emilian,,"Name: Paolo in Italian, Pavel in my indigenous Language (Emilian/Southern Lombard) + +Language: Emilian Language (specific to the province of Reggio Emilia), otherwise known as Southern Lombard, given that the region is part of the historical region of Lombardy. It belong to the Gallo/Celtic Italic language family. + +Region: +In my home in Reggio Emilia, Northern Italy.",,Italy,,To Upload,CC BY-SA 4.0,checked,checked,"Aloura Beinvgnû, me a sûn Pavel, a gho vintun ân, a sûn ed Rez, ed incœ a vœj parler l' arzân, dialett inclûs int l'emiliân od int al lumbered meridunê, pert dal gråpp Gal Italic, frått ed la sovraposizioun ed l'antigh celt coun al letein, impost da i Rumân quand i ân sœtmëss i noster antenê celt. Dånca i ân atachê a imparer al latein, e cal lavœr ché l'é col cal ghé gniû fœra. +Al brått lavœr l'é cl'é adrê ander in estinzioun, al motîv principel l'é chêr, Prëmm, a somm in pôc, Second , l'é la gloabalizazioun; nisûn al de d'incœ a vœl metters l'é ad imparer e cûltiver la tradizioun di noster etenê, chin ghiven dimåndi, mo i'eren cûntein. Mo i ghin anch ed qui sœven ch'in vœlen brisa laser ander tåt in tal råsc, me a sûn un ed quî. A sûn ed l'opióun cal lavœr pió impurtânt l'é la preservazioun ed'l identitê, ca spœl anc manifester attrevers na lengua, coun Tått cal parœli ch'în in grêd ed comunicher dimåndi ed'na pupulazioun. +Un eter aspèt fundamentel ed la tradizióun l'é La cûseina, tåtta a bes ed pork, a g'homm al zampoun, persått, i grasœ, al salâm, e la murtadela, pó a somm spesalizê in ti furmaj, in mod particuler al parmisan arzân, ca ag fåmm i turtê e tûrtlein ch'in dimåndi c'gnisû fœra al'ester. +L'industrializazióun e la civilizazióun ed la pianûra la ga tort i meravigliôs bosch vergin chi gheren, cumpagn a qui chi splœlen cater in ti mount ed l'apennein, mo in armês piôp seculer d'areint i fiåmm, ed in ti cunfîn di camp. +In conclusióun a vœj r'curderev ed l'impurtanza ed preserver la diversitê dal månd. Av Salût",,For privacy reasons I couldn't film the image of myself speaking.,,1 checked out of 1,,,,,,1,,,No ID,"No known L1 speakers. Ethnic population: 3,000,000.","Indo-European, Italic, Romance, Italo-Western, Western, Gallo-Iberian, Gallo-Romance, Gallo-Italian",,,,Eurasia,,2017-7-27,, +Alessandro_20170421_lij,Alessandro__20170421,Nick_Panzarella_,4/21/2017,,,lij,,Ligurian,,Genoa,,Italy,,To Upload,CC BY-SA 4.0,checked,,,,,,1 checked out of 1,,,,,,1,,,No ID,"500,000 in Italy (2002). Population total all countries: 505,100.","Indo-European, Italic, Romance, Italo-Western, Western, Gallo-Iberian, Gallo-Romance, Gallo-Italian",Indo-European,§,,"Eurasia, Eurasia",,2017-4-21,, +Foffo_20170421_nap,Foffo__20170421,Nick_Panzarella_,4/21/2017,Screen Shot 2017-05-02 at 15.39.50.png (https://dl.airtable.com/LfdZmZCrQWiW3YvPzRwq_Screen%20Shot%202017-05-02%20at%2015.39.50.png),Foffo_s1_M_20170421_nap.jpg (https://dl.airtable.com/rB5etCJgTjCRN459ep6v_Foffo_s1_M_20170421_nap.jpg),nap,"eng,ita",Napoletano-Calabrese,,"The Spanish Quarters, Naples",,Italy,5/23/2017,Public,CC BY-SA 4.0,checked,,,,,,1 checked out of 1,,,,,,1,,GVkbhzm3VJE,https://youtu.be/GVkbhzm3VJE,"5,700,000 (2002).","Indo-European, Italic, Romance, Italo-Western, Italo-Dalmatian",Indo-European,§,,Eurasia,,2017-4-21,,https://www.dropbox.com/sh/cs83zpjjwqn46hg/AAB0LR5NhvwSIsVaH4oarLpDa?dl=0 +MariaOlimpia_20170820_ell+ita,MariaOlimpia_Squillaci_20170823,John_Kazaklis_20160415,8/20/2017,Screen Shot 2018-02-13 at 2.43.38 PM.png (https://dl.airtable.com/h165F9jbSbOc5rVuGmUD_Screen%20Shot%202018-02-13%20at%202.43.38%20PM.png),MariaOlimpia_20170820_ell+ita.jpg (https://dl.airtable.com/vRtfaPbGRZOMFh2BvsEf_MariaOlimpia_20170820_ell%2Bita.jpg),"ell,ita",,"Greek, Italian",,,,Italy,2/15/2018,To Upload,CC BY-SA 4.0,checked,,,,Greko (00:00-00:39) & Italian (00:40-01:09),Get a free Italian lesson with italki: http://promos.italki.com/wikitongues_ita,2 checked out of 2,,,,,,2,,C0p05Wdafa8,https://youtu.be/C0p05Wdafa8,"10,700,000 in Greece (ELDIA 2012). Population total all countries: 13,432,940., 57,700,000 in Italy (ELDIA 2012). Population total all countries: 63,655,047.","Indo-European, Greek, Attic, Indo-European, Italic, Romance, Italo-Western, Italo-Dalmatian",,,"For Italian, jump to 00:40-01:09. This video was recorded by John Kazaklis in Bova Marina, Italy, where he and Maria Olimpia met. Greko, also known as Grecanic, is spoken by less than 1,000 people, primarily in the southern Italian region of Calabria. A variety of Italiot Greek, Greko is closely related to the similarly named Griko language, which is spoken in the nearby region of Salento. Together, they form a dialect continuum that is spoken by around 50,000 people and derives from the mother tongues of ancient and medieval Greek settlers who began emigrating to the Italian peninsula in the 8th century BCE. Greko is therefore among the last remaining cultural elements of the historic Magna Graecia region of Italy and Byzantine Italy. Since 1999, Greko speakers have enjoyed a degree of recognition, thanks to a law promising protection to many of Italy’s cultural and linguistic minorities. Nonetheless, the efficacy of these measures has been the subject of debate.","Eurasia, Eurasia, Eurasia, Eurasia",,2017-8-21,, +Giuseppe_20160823_scn+ell,Giuseppe_Delfino_20160823,Giuseppe_Delfino_20160823,8/23/2016,Screen Shot 2016-10-12 at 14.10.45.png (https://dl.airtable.com/OY3Ql0FfTW2WEYOLxwCW_Screen%20Shot%202016-10-12%20at%2014.10.45.png),Giuseppe s2 M 20160823 scn+ell.jpg (https://dl.airtable.com/BYnCFJHQB2WlIbjBi5mQ_Giuseppe%20s2%20M%2020160823%20scn%2Bell.jpg),"scn,ell",,"Sicilian, Greek","Griko, not Greek",,,Italy,10/12/2016,Public,CC BY-NC 3.0,,,,,,,2 checked out of 2,,,,,,2,,dHCf9k3u2IQ,https://youtu.be/dHCf9k3u2IQ,"4,700,000 (2002)., 10,700,000 in Greece (ELDIA 2012). Population total all countries: 13,432,940.","Indo-European, Italic, Romance, Italo-Western, Italo-Dalmatian, Indo-European, Greek, Attic",Indo-European,"§Griko, not Greek",,"Eurasia, Eurasia, Eurasia",,2016-8-23,, +Francesco_20161102_srd,Francesco__20161102,Francesco__20161102,11/2/2016,Screen Shot 2016-11-29 at 19.24.20.png (https://dl.airtable.com/ZeHmppQXQz6YQtkJ2SU9_Screen%20Shot%202016-11-29%20at%2019.24.20.png),Francesco_s1_M_20161102_srd.jpg (https://dl.airtable.com/OjlZ9VwsRqqrXxpVGMNg_Francesco_s1_M_20161102_srd.jpg),srd,,Sardinian,,,,Italy,11/27/2016,Public,CC BY-NC 3.0,,,"Bene acattaos, mi naro 'Francesco' chi diat a esser 'Frantziscu' in limba sarda – perdonaemi pro sa boche chi tenzo ca soe totu refreiau, oje soe inoche pro chistionare in sardu, goi bidies comente est e comente sonat sa limba nostra. Apo a chistionare in su limbazu de Nugoro, mancari italianitzau, fintzas si in Sardinnia bi nde at prus de una chentina de ateros chi sunt unu pacu diferentes ca tenent sonos meda prus durches. In antis de totu, in supra de su sardu, fachet a narrer calicuna cosa chi est de importu mannu: puntu primu, su sardu no est italianu. Fintzas si nois sardos fachimus parte de s'Italia politica, su sardu est una limba chi movet dae su latinu a sa sola e chi tenet ite bier cun s'italianu su matessi de su tedescu cun s'inglesu (duas limbas romanicas sas unas, duas limbas germanicas sas ateras). Bi at peri zente – limbistas - chi narat chi su sardu est sa limba prus a curtzu a su latinu anticu. In sardu, limba naschia e paschia in Sardinnia dae cando sos romanos si aiant picau s'isula nostra in su tempus de sos nurachesos, ant iscrittu traballos de cabale, comente sa 'Carta de Logu' de su 1392, sa costitutzione de sa patria sarda chi est addurada fintzas a s'Otichentos. Pro seculos, bi la at fatta a supravvivere a s'influentzia de su cadelanu e s'ispanniolu. Cando sos Savoia si ant peroe picau sa Sardinnia, ant cumintzau a traballare pro la italianitzare. Custu si podet bier fintzas dae su numene chi ant tentu biddas, montes, carreras, prattas e cantu bi at, medas fintzas como in italianu ca nde amus perdiu s'ammentu de comente si narabant in sardu orizinale. In su Novichentos sa faina, pro facher a manera chi sos sardos esserent italianos a su chentu pro chentu, sichit e su fassismu persichit su sardu cun fortza galu prus manna. Addolumannu, fintzas in Republica pro meda tempus no andabat menzus: sos mastros picabant a corfos a sos dischentes cando los cassabant faveddande in sardu intra issos, o puru lis poniant una multa chi depiant pacare sos parentes, ispinghende medas de issos a mudare su faveddu o a si nche istare a sa muda, e a si nde facher birgonza. In sos annos '90, mancu male, si fachet una leze in ube si reconnoschent doichi limbas comente su sardu 'limbas de minoria' in intro de s'Italia. Est unu passu a in antis, chene duda. Lastima chi, francu tres limbas chi s'Italia amparat de abberu pro more de trattados internatzionales, pro su sardu custu est unu reconnoschimentu boidu, chene sustantzia. E mancari est benniu fintzas tropu a tardu: oje in die, belle in totube in Sardinnia, intender a calicunu negossiande in sardu (prus chi in italianu porcheddinu) est comente a bincher sa lotteria, fintzas si in carchi bidda tzentrale, tocat a lu ammitter, galu si mantenet s'impreu; pro su restu de s'isula, sa zente no lu chistionat prus ca o no nde ischint prus una paragula azummai o puru nde tenent birgonza. A medas a dolu mannu lis ant postu in conca chi su sardu tantu est una limba ruza e non tzivile, mala a cumprender e chi no serbit a nudda, chi est cosa de unu populu de peddones chi bolet tzivilizau comente a sos continentales; ladinu est chi no la pesso gai, ma a dolu mannu bi nde at sardos a muntone chi tenent galu custa mentalidade in supra de issos etotu. In prus, bi at su fattu chi sa limba tenet medas limbazos, chi si podent cumprender a pare a s'oricra de unu chi su sardu lu connoschet bene comente si toccat (pero a dolu mannu custu est como in Sardinnia una minoria), cosa chi no est a favore suo. Dego non credo, no nde isco pro cantu tempus su sardu at a campare goi morri-morri in custa situatzione, comente una pranta sicca a puntu de si nche morrer, ca nemos li dat prus cara cund unu gutturu de abba. Dego credo chi su sardu siat una prenda de sa cultura nostra, e sa retza unu trastu chi nos podet permitter de promover, pro cussu chi podimus, s'allega ei sa terra nostra. Mi piachet a pessare chi 'tenzo pessimismu de intellighentzia e ottimismu de boluntade', comente narabat su sardu Gramsci. A tibi, sardu o istranzu, chi mancari ti podet piacher e interessare sa limba, sa cultura ei sa terra sarda: gratzias medas pro totu. Adiosu, in pache!","Pardon my voice, I caught a cold. I am here to speak in Sardinian today, so you may realise what our language is and how it sounds. I'm going to speak in Nuorese dialect, albeit Italianized, though there are hundreds of them in Sardinia, all being a little different, for the words are pronounced definitely softer and less harsh. So, I'd like to point out something of import about Sardinian: first off, Sardinian is not Italian. Even though we are politically part of Italy, Sardinian is a language of its own right which evolved autonomously from Latin and is as different from Italian as German is from English (two Romance languages in the first case, two Germanic languages in the latter). Indeed there are even some people – linguists – stating that Sardinian is the closest language to Latin of all. In Sardinian, a language being spoken since the Roman conquest of Nuragic Sardinia, an ample body of written works has been produced, like the 'Carta de Logu' in 1392, the Sardinian Constitution that had been in force until the XIX° century. The language managed to survive the times of the Aragonese and Spanish Empire. Ever since the island was ceded to the House of Savoy [once an Italian duchy], the Savoyards invested a great deal of effort in italianizing Sardinia. Even things like village, mountains, street names and so on were given a name in Italian that remain to this day, for now we've lost memory of what they were called originally. The Italianization process continued, so as to make sure the Sardinians were moulded into perfect Italians, and got only worse with the advent of the Fascist era, with even stronger measures being applied to eradicate the language. Alas, for a long time the situation didn't get any better when the Republic was established: in schools, the children being overheard speaking Sardinian among themselves were threatened with the use of cane by the teachers and other corporal punishments or penalty fees meant to humiliate the pupils and force them to shift to Italian, making them feel ashamed of Sardinian in the process. In the '90s, finally, a law aming at promoting twelve languages like Sardinian as 'minority languages' in Italy was made. It is a step forward, no doubt about it. Too bad it's not really been enforced, with the only exception of the three languages, where the state applies full bilingualism due to international agreements. Perhaps such a recognition has come too late to prevent the inevitable: almost everywhere in Sardinia, listening to someone speaking in Sardinian (rather than just broken Italian) is just as likely as winning the lottery nowadays, even if, I have to admit, its use is still retained in some inner villages; as to the rest of the island, the people don't speak this language anymore, since they don't have a basic knowledge of Sardinian or they feel ashamed of speaking it. Alas, too many Sardinians have been in fact led to believe in the stereotype of Sardinians as an overall primitive people speaking a difficult, useless and peasant language to be properly civilized in order to elevate themselves and be on a par with those from the Mainland; of course I don't share this self-belittling view, but there are unfortunately many Sardinians who still do. Moreover, the fact that the language has several versions, all being mutually intellegible by someone who knows Sardinian well (unfortunately, that's become a small minority of the population in Sardinia), also works against it. I don't rightly know how much time the Sardinian language has still left, with things being the way they are now, like a dying plant without a single drop of water. I believe Sardinian is a cultural gem, and the web could be an important tool to promote the language and our homeland as well, as much as we can. So, let's say 'I'm a pessimist because of intelligence, but an optimist because of will', to quote a Gramsci's motto. To you, whether you are Sardinian yourself or a foreigner, who may like and even take an interest in this language: thank you. Peace out!",,,1 checked out of 1,,,,,,1,,Pr_BHjAdZNo,https://youtu.be/Pr_BHjAdZNo,"Population total all languages: 1,200,000.",,,§,,Eurasia,,2016-11-7,, +Paola_20171226_scn+ita,Paola__20171226,David_Paleino_20171226,12/26/2017,Paola_20171226_scn.png (https://dl.airtable.com/C6Oc7AqIQquELn0xFQ9y_Paola_20171226_scn.png),,"scn,ita",,"Sicilian, Italian",,,,Italy,1/25/2018,Public,CC BY-SA 4.0,checked,,,,Campobello di Mazara. something about the meaning of 'appirsipiatu',Get a free Italian lesson with italki: http://promos.italki.com/wikitongues_ita,2 checked out of 2,,,,,,2,,WaTpyPIBGOc,https://youtu.be/WaTpyPIBGOc,"4,700,000 (2002)., 57,700,000 in Italy (ELDIA 2012). Population total all countries: 63,655,047.","Indo-European, Italic, Romance, Italo-Western, Italo-Dalmatian, Indo-European, Italic, Romance, Italo-Western, Italo-Dalmatian",,,"This video was recorded by David Paleino in Campobello di Mazara, Sicily, Italy, where Paola lives. Sicilian is spoken by as many as five million people, primarily in the Italian island of Sicily, as well as parts of mainland regions Calabria, Campania, and Apulia. It has been a literary language since at least the twelfth century CE, when the Sicilian King Frederick I, who would later become the Holy Roman Emperor Frederick II, began encouraging poetry in the language; an initiative that gave way to a cohort of early writers known as the ‘Sicilian School’. Sicilian literature fell into decline with the rise of Italian as a regional lingua franca, but remained prominent in its spoken form as a mother tongue, and persists today, despite significant challenges: the language remains unrecognized by the Italian government and is therefore absent from public education. Both David and Paola are volunteers at Cadèmia Siciliana, a nonprofit initiative to promote and preserve the language for future generations.","Eurasia, Eurasia, Eurasia",,2018-1-5,Sicily_IT, +Arlon_20170127_vec,Arlon_Stok_20170127,Arlon_Stok_20170127,1/27/2017,Arlon_s1_M_20170127_vec.png (https://dl.airtable.com/ovCAjuyGTCaatN0LVHJb_Arlon_s1_M_20170127_vec.png),Arlon_s1_M_20170127_vec.png (https://dl.airtable.com/Zwn1RzskRVOxz27RSuzF_Arlon_s1_M_20170127_vec.png),vec,,Venetian,Triestine,"Feel free to publish this whenever you want, I had a lot of fun doing it. +And thank you for the amazing project! I am not a linguist but I have fun with languages, so it's much appreciated. + +I am a native speaker, and Triestine is, currently, being regularly spoken by 80% or more of the citizens of the Trieste area (current users can cross several borders). + +--- +This said, I have only one request, that is quite important. I know very well that it is currently considered a dialect of Venetian, but please do publish it just as Triestine (Triestin in the local form)... in Trieste for a million reasons we do not see ourselves as Venetian at all, so if for whatever reason it gets published as “Venetian”, I’ll probably end up getting beaten on sight (yes, it’s that serious, for us, and I'm only half-joking :P), and I wouldn’t want that to happen :) +Aside from this, if there are any questions or anything else you might need, please go ahead and drop me a line: I love my local language and if there’s anything I can do to help it, I am available.",,Italy,3/4/2017,Public,CC BY-SA 4.0,checked,checked,"Bondì! +Ogi xe sai zima e un fia de bavisela, anzi borin, e ‘lora ne toca ciacolar qua. +Pagnaroi e cocai i bagolerà anca, con sta zima, ma bona che almeno no ghe xe ploc’. +E po’ xe sai roba, star involtizai tignindo un bic’ el daur al caldo, inveze de ‘ndar zercarse panorami ufo come klonzi pei grembani. +Bon, Trieste. Semo quel cantonzin de Europa indove che se incrosa i 3 grupi culturai prinzipai, saria latin, slavo e germanico. +E sto misciot xe rivado far in maniera che la parlada che gavemo la gabi un morbin tuto suo, che per bon xe ciodi trovarghene de compagni int’el Europa. +Per capir cos’che nassi col triestin, xe de tignir conto che qua ghe xe stade SIE bandiere diferenti, int’el novezento! Un remitur. +Però, cio, xe de dir che ancora ogidì ghe xe un futio de lori, mularia e veci, che lo parla drio man. Xe de facto la nostra parlada veicolar. +E disemo che, cucando ben, se pol intivarghene do tipi. Un xe come che stago ciacolando mi, saria triestin patoco, e po’ ghe xe el triestin resentado, che xe un fia piu miscià col talian. +Tuti e do i xe vivi e parlai, e po’ ghe xe sai libri, pupoli e tochi musicai che vien fora drio man, in triestin. +La roba cocola xe che, dato che no el ghe entra int’ele scole, sai triestini no i jera bituai a butarlo zo per scrito. E cos’che xe nato xe che sai de lori i ga tacà e doprarlo per internet, int’ei forum e social media. +Bon, e alora, ogi col triestin xe sta tirà su tipo un “scartozo linguistico”... el xe doprado de quasi tuti ma no el xe riconosudo, e no se sa che Status darghe. Ma a un dato momento ne tocherà vignirghene fora su cossa che volemo far de lu per no lasarlo linguisticamente inciodado, inscartozado. +Perché se ghe xe una parlada che la ga morbin ben che mai e che la sta vignindo mesa zo per scrito più de quel che mai la xe stada scrita int’ela storia, con internet, xe de butar l’ocio per veder se se riva a refarla e regolarla un fia, sta situazion. Che altrimenti ghe xe el ris’cio de imbusar parole, tochi intieri de pensier, e saria pecà. +Bon, se savaremo dir, che xe piu giorni che luganighe. +Dio!","First English only, then alternate triestine/English line by line. ----- Good day, Today it’s very cold and there’s a bit of a breeze, actually “borin”, so we shall talk right here. Perhaps sparrows and seagulls will be out, with this cold, but at least it’s not a muddy mess. And also, it’s great to be cozy with our backs all warm, instead of going out looking for amazing views, unprepared and through some rough terrain. Well, Trieste. We are that little corner of Europe where the 3 main cultural groups meet: Latin, Slavic and Germanic. This mix made it possible for us to speak something that has its own “morbin”(*), in a way that is unlikely anywhere else in Europe. In order to understand what’s up with Triestine, one needs to understand that here we have had SIX different flags, in the XX century! A proper mess. Anyway, it has to be said that even today lots and lots of people, both young and old, speak it all the time. It is our de facto vehicular language. And let’s say that, looking at the details, one can recognise two variants. One is the way I am speaking, “patoco” Triestine(**), and then there is also “resentado”(***) Triestine, which tends to be a bit mixed with Italian. They both are alive and widely spoken, furthermore there are books, comics and songs being published regularly in Triestine! There’s one nice thing: keeping in mind that it is not taught in schools, many Triestines were not used at all to its written form. What happened was that tons of people began to use it on the internet, in forums and social media. Then, today with Triestine a sort of “linguistic mess” happened... it is used by almost everyone, but it is not recognised, and no one knows what Status to give it. But, at some point, we will have to realise what we want to do with it, not to keep it stuck and confused, as a language. Because, if there is a language that is alive and kicking more than ever, and it is now being written more than it ever was in history, with the internet, we need to be on the lookout for some way to straighten this situation, a little bit. Otherwise we risk losing words and whole trains of thought, which would be a shame. Well, only time will tell, and there’s always a chance for it to happen. Bye! * Untranslatable here? Meaning: life force, positive energy… ** Hard to translate: ‘proper’, hyper-local… would leave this untranslated) *** Lit. ‘rinsed’, would leave this untranslated ----- Bondì! Good day, Ogi xe sai zima e un fia de bavisela, anzi borin, e ‘lora ne toca ciacolar qua. Today it’s very cold and there’s a bit of a breeze, actually “borin”, so we shall talk right here. Pagnaroi e cocai i bagolerà anca, con sta zima, ma bona che almeno no ghe xe ploc’. Perhaps sparrows and seagulls will be out, with this cold, but at least it’s not a muddy mess. E po’ xe sai roba, star involtizai tignindo un bic’ el daur al caldo, inveze de ‘ndar zercarse panorami ufo come klonzi pei grembani. And also, it’s great to be cozy with our backs all warm, instead of going out looking for amazing views, unprepared and through some rough terrain. Bon, Trieste. Semo quel cantonzin de Europa indove che se incrosa i 3 grupi culturai prinzipai, saria latin, slavo e germanico. Well, Trieste. We are that little corner of Europe where the 3 main cultural groups meet: Latin, Slavic and Germanic. E sto misciot xe rivado far in maniera che la parlada che gavemo la gabi un morbin tuto suo, che per bon xe ciodi trovarghene de compagni int’el Europa. This mix made it possible for us to speak something that has its own “morbin”(Meaning: life force, positive energy…), in a way that is unlikely anywhere else in Europe. Per capir cos’che nassi col triestin, xe de tignir conto che qua ghe xe stade SIE bandiere diferenti, int’el novezento! Un remitur. In order to understand what’s up with Triestine, one needs to understand that here we have had SIX different flags, in the XX century! A proper mess. Però, cio, xe de dir che ancora ogidì ghe xe un futio de lori, mularia e veci, che lo parla drio man. Xe de facto la nostra parlada veicolar. Anyway, it has to be said that even today lots and lots of people, both young and old, speak it all the time. It is our de facto vehicular language. E disemo che, cucando ben, se pol intivarghene do tipi. Un xe come che stago ciacolando mi, saria triestin patoco, e po’ ghe xe el triestin resentado, che xe un fia più miscià col talian. And let’s say that, looking at the details, one can recognise two variants. One is the way I am speaking, “patoco” Triestine(‘proper’), and then there is also “resentado”(‘rinsed’) Triestine, which tends to be a bit mixed with Italian. Tuti e do i xe vivi e parlai, e po’ ghe xe sai libri, pupoli e tochi musicai che vien fora drio man, in triestin! They both are alive and widely spoken, furthermore there are books, comics and songs being published regularly in Triestine! La roba cocola xe che, dato che no el ghe entra int’ele scole, sai triestini no i jera bituai a butarlo zo per scrito. E cos’che xe nato xe che sai de lori i ga tacà a doprarlo per internet, int’ei forum e social media. There’s one nice thing: keeping in mind that it is not taught in schools, many Triestines were not used at all to its written form. What happened was that tons of people began to use it on the internet, in forums and social media. Bon, e alora, ogi col triestin xe sta tirà su tipo un “scartozo linguistico”... el xe doprado de quasi tuti ma no el xe riconosudo, e no se sa che Status darghe. Ma a un dato momento ne tocherà vignirghene fora su cossa che volemo far de lu per no lasarlo linguisticamente inciodado, inscartozado. Then, today with Triestine a sort of “linguistic mess” happened... it is used by almost everyone, but it is not recognised, and no one knows what Status to give it. But, at some point, we will have to realise what we want to do with it, not to keep it stuck and confused, as a language. Perché se ghe xe una parlada che la ga morbin ben che mai e che la sta vignindo mesa zo per scrito più de quel che mai la xe stada scrita int’ela storia, con internet, xe de butar l’ocio per veder se se riva a refarla e regolarla un fia, sta situazion. Che altrimenti ghe xe el ris’cio de imbusar parole, tochi intieri de pensier, e saria pecà. Because, if there is a language that is alive and kicking more than ever, and it is now being written more than it ever was in history, with the internet, we need to be on the lookout for some way to straighten this situation, a little bit. Otherwise we risk losing words and whole trains of thought, which would be a shame. Bon, se savaremo dir, che xe piu giorni che luganighe. Well, only time will tell, and there’s always a chance for it to happen. ‘Dio! Bye! * Untranslatable here? Meaning: life force, positive energy… ** Hard to translate: ‘proper’, hyper-local… would leave this untranslated) *** Lit. ‘rinsed’, would leave this untranslated",,,1 checked out of 1,,,,,,1,,cZItz2uKXUo,https://youtu.be/cZItz2uKXUo,"3,800,000 in Italy (2002). Population total all countries: 3,852,500.","Indo-European, Italic, Romance, Italo-Western, Western, Gallo-Iberian, Gallo-Romance, Gallo-Italian",Indo-European,§Triestine,,Eurasia,,2017-2-13,, +Michael_20140729_tso,Michael__20140729,Lindie_Botes_20130919,7/29/2014,michael.png (https://dl.airtable.com/hxULWfDdRrqzEUUh9U75_michael.png),Michael_s1_M_20140729_tso.jpg (https://dl.airtable.com/kYEqQG9sQwi5hYvt6Mhl_Michael_s1_M_20140729_tso.jpg),tso,,Tsonga,Shangaan,,,Japan,7/29/2014,Public,Standard,,,,,,,1 checked out of 1,,,,,,1,checked,8RyDKy_HUj0,https://youtu.be/8RyDKy_HUj0,"2,280,000 in South Africa (2011 census), increasing. Population total all countries: 4,009,000. L2 users: 3,400,000 in South Africa.","Niger-Congo, Atlantic-Congo, Volta-Congo, Benue-Congo, Bantoid, Southern, Narrow Bantu, Central, S, Tswa-Rhonga (S.53)",Niger-Congo,"Shangaan,,,,,",,Africa,,2014-12-22,, +Sho_20141106_jpn,Sho__20141106,Lindie_Botes_20130919,11/6/2014,sho.png (https://dl.airtable.com/jFuSXvDnR5O96MPQFL1D_sho.png),Sho_s1_M_20141106_jpn.jpg (https://dl.airtable.com/50u0FQEOTtarFNos0Ohz_Sho_s1_M_20141106_jpn.jpg),jpn,"eng,spa,glg,jpn",Japanese,,,,Japan,11/6/2014,Public,Standard,,,,,,Get a free Japanese lesson with italki: http://promos.italki.com/wikitongues_jpn,1 checked out of 1,checked,,,,,1,checked,o4R1-TLkxBs,https://youtu.be/o4R1-TLkxBs,"121,000,000 in Japan (1985). Population figure may include other ethnic groups. Population total all countries: 122,056,940. L2 users: 1,000,000 in Japan.",Japonic,,"Japanese,,,,,",,Eurasia,,2014-12-22,,https://www.dropbox.com/sh/ri3e8d55iyvn6wq/AADiv9Ajpvn0XHd-fdorjzXSa?dl=0 +Shuang_20141230_cmn,Shuang__20141230,Lindie_Botes_20130919,12/30/2014,shuang.png (https://dl.airtable.com/oXkADGWKT8m8madMPki4_shuang.png),Shuang_s1_F_20141230_cmn.jpg (https://dl.airtable.com/BAu1EfuRGar8LXLP5npf_Shuang_s1_F_20141230_cmn.jpg),cmn,,"Chinese, Mandarin",Mandarin,,,Japan,12/30/2014,Public,Standard,,,你好,我是。我叫Li Shuang,我從北京來。來到日本,20(20s)年以前來到日本。然後我生活在日本。然後我的先生。我有先生,還有兩個兒子。他們在上海讀小學。然後會說英文。現在呢,也在日本讀中學,也會說日文。所以我也很希望你們有機會來日本,也來中國旅遊學中文和日文來敬請國際交流。這個真的是很開心的事情。就這樣。再見,"Dear all, I am. My name is Li Shuang, from Beijing. Coming to Japan. 20s years ago, I came to Japan. And then lived there. Um, my husband. I am married and also have two boys. They studied primary school in Shanghai and can speak some English. Now, they are living in Japan for their high school study, so they can speak some Japanese too. I really hope that you guys can have chances to come to Japan and also to China for travelling, education, for widening your horizons. This would be something you don't want to miss (loosely translated). So far so good. Goodbye. +",,,1 checked out of 1,,,,,,1,checked,G5WqvFD-ELo,https://youtu.be/G5WqvFD-ELo,"840,000,000 in China (2000 census), increasing. 70% of Chinese language users speak a Mandarin dialect as L1. Population total all countries: 847,808,270. L2 users: 178,000,000 in China.","Sino-Tibetan, Chinese",Sino-Tibetan,"Mandarin,,,,,",,Eurasia,,2014-12-22,, +Teruyo_20160122_ain,Teruyo__20160122,Lindie_Botes_20130919,1/22/2016,teruyo-ain-thumb-raw.png (https://dl.airtable.com/EKZxaKQ3ScmxRY9JjAsV_teruyo-ain-thumb-raw.png),teruyo-ain-thumb.jpg (https://dl.airtable.com/GWuVN7R3RzKQNUfzmclU_teruyo-ain-thumb.jpg),ain,,Ainu,,,,Japan,1/25/2016,Public,CC BY-NC 3.0,checked,,,,,,1 checked out of 1,,2,,,,1,checked,pI1feWHeUq4,https://youtu.be/pI1feWHeUq4,"10 (Bradley 2007). Ethnic population: 15,000.",Language isolate,,§,,Eurasia,,2016-1-23,, +Daisy_20160102_kin,Daisy__20160102,Lindie_Botes_20130919,1/2/2016,daisy-kin-thumb-raw.png (https://dl.airtable.com/gz58Zu9iQXaKGayYMMXO_daisy-kin-thumb-raw.png),daisy-kin-thumb.jpg (https://dl.airtable.com/fMVRmF4RsSiKVPpP6few_daisy-kin-thumb.jpg),kin,,Rwanda,Kinyarwanda,,Unknown Variant,Japan,2/11/2016,Public,CC BY-NC 3.0,checked,checked,"Muraho , nitwa Daisy . Ndi umunyarwandakazi, nturuka mu Rwanda ; igihugu gitemba amata n'ubuki , igihugu cy'imisozi igihumbi , igihugu cy'abeza ni byiza byinshi. Dukunda abashyitsi, ndabararitse murakaza neza murisanga mu Rwanda rwacu . Murakoze cyane. ","how are you all? My name is Daisy. I am a Rwandan lady from Rwanda; the country overflowing with milk and honey , the country of a thousand hills , the country of beautiful people and with many good things . We love visitors and I invite you over . You are most welcome and may you feel at home in our Rwanda . Thank you very . ",,,1 checked out of 1,,7,Facebook,2016-11-1,https://www.facebook.com/wikitongues/videos/1249308525133672/,1,checked,1P6ygw-VKKo,https://youtu.be/1P6ygw-VKKo,"6,490,000 in Rwanda (1998). Population total all countries: 7,189,900.","Niger-Congo, Atlantic-Congo, Volta-Congo, Benue-Congo, Bantoid, Southern, Narrow Bantu, Central, J, Ruanda-Rundi (D.61)",Niger-Congo,§Kinyarwanda,,Africa,,2016-1-9,, +Anne_20160118_swg,Anne__20160118,Lindie_Botes_20130919,1/18/2016,anne-swg-thumb-raw.png (https://dl.airtable.com/EEPwViyRYqBfxPnW4Wew_anne-swg-thumb-raw.png),anne-swg-thumb.jpg (https://dl.airtable.com/W6RP0eTQYeGOhNmc8S9g_anne-swg-thumb.jpg),swg,"eng,swg",Swabian,,,,Japan,2/13/2016,Public,Standard,,checked,"Hallo, I bin ´d Anne und I komm aus´m Schwobaländle. Des isch in Baden-Württemberg. Schwaben. So rund um Schtuddgart drum rum. Oder wie mir Schwoba saga däda: rund um Schduagard. + + + +S´gibt viele Diskussiona, ob Schwäbisch jetz a eigana Sprache isch, oder edd, weil eigentlich isch´s bloß an Dialekt. Aber i denk, vor allem s´alde Schwäbisch isch eigentlich a Sprache für sich und i möcht euch zeiga, warum i des denk. + + + +Nämmer zum Beispiel mol des Wort für diese Frucht. Auf Hochdeutsch sagt ma: „eine Erdbeere.“ Mir Schwoba saged: „ a Breschtling“. Zumindescht die alde Schwoba saged des in de gleine Dörfla auf dr Schwäbischa Alb. Do isch Schwäbisch wirklich noch am Läba, obwohl mir…in der Schule müssmer Hochdeutsch schwätza. Aber so in der Familie, vor allem mit´m, mit´m Ehne, do schwätzt ma no Schwäbisch. + + + +I bin schdolzer Schwabe, vor allem weil i denk, dass´d schwäbischa Kultur ganz besonders schön isch. Mir sinn a ganz warma Kultur, mit kommad gern zamma in dr Familie und in viele Teile vom Schwobaländle isch dr Glaube an Jesus Chrischtus eigentlich no richtig am Läba. D´Landeskirche isch aktiv und am Läba, junge Loit, alde Loit, jeder isch mehr oder weniger in dr Kirch involviert. Und des hat au historische Gründe. Weil vor ogfähr zwoihonderd Johr hännd d´Schwoba beschlossa: „Mir wällad d`Bibl au für uns sälber läsa. Mir wällad edd bloß am Sonndag vom Pfarrer höra, was der aus am Word uns erklärt. Desch schee ond guat, aber mir wällad´s für uns sälber läsa.“ + + + +No hännd se begonna, Mittwochobnds, in der Biblschdund, selbr s´Word Goddes zum läsa und des auf ihr eigenes Läba anzumwenda und des sieht ma bis hoit in de glaine Döfla auf dr Schwäbischa Alb. Jeden Mittwoch isch Biblschdund, oder au oifach bloß „Schdund“. Do goht ma no um´s Word Goddes zum läsa und auf´s aigene Läba anzumwenda. + + + +Deshalb bin i stolzer Schwabe. + + + +Mir sagad au: „Mir könnad alles, außer Hochdeutsch.“ – und in dem Sinne: viel Spaß beim Schwäbischlerna! + + + +Ade! + + + + + + +","Hello, I´m Anne and I´m from Swabia. That´s in Baden-Württemberg (German province). Swabia. More or less around Stuttgart. Or, as us Swabians say: around „Schduagard“. + +  + +There are many discussions whether Swabian is a language on its own or not, because actually it´s just a dialect. But I think that the old Swabian especially, is a language on its own and I want to show you why I think so. + +  + +Let´s take the word for this fruit (strawberry) for example. In high German one would say: “eine Erdbeere”. Us Swabians say: “a Breschtling”. At least the old Swabians in the small villages on the Swabian Alb. There, Swabian is still really alive, although we…in school we have to speak high German. But with your family, especially with your grand-father, you still speak Schwäbisch.   + +  + +I am proud to be a Swabian, because I think that the Swabian culture is particularly nice. We have a very warm culture, we love to get together with extended family and in many parts of Swabia the faith in Jesus Christ is still very alive. The church there is very active and alive, young people, old people, everyone is more or less involved in church. And this also had historical reasons. Because about 200 years ago, the Swabians decided: „We want to read the Word of God for ourselves. We don´t only want to hear from the preacher on Sunday, what he explains from the Word (of God). That´s fine, but we also want to read it for ourselves.”So they began reading the Word of God on their own and applying it to their lives on Wednesday evenings, in the “Biblschdund” (“Bible hour”). And this is something you see until today in little villages on the Swabian Alb. Every Wednesday is “Biblschdund“, or simply „Schdund“ („hour“). That´s where you go to read the Word of God and to apply it to your own life.That´s why I´m proud to be a Swabian.We have a saying „We can do anything but speak high German.“ - In this sense: Have fun learning Swabian!Bye.",,,1 checked out of 1,,9,,,,1,checked,5TiS3AkpeI0,https://youtu.be/5TiS3AkpeI0,"819,000 (2006). Ethnic population: 820,000 (2000).","Indo-European, Germanic, West, High German, German, Upper German, Alemannic",Indo-European,§,,Eurasia,,2016-1-18,, +Sanjoy_20160101_ben,Sanjoy__20160101,Lindie_Botes_20130919,1/1/2016,Screen Shot 2016-05-13 at 12.09.10.png (https://dl.airtable.com/Kx5rzGJsSzys0O1Fnmg6_Screen%20Shot%202016-05-13%20at%2012.09.10.png),Sanjoy_s1_M_20160101_ben.jpg (https://dl.airtable.com/sgrCOp49RYycvWUrZpDT_Sanjoy_s1_M_20160101_ben.jpg),ben,,Bengali,,,Unknown Variant,Japan,4/9/2016,Public,CC BY-NC 3.0,checked,,,,,Get a free Bengali lesson with italki: http://promos.italki.com/wikitongues_ben,1 checked out of 1,,30,Facebook,2017-7-6,https://www.facebook.com/wikitongues/videos/1509566602441195/,1,checked,5bYNuCOdd_Q,https://youtu.be/5bYNuCOdd_Q,"110,000,000 in Bangladesh (2001 census). Population total all countries: 193,261,200. L2 users: 140,000,000 in Bangladesh.","Indo-European, Indo-Iranian, Indo-Aryan, Eastern zone, Bengali-Assamese",Indo-European,§,,Eurasia,,2016-1-9,, +Miarisoa_20160102_mlg,Miarisoa__20160102,Lindie_Botes_20130919,1/2/2016,Screen Shot 2016-07-01 at 14.23.29.png (https://dl.airtable.com/s0v3JkERMPMefb8yjIuw_Screen%20Shot%202016-07-01%20at%2014.23.29.png),mariarosa.jpg (https://dl.airtable.com/celJ1hPUSwCpmKrao6oo_mariarosa.jpg),mlg,,Malagasy,,,Unknown Variant,Japan,7/2/2016,Public,CC BY-NC 3.0,checked,checked,"Resaka: + +Manao ahoana daholo, Miarisoa no anarako. Avy any Madagasikara. + +Dia miteny Malagasy izahay any Madagasikara. Manao 'coucou' amin'ny rehetra eran-tany izay mijery an'ity zavatra teneniko ity. Dia faly miarahaba anareo. + +Any Madagasikara moa izany, betsaka ny zavatra tenenina any. + +Raha ohatra ka miteny 'Manao ahoana' na 'Salama' (fomba fiarahabana) dia mitovy ihany ny dikany fa miankina amin'ny faritra andehanana. + +(Fotoana fieritreretana kely) + +Ny zavatra tiako tenenina raha ohatra ka mikasika an'i Madagasikara: raha ohatra ka mijery an'i Madagasikara izao ianareo dia any akaikin'ny Afrika no misy azy. + +Fa raha jerena ny tantara tany aloha, dia ny mponina voalohany tany Madagasikara dia tsy Afrikanina fa olona avy any Asia. Izahay izany dia 'plutot' hoe asiatika (mifangaro Afrikanina) fa tsy dia tena Afrikanina (pure). Ny Afrikanina tonga taorian'ny Asiatika. + +Misaotra betsaka. + +Hira: + +Raha toa ka faly ianao dia mitehafa (x2) + +Raha toa ka faly ianao (x3) dia mitehafa","Talk: + +Hello everybody, my name is Miarisoa from Madagascar. In Madagascar, we speak Malagasy. + +I say 'coucou' (a casual French greeting) to everybody who is listening to my talk now. Again, I am happy to say hello to all of you. + +For Madagascar, I can say many things. For instance, for the greetings, either we say 'Manao ahoana' or 'Salama' (greetings), the meaning is quite same but it depends on each part of the country. + +(Thinking time) + +What I want to say about Madagascar is: if you know the country, it is near the African continent. But if we refer to the history, the first people who came there were not African people but from Asia. Therefore, we are rather asian (mixed to African) than (pure) African. Because of the fact that African people came later. + +Thank you very much. + +Song: + +If you are happy, clap your hands (x2) + +If you are happy (x3), clap your hands",,,1 checked out of 1,,40,Facebook,2017-5-12,https://www.facebook.com/wikitongues/videos/1448912288506627/,1,,T8cLcztsDXY,https://youtu.be/T8cLcztsDXY,"Population total all languages: 16,744,640.",,,§,,Africa,,2016-1-9,, +Azariah_20160102_spa,Azariah__20160102,Lindie_Botes_20130919,1/2/2016,Screen Shot 2016-08-04 at 16.14.34.png (https://dl.airtable.com/TuIQGriRNC02mh9JKhtA_Screen%20Shot%202016-08-04%20at%2016.14.34.png),Azariah_s1_F_20160102_spa.jpg (https://dl.airtable.com/WXDkeVncQ2W1HVrYbftL_Azariah_s1_F_20160102_spa.jpg),spa,"eng,spa",Spanish,Central American Spanish,,Unknown Variant,Japan,7/21/2016,Public,CC BY-NC 3.0,checked,checked,"¡Hola! Mucho gusto, yo me llamo Azariah Amador, mi primer nombre es Azariahy estoy hablando español. Yo soy de Honduras, para que los que no saben que es Honduras, porque muchas veces viajo y la gente me dice: “¿De dónde eres?”, y yo digo “soy de honduras” y la gente me dice “nunca he escuchado de ese país”. Y después vengo yo y explico: aquí esta México y aquí esta Colombia o Panamá y yo estoy en medio. Ya que Honduras esta en Centro América y en Centro América, mucha gente no sabe, mucha gente ve el mapa y piensa que México se pega a Colombia de un solo, pero en realidad en CentroAmérica hay siete países y Honduras es uno de los siete países, hermoso, precioso y representa mucho de Centro América y me encanta, la gente es excepcional. En toda Latinoamérica creo que nuestra cultura se parece mucho y eso me encanta porque ahorita estoy en Tokio, en Japón y me encanta sentir que soy parte de una cultura así como Japón es parte de una cultura, yo creo que soy parte de Latinoamérica. Cuando la gente me pregunta de dónde eres, yo digo si de Honduras, pero yo soy latina.Entonces, para todos los latinos con amor les digo que sigamos promoviendo nuestra cultura de alegría, de gozo, de baile, de sonrisas, y abrazando a la gente porque el mundo necesita amor cada día más. Y bueno pues, si aquellos que quieren aprender español, aprendan español porque ¡es un idioma tan bonito! Se habla a veces diferente con acentos diferentes, como mis amigos deCuba lo hablan así “¡Oye chico mueve tu fondiño!” y mis amigos de Argentina hablan “¡Che, pásame la botella!”. No soy muy buena imitando los acentos pero me parece hermoso que seamos parte de una cultura, un idioma pero seamos tan diferentes. Un beso.","Hi! Nice to meet you, my name is Azariah Amador, my 8rst name is Azariah andI’m speaking Spanish. I am from Honduras, for the ones that don’t know Honduras, because many times I travel and people ask me where I’m from and when I say I’m from Honduras people usually tell me they have not heard aboutthe country. Then I start explaining that “here is Mexico and here is Colombia orPanama, and I am in the middle”. Because Honduras is in Central America and many people don’t know and many see the map and think that Mexico is attached directly to Colombia, but in reality there are seven countries in between, Honduras is one of them. Beautiful, precious and represents Central America very much and I love it, people are exceptional. In all of Latin America I think our culture is very similar and that fascinates me because now I’m in Tokyo, Japan and I love feeling that I am part of a culture like Japan is part of a culture, I believe I belong to Latin America. When people ask me where I am from, I say yes from Honduras, but also “Latina”. So, for all the “latinos” with love I tell you that we need to keep promoting our culture of happiness, joy, dance, smiles, and hugging people – because the world needs love every day more. And well, for the ones that want to learn Spanish, learn Spanish because it’s such a beautiful language! It is spoken di?erently sometimes, with di?erent accents, like my friends of Cuba or Argentina. I am not very good imitating accents but I found it beautiful that we are all part of one culture, one language but we are all so different. A kiss!",,Get a free Spanish lesson with italki: http://promos.italki.com/wikitongues_spa,1 checked out of 1,,47,,,,1,,f5ah6REtNmg,https://youtu.be/f5ah6REtNmg,"38,400,000 in Spain (ELDIA 2012). Population total all countries: 414,170,030. L2 users: 7,490,000 in Spain (ELDIA 2006).","Indo-European, Italic, Romance, Italo-Western, Western, Gallo-Iberian, Ibero-Romance, West Iberian, Castilian",Indo-European,§Central American Spanish,,"Eurasia, Eurasia",,2016-1-9,,https://www.dropbox.com/sh/lqdiac6wh4iispn/AABAKh7kzxLfgVpQB4l1OkqKa?dl=0 +Amu_20140729_tso,Amu__20140729,Lindie_Botes_20130919,7/29/2014,Screen Shot 2017-03-01 at 16.53.34.png (https://dl.airtable.com/82hQnN4ShKIwrYxiQi7I_Screen%20Shot%202017-03-01%20at%2016.53.34.png),Amu_s1_M_20140729_tso.jpg (https://dl.airtable.com/H3VUO68HRXWsGsOSOMus_Amu_s1_M_20140729_tso.jpg),tso,,Tsonga,XiTsonga,,Unknown Variant,Japan,3/21/2017,Public,CC BY-NC 3.0,checked,,,,,,1 checked out of 1,,92,Facebook,2017-5-2,https://www.facebook.com/wikitongues/videos/1432324263498763/,1,,HXg_tCZfuWg,https://youtu.be/HXg_tCZfuWg,"2,280,000 in South Africa (2011 census), increasing. Population total all countries: 4,009,000. L2 users: 3,400,000 in South Africa.","Niger-Congo, Atlantic-Congo, Volta-Congo, Benue-Congo, Bantoid, Southern, Narrow Bantu, Central, S, Tswa-Rhonga (S.53)",Niger-Congo,§XiTsonga,,Africa,,2016-1-9,, +Khulan_20160726_mon,Khulan__20160726,Elise_Lieberman_20160622,7/26/2016,Screen Shot 2016-09-13 at 20.03.47.png (https://dl.airtable.com/36w6r5gQhi0bm5oDqq4M_Screen%20Shot%202016-09-13%20at%2020.03.47.png),Khulan_s1_F_20160726_mon.jpg (https://dl.airtable.com/KpVJxfiPQTuwBEOZ16Kk_Khulan_s1_F_20160726_mon.jpg),mon,,Mongolian,,,,Japan,9/13/2016,Public,CC BY-NC 3.0,,,,,,Get a free Mongolian lesson with italki: http://promos.italki.com/wikitongues_mon,1 checked out of 1,,,Facebook,2017-9-12,https://www.facebook.com/wikitongues/videos/1574363485961506/,1,,7l8wsBlSCpQ,https://youtu.be/7l8wsBlSCpQ,"Population total all languages: 5,756,590.",,,§,,Eurasia,,2016-8-5,, +Angelo_20130311_por,Angelo__20130311,Daniel_BogreUdell_20130101,3/11/2013,angelo.png (https://dl.airtable.com/Phd23QWSTbSEyHwtmNMZ_angelo.png),Angelo_s1_M_20130311_por.jpg (https://dl.airtable.com/Fp6gi2BoT1eqCll20ybP_Angelo_s1_M_20130311_por.jpg),por,,Portuguese,,,,Japan,3/11/2013,Public,Standard,,,,,,Get a free Portuguese lesson with italki: http://promos.italki.com/wikitongues_por,1 checked out of 1,checked,,,,,1,checked,jBDZOm0HXO4,https://youtu.be/jBDZOm0HXO4,"10,000,000 in Portugal (ELDIA 2012). Population total all countries: 203,349,200.","Indo-European, Italic, Romance, Italo-Western, Western, Gallo-Iberian, Ibero-Romance, West Iberian, Portuguese-Galician",Indo-European,"Portuguese,,,,,",,"Eurasia, Eurasia",,2014-12-22,, +André_20140408_por,André__20140408,André__20140408,4/8/2014,andre.png (https://dl.airtable.com/pti3XjyRVOWYv2hv3U2c_andre.png),Andre_s1_M_20140408_por.jpg (https://dl.airtable.com/QKLJE1eTCOw5KRnHEdzz_Andre_s1_M_20140408_por.jpg),por,,Portuguese,,,,Japan,4/8/2014,Public,Standard,,,,,,Get a free Portuguese lesson with italki: http://promos.italki.com/wikitongues_por,1 checked out of 1,checked,,,,,1,checked,OYM5kq9aHkQ,https://youtu.be/OYM5kq9aHkQ,"10,000,000 in Portugal (ELDIA 2012). Population total all countries: 203,349,200.","Indo-European, Italic, Romance, Italo-Western, Western, Gallo-Iberian, Ibero-Romance, West Iberian, Portuguese-Galician",Indo-European,"Portuguese,,,,,",,"Eurasia, Eurasia",,2014-12-22,, +Marty_20150904_eng+fra+aln,Marty__20150904,Plator_Gashi_20140702,9/4/2015,marty-engfraaln-thumb-raw.png (https://dl.airtable.com/kbhA4SsaTWGn796mb4pS_marty-engfraaln-thumb-raw.png),,"eng,fra,aln",,"English, French, Albanian, Gheg",,,,Kosovo,,To Upload,Standard,,,,,,"Get a free English lesson with italki: http://promos.italki.com/wikitongues_eng, Get a free French lesson with italki: http://promos.italki.com/wikitongues_fra",3 checked out of 3,,83,,,,3,,,No ID,"55,600,000 in United Kingdom (ELDIA 2012). Population total all countries: 335,148,868. L2 users: 1,500,000 in United Kingdom (Crystal 2003). L2 users worldwide: 505,000,000., 60,000,000 in France (ELDIA 2012). Population total all countries: 74,980,460., 1,630,000 in Serbia. Population total all countries: 3,486,100. Ethnic population: 2,000,000 (1998 Los Angeles Times).","Indo-European, Germanic, West, English, Indo-European, Italic, Romance, Italo-Western, Western, Gallo-Iberian, Gallo-Romance, Gallo-Rhaetian, Oïl, French, Indo-European, Albanian, Gheg",Indo-European,§,,"Eurasia, Eurasia, Eurasia, Eurasia, Americas, Eurasia, Eurasia, Eurasia, Eurasia",,2015-9-14,, +Mario_20150624_gsw,Mario__20150624,Plator_Gashi_20140702,6/24/2015,mario-gsw-thumb-raw.png (https://dl.airtable.com/lxTD6yJJTTu0sksv4Lkh_mario-gsw-thumb-raw.png),,gsw,,"German, Swiss",,,,Kosovo,,To Upload,CC BY-NC 3.0,checked,,,,,,1 checked out of 1,,78,,,,1,,,No ID,"4,640,000 in Switzerland (2000 census). Population total all countries: 6,469,000.","Indo-European, Germanic, West, High German, German, Upper German, Alemannic",Indo-European,§,,"Eurasia, Eurasia",,2015-6-28,, +Kostika_20141128_rup,Kostika__20141128,Plator_Gashi_20140702,11/28/2014,kostika-rup-thumb-raw.png (https://dl.airtable.com/lrUeWSkRAu7ILm2nKMJA_kostika-rup-thumb-raw.png),,rup,,Aromanian,,,,Kosovo,,Removed,Standard,,,,,,,1 checked out of 1,,88,,,,1,,,No ID,"50,000 in Greece (Salminen 1993). Population total all countries: 114,340. Ethnic population: 700,000 ( Association of French Aromanians).","Indo-European, Italic, Romance, Eastern",Indo-European,§,,Eurasia,,2014-12-22,, +Stefano_20140729_scn,Stefano__20140729,Plator_Gashi_20140702,7/29/2014,stefano-unknown-thumb-raw.png (https://dl.airtable.com/MTRsrnqR7WJEyKhDCX8Q_stefano-unknown-thumb-raw.png),,scn,,Sicilian,Calabrese ,,"Classification,Unknown Variant",Kosovo,,To Upload,Standard,,,,,"Most likely either Sicilian or Neopolitean +",,1 checked out of 1,,79,,,,1,,,No ID,"4,700,000 (2002).","Indo-European, Italic, Romance, Italo-Western, Italo-Dalmatian",Indo-European,§Calabrese ,,Eurasia,,2015-2-7,, +Plator_20140702_aln,Plator_Gashi_20140702,Plator_Gashi_20140702,7/2/2014,plator.png (https://dl.airtable.com/3X02TOKLTpWvKsi1Wyu9_plator.png),Plator_s1_M_20140702_aln.jpg (https://dl.airtable.com/l9bBdesRMy3xNrn2s9t2_Plator_s1_M_20140702_aln.jpg),aln,,"Albanian, Gheg",,,,Kosovo,7/2/2014,Public,Standard,,,,,,,1 checked out of 1,,,Facebook,,,1,checked,gygesoisNhw,https://youtu.be/gygesoisNhw,"1,630,000 in Serbia. Population total all countries: 3,486,100. Ethnic population: 2,000,000 (1998 Los Angeles Times).","Indo-European, Albanian, Gheg",Indo-European,"Gheg Albanian,,,,,",,"Eurasia, Eurasia",,2014-12-22,, +Sorcha_20140828_gle,Sorcha__20140828,Plator_Gashi_20140702,8/28/2014,sorcha.png (https://dl.airtable.com/wFIYefGnTPumznfYVxUM_sorcha.png),Sorcha_s1_F_20140828_gle.jpg (https://dl.airtable.com/po4ZYleSQea5iDmsHNTP_Sorcha_s1_F_20140828_gle.jpg),gle,,Irish,,,,Kosovo,8/28/2014,Public,Standard,,,,,,Get a free Irish lesson with italki: http://promos.italki.com/wikitongues_gle,1 checked out of 1,checked,,,,,1,checked,674za6Yr3Po,https://youtu.be/674za6Yr3Po,"138,000 in Ireland (ELDIA 2012). Population total all countries: 276,310. L2 users: 1,000,000 in Ireland (ELDIA 2012).","Indo-European, Celtic, Insular, Goidelic",Indo-European,"Irish,,,,,",,Eurasia,,2014-12-22,, +Milen_20140902_bul,Milen__20140902,Plator_Gashi_20140702,9/2/2014,benjamin.png (https://dl.airtable.com/BXew4ZXCSOaPlzvifN6w_benjamin.png),Milen_s1_M_20140902_bul.jpg (https://dl.airtable.com/7r7cLZsURlWUrBSn8fg6_Milen_s1_M_20140902_bul.jpg),bul,,Bulgarian,,,,Kosovo,9/2/2014,Public,Standard,,,,,,Get a free Bulgarian lesson with italki: http://promos.italki.com/wikitongues_bul,1 checked out of 1,checked,,,,,1,checked,57m0PfhE68c,https://youtu.be/57m0PfhE68c,"7,020,000 in Bulgaria (ELDIA 2012). Population total all countries: 8,157,770.","Indo-European, Slavic, South, Eastern",Indo-European,"Bulgarian,,,,,",,Eurasia,,2014-12-22,, +Suna_20140930_bgx,Suna__20140930,Plator_Gashi_20140702,9/30/2014,suna.png (https://dl.airtable.com/EIyFjhorRhaRQJSEeDJp_suna.png),Suna_s1_F_20140930_bgx.jpg (https://dl.airtable.com/rOyAhiqSQqaiUZNQrRAg_Suna_s1_F_20140930_bgx.jpg),bgx,,Balkan Gagauz Turkish,,,,Kosovo,9/30/2014,Public,Standard,,,,,,,1 checked out of 1,,,,,,1,checked,CW8z9FeyOZ0,https://youtu.be/CW8z9FeyOZ0,"327,000 in Turkey (Johnstone 1993). 7,000 Surguch (1965) and 320,000 Yuruk. Population total all countries: 331,000.","Altaic, Turkic, Southern, Turkish",Altaic,"Balkan Gagauz Turkish,,,,,",,"Eurasia, Eurasia",,2014-12-22,, +Mirela_20141002_bos,Mirela__20141002,Plator_Gashi_20140702,10/2/2014,mirela.png (https://dl.airtable.com/XflrE2NWRRMQrNdTyBwA_mirela.png),Mirela_s1_F_20141002_bos.jpg (https://dl.airtable.com/Er4PjU0LSwOHge6DgJqU_Mirela_s1_F_20141002_bos.jpg),bos,,Bosnian,,,,Kosovo,10/2/2014,Public,Standard,,,,,,Get a free Bosnian lesson with italki: http://promos.italki.com/wikitongues_bos,1 checked out of 1,checked,,,,,1,checked,sQXzn-H0kjY,https://youtu.be/sQXzn-H0kjY,"2,000,000 in Bosnia and Herzegovina (2004). Population total all countries: 2,225,290.","Indo-European, Slavic, South, Western",Indo-European,"Bosnian,,,,,",,"Eurasia, Eurasia, Eurasia",,2014-12-22,, +Mirjana_20141030_srp,Mirjana__20141030,Plator_Gashi_20140702,10/30/2014,mirjana.png (https://dl.airtable.com/gHoK625JS2e0TgyB9t2s_mirjana.png),Mirjana_s1_F_20141030_srp.jpg (https://dl.airtable.com/v2SRPeRyQwmRfeNeKS8Y_Mirjana_s1_F_20141030_srp.jpg),srp,,Serbian,,,,Kosovo,10/30/2014,Public,Standard,,,,,,Get a free Serbian lesson with italki: http://promos.italki.com/wikitongues_srp,1 checked out of 1,checked,,,,,1,checked,2asptk633iA,https://youtu.be/2asptk633iA,"6,620,000 in Serbia (2002 census). Population total all countries: 8,957,906.","Indo-European, Slavic, South, Western",Indo-European,"Serbian,,,,,",,"Eurasia, Eurasia, Eurasia",,2014-12-22,, +Daut_20141104_rmn,Daut__20141104,Plator_Gashi_20140702,11/4/2014,daut.png (https://dl.airtable.com/oxM3NyQuC76MXgO17ArQ_daut.png),maxresdefault (6).jpg (https://dl.airtable.com/QDfUsuAoTpyu1ZG516SC_maxresdefault%20(6).jpg),rmn,,"Romani, Balkan",Romani (Standard),,Unknown Variant,Kosovo,11/4/2014,Public,Standard,,,,,,,1 checked out of 1,,,,,,1,checked,zLTgmdLaQJ4,https://youtu.be/zLTgmdLaQJ4,"120,000 in Serbia. 100,000 Arlija, 20,000 Dzambazi. Population total all countries: 589,800.","Indo-European, Indo-Iranian, Indo-Aryan, Central zone, Romani, Balkan",Indo-European,"Romani,,,,,",,Eurasia,,2014-12-22,, +Ela_20141113_tur,Ela__20141113,Plator_Gashi_20140702,11/13/2014,ela.png (https://dl.airtable.com/5zkThPzBSB6PRbL3soLW_ela.png),Ela_s1_F_20141113_tur.jpg (https://dl.airtable.com/b19yiBQFTkGnXpZASSOW_Ela_s1_F_20141113_tur.jpg),tur,,Turkish,,,,Kosovo,11/13/2014,Public,Standard,,,,,,Get a free Turkish lesson with italki: http://promos.italki.com/wikitongues_tur,1 checked out of 1,checked,,,,,1,checked,rEJb7j61-es,https://youtu.be/rEJb7j61-es,"66,500,000 in Turkey (ELDIA 2006). Population total all countries: 70,805,930. L2 users: 350,000 in Turkey (ELDIA 2006).","Altaic, Turkic, Southern, Turkish",Altaic,"Turkish,,,,,",,"Eurasia, Eurasia",,2014-12-22,, +Anneli_20141120_swe,Anneli__20141120,Plator_Gashi_20140702,11/20/2014,anneli.png (https://dl.airtable.com/Zhct4263R329TKhuwePI_anneli.png),Anneli_s1_F_20141120_swe.png (https://dl.airtable.com/kHkUcYmHTc6K6mhpM1a9_Anneli_s1_F_20141120_swe.png),swe,,Swedish,,,,Kosovo,11/20/2014,Public,Standard,,,,,,Get a free Swedish lesson with italki: http://promos.italki.com/wikitongues_swe,1 checked out of 1,checked,,Facebook,2016-10-24,https://www.facebook.com/wikitongues/videos/1238799256184599/,1,checked,o6FUP_2RmcI,https://youtu.be/o6FUP_2RmcI,"8,840,000 in Sweden (ELDIA 2012). 5,000 speakers of Gutniska (1998 S. Håkansson), and 30,000 of Jamska. Population total all countries: 9,197,090.","Indo-European, Germanic, North, East Scandinavian, Danish-Swedish, Swedish",Indo-European,"Swedish,,,,,",,Eurasia,,2014-12-22,, +Julian_20141125_sqi,Julian__20141125,Plator_Gashi_20140702,11/25/2014,julian.png (https://dl.airtable.com/F9LUA3lUQtmHbMnnbC4E_julian.png),Julian_s1_M_20141125_sqi.jpg (https://dl.airtable.com/M91Z1Ua3TNyKpI9zlEC9_Julian_s1_M_20141125_sqi.jpg),sqi,,Albanian,,,,Kosovo,11/25/2014,Public,Standard,,,,,,,1 checked out of 1,,,,,,1,checked,T9JkzyrvbP4,https://youtu.be/T9JkzyrvbP4,"Population total all languages: 5,414,300.",,,"Albanian,,,,,",,Eurasia,,2014-12-22,, +Artur_20150101_glg,Artur__20150101,Plator_Gashi_20140702,1/1/2015,artur.png (https://dl.airtable.com/EiwoIgDFRmKWRC9nPiz3_artur.png),Artur_s1_M_20150101_glg.jpg (https://dl.airtable.com/Ht8rOF7QTeHEExlOA5eQ_Artur_s1_M_20150101_glg.jpg),glg,,Galician,,,,Kosovo,1/1/2015,Public,Standard,,,,,,Get a free Galician lesson with italki: http://promos.italki.com/wikitongues_glg,1 checked out of 1,checked,,,,,1,checked,qJVY25bli80,https://youtu.be/qJVY25bli80,"2,340,000 in Spain (ELDIA 2012). Population total all countries: 2,355,000.","Indo-European, Italic, Romance, Italo-Western, Western, Gallo-Iberian, Ibero-Romance, West Iberian, Portuguese-Galician",Indo-European,"Catalan,,,,,",,Eurasia,,2014-12-22,, +Ajriz_20150103_-gor,Ajriz__20150103,Plator_Gashi_20140702,1/3/2015,Screen Shot 2016-07-25 at 5.02.44 PM.png (https://dl.airtable.com/WMfuBl93TbJmLVsMQjwL_Screen%20Shot%202016-07-25%20at%205.02.44%20PM.png),Ajriz_s0_M_20150103_.png (https://dl.airtable.com/ZkCyMMCdTDmmOtFiRmCf_Ajriz_s0_M_20150103_.png),-gor,,Gorani Našinski,,,,Kosovo,1/3/2015,Public,CC BY-NC 3.0,checked,,,,,,1 checked out of 1,,,,,,1,checked,0c5vl2Vx0wQ,https://youtu.be/0c5vl2Vx0wQ,,,,"Gorani Našinski,,,,,",,,,2016-1-19,, +Janek_20150115_pol,Janek__20150115,Plator_Gashi_20140702,1/15/2015,janek.png (https://dl.airtable.com/55Up65T4aqEKGhTyTV2A_janek.png),Janek_s1_M_20150115_pol.jpg (https://dl.airtable.com/P710gMWIS1GqHoYYSpvi_Janek_s1_M_20150115_pol.jpg),pol,,Polish,,,,Kosovo,1/15/2015,Public,Standard,,,,,,Get a free Polish lesson with italki: http://promos.italki.com/wikitongues_pol,1 checked out of 1,checked,,,,,1,checked,9pBaJojzNOI,https://youtu.be/9pBaJojzNOI,"36,600,000 in Poland (ELDIA 2012). Population total all countries: 38,663,780.","Indo-European, Slavic, West, Lechitic",Indo-European,"Polish,,,,,",,Eurasia,,2014-12-22,, +Nikolin_20150117_rup,Nikolin__20150117,Plator_Gashi_20140702,1/17/2015,,,rup,,Aromanian,,,,Kosovo,1/17/2015,Removed,Standard,,,,,"Removed upon request +",,1 checked out of 1,,,,,,1,,,No ID,"50,000 in Greece (Salminen 1993). Population total all countries: 114,340. Ethnic population: 700,000 ( Association of French Aromanians).","Indo-European, Italic, Romance, Eastern",Indo-European,§,,Eurasia,,2014-12-22,, +Drita_20150210_ysl,Drita__20150210,Plator_Gashi_20140702,2/10/2015,drita-ysl-thumb-raw.png (https://dl.airtable.com/5lCBwy9HQjCSUUdHO5WG_drita-ysl-thumb-raw.png),drita-ysl-thumb.jpg (https://dl.airtable.com/pvNxCh9CSGu8S2x63IG9_drita-ysl-thumb.jpg),ysl,,Yugoslavian Sign Language,Kosovar Sign Language,,,Kosovo,2/10/2015,Public,Standard,,,,,,,1 checked out of 1,,,,,,1,checked,SGTGWJf4dWw,https://youtu.be/SGTGWJf4dWw,"30,000 users out of 60,000 deaf persons in former larger Yugoslavia (Van Cleve 1986).",Deaf sign language,,"Kosovar Sign Language,,,,,",,"Eurasia, Eurasia",,2015-2-7,, +Ilir_20150416_aln,Ilir__20150416,Plator_Gashi_20140702,4/16/2015,ilir-aln-thumb-raw.png (https://dl.airtable.com/EGExAqR3QGSisRxC0WSe_ilir-aln-thumb-raw.png),Ilir_s1_M_20150416_aln.jpg (https://dl.airtable.com/9fitL8s5T2KF4F4PmMrw_Ilir_s1_M_20150416_aln.jpg),aln,,"Albanian, Gheg",,,,Kosovo,4/16/2015,Public,Standard,,,,,,,1 checked out of 1,,,,,,1,checked,Z5B7eKSJHBQ,https://youtu.be/Z5B7eKSJHBQ,"1,630,000 in Serbia. Population total all countries: 3,486,100. Ethnic population: 2,000,000 (1998 Los Angeles Times).","Indo-European, Albanian, Gheg",Indo-European,"Gheg Albanian,,,,,",,"Eurasia, Eurasia",,2015-4-14,, +Liisi_20150804_est,Liisi__20150804,Plator_Gashi_20140702,8/4/2015,liisi-est-thumb-raw.png (https://dl.airtable.com/Q0FzXM55RPmUOlpo297t_liisi-est-thumb-raw.png),Liisi_s1_F_20150804_est.png (https://dl.airtable.com/ldYz9E7FS4qWeV3EmVC4_Liisi_s1_F_20150804_est.png),est,,Estonian,,,,Kosovo,8/12/2015,Public,Standard,,,,,,Get a free Estonian lesson with italki: http://promos.italki.com/wikitongues_est,1 checked out of 1,checked,,,,,1,checked,Vbpr0ryoroA,https://youtu.be/Vbpr0ryoroA,"Population total all languages: 1,165,400.",,,"Estonian,,,,,",,Eurasia,,2015-8-10,, +Matic_20151010_slv,Matic__20151010,Plator_Gashi_20140702,10/10/2015,matic-slv-thumb-raw.png (https://dl.airtable.com/kt8P1q4XTYurSmm4fx3D_matic-slv-thumb-raw.png),Matic_s1_M_20151010_slv.jpg (https://dl.airtable.com/K0RjPdy4SWmK1TEmxOKr_Matic_s1_M_20151010_slv.jpg),slv,,Slovene,,,,Kosovo,10/12/2015,Public,Standard,,,,,,,1 checked out of 1,,,,,,1,checked,nQmB8u7aBZs,https://youtu.be/nQmB8u7aBZs,"1,910,000 in Slovenia (ELDIA 2012). Population total all countries: 2,085,160.","Indo-European, Slavic, South, Western",Indo-European,"Slovene,,,,,",,Eurasia,,2015-2-7,, +Erika_20150904_lit,Erika__20150904,Plator_Gashi_20140702,9/4/2015,"Screen Shot 2017-05-11 at 19.43.02.png (https://dl.airtable.com/7Jon3sM1QpmjBwIFQa1f_Screen%20Shot%202017-05-11%20at%2019.43.02.png),Screen Shot 2017-05-11 at 19.43.33.png (https://dl.airtable.com/DEKR0WLiR56r4QT9um1b_Screen%20Shot%202017-05-11%20at%2019.43.33.png),Screen Shot 2017-05-11 at 19.43.03.png (https://dl.airtable.com/y6T6hIrCT9C4HkKVGylR_Screen%20Shot%202017-05-11%20at%2019.43.03.png),Screen Shot 2017-05-11 at 19.42.19.png (https://dl.airtable.com/TaO4jUURmGmMV5eimtWM_Screen%20Shot%202017-05-11%20at%2019.42.19.png),Screen Shot 2017-05-11 at 19.43.31 1.png (https://dl.airtable.com/gUi4jOGPQbKoK77aZA0G_Screen%20Shot%202017-05-11%20at%2019.43.31%201.png)",erika-lit-thumb.png (https://dl.airtable.com/0WMBP00sSMWPyRJ4Yonf_erika-lit-thumb.png),lit,,Lithuanian,,,,Kosovo,10/15/2015,Public,Standard,,,,,,,1 checked out of 1,,,,,,1,checked,q_EJdzfnPSg,https://youtu.be/q_EJdzfnPSg,"2,800,000 in Lithuania (ELDIA 2012). Population total all countries: 3,001,860.","Indo-European, Baltic, Eastern",Indo-European,"Lithuanian,,,,,",,Eurasia,,2015-9-14,, +Enkelejd_20151027_als,Enkelejd__20151027,Plator_Gashi_20140702,10/27/2015,enkelejd-als-thumb-raw.png (https://dl.airtable.com/TwvgJUTlTyegJSmLbHLO_enkelejd-als-thumb-raw.png),maxresdefault.jpg (https://dl.airtable.com/E2AxjhQmQWRE3wz86kSZ_maxresdefault.jpg),als,,"Albanian, Tosk",,,,Kosovo,11/1/2015,Public,Standard,,,,,,,1 checked out of 1,,,,,,1,checked,3Ptre1OzsJ4,https://youtu.be/3Ptre1OzsJ4,"1,570,000 in Albania (2011 census). Population total all countries: 1,778,200. Ethnic population: 2,310,000 ethnic Albanians (2011 census).","Indo-European, Albanian, Tosk",Indo-European,"Tosk Albanian,,,,,",,Eurasia,,2015-9-14,, +Pavel_20151105_bel,Pavel__20151105,Plator_Gashi_20140702,11/5/2015,pavel-bel-thumb-raw.png (https://dl.airtable.com/axQPXIbfSQGYWepx9Bwf_pavel-bel-thumb-raw.png),maxresdefault (1).jpg (https://dl.airtable.com/G5O24byGSamYiSCVKAco_maxresdefault%20(1).jpg),bel,bel,Belarusan,,,,Kosovo,11/5/2015,Public,CC BY-NC 3.0,checked,,,,,,1 checked out of 1,,,Facebook,2017-7-29,https://www.facebook.com/wikitongues/videos/1533604033370785/,1,checked,MfS4oDLBpp0,https://youtu.be/MfS4oDLBpp0,"2,220,000 in Belarus (2009 census). The majority of Belarusans speak Russian , as their L1. Population total all countries: 3,312,610. Ethnic population: 7,960,000 (2009 census).","Indo-European, Slavic, East",Indo-European,"Belarusian,,,,,",,Eurasia,,2015-7-9,, +Rejzka_20151107_hsb,Rejzka__20151107,Plator_Gashi_20140702,11/7/2015,rejzka-hsb-thumb-raw.png (https://dl.airtable.com/QjpzXWxoRpim03nigshU_rejzka-hsb-thumb-raw.png),rejzka-hsb-thumb.jpg (https://dl.airtable.com/q0kmUVdDRRym9E9CLTNy_rejzka-hsb-thumb.jpg),hsb,,"Sorbian, Upper",,,,Kosovo,11/7/2015,Public,Standard,,,,,,,1 checked out of 1,,,,,,1,checked,Ph5MuSHtgS0,https://youtu.be/Ph5MuSHtgS0,"13,300 in Germany (Salminen 2007). 20,000–30,000 total Sorbian, one-third in lower Lusatia and two-thirds in upper Lusatia (Salminen 2007). Population total all countries: 13,490. Ethnic population: 45,000.","Indo-European, Slavic, West, Sorbian",Indo-European,"Upper Sorbian,,,,,",,Eurasia,,2015-2-7,, +Dragan_20151110_mkd,Dragan__20151110,Plator_Gashi_20140702,11/10/2015,dragan-mkd-thumb-raw.jpg (https://dl.airtable.com/L4QkZmBCSaTVALyeL9cv_dragan-mkd-thumb-raw.jpg),dragan-mkd-thumb.jpg (https://dl.airtable.com/3Qy2xBoCSSGfM62Ceq4K_dragan-mkd-thumb.jpg),mkd,,Macedonian,,,,Kosovo,11/10/2015,Public,Standard,,,,,,,1 checked out of 1,,,,,,1,checked,HHjmbeH7iM8,https://youtu.be/HHjmbeH7iM8,"1,340,000 in Macedonia (2011 census). Population total all countries: 1,407,810.","Indo-European, Slavic, South, Eastern",Indo-European,"Macedonian,,,,,",,Eurasia,,2015-2-7,, +Sebastijan_20151112_hrv,Sebastijan__20151112,Plator_Gashi_20140702,11/12/2015,sebastian-hkv-thumb-raw.png (https://dl.airtable.com/PlHqfe5RQWu0IvIpb0LM_sebastian-hkv-thumb-raw.png),sebastian-hkv-thumb.jpg (https://dl.airtable.com/z9Z14pySgiGSpuBNiP73_sebastian-hkv-thumb.jpg),hrv,,Croatian,,,,Kosovo,11/12/2015,Public,CC BY-NC 3.0,checked,,,,,,1 checked out of 1,,,,,,1,checked,xJat2lF9Aio,https://youtu.be/xJat2lF9Aio,"4,200,000 in Croatia (ELDIA 2006). Population total all countries: 5,752,090.","Indo-European, Slavic, South, Western",Indo-European,"Croatian,,,,,",,"Eurasia, Eurasia, Eurasia",,2015-6-28,, +Giuseppina_20151208_aae,Giuseppina__20151208,Plator_Gashi_20140702,12/8/2015,giuseppina-aee.png (https://dl.airtable.com/dutcTRBMRbF3R4JdYHve_giuseppina-aee.png),maxresdefault (3).jpg (https://dl.airtable.com/c7g752mRySG000EEgvhj_maxresdefault%20(3).jpg),aae,,"Albanian, Arbëreshë",,,,Kosovo,12/8/2015,Public,Standard,,,,,,,1 checked out of 1,,,,2016-7-4,,1,checked,N_WS0_9PZgw,https://youtu.be/N_WS0_9PZgw,"100,000 (Salminen 2007). Ethnic population: 260,000 (Stephens 1976).","Indo-European, Albanian, Tosk",Indo-European,"Arbëresh Albanian,,,,,",,Eurasia,,2015-9-14,, +Orsolya_20151201_hun,Orsolya__20151201,Plator_Gashi_20140702,12/1/2015,"orsolya-hun-thumb-raw.png (https://dl.airtable.com/qaFYDrBOTTmVrbTCeLGT_orsolya-hun-thumb-raw.png),orsolya-hun-thumb-raw.png (https://dl.airtable.com/HNrQvEdiTmOpEnF8ICsb_orsolya-hun-thumb-raw.png)",Orsolya_s1_F_20151201_hun.jpg (https://dl.airtable.com/i0d9fP16Rfi41mredOPy_Orsolya_s1_F_20151201_hun.jpg),hun,,Hungarian,,,,Kosovo,2/23/2016,Public,Standard,,,,,,,1 checked out of 1,,13,,,,1,checked,i9WbGqPeY8k,https://youtu.be/i9WbGqPeY8k,"9,840,000 in Hungary (ELDIA 2012). Population total all countries: 12,606,130.",Uralic,,§,,Eurasia,,2015-12-1,, +Dragan_20150904_srp,Dragan__20150904,Plator_Gashi_20140702,9/4/2015,dragan-srp-thumb-raw.png (https://dl.airtable.com/xXtadzXrRKOoAxaHsu7A_dragan-srp-thumb-raw.png),Dragan speaking Serbian.jpg (https://dl.airtable.com/NEjqsWIETaU6oob9IhYo_Dragan%20speaking%20Serbian.jpg),srp,,Serbian,,,,Kosovo,3/17/2016,Public,Standard,,,,,,Get a free Serbian lesson with italki: http://promos.italki.com/wikitongues_srp,1 checked out of 1,,23,,,,1,checked,HHjmbeH7iM8,https://youtu.be/HHjmbeH7iM8,"6,620,000 in Serbia (2002 census). Population total all countries: 8,957,906.","Indo-European, Slavic, South, Western",Indo-European,§,,"Eurasia, Eurasia, Eurasia",,2015-9-14,, +Stefano_20150904_aae,Stefano__20150904,Plator_Gashi_20140702,9/4/2015,stefano-aae-thumb-raw.png (https://dl.airtable.com/rCQPwfKkSnCZoyhJ0fSs_stefano-aae-thumb-raw.png),Stefano speaking Arbëresh.jpg (https://dl.airtable.com/nmFHElYbR6i8yVTbeMJT_Stefano%20speaking%20Arbe%CC%88resh.jpg),aae,,"Albanian, Arbëreshë",,,,Kosovo,4/2/2016,Public,Standard,,,,,,,1 checked out of 1,,30,,,,1,checked,m4l6NewVbes,https://youtu.be/m4l6NewVbes,"100,000 (Salminen 2007). Ethnic population: 260,000 (Stephens 1976).","Indo-European, Albanian, Tosk",Indo-European,§,,Eurasia,,2015-9-14,, +Max_20150904_fin+swe,Max__20150904,Plator_Gashi_20140702,9/4/2015,max-finswe-thumb-raw.png (https://dl.airtable.com/diSualOdSWuENG1ST7gv_max-finswe-thumb-raw.png),Max_s2_M_20150904_fin+swe.jpg (https://dl.airtable.com/SxhdDAYyTISs5lk560tK_Max_s2_M_20150904_fin%2Bswe.jpg),"fin,swe",,"Finnish, Swedish",,,,Kosovo,4/12/2016,Public,Standard,,,,,,"Get a free Finnish lesson with italki: http://promos.italki.com/wikitongues_fin, Get a free Swedish lesson with italki: http://promos.italki.com/wikitongues_swe",2 checked out of 2,,34,,,,2,checked,38mq_FwgCNs,https://youtu.be/38mq_FwgCNs,"5,100,000 in Finland (ELDIA 2012). 30,000 speakers of Tornedalen Finnish. Population total all countries: 5,392,180., 8,840,000 in Sweden (ELDIA 2012). 5,000 speakers of Gutniska (1998 S. Håkansson), and 30,000 of Jamska. Population total all countries: 9,197,090.","Uralic, Finnic, Indo-European, Germanic, North, East Scandinavian, Danish-Swedish, Swedish",Uralic,§,,"Eurasia, Eurasia",,2015-9-14,, +Benjamin_20150517_bos,Benjamin__20150517,Plator_Gashi_20140702,5/17/2015,benjamin-bos-thumb-raw.png (https://dl.airtable.com/0tORvHisT12e7Bgy9WLB_benjamin-bos-thumb-raw.png),Benjamin_s1_M_20150517_bos.jpg (https://dl.airtable.com/ZkYJlqVAS1eQqjY9lqAr_Benjamin_s1_M_20150517_bos.jpg),bos,,Bosnian,,,,Kosovo,6/8/2016,Public,CC BY-NC 3.0,checked,,,,,Get a free Bosnian lesson with italki: http://promos.italki.com/wikitongues_bos,1 checked out of 1,,37,,,,1,,Hh0nDkWeI5w,https://youtu.be/Hh0nDkWeI5w,"2,000,000 in Bosnia and Herzegovina (2004). Population total all countries: 2,225,290.","Indo-European, Slavic, South, Western",Indo-European,§,,"Eurasia, Eurasia, Eurasia",,2015-6-28,, +Irena_20150720_aln,Irena__20150720,Plator_Gashi_20140702,7/20/2015,Irena_s1_F_20150720_aln.png (https://dl.airtable.com/cWjDLKET8qwCfZ18buA6_Irena_s1_F_20150720_aln.png),Irena_s1_F_20150720_aln.jpg (https://dl.airtable.com/6x3MQiNER2CVUWt5KPc1_Irena_s1_F_20150720_aln.jpg),aln,,"Albanian, Gheg",,,,Kosovo,7/27/2016,Public,CC BY-NC 3.0,checked,,,,,,1 checked out of 1,,45,,,,1,,YKURmilQeTk,https://youtu.be/YKURmilQeTk,"1,630,000 in Serbia. Population total all countries: 3,486,100. Ethnic population: 2,000,000 (1998 Los Angeles Times).","Indo-European, Albanian, Gheg",Indo-European,§,,"Eurasia, Eurasia",,2015-7-20,, +Maxim_20150904_rus+sqi,Maxim__20150904,Plator_Gashi_20140702,9/4/2015,maxim-sqirus-thumb-raw.png (https://dl.airtable.com/BHKGDZYIT7S90ytU7Iqz_maxim-sqirus-thumb-raw.png),Maxim_s2_M_20150904_rus+sqi.jpg (https://dl.airtable.com/V25fy6eTWOAKAlwBpqmA_Maxim_s2_M_20150904_rus%2Bsqi.jpg),"rus,sqi",,"Russian, Albanian",,,,Kosovo,8/7/2016,Public,Standard,,,,,,Get a free Russian lesson with italki: http://promos.italki.com/wikitongues_rus,2 checked out of 2,,48,,,,2,,G1ZIzrAxWbA,https://youtu.be/G1ZIzrAxWbA,"137,000,000 in Russian Federation (2010 census). Population total all countries: 167,332,230., Population total all languages: 5,414,300.","Indo-European, Slavic, East",Indo-European,§,,"Eurasia, Eurasia, Eurasia",,2015-9-14,, +Gjyste_20150720_aln,Gjyste__20150720,Plator_Gashi_20140702,7/20/2015,gjyste-aln-thumb-raw.png (https://dl.airtable.com/kTWO2QQZekjeSzwMLFvQ_gjyste-aln-thumb-raw.png),Gjyste_s1_F_20150720_aln.jpg (https://dl.airtable.com/1rttbDGtRYGPtgy7kaYa_Gjyste_s1_F_20150720_aln.jpg),aln,,"Albanian, Gheg",,,,Kosovo,1/31/2017,Public,CC BY-NC 3.0,checked,,,,,,1 checked out of 1,,53,,,,1,,NSczRqnBvFU,https://youtu.be/NSczRqnBvFU,"1,630,000 in Serbia. Population total all countries: 3,486,100. Ethnic population: 2,000,000 (1998 Los Angeles Times).","Indo-European, Albanian, Gheg",Indo-European,§,,"Eurasia, Eurasia",,2015-7-20,, +Stere_20140729_rup,Stere__20140729,Plator_Gashi_20140702,7/29/2014,"stere-rup-thumb-raw.png (https://dl.airtable.com/FUEcpTOPQ6qvvE9iJgLj_stere-rup-thumb-raw.png),Screen Shot 2017-01-30 at 20.00.29.png (https://dl.airtable.com/5xlSPn7rRXLNGif6CV7P_Screen%20Shot%202017-01-30%20at%2020.00.29.png)",Stere_s1_M_20140729_rup.jpg (https://dl.airtable.com/6fHHP9a8QNqx8Hdw68k9_Stere_s1_M_20140729_rup.jpg),rup,,Aromanian,,,,Kosovo,2/9/2017,Public,Standard,,,,,,,1 checked out of 1,,71,,,,1,,bY8HBFwRE-w,https://youtu.be/bY8HBFwRE-w,"50,000 in Greece (Salminen 1993). Population total all countries: 114,340. Ethnic population: 700,000 ( Association of French Aromanians).","Indo-European, Italic, Romance, Eastern",Indo-European,§,"This video was recorded by Plator Gashi at a Youth of European Nationalities conference in Tirana, Albania. Romanian native Stere speaks his mother tongue, Aromanian, which is spoken by 250,000 people across eastern Europe — in particular Romania, Albania, Greece, Macedonia, Serbia, Bulgaria, and Turkey — with varying degrees of political recognition. An Eastern Romance language, Aromanian shares many similarities with the Romanian, Istro-Romanian, and Megleno-Romanian languages. Culturally, Aromanian speakers tend to identify eponymously ('Aromanians') or as 'Vlachs'.",Eurasia,,2015-2-7,, +Iasmin_20150612_yue+eng,Iasmin__20150612,Plator_Gashi_20140702,6/12/2015,jasmin-yue-thumb-raw.png (https://dl.airtable.com/IBz7gaHTpOKtZKAUqUib_jasmin-yue-thumb-raw.png),Iasmin_s2_F_20150612_yue+eng.jpg (https://dl.airtable.com/XPqbsI6bSF2g1cvSrKCJ_Iasmin_s2_F_20150612_yue%2Beng.jpg),"yue,eng",,"Chinese, Yue, English",Cantonese,,,Kosovo,3/16/2017,Public,CC BY-NC 3.0,checked,,,,,Get a free English lesson with italki: http://promos.italki.com/wikitongues_eng,2 checked out of 2,,64,,,,2,,xj26oHydbyE,https://youtu.be/xj26oHydbyE,"52,000,000 in China (1984). Population total all countries: 62,221,560., 55,600,000 in United Kingdom (ELDIA 2012). Population total all countries: 335,148,868. L2 users: 1,500,000 in United Kingdom (Crystal 2003). L2 users worldwide: 505,000,000.","Sino-Tibetan, Chinese, Indo-European, Germanic, West, English",Sino-Tibetan,§Cantonese,,"Eurasia, Eurasia, Eurasia",,2015-6-28,, +Lena_20140729_dan,Lena__20140729,Plator_Gashi_20140702,7/29/2014,"Screen Shot 2016-04-06 at 6.23.33 PM.png (https://dl.airtable.com/8BUvKW0aRrqOiXd4ERIK_Screen%20Shot%202016-04-06%20at%206.23.33%20PM.png),Screen Shot 2016-04-06 at 6.22.34 PM.png (https://dl.airtable.com/gXFagI20QF2XJfpBnH9x_Screen%20Shot%202016-04-06%20at%206.22.34%20PM.png),Screen Shot 2016-09-20 at 12.24.28 1.png (https://dl.airtable.com/0u2k0CQ7SAGYkTf7nCFj_Screen%20Shot%202016-09-20%20at%2012.24.28%201.png),Screen Shot 2016-09-20 at 12.26.56.png (https://dl.airtable.com/h8hEpGEoTwWGTsHQlsch_Screen%20Shot%202016-09-20%20at%2012.26.56.png),Screen Shot 2016-09-20 at 12.25.22.png (https://dl.airtable.com/c93EN0ULT5amNi2qNSvL_Screen%20Shot%202016-09-20%20at%2012.25.22.png),Screen Shot 2016-09-20 at 12.24.50.png (https://dl.airtable.com/704DKuycRxSDcw62X9CP_Screen%20Shot%202016-09-20%20at%2012.24.50.png),Screen Shot 2016-09-20 at 12.24.55.png (https://dl.airtable.com/YX3uvghBRGGriiSSkv6A_Screen%20Shot%202016-09-20%20at%2012.24.55.png)",Lena_s1_F_20140729_dan.jpg (https://dl.airtable.com/sdeL7US4SLsf2qARyywv_Lena_s1_F_20140729_dan.jpg),dan,"dan,eng",Danish,,,,Kosovo,3/28/2017,Public,Standard,,,,,,Get a free Danish lesson with italki: http://promos.italki.com/wikitongues_dan,1 checked out of 1,,84,,,,1,,89yLb3goapY,https://youtu.be/89yLb3goapY,"5,380,000 in Denmark (ELDIA 2012). Population total all countries: 5,522,490.","Indo-European, Germanic, North, East Scandinavian, Danish-Swedish, Danish-Riksmal, Danish",Indo-European,§,,Eurasia,,2015-2-7,,https://www.dropbox.com/sh/pm8ldecd41od2ca/AABsxmryYvY7FkNHj_Uff7nja?dl=0 +Slobodan_20140729_srp,Slobodan__20140729,Plator_Gashi_20140702,7/29/2014,Screen Shot 2017-06-01 at 14.00.23.png (https://dl.airtable.com/sD8akHDiQ72EKuNZFLdi_Screen%20Shot%202017-06-01%20at%2014.00.23.png),Slobodan_s1_M_20140729_srp.png (https://dl.airtable.com/W2Ij5DN8STOU5EYVW4B2_Slobodan_s1_M_20140729_srp.png),srp,,Serbian,,,,Kosovo,6/13/2017,Public,Standard,,,,,,Get a free Serbian lesson with italki: http://promos.italki.com/wikitongues_srp,1 checked out of 1,,81,,,,1,,hPozChGO_LA,https://youtu.be/hPozChGO_LA,"6,620,000 in Serbia (2002 census). Population total all countries: 8,957,906.","Indo-European, Slavic, South, Western",Indo-European,Serbian,"This video was recorded by Plator Gashi at the Youth of European Nationalities conference in Tirana, Albania. Serbian is spoken by as many as 10 million people, principally in the Balkan nation of Serbia, where it is the only official language, as well as in neighboring Kosovo and Bosnia-Herzegovina. A literary language since at least the 12th century CE, Serbian boasts an oral tradition of epic poetry, which was cultivated between the 15th and 19th centuries, during the period of Ottoman rule. One of two standardized varieties of Serbo-Croatian, it is a sister tongue of Croatian, and closely related to other Slavic languages, especially Slovene and Macedonian.","Eurasia, Eurasia, Eurasia",,2015-2-7,, +Riike_20140729_dan,Riike__20140729,Plator_Gashi_20140702,7/29/2014,Riike_20140729_dan.png (https://dl.airtable.com/iEJxJNQjSzyVxxXefIcJ_Riike_20140729_dan.png),Riike_20140729_dan.jpg (https://dl.airtable.com/Cd1tNKjFTI2JrNaqqeoD_Riike_20140729_dan.jpg),dan,,Danish,,,,Kosovo,9/16/2017,Public,Standard,,,,,,Get a free Danish lesson with italki: http://promos.italki.com/wikitongues_dan,1 checked out of 1,,58,,,,1,,f7Msppvklb0,https://youtu.be/f7Msppvklb0,"5,380,000 in Denmark (ELDIA 2012). Population total all countries: 5,522,490.","Indo-European, Germanic, North, East Scandinavian, Danish-Swedish, Danish-Riksmal, Danish",Indo-European,§,,Eurasia,,2015-2-7,, +Angel_20140729_rup,Angel__20140729,Plator_Gashi_20140702,7/29/2014,angel-rup-thumb-raw.png (https://dl.airtable.com/I6UMgVRThl5YxfvACVDw_angel-rup-thumb-raw.png),Angel_20140729_rup.jpg (https://dl.airtable.com/0svn8cxuRLmShLgSGsLv_Angel_20140729_rup.jpg),rup,,Aromanian,,,,Kosovo,12/28/2017,Public,Standard,,,,,,,1 checked out of 1,,86,,,,1,,vUeMj9_XrJA,https://youtu.be/vUeMj9_XrJA,"50,000 in Greece (Salminen 1993). Population total all countries: 114,340. Ethnic population: 700,000 ( Association of French Aromanians).","Indo-European, Italic, Romance, Eastern",Indo-European,§,"This video was recorded by Plator Gashi at a Youth of European Nationalities conference in Tirana, Albania. Romanian native Stere speaks his mother tongue, Aromanian, which is spoken by 250,000 people across eastern Europe — in particular Romania, Albania, Greece, Macedonia, Serbia, Bulgaria, and Turkey — with varying degrees of political recognition. An Eastern Romance language, Aromanian shares many similarities with the Istro-Romanian, and Megleno-Romanian, and Romanian languages. It is generally considered by linguists to be most similar to the latter, the greatest divergence being in vocabulary: whereas Slavic loanwords feature prominently in Romanian, Aromanian borrows more heavily from Greek. This is the historical result of closer contact between the Greek and Aromanian communities. Culturally, Aromanian speakers tend to identify eponymously ('Aromanians') or as 'Vlachs'.",Eurasia,,2015-2-7,, +Xheladin_20150720_aln,Xheladin__20150720,Plator_Gashi_20140702,7/20/2015,"xheladin-aln.png (https://dl.airtable.com/XopSb4QHQS6skVeYjnhV_xheladin-aln.png),Xheladin_20150720_aln.png (https://dl.airtable.com/gJdNJTWRQu6oHYZjCnEA_Xheladin_20150720_aln.png)",,aln,,"Albanian, Gheg",,,,Kosovo,1/31/2018,Public,CC BY-NC 3.0,checked,,,,,,1 checked out of 1,,55,,,,1,,Nop4WnhX-k4,https://youtu.be/Nop4WnhX-k4,"1,630,000 in Serbia. Population total all countries: 3,486,100. Ethnic population: 2,000,000 (1998 Los Angeles Times).","Indo-European, Albanian, Gheg",Indo-European,§,"This video was recorded by Plator Gashi, in Pristina, Kosovo. Gheg Albanian, also known simply as Gheg (sometimes written ‘Geg’) and by its speakers as ‘gegnisht’, ‘gegë’, and ‘gegërishtja’, is spoken by as many as four million people, primarily in the Southern European nation of Kosovo, as well as parts of Albania, Montenegro, Macedonia, and Serbia. A member of the Albanian dialect continuum, Gheg is perhaps closest to Tosk Albanian, the spoken variety upon which Standard Albanian is based. Despite its prevalence as a spoken language and a notable body of literature, Gheg, along with Tosk and Arbëresh, remains politically unrecognized throughout the Albanian-speaking world in favor of the literary standard. Speakers of Gheg tend to identify eponymously. As such, it is an example of what sociolinguists call an 'ethnolect'; that is, a language variety associated with a specific cultural or ethnic group.","Eurasia, Eurasia",,2015-7-20,, +Cristian_20150428_rup,Cristian__20150428,Plator_Gashi_20140702,4/28/2015,christian-rup-thumb-raw.png (https://dl.airtable.com/h4wrUCqqSkmpM1PtlPBr_christian-rup-thumb-raw.png),Cristian_20150428_rup.jpg (https://dl.airtable.com/JSC5XLYfQnkzFaALInHs_Cristian_20150428_rup.jpg),rup,,Aromanian,,,,Kosovo,2/27/2018,To Upload,CC BY-NC 3.0,checked,,,,,,1 checked out of 1,,75,,,,1,,uh9hePNiPfg,https://youtu.be/uh9hePNiPfg,"50,000 in Greece (Salminen 1993). Population total all countries: 114,340. Ethnic population: 700,000 ( Association of French Aromanians).","Indo-European, Italic, Romance, Eastern",Indo-European,§,"This video was recorded by Plator Gashi at a Youth of European Nationalities conference in Tirana, Albania. Aromanian, which is spoken by 250,000 people across eastern Europe — in particular Romania, Albania, Greece, Macedonia, Serbia, Bulgaria, and Turkey — with varying degrees of political recognition. An Eastern Romance language, Aromanian shares many similarities with the Istro-Romanian, and Megleno-Romanian, and Romanian languages. It is generally considered by linguists to be most similar to the latter, the greatest divergence being in vocabulary: whereas Slavic loanwords feature prominently in Romanian, Aromanian borrows more heavily from Greek. This is the historical result of closer contact between the Greek and Aromanian communities. Culturally, Aromanian speakers tend to identify eponymously ('Aromanians') or as 'Vlachs'.",Eurasia,,2015-6-28,, +La_20160510_lao,La__20160510,Lena_Nitsche_,5/10/2016,GyQ2dfpuRpqOa6sBJSQz.png (https://dl.airtable.com/ZvgF7q0NR6GZn5Pev3su_GyQ2dfpuRpqOa6sBJSQz.png),La_s1_F_20160510_lao.jpg (https://dl.airtable.com/mGhSw0rgTmaA7AOL332N_La_s1_F_20160510_lao.jpg),lao,,Lao,,,,Laos,6/9/2016,Public,Standard,,,,,,,1 checked out of 1,,,,,,1,,wFpaLd1Ddtk,https://youtu.be/wFpaLd1Ddtk,"3,070,000 in Laos (2005 census). Population total all countries: 3,273,180. L2 users: 800,000 in Laos.","Tai-Kadai, Kam-Tai, Tai, Southwestern",Tai-Kadai,§,,Eurasia,,2016-5-12,, +Anonymous_20160514_kjg,.Anonymous__,Lena_Nitsche_,5/14/2016,Screen Shot 2017-01-17 at 17.43.29.png (https://dl.airtable.com/vyaAjsVQO2dT4M5vAx3o_Screen%20Shot%202017-01-17%20at%2017.43.29.png),Anonymous_s1_M_20160514_kjg.jpg (https://dl.airtable.com/MY0XnMGHRU5xhQu5ml42_Anonymous_s1_M_20160514_kjg.jpg),kjg,,Khmu,,,,Laos,1/26/2017,Public,Standard,,,,,,,1 checked out of 1,,,,,,1,,p1YqLLFxl4k,https://youtu.be/p1YqLLFxl4k,"614,000 in Laos (2005 census). Population total all countries: 704,000.","Austro-Asiatic, Mon-Khmer, Northern Mon-Khmer, Khmuic, Mal-Khmu’, Khmu’",Austro-Asiatic,§,,Eurasia,,2016-5-16,, +Marks_20140502_lvs,Marks__20140502,Marks__20140502,5/2/2014,marks.png (https://dl.airtable.com/KeNem7XCRgiomylQZBlF_marks.png),Marks_s1_M_20140502_lvs.jpg (https://dl.airtable.com/peJCMQYzT9CumvwKgXnL_Marks_s1_M_20140502_lvs.jpg),lvs,,"Latvian, Standard",Latvian,,,Latvia,5/13/2014,Public,Standard,,,,,,,1 checked out of 1,,,,,,1,checked,H3g87x0nL1M,https://youtu.be/H3g87x0nL1M,"1,470,000 in Latvia (ELDIA 2012). Population total all countries: 1,552,260. L2 users: 497,000 in Latvia (ELDIA 2012).","Indo-European, Baltic, Eastern",Indo-European,"Latvian,,,,,",,Eurasia,,2014-12-22,, +Svend_20170727_-kre,Svend_Salha_20170727,Svend_Salha_20170727,7/27/2017,,,-kre,,Kreel,,,,Lebanon,,To Upload,CC BY-SA 4.0,checked,checked,"Thava, May sina est Svend, und Myan kralat kreel! Kreel est ah convulta lughtha. Ti est ah maghlan vo the faral, Arabeye, Allemanda, Dansk, Norsk, Svensk, Englisk, Finnish, Espana, Fransk, Itala, und Russk. Myan verkal toe av Aramana, und Latinae toe kreel. Searbal nasa, anvictil may mara convulta the lughtha. Ti est ah verk en vrosta, zo ti est envathom. Anskolda. Tae shaf kreel est ah lughtha fat bana alav ot the waaq, nae mi tol shaf ah vort wiv fes, balt ander lugthestala hazia ta. Zo mi emvlora tae ald, saad mo taeva kreel aktra! Vefar mi ghot, hare eart the kreel hartha. Wes tae bona.","Hello, my name is Svend, and I’m speaking kreel. Kreel is a constructed language. It is a mixture of the following, Arabic, German, Danish, Norwegian, Swedish, English, Finnish, Spanish, French, Italian, and Russian. I’m trying to add Armenian, and Latin to Kreel. Several people, including my dad constructed the language. It is a work in progress, so it is incomplete, sorry. You see kreel is a language that shifts a lot of the time, now I don’t see the problem with this, but other linguists sadly do. So I implore you all, help me develop kreel further. Now before I go here are the kreel letters, fare thee well.","Enjoy, and do lend a helping hand in kreel's development, thank you.",,1 checked out of 1,,,,,,1,,,No ID,,,,,,,,2017-7-27,, +Robertson_20180207_dnj,Robertson_DaikarkehYenglee_20180207,Stephen_Pasinski_,2/7/2018,,,dnj,,Dan,Gio,,,Liberia,,To Upload,CC BY-SA 4.0,checked,,,,,,1 checked out of 1,,,,,,1,,,No ID,"1,300,000 in Côte d’Ivoire (2012 V. Vydrin). 650,000 in Eastern Dan, 650,000 in western Dan. Population total all countries: 1,610,800.","Niger-Congo, Mande, Eastern, Southeastern, Guro-Tura, Tura-Dan-Mano, Tura-Dan",,,,"Africa, Africa, Africa, Africa",,2018-2-7,, +Musu_20180207_men,Musu_Foana_20180207,Stephen_Pasinski_,2/7/2018,,,men,,Mende,,,,Liberia,3/23/2018,To Upload,CC BY-SA 4.0,checked,,,,,,1 checked out of 1,,,,,,1,,,No ID,"1,480,000 in Sierra Leone (2006). Population total all countries: 1,499,700.","Niger-Congo, Mande, Western, Central-Southwestern, Southwestern, Mende-Loma, Mende-Bandi, Mende-Loko",,,,"Africa, Africa",,2018-2-7,, +Genesis_20180115_mev,Genesis_Gareah_20180115,Stephen_Pasinski_,1/15/2018,,,mev,,Mano,,,,Liberia,,To Upload,CC BY-SA 4.0,checked,,,,,,1 checked out of 1,,,,,,1,,,No ID,"305,000 in Liberia (2012 V. Vydrin). Population total all countries: 390,000.","Niger-Congo, Mande, Eastern, Southeastern, Guro-Tura, Tura-Dan-Mano, Mano",,,,Africa,,2018-1-15,Nimba_LR, +Jerry_20180115_xpe,Jerry_Togabah_20180115,Stephen_Pasinski_,1/15/2018,,,xpe,,"Kpelle, Liberia",Kpelle,,,Liberia,,To Upload,CC BY-SA 4.0,checked,,,,,,1 checked out of 1,,,,,,1,,,No ID,"760,000 (Vanderaa 1991).","Niger-Congo, Mande, Western, Central-Southwestern, Southwestern, Kpelle",,,,Africa,,2018-1-15,Bong_LR, +Varney+Omoru_20170527_vai,"Varney_Sama_20170527,Omoru_Dargor_20170527",Stephen_Pasinski_,5/27/2017,Screen Shot 2017-06-01 at 13.19.44.png (https://dl.airtable.com/xQFgqYSHTNKVlbHq9DB4_Screen%20Shot%202017-06-01%20at%2013.19.44.png),Varney and Omoru_s1_MM_20170527_vai.png (https://dl.airtable.com/5MNpgyhR780FtAVltAwu_Varney%20and%20Omoru_s1_MM_20170527_vai.png),vai,eng,Vai,,,,Liberia,6/3/2017,Public,CC BY-SA 4.0,checked,,,,,,1 checked out of 1,,,,,,1,,JssdxmMLYHs,https://youtu.be/JssdxmMLYHs,"104,000 in Liberia (2006). Population total all countries: 119,500.","Niger-Congo, Mande, Western, Central-Southwestern, Central, Manding-Jogo, Manding-Vai, Vai-Kono",Niger-Congo,Vai,"This video was recorded by Stephen Pasinski in the Wonde Community of Tienii Town, Grand Cape Mount County, Liberia, were he is volunteering with the Peace Corps. Vai is spoken by as many as 120,000 people, primarily in the West African nations of Liberia and Sierra Leone. A Niger-Congo language of the Mande family, Vai is somewhat closely related to mother tongues like Mandinka, Soninke, and Bambare, and more distantly so to hundreds of others. Vai is written with both the Latin alphabet and a unique script, which, along with N'Ko, is among the continent's most widely used indigenous alphabets. It remains unrecognized by the governments in Liberia and Sierra Leone.",Africa,,2017-5-27,,https://www.dropbox.com/sh/dzuqo2xg2s65z6m/AADy8AltYg83Wf1Zw5lZsFg2a?dl=0 +John_20170614_klu,John_JappaSikloh_20170614,Stephen_Pasinski_,6/14/2017,John_20170614_klu.png (https://dl.airtable.com/YLaOF5vHSDaBoAVTYHrE_John_20170614_klu.png),John_20170614_klu.png (https://dl.airtable.com/ObPQnPnKQ7NDIm8kMpEj_John_20170614_klu.png),klu,,Klao,,,,Liberia,7/27/2017,Public,CC BY-SA 4.0,checked,,,,,,1 checked out of 1,,,,,,1,,KncKzJEIUko,https://youtu.be/KncKzJEIUko,"213,000 in Liberia (2006). Population total all countries: 222,620.","Niger-Congo, Atlantic-Congo, Volta-Congo, Kru, Western, Klao",Niger-Congo,§Klao,"This video was recorded by Stephen Pasinski in Grand Cess, Liberia, where John lives. Klao, also called Kru, is spoken by as many as 220,000 people, primarily in the West African nation of Liberia, as well as parts of neighboring Sierra Leone. A member of the Niger-Congo family of languages, it is most closely related to the Tajuashon language of Sinoe County, Liberia. With the exception of a Bible translation by Nancy Lightfoot in 2000, Klao lacks wide a body of formal documentation accessible by the general public.",Africa,,2017-6-22,, +Garfeen_20170614_mzj,Garfeen_Swaray_20170614,Stephen_Pasinski_,6/14/2017,Screen Shot 2017-11-05 at 4.55.11 PM.png (https://dl.airtable.com/4uBPXP33SqeKHQRCJNIs_Screen%20Shot%202017-11-05%20at%204.55.11%20PM.png),Garfeen_20170614_mzj.png (https://dl.airtable.com/1XBJ79CRRzmT3krkKixL_Garfeen_20170614_mzj.png),mzj,,Manya,Mandingo,,,Liberia,11/29/2017,Public,CC BY-SA 4.0,checked,,,,,,1 checked out of 1,,,,,,1,,,No ID,"50,400 in Liberia (2006). Population total all countries: 75,400.","Niger-Congo, Mande, Western, Central-Southwestern, Central, Manding-Jogo, Manding-Vai, Manding-Mokole, Manding, Manding-East, Southeastern Manding",Niger-Congo,,"This video was recorded by Stephen Pasinski in Liberia, where he is volunteering for the Peace Corps. Mandingo, also known as Manya, is a language of the Maninka dialect continuum, which comprises a set of closely related mother tongues spoken by about five million people across West Africa, in Guinea and Mali, where they are officially recognized as a single ‘Maninka language’, as well as in Senegal, Sierra Leone, and Ivory Coast. A Niger-Congo language of the Mande linguistic family, Manya is spoken by ethnically Mandé communities in Liberia. It is most commonly written with a variety of the Latin alphabet, as well as the N’ko script, which was developed in 1949 for Mande languages.",Africa,,2017-6-22,, +Zubah_20180115_lom,Zubah_Gaweh_20180115,Stephen_Pasinski_,1/15/2018,Zubah_20180115_lom.png (https://dl.airtable.com/wxlR0vHyT2maV7zK3wjm_Zubah_20180115_lom.png),,lom,,Loma,,,,Liberia,1/28/2018,Public,CC BY-SA 4.0,checked,,,,,,1 checked out of 1,,,,,,1,,MnghW2JB9j4,https://youtu.be/MnghW2JB9j4,"195,000 (2012 V. Vydrin).","Niger-Congo, Mande, Western, Central-Southwestern, Southwestern, Mende-Loma, Loma",,,"This video was recorded by Stephen Pasinski in Borkeza, Liberia, where Zubah lives. Loma is spoken by as many as 420,000 people, primarily in the West African nations of Liberia and Guinea. It is a member of the Mande family of languages, which are spoken throughout Western Africa and include Vai, Mandingo, and Kpelle, among others. Traditionally a solely spoken language, Loma saw the development of a unique syllabary in the first half of the 20th century CE, which has fallen from use; today Loma speakers use a variety of the Latin alphabet in written correspondence. With younger generations continuing to learn and use the language, the future of Loma remains bright. Nonetheless, it is unrecognized by the national governments of both Liberia and Guinea, leaving sparse support for education and the production of native language media.",Africa,,2018-1-15,Lofa_LR, +Fahed_20140410_apc,Fahed__20140410,Pau_Mateo_,4/10/2014,fahed.png (https://dl.airtable.com/hsTPmCF1QyazLpA5REiU_fahed.png),Fahed_s1_M_20140410_apc.png (https://dl.airtable.com/CBxSa0dgQKuzP2wcfjUN_Fahed_s1_M_20140410_apc.png),apc,,"Arabic, North Levantine Spoken",Syrian Arabic (Levantine),,Unknown Variant,Lithuania,4/10/2014,Public,CC BY-NC 3.0,,,,,,,1 checked out of 1,,,,,,1,checked,P2vfi0HAaCU,https://youtu.be/P2vfi0HAaCU,"8,800,000 in Syria (1991). Population total all countries: 14,426,540.","Afro-Asiatic, Semitic, Central, South, Arabic",Afro-Asiatic,"Syrian Arabic,,,,,",,"Eurasia, Eurasia",,2014-12-22,, +Hani_20140414_swe,Hani__20140414,Pau_Mateo_,4/14/2014,Hani_s1_M_20140414_swe.png (https://dl.airtable.com/rx0qpex2QLkaH4Hmks2Q_Hani_s1_M_20140414_swe.png),Hani_s1_M_20140414_swe.jpg (https://dl.airtable.com/o7f8fXU1RAaKQlKGw7rU_Hani_s1_M_20140414_swe.jpg),swe,,Swedish,,,,Lithuania,4/14/2014,Public,CC BY-NC 3.0,,,,,,Get a free Swedish lesson with italki: http://promos.italki.com/wikitongues_swe,1 checked out of 1,checked,,,,,1,checked,4dfcO_bsB90,https://youtu.be/4dfcO_bsB90,"8,840,000 in Sweden (ELDIA 2012). 5,000 speakers of Gutniska (1998 S. Håkansson), and 30,000 of Jamska. Population total all countries: 9,197,090.","Indo-European, Germanic, North, East Scandinavian, Danish-Swedish, Swedish",Indo-European,"Swedish,,,,,",,Eurasia,,2014-12-22,, +Sidra_20140422_urd+nor,Sidra__20140422,Pau_Mateo_,4/22/2014,sidra.png (https://dl.airtable.com/iIYa395LTTmYDXccQOaw_sidra.png),Sidra_s2_F_20140422_urd+nor.jpg (https://dl.airtable.com/06nguc4CR12zMQ17FYsS_Sidra_s2_F_20140422_urd%2Bnor.jpg),"urd,nor",,"Urdu, Norwegian",,,,Lithuania,4/22/2014,Public,CC BY-NC 3.0,,,,,,"Get a free Urdu lesson with italki: http://promos.italki.com/wikitongues_urd, Get a free Norwegian lesson with italki: http://promos.italki.com/wikitongues_nor",2 checked out of 2,checked,,Facebook,2016-6-18,https://www.facebook.com/wikitongues/videos/1127437647320761/,2,checked,zXM5DJNZhFI,https://youtu.be/zXM5DJNZhFI,"10,000,000 in Pakistan (1998 census). Population total all countries: 63,948,800. L2 users: 94,000,000 in Pakistan (1999)., 4,640,000 in Norway. Population total all countries: 4,741,780.","Indo-European, Indo-Iranian, Indo-Aryan, Central zone, Western Hindi, Hindustani, Indo-European, Germanic, North, East Scandinavian, Danish-Swedish, Danish-Bokmal",Indo-European,"Urdu,Norwegian,,,,",,"Eurasia, Eurasia",,2014-12-22,, +Galib_20140429_aze,Galib__20140429,Pau_Mateo_,4/29/2014,galib.png (https://dl.airtable.com/0hUkD1kiRwGvRCdngCt9_galib.png),Galib_s1_M_20140429_aze.jpg (https://dl.airtable.com/ernmWzVTFrnVZOtdBkmw_Galib_s1_M_20140429_aze.jpg),aze,,Azerbaijani,,,,Lithuania,4/29/2014,Public,CC BY-NC 3.0,,,,,,,1 checked out of 1,,,,,,1,checked,fMTSDqjcvEk,https://youtu.be/fMTSDqjcvEk,"Population total all languages: 24,237,340.",,,"Azerbaijani,,,,,",,Eurasia,,2014-12-22,, +Marta_20140502_pol,Marta__20140502,Pau_Mateo_,5/2/2014,marta.png (https://dl.airtable.com/oknIAjDiTPCEhgQKGEVg_marta.png),Marta_s1_F_20140502_pol.png (https://dl.airtable.com/jfM6agmkSdSCYlf8WS18_Marta_s1_F_20140502_pol.png),pol,,Polish,,,,Lithuania,5/2/2014,Public,Standard,,,,,,Get a free Polish lesson with italki: http://promos.italki.com/wikitongues_pol,1 checked out of 1,checked,,Facebook,2016-7-18,https://www.facebook.com/wikitongues/videos/vb.408106989253834/1151500264914499/?type=2&theater,1,checked,mD24h-bbdMU,https://youtu.be/mD24h-bbdMU,"36,600,000 in Poland (ELDIA 2012). Population total all countries: 38,663,780.","Indo-European, Slavic, West, Lechitic",Indo-European,"Polish,,,,,",,Eurasia,,2014-12-22,, +Kiefer_20140508_eng,Kiefer__20140508,Pau_Mateo_,5/8/2014,keifer.png (https://dl.airtable.com/wXMosqWyQviqjdxqyIsJ_keifer.png),Kiefer_s1_M_20140508_eng.jpg (https://dl.airtable.com/Jc1Uo1mQQtSqSDYNLywv_Kiefer_s1_M_20140508_eng.jpg),eng,,English,,,,Lithuania,5/8/2014,Public,CC BY-NC 3.0,,,,,,Get a free English lesson with italki: http://promos.italki.com/wikitongues_eng,1 checked out of 1,checked,,,,,1,checked,avo6GUsAfdo,https://youtu.be/avo6GUsAfdo,"55,600,000 in United Kingdom (ELDIA 2012). Population total all countries: 335,148,868. L2 users: 1,500,000 in United Kingdom (Crystal 2003). L2 users worldwide: 505,000,000.","Indo-European, Germanic, West, English",Indo-European,"English,,,,,",,"Eurasia, Eurasia",,2014-12-22,, +Tural_20140710_aze+tur+rus,Tural__20140710,Pau_Mateo_,7/10/2014,tural.png (https://dl.airtable.com/uetOx4VSRDC0fP7oRTP3_tural.png),Tural_s3_M_20140710_aze+rus+tur.jpg (https://dl.airtable.com/V55RYsGSM6eknM0KraIa_Tural_s3_M_20140710_aze%2Brus%2Btur.jpg),"aze,tur,rus",,"Azerbaijani, Turkish, Russian",,,,Lithuania,7/10/2014,Public,CC BY-NC 3.0,,,,,,"Get a free Turkish lesson with italki: http://promos.italki.com/wikitongues_tur, Get a free Russian lesson with italki: http://promos.italki.com/wikitongues_rus",3 checked out of 3,checked,,,,,3,checked,Kz6bU7RqIjc,https://youtu.be/Kz6bU7RqIjc,"Population total all languages: 24,237,340., 66,500,000 in Turkey (ELDIA 2006). Population total all countries: 70,805,930. L2 users: 350,000 in Turkey (ELDIA 2006)., 137,000,000 in Russian Federation (2010 census). Population total all countries: 167,332,230.","Altaic, Turkic, Southern, Turkish, Indo-European, Slavic, East",Altaic,"Azerbaijani,Turkish,Russian,,,",,"Eurasia, Eurasia, Eurasia, Eurasia, Eurasia",,2014-12-22,, +Anis_20140805_apc,Anis__20140805,Pau_Mateo_,8/5/2014,anis.png (https://dl.airtable.com/ujMnYQcbQEoLILRhvp1x_anis.png),Anis_s1_M_20140805_apc.jpg (https://dl.airtable.com/AzOiWNTla3VsyXsCsyaw_Anis_s1_M_20140805_apc.jpg),apc,,"Arabic, North Levantine Spoken",Arabic (Levantine),,Unknown Variant,Lithuania,8/5/2014,Public,Standard,,,,,,,1 checked out of 1,,,Facebook,2016-5-4,https://www.facebook.com/wikitongues/videos/1104243382973521/,1,checked,72L2JsuGcH0,https://youtu.be/72L2JsuGcH0,"8,800,000 in Syria (1991). Population total all countries: 14,426,540.","Afro-Asiatic, Semitic, Central, South, Arabic",Afro-Asiatic,"Lebanese Arabic,,,,,",,"Eurasia, Eurasia",,2014-12-22,, +Martin_20140812_swe+pol,Martin__20140812,Pau_Mateo_,8/12/2014,martin.png (https://dl.airtable.com/Z1HCRCSezBC98XCgVCA3_martin.png),Martin_s2_M_20140812_swe+pol.jpg (https://dl.airtable.com/DhpvhnaTQsS1G9NvdU2X_Martin_s2_M_20140812_swe%2Bpol.jpg),"swe,pol",,"Swedish, Polish",,,,Lithuania,8/12/2014,Public,CC BY-NC 3.0,,,,,,"Get a free Swedish lesson with italki: http://promos.italki.com/wikitongues_swe, Get a free Polish lesson with italki: http://promos.italki.com/wikitongues_pol",2 checked out of 2,checked,,,,,2,checked,E-ohZtbkyxI,https://youtu.be/E-ohZtbkyxI,"8,840,000 in Sweden (ELDIA 2012). 5,000 speakers of Gutniska (1998 S. Håkansson), and 30,000 of Jamska. Population total all countries: 9,197,090., 36,600,000 in Poland (ELDIA 2012). Population total all countries: 38,663,780.","Indo-European, Germanic, North, East Scandinavian, Danish-Swedish, Swedish, Indo-European, Slavic, West, Lechitic",Indo-European,"Swedish,Polish,,,,",,"Eurasia, Eurasia",,2014-12-22,, +Candy_20150929_mlg,Candy__20150929,Daniel_BogreUdell_20130101,9/29/2015,candy-mlg-thumb-raw.png (https://dl.airtable.com/ozdqXyIxQhakCkvsRTDH_candy-mlg-thumb-raw.png),candy-mlg-thumb.jpg (https://dl.airtable.com/B14EUcCYQXWx6dp5iBZS_candy-mlg-thumb.jpg),mlg,,Malagasy,,,,Madagascar,9/29/2015,Public,Standard,,,,," +",,1 checked out of 1,,,,,,1,checked,H8t_snz8B5A,https://youtu.be/H8t_snz8B5A,"Population total all languages: 16,744,640.",,,"Malagasy,,,,,",,Africa,,2015-2-7,, +Andi_20160405_bbc,Andi__20160405,Teddy_Nee_20141005,4/5/2016,Andi_s1_M_20160405_bbc.png (https://dl.airtable.com/osYIbq8wRk2sQL5Wn4UN_Andi_s1_M_20160405_bbc.png),Andi_s1_M_20160405_bbc.jpg (https://dl.airtable.com/3Y7iNF1RGKfr9C8DKcsq_Andi_s1_M_20160405_bbc.jpg),bbc,,Batak Toba,,,,Malaysia,6/7/2016,Public,Standard,,,,,,,1 checked out of 1,,99,,,,1,,WMXxcrFjY1o,https://youtu.be/WMXxcrFjY1o,"2,000,000 (1991 UBS).","Austronesian, Malayo-Polynesian, Northwest Sumatra-Barrier Islands, Batak, Southern",Austronesian,§,,Eurasia,,2016-4-5,, +Zairul_20170402_zsm,Zairul__20170402,Kristen_Tcherneshoff_,4/2/2017,,,zsm,,"Malay, Standard",,"Langkawi, Malasia",,Malaysia,,To Upload,CC BY-SA 4.0,checked,,,,,,1 checked out of 1,,,,,,1,,,No ID,Few L1 speakers. L2 includes most Malaysian population.,"Austronesian, Malayo-Polynesian, Malayo-Chamic, Malayic, Malay",Austronesian,§,,Eurasia,,2017-4-6,, +Marapun_20170329_tam,Marapun__20170329,Kristen_Tcherneshoff_,3/29/2017,Screen Shot 2017-04-03 at 15.03.47.png (https://dl.airtable.com/Y7r9Z2vfSEu4hzBavKK4_Screen%20Shot%202017-04-03%20at%2015.03.47.png),Marapun_s1_M_20170329_tam.jpg (https://dl.airtable.com/2TuRc9dfS6Cgu7OJK19G_Marapun_s1_M_20170329_tam.jpg),tam,,Tamil,,,,Malaysia,4/6/2017,Public,CC BY-SA 4.0,checked,,,,,Get a free Tamil lesson with italki: http://promos.italki.com/wikitongues_tam,1 checked out of 1,,,,,,1,,lM7P_th3I6E,https://youtu.be/lM7P_th3I6E,"60,700,000 in India (2001 census). Population total all countries: 68,763,360. L2 users: 8,000,000 in India.","Dravidian, Southern, Tamil-Kannada, Tamil-Kodagu, Tamil-Malayalam, Tamil",Dravidian,§,"This video was recorded by Kristen Tcherneshoff in the Cameron Highlands of central Peninsular Malaysia. Tamil is spoken by as many as 70 million people, primarily in India and Sri Lanka, where it is an official language, as well as other regions of South Asia, and by diaspora communities worldwide. (Marapun's community of Malaysian Tamils includes as many as four million people.) A Dravidian language, Tamil is related to more than eighty mother tongues, including Kannada and Telugu. Tamil has been a literary language for more than 2,000 years, making it perhaps humanity's only classical language with a widely distributed population of first language speakers.",Eurasia,,2017-3-29,, +Sedang_20170402_iba,Sedang__20170402,Kristen_Tcherneshoff_,4/2/2017,Screen Shot 2017-05-02 at 15.46.21.png (https://dl.airtable.com/4e9mwpleR3qei15Z9zea_Screen%20Shot%202017-05-02%20at%2015.46.21.png),Sedang_s1_F_20170402_iba.jpg (https://dl.airtable.com/sVxqeXMZSEWdkdkRvdhZ_Sedang_s1_F_20170402_iba.jpg),iba,,Iban,,"Langkawi, Malaysia",,Malaysia,5/30/2017,Public,CC BY-SA 4.0,,,,,,,1 checked out of 1,,,,,,1,,8xdzebPGPHI,https://youtu.be/8xdzebPGPHI,"752,000 in Malaysia (2013 SIL). Population total all countries: 788,400. L2 users: 700,000 in Malaysia (2013 SIL).","Austronesian, Malayo-Polynesian, Malayo-Chamic, Malayic, Ibanic",Austronesian,§,,Eurasia,,2017-4-6,, +Senful_20170329_zsm,Senful__20170329,Kristen_Tcherneshoff_,3/29/2017,Screen Shot 2017-12-07 at 7.12.03 PM.png (https://dl.airtable.com/5xB7UJ0cT7WyzOu5LR9V_Screen%20Shot%202017-12-07%20at%207.12.03%20PM.png),Senful_20170329_zsm.jpg (https://dl.airtable.com/Y7dWINfaQPSj2O7ZgWGe_Senful_20170329_zsm.jpg),zsm,,"Malay, Standard",,,,Malaysia,12/30/2017,Public,CC BY-SA 4.0,checked,,,,,,1 checked out of 1,,,,,,1,,OJvsp6XNUzQ,https://youtu.be/OJvsp6XNUzQ,Few L1 speakers. L2 includes most Malaysian population.,"Austronesian, Malayo-Polynesian, Malayo-Chamic, Malayic, Malay",Austronesian,§,"This video was recorded by Kristen Tcherneshoff in Langkawi, Malaysia, where she and Senful met. Malay, also known as Malaysian, is spoken by as many as 300 million people, mostly as an auxiliary language and primarily across the strait of Malacca. It is the sole national language of Malaysia and Brunei, as well as a recognized minority language in the Indonesian provinces of Sumatra and Kalimantan. It is also an official language of Singapore, alongside English, Mandarin, and Tamil. It is perhaps the most widely spoken member of the Austronesian family of languages, which includes mother tongues of communities across the Indian and Pacific Oceans. Traditionally an exclusively oral language, a Malaysian literary tradition had emerged by the 19th century CE. Owed to South Asia’s experience with both European conquest and the spread of Islam, the language is written with varieties of the Latin and Arabic alphabets: the Rumi and Jawi scripts, respectively. In its standard form, Malay is closely related to Indonesian, so much so that some linguists consider both languages to be dialects of a single mother tongue.",Eurasia,,2017-3-29,, +Nawal_20170816_ary,Nawal__20170816,Kristen_Tcherneshoff_,8/16/2017,Nawal_20170816_ary.png (https://dl.airtable.com/bDICwyOWSXSFtaq6OEw8_Nawal_20170816_ary.png),Nawal_20170816_ary.jpg (https://dl.airtable.com/B40sTeeSomC1TgUkOrnA_Nawal_20170816_ary.jpg),ary,,"Arabic, Moroccan Spoken",Moroccan Arabic,,,Morocco,9/21/2017,Public,CC BY-SA 4.0,checked,,,,,,1 checked out of 1,,,,,,1,,A1QY9Ul5_iM,https://youtu.be/A1QY9Ul5_iM,"18,800,000 in Morocco (1995). Population total all countries: 21,048,900. L2 users: 5,000,000 in Morocco.","Afro-Asiatic, Semitic, Central, South, Arabic",,,,Africa,,2017-8-16,, +Aldade_20140819_por+chw,Aldade__20140819,Sarah_Doyle_,8/19/2014,aldade.png (https://dl.airtable.com/ohgGTGCMQ12DELOXetyg_aldade.png),Aldade_s2_M_20140819_por+chw.jpg (https://dl.airtable.com/jddudBYFSDGlzVzBCdvY_Aldade_s2_M_20140819_por%2Bchw.jpg),"por,chw",,"Portuguese, Chuwabu","Portuguese,Chuwabo",,,Mozambique,8/19/2014,Public,Standard,,,,,,Get a free Portuguese lesson with italki: http://promos.italki.com/wikitongues_por,2 checked out of 2,checked,,,,,2,checked,PpNr0MgTAbY,https://youtu.be/PpNr0MgTAbY,"10,000,000 in Portugal (ELDIA 2012). Population total all countries: 203,349,200., 947,000 (2006).","Indo-European, Italic, Romance, Italo-Western, Western, Gallo-Iberian, Ibero-Romance, West Iberian, Portuguese-Galician, Niger-Congo, Atlantic-Congo, Volta-Congo, Benue-Congo, Bantoid, Southern, Narrow Bantu, Central, P, Makhuwa (P.34)",Indo-European,"Portuguese,Chuwabo,,,,",,"Eurasia, Eurasia, Africa",,2014-12-22,, +AfroAmado_20141007_por+seh,AfroAmado__20141007,Sarah_Doyle_,10/7/2014,afroamado.png (https://dl.airtable.com/cV9eJVeTSc2SqYlDjtfd_afroamado.png),maxresdefault (5).jpg (https://dl.airtable.com/Zbh1RcJaRCeTQW3OUKhK_maxresdefault%20(5).jpg),"por,seh",,"Portuguese, Sena",,,,Mozambique,10/7/2014,Public,Standard,,,,,,Get a free Portuguese lesson with italki: http://promos.italki.com/wikitongues_por,2 checked out of 2,checked,,,,,2,checked,9D2ZymNG4rE,https://youtu.be/9D2ZymNG4rE,"10,000,000 in Portugal (ELDIA 2012). Population total all countries: 203,349,200., 1,340,000 (2006). 86,000 Podzo in Mozambique (Johnstone 1993).","Indo-European, Italic, Romance, Italo-Western, Western, Gallo-Iberian, Ibero-Romance, West Iberian, Portuguese-Galician, Niger-Congo, Atlantic-Congo, Volta-Congo, Benue-Congo, Bantoid, Southern, Narrow Bantu, Central, N, Senga-Sena (N.44)",Indo-European,"Portuguese,Sena,,,,",,"Eurasia, Eurasia, Africa",,2014-12-22,, +Leonhard_20141023_swa,Leonhard__20141023,Sarah_Doyle_,10/23/2014,leonhard.png (https://dl.airtable.com/lHZLHl9zRTyQ6bCq2X2L_leonhard.png),Leonhard_s1_M_20141023_swa.png (https://dl.airtable.com/MOtdf0zT4yiXtxrtedya_Leonhard_s1_M_20141023_swa.png),swa,,Swahili,,,,Mozambique,10/23/2014,Public,Standard,,,,,,Get a free Swahili lesson with italki: http://promos.italki.com/wikitongues_swa,1 checked out of 1,checked,,Facebook,2016-7-16,https://www.facebook.com/wikitongues/videos/1146603742070818/,1,checked,zyup0YLKCvw,https://youtu.be/zyup0YLKCvw,"Population total all languages: 15,458,390.","Niger–Congo, Atlantic–Congo, Benue–Congo, Southern Bantoid Bantu, Northeast Coast Bantu, Sabaki, Swahili",Niger–Congo,"Swahili,,,,,",,Africa,,2014-12-22,, +Khup_20171004_zom,Khup_Lal_20171004,Sarah_Meltzoff_20171004,10/4/2017,Screen Shot 2018-02-28 at 5.53.39 PM.png (https://dl.airtable.com/faqPgNlRTai0fnoOvqHs_Screen%20Shot%202018-02-28%20at%205.53.39%20PM.png),Khup_20171004_zom.jpg (https://dl.airtable.com/0yMsqKIeTZeTenBMzieA_Khup_20171004_zom.jpg),zom,,Zo,Zom,,,Myanmar,2/28/2018,To Upload,CC BY-SA 4.0,checked,,,,"Tedim, Chin region",,1 checked out of 1,,,,,,1,,vjK-2lc0KQU,https://youtu.be/vjK-2lc0KQU,"61,000 in Myanmar (2012 T. Philipzo). Population total all countries: 81,900.","Sino-Tibetan, Tibeto-Burman, Sal, Kuki-Chin-Naga, Kuki-Chin, Northern",,,"This video was recorded by Sarah Meltzoff in Tedim, Chin region, Myanmar, where Khup lives. Zom, also known as Zo or Zou, Yo, Jo, Yaw, and Zomi, is spoken by as many as 82,000 people, primarily in the Chin State of western Myanmar/Burma. It also the mother tongue of communities in the Indian states of Manipur and Assam. A member of the Sino-Tibetan linguistic family, Zom pertains to a regional grouping of languages known as the Kukish languages, sometimes known as the “Chin languages” for the Chin peoples who speak them. It is regionally recognized by the Myanma/Burmese government as the dialect of a single ‘Chin language’.",Eurasia,,2017-10-9,, +TayZa_20170824_cfm,TayZa_Khant_20170824,Khup_Lal_20170824,8/24/2017,TayZa_20170824_cfm.png (https://dl.airtable.com/27B4iU0S9ajJ81Cqalt8_TayZa_20170824_cfm.png),TayZa_20170824_cfm.jpg (https://dl.airtable.com/eqtn0vXTT72Ko9c06CkA_TayZa_20170824_cfm.jpg),cfm,,"Chin, Falam",Falam,,,Myanmar,9/24/2017,Public,CC BY-NC 3.0,,,,,,,1 checked out of 1,,,,,,1,,U9NivlodX8c,https://youtu.be/U9NivlodX8c,"69,000 in Myanmar (1983). 9,000 Tashon, 16,000 Zanniat, 7,000 Khualshim, 4,000 Lente, 14,400 Zahao, 18,600 in Laizao (1983). Population total all countries: 107,300.","Sino-Tibetan, Tibeto-Burman, Sal, Kuki-Chin-Naga, Kuki-Chin, Central",,,,Eurasia,,2017-8-24,, +Thadoe_20160805_mya,Thadoe__20160805,Elise_Lieberman_20160622,8/5/2016,Screen Shot 2016-09-02 at 5.13.05 PM.png (https://dl.airtable.com/UuF9eHFsSaatJx5iycxZ_Screen%20Shot%202016-09-02%20at%205.13.05%20PM.png),Thadoe_s1_M_20160805_mya.jpg (https://dl.airtable.com/Re1dlKL5TbuOIb0Ln4Va_Thadoe_s1_M_20160805_mya.jpg),mya,,Burmese,,,,Myanmar,9/4/2016,Public,CC BY-NC 3.0,,,,,,Get a free Burmese lesson with italki: http://promos.italki.com/wikitongues_mya,1 checked out of 1,,,,,,1,,MQasAsvyqfE,https://youtu.be/MQasAsvyqfE,"32,000,000 in Myanmar (2000 D. Bradley), increasing. 250,000 Beik, 20,000 Yaw (Bradley 2007). Population total all countries: 32,035,300. L2 users: 10,000,000 in Myanmar. Minority peoples throughout the country.","Sino-Tibetan, Tibeto-Burman, Ngwi-Burmese, Burmish, Southern",Sino-Tibetan,§,,Eurasia,,2016-8-5,, +Musuweu_20170706_eng+sbs,Musuweu_TheronKolokwe_20170706,Musuweu_TheronKolokwe_20170706,7/6/2017,Musuweu_20170706_eng+sbs.png (https://dl.airtable.com/US6L5c8rQ1q4mFms8MzP_Musuweu_20170706_eng%2Bsbs.png),Musuweu_20170706_eng+sbs.png (https://dl.airtable.com/FMBtg5hfRAK7h75a6RnJ_Musuweu_20170706_eng%2Bsbs.png),"eng,sbs",,"English, Kuhane",English and Subiya,,,Namibia,7/15/2017,Public,CC BY-SA 4.0,checked,,,,"In my office at Parliament, Windhoek, Namibia",Get a free English lesson with italki: http://promos.italki.com/wikitongues_eng,2 checked out of 2,,,,,,2,,,No ID,"55,600,000 in United Kingdom (ELDIA 2012). Population total all countries: 335,148,868. L2 users: 1,500,000 in United Kingdom (Crystal 2003). L2 users worldwide: 505,000,000., 26,600 in Namibia (2006). Population total all countries: 30,950.","Indo-European, Germanic, West, English, Niger-Congo, Atlantic-Congo, Volta-Congo, Benue-Congo, Bantoid, Southern, Narrow Bantu, Central, K, Subiya-Totela (K.42)","Indo-European,Niger-Congo","§English,§Subiya","This video was recorded by Musuweu Theron Kolokwe in Windhoek, Namibia, where he lives and works. His native language Subiya, also known as Kuhane, is spoken by as many as 31,000 people, primarily in the southern African nations of Namibia, Zambia, and Botswana. A member of the Bantu family of languages, Subiya is most closely related to languages like Tonga and Soli, both spoken primarily in Zambia. Subiya is one of the few Bantu languages that possesses so-called 'click' consonants, which feature prominently in the Khoisan languages, also indigenous to southern Africa.","Eurasia, Eurasia, Africa",,2017-7-6,, +Winnie_20170707_loz,Winnie__20170707,Musuweu_TheronKolokwe_20170706,7/7/2017,Winnie_20170707_loz.png (https://dl.airtable.com/0IbV6vR1ONejcfmT6gCA_Winnie_20170707_loz.png),Winnie_20170707_loz.png (https://dl.airtable.com/cOCm1cNYT6KSR32Igmaf_Winnie_20170707_loz.png),loz,,Lozi,siLozi,,,Namibia,7/22/2017,Public,CC BY-SA 4.0,checked,,,,Windhoek,,1 checked out of 1,,,,,,1,,wuP_E0oFZkY,https://youtu.be/wuP_E0oFZkY,"612,000 in Zambia (2010 census). Population total all countries: 724,600.","Niger-Congo, Atlantic-Congo, Volta-Congo, Benue-Congo, Bantoid, Southern, Narrow Bantu, Central, K, Lozi (K.21)",Niger-Congo,§siLozi,"This video was recorded by Musuweu Theron Kolokwe in Windhoek, Namibia, where Winnie lives and works. Lozi is spoken by as many as 750,000 people throughout southern Africa, in particular Zambia, where it is recognized as a minority language, as well as Namibia, Zimbabwe, Botswana, and South Africa. It emerged from the convergence of two languages — +Luyana and Kololo — during the 17th and 18th centuries, when the Kingdom of Barotseland was conquered by the Makololo people of present-day Lesotho. As such, Lozi is more closely related to Sesotho than it is to its geographical neighbors. It is written with a unique variety of the Latin alphabet.",Africa,,2017-7-9,, +Revival_20170809_eng+naq+afr,Revival__20170809,Musuweu_TheronKolokwe_20170706,8/9/2017,Revival_20170809_eng+naq+afr.png (https://dl.airtable.com/jyXgcLg3RIqSX1HGNeoP_Revival_20170809_eng%2Bnaq%2Bafr.png),Revival_20170809_eng+naq+afr.jpg (https://dl.airtable.com/I92zAZcOTzaOzHV8QfH2_Revival_20170809_eng%2Bnaq%2Bafr.jpg),"eng,naq,afr",,"English, Nama, Afrikaans",Khoekhoegowab,,,Namibia,9/27/2017,Public,CC BY-NC 3.0,checked,checked,"[13:00, 8/9/2017] Theron Kolokwe: In khoi-khoi: our language is about to go extinct because we do not speak our mother tongue with our children. If you speak to a 2, 3, 4 year old, they would answer in Einglish. We have a very beautiful language and I am proud to speak my language. +[13:00, 8/9/2017] Theron Kolokwe: In Afrikaans: I learned to speak Afrikaans at school and in the streets. I am fluent in Afrikaans and can express myself well in it. I love the language although not everyone is so keen + +[04:01, 8/10/2017] Theron Kolokwe: Khoi-khoi + +Total time: 00:01:00 - 00:01:28 + +Khoi sentence 1: 00:01:00 - 00:01:11 + +Khoi sentence 2: 00:01:12 - 00:01:22 + +Khoi sentence 3: 00:01:23.- 00:01:27 +[04:11, 8/10/2017] Theron Kolokwe: Afrikaans + +Total time: 00:01:29 - 00:01:53 + +Afrikaans sentence 1: 00:01:29 - 00:01:34 + +Afrikaans sentence 2 and 3: 00:01:35 - 00:01:54 +[04:14, 8/10/2017] Theron Kolokwe: 00:01:55 - 00:02:01 + +Goodbye my people, and stay well......","Theron Kolokwe: In khoi-khoi: our language is about to go extinct because we do not speak our mother tongue with our children. If you speak to a 2, 3, 4 year old, they would answer in Einglish. We have a very beautiful language and I am proud to speak my language. +[13:00, 8/9/2017] Theron Kolokwe: In Afrikaans: I learned to speak Afrikaans at school and in the streets. I am fluent in Afrikaans and can express myself well in it. I love the language although not everyone is so keen",,"Get a free English lesson with italki: http://promos.italki.com/wikitongues_eng, Get a free Afrikaans lesson with italki: http://promos.italki.com/wikitongues_afr",3 checked out of 3,,,,,,3,,-128MZD3rKU,https://youtu.be/-128MZD3rKU,"55,600,000 in United Kingdom (ELDIA 2012). Population total all countries: 335,148,868. L2 users: 1,500,000 in United Kingdom (Crystal 2003). L2 users worldwide: 505,000,000., 200,000 in Namibia (2006). Population total all countries: 251,100., 6,860,000 in South Africa (2011 census), decreasing. Population total all countries: 7,096,810. L2 users: 10,300,000 in South Africa.","Indo-European, Germanic, West, English, Khoisan, Southern Africa, Central, Nama, Indo-European, Germanic, West, Low Saxon-Low Franconian, Low Franconian",,,,"Eurasia, Eurasia, Africa, Africa",,2017-8-9,, +Sanjib_20151001_thq,Sanjib__20151001,Daniel_BogreUdell_20130101,10/1/2015,sanjib-thq-thumb-raw.png (https://dl.airtable.com/H0sdDVY0QC2bUUkerKBW_sanjib-thq-thumb-raw.png),Sanjib_s1_M_20151001_thq.jpg (https://dl.airtable.com/e0gcHAKnTTih6nhN7Nin_Sanjib_s1_M_20151001_thq.jpg),thq,,"Tharu, Kochila",Tharu,,,Nepal,10/1/2015,Public,Standard,,,,,"Just calls it Tharu +",,1 checked out of 1,,,Facebook,2016-6-21,https://www.facebook.com/wikitongues/videos/1127476770650182/,1,checked,qfKmOf3d0fc,https://youtu.be/qfKmOf3d0fc,"258,000 in Nepal (2003), increasing. Population for all Tharu varieties: 1,530,000 (2011 census). Mostly illiterate older women are monolingual. L2 users: 46,600 L2 speakers for all Tharu languages (1991 census).","Indo-European, Indo-Iranian, Indo-Aryan, Eastern zone, Unclassified",Indo-European,"Tharu,,,,,",,Eurasia,,2015-2-7,, +Nila_20150321_abs,Nila__20150321,LuisMiguel_Rojas-Berscia_,3/21/2015,Nila_s1_F_20150321_abs.png (https://dl.airtable.com/YK6H8uqT9eFU1cIUoK2Q_Nila_s1_F_20150321_abs.png),Nila_s1_F_20150321_abs.jpg (https://dl.airtable.com/MQWn0L5dS2mWYBj7FFlH_Nila_s1_F_20150321_abs.jpg),abs,,"Malay, Ambonese",Ambonese Creole,,,Netherlands,3/21/2015,Public,Standard,,,,,,"Get a free Malay, Ambonese lesson with italki: http://promos.italki.com/wikitongues_abs",1 checked out of 1,checked,,,,,1,checked,IvwbztWHe0I,https://youtu.be/IvwbztWHe0I,"200,000 in Indonesia (1987 J. Collins). Population total all countries: 245,020. L2 users: 1,400,000 in Indonesia (2013 M. Connor).",Malay Creole,,"Ambonese,,,,,",,Eurasia,,2015-2-15,, +Nila_20151008_jav,Nila__20150321,LuisMiguel_Rojas-Berscia_,10/8/2015,nila-javabsind-thumb-raw.png (https://dl.airtable.com/wNIxIW4URzSFMaZ4oNG1_nila-javabsind-thumb-raw.png),Nila_s1_F_20151008_jav.jpg (https://dl.airtable.com/lkyhjaJfRiWJyqF2t7Ag_Nila_s1_F_20151008_jav.jpg),jav,,Javanese,,,,Netherlands,10/8/2015,Public,Standard,,,,,,,1 checked out of 1,,,,,,1,checked,eg0bYuuHzkI,https://youtu.be/eg0bYuuHzkI,"84,300,000 in Indonesia (2000 census). 25,000 in south Sulawesi, and 69,000,000 on Java, 500,000 of them being in Banten region and 2,500,000 in Cirebon region of Java. Population total all countries: 84,308,740.","Austronesian, Malayo-Polynesian, Javanese",Austronesian,"Javanese,,,,,",,Eurasia,,2015-2-15,, +Nila_20151212_ind,Nila__20150321,LuisMiguel_Rojas-Berscia_,12/12/2015,nila-javabsind-thumb-raw.png (https://dl.airtable.com/wGYAbYRZReWuEiyNJy3w_nila-javabsind-thumb-raw.png),maxresdefault (7).jpg (https://dl.airtable.com/uBY2bSdAQym6zdLXk8bQ_maxresdefault%20(7).jpg),ind,,Indonesian,Bahasa Indonesia,,,Netherlands,12/12/2015,Public,Standard,,,,,,Get a free Indonesian lesson with italki: http://promos.italki.com/wikitongues_ind,1 checked out of 1,,,,,,1,checked,Er4liSo00nA,https://youtu.be/Er4liSo00nA,"22,800,000 in Indonesia (2000), increasing. Population total all countries: 23,200,480. L2 users: 140,000,000 in Indonesia.","Austronesian, Malayo-Polynesian, Malayo-Chamic, Malayic, Malay",Austronesian,"Indonesian,,,,,",,Eurasia,,2015-2-15,, +SisterCookson_20161025_mri,SisterCookson__20161025,Argo_Cayhadi_20150418,10/25/2016,Screen Shot 2017-06-01 at 13.51.22.png (https://dl.airtable.com/hR5AYOlQmfUhRYsT1omQ_Screen%20Shot%202017-06-01%20at%2013.51.22.png),Sister_s1_F_20161025_mri.png (https://dl.airtable.com/dEyIiaAnQM6f0SMF57iF_Sister_s1_F_20161025_mri.png),mri,eng,Maori,,,,New Zealand,6/27/2017,Public,CC BY-NC 3.0,checked,,,,,,1 checked out of 1,,,,,,1,,pBksbW_fXKo,https://youtu.be/pBksbW_fXKo,"148,000 in New Zealand (2013 census). 100,000 understand but do not speak it (1995 Maori Language Commission); 30,000–50,000 adult speakers over 15 years old (1995). Population total all countries: 148,660. Ethnic population: 599,000 (2013 census).","Austronesian, Malayo-Polynesian, Central-Eastern Malayo-Polynesian, Eastern Malayo-Polynesian, Oceanic, Central-Eastern Oceanic, Remote Oceanic, Central Pacific, East Fijian-Polynesian, Polynesian, Nuclear, East, Central, Tahitic",Austronesian,Maori,"This video was recorded by Argo Cayhadi in Kingsford, New South Wales, Australia. Maori is spoken by as many as 150,000 people, primarily in the Polynesian nation of New Zealand, where it is official alongside English and New Zealand Sign Language. A literary language since the 1800s, Maori is written with the Latin alphabet. Though the language fell into decline in the decades after the Second World War, Maori activists began cultivating a revival movement in the 1980s, which has continued to develop since the turn of the 21st century. In addition to increased government recognition, Maori immersion schools, as well as Maori use in media, are increasingly commonplace.",Oceania,,2016-10-26,,https://www.dropbox.com/sh/ohqfm0om4bei8sn/AABXmml-dj2mcZdbkZCIqGTXa?dl=0 +Ali_20150626_hau+kau,Ali__20150626,Orsi_Jenei_,6/26/2015,ali-haukau-thumb-raw.png (https://dl.airtable.com/RJagELfCSgir77Lfjw9d_ali-haukau-thumb-raw.png),Ali_s2_M_20150626_kau+hau.jpg (https://dl.airtable.com/f5MkfP0TT5GFy9WcFlKR_Ali_s2_M_20150626_kau%2Bhau.jpg),"hau,kau",,"Hausa, Kanuri",,,,Niger,7/28/2015,Public,CC BY-NC 3.0,,,,,,,2 checked out of 2,,,Facebook,2016-6-2,https://www.facebook.com/wikitongues/videos/1122703401127519/,2,checked,mCghaYzVDxw,https://youtu.be/mCghaYzVDxw,"18,500,000 in Nigeria (1991 SIL). Population total all countries: 24,988,000. L2 users: 15,000,000 in Nigeria., Population total all languages: 3,760,500.","Afro-Asiatic, Chadic, West, A, A.1",Afro-Asiatic,"Hausa,Kanuri,,,,",,"Africa, Africa",,2015-6-28,, +Golala_20170928_ckb,Golala__20170928,Irena_Dahl_20160517,9/28/2017,Screen Shot 2017-11-05 at 5.08.40 PM.png (https://dl.airtable.com/oLmIHXFjSIOi40LgjCwx_Screen%20Shot%202017-11-05%20at%205.08.40%20PM.png),Golala_20170928_ckb.png (https://dl.airtable.com/XMSdpzg3Q8y3pbZLJi34_Golala_20170928_ckb.png),ckb,eng,"Kurdish, Central",Sorani Kurdish,,,Norway,11/14/2017,Public,CC BY-SA 4.0,checked,,,,Recorded in Oslo,,1 checked out of 1,,,,,,1,,ftqet7jH91g,https://youtu.be/ftqet7jH91g,"3,500,000 in Iraq (2009). Population total all countries: 6,750,000.","Indo-European, Indo-Iranian, Iranian, Western, Northwestern, Kurdish",,,"This video was recorded by Irena Dahl in Oslo, Norway, where she and Golala live. Sorani Kurdish, known natively as Soranî (سۆرانی) and by researchers as Central Kurdish, is spoken by as many as seven million people, primarily in Iraqi Kurdistan, where it is an official language alongside Standard Arabic, as well as in Kurdish Iran. An Indo-European language of the Iranian family, it is perhaps most closely related to Farsi, and more distantly to languages as diverse as Hindi and English. Though Kurdish has been used in literature since at least the 16th century CE, it wasn’t until the 1990s that the language featured prominently in mass media, thanks to the autonomy of Iraqi Kurdistan. Consequently, Soranî has been the primary Kurdish variety in film, television, and radio. It is also used online, with the .krd top-level domain for Kurdish websites.",Eurasia,,2017-10-1,,https://www.dropbox.com/sh/08lz75jzqyizweo/AADUxfiWk6Krl5EJY-PS4NrMa?dl=0 +Anna_20160803_sjd,Anna__20160803,Irena_Dahl_,8/3/2016,Screen Shot 2016-08-30 at 1.52.49 PM.png (https://dl.airtable.com/KJrGJBSTRfCv892RQ82D_Screen%20Shot%202016-08-30%20at%201.52.49%20PM.png),Anna_s1_F_20160803_sjd.jpg (https://dl.airtable.com/xxLcMPQ3yuz6oBLz0fuQ_Anna_s1_F_20160803_sjd.jpg),sjd,"eng,rus","Saami, Kildin",,,,Norway,9/7/2016,Public,Standard,,,,,,,1 checked out of 1,,,,,,1,,8i4EEb5QMgU,https://youtu.be/8i4EEb5QMgU,"350 (2010 census). Census includes Skolt Saami , and Ter Saami ,. Ethnic population: 1,770 (2010 census). Number includes all Saami.","Uralic, Sami, Eastern",Uralic,§,,Eurasia,,2016-8-5,,https://www.dropbox.com/sh/ukagvfm592anuf2/AAD85bH_Wmv89Govvrcqzk1da?dl=0 +Simon_20160707_smj,Simon_Piera_20160707,Irena_Dahl_,7/7/2016,Simon_s1_M_20160707_smj.png (https://dl.airtable.com/RZ4zbQBnSte2aStL4b4e_Simon_s1_M_20160707_smj.png),Simon_s1_M_20160707_smj.jpg (https://dl.airtable.com/tsU5GuvnTTak8zO66yQ2_Simon_s1_M_20160707_smj.jpg),smj,,"Saami, Lule",,,,Norway,9/29/2016,Public,Standard,,,,,,,1 checked out of 1,,,,,,1,,wKPuXCb_Vlg,https://youtu.be/wKPuXCb_Vlg,"1,500 in Sweden (Krauss 1992). 1,000–2,000 speakers in Norway and Sweden (Salminen 2007). Population total all countries: 2,000. Ethnic population: 6,000.","Uralic, Sami, Western, Northern",Uralic,§,,Eurasia,,2016-8-5,, +Zaeem_20160721_hnd+pbu,Zaeem__20160721,Satdeep_Gill_,7/21/2016,Screen Shot 2017-06-01 at 13.49.21.png (https://dl.airtable.com/3GispQb6SxeO2etCeEzo_Screen%20Shot%202017-06-01%20at%2013.49.21.png),Zaeem_s2_M_20160721_hnd+pbu.png (https://dl.airtable.com/p8v8yZMKS4Su2Y75Zv2z_Zaeem_s2_M_20160721_hnd%2Bpbu.png),"hnd,pbu",,"Hindko, Southern, Pashto, Northern",,,,Pakistan,6/24/2017,Public,CC BY-SA 4.0,checked,,,,,"Get a free Pashto, Northern lesson with italki: http://promos.italki.com/wikitongues_pbu",2 checked out of 2,,,Facebook,2017-7-26,https://www.facebook.com/wikitongues/videos/1529058067158715/,2,,stVATHE414E,https://youtu.be/stVATHE414E,"625,000 (1981 census)., 18,700,000 in Pakistan (2013 SIL). Population total all countries: 20,540,000. Ethnic population: Possibly 49,600,000 Pashto in all countries.","Indo-European, Indo-Iranian, Indo-Aryan, Northwestern zone, Lahnda, Indo-European, Indo-Iranian, Iranian, Eastern, Southeastern, Pashto",Indo-European,"Hindko,Pashto","This video was recorded by Satdeep Gill in Esino Lario, Italy, where he and Zaeem were visiting for the Wikimania 2016 conference. Hindko is spoken by as many as 625,000 people, primarily in Pakistan's western provinces of Punjab and Khyber Pakhtunkhwa. A Punjabi language, it shares similarities with a variety of mother tongues spoken throughout western Pakistan and Eastern India. Pashto is spoken by as many as 60 million people, primarily by the Pashtun people of Afghanistan and Pakistan, and by several other communities as a regional lingua franca. Zaeem's native variety of Northern Pashto, spoken by some 20 million people, is sometimes also referred to as Pekhawari.","Eurasia, Eurasia",,2016-7-22,, +Oluchel_20160824_pau,Oluchel__20160824,Elise_Lieberman_20160622,8/24/2016,Screen Shot 2017-03-01 at 15.17.45.png (https://dl.airtable.com/83J4vmBgSue69zMHHsZ5_Screen%20Shot%202017-03-01%20at%2015.17.45.png),Oluchel_s1_F_20160824_pau.jpg (https://dl.airtable.com/yaFi3yRrTd2QljbAPqzk_Oluchel_s1_F_20160824_pau.jpg),pau,,Palauan,,,,Palau,3/2/2017,Public,CC BY-NC 3.0,,,,,,,1 checked out of 1,,,Facebook,2017-6-23,https://www.facebook.com/wikitongues/videos/1478789915518864/,1,,bwx4tkODJm8,https://youtu.be/bwx4tkODJm8,"14,800 in Palau (2000). Population total all countries: 18,950.","Austronesian, Malayo-Polynesian, Palauan",Austronesian,§,,Oceania,,2016-8-25,, +Gilberta_20171127_acr,Gilberta_GonzalesVasquez_20171127,Daniel_BogreUdell_20130101,11/27/2017,,,acr,,Achi,,,,Peru,,To Upload,CC BY-NC 3.0,,,,,,,1 checked out of 1,,,,,,1,,,No ID,85600,"Mayan, Yucatecan-Core Mayan, K’ichean-Mamean, K’ichean, Poqom-K’ichean, Core K’ichean",,,,Americas,,2017-11-27,, +Eugenia_20171127_ayc,Eugenia_MamniChoque_20171127,Daniel_BogreUdell_20130101,11/27/2017,,,ayc,,"Aymara, Southern",Southern Aymara,,,Peru,,To Upload,CC BY-NC 3.0,,,,,,,1 checked out of 1,,,,,,1,,,No ID,"219,000 (2006).","Aymaran, Aymara",,,,Americas,,2017-11-27,, +Marcelina_20161127_ayc,Marcelina_ChoqueCastro_,Daniel_BogreUdell_20130101,11/27/2016,,,ayc,,"Aymara, Southern",Southern Aymara,,,Peru,,To Upload,CC BY-NC 3.0,,,,,,,1 checked out of 1,,,,,,1,,,No ID,"219,000 (2006).","Aymaran, Aymara",,,,Americas,,2017-11-27,, +Nely_20171127_ayc,Nely_CastroMamani_20171127,Daniel_BogreUdell_20130101,11/27/2017,,,ayc,,"Aymara, Southern",Southern Aymara,,,Peru,,To Upload,CC BY-NC 3.0,,,,,,,1 checked out of 1,,,,,,1,,,No ID,"219,000 (2006).","Aymaran, Aymara",,,,Americas,,2017-11-27,, +Sonia_20171127_boa,Sonia_VegaTorres_20171127,Daniel_BogreUdell_20130101,11/27/2017,,,boa,,Bora,Booráá,,,Peru,,To Upload,CC BY-NC 3.0,,,,,,,1 checked out of 1,,,,,,1,,,No ID,"2,330 in Peru (2000). Population total all countries: 2,430. Ethnic population: 3,000 (Crevels 2007).","Witotoan, Proto-Bora-Muinane",,,,Americas,,2017-11-27,, +Nilo_20171127_cod,Nilo_YahuarcaniRomanya_20171127,Daniel_BogreUdell_20130101,11/27/2017,,,cod,,Cocama-Cocamilla,Kukama,,,Peru,,To Upload,CC BY-NC 3.0,,,,,,,1 checked out of 1,,,,,,1,,,No ID,"250 in Peru (Crevels 2007). Few monolinguals. Ethnic population: 15,000 (Crevels 2007).","Tupian, Tupí-Guaraní, Tupí, Cocama",,,,Americas,,2017-11-27,, +Amalaia_20171127_kek,Amalaia_Gue_20171127,Daniel_BogreUdell_20130101,11/27/2017,,,kek,,Q’eqchi’,,,,Peru,,To Upload,CC BY-NC 3.0,,,,,,,1 checked out of 1,,,,,,1,,,No ID,"800,000 in Guatemala (2009 SIL), increasing. Population total all countries: 823,500.","Mayan, Yucatecan-Core Mayan, K’ichean-Mamean, K’ichean",,,,Americas,,2017-11-27,, +Carmen_20171127_kek,Carmen_PoouBe_20171127,Daniel_BogreUdell_20130101,11/27/2017,,,kek,,Q’eqchi’,,,,Peru,,To Upload,CC BY-NC 3.0,,,,,,,1 checked out of 1,,,,,,1,,,No ID,"800,000 in Guatemala (2009 SIL), increasing. Population total all countries: 823,500.","Mayan, Yucatecan-Core Mayan, K’ichean-Mamean, K’ichean",,,,Americas,,2017-11-27,, +Zakiya_20171127_kfr,Zakiya_AdilKhatri_20171127,Daniel_BogreUdell_20130101,11/27/2017,,,kfr,,Kachchi,,,,Peru,,To Upload,CC BY-NC 3.0,,,,,,,1 checked out of 1,,,,,,1,,,No ID,"823,000 in India (2001 census). Population total all countries: 873,000.","Indo-European, Indo-Iranian, Indo-Aryan, Northwestern zone, Sindhi",,,,Eurasia,,2017-11-27,, +Wanthong_20171128_khb,Wanthong__20171128,Daniel_BogreUdell_20130101,11/28/2017,,,khb,,Lü,,,,Peru,,To Upload,CC BY-NC 3.0,,,,,,,1 checked out of 1,,,,,,1,,,No ID,"280,000 in China (2000 census). Population total all countries: 550,960. 140,000 monolinguals.","Tai-Kadai, Kam-Tai, Tai, Southwestern",,,,Eurasia,,2017-11-28,, +Noot_20171127_lao,Noot__20171127,Daniel_BogreUdell_20130101,11/27/2017,,,lao,,Lao,,,,Peru,,To Upload,CC BY-NC 3.0,,,,,,,1 checked out of 1,,,,,,1,,,No ID,"3,070,000 in Laos (2005 census). Population total all countries: 3,273,180. L2 users: 800,000 in Laos.","Tai-Kadai, Kam-Tai, Tai, Southwestern",,,,Eurasia,,2017-11-27,, +Kham_20171127_mji,Kham__20171127,Daniel_BogreUdell_20130101,11/27/2017,,,mji,,Kim Mun,Lanten,,Classification,Peru,,To Upload,CC BY-NC 3.0,,,,,,,1 checked out of 1,,,,,,1,,,No ID,"200,000 in China (Wang Fushi and Mao Zhongwu 1995). 61,000 in Hainan Province (2000 census). Population total all countries: 374,500.","Hmong-Mien, Mienic, Mian-Jin",,,,Eurasia,,2017-11-27,, +Barbara_20171127_nav,Barbara_TellerOrnelas_20171127,Daniel_BogreUdell_20130101,11/27/2017,,,nav,,Navajo,,,,Peru,3/22/2018,To Upload,CC BY-NC 3.0,,,,,,,1 checked out of 1,,,,,,1,,,No ID,"171,000 (2010 census). 7,600 monolinguals. Ethnic population: 266,000 (Ichihashi-Nakayama 2007).","Eyak-Athabaskan, Athabaskan, Apachean",,,,Americas,,2017-11-27,, +Lynda_20171127_nav,Lynda_TellerPete_20161127,Daniel_BogreUdell_20130101,11/27/2017,,,nav,,Navajo,,,,Peru,,To Upload,CC BY-NC 3.0,,,,,,,1 checked out of 1,,,,,,1,,,No ID,"171,000 (2010 census). 7,600 monolinguals. Ethnic population: 266,000 (Ichihashi-Nakayama 2007).","Eyak-Athabaskan, Athabaskan, Apachean",,,,Americas,,2017-11-27,, +Rangina_20171127_pst,Rangina_Hamidi_20161227,Daniel_BogreUdell_20130101,11/27/2017,,,pst,,"Pashto, Central",Pashto,,,Peru,3/20/2018,To Upload,CC BY-NC 3.0,,,,,,,1 checked out of 1,,,,,,1,,,No ID,"6,520,000 (2013 SIL).","Indo-European, Indo-Iranian, Iranian, Eastern, Southeastern, Pashto",,,,Eurasia,,2017-11-27,, +Wachwa_20171127_que,Wachwa_ParedesLlamocca_20171127,Daniel_BogreUdell_20130101,11/27/2017,,,que,,Quechua,Quechua Wari,,Classification,Peru,,To Upload,CC BY-NC 3.0,,,,,,,1 checked out of 1,,,,,,1,,,No ID,"Population total all languages: 8,912,820.",,,,,Americas,,2017-11-27,, +Wilbert_20171127_que,Wilbert_QuispeHuaman_20171127,Daniel_BogreUdell_20130101,11/27/2017,,,que,,Quechua,Quechua Chankas,,Classification,Peru,,To Upload,CC BY-NC 3.0,,,,,,,1 checked out of 1,,,,,,1,,,No ID,"Population total all languages: 8,912,820.",,,,,Americas,,2017-11-27,, +Luzmila_20171127_qvi,Luzmila_Zambrano_20171127,Daniel_BogreUdell_20130101,11/27/2017,,,qvi,,"Quichua, Imbabura Highland",Otavalo Kichwa,,,Peru,,To Upload,CC BY-NC 3.0,,,,,,,1 checked out of 1,,,,,,1,,,No ID,"150,000 (Gómez-Rendón 2007). Many monolinguals.","Quechuan, Peripheral Quechua, Chinchay, Northern Chinchay",,,,Americas,,2017-11-27,, +Luz_20171127_shp,Luz_FrancoAhuanari_20171127,Daniel_BogreUdell_20130101,11/27/2017,,,shp,,Shipibo-Conibo,Shipiba,,,Peru,,To Upload,CC BY-NC 3.0,,,,,,,1 checked out of 1,,,,,,1,,,No ID,"26,000 (2003 SIL).","Panoan, Mainline, Shipibo",,,,Americas,,2017-11-27,, +Modesto_20171127_spa,Modesto_NavaVega_20171127,Daniel_BogreUdell_20130101,11/27/2017,,,spa,,Spanish,,,,Peru,,To Upload,CC BY-NC 3.0,,,,,,Get a free Spanish lesson with italki: http://promos.italki.com/wikitongues_spa,1 checked out of 1,,,,,,1,,,No ID,"38,400,000 in Spain (ELDIA 2012). Population total all countries: 414,170,030. L2 users: 7,490,000 in Spain (ELDIA 2006).","Indo-European, Italic, Romance, Italo-Western, Western, Gallo-Iberian, Ibero-Romance, West Iberian, Castilian",,,,"Eurasia, Eurasia",,2017-11-27,, +Samuel_20171127_spa,Samuel_QuispeParedes_20161227,Daniel_BogreUdell_20130101,11/27/2017,,,spa,,Spanish,,,,Peru,,To Upload,CC BY-NC 3.0,,,,,,Get a free Spanish lesson with italki: http://promos.italki.com/wikitongues_spa,1 checked out of 1,,,,,,1,,,No ID,"38,400,000 in Spain (ELDIA 2012). Population total all countries: 414,170,030. L2 users: 7,490,000 in Spain (ELDIA 2006).","Indo-European, Italic, Romance, Italo-Western, Western, Gallo-Iberian, Ibero-Romance, West Iberian, Castilian",,,,"Eurasia, Eurasia",,2017-11-27,, +Arnulfo_20171127_nhn+spa,Arnulfo_Xochitiotzin_20171127,Daniel_BogreUdell_20130101,11/27/2017,,,"nhn,spa",,"Nahuatl, Central, Spanish",Central Nahuatl,,,Peru,,To Upload,CC BY-NC 3.0,,,,,,Get a free Spanish lesson with italki: http://promos.italki.com/wikitongues_spa,2 checked out of 2,,,,,,2,,,No ID,"40,000 (1980 census). All Nahuatl variety speakers: 1,380,000. 1,000 monolinguals (1990 census). Ethnic population: 63,000 (1986)., 38,400,000 in Spain (ELDIA 2012). Population total all countries: 414,170,030. L2 users: 7,490,000 in Spain (ELDIA 2006).","Uto-Aztecan, Southern Uto-Aztecan, Corachol-Aztecan, Core Nahua, Nahuatl, Indo-European, Italic, Romance, Italo-Western, Western, Gallo-Iberian, Ibero-Romance, West Iberian, Castilian",,,,"Americas, Eurasia, Eurasia",,2017-11-27,, +Zeferino_20171127_tqt,Zeferino_GaonaHernández_20171127,Daniel_BogreUdell_20130101,11/27/2017,,,tqt,,"Totonac, Ozumatlán",,,Classification,Peru,,To Upload,CC BY-NC 3.0,,,,,,,1 checked out of 1,,,,,,1,,,No ID,"1,610 (2000 census), decreasing.","Totonacan, Totonac",,,,Americas,,2017-11-27,, +Román_20171127_zap,Román_GutiérrezRuíz_20171127,Daniel_BogreUdell_20130101,11/27/2017,,,zap,,Zapotec,,,,Peru,3/21/2018,To Upload,CC BY-NC 3.0,,,,,,,1 checked out of 1,,,,,,1,,,No ID,"Population total all languages: 441,769.",,,,,Americas,,2017-11-27,, +Karl_20160802_spa,Karl_AndreiD.Flores_20160802,Karl_AndreiD.Flores_20160802,8/2/2016,,,spa,,Spanish,Philippines Spanish,,,Philippines,,To Upload,CC BY-NC 3.0,checked,,"¡Buenas! Soy Karl y soy de Filipinas. El español filipino es un dialecto del español hablado en las Filipinas y Micronesia. La mayoría de los filipinos de hoy no hablan español, como resultado de la colonización de los Estados Unidos. Se estima que sólo el tres por ciento de la población habla el idioma, pero aún así la mayoría de los hablantes hablan español europeo o español de México. + +La fonología del español filipino es muy diferente a la de otros dialectos del español. Por ejemplo, tenemos la oclusiva glotal pronunciada entre dos vocales. Así, \"país\" es pronunciado \"pa\'is\" y \"Europa\" fue pronunciada \"E\'uropa\". Se trata de una influencia de las lenguas austronesias de las Filipinas y Micronesia. Otra característica interesante es la palatalización de la ese cuando está al lado de una ye. Así, siempre es pronunciada. Igualmente el español filipino carece de aproximaciones y sólo hace uso de las oclusivas para las letras be, de y ge. + +Una gran cantidad de filipinos me preguntan por qué hablo español hoy. Piensan que quiero ser español y que hablo el lenguaje utilizado para oprimir a nuestro pueblo, la lengua de los conquistadores. Pero creo que eso es falso. Se dice que (antes) la mayoría de los filipinos hablaban el idioma y uno no se podía mover alrededor de las islas si no hablaba Español. Incluso fue utilizado para la comunicación entre los diversos grupos étnicos del país. Creo que es un aspecto valioso de nuestro patrimonio que la mayoría de la gente parece haber olvidado. Claro, no solo era la lengua de los colonizadores, sino que también fue el idioma que unió a nuestros pueblos y nos dio una identidad nacional. Hoy en día, aunque aumenta el número de hablantes de español, es muy poco probable que alguna vez así llegue a la posición que tuvo hace un siglo. +","Greetings! I\'m Karl and I\'m from the Philippines. Philippine Spanish is a dialect of Spanish spoken in the Philippines and Micronesia. Most Filipinos today do not speak Spanish, a result of American colonization, and only an estimated 3% of the population does speak the language, but even then most speakers speak Castillian or Mexican Spanish. + +The phonology of Philippine Spanish is quite different from other dialects of Spanish. For example, we have the glottal stop pronounced between two vowels. So país is pronounced pa\'is and Europa is pronounced E\'uropa. This is an influence from the Austroneian languages of the Philippines and Micronesia. Another interesting feature is the palatalization of the s when it\'s next to a y. So siempre is pronounced shiempre. The dialect also has the e phoneme instead of the e one. Philippine Spanish also lacks approximants and only makes use of plosives for the letters be, de and ge. + +A lot of Filipinos ask me today why I speak Spanish. They think I want to be a Spaniard and that I am speaking the language used to oppress our people, the language of the conquerors. But I think that is false. A majority of Filipinos were said to have spoken the language and you could not get around the islands once if you did not speak Spanish. It was even used for communication by the various ethnic groups in the country. I think its a valuable aspect of our heritage that most people seem to have forgotten. Sure, it was the language of the colonizers, but it was also the language that united our peoples and gave us a national identity. Today, while Spanish is currently rising in the number of speakers, it is highly unlikely that it well ever reach the position it once held a century ago. +","Lipa City, the Philippines",Get a free Spanish lesson with italki: http://promos.italki.com/wikitongues_spa,1 checked out of 1,,,,,,1,,,No ID,"38,400,000 in Spain (ELDIA 2012). Population total all countries: 414,170,030. L2 users: 7,490,000 in Spain (ELDIA 2006).","Indo-European, Italic, Romance, Italo-Western, Western, Gallo-Iberian, Ibero-Romance, West Iberian, Castilian",Indo-European,§Philippines Spanish,,"Eurasia, Eurasia",,2016-8-5,, +Karl_20160802_fil,Karl_AndreiD.Flores_20160802,Karl_AndreiD.Flores_20160802,8/2/2016,Screen Shot 2016-09-02 at 4.32.39 PM.png (https://dl.airtable.com/OqI2IxqkS0aP7hvn05ca_Screen%20Shot%202016-09-02%20at%204.32.39%20PM.png),Karl_s1_M_20160802_fil.jpg (https://dl.airtable.com/0hJ9Enl0SNy99RAWd3ff_Karl_s1_M_20160802_fil.jpg),fil,,Filipino,,,,Philippines,9/2/2016,Public,CC BY-NC 3.0,checked,,," My Tagalog is a mixture of several dialects, since my mother speaks Mindoreño Tagalog natively and my father speaks Batangueño Tagalog, coupled with the superstrate influences from Manileño Tagalog. I used the vocabulary I and most Filipinos would use in regular speech, so you\'ll find a few English loanwords and phrases as is done in regular speech. Filipino is also used interchangeably with Tagalog, so I used both in this form. + +","Lipa City, the Philippines",,1 checked out of 1,,,,,,1,,o9_h--Obpvw,https://youtu.be/o9_h--Obpvw,"L2 users: 45,000,000 (2013). Widely spoken as L2.","Austronesian, Malayo-Polynesian, Philippine, Greater Central Philippine, Central Philippine, Tagalog",Austronesian,§,,Eurasia,,2016-8-5,, +James_20170828_fil+eng+spa,James_Habitan_20170828,James_Habitan_20170828,8/28/2017,Screen Shot 2017-11-05 at 5.06.17 PM.png (https://dl.airtable.com/VZl7txDxRCkdKGiqIlGd_Screen%20Shot%202017-11-05%20at%205.06.17%20PM.png),James_20170828_fil+eng+spa.png (https://dl.airtable.com/EuNeuAo1Qe7EiLmLWLKB_James_20170828_fil%2Beng%2Bspa.png),"fil,eng,spa",,"Filipino, English, Spanish",,,,Philippines,11/9/2017,Public,CC BY-SA 4.0,checked,checked,"Filipino: Magandang araw sa inyong lahat. Ako ay si Jaime Luis S. habitan pero maaring niyo akong tawaging ""James"". Ako ay dalawampu't anim na taong gulang na pero magiging dalawampu't pitong gulang na ako sa darating ikatatlumpu't isa ng Agosto, taong kasalukuyan. Isa akong Filipino na nakatira sa Kalakhang Maynila. Nagtatrabaho ako bilang isang video editor sa Lungsod ng Makati. Tatlo ang alam kong mga wika: Ang wikang Filipino, ang wikang Ingles, at ang wikang Espanyol na kasalukuyan kong inaaral ngayon sa Instituto Cervantes sa Lungsod ng Makati. + +English: Good day, my name is Jaime Luis Habitan, but you may call me ""James"". I'm twenty six years old but I'll be turning 27 this coming August 31st, 2017. I'm a Filipino and I live in Metro Manila. I'm a video editor working in Makati City. I know how to speak three languages: Filipino, English and Spanish. Spanish, I'm currently learning, currently studying in Instituto Cervantes (in Makati). + +Spanish:¡Hola! ¿Como esta? Mi nombre es Jaime Luis S. Habitan pero me llamo James. Tengo veinte y seis años. Soy filipino y vivo en metropolitano Manila. Soy editor del video en Makati. Hablo tres idiomas: filipino, ingles y un poco español. Estoy estudiando español en Instituto Cervantes en Makati City. +¡Gracias!","Filipino: Magandang araw sa inyong lahat. Ako ay si Jaime Luis S. habitan pero maaring niyo akong tawaging ""James"". Ako ay dalawampu't anim na taong gulang na pero magiging dalawampu't pitong gulang na ako sa darating ikatatlumpu't isa ng Agosto, taong kasalukuyan. Isa akong Filipino na nakatira sa Kalakhang Maynila. Nagtatrabaho ako bilang isang video editor sa Lungsod ng Makati. Tatlo ang alam kong mga wika: Ang Wikang Filipino, ang wikang Ingles, at ang wikang Espanyol na kasalukuyan kong inaaral ngayon sa Instituto Cervantes sa lungsod ng Makati. English: Good day, my name is Jaime Luis Habitan, but you may call me ""James"". I'm twenty six years old but I'll be turning 27 this coming August 31st, 2017. I'm a Filipino and I live in Metro Manila. I'm a video editor working in Makati City. I know how to speak three languages: Filipino, English and Spanish. Spanish, I'm currently learning, currently studying in Instituto Cervantes (in Makati). Spanish:¡Hola! ¿Como esta? Mi nombre es Jaime Luis S. Habitan pero me llamo James. Tengo veinte y seis años. Soy filipino y vivo en metropolitano Manila. Soy editor del video en Makati. Hablo tres idiomas: filipino, ingles y un poco español. Estoy estudiando español en Instituto Cervantes en Makati City. ¡Gracias!","Valenzuela City +""I tend to stutter when I get a bit nervous so it'd probably showed in my video. But I do hope I get to send you more videos showcasing Filipino in the near future. + +Thank you. +""","Get a free English lesson with italki: http://promos.italki.com/wikitongues_eng, Get a free Spanish lesson with italki: http://promos.italki.com/wikitongues_spa",3 checked out of 3,,,,,,3,,,No ID,"L2 users: 45,000,000 (2013). Widely spoken as L2., 55,600,000 in United Kingdom (ELDIA 2012). Population total all countries: 335,148,868. L2 users: 1,500,000 in United Kingdom (Crystal 2003). L2 users worldwide: 505,000,000., 38,400,000 in Spain (ELDIA 2012). Population total all countries: 414,170,030. L2 users: 7,490,000 in Spain (ELDIA 2006).","Austronesian, Malayo-Polynesian, Philippine, Greater Central Philippine, Central Philippine, Tagalog, Indo-European, Germanic, West, English, Indo-European, Italic, Romance, Italo-Western, Western, Gallo-Iberian, Ibero-Romance, West Iberian, Castilian",,,"This video was submitted by James Habitan from Valenzuela City, Philippines. His mother tongue, Filipino, known natively as Wikang Filipino, is a standardized form of the Tagalog language spoken by as many as 70 million people throughout the Republic of the Philippines, where it is co-official alongside English. It is also common among diaspora communities worldwide. An Austronesian language, Filipino shares common genealogy with languages throughout the Pacific and Indian Oceans, from Hawaiian in Polynesia to Malagasy in Madagascar. Since the language is one of the principal lingua francas of the Philippines, the Filipino-speaking community is extremely diverse: only 28 million, or less than half, claim the language as their mother tongue, while the rest claim the country’s other 180 languages.","Eurasia, Eurasia, Eurasia, Eurasia, Eurasia",,2017-9-2,Metro Manila_PH, +Martha_20151013_aym,Martha__20151013,Daniel_BogreUdell_20130101,10/13/2015,Screen Shot 2015-10-12 at 20.34.50.png (https://dl.airtable.com/q8x137h0TTK20b5VUNlJ_Screen%20Shot%202015-10-12%20at%2020.34.50.png),marth-aym-thumb.png (https://dl.airtable.com/04INIWqLRlaMtv3zUI0z_marth-aym-thumb.png),aym,,Aymara,,,,Philippines,10/13/2015,Public,Standard,,,,,,,1 checked out of 1,,,,2016-7-12,,1,checked,vydhTL5SoIs,https://youtu.be/vydhTL5SoIs,"Population total all languages: 2,808,000.",,,"Aymara,,,,,",,Americas,,2015-2-7,, +Mario_20161021_eng+cmn+jpn+por,Mario_Ferreira_20161021,Mario_Ferreira_20161021,10/21/2016,Screen Shot 2016-11-30 at 16.35.52.png (https://dl.airtable.com/5xplwqonS0Ku8c56gGoV_Screen%20Shot%202016-11-30%20at%2016.35.52.png),Mario_s4_M_20161021_eng+cmn+jpn+por.jpg (https://dl.airtable.com/zF2XOrqkSOqOF4HBd6Yw_Mario_s4_M_20161021_eng%2Bcmn%2Bjpn%2Bpor.jpg),"eng,cmn,jpn,por",,"English, Chinese, Mandarin, Japanese, Portuguese",,,,Portugal,11/30/2016,Public,CC BY-NC 3.0,checked,,"Hello my name is Mario Ferreira my native language is Chinese(Mandarim) and I were born in Shanghai, China, I am currently 16 years old. +[中文(Chinese):] +大家你们好我是葡萄牙和中国的混血儿我生在中国上海市以后9岁的时候到了葡萄牙。 +[日本語(Japanese):] +みんなさんこんにちは +僕はマリオといます +今留学のプログラムで大坂にいますそして今度は一ヶ月だけれど未来に帰るつもりがあります。 +じゃ今自分のポルトガル語で話します。 +[Português(Portuguese):] +Olá a todos o meu nome é Mário Ferreira eu tenho 16 anos e estou a viver por um mês no Japão para aprofundar o meu Japonês.","Hello my name is Mario Ferreira my native language is Chinese(Mandarim) and I were born in Shanghai, China, and I am currently 16 years old. +Hello everyone I'm half Portuguese and half Chinese, 9 years after being born in Shanghai, China I went to Portugal. +Hello everyone, my name is Mario, currently I'm in a student exchange program in Osaka, while this time being 1 month, I'm planning on comming to Japan in the future. So I will now speak in my own language, which is Portuguese. +Hello everyone, my name is Mario Ferreira, I'm 16 years old and I'm living for a months in Japan to further improve my Japanese. +Optional Message: Japan is a amazing country with amazing culture difference being the fact they were different in culture and the fact they are maintaining a big majority of their culture, I would definitely suggest anyone to go visit Japan.",,"Get a free English lesson with italki: http://promos.italki.com/wikitongues_eng, Get a free Japanese lesson with italki: http://promos.italki.com/wikitongues_jpn, Get a free Portuguese lesson with italki: http://promos.italki.com/wikitongues_por",4 checked out of 4,,,,,,4,,-UlCJviJ8MQ,https://youtu.be/-UlCJviJ8MQ,"55,600,000 in United Kingdom (ELDIA 2012). Population total all countries: 335,148,868. L2 users: 1,500,000 in United Kingdom (Crystal 2003). L2 users worldwide: 505,000,000., 840,000,000 in China (2000 census), increasing. 70% of Chinese language users speak a Mandarin dialect as L1. Population total all countries: 847,808,270. L2 users: 178,000,000 in China., 121,000,000 in Japan (1985). Population figure may include other ethnic groups. Population total all countries: 122,056,940. L2 users: 1,000,000 in Japan., 10,000,000 in Portugal (ELDIA 2012). Population total all countries: 203,349,200.","Indo-European, Germanic, West, English, Sino-Tibetan, Chinese, Japonic, Indo-European, Italic, Romance, Italo-Western, Western, Gallo-Iberian, Ibero-Romance, West Iberian, Portuguese-Galician",Indo-European,§,,"Eurasia, Eurasia, Eurasia, Eurasia, Eurasia, Eurasia",,2016-10-26,, +António+Domingos+Porfirio_20150815_mwl,"António__20150815,Domingos__20150815,Porfirio__20150815",Daniel_BogreUdell_20130101,8/15/2015,antoniodomingosporfirio-mwl-thumb-raw.png (https://dl.airtable.com/9m0T7VvQrWL6MDiMRMa4_antoniodomingosporfirio-mwl-thumb-raw.png),AntonioDomingosPorfirio_s1_MMM_20150815_mwl.png (https://dl.airtable.com/L8V0ruGfQgOZevaJC8wL_AntonioDomingosPorfirio_s1_MMM_20150815_mwl.png),mwl,,Mirandese,,,,Portugal,10/6/2015,Public,Standard,,,,,,,1 checked out of 1,,,,,,1,checked,-gnJtZFyzZA,https://youtu.be/-gnJtZFyzZA,"15,000 (2000). 10,000 use it regularly, 5,000 when they return to the area. 2,000 Sendinese in Sendim Vila.","Indo-European, Italic, Romance, Italo-Western, Western, Gallo-Iberian, Ibero-Romance, West Iberian, Asturo-Leonese",Indo-European,"Mirandese,,,,,",,Eurasia,,2015-9-7,, +Celena_20150815_mwl+por,Celena__20150815,Daniel_BogreUdell_20130101,8/15/2015,celena-mwl-thumb-raw.png (https://dl.airtable.com/l2RrUQWZS7utGr4IqMtQ_celena-mwl-thumb-raw.png),Celena_s2_F_20150815_mwl+por.jpg (https://dl.airtable.com/jRryEE7aQCtRJoo85jwq_Celena_s2_F_20150815_mwl%2Bpor.jpg),"mwl,por",,"Mirandese, Portuguese",,,,Portugal,9/24/2016,Public,Standard,,,,,,Get a free Portuguese lesson with italki: http://promos.italki.com/wikitongues_por,2 checked out of 2,,56,,,,2,,MehharK-ZmA,https://youtu.be/MehharK-ZmA,"15,000 (2000). 10,000 use it regularly, 5,000 when they return to the area. 2,000 Sendinese in Sendim Vila., 10,000,000 in Portugal (ELDIA 2012). Population total all countries: 203,349,200.","Indo-European, Italic, Romance, Italo-Western, Western, Gallo-Iberian, Ibero-Romance, West Iberian, Asturo-Leonese, Indo-European, Italic, Romance, Italo-Western, Western, Gallo-Iberian, Ibero-Romance, West Iberian, Portuguese-Galician",Indo-European,§,,"Eurasia, Eurasia, Eurasia",,2015-9-7,, +Aurora+Ademar_20150815_mwl,"Aurora__20150815,Ademar__20150815",Daniel_BogreUdell_20130101,8/15/2015,Screen Shot 2017-01-30 at 20.30.07.png (https://dl.airtable.com/Aj1o2O3ZSnGJHn0eZHoT_Screen%20Shot%202017-01-30%20at%2020.30.07.png),Aurora & Ademar_s1_FM_20150815_mwl.jpg (https://dl.airtable.com/i4z2TwhbQ9jwQ4Foe2OG_Aurora%20%26%20Ademar_s1_FM_20150815_mwl.jpg),mwl,,Mirandese,,,,Portugal,2/16/2017,Public,Standard,,,,,,,1 checked out of 1,,82,,,,1,,5Uo-B9GaciQ,https://youtu.be/5Uo-B9GaciQ,"15,000 (2000). 10,000 use it regularly, 5,000 when they return to the area. 2,000 Sendinese in Sendim Vila.","Indo-European, Italic, Romance, Italo-Western, Western, Gallo-Iberian, Ibero-Romance, West Iberian, Asturo-Leonese",Indo-European,§,,Eurasia,,2015-9-7,, +Isabel_20150815_mwl,Isabel__20150815,Daniel_BogreUdell_20130101,8/15/2015,CWVcnqKqTB2ctDk2BiNx_isabel-mwl-thum-raw.png (https://dl.airtable.com/TpQrnFFkSjGmFRny7RuS_CWVcnqKqTB2ctDk2BiNx_isabel-mwl-thum-raw.png),Isabel_s1_F_20150815_mwl.jpg (https://dl.airtable.com/MXuKyDclQRCkdTtd8fhT_Isabel_s1_F_20150815_mwl.jpg),mwl,,Mirandese,,,,Portugal,4/4/2017,Public,Standard,,,,,,,1 checked out of 1,,87,,,,1,,QLFOGwmPei0,https://youtu.be/QLFOGwmPei0,"15,000 (2000). 10,000 use it regularly, 5,000 when they return to the area. 2,000 Sendinese in Sendim Vila.","Indo-European, Italic, Romance, Italo-Western, Western, Gallo-Iberian, Ibero-Romance, West Iberian, Asturo-Leonese",Indo-European,§,,Eurasia,,2015-9-7,, +Tereza_20160825_hun,Tereza__20160825,Robert_Keresztesy_,8/25/2016,Screen Shot 2017-01-17 at 16.53.16.png (https://dl.airtable.com/TBWWPxBT32yo0GnDJ0vR_Screen%20Shot%202017-01-17%20at%2016.53.16.png),Tereza_s1_F_20160825_hun.jpg (https://dl.airtable.com/EqFBnULQW6szKMYeSQt7_Tereza_s1_F_20160825_hun.jpg),hun,,Hungarian,Csángó Hungarian,,,Romania,1/18/2017,Public,CC BY-NC 3.0,checked,,,,,,1 checked out of 1,,,,,,1,,SMy4jzw2W08,https://youtu.be/SMy4jzw2W08,"9,840,000 in Hungary (ELDIA 2012). Population total all countries: 12,606,130.",Uralic,,§Csángó Hungarian,,Eurasia,,2016-8-25,, +Evgenii_20170214_ckt,Evgenii__20170214,Robert_Keresztesy_,2/14/2017,Screen Shot 2017-03-01 at 21.02.19.png (https://dl.airtable.com/fpmLfZbPTQmLLitPeZzb_Screen%20Shot%202017-03-01%20at%2021.02.19.png),Evgenii_s1_M_20170214_ckt.jpg (https://dl.airtable.com/3kRIrEkOTieUrTuiuMUH_Evgenii_s1_M_20170214_ckt.jpg),ckt,,Chukchi,,,,Romania,3/18/2017,Public,CC BY-SA 4.0,checked,,,,,,1 checked out of 1,,,,,,1,,a9XYhuJhJY8,https://youtu.be/a9XYhuJhJY8,"5,100 (2010 census). Ethnic population: 15,900 (2010 census).","Chukotko-Kamchatkan, Northern, Chukot",Chukotko-Kamchatkan,§,,Eurasia,,2017-2-14,, +Neceadin_20170617_crh,Neceadin__20170617,Robert_Keresztesy_,6/17/2017,"Screen Shot 2017-06-17 at 1.26.32 PM.png (https://dl.airtable.com/rZQSjYIxQTysoLDgO6kA_Screen%20Shot%202017-06-17%20at%201.26.32%20PM.png),Screen Shot 2017-08-08 at 4.08.27 PM.png (https://dl.airtable.com/u78dbFj1RGeBn48mQOny_Screen%20Shot%202017-08-08%20at%204.08.27%20PM.png)","Neceadin_20170617_crh.png (https://dl.airtable.com/t9QkhtTXThSFRa1fMzVW_Neceadin_20170617_crh.png),Neceadin_20170617_crh.jpg (https://dl.airtable.com/FvHZlZOjT8mUBhZoTB7D_Neceadin_20170617_crh.jpg)",crh,,Crimean Tatar,,,,Romania,8/10/2017,Public,CC BY-SA 4.0,checked,,,,"Video recorded in Hagieni, Constanța, Romania. +""Crimean Tatar is a Turkic language spoken traditionally in the Crimean Peninsula, and also by diaspora communities in Turkey, Uzbekistan, Bulgaria, and Romania, where Neceadin lives.""",,1 checked out of 1,,,,,,1,,kc8rKa11EzI,https://youtu.be/kc8rKa11EzI,"260,000 in Ukraine (2006 A. Goriainov). Population total all countries: 475,540.","Altaic, Turkic, Southern",Altaic,,"This video was recorded by Robert Keresztesy in Hagieni, Constanța, Romania, where Neceadin lives. Crimean Tatar is spoken by as many as 480,000 people, primarily in the contested territories of the Crimean peninsula, where it is regionally recognized. It was traditionally Crimea's primary language, until the USSR ordered the forced expulsion of all Crimean Tatars following World War II. Though many have since returned, prominent diaspora communities remain in Turkey, Uzbekistan, Bulgaria, and Romania. A Turkic language, Crimean Tatar is related to languages such as Turkish, Turkmen, and Azeri. It was the mother tongue of the 20th century poet Bekir Çoban-zade.",Eurasia,,2017-6-22,, +Raluca_20170421_ron,Raluca__20170421,Nick_Panzarella_,4/21/2017,Screen Shot 2017-06-01 at 13.36.58.png (https://dl.airtable.com/EuJ3sY1NSsaqd5NgMhve_Screen%20Shot%202017-06-01%20at%2013.36.58.png),Raluca_s1_F_20170421_ron.png (https://dl.airtable.com/DyxaVRUQruDKaLWZas4g_Raluca_s1_F_20170421_ron.png),ron,,Romanian,,Cluj Napoca,,Romania,6/10/2017,Public,CC BY-SA 4.0,checked,,,,,Get a free Romanian lesson with italki: http://promos.italki.com/wikitongues_ron,1 checked out of 1,,,,,,1,,6TiSKGRjYLs,https://youtu.be/6TiSKGRjYLs,"19,900,000 in Romania (ELDIA 2012). Population total all countries: 23,782,990.","Indo-European, Italic, Romance, Eastern",Indo-European,Romanian,"This video was recorded by Nick Panzarella in Cluj Napoca, Romania, where he was travelling at the time. Romanian is spoken by at least 24 million people, primarily in the European nations of Romania, where it is nationally official, and Moldova, where it is typically called Moldovan. It is also spoken by diaspora communities worldwide. An Indo-European language of the Romance family, Romanian is descended from Latin and therefore related to languages like Spanish, Portuguese, and French. Romanian has been a literary language since at least the 16th century CE and is widely supported by operating systems and machine translation software today.",Eurasia,,2017-4-21,, +Florentina_20150220_rup,Florentina__20150220,Florentina__20150220,2/20/2015,fiorentina-rup-thumb-raw.png (https://dl.airtable.com/6uFF9uXNS5ES56XLcZxW_fiorentina-rup-thumb-raw.png),Florentina_s1_F_20150220_rup.jpg (https://dl.airtable.com/oYRhIpvlT9mAHSCI7mQW_Florentina_s1_F_20150220_rup.jpg),rup,,Aromanian,,,,Romania,3/3/2015,Public,CC BY-NC 3.0,checked,,,,,,1 checked out of 1,,,,,,1,checked,dDQLdHkhPTE,https://youtu.be/dDQLdHkhPTE,"50,000 in Greece (Salminen 1993). Population total all countries: 114,340. Ethnic population: 700,000 ( Association of French Aromanians).","Indo-European, Italic, Romance, Eastern",Indo-European,"Aromanian,,,,,",,Eurasia,,2015-7-23,, +Vseslav_20151201_eng+deu+ukr+pol+fra,Vseslav__20140927,Vseslav__20140927,12/1/2015,vseslav-frapolukrdeueng-thumb-raw.png (https://dl.airtable.com/oLtbuxLQUixG5Zq8g9M2_vseslav-frapolukrdeueng-thumb-raw.png),"""thumbnail- Veslav speaking English, German, French, Polish and Ukrainian.jpg (https://dl.airtable.com/ZmAjBcWDT9y2bywF7mi5_thumbnail-%20Veslav%20speaking%20English%2C%20German%2C%20French%2C%20Polish%20and%20Ukrainian.jpg)""","eng,deu,ukr,pol,fra",,"English, German, Standard, Ukrainian, Polish, French",,,,Russian Federation,2/25/2016,Public,CC BY-NC 3.0,checked,,,,,"Get a free English lesson with italki: http://promos.italki.com/wikitongues_eng, Get a free German, Standard lesson with italki: http://promos.italki.com/wikitongues_deu, Get a free Polish lesson with italki: http://promos.italki.com/wikitongues_pol, Get a free French lesson with italki: http://promos.italki.com/wikitongues_fra",5 checked out of 5,,14,,,,5,checked,vPY5v6SBkxM,https://youtu.be/vPY5v6SBkxM,"55,600,000 in United Kingdom (ELDIA 2012). Population total all countries: 335,148,868. L2 users: 1,500,000 in United Kingdom (Crystal 2003). L2 users worldwide: 505,000,000., 69,800,000 in Germany (ELDIA 2012). Population total all countries: 78,245,280. L2 users: 8,000,000 in Germany (ELDIA 2012)., 32,000,000 in Ukraine (2001 census). Population total all countries: 36,048,890. Ethnic population: 37,500,000 (2001 census)., 36,600,000 in Poland (ELDIA 2012). Population total all countries: 38,663,780., 60,000,000 in France (ELDIA 2012). Population total all countries: 74,980,460.","Indo-European, Germanic, West, English, Indo-European, Germanic, West, High German, German, Middle German, East Middle German, Indo-European, Slavic, East, Indo-European, Slavic, West, Lechitic, Indo-European, Italic, Romance, Italo-Western, Western, Gallo-Iberian, Gallo-Romance, Gallo-Rhaetian, Oïl, French",Indo-European,§,,"Eurasia, Eurasia, Eurasia, Eurasia, Eurasia, Eurasia, Eurasia, Eurasia, Americas, Eurasia, Eurasia",,2015-12-1,, +Movsar_20170713_che,Movsar_Bekaev_20170713,Movsar_Bekaev_20170713,7/13/2017,Screen Shot 2017-08-03 at 1.13.15 PM.png (https://dl.airtable.com/znvCB4S6RIa65xeDSOUq_Screen%20Shot%202017-08-03%20at%201.13.15%20PM.png),Movsar_20170713_che.png (https://dl.airtable.com/vzCtbWHGSkiPFHr5LBOI_Movsar_20170713_che.png),che,,Chechen,,,,Russian Federation,8/19/2017,Public,CC BY-NC 3.0,checked,,,,,,1 checked out of 1,,,,,,1,,S-It8jeuq-w,https://youtu.be/S-It8jeuq-w,"1,350,000 in Russian Federation (2010 census). Population total all countries: 1,361,000. 233,000 monolinguals. Ethnic population: 1,430,000 (2010 census).","North Caucasian, East Caucasian, Nakh, Chechen-Ingush",,,"This video was submitted by Movsar Bekaev from Shali, Chechen Republic, Russia, where he lives and works. Chechen is spoken by as many as 1.4 million people, primarily in the Russian territories of Chechnya and Dagestan, where it is an official language, as well as in parts of Jordan and Georgia. It is also spoken by diaspora communities worldwide, especially in Central Asia. Chechen has been a written language for centuries, having featured in Islamic texts and clan histories, usually through a variation of the Arabic alphabet. Following the rise of the Soviet Union in 1922, Chechen speakers began shifting toward the Latin and Cyrillic alphabets, of which the latter is more prominent today, especially online.",Eurasia,,2017-7-13,, +Patinat_20170705_ava,Patinat_Rasulova_20170705,Elise_Lieberman_20160622,7/5/2017,,,ava,,Avar,,,,Russian Federation,,To Upload,CC BY-NC 3.0,,,,,Recorded in Moscow. Patinar is from the Republic of Dagistan. ,,1 checked out of 1,,,,,,1,,,No ID,"715,000 in Russian Federation (2010 census). Population total all countries: 761,960. Ethnic population: 912,000 (2010 census).","North Caucasian, East Caucasian, Avar-Andic, Avar",North Caucasian,,,Eurasia,,2017-7-5,Moscow*_RU, +Alana_20170705_oss,Alana__20170705,Elise_Lieberman_20160622,7/5/2017,,,oss,,Ossetic,"Two dialects of Ossetian, Iron and Digorsky (Digor), the language of Northern Ossetia-Alania",,,Russian Federation,,To Upload,CC BY-NC 3.0,,,,,,,1 checked out of 1,,,,,,1,,,No ID,"451,000 in Russian Federation (2010 census). Population total all countries: 577,450. Ethnic population: 529,000 (2010 census).","Indo-European, Indo-Iranian, Iranian, Eastern, Northeastern",Indo-European,,,Eurasia,,2017-7-5,Moscow*_RU, +Daria_20170705_rsl,Daria_Mikhailova_20170705,Elise_Lieberman_20160622,7/5/2017,Daria_20170705_rsl.png (https://dl.airtable.com/DiYfNhQAWIagh6aEvjXg_Daria_20170705_rsl.png),Daria_20170705_rsl.png (https://dl.airtable.com/Jo5MFsqtQDW9AYILhNrm_Daria_20170705_rsl.png),rsl,,Russian Sign Language,,,,Russian Federation,7/16/2017,Public,CC BY-NC 3.0,,,,,,,1 checked out of 1,,,,,,1,,,No ID,"121,000 in Russian Federation (2010 census).",Deaf sign language,Deaf sign language,§Russian Sign Language,"This video was recorded by Elise Lieberman in Moscow, Russia, where she was visiting and where Daria lives and works. Russian Sign Language (РЖЯ) is spoken by as many as 120,000 people, primarily in Russia, as well as other countries in Eastern Europe and Central Asia; this includes Moldova, Ukraine, Lithuania, Georgia, Mongolia, and Kazakhstan. A member of the French Sign Family of languages, РЖЯ shares genealogy with sign languages around the world, including those of the United States (ASL), Mexico (LSM), and even Madagascar (NSL). РЖЯ is thought to have developed at the turn of the nineteenth century, in the deaf schools of Pavlovsk near St. Petersburg.",Eurasia,,2017-7-5,Moscow*_RU, +Zarina_20170705_oss,Zarina__20170705,Elise_Lieberman_20160622,7/5/2017,Screen Shot 2017-08-03 at 12.56.55 PM.png (https://dl.airtable.com/xkQBHYw7QyBh09n53Nns_Screen%20Shot%202017-08-03%20at%2012.56.55%20PM.png),Zarina_20170705_oss.png (https://dl.airtable.com/JwJlw2QzQDqEnj4IcWJ4_Zarina_20170705_oss.png),oss,,Ossetic,"Kudarsky (Kudar), language of Southern Ossetia ",,,Russian Federation,8/8/2017,Public,CC BY-NC 3.0,,,,,Moscow,,1 checked out of 1,,,,2017-9-24,https://www.facebook.com/wikitongues/videos/1574411435956711/,1,,pS5Adkwaf-U,https://youtu.be/pS5Adkwaf-U,"451,000 in Russian Federation (2010 census). Population total all countries: 577,450. Ethnic population: 529,000 (2010 census).","Indo-European, Indo-Iranian, Iranian, Eastern, Northeastern",Indo-European,,"This video was recorded by Elise Lieberman in Moscow, Russia, where she was visiting and where Zarina lives and works. Kudarsky, also known as Kudar, is a variety of the Ossetian language, which is spoken by as many as 570,000 people, primarily in the Russian Republic of North Ossetia-Alania and the partially-recognized state of South Ossetia. It is also spoken in parts of Greece and Turkey. An Iranian member of the Indo-European family of languages, Ossetian shares much genealogy with Kurdish, as well as the Yaghnobi language of Tajikistan. A written language since at least the 12th century CE, Ossetian was originally written with the Greek alphabet. Today, Cyrillic is more widely used.",Eurasia,,2017-7-5,Moscow*_RU, +Aigul_20170705_kir,Aigul__20170705,Elise_Lieberman_20160622,7/5/2017,Aiguk_20170705_kir.png (https://dl.airtable.com/UIhQdcFVRk6O9AIyJ9ZD_Aiguk_20170705_kir.png),Aigul_20170705_kir.png (https://dl.airtable.com/bUm9NAk0SNmBUZVIb1Of_Aigul_20170705_kir.png),kir,,Kyrgyz,,,,Russian Federation,8/26/2017,Public,CC BY-NC 3.0,,,,,"Moscow, Russia. Aigul is from Bishkek. ",,1 checked out of 1,,,,,,1,,UZNsPtr9Ekg,https://youtu.be/UZNsPtr9Ekg,"2,450,000 in Kyrgyzstan (1993 UBS). Population total all countries: 2,941,930.","Altaic, Turkic, Western, Aralo-Caspian",Altaic,,"This video was recorded by Elise Lieberman in Moscow, Russia, where she was visiting and where Aigul lives and works. Kyrgyz is spoken by as many as 4.3 million people, primarily in the Central Asian nation of Kyrgyzstan, where it is nationally official, as well as in the neighboring countries of China, where it is regionally recognized, Kazakhstan, Tajikistan, and Uzbekistan. It is also spoken by communities in Pakistan, Afghanistan, Turkey, and Russia. A Turkic language, Kyrgyz was written with the Arabic alphabet for centuries, until the rise of the USSR prompted a shift toward the Cyrillic alphabet, shared with Russian. In recent decades, a movement to switch to the Latin alphabet has emerged.",Eurasia,,2017-7-5,Moscow*_RU, +Inna_20170705_ady,Inna_Dzhambekova_20170705,Elise_Lieberman_20160622,7/5/2017,Inna_20170705_ady.png (https://dl.airtable.com/GSr968VxR7GG0cdz1JsU_Inna_20170705_ady.png),Inna_20170705_ady.jpg (https://dl.airtable.com/K86bylBzShao7tL51RWK_Inna_20170705_ady.jpg),ady,,Adyghe,Circassian?,,,Russian Federation,9/7/2017,Public,CC BY-NC 3.0,,,,,"Moscow, Russia. Inna is from the Cherkess Republic. + +Circassian?",,1 checked out of 1,,,,,,1,,w1Bugj3Ws7w,https://youtu.be/w1Bugj3Ws7w,"117,500 in Russian Federation (2010 census). Population total all countries: 491,800. 0 monolinguals ( Ministry of Education, Adygea Republic). Ethnic population: 129,000 (2010 census).","North Caucasian, West Caucasian, Circassian",North Caucasian,,"This video was recorded by Elise Lieberman in Moscow, Russia, where she was visiting at the time and where Inna lives and works. Adyghe is spoken by as many as 600,000 people, primarily in the Russian Republic of Adygea, where it is an official language alongside Russian, as well ass Inna's native Karachay-Cherkess Republic. A member of the Caucasian linguistic group, it is related to Circassian to such an extent that some linguists have argued both to be distinct varieties of a single mother tongue. Though Adyghe was traditionally written with varieties of the Latin and Arabic alphabets, a Cyrillic orthography, standardized following Russia’s October Revolution in 1917, predominates literature today.",Eurasia,,2017-7-5,Moscow*_RU, +Jovana_20130901_srp,Jovana__20130901,Jovana__20130901,9/1/2013,jovana.png (https://dl.airtable.com/d3s9x7H6QeOkaiT0kdAO_jovana.png),Jovana_s1_F_20130901_srp.png (https://dl.airtable.com/bz5gbfvTqCHKwpl2fRJg_Jovana_s1_F_20130901_srp.png),srp,,Serbian,,,,Serbia,9/8/2013,Public,Standard,,checked,"Hello, my name is Jovana, and I come from Belgrade, Serbia. Моја матерњи језик је српски. Језик није јако распрострањен, карактеристичан је за Србију, али и србе који живе ван Србије, јер српска дијаспора је доста јака и доста људи вани говори српски језик. Врло је могуће да на улици можете чути српски језик, а да и не знате о ком се језику ради. Српки језик је карактеристичан по томе што се у различитим деловима говори различитим акцентом, дијалектом, речи се брже или спорије изговарају, тако да одмах када чујете српски језик, зависно од тога како га та особа говори можете закључити из ког је дела Србије. За мене лично говорити српски језик представља велику предност, пре свега што језик није јако распрострањен, тако да увек могу радити као преводилац некоме ко српски језик не разуме. У Србији је карактеристично и то што за један предмет можете наћи бар пет речи којима га можете назвати. Сам језик је јако богат речима, а постоје речи које људи користе и у сленгу. Такође карактеристично за српски језик је и што мене моји пријатељи који нису из Србије воле да терају јесте да их учим српске псовке. Не знам зашто, али много људи каже да је опсовати некога на српском језику нешто најзанимљивије. Тако да моји пријатељи сада знају и по пет шест псовки на српском језику. Занимљиво је то баш учинити на неком језику који није распрострањен, да бисте били готово сигурни да тај језик није чест и да нећете често наићи на особу која га говори. Шта вам још могу рећи о српском језику. Веома је интересантан, мада је за многе који га уче граматика јако тешка. Језик је сам по себи веома занимљив. Нешто најтеже што мислим да пада људима који уче српски језик, а који нису српске националности, тј. којима то није матерњи језик, јесте изговарање гласова ч, џ, ш, ћ….гласова који нису карактеристични за неке друге језике. Веома им је тешко да се навикну да те гласове изговарају појединачна, а камоли у реченици. Посебно уколико српски језик желите да причате брзо и течно, а не полако и почетнички. И поред тога мислим да је српски језик леп и интересантан и да га вреди научити. Ето толико о српском језику.","Hello, my name is Jovana, and I come from Belgrade , Serbia . My native language is Serbian. The language is not very widespread, it's characteristic of Serbia, and Serbs living outside Serbia. It is possible that on the street you can hear the Serbian language, and not know what language it is. Serbian language is characterized by the fact that people in different parts of Serbia speak different accents, dialects; words are pronounced more or less quickly, so as soon as you hear the Serbian language, depending on how that person speaks you conclude what part of Serbia she comes from. For me personally being a Serbian language speaker is a great advantage, especially as the language is not very prevalent, so that you can work as a translator to someone who does not understand it. Serbia is characterized by having at least five synonyms for one word. The language itself is very rich in words and there are words that people use in slang. Also characteristic of the Serbian language is something that my friends that are not from Serbia especially loved are to learn Serbian curses. I do not know why, but a lot of people say that the most interesting language for curses is Serbian. So my friends know, at least five of six curses in Serbian. It is interesting to do that in a language that is not so widespread, in order to be almost sure that you will not come across the person who speaks it. What more can I say about the Serbian language. It is interesting, though for many who are learning it grammar is very difficult. Language itself is very interesting. I think the hardest thing for people who learn Serbian language, and are not Serbian nationality, is saying the voices like ч, џ, ш, ћ…voices that are not typical for other languages. It is very difficult to get used to the voices spoken individually, let alone in a sentence. Especially if you want to speak fluent Serbian, and not slowly like a beginner. Even though I think the Serbian language is beautiful and interesting and it is worth learning.",,Get a free Serbian lesson with italki: http://promos.italki.com/wikitongues_srp,1 checked out of 1,checked,,Facebook,2016-8-10,https://www.facebook.com/wikitongues/videos/1161023580628834/,1,checked,BIV7gCJRY0k,https://youtu.be/BIV7gCJRY0k,"6,620,000 in Serbia (2002 census). Population total all countries: 8,957,906.","Indo-European, Slavic, South, Western",Indo-European,"Serbian,,,,,",,"Eurasia, Eurasia, Eurasia",,2014-12-22,, +Fanny_20160127_rup,Fanny__20160127,Lindie_Botes_20130919,1/27/2016,Fanny_s1_F_20160127_rup.png (https://dl.airtable.com/lOLmDWkzQ3GRVWN5qrkf_Fanny_s1_F_20160127_rup.png),Fanny_20160127_rup.png (https://dl.airtable.com/bSdn6kJtTNCgU8F7J98p_Fanny_20160127_rup.png),rup,,Aromanian,Vlach,,,Singapore,7/25/2017,Public,Standard,,,,"Hello, my name is Fanija Pana. I am Aromanian, from Macedonia - Farshirota (an Aromanian tribe). And now I'm going to sing a very old Aromanian song that my grandfather used to sing to me. + +(Stamna Dzua) +""One day in a meadow a boy passes by and he sees me. +'Good Afternoon, beauty' x2. +'I haven't seen such a girl that beautiful' +He said those words and he continued on his way +I, saddened, watched the river flowing by. +What was the word he said to me x2 +It all spilled over my heart.",,,1 checked out of 1,,93,,,,1,,vwWzzl2oZTk,https://youtu.be/vwWzzl2oZTk,"50,000 in Greece (Salminen 1993). Population total all countries: 114,340. Ethnic population: 700,000 ( Association of French Aromanians).","Indo-European, Italic, Romance, Eastern",Indo-European,§Vlach,"This video was recorded by Lindie Botes in Singapore, where Fanny lives. Vlach, also know as Aromanian, is spoken by 250,000 people across eastern Europe — in particular Romania, Albania, Greece, Macedonia, Serbia, Bulgaria, and Turkey — with varying degrees of political recognition. An Eastern Romance language, Vlach shares many similarities with the Romanian, Istro-Romanian, and Megleno-Romanian languages. It has been documented since at least the 1770s, when the Aromanian scholar Daniel Moscopolites published a multilingual dictionary translating his mother tongue into Greek, Albanian, and Bulgarian. Culturally, Vlach speakers tend to identify eponymously ('Vlachs') or as 'Aromanians'.",Eurasia,,2016-1-27,, +Jan_20170609_nld,Jan_VanderA_20170609,Fiel_Sahir_20170609,6/9/2017,Jan_20170609_nld.png (https://dl.airtable.com/A3lK3dEzR9KzZ09aCLJ1_Jan_20170609_nld.png),,nld,,Dutch,Brabants,,,Slovakia,1/26/2018,Public,CC BY-SA 4.0,,,,,,Get a free Dutch lesson with italki: http://promos.italki.com/wikitongues_nld,1 checked out of 1,,,,,,1,,IVFfgzvSLXI,https://youtu.be/IVFfgzvSLXI,"15,700,000 in Netherlands (ELDIA 2012). Population total all countries: 21,944,690.","Indo-European, Germanic, West, Low Saxon-Low Franconian, Low Franconian",Indo-European,,"This video was recorded by Fiel Sahir (http://Between3worlds.com) in Bratislava, Slovakia, where he and Jan (https://languageboost.biz/), a language educator and consultant, met at the 2017 Polyglot Gathering. Brabants, also known as Brabantish, Brabantian, and Brabantic, is spoken by as many as five million people, primarily in the Dutch provinces of North Brabant and Gelderland, as well as the Belgian provinces of Antwerp and Flemish Brabant. It is commonly considered a variety of the Dutch language, which is known natively as 'Nederlands' and is spoken by as many as 23 million people, principally in the Netherlands and parts of Belgium. It is also spoken by communities in France, Suriname, Aruba, Curaçao and Sint Maarten. A literary language since the turn of the 16th century CE, Dutch is one of the 20 most used languages on the Internet today. A member of the Indo-European family, the genealogical roots of Dutch extend to distant linguistic relatives, including Farsi and Urdu; however, it is most closely related to other Germanic languages, such as Limburgish, Frisian, and English. ",Eurasia,,2017-6-9,, +Maxime_20180129_fra,Maxime_Rioux_20180129,Maxime_Rioux_20180129,1/29/2018,Screen Shot 2018-02-20 at 4.15.57 PM.png (https://dl.airtable.com/b545WsJzRYOCB40xcAyI_Screen%20Shot%202018-02-20%20at%204.15.57%20PM.png),Maxime_20180129_fra.jpg (https://dl.airtable.com/VbCLq6qTlCoZosnjT7Sf_Maxime_20180129_fra.jpg),fra,eng,French,Québec French,,,Slovenia,2/20/2018,To Upload,CC BY-SA 4.0,checked,,,,,Get a free French lesson with italki: http://promos.italki.com/wikitongues_fra,1 checked out of 1,,,,,,1,,kAenLJSfNWM,https://youtu.be/kAenLJSfNWM,"60,000,000 in France (ELDIA 2012). Population total all countries: 74,980,460.","Indo-European, Italic, Romance, Italo-Western, Western, Gallo-Iberian, Gallo-Romance, Gallo-Rhaetian, Oïl, French",,,"This video was recorded by Maxime Rioux in Ljubljana, Slovenia. French is spoken by as many as 274 million people, primarily in the Western European nations of France, Switzerland, and Belgium, the North American territories of Québec, New Brunswick, and Louisiana, and French Guiana in South America. It is also an important lingua franca throughout West Africa and parts of the Caribbean. Maxime’s native variety of Québecois French, sometimes known simply as Québecois, is spoken by about seven million people, primarily in the Canadian province of Québec. Like other varieties of North American French, such as Acadian and Louisiana French, Québecois has diverged considerably from European varieties, retaining 18th-century pronunciations and incorporating loanwords from English. Politically and in education, Canadian French varieties have enjoyed considerable protection since 1969, when the Canadian government recognized French alongside English at the country’s federal level.","Eurasia, Eurasia, Americas, Eurasia, Eurasia",,2018-1-29,,https://www.dropbox.com/sh/qkui71q8jf619ns/AACVdKkJm59YYjNLpheE0ICSa?dl=0 +Michael_20171004_far,Michael_Kaura_20171004,Sarah_Meltzoff_20171004,10/4/2017,,,far,,Fataleka,West Fataleka,,,Solomon Islands,,To Upload,CC BY-SA 4.0,checked,,,,"Language from: Malaita + +Recorded in: Honiara",,1 checked out of 1,,,,,,1,,,No ID,"6,700 (1999 SIL).","Austronesian, Malayo-Polynesian, Central-Eastern Malayo-Polynesian, Eastern Malayo-Polynesian, Oceanic, Central-Eastern Oceanic, Southeast Solomonic, Malaita-San Cristobal, Malaita, Northern",,,,Oceania,,2017-10-9,, +Michael_20171004_mlu,Michael_Kaura_20171004,Sarah_Meltzoff_20171004,10/4/2017,,,mlu,,To’abaita,,,,Solomon Islands,,To Upload,CC BY-SA 4.0,checked,,,,"Language from: North Malaita + +Recorded in: Honiara",,1 checked out of 1,,,,,,1,,,No ID,"12,600 (1999 SIL).","Austronesian, Malayo-Polynesian, Central-Eastern Malayo-Polynesian, Eastern Malayo-Polynesian, Oceanic, Central-Eastern Oceanic, Southeast Solomonic, Malaita-San Cristobal, Malaita, Northern",,,,Oceania,,2017-10-9,, +Patricia_20171004_ntu,Patricia_George_20171004,Sarah_Meltzoff_20171004,10/4/2017,Screen Shot 2018-02-27 at 7.37.17 PM.png (https://dl.airtable.com/ZCunEb8SKukpbZCb3CtA_Screen%20Shot%202018-02-27%20at%207.37.17%20PM.png),Patricia_20171004_ntu.jpg (https://dl.airtable.com/iVWLmydsQ9S9rpNFA37F_Patricia_20171004_ntu.jpg),ntu,,Natügu,Natqnnga,,,Solomon Islands,2/28/2018,To Upload,CC BY-SA 4.0,checked,,,,"Language from: Santa Cruz Island + +Recorded in: Honiara",,1 checked out of 1,,,,,,1,,rzkKRTvwGG8,https://youtu.be/rzkKRTvwGG8,"4,280 (2007 census), increasing.","Austronesian, Malayo-Polynesian, Central-Eastern Malayo-Polynesian, Eastern Malayo-Polynesian, Oceanic, Temotu, Reefs-Santa Cruz",,,"This video was recorded by Sarah Meltzoff in Honiara, Solomon Islands, where Patricia lives and she and Sarah met. Natqnnga, also known as Natügu and sometimes called the Santa Cruz language, is spoken by as many as 5,900 people, primarily on the Pacific island of Nendö, also known as Santa Cruz, in the archipelago nation of the Solomon Islands. A member of the Austronesian family of languages, Natqnnga shares roots and vocabulary with more than 1,000 mother tongues across the Pacific and Indian Oceans, from Malagasy, the national of Madagascar, to Hawaiian. There are as many as five major dialects, two of which — Nea and Nooli — are sometimes considered to constitute a separate language, Nalögo.",Oceania,,2017-10-9,, +Rolf_20150709_-atl,Rolf__20150709,Rolf__20150709,7/9/2015,Screen Shot 2015-07-17 at 7.15.38 PM.png (https://dl.airtable.com/c6YmFkAjSGOSyDzC8aJz_Screen%20Shot%202015-07-17%20at%207.15.38%20PM.png),Rolf_s1_M_20150709_-atl.jpg (https://dl.airtable.com/vefx8XJ0SzOtwhyGZnjx_Rolf_s1_M_20150709_-atl.jpg),-atl,,Atlaans,,,No Language ISO,South Africa,7/29/2015,Public,CC BY-NC 3.0,checked,checked,"Hee al. Wie ar dese? Hooda ar de achde fon Julie. Ig is niemal for een fliklog machd, men ig ferzuk es nu. Ig ar imer ouf spraaken interesierd zeen. Meen fader ar doutsh, en ig is doutsh feel hoord as ig kleen war, men he is niemal mich es teeded. So as ig skool ferlasd is, ig is doutsh su lernen enshieded. Over kunspraaken, for ig veesed is das geeb so een voord, ig was zeer interesierd in klingon, en ig is een bishen darover lerned. Ig is over de kunspraak gemeenshaf lerned vegen Hoch Valurish fon Game of Thrones. Ig is es zeer sweer su lernen finded, vegen de gramatik en de mangel fon mitelen men ig tru ig war good genuk um etvas in Hoch Valurish su overseten. Bee de end fon lete jaar, ig is Atlaans machd veel ig is komplet med germaansa spraaken in lieb komen. Nu ig ferzuk meer Atlaans su benooten en hofentlich meer fliesend ouf Atlaans su verden. Das ar waarom ig mak dies fliklog. Ig will meer fliklogen in sukunf machen. Bis spaader!","Hey guys How's it going? Today is the eighth of July. I have never done a vlog before, but I am going to give it a try. I have always been interested in languages. My father is German and I heard German a lot while I was growing up, but he never taught it to me. So when I left school, I decided to learn German. As for conlangs, before I knew there was such a term, I was very interested in Klingon, and I learned the basics. I learned about the whole conlanging community because of High Valyrian from Game of Thrones. I found it hard to learn, due to the grammar and the lack of resources but I feel that I got good enough to translate some stuff into High Valyrian. Near the end of last year, I created Atlaans because I fell in love with Germanic languages. Now I am trying to use Atlaans more and hopefully get more fluent in it. That is why I am making this vlog. I will make vlogs in the future. Until later! +Message: Hi. My friend suggested I submit this video. I am a native english speaker. I am also fluent in german, and have been learning swedish and afrikaans. I love germanic languages, so I decided to make a conlang (constructed language) based on various germanic languages, called Atlaans.",Full name: Rolf Weimar,,1 checked out of 1,,,,,,1,checked,9Nl_ttQDYkQ,https://youtu.be/9Nl_ttQDYkQ,,,,"Atlaans,,,,,",,,,2015-7-17,, +Lindie_20130919_afr,Lindie_Botes_20130919,Lindie_Botes_20130919,9/19/2013,Lindie_s1_F_20130919_afr.png (https://dl.airtable.com/s4kZkuSt6BYmMI70DaQ5_Lindie_s1_F_20130919_afr.png),Lindie_s1_F_20130919_afr.jpg (https://dl.airtable.com/NCF6OQmXTPmQAgTqacl4_Lindie_s1_F_20130919_afr.jpg),afr,,Afrikaans,,,,South Africa,9/19/2013,Public,Standard,,,,,,Get a free Afrikaans lesson with italki: http://promos.italki.com/wikitongues_afr,1 checked out of 1,checked,,Facebook,2016-7-25,https://www.facebook.com/wikitongues/videos/vb.408106989253834/1159851197412739/?type=2&theater,1,checked,T_8snLihxWs,https://youtu.be/T_8snLihxWs,"6,860,000 in South Africa (2011 census), decreasing. Population total all countries: 7,096,810. L2 users: 10,300,000 in South Africa.","Indo-European, Germanic, West, Low Saxon-Low Franconian, Low Franconian",Indo-European,"Afrikaans,,,,,",,Africa,,2014-12-22,, +Lolly_20130920_zul,Lolly__20130920,Lindie_Botes_20130919,9/20/2013,Lolly_s1_F_20130920_zul.png (https://dl.airtable.com/WYYjJJXMQJ2twfwD8I6y_Lolly_s1_F_20130920_zul.png),Lolly_s1_F_20130920_zul.jpg (https://dl.airtable.com/u4bGRoA3Tsah4SdibvPj_Lolly_s1_F_20130920_zul.jpg),zul,,Zulu,,,,South Africa,9/20/2013,Public,Standard,,,,,,,1 checked out of 1,,,,,,1,checked,1tgBuR2dWh4,https://youtu.be/1tgBuR2dWh4,"11,600,000 in South Africa (2011 census), increasing. Population total all countries: 11,969,100. L2 users: 15,700,000 in South Africa.","Niger-Congo, Atlantic-Congo, Volta-Congo, Benue-Congo, Bantoid, Southern, Narrow Bantu, Central, S, Nguni (S.42)",Niger-Congo,"Zulu,,,,,",,Africa,,2014-12-22,, +Caitlin_20131103_eng,Caitlin__20131103,Lindie_Botes_20130919,11/3/2013,caitlin.png (https://dl.airtable.com/g0tZ8rmSSMilnyoSmegX_caitlin.png),Caitlin_s1_F_20131103_eng.jpg (https://dl.airtable.com/rxOzYnRWW29iyHyUvkLA_Caitlin_s1_F_20131103_eng.jpg),eng,,English,,,,South Africa,11/3/2013,Public,Standard,,,,,,Get a free English lesson with italki: http://promos.italki.com/wikitongues_eng,1 checked out of 1,checked,,,,,1,checked,2iu0f8GKFgQ,https://youtu.be/2iu0f8GKFgQ,"55,600,000 in United Kingdom (ELDIA 2012). Population total all countries: 335,148,868. L2 users: 1,500,000 in United Kingdom (Crystal 2003). L2 users worldwide: 505,000,000.","Indo-European, Germanic, West, English",Indo-European,"English,,,,,",,"Eurasia, Eurasia",,2014-12-22,, +Jeremi_20140627_afr,Jeremi__20140627,Lindie_Botes_20130919,6/27/2014,Jeremi_s1_M_20140627_afr.png (https://dl.airtable.com/OqrmezusQL6lYtYU2zVN_Jeremi_s1_M_20140627_afr.png),XIfa046nSwuIzm3bti7D_large_Jeremi_s1_M_20140627_afr.jpg (https://dl.airtable.com/LWfCGsmAS8G448ZRplFQ_XIfa046nSwuIzm3bti7D_large_Jeremi_s1_M_20140627_afr.jpg),afr,,Afrikaans,,,,South Africa,6/27/2014,Public,Standard,,checked,,,,Get a free Afrikaans lesson with italki: http://promos.italki.com/wikitongues_afr,1 checked out of 1,checked,,,,,1,checked,CG0OnKUqziA,https://youtu.be/CG0OnKUqziA,"6,860,000 in South Africa (2011 census), decreasing. Population total all countries: 7,096,810. L2 users: 10,300,000 in South Africa.","Indo-European, Germanic, West, Low Saxon-Low Franconian, Low Franconian",Indo-European,"Afrikaans,,,,,",,Africa,,2014-12-22,, +Michell_20130706_eng,Michell__20130706,"Daniel_BogreUdell_20130101,Freddie_Andrade_",7/6/2013,michell.png (https://dl.airtable.com/wzuJVg6wQxSPDqFQ7Epm_michell.png),Michell_s1_M_20130706_eng.jpg (https://dl.airtable.com/tFtdL9ciSJmMOIenzBS3_Michell_s1_M_20130706_eng.jpg),eng,,English,,,,South Africa,7/6/2013,Public,Standard,,,,,,Get a free English lesson with italki: http://promos.italki.com/wikitongues_eng,1 checked out of 1,checked,,,,,1,checked,L1jLUZXXYUc,https://youtu.be/L1jLUZXXYUc,"55,600,000 in United Kingdom (ELDIA 2012). Population total all countries: 335,148,868. L2 users: 1,500,000 in United Kingdom (Crystal 2003). L2 users worldwide: 505,000,000.","Indo-European, Germanic, West, English",Indo-European,"English,,,,,",,"Eurasia, Eurasia",,2014-12-22,, +Suseong_20140320_kor,Suseong__20140320,Lindie_Botes_20130919,3/20/2014,suseong.png (https://dl.airtable.com/Qei6mIJwQV2ZWzTIjfNM_suseong.png),Suseong_s1_M_20140320_kor.jpg (https://dl.airtable.com/KjKJ66qxRNmP7HOv5IhJ_Suseong_s1_M_20140320_kor.jpg),kor,"eng,spa,kor,glg",Korean,,,,South Korea,3/20/2014,Public,Standard,,,,,,Get a free Korean lesson with italki: http://promos.italki.com/wikitongues_kor,1 checked out of 1,checked,,Facebook,2016-7-1,https://www.facebook.com/wikitongues/videos/1142050349192824/,1,checked,z_f7kpXW0tQ,https://youtu.be/z_f7kpXW0tQ,"48,400,000 in Korea, South (2010). Population total all countries: 77,166,230.",Language isolate,,"Korean,,,,,",,"Eurasia, Eurasia",,2014-12-22,,https://www.dropbox.com/sh/8o2b0v6lhmjrlbq/AACE1bw5o-wmALBrs7ew1jwYa?dl=0 +Alaric_20171103_afr,Alaric_Naudé_20171103,Alaric_Naudé_20171103,11/3/2017,Screen Shot 2017-12-07 at 6.49.23 PM.png (https://dl.airtable.com/BQyryBYVQ1OrKYsPDyXT_Screen%20Shot%202017-12-07%20at%206.49.23%20PM.png),Alaric_20171103_afr.jpg (https://dl.airtable.com/b4bJU7AQ5ysklSukFLNg_Alaric_20171103_afr.jpg),afr,,Afrikaans,,,,South Korea,12/23/2017,Public,CC BY-SA 4.0,checked,,,,"Male-specific dialect + +Recorded in: Suwon Science College, University of Suwon",Get a free Afrikaans lesson with italki: http://promos.italki.com/wikitongues_afr,1 checked out of 1,,,,,,1,,YdgWeFznE2M,https://youtu.be/YdgWeFznE2M,"6,860,000 in South Africa (2011 census), decreasing. Population total all countries: 7,096,810. L2 users: 10,300,000 in South Africa.","Indo-European, Germanic, West, Low Saxon-Low Franconian, Low Franconian",,,"This video was submitted by Dr. Alaric Naudé from Huaseong, South Korea, where he is a professor at the University of Suwon. Afrikaans is spoken by as many as 10 million people, primarily in South Africa, where it is co-official along ten other languages, as well as neighboring Namibia, where it is a recognized minority language. It is also spoken by communities in Botswana and Zimbabwe. Afrikaans is the primary mother tongue of two southern African cultures: 1) the Afrikaners, descendants of Dutch communities who settled the continent in the 17th and 18th centuries, and 2) the Cape Coloureds, descendants of mixed families sharing Dutch, English, Xhosa, Khoisan, and East Indies ancestry. It is one of the only African languages of Indo-European origin, having descended from Dutch. It is written with the Latin alphabet, although an Afrikaans variety of the Arabic script also exists, having emerged among South African Muslim communities in the 19 century CE.",Africa,,2017-11-3,, +Txeli_20171103_eus,Txeli_Bartalomé_20171103,Richard_Benton_,11/3/2017,Screen Shot 2017-12-07 at 7.04.02 PM.png (https://dl.airtable.com/Q4JYTKyHRqmmkNLBQEJX_Screen%20Shot%202017-12-07%20at%207.04.02%20PM.png),Txeli_20171103_eus.jpg (https://dl.airtable.com/PzczZIWARcyfUJmstTTV_Txeli_20171103_eus.jpg),eus,,Basque,Euskara,,,Spain,12/28/2017,Public,CC BY-SA 4.0,checked,,,,Bermeo dialect,Get a free Basque lesson with italki: http://promos.italki.com/wikitongues_eus,1 checked out of 1,,,,,,1,,c47B6Y5fbss,https://youtu.be/c47B6Y5fbss,"468,000 in Spain (ELDIA 2012). Population total all countries: 545,872. Ethnic population: 2,000,000 residents of 3 provinces of Basque territory; 25% born outside territory, 40% in territory born to Basque parents. 4,400,000 in Spain have Basque surname; 19% live in Basque country.",Language isolate,,,"This video was recorded by Richard Benton in Getxo, Basque Country, Spain, where he was visiting at the time. Basque, known natively as Euskara or Euskera, is spoken by as many as 1.2 million people, primarily in the historic Basque region of Europe, which includes the Spanish territories of Euskadi (País Vasco) and Navarra, where it is co-official alongside Spanish, as well as the Iparralde region of France. It is the only surviving language spoken by indigenous Iberians prior to the Roman conquest of Western Europe, and is therefore unrelated to other languages spoken today. Originally an oral culture, Basque speakers developed a literary tradition in the 16th century CE, which seems to have begun with the works of Bernard Etxepare, who published a compendium of Basque poetry in 1545. By the mid-20th century, however, the language had fallen into decline, thanks in part to significant persecution of Basque communities by successive French and Spanish governments. Though Basque remains unrecognized in France, a lively revitalization movement has taken hold in Spain since the country’s transition to democracy in 1978. Today, there is a prevalence of Basque media, including online — the ‘.eus’ top-level domain is reserved or Basque-language websites.",Eurasia,,2017-11-3,Basque Country_ES, +Pau_20170509_fra+lit+ita+eng+spa+cat,Pau_Mateo_,Pau_Mateo_,5/9/2017,Screen Shot 2017-06-01 at 13.46.42.png (https://dl.airtable.com/pA17DSURR63mw1jm39KK_Screen%20Shot%202017-06-01%20at%2013.46.42.png),Pau_s6_M_20170509_fra+lit+ita+eng+spa+cat.png (https://dl.airtable.com/Oy9awa14SkqJXRuTTHJC_Pau_s6_M_20170509_fra%2Blit%2Bita%2Beng%2Bspa%2Bcat.png),"fra,lit,ita,eng,spa,cat","fra,eng,lit","French, Lithuanian, Italian, English, Spanish, Catalan",,,,Spain,6/29/2017,Public,CC BY-SA 4.0,checked,,,,,"Get a free French lesson with italki: http://promos.italki.com/wikitongues_fra, Get a free Italian lesson with italki: http://promos.italki.com/wikitongues_ita, Get a free English lesson with italki: http://promos.italki.com/wikitongues_eng, Get a free Spanish lesson with italki: http://promos.italki.com/wikitongues_spa, Get a free Catalan lesson with italki: http://promos.italki.com/wikitongues_cat",6 checked out of 6,,,,,,6,,VihQkH66RoA,https://youtu.be/VihQkH66RoA,"60,000,000 in France (ELDIA 2012). Population total all countries: 74,980,460., 2,800,000 in Lithuania (ELDIA 2012). Population total all countries: 3,001,860., 57,700,000 in Italy (ELDIA 2012). Population total all countries: 63,655,047., 55,600,000 in United Kingdom (ELDIA 2012). Population total all countries: 335,148,868. L2 users: 1,500,000 in United Kingdom (Crystal 2003). L2 users worldwide: 505,000,000., 38,400,000 in Spain (ELDIA 2012). Population total all countries: 414,170,030. L2 users: 7,490,000 in Spain (ELDIA 2006)., 3,750,000 in Spain (ELDIA 2012). Population total all countries: 4,079,420. L2 users: 5,150,000 in Spain (ELDIA 2012).","Indo-European, Italic, Romance, Italo-Western, Western, Gallo-Iberian, Gallo-Romance, Gallo-Rhaetian, Oïl, French, Indo-European, Baltic, Eastern, Indo-European, Italic, Romance, Italo-Western, Italo-Dalmatian, Indo-European, Germanic, West, English, Indo-European, Italic, Romance, Italo-Western, Western, Gallo-Iberian, Ibero-Romance, West Iberian, Castilian, Indo-European, Italic, Romance, Italo-Western, Western, Gallo-Iberian, Ibero-Romance, East Iberian",Indo-European,"French,Lithuanian,Italian,English,Spanish,Catalan","This video was submitted by Pau Mateo from Oviedo, Spain, where he lives and studies. Pau's native language is Catalan, having learned Lithuanian abroad, Italian with his partner, and English, French, and Spanish in school. Catalan is spoken by as many as 9 million people, primarily in the Spanish regions of Catalonia, Valencia, and the Balearic Islands, as well as by communities in France and Italy. It is also the national language of Andorra. Catalan speakers are enthusiastic netizens, having produced one of the earliest non-English Wikipedias in 2001, grassroots translations of Facebook and Twitter in 2008, and the first language-based top-level domain, '.cat'.","Eurasia, Eurasia, Americas, Eurasia, Eurasia, Eurasia, Eurasia, Eurasia, Eurasia, Eurasia, Eurasia, Eurasia, Eurasia, Eurasia",,2017-5-9,,https://www.dropbox.com/sh/vvkpm2gaf80sxf7/AAAalIPTiSlrqHQSuwzfwMrta?dl=0 +Miguel_20150324_cat,Miguel__20150324,Miguel__20150324,3/24/2015,miguel-cat-thumb-raw.png (https://dl.airtable.com/wxLSg0SQSq7akttt2T9A_miguel-cat-thumb-raw.png),Miguel_s1_M_20150324_cat.jpg (https://dl.airtable.com/TqohXgeYR2mrSQXwX5Ig_Miguel_s1_M_20150324_cat.jpg),cat,,Catalan,Majorcan Catalan,,,Spain,3/24/2015,Public,CC BY-NC 3.0,,,,,,Get a free Catalan lesson with italki: http://promos.italki.com/wikitongues_cat,1 checked out of 1,checked,,Facebook,2016-9-4,,1,checked,Oybanf47dwQ,https://youtu.be/Oybanf47dwQ,"3,750,000 in Spain (ELDIA 2012). Population total all countries: 4,079,420. L2 users: 5,150,000 in Spain (ELDIA 2012).","Indo-European, Italic, Romance, Italo-Western, Western, Gallo-Iberian, Ibero-Romance, East Iberian",Indo-European,"Majorcan Catalan,,,,,",,"Eurasia, Eurasia",,2015-2-7,, +Matteo_20131030_lmo,Matteo__20131030,Matteo__20131030,10/30/2013,matteo.png (https://dl.airtable.com/aQRDLdZwRnGc8QMZ1Ebm_matteo.png),Matteo_s1_M_20131030_lmo.jpg (https://dl.airtable.com/kXMAsiY4TufJcU4zTuE0_Matteo_s1_M_20131030_lmo.jpg),lmo,,Lombard,Eastern Lombard,,,Spain,10/30/2013,Public,Standard,,checked,"Œn salüde a tœts e a tœte, scüxim se sa sent mia fes us ma ol me urdenadur l’è an po isé. Ma sa ciame Matteo e so urguglius de prexentaf ol Ürobeq, che saress la lengua parlada an la lumbardea urientala, an dol nort Italia. Me so talià, ma vive an Qatalünia e qé ma sa so rindit cœnt de l'amportança che le ga le lengue segundaree e rejunai. L'è format de vare vareants, œn grant vixine an tra lure ma con peçene deferençe de leseq e de prununciasiù. La lengua qe parle me, anc'po se l'è recugnuçida de l'UNESCO com patrimone linguistiq, l'è mia ufijala en Italia, e la xet la pensa amo qe la saess œn dialet del talià, e defati l'è dre a pirdiss, perqe sa ga da mia amportança, e i la cunsidera com vergot legat doma al pasat, œna parlada sgrexa, crüda e mia bela de senter, che l'è mei dexmentegass. Per me l'è la lengua dele imusiu', qela qe so üs a senter de quant so pütì e la parla de me, dela me tera, de la me xet. Al dé d’ancœ la sa parla amo, la sa parla an tra le famee, an tra i amix, però anc’po an dei paixì le persune le sa parla piœ an qesta lengua, le sa parla en Talià, doma se ta cognoset be’ vergü ta parlet an Ürobeq, perqe la s’è cambiada an po la mentalità dela xet. Ol problema prinçipal a me parì l'è la scritüra, perqe le existe mile urtugrafee ma com qe g'è mia œn orgen ufijal a regulala g'è mile foxe de scrier e tata cunfujù. Sœmea strano, ma ma sa so nescurjit de l'amportança de la me cültüra doma quan ma sa so troat an d'œna società qe 'l ga da valur, e go capit qe l'Europa l'è furmada per sò natüra da tate cültüre, tœte fundamentale per œna società nœa, deerta, e qe fort de la sò cültüra l'è pronta a cugnusì e capeçer le otre. L'è per qel che go ülìt partiçipà a qel prujet qé, perqe pense qe le tütela dele lengue peçene, e dele sò cültüre, la saess fundamental al dé d'ancœ, an d'œn mont che al viaja e qe 'l vif entra mila de cültüre deerse, e qe al ga de veser piœ qe mai deert a tœts. Perqe regordomess qe veser anternasiunai œr mia di perder la tò cültüra, ma vesen cunsapevol e cündividila col mont. +E pò basta, qesto l'è qel qe ülie dì. An s'vèt! :)","Goodmorning everybody, I'm Matteo and I'm pleased to presentate you Orobic, which is a language spoken in the eastern lumbardy, in north Italy. I am Italian, but I live in Catalonia and here I realized the importance that secondary languages ​​and regional cultures have. Orobic, o eastern lumbart, consists of different variants, very similar, but with slight differences in pronunciation and vocabulary. The language I speak, although it is recognized by UNESCO as a heritage language, it is not official in Italy, and many people still believe that it is a dialect of Italian, and for this reason is going to disappeare, as they do not give it importance, and it's considered rough, raw and ugly to hear, that it is better to forget; for me is the language of emotion, what I am used to hear since I was child, and talk about me, my land, my people. Nowadays people still spoken Orobic in them family, among friends, but also in small countries people don’t speak in this language, but in Italian; only with people that you know very well you speak in Orobic, because the government changed the mentality of people, and seem like bad. The main problem I think is to write, because there are a thousand ways to write, and because there is no official body, there is a lot of confusion. It seems strange, but I realized the importance of my culture only when I start to live in a society that gives it value, and I realized that Europe is formed by so many cultures, all critical to a new and open society, and that thanks to its cultures is ready to know and understand the others. that's why I wanted so much to participate in this project, because I believe that the protection of minority languages​​, and the resulting cultures, it is essential nowadays, where you are traveler and you live in a world where there are thousands of different cultures, and that it must be more open than ever to everyone. Because being international does not mean losing one's own culture, but be aware of and share it with the world. +Simply, this is what I wanted to say. Goodbye! :)",,,1 checked out of 1,,,,,,1,checked,m2chaNIt3pk,https://youtu.be/m2chaNIt3pk,"3,600,000 in Italy (2002). Population total all countries: 3,903,000.","Indo-European, Italic, Romance, Italo-Western, Western, Gallo-Iberian, Gallo-Romance, Gallo-Italian",Indo-European,"Eastern Lombard,,,,,",,Eurasia,,2014-12-22,, +Mario_20120817_arg,Mario__20120817,Mario__20120817,8/17/2012,mario.png (https://dl.airtable.com/XXBK2igQRny8r9MndPGj_mario.png),Mario_s1_M_20120817_arg.jpg (https://dl.airtable.com/SHtt2o6TSO5BTLdCizqH_Mario_s1_M_20120817_arg.jpg),arg,,Aragonese,,,,Spain,8/17/2012,Public,Standard,,,,,,,1 checked out of 1,,,,,,1,checked,v2jD_SU9KZo,https://youtu.be/v2jD_SU9KZo,"10,000 (Salminen 2007). 500 monolinguals (1993). Older adults. Ethnic population: 2,000,000 (1994). L2 users: 20,000 (1993 Counsel of the Aragonese Language).","Indo-European, Italic, Romance, Italo-Western, Western, Pyrenean-Mozarabic, Pyrenean",Indo-European,"Aragonese,,,,,",,Eurasia,,2014-12-22,, +Alim_20141118_fuq,Alim__20141118,Ferran_LópezAbad_,11/18/2014,alim.png (https://dl.airtable.com/eyv6GtOQj2urnvKd4Pnc_alim.png),Alim_s1_F_20141118_fuq.png (https://dl.airtable.com/YYwZiQ4kQRKHlI5FOtGW_Alim_s1_F_20141118_fuq.png),fuq,,"Fulfulde, Central-Eastern Niger",Fula,,Unknown Variant,Spain,11/18/2014,Public,Standard,,,,,,,1 checked out of 1,,,,,,1,checked,1uIg0COZE5A,https://youtu.be/1uIg0COZE5A,"450,000 (1998).","Niger-Congo, Atlantic-Congo, Atlantic, Northern, Senegambian, Fula-Wolof, Fula, East Central",Niger-Congo,"Fula,,,,,",,Africa,,2014-12-22,, +Niḍāl_20141202_apc,Niḍāl__20141202,Ferran_LópezAbad_,12/2/2014,nidal.png (https://dl.airtable.com/muPZryiRkGKR0CfOHNnh_nidal.png),Nidal_s1_M_20141202_apc.jpg (https://dl.airtable.com/BULh2G0nSReymn9Ed59g_Nidal_s1_M_20141202_apc.jpg),apc,,"Arabic, North Levantine Spoken",Arabic (Syrian),,,Spain,12/2/2014,Public,Standard,,,,,,,1 checked out of 1,,,,,,1,checked,9on81ZtUf5A,https://youtu.be/9on81ZtUf5A,"8,800,000 in Syria (1991). Population total all countries: 14,426,540.","Afro-Asiatic, Semitic, Central, South, Arabic",Afro-Asiatic,"Syrian Arabic,,,,,",,"Eurasia, Eurasia",,2014-12-22,, +MªÁngeles_20150120_spa,MªÁngeles__20150120,Ferran_LópezAbad_,1/20/2015,angeles.png (https://dl.airtable.com/UatHuTv8TFCIizYMLKAf_angeles.png),Angeles_s1_F_20150120_spa.png (https://dl.airtable.com/mNzzRHxdSebKCkTESBkA_Angeles_s1_F_20150120_spa.png),spa,,Spanish,,,,Spain,1/20/2015,Public,Standard,,,,,,Get a free Spanish lesson with italki: http://promos.italki.com/wikitongues_spa,1 checked out of 1,checked,,,,,1,checked,gH8m9Ubcbi0,https://youtu.be/gH8m9Ubcbi0,"38,400,000 in Spain (ELDIA 2012). Population total all countries: 414,170,030. L2 users: 7,490,000 in Spain (ELDIA 2006).","Indo-European, Italic, Romance, Italo-Western, Western, Gallo-Iberian, Ibero-Romance, West Iberian, Castilian",Indo-European,"Spanish,,,,,",,"Eurasia, Eurasia",,2014-12-22,, +Daria_20150129_rus+eng+spa+cat,Daria__20150129,Daria__20150129,1/29/2015,daria-catengsparus-thumb-raw.png (https://dl.airtable.com/QrB1VMPThWLUyMWFlBQw_daria-catengsparus-thumb-raw.png),Daria_s4_F_20150129_rus+spa+eng+cat.png (https://dl.airtable.com/63EI11MQxCDax1GGVGWO_Daria_s4_F_20150129_rus%2Bspa%2Beng%2Bcat.png),"rus,eng,spa,cat",,"Russian, English, Spanish, Catalan",,,,Spain,2/7/2015,Public,CC BY-NC 3.0,,,,,"Video from Barcelona, Spain +","Get a free Russian lesson with italki: http://promos.italki.com/wikitongues_rus, Get a free English lesson with italki: http://promos.italki.com/wikitongues_eng, Get a free Spanish lesson with italki: http://promos.italki.com/wikitongues_spa, Get a free Catalan lesson with italki: http://promos.italki.com/wikitongues_cat",4 checked out of 4,checked,,,,,4,checked,rTLBhwuaq_M,https://youtu.be/rTLBhwuaq_M,"137,000,000 in Russian Federation (2010 census). Population total all countries: 167,332,230., 55,600,000 in United Kingdom (ELDIA 2012). Population total all countries: 335,148,868. L2 users: 1,500,000 in United Kingdom (Crystal 2003). L2 users worldwide: 505,000,000., 38,400,000 in Spain (ELDIA 2012). Population total all countries: 414,170,030. L2 users: 7,490,000 in Spain (ELDIA 2006)., 3,750,000 in Spain (ELDIA 2012). Population total all countries: 4,079,420. L2 users: 5,150,000 in Spain (ELDIA 2012).","Indo-European, Slavic, East, Indo-European, Germanic, West, English, Indo-European, Italic, Romance, Italo-Western, Western, Gallo-Iberian, Ibero-Romance, West Iberian, Castilian, Indo-European, Italic, Romance, Italo-Western, Western, Gallo-Iberian, Ibero-Romance, East Iberian",Indo-European,"Russian,English,Spanish,Catalan,,",,"Eurasia, Eurasia, Eurasia, Eurasia, Eurasia, Eurasia, Eurasia, Eurasia",,2015-2-7,, +Luis_20131019_glg,Luis__20131019,Daniel_BogreUdell_20130101,10/19/2013,Luis_s1_M_20131019_glg.png (https://dl.airtable.com/Cd1lOk8ITwey0sdhdYCo_Luis_s1_M_20131019_glg.png),Luis_s1_M_20131019_glg.jpg (https://dl.airtable.com/liFFciV1SNikwrHJorQm_Luis_s1_M_20131019_glg.jpg),glg,glg,Galician,,,,Spain,10/19/2013,Public,Standard,,,,,,Get a free Galician lesson with italki: http://promos.italki.com/wikitongues_glg,1 checked out of 1,checked,,,,,1,checked,gV7XWdt72Vo,https://youtu.be/gV7XWdt72Vo,"2,340,000 in Spain (ELDIA 2012). Population total all countries: 2,355,000.","Indo-European, Italic, Romance, Italo-Western, Western, Gallo-Iberian, Ibero-Romance, West Iberian, Portuguese-Galician",Indo-European,"Galician,,,,,",,Eurasia,,2014-12-22,,https://www.dropbox.com/sh/7x831hg041ywt9w/AACwsp0VEgsijC3j_EDGfenka?dl=0 +Josèp_20131019_oci,Josèp__20131019,Daniel_BogreUdell_20130101,10/19/2013,josep.png (https://dl.airtable.com/HkOK3cbtRRW54w7cUko8_josep.png),Josep_s1_M_20131019_oci.jpg (https://dl.airtable.com/IZQP4AZQMagkoFawJpOc_Josep_s1_M_20131019_oci.jpg),oci,,Occitan,Aranese,,,Spain,10/19/2013,Public,Standard,,,,,,,1 checked out of 1,,,,,,1,checked,pdYpvY6Efos,https://youtu.be/pdYpvY6Efos,"110,000 in France (Bernissan 2012). Population total all countries: 218,310.","Indo-European, Italic, Romance, Italo-Western, Western, Gallo-Iberian, Ibero-Romance, Oc",Indo-European,"Aranese,,,,,",,"Eurasia, Eurasia",,2014-12-22,, +Ares_20131201_oci,Ares__20131201,Daniel_BogreUdell_20130101,12/1/2013,ares.png (https://dl.airtable.com/QFvIjVPJShGJAJtCQ6IU_ares.png),Ares_s1_F_20131201_oci.jpg (https://dl.airtable.com/ULB42500RS6T57XINmNI_Ares_s1_F_20131201_oci.jpg),oci,,Occitan,Aranese,,,Spain,12/1/2013,Public,Standard,,,,,,,1 checked out of 1,,,,,,1,checked,_IXEev5Z7ao,https://youtu.be/_IXEev5Z7ao,"110,000 in France (Bernissan 2012). Population total all countries: 218,310.","Indo-European, Italic, Romance, Italo-Western, Western, Gallo-Iberian, Ibero-Romance, Oc",Indo-European,"Aranese,,,,,",,"Eurasia, Eurasia",,2014-12-22,, +Fugi_20140309_oci,Fugi__20140309,Daniel_BogreUdell_20130101,3/9/2014,fugi.png (https://dl.airtable.com/spb7JgTTRoeHAXNz2mtH_fugi.png),Fugi_s1_M_20140309_oci.jpg (https://dl.airtable.com/A8NOMsNqQAiEX12IxpuE_Fugi_s1_M_20140309_oci.jpg),oci,,Occitan,Aranese,,,Spain,3/9/2014,Public,Standard,,,,,,,1 checked out of 1,,,,,,1,checked,mcqxSaoqQ3A,https://youtu.be/mcqxSaoqQ3A,"110,000 in France (Bernissan 2012). Population total all countries: 218,310.","Indo-European, Italic, Romance, Italo-Western, Western, Gallo-Iberian, Ibero-Romance, Oc",Indo-European,"Aranese,,,,,",,"Eurasia, Eurasia",,2014-12-22,, +Sònia_20140327_oci,Sònia__20140327,Daniel_BogreUdell_20130101,3/27/2014,sonia.png (https://dl.airtable.com/zaavp5q6RCqFCTXB4gKi_sonia.png),Sonia_s1_F_20140327_oci.jpg (https://dl.airtable.com/utN6lrcvS6eLvYATL4L3_Sonia_s1_F_20140327_oci.jpg),oci,,Occitan,Aranese,,,Spain,3/27/2014,Public,Standard,,,,,,,1 checked out of 1,,,Facebook,2016-6-4,https://www.facebook.com/wikitongues/videos/1123050881092771/,1,checked,boFQzRB3OuQ,https://youtu.be/boFQzRB3OuQ,"110,000 in France (Bernissan 2012). Population total all countries: 218,310.","Indo-European, Italic, Romance, Italo-Western, Western, Gallo-Iberian, Ibero-Romance, Oc",Indo-European,"Aranese,,,,,",,"Eurasia, Eurasia",,2014-12-22,, +JoséBenito_20180210_-llt,JoséBenito_MateosPascual_20180210,Ana_Laguna_20171029,2/10/2018,,,-llt,,Leonese,Palra d'El Rebollal,,,Spain,,To Upload,CC BY-SA 4.0,checked,,,,,,1 checked out of 1,,,,,,1,,,No ID,,,,,,Eurasia,,2018-2-10,, +Mónica_20171029_ssp,Mónica_Antón_20171029,Ana_Laguna_20171029,10/29/2017,Screen Shot 2017-12-07 at 5.19.59 PM.png (https://dl.airtable.com/RRFVqRkSQgiWDXIwjLOw_Screen%20Shot%202017-12-07%20at%205.19.59%20PM.png),Mónica_20171029_ssp.jpg (https://dl.airtable.com/2vIgoEuRhWMZ9RzUjAN0_Mo%CC%81nica_20171029_ssp.jpg),ssp,,Spanish Sign Language,,,,Spain,12/20/2017,Public,CC BY-SA 4.0,checked,,,,Recorded in Salamanca,,1 checked out of 1,,,,,,1,,JrcogiyJGCk,https://youtu.be/JrcogiyJGCk,"102,000 (1994). 20,000 members of deaf associations (Van Cleve 1986).",Deaf sign language,,,"This video was recorded by Ana Laguna in Salamanca, Spain, where she and Mónica live. Spanish Sign Language, also known as Lengua de Señas Españolas or LSE, is spoken by as many as 175,000 people, of which some 40,000-75,000 are native signers. It is the predominant sign language of the Mediterranean nation of Spain, local to the country’s central and southern regions. By contrast, deaf communities in the eastern regions of Catalonia and Valencia tend to use the Catalan and Valencian sign languages, respectively. LSE is dialectically quite diverse, with some varieties diverging significantly in vocabulary. Though it shares mutual intelligibility with Catalan, Valencian, and Portuguese sign language, the genealogy of LSE remains unclear: while some linguists classify it as a member of the French Sign language family, others consider it an isolate, meaning that is shares no origins with other languages spoken today.",Eurasia,,2017-11-4,, +Alexander_20160711_bre,Alexander__20160711,Alexander__20160711,7/11/2016,Screen Shot 2016-07-11 at 1.06.06 PM.png (https://dl.airtable.com/fc6kxg8GSBe9EJJYMWVw_Screen%20Shot%202016-07-11%20at%201.06.06%20PM.png),Alexander_s1_M_20160711_bre.jpg (https://dl.airtable.com/ZkdGnb5sRGRwiNKDFcH1_Alexander_s1_M_20160711_bre.jpg),bre,,Breton,,,,Spain,4/8/2017,Public,CC BY-NC 3.0,checked,,,,,,1 checked out of 1,,,,,,1,,905hv_a4URY,https://youtu.be/905hv_a4URY,"206,000 (2013 R. Milin), decreasing.","Indo-European, Celtic, Insular, Brythonic",Indo-European,§,,Eurasia,,2016-7-11,, +Alexandra_20150326_dan,Alexandra_Werner_20150326,Alexandra_Werner_20150326,3/26/2015,alexandra.png (https://dl.airtable.com/5SdwlrQ3eJ4GYoHvE48g_alexandra.png),Alexandra_s1_F_20150326_dan.jpg (https://dl.airtable.com/FyQdCftySeGzn863t5f5_Alexandra_s1_F_20150326_dan.jpg),dan,,Danish,Halländska Swedish,,,Sweden,3/26/2015,Public,CC BY-NC 3.0,,,,,,Get a free Danish lesson with italki: http://promos.italki.com/wikitongues_dan,1 checked out of 1,,,Facebook,2016-9-8,https://www.facebook.com/wikitongues/videos/1195442413853617/,1,checked,PaZqV91ybbM,https://youtu.be/PaZqV91ybbM,"5,380,000 in Denmark (ELDIA 2012). Population total all countries: 5,522,490.","Indo-European, Germanic, North, East Scandinavian, Danish-Swedish, Danish-Riksmal, Danish",Indo-European,"Halländska Swedish,,,,,",,Eurasia,,2015-4-14,, +Laura_20170530_slf,Laura_Sciuchetti-Sadikovic_20170530,Laura_Sciuchetti-Sadikovic_20170530,5/30/2017,Screen Shot 2017-06-01 at 13.24.55.png (https://dl.airtable.com/LY87iVZTS1266AjdhOuX_Screen%20Shot%202017-06-01%20at%2013.24.55.png),Laura_s1_F_20170530_slf.png (https://dl.airtable.com/yP4oYyszRHmdzXfrsvGE_Laura_s1_F_20170530_slf.png),slf,,Swiss-Italian Sign Language,,,,Switzerland,6/6/2017,Public,CC BY-NC 3.0,checked,,,,,,1 checked out of 1,,,,,,1,,tpltPC_ckqw,https://youtu.be/tpltPC_ckqw,200 (Van Cleve 1986).,Deaf sign language,,Swiss-Italian SL,"This video was submitted by Laura Sciuchetti from Switzerland, where she lives and works at the Swiss Deaf Federation. Swiss-Italian Sign Language (LIS-SI) is spoken natively by some 300 people, and by as many as 13,000 people as a second language, primarily in southern Switzerland. It is a common misconception that sign languages are literal translations of their spoken counterparts; however, LSI-SI bears no relation to spoken Italian. In fact, it is more grammatically similar with Basque in that verbs fall at the end of sentences. It is one of three sign languages in Switzerland, along with French-Swiss SL and German-Swiss SL. All three remain unrecognized by the government.",Eurasia,,2017-5-30,, +Ani_20130803_hye,Ani__20130803,Jonas_Racine_,8/3/2013,ani.png (https://dl.airtable.com/9ka5EjWzQ9GVM6Ej0p2m_ani.png),Ani_s1_F_20130803_hye.jpg (https://dl.airtable.com/G8jU39IQKyBLlp7CjVeL_Ani_s1_F_20130803_hye.jpg),hye,,Armenian,,,,Switzerland,8/3/2013,Public,Standard,,,,,,Get a free Armenian lesson with italki: http://promos.italki.com/wikitongues_hye,1 checked out of 1,checked,,Facebook,2016-10-15,https://www.facebook.com/wikitongues/videos/1229220117142513/,1,checked,AUtRgfFUCl8,https://youtu.be/AUtRgfFUCl8,"3,140,000 in Armenia (2001 census). Population total all countries: 5,902,970.","Indo-European, Armenian",Indo-European,"Armenian,,,,,",,"Eurasia, Eurasia, Eurasia",,2014-12-22,, +Franco_20151222_vec,Franco__20151222,Franco__20151222,12/22/2015,franco-vec-thumb-raw.png (https://dl.airtable.com/DPYuOI5lSgK2yukEJwOs_franco-vec-thumb-raw.png),Franco speaking Venetian.jpg (https://dl.airtable.com/lvazbAoTOuLQmxBc85Rg_Franco%20speaking%20Venetian.jpg),vec,,Venetian,,,,Switzerland,5/10/2016,Public,CC BY-NC 3.0,checked,,,,"Recorded at La Chaux-de-Fonds, Switzterland + +",,1 checked out of 1,,46,Facebook,2017-4-27,https://www.facebook.com/wikitongues/videos/1432299803501209/,1,checked,6gyKLNQH44I,https://youtu.be/6gyKLNQH44I,"3,800,000 in Italy (2002). Population total all countries: 3,852,500.","Indo-European, Italic, Romance, Italo-Western, Western, Gallo-Iberian, Gallo-Romance, Gallo-Italian",Indo-European,§,,Eurasia,,2015-10-13,, +Véronique+Sandra_20151022_ssr+sgg,"Véronique__20151022,Sandra__20151022",Daniel_BogreUdell_20130101,10/22/2015,veroniquesandra-ssl-sgg-thumb.png (https://dl.airtable.com/I9ssB79rRfulBnVoYN0u_veroniquesandra-ssl-sgg-thumb.png),veroniquesandra-sslsgg-thumb.jpg (https://dl.airtable.com/OMvWGX5KTLCOtRVZKp6i_veroniquesandra-sslsgg-thumb.jpg),"ssr,sgg",,"Swiss-French Sign Language, Swiss-German Sign Language",,,,Switzerland,10/22/2015,Public,Standard,,,,,,,2 checked out of 2,,,,,,2,checked,uizL1thcRXg,https://youtu.be/uizL1thcRXg,"1,000 (Van Cleve 1986)., 6,000 (Van Cleve 1986).","Deaf sign language, Deaf sign language",Deaf sign language,"Swiss-French SL,Swiss-German SL,,,,",,"Eurasia, Eurasia, Eurasia",,2015-9-7,, +Daniel_20151103_roh,Daniel__20151103,Daniel_BogreUdell_20130101,11/3/2015,daniel-roh-thumb-raw.png (https://dl.airtable.com/XMkbgbvQmy9SByyrAEwl_daniel-roh-thumb-raw.png),maxresdefault (2).jpg (https://dl.airtable.com/up8AOM9wSfWe9kIMORdA_maxresdefault%20(2).jpg),roh,,Romansch,Romansh,,,Switzerland,11/3/2015,Public,Standard,,,,,,,1 checked out of 1,,,,,,1,checked,LAnWWcSrTFU,https://youtu.be/LAnWWcSrTFU,"35,100 in Switzerland (2000 census). 1 canton. Population total all countries: 35,139.","Indo-European, Italic, Romance, Italo-Western, Western, Gallo-Iberian, Gallo-Romance, Gallo-Rhaetian, Rhaetian",Indo-European,"Romansh,,,,,",,Eurasia,,2015-9-7,, +Yannic_20150815_deu,Yannic__20150815,Daniel_BogreUdell_20130101,8/15/2015,yannic-deu-thumb-raw.png (https://dl.airtable.com/PTfviKMfTLG24dX6ZPMV_yannic-deu-thumb-raw.png),Yannic_s1_M_20150815_deu.jpg (https://dl.airtable.com/XMMtIaRsRNOuGhXrzoAh_Yannic_s1_M_20150815_deu.jpg),deu,deu,"German, Standard",,,,Switzerland,3/26/2016,Public,Standard,,,,,,"Get a free German, Standard lesson with italki: http://promos.italki.com/wikitongues_deu",1 checked out of 1,,27,,,,1,checked,4iB0W72Bv0Y,https://youtu.be/4iB0W72Bv0Y,"69,800,000 in Germany (ELDIA 2012). Population total all countries: 78,245,280. L2 users: 8,000,000 in Germany (ELDIA 2012).","Indo-European, Germanic, West, High German, German, Middle German, East Middle German",Indo-European,§,,"Eurasia, Eurasia",,2015-9-7,,https://www.dropbox.com/sh/qml31e6r6ovxp6s/AADidcnSeopAmINp_40GcUs1a?dl=0 +Fabia_20150815_gsw,Fabia__20150815,Daniel_BogreUdell_20130101,8/15/2015,fabia-sgw-thumb-raw.png (https://dl.airtable.com/huMzMYJGQPmN1OhLL2Lo_fabia-sgw-thumb-raw.png),Fabia_s1_F_20150815_gsw.jpg (https://dl.airtable.com/TBfRTCNS82v932Bxmgyl_Fabia_s1_F_20150815_gsw.jpg),gsw,,"German, Swiss",,,,Switzerland,5/19/2016,Public,Standard,,,,,,,1 checked out of 1,,35,,,,1,checked,z8bNnjovo88,https://youtu.be/z8bNnjovo88,"4,640,000 in Switzerland (2000 census). Population total all countries: 6,469,000.","Indo-European, Germanic, West, High German, German, Upper German, Alemannic",Indo-European,§,,"Eurasia, Eurasia",,2015-9-7,, +Camille_20150815_fra,Camille__20150815,Daniel_BogreUdell_20130101,8/15/2015,Screen Shot 2017-05-16 at 15.06.20.png (https://dl.airtable.com/0xnsqAu5R7e1eixyo1nP_Screen%20Shot%202017-05-16%20at%2015.06.20.png),Camille_s1_F_20150815_fra.jpg (https://dl.airtable.com/E5mTTB7eTkan3XGqPinG_Camille_s1_F_20150815_fra.jpg),fra,,French,,,,Switzerland,5/20/2017,Public,Standard,,,,,,Get a free French lesson with italki: http://promos.italki.com/wikitongues_fra,1 checked out of 1,,61,,,,1,,hHAm7Gpp8zI,https://youtu.be/hHAm7Gpp8zI,"60,000,000 in France (ELDIA 2012). Population total all countries: 74,980,460.","Indo-European, Italic, Romance, Italo-Western, Western, Gallo-Iberian, Gallo-Romance, Gallo-Rhaetian, Oïl, French",Indo-European,§,,"Eurasia, Eurasia, Americas, Eurasia, Eurasia",,2015-9-7,, +Anthony_20140417_gsw,Anthony__20140417,Anthony__20140417,4/17/2014,Anthony_s1_M_20140417_gsw.png (https://dl.airtable.com/P4bNFV1ITHm4HY8KQ08C_Anthony_s1_M_20140417_gsw.png),Anthony_s1_M_20140417_gsw.jpg (https://dl.airtable.com/KfbsT4itSMr5Z0fcHAZ6_Anthony_s1_M_20140417_gsw.jpg),gsw,,"German, Swiss",,,,Switzerland,4/17/2014,Public,Standard,,,,,,,1 checked out of 1,,,Facebook,,,1,checked,Flo8cPtcg6o,https://youtu.be/Flo8cPtcg6o,"4,640,000 in Switzerland (2000 census). Population total all countries: 6,469,000.","Indo-European, Germanic, West, High German, German, Upper German, Alemannic",Indo-European,"Swiss German,,,,,",,"Eurasia, Eurasia",,2014-12-22,, +Teddy_20141005_epo,Teddy_Nee_20141005,Teddy_Nee_20141005,10/5/2014,teddy.png (https://dl.airtable.com/GVcW2MmNToqR3ilUN0wh_teddy.png),Teddy_s1_M_20141005_epo.jpg (https://dl.airtable.com/pQ5lgJS6QDmB9Zyfz4ra_Teddy_s1_M_20141005_epo.jpg),epo,,Esperanto,,,,Taiwan,10/5/2014,Public,Standard,,,,,,Get a free Esperanto lesson with italki: http://promos.italki.com/wikitongues_epo,1 checked out of 1,checked,,Facebook,2016-5-2,https://www.facebook.com/wikitongues/videos/1104237266307466/,1,checked,yIlm9CoOhPc,https://youtu.be/yIlm9CoOhPc,"L2 users: 2,000,000 (Wiesenfeld 1999).",Constructed language,,"Esperanto,,,,,",,Eurasia,,2014-12-22,, +Omar_20170421_mnk,Omar_Camara_20170421,Teddy_Nee_20141005,4/21/2017,Screen Shot 2017-05-02 at 14.58.43.png (https://dl.airtable.com/RXzQWm6fTzyWq0z3YqUx_Screen%20Shot%202017-05-02%20at%2014.58.43.png),Omar_s1_M_20170421_mnk.jpg (https://dl.airtable.com/RCwuAVMaQOmoeZOjdOX4_Omar_s1_M_20170421_mnk.jpg),mnk,,Mandinka,,"YUANZE UNIVERSITY (TAOYUAN CITY, TAIWAN)",,Taiwan,5/11/2017,Public,CC BY-SA 4.0,checked,,,,,,1 checked out of 1,,,,,,1,,stQwzNjm-WI,https://youtu.be/stQwzNjm-WI,"669,000 in Senegal (2006). Population total all countries: 1,346,000.","Niger-Congo, Mande, Western, Central-Southwestern, Central, Manding-Jogo, Manding-Vai, Manding-Mokole, Manding, Manding-West",Niger-Congo,§,,Africa,,2017-4-21,, +Dang_20140209_tha,Dang__20140209,Daniel_BogreUdell_20130101,2/9/2014,dang.png (https://dl.airtable.com/0O6XcDV3Sf2V7EwMpzY5_dang.png),Dang_s1_F_20140209_tha.png (https://dl.airtable.com/PfFu1QkSNi1o4PcFcGba_Dang_s1_F_20140209_tha.png),tha,,Thai,,,,Thailand,2/9/2014,Public,Standard,,,,,,Get a free Thai lesson with italki: http://promos.italki.com/wikitongues_tha,1 checked out of 1,checked,,,,,1,checked,L2ST-UU6Ns8,https://youtu.be/L2ST-UU6Ns8,"20,200,000 in Thailand (2000). 400,000 Khorat. 4,700,000 mother-tongue Thai are ethnic Chinese, or 80% of the Chinese (1984). Population total all countries: 20,396,930. L2 users: 40,000,000 in Thailand (2001 A. Diller).","Tai-Kadai, Kam-Tai, Tai, Southwestern",Tai-Kadai,"Thai,,,,,",,Eurasia,,2014-12-22,, +Presi_20140316_ceb,Presi__20140316,Daniel_BogreUdell_20130101,3/16/2014,presi.png (https://dl.airtable.com/ACTavVOT56Zm3WMchbN9_presi.png),Presi_s1_F_20140316_ceb.jpg (https://dl.airtable.com/UJTWBmfIRAKatLrZHkkg_Presi_s1_F_20140316_ceb.jpg),ceb,,Cebuano,Bisaian,,Spelling,Thailand,3/16/2014,Public,Standard,,,,,,Get a free Cebuano lesson with italki: http://promos.italki.com/wikitongues_ceb,1 checked out of 1,checked,,,,,1,checked,nFLhxxsN7gQ,https://youtu.be/nFLhxxsN7gQ,"15,800,000 in Philippines (2000 census). Population total all countries: 15,810,000.","Austronesian, Malayo-Polynesian, Philippine, Greater Central Philippine, Central Philippine, Bisayan, Cebuan",Austronesian,"Bisayan,,,,,",,Eurasia,,2014-12-22,, +Thong_20150708_tts,Thong__20150708,Daniel_BogreUdell_20130101,7/8/2015,thong-tts-thumb-raw.png (https://dl.airtable.com/yqaaBBETQi5Wu6voFGRg_thong-tts-thumb-raw.png),Thong_s1_M_20150708_tts.jpg (https://dl.airtable.com/FqtRL1g3S2KIbNKdikYf_Thong_s1_M_20150708_tts.jpg),tts,,"Thai, Northeastern",Isan,,,Thailand,7/8/2015,Public,Standard,,,,,,,1 checked out of 1,,,Facebook,2016-6-6,https://www.facebook.com/wikitongues/videos?ref=page_internal,1,checked,buuGVrfI2jo,https://youtu.be/buuGVrfI2jo,"15,000,000 (1983 SIL). At least 1,000,000 in Bangkok. Kalerng has a few thousand speakers (1990 A. Diller).","Tai-Kadai, Kam-Tai, Tai, Southwestern",Tai-Kadai,"Isan,,,,,",,Eurasia,,2014-12-22,, +Adem_20151205_pnt,Adem_Ekiz_20151205,Madeleine_Koerner_,12/5/2015,,,pnt,,Pontic,Romeyka,,,Turkey,,To Upload,Standard,,,,,"MISSING; Surmene, Turkey",,1 checked out of 1,,99,,,,1,,,No ID,"400,000 in Greece (2009 Z. Diakonikolaou). Population total all countries: 1,178,000.","Indo-European, Greek, Attic",Indo-European,§Romeyka,,Eurasia,,2014-12-22,, +Soner_20151119_lzz,Soner__20151119,Madeleine_Koerner_,11/19/2015,Screen Shot 2015-11-19 at 10.08.19.png (https://dl.airtable.com/jhvNTHZmRz69lp1PmHxC_Screen%20Shot%202015-11-19%20at%2010.08.19.png),soner-llz-thumb.jpg (https://dl.airtable.com/6w8rZPKfSGeb4PLV1JU1_soner-llz-thumb.jpg),lzz,,Laz,,,,Turkey,11/19/2015,Public,Standard,,,,,"Trabzon, Turkey",,1 checked out of 1,,,Facebook,2016-12-10,https://www.facebook.com/wikitongues/videos/1229208007143724/,1,checked,Y-WNHB4FEZA,https://youtu.be/Y-WNHB4FEZA,"20,000 in Turkey (Salminen 2007). Population total all countries: 22,000. Ethnic population: 92,000 (1980).","Kartvelian, Zan",Kartvelian,"Laz,,,,,",,Eurasia,,2014-12-22,, +Gül_20150606_kiu,Gül__20150606,Deniz_Yükselen_,6/6/2015,gul-kiu-thumb-raw.png (https://dl.airtable.com/MX9wiYbSvqQKWU7YYtOn_gul-kiu-thumb-raw.png),Gul_s1_F_20150606_kiu.png (https://dl.airtable.com/SQ2mOU0TSy9rpNj45PYe_Gul_s1_F_20150606_kiu.png),kiu,,"Zazaki, Northern",,,Unknown Variant,Turkey,7/11/2015,Public,CC BY-NC 3.0,checked,,,,,,1 checked out of 1,,,,,,1,checked,fO0ZyO_Yk9I,https://youtu.be/fO0ZyO_Yk9I,"140,000 in Turkey.","Indo-European, Indo-Iranian, Iranian, Western, Northwestern, Zaza-Gorani",Indo-European,"Zazaki,,,,,",,Eurasia,,2015-6-28,, +Recep_20150606_tur,Recep__20150606,Deniz_Yükselen_,6/6/2015,recep-tur-thumb-raw.png (https://dl.airtable.com/K1C80SkpQiqpcnIhl6wq_recep-tur-thumb-raw.png),Recep_s1_M_20150606_tur.jpg (https://dl.airtable.com/rCpLBtBRMi08Pz4VBqE4_Recep_s1_M_20150606_tur.jpg),tur,,Turkish,,,,Turkey,8/6/2015,Public,CC BY-NC 3.0,checked,,,,,Get a free Turkish lesson with italki: http://promos.italki.com/wikitongues_tur,1 checked out of 1,checked,,Facebook,2016-8-29,https://www.facebook.com/wikitongues/videos/1181752425222616/,1,checked,8HAidhktzjU,https://youtu.be/8HAidhktzjU,"66,500,000 in Turkey (ELDIA 2006). Population total all countries: 70,805,930. L2 users: 350,000 in Turkey (ELDIA 2006).","Altaic, Turkic, Southern, Turkish",Altaic,"Turkish,,,,,",,"Eurasia, Eurasia",,2015-6-28,, +Opoka_20150424_ach,Opoka__20150424,Prudence_Nyamishana_,4/24/2015,opoka-ach-thumb-raw.png (https://dl.airtable.com/PcZJxkqSIGBz3mb3RdDC_opoka-ach-thumb-raw.png),Opoka_s1_M_20150424_ach.jpg (https://dl.airtable.com/4ElFcYpFRomzUaXS1JLd_Opoka_s1_M_20150424_ach.jpg),ach,,Acholi,,,,Uganda,4/24/2015,Public,Standard,,,,,,,1 checked out of 1,,,Facebook,2016-11-10,,1,checked,_lTVSjRv10k,https://youtu.be/_lTVSjRv10k,"1,170,000 in Uganda (2002 census), increasing. Census based on tribal affiliation. Population total all countries: 1,197,000.","Nilo-Saharan, Eastern Sudanic, Nilotic, Western, Luo, Southern, Luo-Acholi, Alur-Acholi, Lango-Acholi",Nilo-Saharan,"Acholi,,,,,",,Africa,,2015-3-20,, +Rama_20150528_swa,Rama__20150528,Prudence_Nyamishana_,5/28/2015,rama-swa-thumb-raw.png (https://dl.airtable.com/KVaFzLURjWfD7VpO5Dbw_rama-swa-thumb-raw.png),Rama_s1_M_20150528_swa.jpg (https://dl.airtable.com/72byk7stSsywHWucJCXZ_Rama_s1_M_20150528_swa.jpg),swa,,Swahili,,,,Uganda,5/28/2015,Public,Standard,,,,,Full name: Rama Ismail Hassan,Get a free Swahili lesson with italki: http://promos.italki.com/wikitongues_swa,1 checked out of 1,checked,,,,,1,checked,rK43HXX2fS0,https://youtu.be/rK43HXX2fS0,"Population total all languages: 15,458,390.","Niger–Congo, Atlantic–Congo, Benue–Congo, Southern Bantoid Bantu, Northeast Coast Bantu, Sabaki, Swahili",Niger–Congo,"Swahili,,,,,",,Africa,,2015-3-25,, +Kateryna_20171226_ukr,Kateryna_Smykovska_20171226,Kateryna_Smykovska_20171226,12/26/2017,Kateryna_20171226_ukr.png (https://dl.airtable.com/USWAEOqQR2ED6KgiKybg_Kateryna_20171226_ukr.png),,ukr,,Ukrainian,,,,Ukraine,1/26/2018,Public,CC BY-NC 3.0,,,,,Kyiv,,1 checked out of 1,,,,,,1,,l_BqoHb9bA8,https://youtu.be/l_BqoHb9bA8,"32,000,000 in Ukraine (2001 census). Population total all countries: 36,048,890. Ethnic population: 37,500,000 (2001 census).","Indo-European, Slavic, East",,,"This video was submitted by Kateryna Smykovska from Kiev, Ukraine, where she lives. Ukrainian is spoken by as many as 45 million people, primarily in Ukraine, where it is a nationally official language, and by communities in neighboring countries throughout Eastern Europe. It is also spoken by diaspora communities worldwide, particularly in the Americas. An Indo-European language of Slavic origin, Ukrainian had emerged as a unique mother tongue by the turn of the 17th century CE, a period that left behind substantial documentation. By the 19th century CE, Ukrainian became the subject of persecution by the Russian Empire, which banned the language from schools and mainstream media in favor of Russian-only policies. Nonetheless, Ukrainian speakers, especially in the country’s west, maintained a lively tradition of native-language folklore, poetry, and song. Since the turn of the 21st century CE, Ukrainian use has grown substantially, as has the language’s prominence in music, cinema, and online. ",Eurasia,,2018-1-5,, +Simon_20160715_eng,Simon_Roper_20160715,Simon_Roper_20160715,7/15/2016,Simon_s1_M_20160715_eng.png (https://dl.airtable.com/QEiWqPbbQ9OkRYcMKbpB_Simon_s1_M_20160715_eng.png),Simon_s1_M_20160715_eng.jpg (https://dl.airtable.com/shW6lsA2Tgy73Wp1dEZs_Simon_s1_M_20160715_eng.jpg),eng,,English,Cumbrian,,,United Kingdom,8/25/2016,Public,CC BY-NC 3.0,checked,,"T'dialect is a sort o' combinyation o' norse, auld english, pictish… the can lin twi it an' modern norwegian. Sa we say 'gan yam' for 'go home', awivver a norwegian wad say 'go hjeme.' + +S'anyway - when we were bairns - weh and t'marras - we used to gan t'Ullswatter, and t'were snaatan a la'al bit at yan tyem, but t'watter'd nae frostit owwer as't does on t'occyasion. Awivvwer, t'were gae cald, and t'were glisky and o', sa we wore t'kyvals. Nae gev us mek gran' fettle on t'shore. Yan of us, Danny, fell in t'watter an' brayed his sel. Were hareet, tha. N'owt mek wad strike him doon. T'were creukt, cos - yon tyem o' year - t'were february or summat - t'were attercoppen ivvery which way the deek't. An' yan marra - Hilde - se were flaitent o't'. Sa… aa nivver sin a body run sa fast in o' weh leyfe. But t'were yan o' t'last tyem we speeakt cummerlan wid ithers. Acause the were nae supposed to speeak it as a bairn. The were supposed to speeak 'english.' Sa… well, yon were a hard'un. T'is shaff fettle, o' cowse, 'at… sa many… British dialects are gettan sa rare an' la'al. Aa hope they gan on, or t'would be a gran' sheame. +Anyway, w'ither marra, Burne, he's a gyamkeaper, works wid… gorcock. He tell'd us a tyal yence; there were a standan lin an' a shiftan lin, an' yan man fr'each shot at yan gorcock at t'seame teame… an t'bloody thing exploded! An' they nivver foond t'carcass. Sa he helle his sel a cup o' tea, an' that were that. An' yon's what the has to keep in mind! Pragmatism. Gettan summat done reet. If it take yan or tyan or tethera tyem, gettan summat done reet. Yence the can nae chyange fettle, div nut worry. Aa thowt sek a thing sin aa were sethera. An aa nivver been mizzlan sin.","(Hello - my name is Simon Roper, and I'm of Cumbrian descent.)(The dialect is a sort of combination of norse, old english, pictish… you can draw parallels between it and modern norwegian. So we say 'gan yam' for 'go home,' whereas a norwegian would say 'go hjeme.' When we were children - me and my friends - we used to go to Ullswater, and it was snowing a little bit on one occasion, but the lake hadn't quite frozen over as it sometimes does. However, it was very cold and sparkling, so we wore great-coats. It didn't give us much luck on the shore; one of us, Danny, fell in the water and bruised himself. He was alright, though. Not much would strike him down. It was strange, because at that time of year - it was february, or something - there were spiders everywhere you looked. And one of my friends - Hilde - she was frightened of them. So… I've never seen a person run so fast in all my life. It's bad luck, of course, that so many British dialects are getting so rare and small. I hope they survive, or it would be a great shame.)(Anyway, my other friend, Burne, he's a gamekeeper, works with grouse. He told me a story once; there was a standing line and a moving line, and one man from each shot at one grouse at the same time. And the bloody thing exploded! And they never found the carcass. So he poured himself a cup of tea and that was that. And that's what you have to keep in mind! Pragmatism. Getting something done right. If it takes one or two or three times, getting something done right. When you can't change something, don't worry. I have thought this since I was six, and I haven't been upset since.)",,Get a free English lesson with italki: http://promos.italki.com/wikitongues_eng,1 checked out of 1,,,,,,1,,w_FJ_D1BVkI,https://youtu.be/w_FJ_D1BVkI,"55,600,000 in United Kingdom (ELDIA 2012). Population total all countries: 335,148,868. L2 users: 1,500,000 in United Kingdom (Crystal 2003). L2 users worldwide: 505,000,000.","Indo-European, Germanic, West, English",Indo-European,§Cumbrian,,"Eurasia, Eurasia",,2016-7-18,, +Owen_20170803_glv,Owen_Williams_20171004,Owen_Williams_20171004,8/3/2017,Screen Shot 2018-02-26 at 6.00.49 PM.png (https://dl.airtable.com/EtYxFgmxSKioix8pU2vd_Screen%20Shot%202018-02-26%20at%206.00.49%20PM.png),Owen_20170803_glv.jpg (https://dl.airtable.com/8qITwasbQ3aIA7lBp0IQ_Owen_20170803_glv.jpg),glv,eng,Manx,,,,United Kingdom,2/26/2018,To Upload,CC BY-SA 4.0,checked,,,"(Manx) Well, hello everyone and I welcome to you all to this video; my name is Owen and today I'd just like to talk a little about Manx Gaelic, the language I'm speaking now. So like I said, my name is Owen, I'm sixteen years old and I live in the Isle of Man (alternative name) - that's another name - in the south of the island, in a small rural village called Colby. So yes, in Colby I think there are about two thousand people: I'm not fully sure about that, but something like it. So in the Isle of Man, we have a national language called Manx, or Manx Gaelic and it's similar to Scottish Gaelic and Irish Gaelic also, and as well as that, it's a little like Welsh Cornish and Breton sometimes. So, Manx is spoken by around two thousand people. I'm not fully sure about that number but it's around two thousand I think; as well as that number, there are people always wanting and inclined to learn the language in classes and school lessons and in addition, there is a Manx-medium primary school in St John's, in the centre of the Island. I think that about 70 children attend that school, I'm not fully sure but children enough anyway and it's very good in truth, because those kids learn solely through Manx and there is no English spoken at all until their fifth year I believe, but anyway, it's purely Manx that is spoken for the majority of the time. The pupils become fluent in Manx before they're even in the second year of school and that's fantastic because it creates more Manx speakers every year, and the school is perhaps even as old as me; about fifteen years old at the present moment, I'm not fully sure, but every year it becomes more and more popular and well-considered; more parents send their kids to the school because they want their kids to be able to speak Manx; they have a sort of pride and that's wonderful without a shadow of a doubt. So, the majority of the kids who went to the Bunscoill Gaelgagh (Manx-medium primary school) go to QE2 high school in Peel after attending the Bunscoill Gaelgagh and that's fab because the kids who went to the BG are offered the opportunity to do all their lessons solely through Manx in QE2, and that opportunity isn't given to anyone else in any other schools on the island as far as I'm aware. There are five secondary schools on the IOM; Castle Rushen High School -the school I go to and that's in the south - and as well as that, there are two schools in Douglas (the capital): St Ninian's and Ballakermeen. In the north, there is Ramsey Grammar School and, what else? King William's College in the south also. So, in schools, the opportunity is given to people, well, anyone, to do lessons and a TCG and that's equivalent to a GCSE in Manx and as well as the TCG, an A level is doable and last year, aye, a year ago, I did the TCG and this year I've just finished the A Level and I, in my heart, believe that it's fab because it encourages more people, perhaps, to do Manx as you can get something out of it and say that you're fluent in Manx if you have a TCG or A Level and that's good above measure. So Manx is growing, more people and more kids are learning the language, more parents are sending their kids to the Bunscoill Gaelgagh and perhaps the best thing, there are lots of native speakers - well, maybe not lots but enough, you know? Native speakers enough and lots of parents use Manx within the household and subsequently kids grow up through Manx; they're born and bred through the language. So Manx is alive and strong and it will be like that forever I hope.","Colby, Isle of Man. + +Removed - Sent in new video on 8/24/17",,1 checked out of 1,,,,,,1,,mNyEuC2GxGk,https://youtu.be/mNyEuC2GxGk,"No known L1 speakers, but emerging L2 speakers. L2 users: Several hundred who mainly learned it as adults. Last L1 native speaker died in 1974.","Indo-European, Celtic, Insular, Goidelic",,,"This video was recorded in Colby, Isle of Man, the United Kingdom. This Celtic language is spoken by as many as 1,800 people, primarily on the Isle of Man, a self-governing territory of the United Kingdom. During the nineteenth century CE, English-only policies in the region’s schools contributed to a severe decline in the language’s use; Ned Maddrell, the last native speaker of Manx, passed away in 1974. In recent years however, a lively revitalization movement has emerged, thanks to the work of cultural activists like Owen. Today, there are nearly 2,000 second language or ‘L2’ speakers, an increase in bilingual signage and education, and modern media, with Manx-language websites and radio. Although related to Irish and Scottish Gaelic, Manx is typically not mutually intelligible to speakers either languages. The Isle of Man is located in the middle of the Irish Sea, between Ireland and the island of Great Britain.",Eurasia,,2017-8-3,Isle of Man_GB,https://www.dropbox.com/sh/ay7ei4g1b6x63qs/AACBbPeDuUPy53WZfuWUVS8Ea?dl=0 +Natalia_20161114_rmc,Natalia_Ivend_20161107,Natalia_Ivend_20161107,11/14/2016,,,rmc,,"Romani, Carpathian",Romanischal Romani,Claims to be the last speaker; credible claims of fraudulence were raised,Classification,United Kingdom,,Removed,CC BY-NC 3.0,,checked,"Me rokravava tumenge yek puri Romanichaleski paramisi, naveski “o bàlo \'drée o gono”. + +Bute, bute bershe pàlé, yek Romanichaleski ràni jàlias perdal i bori lun-pani ke yek vaver svieto, sar laki familia. O svieto saveske le jàlie fremto, khamnesko ta tato sos, ta le ne jindie leskri chib, mè le kèrdie lengro tan oprée yek rinkeni, zeleni domba koter yek beti gav, ta adoi le sos loshale. + +Yek divès, i ràni jàlias ki gav te bikhinela tai kove saven laki familia kèrdie, ta te kinela haben lenge. Pàlé te bikhindias sàrkeno, li kindlias yek beto bàlo, ta rokradias pen akaio te dela haben ki familia adral bute divès. Tala li chivdias o bàlo \'drée yek gono, ta chivdias pes te pirela pàlé ke lako tan. + +Adral yek ora, li pirdias trin mea sar o pharo gono \'prée lako dumo, ta avelias bute kinyi. O divès khamnesko ta tato sos, doleske li kàmlias beto cheiros te beshela telé. Li chivdias telé lako gono, ta beshelias pes koter yek mea-bar savo sos adoi. Trustal li bute kinyi sos, ta o divès tato sos, sigo li sovdias pes. + +Sar te sovdias, yek vaver-taneski ràni pirdias oprée. Akaia ràni yek tikno la hi, mè o tiknesko dad lako rom nai – ta li patchelias o tikno te ladjerela la, ta li nekàmlias les. + +I vaver-taneski ràni lelias o bàlo kater avrée o gono, ta konyes chivdias o tikno adral les. O tikno suto sos, ta nekana ne rovelias. I ràni lelias oprée o bàlo ta pirdias avrée – loshali sos te nashavdias o ladjeno tikno ta asà te pàruvdias les ke rinkeno bàlo. + +Pàloder, i Romani ràni jangelias oprée. Li lelias oprée lako gono, ta chivdias pes apopli te pirela. O tikno sovdias komi adral o gono. + +Tai oria pàloder, sar te jàlias o kham telé i pov, i Romani ràni avelias ke lako tan. Lake chave, kon kenà bute bokhale sos, dikhlie la, ta prastelie late sar te kèrdie bute gudli – 'Mari daiori, mari daiori, so kindlian tu? Ta men shem bokhale, kana astis hàlom?', le puchlie. + +Kenà, sàr akaia gudli jangelias oprée o tikno, kon chivdias pes te rovela. I ràni shunelias les, phiravelias o gono, dikhlias o vaver-tanesko tikno, avelias trashadi, ta rovelias – + +'I Devi te rakhela mende! So se akaio? Yek beto tikno? +Akaio o kono fremto svieto hi – sas akoi e bàle te pàruvelan pen ke tikne, tala saveske pàruvelan e tikne?'","I am going to tell you an old Romanichal folk-story, called 'the pig in the sack'. + +Many, many years ago, a Romanichal woman travelled across the ocean to a foreign country, with her family. The country they went to was strange, sunny and hot, and they didn\'t know its language, but they set up their campsite on a eautiful green hill near a little town, and they were happy there. + +One day, the woman went into the town to sell some things that her family had made and to buy food for them. After she sold everything, she bought a small pig, telling herself that it would feed the family for several days. Then she put the pig in a sack, and set out to walk back to her camp. + +In the course of an hour, she walked three miles with the heavy sack on her back and became very tired. The day was sunny and hot, so she wanted to sit down for a little while. She put down her sack, and sat down beside a nearby milestone. Because she was so tired and the day was hot, she quickly fell asleep. + +While she slept, a foreign woman walked up. This woman had a baby, but the baby\'s father was not her husband, and she felt that the baby put her to shame and hated it. + +The foreign woman took the pig out of the sack, and quietly put the baby inside it. The baby was asleep, and never cried. The woman picked up the pig and walked away -- she was happy that she\'d got rid of the shameful baby and had also exchanged it for a fine pig. + +Later, the Romani woman woke up. She picked up her sack, and started walking once again. The baby slept on inside the sack. + +Some hours later, as the sun was setting, the Romani woman arrived at her camp. Her children, who by now were very hungry, saw her, and ran up to her making a lot of noise -- 'Mum, mum, what did you buy? And we\'re hungry, when can we eat?', they asked. + +Now, all this noise woke up the baby, who began to cry. The woman heard it, opened the bag, saw the foreign baby, was astonished, and cried out -- 'Goddess protect us! What\'s this? A little baby? This is the strangest country -- if the pigs here turn into babies, then what do the babies turn into?'.",Second video,,1 checked out of 1,,,,,,1,,,No ID,"40,400 in Czech Republic (2011 census). Population total all countries: 151,500.","Indo-European, Indo-Iranian, Indo-Aryan, Central zone, Romani, Northern",Indo-European,§Romanischal Romani,,Eurasia,,2016-11-14,, +Natalia_20161107_rmc,Natalia_Ivend_20161107,Natalia_Ivend_20161107,11/7/2016,Screen Shot 2016-12-17 at 13.03.22.png (https://dl.airtable.com/SnDwk41XRPqi77IVSOXc_Screen%20Shot%202016-12-17%20at%2013.03.22.png),Natalia_s1_F_20161107_rmc.jpg (https://dl.airtable.com/3xR1J6O6S2nRExDXZge6_Natalia_s1_F_20161107_rmc.jpg),rmc,,"Romani, Carpathian",Romanischal Romani,Claims to be the last speaker; credible claims of fraudulence were raised,Classification,United Kingdom,12/17/2016,Removed,CC BY-NC 3.0,checked,checked,"Kushto divès. Miro nav Natalia Ivend hi, ta akaia yek beti filma trustal mande ta miri chib hi. + +Me shom panj-var-desh-ta-dui bershengri Romani ràni, kater i svieti navesko Romanichal. Akaia svieti dui kotore la hi: +o Angliako Romanichal, ta o Irlandiako Romanichal. Komi sar panj shelbershipene pàlé, avelias miri familia kater i Karpatia, yekto ki Alemania, tala ki Fransia, ki Anglia, ta pàlé ki Irlandia – kai sar bute kàmipen, men rakhliem mari chib, ta asà maro puro patchipen, pàske ko-divès. + +Miri dialekta tatche pureni hi, ta nekana ne pàruvdias pes butoder sar bitipenes pàlé miri svieti muklias i Karpatia. Astis se i kono pureni Romani dialekta savi jivela komi. + +Me ne jinava chi vaver familia savi rikeradias i puri Romanichaleski chib. Sàr e vaver Romanichaleske svietia nashavdie lengri chib bute, bute bershe pàlé, ta kenà rokrelan mè i chib navesko Angloromanes, vai “i panghiadi chib”; adovo nav la hi soske li se tatche panghiadi – nebàkhtale, li nashavdias sàr laki gramatiki, ta bute lake nave, ta chivdias pes ketane ko Anglipen. O Angloromanes kekomi yek tatchi Romani chib nai. + +Me shom i pàleni yek kater miri familia kon jivela komi – me shom i kono tàni, ta sàr e vaver mulie tai bershe pàlé. Doleske, astis shom i pàleni yek kon jinela i puri Romanichaleski chib kater o beanipen. Me kàmava te rakhava miri chib, ta te sikava la ke vaver mushe, te ne meravala; yek boro kotor kater mare purenipene hi. + +Asà te kèrava tai filmia trustal i chib, me buterava te kèrava yek chibno-lil, savo rikeravala i chibake dui i gramatiki ta e lave. + +Tumende me parikerava te shunelien mande, ta me kàmava miro rokrapen te delias tumenge loshalipen.","Hello. My name is Natalia Ivend, and this is a short film about me and my language. + +I am a 52-year-old Romani woman from the tribe named the 'Romanichal'. This tribe has two parts: the English Romanichal, and the Irish Romanichal. More than five centuries ago, my family came from Carpathia, first to Germany, then to France, England, and finally to Ireland, where we lovingly protected our language and also our old religion, to the present day. + +My dialect is truly ancient, and has never changed more than fractionally since my tribe left Carpathia. It may be the most ancient still-living Romani dialect. + +I don't know any other family who kept the old Romanichal language. All the other Romanichal clans lost their language many, many years ago and now only speak a language known as Angloromanes, or 'the broken language' it has that name because it truly is broken – unfortunately, it lost all its grammar and many of its words, and became mixed together with English. Angloromanes is no longer a true Romani language. + +I am the last one of my family who is still living – I am the youngest, and all the others died some years ago. Therefore, it's possible that I am the last native speaker of the old Romanichal language. I want to save my language and to teach it to other people, so that it will not die out; it is a big part of our heritage. + +As well as making some films about the language, I am working to create a lexicon of the language, which will document both the grammar and the vocabulary. + +Thank you for listening to me, and I hope you enjoyed my talk.",First video,,1 checked out of 1,,,,,,1,,,No ID,"40,400 in Czech Republic (2011 census). Population total all countries: 151,500.","Indo-European, Indo-Iranian, Indo-Aryan, Central zone, Romani, Northern",Indo-European,§Romanischal Romani,,Eurasia,,2016-11-14,, +Miriam_20150414_eng+luo+swa,Miriam__20150414,Miriam__20150414,4/14/2015,miriam-luoswaeng-thumb-raw.png (https://dl.airtable.com/dV9W7a1oRLmLpIzM1HXO_miriam-luoswaeng-thumb-raw.png),Miriam_s3_F_20150414_eng+swa+luo.jpg (https://dl.airtable.com/nqc5kLDTTC5IU1v1d4gx_Miriam_s3_F_20150414_eng%2Bswa%2Bluo.jpg),"eng,luo,swa",,"English, Dholuo, Swahili",Luo,,,United Kingdom,4/14/2015,Public,CC BY-NC 3.0,,checked,"[00:00:01] Hi everyone. My name is Miriam Adhiambo Oduor, the daughter of Daniel, er, the daughter of (corrects mistake) James Oduor Ndhoya [who is] the son of Daniel Ndhoya Ogula. Er, I am going to express myself in three languages which I have actually learnt since I was a child. But I did learn some more but I, kind of, I haven’t spoken them, so, I have lost some of them. But I still am holding [onto] three languages. Currently I am a student at University of Sussex, I am studying Mathematics. I went back to study when I was quite advanced in age, but I am glad that I’ve managed to finish it. I also have a daughter who is, um, nineteen years old, and she is also at University. I’ve been staying in England for now about twenty years of age, er, (corrects mistake) –twenty years- and it’s been wonderful, and I am grateful to that- to God for that. I am completing my studies this year and I’ll be graduating as a Mathematician, which is something I am very, extremely grateful about- in June this year. Um, next I’m going to express myself in Luo. [00:01:17] An Adhiambo nyar Oduor Ndhoya wod Ndhoya Ogula. No nyuola Kenya, adongo Kenya, onyuola Kenya. An gowetena gi nyi megena bende ma pod odak Kenya. Asebet kadak kaeni uwengereza kuom higini pier ariyo. An ginyako mi iluongo ni Grace obende othie skul sani en gi higini apar go ochiko. Gimomiyo awuoyo kama adwaro ni mondo anyis nimegewa ama migewa man gihigini kaka an kikibed kod wich kuot mardok e skul. Jo mang’eny wacho ni ki se chopo higini mang’eny oko negidhie e skul. Onegi bed iyot kisomo ki itiyo tije mag ot. Kirango nyithindo, nyikwayo gik machalo kamano. Lakini (in Swahili) somo en gimaber ojiwoni obwongo kendo omedoni ng’eyo gik ma ne ok ing’eyo ni inyalo ng’eyo. Ne adok e skul ka hikena ng’en ahinya kendo napara ni dhano biro nyiera. No bedo gimatek somo e klas gi nyithindo mahikegi ohinga, (corrects mistake) –tindona- you know (in English)?, kendo dhano ne nyiera mang’en ahinya lakini naketo kinda banyaka koro asomo hignigo duto. Sani koro asechopo giko mar somona. Kendo abiro bedo gi graduation, July ni. Ma en gima anwang’o maduong’ ma Nyasaye osekonya, adwoko erokamano kuom Nyasaye kuom kony mokonya ba atiyeko somba makoro sani abiro bedo mathematician. [00:03:00] Nina shikuru mungu sana [kwamana] ame nisaidia kufika izivitu nimesafanya maishalangu. Nilizaliwa Kenya nanimesa ishi hapa, um, uwengereza, um, kwamiaka, um, ishirini. Vile nilisema nikona kijana, mschana anaitwa Grace yeye pia ako university anasoma natuna ishi pamoja. Niko na wandugu na wadada bado wanaishi Kenya. Nao wandugu zangu tuna ongea kilasiku wananipenda nami pia nimewapenda. Nina [stuttering] ongea kwaizi lugha ninataka [stuttering again] kwambia kusoma lugha sikitu raishi watuwengine wanasema unaweza kujifunza malugha hivyo hivyo haraka haraka lakini watu wengine ngumu kusoma hivyo. Hata unasikia sasa nimeanza kusahau Swahili nanilizaliwa nikiongea Swahili. Watu a Kenya hawa jui Swahili sana kama watu a Tanzania lakini nilesoma kidogo Swahili na nilijifunza kuongea kwanzia mtoto ndiyo ninaweza kuongea lakini lugha inaweza kwa gumu kujifunza. Ukitaka kujifunza lugha nikitu unajiwekea bidi. Saingine unaweza kusikia –kusikiza- watu wa kiongea ama kutumia vitu kama makaratasi ama newspapers kusoma makaratasi, um, nakusoma vitabu na kukuwa nawatu pamoja nakuongea nao lugha kilasiku. Kwamana mimi sionge na mtoto yangu kilasiku Swahili sasa inakuwa ngumu kwongea Swahili. Sahile nimepata muda kwongea Swahili nikama nime pigasimu nina ongea na mandugu na madada wangu lakini maranyingi tuna ongeanga kingereza sasa nikitu ngumu sana kwongea. Na nikifanya makosa kwaizi vileninaongea uniachiye kwamana nime sa sahau, maneno nyingi kwa Swahili. Um, nimetaka tu kwawambia a watu wanajifunza Swahili ama wanajifunza ma lugha kuweka tu bidi usikuwe na uwoga, usisikie vibaya ukiongea na unajaribu na unawongea si vile ulikua unaitaka unajifunza lakini maneno ahitoki vile unahitaji sasa nihivyo tu. Vile [nina]ongea unaweza kujuwa saizi unaweza kusikia saizi nina- (corrects mistake) siongei vizuri Swahili, kwamana sijakuwa niki ongea kilamara. Hivyo ndivyo kichwa imeanza kusahau maneno nyingi. So- (in English), hivyo tu ndiyo nilikwa nataka kusema. Mungu wabariki sana wa watu wanasikiza ama wata tumia muda kukaa chini na kusikiza vile nimasema Mungu wabariki sana. Hasanteni.","[00:01:17] I am Miriam Adhiambo the daughter of Oduor Ndhoya, son of Ndhoya Ogula. I was born in Kenya, and I grew up in Kenya. I have brothers and sisters and they live in Kenya. I have been living here in England for twenty years. I have a daughter called Grace, she is also in education, and she is nineteen years old. My reason for speaking [today], is to tell my fellow sisters or mothers [of my age], not to be afraid to go back into education. Most people say that when you are so advanced in age, you shouldn’t go back to school. You should stay at home doing housework. You should be looking after children, grandchildren, and things like that. But education is good because it strengthens the mind and provides you with knowledge you never knew you could have. I returned to education when I was much older, and I thought everyone would laugh at me. It was very difficult being in class with young people, much younger than me, you know? And people laughed at me a lot, but I persevered with my education for these many years. Now I have reached the end of my studies and I will be graduating this July. Something that has been quite important to me is that God has helped me achieve my education and I am extremely grateful to Him for that, now that I have become a Mathematician. [00:03:00] I am very thankful to God because he has helped me achieve all the things I have done in my life. I was born in Kenya and I have now lived in England for about twenty years. As I said before, I have a teenage daughter who is called Grace, and she is also at university in education. We live together. I have brothers and sisters who live in Kenya, they are very friendly. I speak to my brothers and sisters every day, they love me so much and I love them too. I just wanted to say that learning a language is not very easy, a lot of people say that learning a language is something simple, ‘just like that’, and that you can learn a language quite quickly, but some people find it difficult to learn like that. Even now you can hear that I have started forgetting Swahili, even though I was born speaking Swahili. A lot of Kenyans don’t speak very good Swahili, compared to Tanzanians, but I learned a little Swahili and I taught myself to speak it, from a young child: that is why I can still speak Swahili. But a language can be very hard to learn. If you want to learn a language, you must put in a lot of effort. Perhaps you could listen to people speaking, or you could use things like newspapers; reading newspapers or books, or just being with people who speak that language and speaking all the time. Because I don’t speak with my child every day, it has become very difficult for me to speak Swahili. The only time I get to speak Swahili, is when I am making phone calls to my family, speaking to my brothers and sisters in Kenya- but most of the time, we speak English, so now it has become difficult to speak. I just want to tell everyone who is trying to learn Swahili, or other languages, to have perseverance- don’t be afraid if you speak the language incorrectly- if you’re trying or learning to speak, but you don’t speak the way you want to and the words don’t come out as you’d like. From the way I am speaking, you can see that I am not speaking Swahili correctly either, because I have not been speaking it every day. That is because I have forgotten many words. So, that is all I wanted to say. God bless you all those who have taken their time to sit down to listen to what I’ve said, thank you very much. Thank you all. ","""(From Miriam Oduor) I wanted especially to share my mother tongue: Dholuo, which has little exposure in the Western world, unlike Swahili. This is my first experience doing something like this: sharing my languages, so I have made some mistakes. But I am very happy to share it, and I hope you enjoy. Thank you""","Get a free English lesson with italki: http://promos.italki.com/wikitongues_eng, Get a free Swahili lesson with italki: http://promos.italki.com/wikitongues_swa",3 checked out of 3,checked,,Facebook,2016-6-29,https://www.facebook.com/wikitongues/videos/1127594077305118/,3,checked,dxtFwV5Es7k,https://youtu.be/dxtFwV5Es7k,"55,600,000 in United Kingdom (ELDIA 2012). Population total all countries: 335,148,868. L2 users: 1,500,000 in United Kingdom (Crystal 2003). L2 users worldwide: 505,000,000., 4,044,000 in Kenya (2009 census), increasing. Population total all countries: 4,184,000., Population total all languages: 15,458,390.","Indo-European, Germanic, West, English, Nilo-Saharan, Eastern Sudanic, Nilotic, Western, Luo, Southern, Luo-Acholi, Luo, Niger–Congo, Atlantic–Congo, Benue–Congo, Southern Bantoid Bantu, Northeast Coast Bantu, Sabaki, Swahili",Indo-European,"English,Dholuo,Swahili,,,",,"Eurasia, Eurasia, Africa, Africa",,2015-4-14,, +James_20140101_pol+eng,James__20140101,James__20140101,1/1/2014,,,"pol,eng",,"Polish, English",,,,United Kingdom,,Removed,CC BY-SA 4.0,,,,,"Removed upon request +","Get a free Polish lesson with italki: http://promos.italki.com/wikitongues_pol, Get a free English lesson with italki: http://promos.italki.com/wikitongues_eng",2 checked out of 2,,,,,,2,,,No ID,"36,600,000 in Poland (ELDIA 2012). Population total all countries: 38,663,780., 55,600,000 in United Kingdom (ELDIA 2012). Population total all countries: 335,148,868. L2 users: 1,500,000 in United Kingdom (Crystal 2003). L2 users worldwide: 505,000,000.","Indo-European, Slavic, West, Lechitic, Indo-European, Germanic, West, English",Indo-European,§,,"Eurasia, Eurasia, Eurasia",,2014-12-22,, +Esben+Johannes_20150411_eng+dan+por,"Esben_Hesketh_20150411,Johannes_Hesketh_20150411",Ian_Szterenzys_,4/11/2015,johannesesben-engdanpor-thumb-raw.png (https://dl.airtable.com/WlPWRxMlS9uZk5DpeTn1_johannesesben-engdanpor-thumb-raw.png),Johannes and Esben_s3_MM_20150411_eng+dan+por.png (https://dl.airtable.com/xZZHsFXTQ62DHMxgjWDh_Johannes%20and%20Esben_s3_MM_20150411_eng%2Bdan%2Bpor.png),"eng,dan,por",,"English, Danish, Portuguese",,,,United Kingdom,4/11/2015,Public,CC BY-NC 3.0,,,,,,"Get a free English lesson with italki: http://promos.italki.com/wikitongues_eng, Get a free Danish lesson with italki: http://promos.italki.com/wikitongues_dan, Get a free Portuguese lesson with italki: http://promos.italki.com/wikitongues_por",3 checked out of 3,checked,,,,,3,checked,-TEtqv0RTew,https://youtu.be/-TEtqv0RTew,"55,600,000 in United Kingdom (ELDIA 2012). Population total all countries: 335,148,868. L2 users: 1,500,000 in United Kingdom (Crystal 2003). L2 users worldwide: 505,000,000., 5,380,000 in Denmark (ELDIA 2012). Population total all countries: 5,522,490., 10,000,000 in Portugal (ELDIA 2012). Population total all countries: 203,349,200.","Indo-European, Germanic, West, English, Indo-European, Germanic, North, East Scandinavian, Danish-Swedish, Danish-Riksmal, Danish, Indo-European, Italic, Romance, Italo-Western, Western, Gallo-Iberian, Ibero-Romance, West Iberian, Portuguese-Galician",Indo-European,"English,Danish,Portuguese,,,",,"Eurasia, Eurasia, Eurasia, Eurasia, Eurasia",,2015-3-25,, +Tom_20150526_kor,Tom_Lee_20150526,Ian_Szterenzys_,5/26/2015,Tom_s1_M_20150526_kor.png (https://dl.airtable.com/OF3mMo1TFSqY7paIu51g_Tom_s1_M_20150526_kor.png),Tom_s1_M_20150526_kor.jpg (https://dl.airtable.com/k6SUObz0Q1GpH0jiX3A5_Tom_s1_M_20150526_kor.jpg),kor,,Korean,,,,United Kingdom,3/9/2017,Public,CC BY-NC 3.0,checked,,,,,Get a free Korean lesson with italki: http://promos.italki.com/wikitongues_kor,1 checked out of 1,,,,,,1,,QKV3eHkFAZY,https://youtu.be/QKV3eHkFAZY,"48,400,000 in Korea, South (2010). Population total all countries: 77,166,230.",Language isolate,,§,,"Eurasia, Eurasia",,2017-1-13,, +Steffi_20140729_bar,Steffi__20140729,Daniel_BogreUdell_20130101,7/29/2014,steffi-bar-thumb-raw.png (https://dl.airtable.com/1g19ke78SqCpiL6Jj9dE_steffi-bar-thumb-raw.png),,bar,,Bavarian,,,,United Kingdom,,To Upload,Standard,,,,,,,1 checked out of 1,,72,,,,1,,,No ID,"7,830,000 in Austria (ELDIA 2012). Population total all countries: 14,089,000.","Indo-European, Germanic, West, High German, German, Upper German, Bavarian-Austrian",Indo-European,§,,Eurasia,,2015-2-7,, +Michi_20140729_bar,Michi__20140729,Daniel_BogreUdell_20130101,7/29/2014,michi-bar-thumb-raw.png (https://dl.airtable.com/BazSrHEQf6XOZoDI9IdQ_michi-bar-thumb-raw.png),,bar,,Bavarian,,,,United Kingdom,,To Upload,Standard,,,,,,,1 checked out of 1,,69,,,,1,,,No ID,"7,830,000 in Austria (ELDIA 2012). Population total all countries: 14,089,000.","Indo-European, Germanic, West, High German, German, Upper German, Bavarian-Austrian",Indo-European,§,,Eurasia,,2015-2-7,, +Peter_20151229_cor,Peter__20151229,Daniel_BogreUdell_20130101,12/29/2015,peter-cor-thumb-raw.png (https://dl.airtable.com/2pII2IVETtC3J5WWyqfF_peter-cor-thumb-raw.png),,cor,,Cornish,,,,United Kingdom,,To Upload,Standard,,,,,,,1 checked out of 1,,62,,,,1,,,No ID,"No known L1 speakers, but emerging L2 speakers. Ethnic population: 532,000 (2011 census). L2 users: A few L2 speakers in Canada, Australia, Austria, and Brittany (France).","Indo-European, Celtic, Insular, Brythonic",Indo-European,§,,Eurasia,,2014-12-22,, +Carl_20151231_eng,Carl__20151231,Daniel_BogreUdell_20130101,12/31/2015,carl-eng-thumb-raw.png (https://dl.airtable.com/QRNc6iCmRCKkXpMT6byJ_carl-eng-thumb-raw.png),,eng,,English,,,,United Kingdom,,To Upload,Standard,,,,,,Get a free English lesson with italki: http://promos.italki.com/wikitongues_eng,1 checked out of 1,,49,,,,1,,,No ID,"55,600,000 in United Kingdom (ELDIA 2012). Population total all countries: 335,148,868. L2 users: 1,500,000 in United Kingdom (Crystal 2003). L2 users worldwide: 505,000,000.","Indo-European, Germanic, West, English",Indo-European,§,,"Eurasia, Eurasia",,2014-12-22,, +Jane_20130530_eng,Jane__20130530,Daniel_BogreUdell_20130101,5/30/2013,jane.png (https://dl.airtable.com/tbu1z3hQQeicrrGQvjvQ_jane.png),Jane_s1_F_20130530_eng.jpg (https://dl.airtable.com/JMWSs7IKQBavTn3bJZnq_Jane_s1_F_20130530_eng.jpg),eng,,English,,,,United Kingdom,5/30/2013,Public,Standard,,,,,,Get a free English lesson with italki: http://promos.italki.com/wikitongues_eng,1 checked out of 1,checked,,,,,1,checked,3Ve8Gf5rAhA,https://youtu.be/3Ve8Gf5rAhA,"55,600,000 in United Kingdom (ELDIA 2012). Population total all countries: 335,148,868. L2 users: 1,500,000 in United Kingdom (Crystal 2003). L2 users worldwide: 505,000,000.","Indo-European, Germanic, West, English",Indo-European,"English,,,,,",,"Eurasia, Eurasia",,2014-12-22,, +John_20140617_eng,John__20140617,Daniel_BogreUdell_20130101,6/17/2014,john.png (https://dl.airtable.com/tEqm27KSCO482BTFqB4g_john.png),John_s1_M_20140617_eng.jpg (https://dl.airtable.com/nHs1jXfmTYaAtIrz4knE_John_s1_M_20140617_eng.jpg),eng,,English,,,,United Kingdom,6/17/2014,Public,Standard,,,,,,Get a free English lesson with italki: http://promos.italki.com/wikitongues_eng,1 checked out of 1,checked,,,,,1,checked,DCNH-f-CC98,https://youtu.be/DCNH-f-CC98,"55,600,000 in United Kingdom (ELDIA 2012). Population total all countries: 335,148,868. L2 users: 1,500,000 in United Kingdom (Crystal 2003). L2 users worldwide: 505,000,000.","Indo-European, Germanic, West, English",Indo-European,"English,,,,,",,"Eurasia, Eurasia",,2014-12-22,, +Iain_20140918_gla,Iain__20140918,Daniel_BogreUdell_20130101,9/18/2014,Iain_s1_M_20140918_gla.png (https://dl.airtable.com/RCRLnzKKRkufDbzrsisX_Iain_s1_M_20140918_gla.png),Iain_s1_M_20140918_gla.jpg (https://dl.airtable.com/RozNEatzTqa80aTH182v_Iain_s1_M_20140918_gla.jpg),gla,,"Gaelic, Scottish",Scottish Gaelic,,,United Kingdom,9/18/2014,Public,Standard,,,,,,,1 checked out of 1,,,,,,1,checked,8xVxOJCBPSw,https://youtu.be/8xVxOJCBPSw,"58,700 in United Kingdom (2001 census). Population total all countries: 63,130.","Indo-European, Celtic, Insular, Goidelic",Indo-European,"Scottish Gaelic,,,,,",,Eurasia,,2014-12-22,, +Christine_20140921_sco,Christine__20140921,Daniel_BogreUdell_20130101,9/21/2014,Christine_s1_F_20140921_sco.png (https://dl.airtable.com/buir7Dl5SCscrDIWdfs6_Christine_s1_F_20140921_sco.png),Christine_s1_F_20140921_sco.jpg (https://dl.airtable.com/KzWDiYb5STqKjmIOWSpA_Christine_s1_F_20140921_sco.jpg),sco,,Scots,Scots (Shetlandic),,,United Kingdom,9/21/2014,Public,Standard,,,,,,Get a free Scots lesson with italki: http://promos.italki.com/wikitongues_sco,1 checked out of 1,checked,,,,,1,checked,m0EwquC6wBU,https://youtu.be/m0EwquC6wBU,"90,000 in United Kingdom (1999 B. Kay). 60,000 in Lallans, 30,000 in Doric. Population total all countries: 100,000. L2 users: 1,500,000 in United Kingdom.","Indo-European, Germanic, West, English",Indo-European,"Shetlandic,,,,,",,Eurasia,,2014-12-22,, +David_20140923_sco+eng,David__20140923,Daniel_BogreUdell_20130101,9/23/2014,David_s2_M_20140923_sco+eng.png (https://dl.airtable.com/I6SOFe3CREGsqMb1bc4x_David_s2_M_20140923_sco%2Beng.png),David_s2_M_20140923_sco+eng.jpg (https://dl.airtable.com/0IRCHSftTymPyG5wfq4g_David_s2_M_20140923_sco%2Beng.jpg),"sco,eng",,"Scots, English","Scots (Doric),English",,,United Kingdom,9/23/2014,Public,Standard,,,,,,"Get a free Scots lesson with italki: http://promos.italki.com/wikitongues_sco, Get a free English lesson with italki: http://promos.italki.com/wikitongues_eng",2 checked out of 2,checked,,,,,2,checked,le3cBRlWSE8,https://youtu.be/le3cBRlWSE8,"90,000 in United Kingdom (1999 B. Kay). 60,000 in Lallans, 30,000 in Doric. Population total all countries: 100,000. L2 users: 1,500,000 in United Kingdom., 55,600,000 in United Kingdom (ELDIA 2012). Population total all countries: 335,148,868. L2 users: 1,500,000 in United Kingdom (Crystal 2003). L2 users worldwide: 505,000,000.","Indo-European, Germanic, West, English, Indo-European, Germanic, West, English",Indo-European,"Doric Scots,English,,,,",,"Eurasia, Eurasia, Eurasia",,2014-12-22,, +Donald_20140925_gla,Donald__20140925,Daniel_BogreUdell_20130101,9/25/2014,donald.png (https://dl.airtable.com/rSEbz2GRZYlyrDWiM2HA_donald.png),Donald_s1_M_20140925_gla.jpg (https://dl.airtable.com/Y1HfI47IRo647ucY8w5L_Donald_s1_M_20140925_gla.jpg),gla,,"Gaelic, Scottish",Scottish Gaelic,,,United Kingdom,9/25/2014,Public,Standard,,,,,,,1 checked out of 1,,,,,,1,checked,EP5QqODoeHw,https://youtu.be/EP5QqODoeHw,"58,700 in United Kingdom (2001 census). Population total all countries: 63,130.","Indo-European, Celtic, Insular, Goidelic",Indo-European,"Scottish Gaelic,,,,,",,Eurasia,,2014-12-22,, +Rosemary_20150113_gla,Rosemary__20150113,Daniel_BogreUdell_20130101,1/13/2015,rosemary.png (https://dl.airtable.com/okLcHtqRt2GXjnWhlYcy_rosemary.png),Rosemary_s1_F_20150113_gla.jpg (https://dl.airtable.com/R7qLjl5FSCe38Y1CasaY_Rosemary_s1_F_20150113_gla.jpg),gla,,"Gaelic, Scottish",Scottish Gaelic,,,United Kingdom,1/13/2015,Public,Standard,,,,,,,1 checked out of 1,,,Facebook,2016-6-25,https://www.facebook.com/wikitongues/videos/1127524663978726/,1,checked,rPokZgAdXSo,https://youtu.be/rPokZgAdXSo,"58,700 in United Kingdom (2001 census). Population total all countries: 63,130.","Indo-European, Celtic, Insular, Goidelic",Indo-European,"Scottish Gaelic,,,,,",,Eurasia,,2014-12-22,, +Elizabeth_20150212_cor,Elizabeth__20150212,Daniel_BogreUdell_20130101,2/12/2015,Elizabeth_s1_F_20150212_cor.png (https://dl.airtable.com/gPCHOD8TLygj98T7ySBm_Elizabeth_s1_F_20150212_cor.png),Elizabeth_s1_F_20150212_cor.jpg (https://dl.airtable.com/wAbAN0HuTwqoePCXREtx_Elizabeth_s1_F_20150212_cor.jpg),cor,,Cornish,,,,United Kingdom,2/12/2015,Public,Standard,,,,,,,1 checked out of 1,,,,,,1,checked,9UaAyI-uI30,https://youtu.be/9UaAyI-uI30,"No known L1 speakers, but emerging L2 speakers. Ethnic population: 532,000 (2011 census). L2 users: A few L2 speakers in Canada, Australia, Austria, and Brittany (France).","Indo-European, Celtic, Insular, Brythonic",Indo-European,"Cornish,,,,,",,Eurasia,,2014-12-22,, +Hywel_20150214_cym,Hywel__20150214,Daniel_BogreUdell_20130101,2/14/2015,hywel-cym-thumb-raw.png (https://dl.airtable.com/BVXv1gdZQCGKMsUuLGk8_hywel-cym-thumb-raw.png),Hywel_s1_M_20150214_cym.jpg (https://dl.airtable.com/Mqn4hrbeT0uG5fL3vHOL_Hywel_s1_M_20150214_cym.jpg),cym,,Welsh,,,,United Kingdom,2/14/2015,Public,CC BY-NC 3.0,,,,,,Get a free Welsh lesson with italki: http://promos.italki.com/wikitongues_cym,1 checked out of 1,checked,,Facebook,2017-3-1,https://www.facebook.com/wikitongues/videos/1372678822796641/,1,checked,fvtbdq3WiyU,https://youtu.be/fvtbdq3WiyU,"508,000 in United Kingdom (1991 census), decreasing. Population total all countries: 536,890. 32,700 monolinguals (1971 census).","Indo-European, Celtic, Insular, Brythonic",Indo-European,"Welsh,,,,,",,Eurasia,,2014-12-22,, +Sandra_20150526_cym,Sandra__20150526,Daniel_BogreUdell_20130101,5/26/2015,sandra-cym-thumb-raw.png (https://dl.airtable.com/hPgduGmSJKzEhqCnC9XT_sandra-cym-thumb-raw.png),Sandra_s1_F_20150526_cym.jpg (https://dl.airtable.com/kFRKNsmFTNjOqGirR2kt_Sandra_s1_F_20150526_cym.jpg),cym,,Welsh,,,,United Kingdom,5/26/2015,Public,Standard,,,,,,Get a free Welsh lesson with italki: http://promos.italki.com/wikitongues_cym,1 checked out of 1,checked,,,2016-7-6,,1,checked,JUa_phPM77s,https://youtu.be/JUa_phPM77s,"508,000 in United Kingdom (1991 census), decreasing. Population total all countries: 536,890. 32,700 monolinguals (1971 census).","Indo-European, Celtic, Insular, Brythonic",Indo-European,"Welsh,,,,,",,Eurasia,,2014-12-22,, +Alan_20150625_gla,Alan__20150625,Daniel_BogreUdell_20130101,6/25/2015,alan.png (https://dl.airtable.com/CIwy5ZOARPCx4vMaFowp_alan.png),Alan_s1_M_20150625_gla.jpg (https://dl.airtable.com/Z4rpwgJTRuCFKDrh1iMA_Alan_s1_M_20150625_gla.jpg),gla,,"Gaelic, Scottish",Scottish Gaelic,,,United Kingdom,6/25/2015,Public,Standard,,,,,,,1 checked out of 1,,,,,,1,checked,buK4KwQ2QcE,https://youtu.be/buK4KwQ2QcE,"58,700 in United Kingdom (2001 census). Population total all countries: 63,130.","Indo-European, Celtic, Insular, Goidelic",Indo-European,"Scottish Gaelic,,,,,",,Eurasia,,2014-12-22,, +Nigel_20150630_cym,Nigel__20150630,Daniel_BogreUdell_20130101,6/30/2015,nigel-cym-thumb-raw.png (https://dl.airtable.com/d5H8xiuwTqaTOuYTEUbq_nigel-cym-thumb-raw.png),Nigel_s1_M_20150630_cym.jpg (https://dl.airtable.com/laaSTL0WQyysemSC3U5D_Nigel_s1_M_20150630_cym.jpg),cym,,Welsh,,,,United Kingdom,6/30/2015,Public,CC BY-NC 3.0,,,,,,Get a free Welsh lesson with italki: http://promos.italki.com/wikitongues_cym,1 checked out of 1,checked,,,,,1,checked,fQOCFYGadcQ,https://youtu.be/fQOCFYGadcQ,"508,000 in United Kingdom (1991 census), decreasing. Population total all countries: 536,890. 32,700 monolinguals (1971 census).","Indo-European, Celtic, Insular, Brythonic",Indo-European,"Welsh,,,,,",,Eurasia,,2014-12-22,, +Ciaran_20151222_eng,Ciaran__20151222,Daniel_BogreUdell_20130101,12/22/2015,Screen Shot 2016-04-05 at 17.20.54.png (https://dl.airtable.com/dVqIDAB2TiWBEEvRRVDM_Screen%20Shot%202016-04-05%20at%2017.20.54.png),Ciaran speaking English.jpg (https://dl.airtable.com/A1q4K4HATEepV4xOk9lR_Ciaran%20speaking%20English.jpg),eng,,English,,,,United Kingdom,3/19/2016,Public,Standard,,,,,,Get a free English lesson with italki: http://promos.italki.com/wikitongues_eng,1 checked out of 1,,24,,,,1,checked,DIrFYr6WQi4,https://youtu.be/DIrFYr6WQi4,"55,600,000 in United Kingdom (ELDIA 2012). Population total all countries: 335,148,868. L2 users: 1,500,000 in United Kingdom (Crystal 2003). L2 users worldwide: 505,000,000.","Indo-European, Germanic, West, English",Indo-European,§,,"Eurasia, Eurasia",,2014-12-22,, +John_20140729_eng,John__20140729,Daniel_BogreUdell_20130101,7/29/2014,john-engsco-thumb-raw.png (https://dl.airtable.com/4ZbRlCGuTUSOC4ctR1yb_john-engsco-thumb-raw.png),John_s1_M_20140729_eng.jpg (https://dl.airtable.com/VJnkuR1LTyelZOQNjPqh_John_s1_M_20140729_eng.jpg),eng,,English,,,,United Kingdom,4/5/2016,Public,Standard,,,,,,Get a free English lesson with italki: http://promos.italki.com/wikitongues_eng,1 checked out of 1,,31,,,,1,checked,LmS0eUGBIrE,https://youtu.be/LmS0eUGBIrE,"55,600,000 in United Kingdom (ELDIA 2012). Population total all countries: 335,148,868. L2 users: 1,500,000 in United Kingdom (Crystal 2003). L2 users worldwide: 505,000,000.","Indo-European, Germanic, West, English",Indo-European,§,,"Eurasia, Eurasia",,2014-12-22,, +Marty_20151212_cor,Marty__20151212,Daniel_BogreUdell_20130101,12/12/2015,Marty_s1_M_20151212_cor.png (https://dl.airtable.com/mjniKQqeRqyAzE0ZQOjj_Marty_s1_M_20151212_cor.png),Marty_s1_M_20151212_cor.jpg (https://dl.airtable.com/w7nIMQSUi6LnP2m5eQug_Marty_s1_M_20151212_cor.jpg),cor,,Cornish,,,,United Kingdom,7/11/2016,Public,Standard,,,,,,,1 checked out of 1,,42,,,,1,,UyldsoCWcSE,https://youtu.be/UyldsoCWcSE,"No known L1 speakers, but emerging L2 speakers. Ethnic population: 532,000 (2011 census). L2 users: A few L2 speakers in Canada, Australia, Austria, and Brittany (France).","Indo-European, Celtic, Insular, Brythonic",Indo-European,§,,Eurasia,,2014-12-22,, +Jennifer_20151224_eng,Jennifer__20151224,Daniel_BogreUdell_20130101,12/24/2015,Jennifer_s1_F_20151224_eng.jpg (https://dl.airtable.com/3BgSGITFQpiGamEBgquA_Jennifer_s1_F_20151224_eng.jpg),Jennifer_s1_F_20151224_eng.jpg (https://dl.airtable.com/udEKNe48QqKtaGyVbRVZ_Jennifer_s1_F_20151224_eng.jpg),eng,,English,,,,United Kingdom,7/13/2016,Public,Standard,,,,,,Get a free English lesson with italki: http://promos.italki.com/wikitongues_eng,1 checked out of 1,,43,,,,1,,oxs3msgKZ_I,https://youtu.be/oxs3msgKZ_I,"55,600,000 in United Kingdom (ELDIA 2012). Population total all countries: 335,148,868. L2 users: 1,500,000 in United Kingdom (Crystal 2003). L2 users worldwide: 505,000,000.","Indo-European, Germanic, West, English",Indo-European,§,,"Eurasia, Eurasia",,2014-12-22,, +Jessica_20151219_spa+swe+eng,Jessica__20151219,Daniel_BogreUdell_20130101,12/19/2015,jessica-swespa-thumb-raw.png (https://dl.airtable.com/R4n3LT7iSfuxh2X5WYJb_jessica-swespa-thumb-raw.png),Jessica_s3_F_20151219_spa+swe+eng.jpg (https://dl.airtable.com/oz3lAvMcRQzvuX35OUGJ_Jessica_s3_F_20151219_spa%2Bswe%2Beng.jpg),"spa,swe,eng",,"Spanish, Swedish, English",,,,United Kingdom,9/27/2016,Public,Standard,,,,,,"Get a free Spanish lesson with italki: http://promos.italki.com/wikitongues_spa, Get a free Swedish lesson with italki: http://promos.italki.com/wikitongues_swe, Get a free English lesson with italki: http://promos.italki.com/wikitongues_eng",3 checked out of 3,,54,,,,3,,qSTFLIgHQ5A,https://youtu.be/qSTFLIgHQ5A,"38,400,000 in Spain (ELDIA 2012). Population total all countries: 414,170,030. L2 users: 7,490,000 in Spain (ELDIA 2006)., 8,840,000 in Sweden (ELDIA 2012). 5,000 speakers of Gutniska (1998 S. Håkansson), and 30,000 of Jamska. Population total all countries: 9,197,090., 55,600,000 in United Kingdom (ELDIA 2012). Population total all countries: 335,148,868. L2 users: 1,500,000 in United Kingdom (Crystal 2003). L2 users worldwide: 505,000,000.","Indo-European, Italic, Romance, Italo-Western, Western, Gallo-Iberian, Ibero-Romance, West Iberian, Castilian, Indo-European, Germanic, North, East Scandinavian, Danish-Swedish, Swedish, Indo-European, Germanic, West, English",Indo-European,§,,"Eurasia, Eurasia, Eurasia, Eurasia, Eurasia",,2014-12-22,, +Dora_20151217_eng,Dora__20151217,Daniel_BogreUdell_20130101,12/17/2015,dora-eng-thumb-raw.png (https://dl.airtable.com/k2USRy0SLqb3CleffDgH_dora-eng-thumb-raw.png),Lena_s1_F_20140729_dan.jpg (https://dl.airtable.com/Pf0G4FF1TTOXsNvk3r1V_Lena_s1_F_20140729_dan.jpg),eng,,English,,,,United Kingdom,3/30/2017,Public,Standard,,,,,,Get a free English lesson with italki: http://promos.italki.com/wikitongues_eng,1 checked out of 1,,89,,,,1,,SVu7sUmEJgY,https://youtu.be/SVu7sUmEJgY,"55,600,000 in United Kingdom (ELDIA 2012). Population total all countries: 335,148,868. L2 users: 1,500,000 in United Kingdom (Crystal 2003). L2 users worldwide: 505,000,000.","Indo-European, Germanic, West, English",Indo-European,§,,"Eurasia, Eurasia",,2014-12-22,, +Liam_20151226_eng,Liam__20151226,Daniel_BogreUdell_20130101,12/26/2015,liam-eng-thumb-raw.png (https://dl.airtable.com/buBOIcRLmrPiSW0tUeag_liam-eng-thumb-raw.png),Liam_s1_M_20151226_eng.png (https://dl.airtable.com/OwFftW5dSWuYo4CBgOP3_Liam_s1_M_20151226_eng.png),eng,eng,English,,,,United Kingdom,6/17/2017,Public,Standard,,,,,,Get a free English lesson with italki: http://promos.italki.com/wikitongues_eng,1 checked out of 1,,59,,,,1,,X1me0E0OGqU,https://youtu.be/X1me0E0OGqU,"55,600,000 in United Kingdom (ELDIA 2012). Population total all countries: 335,148,868. L2 users: 1,500,000 in United Kingdom (Crystal 2003). L2 users worldwide: 505,000,000.","Indo-European, Germanic, West, English",Indo-European,English,"This video was recorded by Daniel Bogre Udell in Edinburgh, Scotland where he and Liam met. English is spoken by over 800 million people, primarily in the United Kingdom and its former colonies, and as a foreign language by people around the world. It is one of the world's most internationally recognized languages, being an official language of the United Nations, as well as the European, African, and South American Unions. A literary language since the sixteenth century when it emerged in its modern form, English is one of the most widely used languages in popular media today. It is also woven into the syntax of many programming languages around the world. ","Eurasia, Eurasia",,2014-12-22,, +Suzy_20140729_eng,Suzy__20140729,Daniel_BogreUdell_20130101,7/29/2014,Screen Shot 2017-11-05 at 4.47.58 PM.png (https://dl.airtable.com/h8HnlRTSTHiWDVOgyAeW_Screen%20Shot%202017-11-05%20at%204.47.58%20PM.png),Suzy_20140729_eng.png (https://dl.airtable.com/grcD932kSGKWNQGhgeCQ_Suzy_20140729_eng.png),eng,,English,,,,United Kingdom,11/30/2017,Public,Standard,,,,,,Get a free English lesson with italki: http://promos.italki.com/wikitongues_eng,1 checked out of 1,,76,,,,1,,,No ID,"55,600,000 in United Kingdom (ELDIA 2012). Population total all countries: 335,148,868. L2 users: 1,500,000 in United Kingdom (Crystal 2003). L2 users worldwide: 505,000,000.","Indo-European, Germanic, West, English",Indo-European,§,"This video was recorded by Daniel Bogre Udell at the National Library of Scotland in Edinburgh, where Suzy is an archival curator. English is spoken by over 800 million people, primarily in the United Kingdom and its former colonies, and as a foreign language by people around the world. A literary language since the sixteenth century CE when it emerged in its modern form, English is one of the most widely used languages in popular media today. It is also woven into the syntax of many programming languages around the world.","Eurasia, Eurasia",,2014-12-22,, +Adrien_20160902_cbk+spa,Adrien__20160902,Adrien__20160902,9/2/2016,Adrien_s2_M_20160902_cbk+spa.png (https://dl.airtable.com/xVaFttqSheKsI9UWaxC4_Adrien_s2_M_20160902_cbk%2Bspa.png),Adrien_s2_M_20160902_cbk+spa.jpg (https://dl.airtable.com/ACI2PsZrSFq1uk1iNw2i_Adrien_s2_M_20160902_cbk%2Bspa.jpg),"cbk,spa",,"Chavacano, Spanish",,,,United Kingdom,12/7/2016,Public,CC BY-NC 3.0,checked,,,,,Get a free Spanish lesson with italki: http://promos.italki.com/wikitongues_spa,2 checked out of 2,,,,,,2,,wGVjEJfE2e8,https://youtu.be/wGVjEJfE2e8,"1,200,000 (Quilis 1996). 155,000 Zamboangueño (Holm 1989); 359,000 Zamboangueño (Rubino 2008); 27,800 Caviteño; 3,750 Ternateño (1975 census); 5,470 Cotabato Chavacano (Wurm and Hattori 1981)., 38,400,000 in Spain (ELDIA 2012). Population total all countries: 414,170,030. L2 users: 7,490,000 in Spain (ELDIA 2006).","Spanish Creole, Indo-European, Italic, Romance, Italo-Western, Western, Gallo-Iberian, Ibero-Romance, West Iberian, Castilian",Spanish Creole,§,,"Eurasia, Eurasia, Eurasia",,2016-9-13,, +Àdhamh_20140829_gla,Àdhamh_ÓBroin_20140829,Àdhamh_ÓBroin_20140829,8/29/2014,Adhamh_s1_M_20140829_gla.png (https://dl.airtable.com/oUjwYx6lSim8titunzb8_Adhamh_s1_M_20140829_gla.png),Adhamh_s1_M_20140829_gla.jpg (https://dl.airtable.com/2q4uElEYRYOuSSW66VSF_Adhamh_s1_M_20140829_gla.jpg),gla,,"Gaelic, Scottish",,,,United Kingdom,9/9/2014,Public,Standard,,,,," + +",,1 checked out of 1,,,,,,1,checked,hwQbxuwXGhc,https://youtu.be/hwQbxuwXGhc,"58,700 in United Kingdom (2001 census). Population total all countries: 63,130.","Indo-European, Celtic, Insular, Goidelic",Indo-European,"Scottish Gaelic,,,,,",,Eurasia,,2014-12-22,, +Roanne_20151020_eng,Roanne__20151020,Yuliya_Manyakina_,10/20/2015,roanne-croeng-thumb-raw.png (https://dl.airtable.com/MCzX0oCRdmE00Un7OQzg_roanne-croeng-thumb-raw.png),,eng,,English,,,,United States,,To Upload,Standard,,,,,,Get a free English lesson with italki: http://promos.italki.com/wikitongues_eng,1 checked out of 1,,66,,,,1,,,No ID,"55,600,000 in United Kingdom (ELDIA 2012). Population total all countries: 335,148,868. L2 users: 1,500,000 in United Kingdom (Crystal 2003). L2 users worldwide: 505,000,000.","Indo-European, Germanic, West, English",Indo-European,§,,"Eurasia, Eurasia",,2015-10-20,, +Junior_20150810_lkt,Junior_Garcia_20150810,Yuliya_Manyakina_,8/10/2015,junior-lkt-thumb-raw.png (https://dl.airtable.com/2iEqVYOnSumQY1ScM6P1_junior-lkt-thumb-raw.png),Junior_s1_M_20150810_lkt.jpg (https://dl.airtable.com/6T0mPp5lTqKxLMVn5UmJ_Junior_s1_M_20150810_lkt.jpg),lkt,,Lakota,,,,United States,8/10/2015,Public,Standard,,,,,,,1 checked out of 1,,,,,,1,checked,SrLPH5590RU,https://youtu.be/SrLPH5590RU,"6,000 in United States (1997 R. Pustet), decreasing. 25,000 L1 speakers of all Sioux dialects in a total population of 103,000 (Golla 2007). Population total all countries: 6,190. Ethnic population: 20,000 (1997 R. Pustet). 103,255 ethnic Sioux in the United States (1990 census).","Siouan-Catawban, Siouan, Mississippi Valley-Ohio Valley Siouan, Mississippi Valley Siouan, Dakota",Siouan-Catawban,"Lakota,,,,,",,Americas,,2015-8-9,, +Roanne_20151020_cro,Roanne__20151020,Yuliya_Manyakina_,10/20/2015,roanne-croeng-thumb-raw.png (https://dl.airtable.com/vnsajtgRTzmigrdqDou9_roanne-croeng-thumb-raw.png),Roanne_s1_F_20151020_cro.jpg (https://dl.airtable.com/K5ngSuWNS1aVaYPdAStl_Roanne_s1_F_20151020_cro.jpg),cro,,Crow,,,,United States,1/30/2016,Public,Standard,,,,,,,1 checked out of 1,,4,,,,1,checked,DGnbG3OhC5E,https://youtu.be/DGnbG3OhC5E,"3,000 (Golla 2007), decreasing. Ethnic population: 8,500 (Golla 2007).","Siouan-Catawban, Siouan, Missouri River Siouan",Siouan-Catawban,§,,Americas,,2015-10-20,, +Tylis_20151020_cro,Tylis__20151020,Yuliya_Manyakina_,10/20/2015,tylis-cro-thumb-raw.png (https://dl.airtable.com/FPwQEXoCRzycpSmjDK3I_tylis-cro-thumb-raw.png),Tylis_s1_M_20151020_cro.png (https://dl.airtable.com/5RQouAOSFSO1BOA0DScQ_Tylis_s1_M_20151020_cro.png),cro,,Crow,,,,United States,6/22/2017,Public,Standard,,,,,,,1 checked out of 1,,80,,,,1,,xHQKFgYEw3w,https://youtu.be/xHQKFgYEw3w,"3,000 (Golla 2007), decreasing. Ethnic population: 8,500 (Golla 2007).","Siouan-Catawban, Siouan, Missouri River Siouan",Siouan-Catawban,Crow,"This video was recorded by Yuliya Manyakina at the Crow Summer Institute in 2015. Crow, known natively as Apsáalooke, is spoken by over 4,000 people, principally in the Crow Nation territory of southeastern Montana, USA. A Siouan language, it is closely related to Hidatsa, and more distantly so to Lakota, Omaha, and others. Like most North American language communities, Crow speakers were subject to government persecution in the 19th and 20th centuries, when the United States and Canada sought to eliminate non-European languages from the continent. Though the community continues to face significant challenges to language preservation today, a lively revival movement has emerged.",Americas,,2015-10-20,, +Youssef_20170731_arz,Youssef_Madkour_20170731,Youssef_Madkour_20170731,7/31/2017,Screen Shot 2017-08-03 at 12.59.16 PM.png (https://dl.airtable.com/eyO0RBqJTRe0D6RTvmog_Screen%20Shot%202017-08-03%20at%2012.59.16%20PM.png),Youssef_20170731_arz.png (https://dl.airtable.com/1pdQ8geTwyW2QzySeMxg_Youssef_20170731_arz.png),arz,,"Arabic, Egyptian Spoken",,,,United States,8/29/2017,Public,CC BY-NC 3.0,,,,"Hello everyone! My name is Youssef. I am from the City of Alexandria, in Egypt, but I live abroad. The city of Alexandria is a beautiful city of the coast of the Mediterranean Sea. The thing I love doing the most when I’m in Alexandria, is to walk on the Corniche (Esplanade) while eating a cold gelati (ice-cream). At the moment I am studying Marine and River Science and how we can keep these environments clean from pollution. Also I am learning how we can protect the fishes and other organisms living in Marine and Riverine environments. We do this by taking water samples and then analyzing them in the lab to find out what are the reasons for pollution in the water. I am happy to have met you all today, till next time, goodbye!",Recorded in New York,,1 checked out of 1,,,,,,1,,enXPLO5kT3U,https://youtu.be/enXPLO5kT3U,"52,500,000 in Egypt (2006). Population total all countries: 53,990,000.","Afro-Asiatic, Semitic, Central, South, Arabic",,,"This video was submitted by Youssef Madkour in New York City, USA, where he lives. Egyptian Arabic, also known as Maṣri or simply Egyptian, is spoken by as many as 65 million people, primarily in the North African nation of Egypt, and by diaspora communities around the world. A Semitic language like Hebrew and Amharic, Egyptian emerged at the convergence of the Greek and Coptic (Ancient Egyptian) languages with Classical Arabic, which arrived following the Islamic conquest of Egypt in the 7th century. Though it is chiefly a vernacular language, Egyptian is one of the few colloquial Arabic varieties to enjoy a lively media culture, featuring in theater, popular literature, and news outlets.",Africa,,2017-7-31,New York_US, +Yan_20150221_nch,Yan__20150221,Yan__20150221,2/21/2015,yan-nch-thumb-raw.png (https://dl.airtable.com/iuj6TO8NRz6seNycPx2h_yan-nch-thumb-raw.png),Yan_s1_M_20150221_nch.jpg (https://dl.airtable.com/YVsep4WNR5Ch5zKnrh4v_Yan_s1_M_20150221_nch.jpg),nch,,"Nahuatl, Central Huasteca",Huasteca Nahuatl,,Unknown Variant,United States,2/26/2015,Public,CC BY-NC 3.0,,,,,"imld15. Video from Montclair, CA. +",,1 checked out of 1,,,,,,1,checked,8IvBOcstwCU,https://youtu.be/8IvBOcstwCU,"200,000 (2000 census).","Uto-Aztecan, Southern Uto-Aztecan, Corachol-Aztecan, Core Nahua, Nahuatl",Uto-Aztecan,"Huasteca Nahuatl,,,,,",,Americas,,2015-2-21,, +Wayne_20170825_bre,Wayne_Mockerman_20170825,Wayne_Mockerman_20170825,8/25/2017,Wayne_20170825_bre.png (https://dl.airtable.com/SPsIYjZ2Qqi7UiPzdEg8_Wayne_20170825_bre.png),Wayne_20170825_bre.png (https://dl.airtable.com/DyYAo2ZZSsutNFrCN5OO_Wayne_20170825_bre.png),bre,,Breton,,,,United States,10/13/2017,Public,CC BY-SA 4.0,checked,,,,"Colorado Springs, Colorado + +I'm originally from Michigan but I lived in Brittany for six years where I studied the language. +\",,1 checked out of 1,,,,,,1,,30d4TyH_9Ts,https://youtu.be/30d4TyH_9Ts,"206,000 (2013 R. Milin), decreasing.","Indo-European, Celtic, Insular, Brythonic",,,"This video was submitted by Wayne Mockerman from Colorado Springs, USA, where he lives and works. Breton is spoken by as many as 210,000 people, primarily in the Brittany and Île-de-France regions of northern France. A Celtic language of the Indo-European language family, Breton shares its roots with the non-Germanic languages of the British Isles, in particular Cornish and Welsh. Due in large part to persecution by the central government of France, Breton speakers began abandoning their language over the course of the 20th century and, as a result, the fluent population had declined by 80% by the year 2000. Nevertheless, a lively revitalization movement has emerged over the past two decades, with the number of children in bilingual education rapidly increasing. Wayne learned the language while he was studying in Brittany.",Eurasia,,2017-9-2,Colorado_US, +David_20180203_apc,David_SammerArnouk_20180203,Tushar_Rakheja_20171228,2/3/2018,Screen Shot 2018-03-13 at 10.22.49 PM.png (https://dl.airtable.com/6E1xr0aqSJycg1eHYe6M_Screen%20Shot%202018-03-13%20at%2010.22.49%20PM.png),,apc,eng,"Arabic, North Levantine Spoken",Syrian Arabic,,Classification,United States,3/1/2018,To Upload,CC BY-SA 4.0,checked,,,,"Depending on where David's family is from, this could be Levantine or Mesopotamian Arabic",,1 checked out of 1,,,,,,1,,CDeE2dZyb0M,https://youtu.be/CDeE2dZyb0M,"8,800,000 in Syria (1991). Population total all countries: 14,426,540.","Afro-Asiatic, Semitic, Central, South, Arabic",,,"This video was recorded by Tushar Rakheja in Dallas, USA, where he and David live. Syrian Arabic is spoken by as many as 20 million people, primarily in the Levantine nation of Syria, and by diaspora communities worldwide. It is a variety of Levantine Arabic, which encompasses Arabic varieties spoken across parts of Syria, as well as Lebanon, Jordan, Palestine, and Israel. In Syria’s east, ‘Syrian Arabic’ may also refer to Mesopotamian Arabic, the most widely spoken language in Iraq. In both cases, these spoken varieties differ substantially from Modern Standard Arabic, which is more commonly used in literature and modern media. This duality between formal and colloquial language is often described by linguists ‘diglossia’.","Eurasia, Eurasia",,2018-2-3,Texas_US,https://www.dropbox.com/sh/anj5b4bj873c3r9/AABolRn3RNt6c05M1XzULnzqa?dl=0 +Daniel_20180207_pes,Daniel_Salemzadeh_20180207,Tushar_Rakheja_20171228,2/7/2018,,,pes,eng,"Persian, Iranian",Farsi,,,United States,,To Upload,CC BY-SA 4.0,checked,,,,,,1 checked out of 1,,,,,,1,,,No ID,"45,000,000 in Iran (2011), increasing. 800,000 Eastern Farsi in Khorasan speak dialects which are transitional with Iranian Persian. Population total all countries: 47,045,100.","Indo-European, Indo-Iranian, Iranian, Western, Southwestern, Persian",,,,Eurasia,,2018-2-7,,https://www.dropbox.com/sh/7v011ft71y5rxez/AAAgQIjdnHc7qpU-v_-f___Ha?dl=0 +Sarita_20171228_swv,Sarita_Rakheja_20171228,Tushar_Rakheja_20171228,12/28/2017,,,swv,,Shekhawati,,,,United States,,To Upload,CC BY-SA 4.0,checked,,I've added the transcript as part of the closed captions. ,I've added the English translation as part of the closed captions (in parentheses).,"""You guys are doing a great job, and I believe in your mission. I'm trying to get my mom and dad to help me promote, archive and document their languages. + +I hope people get to hear my mom's mothertongue, Shekhawati, which is a Rajasthani language, and find it pleasant and/or interesting! "". + +My parents' apartment in Columbia, SC (my mom is the interviewee)",,1 checked out of 1,,,,,,1,,,No ID,"3,000,000 (2002 L. Gusain).","Indo-European, Indo-Iranian, Indo-Aryan, Central zone, Rajasthani, Marwari",,,,Eurasia,,2018-1-5,South Carolina_US, +Titus_20151026_lat,Titus__20151026,Titus__20151026,10/26/2015,"Screen Shot 2017-05-11 at 19.45.51.png (https://dl.airtable.com/F6RuNh93RMnH4yyyKQVk_Screen%20Shot%202017-05-11%20at%2019.45.51.png),Screen Shot 2017-05-11 at 19.45.49.png (https://dl.airtable.com/pOkn9KZqQ3yuFQLiRI9F_Screen%20Shot%202017-05-11%20at%2019.45.49.png),Screen Shot 2017-05-11 at 19.45.54 1.png (https://dl.airtable.com/MTUhHbWrRB2QWK5PsDgA_Screen%20Shot%202017-05-11%20at%2019.45.54%201.png)",titus-lat-thumb.jpg (https://dl.airtable.com/jMLUz5MNRKWZCXsaQ5K0_titus-lat-thumb.jpg),lat,,Latin,,,,United States,10/30/2015,Public,CC BY-NC 3.0,checked,checked,"Salvete omnes! Me vocant Titum. Quomodo vos habetis? Bene me habeo. Venio ex Aurora in Colorato. Americanus sum. Schola mea est Denverii. Viginti annos natus sum. Sermo patrius est lingua hispania. In ūniversitāte, multas philosophias studeo pro munere. Se esse ridiculas scio. Discipulos mathematicae doceo quoque. Mihi placet legere de philosophia et stoica disciplina. Mathmatica calculi mihi placet. Linguam Latinam amo. Lingua Latina est lingua poetarum et philosophorum regumque. Liberum qui linguas alias intellegit saepe video. Liberum plures discere linguam latinam spero. Cicero dicit: “Non enim tam praeclarum est scire Latine quam turpe nescire.” Hoc esse verum credo. Artem animandi pro lingua latina facio. Exemplum est ""Globus Draconis"". Translato est ""Dragonball"" Lingua Latina pulchra et elegans est. Lingua Latina non mortua est. Non sum mors certe. Linguae Romanicae sicut propter linguam latinam exsistunt. Lingua Latina multa verba simillima linguis romanicis habet. Multi libri in lingua latina sunt. Exempla Multa sunt. Por exemplis: Winnie ille Pu, Commentari De Inepto Puero, Alicia in Terra Mirebili et Cattus Petasatus. Volo commedere glaciem lactis. Quota hora est? Sexta hora est. Gratias tibi ago! Valete!",,,,1 checked out of 1,,,,2016-7-16,,1,checked,qH9Qp747MTA,https://youtu.be/qH9Qp747MTA,,"Indo-European, Italic, Latino-Faliscan",Indo-European,"Latin,,,,,",,Eurasia,,2015-10-20,, +Suri_20161110_yid,Suri__20161110,Timothy_McKeon_,11/10/2016,Suri_s1_F_20161110_yid.png (https://dl.airtable.com/sTSO4wvBTBuDPFIy1n6x_Suri_s1_F_20161110_yid.png),Suri_s1_F_20161110_yid.jpg (https://dl.airtable.com/dluXU9VURCM3awTp46oA_Suri_s1_F_20161110_yid.jpg),yid,,Yiddish,,,,United States,12/8/2016,Public,CC BY-NC 3.0,,,,,,,1 checked out of 1,,,,,,1,,1w_SXQUCfsw,https://youtu.be/1w_SXQUCfsw,"Population total all languages: 1,510,430.",,,§,,Eurasia,,2016-11-14,, +Sunny_20130218_nan,Sunny__20130218,Sunny__20130218,2/18/2013,sunny.png (https://dl.airtable.com/04QKeSSvS4GOgBom8dym_sunny.png),Sunny_s1_M_20130218_nan.jpg (https://dl.airtable.com/yQJcqiFMQaOMb2RrOVs2_Sunny_s1_M_20130218_nan.jpg),nan,,"Chinese, Min Nan",Taiwanese Min Nan,,,United States,2/18/2013,Public,Standard,,,,,,,1 checked out of 1,,,,2016-7-4,,1,checked,--DnU743JLU,https://youtu.be/--DnU743JLU,"25,700,000 in China (Johnstone and Mandryk 2001). Population total all countries: 46,619,500.","Sino-Tibetan, Chinese",Sino-Tibetan,"Taiwanese Min Nan,,,,,",,Eurasia,,2014-12-22,, +Stefan_20170331_ron,Stefan_Moldoveanu_20170331,Stefan_Moldoveanu_20170331,3/31/2017,Screen Shot 2017-04-10 at 1.56.20 PM.png (https://dl.airtable.com/BDxt6HwnTpmppVTAKQNi_Screen%20Shot%202017-04-10%20at%201.56.20%20PM.png),Stefan_s1_M_20170331_ron.jpg (https://dl.airtable.com/WWAKMnkYRLyKTTZQSg2k_Stefan_s1_M_20170331_ron.jpg),ron,,Romanian,,"Virginia, USA",,United States,5/6/2017,Removed,CC BY-SA 4.0,checked,,"Romanian poem ""Talharul Pedepsit"" by Tudor Arghezi",About a mouse that overconfidently tries to rob a beehive only to be completely overwhelmed and locked into a wax casket.,Let him know when video scheduled,Get a free Romanian lesson with italki: http://promos.italki.com/wikitongues_ron,1 checked out of 1,,,,,,1,,,No ID,"19,900,000 in Romania (ELDIA 2012). Population total all countries: 23,782,990.","Indo-European, Italic, Romance, Eastern",Indo-European,§,,Eurasia,,2017-4-6,, +Richard_20170421_wya,Richard_Zane-Smith_20170421,Richard_Zane-Smith_20170421,4/21/2017,Screen Shot 2017-05-02 at 14.41.56.png (https://dl.airtable.com/joCIr7AQXmGVY3KlQj0H_Screen%20Shot%202017-05-02%20at%2014.41.56.png),Richard_s1_M_20170421_wya.jpg (https://dl.airtable.com/2vQXK0clSDKw4wKjGEOD_Richard_s1_M_20170421_wya.jpg),wya,,Wyandot,Waⁿdat ,"Kansas +",,United States,5/2/2017,Public,CC BY-SA 4.0,checked,,,,,,1 checked out of 1,,,,,,1,,VV0bmwKLHX0,https://youtu.be/VV0bmwKLHX0,"No known L1 speakers in United States. Last speaker died about 1960 (Golla 2007). Ethnic population: 3,600 (Golla 2007).","Iroquoian, Northern Iroquoian, Five Nations-Huronian-Susquehannock, Huronian, Huron-Petun",Iroquoian,§Waⁿdat ,,Americas,,2017-4-21,, +James_20171103_nus,James_Puotyal_20171103,Richard_Benton_,11/3/2017,James_20171103_nus.png (https://dl.airtable.com/U6gLuCGUSl60dbx3omW1_James_20171103_nus.png),,nus,,Nuer,Nur,,,United States,1/29/2018,Public,CC BY-SA 4.0,checked,,,,,,1 checked out of 1,,,,,,1,,uPa84Ro8SrU,https://youtu.be/uPa84Ro8SrU,"740,000 in South Sudan (1982). 2,940 Western Jikany, 12,500 Lou, 1,100 Nyuong, 2,500 Thiang, 5,900 Bul, 2,400 Jagai, 6,700 Laak, 4,900 Leik, 1,600 Door, 17,600 Eastern Jikany (Voegelin and Voegelin 1977). Population total all countries: 891,000.","Nilo-Saharan, Eastern Sudanic, Nilotic, Western, Dinka-Nuer, Nuer",,,"This video was recorded by Richard Benton in Minneapolis, USA, where he and James, a pastor, met. Nur, also written as Nuer, is spoken by as many as 900,000 people, primarily in the Central African nations of Ethiopia, in particular the Gambela region, and South Sudan. Along with the Dinka language, it is one of Central-Eastern Africa’s most widely spoken mother tongues. It is written with a variety of the Latin alphabet, and is dialectically diverse, with at least 15 distinct varieties. A Nilo-Saharan language, Nur is perhaps most similar to the Jieng variety of Dinka and the Shilluk language of South and North Sudan, also known as Chollo. ",Africa,,2017-11-3,Minnesota_US, +Peter_20150705_por+spa+ita+eng,Peter__20150705,Peter__20150705,7/5/2015,peter-porspaitaeng-thumb-raw.png (https://dl.airtable.com/bx45dRPSJKFrnOA0IDAs_peter-porspaitaeng-thumb-raw.png),Peter_s4_M_20150705_por+eng+spa+ita.jpg (https://dl.airtable.com/VVnTAhfSEWPin8zwzsBN_Peter_s4_M_20150705_por%2Beng%2Bspa%2Bita.jpg),"por,spa,ita,eng",,"Portuguese, Spanish, Italian, English",,,,United States,8/8/2015,Public,CC BY-NC 3.0,checked,,,,"Video from West Chester, Pennsylvania + +""Here's a video of me speaking about my experiences with these languages and how dyslexia inspired me to learn more about them! If I am not chosen please email me.""","Get a free Portuguese lesson with italki: http://promos.italki.com/wikitongues_por, Get a free Spanish lesson with italki: http://promos.italki.com/wikitongues_spa, Get a free Italian lesson with italki: http://promos.italki.com/wikitongues_ita, Get a free English lesson with italki: http://promos.italki.com/wikitongues_eng",4 checked out of 4,checked,,,,,4,checked,Q6ici_SMBvM,https://youtu.be/Q6ici_SMBvM,"10,000,000 in Portugal (ELDIA 2012). Population total all countries: 203,349,200., 38,400,000 in Spain (ELDIA 2012). Population total all countries: 414,170,030. L2 users: 7,490,000 in Spain (ELDIA 2006)., 57,700,000 in Italy (ELDIA 2012). Population total all countries: 63,655,047., 55,600,000 in United Kingdom (ELDIA 2012). Population total all countries: 335,148,868. L2 users: 1,500,000 in United Kingdom (Crystal 2003). L2 users worldwide: 505,000,000.","Indo-European, Italic, Romance, Italo-Western, Western, Gallo-Iberian, Ibero-Romance, West Iberian, Portuguese-Galician, Indo-European, Italic, Romance, Italo-Western, Western, Gallo-Iberian, Ibero-Romance, West Iberian, Castilian, Indo-European, Italic, Romance, Italo-Western, Italo-Dalmatian, Indo-European, Germanic, West, English",Indo-European,"Portuguese,Spanish,Italian,English,,",,"Eurasia, Eurasia, Eurasia, Eurasia, Eurasia, Eurasia, Eurasia, Eurasia",,2015-7-6,, +Donna+Elizabeth_20171211_tun+eng,"Donna_Pierite_20171211,Elizabeth_Pierite-Mora_20171211",Nick_Panzarella_,12/11/2017,,,"tun,eng",,"Tunica, English",Louisiana French,,,United States,,To Upload,CC BY-NC 3.0,checked,,,,"Marksville, Louisiana",Get a free English lesson with italki: http://promos.italki.com/wikitongues_eng,2 checked out of 2,,,,,,2,,,No ID,"No known L1 speakers (Golla 2007). Became extinct after 1950 (Golla 2007)., 55,600,000 in United Kingdom (ELDIA 2012). Population total all countries: 335,148,868. L2 users: 1,500,000 in United Kingdom (Crystal 2003). L2 users worldwide: 505,000,000.","Language isolate, Indo-European, Germanic, West, English",,,,"Americas, Eurasia, Eurasia",,2018-1-5,Louisiana_US, +Steven_20171223_scn,Steven_Campo_20171223,Nick_Panzarella_,12/23/2017,,,scn,,Sicilian,,,,United States,,To Upload,CC BY-SA 4.0,checked,checked,"""Binidica a tutti, +Pi fari a ficu 'n un annu è mpurtanti pi scegghiri na rama cu tri +o chiui gemmi daccussì, si vidi. Si tagghia sta rama e ci metti +nterra daccussì e ci metti l'acqua quannu nicissariu. E doppu +tempu chista avi tri simana e chisti hannu tri misi, di nivura e +janca e chista cca un annu. Videmu, si vidi...si vidi comu beddi +tala....va beni ciau a tutti!""","Blessings a everyone, To make a fig tree in a year it is important to chose a branch with three or more buds like this, you see. You cut this branch and put it in dirt like this and water it when necessary. And after time this one is three weeks and these are three months, one black fig and one white fig and this is one year old. Let's us, you see....do you see how beautiful look....alright bye everyone!","Independence, Louisiana; +Steven is a 3rd generation Sicilian American, he's taught himself a lot of the language by practicing with relatives and Facebook groups. He would like to see more Sicilian Americans using the language, because it's rare to find descendants of Sicilian immigrants that know the language.",,1 checked out of 1,,,,,,1,,,No ID,"4,700,000 (2002).","Indo-European, Italic, Romance, Italo-Western, Italo-Dalmatian",,,,Eurasia,,2018-1-5,Louisiana_US, +Alex_20180115_zkk,Alex_Perez_20180115,Nick_Panzarella_,1/15/2018,Alex_20180115_zkk.png (https://dl.airtable.com/DWt0ZTUITAej9GUmU52k_Alex_20180115_zkk.png),,zkk,,Karankawa,,,,United States,1/30/2018,Public,CC BY-NC 3.0,checked,,,,,,1 checked out of 1,,,,,,1,,pUfu40JELyM,https://youtu.be/pUfu40JELyM,"1 known revivalist in California, Alex Perez. He is from Galveston Island, TX, the ancestral home of the Karankawa people. The Karanakawa do not currently have a formal tribal organization, but Alex is studying the language in an effort to revive it and teach it to the next generation of Karankawa.",,,,"This video was recorded by Alex Perez in the U.S. State of California, where he lives and works. His heritage language, Karankawa, is the traditional language of the Karankawa people, an indigenous North American community originating in what is now southern Texas. Following a series of extended conflicts with Spanish settlers, and later, the Mexican and U.S. governments, the Karankawa community was forced to resettle and eventually disbanded. As a result, the language fell into decline: by 1858, no native speakers remained. Today, in the absence of a federally-recognized tribal government, support for linguistic revitalization remains sparse. However, a movement to revive Karankawa has emerged, thanks to the work of cultural descendants like Alex. If you’re a part of this movement and would like to contribute to Wikitongues, you can reach us at hello@wikitongues.org. ",Americas,,2018-1-15,California_US, +Nicholas_20170719_vec,Nicholas_Piloni_20170719,Nicholas_Piloni_20170719,7/19/2017,Screen Shot 2017-08-03 at 1.09.32 PM.png (https://dl.airtable.com/ixHJSzy5RzeOduxDxUpq_Screen%20Shot%202017-08-03%20at%201.09.32%20PM.png),Nicholas_20170719_vec.png (https://dl.airtable.com/IUHNtw0NTKe6CiRIU3wu_Nicholas_20170719_vec.png),vec,,Venetian,Chipileño,"Lives in LA, recorded at Harvard",,United States,8/24/2017,Public,CC BY-SA 4.0,checked,checked,,"Good morning and hello to everyone! My name is Nicholas, but you can call me Nico, or Nicola since I am used to hearing that, and my family has always called me by those names! I am 17 years old, I am currently in Harvard University for a pre-college program for two weeks. I am currently studying a course that has to do with government and politics, but I am also experimenting to see what interests me so when I am 18, and I go off to college for 4 years, I am seeing what I would like to study, so that I don't have to find out later or waste time looking for something else! That is why I am doing that right now! I was born in the state of California, but I am in the state of Massachusetts. I was born in the city of Los Angeles back in California, and that is where my family currently resides, I live with my dad, my brother, my grandparents, my aunt, my two cousins, and my Aunt's boyfriend. I forgot the word for a second, but I remembered it! That is pretty much it for my family, now to talk about the language in which I am speaking! ","This is a language which people speak in Chipilo, Mexico, and the history of this language is that in 1882, a bunch of Venetians came to Mexico. They basically escaped from Italy to Mexico, because there were harsh conditions in Veneto at that time that made them escape or leave. It was mainly due to the Piave river that overflowed and destroyed lots of farms and homes, so they didn't have anywhere else to live or go and went to Mexico, Chipilo. They lived there and inhabited it even till this day! They have helped immensely in conserve and preserve this language that I am speaking to you in, even if I had never went to Mexico before! But the people/Venetians have always throughout Chipilo's history have preserved and conserved this language, the culture, and traditions! It's such a rare thing, because it was conserved for 100+ years in which people are still learning it, and speaking it till this day! It is something that makes me go ""WOW"". Overall, I don't want to waste your time talking here, but in Chipilo there are currently around 4000-5000 inhabitants who speak the language, and maintain the same traditions like the burning of the witch, or the ""Capo de anno"". But people have also started adopting slowly Mexican traditions such as ""Posadas"", and other things. You can see the documentary made on Youtube, just type in Chipilo, and you can see the history and story of Chipilo of which you can hear all of it! Well that sums it up! I have pretty much nothing to say now, I am still in Harvard, and in three days I can go back to California! Well yeah that is it, thank you all for listening to me, and thank you to Wikitongues for this opportunity, have a great day everyone thank you! ",,1 checked out of 1,,,,,,1,,3jpoUySC6sk,https://youtu.be/3jpoUySC6sk,"3,800,000 in Italy (2002). Population total all countries: 3,852,500.","Indo-European, Italic, Romance, Italo-Western, Western, Gallo-Iberian, Gallo-Romance, Gallo-Italian",,,"This video was submitted by Nicholas Piloni from Harvard University in Cambridge, USA, where he was visiting for a pre-college program. Chipileño, also known as Chipilo Venetian, is spoken by some 2,500 people, primarily in the Mexican states of Puebla, Veracruz, and Querétaro. It is a variety of the Venetian language, spoken by the descendants of Italian immigrants who settled in Mexico during the 19th century, founding the city of Chipilo. Unlike many diaspora languages around the world, Chipileño remains largely uninfluenced by the locally dominant language, in this case, Spanish. Although it remains a mostly spoken language, standard orthographies have been proposed. ",Eurasia,,2017-7-19,, +Naveed_20140923_eng+urd+fra,Naveed__20140923,Naveed__20140923,9/23/2014,Screen Shot 2016-07-25 at 5.54.18 PM.png (https://dl.airtable.com/jKm3a6iRtWsQKqSQpL28_Screen%20Shot%202016-07-25%20at%205.54.18%20PM.png),Naveed_s3_M_20140923_eng+urd+fra.jpg (https://dl.airtable.com/CPuTZqQ7SroRcuG3Kqwd_Naveed_s3_M_20140923_eng%2Burd%2Bfra.jpg),"eng,urd,fra",,"English, Urdu, French",,,,United States,10/21/2014,Public,Standard,,,,,,"Get a free English lesson with italki: http://promos.italki.com/wikitongues_eng, Get a free Urdu lesson with italki: http://promos.italki.com/wikitongues_urd, Get a free French lesson with italki: http://promos.italki.com/wikitongues_fra",3 checked out of 3,checked,,,,,3,checked,osuIdwM0urk,https://youtu.be/osuIdwM0urk,"55,600,000 in United Kingdom (ELDIA 2012). Population total all countries: 335,148,868. L2 users: 1,500,000 in United Kingdom (Crystal 2003). L2 users worldwide: 505,000,000., 10,000,000 in Pakistan (1998 census). Population total all countries: 63,948,800. L2 users: 94,000,000 in Pakistan (1999)., 60,000,000 in France (ELDIA 2012). Population total all countries: 74,980,460.","Indo-European, Germanic, West, English, Indo-European, Indo-Iranian, Indo-Aryan, Central zone, Western Hindi, Hindustani, Indo-European, Italic, Romance, Italo-Western, Western, Gallo-Iberian, Gallo-Romance, Gallo-Rhaetian, Oïl, French",Indo-European,"English,Urdu,French,,,",,"Eurasia, Eurasia, Eurasia, Eurasia, Eurasia, Americas, Eurasia, Eurasia",,2014-12-22,, +Muhned_20150221_jbn,Muhned__20150221,Muhned__20150221,2/21/2015,muhned-jbn-thumb-raw.png (https://dl.airtable.com/2eGSrtNYQH25dE0RcjS4_muhned-jbn-thumb-raw.png),Muhned_s1_M_20150221_jbn.jpg (https://dl.airtable.com/KMb96kapTZioHuUaQOfg_Muhned_s1_M_20150221_jbn.jpg),jbn,,Nafusi,Zuwara Berber,,,United States,2/24/2015,Public,CC BY-NC 3.0,,,,,"imld15 - ""a short message to encourage the native speakers to preserve and develop their mother language."" +",,1 checked out of 1,,,Facebook,2016-7-14,https://www.facebook.com/wikitongues/videos/vb.408106989253834/1146582218739637/?type=2&theater,1,checked,-7Ch2p6xPAM,https://youtu.be/-7Ch2p6xPAM,"184,000 in Libya (2006). Population total all countries: 210,000. Preschool children are monolingual in Nafusi.","Afro-Asiatic, Berber, Northern, Zenati, East",Afro-Asiatic,"Zuwara Berber,,,,,",,Africa,,2015-2-21,, +Matt_20160609_apc,Matt_Adler_20160608,Matt_Adler_20160608,6/9/2016,Matt_s1_M_20160609_yid.png (https://dl.airtable.com/12qr2b4RzOD3SsD00k6f_Matt_s1_M_20160609_yid.png),,apc,,"Arabic, North Levantine Spoken",,,,United States,,To Upload,Standard,,,,,,,1 checked out of 1,,,,,,1,,,No ID,"8,800,000 in Syria (1991). Population total all countries: 14,426,540.","Afro-Asiatic, Semitic, Central, South, Arabic",Afro-Asiatic,§,,"Eurasia, Eurasia",,2016-6-10,, +Matt_20160609_cat,Matt_Adler_20160608,Matt_Adler_20160608,6/9/2016,Matt_s1_M_20160609_yid.png (https://dl.airtable.com/12qr2b4RzOD3SsD00k6f_Matt_s1_M_20160609_yid.png),,cat,,Catalan,,,,United States,,To Upload,Standard,,,,,,Get a free Catalan lesson with italki: http://promos.italki.com/wikitongues_cat,1 checked out of 1,,,,,,1,,,No ID,"3,750,000 in Spain (ELDIA 2012). Population total all countries: 4,079,420. L2 users: 5,150,000 in Spain (ELDIA 2012).","Indo-European, Italic, Romance, Italo-Western, Western, Gallo-Iberian, Ibero-Romance, East Iberian",Indo-European,§,,"Eurasia, Eurasia",,2016-6-10,, +Matt_20160608_eng,Matt_Adler_20160608,Matt_Adler_20160608,6/8/2016,Matt_s1_M_20160609_yid.png (https://dl.airtable.com/12qr2b4RzOD3SsD00k6f_Matt_s1_M_20160609_yid.png),,eng,,English,,,,United States,,To Upload,Standard,,,,,,Get a free English lesson with italki: http://promos.italki.com/wikitongues_eng,1 checked out of 1,,,,,,1,,,No ID,"55,600,000 in United Kingdom (ELDIA 2012). Population total all countries: 335,148,868. L2 users: 1,500,000 in United Kingdom (Crystal 2003). L2 users worldwide: 505,000,000.","Indo-European, Germanic, West, English",Indo-European,§,,"Eurasia, Eurasia",,2016-6-9,, +Matt_20160609_fas,Matt_Adler_20160608,Matt_Adler_20160608,6/9/2016,Matt_s1_M_20160609_yid.png (https://dl.airtable.com/12qr2b4RzOD3SsD00k6f_Matt_s1_M_20160609_yid.png),,fas,,Persian,Farsi,,,United States,,To Upload,Standard,,,,,,Get a free Persian lesson with italki: http://promos.italki.com/wikitongues_fas,1 checked out of 1,,,,,,1,,,No ID,"Population total all languages: 56,645,100.",,,§Farsi,,Eurasia,,2016-6-10,, +Matt_20160609_fra,Matt_Adler_20160608,Matt_Adler_20160608,6/9/2016,Matt_s1_M_20160609_yid.png (https://dl.airtable.com/12qr2b4RzOD3SsD00k6f_Matt_s1_M_20160609_yid.png),,fra,,French,,,,United States,,To Upload,Standard,,,,,,Get a free French lesson with italki: http://promos.italki.com/wikitongues_fra,1 checked out of 1,,,,,,1,,,No ID,"60,000,000 in France (ELDIA 2012). Population total all countries: 74,980,460.","Indo-European, Italic, Romance, Italo-Western, Western, Gallo-Iberian, Gallo-Romance, Gallo-Rhaetian, Oïl, French",Indo-European,§,,"Eurasia, Eurasia, Americas, Eurasia, Eurasia",,2016-6-10,, +Matt_20160609_por,Matt_Adler_20160608,Matt_Adler_20160608,6/9/2016,Matt_s1_M_20160609_yid.png (https://dl.airtable.com/12qr2b4RzOD3SsD00k6f_Matt_s1_M_20160609_yid.png),,por,,Portuguese,,,,United States,,To Upload,Standard,,,,,,Get a free Portuguese lesson with italki: http://promos.italki.com/wikitongues_por,1 checked out of 1,,,,,,1,,,No ID,"10,000,000 in Portugal (ELDIA 2012). Population total all countries: 203,349,200.","Indo-European, Italic, Romance, Italo-Western, Western, Gallo-Iberian, Ibero-Romance, West Iberian, Portuguese-Galician",Indo-European,§,,"Eurasia, Eurasia",,2016-6-10,, +Matt_20160609_spa,Matt_Adler_20160608,Matt_Adler_20160608,6/9/2016,Matt_s1_M_20160609_yid.png (https://dl.airtable.com/12qr2b4RzOD3SsD00k6f_Matt_s1_M_20160609_yid.png),,spa,,Spanish,,,,United States,,To Upload,Standard,,,,,,Get a free Spanish lesson with italki: http://promos.italki.com/wikitongues_spa,1 checked out of 1,,,,,,1,,,No ID,"38,400,000 in Spain (ELDIA 2012). Population total all countries: 414,170,030. L2 users: 7,490,000 in Spain (ELDIA 2006).","Indo-European, Italic, Romance, Italo-Western, Western, Gallo-Iberian, Ibero-Romance, West Iberian, Castilian",Indo-European,§,,"Eurasia, Eurasia",,2016-6-10,, +Matt_20160609_yid,Matt_Adler_20160608,Matt_Adler_20160608,6/9/2016,Matt_s1_M_20160609_yid.png (https://dl.airtable.com/12qr2b4RzOD3SsD00k6f_Matt_s1_M_20160609_yid.png),Matt_s1_M_20160609_yid.jpg (https://dl.airtable.com/RHx1jTTFRiWzBS9UoLy8_Matt_s1_M_20160609_yid.jpg),yid,,Yiddish,,,,United States,7/12/2016,Public,CC BY-NC 3.0,,,,,,,1 checked out of 1,,,,,,1,,hG5rMFqZ-XQ,https://youtu.be/hG5rMFqZ-XQ,"Population total all languages: 1,510,430.",,,§,,Eurasia,,2016-6-10,, +Matt_20160609_heb,Matt_Adler_20160608,Matt_Adler_20160608,6/9/2016,Matt_s1_M_20160609_yid.png (https://dl.airtable.com/12qr2b4RzOD3SsD00k6f_Matt_s1_M_20160609_yid.png),Matt_s1_M_20160609_heb.jpg (https://dl.airtable.com/g9gTJpETEGoXyyNnTLuQ_Matt_s1_M_20160609_heb.jpg),heb,,Hebrew,,,,United States,9/20/2016,Public,Standard,,,,,,Get a free Hebrew lesson with italki: http://promos.italki.com/wikitongues_heb,1 checked out of 1,,,,,,1,,M1YFrwaQL1I,https://youtu.be/M1YFrwaQL1I,"4,850,000 in Israel (1998). Spoken by all Israelis as L1 or L2. Some who use it as L1 now in Israel learned it as L2 originally. Population total all countries: 5,302,770.","Afro-Asiatic, Semitic, Central, South, Canaanite",Afro-Asiatic,§,,Eurasia,,2016-6-10,, +Mark_20150704_kal,Mark_Levinson_20150704,Mark_Levinson_20150704,7/4/2015,mark-thumbnail-raw.png (https://dl.airtable.com/uQRLDlGpT4AUKfYRYAPQ_mark-thumbnail-raw.png),Mark_s1_M_20150704_kal.jpg (https://dl.airtable.com/0NXPbr49Tx6XVebsvP2K_Mark_s1_M_20150704_kal.jpg),kal,,"Inuktitut, Greenlandic",,,,United States,8/1/2015,Public,CC BY-NC 3.0,checked,checked,"Aluu, qanoq ippit? Markimik ateqarpunga. Kalaallisullu ilinniarlunga. Kalaallisut ukioq ataaseq ilinniarpunga, neriullungalusiunisaami Kalaallit Nunaat takujumaarlugu. Isumaqarpunga Kalaallit nunaat kusanartorujussuusoq. ",,"Video from California, USA +",,1 checked out of 1,,,,,,1,checked,ZrfoXAsPHD4,https://youtu.be/ZrfoXAsPHD4,"50,000 in Greenland (2007 I. Larsen). 3,000 East Greenlandic, 44,000 West Greenlandic, 800 North Greenlandic. Population total all countries: 57,000.","Eskimo-Aleut, Eskimo, Inuit-Inupiaq",Eskimo-Aleut,"Greenlandic,,,,,",,Eurasia,,2015-7-6,, +Mark_20150704_che,Mark_Levinson_20150704,Mark_Levinson_20150704,7/4/2015,mark-thumbnail-raw.png (https://dl.airtable.com/34QD9fkYQ5ihFY1BaUWS_mark-thumbnail-raw.png),Mark_s1_M_20150704_che.jpg (https://dl.airtable.com/TDDvtWExSDuoeJzyUYzw_Mark_s1_M_20150704_che.jpg),che,,Chechen,,,,United States,8/24/2015,Public,CC BY-NC 3.0,checked,,,,"Video from California, USA +",,1 checked out of 1,,,,,,1,checked,cYWddQLxdu4,https://youtu.be/cYWddQLxdu4,"1,350,000 in Russian Federation (2010 census). Population total all countries: 1,361,000. 233,000 monolinguals. Ethnic population: 1,430,000 (2010 census).","North Caucasian, East Caucasian, Nakh, Chechen-Ingush",North Caucasian,"Chechen,,,,,",,Eurasia,,2015-7-6,, +Manjusha_20140624_tel,Manjusha_Raveendran_20140624,Manjusha_Raveendran_20140624,6/24/2014,manjusha.png (https://dl.airtable.com/rxbVDcLZTXWbknblgbNY_manjusha.png),Manjusha_s1_F_20140624_tel.png (https://dl.airtable.com/RrNiKOPmRsqwcsZEk9hS_Manjusha_s1_F_20140624_tel.png),tel,,Telugu,,,,United States,6/24/2014,Public,CC BY-NC 3.0,,checked,,,,Get a free Telugu lesson with italki: http://promos.italki.com/wikitongues_tel,1 checked out of 1,checked,,Facebook,2016-9-23,https://www.facebook.com/wikitongues/videos/1208757992522059/,1,checked,E-hVDqrQq6M,https://youtu.be/E-hVDqrQq6M,"73,800,000 in India (2001 census). Population total all countries: 74,049,000. L2 users: 5,000,000 in India.","Dravidian, South-Central, Telugu",Dravidian,"Telugu,,,,,",,Eurasia,,2014-12-22,, +Ashwath_20140722_knn,Ashwath__20140722,Manjusha_Raveendran_20140624,7/22/2014,ashwath.png (https://dl.airtable.com/wKmnihTmQM2ocAQ0nIgL_ashwath.png),Ashwath_s1_M_20140722_knn.jpg (https://dl.airtable.com/MzM32LFuRX63qJs6lkxa_Ashwath_s1_M_20140722_knn.jpg),knn,,Konkani,,,,United States,7/22/2014,Public,Standard,,checked,,,,,1 checked out of 1,,,,,,1,checked,IahmVXN7xEQ,https://youtu.be/IahmVXN7xEQ,"2,420,000 in India (2001 census). Population total all countries: 2,423,540.","Indo-European, Indo-Iranian, Indo-Aryan, Southern zone, Konkani",Indo-European,"Konkani,,,,,",,Eurasia,,2014-12-22,, +Vineet_20140731_mal,Vineet__20140731,Manjusha_Raveendran_20140624,7/31/2014,vineet.png (https://dl.airtable.com/guLpmAQxRR2XdiAKDc7H_vineet.png),Vineet_s1_M_20140731_mal.jpg (https://dl.airtable.com/S4WgijkjRmetIAAPLAau_Vineet_s1_M_20140731_mal.jpg),mal,,Malayalam,,,,United States,7/31/2014,Public,Standard,,checked,,,,,1 checked out of 1,,,,,,1,checked,KBUq9opT7Zg,https://youtu.be/KBUq9opT7Zg,"33,000,000 in India (2001 census). Population total all countries: 33,550,900.","Dravidian, Southern, Tamil-Kannada, Tamil-Kodagu, Tamil-Malayalam, Malayalam",Dravidian,"Malayalam,,,,,",,Eurasia,,2014-12-22,, +Ayesha_20140814_ben,Ayesha__20140814,Manjusha_Raveendran_20140624,8/14/2014,ayesha.png (https://dl.airtable.com/Ku2ZBRPfSWKtDL6PkDZ5_ayesha.png),Ayesha_s1_F_20140814_ben.png (https://dl.airtable.com/Ecf2rmBlQOK5nBYup6Ex_Ayesha_s1_F_20140814_ben.png),ben,,Bengali,,,,United States,8/14/2014,Public,Standard,,,,,,Get a free Bengali lesson with italki: http://promos.italki.com/wikitongues_ben,1 checked out of 1,checked,,Facebook,2016-12-5,,1,checked,Uq2x_P34bTQ,https://youtu.be/Uq2x_P34bTQ,"110,000,000 in Bangladesh (2001 census). Population total all countries: 193,261,200. L2 users: 140,000,000 in Bangladesh.","Indo-European, Indo-Iranian, Indo-Aryan, Eastern zone, Bengali-Assamese",Indo-European,"Bengali,,,,,",,Eurasia,,2014-12-22,, +Sai_20141026_tam,Sai__20141026,Manjusha_Raveendran_20140624,10/26/2014,Sai_s1_M_20141026_tam.png (https://dl.airtable.com/GpYR1V4rTxmIFjgatIvd_Sai_s1_M_20141026_tam.png),Sai_s1_M_20141026_tam.jpg (https://dl.airtable.com/cdcYDHsBTIammWbUSKL7_Sai_s1_M_20141026_tam.jpg),tam,,Tamil,,,,United States,10/26/2014,Public,Standard,,,,,,Get a free Tamil lesson with italki: http://promos.italki.com/wikitongues_tam,1 checked out of 1,checked,,,,,1,checked,fMRTimDnx4A,https://youtu.be/fMRTimDnx4A,"60,700,000 in India (2001 census). Population total all countries: 68,763,360. L2 users: 8,000,000 in India.","Dravidian, Southern, Tamil-Kannada, Tamil-Kodagu, Tamil-Malayalam, Tamil",Dravidian,"Tamil,,,,,",,Eurasia,,2014-12-22,, +Manjunath_20150620_kan,Manjunath__20150620,Manjusha_Raveendran_20140624,6/20/2015,manjunath.png (https://dl.airtable.com/32eQoCD9T3av0T11s0zr_manjunath.png),Manjunath_s1_M_20150620_kan.jpg (https://dl.airtable.com/n9VAtI2dQWe00l4nUtEP_Manjunath_s1_M_20150620_kan.jpg),kan,,Kannada,,,,United States,6/20/2015,Public,CC BY-NC 3.0,,checked,,,,,1 checked out of 1,,,,,,1,checked,753D2NuKgKU,https://youtu.be/753D2NuKgKU,"37,700,000 in India (2001 census). Population total all countries: 37,739,040. L2 users: 9,000,000 in India.","Dravidian, Southern, Tamil-Kannada, Kannada",Dravidian,"Kannada,,,,,",,Eurasia,,2014-12-22,, +Souleymane_20151201_sen+man+ara+fra,Souleymane__20151201,Maádu_Kiehne_,12/1/2015,Screen Shot 2016-03-18 at 6.11.32 PM.png (https://dl.airtable.com/8MqAHPYbSiqR0LoOQZHf_Screen%20Shot%202016-03-18%20at%206.11.32%20PM.png),"""Thumbnail - Souleymane speaking Mandingo, French, Arabic, and Senoufo.jpg (https://dl.airtable.com/KqmKrfTbRmqy6GtIpKjf_Thumbnail%20-%20Souleymane%20speaking%20Mandingo%2C%20French%2C%20Arabic%2C%20and%20Senoufo.jpg)""","sen,man,ara,fra",,"Sénoufo, Nanerigé, Mandingo, Arabic, French",,,,United States,3/1/2016,Public,Standard,,,,,,Get a free French lesson with italki: http://promos.italki.com/wikitongues_fra,4 checked out of 4,,16,,,,4,checked,eyPtlVS09RQ,https://youtu.be/eyPtlVS09RQ,"50,000 (1985 census)., Population total all languages: 6,496,300., Population total all languages: 236,748,330., 60,000,000 in France (ELDIA 2012). Population total all countries: 74,980,460.","Niger-Congo, Atlantic-Congo, Volta-Congo, North, Gur, Senufo, Suppire-Mamara, Indo-European, Italic, Romance, Italo-Western, Western, Gallo-Iberian, Gallo-Romance, Gallo-Rhaetian, Oïl, French",Niger-Congo,§,,"Africa, Africa, Eurasia, Eurasia, Eurasia, Americas, Eurasia, Eurasia",,2015-12-1,, +Joshi_20131201_epo,Joshi__20131201,Joshi__20131201,12/1/2013,Joshi_s1_M_20131201_epo.png (https://dl.airtable.com/miqgWJVS9iayJ0sOm8Z0_Joshi_s1_M_20131201_epo.png),Joshi_s1_M_20131201_epo.jpg (https://dl.airtable.com/tF5bekBSg2DFdkOATcEQ_Joshi_s1_M_20131201_epo.jpg),epo,,Esperanto,,,,United States,12/23/2013,Public,Standard,,,,,,Get a free Esperanto lesson with italki: http://promos.italki.com/wikitongues_epo,1 checked out of 1,checked,,,,,1,checked,Ynx3JxV5U6I,https://youtu.be/Ynx3JxV5U6I,"L2 users: 2,000,000 (Wiesenfeld 1999).",Constructed language,,"Esperanto,,,,,",,Eurasia,,2014-12-22,, +John_20160415_eng+spa+ell,John_Kazaklis_20160415,John_Kazaklis_20160415,4/15/2016,Screen Shot 2016-05-05 at 18.24.03.png (https://dl.airtable.com/0KYDoy2CQXagdeFNx55V_Screen%20Shot%202016-05-05%20at%2018.24.03.png),John_s3_M_20160415_eng+spa+ell.jpg (https://dl.airtable.com/IS9TTzLgTBiEnhgJQHEe_John_s3_M_20160415_eng%2Bspa%2Bell.jpg),"eng,spa,ell",,"English, Spanish, Greek",,,,United States,5/7/2016,Public,CC BY-SA 4.0,checked,,,"In English, John discusses his name and where he was born, as well as where his parents were born. In the Spanish, he discusses his family's roots in Bolivia and how he and his siblings learned Spanish at home. In Greek, he talks about where he is from, where in Greece his father is from, and the origin of his grandparents, who were Greek refugees from Northern Thrace (present day Bulgaria) and Eastern Thrace (present day Turkey).",,"Get a free English lesson with italki: http://promos.italki.com/wikitongues_eng, Get a free Spanish lesson with italki: http://promos.italki.com/wikitongues_spa",3 checked out of 3,,,,,,3,checked,lxQjwbUiM9w,https://youtu.be/lxQjwbUiM9w,"55,600,000 in United Kingdom (ELDIA 2012). Population total all countries: 335,148,868. L2 users: 1,500,000 in United Kingdom (Crystal 2003). L2 users worldwide: 505,000,000., 38,400,000 in Spain (ELDIA 2012). Population total all countries: 414,170,030. L2 users: 7,490,000 in Spain (ELDIA 2006)., 10,700,000 in Greece (ELDIA 2012). Population total all countries: 13,432,940.","Indo-European, Germanic, West, English, Indo-European, Italic, Romance, Italo-Western, Western, Gallo-Iberian, Ibero-Romance, West Iberian, Castilian, Indo-European, Greek, Attic",Indo-European,§,,"Eurasia, Eurasia, Eurasia, Eurasia, Eurasia, Eurasia",,2016-4-18,, +Ioanna_20150128_ell,Ioanna__20150128,Ioanna__20150128,1/28/2015,ionna-ell-thumb-raw.png (https://dl.airtable.com/qhvlUAZ8RkGHjuQD6VRv_ionna-ell-thumb-raw.png),Ioanna_s1_F_20150128_ell.png (https://dl.airtable.com/9BmW42jtRUqUyc8ZI0ur_Ioanna_s1_F_20150128_ell.png),ell,"ell,spa,eng",Greek,,,,United States,2/5/2015,Public,CC BY-NC 3.0,,,,,,,1 checked out of 1,,,Facebook,2017-10-4,https://www.facebook.com/wikitongues/videos/1574423579288830/,1,checked,mQyL3LgJwXA,https://youtu.be/mQyL3LgJwXA,"10,700,000 in Greece (ELDIA 2012). Population total all countries: 13,432,940.","Indo-European, Greek, Attic",Indo-European,"Greek,,,,,",,"Eurasia, Eurasia",,2015-2-7,, +Hiljiardo_20140614_epo,Hiljiardo__20140614,Hiljiardo__20140614,6/14/2014,hiliard.png (https://dl.airtable.com/O5a6uaotQ6B9OCQl29hC_hiliard.png),Hiljiardo_s1_M_20140614_epo.jpg (https://dl.airtable.com/6PEiCUSKRMWVsjvoWK7o_Hiljiardo_s1_M_20140614_epo.jpg),epo,,Esperanto,,,,United States,8/7/2014,Public,Standard,,checked,"Saluton. Mia nomo estas Hiljardo, en Esperanto, kaj mi parolis Esperanton dum du monatoj. Mi havas dek kvar de jaroj. Mi lernis Esperanton por lerni pri aliaj kulturoj kaj aliaj popoloj. Esperanto helpas min multe. Mi ofte konversacias kun homoj de la mondo. Mi loĝas en Konektikuto en Usono. Mi amas lerni pri lingvoj kaj historio. Mi ankaŭ parolas anglan lingvon, francan lingvon, rusan lingvon, nederlandan lingvon, kaj afrikanson. Mi amas lerni novajn lingvojn , ĉar ĝi estas sana, kaj ĝi estas bona ekzerco por la cerbo. Dankon por rigardi. +","Hi. Mi name is “Hiljardo” [Hilliard], in Esperanto, and I have spoken Esperanto for two months. I am fourteen years old. I learned Esperanto to learn about foreign cultures and foreign peoples. Esperanto helps me a lot. I often converse with people from the world. I live in Connecticut in the United States of America. I like to learn about languages and history. I also speak English, French, Russian, Dutch, and Afrikaans. I like to learn new languages, because it is healthy, and it is a good exercise for the brain. Thanks for watching.",,Get a free Esperanto lesson with italki: http://promos.italki.com/wikitongues_epo,1 checked out of 1,checked,,,,,1,checked,TotFWZLrQAY,https://youtu.be/TotFWZLrQAY,"L2 users: 2,000,000 (Wiesenfeld 1999).",Constructed language,,"Esperanto,,,,,",,Eurasia,,2014-12-22,, +Hassan_20150219_chr,Hassan__20150219,Hassan__20150219,2/19/2015,hassan-chr-thumb-raw.png (https://dl.airtable.com/EPZ6YIAQFGK5NC5ca2X0_hassan-chr-thumb-raw.png),Hassan_s1_M_20150219_chr.jpg (https://dl.airtable.com/cqI5GeP7RP6d4DCONWGo_Hassan_s1_M_20150219_chr.jpg),chr,,Cherokee,,,,United States,2/19/2015,Public,CC BY-NC 3.0,,,,,,,1 checked out of 1,,,Facebook,2016-8-2,https://www.facebook.com/wikitongues/videos/vb.408106989253834/1161003630630829/?type=2&theater,1,checked,6QWwVtNHmuM,https://youtu.be/6QWwVtNHmuM,"10,400 (2010 census). Spoken by 10,000 of the 122,000 member Cherokee Nation in Oklahoma, by 1,000 of the 10,000 Eastern Band of Cherokees in North Carolina, by a high percentage of the 7,500 members of the United Keetoowah Band of Oklahoma and Arkansas (Golla 2007). 130 monolinguals. Ethnic population: 140,000 (Golla 2007).",Iroquoian,,"Cherokee,,,,,",,Americas,,2015-2-19,, +Joanne_20170609_eng+-sgl,Joanne_Poh_20170609,Fiel_Sahir_20170609,6/9/2017,,,"eng,-sgl",,"English, Singlish",,,,United States,,To Upload,CC BY-NC 3.0,,,,,,Get a free English lesson with italki: http://promos.italki.com/wikitongues_eng,2 checked out of 2,,,,,,2,,,No ID,"55,600,000 in United Kingdom (ELDIA 2012). Population total all countries: 335,148,868. L2 users: 1,500,000 in United Kingdom (Crystal 2003). L2 users worldwide: 505,000,000.","Indo-European, Germanic, West, English",Indo-European,,,"Eurasia, Eurasia, Eurasia",,2017-6-22,, +Carolien_20170609_lim,Carolien_Caspers_20170609,Fiel_Sahir_20170609,6/9/2017,Carolien_20170609_lim.png (https://dl.airtable.com/7lsPSwaITmG2vE7mZTRZ_Carolien_20170609_lim.png),Carolien_20170609_lim.png (https://dl.airtable.com/gjrzl5KGRzG69OghBqsI_Carolien_20170609_lim.png),lim,,Limburgish,,,,United States,7/18/2017,Public,CC BY-SA 4.0,,,,,Be sure to credit (http://Between3worlds.com) when attributing this video.,,1 checked out of 1,,,,,,1,,,No ID,"700,000 in Netherlands (2001). Population total all countries: 1,300,000.","Indo-European, Germanic, West, High German, German, Middle German, West Middle German, Rhenisch Franconian",Indo-European,§Limburgish,"This video was recorded by Fiel Sahir in Bratislava, Slovakia, where he and Carolien met at the 2017 Polyglot Gathering. Limburgish is spoken by as many as 1.6 million people, primarily in the Western European regions of Limburg and Rhineland, along the shared borders of Germany, Belgium, and the Netherlands. A Germanic member of the Indo-European language family, Limburgish can be more specifically considered a Low-Franconian language, as it is most closely related to Dutch, Zeelandic, and Afrikaans. It is most widely spoken in the Netherlands, where it is protected as a regional minority language. Despite an absence of much literature, Limburgish is used in poetry in music.",Eurasia,,2017-6-9,, +Michael_20170609_slk,Michael_Nejeschleba_20170609,Fiel_Sahir_20170609,6/9/2017,Michael_20170609_slk.png (https://dl.airtable.com/wOhfAIUTyqrTmQxpZ1cQ_Michael_20170609_slk.png),Michael_20170609_slk.png (https://dl.airtable.com/b5ZRXrBSFp3MsmuUFQL8_Michael_20170609_slk.png),slk,,Slovak,,,,United States,7/29/2017,Public,CC BY-NC 3.0,,,,,Be sure to credit (http://Between3worlds.com) when attributing this video.,Get a free Slovak lesson with italki: http://promos.italki.com/wikitongues_slk,1 checked out of 1,,,,,,1,,qW0GpWnioTQ,https://youtu.be/qW0GpWnioTQ,"4,750,000 in Slovakia (ELDIA 2012). Population total all countries: 5,187,740.","Indo-European, Slavic, West, Czech-Slovak",Indo-European,§Slovak,"This video was recorded by Fiel Sahir in Bratislava, Slovakia, where he and Michael met at the 2017 Polyglot Gathering. Slovak is spoken by as many as 5.2 million people, primarily in Slovakia, where it is nationally official, as well as other countries in Eastern Europe, such as Serbia and the Czech Republic, where Slovak is a recognized minority language. A Slavic member of the Indo-European family of languages, Slovak was first standardized in the 1840s by the cultural activist Ľudovít Štúr, upon whose work the language's modern orthography is based. It is written with a unique variety of the Latin alphabet.",Eurasia,,2017-6-22,, +Tetree_20160802_gyn+eng,Tetree__20160802,Elise_Lieberman_20160622,8/2/2016,Screen Shot 2016-08-19 at 12.41.03.png (https://dl.airtable.com/XZizEwJFSEinq0KufiAJ_Screen%20Shot%202016-08-19%20at%2012.41.03.png),Tetree_s2_F_20160802_gyn+eng.jpg (https://dl.airtable.com/rMU7ux9fQDWIBt3hMXMG_Tetree_s2_F_20160802_gyn%2Beng.jpg),"gyn,eng",,"Guyanese Creole English, English",,,,United States,8/23/2016,Public,CC BY-NC 3.0,checked,,,,,Get a free English lesson with italki: http://promos.italki.com/wikitongues_eng,2 checked out of 2,,,Facebook,2017-2-8,https://www.facebook.com/wikitongues/videos/1351447484919775/,2,,Km_FjVNn5tY,https://youtu.be/Km_FjVNn5tY,"650,000 in Guyana. 250,000 Blacks and 400,000 Hindustanis. Population total all countries: 700,000., 55,600,000 in United Kingdom (ELDIA 2012). Population total all countries: 335,148,868. L2 users: 1,500,000 in United Kingdom (Crystal 2003). L2 users worldwide: 505,000,000.","English Creole, Atlantic, Eastern, Southern, Indo-European, Germanic, West, English",English Creole,§,,"Americas, Eurasia, Eurasia",,2016-8-5,, +Rose_20160722_hat,Rose__20160722,Elise_Lieberman_20160622,7/22/2016,Screen Shot 2016-09-15 at 12.53.48.png (https://dl.airtable.com/37Rep3onRt25WrcUPNjW_Screen%20Shot%202016-09-15%20at%2012.53.48.png),Rose_s1_F_20160722_hat.jpg (https://dl.airtable.com/IRoBJETUR1CfeMHg0Gz3_Rose_s1_F_20160722_hat.jpg),hat,,Haitian,,,,United States,9/22/2016,Public,CC BY-NC 3.0,checked,,,,,Get a free Haitian lesson with italki: http://promos.italki.com/wikitongues_hat,1 checked out of 1,,,,,,1,,16uK2Gbyk2k,https://youtu.be/16uK2Gbyk2k,"6,960,000 in Haiti (2001). Population total all countries: 7,731,240.",French Creole,,§,,Americas,,2016-8-5,, +Sandra_20160802_gyn+eng,Sandra__20160802,Elise_Lieberman_20160622,8/2/2016,Screen Shot 2016-10-06 at 15.36.16.png (https://dl.airtable.com/mcmYT7OZSp6P0MBmwtn4_Screen%20Shot%202016-10-06%20at%2015.36.16.png),Sandra_s2_F_20160802_gyn+eng.jpg (https://dl.airtable.com/xbtPyFfzR62EMreNTSmA_Sandra_s2_F_20160802_gyn%2Beng.jpg),"gyn,eng",,"Guyanese Creole English, English",,,,United States,10/6/2016,Public,CC BY-NC 3.0,checked,,,,,Get a free English lesson with italki: http://promos.italki.com/wikitongues_eng,2 checked out of 2,,,,,,2,,JUa_phPM77s,https://youtu.be/JUa_phPM77s,"650,000 in Guyana. 250,000 Blacks and 400,000 Hindustanis. Population total all countries: 700,000., 55,600,000 in United Kingdom (ELDIA 2012). Population total all countries: 335,148,868. L2 users: 1,500,000 in United Kingdom (Crystal 2003). L2 users worldwide: 505,000,000.","English Creole, Atlantic, Eastern, Southern, Indo-European, Germanic, West, English",English Creole,§,,"Americas, Eurasia, Eurasia",,2016-8-5,, +Margaret_20160806_hat,Margaret__20160806,Elise_Lieberman_20160622,8/6/2016,Screen Shot 2017-12-07 at 7.05.06 PM.png (https://dl.airtable.com/V3UOVatQ5SJV10BTdgj9_Screen%20Shot%202017-12-07%20at%207.05.06%20PM.png),Margaret_20160806_hat.jpg (https://dl.airtable.com/idIAgafyT3qSpvDwE3Yp_Margaret_20160806_hat.jpg),hat,,Haitian,,,,United States,12/28/2017,Public,CC BY-NC 3.0,,,,,,Get a free Haitian lesson with italki: http://promos.italki.com/wikitongues_hat,1 checked out of 1,,,,,,1,,J0Yx_sLr6Vo,https://youtu.be/J0Yx_sLr6Vo,"6,960,000 in Haiti (2001). Population total all countries: 7,731,240.",French Creole,,§,"This video was recorded by Elise Lieberman in New York City, USA, where she and Margaret met. Haitian Creole, known more commonly by its speakers as Krèyol, is spoken by as many as 12 million people, primarily in the Caribbean nation of Haiti, where it is co-official alongside French, as well as by diaspora communities worldwide. A French Creole language, Haitian emerged in the 17th century CE as a lingua franca among enslaved West Africans, who hailed from a myriad of language communities. It bears close resemblance to other Caribbean creoles, including Louisiana Creole French and the Antillean languages of Guadeloupe, Saint Lucia, and Dominica. Historically a spoken language only, there has been a shift toward its inclusion in the literary and political spheres since the turn of the 21st century. ",Americas,,2016-8-6,, +Freddie_20130218_por,Freddie_Andrade_,"Freddie_Andrade_,Daniel_BogreUdell_20130101",2/18/2013,freddie-por-thumb-raw.png (https://dl.airtable.com/4GG3wVdbQva9ZfSZFQ3q_freddie-por-thumb-raw.png),Freddie_s1_M_20130218_por.jpg (https://dl.airtable.com/EF3VILSdROCj6TEH4spt_Freddie_s1_M_20130218_por.jpg),por,,Portuguese,,,,United States,2/18/2013,Public,Standard,,checked,,,,Get a free Portuguese lesson with italki: http://promos.italki.com/wikitongues_por,1 checked out of 1,checked,,,,,1,checked,iWRrLD7H98s,https://youtu.be/iWRrLD7H98s,"10,000,000 in Portugal (ELDIA 2012). Population total all countries: 203,349,200.","Indo-European, Italic, Romance, Italo-Western, Western, Gallo-Iberian, Ibero-Romance, West Iberian, Portuguese-Galician",Indo-European,"Portuguese,,,,,",,"Eurasia, Eurasia",,2014-12-22,, +Javier_20130303_nhn+spa,Javier__20130303,"Freddie_Andrade_,Daniel_BogreUdell_20130101",3/3/2013,Javier_s2_M_20130303_nhn+spa.png (https://dl.airtable.com/u3XPAjadQR8Ku6J7oAdI_Javier_s2_M_20130303_nhn%2Bspa.png),Javier_s2_M_20130303_nhn+spa.jpg (https://dl.airtable.com/nJW0CurnRB2QGXxetOqj_Javier_s2_M_20130303_nhn%2Bspa.jpg),"nhn,spa",,"Nahuatl, Central, Spanish","Nahuatl,Spanish",,,United States,3/3/2013,Public,Standard,,checked,,,,Get a free Spanish lesson with italki: http://promos.italki.com/wikitongues_spa,2 checked out of 2,checked,,,,,2,checked,WQ4W-UqaaMo,https://youtu.be/WQ4W-UqaaMo,"40,000 (1980 census). All Nahuatl variety speakers: 1,380,000. 1,000 monolinguals (1990 census). Ethnic population: 63,000 (1986)., 38,400,000 in Spain (ELDIA 2012). Population total all countries: 414,170,030. L2 users: 7,490,000 in Spain (ELDIA 2006).","Uto-Aztecan, Southern Uto-Aztecan, Corachol-Aztecan, Core Nahua, Nahuatl, Indo-European, Italic, Romance, Italo-Western, Western, Gallo-Iberian, Ibero-Romance, West Iberian, Castilian",Uto-Aztecan,"Nahuatl,Spanish,,,,",,"Americas, Eurasia, Eurasia",,2014-12-22,, +Michael_20130316_khm,Michael__20130316,"Freddie_Andrade_,Daniel_BogreUdell_20130101",3/16/2013,Michael_s1_M_20130316_khm.png (https://dl.airtable.com/XL2Qdid2QFWYqoCTK3Fr_Michael_s1_M_20130316_khm.png),Michael_s1_M_20130316_khm.jpg (https://dl.airtable.com/wBBuNtS0RRqryWvlMO0Z_Michael_s1_M_20130316_khm.jpg),khm,,"Khmer, Central",Khmer,,Unknown Variant,United States,3/16/2013,Public,Standard,,,,,,"Get a free Khmer, Central lesson with italki: http://promos.italki.com/wikitongues_khm",1 checked out of 1,checked,,Facebook,2016-11-4,https://www.facebook.com/wikitongues/videos/1252697758128082/,1,checked,xSaGl8fiiYk,https://youtu.be/xSaGl8fiiYk,"12,900,000 in Cambodia (2008 census). Population total all countries: 14,224,500. L2 users: 1,000,000 in Cambodia.","Austro-Asiatic, Mon-Khmer, Eastern Mon-Khmer, Khmer",Austro-Asiatic,"Khmer,,,,,",,Eurasia,,2014-12-22,, +Marion_20130704_eng,Marion__20130704,"Freddie_Andrade_,Daniel_BogreUdell_20130101",7/4/2013,marion.png (https://dl.airtable.com/j6Zt6wnYQJOoPlCwGqaM_marion.png),Marion_s1_F_20130704_eng.jpg (https://dl.airtable.com/8ZSWHhrTTRmYwzsj8a7I_Marion_s1_F_20130704_eng.jpg),eng,,English,,,,United States,7/4/2013,Public,Standard,,,,,,Get a free English lesson with italki: http://promos.italki.com/wikitongues_eng,1 checked out of 1,checked,,,,,1,checked,0iVQwo-1hHM,https://youtu.be/0iVQwo-1hHM,"55,600,000 in United Kingdom (ELDIA 2012). Population total all countries: 335,148,868. L2 users: 1,500,000 in United Kingdom (Crystal 2003). L2 users worldwide: 505,000,000.","Indo-European, Germanic, West, English",Indo-European,"English ,,,,,",,"Eurasia, Eurasia",,2014-12-22,, +Horace_20130704_frc,Horace__20130704,"Freddie_Andrade_,Daniel_BogreUdell_20130101",7/4/2013,Horace_s1_M_20130704_frc.png (https://dl.airtable.com/t6fjKKUSvClHnVH0yOH1_Horace_s1_M_20130704_frc.png),Horace_s1_M_20130704_frc.jpg (https://dl.airtable.com/T8JSWaQaihBZm6knPAII_Horace_s1_M_20130704_frc.jpg),frc,,"French, Cajun",Louisiana French,,,United States,7/4/2013,Public,Standard,,,,,,,1 checked out of 1,,,,,,1,checked,Vg4cGwY-q2c,https://youtu.be/Vg4cGwY-q2c,"25,600 (2010 census), decreasing.","Indo-European, Italic, Romance, Italo-Western, Western, Gallo-Iberian, Gallo-Romance, Gallo-Rhaetian, Oïl, French",Indo-European,"Louisiana French,,,,,",,Americas,,2014-12-22,, +Stephen_20130704_kik,Stephen__20130704,"Freddie_Andrade_,Daniel_BogreUdell_20130101",7/4/2013,stephen.png (https://dl.airtable.com/wOD1T7erTe2gUbuxpPnO_stephen.png),Stephen_s1_M_20130704_kik.jpg (https://dl.airtable.com/IDdXB9qsQmkYFxTDRebQ_Stephen_s1_M_20130704_kik.jpg),kik,,Gikuyu,,,,United States,7/4/2013,Public,Standard,,,,,,,1 checked out of 1,,,,,,1,checked,SWn1t4o0QC0,https://youtu.be/SWn1t4o0QC0,"6,623,000 (2009 census), increasing.","Niger-Congo, Atlantic-Congo, Volta-Congo, Benue-Congo, Bantoid, Southern, Narrow Bantu, Central, E, Kikuyu-Kamba (E.51)",Niger-Congo,"Gikuyu,,,,,",,Africa,,2014-12-22,, +Sam_20130705_frc,Sam_Craft_20130705,"Freddie_Andrade_,Daniel_BogreUdell_20130101",7/5/2013,Screen Shot 2016-06-14 at 14.13.12 2.png (https://dl.airtable.com/z80lQiCnQCuYWWQ6v306_Screen%20Shot%202016-06-14%20at%2014.13.12%202.png),Sam_s1_M_20130705_frc.jpg (https://dl.airtable.com/Gak486B9ThGiVYOzxMNm_Sam_s1_M_20130705_frc.jpg),frc,,"French, Cajun",Louisiana French,,,United States,7/5/2013,Public,Standard,,,,,,,1 checked out of 1,,,,,,1,checked,G0n970JRNII,https://youtu.be/G0n970JRNII,"25,600 (2010 census), decreasing.","Indo-European, Italic, Romance, Italo-Western, Western, Gallo-Iberian, Gallo-Romance, Gallo-Rhaetian, Oïl, French",Indo-European,"Louisiana French,,,,,",,Americas,,2014-12-22,, +Alexis_20130706_eng,Alexis__20130706,"Freddie_Andrade_,Daniel_BogreUdell_20130101",7/6/2013,alexis.png (https://dl.airtable.com/uzSgH1sbSBucRq5TXZSN_alexis.png),Alexis_s1_F_20130706_eng.jpg (https://dl.airtable.com/J0x3BYKARCeqZaLQ120C_Alexis_s1_F_20130706_eng.jpg),eng,,English,,,,United States,7/6/2013,Public,Standard,,,,,,Get a free English lesson with italki: http://promos.italki.com/wikitongues_eng,1 checked out of 1,checked,,Facebook,2016-8-26,https://www.facebook.com/wikitongues/videos/1181733158557876/,1,checked,NM0DpalXJ8s,https://youtu.be/NM0DpalXJ8s,"55,600,000 in United Kingdom (ELDIA 2012). Population total all countries: 335,148,868. L2 users: 1,500,000 in United Kingdom (Crystal 2003). L2 users worldwide: 505,000,000.","Indo-European, Germanic, West, English",Indo-European,"English,,,,,",,"Eurasia, Eurasia",,2014-12-22,, +Lee_20130706_eng,Lee__20130706,"Freddie_Andrade_,Daniel_BogreUdell_20130101",7/6/2013,lee.png (https://dl.airtable.com/CdN9J3qUSqCYbFN0S3Xv_lee.png),Lee_s1_M_20130706_eng.jpg (https://dl.airtable.com/JSQqWOAeTGWNTxoIhEct_Lee_s1_M_20130706_eng.jpg),eng,,English,,,,United States,7/6/2013,Public,Standard,,,,,,Get a free English lesson with italki: http://promos.italki.com/wikitongues_eng,1 checked out of 1,checked,,,,,1,checked,lXR8P4dOmAU,https://youtu.be/lXR8P4dOmAU,"55,600,000 in United Kingdom (ELDIA 2012). Population total all countries: 335,148,868. L2 users: 1,500,000 in United Kingdom (Crystal 2003). L2 users worldwide: 505,000,000.","Indo-European, Germanic, West, English",Indo-European,"English,,,,,",,"Eurasia, Eurasia",,2014-12-22,, +Louis_20130706_frc+eng,Louis__20130706,"Freddie_Andrade_,Daniel_BogreUdell_20130101",7/6/2013,louis.png (https://dl.airtable.com/BDhckhIoQGydCjKDD7kv_louis.png),Louis_s2_M_20130706_eng+frc.jpg (https://dl.airtable.com/xlodK6RPef7iEG6erfkw_Louis_s2_M_20130706_eng%2Bfrc.jpg),"frc,eng",,"French, Cajun, English","Louisiana French,English",,,United States,7/6/2013,Public,Standard,,,,,,Get a free English lesson with italki: http://promos.italki.com/wikitongues_eng,2 checked out of 2,checked,,,,,2,checked,1R5dPw4sYrE,https://youtu.be/1R5dPw4sYrE,"25,600 (2010 census), decreasing., 55,600,000 in United Kingdom (ELDIA 2012). Population total all countries: 335,148,868. L2 users: 1,500,000 in United Kingdom (Crystal 2003). L2 users worldwide: 505,000,000.","Indo-European, Italic, Romance, Italo-Western, Western, Gallo-Iberian, Gallo-Romance, Gallo-Rhaetian, Oïl, French, Indo-European, Germanic, West, English",Indo-European,"Louisiana French,English,,,,",,"Americas, Eurasia, Eurasia",,2014-12-22,, +Stella_20130706_rus+eng+hye,Stella__20130706,"Freddie_Andrade_,Daniel_BogreUdell_20130101",7/6/2013,stella.png (https://dl.airtable.com/qHMsX3jYQyqiBP4u0nhl_stella.png),Stella_s3_F_20130706_hye+eng+rus.jpg (https://dl.airtable.com/5730pZG7R5arQftHpuKs_Stella_s3_F_20130706_hye%2Beng%2Brus.jpg),"rus,eng,hye",,"Russian, English, Armenian",,,,United States,7/6/2013,Public,Standard,,,,,,"Get a free Russian lesson with italki: http://promos.italki.com/wikitongues_rus, Get a free English lesson with italki: http://promos.italki.com/wikitongues_eng, Get a free Armenian lesson with italki: http://promos.italki.com/wikitongues_hye",3 checked out of 3,checked,,,,,3,checked,At6KGp45FdM,https://youtu.be/At6KGp45FdM,"137,000,000 in Russian Federation (2010 census). Population total all countries: 167,332,230., 55,600,000 in United Kingdom (ELDIA 2012). Population total all countries: 335,148,868. L2 users: 1,500,000 in United Kingdom (Crystal 2003). L2 users worldwide: 505,000,000., 3,140,000 in Armenia (2001 census). Population total all countries: 5,902,970.","Indo-European, Slavic, East, Indo-European, Germanic, West, English, Indo-European, Armenian",Indo-European,"Russian,English,Armenian,,,",,"Eurasia, Eurasia, Eurasia, Eurasia, Eurasia, Eurasia, Eurasia",,2014-12-22,, +Michael_20130715_eng,Michael__20130715,"Freddie_Andrade_,Daniel_BogreUdell_20130101",7/15/2013,michael2.png (https://dl.airtable.com/FsgT80WgRtaecYXGzyyH_michael2.png),Michael_s1_M_20130715_eng.jpg (https://dl.airtable.com/LQZWlfhQuyjy5tGw6aCg_Michael_s1_M_20130715_eng.jpg),eng,,English,,,,United States,7/15/2013,Public,Standard,,,,,,Get a free English lesson with italki: http://promos.italki.com/wikitongues_eng,1 checked out of 1,checked,,,,,1,checked,R4VeecQEbA0,https://youtu.be/R4VeecQEbA0,"55,600,000 in United Kingdom (ELDIA 2012). Population total all countries: 335,148,868. L2 users: 1,500,000 in United Kingdom (Crystal 2003). L2 users worldwide: 505,000,000.","Indo-European, Germanic, West, English",Indo-European,"English,,,,,",,"Eurasia, Eurasia",,2014-12-22,, +Caroline_20130804_gul+eng,Caroline__20130804,"Freddie_Andrade_,Daniel_BogreUdell_20130101",8/4/2013,Caroline_s2_F_20130804_eng+gul.png (https://dl.airtable.com/Fx2QdUtQByC2PaVrDBPA_Caroline_s2_F_20130804_eng%2Bgul.png),Caroline_s2_F_20130804_eng+gul.jpg (https://dl.airtable.com/1FZ8l15LRbhoPWjgfIQV_Caroline_s2_F_20130804_eng%2Bgul.jpg),"gul,eng",,"Sea Island Creole English, English","English,Gullah",,,United States,8/3/2013,Public,Standard,,,,,,Get a free English lesson with italki: http://promos.italki.com/wikitongues_eng,2 checked out of 2,checked,,,,,2,checked,iCd5W4gwJsI,https://youtu.be/iCd5W4gwJsI,"350 (2010 census). 10,000 in New York City (Holm 1989). Ethnic population: 250,000., 55,600,000 in United Kingdom (ELDIA 2012). Population total all countries: 335,148,868. L2 users: 1,500,000 in United Kingdom (Crystal 2003). L2 users worldwide: 505,000,000.","English Creole, Atlantic, Eastern, Northern, Indo-European, Germanic, West, English",English Creole,"Gullah,English,,,,",,"Americas, Eurasia, Eurasia",,2014-12-22,, +Jerry_20131019_eng+chr,Jerry__20131019,"Freddie_Andrade_,Daniel_BogreUdell_20130101",10/19/2013,Jerry_s2_M_20131019_chr+eng.png (https://dl.airtable.com/gRmAEYEWSV2JbQtoFdtE_Jerry_s2_M_20131019_chr%2Beng.png),Jerry_s2_M_20131019_chr+eng.jpg (https://dl.airtable.com/in0C6tUvSryxFascLeHO_Jerry_s2_M_20131019_chr%2Beng.jpg),"eng,chr",,"English, Cherokee",,,,United States,10/19/2013,Public,Standard,,,,,,Get a free English lesson with italki: http://promos.italki.com/wikitongues_eng,2 checked out of 2,checked,,,,,2,checked,PUYoRT2EA5Q,https://youtu.be/PUYoRT2EA5Q,"55,600,000 in United Kingdom (ELDIA 2012). Population total all countries: 335,148,868. L2 users: 1,500,000 in United Kingdom (Crystal 2003). L2 users worldwide: 505,000,000., 10,400 (2010 census). Spoken by 10,000 of the 122,000 member Cherokee Nation in Oklahoma, by 1,000 of the 10,000 Eastern Band of Cherokees in North Carolina, by a high percentage of the 7,500 members of the United Keetoowah Band of Oklahoma and Arkansas (Golla 2007). 130 monolinguals. Ethnic population: 140,000 (Golla 2007).","Indo-European, Germanic, West, English, Iroquoian",Indo-European,"English,Cherokee,,,,",,"Eurasia, Eurasia, Americas",,2014-12-22,, +Landon_20140302_eng,Landon__20140302,"Freddie_Andrade_,Daniel_BogreUdell_20130101",3/2/2014,landon.png (https://dl.airtable.com/cNLOMRMTqu6XV8eUuAXz_landon.png),Landon_s1_M_20140302_eng.jpg (https://dl.airtable.com/rIgJMDNvRla5UX5eiRoZ_Landon_s1_M_20140302_eng.jpg),eng,,English,,,,United States,3/2/2014,Public,Standard,,,,,,Get a free English lesson with italki: http://promos.italki.com/wikitongues_eng,1 checked out of 1,checked,,,,,1,checked,UP3FhvITMX8,https://youtu.be/UP3FhvITMX8,"55,600,000 in United Kingdom (ELDIA 2012). Population total all countries: 335,148,868. L2 users: 1,500,000 in United Kingdom (Crystal 2003). L2 users worldwide: 505,000,000.","Indo-European, Germanic, West, English",Indo-European,"English,,,,,",,"Eurasia, Eurasia",,2014-12-22,, +Vernell_20151219_deu,Vernell__20151219,"Crawford_Hunt_,Daniel_BogreUdell_20130101",12/19/2015,Screen Shot 2016-10-04 at 22.52.20.png (https://dl.airtable.com/jfxEqO5SrebDBzztE1tV_Screen%20Shot%202016-10-04%20at%2022.52.20.png),Vernell_s1_F_20151219_deu.jpg (https://dl.airtable.com/JjkclSQgSlSrRyF3jcN7_Vernell_s1_F_20151219_deu.jpg),deu,eng,"German, Standard",Texas German,,,United States,10/5/2016,Public,Standard,,,,,,"Get a free German, Standard lesson with italki: http://promos.italki.com/wikitongues_deu",1 checked out of 1,,60,,,,1,,1_dH403pqRU,https://youtu.be/1_dH403pqRU,"69,800,000 in Germany (ELDIA 2012). Population total all countries: 78,245,280. L2 users: 8,000,000 in Germany (ELDIA 2012).","Indo-European, Germanic, West, High German, German, Middle German, East Middle German",Indo-European,§Texas German,,"Eurasia, Eurasia",,2015-9-21,,https://www.dropbox.com/sh/rv0dw9y7wuorf8b/AACZPcKVmddgwWZFZWu9DrUda?dl=0 +Evelyn_20150630_deu,Evelyn__20150630,"Crawford_Hunt_,Daniel_BogreUdell_20130101",6/30/2015,evelyn-deu-thumb-raw.png (https://dl.airtable.com/PFnD1UYDQzSl2CSKQxgN_evelyn-deu-thumb-raw.png),Evelyn_s1_F_20150630_deu.jpg (https://dl.airtable.com/hsTfZUV5TQWNWxI9BlpQ_Evelyn_s1_F_20150630_deu.jpg),deu,,"German, Standard",Texas German,,,United States,3/23/2017,Public,Standard,,,,,,"Get a free German, Standard lesson with italki: http://promos.italki.com/wikitongues_deu",1 checked out of 1,,52,,,,1,,jshv9n3xAO4,https://youtu.be/jshv9n3xAO4,"69,800,000 in Germany (ELDIA 2012). Population total all countries: 78,245,280. L2 users: 8,000,000 in Germany (ELDIA 2012).","Indo-European, Germanic, West, High German, German, Middle German, East Middle German",Indo-European,§Texas German,,"Eurasia, Eurasia",,2015-9-21,, +Éanna_20170425_gle,Éanna_Carty_20170425,Daniel_BogreUdell_20130101,4/25/2017,,,gle,,Irish,,"New York City, English name Edna",,United States,,To Upload,CC BY-NC 3.0,,,,,,Get a free Irish lesson with italki: http://promos.italki.com/wikitongues_gle,1 checked out of 1,,,,,,1,,,No ID,"138,000 in Ireland (ELDIA 2012). Population total all countries: 276,310. L2 users: 1,000,000 in Ireland (ELDIA 2012).","Indo-European, Celtic, Insular, Goidelic",Indo-European,§,,Eurasia,,2017-4-25,, +Ólöf_20140101_isl,Ólöf__20140101,Daniel_BogreUdell_20130101,1/1/2014,olof.png (https://dl.airtable.com/cHVeBq0RfigjzsVZ0b2o_olof.png),,isl,,Icelandic,,,,United States,,Removed,Standard,,,,,,Get a free Icelandic lesson with italki: http://promos.italki.com/wikitongues_isl,1 checked out of 1,,,,,,1,,,No ID,"230,000 in Iceland (1980). Population total all countries: 243,840.","Indo-European, Germanic, North, West Scandinavian",Indo-European,§,,Eurasia,,2014-12-22,, +Arnór_20140101_isl,Arnór__20140101,Daniel_BogreUdell_20130101,1/1/2014,arnor.png (https://dl.airtable.com/h3zEirCARba0u5niCq3h_arnor.png),,isl,,Icelandic,,,,United States,,Removed,Standard,,,,,,Get a free Icelandic lesson with italki: http://promos.italki.com/wikitongues_isl,1 checked out of 1,,,,,,1,,,No ID,"230,000 in Iceland (1980). Population total all countries: 243,840.","Indo-European, Germanic, North, West Scandinavian",Indo-European,§,,Eurasia,,2014-12-22,, +Anonymous_20151201_jdt,.Anonymous__,Daniel_BogreUdell_20130101,12/1/2015,,,jdt,,Judeo-Tat,Juhuri,,,United States,,To Upload,Standard,,,,,,,1 checked out of 1,,99,,,,1,,,No ID,"2,010 in Russian Federation (2010 census). Census includes Tat ,. Population total all countries: 96,010.","Indo-European, Indo-Iranian, Iranian, Western, Southwestern, Tat",Indo-European,§Juhuri,,Eurasia,,2015-12-1,, +Naomi_20140101_jpn,Naomi__20140101,Daniel_BogreUdell_20130101,1/1/2014,,,jpn,,Japanese,,,,United States,,Removed,Standard,,checked,,,"Removed upon request +",Get a free Japanese lesson with italki: http://promos.italki.com/wikitongues_jpn,1 checked out of 1,,,,,,1,,,No ID,"121,000,000 in Japan (1985). Population figure may include other ethnic groups. Population total all countries: 122,056,940. L2 users: 1,000,000 in Japan.",Japonic,,§,,Eurasia,,2014-12-22,, +Chez_20160717_taj,Chez__20160717,Daniel_BogreUdell_20130101,7/17/2016,Screen Shot 2018-03-01 at 2.46.04 PM.png (https://dl.airtable.com/kz2VqjXRUqwNu45xDnog_Screen%20Shot%202018-03-01%20at%202.46.04%20PM.png),Chez_20160717_taj.jpg (https://dl.airtable.com/bN81YUzTi6OZz0cavQoA_Chez_20160717_taj.jpg),taj,,"Tamang, Eastern",,,Classification,United States,3/1/2018,To Upload,Standard,,,,,,,1 checked out of 1,,,,,,1,,xpDBaE9TSe8,https://youtu.be/xpDBaE9TSe8,"1,180,000 in Nepal (2001 census), increasing. Population for all Tamang varieties: 1,350,000 (2011 census). Population total all countries: 1,197,500. In some remote communities, particularly women, children and elderly people are monolingual. Ethnic population: 1,290,000 (2001 census). L2 users: 23,600 in Nepal (1991 census). L2 speakers of all Tamang.","Sino-Tibetan, Tibeto-Burman, Western Tibeto-Burman, Bodish, West Bodish, Gurung-Tamang, Tamang",Sino-Tibetan,§,"This video was recorded by Daniel Bogre Udell and Nawang Tsering in New York City, USA. Tamang is spoken by more than a million people, primarily in the South Asian nation of Nepal, where it is a recognized national language, as well as the Indian state of Sikkim. Though it is commonly understood by its speakers to be a single language, linguistic researchers are split on whether Tamang’s four principal varieties are distinct dialects of a single language, or a family of closely related languages. Tamang can therefore understood to be a “dialect cluster” or “macrolanguage”, linguistic terms applied when genealogy remains unclear. Whatever their genealogy, the Tamang languages pertain to the Sino-Tibetan linguistic family, sharing roots with other languages spoken across south and central Asia, such as Tibetan, Thakali, and Gurung.",Eurasia,,2016-7-18,, +Lorenzo_20130202_quc,Lorenzo__20130202,Daniel_BogreUdell_20130101,2/2/2013,lorenzo.png (https://dl.airtable.com/lBMZlSJR8W9t25SZAjer_lorenzo.png),Lorenzo_s1_M_20130202_quc.jpg (https://dl.airtable.com/oNrdHJPhScyyz0n178NU_Lorenzo_s1_M_20130202_quc.jpg),quc,,K’iche’,K'iche' Mayan,,,United States,2/2/2013,Public,Standard,,,,,,,1 checked out of 1,,,,,,1,checked,7zQSfU5HkUc,https://youtu.be/7zQSfU5HkUc,"2,330,000. 300,000 monolinguals.","Mayan, Yucatecan-Core Mayan, K’ichean-Mamean, K’ichean, Poqom-K’ichean, Core K’ichean",Mayan,"K'iche' Mayan,,,,,",,Americas,,2014-12-22,, +Regina_20130202_spa,Regina__20130202,Daniel_BogreUdell_20130101,2/2/2013,regina.png (https://dl.airtable.com/fRwcTXnuQsemTUcwkW7T_regina.png),Regina_s1_F_20130202_spa.jpg (https://dl.airtable.com/yIgMXWBjRKqcnYWUCS9K_Regina_s1_F_20130202_spa.jpg),spa,,Spanish,,,,United States,2/2/2013,Public,Standard,,,,,,Get a free Spanish lesson with italki: http://promos.italki.com/wikitongues_spa,1 checked out of 1,checked,,Facebook,2016-12-2,,1,checked,4SR39iWfZdk,https://youtu.be/4SR39iWfZdk,"38,400,000 in Spain (ELDIA 2012). Population total all countries: 414,170,030. L2 users: 7,490,000 in Spain (ELDIA 2006).","Indo-European, Italic, Romance, Italo-Western, Western, Gallo-Iberian, Ibero-Romance, West Iberian, Castilian",Indo-European,"Spanish,,,,,",,"Eurasia, Eurasia",,2014-12-22,, +Octavia_20130203_-hes,Octavia__20130203,Daniel_BogreUdell_20130101,2/3/2013,octavia.png (https://dl.airtable.com/oljU4cdRmMzyPEIhNnvw_octavia.png),Octavia_s1_F_20130203_-hes.jpg (https://dl.airtable.com/rwbFFpuPQ7ieo6NzQG6F_Octavia_s1_F_20130203_-hes.jpg),-hes,,Hessian,,,No Language ISO,United States,2/3/2013,Public,Standard,,checked,,,,,1 checked out of 1,,,,,,1,checked,CouHEysgsPo,https://youtu.be/CouHEysgsPo,,,,"Hessian,,,,,",,Eurasia,,2014-12-22,, +Sofia_20130203_rus+eng,Sofia__20130203,Daniel_BogreUdell_20130101,2/3/2013,Sofia_s2_F_20130203_eng+rus.png (https://dl.airtable.com/J1BhHs32QNuTjWJA2dp1_Sofia_s2_F_20130203_eng%2Brus.png),Sofia_s2_F_20130203_eng+rus.jpg (https://dl.airtable.com/9EX5kkSTGmA0ezMhvKpE_Sofia_s2_F_20130203_eng%2Brus.jpg),"rus,eng",,"Russian, English",,,,United States,2/3/2013,Public,Standard,,,,,,"Get a free Russian lesson with italki: http://promos.italki.com/wikitongues_rus, Get a free English lesson with italki: http://promos.italki.com/wikitongues_eng",2 checked out of 2,checked,,,,,2,checked,P2jdy8NC-JU,https://youtu.be/P2jdy8NC-JU,"137,000,000 in Russian Federation (2010 census). Population total all countries: 167,332,230., 55,600,000 in United Kingdom (ELDIA 2012). Population total all countries: 335,148,868. L2 users: 1,500,000 in United Kingdom (Crystal 2003). L2 users worldwide: 505,000,000.","Indo-European, Slavic, East, Indo-European, Germanic, West, English",Indo-European,"Russian,English,,,,",,"Eurasia, Eurasia, Eurasia, Eurasia",,2014-12-22,, +Eva_20130203_nld,Eva__20130203,Daniel_BogreUdell_20130101,2/3/2013,Eva_s1_F_20130203_nld.png (https://dl.airtable.com/HwAle7YVRMSim76Wdvaq_Eva_s1_F_20130203_nld.png),Eva_s1_F_20130203_nld.jpg (https://dl.airtable.com/8zPRKarmRymhcSUiUN5Q_Eva_s1_F_20130203_nld.jpg),nld,,Dutch,,,,United States,2/3/2013,Public,Standard,,checked,,,,Get a free Dutch lesson with italki: http://promos.italki.com/wikitongues_nld,1 checked out of 1,checked,,,,,1,checked,Qv53zmmpM5Q,https://youtu.be/Qv53zmmpM5Q,"15,700,000 in Netherlands (ELDIA 2012). Population total all countries: 21,944,690.","Indo-European, Germanic, West, Low Saxon-Low Franconian, Low Franconian",Indo-European,"Dutch,,,,,",,Eurasia,,2014-12-22,, +Manuel_20130203_toc,Manuel__20130203,Daniel_BogreUdell_20130101,2/3/2013,Manuel_s1_M_20130203_toc.png (https://dl.airtable.com/MMrwXHCwSPS7Q0SN1Chh_Manuel_s1_M_20130203_toc.png),xDDelfxTb6HZbTbapyPm_large_Manuel_s1_M_20130203_toc.jpg (https://dl.airtable.com/Mz0sbWctSeu8HjyQUdmz_xDDelfxTb6HZbTbapyPm_large_Manuel_s1_M_20130203_toc.jpg),toc,,"Totonac, Coyutla",Totonac,,Unknown Variant,United States,2/3/2013,Public,Standard,,,,,,,1 checked out of 1,,,,,,1,checked,cC50MO--CGQ,https://youtu.be/cC50MO--CGQ,"48,100 (2000). All Totonac languages: 196,000 (1980 census).","Totonacan, Totonac",Totonacan,"Totonac,,,,,",,Americas,,2014-12-22,, +Joel_20130215_eng+heb,Joel__20130215,Daniel_BogreUdell_20130101,2/15/2013,Joel_s2_M_20130215_eng+heb.png (https://dl.airtable.com/Hh28wouwTqeP6SeheEYw_Joel_s2_M_20130215_eng%2Bheb.png),Joel_s2_M_20130215_eng+heb.jpg (https://dl.airtable.com/QAIbpUWpR8iCvtIFBHyV_Joel_s2_M_20130215_eng%2Bheb.jpg),"eng,heb",,"English, Hebrew",,,,United States,2/15/2013,Public,Standard,,,,,,"Get a free English lesson with italki: http://promos.italki.com/wikitongues_eng, Get a free Hebrew lesson with italki: http://promos.italki.com/wikitongues_heb",2 checked out of 2,checked,,,,,2,checked,vO87PpdQKV4,https://youtu.be/vO87PpdQKV4,"55,600,000 in United Kingdom (ELDIA 2012). Population total all countries: 335,148,868. L2 users: 1,500,000 in United Kingdom (Crystal 2003). L2 users worldwide: 505,000,000., 4,850,000 in Israel (1998). Spoken by all Israelis as L1 or L2. Some who use it as L1 now in Israel learned it as L2 originally. Population total all countries: 5,302,770.","Indo-European, Germanic, West, English, Afro-Asiatic, Semitic, Central, South, Canaanite",Indo-European,"English,Hebrew,,,,",,"Eurasia, Eurasia, Eurasia",,2014-12-22,, +Will_20130223_cmn,Will__20130223,Daniel_BogreUdell_20130101,2/23/2013,Will_s1_M_20130223_cmn.png (https://dl.airtable.com/CE6YqQxJQCCrWSJmoL4k_Will_s1_M_20130223_cmn.png),Will_s1_M_20130223_cmn.jpg (https://dl.airtable.com/MbwhSaPLQbyu6MH8DjDw_Will_s1_M_20130223_cmn.jpg),cmn,,"Chinese, Mandarin",Mandarin,,,United States,2/23/2013,Public,Standard,,,,,,,1 checked out of 1,,,,,,1,checked,DbArjSCZvOQ,https://youtu.be/DbArjSCZvOQ,"840,000,000 in China (2000 census), increasing. 70% of Chinese language users speak a Mandarin dialect as L1. Population total all countries: 847,808,270. L2 users: 178,000,000 in China.","Sino-Tibetan, Chinese",Sino-Tibetan,"Mandarin,,,,,",,Eurasia,,2014-12-22,, +Natasha_20130224_eng,Natasha__20130224,Daniel_BogreUdell_20130101,2/24/2013,natasha.png (https://dl.airtable.com/UMeXySRHTUecaZu3omhh_natasha.png),Natasha_s1_F_20130224_eng.jpg (https://dl.airtable.com/I5FkXXlVTBm5Z5dKBPqD_Natasha_s1_F_20130224_eng.jpg),eng,,English,,,,United States,2/24/2013,Public,Standard,,,,,,Get a free English lesson with italki: http://promos.italki.com/wikitongues_eng,1 checked out of 1,checked,,,,,1,checked,RCZF42aj2Po,https://youtu.be/RCZF42aj2Po,"55,600,000 in United Kingdom (ELDIA 2012). Population total all countries: 335,148,868. L2 users: 1,500,000 in United Kingdom (Crystal 2003). L2 users worldwide: 505,000,000.","Indo-European, Germanic, West, English",Indo-European,"English,,,,,",,"Eurasia, Eurasia",,2014-12-22,, +Kostas_20130303_ell,Kostas__20130303,Daniel_BogreUdell_20130101,3/3/2013,kostas.png (https://dl.airtable.com/aiQsjBVPSEKVs7mrAzzn_kostas.png),Kostas_s1_M_20130303_ell.jpg (https://dl.airtable.com/baR7l8ujQDODgi13LSa0_Kostas_s1_M_20130303_ell.jpg),ell,,Greek,,,,United States,3/3/2013,Public,Standard,,,,,,,1 checked out of 1,,,Facebook,2016-7-9,https://www.facebook.com/wikitongues/videos/1146577512073441/,1,checked,7o8NcTiXGYI,https://youtu.be/7o8NcTiXGYI,"10,700,000 in Greece (ELDIA 2012). Population total all countries: 13,432,940.","Indo-European, Greek, Attic",Indo-European,"Greek,,,,,",,"Eurasia, Eurasia",,2014-12-22,, +Jenni_20130303_fin,Jenni__20130303,Daniel_BogreUdell_20130101,3/3/2013,Jenni_s1_F_20130303_fin.png (https://dl.airtable.com/DuMhSkW3QbWIhZDJu5nI_Jenni_s1_F_20130303_fin.png),WaUuC5bQSi4jEd36sTy6_large_Jenni_s1_F_20130303_fin.jpg (https://dl.airtable.com/iIXgLqqoQXeynyDwxiKc_WaUuC5bQSi4jEd36sTy6_large_Jenni_s1_F_20130303_fin.jpg),fin,,Finnish,,,,United States,3/3/2013,Public,Standard,,checked,,,,Get a free Finnish lesson with italki: http://promos.italki.com/wikitongues_fin,1 checked out of 1,checked,,,,,1,checked,FxrCNf8utsE,https://youtu.be/FxrCNf8utsE,"5,100,000 in Finland (ELDIA 2012). 30,000 speakers of Tornedalen Finnish. Population total all countries: 5,392,180.","Uralic, Finnic",Uralic,"Finnish,,,,,",,Eurasia,,2014-12-22,, +Kimberly_20130303_lkt,Kimberly__20130303,Daniel_BogreUdell_20130101,3/3/2013,kimberly.png (https://dl.airtable.com/X909e8rFSiaRt9rxtbUB_kimberly.png),Kimberly_s1_F_20130303_lkt.jpg (https://dl.airtable.com/j5mDXCIgTYFzJOtOfDKL_Kimberly_s1_F_20130303_lkt.jpg),lkt,,Lakota,,,Unknown Variant,United States,3/3/2013,Public,Standard,,,,,,,1 checked out of 1,,,Facebook,2016-9-20,https://www.facebook.com/wikitongues/videos/1208733949191130/,1,checked,w9MvPytHDvk,https://youtu.be/w9MvPytHDvk,"6,000 in United States (1997 R. Pustet), decreasing. 25,000 L1 speakers of all Sioux dialects in a total population of 103,000 (Golla 2007). Population total all countries: 6,190. Ethnic population: 20,000 (1997 R. Pustet). 103,255 ethnic Sioux in the United States (1990 census).","Siouan-Catawban, Siouan, Mississippi Valley-Ohio Valley Siouan, Mississippi Valley Siouan, Dakota",Siouan-Catawban,"Lakota,,,,,",,Americas,,2014-12-22,, +Emily_20130309_nor,Emily__20130309,Daniel_BogreUdell_20130101,3/9/2013,Emily_s1_F_20130309_nor.png (https://dl.airtable.com/LVgPVPbKQFePjr8zWo6q_Emily_s1_F_20130309_nor.png),Emily_s1_F_20130309_nor.jpg (https://dl.airtable.com/RZVTs8UJQuueCBmqyjan_Emily_s1_F_20130309_nor.jpg),nor,,Norwegian,,,,United States,3/9/2013,Public,Standard,,,,,,Get a free Norwegian lesson with italki: http://promos.italki.com/wikitongues_nor,1 checked out of 1,checked,,,,,1,checked,fk3Cq0mR6_4,https://youtu.be/fk3Cq0mR6_4,"4,640,000 in Norway. Population total all countries: 4,741,780.","Indo-European, Germanic, North, East Scandinavian, Danish-Swedish, Danish-Bokmal",Indo-European,"Norwegian,,,,,",,Eurasia,,2014-12-22,, +Lama_20130311_eng+ajp,Lama__20130311,Daniel_BogreUdell_20130101,3/11/2013,lama.png (https://dl.airtable.com/sPzZcRyubY2aRqqLUaAN_lama.png),Lama_s2_F_20130311_eng+ajp.jpg (https://dl.airtable.com/wB8mVNHXRvyK9TLg55K7_Lama_s2_F_20130311_eng%2Bajp.jpg),"eng,ajp",,"English, Arabic, South Levantine Spoken",Palestinian Arabic,,,United States,3/11/2013,Public,Standard,,,,,"Palestinian Arabic + +",Get a free English lesson with italki: http://promos.italki.com/wikitongues_eng,2 checked out of 2,checked,,Facebook,2016-7-27,https://www.facebook.com/wikitongues/videos/1159869884077537/,2,checked,nqOtvem2dxs,https://youtu.be/nqOtvem2dxs,"55,600,000 in United Kingdom (ELDIA 2012). Population total all countries: 335,148,868. L2 users: 1,500,000 in United Kingdom (Crystal 2003). L2 users worldwide: 505,000,000., 3,500,000 in Jordan (1996). Population total all countries: 6,200,000.","Indo-European, Germanic, West, English, Afro-Asiatic, Semitic, Central, South, Arabic",Indo-European,"English,Palestinian Arabic,,,,",,"Eurasia, Eurasia, Eurasia",,2014-12-22,, +YiShan_20130311_cmn,YiShan__20130311,Daniel_BogreUdell_20130101,3/11/2013,yishan.png (https://dl.airtable.com/R1h7NgTlQaSFicfi17no_yishan.png),YiShan_s1_F_20130311_cmn.jpg (https://dl.airtable.com/64Jucv62TkCLfKNyD3zv_YiShan_s1_F_20130311_cmn.jpg),cmn,,"Chinese, Mandarin",Mandarin,,,United States,3/11/2013,Public,Standard,,,,,,,1 checked out of 1,,,Facebook,2016-6-9,https://www.facebook.com/wikitongues/videos/1126439340753925/,1,checked,M2xmsclh3UA,https://youtu.be/M2xmsclh3UA,"840,000,000 in China (2000 census), increasing. 70% of Chinese language users speak a Mandarin dialect as L1. Population total all countries: 847,808,270. L2 users: 178,000,000 in China.","Sino-Tibetan, Chinese",Sino-Tibetan,"Mandarin,,,,,",,Eurasia,,2014-12-22,, +Anita_20130329_cat,Anita__20130329,Daniel_BogreUdell_20130101,3/29/2013,anita.png (https://dl.airtable.com/gyYaQH4gSXeEcS97720n_anita.png),Anita_s1_F_20130329_cat.jpg (https://dl.airtable.com/7nK1XdBaRZ28HqGwh4QL_Anita_s1_F_20130329_cat.jpg),cat,,Catalan,,,,United States,3/29/2013,Public,Standard,,,,,,Get a free Catalan lesson with italki: http://promos.italki.com/wikitongues_cat,1 checked out of 1,checked,,,,,1,checked,M6ZdYNFo6gM,https://youtu.be/M6ZdYNFo6gM,"3,750,000 in Spain (ELDIA 2012). Population total all countries: 4,079,420. L2 users: 5,150,000 in Spain (ELDIA 2012).","Indo-European, Italic, Romance, Italo-Western, Western, Gallo-Iberian, Ibero-Romance, East Iberian",Indo-European,"Catalan,,,,,",,"Eurasia, Eurasia",,2014-12-22,, +Ona_20130329_cat,Ona__20130329,Daniel_BogreUdell_20130101,3/29/2013,Ona_s1_F_20130329_cat.png (https://dl.airtable.com/xpeaJ45OTaCWyhwUko7R_Ona_s1_F_20130329_cat.png),Ona_s1_F_20130329_cat.jpg (https://dl.airtable.com/Dgxshk1URRiTzPlvjsP2_Ona_s1_F_20130329_cat.jpg),cat,,Catalan,,,,United States,3/29/2013,Public,Standard,,,,,,Get a free Catalan lesson with italki: http://promos.italki.com/wikitongues_cat,1 checked out of 1,checked,,,,,1,checked,nN4fDhAcGTM,https://youtu.be/nN4fDhAcGTM,"3,750,000 in Spain (ELDIA 2012). Population total all countries: 4,079,420. L2 users: 5,150,000 in Spain (ELDIA 2012).","Indo-European, Italic, Romance, Italo-Western, Western, Gallo-Iberian, Ibero-Romance, East Iberian",Indo-European,"Catalan,,,,,",,"Eurasia, Eurasia",,2014-12-22,, +Krzyś_20130329_pol,Krzyś__20130329,Daniel_BogreUdell_20130101,3/29/2013,krysz.png (https://dl.airtable.com/QT2salzlToafhRlUJ6AB_krysz.png),Krzyś_s1_M_20130329_pol.jpg (https://dl.airtable.com/gn77z3HTJS97ERo7ubHr_Krzys%CC%81_s1_M_20130329_pol.jpg),pol,,Polish,,,,United States,3/29/2013,Public,Standard,,,,,,Get a free Polish lesson with italki: http://promos.italki.com/wikitongues_pol,1 checked out of 1,checked,,,,,1,checked,GaN884-JfB8,https://youtu.be/GaN884-JfB8,"36,600,000 in Poland (ELDIA 2012). Population total all countries: 38,663,780.","Indo-European, Slavic, West, Lechitic",Indo-European,"Polish,,,,,",,Eurasia,,2014-12-22,, +Joyce_20130329_yue,Joyce__20130329,Daniel_BogreUdell_20130101,3/29/2013,joyce.png (https://dl.airtable.com/HPSIRQg0SiWbTuQMUyJW_joyce.png),Joyce_s1_F_20130329_yue.jpg (https://dl.airtable.com/YhMCut2bQZm21QhYyMa4_Joyce_s1_F_20130329_yue.jpg),yue,,"Chinese, Yue",Cantonese,,,United States,3/29/2013,Public,Standard,,,,,,,1 checked out of 1,,,,,,1,checked,Ki4W4QVm2Hk,https://youtu.be/Ki4W4QVm2Hk,"52,000,000 in China (1984). Population total all countries: 62,221,560.","Sino-Tibetan, Chinese",Sino-Tibetan,"Cantonese,,,,,",,Eurasia,,2014-12-22,, +Pascal_20130510_deu,Pascal__20130510,Daniel_BogreUdell_20130101,5/10/2013,pascal.png (https://dl.airtable.com/7Mc2wDbTSW9PbQE5LTwD_pascal.png),Pascal_s1_M_20130510_deu.jpg (https://dl.airtable.com/m9H5EStuSMODSxHOqypj_Pascal_s1_M_20130510_deu.jpg),deu,,"German, Standard",German,,,United States,5/10/2013,Public,Standard,,,,,,"Get a free German, Standard lesson with italki: http://promos.italki.com/wikitongues_deu",1 checked out of 1,checked,,,,,1,checked,9OkYYixgCes,https://youtu.be/9OkYYixgCes,"69,800,000 in Germany (ELDIA 2012). Population total all countries: 78,245,280. L2 users: 8,000,000 in Germany (ELDIA 2012).","Indo-European, Germanic, West, High German, German, Middle German, East Middle German",Indo-European,"German,,,,,",,"Eurasia, Eurasia",,2014-12-22,, +Wanyu_20131103_cmn,Wanyu__20131103,Daniel_BogreUdell_20130101,11/3/2013,wanyu.png (https://dl.airtable.com/sA9vn7zzRnyEK6Sl34x2_wanyu.png),Wanyu_s1_F_20131103_cmn.jpg (https://dl.airtable.com/PZdkBbHLSn2I0X3hWPDQ_Wanyu_s1_F_20131103_cmn.jpg),cmn,,"Chinese, Mandarin",Mandarin,,,United States,11/3/2013,Public,Standard,,,,,,,1 checked out of 1,,,,,,1,checked,B-qxGhkRojc,https://youtu.be/B-qxGhkRojc,"840,000,000 in China (2000 census), increasing. 70% of Chinese language users speak a Mandarin dialect as L1. Population total all countries: 847,808,270. L2 users: 178,000,000 in China.","Sino-Tibetan, Chinese",Sino-Tibetan,"Mandarin,,,,,",,Eurasia,,2014-12-22,, +Scarlett_20131103_urd,Scarlett__20131103,Daniel_BogreUdell_20130101,11/3/2013,scarlet.png (https://dl.airtable.com/LzHCqWvxTXGZtUr3epW1_scarlet.png),Scarlett_s1_F_20131103_urd.jpg (https://dl.airtable.com/A6KQetgQLGMqsOEVVncl_Scarlett_s1_F_20131103_urd.jpg),urd,,Urdu,,,,United States,11/3/2013,Public,Standard,,,,,,Get a free Urdu lesson with italki: http://promos.italki.com/wikitongues_urd,1 checked out of 1,checked,,,,,1,checked,pru-95YczT4,https://youtu.be/pru-95YczT4,"10,000,000 in Pakistan (1998 census). Population total all countries: 63,948,800. L2 users: 94,000,000 in Pakistan (1999).","Indo-European, Indo-Iranian, Indo-Aryan, Central zone, Western Hindi, Hindustani",Indo-European,"Urdu,,,,,",,Eurasia,,2014-12-22,, +Jon_20131201_eus,Jon__20131201,Daniel_BogreUdell_20130101,12/1/2013,Jon_s1_M_20131201_eus.png (https://dl.airtable.com/cwItDUksSI64Xw93QF6v_Jon_s1_M_20131201_eus.png),Jon_s1_M_20131201_eus.jpg (https://dl.airtable.com/x54nU1j2T8OkX2winZh3_Jon_s1_M_20131201_eus.jpg),eus,,Basque,,,,United States,12/1/2013,Public,Standard,,,,,,Get a free Basque lesson with italki: http://promos.italki.com/wikitongues_eus,1 checked out of 1,checked,,,,,1,checked,suK34prc56o,https://youtu.be/suK34prc56o,"468,000 in Spain (ELDIA 2012). Population total all countries: 545,872. Ethnic population: 2,000,000 residents of 3 provinces of Basque territory; 25% born outside territory, 40% in territory born to Basque parents. 4,400,000 in Spain have Basque surname; 19% live in Basque country.",Language isolate,,"Basque,,,,,",,Eurasia,,2014-12-22,, +Päivi_20131201_fin,Päivi__20131201,Daniel_BogreUdell_20130101,12/1/2013,Paivi_s1_F_20131201_fin.png (https://dl.airtable.com/FZ5MP7MQR4CpjR6smqtZ_Paivi_s1_F_20131201_fin.png),Paivi_s1_F_20131201_fin.jpg (https://dl.airtable.com/gQsU5n8OTlWCR7mh7UVO_Paivi_s1_F_20131201_fin.jpg),fin,,Finnish,,,,United States,12/1/2013,Public,Standard,,,,,,Get a free Finnish lesson with italki: http://promos.italki.com/wikitongues_fin,1 checked out of 1,checked,,,,,1,checked,r6xt8HZy1-k,https://youtu.be/r6xt8HZy1-k,"5,100,000 in Finland (ELDIA 2012). 30,000 speakers of Tornedalen Finnish. Population total all countries: 5,392,180.","Uralic, Finnic",Uralic,"Finnish,,,,,",,Eurasia,,2014-12-22,, +Rachal_20131201_yue,Rachal__20131201,Daniel_BogreUdell_20130101,12/1/2013,rachal.png (https://dl.airtable.com/KeEdMjJcQJqJIizxgiSN_rachal.png),Rachal_s1_F_20131201_yue.jpg (https://dl.airtable.com/YzE39iYOQMCU80GFlMGN_Rachal_s1_F_20131201_yue.jpg),yue,,"Chinese, Yue",Cantonese,,,United States,12/1/2013,Public,Standard,,,,,,,1 checked out of 1,,,Facebook,2016-8-20,https://www.facebook.com/wikitongues/videos/1179640018767190/,1,checked,N0GY23080G0,https://youtu.be/N0GY23080G0,"52,000,000 in China (1984). Population total all countries: 62,221,560.","Sino-Tibetan, Chinese",Sino-Tibetan,"Cantonese,,,,,",,Eurasia,,2014-12-22,, +Leslie_20140209_eng,Leslie__20140209,Daniel_BogreUdell_20130101,2/9/2014,leslie.png (https://dl.airtable.com/U9JsvsbsSq6hbAAhHR3O_leslie.png),Leslie_s1_F_20140209_eng.png (https://dl.airtable.com/GghtpiZFQsiVsGITO4jf_Leslie_s1_F_20140209_eng.png),eng,,English,,,,United States,2/9/2014,Public,Standard,,,,,,Get a free English lesson with italki: http://promos.italki.com/wikitongues_eng,1 checked out of 1,checked,,,,,1,checked,hVhqmUHKnqI,https://youtu.be/hVhqmUHKnqI,"55,600,000 in United Kingdom (ELDIA 2012). Population total all countries: 335,148,868. L2 users: 1,500,000 in United Kingdom (Crystal 2003). L2 users worldwide: 505,000,000.","Indo-European, Germanic, West, English",Indo-European,"English,,,,,",,"Eurasia, Eurasia",,2014-12-22,, +Kevin_20140217_eng,Kevin__20140217,Daniel_BogreUdell_20130101,2/17/2014,kevin.png (https://dl.airtable.com/8rmbfvsRS1KWLBeOIUtW_kevin.png),Kevin_s1_M_20140217_eng.png (https://dl.airtable.com/tE5BryMiSmaThPd99mVf_Kevin_s1_M_20140217_eng.png),eng,,English,,,,United States,2/17/2014,Public,Standard,,,,,,Get a free English lesson with italki: http://promos.italki.com/wikitongues_eng,1 checked out of 1,checked,,,,,1,checked,ZMfuNUWBlYE,https://youtu.be/ZMfuNUWBlYE,"55,600,000 in United Kingdom (ELDIA 2012). Population total all countries: 335,148,868. L2 users: 1,500,000 in United Kingdom (Crystal 2003). L2 users worldwide: 505,000,000.","Indo-European, Germanic, West, English",Indo-European,"English,,,,,",,"Eurasia, Eurasia",,2014-12-22,, +Conor_20140302_spa,Conor__20140302,Daniel_BogreUdell_20130101,3/2/2014,connor.png (https://dl.airtable.com/CviLVMiASY6VILeFZG8G_connor.png),Conor_s1_M_20140302_spa.jpg (https://dl.airtable.com/79ZOn7YVTfGunL7rYiua_Conor_s1_M_20140302_spa.jpg),spa,,Spanish,,,,United States,3/2/2014,Public,Standard,,,,,,Get a free Spanish lesson with italki: http://promos.italki.com/wikitongues_spa,1 checked out of 1,checked,,,,,1,checked,eYwvcqHcKW8,https://youtu.be/eYwvcqHcKW8,"38,400,000 in Spain (ELDIA 2012). Population total all countries: 414,170,030. L2 users: 7,490,000 in Spain (ELDIA 2006).","Indo-European, Italic, Romance, Italo-Western, Western, Gallo-Iberian, Ibero-Romance, West Iberian, Castilian",Indo-European,"Spanish,,,,,",,"Eurasia, Eurasia",,2014-12-22,, +MaríaJosé_20140309_spa,MaríaJosé__20140309,Daniel_BogreUdell_20130101,3/9/2014,mariajose.png (https://dl.airtable.com/6FMXUq5sTySOax0Q5RVn_mariajose.png),MariaJose_s1_F_20140309_spa.jpg (https://dl.airtable.com/9vtcsTW5SOuAvRNqK3nX_MariaJose_s1_F_20140309_spa.jpg),spa,,Spanish,,,,United States,3/9/2014,Public,Standard,,,,,,Get a free Spanish lesson with italki: http://promos.italki.com/wikitongues_spa,1 checked out of 1,checked,,,,,1,checked,KwAvCpU-z-w,https://youtu.be/KwAvCpU-z-w,"38,400,000 in Spain (ELDIA 2012). Population total all countries: 414,170,030. L2 users: 7,490,000 in Spain (ELDIA 2006).","Indo-European, Italic, Romance, Italo-Western, Western, Gallo-Iberian, Ibero-Romance, West Iberian, Castilian",Indo-European,"Spanish,,,,,",,"Eurasia, Eurasia",,2014-12-22,, +Omar_20140323_eng,Omar__20140323,Daniel_BogreUdell_20130101,3/23/2014,omar.png (https://dl.airtable.com/5qSR7A9kSu2YkhID1FwM_omar.png),Omar_s1_M_20140323_eng.jpg (https://dl.airtable.com/BpQzJOFpQrynYVVpEzzg_Omar_s1_M_20140323_eng.jpg),eng,,English,"English,Patois",,,United States,3/23/2014,Public,Standard,,,,,,Get a free English lesson with italki: http://promos.italki.com/wikitongues_eng,1 checked out of 1,checked,,Facebook,2016-6-13,,1,checked,DmvDD9kJipE,https://youtu.be/DmvDD9kJipE,"55,600,000 in United Kingdom (ELDIA 2012). Population total all countries: 335,148,868. L2 users: 1,500,000 in United Kingdom (Crystal 2003). L2 users worldwide: 505,000,000.","Indo-European, Germanic, West, English",Indo-European,"English,Jamaican Patois,,,,",,"Eurasia, Eurasia",,2014-12-22,, +Artur_20150421_cat,Artur__20150421,Daniel_BogreUdell_20130101,4/21/2015,artur.png (https://dl.airtable.com/uiaP50oQRpS79fXXSFLq_artur.png),Artur_s1_M_20150421_cat.jpg (https://dl.airtable.com/5IJXR34qReGfwDwUWagX_Artur_s1_M_20150421_cat.jpg),cat,,Catalan,,,,United States,4/21/2015,Public,Standard,,,"Un gran escriptor català, Josep Pla, deia que ell sabia que estava en el seu país quan deia bon dia i li responien bon dia. + +Doncs això es precisament el que significa una llengua, sentir-te a casa teva, identificar-te amb una identitat pròpia, amb unes arrels, amb la teva manera de fer, amb la teva manera de ser perquè totes aquestes coses van lligades les unes amb les altres. + +Jo soc català, i soc català entre d'altres coses perquè parlo el català. També n'hi han catalans que no parlen el català habitualment però també son catalans, però aquest sentiment de pertinença, aquest sentiment de saber que pertanyo a una cultura molt antiga, a una cultura que ha donat o que ha fet aportacions universals també des de la llengua, que es una llengua viva, que la hem sabuda conservar, que la hem sabuda fer progressar, que hem hagut de lluitar molt perquè fos una llengua encara avui viva, ho es. + +I això només te el mèrit dels catalans. Si nosaltres no ens ho haguéssim cregut, avui en dia el català com altres llengües seria una llengua morta. Però una llengua morta no fa una bona aportació a la cultura universal. + +I el català avui es pot plantejar, més que mai, de fer aquesta molt bona i positiva aportació a la cultura universal.","A great Catalan writer, Josep Pla, used to say that he knew he was in his own country when he said ""Bon dia [Good day]"" and people would respond, ""Bon dia [Good day]"". + +Well, this is precisely the meaning of language. It's feeling at home, identifying with a unique identity, with your roots, with your own way of doing, and your own way of being, because all these things are interconnected with one another. + +I'm Catalan, and I'm Catalan because among several reasons I speak Catalan. There are also Catalans who don't speak Catalan regularly and they're also Catalans, but this feeling of belonging, this feeling of knowing that I pertain to an old culture, a culture that has given or has made universal contributions with its language, which is a living language that we have known how to conserve, that we have known how to advance, which we've known to fight hard for so it remains a living language today, is very real. + +And the merit is of the Catalans. If we hadn't believed in it, the Catalan language today would be, like many other languages, dead. But a dead language doesn't contribute to universal culture.  + +And the Catalan language today can raise itself up, more than ever, by making this very good and very positive contribution to universal culture.",,Get a free Catalan lesson with italki: http://promos.italki.com/wikitongues_cat,1 checked out of 1,checked,,,,,1,checked,p85oX1cewf4,https://youtu.be/p85oX1cewf4,"3,750,000 in Spain (ELDIA 2012). Population total all countries: 4,079,420. L2 users: 5,150,000 in Spain (ELDIA 2012).","Indo-European, Italic, Romance, Italo-Western, Western, Gallo-Iberian, Ibero-Romance, East Iberian",Indo-European,"Galician,,,,,",,"Eurasia, Eurasia",,2015-4-14,, +John_20151003_-jbo,John__20140617,Daniel_BogreUdell_20130101,10/3/2015,john.png (https://dl.airtable.com/tEqm27KSCO482BTFqB4g_john.png),John_s1_M_20151003_-jbo.png (https://dl.airtable.com/nKhzBCNTQTuh3MGgBvVm_John_s1_M_20151003_-jbo.png),-jbo,,Lojban,,,No Language ISO,United States,10/4/2015,Public,Standard,,,,,,,1 checked out of 1,,,,,,1,checked,lxQjwbUiM9w,https://youtu.be/lxQjwbUiM9w,,,,"Lojban,,,,,",,,,2014-12-22,, +Pablo_20160107_cab,Pablo__20160107,Daniel_BogreUdell_20130101,1/7/2016,pablo-cab-thumb-raw.png (https://dl.airtable.com/0ji6ufZLQue0o1H2EOuF_pablo-cab-thumb-raw.png),pablo-cab-thumb.jpg (https://dl.airtable.com/VGcbAhVS0q8I84c9gl4f_pablo-cab-thumb.jpg),cab,,Garifuna,,,,United States,1/26/2016,Public,Standard,,,,,,,1 checked out of 1,,3,,,,1,checked,_WN-6t58HdM,https://youtu.be/_WN-6t58HdM,"98,000 in Honduras (Rivas 1993). Population total all countries: 195,800. 100 monolinguals.","Maipurean, Northern, Maritime, Ta-Maipurean, Iñeri",Maipurean,§,,Americas,,2016-1-9,, +Yochai_20151201_aeb+heb,Yochai__20151201,Daniel_BogreUdell_20130101,12/1/2015,yochai-hebaeb-thumb-raw.png (https://dl.airtable.com/WNIfb4j3QlCsoW2muTM9_yochai-hebaeb-thumb-raw.png),yochai-heb-thumb.jpg (https://dl.airtable.com/m6GPcBMOTE7e3jgbjFSi_yochai-heb-thumb.jpg),"aeb,heb",,"Arabic, Tunisian Spoken, Hebrew",,,,United States,2/6/2016,Public,Standard,,,,,,Get a free Hebrew lesson with italki: http://promos.italki.com/wikitongues_heb,2 checked out of 2,,6,,2016-8-6,,2,checked,5ax900reMWM,https://youtu.be/5ax900reMWM,"9,000,000 in Tunisia (1995). Population total all countries: 9,406,900., 4,850,000 in Israel (1998). Spoken by all Israelis as L1 or L2. Some who use it as L1 now in Israel learned it as L2 originally. Population total all countries: 5,302,770.","Afro-Asiatic, Semitic, Central, South, Arabic, Afro-Asiatic, Semitic, Central, South, Canaanite",Afro-Asiatic,§,,"Africa, Eurasia",,2015-12-1,, +Dale_20160110_pdc,Dale__20160110,Daniel_BogreUdell_20130101,1/10/2016,dale-psdeng-thumb-raw.png (https://dl.airtable.com/FhO8FQO6RZGu9tkkDq0K_dale-psdeng-thumb-raw.png),Dale_s1_M_20160110_pdc.jpg (https://dl.airtable.com/9afBGYK2Q4aMqwfjGb1N_Dale_s1_M_20160110_pdc.jpg),pdc,,"German, Pennsylvania",,,,United States,2/10/2016,Public,Standard,,,,,,,1 checked out of 1,,8,,,,1,checked,oMbvC_siQyc,https://youtu.be/oMbvC_siQyc,"118,000 in United States (2010 census), increasing. Population total all countries: 133,000. Ethnic population: 200,000 (Kloss 1981).","Indo-European, Germanic, West, High German, German, Middle German, West Middle German",Indo-European,§,,Americas,,2016-1-11,, +Ram_20160415_taj,Ram__20160415,Daniel_BogreUdell_20130101,4/15/2016,Screen Shot 2016-05-13 at 13.52.39.png (https://dl.airtable.com/v01G1dwWQT6clKavlEml_Screen%20Shot%202016-05-13%20at%2013.52.39.png),Ram_s4_M_20160415_taj.jpg (https://dl.airtable.com/Adq8JoOeTLeBuxRQeUKD_Ram_s4_M_20160415_taj.jpg),taj,,"Tamang, Eastern",," +",,United States,5/14/2016,Public,Standard,,,,,,,1 checked out of 1,,32,,,,1,checked,YbIyO-cMwhw,https://youtu.be/YbIyO-cMwhw,"1,180,000 in Nepal (2001 census), increasing. Population for all Tamang varieties: 1,350,000 (2011 census). Population total all countries: 1,197,500. In some remote communities, particularly women, children and elderly people are monolingual. Ethnic population: 1,290,000 (2001 census). L2 users: 23,600 in Nepal (1991 census). L2 speakers of all Tamang.","Sino-Tibetan, Tibeto-Burman, Western Tibeto-Burman, Bodish, West Bodish, Gurung-Tamang, Tamang",Sino-Tibetan,§,,Eurasia,,2016-4-21,, +Tory_20160606_gcf,Tory_Seminore_20160606,Daniel_BogreUdell_20130101,6/6/2016,Screen Shot 2016-07-27 at 14.27.25.png (https://dl.airtable.com/sVdrldP0QaG5n1CNFJvG_Screen%20Shot%202016-07-27%20at%2014.27.25.png),Tory_s1_M_20160606_gcf.jpg (https://dl.airtable.com/BlT0jkhRyiYh24fnOSpX_Tory_s1_M_20160606_gcf.jpg),gcf,,Guadeloupean Creole French,Martinique Creole,,,United States,7/31/2016,Public,CC BY-NC 3.0,,,,,,,1 checked out of 1,,,Facebook,2017-9-20,https://www.facebook.com/wikitongues/videos/1574406612623860/,1,,-kFzjAR-05M,https://youtu.be/-kFzjAR-05M,"430,000 in Guadeloupe (2001). Population total all countries: 849,000.",French Creole,,§Martinique Creole,,"Americas, Americas",,2016-6-8,, +Siobhán_20170425_gle,Siobhán_Kavanagh_20170425,Daniel_BogreUdell_20130101,4/25/2017,Screen Shot 2017-05-02 at 13.46.47.png (https://dl.airtable.com/7UChVtujQQGOD9SkDvLo_Screen%20Shot%202017-05-02%20at%2013.46.47.png),Siobhán_s1_F_20170425_gle.jpg (https://dl.airtable.com/mP7CNIxSSnWCUcrItsCW_Siobha%CC%81n_s1_F_20170425_gle.jpg),gle,,Irish,,"New York City, Native speaker",,United States,5/4/2017,Public,CC BY-NC 3.0,,,,,,Get a free Irish lesson with italki: http://promos.italki.com/wikitongues_gle,1 checked out of 1,,,,,,1,,jeSxC2RNSkk,https://youtu.be/jeSxC2RNSkk,"138,000 in Ireland (ELDIA 2012). Population total all countries: 276,310. L2 users: 1,000,000 in Ireland (ELDIA 2012).","Indo-European, Celtic, Insular, Goidelic",Indo-European,§,,Eurasia,,2017-4-25,, +Prionsías_20170425_gle,Prionsías_Longworth_20170425,Daniel_BogreUdell_20130101,4/25/2017,Prionsías_20170425_gle.png (https://dl.airtable.com/U9a9nGCmQdiHo5DTRP5A_Prionsi%CC%81as_20170425_gle.png),Prionsias_20170425_gle.png (https://dl.airtable.com/S32vaiEfS8GDCOCIgtaA_Prionsias_20170425_gle.png),gle,,Irish,,"New York City, English name Frances",,United States,8/5/2017,Public,CC BY-NC 3.0,,,,,,Get a free Irish lesson with italki: http://promos.italki.com/wikitongues_gle,1 checked out of 1,,,,2018-1-21,https://www.facebook.com/wikitongues/videos/1694236517307535/,1,,9ZV7Rb2bAIc,https://youtu.be/9ZV7Rb2bAIc,"138,000 in Ireland (ELDIA 2012). Population total all countries: 276,310. L2 users: 1,000,000 in Ireland (ELDIA 2012).","Indo-European, Celtic, Insular, Goidelic",Indo-European,§,"This video was recorded by Daniel Bogre Udell during the Irish Language Day celebration at the Irish Arts Center in New York City, which Prionsías was attending. Irish is spoken by as many as 1.7 million people, primarily in the Republic of Ireland, where it is nationally official alongside English; in Northern Ireland, where it is a recognized minority language; and by diaspora communities worldwide, especially in North America. Irish was the primary language of Ireland until it was displaced by English over the 17th and 18th centuries under British rule. Since the late 1900s, a revival movement has emerged, with nearly 60% of speakers having learned the language as adults.",Eurasia,,2017-4-25,, +Martha+Albert_20171103_bar,"Martha_Hutter_20171103,Albert__20171103",Daniel_BogreUdell_20130101,11/3/2017,Screen Shot 2017-12-07 at 5.28.37 PM.png (https://dl.airtable.com/wAU072XFTQaq4IegTgU8_Screen%20Shot%202017-12-07%20at%205.28.37%20PM.png),Martha+Albert_20171103_bar.jpg (https://dl.airtable.com/IrFKurS0RzuJADwyO8C5_Martha%2BAlbert_20171103_bar.jpg),bar,,Bavarian,Gottscheerish,,,United States,12/21/2017,Public,CC BY-NC 3.0,,,,,,,1 checked out of 1,,,,,,1,,WmoSv7Cl1-M,https://youtu.be/WmoSv7Cl1-M,"7,830,000 in Austria (ELDIA 2012). Population total all countries: 14,089,000.","Indo-European, Germanic, West, High German, German, Upper German, Bavarian-Austrian",,,"This video was recorded by Daniel Bogre Udell at the Gottscheer Hall in the New York City borough of Queens. Gottscheerish, known natively as Göttscheabarisch, is spoken by an unknown number of people, primarily in the U.S. American states of New York and Ohio, and to a lesser extent in the Gottschee region of Slovenia, where the language originated. It is the mother tongue and heritage language of the Gottscheer people, who are the descendants of Germanic communities that settled in Eastern Europe during the 14th century CE. Conversely, the genealogy of Gottscheerish is Germanic, considered by most linguists to be a variety of the Bavarian language. Today, Gottscheerish is in steep decline, due to forced migrations and ethnic persecution spawned by the Second World War. However, preservation efforts have emerged in recent years, including a Gottscheer-English dictionary that Martha composed and published.",Eurasia,,2017-11-3,New York_US, +Frances_20170425_gle,Frances_Mulraney_20170425,Daniel_BogreUdell_20130101,4/25/2017,Screen Shot 2017-12-07 at 6.13.56 PM.png (https://dl.airtable.com/nOt5NqM9S4ufPJlMr0hw_Screen%20Shot%202017-12-07%20at%206.13.56%20PM.png),Frances_20170425_gle.jpg (https://dl.airtable.com/WEDlJE6DTX6bE7Ns5TB7_Frances_20170425_gle.jpg),gle,,Irish,,"New York City, goes by Fran",,United States,12/22/2017,Public,CC BY-NC 3.0,,,,,,Get a free Irish lesson with italki: http://promos.italki.com/wikitongues_gle,1 checked out of 1,,,,,,1,,ZKcvZmtar9g,https://youtu.be/ZKcvZmtar9g,"138,000 in Ireland (ELDIA 2012). Population total all countries: 276,310. L2 users: 1,000,000 in Ireland (ELDIA 2012).","Indo-European, Celtic, Insular, Goidelic",Indo-European,§,"This video was recorded by Daniel Bogre Udell during the Irish Language Day celebration at the Irish Arts Center in New York City, where Frances is a language teacher. Irish is spoken by as many as 1.7 million people, primarily in the Republic of Ireland, where it is nationally official alongside English; in Northern Ireland, where it is a recognized minority language; and by diaspora communities worldwide, especially in North America. Irish was the primary language of Ireland until it was displaced by English over the 17th and 18th centuries under British rule. Since the late 1900s, a revival movement has emerged, with nearly 60% of speakers having learned the language as adults. To that end, Frances regularly organizes Irish-language events outside her classes, including pub meets known as ‘Pop-up Gaeltachts’, referring to the Gaeltacht, or native Irish-speaking, region of Ireland.",Eurasia,,2017-4-25,, +Jide_20160319_yor,Jide__20160319,Daniel_BogreUdell_20130101,3/19/2016,Screen Shot 2017-12-07 at 7.00.40 PM.png (https://dl.airtable.com/qkd6zrAIT9qsL65s0E0H_Screen%20Shot%202017-12-07%20at%207.00.40%20PM.png),Jide_20160319_yor.jpg (https://dl.airtable.com/CDTl4H7nRCXqVMMj3GQM_Jide_20160319_yor.jpg),yor,,Yoruba,,,,United States,12/25/2017,Public,Standard,,,,,,Get a free Yoruba lesson with italki: http://promos.italki.com/wikitongues_yor,1 checked out of 1,,99,,,,1,,AYoVFf6ZRyA,https://youtu.be/AYoVFf6ZRyA,"18,900,000 in Nigeria (Johnstone 1993). Population total all countries: 19,380,800. L2 users: 2,000,000 in Nigeria.","Niger-Congo, Atlantic-Congo, Volta-Congo, Benue-Congo, Defoid, Yoruboid, Edekiri",Niger-Congo,§,"This video was recorded by Daniel Bogre Udell in New York City, USA, where he and Jide met. Yoruba is spoken by as many as 30 million people, predominantly in the West African nations of Nigeria and Benin. The language is characterized by a rich dialectical diversity, which is often academically organized into five varieties: Northwest, Northeast, Central, Southeast, and Southwest. Of these, the Northwestern Yoruba dialects have featured most prominently on the language’s chief written standard, which serves as the basis for most Yoruba media today. However, Yoruba is a pluricentric language, meaning that more than one formal or written standard exists. In addition to modern Literary Yoruba, for instance, the now-dormant Lucumí variety is the liturgical language of Santería, a religion of the Caribbean. ",Africa,,2016-3-21,, +Jasmin_20160717_new,Jasmin_Chitrakar_20160717,Daniel_BogreUdell_20130101,7/17/2016,Jasmin_20160717_new.png (https://dl.airtable.com/CqpTixYESrOubErjKO4D_Jasmin_20160717_new.png),Jasmin_20160717_new.jpg (https://dl.airtable.com/260kHR88Rj6kiFmohjVu_Jasmin_20160717_new.jpg),new,,Newar,,,,United States,2/23/2018,To Upload,Standard,,,,,,,1 checked out of 1,,,,,,1,,xe6ebodfmKU,https://youtu.be/xe6ebodfmKU,"847,000 in Nepal (2011 census), decreasing. Population total all countries: 861,000. Many women are monolingual. Ethnic population: 1,260,000. Includes 1,245,000 Newar and 11,500 Pahari.","Sino-Tibetan, Tibeto-Burman, Western Tibeto-Burman, Himalayan, Central Himalayan, Newar",Sino-Tibetan,§,"This video was recorded by Daniel Bogre Udell in New York City, USA. Newari, also known as Newar, is spoken by as many as 850,000 people in central Nepal. A literary language since at least the Medieval era, Newari emerged as a language of government by the 14th century CE and remained so through the mid-1800s. In the early 20th century, a shift in Nepal’s political landscape ushered in a set of challenges for Newari speakers, with the onset of discriminatory language policies that lasted through the country’s transition to democracy. Though Newari speakers continue to face some challenges in preserving their language for future generations, the political situation has improved: today, Newari is recognized as a regionally official language by the government of Nepal. A member of the Sino-Tibetan linguistic family, Newari shares closer roots with Tibetan than Nepali, an Indo-European language. Nonetheless, the close historical proximity of Newari and Nepali speakers has facilitated a degree of mutual influence.",Eurasia,,2016-7-18,, +Karen_20160717_yue,Karen_Wu_20160717,Daniel_BogreUdell_20130101,7/17/2016,Screen Shot 2018-02-27 at 7.16.48 PM.png (https://dl.airtable.com/MbjZL2OuTg2mcKn8JiJU_Screen%20Shot%202018-02-27%20at%207.16.48%20PM.png),Karen_20160717_yue.jpg (https://dl.airtable.com/0yt5aOyRVSiYTpGoSGjg_Karen_20160717_yue.jpg),yue,,"Chinese, Yue",Cantonese,,,United States,2/27/2018,To Upload,Standard,,,,,,,1 checked out of 1,,,,,,1,,xF_CJUadatY,https://youtu.be/xF_CJUadatY,"52,000,000 in China (1984). Population total all countries: 62,221,560.","Sino-Tibetan, Chinese",Sino-Tibetan,§Cantonese,"This video was recorded by Daniel Bogre Udell and Nawang Tsering in New York City, USA. Cantonese is the most widely spoken variety of Yue Chinese, which is the mother tongue of as many as 60,000,000 worldwide. It is primarily spoken in the Guangzhou region of southern China, as well as the Chinese territories of Hong Kong and Macau, where it is an official language. A member of the Sino-Tibetan language family and closely related to other mainland Chinese varieties, Cantonese emerged as a result of cultural exchange between speakers of Medieval Chinese and indigenous Tai languages between the seventh and tenth centuries CE. Today, Cantonese is among as many as nine dialect groups of Yue throughout the Chinese provinces of Guangdong and Guangxi. Since the rise of Cinema and popular music in Hong Kong in the mid twentieth century, there has been a lively media culture in Cantonese, making it among the most wide-reaching Chinese languages, second only to Mandarin.",Eurasia,,2016-7-18,, +Bertha_20151215_afs,Bertha__20151215,"Daniel_BogreUdell_20130101,Crawford_Hunt_",12/15/2015,bertha-afs-thumb-raw.png (https://dl.airtable.com/Dj4DAIUTLSpwWB0UbVgM_bertha-afs-thumb-raw.png),Bertha speaking Seminole Creole.jpg (https://dl.airtable.com/Ywly1mKySLieHEl7HiVm_Bertha%20speaking%20Seminole%20Creole.jpg),afs,,Afro-Seminole Creole,,"This video was recorded in Del Rio, a city in Texas not far from the Mexican border. Though fluency in the language has declined in recent decades, Bertha, a longtime Texas resident with ties to Coahuila, is considering working with community leaders to launch a revitalization movement, including organized language classes.",,United States,2/18/2016,Public,Standard,,,,,,,1 checked out of 1,,11,,,,1,checked,zLaE0SmZdMo,https://youtu.be/zLaE0SmZdMo,200 in Mexico (1990). Ethnic population: 500 (2007).,"English Creole, Atlantic, Eastern, Northern",English Creole,§,,Americas,,2015-9-21,, +Christian_20150407_fra,Christian_McClure_20150407,Christian_McClure_20150407,4/7/2015,christian-fra-thumb-raw.png (https://dl.airtable.com/J6vWKVS2200j6pBYggq3_christian-fra-thumb-raw.png),Christian_s1_M_20150407_fra.jpg (https://dl.airtable.com/YRsGiXQBTu2icKcrTwxo_Christian_s1_M_20150407_fra.jpg),fra,,French,New England French,,,United States,4/7/2015,Public,CC BY-NC 3.0,,,,,,Get a free French lesson with italki: http://promos.italki.com/wikitongues_fra,1 checked out of 1,checked,,,,,1,checked,Z0Iv5hrJsho,https://youtu.be/Z0Iv5hrJsho,"60,000,000 in France (ELDIA 2012). Population total all countries: 74,980,460.","Indo-European, Italic, Romance, Italo-Western, Western, Gallo-Iberian, Gallo-Romance, Gallo-Rhaetian, Oïl, French",Indo-European,"New England French,,,,,",,"Eurasia, Eurasia, Americas, Eurasia, Eurasia",,2015-3-19,, +Castelline_20170213_hat,Castelline_Tilus_20170213,Castelline_Tilus_20170213,2/13/2017,Screen Shot 2017-04-03 at 15.29.49.png (https://dl.airtable.com/RtBDTuRT3CXUwbBykzLM_Screen%20Shot%202017-04-03%20at%2015.29.49.png),Casteline_s1_F_20170213_hat.jpg (https://dl.airtable.com/yfLuqNoEQUGwXrhc3jf7_Casteline_s1_F_20170213_hat.jpg),hat,,Haitian,,,,United States,4/21/2017,Public,CC BY-SA 4.0,,,,,,Get a free Haitian lesson with italki: http://promos.italki.com/wikitongues_hat,1 checked out of 1,,,,,,1,,wAipXzYNztM,https://youtu.be/wAipXzYNztM,"6,960,000 in Haiti (2001). Population total all countries: 7,731,240.",French Creole,,§,,Americas,,2017-2-12,, +Camila_20160822_eng+por,Camila_Silva_20160822,Camila_Silva_20160822,8/22/2016,Screen Shot 2016-10-04 at 01.05.20.png (https://dl.airtable.com/zGtSJiM3S9erUc4iejvS_Screen%20Shot%202016-10-04%20at%2001.05.20.png),Camila_s2_F_20160822_eng+por.jpg (https://dl.airtable.com/io6yFEHNSn2rkVKQ8UTH_Camila_s2_F_20160822_eng%2Bpor.jpg),"eng,por",,"English, Portuguese",,,,United States,10/3/2016,Public,CC BY-NC 3.0,checked,,Introducing myself in English and saying that back in Brazil we speak Portuguese and not Spanish (Most people in US thinks that in Brazil we speak Spanish). In Portuguese - Saying that I was born and lived all my life in the same city. The most part of my life I studied in the same school where I knew my 2 best friends. And saying that if I had to say something to everybody on the world it would be \"Do an exchange or travel. That is the most incredible experience\",,,"Get a free English lesson with italki: http://promos.italki.com/wikitongues_eng, Get a free Portuguese lesson with italki: http://promos.italki.com/wikitongues_por",2 checked out of 2,,,,,,2,,rUfeztn-xz0,https://youtu.be/rUfeztn-xz0,"55,600,000 in United Kingdom (ELDIA 2012). Population total all countries: 335,148,868. L2 users: 1,500,000 in United Kingdom (Crystal 2003). L2 users worldwide: 505,000,000., 10,000,000 in Portugal (ELDIA 2012). Population total all countries: 203,349,200.","Indo-European, Germanic, West, English, Indo-European, Italic, Romance, Italo-Western, Western, Gallo-Iberian, Ibero-Romance, West Iberian, Portuguese-Galician",Indo-European,§,,"Eurasia, Eurasia, Eurasia, Eurasia",,2016-8-22,, +Adrian_20131213_eng+spa+por,Adrian__20131213,Adrian__20131213,12/13/2013,adrian.png (https://dl.airtable.com/cNxwP6sQT023UM7GcBq1_adrian.png),Adrian_s3_M_20131213_eng+por+spa.png (https://dl.airtable.com/oXwUeGerS86Ju9Cm27cH_Adrian_s3_M_20131213_eng%2Bpor%2Bspa.png),"eng,spa,por",,"English, Spanish, Portuguese",,,,United States,12/23/2013,Public,Standard,,,,,,"Get a free English lesson with italki: http://promos.italki.com/wikitongues_eng, Get a free Spanish lesson with italki: http://promos.italki.com/wikitongues_spa, Get a free Portuguese lesson with italki: http://promos.italki.com/wikitongues_por",3 checked out of 3,checked,,,,,3,checked,tqftb3zad1o,https://youtu.be/tqftb3zad1o,"55,600,000 in United Kingdom (ELDIA 2012). Population total all countries: 335,148,868. L2 users: 1,500,000 in United Kingdom (Crystal 2003). L2 users worldwide: 505,000,000., 38,400,000 in Spain (ELDIA 2012). Population total all countries: 414,170,030. L2 users: 7,490,000 in Spain (ELDIA 2006)., 10,000,000 in Portugal (ELDIA 2012). Population total all countries: 203,349,200.","Indo-European, Germanic, West, English, Indo-European, Italic, Romance, Italo-Western, Western, Gallo-Iberian, Ibero-Romance, West Iberian, Castilian, Indo-European, Italic, Romance, Italo-Western, Western, Gallo-Iberian, Ibero-Romance, West Iberian, Portuguese-Galician",Indo-European,"English,Spanish,Portuguese,,,",,"Eurasia, Eurasia, Eurasia, Eurasia, Eurasia, Eurasia",,2014-12-22,, +Lgeik'iHeather+Naakil.aanHans_20170329_tli,"Lgeik'iHeather_Powell_20170329,Naakil.aanHans_Chester_20170329",ADouglas_Callendar_,3/29/2017,Screen Shot 2017-04-03 at 15.44.39.png (https://dl.airtable.com/Dsgp4DOmQFuMax4THrsS_Screen%20Shot%202017-04-03%20at%2015.44.39.png),Lgeik'iHeather&NaakilAanHans_s1_FM_20170329_tli.jpg (https://dl.airtable.com/O5USDTjYRAuwrZaaXPre_Lgeik'iHeather%26NaakilAanHans_s1_FM_20170329_tli.jpg),tli,,Tlingit,Lingit,,,United States,4/25/2017,Public,CC BY-SA 4.0,checked,,,,,,1 checked out of 1,,,,,,1,,yjBhhSKuBd8,https://youtu.be/yjBhhSKuBd8,"500 in United States (Golla 2007), decreasing. Population total all countries: 630. Ethnic population: 10,000 (1995 M. Krauss).","Eyak-Athabaskan, Tlingit",Eyak-Athabaskan,§Lingit,,Americas,,2017-3-30,, +Hiroyuki_20170329_mvi,Hiroyuki_Nakama_20170329,ADouglas_Callendar_,3/29/2017,Screen Shot 2017-05-02 at 15.11.19.png (https://dl.airtable.com/a9i7sOQDQhKfIv3kW2GO_Screen%20Shot%202017-05-02%20at%2015.11.19.png),Hiroyuki_s1_M_20170329_mvi.jpg (https://dl.airtable.com/5WSydK2jQQelert4276d_Hiroyuki_s1_M_20170329_mvi.jpg),mvi,,Miyako,,,,United States,5/16/2017,Public,CC BY-SA 4.0,checked,,,,,,1 checked out of 1,,,,,,1,,yjBhhSKuBd8,https://youtu.be/yjBhhSKuBd8,"Ethnic population: 67,700 (2000).","Japonic, Ryukyuan, Sakishima",Japonic,§,,Eurasia,,2017-3-30,, +Kevin+Fuad_20170329_mcm,"Kevin_MartensWong_20170329,Fuad_Johari_20170329",ADouglas_Callendar_,3/29/2017,Kevin+Fuad_20170329_mcm.png (https://dl.airtable.com/CRqHD8CMRcCU3HEXUoUA_Kevin%2BFuad_20170329_mcm.png),Kevin+Fuad_20170329_mcm.png (https://dl.airtable.com/GLuOncrQruHpVXlMIpow_Kevin%2BFuad_20170329_mcm.png),mcm,,Malaccan Creole Portuguese,Kristang,,,United States,7/20/2017,Public,CC BY-NC 3.0,checked,,,,,,1 checked out of 1,,,Facebook,2017-10-24,https://www.facebook.com/wikitongues/videos/1611983398866181/,1,,,No ID,"2,150 (Bradley 2007). Ethnic population: 10,000 (Bradley 2007). L2 users: Also spoken as L2 by some Chinese shopkeepers in Hilir.",Portuguese Creole,Portuguese Creole,§Kristang,"This video was recorded by A. Douglas Callendar at the 5th International Conference on Language Documentation and Conservation at the University of Hawaii at Manoa. Kristang, also called Papia Cristão, Portugis, and sometimes 'Malaccan Creole Portuguese' by academics, is spoken by as many as 2,200 people, primarily in the Malaysian state of Malacca. A creole language, Kristang emerged as a convergence of Portuguese and Malay following Portugal's conquest of Malaysia in 1511. Today, with the exception of some Kristang church services, the language remains politically and institutionally unrecognized. However, a revival movement has emerged in recent decades.",Eurasia,,2017-3-30,, +Abhi_20140316_tel+eng+spa,Abhi__20140316,Abhi__20140316,3/16/2014,abhi.png (https://dl.airtable.com/vbjF57akTHOXQaY5A2gj_abhi.png),,"tel,eng,spa",,"Telugu, English, Spanish",,,,United States,,Removed,Standard,,,,,,"Get a free Telugu lesson with italki: http://promos.italki.com/wikitongues_tel, Get a free English lesson with italki: http://promos.italki.com/wikitongues_eng, Get a free Spanish lesson with italki: http://promos.italki.com/wikitongues_spa",3 checked out of 3,,,,,,3,,,No ID,"73,800,000 in India (2001 census). Population total all countries: 74,049,000. L2 users: 5,000,000 in India., 55,600,000 in United Kingdom (ELDIA 2012). Population total all countries: 335,148,868. L2 users: 1,500,000 in United Kingdom (Crystal 2003). L2 users worldwide: 505,000,000., 38,400,000 in Spain (ELDIA 2012). Population total all countries: 414,170,030. L2 users: 7,490,000 in Spain (ELDIA 2006).","Dravidian, South-Central, Telugu, Indo-European, Germanic, West, English, Indo-European, Italic, Romance, Italo-Western, Western, Gallo-Iberian, Ibero-Romance, West Iberian, Castilian",Dravidian,§,,"Eurasia, Eurasia, Eurasia, Eurasia, Eurasia",,2014-12-22,, +Anonymous_20140729_gsw,.Anonymous__,Daniel_BogreUdell_20130101,7/29/2014,unnamed-sgw-thumb-raw.png (https://dl.airtable.com/sVCDPXFtQOyV058NOuwd_unnamed-sgw-thumb-raw.png),,gsw,,"German, Swiss",,,,Uruguay,,To Upload,Standard,,,,,,,1 checked out of 1,,50,,,,1,,,No ID,"4,640,000 in Switzerland (2000 census). Population total all countries: 6,469,000.","Indo-European, Germanic, West, High German, German, Upper German, Alemannic",Indo-European,§,,"Eurasia, Eurasia",,2015-2-7,, +Leo_20141228_spa,Leo__20141228,Daniel_BogreUdell_20130101,12/28/2014,leo-spa-thumb-raw.png (https://dl.airtable.com/3IXVzDMpT9qzHVX82q3N_leo-spa-thumb-raw.png),Leo speaking Spanish.jpg (https://dl.airtable.com/l6q2WpSCSQOYlV4BWCcS_Leo%20speaking%20Spanish.jpg),spa,,Spanish,,,,Uruguay,3/15/2016,Public,Standard,,,,,,Get a free Spanish lesson with italki: http://promos.italki.com/wikitongues_spa,1 checked out of 1,,22,,,,1,checked,1_2f6rnIybA,https://youtu.be/1_2f6rnIybA,"38,400,000 in Spain (ELDIA 2012). Population total all countries: 414,170,030. L2 users: 7,490,000 in Spain (ELDIA 2006).","Indo-European, Italic, Romance, Italo-Western, Western, Gallo-Iberian, Ibero-Romance, West Iberian, Castilian",Indo-European,§,,"Eurasia, Eurasia",,2015-2-7,, +Marília_20150101_por,Marília__20150101,Daniel_BogreUdell_20130101,1/1/2015,marilia-por-thumb-raw.png (https://dl.airtable.com/dVK4SogHSQ2e1NfombfM_marilia-por-thumb-raw.png),Marília speaking Portuguese.jpg (https://dl.airtable.com/t6DzwJXR5q40kffN4fY4_Mari%CC%81lia%20speaking%20Portuguese.jpg),por,,Portuguese,,,,Uruguay,3/24/2016,Public,Standard,,,,,"Porto Alegre, Brazil",Get a free Portuguese lesson with italki: http://promos.italki.com/wikitongues_por,1 checked out of 1,,26,,,,1,checked,iLtnCoAi5R4,https://youtu.be/iLtnCoAi5R4,"10,000,000 in Portugal (ELDIA 2012). Population total all countries: 203,349,200.","Indo-European, Italic, Romance, Italo-Western, Western, Gallo-Iberian, Ibero-Romance, West Iberian, Portuguese-Galician",Indo-European,§,,"Eurasia, Eurasia",,2015-2-7,, +Bart_20140729_nld,Bart__20140729,Daniel_BogreUdell_20130101,7/29/2014,Screen Shot 2016-05-05 at 18.01.18.png (https://dl.airtable.com/7iK1tmVETTigIGe2Rhss_Screen%20Shot%202016-05-05%20at%2018.01.18.png),Bart_s1_M_20140729_nld.jpg (https://dl.airtable.com/CrH3bsg5QAyVydoVLyZz_Bart_s1_M_20140729_nld.jpg),nld,,Dutch,,,,Uruguay,4/7/2016,Public,Standard,,,,,,Get a free Dutch lesson with italki: http://promos.italki.com/wikitongues_nld,1 checked out of 1,,32,,,,1,checked,oMDajMXC3fs,https://youtu.be/oMDajMXC3fs,"15,700,000 in Netherlands (ELDIA 2012). Population total all countries: 21,944,690.","Indo-European, Germanic, West, Low Saxon-Low Franconian, Low Franconian",Indo-European,§,,Eurasia,,2015-2-7,, +Edith_20140729_spa,Edith__20140729,Daniel_BogreUdell_20130101,7/29/2014,edith-spa-thumb-raw.png (https://dl.airtable.com/s4VunPCS12dAvATIeXg9_edith-spa-thumb-raw.png),Edith_s1_F_20140729_spa.jpg (https://dl.airtable.com/pvZ1wosRzmxnT9vfX1Rw_Edith_s1_F_20140729_spa.jpg),spa,spa,Spanish,,,,Uruguay,5/25/2016,Public,Standard,,,,,,Get a free Spanish lesson with italki: http://promos.italki.com/wikitongues_spa,1 checked out of 1,,36,,,,1,checked,Iw-dUwsWyzs,https://youtu.be/Iw-dUwsWyzs,"38,400,000 in Spain (ELDIA 2012). Population total all countries: 414,170,030. L2 users: 7,490,000 in Spain (ELDIA 2006).","Indo-European, Italic, Romance, Italo-Western, Western, Gallo-Iberian, Ibero-Romance, West Iberian, Castilian",Indo-European,§,,"Eurasia, Eurasia",,2015-2-7,, +Joaquin_20140729_spa,Joaquin__20140729,Daniel_BogreUdell_20130101,7/29/2014,Joaquin_s1_M_20140729_spa.jpg (https://dl.airtable.com/x1dyyid3Tym8IBRjd44X_Joaquin_s1_M_20140729_spa.jpg),Joaquin_s1_M_20140729_spa.jpg (https://dl.airtable.com/9mB1i6pjTsqrezG5EtQD_Joaquin_s1_M_20140729_spa.jpg),spa,spa,Spanish,,,,Uruguay,7/15/2016,Public,Standard,,,,,,Get a free Spanish lesson with italki: http://promos.italki.com/wikitongues_spa,1 checked out of 1,,44,,,,1,,9pBU2VGlvB8,https://youtu.be/9pBU2VGlvB8,"38,400,000 in Spain (ELDIA 2012). Population total all countries: 414,170,030. L2 users: 7,490,000 in Spain (ELDIA 2006).","Indo-European, Italic, Romance, Italo-Western, Western, Gallo-Iberian, Ibero-Romance, West Iberian, Castilian",Indo-European,§,,"Eurasia, Eurasia",,2015-2-7,, +Giacomo_20140729_rgn,Giacomo__20140729,Daniel_BogreUdell_20130101,7/29/2014,giacomo-rgn-thumb-raw.png (https://dl.airtable.com/YxzgqYeTTkGxNYwKaR63_giacomo-rgn-thumb-raw.png),Giacomo_s1_M_20140729_rgn.jpg (https://dl.airtable.com/nOE2ksBbS4i2oZ8XyNA8_Giacomo_s1_M_20140729_rgn.jpg),rgn,,Romagnol,,,,Uruguay,3/14/2017,Public,Standard,,,,,,,1 checked out of 1,,70,,,,1,,kysjEWRwL98,https://youtu.be/kysjEWRwL98,"No known L1 speakers in Italy. Ethnic population: 1,100,000.","Indo-European, Italic, Romance, Italo-Western, Western, Gallo-Iberian, Gallo-Romance, Gallo-Italian",Indo-European,§,,Eurasia,,2015-2-7,, +Mauro_20140729_spa,Mauro__20140729,Daniel_BogreUdell_20130101,7/29/2014,2Ot8dGbsRqqIQuchWk6u_mauro-spa-thumb-raw.png (https://dl.airtable.com/NVzV6hYlT0m2K9jMC9yj_2Ot8dGbsRqqIQuchWk6u_mauro-spa-thumb-raw.png),Mauro_s1_M_20140729_spa.jpg (https://dl.airtable.com/SIRJHvDZQZCOpcHI4lDv_Mauro_s1_M_20140729_spa.jpg),spa,spa,Spanish,,,,Uruguay,4/11/2017,Public,Standard,,,,,,Get a free Spanish lesson with italki: http://promos.italki.com/wikitongues_spa,1 checked out of 1,,63,,,,1,,6u8gvwDevxE,https://youtu.be/6u8gvwDevxE,"38,400,000 in Spain (ELDIA 2012). Population total all countries: 414,170,030. L2 users: 7,490,000 in Spain (ELDIA 2006).","Indo-European, Italic, Romance, Italo-Western, Western, Gallo-Iberian, Ibero-Romance, West Iberian, Castilian",Indo-European,§,,"Eurasia, Eurasia",,2015-2-7,,https://www.dropbox.com/sh/v6llef9iixdkyhw/AADBWN8k2h1JSNj4J5CHIHKZa?dl=0 +Dessire_20140729_gsw,Dessire__20140729,Daniel_BogreUdell_20130101,7/29/2014,dessire-gsw-thumb-raw.png (https://dl.airtable.com/kJSZBKYgQ02ZpSO1CCAa_dessire-gsw-thumb-raw.png),Dessire_20140729_gsw.png (https://dl.airtable.com/Pl4yJtG0TtmaO7wl4x2U_Dessire_20140729_gsw.png),gsw,eng,"German, Swiss",,,,Uruguay,8/31/2017,Public,Standard,,,,,,,1 checked out of 1,,73,,,,1,,yE9HBsnhEc8,https://youtu.be/yE9HBsnhEc8,"4,640,000 in Switzerland (2000 census). Population total all countries: 6,469,000.","Indo-European, Germanic, West, High German, German, Upper German, Alemannic",Indo-European,§,"This video was recorded by Daniel Bogre Udell in Montevideo, Uruguay, where he and Dessire were visiting. Swiss German is spoken by as many as five million people, primarily in the Central European nation of Switzerland, where it remains unrecognized in favor of Standard German. As a result, Swiss German remains without a written standard and is characterized by robust dialectal diversity. A member of the Alemannic group of Germanic languages, Swiss German is most closely related to Swabian, Walser, and the spoken vernaculars of Liechtenstein. Despite the lack of political recognition, there exists a wide body of Swiss German literature, especially from the 19th century.","Eurasia, Eurasia",,2015-2-7,,https://www.dropbox.com/sh/90b0xnfp858ca8i/AAAVbA-DafvFFKakG6LpxUTta?dl=0 +Vitória_20140729_por,Vitória__20140729,Daniel_BogreUdell_20130101,7/29/2014,vitoria-por-thumb-raw.png (https://dl.airtable.com/DPbCBTUGTGGsssUNMKLE_vitoria-por-thumb-raw.png),Vitoria_20140729_por.png (https://dl.airtable.com/RGIipbCiRHGdgoRWbJHS_Vitoria_20140729_por.png),por,,Portuguese,,,,Uruguay,11/29/2017,Public,Standard,,,,,"Porto Alegre, Brazil +",Get a free Portuguese lesson with italki: http://promos.italki.com/wikitongues_por,1 checked out of 1,,67,,,,1,,,No ID,"10,000,000 in Portugal (ELDIA 2012). Population total all countries: 203,349,200.","Indo-European, Italic, Romance, Italo-Western, Western, Gallo-Iberian, Ibero-Romance, West Iberian, Portuguese-Galician",Indo-European,§,"This video was recorded by Daniel Bogre Udell in La Paloma, Uruguay, where he and Vitória were visiting at the time. Portuguese is spoken by more than 200 million people, primarily in Portugal and Brazil, where it is the majority native language, as well as in Angola, Cabo Verde, East Timor, Equatorial Guinea, Guinea-Bissau, Mozambique, São Tomé and Príncipe, and Macau, where it enjoys official administrative status. An Indo-European language of the Romance family, Portuguese emerged alongside other Latin languages between the 9th and 12th centuries CE, when southern Europe's many Latin-speaking communities fragmented into discrete cultural entities. A literary language since at least the 800s CE, Portuguese is among the Internet's ten most common languages today.","Eurasia, Eurasia",,2015-2-7,, +Watas+Wari_20150220_sax,"Watas__20150220,Wari__20150220","Watas__20150220,Wari__20150220",2/20/2015,wataswari-sax-thumb-raw.png (https://dl.airtable.com/gOxSoT2ITSuE3ObCmbI9_wataswari-sax-thumb-raw.png),Watas & Wari_s1_MM_20150220_sax.jpg (https://dl.airtable.com/0X1rLRLIS1CE2W1nkGBt_Watas%20%26%20Wari_s1_MM_20150220_sax.jpg),sax,,Sa,,,,Vanuatu,2/28/2015,Public,CC BY-NC 3.0,,,,,"imld15 +",,1 checked out of 1,,,Facebook,2017-3-23,https://www.facebook.com/wikitongues/videos/1390533964344460/,1,checked,j6voxaLLoDw,https://youtu.be/j6voxaLLoDw,"2,500 (Lynch and Crowley 2001).","Austronesian, Malayo-Polynesian, Central-Eastern Malayo-Polynesian, Eastern Malayo-Polynesian, Oceanic, Central-Eastern Oceanic, Remote Oceanic, North and Central Vanuatu, Northeast Vanuatu-Banks Islands, East Vanuatu",Austronesian,"Sa,,,,,",,Oceania,,2015-2-21,, +Kami_20170813_lht,Kami__20170813,Sarah_Doyle_,8/13/2017,,,lht,,Lo-Toga,,,,Vanuatu,,To Upload,CC BY-SA 4.0,checked,,I will try to get this,,"From: Sola, Vanua Lava Island. +Kami was brought up in Port Vila but originally from Mota/Lo Islands",,1 checked out of 1,,,,,,1,,,No ID,650 (2007 A. François).,"Austronesian, Malayo-Polynesian, Central-Eastern Malayo-Polynesian, Eastern Malayo-Polynesian, Oceanic, Central-Eastern Oceanic, Remote Oceanic, North and Central Vanuatu, Northeast Vanuatu-Banks Islands, East Vanuatu",,,,Oceania,,2017-10-1,, +Lancelot_20170813_mtt,Lancelot__20170813,Sarah_Doyle_,8/13/2017,,,mtt,,Mota,,,,Vanuatu,,To Upload,CC BY-SA 4.0,checked,,,,"NOT TRANSFERRED YET From: Sola, Vanua Lava Island. +Man visiting Sola from Mota Island",,1 checked out of 1,,,,,,1,,,No ID,900 (Lynch and Crowley 2001).,"Austronesian, Malayo-Polynesian, Central-Eastern Malayo-Polynesian, Eastern Malayo-Polynesian, Oceanic, Central-Eastern Oceanic, Remote Oceanic, North and Central Vanuatu, Northeast Vanuatu-Banks Islands, East Vanuatu",,,,Oceania,,2017-10-1,, +Regianna_20170813_nnd,Regianna__20170813,Sarah_Doyle_,8/13/2017,,,nnd,,"Ambae, West",,,,Vanuatu,,To Upload,CC BY-SA 4.0,checked,,,,"NOT TRANSFERRED YET From: Saratamata, Ambae Island. + +32 y.o. woman living in Port Vila - mother from west Ambae; father from Tanna",,1 checked out of 1,,,,,,1,,,No ID,"8,700 (Lynch and Crowley 2001).","Austronesian, Malayo-Polynesian, Central-Eastern Malayo-Polynesian, Eastern Malayo-Polynesian, Oceanic, Central-Eastern Oceanic, Remote Oceanic, North and Central Vanuatu, Northeast Vanuatu-Banks Islands, East Vanuatu",,,,Oceania,,2017-10-1,, +Anna_20171008_tql,Anna__20171008,Sarah_Doyle_,10/8/2017,,,tql,,Lehali,,,,Vanuatu,,To Upload,CC BY-SA 4.0,checked,,,,Gaua Island,,1 checked out of 1,,,,,,1,,,No ID,250 (2007 A. François). Ethnic population: 350.,"Austronesian, Malayo-Polynesian, Central-Eastern Malayo-Polynesian, Eastern Malayo-Polynesian, Oceanic, Central-Eastern Oceanic, Remote Oceanic, North and Central Vanuatu, Northeast Vanuatu-Banks Islands, East Vanuatu",,,,Oceania,,2017-10-8,, +Tio_20140423_bpa,Tio__20140423,Sarah_Doyle_,4/23/2014,tioBang.png (https://dl.airtable.com/MWUlqLwKQ7eJ7dOtl6Nc_tioBang.png),Tio Bang_s1_M_20140423_bpa.jpg (https://dl.airtable.com/4lkChITAT3aDnC6mViaz_Tio%20Bang_s1_M_20140423_bpa.jpg),bpa,,Daakaka,,,,Vanuatu,4/23/2014,Public,Standard,,checked,"Sok is sa Tio bang, nye nam me yan vilye swa Ambrym. Sok bwili teenem san is sa Emyotungan. Kinyem du or swa na ka kinyem du, vyanten nyoo ka yat me ka yap vyan yan myaop, ka yap vyan yan myaop te kinyem du tilya nyoo vyan, yam du esi myaop mo nok, kinyem syoliline nyoo me. + +Taem wuoswa yam gilye, taem swa, yan wuoswa ya to gilye. + +Sok naana mwi te Sesivi. Nge guane nge bwe Sesivi, me etes. Kinyem du me yen door milye, milye vyan bwe door te vyanten nyoo yate me ka yap vyan pwer door te yap me kuo kuane kinyem te vyan punguo vyan ar na vyanten nyoo ya to pwer aran yen door. Me nye nam pwer atak me pwer gene gyesan mwelili wuoswa, kinyem du gene gyesan mwelili wuoswa. + +Sisye swa mon, kinyem, kinyem du atak te, kinyem me du... taem wuoswa a kinyet kueli vyan teenem, kinyem vyan vyan te vyan du. + +Kinyem bevyap yen too, kinyem bevyap vis, wobir, maioc, mo nok the vis, wobir, maioc, taem wuoswa yem gene yuk wobir, yam gene yuk vis, yam gene sisye nyoo, kumala myane tuwu, tuwu ente, ente kyun.","My name is Tio bang and I come from a place called Ambrym. My village is called Emyotungan. This is where people come who want to go to the volcano. We take them to see the volcano and then bring them back down. Sometimes they pay, sometimes they don't. + +My mum is from Sesivi. She's from a place close to the sea. But we are up in the bush. When people want to come to the bush they come to our village and then go up to the place where nobody lives. But now I live here [Port Vila, Efate -- not in Ambrym] where I work. + +Another thing... some of us live here but sometimes we go back to the village. + +In the village, we work and plant banana, taro, manioc [casava] and sometimes we make taro laplap, banana laplap, and other things with sweet potato and bush nuts. That's all!",,,1 checked out of 1,,,Facebook,2016-7-4,https://www.facebook.com/wikitongues/videos/1142103482520844/,1,checked,_nZiBMOqcUU,https://youtu.be/_nZiBMOqcUU,"1,200 (Lynch and Crowley 2001).","Austronesian, Malayo-Polynesian, Central-Eastern Malayo-Polynesian, Eastern Malayo-Polynesian, Oceanic, Central-Eastern Oceanic, Remote Oceanic, North and Central Vanuatu, Northeast Vanuatu-Banks Islands, East Vanuatu",Austronesian,"Daakaka,,,,,",,Oceania,,2014-12-22,, +Ladonna_20140526_bis+lgk,Ladonna__20140526,Sarah_Doyle_,5/26/2014,ladonna.png (https://dl.airtable.com/WqOBLJxQRW836Xs3DAfZ_ladonna.png),Ladonna_s2_F_20140526_bis+lgk.png (https://dl.airtable.com/8AtTWjQTCiZtLJTbAWRR_Ladonna_s2_F_20140526_bis%2Blgk.png),"bis,lgk",,"Bislama, Neverver",,,,Vanuatu,5/26/2014,Public,Standard,,checked,,,,,2 checked out of 2,,,,,,2,checked,RHJOlCbQbbU,https://youtu.be/RHJOlCbQbbU,"10,000 in Vanuatu (2011), increasing. Ethnic population: 95% Melanesian. L2 users: Widely used by European and Asian expat residents, NGO’s and development agencies., 1,250 (Lynch and Crowley 2001).","English Creole, Pacific, Austronesian, Malayo-Polynesian, Central-Eastern Malayo-Polynesian, Eastern Malayo-Polynesian, Oceanic, Central-Eastern Oceanic, Remote Oceanic, North and Central Vanuatu, Malekula Interior, Malekula Central",English Creole,"Bislama,Neverver,,,,",,"Oceania, Oceania",,2014-12-22,, +Priscilla_20140604_llp,Priscilla__20140604,Sarah_Doyle_,6/4/2014,Screen Shot 2016-06-28 at 8.16.31 PM.png (https://dl.airtable.com/XvxIpJDRj2kUy0zGNZyw_Screen%20Shot%202016-06-28%20at%208.16.31%20PM.png),Priscilla_s1_F_20140604_llp.jpg (https://dl.airtable.com/j051UfcASLq97pbzM8bC_Priscilla_s1_F_20140604_llp.jpg),llp,,"Efate, North",Nakanamanga,,,Vanuatu,6/4/2014,Public,Standard,,,,,,,1 checked out of 1,,,Facebook,2016-6-15,https://www.facebook.com/wikitongues/videos/1127431857321340/,1,checked,pqPtJM4ZRQE,https://youtu.be/pqPtJM4ZRQE,"9,500 (Lynch and Crowley 2001).","Austronesian, Malayo-Polynesian, Central-Eastern Malayo-Polynesian, Eastern Malayo-Polynesian, Oceanic, Central-Eastern Oceanic, Remote Oceanic, North and Central Vanuatu, Northeast Vanuatu-Banks Islands, Central Vanuatu",Austronesian,"Nakanamanga,,,,,",,Oceania,,2014-12-22,, +Lopez_20140610_-naf,Lopez__20140610,Sarah_Doyle_,6/10/2014,lopez--naf-thumb-raw.png (https://dl.airtable.com/KwhMDSWGSD6LljMAQJ5F_lopez--naf-thumb-raw.png),Lopez_s1_M_20140610_-naf.png (https://dl.airtable.com/uucxH42zSuInrYY33EfA_Lopez_s1_M_20140610_-naf.png),-naf,,Nafasana,,,No Language ISO,Vanuatu,6/10/2014,Public,Standard,,,,,,,1 checked out of 1,,,,,,1,checked,-oarxcgzsXY,https://youtu.be/-oarxcgzsXY,,,,"Nafasana,,,,,",,Oceania,,2014-12-22,, +Tiger_20140826_tso,Tiger__20140826,Sarah_Doyle_,8/26/2014,tiger.png (https://dl.airtable.com/ZMNRF8oaRfKmtgVABT5S_tiger.png),Tiger_s1_M_20140826_tso.jpg (https://dl.airtable.com/3jx2NUsRCDrbeuQbEkMg_Tiger_s1_M_20140826_tso.jpg),tso,,Tsonga,Shangaan,,,Vanuatu,8/26/2014,Public,Standard,,,,,,,1 checked out of 1,,,Facebook,2016-7-31,https://www.facebook.com/wikitongues/videos/vb.408106989253834/1160999023964623/?type=2&theater,1,checked,mrnxCBfLHFQ,https://youtu.be/mrnxCBfLHFQ,"2,280,000 in South Africa (2011 census), increasing. Population total all countries: 4,009,000. L2 users: 3,400,000 in South Africa.","Niger-Congo, Atlantic-Congo, Volta-Congo, Benue-Congo, Bantoid, Southern, Narrow Bantu, Central, S, Tswa-Rhonga (S.53)",Niger-Congo,"Shangaan,,,,,",,Africa,,2014-12-22,, +Paul_20141028_llu,Paul__20141028,Sarah_Doyle_,10/28/2014,paul-llu-thumb-raw.png (https://dl.airtable.com/ZSILr8OSzuyKJ5B8yJgw_paul-llu-thumb-raw.png),Paul_s1_M_20141028_llu.jpg (https://dl.airtable.com/GRBXGEvQzOF0EU57uxWw_Paul_s1_M_20141028_llu.jpg),llu,,Lau,,,,Vanuatu,10/28/2014,Public,Standard,,,,,,,1 checked out of 1,,,,,,1,checked,Ms9kzKnXHA4,https://youtu.be/Ms9kzKnXHA4,"16,900 (1999 SIL).","Austronesian, Malayo-Polynesian, Central-Eastern Malayo-Polynesian, Eastern Malayo-Polynesian, Oceanic, Central-Eastern Oceanic, Southeast Solomonic, Malaita-San Cristobal, Malaita, Northern",Austronesian,"Gallo,,,,,",,Oceania,,2014-12-22,, +Toukala_20141111_bis,Toukala__20141111,Sarah_Doyle_,11/11/2014,toukala.png (https://dl.airtable.com/NTc5Ap1LTWOhYfRE7CVs_toukala.png),Toukala_s1_F_20141111_bis.jpg (https://dl.airtable.com/Nx8pyrWTTasmSXTvr07A_Toukala_s1_F_20141111_bis.jpg),bis,,Bislama,,,,Vanuatu,11/11/2014,Public,Standard,,,,,,,1 checked out of 1,,,,,,1,checked,-NrSATT7Y7M,https://youtu.be/-NrSATT7Y7M,"10,000 in Vanuatu (2011), increasing. Ethnic population: 95% Melanesian. L2 users: Widely used by European and Asian expat residents, NGO’s and development agencies.","English Creole, Pacific",English Creole,"Bislama,,,,,",,Oceania,,2014-12-22,, +Simane_20150108_dhv,Simane__20150108,Sarah_Doyle_,1/8/2015,Screen Shot 2016-01-19 at 4.16.07 PM.png (https://dl.airtable.com/XyJJBNdvSGmNDuiT1F0V_Screen%20Shot%202016-01-19%20at%204.16.07%20PM.png),Simane_s1_M_20150108_dhv.jpg (https://dl.airtable.com/xk5ZxX8SYmi5FKZsoVG3_Simane_s1_M_20150108_dhv.jpg),dhv,,Drehu,,,,Vanuatu,1/8/2015,Public,CC BY-NC 3.0,checked,,,,,,1 checked out of 1,,,Facebook,2016-8-23,https://www.facebook.com/wikitongues/videos/1181728761891649/,1,checked,pCfEViYa110,https://youtu.be/pCfEViYa110,"13,000 (2009), increasing. 60% live in greater Nouméa. Population figure adapted from 2009 census figure of 15,586 includes many second language speakers.","Austronesian, Malayo-Polynesian, Central-Eastern Malayo-Polynesian, Eastern Malayo-Polynesian, Oceanic, Central-Eastern Oceanic, Remote Oceanic, Loyalty Islands",Austronesian,"Drehu,,,,,",,,,2016-1-19,, +Lucy_20150618_mek,Lucy__20150618,Sarah_Doyle_,6/18/2015,lucy-mek-thumb-raw.png (https://dl.airtable.com/SsS8KZBQ2SiBM8dKguLI_lucy-mek-thumb-raw.png),Lucy_s1_F_20150618_mek.png (https://dl.airtable.com/Rjmf0wKjRhKhWLDW6WH2_Lucy_s1_F_20150618_mek.png),mek,,Mekeo,,,,Vanuatu,6/18/2015,Public,Standard,,,,,,,1 checked out of 1,,,,,,1,checked,z3ou0vZj_80,https://youtu.be/z3ou0vZj_80,"19,000 (2003 SIL).","Austronesian, Malayo-Polynesian, Central-Eastern Malayo-Polynesian, Eastern Malayo-Polynesian, Oceanic, Western Oceanic, Papuan Tip, Peripheral, Central Papuan, West Central Papuan, Nuclear",Austronesian,"Mekeo,,,,,",,Oceania,,2015-6-18,, +Katalina_20150623_eng,Katalina__20150623,Sarah_Doyle_,6/23/2015,katalina-eng-thumb-raw.png (https://dl.airtable.com/n9qLqJzSQGxGBnm6AchQ_katalina-eng-thumb-raw.png),Katalina_s1_F_20150623_eng.png (https://dl.airtable.com/B8qCUJRUCbts1SLEiARw_Katalina_s1_F_20150623_eng.png),eng,,English,,,,Vanuatu,6/23/2015,Public,Standard,,,,,,Get a free English lesson with italki: http://promos.italki.com/wikitongues_eng,1 checked out of 1,checked,,,,,1,checked,kho_Esw789Y,https://youtu.be/kho_Esw789Y,"55,600,000 in United Kingdom (ELDIA 2012). Population total all countries: 335,148,868. L2 users: 1,500,000 in United Kingdom (Crystal 2003). L2 users worldwide: 505,000,000.","Indo-European, Germanic, West, English",Indo-European,"English,,,,,",,"Eurasia, Eurasia",,2015-6-18,, +James_20170813_nmk,James__20170813,Sarah_Doyle_,8/13/2017,Screen Shot 2017-11-05 at 4.54.33 PM.png (https://dl.airtable.com/C16HQjUtRhiMGATr9KmE_Screen%20Shot%202017-11-05%20at%204.54.33%20PM.png),James_20170813_nmk.png (https://dl.airtable.com/dSzEAc8mTkmYFz6RFrnQ_James_20170813_nmk.png),nmk,,Namakura,,,,Vanuatu,11/30/2017,Public,CC BY-SA 4.0,checked,,,,"From: Finonge, Emae Island",,1 checked out of 1,,,,,,1,,,No ID,"3,750 (Lynch and Crowley 2001).","Austronesian, Malayo-Polynesian, Central-Eastern Malayo-Polynesian, Eastern Malayo-Polynesian, Oceanic, Central-Eastern Oceanic, Remote Oceanic, North and Central Vanuatu, Northeast Vanuatu-Banks Islands, Central Vanuatu",,,"This video was recorded by Sarah Doyle in Finonge, Vanuatu, where James lives and works. The Namakura language, also known as Makura or Namakir, is spoken by as many as 3,800 people, primarily in the Pacific nation of Vanuatu. More specifically, Namakura speakers live on Efate Island as well as the Shepherd Islands, in the archipelago nation’s central Shefa Province. Namakura is an Austronesian language of the Oceanic family, sharing genealogical traits with languages across the Pacific regions of Melanesia and Micronesia. It is generally an exclusively spoken language, however there is a good deal of written documentation housed in Paradisec, the Pacific and Regional Archive for Digital Sources in Endangered Cultures.",Oceania,,2017-10-1,, +Daisy_20170813_omb,Daisy__20170813,Sarah_Doyle_,8/13/2017,Screen Shot 2017-11-05 at 4.52.33 PM.png (https://dl.airtable.com/4qTgx35QLKZHg29rsrPk_Screen%20Shot%202017-11-05%20at%204.52.33%20PM.png),Daisy_20170813_omb.png (https://dl.airtable.com/ynHsgvf9S5SiKvM4Qkj7_Daisy_20170813_omb.png),omb,,"Ambae, East",North Ambae,,,Vanuatu,11/30/2017,Public,CC BY-SA 4.0,checked,,,,"From: Saratamata, Ambae Island",,1 checked out of 1,,,,,,1,,,No ID,"5,000 (Lynch and Crowley 2001).","Austronesian, Malayo-Polynesian, Central-Eastern Malayo-Polynesian, Eastern Malayo-Polynesian, Oceanic, Central-Eastern Oceanic, Remote Oceanic, North and Central Vanuatu, Northeast Vanuatu-Banks Islands, East Vanuatu",,,"This video was recorded by Sarah Doyle in Saratamata, Vanuatu, where Daisy lives and works. North Ambae, also known as Omba, Oba, Aoba, Walurigi, Lolovoli, Northeast Aoba, and Northeast Ambae, and by academics as East Ambae, is spoken by 5,000 people in the Pacific nation of Vanuatu. The language is local to the archipelago nation’s Penama Province, and more specifically to Ambae Island, located 266 kilometers, or 153 miles, from Vanuatu’s capital city, Port Vila. Like the vast majority of Vanuatu’s languages, North Ambae is a member of the Austronesian linguistic family, sharing traits with languages across the diverse cultural regions throughout the Pacific and Indian Oceans.",Oceania,,2017-10-1,, +Betsy_20170813_msn,Betsy__20170813,Sarah_Doyle_,8/13/2017,Screen Shot 2017-12-07 at 7.08.28 PM.png (https://dl.airtable.com/uWxNeOiERYOiO1lra47W_Screen%20Shot%202017-12-07%20at%207.08.28%20PM.png),Betsy_20170813_msn.jpg (https://dl.airtable.com/UivHxjMeRZHNLwJA1HvE_Betsy_20170813_msn.jpg),msn,,Vurës,,,,Vanuatu,12/29/2017,Public,CC BY-SA 4.0,checked,,,,"From: Sola, Vanua Lava",,1 checked out of 1,,,,,,1,,Kxdd3bUVnuI,https://youtu.be/Kxdd3bUVnuI,"1,100 (2011 SIL).","Austronesian, Malayo-Polynesian, Central-Eastern Malayo-Polynesian, Eastern Malayo-Polynesian, Oceanic, Central-Eastern Oceanic, Remote Oceanic, North and Central Vanuatu, Northeast Vanuatu-Banks Islands, East Vanuatu",,,"This video was recorded by Sarah Doyle on the island of Vanua Lava in Torba Province, Vanuatu, where Betsy lives. Vurës is spoken by as many as 2,000 people, primarily on Vanua Lava, where it is one of two primary languages. The other language, Mwesen, shares a high degree of mutually intelligibility with Vurës, so much so that the two are often considered dialects of a single Vüres-Mwesen language. Together, Vurës and Mwesen are members of the Austronesian family of languages, relating them to the mother tongues of communities throughout the Pacific and Indian Oceans, from Madagascar to Hawaii. Despite an absence of political recognition or native language media, a standard Vurës grammar has been published under the guidance of Dr. Catriona Malau, a linguist at Newcastle University.",Oceania,,2017-10-1,, +Serah_20170813_mlv,Serah__20170813,Sarah_Doyle_,8/13/2017,Serah_20170813_mlv.png (https://dl.airtable.com/hLpNDOXOQbqxpYeZLoIM_Serah_20170813_mlv.png),,mlv,,Mwotlap,,,,Vanuatu,1/29/2018,Public,CC BY-SA 4.0,checked,,,,"NOT TRANSFERRED YET From: Sola, Vanua Lava Island. + +Audio file also provided",,1 checked out of 1,,,,,,1,,reNXOCf-9z0,https://youtu.be/reNXOCf-9z0,"1,800 (2007 A. François), increasing.","Austronesian, Malayo-Polynesian, Central-Eastern Malayo-Polynesian, Eastern Malayo-Polynesian, Oceanic, Central-Eastern Oceanic, Remote Oceanic, North and Central Vanuatu, Northeast Vanuatu-Banks Islands, East Vanuatu",,,"This video was recorded by Sarah Doyle in Sola, the capital village of Torba Province, Vanuatu. Mwotlap is spoken by as many as 2,100 people, primarily across the Pacific islands of Mota Lava, Ra, Vanua Lava and Espiritu Santu. A member of the Austronesian linguistic family, Mwotlap is closely related to dozens of languages across the north of Vanuatu, including Mwesen, Vurës, and Sa, as well as more than a thousand mother tongues spoken in communities across the Pacific. In recent decades, a significant body of academic literature has been published about Mwotlap, especially research led by the linguist Alexandre François.",Oceania,,2017-10-1,, +Đức(Duc)_20150621_vie,Đức(Duc)__20150621,Dylan_Hinder_,6/21/2015,duc-vie-thumb-raw.png (https://dl.airtable.com/KhCvRWb7QAie9gnxdCaX_duc-vie-thumb-raw.png),Duc_s1_M_20150621_vie.png (https://dl.airtable.com/suQXgrY1QOOWsG9iRqN0_Duc_s1_M_20150621_vie.png),vie,vie,Vietnamese,,,,Vietnam,8/15/2015,Public,CC BY-NC 3.0,checked,,,,,Get a free Vietnamese lesson with italki: http://promos.italki.com/wikitongues_vie,1 checked out of 1,checked,,Facebook,2016-8-12,https://www.facebook.com/wikitongues/videos/1171348466263012/,1,checked,z_cAYz0Q5DI,https://youtu.be/z_cAYz0Q5DI,"65,800,000 in Viet Nam (1999 census). Population total all countries: 67,778,030. Ethnic population: 73,600,000 (2009 census).","Austro-Asiatic, Mon-Khmer, Viet-Muong, Vietnamese",Austro-Asiatic,"Vietnamese,,,,,",,Eurasia,,2015-6-28,,https://www.dropbox.com/sh/frtkafyibr572p9/AACBQNWVA3jdq1vZ2MNOqT8Ba?dl=0 +Tatenda_20131103_sna,Tatenda__20131103,Daniel_BogreUdell_20130101,11/3/2013,tatenda.png (https://dl.airtable.com/Q08KAy42T1CiNvBMBY6m_tatenda.png),Tatenda_s1_F_20131103_sna.jpg (https://dl.airtable.com/qPIIHh9mQEWPvuoTa0YF_Tatenda_s1_F_20131103_sna.jpg),sna,eng,Shona,,,Unknown Variant,Zimbabwe,11/3/2013,Public,Standard,,,,,,,1 checked out of 1,,,Facebook,2016-5-7,https://www.facebook.com/wikitongues/videos/1104789639585562/,1,checked,ZtXr7bckLyc,https://youtu.be/ZtXr7bckLyc,"10,700,000 in Zimbabwe (Chebanne and Nthapelelang 2000). 4,500,000 Karanga (Chebanne and Nthapelelang 2000), 1,700,000 Korekore (Chebanne and Nthapelelang 2000), 3,200,000 Zezuru (Chebanne and Nthapelelang 2000), 1,300,000 Shona. Population total all countries: 10,741,700. L2 users: 1,800,000 in Zimbabwe (Chebanne 2000).","Niger-Congo, Atlantic-Congo, Volta-Congo, Benue-Congo, Bantoid, Southern, Narrow Bantu, Central, S, Shona (S.10)",Niger-Congo,"Shona,,,,,",,Africa,,2014-12-22,,https://www.dropbox.com/sh/lw1e3z8uou1qxtp/AADfENkK-X7ro4KHouE44R0Ua?dl=0 +Abderrahman_20180217_shi,Abderrahman_Ait-Ali_20180217,Abderrahman_Ait-Ali_20180217,2/17/2018,,,shi,eng,Tachelhit,,,,Cuba,,To Upload,CC BY-SA 4.0,checked,,,,"Recorded in Trinidad, Cuba",,1 checked out of 1,,,,,,1,,,No ID,"3,890,000 in Morocco (2004 census).","Afro-Asiatic, Berber, Northern, Atlas",,,,Africa,,2018-2-17,,https://www.dropbox.com/sh/6qoup4gvxmu00dw/AADEeWGJImb9m6U8JhxyYopfa?dl=0 +Anass_20180220_rif,Anass_Sedrati_20180220,Anass_Sedrati_20180220,2/20/2018,,,rif,"eng,rif",Tarifit,,,,Cuba,,To Upload,CC BY-SA 4.0,checked,,,"[Language = Rif Tamazight/Tarifit (Berber from North Morocco)] Brothers and sisters, Hello I am Anass and right now I am in Havana, the capital of Cuba. Cuba is a beautiful country, with sun, sea and many other beautiful things. However, from another side, we have had some problems with food, actually many problems! The reason is that conditions are difficult here (with the blockade). Cuba is a communist country. Communism is a political ideology. Nowadays, there aren’t many communist countries in the world. There is North Korea, China, and of course Cuba. In communism there are both advantages and disadvantages. Anyway, it is an ideology like others. I came here with some friends for vacation, and we enjoy it very much. People are very nice and so is the weather. Everything is great. When you come here, new ideas enter to your brain (you are obliged to use your brain and relate). I suggest to everybody, if you have the opportunity, to come and visit here. Cuba is a different country, different than any other country in the world, and will give you a unique experience. You are all welcome to Cuba, thank you for listening, and goodbye!",Recorded in Havana,,1 checked out of 1,,,,,,1,,,No ID,"1,270,000 in Morocco (2004 census). Population total all countries: 1,470,000.","Afro-Asiatic, Berber, Northern, Zenati, Riff",,,,Africa,,2018-2-20,,https://www.dropbox.com/sh/ke1zsmmgmczvvxe/AAD-PbGpXeYqE2kwqgOhE7VPa?dl=0 +Jacques+Yvette_20180226_fra,"Jacques__20180226,Yvette__20180226",Noah_Sullivan_20160610,2/26/2018,,,fra,,French,Chiac,,,United States,3/24/2018,To Upload,CC BY-SA 4.0,,,,,,Get a free French lesson with italki: http://promos.italki.com/wikitongues_fra,1 checked out of 1,,,,,,1,,,No ID,"60,000,000 in France (ELDIA 2012). Population total all countries: 74,980,460.","Indo-European, Italic, Romance, Italo-Western, Western, Gallo-Iberian, Gallo-Romance, Gallo-Rhaetian, Oïl, French",,,,"Eurasia, Eurasia, Americas, Eurasia, Eurasia",,2018-2-26,Massachusetts_US, +Achille_20180226_mos+dyu,Achille_WendyamTapsoba_20180226,Teddy_Nee_20141005,2/26/2018,,,"mos,dyu",,"Mòoré, Jula","Mooré, Dioula","Recorded at National Taiwan Universiy, where Achille is a student",,Taiwan,3/25/2018,To Upload,CC BY-SA 4.0,checked,,,,,,2 checked out of 2,,,,,,2,,,No ID,"5,000,000 in Burkina Faso. 15,700 Yana (1991). Population total all countries: 5,061,700., 1,500,000 in Côte d’Ivoire (2012 V. Vydrin). Population total all countries: 2,550,000. L2 users: 7,000,000 in Côte d’Ivoire (2012 V. Vydrin).","Niger-Congo, Atlantic-Congo, Volta-Congo, North, Gur, Central, Northern, Oti-Volta, Western, Northwest, Niger-Congo, Mande, Western, Central-Southwestern, Central, Manding-Jogo, Manding-Vai, Manding-Mokole, Manding, Manding-East, Northeastern Manding, Bamana",,,,"Africa, Africa",,2018-2-26,, +Mariette_20180226_fra,Mariette__20180226,Noah_Sullivan_20160610,2/26/2018,,,fra,,French,Chiac,,,United States,,To Upload,CC BY-NC 3.0,,,,,,Get a free French lesson with italki: http://promos.italki.com/wikitongues_fra,1 checked out of 1,,,,,,1,,,No ID,"60,000,000 in France (ELDIA 2012). Population total all countries: 74,980,460.","Indo-European, Italic, Romance, Italo-Western, Western, Gallo-Iberian, Gallo-Romance, Gallo-Rhaetian, Oïl, French",,,,"Eurasia, Eurasia, Americas, Eurasia, Eurasia",,2018-2-26,Massachusetts_US, +Steven_20180227_scn,Steven_Campo_20171223,Nick_Panzarella_,2/27/2018,,,scn,,Sicilian,,,,United States,,To Upload,CC BY-SA 4.0,checked,,,,"Recorded in Independence, Louisiana, a U.S. town with a large Sicilian population. Steven is an L2 speaker.",,1 checked out of 1,,,,,,1,,,No ID,"4,700,000 (2002).","Indo-European, Italic, Romance, Italo-Western, Italo-Dalmatian",,,,Eurasia,,2018-2-27,Louisiana_US, +Mandala_20180228_sun,Mandala__20180228,Teddy_Nee_20141005,2/28/2018,,,sun,,Sunda,Bantenese language,,,Taiwan,3/27/2018,To Upload,CC BY-SA 4.0,checked,,,,"SEAMi 望見書間 at Taoyuan City, Taiwan www.facebook.com/SoutheastAsianMigrantInspired/ + +Mandala comes from Kubar Selatan in Anyer Town, Serang Regency, Banten Province, Java Island, Indonesia. He is working in Taiwan at this moment. + +He explained to me that Sundanese language (in Indonesian: Bahasa Sunda) isn't just a single language but it has different variations because it is spoken not only in Banten Province but also in West Java Province (in Indonesian: Provinsi Jawa Barat)",,1 checked out of 1,,,,,,1,,,No ID,"34,000,000 (2000 census).","Austronesian, Malayo-Polynesian, Sundanese",,,,Eurasia,,2018-2-28,, +Donna+Elizabeth_20171211_eng+cho+?bll,"Donna_Pierite_20171211,Elizabeth_Pierite-Mora_20171211",Nick_Panzarella_,12/11/2017,,,"eng,cho,?bll",,"English, Choctaw, Biloxi",Louisiana French,,,United States,,To Upload,CC BY-NC 3.0,checked,,,,"Marksville, Louisiana",Get a free English lesson with italki: http://promos.italki.com/wikitongues_eng,3 checked out of 3,,,,,,3,,,No ID,"55,600,000 in United Kingdom (ELDIA 2012). Population total all countries: 335,148,868. L2 users: 1,500,000 in United Kingdom (Crystal 2003). L2 users worldwide: 505,000,000., 10,400 (2010 census), decreasing. Ethnic population: 20,000 (Golla 2007). In Oklahoma.","Indo-European, Germanic, West, English, Muskogean, Western Muskogean, Siouan-Catawban (Siouan)",,,,"Eurasia, Eurasia, Americas, Americas",,2018-2-28,Louisiana_US, +Donna+Elizabeth_20171211_eng+frc,"Donna_Pierite_20171211,Elizabeth_Pierite-Mora_20171211",Nick_Panzarella_,12/11/2017,,,"eng,frc",,"English, French, Cajun",Louisiana French,,,United States,,To Upload,CC BY-NC 3.0,checked,,,,"Marksville, Louisiana",Get a free English lesson with italki: http://promos.italki.com/wikitongues_eng,2 checked out of 2,,,,,,2,,,No ID,"55,600,000 in United Kingdom (ELDIA 2012). Population total all countries: 335,148,868. L2 users: 1,500,000 in United Kingdom (Crystal 2003). L2 users worldwide: 505,000,000., 25,600 (2010 census), decreasing.","Indo-European, Germanic, West, English, Indo-European, Italic, Romance, Italo-Western, Western, Gallo-Iberian, Gallo-Romance, Gallo-Rhaetian, Oïl, French",,,,"Eurasia, Eurasia, Americas",,2018-2-28,Louisiana_US, +Milzon_20180305_-ber,Milzon__20180305,Kunto_Nurcahyoko_20180305,3/5/2018,,,-ber,,Benana,,,Classification,Indonesia,,,CC BY-SA 4.0,checked,,,,Sempatung Village,,1 checked out of 1,,,,,,1,,,No ID,,,,,,Eurasia,,2018-3-5,West Kalimantan_ID, +Bujang+Alimoto_20180305_-bhk,"Bujang__20180305,Alimoto__20180305",Kunto_Nurcahyoko_20180305,3/5/2018,,,-bhk,,Be Eih,,,Classification,Indonesia,,,CC BY-SA 4.0,checked,,,,Sempatung Village,,1 checked out of 1,,,,,,1,,,No ID,,,,,,Eurasia,,2018-3-5,West Kalimantan_ID, +Supriadi_20180305_-bkh,Supriadi__20180305,Kunto_Nurcahyoko_20180305,3/5/2018,,,-bkh,,Bekoeh,,,Classification,Indonesia,,,CC BY-SA 4.0,checked,,,,Tengon Village,,1 checked out of 1,,,,,,1,,,No ID,,,,,,Eurasia,,2018-3-5,West Kalimantan_ID, +Yulius_20180305_bei,Yulius_Riko_20180305,Kunto_Nurcahyoko_20180305,3/5/2018,,,bei,,Bakati’,Bekati Sebetung Menyala,,Unknown Variant,Indonesia,,,CC BY-SA 4.0,checked,,,,Bengkayang,,1 checked out of 1,,,,,,1,,,No ID,"4,000 (1986 UBS).","Austronesian, Malayo-Polynesian, Land Dayak, Bakati’",,,,Eurasia,,2018-3-5,West Kalimantan_ID, +Florensius_20180305_bei,Florensius_Loren_20180305,Kunto_Nurcahyoko_20180305,3/5/2018,,,bei,,Bakati’,Bekati Rara,,Unknown Variant,Indonesia,,,CC BY-SA 4.0,checked,,,,Bengkayang,,1 checked out of 1,,,,,,1,,,No ID,"4,000 (1986 UBS).","Austronesian, Malayo-Polynesian, Land Dayak, Bakati’",,,,Eurasia,,2018-3-5,West Kalimantan_ID, +Andarius_20180305_-bmk,Andarius__20180305,Kunto_Nurcahyoko_20180305,3/5/2018,,,-bmk,,Bemak,,,Classification,Indonesia,,,CC BY-SA 4.0,checked,,,,Ngabang,,1 checked out of 1,,,,,,1,,,No ID,,,,,,Eurasia,,2018-3-5,West Kalimantan_ID, +Rizki_20180305_msa,Rizki_MahardikaTulahwi_20180305,Kunto_Nurcahyoko_20180305,3/5/2018,,,msa,,Malay,Melayu Serimbu,,Classification,Indonesia,,,CC BY-SA 4.0,checked,,,,Ngabang,,1 checked out of 1,,,,,,1,,,No ID,"Population total all languages: 59,475,586.",,,,,Eurasia,,2018-3-5,West Kalimantan_ID, +Hermica_20180305_-bng,Hermica__20180305,Kunto_Nurcahyoko_20180305,3/5/2018,,,-bng,,Bengape,,,Classification,Indonesia,,,CC BY-SA 4.0,checked,,,,Ngabang,,1 checked out of 1,,,,,,1,,,No ID,,,,,,Eurasia,,2018-3-5,West Kalimantan_ID, +Apolonius_20180305_xdy,Apolonius__20180305,Kunto_Nurcahyoko_20180305,3/5/2018,,,xdy,,Malayic Dayak,Bemayo,,,Indonesia,,,CC BY-SA 4.0,checked,,,,Ngabang,,1 checked out of 1,,,,,,1,,,No ID,"520,000 (Wurm and Hattori 1981). 300 Tapitn, 100,000 Banana’, 100,000 Kayung, 200,000 Delang, 10,000 Semitau, 10,000 Suhaid, 20,000 Mentebah-Suruk.","Austronesian, Malayo-Polynesian, Malayo-Chamic, Malayic",,,,Eurasia,,2018-3-5,West Kalimantan_ID, +Samuel+Apolonius_20180305_-bkb,"Samuel_Jambul_20180305,Apolonius__20180305",Kunto_Nurcahyoko_20180305,3/5/2018,,,-bkb,,Bekambai,,,Classification,Indonesia,,,CC BY-SA 4.0,checked,,,,Ngabang,,1 checked out of 1,,,,,,1,,,No ID,,,,,,Eurasia,,2018-3-5,West Kalimantan_ID, +Romanus_20180305_-bdm,Romanus_Didik_20180305,Kunto_Nurcahyoko_20180305,3/5/2018,,,-bdm,,Bedamea,,,Classification,Indonesia,,,CC BY-SA 4.0,checked,,,,Ngabang,,1 checked out of 1,,,,,,1,,,No ID,,,,,,Eurasia,,2018-3-5,West Kalimantan_ID, +Kristianus_20180305_-bye,Kristianus_Pardianto_20180305,Kunto_Nurcahyoko_20180305,3/5/2018,,,-bye,,Beaye,,,Classification,Indonesia,,,CC BY-SA 4.0,checked,,,,Ngabang,,1 checked out of 1,,,,,,1,,,No ID,,,,,,Eurasia,,2018-3-5,West Kalimantan_ID, +Hendrik_20180305_byd,Hendrik__20180305,Kunto_Nurcahyoko_20180305,3/5/2018,,,byd,,Benyadu’,Benyadu,,,Indonesia,,,CC BY-SA 4.0,checked,,,,Ngabang,,1 checked out of 1,,,,,,1,,,No ID,"54,000 (2007).","Austronesian, Malayo-Polynesian, Land Dayak",,,,Eurasia,,2018-3-5,West Kalimantan_ID, +Albina+Donawati_20180305_-bdh,"Albina__20180305,Donawati__20180305",Kunto_Nurcahyoko_20180305,3/5/2018,,,-bdh,,Bedineh,,,Classification,Indonesia,,,CC BY-SA 4.0,checked,,,,Ngabang,,1 checked out of 1,,,,,,1,,,No ID,,,,,,Eurasia,,2018-3-5,West Kalimantan_ID, +Victorinus_20180305_-bhe,Victorinus_Supanus_20180305,Kunto_Nurcahyoko_20180305,3/5/2018,,,-bhe,,Beahe,,,Classification,Indonesia,,,CC BY-SA 4.0,checked,,,,Ngabang,,1 checked out of 1,,,,,,1,,,No ID,,,,,,Eurasia,,2018-3-5,West Kalimantan_ID, +Fransiska+Limoi_20180305_knx,"Fransiska_AsteriaYanda_20180305,Limoi_Ani_20180305",Kunto_Nurcahyoko_20180305,3/5/2018,,,knx,,Kendayan,Belangin,,,Indonesia,,,CC BY-SA 4.0,checked,,,,Ngabang,,1 checked out of 1,,,,,,1,,,No ID,"321,000 in Indonesia (2007 SIL). Population total all countries: 331,700.","Austronesian, Malayo-Polynesian, Malayo-Chamic, Malayic",,,,Eurasia,,2018-3-5,West Kalimantan_ID, +Paulus_20180305_-mka,Paulus_Mapik_20180305,Kunto_Nurcahyoko_20180305,3/5/2018,,,-mka,,Mentuka,,,Classification,Indonesia,,,CC BY-SA 4.0,checked,,,,Sekadau,,1 checked out of 1,,,,,,1,,,No ID,,,,,,Eurasia,,2018-3-5,West Kalimantan_ID, +Latonian+Yankee_20180306_unm+nnt,"Latonian_Dunson_20180306,Yankee__20180306",Latonian_Dunson_20180306,3/6/2018,,,"unm,nnt",,"Unami, Nanticoke","Lenape, Nanticoke",,,United States,3/26/2018,,CC BY-SA 4.0,,,"Delaware/Lenape Translation: Welcome my relative. Are you feeling good? And are you thinking good? Oh yes, I am thinking good now and feeling good. Are you ready to speak Lenape? Yes, I am ready now. Alright let's speak lenape. Is it true that you are a little bit Lenape [a human man]? Yes, it is true that I am Lenape [a human man]. And where are you from? The place I am from is called Ohio. And what is your name? My name is maexelawen osapekwinunt. And what is your name? Yopitkwshaasit is my name and I am a Nanticoke woman. Where do you come from? I am from Delaware. And I am done talking now. Me too. I will see you again. I will see you again. Nanticoke Translation: What time is it? What [meaning] is that word 'clock'? This word is English. Are you there? Yes, I am here. And how are you? Very good now. And you? I am feeling good thank you my relative. What time is it? It is 2 o'clock. Why? Because you want to speak Nanticoke. Alright let's speak. Okay, what is your name? My name is Yopitkshaasit and what is your name? My name is Maexelawen Osapekwinunt. Where are you from? I am from Ohio. The land here is beautiful. Well, I am from Delaware and it is also a beautiful land. And I am finished talking now. I will see you again. I will see you again.",,,,2 checked out of 2,,,,,,2,,,No ID,"No known L1 speakers, but emerging L2 speakers. 2000 census lists 310 who use it at home. Ethnic population: 13,500 (1997 J. Rementer). L2 users: A few L2 users with varying fluency., No known L1 speakers. Ethnic population: 400 (1977 SIL).","Algic, Algonquian, Eastern Algonquian, Delaware, Algic, Algonquian, Eastern Algonquian, Nanticoke-Conoy",,,,"Americas, Americas",,2018-3-6,"Ohio_US,Delaware_US", +Sahid_20180312_ind+min,Sahid__20180312,Fiel_Sahir_20170609,3/12/2018,,,"ind,min",,"Indonesian, Minangkabau","Indonesian, Padang","The video is in two languages, in Padang and Indonesian. If we can edit the video so that Padang is at the beginning and Indonesian at the end that'd be great. + +Editing needed at 5:28. The 2nd part (In the Padang Language) of the clip should become the first part of the video starting at 5:44 and then edit the first part to be at the end (because it's in Indonesian.) + +Contact me directly if this doesn't make sense. ",,Indonesia,3/30/2018,,CC BY-SA 4.0,checked,,,,,Get a free Indonesian lesson with italki: http://promos.italki.com/wikitongues_ind,2 checked out of 2,,,,,,2,,,No ID,"22,800,000 in Indonesia (2000), increasing. Population total all countries: 23,200,480. L2 users: 140,000,000 in Indonesia., 5,530,000 (2007). 500,000 in Jakarta.","Austronesian, Malayo-Polynesian, Malayo-Chamic, Malayic, Malay, Austronesian, Malayo-Polynesian, Malayo-Chamic, Malayic, Malay",,,,"Eurasia, Eurasia",,2018-3-12,Special Region of Yogyakarta_ID, +Michael_20180312_lou,Michael_Gisclair_20180312,Nick_Panzarella_,3/12/2018,,,lou,,Louisiana Creole French,Kouri-Vini,,,United States,3/31/2018,,CC BY-NC 3.0,,,"Michael makes videos for his YouTube channel in French and Kouri-Vini, he already has this video hosted on his channel but decided to share this one with us, and he's happy to share the rest of his videos, as well as videos in Louisiana French with us as well. Here is the caption from his original video post: +""Mo té fé potré-çila pou mwa léritaj kréyòl-la. +Kofè m'ap aprenn kouri-vini. +J'ai fait cette vidéo pour le mois de l'héritage créole. +Pourquoi j'apprends le créole louisianais. +I made this video for Creole Heritage Month. +Why I'm learning Louisiana Creole.""",,,,1 checked out of 1,,,,,,1,,,No ID,"70,000 (Neumann-Holzschuh 1985). Ethnic population: 4,000,000 (1997 M. Melançon).",French Creole,,,,Americas,,2018-3-12,Florida_US, +Seno+Azzam_20180312_jav,"Seno__20180312,Azzam__20180312",Fiel_Sahir_20170609,3/12/2018,,,jav,,Javanese,,,,Indonesia,,,CC BY-SA 4.0,checked,,,,,,1 checked out of 1,,,,,,1,,,No ID,"84,300,000 in Indonesia (2000 census). 25,000 in south Sulawesi, and 69,000,000 on Java, 500,000 of them being in Banten region and 2,500,000 in Cirebon region of Java. Population total all countries: 84,308,740.","Austronesian, Malayo-Polynesian, Javanese",,,,Eurasia,,2018-3-12,Special Region of Yogyakarta_ID, +Dede+Febri+Sandi_20180312_sun,"Dede__20180312,Febri__20180312,Sandi__20180312",Fiel_Sahir_20170609,3/12/2018,,,sun,,Sunda,,,,Indonesia,,,CC BY-SA 4.0,checked,,,,,,1 checked out of 1,,,,,,1,,,No ID,"34,000,000 (2000 census).","Austronesian, Malayo-Polynesian, Sundanese",,,,Eurasia,,2018-3-12,Special Region of Yogyakarta_ID, +Disa+Niken_20180312_jav,"Disa__20180312,Niken__20180312",Fiel_Sahir_20170609,3/12/2018,,,jav,,Javanese,,,,Indonesia,3/28/2018,,CC BY-SA 4.0,checked,,,,,,1 checked out of 1,,,,,,1,,,No ID,"84,300,000 in Indonesia (2000 census). 25,000 in south Sulawesi, and 69,000,000 on Java, 500,000 of them being in Banten region and 2,500,000 in Cirebon region of Java. Population total all countries: 84,308,740.","Austronesian, Malayo-Polynesian, Javanese",,,,Eurasia,,2018-3-12,Special Region of Yogyakarta_ID, +Stefano_20180312_gsw,Stefano__20140729,Fiel_Sahir_20170609,3/12/2018,,,gsw,,"German, Swiss",,,,Germany,,,CC BY-NC 3.0,,,,,Düsseldorf,,1 checked out of 1,,,,,,1,,,No ID,"4,640,000 in Switzerland (2000 census). Population total all countries: 6,469,000.","Indo-European, Germanic, West, High German, German, Upper German, Alemannic",,,,"Eurasia, Eurasia",,2018-3-12, North Rhine-Westphalia_DE, +Phoebe_20180312_gjn,Phoebe__20180312,Fiel_Sahir_20170609,3/12/2018,,,gjn,,Gonja,,,,Germany,3/29/2018,,CC BY-NC 3.0,,,,,Düsseldorf,,1 checked out of 1,,,,,,1,,,No ID,"230,000 (2004 SIL), increasing.","Niger-Congo, Atlantic-Congo, Volta-Congo, Kwa, Nyo, Potou-Tano, Tano, Guang, North Guang",,,,Africa,,2018-3-12, North Rhine-Westphalia_DE, +Anayo_20180312_ibo,Anayo__20180312,Fiel_Sahir_20170609,3/12/2018,,,ibo,,Igbo,,,,Germany,,,CC BY-NC 3.0,,,,,Düsseldorf,,1 checked out of 1,,,,,,1,,,No ID,"18,000,000 (Wiesenfeld 1999).","Niger-Congo, Atlantic-Congo, Volta-Congo, Benue-Congo, Igboid, Igbo",,,,Africa,,2018-3-12, North Rhine-Westphalia_DE, +Ankita_20180312_ben,Ankita__20180312,Fiel_Sahir_20170609,3/12/2018,,,ben,,Bengali,,,,Germany,,,CC BY-NC 3.0,,,,,Düsseldorf,Get a free Bengali lesson with italki: http://promos.italki.com/wikitongues_ben,1 checked out of 1,,,,,,1,,,No ID,"110,000,000 in Bangladesh (2001 census). Population total all countries: 193,261,200. L2 users: 140,000,000 in Bangladesh.","Indo-European, Indo-Iranian, Indo-Aryan, Eastern zone, Bengali-Assamese",,,,Eurasia,,2018-3-12, North Rhine-Westphalia_DE, +Anass_20180312_ary,Anass_Sedrati_20180220,Anass_Sedrati_20180220,3/12/2018,,,ary,"eng,ary","Arabic, Moroccan Spoken",,,,Sweden,,To Upload,CC BY-SA 4.0,checked,,,,Stochkolm,,1 checked out of 1,,,,,,1,,,No ID,"18,800,000 in Morocco (1995). Population total all countries: 21,048,900. L2 users: 5,000,000 in Morocco.","Afro-Asiatic, Semitic, Central, South, Arabic",,,,Africa,,2018-3-12,,https://www.dropbox.com/sh/ke1zsmmgmczvvxe/AAD-PbGpXeYqE2kwqgOhE7VPa?dl=0 \ No newline at end of file diff --git a/config/routes.rb b/config/routes.rb index 5033fafb..0b328d0a 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -1,4 +1,6 @@ Rails.application.routes.draw do + get 'videos/index' => 'videos#index' + get '/videos/:id' => 'videos#show' devise_for :users, path: "", diff --git a/db/migrate/20180426211506_create_archive_videos.rb b/db/migrate/20180426211506_create_archive_videos.rb new file mode 100644 index 00000000..efbd8fcc --- /dev/null +++ b/db/migrate/20180426211506_create_archive_videos.rb @@ -0,0 +1,9 @@ +class CreateArchiveVideos < ActiveRecord::Migration + def change + create_table :archive_videos do |t| + t.string :video_id + t.string :video_url + t.string :srt_url + end + end +end diff --git a/db/schema.rb b/db/schema.rb index fdc847ee..e02f356c 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -11,11 +11,17 @@ # # It's strongly recommended that you check this file into your version control system. -ActiveRecord::Schema.define(version: 20171115173256) do +ActiveRecord::Schema.define(version: 20180426211506) do # These are extensions that must be enabled in order to support this database enable_extension "plpgsql" + create_table "archive_videos", force: :cascade do |t| + t.string "video_id" + t.string "video_url" + t.string "srt_url" + end + create_table "books", force: :cascade do |t| t.string "title", null: false t.datetime "created_at", null: false @@ -24,7 +30,6 @@ t.string "source_language", null: false t.string "target_language", null: false t.integer "user_id", null: false - t.string "status" t.string "video_description" end @@ -68,5 +73,11 @@ add_index "users", ["reset_password_token"], name: "index_users_on_reset_password_token", unique: true, using: :btree add_index "users", ["username"], name: "index_users_on_username", unique: true, using: :btree + create_table "videos", id: false, force: :cascade do |t| + t.integer "id" + t.string "video_url" + t.string "srt_url" + end + add_foreign_key "books", "users" end diff --git a/db/seed_data/archive_videos.txt b/db/seed_data/archive_videos.txt new file mode 100644 index 00000000..ebc2da2e --- /dev/null +++ b/db/seed_data/archive_videos.txt @@ -0,0 +1,3455 @@ +/Oral Histories/Aaku_s1_F_20160717_new/Aaku_s1_F_20160717_new.jpg +/Oral Histories/Aaku_s1_F_20160717_new/Aaku_s1_F_20160717_new.mp4 +/Oral Histories/Aaku_s1_F_20160717_new/raws/footage/audio/STE-001 Audio Extracted.pkf +/Oral Histories/Aaku_s1_F_20160717_new/raws/footage/audio/STE-001.wav +/Oral Histories/Aaku_s1_F_20160717_new/raws/footage/clips/MVI_0161.MOV +/Oral Histories/Aaku_s1_F_20160717_new/raws/footage/converted/MVI_0161.mov +/Oral Histories/Aaku_s1_F_20160717_new/raws/Premier Project/Adobe Premiere Pro Auto-Save/Aaku_s1_F_20160717_new-1.prproj +/Oral Histories/Aaku_s1_F_20160717_new/raws/thumbnail/Screen Shot 2016-10-25 at 15.29.31 1.png +/Oral Histories/Aaku_s1_F_20160717_new/raws/thumbnail/Screen Shot 2016-10-25 at 15.29.31.png +/Oral Histories/Aaku_s1_F_20160717_new/raws/thumbnail/Screen Shot 2016-10-25 at 15.29.33 1.png +/Oral Histories/Aaku_s1_F_20160717_new/raws/thumbnail/Screen Shot 2016-10-25 at 15.29.33.png +/Oral Histories/Aaku_s1_F_20160717_new/raws/thumbnail/Screen Shot 2016-10-25 at 15.29.34 1.png +/Oral Histories/Aaku_s1_F_20160717_new/raws/thumbnail/Screen Shot 2016-10-25 at 15.29.35.png +/Oral Histories/Abdurrahim_s5_M_20160611_eng+kaz+deu+ces+rus/Abdurrahim_s5_M_20160611_eng+kaz+deu+ces+rus.jpg +/Oral Histories/Abdurrahim_s5_M_20160611_eng+kaz+deu+ces+rus/Abdurrahim_s5_M_20160611_eng+kaz+deu+ces+rus.mp4 +/Oral Histories/Abdurrahim_s5_M_20160611_eng+kaz+deu+ces+rus/raws/footage/20160125_153013 Audio Extracted.pkf +/Oral Histories/Abdurrahim_s5_M_20160611_eng+kaz+deu+ces+rus/raws/footage/20160125_153013 Audio Extracted.wav +/Oral Histories/Abdurrahim_s5_M_20160611_eng+kaz+deu+ces+rus/raws/footage/20160125_153013.mp4 +/Oral Histories/Abhi_s3_M_20140316_tel+eng+spa/raws/footage/clips/WIN_20140316_112727.MP4 +/Oral Histories/Adam_s1_M_20160927_uzb/Adam_s1_M_20160927_uzb.jpg +/Oral Histories/Adam_s1_M_20160927_uzb/Adam_s1_M_20160927_uzb.mp4 +/Oral Histories/Adam_s1_M_20160927_uzb/raws/footage/clips/Adam Audio Extracted.wav +/Oral Histories/Adam_s1_M_20160927_uzb/raws/footage/clips/Adam.mov +/Oral Histories/Adam_s1_M_20160927_uzb/raws/Premier Project/Adam_s1_M_20160927_uzb.prproj +/Oral Histories/Adrian_s3_M_20131213_eng+por+spa/Adrian_s3_M_20131213_eng+por+spa.jpg +/Oral Histories/Adrian_s3_M_20131213_eng+por+spa/Adrian_s3_M_20131213_eng+por+spa.mp4 +/Oral Histories/Adrian_s3_M_20131213_eng+por+spa/raws/thumbnail/cNxwP6sQT023UM7GcBq1_adrian.png +/Oral Histories/Adrien_s2_M_20160902_cbk+spa/Adrien_s2_M_20160902_cbk+spa.mp4 +/Oral Histories/Adrien_s2_M_20160902_cbk+spa/raws/footage/clips/Chavacano-music.mp4 +/Oral Histories/Adrien_s2_M_20160902_cbk+spa/raws/footage/clips/chavacano.mp4 +/Oral Histories/Adrien_s2_M_20160902_cbk+spa/raws/Premier Project/Jake_s2_M_20160902_cbk+spa.prproj +/Oral Histories/Adrien_s2_M_20160902_cbk+spa/raws/Premier Project/Jake_s2_M_20160902_cbk+spa_1.prproj +/Oral Histories/Adrien_s2_M_20160902_cbk+spa/raws/Premier Project/Jake_s2_M_20160902_cbk+spa_1_1.prproj +/Oral Histories/Afro Amado_s2_M_20141007_por+seh/Afro Amado_s2_M_20141007_por+seh.mov +/Oral Histories/Ajriz_s1_M_20150103_-gor/Ajriz_s1_M_20150103_-gor.jpg +/Oral Histories/Ajriz_s1_M_20150103_-gor/Ajriz_s1_M_20150103_-gor.mp4 +/Oral Histories/Alan_s1_M_20150625_gla/Alan_s1_M_20150625_gla.jpg +/Oral Histories/Alan_s1_M_20150625_gla/Alan_s1_M_20150625_gla.mp4 +/Oral Histories/Alan_s1_M_20150625_gla/raws/footage/clips/MVI_9450.MOV +/Oral Histories/Alan_s1_M_20150625_gla/raws/thumbnail/CIwy5ZOARPCx4vMaFowp_alan.png +/Oral Histories/Aldade_s2_M_20140819_por+chw/Aldade_s2_M_20140819_por+chw.mov +/Oral Histories/Alexander_s1_M_20160711_bre/raws/Premiere proejct/Adobe Premiere Pro Auto-Save/Alexander_s1_M_20160711_bre-1.prproj +/Oral Histories/Alexander_s1_M_20160711_bre/raws/Premiere proejct/Adobe Premiere Pro Auto-Save/Alexander_s1_M_20160711_bre-3.prproj +/Oral Histories/Alexander_s1_M_20160711_bre/raws/Premiere proejct/Alexander_s1_M_20160711_bre_1.prproj +/Oral Histories/Alexander_s1_M_20160711_bre/raws/thumbnail/Screen Shot 2016-07-11 at 1.06.06 PM.png +/Oral Histories/Alexis_s1_F_20130706_eng/WIKITONGUES- Alexis speaking English.mp4 +/Oral Histories/Ali_s2_M_20150626_kau+hau/Ali_s2_M_20150626_kau+hau.mp4 +/Oral Histories/Ali_s2_M_20150626_kau+hau/raws/footage/Ali Laouali Mahaman Speaking Hanuri and Hausa.MP4 +/Oral Histories/Ali_s2_M_20150626_kau+hau/raws/premier project/Adobe Premiere Pro Preview Files/ali.PRV/Rendered - 3ec316ec-5cc6-4718-9267-28d0fbdc0a40.xmp +/Oral Histories/Ali_s2_M_20150626_kau+hau/raws/premier project/Adobe Premiere Pro Preview Files/ali.PRV/Rendered - 50321b88-cac4-4e3f-80eb-f2dd3f4d9beb.mpeg +/Oral Histories/Ali_s2_M_20150626_kau+hau/raws/premier project/Adobe Premiere Pro Preview Files/ali.PRV/Rendered - 50321b88-cac4-4e3f-80eb-f2dd3f4d9beb.xmp +/Oral Histories/Ali_s2_M_20150626_kau+hau/raws/premier project/Adobe Premiere Pro Preview Files/ali.PRV/Rendered - b25ffe92-d32a-4552-bc25-9e15d2852330.xmp +/Oral Histories/Ali_s2_M_20150626_kau+hau/raws/Premier Project/ali.prproj +/Oral Histories/Alim_s1_F_20141118_fuq/Alim_s1_F_20141118_fuq.jpg +/Oral Histories/Alim_s1_F_20141118_fuq/raws/thumbnail/eyv6GtOQj2urnvKd4Pnc_alim.png +/Oral Histories/Andi_s1_M_20160405_bbc/Andi_s1_M_20160405_bbc.jpg +/Oral Histories/Andi_s1_M_20160405_bbc/Andi_s1_M_20160405_bbc.mp4 +/Oral Histories/Andi_s1_M_20160405_bbc/raws/premiere project/Andi_s1_M_20160405_bbc.prproj +/Oral Histories/Andi_s1_M_20160405_bbc/raws/thumbnail/Andi_s1_M_20160405_bbc.png +/Oral Histories/Andrea_s1_M_20151117_lld/Andrea_s1_M_20151117_lld.jpg +/Oral Histories/André_s1_M_20140408_por/André_s1_M_20140408_por.jpg +/Oral Histories/André_s1_M_20140408_por/André_s1_M_20140408_por.mp4 +/Oral Histories/André_s1_M_20140408_por/raws/thumbnail/pti3XjyRVOWYv2hv3U2c_andre.png +/Oral Histories/Angel_s1_M_20140729_rup/raws/thumbnail/I6UMgVRThl5YxfvACVDw_angel-rup-thumb-raw.png +/Oral Histories/Angelo_s1_M_20130311_por/Angelo_s1_M_20130311_por.jpg +/Oral Histories/Angelo_s1_M_20130311_por/Angelo_s1_M_20130311_por.mp4 +/Oral Histories/Ani_s1_F_20130803_hye/Ani_s1_F_20130803_hye.jpg +/Oral Histories/Ani_s1_F_20130803_hye/Ani_s1_F_20130803_hye.mp4 +/Oral Histories/Ani_s1_F_20130803_hye/raws/thumbnail/9ka5EjWzQ9GVM6Ej0p2m_ani.png +/Oral Histories/Anita_s1_F_20130329_cat/Anita_s1_F_20130329_cat.jpg +/Oral Histories/Anita_s1_F_20130329_cat/Anita_s1_F_20130329_cat.mp4 +/Oral Histories/Anita_s1_F_20130329_cat/raws/thumbnail/gyYaQH4gSXeEcS97720n_anita.png +/Oral Histories/Anna_s5_F_20150609_eng+fra+rus+ces+lvs/Anna_s5_F_20150609_eng+fra+rus+ces+lvs.mp4 +/Oral Histories/Anna_s5_F_20150609_eng+fra+rus+ces+lvs/raws/footage/clips/Anna speaking English, French, Czech, Russian, Latvian Audio Extracted.pkf +/Oral Histories/Anna_s5_F_20150609_eng+fra+rus+ces+lvs/raws/footage/clips/Anna speaking English, French, Czech, Russian, Latvian Audio Extracted.wav +/Oral Histories/Anna_s5_F_20150609_eng+fra+rus+ces+lvs/raws/footage/clips/Anna speaking English, French, Czech, Russian, Latvian Audio Extracted_1.wav +/Oral Histories/Anna_s5_F_20150609_eng+fra+rus+ces+lvs/raws/footage/clips/Anna speaking English, French, Czech, Russian, Latvian.mp4 +/Oral Histories/Anna_s5_F_20150609_eng+fra+rus+ces+lvs/raws/premier project/Adobe Premiere Pro Preview Files/anna.PRV/Rendered - 0cef0f7a-9163-49ce-809e-5896d87ac43b.mpeg +/Oral Histories/Anna_s5_F_20150609_eng+fra+rus+ces+lvs/raws/Premier Project/anna.prproj +/Oral Histories/Anna_s5_F_20150609_eng+fra+rus+ces+lvs/raws/thumbnail/2BvOVXLgSQK5dqaiJG4P_anna.png +/Oral Histories/Anne_s1_F_20160118_swg/Anne_s1_F_20160118_swg.jpg +/Oral Histories/Anne_s1_F_20160118_swg/raws/thumbnail/EEPwViyRYqBfxPnW4Wew_anne-swg-thumb-raw.png +/Oral Histories/Anneli_s1_F_20141120_swe/anneli-swe.mp4 +/Oral Histories/Anonymous_s1__20151201_jdt/raws/footage/clips/MVI_9977.MOV +/Oral Histories/Anthony_s1_M_20140417_gsw/Anthony_s1_M_20140417_gsw.jpg +/Oral Histories/Anthony_s1_M_20140417_gsw/Anthony_s1_M_20140417_gsw.mp4 +/Oral Histories/Anthony_s1_M_20140417_gsw/raws/footage/clips/Anthony swissgerman video.mp4 +/Oral Histories/Anthony_s1_M_20140417_gsw/raws/footage/transcript.rtf +/Oral Histories/Anthony_s1_M_20140417_gsw/raws/thumbnail/P4bNFV1ITHm4HY8KQ08C_Anthony_s1_M_20140417_gsw.png +/Oral Histories/António, Domingos, Porfirio_s1_MMM_20150815_mwl/António, Domingos, Porfirio_s1_MMM_20150815_mwl.mp4 +/Oral Histories/António, Domingos, Porfirio_s1_MMM_20150815_mwl/raws/footage/António Sebastião Preto - Domingos Gonçalo - Porfirio Domingues Audio Extracted.wav +/Oral Histories/António, Domingos, Porfirio_s1_MMM_20150815_mwl/raws/footage/António Sebastião Preto - Domingos Gonçalo - Porfirio Domingues.aiff +/Oral Histories/António, Domingos, Porfirio_s1_MMM_20150815_mwl/raws/footage/MVI_9960 Audio Extracted.pkf +/Oral Histories/António, Domingos, Porfirio_s1_MMM_20150815_mwl/raws/footage/MVI_9960.MOV +/Oral Histories/António, Domingos, Porfirio_s1_MMM_20150815_mwl/raws/Premier Project/Adobe Premiere Pro Auto-Save/antoniosebastiaodimngos-mwl-1.prproj +/Oral Histories/António, Domingos, Porfirio_s1_MMM_20150815_mwl/raws/Premier Project/Adobe Premiere Pro Auto-Save/antoniosebastiaodimngos-mwl-2.prproj +/Oral Histories/António, Domingos, Porfirio_s1_MMM_20150815_mwl/raws/premier project/Adobe Premiere Pro Preview Files/antoniosebastiaodimngos-mwl.PRV/e3e6b9ba-f1f2-4dc7-ba81-3960a92b9885+d1f0a9035d299af8c60a4313 48000.pek +/Oral Histories/António, Domingos, Porfirio_s1_MMM_20150815_mwl/raws/premier project/Adobe Premiere Pro Preview Files/antoniosebastiaodimngos-mwl.PRV/Rendered - 2debb157-bc13-47c5-8e38-5f3a583e74bd.mpeg +/Oral Histories/António, Domingos, Porfirio_s1_MMM_20150815_mwl/raws/premier project/Adobe Premiere Pro Preview Files/antoniosebastiaodimngos-mwl.PRV/Rendered - 2debb157-bc13-47c5-8e38-5f3a583e74bd.xmp +/Oral Histories/António, Domingos, Porfirio_s1_MMM_20150815_mwl/raws/premier project/Adobe Premiere Pro Preview Files/antoniosebastiaodimngos-mwl.PRV/Rendered - c4e63b2a-ec5b-4547-894e-c1f8afd4589f.xmp +/Oral Histories/António, Domingos, Porfirio_s1_MMM_20150815_mwl/raws/premier project/Adobe Premiere Pro Preview Files/antoniosebastiaodimngos-mwl.PRV/Rendered - d5ce78a1-a99d-4acb-8da4-0abdf5ab6b2f.mpeg +/Oral Histories/António, Domingos, Porfirio_s1_MMM_20150815_mwl/raws/premier project/Adobe Premiere Pro Preview Files/antoniosebastiaodimngos-mwl.PRV/Rendered - d5ce78a1-a99d-4acb-8da4-0abdf5ab6b2f.xmp +/Oral Histories/Ares_s1_F_20131201_oci/Ares_s1_F_20131201_oci.mp4 +/Oral Histories/Ares_s1_F_20131201_oci/raws/footage/MVI_8385.MOV +/Oral Histories/Ares_s1_F_20131201_oci/raws/footage/MVI_8386.MOV +/Oral Histories/Ares_s1_F_20131201_oci/raws/footage/STE-079.wav +/Oral Histories/Ares_s1_F_20131201_oci/raws/premier project/Adobe Premiere Pro Preview Files/ares-aranes.PRV/07adab8c-47e8-4545-a829-d2f5c80351ca+578c1f4ee1eb8da93e9b088e 48000.pek +/Oral Histories/Ares_s1_F_20131201_oci/raws/premier project/Adobe Premiere Pro Preview Files/ares-aranes.PRV/07adab8c-47e8-4545-a829-d2f5c80351ca+578c1f4ee1eb8da93e9b088e 48000_1.pek +/Oral Histories/Ares_s1_F_20131201_oci/raws/premier project/Adobe Premiere Pro Preview Files/ares-aranes.PRV/07adab8c-47e8-4545-a829-d2f5c80351ca+fe07c7013467d302bfb191ab 48000.pek +/Oral Histories/Ares_s1_F_20131201_oci/raws/premier project/Adobe Premiere Pro Preview Files/ares-aranes.PRV/2025ad4d-c2ce-4735-8ad0-0c12c6311511+31b35c2bd5273759e911068 48000.pek +/Oral Histories/Ares_s1_F_20131201_oci/raws/premier project/Adobe Premiere Pro Preview Files/ares-aranes.PRV/2025ad4d-c2ce-4735-8ad0-0c12c6311511+439e9f5a5567fcb7e79ed7fd 48000.pek +/Oral Histories/Ares_s1_F_20131201_oci/raws/premier project/Adobe Premiere Pro Preview Files/ares-aranes.PRV/3e6b755e-865f-462f-b9b0-9ddc84c61585+c2e0611821d8e62b3bad9c2b 48000.pek +/Oral Histories/Ares_s1_F_20131201_oci/raws/premier project/Adobe Premiere Pro Preview Files/ares-aranes.PRV/6a07f5d0-7d0b-424b-8527-3496eb221007+83a5fa0ff22d7cae58df4f5a 48000.pek +/Oral Histories/Ares_s1_F_20131201_oci/raws/premier project/Adobe Premiere Pro Preview Files/ares-aranes.PRV/6a07f5d0-7d0b-424b-8527-3496eb221007+83a5fa0ff22d7cae58df4f5a 48000_1.pek +/Oral Histories/Ares_s1_F_20131201_oci/raws/premier project/Adobe Premiere Pro Preview Files/ares-aranes.PRV/6a07f5d0-7d0b-424b-8527-3496eb221007+f8ddabf4deb9ffc4b1c3b917 48000.pek +/Oral Histories/Ares_s1_F_20131201_oci/raws/premier project/Adobe Premiere Pro Preview Files/ares-aranes.PRV/Rendered - 15501468-64df-4a6f-b450-059fa14f9bcc.mpeg +/Oral Histories/Ares_s1_F_20131201_oci/raws/premier project/Adobe Premiere Pro Preview Files/ares-aranes.PRV/Rendered - 15501468-64df-4a6f-b450-059fa14f9bcc.xmp +/Oral Histories/Ares_s1_F_20131201_oci/raws/premier project/Adobe Premiere Pro Preview Files/ares-aranes.PRV/Rendered - c476e2cc-4d41-4060-bc7a-4e9d5a620016.xmp +/Oral Histories/Ares_s1_F_20131201_oci/raws/Premier Project/ares-aranes.prproj +/Oral Histories/Ares_s1_F_20131201_oci/raws/thumbnail/ares-oci-thumb-raw.png +/Oral Histories/Argo_s1_M_20150418_ind/raws/footage/Indonesian.mp4 +/Oral Histories/Argo_s1_M_20150418_ind/raws/Premier Project/Adobe Premiere Pro Auto-Save/argo-ind-1.prproj +/Oral Histories/Argo_s1_M_20150418_ind/raws/Premier Project/Adobe Premiere Pro Auto-Save/argo-ind-2.prproj +/Oral Histories/Argo_s1_M_20150418_ind/raws/premier project/Adobe Premiere Pro Preview Files/argo-ind.PRV/Rendered - f14be501-1339-40e0-bc64-beb2c5142c1b.mpeg +/Oral Histories/Argo_s1_M_20150418_ind/raws/premier project/Adobe Premiere Pro Preview Files/argo-ind.PRV/Rendered - f14be501-1339-40e0-bc64-beb2c5142c1b.xmp +/Oral Histories/Argo_s1_M_20150418_ind/raws/premier project/Adobe Premiere Pro Preview Files/argo-ind~recover.PRV/Rendered - 823b4a9f-24d0-4035-8a18-51f17486a42d.mpeg +/Oral Histories/Argo_s1_M_20150418_ind/raws/Premier Project/Indonesian Audio Extracted Audio Extracted Audio Extracted.pkf +/Oral Histories/Argo_s1_M_20150418_ind/raws/Premier Project/Indonesian Audio Extracted Audio Extracted Audio Extracted.wav +/Oral Histories/Argo_s1_M_20150418_ind/raws/Premier Project/Indonesian Audio Extracted Audio Extracted.pkf +/Oral Histories/Argo_s1_M_20150418_ind/raws/Premier Project/Indonesian Audio Extracted.pkf +/Oral Histories/Argo_s1_M_20150418_ind/raws/Premier Project/Indonesian Audio Extracted.wav +/Oral Histories/Argo_s1_M_20150418_ind/raws/Premier Project/Indonesian Audio Extracted_1.pkf +/Oral Histories/Artur_s1_M_20150101_glg/Artur_s1_M_20150101_glg.jpg +/Oral Histories/Artur_s1_M_20150101_glg/Artur_s1_M_20150101_glg.mp4 +/Oral Histories/Artur_s1_M_20150101_glg/raws/thumbnail/EiwoIgDFRmKWRC9nPiz3_artur.png +/Oral Histories/Artur_s1_M_20150421_cat/Artur_s1_M_20150421_cat.mp4 +/Oral Histories/Artur_s1_M_20150421_cat/raws/footage/clips/Artur Mas-2_01 Audio Extracted Audio Extracted.pkf +/Oral Histories/Artur_s1_M_20150421_cat/raws/footage/clips/Artur Mas-2_01 Audio Extracted Audio Extracted.wav +/Oral Histories/Artur_s1_M_20150421_cat/raws/footage/clips/Artur Mas-2_01 Audio Extracted.wav +/Oral Histories/Artur_s1_M_20150421_cat/raws/footage/clips/Artur Mas-2_01.wav +/Oral Histories/Artur_s1_M_20150421_cat/raws/footage/clips/Artur Mas.aiff +/Oral Histories/Artur_s1_M_20150421_cat/raws/Premier Project/Adobe Premiere Pro Auto-Save/artur-cat-1.prproj +/Oral Histories/Artur_s1_M_20150421_cat/raws/Premier Project/Adobe Premiere Pro Auto-Save/artur-cat-2.prproj +/Oral Histories/Artur_s1_M_20150421_cat/raws/Premier Project/Adobe Premiere Pro Auto-Save/artur-cat-3.prproj +/Oral Histories/Artur_s1_M_20150421_cat/raws/Premier Project/Adobe Premiere Pro Auto-Save/artur-cat-5.prproj +/Oral Histories/Artur_s1_M_20150421_cat/raws/Premier Project/Adobe Premiere Pro Auto-Save/artur-cat-6.prproj +/Oral Histories/Artur_s1_M_20150421_cat/raws/Premier Project/Adobe Premiere Pro Auto-Save/artur-cat-7.prproj +/Oral Histories/Artur_s1_M_20150421_cat/raws/Premier Project/Adobe Premiere Pro Auto-Save/artur-cat-9.prproj +/Oral Histories/Artur_s1_M_20150421_cat/raws/premier project/Adobe Premiere Pro Preview Files/artur-cat.PRV/0cfd299b-7728-4bb1-930e-442db69638c9+aa488ac563eb773f5d7c61b5 48000.cfa +/Oral Histories/Artur_s1_M_20150421_cat/raws/premier project/Adobe Premiere Pro Preview Files/artur-cat.PRV/0cfd299b-7728-4bb1-930e-442db69638c9+aa488ac563eb773f5d7c61b5 48000.pek +/Oral Histories/Artur_s1_M_20150421_cat/raws/premier project/Adobe Premiere Pro Preview Files/artur-cat.PRV/84ba3c0c-9651-45de-bfc8-62d3c4a154fb+4b213a035eedb22f289f21db 48000.pek +/Oral Histories/Artur_s1_M_20150421_cat/raws/premier project/Adobe Premiere Pro Preview Files/artur-cat.PRV/Rendered - 02ab8fe3-6150-4b08-8b91-eef8dbcb31e5.xmp +/Oral Histories/Artur_s1_M_20150421_cat/raws/premier project/Adobe Premiere Pro Preview Files/artur-cat.PRV/Rendered - 1c3d7514-c1f7-46cc-97d8-7efd1b99abf7.xmp +/Oral Histories/Artur_s1_M_20150421_cat/raws/premier project/Adobe Premiere Pro Preview Files/artur-cat.PRV/Rendered - 3a73eba0-73b4-477d-b107-e0b6d38cd78b.mpeg +/Oral Histories/Artur_s1_M_20150421_cat/raws/premier project/Adobe Premiere Pro Preview Files/artur-cat.PRV/Rendered - 3a73eba0-73b4-477d-b107-e0b6d38cd78b.xmp +/Oral Histories/Artur_s1_M_20150421_cat/raws/premier project/Adobe Premiere Pro Preview Files/artur-cat.PRV/Rendered - 56000291-da60-4bc4-ba42-27646eb8f901.xmp +/Oral Histories/Artur_s1_M_20150421_cat/raws/premier project/Adobe Premiere Pro Preview Files/artur-cat.PRV/Rendered - 8864fdc3-8bc4-4d1a-bb7a-39ffdd9bfc74.xmp +/Oral Histories/Artur_s1_M_20150421_cat/raws/premier project/Adobe Premiere Pro Preview Files/artur-cat.PRV/Rendered - ab23b6d1-ae1a-4c58-946c-9152c289159a.mpeg +/Oral Histories/Artur_s1_M_20150421_cat/raws/premier project/Adobe Premiere Pro Preview Files/artur-cat.PRV/Rendered - ab23b6d1-ae1a-4c58-946c-9152c289159a.xmp +/Oral Histories/Artur_s1_M_20150421_cat/raws/premier project/Adobe Premiere Pro Preview Files/artur-cat.PRV/Rendered - c7a17f99-0bd6-4c1e-838e-e7e9fa8b2b13.xmp +/Oral Histories/Artur_s1_M_20150421_cat/raws/premier project/Adobe Premiere Pro Preview Files/artur-cat.PRV/Rendered - dde2f0e0-f871-4b8f-a339-77ffec37222e.mpeg +/Oral Histories/Artur_s1_M_20150421_cat/raws/premier project/Adobe Premiere Pro Preview Files/artur-cat.PRV/Rendered - dde2f0e0-f871-4b8f-a339-77ffec37222e.xmp +/Oral Histories/Artur_s1_M_20150421_cat/raws/premier project/Adobe Premiere Pro Preview Files/artur-cat.PRV/Rendered - fd242f4a-0c07-4d08-9332-ea612490b879.mpeg +/Oral Histories/Artur_s1_M_20150421_cat/raws/premier project/Adobe Premiere Pro Preview Files/artur-cat.PRV/Rendered - fd242f4a-0c07-4d08-9332-ea612490b879.xmp +/Oral Histories/Artur_s1_M_20150421_cat/raws/premier project/Adobe Premiere Pro Preview Files/artur-cat.PRV/Rendered - fe043c54-d23c-4e90-b306-d690e68ad53d.xmp +/Oral Histories/Artur_s1_M_20150421_cat/raws/thumbnail/uiaP50oQRpS79fXXSFLq_artur.png +/Oral Histories/Ashwath_s1_M_20140722_knn/Ashwath_s1_M_20140722_knn.jpg +/Oral Histories/Ashwath_s1_M_20140722_knn/Ashwath_s1_M_20140722_knn.mp4 +/Oral Histories/Asimenia_s2_F_20161130_ell+pnt/raws/footage/clips/Caucasian Greek - Asimenia.mp4 +/Oral Histories/Augusto_s1_M_20140729_por/raws/footage/clips/MVI_9941.MOV +/Oral Histories/Augusto_s1_M_20140729_por/raws/footage/clips/MVI_9942.MOV +/Oral Histories/Augusto_s1_M_20140729_por/raws/footage/clips/STE-020.wav +/Oral Histories/Augusto_s1_M_20140729_por/raws/thumbnail/1OmwO9BEQtiBgUPBeclJ_augusto-por-thumb-raw.png +/Oral Histories/Aurora & Ademar_s1_FM_20150815_mwl/raws/footage/Ademar Augusto Preto - Aurora Augusta Sebastião.aiff +/Oral Histories/Ayesha_s1_F_20140814_ben/Ayesha_s1_F_20140814_ben.jpg +/Oral Histories/Ayesha_s1_F_20140814_ben/Ayesha_s1_F_20140814_ben.mp4 +/Oral Histories/Ayesha_s1_F_20140814_ben/raws/thumbnail/Ku2ZBRPfSWKtDL6PkDZ5_ayesha.png +/Oral Histories/Bart_s1_M_20140729_nld/Bart_s1_M_20140729_nld.mp4 +/Oral Histories/Bart_s1_M_20140729_nld/Raws/Footage/MVI_9921.MOV +/Oral Histories/Bart_s1_M_20140729_nld/Raws/Footage/MVI_9922.MOV +/Oral Histories/Bart_s1_M_20140729_nld/Raws/Footage/STE-011 Audio Extracted.wav +/Oral Histories/Bart_s1_M_20140729_nld/Raws/Footage/STE-011.wav +/Oral Histories/Bart_s1_M_20140729_nld/Raws/Footage/uruguay.cube +/Oral Histories/Bart_s1_M_20140729_nld/raws/Premiere Project/Adobe Premiere Pro Auto-Save/Bart_s1_M_20140729_nld-1.prproj +/Oral Histories/Bart_s1_M_20140729_nld/Raws/Premiere Project/Bart_s1_M_20140729_nld.prproj +/Oral Histories/Bart_s1_M_20140729_nld/Raws/Thumbnail/Screen Shot 2016-05-05 at 18.01.17.png +/Oral Histories/Bart_s1_M_20140729_nld/Raws/Thumbnail/thumb_MVI_9945_1024.jpg +/Oral Histories/Benjamin_s1_M_20150517_bos/Benjamin - Bosnian.mp4 +/Oral Histories/Benjamin_s1_M_20150517_bos/Benjamin_s1_M_20150517_bos.jpg +/Oral Histories/Bertha_s1_F_20151215_afs/Bertha speaking Seminole Creole.jpg +/Oral Histories/Bertha_s1_F_20151215_afs/Bertha speaking Seminole Creole.mp4 +/Oral Histories/Bertha_s1_F_20151215_afs/Raws/Footage/MVI_9945.MOV +/Oral Histories/Bertha_s1_F_20151215_afs/Raws/Footage/Seminole Creole Audio Extracted.wav +/Oral Histories/Bertha_s1_F_20151215_afs/Raws/Footage/Seminole Creole.aiff +/Oral Histories/Bertha_s1_F_20151215_afs/raws/Premiere Project/Adobe Premiere Pro Auto-Save/bertha-afs-1.prproj +/Oral Histories/Bertha_s1_F_20151215_afs/raws/Premiere Project/Adobe Premiere Pro Auto-Save/bertha-afs_1-2.prproj +/Oral Histories/Bertha_s1_F_20151215_afs/raws/Premiere Project/Adobe Premiere Pro Auto-Save/bertha-afs_1-3.prproj +/Oral Histories/Bertha_s1_F_20151215_afs/raws/premiere project/Adobe Premiere Pro Preview Files/bertha-afs.PRV/b9c10266-feaf-41aa-b391-47663d0ea9d8+3dd5a27b-a9e8-1583-abbc-0bb400000049 48000.cfa +/Oral Histories/Bertha_s1_F_20151215_afs/Raws/Premiere Project/bertha-afs.prproj +/Oral Histories/Bertha_s1_F_20151215_afs/Raws/Premiere Project/bertha-afs_1.prproj +/Oral Histories/Bertha_s1_F_20151215_afs/Raws/Thumbnail/thumb_MVI_9945_1024.jpg +/Oral Histories/Bety_s1_F_20160525_toj/Bety_s1_F_20160525_toj.mp4 +/Oral Histories/Bety_s1_F_20160525_toj/raws/footage/IMG_1876.MOV Audio Extracted.pkf +/Oral Histories/Bety_s1_F_20160525_toj/raws/footage/IMG_1876.MOV Audio Extracted.wav +/Oral Histories/Bety_s1_F_20160525_toj/raws/Premier Project/Bety_s1_F_20160525_toj.prproj +/Oral Histories/Bety_s1_F_20160525_toj/raws/thumbnail/Screen Shot 2016-07-31 at 9.40.23 PM.png +/Oral Histories/Caitlin_s1_F_20131103_eng/Caitlin_s1_F_20131103_eng.jpg +/Oral Histories/Caitlin_s1_F_20131103_eng/raws/thumbnail/g0tZ8rmSSMilnyoSmegX_caitlin.png +/Oral Histories/Cal_s3_M_20160406_por+eng+fra/Cal speaking Portuguese, English and French.mp4 +/Oral Histories/Cal_s3_M_20160406_por+eng+fra/Raws/Footage/VID-20160405-WA0003 Audio Extracted.pkf +/Oral Histories/Cal_s3_M_20160406_por+eng+fra/Raws/Footage/VID-20160405-WA0003.mp4 +/Oral Histories/Cal_s3_M_20160406_por+eng+fra/raws/premiere project/Adobe Premiere Pro Preview Files/Cal speaking Portuguese, English, and French.PRV/89de7612-7872-438e-bf20-e59b73a39f82+5a678333-3a67-3407-52b5-d51c00000049 48000.cfa +/Oral Histories/Cal_s3_M_20160406_por+eng+fra/raws/premiere project/Adobe Premiere Pro Preview Files/Cal speaking Portuguese, English, and French.PRV/89de7612-7872-438e-bf20-e59b73a39f82+5a678333-3a67-3407-52b5-d51c00000049 48000.pek +/Oral Histories/Camila_s2_F_20160822_eng+por/Camila_s2_F_20160822_eng+por.jpg +/Oral Histories/Camila_s2_F_20160822_eng+por/Camila_s2_F_20160822_eng+por.mp4 +/Oral Histories/Camila_s2_F_20160822_eng+por/raws/footage/clips/Camila speaking Portuguese and English Audio Extracted.pkf +/Oral Histories/Camila_s2_F_20160822_eng+por/raws/footage/clips/Camila speaking Portuguese and English.mp4 +/Oral Histories/Camila_s2_F_20160822_eng+por/raws/Premiere project/Camila_s2_F_20160822_eng+por.prproj +/Oral Histories/Camila_s2_F_20160822_eng+por/raws/thumbnails/Screen Shot 2016-10-04 at 01.05.20.png +/Oral Histories/Camila_s2_F_20160822_eng+por/readme.txt +/Oral Histories/Camille_s1_F_20150815_fra/raws/footage/clips/Camille français #2.aiff +/Oral Histories/Camille_s1_F_20150815_fra/raws/footage/clips/Camille Suisse Français.aiff +/Oral Histories/Camille_s1_F_20150815_fra/raws/footage/clips/MVI_9952.MOV +/Oral Histories/Camille_s1_F_20150815_fra/raws/footage/clips/MVI_9953.MOV +/Oral Histories/Camille_s1_F_20150815_fra/raws/thumbnail/kvQMP6pAQ9Wht80lU97H_camille-fra-thumb-raw.png +/Oral Histories/Candy_s1_F_20150929_mlg/Candy_s1_F_20150929_mlg.jpg +/Oral Histories/Candy_s1_F_20150929_mlg/Candy_s1_F_20150929_mlg.mp4 +/Oral Histories/Candy_s1_F_20150929_mlg/raws/footage/MVI_0088.MOV +/Oral Histories/Candy_s1_F_20150929_mlg/raws/footage/MVI_0092.MOV +/Oral Histories/Candy_s1_F_20150929_mlg/raws/footage/STE-031 Audio Extracted Audio Extracted Audio Extracted Audio Extracted.pkf +/Oral Histories/Candy_s1_F_20150929_mlg/raws/footage/STE-031 Audio Extracted Audio Extracted Audio Extracted Audio Extracted.wav +/Oral Histories/Candy_s1_F_20150929_mlg/raws/footage/STE-031 Audio Extracted Audio Extracted Audio Extracted.wav +/Oral Histories/Candy_s1_F_20150929_mlg/raws/footage/STE-031 Audio Extracted Audio Extracted.pkf +/Oral Histories/Candy_s1_F_20150929_mlg/raws/footage/STE-031 Audio Extracted Audio Extracted.wav +/Oral Histories/Candy_s1_F_20150929_mlg/raws/footage/STE-031 Audio Extracted.wav +/Oral Histories/Candy_s1_F_20150929_mlg/raws/footage/STE-031 Audio Extracted_1.pkf +/Oral Histories/Candy_s1_F_20150929_mlg/raws/footage/STE-031 Audio Extracted_1.wav +/Oral Histories/Candy_s1_F_20150929_mlg/raws/footage/STE-031 Audio Extracted_2.wav +/Oral Histories/Candy_s1_F_20150929_mlg/raws/footage/STE-031.wav +/Oral Histories/Candy_s1_F_20150929_mlg/raws/Premier Project/Adobe Premiere Pro Auto-Save/candy-mlg-1.prproj +/Oral Histories/Candy_s1_F_20150929_mlg/raws/premier project/Adobe Premiere Pro Preview Files/candy-mlg.PRV/Rendered - 18d3f983-ef33-4870-8582-190fc9664621.mpeg +/Oral Histories/Candy_s1_F_20150929_mlg/raws/premier project/Adobe Premiere Pro Preview Files/candy-mlg.PRV/Rendered - 18d3f983-ef33-4870-8582-190fc9664621.xmp +/Oral Histories/Candy_s1_F_20150929_mlg/raws/Premier Project/candy-mlg.prproj +/Oral Histories/Candy_s1_F_20150929_mlg/readme.txt +/Oral Histories/Carl_s1_M_20151231_eng/raws/footage/clips/MVI_9439.MOV +/Oral Histories/Carl_s1_M_20151231_eng/raws/footage/clips/STE-023.wav +/Oral Histories/Carrie_s1_F_20160717_yue/raws/footage/audio/STE-007.wav +/Oral Histories/Carrie_s1_F_20160717_yue/raws/footage/clips/MVI_0167.MOV +/Oral Histories/Celena_s2_F_20150815_mwl+por/Celena_s2_F_20150815_mwl+por.jpg +/Oral Histories/Celena_s2_F_20150815_mwl+por/raws/footage/clips/Celena Mirandês Português Audio Extracted Audio Extracted.wav +/Oral Histories/Celena_s2_F_20150815_mwl+por/raws/footage/clips/Celena Mirandês Português Audio Extracted.pkf +/Oral Histories/Celena_s2_F_20150815_mwl+por/raws/footage/clips/Celena Mirandês Português Audio Extracted.wav +/Oral Histories/Celena_s2_F_20150815_mwl+por/raws/footage/clips/MVI_9958 Audio Extracted.pkf +/Oral Histories/Celena_s2_F_20150815_mwl+por/raws/footage/clips/MVI_9958 Audio Extracted.wav +/Oral Histories/Celena_s2_F_20150815_mwl+por/raws/footage/clips/MVI_9958.MOV +/Oral Histories/Celena_s2_F_20150815_mwl+por/raws/Premier Project/Adobe Premiere Pro Auto-Save/Celena_s2_F_20150815_mwl+por-1.prproj +/Oral Histories/Celena_s2_F_20150815_mwl+por/raws/Premier Project/Adobe Premiere Pro Auto-Save/Celena_s2_F_20150815_mwl+por-2.prproj +/Oral Histories/Celena_s2_F_20150815_mwl+por/raws/premier project/Adobe Premiere Pro Preview Files/Celena_s2_F_20150815_mwl+por.PRV/a422ce6a-9c23-4971-abef-3190430fc795+82542fa2-df3b-8749-48bf-00c800000049 48000.cfa +/Oral Histories/Celena_s2_F_20150815_mwl+por/raws/premier project/Adobe Premiere Pro Preview Files/Celena_s2_F_20150815_mwl+por.PRV/d1f931c0-7ef2-4277-8dcb-49141461d441+09de97ba-6112-8602-e3ff-402300000049 48000.pek +/Oral Histories/Celena_s2_F_20150815_mwl+por/raws/Premier Project/Celena_s2_F_20150815_mwl+por.prproj +/Oral Histories/Celena_s2_F_20150815_mwl+por/raws/thumbnail/l2RrUQWZS7utGr4IqMtQ_celena-mwl-thumb-raw.png +/Oral Histories/Charles_s1_M_20151215_wuu/Charles Cai_s1_M_20151215_wuu.jpg +/Oral Histories/Charles_s1_M_20151215_wuu/Charles_s1_M_20151215_wuu.mp4 +/Oral Histories/Charles_s1_M_20151215_wuu/raws/footage/Linhai Hua Interview-italki.720p Audio Extracted.pkf +/Oral Histories/Charles_s1_M_20151215_wuu/raws/footage/Linhai Hua Interview-italki.720p.mov +/Oral Histories/Charles_s1_M_20151215_wuu/raws/Premier Project/Charles Cai_s1_M_20151215_wuu.prproj +/Oral Histories/Charles_s1_M_20151215_wuu/raws/thumbnail/Screen Shot 2016-06-29 at 12.26.43.png +/Oral Histories/Chernet_s2_M_20160717_eng+spa/raws/footage/clips/MVI_0160.MOV +/Oral Histories/Chez_s1_F_20160717_taj/raws/footage/audio/STE-003.wav +/Oral Histories/Chez_s1_F_20160717_taj/raws/footage/clips/MVI_0163.MOV +/Oral Histories/Christian_s1_M_20150407_fra/Christian_s1_M_20150407_fra.mp4 +/Oral Histories/Christian_s1_M_20150407_fra/raws/footage/clips/Selfie_web480p_clipchamp.com.mp4 +/Oral Histories/Christian_s1_M_20150407_fra/raws/thumbnail/J6vWKVS2200j6pBYggq3_christian-fra-thumb-raw.png +/Oral Histories/Christine_s1_F_20140921_sco/raws/footage/MVI_9435.MOV +/Oral Histories/Christine_s1_F_20140921_sco/raws/footage/STE-019.wav +/Oral Histories/Churmin_s1_F_20160717_xsr/raws/footage/audio/STE-010.wav +/Oral Histories/Ciaran_s1_M_20151222_eng/Ciaran speaking English.jpg +/Oral Histories/Ciaran_s1_M_20151222_eng/Ciaran speaking English.mp4 +/Oral Histories/Ciaran_s1_M_20151222_eng/Footage/MVI_9426 Audio Extracted.wav +/Oral Histories/Ciaran_s1_M_20151222_eng/Footage/STE-009.wav +/Oral Histories/Ciaran_s1_M_20151222_eng/Premiere Project/Adobe Premiere Pro Auto-Save/Untitled-1.prproj +/Oral Histories/Ciaran_s1_M_20151222_eng/Premiere Project/Adobe Premiere Pro Auto-Save/Untitled-2.prproj +/Oral Histories/Ciaran_s1_M_20151222_eng/premiere project/Adobe Premiere Pro Preview Files/Untitled.PRV/Rendered - 2339803a-f5b2-4981-9544-efd60acfb4bf.mpeg +/Oral Histories/Ciaran_s1_M_20151222_eng/premiere project/Adobe Premiere Pro Preview Files/Untitled.PRV/Rendered - 2339803a-f5b2-4981-9544-efd60acfb4bf.xmp +/Oral Histories/Ciaran_s1_M_20151222_eng/premiere project/Adobe Premiere Pro Preview Files/Untitled.PRV/Rendered - 68048d5e-a9ba-438f-bb33-30f20ba1f73d.mpeg +/Oral Histories/Ciaran_s1_M_20151222_eng/premiere project/Adobe Premiere Pro Preview Files/Untitled.PRV/Rendered - 8260676f-2e28-4a92-9797-8895d48601db.mpeg +/Oral Histories/Ciaran_s1_M_20151222_eng/premiere project/Adobe Premiere Pro Preview Files/Untitled.PRV/Rendered - 8260676f-2e28-4a92-9797-8895d48601db.xmp +/Oral Histories/Ciaran_s1_M_20151222_eng/premiere project/Adobe Premiere Pro Preview Files/Untitled.PRV/Rendered - 84098cf6-9d27-41b6-a3d9-ccb893e4c176.mpeg +/Oral Histories/Ciaran_s1_M_20151222_eng/premiere project/Adobe Premiere Pro Preview Files/Untitled.PRV/Rendered - c461aa43-d78f-4e06-95fe-81d662ad1563.mpeg +/Oral Histories/Ciaran_s1_M_20151222_eng/premiere project/Adobe Premiere Pro Preview Files/Untitled.PRV/Rendered - c461aa43-d78f-4e06-95fe-81d662ad1563.xmp +/Oral Histories/Ciaran_s1_M_20151222_eng/premiere project/Adobe Premiere Pro Preview Files/Untitled.PRV/Rendered - f1442361-bd2d-4162-b415-e9d5bc3f4ad1.mpeg +/Oral Histories/Ciaran_s1_M_20151222_eng/premiere project/Adobe Premiere Pro Preview Files/Untitled.PRV/Rendered - f1ef3e32-a1dc-42d0-a482-02fa6d67f559.mpeg +/Oral Histories/Ciaran_s1_M_20151222_eng/premiere project/Adobe Premiere Pro Preview Files/Untitled.PRV/Rendered - f1ef3e32-a1dc-42d0-a482-02fa6d67f559.xmp +/Oral Histories/Ciaran_s1_M_20151222_eng/Premiere Project/Untitled.prproj +/Oral Histories/Clara_s1_F_20130218_fra/Clara_s1_F_20130218_fra.jpg +/Oral Histories/Clara_s1_F_20130218_fra/Clara_s1_F_20130218_fra.mp4 +/Oral Histories/Clara_s1_F_20130218_fra/raws/thumbnail/RDX9MZi2Qf26vIbzN5TK_Clara_s1_F_20130218_fra.png +/Oral Histories/Conor_s1_M_20140302_spa/Conor_s1_M_20140302_spa.mp4 +/Oral Histories/Conor_s1_M_20140302_spa/raws/footage/clips/MVI_9976.MOV +/Oral Histories/Conor_s1_M_20140302_spa/raws/footage/clips/STE-016.wav +/Oral Histories/Conor_s1_M_20140302_spa/raws/thumbnail/CviLVMiASY6VILeFZG8G_connor.png +/Oral Histories/Daisy_s1_F_20160102_kin/Daisy_s1_F_20160102_kin.mp4 +/Oral Histories/Daisy_s1_F_20160102_kin/raws/footage/Daisy speaks Ikinyarwanda Audio Extracted Audio Extracted.pkf +/Oral Histories/Daisy_s1_F_20160102_kin/raws/footage/Daisy speaks Ikinyarwanda Audio Extracted.pkf +/Oral Histories/Daisy_s1_F_20160102_kin/raws/footage/Daisy speaks Ikinyarwanda Audio Extracted.wav +/Oral Histories/Daisy_s1_F_20160102_kin/raws/footage/Daisy speaks Ikinyarwanda.MOV +/Oral Histories/Daisy_s1_F_20160102_kin/raws/Premiere project/Adobe Premiere Pro Auto-Save/kin-daisy-2.prproj +/Oral Histories/Daisy_s1_F_20160102_kin/raws/premiere project/Adobe Premiere Pro Preview Files/kin-daisy.PRV/Rendered - 235eed06-1893-4108-bcba-df045ac00089.mpeg +/Oral Histories/Daisy_s1_F_20160102_kin/raws/premiere project/Adobe Premiere Pro Preview Files/kin-daisy.PRV/Rendered - 235eed06-1893-4108-bcba-df045ac00089.xmp +/Oral Histories/Daisy_s1_F_20160102_kin/raws/premiere project/Adobe Premiere Pro Preview Files/kin-daisy.PRV/Rendered - 3fe789b7-bbc5-46de-8117-228c12c6f05e.xmp +/Oral Histories/Daisy_s1_F_20160102_kin/raws/premiere project/Adobe Premiere Pro Preview Files/kin-daisy.PRV/Rendered - af763b93-9ecb-446f-975d-2eeb156e870f.mpeg +/Oral Histories/Daisy_s1_F_20160102_kin/raws/premiere project/Adobe Premiere Pro Preview Files/kin-daisy.PRV/Rendered - af763b93-9ecb-446f-975d-2eeb156e870f.xmp +/Oral Histories/Dale_s1_M_20160110_pdc/Dale_s1_M_20160110_pdc.jpg +/Oral Histories/Dale_s1_M_20160110_pdc/Dale_s1_M_20160110_pdc.mp4 +/Oral Histories/Dale_s1_M_20160110_pdc/raws/footage/MVI_0040.MOV +/Oral Histories/Dale_s1_M_20160110_pdc/raws/Premier Project/Adobe Premiere Pro Auto-Save/psd-dale-1.prproj +/Oral Histories/Dale_s1_M_20160110_pdc/raws/Premier Project/Adobe Premiere Pro Auto-Save/psd-dale-2.prproj +/Oral Histories/Dale_s1_M_20160110_pdc/raws/Premier Project/psd-dale.prproj +/Oral Histories/Dale_s1_M_20160110_pdc/readme.txt +/Oral Histories/Dang_s1_F_20140209_tha/Dang_s1_F_20140209_tha.mp4 +/Oral Histories/Dang_s1_F_20140209_tha/raws/footage/MONO-001.wav +/Oral Histories/Dang_s1_F_20140209_tha/raws/Premier Project/Adobe Premiere Pro Auto-Save/Untitled-1.prproj +/Oral Histories/Dang_s1_F_20140209_tha/raws/Premier Project/Adobe Premiere Pro Auto-Save/Untitled-2.prproj +/Oral Histories/Dang_s1_F_20140209_tha/raws/Premier Project/Adobe Premiere Pro Auto-Save/Untitled-3.prproj +/Oral Histories/Dang_s1_F_20140209_tha/raws/Premier Project/Untitled.prproj +/Oral Histories/Dang_s1_F_20140209_tha/raws/thumbnail/0O6XcDV3Sf2V7EwMpzY5_dang.png +/Oral Histories/Daniel_s1_M_20151103_roh/Daniel_s1_M_20151103_roh.mp4 +/Oral Histories/Daniel_s1_M_20151103_roh/raws/footage/clips/Daniel speaking Romansh Audio Extracted.wav +/Oral Histories/Daniel_s1_M_20151103_roh/raws/footage/clips/Daniel speaking Romansh.aiff +/Oral Histories/Daniel_s1_M_20151103_roh/raws/footage/clips/MVI_9955.MOV +/Oral Histories/Daniel_s1_M_20151103_roh/raws/Premier Project/daniel-roh.prproj +/Oral Histories/Daniel_s1_M_20151103_roh/raws/thumbnail/XMkbgbvQmy9SByyrAEwl_daniel-roh-thumb-raw.png +/Oral Histories/Danio_s1_M_20150820_rgn/Danio_s1_M_20150820_rgn.mp4 +/Oral Histories/Danio_s1_M_20150820_rgn/raws/Premier Project/Danio_s1_M_20150820_rgn.prproj +/Oral Histories/Darma_s1_M_20151217_min/Darma_s1_M_20151217_min.mp4 +/Oral Histories/Darma_s1_M_20151217_min/raws/footage/Minangkabau.mp4 +/Oral Histories/Darma_s1_M_20151217_min/raws/premier project/Adobe Premiere Pro Preview Files/darma-min.PRV/Rendered - 777cae36-a479-4207-a9e7-0232ba61ced7.mxf +/Oral Histories/Darma_s1_M_20151217_min/raws/premier project/Adobe Premiere Pro Preview Files/darma-min.PRV/Rendered - 777cae36-a479-4207-a9e7-0232ba61ced7.mxf.xmp +/Oral Histories/Darma_s1_M_20151217_min/raws/premier project/Adobe Premiere Pro Preview Files/darma-min.PRV/Rendered - c5441d6e-d1d6-438c-9e74-dbf5d7215302.mxf +/Oral Histories/Darma_s1_M_20151217_min/raws/Premier Project/darma-min.prproj +/Oral Histories/Darma_s1_M_20151217_min/raws/Premier Project/Minangkabau Audio Extracted Audio Extracted.pkf +/Oral Histories/Darma_s1_M_20151217_min/raws/Premier Project/Minangkabau Audio Extracted Audio Extracted.wav +/Oral Histories/Darma_s1_M_20151217_min/raws/Premier Project/Minangkabau Audio Extracted.wav +/Oral Histories/Darma_s1_M_20151217_min/raws/thumbnail/darma-min-thumb-raw.png +/Oral Histories/Darma_s1_M_20151217_min/readme.txt +/Oral Histories/Dragan_s1_M_20150904_srp/Dragan speaking Serbian.mp4 +/Oral Histories/Dragan_s1_M_20150904_srp/premiere project/Adobe Premiere Pro Preview Files/Dragan speaking Serbian.PRV/Rendered - a6bf4404-d0d7-457b-a299-27dcb23e5f70.mpeg +/Oral Histories/Dragan_s1_M_20151110_mkd/Dragan_s1_M_20151110_mkd.jpg +/Oral Histories/Dragan_s1_M_20151110_mkd/raws/footage/Dragan - Macedonian Audio Extracted.pkf +/Oral Histories/Dragan_s1_M_20151110_mkd/raws/footage/Dragan - Macedonian Audio Extracted.wav +/Oral Histories/Dragan_s1_M_20151110_mkd/raws/footage/Dragan - Macedonian.mp4 +/Oral Histories/Dragan_s1_M_20151110_mkd/raws/premier project/Adobe Premiere Pro Preview Files/dragan-mkd.PRV/Rendered - 7a349352-4bb7-4446-a308-846c07d4f67b.mxf.xmp +/Oral Histories/Dragan_s1_M_20151110_mkd/raws/Premier Project/dragan-mkd.prproj +/Oral Histories/Dragan_s1_M_20151110_mkd/raws/thumbnail/dragan-mkd-thumb-raw.jpg +/Oral Histories/Edith_s1_F_20140729_spa/Edith_s1_F_20140729_spa.jpg +/Oral Histories/Edith_s1_F_20140729_spa/Edith_s1_F_20140729_spa.mp4 +/Oral Histories/Edith_s1_F_20140729_spa/raws/footage/MVI_9928.MOV +/Oral Histories/Edith_s1_F_20140729_spa/raws/footage/STE-018 Audio Extracted.pkf +/Oral Histories/Edith_s1_F_20140729_spa/raws/footage/STE-018 Audio Extracted.wav +/Oral Histories/Edith_s1_F_20140729_spa/raws/Premier Project/Adobe Premiere Pro Auto-Save/Edith_s1_F_20140729_spa-1.prproj +/Oral Histories/Edith_s1_F_20140729_spa/raws/thumbnail/Screen Shot 2016-05-17 at 19.59.49.png +/Oral Histories/Elizabeth_s1_F_20150212_cor/elizabeth-cor.mp4 +/Oral Histories/Elizabeth_s1_F_20150212_cor/raws/footage/MVI_9457.MOV +/Oral Histories/Elizabeth_s1_F_20150212_cor/raws/Premier Project/Adobe Premiere Pro Auto-Save/elizabeth-cornish-1.prproj +/Oral Histories/Elizabeth_s1_F_20150212_cor/raws/premier project/Adobe Premiere Pro Preview Files/elizabeth-cornish.PRV/Rendered - 37c91192-3cc5-4dbe-a9fb-6dbe6e8d0f9a.mpeg +/Oral Histories/Elizabeth_s1_F_20150212_cor/raws/premier project/Adobe Premiere Pro Preview Files/elizabeth-cornish.PRV/Rendered - 37c91192-3cc5-4dbe-a9fb-6dbe6e8d0f9a.xmp +/Oral Histories/Elizabeth_s1_F_20150212_cor/raws/premier project/Adobe Premiere Pro Preview Files/elizabeth-cornish.PRV/Rendered - a5a2a199-b245-42c1-bde8-013d793fcb99.xmp +/Oral Histories/Elizabeth_s1_F_20150212_cor/raws/Premier Project/elizabeth-cornish.prproj +/Oral Histories/Eva_s1_F_20130203_nld/Eva_s1_F_20130203_nld.mp4 +/Oral Histories/Eva_s1_F_20130203_nld/raws/premier project/Adobe Premiere Pro Preview Files/dutch-eva.PRV/3d75ccef-77aa-4b92-b693-8e35cb73852c+fd89f19d7c4b12f74c77f60d 32000.cfa +/Oral Histories/Eva_s1_F_20130203_nld/raws/premier project/Adobe Premiere Pro Preview Files/dutch-eva.PRV/3d75ccef-77aa-4b92-b693-8e35cb73852c+fd89f19d7c4b12f74c77f60d 32000.pek +/Oral Histories/Eva_s1_F_20130203_nld/raws/Premier Project/dutch-eva.prproj +/Oral Histories/Evelyn_s1_F_20150630_deu/raws/footage/clips/MVI_9943.MOV +/Oral Histories/Fabia_s1_F_20150815_gsw/Fabia_s1_F_20150815_gsw.mp4 +/Oral Histories/Fabia_s1_F_20150815_gsw/raws/footage/fabia Swiss German (Zurich) Audio Extracted.pkf +/Oral Histories/Fabia_s1_F_20150815_gsw/raws/footage/fabia Swiss German (Zurich).aiff +/Oral Histories/Fabia_s1_F_20150815_gsw/raws/footage/MVI_9948.MOV +/Oral Histories/Fabia_s1_F_20150815_gsw/raws/footage/MVI_9949.MOV +/Oral Histories/Fabia_s1_F_20150815_gsw/raws/premier project/Adobe Premiere Pro Preview Files/Fabia_s1_F_20150815_gsw.PRV/daf661cf-82a9-4625-8bf6-0f2b6be3187b+c33408af-1937-d7b8-0cc3-471000000049 48000.cfa +/Oral Histories/Fabia_s1_F_20150815_gsw/raws/premier project/Adobe Premiere Pro Preview Files/Fabia_s1_F_20150815_gsw.PRV/daf661cf-82a9-4625-8bf6-0f2b6be3187b+c33408af-1937-d7b8-0cc3-471000000049 48000.pek +/Oral Histories/Fabia_s1_F_20150815_gsw/raws/Premier Project/Fabia_s1_F_20150815_gsw.prproj +/Oral Histories/Fabia_s1_F_20150815_gsw/raws/thumbnail/Screen Shot 2016-05-17 at 18.40.46.png +/Oral Histories/Fabia_s1_F_20150815_gsw/raws/thumbnail/Screen Shot 2016-05-17 at 18.41.13.png +/Oral Histories/Francesco_s1_M_20161102_srd/Francesco_s1_M_20161102_srd.jpg +/Oral Histories/Francesco_s1_M_20161102_srd/raws/thumbnail/Screen Shot 2016-11-29 at 19.24.19.png +/Oral Histories/Francesco_s1_M_20161102_srd/raws/thumbnail/Screen Shot 2016-11-29 at 19.24.20.png +/Oral Histories/Francesco_s1_M_20161102_srd/raws/thumbnail/Screen Shot 2016-11-29 at 19.24.21.png +/Oral Histories/Franco_s1_M_20151222_vec/Franco speaking Venetian.mp4 +/Oral Histories/Franco_s1_M_20151222_vec/Franco speaking Venetian.prproj +/Oral Histories/Franco_s1_M_20151222_vec/Raws/Footage/DSC_0007 Audio Extracted.pkf +/Oral Histories/Franco_s1_M_20151222_vec/Raws/Footage/DSC_0007.AVI +/Oral Histories/Franco_s1_M_20151222_vec/Raws/Thumbnail/Screen Shot 2016-04-13 at 10.50.01.png +/Oral Histories/Giuseppe_s2_M_20160823_scn+ell/Giuseppe s2 M 20160823 scn+ell.jpg +/Oral Histories/Giuseppe_s2_M_20160823_scn+ell/raws/footage/clips/20160823_095954 Audio Extracted.pkf +/Oral Histories/Giuseppe_s2_M_20160823_scn+ell/raws/footage/clips/20160823_095954 Audio Extracted.wav +/Oral Histories/Giuseppe_s2_M_20160823_scn+ell/raws/footage/clips/20160823_095954.mp4 +/Oral Histories/Giuseppe_s2_M_20160823_scn+ell/raws/thumbnails/Screen Shot 2016-10-12 at 14.10.45.png +/Oral Histories/Giuseppe_s2_M_20160823_scn+ell/raws/thumbnails/Screen Shot 2016-10-12 at 14.10.46.png +/Oral Histories/Giuseppe_s2_M_20160823_scn+ell/raws/thumbnails/Screen Shot 2016-10-12 at 14.10.48.png +/Oral Histories/Giuseppina_s1_F_20151208_aae/giuseppina-aae-thumb-raw.mp4 +/Oral Histories/Giuseppina_s1_F_20151208_aae/raws/footage/Giuseppina - Arbëresh.mp4 +/Oral Histories/Giuseppina_s1_F_20151208_aae/raws/Premier Project/Adobe Premiere Pro Auto-Save/giuseppina-aae-1.prproj +/Oral Histories/Giuseppina_s1_F_20151208_aae/raws/Premier Project/Giuseppina - Arbëresh Audio Extracted.wav +/Oral Histories/Giuseppina_s1_F_20151208_aae/raws/Premier Project/giuseppina-aae.prproj +/Oral Histories/Gjyste_s1_F_20150720_aln/Gjyste_s1_F_20150720_aln.mp4 +/Oral Histories/Gustavo_s1_M_20150804_por/raws/footage/20150325_233310.mp4 +/Oral Histories/Gustavo_s1_M_20150804_por/raws/Premier Project/gustavo.prproj +/Oral Histories/Hani_s1_M_20140414_swe/Hani_s1_M_20140414_swe.mp4 +/Oral Histories/Hans_s1_M_20160601_srn/Hans_s1_M_20160601_srn.mp4 +/Oral Histories/Hans_s1_M_20160601_srn/raws/footage/MVI_0289.mp4 +/Oral Histories/Hans_s1_M_20160601_srn/raws/Premier Project/Adobe Premiere Pro Auto-Save/Hans_s1_M_20160601_srn-1.prproj +/Oral Histories/Hans_s1_M_20160601_srn/raws/thumbnail/Screen Shot 2016-07-05 at 23.42.33.png +/Oral Histories/Hassan_s1_M_20150219_chr/Hassan_s1_M_20150219_chr.mp4 +/Oral Histories/Hassan_s1_M_20150219_chr/raws/footage/Cherokee 2_17_2015 (subtitles_subtitulos).mp4 +/Oral Histories/Hilario_s1_M_20161101_yua/Hilario_s1_M_20161101_yua.mp4 +/Oral Histories/Hilario_s1_M_20161101_yua/raws/footage/clips/HilarioVoiceCoachingForApocalypto Audio Extracted.pkf +/Oral Histories/Hilario_s1_M_20161101_yua/raws/footage/clips/HilarioVoiceCoachingForApocalypto Audio Extracted.wav +/Oral Histories/Hilario_s1_M_20161101_yua/raws/premier project/Adobe Premiere Pro Audio Previews/Hilario_s1_M_20161101_yua.PRV/b726eb14-8260-43e3-9c3a-cc1a34db4a4c+606a4efd-e140-db44-cf25-cc6a00000049 48000.cfa +/Oral Histories/Hilario_s1_M_20161101_yua/raws/premier project/adobe premiere pro audio previews/Hilario_s1_M_20161101_yua.PRV/Peak Files/b726eb14-8260-43e3-9c3a-cc1a34db4a4c+606a4efd-e140-db44-cf25-cc6a00000049 48000.pek +/Oral Histories/Hilario_s1_M_20161101_yua/raws/Premier Project/Adobe Premiere Pro Auto-Save/Hilario_s1_M_20161101_yua-1.prproj +/Oral Histories/Hilario_s1_M_20161101_yua/raws/thumbnail/Hilario_s1_M_20161101_yua.png +/Oral Histories/Horace_s1_M_20130704_frc/Horace_s1_M_20130704_frc.mp4 +/Oral Histories/Horace_s1_M_20130704_frc/raws/footage/MVI_0174.MOV +/Oral Histories/Hussein_s1_M_20160718_prs/Hussein_s1_M_20160718_prs.jpg +/Oral Histories/Hussein_s1_M_20160718_prs/Hussein_s1_M_20160718_prs.mp4 +/Oral Histories/Hussein_s1_M_20160718_prs/raws/footage/clips/Min film Audio Extracted.pkf +/Oral Histories/Hussein_s1_M_20160718_prs/raws/footage/clips/Min film.mp4 +/Oral Histories/Hussein_s1_M_20160718_prs/raws/Premier Project/Adobe Premiere Pro Auto-Save/Hussein_s1_M_20160718_prs-1.prproj +/Oral Histories/Hussein_s1_M_20160718_prs/raws/Premier Project/Hussein_s1_M_20160718_prs.prproj +/Oral Histories/Ibrahim_s6__20160229_fra,ara,tmh,dje,gux,ful/Ibrahim_s6__20160229_fra,ara,tmh,dje,gux,ful.jpg +/Oral Histories/Ibrahim_s6__20160229_fra,ara,tmh,dje,gux,ful/Ibrahim_s6__20160229_fra,ara,tmh,dje,gux,ful.mp4 +/Oral Histories/Ibrahim_s6__20160229_fra,ara,tmh,dje,gux,ful/Raws/Footage/ARABIC HASSANIYA.MOV +/Oral Histories/Ibrahim_s6__20160229_fra,ara,tmh,dje,gux,ful/Raws/Footage/FULFULDE.MOV +/Oral Histories/Ibrahim_s6__20160229_fra,ara,tmh,dje,gux,ful/Raws/Footage/Ibrahim_s6__20160229_fra,ara,tmh,dje,gux,ful Audio Extracted.pkf +/Oral Histories/Ibrahim_s6__20160229_fra,ara,tmh,dje,gux,ful/Raws/Footage/Ibrahim_s6__20160229_fra,ara,tmh,dje,gux,ful Audio Extracted.wav +/Oral Histories/Ibrahim_s6__20160229_fra,ara,tmh,dje,gux,ful/Raws/Footage/MVI_8985.MOV +/Oral Histories/Ibrahim_s6__20160229_fra,ara,tmh,dje,gux,ful/Raws/Footage/TAMAZIGHT.MOV +/Oral Histories/Ibrahim_s6__20160229_fra,ara,tmh,dje,gux,ful/Raws/Footage/ZARMA.MOV +/Oral Histories/Ibrahim_s6__20160229_fra,ara,tmh,dje,gux,ful/Raws/Premiere Project/Ibrahim_s6__20160229_fra,ara,tmh,dje,gux,ful.prproj +/Oral Histories/Ibrahim_s6__20160229_fra,ara,tmh,dje,gux,ful/Raws/Thumbnail/Ibrahim_s6__20160229_fra,ara,tmh,dje,gux,ful.png +/Oral Histories/Irena_s1_F_20150720_aln/Irena_s1_F_20150720_aln.mp4 +/Oral Histories/Irena_s1_F_20150720_aln/raws/footage/converted/Irena - Gheg Albanian_1 Audio Extracted.pkf +/Oral Histories/Irena_s1_F_20150720_aln/raws/footage/converted/Irena - Gheg Albanian_1 Audio Extracted.wav +/Oral Histories/Irena_s1_F_20150720_aln/raws/footage/converted/Irena - Gheg Albanian_1.mov +/Oral Histories/Irena_s1_F_20150720_aln/raws/Premier Project/Irena_s1_F_20150720_aln.prproj +/Oral Histories/Isabel_s1_F_20140729_spa/raws/footage/MVI_0030.MOV +/Oral Histories/Isabel_s1_F_20140729_spa/raws/footage/STE-021.wav +/Oral Histories/Issaka_s1_M_20160628_kdh/Issaka_s1_M_20160628_kdh.mp4 +/Oral Histories/Issaka_s1_M_20160628_kdh/raws/footage/Issaka Audio Extracted.pkf +/Oral Histories/Issaka_s1_M_20160628_kdh/raws/footage/Issaka Audio Extracted.wav +/Oral Histories/Issaka_s1_M_20160628_kdh/raws/Premier Project/Issaka_s1_M_20160628_kdh.prproj +/Oral Histories/Issaka_s1_M_20160628_kdh/raws/thumbnail/Screen Shot 2016-11-17 at 15.29.36.png +/Oral Histories/Jack_s1_M_20161128_lad/Jack_s1_M_20161128_lad.jpg +/Oral Histories/Jack_s1_M_20161128_lad/raws/footage/clips/Ladino - Jack Benmayor Audio Extracted.pkf +/Oral Histories/Jack_s1_M_20161128_lad/raws/footage/clips/Ladino - Jack Benmayor Audio Extracted.wav +/Oral Histories/Jack_s1_M_20161128_lad/raws/footage/clips/Ladino - Jack Benmayor.mp4 +/Oral Histories/Jack_s1_M_20161128_lad/raws/thumbnail/Screen Shot 2016-12-19 at 09.17.39.png +/Oral Histories/Jaswant_s1_M_20160514_bfr/Jaswant_s1_M_20160514_bfr Audio Extracted.wav +/Oral Histories/Jaswant_s1_M_20160514_bfr/Jaswant_s1_M_20160514_bfr.jpg +/Oral Histories/Jaswant_s1_M_20160514_bfr/Jaswant_s1_M_20160514_bfr.pdf +/Oral Histories/Jaswant_s1_M_20160514_bfr/raws/footage/IMG_5559.MOV +/Oral Histories/Jaswant_s1_M_20160514_bfr/raws/Premier Project/Adobe Premiere Pro Auto-Save/Jaswant_s1_M_20160514_bfr-1.prproj +/Oral Histories/Jaswant_s1_M_20160514_bfr/raws/thumbnail/Screen Shot 2016-06-14 at 22.05.01.png +/Oral Histories/Javier_s2_M_20130303_nhn+spa/nahuatl-javier.mp4 +/Oral Histories/Javier_s2_M_20130303_nhn+spa/raws/footage/MVI_9593.MOV +/Oral Histories/Javier_s2_M_20130303_nhn+spa/raws/Premier Project/nahuatl-javier.prproj +/Oral Histories/Javier_s2_M_20130303_nhn+spa/raws/thumbnail/instagram-javier.jpg +/Oral Histories/Jean-Luc_s1_M_20160608_bre/Jean-Luc_s1_M_20160608_bre.jpg +/Oral Histories/Jean-Luc_s1_M_20160608_bre/raws/footage/J.-L. Bleunven.mp4 Audio Extracted.pkf +/Oral Histories/Jean-Luc_s1_M_20160608_bre/raws/footage/J.-L. Bleunven.mp4 Audio Extracted.wav +/Oral Histories/Jean-Luc_s1_M_20160608_bre/raws/footage/J.-L. Bleunven.mp4.mp4 +/Oral Histories/Jean-Luc_s1_M_20160608_bre/raws/Premier Project/Adobe Premiere Pro Auto-Save/Jean-Luc_s1_M_20160608_bre-1.prproj +/Oral Histories/Jean-Luc_s1_M_20160608_bre/raws/Premier Project/Jean-Luc_s1_M_20160608_bre.prproj +/Oral Histories/Jean-Luc_s1_M_20160608_bre/raws/thumbnail/Screen Shot 2016-07-01 at 14.34.02.png +/Oral Histories/Jenni_s1_F_20130303_fin/Jenni_s1_F_20130303_fin.mp4 +/Oral Histories/Jenni_s1_F_20130303_fin/raws/footage/MVI_9536.MOV +/Oral Histories/Jenni_s1_F_20130303_fin/raws/footage/STE-028.wav +/Oral Histories/Jenni_s1_F_20130303_fin/raws/Premier Project/Adobe Premiere Pro Auto-Save/finnish-jenni-1.prproj +/Oral Histories/Jenni_s1_F_20130303_fin/raws/premier project/Adobe Premiere Pro Preview Files/finnish-jenni.PRV/bcc829ec-1862-459a-81ed-6b0d73302529+79913ab9c6a3270cb5c352e3 32000.cfa +/Oral Histories/Jenni_s1_F_20130303_fin/raws/premier project/Adobe Premiere Pro Preview Files/finnish-jenni.PRV/bcc829ec-1862-459a-81ed-6b0d73302529+79913ab9c6a3270cb5c352e3 32000.pek +/Oral Histories/Jenni_s1_F_20130303_fin/readme.txt +/Oral Histories/Jennifer_s1_F_20151224_eng/Jennifer_s1_F_20151224_eng.jpg +/Oral Histories/Jennifer_s1_F_20151224_eng/Jennifer_s1_F_20151224_eng.mp4 +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/footage/Audio/STE-025.wav +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/footage/Clips/MVI_9436.MOV +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/footage/Clips/MVI_9440.MOV +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/footage/Converted/MVI_9440 Audio Extracted.pkf +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/footage/Converted/MVI_9440 Audio Extracted.wav +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/footage/Converted/MVI_9440.mov +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/Premier Project/Adobe Premiere Pro Auto-Save/Jennifer_s1_F_20151224_eng-2.prproj +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/Premier Project/Adobe Premiere Pro Auto-Save/Jennifer_s1_F_20151224_eng-3.prproj +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/Premier Project/Adobe Premiere Pro Auto-Save/Jennifer_s1_F_20151224_eng-4.prproj +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/donate-trailer.PRV/12ebcb16-e94c-4eaf-8b64-2d3a2785409f+5b4bf5d2-02c9-9465-009c-0b0c00000049 48000.pek +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/donate-trailer.PRV/19e82fc5-b538-4528-a4ee-2a5718e6be9a+9607a4c5-3a7c-9bd7-7503-466f00000049 48000.cfa +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/donate-trailer.PRV/19e82fc5-b538-4528-a4ee-2a5718e6be9a+9607a4c5-3a7c-9bd7-7503-466f00000049 48000.pek +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/donate-trailer.PRV/19e82fc5-b538-4528-a4ee-2a5718e6be9a+d35ba52b-f0e6-696c-8b33-425a00000049 48000.pek +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/donate-trailer.PRV/19e82fc5-b538-4528-a4ee-2a5718e6be9a+edbb399d-e6ae-0eaf-a1e7-1e4200000049 48000.cfa +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/donate-trailer.PRV/19e82fc5-b538-4528-a4ee-2a5718e6be9a+edbb399d-e6ae-0eaf-a1e7-1e4200000049 48000.pek +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/donate-trailer.PRV/203c0311-2a23-47a1-b10a-377f09946e5a+80e23aad-e53e-c345-31ba-214200000049 48000.pek +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/donate-trailer.PRV/3057c11a-3be0-44de-9f5d-e61ca3e41bc0+f4a0d523-953c-6528-1898-107a00000049 48000.cfa +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/donate-trailer.PRV/3057c11a-3be0-44de-9f5d-e61ca3e41bc0+f4a0d523-953c-6528-1898-107a00000049 48000.pek +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/donate-trailer.PRV/55931c66-c964-49ff-87b7-722e085c893a+cabb2ece-5d9e-72b0-54e9-629600000049 48000.pek +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/donate-trailer.PRV/5d83d01d-b6ec-440d-8edc-4b179ccd4927+10055e71-35de-d25f-660a-59e600000049 48000.cfa +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/donate-trailer.PRV/5d83d01d-b6ec-440d-8edc-4b179ccd4927+10055e71-35de-d25f-660a-59e600000049 48000.pek +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/donate-trailer.PRV/634cd87b-298e-43d3-9d3e-2a76f7ba195c+46c6e669-aae7-ebdb-2e35-33c900000049 48000.pek +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/donate-trailer.PRV/777e152c-92bc-41e8-8f51-891d36ab3ca9+19fb2f0f-435b-c890-f8e7-634900000069 48000.cfa +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/donate-trailer.PRV/777e152c-92bc-41e8-8f51-891d36ab3ca9+19fb2f0f-435b-c890-f8e7-634900000069 48000.pek +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/donate-trailer.PRV/777e152c-92bc-41e8-8f51-891d36ab3ca9+3b648f5f-3261-0a42-e82d-939a00000069 48000.pek +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/donate-trailer.PRV/777e152c-92bc-41e8-8f51-891d36ab3ca9+d657a371-b1b0-fd75-2be2-68aa00000069 48000.cfa +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/donate-trailer.PRV/777e152c-92bc-41e8-8f51-891d36ab3ca9+d657a371-b1b0-fd75-2be2-68aa00000069 48000.pek +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/donate-trailer.PRV/777e152c-92bc-41e8-8f51-891d36ab3ca9+e7561aae-38d3-8282-75c3-7ca300000069 48000.pek +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/donate-trailer.PRV/9ffef701-f72d-47c0-926c-b9ed6dcd4e54+a6dc77d4-3e63-22b7-ae18-55e800000069 48000.cfa +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/donate-trailer.PRV/9ffef701-f72d-47c0-926c-b9ed6dcd4e54+a6dc77d4-3e63-22b7-ae18-55e800000069 48000.pek +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/donate-trailer.PRV/9ffef701-f72d-47c0-926c-b9ed6dcd4e54+d8b511da-b408-0cf7-e51c-e91a00000069 48000.pek +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/donate-trailer.PRV/9ffef701-f72d-47c0-926c-b9ed6dcd4e54+f0bd547b-952b-6c06-b87d-7d5800000069 48000.cfa +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/donate-trailer.PRV/9ffef701-f72d-47c0-926c-b9ed6dcd4e54+f0bd547b-952b-6c06-b87d-7d5800000069 48000.pek +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/donate-trailer.PRV/a06800f7-20f6-4eef-ab07-aafb6d1beb19+3d9b2e43-283d-2cbd-bac3-66d300000049 48000.pek +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/donate-trailer.PRV/a2037264-b1c8-45a9-bd7f-45a5bfce742c+38274df5-876b-1694-41b9-0ece00000069 48000.cfa +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/donate-trailer.PRV/a2037264-b1c8-45a9-bd7f-45a5bfce742c+38274df5-876b-1694-41b9-0ece00000069 48000.pek +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/donate-trailer.PRV/b1e2b937-53d6-42e6-9e56-0dba273ead39+bcfb709d-705b-3e51-3bd2-228f00000049 48000.pek +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/donate-trailer.PRV/b3a9d5c6-4a56-421b-b9d0-4a1de1c274bf+890b7d0d-9c21-cf11-c861-bc0900000049 48000.cfa +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/donate-trailer.PRV/b3a9d5c6-4a56-421b-b9d0-4a1de1c274bf+890b7d0d-9c21-cf11-c861-bc0900000049 48000.pek +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/donate-trailer.PRV/b3a9d5c6-4a56-421b-b9d0-4a1de1c274bf+b058beac-feee-3e05-a6be-09d000000049 48000.pek +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/donate-trailer.PRV/c3a626d4-8064-4b60-8a9b-30e23486ad16+621094c5-3188-5380-b93e-85e900000069 48000.cfa +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/donate-trailer.PRV/c3a626d4-8064-4b60-8a9b-30e23486ad16+621094c5-3188-5380-b93e-85e900000069 48000.pek +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/donate-trailer.PRV/dad8569d-c9c6-4caf-94ef-ee76a904f8fe+1f5888d1-b49c-8bc3-58d3-a35800000049 48000.pek +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/donate-trailer.PRV/dad8569d-c9c6-4caf-94ef-ee76a904f8fe+69ff74c9-e6bd-27af-60ec-6d0d00000049 48000.cfa +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/donate-trailer.PRV/dad8569d-c9c6-4caf-94ef-ee76a904f8fe+69ff74c9-e6bd-27af-60ec-6d0d00000049 48000.pek +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/donate-trailer.PRV/e35ed54c-6749-444c-93d1-a95bfe002df1+99724640-4667-b447-a62e-d89300000069 48000.pek +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/donate-trailer.PRV/e35ed54c-6749-444c-93d1-a95bfe002df1+fa0d8436-06fc-7dff-fddb-6b7900000059 48000.cfa +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/donate-trailer.PRV/e35ed54c-6749-444c-93d1-a95bfe002df1+fa0d8436-06fc-7dff-fddb-6b7900000059 48000.pek +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/donate-trailer.PRV/e5113614-4ba4-44b0-9ba7-1fa425f4b8f5+ec98980c-3408-2bfa-d7fe-eeda00000049 48000.pek +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/donate-trailer.PRV/e5113614-4ba4-44b0-9ba7-1fa425f4b8f5+f3716ed6-ab29-753c-f60e-b33d00000049 48000.cfa +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/donate-trailer.PRV/e5113614-4ba4-44b0-9ba7-1fa425f4b8f5+f3716ed6-ab29-753c-f60e-b33d00000049 48000.pek +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/donate-trailer.PRV/e687deb1-a73b-461f-bf15-ece23ce2e5d5+7ec47e8a-2ae4-9eb8-43d1-726700000069 48000.pek +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/donate-trailer.PRV/e687deb1-a73b-461f-bf15-ece23ce2e5d5+e84f8c5c-ed57-866f-c241-617600000069 48000.cfa +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/donate-trailer.PRV/e687deb1-a73b-461f-bf15-ece23ce2e5d5+e84f8c5c-ed57-866f-c241-617600000069 48000.pek +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/donate-trailer.PRV/Rendered - 01745279-3e81-4c1b-86aa-76fc12ac5d96.xmp +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/donate-trailer.PRV/Rendered - 0267fec6-25fc-4cc8-bee1-c5624f657fe3.xmp +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/donate-trailer.PRV/Rendered - 0269bb8b-050e-49f0-91be-bf95680fb25c.mpeg +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/donate-trailer.PRV/Rendered - 02ae502a-dc9d-477d-8de3-ff1162840c0f.mpeg +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/donate-trailer.PRV/Rendered - 02ae502a-dc9d-477d-8de3-ff1162840c0f.xmp +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/donate-trailer.PRV/Rendered - 04260ad2-dabc-4b6b-9aa1-f165010a6c0f.mpeg +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/donate-trailer.PRV/Rendered - 0577313b-ddb6-4539-bb8d-5a5bff441978.xmp +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/donate-trailer.PRV/Rendered - 05caa9fb-d272-44fa-aa84-b741c4ba2d1d.xmp +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/donate-trailer.PRV/Rendered - 06269c77-dfda-4233-b103-99fe1d2da95b.xmp +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/donate-trailer.PRV/Rendered - 06360859-b409-448e-932f-ab2926979988.xmp +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/donate-trailer.PRV/Rendered - 06db6875-5f74-41cc-a4c4-f3c3b8c854ff.xmp +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/donate-trailer.PRV/Rendered - 06e4236b-f674-410e-9695-b7bac0f2f78b.mpeg +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/donate-trailer.PRV/Rendered - 06f4aa15-b778-481e-bcf6-ac8a8464fa3c.xmp +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/donate-trailer.PRV/Rendered - 0864f57d-73da-423f-87ab-4dbe11cef169.xmp +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/donate-trailer.PRV/Rendered - 08dd17ff-2c24-4a2d-9aef-2abee608d7d6.mpeg +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/donate-trailer.PRV/Rendered - 090f7804-6295-4f80-b1ee-7c8352768459.mpeg +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/donate-trailer.PRV/Rendered - 090f7804-6295-4f80-b1ee-7c8352768459.xmp +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/donate-trailer.PRV/Rendered - 092321ae-22af-40a3-a2a1-8e0aaef332f9.mpeg +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/donate-trailer.PRV/Rendered - 0ab29010-8bb0-42e0-b80c-19742040617e.xmp +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/donate-trailer.PRV/Rendered - 0adcc37f-7df6-40f7-812c-4e080bc68ee7.xmp +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/donate-trailer.PRV/Rendered - 0b121f21-202b-4b1d-b7f8-79e42cdf15a2.xmp +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/donate-trailer.PRV/Rendered - 0d7e8804-ae76-46a1-863b-eaa39527b2dd.xmp +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/donate-trailer.PRV/Rendered - 0e28ec84-4395-40cc-8b3e-686c8f9d24a4.mpeg +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/donate-trailer.PRV/Rendered - 0e28ec84-4395-40cc-8b3e-686c8f9d24a4.xmp +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/donate-trailer.PRV/Rendered - 0e54dd13-b950-46b9-9246-34bc64081ff5.xmp +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/donate-trailer.PRV/Rendered - 0f2d7a08-b9fe-4aee-8f3e-f50bb750426c.xmp +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/donate-trailer.PRV/Rendered - 1021ecb9-3152-40d4-be61-3278a2462714.xmp +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/donate-trailer.PRV/Rendered - 106ae5c6-993e-4627-8f5f-0aa74d3fc36f.mpeg +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/donate-trailer.PRV/Rendered - 106ae5c6-993e-4627-8f5f-0aa74d3fc36f.xmp +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/donate-trailer.PRV/Rendered - 11cc391e-907f-4156-9f34-82e0faaff7aa.xmp +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/donate-trailer.PRV/Rendered - 11e61af0-f3a1-4a43-8958-956688483f80.xmp +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/donate-trailer.PRV/Rendered - 1352bdf7-3088-4be1-8d08-53fa77b9771b.xmp +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/donate-trailer.PRV/Rendered - 153526e2-a683-4647-9995-e0976fa9b267.xmp +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/donate-trailer.PRV/Rendered - 17242b6a-af5f-45e6-bd50-01dadb9afb96.xmp +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/donate-trailer.PRV/Rendered - 17681759-a807-46a6-b5b5-cc9636bde306.mpeg +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/donate-trailer.PRV/Rendered - 17681759-a807-46a6-b5b5-cc9636bde306.xmp +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/donate-trailer.PRV/Rendered - 176b8522-2fe8-472c-ae9d-f7a14e4d7800.xmp +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/donate-trailer.PRV/Rendered - 17a54e91-3312-4f8e-9fa8-7e50125a4557.xmp +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/donate-trailer.PRV/Rendered - 18107689-5368-4980-b5de-ba7b3d03f413.xmp +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/donate-trailer.PRV/Rendered - 19ace282-23cf-4c1a-a909-cc15fd82dc17.xmp +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/donate-trailer.PRV/Rendered - 19eb2ac8-1f01-4039-bca3-b016b84b761d.xmp +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/donate-trailer.PRV/Rendered - 1c9ea7ef-fa73-49d5-93fc-3a4a82e2a083.xmp +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/donate-trailer.PRV/Rendered - 1e636619-ad9d-4af1-bc85-5c0b437a0f1b.xmp +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/donate-trailer.PRV/Rendered - 1e80deb0-afd5-4b40-8d42-36770fd0914d.xmp +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/donate-trailer.PRV/Rendered - 1f556569-a8b0-444e-9149-065c22cb9ac9.xmp +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/donate-trailer.PRV/Rendered - 214d55b3-156b-4479-a976-10e0c2182e02.xmp +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/donate-trailer.PRV/Rendered - 214f3c94-a557-4446-adf8-e368db349832.xmp +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/donate-trailer.PRV/Rendered - 216e0a29-f155-46c7-9936-7d90307a478e.xmp +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/donate-trailer.PRV/Rendered - 2170faba-15dd-4dce-a2d6-c32027d58e49.xmp +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/donate-trailer.PRV/Rendered - 21f10152-c07f-4d4a-a919-9296b972d6e4.mpeg +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/donate-trailer.PRV/Rendered - 21f10152-c07f-4d4a-a919-9296b972d6e4.xmp +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/donate-trailer.PRV/Rendered - 23d447a5-3212-42be-b4e7-ffa40b22066e.mpeg +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/donate-trailer.PRV/Rendered - 23d447a5-3212-42be-b4e7-ffa40b22066e.xmp +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/donate-trailer.PRV/Rendered - 24abd3be-6cea-4d52-b6e2-a78b75b04f42.xmp +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/donate-trailer.PRV/Rendered - 25ebd4f1-4f33-4ed5-9c9b-de2ee1f52d00.xmp +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/donate-trailer.PRV/Rendered - 26f4a622-d762-413c-87df-0287abf0ca17.xmp +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/donate-trailer.PRV/Rendered - 2753dc19-0b22-42b3-b8dd-e2fb9d78e844.mpeg +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/donate-trailer.PRV/Rendered - 2824b1c7-7eac-4a49-8176-8334f677e3f2.mpeg +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/donate-trailer.PRV/Rendered - 2824b1c7-7eac-4a49-8176-8334f677e3f2.xmp +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/donate-trailer.PRV/Rendered - 2a66803a-a352-4c8d-879f-ea46b9f6486b.mpeg +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/donate-trailer.PRV/Rendered - 2ad3ea00-5ddd-4409-9613-ddbab706d2c6.mpeg +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/donate-trailer.PRV/Rendered - 2ad3ea00-5ddd-4409-9613-ddbab706d2c6.xmp +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/donate-trailer.PRV/Rendered - 2aef9f16-6888-4a29-86ad-5e411032eb9f.xmp +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/donate-trailer.PRV/Rendered - 2b1378e1-16ca-4e15-826e-1811239bfebf.xmp +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/donate-trailer.PRV/Rendered - 2b196396-143a-4e8c-a18f-2a89dab2332c.xmp +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/donate-trailer.PRV/Rendered - 2b8ba81b-e874-485a-b078-f6ce78402120.xmp +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/donate-trailer.PRV/Rendered - 2ef290e8-2212-4935-997f-076d1a808355.xmp +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/donate-trailer.PRV/Rendered - 2f9dc7ce-4814-42a3-8e79-138a329c7bc8.mpeg +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/donate-trailer.PRV/Rendered - 2f9dc7ce-4814-42a3-8e79-138a329c7bc8.xmp +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/donate-trailer.PRV/Rendered - 30498bda-f8fa-4a8e-a524-3748bc372e88.mpeg +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/donate-trailer.PRV/Rendered - 30498bda-f8fa-4a8e-a524-3748bc372e88.xmp +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/donate-trailer.PRV/Rendered - 328c646a-57a5-41b6-8faa-140d27acc1fb.xmp +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/donate-trailer.PRV/Rendered - 32b14169-4d32-46f9-bd67-f6dd8796637c.xmp +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/donate-trailer.PRV/Rendered - 32d6df71-4e4c-45cc-96f9-74e92f576d35.xmp +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/donate-trailer.PRV/Rendered - 3352633a-3716-4b15-b366-2d9008b1e516.xmp +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/donate-trailer.PRV/Rendered - 336fc212-3434-4841-976b-3b88c2d960b6.xmp +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/donate-trailer.PRV/Rendered - 33abe7a3-9619-4d4f-87b2-95f8c2352e65.xmp +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/donate-trailer.PRV/Rendered - 3502d347-cb0d-40ef-bba6-98aa47ad0417.xmp +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/donate-trailer.PRV/Rendered - 37fb4ec7-8598-458c-b8e4-9e8589afcafe.xmp +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/donate-trailer.PRV/Rendered - 3b3a6aa5-e278-4ef2-8853-da8dcef27a92.xmp +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/donate-trailer.PRV/Rendered - 3bed999e-3173-44dc-84ce-d773ce749cf8.xmp +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/donate-trailer.PRV/Rendered - 3d3d353c-0b92-46c6-9a6d-f83a4ec20801.xmp +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/donate-trailer.PRV/Rendered - 3d865a38-8dba-402f-81f4-feeb28a9009c.xmp +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/donate-trailer.PRV/Rendered - 3dc492f4-e7d9-4410-bdc5-ed4d034e06f6.xmp +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/donate-trailer.PRV/Rendered - 3e6ab924-c048-4bde-9d00-f27a38b744b6.xmp +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/donate-trailer.PRV/Rendered - 3ed96af5-7393-40ce-873c-77903f5f640d.xmp +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/donate-trailer.PRV/Rendered - 3f132d8b-2f62-4897-8f9e-25d4ba0eb903.xmp +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/donate-trailer.PRV/Rendered - 3f9b6910-3669-4037-91c6-21681adc6cbc.xmp +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/donate-trailer.PRV/Rendered - 3fb016e4-c446-41ab-aa20-df33506fe6a3.xmp +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/donate-trailer.PRV/Rendered - 406cf44d-e3c4-421d-9733-204f45209f14.mpeg +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/donate-trailer.PRV/Rendered - 409c1004-e544-4a50-8758-6886988e30a9.xmp +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/donate-trailer.PRV/Rendered - 41583bed-0cef-42db-b00b-73cde91dc6c3.xmp +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/donate-trailer.PRV/Rendered - 42380e84-1bb6-4745-95e5-8c993c8ca47d.mpeg +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/donate-trailer.PRV/Rendered - 4540dbd1-9164-4792-86da-82c84df81eb5.xmp +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/donate-trailer.PRV/Rendered - 45b69da6-c2d4-451a-a35b-f2c5ee1880b3.xmp +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/donate-trailer.PRV/Rendered - 45ccd08e-05f8-49cb-ba78-a356b3a2f6e0.xmp +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/donate-trailer.PRV/Rendered - 462e49b0-2ed9-4a75-9093-5aec3241bebd.mpeg +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/donate-trailer.PRV/Rendered - 462e49b0-2ed9-4a75-9093-5aec3241bebd.xmp +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/donate-trailer.PRV/Rendered - 464a12df-527f-45be-8cb5-d0cce57279ef.xmp +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/donate-trailer.PRV/Rendered - 4797ac6e-8e06-4618-be7c-2b1bdf2909d9.xmp +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/donate-trailer.PRV/Rendered - 47e8ed26-a84c-4bac-bbce-11e53065f7ba.xmp +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/donate-trailer.PRV/Rendered - 4942a164-1d58-459a-9031-c11bb7a5bf0b.mpeg +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/donate-trailer.PRV/Rendered - 496bb164-f47b-490f-a891-66a726150cb4.mpeg +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/donate-trailer.PRV/Rendered - 496bb164-f47b-490f-a891-66a726150cb4.xmp +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/donate-trailer.PRV/Rendered - 4a8d4ec1-a3ea-44a4-a203-8a663b9c9245.mpeg +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/donate-trailer.PRV/Rendered - 4a9e64d0-8f84-420e-aa9c-2ea20e4e6809.mpeg +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/donate-trailer.PRV/Rendered - 4a9e64d0-8f84-420e-aa9c-2ea20e4e6809.xmp +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/donate-trailer.PRV/Rendered - 4b0e5b72-f723-4a6f-bc9d-b8aa0341eddf.mpeg +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/donate-trailer.PRV/Rendered - 4b3c94f5-05fe-4bbd-9b07-f988d47fd3a9.xmp +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/donate-trailer.PRV/Rendered - 4b7c30e6-335e-4bf4-8f0b-b835c3786e2d.mpeg +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/donate-trailer.PRV/Rendered - 4b7c30e6-335e-4bf4-8f0b-b835c3786e2d.xmp +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/donate-trailer.PRV/Rendered - 4d27ded8-10d8-4e05-8ee7-7dca2151e1fc.xmp +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/donate-trailer.PRV/Rendered - 4e4659b1-d9cf-4ad6-8c44-3c4e18a43015.xmp +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/donate-trailer.PRV/Rendered - 50da9710-7fb8-4fc9-a430-c3c23f02d1b6.xmp +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/donate-trailer.PRV/Rendered - 519fd298-0877-458d-b9d5-3efaa59c3aa8.mpeg +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/donate-trailer.PRV/Rendered - 519fd298-0877-458d-b9d5-3efaa59c3aa8.xmp +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/donate-trailer.PRV/Rendered - 5248fec1-6bde-4c42-b226-eb89e97a47dd.xmp +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/donate-trailer.PRV/Rendered - 54643cee-e979-4226-acc1-bc46b4dfd7d7.mpeg +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/donate-trailer.PRV/Rendered - 54643cee-e979-4226-acc1-bc46b4dfd7d7.xmp +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/donate-trailer.PRV/Rendered - 55dc80d5-e2ed-4ad2-8ae8-501c0a4cd8b4.mpeg +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/donate-trailer.PRV/Rendered - 562418ff-1a9b-4fdd-9266-e6a2b250ae31.mpeg +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/donate-trailer.PRV/Rendered - 562418ff-1a9b-4fdd-9266-e6a2b250ae31.xmp +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/donate-trailer.PRV/Rendered - 562880e6-e443-4238-86f5-b715532008c9.xmp +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/donate-trailer.PRV/Rendered - 56b757a5-a950-43ef-b991-de122f078440.xmp +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/donate-trailer.PRV/Rendered - 56db141f-1454-41a6-b5fd-f88a549c512d.mpeg +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/donate-trailer.PRV/Rendered - 56db141f-1454-41a6-b5fd-f88a549c512d.xmp +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/donate-trailer.PRV/Rendered - 599d171c-c443-4d21-a3cd-89bb471c83c4.xmp +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/donate-trailer.PRV/Rendered - 5a7c3ab2-a6ee-446f-a242-990f586e6796.xmp +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/donate-trailer.PRV/Rendered - 5c0d4cf6-a3ab-4619-b77b-b0ac885201f2.mpeg +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/donate-trailer.PRV/Rendered - 5c4ca75e-704b-4eac-b63a-4323d27350da.mpeg +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/donate-trailer.PRV/Rendered - 5c4ca75e-704b-4eac-b63a-4323d27350da.xmp +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/donate-trailer.PRV/Rendered - 5cb7cdd9-d371-4e1d-a817-a3dd04774e0b.mpeg +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/donate-trailer.PRV/Rendered - 5e250fd4-059a-40d8-8794-33a10fe1618c.xmp +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/donate-trailer.PRV/Rendered - 5ebc2309-ba44-49c0-9b98-3beb58ba3e90.mpeg +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/donate-trailer.PRV/Rendered - 5ebc2309-ba44-49c0-9b98-3beb58ba3e90.xmp +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/donate-trailer.PRV/Rendered - 607142fe-f1f6-4273-8dbd-2120a1c3a13f.mpeg +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/donate-trailer.PRV/Rendered - 607142fe-f1f6-4273-8dbd-2120a1c3a13f.xmp +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/donate-trailer.PRV/Rendered - 617d905a-30a7-4310-8448-fb24d269a260.xmp +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/donate-trailer.PRV/Rendered - 62ac13ea-2149-4579-9f3b-4ef6462803ca.xmp +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/donate-trailer.PRV/Rendered - 64114a8d-d5e7-4376-991b-948d93551d29.mpeg +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/donate-trailer.PRV/Rendered - 64114a8d-d5e7-4376-991b-948d93551d29.xmp +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/donate-trailer.PRV/Rendered - 661063da-c741-4e7f-8e01-7bac221470e5.xmp +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/donate-trailer.PRV/Rendered - 6615931d-c468-46b4-b73f-9a05e2dd2db1.xmp +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/donate-trailer.PRV/Rendered - 66a21152-f0ba-42f6-9704-d30c3d4e7379.mpeg +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/donate-trailer.PRV/Rendered - 6847805c-38cd-4d41-97a4-543d1e34a0d5.xmp +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/donate-trailer.PRV/Rendered - 699f4cf3-b5ca-4e36-86f0-4714d7dc9bf4.xmp +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/donate-trailer.PRV/Rendered - 69df6740-e071-4daa-be00-ed6fe8e2adb7.xmp +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/donate-trailer.PRV/Rendered - 6b2d364d-9ec8-4dec-99da-157148a74e08.mpeg +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/donate-trailer.PRV/Rendered - 6b2d364d-9ec8-4dec-99da-157148a74e08.xmp +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/donate-trailer.PRV/Rendered - 6b8a8394-5bce-429b-8f76-01ce843117ca.xmp +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/donate-trailer.PRV/Rendered - 6e84133f-9cba-4808-8260-9fec5801ad31.xmp +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/donate-trailer.PRV/Rendered - 6f8bd39b-3f41-4ec6-967d-7aa6e671ca2e.mpeg +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/donate-trailer.PRV/Rendered - 6f8bd39b-3f41-4ec6-967d-7aa6e671ca2e.xmp +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/donate-trailer.PRV/Rendered - 7257778f-5408-4425-a950-f9aa5523c8a4.xmp +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/donate-trailer.PRV/Rendered - 72d86c5f-73da-4ac6-a685-545a8c59a94b.mpeg +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/donate-trailer.PRV/Rendered - 72d86c5f-73da-4ac6-a685-545a8c59a94b.xmp +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/donate-trailer.PRV/Rendered - 73666cbe-0765-4f1b-a061-f91e3a3d5820.xmp +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/donate-trailer.PRV/Rendered - 73e4cd2d-4de1-4295-ab39-4a49ac062a72.xmp +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/donate-trailer.PRV/Rendered - 74c41119-1c3a-4871-85cb-789c7a8dc5cd.xmp +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/donate-trailer.PRV/Rendered - 7836f926-4256-4a32-a75a-fc7ddb263f09.mpeg +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/donate-trailer.PRV/Rendered - 7836f926-4256-4a32-a75a-fc7ddb263f09.xmp +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/donate-trailer.PRV/Rendered - 78e18ff2-977f-4618-8c9d-fd884a89f93e.xmp +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/donate-trailer.PRV/Rendered - 7b05f164-f556-4f14-9728-88e82c72b4b0.mpeg +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/donate-trailer.PRV/Rendered - 7b05f164-f556-4f14-9728-88e82c72b4b0.xmp +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/donate-trailer.PRV/Rendered - 7ce6290a-7867-4ce3-b6f7-f46b165df323.mpeg +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/donate-trailer.PRV/Rendered - 7d1d8c0b-b8ad-4ffe-8205-45461c67ec97.xmp +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/donate-trailer.PRV/Rendered - 7e452c4e-96a3-429d-9d57-6aebc9f655f1.xmp +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/donate-trailer.PRV/Rendered - 7f6b382d-f5b4-4e59-93dd-63ba6a3bd5a3.xmp +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/donate-trailer.PRV/Rendered - 7f8942e1-5cf0-4d99-9fd0-abd205c808c9.xmp +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/donate-trailer.PRV/Rendered - 7fba6467-4b82-41b0-8f43-ff2ae2ff865c.xmp +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/donate-trailer.PRV/Rendered - 81ac3c17-d55a-4a44-ab8a-160aa2165931.xmp +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/donate-trailer.PRV/Rendered - 8270ca59-449e-4fd3-b997-e7e4ad6f0c41.xmp +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/donate-trailer.PRV/Rendered - 82c3b14f-113f-4d3e-aff7-e052155a0c88.mpeg +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/donate-trailer.PRV/Rendered - 82c3b14f-113f-4d3e-aff7-e052155a0c88.xmp +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/donate-trailer.PRV/Rendered - 835c3aa3-f4b7-44c4-83a0-bbb24a86c94f.xmp +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/donate-trailer.PRV/Rendered - 845697e2-b370-4743-88e8-4526e7138b52.xmp +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/donate-trailer.PRV/Rendered - 851b6357-5d55-48fc-854c-f58443b0b39b.mpeg +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/donate-trailer.PRV/Rendered - 8551dd7c-42bd-4264-bea6-bde144fe60fd.mpeg +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/donate-trailer.PRV/Rendered - 8551dd7c-42bd-4264-bea6-bde144fe60fd.xmp +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/donate-trailer.PRV/Rendered - 86149f86-f5b5-4b9a-9b2b-5e3694b8d4a0.mpeg +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/donate-trailer.PRV/Rendered - 863272fd-b2c6-4f45-8b74-c8ea95326eb4.mpeg +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/donate-trailer.PRV/Rendered - 863272fd-b2c6-4f45-8b74-c8ea95326eb4.xmp +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/donate-trailer.PRV/Rendered - 86f8bd8e-58ec-435d-86dd-8e754889aa34.xmp +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/donate-trailer.PRV/Rendered - 87a166c3-bb24-4838-ba6f-322d745c63cc.xmp +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/donate-trailer.PRV/Rendered - 87d031b6-749e-4a3c-bd27-3a22aebc917e.mpeg +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/donate-trailer.PRV/Rendered - 87d031b6-749e-4a3c-bd27-3a22aebc917e.xmp +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/donate-trailer.PRV/Rendered - 8819a2b6-197a-4cef-83dd-621e590af490.xmp +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/donate-trailer.PRV/Rendered - 88663236-84c6-4b48-9158-c9f22434d937.mpeg +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/donate-trailer.PRV/Rendered - 88663236-84c6-4b48-9158-c9f22434d937.xmp +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/donate-trailer.PRV/Rendered - 89caad96-443d-4737-8b61-49ad87ba190a.xmp +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/donate-trailer.PRV/Rendered - 8b3c3949-1366-42ce-a546-f3cf6c3dbd01.xmp +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/donate-trailer.PRV/Rendered - 8b3f72cb-7e3f-4890-805d-cca6380a30f0.mpeg +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/donate-trailer.PRV/Rendered - 8bea122c-4a0d-4a53-830f-48bcb67a0358.xmp +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/donate-trailer.PRV/Rendered - 8cd444ad-7f52-4783-ba14-157488d26665.mpeg +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/donate-trailer.PRV/Rendered - 8cd444ad-7f52-4783-ba14-157488d26665.xmp +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/donate-trailer.PRV/Rendered - 8e2aef2b-e8b7-4c6d-ae00-e4d2c552de5f.xmp +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/donate-trailer.PRV/Rendered - 8e92db61-de86-412e-ab50-868115c5abaf.xmp +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/donate-trailer.PRV/Rendered - 8f7a8d89-6f5e-4c84-adbd-75cb7cdb27cb.mpeg +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/donate-trailer.PRV/Rendered - 8f872f66-2b5e-4bd1-826e-520c8c34c252.xmp +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/donate-trailer.PRV/Rendered - 910f588e-08b0-4647-a45a-a0da520d85cf.xmp +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/donate-trailer.PRV/Rendered - 91252248-9402-4611-810a-5b52a8bec62c.xmp +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/donate-trailer.PRV/Rendered - 917cbd65-481e-471e-acb6-86467b3179f3.mpeg +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/donate-trailer.PRV/Rendered - 917cbd65-481e-471e-acb6-86467b3179f3.xmp +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/donate-trailer.PRV/Rendered - 92f602c2-75ff-4ebd-9b26-df2bd7d3975f.mpeg +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/donate-trailer.PRV/Rendered - 9409ab40-5e16-4fa6-99f5-f5d568394b8d.mpeg +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/donate-trailer.PRV/Rendered - 9409ab40-5e16-4fa6-99f5-f5d568394b8d.xmp +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/donate-trailer.PRV/Rendered - 95b5a17f-a489-44a1-a592-787e8b542853.mpeg +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/donate-trailer.PRV/Rendered - 962d9f67-57df-4203-9d0e-5aa50fa1fd8d.mpeg +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/donate-trailer.PRV/Rendered - 962d9f67-57df-4203-9d0e-5aa50fa1fd8d.xmp +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/donate-trailer.PRV/Rendered - 96790667-ef15-4b23-9908-e7961bc32e25.xmp +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/donate-trailer.PRV/Rendered - 98aeb7ab-9704-47df-b8e3-eb981ecf4840.xmp +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/donate-trailer.PRV/Rendered - 98fd43a8-bbf3-4376-b819-3e109958f680.xmp +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/donate-trailer.PRV/Rendered - 994080f2-9594-4f9a-b120-098e04bda2e7.xmp +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/donate-trailer.PRV/Rendered - 99874361-e719-4a97-b276-5e364abb2a54.xmp +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/donate-trailer.PRV/Rendered - 99aa166a-f0a2-4431-85d3-df25105f06c3.xmp +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/donate-trailer.PRV/Rendered - 9b850b01-800e-422f-bdcc-109b0f8d5da3.xmp +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/donate-trailer.PRV/Rendered - 9c291eb1-f588-4eb4-9e21-e255a955b46b.xmp +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/donate-trailer.PRV/Rendered - 9ca5412c-044b-46da-b56a-f7eb7dcaf126.mpeg +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/donate-trailer.PRV/Rendered - 9ca5412c-044b-46da-b56a-f7eb7dcaf126.xmp +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/donate-trailer.PRV/Rendered - 9ce7ab58-3530-4c7d-b42d-7d72015ac05a.xmp +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/donate-trailer.PRV/Rendered - 9db4d60b-093d-4d96-ab48-faad33f79ac5.mpeg +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/donate-trailer.PRV/Rendered - 9db4d60b-093d-4d96-ab48-faad33f79ac5.xmp +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/donate-trailer.PRV/Rendered - 9ffea618-3d66-4e70-8482-e4421c5f5a99.xmp +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/donate-trailer.PRV/Rendered - a0cd40b9-a72e-4856-af3a-339986300c8e.xmp +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/donate-trailer.PRV/Rendered - a11415d2-7882-4001-b323-c5bd76750ea6.xmp +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/donate-trailer.PRV/Rendered - a1ec943d-00ef-4136-802b-1f563b758371.mpeg +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/donate-trailer.PRV/Rendered - a1ec943d-00ef-4136-802b-1f563b758371.xmp +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/donate-trailer.PRV/Rendered - a2a394c7-eadb-491d-98fe-d0c912fd9f5e.mpeg +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/donate-trailer.PRV/Rendered - a3636cee-7c14-45c1-92fe-484d1a60e57c.mpeg +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/donate-trailer.PRV/Rendered - a3636cee-7c14-45c1-92fe-484d1a60e57c.xmp +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/donate-trailer.PRV/Rendered - a3b0fa01-3adc-48aa-8477-9bf090b2c3aa.xmp +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/donate-trailer.PRV/Rendered - a45f732e-e16d-44b3-b0ff-c8992c71b354.xmp +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/donate-trailer.PRV/Rendered - a4aa16df-ba22-4012-9d3c-6ee2b09476b3.xmp +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/donate-trailer.PRV/Rendered - a57c9da7-2d2b-4a52-9991-b24d3fc5a24d.xmp +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/donate-trailer.PRV/Rendered - a59b5399-596c-4408-a070-14e7d4d82738.xmp +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/donate-trailer.PRV/Rendered - a5db7e1d-d645-42b3-aa1a-195a8602f608.mpeg +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/donate-trailer.PRV/Rendered - a5db7e1d-d645-42b3-aa1a-195a8602f608.xmp +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/donate-trailer.PRV/Rendered - a60affd4-dd3b-4f63-b6b7-f5e3b7c83876.xmp +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/donate-trailer.PRV/Rendered - a718dd78-8607-4c01-81c1-6885e71136ed.mpeg +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/donate-trailer.PRV/Rendered - a718dd78-8607-4c01-81c1-6885e71136ed.xmp +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/donate-trailer.PRV/Rendered - a84f46cd-d8eb-4e4b-ab09-a12d69afc0c3.xmp +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/donate-trailer.PRV/Rendered - a8d33def-e1b3-48e9-b2bb-9872fcf31252.xmp +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/donate-trailer.PRV/Rendered - a91018ab-4c00-4e52-beee-c6cf2f4799b4.mpeg +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/donate-trailer.PRV/Rendered - a9a2c557-50c2-40d5-a2c0-057c98bcd7e9.xmp +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/donate-trailer.PRV/Rendered - aa1e5025-d871-4cee-bbaa-e5def29bb678.xmp +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/donate-trailer.PRV/Rendered - ac09294b-b6bf-4ec3-88e2-2d0dab736253.xmp +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/donate-trailer.PRV/Rendered - ac63f5af-63a9-48cb-92b6-c7fe2b97b02f.xmp +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/donate-trailer.PRV/Rendered - ac7bfbe0-7883-41cd-b1ee-014189266c4c.xmp +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/donate-trailer.PRV/Rendered - acae609d-d557-435f-8d28-afb0f76f4232.mpeg +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/donate-trailer.PRV/Rendered - acb3b124-6818-468f-a50a-9391e2a263b4.mpeg +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/donate-trailer.PRV/Rendered - acb3b124-6818-468f-a50a-9391e2a263b4.xmp +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/donate-trailer.PRV/Rendered - ae25c18e-33df-4b2f-8ff3-7db7c1b6662b.mpeg +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/donate-trailer.PRV/Rendered - ae34e985-43ca-48cf-835c-c060a5e6ad1c.mpeg +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/donate-trailer.PRV/Rendered - ae34e985-43ca-48cf-835c-c060a5e6ad1c.xmp +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/donate-trailer.PRV/Rendered - aecd7089-bf15-41e7-aee5-ad86bd57483c.xmp +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/donate-trailer.PRV/Rendered - af12351f-5707-4d1f-83e0-d83cc5569325.xmp +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/donate-trailer.PRV/Rendered - af1637fe-92d0-4f3d-b1c6-298eb175dc08.xmp +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/donate-trailer.PRV/Rendered - b00f74f8-70f9-4d52-bd5d-508d025aac5f.xmp +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/donate-trailer.PRV/Rendered - b056ab07-fc0b-4ce1-8b5a-7fb82d00f8e8.xmp +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/donate-trailer.PRV/Rendered - b18d81e1-9342-47f2-a3c6-07cb9d8027ab.mpeg +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/donate-trailer.PRV/Rendered - b18d81e1-9342-47f2-a3c6-07cb9d8027ab.xmp +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/donate-trailer.PRV/Rendered - b3556ec3-0f6e-4106-8c36-5a9151f66d90.xmp +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/donate-trailer.PRV/Rendered - b495bbb1-8a10-47fa-bc5a-b2ca50b70539.mpeg +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/donate-trailer.PRV/Rendered - b495bbb1-8a10-47fa-bc5a-b2ca50b70539.xmp +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/donate-trailer.PRV/Rendered - b546d1eb-9955-43fa-b24b-29d1bf6a1cbe.mpeg +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/donate-trailer.PRV/Rendered - b546d1eb-9955-43fa-b24b-29d1bf6a1cbe.xmp +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/donate-trailer.PRV/Rendered - b6e62aee-f88a-40e5-b811-ff8da835ba27.mpeg +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/donate-trailer.PRV/Rendered - b97e17b4-dfa5-4f56-b31f-98881b91df9b.xmp +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/donate-trailer.PRV/Rendered - b9b8d37c-1e9e-411e-81af-0ffb582e270f.mpeg +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/donate-trailer.PRV/Rendered - b9b8d37c-1e9e-411e-81af-0ffb582e270f.xmp +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/donate-trailer.PRV/Rendered - ba0ad383-8161-4780-9930-3d9a0a269162.xmp +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/donate-trailer.PRV/Rendered - ba70e7eb-5978-4cc1-b3fc-3d2d2a2dec3f.xmp +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/donate-trailer.PRV/Rendered - baba4f1d-0033-4a39-a8af-238e17abd9d9.mpeg +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/donate-trailer.PRV/Rendered - bb96113c-ad51-4876-9b04-b6049b164f3c.mpeg +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/donate-trailer.PRV/Rendered - be18e129-94c3-40a2-aeaf-97d09fb32123.xmp +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/donate-trailer.PRV/Rendered - be66c7ed-09c5-46cf-abcc-91e1c8770b89.xmp +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/donate-trailer.PRV/Rendered - c0d7a98f-cc4c-450a-8012-9e3502acf199.xmp +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/donate-trailer.PRV/Rendered - c3267784-3a59-4ff4-a0e9-6ee99acf7d37.mpeg +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/donate-trailer.PRV/Rendered - c3267784-3a59-4ff4-a0e9-6ee99acf7d37.xmp +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/donate-trailer.PRV/Rendered - c353e9bb-41cb-4517-98dc-cb80965e57a4.xmp +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/donate-trailer.PRV/Rendered - c429ad4c-381f-426b-937a-11c6bdc0ecde.xmp +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/donate-trailer.PRV/Rendered - c43f3ff3-36ea-418f-b9d2-3e87819ac558.xmp +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/donate-trailer.PRV/Rendered - c519dec0-818e-4d0c-8a93-a4bc8f7ba60d.xmp +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/donate-trailer.PRV/Rendered - c6a84753-ba36-4694-b2cc-a43f9e2d7a74.mpeg +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/donate-trailer.PRV/Rendered - c6a84753-ba36-4694-b2cc-a43f9e2d7a74.xmp +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/donate-trailer.PRV/Rendered - c7e5c3dc-e979-4c03-a7b2-44671d8e85e8.xmp +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/donate-trailer.PRV/Rendered - c8226480-64d4-4797-9920-296c0e645094.xmp +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/donate-trailer.PRV/Rendered - c87cbe20-a64e-4f52-afbe-998bb588be11.xmp +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/donate-trailer.PRV/Rendered - c9aabe1a-50dc-4175-8f8b-1112af0a04ef.xmp +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/donate-trailer.PRV/Rendered - ca720747-1079-4c25-8ee0-206d993fd9ad.xmp +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/donate-trailer.PRV/Rendered - cb9c587f-72cd-46de-a392-22b006fe1983.mpeg +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/donate-trailer.PRV/Rendered - ccf73a6a-61ef-418a-96a1-c02037116ee1.xmp +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/donate-trailer.PRV/Rendered - ccff54fd-ff77-4b15-8790-9953a9183c61.xmp +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/donate-trailer.PRV/Rendered - cddfd509-4bfa-46c1-8f86-f82513695a16.xmp +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/donate-trailer.PRV/Rendered - cffba6f7-a2eb-4d5f-90ff-bad863e6b8ba.mpeg +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/donate-trailer.PRV/Rendered - cffba6f7-a2eb-4d5f-90ff-bad863e6b8ba.xmp +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/donate-trailer.PRV/Rendered - d00e7af6-5677-4810-9ea9-e3231c2a2d2c.xmp +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/donate-trailer.PRV/Rendered - d3d14790-ef07-495e-a707-f12cfa32cfe0.xmp +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/donate-trailer.PRV/Rendered - d3e1b215-d73f-4b41-80cf-ffb9a1c5adca.xmp +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/donate-trailer.PRV/Rendered - d42e2b7e-b53a-4d6c-a032-36605f6946c7.mpeg +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/donate-trailer.PRV/Rendered - d47bb16d-9b65-4e81-9504-ec9a4d3fdabd.xmp +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/donate-trailer.PRV/Rendered - d47f4d66-ca0a-426f-8367-b9e300d9263c.xmp +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/donate-trailer.PRV/Rendered - d5b6d95e-da7a-40ce-b093-b3f903f865a3.mpeg +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/donate-trailer.PRV/Rendered - d60d8f52-802a-4f86-8d6a-9a7547eb52d8.xmp +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/donate-trailer.PRV/Rendered - d6730351-c59a-4e63-abd0-283cc0ff0548.xmp +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/donate-trailer.PRV/Rendered - d6822671-957f-4ca8-902c-fb396e2ef3b0.mpeg +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/donate-trailer.PRV/Rendered - d6ed64c6-e9e9-4233-99db-ee34e200116e.mpeg +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/donate-trailer.PRV/Rendered - d6ed64c6-e9e9-4233-99db-ee34e200116e.xmp +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/donate-trailer.PRV/Rendered - d7aeff3a-ba2a-4214-9497-c0e8d84864f1.xmp +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/donate-trailer.PRV/Rendered - d852e15c-6499-45ec-8c6e-756c2a00bab8.xmp +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/donate-trailer.PRV/Rendered - d85a521e-9f27-4774-b291-7e4b18b74c5d.mpeg +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/donate-trailer.PRV/Rendered - d85a521e-9f27-4774-b291-7e4b18b74c5d.xmp +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/donate-trailer.PRV/Rendered - d910b239-f475-459e-8c53-a6eb667d572f.mpeg +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/donate-trailer.PRV/Rendered - d910b239-f475-459e-8c53-a6eb667d572f.xmp +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/donate-trailer.PRV/Rendered - db26bf8d-1ac5-4798-ad57-945a31da6677.mpeg +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/donate-trailer.PRV/Rendered - dc5177c5-e0bc-42d0-b2e3-13abd3ed6bae.mpeg +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/donate-trailer.PRV/Rendered - dc5177c5-e0bc-42d0-b2e3-13abd3ed6bae.xmp +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/donate-trailer.PRV/Rendered - dd13e694-74a6-4589-9eed-167b13294301.mpeg +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/donate-trailer.PRV/Rendered - dd877aa7-c787-4e76-ba9b-433d8f1d4118.mpeg +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/donate-trailer.PRV/Rendered - dd877aa7-c787-4e76-ba9b-433d8f1d4118.xmp +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/donate-trailer.PRV/Rendered - de864675-074b-4a03-8843-43a4779bdce8.mpeg +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/donate-trailer.PRV/Rendered - dfafed7e-441e-4f48-9342-b608680e87ba.xmp +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/donate-trailer.PRV/Rendered - dfbb0b3b-4768-4c49-8d29-61f1a429ef45.xmp +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/donate-trailer.PRV/Rendered - e0c5b197-85a5-455e-97c6-fa63cd1a206f.xmp +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/donate-trailer.PRV/Rendered - e0f14bb0-3a36-4c59-8b48-b578a55712f9.xmp +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/donate-trailer.PRV/Rendered - e19da54d-f031-40a7-8e0d-00b5435418bb.mpeg +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/donate-trailer.PRV/Rendered - e19da54d-f031-40a7-8e0d-00b5435418bb.xmp +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/donate-trailer.PRV/Rendered - e25accf6-5c71-4d7b-9d2e-3404882384e4.mpeg +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/donate-trailer.PRV/Rendered - e25accf6-5c71-4d7b-9d2e-3404882384e4.xmp +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/donate-trailer.PRV/Rendered - e4ef5468-66d4-4239-a5d7-30aaac88073a.xmp +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/donate-trailer.PRV/Rendered - e60d8e3d-d621-4c1b-8f7f-7d7e61fb0b46.xmp +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/donate-trailer.PRV/Rendered - e67c97af-a092-4cd7-80e9-455230caa843.xmp +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/donate-trailer.PRV/Rendered - e7c9f76b-2e5d-41fe-bf34-f520cc42f369.mpeg +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/donate-trailer.PRV/Rendered - e84ace69-8e78-410f-9991-d3b81d1010d8.xmp +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/donate-trailer.PRV/Rendered - e936ed2d-ffd3-490d-97b5-36f7eb4e05fc.xmp +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/donate-trailer.PRV/Rendered - e99fa538-1baf-4670-a812-e522502e237e.xmp +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/donate-trailer.PRV/Rendered - ea744733-a335-48a2-8690-bea3fe149bb5.xmp +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/donate-trailer.PRV/Rendered - ea98a284-0eb3-4001-af11-7169f9e9cec2.mpeg +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/donate-trailer.PRV/Rendered - ea98a284-0eb3-4001-af11-7169f9e9cec2.xmp +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/donate-trailer.PRV/Rendered - eba3ab2c-dcf8-4d2e-8e7f-0bc64c2aca2a.xmp +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/donate-trailer.PRV/Rendered - ec5e21b6-994d-417b-85a5-06a046b9a099.xmp +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/donate-trailer.PRV/Rendered - ef61f081-9669-4c4f-a0e6-9984655ff2d7.mpeg +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/donate-trailer.PRV/Rendered - f04c2c54-6b65-43a0-96dd-f2764f9d3282.mpeg +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/donate-trailer.PRV/Rendered - f04c2c54-6b65-43a0-96dd-f2764f9d3282.xmp +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/donate-trailer.PRV/Rendered - f1bc2c28-e8ef-4f7e-9a38-650b6ceb0352.xmp +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/donate-trailer.PRV/Rendered - f2d2a51d-d83a-48cc-b7f2-ee6397d7d66c.xmp +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/donate-trailer.PRV/Rendered - f3051cd7-b191-4329-bf4c-2c9259fdf6ce.mpeg +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/donate-trailer.PRV/Rendered - f3051cd7-b191-4329-bf4c-2c9259fdf6ce.xmp +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/donate-trailer.PRV/Rendered - f3672b78-a77d-4b63-adca-73fdbc9edbe4.xmp +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/donate-trailer.PRV/Rendered - f4eaf1c1-a7e1-4438-a5a0-5163b704b069.xmp +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/donate-trailer.PRV/Rendered - f6b64da1-7f15-415c-972f-e145371d69b7.mpeg +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/donate-trailer.PRV/Rendered - f7fb5f6c-2c14-45a0-9e34-b77fb03032b3.xmp +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/donate-trailer.PRV/Rendered - f83c25ea-3bc3-4750-9479-50e5c6514599.xmp +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/donate-trailer.PRV/Rendered - f8e276ea-d9e8-4002-b822-bd8913555393.xmp +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/donate-trailer.PRV/Rendered - fa81931d-50aa-47e0-9f52-544765e26996.xmp +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/donate-trailer.PRV/Rendered - fc03b843-7317-4585-8693-9f35b1cdd2b8.mpeg +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/donate-trailer.PRV/Rendered - fc03b843-7317-4585-8693-9f35b1cdd2b8.xmp +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/donate-trailer.PRV/Rendered - fd5488c4-db0c-4f91-8747-ea5ccb86e1ca.xmp +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/donate-trailer.PRV/Rendered - fd5cb729-209e-48f7-9e48-ad608e70887f.mpeg +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/donate-trailer.PRV/Rendered - fd5cb729-209e-48f7-9e48-ad608e70887f.xmp +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/donate-trailer.PRV/Rendered - fd8bfe9c-d33d-40fc-9c8c-97e229efa720.xmp +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/donate-trailer.PRV/Rendered - fea59ba0-30b7-4ede-8bae-e5a313587d3f.xmp +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/donate-trailer.PRV/Rendered - fee616ae-d9a2-4498-b507-388fa86d986a.xmp +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/donate-trailer.PRV/Rendered - ff64f656-ed0a-40f4-ac1c-ccd7de601631.mpeg +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/donate-trailer.PRV/Rendered - ff64f656-ed0a-40f4-ac1c-ccd7de601631.xmp +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/Jennifer_s1_F_20151224_eng.PRV/Rendered - 5db157c1-a6ec-4ddb-8f46-965f24ee82c3.mpeg +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/Jennifer_s1_F_20151224_eng.PRV/Rendered - 94bd8793-bdf6-44b0-b2a9-c22ad3fbe475.xmp +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/Jennifer_s1_F_20151224_eng.PRV/Rendered - a9a9a3cf-400d-41d0-a2f4-35a910efd184.mpeg +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/Jennifer_s1_F_20151224_eng.PRV/Rendered - a9a9a3cf-400d-41d0-a2f4-35a910efd184.xmp +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/Jennifer_s1_F_20151224_eng.PRV/Rendered - cc0617ab-a1e2-4d26-90d6-9c8351225c5a.xmp +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/Jennifer_s1_F_20151224_eng.PRV/Rendered - f7960b8f-6300-43a5-a229-59a7e7ab8ca3.mpeg +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/Jennifer_s1_F_20151224_eng.PRV/Rendered - f7960b8f-6300-43a5-a229-59a7e7ab8ca3.xmp +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/La_s1_F_20160510_lao.PRV/16a65957-08a4-426f-adc7-257eb60a8672+d355bfa8-3d35-e614-e742-7aa100000049 44100.pek +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/La_s1_F_20160510_lao.PRV/Rendered - 54ec4f17-a06c-455c-98d6-5538bf9a9c93.mpeg +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/premier project/Adobe Premiere Pro Preview Files/La_s1_F_20160510_lao.PRV/Rendered - 54ec4f17-a06c-455c-98d6-5538bf9a9c93.xmp +/Oral Histories/Jennifer_s1_F_20151224_eng/raws/thumbnail/Jennifer_s1_F_20151224_eng.jpg +/Oral Histories/Jeremi_s1_M_20140627_afr/Jeremi_s1_M_20140627_afr.mp4 +/Oral Histories/Jerry_s2_M_20131019_chr+eng/Jerry_s2_M_20131019_chr+eng.mp4 +/Oral Histories/Jerry_s2_M_20131019_chr+eng/raws/footage/_MG_0135.CR2 +/Oral Histories/Jerry_s2_M_20131019_chr+eng/raws/footage/_MG_0136.CR2 +/Oral Histories/Jerry_s2_M_20131019_chr+eng/raws/footage/_MG_0137.CR2 +/Oral Histories/Jerry_s2_M_20131019_chr+eng/raws/footage/_MG_0141.CR2 +/Oral Histories/Jerry_s2_M_20131019_chr+eng/raws/footage/_MG_0142.CR2 +/Oral Histories/Jerry_s2_M_20131019_chr+eng/raws/footage/_MG_0143.CR2 +/Oral Histories/Jerry_s2_M_20131019_chr+eng/raws/footage/MVI_0139.MOV +/Oral Histories/Jerry_s2_M_20131019_chr+eng/raws/footage/STE-024.wav +/Oral Histories/Jessica_s3_F_20151219_spa+swe+eng/Jessica_s3_F_20151219_spa+swe+eng.jpg +/Oral Histories/Jessica_s3_F_20151219_spa+swe+eng/raws/footage/clips/MVI_9437.MOV +/Oral Histories/Jessica_s3_F_20151219_spa+swe+eng/raws/footage/clips/MVI_9438.m4v +/Oral Histories/Jessica_s3_F_20151219_spa+swe+eng/raws/footage/clips/STE-021.wav +/Oral Histories/Jessica_s3_F_20151219_spa+swe+eng/raws/footage/converted/MVI_9437.mov +/Oral Histories/Jessica_s3_F_20151219_spa+swe+eng/raws/footage/converted/MVI_9438.mov +/Oral Histories/Jessica_s3_F_20151219_spa+swe+eng/raws/Premier Project/Adobe Premiere Pro Auto-Save/Jessica_s3_F_20151219_spa+swe+eng-1.prproj +/Oral Histories/Jessica_s3_F_20151219_spa+swe+eng/raws/Premier Project/Adobe Premiere Pro Auto-Save/Jessica_s3_F_20151219_spa+swe+eng-3.prproj +/Oral Histories/Jessica_s3_F_20151219_spa+swe+eng/raws/Premier Project/Jessica_s3_F_20151219_spa+swe+eng.prproj +/Oral Histories/Jessica_s3_F_20151219_spa+swe+eng/raws/thumbnail/Screen Shot 2016-09-27 at 15.29.33.png +/Oral Histories/Jessica_s3_F_20151219_spa+swe+eng/raws/thumbnail/Screen Shot 2016-09-27 at 16.45.48.png +/Oral Histories/Jide_s1_M_20160319_yor/Jide speaking Yoruba.jpg +/Oral Histories/Jide_s1_M_20160319_yor/Jide speaking Yoruba.mp4 +/Oral Histories/Joaquin_s1_M_20140729_spa/Joaquin_s1_M_20140729_spa.mp4 +/Oral Histories/Joaquin_s1_M_20140729_spa/raws/footage/audio/STE-014.wav +/Oral Histories/Joaquin_s1_M_20140729_spa/raws/footage/clips/MVI_9925.MOV +/Oral Histories/Joaquin_s1_M_20140729_spa/raws/Premier Project/Adobe Premiere Pro Auto-Save/Joaquin_s1_M_20140729_spa-1.prproj +/Oral Histories/Joaquin_s1_M_20140729_spa/raws/premier project/Adobe Premiere Pro Preview Files/Joaquin_s1_M_20140729_spa.PRV/Rendered - 1dd4f021-084d-4b2d-a2f7-44f67419bc08.mpeg +/Oral Histories/Joaquin_s1_M_20140729_spa/raws/premier project/Adobe Premiere Pro Preview Files/Joaquin_s1_M_20140729_spa.PRV/Rendered - 1dd4f021-084d-4b2d-a2f7-44f67419bc08.xmp +/Oral Histories/Joaquin_s1_M_20140729_spa/raws/premier project/Adobe Premiere Pro Preview Files/Joaquin_s1_M_20140729_spa.PRV/Rendered - 45ae22c3-fda9-4611-8c21-fcf1a1fdfb82.xmp +/Oral Histories/Joaquin_s1_M_20140729_spa/raws/premier project/Adobe Premiere Pro Preview Files/Joaquin_s1_M_20140729_spa.PRV/Rendered - 9b16d4d7-bea9-41b8-a942-61d3d8281d54.mpeg +/Oral Histories/Joaquin_s1_M_20140729_spa/raws/premier project/Adobe Premiere Pro Preview Files/Joaquin_s1_M_20140729_spa.PRV/Rendered - 9b16d4d7-bea9-41b8-a942-61d3d8281d54.xmp +/Oral Histories/Joaquin_s1_M_20140729_spa/raws/premier project/Adobe Premiere Pro Preview Files/Joaquin_s1_M_20140729_spa.PRV/Rendered - c658a5cd-0203-4e7e-9d23-b6c883037ff8.xmp +/Oral Histories/Joaquin_s1_M_20140729_spa/raws/premier project/Adobe Premiere Pro Preview Files/Joaquin_s1_M_20140729_spa.PRV/Rendered - d7b991ba-7472-464f-a4c5-6a202d310ce4.mpeg +/Oral Histories/Joaquin_s1_M_20140729_spa/raws/premier project/Adobe Premiere Pro Preview Files/Joaquin_s1_M_20140729_spa.PRV/Rendered - d7b991ba-7472-464f-a4c5-6a202d310ce4.xmp +/Oral Histories/Joaquin_s1_M_20140729_spa/raws/Premier Project/exports/MVI_9925.20160714161120.xml +/Oral Histories/Joaquin_s1_M_20140729_spa/raws/Premier Project/exports/mvi_9925.xml +/Oral Histories/Joaquin_s1_M_20140729_spa/raws/Premier Project/exports/V1-0001_MVI_9925.mov +/Oral Histories/Joaquin_s1_M_20140729_spa/raws/Premier Project/exports/V1-0003_MVI_9925.mov +/Oral Histories/Joaquin_s1_M_20140729_spa/raws/Premier Project/Joaquin_s1_M_20140729_spa.prproj +/Oral Histories/Joaquin_s1_M_20140729_spa/raws/thumbnail/Joaquin_s1_M_20140729_spa.jpg +/Oral Histories/John_s2_M_20140729_eng+sco/John speaking English.mp4 +/Oral Histories/John_s2_M_20140729_eng+sco/raws/footage/MVI_9451.MOV +/Oral Histories/John_s2_M_20140729_eng+sco/raws/footage/STE-036 Audio Extracted.pkf +/Oral Histories/John_s2_M_20140729_eng+sco/raws/footage/STE-036.wav +/Oral Histories/John_s2_M_20140729_eng+sco/raws/Premier Project/John speaking English and Glaswegian.prproj +/Oral Histories/John_s2_M_20140729_eng+sco/raws/thumbnail/Screen Shot 2016-05-03 at 14.22.46.png +/Oral Histories/John_s2_M_20140729_eng+sco/raws/thumbnail/Screen Shot 2016-05-03 at 14.22.55.png +/Oral Histories/John_s2_M_20140729_eng+sco/raws/thumbnail/Screen Shot 2016-05-03 at 14.23.12.png +/Oral Histories/John_s2_M_20140729_eng+sco/raws/thumbnail/Screen Shot 2016-05-03 at 14.23.15.png +/Oral Histories/John_s2_M_20140729_eng+sco/raws/thumbnail/Screen Shot 2016-05-03 at 14.23.17.png +/Oral Histories/John_s2_M_20140729_eng+sco/readme.txt +/Oral Histories/John_s3_M_20160415_eng+spa+ell/Adobe Premiere Pro Auto-Save/John_s3_M_20160415_eng+spa+ell-1.prproj +/Oral Histories/John_s3_M_20160415_eng+spa+ell/John_s3_M_20160415_eng+spa+ell.mp4 +/Oral Histories/John_s3_M_20160415_eng+spa+ell/John_s3_M_20160415_eng+spa+ell.pdf +/Oral Histories/John_s3_M_20160415_eng+spa+ell/John_s3_M_20160415_eng+spa+ell.prproj +/Oral Histories/John_s3_M_20160415_eng+spa+ell/raws/footage/John - English, Spanish, Greek Audio Extracted.wav +/Oral Histories/John_s3_M_20160415_eng+spa+ell/raws/footage/John - English, Spanish, Greek.m4v +/Oral Histories/John_s3_M_20160415_eng+spa+ell/raws/thumbnail/Screen Shot 2016-05-05 at 18.24.03.png +/Oral Histories/Jon_s1_M_20131201_eus/raws/footage/clips/Jon_s1_M_20131201_eus.mp4 +/Oral Histories/Jon_s1_M_20131201_eus/raws/thumbnail/Jon_s1_M_20131201_eus.png +/Oral Histories/Jon_s1_M_20131201_eus/readme.txt +/Oral Histories/Joyce_s1_F_20130329_yue/Joyce_s1_F_20130329_yue.mp4 +/Oral Histories/Julia_s1_F_20140729_por/Julia_s1_F_20140729.mp4 +/Oral Histories/Julia_s1_F_20140729_por/Julia_s1_F_20140729_por.jpg +/Oral Histories/Julia_s1_F_20140729_por/raws/footage/MVI_9939.MOV +/Oral Histories/Julia_s1_F_20140729_por/raws/footage/MVI_9940.MOV +/Oral Histories/Julia_s1_F_20140729_por/raws/footage/STE-018.wav +/Oral Histories/Julia_s1_F_20140729_por/readme.txt +/Oral Histories/Julia_s1_F_20160716_gsw/Julia_s1_F_20160716_gsw.jpg +/Oral Histories/Julia_s1_F_20160716_gsw/Julia_s1_F_20160716_gsw.mp4 +/Oral Histories/Caroline_s2_F_20130804_eng+gul/Caroline_s2_F_20130804_eng+gul.mp4 +/Oral Histories/Caroline_s2_F_20130804_eng+gul/raws/footage/IMG_0199.CR2 +/Oral Histories/Caroline_s2_F_20130804_eng+gul/raws/footage/IMG_0199.psd +/oral histories/Stefano_s1_M_20140729_-cal/raws/footage/clips/Stefano - Calabrese Italian, Better Render.mp4 +/Oral Histories/Caroline_s2_F_20130804_eng+gul/raws/footage/IMG_0200.CR2 +/Oral Histories/Caroline_s2_F_20130804_eng+gul/raws/footage/IMG_0201.CR2 +/Oral Histories/Caroline_s2_F_20130804_eng+gul/raws/footage/IMG_0204.CR2 +/Oral Histories/Caroline_s2_F_20130804_eng+gul/raws/footage/IMG_0205.CR2 +/Oral Histories/Caroline_s2_F_20130804_eng+gul/raws/footage/IMG_0206.CR2 +/Oral Histories/Caroline_s2_F_20130804_eng+gul/raws/footage/MVI_0197.MOV +/Oral Histories/Caroline_s2_F_20130804_eng+gul/raws/footage/MVI_0198.MOV +/Oral Histories/Caroline_s2_F_20130804_eng+gul/raws/footage/MVI_0203.MOV +/Oral Histories/Caroline_s2_F_20130804_eng+gul/raws/thumbnail/Screen Shot 2016-11-24 at 14.18.06.png +/Oral Histories/Caroline_s2_F_20130804_eng+gul/raws/thumbnail/Screen Shot 2016-11-24 at 14.18.07.png +/Oral Histories/Caroline_s2_F_20130804_eng+gul/raws/thumbnail/Screen Shot 2016-11-24 at 14.18.08.png +/Oral Histories/Caroline_s2_F_20130804_eng+gul/readme.txt +/Oral Histories/Julia_s1_F_20160716_gsw/raws/footage/clips/Julia.mp4 +/Oral Histories/Julia_s1_F_20160716_gsw/raws/Premier Project/Julia_s1_F_20160716_gsw.prproj +/Oral Histories/Julius_s1_M_20151020_bbc/Julius_s1_M_20151020_bbc.mp4 +/Oral Histories/Julius_s1_M_20151020_bbc/raws/footage/Batak Toba Full.mp4 +/Oral Histories/Julius_s1_M_20151020_bbc/raws/footage/Batak Toba.mp4 +/Oral Histories/Julius_s1_M_20151020_bbc/raws/Premier Project/Adobe Premiere Pro Auto-Save/julian-bbc-2.prproj +/Oral Histories/Julius_s1_M_20151020_bbc/raws/Premier Project/Adobe Premiere Pro Auto-Save/julian-bbc-3.prproj +/Oral Histories/Julius_s1_M_20151020_bbc/raws/Premier Project/Adobe Premiere Pro Auto-Save/julius-bbc-1.prproj +/Oral Histories/Julius_s1_M_20151020_bbc/raws/Premier Project/Adobe Premiere Pro Auto-Save/julius-bbc-3.prproj +/Oral Histories/Julius_s1_M_20151020_bbc/raws/premier project/Adobe Premiere Pro Preview Files/julian-bbc.PRV/Rendered - 0f2546c9-fc2b-4d34-85c8-240e3ca45128.mxf +/Oral Histories/Julius_s1_M_20151020_bbc/raws/premier project/Adobe Premiere Pro Preview Files/julian-bbc.PRV/Rendered - 0f2546c9-fc2b-4d34-85c8-240e3ca45128.mxf.xmp +/Oral Histories/Julius_s1_M_20151020_bbc/raws/premier project/Adobe Premiere Pro Preview Files/julian-bbc.PRV/Rendered - 314d0e7e-9b2b-4b4f-b3fe-202d95d5f3e7.mxf.xmp +/Oral Histories/Julius_s1_M_20151020_bbc/raws/premier project/Adobe Premiere Pro Preview Files/julius-bbc.PRV/Rendered - 746e26c4-4225-49a8-9d61-29fa80a678ea.mpeg +/Oral Histories/Julius_s1_M_20151020_bbc/raws/premier project/Adobe Premiere Pro Preview Files/julius-bbc.PRV/Rendered - 746e26c4-4225-49a8-9d61-29fa80a678ea.xmp +/Oral Histories/Julius_s1_M_20151020_bbc/raws/Premier Project/Batak Toba Audio Extracted Audio Extracted.wav +/Oral Histories/Julius_s1_M_20151020_bbc/raws/Premier Project/Batak Toba Audio Extracted.pkf +/Oral Histories/Julius_s1_M_20151020_bbc/raws/Premier Project/Batak Toba Audio Extracted.wav +/Oral Histories/Julius_s1_M_20151020_bbc/raws/Premier Project/Batak Toba Audio Extracted_1.wav +/Oral Histories/Julius_s1_M_20151020_bbc/raws/Premier Project/Batak Toba Full Audio Extracted.pkf +/Oral Histories/Julius_s1_M_20151020_bbc/raws/Premier Project/Batak Toba Full Audio Extracted.wav +/Oral Histories/Julius_s1_M_20151020_bbc/raws/Premier Project/Batak Toba Full Audio Extracted_1.wav +/Oral Histories/Julius_s1_M_20151020_bbc/raws/Premier Project/julian-bbc.prproj +/Oral Histories/Julius_s1_M_20151020_bbc/raws/Premier Project/julius-bbc.prproj +/Oral Histories/Karl_s1_M_20160802_fil/raws/footage/clips/Karl speaking Tagalog Audio Extracted.pkf +/Oral Histories/Karl_s1_M_20160802_fil/raws/footage/clips/Karl speaking Tagalog Audio Extracted.wav +/Oral Histories/Karl_s1_M_20160802_fil/raws/footage/clips/Karl speaking Tagalog.mp4 +/Oral Histories/Karl_s1_M_20160802_fil/readme.txt +/Oral Histories/Karl_s1_M_20160802_spa/raws/footage/clips/Karl Speaking Philippine Spanish.wmv +/Oral Histories/Karl_s1_M_20160802_spa/readme.txt +/Oral Histories/Kevin_s1_M_20140217_eng/Kevin_s1_M_20140217_eng.mp4 +/Oral Histories/Kevin_s1_M_20140217_eng/raws/footage/MVI_9969.MOV +/Oral Histories/Kevin_s1_M_20140217_eng/raws/footage/STE-013.wav +/Oral Histories/Kevin_s1_M_20160301_por/Footage/IMG_2792 Audio Extracted.wav +/Oral Histories/Kevin_s1_M_20160301_por/Footage/IMG_2792.MOV +/Oral Histories/Kevin_s1_M_20160301_por/Kevin speaking Portuguese.jpg +/Oral Histories/Kevin_s1_M_20160301_por/Premiere Project/Kevin speaking Portuguese.prproj +/Oral Histories/Kevin_s1_M_20160301_por/Thumbnail/raw_thumbnail.png +/Oral Histories/Khady_s1_F_20160329_wol/Khady speaking Wolof and French.jpg +/Oral Histories/Khady_s1_F_20160329_wol/Khady/Wikitongues Wolof Audio Extracted.pkf +/Oral Histories/Khady_s1_F_20160329_wol/Khady/Wikitongues Wolof Audio Extracted.wav +/Oral Histories/Khady_s1_F_20160329_wol/Khady/Wikitongues Wolof.mp4 +/Oral Histories/Khady_s1_F_20160329_wol/Thumbnails/Screen Shot 2016-04-04 at 17.43.38.png +/Oral Histories/Khulan_s1_F_20160726_mon/Khulan_s1_F_20160726_mon.jpg +/Oral Histories/Khulan_s1_F_20160726_mon/Khulan_s1_F_20160726_mon.mp4 +/Oral Histories/Khulan_s1_F_20160726_mon/raws/footage/clips/Khulan Audio Extracted.wav +/Oral Histories/Khulan_s1_F_20160726_mon/raws/footage/clips/Khulan.mp4 +/Oral Histories/Khulan_s1_F_20160726_mon/raws/Premiere project/Khulan_s1_F_20160726_mon.prproj +/Oral Histories/Khulan_s1_F_20160726_mon/raws/thumbnails/Screen Shot 2016-09-13 at 20.03.46.png +/Oral Histories/Khulan_s1_F_20160726_mon/raws/thumbnails/Screen Shot 2016-09-13 at 20.03.47.png +/Oral Histories/Khulan_s1_F_20160726_mon/readme.txt +/Oral Histories/Kostas_s1_M_20130303_ell/Kostas_s1_M_20130303_ell.mp4 +/Oral Histories/Krishna_s1_M_20160721_bho/Krishna_s1_M_20160721_bho.mp4 +/Oral Histories/Krishna_s1_M_20160721_bho/Krishna_s1_M_20160721_bho.pdf +/Oral Histories/Krishna_s1_M_20160721_bho/raws/footage/converted/Krishna speaking Bhojpuri (1).mov +/Oral Histories/Krishna_s1_M_20160721_bho/raws/Premier Project/Adobe Premiere Pro Auto-Save/Krishna_s1_M_20160721_bho-1.prproj +/Oral Histories/Krishna_s1_M_20160721_bho/raws/Premier Project/Krishna_s1_M_20160721_bho.prproj +/Oral Histories/La_s1_F_20160510_lao/La_s1_F_20160510_lao.mp4 +/Oral Histories/La_s1_F_20160510_lao/raws/footage/Clips/P1015390.AVI +/Oral Histories/La_s1_F_20160510_lao/raws/footage/Converted/P1015390 Audio Extracted.pkf +/Oral Histories/La_s1_F_20160510_lao/raws/footage/Converted/P1015390.mov +/Oral Histories/La_s1_F_20160510_lao/raws/thumbnail/Screen Shot 2016-07-09 at 17.34.31.png +/Oral Histories/Labaram_s1_M_20160702_bqg/Labaram_s1_M_20160702_bqg.mp4 +/Oral Histories/Labaram_s1_M_20160702_bqg/raws/footage/clips/Laba Audio Extracted.wav +/Oral Histories/Labaram_s1_M_20160702_bqg/raws/footage/clips/Laba.mp4 +/Oral Histories/Labaram_s1_M_20160702_bqg/raws/footage/clips/Labaram_s1_M_20160702_bqg.aep +/Oral Histories/Labaram_s1_M_20160702_bqg/raws/Premier Project/Adobe Premiere Pro Auto-Save/Labaram_s1_M_20160702_bqg-2.prproj +/Oral Histories/Labaram_s1_M_20160702_bqg/raws/Premier Project/Adobe Premiere Pro Auto-Save/Labaram_s1_M_20160702_bqg-3.prproj +/Oral Histories/Labaram_s1_M_20160702_bqg/raws/premier project/Adobe Premiere Pro Preview Files/Labaram_s1_M_20160702_bqg.PRV/Rendered - 418bc7b7-af01-4fb6-87b0-0789d64a553e.mpeg +/Oral Histories/Labaram_s1_M_20160702_bqg/raws/premier project/Adobe Premiere Pro Preview Files/Labaram_s1_M_20160702_bqg.PRV/Rendered - 97a5fcc9-53ce-4332-8e6e-2c9292327260.xmp +/Oral Histories/Labaram_s1_M_20160702_bqg/raws/premier project/Adobe Premiere Pro Preview Files/Labaram_s1_M_20160702_bqg.PRV/Rendered - c57ddf8d-9afb-40a7-ad7b-6eb6621059de.mpeg +/Oral Histories/Labaram_s1_M_20160702_bqg/raws/premier project/Adobe Premiere Pro Preview Files/Labaram_s1_M_20160702_bqg.PRV/Rendered - c57ddf8d-9afb-40a7-ad7b-6eb6621059de.xmp +/Oral Histories/Labaram_s1_M_20160702_bqg/raws/premier project/Adobe Premiere Pro Preview Files/Labaram_s1_M_20160702_bqg.PRV/Rendered - e8d76466-3806-4bc2-b1e1-34ffd923e43f.xmp +/Oral Histories/Labaram_s1_M_20160702_bqg/raws/Premier Project/Karl_s1_M_20160802_fil.prproj +/Oral Histories/Labaram_s1_M_20160702_bqg/raws/Premier Project/Labaram_s1_M_20160702_bqg.prproj +/Oral Histories/Ladonna_s2_F_20140526_bis+lgk/raws/thumbnail/ladonna-lgkbis-thumb-raw.png +/Oral Histories/Lama_s2_F_20130311_eng+ajp/Lama_s2_F_20130311_eng+ajp.mp4 +/Oral Histories/Leo_s1_M_20141228_spa/Footage/Leo speaking Spanish.jpg +/Oral Histories/Leonhard_s1_M_20141023_swa/leonhard-swa.mp4 +/Oral Histories/Leonhard_s1_M_20141023_swa/raws/footage/KISWAHILLI KENYA.MOV +/Oral Histories/Leonhard_s1_M_20141023_swa/raws/Premier Project/KISWAHILLI KENYA Audio Extracted.pkf +/Oral Histories/Liam_s1_M_20151226_eng/raws/footage/MVI_9452.MOV +/Oral Histories/Liam_s1_M_20151226_eng/raws/footage/STE-037.wav +/Oral Histories/Lillotama_s1_F_20160514_skr/Lillotama_s1_F_20160514_skr.jpg +/Oral Histories/Lillotama_s1_F_20160514_skr/Lillotama_s1_F_20160514_skr.pdf +/Oral Histories/Lillotama_s1_F_20160514_skr/raws/footage/IMG_5495 Audio Extracted.pkf +/Oral Histories/Lillotama_s1_F_20160514_skr/raws/footage/IMG_5495 Audio Extracted.wav +/Oral Histories/Lillotama_s1_F_20160514_skr/raws/Premier Project/Adobe Premiere Pro Auto-Save/Lillotama_s1_F_20160514_skr-1.prproj +/Oral Histories/Lillotama_s1_F_20160514_skr/raws/Premier Project/Lillotama_s1_F_20160514_skr.prproj +/Oral Histories/Lillotama_s1_F_20160514_skr/raws/thumbnail/Screen Shot 2016-05-31 at 16.40.35.png +/Oral Histories/Ljóni_s1_M_20160404_isl/Ljóni speaking Icelandic.jpg +/Oral Histories/Ljóni_s1_M_20160404_isl/Ljóni speaking Icelandic.mp4 +/Oral Histories/Ljóni_s1_M_20160404_isl/Premiere Project/Adobe Premiere Pro Auto-Save/Ljóni speaking Icelandic-1.prproj +/Oral Histories/Ljóni_s1_M_20160404_isl/premiere project/Adobe Premiere Pro Preview Files/Ljóni speaking Icelandic.PRV/0ab4d8e5-6fcb-4b6b-a538-598179b3256c+f8550500-dc50-19be-9802-821200000069 48000.pek +/Oral Histories/Ljóni_s1_M_20160404_isl/premiere project/Adobe Premiere Pro Preview Files/Ljóni speaking Icelandic.PRV/df2dfe55-1c82-4473-af97-bac0cebce5e4+27b0f0c1-b2a3-c69b-cf05-403700000049 48000.cfa +/Oral Histories/Ljóni_s1_M_20160404_isl/premiere project/Adobe Premiere Pro Preview Files/Ljóni speaking Icelandic.PRV/df2dfe55-1c82-4473-af97-bac0cebce5e4+27b0f0c1-b2a3-c69b-cf05-403700000049 48000.pek +/Oral Histories/Ljóni_s1_M_20160404_isl/premiere project/Adobe Premiere Pro Preview Files/Ljóni speaking Icelandic.PRV/Rendered - 0a9a702d-6341-4331-8edc-16ce1685bba5.xmp +/Oral Histories/Ljóni_s1_M_20160404_isl/premiere project/Adobe Premiere Pro Preview Files/Ljóni speaking Icelandic.PRV/Rendered - 3fd16026-c26e-41dc-88fb-1d7207cd9917.mpeg +/Oral Histories/Ljóni_s1_M_20160404_isl/premiere project/Adobe Premiere Pro Preview Files/Ljóni speaking Icelandic.PRV/Rendered - 3fd16026-c26e-41dc-88fb-1d7207cd9917.xmp +/Oral Histories/Ljóni_s1_M_20160404_isl/premiere project/Adobe Premiere Pro Preview Files/Ljóni speaking Icelandic.PRV/Rendered - 680138d5-b634-4059-b381-ca9986b14065.xmp +/Oral Histories/Ljóni_s1_M_20160404_isl/Premiere Project/Ljóni speaking Icelandic.prproj +/Oral Histories/Ljóni_s1_M_20160404_isl/Raws/Footage/Movie on 04-04-16 at 17.26 Audio Extracted.pkf +/Oral Histories/Ljóni_s1_M_20160404_isl/Raws/Footage/Movie on 04-04-16 at 17.26.mov +/Oral Histories/Ljóni_s1_M_20160404_isl/Raws/Thumbnail/Screen Shot 2016-04-07 at 20.19.11.png +/Oral Histories/Ljóni_s1_M_20160404_isl/Raws/Thumbnail/Screen Shot 2016-04-07 at 20.19.13.png +/Oral Histories/Lopez_s1_M_20140610_-naf/lopez--naf.mp4 +/Oral Histories/Louis_s2_M_20130706_eng+frc/Louis_s2_M_20130706_eng+frc.mp4 +/Oral Histories/Louis_s2_M_20130706_eng+frc/raws/footage/MVI_0192.MOV +/Oral Histories/Lucy_s1_F_20150618_mek/Lucy_s1_F_20150618_mek Audio Extracted.wav +/Oral Histories/Lucy_s1_F_20150618_mek/Lucy_s1_F_20150618_mek.mov +/Oral Histories/Manjusha_s1_F_20140624_tel/Manjusha_s1_F_20140624_tel.mp4 +/Oral Histories/Manuel_s1_M_20130203_toc/Manuel_s1_M_20130203_toc/footage/MVI_3212.MOV +/Oral Histories/Manuel_s1_M_20130203_toc/Manuel_s1_M_20130203_toc/footage/MVI_3213.MOV +/Oral Histories/Manuel_s1_M_20130203_toc/Manuel_s1_M_20130203_toc/footage/MVI_3214.MOV +/Oral Histories/Manuel_s1_M_20130203_toc/Manuel_s1_M_20130203_toc/thumbnail/Screen Shot 2013-02-03 at 4.41.15 PM.png +/Oral Histories/Manuel_s1_M_20161114_yua/raws/footage/clips/Original In miatsil mixtun kiimil-2012-09-11.mp4 +/Oral Histories/Margaret_s1_F_20160806_hat/raws/footage/clips/Margaret.mov +/Oral Histories/Mario_s4_M_20161021_eng+cmn+jpn+por/Mario_s4_M_20161021_eng+cmn+jpn+por.jpg +/Oral Histories/Mario_s4_M_20161021_eng+cmn+jpn+por/Mario_s4_M_20161021_eng+cmn+jpn+por.mp4 +/Oral Histories/Mario_s4_M_20161021_eng+cmn+jpn+por/raws/footage/clips/ファイル_000 Audio Extracted.pkf +/Oral Histories/Mario_s4_M_20161021_eng+cmn+jpn+por/raws/footage/clips/ファイル_000.mov +/Oral Histories/Mario_s4_M_20161021_eng+cmn+jpn+por/raws/Premier Project/Adobe Premiere Pro Auto-Save/Mario_s4_M_20161021_eng+cmn+jpn+por-1.prproj +/Oral Histories/Mario_s4_M_20161021_eng+cmn+jpn+por/raws/Premier Project/Mario_s4_M_20161021_eng+cmn+jpn+por.prproj +/Oral Histories/Marta_s1_F_20140502_pol/Marta_s1_F_20140502_pol.mp4 +/Oral Histories/Martha_s1_F_20151013_aym/Martha_s1_F_20151013_aym.mp4 +/Oral Histories/Martha_s1_F_20151013_aym/raws/footage/MVI_0090.MOV +/Oral Histories/Martha_s1_F_20151013_aym/raws/footage/STE-029 Audio Extracted_1.wav +/Oral Histories/Martha_s1_F_20151013_aym/raws/premier project/Adobe Premiere Pro Preview Files/martha-aym.PRV/Rendered - 17e168da-6c63-48aa-8a34-985303d6a5cf.mpeg +/Oral Histories/Martha_s1_F_20151013_aym/raws/premier project/Adobe Premiere Pro Preview Files/martha-aym.PRV/Rendered - 17e168da-6c63-48aa-8a34-985303d6a5cf.xmp +/Oral Histories/Martha_s1_F_20151013_aym/raws/premier project/Adobe Premiere Pro Preview Files/martha-aym.PRV/Rendered - 54e777ad-26c5-4a55-89ae-6d099ee2da1e.xmp +/Oral Histories/Martha_s1_F_20151013_aym/raws/premier project/Adobe Premiere Pro Preview Files/martha-aym.PRV/Rendered - 9fb7961f-340d-46d7-9fd7-2202e82b9040.mpeg +/Oral Histories/Martha_s1_F_20151013_aym/raws/premier project/Adobe Premiere Pro Preview Files/martha-aym.PRV/Rendered - 9fb7961f-340d-46d7-9fd7-2202e82b9040.xmp +/Oral Histories/Martha_s1_F_20151013_aym/raws/premier project/Adobe Premiere Pro Preview Files/martha-aym.PRV/Rendered - fb65d30d-7ceb-4986-bb4d-c9e17e2a72c0.xmp +/Oral Histories/Martha_s1_F_20151013_aym/raws/Premier Project/martha-aym.prproj +/Oral Histories/Martha_s1_F_20151013_aym/raws/Premier Project/STE-029 Audio Extracted.pkf +/Oral Histories/Martha_s1_F_20151013_aym/raws/thumbnail/marth-aym-thumb.png +/Oral Histories/Marty_s1_M_20151212_cor/Marty_s1_M_20151212_cor.mp4 +/Oral Histories/Marty_s1_M_20151212_cor/raws/footage/audio/STE-043 Audio Extracted.pkf +/Oral Histories/Marty_s1_M_20151212_cor/raws/footage/audio/STE-043.wav +/Oral Histories/Marty_s1_M_20151212_cor/raws/footage/clips/MVI_9459.MOV +/Oral Histories/Marty_s1_M_20151212_cor/raws/footage/converted/MVI_9459.mov +/Oral Histories/Marty_s1_M_20151212_cor/raws/thumbnail/Screen Shot 2016-07-18 at 16.21.16.png +/Oral Histories/Marvin_s1_M_20150625_deu/Marvin_s1_M_20150625_deu.jpg +/Oral Histories/Marvin_s1_M_20150625_deu/Marvin_s1_M_20150625_deu.mp4 +/Oral Histories/María_s1_F_20150924_gug/maria-grn.mp4 +/Oral Histories/María_s1_F_20150924_gug/raws/footage/MVI_0043.MOV +/Oral Histories/María_s1_F_20150924_gug/raws/footage/MVI_0044 Audio Extracted.pkf +/Oral Histories/María_s1_F_20150924_gug/raws/footage/MVI_0044.MOV +/Oral Histories/María_s1_F_20150924_gug/raws/Premier Project/Adobe Premiere Pro Auto-Save/maria-grn_cuts-1.prproj +/Oral Histories/María_s1_F_20150924_gug/raws/Premier Project/Adobe Premiere Pro Auto-Save/maria-grn_cuts-2.prproj +/Oral Histories/María_s1_F_20150924_gug/raws/Premier Project/Adobe Premiere Pro Auto-Save/maria-grn_cuts-4.prproj +/Oral Histories/María_s1_F_20150924_gug/raws/premier project/Adobe Premiere Pro Preview Files/maria-grn_cuts.PRV/Rendered - 21d1e4bb-d8b6-486a-8be1-6f8894228e25.mpeg +/Oral Histories/María_s1_F_20150924_gug/raws/premier project/Adobe Premiere Pro Preview Files/maria-grn_cuts.PRV/Rendered - 21d1e4bb-d8b6-486a-8be1-6f8894228e25.xmp +/Oral Histories/María_s1_F_20150924_gug/raws/premier project/Adobe Premiere Pro Preview Files/maria-grn_cuts.PRV/Rendered - a3ba1e9a-4c4c-4573-86ce-baa8b964ab71.xmp +/Oral Histories/María_s1_F_20150924_gug/raws/Premier Project/maria-grn_cuts.prproj +/Oral Histories/Marília_s1_F_20150101_por/Marília speaking Portuguese.jpg +/Oral Histories/Marília_s1_F_20150101_por/Raws/Footage/MVI_9927.MOV +/Oral Histories/Marília_s1_F_20150101_por/Raws/Footage/STE-016.wav +/Oral Histories/Marília_s1_F_20150101_por/raws/Premiere Project/Adobe Premiere Pro Auto-Save/Marília speaking Portuguese-1.prproj +/Oral Histories/Marília_s1_F_20150101_por/raws/premiere project/Adobe Premiere Pro Preview Files/Marília speaking Portuguese.PRV/Rendered - 487a131a-d9f2-43fc-9670-e8c78ec9a700.mpeg +/Oral Histories/Marília_s1_F_20150101_por/raws/premiere project/Adobe Premiere Pro Preview Files/Marília speaking Portuguese.PRV/Rendered - 487a131a-d9f2-43fc-9670-e8c78ec9a700.xmp +/Oral Histories/Marília_s1_F_20150101_por/raws/premiere project/Adobe Premiere Pro Preview Files/Marília speaking Portuguese.PRV/Rendered - 4eabd607-6d31-4503-8318-39177c037f30.mpeg +/Oral Histories/Marília_s1_F_20150101_por/raws/premiere project/Adobe Premiere Pro Preview Files/Marília speaking Portuguese.PRV/Rendered - a80a461a-ea8e-4913-85ca-169a39713bb9.mpeg +/Oral Histories/Marília_s1_F_20150101_por/raws/premiere project/Adobe Premiere Pro Preview Files/Marília speaking Portuguese.PRV/Rendered - a80a461a-ea8e-4913-85ca-169a39713bb9.xmp +/Oral Histories/Marília_s1_F_20150101_por/Raws/Premiere Project/Marília speaking Portuguese.prproj +/Oral Histories/Marília_s1_F_20150101_por/Raws/Thumbnail/Screen Shot 2016-04-08 at 13.02.02 1.png +/Oral Histories/Marília_s1_F_20150101_por/Raws/Thumbnail/Screen Shot 2016-04-08 at 13.02.02.png +/Oral Histories/Matt_s1_M_20160608_eng/raws/footage/Learn a New Language video.mov +/Oral Histories/Matt_s1_Matt_20160609_arb/Matt_s1_Matt_20160609_arb.mp4 +/Oral Histories/Matt_s1_Matt_20160609_arb/raws/footage/Arabic Video.mov +/Oral Histories/Matt_s1_Matt_20160609_arb/readme.txt +/Oral Histories/Matt_s1_Matt_20160609_cat/Matt_s1_Matt_20160609_cat.mp4 +/Oral Histories/Matt_s1_Matt_20160609_cat/raws/footage/Catalan video.mov +/Oral Histories/Matt_s1_Matt_20160609_cat/readme.txt +/Oral Histories/Matt_s1_Matt_20160609_fas/Matt_s1_Matt_20160609_fas.mp4 +/Oral Histories/Matt_s1_Matt_20160609_fas/raws/footage/Farsi video.mov +/Oral Histories/Matt_s1_Matt_20160609_fas/readme.txt +/Oral Histories/Matt_s1_Matt_20160609_fra/Matt_s1_Matt_20160609_fra.mp4 +/Oral Histories/Matt_s1_Matt_20160609_fra/raws/footage/French video.mov +/Oral Histories/Matt_s1_Matt_20160609_fra/readme.txt +/Oral Histories/Matt_s1_Matt_20160609_heb/Matt_s1_M_20160609_heb.mp4 +/Oral Histories/Matt_s1_Matt_20160609_heb/raws/footage/Hebrew video.mov +/Oral Histories/Matt_s1_Matt_20160609_heb/raws/Premier Project/Matt_s1_M_20160609_heb.prproj +/Oral Histories/Matt_s1_Matt_20160609_por/Matt_s1_Matt_20160609_por.jpg +/Oral Histories/Matt_s1_Matt_20160609_por/Matt_s1_Matt_20160609_por.mp4 +/Oral Histories/Matt_s1_Matt_20160609_por/raws/footage/Portuguese video.mov +/Oral Histories/Matt_s1_Matt_20160609_spa/Matt_s1_Matt_20160609_spa.jpg +/Oral Histories/Matt_s1_Matt_20160609_spa/Matt_s1_Matt_20160609_spa.mp4 +/Oral Histories/Matt_s1_Matt_20160609_spa/raws/footage/Spanish video.mov +/Oral Histories/Matt_s1_Matt_20160609_yid/Matt_s1_M_20160609_yid.mp4 +/Oral Histories/Matt_s1_Matt_20160609_yid/raws/footage/Yiddish video.mov +/Oral Histories/Matt_s1_Matt_20160609_yid/raws/Premier Project/Matt_s1_M_20160609_yid.prproj +/Oral Histories/Max_s2_M_20150904_fin+swe/Max_s2_M_20150904_fin+swe.mp4 +/Oral Histories/Max_s2_M_20150904_fin+swe/raws/thumbnail/Screen Shot 2016-05-17 at 18.22.57.png +/Oral Histories/Maxim_s2_M_20150904_rus+sqi/Maxim_s2_M_20150904_rus+sqi.jpg +/Oral Histories/Maxim_s2_M_20150904_rus+sqi/raws/footage/clips/Maxim - Russian and Albanian Audio Extracted.pkf +/Oral Histories/Maxim_s2_M_20150904_rus+sqi/raws/footage/clips/Maxim - Russian and Albanian Audio Extracted.wav +/Oral Histories/Maxim_s2_M_20150904_rus+sqi/raws/footage/clips/Maxim - Russian and Albanian.mp4 +/Oral Histories/Mazhar_s1_M_20160515_bug/Bugis_1.mov +/Oral Histories/Mazhar_s1_M_20160515_bug/raws/footage/clips/Bugis.mp4 +/Oral Histories/Mazhar_s1_M_20160515_bug/raws/footage/converted/Bugis_1 Audio Extracted.pkf +/Oral Histories/Mazhar_s1_M_20160515_bug/raws/footage/converted/Bugis_1.mov +/Oral Histories/Mazhar_s1_M_20160515_bug/raws/premier project/Adobe Premiere Pro Preview Files/Mazhar_s1_M_20160515_bug.PRV/Rendered - 0227cdee-5f4d-4268-a186-c9c3acfda7f4.mov +/Oral Histories/Mazhar_s1_M_20160515_bug/raws/premier project/Adobe Premiere Pro Preview Files/Mazhar_s1_M_20160515_bug.PRV/Rendered - ccb48ed9-644b-4741-9aed-d16355a55d21.mov +/Oral Histories/Miarisoa_s1_F_20160102_mlg/mariarosa.jpg +/Oral Histories/Miarisoa_s1_F_20160102_mlg/Miarisoa_s1_F_20160102_mlg.mp4 +/Oral Histories/Miarisoa_s1_F_20160102_mlg/raws/footage/Miarisoa speaking and singing in Malagasy Audio Extracted.pkf +/Oral Histories/Miarisoa_s1_F_20160102_mlg/raws/footage/Miarisoa speaking and singing in Malagasy.mov +/Oral Histories/Miarisoa_s1_F_20160102_mlg/raws/Premier Project/Miarisoa_s1_F_20160102_mlg.prproj +/Oral Histories/Miarisoa_s1_F_20160102_mlg/raws/thumbnail/Screen Shot 2016-07-01 at 14.23.25.png +/Oral Histories/Miarisoa_s1_F_20160102_mlg/raws/thumbnail/Screen Shot 2016-07-01 at 14.23.28.png +/Oral Histories/Miarisoa_s1_F_20160102_mlg/raws/thumbnail/Screen Shot 2016-07-01 at 14.23.29.png +/Oral Histories/Michael_s1_M_20130316_khm/Michael_s1_M_20130316_khm.mp4 +/Oral Histories/Michael_s1_M_20130316_khm/raws/footage/STE-039.wav +/Oral Histories/Michael_s1_M_20130316_khm/raws/Premier Project/Adobe Premiere Pro Auto-Save/khmer-michael-1.prproj +/Oral Histories/Michael_s1_M_20130316_khm/raws/Premier Project/Adobe Premiere Pro Auto-Save/khmer-michael-2.prproj +/Oral Histories/Michael_s1_M_20130316_khm/raws/premier project/Adobe Premiere Pro Preview Files/khmer-michael.PRV/b231fdeb-0b66-4ab4-90dd-ae69e2d92154+cb63d53ce20cad5a3d2df6dc 48000.pek +/Oral Histories/Michael_s1_M_20130316_khm/raws/premier project/Adobe Premiere Pro Preview Files/khmer-michael.PRV/b231fdeb-0b66-4ab4-90dd-ae69e2d92154+fda7909fe91b7a80644a043c 48000.cfa +/Oral Histories/Michael_s1_M_20130316_khm/raws/premier project/Adobe Premiere Pro Preview Files/khmer-michael.PRV/b231fdeb-0b66-4ab4-90dd-ae69e2d92154+fda7909fe91b7a80644a043c 48000.pek +/Oral Histories/Miguel_s1_M_20150324_cat/miguel-cat.mp4 +/Oral Histories/Mila_s1_F_20141016_fij/Mila_s1_F_20141016_fij.mov +/Oral Histories/Miriam_s3_F_20150414_eng+swa+luo/Miriam_s3_F_20150414_eng+swa+luo.mp4 +/Oral Histories/Miriam_s3_F_20150414_eng+swa+luo/raws/Premier Project/Adobe Premiere Pro Auto-Save/miriam-1.prproj +/Oral Histories/Miriam_s3_F_20150414_eng+swa+luo/raws/premier project/Adobe Premiere Pro Preview Files/miriam.PRV/Rendered - 71f5c77b-671e-4035-a7af-5eea86804385.mpeg +/Oral Histories/Miriam_s3_F_20150414_eng+swa+luo/raws/premier project/Adobe Premiere Pro Preview Files/miriam.PRV/Rendered - 71f5c77b-671e-4035-a7af-5eea86804385.xmp +/Oral Histories/Miriam_s3_F_20150414_eng+swa+luo/raws/premier project/Adobe Premiere Pro Preview Files/miriam.PRV/Rendered - d9f95696-94f3-4bd8-bee5-5469e70afcc2.xmp +/Oral Histories/Mohammad_s1_M_20160721_bqi/Mohammad_s1_M_20160721_bqi.jpg +/Oral Histories/Mohammad_s1_M_20160721_bqi/Mohammad_s1_M_20160721_bqi.mp4 +/Oral Histories/Mohammad_s1_M_20160721_bqi/raws/footage/clips/00035.MTS +/Oral Histories/Mohammad_s1_M_20160721_bqi/raws/footage/converted/00035.mov +/Oral Histories/Mohammad_s1_M_20160721_bqi/raws/Premier Project/Mohammad_s1_M_20160721_bqi.prproj +/Oral Histories/Mounir_s1_M_20160721_aeb/Mounir_s1_M_20160721_aeb.mp4 +/Oral Histories/Mounir_s1_M_20160721_aeb/Mounir_s1_M_20160721_aeb.pdf +/Oral Histories/Mounir_s1_M_20160721_aeb/raws/footage/clips/Munir Speaking Tunisian Arabic.MTS +/Oral Histories/Mounir_s1_M_20160721_aeb/raws/footage/converted/Munir Speaking Tunisian Arabic Audio Extracted.wav +/Oral Histories/Mounir_s1_M_20160721_aeb/raws/footage/converted/Munir Speaking Tunisian Arabic.mov +/Oral Histories/Muhned_s1_M_20150221_jbn/Muhned_s1_M_20150221_jbn.mp4 +/Oral Histories/Namrata_s1_F_20160717_nep/raws/footage/clips/MVI_0164.MOV +/Oral Histories/Naoki_s4_M_20161227_ryu+myv+xal+prg/raws/footage/clips/Erzya Self Introduction.mov +/Oral Histories/Naoki_s4_M_20161227_ryu+myv+xal+prg/raws/footage/clips/Kalmyk Self Introduction.mov +/Oral Histories/Naoki_s4_M_20161227_ryu+myv+xal+prg/raws/footage/clips/Prussian Self-Introduction.mov +/Oral Histories/Nat_s1_M_20161101_yua/raws/footage/clips/videoplayback.mp4 +/Oral Histories/Natalia_s1_F_20161107_rmc/Natalia_s1_F_20161107_rmc.jpg +/Oral Histories/Natalia_s1_F_20161107_rmc/raws/footage/clips/Natalia_s1_F_20161107_rmc.mp4 +/Oral Histories/Natalia_s1_F_20161107_rmc/raws/Premiere pro/Natalia_s1_F_20161107_rmc.prproj +/Oral Histories/Natalia_s1_F_20161107_rmc/raws/thumbnails/Screen Shot 2016-12-17 at 13.03.22.png +/Oral Histories/Natalia_s1_F_20161114_rmc/raws/footage/clips/Natalia_s1_F_20161114_rmc.mp4 +/Oral Histories/Natalia_s1_F_20161114_rmc/readme.txt +/Oral Histories/Navas_s1_M_20160925_-byu/Navas_s1_M_20160925_-byu.jpg +/Oral Histories/Navas_s1_M_20160925_-byu/raws/footage/clips/BYARI LANGUAGE Audio Extracted.pkf +/Oral Histories/Navas_s1_M_20160925_-byu/raws/footage/clips/BYARI LANGUAGE Audio Extracted.wav +/Oral Histories/Navas_s1_M_20160925_-byu/raws/footage/clips/BYARI LANGUAGE.mp4 +/Oral Histories/Navas_s1_M_20160925_-byu/raws/thumbnail/Screen Shot 2016-11-29 at 19.21.52.png +/Oral Histories/Navas_s1_M_20160925_-byu/unnamed (1).jpg +/Oral Histories/Navas_s1_M_20160925_-byu/unnamed.jpg +/Oral Histories/Nir_s2_M_20160502_heb+rus/Nir_s2_M_20160502_heb+rus.jpg +/Oral Histories/Nir_s2_M_20160502_heb+rus/Nir_s2_M_20160502_heb+rus.mp4 +/Oral Histories/Nir_s2_M_20160502_heb+rus/raws/footage/MVI_9240 HEBREW Audio Extracted.pkf +/Oral Histories/Nir_s2_M_20160502_heb+rus/raws/footage/MVI_9240 HEBREW.MOV +/Oral Histories/Nir_s2_M_20160502_heb+rus/raws/footage/MVI_9241 RUSSIAN Audio Extracted.pkf +/Oral Histories/Nir_s2_M_20160502_heb+rus/raws/footage/MVI_9241 RUSSIAN Audio Extracted.wav +/Oral Histories/Nir_s2_M_20160502_heb+rus/raws/Premier Project/Nir_s2_M_20160502_heb+rus.prproj +/Oral Histories/Nir_s2_M_20160502_heb+rus/raws/thumbnail/Screen Shot 2016-12-19 at 09.34.45.png +/Oral Histories/Noah_s2_M_20160610_eng+gle/Noah_s2_M_20160610_eng+gle.jpg +/Oral Histories/Noah_s2_M_20160610_eng+gle/raws/footage/NoahSpeakingIrishAndEnglish Audio Extracted.wav +/Oral Histories/Noah_s2_M_20160610_eng+gle/raws/footage/NoahSpeakingIrishAndEnglish.mp4 +/Oral Histories/Noah_s2_M_20160610_eng+gle/raws/Premier Project/Noah_s2_M_20160610_eng+gle.prproj +/Oral Histories/Omar_s2_M_20140323_eng+jam/Omar_s2_M_20140323_eng+jam.mp4 +/Oral Histories/Omar_s2_M_20140323_eng+jam/raws/footage/MVI_9532.MOV +/Oral Histories/Omar_s2_M_20140323_eng+jam/raws/footage/STE-026.wav +/Oral Histories/Opoka_s1_M_20150424_ach/opoka-ach.mp4 +/Oral Histories/Opoka_s1_M_20150424_ach/raws/footage/ACHOLI LANGUAGE FROM UGANDA .MOV +/Oral Histories/Opoka_s1_M_20150424_ach/raws/Premier Project/ACHOLI LANGUAGE FROM UGANDA Audio Extracted.pkf +/Oral Histories/Opoka_s1_M_20150424_ach/raws/premier project/Adobe Premiere Pro Preview Files/opoka-ach.PRV/Rendered - 5b335ad9-9d47-45a8-93e4-279eea27a397.xmp +/Oral Histories/Opoka_s1_M_20150424_ach/raws/premier project/Adobe Premiere Pro Preview Files/opoka-ach.PRV/Rendered - 83132319-113e-4fcb-aacb-ba4f7eb94bce.xmp +/Oral Histories/Opoka_s1_M_20150424_ach/raws/premier project/Adobe Premiere Pro Preview Files/opoka-ach.PRV/Rendered - a58bdb8f-863d-4539-99c1-8fc13d6a81ad.xmp +/Oral Histories/Pablo_s1_M_20160107_cab/pablo-cab.mp4 +/Oral Histories/Pablo_s1_M_20160107_cab/Pablo_s1_M_20160107_cab.jpg +/Oral Histories/Pablo_s1_M_20160107_cab/raws/footage/MVI_0036.MOV +/Oral Histories/Pablo_s1_M_20160107_cab/raws/footage/MVI_0038.MOV +/Oral Histories/Pablo_s1_M_20160107_cab/raws/footage/MVI_0039.MOV +/Oral Histories/Pablo_s1_M_20160107_cab/raws/footage/STE-000.wav +/Oral Histories/Pablo_s1_M_20160107_cab/raws/Premier Project/Adobe Premiere Pro Auto-Save/cap-pablo-1.prproj +/Oral Histories/Pablo_s1_M_20160107_cab/raws/Premier Project/Adobe Premiere Pro Auto-Save/cap-pablo-2.prproj +/Oral Histories/Pablo_s1_M_20160107_cab/raws/Premier Project/Adobe Premiere Pro Auto-Save/cap-pablo-3.prproj +/Oral Histories/Pablo_s1_M_20160107_cab/raws/premier project/Adobe Premiere Pro Preview Files/cap-pablo.PRV/Rendered - 2bc6b0f5-2ab6-4160-af84-b45d92b1669e.xmp +/Oral Histories/Pablo_s1_M_20160107_cab/raws/premier project/Adobe Premiere Pro Preview Files/cap-pablo.PRV/Rendered - 39b705b9-cd93-4f16-910b-d52a40964bd3.mpeg +/Oral Histories/Pablo_s1_M_20160107_cab/raws/premier project/Adobe Premiere Pro Preview Files/cap-pablo.PRV/Rendered - 39b705b9-cd93-4f16-910b-d52a40964bd3.xmp +/Oral Histories/Pablo_s1_M_20160107_cab/raws/premier project/Adobe Premiere Pro Preview Files/cap-pablo.PRV/Rendered - 572601ba-9237-4ecd-8653-446e729c763c.xmp +/Oral Histories/Pablo_s1_M_20160107_cab/raws/premier project/Adobe Premiere Pro Preview Files/cap-pablo.PRV/Rendered - 65f2f6d3-5cb7-4dde-8d69-fb9f546eb1e8.mpeg +/Oral Histories/Pablo_s1_M_20160107_cab/raws/premier project/Adobe Premiere Pro Preview Files/cap-pablo.PRV/Rendered - 65f2f6d3-5cb7-4dde-8d69-fb9f546eb1e8.xmp +/Oral Histories/Pablo_s1_M_20160107_cab/raws/premier project/Adobe Premiere Pro Preview Files/cap-pablo.PRV/Rendered - a56a71cf-b420-49c3-8198-edb324228533.xmp +/Oral Histories/Pablo_s1_M_20160107_cab/raws/premier project/Adobe Premiere Pro Preview Files/cap-pablo.PRV/Rendered - ba29fc96-9672-442b-9e85-564f6876270e.mpeg +/Oral Histories/Pablo_s1_M_20160107_cab/raws/premier project/Adobe Premiere Pro Preview Files/cap-pablo.PRV/Rendered - ba29fc96-9672-442b-9e85-564f6876270e.xmp +/Oral Histories/Pablo_s1_M_20160107_cab/raws/premier project/Adobe Premiere Pro Preview Files/cap-pablo.PRV/Rendered - bf0c976b-8efa-452a-b0af-1037c4c15475.xmp +/Oral Histories/Pablo_s1_M_20160107_cab/raws/premier project/Adobe Premiere Pro Preview Files/cap-pablo.PRV/Rendered - c62c202b-cca1-4451-88a1-a0070a703a2d.mpeg +/Oral Histories/Pablo_s1_M_20160107_cab/raws/premier project/Adobe Premiere Pro Preview Files/cap-pablo.PRV/Rendered - c62c202b-cca1-4451-88a1-a0070a703a2d.xmp +/Oral Histories/Pablo_s1_M_20160107_cab/raws/premier project/Adobe Premiere Pro Preview Files/cap-pablo.PRV/Rendered - d2459bea-4eee-4506-b6df-134fd027fbd5.xmp +/Oral Histories/Pablo_s1_M_20160107_cab/raws/premier project/Adobe Premiere Pro Preview Files/cap-pablo.PRV/Rendered - d6f2bc3d-b1bb-4232-8943-77c4f5a7ebed.mpeg +/Oral Histories/Pablo_s1_M_20160107_cab/raws/premier project/Adobe Premiere Pro Preview Files/cap-pablo.PRV/Rendered - d6f2bc3d-b1bb-4232-8943-77c4f5a7ebed.xmp +/Oral Histories/Pablo_s1_M_20160107_cab/raws/thumbnail/pablo-cab-thumb-raw.png +/Oral Histories/Paivi_s1_F_20131201_fin/raws/footage/clips/STE-003.wav +/Oral Histories/Paivi_s1_F_20131201_fin/raws/footage/clips/STE-004.wav +/Oral Histories/Paivi_s1_F_20131201_fin/raws/footage/clips/STE-006.wav +/Oral Histories/Paivi_s1_F_20131201_fin/raws/footage/clips/STE-007.wav +/Oral Histories/Paul_s1_M_20141028_llu/Paul_s1_M_20141028_llu.mov +/Oral Histories/Paul_s1_M_20160608_-gbc/Paul_s1_M_20160608_-gbc.mp4 +/Oral Histories/Paul_s1_M_20160608_-gbc/raws/footage/clips/P. Molac.wmv +/Oral Histories/Paul_s1_M_20160608_-gbc/raws/footage/converted/P. Molac.mp4 Audio Extracted.pkf +/Oral Histories/Paul_s1_M_20160608_-gbc/raws/footage/converted/P. Molac.mp4.mp4 +/Oral Histories/Paul_s1_M_20160608_-gbc/raws/Premier Project/Paul_s1_M_20160608_-gbc.prproj +/Oral Histories/Paul_s1_M_20160608_-gbc/raws/thumbnail/Screen Shot 2016-08-19 at 13.05.43.png +/Oral Histories/Paul_s1_M_20160608_-gbc/raws/thumbnail/Screen Shot 2016-08-19 at 13.06.02.png +/Oral Histories/Paul_s1_M_20160608_-gbc/raws/thumbnail/Screen Shot 2016-08-19 at 13.06.04.png +/Oral Histories/Paul_s1_M_20160608_-gbc/raws/thumbnail/Screen Shot 2016-08-19 at 13.06.05.png +/Oral Histories/Paul_s1_M_20160608_-gbc/raws/thumbnail/Screen Shot 2016-08-19 at 13.06.08.png +/Oral Histories/Phunjo_s1_F_20160717_xsr/raws/footage/audio/STE-009.wav +/Oral Histories/Phunjo_s1_F_20160717_xsr/raws/footage/clips/MVI_0169.MOV +/Oral Histories/Pietro_s1_M_20140524_lmo/Pietro_s1_M_20140524_lmo.mp4 +/Oral Histories/Pietro_s1_M_20140524_lmo/raws/footage/Filmato del 24-05-14 alle 11.31.mov +/Oral Histories/Pietro_s1_M_20140524_lmo/raws/Premier Project/pietro-1_1.prproj +/Oral Histories/Presi_s1_F_20140316_ceb/raws/footage/clips/MVI_9410.MOV +/Oral Histories/Presi_s1_F_20140316_ceb/raws/footage/clips/MVI_9411.MOV +/Oral Histories/Presi_s1_F_20140316_ceb/raws/footage/clips/MVI_9412.MOV +/Oral Histories/Priscilla_s1_F_20140604_llp/Priscilla_s1_F_20140604_llp.mp4 +/Oral Histories/Rachal_s1_F_20131201_yue/Rachal_s1_F_20131201_yue.mp4 +/Oral Histories/Rachal_s1_F_20131201_yue/raws/footage/MVI_9981.MOV +/Oral Histories/Rachal_s1_F_20131201_yue/raws/footage/STE-018.wav +/Oral Histories/Ram_s4_M_20160415_taj/Ram_s4_M_20160415_taj.jpg +/Oral Histories/Ram_s4_M_20160415_taj/Ram_s4_M_20160415_taj.mp4 +/Oral Histories/Ram_s4_M_20160415_taj/raws/footage/MOV_3346.MOV Audio Extracted.wav +/Oral Histories/Ram_s4_M_20160415_taj/raws/footage/MOV_3346.MOV.mov +/Oral Histories/Ram_s4_M_20160415_taj/raws/Premier Project/Adobe Premiere Pro Auto-Save/Ram_s4_M_20160415_taj+tgd+tmk+tge-1.prproj +/Oral Histories/Ram_s4_M_20160415_taj/raws/thumbnail/Screen Shot 2016-05-13 at 13.52.39.png +/Oral Histories/Randeep_s1_M_20160419_pan/Randeep_s1_M_20160419_pan.jpg +/Oral Histories/Randeep_s1_M_20160419_pan/Randeep_s1_M_20160419_pan.mp4 +/Oral Histories/Randeep_s1_M_20160419_pan/raws/footage/Randeep Singh speaking Powadhi dialect of Punjabi Audio Extracted.pkf +/Oral Histories/Randeep_s1_M_20160419_pan/raws/footage/Randeep Singh speaking Powadhi dialect of Punjabi Audio Extracted.wav +/Oral Histories/Randeep_s1_M_20160419_pan/raws/footage/Randeep Singh speaking Powadhi dialect of Punjabi.MOV +/Oral Histories/Randeep_s1_M_20160419_pan/raws/thumbnail/Screen Shot 2016-04-30 at 14.30.10.png +/Oral Histories/Randeep_s1_M_20160419_pan/raws/thumbnail/Screen Shot 2016-04-30 at 14.30.39.png +/Oral Histories/Raphael_s1_M_20160721_aka/Raphael_s1_M_20160721_aka.jpg +/Oral Histories/Raphael_s1_M_20160721_aka/Raphael_s1_M_20160721_aka.pdf +/Oral Histories/Raphael_s1_M_20160721_aka/raws/footage/clips/Raphael speaking Twi.MTS +/Oral Histories/Raphael_s1_M_20160721_aka/raws/footage/converted/Raphael speaking Twi.mov +/Oral Histories/Raphael_s1_M_20160721_aka/raws/Premier Project/Raphael_s1_M_20160721_aka.prproj +/Oral Histories/Raphael_s1_M_20160721_aka/raws/thumbnail/Raphael_s1_M_20160721_aka.png +/Oral Histories/Ratulevu_s1_M_20150530_fij/Ratulevu_s1_M_20150530_fij.mov +/Oral Histories/Recep_s1_M_20150606_tur/raws/premier project/Adobe Premiere Pro Preview Files/recep.PRV/Rendered - 2ffb31b3-b2c9-433f-82ec-4ee82dff8654.mpeg +/Oral Histories/Recep_s1_M_20150606_tur/raws/premier project/Adobe Premiere Pro Preview Files/recep.PRV/Rendered - 2ffb31b3-b2c9-433f-82ec-4ee82dff8654.xmp +/Oral Histories/Recep_s1_M_20150606_tur/raws/premier project/Adobe Premiere Pro Preview Files/recep.PRV/Rendered - 68b08cbf-c502-465e-aaa2-289bf38a2621.xmp +/Oral Histories/Recep_s1_M_20150606_tur/raws/premier project/Adobe Premiere Pro Preview Files/recep.PRV/Rendered - de1750d9-4185-4adb-a383-366cd3954557.xmp +/Oral Histories/Recep_s1_M_20150606_tur/raws/Premier Project/Recep speaking Turkish Audio Extracted.pkf +/Oral Histories/Recep_s1_M_20150606_tur/raws/Premier Project/Recep speaking Turkish Audio Extracted.wav +/Oral Histories/Recep_s1_M_20150606_tur/recep-tur.mp4 +/Oral Histories/Regina_s1_F_20130202_spa/Regina_s1_F_20130202_spa.mp4 +/Oral Histories/Rose_s1_F_20160722_hat/raws/footage/clips/Rose Audio Extracted.pkf +/Oral Histories/Rose_s1_F_20160722_hat/raws/footage/clips/Rose.mov +/Oral Histories/Rose_s1_F_20160722_hat/raws/Premiere project/Rose_s1_F_20160722_hat.prproj +/Oral Histories/Rose_s1_F_20160722_hat/raws/thumbnails/Screen Shot 2016-09-15 at 12.53.26.png +/Oral Histories/Rose_s1_F_20160722_hat/raws/thumbnails/Screen Shot 2016-09-15 at 12.53.48.png +/Oral Histories/Rose_s1_F_20160722_hat/readme.txt +/Oral Histories/Rose_s1_F_20160722_hat/Rose_s1_F_20160722_hat.jpg +/Oral Histories/Rosemary_s1_F_20150113_gla/raws/footage/MVI_9448.MOV +/Oral Histories/Rosemary_s1_F_20150113_gla/raws/footage/MVI_9449.MOV +/Oral Histories/Rosemary_s1_F_20150113_gla/raws/footage/STE-033.wav +/Oral Histories/Rosemary_s1_F_20150113_gla/raws/Premier Project/Adobe Premiere Pro Auto-Save/gaildhig-rosemary-1.prproj +/Oral Histories/Rosemary_s1_F_20150113_gla/raws/premier project/Adobe Premiere Pro Preview Files/gaildhig-rosemary.PRV/Rendered - 65c85293-6b01-4358-8d14-773e1c2a0dae.xmp +/Oral Histories/Rosemary_s1_F_20150113_gla/raws/premier project/Adobe Premiere Pro Preview Files/gaildhig-rosemary.PRV/Rendered - a5ebe4d1-4517-49b3-90e8-4d0f01758025.mpeg +/Oral Histories/Rosemary_s1_F_20150113_gla/raws/premier project/Adobe Premiere Pro Preview Files/gaildhig-rosemary.PRV/Rendered - bf135568-52a4-47f6-ae1a-e939b7920e6a.xmp +/Oral Histories/Rosemary_s1_F_20150113_gla/raws/Premier Project/Rosemary_s1_F_20150113_gla.prproj +/Oral Histories/Rosemary_s1_F_20150113_gla/Rosemary_s1_F_20150113_gla.mp4 +/Oral Histories/Sam_s1_M_20130705_frc/raws/footage/MVI_0169.MOV +/Oral Histories/Sam_s1_M_20130705_frc/raws/footage/STE-001.wav +/Oral Histories/Sam_s1_M_20130705_frc/raws/Premier Project/louisiana-french-sam.prproj +/Oral Histories/Sam_s1_M_20130705_frc/raws/thumbnail/Screen Shot 2016-06-14 at 14.13.12 2.png +/Oral Histories/Sam_s1_M_20130705_frc/raws/thumbnail/Screen Shot 2016-06-14 at 14.13.13 1.png +/Oral Histories/Sam_s1_M_20130705_frc/raws/thumbnail/Screen Shot 2016-06-14 at 14.13.13.png +/Oral Histories/Sam_s1_M_20130705_frc/Sam_s1_M_20130705_frc.mp4 +/Oral Histories/Sandra_s1_F_20150526_cym/raws/footage/MVI_9456.MOV +/Oral Histories/Sandra_s1_F_20150526_cym/raws/footage/STE-040.wav +/Oral Histories/Sandra_s1_F_20150526_cym/raws/premier project/Adobe Premiere Pro Preview Files/welsh-sandra.PRV/Rendered - b4213722-90d6-4ba6-9143-f1c8853724ab.xmp +/Oral Histories/Sandra_s1_F_20150526_cym/raws/premier project/Adobe Premiere Pro Preview Files/welsh-sandra.PRV/Rendered - cb6ac1b1-a026-41b1-ba9a-c51fcdbc830f.mpeg +/Oral Histories/Sandra_s1_F_20150526_cym/raws/premier project/Adobe Premiere Pro Preview Files/welsh-sandra.PRV/Rendered - cb6ac1b1-a026-41b1-ba9a-c51fcdbc830f.xmp +/Oral Histories/Sandra_s1_F_20150526_cym/sandra-cym.mp4 +/Oral Histories/Sandra_s2_F_20160802_gyn+eng/raws/footage/clips/Sandra.mov +/Oral Histories/Sandra_s2_F_20160802_gyn+eng/raws/Premire project/Sandra_s2_F_20160802_gyn+eng.prproj +/Oral Histories/Sandra_s2_F_20160802_gyn+eng/raws/thumbnails/Screen Shot 2016-10-06 at 15.36.18.png +/Oral Histories/Sandra_s2_F_20160802_gyn+eng/raws/thumbnails/Screen Shot 2016-10-06 at 15.36.21.png +/Oral Histories/Sandra_s2_F_20160802_gyn+eng/readme.txt +/Oral Histories/Sandra_s2_F_20160802_gyn+eng/Sandra_s2_F_20160802_gyn+eng.mp4 +/Oral Histories/Sanjib_s1_M_20151001_thq/raws/footage/MVI_0091.MOV +/Oral Histories/Sanjib_s1_M_20151001_thq/raws/footage/STE-030.wav +/Oral Histories/Sanjib_s1_M_20151001_thq/raws/premier project/Adobe Premiere Pro Preview Files/Sanjib - Tharu.PRV/Rendered - 0999711e-0137-447c-ae37-64cabde31c61.mpeg +/Oral Histories/Sanjib_s1_M_20151001_thq/raws/premier project/Adobe Premiere Pro Preview Files/Sanjib - Tharu.PRV/Rendered - 0999711e-0137-447c-ae37-64cabde31c61.xmp +/Oral Histories/Sanjib_s1_M_20151001_thq/raws/premier project/Adobe Premiere Pro Preview Files/Sanjib - Tharu.PRV/Rendered - 517bcf9c-3b35-4fe3-8251-a236185c71e5.mpeg +/Oral Histories/Sanjib_s1_M_20151001_thq/raws/premier project/Adobe Premiere Pro Preview Files/Sanjib - Tharu.PRV/Rendered - e32e8be3-5c67-4829-84ed-3aa84df3ad2f.mpeg +/Oral Histories/Sanjib_s1_M_20151001_thq/raws/premier project/Adobe Premiere Pro Preview Files/Sanjib - Tharu.PRV/Rendered - e32e8be3-5c67-4829-84ed-3aa84df3ad2f.xmp +/Oral Histories/Sanjib_s1_M_20151001_thq/raws/Premier Project/Sanjib - Tharu.prproj +/Oral Histories/Sanjib_s1_M_20151001_thq/raws/Premier Project/STE-030 Audio Extracted.wav +/Oral Histories/Sanjib_s1_M_20151001_thq/Sanjib_s1_M_20151001_thq.mp4 +/Oral Histories/Sanjoy_s1_M_20160101_ben/raws/footage/P1010002 Audio Extracted Audio Extracted.pkf +/Oral Histories/Sanjoy_s1_M_20160101_ben/raws/footage/P1010002 Audio Extracted.pkf +/Oral Histories/Sanjoy_s1_M_20160101_ben/raws/footage/P1010002 Audio Extracted.wav +/Oral Histories/Sanjoy_s1_M_20160101_ben/raws/footage/P1010002.MOV +/Oral Histories/Sanjoy_s1_M_20160101_ben/raws/thumbnail/Screen Shot 2016-05-13 at 12.09.10.png +/Oral Histories/Sanjoy_s1_M_20160101_ben/Sanjoy_s1_M_20160101_ben.jpg +/Oral Histories/Sanjoy_s1_M_20160101_ben/Sanjoy_s1_M_20160101_ben.mp4 +/Oral Histories/Scarlett_s1_F_20131103_urd/raws/footage/STE-020.wav +/Oral Histories/Scarlett_s1_F_20131103_urd/raws/footage/STE-021.wav +/Oral Histories/Scarlett_s1_F_20131103_urd/raws/thumbnail/LzHCqWvxTXGZtUr3epW1_scarlet.png +/Oral Histories/Scarlett_s1_F_20131103_urd/Scarlett_s1_F_20131103_urd.mp4 +/Oral Histories/Sedday_s3_M_20150217_swa+som+eng/raws/footage/clips/MVI_8380.MOV +/Oral Histories/Sedday_s3_M_20150217_swa+som+eng/raws/footage/clips/STE-074.wav +/Oral Histories/Sedday_s3_M_20150217_swa+som+eng/raws/footage/clips/STE-076.wav +/Oral Histories/Semere_s1_M_20160815_amh/raws/footage/clips/Semere.mov +/Oral Histories/Sidra_s2_F_20140422_urd+nor/Sidra_s2_F_20140422_urd+nor.mp4 +/Oral Histories/Simon_s1_M_20160715_eng/raws/footage/clips/Cumbrian Audio Extracted.pkf +/Oral Histories/Simon_s1_M_20160715_eng/raws/footage/clips/Cumbrian Audio Extracted.wav +/Oral Histories/Simon_s1_M_20160715_eng/raws/footage/clips/Cumbrian.mpg +/Oral Histories/Simon_s1_M_20160715_eng/Simon_s1_M_20160715_eng.mp4 +/Oral Histories/Soner_s1_M_20151119_lzz/raws/footage/soner-laz.mp4 +/Oral Histories/Soner_s1_M_20151119_lzz/raws/Premier Project/soner-laz Audio Extracted.pkf +/Oral Histories/Soner_s1_M_20151119_lzz/raws/Premier Project/soner-lzz.prproj +/Oral Histories/Soner_s1_M_20151119_lzz/raws/thumbnail/soner-llz-thumb-raw.png +/Oral Histories/Soner_s1_M_20151119_lzz/Soner_s1_M_20151119_lzz.jpg +/Oral Histories/Stefano_s1_M_20150904_aae/Stefano - Arbëresh.mp4 +/Oral Histories/Stefano_s1_M_20150904_aae/Stefano speaking Arbëresh.jpg +/Oral Histories/Sunny_s1_M_20130218_nan/Sunny_s1_M_20130218_nan.mp4 +/Oral Histories/Suri_s1_F_20161110_yid/raws/footage/clips/Suri speaking Yiddish Audio Extracted.wav +/Oral Histories/Suri_s1_F_20161110_yid/raws/footage/clips/Suri speaking Yiddish.mp4 +/Oral Histories/Suri_s1_F_20161110_yid/raws/Premier Project/Suri_s1_F_20161110_yid.prproj +/Oral Histories/Suri_s1_F_20161110_yid/Suri_s1_F_20161110_yid.jpg +/Oral Histories/Suri_s1_F_20161110_yid/Suri_s1_F_20161110_yid.mp4 +/Oral Histories/Sònia_s1_F_20140327_oci/raws/footage/MVI_8391.MOV +/Oral Histories/Sònia_s1_F_20140327_oci/raws/footage/STE-084.wav +/Oral Histories/Sònia_s1_F_20140327_oci/raws/footage/STE-085.wav +/Oral Histories/Sònia_s1_F_20140327_oci/Sònia_s1_F_20140327_oci.mp4 +/Oral Histories/Tenzin_s1_F_20160717_bod/raws/footage/audio/STE-005.wav +/Oral Histories/Tenzin_s1_F_20160717_bod/raws/footage/clips/MVI_0165.MOV +/Oral Histories/Tereza_s1_F_20160825_hun/raws/footage/clips/MVI_7182.MOV +/Oral Histories/Tetree_s2_F_20160802_gyn+eng/raws/footage/clips/Tetree Audio Extracted.wav +/Oral Histories/Tetree_s2_F_20160802_gyn+eng/raws/footage/clips/Tetree.mov +/Oral Histories/Tetree_s2_F_20160802_gyn+eng/raws/Premiere project/Tetree_s2_F_20160802_gyn+eng.prproj +/Oral Histories/Tetree_s2_F_20160802_gyn+eng/readme.txt +/Oral Histories/Tetree_s2_F_20160802_gyn+eng/Tetree_s2_F_20160802_gyn+eng.jpg +/Oral Histories/Tetree_s2_F_20160802_gyn+eng/Tetree_s2_F_20160802_gyn+eng.mp4 +/Oral Histories/Thadoe_s1_M_20160805_mya/raws/Premiere project/Thadoe_s1_M_20160805_mya.prproj +/Oral Histories/Thadoe_s1_M_20160805_mya/readme.txt +/Oral Histories/Thadoe_s1_M_20160805_mya/Thadoe_s1_M_20160805_mya.mp4 +/Oral Histories/Thong_s1_M_20150708_tts/raws/footage/MVI_9414.MOV +/Oral Histories/Thong_s1_M_20150708_tts/raws/Premier Project/Adobe Premiere Pro Auto-Save/isan-thong-1.prproj +/Oral Histories/Thong_s1_M_20150708_tts/raws/Premier Project/Adobe Premiere Pro Auto-Save/isan-thong-2.prproj +/Oral Histories/Thong_s1_M_20150708_tts/raws/premier project/Adobe Premiere Pro Preview Files/isan-thong.PRV/ee298972-fa26-4c02-b6d6-e2fd39d422be+5a68598a6eba7b219159efd7 48000.cfa +/Oral Histories/Thong_s1_M_20150708_tts/raws/premier project/Adobe Premiere Pro Preview Files/isan-thong.PRV/ee298972-fa26-4c02-b6d6-e2fd39d422be+5a68598a6eba7b219159efd7 48000.pek +/Oral Histories/Thong_s1_M_20150708_tts/raws/premier project/Adobe Premiere Pro Preview Files/isan-thong.PRV/Rendered - 18c3ccbe-978d-4125-8272-88b0e98d84a2.mpeg +/Oral Histories/Thong_s1_M_20150708_tts/raws/premier project/Adobe Premiere Pro Preview Files/isan-thong.PRV/Rendered - 2b718d4f-3781-4ac2-a901-f4282457f031.mpeg +/Oral Histories/Thong_s1_M_20150708_tts/raws/premier project/Adobe Premiere Pro Preview Files/isan-thong.PRV/Rendered - 300b84eb-29af-495d-bfbf-858a114952d4.mpeg +/Oral Histories/Thong_s1_M_20150708_tts/raws/premier project/Adobe Premiere Pro Preview Files/isan-thong.PRV/Rendered - 300b84eb-29af-495d-bfbf-858a114952d4.xmp +/Oral Histories/Thong_s1_M_20150708_tts/raws/premier project/Adobe Premiere Pro Preview Files/isan-thong.PRV/Rendered - 483db531-421b-49a8-ab75-cdda1e69bfe3.xmp +/Oral Histories/Thong_s1_M_20150708_tts/raws/Premier Project/isan-thong.prproj +/Oral Histories/Thong_s1_M_20150708_tts/thong-tts.mp4 +/Oral Histories/Thressia Tamelan_s1_F_20151201_row/Thressia Tamelan_s1_F_20151201_row.jpg +/Oral Histories/Thressia Tamelan_s1_F_20151201_row/Thressia Tamelan_s1_F_20151201_row.mp4 +/Oral Histories/Tiger_s1_M_20140826_tso/Tiger_s1_M_20140826_tso.mp4 +/Oral Histories/Titus_s1_M_20151026_lat/raws/footage/titus-lat-raw.mp4 +/Oral Histories/Titus_s1_M_20151026_lat/raws/Premier Project/Adobe Premiere Pro Auto-Save/titus-lat-1.prproj +/Oral Histories/Titus_s1_M_20151026_lat/raws/premier project/Adobe Premiere Pro Preview Files/titus-lat.PRV/Rendered - 315ed945-894b-4931-9565-650129f2fb1f.mpeg +/Oral Histories/Titus_s1_M_20151026_lat/raws/Premier Project/titus-lat-raw Audio Extracted.pkf +/Oral Histories/Titus_s1_M_20151026_lat/raws/Premier Project/titus-lat-raw Audio Extracted.wav +/Oral Histories/Titus_s1_M_20151026_lat/raws/Premier Project/titus-lat.prproj +/Oral Histories/Titus_s1_M_20151026_lat/Titus_s1_M_20151026_lat.jpg +/Oral Histories/Titus_s1_M_20151026_lat/Titus_s1_M_20151026_lat.mp4 +/Oral Histories/Tony_s1_M_20150506_epo/tony-epo.mp4 +/Oral Histories/Tory_s1_M_20160606_acf/raws/footage/MVI_0138_1.mov +/Oral Histories/Tory_s1_M_20160606_acf/raws/footage/STE-009.wav +/Oral Histories/Tory_s1_M_20160606_acf/raws/Premier Project/Adobe Premiere Pro Auto-Save/Azariah_s1_F_20160102_spa-1.prproj +/Oral Histories/Tory_s1_M_20160606_acf/raws/Premier Project/Tory_s1_M_20160606_gcf.prproj +/Oral Histories/Tory_s1_M_20160606_acf/raws/thumbnail/Screen Shot 2016-07-27 at 14.27.25.png +/Oral Histories/Tory_s1_M_20160606_acf/Tory_s1_M_20160606_gcf.jpg +/Oral Histories/Toukala_s1_F_20141111_bis/Toukala_s1_F_20141111_bis.mov +/Oral Histories/Valentine_s1_M_20160713_ibo/raws/footage/Video Jun 30, 21 00 35.mov +/Oral Histories/Valentine_s1_M_20160713_ibo/raws/Premier Project/Valentine_s1_M_20160713_ibo.prproj +/Oral Histories/Valentine_s1_M_20160713_ibo/raws/thumbnail/Screen Shot 2016-09-09 at 12.50.38.png +/Oral Histories/Valentine_s1_M_20160713_ibo/raws/thumbnail/Screen Shot 2016-09-09 at 12.50.42.png +/Oral Histories/Valentine_s1_M_20160713_ibo/raws/thumbnail/Screen Shot 2016-09-09 at 12.50.44.png +/Oral Histories/Valentine_s1_M_20160713_ibo/raws/thumbnail/Screen Shot 2016-09-09 at 12.50.58.png +/Oral Histories/Valentine_s1_M_20160713_ibo/raws/thumbnail/Screen Shot 2016-09-09 at 12.51.07.png +/Oral Histories/Valentine_s1_M_20160713_ibo/raws/thumbnail/Screen Shot 2016-09-09 at 12.51.13.png +/Oral Histories/Valentine_s1_M_20160713_ibo/Valentine_s1_M_20160713_ibo.mp4 +/Oral Histories/Valentine_s1_M_20160713_ibo/Valentine_s1_M_20160713_ibo.png +/Oral Histories/Venecia_s2_F_20160526_jam+eng/raws/footage/MVI_0135.MOV +/Oral Histories/Venecia_s2_F_20160526_jam+eng/raws/footage/MVI_0136_1.mov +/Oral Histories/Venecia_s2_F_20160526_jam+eng/raws/footage/MVI_0137.MOV +/Oral Histories/Venecia_s2_F_20160526_jam+eng/raws/footage/MVI_0137_1.mov +/Oral Histories/Venecia_s2_F_20160526_jam+eng/raws/footage/STE-007.wav +/Oral Histories/Venecia_s2_F_20160526_jam+eng/raws/footage/STE-008 Audio Extracted.pkf +/Oral Histories/Venecia_s2_F_20160526_jam+eng/raws/footage/STE-008 Audio Extracted.wav +/Oral Histories/Venecia_s2_F_20160526_jam+eng/raws/Premier Project/Adobe Premiere Pro Auto-Save/Venecia_s2_F_20160526_jam+eng-1.prproj +/Oral Histories/Venecia_s2_F_20160526_jam+eng/raws/Premier Project/Adobe Premiere Pro Auto-Save/Venecia_s2_F_20160526_jam+eng-2.prproj +/Oral Histories/Venecia_s2_F_20160526_jam+eng/raws/Premier Project/Venecia_s2_F_20160526_jam+eng.prproj +/Oral Histories/Venecia_s2_F_20160526_jam+eng/raws/thumbnail/Screen Shot 2016-12-07 at 22.25.19.png +/Oral Histories/Venecia_s2_F_20160526_jam+eng/raws/thumbnail/Screen Shot 2016-12-07 at 22.25.46.png +/Oral Histories/Venecia_s2_F_20160526_jam+eng/raws/thumbnail/Screen Shot 2016-12-07 at 22.26.08.png +/Oral Histories/Venecia_s2_F_20160526_jam+eng/readme.txt +/Oral Histories/Venecia_s2_F_20160526_jam+eng/Venecia_s2_F_20160526_jam+eng.jpg +/Oral Histories/Venecia_s2_F_20160526_jam+eng/Venecia_s2_F_20160526_jam+eng.mp4 +/Oral Histories/Victor_s1_M_20140729_arn/raws/footage/clips/Victor_speaking_Mapudungun Audio Extracted.wav +/Oral Histories/Victor_s1_M_20140729_arn/raws/footage/clips/Victor_speaking_Mapudungun.mp4 +/Oral Histories/Victor_s1_M_20140729_arn/raws/Premier Project/Victor_s1_M_20140729_arn.prproj +/Oral Histories/Victor_s1_M_20140729_arn/raws/thumbnail/Screen Shot 2016-08-19 at 13.09.52.png +/Oral Histories/Victor_s1_M_20140729_arn/raws/thumbnail/Screen Shot 2016-08-19 at 13.09.53.png +/Oral Histories/Victor_s1_M_20140729_arn/Victor_s1_M_20140729_arn.jpg +/Oral Histories/Véronique & Sandra_s2_FF_20151022_ssr+sgg/raws/footage/MVI_9946.MOV +/Oral Histories/Véronique & Sandra_s2_FF_20151022_ssr+sgg/raws/footage/MVI_9947.MOV +/Oral Histories/Véronique & Sandra_s2_FF_20151022_ssr+sgg/raws/Premier Project/Adobe Premiere Pro Auto-Save/signing-banner-1.prproj +/Oral Histories/Véronique & Sandra_s2_FF_20151022_ssr+sgg/raws/premier project/Adobe Premiere Pro Preview Files/signing-banner.PRV/Rendered - 1dc65ce6-f611-48b3-9fd9-06c31c33b6cb.xmp +/Oral Histories/Véronique & Sandra_s2_FF_20151022_ssr+sgg/raws/premier project/Adobe Premiere Pro Preview Files/signing-banner.PRV/Rendered - 2f0cd29d-a7c7-43ad-86ff-33ef2138a3c0.mpeg +/Oral Histories/Véronique & Sandra_s2_FF_20151022_ssr+sgg/raws/premier project/Adobe Premiere Pro Preview Files/signing-banner.PRV/Rendered - 2f0cd29d-a7c7-43ad-86ff-33ef2138a3c0.xmp +/Oral Histories/Véronique & Sandra_s2_FF_20151022_ssr+sgg/raws/premier project/Adobe Premiere Pro Preview Files/signing-banner.PRV/Rendered - f0200d38-4df2-420a-96c9-df79de7d6386.xmp +/Oral Histories/Véronique & Sandra_s2_FF_20151022_ssr+sgg/raws/Premier Project/signing-banner.prproj +/Oral Histories/Véronique & Sandra_s2_FF_20151022_ssr+sgg/raws/thumbnail/veroniquesandra-ssrsgg-thumb.png +/Oral Histories/Véronique & Sandra_s2_FF_20151022_ssr+sgg/raws/thumbnail/veroniquesandra-ssrsgg-thumb3.png +/Oral Histories/Véronique & Sandra_s2_FF_20151022_ssr+sgg/sandraveronique-sggssr.mp4 +/Oral Histories/Wanyu_s1_F_20131103_cmn/raws/footage/MVI_0844.MOV +/Oral Histories/Wanyu_s1_F_20131103_cmn/raws/footage/MVI_0849.MOV +/Oral Histories/Wanyu_s1_F_20131103_cmn/Wanyu_s1_F_20131103_cmn.mp4 +/Oral Histories/Watas & Wari_s1_MM_20150220_sax/watasandwari-sax.mp4 +/Oral Histories/Wayan Pindi_s1_M_20160229_bqy/Footage/MVI_5521.MOV +/Oral Histories/Wayan Pindi_s1_M_20160229_bqy/Premiere Project/Adobe Premiere Pro Auto-Save/Wayan Pindi signing Batak Toba-1.prproj +/Oral Histories/Wayan Pindi_s1_M_20160229_bqy/Premiere Project/Wayan Pindi signing Batak Toba.prproj +/Oral Histories/Will_s1_M_20130223_cmn/raws/footage/MVI_9529.MOV +/Oral Histories/Will_s1_M_20130223_cmn/raws/footage/STE-024.wav +/Oral Histories/Will_s1_M_20130223_cmn/raws/footage/STE-025.wav +/Oral Histories/Will_s1_M_20130223_cmn/raws/Premier Project/Adobe Premiere Pro Auto-Save/mandarin-will-2.prproj +/Oral Histories/Will_s1_M_20130223_cmn/raws/Premier Project/Adobe Premiere Pro Auto-Save/mandarin-will-3.prproj +/Oral Histories/Will_s1_M_20130223_cmn/raws/Premier Project/Adobe Premiere Pro Auto-Save/mandarin-will-4.prproj +/Oral Histories/Will_s1_M_20130223_cmn/raws/premier project/Adobe Premiere Pro Preview Files/mandarin-will.PRV/d9a6ecbd-3922-488e-a1fe-1c705d3c5fdc+97f5a9e2e926fcff7c7a602f 32000.cfa +/Oral Histories/Will_s1_M_20130223_cmn/raws/premier project/Adobe Premiere Pro Preview Files/mandarin-will.PRV/d9a6ecbd-3922-488e-a1fe-1c705d3c5fdc+97f5a9e2e926fcff7c7a602f 32000.pek +/Oral Histories/Will_s1_M_20130223_cmn/raws/Premier Project/mandarin-will.prproj +/Oral Histories/Xheladin_s1_M_20150720_aln/raws/footage/Xheladin - Gheg Albanian_1.mp4 +/Oral Histories/Yabi_s1_F_20161001_amh/raws/footage/clips/Yabi.mov +/Oral Histories/YiShan_s1_F_20130311_cmn/YiShan_s1_F_20130311_cmn.mp4 +/Oral Histories/Yochai_s2_M_20151201_aeb+heb/raws/footage/MVI_9981 Audio Extracted.wav +/Oral Histories/Yochai_s2_M_20151201_aeb+heb/raws/footage/MVI_9981.MOV +/Oral Histories/Yochai_s2_M_20151201_aeb+heb/raws/Premier Project/Adobe Premiere Pro Auto-Save/Untitled-1.prproj +/Oral Histories/Yochai_s2_M_20151201_aeb+heb/raws/premier project/Adobe Premiere Pro Preview Files/Untitled.PRV/Rendered - a4d0606a-f337-47f0-a804-5523a9290bda.mpeg +/Oral Histories/Yochai_s2_M_20151201_aeb+heb/raws/premier project/Adobe Premiere Pro Preview Files/Untitled.PRV/Rendered - a4d0606a-f337-47f0-a804-5523a9290bda.xmp +/Oral Histories/Yochai_s2_M_20151201_aeb+heb/raws/premier project/Adobe Premiere Pro Preview Files/Untitled.PRV/Rendered - c37a639e-5624-4157-87a8-963d526b147a.mpeg +/Oral Histories/Yochai_s2_M_20151201_aeb+heb/raws/premier project/Adobe Premiere Pro Preview Files/Untitled.PRV/Rendered - ea44f65a-b485-4214-b358-a57679d4bb6b.mpeg +/Oral Histories/Yochai_s2_M_20151201_aeb+heb/raws/premier project/Adobe Premiere Pro Preview Files/Untitled.PRV/Rendered - ea44f65a-b485-4214-b358-a57679d4bb6b.xmp +/Oral Histories/Yochai_s2_M_20151201_aeb+heb/raws/Premier Project/MVI_9981 Audio Extracted.pkf +/Oral Histories/Yochai_s2_M_20151201_aeb+heb/raws/thumbnail/WNIfb4j3QlCsoW2muTM9_yochai-hebaeb-thumb-raw.png +/Oral Histories/Yochai_s2_M_20151201_aeb+heb/yochai-heb-thumb.jpg +/Oral Histories/Yochai_s2_M_20151201_aeb+heb/yochai-hebaeb.mp4 +/Oral Histories/Zerovsho_s1_M_20160828_tgk/raws/Premier Project/Adobe Premiere Pro Auto-Save/Zerovsho_s1_M_20160828_tgk-1.prproj +/Oral Histories/Zerovsho_s1_M_20160828_tgk/raws/Premier Project/Zerovsho_s1_M_20160828_tgk.prproj +/Oral Histories/Zerovsho_s1_M_20160828_tgk/raws/thumbnail/Screen Shot 2016-10-25 at 15.23.28.png +/Oral Histories/Zerovsho_s1_M_20160828_tgk/raws/thumbnail/Screen Shot 2016-10-25 at 15.23.31.png +/Oral Histories/Zerovsho_s1_M_20160828_tgk/Zerovsho_s1_M_20160828_tgk.jpg +/Oral Histories/Zerovsho_s1_M_20160828_tgk/Zerovsho_s1_M_20160828_tgk.mp4 +/Oral Histories/Àdhamh_s1_M_20140829_gla/Àdhamh_s1_M_20140829_gla.jpg +/Oral Histories/Àdhamh_s1_M_20140829_gla/Àdhamh_s1_M_20140829_gla.mp4 +/Oral Histories/Ángeles_s1_F_20150120_spa/raws/thumbnail/UatHuTv8TFCIizYMLKAf_angeles.png +/Oral Histories/Ángeles_s1_F_20150120_spa/Ángeles_s1_F_20150120_spa.mp4 +/Oral Histories/Dale_s1_M_20160110_pdc (1)/Dale_s1_M_20160110_pdc.mp4 +/Oral Histories/Dale_s1_M_20160110_pdc (1)/readme.txt +/Oral Histories/Daria_s4_F_20150129_rus+spa+eng+cat/readme.txt +/Oral Histories/Donald_s1_M_20140925_gla/Donald_s1_M_20140925_gla.mp4 +/Oral Histories/Donald_s1_M_20140925_gla/readme.txt +/Oral Histories/Enkelejd_s1_M_20151027_als/readme.txt +/Oral Histories/Erika_s1_F_20150904_lit/Erika_s1_F_20150904_lit.mp4 +/Oral Histories/Erika_s1_F_20150904_lit/readme.txt +/Oral Histories/Francesco_s1_M_20151124_fur/readme.txt +/Oral Histories/Fugi_s1_M_20140309_oci/Fugi Speaking Aranese.mp4 +/Oral Histories/Fugi_s1_M_20140309_oci/raws/footage/clips/MVI_8389.MOV +/Oral Histories/Fugi_s1_M_20140309_oci/raws/footage/clips/STE-081.wav +/Oral Histories/Fugi_s1_M_20140309_oci/raws/footage/clips/STE-082.wav +/Oral Histories/Fugi_s1_M_20140309_oci/readme.txt +/Oral Histories/Gül_s1_F_20150606_kiu/Gül_s1_F_20150606_kiu.mp4 +/Oral Histories/Gül_s1_F_20150606_kiu/readme.txt +/Oral Histories/Hugo_s2_M_20140916_que+arn/Hugo_s2_M_20140916_que+arn.mp4 +/Oral Histories/Hywel_s1_M_20150214_cym/Hywel_s1_M_20150214_cym.mp4 +/Oral Histories/Hywel_s1_M_20150214_cym/readme.txt +/Oral Histories/Iain_s1_M_20140918_gla/Iain_s1_M_20140918_gla.mp4 +/Oral Histories/Ibnu Sina Sam_s1_M_20151029_bjn/Ibnu Sina Sam_s1_M_20151029_bjn.mp4 +/Oral Histories/Ibnu Sina Sam_s1_M_20151029_bjn/readme.txt +/Oral Histories/Ilir_s1_M_20150416_aln/Ilir_s1_M_20150416_aln.mp4 +/Oral Histories/Ioanna_s1_F_20150128_ell/Ioanna_s1_F_20150128_ell.mp4 +/Oral Histories/Ioanna_s1_F_20150128_ell/readme.txt +/Oral Histories/Isayev_s1_M_20141029_ava/Isayev_s1_M_20141029_ava.mp4 +/Oral Histories/Janek_s1_M_20150115_pol/Janek_s1_M_20150115_pol.mp4 +/Oral Histories/Janek_s1_M_20150115_pol/readme.txt +/Oral Histories/Joan-Lluís_s1_M_20131201_cat/Joan-Lluís_s1_M_20131201_cat.mp4 +/Oral Histories/Johannes and Esben_s3_MM_20150411_eng+dan+por/Johannes and Esben_s3_MM_20150411_eng+dan+por.mp4 +/Oral Histories/Johannes and Esben_s3_MM_20150411_eng+dan+por/readme.txt +/Oral Histories/John_s1_M_20140617_eng/John Speaking English.mp4 +/Oral Histories/John_s1_M_20140617_eng/raws/footage/clips/MONO-001.wav +/Oral Histories/John_s1_M_20140617_eng/raws/footage/clips/MVI_9403.MOV +/Oral Histories/John_s1_M_20140617_eng/raws/footage/clips/MVI_9404.MOV +/Oral Histories/John_s1_M_20151003_-jbo/John_s1_M_20151003_-jbo.mp4 +/Oral Histories/John_s1_M_20151003_-jbo/readme.txt +/Oral Histories/Josèp_s1_M_20131019_oci/aranese-josep.mp4 +/Oral Histories/Josèp_s1_M_20131019_oci/raws/footage/clips/MVI_8384.MOV +/Oral Histories/Josèp_s1_M_20131019_oci/raws/footage/clips/STE-077.wav +/Oral Histories/Josèp_s1_M_20131019_oci/readme.txt +/Oral Histories/Junior_s1_M_20150810_lkt/readme.txt +/Oral Histories/Keely_s3_F_20151012_eng+spa+cat/Keely_s3_F_20151012_eng+spa+cat.mp4 +/Oral Histories/Keely_s3_F_20151012_eng+spa+cat/readme.txt +/Oral Histories/Kostika_s1_M_20141128_rup/readme.txt +/Oral Histories/Landon_s1_M_20140302_eng/Landon_s1_M_20140302_eng.mp4 +/Oral Histories/Landon_s1_M_20140302_eng/readme.txt +/Oral Histories/Leslie_s1_F_20140209_eng/readme.txt +/Oral Histories/Liisi_s1_F_20150804_est/Liisi_s1_F_20150804_est.mp4 +/Oral Histories/Liisi_s1_F_20150804_est/readme.txt +/Oral Histories/Lolly_s1_F_20130920_zul/readme.txt +/Oral Histories/Majid_s1_M_20131019_fas/farsi-majid.mp4 +/Oral Histories/Majid_s1_M_20131019_fas/farsi-majid0.mp4 +/Oral Histories/Majid_s1_M_20131019_fas/raws/footage/clips/STE-091.wav +/Oral Histories/Majid_s1_M_20131019_fas/readme.txt +/Oral Histories/Manolis_s1_M_20141215_tsd/Manolis_s1_M_20141215_tsd.mp4 +/Oral Histories/Manuel_s1_M_20130203_toc (1)/Manuel_s1_M_20130203_toc.mp4 +/Oral Histories/Manuel_s1_M_20130203_toc (1)/readme.txt +/Oral Histories/Marco_s3_M_20150926_ita+vec+cim/Marco_s3_M_20150926_ita+vec+cim.mp4 +/Oral Histories/Mark_s1_M_20131019_ltz/luxembourgish-mark.mp4 +/Oral Histories/Mark_s1_M_20131019_ltz/raws/footage/clips/MVI_8397.MOV +/Oral Histories/Mark_s1_M_20131019_ltz/raws/footage/clips/STE-092.wav +/Oral Histories/Mark_s1_M_20150704_che/Mark_s1_M_20150704_che.mp4 +/Oral Histories/Mark_s1_M_20150704_che/readme.txt +/Oral Histories/Mark_s1_M_20150704_kal/Mark_s1_M_20150704_kal.mp4 +/Oral Histories/María José_s1_F_20140309_spa/Maria Speaking Spanish.mp4 +/Oral Histories/María José_s1_F_20140309_spa/raws/footage/clips/MVI_9948.MOV +/Oral Histories/María José_s1_F_20140309_spa/raws/footage/clips/STE-008.wav +/Oral Histories/Matic_s1_M_20151010_slv/readme.txt +/Oral Histories/Matic_s1_M_20151010_slv/WIKITONGUES- Matic speaking Slovene.mp4 +/Oral Histories/Memmed_s3_M_20150609_eng+ces+azj/Memmed_s3_M_20150609_eng+ces+azj.mp4 +/Oral Histories/Michael_s1_M_20130715_eng/Michael_s1_M_20130715_eng.mp4 +/Oral Histories/Michael_s1_M_20130715_eng/readme.txt +/Oral Histories/Michael_s1_M_20140729_tso/Michael_s1_M_20140729_tso.mp4 +/Oral Histories/Milen_s1_M_20140902_bul/Milen_s1_M_20140902_bul.mp4 +/Oral Histories/Milen_s1_M_20140902_bul/readme.txt +/Oral Histories/Nastya_s4_F_20150609_eng+fra+deu+rus/Nastya_s4_F_20150609_eng+fra+deu+rus.mp4 +/Oral Histories/Naveed_s3_M_20140923_eng+urd+fra/Naveed_s3_M_20140923_eng+urd+fra.mov +/Oral Histories/Naveed_s3_M_20140923_eng+urd+fra/readme.txt +/Oral Histories/Nigel_s1_M_20150630_cym/Nigel_s1_M_20150630_cym.mp4 +/Oral Histories/Nikolin_s1_M_20150117_rup/Nikolin - Farsilotu Aromanian.mp4 +/Oral Histories/Nikolin_s1_M_20150117_rup/readme.txt +/Oral Histories/Nikoloz_s1_M_20150609_kat/Nikoloz_s1_M_20150609_kat.mp4 +/Oral Histories/Nila_s1_F_20150321_abs/Nila_s1_F_20150321_abs.mp4 +/Oral Histories/Nila_s1_F_20150321_abs/readme.txt +/Oral Histories/Nila_s1_F_20151008_jav/Nila_s1_F_20151008_jav.mp4 +/Oral Histories/Nila_s1_F_20151212_ind/Nila_s1_F_20151212_ind.mp4 +/Oral Histories/Nila_s1_F_20151212_ind/readme.txt +/Oral Histories/Niḍāl_s1_M_20141202_apc/Niḍāl_s1_M_20141202_apc.MOV +/Oral Histories/Orsolya_s1_F_20151201_hun/Orsolya_s1_F_20151201_hun.mp4 +/Oral Histories/Orsolya_s1_F_20151201_hun/readme.txt +/Oral Histories/Paivi_s1_F_20131201_fin (1)/Paivi speaking finnish.mp4 +/Oral Histories/Paivi_s1_F_20131201_fin (1)/raws/footage/clips/MVI_9946.MOV +/Oral Histories/Paivi_s1_F_20131201_fin (1)/raws/footage/clips/STE-003.wav +/Oral Histories/Paivi_s1_F_20131201_fin (1)/raws/footage/clips/STE-004.wav +/Oral Histories/Paivi_s1_F_20131201_fin (1)/raws/footage/clips/STE-006.wav +/Oral Histories/Paivi_s1_F_20131201_fin (1)/raws/footage/clips/STE-007.wav +/Oral Histories/Paivi_s1_F_20131201_fin (1)/readme.txt +/Oral Histories/Paul_s1_M_20141028_llu (1)/readme.txt +/Oral Histories/Pavel_s1_M_20151105_bel/Pavel_s1_M_20151105_bel.mp4 +/Oral Histories/Pavel_s1_M_20151105_bel/readme.txt +/Oral Histories/Peter_s4_M_20150705_por+eng+spa+ita/readme.txt +/Oral Histories/Presi_s1_F_20140316_ceb (1)/Presi Speaking Cebuano.mp4 +/Oral Histories/Presi_s1_F_20140316_ceb (1)/raws/footage/clips/MONO-000.wav +/oral histories/slobodan_s1_m_20140729_srp/raws/footage/converted +/Oral Histories/Presi_s1_F_20140316_ceb (1)/readme.txt +/Oral Histories/Rejzka_s1_F_20151107_hsb/readme.txt +/Oral Histories/Ricky_s3_M_20140312_eng+mri+spa/readme.txt +/Oral Histories/Ricky_s3_M_20140312_eng+mri+spa/RickyRutledge-Wikitongues story in English,Spanish,Maori.mp4 +/Oral Histories/Roanne_s1_F_20151020_cro/readme.txt +/Oral Histories/Rolf_s1_M_20150709_-atl/readme.txt +/Oral Histories/Rolf_s1_M_20150709_-atl/Rolf_s1_M_20150709_-atl.mp4 +/Oral Histories/Saro_s1_M_20151024_nyf/readme.txt +/Oral Histories/Sebastian_s1_M_20151121_bar/readme.txt +/Oral Histories/Sebastian_s1_M_20151121_bar/Sebastian_s1_M_20151121_bar.mp4 +/Oral Histories/Sebastijan_s1_M_20151112_hrv/readme.txt +/Oral Histories/Sedday_s3_M_20150217_swa+som+eng (1)/raws/footage/clips/MVI_8380.MOV +/Oral Histories/Sedday_s3_M_20150217_swa+som+eng (1)/raws/footage/clips/STE-074.wav +/Oral Histories/Sedday_s3_M_20150217_swa+som+eng (1)/raws/footage/clips/STE-075.wav +/Oral Histories/Sedday_s3_M_20150217_swa+som+eng (1)/readme.txt +/Oral Histories/Sita_s1_F_20151201_mqy/readme.txt +/Oral Histories/Sita_s1_F_20151201_mqy/Sita_s1_F_20151201_mqy.mp4 +/Oral Histories/Sorcha_s1_F_20140828_gle/Sorcha_s1_F_20140828_gle.mp4 +/Oral Histories/Stefano_s1_M_20150904_aae (1)/readme.txt +/Oral Histories/Stefano_s1_M_20150904_aae (1)/Stefano_s1_M_20150904_aae.mp4 +/Oral Histories/Stephen_s1_M_20130704_kik/Stephen_s1_M_20130704_kik.mp4 +/Oral Histories/Teruyo_s1_F_20160122_ain/readme.txt +/Oral Histories/Teruyo_s1_F_20160122_ain/Teruyo_s1_F_20160122_ain.mp4 +/Oral Histories/Tommy_s6_M_20150501_eng+fra+por+que+moe+spa/Tommy_s6_M_20150501_eng+fra+por+que+moe+spa.mp4 +/Oral Histories/Valerian_s1_M_20151114_xmf/readme.txt +/Oral Histories/Valerian_s1_M_20151114_xmf/Valerian_s1_M_20151114_xmf.mp4 +/Oral Histories/Jeremi_s1_M_20140627_afr/Alternate Jeremi_s1_M_20140627_afr.mov +/Oral Histories/Hiljiardo_s1_M_20140614_epo/raws/footage/clips/Hiljiardo_s1_M_20140614_epo.mov +/Oral Histories/Hiljiardo_s1_M_20140614_epo/readme.txt +/Oral Histories/Iasmin_s2_F_20150612_yue+eng/readme.txt +/Oral Histories/Mario_s1_M_20150624_gsw/raws/footage/clips/Mario_s1_M_20150624_gsw.mp4 +/Oral Histories/Mario_s1_M_20150624_gsw/readme.txt +/Oral Histories/Marty_s3_M_20150904_eng+fra+aln/readme.txt +/Oral Histories/Mirela_s1_F_20141002_bos/raws/footage/clips/Mirela_s1_F_20141002_bos.mp4 +/Oral Histories/Mirela_s1_F_20141002_bos/readme.txt +/Oral Histories/Mirjana_s1_F_20141030_srp/readme.txt +/Oral Histories/Stere_s1_M_20140729_rup/raws/footage/clips/Stere_s1_M_20140729_rup.mp4 +/Oral Histories/Stere_s1_M_20140729_rup/readme.txt +/Oral Histories/Suna_s1_F_20140930_bgx/readme.txt +/Oral Histories/Timothy_s1_M_20140217_pne/raws/footage/clips/Timothy_s1_M_20140217_pne.avi +/Oral Histories/Timothy_s1_M_20140217_pne/readme.txt +/Oral Histories/Tom_s1_M_20150526_kor/raws/thumbnail/Screen Shot 2017-01-13 at 12.07.43 PM.png +/Oral Histories/Tom_s1_M_20150526_kor/readme.txt +/oral histories/tereza_s1_f_20160825_hun/raws/premier project/Adobe Premiere Pro Auto-Save/Tereza_s1_F_20160825_hun-1.prproj +/oral histories/tereza_s1_f_20160825_hun/raws/premier project/adobe premiere pro video previews/Tereza_s1_F_20160825_hun.PRV/Rendered - 5d94948b-6b0f-4e9c-a144-6581e031a2f1.xmp +/oral histories/tereza_s1_f_20160825_hun/raws/premier project/Adobe Premiere Pro Auto-Save/Tereza_s1_F_20160825_hun-2.prproj +/Oral Histories/Tereza_s1_F_20160825_hun/raws/Premier Project/Tereza_s1_F_20160825_hun.prproj +/Oral Histories/Tereza_s1_F_20160825_hun/Tereza_s1_F_20160825_hun.mp4 +/oral histories/anonymous_s1_m_20160514_kjg/raws/footage/converted/P1015394.mp4 +/Oral Histories/Anonymous_s1_M_20160514_kjg/raws/Premier Project/Anonymous_s1_M_20160514_kjg.prproj +/oral histories/naoki_s4_m_20161227_ryu+myv+xal+prg/raws/premiere project/adobe premiere pro audio previews/naoki_s4_m_20161227_ryu+myv+xal+prg.prv/Peak Files/380e7a08-18ee-4e10-8339-870e47774400+688e45de-252f-9e27-90f9-a62c00000049 48000.pek +/Oral Histories/Naoki_s4_M_20161227_ryu+myv+xal+prg/raws/footage/clips/Erzya Self Introduction Audio Extracted.wav +/oral histories/naoki_s4_m_20161227_ryu+myv+xal+prg/raws/premiere project/adobe premiere pro audio previews/naoki_s4_m_20161227_ryu+myv+xal+prg.prv/Peak Files/eb298aed-8a59-41eb-a629-45da56014f9c+cd5db7e1-c00f-104c-fb7c-b31900000049 48000.pek +/oral histories/naoki_s4_m_20161227_ryu+myv+xal+prg/raws/premiere project/adobe premiere pro audio previews/Naoki_s4_M_20161227_ryu+myv+xal+prg.PRV/eb298aed-8a59-41eb-a629-45da56014f9c+cd5db7e1-c00f-104c-fb7c-b31900000049 48000.cfa +/oral histories/naoki_s4_m_20161227_ryu+myv+xal+prg/raws/premiere project/adobe premiere pro audio previews/Naoki_s4_M_20161227_ryu+myv+xal+prg.PRV/380e7a08-18ee-4e10-8339-870e47774400+688e45de-252f-9e27-90f9-a62c00000049 48000.cfa +/Oral Histories/Naoki_s4_M_20161227_ryu+myv+xal+prg/raws/footage/clips/Erzya Self Introduction Audio Extracted Audio Extracted.pkf +/Oral Histories/Naoki_s4_M_20161227_ryu+myv+xal+prg/raws/footage/clips/Kalmyk Self Introduction Audio Extracted.pkf +/oral histories/naoki_s4_m_20161227_ryu+myv+xal+prg/raws/premiere project/adobe premiere pro audio previews/naoki_s4_m_20161227_ryu+myv+xal+prg.prv/Peak Files/b8bc89e3-2bbc-4720-ab60-290cbad9667e+7c6e2387-72e5-8593-bc5a-d48400000049 48000.pek +/oral histories/naoki_s4_m_20161227_ryu+myv+xal+prg/raws/premiere project/adobe premiere pro audio previews/Naoki_s4_M_20161227_ryu+myv+xal+prg.PRV/b8bc89e3-2bbc-4720-ab60-290cbad9667e+7c6e2387-72e5-8593-bc5a-d48400000049 48000.cfa +/Oral Histories/Naoki_s4_M_20161227_ryu+myv+xal+prg/raws/footage/clips/Prussian Self-Introduction Audio Extracted.pkf +/oral histories/naoki_s4_m_20161227_ryu+myv+xal+prg/raws/premiere project/adobe premiere pro audio previews/naoki_s4_m_20161227_ryu+myv+xal+prg.prv/Peak Files/10ee620e-f219-4636-b8ac-cd5a0e73dfdb+7b33227f-05ab-b188-aff6-554700000049 48000.pek +/Oral Histories/Naoki_s4_M_20161227_ryu+myv+xal+prg/raws/footage/clips/Okinawan Self-Introduction Audio Extracted.pkf +/Oral Histories/Naoki_s4_M_20161227_ryu+myv+xal+prg/raws/footage/clips/Okinawan Self-Introduction Audio Extracted.wav +/Oral Histories/Naoki_s4_M_20161227_ryu+myv+xal+prg/raws/footage/clips/Kalmyk Self Introduction Audio Extracted.wav +/oral histories/naoki_s4_m_20161227_ryu+myv+xal+prg/raws/premiere project/adobe premiere pro audio previews/Naoki_s4_M_20161227_ryu+myv+xal+prg.PRV/10ee620e-f219-4636-b8ac-cd5a0e73dfdb+7b33227f-05ab-b188-aff6-554700000049 48000.cfa +/Oral Histories/Naoki_s4_M_20161227_ryu+myv+xal+prg/raws/footage/clips/Prussian Self-Introduction Audio Extracted Audio Extracted.pkf +/Oral Histories/Naoki_s4_M_20161227_ryu+myv+xal+prg/raws/footage/clips/Prussian Self-Introduction Audio Extracted Audio Extracted.wav +/oral histories/naoki_s4_m_20161227_ryu+myv+xal+prg/raws/premiere project/Adobe Premiere Pro Auto-Save/Naoki_s4_M_20161227_ryu+myv+xal+prg-2.prproj +/oral histories/daniel_s1_m_20151224_gum/raws/footage/converted/Ney wam.mp4 +/Oral Histories/Tenzin_s1_F_20160717_bod/Tenzin_s1_F_20160717_bod.mp4 +/Oral Histories/Anonymous_s1_M_20160514_kjg/Anonymous_s1_M_20160514_kjg.mp4 +/oral histories/daniel_s1_m_20151224_gum/raws/footage/converted/Ney wam Audio Extracted.wav +/oral histories/daniel_s1_m_20151224_gum/raws/premier project/adobe premiere pro audio previews/daniel_s1_m_20151224_gum.prv/Peak Files/f3fb0733-ac1b-4d97-a220-b7ed3d346bfe+95dc86c4-a4f8-db53-a038-779000000069 48000.pek +/oral histories/daniel_s1_m_20151224_gum/raws/Premier Project/Daniel_s1_M_20151224_gum.prproj +/oral histories/Daniel_s1_M_20151224_gum/Daniel_s1_M_20151224_gum.mp4 +/Oral Histories/Naoki_s4_M_20161227_ryu+myv+xal+prg/Naoki_s4_M_20161227_ryu+myv+xal+prg.mp4 +/Oral Histories/Tenzin_s1_F_20160717_bod/raws/footage/converted/MVI_0165.mov +/Oral Histories/Tereza_s1_F_20160825_hun/raws/thumbnail/Screen Shot 2017-01-17 at 16.53.16.png +/Oral Histories/Mounir_s1_M_20160721_aeb/Mounir_s1_M_20160721_aeb.jpg +/Oral Histories/Tenzin_s1_F_20160717_bod/Tenzin_s1_F_20160717_bod.jpg +/oral histories/Daniel_s1_M_20151224_gum/Daniel_s1_M_20151224_gum.jpg +/oral histories/daniel_s1_m_20151224_gum/raws/thumbnail/Screen Shot 2017-01-18 at 15.05.28.png +/oral histories/daniel_s1_m_20151224_gum/raws/thumbnail/Screen Shot 2017-01-18 at 15.05.29.png +/Oral Histories/Anonymous_s1_M_20160514_kjg/raws/thumbnail/Screen Shot 2017-01-17 at 17.43.29.png +/Oral Histories/Tenzin_s1_F_20160717_bod/raws/thumbnail/Screen Shot 2017-01-17 at 17.31.39.png +/Oral Histories/Naoki_s4_M_20161227_ryu+myv+xal+prg/Naoki_s4_M_20161227_ryu+myv+xal+prg.jpg +/oral histories/naoki_s4_m_20161227_ryu+myv+xal+prg/raws/thumbnails/Screen Shot 2017-01-19 at 15.14.27.png +/oral histories/naoki_s4_m_20161227_ryu+myv+xal+prg/raws/thumbnails/Screen Shot 2017-01-19 at 15.14.26.png +/oral histories/gjyste_s1_f_20150720_aln/raws/thumbnails/kTWO2QQZekjeSzwMLFvQ_gjyste-aln-thumb-raw.png +/oral histories/linh_s1_m_20170516_vie/raws/footage/clips/P1016104.AVI +/Oral Histories/Stere_s1_M_20140729_rup/raws/footage/clips/Stere_s1_M_20140729_rup Audio Extracted.pkf +/Oral Histories/Stere_s1_M_20140729_rup/raws/footage/clips/Stere_s1_M_20140729_rup Audio Extracted.wav +/Oral Histories/Isabel_s1_F_20140729_spa/raws/footage/STE-021 Audio Extracted.pkf +/Oral Histories/Isabel_s1_F_20140729_spa/raws/footage/ste-021 audio extracted.wav +/oral histories/aurora & ademar_s1_fm_20150815_mwl/raws/premier project/adobe premiere pro audio previews/isabel_s1_f_20140729_spa.prv/Peak Files/82431111-a12d-4d04-a921-c978369b3a86+5ad76752-b006-16e1-dfa4-c75200000049 48000.pek +/Oral Histories/Aurora & Ademar_s1_FM_20150815_mwl/raws/footage/Ademar Augusto Preto - Aurora Augusta Sebastião Audio Extracted.wav +/oral histories/aurora & ademar_s1_fm_20150815_mwl/raws/premier project/adobe premiere pro audio previews/Isabel_s1_F_20140729_spa.PRV/82431111-a12d-4d04-a921-c978369b3a86+5ad76752-b006-16e1-dfa4-c75200000049 48000.cfa +/Oral Histories/Aurora & Ademar_s1_FM_20150815_mwl/raws/Premier Project/Isabel_s1_F_20140729_spa.prproj +/Oral Histories/Stéfane_s1_M_20161130_por/Stéfane_s1_M_20161130_por.mp4 +/oral histories/isabel_s1_f_20140729_spa/raws/premier project/Adobe Premiere Pro Auto-Save/Isabel_s1_F_20140729_spa-1.prproj +/Oral Histories/Aurora & Ademar_s1_FM_20150815_mwl/Aurora & Ademar_s1_FM_20150815_mwl.mp4 +/oral histories/isabel_s1_f_20140729_spa/raws/footage/converted/MVI_0030.mov +/Oral Histories/Isabel_s1_F_20140729_spa/raws/Premier Project/Isabel_s1_F_20140729_spa.prproj +/oral histories/namrata_s1_f_20160717_nep/raws/premier project/Adobe Premiere Pro Auto-Save/Namrata_s1_F_20160717_nep-1.prproj +/Oral Histories/Namrata_s1_F_20160717_nep/Namrata_s1_F_20160717_nep.mp4 +/oral histories/namrata_s1_f_20160717_nep/raws/premier project/Adobe Premiere Pro Auto-Save/Namrata_s1_F_20160717_nep-2.prproj +/Oral Histories/Isabel_s1_F_20140729_spa/Isabel_s1_F_20140729_spa.mp4 +/oral histories/Aboubacar_s2_M_20160818_dje+eng/Aboubacar_s2_M_20160818_dje+eng.mp4 +/oral histories/aboubacar_s2_m_20160818_dje+eng/raws/footage/clips/MVI_0172.MOV +/oral histories/aboubacar_s2_m_20160818_dje+eng/raws/footage/clips/STE-011.wav +/oral histories/aboubacar_s2_m_20160818_dje+eng/raws/Premier Project/Aboubacar_s1_M_20160818_dje.prproj +/oral histories/aboubacar_s2_m_20160818_dje+eng/raws/premier project/Adobe Premiere Pro Auto-Save/Aboubacar_s1_M_20160818_dje-1.prproj +/oral histories/aboubacar_s2_m_20160818_dje+eng/raws/thumbnail/Screen Shot 2017-01-17 at 19.07.25.png +/Oral Histories/Stere_s1_M_20140729_rup/raws/thumbnail/FUEcpTOPQ6qvvE9iJgLj_stere-rup-thumb-raw.png +/Oral Histories/Stere_s1_M_20140729_rup/Stere_s1_M_20140729_rup.jpg +/Oral Histories/Isabel_s1_F_20140729_spa/raws/thumbnail/Screen Shot 2017-01-31 at 10.39.46.png +/Oral Histories/Isabel_s1_F_20140729_spa/Isabel_s1_F_20140729_spa.jpg +/Oral Histories/Aurora & Ademar_s1_FM_20150815_mwl/Aurora & Ademar_s1_FM_20150815_mwl.jpg +/Oral Histories/Aurora & Ademar_s1_FM_20150815_mwl/raws/thumbnail/Screen Shot 2017-01-30 at 20.24.25.png +/Oral Histories/Stéfane_s1_M_20161130_por/Stéfane_s1_M_20161130_por.jpg +/oral histories/stéfane_s1_m_20161130_por/raws/footage/Premiere project/Stéfane_s1_M_20161130_por.prproj +/oral histories/stéfane_s1_m_20161130_por/raws/footage/footage/clips/Stéfane_s1_M_20161130_por Audio Extracted.pkf +/oral histories/stéfane_s1_m_20161130_por/raws/footage/footage/clips/Stéfane_s1_M_20161130_por.mp4 +/oral histories/stéfane_s1_m_20161130_por/raws/footage/thumbnail/Screen Shot 2017-01-30 at 20.47.14.png +/Oral Histories/Krishna_s1_M_20160721_bho/raws/thumbnail/Screen Shot 2017-01-31 at 16.19.36.png +/Oral Histories/Namrata_s1_F_20160717_nep/raws/thumbnail/Screen Shot 2017-01-31 at 11.20.36.png +/Oral Histories/Namrata_s1_F_20160717_nep/raws/thumbnail/Screen Shot 2017-01-31 at 11.20.18.png +/Oral Histories/Namrata_s1_F_20160717_nep/Namrata_s1_F_20160717_nep.jpg +/oral histories/roanne_s1_f_20151020_eng/raws/footage/clips/Roanne Hill_Eng.MOV +/oral histories/tylis_s1_m_20151020_cro/raws/footage/clips/Tylis Bad Bear1.MOV +/oral histories/james_s2_m_20140101_pol+eng/raws/footage/clips/James speaking Polish and English.mp4 +/oral histories/Vseslav_s1_M_20140927_rus/WIKITONGUES- Vseslav speaking Russian.mp4 +/oral histories/Mario_s1_M_20120817_arg/Mario_s1_M_20120817_arg.mp4 +/oral histories/Mario_s1_M_20120817_arg/Mario_s1_M_20120817_arg.jpg +/oral histories/Matteo_s1_M_20131030_lmo/Matteo_s1_M_20131030_lmo.jpg +/oral histories/Joshi_s1_M_20131201_epo/Joshi_s1_M_20131201_epo.mp4 +/oral histories/Joshi_s1_M_20131201_epo/Joshi_s1_M_20131201_epo.jpg +/oral histories/Marks_s1_M_20140502_lvs/Marks_s1_M_20140502_lvs.jpg +/oral histories/Vseslav_s1_M_20140927_rus/Marks_s1_M_20140502_lvs.jpg +/oral histories/Vseslav_s5_M_20151201_eng+deu+ukr+pol+fra/Vseslav_s5_M_20151201_eng+deu+ukr+pol+fra.mp4 +/oral histories/Ron_s1_M_20141108_lim/Ron_s1_M_20141108_lim.jpg +/oral histories/Ron_s1_M_20141108_lim/Ron_s1_M_20141108_lim.mp4 +/oral histories/vseslav_s5_m_20151201_eng+deu+ukr+pol+fra/raws/footage/clips/видео002.mp4 +/oral histories/Yan_s1_M_20150221_nch/Yan_s1_M_20150221_nch.mp4 +/oral histories/yan_s1_m_20150221_nch/raws/thumbnail/iuj6TO8NRz6seNycPx2h_yan-nch-thumb-raw.png +/oral histories/Florentina_s1_F_20150220_rup/Florentina_s1_F_20150220_rup.mp4 +/oral histories/Ryan_s1_M_20160415_yol/Ryan_s1_M_20160415_yol.mp4 +/oral histories/ryan_s1_m_20160415_yol/raws/footage/clips/IMG_0306.mp4 +/oral histories/plator_s1_m_20140702_aln/raws/thumbnail/3X02TOKLTpWvKsi1Wyu9_plator.png +/oral histories/Plator_s1_M_20140702_aln/Plator_s1_M_20140702_aln.mp4 +/oral histories/Daut_s1_M_20141104_rmn/Daut_s1_M_20141104_rmn.mp4 +/oral histories/Ela_s1_F_20141113_tur/Ela_s1_F_20141113_tur.jpg +/oral histories/Julian_s1_M_20141125_sqi/Julian_s1_M_20141125_sqi.jpg +/oral histories/Julian_s1_M_20141125_sqi/Julian_s1_M_20141125_sqi.mp4 +/oral histories/Fahed_s1_M_20140410_apc/Fahed_s1_M_20140410_apc.mp4 +/oral histories/Galib_s1_M_20140429_aze/Galib_s1_M_20140429_aze.jpg +/oral histories/Galib_s1_M_20140429_aze/Galib_s1_M_20140429_aze.mp4 +/oral histories/Kiefer_s1_M_20140508_eng/Kiefer_s1_M_20140508_eng.jpg +/oral histories/Tural_s3_M_20140710_aze+rus+tur/Tural_s3_M_20140710_aze+rus+tur.mp4 +/oral histories/Tural_s3_M_20140710_aze+rus+tur/Tural_s3_M_20140710_aze+rus+tur.jpg +/oral histories/Martin_s2_M_20140812_swe+pol/Martin_s2_M_20140812_swe+pol.jpg +/oral histories/Maxi_s5_M_20140821_spa+eng+por+cat+ita/Maxi_s5_M_20140821_spa+eng+por+cat+ita.jpg +/oral histories/Maxi_s5_M_20140821_spa+eng+por+cat+ita/Maxi_s5_M_20140821_spa+eng+por+cat+ita.mp4 +/oral histories/Enrique_s1_M_20151210_spa/Enrique_s1_M_20151210_spa.jpg +/oral histories/Vineet_s1_M_20140731_mal/Vineet_s1_M_20140731_mal.jpg +/oral histories/Vineet_s1_M_20140731_mal/Vineet_s1_M_20140731_mal.mp4 +/oral histories/Sai_s1_M_20141026_tam/Sai_s1_M_20141026_tam.jpg +/oral histories/Manjunath_s1_M_20150620_kan/Manjunath_s1_M_20150620_kan.mp4 +/oral histories/Manjunath_s1_M_20150620_kan/Manjunath_s1_M_20150620_kan.jpg +/oral histories/Souleymane_s4_M_20151201_sen+man+ara+fra/Souleymane_s4_M_20151201_sen+man+ara+fra.mp4 +/oral histories/Sho_s1_M_20141106_jpn/Sho_s1_M_20141106_jpn.jpg +/oral histories/Sho_s1_M_20141106_jpn/Sho_s1_M_20141106_jpn.mp4 +/oral histories/fanny_s1_f_20160127_rup/raws/footage/clips/Fanny speaking and singing Aromanian.mov +/oral histories/Ivy_s1_F_20151214_wuu/WIKITONGUES- Ivy speaking Shanghainese.mp4 +/oral histories/ivy_s1_f_20151214_wuu/raws/footage/clips/Shanghainese Interview-italki.720p.mov +/oral histories/yan_s1_f_20141208_wuu/raws/footage/clips/MVI_6840.MP4 +/oral histories/Michell_s1_M_20130706_eng/Michell_s1_M_20130706_eng.mp4 +/oral histories/Freddie_s1_M_20130218_por/Freddie_s1_M_20130218_por.mp4 +/oral histories/elisa_s1_f_20140729_vec/raws/footage/clips/Elisa_speaking_Veronese.MOV +/oral histories/Marion_s1_F_20130704_eng/Marion_s1_F_20130704_eng.mp4 +/oral histories/Lee_s1_M_20130706_eng/Lee_s1_M_20130706_eng.jpg +/oral histories/Lee_s1_M_20130706_eng/Lee_s1_M_20130706_eng.mp4 +/oral histories/Stella_s3_F_20130706_hye+eng+rus/Stella_s3_F_20130706_hye+eng+rus.mp4 +/oral histories/steffi_s1_f_20140729_bar/raws/footage/clips/STE-014.wav +/oral histories/michi_s1_m_20140729_bar/raws/footage/clips/MVI_9429.MOV +/oral histories/steffi_s1_f_20140729_bar/raws/footage/clips/MVI_9428.MOV +/oral histories/peter_s1_m_20151229_cor/raws/footage/clips/STE-042.wav +/oral histories/peter_s1_m_20151229_cor/raws/footage/clips/MVI_9458.MOV +/oral histories/suzy_s1_f_20140729_eng/raws/footage/clips/MVI_9434.MOV +/oral histories/dora_s1_f_20151217_eng/raws/footage/clips/MVI_9433.MOV +/Oral Histories/Arlon_s1_M_20170127_vec/raws/footage/clips/Arlon_s1_M_20170127_vec.mp4 +/Oral Histories/Casteline_s1_F_20170213_hat/raws/footage/clips/BDMV/CLIPINF/00000.CPI +/Oral Histories/Casteline_s1_F_20170213_hat/raws/footage/clips/BDMV/INDEX.BDM +/Oral Histories/Casteline_s1_F_20170213_hat/raws/footage/clips/BDMV/MOVIEOBJ.BDM +/Oral Histories/Casteline_s1_F_20170213_hat/raws/footage/clips/BDMV/STREAM/00000.MTS +/Oral Histories/Casteline_s1_F_20170213_hat/raws/footage/clips/Casteline_s1_F_20170213_hat.mov +/Oral Histories/Casteline_s1_F_20170213_hat/readme.txt +/Oral Histories/Evgenii_s1_M_20170214_ckt/readme.txt +/oral histories/anonymous_s1_f_20140729_gsw/raws/thumbnail/sVCDPXFtQOyV058NOuwd_unnamed-sgw-thumb-raw.png +/oral histories/anonymous_s1_f_20140729_gsw/raws/footage/audio/STE-010.wav +/oral histories/naomi_s1_f_20140101_jpn/raws/premier project/adobe premiere pro preview files/japanese-naomi.PRV/45001122-34b6-491c-ba65-f8734e1348d1+4d1cdd1331a91031c71b71c 48000.pek +/oral histories/naomi_s1_f_20140101_jpn/raws/premier project/adobe premiere pro preview files/japanese-naomi.PRV/45001122-34b6-491c-ba65-f8734e1348d1+4d1cdd1331a91031c71b71c 48000_1.pek +/oral histories/naomi_s1_f_20140101_jpn/raws/footage/audio/STE-015.wav +/oral histories/naomi_s1_f_20140101_jpn/raws/premier project/adobe premiere pro preview files/japanese-naomi.PRV/fc049440-f48b-4197-9e68-ef9f88a38e4f+beb833a86b67cc69ae9224e5 48000.pek +/oral histories/naomi_s1_f_20140101_jpn/raws/Premier Project/japanese-naomi.prproj +/oral histories/naomi_s1_f_20140101_jpn/raws/footage/audio/STE-016.wav +/oral histories/naomi_s1_f_20140101_jpn/raws/premier project/adobe premiere pro preview files/japanese-naomi.PRV/45001122-34b6-491c-ba65-f8734e1348d1+1271bf46f5ff678df65477 48000.cfa +/oral histories/naomi_s1_f_20140101_jpn/raws/thumbnail/_MG_9425.JPG +/oral histories/naomi_s1_f_20140101_jpn/raws/thumbnail/_MG_9426.JPG +/oral histories/naomi_s1_f_20140101_jpn/raws/thumbnail/_MG_9423.JPG +/oral histories/naomi_s1_f_20140101_jpn/raws/thumbnail/_MG_9429.JPG +/oral histories/naomi_s1_f_20140101_jpn/raws/thumbnail/_MG_9427.JPG +/oral histories/naomi_s1_f_20140101_jpn/raws/thumbnail/_MG_9424.JPG +/oral histories/naomi_s1_f_20140101_jpn/raws/thumbnail/_MG_9421.JPG +/oral histories/naomi_s1_f_20140101_jpn/raws/thumbnail/_MG_9422.JPG +/oral histories/naomi_s1_f_20140101_jpn/raws/thumbnail/_MG_9417.JPG +/oral histories/naomi_s1_f_20140101_jpn/raws/thumbnail/_MG_9419.JPG +/oral histories/naomi_s1_f_20140101_jpn/raws/thumbnail/_MG_9420.JPG +/oral histories/naomi_s1_f_20140101_jpn/raws/thumbnail/_MG_9416.CR2 +/oral histories/naomi_s1_f_20140101_jpn/raws/thumbnail/_MG_9418.CR2 +/oral histories/naomi_s1_f_20140101_jpn/raws/thumbnail/_MG_9417.CR2 +/oral histories/naomi_s1_f_20140101_jpn/raws/thumbnail/_MG_9420.CR2 +/oral histories/naomi_s1_f_20140101_jpn/raws/thumbnail/_MG_9421.CR2 +/oral histories/naomi_s1_f_20140101_jpn/raws/thumbnail/_MG_9422.CR2 +/oral histories/naomi_s1_f_20140101_jpn/raws/thumbnail/_MG_9428.CR2 +/oral histories/naomi_s1_f_20140101_jpn/raws/thumbnail/_MG_9424.CR2 +/oral histories/naomi_s1_f_20140101_jpn/raws/thumbnail/_MG_9426.CR2 +/oral histories/naomi_s1_f_20140101_jpn/raws/thumbnail/_MG_9425.CR2 +/oral histories/naomi_s1_f_20140101_jpn/raws/thumbnail/_MG_9427.CR2 +/oral histories/Naomi_s1_F_20140101_jpn/Naomi_s1_F_20140101_jpn.mp4 +/oral histories/josé_s1_m_20140729_spa/raws/footage/clips/MVI_0015.MOV +/oral histories/isabel_s1_f_20150815_mwl/raws/footage/audio/Isabel Mirandês.aiff +/oral histories/isabel_s1_f_20150815_mwl/raws/footage/clips/MVI_9957.MOV +/oral histories/lorenzo_s1_m_20130202_quc/raws/Premier Project/kiche-mapi.prproj +/oral histories/lorenzo_s1_m_20130202_quc/raws/thumbnail/instagram-lorenzo.jpg +/oral histories/lorenzo_s1_m_20130202_quc/raws/thumbnail/Screen Shot 2013-02-03 at 4.41.01 PM.png +/oral histories/lorenzo_s1_m_20130202_quc/raws/footage/audio/STE-013.wav +/oral histories/lorenzo_s1_m_20130202_quc/raws/footage/audio/STE-033.wav +/oral histories/lorenzo_s1_m_20130202_quc/raws/premier project/adobe premiere pro preview files/kiche-mapi.PRV/654f5760-265f-4b3a-8e3d-02b8aef35258+ab8585e97b48e9ab6ee9f23c 48000.cfa +/oral histories/Octavia_s1_F_20130203_-hes/Octavia_s1_F_20130203_-hes.jpg +/oral histories/octavia_s1_f_20130203_-hes/raws/premier project/Adobe Premiere Pro Auto-Save/hessian-octavia-1.prproj +/oral histories/octavia_s1_f_20130203_-hes/raws/premier project/adobe premiere pro preview files/hessian-octavia.PRV/3b6e85f4-f35b-46d5-a814-acc065c71c35+c55c228d1b0b2b1ae7fe8bdb 32000.pek +/oral histories/octavia_s1_f_20130203_-hes/raws/thumbnail/Zrzut ekranu 2012-04-24 o 1.47.27 AM.png +/oral histories/octavia_s1_f_20130203_-hes/raws/premier project/adobe premiere pro preview files/hessian-octavia.PRV/3b6e85f4-f35b-46d5-a814-acc065c71c35+c55c228d1b0b2b1ae7fe8bdb 32000.cfa +/oral histories/Octavia_s1_F_20130203_-hes/Octavia_s1_F_20130203_-hes.mp4 +/oral histories/sofia_s2_f_20130203_eng+rus/raws/premier project/adobe premiere pro preview files/russian-sofia.PRV/7730f66a-b8f2-41fc-b076-53464de36a9e+6fc9a1d546e2ceda9766bc1 32000.pek +/oral histories/sofia_s2_f_20130203_eng+rus/raws/Premier Project/russian-sofia.prproj +/oral histories/sofia_s2_f_20130203_eng+rus/raws/thumbnail/_MG_9409.JPG +/oral histories/sofia_s2_f_20130203_eng+rus/raws/thumbnail/_MG_9405.JPG +/oral histories/sofia_s2_f_20130203_eng+rus/raws/thumbnail/_MG_9404.JPG +/oral histories/sofia_s2_f_20130203_eng+rus/raws/thumbnail/_MG_9401.JPG +/oral histories/sofia_s2_f_20130203_eng+rus/raws/thumbnail/_MG_9407.JPG +/oral histories/sofia_s2_f_20130203_eng+rus/raws/thumbnail/_MG_9402.JPG +/oral histories/sofia_s2_f_20130203_eng+rus/raws/thumbnail/_MG_9412.JPG +/oral histories/sofia_s2_f_20130203_eng+rus/raws/thumbnail/_MG_9406.JPG +/oral histories/sofia_s2_f_20130203_eng+rus/raws/thumbnail/_MG_9410.JPG +/oral histories/sofia_s2_f_20130203_eng+rus/raws/thumbnail/_MG_9400.JPG +/oral histories/sofia_s2_f_20130203_eng+rus/raws/thumbnail/_MG_9409.CR2 +/oral histories/joel_s2_m_20130215_eng+heb/raws/premier project/Adobe Premiere Pro Auto-Save/hebrew-joel-1.prproj +/oral histories/joel_s2_m_20130215_eng+heb/raws/premier project/Adobe Premiere Pro Auto-Save/hebrew-joel-2.prproj +/oral histories/joel_s2_m_20130215_eng+heb/raws/Premier Project/hebrew-joel.prproj +/oral histories/sofia_s2_f_20130203_eng+rus/raws/thumbnail/_MG_9404.CR2 +/oral histories/sofia_s2_f_20130203_eng+rus/raws/thumbnail/_MG_9408.CR2 +/oral histories/sofia_s2_f_20130203_eng+rus/raws/thumbnail/_MG_9407.CR2 +/oral histories/Joel_s2_M_20130215_eng+heb/Joel_s2_M_20130215_eng+heb.jpg +/oral histories/sofia_s2_f_20130203_eng+rus/raws/thumbnail/_MG_9401.CR2 +/oral histories/sofia_s2_f_20130203_eng+rus/raws/thumbnail/_MG_9405.CR2 +/oral histories/sofia_s2_f_20130203_eng+rus/raws/thumbnail/_MG_9402.CR2 +/oral histories/sofia_s2_f_20130203_eng+rus/raws/thumbnail/_MG_9411.CR2 +/oral histories/sofia_s2_f_20130203_eng+rus/raws/thumbnail/_MG_9400.CR2 +/oral histories/sofia_s2_f_20130203_eng+rus/raws/thumbnail/_MG_9406.CR2 +/oral histories/sofia_s2_f_20130203_eng+rus/raws/thumbnail/_MG_9410.CR2 +/oral histories/joel_s2_m_20130215_eng+heb/raws/footage/audio/STE-019.wav +/oral histories/joel_s2_m_20130215_eng+heb/raws/premier project/adobe premiere pro preview files/hebrew-joel.PRV/e8d729a5-25b1-48a4-8c9e-019cd8041ef3+554c2e269a111bd6629cc261 32000.cfa +/oral histories/sofia_s2_f_20130203_eng+rus/raws/footage/audio/STE-014.wav +/oral histories/Natasha_s1_F_20130224_eng/Natasha_s1_F_20130224_eng.mp4 +/oral histories/Sofia_s2_F_20130203_eng+rus/Sofia_s2_F_20130203_eng+rus.mp4 +/oral histories/naomi_s1_f_20140101_jpn/raws/footage/clips/MVI_9415.MOV +/oral histories/lorenzo_s1_m_20130202_quc/raws/footage/clips/MVI_9359.MOV +/oral histories/octavia_s1_f_20130203_-hes/raws/footage/clips/hessian1.MOV +/oral histories/vitória_s1_f_20140729_por/raws/footage/clips/MVI_9926.MOV +/oral histories/joel_s2_m_20130215_eng+heb/raws/footage/clips/MVI_9504.MOV +/oral histories/sofia_s2_f_20130203_eng+rus/raws/footage/clips/MVI_9399.MOV +/oral histories/josé_s1_m_20140729_spa/raws/footage/clips/MVI_0016.MOV +/oral histories/kiem_s1_m_20151215_vie/raws/footage/clips/MVI_9460.MOV +/oral histories/Emily_s1_F_20130309_nor/Emily_s1_F_20130309_nor.jpg +/oral histories/emily_s1_f_20130309_nor/raws/thumbnail/LVgPVPbKQFePjr8zWo6q_Emily_s1_F_20130309_nor.png +/oral histories/emily_s1_f_20130309_nor/raws/premier project/adobe premiere pro preview files/norwegian-emily.PRV/182e43b1-8d66-402a-b7a3-e37313296145+86ffc9fd73fe236e6ad7b5e 32000.pek +/oral histories/emily_s1_f_20130309_nor/raws/premier project/adobe premiere pro preview files/norwegian-emily.PRV/8c0508ff-affa-4b72-a59b-1620569c38a7+b15535a9160e8ebc4eea1309 32000.pek +/oral histories/emily_s1_f_20130309_nor/raws/premier project/adobe premiere pro preview files/norwegian-emily.PRV/cc2d0926-895c-43cb-8319-9745b9918549+19c35bc033c8e319caad718d 32000.pek +/oral histories/emily_s1_f_20130309_nor/raws/premier project/adobe premiere pro preview files/norwegian-emily.PRV/0e382a22-51e8-4739-9cce-e9d1429b58ee+b1dbbf75dbde8f4c3fe24100 32000.cfa +/oral histories/emily_s1_f_20130309_nor/raws/premier project/adobe premiere pro preview files/norwegian-emily.PRV/cc2d0926-895c-43cb-8319-9745b9918549+19c35bc033c8e319caad718d 32000.cfa +/oral histories/emily_s1_f_20130309_nor/raws/premier project/adobe premiere pro preview files/norwegian-emily.PRV/8c0508ff-affa-4b72-a59b-1620569c38a7+b15535a9160e8ebc4eea1309 32000.cfa +/oral histories/emily_s1_f_20130309_nor/raws/thumbnail/_MG_9600.CR2 +/oral histories/emily_s1_f_20130309_nor/raws/thumbnail/_MG_9601.CR2 +/oral histories/emily_s1_f_20130309_nor/raws/thumbnail/_MG_9603.CR2 +/oral histories/emily_s1_f_20130309_nor/raws/thumbnail/_MG_9597.CR2 +/oral histories/emily_s1_f_20130309_nor/raws/thumbnail/_MG_9599.CR2 +/oral histories/Ona_s1_F_20130329_cat/Ona_s1_F_20130329_cat.mp4 +/oral histories/emily_s1_f_20130309_nor/raws/thumbnail/_MG_9598.CR2 +/oral histories/Ona_s1_F_20130329_cat/Ona_s1_F_20130329_cat.jpg +/oral histories/emily_s1_f_20130309_nor/raws/premier project/adobe premiere pro preview files/norwegian-emily.PRV/182e43b1-8d66-402a-b7a3-e37313296145+86ffc9fd73fe236e6ad7b5e 32000.cfa +/oral histories/Emily_s1_F_20130309_nor/Emily_s1_F_20130309_nor.mp4 +/oral histories/Krzyś_s1_M_20130329_pol/Krzyś_s1_M_20130329_pol.jpg +/oral histories/krzyś_s1_m_20130329_pol/raws/thumbnail/QT2salzlToafhRlUJ6AB_krysz.png +/oral histories/Pascal_s1_M_20130510_deu/Pascal_s1_M_20130510_deu.mp4 +/oral histories/Pascal_s1_M_20130510_deu/Pascal_s1_M_20130510_deu.jpg +/oral histories/pascal_s1_m_20130510_deu/raws/thumbnail/7Mc2wDbTSW9PbQE5LTwD_pascal.png +/oral histories/jane_s1_f_20130530_eng/raws/thumbnail/tbu1z3hQQeicrrGQvjvQ_jane.png +/oral histories/Jane_s1_F_20130530_eng/Jane_s1_F_20130530_eng.mp4 +/oral histories/david_s2_m_20140923_sco+eng/raws/thumbnail/I6SOFe3CREGsqMb1bc4x_David_s2_M_20140923_sco+eng.png +/oral histories/david_s2_m_20140923_sco+eng/raws/footage/audio/STE-008.wav +/oral histories/David_s2_M_20140923_sco+eng/David_s2_M_20140923_sco+eng.mp4 +/oral histories/emily_s1_f_20130309_nor/raws/footage/clips/MVI_9596.MOV +/oral histories/anonymous_s1__20141215_udi/raws/footage/clips/udi3.MOV +/oral histories/anonymous_s1__20141215_udi/raws/footage/clips/udi2.MOV +/oral histories/pavlin_s1_m_20140729_sqi/raws/footage/clips/IMG_0241-191.MOV +/Oral Histories/Soner_s1_M_20151119_lzz/raws/footage/soner-laz2.MOV +/Oral Histories/Soner_s1_M_20151119_lzz/raws/footage/soner-laz3.MOV +/oral histories/tarlan_s1__20140729_azj/raws/footage/clips/IMG_0500-244.MOV +/Oral Histories/Isayev_s1_M_20141029_ava/raws/footage/clips/avar.MOV +/Oral Histories/Isayev_s1_M_20141029_ava/raws/footage/clips/avar2.MOV +/oral histories/david_s2_m_20140923_sco+eng/raws/footage/clips/MVI_9425.MOV +/oral histories/ólöf_s1_f_20140101_isl/raws/footage/clips/Olof tala islensku - Olof speaking Icelandic.mp4 +/Oral Histories/Marco_s3_M_20150926_ita+vec+cim/raws/footage/clips/Marco_speaking_Italian_Veneto_and_Cimbrian_1.MOV +/Oral Histories/Marco_s3_M_20150926_ita+vec+cim/raws/footage/clips/Marco_speaking_Italian_Veneto_and_Cimbrian_2.MOV +/Oral Histories/Andrea_s1_M_20151117_lld/raws/footage/clips/Andrea_Speaking_Solandro_2.MOV +/Oral Histories/Andrea_s1_M_20151117_lld/raws/footage/clips/Andrea_speaking_Solandro_3.MOV +/oral histories/Dolma_s1_F_20160717_nep/Dolma_s1_F_20160717_nep.jpg +/oral histories/Dolma_s1_F_20160717_nep/Dolma_s1_F_20160717_xsr.jpg +/oral histories/dolma_s1_f_20160717_nep/raws/footage/audio/STE-008.wav +/oral histories/dolma_s1_f_20160717_nep/raws/footage/clips/MVI_0168.MOV +/oral histories/dolma_s1_f_20160717_nep/raws/Premier Project/Dolma_s1_F_20160717_xsr.prproj +/oral histories/dolma_s1_f_20160717_nep/raws/Premier Project/Tenzin_s1_F_20160717_bod.prproj +/oral histories/dolma_s1_f_20160717_nep/raws/thumbnail/Screen Shot 2017-01-17 at 17.15.01.png +/oral histories/madeleine's videos/2014/IMG_0241-191.MOV +/oral histories/madeleine's videos/2014/IMG_0275-219.MOV +/oral histories/madeleine's videos/2014/IMG_0395-245.MOV +/oral histories/madeleine's videos/2014/IMG_0415-234.MOV +/oral histories/madeleine's videos/2014/IMG_0487-38.MOV +/oral histories/madeleine's videos/2014/IMG_0488-201.MOV +/oral histories/madeleine's videos/2014/IMG_0490-57.MOV +/oral histories/madeleine's videos/2014/IMG_0491-54.MOV +/oral histories/madeleine's videos/2014/IMG_0492-140.MOV +/oral histories/madeleine's videos/2014/IMG_0498-242.MOV +/oral histories/madeleine's videos/2014/IMG_0500-244.MOV +/oral histories/madeleine's videos/2015/13 July Osh/IMG_0899.MOV +/oral histories/madeleine's videos/2015/iTalk 2015/may 4.aiff +/oral histories/madeleine's videos/2015/iTalk 2015/Untitled.aiff +/oral histories/madeleine's videos/2015/20 June Elista/IMG_0759.MOV +/oral histories/madeleine's videos/2015/8 May Derbent/IMG_0606.MOV +/oral histories/madeleine's videos/2015/8 May Derbent/IMG_0607.MOV +/oral histories/madeleine's videos/2015/8 May Derbent/IMG_0608.MOV +/oral histories/madeleine's videos/2015/8 May Derbent/IMG_0627.MOV +/oral histories/madeleine's videos/2015/8 May Derbent/IMG_0628.MOV +/oral histories/madeleine's videos/2015/8 May Derbent/IMG_0646.MOV +/oral histories/madeleine's videos/2015/8 May Derbent/IMG_0654.MOV +/oral histories/madeleine's videos/2015/8 May Derbent/IMG_1139.MOV +/oral histories/madeleine's videos/2015/8 May Derbent/IMG_1140.MOV +/oral histories/madeleine's videos/2015/8 May Derbent/IMG_1142.MOV +/oral histories/madeleine's videos/2015/iTalk 2015/may 4th 2.aiff +/oral histories/madeleine's videos/2015/10 July Kochkor/IMG_0839.MOV +/oral histories/madeleine's videos/2015/10 July Kochkor/IMG_0841.MOV +/oral histories/madeleine's videos/2015/10 July Kochkor/IMG_0854.MOV +/oral histories/madeleine's videos/2015/10 July Kochkor/IMG_0900.MOV +/oral histories/madeleine's videos/2015/10 May Pyatigorsk/IMG_0696.MOV +/oral histories/madeleine's videos/2015/19 June Elista/IMG_0751.MOV +/oral histories/madeleine's videos/2015/19 June Elista/IMG_0752.MOV +/oral histories/madeleine's videos/2015/20 June Elista/IMG_0758.MOV +/oral histories/madeleine's videos/2015/22 June Astrakhan/IMG_0762.MOV +/oral histories/madeleine's videos/2015/22 June Astrakhan/IMG_0763.MOV +/oral histories/madeleine's videos/2015/24 June Atyrau/IMG_0768.MOV +/oral histories/madeleine's videos/2015/3 May Nalchik (continued)/2015-05-03 21.21.55.mov +/oral histories/madeleine's videos/2015/3 May Nalchik (continued)/2015-05-03 21.27.15.mov +/oral histories/madeleine's videos/2015/4 May Vladikavkaz/IMG_0527.MOV +/oral histories/madeleine's videos/2015/4 May Vladikavkaz/IMG_0528.MOV +/oral histories/madeleine's videos/2015/4 May Vladikavkaz/IMG_0529.MOV +/oral histories/madeleine's videos/2015/4 May Vladikavkaz/IMG_0531.MOV +/oral histories/madeleine's videos/2015/5 May Vladikavkaz/IMG_0533.MOV +/oral histories/madeleine's videos/2015/5 May Vladikavkaz/IMG_0534.MOV +/oral histories/madeleine's videos/2015/5 May Vladikavkaz/IMG_0538.MOV +/oral histories/madeleine's videos/2015/5 May Vladikavkaz/IMG_0539.MOV +/oral histories/madeleine's videos/2015/5 May Vladikavkaz/IMG_0540.MOV +/oral histories/madeleine's videos/2015/5 May Vladikavkaz/IMG_0542.MOV +/oral histories/madeleine's videos/2015/5 May Vladikavkaz/IMG_0543.MOV +/oral histories/madeleine's videos/2015/5 May Vladikavkaz/IMG_0544.MOV +/oral histories/madeleine's videos/2015/6 May Makhachkala/IMG_0576.MOV +/oral histories/madeleine's videos/2015/6 May Makhachkala/IMG_0577.MOV +/oral histories/madeleine's videos/2015/6 May Makhachkala/IMG_0583.MOV +/oral histories/madeleine's videos/2015/6 May Makhachkala/IMG_0585.MOV +/oral histories/madeleine's videos/2015/6 May Makhachkala/IMG_0586.MOV +/oral histories/madeleine's videos/2015/7 May Makhachkala/IMG_0587.MOV +/oral histories/madeleine's videos/2015/7 May Makhachkala/IMG_0589.MOV +/oral histories/madeleine's videos/2015/7 May Makhachkala/IMG_0590.MOV +/oral histories/madeleine's videos/2015/7 May Makhachkala/IMG_0591.MOV +/oral histories/madeleine's videos/2015/7 May Makhachkala/IMG_0597.MOV +/oral histories/madeleine's videos/2015/8 May Derbent/2015-05-08 17.55.36.mov +/oral histories/madeleine's videos/2015/8 May Derbent/2015-05-08 17.58.16.mov +/oral histories/madeleine's videos/2015/iTalk 2015/20 June elista temple.aiff +/oral histories/madeleine's videos/2015/iTalk 2015/Armenian church derbent.aiff +/oral histories/madeleine's videos/2015/iTalk 2015/astrakhan June 22 mosque.aiff +/oral histories/madeleine's videos/2015/iTalk 2015/bokonbaevo yurt camp 2.aiff +/oral histories/madeleine's videos/2015/iTalk 2015/derbent may 8 office.aiff +/oral histories/madeleine's videos/2015/iTalk 2015/derbent wine factory 1.aiff +/oral histories/madeleine's videos/2015/iTalk 2015/groznij youth club may 9.aiff +/oral histories/madeleine's videos/2015/iTalk 2015/groznij youth group 2.aiff +/oral histories/madeleine's videos/2015/iTalk 2015/July 10 kochkor home.aiff +/oral histories/madeleine's videos/2015/iTalk 2015/July 13 Osh street.aiff +/oral histories/madeleine's videos/2015/iTalk 2015/June 22 astrakhan.aiff +/oral histories/madeleine's videos/2015/iTalk 2015/kochkor july 10.aiff +/oral histories/madeleine's videos/2015/iTalk 2015/may 5 university.aiff +/oral histories/madeleine's videos/2015/iTalk 2015/may 5th university 2.aiff +/oral histories/madeleine's videos/2015/iTalk 2015/may 5th university 3.aiff +/oral histories/madeleine's videos/2015/iTalk 2015/may 6 nargis kitchen.aiff +/oral histories/madeleine's videos/2015/iTalk 2015/may 6th nargis home.aiff +/oral histories/madeleine's videos/2015/iTalk 2015/may 7th Tom Farr.aiff +/oral histories/madeleine's videos/2015/iTalk 2015/may 9 groznij theatre.aiff +/oral histories/madeleine's videos/2015/iTalk 2015/mayor derbent.aiff +/oral histories/madeleine's videos/2015/iTalk 2015/mayors office three.aiff +/oral histories/madeleine's videos/2015/iTalk 2015/атырау June 24.aiff +/oral histories/madeleine's videos/2015/iTalk 2015/грозный театр 3.aiff +/oral histories/madeleine's videos/2015/iTalk 2015/пери инновации may 7.aiff +/oral histories/madeleine's videos/2015/iTalk 2015/Рашид Аликаев.aiff +/oral histories/madeleine's videos/2015/iTalk 2015/село боконбаева юрточный лагерь белтам.aiff +/oral histories/madeleine's videos/2015/9 May Grozny/IMG_0671.MOV +/oral histories/madeleine's videos/2015/9 May Grozny/IMG_0680.MOV +/oral histories/madeleine's videos/2015/9 May Grozny/IMG_0683.MOV +/oral histories/madeleine's videos/2015/9 May Grozny/IMG_0675.MOV +/oral histories/madeleine's videos/2015/9 May Grozny/IMG_0676.MOV +/oral histories/madeleine's videos/2015/9 May Grozny/IMG_0682.MOV +/oral histories/madeleine's videos/2015/9 May Grozny/IMG_0674.MOV +/oral histories/madeleine's videos/2015/9 May Grozny/IMG_0678.MOV +/oral histories/Kimberly_s1_F_20130303_lkt/Kimberly_s1_F_20130303_lkt.mp4 +/oral histories/Kimberly_s1_F_20130303_lkt/Kimberly_s1_F_20130303_lkt.jpg +/oral histories/oluchel_s1_f_20160824_pau/raws/thumbnail/Screen Shot 2017-03-01 at 15.17.45.png +/oral histories/oluchel_s1_f_20160824_pau/raws/thumbnail/Screen Shot 2017-03-01 at 15.17.51.png +/oral histories/oluchel_s1_f_20160824_pau/raws/thumbnail/Screen Shot 2017-03-01 at 15.17.54.png +/oral histories/oluchel_s1_f_20160824_pau/raws/thumbnail/Screen Shot 2017-03-01 at 15.17.57.png +/oral histories/oluchel_s1_f_20160824_pau/raws/thumbnail/Screen Shot 2017-03-01 at 15.18.01.png +/oral histories/oluchel_s1_f_20160824_pau/raws/thumbnail/Screen Shot 2017-03-01 at 15.18.30.png +/Oral Histories/Arlon_s1_M_20170127_vec/raws/thumbnail/Screen Shot 2017-03-01 at 15.28.02.png +/Oral Histories/Sali_s1_M_20161130_bul/raws/thumbnail/Screen Shot 2017-03-01 at 16.17.05.png +/Oral Histories/Sali_s1_M_20161130_bul/raws/thumbnail/Screen Shot 2017-03-01 at 16.18.37.png +/Oral Histories/Tom_s1_M_20150526_kor/raws/thumbnail/Screen Shot 2017-03-01 at 16.27.18.png +/Oral Histories/Giacomo_s1_M_20140729_rgn/raws/thumbnail/Screen Shot 2017-03-01 at 16.37.51.png +/Oral Histories/Giacomo_s1_M_20140729_rgn/raws/thumbnail/Screen Shot 2017-03-01 at 16.37.48.png +/Oral Histories/Iasmin_s2_F_20150612_yue+eng/raws/thumbnail/Screen Shot 2017-03-01 at 16.50.19.png +/Oral Histories/Amu_s1_M_20140729_tso/raws/footage/clips/Amu speaks XiTsonga.mov +/Oral Histories/Amu_s1_M_20140729_tso/raws/thumbnail/Screen Shot 2017-03-01 at 16.53.34.png +/oral histories/dora_s1_f_20151217_eng/raws/thumbnail/Screen Shot 2017-03-01 at 19.45.32.png +/oral histories/dora_s1_f_20151217_eng/raws/thumbnail/Screen Shot 2017-03-01 at 19.46.02.png +/oral histories/dora_s1_f_20151217_eng/raws/thumbnail/Screen Shot 2017-03-01 at 19.44.56.png +/oral histories/dora_s1_f_20151217_eng/raws/thumbnail/Screen Shot 2017-03-01 at 19.42.35.png +/oral histories/dora_s1_f_20151217_eng/raws/thumbnail/Screen Shot 2017-03-01 at 19.41.58.png +/Oral Histories/Evgenii_s1_M_20170214_ckt/raws/thumbnail/Screen Shot 2017-03-01 at 21.02.19.png +/oral histories/oluchel_s1_f_20160824_pau/raws/premier project/adobe premiere pro audio previews/Oluchel_s1_F_20160824_pau.PRV/ab13f566-336b-4e92-944c-39d4400d8af0+a614680d-6b8c-edd7-ba5a-6bfa00000049 48000.cfa +/oral histories/oluchel_s1_f_20160824_pau/raws/footage/clips/Oluchel Audio Extracted.pkf +/oral histories/oluchel_s1_f_20160824_pau/raws/footage/clips/Oluchel Audio Extracted.wav +/oral histories/oluchel_s1_f_20160824_pau/raws/premier project/adobe premiere pro audio previews/Oluchel_s1_F_20160824_pau.PRV/b8a9475e-c864-4c5d-b383-0408c6ecde74+cb1c9d39-375f-e0ca-a2c0-c38e00000069 48000.cfa +/oral histories/Oluchel_s1_F_20160824_pau/Oluchel_s1_F_20160824_pau.mp4 +/oral histories/oluchel_s1_f_20160824_pau/raws/Premier Project/Oluchel_s1_F_20160824_pau.prproj +/Oral Histories/Arlon_s1_M_20170127_vec/raws/footage/clips/Arlon_s1_M_20170127_vec Audio Extracted.pkf +/Oral Histories/Arlon_s1_M_20170127_vec/raws/footage/clips/Arlon_s1_M_20170127_vec Audio Extracted.wav +/Oral Histories/Arlon_s1_M_20170127_vec/raws/footage/clips/Arlon_s1_M_20170127_vec Audio Extracted Audio Extracted.pkf +/Oral Histories/Arlon_s1_M_20170127_vec/raws/Premier Project/Arlon_s1_M_20170127_vec.prproj +/Oral Histories/Sali_s1_M_20161130_bul/raws/footage/clips/Pomak - Sali Audio Extracted.pkf +/Oral Histories/Sali_s1_M_20161130_bul/raws/footage/clips/Pomak - Sali Audio Extracted.wav +/Oral Histories/Sali_s1_M_20161130_bul/raws/Premier Project/Sali_s1_M_20161130_bul.prproj +/Oral Histories/Tom_s1_M_20150526_kor/raws/footage/clips/Tom speaking korean Audio Extracted.pkf +/Oral Histories/Tom_s1_M_20150526_kor/raws/footage/clips/Tom speaking korean Audio Extracted.wav +/Oral Histories/Sali_s1_M_20161130_bul/Sali_s1_M_20161130_bul.mp4 +/oral histories/tom_s1_m_20150526_kor/raws/premier project/Adobe Premiere Pro Auto-Save/Tom_s1_M_20150526_kor-1.prproj +/Oral Histories/Tom_s1_M_20150526_kor/Tom_s1_M_20150526_kor.mp4 +/Oral Histories/Tom_s1_M_20150526_kor/raws/Premier Project/Tom_s1_M_20150526_kor.prproj +/oral histories/giacomo_s1_m_20140729_rgn/raws/footage/audio/STE-012.wav +/oral histories/giacomo_s1_m_20140729_rgn/raws/premier project/Adobe Premiere Pro Auto-Save/Giacomo_s1_M_20140729_rgn-1.prproj +/Oral Histories/Evelyn_s1_F_20150630_deu/raws/footage/converted/MVI_9943.mov +/oral histories/giacomo_s1_m_20140729_rgn/raws/premier project/Adobe Premiere Pro Auto-Save/Giacomo_s1_M_20140729_rgn-2.prproj +/Oral Histories/Iasmin_s2_F_20150612_yue+eng/raws/footage/clips/Iasmin_s2_F_20150612_yue+eng Audio Extracted.pkf +/Oral Histories/Iasmin_s2_F_20150612_yue+eng/raws/Premier Project/Iasmin_s2_F_20150612_yue+eng.prproj +/oral histories/giacomo_s1_m_20140729_rgn/raws/footage/audio/STE-012 Audio Extracted.pkf +/oral histories/giacomo_s1_m_20140729_rgn/raws/footage/audio/STE-012 Audio Extracted_1.pkf +/oral histories/giacomo_s1_m_20140729_rgn/raws/footage/audio/STE-012 Audio Extracted_1.wav +/Oral Histories/Giacomo_s1_M_20140729_rgn/raws/Premier Project/Giacomo_s1_M_20140729_rgn.prproj +/Oral Histories/Evgenii_s1_M_20170214_ckt/raws/footage/clips/Evgenii_s1_M_20170214_ckt Audio Extracted.pkf +/Oral Histories/Evgenii_s1_M_20170214_ckt/raws/Premier Project/Evgenii_s1_M_20170214_ckt.prproj +/oral histories/dora_s1_f_20151217_eng/raws/footage/converted/MVI_9433.mov +/Oral Histories/Amu_s1_M_20140729_tso/raws/footage/clips/Amu speaks XiTsonga Audio Extracted.pkf +/Oral Histories/Amu_s1_M_20140729_tso/raws/Premier Project/Amu_s1_M_20140729_tso.prproj +/Oral Histories/Evelyn_s1_F_20150630_deu/raws/footage/converted/MVI_9943 Audio Extracted.pkf +/Oral Histories/Evelyn_s1_F_20150630_deu/raws/footage/converted/MVI_9943 Audio Extracted.wav +/oral histories/dora_s1_f_20151217_eng/raws/footage/audio/STE-017.wav +/oral histories/dora_s1_f_20151217_eng/raws/footage/audio/STE-017 Audio Extracted.pkf +/oral histories/dora_s1_f_20151217_eng/raws/footage/audio/ste-017 audio extracted.wav +/Oral Histories/Iasmin_s2_F_20150612_yue+eng/Iasmin_s2_F_20150612_yue+eng.mp4 +/oral histories/dora_s1_f_20151217_eng/raws/premier project/Adobe Premiere Pro Auto-Save/Dora_s1_F_20151217_eng-1.prproj +/Oral Histories/Evgenii_s1_M_20170214_ckt/Evgenii_s1_M_20170214_ckt.mp4 +/Oral Histories/Giacomo_s1_M_20140729_rgn/Giacomo_s1_M_20140729_rgn.mp4 +/Oral Histories/Evelyn_s1_F_20150630_deu/Evelyn_s1_F_20150630_deu.mp4 +/oral histories/Dora_s1_F_20151217_eng/Dora_s1_F_20151217_eng.mp4 +/Oral Histories/Tom_s1_M_20150526_kor/Tom_s1_M_20150526_kor.jpg +/Oral Histories/Giacomo_s1_M_20140729_rgn/Giacomo_s1_M_20140729_rgn.jpg +/Oral Histories/Iasmin_s2_F_20150612_yue+eng/Iasmin_s2_F_20150612_yue+eng.jpg +/Oral Histories/Amu_s1_M_20140729_tso/Amu_s1_M_20140729_tso.jpg +/Oral Histories/Evelyn_s1_F_20150630_deu/Evelyn_s1_F_20150630_deu.jpg +/oral histories/Dora_s1_F_20151217_eng/Lena_s1_F_20140729_dan.jpg +/oral histories/marapun_s1_m_20170329_tam/raws/footage/clips/Marapun Speaking Tamil.mp4 +/oral histories/lgeik'i heather & naakil.aan hans_s1_fm_20170329_tli/raws/footage/audio/Lingit_Audio_2017.03.03_15.36_01.WAV +/oral histories/lgeik'i heather & naakil.aan hans_s1_fm_20170329_tli/raws/footage/clips/Lingit_Video.MOV +/oral histories/hiroyuki_s1__20170329_mvi/raws/footage/clips/Miyako_Video.MOV +/oral histories/isabel_s1_f_20150815_mwl/raws/thumbnail/CWVcnqKqTB2ctDk2BiNx_isabel-mwl-thum-raw.png +/oral histories/marapun_s1_m_20170329_tam/raws/thumbnail/Screen Shot 2017-04-03 at 15.03.47.png +/Oral Histories/Asimenia_s2_F_20161130_ell+pnt/raws/thumbnail/Screen Shot 2017-04-03 at 15.34.35.png +/oral histories/lgeik'i heather & naakil.aan hans_s1_fm_20170329_tli/raws/thumbnail/Screen Shot 2017-04-03 at 15.44.39.png +/Oral Histories/Augusto_s1_M_20140729_por/raws/thumbnail/Screen Shot 2017-04-03 at 15.50.19.png +/oral histories/isabel_s1_f_20150815_mwl/raws/footage/converted/MVI_9957.mov +/oral histories/isabel_s1_f_20150815_mwl/raws/premier project/adobe premiere pro audio previews/isabel_s1_f_20150815_mwl.prv/Peak Files/cd3a463c-940f-45a0-9d54-32e8d091f238+10e3fffb-99e8-9d83-bc84-28b700000049 48000.pek +/oral histories/isabel_s1_f_20150815_mwl/raws/footage/audio/Isabel Mirandês Audio Extracted.pkf +/oral histories/isabel_s1_f_20150815_mwl/raws/premier project/adobe premiere pro audio previews/Isabel_s1_F_20150815_mwl.PRV/cd3a463c-940f-45a0-9d54-32e8d091f238+10e3fffb-99e8-9d83-bc84-28b700000049 48000.cfa +/oral histories/isabel_s1_f_20150815_mwl/raws/Premier Project/Isabel_s1_F_20150815_mwl.prproj +/oral histories/Isabel_s1_F_20150815_mwl/Isabel_s1_F_20150815_mwl.jpg +/oral histories/Isabel_s1_F_20150815_mwl/Isabel_s1_F_20150815_mwl.mp4 +/oral histories/isabel_s1_f_20150815_mwl/raws/footage/converted/MVI_9956.mov +/Oral Histories/Diego_s6_M_20170403_por+spa+ita+fra+eng+deu/raws/footage/clips/Diego_s6_M_20170403_por+spa+ita+fra+eng+deu.mp4 +/Oral Histories/Sedang_s1_F_20170402_iba/raws/footage/clips/Sedang Speaking Iban.mp4 +/Oral Histories/Sedang_s1_F_20170402_iba/readme.txt +/Oral Histories/Stefan_s1_M_20170331_ron/raws/footage/clips/TalharulPedepsit.mp4 +/Oral Histories/Zairul_s1_M_20170402_zsm/raws/footage/clips/Zairul Speaking Malay.mp4 +/Oral Histories/Zairul_s1_M_20170402_zsm/readme.txt +/oral histories/marapun_s1_m_20170329_tam/raws/footage/clips/Marapun Speaking Tamil Audio Extracted.pkf +/oral histories/Marapun_s1_M_20170329_tam/Marapun_s1_M_20170329_tam.jpg +/oral histories/Marapun_s1_M_20170329_tam/Marapun_s1_M_20170329_tam.mp4 +/oral histories/marapun_s1_m_20170329_tam/raws/Premier Project/Marapun_s1_M_20170329_tam.prproj +/Oral Histories/Alexander_s1_M_20160711_bre/raws/Premiere proejct/Adobe Premiere Pro Auto-Save/Alexander_s1_M_20160711_bre-4.prproj +/Oral Histories/Alexander_s1_M_20160711_bre/raws/Premiere proejct/Adobe Premiere Pro Auto-Save/Alexander_s1_M_20160711_bre-5.prproj +/oral histories/alexander_s1_m_20160711_bre/raws/footage/clips/Breton.avi +/Oral Histories/Alexander_s1_M_20160711_bre/raws/Premiere proejct/Adobe Premiere Pro Auto-Save/Alexander_s1_M_20160711_bre-6.prproj +/Oral Histories/Alexander_s1_M_20160711_bre/raws/Premiere proejct/Alexander_s1_M_20160711_bre.prproj +/Oral Histories/Alexander_s1_M_20160711_bre/Alexander_s1_M_20160711_bre.mp4 +/oral histories/Ryan_s1_M_20160415_yol/Ryan speaking Yola.jpg +/oral histories/ryan_s1_m_20160415_yol/raws/Premier Project/Ryan speaking Yola.prproj +/oral histories/ryan_s1_m_20160415_yol/raws/Premier Project/Adobe Premiere Pro Preview Files/Ryan speaking Yola.PRV/Rendered - 9c20dda1-0f40-43fa-94ec-82a0f31f16e0.xmp +/oral histories/ryan_s1_m_20160415_yol/raws/Premier Project/Adobe Premiere Pro Preview Files/Ryan speaking Yola.PRV/Rendered - 790eeee6-3268-4991-833d-49edbdc797cc.xmp +/oral histories/ryan_s1_m_20160415_yol/raws/Premier Project/Adobe Premiere Pro Preview Files/Ryan speaking Yola.PRV/Rendered - 790eeee6-3268-4991-833d-49edbdc797cc.mpeg +/oral histories/ryan_s1_m_20160415_yol/raws/Premier Project/Adobe Premiere Pro Preview Files/Ryan speaking Yola.PRV/Rendered - 4b96b0b1-e815-4b0d-a1ba-9ac8bc6bbeaa.xmp +/oral histories/ryan_s1_m_20160415_yol/raws/Premier Project/Adobe Premiere Pro Preview Files/Ryan speaking Yola.PRV/Rendered - 097ae773-1b68-4793-9ec0-1e00e95d9c77.xmp +/oral histories/ryan_s1_m_20160415_yol/raws/Premier Project/Adobe Premiere Pro Preview Files/Ryan speaking Yola.PRV/Rendered - 097ae773-1b68-4793-9ec0-1e00e95d9c77.mpeg +/oral histories/ryan_s1_m_20160415_yol/raws/Premier Project/Adobe Premiere Pro Auto-Save/Ryan speaking Yola-1.prproj +/Oral Histories/Leo_s1_M_20141228_spa/Leo speaking Spanish.jpg +/oral histories/dragan_s1_m_20150904_srp/raws/Footage/Dragan - Serbian Audio Extracted.pkf +/oral histories/dragan_s1_m_20150904_srp/raws/Footage/Dragan - Serbian Audio Extracted.wav +/oral histories/dragan_s1_m_20150904_srp/raws/premiere project/Adobe Premiere Pro Auto-Save/Dragan speaking Serbian-1.prproj +/oral histories/dragan_s1_m_20150904_srp/raws/premiere project/Adobe Premiere Pro Auto-Save/Dragan speaking Serbian_1-1.prproj +/oral histories/dragan_s1_m_20150904_srp/raws/premiere project/adobe premiere pro preview files/Dragan speaking Serbian.PRV/Rendered - a6bf4404-d0d7-457b-a299-27dcb23e5f70.xmp +/oral histories/dragan_s1_m_20150904_srp/raws/Premiere Project/Dragan speaking Serbian_1.prproj +/oral histories/dragan_s1_m_20150904_srp/raws/Thumbnail/Dragan speaking Serbian.jpg +/oral histories/dragan_s1_m_20150904_srp/raws/Thumbnail/raw_thumbnail1.png +/oral histories/dragan_s1_m_20150904_srp/raws/Thumbnail/raw_thumbnail3.png +/oral histories/Ivy_s1_F_20151214_wuu/Ivy speaking Shanghainese.jpg +/oral histories/ivy_s1_f_20151214_wuu/raws/Premier Project/Ivy speaking Shanghainese.prproj +/oral histories/ivy_s1_f_20151214_wuu/raws/thumbnail/Screen Shot 2016-04-23 at 2.25.48 PM.png +/oral histories/ivy_s1_f_20151214_wuu/raws/thumbnail/Screen Shot 2016-04-23 at 2.25.54 PM.png +/oral histories/ivy_s1_f_20151214_wuu/raws/thumbnail/Screen Shot 2016-04-23 at 2.26.01 PM.png +/oral histories/__s1_f_20170313_dty/raws/footage/clips/Woman explaining in Achhami dialect about recipe of mutton curry and chicken curry.mp4 +/oral histories/__s1_f_20170313_dty/raws/thumbnail/Screen Shot 2017-04-03 at 15.20.04.png +/oral histories/__s1_F_20170313_dty/readme.txt +/oral histories/__s1_f_20170313_dty/raws/footage/clips/Woman explaining in Achhami dialect about recipe of mutton curry and chicken curry Audio Extracted.wav +/oral histories/__s1_f_20170313_dty/raws/premier project/Adobe Premiere Pro Auto-Save/__s1_F_20170313_dty-1.prproj +/oral histories/__s1_f_20170313_dty/raws/Premier Project/__s1_F_20170313_dty.prproj +/oral histories/__s1_F_20170313_dty/__s1_F_20170313_dty.mp4 +/oral histories/__s1_F_20170313_dty/__s1_F_20170313_dty.jpg +/Oral Histories/Asimenia_s2_F_20161130_ell+pnt/raws/footage/clips/Caucasian Greek - Asimenia Audio Extracted.pkf +/Oral Histories/Asimenia_s2_F_20161130_ell+pnt/Asimenia_s2_F_20161130_ell+pnt.mp4 +/Oral Histories/Asimenia_s2_F_20161130_ell+pnt/Asimenia_s2_F_20161130_ell+pnt.jpg +/Oral Histories/Asimenia_s2_F_20161130_ell+pnt/raws/Premier Project/Asimenia_s2_F_20161130_ell+pnt.prproj +/Oral Histories/Casteline_s1_F_20170213_hat/raws/footage/clips/Casteline_s1_F_20170213_hat Audio Extracted.pkf +/Oral Histories/Casteline_s1_F_20170213_hat/raws/footage/clips/Casteline_s1_F_20170213_hat Audio Extracted.wav +/Oral Histories/Casteline_s1_F_20170213_hat/raws/Premier Project/Casteline_s1_F_20170213_hat.prproj +/oral histories/lgeik'i heather & naakil.aan hans_s1_fm_20170329_tli/raws/premier project/adobe premiere pro audio previews/lgeik'i heather & naakil.aan hans_s1_fm_20170329_tli.prv/Peak Files/1eedcce4-3644-4e80-aaff-30f7448ef58f+8bf38804-b2d9-458b-66c3-231800000049 96000.pek +/oral histories/lgeik'i heather & naakil.aan hans_s1_fm_20170329_tli/raws/premier project/adobe premiere pro audio previews/Lgeik'i Heather & Naakil.aan Hans_s1_FM_20170329_tli.PRV/1eedcce4-3644-4e80-aaff-30f7448ef58f+8bf38804-b2d9-458b-66c3-231800000049 96000.cfa +/oral histories/lgeik'i heather & naakil.aan hans_s1_fm_20170329_tli/raws/footage/audio/Lingit_Audio_2017.03.03_15.36_01 Audio Extracted.pkf +/oral histories/lgeik'i heather & naakil.aan hans_s1_fm_20170329_tli/raws/Premier Project/Lgeik'i Heather & Naakil.aan Hans_s1_FM_20170329_tli.prproj +/oral histories/Lgeik'i Heather & Naakil.aan Hans_s1_FM_20170329_tli/Lgeik'i Heather & Naakil.aan Hans_s1_FM_20170329_tli.mp4 +/Oral Histories/Augusto_s1_M_20140729_por/raws/footage/converted/MVI_9942.mov +/Oral Histories/Casteline_s1_F_20170213_hat/Casteline_s1_F_20170213_hat.mp4 +/Oral Histories/Diego_s6_M_20170403_por+spa+ita+fra+eng+deu/Diego_s6_M_20170403_por+spa+ita+fra+eng+deu.mp4 +/Oral Histories/Augusto_s1_M_20140729_por/raws/footage/clips/STE-019 Audio Extracted.pkf +/Oral Histories/Augusto_s1_M_20140729_por/raws/footage/clips/STE-020 Audio Extracted.pkf +/Oral Histories/Augusto_s1_M_20140729_por/raws/footage/clips/STE-020 Audio Extracted.wav +/oral histories/augusto_s1_m_20140729_por/raws/premier project/Adobe Premiere Pro Auto-Save/Augusto_s1_M_20140729_por-1.prproj +/oral histories/Lgeik'i Heather & Naakil.aan Hans_s1_FM_20170329_tli/Lgeik'i Heather & Naakil.aan Hans_s1_FM_20170329_tli.jpg +/Oral Histories/Augusto_s1_M_20140729_por/Augusto_s1_M_20140729_por.jpg +/Oral Histories/Augusto_s1_M_20140729_por/raws/Premier Project/Augusto_s1_M_20140729_por.prproj +/Oral Histories/Simon_s1_M_20160707_smj/raws/footage/clips/IMG_3099 Audio Extracted.wav +/Oral Histories/Simon_s1_M_20160707_smj/raws/footage/clips/IMG_3099.MOV +/Oral Histories/Simon_s1_M_20160707_smj/raws/footage/clips/IMG_3099.mp4 +/Oral Histories/Simon_s1_M_20160707_smj/Simon_s1_M_20160707_smj.mp4 +/Oral Histories/Simon_s1_M_20160707_smj/raws/Premier Project/Simon_s1_M_20160707_smj.prproj +/oral histories/simon_s1_m_20160707_smj/raws/premier project/adobe premiere pro preview files/Simon_s1_M_20160707_smj.PRV/0236c3c2-e75d-4848-a7e6-b0a6860d1b55+03eba6ce-329a-b1f2-3e44-819100000049 44100.cfa +/Oral Histories/Simon_s1_M_20160707_smj/raws/Premier Project/Simon_s1_M_20160707_smj_1.prproj +/Oral Histories/Diego_s6_M_20170403_por+spa+ita+fra+eng+deu/raws/thumbnail/Screen Shot 2017-04-20 at 16.32.04.png +/Oral Histories/Augusto_s1_M_20140729_por/Augusto_s1_M_20140729_por.mp4 +/oral histories/simon_s1_m_20160707_smj/raws/premier project/Adobe Premiere Pro Auto-Save/Simon_s1_M_20160707_smj_1-1.prproj +/Oral Histories/Diego_s6_M_20170403_por+spa+ita+fra+eng+deu/Diego_s6_M_20170403_por+spa+ita+fra+eng+deu.jpg +/Oral Histories/Simon_s1_M_20160707_smj/raws/thumbnail/mgawzA82QGiUiP8W9qVN_full_Simon_s1_M_20160707_smj.png +/oral histories/raluca_s1_f_20170421_ron/raws/footage/clips/VIDEO0014.mp4 +/oral histories/alessandro_s1_m_20170421_lij/raws/Premier Project/IMG_2019.MOV +/oral histories/thomas_s1_m_20170421_-gmw/raws/footage/clips/csoves video.mp4 +/oral histories/aneli_s5_f_20170425_eng+hrv+fra+spa+por/raws/footage/clips/Language challenge-No editing or post-production language video!.mp4 +/oral histories/siobhán_s1_f_20170425_gle/raws/thumbnail/_MG_0232.CR2 +/oral histories/prionsías_s1_f_20170425_gle/raws/footage/clips/MVI_0237.MOV +/oral histories/éanna_s1_m_20170425_gle/raws/footage/audio/enda, éanna speaking irish.aiff +/oral histories/frances_s1_f_20170425_gle/raws/footage/audio/Fran speaking Iris.aiff +/oral histories/prionsías_s1_f_20170425_gle/raws/footage/audio/prionsías speaking irish.aiff +/oral histories/éanna_s1_m_20170425_gle/raws/footage/clips/MVI_0234.MOV +/oral histories/prionsías_s1_f_20170425_gle/raws/footage/clips/MVI_0236.MOV +/oral histories/siobhán_s1_f_20170425_gle/raws/footage/clips/MVI_0233.MOV +/oral histories/siobhán_s1_f_20170425_gle/raws/footage/clips/MVI_0233 Audio Extracted Audio Extracted.wav +/oral histories/siobhán_s1_f_20170425_gle/raws/footage/clips/MVI_0233 Audio Extracted Audio Extracted.pkf +/oral histories/siobhán_s1_f_20170425_gle/raws/footage/audio/MVI_0233_mono_1.pkf +/oral histories/siobhán_s1_f_20170425_gle/raws/footage/audio/MVI_0233_mono_1 Audio Extracted.pkf +/oral histories/siobhán_s1_f_20170425_gle/raws/footage/audio/MVI_0233_mono_1 Audio Extracted.wav +/oral histories/siobhán_s1_f_20170425_gle/raws/premier project/Adobe Premiere Pro Auto-Save/Siobhán_s1_F_20170425_gle-1.prproj +/oral histories/siobhán_s1_f_20170425_gle/raws/premier project/Adobe Premiere Pro Auto-Save/Siobhán_s1_F_20170425_gle-2.prproj +/oral histories/Siobhán_s1_F_20170425_gle/Siobhán_s1_F_20170425_gle.mp4 +/oral histories/Siobhán_s1_F_20170425_gle/Siobhán_s1_F_20170425_gle.jpg +/oral histories/richard_s1_m_20170421_wya/raws/footage/clips/18015068_1292587224159833_6401143159727849472_n.mp4 +/oral histories/richard_s1_m_20170421_wya/raws/footage/clips/18015068_1292587224159833_6401143159727849472_n Audio Extracted.pkf +/oral histories/richard_s1_m_20170421_wya/raws/footage/clips/18015068_1292587224159833_6401143159727849472_n Audio Extracted.wav +/oral histories/Richard_s1_M_20170421_wya/Richard_s1_M_20170421_wya.mp4 +/oral histories/richard_s1_m_20170421_wya/raws/Premier Project/Richard_s1_M_20170421_wya.prproj +/oral histories/richard_s1_m_20170421_wya/raws/thumbnail/Screen Shot 2017-05-02 at 14.41.56.png +/oral histories/Musamoni_s1_F_20170426_ori/readme.txt +/oral histories/omar_s1_m_20170421_mnk/raws/thumbnail/Screen Shot 2017-05-02 at 14.58.43.png +/oral histories/aneli_s5_f_20170425_eng+hrv+fra+spa+por/raws/thumbnail/Screen Shot 2017-05-02 at 15.02.42.png +/oral histories/thomas_s1_m_20170421_-gmw/raws/thumbnail/Screen Shot 2017-05-02 at 15.32.49.png +/oral histories/musamoni_s1_f_20170426_ori/raws/thumbnail/Screen Shot 2017-05-02 at 14.53.27.png +/Oral Histories/Sedang_s1_F_20170402_iba/raws/thumbnail/Screen Shot 2017-05-02 at 15.46.21.png +/Oral Histories/Stefan_s1_M_20170331_ron/Stefan_s1_M_20170331_ron.mp4 +/oral histories/roberta_s1_f_20151214_lmo/raws/footage/clips/Trigolese Interview-italki.720p Audio Extracted.pkf +/oral histories/roberta_s1_f_20151214_lmo/raws/footage/clips/Trigolese Interview-italki.720p Audio Extracted.wav +/oral histories/roberta_s1_f_20151214_lmo/raws/Premier Project/Roberta_s1_F_20151214_lmo.prproj +/oral histories/roberta_s1_f_20151214_lmo/raws/thumbnail/Screen Shot 2017-01-31 at 15.39.58.png +/oral histories/Roberta_s1_F_20151214_lmo/Roberta_s1_F_20151214_lmo.jpg +/Oral Histories/Stefan_s1_M_20170331_ron/Stefan_s1_M_20170331_ron.jpg +/Oral Histories/Stefan_s1_M_20170331_ron/raws/Premier Project/Stefan_s1_M_20170331_ron.prproj +/oral histories/musamoni_s1_f_20170426_ori/raws/footage/clips/Oral traditions of Odisha - storytelling (commons).mov +/oral histories/musamoni_s1_f_20170426_ori/raws/premier project/Adobe Premiere Pro Auto-Save/Musamoni_s1_F_20170426_ori-2.prproj +/oral histories/musamoni_s1_f_20170426_ori/raws/Premier Project/Musamoni_s1_F_20170426_ori.prproj +/oral histories/omar_s1_m_20170421_mnk/raws/Premier Project/Omar_s1_M_20170421_mnk.prproj +/oral histories/aneli_s5_f_20170425_eng+hrv+fra+spa+por/raws/Premier Project/Aneli_s5_F_20170425_eng+hrv+fra+spa+por.prproj +/oral histories/aneli_s5_f_20170425_eng+hrv+fra+spa+por/raws/footage/clips/Language challenge-No editing or post-production language video! Audio Extracted.wav +/oral histories/Omar_s1_M_20170421_mnk/Omar_s1_M_20170421_mnk.mp4 +/oral histories/Musamoni_s1_F_20170426_ori/Musamoni_s1_F_20170426_ori.mp4 +/oral histories/Aneli_s5_F_20170425_eng+hrv+fra+spa+por/Aneli_s5_F_20170425_eng+hrv+fra+spa+por.mp4 +/oral histories/Musamoni_s1_F_20170426_ori/Musamoni_s1_F_20170426_ori.jpg +/oral histories/musamoni_s1_f_20170426_ori/raws/footage/audio/Oral histories of Odisha- Bahuna gita (commons) Audio Extracted.wav +/oral histories/musamoni_s1_f_20170426_ori/raws/footage/audio/Oral traditions of Odisha - storytelling (commons) Audio Extracted Audio Extracted.pkf +/oral histories/musamoni_s1_f_20170426_ori/raws/footage/audio/Oral traditions of Odisha - storytelling (commons) Audio Extracted Audio Extracted.wav +/oral histories/musamoni_s1_f_20170426_ori/raws/footage/audio/Oral traditions of Odisha - storytelling (commons) Audio Extracted.wav +/oral histories/Omar_s1_M_20170421_mnk/Omar_s1_M_20170421_mnk.jpg +/oral histories/Aneli_s5_F_20170425_eng+hrv+fra+spa+por/Aneli_s5_F_20170425_eng+hrv+fra+spa+por.jpg +/oral histories/gi_s2_f_20170509_lmo+ita/raws/footage/clips/Wikitongues Gi.m4v +/oral histories/hiroyuki_s1__20170329_mvi/raws/Premier Project/Hiroyuki_s1_M_20170329_mvi.prproj +/oral histories/thomas_s1_m_20170421_-gmw/raws/footage/clips/csoves video Audio Extracted.pkf +/oral histories/thomas_s1_m_20170421_-gmw/raws/Premier Project/Thomas_s1_M_20170421_-gmw.prproj +/oral histories/Hiroyuki_s1__20170329_mvi/Hiroyuki_s1_M_20170329_mvi.jpg +/oral histories/Thomas_s1_M_20170421_-gmw/Thomas_s1_M_20170421_-gmw.jpg +/oral histories/Thomas_s1_M_20170421_-gmw/Thomas_s1_M_20170421_-gmw.mp4 +/oral histories/thomas_s1_m_20170421_-gmw/raws/premier project/Adobe Premiere Pro Auto-Save/Thomas_s1_M_20170421_-gmw-1.prproj +/oral histories/camille_s1_f_20150815_fra/raws/premier project/adobe premiere pro audio previews/camille_s1_f_20150815_fra.prv/Peak Files/18ddb7c7-5e79-4532-a4a6-b4304017fafd+0aa27a65-cd6b-308c-db21-3a7900000049 48000.pek +/Oral Histories/Camille_s1_F_20150815_fra/raws/footage/clips/Camille français #2 Audio Extracted.wav +/oral histories/camille_s1_f_20150815_fra/raws/premier project/adobe premiere pro audio previews/Camille_s1_F_20150815_fra.PRV/18ddb7c7-5e79-4532-a4a6-b4304017fafd+0aa27a65-cd6b-308c-db21-3a7900000049 48000.cfa +/Oral Histories/Camille_s1_F_20150815_fra/raws/Premier Project/Camille_s1_F_20150815_fra.prproj +/Oral Histories/Camille_s1_F_20150815_fra/raws/thumbnail/Screen Shot 2017-05-16 at 15.06.20.png +/Oral Histories/Camille_s1_F_20150815_fra/Camille_s1_F_20150815_fra.jpg +/oral histories/camille_s1_f_20150815_fra/raws/premier project/adobe premiere pro audio previews/Camille_s1_F_20150815_fra.PRV/9d5c4a5f-4bdc-4c27-a363-782176d0eea7+87fd93f8-b12b-0ebd-0b91-7ea700000069 48000.cfa +/Oral Histories/Camille_s1_F_20150815_fra/Camille_s1_F_20150815_fra.mp4 +/Oral Histories/Camille_s1_F_20150815_fra/raws/footage/converted/MVI_9953.mov +/Oral Histories/Sedang_s1_F_20170402_iba/raws/footage/clips/Sedang Speaking Iban Audio Extracted.pkf +/Oral Histories/Sedang_s1_F_20170402_iba/raws/Premier Project/Sedang_s1_F_20170402_iba.prproj +/Oral Histories/Sedang_s1_F_20170402_iba/Sedang_s1_F_20170402_iba.jpg +/Oral Histories/Sedang_s1_F_20170402_iba/Sedang_s1_F_20170402_iba.mp4 +/oral histories/laura_s1_f_20170530_slf/raws/footage/clips/Witkigeous.MP4 +/oral histories/Nurkhalis_s1_M_20170530_bjn/readme.txt +/oral histories/nurkhalis_s1_m_20170530_bjn/raws/footage/clips/Halis Bahasa Banjar.mp4 +/oral histories/raluca_s1_f_20170421_ron/raws/thumbnail/Screen Shot 2017-06-01 at 13.34.08.png +/oral histories/raluca_s1_f_20170421_ron/raws/thumbnail/Screen Shot 2017-06-01 at 13.36.58.png +/oral histories/zaeem_s2_m_20160721_hnd+pbu/raws/footage/clips/Zaeem speaking Hindko.MTS +/oral histories/zaeem_s2_m_20160721_hnd+pbu/raws/footage/converted/Zaeem speaking Hindko.mov +/oral histories/zaeem_s2_m_20160721_hnd+pbu/raws/footage/converted/Zaeem speaking Pashto.mov +/Oral Histories/Zaeem_s2_M_20160721_hnd+pbu/Zaeem_s2_M_20160721_hnd+pbu.mp4 +/oral histories/zaeem_s2_m_20160721_hnd+pbu/raws/Premier Project/Zaeem_s2_M_20160721_hnd+pbu.prproj +/oral histories/zaeem_s2_m_20160721_hnd+pbu/raws/thumbnail/Screen Shot 2017-06-01 at 13.49.21.png +/Oral Histories/Yabi_s1_F_20161001_amh/raws/thumbnail/Screen Shot 2017-06-01 at 13.52.42.png +/oral histories/laura_s1_f_20170530_slf/raws/thumbnail/Screen Shot 2017-06-01 at 13.27.13.png +/oral histories/laura_s1_f_20170530_slf/raws/thumbnail/Screen Shot 2017-06-01 at 13.24.55.png +/oral histories/elisa_s1_f_20140729_vec/raws/thumbnail/Screen Shot 2017-06-01 at 13.55.42.png +/oral histories/slobodan_s1_m_20140729_srp/raws/thumbnails/Screen Shot 2017-06-01 at 14.00.23.png +/oral histories/slobodan_s1_m_20140729_srp/raws/thumbnails/bLj4cXlDT4CAErUmcftz_slodoban-srp-thumb-raw.png +/oral histories/laura_s1_f_20170530_slf/raws/footage/clips/Witkigeous Audio Extracted.pkf +/oral histories/laura_s1_f_20170530_slf/raws/Premier Project/Laura_s1_F_20170530_slf.prproj +/oral histories/nurkhalis_s1_m_20170530_bjn/raws/footage/clips/Halis Bahasa Banjar Audio Extracted.pkf +/oral histories/nurkhalis_s1_m_20170530_bjn/raws/footage/clips/Halis Bahasa Banjar Audio Extracted.wav +/oral histories/nurkhalis_s1_m_20170530_bjn/raws/Premier Project/Nurkhalis_s1_M_20170530_bjn.prproj +/Oral Histories/Laura_s1_F_20170530_slf/Laura_s1_F_20170530_slf.mp4 +/oral histories/Nurkhalis_s1_M_20170530_bjn/Nurkhalis_s1_M_20170530_bjn.mp4 +/oral histories/nurkhalis_s1_m_20170530_bjn/raws/premier project/Adobe Premiere Pro Auto-Save/Nurkhalis_s1_M_20170530_bjn-2.prproj +/oral histories/Nurkhalis_s1_M_20170530_bjn/Nurkhalis_s1_M_20170530_bjn.jpg +/oral histories/Jan_20170609_nld/readme.txt +/oral histories/Michael_20170609_slk/readme.txt +/oral histories/Joanne_20170609_-sgl/readme.txt +/oral histories/jan_20170609_nld/raws/footage/clips/Jan Van der Aa Brabants.MOV +/oral histories/carolien_20170609_lim/raws/footage/clips/Carolien Limburgish.MOV +/oral histories/michael_20170609_slk/raws/footage/clips/DSCN0417Michael_Slovak.MOV +/oral histories/raluca_s1_f_20170421_ron/raws/footage/clips/VIDEO0014 Audio Extracted.pkf +/oral histories/raluca_s1_f_20170421_ron/raws/footage/converted/VIDEO0014.mp4 +/oral histories/raluca_s1_f_20170421_ron/raws/premier project/Adobe Premiere Pro Auto-Save/Raluca_20170421_ron-1.prproj +/oral histories/raluca_s1_f_20170421_ron/raws/Premier Project/Raluca_20170421_ron.prproj +/oral histories/slobodan_s1_m_20140729_srp/raws/footage/clips/Slobodan_s1_M_20140729_srp Audio Extracted.wav +/Oral Histories/Slobodan_s1_M_20140729_srp/Slobodan_s1_M_20140729_srp.mp4 +/Oral Histories/Slobodan_s1_M_20140729_srp/Slobodan_s1_M_20140729_srp.jpg +/oral histories/Garfeen_20170614_mzj/readme.txt +/oral histories/slobodan_s1_m_20140729_srp/raws/Premiere project/Slobodan_20140729_srp.prproj +/oral histories/yabi_s1_f_20161001_amh/raws/premier project/adobe premiere pro audio previews/yabi_20161001_amh.prv/Peak Files/0d70d9c0-f005-446b-babf-f706019f2f89+70ccaabf-da19-e3ce-7e06-c50f00000049 48000.pek +/Oral Histories/Yabi_s1_F_20161001_amh/raws/footage/clips/Yabi Audio Extracted.pkf +/Oral Histories/Yabi_s1_F_20161001_amh/raws/footage/clips/Yabi Audio Extracted.wav +/Oral Histories/Yabi_s1_F_20161001_amh/raws/Premier Project/Yabi_20161001_amh.prproj +/Oral Histories/Liam_s1_M_20151226_eng/raws/footage/STE-037 Audio Extracted.wav +/Oral Histories/Liam_s1_M_20151226_eng/raws/Premier Project/Liam_20151226_eng.prproj +/oral histories/elisa_s1_f_20140729_vec/raws/footage/clips/Elisa_speaking_Veronese Audio Extracted.pkf +/oral histories/elisa_s1_f_20140729_vec/raws/Premier Project/Elisa_20140729_vec.prproj +/oral histories/tylis_s1_m_20151020_cro/raws/footage/clips/Tylis Bad Bear1 Audio Extracted.pkf +/oral histories/tylis_s1_m_20151020_cro/raws/footage/clips/Tylis Bad Bear1 Audio Extracted.wav +/oral histories/zaeem_s2_m_20160721_hnd+pbu/raws/Premier Project/Zaeem_s2_M_20160721_hnd+pbu_1.prproj +/Oral Histories/Yabi_s1_F_20161001_amh/Yabi_20161001_amh.mp4 +/Oral Histories/Liam_s1_M_20151226_eng/Liam_20151226_eng.mp4 +/Oral Histories/Yabi_s1_F_20161001_amh/Yabi_20161001_amh.png +/Oral Histories/Liam_s1_M_20151226_eng/Liam_20151226_eng.png +/Oral Histories/Zaeem_s2_M_20160721_hnd+pbu/UiqVAX32QoaEDsa2ME1b_full_Zaeem_s2_M_20160721_hnd+pbu.png +/oral histories/Elisa_s1_F_20140729_vec/Elisa_s1_F_20140729_vec.jpg +/oral histories/Tylis_s1_M_20151020_cro/Tylis_s1_M_20151020_cro.png +/oral histories/cookson_20161025_mri/raws/footage/clips/Maori Audio Extracted.pkf +/oral histories/cookson_20161025_mri/raws/footage/clips/Maori.mp4 +/oral histories/cookson_20161025_mri/raws/Premier Project/SisterCookson_20161025_mri.prproj +/oral histories/cookson_20161025_mri/raws/thumbnail/Screen Shot 2017-06-01 at 13.51.14.png +/oral histories/sooalo_20161025_smo/raws/footage/audio/Samoan Audio Extracted_L.pkf +/oral histories/sooalo_20161025_smo/raws/footage/audio/Samoan Audio Extracted_L.wav +/oral histories/sooalo_20161025_smo/raws/footage/clips/Samoan Audio Extracted Audio Extracted.mov +/oral histories/sooalo_20161025_smo/raws/footage/clips/Samoan Audio Extracted.wav +/oral histories/sooalo_20161025_smo/raws/footage/clips/Samoan.mp4 +/oral histories/sooalo_20161025_smo/raws/Premier Project/Sister_s1_F_20161025_smo.prproj +/oral histories/Sooalo_20161025_smo/Sooalo_20161025_smo.jpg +/oral histories/Sooalo_20161025_smo/Sooalo_20161025_smo.mp4 +/oral histories/Cookson_20161025_mri/Cookson_20161025_mri.mp4 +/oral histories/cookson+sooalo_20161025_ton/raws/footage/clips/Tongan Audio Extracted.pkf +/oral histories/cookson+sooalo_20161025_ton/raws/footage/clips/Tongan Audio Extracted.wav +/oral histories/cookson+sooalo_20161025_ton/raws/footage/clips/Tongan.mp4 +/oral histories/Cookson+Sooalo_20161025_ton/Sister & Sister_s1_FF_20161025_ton.jpg +/oral histories/Cookson+Sooalo_20161025_ton/Sister & Sister_s1_FF_20161025_ton.mp4 +/Oral Histories/Neceadin_20170617_crh/readme.txt +/Oral Histories/Priya_20170622_tam/raws/footage/clips/Indian Tamil_Paul.aiff +/Oral Histories/Priya_20170622_tam/raws/footage/clips/Sri Lankan Tamil_Priya.MOV +/Oral Histories/Priya_20170622_tam/raws/footage/clips/Sri Lankan Tamil_Priya.aiff +/Oral Histories/Ronnie_20170622_-sgl+nan/raws/footage/clips/Singlish_Hokkien_Ronnie.aiff +/Oral Histories/Theresa_20170622_aka/raws/footage/clips/Twi_Theresa.MOV +/Oral Histories/Paul_20170622_tam/readme.txt +/Oral Histories/Ronnie_20170622_-sgl+nan/readme.txt +/Oral Histories/Theresa_20170622_aka/readme.txt +/Oral Histories/Afou_20170623_sev/raws/footage/clips/Afou_20170623_sev.mp4 +/Oral Histories/Alana_20170705_oss/raws/footage/clips/Alana_20170705_oss.MOV +/Oral Histories/Alana_20170705_oss/readme.txt +/Oral Histories/Daria_20170705_rsl/raws/footage/clips/Daria_20170705_rsl.MOV +/Oral Histories/Inna_20170705_ady/raws/footage/clips/Inna_20170705_ady.MOV +/Oral Histories/Inna_20170705_ady/readme.txt +/Oral Histories/Mária_20170703_swg+hun/raws/footage/clips/Mária_20170703_swg+hun.mp4 +/Oral Histories/Patinat_20170705_ava/raws/footage/clips/Patinat_20170705_ava.MOV +/Oral Histories/Patinat_20170705_ava/readme.txt +/Oral Histories/Zarina_20170705_oss/raws/footage/clips/Zarina_20170705_oss.MOV +/Oral Histories/Musuweu_20170706_eng+sbs/raws/footage/clips/Musuweu_20170706_eng+sbs.mp4 +/Oral Histories/Musuweu_20170706_eng+sbs/readme.txt +/oral histories/Eetu_20170709_fse/readme.txt +/oral histories/Winnie_20170707_loz/readme.txt +/oral histories/eetu_20170709_fse/raws/footage/clips/Eetu Speaking FSL.mp4 +/oral histories/Yann_20170710_bre/readme.txt +/oral histories/winnie_20170707_loz/raws/thumbnail/Winnie_20170707_loz.png +/Oral Histories/Musuweu_20170706_eng+sbs/raws/thumbnail/Musuweu_20170706_eng+sbs.png +/Oral Histories/Daria_20170705_rsl/raws/thumbnail/Daria_20170705_rsl.png +/oral histories/fanny_s1_f_20160127_rup/raws/thumbnail/Fanny_s1_F_20160127_rup.png +/oral histories/john_20170614_klu/raws/footage/clips/WhatsApp Video 2017-06-14 at 09.34.44.mp4 +/oral histories/John_20170614_klu/readme.txt +/oral histories/prionsías_s1_f_20170425_gle/raws/thumbnail/Prionsías_20170425_gle.png +/oral histories/Movsar_20170713_che/readme.txt +/oral histories/movsar_20170713_che/raws/footage/clips/che_wikitongues.mp4 +/oral histories/carolien_20170609_lim/raws/thumbnail/Carolien_20170609_lim.png +/Oral Histories/Mária_20170703_swg+hun/raws/footage/clips/Mária_20170703_swg+hun Audio Extracted.pkf +/Oral Histories/Mária_20170703_swg+hun/raws/footage/clips/Mária_20170703_swg+hun Audio Extracted.wav +/Oral Histories/Mária_20170703_swg+hun/Mária_20170703_swg+hun.mp4 +/oral histories/mária_20170703_swg+hun/raws/premier project/Adobe Premiere Pro Auto-Save/Mária_20170703_swg+hun-3.prproj +/Oral Histories/Mária_20170703_swg+hun/raws/Premier Project/Mária_20170703_swg+hun.prproj +/Oral Histories/Musuweu_20170706_eng+sbs/raws/footage/clips/Musuweu_20170706_eng+sbs Audio Extracted.pkf +/Oral Histories/Musuweu_20170706_eng+sbs/raws/footage/clips/Musuweu_20170706_eng+sbs Audio Extracted.wav +/Oral Histories/Musuweu_20170706_eng+sbs/raws/Premier Project/Musuweu_20170706_eng+sbs.prproj +/Oral Histories/Daria_20170705_rsl/Daria_20170705_rsl.mp4 +/Oral Histories/Musuweu_20170706_eng+sbs/Musuweu_20170706_eng+sbs.mp4 +/Oral Histories/Musuweu_20170706_eng+sbs/Musuweu_20170706_eng+sbs.jpg +/oral histories/carolien_20170609_lim/raws/footage/clips/Carolien Limburgish Audio Extracted.pkf +/oral histories/carolien_20170609_lim/raws/footage/clips/Carolien Limburgish Audio Extracted.wav +/oral histories/carolien_20170609_lim/raws/Premier Project/Carolien_20170609_lim.prproj +/oral histories/carolien_20170609_lim/raws/premier project/Adobe Premiere Pro Auto-Save/Carolien_20170609_lim-1.prproj +/oral histories/Carolien_20170609_lim/Carolien_20170609_lim.jpg +/oral histories/Nicholas_20170719_vec/readme.txt +/oral histories/kevin+fuad_20170329_mcm/raws/footage/audio/Kristang_Audio_2017.03.02_20.46_01.WAV +/oral histories/kevin+fuad_20170329_mcm/raws/footage/clips/Kristang_Video.MOV +/oral histories/kevin+fuad_20170329_mcm/raws/thumbnail/Kevin+Fuad_20170329_mcm.png +/oral histories/kevin+fuad_20170329_mcm/raws/footage/clips/Kristang_Video Audio Extracted.wav +/oral histories/kevin+fuad_20170329_mcm/raws/Premier Project/Kevin+Fuad_20170329_mcm.prproj +/oral histories/Kevin+Fuad_20170329_mcm/Kevin+Fuad_20170329_mcm.jpg +/oral histories/winnie_20170707_loz/raws/premier project/adobe premiere pro audio previews/winnie_20170707_loz.prv/Peak Files/40603e75-37f4-484b-946f-4b37218e108d+ce46e2d1-1261-ee62-62de-c15100000049 48000.pek +/oral histories/winnie_20170707_loz/raws/premier project/adobe premiere pro audio previews/Winnie_20170707_loz.PRV/40603e75-37f4-484b-946f-4b37218e108d+ce46e2d1-1261-ee62-62de-c15100000049 48000.cfa +/oral histories/winnie_20170707_loz/raws/footage/clips/Winnie Speaking Silozi Audio Extracted.pkf +/oral histories/winnie_20170707_loz/raws/premier project/adobe premiere pro audio previews/winnie_20170707_loz.prv/Peak Files/b790651e-0d12-4454-a807-c0645b117c8c+93ae8364-b5a8-572f-6a26-e2d800000069 48000.pek +/oral histories/winnie_20170707_loz/raws/premier project/adobe premiere pro audio previews/Winnie_20170707_loz.PRV/b790651e-0d12-4454-a807-c0645b117c8c+93ae8364-b5a8-572f-6a26-e2d800000069 48000.cfa +/oral histories/winnie_20170707_loz/raws/Premier Project/Winnie_20170707_loz.prproj +/oral histories/Winnie_20170707_loz/Winnie_20170707_loz.png +/oral histories/winnie_20170707_loz/raws/premier project/Adobe Premiere Pro Auto-Save/Winnie_20170707_loz-1.prproj +/oral histories/fanny_s1_f_20160127_rup/raws/footage/clips/Fanny speaking and singing Aromanian Audio Extracted.pkf +/oral histories/fanny_s1_f_20160127_rup/raws/Premier Project/Fanny_20160127_rup.prproj +/oral histories/Fanny_s1_F_20160127_rup/Fanny_20160127_rup.mp4 +/oral histories/Fanny_s1_F_20160127_rup/Fanny_20160127_rup.jpg +/oral histories/paolo_20170727_egl/raws/footage/clips/Paolo_20170727_egl.m4v +/oral histories/Svend_20170727_-kre/readme.txt +/oral histories/svend_20170727_-kre/raws/footage/clips/Svend_20170727_-kre.mp4 +/oral histories/john_20170614_klu/raws/footage/clips/WhatsApp Video 2017-06-14 at 09.34.44 Audio Extracted.wav +/oral histories/John_20170614_klu/John_20170614_klu.mp4 +/oral histories/John_20170614_klu/John_20170614_klu.png +/oral histories/michael_20170609_slk/raws/footage/clips/DSCN0417Michael_Slovak Audio Extracted.pkf +/oral histories/michael_20170609_slk/raws/footage/clips/DSCN0417Michael_Slovak Audio Extracted.wav +/oral histories/michael_20170609_slk/raws/premier project/Adobe Premiere Pro Auto-Save/Michael_20170609_slk-1.prproj +/oral histories/Michael_20170609_slk/Michael_20170609_slk.jpg +/oral histories/michael_20170609_slk/raws/Premier Project/Michael_20170609_slk.prproj +/oral histories/Youssef_20170731_arz/readme.txt +/Oral Histories/Myrizinn_20170710_bre/raws/footage/clips/Myrizinn speaking Breton.mp4 +/Oral Histories/Myrizinn_20170710_bre/readme.txt +/Oral Histories/Aigul_20170705_kir/raws/footage/clips/Aiguk_20170705_kir.MOV +/Oral Histories/Aigul_20170705_kir/readme.txt +/Oral Histories/Huldah_20170622_tam/readme.txt +/oral histories/huldah_20170622_tam/raws/footage/clips/Huldah_20170622_tam.MOV +/oral histories/prionsías_s1_f_20170425_gle/raws/premier project/adobe premiere pro audio previews/Prionsías_20170425_gle.PRV/62d926ef-bfdd-4578-a1db-1b1dc64e23bc+fe6f6a3d-8fa0-0f81-20fd-af8f00000049 48000.cfa +/oral histories/prionsías_s1_f_20170425_gle/raws/footage/audio/prionsías speaking irish Audio Extracted.pkf +/oral histories/prionsías_s1_f_20170425_gle/raws/footage/audio/prionsías speaking irish Audio Extracted.wav +/oral histories/Prionsías_s1_F_20170425_gle/Prionsias_20170425_gle.jpg +/oral histories/Prionsías_s1_F_20170425_gle/Prionsías_20170425_gle.mp4 +/oral histories/prionsías_s1_f_20170425_gle/raws/footage/converted/MVI_0236.mov +/oral histories/neceadin_20170617_crh/raws/Premiere project/Neceadin_20170617_crh.prproj +/oral histories/theresa_20170622_aka/raws/footage/audio/Twi_Theresa Audio Extracted.pkf +/oral histories/theresa_20170622_aka/raws/premiere project/adobe premiere pro audio previews/theresa_20170622_aka.prv/Peak Files/410a81d4-78a3-4477-8681-1dbb6ee4bb4e+8e1d9ca9-15f2-97a6-b383-eddc00000049 48000.pek +/Oral Histories/Zarina_20170705_oss/raws/Premier Project/Zarina_20170705_oss.prproj +/Oral Histories/Zarina_20170705_oss/raws/footage/clips/Zarina_20170705_oss Audio Extracted.wav +/oral histories/theresa_20170622_aka/raws/footage/audio/Twi_Theresa Audio Extracted.wav +/oral histories/theresa_20170622_aka/raws/premiere project/adobe premiere pro audio previews/Theresa_20170622_aka.PRV/410a81d4-78a3-4477-8681-1dbb6ee4bb4e+8e1d9ca9-15f2-97a6-b383-eddc00000049 48000.cfa +/oral histories/theresa_20170622_aka/raws/premiere project/Adobe Premiere Pro Auto-Save/Theresa_20170622_aka-1.prproj +/Oral Histories/Zarina_20170705_oss/Zarina_20170705_oss.mp4 +/oral histories/theresa_20170622_aka/raws/Premiere project/Theresa_20170622_aka.prproj +/Oral Histories/Theresa_20170622_aka/Theresa_20170622_aka.mp4 +/Oral Histories/Zarina_20170705_oss/Zarina_20170705_oss.jpg +/Oral Histories/Neceadin_20170617_crh/Neceadin_20170617_crh.jpg +/Oral Histories/Theresa_20170622_aka/Theresa_20170622_aka.jpg +/oral histories/neceadin_20170617_crh/raws/thumbnail/Screen Shot 2017-08-08 at 4.08.27 PM.png +/oral histories/revival_20170809_eng+naq+afr/raws/footage/clips/VID-20170808-WA0002.mp4 +/oral histories/kk_20170801_hks/raws/footage/clips/MVI_0136.MP4 +/oral histories/KK_20170801_hks/readme.txt +/oral histories/eetu_20170709_fse/raws/footage/clips/Eetu Speaking FSL Audio Extracted.wav +/oral histories/eetu_20170709_fse/raws/Premier Project/Eetu_20170709_fse.prproj +/oral histories/Eetu_20170709_fse/Eetu_20170709_fse.mp4 +/oral histories/Nawal_20170816_ary/readme.txt +/oral histories/Otmar_20170816_szl/readme.txt +/oral histories/otmar_20170816_szl/raws/footage/clips/20170803_213830.mp4 +/Oral Histories/Myrizinn_20170710_bre/raws/footage/clips/Myrizinn speaking Breton Audio Extracted.pkf +/Oral Histories/Myrizinn_20170710_bre/raws/footage/clips/Myrizinn speaking Breton Audio Extracted.wav +/Oral Histories/Myrizinn_20170710_bre/raws/Premier Project/Myrizinn_20170710_bre.prproj +/Oral Histories/Myrizinn_20170710_bre/Myrizinn_20170710_bre.jpg +/Oral Histories/Myrizinn_20170710_bre/background.jpg +/oral histories/movsar_20170713_che/raws/footage/clips/che_wikitongues Audio Extracted.pkf +/oral histories/movsar_20170713_che/raws/Premier Project/Copy of Movsar_20170713_che.prproj +/Oral Histories/Afou_20170623_sev/raws/footage/clips/Afou_20170623_sev Audio Extracted.pkf +/Oral Histories/Afou_20170623_sev/raws/footage/clips/Afou_20170623_sev Audio Extracted.wav +/oral histories/nicholas_20170719_vec/raws/footage/clips/Nicholas_20170719_vec Audio Extracted.pkf +/oral histories/nicholas_20170719_vec/raws/footage/clips/Nicholas_20170719_vec Audio Extracted.wav +/oral histories/nicholas_20170719_vec/raws/Premier Project/Nicholas_20170719_vec.prproj +/Oral Histories/Aigul_20170705_kir/raws/footage/clips/Aiguk_20170705_kir Audio Extracted.pkf +/Oral Histories/Aigul_20170705_kir/raws/footage/clips/Aiguk_20170705_kir Audio Extracted.wav +/oral histories/Movsar_20170713_che/Movsar_20170713_che.mp4 +/Oral Histories/Aigul_20170705_kir/raws/Premier Project/Aigul_20170705_kir.prproj +/Oral Histories/Afou_20170623_sev/Afou_20170623_sev.mp4 +/Oral Histories/Aigul_20170705_kir/Aigul_20170705_kir.mp4 +/Oral Histories/Afou_20170623_sev/Afou_20170623_sev.jpg +/oral histories/MariaOlimpia_20170823_ell+ita/readme.txt +/oral histories/mariaolimpia_20170823_ell+ita/raws/footage/clips/MVI_0105.MOV +/oral histories/TayZa_20170824_cfm/readme.txt +/oral histories/tayza_20170824_cfm/raws/footage/clips/WhatsApp Video 2017-08-12 at 00.16.52.mp4 +/oral histories/Wayne_20170825_bre/readme.txt +/Oral Histories/Aigul_20170705_kir/Aigul_20170705_kir.jpg +/oral histories/youssef_20170731_arz/raws/footage/clips/Egyptian Dialect Audio Extracted.pkf +/oral histories/youssef_20170731_arz/raws/footage/clips/Egyptian Dialect Audio Extracted.wav +/oral histories/Youssef_20170731_arz/Youssef_20170731_arz.mp4 +/oral histories/Youssef_20170731_arz/Youssef_20170731_arz.jpg +/oral histories/James_20170902_fil+eng+spa/readme.txt +/Oral Histories/James_20170828_fil+eng+spa/raws/footage/clips/James_20170828_fil+eng+spa.mp4 +/Oral Histories/James_20170828_fil+eng+spa/readme.txt +/Oral Histories/Wayne_20170825_bre (1)/raws/footage/clips/Wayne_20170825_bre.mp4 +/Oral Histories/Alex_20170823_afr/raws/footage/clips/Alex_20170823_afr.MTS +/Oral Histories/Alex_20170823_afr/readme.txt +/Oral Histories/Donna_20170823_min/raws/footage/clips/Donna_20170823_min.MTS +/Oral Histories/Ihsan+Septiadi_20170823_mui/raws/footage/clips/Ihsan+Septiadi_20170823_mui.aiff +/Oral Histories/Ihsan+Septiadi_20170823_mui/raws/footage/clips/Ihsan+Septiadi_20170823_mui.MTS +/Oral Histories/Ihsan+Septiadi_20170823_mui/readme.txt +/Oral Histories/Mira+Marten_20170823_deu/raws/footage/clips/Mira+Marten_20170823_deu.MTS +/Oral Histories/Mira+Marten_20170823_deu/readme.txt +/Oral Histories/Rama_20170823_jav/raws/footage/clips/Rama_20170823_jav.aiff +/Oral Histories/Rama_20170823_jav/readme.txt +/Oral Histories/Tessa_20170823_ind+jav/raws/footage/clips/Tessa_20170823_ind+jav.aiff +/Oral Histories/Tessa_20170823_ind+jav/raws/footage/clips/Tessa_20170823_ind+jav.MTS +/oral histories/kk_20170801_hks/raws/footage/clips/MVI_0136 Audio Extracted.pkf +/oral histories/kk_20170801_hks/raws/footage/clips/MVI_0136 Audio Extracted.wav +/oral histories/kk_20170801_hks/raws/premier project/adobe premiere pro audio previews/kk_20170801_hks.prv/Peak Files/30afef5a-3cd2-4090-bafc-3d5a15b20ee0+1aa9a263-114b-6331-1d04-106200000069 44100.pek +/oral histories/kk_20170801_hks/raws/Premier Project/KK_20170801_hks.prproj +/Oral Histories/Inna_20170705_ady/raws/footage/clips/Inna_20170705_ady Audio Extracted.pkf +/Oral Histories/Inna_20170705_ady/raws/footage/clips/Inna_20170705_ady Audio Extracted.wav +/oral histories/chaofen+changjiu_20170615_cmn/raws/Premiere project/Chaofen+Changjiu_20170615_cmn.prproj +/oral histories/chaofen+changjiu_20170615_cmn/raws/thumbnails/Screen Shot 2017-08-03 at 1.18.46 PM.png +/oral histories/Chaofen+Changjiu_20170615_cmn/readme.txt +/oral histories/fabiola_s1_f_20140729_ita/raws/footage/clips/Fabiola_speaking_Trentino.MOV +/oral histories/riike_20140729_dan/raws/footage/clips/Riike_20140729_dan.mp4 +/oral histories/stéfane_20161205_jpn+fra+eng+por/raws/footage/clips/Stéfane_20161205_jpn+fra+eng+por.mp4 +/oral histories/dr.kareloliva_20160330_ces+eng+bul+ita+deu+rus/raws/footage/clips/Karel - Wikitongues 2.mov +/Oral Histories/Dr.KarelOliva_20160330_ces+eng+bul+ita+deu+rus/readme.txt +/Oral Histories/Inna_20170705_ady/raws/thumbnail/Inna_20170705_ady.png +/oral histories/kk_20170801_hks/raws/footage/clips/KK_20170801_hks.mp4 +/oral histories/kk_20170801_hks/raws/thumbnail/KK_20170801_hks.png +/oral histories/otmar_20170816_szl/raws/thumbnail/Otmar_20170816_szl.png +/oral histories/riike_20140729_dan/raws/thumbnail/Riike_20140729_dan.png +/oral histories/raj_20160622_bgq/raws/thumbnail/Raj_20160622_bgq.png +/oral histories/nawal_20170816_ary/raws/thumbnail/Nawal_20170816_ary.png +/oral histories/revival_20170809_eng+naq+afr/raws/thumbnail/Revival_20170809_eng+naq+afr.png +/oral histories/stéfane_20161205_jpn+fra+eng+por/raws/thumbnail/Stéfane_20161205_jpn+fra+eng+por.png +/oral histories/Chaofen+Changjiu_20170615_cmn/Changjiu+Chaofen_20170615_cmn.mp4 +/Oral Histories/Inna_20170705_ady/Inna_20170705_ady.jpg +/oral histories/otmar_20170816_szl/raws/footage/clips/20170803_213830 Audio Extracted.pkf +/oral histories/otmar_20170816_szl/raws/footage/clips/20170803_213830 Audio Extracted.wav +/oral histories/KK_20170801_hks/KK_20170801_hks.jpg +/oral histories/Otmar_20170816_szl/Otmar_20170816_szl.mp4 +/oral histories/Otmar_20170816_szl/Otmar_20170816_szl.jpg +/oral histories/dr.kareloliva_20160330_ces+eng+bul+ita+deu+rus/raws/footage/clips/Karel - Wikitongues 2 Audio Extracted.wav +/oral histories/dr.kareloliva_20160330_ces+eng+bul+ita+deu+rus/raws/premier project/Adobe Premiere Pro Auto-Save/Dr.KarelOliva_20160330_ces+eng+bul+ita+deu+rus-1.prproj +/oral histories/dr.kareloliva_20160330_ces+eng+bul+ita+deu+rus/raws/Premier Project/Dr.KarelOliva_20160330_ces+eng+bul+ita+deu+rus.prproj +/oral histories/riike_20140729_dan/raws/footage/clips/Riike_20140729_dan Audio Extracted.pkf +/oral histories/riike_20140729_dan/raws/footage/clips/Riike_20140729_dan Audio Extracted.wav +/oral histories/riike_20140729_dan/raws/Premier Project/Riike_20140729_dan.prproj +/oral histories/Riike_20140729_dan/Riike_20140729_dan.mp4 +/Oral Histories/Dr.KarelOliva_20160330_ces+eng+bul+ita+deu+rus/Dr.KarelOliva_20160330_ces+eng+bul+ita+deu+rus.mp4 +/Oral Histories/Dr.KarelOliva_20160330_ces+eng+bul+ita+deu+rus/DrKarelOliva_20160330_ces+eng+bul+ita+deu+rus.jpg +/oral histories/Raj_20160622_bgq/Raj_20160622_bgq.jpg +/oral histories/Raj_20160622_bgq/Raj_s1_M_20160622_bgq.mp4 +/oral histories/nawal_20170816_ary/raws/footage/clips/Nawal Speaking Darija Audio Extracted.pkf +/oral histories/nawal_20170816_ary/raws/Premier Project/Nawal_20170816_ary.prproj +/oral histories/Nawal_20170816_ary/Nawal_20170816_ary.mp4 +/oral histories/Nawal_20170816_ary/Nawal_20170816_ary.jpg +/oral histories/ying_20170924_cmn/raws/footage/clips/Ying Speaking Henan Dialect.avi +/oral histories/António_20170924_kmb/readme.txt +/oral histories/tayza_20170824_cfm/raws/footage/clips/WhatsApp Video 2017-08-12 at 00.16.52 Audio Extracted.pkf +/oral histories/antónio_20170924_kmb/raws/footage/clips/20170210_090012.mp4 +/oral histories/tayza_20170824_cfm/raws/Premier Project/TayZa_20170824_cfm.prproj +/oral histories/TayZa_20170824_cfm/TayZa_20170824_cfm.jpg +/oral histories/revival_20170809_eng+naq+afr/raws/footage/clips/VID-20170808-WA0002 Audio Extracted.pkf +/oral histories/revival_20170809_eng+naq+afr/raws/footage/clips/VID-20170808-WA0002 Audio Extracted.wav +/oral histories/revival_20170809_eng+naq+afr/raws/Premier Project/Revival_20170809_eng+naq+afr.prproj +/oral histories/Revival_20170809_eng+naq+afr/Revival_20170809_eng+naq+afr.jpg +/oral histories/Dragan_s1_M_20150904_srp (Selective Sync Conflict)/Dragan_s1_M_20150904_srp.jpg +/oral histories/Javier_s2_M_20130303_nhn+spa (Selective Sync Conflict)/Javier_s2_M_20130303_nhn+spa.jpg +/oral histories/Javier_s2_M_20130303_nhn+spa (Selective Sync Conflict)/Javier_s2_M_20130303_nhn+spa.mp4 +/oral histories/stéfane_20161205_jpn+fra+eng+por/raws/premier project/adobe premiere pro audio previews/stéfane_20161205_jpn+fra+eng+por.prv/Peak Files/790aa68d-14bd-44e9-9672-8a5797e098d8+364d5bd2-4a75-2b02-cc07-ae8200000049 48000.pek +/oral histories/stéfane_20161205_jpn+fra+eng+por/raws/premier project/adobe premiere pro audio previews/Stéfane_20161205_jpn+fra+eng+por.PRV/790aa68d-14bd-44e9-9672-8a5797e098d8+364d5bd2-4a75-2b02-cc07-ae8200000049 48000.cfa +/oral histories/stéfane_20161205_jpn+fra+eng+por/raws/footage/clips/Stéfane_20161205_jpn+fra+eng+por Audio Extracted.wav +/oral histories/stéfane_20161205_jpn+fra+eng+por/raws/premier project/Adobe Premiere Pro Auto-Save/Stéfane_20161205_jpn+fra+eng+por-1.prproj +/oral histories/Betsy_20170813_msn/readme.txt +/oral histories/James_20170813_nmk/readme.txt +/oral histories/Kami_20170813_lht/readme.txt +/oral histories/kami_20170813_lht/raws/footage/clips/Kami_20170813_lht.mp4 +/oral histories/daisy_20170813_omb/raws/footage/clips/Daisy_20170813_omb.MOV +/oral histories/james_20170813_nmk/raws/footage/clips/James_20170813_nmk.mov +/oral histories/stéfane_20161205_jpn+fra+eng+por/raws/footage/converted/Stéfane_20161205_jpn+fra+eng+por.mp4 +/oral histories/stéfane_20161205_jpn+fra+eng+por/raws/premier project/adobe premiere pro audio previews/Stéfane_20161205_jpn+fra+eng+por.PRV/ff04d8cf-f223-45e4-8afb-09a654beb80e+09e2b627-8e9a-bb8e-a862-ff7d00000049 48000.cfa +/oral histories/stéfane_20161205_jpn+fra+eng+por/raws/footage/converted/Stéfane_20161205_jpn+fra+eng+por Audio Extracted.pkf +/oral histories/stéfane_20161205_jpn+fra+eng+por/raws/footage/converted/Stéfane_20161205_jpn+fra+eng+por Audio Extracted.wav +/oral histories/Stéfane_20161205_jpn+fra+eng+por/Stéfane_20161205_jpn+fra+eng+por.mp4 +/oral histories/fabiola_s1_f_20140729_ita/raws/footage/clips/Fabiola_speaking_Trentino Audio Extracted.pkf +/oral histories/fabiola_s1_f_20140729_ita/raws/footage/clips/Fabiola_speaking_Trentino Audio Extracted.wav +/oral histories/fabiola_s1_f_20140729_ita/raws/Premier Project/Fabiola_20140729_ita.prproj +/oral histories/Regianna_20170813_nnd/readme.txt +/oral histories/Serah_20170813_mlv/readme.txt +/oral histories/anna_20171008_tql/raws/footage/clips/Anna - Lehali.mp4 +/oral histories/serah_20170813_mlv/raws/footage/clips/Serah - Mwotlap.mp4 +/oral histories/regianna_20170813_nnd/raws/footage/clips/Regianna - West Ambae.mp4 +/oral histories/golala_20170928_ckb/raws/footage/clips/IMG_4991.MOV.mp4 +/oral histories/wayne_20170825_bre/raws/footage/clips/brezhoneg Audio Extracted.pkf +/oral histories/wayne_20170825_bre/raws/footage/clips/brezhoneg Audio Extracted.wav +/oral histories/wayne_20170825_bre/raws/premier project/Adobe Premiere Pro Auto-Save/Wayne_20170825_bre-1.prproj +/oral histories/Wayne_20170825_bre/Wayne_20170825_bre.mp4 +/oral histories/Stéfane_20161205_jpn+fra+eng+por/Stefane_20161205_jpn+fra+eng+por.jpg +/oral histories/wayne_20170825_bre/raws/thumbnail/Wayne_20170825_bre.png +/oral histories/Wayne_20170825_bre/Wayne_20170825_bre.jpg +/oral histories/ying_20170924_cmn/raws/footage/converted/Ying Speaking Henan Dialect.mp4 +/oral histories/ying_20170924_cmn/raws/footage/converted/Ying Speaking Henan Dialect Audio Extracted.pkf +/oral histories/ying_20170924_cmn/raws/footage/converted/Ying Speaking Henan Dialect Audio Extracted.wav +/oral histories/ying_20170924_cmn/raws/Premier Project/Ying_20170924_cmn.prproj +/Oral Histories/James_20170828_fil+eng+spa/raws/footage/clips/James_20170828_fil+eng+spa Audio Extracted.wav +/Oral Histories/James_20170828_fil+eng+spa/raws/Premier Project/James_20170828_fil+eng+spa.prproj +/oral histories/golala_20170928_ckb/raws/footage/clips/IMG_4991.MOV Audio Extracted.pkf +/oral histories/golala_20170928_ckb/raws/Premier Project/Golala_20170928_ckb.prproj +/oral histories/rama_20170823_jav/raws/premier project/adobe premiere pro audio previews/rama_20170823_jav.prv/Peak Files/33837854-4626-4a66-9a61-d8d9eb5295d9+20fd1d70-40cd-9676-5282-85de00000049 48000.pek +/oral histories/rama_20170823_jav/raws/premier project/adobe premiere pro audio previews/Rama_20170823_jav.PRV/33837854-4626-4a66-9a61-d8d9eb5295d9+20fd1d70-40cd-9676-5282-85de00000049 48000.cfa +/Oral Histories/Rama_20170823_jav/raws/footage/clips/Rama_20170823_jav Audio Extracted.wav +/oral histories/rama_20170823_jav/raws/premier project/Adobe Premiere Pro Auto-Save/Rama_20170823_jav-1.prproj +/Oral Histories/Rama_20170823_jav/raws/Premier Project/Rama_20170823_jav.prproj +/oral histories/golala_20170928_ckb/raws/premier project/Adobe Premiere Pro Auto-Save/Golala_20170928_ckb_current-1.prproj +/Oral Histories/Rama_20170823_jav/raws/Premier Project/Rama_20170823_jav_current.prproj +/oral histories/golala_20170928_ckb/raws/Premier Project/Golala_20170928_ckb_current.prproj +/oral histories/ying_20170924_cmn/raws/Premier Project/Ying_20170924_cmn_current.prproj +/oral histories/Ying_20170924_cmn/Ying_20170924_cmn.mp4 +/Oral Histories/James_20170828_fil+eng+spa/James_20170828_fil+eng+spa.mp4 +/Oral Histories/Rama_20170823_jav/Rama_20170823_jav.mp4 +/oral histories/ihsan+septiadi_20170823_mui/raws/premier project/Adobe Premiere Pro Auto-Save/Ihsan+Septiadi_20170823_mui-1.prproj +/oral histories/Alaric_20171103_afr/readme.txt +/oral histories/james_20171103_nus/raws/footage/clips/2017-10-09 13.31.16.mp4 +/oral histories/ying_20170924_cmn/raws/thumbnail/Screen Shot 2017-11-03 at 7.00.56 PM.png +/oral histories/txeli_20171103_eus/raws/footage/audio/Video 1/20160714-223058.m4a +/oral histories/txeli_20171103_eus/raws/footage/audio/Video 2/20160714-224034.m4a +/oral histories/txeli_20171103_eus/raws/footage/audio/Video 2/20160714-224034.m4a.meta.txt +/oral histories/Txeli_20171103_eus/readme.txt +/oral histories/txeli_20171103_eus/raws/footage/clips/Video 2/2016-07-14 20.46.06.mp4 +/Oral Histories/Ihsan+Septiadi_20170823_mui/raws/footage/clips/Ihsan+Septiadi_20170823_mui.m4v +/oral histories/alaric_20171103_afr/raws/footage/clips/Dr Alaric Naudé Afrikaans (Unicode Encoding Conflict).mp4 +/oral histories/Mónica_20171029_ssp (Unicode Encoding Conflict)/readme.txt +/oral histories/movsar_20170713_che/raws/captions/che_wikitonguesa.srt +/oral histories/vitória_s1_f_20140729_por/raws/footage/audio/STE-015 Audio Extracted.pkf +/oral histories/vitória_s1_f_20140729_por/raws/premier project/adobe premiere pro video previews/Vitória_20140729_por.PRV/Rendered - e6022b1d-02e1-439d-afbf-cc8c67d77960.mpeg +/oral histories/vitória_s1_f_20140729_por/raws/premier project/adobe premiere pro video previews/Vitória_20140729_por.PRV/Rendered - e6022b1d-02e1-439d-afbf-cc8c67d77960.xmp +/oral histories/vitória_s1_f_20140729_por/raws/premier project/adobe premiere pro video previews/Vitória_20140729_por.PRV/Rendered - d9992222-7fea-4a3c-bb75-c0ead2e05e6c.xmp +/oral histories/vitória_s1_f_20140729_por/raws/footage/audio/silence.wav +/oral histories/vitória_s1_f_20140729_por/raws/premier project/adobe premiere pro video previews/Vitória_20140729_por.PRV/Rendered - d9992222-7fea-4a3c-bb75-c0ead2e05e6c.mpeg +/oral histories/vitória_s1_f_20140729_por/raws/Premier Project/Vitória_20140729_por.prproj +/oral histories/garfeen_20170614_mzj/raws/footage/clips/Mandingo.MOV +/oral histories/james_20170813_nmk/raws/Premier Project/James_20170813_nmk.prproj +/oral histories/daisy_20170813_omb/raws/Premier Project/Daisy_20170813_omb.prproj +/oral histories/antónio_20170924_kmb/raws/footage/clips/20170210_090012 Audio Extracted.wav +/oral histories/antónio_20170924_kmb/raws/Premier Project/António_20170924_kmb.prproj +/Oral Histories/Ihsan+Septiadi_20170823_mui/raws/Premier Project/Ihsan+Septiadi_20170823_mui.prproj +/oral histories/suzy_s1_f_20140729_eng/raws/footage/clips/STE-018 Audio Extracted.pkf +/oral histories/suzy_s1_f_20140729_eng/raws/footage/clips/STE-018 Audio Extracted.wav +/oral histories/suzy_s1_f_20140729_eng/raws/Premier Project/Suzy_20140729_eng.prproj +/oral histories/garfeen_20170614_mzj/raws/footage/converted/Mandingo Audio Extracted.wav +/oral histories/Vitória_s1_F_20140729_por/Vitória_20140729_por.mp4 +/oral histories/Garfeen_20170614_mzj/Garfeen_20170614_mzj.mp4 +/oral histories/Daisy_20170813_omb/Daisy_20170813_omb.mp4 +/oral histories/Nely_20171127_ayc/readme.txt +/oral histories/nely_20171127_ayc/raws/footage/clips/MVI_0263.THM +/oral histories/Marcelina_20161127_ayc/readme.txt +/oral histories/eugenia_20171127_ayc/raws/footage/clips/MVI_0264.THM +/oral histories/marcelina_20161127_ayc/raws/footage/clips/MVI_0265.THM +/oral histories/Barbara_20171127_nav/readme.txt +/oral histories/rangina_20171127_pst/raws/footage/clips/MVI_0267.THM +/oral histories/barbara_20171127_nav/raws/footage/clips/MVI_0268.THM +/oral histories/Samuel_20171127_spa/readme.txt +/oral histories/lynda_20171127_nav/raws/footage/clips/MVI_0269.THM +/oral histories/António_20170924_kmb/António_20170924_kmb.mp4 +/oral histories/lynda_20171127_nav/raws/footage/clips/MVI_0269.MOV +/oral histories/rangina_20171127_pst/raws/footage/clips/MVI_0267.MOV +/oral histories/lynda_20171127_nav/raws/footage/clips/MVI_0270.THM +/oral histories/zakiya_20171127_kfr/raws/footage/clips/MVI_0274.THM +/oral histories/zakiya_20171127_kfr/raws/footage/clips/MVI_0275.THM +/oral histories/zakiya_20171127_kfr/raws/footage/clips/MVI_0275.MOV +/oral histories/Modesto_20171127_spa/readme.txt +/oral histories/modesto_20171127_spa/raws/footage/clips/MVI_0276.THM +/oral histories/Zeferino_20171127_tqt/readme.txt +/oral histories/arnulfo_20171127_nhn+spa/raws/footage/clips/MVI_0278.THM +/oral histories/zeferino_20171127_tqt/raws/footage/clips/MVI_0271.THM +/oral histories/zeferino_20171127_tqt/raws/footage/clips/MVI_0280.THM +/oral histories/Luzmila_20171127_qvi/readme.txt +/oral histories/Sonia_20171127_boa/readme.txt +/oral histories/luzmila_20171127_qvi/raws/footage/clips/MVI_0281.THM +/oral histories/Nilo_20171127_cod/readme.txt +/oral histories/sonia_20171127_boa/raws/footage/clips/MVI_0282.THM +/oral histories/Carmen_20171127_kek/readme.txt +/oral histories/nilo_20171127_cod/raws/footage/clips/MVI_0283.MOV +/oral histories/carmen_20171127_kek/raws/footage/clips/MVI_0284.THM +/oral histories/Amalaia_20171127_kek/readme.txt +/oral histories/amalaia_20171127_kek/raws/footage/clips/MVI_0286.THM +/oral histories/amalaia_20171127_kek/raws/footage/clips/MVI_0285.THM +/oral histories/Luz_20171127_shp/readme.txt +/oral histories/wachwa_20171127_que/raws/footage/clips/MVI_0291.THM +/oral histories/wachwa_20171127_que/raws/footage/clips/MVI_0290.MOV +/oral histories/luz_20171127_shp/raws/footage/clips/MVI_0292.THM +/oral histories/Wilbert_20171127_que/readme.txt +/oral histories/wilbert_20171127_que/raws/footage/clips/MVI_0293.THM +/oral histories/gilberta_20171127_acr/raws/footage/clips/MVI_0294.THM +/oral histories/gilberta_20171127_acr/raws/footage/clips/MVI_0295.MOV +/oral histories/amalaia_20171127_kek/raws/footage/clips/MVI_0286.MOV +/oral histories/zeferino_20171127_tqt/raws/footage/clips/MVI_0280.MOV +/Oral Histories/Ihsan+Septiadi_20170823_mui/Ihsan+Septiadi_20170823_mui.png +/Oral Histories/Ihsan+Septiadi_20170823_mui/raws/thumbnail/NQGLKjpfQ7GhC8xjg1Ch_full_Screen Shot 2017-11-05 at 5.14.16 PM.png +/oral histories/zakiya_20171127_kfr/raws/footage/clips/MVI_0274.MOV +/oral histories/vitória_s1_f_20140729_por/raws/thumbnail/DPbCBTUGTGGsssUNMKLE_vitoria-por-thumb-raw.png +/oral histories/Garfeen_20170614_mzj/Garfeen_20170614_mzj.png +/oral histories/garfeen_20170614_mzj/raws/thumbnail/QmgVlzyJQqGPK3qGmQM7_full_Screen Shot 2017-11-05 at 4.55.11 PM.png +/oral histories/garfeen_20170614_mzj/raws/premier project/Adobe Premiere Pro Auto-Save/Garfeen_20170614_mzj-1.prproj +/oral histories/lynda_20171127_nav/raws/footage/clips/MVI_0270.MOV +/oral histories/wilbert_20171127_que/raws/footage/clips/MVI_0293.MOV +/oral histories/zeferino_20171127_tqt/raws/footage/clips/MVI_0271.MOV +/oral histories/eugenia_20171127_ayc/raws/footage/clips/MVI_0264.MOV +/oral histories/gilberta_20171127_acr/raws/footage/clips/MVI_0294.MOV +/oral histories/marcelina_20161127_ayc/raws/footage/clips/MVI_0265.MOV +/oral histories/sonia_20171127_boa/raws/footage/clips/MVI_0282.MOV +/oral histories/Ayu_20170823_jav/readme.txt +/oral histories/luzmila_20171127_qvi/raws/footage/clips/MVI_0281.MOV +/oral histories/wachwa_20171127_que/raws/footage/clips/MVI_0291.MOV +/oral histories/modesto_20171127_spa/raws/footage/clips/MVI_0276.MOV +/oral histories/carmen_20171127_kek/raws/footage/clips/MVI_0284.MOV +/oral histories/nely_20171127_ayc/raws/footage/clips/MVI_0263.MOV +/oral histories/Suzy_s1_F_20140729_eng/Suzy_20140729_eng.mp4 +/oral histories/román_20171127_zap (unicode encoding conflict)/raws/footage/clips/MVI_0279.THM +/oral histories/Román_20171127_zap (Unicode Encoding Conflict)/readme.txt +/oral histories/james_20170813_nmk/raws/thumbnail/udJHsrcXQv2eApyw5yWg_full_Screen Shot 2017-11-05 at 4.54.33 PM.png +/oral histories/Daisy_20170813_omb/Daisy_20170813_omb.png +/oral histories/António_20170924_kmb/Antonio_20170924_kmb.png +/oral histories/antónio_20170924_kmb/raws/thumbnail/HYX9ZloSau2lKH0LzuTw_full_Screen Shot 2017-11-05 at 4.50.12 PM.png +/oral histories/Suzy_s1_F_20140729_eng/Suzy_20140729_eng.jpg +/oral histories/mónica_20171029_ssp (unicode encoding conflict)/raws/premier project/Adobe Premiere Pro Auto-Save/Mónica_20171029_ssp-1.prproj +/oral histories/frances_s1_f_20170425_gle/raws/footage/converted/MVI_0235.mov +/oral histories/frances_s1_f_20170425_gle/raws/premier project/adobe premiere pro audio previews/Frances_20170425_gle.PRV/4fc1812e-7adb-482c-a6db-17344974d3dd+0f63ba1a-4b15-5ba3-62aa-746500000049 48000.cfa +/oral histories/Mónica_20171029_ssp (Unicode Encoding Conflict)/Mónica_20171029_ssp.mp4 +/oral histories/frances_s1_f_20170425_gle/raws/Premier Project/Frances_20170425_gle.prproj +/oral histories/alaric_20171103_afr/raws/footage/clips/Dr Alaric Naudé Afrikaans (Unicode Encoding Conflict) Audio Extracted.pkf +/oral histories/alaric_20171103_afr/raws/footage/clips/Dr Alaric Naudé Afrikaans (Unicode Encoding Conflict) Audio Extracted.wav +/oral histories/ayu_20170823_jav/raws/footage/clips/Ayu speaking Javanese (Multiple).MOV +/oral histories/ayu_20170823_jav/raws/footage/clips/Ayu speaking Javanese (Multiple) Audio Extracted.wav +/oral histories/alaric_20171103_afr/raws/premier project/Adobe Premiere Pro Auto-Save/Alaric_20171103_afr-1.prproj +/oral histories/mónica_20171029_ssp (unicode encoding conflict)/raws/premier project/Adobe Premiere Pro Auto-Save/Mónica_20171029_ssp-3.prproj +/oral histories/Frances_s1_F_20170425_gle/Frances_20170425_gle.mp4 +/oral histories/alaric_20171103_afr/raws/premier project/Adobe Premiere Pro Auto-Save/Alaric_20171103_afr-2.prproj +/oral histories/mónica_20171029_ssp (unicode encoding conflict)/raws/premier project/Adobe Premiere Pro Auto-Save/Mónica_20171029_ssp-4.prproj +/oral histories/Alaric_20171103_afr/Alaric_20171103_afr.mp4 +/oral histories/Ayu_20170823_jav/Ayu_20170823_jav.mp4 +/oral histories/Txeli_20171103_eus/Txeli_20171103_eus.mp4 +/oral histories/ayu_20170823_jav/raws/premier project/Adobe Premiere Pro Auto-Save/Ayu_20170823_jav-2.prproj +/oral histories/alaric_20171103_afr/raws/premier project/Adobe Premiere Pro Auto-Save/Alaric_20171103_afr-3.prproj +/oral histories/mónica_20171029_ssp (unicode encoding conflict)/raws/premier project/Adobe Premiere Pro Auto-Save/Mónica_20171029_ssp-5.prproj +/Oral Histories/Angel_s1_M_20140729_rup/raws/footage/clips/Angel - Aromanian, Better Render-168 Audio Extracted.wav +/oral histories/angel_s1_m_20140729_rup/raws/premier project/Adobe Premiere Pro Auto-Save/Angel_20140729_rup-1.prproj +/oral histories/ayu_20170823_jav/raws/Premier Project/Ayu_20170823_jav.prproj +/oral histories/mónica_20171029_ssp (unicode encoding conflict)/raws/Premier Project/Mónica_20171029_ssp.prproj +/oral histories/frances_s1_f_20170425_gle/raws/footage/audio/Fran speaking Iris Audio Extracted.pkf +/oral histories/frances_s1_f_20170425_gle/raws/footage/audio/Fran speaking Iris Audio Extracted.wav +/oral histories/betsy_20170813_msn/raws/premier project/Adobe Premiere Pro Auto-Save/Betsy_20170813_msn-1.prproj +/oral histories/betsy_20170813_msn/raws/footage/clips/Betsy_20170813_msn Audio Extracted.pkf +/oral histories/betsy_20170813_msn/raws/footage/clips/Betsy_20170813_msn Audio Extracted.wav +/oral histories/betsy_20170813_msn/raws/premier project/Adobe Premiere Pro Auto-Save/Betsy_20170813_msn-3.prproj +/oral histories/betsy_20170813_msn/raws/Premier Project/Betsy_20170813_msn.prproj +/oral histories/senful_s1_m_20170329_zsm/raws/footage/clips/Senful Speaking Malay Audio Extracted.pkf +/oral histories/senful_s1_m_20170329_zsm/raws/Premier Project/Senful_20170329_zsm.prproj +/oral histories/gi_s2_f_20170509_lmo+ita/raws/Premier Project/Gi_20170509_lmo+ita.prproj +/Oral Histories/Angel_s1_M_20140729_rup/Angel_20140729_rup.mp4 +/oral histories/Senful_s1_M_20170329_zsm/Senful_20170329_zsm.mp4 +/oral histories/Gi_s2_F_20170509_lmo+ita/Gi_20170509_lmo+ita.mp4 +/oral histories/Martha+Albert_20171103_bar/Martha+Albert_20171103_bar.mp4 +/oral histories/martha+albert_20171103_bar/raws/footage/clips/_MG_0260.CR2 +/oral histories/martha+albert_20171103_bar/raws/footage/clips/IMG_0257.CR2 +/oral histories/martha+albert_20171103_bar/raws/footage/clips/IMG_0258.CR2 +/oral histories/martha+albert_20171103_bar/raws/footage/audio/gottscheer 1.aiff +/oral histories/martha+albert_20171103_bar/raws/footage/clips/MVI_0261.MOV +/oral histories/martha+albert_20171103_bar/raws/footage/audio/gottscheer 1 Audio Extracted.pkf +/oral histories/martha+albert_20171103_bar/raws/footage/audio/gottscheer test.aiff +/oral histories/martha+albert_20171103_bar/raws/footage/converted/MVI_0259_1.mov +/oral histories/martha+albert_20171103_bar/raws/premiere project/adobe premiere pro audio previews/Martha+Albert_20171103_bar.PRV/4f9785cc-b125-4c8b-add8-af5f0094ee0e+2244006f-ab0d-0568-096e-f39300000049 48000.cfa +/oral histories/martha+albert_20171103_bar/raws/premiere project/Adobe Premiere Pro Auto-Save/Martha+Albert_20171103_bar-1.prproj +/oral histories/martha+albert_20171103_bar/raws/premiere project/Adobe Premiere Pro Auto-Save/Martha+Albert_20171103_bar-2.prproj +/oral histories/martha+albert_20171103_bar/raws/premiere project/Adobe Premiere Pro Auto-Save/Martha+Albert_20171103_bar-3.prproj +/oral histories/martha+albert_20171103_bar/raws/thumbnails/Screen Shot 2017-12-07 at 5.27.35 PM.png +/oral histories/martha+albert_20171103_bar/raws/thumbnails/Screen Shot 2017-12-07 at 5.28.37 PM.png +/oral histories/martha+albert_20171103_bar/raws/thumbnails/Screen Shot 2017-12-07 at 5.28.23 PM.png +/oral histories/alaric_20171103_afr/raws/thumbnail/Screen Shot 2017-12-07 at 6.49.23 PM.png +/oral histories/ayu_20170823_jav/raws/thumbnail/Screen Shot 2017-12-07 at 6.50.11 PM.png +/oral histories/jide_s1_m_20160319_yor/raws/Thumbnail/Screen Shot 2016-04-02 at 17.13.38.png +/oral histories/jide_s1_m_20160319_yor/raws/footage/audio/video 1/STE-004 Audio Extracted.pkf +/oral histories/jide_s1_m_20160319_yor/raws/footage/audio/video 1/STE-004 Audio Extracted.wav +/oral histories/jide_s1_m_20160319_yor/raws/footage/audio/video 1/STE-004.wav +/oral histories/jide_s1_m_20160319_yor/raws/footage/clips/video 2/MVI_0245.MOV +/oral histories/jide_s1_m_20160319_yor/raws/footage/clips/video 2/MVI_0246.MOV +/oral histories/jide_s1_m_20160319_yor/raws/Thumbnail/_MG_0240.CR2 +/oral histories/jide_s1_m_20160319_yor/raws/Thumbnail/_MG_0242.CR2 +/oral histories/jide_s1_m_20160319_yor/raws/Thumbnail/_MG_0243.CR2 +/oral histories/jide_s1_m_20160319_yor/raws/footage/clips/video 1/MVI_0074.MOV +/oral histories/jide_s1_m_20160319_yor/raws/Thumbnail/_MG_0071.CR2 +/oral histories/jide_s1_m_20160319_yor/raws/Thumbnail/_MG_0072.CR2 +/oral histories/jide_s1_m_20160319_yor/raws/Thumbnail/_MG_0073.CR2 +/oral histories/jide_s1_m_20160319_yor/raws/premiere project/Adobe Premiere Pro Auto-Save/Untitled-1.prproj +/oral histories/jide_s1_m_20160319_yor/raws/premiere project/Adobe Premiere Pro Auto-Save/Untitled-2.prproj +/oral histories/jide_s1_m_20160319_yor/raws/Thumbnail/Screen Shot 2017-12-07 at 7.00.40 PM.png +/oral histories/margaret_s1_f_20160806_hat/raws/thumbnail/Screen Shot 2017-12-07 at 7.05.06 PM.png +/oral histories/senful_s1_m_20170329_zsm/raws/thumbnail/Screen Shot 2017-12-07 at 7.12.03 PM.png +/oral histories/mónica_20171029_ssp (unicode encoding conflict)/raws/thumbnail/Screen Shot 2017-12-07 at 5.19.59 PM.png +/oral histories/frances_s1_f_20170425_gle/raws/thumbnail/Frances_20170425_gle.jpg +/oral histories/frances_s1_f_20170425_gle/raws/thumbnail/Alaric_20171103_afr.jpg +/oral histories/ayu_20170823_jav/raws/thumbnail/Ayu_20170823_jav.jpg +/oral histories/txeli_20171103_eus/raws/thumbnail/Txeli_20171103_eus.jpg +/oral histories/margaret_s1_f_20160806_hat/raws/thumbnail/Margaret_20160806_hat.jpg +/oral histories/betsy_20170813_msn/raws/thumbnail/Betsy_20170813_msn.jpg +/oral histories/senful_s1_m_20170329_zsm/raws/thumbnail/Senful_20170329_zsm.jpg +/oral histories/gi_s2_f_20170509_lmo+ita/raws/thumbnail/.jpg +/oral histories/gi_s2_f_20170509_lmo+ita/raws/thumbnail/Gi_20170509_lmo+ita.jpg +/oral histories/jide_s1_m_20160319_yor/raws/footage/audio/video 2/STE-001.wav +/oral histories/jide_s1_m_20160319_yor/raws/footage/audio/video 2/STE-002.wav +/oral histories/jide_s1_m_20160319_yor/raws/footage/audio/video 2/STE-003.wav +/oral histories/jide_s1_m_20160319_yor/raws/premiere project/final/Jide_20160319_yor.prproj +/Oral Histories/Jide_s1_M_20160319_yor/Jide_20160319_yor.mp4 +/Oral Histories/Margaret_s1_F_20160806_hat/raws/footage/clips/Margaret Audio Extracted.pkf +/Oral Histories/Margaret_s1_F_20160806_hat/Margaret_20160806_hat.mp4 +/oral histories/margaret_s1_f_20160806_hat/raws/Premiere project/Margaret_20160806_hat.prproj +/Oral Histories/Margaret_s1_F_20160806_hat/Margaret_20160806_hat.jpg +/oral histories/Betsy_20170813_msn/Betsy_20170813_msn.jpg +/oral histories/Senful_s1_M_20170329_zsm/Senful_20170329_zsm.jpg +/oral histories/Gi_s2_F_20170509_lmo+ita/Gi_20170509_lmo+ita.jpg +/oral histories/Sarita_20171228_swv/readme.txt +/oral histories/Stefano_20180105_nap/readme.txt +/oral histories/sarita_20171228_swv/raws/footage/clips/Sarita_20171228_swv.mp4 +/oral histories/stefano_20180105_nap/raws/footage/clips/Stefano_20180105_nap.mp4 +/oral histories/Carlos_20180105_quc/readme.txt +/oral histories/carlos_20180105_quc/raws/footage/clips/Carlos speaking K'iche' - wikitongues.mov +/oral histories/steven_20171223_scn/raws/footage/clips/fari ficu.AVI +/oral histories/Alex_20180115_zkk/readme.txt +/oral histories/alex_20180115_zkk/raws/footage/clips/Video(1).MOV +/oral histories/Jerry_20180115_xpe/readme.txt +/oral histories/Genesis_20180115_mev/readme.txt +/oral histories/genesis_20180115_mev/raws/footage/clips/mano_WhatsApp Video 2017-11-25 at 11.31.00.mp4 +/oral histories/Zubah_20180115_lom/readme.txt +/oral histories/zubah_20180115_lom/raws/footage/clips/loma_WhatsApp Video 2017-11-25 at 11.30.05.mp4 +/oral histories/zubah_20180115_lom/raws/footage/clips/loma_WhatsApp Video 2017-11-25 at 11.30.06.mp4 +/oral histories/priya_20170622_tam/raws/footage/thumbnails/Priya_20170622_tam.png +/oral histories/priya_20170622_tam/raws/footage/thumbnails/Priya_20170622_tam1.png +/oral histories/priya_20170622_tam/raws/footage/thumbnails/Priya_20170622_tam2.png +/oral histories/serah_20170813_mlv/raws/thumbnail/Serah_20170813_mlv.png +/oral histories/serah_20170813_mlv/raws/thumbnail/Serah_20170813_mlv1.png +/oral histories/james_20171103_nus/raws/thumbnail/James_20171103_nus.png +/oral histories/kateryna_20171226_ukr/raws/thumbnail/Kateryna_20171226_ukr1.png +/oral histories/kateryna_20171226_ukr/raws/thumbnail/Kateryna_20171226_ukr2.png +/oral histories/stefano_20180105_nap/raws/thumbnail/Stefano_20180105_nap1.png +/oral histories/carlos_20180105_quc/raws/thumbnail/Carlos_20180105_quc.png +/oral histories/alex_20180115_zkk/raws/thumbnail/Alex_20180115_zkk.png +/oral histories/zubah_20180115_lom/raws/thumbnail/Zubah_20180115_lom.png +/oral histories/carlos_20180105_quc/raws/premier project/Adobe Premiere Pro Auto-Save/Carlos_20180105_quc-2.prproj +/oral histories/jan_20170609_nld/raws/footage/clips/Jan Van der Aa Brabants Audio Extracted.wav +/oral histories/carlos_20180105_quc/raws/premier project/Adobe Premiere Pro Auto-Save/Carlos_20180105_quc-3.prproj +/oral histories/carlos_20180105_quc/raws/premier project/Adobe Premiere Pro Auto-Save/Carlos_20180105_quc-4.prproj +/oral histories/jan_20170609_nld/raws/premier project/Adobe Premiere Pro Auto-Save/Jan_20170609_nld-1.prproj +/oral histories/stefano_20180105_nap/raws/Premier Project/Stefano_20180105_nap.prproj +/oral histories/carlos_20180105_quc/raws/Premier Project/Carlos_20180105_quc.prproj +/oral histories/jan_20170609_nld/raws/footage/clips/Jan Van der Aa Brabants Audio Extracted Audio Extracted.pkf +/oral histories/jan_20170609_nld/raws/footage/clips/Jan Van der Aa Brabants Audio Extracted Audio Extracted.wav +/oral histories/Jan_20170609_nld/Jan_20170609_nld.mp4 +/oral histories/Kateryna_20171226_ukr/Kateryna_20171226_ukr.mp4 +/oral histories/Stefano_20180105_nap/Stefano_20180105_nap.mp4 +/oral histories/priya_20170622_tam/raws/footage/premiere project/adobe premiere pro audio previews/priya_20170622_tam.prv/Peak Files/e00d7c36-b0a4-42f1-9177-1593f922f69b+00e29664-c1bb-743b-0602-892600000049 48000.pek +/oral histories/priya_20170622_tam/raws/footage/premiere project/adobe premiere pro audio previews/Priya_20170622_tam.PRV/e00d7c36-b0a4-42f1-9177-1593f922f69b+00e29664-c1bb-743b-0602-892600000049 48000.cfa +/Oral Histories/Priya_20170622_tam/raws/footage/clips/Sri Lankan Tamil_Priya Audio Extracted_1.pkf +/oral histories/priya_20170622_tam/raws/footage/premiere project/Adobe Premiere Pro Auto-Save/Priya_20170622_tam-1.prproj +/oral histories/zubah_20180115_lom/raws/Premier Project/Zubah_20180115_lom.prproj +/oral histories/priya_20170622_tam/raws/footage/Premiere project/Priya_20170622_tam.prproj +/oral histories/zubah_20180115_lom/raws/Premier Project/Zubah_20180115_lom~recover.prproj +/Oral Histories/Priya_20170622_tam/Priya_20170622_tam.mp4 +/oral histories/Zubah_20180115_lom/Zubah_20180115_lom.mp4 +/oral histories/yusuf_20180129_sun/raws/footage/clips/New Project.mp4 +/oral histories/Maxime_20180129_fra/readme.txt +/oral histories/maxime_20180129_fra/raws/footage/clips/IMG_3972.MOV +/oral histories/james_20171103_nus/raws/footage/clips/2017-10-09 13.31.16 Audio Extracted.wav +/oral histories/serah_20170813_mlv/raws/footage/clips/Serah - Mwotlap Audio Extracted.pkf +/oral histories/serah_20170813_mlv/raws/footage/clips/Serah - Mwotlap Audio Extracted.wav +/oral histories/james_20171103_nus/raws/Premier Project/James_20171103_nus.prproj +/oral histories/James_20171103_nus/James_20171103_nus.mp4 +/oral histories/Serah_20170813_mlv/Serah_20170813_mlv.mp4 +/Oral Histories/Xheladin_s1_M_20150720_aln/raws/footage/Xheladin - Gheg Albanian_1 Audio Extracted.wav +/Oral Histories/Xheladin_s1_M_20150720_aln/raws/Premier Project/Xheladin_20150720_aln.prproj +/oral histories/alex_20180115_zkk/raws/Premier Project/Alex_20180115_zkk.prproj +/Oral Histories/Xheladin_s1_M_20150720_aln/Xheladin_20150720_aln.mp4 +/oral histories/Alex_20180115_zkk/Alex_20180115_zkk.jpg +/oral histories/Khup_20171004_zom/readme.txt +/oral histories/Michael_20171004_mlu/readme.txt +/oral histories/Patricia_20171004_ntu/readme.txt +/oral histories/michael_20171004_far/raws/thumbnail/Screen Shot 2018-01-31 at 10.47.20 PM.png +/oral histories/michael_20171004_mlu/raws/footage/clips/Michael Kaura To'abaita, North Malaita.mp4 +/oral histories/patricia_20171004_ntu/raws/footage/clips/Patricia George Santa Cruz language Natqnnga .mp4 +/oral histories/khup_20171004_zom/raws/footage/clips/Khup Lal, in Tedim, Chin region Burma speaking Zom.mp4 +/oral histories/David_20180203_apc/readme.txt +/oral histories/david_20180203_apc/raws/footage/clips/David Speaking Arabic.mp4 +/oral histories/Robertson_20180207_dnj/readme.txt +/oral histories/Musu_20180207_men/readme.txt +/oral histories/musu_20180207_men/raws/footage/clips/Mende.mp4 +/oral histories/Daniel_20180207_pes/readme.txt +/oral histories/daniel_20180207_pes/raws/footage/captions/wikitongues-daniel-final.sbv +/oral histories/Ying_20170924_cmn/Ying_20170924_cmn.png +/oral histories/chaofen+changjiu_20170615_cmn/raws/footage/captions/WIKITONGUES Changjiu and Chaofen speaking Guiyangese.zh-cn.srt +/oral histories/mariaolimpia_20170823_ell+ita/raws/footage/clips/MVI_0105 Audio Extracted.wav +/oral histories/yusuf_20180129_sun/raws/Premier Project/Yusuf_20180129_sun.prproj +/oral histories/mariaolimpia_20170823_ell+ita/raws/Premier Project/MariaOlimpia_20170820_ell+ita.prproj +/oral histories/Yusuf_20180129_sun/Yusuf_20180129_sun.mp4 +/oral histories/mariaolimpia_20170823_ell+ita/raws/thumbnail/Screen Shot 2018-02-13 at 2.42.52 PM.png +/oral histories/mariaolimpia_20170823_ell+ita/raws/thumbnail/Screen Shot 2018-02-13 at 2.43.38 PM.png +/oral histories/MariaOlimpia_20170823_ell+ita/MariaOlimpia_20170820_ell+ita.jpg +/oral histories/Anna_20160803_sjd/Anna_s1_F_20160803_sjd.mp4 +/oral histories/anna_20160803_sjd/raws/footage/captions/WIKITONGUES Anna speaking Kildin Saami.en.srt +/oral histories/anna_20160803_sjd/raws/footage/clips/IMG_3218 Audio Extracted.pkf +/oral histories/anna_20160803_sjd/raws/footage/clips/IMG_3218 Audio Extracted.wav +/oral histories/anna_20160803_sjd/raws/footage/clips/IMG_3218.MOV +/oral histories/Azariah_20160102_spa/Azariah_s1_F_20160102_spa.jpg +/oral histories/Azariah_20160102_spa/Azariah_s1_F_20160102_spa.mp4 +/oral histories/azariah_20160102_spa/raws/footage/captions/WIKITONGUES Azariah speaking Spanish.en.srt +/oral histories/azariah_20160102_spa/raws/footage/clips/Azariah speaks Central American Spanish.MOV +/oral histories/azariah_20160102_spa/raws/thumbnail/Screen Shot 2016-08-04 at 16.14.23.png +/oral histories/azariah_20160102_spa/raws/thumbnail/Screen Shot 2016-08-04 at 16.14.25.png +/oral histories/azariah_20160102_spa/raws/thumbnail/Screen Shot 2016-08-04 at 16.14.28.png +/oral histories/azariah_20160102_spa/raws/thumbnail/Screen Shot 2016-08-04 at 16.14.33.png +/oral histories/azariah_20160102_spa/raws/thumbnail/Screen Shot 2016-08-04 at 16.14.34.png +/oral histories/azariah_20160102_spa/raws/thumbnail/Screen Shot 2016-08-04 at 16.14.38.png +/oral histories/azariah_20160102_spa/raws/thumbnail/Screen Shot 2016-08-04 at 16.14.42.png +/oral histories/Dessire_20140729_gsw/Dessire_20140729_gsw.jpg +/oral histories/dessire_20140729_gsw/raws/footage/audio/STE-009 Audio Extracted.pkf +/oral histories/dessire_20140729_gsw/raws/footage/audio/STE-009 Audio Extracted.wav +/oral histories/dessire_20140729_gsw/raws/footage/audio/STE-009.wav +/oral histories/dessire_20140729_gsw/raws/footage/converted/MVI_9887.mov +/oral histories/dessire_20140729_gsw/raws/Premier Project/Dessire_20140729_gsw.prproj +/oral histories/dessire_20140729_gsw/raws/thumbnail/kJSZBKYgQ02ZpSO1CCAa_dessire-gsw-thumb-raw.png +/oral histories/Đức(Duc)_20150621_vie/Đức(Duc)_20150621_vie.mp4 +/oral histories/đức(duc)_20150621_vie/raws/captions/Đức(Duc)_20150621_vie_vie.srt +/oral histories/eetu_20170709_fse/raws/captions/Eetu_20170709_fse_eng.srt +/oral histories/Foffo_20170421_nap/Foffo_s1_M_20170421_nap.mp4 +/oral histories/foffo_20170421_nap/raws/footage/clips/IMG_1919 Audio Extracted Audio Extracted.pkf +/oral histories/foffo_20170421_nap/raws/footage/clips/IMG_1919 Audio Extracted Audio Extracted.wav +/oral histories/foffo_20170421_nap/raws/footage/clips/IMG_1919 Audio Extracted.wav +/oral histories/foffo_20170421_nap/raws/footage/clips/IMG_1919.MOV +/oral histories/foffo_20170421_nap/raws/premier project/adobe premiere pro audio previews/Foffo_s1_M_20170421_nap.PRV/321b4b55-d659-4708-a4b0-3a1d29d7e1fd+8ae44b84-bdaf-fe4f-63ce-96a200000069 48000.cfa +/oral histories/foffo_20170421_nap/raws/premier project/adobe premiere pro audio previews/Foffo_s1_M_20170421_nap.PRV/5f4a054f-2072-4c45-94be-06093f8b5054+89a3f46a-3c52-3a6c-9f3e-757600000049 48000.cfa +/oral histories/foffo_20170421_nap/raws/premier project/adobe premiere pro audio previews/foffo_s1_m_20170421_nap.prv/Peak Files/321b4b55-d659-4708-a4b0-3a1d29d7e1fd+8ae44b84-bdaf-fe4f-63ce-96a200000069 48000.pek +/oral histories/foffo_20170421_nap/raws/premier project/adobe premiere pro audio previews/foffo_s1_m_20170421_nap.prv/Peak Files/39694671-7bf6-4aa7-904f-cf461f7f7115+5fcbe9f3-275b-9630-4e96-a50800000049 48000.pek +/oral histories/foffo_20170421_nap/raws/Premier Project/Foffo_s1_M_20170421_nap.prproj +/oral histories/foffo_20170421_nap/raws/Premier Project/Sister_s1_F_20161025_smo.prproj +/oral histories/foffo_20170421_nap/raws/thumbnail/Screen Shot 2017-05-02 at 15.39.50.png +/oral histories/foffo_20170421_nap/raws/footage/captions/Foffo_20170421_nap_eng.srt +/oral histories/foffo_20170421_nap/raws/footage/captions/Foffo_20170421_nap_ita.srt +/oral histories/golala_20170928_ckb/raws/captions/Golala_20170928_ckb_eng.srt +/oral histories/irena_20160517_sme/raws/thumbnail/Screen Shot 2016-06-10 at 19.45.32.png +/oral histories/Irena_20160517_sme/readme.txt +/oral histories/irena_20160517_sme/raws/footage/captions/Irena_20160517_sme_eng.srt +/oral histories/Islem_20160827_prs/Islem_s1_M_20160827_prs.jpg +/oral histories/Islem_20160827_prs/Islem_s1_M_20160827_prs.mp4 +/oral histories/islem_20160827_prs/raws/footage/clips/Islem Audio Extracted Audio Extracted.pkf +/oral histories/islem_20160827_prs/raws/footage/clips/Islem Audio Extracted.pkf +/oral histories/islem_20160827_prs/raws/footage/clips/Islem Audio Extracted.wav +/oral histories/islem_20160827_prs/raws/footage/clips/Islem.mov +/oral histories/islem_20160827_prs/raws/thumbnail/Screen Shot 2016-10-21 at 19.04.44.png +/oral histories/islem_20160827_prs/raws/thumbnail/Screen Shot 2016-10-21 at 19.04.45.png +/oral histories/islem_20160827_prs/raws/thumbnail/Screen Shot 2016-10-21 at 19.04.46.png +/oral histories/Lena_20140729_dan/Lena_s1_F_20140729_dan.jpg +/oral histories/Lena_20140729_dan/Lena_s1_F_20140729_dan.mp4 +/oral histories/lena_20140729_dan/raws/footage/lena-dan Audio Extracted.pkf +/oral histories/lena_20140729_dan/raws/footage/lena-dan.mp4 +/oral histories/lena_20140729_dan/raws/Premier Project/Lena_s1_F_20140729_dan.prproj +/oral histories/lena_20140729_dan/raws/thumbnail/Screen Shot 2016-09-20 at 12.24.28 1.png +/oral histories/lena_20140729_dan/raws/thumbnail/Screen Shot 2016-09-20 at 12.24.55.png +/oral histories/lena_20140729_dan/raws/thumbnail/Screen Shot 2016-09-20 at 12.25.22.png +/oral histories/lena_20140729_dan/raws/thumbnail/Screen Shot 2016-09-20 at 12.26.56.png +/oral histories/lena_20140729_dan/raws/footage/captions/Lena_20140729_dan_eng.srt +/oral histories/Luis_20131019_glg/galician-luis.mp4 +/oral histories/Luis_20131019_glg/galician-luis0.mp4 +/oral histories/luis_20131019_glg/raws/footage/clips/MVI_9986.MOV +/oral histories/luis_20131019_glg/raws/footage/clips/STE-019.wav +/oral histories/Luis_20131019_glg/readme.txt +/oral histories/mauro_20140729_spa/raws/footage/audio/STE-013 Audio Extracted.pkf +/oral histories/mauro_20140729_spa/raws/footage/audio/STE-013 Audio Extracted.wav +/oral histories/mauro_20140729_spa/raws/footage/audio/STE-013.wav +/oral histories/mauro_20140729_spa/raws/footage/converted/MVI_9924.mov +/oral histories/mauro_20140729_spa/raws/premier project/Adobe Premiere Pro Auto-Save/Mauro_s1_M_20140729_spa-1.prproj +/oral histories/mauro_20140729_spa/raws/premier project/Adobe Premiere Pro Auto-Save/Mauro_s1_M_20140729_spa-2.prproj +/oral histories/mauro_20140729_spa/raws/thumbnail/2Ot8dGbsRqqIQuchWk6u_mauro-spa-thumb-raw.png +/oral histories/mauro_20140729_spa/raws/footage/captions/Mauro_20140729_spa_spa.srt +/oral histories/Nitesh_20160614_bgc/Nitesh_s1_F_20160614_bgc.mp4 +/oral histories/nitesh_20160614_bgc/raws/footage/converted/Nitesh Speaking Haryanvi Audio Extracted.pkf +/oral histories/nitesh_20160614_bgc/raws/footage/converted/Nitesh Speaking Haryanvi Audio Extracted.wav +/oral histories/nitesh_20160614_bgc/raws/footage/converted/Nitesh Speaking Haryanvi.mov +/oral histories/nitesh_20160614_bgc/raws/Premier Project/Nitesh_s1_F_20160614_bgc.prproj +/oral histories/Nitesh_20160614_bgc/vykd9zPSuW5Y9JPO0fP1_Nitesh_s1_F_20160614_bgc.jpg +/oral histories/nitesh_20160614_bgc/raws/captions/Nitesh_20160614_bgc_eng.srt +/oral histories/Pau_20170509_fra+lit+ita+eng+spa+cat/Pau_s6_M_20170509_fra+lit+ita+eng+spa+cat.png +/oral histories/pau_20170509_fra+lit+ita+eng+spa+cat/raws/footage/clips/Wikitongues Pau Audio Extracted.pkf +/oral histories/pau_20170509_fra+lit+ita+eng+spa+cat/raws/footage/clips/Wikitongues Pau Audio Extracted.wav +/oral histories/pau_20170509_fra+lit+ita+eng+spa+cat/raws/Premier Project/Pau_20170509_fra+lit+ita+eng+spa+cat.prproj +/oral histories/pau_20170509_fra+lit+ita+eng+spa+cat/raws/thumbnail/Screen Shot 2017-06-01 at 13.46.42.png +/oral histories/pau_20170509_fra+lit+ita+eng+spa+cat/raws/thumbnail/Screen Shot 2017-06-01 at 13.47.15.png +/oral histories/Pau_20170509_fra+lit+ita+eng+spa+cat/readme.txt +/oral histories/pau_20170509_fra+lit+ita+eng+spa+cat/raws/footage/captions/Pau_20170509_fra+lit+ita+eng+spa+cat_eng.srt +/oral histories/pau_20170509_fra+lit+ita+eng+spa+cat/raws/footage/captions/Pau_20170509_fra+lit+ita+eng+spa+cat_fra.srt +/oral histories/sebastiano_20131103_ita/raws/footage/captions/Sebastiano_20131103_ita_ita.srt +/oral histories/sebastiano_20131103_ita/raws/footage/clips/MVI_8395.MOV +/oral histories/Sebastiano_20131103_ita/readme.txt +/oral histories/sebastiano_s1_m_20131103_ita (first duplicate)/raws/footage/clips/MVI_8395.MOV +/oral histories/sebastiano_s1_m_20131103_ita (second duplicate)/raws/footage/clips/STE-090.wav +/oral histories/sho_s1_m_20141106_jpn/raws/footage/captions/Sho_20141106_jpn_glg.srt +/oral histories/sho_s1_m_20141106_jpn/raws/footage/captions/Sho_20141106_jpn_eng.srt +/oral histories/sho_s1_m_20141106_jpn/raws/footage/captions/Sho_20141106_jpn_jpn.srt +/oral histories/simon_20160128_pms/captions/Simon_20160128_pms_eng.srt +/oral histories/cookson_20161025_mri/raws/footage/captions/Cookson_20161025_mri_eng.srt +/oral histories/sooalo_20161025_smo/raws/footage/captions/Sooalo_20161025_smo_eng.srt +/oral histories/stefano_20180105_nap/raws/footage/captions/Stefano_20180105_nap_ita.srt +/oral histories/suseong_20140320_kor/raws/footage/captions/Suseong_20140320_kor_eng.srt +/oral histories/suseong_20140320_kor/raws/footage/captions/Suseong_20140320_kor_spa.srt +/oral histories/suseong_20140320_kor/raws/footage/captions/Suseong_20140320_kor_glg.srt +/oral histories/theresa_20170622_aka/raws/footage/captions/Theresa_20170622_aka_eng.srt +/oral histories/varney+omoru_20170527_vai/raws/footage/VID_20170525_164219025 Audio Extracted.pkf +/oral histories/varney+omoru_20170527_vai/raws/footage/VID_20170525_164219025 Audio Extracted.wav +/oral histories/varney+omoru_20170527_vai/raws/premiere project/Adobe Premiere Pro Auto-Save/Untitled-1.prproj +/oral histories/varney+omoru_20170527_vai/raws/Premiere project/Untitled.prproj +/oral histories/varney+omoru_20170527_vai/raws/thumbnails/Screen Shot 2017-06-01 at 13.18.23.png +/oral histories/Varney+Omoru_20170527_vai/readme.txt +/oral histories/Varney+Omoru_20170527_vai/Varney+Omoru_20170527_vai.jpg +/oral histories/Varney+Omoru_20170527_vai/Varney+Omoru_20170527_vai.mp4 +/oral histories/vernell_20151219_deu/raws/footage/clips/MVI_9944.MOV +/oral histories/vernell_20151219_deu/raws/footage/clips/Texasdeutsch Audio Extracted.pkf +/oral histories/vernell_20151219_deu/raws/footage/clips/Texasdeutsch Audio Extracted.wav +/oral histories/vernell_20151219_deu/raws/footage/converted/MVI_9944.mov +/oral histories/vernell_20151219_deu/raws/premier project/Adobe Premiere Pro Auto-Save/Vernell_s1_F_20151219_deu-1.prproj +/oral histories/vernell_20151219_deu/raws/premier project/adobe premiere pro preview files/Vernell_s1_F_20151219_deu.PRV/a999fe29-316b-4303-812d-9f431b0974df+e376bb9d-c817-f3c0-8fb6-8e8900000049 48000.cfa +/oral histories/vernell_20151219_deu/raws/Premier Project/Vernell_s1_F_20151219_deu.prproj +/oral histories/vernell_20151219_deu/raws/thumbnail/Screen Shot 2016-10-04 at 22.52.20.png +/oral histories/vernell_20151219_deu/raws/thumbnail/Screen Shot 2016-10-04 at 22.52.21.png +/oral histories/Vernell_20151219_deu/Vernell_20151219_deu.mp4 +/oral histories/vernell_20151219_deu/raws/footage/captions/Vernell_20151219_deu_eng.srt +/oral histories/yannic_20150815_deu/raws/premiere project/Adobe Premiere Pro Auto-Save/Yannic speaking German-1.prproj +/oral histories/yannic_20150815_deu/raws/premiere project/adobe premiere pro preview files/Yannic speaking German.PRV/6e02eae9-fe13-48fb-87a4-dd9c08692c74+983d2284-fa60-d800-fe69-0fa200000049 48000.pek +/oral histories/yannic_20150815_deu/raws/Premiere Project/Yannic speaking German.prproj +/oral histories/yannic_20150815_deu/raws/footage/captions/Yannic_20150815_deu_deu.srt +/oral histories/yannic_20150815_deu/raws/footage/audio/yannic (fake) swabian Audio Extracted.pkf +/oral histories/yannic_20150815_deu/raws/footage/audio/yannic (fake) swabian Audio Extracted.wav +/oral histories/yannic_20150815_deu/raws/footage/audio/yannic (fake) swabian.aiff +/oral histories/ying_20170924_cmn/raws/captions/Ying_20170924_cmn_eng.srt +/oral histories/tatenda_20131103_sna/raws/footage/audio/STE-070.wav +/oral histories/tatenda_20131103_sna/raws/footage/audio/MVI_8373.MOV +/oral histories/Tatenda_20131103_sna/Tatenda_20131103_sna.mp4 +/oral histories/tatenda_20131103_sna/raws/footage/captions/Tatenda_20131103_sna_eng.srt +/oral histories/josébenito_20180210_-llt (unicode encoding conflict)/raws/footage/clips/MVI_9322.mp4 +/oral histories/Abderrahman_20180217_shi/readme.txt +/oral histories/abderrahman_20180217_shi/raws/footage/clips/Wikitongue-Tashelhit.mpeg +/oral histories/abderrahman_20180217_shi/raws/footage/captions/Abderrahman_20180217_shi_eng.srt +/oral histories/Yusuf_20180129_sun/Yusuf_20180129_sun.jpg +/oral histories/Anass_20180220_rif/readme.txt +/oral histories/anass_20180220_rif/raws/footage/clips/IMG_2394.MOV +/oral histories/maxime_20180129_fra/raws/footage/clips/IMG_3972 Audio Extracted.wav +/oral histories/Maxime_20180129_fra/Maxime_20180129_fra.mp4 +/oral histories/maxime_20180129_fra/raws/premier project/Adobe Premiere Pro Auto-Save/Maxime_20180129_fra-1.prproj +/oral histories/maxime_20180129_fra/raws/thumbnail/Screen Shot 2018-02-20 at 4.15.29 PM.png +/oral histories/maxime_20180129_fra/raws/thumbnail/Screen Shot 2018-02-20 at 4.14.16 PM.png +/oral histories/jasmin_20160717_new/raws/footage/audio/STE-002.wav +/oral histories/jasmin_20160717_new/raws/Premier Project/Jasmin_20160717_new.prproj +/oral histories/jasmin_20160717_new/raws/footage/clips/MVI_0162 Audio Extracted.pkf +/oral histories/jasmin_20160717_new/raws/footage/clips/MVI_0162 Audio Extracted.wav +/oral histories/Jasmin_20160717_new/Jasmin_20160717_new.mp4 +/oral histories/jasmin_s1_f_20160717_new/raws/premier project/Adobe Premiere Pro Auto-Save/Jasmin_20160717_new-1.prproj +/oral histories/owen_20171004_glv/raws/footage/audio/Gaelg 2.m4a +/oral histories/owen_20171004_glv/raws/footage/clips/20170919_185429.mp4 +/oral histories/maxime_20180129_fra/raws/premier project/Adobe Premiere Pro Auto-Save/Maxime_20180129_fra-2.prproj +/oral histories/owen_20171004_glv/raws/footage/clips/20170919_185429 Audio Extracted.pkf +/oral histories/jasmin_s1_f_20160717_new/raws/premier project/Adobe Premiere Pro Auto-Save/Jasmin_20160717_new-2.prproj +/oral histories/owen_20171004_glv/raws/Premier Project/Owen_20171004_glv.prproj +/Oral Histories/Jasmin_s1_F_20160717_new/raws/Premier Project/Jasmin_20160717_new.prproj +/oral histories/maxime_20180129_fra/raws/Premier Project/Jasmin_20160717_new.prproj +/oral histories/Owen_20171004_glv/Owen_20171004_glv.mp4 +/oral histories/owen_20171004_glv/raws/footage/clips/owen_20170803_glv/raws/footage/clips/CURRENT_Owen_20170803_glv.MOV +/oral histories/owen_20171004_glv/raws/footage/clips/Owen_20170803_glv/readme.txt +/oral histories/owen_20171004_glv/raws/footage/clips/owen_20170824_glv/raws/footage/audio/Gaelg 2.m4a +/oral histories/owen_20171004_glv/raws/footage/clips/owen_20170824_glv/raws/footage/clips/Owen_20170824_glv.MOV +/oral histories/owen_20171004_glv/raws/footage/captios/Owen_20171004_glv_eng.txt +/oral histories/anass_20180220_rif/raws/footage/captions/Anass_20180220_rif_eng.srt +/oral histories/anass_20180220_rif/raws/footage/captions/Anass_20180220_rif_rif.srt +/oral histories/jasmin_20160717_new/raws/thumbnail/Jasmin_20160717_new.png +/oral histories/Jacques+Yvette_20180226_fra/readme.txt +/oral histories/Achille_20180226_mos+dyu/readme.txt +/oral histories/achille_20180226_mos+dyu/raws/footage/clips/MVI_7386.MP4 +/oral histories/jacques+yvette_20180226_fra/raws/footage/clips/IMG_7929.MOV +/oral histories/mariette_20180226_fra/raws/footage/clips/IMG_7932.MOV +/oral histories/Owen_20171004_glv/Owen_20170803_glv.jpg +/oral histories/Steven_20180227_scn/readme.txt +/oral histories/steven_20180227_scn/raws/footage/clips/Pi Fonso.wmv +/oral histories/karen_20160717_yue/raws/footage/clips/MVI_0166.MOV +/oral histories/karen_20160717_yue/raws/footage/audio/STE-006 Audio Extracted.pkf +/oral histories/karen_20160717_yue/raws/footage/audio/STE-006 Audio Extracted.wav +/oral histories/Karen_20160717_yue/Karen_20160717_yue.mp4 +/oral histories/patricia_20171004_ntu/raws/premier project/adobe premiere pro video previews/Patricia_20171004_ntu.PRV/Rendered - 007ac1ad-efc9-4e45-8ee8-c73603923407.MXF.xmp +/oral histories/patricia_20171004_ntu/raws/premier project/adobe premiere pro video previews/Patricia_20171004_ntu.PRV/Rendered - 007ac1ad-efc9-4e45-8ee8-c73603923407.MXF +/oral histories/cristian_20150428_rup/raws/footage/clips/Cristian_s1_M_20150428_rup.mp4 +/oral histories/Cristian_20150428_rup/readme.txt +/oral histories/cristian_20150428_rup/raws/footage/clips/Cristian_s1_M_20150428_rup Audio Extracted.pkf +/oral histories/cristian_20150428_rup/raws/Premier Project/Cristian_20150428_rup.prproj +/oral histories/patricia_20171004_ntu/raws/footage/clips/Patricia George Santa Cruz language Natqnnga Audio Extracted.pkf +/oral histories/patricia_20171004_ntu/raws/footage/clips/Patricia George Santa Cruz language Natqnnga Audio Extracted.wav +/oral histories/Cristian_20150428_rup/Cristian_20150428_rup.mp4 +/oral histories/kk_20170801_hks/raws/footage/captions/KK_20170801_hks_cmn.srt +/oral histories/Cristian_20150428_rup/Cristian_20150428_rup.jpg +/oral histories/karen_20160717_yue/raws/thumbnail/Screen Shot 2018-02-27 at 7.16.48 PM.png +/oral histories/cristian_20150428_rup/raws/thumbnail/Screen Shot 2018-02-27 at 7.02.27 PM.png +/oral histories/patricia_20171004_ntu/raws/thumbnail/Screen Shot 2018-02-27 at 7.37.17 PM.png +/oral histories/Mandala_20180228_sun/readme.txt +/oral histories/mandala_20180228_sun/raws/footage/clips/MVI_7390.MP4 +/oral histories/khup_20171004_zom/raws/footage/clips/Khup Lal, in Tedim, Chin region Burma speaking Zom Audio Extracted.pkf +/Oral Histories/Chez_s1_F_20160717_taj/raws/footage/clips/MVI_0163 Audio Extracted.pkf +/Oral Histories/Chez_s1_F_20160717_taj/raws/footage/clips/MVI_0163 Audio Extracted.wav +/oral histories/khup_20171004_zom/raws/premier project/Adobe Premiere Pro Auto-Save/Khup_20171004_zom-1.prproj +/Oral Histories/Chez_s1_F_20160717_taj/raws/Premier Project/Chez_20160717_taj.prproj +/oral histories/chez_s1_f_20160717_taj/raws/premier project/Adobe Premiere Pro Auto-Save/Chez_20160717_taj-2.prproj +/oral histories/khup_20171004_zom/raws/premier project/Adobe Premiere Pro Auto-Save/Khup_20171004_zom-2.prproj +/oral histories/david_20180203_apc/raws/footage/clips/David Speaking Arabic Audio Extracted.wav +/oral histories/david_20180203_apc/raws/Premier Project/David_20180203_apc.prproj +/oral histories/yann_20170710_bre/raws/footage/clips/Yann speaking Breton Audio Extracted.pkf +/oral histories/khup_20171004_zom/raws/premier project/Adobe Premiere Pro Auto-Save/Khup_20171004_zom-3.prproj +/oral histories/yann_20170710_bre/raws/Premier Project/Yann_20170710_bre.prproj +/oral histories/chez_s1_f_20160717_taj/raws/premier project/Adobe Premiere Pro Auto-Save/Chez_20160717_taj-3.prproj +/Oral Histories/Chez_s1_F_20160717_taj/Chez_20160717_taj.mp4 +/oral histories/David_20180203_apc/David_20180203_apc.mp4 +/oral histories/Khup_20171004_zom/Khup_20171004_zom.mp4 +/oral histories/Donna+Elizabeth_20171211_eng+cho+?bll/readme.txt +/oral histories/donna+elizabeth_20171211_eng+cho+?bll/raws/footage/clips/Biloxi and Choctaw Songs.MP4 +/oral histories/Donna+Elizabeth_20171211_tun+eng/readme.txt +/oral histories/donna+elizabeth_20171211_tun+eng/raws/footage/clips/Tunica Conversation and Learning Songs.MP4 +/oral histories/donna+elizabeth_20171211_tun+eng/raws/footage/clips/English Explanation of Tunica Conversation.MP4 +/oral histories/donna+elizabeth_20171211_tun+eng/raws/footage/clips/Red and blue alligator horse dance and traditional Tunica songs.MP4 +/oral histories/donna+elizabeth_20171211_eng+frc/raws/footage/clips/English Stories w LA French.MP4 +/oral histories/donna+elizabeth_20171211_eng+frc/raws/footage/clips/English Stories.MP4 +/oral histories/donna+elizabeth_20171211_eng+frc/raws/footage/clips/John Barbry and English talk.MP4 +/oral histories/donna+elizabeth_20171211_tun+eng/raws/footage/clips/Introduction and Basketry in Tunica Audio Extracted.wav +/oral histories/donna+elizabeth_20171211_tun+eng/raws/premier project/Adobe Premiere Pro Auto-Save/Donna+Elizabeth_20171211_tun+eng-1.prproj +/oral histories/donna+elizabeth_20171211_tun+eng/raws/premier project/Adobe Premiere Pro Auto-Save/Donna+Elizabeth_20171211_tun+eng-2.prproj +/oral histories/Khup_20171004_zom/Khup_20171004_zom.jpg +/oral histories/khup_20171004_zom/raws/thumbnail/Screen Shot 2018-02-28 at 5.53.39 PM.png +/oral histories/yann_20170710_bre/raws/thumbnail/Screen Shot 2018-02-28 at 5.52.38 PM.png +/oral histories/David_20180203_apc/David_20180203_apc.jpg +/Oral Histories/Chez_s1_F_20160717_taj/raws/thumbnail/Screen Shot 2018-03-01 at 2.46.04 PM.png +/oral histories/david_20180203_apc/raws/thumbnail/Screen Shot 2018-03-01 at 2.48.40 PM.png +/oral histories/david_20180203_apc/raws/captions/David Speaking Arabic - original:raws.sbv +/oral histories/josébenito_20180210_-llt (unicode encoding conflict)/raws/footage/captions/JoséBenito_20180210_-llt_spa.srt +/oral histories/Milzon_20180305_-ber/readme.txt +/oral histories/milzon_20180305_-ber/raws/footage/clips/1. Milzon speaking Benana.MOV +/oral histories/bujang+alimoto_20180305_-bhk/raws/footage/clips/2. Bujang speaking BeEih (2).MOV +/oral histories/bujang+alimoto_20180305_-bhk/raws/footage/clips/2. Bujang and Alinoto speaking BeEih (1).MOV +/oral histories/Yulius_20180305_bei/readme.txt +/oral histories/Supriadi_20180305_-bkh/readme.txt +/oral histories/supriadi_20180305_-bkh/raws/footage/clips/3. Supri and Family speaking Bekoeh (2).MOV +/oral histories/yulius_20180305_bei/raws/footage/clips/4. Riko speaking Bekati (2).MOV +/oral histories/supriadi_20180305_-bkh/raws/footage/clips/3. Supri and Family speaking Bekoeh (1).MOV +/oral histories/Florensius_20180305_bei/readme.txt +/oral histories/Andarius_20180305_-bmk/readme.txt +/oral histories/Rizki_20180305_msa/readme.txt +/oral histories/andarius_20180305_-bmk/raws/footage/clips/6. Andar speaking Bemak (1).MOV +/oral histories/andarius_20180305_-bmk/raws/footage/clips/6. Andar speaking Bemak (2).MOV +/oral histories/Hermica_20180305_-bng/readme.txt +/oral histories/hermica_20180305_-bng/raws/footage/clips/8. Hermica speaking Bengape (1).MOV +/oral histories/hermica_20180305_-bng/raws/footage/clips/8. Hermica Bengape (2).MOV +/oral histories/apolonius_20180305_xdy/raws/footage/clips/9. Apolonius speaking Bemayo.MOV +/oral histories/Samuel+Apolonius_20180305_-bkb/readme.txt +/oral histories/romanus_20180305_-bdm/raws/footage/clips/12. Didik speaking Bedamea.MOV +/oral histories/Kristianus_20180305_-bye/readme.txt +/oral histories/samuel+apolonius_20180305_-bkb/raws/footage/clips/11. Samuel Jambul and Apolonius speaking Bekambai.MOV +/oral histories/kristianus_20180305_-bye/raws/footage/clips/13. Kristianus speaking Beaye.MOV +/oral histories/hendrik_20180305_byd/raws/footage/clips/14. Hendrik speaking Benyadu.MOV +/oral histories/Albina+Donawati_20180305_-bdh/readme.txt +/oral histories/albina+donawati_20180305_-bdh/raws/footage/clips/15. Albina and Donawati speaking Bedineh.MOV +/oral histories/victorinus_20180305_-bhe/raws/footage/clips/16. Victorinus speaking Beahe.MOV +/oral histories/Fransiska+Limoi_20180305_knx/readme.txt +/oral histories/fransiska+limoi_20180305_knx/raws/footage/clips/17. Yanda and Limoy speaking Belangin.MOV +/oral histories/paulus_20180305_-mka/raws/footage/clips/18. Paulus speaking Mentuka.MOV +/oral histories/donna+elizabeth_20171211_tun+eng/raws/premier project/Adobe Premiere Pro Auto-Save/Donna+Elizabeth_20171211_tun+eng-3.prproj +/oral histories/latonian+yankee_20180306_unm+nnt/raws/footage/clips/Project006_1.wmv +/oral histories/latonian+yankee_20180306_unm+nnt/raws/footage/clips/180304-083813.wmv +/oral histories/paola_20171226_scn+ita/raws/footage/clips/Paola_20171226_scn.mp4 +/oral histories/paola_20171226_scn+ita/raws/thumbnail/Paola_20171226_scn.png +/oral histories/paola_20171226_scn+ita/raws/thumbnail/Paola_20171226_scn1.png +/oral histories/Paola_20171226_scn+ita/readme.txt +/oral histories/Paola_20171226_scn+ita/Paola_20171226_scn+ita.jpg +/oral histories/latonian+yankee_20180306_unm+nnt/raws/footage/clips/Lenape Nanticoke Speeches.wmv +/oral histories/Seno+Azzam_20180312_jav/readme.txt +/oral histories/seno+azzam_20180312_jav/raws/footage/clips/Seno and Azzam speaking Javanese (Surabaya).MOV +/oral histories/sahid_20180312_ind+min/raws/footage/clips/Sahid speaking Padang and Indonesian 2.MOV +/oral histories/sahid_20180312_ind+min/raws/footage/clips/Sahid speaking Padang and Indonesian.aiff +/oral histories/Sahid_20180312_ind+min/readme.txt +/oral histories/Dede+Febri+Sandi_20180312_sun/readme.txt +/oral histories/dede+febri+sandi_20180312_sun/raws/footage/clips/Dede, Febri, and Sandi speaking Sundanese.aiff +/oral histories/Disa+Niken_20180312_jav/readme.txt +/oral histories/Anass_20180312_ary/readme.txt +/oral histories/anass_20180312_ary/raws/footage/captions/Anass_20180312_ary_ary.srt +/oral histories/Michael_20180312_lou/readme.txt +/oral histories/michael_20180312_lou/raws/footage/clips/video-1519943685.mp4 +/oral histories/Anayo_20180312_ibo/readme.txt +/oral histories/Phoebe_20180312_gjn/readme.txt +/oral histories/Stefano_20180312_gsw/readme.txt +/oral histories/phoebe_20180312_gjn/raws/footage/clips/Phoebe speaking Gonja.MOV +/oral histories/ankita_20180312_ben/raws/footage/clips/Ankita speaking Bengali.MOV +/oral histories/anayo_20180312_ibo/raws/footage/clips/Anayo speaking Igbo.MOV +/oral histories/anass_20180312_ary/raws/footage/clips/IMG_2459.MOV +/oral histories/disa+niken_20180312_jav/raws/footage/clips/Disa and Niken speaking Javanese.MOV +/Oral Histories/Asimenia_s2_F_20161130_ell+pnt/raws/captions/Asimenia_20161130_ell+pnt_eng.srt +/Oral Histories/Ioanna_s1_F_20150128_ell/raws/captions/Ioanna_20150128_ell_ell.srt +/Oral Histories/Ioanna_s1_F_20150128_ell/raws/captions/Ioanna_20150128_ell_spa.srt +/oral histories/yusuf_20180129_sun/raws/captions/Yusuf_20180129_sun_eng.srt +/oral histories/maxime_20180129_fra/raws/captions/Maxime_20180129_fra.srt +/Oral Histories/Edith_s1_F_20140729_spa/raws/captions/Edith_20140729_spa_spa.srt +/Oral Histories/María José_s1_F_20140309_spa/raws/captions/MaríaJosé_20140309_spa_spa.srt +/Oral Histories/Isabel_s1_F_20140729_spa/raws/captions/Isabel_20140729_spa_spa.srt +/Oral Histories/Anne_s1_F_20160118_swg/raws/captions/Anne_20160118_swg_eng.srt +/Oral Histories/Anne_s1_F_20160118_swg/raws/captions/Anne_20160118_swg_swg.srt +/oral histories/Ron_s1_M_20141108_lim/raws/captions/Ron_20141108_lim_eng.srt +/Oral Histories/Pavel_s1_M_20151105_bel/raws/captions/Pavel_20151105_bel_bel.srt +/Oral Histories/Keely_s3_F_20151012_eng+spa+cat/raws/captions/Keely_20151012_eng+spa+cat_spa.srt +/Oral Histories/Majid_s1_M_20131019_fas/raws/captions/Majid_20131019_fas_eng.srt +/oral histories/donna+elizabeth_20171211_tun+eng/raws/footage/clips/Introduction and Basketry in Tunica Audio Extracted Audio Extracted.pkf +/oral histories/donna+elizabeth_20171211_tun+eng/raws/footage/clips/Introduction and Basketry in Tunica Audio Extracted Audio Extracted.wav +/oral histories/donna+elizabeth_20171211_tun+eng/raws/footage/clips/Tunica Conversation and Learning Songs Audio Extracted.pkf +/oral histories/donna+elizabeth_20171211_tun+eng/raws/premier project/Adobe Premiere Pro Auto-Save/Donna+Elizabeth_20171211_tun+eng-4.prproj +/oral histories/donna+elizabeth_20171211_tun+eng/raws/Premier Project/Donna+Elizabeth_20171211_tun+eng.prproj +/oral histories/raj_20160622_bgq/raws/footage/clips/Raj Speaking Bagri.MTS +/oral histories/pau_20170509_fra+lit+ita+eng+spa+cat/raws/footage/captions/Pau_20170509_fra+lit+ita+eng+spa+cat_lit.srt +/Oral Histories/Liam_s1_M_20151226_eng/raws/captions/WIKITONGUES Liam speaking English.en.srt +/oral histories/Donna+Elizabeth_20171211_tun+eng/Donna+Elizabeth_20171211_tun+eng.mp4 +/oral histories/rangina_20171127_pst/raws/premier project/adobe premiere pro audio previews/rangina_20171127_pst.prv/Peak Files/576d3787-ba33-4736-b8ed-495252fe692d+b84828da-9769-dd68-b833-de2900000049 48000.pek +/oral histories/rangina_20171127_pst/raws/premier project/adobe premiere pro audio previews/Rangina_20171127_pst.PRV/576d3787-ba33-4736-b8ed-495252fe692d+b84828da-9769-dd68-b833-de2900000049 48000.cfa +/oral histories/rangina_20171127_pst/raws/footage/audio/Rangina Pashto Audio Extracted.pkf +/oral histories/sonia_20171127_boa/raws/footage/clips/MVI_0282_1.mov +/oral histories/rangina_20171127_pst/raws/Premier Project/Rangina_20171127_pst.prproj +/oral histories/sonia_20171127_boa/raws/footage/audio/Sonia booráá.aiff +/oral histories/sonia_20171127_boa/raws/premier project/adobe premiere pro audio previews/Sonia_20171127_boa.PRV/2ec0f549-e492-49b2-b8a2-030fb67254a2+ecd3125d-c85f-02bf-314c-4a2600000049 48000.cfa +/oral histories/sonia_20171127_boa/raws/footage/audio/Sonia booráá Audio Extracted.pkf +/oral histories/sonia_20171127_boa/raws/footage/audio/Sonia booráá Audio Extracted.wav +/oral histories/sonia_20171127_boa/raws/footage/converted/MVI_0282_2 Audio Extracted.wav +/oral histories/rangina_20171127_pst/raws/footage/converted/MVI_0267.mov +/oral histories/sonia_20171127_boa/raws/premier project/adobe premiere pro audio previews/sonia_20171127_boa.prv/Peak Files/dc5a3d98-0f7d-4857-a627-06f55557ce57+f1495924-9461-2243-bbe1-471900000069 48000.pek +/oral histories/sonia_20171127_boa/raws/premier project/adobe premiere pro audio previews/Sonia_20171127_boa.PRV/d5591151-f568-455b-94b0-31f029a3425c+307d1219-8617-3307-5fed-ad2e00000069 48000.cfa +/oral histories/sonia_20171127_boa/raws/premier project/adobe premiere pro audio previews/sonia_20171127_boa.prv/Peak Files/44717036-0ca2-4790-af55-1580571f4c46+2927dfdd-1f77-296f-bd17-fc1a00000069 48000.pek +/oral histories/sonia_20171127_boa/raws/premier project/adobe premiere pro audio previews/sonia_20171127_boa.prv/Peak Files/d5591151-f568-455b-94b0-31f029a3425c+307d1219-8617-3307-5fed-ad2e00000069 48000.pek +/oral histories/sonia_20171127_boa/raws/premier project/Adobe Premiere Pro Auto-Save/Sonia_20171127_boa-1.prproj +/oral histories/sonia_20171127_boa/raws/Premier Project/Sonia_20171127_boa.prproj +/oral histories/Sonia_20171127_boa/Sonia_20171127_boa.mp4 +/oral histories/sonia_20171127_boa/raws/thumbnail/Screen Shot 2018-03-20 at 12.51.55 AM.png +/oral histories/Sonia_20171127_boa/Sonia_20171127_boa.jpg +/oral histories/sonia_20171127_boa/raws/footage/converted/MVI_0282_2.mov +/oral histories/musu_20180207_men/raws/footage/clips/Mende Audio Extracted.wav +/oral histories/musu_20180207_men/raws/premier project/Adobe Premiere Pro Auto-Save/Musu_20180207_men-1.prproj +/oral histories/musu_20180207_men/raws/Premier Project/Musu_20180207_men.prproj +/oral histories/jacques+yvette_20180226_fra/raws/footage/clips/IMG_7929 Audio Extracted.wav +/oral histories/musu_20180207_men/raws/premier project/Adobe Premiere Pro Auto-Save/Musu_20180207_men-2.prproj +/oral histories/jacques+yvette_20180226_fra/raws/premier project/Adobe Premiere Pro Auto-Save/Jacques+Yvette_20180226_fra-1.prproj +/oral histories/Jacques+Yvette_20180226_fra/Jacques+Yvette_20180226_fra.mp4 +/oral histories/román_20171127_zap (unicode encoding conflict)/raws/footage/audio/Roman zapoteco.aiff +/oral histories/barbara_20171127_nav/raws/footage/audio/Barbara Navajo.aiff +/oral histories/román_20171127_zap (unicode encoding conflict)/raws/premier project/Adobe Premiere Pro Auto-Save/Román_20171127_zap-1.prproj +/oral histories/barbara_20171127_nav/raws/footage/audio/STE-003.wav +/oral histories/román_20171127_zap (unicode encoding conflict)/raws/footage/converted/MVI_0279.mov +/oral histories/román_20171127_zap (unicode encoding conflict)/raws/premier project/adobe premiere pro audio previews/Román_20171127_zap.PRV/1e9c3018-4aac-45f5-b424-f64f01e0fc80+00ddcf1c-06fa-c7a2-5f47-4dd700000049 48000.cfa +/oral histories/román_20171127_zap (unicode encoding conflict)/raws/premier project/Adobe Premiere Pro Auto-Save/Román_20171127_zap-2.prproj +/oral histories/román_20171127_zap (unicode encoding conflict)/raws/footage/audio/Roman zapoteco Audio Extracted.pkf +/oral histories/román_20171127_zap (unicode encoding conflict)/raws/premier project/Adobe Premiere Pro Auto-Save/Román_20171127_zap-3.prproj +/oral histories/román_20171127_zap (unicode encoding conflict)/raws/Premier Project/Román_20171127_zap.prproj +/oral histories/barbara_20171127_nav/raws/footage/converted/MVI_0268_1 Audio Extracted.pkf +/oral histories/barbara_20171127_nav/raws/premier project/adobe premiere pro audio previews/barbara_20171127_nav.prv/Peak Files/0c8d956e-cb7e-4004-ba74-2148175760db+81b013ab-8b0b-5a8d-06bb-859100000049 48000.pek +/oral histories/barbara_20171127_nav/raws/footage/audio/Barbara Navajo Audio Extracted.pkf +/oral histories/barbara_20171127_nav/raws/footage/audio/Barbara Navajo Audio Extracted.wav +/oral histories/barbara_20171127_nav/raws/footage/audio/STE-003 Audio Extracted.pkf +/oral histories/román_20171127_zap (unicode encoding conflict)/raws/premier project/Adobe Premiere Pro Auto-Save/Román_20171127_zap-4.prproj +/oral histories/barbara_20171127_nav/raws/footage/audio/STE-003 Audio Extracted.wav +/oral histories/barbara_20171127_nav/raws/footage/converted/MVI_0268_1.mov +/oral histories/barbara_20171127_nav/raws/Premier Project/Barbara_20171127_nav.prproj +/oral histories/barbara_20171127_nav/raws/Premier Project/Barbara_20171127_nav~recover.prproj +/oral histories/lynda_20171127_nav/raws/footage/converted/MVI_0269.mov +/oral histories/lynda_20171127_nav/raws/footage/audio/Linda Navajo.aiff +/oral histories/lynda_20171127_nav/raws/footage/audio/STE-004.wav +/oral histories/lynda_20171127_nav/raws/premier project/adobe premiere pro audio previews/Lynda_20171127_nav.PRV/b87e1c63-24f6-4d7a-910f-a9ea1db5b79c+d51ddd13-840a-d8d9-477e-8cfe00000049 48000.cfa +/oral histories/lynda_20171127_nav/raws/footage/audio/Linda Navajo Audio Extracted.pkf +/oral histories/lynda_20171127_nav/raws/footage/audio/Linda Navajo Audio Extracted.wav +/oral histories/lynda_20171127_nav/raws/footage/converted/MVI_0270.mov +/oral histories/lynda_20171127_nav/raws/Premier Project/Lynda_20171127_nav.prproj +/oral histories/román_20171127_zap (unicode encoding conflict)/raws/thumbnail/Screen Shot 2018-03-22 at 6.01.42 PM.png +/oral histories/Román_20171127_zap (Unicode Encoding Conflict)/Román_20171127_zap.jpg +/oral histories/Tao_20180327_cmn/readme.txt +/oral histories/Tao_20180327_tha/readme.txt +/oral histories/paulo_20180327_tvl/raws/footage/clips/Tuvaluan.MP4 +/oral histories/tao_20180327_cmn/raws/footage/clips/Yunnan.MP4 +/oral histories/tao_20180327_tha/raws/footage/clips/Thai.MP4 +/oral histories/linekelapaul_20180327_nbs/raws/footage/clips/Namibian_Sign_Language.webm +/oral histories/Hannah_20180327_ndo/readme.txt +/oral histories/hannah_20180327_ndo/raws/footage/clips/VID-20180318-WA0017.mp4 +/oral histories/chengxi_20180327_wuu/raws/footage/clips/Wikitongues - Chengxi speaking Hangzhou dialect.mp4 +/oral histories/Sofie_20180327_dse/readme.txt +/oral histories/Guillem_20180327_cat/readme.txt +/oral histories/sofie_20180327_dse/raws/footage/clips/MVI_8631.MOV +/oral histories/guillem_20180327_cat/raws/footage/clips/MVI_8639.MOV +/oral histories/krishna_20180327_hin/raws/footage/clips/Hindi.MP4 +/oral histories/musu_20180207_men/raws/thumbnail/Screen Shot 2018-03-27 at 4.13.08 PM.png +/oral histories/hannah_20180327_ndo/raws/footage/captions/Hannah_20180327_ndo_eng.srt +/oral histories/Dominique_20180328_gsw/readme.txt +/oral histories/Risata_20180329_bbc/readme.txt +/oral histories/regianna_20170813_nnd/raws/Premier Project/Regianna_20170813_nnd.prproj +/oral histories/Regianna_20170813_nnd/Regianna_20170813_nnd.mp4 +/oral histories/Regianna_20170813_nnd/Regianna_20170813_nnd.jpg +/oral histories/risata_20180329_bbc/raws/footage/clips/Batak Toba.mp4 +/oral histories/Hanbid_20180330_kor/readme.txt +/oral histories/latonian+yankee_20180306_unm+nnt/raws/footage/clips/for Wiki-tongues.wmv +/oral histories/jacques+yvette_20180226_fra/raws/premier project/Adobe Premiere Pro Auto-Save/Jacques+Yvette_20180226_fra-2.prproj +/oral histories/achille_20180226_mos+dyu/raws/premier project/Adobe Premiere Pro Auto-Save/Achille_20180226_mos+dyu-1.prproj +/oral histories/achille_20180226_mos+dyu/raws/Premier Project/Achille_20180226_mos+dyu.prproj +/oral histories/jacques+yvette_20180226_fra/raws/Premier Project/Jacques+Yvette_20180226_fra.prproj +/oral histories/achille_20180226_mos+dyu/raws/footage/clips/MVI_7386 Audio Extracted.pkf +/oral histories/Achille_20180226_mos+dyu/Achille_20180226_mos+dyu.mp4 +/oral histories/jacques+yvette_20180226_fra/raws/thumbnail/Screen Shot 2018-03-30 at 7.28.39 PM.png +/oral histories/Jacques+Yvette_20180226_fra/Jacques+Yvette_20180226_fra.jpg +/oral histories/latonian+yankee_20180306_unm+nnt/raws/premier project/Adobe Premiere Pro Auto-Save/Latonian+Yankee_20180306_unm+nnt-2.prproj +/oral histories/latonian+yankee_20180306_unm+nnt/raws/Premier Project/Latonian+Yankee_20180306_unm+nnt.prproj +/oral histories/mandala_20180228_sun/raws/footage/clips/MVI_7390 Audio Extracted.pkf +/oral histories/mandala_20180228_sun/raws/premier project/Adobe Premiere Pro Auto-Save/Mandala_20180228_sun-1.prproj +/oral histories/mandala_20180228_sun/raws/Premier Project/Mandala_20180228_sun.prproj +/oral histories/disa+niken_20180312_jav/raws/Premier Project/Disa+Niken_20180312_jav.prproj +/oral histories/disa+niken_20180312_jav/raws/premier project/Adobe Premiere Pro Auto-Save/Disa+Niken_20180312_jav-1.prproj +/oral histories/Mandala_20180228_sun/Mandala_20180228_sun.mp4 +/oral histories/Disa+Niken_20180312_jav/Disa+Niken_20180312_jav.mp4 +/oral histories/Latonian+Yankee_20180306_unm+nnt/Latonian+Yankee_20180306_unm+nnt.jpg +/oral histories/latonian+yankee_20180306_unm+nnt/raws/thumbnail/Latonian+Yankee_20180306_unm+nnt.jpg +/oral histories/Mandala_20180228_sun/Mandala_20180228_sun.jpg +/oral histories/disa+niken_20180312_jav/raws/thumbnail/Screen Shot 2018-03-31 at 10.16.07 PM.png +/oral histories/achille_20180226_mos+dyu/raws/thumbnail/Screen Shot 2018-03-31 at 9.57.20 PM.png +/oral histories/mandala_20180228_sun/raws/thumbnail/Screen Shot 2018-03-31 at 10.07.12 PM.png +/oral histories/latonian+yankee_20180306_unm+nnt/raws/thumbnail/Screen Shot 2018-03-31 at 9.59.47 PM.png +/oral histories/Disa+Niken_20180312_jav/Disa+Niken_20180312_jav.jpg +/oral histories/sahid_20180312_ind+min/raws/footage/clips/Sahid speaking Padang and Indonesian Audio Extracted.wav +/oral histories/phoebe_20180312_gjn/raws/premier project/Adobe Premiere Pro Auto-Save/Phoebe_20180312_gjn-1.prproj +/oral histories/sahid_20180312_ind+min/raws/premier project/Adobe Premiere Pro Auto-Save/Sahid_20180312_ind+min-1.prproj +/oral histories/sahid_20180312_ind+min/raws/premier project/Adobe Premiere Pro Auto-Save/Sahid_20180312_ind+min-2.prproj +/oral histories/michael_20180312_lou/raws/footage/clips/video-1519943685 Audio Extracted.pkf +/oral histories/michael_20180312_lou/raws/footage/clips/video-1519943685 Audio Extracted.wav +/oral histories/Michael_20180312_lou/Michael_20180312_lou.mp4 +/oral histories/michael_20180312_lou/raws/Premier Project/Michael_20180312_lou.prproj +/oral histories/abderrahman_20180217_shi/raws/premier project/adobe premiere pro audio previews/abderrahman_20180217_shi.prv/Peak Files/29f52dc7-1ed1-4cef-9bb2-e00855d9d9d4+28cb9529-eb48-eea8-de8f-2f2100000049 48000.pek +/oral histories/abderrahman_20180217_shi/raws/premier project/adobe premiere pro audio previews/Abderrahman_20180217_shi.PRV/29f52dc7-1ed1-4cef-9bb2-e00855d9d9d4+28cb9529-eb48-eea8-de8f-2f2100000049 48000.cfa +/oral histories/abderrahman_20180217_shi/raws/footage/clips/Wikitongue-Tashelhit Audio Extracted.wav +/oral histories/abderrahman_20180217_shi/raws/Premier Project/Abderrahman_20180217_shi.prproj +/oral histories/jerry_20180115_xpe/raws/footage/clips/Video 2 from Taylor Gentry LR-7.mov +/oral histories/jerry_20180115_xpe/raws/footage/clips/Video 4 from Taylor Gentry LR-7.mov +/oral histories/jerry_20180115_xpe/raws/footage/clips/Video from Taylor Gentry LR-7.mov +/oral histories/sahid_20180312_ind+min/raws/premier project/Adobe Premiere Pro Auto-Save/Sahid_20180312_ind+min-3.prproj +/oral histories/dominique_20180328_gsw/raws/footage/clips/Alsatian Audio Extracted.pkf +/oral histories/dominique_20180328_gsw/raws/footage/clips/Alsatian Audio Extracted.wav +/oral histories/dominique_20180328_gsw/raws/footage/clips/Alsatian Audio Extracted_1.pkf +/oral histories/sahid_20180312_ind+min/raws/premier project/Adobe Premiere Pro Auto-Save/Sahid_20180312_ind+min-4.prproj +/oral histories/phoebe_20180312_gjn/raws/premier project/Adobe Premiere Pro Auto-Save/Phoebe_20180312_gjn-4.prproj +/oral histories/josébenito_20180210_-llt (unicode encoding conflict)/raws/Premier Project/JoséBenito_20180210_-llt.prproj +/oral histories/Abderrahman_20180217_shi/Abderrahman_20180217_shi.mp4 +/oral histories/dominique_20180328_gsw/raws/premier project/Adobe Premiere Pro Auto-Save/Dominique_20180328_gsw-1.prproj +/oral histories/Jerry_20180115_xpe/Jerry_20180115_xpe.mp4 +/oral histories/Dominique_20180328_gsw/Dominique_20180328_gsw.mp4 +/oral histories/JoséBenito_20180210_-llt (Unicode Encoding Conflict)/JoséBenito_20180210_-llt.mp4 +/oral histories/dominique_20180328_gsw/raws/Premier Project/Dominique_20180328_gsw.prproj +/oral histories/phoebe_20180312_gjn/raws/Premier Project/Phoebe_20180312_gjn.prproj +/oral histories/dominique_20180328_gsw/raws/footage/captions/Translation Alsatian.rtf +/oral histories/Dimas_20180402_osi/readme.txt +/oral histories/Norbert_20180402_hun/readme.txt +/oral histories/norbert_20180402_hun/raws/footage/clips/Hungarian.MP4 +/oral histories/sahid_20180312_ind+min/raws/Premier Project/Sahid_20180312_ind+min.prproj +/oral histories/Sahid_20180312_ind+min/Sahid_20180312_ind+min.jpg +/oral histories/michael_20180312_lou/raws/thumbnail/Screen Shot 2018-04-03 at 1.30.54 PM.png +/oral histories/michael_20180312_lou/raws/thumbnail/Screen Shot 2018-04-03 at 1.31.06 PM.png +/oral histories/Sahid_20180312_ind+min/Sahid_20180312_ind+min.mp4 +/oral histories/dominique_20180328_gsw/raws/footage/captions/Dominique_20180328_gsw_eng.srt +/Oral Histories/Elizabeth_s1_F_20150212_cor/raws/captions/Elizabeth_20150212_cor_eng.srt +/oral histories/dimas_20180402_osi/raws/footage/captions/Dimas_20180402_osi_ind.srt +/oral histories/dimas_20180402_osi/raws/footage/captions/Dimas_20180402_osi_osi.srt \ No newline at end of file diff --git a/db/seeds.rb b/db/seeds.rb index cac98157..cd986547 100644 --- a/db/seeds.rb +++ b/db/seeds.rb @@ -9,3 +9,45 @@ #TODO: fix this. books now require a user Book.create(title: "Intro to Afrikaans", description: "Afrikaans is spoken throughout South Africa and Namibia. The language is mainly derived from Dutch. However, most Afrikaans speakers in the workplace have some knowledge of English.", source_language:"English", target_language:"Afrikaans") Book.create(title: "Visiting Ambrym Island, Daakaka style", description: "Learn how to navigate the local scene in one of the four languages of our beautiful Ambrym island.", source_language:"English", target_language:"Daakaka") + +# Merges similar urls together based on author and date +archive_videos = Hash.new +File.foreach('./db/seed_data/archive_videos.txt') do |line| + # Ignore non video or srt files + unless line.strip.ends_with? '.mp4' or line.strip.ends_with? '.srt' + next + end + + # Determine type + type = nil + if line.strip.ends_with? '.mp4' + type = '.mp4' + else + type = '.srt' + end + + # Remove edge cases + url = 'https://s3.amazonaws.com/wikitongues/poly-dropbox' + line + temp = line.split('/')[2] + if temp.nil? + next + end + + # Construct ID + name = temp.split('_')[0].downcase + date = /\d{8}/.match(temp).to_s + id = name + '_' + date + + unless archive_videos.has_key?(id) + archive_videos[id] = Hash.new + end + archive_videos[id][type] = url.strip +end + +# Adds everything into the db +archive_videos.each do |k, v| + unless v.length >= 1 + next + end + ArchiveVideo.create(video_id: k, video_url: v.fetch('.mp4', ''), srt_url: v.fetch('.srt', '')) +end diff --git a/local_dev.sh b/local_dev.sh new file mode 100755 index 00000000..69abeccc --- /dev/null +++ b/local_dev.sh @@ -0,0 +1 @@ +stylus --compress app/assets/stylesheets/archive/app.styl --out public/assets/css --watch diff --git a/node_modules/.bin/JSONStream b/node_modules/.bin/JSONStream deleted file mode 120000 index 44907374..00000000 --- a/node_modules/.bin/JSONStream +++ /dev/null @@ -1 +0,0 @@ -../JSONStream/index.js \ No newline at end of file diff --git a/node_modules/.bin/acorn b/node_modules/.bin/acorn deleted file mode 120000 index cf767603..00000000 --- a/node_modules/.bin/acorn +++ /dev/null @@ -1 +0,0 @@ -../acorn/bin/acorn \ No newline at end of file diff --git a/node_modules/.bin/base64url b/node_modules/.bin/base64url deleted file mode 120000 index 8e0e510a..00000000 --- a/node_modules/.bin/base64url +++ /dev/null @@ -1 +0,0 @@ -../base64url/bin/base64url \ No newline at end of file diff --git a/node_modules/.bin/browser-pack b/node_modules/.bin/browser-pack deleted file mode 120000 index 1d047b95..00000000 --- a/node_modules/.bin/browser-pack +++ /dev/null @@ -1 +0,0 @@ -../browser-pack/bin/cmd.js \ No newline at end of file diff --git a/node_modules/.bin/browserify b/node_modules/.bin/browserify deleted file mode 120000 index ab156b35..00000000 --- a/node_modules/.bin/browserify +++ /dev/null @@ -1 +0,0 @@ -../browserify/bin/cmd.js \ No newline at end of file diff --git a/node_modules/.bin/browserifyinc b/node_modules/.bin/browserifyinc deleted file mode 120000 index 2557f57e..00000000 --- a/node_modules/.bin/browserifyinc +++ /dev/null @@ -1 +0,0 @@ -../browserify-incremental/bin/cmd.js \ No newline at end of file diff --git a/node_modules/.bin/deps-sort b/node_modules/.bin/deps-sort deleted file mode 120000 index b2dda9ef..00000000 --- a/node_modules/.bin/deps-sort +++ /dev/null @@ -1 +0,0 @@ -../deps-sort/bin/cmd.js \ No newline at end of file diff --git a/node_modules/.bin/errno b/node_modules/.bin/errno deleted file mode 120000 index 5a98e539..00000000 --- a/node_modules/.bin/errno +++ /dev/null @@ -1 +0,0 @@ -../errno/cli.js \ No newline at end of file diff --git a/node_modules/.bin/gp12-pem b/node_modules/.bin/gp12-pem deleted file mode 120000 index b37fcae8..00000000 --- a/node_modules/.bin/gp12-pem +++ /dev/null @@ -1 +0,0 @@ -../google-p12-pem/bin/gp12-pem \ No newline at end of file diff --git a/node_modules/.bin/har-validator b/node_modules/.bin/har-validator deleted file mode 120000 index c6ec1634..00000000 --- a/node_modules/.bin/har-validator +++ /dev/null @@ -1 +0,0 @@ -../har-validator/bin/har-validator \ No newline at end of file diff --git a/node_modules/.bin/indent-string b/node_modules/.bin/indent-string deleted file mode 120000 index 6767b063..00000000 --- a/node_modules/.bin/indent-string +++ /dev/null @@ -1 +0,0 @@ -../indent-string/cli.js \ No newline at end of file diff --git a/node_modules/.bin/insert-module-globals b/node_modules/.bin/insert-module-globals deleted file mode 120000 index 68af3a91..00000000 --- a/node_modules/.bin/insert-module-globals +++ /dev/null @@ -1 +0,0 @@ -../insert-module-globals/bin/cmd.js \ No newline at end of file diff --git a/node_modules/.bin/miller-rabin b/node_modules/.bin/miller-rabin deleted file mode 120000 index c175fe9f..00000000 --- a/node_modules/.bin/miller-rabin +++ /dev/null @@ -1 +0,0 @@ -../miller-rabin/bin/miller-rabin \ No newline at end of file diff --git a/node_modules/.bin/mime b/node_modules/.bin/mime deleted file mode 120000 index fbb7ee0e..00000000 --- a/node_modules/.bin/mime +++ /dev/null @@ -1 +0,0 @@ -../mime/cli.js \ No newline at end of file diff --git a/node_modules/.bin/module-deps b/node_modules/.bin/module-deps deleted file mode 120000 index 66a1f246..00000000 --- a/node_modules/.bin/module-deps +++ /dev/null @@ -1 +0,0 @@ -../module-deps/bin/cmd.js \ No newline at end of file diff --git a/node_modules/.bin/repeating b/node_modules/.bin/repeating deleted file mode 120000 index cdedec32..00000000 --- a/node_modules/.bin/repeating +++ /dev/null @@ -1 +0,0 @@ -../repeating/cli.js \ No newline at end of file diff --git a/node_modules/.bin/semver b/node_modules/.bin/semver deleted file mode 120000 index 317eb293..00000000 --- a/node_modules/.bin/semver +++ /dev/null @@ -1 +0,0 @@ -../semver/bin/semver \ No newline at end of file diff --git a/node_modules/.bin/sha.js b/node_modules/.bin/sha.js deleted file mode 120000 index 3c761051..00000000 --- a/node_modules/.bin/sha.js +++ /dev/null @@ -1 +0,0 @@ -../sha.js/bin.js \ No newline at end of file diff --git a/node_modules/.bin/sshpk-conv b/node_modules/.bin/sshpk-conv deleted file mode 120000 index a2a295c8..00000000 --- a/node_modules/.bin/sshpk-conv +++ /dev/null @@ -1 +0,0 @@ -../sshpk/bin/sshpk-conv \ No newline at end of file diff --git a/node_modules/.bin/sshpk-sign b/node_modules/.bin/sshpk-sign deleted file mode 120000 index 766b9b3a..00000000 --- a/node_modules/.bin/sshpk-sign +++ /dev/null @@ -1 +0,0 @@ -../sshpk/bin/sshpk-sign \ No newline at end of file diff --git a/node_modules/.bin/sshpk-verify b/node_modules/.bin/sshpk-verify deleted file mode 120000 index bfd7e3ad..00000000 --- a/node_modules/.bin/sshpk-verify +++ /dev/null @@ -1 +0,0 @@ -../sshpk/bin/sshpk-verify \ No newline at end of file diff --git a/node_modules/.bin/umd b/node_modules/.bin/umd deleted file mode 120000 index 69767ed8..00000000 --- a/node_modules/.bin/umd +++ /dev/null @@ -1 +0,0 @@ -../umd/bin/cli.js \ No newline at end of file diff --git a/node_modules/.bin/uuid b/node_modules/.bin/uuid deleted file mode 120000 index 80eb14aa..00000000 --- a/node_modules/.bin/uuid +++ /dev/null @@ -1 +0,0 @@ -../node-uuid/bin/uuid \ No newline at end of file diff --git a/node_modules/Base64/.npmignore b/node_modules/Base64/.npmignore deleted file mode 100644 index cba87a39..00000000 --- a/node_modules/Base64/.npmignore +++ /dev/null @@ -1,2 +0,0 @@ -/coverage/ -/node_modules/ diff --git a/node_modules/Base64/.travis.yml b/node_modules/Base64/.travis.yml deleted file mode 100644 index fbde0513..00000000 --- a/node_modules/Base64/.travis.yml +++ /dev/null @@ -1,7 +0,0 @@ -language: node_js -node_js: - - "0.8" - - "0.10" - - "0.11" -install: make setup -script: make test diff --git a/node_modules/Base64/LICENSE b/node_modules/Base64/LICENSE deleted file mode 100644 index 48327671..00000000 --- a/node_modules/Base64/LICENSE +++ /dev/null @@ -1,14 +0,0 @@ - - DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE - Version 2, December 2004 - - Copyright (c) 2011..2012 David Chambers - - Everyone is permitted to copy and distribute verbatim or modified - copies of this license document, and changing it is allowed as long - as the name is changed. - - DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE - TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION - - 0. You just DO WHAT THE FUCK YOU WANT TO. diff --git a/node_modules/Base64/Makefile b/node_modules/Base64/Makefile deleted file mode 100644 index 5c475dfc..00000000 --- a/node_modules/Base64/Makefile +++ /dev/null @@ -1,42 +0,0 @@ -ISTANBUL = node_modules/.bin/istanbul -UGLIFYJS = node_modules/.bin/uglifyjs -XYZ = node_modules/.bin/xyz --message X.Y.Z --tag X.Y.Z - -SRC = base64.js -MIN = $(patsubst %.js,%.min.js,$(SRC)) - - -.PHONY: all -all: $(MIN) - -%.min.js: %.js - $(UGLIFYJS) $< --compress --mangle > $@ - - -.PHONY: bytes -bytes: base64.min.js - gzip --best --stdout $< | wc -c | tr -d ' ' - - -.PHONY: clean -clean: - rm -f -- $(MIN) - - -.PHONY: release-major release-minor release-patch -release-major: - $(XYZ) --increment major -release-minor: - $(XYZ) --increment minor -release-patch: - $(XYZ) --increment patch - - -.PHONY: setup -setup: - npm install - - -.PHONY: test -test: - $(ISTANBUL) cover node_modules/.bin/_mocha -- --compilers coffee:coffee-script/register diff --git a/node_modules/Base64/README.md b/node_modules/Base64/README.md deleted file mode 100644 index e5dafed4..00000000 --- a/node_modules/Base64/README.md +++ /dev/null @@ -1,34 +0,0 @@ -# Base64.js - -≈ 500 byte* polyfill for browsers which don't provide [`window.btoa`][1] and -[`window.atob`][2]. - -Although the script does no harm in browsers which do provide these functions, -a conditional script loader such as [yepnope][3] can prevent unnecessary HTTP -requests. - -```javascript -yepnope({ - test: window.btoa && window.atob, - nope: 'base64.js', - callback: function () { - // `btoa` and `atob` are now safe to use - } -}) -``` - -Base64.js stems from a [gist][4] by [yahiko][5]. - -### Running the test suite - - make setup - make test - -\* Minified and gzipped. Run `make bytes` to verify. - - -[1]: https://developer.mozilla.org/en/DOM/window.btoa -[2]: https://developer.mozilla.org/en/DOM/window.atob -[3]: http://yepnopejs.com/ -[4]: https://gist.github.com/229984 -[5]: https://github.com/yahiko diff --git a/node_modules/Base64/base64.js b/node_modules/Base64/base64.js deleted file mode 100644 index 15d3a8af..00000000 --- a/node_modules/Base64/base64.js +++ /dev/null @@ -1,60 +0,0 @@ -;(function () { - - var object = typeof exports != 'undefined' ? exports : this; // #8: web workers - var chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/='; - - function InvalidCharacterError(message) { - this.message = message; - } - InvalidCharacterError.prototype = new Error; - InvalidCharacterError.prototype.name = 'InvalidCharacterError'; - - // encoder - // [https://gist.github.com/999166] by [https://github.com/nignag] - object.btoa || ( - object.btoa = function (input) { - for ( - // initialize result and counter - var block, charCode, idx = 0, map = chars, output = ''; - // if the next input index does not exist: - // change the mapping table to "=" - // check if d has no fractional digits - input.charAt(idx | 0) || (map = '=', idx % 1); - // "8 - idx % 1 * 8" generates the sequence 2, 4, 6, 8 - output += map.charAt(63 & block >> 8 - idx % 1 * 8) - ) { - charCode = input.charCodeAt(idx += 3/4); - if (charCode > 0xFF) { - throw new InvalidCharacterError("'btoa' failed: The string to be encoded contains characters outside of the Latin1 range."); - } - block = block << 8 | charCode; - } - return output; - }); - - // decoder - // [https://gist.github.com/1020396] by [https://github.com/atk] - object.atob || ( - object.atob = function (input) { - input = input.replace(/=+$/, ''); - if (input.length % 4 == 1) { - throw new InvalidCharacterError("'atob' failed: The string to be decoded is not correctly encoded."); - } - for ( - // initialize result and counters - var bc = 0, bs, buffer, idx = 0, output = ''; - // get next character - buffer = input.charAt(idx++); - // character found in table? initialize bit storage and add its ascii value; - ~buffer && (bs = bc % 4 ? bs * 64 + buffer : buffer, - // and if not first of each 4 characters, - // convert the first 8 bits to one ascii character - bc++ % 4) ? output += String.fromCharCode(255 & bs >> (-2 * bc & 6)) : 0 - ) { - // try to find character in table (0-63, not found => -1) - buffer = chars.indexOf(buffer); - } - return output; - }); - -}()); diff --git a/node_modules/Base64/base64.min.js b/node_modules/Base64/base64.min.js deleted file mode 100644 index 33c7aa40..00000000 --- a/node_modules/Base64/base64.min.js +++ /dev/null @@ -1 +0,0 @@ -!function(){function t(t){this.message=t}var e="undefined"!=typeof exports?exports:this,r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";t.prototype=new Error,t.prototype.name="InvalidCharacterError",e.btoa||(e.btoa=function(e){for(var o,n,a=0,i=r,c="";e.charAt(0|a)||(i="=",a%1);c+=i.charAt(63&o>>8-a%1*8)){if(n=e.charCodeAt(a+=.75),n>255)throw new t("'btoa' failed: The string to be encoded contains characters outside of the Latin1 range.");o=o<<8|n}return c}),e.atob||(e.atob=function(e){if(e=e.replace(/=+$/,""),e.length%4==1)throw new t("'atob' failed: The string to be decoded is not correctly encoded.");for(var o,n,a=0,i=0,c="";n=e.charAt(i++);~n&&(o=a%4?64*o+n:n,a++%4)?c+=String.fromCharCode(255&o>>(-2*a&6)):0)n=r.indexOf(n);return c})}(); \ No newline at end of file diff --git a/node_modules/Base64/package.json b/node_modules/Base64/package.json deleted file mode 100644 index 5ebba6a5..00000000 --- a/node_modules/Base64/package.json +++ /dev/null @@ -1,91 +0,0 @@ -{ - "_args": [ - [ - { - "raw": "Base64@~0.2.0", - "scope": null, - "escapedName": "Base64", - "name": "Base64", - "rawSpec": "~0.2.0", - "spec": ">=0.2.0 <0.3.0", - "type": "range" - }, - "/Users/benjaminarias/Desktop/poly/node_modules/http-browserify" - ] - ], - "_from": "Base64@>=0.2.0 <0.3.0", - "_id": "Base64@0.2.1", - "_inCache": true, - "_installable": true, - "_location": "/Base64", - "_npmUser": { - "name": "michaelficarra", - "email": "npm@michael.ficarra.me" - }, - "_npmVersion": "1.4.3", - "_phantomChildren": {}, - "_requested": { - "raw": "Base64@~0.2.0", - "scope": null, - "escapedName": "Base64", - "name": "Base64", - "rawSpec": "~0.2.0", - "spec": ">=0.2.0 <0.3.0", - "type": "range" - }, - "_requiredBy": [ - "/http-browserify" - ], - "_resolved": "https://registry.npmjs.org/Base64/-/Base64-0.2.1.tgz", - "_shasum": "ba3a4230708e186705065e66babdd4c35cf60028", - "_shrinkwrap": null, - "_spec": "Base64@~0.2.0", - "_where": "/Users/benjaminarias/Desktop/poly/node_modules/http-browserify", - "author": { - "name": "David Chambers", - "email": "dc@davidchambers.me" - }, - "bugs": { - "url": "https://github.com/davidchambers/Base64.js/issues" - }, - "dependencies": {}, - "description": "Base64 encoding and decoding", - "devDependencies": { - "coffee-script": "1.7.x", - "istanbul": "0.2.x", - "mocha": "1.18.x", - "uglify-js": "2.4.x", - "xyz": "0.1.x" - }, - "directories": {}, - "dist": { - "shasum": "ba3a4230708e186705065e66babdd4c35cf60028", - "tarball": "https://registry.npmjs.org/Base64/-/Base64-0.2.1.tgz" - }, - "homepage": "https://github.com/davidchambers/Base64.js", - "licenses": [ - { - "type": "WTFPL", - "url": "https://raw.github.com/davidchambers/Base64.js/master/LICENSE" - } - ], - "main": "./base64.js", - "maintainers": [ - { - "name": "davidchambers", - "email": "dc@hashify.me" - }, - { - "name": "michaelficarra", - "email": "npm@michael.ficarra.me" - } - ], - "name": "Base64", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git://github.com/davidchambers/Base64.js.git" - }, - "version": "0.2.1" -} diff --git a/node_modules/Base64/test/base64.coffee b/node_modules/Base64/test/base64.coffee deleted file mode 100644 index e25cf5c6..00000000 --- a/node_modules/Base64/test/base64.coffee +++ /dev/null @@ -1,52 +0,0 @@ -assert = require 'assert' - -{btoa, atob} = require '..' - - -describe 'Base64.js', -> - - it 'can encode ASCII input', -> - assert.strictEqual btoa(''), '' - assert.strictEqual btoa('f'), 'Zg==' - assert.strictEqual btoa('fo'), 'Zm8=' - assert.strictEqual btoa('foo'), 'Zm9v' - assert.strictEqual btoa('quux'), 'cXV1eA==' - assert.strictEqual btoa('!"#$%'), 'ISIjJCU=' - assert.strictEqual btoa("&'()*+"), 'JicoKSor' - assert.strictEqual btoa(',-./012'), 'LC0uLzAxMg==' - assert.strictEqual btoa('3456789:'), 'MzQ1Njc4OTo=' - assert.strictEqual btoa(';<=>?@ABC'), 'Ozw9Pj9AQUJD' - assert.strictEqual btoa('DEFGHIJKLM'), 'REVGR0hJSktMTQ==' - assert.strictEqual btoa('NOPQRSTUVWX'), 'Tk9QUVJTVFVWV1g=' - assert.strictEqual btoa('YZ[\\]^_`abc'), 'WVpbXF1eX2BhYmM=' - assert.strictEqual btoa('defghijklmnop'), 'ZGVmZ2hpamtsbW5vcA==' - assert.strictEqual btoa('qrstuvwxyz{|}~'), 'cXJzdHV2d3h5ent8fX4=' - - it 'cannot encode non-ASCII input', -> - assert.throws (-> btoa '✈'), (err) -> - err instanceof Error and - err.name is 'InvalidCharacterError' and - err.message is "'btoa' failed: The string to be encoded contains characters outside of the Latin1 range." - - it 'can decode Base64-encoded input', -> - assert.strictEqual atob(''), '' - assert.strictEqual atob('Zg=='), 'f' - assert.strictEqual atob('Zm8='), 'fo' - assert.strictEqual atob('Zm9v'), 'foo' - assert.strictEqual atob('cXV1eA=='), 'quux' - assert.strictEqual atob('ISIjJCU='), '!"#$%' - assert.strictEqual atob('JicoKSor'), "&'()*+" - assert.strictEqual atob('LC0uLzAxMg=='), ',-./012' - assert.strictEqual atob('MzQ1Njc4OTo='), '3456789:' - assert.strictEqual atob('Ozw9Pj9AQUJD'), ';<=>?@ABC' - assert.strictEqual atob('REVGR0hJSktMTQ=='), 'DEFGHIJKLM' - assert.strictEqual atob('Tk9QUVJTVFVWV1g='), 'NOPQRSTUVWX' - assert.strictEqual atob('WVpbXF1eX2BhYmM='), 'YZ[\\]^_`abc' - assert.strictEqual atob('ZGVmZ2hpamtsbW5vcA=='), 'defghijklmnop' - assert.strictEqual atob('cXJzdHV2d3h5ent8fX4='), 'qrstuvwxyz{|}~' - - it 'cannot decode invalid input', -> - assert.throws (-> atob 'a'), (err) -> - err instanceof Error and - err.name is 'InvalidCharacterError' and - err.message is "'atob' failed: The string to be decoded is not correctly encoded." diff --git a/node_modules/JSONStream/.npmignore b/node_modules/JSONStream/.npmignore deleted file mode 100644 index a9a9d586..00000000 --- a/node_modules/JSONStream/.npmignore +++ /dev/null @@ -1,2 +0,0 @@ -node_modules/* -node_modules diff --git a/node_modules/JSONStream/.travis.yml b/node_modules/JSONStream/.travis.yml deleted file mode 100644 index 5743d707..00000000 --- a/node_modules/JSONStream/.travis.yml +++ /dev/null @@ -1,7 +0,0 @@ -language: node_js -node_js: - - 4 - - 5 - - 6 - - diff --git a/node_modules/JSONStream/LICENSE.APACHE2 b/node_modules/JSONStream/LICENSE.APACHE2 deleted file mode 100644 index 6366c047..00000000 --- a/node_modules/JSONStream/LICENSE.APACHE2 +++ /dev/null @@ -1,15 +0,0 @@ -Apache License, Version 2.0 - -Copyright (c) 2011 Dominic Tarr - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. diff --git a/node_modules/JSONStream/LICENSE.MIT b/node_modules/JSONStream/LICENSE.MIT deleted file mode 100644 index 6eafbd73..00000000 --- a/node_modules/JSONStream/LICENSE.MIT +++ /dev/null @@ -1,24 +0,0 @@ -The MIT License - -Copyright (c) 2011 Dominic Tarr - -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/node_modules/JSONStream/examples/all_docs.js b/node_modules/JSONStream/examples/all_docs.js deleted file mode 100644 index fa87fe52..00000000 --- a/node_modules/JSONStream/examples/all_docs.js +++ /dev/null @@ -1,13 +0,0 @@ -var request = require('request') - , JSONStream = require('JSONStream') - , es = require('event-stream') - -var parser = JSONStream.parse(['rows', true]) //emit parts that match this path (any element of the rows array) - , req = request({url: 'http://isaacs.couchone.com/registry/_all_docs'}) - , logger = es.mapSync(function (data) { //create a stream that logs to stderr, - console.error(data) - return data - }) - -req.pipe(parser) -parser.pipe(logger) diff --git a/node_modules/JSONStream/index.js b/node_modules/JSONStream/index.js deleted file mode 100755 index 9c8ac1ee..00000000 --- a/node_modules/JSONStream/index.js +++ /dev/null @@ -1,216 +0,0 @@ -#! /usr/bin/env node - -'use strict' - -var Parser = require('jsonparse') - , through = require('through') - -/* - - the value of this.stack that creationix's jsonparse has is weird. - - it makes this code ugly, but his problem is way harder that mine, - so i'll forgive him. - -*/ - -exports.parse = function (path, map) { - - var parser = new Parser() - var stream = through(function (chunk) { - if('string' === typeof chunk) - chunk = new Buffer(chunk) - parser.write(chunk) - }, - function (data) { - if(data) - stream.write(data) - stream.queue(null) - }) - - if('string' === typeof path) - path = path.split('.').map(function (e) { - if (e === '$*') - return {emitKey: true} - else if (e === '*') - return true - else if (e === '') // '..'.split('.') returns an empty string - return {recurse: true} - else - return e - }) - - - var count = 0, _key - if(!path || !path.length) - path = null - - parser.onValue = function (value) { - if (!this.root) - stream.root = value - - if(! path) return - - var i = 0 // iterates on path - var j = 0 // iterates on stack - var emitKey = false; - while (i < path.length) { - var key = path[i] - var c - j++ - - if (key && !key.recurse) { - c = (j === this.stack.length) ? this : this.stack[j] - if (!c) return - if (! check(key, c.key)) return - emitKey = !!key.emitKey; - i++ - } else { - i++ - var nextKey = path[i] - if (! nextKey) return - while (true) { - c = (j === this.stack.length) ? this : this.stack[j] - if (!c) return - if (check(nextKey, c.key)) { - i++; - if (!Object.isFrozen(this.stack[j])) - this.stack[j].value = null - break - } - j++ - } - } - - } - if (j !== this.stack.length) return - - count ++ - var actualPath = this.stack.slice(1).map(function(element) { return element.key }).concat([this.key]) - var data = this.value[this.key] - if(null != data) - if(null != (data = map ? map(data, actualPath) : data)) { - data = emitKey ? { value: data, key: this.key } : data; - stream.queue(data) - } - delete this.value[this.key] - for(var k in this.stack) - if (!Object.isFrozen(this.stack[k])) - this.stack[k].value = null - } - parser._onToken = parser.onToken; - - parser.onToken = function (token, value) { - parser._onToken(token, value); - if (this.stack.length === 0) { - if (stream.root) { - if(!path) - stream.queue(stream.root) - count = 0; - stream.root = null; - } - } - } - - parser.onError = function (err) { - if(err.message.indexOf("at position") > -1) - err.message = "Invalid JSON (" + err.message + ")"; - stream.emit('error', err) - } - - - return stream -} - -function check (x, y) { - if ('string' === typeof x) - return y == x - else if (x && 'function' === typeof x.exec) - return x.exec(y) - else if ('boolean' === typeof x || 'object' === typeof x) - return x - else if ('function' === typeof x) - return x(y) - return false -} - -exports.stringify = function (op, sep, cl, indent) { - indent = indent || 0 - if (op === false){ - op = '' - sep = '\n' - cl = '' - } else if (op == null) { - - op = '[\n' - sep = '\n,\n' - cl = '\n]\n' - - } - - //else, what ever you like - - var stream - , first = true - , anyData = false - stream = through(function (data) { - anyData = true - try { - var json = JSON.stringify(data, null, indent) - } catch (err) { - return stream.emit('error', err) - } - if(first) { first = false ; stream.queue(op + json)} - else stream.queue(sep + json) - }, - function (data) { - if(!anyData) - stream.queue(op) - stream.queue(cl) - stream.queue(null) - }) - - return stream -} - -exports.stringifyObject = function (op, sep, cl, indent) { - indent = indent || 0 - if (op === false){ - op = '' - sep = '\n' - cl = '' - } else if (op == null) { - - op = '{\n' - sep = '\n,\n' - cl = '\n}\n' - - } - - //else, what ever you like - - var first = true - var anyData = false - var stream = through(function (data) { - anyData = true - var json = JSON.stringify(data[0]) + ':' + JSON.stringify(data[1], null, indent) - if(first) { first = false ; this.queue(op + json)} - else this.queue(sep + json) - }, - function (data) { - if(!anyData) this.queue(op) - this.queue(cl) - - this.queue(null) - }) - - return stream -} - -if(!module.parent && process.title !== 'browser') { - process.stdin - .pipe(exports.parse(process.argv[2])) - .pipe(exports.stringify('[', ',\n', ']\n', 2)) - .pipe(process.stdout) -} - diff --git a/node_modules/JSONStream/package.json b/node_modules/JSONStream/package.json deleted file mode 100644 index 824ca130..00000000 --- a/node_modules/JSONStream/package.json +++ /dev/null @@ -1,113 +0,0 @@ -{ - "_args": [ - [ - { - "raw": "JSONStream@^1.0.3", - "scope": null, - "escapedName": "JSONStream", - "name": "JSONStream", - "rawSpec": "^1.0.3", - "spec": ">=1.0.3 <2.0.0", - "type": "range" - }, - "/Users/benjaminarias/Desktop/poly/node_modules/browserify" - ] - ], - "_from": "JSONStream@>=1.0.3 <2.0.0", - "_id": "JSONStream@1.1.4", - "_inCache": true, - "_installable": true, - "_location": "/JSONStream", - "_nodeVersion": "6.2.0", - "_npmOperationalInternal": { - "host": "packages-12-west.internal.npmjs.com", - "tmp": "tmp/JSONStream-1.1.4.tgz_1469848972947_0.19998654047958553" - }, - "_npmUser": { - "name": "dominictarr", - "email": "dominic.tarr@gmail.com" - }, - "_npmVersion": "3.8.9", - "_phantomChildren": {}, - "_requested": { - "raw": "JSONStream@^1.0.3", - "scope": null, - "escapedName": "JSONStream", - "name": "JSONStream", - "rawSpec": "^1.0.3", - "spec": ">=1.0.3 <2.0.0", - "type": "range" - }, - "_requiredBy": [ - "/browser-pack", - "/browserify", - "/deps-sort", - "/insert-module-globals", - "/module-deps" - ], - "_resolved": "https://registry.npmjs.org/JSONStream/-/JSONStream-1.1.4.tgz", - "_shasum": "be11a495938e882d277773d11986f3974a8ba37a", - "_shrinkwrap": null, - "_spec": "JSONStream@^1.0.3", - "_where": "/Users/benjaminarias/Desktop/poly/node_modules/browserify", - "author": { - "name": "Dominic Tarr", - "email": "dominic.tarr@gmail.com", - "url": "http://bit.ly/dominictarr" - }, - "bin": { - "JSONStream": "./index.js" - }, - "bugs": { - "url": "https://github.com/dominictarr/JSONStream/issues" - }, - "dependencies": { - "jsonparse": "^1.2.0", - "through": ">=2.2.7 <3" - }, - "description": "rawStream.pipe(JSONStream.parse()).pipe(streamOfObjects)", - "devDependencies": { - "assertions": "~2.2.2", - "event-stream": "~0.7.0", - "it-is": "~1", - "render": "~0.1.1", - "tape": "~2.12.3", - "trees": "~0.0.3" - }, - "directories": {}, - "dist": { - "shasum": "be11a495938e882d277773d11986f3974a8ba37a", - "tarball": "https://registry.npmjs.org/JSONStream/-/JSONStream-1.1.4.tgz" - }, - "engines": { - "node": "*" - }, - "gitHead": "b7c01ee67fc3824a9038eb7a41899376f5bd99dc", - "homepage": "http://github.com/dominictarr/JSONStream", - "keywords": [ - "json", - "stream", - "streaming", - "parser", - "async", - "parsing" - ], - "license": "(MIT OR Apache-2.0)", - "maintainers": [ - { - "name": "dominictarr", - "email": "dominic.tarr@gmail.com" - } - ], - "name": "JSONStream", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git://github.com/dominictarr/JSONStream.git" - }, - "scripts": { - "test": "set -e; for t in test/*.js; do echo '***' $t '***'; node $t; done" - }, - "version": "1.1.4" -} diff --git a/node_modules/JSONStream/readme.markdown b/node_modules/JSONStream/readme.markdown deleted file mode 100644 index 6266c206..00000000 --- a/node_modules/JSONStream/readme.markdown +++ /dev/null @@ -1,184 +0,0 @@ -# JSONStream - -streaming JSON.parse and stringify - -![](https://secure.travis-ci.org/dominictarr/JSONStream.png?branch=master) - -## install -```npm install JSONStream``` - -## example - -``` js - -var request = require('request') - , JSONStream = require('JSONStream') - , es = require('event-stream') - -request({url: 'http://isaacs.couchone.com/registry/_all_docs'}) - .pipe(JSONStream.parse('rows.*')) - .pipe(es.mapSync(function (data) { - console.error(data) - return data - })) -``` - -## JSONStream.parse(path) - -parse stream of values that match a path - -``` js - JSONStream.parse('rows.*.doc') -``` - -The `..` operator is the recursive descent operator from [JSONPath](http://goessner.net/articles/JsonPath/), which will match a child at any depth (see examples below). - -If your keys have keys that include `.` or `*` etc, use an array instead. -`['row', true, /^doc/]`. - -If you use an array, `RegExp`s, booleans, and/or functions. The `..` operator is also available in array representation, using `{recurse: true}`. -any object that matches the path will be emitted as 'data' (and `pipe`d down stream) - -If `path` is empty or null, no 'data' events are emitted. - -If you want to have keys emitted, you can prefix your `*` operator with `$`: `obj.$*` - in this case the data passed to the stream is an object with a `key` holding the key and a `value` property holding the data. - -### Examples - -query a couchdb view: - -``` bash -curl -sS localhost:5984/tests/_all_docs&include_docs=true -``` -you will get something like this: - -``` js -{"total_rows":129,"offset":0,"rows":[ - { "id":"change1_0.6995461115147918" - , "key":"change1_0.6995461115147918" - , "value":{"rev":"1-e240bae28c7bb3667f02760f6398d508"} - , "doc":{ - "_id": "change1_0.6995461115147918" - , "_rev": "1-e240bae28c7bb3667f02760f6398d508","hello":1} - }, - { "id":"change2_0.6995461115147918" - , "key":"change2_0.6995461115147918" - , "value":{"rev":"1-13677d36b98c0c075145bb8975105153"} - , "doc":{ - "_id":"change2_0.6995461115147918" - , "_rev":"1-13677d36b98c0c075145bb8975105153" - , "hello":2 - } - }, -]} - -``` - -we are probably most interested in the `rows.*.doc` - -create a `Stream` that parses the documents from the feed like this: - -``` js -var stream = JSONStream.parse(['rows', true, 'doc']) //rows, ANYTHING, doc - -stream.on('data', function(data) { - console.log('received:', data); -}); -``` -awesome! - -In case you wanted the contents the doc emitted: - -``` js -var stream = JSONStream.parse(['rows', true, 'doc', {emitKey: true}]) //rows, ANYTHING, doc, items in docs with keys - -stream.on('data', function(data) { - console.log('key:', data.key); - console.log('value:', data.value); -}); -``` - -### recursive patterns (..) - -`JSONStream.parse('docs..value')` -(or `JSONStream.parse(['docs', {recurse: true}, 'value'])` using an array) -will emit every `value` object that is a child, grand-child, etc. of the -`docs` object. In this example, it will match exactly 5 times at various depth -levels, emitting 0, 1, 2, 3 and 4 as results. - -```js -{ - "total": 5, - "docs": [ - { - "key": { - "value": 0, - "some": "property" - } - }, - {"value": 1}, - {"value": 2}, - {"blbl": [{}, {"a":0, "b":1, "value":3}, 10]}, - {"value": 4} - ] -} -``` - -## JSONStream.parse(pattern, map) - -provide a function that can be used to map or filter -the json output. `map` is passed the value at that node of the pattern, -if `map` return non-nullish (anything but `null` or `undefined`) -that value will be emitted in the stream. If it returns a nullish value, -nothing will be emitted. - -## JSONStream.stringify(open, sep, close) - -Create a writable stream. - -you may pass in custom `open`, `close`, and `seperator` strings. -But, by default, `JSONStream.stringify()` will create an array, -(with default options `open='[\n', sep='\n,\n', close='\n]\n'`) - -If you call `JSONStream.stringify(false)` -the elements will only be seperated by a newline. - -If you only write one item this will be valid JSON. - -If you write many items, -you can use a `RegExp` to split it into valid chunks. - -## JSONStream.stringifyObject(open, sep, close) - -Very much like `JSONStream.stringify`, -but creates a writable stream for objects instead of arrays. - -Accordingly, `open='{\n', sep='\n,\n', close='\n}\n'`. - -When you `.write()` to the stream you must supply an array with `[ key, data ]` -as the first argument. - -## unix tool - -query npm to see all the modules that browserify has ever depended on. - -``` bash -curl https://registry.npmjs.org/browserify | JSONStream 'versions.*.dependencies' -``` - -## numbers - -numbers will be emitted as numbers. -huge numbers that cannot be represented in memory as javascript numbers will be emitted as strings. -cf https://github.com/creationix/jsonparse/commit/044b268f01c4b8f97fb936fc85d3bcfba179e5bb for details. - -## Acknowlegements - -this module depends on https://github.com/creationix/jsonparse -by Tim Caswell -and also thanks to Florent Jaby for teaching me about parsing with: -https://github.com/Floby/node-json-streams - -## license - -Dual-licensed under the MIT License or the Apache License, version 2.0 diff --git a/node_modules/JSONStream/test/bool.js b/node_modules/JSONStream/test/bool.js deleted file mode 100644 index 6c386d60..00000000 --- a/node_modules/JSONStream/test/bool.js +++ /dev/null @@ -1,41 +0,0 @@ - -var fs = require ('fs') - , join = require('path').join - , file = join(__dirname, 'fixtures','all_npm.json') - , JSONStream = require('../') - , it = require('it-is').style('colour') - - function randomObj () { - return ( - Math.random () < 0.4 - ? {hello: 'eonuhckmqjk', - whatever: 236515, - lies: true, - nothing: [null], -// stuff: [Math.random(),Math.random(),Math.random()] - } - : ['AOREC', 'reoubaor', {ouec: 62642}, [[[], {}, 53]]] - ) - } - -var expected = [] - , stringify = JSONStream.stringify() - , es = require('event-stream') - , stringified = '' - , called = 0 - , count = 10 - , ended = false - -while (count --) - expected.push(randomObj()) - - es.connect( - es.readArray(expected), - stringify, - JSONStream.parse([true]), - es.writeArray(function (err, lines) { - - it(lines).has(expected) - console.error('PASSED') - }) - ) diff --git a/node_modules/JSONStream/test/browser.js b/node_modules/JSONStream/test/browser.js deleted file mode 100644 index 3c28d491..00000000 --- a/node_modules/JSONStream/test/browser.js +++ /dev/null @@ -1,18 +0,0 @@ -var test = require('tape') -var JSONStream = require('../') -var testData = '{"rows":[{"hello":"world"}, {"foo": "bar"}]}' - -test('basic parsing', function (t) { - t.plan(2) - var parsed = JSONStream.parse("rows.*") - var parsedKeys = {} - parsed.on('data', function(match) { - parsedKeys[Object.keys(match)[0]] = true - }) - parsed.on('end', function() { - t.equal(!!parsedKeys['hello'], true) - t.equal(!!parsedKeys['foo'], true) - }) - parsed.write(testData) - parsed.end() -}) \ No newline at end of file diff --git a/node_modules/JSONStream/test/destroy_missing.js b/node_modules/JSONStream/test/destroy_missing.js deleted file mode 100644 index 315fdc83..00000000 --- a/node_modules/JSONStream/test/destroy_missing.js +++ /dev/null @@ -1,27 +0,0 @@ -var fs = require ('fs'); -var net = require('net'); -var join = require('path').join; -var file = join(__dirname, 'fixtures','all_npm.json'); -var JSONStream = require('../'); - - -var server = net.createServer(function(client) { - var parser = JSONStream.parse([]); - parser.on('end', function() { - console.log('close') - console.error('PASSED'); - server.close(); - }); - client.pipe(parser); - var n = 4 - client.on('data', function () { - if(--n) return - client.end(); - }) -}); -server.listen(9999); - - -var client = net.connect({ port : 9999 }, function() { - fs.createReadStream(file).pipe(client).on('data', console.log) //.resume(); -}); diff --git a/node_modules/JSONStream/test/disabled/doubledot1.js b/node_modules/JSONStream/test/disabled/doubledot1.js deleted file mode 100644 index 78149b93..00000000 --- a/node_modules/JSONStream/test/disabled/doubledot1.js +++ /dev/null @@ -1,29 +0,0 @@ -var fs = require ('fs') - , join = require('path').join - , file = join(__dirname, 'fixtures','all_npm.json') - , JSONStream = require('../') - , it = require('it-is') - -var expected = JSON.parse(fs.readFileSync(file)) - , parser = JSONStream.parse('rows..rev') - , called = 0 - , ended = false - , parsed = [] - -fs.createReadStream(file).pipe(parser) - -parser.on('data', function (data) { - called ++ - parsed.push(data) -}) - -parser.on('end', function () { - ended = true -}) - -process.on('exit', function () { - it(called).equal(expected.rows.length) - for (var i = 0 ; i < expected.rows.length ; i++) - it(parsed[i]).deepEqual(expected.rows[i].value.rev) - console.error('PASSED') -}) diff --git a/node_modules/JSONStream/test/disabled/doubledot2.js b/node_modules/JSONStream/test/disabled/doubledot2.js deleted file mode 100644 index f99d8819..00000000 --- a/node_modules/JSONStream/test/disabled/doubledot2.js +++ /dev/null @@ -1,29 +0,0 @@ - var fs = require ('fs') - , join = require('path').join - , file = join(__dirname, 'fixtures','depth.json') - , JSONStream = require('../') - , it = require('it-is') - - var expected = JSON.parse(fs.readFileSync(file)) - , parser = JSONStream.parse(['docs', {recurse: true}, 'value']) - , called = 0 - , ended = false - , parsed = [] - - fs.createReadStream(file).pipe(parser) - - parser.on('data', function (data) { - called ++ - parsed.push(data) - }) - - parser.on('end', function () { - ended = true - }) - - process.on('exit', function () { - it(called).equal(5) - for (var i = 0 ; i < 5 ; i++) - it(parsed[i]).deepEqual(i) - console.error('PASSED') - }) diff --git a/node_modules/JSONStream/test/empty.js b/node_modules/JSONStream/test/empty.js deleted file mode 100644 index 19e888c1..00000000 --- a/node_modules/JSONStream/test/empty.js +++ /dev/null @@ -1,44 +0,0 @@ -var JSONStream = require('../') - , stream = require('stream') - , it = require('it-is') - -var output = [ [], [] ] - -var parser1 = JSONStream.parse(['docs', /./]) -parser1.on('data', function(data) { - output[0].push(data) -}) - -var parser2 = JSONStream.parse(['docs', /./]) -parser2.on('data', function(data) { - output[1].push(data) -}) - -var pending = 2 -function onend () { - if (--pending > 0) return - it(output).deepEqual([ - [], [{hello: 'world'}] - ]) - console.error('PASSED') -} -parser1.on('end', onend) -parser2.on('end', onend) - -function makeReadableStream() { - var readStream = new stream.Stream() - readStream.readable = true - readStream.write = function (data) { this.emit('data', data) } - readStream.end = function (data) { this.emit('end') } - return readStream -} - -var emptyArray = makeReadableStream() -emptyArray.pipe(parser1) -emptyArray.write('{"docs":[]}') -emptyArray.end() - -var objectArray = makeReadableStream() -objectArray.pipe(parser2) -objectArray.write('{"docs":[{"hello":"world"}]}') -objectArray.end() diff --git a/node_modules/JSONStream/test/fixtures/all_npm.json b/node_modules/JSONStream/test/fixtures/all_npm.json deleted file mode 100644 index 6303ea2f..00000000 --- a/node_modules/JSONStream/test/fixtures/all_npm.json +++ /dev/null @@ -1,4030 +0,0 @@ -{"total_rows":4028,"offset":0,"rows":[ -{"id":"","key":"","value":{"rev":"1-2f11e026763c10730d8b19ba5dce7565"}}, -{"id":"3scale","key":"3scale","value":{"rev":"3-db3d574bf0ecdfdf627afeaa21b4bdaa"}}, -{"id":"7digital-api","key":"7digital-api","value":{"rev":"20-21d11832780e2368aabc946598a41dd5"}}, -{"id":"AMD","key":"AMD","value":{"rev":"7-3b4305a9c786ab4c5ce611e7f0de0aca"}}, -{"id":"AriesNode","key":"AriesNode","value":{"rev":"3-9d88392bca6582c5c54784927dbfdee6"}}, -{"id":"Array.prototype.forEachAsync","key":"Array.prototype.forEachAsync","value":{"rev":"3-85696441ba6bef77cc1e7de7b073110e"}}, -{"id":"Babel","key":"Babel","value":{"rev":"5-9d8370c6ac6fd9cd3d530f26a9379814"}}, -{"id":"Blaggie-System","key":"Blaggie-System","value":{"rev":"3-47782b1e5cbfa425170192799510e148"}}, -{"id":"Blob","key":"Blob","value":{"rev":"3-cf5fb5d69da4dd00bc4f2be8870ca698"}}, -{"id":"BlobBuilder","key":"BlobBuilder","value":{"rev":"3-eb977ff1713a915384fac994f9d8fa7c"}}, -{"id":"Buffer","key":"Buffer","value":{"rev":"3-549594b58e83d6d07bb219e73de558e5"}}, -{"id":"CLI-UI","key":"CLI-UI","value":{"rev":"5-5912625f27b4bdfb4d3eed16726c48a8"}}, -{"id":"CLoader","key":"CLoader","value":{"rev":"1-ad3c317ddf3497e73ab41cb1ddbc6ba8"}}, -{"id":"CM1","key":"CM1","value":{"rev":"15-a325a2dc28bc6967a1a14beed86f3b80"}}, -{"id":"CONFIGURATOR","key":"CONFIGURATOR","value":{"rev":"3-c76bf9282a75cc4d3fb349e831ccb8a5"}}, -{"id":"Cashew","key":"Cashew","value":{"rev":"7-6a74dc51dbecc47d2c15bfb7d056a20f"}}, -{"id":"Class","key":"Class","value":{"rev":"5-958c6365f76a60a8b3dafbbd9730ac7e"}}, -{"id":"ClassLoader","key":"ClassLoader","value":{"rev":"3-27fe8faa8a1d60d639f87af52826ed47"}}, -{"id":"ClearSilver","key":"ClearSilver","value":{"rev":"3-f3e54eb9ce64fc6a090186e61f15ed0b"}}, -{"id":"Couch-cleaner","key":"Couch-cleaner","value":{"rev":"3-fc77270917d967a4e2e8637cfa9f0fe0"}}, -{"id":"CouchCover","key":"CouchCover","value":{"rev":"15-3b2d87d314f57272a5c27c42bbb3eaf9"}}, -{"id":"DOM-js","key":"DOM-js","value":{"rev":"8-748cdc96566a7b65bbd0b12be2eeb386"}}, -{"id":"DOMBuilder","key":"DOMBuilder","value":{"rev":"19-41a518f2ce16fabc0241535ccd967300"}}, -{"id":"DateZ","key":"DateZ","value":{"rev":"15-69d8115a9bd521e614eaad3cf2611264"}}, -{"id":"Dateselect","key":"Dateselect","value":{"rev":"3-6511567a876d8fe15724bbc7f247214c"}}, -{"id":"Deferred","key":"Deferred","value":{"rev":"3-c61dfc4a0d1bd3e9f35c7182f161f1f2"}}, -{"id":"DeskSet","key":"DeskSet","value":{"rev":"5-359bf760718898ff3591eb366e336cf9"}}, -{"id":"Estro","key":"Estro","value":{"rev":"11-97192e2d0327469bb30f814963db6dff"}}, -{"id":"EventProxy.js","key":"EventProxy.js","value":{"rev":"5-106696b56c6959cec4bfd37f406ee60a"}}, -{"id":"EventServer","key":"EventServer","value":{"rev":"3-59d174119435e99e2affe0c4ba7caae0"}}, -{"id":"Expressive","key":"Expressive","value":{"rev":"3-7eae0ea010eb9014b28108e814918eac"}}, -{"id":"F","key":"F","value":{"rev":"12-91a3db69527b46cf43e36b7ec64a4336"}}, -{"id":"Faker","key":"Faker","value":{"rev":"9-77951c352cb6f9a0b824be620a8fa40d"}}, -{"id":"FastLegS","key":"FastLegS","value":{"rev":"27-4399791981235021a36c94bb9e9b52b5"}}, -{"id":"Fayer","key":"Fayer","value":{"rev":"7-7e4974ff2716329375f9711bcabef701"}}, -{"id":"File","key":"File","value":{"rev":"3-45e353a984038bc48248dfc32b18f9a8"}}, -{"id":"FileError","key":"FileError","value":{"rev":"3-bb4b03a2548e3c229e2c7e92242946c3"}}, -{"id":"FileList","key":"FileList","value":{"rev":"3-ec4a3fc91794ef7fdd3fe88b19cec7b0"}}, -{"id":"FileReader","key":"FileReader","value":{"rev":"7-e81b58a2d8a765ae4781b41bbfadb4cb"}}, -{"id":"FileSaver","key":"FileSaver","value":{"rev":"3-476dcb3f63f4d10feee08d41a8128cb8"}}, -{"id":"FileWriter","key":"FileWriter","value":{"rev":"3-f2fcdbc4938de480cce2e8e8416a93dd"}}, -{"id":"FileWriterSync","key":"FileWriterSync","value":{"rev":"3-9494c3fe7a1230238f37a724ec10895b"}}, -{"id":"FormData","key":"FormData","value":{"rev":"3-8872d717575f7090107a96d81583f6fe"}}, -{"id":"Frenchpress","key":"Frenchpress","value":{"rev":"3-6d916fc15b9e77535771578f96c47c52"}}, -{"id":"FreshDocs","key":"FreshDocs","value":{"rev":"5-f1f3e76c85267faf21d06d911cc6c203"}}, -{"id":"Google_Plus_API","key":"Google_Plus_API","value":{"rev":"3-3302bc9846726d996a45daee3dc5922c"}}, -{"id":"Gord","key":"Gord","value":{"rev":"11-32fddef1453773ac7270ba0e7c83f727"}}, -{"id":"Graph","key":"Graph","value":{"rev":"7-c346edea4f90e3e18d50a62473868cf4"}}, -{"id":"GridFS","key":"GridFS","value":{"rev":"27-4fc649aaa007fddec4947bdb7111560f"}}, -{"id":"Haraka","key":"Haraka","value":{"rev":"39-ee8f890521c1579b3cc779c8ebe03480"}}, -{"id":"Index","key":"Index","value":{"rev":"29-d8f4881c1544bf51dea1927e87ebb3f3"}}, -{"id":"JS-Entities","key":"JS-Entities","value":{"rev":"7-905636d8b46f273210233b60063d079b"}}, -{"id":"JSLint-commonJS","key":"JSLint-commonJS","value":{"rev":"3-759a81f82af7055e85ee89c9707c9609"}}, -{"id":"JSON","key":"JSON","value":{"rev":"3-7966a79067c34fb5de2e62c796f67341"}}, -{"id":"JSONPath","key":"JSONPath","value":{"rev":"7-58789d57ae366a5b0ae4b36837f15d59"}}, -{"id":"JSONSelect","key":"JSONSelect","value":{"rev":"9-5b0730da91eeb52e8f54da516367dc0f"}}, -{"id":"JSONloops","key":"JSONloops","value":{"rev":"3-3d4a1f8bfcfd778ab7def54155324331"}}, -{"id":"JSPP","key":"JSPP","value":{"rev":"7-af09a2bb193b3ff44775e8fbb7d4f522"}}, -{"id":"JSV","key":"JSV","value":{"rev":"3-41a7af86909046111be8ee9b56b077c8"}}, -{"id":"Jody","key":"Jody","value":{"rev":"43-70c1cf40e93cd8ce53249e5295d6b159"}}, -{"id":"Journaling-Hash","key":"Journaling-Hash","value":{"rev":"3-ac676eecb40a4dff301c671fa4bb6be9"}}, -{"id":"Kahana","key":"Kahana","value":{"rev":"33-1cb7e291ae02cee4e8105509571223f5"}}, -{"id":"LazyBoy","key":"LazyBoy","value":{"rev":"13-20a8894e3a957f184f5ae2a3e709551c"}}, -{"id":"Lingo","key":"Lingo","value":{"rev":"9-1af9a6df616e601f09c8cec07ccad1ae"}}, -{"id":"Loggy","key":"Loggy","value":{"rev":"33-e115c25163ab468314eedbe497d1c51e"}}, -{"id":"MeCab","key":"MeCab","value":{"rev":"4-2687176c7b878930e812a534976a6988"}}, -{"id":"Mercury","key":"Mercury","value":{"rev":"3-09a6bff1332ed829bd2c37bfec244a41"}}, -{"id":"Mu","key":"Mu","value":{"rev":"7-28e6ab82c402c3a75fe0f79dea846b97"}}, -{"id":"N","key":"N","value":{"rev":"7-e265046b5bdd299b2cad1584083ce2d5"}}, -{"id":"NORRIS","key":"NORRIS","value":{"rev":"3-4b5b23b09118582c44414f8d480619e6"}}, -{"id":"NetOS","key":"NetOS","value":{"rev":"3-3f943f87a24c11e6dd8c265469914e80"}}, -{"id":"NewBase60","key":"NewBase60","value":{"rev":"3-fd84758db79870e82917d358c6673f32"}}, -{"id":"NoCR","key":"NoCR","value":{"rev":"3-8f6cddd528f2d6045e3dda6006fb6948"}}, -{"id":"NodObjC","key":"NodObjC","value":{"rev":"15-ea6ab2df532c90fcefe5a428950bfdbb"}}, -{"id":"Node-JavaScript-Preprocessor","key":"Node-JavaScript-Preprocessor","value":{"rev":"13-4662b5ad742caaa467ec5d6c8e77b1e5"}}, -{"id":"NodeInterval","key":"NodeInterval","value":{"rev":"3-dc3446db2e0cd5be29a3c07942dba66d"}}, -{"id":"NodeSSH","key":"NodeSSH","value":{"rev":"3-45530fae5a69c44a6dd92357910f4212"}}, -{"id":"Nonsense","key":"Nonsense","value":{"rev":"3-9d86191475bc76dc3dd496d4dfe5d94e"}}, -{"id":"NormAndVal","key":"NormAndVal","value":{"rev":"9-d3b3d6ffd046292f4733aa5f3eb7be61"}}, -{"id":"Olive","key":"Olive","value":{"rev":"5-67f3057f09cae5104f09472db1d215aa"}}, -{"id":"OnCollect","key":"OnCollect","value":{"rev":"16-6dbe3afd04f123dda87bb1e21cdfd776"}}, -{"id":"PJsonCouch","key":"PJsonCouch","value":{"rev":"3-be9588f49d85094c36288eb63f8236b3"}}, -{"id":"PMInject","key":"PMInject","value":{"rev":"5-da518047d8273dbf3b3c05ea25e77836"}}, -{"id":"PanPG","key":"PanPG","value":{"rev":"13-beb54225a6b1be4c157434c28adca016"}}, -{"id":"PerfDriver","key":"PerfDriver","value":{"rev":"2-b448fb2f407f341b8df7032f29e4920f"}}, -{"id":"PostgresClient","key":"PostgresClient","value":{"rev":"8-2baec6847f8ad7dcf24b7d61a4034163"}}, -{"id":"QuickWeb","key":"QuickWeb","value":{"rev":"13-d388df9c484021ecd75bc9650d659a67"}}, -{"id":"R.js","key":"R.js","value":{"rev":"3-3f154b95ec6fc744f95a29750f16667e"}}, -{"id":"R2","key":"R2","value":{"rev":"11-f5ccff6f108f6b928caafb62b80d1056"}}, -{"id":"Reston","key":"Reston","value":{"rev":"5-9d234010f32f593edafc04620f3cf2bd"}}, -{"id":"Sardines","key":"Sardines","value":{"rev":"5-d7d3d2269420e21c2c62b86ff5a0021e"}}, -{"id":"SessionWebSocket","key":"SessionWebSocket","value":{"rev":"8-d9fc9beaf90057aefeb701addd7fc845"}}, -{"id":"Sheet","key":"Sheet","value":{"rev":"8-c827c713564e4ae5a17988ffea520d0d"}}, -{"id":"Spec_My_Node","key":"Spec_My_Node","value":{"rev":"8-fa58408e9d9736d9c6fa8daf5d632106"}}, -{"id":"Spot","key":"Spot","value":{"rev":"3-6b6c2131451fed28fb57c924c4fa44cc"}}, -{"id":"Sslac","key":"Sslac","value":{"rev":"3-70a2215cc7505729254aa6fa1d9a25d9"}}, -{"id":"StaticServer","key":"StaticServer","value":{"rev":"3-6f5433177ef4d76a52f01c093117a532"}}, -{"id":"StringScanner","key":"StringScanner","value":{"rev":"3-e85d0646c25ec477c1c45538712d3a38"}}, -{"id":"Structr","key":"Structr","value":{"rev":"3-449720001801cff5831c2cc0e0f1fcf8"}}, -{"id":"Templ8","key":"Templ8","value":{"rev":"11-4e6edb250bc250df20b2d557ca7f6589"}}, -{"id":"Template","key":"Template","value":{"rev":"6-1f055c73524d2b7e82eb6c225bd4b8e0"}}, -{"id":"Thimble","key":"Thimble","value":{"rev":"3-8499b261206f2f2e9acf92d8a4e54afb"}}, -{"id":"Toji","key":"Toji","value":{"rev":"96-511e171ad9f32a9264c2cdf01accacfb"}}, -{"id":"TwigJS","key":"TwigJS","value":{"rev":"3-1aaefc6d6895d7d4824174d410a747b9"}}, -{"id":"UkGeoTool","key":"UkGeoTool","value":{"rev":"5-e84291128e12f66cebb972a60c1d710f"}}, -{"id":"Vector","key":"Vector","value":{"rev":"3-bf5dc97abe7cf1057260b70638175a96"}}, -{"id":"_design/app","key":"_design/app","value":{"rev":"421-b1661d854599a58d0904d68aa44d8b63"}}, -{"id":"_design/ui","key":"_design/ui","value":{"rev":"78-db00aeb91a59a326e38e2bef7f1126cf"}}, -{"id":"aaronblohowiak-plugify-js","key":"aaronblohowiak-plugify-js","value":{"rev":"3-0272c269eacd0c86bfc1711566922577"}}, -{"id":"aaronblohowiak-uglify-js","key":"aaronblohowiak-uglify-js","value":{"rev":"3-77844a6def6ec428d75caa0846c95502"}}, -{"id":"aasm-js","key":"aasm-js","value":{"rev":"3-01a48108d55909575440d9e0ef114f37"}}, -{"id":"abbrev","key":"abbrev","value":{"rev":"16-e17a2b6c7360955b950edf2cb2ef1602"}}, -{"id":"abhispeak","key":"abhispeak","value":{"rev":"5-9889431f68ec10212db3be91796608e2"}}, -{"id":"ace","key":"ace","value":{"rev":"3-e8d267de6c17ebaa82c2869aff983c74"}}, -{"id":"acl","key":"acl","value":{"rev":"13-87c131a1801dc50840a177be73ce1c37"}}, -{"id":"active-client","key":"active-client","value":{"rev":"5-0ca16ae2e48a3ba9de2f6830a8c2d3a0"}}, -{"id":"activenode-monitor","key":"activenode-monitor","value":{"rev":"9-2634fa446379c39475d0ce4183fb92f2"}}, -{"id":"activeobject","key":"activeobject","value":{"rev":"43-6d73e28412612aaee37771e3ab292c3d"}}, -{"id":"actor","key":"actor","value":{"rev":"3-f6b84acd7d2e689b860e3142a18cd460"}}, -{"id":"actors","key":"actors","value":{"rev":"3-6df913bbe5b99968a2e71ae4ef07b2d2"}}, -{"id":"addTimeout","key":"addTimeout","value":{"rev":"15-e5170f0597fe8cf5ed0b54b7e6f2cde1"}}, -{"id":"addressable","key":"addressable","value":{"rev":"27-0c74fde458d92e4b93a29317da15bb3c"}}, -{"id":"aejs","key":"aejs","value":{"rev":"7-4928e2ce6151067cd6c585c0ba3e0bc3"}}, -{"id":"aenoa-supervisor","key":"aenoa-supervisor","value":{"rev":"7-6d399675981e76cfdfb9144bc2f7fb6d"}}, -{"id":"after","key":"after","value":{"rev":"9-baee7683ff54182cf7544cc05b0a4ad7"}}, -{"id":"ahr","key":"ahr","value":{"rev":"27-4ed272c516f3f2f9310e4f0ef28254e9"}}, -{"id":"ahr.browser","key":"ahr.browser","value":{"rev":"3-f7226aab4a1a3ab5f77379f92aae87f9"}}, -{"id":"ahr.browser.jsonp","key":"ahr.browser.jsonp","value":{"rev":"3-abed17143cf5e3c451c3d7da457e6f5b"}}, -{"id":"ahr.browser.request","key":"ahr.browser.request","value":{"rev":"7-fafd7b079d0415f388b64a20509a270b"}}, -{"id":"ahr.node","key":"ahr.node","value":{"rev":"17-f487a4a9896bd3876a11f9dfa1c639a7"}}, -{"id":"ahr.options","key":"ahr.options","value":{"rev":"13-904a4cea763a4455f7b2ae0abba18b8d"}}, -{"id":"ahr.utils","key":"ahr.utils","value":{"rev":"3-5f7b4104ea280d1fd36370c8f3356ead"}}, -{"id":"ahr2","key":"ahr2","value":{"rev":"87-ddf57f3ee158dcd23b2df330e2883a1d"}}, -{"id":"ain","key":"ain","value":{"rev":"7-d840736668fb36e9be3c26a68c5cd411"}}, -{"id":"ain-tcp","key":"ain-tcp","value":{"rev":"11-d18a1780bced8981d1d9dbd262ac4045"}}, -{"id":"ain2","key":"ain2","value":{"rev":"5-0b67879174f5f0a06448c7c737d98b5e"}}, -{"id":"airbrake","key":"airbrake","value":{"rev":"33-4bb9f822162e0c930c31b7f961938dc9"}}, -{"id":"ajaxrunner","key":"ajaxrunner","value":{"rev":"2-17e6a5de4f0339f4e6ce0b7681d0ba0c"}}, -{"id":"ajs","key":"ajs","value":{"rev":"13-063a29dec829fdaf4ca63d622137d1c6"}}, -{"id":"ajs-xgettext","key":"ajs-xgettext","value":{"rev":"3-cd4bbcc1c9d87fa7119d3bbbca99b793"}}, -{"id":"akismet","key":"akismet","value":{"rev":"13-a144e15dd6c2b13177572e80a526edd1"}}, -{"id":"alfred","key":"alfred","value":{"rev":"45-9a69041b18d2587c016b1b1deccdb2ce"}}, -{"id":"alfred-bcrypt","key":"alfred-bcrypt","value":{"rev":"11-7ed10ef318e5515d1ef7c040818ddb22"}}, -{"id":"algorithm","key":"algorithm","value":{"rev":"3-9ec0b38298cc15b0f295152de8763358"}}, -{"id":"algorithm-js","key":"algorithm-js","value":{"rev":"9-dd7496b7ec2e3b23cc7bb182ae3aac6d"}}, -{"id":"alists","key":"alists","value":{"rev":"5-22cc13c86d84081a826ac79a0ae5cda3"}}, -{"id":"altshift","key":"altshift","value":{"rev":"53-1c51d8657f271f390503a6fe988d09db"}}, -{"id":"amazon-ses","key":"amazon-ses","value":{"rev":"5-c175d60de2232a5664666a80832269e5"}}, -{"id":"ambrosia","key":"ambrosia","value":{"rev":"3-8c648ec7393cf842838c20e2c5d9bce4"}}, -{"id":"amd","key":"amd","value":{"rev":"3-d78c4df97a577af598a7def2a38379fa"}}, -{"id":"amionline","key":"amionline","value":{"rev":"3-a62887a632523700402b0f4ebb896812"}}, -{"id":"amo-version-reduce","key":"amo-version-reduce","value":{"rev":"3-05f6956269e5e921ca3486d3d6ea74b0"}}, -{"id":"amqp","key":"amqp","value":{"rev":"17-ee62d2b8248f8eb13f3369422d66df26"}}, -{"id":"amqpsnoop","key":"amqpsnoop","value":{"rev":"3-36a1c45647bcfb2f56cf68dbc24b0426"}}, -{"id":"ams","key":"ams","value":{"rev":"40-1c0cc53ad942d2fd23c89618263befc8"}}, -{"id":"amulet","key":"amulet","value":{"rev":"7-d1ed71811e45652799982e4f2e9ffb36"}}, -{"id":"anachronism","key":"anachronism","value":{"rev":"11-468bdb40f9a5aa146bae3c1c6253d0e1"}}, -{"id":"analytics","key":"analytics","value":{"rev":"3-a143ccdd863b5f7dbee4d2f7732390b3"}}, -{"id":"ann","key":"ann","value":{"rev":"9-41f00594d6216c439f05f7116a697cac"}}, -{"id":"ansi-color","key":"ansi-color","value":{"rev":"6-d6f02b32525c1909d5134afa20f470de"}}, -{"id":"ansi-font","key":"ansi-font","value":{"rev":"3-b039661ad9b6aa7baf34741b449c4420"}}, -{"id":"ant","key":"ant","value":{"rev":"3-35a64e0b7f6eb63a90c32971694b0d93"}}, -{"id":"anvil.js","key":"anvil.js","value":{"rev":"19-290c82075f0a9ad764cdf6dc5c558e0f"}}, -{"id":"aop","key":"aop","value":{"rev":"7-5963506c9e7912aa56fda065c56fd472"}}, -{"id":"ap","key":"ap","value":{"rev":"3-f525b5b490a1ada4452f46307bf92d08"}}, -{"id":"apac","key":"apac","value":{"rev":"12-945d0313a84797b4c3df19da4bec14d4"}}, -{"id":"aparser","key":"aparser","value":{"rev":"5-cb35cfc9184ace6642413dad97e49dca"}}, -{"id":"api-easy","key":"api-easy","value":{"rev":"15-2ab5eefef1377ff217cb020e80343d65"}}, -{"id":"api.js","key":"api.js","value":{"rev":"5-a14b8112fbda17022c80356a010de59a"}}, -{"id":"api_request","key":"api_request","value":{"rev":"3-8531e71f5cf2f3f811684269132d72d4"}}, -{"id":"apimaker","key":"apimaker","value":{"rev":"3-bdbd4a2ebf5b67276d89ea73eaa20025"}}, -{"id":"apn","key":"apn","value":{"rev":"30-0513d27341f587b39db54300c380921f"}}, -{"id":"app","key":"app","value":{"rev":"3-d349ddb47167f60c03d259649569e002"}}, -{"id":"app.js","key":"app.js","value":{"rev":"3-bff3646634daccfd964b4bbe510acb25"}}, -{"id":"append","key":"append","value":{"rev":"7-53e2f4ab2a69dc0c5e92f10a154998b6"}}, -{"id":"applescript","key":"applescript","value":{"rev":"10-ef5ab30ccd660dc71fb89e173f30994a"}}, -{"id":"appzone","key":"appzone","value":{"rev":"21-fb27e24d460677fe9c7eda0d9fb1fead"}}, -{"id":"apricot","key":"apricot","value":{"rev":"14-b55361574a0715f78afc76ddf6125845"}}, -{"id":"arcane","key":"arcane","value":{"rev":"3-f846c96e890ed6150d4271c93cc05a24"}}, -{"id":"archetype","key":"archetype","value":{"rev":"3-441336def3b7aade89c8c1c19a84f56d"}}, -{"id":"ardrone","key":"ardrone","value":{"rev":"8-540e95b796da734366a89bb06dc430c5"}}, -{"id":"ardrone-web","key":"ardrone-web","value":{"rev":"3-8a53cc85a95be20cd44921347e82bbe4"}}, -{"id":"arduino","key":"arduino","value":{"rev":"3-22f6359c47412d086d50dc7f1a994139"}}, -{"id":"argon","key":"argon","value":{"rev":"3-ba12426ce67fac01273310cb3909b855"}}, -{"id":"argparse","key":"argparse","value":{"rev":"8-5e841e38cca6cfc3fe1d1f507a7f47ee"}}, -{"id":"argparser","key":"argparser","value":{"rev":"19-b8793bfc005dd84e1213ee53ae56206d"}}, -{"id":"argsparser","key":"argsparser","value":{"rev":"26-d31eca2f41546172763af629fc50631f"}}, -{"id":"argtype","key":"argtype","value":{"rev":"10-96a7d23e571d56cf598472115bcac571"}}, -{"id":"arguments","key":"arguments","value":{"rev":"7-767de2797f41702690bef5928ec7c6e9"}}, -{"id":"armory","key":"armory","value":{"rev":"41-ea0f7bd0868c11fc9986fa708e11e071"}}, -{"id":"armrest","key":"armrest","value":{"rev":"3-bbe40b6320b6328211be33425bed20c8"}}, -{"id":"arnold","key":"arnold","value":{"rev":"3-4896fc8d02b8623f47a024f0dbfa44bf"}}, -{"id":"arouter","key":"arouter","value":{"rev":"7-55cab1f7128df54f27be94039a8d8dc5"}}, -{"id":"array-promise","key":"array-promise","value":{"rev":"3-e2184561ee65de64c2dfeb57955c758f"}}, -{"id":"arrayemitter","key":"arrayemitter","value":{"rev":"3-d64c917ac1095bfcbf173dac88d3d148"}}, -{"id":"asEvented","key":"asEvented","value":{"rev":"3-2ad3693b49d4d9dc9a11c669033a356e"}}, -{"id":"asciimo","key":"asciimo","value":{"rev":"12-50130f5ac2ef4d95df190be2c8ede893"}}, -{"id":"asereje","key":"asereje","value":{"rev":"15-84853499f89a87109ddf47ba692323ba"}}, -{"id":"ash","key":"ash","value":{"rev":"6-3697a3aee708bece8a08c7e0d1010476"}}, -{"id":"ask","key":"ask","value":{"rev":"3-321bbc3837d749b5d97bff251693a825"}}, -{"id":"asn1","key":"asn1","value":{"rev":"13-e681a814a4a1439a22b19e141b45006f"}}, -{"id":"aspsms","key":"aspsms","value":{"rev":"9-7b82d722bdac29a4da8c88b642ad64f2"}}, -{"id":"assert","key":"assert","value":{"rev":"3-85480762f5cb0be2cb85f80918257189"}}, -{"id":"assertions","key":"assertions","value":{"rev":"9-d797d4c09aa994556c7d5fdb4e86fe1b"}}, -{"id":"assertn","key":"assertn","value":{"rev":"6-080a4fb5d2700a6850d56b58c6f6ee9e"}}, -{"id":"assertvanish","key":"assertvanish","value":{"rev":"13-3b0b555ff77c1bfc2fe2642d50879648"}}, -{"id":"asset","key":"asset","value":{"rev":"33-cb70b68e0e05e9c9a18b3d89f1bb43fc"}}, -{"id":"assetgraph","key":"assetgraph","value":{"rev":"82-7853d644e64741b46fdd29a997ec4852"}}, -{"id":"assetgraph-builder","key":"assetgraph-builder","value":{"rev":"61-1ed98d95f3589050037851edde760a01"}}, -{"id":"assetgraph-sprite","key":"assetgraph-sprite","value":{"rev":"15-351b5fd9e50a3dda8580d014383423e0"}}, -{"id":"assets-expander","key":"assets-expander","value":{"rev":"11-f9e1197b773d0031dd015f1d871b87c6"}}, -{"id":"assets-packager","key":"assets-packager","value":{"rev":"13-51f7d2d57ed35be6aff2cc2aa2fa74db"}}, -{"id":"assoc","key":"assoc","value":{"rev":"9-07098388f501da16bf6afe6c9babefd5"}}, -{"id":"ast-inlining","key":"ast-inlining","value":{"rev":"5-02e7e2c3a06ed81ddc61980f778ac413"}}, -{"id":"ast-transformer","key":"ast-transformer","value":{"rev":"5-b4020bb763b8839afa8d3ac0d54a6f26"}}, -{"id":"astar","key":"astar","value":{"rev":"3-3df8c56c64c3863ef0650c0c74e2801b"}}, -{"id":"aster","key":"aster","value":{"rev":"7-b187c1270d3924f5ee04044e579d2df9"}}, -{"id":"asterisk-manager","key":"asterisk-manager","value":{"rev":"3-7fbf4294dafee04cc17cca4692c09c33"}}, -{"id":"astrolin","key":"astrolin","value":{"rev":"3-30ac515a2388e7dc22b25c15346f6d7e"}}, -{"id":"asyn","key":"asyn","value":{"rev":"3-51996b0197c21e85858559045c1481b7"}}, -{"id":"async","key":"async","value":{"rev":"26-73aea795f46345a7e65d89ec75dff2f1"}}, -{"id":"async-array","key":"async-array","value":{"rev":"17-3ef5faff03333aa5b2a733ef36118066"}}, -{"id":"async-chain","key":"async-chain","value":{"rev":"9-10ec3e50b01567390d55973494e36d43"}}, -{"id":"async-ejs","key":"async-ejs","value":{"rev":"19-6f0e6e0eeb3cdb4c816ea427d8288d7d"}}, -{"id":"async-fs","key":"async-fs","value":{"rev":"3-b96906283d345604f784dfcdbeb21a63"}}, -{"id":"async-it","key":"async-it","value":{"rev":"7-6aed4439df25989cfa040fa4b5dd4ff2"}}, -{"id":"async-json","key":"async-json","value":{"rev":"5-589d5b6665d00c5bffb99bb142cac5d0"}}, -{"id":"async-memoizer","key":"async-memoizer","value":{"rev":"9-01d56f4dff95e61a39dab5ebee49d5dc"}}, -{"id":"async-object","key":"async-object","value":{"rev":"21-1bf28b0f8a7d875b54126437f3539f9b"}}, -{"id":"asyncEJS","key":"asyncEJS","value":{"rev":"3-28b1c94255381f23a4d4f52366255937"}}, -{"id":"async_testing","key":"async_testing","value":{"rev":"14-0275d8b608d8644dfe8d68a81fa07e98"}}, -{"id":"asyncevents","key":"asyncevents","value":{"rev":"3-de104847994365dcab5042db2b46fb84"}}, -{"id":"asyncify","key":"asyncify","value":{"rev":"3-3f6deb82ee1c6cb25e83a48fe6379b75"}}, -{"id":"asyncjs","key":"asyncjs","value":{"rev":"27-15903d7351f80ed37cb069aedbfc26cc"}}, -{"id":"asynct","key":"asynct","value":{"rev":"5-6be002b3e005d2d53b80fff32ccbd2ac"}}, -{"id":"at_scheduler","key":"at_scheduler","value":{"rev":"3-5587061c90218d2e99b6e22d5b488b0b"}}, -{"id":"atbar","key":"atbar","value":{"rev":"19-e9e906d4874afd4d8bf2d8349ed46dff"}}, -{"id":"atob","key":"atob","value":{"rev":"3-bc907d10dd2cfc940de586dc090451da"}}, -{"id":"audiolib","key":"audiolib","value":{"rev":"17-cb2f55ff50061081b440f0605cf0450c"}}, -{"id":"audit_couchdb","key":"audit_couchdb","value":{"rev":"24-6e620895b454b345b2aed13db847c237"}}, -{"id":"auditor","key":"auditor","value":{"rev":"11-c4df509d40650c015943dd90315a12c0"}}, -{"id":"authnet_cim","key":"authnet_cim","value":{"rev":"7-f02bbd206ac2b8c05255bcd8171ac1eb"}}, -{"id":"autocomplete","key":"autocomplete","value":{"rev":"3-f2773bca040d5abcd0536dbebe5847bf"}}, -{"id":"autodafe","key":"autodafe","value":{"rev":"7-a75262b53a9dd1a25693adecde7206d7"}}, -{"id":"autolint","key":"autolint","value":{"rev":"7-07f885902d72b52678fcc57aa4b9c592"}}, -{"id":"autoload","key":"autoload","value":{"rev":"5-9247704d9a992a175e3ae49f4af757d0"}}, -{"id":"autoloader","key":"autoloader","value":{"rev":"11-293c20c34d0c81fac5c06b699576b1fe"}}, -{"id":"auton","key":"auton","value":{"rev":"25-4fcb7a62b607b7929b62a9b792afef55"}}, -{"id":"autoreleasepool","key":"autoreleasepool","value":{"rev":"5-5d2798bf74bbec583cc6f19127e3c89e"}}, -{"id":"autorequire","key":"autorequire","value":{"rev":"9-564a46b355532fcec24db0afc99daed5"}}, -{"id":"autotest","key":"autotest","value":{"rev":"7-e319995dd0e1fbd935c14c46b1234f77"}}, -{"id":"awesome","key":"awesome","value":{"rev":"15-4458b746e4722214bd26ea15e453288e"}}, -{"id":"aws","key":"aws","value":{"rev":"14-9a8f0989be29034d3fa5c66c594b649b"}}, -{"id":"aws-js","key":"aws-js","value":{"rev":"6-c61d87b8ad948cd065d2ca222808c209"}}, -{"id":"aws-lib","key":"aws-lib","value":{"rev":"36-9733e215c03d185a860574600a8feb14"}}, -{"id":"aws2js","key":"aws2js","value":{"rev":"35-42498f44a5ae7d4f3c84096b435d0e0b"}}, -{"id":"azure","key":"azure","value":{"rev":"5-2c4e05bd842d3dcfa419f4d2b67121e2"}}, -{"id":"b64","key":"b64","value":{"rev":"3-e5e727a46df4c8aad38acd117d717140"}}, -{"id":"b64url","key":"b64url","value":{"rev":"9-ab3b017f00a53b0078261254704c30ba"}}, -{"id":"ba","key":"ba","value":{"rev":"11-3cec7ec9a566fe95fbeb34271538d60a"}}, -{"id":"babelweb","key":"babelweb","value":{"rev":"11-8e6a2fe00822cec15573cdda48b6d0a0"}}, -{"id":"backbone","key":"backbone","value":{"rev":"37-79b95355f8af59bf9131e14d52b68edc"}}, -{"id":"backbone-browserify","key":"backbone-browserify","value":{"rev":"3-f25dac0b05a7f7aa5dbc0f4a1ad97969"}}, -{"id":"backbone-celtra","key":"backbone-celtra","value":{"rev":"3-775a5ebb25c1cd84723add52774ece84"}}, -{"id":"backbone-couch","key":"backbone-couch","value":{"rev":"8-548327b3cd7ee7a4144c9070377be5f6"}}, -{"id":"backbone-cradle","key":"backbone-cradle","value":{"rev":"3-b9bc220ec48b05eed1d4d77a746b10db"}}, -{"id":"backbone-dirty","key":"backbone-dirty","value":{"rev":"21-fa0f688cc95a85c0fc440733f09243b5"}}, -{"id":"backbone-dnode","key":"backbone-dnode","value":{"rev":"65-3212d3aa3284efb3bc0732bac71b5a2e"}}, -{"id":"backbone-proxy","key":"backbone-proxy","value":{"rev":"3-3602cb984bdd266516a3145663f9a5c6"}}, -{"id":"backbone-redis","key":"backbone-redis","value":{"rev":"9-2e3f6a9e095b00ccec9aa19b3fbc65eb"}}, -{"id":"backbone-rel","key":"backbone-rel","value":{"rev":"5-f9773dc85f1c502e61c163a22d2f74aa"}}, -{"id":"backbone-simpledb","key":"backbone-simpledb","value":{"rev":"5-a815128e1e3593696f666f8b3da36d78"}}, -{"id":"backbone-stash","key":"backbone-stash","value":{"rev":"19-8d3cc5f9ed28f9a56856154e2b4e7f78"}}, -{"id":"backplane","key":"backplane","value":{"rev":"7-f69188dac21e007b09efe1b5b3575087"}}, -{"id":"backport-0.4","key":"backport-0.4","value":{"rev":"11-25e15f01f1ef9e626433a82284bc00d6"}}, -{"id":"backuptweets","key":"backuptweets","value":{"rev":"3-68712682aada41082d3ae36c03c8f899"}}, -{"id":"bake","key":"bake","value":{"rev":"113-ce13508ba2b4f15aa4df06d796aa4573"}}, -{"id":"bal-util","key":"bal-util","value":{"rev":"31-b818725a5af131c89ec66b9fdebf2122"}}, -{"id":"balancer","key":"balancer","value":{"rev":"7-63dcb4327081a8ec4d6c51a21253cb4b"}}, -{"id":"bancroft","key":"bancroft","value":{"rev":"11-8fa3370a4615a0ed4ba411b05c0285f4"}}, -{"id":"bandcamp","key":"bandcamp","value":{"rev":"41-f2fee472d63257fdba9e5fa8ad570ee8"}}, -{"id":"banner","key":"banner","value":{"rev":"19-89a447e2136b2fabddbad84abcd63a27"}}, -{"id":"banzai-docstore-couchdb","key":"banzai-docstore-couchdb","value":{"rev":"5-950c115737d634e2f48ee1c772788321"}}, -{"id":"banzai-redis","key":"banzai-redis","value":{"rev":"3-446f29e0819fd79c810fdfa8ce05bdcf"}}, -{"id":"banzai-statestore-couchdb","key":"banzai-statestore-couchdb","value":{"rev":"5-c965442821741ce6f20e266fe43aea4a"}}, -{"id":"banzai-statestore-mem","key":"banzai-statestore-mem","value":{"rev":"3-a0891a1a2344922d91781c332ed26528"}}, -{"id":"bar","key":"bar","value":{"rev":"7-fbb44a76cb023e6a8941f15576cf190b"}}, -{"id":"barc","key":"barc","value":{"rev":"7-dfe352b410782543d6b1aea292f123eb"}}, -{"id":"barista","key":"barista","value":{"rev":"9-d3f3c776453ba69a81947f34d7cc3cbf"}}, -{"id":"bark","key":"bark","value":{"rev":"20-fc1a94f80cfa199c16aa075e940e06dc"}}, -{"id":"barricane-db","key":"barricane-db","value":{"rev":"3-450947b9a05047fe195f76a69a3144e8"}}, -{"id":"base-converter","key":"base-converter","value":{"rev":"7-1b49b01df111176b89343ad56ac68d5c"}}, -{"id":"base32","key":"base32","value":{"rev":"11-d686c54c9de557681356e74b83d916e8"}}, -{"id":"base64","key":"base64","value":{"rev":"24-bd713c3d7e96fad180263ed7563c595e"}}, -{"id":"bash","key":"bash","value":{"rev":"3-86a1c61babfa47da0ebc14c2f4e59a6a"}}, -{"id":"basic-auth","key":"basic-auth","value":{"rev":"3-472a87af27264ae81bd4394d70792e55"}}, -{"id":"basicFFmpeg","key":"basicFFmpeg","value":{"rev":"15-3e87a41c543bde1e6f7c49d021fda62f"}}, -{"id":"basicauth","key":"basicauth","value":{"rev":"3-15d95a05b6f5e7b6d7261f87c4eb73de"}}, -{"id":"basil-cookie","key":"basil-cookie","value":{"rev":"11-fff96b263f31b9d017e3cf59bf6fb23f"}}, -{"id":"batik","key":"batik","value":{"rev":"7-a19ce28cbbf54649fa225ed5474eff02"}}, -{"id":"batman","key":"batman","value":{"rev":"15-6af5469bf143790cbb4af196824c9e95"}}, -{"id":"batteries","key":"batteries","value":{"rev":"13-656c68fe887f4af3ef1e720e64275f4e"}}, -{"id":"bbcode","key":"bbcode","value":{"rev":"5-e79a8b62125f8a3a1751bf7bd8875f33"}}, -{"id":"bcrypt","key":"bcrypt","value":{"rev":"31-db8496d1239362a97a26f1e5eeb8a733"}}, -{"id":"beaconpush","key":"beaconpush","value":{"rev":"3-956fcd87a6d3f9d5b9775d47e36aa3e5"}}, -{"id":"bean","key":"bean","value":{"rev":"56-151c1558e15016205e65bd515eab9ee0"}}, -{"id":"bean.database.mongo","key":"bean.database.mongo","value":{"rev":"3-ede73166710137cbf570385b7e8f17fe"}}, -{"id":"beandocs","key":"beandocs","value":{"rev":"3-9f7492984c95b69ca1ad30d40223f117"}}, -{"id":"beanpole","key":"beanpole","value":{"rev":"53-565a78a2304405cdc9f4a6b6101160fa"}}, -{"id":"beanprep","key":"beanprep","value":{"rev":"3-bd387f0072514b8e44131671f9aad1b0"}}, -{"id":"beans","key":"beans","value":{"rev":"54-7f6d40a2a5bf228fe3547cce43edaa63"}}, -{"id":"beanstalk_client","key":"beanstalk_client","value":{"rev":"6-13c8c80aa6469b5dcf20d65909289383"}}, -{"id":"beanstalk_worker","key":"beanstalk_worker","value":{"rev":"6-45500991db97ed5a18ea96f3621bf99f"}}, -{"id":"beantest","key":"beantest","value":{"rev":"7-52d8160a0c0420c7d659b2ee10f26644"}}, -{"id":"beatit","key":"beatit","value":{"rev":"7-c0ba5f95b0601dcb628e4820555cc252"}}, -{"id":"beatport","key":"beatport","value":{"rev":"5-3b186b633ceea7f047e1df91e7b683a5"}}, -{"id":"beautifyjs","key":"beautifyjs","value":{"rev":"3-89ce050152aca0727c099060229ddc73"}}, -{"id":"beaver","key":"beaver","value":{"rev":"17-3b56116e8e40205e8efcedefee0319e3"}}, -{"id":"beeline","key":"beeline","value":{"rev":"11-92a4bd9524cc7aec3106efcacff6faed"}}, -{"id":"beet","key":"beet","value":{"rev":"95-3c9d9de63c363319b2201ac83bc0ee7d"}}, -{"id":"begin","key":"begin","value":{"rev":"3-b32a5eb1b9475353b37f90813ed89dce"}}, -{"id":"begin.js","key":"begin.js","value":{"rev":"7-9156869392a448595bf3e5723fcb7b57"}}, -{"id":"bejesus-api","key":"bejesus-api","value":{"rev":"11-6b42f8ffc370c494d01481b64536e91e"}}, -{"id":"bejesus-cli","key":"bejesus-cli","value":{"rev":"31-5fbbfe5ec1f6a0a7a3fafdf69230434a"}}, -{"id":"bem","key":"bem","value":{"rev":"22-c0e0f8d9e92b355246fd15058199b73c"}}, -{"id":"ben","key":"ben","value":{"rev":"3-debe52552a86f1e71895dd5d32add585"}}, -{"id":"bench","key":"bench","value":{"rev":"14-20987e1becf3acd1bd1833b04712c87c"}}, -{"id":"bencher","key":"bencher","value":{"rev":"3-08866a8fdcf180582b43690bbbf21087"}}, -{"id":"benchmark","key":"benchmark","value":{"rev":"219-0669bc24f3f2918d93369bb0d801abf3"}}, -{"id":"bencode","key":"bencode","value":{"rev":"8-7b9eff4c1658fb3a054ebc6f50e6edcd"}}, -{"id":"beseda","key":"beseda","value":{"rev":"49-5cc8c4e9bb3e836de7db58c3adf9a5bb"}}, -{"id":"bf","key":"bf","value":{"rev":"14-d81312e1bf4f7202b801b4343199aa55"}}, -{"id":"biggie-router","key":"biggie-router","value":{"rev":"42-56a546a78d5abd4402183b3d300d563e"}}, -{"id":"bigint","key":"bigint","value":{"rev":"58-02f368567849596219d6a0e87d9bc6b9"}}, -{"id":"bignumber","key":"bignumber","value":{"rev":"3-6e372428992a767e0a991ec3f39b8343"}}, -{"id":"binary","key":"binary","value":{"rev":"47-947aa2f5238a68e34b164ef7e50ece28"}}, -{"id":"binarySearch","key":"binarySearch","value":{"rev":"15-93a3d2f9c2690457023b5ae5f3d00446"}}, -{"id":"bind","key":"bind","value":{"rev":"9-b74d0af83e90a2655e564ab64bf1d27d"}}, -{"id":"binpack","key":"binpack","value":{"rev":"7-3dc67a64e0ef01f3aa59441c5150e04f"}}, -{"id":"bintrees","key":"bintrees","value":{"rev":"12-507fcd92f447f81842cba08cacb425cf"}}, -{"id":"bisection","key":"bisection","value":{"rev":"5-f785ea3bbd8fcc7cd9381d20417b87bb"}}, -{"id":"bison","key":"bison","value":{"rev":"12-e663b2ef96650b3b5a0cc36524e1b94a"}}, -{"id":"bitcoder","key":"bitcoder","value":{"rev":"8-19c957d6b845f4d7ad531951c971e03d"}}, -{"id":"bitcoin","key":"bitcoin","value":{"rev":"13-af88a28c02ab146622743c4c1c32e87b"}}, -{"id":"bitcoin-impl","key":"bitcoin-impl","value":{"rev":"8-99068f1d259e3c75209a6bd08e3e06a2"}}, -{"id":"bitcoin-p2p","key":"bitcoin-p2p","value":{"rev":"25-6df0283eb6e419bc3a1571f17721b100"}}, -{"id":"bitcoinjs-mongoose","key":"bitcoinjs-mongoose","value":{"rev":"3-57e239b31e218693f8cf3cf1cf098437"}}, -{"id":"bitly","key":"bitly","value":{"rev":"8-d6bfac8338e223fe62538954d2e9246a"}}, -{"id":"bitly.node","key":"bitly.node","value":{"rev":"3-15329b7a77633e0dae2c720e592420fb"}}, -{"id":"biwascheme","key":"biwascheme","value":{"rev":"3-37a85eed1bd2d4ee85ef1e100e7ebe8f"}}, -{"id":"black","key":"black","value":{"rev":"3-e07ae2273357da5894f4b7cdf1b20560"}}, -{"id":"black_coffee","key":"black_coffee","value":{"rev":"3-c5c764cf550ad3c831a085509f64cdfb"}}, -{"id":"bleach","key":"bleach","value":{"rev":"5-ef3ab7e761a6903eb70da1550a07e53d"}}, -{"id":"blend","key":"blend","value":{"rev":"16-c5dd075b3ede45f91056b4b768b2bfe8"}}, -{"id":"bless","key":"bless","value":{"rev":"29-1b9bc6f17acd144f51a297e4bdccfe0e"}}, -{"id":"blitz","key":"blitz","value":{"rev":"5-8bf6786f6fd7dbc0570ba21f803f35e6"}}, -{"id":"blo","key":"blo","value":{"rev":"5-9e752ea37438ea026e88a7aa7e7a91ba"}}, -{"id":"blog","key":"blog","value":{"rev":"13-80fc7b11d73e23ca7e518d271d1836ee"}}, -{"id":"blogmate","key":"blogmate","value":{"rev":"11-e503081be9290647c841aa8c04eb6e70"}}, -{"id":"bloodmoney","key":"bloodmoney","value":{"rev":"3-859b0235de3a29bf241323a31f9aa730"}}, -{"id":"bloom","key":"bloom","value":{"rev":"15-c609882b29d61a771d7dbf17f43016ad"}}, -{"id":"blue","key":"blue","value":{"rev":"6-e84221f7286dffbfda6f8abc6306064c"}}, -{"id":"bluemold","key":"bluemold","value":{"rev":"11-f48528b642b5d38d7c02b03622117fa7"}}, -{"id":"bn-lang","key":"bn-lang","value":{"rev":"3-266f186334f69448a940081589e82b04"}}, -{"id":"bn-lang-util","key":"bn-lang-util","value":{"rev":"3-0bc44f1d7d3746120dd835bfb685e229"}}, -{"id":"bn-log","key":"bn-log","value":{"rev":"5-db81a8a978071efd24b45e350e8b8954"}}, -{"id":"bn-template","key":"bn-template","value":{"rev":"3-604e77465ab1dc7e17f3b325089651ec"}}, -{"id":"bn-time","key":"bn-time","value":{"rev":"3-9c33587e783a98e1ccea409cacd5bbfb"}}, -{"id":"bn-unit","key":"bn-unit","value":{"rev":"3-5f35e3fd446241f682231bedcf846c0a"}}, -{"id":"bncode","key":"bncode","value":{"rev":"7-915a1759135a9837954c0ead58bf8e5a"}}, -{"id":"bnf","key":"bnf","value":{"rev":"5-4fe80fcafcc7a263f28b8dc62093bd8d"}}, -{"id":"bob","key":"bob","value":{"rev":"9-9ceeb581263c04793a2231b3726ab22b"}}, -{"id":"bogart","key":"bogart","value":{"rev":"30-70aed6f0827d2bd09963afddcad7a34a"}}, -{"id":"boil","key":"boil","value":{"rev":"3-7ab0fc3b831c591fd15711c27a6f5de0"}}, -{"id":"bolt","key":"bolt","value":{"rev":"3-138dfbdea2ab53ca714ca51494d32610"}}, -{"id":"bones","key":"bones","value":{"rev":"70-c74f0845c167cd755250fc7b4b9b40c2"}}, -{"id":"bones-admin","key":"bones-admin","value":{"rev":"11-2cdfe738d66aacff8569712a279c041d"}}, -{"id":"bones-auth","key":"bones-auth","value":{"rev":"35-2224f95bf3521809ce805ff215d2856c"}}, -{"id":"bones-document","key":"bones-document","value":{"rev":"13-95971fed1f47005c282e0fa60498e31c"}}, -{"id":"bonsai","key":"bonsai","value":{"rev":"3-67eb8935492d4ae9182a7ec74c1f36a6"}}, -{"id":"bonzo","key":"bonzo","value":{"rev":"142-7c5680b0f841c2263f06e96eb5237825"}}, -{"id":"bookbu","key":"bookbu","value":{"rev":"3-d9a104bccc67eae8a5dc6f0f4c3ba5fc"}}, -{"id":"bootstrap","key":"bootstrap","value":{"rev":"17-7a62dbe5e3323beb47165f13265f1a96"}}, -{"id":"borschik","key":"borschik","value":{"rev":"7-2570b5d6555a031394a55ff054797cb9"}}, -{"id":"bots","key":"bots","value":{"rev":"9-df43539c13d2996d9e32dff848615e8a"}}, -{"id":"bounce","key":"bounce","value":{"rev":"8-a3e424b2be1379743e9628c726facaa8"}}, -{"id":"bowser","key":"bowser","value":{"rev":"11-23ecc98edf5fde63fda626bb03da597f"}}, -{"id":"box2d","key":"box2d","value":{"rev":"6-5c920e9829764cbf904b9a59474c1672"}}, -{"id":"box2dnode","key":"box2dnode","value":{"rev":"3-12ffe24dcc1478ea0008c60c4ef7118f"}}, -{"id":"boxcar","key":"boxcar","value":{"rev":"5-a9ba953c547585285559d0e05c16e29e"}}, -{"id":"boxer","key":"boxer","value":{"rev":"8-60c49ff8574d5a47616796ad991463ad"}}, -{"id":"bracket-matcher","key":"bracket-matcher","value":{"rev":"27-a01c946c69665629e212a0f702be1b38"}}, -{"id":"brain","key":"brain","value":{"rev":"24-3aba33914e0f823505c69ef01361681b"}}, -{"id":"brainfuck","key":"brainfuck","value":{"rev":"7-adf33477ffe8640c9fdd6a0f8b349953"}}, -{"id":"brains","key":"brains","value":{"rev":"3-d7e7a95ea742f9b42fefb594c67c726a"}}, -{"id":"braintree","key":"braintree","value":{"rev":"14-eabe1c3e4e7cfd1f521f4bfd337611f7"}}, -{"id":"brazilnut","key":"brazilnut","value":{"rev":"3-4163b5a5598a8905c1283db9d260e5cc"}}, -{"id":"brazln","key":"brazln","value":{"rev":"29-15895bb5b193552826c196efe084caf2"}}, -{"id":"bread","key":"bread","value":{"rev":"9-093c9dd71fffb9a5b1c9eb8ac3e2a9b0"}}, -{"id":"breakfast","key":"breakfast","value":{"rev":"3-231e3046ede5e35e272dfab4a379015d"}}, -{"id":"brequire","key":"brequire","value":{"rev":"18-58b386e08541b222238aa12a13119fd9"}}, -{"id":"bricks","key":"bricks","value":{"rev":"15-f72e6c858c5bceb00cc34a16d52a7b59"}}, -{"id":"bricks-analytics","key":"bricks-analytics","value":{"rev":"3-dc2b6d2157c5039a4c36ceda46761b37"}}, -{"id":"bricks-compress","key":"bricks-compress","value":{"rev":"5-580eeecaa30c210502f42c5e184344a3"}}, -{"id":"bricks-rewrite","key":"bricks-rewrite","value":{"rev":"5-7a141aacaa3fd706b97847c6e8f9830a"}}, -{"id":"brokenbin","key":"brokenbin","value":{"rev":"5-bbc7a1c9628ed9f49b6d23e80c242852"}}, -{"id":"broker","key":"broker","value":{"rev":"9-756a097b948756e4bd7609b6f83a0847"}}, -{"id":"browscap","key":"browscap","value":{"rev":"12-c6fed16796d1ad84913f2617c66f0c7b"}}, -{"id":"browser-require","key":"browser-require","value":{"rev":"27-99f61fb3036ebc643282625649cc674f"}}, -{"id":"browserify","key":"browserify","value":{"rev":"163-c307ee153caf2160e5c32abd58898139"}}, -{"id":"browserjet","key":"browserjet","value":{"rev":"3-a386ab8911c410362eb8fceab5a998fe"}}, -{"id":"brt","key":"brt","value":{"rev":"3-b8452659a92039571ff1f877c8f874c7"}}, -{"id":"brunch","key":"brunch","value":{"rev":"113-64ae44857425c5d860d36f38ab3cf797"}}, -{"id":"brushes.js","key":"brushes.js","value":{"rev":"3-e28bd6597b949d84965a788928738f53"}}, -{"id":"bson","key":"bson","value":{"rev":"50-9d9db515dd9d2a4d873d186f324767a5"}}, -{"id":"btc-ex-api","key":"btc-ex-api","value":{"rev":"3-cabbf284cb01af79ee183d8023106762"}}, -{"id":"btoa","key":"btoa","value":{"rev":"3-b4a124b3650a746b8da9c9f93f386bac"}}, -{"id":"btoa-atob","key":"btoa-atob","value":{"rev":"3-baac60a3f04487333cc0364301220a53"}}, -{"id":"bucket","key":"bucket","value":{"rev":"3-5c2da8f67e29de1c29adbf51ad7d7299"}}, -{"id":"buffalo","key":"buffalo","value":{"rev":"9-6c763d939d775a255c65ba8dcf0d5372"}}, -{"id":"bufferjs","key":"bufferjs","value":{"rev":"13-b6e09e35ec822714d3ec485ac2010272"}}, -{"id":"bufferlib","key":"bufferlib","value":{"rev":"16-d48d96815fc7709d6b7d0a8bfc67f053"}}, -{"id":"bufferlist","key":"bufferlist","value":{"rev":"18-6fcedc10ffbca1afdc866e208d2f906a"}}, -{"id":"buffers","key":"buffers","value":{"rev":"11-3a70ec2da112befdc65b8c02772b8c44"}}, -{"id":"bufferstream","key":"bufferstream","value":{"rev":"82-6f82c5affb3906ebbaa0b116baf73c54"}}, -{"id":"buffertools","key":"buffertools","value":{"rev":"20-68f90e224f81fab81295f9079dc3c0fc"}}, -{"id":"buffoon","key":"buffoon","value":{"rev":"9-1cdc1cbced94691e836d4266eed7c143"}}, -{"id":"builder","key":"builder","value":{"rev":"25-b9679e2aaffec1ac6d59fdd259d9590c"}}, -{"id":"buildr","key":"buildr","value":{"rev":"69-cb3a756903a6322c6f9f4dd1c384a607"}}, -{"id":"bumper","key":"bumper","value":{"rev":"3-1e8d17aa3b29815e4069294cc9ce572c"}}, -{"id":"bundle","key":"bundle","value":{"rev":"39-46fde9cd841bce1fbdd92f6a1235c308"}}, -{"id":"bunker","key":"bunker","value":{"rev":"7-ed993a296fa0b8d3c3a7cd759d6f371e"}}, -{"id":"burari","key":"burari","value":{"rev":"11-08b61073d6ad0ef0c7449a574dc8f54b"}}, -{"id":"burrito","key":"burrito","value":{"rev":"38-3f3b109972720647f5412f3a2478859b"}}, -{"id":"busbuddy","key":"busbuddy","value":{"rev":"5-298ec29f6307351cf7a19bceebe957c7"}}, -{"id":"buster","key":"buster","value":{"rev":"9-870a6e9638806adde2f40105900cd4b3"}}, -{"id":"buster-args","key":"buster-args","value":{"rev":"7-9b189c602e437a505625dbf7fef5dead"}}, -{"id":"buster-assertions","key":"buster-assertions","value":{"rev":"5-fa34a8a5e7cf4dd08c2d02c39de3b563"}}, -{"id":"buster-cli","key":"buster-cli","value":{"rev":"5-b1a85006e41dbf74313253c571e63874"}}, -{"id":"buster-client","key":"buster-client","value":{"rev":"5-340637ec63b54bb01c1313a78db01945"}}, -{"id":"buster-configuration","key":"buster-configuration","value":{"rev":"3-a12e7ff172562b513534fc26be00aaed"}}, -{"id":"buster-core","key":"buster-core","value":{"rev":"5-871df160645e6684111a8fd02ff0eee9"}}, -{"id":"buster-evented-logger","key":"buster-evented-logger","value":{"rev":"5-c46681e6275a76723e3bc834555dbe32"}}, -{"id":"buster-format","key":"buster-format","value":{"rev":"5-e193e90436c7f941739b82adad86bdd8"}}, -{"id":"buster-module-loader","key":"buster-module-loader","value":{"rev":"5-4148b61f8b718e6181aa6054664a7c44"}}, -{"id":"buster-multicast","key":"buster-multicast","value":{"rev":"3-79480b5be761d243b274cb1e77375afc"}}, -{"id":"buster-promise","key":"buster-promise","value":{"rev":"5-b50030957fbd70e65576faa9c541b739"}}, -{"id":"buster-script-loader","key":"buster-script-loader","value":{"rev":"3-85af28b5bc4e647f27514fede19a144e"}}, -{"id":"buster-server","key":"buster-server","value":{"rev":"7-57b8b43047504818322018d2bbfee1f1"}}, -{"id":"buster-static","key":"buster-static","value":{"rev":"3-018c89d1524f7823934087f18dab9047"}}, -{"id":"buster-terminal","key":"buster-terminal","value":{"rev":"5-2c54c30ffa4a2d4b061e4c38e6b9b0e7"}}, -{"id":"buster-test","key":"buster-test","value":{"rev":"5-f7ee9c9f3b379e0ad5aa03d07581ad6f"}}, -{"id":"buster-test-cli","key":"buster-test-cli","value":{"rev":"9-c207974d20e95029cad5fa4c9435d152"}}, -{"id":"buster-user-agent-parser","key":"buster-user-agent-parser","value":{"rev":"5-7883085a203b3047b28ad08361219d1d"}}, -{"id":"buster-util","key":"buster-util","value":{"rev":"3-81977275a9c467ad79bb7e3f2b1caaa8"}}, -{"id":"butler","key":"butler","value":{"rev":"7-c964c4d213da6b0de2492ee57514d0f8"}}, -{"id":"byline","key":"byline","value":{"rev":"9-0b236ed5986c20136c0d581a244d52ac"}}, -{"id":"bz","key":"bz","value":{"rev":"7-d2a463b259c4e09dc9a79ddee9575ca0"}}, -{"id":"c2dm","key":"c2dm","value":{"rev":"11-a1e6a6643506bed3e1443155706aa5fe"}}, -{"id":"cabin","key":"cabin","value":{"rev":"7-df81ef56f0bb085d381c36600496dc57"}}, -{"id":"caboose","key":"caboose","value":{"rev":"49-7226441f91b63fb5c3ac240bd99d142a"}}, -{"id":"caboose-authentication","key":"caboose-authentication","value":{"rev":"3-9c71a9d7315fdea7d5f52fe52ecef118"}}, -{"id":"caboose-model","key":"caboose-model","value":{"rev":"3-967426d5acb8bb70e133f0052075dc1b"}}, -{"id":"cache2file","key":"cache2file","value":{"rev":"17-ac9caec611a38e1752d91f8cc80cfb04"}}, -{"id":"caching","key":"caching","value":{"rev":"11-06041aaaa46b63ed36843685cac63245"}}, -{"id":"calais","key":"calais","value":{"rev":"11-f8ac2064ca45dd5b7db7ea099cd61dfb"}}, -{"id":"calc","key":"calc","value":{"rev":"3-bead9c5b0bee34e44e7c04aa2bf9cd68"}}, -{"id":"calipso","key":"calipso","value":{"rev":"87-b562676045a66a3ec702591c67a9635e"}}, -{"id":"caman","key":"caman","value":{"rev":"15-4b97c73f0ac101c68335de2937483893"}}, -{"id":"camanjs","key":"camanjs","value":{"rev":"3-2856bbdf7a1d454929b4a80b119e3da0"}}, -{"id":"camelot","key":"camelot","value":{"rev":"7-8e257c5213861ecbd229ee737a3a8bb4"}}, -{"id":"campusbooks","key":"campusbooks","value":{"rev":"18-489be33c6ac2d6cbcf93355f2b129389"}}, -{"id":"canvas","key":"canvas","value":{"rev":"78-27dbf5b6e0a25ba5886d485fd897d701"}}, -{"id":"canvasutil","key":"canvasutil","value":{"rev":"7-0b87a370d673886efb7763aaf500b744"}}, -{"id":"capoo","key":"capoo","value":{"rev":"9-136a3ddf489228d5f4b504b1da619447"}}, -{"id":"capsule","key":"capsule","value":{"rev":"19-ad3c9ba0af71a84228e6dd360017f379"}}, -{"id":"capt","key":"capt","value":{"rev":"13-0805d789000fb2e361103a5e62379196"}}, -{"id":"carena","key":"carena","value":{"rev":"10-d38e8c336a0dbb8091514f638b22b96b"}}, -{"id":"carrier","key":"carrier","value":{"rev":"20-b2b4a0560d40eeac617000e9e22a9e9d"}}, -{"id":"cart","key":"cart","value":{"rev":"12-493e79c6fa0b099626e90da79a69f1e5"}}, -{"id":"carto","key":"carto","value":{"rev":"45-8eab07e2fac57396dd62af5805062387"}}, -{"id":"caruso","key":"caruso","value":{"rev":"5-d58e22212b0bcebbab4b42adc68799aa"}}, -{"id":"cas","key":"cas","value":{"rev":"3-82a93160eb9add99bde1599e55d18fd8"}}, -{"id":"cas-auth","key":"cas-auth","value":{"rev":"3-b02f77c198050b99f1df18f637e77c10"}}, -{"id":"cas-client","key":"cas-client","value":{"rev":"3-ca69e32a3053bc680d1dddc57271483b"}}, -{"id":"cashew","key":"cashew","value":{"rev":"7-9e81cde34263adad6949875c4b33ee99"}}, -{"id":"cassandra","key":"cassandra","value":{"rev":"3-8617ef73fdc73d02ecec74d31f98e463"}}, -{"id":"cassandra-client","key":"cassandra-client","value":{"rev":"19-aa1aef5d203be5b0eac678284f1a979f"}}, -{"id":"casset","key":"casset","value":{"rev":"3-2052c7feb5b89c77aaa279c8b50126ce"}}, -{"id":"castaneum","key":"castaneum","value":{"rev":"26-4dc55ba2482cca4230b4bc77ecb5b70d"}}, -{"id":"cat","key":"cat","value":{"rev":"3-75f20119b363b85c1a8433e26b86c943"}}, -{"id":"catchjs","key":"catchjs","value":{"rev":"3-ffda7eff7613de37f629dc7a831ffda1"}}, -{"id":"caterpillar","key":"caterpillar","value":{"rev":"5-bc003e3af33240e67b4c3042f308b7da"}}, -{"id":"causeeffect","key":"causeeffect","value":{"rev":"9-7e4e25bff656170c97cb0cce1b2ab6ca"}}, -{"id":"cayenne","key":"cayenne","value":{"rev":"5-2797f561467b41cc45804e5498917800"}}, -{"id":"ccn4bnode","key":"ccn4bnode","value":{"rev":"17-96f55189e5c98f0fa8200e403a04eb39"}}, -{"id":"ccnq3_config","key":"ccnq3_config","value":{"rev":"21-40345771769a9cadff4af9113b8124c2"}}, -{"id":"ccnq3_logger","key":"ccnq3_logger","value":{"rev":"5-4aa168dc24425938a29cf9ac456158d7"}}, -{"id":"ccnq3_portal","key":"ccnq3_portal","value":{"rev":"17-84e629ec1eaba1722327ccb9dddb05cf"}}, -{"id":"ccnq3_roles","key":"ccnq3_roles","value":{"rev":"43-97de74b08b1af103da8905533a84b749"}}, -{"id":"ccss","key":"ccss","value":{"rev":"11-b9beb506410ea81581ba4c7dfe9b2a7d"}}, -{"id":"cdb","key":"cdb","value":{"rev":"13-d7b6f609f069dc738912b405aac558ab"}}, -{"id":"cdb_changes","key":"cdb_changes","value":{"rev":"13-1dc99b096cb91c276332b651396789e8"}}, -{"id":"celeri","key":"celeri","value":{"rev":"17-b19294619ef6c2056f3bf6641e8945c2"}}, -{"id":"celery","key":"celery","value":{"rev":"5-bdfccd483cf30c4c10c5ec0963de1248"}}, -{"id":"cempl8","key":"cempl8","value":{"rev":"21-bb9547b78a1548fe11dc1d5b816b6da1"}}, -{"id":"cfg","key":"cfg","value":{"rev":"3-85c7651bb8f16b057e60a46946eb95af"}}, -{"id":"cgi","key":"cgi","value":{"rev":"17-7ceac458c7f141d4fbbf05d267a72aa8"}}, -{"id":"chain","key":"chain","value":{"rev":"9-b0f175c5ad0173bcb7e11e58b02a7394"}}, -{"id":"chain-gang","key":"chain-gang","value":{"rev":"22-b0e6841a344b65530ea2a83a038e5aa6"}}, -{"id":"chainer","key":"chainer","value":{"rev":"15-8c6a565035225a1dcca0177e92ccf42d"}}, -{"id":"chainify","key":"chainify","value":{"rev":"3-0926790f18a0016a9943cfb4830e0187"}}, -{"id":"chains","key":"chains","value":{"rev":"5-d9e1ac38056e2638e38d9a7c415929c6"}}, -{"id":"chainsaw","key":"chainsaw","value":{"rev":"24-82e078efbbc59f798d29a0259481012e"}}, -{"id":"changelog","key":"changelog","value":{"rev":"27-317e473de0bf596b273a9dadecea126d"}}, -{"id":"channel-server","key":"channel-server","value":{"rev":"3-3c882f7e61686e8a124b5198c638a18e"}}, -{"id":"channels","key":"channels","value":{"rev":"5-0b532f054886d9094cb98493ee0a7a16"}}, -{"id":"chaos","key":"chaos","value":{"rev":"40-7caa4459d398f5ec30fea91d087f0d71"}}, -{"id":"chard","key":"chard","value":{"rev":"3-f2de35f7a390ea86ac0eb78bf720d0de"}}, -{"id":"charenc","key":"charenc","value":{"rev":"3-092036302311a8f5779b800c98170b5b"}}, -{"id":"chargify","key":"chargify","value":{"rev":"5-e3f29f2816b04c26ca047d345928e2c1"}}, -{"id":"charm","key":"charm","value":{"rev":"13-3e7e7b5babc1efc472e3ce62eec2c0c7"}}, -{"id":"chat-server","key":"chat-server","value":{"rev":"7-c73b785372474e083fb8f3e9690761da"}}, -{"id":"chatroom","key":"chatroom","value":{"rev":"3-f4fa8330b7eb277d11407f968bffb6a2"}}, -{"id":"chatspire","key":"chatspire","value":{"rev":"3-081e167e3f7c1982ab1b7fc3679cb87c"}}, -{"id":"checkip","key":"checkip","value":{"rev":"3-b31d58a160a4a3fe2f14cfbf2217949e"}}, -{"id":"cheddar-getter","key":"cheddar-getter","value":{"rev":"3-d675ec138ea704df127fabab6a52a8dc"}}, -{"id":"chess","key":"chess","value":{"rev":"3-8b15268c8b0fb500dcbc83b259e7fb88"}}, -{"id":"chessathome-worker","key":"chessathome-worker","value":{"rev":"7-cdfd411554c35ba7a52e54f7744bed35"}}, -{"id":"chirkut.js","key":"chirkut.js","value":{"rev":"3-c0e515eee0f719c5261a43e692a3585c"}}, -{"id":"chiron","key":"chiron","value":{"rev":"6-ccb575e432c1c1981fc34b4e27329c85"}}, -{"id":"chopper","key":"chopper","value":{"rev":"5-168681c58c2a50796676dea73dc5398b"}}, -{"id":"choreographer","key":"choreographer","value":{"rev":"14-b0159823becdf0b4552967293968b2a8"}}, -{"id":"chromic","key":"chromic","value":{"rev":"3-c4ca0bb1f951db96c727241092afa9cd"}}, -{"id":"chrono","key":"chrono","value":{"rev":"9-6399d715df1a2f4696f89f2ab5d4d83a"}}, -{"id":"chuck","key":"chuck","value":{"rev":"3-71f2ee071d4b6fb2af3b8b828c51d8ab"}}, -{"id":"chunkedstream","key":"chunkedstream","value":{"rev":"3-b145ed7d1abd94ac44343413e4f823e7"}}, -{"id":"cider","key":"cider","value":{"rev":"10-dc20cd3eac9470e96911dcf75ac6492b"}}, -{"id":"cinch","key":"cinch","value":{"rev":"5-086af7f72caefb57284e4101cbe3c905"}}, -{"id":"cipherpipe","key":"cipherpipe","value":{"rev":"5-0b5590f808415a7297de6d45947d911f"}}, -{"id":"cjson","key":"cjson","value":{"rev":"25-02e3d327b48e77dc0f9e070ce9454ac2"}}, -{"id":"ck","key":"ck","value":{"rev":"3-f482385f5392a49353d8ba5eb9c7afef"}}, -{"id":"ckup","key":"ckup","value":{"rev":"26-90a76ec0cdf951dc2ea6058098407ee2"}}, -{"id":"class","key":"class","value":{"rev":"6-e2805f7d87586a66fb5fd170cf74b3b0"}}, -{"id":"class-42","key":"class-42","value":{"rev":"3-14c988567a2c78a857f15c9661bd6430"}}, -{"id":"class-js","key":"class-js","value":{"rev":"5-792fd04288a651dad87bc47eb91c2042"}}, -{"id":"classify","key":"classify","value":{"rev":"23-35eb336c350446f5ed49069df151dbb7"}}, -{"id":"clean-css","key":"clean-css","value":{"rev":"13-e30ea1007f6c5bb49e07276228b8a960"}}, -{"id":"clearInterval","key":"clearInterval","value":{"rev":"3-a49fa235d3dc14d28a3d15f8db291986"}}, -{"id":"clearTimeout","key":"clearTimeout","value":{"rev":"3-e838bd25adc825112922913c1a35b934"}}, -{"id":"cli","key":"cli","value":{"rev":"65-9e79c37c12d21b9b9114093de0773c54"}}, -{"id":"cli-color","key":"cli-color","value":{"rev":"9-0a8e775e713b1351f6a6648748dd16ec"}}, -{"id":"cli-table","key":"cli-table","value":{"rev":"3-9e447a8bb392fb7d9c534445a650e328"}}, -{"id":"clickatell","key":"clickatell","value":{"rev":"3-31f1a66d08a789976919df0c9280de88"}}, -{"id":"clicktime","key":"clicktime","value":{"rev":"9-697a99f5f704bfebbb454df47c9c472a"}}, -{"id":"clientexpress","key":"clientexpress","value":{"rev":"3-9b07041cd7b0c3967c4625ac74c9b50c"}}, -{"id":"cliff","key":"cliff","value":{"rev":"15-ef9ef25dbad08c0e346388522d94c5c3"}}, -{"id":"clip","key":"clip","value":{"rev":"21-c3936e566feebfe0beddb0bbb686c00d"}}, -{"id":"clock","key":"clock","value":{"rev":"5-19bc51841d41408b4446c0862487dc5e"}}, -{"id":"clog","key":"clog","value":{"rev":"5-1610fe2c0f435d2694a1707ee15cd11e"}}, -{"id":"clone","key":"clone","value":{"rev":"11-099d07f38381b54902c4cf5b93671ed4"}}, -{"id":"closure","key":"closure","value":{"rev":"7-9c2ac6b6ec9f14d12d10bfbfad58ec14"}}, -{"id":"closure-compiler","key":"closure-compiler","value":{"rev":"8-b3d2f9e3287dd33094a35d797d6beaf2"}}, -{"id":"cloud","key":"cloud","value":{"rev":"27-407c7aa77d3d4a6cc903d18b383de8b8"}}, -{"id":"cloud9","key":"cloud9","value":{"rev":"71-4af631e3fa2eb28058cb0d18ef3a6a3e"}}, -{"id":"cloudcontrol","key":"cloudcontrol","value":{"rev":"15-2df57385aa9bd92f7ed81e6892e23696"}}, -{"id":"cloudfiles","key":"cloudfiles","value":{"rev":"30-01f84ebda1d8f151b3e467590329960c"}}, -{"id":"cloudfoundry","key":"cloudfoundry","value":{"rev":"3-66fafd3d6b1353b1699d35e634686ab6"}}, -{"id":"cloudmailin","key":"cloudmailin","value":{"rev":"3-a4e3e4d457f5a18261bb8df145cfb418"}}, -{"id":"cloudnode-cli","key":"cloudnode-cli","value":{"rev":"17-3a80f7855ce618f7aee68bd693ed485b"}}, -{"id":"cloudservers","key":"cloudservers","value":{"rev":"42-6bc34f7e34f84a24078b43a609e96c59"}}, -{"id":"clucene","key":"clucene","value":{"rev":"37-3d613f12a857b8fe22fbf420bcca0dc3"}}, -{"id":"cluster","key":"cluster","value":{"rev":"83-63fb7a468d95502f94ea45208ba0a890"}}, -{"id":"cluster-isolatable","key":"cluster-isolatable","value":{"rev":"5-6af883cea9ab1c90bb126d8b3be2d156"}}, -{"id":"cluster-live","key":"cluster-live","value":{"rev":"7-549d19e9727f460c7de48f93b92e9bb3"}}, -{"id":"cluster-log","key":"cluster-log","value":{"rev":"7-9c47854df8ec911e679743185668a5f7"}}, -{"id":"cluster-loggly","key":"cluster-loggly","value":{"rev":"3-e1f7e331282d7b8317ce55e0fce7f934"}}, -{"id":"cluster-mail","key":"cluster-mail","value":{"rev":"9-dc18c5c1b2b265f3d531b92467b6cc35"}}, -{"id":"cluster-responsetimes","key":"cluster-responsetimes","value":{"rev":"3-c9e16daee15eb84910493264e973275c"}}, -{"id":"cluster-socket.io","key":"cluster-socket.io","value":{"rev":"7-29032f0b42575e9fe183a0af92191132"}}, -{"id":"cluster.exception","key":"cluster.exception","value":{"rev":"3-10856526e2f61e3000d62b12abd750e3"}}, -{"id":"clutch","key":"clutch","value":{"rev":"8-50283f7263c430cdd1d293c033571012"}}, -{"id":"cm1-route","key":"cm1-route","value":{"rev":"13-40e72b5a4277b500c98c966bcd2a8a86"}}, -{"id":"cmd","key":"cmd","value":{"rev":"9-9168fcd96fb1ba9449050162023f3570"}}, -{"id":"cmdopt","key":"cmdopt","value":{"rev":"3-85677533e299bf195e78942929cf9839"}}, -{"id":"cmp","key":"cmp","value":{"rev":"5-b10f873b78eb64e406fe55bd001ae0fa"}}, -{"id":"cmudict","key":"cmudict","value":{"rev":"3-cd028380bba917d5ed2be7a8d3b3b0b7"}}, -{"id":"cnlogger","key":"cnlogger","value":{"rev":"9-dbe7e0e50d25ca5ae939fe999c3c562b"}}, -{"id":"coa","key":"coa","value":{"rev":"11-ff4e634fbebd3f80b9461ebe58b3f64e"}}, -{"id":"cobra","key":"cobra","value":{"rev":"5-a3e0963830d350f4a7e91b438caf9117"}}, -{"id":"cockpit","key":"cockpit","value":{"rev":"3-1757b37245ee990999e4456b9a6b963e"}}, -{"id":"coco","key":"coco","value":{"rev":"104-eabc4d7096295c2156144a7581d89b35"}}, -{"id":"cocos2d","key":"cocos2d","value":{"rev":"19-88a5c75ceb6e7667665c056d174f5f1a"}}, -{"id":"codem-transcode","key":"codem-transcode","value":{"rev":"9-1faa2657d53271ccc44cce27de723e99"}}, -{"id":"codepad","key":"codepad","value":{"rev":"5-094ddce74dc057dc0a4d423d6d2fbc3a"}}, -{"id":"codetube","key":"codetube","value":{"rev":"3-819794145f199330e724864db70da53b"}}, -{"id":"coerce","key":"coerce","value":{"rev":"3-e7d392d497c0b8491b89fcbbd1a5a89f"}}, -{"id":"coffee-conf","key":"coffee-conf","value":{"rev":"3-883bc4767d70810ece2fdf1ccae883de"}}, -{"id":"coffee-css","key":"coffee-css","value":{"rev":"11-66ca197173751389b24945f020f198f9"}}, -{"id":"coffee-echonest","key":"coffee-echonest","value":{"rev":"3-3cd0e2b77103e334eccf6cf4168f39b2"}}, -{"id":"coffee-machine","key":"coffee-machine","value":{"rev":"9-02deb4d27fd5d56002ead122e9bb213e"}}, -{"id":"coffee-new","key":"coffee-new","value":{"rev":"67-0664b0f289030c38d113070fd26f4f71"}}, -{"id":"coffee-resque","key":"coffee-resque","value":{"rev":"22-5b022809317d3a873be900f1a697c5eb"}}, -{"id":"coffee-resque-retry","key":"coffee-resque-retry","value":{"rev":"29-1fb64819a4a21ebb4d774d9d4108e419"}}, -{"id":"coffee-revup","key":"coffee-revup","value":{"rev":"3-23aafa258bcdcf2bb68d143d61383551"}}, -{"id":"coffee-script","key":"coffee-script","value":{"rev":"60-a6c3739655f43953bd86283776586b95"}}, -{"id":"coffee-son","key":"coffee-son","value":{"rev":"3-84a81e7e24c8cb23293940fc1b87adfe"}}, -{"id":"coffee-toaster","key":"coffee-toaster","value":{"rev":"17-d43d7276c08b526c229c78b7d5acd6cc"}}, -{"id":"coffee-watcher","key":"coffee-watcher","value":{"rev":"3-3d861a748f0928c789cbdb8ff62b6091"}}, -{"id":"coffee-world","key":"coffee-world","value":{"rev":"15-46dc320f94fa64c39e183224ec59f47a"}}, -{"id":"coffee4clients","key":"coffee4clients","value":{"rev":"15-58fba7dd10bced0411cfe546b9336145"}}, -{"id":"coffeeapp","key":"coffeeapp","value":{"rev":"48-bece0a26b78afc18cd37d577f90369d9"}}, -{"id":"coffeebot","key":"coffeebot","value":{"rev":"3-a9007053f25a4c13b324f0ac7066803e"}}, -{"id":"coffeedoc","key":"coffeedoc","value":{"rev":"21-a955faafafd10375baf3101ad2c142d0"}}, -{"id":"coffeegrinder","key":"coffeegrinder","value":{"rev":"9-6e725aad7fd39cd38f41c743ef8a7563"}}, -{"id":"coffeekup","key":"coffeekup","value":{"rev":"35-9b1eecdb7b13d3e75cdc7b1045cf910a"}}, -{"id":"coffeemaker","key":"coffeemaker","value":{"rev":"9-4c5e665aa2a5b4efa2b7d077d0a4f9c1"}}, -{"id":"coffeemate","key":"coffeemate","value":{"rev":"71-03d0221fb495f2dc6732009884027b47"}}, -{"id":"coffeepack","key":"coffeepack","value":{"rev":"3-bbf0e27cb4865392164e7ab33f131d58"}}, -{"id":"coffeeq","key":"coffeeq","value":{"rev":"9-4e38e9742a0b9d7b308565729fbfd123"}}, -{"id":"coffeescript-growl","key":"coffeescript-growl","value":{"rev":"7-2bc1f93c4aad5fa8fb4bcfd1b3ecc279"}}, -{"id":"coffeescript-notify","key":"coffeescript-notify","value":{"rev":"3-8aeb31f8e892d3fefa421ff28a1b3de9"}}, -{"id":"collectd","key":"collectd","value":{"rev":"5-3d4c84b0363aa9c078157d82695557a1"}}, -{"id":"collection","key":"collection","value":{"rev":"3-a47e1fe91b9eebb3e75954e350ec2ca3"}}, -{"id":"collection_functions","key":"collection_functions","value":{"rev":"3-7366c721008062373ec924a409415189"}}, -{"id":"collections","key":"collections","value":{"rev":"3-0237a40d08a0da36c2dd01ce73a89bb2"}}, -{"id":"color","key":"color","value":{"rev":"15-4898b2cd9744feb3249ba10828c186f8"}}, -{"id":"color-convert","key":"color-convert","value":{"rev":"7-2ccb47c7f07a47286d9a2f39383d28f0"}}, -{"id":"color-string","key":"color-string","value":{"rev":"5-9a6336f420e001e301a15b88b0103696"}}, -{"id":"colorize","key":"colorize","value":{"rev":"3-ff380385edacc0c46e4c7b5c05302576"}}, -{"id":"colors","key":"colors","value":{"rev":"8-7c7fb9c5af038c978f0868c7706fe145"}}, -{"id":"colour-extractor","key":"colour-extractor","value":{"rev":"3-62e96a84c6adf23f438b5aac76c7b257"}}, -{"id":"coloured","key":"coloured","value":{"rev":"8-c5295f2d5a8fc08e93d180a4e64f8d38"}}, -{"id":"coloured-log","key":"coloured-log","value":{"rev":"14-8627a3625959443acad71e2c23dfc582"}}, -{"id":"comb","key":"comb","value":{"rev":"5-7f201b621ae9a890c7f5a31867eba3e9"}}, -{"id":"combine","key":"combine","value":{"rev":"14-bed33cd4389a2e4bb826a0516c6ae307"}}, -{"id":"combined-stream","key":"combined-stream","value":{"rev":"13-678f560200ac2835b9026e9e2b955cb0"}}, -{"id":"combiner","key":"combiner","value":{"rev":"3-5e7f133c8c14958eaf9e92bd79ae8ee1"}}, -{"id":"combohandler","key":"combohandler","value":{"rev":"7-d7e1a402f0066caa6756a8866de81dd9"}}, -{"id":"combyne","key":"combyne","value":{"rev":"23-05ebee9666a769e32600bc5548d10ce9"}}, -{"id":"comfy","key":"comfy","value":{"rev":"5-8bfe55bc16611dfe51a184b8f3eb31c1"}}, -{"id":"command-parser","key":"command-parser","value":{"rev":"5-8a5c3ed6dfa0fa55cc71b32cf52332fc"}}, -{"id":"commander","key":"commander","value":{"rev":"11-9dd16c00844d464bf66c101a57075401"}}, -{"id":"commando","key":"commando","value":{"rev":"3-e159f1890f3771dfd6e04f4d984f26f3"}}, -{"id":"common","key":"common","value":{"rev":"16-94eafcf104c0c7d1090e668ddcc12a5f"}}, -{"id":"common-exception","key":"common-exception","value":{"rev":"7-bd46358014299da814691c835548ef21"}}, -{"id":"common-node","key":"common-node","value":{"rev":"5-b2c4bef0e7022d5d453661a9c43497a8"}}, -{"id":"common-pool","key":"common-pool","value":{"rev":"5-c495fa945361ba4fdfb2ee8733d791b4"}}, -{"id":"common-utils","key":"common-utils","value":{"rev":"3-e5a047f118fc304281d2bc5e9ab18e62"}}, -{"id":"commondir","key":"commondir","value":{"rev":"3-ea49874d12eeb9adf28ca28989dfb5a9"}}, -{"id":"commonjs","key":"commonjs","value":{"rev":"6-39fcd0de1ec265890cf063effd0672e3"}}, -{"id":"commonjs-utils","key":"commonjs-utils","value":{"rev":"6-c0266a91dbd0a43effb7d30da5d9f35c"}}, -{"id":"commonkv","key":"commonkv","value":{"rev":"3-90b2fe4c79e263b044303706c4d5485a"}}, -{"id":"commons","key":"commons","value":{"rev":"6-0ecb654aa2bd17cf9519f86d354f8a50"}}, -{"id":"complete","key":"complete","value":{"rev":"7-acde8cba7677747d09c3d53ff165754e"}}, -{"id":"complex-search","key":"complex-search","value":{"rev":"5-c80b2c7f049f333bde89435f3de497ca"}}, -{"id":"compose","key":"compose","value":{"rev":"1-cf8a97d6ead3bef056d85daec5d36c70"}}, -{"id":"composer","key":"composer","value":{"rev":"6-1deb43725051f845efd4a7c8e68aa6d6"}}, -{"id":"compress","key":"compress","value":{"rev":"17-f0aacce1356f807b51e083490fb353bd"}}, -{"id":"compress-buffer","key":"compress-buffer","value":{"rev":"12-2886014c7f2541f4ddff9f0f55f4c171"}}, -{"id":"compress-ds","key":"compress-ds","value":{"rev":"5-9e4c6931edf104443353594ef50aa127"}}, -{"id":"compressor","key":"compressor","value":{"rev":"3-ee8ad155a98e1483d899ebcf82d5fb63"}}, -{"id":"concrete","key":"concrete","value":{"rev":"5-bc70bbffb7c6fe9e8c399db578fb3bae"}}, -{"id":"condo","key":"condo","value":{"rev":"9-5f03d58ee7dc29465defa3758f3b138a"}}, -{"id":"conductor","key":"conductor","value":{"rev":"8-1878afadcda7398063de6286c2d2c5c1"}}, -{"id":"conf","key":"conf","value":{"rev":"11-dcf0f6a93827d1b143cb1d0858f2be4a"}}, -{"id":"config","key":"config","value":{"rev":"37-2b741a1e6951a74b7f1de0d0547418a0"}}, -{"id":"config-loader","key":"config-loader","value":{"rev":"3-708cc96d1206de46fb450eb57ca07b0d"}}, -{"id":"configurator","key":"configurator","value":{"rev":"5-b31ad9731741d19f28241f6af5b41fee"}}, -{"id":"confu","key":"confu","value":{"rev":"7-c46f82c4aa9a17db6530b00669461eaf"}}, -{"id":"confy","key":"confy","value":{"rev":"3-893b33743830a0318dc99b1788aa92ee"}}, -{"id":"connect","key":"connect","value":{"rev":"151-8b5617fc6ece6c125b5f628936159bd6"}}, -{"id":"connect-access-control","key":"connect-access-control","value":{"rev":"3-ccf5fb09533d41eb0b564eb1caecf910"}}, -{"id":"connect-airbrake","key":"connect-airbrake","value":{"rev":"5-19db5e5828977540814d09f9eb7f028f"}}, -{"id":"connect-analytics","key":"connect-analytics","value":{"rev":"3-6f71c8b08ed9f5762c1a4425c196fb2a"}}, -{"id":"connect-app-cache","key":"connect-app-cache","value":{"rev":"27-3e69452dfe51cc907f8b188aede1bda8"}}, -{"id":"connect-assetmanager","key":"connect-assetmanager","value":{"rev":"46-f2a8834d2749e0c069cee06244e7501c"}}, -{"id":"connect-assetmanager-handlers","key":"connect-assetmanager-handlers","value":{"rev":"38-8b93821fcf46f20bbad4319fb39302c1"}}, -{"id":"connect-assets","key":"connect-assets","value":{"rev":"33-7ec2940217e29a9514d20cfd49af10f5"}}, -{"id":"connect-auth","key":"connect-auth","value":{"rev":"36-5640e82f3e2773e44ce47b0687436305"}}, -{"id":"connect-cache","key":"connect-cache","value":{"rev":"11-efe1f0ab00c181b1a4dece446ef13a90"}}, -{"id":"connect-coffee","key":"connect-coffee","value":{"rev":"3-3d4ebcfe083c9e5a5d587090f1bb4d65"}}, -{"id":"connect-conneg","key":"connect-conneg","value":{"rev":"3-bc3e04e65cf1f5233a38cc846e9a4a75"}}, -{"id":"connect-cookie-session","key":"connect-cookie-session","value":{"rev":"3-f48ca73aa1ce1111a2c962d219b59c1a"}}, -{"id":"connect-cors","key":"connect-cors","value":{"rev":"10-5bc9e3759671a0157fdc307872d38844"}}, -{"id":"connect-couchdb","key":"connect-couchdb","value":{"rev":"9-9adb6d24c7fb6de58bafe6d06fb4a230"}}, -{"id":"connect-cradle","key":"connect-cradle","value":{"rev":"5-0e5e32e00a9b98eff1ab010173d26ffb"}}, -{"id":"connect-docco","key":"connect-docco","value":{"rev":"9-c8e379f9a89db53f8921895ac4e87ed6"}}, -{"id":"connect-dojo","key":"connect-dojo","value":{"rev":"17-f323c634536b9b948ad9607f4ca0847f"}}, -{"id":"connect-esi","key":"connect-esi","value":{"rev":"45-01de7506d405856586ea77cb14022192"}}, -{"id":"connect-facebook","key":"connect-facebook","value":{"rev":"3-bf77eb01c0476e607b25bc9d93416b7e"}}, -{"id":"connect-force-domain","key":"connect-force-domain","value":{"rev":"5-a65755f93aaea8a21c7ce7dd4734dca0"}}, -{"id":"connect-form","key":"connect-form","value":{"rev":"16-fa786af79f062a05ecdf3e7cf48317e2"}}, -{"id":"connect-geoip","key":"connect-geoip","value":{"rev":"3-d87f93bcac58aa7904886a8fb6c45899"}}, -{"id":"connect-googleapps","key":"connect-googleapps","value":{"rev":"13-49c5c6c6724b21eea9a8eaae2165978d"}}, -{"id":"connect-gzip","key":"connect-gzip","value":{"rev":"7-2e1d4bb887c1ddda278fc8465ee5645b"}}, -{"id":"connect-heroku-redis","key":"connect-heroku-redis","value":{"rev":"13-92da2be67451e5f55f6fbe3672c86dc4"}}, -{"id":"connect-i18n","key":"connect-i18n","value":{"rev":"8-09d47d7c220770fc80d1b6fd87ffcd07"}}, -{"id":"connect-identity","key":"connect-identity","value":{"rev":"8-8eb9e21bbf80045e0243720955d6070f"}}, -{"id":"connect-image-resizer","key":"connect-image-resizer","value":{"rev":"7-5f82563f87145f3cc06086afe3a14a62"}}, -{"id":"connect-index","key":"connect-index","value":{"rev":"3-8b8373334079eb26c8735b39483889a0"}}, -{"id":"connect-jsonp","key":"connect-jsonp","value":{"rev":"16-9e80af455e490710f06039d3c0025840"}}, -{"id":"connect-jsonrpc","key":"connect-jsonrpc","value":{"rev":"6-6556800f0bef6ae5eb10496d751048e7"}}, -{"id":"connect-kyoto","key":"connect-kyoto","value":{"rev":"5-8f6a9e9b24d1a71c786645402f509645"}}, -{"id":"connect-less","key":"connect-less","value":{"rev":"3-461ed9a80b462b978a81d5bcee6f3665"}}, -{"id":"connect-load-balance","key":"connect-load-balance","value":{"rev":"3-e74bff5fb47d1490c05a9cc4339af347"}}, -{"id":"connect-memcached","key":"connect-memcached","value":{"rev":"3-5fc92b7f9fb5bcfb364a27e6f052bcc7"}}, -{"id":"connect-mongo","key":"connect-mongo","value":{"rev":"13-c3869bc7337b2f1ee6b9b3364993f321"}}, -{"id":"connect-mongodb","key":"connect-mongodb","value":{"rev":"30-30cb932839ce16e4e496f5a33fdd720a"}}, -{"id":"connect-mongoose","key":"connect-mongoose","value":{"rev":"3-48a5b329e4cfa885442d43bbd1d0db46"}}, -{"id":"connect-mongoose-session","key":"connect-mongoose-session","value":{"rev":"3-6692b8e1225d5cd6a2daabd61cecb1cd"}}, -{"id":"connect-mysql-session","key":"connect-mysql-session","value":{"rev":"9-930abd0279ef7f447e75c95b3e71be12"}}, -{"id":"connect-no-www","key":"connect-no-www","value":{"rev":"3-33bed7417bc8a5e8efc74ce132c33158"}}, -{"id":"connect-notifo","key":"connect-notifo","value":{"rev":"3-4681f8c5a7dfd35aee9634e809c41804"}}, -{"id":"connect-parameter-router","key":"connect-parameter-router","value":{"rev":"3-f435f06d556c208d43ef05c64bcddceb"}}, -{"id":"connect-pg","key":"connect-pg","value":{"rev":"11-d84c53d8f1c24adfc266e7a031dddf0d"}}, -{"id":"connect-proxy","key":"connect-proxy","value":{"rev":"7-a691ff57a9affeab47c54d17dbe613cb"}}, -{"id":"connect-queryparser","key":"connect-queryparser","value":{"rev":"3-bb35a7f3f75297a63bf942a63b842698"}}, -{"id":"connect-redis","key":"connect-redis","value":{"rev":"40-4faa12962b14da49380de2bb183176f9"}}, -{"id":"connect-restreamer","key":"connect-restreamer","value":{"rev":"3-08e637ca685cc63b2b4f9722c763c105"}}, -{"id":"connect-riak","key":"connect-riak","value":{"rev":"5-3268c29a54e430a3f8adb33570afafdb"}}, -{"id":"connect-rpx","key":"connect-rpx","value":{"rev":"28-acc7bb4200c1d30f359151f0a715162c"}}, -{"id":"connect-security","key":"connect-security","value":{"rev":"16-fecd20f486a8ea4d557119af5b5a2960"}}, -{"id":"connect-select","key":"connect-select","value":{"rev":"5-5ca28ec800419e4cb3e97395a6b96153"}}, -{"id":"connect-session-mongo","key":"connect-session-mongo","value":{"rev":"9-9e6a26dfbb9c13a9d6f4060a1895730a"}}, -{"id":"connect-session-redis-store","key":"connect-session-redis-store","value":{"rev":"8-fecfed6e17476eaada5cfe7740d43893"}}, -{"id":"connect-sessionvoc","key":"connect-sessionvoc","value":{"rev":"13-57b6e6ea2158e3b7136054839662ea3d"}}, -{"id":"connect-spdy","key":"connect-spdy","value":{"rev":"11-f9eefd7303295d77d317cba78d299130"}}, -{"id":"connect-sts","key":"connect-sts","value":{"rev":"9-8e3fd563c04ce14b824fc4da42efb70e"}}, -{"id":"connect-timeout","key":"connect-timeout","value":{"rev":"4-6f5f8d97480c16c7acb05fe82400bbc7"}}, -{"id":"connect-unstable","key":"connect-unstable","value":{"rev":"3-1d3a4edc52f005d8cb4d557485095314"}}, -{"id":"connect-wormhole","key":"connect-wormhole","value":{"rev":"3-f33b15acc686bd9ad0c6df716529009f"}}, -{"id":"connect-xcors","key":"connect-xcors","value":{"rev":"7-f8e1cd6805a8779bbd6bb2c1000649fb"}}, -{"id":"connect_facebook","key":"connect_facebook","value":{"rev":"3-b3001d71f619836a009c53c816ce36ed"}}, -{"id":"connect_json","key":"connect_json","value":{"rev":"3-dd0df74291f80f45b4314d56192c19c5"}}, -{"id":"connectables","key":"connectables","value":{"rev":"3-f6e9f8f13883a523b4ea6035281f541b"}}, -{"id":"conseq","key":"conseq","value":{"rev":"3-890d340704322630e7a724333f394c70"}}, -{"id":"consistent-hashing","key":"consistent-hashing","value":{"rev":"3-fcef5d4479d926560cf1bc900f746f2a"}}, -{"id":"console","key":"console","value":{"rev":"3-1e0449b07c840eeac6b536e2552844f4"}}, -{"id":"console.log","key":"console.log","value":{"rev":"9-d608afe50e732ca453365befcb87bad5"}}, -{"id":"consolemark","key":"consolemark","value":{"rev":"13-320f003fc2c3cec909ab3e9c3bce9743"}}, -{"id":"construct","key":"construct","value":{"rev":"3-75bdc809ee0572172e6acff537af7d9b"}}, -{"id":"context","key":"context","value":{"rev":"3-86b1a6a0f77ef86d4d9ccfff47ceaf6a"}}, -{"id":"contextify","key":"contextify","value":{"rev":"9-547b8019ef66e0d1c84fe00be832e750"}}, -{"id":"contract","key":"contract","value":{"rev":"3-d09e775c2c1e297b6cbbfcd5efbae3c7"}}, -{"id":"contracts","key":"contracts","value":{"rev":"13-3fd75c77e688937734f51cf97f10dd7d"}}, -{"id":"control","key":"control","value":{"rev":"31-7abf0cb81d19761f3ff59917e56ecedf"}}, -{"id":"controljs","key":"controljs","value":{"rev":"3-a8e80f93e389ca07509fa7addd6cb805"}}, -{"id":"convert","key":"convert","value":{"rev":"3-6c962b92274bcbe82b82a30806559d47"}}, -{"id":"conway","key":"conway","value":{"rev":"5-93ce24976e7dd5ba02fe4addb2b44267"}}, -{"id":"cookie","key":"cookie","value":{"rev":"14-946d98bf46e940d13ca485148b1bd609"}}, -{"id":"cookie-sessions","key":"cookie-sessions","value":{"rev":"8-4b399ac8cc4baea15f6c5e7ac94399f0"}}, -{"id":"cookiejar","key":"cookiejar","value":{"rev":"20-220b41a4c2a8f2b7b14aafece7dcc1b5"}}, -{"id":"cookies","key":"cookies","value":{"rev":"15-b3b35c32a99ed79accc724685d131d18"}}, -{"id":"cool","key":"cool","value":{"rev":"3-007d1123eb2dc52cf845d625f7ccf198"}}, -{"id":"coolmonitor","key":"coolmonitor","value":{"rev":"3-69c3779c596527f63e49c5e507dff1e1"}}, -{"id":"coop","key":"coop","value":{"rev":"9-39dee3260858cf8c079f31bdf02cea1d"}}, -{"id":"coordinator","key":"coordinator","value":{"rev":"32-9d92f2033a041d5c40f8e1018d512755"}}, -{"id":"core-utils","key":"core-utils","value":{"rev":"9-98f2412938a67d83e53e76a26b5601e0"}}, -{"id":"cornify","key":"cornify","value":{"rev":"6-6913172d09c52f9e8dc0ea19ec49972c"}}, -{"id":"corpus","key":"corpus","value":{"rev":"3-a357e7779f8d4ec020b755c71dd1e57b"}}, -{"id":"corrector","key":"corrector","value":{"rev":"3-ef3cf99fc59a581aee3590bdb8615269"}}, -{"id":"cosmos","key":"cosmos","value":{"rev":"3-3eb292c59758fb5215f22739fa9531ce"}}, -{"id":"couch-ar","key":"couch-ar","value":{"rev":"25-f106d2965ab74b25b18328ca44ca4a02"}}, -{"id":"couch-cleaner","key":"couch-cleaner","value":{"rev":"15-74e61ef98a770d76be4c7e7571d18381"}}, -{"id":"couch-client","key":"couch-client","value":{"rev":"10-94945ebd3e17f509fcc71fb6c6ef5d35"}}, -{"id":"couch-session","key":"couch-session","value":{"rev":"4-c73dea41ceed26a2a0bde9a9c8ffffc4"}}, -{"id":"couch-sqlite","key":"couch-sqlite","value":{"rev":"3-3e420fe6623542475595aa7e55a4e4bd"}}, -{"id":"couch-stream","key":"couch-stream","value":{"rev":"5-911704fc984bc49acce1e10adefff7ff"}}, -{"id":"couchapp","key":"couchapp","value":{"rev":"16-ded0f4742bb3f5fd42ec8f9c6b21ae8e"}}, -{"id":"couchcmd","key":"couchcmd","value":{"rev":"3-651ea2b435e031481b5d3d968bd3d1eb"}}, -{"id":"couchdb","key":"couchdb","value":{"rev":"12-8abcfd649751226c10edf7cf0508a09f"}}, -{"id":"couchdb-api","key":"couchdb-api","value":{"rev":"23-f2c82f08f52f266df7ac2aa709615244"}}, -{"id":"couchdb-tmp","key":"couchdb-tmp","value":{"rev":"3-9a695fb4ba352f3be2d57c5995718520"}}, -{"id":"couchdev","key":"couchdev","value":{"rev":"3-50a0ca3ed0395dd72de62a1b96619e66"}}, -{"id":"couchlegs","key":"couchlegs","value":{"rev":"5-be78e7922ad4ff86dbe5c17a87fdf4f1"}}, -{"id":"couchtato","key":"couchtato","value":{"rev":"11-15a1ce8de9a8cf1e81d96de6afbb4f45"}}, -{"id":"couchy","key":"couchy","value":{"rev":"13-0a52b2712fb8447f213866612e3ccbf7"}}, -{"id":"courier","key":"courier","value":{"rev":"17-eb94fe01aeaad43805f4bce21d23bcba"}}, -{"id":"coverage","key":"coverage","value":{"rev":"10-a333448996d0b0d420168d1b5748db32"}}, -{"id":"coverage_testing","key":"coverage_testing","value":{"rev":"3-62834678206fae7911401aa86ec1a85e"}}, -{"id":"cqs","key":"cqs","value":{"rev":"6-0dad8b969c70abccc27a146a99399533"}}, -{"id":"crab","key":"crab","value":{"rev":"9-599fc7757f0c9efbe3889f30981ebe93"}}, -{"id":"cradle","key":"cradle","value":{"rev":"60-8fb414b66cb07b4bae59c0316d5c45b4"}}, -{"id":"cradle-fixed","key":"cradle-fixed","value":{"rev":"4-589afffa26fca22244ad2038abb77dc5"}}, -{"id":"cradle-init","key":"cradle-init","value":{"rev":"13-499d63592141f1e200616952bbdea015"}}, -{"id":"crawler","key":"crawler","value":{"rev":"5-ec4a8d77f90d86d17d6d14d631360188"}}, -{"id":"crc","key":"crc","value":{"rev":"3-25ab83f8b1333e6d4e4e5fb286682422"}}, -{"id":"creatary","key":"creatary","value":{"rev":"3-770ad84ecb2e2a3994637d419384740d"}}, -{"id":"createsend","key":"createsend","value":{"rev":"7-19885346e4d7a01ac2e9ad70ea0e822a"}}, -{"id":"creationix","key":"creationix","value":{"rev":"61-7ede1759afbd41e8b4dedc348b72202e"}}, -{"id":"creek","key":"creek","value":{"rev":"33-4f511aa4dd379e04bba7ac333744325e"}}, -{"id":"cron","key":"cron","value":{"rev":"12-8d794edb5f9b7cb6322acaef1c848043"}}, -{"id":"cron2","key":"cron2","value":{"rev":"13-bae2f1b02ffcbb0e77bde6c33b566f80"}}, -{"id":"crontab","key":"crontab","value":{"rev":"36-14d26bf316289fb4841940eee2932f37"}}, -{"id":"crossroads","key":"crossroads","value":{"rev":"7-d73d51cde30f24caad91e6a3c5b420f2"}}, -{"id":"crowdflower","key":"crowdflower","value":{"rev":"3-16c2dfc9fd505f75068f75bd19e3d227"}}, -{"id":"cruvee","key":"cruvee","value":{"rev":"3-979ccf0286b1701e9e7483a10451d975"}}, -{"id":"crypt","key":"crypt","value":{"rev":"3-031b338129bebc3749b42fb3d442fc4b"}}, -{"id":"crypto","key":"crypto","value":{"rev":"3-66a444b64481c85987dd3f22c32e0630"}}, -{"id":"csj","key":"csj","value":{"rev":"3-bc3133c7a0a8827e89aa03897b81d177"}}, -{"id":"cson","key":"cson","value":{"rev":"7-3ac3e1e10572e74e58874cfe3200eb87"}}, -{"id":"csrf-express","key":"csrf-express","value":{"rev":"3-4cc36d88e8ad10b9c2cc8a7318f0abd3"}}, -{"id":"css-crawler","key":"css-crawler","value":{"rev":"13-4739c7bf1decc72d7682b53303f93ec6"}}, -{"id":"css-smasher","key":"css-smasher","value":{"rev":"3-631128f966135c97d648efa3eadf7bfb"}}, -{"id":"css-sourcery","key":"css-sourcery","value":{"rev":"3-571343da3a09af7de473d29ed7dd788b"}}, -{"id":"css2json","key":"css2json","value":{"rev":"5-fb6d84c1da4a9391fa05d782860fe7c4"}}, -{"id":"csskeeper","key":"csskeeper","value":{"rev":"5-ea667a572832ea515b044d4b87ea7d98"}}, -{"id":"csslike","key":"csslike","value":{"rev":"3-6e957cce81f6e790f8562526d907ad94"}}, -{"id":"csslint","key":"csslint","value":{"rev":"19-b1e973274a0a6b8eb81b4d715a249612"}}, -{"id":"cssmin","key":"cssmin","value":{"rev":"10-4bb4280ec56f110c43abe01189f95818"}}, -{"id":"csso","key":"csso","value":{"rev":"17-ccfe2a72d377919b07973bbb1d19b8f2"}}, -{"id":"cssom","key":"cssom","value":{"rev":"3-f96b884b63b4c04bac18b8d9c0a4c4cb"}}, -{"id":"cssp","key":"cssp","value":{"rev":"5-abf69f9ff99b7d0bf2731a5b5da0897c"}}, -{"id":"cssunminifier","key":"cssunminifier","value":{"rev":"3-7bb0c27006af682af92d1969fcb4fa73"}}, -{"id":"cssutils","key":"cssutils","value":{"rev":"3-4759f9db3b8eac0964e36f5229260526"}}, -{"id":"csv","key":"csv","value":{"rev":"21-0420554e9c08e001063cfb0a69a48255"}}, -{"id":"csv2mongo","key":"csv2mongo","value":{"rev":"9-373f11c05e5d1744c3187d9aaeaae0ab"}}, -{"id":"csvutils","key":"csvutils","value":{"rev":"15-84aa82e56b49cd425a059c8f0735a23c"}}, -{"id":"ctrlflow","key":"ctrlflow","value":{"rev":"33-0b817baf6c744dc17b83d5d8ab1ba74e"}}, -{"id":"ctrlflow_tests","key":"ctrlflow_tests","value":{"rev":"3-d9ed35503d27b0736c59669eecb4c4fe"}}, -{"id":"ctype","key":"ctype","value":{"rev":"9-c5cc231475f23a01682d0b1a3b6e49c2"}}, -{"id":"cube","key":"cube","value":{"rev":"5-40320a20d260e082f5c4ca508659b4d1"}}, -{"id":"cucumber","key":"cucumber","value":{"rev":"11-8489af0361b6981cf9001a0403815936"}}, -{"id":"cucumis","key":"cucumis","value":{"rev":"33-6dc38f1161fae3efa2a89c8288b6e040"}}, -{"id":"cucumis-rm","key":"cucumis-rm","value":{"rev":"3-6179249ad15166f8d77eb136b3fa87ca"}}, -{"id":"cupcake","key":"cupcake","value":{"rev":"15-1dd13a85415a366942e7f0a3de06aa2a"}}, -{"id":"curator","key":"curator","value":{"rev":"19-d798ab7fbca11ba0e9c6c40c0a2f9440"}}, -{"id":"curl","key":"curl","value":{"rev":"11-ac7143ac07c64ea169ba7d4e58be232a"}}, -{"id":"curly","key":"curly","value":{"rev":"30-0248a5563b6e96457315ad0cc2fe22c1"}}, -{"id":"curry","key":"curry","value":{"rev":"11-ce13fa80e84eb25d9cf76cf4162a634e"}}, -{"id":"cursory","key":"cursory","value":{"rev":"3-ea2f4b1b47caf38460402d1a565c18b8"}}, -{"id":"d-utils","key":"d-utils","value":{"rev":"37-699ad471caa28183d75c06f0f2aab41c"}}, -{"id":"d3","key":"d3","value":{"rev":"5-4d867844bd7dce21b34cd7283bb9cad4"}}, -{"id":"d3bench","key":"d3bench","value":{"rev":"3-617cc625bfd91c175d037bfcace9c4e9"}}, -{"id":"daemon","key":"daemon","value":{"rev":"11-8654f90bc609ca2c3ec260c7d6b7793e"}}, -{"id":"daemon-tools","key":"daemon-tools","value":{"rev":"18-8197fce2054de67925e6f2c3fa3cd90a"}}, -{"id":"daimyo","key":"daimyo","value":{"rev":"25-531b0b0afdc5ae3d41b4131da40af6cf"}}, -{"id":"daleth","key":"daleth","value":{"rev":"7-4824619205289ba237ef2a4dc1fba1ec"}}, -{"id":"dali","key":"dali","value":{"rev":"9-037c4c76f739ecb537a064c07d3c63e3"}}, -{"id":"damncomma","key":"damncomma","value":{"rev":"3-b1472eada01efb8a12d521e5a248834b"}}, -{"id":"dana","key":"dana","value":{"rev":"3-2a3c0ff58a6d13fedd17e1d192080e59"}}, -{"id":"dandy","key":"dandy","value":{"rev":"9-f4ae43659dd812a010b0333bf8e5a282"}}, -{"id":"dash","key":"dash","value":{"rev":"5-698513f86165f429a5f55320d5a700f0"}}, -{"id":"dash-fu","key":"dash-fu","value":{"rev":"3-848e99a544f9f78f311c7ebfc5a172c4"}}, -{"id":"dashboard","key":"dashboard","value":{"rev":"3-71844d1fc1140b7533f9e57740d2b666"}}, -{"id":"data","key":"data","value":{"rev":"23-b594e2bd1ffef1cda8b7e94dbf15ad5b"}}, -{"id":"data-layer","key":"data-layer","value":{"rev":"9-9205d35cc6eaf1067ee0cec1b421d749"}}, -{"id":"data-page","key":"data-page","value":{"rev":"3-d7a3346a788a0c07132e50585db11c99"}}, -{"id":"data-section","key":"data-section","value":{"rev":"9-d3fff313977667c53cbadb134d993412"}}, -{"id":"data-uuid","key":"data-uuid","value":{"rev":"8-24001fe9f37c4cc7ac01079ee4767363"}}, -{"id":"data-visitor","key":"data-visitor","value":{"rev":"6-7fe5da9d118fab27157dba97050c6487"}}, -{"id":"database-cleaner","key":"database-cleaner","value":{"rev":"19-4bdfc8b324e95e6da9f72e7b7b708b98"}}, -{"id":"datapool","key":"datapool","value":{"rev":"3-f99c93ca812d2f4725bbaea99122832c"}}, -{"id":"datasift","key":"datasift","value":{"rev":"3-6de3ae25c9a99f651101e191595bcf64"}}, -{"id":"date","key":"date","value":{"rev":"9-b334fc6450d093de40a664a4a835cfc4"}}, -{"id":"date-utils","key":"date-utils","value":{"rev":"31-7be8fcf1919564a8fb7223a86a5954ac"}}, -{"id":"dateformat","key":"dateformat","value":{"rev":"11-5b924e1d29056a0ef9b89b9d7984d5c4"}}, -{"id":"dateformatjs","key":"dateformatjs","value":{"rev":"3-4c50a38ecc493535ee2570a838673937"}}, -{"id":"datejs","key":"datejs","value":{"rev":"5-f47e3e6532817f822aa910b59a45717c"}}, -{"id":"dateselect","key":"dateselect","value":{"rev":"3-ce58def02fd8c8feda8c6f2004726f97"}}, -{"id":"datetime","key":"datetime","value":{"rev":"7-14227b0677eb93b8eb519db47f46bf36"}}, -{"id":"db","key":"db","value":{"rev":"3-636e9ea922a85c92bc11aa9691a2e67f"}}, -{"id":"db-drizzle","key":"db-drizzle","value":{"rev":"157-955f74f49ac4236df317e227c08afaa3"}}, -{"id":"db-mysql","key":"db-mysql","value":{"rev":"224-e596a18d9af33ff1fbcf085a9f4f56fd"}}, -{"id":"db-oracle","key":"db-oracle","value":{"rev":"13-a1e2924d87b4badfddeccf6581525b08"}}, -{"id":"dcrypt","key":"dcrypt","value":{"rev":"29-a144a609bef5004781df901440d67b2d"}}, -{"id":"decafscript","key":"decafscript","value":{"rev":"3-f3a239dc7d503c900fc9854603d716e6"}}, -{"id":"decimal","key":"decimal","value":{"rev":"3-614ed56d4d6c5eb7883d8fd215705a12"}}, -{"id":"decimaljson","key":"decimaljson","value":{"rev":"9-7cb23f4b2b1168b1a213f1eefc85fa51"}}, -{"id":"deck","key":"deck","value":{"rev":"7-da422df97f13c7d84e8f3690c1e1ca32"}}, -{"id":"deckard","key":"deckard","value":{"rev":"3-85e0cd76cdd88ff60a617239060d6f46"}}, -{"id":"deckem","key":"deckem","value":{"rev":"9-03ca75ea35960ccd5779b4cfa8cfb9f9"}}, -{"id":"defensio","key":"defensio","value":{"rev":"5-0ad0ae70b4e184626d914cc4005ee34c"}}, -{"id":"defer","key":"defer","value":{"rev":"3-8d003c96f4263a26b7955e251cddbd95"}}, -{"id":"deferrable","key":"deferrable","value":{"rev":"8-3ae57ce4391105962d09ad619d4c4670"}}, -{"id":"deferred","key":"deferred","value":{"rev":"17-9cee7948dbdf7b6dcc00bbdc60041dd0"}}, -{"id":"define","key":"define","value":{"rev":"45-9d422f2ac5ab693f881df85898d68e3a"}}, -{"id":"deflate","key":"deflate","value":{"rev":"10-3ebe2b87e09f4ae51857cae02e1af788"}}, -{"id":"degrees","key":"degrees","value":{"rev":"5-707c57cfa3e589e8059fe9860cc0c10b"}}, -{"id":"deimos","key":"deimos","value":{"rev":"11-6481696be774d14254fe7c427107dc2a"}}, -{"id":"deja","key":"deja","value":{"rev":"47-bde4457402db895aad46198433842668"}}, -{"id":"delayed-stream","key":"delayed-stream","value":{"rev":"13-f6ca393b08582350f78c5c66f183489b"}}, -{"id":"delegator","key":"delegator","value":{"rev":"3-650651749c1df44ef544c919fae74f82"}}, -{"id":"dep-graph","key":"dep-graph","value":{"rev":"3-e404af87822756da52754e2cc5c576b1"}}, -{"id":"dependency-promise","key":"dependency-promise","value":{"rev":"11-1cc2be8465d736ec8f3cc8940ab22823"}}, -{"id":"depends","key":"depends","value":{"rev":"30-adc9604bbd8117592f82eee923d8703e"}}, -{"id":"deploy","key":"deploy","value":{"rev":"3-82020957528bd0bdd675bed9ac4e4cc5"}}, -{"id":"deployjs","key":"deployjs","value":{"rev":"5-a3e99a5ed81d4b1ad44b6477e6a5a985"}}, -{"id":"deputy-client","key":"deputy-client","value":{"rev":"3-31fd224b301ec0f073df7afa790050ec"}}, -{"id":"deputy-server","key":"deputy-server","value":{"rev":"3-0d790cce82aadfd2b8f39a6b056f2792"}}, -{"id":"derby","key":"derby","value":{"rev":"40-b642048a1a639d77ab139160a4da0fd2"}}, -{"id":"des","key":"des","value":{"rev":"24-fcbdc086e657aef356b75433b3e65ab6"}}, -{"id":"descent","key":"descent","value":{"rev":"7-9cc259b25fc688597fc7efaa516d03c6"}}, -{"id":"describe","key":"describe","value":{"rev":"6-788c7f2feaf2e88f4b1179976b273744"}}, -{"id":"deserver","key":"deserver","value":{"rev":"5-da8083694e89b8434123fe7482a3cc7e"}}, -{"id":"detect","key":"detect","value":{"rev":"3-c27f258d39d7905c2b92383809bb5988"}}, -{"id":"detective","key":"detective","value":{"rev":"9-d6cfa0c6389783cdc9c9ffa9e4082c64"}}, -{"id":"dev","key":"dev","value":{"rev":"23-5c2ce4a4f6a4f24d3cff3b7db997d8bc"}}, -{"id":"dev-warnings","key":"dev-warnings","value":{"rev":"5-5a7d7f36d09893df96441be8b09e41d6"}}, -{"id":"dhcpjs","key":"dhcpjs","value":{"rev":"3-1bc01bd612f3ab1fce178c979aa34e43"}}, -{"id":"dht","key":"dht","value":{"rev":"3-40c0b909b6c0e2305e19d10cea1881b0"}}, -{"id":"dht-bencode","key":"dht-bencode","value":{"rev":"5-88a1da8de312a54097507d72a049f0f3"}}, -{"id":"dialect","key":"dialect","value":{"rev":"18-db7928ce4756eea35db1732d4f2ebc88"}}, -{"id":"dialect-http","key":"dialect-http","value":{"rev":"19-23a927d28cb43733dbd05294134a5b8c"}}, -{"id":"dicks","key":"dicks","value":{"rev":"11-ba64897899e336d366ffd4b68cac99f5"}}, -{"id":"diff","key":"diff","value":{"rev":"13-1a88acb0369ab8ae096a2323d65a2811"}}, -{"id":"diff_match_patch","key":"diff_match_patch","value":{"rev":"8-2f6f467e483b23b217a2047e4aded850"}}, -{"id":"diffbot","key":"diffbot","value":{"rev":"3-8cb8e34af89cb477a5da52e3fd9a13f7"}}, -{"id":"digest","key":"digest","value":{"rev":"7-bc6fb9e68c83197381b0d9ac7db16c1c"}}, -{"id":"dir","key":"dir","value":{"rev":"7-574462bb241a39eeffe6c5184d40c57a"}}, -{"id":"dir-watcher","key":"dir-watcher","value":{"rev":"31-1a3ca4d6aa8aa32c619efad5fbfce494"}}, -{"id":"dir2html","key":"dir2html","value":{"rev":"5-b4bfb2916c2d94c85aa75ffa29ad1af4"}}, -{"id":"directive","key":"directive","value":{"rev":"3-3373f02b8762cb1505c8f8cbcc50d3d4"}}, -{"id":"dirsum","key":"dirsum","value":{"rev":"5-8545445faaa41d2225ec7ff226a10750"}}, -{"id":"dirty","key":"dirty","value":{"rev":"13-d636ea0d1ed35560c0bc7272965c1a6f"}}, -{"id":"dirty-uuid","key":"dirty-uuid","value":{"rev":"5-65acdfda886afca65ae52f0ac21ce1b2"}}, -{"id":"discogs","key":"discogs","value":{"rev":"21-839410e6bf3bee1435ff837daaeaf9f8"}}, -{"id":"discount","key":"discount","value":{"rev":"13-a8fb2a8f668ac0a55fffada1ea94a4b7"}}, -{"id":"discovery","key":"discovery","value":{"rev":"3-46f4496224d132e56cbc702df403219d"}}, -{"id":"diskcache","key":"diskcache","value":{"rev":"23-7b14ad41fc199184fb939828e9122099"}}, -{"id":"dispatch","key":"dispatch","value":{"rev":"6-e72cc7b2bcc97faf897ae4e4fa3ec681"}}, -{"id":"distribute.it","key":"distribute.it","value":{"rev":"12-0978757eb25d22117af675806cf6eef2"}}, -{"id":"dive","key":"dive","value":{"rev":"21-9cbd1281c5a3c2dae0cc0407863f3336"}}, -{"id":"diveSync","key":"diveSync","value":{"rev":"3-015ec4803903106bf24cb4f17cedee68"}}, -{"id":"dk-assets","key":"dk-assets","value":{"rev":"3-25d9b6ac727caf1e227e6436af835d03"}}, -{"id":"dk-core","key":"dk-core","value":{"rev":"3-0b6a2f4dfc0484a3908159a897920bae"}}, -{"id":"dk-couchdb","key":"dk-couchdb","value":{"rev":"3-cc9ef511f9ed46be9d7099f10b1ee776"}}, -{"id":"dk-model","key":"dk-model","value":{"rev":"3-3a61006be57d304724c049e4dcf2fc9b"}}, -{"id":"dk-model-couchdb","key":"dk-model-couchdb","value":{"rev":"3-5163def21660db8428e623909bbfcb4d"}}, -{"id":"dk-routes","key":"dk-routes","value":{"rev":"3-4563357f850248d7d0fb37f9bdcb893b"}}, -{"id":"dk-server","key":"dk-server","value":{"rev":"3-9aef13fc5814785c9805b26828e8d114"}}, -{"id":"dk-template","key":"dk-template","value":{"rev":"3-809c94776252441129705fbe1d93e752"}}, -{"id":"dk-transport","key":"dk-transport","value":{"rev":"3-9271da6f86079027535179b743d0d4c3"}}, -{"id":"dk-websockets","key":"dk-websockets","value":{"rev":"3-426b44c04180d6caf7cf765f03fc52c2"}}, -{"id":"dnet-index-proxy","key":"dnet-index-proxy","value":{"rev":"51-1f3cf4f534c154369d5e774a8f599106"}}, -{"id":"dnode","key":"dnode","value":{"rev":"129-68db10c25c23d635dc828aa698d1279e"}}, -{"id":"dnode-ez","key":"dnode-ez","value":{"rev":"17-75877eab5cf3976b8876c49afd2f7e38"}}, -{"id":"dnode-protocol","key":"dnode-protocol","value":{"rev":"23-fb28f8e1180e6aa44fa564e0d55b3d1e"}}, -{"id":"dnode-smoothiecharts","key":"dnode-smoothiecharts","value":{"rev":"3-d1483028e5768527c2786b9ed5d76463"}}, -{"id":"dnode-stack","key":"dnode-stack","value":{"rev":"9-c1ad8ce01282ce4fa72b5993c580e58e"}}, -{"id":"dnode-worker","key":"dnode-worker","value":{"rev":"3-4c73c0d7ed225197fd8fb0555eaf1152"}}, -{"id":"dns-server","key":"dns-server","value":{"rev":"3-4858a1773da514fea68eac6d9d39f69e"}}, -{"id":"dns-srv","key":"dns-srv","value":{"rev":"12-867c769437fa0ad8a83306aa9e2a158e"}}, -{"id":"doc","key":"doc","value":{"rev":"5-2c077b3fd3b6efa4e927b66f1390e4ea"}}, -{"id":"doc.md","key":"doc.md","value":{"rev":"7-8e8e51be4956550388699222b2e039e7"}}, -{"id":"docco","key":"docco","value":{"rev":"18-891bde1584809c3b1f40fef9961b4f28"}}, -{"id":"docdown","key":"docdown","value":{"rev":"5-fcf5be2ab6ceaed76c1980b462359057"}}, -{"id":"docket","key":"docket","value":{"rev":"13-a4969e0fb17af8dba7df178e364161c2"}}, -{"id":"docpad","key":"docpad","value":{"rev":"77-a478ac8c7ac86e304f9213380ea4b550"}}, -{"id":"docs","key":"docs","value":{"rev":"3-6b1fae9738a3327a3a3be826c0981c3a"}}, -{"id":"dojo-node","key":"dojo-node","value":{"rev":"13-e0dc12e9ce8ab3f40b228c2af8c41064"}}, -{"id":"dom","key":"dom","value":{"rev":"3-cecd9285d0d5b1cab0f18350aac1b2b0"}}, -{"id":"dom-js","key":"dom-js","value":{"rev":"8-dd20e8b23028f4541668501650b52a71"}}, -{"id":"dom-js-ns","key":"dom-js-ns","value":{"rev":"3-787567fc1d6f4ca7e853215a4307b593"}}, -{"id":"domjs","key":"domjs","value":{"rev":"3-d2d05a20dccb57fb6db7da08916c6c0f"}}, -{"id":"doml","key":"doml","value":{"rev":"11-c3b49c50906d9875b546413e4acd1b38"}}, -{"id":"domo","key":"domo","value":{"rev":"3-a4321e6c0c688f773068365b44b08b6b"}}, -{"id":"domready","key":"domready","value":{"rev":"46-21c6b137bbed79ddbff31fdf0ef7d61f"}}, -{"id":"donkey","key":"donkey","value":{"rev":"3-1454aa878654886e8495ebb060aa10f7"}}, -{"id":"dot","key":"dot","value":{"rev":"19-b6d2d53cb9ae1a608a0956aeb8092578"}}, -{"id":"dotaccess","key":"dotaccess","value":{"rev":"13-63ddef6740e84f4517f7dd1bb0d68c56"}}, -{"id":"douche","key":"douche","value":{"rev":"3-6a200f908ccfc9ae549e80209e117cbf"}}, -{"id":"dox","key":"dox","value":{"rev":"10-856cc6bf3dc7c44e028173fea8323c24"}}, -{"id":"drag","key":"drag","value":{"rev":"9-00f27e241269c3df1d71e45b698e9b3b"}}, -{"id":"drain","key":"drain","value":{"rev":"3-8827a0ee7ed74b948bf56d5a33455fc8"}}, -{"id":"drawback","key":"drawback","value":{"rev":"74-dd356b3e55175525317e53c24979a431"}}, -{"id":"drev","key":"drev","value":{"rev":"9-43529419a69529dd7af9a83985aab1f2"}}, -{"id":"drews-mixins","key":"drews-mixins","value":{"rev":"17-63373bae6525859bddfc8d6ad19bdb06"}}, -{"id":"drnu","key":"drnu","value":{"rev":"3-b9b14b2241ded1e52a92fc4225b4ddc5"}}, -{"id":"dropbox","key":"dropbox","value":{"rev":"19-2cb7a40d253621fdfa96f23b96e42ecb"}}, -{"id":"drtoms-nodehelpers","key":"drtoms-nodehelpers","value":{"rev":"3-be0a75cdd7c2d49b1ec4ad1d2c3bc911"}}, -{"id":"drty","key":"drty","value":{"rev":"3-56eabd39b9badfa0af601c5cc64cee2c"}}, -{"id":"drty-facebook","key":"drty-facebook","value":{"rev":"3-fd07af7fb87d7f1d35e13f458a02c127"}}, -{"id":"drumkit","key":"drumkit","value":{"rev":"3-f3cdacef51453d3ac630759aff2a8b58"}}, -{"id":"drupal","key":"drupal","value":{"rev":"13-13835b1e1c8a0e8f0b0e8479640a8d7e"}}, -{"id":"dryice","key":"dryice","value":{"rev":"15-9990fdbde5475a8dbdcc055cb08d654d"}}, -{"id":"dryml","key":"dryml","value":{"rev":"33-483ff8cc3ab1431790cc2587c0bce989"}}, -{"id":"ds","key":"ds","value":{"rev":"9-743274a1d0143927851af07ff0f86d8d"}}, -{"id":"dt","key":"dt","value":{"rev":"3-ab59016f28e182c763b78ba49a59191c"}}, -{"id":"dtl","key":"dtl","value":{"rev":"11-415b4aeec93f096523569615e80f1be1"}}, -{"id":"dtrace-provider","key":"dtrace-provider","value":{"rev":"12-7f01510bd2b1d543f11e3dc02d98ab69"}}, -{"id":"dtrejo","key":"dtrejo","value":{"rev":"3-85f5bb2b9faec499e6aa77fe22e6e3ec"}}, -{"id":"dude","key":"dude","value":{"rev":"3-006528c1efd98312991273ba6ee45f7b"}}, -{"id":"dunce","key":"dunce","value":{"rev":"3-fa4fa5cafdfd1d86c650746f60b7bc0e"}}, -{"id":"duostack","key":"duostack","value":{"rev":"15-47824bdf6e32f49f64014e75421dc42e"}}, -{"id":"duplex-stream","key":"duplex-stream","value":{"rev":"3-2d0e12876e7ad4e5d3ea5520dcbad861"}}, -{"id":"durilka","key":"durilka","value":{"rev":"15-54400496515c8625e8bedf19f8a41cad"}}, -{"id":"dust","key":"dust","value":{"rev":"18-9bc9cae2e48c54f4389e9fce5dfc021e"}}, -{"id":"dustfs","key":"dustfs","value":{"rev":"5-944770c24f06989f3fc62427f2ddebc4"}}, -{"id":"dx","key":"dx","value":{"rev":"3-6000afd60be07d9ff91e7231a388f22f"}}, -{"id":"dynamic","key":"dynamic","value":{"rev":"3-33b83464ed56eb33c052a13dfb709c9c"}}, -{"id":"dynobj","key":"dynobj","value":{"rev":"5-3eb168dae1f9c20369fa1d5ae45f9021"}}, -{"id":"each","key":"each","value":{"rev":"3-5063799b0afcbb61378b1d605660a864"}}, -{"id":"ears","key":"ears","value":{"rev":"11-e77cd2b865409be7ba2e072e98b1c8a1"}}, -{"id":"easey","key":"easey","value":{"rev":"3-a380d8d945e03f55732ae8769cd6dbbf"}}, -{"id":"easy","key":"easy","value":{"rev":"3-73b836a34beafa31cdd8129fe158bf6e"}}, -{"id":"easy-oauth","key":"easy-oauth","value":{"rev":"5-2c1db698e61d77f99633042113099528"}}, -{"id":"easyfs","key":"easyfs","value":{"rev":"3-b807671a77c2a8cc27a9f1aa20ff74c0"}}, -{"id":"easyhash","key":"easyhash","value":{"rev":"3-2eeb24098bc4d201766dcc92dc7325f7"}}, -{"id":"easyrss","key":"easyrss","value":{"rev":"9-1687a54348670ef9ca387ea7ec87f0be"}}, -{"id":"ebnf-diagram","key":"ebnf-diagram","value":{"rev":"3-704e4605bf933b281a6821259a531055"}}, -{"id":"ec2","key":"ec2","value":{"rev":"22-25e562ae8898807c7b4c696c809cf387"}}, -{"id":"echo","key":"echo","value":{"rev":"19-75c2421f623ecc9fe2771f3658589ce8"}}, -{"id":"eco","key":"eco","value":{"rev":"14-b4db836928c91cbf22628cc65ca94f56"}}, -{"id":"ed","key":"ed","value":{"rev":"3-bed9b8225e83a02241d48254077a7df4"}}, -{"id":"edate","key":"edate","value":{"rev":"3-5ec1441ffe3b56d5d01561003b9844f2"}}, -{"id":"eden","key":"eden","value":{"rev":"35-9aa2ff880c2d4f45e3da881b15e58d0a"}}, -{"id":"eio","key":"eio","value":{"rev":"5-e6dd895635596d826ccdf4439761d5fa"}}, -{"id":"ejs","key":"ejs","value":{"rev":"30-c7b020b6cb8ee2626f47db21fc5fedb4"}}, -{"id":"ejs-ext","key":"ejs-ext","value":{"rev":"15-820393685191bbed37938acb7af5885e"}}, -{"id":"elastical","key":"elastical","value":{"rev":"3-c652af043bc4256a29a87e3de9b78093"}}, -{"id":"elasticsearchclient","key":"elasticsearchclient","value":{"rev":"33-bcb59deb7d9d56737a6946c56830ae6b"}}, -{"id":"elastiseahclient","key":"elastiseahclient","value":{"rev":"3-c4e525605859e249f04fb07d31739002"}}, -{"id":"elementtree","key":"elementtree","value":{"rev":"3-ef2017fe67ae425253de911c2f219d31"}}, -{"id":"elf-logger","key":"elf-logger","value":{"rev":"6-98d61588cfc171611568cf86004aa2e1"}}, -{"id":"elk","key":"elk","value":{"rev":"25-8b92241d0218c6593a7dc8a8cc69b7ce"}}, -{"id":"elucidata-build-tools","key":"elucidata-build-tools","value":{"rev":"7-0ad3de708aaac2eebfcfce273bfe6edf"}}, -{"id":"email","key":"email","value":{"rev":"16-110ae6a99ab3e37f4edd9357c03d78c2"}}, -{"id":"email-verificationtoken","key":"email-verificationtoken","value":{"rev":"7-ef37672bc6e9ee806ecc22fd5257ae03"}}, -{"id":"emailjs","key":"emailjs","value":{"rev":"31-0dd24f9aba8d96e9493e55e8345f3d21"}}, -{"id":"embedly","key":"embedly","value":{"rev":"21-47838d8015e9b927c56a7bd52c52e4fc"}}, -{"id":"emile","key":"emile","value":{"rev":"11-05d4715964b5bf2e1fd98096cb7ccc83"}}, -{"id":"emit.io","key":"emit.io","value":{"rev":"3-faacb1c30bb92c06a55a44bb027a9475"}}, -{"id":"emre","key":"emre","value":{"rev":"3-5686f4782f1f5171fff83b662ce68802"}}, -{"id":"encrypt","key":"encrypt","value":{"rev":"3-77e2e2007b452f7fcdfa9e8696a188f5"}}, -{"id":"ender","key":"ender","value":{"rev":"95-89b8c6ccfcaf3eb56f5dbe48bf3c2e24"}}, -{"id":"ender-dragdealer","key":"ender-dragdealer","value":{"rev":"9-e12bb3492614f20fe5781f20e3bb17dc"}}, -{"id":"ender-fermata","key":"ender-fermata","value":{"rev":"3-e52d772042852408ae070b361c247068"}}, -{"id":"ender-fittext","key":"ender-fittext","value":{"rev":"5-e46f5a384d790ea6f65a5f8b9e43bac6"}}, -{"id":"ender-flowplayer","key":"ender-flowplayer","value":{"rev":"3-87267072fb566112315254fdf6547500"}}, -{"id":"ender-js","key":"ender-js","value":{"rev":"80-aa18576f782e3aa14c2ba7ba05658a30"}}, -{"id":"ender-json","key":"ender-json","value":{"rev":"3-5606608389aef832e4d4ecaa6c088a94"}}, -{"id":"ender-lettering","key":"ender-lettering","value":{"rev":"3-6fc6ad3869fad6374a1de69ba4e9301d"}}, -{"id":"ender-modules","key":"ender-modules","value":{"rev":"5-2bbb354d6219b5e13e6c897c562b8c83"}}, -{"id":"ender-poke","key":"ender-poke","value":{"rev":"5-3afa2fd690ebc4f2d75125b2c57e2a43"}}, -{"id":"ender-test","key":"ender-test","value":{"rev":"5-f8e90a951e5ad58199e53645067fad0c"}}, -{"id":"ender-tipsy","key":"ender-tipsy","value":{"rev":"5-cefd04c5d89707dfe31023702328d417"}}, -{"id":"ender-tween","key":"ender-tween","value":{"rev":"13-035312bb47bb3d29e7157932d4d29dcb"}}, -{"id":"ender-vows","key":"ender-vows","value":{"rev":"5-d48e088816d71779a80a74c43cd61b80"}}, -{"id":"ender-wallet","key":"ender-wallet","value":{"rev":"21-93723cd24fbf14d0f58f2ee41df9910d"}}, -{"id":"endtable","key":"endtable","value":{"rev":"36-8febf1be0120d867f9ff90e5c5058ef9"}}, -{"id":"enhance-css","key":"enhance-css","value":{"rev":"7-ae1cf6dee7d3116103781edaa7d47ba4"}}, -{"id":"ensure","key":"ensure","value":{"rev":"27-47e0874d1823188965a02a41abb61739"}}, -{"id":"ent","key":"ent","value":{"rev":"9-51924cd76fabcc4a244db66d65d48eff"}}, -{"id":"entropy","key":"entropy","value":{"rev":"17-84bfbbc0689b3b55e4fa3881888f0c12"}}, -{"id":"enumerable","key":"enumerable","value":{"rev":"3-d31bfcaca3b53eacc9ce09983efffe35"}}, -{"id":"envious","key":"envious","value":{"rev":"3-08d1e6d9c25c4e2350a0dd6759a27426"}}, -{"id":"environ","key":"environ","value":{"rev":"5-6f78def4743dfbeb77c1cb62d41eb671"}}, -{"id":"epub","key":"epub","value":{"rev":"3-5c3604eab851bce0a6ac66db6a6ce77a"}}, -{"id":"erlang","key":"erlang","value":{"rev":"3-3bd8e8e8ed416a32567475d984028b65"}}, -{"id":"err","key":"err","value":{"rev":"11-61d11f26b47d29ef819136214830f24c"}}, -{"id":"errbacker","key":"errbacker","value":{"rev":"5-0ad6d62207abb9822118ae69d0b9181d"}}, -{"id":"es5","key":"es5","value":{"rev":"3-5497cb0c821f3e17234c09ab0e67e1de"}}, -{"id":"es5-basic","key":"es5-basic","value":{"rev":"9-2ff708ae54ae223923cb810f799bfb2d"}}, -{"id":"es5-ext","key":"es5-ext","value":{"rev":"21-04537d704412a631596beeba4d534b33"}}, -{"id":"es5-shim","key":"es5-shim","value":{"rev":"34-3c4c40a6dab9ff137d1a7d4349d72c5b"}}, -{"id":"es5-shimify","key":"es5-shimify","value":{"rev":"3-f85700407e9c129d22b45c15700c82f1"}}, -{"id":"esc","key":"esc","value":{"rev":"5-42911775f391330f361105b8a0cefe47"}}, -{"id":"escaperoute","key":"escaperoute","value":{"rev":"18-e1372f35e6dcdb353b8c11e3c7e2f3b4"}}, -{"id":"escort","key":"escort","value":{"rev":"27-bf43341e15d565c9f67dd3300dc57734"}}, -{"id":"escrito","key":"escrito","value":{"rev":"5-c39d5b373486327b2e13670f921a2c7b"}}, -{"id":"esl","key":"esl","value":{"rev":"9-562ff6239a3b9910989bdf04746fa9d1"}}, -{"id":"espresso","key":"espresso","value":{"rev":"75-4c3692f1e92ea841e2d04338f4f2432e"}}, -{"id":"esproxy","key":"esproxy","value":{"rev":"7-be629dc6e1428f0fdb22fdbe7ab2ee99"}}, -{"id":"etch-a-sketch","key":"etch-a-sketch","value":{"rev":"3-a4e23b8e9f298d4844d6bff0a9688e53"}}, -{"id":"etherpad-lite-client","key":"etherpad-lite-client","value":{"rev":"55-58ca439a697db64ee66652da2d327fcb"}}, -{"id":"etsy","key":"etsy","value":{"rev":"5-1b795b360c28261f11c07d849637047c"}}, -{"id":"eve","key":"eve","value":{"rev":"3-16e72b336a1f354f4dfc8fa783fa2e72"}}, -{"id":"event-emitter","key":"event-emitter","value":{"rev":"5-15fe3e2e19b206929b815909737b15ac"}}, -{"id":"event-queue","key":"event-queue","value":{"rev":"12-200cd3bcd8e0b35bc4b15c1d8b6161e2"}}, -{"id":"event-stream","key":"event-stream","value":{"rev":"15-811a6329b5820d998731a604accf83db"}}, -{"id":"eventable","key":"eventable","value":{"rev":"3-08e9cd94a9aae280f406d043039e545e"}}, -{"id":"eventbrite","key":"eventbrite","value":{"rev":"13-cac3c9bda2da1c7b115de04264bb440f"}}, -{"id":"evented","key":"evented","value":{"rev":"6-ade6271c40a19aab6c4e3bb18b0987b6"}}, -{"id":"evented-twitter","key":"evented-twitter","value":{"rev":"6-3ebb7327022d6d6a8c49d684febb236b"}}, -{"id":"eventedsocket","key":"eventedsocket","value":{"rev":"59-cd2158c47b676a58ca3064a42c5274f7"}}, -{"id":"eventemitter","key":"eventemitter","value":{"rev":"5-7766fd7ebc44d52efbd0e7088e2321ec"}}, -{"id":"eventemitter2","key":"eventemitter2","value":{"rev":"41-927ce7996d4056a21f543e1f928f9699"}}, -{"id":"eventful","key":"eventful","value":{"rev":"7-9505f3c621f50addf02a457cfcc8ae78"}}, -{"id":"eventhub","key":"eventhub","value":{"rev":"15-5390d210a4d3ba079dd6e26bda652caa"}}, -{"id":"eventpipe","key":"eventpipe","value":{"rev":"7-41f0f93a9dcea477f08782af28e5b0f1"}}, -{"id":"events","key":"events","value":{"rev":"12-e3ead8eac62799cb299c139687135289"}}, -{"id":"events.io","key":"events.io","value":{"rev":"3-56c6955024cbb1765a1f9f37d8a739a4"}}, -{"id":"events.node","key":"events.node","value":{"rev":"3-e072f9c457fd8a3882ccd41ce52c5d00"}}, -{"id":"eventstream","key":"eventstream","value":{"rev":"5-a578a3a2a62d50631b3fb4d44a058bd1"}}, -{"id":"eventvat","key":"eventvat","value":{"rev":"3-e26d7fe8a226c7bc7f9e55abf1630e9c"}}, -{"id":"everyauth","key":"everyauth","value":{"rev":"107-a621f3028a230f9f3ade6a4e729a9a38"}}, -{"id":"ewdDOM","key":"ewdDOM","value":{"rev":"7-28188ec27fe011bf7fcb330a5fc90b55"}}, -{"id":"ewdGateway","key":"ewdGateway","value":{"rev":"7-81fe5ec1a3e920894b560fbf96160258"}}, -{"id":"exceptional","key":"exceptional","value":{"rev":"5-5842d306b2cf084c4e7c2ecb1d715280"}}, -{"id":"exceptional-node","key":"exceptional-node","value":{"rev":"5-3385b42af0a6ea8a943cb686d5789b0c"}}, -{"id":"executor","key":"executor","value":{"rev":"3-aee4f949a4d140a439965e137200c4fb"}}, -{"id":"exif","key":"exif","value":{"rev":"3-da6fd2bd837633f673b325231c164a0f"}}, -{"id":"expanda","key":"expanda","value":{"rev":"3-dcbc59c5db0017d25748ec8094aeeb0a"}}, -{"id":"express","key":"express","value":{"rev":"157-24ef0cdd4ba6c6697c66f3e78bc777bb"}}, -{"id":"express-aid","key":"express-aid","value":{"rev":"21-6d3831e93b823f800e6a22eb08aa41d6"}}, -{"id":"express-app-bootstrap","key":"express-app-bootstrap","value":{"rev":"3-4b5a256bef5ca3bd41b0958f594907b9"}}, -{"id":"express-asset","key":"express-asset","value":{"rev":"3-7d5e23bc753851c576e429e7901301d9"}}, -{"id":"express-blocks","key":"express-blocks","value":{"rev":"7-305b6e046355c8e7a4bb0f1f225092ef"}}, -{"id":"express-cache","key":"express-cache","value":{"rev":"5-eebbea6c0e5db5fd4c12847933c853e1"}}, -{"id":"express-chromeframe","key":"express-chromeframe","value":{"rev":"5-1bb72d30b7a1f00d3eaf248285942d5e"}}, -{"id":"express-coffee","key":"express-coffee","value":{"rev":"39-14eff195c9352c6c3898befb3d613807"}}, -{"id":"express-config","key":"express-config","value":{"rev":"3-27ea0d27e20afa9ece375878aab846ed"}}, -{"id":"express-configure","key":"express-configure","value":{"rev":"7-46bd636c0b56dfcfa4f1ee46b43d6ca0"}}, -{"id":"express-contrib","key":"express-contrib","value":{"rev":"20-472c93fefe0a9a6440a76b2c843b2e0e"}}, -{"id":"express-controllers","key":"express-controllers","value":{"rev":"3-296d54f3b5bf26bfa057cd8c5f0a11ea"}}, -{"id":"express-controllers-new","key":"express-controllers-new","value":{"rev":"15-11f73e4a8ab935987a3b8f132d80afa5"}}, -{"id":"express-cross-site","key":"express-cross-site","value":{"rev":"11-b76814fdd58a616b3cafe6e97f3c7c98"}}, -{"id":"express-csrf","key":"express-csrf","value":{"rev":"20-2a79f0fdc65ed91120e7417a5cf8ce6c"}}, -{"id":"express-custom-errors","key":"express-custom-errors","value":{"rev":"6-bd131169ccac73fa3766195147e34404"}}, -{"id":"express-dialect","key":"express-dialect","value":{"rev":"34-1fbc5baf7ea464abbadcfaf3c1971660"}}, -{"id":"express-dust","key":"express-dust","value":{"rev":"5-33a1d8dd9c113d6fb8f1818c8a749c1b"}}, -{"id":"express-expose","key":"express-expose","value":{"rev":"7-f8757d8bf8d3fac8395ee8ce5117a895"}}, -{"id":"express-extras","key":"express-extras","value":{"rev":"6-53c7bfc68a41043eb5e11321673a2c48"}}, -{"id":"express-form","key":"express-form","value":{"rev":"27-533598a1bd5a0e9b8d694f5b38228c6c"}}, -{"id":"express-helpers","key":"express-helpers","value":{"rev":"3-7b9123b0ea6b840bb5a6e4da9c28308c"}}, -{"id":"express-livejade","key":"express-livejade","value":{"rev":"9-1320996d4ed3db352a2c853226880a17"}}, -{"id":"express-logger","key":"express-logger","value":{"rev":"5-c485b1020742310a313cac87abdde67b"}}, -{"id":"express-messages","key":"express-messages","value":{"rev":"5-f6225b906d0ac33ba1bfc5409b227edb"}}, -{"id":"express-messages-bootstrap","key":"express-messages-bootstrap","value":{"rev":"5-fb8fc70c1cbd6df0e07b2e0148bdf8bf"}}, -{"id":"express-mongoose","key":"express-mongoose","value":{"rev":"29-2d6907a23c8c3bbfdf9b6f9b6b3c00e3"}}, -{"id":"express-mvc-bootstrap","key":"express-mvc-bootstrap","value":{"rev":"15-c53ecb696af1d34ff94efe5ab5d89287"}}, -{"id":"express-namespace","key":"express-namespace","value":{"rev":"7-d209feb707821b06426aed233295df75"}}, -{"id":"express-on-railway","key":"express-on-railway","value":{"rev":"7-784b533cbf29930d04039bafb2c03cc0"}}, -{"id":"express-params","key":"express-params","value":{"rev":"3-13f0ed9c17d10fd01d1ff869e625c91f"}}, -{"id":"express-resource","key":"express-resource","value":{"rev":"13-cca556327152588a87112c6bf2613bc9"}}, -{"id":"express-rewrite","key":"express-rewrite","value":{"rev":"7-c76ca2616eb6e70209ace6499f5b961a"}}, -{"id":"express-route-util","key":"express-route-util","value":{"rev":"9-4b7bad7e8ab3bf71daf85362b47ec8be"}}, -{"id":"express-rpx","key":"express-rpx","value":{"rev":"9-54d48f5e24174500c73f07d97a7d3f9f"}}, -{"id":"express-session-mongo","key":"express-session-mongo","value":{"rev":"3-850cf5b42f65a6f27af6edf1ad1aa966"}}, -{"id":"express-session-mongo-russp","key":"express-session-mongo-russp","value":{"rev":"7-441e8afcd466a4cbb5e65a1949190f97"}}, -{"id":"express-session-redis","key":"express-session-redis","value":{"rev":"6-5f4f16092a0706d2daef89470d6971e6"}}, -{"id":"express-share","key":"express-share","value":{"rev":"5-f5327a97738e9c8e6e05a51cb7153f82"}}, -{"id":"express-spdy","key":"express-spdy","value":{"rev":"11-2634f388338c45b2d6f020d2a6739ba1"}}, -{"id":"express-template-override","key":"express-template-override","value":{"rev":"5-758cf2eb0c9cbc32f205c4ba2ece24f9"}}, -{"id":"express-trace","key":"express-trace","value":{"rev":"5-ba59571f8881e02e2b297ed9ffb4e48c"}}, -{"id":"express-unstable","key":"express-unstable","value":{"rev":"3-06467336e1610ba9915401df26c936c1"}}, -{"id":"express-validate","key":"express-validate","value":{"rev":"15-b63bd9b18fadfc2345d0a10a7a2fb2e7"}}, -{"id":"express-view-helpers","key":"express-view-helpers","value":{"rev":"7-4d07ba11f81788783c6f9fd48fdf8834"}}, -{"id":"express-with-ease","key":"express-with-ease","value":{"rev":"3-604d9176a4a03f9f7c74679604c7bbf9"}}, -{"id":"express-wormhole","key":"express-wormhole","value":{"rev":"3-7e06cf63b070e0f54b2aa71b48db9a40"}}, -{"id":"expresso","key":"expresso","value":{"rev":"79-a27b6ef2f9e7bb9f85da34f728d124a8"}}, -{"id":"expressobdd","key":"expressobdd","value":{"rev":"5-e8cae7a17a9e8c1779c08abedc674e03"}}, -{"id":"ext","key":"ext","value":{"rev":"6-8790c06324c5f057b1713ba420e8bf27"}}, -{"id":"extend","key":"extend","value":{"rev":"3-934d0de77bbaefb1b52ec18a17f46d7d"}}, -{"id":"extendables","key":"extendables","value":{"rev":"11-e4db9b62a4047e95fb4d7f88e351a14e"}}, -{"id":"extjs-node","key":"extjs-node","value":{"rev":"3-2b2033dbbf0b99d41e876498886b0995"}}, -{"id":"extractcontent","key":"extractcontent","value":{"rev":"6-ad70764c834ecd3414cbc15dbda317c3"}}, -{"id":"extractor","key":"extractor","value":{"rev":"9-f95bde04bb8db37350c9cc95c5578c03"}}, -{"id":"extx-layout","key":"extx-layout","value":{"rev":"3-f6bbc3a923ebce17f62cbf382b096ac7"}}, -{"id":"extx-reference-slot","key":"extx-reference-slot","value":{"rev":"14-b1b92573492f7239144693ee9e1d1aac"}}, -{"id":"extx-shotenjin","key":"extx-shotenjin","value":{"rev":"5-c641121ba57fb960d8db766511ecf6cd"}}, -{"id":"eyes","key":"eyes","value":{"rev":"16-fab6b201646fb12986e396c33a7cd428"}}, -{"id":"f","key":"f","value":{"rev":"3-23b73ffafbe5b56b6a0736db6a7256a6"}}, -{"id":"f-core","key":"f-core","value":{"rev":"3-9a6898e007acf48d956f0a70ff07a273"}}, -{"id":"f7u12rl","key":"f7u12rl","value":{"rev":"3-7b5e15d106db8b7f8784b27f7d2c9bdc"}}, -{"id":"fab","key":"fab","value":{"rev":"10-149dec0b653ce481af013c63fec125e8"}}, -{"id":"fab.accept","key":"fab.accept","value":{"rev":"6-d6b08e7054d823906c6c64c92b008d3a"}}, -{"id":"fab.static","key":"fab.static","value":{"rev":"6-5bdb6db53223bb5203ba91a5b2b87566"}}, -{"id":"fabric","key":"fabric","value":{"rev":"15-30e99e486c58962c049bea54e00b7cb9"}}, -{"id":"face-detect","key":"face-detect","value":{"rev":"3-d4d3f1a894c807f79ba541d2f2ed630d"}}, -{"id":"facebook","key":"facebook","value":{"rev":"17-e241999000e34aed62ee0f9f358bfd06"}}, -{"id":"facebook-api","key":"facebook-api","value":{"rev":"5-cb9d07b2eba18d8fb960768d69f80326"}}, -{"id":"facebook-client","key":"facebook-client","value":{"rev":"17-84c106420b183ca791b0c80fd8c3fe00"}}, -{"id":"facebook-connect","key":"facebook-connect","value":{"rev":"6-471f28bb12928e32610d02c0b03aa972"}}, -{"id":"facebook-express","key":"facebook-express","value":{"rev":"11-6e6d98b8252907b05c41aac7e0418f4e"}}, -{"id":"facebook-graph","key":"facebook-graph","value":{"rev":"9-c92149825fef42ad76bcffdd232cc9a5"}}, -{"id":"facebook-graph-client","key":"facebook-graph-client","value":{"rev":"10-c3136a2b2e5c5d80b78404a4102af7b5"}}, -{"id":"facebook-js","key":"facebook-js","value":{"rev":"22-dd9d916550ebccb71e451acbd7a4b315"}}, -{"id":"facebook-realtime-graph","key":"facebook-realtime-graph","value":{"rev":"6-c4fe01ac036585394cd59f01c6fc7df1"}}, -{"id":"facebook-sdk","key":"facebook-sdk","value":{"rev":"21-77daf7eba51bb913e54381995718e13d"}}, -{"id":"facebook-session-cookie","key":"facebook-session-cookie","value":{"rev":"9-70e14cac759dacadacb0af17387ab230"}}, -{"id":"facebook-signed-request","key":"facebook-signed-request","value":{"rev":"5-11cb36123a94e37fff6a7efd6f7d88b9"}}, -{"id":"facebook.node","key":"facebook.node","value":{"rev":"3-f6760795e71c1d5734ae34f9288d02be"}}, -{"id":"factory-worker","key":"factory-worker","value":{"rev":"7-1c365b3dd92b12573d00c08b090e01ae"}}, -{"id":"fake","key":"fake","value":{"rev":"25-2d1ae2299168d95edb8d115fb7961c8e"}}, -{"id":"fake-queue","key":"fake-queue","value":{"rev":"7-d6970de6141c1345c6ad3cd1586cfe7b"}}, -{"id":"fakedb","key":"fakedb","value":{"rev":"34-889fb5c9fa328b536f9deb138ff125b1"}}, -{"id":"fakeweb","key":"fakeweb","value":{"rev":"3-7fb1394b4bac70f9ab26e60b1864b41f"}}, -{"id":"fanfeedr","key":"fanfeedr","value":{"rev":"22-de3d485ad60c8642eda260afe5620973"}}, -{"id":"fantomex","key":"fantomex","value":{"rev":"3-79b26bcf9aa365485ed8131c474bf6f8"}}, -{"id":"far","key":"far","value":{"rev":"19-c8d9f1e8bc12a31cb27bef3ed44759ce"}}, -{"id":"farm","key":"farm","value":{"rev":"31-ab77f7f48b24bf6f0388b926d2ac370b"}}, -{"id":"fast-detective","key":"fast-detective","value":{"rev":"5-b0b6c8901458f3f07044d4266db0aa52"}}, -{"id":"fast-msgpack-rpc","key":"fast-msgpack-rpc","value":{"rev":"7-b2dfd3d331459382fe1e8166288ffef6"}}, -{"id":"fast-or-slow","key":"fast-or-slow","value":{"rev":"13-4118190cd6a0185af8ea9b381ee2bc98"}}, -{"id":"fast-stats","key":"fast-stats","value":{"rev":"3-15cdd56d9efa38f08ff20ca731867d4d"}}, -{"id":"fastcgi-stream","key":"fastcgi-stream","value":{"rev":"5-99c0c4dfc7a874e1af71e5ef3ac95ba4"}}, -{"id":"faye","key":"faye","value":{"rev":"30-49b7d05534c35527972a4d5e07ac8895"}}, -{"id":"faye-service","key":"faye-service","value":{"rev":"3-bad8bf6722461627eac7d0141e09b3f7"}}, -{"id":"fe-fu","key":"fe-fu","value":{"rev":"21-f3cb04870621ce40da8ffa009686bdeb"}}, -{"id":"feed-tables","key":"feed-tables","value":{"rev":"9-4410bad138f4df570e7be37bb17209b3"}}, -{"id":"feedBum","key":"feedBum","value":{"rev":"3-b4ff9edffb0c5c33c4ed40f60a12611a"}}, -{"id":"feedparser","key":"feedparser","value":{"rev":"5-eb2c32e00832ed7036eb1b87d2eea33e"}}, -{"id":"feral","key":"feral","value":{"rev":"19-0b512b6301a26ca5502710254bd5a9ba"}}, -{"id":"fermata","key":"fermata","value":{"rev":"25-eeafa3e5b769a38b8a1065c0a66e0653"}}, -{"id":"ferret","key":"ferret","value":{"rev":"9-7ab6b29cb0cad9855d927855c2a27bff"}}, -{"id":"ffmpeg-node","key":"ffmpeg-node","value":{"rev":"3-e55011ecb147f599475a12b10724a583"}}, -{"id":"ffmpeg2theora","key":"ffmpeg2theora","value":{"rev":"13-05d2f83dbbb90e832176ebb7fdc2ae2e"}}, -{"id":"fiberize","key":"fiberize","value":{"rev":"5-dfb978d6b88db702f68a13e363fb21af"}}, -{"id":"fibers","key":"fibers","value":{"rev":"71-4b22dbb449839723ed9b0d533339c764"}}, -{"id":"fibers-promise","key":"fibers-promise","value":{"rev":"9-3a9977528f8df079969d4ae48db7a0a7"}}, -{"id":"fidel","key":"fidel","value":{"rev":"37-370838ed9984cfe6807114b5fef789e6"}}, -{"id":"fig","key":"fig","value":{"rev":"7-24acf90e7d06dc8b83adb02b5776de3c"}}, -{"id":"file","key":"file","value":{"rev":"6-1131008db6855f20969413be7cc2e968"}}, -{"id":"file-api","key":"file-api","value":{"rev":"9-a9cc8f3de14eef5bba86a80f6705651c"}}, -{"id":"fileify","key":"fileify","value":{"rev":"17-50603c037d5e3a0a405ff4af3e71211f"}}, -{"id":"filepad","key":"filepad","value":{"rev":"23-8c4b2c04151723033523369c42144cc9"}}, -{"id":"filerepl","key":"filerepl","value":{"rev":"5-94999cc91621e08f96ded7423ed6d6f0"}}, -{"id":"fileset","key":"fileset","value":{"rev":"3-ea6a9f45aaa5e65279463041ee629dbe"}}, -{"id":"filestore","key":"filestore","value":{"rev":"9-6cce7c9cd2b2b11d12905885933ad25a"}}, -{"id":"filesystem-composer","key":"filesystem-composer","value":{"rev":"34-f1d04d711909f3683c1d00cd4ab7ca47"}}, -{"id":"fileutils","key":"fileutils","value":{"rev":"3-88876b61c9d0a915f95ce0f258e5ce51"}}, -{"id":"filter","key":"filter","value":{"rev":"3-4032087a5cf2de3dd164c95454a2ab05"}}, -{"id":"filter-chain","key":"filter-chain","value":{"rev":"5-c522429dc83ccc7dde4eaf5409070332"}}, -{"id":"fin","key":"fin","value":{"rev":"23-77cf12e84eb62958b40aa08fdcbb259d"}}, -{"id":"fin-id","key":"fin-id","value":{"rev":"3-9f85ee1e426d4bdad5904002a6d9342c"}}, -{"id":"finance","key":"finance","value":{"rev":"3-cf97ddb6af3f6601bfb1e49a600f56af"}}, -{"id":"finder","key":"finder","value":{"rev":"13-65767fe51799a397ddd9b348ead12ed2"}}, -{"id":"findit","key":"findit","value":{"rev":"15-435e4168208548a2853f6efcd4529de3"}}, -{"id":"fingerprint","key":"fingerprint","value":{"rev":"3-c40e2169260010cac472e688c392ea3d"}}, -{"id":"finjector","key":"finjector","value":{"rev":"5-646da199b0b336d20e421ef6ad613e90"}}, -{"id":"firebird","key":"firebird","value":{"rev":"5-7e7ec03bc00e562f5f7afc7cad76da77"}}, -{"id":"firmata","key":"firmata","value":{"rev":"20-f3cbde43ce2677a208bcf3599af5b670"}}, -{"id":"first","key":"first","value":{"rev":"3-c647f6fc1353a1c7b49f5e6cd1905b1e"}}, -{"id":"fishback","key":"fishback","value":{"rev":"19-27a0fdc8c3abe4d61fff9c7a098f3fd9"}}, -{"id":"fitbit-js","key":"fitbit-js","value":{"rev":"3-62fe0869ddefd2949d8c1e568f994c93"}}, -{"id":"fix","key":"fix","value":{"rev":"17-4a79db9924922da010df71e5194bcac6"}}, -{"id":"flagpoll","key":"flagpoll","value":{"rev":"3-0eb7b98e2a0061233aa5228eb7348dff"}}, -{"id":"flags","key":"flags","value":{"rev":"3-594f0ec2e903ac74556d1c1f7c6cca3b"}}, -{"id":"flexcache","key":"flexcache","value":{"rev":"11-e1e4eeaa0793d95056a857bec04282ae"}}, -{"id":"flickr-conduit","key":"flickr-conduit","value":{"rev":"7-d3b2b610171589db68809c3ec3bf2bcb"}}, -{"id":"flickr-js","key":"flickr-js","value":{"rev":"5-66c8e8a00ad0a906f632ff99cf490163"}}, -{"id":"flickr-reflection","key":"flickr-reflection","value":{"rev":"6-3c34c3ac904b6d6f26182807fbb95c5e"}}, -{"id":"flo","key":"flo","value":{"rev":"3-ce440035f0ec9a10575b1c8fab0c77da"}}, -{"id":"flow","key":"flow","value":{"rev":"6-95841a07c96f664d49d1af35373b3dbc"}}, -{"id":"flowcontrol","key":"flowcontrol","value":{"rev":"3-093bbbc7496072d9ecb136a826680366"}}, -{"id":"flowjs","key":"flowjs","value":{"rev":"3-403fc9e107ec70fe06236c27e70451c7"}}, -{"id":"fluent-ffmpeg","key":"fluent-ffmpeg","value":{"rev":"33-5982779d5f55a5915f0f8b0353f1fe2a"}}, -{"id":"flume-rpc","key":"flume-rpc","value":{"rev":"7-4214a2db407a3e64f036facbdd34df91"}}, -{"id":"flux","key":"flux","value":{"rev":"3-1ad83106af7ee83547c797246bd2c8b1"}}, -{"id":"fly","key":"fly","value":{"rev":"9-0a45b1b97f56ba0faf4af4777b473fad"}}, -{"id":"fn","key":"fn","value":{"rev":"5-110bab5d623b3628e413d972e040ed26"}}, -{"id":"fnProxy","key":"fnProxy","value":{"rev":"3-db1c90e5a06992ed290c679ac6dbff6a"}}, -{"id":"follow","key":"follow","value":{"rev":"3-44256c802b4576fcbae1264e9b824e6a"}}, -{"id":"fomatto","key":"fomatto","value":{"rev":"7-31ce5c9eba7f084ccab2dc5994796f2d"}}, -{"id":"foounit","key":"foounit","value":{"rev":"20-caf9cd90d6c94d19be0b3a9c9cb33ee0"}}, -{"id":"forEachAsync","key":"forEachAsync","value":{"rev":"3-d9cd8021ea9d5014583327752a9d01c4"}}, -{"id":"forever","key":"forever","value":{"rev":"99-90060d5d1754b1bf749e5278a2a4516b"}}, -{"id":"forge","key":"forge","value":{"rev":"9-0d9d59fd2d47a804e600aaef538ebbbf"}}, -{"id":"fork","key":"fork","value":{"rev":"13-f355105e07608de5ae2f3e7c0817af52"}}, -{"id":"forker","key":"forker","value":{"rev":"11-9717e2e3fa60b46df08261d936d9e5d7"}}, -{"id":"form-data","key":"form-data","value":{"rev":"3-5750e73f7a0902ec2fafee1db6d2e6f6"}}, -{"id":"form-validator","key":"form-validator","value":{"rev":"25-7d016b35895dc58ffd0bbe54fd9be241"}}, -{"id":"form2json","key":"form2json","value":{"rev":"8-7501dd9b43b9fbb7194b94e647816e5e"}}, -{"id":"formaline","key":"formaline","value":{"rev":"3-2d45fbb3e83b7e77bde0456607e6f1e3"}}, -{"id":"format","key":"format","value":{"rev":"7-5dddc67c10de521ef06a7a07bb3f7e2e"}}, -{"id":"formatdate","key":"formatdate","value":{"rev":"3-6d522e3196fe3b438fcc4aed0f7cf690"}}, -{"id":"formidable","key":"formidable","value":{"rev":"87-d27408b00793fee36f6632a895372590"}}, -{"id":"forms","key":"forms","value":{"rev":"6-253e032f07979b79c2e7dfa01be085dc"}}, -{"id":"forrst","key":"forrst","value":{"rev":"3-ef553ff1b6383bab0f81f062cdebac53"}}, -{"id":"fortumo","key":"fortumo","value":{"rev":"6-def3d146b29b6104019c513ce20bb61f"}}, -{"id":"foss-credits","key":"foss-credits","value":{"rev":"3-c824326e289e093406b2de4efef70cb7"}}, -{"id":"foss-credits-collection","key":"foss-credits-collection","value":{"rev":"17-de4ffca51768a36c8fb1b9c2bc66c80f"}}, -{"id":"foursquareonnode","key":"foursquareonnode","value":{"rev":"5-a4f0a1ed5d3be3056f10f0e9517efa83"}}, -{"id":"fraggle","key":"fraggle","value":{"rev":"7-b9383baf96bcdbd4022b4b887e4a3729"}}, -{"id":"framework","key":"framework","value":{"rev":"3-afb19a9598a0d50320b4f1faab1ae2c6"}}, -{"id":"frameworkjs","key":"frameworkjs","value":{"rev":"7-cd418da3272c1e8349126e442ed15dbd"}}, -{"id":"frank","key":"frank","value":{"rev":"12-98031fb56f1c89dfc7888f5d8ca7f0a9"}}, -{"id":"freakset","key":"freakset","value":{"rev":"21-ba60d0840bfa3da2c8713c3c2e6856a0"}}, -{"id":"freckle","key":"freckle","value":{"rev":"3-8e2e9a07b2650fbbd0a598b948ef993b"}}, -{"id":"freebase","key":"freebase","value":{"rev":"7-a1daf1cc2259b886f574f5c902eebcf4"}}, -{"id":"freecontrol","key":"freecontrol","value":{"rev":"6-7a51776b8764f406573d5192bab36adf"}}, -{"id":"freestyle","key":"freestyle","value":{"rev":"9-100f9e9d3504d6e1c6a2d47651c70f51"}}, -{"id":"frenchpress","key":"frenchpress","value":{"rev":"9-306d6ac21837879b8040d7f9aa69fc20"}}, -{"id":"fs-boot","key":"fs-boot","value":{"rev":"20-72b44b403767aa486bf1dc987c750733"}}, -{"id":"fs-ext","key":"fs-ext","value":{"rev":"10-3360831c3852590a762f8f82525c025e"}}, -{"id":"fsevents","key":"fsevents","value":{"rev":"6-bb994f41842e144cf43249fdf6bf51e1"}}, -{"id":"fsext","key":"fsext","value":{"rev":"9-a1507d84e91ddf26ffaa76016253b4fe"}}, -{"id":"fsh","key":"fsh","value":{"rev":"5-1e3784b2df1c1a28b81f27907945f48b"}}, -{"id":"fsm","key":"fsm","value":{"rev":"5-b113be7b30b2a2c9089edcb6fa4c15d3"}}, -{"id":"fswatch","key":"fswatch","value":{"rev":"11-287eea565c9562161eb8969d765bb191"}}, -{"id":"ftp","key":"ftp","value":{"rev":"5-751e312520c29e76f7d79c648248c56c"}}, -{"id":"ftp-get","key":"ftp-get","value":{"rev":"27-1e908bd075a0743dbb1d30eff06485e2"}}, -{"id":"fugue","key":"fugue","value":{"rev":"81-0c08e67e8deb4b5b677fe19f8362dbd8"}}, -{"id":"fullauto","key":"fullauto","value":{"rev":"9-ef915156026dabded5a4a76c5a751916"}}, -{"id":"fun","key":"fun","value":{"rev":"12-8396e3583e206dbf90bbea4316976f66"}}, -{"id":"functional","key":"functional","value":{"rev":"5-955979028270f5d3749bdf86b4d2c925"}}, -{"id":"functools","key":"functools","value":{"rev":"5-42ba84ce365bf8c0aaf3e5e6c369920b"}}, -{"id":"funk","key":"funk","value":{"rev":"14-67440a9b2118d8f44358bf3b17590243"}}, -{"id":"fusion","key":"fusion","value":{"rev":"19-64983fc6e5496c836be26e5fbc8527d1"}}, -{"id":"fusker","key":"fusker","value":{"rev":"48-58f05561c65ad288a78fa7210f146ba1"}}, -{"id":"future","key":"future","value":{"rev":"3-0ca60d8ae330e40ef6cf8c17a421d668"}}, -{"id":"futures","key":"futures","value":{"rev":"44-8a2aaf0f40cf84c9475824d9cec006ad"}}, -{"id":"fuzzy_file_finder","key":"fuzzy_file_finder","value":{"rev":"8-ee555aae1d433e60166d2af1d72ac6b9"}}, -{"id":"fuzzylogic","key":"fuzzylogic","value":{"rev":"8-596a8f4744d1dabcb8eb6466d9980fca"}}, -{"id":"fxs","key":"fxs","value":{"rev":"3-d3cb81151b0ddd9a4a5934fb63ffff75"}}, -{"id":"g","key":"g","value":{"rev":"3-55742a045425a9b4c9fe0e8925fad048"}}, -{"id":"g.raphael","key":"g.raphael","value":{"rev":"4-190d0235dc08f783dda77b3ecb60b11a"}}, -{"id":"ga","key":"ga","value":{"rev":"3-c47d516ac5e6de8ef7ef9d16fabcf6c7"}}, -{"id":"galletita","key":"galletita","value":{"rev":"3-aa7a01c3362a01794f36e7aa9664b850"}}, -{"id":"game","key":"game","value":{"rev":"3-0f1539e4717a2780205d98ef6ec0886d"}}, -{"id":"gamina","key":"gamina","value":{"rev":"15-871f4970f1e87b7c8ad361456001c76f"}}, -{"id":"gang-bang","key":"gang-bang","value":{"rev":"6-f565cb7027a8ca109481df49a6d41114"}}, -{"id":"gapserver","key":"gapserver","value":{"rev":"9-b25eb0eefc21e407cba596a0946cb3a0"}}, -{"id":"garbage","key":"garbage","value":{"rev":"3-80f4097d5f1f2c75f509430a11c8a15e"}}, -{"id":"gaseous","key":"gaseous","value":{"rev":"3-8021582ab9dde42d235193e6067be72d"}}, -{"id":"gaudium","key":"gaudium","value":{"rev":"11-7d612f1c5d921180ccf1c162fe2c7446"}}, -{"id":"gauss","key":"gauss","value":{"rev":"3-8fd18b2d7a223372f190797e4270a535"}}, -{"id":"gcli","key":"gcli","value":{"rev":"3-210404347cc643e924cec678d0195099"}}, -{"id":"gcw2html","key":"gcw2html","value":{"rev":"3-2aff7bff7981f2f9800c5f65812aa0a6"}}, -{"id":"gd","key":"gd","value":{"rev":"4-ac5a662e709a2993ed1fd1cbf7c4d7b4"}}, -{"id":"gdata","key":"gdata","value":{"rev":"3-c6b3a95064a1e1e0bb74f248ab4e73c4"}}, -{"id":"gdata-js","key":"gdata-js","value":{"rev":"17-0959500a4000d7058d8116af1e01b0d9"}}, -{"id":"gearman","key":"gearman","value":{"rev":"8-ac9fb7af75421ca2988d6098dbfd4c7c"}}, -{"id":"gearnode","key":"gearnode","value":{"rev":"7-8e40ec257984e887e2ff5948a6dde04e"}}, -{"id":"geck","key":"geck","value":{"rev":"161-c8117106ef58a6d7d21920df80159eab"}}, -{"id":"geddy","key":"geddy","value":{"rev":"13-da16f903aca1ec1f47086fa250b58abb"}}, -{"id":"gen","key":"gen","value":{"rev":"3-849005c8b8294c2a811ff4eccdedf436"}}, -{"id":"generic-function","key":"generic-function","value":{"rev":"5-dc046f58f96119225efb17ea5334a60f"}}, -{"id":"generic-pool","key":"generic-pool","value":{"rev":"18-65ff988620293fe7ffbd0891745c3ded"}}, -{"id":"genji","key":"genji","value":{"rev":"49-4c72bcaa57572ad0d43a1b7e9e5a963a"}}, -{"id":"genstatic","key":"genstatic","value":{"rev":"19-4278d0766226af4db924bb0f6b127699"}}, -{"id":"gently","key":"gently","value":{"rev":"24-c9a3ba6b6fd183ee1b5dda569122e978"}}, -{"id":"genx","key":"genx","value":{"rev":"7-f0c0ff65e08e045e8dd1bfcb25ca48d4"}}, -{"id":"geo","key":"geo","value":{"rev":"7-fa2a79f7260b849c277735503a8622e9"}}, -{"id":"geo-distance","key":"geo-distance","value":{"rev":"7-819a30e9b4776e4416fe9510ca79cd93"}}, -{"id":"geocoder","key":"geocoder","value":{"rev":"15-736e627571ad8dba3a9d0da1ae019c35"}}, -{"id":"geohash","key":"geohash","value":{"rev":"6-b9e62c804abe565425a8e6a01354407a"}}, -{"id":"geoip","key":"geoip","value":{"rev":"231-e5aa7acd5fb44833a67f96476b4fac49"}}, -{"id":"geoip-lite","key":"geoip-lite","value":{"rev":"9-efd916135c056406ede1ad0fe15534fa"}}, -{"id":"geojs","key":"geojs","value":{"rev":"35-b0f97b7c72397d6eb714602dc1121183"}}, -{"id":"geolib","key":"geolib","value":{"rev":"3-923a8622d1bd97c22f71ed6537ba5062"}}, -{"id":"geonode","key":"geonode","value":{"rev":"35-c2060653af72123f2f9994fca1c86d70"}}, -{"id":"geoutils","key":"geoutils","value":{"rev":"6-2df101fcbb01849533b2fbc80dc0eb7a"}}, -{"id":"gerbil","key":"gerbil","value":{"rev":"3-b5961044bda490a34085ca826aeb3022"}}, -{"id":"gerenuk","key":"gerenuk","value":{"rev":"13-4e45a640bcbadc3112e105ec5b60b907"}}, -{"id":"get","key":"get","value":{"rev":"18-dd215d673f19bbd8b321a7dd63e004e8"}}, -{"id":"getopt","key":"getopt","value":{"rev":"3-454354e4557d5e7205410acc95c9baae"}}, -{"id":"getrusage","key":"getrusage","value":{"rev":"8-d6ef24793b8e4c46f3cdd14937cbabe1"}}, -{"id":"gettext","key":"gettext","value":{"rev":"3-4c12268a4cab64ec4ef3ac8c9ec7912b"}}, -{"id":"getz","key":"getz","value":{"rev":"9-f3f43934139c9af6ddfb8b91e9a121ba"}}, -{"id":"gevorg.me","key":"gevorg.me","value":{"rev":"33-700502b8ca7041bf8d29368069cac365"}}, -{"id":"gex","key":"gex","value":{"rev":"3-105824d7a3f9c2ac7313f284c3f81d22"}}, -{"id":"gexode","key":"gexode","value":{"rev":"3-4a3552eae4ff3ba4443f9371a1ab4b2e"}}, -{"id":"gfx","key":"gfx","value":{"rev":"8-1f6c90bc3819c3b237e8d1f28ad1b136"}}, -{"id":"gherkin","key":"gherkin","value":{"rev":"77-6e835c8107bb4c7c8ad1fa072ac12c20"}}, -{"id":"ghm","key":"ghm","value":{"rev":"3-c440ae39832a575087ff1920b33c275b"}}, -{"id":"gif","key":"gif","value":{"rev":"14-e65638621d05b99ffe71b18097f29134"}}, -{"id":"gimme","key":"gimme","value":{"rev":"7-caab8354fe257fc307f8597e34ede547"}}, -{"id":"gist","key":"gist","value":{"rev":"11-eea7ea1adf3cde3a0804d2e1b0d6f7d6"}}, -{"id":"gista","key":"gista","value":{"rev":"23-48b8c374cfb8fc4e8310f3469cead6d5"}}, -{"id":"gisty","key":"gisty","value":{"rev":"5-1a898d0816f4129ab9a0d3f03ff9feb4"}}, -{"id":"git","key":"git","value":{"rev":"39-1f77df3ebeec9aae47ae8df56de6757f"}}, -{"id":"git-fs","key":"git-fs","value":{"rev":"14-7d365cddff5029a9d11fa8778a7296d2"}}, -{"id":"gitProvider","key":"gitProvider","value":{"rev":"9-c704ae702ef27bb57c0efd279a464e28"}}, -{"id":"github","key":"github","value":{"rev":"16-9345138ca7507c12be4a817b1abfeef6"}}, -{"id":"github-flavored-markdown","key":"github-flavored-markdown","value":{"rev":"3-f12043eb2969aff51db742b13d329446"}}, -{"id":"gitteh","key":"gitteh","value":{"rev":"39-88b00491fd4ce3294b8cdf61b9708383"}}, -{"id":"gitter","key":"gitter","value":{"rev":"16-88d7ef1ab6a7e751ca2cf6b50894deb4"}}, -{"id":"gittyup","key":"gittyup","value":{"rev":"37-ed6030c1acdd8b989ac34cd10d6dfd1e"}}, -{"id":"gitweb","key":"gitweb","value":{"rev":"9-5331e94c6df9ee7724cde3738a0c6230"}}, -{"id":"gitwiki","key":"gitwiki","value":{"rev":"9-0f167a3a87bce7f3e941136a06e91810"}}, -{"id":"gizmo","key":"gizmo","value":{"rev":"5-1da4da8d66690457c0bf743473b755f6"}}, -{"id":"gleak","key":"gleak","value":{"rev":"17-d44a968b32e4fdc7d27bacb146391422"}}, -{"id":"glob","key":"glob","value":{"rev":"203-4a79e232cf6684a48ccb9134a6ce938c"}}, -{"id":"glob-trie.js","key":"glob-trie.js","value":{"rev":"7-bff534e3aba8f6333fa5ea871b070de2"}}, -{"id":"global","key":"global","value":{"rev":"3-f15b0c9ae0ea9508890bff25c8e0f795"}}, -{"id":"globalize","key":"globalize","value":{"rev":"5-33d10c33fb24af273104f66098e246c4"}}, -{"id":"glossary","key":"glossary","value":{"rev":"3-5e143d09d22a01eb2ee742ceb3e18f6e"}}, -{"id":"glossy","key":"glossy","value":{"rev":"9-f31e00844e8be49e5812fe64a6f1e1cc"}}, -{"id":"gm","key":"gm","value":{"rev":"28-669722d34a3dc29c8c0b27abd73493a1"}}, -{"id":"gnarly","key":"gnarly","value":{"rev":"3-796f5df3483f304cb404cc7ac7702512"}}, -{"id":"gnomenotify","key":"gnomenotify","value":{"rev":"9-bc066c0556ad4a20e7a7ae58cdc4cf91"}}, -{"id":"gofer","key":"gofer","value":{"rev":"15-3fc77ce34e95ffecd12d3854a1bb2da9"}}, -{"id":"goo.gl","key":"goo.gl","value":{"rev":"37-eac7c44d33cc42c618372f0bdd4365c2"}}, -{"id":"goodreads","key":"goodreads","value":{"rev":"5-acd9fe24139aa8b81b26431dce9954aa"}}, -{"id":"goog","key":"goog","value":{"rev":"13-c964ecfcef4d20c8c7d7526323257c04"}}, -{"id":"googl","key":"googl","value":{"rev":"8-2d4d80ef0c5f93400ec2ec8ef80de433"}}, -{"id":"google-openid","key":"google-openid","value":{"rev":"19-380884ba97e3d6fc48c8c7db3dc0e91b"}}, -{"id":"google-spreadsheets","key":"google-spreadsheets","value":{"rev":"3-f640ef136c4b5e90210c2d5d43102b38"}}, -{"id":"google-voice","key":"google-voice","value":{"rev":"37-2e1c3cba3455852f26b0ccaf1fed7125"}}, -{"id":"googleanalytics","key":"googleanalytics","value":{"rev":"8-1d3e470ce4aacadb0418dd125887813d"}}, -{"id":"googleclientlogin","key":"googleclientlogin","value":{"rev":"23-5de8ee62c0ddbc63a001a36a6afe730e"}}, -{"id":"googlediff","key":"googlediff","value":{"rev":"3-438a2f0758e9770a157ae4cce9b6f49e"}}, -{"id":"googlemaps","key":"googlemaps","value":{"rev":"18-bc939560c587711f3d96f3caadd65a7f"}}, -{"id":"googleplus-scraper","key":"googleplus-scraper","value":{"rev":"7-598ea99bd64f4ad69cccb74095abae59"}}, -{"id":"googlereaderauth","key":"googlereaderauth","value":{"rev":"5-cd0eb8ca36ea78620af0fce270339a7b"}}, -{"id":"googlesets","key":"googlesets","value":{"rev":"5-1b2e597e903c080182b3306d63278fd9"}}, -{"id":"googleweather","key":"googleweather","value":{"rev":"3-6bfdaaeedb8a712ee3e89a8ed27508eb"}}, -{"id":"gopostal.node","key":"gopostal.node","value":{"rev":"3-14ff3a655dc3680c9e8e2751ebe294bc"}}, -{"id":"gowallan","key":"gowallan","value":{"rev":"3-23adc9c01a6b309eada47602fdc8ed90"}}, -{"id":"gowiththeflow","key":"gowiththeflow","value":{"rev":"3-52bb6cf6294f67ba5a892db4666d3790"}}, -{"id":"gpg","key":"gpg","value":{"rev":"5-0ca2b5af23e108a4f44f367992a75fed"}}, -{"id":"graceful-fs","key":"graceful-fs","value":{"rev":"3-01e9f7d1c0f6e6a611a60ee84de1f5cc"}}, -{"id":"gracie","key":"gracie","value":{"rev":"3-aa0f7c01a33c7c1e9a49b86886ef5255"}}, -{"id":"graff","key":"graff","value":{"rev":"7-5ab558cb24e30abd67f2a1dbf47cd639"}}, -{"id":"graft","key":"graft","value":{"rev":"3-7419de38b249b891bf7998bcdd2bf557"}}, -{"id":"grain","key":"grain","value":{"rev":"3-e57cbf02121970da230964ddbfd31432"}}, -{"id":"grainstore","key":"grainstore","value":{"rev":"19-5f9c5bb13b2c9ac4e6a05aec33aeb7c5"}}, -{"id":"graph","key":"graph","value":{"rev":"7-909d2fefcc84b5dd1512b60d631ea4e5"}}, -{"id":"graphquire","key":"graphquire","value":{"rev":"27-246e798f80b3310419644302405d68ad"}}, -{"id":"graphviz","key":"graphviz","value":{"rev":"8-3b79341eaf3f67f91bce7c88c08b9f0d"}}, -{"id":"grasshopper","key":"grasshopper","value":{"rev":"45-4002406990476b74dac5108bd19c4274"}}, -{"id":"gravatar","key":"gravatar","value":{"rev":"11-0164b7ac97e8a477b4e8791eae2e7fea"}}, -{"id":"grave","key":"grave","value":{"rev":"3-136f6378b956bc5dd9773250f8813038"}}, -{"id":"gravity","key":"gravity","value":{"rev":"5-dd40fcee1a769ce786337e9536d24244"}}, -{"id":"graylog","key":"graylog","value":{"rev":"5-abcff9cd91ff20e36f8a70a3f2de658b"}}, -{"id":"greg","key":"greg","value":{"rev":"5-ececb0a3bb552b6da4f66b8bf6f75cf0"}}, -{"id":"gridcentric","key":"gridcentric","value":{"rev":"4-4378e1c280e18b5aaabd23038b80d76c"}}, -{"id":"gridly","key":"gridly","value":{"rev":"3-86e878756b493da8f66cbd633a15f821"}}, -{"id":"grinder","key":"grinder","value":{"rev":"9-0aaeecf0c81b1c9c93a924c5eb0bff45"}}, -{"id":"grir.am","key":"grir.am","value":{"rev":"3-3ec153c764af1c26b50fefa437318c5a"}}, -{"id":"groundcrew","key":"groundcrew","value":{"rev":"3-9e9ed9b1c70c00c432f36bb853fa21a0"}}, -{"id":"groupie","key":"groupie","value":{"rev":"6-b5e3f0891a7e8811d6112b24bd5a46b4"}}, -{"id":"groupon","key":"groupon","value":{"rev":"21-8b74723c153695f4ed4917575abcca8f"}}, -{"id":"growing-file","key":"growing-file","value":{"rev":"7-995b233a1add5b9ea80aec7ac3f60dc5"}}, -{"id":"growl","key":"growl","value":{"rev":"10-4be41ae10ec96e1334dccdcdced12fe3"}}, -{"id":"gsl","key":"gsl","value":{"rev":"49-3367acfb521b30d3ddb9b80305009553"}}, -{"id":"gss","key":"gss","value":{"rev":"3-e4cffbbbc4536d952d13d46376d899b7"}}, -{"id":"guards","key":"guards","value":{"rev":"8-d7318d3d9dc842ab41e6ef5b88f9d37f"}}, -{"id":"guardtime","key":"guardtime","value":{"rev":"3-5a2942efabab100ffb3dc0fa3b581b7a"}}, -{"id":"guava","key":"guava","value":{"rev":"11-d9390d298b503f0ffb8e3ba92eeb9759"}}, -{"id":"guid","key":"guid","value":{"rev":"16-d99e725bbbf97a326833858767b7ed08"}}, -{"id":"gumbo","key":"gumbo","value":{"rev":"31-727cf5a3b7d8590fff871f27da114d9d"}}, -{"id":"gunther","key":"gunther","value":{"rev":"9-f95c89128412208d16acd3e615844115"}}, -{"id":"gzbz2","key":"gzbz2","value":{"rev":"3-e1844b1b3a7881a0c8dc0dd4edcc11ca"}}, -{"id":"gzip","key":"gzip","value":{"rev":"17-37afa05944f055d6f43ddc87c1b163c2"}}, -{"id":"gzip-stack","key":"gzip-stack","value":{"rev":"8-cf455d60277832c60ee622d198c0c51a"}}, -{"id":"gzippo","key":"gzippo","value":{"rev":"15-6416c13ecbbe1c5cd3e30adf4112ead7"}}, -{"id":"h5eb","key":"h5eb","value":{"rev":"3-11ed2566fa4b8a01ff63a720c94574cd"}}, -{"id":"hack","key":"hack","value":{"rev":"3-70f536dd46719e8201a6ac5cc96231f6"}}, -{"id":"hack.io","key":"hack.io","value":{"rev":"18-128305614e7fd6b461248bf3bfdd7ab7"}}, -{"id":"hacktor","key":"hacktor","value":{"rev":"3-51b438df35ba8a955d434ab25a4dad67"}}, -{"id":"haibu","key":"haibu","value":{"rev":"99-b29b8c37be42f90985c6d433d53c8679"}}, -{"id":"haibu-carapace","key":"haibu-carapace","value":{"rev":"22-9a89b2f495e533d0f93e4ee34121e48c"}}, -{"id":"haibu-nginx","key":"haibu-nginx","value":{"rev":"7-e176128dc6dbb0d7f5f33369edf1f7ee"}}, -{"id":"halfstreamxml","key":"halfstreamxml","value":{"rev":"7-5c0f3defa6ba921f8edb564584553df4"}}, -{"id":"ham","key":"ham","value":{"rev":"3-1500dc495cade7334f6a051f2758f748"}}, -{"id":"haml","key":"haml","value":{"rev":"15-a93e7762c7d43469a06519472497fd93"}}, -{"id":"haml-edge","key":"haml-edge","value":{"rev":"5-c4e44a73263ac9b7e632375de7e43d7c"}}, -{"id":"hamljs","key":"hamljs","value":{"rev":"10-a01c7214b69992352bde44938418ebf4"}}, -{"id":"hamljs-coffee","key":"hamljs-coffee","value":{"rev":"3-c2733c8ff38f5676075b84cd7f3d8684"}}, -{"id":"handlebars","key":"handlebars","value":{"rev":"4-0e21906b78605f7a1d5ec7cb4c7d35d7"}}, -{"id":"hanging-gardens","key":"hanging-gardens","value":{"rev":"27-3244e37f08bea0e31759e9f38983f59a"}}, -{"id":"hanging_gardens_registry","key":"hanging_gardens_registry","value":{"rev":"17-d87aa3a26f91dc314f02c686672a5ec6"}}, -{"id":"hapi","key":"hapi","value":{"rev":"3-ed721fe9aae4a459fe0945dabd7d680a"}}, -{"id":"harmony","key":"harmony","value":{"rev":"3-d6c9d6acc29d29c97c75c77f7c8e1390"}}, -{"id":"hascan","key":"hascan","value":{"rev":"13-a7ab15c72f464b013cbc55dc426543ca"}}, -{"id":"hash_ring","key":"hash_ring","value":{"rev":"12-0f072b1dd1fd93ae2f2b79f5ea72074d"}}, -{"id":"hashbangify","key":"hashbangify","value":{"rev":"5-738e0cf99649d41c19d3449c0e9a1cbf"}}, -{"id":"hashish","key":"hashish","value":{"rev":"9-62c5e74355458e1ead819d87151b7d38"}}, -{"id":"hashkeys","key":"hashkeys","value":{"rev":"3-490809bdb61f930f0d9f370eaadf36ea"}}, -{"id":"hashlib","key":"hashlib","value":{"rev":"7-1f19c9d6062ff22ed2e963204a1bd405"}}, -{"id":"hashring","key":"hashring","value":{"rev":"11-4c9f2b1ba7931c8bab310f4ecaf91419"}}, -{"id":"hashtable","key":"hashtable","value":{"rev":"7-2aaf2667cbdb74eb8da61e2e138059ca"}}, -{"id":"hat","key":"hat","value":{"rev":"9-6f37874d9703eab62dc875e2373837a8"}}, -{"id":"hbase","key":"hbase","value":{"rev":"20-7ca92712de26ffb18d275a21696aa263"}}, -{"id":"hbase-thrift","key":"hbase-thrift","value":{"rev":"7-39afb33a4e61cc2b3dc94f0c7fd32c65"}}, -{"id":"hbs","key":"hbs","value":{"rev":"29-aa2676e6790c5716f84f128dcd03e797"}}, -{"id":"header-stack","key":"header-stack","value":{"rev":"13-7ad1ccf3c454d77029c000ceb18ce5ab"}}, -{"id":"headers","key":"headers","value":{"rev":"13-04f8f5f25e2dd9890f6b2f120adf297a"}}, -{"id":"healthety","key":"healthety","value":{"rev":"60-07c67c22ee2a13d0ad675739d1814a6d"}}, -{"id":"heatmap","key":"heatmap","value":{"rev":"9-c53f4656d9517f184df7aea9226c1765"}}, -{"id":"heavy-flow","key":"heavy-flow","value":{"rev":"5-0b9188334339e7372b364a7fc730c639"}}, -{"id":"heckle","key":"heckle","value":{"rev":"13-b462abef7b9d1471ed8fb8f23af463e0"}}, -{"id":"helium","key":"helium","value":{"rev":"3-4d6ce9618c1be522268944240873f53e"}}, -{"id":"hello-world","key":"hello-world","value":{"rev":"3-e87f287308a209491c011064a87100b7"}}, -{"id":"hello.io","key":"hello.io","value":{"rev":"3-39b78278fa638495522edc7a84f6a52e"}}, -{"id":"helloworld","key":"helloworld","value":{"rev":"3-8f163aebdcf7d8761709bdbb634c3689"}}, -{"id":"helpers","key":"helpers","value":{"rev":"3-67d75b1c8e5ad2a268dd4ea191d4754b"}}, -{"id":"helpful","key":"helpful","value":{"rev":"41-e11bed25d5a0ca7e7ad116d5a339ec2a"}}, -{"id":"hem","key":"hem","value":{"rev":"27-042fc9d4b96f20112cd943e019e54d20"}}, -{"id":"hempwick","key":"hempwick","value":{"rev":"11-de1f6f0f23937d9f33286e12ee877540"}}, -{"id":"heritable","key":"heritable","value":{"rev":"13-1468ff92063251a037bbe80ee987a9c3"}}, -{"id":"hermes-raw-client","key":"hermes-raw-client","value":{"rev":"11-5d143c371cb8353612badc72be1917ff"}}, -{"id":"heru","key":"heru","value":{"rev":"3-d124a20939e30e2a3c08f7104b2a1a5c"}}, -{"id":"hexdump","key":"hexdump","value":{"rev":"3-c455710ca80662969ccbca3acc081cb8"}}, -{"id":"hexy","key":"hexy","value":{"rev":"16-5142b0461622436daa2e476d252770f2"}}, -{"id":"highlight","key":"highlight","value":{"rev":"9-4b172b7aef6f40d768f022b2ba4e6748"}}, -{"id":"highlight.js","key":"highlight.js","value":{"rev":"5-16c1ebd28d5f2e781e666c6ee013c30c"}}, -{"id":"hiker","key":"hiker","value":{"rev":"9-89d1ce978b349f1f0df262655299d83c"}}, -{"id":"hipchat","key":"hipchat","value":{"rev":"3-73118782367d474af0f6410290df5f7f"}}, -{"id":"hipchat-js","key":"hipchat-js","value":{"rev":"3-253b83875d3e18e9c89333bc377183c3"}}, -{"id":"hiredis","key":"hiredis","value":{"rev":"46-29ceb03860efbd4b3b995247f27f78b9"}}, -{"id":"hive","key":"hive","value":{"rev":"15-40a4c6fcfa3b80007a18ef4ede80075b"}}, -{"id":"hive-cache","key":"hive-cache","value":{"rev":"3-36b10607b68586fccbfeb856412bd6bf"}}, -{"id":"hoard","key":"hoard","value":{"rev":"13-75d4c484095e2e38ac63a65bd9fd7f4b"}}, -{"id":"hook","key":"hook","value":{"rev":"7-2f1e375058e2b1fa61d3651f6d57a6f8"}}, -{"id":"hook.io","key":"hook.io","value":{"rev":"63-9fac4fb8337d1953963d47144f806f72"}}, -{"id":"hook.io-browser","key":"hook.io-browser","value":{"rev":"3-7e04347d80adc03eb5637b7e4b8ca58b"}}, -{"id":"hook.io-couch","key":"hook.io-couch","value":{"rev":"3-ce0eb281d1ba21aa1caca3a52553a07b"}}, -{"id":"hook.io-cron","key":"hook.io-cron","value":{"rev":"15-50deedc2051ce65bca8a42048154139c"}}, -{"id":"hook.io-helloworld","key":"hook.io-helloworld","value":{"rev":"23-ef5cf0cec9045d28d846a7b0872874e4"}}, -{"id":"hook.io-irc","key":"hook.io-irc","value":{"rev":"5-39c7ac5e192aef34b87af791fa77ee04"}}, -{"id":"hook.io-logger","key":"hook.io-logger","value":{"rev":"13-9e3208ea8eacfe5378cd791f2377d06d"}}, -{"id":"hook.io-mailer","key":"hook.io-mailer","value":{"rev":"9-d9415d53dc086102024cf7400fdfb7a2"}}, -{"id":"hook.io-pinger","key":"hook.io-pinger","value":{"rev":"17-860ab3a892284b91999f86c3882e2ff5"}}, -{"id":"hook.io-repl","key":"hook.io-repl","value":{"rev":"13-c0d430ccdfd197e4746c46d2814b6d92"}}, -{"id":"hook.io-request","key":"hook.io-request","value":{"rev":"13-f0e8d167d59917d90266f921e3ef7c64"}}, -{"id":"hook.io-sitemonitor","key":"hook.io-sitemonitor","value":{"rev":"8-725ea7deb9cb1031eabdc4fd798308ff"}}, -{"id":"hook.io-twilio","key":"hook.io-twilio","value":{"rev":"11-6b2e231307f6174861aa5dcddad264b3"}}, -{"id":"hook.io-twitter","key":"hook.io-twitter","value":{"rev":"3-59296395b22e661e7e5c141c4c7be46d"}}, -{"id":"hook.io-webhook","key":"hook.io-webhook","value":{"rev":"15-b27e51b63c8ec70616c66061d949f388"}}, -{"id":"hook.io-webserver","key":"hook.io-webserver","value":{"rev":"29-eb6bff70736648427329eba08b5f55c3"}}, -{"id":"hook.io-ws","key":"hook.io-ws","value":{"rev":"4-a85578068b54560ef663a7ecfea2731f"}}, -{"id":"hooks","key":"hooks","value":{"rev":"33-6640fb0c27903af6b6ae7b7c41d79e01"}}, -{"id":"hoptoad-notifier","key":"hoptoad-notifier","value":{"rev":"16-8249cb753a3626f2bf2664024ae7a5ee"}}, -{"id":"horaa","key":"horaa","value":{"rev":"5-099e5d6486d10944e10b584eb3f6e924"}}, -{"id":"hornet","key":"hornet","value":{"rev":"22-8c40d7ba4ca832b951e6d5db165f3305"}}, -{"id":"horseman","key":"horseman","value":{"rev":"11-7228e0f84c2036669a218710c22f72c0"}}, -{"id":"hostify","key":"hostify","value":{"rev":"11-8c1a2e73f8b9474a6c26121688c28dc7"}}, -{"id":"hostinfo","key":"hostinfo","value":{"rev":"5-c8d638f40ccf94f4083430966d25e787"}}, -{"id":"hostip","key":"hostip","value":{"rev":"3-d4fd628b94e1f913d97ec1746d96f2a0"}}, -{"id":"hostname","key":"hostname","value":{"rev":"7-55fefb3c37990bbcad3d98684d17f38f"}}, -{"id":"hotnode","key":"hotnode","value":{"rev":"16-d7dad5de3ffc2ca6a04f74686aeb0e4b"}}, -{"id":"howmuchtime","key":"howmuchtime","value":{"rev":"3-351ce870ae6e2c21a798169d074e2a3f"}}, -{"id":"hstore","key":"hstore","value":{"rev":"3-55ab4d359c2fc8725829038e3adb7571"}}, -{"id":"hsume2-socket.io","key":"hsume2-socket.io","value":{"rev":"5-4b537247ae9999c285c802cc36457598"}}, -{"id":"htdoc","key":"htdoc","value":{"rev":"3-80ef9e3202b0d96b79435a2bc90bc899"}}, -{"id":"html","key":"html","value":{"rev":"3-92c4af7de329c92ff2e0be5c13020e78"}}, -{"id":"html-minifier","key":"html-minifier","value":{"rev":"7-2441ed004e2a6e7f1c42003ec03277ec"}}, -{"id":"html-sourcery","key":"html-sourcery","value":{"rev":"11-7ce1d4aa2e1d319fa108b02fb294d4ce"}}, -{"id":"html2coffeekup","key":"html2coffeekup","value":{"rev":"13-bae4a70411f6f549c281c69835fe3276"}}, -{"id":"html2coffeekup-bal","key":"html2coffeekup-bal","value":{"rev":"5-0663ac1339d72932004130b668c949f0"}}, -{"id":"html2jade","key":"html2jade","value":{"rev":"11-e50f504c5c847d7ffcde7328c2ade4fb"}}, -{"id":"html5","key":"html5","value":{"rev":"46-ca85ea99accaf1dc9ded4e2e3aa429c6"}}, -{"id":"html5edit","key":"html5edit","value":{"rev":"10-0383296c33ada4d356740f29121eeb9f"}}, -{"id":"htmlKompressor","key":"htmlKompressor","value":{"rev":"13-95a3afe7f7cfe02e089e41588b937fb1"}}, -{"id":"htmlkup","key":"htmlkup","value":{"rev":"27-5b0115636f38886ae0a40e5f52e2bfdd"}}, -{"id":"htmlparser","key":"htmlparser","value":{"rev":"14-52b2196c1456d821d47bb1d2779b2433"}}, -{"id":"htmlparser2","key":"htmlparser2","value":{"rev":"3-9bc0b807acd913999dfc949b3160a3db"}}, -{"id":"htracr","key":"htracr","value":{"rev":"27-384d0522328e625978b97d8eae8d942d"}}, -{"id":"http","key":"http","value":{"rev":"3-f197d1b599cb9da720d3dd58d9813ace"}}, -{"id":"http-agent","key":"http-agent","value":{"rev":"10-1715dd3a7adccf55bd6637d78bd345d1"}}, -{"id":"http-auth","key":"http-auth","value":{"rev":"3-21636d4430be18a5c6c42e5cb622c2e0"}}, -{"id":"http-basic-auth","key":"http-basic-auth","value":{"rev":"6-0a77e99ce8e31558d5917bd684fa2c9a"}}, -{"id":"http-browserify","key":"http-browserify","value":{"rev":"3-4f720b4af628ed8b5fb22839c1f91f4d"}}, -{"id":"http-console","key":"http-console","value":{"rev":"43-a20cbefed77bcae7de461922286a1f04"}}, -{"id":"http-digest","key":"http-digest","value":{"rev":"6-e0164885dcad21ab6150d537af0edd92"}}, -{"id":"http-digest-auth","key":"http-digest-auth","value":{"rev":"7-613ac841b808fd04e272e050fd5a45ac"}}, -{"id":"http-get","key":"http-get","value":{"rev":"39-b7cfeb2b572d4ecf695493e0886869f4"}}, -{"id":"http-load","key":"http-load","value":{"rev":"3-8c64f4972ff59e89fee041adde99b8ba"}}, -{"id":"http-proxy","key":"http-proxy","value":{"rev":"97-5b8af88886c8c047a9862bf62f6b9294"}}, -{"id":"http-proxy-backward","key":"http-proxy-backward","value":{"rev":"2-4433b04a41e8adade3f6b6b2b939df4b"}}, -{"id":"http-proxy-glimpse","key":"http-proxy-glimpse","value":{"rev":"3-a3e9791d4d9bfef5929ca55d874df18b"}}, -{"id":"http-proxy-no-line-184-error","key":"http-proxy-no-line-184-error","value":{"rev":"3-7e20a990820976d8c6d27c312cc5a67c"}}, -{"id":"http-proxy-selective","key":"http-proxy-selective","value":{"rev":"12-6e273fcd008afeceb6737345c46e1024"}}, -{"id":"http-recorder","key":"http-recorder","value":{"rev":"3-26dd0bc4f5c0bf922db1875e995d025f"}}, -{"id":"http-request-provider","key":"http-request-provider","value":{"rev":"6-436b69971dd1735ac3e41571375f2d15"}}, -{"id":"http-server","key":"http-server","value":{"rev":"21-1b80b6558692afd08c36629b0ecdc18c"}}, -{"id":"http-signature","key":"http-signature","value":{"rev":"9-49ca63427b535f2d18182d92427bc5b6"}}, -{"id":"http-stack","key":"http-stack","value":{"rev":"9-51614060741d6c85a7fd4c714ed1a9b2"}}, -{"id":"http-status","key":"http-status","value":{"rev":"5-1ec72fecc62a41d6f180d15c95e81270"}}, -{"id":"http_compat","key":"http_compat","value":{"rev":"3-88244d4b0fd08a3140fa1b2e8b1b152c"}}, -{"id":"http_router","key":"http_router","value":{"rev":"23-ad52b58b6bfc96d6d4e8215e0c31b294"}}, -{"id":"http_trace","key":"http_trace","value":{"rev":"7-d8024b5e41540e4240120ffefae523e4"}}, -{"id":"httpd","key":"httpd","value":{"rev":"3-9e2a19f007a6a487cdb752f4b8249657"}}, -{"id":"httpmock","key":"httpmock","value":{"rev":"3-b6966ba8ee2c31b0e7729fc59bb00ccf"}}, -{"id":"https-proxied","key":"https-proxied","value":{"rev":"5-f63a4c663d372502b0dcd4997e759e66"}}, -{"id":"httpu","key":"httpu","value":{"rev":"5-88a5b2bac8391d91673fc83d4cfd32df"}}, -{"id":"hungarian-magic","key":"hungarian-magic","value":{"rev":"4-9eae750ac6f30b6687d9a031353f5217"}}, -{"id":"huntergatherer","key":"huntergatherer","value":{"rev":"9-5c9d833a134cfaa901d89dce93f5b013"}}, -{"id":"hxp","key":"hxp","value":{"rev":"8-1f52ba766491826bdc6517c6cc508b2c"}}, -{"id":"hyde","key":"hyde","value":{"rev":"3-5763db65cab423404752b1a6354a7a6c"}}, -{"id":"hydra","key":"hydra","value":{"rev":"8-8bb4ed249fe0f9cdb8b11e492b646b88"}}, -{"id":"hyperpublic","key":"hyperpublic","value":{"rev":"11-5738162f3dbf95803dcb3fb28efd8740"}}, -{"id":"i18n","key":"i18n","value":{"rev":"7-f0d6b3c72ecd34dde02d805041eca996"}}, -{"id":"ical","key":"ical","value":{"rev":"13-baf448be48ab83ec9b3fb8bf83fbb9a1"}}, -{"id":"icalendar","key":"icalendar","value":{"rev":"5-78dd8fd8ed2c219ec56ad26a0727cf76"}}, -{"id":"icecap","key":"icecap","value":{"rev":"9-88d6865078a5e6e1ff998e2e73e593f3"}}, -{"id":"icecapdjs","key":"icecapdjs","value":{"rev":"11-d8e3c718a230d49caa3b5f76cfff7ce9"}}, -{"id":"icecast-stack","key":"icecast-stack","value":{"rev":"9-13b8da6ae373152ab0c8560e2f442af0"}}, -{"id":"ichabod","key":"ichabod","value":{"rev":"19-d0f02ffba80661398ceb80a7e0cbbfe6"}}, -{"id":"icing","key":"icing","value":{"rev":"11-84815e78828190fbaa52d6b93c75cb4f"}}, -{"id":"ico","key":"ico","value":{"rev":"3-5727a35c1df453bfdfa6a03e49725adf"}}, -{"id":"iconv","key":"iconv","value":{"rev":"18-5f5b3193268f1fa099e0112b3e033ffc"}}, -{"id":"iconv-jp","key":"iconv-jp","value":{"rev":"3-660b8f2def930263d2931cae2dcc401d"}}, -{"id":"id3","key":"id3","value":{"rev":"8-afe68aede872cae7b404aaa01c0108a5"}}, -{"id":"idea","key":"idea","value":{"rev":"9-a126c0e52206c51dcf972cf53af0bc32"}}, -{"id":"idiomatic-console","key":"idiomatic-console","value":{"rev":"25-67696c16bf79d1cc8caf4df62677c3ec"}}, -{"id":"idiomatic-stdio","key":"idiomatic-stdio","value":{"rev":"15-9d74c9a8872b1f7c41d6c671d7a14b7d"}}, -{"id":"iglob","key":"iglob","value":{"rev":"6-b8a3518cb67cad20c89f37892a2346a5"}}, -{"id":"ignite","key":"ignite","value":{"rev":"19-06daa730a70f69dc3a0d6d4984905c61"}}, -{"id":"iles-forked-irc-js","key":"iles-forked-irc-js","value":{"rev":"7-eb446f4e0db856e00351a5da2fa20616"}}, -{"id":"image","key":"image","value":{"rev":"8-5f7811db33c210eb38e1880f7cc433f2"}}, -{"id":"imageable","key":"imageable","value":{"rev":"61-9f7e03d3d990d34802f1e9c8019dbbfa"}}, -{"id":"imageinfo","key":"imageinfo","value":{"rev":"11-9bde1a1f0801d94539a4b70b61614849"}}, -{"id":"imagemagick","key":"imagemagick","value":{"rev":"10-b1a1ea405940fecf487da94b733e8c29"}}, -{"id":"imagick","key":"imagick","value":{"rev":"3-21d51d8a265a705881dadbc0c9f7c016"}}, -{"id":"imap","key":"imap","value":{"rev":"13-6a59045496c80b474652d2584edd4acb"}}, -{"id":"imbot","key":"imbot","value":{"rev":"11-0d8075eff5e5ec354683f396378fd101"}}, -{"id":"imdb","key":"imdb","value":{"rev":"7-2bba884d0e8804f4a7e0883abd47b0a7"}}, -{"id":"imgur","key":"imgur","value":{"rev":"3-30c0e5fddc1be3398ba5f7eee1a251d7"}}, -{"id":"impact","key":"impact","value":{"rev":"7-d3390690f11c6f9dcca9f240a7bedfef"}}, -{"id":"imsi","key":"imsi","value":{"rev":"3-0aa9a01c9c79b17afae3684b7b920ced"}}, -{"id":"index","key":"index","value":{"rev":"13-ad5d8d7dfad64512a12db4d820229c07"}}, -{"id":"indexer","key":"indexer","value":{"rev":"9-b0173ce9ad9fa1b80037fa8e33a8ce12"}}, -{"id":"inflect","key":"inflect","value":{"rev":"17-9e5ea2826fe08bd950cf7e22d73371bd"}}, -{"id":"inflectjs","key":"inflectjs","value":{"rev":"3-c59db027b72be720899b4a280ac2518f"}}, -{"id":"inflector","key":"inflector","value":{"rev":"3-191ff29d3b5ed8ef6877032a1d01d864"}}, -{"id":"inheritance","key":"inheritance","value":{"rev":"3-450a1e68bd2d8f16abe7001491abb6a8"}}, -{"id":"inherits","key":"inherits","value":{"rev":"3-284f97a7ae4f777bfabe721b66de07fa"}}, -{"id":"ini","key":"ini","value":{"rev":"5-142c8f9125fbace57689e2837deb1883"}}, -{"id":"iniparser","key":"iniparser","value":{"rev":"14-1053c59ef3d50a46356be45576885c49"}}, -{"id":"inireader","key":"inireader","value":{"rev":"15-9cdc485b18bff6397f5fec45befda402"}}, -{"id":"init","key":"init","value":{"rev":"5-b81610ad72864417dab49f7a3f29cc9f"}}, -{"id":"inject","key":"inject","value":{"rev":"5-82bddb6b4f21ddaa0137fedc8913d60e"}}, -{"id":"inliner","key":"inliner","value":{"rev":"45-8a1c3e8f78438f06865b3237d6c5339a"}}, -{"id":"inode","key":"inode","value":{"rev":"7-118ffafc62dcef5bbeb14e4328c68ab3"}}, -{"id":"inotify","key":"inotify","value":{"rev":"18-03d7b1a318bd283e0185b414b48dd602"}}, -{"id":"inotify-plusplus","key":"inotify-plusplus","value":{"rev":"10-0e0ce9065a62e5e21ee5bb53fac61a6d"}}, -{"id":"inspect","key":"inspect","value":{"rev":"5-b5f18717e29caec3399abe5e4ce7a269"}}, -{"id":"instagram","key":"instagram","value":{"rev":"5-decddf3737a1764518b6a7ce600d720d"}}, -{"id":"instagram-node-lib","key":"instagram-node-lib","value":{"rev":"13-8be77f1180b6afd9066834b3f5ee8de5"}}, -{"id":"instant-styleguide","key":"instant-styleguide","value":{"rev":"9-66c02118993621376ad0b7396db435b3"}}, -{"id":"intercept","key":"intercept","value":{"rev":"9-f5622744c576405516a427b4636ee864"}}, -{"id":"interface","key":"interface","value":{"rev":"10-13806252722402bd18d88533056a863b"}}, -{"id":"interleave","key":"interleave","value":{"rev":"25-69bc136937604863748a029fb88e3605"}}, -{"id":"interstate","key":"interstate","value":{"rev":"3-3bb4a6c35ca765f88a10b9fab6307c59"}}, -{"id":"intervals","key":"intervals","value":{"rev":"21-89b71bd55b8d5f6b670d69fc5b9f847f"}}, -{"id":"intestine","key":"intestine","value":{"rev":"3-66a5531e06865ed9c966d95437ba1371"}}, -{"id":"ios7crypt","key":"ios7crypt","value":{"rev":"7-a2d309a2c074e5c1c456e2b56cbcfd17"}}, -{"id":"iostat","key":"iostat","value":{"rev":"11-f0849c0072e76701b435aa769a614e82"}}, -{"id":"ip2cc","key":"ip2cc","value":{"rev":"9-2c282606fd08d469184a272a2108639c"}}, -{"id":"ipaddr.js","key":"ipaddr.js","value":{"rev":"5-1017fd5342840745614701476ed7e6c4"}}, -{"id":"iptables","key":"iptables","value":{"rev":"7-23e56ef5d7bf0ee8f5bd0e38bde8aae3"}}, -{"id":"iptrie","key":"iptrie","value":{"rev":"4-10317b0e073befe9601e9dc308dc361a"}}, -{"id":"ipv6","key":"ipv6","value":{"rev":"6-85e937f3d79e44dbb76264c7aaaa140f"}}, -{"id":"iqengines","key":"iqengines","value":{"rev":"3-8bdbd32e9dc35b77d80a31edae235178"}}, -{"id":"irc","key":"irc","value":{"rev":"8-ed30964f57b99b1b2f2104cc5e269618"}}, -{"id":"irc-colors","key":"irc-colors","value":{"rev":"9-7ddb19db9a553567aae86bd97f1dcdfc"}}, -{"id":"irc-js","key":"irc-js","value":{"rev":"58-1c898cea420aee60283edb4fadceb90e"}}, -{"id":"ircat.js","key":"ircat.js","value":{"rev":"6-f25f20953ce96697c033315d250615d0"}}, -{"id":"ircbot","key":"ircbot","value":{"rev":"9-85a4a6f88836fc031855736676b10dec"}}, -{"id":"irccd","key":"irccd","value":{"rev":"3-bf598ae8b6af63be41852ae8199416f4"}}, -{"id":"ircd","key":"ircd","value":{"rev":"7-3ba7fc2183d32ee1e58e63092d7e82bb"}}, -{"id":"ircdjs","key":"ircdjs","value":{"rev":"15-8fcdff2bf29cf24c3bbc4b461e6cbe9f"}}, -{"id":"irclog","key":"irclog","value":{"rev":"3-79a99bd8048dd98a93c747a1426aabde"}}, -{"id":"ircrpc","key":"ircrpc","value":{"rev":"5-278bec6fc5519fdbd152ea4fa35dc58c"}}, -{"id":"irrklang","key":"irrklang","value":{"rev":"3-65936dfabf7777027069343c2e72b32e"}}, -{"id":"isaacs","key":"isaacs","value":{"rev":"7-c55a41054056f502bc580bc6819d9d1f"}}, -{"id":"isbn","key":"isbn","value":{"rev":"3-51e784ded2e3ec9ef9b382fecd1c26a1"}}, -{"id":"iscroll","key":"iscroll","value":{"rev":"4-4f6635793806507665503605e7c180f0"}}, -{"id":"isodate","key":"isodate","value":{"rev":"7-ea4b1f77e9557b153264f68fd18a9f23"}}, -{"id":"it-is","key":"it-is","value":{"rev":"14-7617f5831c308d1c4ef914bc5dc30fa7"}}, -{"id":"iterator","key":"iterator","value":{"rev":"3-e6f70367a55cabbb89589f2a88be9ab0"}}, -{"id":"itunes","key":"itunes","value":{"rev":"7-47d151c372d70d0bc311141749c84d5a"}}, -{"id":"iws","key":"iws","value":{"rev":"3-dc7b4d18565b79d3e14aa691e5e632f4"}}, -{"id":"jQuery","key":"jQuery","value":{"rev":"29-f913933259b4ec5f4c5ea63466a4bb08"}}, -{"id":"jWorkflow","key":"jWorkflow","value":{"rev":"7-582cd7aa62085ec807117138b6439550"}}, -{"id":"jaCodeMap","key":"jaCodeMap","value":{"rev":"7-28efcbf4146977bdf1e594e0982ec097"}}, -{"id":"jaaulde-cookies","key":"jaaulde-cookies","value":{"rev":"3-d5b5a75f9cabbebb2804f0b4ae93d0c5"}}, -{"id":"jacker","key":"jacker","value":{"rev":"3-888174c7e3e2a5d241f2844257cf1b10"}}, -{"id":"jade","key":"jade","value":{"rev":"144-318a9d9f63906dc3da1ef7c1ee6420b5"}}, -{"id":"jade-browser","key":"jade-browser","value":{"rev":"9-0ae6b9e321cf04e3ca8fbfe0e38f4d9e"}}, -{"id":"jade-client-connect","key":"jade-client-connect","value":{"rev":"5-96dbafafa31187dd7f829af54432de8e"}}, -{"id":"jade-ext","key":"jade-ext","value":{"rev":"9-aac9a58a4e07d82bc496bcc4241d1be0"}}, -{"id":"jade-i18n","key":"jade-i18n","value":{"rev":"23-76a21a41b5376e10c083672dccf7fc62"}}, -{"id":"jade-serial","key":"jade-serial","value":{"rev":"3-5ec712e1d8cd8d5af20ae3e62ee92854"}}, -{"id":"jadedown","key":"jadedown","value":{"rev":"11-0d16ce847d6afac2939eebcb24a7216c"}}, -{"id":"jadeify","key":"jadeify","value":{"rev":"17-4322b68bb5a7e81e839edabbc8c405a4"}}, -{"id":"jadevu","key":"jadevu","value":{"rev":"15-1fd8557a6db3c23f267de76835f9ee65"}}, -{"id":"jah","key":"jah","value":{"rev":"3-f29704037a1cffe2b08abb4283bee4a4"}}, -{"id":"jake","key":"jake","value":{"rev":"36-5cb64b1c5a89ac53eb4d09d66a5b10e1"}}, -{"id":"jammit-express","key":"jammit-express","value":{"rev":"6-e3dfa928114a2721fe9b8882d284f759"}}, -{"id":"janrain","key":"janrain","value":{"rev":"5-9554501be76fb3a472076858d1abbcd5"}}, -{"id":"janrain-api","key":"janrain-api","value":{"rev":"3-f45a65c695f4c72fdd1bf3593d8aa796"}}, -{"id":"jaque","key":"jaque","value":{"rev":"32-7f269a70c67beefc53ba1684bff5a57b"}}, -{"id":"jar","key":"jar","value":{"rev":"3-7fe0ab4aa3a2ccc5d50853f118e7aeb5"}}, -{"id":"jarvis","key":"jarvis","value":{"rev":"3-fb203b29b397a0b12c1ae56240624e3d"}}, -{"id":"jarvis-test","key":"jarvis-test","value":{"rev":"5-9537ddae8291e6dad03bc0e6acc9ac80"}}, -{"id":"jasbin","key":"jasbin","value":{"rev":"25-ae22f276406ac8bb4293d78595ce02ad"}}, -{"id":"jasmine-dom","key":"jasmine-dom","value":{"rev":"17-686de4c573f507c30ff72c6671dc3d93"}}, -{"id":"jasmine-jquery","key":"jasmine-jquery","value":{"rev":"7-86c077497a367bcd9ea96d5ab8137394"}}, -{"id":"jasmine-node","key":"jasmine-node","value":{"rev":"27-4c544c41c69d2b3cb60b9953d1c46d54"}}, -{"id":"jasmine-reporters","key":"jasmine-reporters","value":{"rev":"3-21ba522ae38402848d5a66d3d4d9a2b3"}}, -{"id":"jasmine-runner","key":"jasmine-runner","value":{"rev":"23-7458777b7a6785efc878cfd40ccb99d8"}}, -{"id":"jasminy","key":"jasminy","value":{"rev":"3-ce76023bac40c5f690cba59d430fd083"}}, -{"id":"jason","key":"jason","value":{"rev":"15-394a59963c579ed5db37fada4d082b5c"}}, -{"id":"javiary","key":"javiary","value":{"rev":"5-661be61fd0f47c9609b7d148e298e2fc"}}, -{"id":"jazz","key":"jazz","value":{"rev":"12-d11d602c1240b134b0593425911242fc"}}, -{"id":"jdoc","key":"jdoc","value":{"rev":"3-0c61fdd6b367a9acac710e553927b290"}}, -{"id":"jeesh","key":"jeesh","value":{"rev":"13-23b4e1ecf9ca76685bf7f1bfc6c076f1"}}, -{"id":"jellyfish","key":"jellyfish","value":{"rev":"25-7fef81f9b5ef5d4abbcecb030a433a72"}}, -{"id":"jen","key":"jen","value":{"rev":"3-ab1b07453318b7e0254e1dadbee7868f"}}, -{"id":"jerk","key":"jerk","value":{"rev":"34-e31f26d5e3b700d0a3e5f5a5acf0d381"}}, -{"id":"jessie","key":"jessie","value":{"rev":"19-829b932e57204f3b7833b34f75d6bf2a"}}, -{"id":"jezebel","key":"jezebel","value":{"rev":"15-b67c259e160390064da69a512382e06f"}}, -{"id":"jimi","key":"jimi","value":{"rev":"10-cc4a8325d6b847362a422304a0057231"}}, -{"id":"jinjs","key":"jinjs","value":{"rev":"37-38fcf1989f1b251a35e4ff725118f55e"}}, -{"id":"jinkies","key":"jinkies","value":{"rev":"30-73fec0e854aa31bcbf3ae1ca04462b22"}}, -{"id":"jison","key":"jison","value":{"rev":"52-d03c6f5e2bdd7624d39d93ec5e88c383"}}, -{"id":"jitsu","key":"jitsu","value":{"rev":"164-95083f8275f0bf2834f62027569b4da2"}}, -{"id":"jitter","key":"jitter","value":{"rev":"16-3f7b183aa7922615f4b5b2fb46653477"}}, -{"id":"jj","key":"jj","value":{"rev":"21-1b3f97e9725e1241c96a884c85dc4e30"}}, -{"id":"jjw","key":"jjw","value":{"rev":"13-835c632dfc5df7dd37860bd0b2c1cb38"}}, -{"id":"jkwery","key":"jkwery","value":{"rev":"11-212429c9c9e1872d4e278da055b5ae0a"}}, -{"id":"jmen","key":"jmen","value":{"rev":"3-a0b67d5b84a077061d3fed2ddbf2c6a8"}}, -{"id":"jobmanager","key":"jobmanager","value":{"rev":"15-1a589ede5f10d1ea2f33f1bb91f9b3aa"}}, -{"id":"jobs","key":"jobs","value":{"rev":"12-3072b6164c5dca8fa9d24021719048ff"}}, -{"id":"jobvite","key":"jobvite","value":{"rev":"56-3d69b0e6d91722ef4908b4fe26bb5432"}}, -{"id":"jodoc","key":"jodoc","value":{"rev":"3-7b05c6d7b4c9a9fa85d3348948d2d52d"}}, -{"id":"johnny-mnemonic","key":"johnny-mnemonic","value":{"rev":"3-e8749d4be597f002aae720011b7c9273"}}, -{"id":"join","key":"join","value":{"rev":"5-ab92491dc83b5e8ed5f0cc49e306d5d5"}}, -{"id":"jolokia-client","key":"jolokia-client","value":{"rev":"26-1f93cb53f4a870b94540cdbf7627b1c4"}}, -{"id":"joo","key":"joo","value":{"rev":"11-e0d4a97eceacdd13769bc5f56e059aa7"}}, -{"id":"jools","key":"jools","value":{"rev":"3-9da332d524a117c4d72a58bb45fa34fd"}}, -{"id":"joose","key":"joose","value":{"rev":"22-ef8a1895680ad2f9c1cd73cd1afbb58e"}}, -{"id":"joosex-attribute","key":"joosex-attribute","value":{"rev":"18-119df97dba1ba2631c94d49e3142bbd7"}}, -{"id":"joosex-bridge-ext","key":"joosex-bridge-ext","value":{"rev":"20-5ad2168291aad2cf021df0a3eb103538"}}, -{"id":"joosex-class-simpleconstructor","key":"joosex-class-simpleconstructor","value":{"rev":"6-f71e02e44f611550374ad9f5d0c37fdf"}}, -{"id":"joosex-class-singleton","key":"joosex-class-singleton","value":{"rev":"6-3ba6b8644722b29febe384a368c18aab"}}, -{"id":"joosex-cps","key":"joosex-cps","value":{"rev":"20-493c65faf1ec59416bae475529c51cd4"}}, -{"id":"joosex-meta-lazy","key":"joosex-meta-lazy","value":{"rev":"13-ef8bc4e57006cfcecd72a344d8dc9da6"}}, -{"id":"joosex-namespace-depended","key":"joosex-namespace-depended","value":{"rev":"22-8a38a21f8564470b96082177e81f3db6"}}, -{"id":"joosex-observable","key":"joosex-observable","value":{"rev":"7-52e7018931e5465920bb6feab88aa468"}}, -{"id":"joosex-role-parameterized","key":"joosex-role-parameterized","value":{"rev":"6-65aa4fa4967c4fbe06357ccda5e6f810"}}, -{"id":"joosex-simplerequest","key":"joosex-simplerequest","value":{"rev":"10-12d105b60b8b3ca3a3626ca0ec53892d"}}, -{"id":"josp","key":"josp","value":{"rev":"3-c4fa8445a0d96037e00fe96d007bcf0c"}}, -{"id":"jot","key":"jot","value":{"rev":"3-8fab571ce3ad993f3594f3c2e0fc6915"}}, -{"id":"journey","key":"journey","value":{"rev":"40-efe1fa6c8d735592077c9a24b3b56a03"}}, -{"id":"jpeg","key":"jpeg","value":{"rev":"8-ab437fbaf88f32a7fb625a0b27521292"}}, -{"id":"jq","key":"jq","value":{"rev":"3-9d83287aa9e6aab25590fac9adbab968"}}, -{"id":"jqNode","key":"jqNode","value":{"rev":"3-fcaf2c47aba5637a4a23c64b6fc778cf"}}, -{"id":"jqbuild","key":"jqbuild","value":{"rev":"3-960edcea36784aa9ca135cd922e0cb9b"}}, -{"id":"jqserve","key":"jqserve","value":{"rev":"3-39272c5479aabaafe66ffa26a6eb3bb5"}}, -{"id":"jqtpl","key":"jqtpl","value":{"rev":"54-ce2b62ced4644d5fe24c3a8ebcb4d528"}}, -{"id":"jquajax","key":"jquajax","value":{"rev":"3-a079cb8f3a686faaafe420760e77a330"}}, -{"id":"jquery","key":"jquery","value":{"rev":"27-60fd58bba99d044ffe6e140bafd72595"}}, -{"id":"jquery-browserify","key":"jquery-browserify","value":{"rev":"9-a4e9afd657f3c632229afa356382f6a4"}}, -{"id":"jquery-deferred","key":"jquery-deferred","value":{"rev":"5-0fd0cec51f7424a50f0dba3cbe74fd58"}}, -{"id":"jquery-drive","key":"jquery-drive","value":{"rev":"3-8474f192fed5c5094e56bc91f5e8a0f8"}}, -{"id":"jquery-mousewheel","key":"jquery-mousewheel","value":{"rev":"3-cff81086cf651e52377a8d5052b09d64"}}, -{"id":"jquery-placeholdize","key":"jquery-placeholdize","value":{"rev":"3-7acc3fbda1b8daabce18876d2b4675e3"}}, -{"id":"jquery-tmpl-jst","key":"jquery-tmpl-jst","value":{"rev":"13-575031eb2f2b1e4c5562e195fce0bc93"}}, -{"id":"jquery.effects.blind","key":"jquery.effects.blind","value":{"rev":"3-5f3bec5913edf1bfcee267891f6204e2"}}, -{"id":"jquery.effects.bounce","key":"jquery.effects.bounce","value":{"rev":"3-245b2e7d9a1295dd0f7d568b8087190d"}}, -{"id":"jquery.effects.clip","key":"jquery.effects.clip","value":{"rev":"3-7aa63a590b6d90d5ea20e21c8dda675d"}}, -{"id":"jquery.effects.core","key":"jquery.effects.core","value":{"rev":"3-dd2fa270d8aea21104c2c92d6b06500d"}}, -{"id":"jquery.effects.drop","key":"jquery.effects.drop","value":{"rev":"3-8d0e30016e99460063a9a9000ce7b032"}}, -{"id":"jquery.effects.explode","key":"jquery.effects.explode","value":{"rev":"3-3d5e3bb2fb451f7eeaeb72b6743b6e6c"}}, -{"id":"jquery.effects.fade","key":"jquery.effects.fade","value":{"rev":"3-f362c762053eb278b5db5f92e248c3a5"}}, -{"id":"jquery.effects.fold","key":"jquery.effects.fold","value":{"rev":"3-c7d823c2b25c4f1e6a1801f4b1bc7a2c"}}, -{"id":"jquery.effects.highlight","key":"jquery.effects.highlight","value":{"rev":"3-44ef3c62a6b829382bffa6393cd31ed9"}}, -{"id":"jquery.effects.pulsate","key":"jquery.effects.pulsate","value":{"rev":"3-3cad87635cecc2602d40682cf669d2fe"}}, -{"id":"jquery.effects.scale","key":"jquery.effects.scale","value":{"rev":"3-2c8df02eeed343088e2253d84064a219"}}, -{"id":"jquery.effects.shake","key":"jquery.effects.shake","value":{"rev":"3-d63ab567d484311744d848b520a720c7"}}, -{"id":"jquery.effects.slide","key":"jquery.effects.slide","value":{"rev":"3-9eb5d1075d67045a8fa305e596981934"}}, -{"id":"jquery.effects.transfer","key":"jquery.effects.transfer","value":{"rev":"3-371bc87350ede6da53a40468b63200a9"}}, -{"id":"jquery.tmpl","key":"jquery.tmpl","value":{"rev":"5-75efd6c8c0ce030f2da12b984f9dfe6c"}}, -{"id":"jquery.ui.accordion","key":"jquery.ui.accordion","value":{"rev":"3-964ee7d6c50f31e7db6631da28e2261a"}}, -{"id":"jquery.ui.autocomplete","key":"jquery.ui.autocomplete","value":{"rev":"3-950d240629d142eab5e07c2776e39bcc"}}, -{"id":"jquery.ui.button","key":"jquery.ui.button","value":{"rev":"3-a1c7f3eeb9298ac0c116d75a176a6d17"}}, -{"id":"jquery.ui.core","key":"jquery.ui.core","value":{"rev":"3-b7ba340b7304a304f85c4d13438d1195"}}, -{"id":"jquery.ui.datepicker","key":"jquery.ui.datepicker","value":{"rev":"3-5b76579057f1b870959a06ab833f1972"}}, -{"id":"jquery.ui.dialog","key":"jquery.ui.dialog","value":{"rev":"3-0c314cee86bf67298759efcfd47246f6"}}, -{"id":"jquery.ui.draggable","key":"jquery.ui.draggable","value":{"rev":"3-b7a15d2bdbcdc6f0f3cd6e4522f9f1f3"}}, -{"id":"jquery.ui.droppable","key":"jquery.ui.droppable","value":{"rev":"3-86d8a1558f5e9383b271b4d968ba081d"}}, -{"id":"jquery.ui.mouse","key":"jquery.ui.mouse","value":{"rev":"3-ccb88d773c452c778c694f9f551cb816"}}, -{"id":"jquery.ui.position","key":"jquery.ui.position","value":{"rev":"3-c49c13b38592a363585600b7af54d977"}}, -{"id":"jquery.ui.progressbar","key":"jquery.ui.progressbar","value":{"rev":"3-b28dfadab64f9548b828c42bf870fcc9"}}, -{"id":"jquery.ui.resizable","key":"jquery.ui.resizable","value":{"rev":"3-aa356230544cbe8ab8dc5fab08cc0fa7"}}, -{"id":"jquery.ui.selectable","key":"jquery.ui.selectable","value":{"rev":"3-6b11846c104d580556e40eb5194c45f2"}}, -{"id":"jquery.ui.slider","key":"jquery.ui.slider","value":{"rev":"3-e8550b76bf58a9cbeca9ea91eb763257"}}, -{"id":"jquery.ui.sortable","key":"jquery.ui.sortable","value":{"rev":"3-1ddd981bd720f055fbd5bb1d06df55ad"}}, -{"id":"jquery.ui.tabs","key":"jquery.ui.tabs","value":{"rev":"3-e0514383f4d920b9dc23ef7a7ea4d8af"}}, -{"id":"jquery.ui.widget","key":"jquery.ui.widget","value":{"rev":"3-3a0800fa067c12d013168f74acf21e6d"}}, -{"id":"jqueryify","key":"jqueryify","value":{"rev":"3-2655cf6a45795a8bd138a464e6c18f04"}}, -{"id":"jrep","key":"jrep","value":{"rev":"3-edbcf6931b8a2b3f550727d8b839acc3"}}, -{"id":"js-beautify-node","key":"js-beautify-node","value":{"rev":"3-401cd1c130aaec2c090b578fe8db6290"}}, -{"id":"js-class","key":"js-class","value":{"rev":"5-a63fbb0136dcd602feee72e70674d5db"}}, -{"id":"js-jango","key":"js-jango","value":{"rev":"3-af4e4a7844791617e66a40a1c403bb98"}}, -{"id":"js-loader","key":"js-loader","value":{"rev":"13-8d9729495c1692e47d2cd923e839b4c8"}}, -{"id":"js-manager","key":"js-manager","value":{"rev":"5-6d384a2ce4737f13d417f85689c3c372"}}, -{"id":"js-nts","key":"js-nts","value":{"rev":"3-7d921611b567d2d890bc983c343558ef"}}, -{"id":"js-openstack","key":"js-openstack","value":{"rev":"11-d56996be276fbe6162573575932b1cba"}}, -{"id":"js-select","key":"js-select","value":{"rev":"9-9d20f6d86d9e6f8a84191346288b76ed"}}, -{"id":"js.io","key":"js.io","value":{"rev":"3-c5e16e13372ba592ccf2ac86ee007a1f"}}, -{"id":"js2","key":"js2","value":{"rev":"35-2dc694e48b67252d8787f5e889a07430"}}, -{"id":"js2coffee","key":"js2coffee","value":{"rev":"19-8eeafa894dcc0dc306b02e728543511e"}}, -{"id":"jsDAV","key":"jsDAV","value":{"rev":"11-4ab1935d98372503439b054daef2e78e"}}, -{"id":"jsDump","key":"jsDump","value":{"rev":"5-32d6e4032bd114245356970f0b76a58a"}}, -{"id":"jsSourceCodeParser","key":"jsSourceCodeParser","value":{"rev":"3-78c5e8624ab25fca99a7bb6cd9be402b"}}, -{"id":"jsapp","key":"jsapp","value":{"rev":"3-6758eb2743cc22f723a6612b34c8d943"}}, -{"id":"jscc-node","key":"jscc-node","value":{"rev":"3-5f52dc20dc2a188bc32e7219c9d2f225"}}, -{"id":"jscheckstyle","key":"jscheckstyle","value":{"rev":"5-82021f06a1bd824ac195e0ab8a3b598c"}}, -{"id":"jsclass","key":"jsclass","value":{"rev":"9-2a0656b9497c5a8208a0fefa5aae3350"}}, -{"id":"jsconfig","key":"jsconfig","value":{"rev":"3-b1afef99468f81eff319453623135a56"}}, -{"id":"jscssp","key":"jscssp","value":{"rev":"6-413ad0701e6dbb412e8a01aadb6672c4"}}, -{"id":"jsdata","key":"jsdata","value":{"rev":"5-53f8b26f28291dccfdff8f14e7f4c44c"}}, -{"id":"jsdeferred","key":"jsdeferred","value":{"rev":"8-bc238b921a1fa465503722756a98e9b7"}}, -{"id":"jsdoc","key":"jsdoc","value":{"rev":"3-386eb47a2761a1ad025996232751fba9"}}, -{"id":"jsdog","key":"jsdog","value":{"rev":"11-d4a523898a7c474b5c7b8cb8b24bafe8"}}, -{"id":"jsdom","key":"jsdom","value":{"rev":"63-86bc6b9d8bfdb99b793ac959e126f7ff"}}, -{"id":"jsftp","key":"jsftp","value":{"rev":"35-89cd772521d7ac3cead71c602ddeb819"}}, -{"id":"jsgi","key":"jsgi","value":{"rev":"20-dbef9d8dfb5c9bf1a3b6014159bb305a"}}, -{"id":"jsgi-node","key":"jsgi-node","value":{"rev":"1-8ec0892e521754aaf88684714d306af9"}}, -{"id":"jsgrep","key":"jsgrep","value":{"rev":"7-be19445481acdbbb684fdc2425d88d08"}}, -{"id":"jshelpers","key":"jshelpers","value":{"rev":"11-9509dcdd48bc494de76cae66217ebedb"}}, -{"id":"jshint","key":"jshint","value":{"rev":"34-ed2e7ea0e849126bd9821b86f23b7314"}}, -{"id":"jshint-autofix","key":"jshint-autofix","value":{"rev":"9-abbb3622aa8a47a8890dbbaab0009b6d"}}, -{"id":"jshint-mode","key":"jshint-mode","value":{"rev":"5-06ec066819b93c7ae6782c755a0e2125"}}, -{"id":"jshint-runner","key":"jshint-runner","value":{"rev":"7-6fc8a15e387a4e81e300a54a86a3a240"}}, -{"id":"jshtml","key":"jshtml","value":{"rev":"5-d3e96c31cf1cd2fcf7743defc1631c3a"}}, -{"id":"jsinc","key":"jsinc","value":{"rev":"9-0e4dc3ba04b440085a79d6001232abfc"}}, -{"id":"jslint","key":"jslint","value":{"rev":"10-ab451352333b5f3d29c6cdbab49187dd"}}, -{"id":"jslint-core","key":"jslint-core","value":{"rev":"3-1f874d8cca07b6f007bc80c23ba15e2e"}}, -{"id":"jslint-strict","key":"jslint-strict","value":{"rev":"8-3d694a0f3079691da1866de16f290ea2"}}, -{"id":"jslinux","key":"jslinux","value":{"rev":"13-033cb60c7867aae599863323a97f45c0"}}, -{"id":"jslitmus","key":"jslitmus","value":{"rev":"6-d3f3f82ea1a376acc2b24c69da003409"}}, -{"id":"jsmeter","key":"jsmeter","value":{"rev":"5-7838bb9b970cbaa29a48802c508fd091"}}, -{"id":"jsmin","key":"jsmin","value":{"rev":"6-002ad1b385915e60f895b5e52492fb94"}}, -{"id":"json","key":"json","value":{"rev":"39-1d24fb8c3bdf0ac533bfc52e74420adc"}}, -{"id":"json-browser","key":"json-browser","value":{"rev":"6-883f051c1297cf631adba1c855ff2e13"}}, -{"id":"json-builder","key":"json-builder","value":{"rev":"5-e7a996ff1ef89114ce2ab6de9b653af8"}}, -{"id":"json-command","key":"json-command","value":{"rev":"16-8239cb65563720c42da5562d3a031b09"}}, -{"id":"json-fu","key":"json-fu","value":{"rev":"5-7933c35711cb9d7673d7514fe495c56d"}}, -{"id":"json-line-protocol","key":"json-line-protocol","value":{"rev":"7-98de63467d154b40a029391af8a26042"}}, -{"id":"json-object","key":"json-object","value":{"rev":"7-534cd9680c386c5b9800848755698f2b"}}, -{"id":"json-ref","key":"json-ref","value":{"rev":"3-cd09776d166c3f77013e429737c7e1e9"}}, -{"id":"json-san","key":"json-san","value":{"rev":"7-8683abde23232c1d84266e7a2d5c4527"}}, -{"id":"json-schema","key":"json-schema","value":{"rev":"1-2f323062e7ec80d2ff765da43c7aaa7d"}}, -{"id":"json-sockets","key":"json-sockets","value":{"rev":"26-bfef71c0d9fb4d56010b05f47f142748"}}, -{"id":"json-storage","key":"json-storage","value":{"rev":"3-46139e3a54c0a27e67820df2c7e87dbf"}}, -{"id":"json-storage-model","key":"json-storage-model","value":{"rev":"3-8b77044e192791613cf92b2f3317357f"}}, -{"id":"json-streamify","key":"json-streamify","value":{"rev":"5-d98cd72265fba652481eef6baa980f46"}}, -{"id":"json-streams","key":"json-streams","value":{"rev":"3-e07fc5ca24b33145c8aacf9995d46723"}}, -{"id":"json-tables","key":"json-tables","value":{"rev":"3-37a652b54880487e66ffeee6822b945b"}}, -{"id":"json-template","key":"json-template","value":{"rev":"3-9ee3a101c60ea682fb88759b2df837e4"}}, -{"id":"json2","key":"json2","value":{"rev":"12-bc3d411db772e0947ca58a54c2084073"}}, -{"id":"json2ify","key":"json2ify","value":{"rev":"3-c2d6677cc35e4668c97cf6800a4728d8"}}, -{"id":"json2xml","key":"json2xml","value":{"rev":"3-e955b994479362685e2197b39909dea2"}}, -{"id":"json_req","key":"json_req","value":{"rev":"15-14520bc890cbb0ab4c142b59bf21c9f1"}}, -{"id":"jsonapi","key":"jsonapi","value":{"rev":"11-2b27aaca5643d6a5b3ab38721cf6342f"}}, -{"id":"jsonconfig","key":"jsonconfig","value":{"rev":"5-0072bb54cb0ae5b13eee4f1657ba6a29"}}, -{"id":"jsond","key":"jsond","value":{"rev":"13-7c3622aeb147dae4698608ee32d81b45"}}, -{"id":"jsondate","key":"jsondate","value":{"rev":"3-1da5d30ee1cf7c6d9605a446efd91478"}}, -{"id":"jsonds","key":"jsonds","value":{"rev":"9-af2867869a46787e58c337e700dbf0dd"}}, -{"id":"jsonds2","key":"jsonds2","value":{"rev":"3-e7ed9647cc1ba72e59b625840358c7ca"}}, -{"id":"jsonfiles","key":"jsonfiles","value":{"rev":"3-5e643ba75c401f653f505e7938540d83"}}, -{"id":"jsonify","key":"jsonify","value":{"rev":"3-91207fd1bc11668be7906f74992de6bb"}}, -{"id":"jsonize","key":"jsonize","value":{"rev":"3-4881031480a5326d9f5966189170db25"}}, -{"id":"jsonlint","key":"jsonlint","value":{"rev":"11-88d3c1c395846e7687f410e0dc405469"}}, -{"id":"jsonml","key":"jsonml","value":{"rev":"3-9990d9515fa554b5c7ff8bf8c7bb3308"}}, -{"id":"jsonparse","key":"jsonparse","value":{"rev":"3-569962847a5fd9d65fdf91af9e3e87a5"}}, -{"id":"jsonpointer","key":"jsonpointer","value":{"rev":"5-0310a11e82e9e22a4e5239dee2bc2213"}}, -{"id":"jsonprettify","key":"jsonprettify","value":{"rev":"3-173ae677f2110dfff8cb17dd2b4c68de"}}, -{"id":"jsonreq","key":"jsonreq","value":{"rev":"5-84b47d8c528ea7efa9aae113e5ff53cf"}}, -{"id":"jsonrpc","key":"jsonrpc","value":{"rev":"10-e40ff49715537320cbbbde67378f099e"}}, -{"id":"jsonrpc-ws","key":"jsonrpc-ws","value":{"rev":"7-73c385f3d35dadbdc87927f6a751e3ca"}}, -{"id":"jsonrpc2","key":"jsonrpc2","value":{"rev":"13-71efdea4f551d3a2550fcf5355ea8c8c"}}, -{"id":"jsontool","key":"jsontool","value":{"rev":"14-44bc979d3a8dc9295c825def01e533b4"}}, -{"id":"jsontoxml","key":"jsontoxml","value":{"rev":"8-2640fd26237ab4a45450748d392dd2d2"}}, -{"id":"jsontry","key":"jsontry","value":{"rev":"3-adb3f32f86419ac4b589ce41ab253952"}}, -{"id":"jsorm-i18n","key":"jsorm-i18n","value":{"rev":"3-54347174039512616ed76cc9a37605ea"}}, -{"id":"jsorm-utilities","key":"jsorm-utilities","value":{"rev":"3-187fc9f86ed8d32ebcb6c451fa7cc3c4"}}, -{"id":"jspack","key":"jspack","value":{"rev":"3-84955792d8b57fc301968daf674bace7"}}, -{"id":"jspkg","key":"jspkg","value":{"rev":"5-f5471c37554dad3492021490a70a1190"}}, -{"id":"jspp","key":"jspp","value":{"rev":"8-7607018fa48586f685dda17d77d0999b"}}, -{"id":"jss","key":"jss","value":{"rev":"20-4517b1daeda4f878debddc9f23347f00"}}, -{"id":"jst","key":"jst","value":{"rev":"27-8372bf5c052b6bd6e28f5d2c89b47e49"}}, -{"id":"jstestdriver","key":"jstestdriver","value":{"rev":"3-d26b172af33d6c45fc3dc96b96865714"}}, -{"id":"jstoxml","key":"jstoxml","value":{"rev":"15-c26b77ed5228500238c7b21a3dbdbbb7"}}, -{"id":"jsup","key":"jsup","value":{"rev":"3-54eb8598ae1a49bd1540e482a44a6abc"}}, -{"id":"jthon","key":"jthon","value":{"rev":"5-d578940ac32497839ff48d3f6205e9e2"}}, -{"id":"juggernaut","key":"juggernaut","value":{"rev":"20-15d33218943b9ec64b642e2a4a05e4b8"}}, -{"id":"juggernaut-yoomee","key":"juggernaut-yoomee","value":{"rev":"7-a58d429e46aac76260e236c64d20ff02"}}, -{"id":"jump","key":"jump","value":{"rev":"19-d47e23c31dc623b54e60004b08f6f624"}}, -{"id":"jumprope","key":"jumprope","value":{"rev":"5-98d4e2452f14d3b0996f04882b07d674"}}, -{"id":"junction","key":"junction","value":{"rev":"3-2b73ea17d862b1e95039141e98e53268"}}, -{"id":"jus-config","key":"jus-config","value":{"rev":"5-d2da00317dceb712d82dbfc776122dbe"}}, -{"id":"jus-i18n","key":"jus-i18n","value":{"rev":"3-d146cfc5f3c9aee769390ed921836b6e"}}, -{"id":"jus-task","key":"jus-task","value":{"rev":"13-d127de2a102eef2eb0d1b67810ecd558"}}, -{"id":"justtest","key":"justtest","value":{"rev":"17-467ee4ca606f0447a0c458550552fd0a"}}, -{"id":"jute","key":"jute","value":{"rev":"99-158d262e9126de5026bbfeb3168d9277"}}, -{"id":"jwt","key":"jwt","value":{"rev":"3-4cb8a706d1bc3c300bdadeba781c7bc4"}}, -{"id":"kaffeine","key":"kaffeine","value":{"rev":"47-261825b8d8cdf168387c6a275682dd0b"}}, -{"id":"kafka","key":"kafka","value":{"rev":"9-7465d4092e6322d0b744f017be8ffcea"}}, -{"id":"kahan","key":"kahan","value":{"rev":"5-107bb2dcdb51faaa00aef1e37eff91eb"}}, -{"id":"kahve-ansi","key":"kahve-ansi","value":{"rev":"5-a86d9a3ea56362fa81c8ee9f1ef8f2ef"}}, -{"id":"kahve-cake","key":"kahve-cake","value":{"rev":"3-873b4e553c4ba417c888aadce3b800f6"}}, -{"id":"kahve-classmethod","key":"kahve-classmethod","value":{"rev":"3-08e0a5786edc15539cc6746fe6c65bec"}}, -{"id":"kahve-exception","key":"kahve-exception","value":{"rev":"3-fb9d839cfdc069271cbc10fa27a87f3c"}}, -{"id":"kahve-progress","key":"kahve-progress","value":{"rev":"3-d2fcdd99793a0c3c3a314afb067a3701"}}, -{"id":"kanso","key":"kanso","value":{"rev":"41-2b18ab56cc86313daa840b7b3f63b318"}}, -{"id":"kaph","key":"kaph","value":{"rev":"7-c24622e38cf23bac67459bfe5a0edd63"}}, -{"id":"karait","key":"karait","value":{"rev":"9-a4abc4bc11c747448c4884cb714737c9"}}, -{"id":"kasabi","key":"kasabi","value":{"rev":"3-36cb65aef11d181c532f4549d58944e6"}}, -{"id":"kassit","key":"kassit","value":{"rev":"27-6fafe5122a4dda542a34ba18dddfc9ea"}}, -{"id":"kdtree","key":"kdtree","value":{"rev":"9-177bf5018be1f177d302af1d746b0462"}}, -{"id":"keeper","key":"keeper","value":{"rev":"13-43ce24b6e1fb8ac23c58a78e3e92d137"}}, -{"id":"kestrel","key":"kestrel","value":{"rev":"3-1303ae0617ed1076eed022176c78b0c4"}}, -{"id":"kettle","key":"kettle","value":{"rev":"3-385c10c43df484666148e796840e72c7"}}, -{"id":"keyed_list","key":"keyed_list","value":{"rev":"5-c98d8bc8619300da1a09098bb298bf16"}}, -{"id":"keyframely","key":"keyframely","value":{"rev":"5-586380d2258a099d8fa4748f2688b571"}}, -{"id":"keygrip","key":"keygrip","value":{"rev":"18-4178954fb4f0e26407851104876f1a03"}}, -{"id":"keyjson","key":"keyjson","value":{"rev":"5-96ab1d8b6fa77864883b657360070af4"}}, -{"id":"keymaster","key":"keymaster","value":{"rev":"8-e7eb722489b02991943e9934b8155162"}}, -{"id":"keys","key":"keys","value":{"rev":"12-8b34b8f593667f0c23f1841edb5b6fa3"}}, -{"id":"keysym","key":"keysym","value":{"rev":"13-ec57906511f8f2f896a9e81dc206ea77"}}, -{"id":"keyx","key":"keyx","value":{"rev":"3-80dc49b56e3ba1d280298c36afa2a82c"}}, -{"id":"khronos","key":"khronos","value":{"rev":"3-1a3772db2725c4c3098d5cf4ca2189a4"}}, -{"id":"kindred","key":"kindred","value":{"rev":"5-99c7f4f06e4a47e476f9d75737f719d7"}}, -{"id":"kiokujs","key":"kiokujs","value":{"rev":"8-4b96a9bc1866f58bb263b310e64df403"}}, -{"id":"kiokujs-backend-batch","key":"kiokujs-backend-batch","value":{"rev":"3-4739de0f2e0c01581ce0b02638d3df02"}}, -{"id":"kiokujs-backend-couchdb","key":"kiokujs-backend-couchdb","value":{"rev":"8-53e830e0a7e8ea810883c00ce79bfeef"}}, -{"id":"kiss.js","key":"kiss.js","value":{"rev":"11-7c9b1d7e2faee25ade6f1cad1bb261d9"}}, -{"id":"kissy","key":"kissy","value":{"rev":"8-3f8f7c169a3e84df6a7f68315f13b3ba"}}, -{"id":"kitkat","key":"kitkat","value":{"rev":"41-5f2600e4e1c503f63702c74195ff3361"}}, -{"id":"kitkat-express","key":"kitkat-express","value":{"rev":"3-91ef779ed9acdad1ca6f776e10a70246"}}, -{"id":"kizzy","key":"kizzy","value":{"rev":"5-f281b9e4037eda414f918ec9021e28c9"}}, -{"id":"kjs","key":"kjs","value":{"rev":"3-2ee03262f843e497161f1aef500dd229"}}, -{"id":"kju","key":"kju","value":{"rev":"5-0a7de1cd26864c85a22c7727c660d441"}}, -{"id":"klass","key":"klass","value":{"rev":"39-61491ef3824772d5ef33f7ea04219461"}}, -{"id":"klout-js","key":"klout-js","value":{"rev":"8-8d99f6dad9c21cb5da0d64fefef8c6d6"}}, -{"id":"knid","key":"knid","value":{"rev":"7-2cbfae088155da1044b568584cd296df"}}, -{"id":"knox","key":"knox","value":{"rev":"19-3c42553bd201b23a6bc15fdd073dad17"}}, -{"id":"knox-stream","key":"knox-stream","value":{"rev":"17-e40275f926b6ed645e4ef04caf8e5df4"}}, -{"id":"kns","key":"kns","value":{"rev":"9-5da1a89ad8c08f4b10cd715036200da3"}}, -{"id":"ko","key":"ko","value":{"rev":"9-9df2853d0e9ed9f7740f53291d0035dd"}}, -{"id":"koala","key":"koala","value":{"rev":"8-9e3fea91917f6d8cfb5aae22115e132f"}}, -{"id":"kohai","key":"kohai","value":{"rev":"3-1721a193589459fa077fea809fd7c9a9"}}, -{"id":"koku","key":"koku","value":{"rev":"5-414736980e0e70d90cd7f29b175fb18c"}}, -{"id":"komainu","key":"komainu","value":{"rev":"5-0f1a8f132fe58385e989dd4f93aefa26"}}, -{"id":"komodo-scheme","key":"komodo-scheme","value":{"rev":"3-97d1bd27f069684c491012e079fd82c4"}}, -{"id":"konphyg","key":"konphyg","value":{"rev":"7-e5fc03d6ddf39f2e0723291800bf0d43"}}, -{"id":"kranium","key":"kranium","value":{"rev":"3-4a78d2eb28e949a55b0dbd2ab00cecaf"}}, -{"id":"kue","key":"kue","value":{"rev":"21-053b32204d89a3067c5a90ca62ede08c"}}, -{"id":"kyatchi","key":"kyatchi","value":{"rev":"21-8dfbbe498f3740a2869c82e4ab4522d1"}}, -{"id":"kyoto","key":"kyoto","value":{"rev":"15-b9acdad89d56c71b6f427a443c16f85f"}}, -{"id":"kyoto-client","key":"kyoto-client","value":{"rev":"11-7fb392ee23ce64a48ae5638d713f4fbd"}}, -{"id":"kyoto-tycoon","key":"kyoto-tycoon","value":{"rev":"18-81ece8df26dbd9986efe1d97d935bec2"}}, -{"id":"kyuri","key":"kyuri","value":{"rev":"9-bedd4c087bd7bf612bde5e862d8b91bb"}}, -{"id":"labBuilder","key":"labBuilder","value":{"rev":"11-37f85b5325f1ccf25193c8b737823185"}}, -{"id":"laconic","key":"laconic","value":{"rev":"3-f5b7b9ac113fe7d32cbf4cb0d01c3052"}}, -{"id":"languagedetect","key":"languagedetect","value":{"rev":"3-ac487c034a3470ebd47b54614ea848f9"}}, -{"id":"lastfm","key":"lastfm","value":{"rev":"52-5af213489ca6ecdf2afc851c4642b082"}}, -{"id":"layers","key":"layers","value":{"rev":"7-62cd47d9645faa588c635dab2fbd2ef0"}}, -{"id":"lazy","key":"lazy","value":{"rev":"18-9b5ccdc9c3a970ec4c2b63b6f882da6a"}}, -{"id":"lazy-image","key":"lazy-image","value":{"rev":"5-34a6bc95017c50b3cb69981c7343e5da"}}, -{"id":"lazyBum","key":"lazyBum","value":{"rev":"15-03da6d744ba8cce7efca88ccb7e18c4d"}}, -{"id":"lazyprop","key":"lazyprop","value":{"rev":"14-82b4bcf318094a7950390f03e2fec252"}}, -{"id":"ldapjs","key":"ldapjs","value":{"rev":"11-e2b28e11a0aebe37b758d8f1ed61dd57"}}, -{"id":"ldapjs-riak","key":"ldapjs-riak","value":{"rev":"7-005413a1d4e371663626a3cca200c7e0"}}, -{"id":"ldifgrep","key":"ldifgrep","value":{"rev":"3-e4f06821a3444abbcd3c0c26300dcdda"}}, -{"id":"leaf","key":"leaf","value":{"rev":"8-0ccf5cdd1b59717b53375fe4bf044ec3"}}, -{"id":"lean","key":"lean","value":{"rev":"3-32dbbc771a3f1f6697c21c5d6c516967"}}, -{"id":"leche","key":"leche","value":{"rev":"7-0f5e19052ae1e3cb25ff2aa73271ae4f"}}, -{"id":"leche.spice.io","key":"leche.spice.io","value":{"rev":"3-07db415fdb746873f211e8155ecdf232"}}, -{"id":"less","key":"less","value":{"rev":"37-160fe5ea5dba44f02defdb8ec8c647d5"}}, -{"id":"less-bal","key":"less-bal","value":{"rev":"3-d50532c7c46013a62d06a0e54f8846ce"}}, -{"id":"less4clients","key":"less4clients","value":{"rev":"5-343d2973a166801681c856558d975ddf"}}, -{"id":"lessup","key":"lessup","value":{"rev":"9-a2e7627ef1b493fe82308d019ae481ac"}}, -{"id":"lessweb","key":"lessweb","value":{"rev":"9-e21794e578884c228dbed7c5d6128a41"}}, -{"id":"leveldb","key":"leveldb","value":{"rev":"11-3809e846a7a5ff883d17263288664195"}}, -{"id":"levenshtein","key":"levenshtein","value":{"rev":"6-44d27b6a6bc407772cafc29af485854f"}}, -{"id":"lib","key":"lib","value":{"rev":"5-a95272f11e927888c8b711503fce670b"}}, -{"id":"libdtrace","key":"libdtrace","value":{"rev":"8-4d4f72b2349154da514700f576e34564"}}, -{"id":"liberator","key":"liberator","value":{"rev":"15-b702710ccb3b45e41e9e2f3ebb6375ae"}}, -{"id":"libirc","key":"libirc","value":{"rev":"3-05b125de0c179dd311129aac2e1c8047"}}, -{"id":"liblzg","key":"liblzg","value":{"rev":"5-445ed45dc3cd166a299f85f6149aa098"}}, -{"id":"libnotify","key":"libnotify","value":{"rev":"10-c6723206898865e4828e963f5acc005e"}}, -{"id":"libxml-to-js","key":"libxml-to-js","value":{"rev":"33-64d3152875d33d6feffd618152bc41df"}}, -{"id":"libxmlext","key":"libxmlext","value":{"rev":"3-6a896dacba6f25fbca9b79d4143aaa9a"}}, -{"id":"libxmljs","key":"libxmljs","value":{"rev":"17-4b2949b53d9ecde79a99361774c1144b"}}, -{"id":"libxpm","key":"libxpm","value":{"rev":"3-c03efe75832c4416ceee5d72be12a8ef"}}, -{"id":"libyaml","key":"libyaml","value":{"rev":"5-f279bde715345a4e81d43c1d798ee608"}}, -{"id":"lift","key":"lift","value":{"rev":"21-61dcb771e5e0dc03fa327120d440ccda"}}, -{"id":"light-traits","key":"light-traits","value":{"rev":"26-b35c49550f9380fd462d57c64d51540f"}}, -{"id":"lightnode","key":"lightnode","value":{"rev":"3-ce37ccbf6a6546d4fa500e0eff84e882"}}, -{"id":"limestone","key":"limestone","value":{"rev":"3-d6f76ae98e4189db4ddfa8e15b4cdea9"}}, -{"id":"limited-file","key":"limited-file","value":{"rev":"3-c1d78250965b541836a70d3e867c694f"}}, -{"id":"lin","key":"lin","value":{"rev":"17-0a26ea2a603df0d14a9c40aad96bfb5e"}}, -{"id":"line-parser","key":"line-parser","value":{"rev":"7-84047425699f5a8a8836f4f2e63777bc"}}, -{"id":"line-reader","key":"line-reader","value":{"rev":"9-d2a7cb3a9793149e643490dc16a1eb50"}}, -{"id":"linebuffer","key":"linebuffer","value":{"rev":"12-8e79075aa213ceb49b28e0af7b3f3861"}}, -{"id":"lines","key":"lines","value":{"rev":"9-01a0565f47c3816919ca75bf77539df5"}}, -{"id":"lines-adapter","key":"lines-adapter","value":{"rev":"23-f287561e42a841c00bbf94bc8741bebc"}}, -{"id":"linestream","key":"linestream","value":{"rev":"5-18c2be87653ecf20407ed70eeb601ae7"}}, -{"id":"lingo","key":"lingo","value":{"rev":"10-b3d62b203c4af108feeaf0e32b2a4186"}}, -{"id":"link","key":"link","value":{"rev":"15-7570cea23333dbe3df11fd71171e6226"}}, -{"id":"linkedin-js","key":"linkedin-js","value":{"rev":"22-1bb1f392a9838684076b422840cf98eb"}}, -{"id":"linkscape","key":"linkscape","value":{"rev":"5-7272f50a54b1db015ce6d1e79eeedad7"}}, -{"id":"linkshare","key":"linkshare","value":{"rev":"3-634c4a18a217f77ccd6b89a9a2473d2a"}}, -{"id":"linode-api","key":"linode-api","value":{"rev":"13-2b43281ec86206312a2c387c9fc2c49f"}}, -{"id":"lint","key":"lint","value":{"rev":"49-fb76fddeb3ca609e5cac75fb0b0ec216"}}, -{"id":"linter","key":"linter","value":{"rev":"18-0fc884c96350f860cf2695f615572dba"}}, -{"id":"lintnode","key":"lintnode","value":{"rev":"8-b70bca986d7bde759521d0693dbc28b8"}}, -{"id":"linux-util","key":"linux-util","value":{"rev":"9-d049e8375e9c50b7f2b6268172d79734"}}, -{"id":"liquid","key":"liquid","value":{"rev":"3-353fa3c93ddf1951e3a75d60e6e8757b"}}, -{"id":"liquor","key":"liquor","value":{"rev":"3-4ee78e69a4a400a4de3491b0954947e7"}}, -{"id":"listener","key":"listener","value":{"rev":"5-02b5858d36aa99dcc5fc03c9274c94ee"}}, -{"id":"litmus","key":"litmus","value":{"rev":"9-7e403d052483301d025e9d09b4e7a9dd"}}, -{"id":"littering","key":"littering","value":{"rev":"5-9026438311ffc18d369bfa886c120bcd"}}, -{"id":"live-twitter-map","key":"live-twitter-map","value":{"rev":"3-45a40054bbab23374a4f1743c8bd711d"}}, -{"id":"livereload","key":"livereload","value":{"rev":"5-11ff486b4014ec1998705dbd396e96f2"}}, -{"id":"load","key":"load","value":{"rev":"7-2fff87aeb91d74bc57c134ee2cf0d65b"}}, -{"id":"loadbuilder","key":"loadbuilder","value":{"rev":"9-fa9c5cb13b3af03f9d9fbf5064fa0e0f"}}, -{"id":"loadit","key":"loadit","value":{"rev":"3-51bee062ed0d985757c6ae24929fa74e"}}, -{"id":"local-cdn","key":"local-cdn","value":{"rev":"9-9c2931766a559cf036318583455456e6"}}, -{"id":"localStorage","key":"localStorage","value":{"rev":"3-455fbe195db27131789b5d59db4504b0"}}, -{"id":"locales","key":"locales","value":{"rev":"5-bee452772e2070ec07af0dd86d6dbc41"}}, -{"id":"localhose","key":"localhose","value":{"rev":"9-3a2f63ecbed2e31400ca7515fd020a77"}}, -{"id":"localhost","key":"localhost","value":{"rev":"3-c6c4f6b5688cbe62865010099c9f461f"}}, -{"id":"localhostapp","key":"localhostapp","value":{"rev":"3-17884c4847c549e07e0c881fdf60d01f"}}, -{"id":"localize","key":"localize","value":{"rev":"7-1f83adb6d1eefcf7222a05f489b5db10"}}, -{"id":"location","key":"location","value":{"rev":"3-cc6fbf77b4ade80312bd95fde4e00015"}}, -{"id":"lockfile","key":"lockfile","value":{"rev":"3-4b4b79c2b0f09cc516db1a9d581c5038"}}, -{"id":"lode","key":"lode","value":{"rev":"15-5062a9a0863770d172097c5074a2bdae"}}, -{"id":"log","key":"log","value":{"rev":"12-0aa7922459ff8397764956c56a106930"}}, -{"id":"log-buddy","key":"log-buddy","value":{"rev":"3-64c6d4927d1d235d927f09c16c874e06"}}, -{"id":"log-watcher","key":"log-watcher","value":{"rev":"3-70f8727054c8e4104f835930578f4ee1"}}, -{"id":"log4js","key":"log4js","value":{"rev":"38-137b28e6e96515da7a6399cae86795dc"}}, -{"id":"log4js-amqp","key":"log4js-amqp","value":{"rev":"3-90530c28ef63d4598c12dfcf450929c0"}}, -{"id":"log5","key":"log5","value":{"rev":"17-920e3765dcfdc31bddf13de6895122b3"}}, -{"id":"logbot","key":"logbot","value":{"rev":"3-234eedc70b5474c713832e642f4dc3b4"}}, -{"id":"logger","key":"logger","value":{"rev":"3-5eef338fb5e845a81452fbb22e582aa7"}}, -{"id":"logging","key":"logging","value":{"rev":"22-99d320792c5445bd04699c4cf19edd89"}}, -{"id":"logging-system","key":"logging-system","value":{"rev":"5-5eda9d0b1d04256f5f44abe51cd14626"}}, -{"id":"loggly","key":"loggly","value":{"rev":"49-944a404e188327431a404e5713691a8c"}}, -{"id":"login","key":"login","value":{"rev":"44-7c450fe861230a5121ff294bcd6f97c9"}}, -{"id":"logly","key":"logly","value":{"rev":"7-832fe9af1cd8bfed84a065822cec398a"}}, -{"id":"logmagic","key":"logmagic","value":{"rev":"11-5d2c7dd32ba55e5ab85127be09723ef8"}}, -{"id":"logmonger","key":"logmonger","value":{"rev":"3-07a101d795f43f7af668210660274a7b"}}, -{"id":"lokki","key":"lokki","value":{"rev":"3-f6efcce38029ea0b4889707764088540"}}, -{"id":"long-stack-traces","key":"long-stack-traces","value":{"rev":"7-4b2fe23359b29e188cb2b8936b63891a"}}, -{"id":"loom","key":"loom","value":{"rev":"3-6348ab890611154da4881a0b351b0cb5"}}, -{"id":"loop","key":"loop","value":{"rev":"3-a56e9a6144f573092bb441106b370e0c"}}, -{"id":"looseleaf","key":"looseleaf","value":{"rev":"57-46ef6f055a40c34c714e3e9b9fe5d4cd"}}, -{"id":"lovely","key":"lovely","value":{"rev":"21-f577923512458f02f48ef59eebe55176"}}, -{"id":"lpd","key":"lpd","value":{"rev":"3-433711ae25002f67aa339380668fd491"}}, -{"id":"lpd-printers","key":"lpd-printers","value":{"rev":"3-47060e6c05fb4aad227d36f6e7941227"}}, -{"id":"lru-cache","key":"lru-cache","value":{"rev":"10-23c5e7423fe315745ef924f58c36e119"}}, -{"id":"ls-r","key":"ls-r","value":{"rev":"7-a769b11a06fae8ff439fe7eeb0806b5e"}}, -{"id":"lsof","key":"lsof","value":{"rev":"5-82aa3bcf23b8026a95e469b6188938f9"}}, -{"id":"ltx","key":"ltx","value":{"rev":"21-89ca85a9ce0c9fc13b20c0f1131168b0"}}, -{"id":"lucky-server","key":"lucky-server","value":{"rev":"3-a50d87239166f0ffc374368463f96b07"}}, -{"id":"lunapark","key":"lunapark","value":{"rev":"3-841d197f404da2e63d69b0c2132d87db"}}, -{"id":"lunchbot","key":"lunchbot","value":{"rev":"3-5d8984bef249e3d9e271560b5753f4cf"}}, -{"id":"lw-nun","key":"lw-nun","value":{"rev":"3-b686f89361b7b405e4581db6c60145ed"}}, -{"id":"lw-sass","key":"lw-sass","value":{"rev":"3-e46f90e0c8eab0c8c5d5eb8cf2a9a6da"}}, -{"id":"lwes","key":"lwes","value":{"rev":"3-939bb87efcbede1c1a70de881686fbce"}}, -{"id":"lwink","key":"lwink","value":{"rev":"3-1c432fafe4809e8d4a7e6214123ae452"}}, -{"id":"lzma","key":"lzma","value":{"rev":"3-31dc39414531e329b42b3a4ea0292c43"}}, -{"id":"m1node","key":"m1node","value":{"rev":"11-b34d55bdbc6f65b1814e77fab4a7e823"}}, -{"id":"m1test","key":"m1test","value":{"rev":"3-815ce56949e41e120082632629439eac"}}, -{"id":"m2node","key":"m2node","value":{"rev":"7-f50ec5578d995dd6a0a38e1049604bfc"}}, -{"id":"m2pdb","key":"m2pdb","value":{"rev":"3-ee798ac17c8c554484aceae2f77a826b"}}, -{"id":"m3u","key":"m3u","value":{"rev":"5-7ca6d768e0aed5b88dd45c943ca9ffa0"}}, -{"id":"mac","key":"mac","value":{"rev":"21-db5883c390108ff9ba46660c78b18b6c"}}, -{"id":"macchiato","key":"macchiato","value":{"rev":"5-0df1c87029e6005577fd8fd5cdb25947"}}, -{"id":"macgyver","key":"macgyver","value":{"rev":"3-f517699102b7bd696d8197d7ce57afb9"}}, -{"id":"macros","key":"macros","value":{"rev":"3-8356bcc0d1b1bd3879eeb880b2f3330b"}}, -{"id":"macrotest","key":"macrotest","value":{"rev":"10-2c6ceffb38f8ce5b0f382dbb02720d70"}}, -{"id":"maddy","key":"maddy","value":{"rev":"9-93d59c65c3f44aa6ed43dc986dd73ca5"}}, -{"id":"madmimi-node","key":"madmimi-node","value":{"rev":"11-257e1b1bd5ee5194a7052542952b8b7a"}}, -{"id":"maga","key":"maga","value":{"rev":"24-c69734f9fc138788db741b862f889583"}}, -{"id":"magic","key":"magic","value":{"rev":"34-aed787cc30ab86c95f547b9555d6a381"}}, -{"id":"magic-templates","key":"magic-templates","value":{"rev":"3-89546e9a038150cf419b4b15a84fd2aa"}}, -{"id":"magickal","key":"magickal","value":{"rev":"3-e9ed74bb90df0a52564d47aed0451ce7"}}, -{"id":"mai","key":"mai","value":{"rev":"5-f3561fe6de2bd25201250ddb6dcf9f01"}}, -{"id":"mail","key":"mail","value":{"rev":"14-9ae558552e6a7c11017f118a71c072e9"}}, -{"id":"mail-stack","key":"mail-stack","value":{"rev":"5-c82567203540076cf4878ea1ab197b52"}}, -{"id":"mailbox","key":"mailbox","value":{"rev":"12-0b582e127dd7cf669de16ec36f8056a4"}}, -{"id":"mailchimp","key":"mailchimp","value":{"rev":"23-3d9328ee938b7940322351254ea54877"}}, -{"id":"mailer","key":"mailer","value":{"rev":"40-7b251b758f9dba4667a3127195ea0380"}}, -{"id":"mailer-bal","key":"mailer-bal","value":{"rev":"3-fc8265b1905ea37638309d7c10852050"}}, -{"id":"mailer-fixed","key":"mailer-fixed","value":{"rev":"13-3004df43c62eb64ed5fb0306b019fe66"}}, -{"id":"mailgun","key":"mailgun","value":{"rev":"25-29de1adb355636822dc21fef51f37aed"}}, -{"id":"mailparser","key":"mailparser","value":{"rev":"14-7142e4168046418afc4a76d1b330f302"}}, -{"id":"mailto-parser","key":"mailto-parser","value":{"rev":"3-f8dea7b60c0e993211f81a86dcf5b18d"}}, -{"id":"makeerror","key":"makeerror","value":{"rev":"17-ceb9789357d80467c9ae75caa64ca8ac"}}, -{"id":"malt","key":"malt","value":{"rev":"7-e5e76a842eb0764a5ebe57290b629097"}}, -{"id":"mango","key":"mango","value":{"rev":"7-6224e74a3132e54f294f62998ed9127f"}}, -{"id":"map-reduce","key":"map-reduce","value":{"rev":"11-a81d8bdc6dae7e7b76d5df74fff40ae1"}}, -{"id":"mapnik","key":"mapnik","value":{"rev":"64-693f5b957b7faf361c2cc2a22747ebf7"}}, -{"id":"maptail","key":"maptail","value":{"rev":"14-8334618ddc20006a5f77ff35b172c152"}}, -{"id":"marak","key":"marak","value":{"rev":"3-27be187af00fc97501035dfb97a11ecf"}}, -{"id":"markdoc","key":"markdoc","value":{"rev":"13-23becdeda44b26ee54c9aaa31457e4ba"}}, -{"id":"markdom","key":"markdom","value":{"rev":"10-3c0df12e4f4a2e675d0f0fde48aa425f"}}, -{"id":"markdown","key":"markdown","value":{"rev":"19-88e02c28ce0179be900bf9e6aadc070f"}}, -{"id":"markdown-js","key":"markdown-js","value":{"rev":"6-964647c2509850358f70f4e23670fbeb"}}, -{"id":"markdown-wiki","key":"markdown-wiki","value":{"rev":"6-ce35fb0612a463db5852c5d3dcc7fdd3"}}, -{"id":"markdown2html","key":"markdown2html","value":{"rev":"3-549babe5d9497785fa8b9305c81d7214"}}, -{"id":"marked","key":"marked","value":{"rev":"21-9371df65f63131c9f24e8805db99a7d9"}}, -{"id":"markov","key":"markov","value":{"rev":"13-9ab795448c54ef87851f1392d6f3671a"}}, -{"id":"maryjane","key":"maryjane","value":{"rev":"3-e2e6cce443850b5df1554bf851d16760"}}, -{"id":"massagist","key":"massagist","value":{"rev":"11-cac3a103aecb4ff3f0f607aca2b1d3fb"}}, -{"id":"masson","key":"masson","value":{"rev":"10-87a5e6fd05bd4b8697fa3fa636238c20"}}, -{"id":"masstransit","key":"masstransit","value":{"rev":"11-74898c746e541ff1a00438017ee66d4a"}}, -{"id":"matchmaker","key":"matchmaker","value":{"rev":"3-192db6fb162bdf84fa3e858092fd3e20"}}, -{"id":"math","key":"math","value":{"rev":"5-16a74d8639e44a5ccb265ab1a3b7703b"}}, -{"id":"math-lexer","key":"math-lexer","value":{"rev":"19-54b42374b0090eeee50f39cb35f2eb40"}}, -{"id":"matrices","key":"matrices","value":{"rev":"43-06d64271a5148f89d649645712f8971f"}}, -{"id":"matrix","key":"matrix","value":{"rev":"3-77cff57242445cf3d76313b72bbc38f4"}}, -{"id":"matrixlib","key":"matrixlib","value":{"rev":"11-b3c105a5e5be1835183e7965d04825d9"}}, -{"id":"matterhorn","key":"matterhorn","value":{"rev":"9-a310dba2ea054bdce65e6df2f6ae85e5"}}, -{"id":"matterhorn-dust","key":"matterhorn-dust","value":{"rev":"3-2fb311986d62cf9f180aa76038ebf7b3"}}, -{"id":"matterhorn-gui","key":"matterhorn-gui","value":{"rev":"3-7921b46c9bff3ee82e4b32bc0a0a977d"}}, -{"id":"matterhorn-prng","key":"matterhorn-prng","value":{"rev":"3-c33fd59c1f1d24fb423553ec242e444b"}}, -{"id":"matterhorn-standard","key":"matterhorn-standard","value":{"rev":"13-0aaab6ecf55cdad6f773736da968afba"}}, -{"id":"matterhorn-state","key":"matterhorn-state","value":{"rev":"3-0ba8fd8a4c644b18aff34f1aef95db33"}}, -{"id":"matterhorn-user","key":"matterhorn-user","value":{"rev":"17-e42dc37a5cb24710803b3bd8dee7484d"}}, -{"id":"matterhorn-view","key":"matterhorn-view","value":{"rev":"3-b39042d665f5912d02e724d33d129a97"}}, -{"id":"mbtiles","key":"mbtiles","value":{"rev":"41-b92035d0ec8f47850734c4bb995baf7d"}}, -{"id":"mcast","key":"mcast","value":{"rev":"8-559b2b09cfa34cb88c16ae72ec90d28a"}}, -{"id":"md5","key":"md5","value":{"rev":"3-43d600c70f6442d3878c447585bf43bf"}}, -{"id":"mdgram","key":"mdgram","value":{"rev":"15-4d65cf0d5edef976de9a612c0cde0907"}}, -{"id":"mdns","key":"mdns","value":{"rev":"11-8b6789c3779fce7f019f9f10c625147a"}}, -{"id":"mecab-binding","key":"mecab-binding","value":{"rev":"3-3395763d23a3f8e3e00ba75cb988f9b4"}}, -{"id":"mechanize","key":"mechanize","value":{"rev":"5-94b72f43e270aa24c00e283fa52ba398"}}, -{"id":"mediatags","key":"mediatags","value":{"rev":"3-d5ea41e140fbbc821590cfefdbd016a5"}}, -{"id":"mediator","key":"mediator","value":{"rev":"3-42aac2225b47f72f97001107a3d242f5"}}, -{"id":"memcache","key":"memcache","value":{"rev":"5-aebcc4babe11b654afd3cede51e945ec"}}, -{"id":"memcached","key":"memcached","value":{"rev":"9-7c46464425c78681a8e6767ef9993c4c"}}, -{"id":"memcouchd","key":"memcouchd","value":{"rev":"3-b57b9fb4f6c60604f616c2f70456b4d6"}}, -{"id":"meme","key":"meme","value":{"rev":"11-53fcb51e1d8f8908b95f0fa12788e9aa"}}, -{"id":"memo","key":"memo","value":{"rev":"9-3a9ca97227ed19cacdacf10ed193ee8b"}}, -{"id":"memoize","key":"memoize","value":{"rev":"15-44bdd127c49035c8bd781a9299c103c2"}}, -{"id":"memoizer","key":"memoizer","value":{"rev":"9-d9a147e8c8a58fd7e8f139dc902592a6"}}, -{"id":"memorystream","key":"memorystream","value":{"rev":"9-6d0656067790e158f3c4628968ed70d3"}}, -{"id":"memstore","key":"memstore","value":{"rev":"5-03dcac59882c8a434e4c2fe2ac354941"}}, -{"id":"mercury","key":"mercury","value":{"rev":"3-147af865af6f7924f44f14f4b5c14dac"}}, -{"id":"mersenne","key":"mersenne","value":{"rev":"7-d8ae550eb8d0deaa1fd60f86351cb548"}}, -{"id":"meryl","key":"meryl","value":{"rev":"23-2c0e3fad99005109c584530e303bc5bf"}}, -{"id":"mesh","key":"mesh","value":{"rev":"5-f3ea4aef5b3f169eab8b518e5044c950"}}, -{"id":"meta-promise","key":"meta-promise","value":{"rev":"5-0badf85ab432341e6256252463468b89"}}, -{"id":"meta-test","key":"meta-test","value":{"rev":"49-92df2922499960ac750ce96d861ddd7e"}}, -{"id":"meta_code","key":"meta_code","value":{"rev":"7-9b4313c0c52a09c788464f1fea05baf7"}}, -{"id":"metamanager","key":"metamanager","value":{"rev":"5-dbb0312dad15416d540eb3d860fbf205"}}, -{"id":"metaweblog","key":"metaweblog","value":{"rev":"3-d3ab090ec27242e220412d6413e388ee"}}, -{"id":"metric","key":"metric","value":{"rev":"3-8a706db5b518421ad640a75e65cb4be9"}}, -{"id":"metrics","key":"metrics","value":{"rev":"13-62e5627c1ca5e6d3b3bde8d17e675298"}}, -{"id":"metrics-broker","key":"metrics-broker","value":{"rev":"15-0fdf57ea4ec84aa1f905f53b4975e72d"}}, -{"id":"mhash","key":"mhash","value":{"rev":"3-f00d65dc939474a5c508d37a327e5074"}}, -{"id":"micro","key":"micro","value":{"rev":"17-882c0ecf34ddaef5c673c547ae80b80b"}}, -{"id":"microcache","key":"microcache","value":{"rev":"3-ef75e04bc6e86d14f93ad9c429503bd9"}}, -{"id":"microevent","key":"microevent","value":{"rev":"3-9c0369289b62873ef6e8624eef724d15"}}, -{"id":"microtest","key":"microtest","value":{"rev":"11-11afdadfb15c1db030768ce52f34de1a"}}, -{"id":"microtime","key":"microtime","value":{"rev":"20-5f75e87316cbb5f7a4be09142cd755e5"}}, -{"id":"middlefiddle","key":"middlefiddle","value":{"rev":"13-bb94c05d75c24bdeb23a4637c7ecf55e"}}, -{"id":"middleware","key":"middleware","value":{"rev":"5-80937a4c620fcc2a5532bf064ec0837b"}}, -{"id":"midi","key":"midi","value":{"rev":"9-96da6599a84a761430adfd41deb3969a"}}, -{"id":"midi-js","key":"midi-js","value":{"rev":"11-1d174af1352e3d37f6ec0df32d56ce1a"}}, -{"id":"migrate","key":"migrate","value":{"rev":"13-7493879fb60a31b9e2a9ad19e94bfef6"}}, -{"id":"mikronode","key":"mikronode","value":{"rev":"31-1edae4ffbdb74c43ea584a7757dacc9b"}}, -{"id":"milk","key":"milk","value":{"rev":"21-81fb117817ed2e4c19e16dc310c09735"}}, -{"id":"millstone","key":"millstone","value":{"rev":"29-73d54de4b4de313b0fec4edfaec741a4"}}, -{"id":"mime","key":"mime","value":{"rev":"33-de72b641474458cb21006dea6a524ceb"}}, -{"id":"mime-magic","key":"mime-magic","value":{"rev":"13-2df6b966d7f29d5ee2dd2e1028d825b1"}}, -{"id":"mimelib","key":"mimelib","value":{"rev":"9-7994cf0fe3007329b9397f4e08481487"}}, -{"id":"mimelib-noiconv","key":"mimelib-noiconv","value":{"rev":"5-c84995d4b2bbe786080c9b54227b5bb4"}}, -{"id":"mimeograph","key":"mimeograph","value":{"rev":"37-bead083230f48f354f3ccac35e11afc0"}}, -{"id":"mimeparse","key":"mimeparse","value":{"rev":"8-5ca7e6702fe7f1f37ed31b05e82f4a87"}}, -{"id":"mingy","key":"mingy","value":{"rev":"19-09b19690c55abc1e940374e25e9a0d26"}}, -{"id":"mini-lzo-wrapper","key":"mini-lzo-wrapper","value":{"rev":"4-d751d61f481363a2786ac0312893dfca"}}, -{"id":"miniee","key":"miniee","value":{"rev":"5-be0833a9f15382695f861a990f3d6108"}}, -{"id":"minifyjs","key":"minifyjs","value":{"rev":"13-f255df8c7567440bc4c0f8eaf04a18c6"}}, -{"id":"minimal","key":"minimal","value":{"rev":"5-6be6b3454d30c59a30f9ee8af0ee606c"}}, -{"id":"minimal-test","key":"minimal-test","value":{"rev":"15-65dca2c1ee27090264577cc8b93983cb"}}, -{"id":"minimatch","key":"minimatch","value":{"rev":"11-449e570c76f4e6015c3dc90f080f8c47"}}, -{"id":"minirpc","key":"minirpc","value":{"rev":"10-e85b92273a97fa86e20faef7a3b50518"}}, -{"id":"ministore","key":"ministore","value":{"rev":"11-f131868141ccd0851bb91800c86dfff1"}}, -{"id":"minitest","key":"minitest","value":{"rev":"13-c92e32499a25ff2d7e484fbbcabe1081"}}, -{"id":"miniweb","key":"miniweb","value":{"rev":"3-e8c413a77e24891138eaa9e73cb08715"}}, -{"id":"minj","key":"minj","value":{"rev":"9-ccf50caf8e38b0fc2508f01a63f80510"}}, -{"id":"minotaur","key":"minotaur","value":{"rev":"29-6d048956b26e8a213f6ccc96027bacde"}}, -{"id":"mirror","key":"mirror","value":{"rev":"21-01bdd78ff03ca3f8f99fce104baab9f9"}}, -{"id":"misao-chan","key":"misao-chan","value":{"rev":"13-f032690f0897fc4a1dc12f1e03926627"}}, -{"id":"mite.node","key":"mite.node","value":{"rev":"13-0bfb15c4a6f172991756660b29869dd4"}}, -{"id":"mixable","key":"mixable","value":{"rev":"3-bc518ab862a6ceacc48952b9bec7d61a"}}, -{"id":"mixin","key":"mixin","value":{"rev":"3-3a7ae89345d21ceaf545d93b20caf2f2"}}, -{"id":"mixinjs","key":"mixinjs","value":{"rev":"3-064173d86b243316ef1b6c5743a60bf9"}}, -{"id":"mixpanel","key":"mixpanel","value":{"rev":"7-f742248bfbfc480658c4c46f7ab7a74a"}}, -{"id":"mixpanel-api","key":"mixpanel-api","value":{"rev":"5-61a3fa28921887344d1af339917e147a"}}, -{"id":"mixpanel_api","key":"mixpanel_api","value":{"rev":"3-11939b6fd20b80bf9537380875bf3996"}}, -{"id":"mjoe","key":"mjoe","value":{"rev":"3-8b3549cd6edcc03112217370b071b076"}}, -{"id":"mjsunit.runner","key":"mjsunit.runner","value":{"rev":"12-94c779b555069ca5fb0bc9688515673e"}}, -{"id":"mkdir","key":"mkdir","value":{"rev":"3-e8fd61b35638f1f3a65d36f09344ff28"}}, -{"id":"mkdirp","key":"mkdirp","value":{"rev":"15-c8eacf17b336ea98d1d9960f02362cbf"}}, -{"id":"mmap","key":"mmap","value":{"rev":"16-df335eb3257dfbd2fb0de341970d2656"}}, -{"id":"mmikulicic-thrift","key":"mmikulicic-thrift","value":{"rev":"3-f4a9f7a97bf50e966d1184fba423a07f"}}, -{"id":"mmmodel","key":"mmmodel","value":{"rev":"7-00d61723742a325aaaa6955ba52cef60"}}, -{"id":"mmodel","key":"mmodel","value":{"rev":"3-717309af27d6c5d98ed188c9c9438a37"}}, -{"id":"mmseg","key":"mmseg","value":{"rev":"17-794d553e67d6023ca3d58dd99fe1da15"}}, -{"id":"mobilize","key":"mobilize","value":{"rev":"25-8a657ec0accf8db2e8d7b935931ab77b"}}, -{"id":"mock","key":"mock","value":{"rev":"3-d8805bff4796462750071cddd3f75ea7"}}, -{"id":"mock-request","key":"mock-request","value":{"rev":"7-4ac4814c23f0899b1100d5f0617e40f4"}}, -{"id":"mock-request-response","key":"mock-request-response","value":{"rev":"5-fe1566c9881039a92a80e0e82a95f096"}}, -{"id":"mocket","key":"mocket","value":{"rev":"13-9001879cd3cb6f52f3b2d85fb14b8f9b"}}, -{"id":"modbus-stack","key":"modbus-stack","value":{"rev":"7-50c56e74d9cb02c5d936b0b44c54f621"}}, -{"id":"model","key":"model","value":{"rev":"3-174181c2f314f35fc289b7a921ba4d39"}}, -{"id":"models","key":"models","value":{"rev":"8-6cc2748edfd96679f9bb3596864874a9"}}, -{"id":"modestmaps","key":"modestmaps","value":{"rev":"8-79265968137a2327f98bfc6943a84da9"}}, -{"id":"modjewel","key":"modjewel","value":{"rev":"3-73efc7b9dc24d82cab1de249896193fd"}}, -{"id":"modlr","key":"modlr","value":{"rev":"17-ccf16db98ab6ccb95e005b3bb76dba64"}}, -{"id":"module-grapher","key":"module-grapher","value":{"rev":"19-b6ba30b41e29fc01d4b679a643f030e5"}}, -{"id":"modulr","key":"modulr","value":{"rev":"15-8e8ffd75c6c6149206de4ce0c2aefad7"}}, -{"id":"mogile","key":"mogile","value":{"rev":"5-79a8af20dbe6bff166ac2197a3998b0c"}}, -{"id":"mojo","key":"mojo","value":{"rev":"25-1d9c26d6afd6ea77253f220d86d60307"}}, -{"id":"monad","key":"monad","value":{"rev":"10-cf20354900b7e67d94c342feb06a1eb9"}}, -{"id":"mongeese","key":"mongeese","value":{"rev":"3-f4b319d98f9f73fb17cd3ebc7fc86412"}}, -{"id":"mongo-pool","key":"mongo-pool","value":{"rev":"3-215481828e69fd874b5938a79a7e0934"}}, -{"id":"mongodb","key":"mongodb","value":{"rev":"147-3dc09965e762787f34131a8739297383"}}, -{"id":"mongodb-async","key":"mongodb-async","value":{"rev":"7-ba9097bdc86b72885fa5a9ebb49a64d0"}}, -{"id":"mongodb-provider","key":"mongodb-provider","value":{"rev":"5-5523643b403e969e0b80c57db08cb9d3"}}, -{"id":"mongodb-rest","key":"mongodb-rest","value":{"rev":"36-60b4abc4a22f31de09407cc7cdd0834f"}}, -{"id":"mongodb-wrapper","key":"mongodb-wrapper","value":{"rev":"13-7a6c5eaff36ede45211aa80f3a506cfe"}}, -{"id":"mongodb_heroku","key":"mongodb_heroku","value":{"rev":"3-05947c1e06e1f8860c7809b063a8d1a0"}}, -{"id":"mongode","key":"mongode","value":{"rev":"11-faa14f050da4a165e2568d413a6b8bc0"}}, -{"id":"mongojs","key":"mongojs","value":{"rev":"26-a628eb51534ffcdd97c1a940d460a52c"}}, -{"id":"mongolia","key":"mongolia","value":{"rev":"76-711c39de0e152e224d4118c9b0de834f"}}, -{"id":"mongolian","key":"mongolian","value":{"rev":"44-3773671b31c406a18cb9f5a1764ebee4"}}, -{"id":"mongoose","key":"mongoose","value":{"rev":"181-03a8aa7f691cbd987995bf6e3354e0f5"}}, -{"id":"mongoose-admin","key":"mongoose-admin","value":{"rev":"7-59078ad5a345e9e66574346d3e70f9ad"}}, -{"id":"mongoose-auth","key":"mongoose-auth","value":{"rev":"49-87c79f3a6164c438a53b7629be87ae5d"}}, -{"id":"mongoose-autoincr","key":"mongoose-autoincr","value":{"rev":"3-9c4dd7c3fdcd8621166665a68fccb602"}}, -{"id":"mongoose-closures","key":"mongoose-closures","value":{"rev":"3-2ff9cff790f387f2236a2c7382ebb55b"}}, -{"id":"mongoose-crypt","key":"mongoose-crypt","value":{"rev":"3-d77ffbf250e39fcc290ad37824fe2236"}}, -{"id":"mongoose-dbref","key":"mongoose-dbref","value":{"rev":"29-02090b9904fd6f5ce72afcfa729f7c96"}}, -{"id":"mongoose-flatmatcher","key":"mongoose-flatmatcher","value":{"rev":"5-4f0565901e8b588cc562ae457ad975a6"}}, -{"id":"mongoose-helpers","key":"mongoose-helpers","value":{"rev":"3-3a57e9819e24c9b0f5b5eabe41037092"}}, -{"id":"mongoose-joins","key":"mongoose-joins","value":{"rev":"3-9bae444730a329473421f50cba1c86a7"}}, -{"id":"mongoose-misc","key":"mongoose-misc","value":{"rev":"3-bcd7f3f450cf6ed233d042ac574409ce"}}, -{"id":"mongoose-relationships","key":"mongoose-relationships","value":{"rev":"9-6155a276b162ec6593b8542f0f769024"}}, -{"id":"mongoose-rest","key":"mongoose-rest","value":{"rev":"29-054330c035adf842ab34423215995113"}}, -{"id":"mongoose-spatial","key":"mongoose-spatial","value":{"rev":"3-88660dabd485edcaa29a2ea01afb90bd"}}, -{"id":"mongoose-temporal","key":"mongoose-temporal","value":{"rev":"3-1dd736395fe9be95498e588df502b7bb"}}, -{"id":"mongoose-types","key":"mongoose-types","value":{"rev":"13-8126458b91ef1bf46e582042f5dbd015"}}, -{"id":"mongoose-units","key":"mongoose-units","value":{"rev":"3-5fcdb7aedb1d5cff6e18ee1352c3d0f7"}}, -{"id":"mongoq","key":"mongoq","value":{"rev":"11-2060d674d5f8a964e800ed4470b92587"}}, -{"id":"mongoskin","key":"mongoskin","value":{"rev":"13-5a7bfacd9e9b95ec469f389751e7e435"}}, -{"id":"mongous","key":"mongous","value":{"rev":"3-4d98b4a4bfdd6d9f46342002a69d8d3a"}}, -{"id":"mongrel2","key":"mongrel2","value":{"rev":"3-93156356e478f30fc32455054e384b80"}}, -{"id":"monguava","key":"monguava","value":{"rev":"9-69ec50128220aba3e16128a4be2799c0"}}, -{"id":"mongueue","key":"mongueue","value":{"rev":"9-fc8d9df5bf15f5a25f68cf58866f11fe"}}, -{"id":"moniker","key":"moniker","value":{"rev":"5-a139616b725ddfdd1db6a376fb6584f7"}}, -{"id":"monitor","key":"monitor","value":{"rev":"56-44d2b8b7dec04b3f320f7dc4a1704c53"}}, -{"id":"monome","key":"monome","value":{"rev":"3-2776736715cbfc045bf7b42e70ccda9c"}}, -{"id":"monomi","key":"monomi","value":{"rev":"6-b6b745441f157cc40c846d23cd14297a"}}, -{"id":"moof","key":"moof","value":{"rev":"13-822b4ebf873b720bd4c7e16fcbbbbb3d"}}, -{"id":"moonshado","key":"moonshado","value":{"rev":"3-b54de1aef733c8fa118fa7cf6af2fb9b"}}, -{"id":"moose","key":"moose","value":{"rev":"5-e11c8b7c09826e3431ed3408ee874779"}}, -{"id":"mootools","key":"mootools","value":{"rev":"9-39f5535072748ccd3cf0212ef4c3d4fa"}}, -{"id":"mootools-array","key":"mootools-array","value":{"rev":"3-d1354704a9fe922d969c2bf718e0dc53"}}, -{"id":"mootools-browser","key":"mootools-browser","value":{"rev":"3-ce0946b357b6ddecc128febef2c5d720"}}, -{"id":"mootools-class","key":"mootools-class","value":{"rev":"3-0ea815d28b61f3880087e3f4b8668354"}}, -{"id":"mootools-class-extras","key":"mootools-class-extras","value":{"rev":"3-575796745bd169c35f4fc0019bb36b76"}}, -{"id":"mootools-client","key":"mootools-client","value":{"rev":"3-b658c331f629f80bfe17c3e6ed44c525"}}, -{"id":"mootools-cookie","key":"mootools-cookie","value":{"rev":"3-af93588531e5a52c76a8e7a4eac3612a"}}, -{"id":"mootools-core","key":"mootools-core","value":{"rev":"3-01b1678fc56d94d29566b7853ad56059"}}, -{"id":"mootools-domready","key":"mootools-domready","value":{"rev":"3-0fc6620e2c8f7d107816cace9c099633"}}, -{"id":"mootools-element","key":"mootools-element","value":{"rev":"3-bac857c1701c91207d1ec6d1eb002d07"}}, -{"id":"mootools-element-dimensions","key":"mootools-element-dimensions","value":{"rev":"3-d82df62b3e97122ad0a7668efb7ba776"}}, -{"id":"mootools-element-event","key":"mootools-element-event","value":{"rev":"3-a30380151989ca31851cf751fcd55e9a"}}, -{"id":"mootools-element-style","key":"mootools-element-style","value":{"rev":"3-6103fa8551a21dc592e410dc7df647f8"}}, -{"id":"mootools-event","key":"mootools-event","value":{"rev":"3-7327279ec157de8c47f3ee24615ead95"}}, -{"id":"mootools-function","key":"mootools-function","value":{"rev":"3-eb3ee17acf40d6cc05463cb88edc6f5e"}}, -{"id":"mootools-fx","key":"mootools-fx","value":{"rev":"3-757ab6c8423e8c434d1ee783ea28cdb5"}}, -{"id":"mootools-fx-css","key":"mootools-fx-css","value":{"rev":"3-8eb0cf468c826b9c485835fab94837e7"}}, -{"id":"mootools-fx-morph","key":"mootools-fx-morph","value":{"rev":"3-b91310f8a81221592970fe7632bd9f7a"}}, -{"id":"mootools-fx-transitions","key":"mootools-fx-transitions","value":{"rev":"3-a1ecde35dfbb80f3a6062005758bb934"}}, -{"id":"mootools-fx-tween","key":"mootools-fx-tween","value":{"rev":"3-39497defbffdf463932cc9f00cde8d5d"}}, -{"id":"mootools-json","key":"mootools-json","value":{"rev":"3-69deb6679a5d1d49f22e19834ae07c32"}}, -{"id":"mootools-more","key":"mootools-more","value":{"rev":"3-d8f46ce319ca0e3deb5fc04ad5f73cb9"}}, -{"id":"mootools-number","key":"mootools-number","value":{"rev":"3-9f4494883ac39f93734fea9af6ef2fc5"}}, -{"id":"mootools-object","key":"mootools-object","value":{"rev":"3-c9632dfa793ab4d9ad4b68a2e27f09fc"}}, -{"id":"mootools-request","key":"mootools-request","value":{"rev":"3-663e5472f351eea3b7488ee441bc6a61"}}, -{"id":"mootools-request-html","key":"mootools-request-html","value":{"rev":"3-0ab9576c11a564d44b3c3ca3ef3dc240"}}, -{"id":"mootools-request-json","key":"mootools-request-json","value":{"rev":"3-c0359201c94ba1684ea6336e35cd70c2"}}, -{"id":"mootools-server","key":"mootools-server","value":{"rev":"3-98e89499f6eab137bbab053a3932a526"}}, -{"id":"mootools-slick-finder","key":"mootools-slick-finder","value":{"rev":"3-9a5820e90d6ea2d797268f3c60a9f177"}}, -{"id":"mootools-slick-parser","key":"mootools-slick-parser","value":{"rev":"3-d4e6b1673e6e2a6bcc66bf4988b2994d"}}, -{"id":"mootools-string","key":"mootools-string","value":{"rev":"3-2fda1c7915295df62e547018a7f05916"}}, -{"id":"mootools-swiff","key":"mootools-swiff","value":{"rev":"3-f0edeead85f3d48cf2af2ca35a4e67a5"}}, -{"id":"mootools.js","key":"mootools.js","value":{"rev":"3-085e50e3529d19e1d6ad630027ba51dc"}}, -{"id":"morestreams","key":"morestreams","value":{"rev":"7-3d0145c2cfb9429dfdcfa872998c9fe8"}}, -{"id":"morpheus","key":"morpheus","value":{"rev":"45-04335640f709335d1828523425a87909"}}, -{"id":"morton","key":"morton","value":{"rev":"11-abd787350e21bef65c1c6776e40a0753"}}, -{"id":"mothermayi","key":"mothermayi","value":{"rev":"5-2c46f9873efd19f543def5eeda0a05f1"}}, -{"id":"mountable-proxy","key":"mountable-proxy","value":{"rev":"7-3b91bd0707447885676727ad183bb051"}}, -{"id":"move","key":"move","value":{"rev":"69-ce11c235c78de6d6184a86aaa93769eb"}}, -{"id":"moviesearch","key":"moviesearch","value":{"rev":"3-72e77965a44264dfdd5af23e4a36d2ce"}}, -{"id":"mp","key":"mp","value":{"rev":"3-47899fb2bdaf21dda16abd037b325c3b"}}, -{"id":"mpdsocket","key":"mpdsocket","value":{"rev":"3-2dd4c9bb019f3f491c55364be7a56229"}}, -{"id":"mrcolor","key":"mrcolor","value":{"rev":"3-4695b11798a65c61714b8f236a40936c"}}, -{"id":"msgbus","key":"msgbus","value":{"rev":"27-a5d861b55c933842226d4e536820ec99"}}, -{"id":"msgme","key":"msgme","value":{"rev":"3-d1968af1234a2059eb3d84eb76cdaa4e"}}, -{"id":"msgpack","key":"msgpack","value":{"rev":"9-ecf7469392d87460ddebef2dd369b0e5"}}, -{"id":"msgpack-0.4","key":"msgpack-0.4","value":{"rev":"3-5d509ddba6c53ed6b8dfe4afb1d1661d"}}, -{"id":"msgpack2","key":"msgpack2","value":{"rev":"4-63b8f3ccf35498eb5c8bd9b8d683179b"}}, -{"id":"mu","key":"mu","value":{"rev":"7-7a8ce1cba5d6d98e696c4e633aa081fa"}}, -{"id":"mu2","key":"mu2","value":{"rev":"3-4ade1c5b1496c720312beae1822da9de"}}, -{"id":"mud","key":"mud","value":{"rev":"66-56e1b1a1e5af14c3df0520c58358e7cd"}}, -{"id":"muffin","key":"muffin","value":{"rev":"22-210c45a888fe1f095becdcf11876a2bc"}}, -{"id":"multi-node","key":"multi-node","value":{"rev":"1-224161d875f0e1cbf4b1e249603c670a"}}, -{"id":"multicast-eventemitter","key":"multicast-eventemitter","value":{"rev":"13-ede3e677d6e21bbfe42aad1b549a137c"}}, -{"id":"multimeter","key":"multimeter","value":{"rev":"7-847f45a6f592a8410a77d3e5efb5cbf3"}}, -{"id":"multipart-stack","key":"multipart-stack","value":{"rev":"9-85aaa2ed2180d3124d1dcd346955b672"}}, -{"id":"muse","key":"muse","value":{"rev":"3-d6bbc06df2e359d6ef285f9da2bd0efd"}}, -{"id":"musicmetadata","key":"musicmetadata","value":{"rev":"21-957bf986aa9d0db02175ea1d79293909"}}, -{"id":"mustache","key":"mustache","value":{"rev":"6-7f8458f2b52de5b37004b105c0f39e62"}}, -{"id":"mustachio","key":"mustachio","value":{"rev":"9-6ed3f41613f886128acd18b73b55439f"}}, -{"id":"mutex","key":"mutex","value":{"rev":"3-de95bdff3dd00271361067b5d70ea03b"}}, -{"id":"muzak","key":"muzak","value":{"rev":"9-5ff968ffadebe957b72a8b77b538b71c"}}, -{"id":"mvc","key":"mvc","value":{"rev":"52-7c954b6c3b90b1b734d8e8c3d2d34f5e"}}, -{"id":"mvc.coffee","key":"mvc.coffee","value":{"rev":"3-f203564ed70c0284455e7f96ea61fdb7"}}, -{"id":"mypackage","key":"mypackage","value":{"rev":"3-49cc95fb2e5ac8ee3dbbab1de451c0d1"}}, -{"id":"mypakege","key":"mypakege","value":{"rev":"3-e74d7dc2c2518304ff1700cf295eb823"}}, -{"id":"myrtle-parser","key":"myrtle-parser","value":{"rev":"3-9089c1a2f3c3a24f0bce3941bc1d534d"}}, -{"id":"mysql","key":"mysql","value":{"rev":"30-a8dc68eb056cb6f69fae2423c1337474"}}, -{"id":"mysql-activerecord","key":"mysql-activerecord","value":{"rev":"17-9d21d0b10a5c84f6cacfd8d2236f9887"}}, -{"id":"mysql-client","key":"mysql-client","value":{"rev":"5-cc877218864c319d17f179e49bf58c99"}}, -{"id":"mysql-helper","key":"mysql-helper","value":{"rev":"3-c6f3b9f00cd9fee675aa2a9942cc336a"}}, -{"id":"mysql-libmysqlclient","key":"mysql-libmysqlclient","value":{"rev":"38-51c08e24257b99bf5591232016ada8ab"}}, -{"id":"mysql-native","key":"mysql-native","value":{"rev":"12-0592fbf66c55e6e9db6a75c97be088c3"}}, -{"id":"mysql-native-prerelease","key":"mysql-native-prerelease","value":{"rev":"7-b1a6f3fc41f6c152f3b178e13f91b5c4"}}, -{"id":"mysql-oil","key":"mysql-oil","value":{"rev":"9-70c07b9c552ff592be8ca89ea6efa408"}}, -{"id":"mysql-pool","key":"mysql-pool","value":{"rev":"15-41f510c45174b6c887856120ce3d5a3b"}}, -{"id":"mysql-simple","key":"mysql-simple","value":{"rev":"13-7ee13f035e8ebcbc27f6fe910058aee9"}}, -{"id":"n","key":"n","value":{"rev":"31-bfaed5022beae2177a090c4c8fce82a4"}}, -{"id":"n-ext","key":"n-ext","value":{"rev":"3-5ad67a300f8e88ef1dd58983c9061bc1"}}, -{"id":"n-pubsub","key":"n-pubsub","value":{"rev":"3-af990bcbf9f94554365788b81715d3b4"}}, -{"id":"n-rest","key":"n-rest","value":{"rev":"7-42f1d92f9229f126a1b063ca27bfc85b"}}, -{"id":"n-util","key":"n-util","value":{"rev":"6-d0c59c7412408bc94e20de4d22396d79"}}, -{"id":"nMemcached","key":"nMemcached","value":{"rev":"3-be350fd46624a1cac0052231101e0594"}}, -{"id":"nStoreSession","key":"nStoreSession","value":{"rev":"3-a3452cddd2b9ff8edb6d46999fa5b0eb"}}, -{"id":"nTPL","key":"nTPL","value":{"rev":"41-16a54848286364d894906333b0c1bb2c"}}, -{"id":"nTunes","key":"nTunes","value":{"rev":"18-76bc566a504100507056316fe8d3cc35"}}, -{"id":"nabe","key":"nabe","value":{"rev":"13-dc93f35018e84a23ace4d5114fa1bb28"}}, -{"id":"nack","key":"nack","value":{"rev":"118-f629c8c208c76fa0c2ce66d21f927ee4"}}, -{"id":"nagari","key":"nagari","value":{"rev":"11-cb200690c6d606d8597178e492b54cde"}}, -{"id":"nailplate","key":"nailplate","value":{"rev":"11-e1532c42d9d83fc32942dec0b87df587"}}, -{"id":"nails","key":"nails","value":{"rev":"12-f472bf005c4a4c2b49fb0118b109bef1"}}, -{"id":"nake","key":"nake","value":{"rev":"11-250933df55fbe7bb19e34a84ed23ca3e"}}, -{"id":"named-routes","key":"named-routes","value":{"rev":"6-ffbdd4caa74a30e87aa6dbb36f2b967c"}}, -{"id":"namespace","key":"namespace","value":{"rev":"7-89e2850e14206af13f26441e75289878"}}, -{"id":"namespaces","key":"namespaces","value":{"rev":"11-7a9b3d2537438211021a472035109f3c"}}, -{"id":"nami","key":"nami","value":{"rev":"29-3d44b1338222a4d994d4030868a94ea8"}}, -{"id":"nano","key":"nano","value":{"rev":"105-50efc49a8f6424706af554872002c014"}}, -{"id":"nanostate","key":"nanostate","value":{"rev":"9-1664d985e8cdbf16e150ba6ba4d79ae5"}}, -{"id":"narcissus","key":"narcissus","value":{"rev":"3-46581eeceff566bd191a14dec7b337f6"}}, -{"id":"nariya","key":"nariya","value":{"rev":"13-d83b8b6162397b154a4b59553be225e9"}}, -{"id":"narrativ","key":"narrativ","value":{"rev":"9-ef215eff6bf222425f73d23e507f7ff3"}}, -{"id":"narrow","key":"narrow","value":{"rev":"5-c6963048ba02adaf819dc51815fa0015"}}, -{"id":"narwhal","key":"narwhal","value":{"rev":"6-13bf3f87e6cfb1e57662cc3e3be450fc"}}, -{"id":"narwhal-lib","key":"narwhal-lib","value":{"rev":"6-4722d9b35fed59a2e8f7345a1eb6769d"}}, -{"id":"nat","key":"nat","value":{"rev":"3-da0906c08792043546f98ace8ce59a78"}}, -{"id":"native2ascii","key":"native2ascii","value":{"rev":"3-9afd51209d67303a8ee807ff862e31fc"}}, -{"id":"nativeUtil","key":"nativeUtil","value":{"rev":"7-6e3e9757b436ebcee35a20e633c08d60"}}, -{"id":"natives","key":"natives","value":{"rev":"24-6c4269c9c7cfb52571bd2c94fa26efc6"}}, -{"id":"natural","key":"natural","value":{"rev":"110-fc92701ad8525f45fbdb5863959ca03c"}}, -{"id":"naturalsort","key":"naturalsort","value":{"rev":"3-4321f5e432aee224af0fee9e4fb901ff"}}, -{"id":"nave","key":"nave","value":{"rev":"29-79baa66065fa9075764cc3e5da2edaef"}}, -{"id":"navigator","key":"navigator","value":{"rev":"3-f2f4f5376afb10753006f40bd49689c3"}}, -{"id":"nbs-api","key":"nbs-api","value":{"rev":"3-94949b1f0797369abc0752482268ef08"}}, -{"id":"nbt","key":"nbt","value":{"rev":"3-b711b9db76f64449df7f43c659ad8e7f"}}, -{"id":"nclosure","key":"nclosure","value":{"rev":"9-042b39740a39f0556d0dc2c0990b7fa8"}}, -{"id":"nclosureultimate","key":"nclosureultimate","value":{"rev":"3-61ff4bc480239304c459374c9a5f5754"}}, -{"id":"nconf","key":"nconf","value":{"rev":"65-8d8c0d2c6d5d9d526b8a3f325f68eca1"}}, -{"id":"nconf-redis","key":"nconf-redis","value":{"rev":"5-21ae138633b20cb29ed49b9fcd425e10"}}, -{"id":"ncp","key":"ncp","value":{"rev":"23-6441091c6c27ecb5b99f5781299a2192"}}, -{"id":"ncss","key":"ncss","value":{"rev":"9-1d2330e0fdbc40f0810747c2b156ecf2"}}, -{"id":"ncurses","key":"ncurses","value":{"rev":"12-bb059ea6fee12ca77f1fbb7bb6dd9447"}}, -{"id":"ndb","key":"ndb","value":{"rev":"15-b3e826f68a57095413666e9fe74589da"}}, -{"id":"ndistro","key":"ndistro","value":{"rev":"3-fcda3c018d11000b2903ad7104b60b35"}}, -{"id":"ndns","key":"ndns","value":{"rev":"5-1aeaaca119be44af7a83207d76f263fc"}}, -{"id":"nebulog","key":"nebulog","value":{"rev":"3-1863b0ce17cc0f07a50532a830194254"}}, -{"id":"neco","key":"neco","value":{"rev":"43-e830913302b52012ab63177ecf292822"}}, -{"id":"ned","key":"ned","value":{"rev":"15-4230c69fb52dfddfd65526dcfe5c4ec6"}}, -{"id":"nedis","key":"nedis","value":{"rev":"7-d49e329dca586d1a3569266f0595c9ad"}}, -{"id":"neko","key":"neko","value":{"rev":"60-13aa87d2278c3a734733cff2a34a7970"}}, -{"id":"neo4j","key":"neo4j","value":{"rev":"7-dde7066eac32a405df95ccf9c50c8ae7"}}, -{"id":"nerve","key":"nerve","value":{"rev":"3-2c47b79586d7930aabf9325ca88ad7e8"}}, -{"id":"nest","key":"nest","value":{"rev":"23-560d67971e9acddacf087608306def24"}}, -{"id":"nestableflow","key":"nestableflow","value":{"rev":"5-ee8af667a84d333fcc8092c89f4189c3"}}, -{"id":"nestor","key":"nestor","value":{"rev":"3-f1affbc37be3bf4e337365bd172578dc"}}, -{"id":"net","key":"net","value":{"rev":"3-895103ee532ef31396d9c06764df1ed8"}}, -{"id":"netiface","key":"netiface","value":{"rev":"3-885c94284fd3a9601afe291ab68aca84"}}, -{"id":"netpool","key":"netpool","value":{"rev":"3-dadfd09b9eb7ef73e2bff34a381de207"}}, -{"id":"netstring","key":"netstring","value":{"rev":"9-d26e7bf4a3ce5eb91bb1889d362f71e6"}}, -{"id":"neuron","key":"neuron","value":{"rev":"11-edaed50492368ff39eaf7d2004d7f4d8"}}, -{"id":"new","key":"new","value":{"rev":"3-7789b37104d8161b7ccf898a9cda1fc6"}}, -{"id":"newforms","key":"newforms","value":{"rev":"9-2a87cb74477d210fcb1d0c3e3e236f03"}}, -{"id":"nexpect","key":"nexpect","value":{"rev":"15-e7127f41b9f3ec45185ede7bab7b4acd"}}, -{"id":"next","key":"next","value":{"rev":"13-de5e62125b72e48ea142a55a3817589c"}}, -{"id":"nextrip","key":"nextrip","value":{"rev":"5-1ac8103552967af98d3de452ef81a94f"}}, -{"id":"nexttick","key":"nexttick","value":{"rev":"9-c7ec279e713ea8483d33c31871aea0db"}}, -{"id":"ngen","key":"ngen","value":{"rev":"9-972980a439c34851d67e4f61a96c2632"}}, -{"id":"ngen-basicexample","key":"ngen-basicexample","value":{"rev":"3-897763c230081d320586bcadfa84499f"}}, -{"id":"ngeohash","key":"ngeohash","value":{"rev":"5-9ca0c06066bc798e934db35cad99453e"}}, -{"id":"ngist","key":"ngist","value":{"rev":"7-592c24e72708219ed1eb078ddff95ab6"}}, -{"id":"ngram","key":"ngram","value":{"rev":"5-00e6b24dc178bdeb49b1ac8cb09f6e77"}}, -{"id":"ngrep","key":"ngrep","value":{"rev":"3-49c1a3839b12083280475177c1a16e38"}}, -{"id":"nhp-body-restreamer","key":"nhp-body-restreamer","value":{"rev":"1-8a4e5e23ae681a3f8be9afb613648230"}}, -{"id":"nhttpd","key":"nhttpd","value":{"rev":"3-cdc73384e1a1a4666e813ff52f2f5e4f"}}, -{"id":"nib","key":"nib","value":{"rev":"25-d67d5a294ba5b8953472cf936b97e13d"}}, -{"id":"nicetime","key":"nicetime","value":{"rev":"3-39fdba269d712064dc1e02a7ab846821"}}, -{"id":"nicknack","key":"nicknack","value":{"rev":"5-7b5477b63f782d0a510b0c15d2824f20"}}, -{"id":"nide","key":"nide","value":{"rev":"9-74f642fced47c934f9bae29f04d17a46"}}, -{"id":"nih-op","key":"nih-op","value":{"rev":"3-6e649b45964f84cb04340ab7f0a36a1c"}}, -{"id":"nimble","key":"nimble","value":{"rev":"5-867b808dd80eab33e5f22f55bb5a7376"}}, -{"id":"ninjs","key":"ninjs","value":{"rev":"3-f59997cc4bacb2d9d9852f955d15199e"}}, -{"id":"ninotify","key":"ninotify","value":{"rev":"3-a0f3c7cbbe7ccf5d547551aa062cc8b5"}}, -{"id":"nirc","key":"nirc","value":{"rev":"3-28197984656939a5a93a77c0a1605406"}}, -{"id":"nithub","key":"nithub","value":{"rev":"3-eaa85e6ac6668a304e4e4a565c54f57d"}}, -{"id":"nix","key":"nix","value":{"rev":"12-7b338b03c0e110aeb348551b14796ff1"}}, -{"id":"nko","key":"nko","value":{"rev":"39-2bf94b2bc279b8cf847bfc7668029d37"}}, -{"id":"nlog","key":"nlog","value":{"rev":"3-ae469820484ca33f346001dcb7b63a2d"}}, -{"id":"nlog4js","key":"nlog4js","value":{"rev":"3-bc17a61a9023d64e192d249144e69f02"}}, -{"id":"nlogger","key":"nlogger","value":{"rev":"11-1e48fc9a5a4214d9e56db6c6b63f1eeb"}}, -{"id":"nmd","key":"nmd","value":{"rev":"27-2dcb60d0258a9cea838f7cc4e0922f90"}}, -{"id":"nntp","key":"nntp","value":{"rev":"5-c86b189e366b9a6a428f9a2ee88dccf1"}}, -{"id":"no.de","key":"no.de","value":{"rev":"10-0dc855fd6b0b36a710b473b2720b22c0"}}, -{"id":"nobj","key":"nobj","value":{"rev":"3-0b4a46b91b70117306a9888202117223"}}, -{"id":"noblemachine","key":"noblemachine","value":{"rev":"3-06fec410fe0c7328e06eec50b4fa5d9a"}}, -{"id":"noblerecord","key":"noblerecord","value":{"rev":"5-22f24c4285bd405785588480bb2bc324"}}, -{"id":"nock","key":"nock","value":{"rev":"5-f94423d37dbdf41001ec097f20635271"}}, -{"id":"nocr-mongo","key":"nocr-mongo","value":{"rev":"5-ce6335ed276187cc38c30cb5872d3d83"}}, -{"id":"nodast","key":"nodast","value":{"rev":"3-1c563107f2d77b79a8f0d0b8ba7041f5"}}, -{"id":"node-api","key":"node-api","value":{"rev":"3-b69cefec93d9f73256acf9fb9edeebd6"}}, -{"id":"node-apidoc","key":"node-apidoc","value":{"rev":"6-cd26945e959403fcbee8ba542e14e667"}}, -{"id":"node-app-reloader","key":"node-app-reloader","value":{"rev":"5-e08cac7656afd6c124f8e2a9b9d6fdd3"}}, -{"id":"node-arse","key":"node-arse","value":{"rev":"9-b643c828541739a5fa972c801f81b212"}}, -{"id":"node-assert-extras","key":"node-assert-extras","value":{"rev":"3-3498e17b996ffc42a29d46c9699a3b52"}}, -{"id":"node-assert-lint-free","key":"node-assert-lint-free","value":{"rev":"5-852130ba6bafc703657b833343bc5646"}}, -{"id":"node-asset","key":"node-asset","value":{"rev":"18-f7cf59be8e0d015a43d05807a1ed9c0c"}}, -{"id":"node-awesm","key":"node-awesm","value":{"rev":"3-539c10145541ac5efc4dd295767b2abc"}}, -{"id":"node-backbone-couch","key":"node-backbone-couch","value":{"rev":"19-c4d8e93436b60e098c81cc0fe50f960c"}}, -{"id":"node-base64","key":"node-base64","value":{"rev":"11-da10a7157fd9e139b48bc8d9e44a98fa"}}, -{"id":"node-bj","key":"node-bj","value":{"rev":"3-5cd21fa259199870d1917574cd167396"}}, -{"id":"node-bosh-stress-tool","key":"node-bosh-stress-tool","value":{"rev":"3-36afc4b47e570964b7f8d705e1d47732"}}, -{"id":"node-brainfuck","key":"node-brainfuck","value":{"rev":"5-c7a6f703a97a409670005cab52664629"}}, -{"id":"node-build","key":"node-build","value":{"rev":"10-4f2f137fb4ef032f9dca3e3c64c15270"}}, -{"id":"node-casa","key":"node-casa","value":{"rev":"3-3f80a478aa47620bfc0c64cc6f140d98"}}, -{"id":"node-ccl","key":"node-ccl","value":{"rev":"13-00498b820cc4cadce8cc5b7b76e30b0f"}}, -{"id":"node-chain","key":"node-chain","value":{"rev":"6-b543f421ac63eeedc667b3395e7b8971"}}, -{"id":"node-child-process-manager","key":"node-child-process-manager","value":{"rev":"36-befb1a0eeac02ad400e2aaa8a076a053"}}, -{"id":"node-chirpstream","key":"node-chirpstream","value":{"rev":"10-f20e404f9ae5d43dfb6bcee15bd9affe"}}, -{"id":"node-clone","key":"node-clone","value":{"rev":"5-5ace5d51179d0e642bf9085b3bbf999b"}}, -{"id":"node-cloudwatch","key":"node-cloudwatch","value":{"rev":"3-7f9d1e075fcc3bd3e7849acd893371d5"}}, -{"id":"node-combine","key":"node-combine","value":{"rev":"3-51891c3c7769ff11a243c89c7e537907"}}, -{"id":"node-compat","key":"node-compat","value":{"rev":"9-24fce8e15eed3e193832b1c93a482d15"}}, -{"id":"node-config","key":"node-config","value":{"rev":"6-8821f6b46347e57258e62e1be841c186"}}, -{"id":"node-crocodoc","key":"node-crocodoc","value":{"rev":"5-ad4436f633f37fe3248dce93777fc26e"}}, -{"id":"node-csv","key":"node-csv","value":{"rev":"10-cd15d347b595f1d9d1fd30b483c52724"}}, -{"id":"node-date","key":"node-date","value":{"rev":"3-a5b41cab3247e12f2beaf1e0b1ffadfa"}}, -{"id":"node-dbi","key":"node-dbi","value":{"rev":"27-96e1df6fdefbae77bfa02eda64c3e3b9"}}, -{"id":"node-debug-proxy","key":"node-debug-proxy","value":{"rev":"9-c00a14832cdd5ee4d489eb41a3d0d621"}}, -{"id":"node-dep","key":"node-dep","value":{"rev":"15-378dedd3f0b3e54329c00c675b19401c"}}, -{"id":"node-dev","key":"node-dev","value":{"rev":"48-6a98f38078fe5678d6c2fb48aec3c1c3"}}, -{"id":"node-downloader","key":"node-downloader","value":{"rev":"3-a541126c56c48681571e5e998c481343"}}, -{"id":"node-evented","key":"node-evented","value":{"rev":"6-a6ce8ab39e01cc0262c80d4bf08fc333"}}, -{"id":"node-exception-notifier","key":"node-exception-notifier","value":{"rev":"3-cebc02c45dace4852f8032adaa4e3c9c"}}, -{"id":"node-expat","key":"node-expat","value":{"rev":"33-261d85273a0a551e7815f835a933d5eb"}}, -{"id":"node-expect","key":"node-expect","value":{"rev":"7-5ba4539adfd3ba95dab21bb5bc0a5193"}}, -{"id":"node-express-boilerplate","key":"node-express-boilerplate","value":{"rev":"3-972f51d1ff9493e48d7cf508461f1114"}}, -{"id":"node-extjs","key":"node-extjs","value":{"rev":"7-33143616b4590523b4e1549dd8ffa991"}}, -{"id":"node-extjs4","key":"node-extjs4","value":{"rev":"3-8e5033aed477629a6fb9812466a90cfd"}}, -{"id":"node-fakeweb","key":"node-fakeweb","value":{"rev":"5-f01377fa6d03461cbe77f41b73577cf4"}}, -{"id":"node-fb","key":"node-fb","value":{"rev":"3-bc5f301a60e475de7c614837d3f9f35a"}}, -{"id":"node-fb-signed-request","key":"node-fb-signed-request","value":{"rev":"3-33c8f043bb947b63a84089d633d68f8e"}}, -{"id":"node-fects","key":"node-fects","value":{"rev":"3-151b7b895b74b24a87792fac34735814"}}, -{"id":"node-ffi","key":"node-ffi","value":{"rev":"22-25cf229f0ad4102333b2b13e03054ac5"}}, -{"id":"node-filter","key":"node-filter","value":{"rev":"3-0e6a86b4abb65df3594e5c93ab04bd31"}}, -{"id":"node-foursquare","key":"node-foursquare","value":{"rev":"25-549bbb0c2b4f96b2c5e6a5f642e8481d"}}, -{"id":"node-fs","key":"node-fs","value":{"rev":"5-14050cbc3887141f6b0e1e7d62736a63"}}, -{"id":"node-fs-synchronize","key":"node-fs-synchronize","value":{"rev":"11-6341e79f3391a9e1daa651a5932c8795"}}, -{"id":"node-gd","key":"node-gd","value":{"rev":"11-2ede7f4af38f062b86cc32bb0125e1bf"}}, -{"id":"node-geocode","key":"node-geocode","value":{"rev":"6-505af45c7ce679ac6738b495cc6b03c2"}}, -{"id":"node-get","key":"node-get","value":{"rev":"9-906945005a594ea1f05d4ad23170a83f"}}, -{"id":"node-gettext","key":"node-gettext","value":{"rev":"5-532ea4b528108b4c8387ddfc8fa690b2"}}, -{"id":"node-gist","key":"node-gist","value":{"rev":"11-3495a499c9496d01235676f429660424"}}, -{"id":"node-glbse","key":"node-glbse","value":{"rev":"5-69a537189610c69cc549f415431b181a"}}, -{"id":"node-google-sql","key":"node-google-sql","value":{"rev":"7-bfe20d25a4423651ecdff3f5054a6946"}}, -{"id":"node-gravatar","key":"node-gravatar","value":{"rev":"6-8265fc1ad003fd8a7383244c92abb346"}}, -{"id":"node-handlersocket","key":"node-handlersocket","value":{"rev":"16-f1dc0246559748a842dd0e1919c569ae"}}, -{"id":"node-hdfs","key":"node-hdfs","value":{"rev":"3-d460fba8ff515660de34cb216223c569"}}, -{"id":"node-hipchat","key":"node-hipchat","value":{"rev":"3-9d16738bf70f9e37565727e671ffe551"}}, -{"id":"node-hive","key":"node-hive","value":{"rev":"31-5eef1fa77a39e4bdacd8fa85ec2ce698"}}, -{"id":"node-html-encoder","key":"node-html-encoder","value":{"rev":"3-75f92e741a3b15eb56e3c4513feaca6d"}}, -{"id":"node-i3","key":"node-i3","value":{"rev":"3-5c489f43aeb06054b02ad3706183599c"}}, -{"id":"node-indextank","key":"node-indextank","value":{"rev":"5-235a17fce46c73c8b5abc4cf5f964385"}}, -{"id":"node-inherit","key":"node-inherit","value":{"rev":"3-099c0acf9c889eea94faaf64067bfc52"}}, -{"id":"node-inspector","key":"node-inspector","value":{"rev":"34-ca9fa856cf32a737d1ecccb759aaf5e1"}}, -{"id":"node-int64","key":"node-int64","value":{"rev":"11-50b92b5b65adf17e673b4d15df643ed4"}}, -{"id":"node-ip-lib","key":"node-ip-lib","value":{"rev":"3-2fe72f7b78cbc1739c71c7cfaec9fbcd"}}, -{"id":"node-iplookup","key":"node-iplookup","value":{"rev":"10-ba8474624dd852a46303d32ff0556883"}}, -{"id":"node-jdownloader","key":"node-jdownloader","value":{"rev":"3-b015035cfb8540568da5deb55b35248c"}}, -{"id":"node-jslint-all","key":"node-jslint-all","value":{"rev":"5-582f4a31160d3700731fa39771702896"}}, -{"id":"node-jsonengine","key":"node-jsonengine","value":{"rev":"3-6e429c32e42b205f3ed1ea1f48d67cbc"}}, -{"id":"node-khtml","key":"node-khtml","value":{"rev":"39-db8e8eea569657fc7de6300172a6a8a7"}}, -{"id":"node-linkshare","key":"node-linkshare","value":{"rev":"35-acc18a5d584b828bb2bd4f32bbcde98c"}}, -{"id":"node-log","key":"node-log","value":{"rev":"17-79cecc66227b4fb3a2ae04b7dac17cc2"}}, -{"id":"node-logentries","key":"node-logentries","value":{"rev":"3-0f640d5ff489a6904f4a8c18fb5f7e9c"}}, -{"id":"node-logger","key":"node-logger","value":{"rev":"3-75084f98359586bdd254e57ea5915d37"}}, -{"id":"node-logging","key":"node-logging","value":{"rev":"15-af01bc2b6128150787c85c8df1dae642"}}, -{"id":"node-mailer","key":"node-mailer","value":{"rev":"5-5b88675f05efe2836126336c880bd841"}}, -{"id":"node-mailgun","key":"node-mailgun","value":{"rev":"5-4bcfb7bf5163748b87c1b9ed429ed178"}}, -{"id":"node-markdown","key":"node-markdown","value":{"rev":"6-67137da4014f22f656aaefd9dfa2801b"}}, -{"id":"node-mdbm","key":"node-mdbm","value":{"rev":"22-3006800b042cf7d4b0b391c278405143"}}, -{"id":"node-minify","key":"node-minify","value":{"rev":"13-e853813d4b6519b168965979b8ccccdd"}}, -{"id":"node-mug","key":"node-mug","value":{"rev":"3-f7567ffac536bfa7eb5a7e3da7a0efa0"}}, -{"id":"node-mvc","key":"node-mvc","value":{"rev":"3-74f7c07b2991fcddb27afd2889b6db4e"}}, -{"id":"node-mwire","key":"node-mwire","value":{"rev":"26-79d7982748f42b9e07ab293447b167ec"}}, -{"id":"node-mynix-feed","key":"node-mynix-feed","value":{"rev":"3-59d4a624b3831bbab6ee99be2f84e568"}}, -{"id":"node-nether","key":"node-nether","value":{"rev":"3-0fbefe710fe0d74262bfa25f6b4e1baf"}}, -{"id":"node-nude","key":"node-nude","value":{"rev":"3-600abb219646299ac602fa51fa260f37"}}, -{"id":"node-nxt","key":"node-nxt","value":{"rev":"3-8ce48601c2b0164e2b125259a0c97d45"}}, -{"id":"node-oauth","key":"node-oauth","value":{"rev":"3-aa6cd61f44d74118bafa5408900c4984"}}, -{"id":"node-opencalais","key":"node-opencalais","value":{"rev":"13-a3c0b882aca7207ce36f107e40a0ce50"}}, -{"id":"node-props","key":"node-props","value":{"rev":"7-e400cee08cc9abdc1f1ce4f262a04b05"}}, -{"id":"node-proxy","key":"node-proxy","value":{"rev":"20-ce722bf45c84a7d925b8b7433e786ed6"}}, -{"id":"node-pusher","key":"node-pusher","value":{"rev":"3-7cc7cd5bffaf3b11c44438611beeba98"}}, -{"id":"node-putio","key":"node-putio","value":{"rev":"3-8a1fc6362fdcf16217cdb6846e419b4c"}}, -{"id":"node-raphael","key":"node-raphael","value":{"rev":"25-e419d98a12ace18a40d94a9e8e32cdd4"}}, -{"id":"node-rapleaf","key":"node-rapleaf","value":{"rev":"11-c849c8c8635e4eb2f81bd7810b7693fd"}}, -{"id":"node-rats","key":"node-rats","value":{"rev":"3-dca544587f3121148fe02410032cf726"}}, -{"id":"node-rdf2json","key":"node-rdf2json","value":{"rev":"3-bde382dc2fcb40986c5ac41643d44543"}}, -{"id":"node-recurly","key":"node-recurly","value":{"rev":"11-79cab9ccee7c1ddb83791e8de41c72f5"}}, -{"id":"node-redis","key":"node-redis","value":{"rev":"13-12adf3a3e986675637fa47b176f527e3"}}, -{"id":"node-redis-mapper","key":"node-redis-mapper","value":{"rev":"5-53ba8f67cc82dbf1d127fc7359353f32"}}, -{"id":"node-redis-monitor","key":"node-redis-monitor","value":{"rev":"3-79bcba76241d7c7dbc4b18d90a9d59e3"}}, -{"id":"node-restclient","key":"node-restclient","value":{"rev":"6-5844eba19bc465a8f75b6e94c061350f"}}, -{"id":"node-restclient2","key":"node-restclient2","value":{"rev":"5-950de911f7bde7900dfe5b324f49818c"}}, -{"id":"node-runner","key":"node-runner","value":{"rev":"3-e9a9e6bd10d2ab1aed8b401b04fadc7b"}}, -{"id":"node-sc-setup","key":"node-sc-setup","value":{"rev":"3-e89c496e03c48d8574ccaf61c9ed4fca"}}, -{"id":"node-schedule","key":"node-schedule","value":{"rev":"9-ae12fa59226f1c9b7257b8a2d71373b4"}}, -{"id":"node-sdlmixer","key":"node-sdlmixer","value":{"rev":"8-489d85278d6564b6a4e94990edcb0527"}}, -{"id":"node-secure","key":"node-secure","value":{"rev":"3-73673522a4bb5f853d55e535f0934803"}}, -{"id":"node-sendgrid","key":"node-sendgrid","value":{"rev":"9-4662c31304ca4ee4e702bd3a54ea7824"}}, -{"id":"node-sizzle","key":"node-sizzle","value":{"rev":"6-c08c24d9d769d3716e5c4e3441740eb2"}}, -{"id":"node-soap-client","key":"node-soap-client","value":{"rev":"9-35ff34a4a5af569de6a2e89d1b35b69a"}}, -{"id":"node-spec","key":"node-spec","value":{"rev":"9-92e99ca74b9a09a8ae2eb7382ef511ef"}}, -{"id":"node-static","key":"node-static","value":{"rev":"10-11b0480fcd416db3d3d4041f43a55290"}}, -{"id":"node-static-maccman","key":"node-static-maccman","value":{"rev":"3-49e256728b14c85776b74f2bd912eb42"}}, -{"id":"node-statsd","key":"node-statsd","value":{"rev":"5-08d3e6b4b2ed1d0b7916e9952f55573c"}}, -{"id":"node-statsd-instrument","key":"node-statsd-instrument","value":{"rev":"3-c3cd3315e1edcc91096830392f439305"}}, -{"id":"node-std","key":"node-std","value":{"rev":"3-f99be0f03be4175d546823799bb590d3"}}, -{"id":"node-store","key":"node-store","value":{"rev":"3-7cb6bf13de9550b869c768f464fd0f65"}}, -{"id":"node-stringprep","key":"node-stringprep","value":{"rev":"13-9b08baa97042f71c5c8e9e2fdcc2c300"}}, -{"id":"node-synapse","key":"node-synapse","value":{"rev":"3-c46c47099eb2792f4a57fdfd789520ca"}}, -{"id":"node-syslog","key":"node-syslog","value":{"rev":"23-34f7df06ba88d9f897b7e00404db7187"}}, -{"id":"node-t","key":"node-t","value":{"rev":"3-042225eff3208ba9add61a9f79d90871"}}, -{"id":"node-taobao","key":"node-taobao","value":{"rev":"7-c988ace74806b2e2f55e162f54ba1a2c"}}, -{"id":"node-term-ui","key":"node-term-ui","value":{"rev":"5-210310014b19ce26c5e3e840a8a0549e"}}, -{"id":"node-tiny","key":"node-tiny","value":{"rev":"7-df05ab471f25ca4532d80c83106944d7"}}, -{"id":"node-tmpl","key":"node-tmpl","value":{"rev":"3-6fcfa960da8eb72a5e3087559d3fe206"}}, -{"id":"node-twilio","key":"node-twilio","value":{"rev":"11-af69e600109d38c77eadbcec4bee4782"}}, -{"id":"node-twitter-mailer","key":"node-twitter-mailer","value":{"rev":"7-f915b76d834cb162c91816abc30cee5f"}}, -{"id":"node-usb","key":"node-usb","value":{"rev":"3-0c3837307f86a80427800f1b45aa5862"}}, -{"id":"node-uuid","key":"node-uuid","value":{"rev":"6-642efa619ad8a6476a44a5c6158e7a36"}}, -{"id":"node-vapor.js","key":"node-vapor.js","value":{"rev":"3-d293284cc415b2906533e91db13ee748"}}, -{"id":"node-version","key":"node-version","value":{"rev":"3-433b1529a6aa3d619314e461e978d2b6"}}, -{"id":"node-webapp","key":"node-webapp","value":{"rev":"11-65411bfd8eaf19d3539238360d904d43"}}, -{"id":"node-wiki","key":"node-wiki","value":{"rev":"5-22b0177c9a5e4dc1f72d36bb83c746d0"}}, -{"id":"node-wkhtml","key":"node-wkhtml","value":{"rev":"5-a8fa203720442b443d558670c9750548"}}, -{"id":"node-xerces","key":"node-xerces","value":{"rev":"3-de6d82ec712af997b7aae451277667f0"}}, -{"id":"node-xml","key":"node-xml","value":{"rev":"3-e14a52dcd04302aea7dd6943cf6dd886"}}, -{"id":"node-xmpp","key":"node-xmpp","value":{"rev":"36-031eb5e830ed2e2027ee4ee7f861cf81"}}, -{"id":"node-xmpp-bosh","key":"node-xmpp-bosh","value":{"rev":"85-f7f8b699b6fda74fc27c621466915bd1"}}, -{"id":"node-xmpp-via-bosh","key":"node-xmpp-via-bosh","value":{"rev":"3-5f5fee9e42ae8ce8f42d55c31808c969"}}, -{"id":"node.io","key":"node.io","value":{"rev":"224-e99561d454a7676d10875e1b06ba44c7"}}, -{"id":"node.io-min","key":"node.io-min","value":{"rev":"3-e8389bdcfa55c68ae9698794d9089ce4"}}, -{"id":"node.isbn","key":"node.isbn","value":{"rev":"3-76aa84f3c49a54b6c901f440af35192d"}}, -{"id":"node.uptime","key":"node.uptime","value":{"rev":"5-cfc2c1c1460d000eab4e1a28506e6d29"}}, -{"id":"node3p","key":"node3p","value":{"rev":"14-b1931b8aa96227854d78965cc4301168"}}, -{"id":"node3p-web","key":"node3p-web","value":{"rev":"12-bc783ee1e493e80b7e7a3c2fce39f55e"}}, -{"id":"nodeBase","key":"nodeBase","value":{"rev":"39-4d9ae0f18e0bca7192901422d85e85c7"}}, -{"id":"nodeCgi","key":"nodeCgi","value":{"rev":"9-bb65e71ee63551e519f49434f2ae1cd7"}}, -{"id":"nodeDocs","key":"nodeDocs","value":{"rev":"3-0c6e714d3e6d5c2cc9482444680fb3ca"}}, -{"id":"nodePhpSessions","key":"nodePhpSessions","value":{"rev":"3-5063b38582deaca9cacdc029db97c2b1"}}, -{"id":"node_bsdiff","key":"node_bsdiff","value":{"rev":"5-e244ef36755a2b6534ce50fa1ee5ee6e"}}, -{"id":"node_hash","key":"node_hash","value":{"rev":"3-cdce2fcc2c18fcd25e16be8e52add891"}}, -{"id":"node_util","key":"node_util","value":{"rev":"3-cde723ee2311cf48f7cf0a3bc3484f9a"}}, -{"id":"node_xslt","key":"node_xslt","value":{"rev":"3-f12035155aee31d1749204fdca2aee10"}}, -{"id":"nodec","key":"nodec","value":{"rev":"3-dba2af2d5b98a71964abb4328512b9e1"}}, -{"id":"nodefm","key":"nodefm","value":{"rev":"3-c652a95d30318a371736515feab649f9"}}, -{"id":"nodegit","key":"nodegit","value":{"rev":"31-92a2cea0d1c92086c920bc007f5a3f16"}}, -{"id":"nodeib","key":"nodeib","value":{"rev":"3-e67d779007817597ca36e8b821f38e6a"}}, -{"id":"nodeinfo","key":"nodeinfo","value":{"rev":"53-61bf0f48662dc2e04cde38a2b897c211"}}, -{"id":"nodejitsu-client","key":"nodejitsu-client","value":{"rev":"3-4fa613f888ebe249aff7b03aa9b8d7ef"}}, -{"id":"nodejs-intro","key":"nodejs-intro","value":{"rev":"4-c75f03e80b597f734f4466e62ecebfeb"}}, -{"id":"nodejs-tvrage","key":"nodejs-tvrage","value":{"rev":"9-88bb3b5d23652ebdb7186a30bc3be43f"}}, -{"id":"nodejs.be-cli","key":"nodejs.be-cli","value":{"rev":"3-d8f23777f9b18101f2d2dc5aa618a703"}}, -{"id":"nodeler","key":"nodeler","value":{"rev":"9-00760d261ea75164a5709109011afb25"}}, -{"id":"nodelint","key":"nodelint","value":{"rev":"8-31502553d4bb099ba519fb331cccdd63"}}, -{"id":"nodeload","key":"nodeload","value":{"rev":"12-f02626475b59ebe67a864a114c99ff9b"}}, -{"id":"nodemachine","key":"nodemachine","value":{"rev":"8-5342324502e677e35aefef17dc08c8db"}}, -{"id":"nodemailer","key":"nodemailer","value":{"rev":"63-d39a5143b06fa79edcb81252d6329861"}}, -{"id":"nodemock","key":"nodemock","value":{"rev":"33-7095334209b39c8e1482374bee1b712a"}}, -{"id":"nodemon","key":"nodemon","value":{"rev":"42-4f40ba2299ef4ae613a384a48e4045fa"}}, -{"id":"nodepad","key":"nodepad","value":{"rev":"5-93718cc67e97c89f45b753c1caef07e4"}}, -{"id":"nodepal","key":"nodepal","value":{"rev":"5-e53372a5081b3753993ee98299ecd550"}}, -{"id":"nodepie","key":"nodepie","value":{"rev":"21-a44a6d3575758ed591e13831a5420758"}}, -{"id":"nodepress","key":"nodepress","value":{"rev":"3-f17616b9ae61e15d1d219cb87ac5a63a"}}, -{"id":"noderelict","key":"noderelict","value":{"rev":"23-0ca0997e3ef112e9393ae8ccef63f1ee"}}, -{"id":"noderpc","key":"noderpc","value":{"rev":"27-7efb6365916b403c3aa4e1c766de75a2"}}, -{"id":"nodespec","key":"nodespec","value":{"rev":"3-69f357577e52e9fd096ac88a1e7e3445"}}, -{"id":"nodespy","key":"nodespy","value":{"rev":"3-ad33e14db2bcaf61bf99d3e8915da5ee"}}, -{"id":"nodestalker","key":"nodestalker","value":{"rev":"5-080eba88a3625ecf7935ec5e9d2db6e9"}}, -{"id":"nodester-api","key":"nodester-api","value":{"rev":"39-52046dbcdf4447bbb85aecc92086ae1d"}}, -{"id":"nodester-cli","key":"nodester-cli","value":{"rev":"89-6de3d724a974c1dd3b632417f8b01267"}}, -{"id":"nodetk","key":"nodetk","value":{"rev":"11-265d267335e7603249e1af9441700f2f"}}, -{"id":"nodeunit","key":"nodeunit","value":{"rev":"40-d1cc6c06f878fb0b86779186314bc193"}}, -{"id":"nodeunit-coverage","key":"nodeunit-coverage","value":{"rev":"3-29853918351e75e3f6f93acd97e2942f"}}, -{"id":"nodeunit-dsl","key":"nodeunit-dsl","value":{"rev":"6-91be44077bc80c942f86f0ac28a69c5e"}}, -{"id":"nodevlc","key":"nodevlc","value":{"rev":"3-e151577d3e1ba2f58db465d94ebcb1c1"}}, -{"id":"nodevore","key":"nodevore","value":{"rev":"3-ac73b3bc33e2f934776dda359869ddcf"}}, -{"id":"nodewatch","key":"nodewatch","value":{"rev":"9-267bfe1324c51993865dc41b09aee6dc"}}, -{"id":"nodewii","key":"nodewii","value":{"rev":"9-716b3faa8957c1aea337540402ae7f43"}}, -{"id":"nodie","key":"nodie","value":{"rev":"3-cc29702a2e7e295cfe583a05fb77b530"}}, -{"id":"nodify","key":"nodify","value":{"rev":"10-87fadf6bf262882bd71ab7e759b29949"}}, -{"id":"nodrrr","key":"nodrrr","value":{"rev":"3-75937f4ffb722a67d6c5a67663366854"}}, -{"id":"nodules","key":"nodules","value":{"rev":"8-2c6ec430f26ff7ef171e80b7b5e990c2"}}, -{"id":"nodysentary","key":"nodysentary","value":{"rev":"3-7574fc8e12b1271c2eb1c66026f702cb"}}, -{"id":"nohm","key":"nohm","value":{"rev":"45-09dcf4df92734b3c51c8df3c3b374b0b"}}, -{"id":"noid","key":"noid","value":{"rev":"5-ac31e001806789e80a7ffc64f2914eb4"}}, -{"id":"nolife","key":"nolife","value":{"rev":"7-cfd4fe84b1062303cefb83167ea48bba"}}, -{"id":"nolog","key":"nolog","value":{"rev":"9-6e82819b801f5d7ec6773596d5d2efb2"}}, -{"id":"nomnom","key":"nomnom","value":{"rev":"34-bf66753d1d155820cfacfc7fa7a830c9"}}, -{"id":"nomplate","key":"nomplate","value":{"rev":"9-6ea21ee9568421a60cb80637c4c6cb48"}}, -{"id":"nonogo","key":"nonogo","value":{"rev":"5-8307413f9a3da913f9818c4f2d951519"}}, -{"id":"noode","key":"noode","value":{"rev":"7-454df50a7cbd03c46a9951cb1ddbe1c6"}}, -{"id":"noodle","key":"noodle","value":{"rev":"7-163745527770de0de8e7e9d59fc3888c"}}, -{"id":"noop","key":"noop","value":{"rev":"5-ed9fd66573ed1186e66b4c2bc16192cb"}}, -{"id":"nope","key":"nope","value":{"rev":"3-7088ffb62b8e06261527cbfa69cb94c5"}}, -{"id":"nopro","key":"nopro","value":{"rev":"11-6c4aeafe6329821b2259ef11414481dd"}}, -{"id":"nopt","key":"nopt","value":{"rev":"23-cce441940b6f129cab94a359ddb8b3e4"}}, -{"id":"norm","key":"norm","value":{"rev":"9-2bf26c3803fdc3bb6319e490cae3b625"}}, -{"id":"norq","key":"norq","value":{"rev":"3-b1a80ad1aa4ccc493ac25da22b0f0697"}}, -{"id":"norris","key":"norris","value":{"rev":"3-a341286d9e83fa392c1ce6b764d0aace"}}, -{"id":"norris-ioc","key":"norris-ioc","value":{"rev":"15-d022f159229d89ce60fc2a15d71eac59"}}, -{"id":"norris-tester","key":"norris-tester","value":{"rev":"3-fc2f34c9373bbdf5a1cd9cfbaff21f83"}}, -{"id":"northwatcher","key":"northwatcher","value":{"rev":"13-edab28a123f0100e12f96c9828428a8a"}}, -{"id":"nosey","key":"nosey","value":{"rev":"4-10a22f27dd9f2a40acf035a7d250c661"}}, -{"id":"nosql-thin","key":"nosql-thin","value":{"rev":"6-604169cacf303b5278064f68b884090b"}}, -{"id":"notch","key":"notch","value":{"rev":"3-5b720089f0f9cfdbbbea8677216eeee5"}}, -{"id":"notes","key":"notes","value":{"rev":"3-5dfbd6ec33c69c0f1b619dd65d9e7a56"}}, -{"id":"nothing","key":"nothing","value":{"rev":"3-8b44e10efd7d6504755c0c4bd1043814"}}, -{"id":"notifications","key":"notifications","value":{"rev":"3-a68448bca7ea2d3d3ce43e4d03cd76c6"}}, -{"id":"notifo","key":"notifo","value":{"rev":"8-0bc13ea6135adfa80c5fac497a2ddeda"}}, -{"id":"notify","key":"notify","value":{"rev":"3-da00942576bcb5fab594186f80d4575a"}}, -{"id":"notify-send","key":"notify-send","value":{"rev":"7-89f5c6bc656d51577e3997b9f90d0454"}}, -{"id":"nova","key":"nova","value":{"rev":"3-4e136f35b7d5b85816c17496c6c0e382"}}, -{"id":"now","key":"now","value":{"rev":"84-dbfde18b3f6fe79dd3637b6da34b78cf"}}, -{"id":"now-bal","key":"now-bal","value":{"rev":"3-c769bcdd45a93095f68c2de54f35543f"}}, -{"id":"nowpad","key":"nowpad","value":{"rev":"51-8d90c49031f79a9d31eb4ed6f39609b6"}}, -{"id":"nowww","key":"nowww","value":{"rev":"3-541994af2e579b376d2037f4e34f31d8"}}, -{"id":"noxmox","key":"noxmox","value":{"rev":"9-4ac8b1529dced329cac0976b9ca9eed0"}}, -{"id":"nozzle","key":"nozzle","value":{"rev":"23-e60444326d11a5b57c208de548c325e8"}}, -{"id":"npm","key":"npm","value":{"rev":"665-71d13d024c846b2ee85ed054fcfcb242"}}, -{"id":"npm-deploy","key":"npm-deploy","value":{"rev":"23-751e9d3c2edac0fd9916b0e886414ef2"}}, -{"id":"npm-dev-install","key":"npm-dev-install","value":{"rev":"3-7a08e11a59758329ba8dc4e781ea9993"}}, -{"id":"npm-docsite","key":"npm-docsite","value":{"rev":"3-5ed4f1ffea02487ab9ea24cfa0196f76"}}, -{"id":"npm-github-service","key":"npm-github-service","value":{"rev":"8-6891bc055b499e088fc79a7f94b6a4ec"}}, -{"id":"npm-intro-slides","key":"npm-intro-slides","value":{"rev":"8-e95f28475662cb8f70f4cb48baaa9d27"}}, -{"id":"npm-monitor","key":"npm-monitor","value":{"rev":"7-4e3209ea893fe37c0e516fe21de2d8ad"}}, -{"id":"npm-remapper","key":"npm-remapper","value":{"rev":"3-69163475ee93f32faac3f934e772b6c7"}}, -{"id":"npm-tweets","key":"npm-tweets","value":{"rev":"9-86064412a8aa02d813b20d2e49d78d84"}}, -{"id":"npm-wrapper","key":"npm-wrapper","value":{"rev":"3-59c4d372b84f6e91dbe48a220511dfd5"}}, -{"id":"npm2debian","key":"npm2debian","value":{"rev":"3-3cf2f471f3bfbc613176c7c780a6aad6"}}, -{"id":"npmcount","key":"npmcount","value":{"rev":"5-59c55b09d9c2cc7da217cab3b0ea642c"}}, -{"id":"npmdep","key":"npmdep","value":{"rev":"9-78184ad3b841e5c91bbfa29ff722778a"}}, -{"id":"npmtop","key":"npmtop","value":{"rev":"19-2754af894829f22d6edb3a17a64cdf1e"}}, -{"id":"nquery","key":"nquery","value":{"rev":"9-461fb0c9bcc3c15e0696dc2e99807c98"}}, -{"id":"nrecipe","key":"nrecipe","value":{"rev":"15-a96b6b0134a7625eb4eb236b4bf3fbf3"}}, -{"id":"nserver","key":"nserver","value":{"rev":"5-ea895373c340dd8d9119f3f549990048"}}, -{"id":"nserver-util","key":"nserver-util","value":{"rev":"5-5e14eb0bc9f7ab0eac04c5699c6bb328"}}, -{"id":"nssocket","key":"nssocket","value":{"rev":"51-6aac1d5dd0aa7629b3619b3085d63c04"}}, -{"id":"nstore","key":"nstore","value":{"rev":"28-6e2639829539b7315040487dfa5c79af"}}, -{"id":"nstore-cache","key":"nstore-cache","value":{"rev":"3-453ed78dcbe68b31ff675f4d94b47c4a"}}, -{"id":"nstore-query","key":"nstore-query","value":{"rev":"3-39f46992dd278824db641a37ec5546f5"}}, -{"id":"ntodo","key":"ntodo","value":{"rev":"7-e214da8bbed2d3e40bdaec77d7a49831"}}, -{"id":"ntp","key":"ntp","value":{"rev":"5-5ee2b25e8f3bca06d1cc4ce3b25cac42"}}, -{"id":"nts","key":"nts","value":{"rev":"7-ecaf47f8af1f77de791d1d1fa9bab88e"}}, -{"id":"nttpd","key":"nttpd","value":{"rev":"21-cda7aa0f1db126428f6ca01d44b4d209"}}, -{"id":"ntwitter","key":"ntwitter","value":{"rev":"11-732c6f34137c942bc98967170b2f83fc"}}, -{"id":"nub","key":"nub","value":{"rev":"3-932ecf56889fa43584687dbb2cf4aa91"}}, -{"id":"nubnub","key":"nubnub","value":{"rev":"6-93a5267209e1aa869521a5952cbb1828"}}, -{"id":"null","key":"null","value":{"rev":"3-ae8247cfa9553d23a229993cfc8436c5"}}, -{"id":"numb","key":"numb","value":{"rev":"5-594cd9e8e8e4262ddb3ddd80e8084b62"}}, -{"id":"nun","key":"nun","value":{"rev":"8-3bd8b37ed85c1a5da211bd0d5766848e"}}, -{"id":"nunz","key":"nunz","value":{"rev":"3-040f033943158be495f6b0da1a0c0344"}}, -{"id":"nurl","key":"nurl","value":{"rev":"11-6c4ee6fc5c5119c56f2fd8ad8a0cb928"}}, -{"id":"nutil","key":"nutil","value":{"rev":"3-7785a1d4651dcfe78c874848f41d1348"}}, -{"id":"nutils","key":"nutils","value":{"rev":"13-889624db0c155fc2f0b501bba47e55ec"}}, -{"id":"nuvem","key":"nuvem","value":{"rev":"23-054b9b1240f4741f561ef0bb3197bdf8"}}, -{"id":"nvm","key":"nvm","value":{"rev":"28-251b7eb3429a00099b37810d05accd47"}}, -{"id":"nwm","key":"nwm","value":{"rev":"3-fe9274106aac9e67eea734159477acaf"}}, -{"id":"nx","key":"nx","value":{"rev":"55-7ad32fcb34ec25f841ddd0e5857375c7"}}, -{"id":"nx-core","key":"nx-core","value":{"rev":"33-a7bc62348591bae89fff82057bede1ab"}}, -{"id":"nx-daemon","key":"nx-daemon","value":{"rev":"3-7b86a87654c9e32746a4d36d7c527182"}}, -{"id":"nyaatorrents","key":"nyaatorrents","value":{"rev":"5-8600707a1e84f617bd5468b5c9179202"}}, -{"id":"nyala","key":"nyala","value":{"rev":"17-23c908297a37c47f9f09977f4cf101ff"}}, -{"id":"nyam","key":"nyam","value":{"rev":"17-697b5f17fe67630bc9494184146c12f1"}}, -{"id":"nyancat","key":"nyancat","value":{"rev":"13-84c18d007db41b40e9145bdc049b0a00"}}, -{"id":"nymph","key":"nymph","value":{"rev":"5-3a5d7a75d32f7a71bf4ec131f71484d8"}}, -{"id":"o3-xml","key":"o3-xml","value":{"rev":"3-cc4df881333805600467563f80b5216c"}}, -{"id":"oahu","key":"oahu","value":{"rev":"3-e789fc2098292518cb33606c73bfeca4"}}, -{"id":"oauth","key":"oauth","value":{"rev":"38-36b99063db7dc302b70d932e9bbafc24"}}, -{"id":"oauth-client","key":"oauth-client","value":{"rev":"12-ae097c9580ddcd5ca938b169486a63c6"}}, -{"id":"oauth-server","key":"oauth-server","value":{"rev":"7-ea931e31eaffaa843be61ffc89f29da7"}}, -{"id":"oauth2","key":"oauth2","value":{"rev":"3-4fce73fdc95580f397afeaf1bbd596bb"}}, -{"id":"oauth2-client","key":"oauth2-client","value":{"rev":"7-b5bd019159112384abc2087b2f8cb4f7"}}, -{"id":"oauth2-provider","key":"oauth2-provider","value":{"rev":"3-acd8f23b8c1c47b19838424b64618c70"}}, -{"id":"oauth2-server","key":"oauth2-server","value":{"rev":"11-316baa7e754053d0153086d0748b07c5"}}, -{"id":"obj_diff","key":"obj_diff","value":{"rev":"3-9289e14caaec4bb6aa64aa1be547db3b"}}, -{"id":"object-additions","key":"object-additions","value":{"rev":"3-11f03ae5afe00ad2be034fb313ce71a9"}}, -{"id":"object-proxy","key":"object-proxy","value":{"rev":"3-4d531308fc97bac6f6f9acd1e8f5b53a"}}, -{"id":"object-sync","key":"object-sync","value":{"rev":"5-6628fff49d65c96edc9d7a2e13db8d6d"}}, -{"id":"observer","key":"observer","value":{"rev":"3-a48052671a59b1c7874b4462e375664d"}}, -{"id":"octo.io","key":"octo.io","value":{"rev":"7-5692104396299695416ecb8548e53541"}}, -{"id":"octopus","key":"octopus","value":{"rev":"3-0a286abf59ba7232210e24a371902e7b"}}, -{"id":"odbc","key":"odbc","value":{"rev":"3-8550f0b183b229e41f3cb947bad9b059"}}, -{"id":"odot","key":"odot","value":{"rev":"13-3954b69c1a560a71fe58ab0c5c1072ba"}}, -{"id":"offliner","key":"offliner","value":{"rev":"3-9b58041cbd7b0365e04fec61c192c9b2"}}, -{"id":"ofxer","key":"ofxer","value":{"rev":"11-f8a79e1f27c92368ca1198ad37fbe83e"}}, -{"id":"ogre","key":"ogre","value":{"rev":"35-ea9c78c1d5b1761f059bb97ea568b23d"}}, -{"id":"oi.tekcos","key":"oi.tekcos","value":{"rev":"5-fdca9adb54acea3f91567082b107dde9"}}, -{"id":"oktest","key":"oktest","value":{"rev":"3-3b40312743a3eb1d8541ceee3ecfeace"}}, -{"id":"omcc","key":"omcc","value":{"rev":"3-19718e77bf82945c3ca7a3cdfb91188c"}}, -{"id":"omegle","key":"omegle","value":{"rev":"3-507ba8a51afbe2ff078e3e96712b7286"}}, -{"id":"ometa","key":"ometa","value":{"rev":"10-457fa17de89e1012ce812af3a53f4035"}}, -{"id":"ometa-highlighter","key":"ometa-highlighter","value":{"rev":"21-d18470d6d9a93bc7383c7d8ace22ad1d"}}, -{"id":"ometajs","key":"ometajs","value":{"rev":"20-c7e8c32926f2523e40e4a7ba2297192c"}}, -{"id":"onion","key":"onion","value":{"rev":"3-b46c000c8ff0b06f5f0028d268bc5c94"}}, -{"id":"onvalid","key":"onvalid","value":{"rev":"3-090bc1cf1418545b84db0fceb0846293"}}, -{"id":"oo","key":"oo","value":{"rev":"7-2297a18cdbcf29ad4867a2159912c04e"}}, -{"id":"oop","key":"oop","value":{"rev":"7-45fab8bae343e805d0c1863149dc20df"}}, -{"id":"op","key":"op","value":{"rev":"13-4efb059757caaecc18d5110b44266b35"}}, -{"id":"open-uri","key":"open-uri","value":{"rev":"21-023a00f26ecd89e278136fbb417ae9c3"}}, -{"id":"open.core","key":"open.core","value":{"rev":"35-f578db4e41dd4ae9128e3be574cf7b14"}}, -{"id":"open311","key":"open311","value":{"rev":"13-bb023a45d3c3988022d2fef809de8d98"}}, -{"id":"openid","key":"openid","value":{"rev":"29-b3c8a0e76d99ddb80c98d2aad5586771"}}, -{"id":"openlayers","key":"openlayers","value":{"rev":"3-602c34468c9be326e95be327b58d599b"}}, -{"id":"opentok","key":"opentok","value":{"rev":"5-5f4749f1763d45141d0272c1dbe6249a"}}, -{"id":"opentsdb-dashboard","key":"opentsdb-dashboard","value":{"rev":"3-2e0c5ccf3c9cfce17c20370c93283707"}}, -{"id":"opower-jobs","key":"opower-jobs","value":{"rev":"16-1602139f92e58d88178f21f1b3e0939f"}}, -{"id":"optimist","key":"optimist","value":{"rev":"64-ca3e5085acf135169d79949c25d84690"}}, -{"id":"optparse","key":"optparse","value":{"rev":"6-0200c34395f982ae3b80f4d18cb14483"}}, -{"id":"opts","key":"opts","value":{"rev":"8-ce2a0e31de55a1e02d5bbff66c4e8794"}}, -{"id":"orchestra","key":"orchestra","value":{"rev":"9-52ca98cddb51a2a43ec02338192c44fc"}}, -{"id":"orchid","key":"orchid","value":{"rev":"49-af9635443671ed769e4efa691b8ca84a"}}, -{"id":"orderly","key":"orderly","value":{"rev":"3-9ccc42d45b64278c9ffb1e64fc4f0d62"}}, -{"id":"orgsync.live","key":"orgsync.live","value":{"rev":"3-4dffc8ac43931364f59b9cb534acbaef"}}, -{"id":"orm","key":"orm","value":{"rev":"21-f3e7d89239364559d306110580bbb08f"}}, -{"id":"ormnomnom","key":"ormnomnom","value":{"rev":"15-0aacfbb5b7b580d76e9ecf5214a1d5ed"}}, -{"id":"orona","key":"orona","value":{"rev":"8-62d4ba1bf49098a140a2b85f80ebb103"}}, -{"id":"osc4node","key":"osc4node","value":{"rev":"3-0910613e78065f78b61142b35986e8b3"}}, -{"id":"oscar","key":"oscar","value":{"rev":"3-f5d2d39a67c67441bc2135cdaf2b47f8"}}, -{"id":"osrandom","key":"osrandom","value":{"rev":"3-026016691a5ad068543503e5e7ce6a84"}}, -{"id":"ossp-uuid","key":"ossp-uuid","value":{"rev":"10-8b7e1fba847d7cc9aa4f4c8813ebe6aa"}}, -{"id":"ostatus","key":"ostatus","value":{"rev":"3-76e0ec8c61c6df15c964197b722e24e7"}}, -{"id":"ostrich","key":"ostrich","value":{"rev":"3-637e0821e5ccfd0f6b1261b22c168c8d"}}, -{"id":"otk","key":"otk","value":{"rev":"5-2dc24e159cc618f43e573561286c4dcd"}}, -{"id":"ourl","key":"ourl","value":{"rev":"5-a3945e59e33faac96c75b508ef7fa1fb"}}, -{"id":"oursql","key":"oursql","value":{"rev":"21-bc53ab462155fa0aedbe605255fb9988"}}, -{"id":"out","key":"out","value":{"rev":"5-eb261f940b6382e2689210a58bc1b440"}}, -{"id":"overload","key":"overload","value":{"rev":"10-b88919e5654bef4922029afad4f1d519"}}, -{"id":"ox","key":"ox","value":{"rev":"3-0ca445370b4f76a93f2181ad113956d9"}}, -{"id":"pachube","key":"pachube","value":{"rev":"10-386ac6be925bab307b5d545516fb18ef"}}, -{"id":"pachube-stream","key":"pachube-stream","value":{"rev":"13-176dadcc5c516420fb3feb1f964739e0"}}, -{"id":"pack","key":"pack","value":{"rev":"29-8f8c511d95d1fb322c1a6d7965ef8f29"}}, -{"id":"packagebohrer","key":"packagebohrer","value":{"rev":"3-507358253a945a74c49cc169ad0bf5a2"}}, -{"id":"packer","key":"packer","value":{"rev":"9-23410d893d47418731e236cfcfcfbf03"}}, -{"id":"packet","key":"packet","value":{"rev":"8-1b366f97d599c455dcbbe4339da7cf9e"}}, -{"id":"pacote-sam-egenial","key":"pacote-sam-egenial","value":{"rev":"3-b967db1b9fceb9a937f3520efd89f479"}}, -{"id":"pacoteegenial","key":"pacoteegenial","value":{"rev":"3-9cfe8518b885bfd9a44ed38814f7d623"}}, -{"id":"pact","key":"pact","value":{"rev":"7-82996c1a0c8e9a5e9df959d4ad37085e"}}, -{"id":"pad","key":"pad","value":{"rev":"3-eef6147f09b662cff95c946f2b065da5"}}, -{"id":"paddle","key":"paddle","value":{"rev":"3-fedd0156b9a0dadb5e9b0f1cfab508fd"}}, -{"id":"padlock","key":"padlock","value":{"rev":"9-3a9e378fbe8e3817da7999f675af227e"}}, -{"id":"pagen","key":"pagen","value":{"rev":"9-9aac56724039c38dcdf7f6d5cbb4911c"}}, -{"id":"paginate-js","key":"paginate-js","value":{"rev":"5-995269155152db396662c59b67e9e93d"}}, -{"id":"pairtree","key":"pairtree","value":{"rev":"3-0361529e6c91271e2a61f3d7fd44366e"}}, -{"id":"palsu-app","key":"palsu-app","value":{"rev":"3-73f1fd9ae35e3769efc9c1aa25ec6da7"}}, -{"id":"pam","key":"pam","value":{"rev":"3-77b5bd15962e1c8be1980b33fd3b9737"}}, -{"id":"panache","key":"panache","value":{"rev":"25-749d2034f7f9179c2266cf896bb4abb0"}}, -{"id":"panic","key":"panic","value":{"rev":"7-068b22be54ca8ae7b03eb153c2ea849a"}}, -{"id":"pantry","key":"pantry","value":{"rev":"33-3896f0fc165092f6cabb2949be3952c4"}}, -{"id":"paper-keys","key":"paper-keys","value":{"rev":"3-729378943040ae01d59f07bb536309b7"}}, -{"id":"paperboy","key":"paperboy","value":{"rev":"8-db2d51c2793b4ffc82a1ae928c813aae"}}, -{"id":"paperserve","key":"paperserve","value":{"rev":"6-8509fb68217199a3eb74f223b1e2bee5"}}, -{"id":"parall","key":"parall","value":{"rev":"5-279d7105a425e136f6101250e8f81a14"}}, -{"id":"parallel","key":"parallel","value":{"rev":"14-f1294b3b840cfb26095107110b6720ec"}}, -{"id":"paramon","key":"paramon","value":{"rev":"3-37e599e924beb509c894c992cf72791b"}}, -{"id":"parannus","key":"parannus","value":{"rev":"7-7541f1ed13553261330b9e1c4706f112"}}, -{"id":"parasite","key":"parasite","value":{"rev":"13-83c26181bb92cddb8ff76bc154a50210"}}, -{"id":"parrot","key":"parrot","value":{"rev":"3-527d1cb4b5be0e252dc92a087d380f17"}}, -{"id":"parseUri","key":"parseUri","value":{"rev":"3-3b60b1fd6d8109279b5d0cfbdb89b343"}}, -{"id":"parseopt","key":"parseopt","value":{"rev":"10-065f1acaf02c94f0684f75fefc2fd1ec"}}, -{"id":"parser","key":"parser","value":{"rev":"5-f661f0b7ede9b6d3e0de259ed20759b1"}}, -{"id":"parser_email","key":"parser_email","value":{"rev":"12-63333860c62f2a9c9d6b0b7549bf1cdc"}}, -{"id":"parstream","key":"parstream","value":{"rev":"3-ef7e8ffc8ce1e7d951e37f85bfd445ab"}}, -{"id":"parted","key":"parted","value":{"rev":"9-250e4524994036bc92915b6760d62d8a"}}, -{"id":"partial","key":"partial","value":{"rev":"7-208411e6191275a4193755ee86834716"}}, -{"id":"party","key":"party","value":{"rev":"5-9337d8dc5e163f0300394f533ab1ecdf"}}, -{"id":"pashua","key":"pashua","value":{"rev":"3-b752778010f4e20f662a3d8f0f57b18b"}}, -{"id":"pass","key":"pass","value":{"rev":"3-66a2d55d93eae8535451f12965578db8"}}, -{"id":"passthru","key":"passthru","value":{"rev":"9-3c8f0b20f1a16976f3645a6f7411b56a"}}, -{"id":"passwd","key":"passwd","value":{"rev":"19-44ac384382a042faaa1f3b111786c831"}}, -{"id":"password","key":"password","value":{"rev":"9-0793f6a8d09076f25cde7c9e528eddec"}}, -{"id":"password-hash","key":"password-hash","value":{"rev":"9-590c62e275ad577c6f8ddbf5ba4579cc"}}, -{"id":"path","key":"path","value":{"rev":"3-3ec064cf3f3a85cb59528654c5bd938f"}}, -{"id":"pathjs","key":"pathjs","value":{"rev":"5-d5e1b1a63e711cae3ac79a3b1033b609"}}, -{"id":"pathname","key":"pathname","value":{"rev":"9-16f2c1473454900ce18a217b2ea52c57"}}, -{"id":"paths","key":"paths","value":{"rev":"3-fa47b7c1d533a7d9f4bbaffc5fb89905"}}, -{"id":"patr","key":"patr","value":{"rev":"7-7bcd37586389178b9f23d33c1d7a0292"}}, -{"id":"pattern","key":"pattern","value":{"rev":"36-3ded826185c384af535dcd428af3f626"}}, -{"id":"payment-paypal-payflowpro","key":"payment-paypal-payflowpro","value":{"rev":"14-d8814a1d8bba57a6ecf8027064adc7ad"}}, -{"id":"paynode","key":"paynode","value":{"rev":"16-16084e61db66ac18fdbf95a51d31c09a"}}, -{"id":"payos","key":"payos","value":{"rev":"3-373695bd80c454b32b83a5eba6044261"}}, -{"id":"paypal-ipn","key":"paypal-ipn","value":{"rev":"5-ef32291f9f8371b20509db3acee722f6"}}, -{"id":"pcap","key":"pcap","value":{"rev":"46-8ae9e919221102581d6bb848dc67b84b"}}, -{"id":"pd","key":"pd","value":{"rev":"7-82146739c4c0eb4e49e40aa80a29cc0a"}}, -{"id":"pdf","key":"pdf","value":{"rev":"6-5c6b6a133e1b3ce894ebb1a49090216c"}}, -{"id":"pdfcrowd","key":"pdfcrowd","value":{"rev":"5-026b4611b50374487bfd64fd3e0d562c"}}, -{"id":"pdfkit","key":"pdfkit","value":{"rev":"13-2fd34c03225a87dfd8057c85a83f3c50"}}, -{"id":"pdflatex","key":"pdflatex","value":{"rev":"3-bbbf61f09ebe4c49ca0aff8019611660"}}, -{"id":"pdl","key":"pdl","value":{"rev":"3-4c41bf12e901ee15bdca468db8c89102"}}, -{"id":"peanut","key":"peanut","value":{"rev":"55-b797121dbbcba1219934284ef56abb8a"}}, -{"id":"pebble","key":"pebble","value":{"rev":"21-3cd08362123260a2e96d96d80e723805"}}, -{"id":"pecode","key":"pecode","value":{"rev":"3-611f5e8c61bbf4467b84da954ebdd521"}}, -{"id":"pegjs","key":"pegjs","value":{"rev":"11-091040d16433014d1da895e32ac0f6a9"}}, -{"id":"per-second","key":"per-second","value":{"rev":"5-e1593b3f7008ab5e1c3cae86f39ba3f3"}}, -{"id":"permafrost","key":"permafrost","value":{"rev":"9-494cbc9a2f43a60b57f23c5f5b12270d"}}, -{"id":"perry","key":"perry","value":{"rev":"41-15aed7a778fc729ad62fdfb231c50774"}}, -{"id":"persistencejs","key":"persistencejs","value":{"rev":"20-2585af3f15f0a4a7395e937237124596"}}, -{"id":"pg","key":"pg","value":{"rev":"142-48de452fb8a84022ed7cae8ec2ebdaf6"}}, -{"id":"phonetap","key":"phonetap","value":{"rev":"7-2cc7d3c2a09518ad9b0fe816c6a99125"}}, -{"id":"php-autotest","key":"php-autotest","value":{"rev":"3-04470b38b259187729af574dd3dc1f97"}}, -{"id":"phpass","key":"phpass","value":{"rev":"3-66f4bec659bf45b312022bb047b18696"}}, -{"id":"piano","key":"piano","value":{"rev":"3-0bab6b5409e4305c87a775e96a2b7ad3"}}, -{"id":"picard","key":"picard","value":{"rev":"5-7676e6ad6d5154fdc016b001465891f3"}}, -{"id":"picardForTynt","key":"picardForTynt","value":{"rev":"3-09d205b790bd5022b69ec4ad54bad770"}}, -{"id":"pid","key":"pid","value":{"rev":"3-0ba7439d599b9d613461794c3892d479"}}, -{"id":"pieshop","key":"pieshop","value":{"rev":"12-7851afe1bbc20de5d054fe93b071f849"}}, -{"id":"pig","key":"pig","value":{"rev":"3-8e6968a7b64635fed1bad12c39d7a46a"}}, -{"id":"pigeons","key":"pigeons","value":{"rev":"53-8df70420d3c845cf0159b3f25d0aab90"}}, -{"id":"piles","key":"piles","value":{"rev":"3-140cb1e83b5a939ecd429b09886132ef"}}, -{"id":"pillar","key":"pillar","value":{"rev":"6-83c81550187f6d00e11dd9955c1c94b7"}}, -{"id":"pilot","key":"pilot","value":{"rev":"3-073ed1a083cbd4c2aa2561f19e5935ea"}}, -{"id":"pinboard","key":"pinboard","value":{"rev":"3-1020cab02a1183acdf82e1f7620dc1e0"}}, -{"id":"pinf-loader-js","key":"pinf-loader-js","value":{"rev":"5-709ba9c86fb4de906bd7bbca53771f0f"}}, -{"id":"pinf-loader-js-demos-npmpackage","key":"pinf-loader-js-demos-npmpackage","value":{"rev":"3-860569d98c83e59185cff356e56b10a6"}}, -{"id":"pingback","key":"pingback","value":{"rev":"5-5d0a05d65a14f6837b0deae16c550bec"}}, -{"id":"pingdom","key":"pingdom","value":{"rev":"11-f299d6e99122a9fa1497bfd166dadd02"}}, -{"id":"pintpay","key":"pintpay","value":{"rev":"3-eba9c4059283adec6b1ab017284c1f17"}}, -{"id":"pipe","key":"pipe","value":{"rev":"5-d202bf317c10a52ac817b5c1a4ce4c88"}}, -{"id":"pipe_utils","key":"pipe_utils","value":{"rev":"13-521857c99eb76bba849a22240308e584"}}, -{"id":"pipegram","key":"pipegram","value":{"rev":"3-1449333c81dd658d5de9eebf36c07709"}}, -{"id":"pipeline-surveyor","key":"pipeline-surveyor","value":{"rev":"11-464db89b17e7b44800088ec4a263d92e"}}, -{"id":"pipes","key":"pipes","value":{"rev":"99-8320636ff840a61d82d9c257a2e0ed48"}}, -{"id":"pipes-cellar","key":"pipes-cellar","value":{"rev":"27-e035e58a3d82e50842d766bb97ea3ed9"}}, -{"id":"pipes-cohort","key":"pipes-cohort","value":{"rev":"9-88fc0971e01516873396e44974874903"}}, -{"id":"piton-entity","key":"piton-entity","value":{"rev":"31-86254212066019f09d67dfd58524bd75"}}, -{"id":"piton-http-utils","key":"piton-http-utils","value":{"rev":"3-6cf6aa0c655ff6118d53e62e3b970745"}}, -{"id":"piton-mixin","key":"piton-mixin","value":{"rev":"3-7b7737004e53e04f7f95ba5850eb5e70"}}, -{"id":"piton-pipe","key":"piton-pipe","value":{"rev":"3-8d7df4e53f620ef2f24e9fc8b24f0238"}}, -{"id":"piton-simplate","key":"piton-simplate","value":{"rev":"3-9ac00835d3de59d535cdd2347011cdc9"}}, -{"id":"piton-string-utils","key":"piton-string-utils","value":{"rev":"3-ecab73993d764dfb378161ea730dbbd5"}}, -{"id":"piton-validity","key":"piton-validity","value":{"rev":"13-1766651d69e3e075bf2c66b174b66026"}}, -{"id":"pixel-ping","key":"pixel-ping","value":{"rev":"11-38d717c927e13306e8ff9032785b50f2"}}, -{"id":"pixelcloud","key":"pixelcloud","value":{"rev":"7-0897d734157b52dece8f86cde7be19d4"}}, -{"id":"pixiedust","key":"pixiedust","value":{"rev":"3-6b932dee4b6feeed2f797de5d0066f8a"}}, -{"id":"pkginfo","key":"pkginfo","value":{"rev":"13-3ee42503d6672812960a965d4f3a1bc2"}}, -{"id":"pksqlite","key":"pksqlite","value":{"rev":"13-095e7d7d0258b71491c39d0e8c4f19be"}}, -{"id":"plants.js","key":"plants.js","value":{"rev":"3-e3ef3a16f637787e84c100a9b9ec3b08"}}, -{"id":"plate","key":"plate","value":{"rev":"20-92ba0729b2edc931f28870fe7f2ca95a"}}, -{"id":"platform","key":"platform","value":{"rev":"4-be465a1d21be066c96e30a42b8602177"}}, -{"id":"platformjs","key":"platformjs","value":{"rev":"35-5c510fa0c90492fd1d0f0fc078460018"}}, -{"id":"platoon","key":"platoon","value":{"rev":"28-e0e0c5f852eadacac5a652860167aa11"}}, -{"id":"play","key":"play","value":{"rev":"5-17f7cf7cf5d1c21c7392f3c43473098d"}}, -{"id":"plist","key":"plist","value":{"rev":"10-2a23864923aeed93fb8e25c4b5b2e97e"}}, -{"id":"png","key":"png","value":{"rev":"14-9cc7aeaf0c036c9a880bcee5cd46229a"}}, -{"id":"png-guts","key":"png-guts","value":{"rev":"5-a29c7c686f9d08990ce29632bf59ef90"}}, -{"id":"policyfile","key":"policyfile","value":{"rev":"21-4a9229cca4bcac10f730f296f7118548"}}, -{"id":"polla","key":"polla","value":{"rev":"27-9af5a575961a4dddb6bef482c168c756"}}, -{"id":"poly","key":"poly","value":{"rev":"3-7f7fe29d9f0ec4fcbf8481c797b20455"}}, -{"id":"polyglot","key":"polyglot","value":{"rev":"3-9306e246d1f8b954b41bef76e3e81291"}}, -{"id":"pool","key":"pool","value":{"rev":"10-f364b59aa8a9076a17cd94251dd013ab"}}, -{"id":"poolr","key":"poolr","value":{"rev":"5-cacfbeaa7aaca40c1a41218e8ac8b732"}}, -{"id":"pop","key":"pop","value":{"rev":"41-8edd9ef2f34a90bf0ec5e8eb0e51e644"}}, -{"id":"pop-disqus","key":"pop-disqus","value":{"rev":"3-4a8272e6a8453ed2d754397dc8b349bb"}}, -{"id":"pop-ga","key":"pop-ga","value":{"rev":"3-5beaf7b355d46b3872043b97696ee693"}}, -{"id":"pop-gallery","key":"pop-gallery","value":{"rev":"3-1a88920ff930b8ce51cd50fcfe62675e"}}, -{"id":"pop3-client","key":"pop3-client","value":{"rev":"3-be8c314b0479d9d98384e2ff36d7f207"}}, -{"id":"poplib","key":"poplib","value":{"rev":"7-ab64c5c35269aee897b0904b4548096b"}}, -{"id":"porter-stemmer","key":"porter-stemmer","value":{"rev":"5-724a7b1d635b95a14c9ecd9d2f32487d"}}, -{"id":"portfinder","key":"portfinder","value":{"rev":"5-cdf36d1c666bbdae500817fa39b9c2bd"}}, -{"id":"portscanner","key":"portscanner","value":{"rev":"3-773c1923b6f3b914bd801476efcfdf64"}}, -{"id":"pos","key":"pos","value":{"rev":"3-1c1a27020560341ecd1b54d0e3cfaf2a"}}, -{"id":"posix-getopt","key":"posix-getopt","value":{"rev":"3-819b69724575b65fe25cf1c768e1b1c6"}}, -{"id":"postageapp","key":"postageapp","value":{"rev":"9-f5735237f7e6f0b467770e28e84c56db"}}, -{"id":"postal","key":"postal","value":{"rev":"19-dd70aeab4ae98ccf3d9f203dff9ccf37"}}, -{"id":"posterous","key":"posterous","value":{"rev":"3-6f8a9e7cae8a26f021653f2c27b0c67f"}}, -{"id":"postgres","key":"postgres","value":{"rev":"6-e8844a47c83ff3ef0a1ee7038b2046b2"}}, -{"id":"postgres-js","key":"postgres-js","value":{"rev":"3-bbe27a49ee9f8ae8789660e178d6459d"}}, -{"id":"postman","key":"postman","value":{"rev":"5-548538583f2e7ad448adae27f9a801e5"}}, -{"id":"postmark","key":"postmark","value":{"rev":"24-a6c61b346329e499d4a4a37dbfa446a2"}}, -{"id":"postmark-api","key":"postmark-api","value":{"rev":"3-79973af301aa820fc18c2c9d418adcd7"}}, -{"id":"postmessage","key":"postmessage","value":{"rev":"5-854bdb27c2a1af5b629b01f7d69691fe"}}, -{"id":"postpie","key":"postpie","value":{"rev":"10-88527e2731cd07a3b8ddec2608682700"}}, -{"id":"postprocess","key":"postprocess","value":{"rev":"5-513ecd54bf8df0ae73d2a50c717fd939"}}, -{"id":"potato","key":"potato","value":{"rev":"3-0f4cab343859692bf619e79cd9cc5be1"}}, -{"id":"pour","key":"pour","value":{"rev":"7-272bee63c5f19d12102198a23a4af902"}}, -{"id":"pow","key":"pow","value":{"rev":"22-58b557cd71ec0e95eef51dfd900e4736"}}, -{"id":"precious","key":"precious","value":{"rev":"19-b370292b258bcbca02c5d8861ebee0bb"}}, -{"id":"predicate","key":"predicate","value":{"rev":"3-1c6d1871fe71bc61457483793eecf7f9"}}, -{"id":"prefer","key":"prefer","value":{"rev":"11-236b9d16cd019e1d9af41e745bfed754"}}, -{"id":"prenup","key":"prenup","value":{"rev":"3-4c56ddf1ee22cd90c85963209736bc75"}}, -{"id":"pretty-json","key":"pretty-json","value":{"rev":"5-2dbb22fc9573c19e64725ac331a8d59c"}}, -{"id":"prettyfy","key":"prettyfy","value":{"rev":"3-fc7e39aad63a42533d4ac6d6bfa32325"}}, -{"id":"prick","key":"prick","value":{"rev":"10-71a02e1be02df2af0e6a958099be565a"}}, -{"id":"printf","key":"printf","value":{"rev":"5-2896b8bf90df19d4a432153211ca3a7e"}}, -{"id":"pro","key":"pro","value":{"rev":"5-e98adaf2f741e00953bbb942bbeb14d2"}}, -{"id":"probe_couchdb","key":"probe_couchdb","value":{"rev":"28-86f8918a3e64608f8009280fb28a983d"}}, -{"id":"process","key":"process","value":{"rev":"3-6865fc075d8083afd8e2aa266512447c"}}, -{"id":"procfile","key":"procfile","value":{"rev":"3-22dbb2289f5fb3060a8f7833b50116a4"}}, -{"id":"profile","key":"profile","value":{"rev":"29-5afee07fe4c334d9836fda1df51e1f2d"}}, -{"id":"profilejs","key":"profilejs","value":{"rev":"9-128c2b0e09624ee69a915cff20cdf359"}}, -{"id":"profiler","key":"profiler","value":{"rev":"13-4f1582fad93cac11daad5d5a67565e4f"}}, -{"id":"progress","key":"progress","value":{"rev":"7-bba60bc39153fa0fbf5e909b6df213b0"}}, -{"id":"progress-bar","key":"progress-bar","value":{"rev":"5-616721d3856b8e5a374f247404d6ab29"}}, -{"id":"progressify","key":"progressify","value":{"rev":"5-0379cbed5adc2c3f3ac6adf0307ec11d"}}, -{"id":"proj4js","key":"proj4js","value":{"rev":"5-7d209ce230f6a2d5931800acef436a06"}}, -{"id":"projectwatch","key":"projectwatch","value":{"rev":"15-d0eca46ffc3d9e18a51db2d772fa2778"}}, -{"id":"promise","key":"promise","value":{"rev":"3-1409350eb10aa9055ed13a5b59f0abc3"}}, -{"id":"promised-fs","key":"promised-fs","value":{"rev":"28-1d3e0dd1884e1c39a5d5e2d35bb1f911"}}, -{"id":"promised-http","key":"promised-http","value":{"rev":"8-3f8d560c800ddd44a617bf7d7c688392"}}, -{"id":"promised-io","key":"promised-io","value":{"rev":"11-e9a280e85c021cd8b77e524aac50fafb"}}, -{"id":"promised-traits","key":"promised-traits","value":{"rev":"14-62d0ac59d4ac1c6db99c0273020565ea"}}, -{"id":"promised-utils","key":"promised-utils","value":{"rev":"20-0c2488685eb8999c40ee5e7cfa4fd75d"}}, -{"id":"prompt","key":"prompt","value":{"rev":"32-d52a524c147e34c1258facab69660cc2"}}, -{"id":"props","key":"props","value":{"rev":"17-8c4c0bf1b69087510612c8d5ccbfbfeb"}}, -{"id":"proserver","key":"proserver","value":{"rev":"3-4b0a001404171eb0f6f3e5d73a35fcb1"}}, -{"id":"protege","key":"protege","value":{"rev":"150-9790c23d7b7eb5fb94cd5b8048bdbf10"}}, -{"id":"proto","key":"proto","value":{"rev":"6-29fe2869f34e2737b0cc2a0dbba8e397"}}, -{"id":"proto-list","key":"proto-list","value":{"rev":"3-0f64ff29a4a410d5e03a57125374b87b"}}, -{"id":"protobuf-stream","key":"protobuf-stream","value":{"rev":"3-950e621ce7eef306eff5f932a9c4cbae"}}, -{"id":"protodiv","key":"protodiv","value":{"rev":"9-ed8d84033943934eadf5d95dfd4d8eca"}}, -{"id":"proton","key":"proton","value":{"rev":"19-8ad32d57a3e71df786ff41ef8c7281f2"}}, -{"id":"protoparse","key":"protoparse","value":{"rev":"3-9fbcc3b26220f974d4b9c9c883a0260b"}}, -{"id":"prototype","key":"prototype","value":{"rev":"5-2a672703595e65f5d731a967b43655a7"}}, -{"id":"prowl","key":"prowl","value":{"rev":"5-ec480caa5a7db4f1ec2ce22d5eb1dad8"}}, -{"id":"prowler","key":"prowler","value":{"rev":"3-09747704f78c7c123fb1c719c4996924"}}, -{"id":"prox","key":"prox","value":{"rev":"5-0ac5f893b270a819d91f0c6581aca2a8"}}, -{"id":"proxify","key":"proxify","value":{"rev":"3-d24a979b708645328476bd42bd5aaba8"}}, -{"id":"proxino","key":"proxino","value":{"rev":"7-894cc6d453af00e5e39ebc8f0b0abe3a"}}, -{"id":"proxio","key":"proxio","value":{"rev":"55-a1b2744054b3dc3adc2f7f67d2c026a4"}}, -{"id":"proxy","key":"proxy","value":{"rev":"3-c6dd1a8b58e0ed7ac983c89c05ee987d"}}, -{"id":"proxy-by-url","key":"proxy-by-url","value":{"rev":"5-acfcf47f3575cea6594513ff459c5f2c"}}, -{"id":"pseudo","key":"pseudo","value":{"rev":"11-4d894a335036d96cdb9bb19f7b857293"}}, -{"id":"psk","key":"psk","value":{"rev":"17-375055bf6315476a37b5fadcdcb6b149"}}, -{"id":"pty","key":"pty","value":{"rev":"8-0b3ea0287fd23f882da27dabce4e3230"}}, -{"id":"pub-mix","key":"pub-mix","value":{"rev":"3-2c455b249167cbf6b1a6ea761bf119f4"}}, -{"id":"pubjs","key":"pubjs","value":{"rev":"3-a0ceab8bc6ec019dfcf9a8e16756bea0"}}, -{"id":"publicsuffix","key":"publicsuffix","value":{"rev":"8-1592f0714595c0ca0433272c60afc733"}}, -{"id":"publisher","key":"publisher","value":{"rev":"13-f2c8722f14732245d3ca8842fe5b7661"}}, -{"id":"pubnub-client","key":"pubnub-client","value":{"rev":"8-6e511a6dd2b7feb6cefe410facd61f53"}}, -{"id":"pubsub","key":"pubsub","value":{"rev":"11-6c6270bf95af417fb766c05f66b2cc9e"}}, -{"id":"pubsub.io","key":"pubsub.io","value":{"rev":"24-9686fe9ae3356966dffee99f53eaad2c"}}, -{"id":"pubsubd","key":"pubsubd","value":{"rev":"3-b1ff2fa958bd450933735162e9615449"}}, -{"id":"pulley","key":"pulley","value":{"rev":"13-f81ed698175ffd0b5b19357a623b8f15"}}, -{"id":"pulse","key":"pulse","value":{"rev":"9-da4bdabb6d7c189d05c8d6c64713e4ac"}}, -{"id":"pulverizr","key":"pulverizr","value":{"rev":"16-ffd4db4d2b1bfbd0b6ac794dca9e728e"}}, -{"id":"pulverizr-bal","key":"pulverizr-bal","value":{"rev":"5-dba279d07f3ed72990d10f11c5d10792"}}, -{"id":"punycode","key":"punycode","value":{"rev":"3-c0df35bb32d1490a4816161974610682"}}, -{"id":"puppy","key":"puppy","value":{"rev":"3-355fb490dba55efdf8840e2769cb7f41"}}, -{"id":"pure","key":"pure","value":{"rev":"7-b2da0d64ea12cea63bed940222bb36df"}}, -{"id":"purpose","key":"purpose","value":{"rev":"3-ef30ac479535bd603954c27ecb5d564a"}}, -{"id":"push-it","key":"push-it","value":{"rev":"35-2640be8ca8938768836520ce5fc7fff2"}}, -{"id":"pusher","key":"pusher","value":{"rev":"5-eb363d1e0ea2c59fd92a07ea642c5d03"}}, -{"id":"pusher-pipe","key":"pusher-pipe","value":{"rev":"11-11ab87d1288a8c7d11545fdab56616f6"}}, -{"id":"pushinator","key":"pushinator","value":{"rev":"15-6b2c37931bc9438e029a6af0cf97091c"}}, -{"id":"put","key":"put","value":{"rev":"12-4b05a7cdfdb24a980597b38781457cf5"}}, -{"id":"put-selector","key":"put-selector","value":{"rev":"1-1a9b3b8b5a44485b93966503370978aa"}}, -{"id":"putio","key":"putio","value":{"rev":"3-973b65e855e1cd0d3cc685542263cc55"}}, -{"id":"pwilang","key":"pwilang","value":{"rev":"43-49ad04f5abbdd9c5b16ec0271ab17520"}}, -{"id":"py","key":"py","value":{"rev":"3-aade832559d0fab88116aa794e3a9f35"}}, -{"id":"pygments","key":"pygments","value":{"rev":"3-2b2c96f39bdcb9ff38eb7d4bac7c90ba"}}, -{"id":"python","key":"python","value":{"rev":"15-706af811b5544a4aacc6ad1e9863e369"}}, -{"id":"q","key":"q","value":{"rev":"80-fd2397ad465750240d0f22a0abc53de5"}}, -{"id":"q-comm","key":"q-comm","value":{"rev":"17-972994947f097fdcffcfcb2277c966ce"}}, -{"id":"q-fs","key":"q-fs","value":{"rev":"68-958b01dd5bdc4da5ba3c1cd02c85fc0e"}}, -{"id":"q-http","key":"q-http","value":{"rev":"26-42a7db91b650386d920f52afe3e9161f"}}, -{"id":"q-io","key":"q-io","value":{"rev":"20-79f7b3d43bcbd53cc57b6531426738e2"}}, -{"id":"q-io-buffer","key":"q-io-buffer","value":{"rev":"5-05528d9a527da73357991bec449a1b76"}}, -{"id":"q-require","key":"q-require","value":{"rev":"12-e3fc0388e4d3e6d8a15274c3cc239712"}}, -{"id":"q-util","key":"q-util","value":{"rev":"10-94e0c392e70fec942aee0f024e5c090f"}}, -{"id":"qbox","key":"qbox","value":{"rev":"17-88f9148881ede94ae9dcbf4e1980aa69"}}, -{"id":"qfi","key":"qfi","value":{"rev":"3-a6052f02aec10f17085b09e4f9da1ce0"}}, -{"id":"qjscl","key":"qjscl","value":{"rev":"11-def1631b117a53cab5fd38ffec28d727"}}, -{"id":"qooxdoo","key":"qooxdoo","value":{"rev":"5-720d33ec2de3623d6535b3bdc8041d81"}}, -{"id":"qoper8","key":"qoper8","value":{"rev":"11-48fa2ec116bec46d64161e35b0f0cd86"}}, -{"id":"qq","key":"qq","value":{"rev":"23-6f7a5f158364bbf2e90a0c6eb1fbf8a9"}}, -{"id":"qqwry","key":"qqwry","value":{"rev":"10-bf0d6cc2420bdad92a1104c184e7e045"}}, -{"id":"qr","key":"qr","value":{"rev":"11-0a0120b7ec22bbcf76ff1d78fd4a7689"}}, -{"id":"qrcode","key":"qrcode","value":{"rev":"11-b578b6a76bffe996a0390e3d886b79bb"}}, -{"id":"qs","key":"qs","value":{"rev":"23-3da45c8c8a5eb33d45360d92b6072d37"}}, -{"id":"quack-array","key":"quack-array","value":{"rev":"5-6b676aa6273e4515ab5e7bfee1c331e0"}}, -{"id":"quadprog","key":"quadprog","value":{"rev":"7-c0ceeeb12735f334e8c7940ac1f0a896"}}, -{"id":"quadraticon","key":"quadraticon","value":{"rev":"66-1da88ea871e6f90967b9f65c0204309d"}}, -{"id":"quasi","key":"quasi","value":{"rev":"3-6fe0faa91d849938d8c92f91b0828395"}}, -{"id":"query","key":"query","value":{"rev":"13-635ff8d88c6a3f9d92f9ef465b14fb82"}}, -{"id":"query-engine","key":"query-engine","value":{"rev":"21-66feaee07df9fa1f625ac797e8f6b90b"}}, -{"id":"querystring","key":"querystring","value":{"rev":"5-2b509239fafba56319137bfbe1e9eeb7"}}, -{"id":"queue","key":"queue","value":{"rev":"3-5c4af574e5056f7e6ceb9bfefc1c632d"}}, -{"id":"queuelib","key":"queuelib","value":{"rev":"61-87c2abc94a5ad40af8193fac9a1d9f7e"}}, -{"id":"quickcheck","key":"quickcheck","value":{"rev":"7-64e6c1e9efc08a89abe3d01c414d1411"}}, -{"id":"quickserve","key":"quickserve","value":{"rev":"3-9c19f8ad7daf06182f42b8c7063b531f"}}, -{"id":"quip","key":"quip","value":{"rev":"8-0624055f5056f72bc719340c95e5111a"}}, -{"id":"qunit","key":"qunit","value":{"rev":"37-6e7fefdaffab8fc5fb92a391da227c38"}}, -{"id":"qunit-tap","key":"qunit-tap","value":{"rev":"22-0266cd1b5bb7cbab89fa52642f0e8277"}}, -{"id":"qwery","key":"qwery","value":{"rev":"66-29f9b44da544a3a9b4537a85ceace7c8"}}, -{"id":"qwery-mobile","key":"qwery-mobile","value":{"rev":"5-182264ca68c30519bf0d29cf1e15854b"}}, -{"id":"raZerdummy","key":"raZerdummy","value":{"rev":"7-1fa549e0cff60795b49cbd3732f32175"}}, -{"id":"rabbit.js","key":"rabbit.js","value":{"rev":"3-dbcd5cd590576673c65b34c44ff06bec"}}, -{"id":"rabblescay","key":"rabblescay","value":{"rev":"5-3fea196ffd581a842a24ab7bb2118fe2"}}, -{"id":"racer","key":"racer","value":{"rev":"51-41c65689a335d70fa6b55b9706b9c0fe"}}, -{"id":"radcouchdb","key":"radcouchdb","value":{"rev":"3-64ccb4d0acb2b11cbb1d3fcef5f9a68e"}}, -{"id":"radio-stream","key":"radio-stream","value":{"rev":"6-c5f80a0bef7bbaacdd22d92da3d09244"}}, -{"id":"railway","key":"railway","value":{"rev":"74-5ce92a45c7d11540b0e2b5a8455361ce"}}, -{"id":"railway-mailer","key":"railway-mailer","value":{"rev":"3-8df2fbe4af4d3b1f12557d8397bf0548"}}, -{"id":"railway-twitter","key":"railway-twitter","value":{"rev":"3-df984f182bb323052e36876e8e3a066c"}}, -{"id":"rand","key":"rand","value":{"rev":"11-abb69107c390e2a6dcec64cb72f36096"}}, -{"id":"random","key":"random","value":{"rev":"7-32550b221f3549b67f379c1c2dbc5c57"}}, -{"id":"random-data","key":"random-data","value":{"rev":"5-ae651ea36724105b8677ae489082ab4d"}}, -{"id":"range","key":"range","value":{"rev":"3-1d3925f30ffa6b5f3494d507fcef3aa1"}}, -{"id":"ranger","key":"ranger","value":{"rev":"17-6135a9a9d83cbd3945f1ce991f276cb8"}}, -{"id":"rap-battle","key":"rap-battle","value":{"rev":"3-6960516c0d27906bb9343805a5eb0e45"}}, -{"id":"raphael","key":"raphael","value":{"rev":"7-012f159593a82e4587ea024a5d4fbe41"}}, -{"id":"raphael-zoom","key":"raphael-zoom","value":{"rev":"3-aaab74bebbeb4241cade4f4d3c9b130e"}}, -{"id":"rapid","key":"rapid","value":{"rev":"8-ae0b05388c7904fc88c743e3dcde1d9d"}}, -{"id":"rasputin","key":"rasputin","value":{"rev":"3-87cdd9bd591606f4b8439e7a76681c7b"}}, -{"id":"rate-limiter","key":"rate-limiter","value":{"rev":"3-24cd20fef83ce02f17dd383b72f5f125"}}, -{"id":"rats","key":"rats","value":{"rev":"3-1ff1efb311451a17789da910eaf59fb6"}}, -{"id":"raydash","key":"raydash","value":{"rev":"7-96c345beb3564d2789d209d1fe695857"}}, -{"id":"rbytes","key":"rbytes","value":{"rev":"13-cf09d91347a646f590070e516f0c9bc9"}}, -{"id":"rdf","key":"rdf","value":{"rev":"3-9a5012d1fc10da762dbe285d0b317499"}}, -{"id":"rdf-raptor-parser","key":"rdf-raptor-parser","value":{"rev":"11-25c61e4d57cf67ee8a5afb6dfcf193e3"}}, -{"id":"rdfstore","key":"rdfstore","value":{"rev":"41-4499a73efc48ad07234e56fd4e27e4e0"}}, -{"id":"rdio","key":"rdio","value":{"rev":"5-fa20a8ab818a6150e38e9bb7744968f9"}}, -{"id":"rdx","key":"rdx","value":{"rev":"3-e1db5ee3aad06edd9eadcdaa8aaba149"}}, -{"id":"rea","key":"rea","value":{"rev":"3-f17ceeb35337bc9ccf9cb440d5c4dfaf"}}, -{"id":"read-files","key":"read-files","value":{"rev":"3-e08fac4abcdbc7312beb0362ff4427b4"}}, -{"id":"readability","key":"readability","value":{"rev":"3-475601a3d99d696763872c52bce6a155"}}, -{"id":"readabilitySAX","key":"readabilitySAX","value":{"rev":"19-83277777f3f721be26aca28c66227b01"}}, -{"id":"ready.js","key":"ready.js","value":{"rev":"39-8e309b8b274722c051c67f90885571e8"}}, -{"id":"readyjslint","key":"readyjslint","value":{"rev":"3-0a3742129bfbe07d47fcfb9ff67d39b2"}}, -{"id":"recaptcha","key":"recaptcha","value":{"rev":"8-8895926476be014fbe08b301294bf37b"}}, -{"id":"recaptcha-async","key":"recaptcha-async","value":{"rev":"9-3033260389f8afdb5351974119b78ca2"}}, -{"id":"recline","key":"recline","value":{"rev":"189-b56ab8c7791201dccf4aea2532189f1d"}}, -{"id":"recon","key":"recon","value":{"rev":"13-79cbddefb00fec6895342d18609cadb1"}}, -{"id":"reconf","key":"reconf","value":{"rev":"5-0596988db2cf9bf5921502a2aab24ade"}}, -{"id":"redback","key":"redback","value":{"rev":"37-03b390f69cacf42a46e393b7cf297d09"}}, -{"id":"rede","key":"rede","value":{"rev":"3-ee74c2fd990c7780dc823e22a9c3bef2"}}, -{"id":"redecard","key":"redecard","value":{"rev":"13-7dec5a50c34132a2f20f0f143d6b5215"}}, -{"id":"redim","key":"redim","value":{"rev":"15-91c9fd560d1ce87d210b461c52a6d258"}}, -{"id":"redis","key":"redis","value":{"rev":"98-ec237259e8ef5c42a76ff260be50f8fd"}}, -{"id":"redis-channels","key":"redis-channels","value":{"rev":"3-8efc40a25fd18c1c9c41bbaeedb0b22f"}}, -{"id":"redis-client","key":"redis-client","value":{"rev":"3-3376054236e651e7dfcf91be8632fd0e"}}, -{"id":"redis-completer","key":"redis-completer","value":{"rev":"11-9e5bf1f8d37df681e7896252809188d3"}}, -{"id":"redis-keyspace","key":"redis-keyspace","value":{"rev":"25-245f2375741eb3e574dfce9f2da2b687"}}, -{"id":"redis-lua","key":"redis-lua","value":{"rev":"7-81f3dd3a4601271818f15278f495717a"}}, -{"id":"redis-namespace","key":"redis-namespace","value":{"rev":"3-ddf52a172db190fe788aad4116b1cb29"}}, -{"id":"redis-node","key":"redis-node","value":{"rev":"24-7a1e9098d8b5a42a99ca71a01b0d7672"}}, -{"id":"redis-queue","key":"redis-queue","value":{"rev":"3-9896587800c4b98ff291b74210c16b6e"}}, -{"id":"redis-session-store","key":"redis-session-store","value":{"rev":"3-2229501ecf817f9ca60ff2c7721ddd73"}}, -{"id":"redis-tag","key":"redis-tag","value":{"rev":"9-6713e8e91a38613cfef09d7b40f4df71"}}, -{"id":"redis-url","key":"redis-url","value":{"rev":"5-f53545a0039b512a2f7afd4ba2e08773"}}, -{"id":"redis-user","key":"redis-user","value":{"rev":"11-a8c0f6d40cbfbb6183a46e121f31ec06"}}, -{"id":"redis2json","key":"redis2json","value":{"rev":"5-dd96f78f8db0bf695346c95c2ead1307"}}, -{"id":"redis_objects","key":"redis_objects","value":{"rev":"3-499fe6dd07e7a3839111b1892b97f54c"}}, -{"id":"redisev","key":"redisev","value":{"rev":"3-8e857dbe2341292c6e170a7bfe3fa81b"}}, -{"id":"redisfs","key":"redisfs","value":{"rev":"69-d9c90256d32348fdca7a4e646ab4d551"}}, -{"id":"redisify","key":"redisify","value":{"rev":"3-03fce3095b4129e71280d278f11121ba"}}, -{"id":"rediskit","key":"rediskit","value":{"rev":"5-6a0324708f45d884a492cbc408137059"}}, -{"id":"redisql","key":"redisql","value":{"rev":"6-b31802eb37910cb74bd3c9f7b477c025"}}, -{"id":"redmark","key":"redmark","value":{"rev":"5-8724ab00513b6bd7ddfdcd3cc2e0a4e8"}}, -{"id":"redmess","key":"redmess","value":{"rev":"13-14f58666444993ce899cd2260cdc9140"}}, -{"id":"redobj","key":"redobj","value":{"rev":"7-7ebbeffc306f4f7ff9b53ee57e1a250e"}}, -{"id":"redpack","key":"redpack","value":{"rev":"73-58b3fb3bcadf7d80fbe97d9e82d4928b"}}, -{"id":"reds","key":"reds","value":{"rev":"9-baebb36b92887d93fd79785a8c1e6355"}}, -{"id":"reed","key":"reed","value":{"rev":"45-5580f319dc3b5bfb66612ed5c7e17337"}}, -{"id":"reflect","key":"reflect","value":{"rev":"18-b590003cd55332160a5e5327e806e851"}}, -{"id":"reflect-builder","key":"reflect-builder","value":{"rev":"3-453d618b263f9452c0b6bbab0a701f49"}}, -{"id":"reflect-next","key":"reflect-next","value":{"rev":"9-4f2b27a38985d81e906e824321af7713"}}, -{"id":"reflect-tree-builder","key":"reflect-tree-builder","value":{"rev":"5-5f801f53e126dc8a72e13b1417904ce6"}}, -{"id":"reflect-unbuilder","key":"reflect-unbuilder","value":{"rev":"5-f36fd4182fd465a743198b5188697db9"}}, -{"id":"reflectjs","key":"reflectjs","value":{"rev":"3-e03bdb411ffcdd901b896a1cf43eea69"}}, -{"id":"reflex","key":"reflex","value":{"rev":"3-e8bb6b6de906265114b22036832ef650"}}, -{"id":"refmate","key":"refmate","value":{"rev":"3-7d44c45a2eb39236ad2071c84dc0fbba"}}, -{"id":"regext","key":"regext","value":{"rev":"4-97ca5c25fd2f3dc4bd1f3aa821d06f0f"}}, -{"id":"reid-yui3","key":"reid-yui3","value":{"rev":"5-cab8f6e22dfa9b9c508a5dd312bf56b0"}}, -{"id":"rel","key":"rel","value":{"rev":"7-f447870ac7a078f742e4295896646241"}}, -{"id":"relative-date","key":"relative-date","value":{"rev":"5-d0fa11f8100da888cbcce6e96d76b2e4"}}, -{"id":"reloadOnUpdate","key":"reloadOnUpdate","value":{"rev":"9-e7d4c215578b779b2f888381d398bd79"}}, -{"id":"reloaded","key":"reloaded","value":{"rev":"3-dba828b9ab73fc7ce8e47f98068bce8c"}}, -{"id":"remap","key":"remap","value":{"rev":"5-825ac1783df84aba3255c1d39f32ac00"}}, -{"id":"remedial","key":"remedial","value":{"rev":"17-9bb17db015e96db3c833f84d9dbd972a"}}, -{"id":"remote-console","key":"remote-console","value":{"rev":"6-104bae3ba9e4b0a8f772d0b8dc37007e"}}, -{"id":"remote_js","key":"remote_js","value":{"rev":"3-6c0e3058c33113346c037c59206ac0ec"}}, -{"id":"render","key":"render","value":{"rev":"27-fc8be4e9c50e49fb42df83e9446a1f58"}}, -{"id":"renode","key":"renode","value":{"rev":"11-107a3e15a987393157b47125487af296"}}, -{"id":"reparse","key":"reparse","value":{"rev":"10-210ec92e82f5a8515f45d20c7fa2f164"}}, -{"id":"repl","key":"repl","value":{"rev":"3-295279fe20b9ac54b2a235a6bc7013aa"}}, -{"id":"repl-edit","key":"repl-edit","value":{"rev":"18-eb2e604ab8bb65685376459beb417a31"}}, -{"id":"repl-utils","key":"repl-utils","value":{"rev":"7-fc31547ecb53e7e36610cdb68bcec582"}}, -{"id":"replace","key":"replace","value":{"rev":"17-a8976fcdbeb08e27ee2f0fc69ccd7c9d"}}, -{"id":"replica","key":"replica","value":{"rev":"3-f9dae960f91e8dc594f43b004f516d5f"}}, -{"id":"replicate","key":"replicate","value":{"rev":"3-3d6e52af6ff36c02139f619c7e5599c6"}}, -{"id":"replique","key":"replique","value":{"rev":"5-72d990b7d9ce9ff107d96be17490226a"}}, -{"id":"req2","key":"req2","value":{"rev":"3-712151f335b25b5bdef428982d77d0e0"}}, -{"id":"reqhooks","key":"reqhooks","value":{"rev":"17-2f0f0b73545bb1936f449a1ec4a28011"}}, -{"id":"request","key":"request","value":{"rev":"55-0d0b00eecde877ca5cd4ad9e0badc4d1"}}, -{"id":"require","key":"require","value":{"rev":"15-59e9fa05a9de52ee2a818c045736452b"}}, -{"id":"require-analyzer","key":"require-analyzer","value":{"rev":"72-f759f0cdc352df317df29791bfe451f1"}}, -{"id":"require-kiss","key":"require-kiss","value":{"rev":"5-f7ef9d7beda584e9c95635a281a01587"}}, -{"id":"require-like","key":"require-like","value":{"rev":"7-29d5de79e7ff14bb02da954bd9a2ee33"}}, -{"id":"requireincontext","key":"requireincontext","value":{"rev":"5-988ff7c27a21e527ceeb50cbedc8d1b0"}}, -{"id":"requirejs","key":"requirejs","value":{"rev":"3-e609bc91d12d698a17aa51bb50a50509"}}, -{"id":"requirejson","key":"requirejson","value":{"rev":"3-2b8173e58d08034a53a3226c464b1dc8"}}, -{"id":"reqwest","key":"reqwest","value":{"rev":"57-5aa2c1ed17b1e3630859bcad85559e6a"}}, -{"id":"resig-class","key":"resig-class","value":{"rev":"3-16b1a2cdb3224f2043708436dbac4395"}}, -{"id":"resistance","key":"resistance","value":{"rev":"9-9cacbf5fa8318419b4751034a511b8c1"}}, -{"id":"resmin","key":"resmin","value":{"rev":"17-a9c8ded5073118748d765784ca4ea069"}}, -{"id":"resolve","key":"resolve","value":{"rev":"11-bba3470bc93a617ccf9fb6c12097c793"}}, -{"id":"resource-router","key":"resource-router","value":{"rev":"13-7b2991958da4d7701c51537192ca756c"}}, -{"id":"resourcer","key":"resourcer","value":{"rev":"3-4e8b5493d6fcdf147f53d3aaa731a509"}}, -{"id":"response","key":"response","value":{"rev":"3-c5cadf4e5dd90dc1022b92a67853b0f8"}}, -{"id":"resque","key":"resque","value":{"rev":"12-e2f5e1bc3e53ac0a992d1a7da7da0d14"}}, -{"id":"rest-in-node","key":"rest-in-node","value":{"rev":"3-41d1ba925857302211bd0bf9d19975f9"}}, -{"id":"rest-mongo","key":"rest-mongo","value":{"rev":"3-583d2a4b672d6d7e7ad26d0b6df20b45"}}, -{"id":"rest.node","key":"rest.node","value":{"rev":"3-2ed59ba9dcc97123632dfdfaea2559ed"}}, -{"id":"restalytics","key":"restalytics","value":{"rev":"11-5fb3cd8e95b37f1725922fa6fbb146e0"}}, -{"id":"restarter","key":"restarter","value":{"rev":"52-ab0a4fe59128b8848ffd88f9756d0049"}}, -{"id":"restartr","key":"restartr","value":{"rev":"12-d3b86e43e7df7697293db65bb1a1ae65"}}, -{"id":"restify","key":"restify","value":{"rev":"132-054bdc85bebc6221a07dda186238b4c3"}}, -{"id":"restler","key":"restler","value":{"rev":"13-f5392d9dd22e34ce3bcc307c51c889b3"}}, -{"id":"restler-aaronblohowiak","key":"restler-aaronblohowiak","value":{"rev":"8-28b231eceb667153e10effcb1ebeb989"}}, -{"id":"restmvc.js","key":"restmvc.js","value":{"rev":"25-d57b550754437580c447adf612c87d9a"}}, -{"id":"resware","key":"resware","value":{"rev":"9-a5ecbc53fefb280c5d1e3efd822704ff"}}, -{"id":"retrie","key":"retrie","value":{"rev":"7-28ea803ad6b119928ac792cbc8f475c9"}}, -{"id":"retro","key":"retro","value":{"rev":"3-94c3aec940e28869554cbb8449d9369e"}}, -{"id":"retry","key":"retry","value":{"rev":"19-89f3ef664c6fa48ff33a0b9f7e798f15"}}, -{"id":"reut","key":"reut","value":{"rev":"23-d745dd7f8606275848a299ad7c38ceb7"}}, -{"id":"rewrite","key":"rewrite","value":{"rev":"3-5cb91fd831d0913e89354f53b875137d"}}, -{"id":"rex","key":"rex","value":{"rev":"39-59025e6947e5f197f124d24a5393865f"}}, -{"id":"rfb","key":"rfb","value":{"rev":"34-db6e684ac9366a0e3658a508a2187ae1"}}, -{"id":"rhyme","key":"rhyme","value":{"rev":"7-27347762f3f5bfa07307da4e476c2d52"}}, -{"id":"riak-js","key":"riak-js","value":{"rev":"55-11d4ee4beb566946f3968abdf1c4b0ef"}}, -{"id":"riakqp","key":"riakqp","value":{"rev":"7-83f562e6907431fcee56a9408ac6d2c1"}}, -{"id":"rightjs","key":"rightjs","value":{"rev":"9-d53ae4c4f5af3bbbe18d7c879e5bdd1b"}}, -{"id":"rimraf","key":"rimraf","value":{"rev":"17-3ddc3f3f36618712e5f4f27511836e7a"}}, -{"id":"rio","key":"rio","value":{"rev":"11-7c6249c241392b51b9142ca1b228dd4e"}}, -{"id":"ristretto","key":"ristretto","value":{"rev":"3-beb22d7a575e066781f1fd702c4572d7"}}, -{"id":"roast","key":"roast","value":{"rev":"32-17cb066823afab1656196a2fe81246cb"}}, -{"id":"robb","key":"robb","value":{"rev":"5-472ed7ba7928131d86a05fcae89b9f93"}}, -{"id":"robots","key":"robots","value":{"rev":"9-afac82b944045c82acb710cc98c7311d"}}, -{"id":"robotskirt","key":"robotskirt","value":{"rev":"63-29a66420951812d421bf6728f67e710c"}}, -{"id":"robotstxt","key":"robotstxt","value":{"rev":"25-1e01cac90f4570d35ab20232feaeebfa"}}, -{"id":"rocket","key":"rocket","value":{"rev":"27-b0f1ff02e70b237bcf6a5b46aa9b74df"}}, -{"id":"roil","key":"roil","value":{"rev":"48-6b00c09b576fe195546bd031763c0d79"}}, -{"id":"roll","key":"roll","value":{"rev":"5-d3fed9271132eb6c954b3ac6c7ffccf0"}}, -{"id":"rollin","key":"rollin","value":{"rev":"3-bd461bc810c12cfcea94109ba9a2ab39"}}, -{"id":"ron","key":"ron","value":{"rev":"5-913645180d29f377506bcd5292d3cb49"}}, -{"id":"rondo","key":"rondo","value":{"rev":"3-9bed539bbaa0cb978f5c1b711d70cd50"}}, -{"id":"ronn","key":"ronn","value":{"rev":"12-b1b1a1d47376fd11053e2b81fe772c4c"}}, -{"id":"rot13","key":"rot13","value":{"rev":"10-a41e8b581812f02ca1a593f6da0c52dc"}}, -{"id":"router","key":"router","value":{"rev":"26-a7883048759715134710d68f179da18b"}}, -{"id":"routes","key":"routes","value":{"rev":"3-d841826cfd365d8f383a9c4f4288933c"}}, -{"id":"rpc","key":"rpc","value":{"rev":"5-5896f380115a7a606cd7cbbc6d113f05"}}, -{"id":"rpc-socket","key":"rpc-socket","value":{"rev":"17-8743dc1a1f5ba391fc5c7d432cc6eeba"}}, -{"id":"rq","key":"rq","value":{"rev":"7-ba263671c3a3b52851dc7d5e6bd4ef8c"}}, -{"id":"rql","key":"rql","value":{"rev":"1-ac5ec10ed5e41a10a289f26aff4def5a"}}, -{"id":"rqueue","key":"rqueue","value":{"rev":"12-042898704386874c70d0ffaeea6ebc78"}}, -{"id":"rrd","key":"rrd","value":{"rev":"9-488adf135cf29cd4725865a8f25a57ba"}}, -{"id":"rsa","key":"rsa","value":{"rev":"8-7d6f981d72322028c3bebb7141252e98"}}, -{"id":"rss","key":"rss","value":{"rev":"3-0a97b20a0a9051876d779af7663880bd"}}, -{"id":"rssee","key":"rssee","value":{"rev":"9-da2599eae68e50c1695fd7f8fcba2b30"}}, -{"id":"rumba","key":"rumba","value":{"rev":"3-7a3827fa6eca2d02d3189cbad38dd6ca"}}, -{"id":"run","key":"run","value":{"rev":"9-0145abb61e6107a3507624928db461da"}}, -{"id":"runforcover","key":"runforcover","value":{"rev":"3-a36b00ea747c98c7cd7afebf1e1b203c"}}, -{"id":"runlol","key":"runlol","value":{"rev":"3-3c97684baaa3d5b31ca404e8a616fe41"}}, -{"id":"runner","key":"runner","value":{"rev":"11-b7ceeedf7b0dde19c809642f1537723a"}}, -{"id":"runways","key":"runways","value":{"rev":"5-f216f5fa6af7ccc7566cdd06cf424980"}}, -{"id":"rw-translate","key":"rw-translate","value":{"rev":"3-16d2beb17a27713e10459ce368c5d087"}}, -{"id":"rx","key":"rx","value":{"rev":"5-ea2a04ecf38963f8a99b7a408b45af31"}}, -{"id":"rzr","key":"rzr","value":{"rev":"4-6a137fa752709531f2715de5a213b326"}}, -{"id":"s-tpl","key":"s-tpl","value":{"rev":"3-1533cf9657cfe669a25da96b6a655f5c"}}, -{"id":"s3-post","key":"s3-post","value":{"rev":"9-ad3b268bc6754852086b50c2f465c02c"}}, -{"id":"safis","key":"safis","value":{"rev":"3-f1494d0dae2b7dfd60beba5a72412ad2"}}, -{"id":"saiga","key":"saiga","value":{"rev":"22-0c67e8cf8f4b6e8ea30552ffc57d222a"}}, -{"id":"sailthru-client","key":"sailthru-client","value":{"rev":"7-1c9c236050868fb8dec4a34ded2436d3"}}, -{"id":"saimonmoore-cradle","key":"saimonmoore-cradle","value":{"rev":"3-5059616ab0f0f10e1c2d164f686e127e"}}, -{"id":"salesforce","key":"salesforce","value":{"rev":"7-f88cbf517b1fb900358c97b2c049960f"}}, -{"id":"sam","key":"sam","value":{"rev":"7-d7e24d2e94411a17cbedfbd8083fd878"}}, -{"id":"sandbox","key":"sandbox","value":{"rev":"10-0b51bed24e0842f99744dcf5d79346a6"}}, -{"id":"sandboxed-module","key":"sandboxed-module","value":{"rev":"15-bf8fa69d15ae8416d534e3025a16d87d"}}, -{"id":"sanitizer","key":"sanitizer","value":{"rev":"32-6ea8f4c77cd17253c27d0d87e0790678"}}, -{"id":"sapnwrfc","key":"sapnwrfc","value":{"rev":"3-0bc717109ffcd5265ae24f00416a0281"}}, -{"id":"sardines","key":"sardines","value":{"rev":"7-82712731b5af112ca43b9e3fe9975bb0"}}, -{"id":"sargam","key":"sargam","value":{"rev":"3-6b4c70f4b2bcd2add43704bf40c44507"}}, -{"id":"sasl","key":"sasl","value":{"rev":"4-44a6e12b561b112a574ec9e0c4a8843f"}}, -{"id":"sass","key":"sass","value":{"rev":"14-46bcee5423a1efe22f039e116bb7a77c"}}, -{"id":"satisfic","key":"satisfic","value":{"rev":"3-c6e9a2e65a0e55868cea708bcf7b11cf"}}, -{"id":"sax","key":"sax","value":{"rev":"30-58c5dd2c3367522974406bbf29204a40"}}, -{"id":"say","key":"say","value":{"rev":"10-95f31672af6166ea9099d92706c49ed1"}}, -{"id":"sayndo","key":"sayndo","value":{"rev":"51-fd93715c5ff0fcaa68e4e13c2b51ba61"}}, -{"id":"sc-handlebars","key":"sc-handlebars","value":{"rev":"3-b424c3a66fd0e538b068c6046f404084"}}, -{"id":"scgi-server","key":"scgi-server","value":{"rev":"9-3364b5c39985ea8f3468b6abb53d5ea6"}}, -{"id":"scheduler","key":"scheduler","value":{"rev":"25-72bc526bb49b0dd42ad5917d38ea3b18"}}, -{"id":"schema","key":"schema","value":{"rev":"21-166410ae972449965dfa1ce615971168"}}, -{"id":"schema-builder","key":"schema-builder","value":{"rev":"3-bce4612e1e5e6a8a85f16326d3810145"}}, -{"id":"schema-org","key":"schema-org","value":{"rev":"15-59b3b654de0380669d0dcd7573c3b7a1"}}, -{"id":"scone","key":"scone","value":{"rev":"15-85ed2dd4894e896ca1c942322753b76b"}}, -{"id":"scooj","key":"scooj","value":{"rev":"3-1be2074aeba4df60594c03f3e59c7734"}}, -{"id":"scope","key":"scope","value":{"rev":"65-9d7eb8c5fc6c54d8e2c49f4b4b4f5166"}}, -{"id":"scope-provider","key":"scope-provider","value":{"rev":"22-2c25a0b260fd18236d5245c8250d990e"}}, -{"id":"scoped-http-client","key":"scoped-http-client","value":{"rev":"3-afa954fe6d1c8b64a1240b77292d99b5"}}, -{"id":"scottbot","key":"scottbot","value":{"rev":"3-d812ddb4af49976c391f14aeecf93180"}}, -{"id":"scraper","key":"scraper","value":{"rev":"19-e2166b3de2b33d7e6baa04c704887fa6"}}, -{"id":"scrapinode","key":"scrapinode","value":{"rev":"15-ae5bf5085d8c4d5390f7c313b0ad13d2"}}, -{"id":"scrappy-do","key":"scrappy-do","value":{"rev":"3-868f5d299da401112e3ed9976194f1ee"}}, -{"id":"scrapr","key":"scrapr","value":{"rev":"3-d700714a56e8f8b8e9b3bc94274f4a24"}}, -{"id":"scrawl","key":"scrawl","value":{"rev":"3-a70a2905b9a1d2f28eb379c14363955f"}}, -{"id":"scribe","key":"scribe","value":{"rev":"5-4cefaaf869ba8e6ae0257e5705532fbe"}}, -{"id":"scriptTools","key":"scriptTools","value":{"rev":"7-1b66b7f02f2f659ae224057afac60bcf"}}, -{"id":"scriptbroadcast","key":"scriptbroadcast","value":{"rev":"10-3cdc4dae471445b7e08e6fc37c2481e6"}}, -{"id":"scriptjs","key":"scriptjs","value":{"rev":"38-9a522df4f0707d47c904f6781fd97ff6"}}, -{"id":"scrowser","key":"scrowser","value":{"rev":"3-a76938b1f84db0793941dba1f84f4c2f"}}, -{"id":"scss","key":"scss","value":{"rev":"10-49a4ad40eca3c797add57986c74e100b"}}, -{"id":"scylla","key":"scylla","value":{"rev":"10-2c5a1efed63c0ac3a3e75861ee323af4"}}, -{"id":"sdl","key":"sdl","value":{"rev":"40-3df0824da620098c0253b5330c6b0c5c"}}, -{"id":"sdlmixer","key":"sdlmixer","value":{"rev":"4-91455739802a98a5549f6c2b8118758d"}}, -{"id":"search","key":"search","value":{"rev":"9-8f696da412a6ccd07c3b8f22cec315cb"}}, -{"id":"searchjs","key":"searchjs","value":{"rev":"3-59418ce307d41de5649dfc158be51adf"}}, -{"id":"searchparser","key":"searchparser","value":{"rev":"3-a84719692ee33c88f3419f033b839f7a"}}, -{"id":"sechash","key":"sechash","value":{"rev":"11-20db8651628dcf6e8cbbc9bf9b2c4f12"}}, -{"id":"secret","key":"secret","value":{"rev":"7-ac44b38fa32b3f5ebc8fd03b02ec69ec"}}, -{"id":"seedrandom","key":"seedrandom","value":{"rev":"3-becb92de803208672887fc22a1a33694"}}, -{"id":"seek","key":"seek","value":{"rev":"3-d778b8d56582e15d409e2346b86caa53"}}, -{"id":"sel","key":"sel","value":{"rev":"19-94c8bc0872d2da7eab2b35daff7a3b5d"}}, -{"id":"select","key":"select","value":{"rev":"5-43593bfec39caaf1a0bc1fedc96d0dce"}}, -{"id":"selenium","key":"selenium","value":{"rev":"3-8ae8ac7a491b813fd011671e0d494f20"}}, -{"id":"selfish","key":"selfish","value":{"rev":"17-827856c3f3b9a3fdd1758477a24bf706"}}, -{"id":"selleck","key":"selleck","value":{"rev":"13-b8325fcdb383397041e4a408b40d708c"}}, -{"id":"semver","key":"semver","value":{"rev":"25-b2aea0cc920a9981cd429442a3fd62f6"}}, -{"id":"sendgrid","key":"sendgrid","value":{"rev":"3-047e2ad730390bac7cf72b7fc3856c1c"}}, -{"id":"sendgrid-api","key":"sendgrid-api","value":{"rev":"5-6e951b0d60a1b7c778fbf548d4e3aed8"}}, -{"id":"sendgrid-web","key":"sendgrid-web","value":{"rev":"3-dc77d2dbcedfcbe4e497958a2a070cfd"}}, -{"id":"sentry","key":"sentry","value":{"rev":"7-57af332354cbd37ce1c743b424b27dd0"}}, -{"id":"seq","key":"seq","value":{"rev":"77-33a8f54017402835c8542945a5c0a443"}}, -{"id":"sequelize","key":"sequelize","value":{"rev":"63-4c28ad13b73549aad7edc57378b21854"}}, -{"id":"sequence","key":"sequence","value":{"rev":"3-914f8010dc12aec0749ddb719f5ac82d"}}, -{"id":"sequencer","key":"sequencer","value":{"rev":"7-d83e687509678c0f5bcf15e5297677c0"}}, -{"id":"sequent","key":"sequent","value":{"rev":"3-cc6f26ab708c7681fa7d9e3bc15d19c0"}}, -{"id":"serializer","key":"serializer","value":{"rev":"7-a0d13120e2d5cfaa6e453b085280fa08"}}, -{"id":"serialport","key":"serialport","value":{"rev":"32-dc365d057a4f46e9f140dc36d6cc825a"}}, -{"id":"serialportify","key":"serialportify","value":{"rev":"3-1bf4ad9c5ebb5d96ca91fc03a10b5443"}}, -{"id":"serialq","key":"serialq","value":{"rev":"3-5897fcd0fca7d8312e61dbcb93790a71"}}, -{"id":"series","key":"series","value":{"rev":"11-0374191f646c277c51602ebe73033b6a"}}, -{"id":"serve","key":"serve","value":{"rev":"11-560c0c1bdeb3348c7a7d18265d27988e"}}, -{"id":"servedir","key":"servedir","value":{"rev":"18-17cffd8d8326b26e7d9319c79d601dda"}}, -{"id":"server-backbone-redis","key":"server-backbone-redis","value":{"rev":"13-c56419457002aa4fa23b142634882594"}}, -{"id":"server-tracker","key":"server-tracker","value":{"rev":"21-f620e295079a8b0acd29fa1a1469100c"}}, -{"id":"service","key":"service","value":{"rev":"11-07533f9e5e854248c0a1d99e911fa419"}}, -{"id":"sesame","key":"sesame","value":{"rev":"19-1e7ad5d030566f4c67027cc5925a2bdb"}}, -{"id":"sesh","key":"sesh","value":{"rev":"4-1682b3ced38e95f2a11a2f545a820bd5"}}, -{"id":"session","key":"session","value":{"rev":"6-a798bf4cd7d127d0111da7cdc3e058a4"}}, -{"id":"session-mongoose","key":"session-mongoose","value":{"rev":"3-b089c8d365d7de3e659cfa7080697dba"}}, -{"id":"sessionvoc-client","key":"sessionvoc-client","value":{"rev":"23-0f9ed8cd4af55f2aae17cb841247b818"}}, -{"id":"set","key":"set","value":{"rev":"3-a285b30a9c1545b427ebd882bc53d8b2"}}, -{"id":"setInterval","key":"setInterval","value":{"rev":"3-0557f666d05223391466547f52cfff42"}}, -{"id":"setTimeout","key":"setTimeout","value":{"rev":"3-e3c059c93763967ddff5974471f227f8"}}, -{"id":"setochka","key":"setochka","value":{"rev":"3-d559e24618b4fc2d5fc4ef44bccb68be"}}, -{"id":"settings","key":"settings","value":{"rev":"5-4af85bb564a330886c79682d2f1d927c"}}, -{"id":"sexy","key":"sexy","value":{"rev":"7-e57fa6bca5d89be86467786fb9f9b997"}}, -{"id":"sexy-args","key":"sexy-args","value":{"rev":"3-715d7d57234220bd79c78772d2566355"}}, -{"id":"sfaClient","key":"sfaClient","value":{"rev":"3-5d9ddd6ea05d7ef366dbf4f66dd4f642"}}, -{"id":"sfml","key":"sfml","value":{"rev":"10-766c876cd1cc220f776e2fa3c1d9efbb"}}, -{"id":"sh","key":"sh","value":{"rev":"5-3ce779be28550e831cf3c0140477376c"}}, -{"id":"sha1","key":"sha1","value":{"rev":"3-66d4b67ace9c65ae8f03d6dd0647ff6b"}}, -{"id":"sha1_file","key":"sha1_file","value":{"rev":"7-eb25e9c5f470a1b80c1697a952a1c5ed"}}, -{"id":"shadows","key":"shadows","value":{"rev":"5-d6a1a21871c733f34495592307ab7961"}}, -{"id":"share","key":"share","value":{"rev":"15-ef81a004f0e115040dcc1510f6302fa9"}}, -{"id":"shared-views","key":"shared-views","value":{"rev":"11-2c83145e6deb3493e44805c92b58929e"}}, -{"id":"sharedjs","key":"sharedjs","value":{"rev":"9-d43a861b02aa88ae22810f9771d774ec"}}, -{"id":"shell","key":"shell","value":{"rev":"39-7e2042bd6f485b827d53f5f727164d6f"}}, -{"id":"shelld","key":"shelld","value":{"rev":"3-118a62ff31d85e61b78bbd97333a7330"}}, -{"id":"shimify","key":"shimify","value":{"rev":"3-dde4d45bcbd2f6f7faaeb7f8c31d5e8b"}}, -{"id":"ship","key":"ship","value":{"rev":"3-5f294fc3841c901d6cea7f3862625d95"}}, -{"id":"shmakowiki","key":"shmakowiki","value":{"rev":"15-079ae4595d1ddf019d22d3d0ac49a188"}}, -{"id":"shorten","key":"shorten","value":{"rev":"3-ed1395b35faf4639e25dacbb038cf237"}}, -{"id":"shorttag","key":"shorttag","value":{"rev":"5-21d15e4cb8b62aeefe23edc99ff768ec"}}, -{"id":"shorturl","key":"shorturl","value":{"rev":"5-58f78b2a5318ec7da8a5f88739f2796b"}}, -{"id":"shorty","key":"shorty","value":{"rev":"9-17f804ff6e94295549cca6fd534b89de"}}, -{"id":"shotenjin","key":"shotenjin","value":{"rev":"3-91a7864d216a931095e9999133d3c41f"}}, -{"id":"should","key":"should","value":{"rev":"19-ed561071d434f319080fa5d0f647dd93"}}, -{"id":"shovel","key":"shovel","value":{"rev":"5-0168a02a8fa8d7856a5f4a5c18706724"}}, -{"id":"showdown","key":"showdown","value":{"rev":"3-7be5479804451db3faed968fa428af56"}}, -{"id":"shredder","key":"shredder","value":{"rev":"3-93e12ab8822ba5fe86d662f124a8ad1a"}}, -{"id":"shrtn","key":"shrtn","value":{"rev":"19-5883692283903e3166b478b98bcad999"}}, -{"id":"shuffle","key":"shuffle","value":{"rev":"3-71c96da1843abb468649ab0806e6b9d3"}}, -{"id":"sibilant","key":"sibilant","value":{"rev":"18-4dcb400eb9ed9cb1c7826d155807f6d0"}}, -{"id":"sideline","key":"sideline","value":{"rev":"15-84f284a9277718bf90f68dc9351500ae"}}, -{"id":"siesta","key":"siesta","value":{"rev":"5-ff99a009e6e5897c6322237c51d0a142"}}, -{"id":"sign","key":"sign","value":{"rev":"3-2cf70313707c6a046a6ceca61431ea5e"}}, -{"id":"signals","key":"signals","value":{"rev":"7-c756190260cd3ea43e6d44e4722164cb"}}, -{"id":"signature","key":"signature","value":{"rev":"3-fb7552c27ace0f9321ec7438057a37bf"}}, -{"id":"signed-request","key":"signed-request","value":{"rev":"13-9f1563535dcc1a83338a7375d8240f35"}}, -{"id":"signer","key":"signer","value":{"rev":"5-32c9909da2c4dfb284b858164c03cfe0"}}, -{"id":"simple-class","key":"simple-class","value":{"rev":"3-92c6eea4b3a6169db9d62b12f66268cb"}}, -{"id":"simple-ffmpeg","key":"simple-ffmpeg","value":{"rev":"9-b6dd4fe162803e6db434d71035637993"}}, -{"id":"simple-logger","key":"simple-logger","value":{"rev":"5-52b4c957b3671375547d623c6a9444be"}}, -{"id":"simple-mime","key":"simple-mime","value":{"rev":"9-34e4b1dcc26047b64459d924abab65cc"}}, -{"id":"simple-proxy","key":"simple-proxy","value":{"rev":"9-ad6cd76215717527dc6b226e1219e98e"}}, -{"id":"simple-rest-client","key":"simple-rest-client","value":{"rev":"3-8331b3ae49b52720adf2b72d5da0353d"}}, -{"id":"simple-schedule","key":"simple-schedule","value":{"rev":"7-432d3803e1cf9ab5830923a30fd312e0"}}, -{"id":"simple-server","key":"simple-server","value":{"rev":"25-d4d8ba53d3829f4ca51545a3c23a1244"}}, -{"id":"simple-settings","key":"simple-settings","value":{"rev":"3-497d7c5422f764f3738b3ef303ff9737"}}, -{"id":"simple-static","key":"simple-static","value":{"rev":"3-64c9cf84e5140d4285e451357ac83df5"}}, -{"id":"simple-xml-writer","key":"simple-xml-writer","value":{"rev":"3-d1ca18252c341b4430ab6e1240b5f571"}}, -{"id":"simple-xmpp","key":"simple-xmpp","value":{"rev":"11-b4c10de5e4e12a81c4486206d7fb6b40"}}, -{"id":"simple_pubsub","key":"simple_pubsub","value":{"rev":"9-22ae79856ca25b152f104e5d8bc93f12"}}, -{"id":"simpledb","key":"simpledb","value":{"rev":"13-6bf111aa18bffd86e65fd996525a6113"}}, -{"id":"simplegeo","key":"simplegeo","value":{"rev":"8-eb684eea019ae7e5fa0c087a9747367e"}}, -{"id":"simplegeo-client","key":"simplegeo-client","value":{"rev":"7-b2c976bbf8c145c6b0e1744630548084"}}, -{"id":"simplegeo-thrift","key":"simplegeo-thrift","value":{"rev":"3-bf6ddf40c020889fe28630217f38a442"}}, -{"id":"simplelogger","key":"simplelogger","value":{"rev":"3-36634d2543faecdeccc962422d149ffc"}}, -{"id":"simplesets","key":"simplesets","value":{"rev":"26-48fc18f94744c9b288945844b7cc9196"}}, -{"id":"simplesmtp","key":"simplesmtp","value":{"rev":"6-0952f0c5f43a8e94b11355774bbbe9e8"}}, -{"id":"simplydb","key":"simplydb","value":{"rev":"5-34659bf97bbb40f0ec4a3af14107dc31"}}, -{"id":"sin","key":"sin","value":{"rev":"6-0e8bd66b3e2c8c91efef14a3ddc79c53"}}, -{"id":"sink","key":"sink","value":{"rev":"8-4c49709009dfb5719935dba568a3398e"}}, -{"id":"sink-test","key":"sink-test","value":{"rev":"18-411afcb398102f245e92f2ce91897d3e"}}, -{"id":"sinon","key":"sinon","value":{"rev":"19-fa38010bb1bbed437273e1296660d598"}}, -{"id":"sinon-buster","key":"sinon-buster","value":{"rev":"5-a456f0e21b3edb647ad11179cd02354b"}}, -{"id":"sinon-nodeunit","key":"sinon-nodeunit","value":{"rev":"7-d60aa76cc41a6c9d9db4e8ae268b7b3c"}}, -{"id":"sip","key":"sip","value":{"rev":"17-02be6fb014d41fe66ab22ff2ae60a5b8"}}, -{"id":"sitemap","key":"sitemap","value":{"rev":"13-a6d1c830fdc8942c317c1ebe00efbb6d"}}, -{"id":"sizlate","key":"sizlate","value":{"rev":"3-a86c680c681299045f9aabecb99dc161"}}, -{"id":"sizzle","key":"sizzle","value":{"rev":"5-f00e18a80fb8a4f6bdbf11735e265720"}}, -{"id":"sk","key":"sk","value":{"rev":"33-b0b894d02b0211dae08baadfd84b46c2"}}, -{"id":"skeleton","key":"skeleton","value":{"rev":"5-3559721c222b99cd3f56acaaf706992f"}}, -{"id":"skillet","key":"skillet","value":{"rev":"3-0d6bbe21952f85967a5e12425691ee50"}}, -{"id":"skull.io","key":"skull.io","value":{"rev":"3-082e9d58f24ac59144fc130f6b54927e"}}, -{"id":"slang","key":"slang","value":{"rev":"7-3cd6390e3421f677e4e1b00fdf2d3ee1"}}, -{"id":"sleepless","key":"sleepless","value":{"rev":"5-1482568719534caf17f12daf0130ae0d"}}, -{"id":"sleepylib","key":"sleepylib","value":{"rev":"3-60e851f120e34b0726eb50a38b1e27e2"}}, -{"id":"sleight","key":"sleight","value":{"rev":"3-a0f16b17befee698b172074f84daf44c"}}, -{"id":"slick","key":"slick","value":{"rev":"3-596b7b7cf7b8881c55327e8bcf373700"}}, -{"id":"slickback","key":"slickback","value":{"rev":"9-c036e7393d0f9a463a263f287f3bcefd"}}, -{"id":"slide","key":"slide","value":{"rev":"14-83ade7490da699cf0ed99cec818ce3cd"}}, -{"id":"slippers","key":"slippers","value":{"rev":"5-0d657ed5fca4c0ed8b51c6d7f6eac08a"}}, -{"id":"slug","key":"slug","value":{"rev":"3-046a5bd74cc1edce30faa3b6ab239652"}}, -{"id":"slugr","key":"slugr","value":{"rev":"39-ac346964f547433fe34e637de682f81a"}}, -{"id":"smartdc","key":"smartdc","value":{"rev":"31-8c9db85e4548007a0ef87b7286229952"}}, -{"id":"smoosh","key":"smoosh","value":{"rev":"34-ba1c140a173ff8d1f9cdbe5e5addcc43"}}, -{"id":"smores","key":"smores","value":{"rev":"17-1aef1fa2e1675093c5aaf33436d83f5a"}}, -{"id":"smpp","key":"smpp","value":{"rev":"5-9be31b75aee4db09cfe5a2ceef4bea13"}}, -{"id":"smsified","key":"smsified","value":{"rev":"13-bb97eae0bbb6f4d5c4f2f391cd20e891"}}, -{"id":"smtp","key":"smtp","value":{"rev":"20-c3de67c5d0b3c4493293d9f55adb21ad"}}, -{"id":"smtpc","key":"smtpc","value":{"rev":"11-7c4e1207be6eb06350221af0134e8bd7"}}, -{"id":"smtpclient","key":"smtpclient","value":{"rev":"3-ba61ad5f0fd3fdd382e505abcde8c24e"}}, -{"id":"snake","key":"snake","value":{"rev":"15-384892bf8a5ebf222f6fe0ae321aaaa4"}}, -{"id":"snappy","key":"snappy","value":{"rev":"11-94f2d59347c10cc41b6f4a2dd2b0f15e"}}, -{"id":"sng","key":"sng","value":{"rev":"41-a1d3c6253dec5da8b3134ba3505924f5"}}, -{"id":"snip","key":"snip","value":{"rev":"3-cc51d232fff6a7d7b24588bd98e5613b"}}, -{"id":"snipes","key":"snipes","value":{"rev":"3-12af12ca83e15d056969ec76a3cc2ef0"}}, -{"id":"snippets","key":"snippets","value":{"rev":"13-d19c8a99287ec721d56ef9efdf3ce729"}}, -{"id":"snorkel","key":"snorkel","value":{"rev":"11-bc7ba5d1465c7d1ba71479087292615e"}}, -{"id":"snowball","key":"snowball","value":{"rev":"3-76cfbdb9f379ac635874b76d7ee2fd3b"}}, -{"id":"snpp","key":"snpp","value":{"rev":"8-4f10a9f2bff48e348303d8a143afaa6c"}}, -{"id":"snsclient","key":"snsclient","value":{"rev":"3-302ce1c7132a36ef909ce534a509e27f"}}, -{"id":"soap","key":"soap","value":{"rev":"7-10f361a406dfee3074adac0cea127d87"}}, -{"id":"socket-push","key":"socket-push","value":{"rev":"22-196553953d58d92c288678b1dcd49ba7"}}, -{"id":"socket-twitchat","key":"socket-twitchat","value":{"rev":"11-9b159a4610ea444eaae39baa3bf05280"}}, -{"id":"socket.io","key":"socket.io","value":{"rev":"95-c29c929613dd95aa5aea8a5e14f2573f"}}, -{"id":"socket.io-client","key":"socket.io-client","value":{"rev":"33-a3c79d917bb038f0ca72f9cb27180a66"}}, -{"id":"socket.io-cluster","key":"socket.io-cluster","value":{"rev":"5-83bdaf79d2243eaf3a59b45fc604dc1a"}}, -{"id":"socket.io-connect","key":"socket.io-connect","value":{"rev":"17-62f00efc3bff3a1b549cc5e346da996f"}}, -{"id":"socket.io-context","key":"socket.io-context","value":{"rev":"42-a029996765557776d72690db1f14c1fa"}}, -{"id":"socket.io-ender","key":"socket.io-ender","value":{"rev":"9-c4523af5f5cc815ee69c325c1e29ede4"}}, -{"id":"socket.io-juggernaut","key":"socket.io-juggernaut","value":{"rev":"6-b8b97b2df2c186f24487e027278ec975"}}, -{"id":"socket.io-sessions","key":"socket.io-sessions","value":{"rev":"11-2151ee14eb29543811a9e567bcf6811a"}}, -{"id":"socketstream","key":"socketstream","value":{"rev":"29-b198d27ad6a3c4f9b63bc467e85a54a3"}}, -{"id":"sockjs","key":"sockjs","value":{"rev":"21-a8d6534c55e8b3e33cf06516b59aa408"}}, -{"id":"socksified","key":"socksified","value":{"rev":"3-92350ec9889b8db9c3d34bdbc41b1f7b"}}, -{"id":"soda","key":"soda","value":{"rev":"24-04987191e2c4241fbfaf78263c83d121"}}, -{"id":"soda-runner","key":"soda-runner","value":{"rev":"5-da4e8078a7666404d2a5ab3267a5ef75"}}, -{"id":"sodn","key":"sodn","value":{"rev":"3-3ee6350723c54aad792c769947c6b05e"}}, -{"id":"sofa","key":"sofa","value":{"rev":"7-2f8ffd47ce19e6fb7e1ea2e02076955d"}}, -{"id":"solder","key":"solder","value":{"rev":"10-8f7ad0a60c2716ce65658047c4ae5361"}}, -{"id":"solr","key":"solr","value":{"rev":"11-56a295dff56d9f2a4a7293257ca793a4"}}, -{"id":"solr-client","key":"solr-client","value":{"rev":"7-a296273d32224eb241343cb98ded7b82"}}, -{"id":"sones","key":"sones","value":{"rev":"3-9ddbbdc44f3501917e701d3304eb91a5"}}, -{"id":"song","key":"song","value":{"rev":"7-967aa3a58702b3470996cd8e63b1b18d"}}, -{"id":"sorted","key":"sorted","value":{"rev":"3-47b6ec0f744aa04929d48a7d3d10f581"}}, -{"id":"sosumi","key":"sosumi","value":{"rev":"10-8c3980beb3d7c48d4cccf44a8d1d5ff7"}}, -{"id":"soundcloud","key":"soundcloud","value":{"rev":"7-9ee76aecd3d1946731a1173185796864"}}, -{"id":"soupselect","key":"soupselect","value":{"rev":"12-5fea60f4e52117a8212aa7add6c34278"}}, -{"id":"source","key":"source","value":{"rev":"7-57d6cae0530c7cba4a3932f0df129f20"}}, -{"id":"source-map","key":"source-map","value":{"rev":"6-7da8d2ccc104fa30a93ee165975f28e8"}}, -{"id":"spacesocket","key":"spacesocket","value":{"rev":"6-d1679084b0917f86d6c4e3ac89a89809"}}, -{"id":"spark","key":"spark","value":{"rev":"12-64d44ebde2a4b48aed3bc7814c63e773"}}, -{"id":"spark2","key":"spark2","value":{"rev":"28-918548a309f0d18eebd5c64966376959"}}, -{"id":"sparql","key":"sparql","value":{"rev":"3-8eec87fe9fcb4d07aef214858eada777"}}, -{"id":"sparql-orm","key":"sparql-orm","value":{"rev":"3-b2a7efa5622b0b478fdca3f9050800cc"}}, -{"id":"spatial","key":"spatial","value":{"rev":"3-d09d40af02a9c9e5150500cc66d75f8d"}}, -{"id":"spawn","key":"spawn","value":{"rev":"3-f882c01cf1bb538f5f4be78769e1b097"}}, -{"id":"spdy","key":"spdy","value":{"rev":"13-1fbf077bbb8bc87d5058648c0c66288b"}}, -{"id":"spec","key":"spec","value":{"rev":"15-1074d3a8b8332fcc1059fbb5c4f69a7a"}}, -{"id":"speck","key":"speck","value":{"rev":"21-652b0670953ba79e548f4e5d9ce3d923"}}, -{"id":"spectrum","key":"spectrum","value":{"rev":"28-21fb9eeffe2e63a5383371a44a58a1ad"}}, -{"id":"speller","key":"speller","value":{"rev":"6-91e03f89b09338cf8f38d2e64c1778ce"}}, -{"id":"sphericalmercator","key":"sphericalmercator","value":{"rev":"9-3affc61ae0d64854d77829da5414bbc5"}}, -{"id":"spider","key":"spider","value":{"rev":"3-cd04679891875dfb2bf67613514238eb"}}, -{"id":"spider-tdd","key":"spider-tdd","value":{"rev":"3-d95b6d680d053a063e6fab3fdae16261"}}, -{"id":"spine","key":"spine","value":{"rev":"9-2a5cd4733be1d78376814e78966d885a"}}, -{"id":"spine.app","key":"spine.app","value":{"rev":"43-1044b31d4c53ff5c741a16d49291b321"}}, -{"id":"spine.mobile","key":"spine.mobile","value":{"rev":"19-220f64c212a5f22b27d597e299263490"}}, -{"id":"split_er","key":"split_er","value":{"rev":"3-3419662807bf16f7b5b53998a4759246"}}, -{"id":"spludo","key":"spludo","value":{"rev":"14-d41915fcd1b50553f5b9e706b41d2894"}}, -{"id":"spm","key":"spm","value":{"rev":"9-28d6699288d580807091aafdf78dd479"}}, -{"id":"spore","key":"spore","value":{"rev":"44-1c50fb0e6f7c3447f34b1927c976201f"}}, -{"id":"spork","key":"spork","value":{"rev":"3-e90976749b649b88ab83b59785dba101"}}, -{"id":"spotify","key":"spotify","value":{"rev":"3-90c74506a69e08a41feeb23541ac0b4f"}}, -{"id":"spotify-metadata","key":"spotify-metadata","value":{"rev":"3-a546d3e59e40ec0be5d8524f3a1e7a60"}}, -{"id":"spotlight","key":"spotlight","value":{"rev":"3-bead50ac8f53311d539a420c74ea23e2"}}, -{"id":"spread","key":"spread","value":{"rev":"3-ad7bf6d948043fc6dd47a6fcec7da294"}}, -{"id":"spreadsheet","key":"spreadsheet","value":{"rev":"11-94030e23cc9c8e515c1f340656aea031"}}, -{"id":"spreadsheets","key":"spreadsheets","value":{"rev":"3-6563c479735b1b6599bf9602fa65ff38"}}, -{"id":"sprintf","key":"sprintf","value":{"rev":"10-56c5bc7a19ecf8dd92e24d4dca081059"}}, -{"id":"spruce","key":"spruce","value":{"rev":"7-1ea45ef3c5412dd2a6c1fe7b2a083d68"}}, -{"id":"spy","key":"spy","value":{"rev":"3-f5546fdbbec80ba97756d0d1fefa7923"}}, -{"id":"sql","key":"sql","value":{"rev":"5-6c41452f684418ba521666e977f46e54"}}, -{"id":"sqlite","key":"sqlite","value":{"rev":"9-18761259920b497360f581ff8051dcbb"}}, -{"id":"sqlite3","key":"sqlite3","value":{"rev":"51-f9c99537afd9826819c5f40105e50987"}}, -{"id":"sqlmw","key":"sqlmw","value":{"rev":"17-b05b0b089c0f3b1185f96dc19bf61cf5"}}, -{"id":"squeeze","key":"squeeze","value":{"rev":"6-5e517be339d9aa409cedfcc11d1883b1"}}, -{"id":"squish","key":"squish","value":{"rev":"15-2334d8412df59ddd2fce60c1f77954c7"}}, -{"id":"sqwish","key":"sqwish","value":{"rev":"28-cc159dd5fd420432a7724c46456f4958"}}, -{"id":"srand","key":"srand","value":{"rev":"16-22f98b1b1a208c22dfbe95aa889cd08e"}}, -{"id":"srcds","key":"srcds","value":{"rev":"3-bd79da47d36662609c0c75c713874fd1"}}, -{"id":"srs","key":"srs","value":{"rev":"32-c8c961ea10fc60fc428bddff133a8aba"}}, -{"id":"sserve","key":"sserve","value":{"rev":"3-957457395e2c61c20bcb727fc19fc4d4"}}, -{"id":"ssh","key":"ssh","value":{"rev":"3-c7dda694daa7ca1e264b494400edfa18"}}, -{"id":"ssh-agent","key":"ssh-agent","value":{"rev":"3-dbc87102ed1f17b7253a1901976dfa9d"}}, -{"id":"sshmq","key":"sshmq","value":{"rev":"3-052f36ca47cddf069a1700fc79a08930"}}, -{"id":"stache","key":"stache","value":{"rev":"11-9bb0239153147939a25fd20184f20fc6"}}, -{"id":"stack","key":"stack","value":{"rev":"7-e18abdce80008ac9e2feb66f3407fe67"}}, -{"id":"stack-trace","key":"stack-trace","value":{"rev":"13-9fe20c5a3e34a5e4472c6f4fdea86efc"}}, -{"id":"stack.static","key":"stack.static","value":{"rev":"7-ad064faf6255a632cefa71a6ff3c47f3"}}, -{"id":"stack2","key":"stack2","value":{"rev":"3-e5f8ea94c0dd2b4c7f5d3941d689622b"}}, -{"id":"stackedy","key":"stackedy","value":{"rev":"25-f988787b9b5720dece8ae3cb83a2bc12"}}, -{"id":"stage","key":"stage","value":{"rev":"7-d2931fcb473f63320067c3e75638924e"}}, -{"id":"stalker","key":"stalker","value":{"rev":"19-ece35be8695846fc766a71c0022d4ff7"}}, -{"id":"startupify","key":"startupify","value":{"rev":"11-3c87ef5e9ee33122cf3515a63b22c52a"}}, -{"id":"stash","key":"stash","value":{"rev":"10-41239a1df74b69fe7bb3e360f9a35ad1"}}, -{"id":"statechart","key":"statechart","value":{"rev":"6-97e6947b5bbaf14bdb55efa6dfa5e19c"}}, -{"id":"stately","key":"stately","value":{"rev":"6-f8a257cd9fdd84947ff2cf7357afc88b"}}, -{"id":"stathat","key":"stathat","value":{"rev":"3-b79b7bd50bb1e4dcc1301424104a5b36"}}, -{"id":"station","key":"station","value":{"rev":"5-92e6387138b1ee10976bd92dd48ea818"}}, -{"id":"statistics","key":"statistics","value":{"rev":"3-a1c3a03d833c6f02fde403950790e9b4"}}, -{"id":"stats","key":"stats","value":{"rev":"13-fe513ea6b3b5b6b31935fd3464ec5d3b"}}, -{"id":"std","key":"std","value":{"rev":"55-58a4f182c3f51996a0d60a6f575cfefd"}}, -{"id":"steam","key":"steam","value":{"rev":"5-bffdf677d2d1ae3e8236892e68a3dd66"}}, -{"id":"stem","key":"stem","value":{"rev":"36-4f1c38eff671ede0241038017a810132"}}, -{"id":"step","key":"step","value":{"rev":"8-048d7707a45af3a7824a478d296cc467"}}, -{"id":"stepc","key":"stepc","value":{"rev":"3-be85de2c02f4889fdf77fda791feefea"}}, -{"id":"stepper","key":"stepper","value":{"rev":"9-cc54000dc973835c38e139b30cbb10cc"}}, -{"id":"steps","key":"steps","value":{"rev":"5-3561591b425e1fff52dc397f9688feae"}}, -{"id":"stextile","key":"stextile","value":{"rev":"29-9a8b6de917df01d322847f112dcadadf"}}, -{"id":"stitch","key":"stitch","value":{"rev":"13-8a50e4a4f015d1afe346aa6b6c8646bd"}}, -{"id":"stitchup","key":"stitchup","value":{"rev":"7-fe14604e3a8b82f62c38d0cb3ccce61e"}}, -{"id":"stomp","key":"stomp","value":{"rev":"15-e0430c0be74cd20c5204b571999922f7"}}, -{"id":"stopwords","key":"stopwords","value":{"rev":"3-2dd9fade030cfcce85848c5b3b4116fc"}}, -{"id":"store","key":"store","value":{"rev":"9-5537cc0f4827044504e8dae9617c9347"}}, -{"id":"store.js","key":"store.js","value":{"rev":"22-116c9a6194703ea98512d89ec5865e3d"}}, -{"id":"stories","key":"stories","value":{"rev":"11-244ca52d0a41f70bc4dfa0aca0f82a40"}}, -{"id":"storify","key":"storify","value":{"rev":"5-605b197219e916df561dd7722af97e2e"}}, -{"id":"storify-templates","key":"storify-templates","value":{"rev":"3-0960756aa963cee21b679a59cef114a1"}}, -{"id":"storm","key":"storm","value":{"rev":"3-9052e6af8528d1bc0d96021dfa21dd3e"}}, -{"id":"stove","key":"stove","value":{"rev":"17-01c9f0e87398e6bfa03a764e89295e00"}}, -{"id":"str.js","key":"str.js","value":{"rev":"9-301f54edeebde3c5084c3a8071e2aa09"}}, -{"id":"strack","key":"strack","value":{"rev":"10-5acf78ae6a417a82b49c221d606b8fed"}}, -{"id":"strappy","key":"strappy","value":{"rev":"3-fb63a899ff82c0f1142518cc263dd632"}}, -{"id":"strata","key":"strata","value":{"rev":"31-de615eccbda796e2bea405c2806ec792"}}, -{"id":"stream-buffers","key":"stream-buffers","value":{"rev":"7-d8fae628da43d377dd4e982f5bf7b09b"}}, -{"id":"stream-handler","key":"stream-handler","value":{"rev":"7-333eb7dcf2aeb550f948ee2162b21be2"}}, -{"id":"stream-stack","key":"stream-stack","value":{"rev":"22-a70979df042e2ff760b2d900259c84a1"}}, -{"id":"streamer","key":"streamer","value":{"rev":"17-dd16e62ada55311a793fbf7963a920f3"}}, -{"id":"streamlib","key":"streamlib","value":{"rev":"3-5125b1e6a92290f8d7f5fdad71e13fc2"}}, -{"id":"streamline","key":"streamline","value":{"rev":"152-0931f5697340c62e05dcd1a741afd38f"}}, -{"id":"streamline-streams","key":"streamline-streams","value":{"rev":"3-3224030ecfbf5a8ac5d218ab56dee545"}}, -{"id":"streamline-util","key":"streamline-util","value":{"rev":"3-a8047ecf37b985ec836c552fd2bcbf78"}}, -{"id":"streamlogger","key":"streamlogger","value":{"rev":"3-43f93a109774591f1409b0b86c363623"}}, -{"id":"streamlogger-fixed","key":"streamlogger-fixed","value":{"rev":"3-6e48de9e269b4f5bf979c560190b0680"}}, -{"id":"strftime","key":"strftime","value":{"rev":"25-74130d5c9cbf91025ce91f0463a9b1b5"}}, -{"id":"string-color","key":"string-color","value":{"rev":"3-9f336bf06bd80b2d2338c216099421c7"}}, -{"id":"strscan","key":"strscan","value":{"rev":"8-3e0d182a8d0c786754c555c0ac12e9d9"}}, -{"id":"strtok","key":"strtok","value":{"rev":"8-a1a1da7946d62fabb6cca56fc218654b"}}, -{"id":"struct","key":"struct","value":{"rev":"3-ff0f9cb336df73a5a19a38e17633583c"}}, -{"id":"structr","key":"structr","value":{"rev":"21-69b3672dab234d0effec5a72a2b1791c"}}, -{"id":"sty","key":"sty","value":{"rev":"9-ce5691388abc3ccaff23030bff190914"}}, -{"id":"style","key":"style","value":{"rev":"7-342569887fb53caddc60d745706cd66e"}}, -{"id":"style-compile","key":"style-compile","value":{"rev":"5-6f8b86c94c5344ec280a28f025691996"}}, -{"id":"styleless","key":"styleless","value":{"rev":"5-c236b81c38193ad71d7ed7c5b571995d"}}, -{"id":"stylewriter","key":"stylewriter","value":{"rev":"3-25a3f83252b220d8db0aa70c8fc1da4f"}}, -{"id":"stylus","key":"stylus","value":{"rev":"135-8b69084f50a95c297d1044e48b39a6c9"}}, -{"id":"stylus-blueprint","key":"stylus-blueprint","value":{"rev":"5-50ec59a9fa161ca68dac765f2281c13e"}}, -{"id":"stylus-sprite","key":"stylus-sprite","value":{"rev":"27-db597a75467baaad94de287494e9c21e"}}, -{"id":"styout","key":"styout","value":{"rev":"9-9d9460bb9bfa253ed0b5fbeb27f7710a"}}, -{"id":"sugar","key":"sugar","value":{"rev":"5-2722426edc51a7703f5c37306b03a8c4"}}, -{"id":"sugardoll","key":"sugardoll","value":{"rev":"16-cfadf4e7108357297be180a3868130db"}}, -{"id":"suger-pod","key":"suger-pod","value":{"rev":"5-c812b763cf6cdd218c6a18e1a4e2a4ac"}}, -{"id":"sunny","key":"sunny","value":{"rev":"3-c26b62eef1eeeeef58a7ea9373df3b39"}}, -{"id":"superagent","key":"superagent","value":{"rev":"3-1b32cc8372b7713f973bb1e044e6a86f"}}, -{"id":"supermarket","key":"supermarket","value":{"rev":"20-afa8a26ecec3069717c8ca7e5811cc31"}}, -{"id":"supershabam-websocket","key":"supershabam-websocket","value":{"rev":"7-513117fb37b3ab7cdaeeae31589e212e"}}, -{"id":"supervisor","key":"supervisor","value":{"rev":"16-2c6c141d018ef8927acee79f31d466ff"}}, -{"id":"supervisord","key":"supervisord","value":{"rev":"7-359ba115e5e10b5c95ef1a7562ad7a45"}}, -{"id":"svg2jadepartial","key":"svg2jadepartial","value":{"rev":"9-4a6260dd5d7c14801e8012e3ba7510f5"}}, -{"id":"swake","key":"swake","value":{"rev":"5-6f780362f0317427752d87cc5c640021"}}, -{"id":"swarm","key":"swarm","value":{"rev":"43-f1a963a0aeb043bf69529a82798b3afc"}}, -{"id":"sweet","key":"sweet","value":{"rev":"5-333f4d3529f65ce53b037cc282e3671d"}}, -{"id":"swig","key":"swig","value":{"rev":"29-53294b9d4f350192cf65817692092bfa"}}, -{"id":"switchback","key":"switchback","value":{"rev":"3-e117371d415f4a3d4ad30e78f5ec28bf"}}, -{"id":"switchboard","key":"switchboard","value":{"rev":"3-504d6c1e45165c54fbb1d3025d5120d7"}}, -{"id":"swiz","key":"swiz","value":{"rev":"82-cfb7840376b57896fba469e5c6ff3786"}}, -{"id":"swizec-bitly","key":"swizec-bitly","value":{"rev":"3-a705807238b8ef3ff2d008910bc350c3"}}, -{"id":"sws","key":"sws","value":{"rev":"5-bc5e8558bde6c2ae971abdd448a006d2"}}, -{"id":"symbie","key":"symbie","value":{"rev":"5-3184f869ed386341a4cdc35d85efb62a"}}, -{"id":"symbox","key":"symbox","value":{"rev":"5-eed33350cbb763726335ef1df74a6591"}}, -{"id":"synapse","key":"synapse","value":{"rev":"3-a9672d5159c0268babbfb94d7554d4bb"}}, -{"id":"sync","key":"sync","value":{"rev":"65-89fa6b8ab2df135d57e0bba4e921ad3b"}}, -{"id":"synchro","key":"synchro","value":{"rev":"21-6a881704308298f1894509a5b59287ae"}}, -{"id":"synchronous","key":"synchronous","value":{"rev":"7-bf89d61f001d994429e0fd12c26c2676"}}, -{"id":"syncler","key":"syncler","value":{"rev":"2-12870522e069945fc12f7d0f612700ee"}}, -{"id":"syncrepl","key":"syncrepl","value":{"rev":"5-e9234a1d8a529bc0d1b01c3b77c69c30"}}, -{"id":"synct","key":"synct","value":{"rev":"3-3664581b69e6f40dabc90525217f46cd"}}, -{"id":"syndicate","key":"syndicate","value":{"rev":"7-1db2b05d6b3e55fa622c3c26df7f9cad"}}, -{"id":"syslog","key":"syslog","value":{"rev":"5-d52fbc739505a2a194faf9a32da39d23"}}, -{"id":"syslog-node","key":"syslog-node","value":{"rev":"15-039177b9c516fd8d0b31faf92aa73f6f"}}, -{"id":"system","key":"system","value":{"rev":"18-33152371e0696a853ddb8b2234a6dfea"}}, -{"id":"taazr-uglify","key":"taazr-uglify","value":{"rev":"7-5c63dc75aa7c973df102c298291be8a5"}}, -{"id":"table","key":"table","value":{"rev":"9-a8a46ddf3a7cab63a0228303305cc32e"}}, -{"id":"tache.io","key":"tache.io","value":{"rev":"7-5639c70dc56b0a6333b568af377bb216"}}, -{"id":"taco","key":"taco","value":{"rev":"3-97cfbd54b4053c9e01e18af7c3902d1a"}}, -{"id":"tad","key":"tad","value":{"rev":"3-529ebda7291e24ae020d5c2931ba22cd"}}, -{"id":"tafa-misc-util","key":"tafa-misc-util","value":{"rev":"19-52984b66029c7d5cc78d3e2ae88c98d6"}}, -{"id":"tag","key":"tag","value":{"rev":"3-80b0d526b10a26f41fe73978843a07b9"}}, -{"id":"taglib","key":"taglib","value":{"rev":"3-efd2e6bc818bf3b385df40dfae506fa5"}}, -{"id":"tail","key":"tail","value":{"rev":"21-09bce80ad6aa4b01c6a70825fd141fd4"}}, -{"id":"tails","key":"tails","value":{"rev":"14-3ba6976831b1388e14235622ab001681"}}, -{"id":"tamejs","key":"tamejs","value":{"rev":"39-9a3657941df3bd24c43b5473e9f3b4c8"}}, -{"id":"taobao-js-api","key":"taobao-js-api","value":{"rev":"7-d46c8b48364b823dabf808f2b30e1eb8"}}, -{"id":"tap","key":"tap","value":{"rev":"35-1b8e553cf848f5ab27711efa0e74a033"}}, -{"id":"tap-assert","key":"tap-assert","value":{"rev":"19-f2960c64bcfa6ce4ed73e870d8d9e3fa"}}, -{"id":"tap-consumer","key":"tap-consumer","value":{"rev":"3-3e38aafb6d2d840bdb20818efbc75df4"}}, -{"id":"tap-global-harness","key":"tap-global-harness","value":{"rev":"3-f32589814daf8c1816c1f5a24de4ad12"}}, -{"id":"tap-harness","key":"tap-harness","value":{"rev":"7-a5af01384152c452abc11d4e641e6157"}}, -{"id":"tap-producer","key":"tap-producer","value":{"rev":"3-2db67a9541c37c912d4de2576bb3caa0"}}, -{"id":"tap-results","key":"tap-results","value":{"rev":"5-b8800525438965e38dc586e6b5cb142d"}}, -{"id":"tap-runner","key":"tap-runner","value":{"rev":"11-3975c0f5044530b61158a029899f4c03"}}, -{"id":"tap-test","key":"tap-test","value":{"rev":"5-0a3bba26b6b94dae8b7f59712335ee98"}}, -{"id":"tar","key":"tar","value":{"rev":"6-94226dd7add6ae6a1e68088360a466e4"}}, -{"id":"tar-async","key":"tar-async","value":{"rev":"37-d6579d43c1ee2f41205f28b0cde5da23"}}, -{"id":"tar-js","key":"tar-js","value":{"rev":"5-6826f2aad965fb532c7403964ce80d85"}}, -{"id":"task","key":"task","value":{"rev":"3-81f72759a5b64dff88a01a4838cc4a23"}}, -{"id":"task-extjs","key":"task-extjs","value":{"rev":"14-c9ba76374805425c332e0c66725e885c"}}, -{"id":"task-joose-nodejs","key":"task-joose-nodejs","value":{"rev":"20-6b8e4d24323d3240d5ee790d00c0d96a"}}, -{"id":"task-joose-stable","key":"task-joose-stable","value":{"rev":"32-026eada52cd5dd17a680359daec4917a"}}, -{"id":"tasks","key":"tasks","value":{"rev":"5-84e8f83d0c6ec27b4f05057c48063d62"}}, -{"id":"tav","key":"tav","value":{"rev":"3-da9899817edd20f0c73ad09bdf540cc6"}}, -{"id":"taxman","key":"taxman","value":{"rev":"5-9b9c68db8a1c8efedad800026cb23ae4"}}, -{"id":"tbone","key":"tbone","value":{"rev":"3-5789b010d0b1f1c663750c894fb5c570"}}, -{"id":"tcp-proxy","key":"tcp-proxy","value":{"rev":"3-118c6dc26d11537cf157fe2f28b05af5"}}, -{"id":"teamgrowl","key":"teamgrowl","value":{"rev":"8-3d13200b3bfeeace0787f9f9f027216d"}}, -{"id":"teamgrowl-server","key":"teamgrowl-server","value":{"rev":"8-a14dc4a26c2c06a4d9509eaff6e24735"}}, -{"id":"telehash","key":"telehash","value":{"rev":"6-4fae3629c1e7e111ba3e486b39a29913"}}, -{"id":"telemail","key":"telemail","value":{"rev":"3-60928460428265fc8002ca61c7f23abe"}}, -{"id":"telemetry","key":"telemetry","value":{"rev":"5-1be1d37ef62dc786b0a0f0d2d7984eb1"}}, -{"id":"teleport","key":"teleport","value":{"rev":"36-5b55a43ba83f4fe1a547c04e29139c3d"}}, -{"id":"teleport-dashboard","key":"teleport-dashboard","value":{"rev":"7-4cbc728d7a3052848a721fcdd92dda30"}}, -{"id":"teleport-site","key":"teleport-site","value":{"rev":"3-aeb8c0a93b7b0bcd7a30fe33bf23808c"}}, -{"id":"telnet","key":"telnet","value":{"rev":"11-7a587104b94ce135315c7540eb3493f6"}}, -{"id":"telnet-protocol","key":"telnet-protocol","value":{"rev":"3-8fcee2ed02c2e603c48e51e90ae78a00"}}, -{"id":"temp","key":"temp","value":{"rev":"6-91ef505da0a0860a13c0eb1a5d2531e6"}}, -{"id":"tempPath","key":"tempPath","value":{"rev":"3-34f2c1937d97207245986c344136547c"}}, -{"id":"tempis","key":"tempis","value":{"rev":"3-b2c0989068cc8125a519d19b9c79ffb6"}}, -{"id":"template","key":"template","value":{"rev":"6-d0088c6a5a7610570920db0f5c950bf9"}}, -{"id":"template-engine","key":"template-engine","value":{"rev":"3-3746216e1e2e456dbb0fd2f9070c1619"}}, -{"id":"tengwar","key":"tengwar","value":{"rev":"3-645a00f03e1e9546631ac22c37e1f3b4"}}, -{"id":"tenjin","key":"tenjin","value":{"rev":"5-0925c7535455266125b7730296c66356"}}, -{"id":"teriaki","key":"teriaki","value":{"rev":"3-d3c17f70d8697c03f43a7eae75f8c089"}}, -{"id":"terminal","key":"terminal","value":{"rev":"11-0e024d173ee3c28432877c0c5f633f19"}}, -{"id":"termspeak","key":"termspeak","value":{"rev":"7-fdfc93dd7d0d65fe502cabca191d8496"}}, -{"id":"termutil","key":"termutil","value":{"rev":"5-bccf8377ff28bc1f07f8b4b44d1e2335"}}, -{"id":"test","key":"test","value":{"rev":"38-129620013bbd3ec13617c403b02b52f1"}}, -{"id":"test-cmd","key":"test-cmd","value":{"rev":"35-7dd417a80390c2c124c66273ae33bd07"}}, -{"id":"test-helper","key":"test-helper","value":{"rev":"3-7b29af65825fc46d0603a39cdc6c95b4"}}, -{"id":"test-report","key":"test-report","value":{"rev":"5-e51cd1069b6cc442707f0861b35851be"}}, -{"id":"test-report-view","key":"test-report-view","value":{"rev":"3-9ba670940a8235eaef9b957dde6379af"}}, -{"id":"test-run","key":"test-run","value":{"rev":"20-6de89383602e6843d9376a78778bec19"}}, -{"id":"test_it","key":"test_it","value":{"rev":"5-be5cd436b9145398fa88c15c1269b102"}}, -{"id":"testbed","key":"testbed","value":{"rev":"2-db233788f7e516f227fac439d9450ef4"}}, -{"id":"testharness","key":"testharness","value":{"rev":"46-787468cb68ec31b442327639dcc0a4e5"}}, -{"id":"testingey","key":"testingey","value":{"rev":"17-a7ad6a9ff5721ae449876f6448d6f22f"}}, -{"id":"testnode","key":"testnode","value":{"rev":"9-cb63c450b241806e2271cd56fe502395"}}, -{"id":"testosterone","key":"testosterone","value":{"rev":"35-278e8af2b59bb6caf56728c67f720c37"}}, -{"id":"testqueue","key":"testqueue","value":{"rev":"3-59c574aeb345ef2d6e207a342be3f497"}}, -{"id":"testrunner","key":"testrunner","value":{"rev":"7-152e7d4a97f6cf6f00e22140e1969664"}}, -{"id":"testy","key":"testy","value":{"rev":"5-e8f4c9f4a799b6f8ab4effc21c3073a0"}}, -{"id":"text","key":"text","value":{"rev":"6-58a79b0db4968d6ad233898744a75351"}}, -{"id":"textareaserver","key":"textareaserver","value":{"rev":"3-f032b1397eb5e6369e1ac0ad1e78f466"}}, -{"id":"textile","key":"textile","value":{"rev":"6-2a8db66876f0119883449012c9c54c47"}}, -{"id":"textual","key":"textual","value":{"rev":"3-0ad9d5d3403b239185bad403625fed19"}}, -{"id":"tf2logparser","key":"tf2logparser","value":{"rev":"5-ffbc427b95ffeeb013dc13fa2b9621e3"}}, -{"id":"tfe-express","key":"tfe-express","value":{"rev":"3-b68ac01185885bcd22fa430ddb97e757"}}, -{"id":"tfidf","key":"tfidf","value":{"rev":"13-988808af905397dc103a0edf8c7c8a9f"}}, -{"id":"theBasics","key":"theBasics","value":{"rev":"7-9ebef2e59e1bd2fb3544ed16e1dc627b"}}, -{"id":"thefunlanguage.com","key":"thefunlanguage.com","value":{"rev":"3-25d56a3a4f639af23bb058db541bffe0"}}, -{"id":"thelinuxlich-docco","key":"thelinuxlich-docco","value":{"rev":"7-2ac0969da67ead2fa8bc0b21880b1d6b"}}, -{"id":"thelinuxlich-vogue","key":"thelinuxlich-vogue","value":{"rev":"5-ebc0a28cf0ae447b7ebdafc51c460bc0"}}, -{"id":"thepusher","key":"thepusher","value":{"rev":"5-b80cce6f81b1cae7373cd802df34c05c"}}, -{"id":"thetvdb","key":"thetvdb","value":{"rev":"3-a3a017a90b752d8158bf6dfcbcfdf250"}}, -{"id":"thirty-two","key":"thirty-two","value":{"rev":"3-1d4761ba7c4fa475e0c69e9c96d6ac04"}}, -{"id":"thoonk","key":"thoonk","value":{"rev":"15-c62c90d7e9072d96302d3a534ce943bb"}}, -{"id":"thrift","key":"thrift","value":{"rev":"14-447a41c9b655ec06e8e4854d5a55523a"}}, -{"id":"throttle","key":"throttle","value":{"rev":"3-8a3b3c657c49ede67c883806fbfb4df6"}}, -{"id":"thyme","key":"thyme","value":{"rev":"5-f06104f10d43a2b4cbcc7621ed45eacf"}}, -{"id":"tiamat","key":"tiamat","value":{"rev":"44-810633d6cd5edaa0510fe0f38c02ad58"}}, -{"id":"tictoc","key":"tictoc","value":{"rev":"3-0be6cf95d4466595376dadd0fc08bd95"}}, -{"id":"tidy","key":"tidy","value":{"rev":"3-25116d4dcf6765ef2a09711ecc1e03c9"}}, -{"id":"tiers","key":"tiers","value":{"rev":"3-ffaa8ffe472fe703de8f0bbeb8af5621"}}, -{"id":"tilejson","key":"tilejson","value":{"rev":"5-76b990dd945fb412ed00a96edc86b59d"}}, -{"id":"tilelive","key":"tilelive","value":{"rev":"57-9283e846e77263ed6e7299680d6b4b06"}}, -{"id":"tilelive-mapnik","key":"tilelive-mapnik","value":{"rev":"31-30f871ede46789fc6a36f427a1a99fff"}}, -{"id":"tilemill","key":"tilemill","value":{"rev":"19-7b884c9d707dd34f21cb71e88b45fc73"}}, -{"id":"tilestream","key":"tilestream","value":{"rev":"76-3a29ba96ecdb6c860c211ae8f2d909a9"}}, -{"id":"timbits","key":"timbits","value":{"rev":"59-b48dde4a210ec9fb4c33c07a52bce61e"}}, -{"id":"time","key":"time","value":{"rev":"51-907f587206e6a27803a3570e42650adc"}}, -{"id":"timeTraveller","key":"timeTraveller","value":{"rev":"7-389de8c8e86daea495d14aeb2b77df38"}}, -{"id":"timeout","key":"timeout","value":{"rev":"11-8e53dedecfaf6c4f1086eb0f43c71325"}}, -{"id":"timer","key":"timer","value":{"rev":"5-a8bcbb898a807e6662b54ac988fb967b"}}, -{"id":"timerjs","key":"timerjs","value":{"rev":"3-7d24eb268746fdb6b5e9be93bec93f1b"}}, -{"id":"timespan","key":"timespan","value":{"rev":"12-315b2793cbf28a18cea36e97a3c8a55f"}}, -{"id":"timezone","key":"timezone","value":{"rev":"35-2741d5d3b68a953d4cb3a596bc2bc15e"}}, -{"id":"tiny","key":"tiny","value":{"rev":"9-a61d26d02ce39381f7e865ad82494692"}}, -{"id":"tld","key":"tld","value":{"rev":"3-5ce4b4e48a11413ad8a1f3bfd0d0b778"}}, -{"id":"tldextract","key":"tldextract","value":{"rev":"7-620962e27145bd9fc17dc406c38b0c32"}}, -{"id":"tmp","key":"tmp","value":{"rev":"23-20f5c14244d58f35bd3e970f5f65cc32"}}, -{"id":"tmpl","key":"tmpl","value":{"rev":"5-5894c206e15fa58ab9415706b9d53f1f"}}, -{"id":"tmpl-precompile","key":"tmpl-precompile","value":{"rev":"15-3db34b681596b258cae1dae8cc24119d"}}, -{"id":"tmppckg","key":"tmppckg","value":{"rev":"11-b3a13e1280eb9cbef182c1f3f24bd570"}}, -{"id":"tnetstrings","key":"tnetstrings","value":{"rev":"3-d6b8ed2390a3e38138cb01b82d820079"}}, -{"id":"toDataURL","key":"toDataURL","value":{"rev":"3-1ea3cb62666b37343089bb9ef48fbace"}}, -{"id":"toYaml","key":"toYaml","value":{"rev":"11-3c629e3859c70d57b1ae51b2ac459011"}}, -{"id":"tob","key":"tob","value":{"rev":"7-376c174d06a675855406cfcdcacf61f5"}}, -{"id":"tobi","key":"tobi","value":{"rev":"50-d8749ac3739b042afe82657802bc3ba8"}}, -{"id":"toddick","key":"toddick","value":{"rev":"13-db528ef519f57b8c1d752ad7270b4d05"}}, -{"id":"tokenizer","key":"tokenizer","value":{"rev":"5-f6524fafb16059b66074cd04bf248a03"}}, -{"id":"tokyotosho","key":"tokyotosho","value":{"rev":"5-7432e0207165d9c165fd73d2a23410d6"}}, -{"id":"tolang","key":"tolang","value":{"rev":"7-65dbdf56b039f680e61a1e1d7feb9fb1"}}, -{"id":"toolkit","key":"toolkit","value":{"rev":"13-58075a57a6069dc39f98e72d473a0c30"}}, -{"id":"tools","key":"tools","value":{"rev":"3-ba301d25cfc6ad71dd68c811ea97fa01"}}, -{"id":"topcube","key":"topcube","value":{"rev":"29-736b3816d410f626dbc4da663acb05aa"}}, -{"id":"torrent-search","key":"torrent-search","value":{"rev":"7-7dd48fac0c1f99f34fad7da365085b6c"}}, -{"id":"tosource","key":"tosource","value":{"rev":"5-13483e2c11b07611c26b37f2e76a0bf3"}}, -{"id":"tplcpl","key":"tplcpl","value":{"rev":"15-8ba1e6d14ad6b8eb71b703e22054ac0a"}}, -{"id":"tracejs","key":"tracejs","value":{"rev":"23-1ffec83afc19855bcbed8049a009a910"}}, -{"id":"traceur","key":"traceur","value":{"rev":"9-a48f7e4cb1fb452125d81c62c8ab628b"}}, -{"id":"traceurl","key":"traceurl","value":{"rev":"21-e016db44a86b124ea00411f155d884d4"}}, -{"id":"tracey","key":"tracey","value":{"rev":"5-76699aab64e89271cbb7df80a00d3583"}}, -{"id":"tracy","key":"tracy","value":{"rev":"5-412f78082ba6f4c3c7d5328cf66d2e10"}}, -{"id":"traits","key":"traits","value":{"rev":"10-3a37dbec4b78518c00c577f5e286a9b9"}}, -{"id":"tramp","key":"tramp","value":{"rev":"5-3b6d27b8b432b925b7c9fc088e84d8e4"}}, -{"id":"transcode","key":"transcode","value":{"rev":"6-a6494707bd94b5e6d1aa9df3dbcf8d7c"}}, -{"id":"transformer","key":"transformer","value":{"rev":"15-7738ac7c02f03d64f73610fbf7ed92a6"}}, -{"id":"transformjs","key":"transformjs","value":{"rev":"5-f1ab667c430838e1d3238e1f878998e2"}}, -{"id":"transitive","key":"transitive","value":{"rev":"43-841de40a5e3434bd51a1c8f19891f982"}}, -{"id":"translate","key":"translate","value":{"rev":"12-f3ddbbada2f109843c5422d83dd7a203"}}, -{"id":"transliteration.ua","key":"transliteration.ua","value":{"rev":"3-f847c62d8749904fc7de6abe075e619a"}}, -{"id":"transmission","key":"transmission","value":{"rev":"9-587eaa395430036f17b175bc439eabb6"}}, -{"id":"transmogrify","key":"transmogrify","value":{"rev":"5-3e415cd9420c66551cccc0aa91b11d98"}}, -{"id":"transporter","key":"transporter","value":{"rev":"6-698b696890bf01d751e9962bd86cfe7e"}}, -{"id":"traverse","key":"traverse","value":{"rev":"60-9432066ab44fbb0e913227dc62c953d9"}}, -{"id":"traverser","key":"traverser","value":{"rev":"11-1d50662f13134868a1df5019d99bf038"}}, -{"id":"treeeater","key":"treeeater","value":{"rev":"56-2c8a9fd3e842b221ab8da59c6d847327"}}, -{"id":"treelib","key":"treelib","value":{"rev":"13-212ccc836a943c8b2a5342b65ab9edf3"}}, -{"id":"trees","key":"trees","value":{"rev":"3-3ee9e9cf3fd8aa985e32b3d9586a7c0e"}}, -{"id":"trentm-datetime","key":"trentm-datetime","value":{"rev":"3-740a291379ddf97bda2aaf2ff0e1654d"}}, -{"id":"trentm-git","key":"trentm-git","value":{"rev":"3-b81ce3764a45e5d0862488fab9fac486"}}, -{"id":"trentm-hashlib","key":"trentm-hashlib","value":{"rev":"3-4b4175b6a8702bdb9c1fe5ac4786761b"}}, -{"id":"trial","key":"trial","value":{"rev":"3-cf77f189409517495dd8259f86e0620e"}}, -{"id":"trie","key":"trie","value":{"rev":"3-6cc3c209cf4aae5a4f92e1ca38c4c54c"}}, -{"id":"trollop","key":"trollop","value":{"rev":"6-75076593614c9cd51d61a76f73d2c5b5"}}, -{"id":"trollscript","key":"trollscript","value":{"rev":"5-fcf646075c5be575b9174f84d08fbb37"}}, -{"id":"trollscriptjs","key":"trollscriptjs","value":{"rev":"3-1dfd1acd3d15c0bd18ea407e3933b621"}}, -{"id":"tropo-webapi","key":"tropo-webapi","value":{"rev":"11-5106730dbd79167df38812ffaa912ded"}}, -{"id":"tropo-webapi-node","key":"tropo-webapi-node","value":{"rev":"15-483c64bcbf1dcadaea30e78d7bc3ebbc"}}, -{"id":"trundle","key":"trundle","value":{"rev":"3-2af32ed348fdedebd1077891bb22a756"}}, -{"id":"trust-reverse-proxy","key":"trust-reverse-proxy","value":{"rev":"6-ba5bed0849617e0390f0e24750bf5747"}}, -{"id":"trying","key":"trying","value":{"rev":"3-43b417160b178c710e0d85af6b3d56e7"}}, -{"id":"ttapi","key":"ttapi","value":{"rev":"51-727e47d8b383b387a498711c07ce4de6"}}, -{"id":"tubbs","key":"tubbs","value":{"rev":"7-b386e59f2205b22615a376f5ddee3eb0"}}, -{"id":"tuild","key":"tuild","value":{"rev":"13-4a2b92f95a0ee342c060974ce7a0021d"}}, -{"id":"tumbler","key":"tumbler","value":{"rev":"5-ff16653ab92d0af5e70d9caa88f3b7ed"}}, -{"id":"tumbler-sprite","key":"tumbler-sprite","value":{"rev":"3-604d25b7bb9e32b92cadd75aeb23997c"}}, -{"id":"tumblr","key":"tumblr","value":{"rev":"9-14d160f1f2854330fba300b3ea233893"}}, -{"id":"tumblr2","key":"tumblr2","value":{"rev":"7-29bb5d86501cdbcef889289fe7f4b51e"}}, -{"id":"tumblrrr","key":"tumblrrr","value":{"rev":"10-0c50379fbab7b39766e1a61379c39964"}}, -{"id":"tunguska","key":"tunguska","value":{"rev":"1-a6b24d2c2a5a9f091a9b6f13bac66927"}}, -{"id":"tupalocomapi","key":"tupalocomapi","value":{"rev":"3-a1cdf85a08784f62c2ec440a1ed90ad4"}}, -{"id":"turing","key":"turing","value":{"rev":"5-4ba083c8343718acb9450d96551b65c0"}}, -{"id":"tutti","key":"tutti","value":{"rev":"21-929cc205b3d8bc68f86aa63578e0af95"}}, -{"id":"tuttiserver","key":"tuttiserver","value":{"rev":"39-b3fe7cbaf2d43458dae061f37aa5ae18"}}, -{"id":"tuttiterm","key":"tuttiterm","value":{"rev":"7-6c0e9e7f6f137de0ee7c886351fdf373"}}, -{"id":"tvister","key":"tvister","value":{"rev":"7-963eab682ab09922a44fbca50c0ec019"}}, -{"id":"twbot","key":"twbot","value":{"rev":"15-923625f516566c977975b3da3d4bc46b"}}, -{"id":"tweasy","key":"tweasy","value":{"rev":"10-7215063e5729b1c114ef73f07a1368d3"}}, -{"id":"tweeter.js","key":"tweeter.js","value":{"rev":"3-bc8437157c11cf32eec168d7c71037bb"}}, -{"id":"tweetstream","key":"tweetstream","value":{"rev":"6-81a6bf2a3e29208e1c4c65a3958ee5d8"}}, -{"id":"twerk","key":"twerk","value":{"rev":"5-01cbfddf9ad25a67ff1e45ec39acb780"}}, -{"id":"twerp","key":"twerp","value":{"rev":"23-1b4726d1fef030a3dde6fae2cdfbb687"}}, -{"id":"twigjs","key":"twigjs","value":{"rev":"7-07b90e2c35c5c81d394b29086507de04"}}, -{"id":"twilio","key":"twilio","value":{"rev":"20-68d5439ecb1774226025e6f9125bbb86"}}, -{"id":"twilio-node","key":"twilio-node","value":{"rev":"13-84d31c2dc202df3924ed399289cbc1fc"}}, -{"id":"twiliode","key":"twiliode","value":{"rev":"3-6cbe432dd6c6d94d8a4faa6e0ea47dd3"}}, -{"id":"twill","key":"twill","value":{"rev":"5-3a0caf9c0e83ab732ae8ae61f4f17830"}}, -{"id":"twisted-deferred","key":"twisted-deferred","value":{"rev":"9-f35acecb8736d96582e1f9b62dd4ae47"}}, -{"id":"twitpic","key":"twitpic","value":{"rev":"11-55b11432a09edeec1189024f26a48153"}}, -{"id":"twitter","key":"twitter","value":{"rev":"60-9ad6368932c8a74ea5bd10dda993d74d"}}, -{"id":"twitter-client","key":"twitter-client","value":{"rev":"11-dc3da9e1724cf00aa86c1e7823cfd919"}}, -{"id":"twitter-connect","key":"twitter-connect","value":{"rev":"12-969292347a4251d121566169236a3091"}}, -{"id":"twitter-js","key":"twitter-js","value":{"rev":"24-251d0c54749e86bd544a15290e311370"}}, -{"id":"twitter-node","key":"twitter-node","value":{"rev":"12-a7ed6c69f05204de2e258f46230a05b6"}}, -{"id":"twitter-text","key":"twitter-text","value":{"rev":"16-978bda8ec4eaf68213d0ee54242feefa"}}, -{"id":"type","key":"type","value":{"rev":"3-c5b8b87cde9e27277302cb5cb6d00f85"}}, -{"id":"typecheck","key":"typecheck","value":{"rev":"5-79723661620bb0fb254bc7f888d6e937"}}, -{"id":"typed-array","key":"typed-array","value":{"rev":"3-89ac91e2a51a9e5872515d5a83691e83"}}, -{"id":"typhoon","key":"typhoon","value":{"rev":"23-2027c96b8fd971332848594f3b0526cb"}}, -{"id":"typogr","key":"typogr","value":{"rev":"13-2dfe00f08ee13e6b00a99df0a8f96718"}}, -{"id":"ua-parser","key":"ua-parser","value":{"rev":"14-d1a018354a583dba4506bdc0c04a416b"}}, -{"id":"uberblic","key":"uberblic","value":{"rev":"5-500704ed73f255eb5b86ad0a5e158bc9"}}, -{"id":"ucengine","key":"ucengine","value":{"rev":"5-1e8a91c813e39b6f1b9f988431bb65c8"}}, -{"id":"udon","key":"udon","value":{"rev":"3-9a819e835f88fc91272b6366c70d83c0"}}, -{"id":"ueberDB","key":"ueberDB","value":{"rev":"85-fa700e5a64efaf2e71de843d7175606c"}}, -{"id":"uglify-js","key":"uglify-js","value":{"rev":"30-9ac97132a90f94b0a3aadcd96ed51890"}}, -{"id":"uglify-js-middleware","key":"uglify-js-middleware","value":{"rev":"5-47bd98d7f1118f5cab617310d4022eb4"}}, -{"id":"uglifycss","key":"uglifycss","value":{"rev":"3-4eefc4632e6e61ec999e93a1e26e0c83"}}, -{"id":"ui","key":"ui","value":{"rev":"27-b6439c8fcb5feb1d8f722ac5a91727c0"}}, -{"id":"ukijs","key":"ukijs","value":{"rev":"13-a0d7b143104e6cc0760cbe7e61c4f293"}}, -{"id":"umecob","key":"umecob","value":{"rev":"19-960fef8b8b8468ee69096173baa63232"}}, -{"id":"underscore","key":"underscore","value":{"rev":"29-419857a1b0dc08311717d1f6066218b8"}}, -{"id":"underscore-data","key":"underscore-data","value":{"rev":"17-e763dd42ea6e4ab71bc442e9966e50e4"}}, -{"id":"underscore.date","key":"underscore.date","value":{"rev":"11-a1b5870b855d49a3bd37823a736e9f93"}}, -{"id":"underscore.inspector","key":"underscore.inspector","value":{"rev":"7-04d67b5bfe387391d461b11c6ddda231"}}, -{"id":"underscore.string","key":"underscore.string","value":{"rev":"31-4100a9e1f1d7e8dde007cc6736073e88"}}, -{"id":"underscorem","key":"underscorem","value":{"rev":"5-181dd113e62482020122e6a68f80cdc1"}}, -{"id":"underscorex","key":"underscorex","value":{"rev":"8-76b82cffecd4304822fbc346e6cebc1b"}}, -{"id":"underscorify","key":"underscorify","value":{"rev":"3-7bb03dccba21d30c50328e7d4878704e"}}, -{"id":"unicode","key":"unicode","value":{"rev":"45-2fc73b36aad2661e5bb2e703e62a6f71"}}, -{"id":"unicoder","key":"unicoder","value":{"rev":"3-6f6571d361217af7fea7c224ca8a1149"}}, -{"id":"unit","key":"unit","value":{"rev":"5-68847eeb11474765cf73f1e21ca4b839"}}, -{"id":"unite","key":"unite","value":{"rev":"3-a8812f4e77d1d1a9dc67c327d8e75b47"}}, -{"id":"unittest-jslint","key":"unittest-jslint","value":{"rev":"3-c371c63c7b68a32357becb7b6a02d048"}}, -{"id":"unixlib","key":"unixlib","value":{"rev":"3-41f4c2859ca92951cf40556faa4eacdb"}}, -{"id":"unlimit","key":"unlimit","value":{"rev":"3-f42d98066e6ebbc23ef67499845ac020"}}, -{"id":"unrequire","key":"unrequire","value":{"rev":"17-bc75241891ae005eb52844222daf8f97"}}, -{"id":"unshortener","key":"unshortener","value":{"rev":"15-0851cb8bc3c378c37a3df9760067a109"}}, -{"id":"unused","key":"unused","value":{"rev":"3-362e713349c4a5541564fa2de33d01ba"}}, -{"id":"upload","key":"upload","value":{"rev":"3-63aedcfb335754c3bca1675c4add51c4"}}, -{"id":"ups_node","key":"ups_node","value":{"rev":"15-fa6d0be3831ee09420fb703c4d508534"}}, -{"id":"upy","key":"upy","value":{"rev":"5-dab63054d02be71f9c2709659974a5e1"}}, -{"id":"uri","key":"uri","value":{"rev":"3-5baaa12433cff7539b1d39c0c7f62853"}}, -{"id":"uri-parser","key":"uri-parser","value":{"rev":"3-d7e81b08e8b3f6f5ac8c6b4220228529"}}, -{"id":"url","key":"url","value":{"rev":"3-0dfd5ec2904cb1f645fa7449dbb0ce52"}}, -{"id":"url-expander","key":"url-expander","value":{"rev":"21-73bf9fa3c98b15d5ef0ed9815d862953"}}, -{"id":"urllib","key":"urllib","value":{"rev":"5-b015944526c15589a1504d398dcb598a"}}, -{"id":"urn-parser","key":"urn-parser","value":{"rev":"3-08a35a166790ecf88729befd4ebc7bf1"}}, -{"id":"useless","key":"useless","value":{"rev":"3-9d7b7ab9d4811847ed6e99ce2226d687"}}, -{"id":"user-agent","key":"user-agent","value":{"rev":"16-ac00f085795346421242e3d4d75523ad"}}, -{"id":"useragent","key":"useragent","value":{"rev":"7-3184d8aba5540e6596da9e3635ee3c24"}}, -{"id":"useragent_parser","key":"useragent_parser","value":{"rev":"3-730427aba3f0825fd28850e96b1613d4"}}, -{"id":"utf7","key":"utf7","value":{"rev":"3-ad56e4c9ac5a509ff568a3cdf0ed074f"}}, -{"id":"utf8","key":"utf8","value":{"rev":"3-c530cad759dd6e4e471338a71a307434"}}, -{"id":"util","key":"util","value":{"rev":"3-0e55e3466bc3ea6aeda6384639e842c3"}}, -{"id":"utility-belt","key":"utility-belt","value":{"rev":"3-8de401b41ef742b3c0a144b99099771f"}}, -{"id":"utml","key":"utml","value":{"rev":"5-5f0f3de6f787056bd124ca98716fbc19"}}, -{"id":"uubench","key":"uubench","value":{"rev":"6-b6cb0756e35ce998b61bb9a6ea0f5732"}}, -{"id":"uuid","key":"uuid","value":{"rev":"13-3f014b236668ec5eb49d0a17ad54d397"}}, -{"id":"uuid-lib","key":"uuid-lib","value":{"rev":"3-3de40495439e240b5a41875c19c65b1a"}}, -{"id":"uuid-pure","key":"uuid-pure","value":{"rev":"19-b94e9f434901fe0a0bbfdfa06f785874"}}, -{"id":"uuid.js","key":"uuid.js","value":{"rev":"8-3232a97c9f4a2b601d207488350df01b"}}, -{"id":"v8-profiler","key":"v8-profiler","value":{"rev":"12-790c90391bcbec136e316e57b30a845c"}}, -{"id":"valentine","key":"valentine","value":{"rev":"35-dd4b0642aacaf833e1119fc42bb6e9df"}}, -{"id":"validate-json","key":"validate-json","value":{"rev":"5-6a71fb36b102b3a4c5f6cc35012518b3"}}, -{"id":"validations","key":"validations","value":{"rev":"5-7272c97d35e3269813d91f1ea06e7217"}}, -{"id":"validator","key":"validator","value":{"rev":"45-9983ff692c291143ba670b613e07ddab"}}, -{"id":"vanilla","key":"vanilla","value":{"rev":"3-2e1d05af0873386b7cd6d432f1e76217"}}, -{"id":"vapor","key":"vapor","value":{"rev":"1-e1f86f03c94a4b90bca347408dbc56ff"}}, -{"id":"vargs","key":"vargs","value":{"rev":"6-9e389cfd648034dd469348112eedb23b"}}, -{"id":"vash","key":"vash","value":{"rev":"9-85ade8b7249a0e8230e8f0aaf1c34e2a"}}, -{"id":"vbench","key":"vbench","value":{"rev":"3-059528251a566c6ac363e236212448ce"}}, -{"id":"vendor.js","key":"vendor.js","value":{"rev":"5-264b0f8a771cad113be6919b6004ff95"}}, -{"id":"ventstatus","key":"ventstatus","value":{"rev":"3-16aa39e22b149b23b64317991415f92c"}}, -{"id":"version-compare","key":"version-compare","value":{"rev":"3-a8d6eea31572fe973ddd98c0a8097bc6"}}, -{"id":"vertica","key":"vertica","value":{"rev":"37-035d50183c3ad3056db0d7a13c20005d"}}, -{"id":"vhost","key":"vhost","value":{"rev":"9-53bbdba14dae631a49e782d169e4fc5a"}}, -{"id":"vice","key":"vice","value":{"rev":"5-0f74600349f4540b1b104d4ebfec1309"}}, -{"id":"video","key":"video","value":{"rev":"10-65c0b603047188fe2b07cbd2e1c93fe7"}}, -{"id":"vie","key":"vie","value":{"rev":"5-94e23770c5a0510480a0bae07d846ebc"}}, -{"id":"view","key":"view","value":{"rev":"21-a2abdfc54ab732a906347090c68564a5"}}, -{"id":"vigilante","key":"vigilante","value":{"rev":"30-951541a8b2fc2364bb1ccd7cfae56482"}}, -{"id":"villain","key":"villain","value":{"rev":"10-8dbfc5db42230d8813e6cc61af14d575"}}, -{"id":"vine","key":"vine","value":{"rev":"17-e7ac5d190cacf0f2d17d27e37b2b9f5f"}}, -{"id":"vipe","key":"vipe","value":{"rev":"3-78996531221e08292b9ca3de6e19d578"}}, -{"id":"viralheat","key":"viralheat","value":{"rev":"3-b928ce797fd5955c766b6b7e9e9c8f54"}}, -{"id":"viralheat-sentiment","key":"viralheat-sentiment","value":{"rev":"3-5d083e0d141ecf36e06c7c2885b01b5c"}}, -{"id":"virustotal.js","key":"virustotal.js","value":{"rev":"3-074be49f7e877b154a2144ef844f78e9"}}, -{"id":"vk","key":"vk","value":{"rev":"9-48f53ea9ebe68c9d3af45eb601c71006"}}, -{"id":"vmcjs","key":"vmcjs","value":{"rev":"5-44d8dd906fa3530d2bfc2dfee7f498d4"}}, -{"id":"vogue","key":"vogue","value":{"rev":"38-891354d18638a26d5b5ba95933faae0e"}}, -{"id":"vogue-dtrejo","key":"vogue-dtrejo","value":{"rev":"3-3ef8d57d3b5c0aca297fe38c9040954f"}}, -{"id":"votizen-logger","key":"votizen-logger","value":{"rev":"4-ba0837a28693aba346fab885a3a8f315"}}, -{"id":"vows","key":"vows","value":{"rev":"80-43d6a81c184c06d73e692358e913821e"}}, -{"id":"vows-bdd","key":"vows-bdd","value":{"rev":"3-dc2a7013dd94b0b65a3ed3a8b69b680e"}}, -{"id":"vows-ext","key":"vows-ext","value":{"rev":"49-079067a01a681ca7df4dfaae74adb3fb"}}, -{"id":"vows-fluent","key":"vows-fluent","value":{"rev":"23-67625a035cedf90c8fed73722465ecea"}}, -{"id":"vows-is","key":"vows-is","value":{"rev":"68-45a13df422d08ab00cc8f785b6411741"}}, -{"id":"voyeur","key":"voyeur","value":{"rev":"5-56fe23f95df6ff648b67f1a9baf10d41"}}, -{"id":"vws.pubsub","key":"vws.pubsub","value":{"rev":"5-609497d66ab6a76c5201904e41b95715"}}, -{"id":"wabtools","key":"wabtools","value":{"rev":"7-b24cd7262720a29f59da103b7110325d"}}, -{"id":"wadey-ranger","key":"wadey-ranger","value":{"rev":"17-a0541bad0880ffc199e8b2ef4c80ddb8"}}, -{"id":"wagner","key":"wagner","value":{"rev":"3-4b76219928f409b7124e02c0518d6cb6"}}, -{"id":"wait","key":"wait","value":{"rev":"3-7f8a5f9c8e86da4f219353ae778868a9"}}, -{"id":"waiter","key":"waiter","value":{"rev":"5-680176b06719c9a8499725b0a617cdc9"}}, -{"id":"waitlist","key":"waitlist","value":{"rev":"17-f3b2a4cf58b940c3839debda23c12b8e"}}, -{"id":"wake_on_lan","key":"wake_on_lan","value":{"rev":"6-1295bb5c618495b74626aaaa1c644d32"}}, -{"id":"walk","key":"walk","value":{"rev":"22-c05e1e1252a59b1048a0b6464631d08b"}}, -{"id":"walker","key":"walker","value":{"rev":"18-e8a20efc286234fb20789dc68cd04cd1"}}, -{"id":"warp","key":"warp","value":{"rev":"19-c7f17d40291984cd27f1d57fe764a5d2"}}, -{"id":"watch","key":"watch","value":{"rev":"18-3bc43d36ea1dbf69b93d4ea3d9534d44"}}, -{"id":"watch-less","key":"watch-less","value":{"rev":"5-f69a778ee58c681ad3b24a766576c016"}}, -{"id":"watch-tree","key":"watch-tree","value":{"rev":"5-316b60e474c3ae6e97f7cdb06b65af78"}}, -{"id":"watch.js","key":"watch.js","value":{"rev":"11-8c02c7429f90ca5e756a131d85bd5a32"}}, -{"id":"watch_dir","key":"watch_dir","value":{"rev":"5-df0a592508e1e13f5d24c2863733a8b9"}}, -{"id":"watchable","key":"watchable","value":{"rev":"3-f8694ff0c3add9a1310f0980e24ea23b"}}, -{"id":"watchersto","key":"watchersto","value":{"rev":"5-06665e682f58f61831d41d08b4ea12e7"}}, -{"id":"watchman","key":"watchman","value":{"rev":"11-956ad2175d0c5b52e82988a697474244"}}, -{"id":"watchn","key":"watchn","value":{"rev":"15-9685afa8b501f8cd7e068beed1264cfe"}}, -{"id":"wave","key":"wave","value":{"rev":"7-d13054ac592b3b4f81147b6bc7a91ea1"}}, -{"id":"wax","key":"wax","value":{"rev":"71-2e8877b0b6df27c1375dcd7f6bbdb4b7"}}, -{"id":"waz-storage-js","key":"waz-storage-js","value":{"rev":"15-1aaa07353c3d25f5794fa004a23c4dfa"}}, -{"id":"wd","key":"wd","value":{"rev":"19-20c4ee8b83057ece691f9669e288059e"}}, -{"id":"weak","key":"weak","value":{"rev":"3-b774b8be74f33c843df631aa07854104"}}, -{"id":"web","key":"web","value":{"rev":"3-c571dee306020f6f92c7a3150e8023b1"}}, -{"id":"webapp","key":"webapp","value":{"rev":"5-60525be5734cf1d02a77508e5f46bafa"}}, -{"id":"webfonts","key":"webfonts","value":{"rev":"5-d7be242801702fd1eb728385b8982107"}}, -{"id":"webgenjs","key":"webgenjs","value":{"rev":"3-ac6be47eedcbb2561babdb9495d60f29"}}, -{"id":"webgl","key":"webgl","value":{"rev":"18-21cd40f6c7e4943a2d858ed813d3c45d"}}, -{"id":"webhookit-comment","key":"webhookit-comment","value":{"rev":"5-1fbed3d75bf485433bdcac4fac625eab"}}, -{"id":"webhookit-ejs","key":"webhookit-ejs","value":{"rev":"5-9b76f543e9c0941d0245cb3bfd2cc64e"}}, -{"id":"webhookit-email","key":"webhookit-email","value":{"rev":"5-d472fde4f101d55d029a29777bbdb952"}}, -{"id":"webhookit-http","key":"webhookit-http","value":{"rev":"13-9f6f05cdb03f45a2227b9cd820565e63"}}, -{"id":"webhookit-jsonparse","key":"webhookit-jsonparse","value":{"rev":"3-6d49bf8a9849130d9bbc5b0d6fb0bf67"}}, -{"id":"webhookit-jsonpath","key":"webhookit-jsonpath","value":{"rev":"5-7acaf50267274584dca1cc5c1e77ce2e"}}, -{"id":"webhookit-objectbuilder","key":"webhookit-objectbuilder","value":{"rev":"5-e63fb26621929f3ab8d8519556116b30"}}, -{"id":"webhookit-soupselect","key":"webhookit-soupselect","value":{"rev":"9-726f2f4794437632032058bc81e6ee5d"}}, -{"id":"webhookit-xml2js","key":"webhookit-xml2js","value":{"rev":"3-ec959e474ecb3a163f2991767594a60e"}}, -{"id":"webhookit-yql","key":"webhookit-yql","value":{"rev":"9-c6ae87a8cc55d33901485ee7c3895ef8"}}, -{"id":"webify","key":"webify","value":{"rev":"3-86810874abf2274d1387ee748987b627"}}, -{"id":"webjs","key":"webjs","value":{"rev":"103-593a1e4e69d8db6284ecf4fce01b4668"}}, -{"id":"webmake","key":"webmake","value":{"rev":"13-f6588093a487212a151d1c00c26de7b4"}}, -{"id":"webmetrics","key":"webmetrics","value":{"rev":"3-44a428fd2ecb1b1bf50c33157750dd16"}}, -{"id":"webrepl","key":"webrepl","value":{"rev":"21-d6dcdbb59186092d9a0f1977c69394a5"}}, -{"id":"webservice","key":"webservice","value":{"rev":"18-05038f1cf997cff1ed81e783485680aa"}}, -{"id":"webshell","key":"webshell","value":{"rev":"3-05c431cf961a9dbaee1dfd95237e189a"}}, -{"id":"websocket","key":"websocket","value":{"rev":"33-7c20d55a88f187d7b398525824159f67"}}, -{"id":"websocket-client","key":"websocket-client","value":{"rev":"12-26a3530b9e6d465f472c791db01c9fc3"}}, -{"id":"websocket-protocol","key":"websocket-protocol","value":{"rev":"3-e52a8496f70686c289087149aee8b359"}}, -{"id":"websocket-server","key":"websocket-server","value":{"rev":"46-9f69e2f9408eb196b3a1aa990e5b5ac2"}}, -{"id":"websockets","key":"websockets","value":{"rev":"3-5535fcb4ae144909f021ee067eec7b2a"}}, -{"id":"webworker","key":"webworker","value":{"rev":"16-f7a4c758b176c6e464c93b6a9f79283b"}}, -{"id":"weibo","key":"weibo","value":{"rev":"21-8a50310389b2f43d8a7cb14e138eb122"}}, -{"id":"weld","key":"weld","value":{"rev":"7-16601ac41d79b3a01e4d2615035376ed"}}, -{"id":"whatlang","key":"whatlang","value":{"rev":"5-f7b10a0f8c3b6579c81d1d1222aeccd7"}}, -{"id":"wheat","key":"wheat","value":{"rev":"16-f6a97282f521edb7f2b0e5edc9577ce0"}}, -{"id":"which","key":"which","value":{"rev":"7-e5fdcb208715f2201d3911caf8a67042"}}, -{"id":"whiskers","key":"whiskers","value":{"rev":"9-2cfd73cebeaf8ce3cb1591e825380621"}}, -{"id":"whiskey","key":"whiskey","value":{"rev":"49-55367718b9067ff2bcb7fbb89327587b"}}, -{"id":"whisperjs","key":"whisperjs","value":{"rev":"19-e2182c72ea24b8c40e12b0c1027eb60d"}}, -{"id":"wikimapia","key":"wikimapia","value":{"rev":"11-8d1a314e8c827236e21e0aabc6e5efd9"}}, -{"id":"wikiminute","key":"wikiminute","value":{"rev":"11-d031a2c7d41bcecb52ac9c7bb5e75e8e"}}, -{"id":"wikiwym","key":"wikiwym","value":{"rev":"3-c0fd4c9b6b93b3a8b14021c2ebae5b0c"}}, -{"id":"wiky","key":"wiky","value":{"rev":"6-be49acce152652e9219a32da1dfd01ea"}}, -{"id":"wildfile","key":"wildfile","value":{"rev":"9-16a05032f890f07c72a5f48c3a6ffbc0"}}, -{"id":"willful.js","key":"willful.js","value":{"rev":"3-3bb957b0a5fc1b4b6c15bace7e8f5902"}}, -{"id":"wilson","key":"wilson","value":{"rev":"14-d4bf88484f1b1cf86b07f4b74f26991d"}}, -{"id":"window","key":"window","value":{"rev":"3-ea84e74fd5556ff662ff47f40522cfa2"}}, -{"id":"windshaft","key":"windshaft","value":{"rev":"21-1d31e4eb7482d15b97c919a4b051ea9c"}}, -{"id":"windtunnel","key":"windtunnel","value":{"rev":"5-0d2ef7faed1b221a3eaa581480adad64"}}, -{"id":"wingrr","key":"wingrr","value":{"rev":"9-a599fad3e0c74895aa266c61805b76cb"}}, -{"id":"wings","key":"wings","value":{"rev":"3-cfcfd262d905cd3be1d1bae82fafd9f0"}}, -{"id":"winston","key":"winston","value":{"rev":"111-13acba5a9ba6d4f19469acb4122d72ea"}}, -{"id":"winston-amqp","key":"winston-amqp","value":{"rev":"5-61408e1dde45f974a995dd27905b8831"}}, -{"id":"winston-mongodb","key":"winston-mongodb","value":{"rev":"9-ae755237a8faa8f5a0b92029c236691a"}}, -{"id":"winston-redis","key":"winston-redis","value":{"rev":"3-1fb861edc109ed5cbd735320124ba103"}}, -{"id":"winston-riak","key":"winston-riak","value":{"rev":"15-3f2923a73386524d851244ace1bece98"}}, -{"id":"winston-syslog","key":"winston-syslog","value":{"rev":"9-7f256bd63aebec19edea47f80de21dfd"}}, -{"id":"winstoon","key":"winstoon","value":{"rev":"9-d719ca7abfeeaa468d1b431c24836089"}}, -{"id":"wirez","key":"wirez","value":{"rev":"5-5c5d0768485ed11c2b80a8a6a3699c39"}}, -{"id":"wobot","key":"wobot","value":{"rev":"9-176ed86fd9d94a7e94efb782c7512533"}}, -{"id":"word-generator","key":"word-generator","value":{"rev":"5-a2c67f11474a8925eb67f04369ac068a"}}, -{"id":"wordnik","key":"wordnik","value":{"rev":"3-4e371fbf7063ced50bbe726079fda1ec"}}, -{"id":"wordpress-auth","key":"wordpress-auth","value":{"rev":"5-05eef01542e00a88418d2885efb4c9ad"}}, -{"id":"wordwrap","key":"wordwrap","value":{"rev":"5-a728ce2cdeab69b71d40fe7c1c41d7c1"}}, -{"id":"wordy","key":"wordy","value":{"rev":"3-bc220ca3dbd008aee932c551cfbdcc6b"}}, -{"id":"worker","key":"worker","value":{"rev":"6-3b03aa764c9fac66ec5c1773e9abc43b"}}, -{"id":"worker-pool","key":"worker-pool","value":{"rev":"3-e3550e704b48f5799a4cc02af7d27355"}}, -{"id":"workflow","key":"workflow","value":{"rev":"3-817c6c77cbb2f332ea9bdddf3b565c00"}}, -{"id":"workhorse","key":"workhorse","value":{"rev":"30-c39ae2ddd867a137073a289c1709f229"}}, -{"id":"world-db","key":"world-db","value":{"rev":"6-eaef1beb6abbebd3e903a28a7f46aa81"}}, -{"id":"worm","key":"worm","value":{"rev":"7-00db15dc9cfd48777cce32fb93e1df6b"}}, -{"id":"wormhole","key":"wormhole","value":{"rev":"37-21e2db062666040c477a7042fc2ffc9d"}}, -{"id":"wrap","key":"wrap","value":{"rev":"3-aded14c091b730813bd24d92cae45cd6"}}, -{"id":"wrench","key":"wrench","value":{"rev":"12-57d3da63e34e59e1f5d1b3bde471e31f"}}, -{"id":"wsclient","key":"wsclient","value":{"rev":"17-f962faf4f6c9d4eda9111e90b2d0735d"}}, -{"id":"wscomm","key":"wscomm","value":{"rev":"47-80affda45da523e57c87b8d43ef73ec9"}}, -{"id":"wsscraper","key":"wsscraper","value":{"rev":"3-94a84fe9b3df46b8d6ad4851e389dae1"}}, -{"id":"wu","key":"wu","value":{"rev":"4-f307d3a00e7a1212b7949bcb96161088"}}, -{"id":"wunderapi","key":"wunderapi","value":{"rev":"17-31e3b991e97931022992b97f9441b9af"}}, -{"id":"wurfl-client","key":"wurfl-client","value":{"rev":"3-a8c3e454d6d9c9b23b7290eb64866e80"}}, -{"id":"wwwdude","key":"wwwdude","value":{"rev":"19-eb8192461b8864af59740f9b44e168ca"}}, -{"id":"x","key":"x","value":{"rev":"9-10403358980aba239b7a9af78175589d"}}, -{"id":"x-core","key":"x-core","value":{"rev":"13-f04b063855da231539d1945a35802d9e"}}, -{"id":"x11","key":"x11","value":{"rev":"5-e5b1435c0aa29207c90fdeaa87570bb7"}}, -{"id":"xappy-async_testing","key":"xappy-async_testing","value":{"rev":"3-747c934540267492b0e6d3bb6d65964c"}}, -{"id":"xappy-pg","key":"xappy-pg","value":{"rev":"4-119e8f93af1e4976900441ec5e3bb0b9"}}, -{"id":"xcbjs","key":"xcbjs","value":{"rev":"3-095a693f9ac7b4e2c319f79d95eb3e95"}}, -{"id":"xemplar","key":"xemplar","value":{"rev":"9-2ccde68ffac8e66aa8013b98d82ff20c"}}, -{"id":"xfer","key":"xfer","value":{"rev":"3-c1875506ed132c6a2b5e7d7eaff9df14"}}, -{"id":"xjs","key":"xjs","value":{"rev":"11-05d5cd002298894ed582a9f5bff5a762"}}, -{"id":"xjst","key":"xjst","value":{"rev":"11-68774970fc7f413ff620fb0d50d8a1d9"}}, -{"id":"xkcdbot","key":"xkcdbot","value":{"rev":"3-7cc9affb442c9ae4c7a109a0b72c2600"}}, -{"id":"xml","key":"xml","value":{"rev":"12-0d1a69f11767de47bfc4a0fce566e36e"}}, -{"id":"xml-markup","key":"xml-markup","value":{"rev":"6-100a92d1f7fe9444e285365dce8203de"}}, -{"id":"xml-simple","key":"xml-simple","value":{"rev":"3-d60e388df5b65128a5e000381643dd31"}}, -{"id":"xml-stream","key":"xml-stream","value":{"rev":"13-44d6ee47e00c91735e908e69c5dffc6b"}}, -{"id":"xml2js","key":"xml2js","value":{"rev":"27-434297bcd9db7628c57fcc9bbbe2671e"}}, -{"id":"xml2js-expat","key":"xml2js-expat","value":{"rev":"15-a8c5c0ba64584d07ed94c0a14dc55fe8"}}, -{"id":"xml2json","key":"xml2json","value":{"rev":"17-fa740417285834be1aa4d95e1ed6d9b9"}}, -{"id":"xmlbuilder","key":"xmlbuilder","value":{"rev":"32-63e3be32dda07c6e998866cddd8a879e"}}, -{"id":"xmlhttprequest","key":"xmlhttprequest","value":{"rev":"9-570fba8bfd5b0958c258cee7309c4b54"}}, -{"id":"xmlrpc","key":"xmlrpc","value":{"rev":"15-ae062e34a965e7543d4fd7b6c3f29cb7"}}, -{"id":"xmpp-client","key":"xmpp-client","value":{"rev":"6-2d123b4666b5deda71f071295cfca793"}}, -{"id":"xmpp-muc","key":"xmpp-muc","value":{"rev":"6-d95b8bca67f406a281a27aa4d89f6f46"}}, -{"id":"xmpp-server","key":"xmpp-server","value":{"rev":"9-44374bc3398cc74f2a36ff973fa0d35f"}}, -{"id":"xp","key":"xp","value":{"rev":"7-781a5e1da74332f25c441f627cd0b4ea"}}, -{"id":"xregexp","key":"xregexp","value":{"rev":"3-c34025fdeb13c18389e737a4b3d4ddf7"}}, -{"id":"xsd","key":"xsd","value":{"rev":"5-566590ccb8923453175a3f1f3b6cbf24"}}, -{"id":"ya-csv","key":"ya-csv","value":{"rev":"28-d485b812914b3c3f5d7e9c4bcee0c3ea"}}, -{"id":"yabble","key":"yabble","value":{"rev":"5-5370a53003a122fe40a16ed2b0e5cead"}}, -{"id":"yaconfig","key":"yaconfig","value":{"rev":"3-f82a452260b010cc5128818741c46017"}}, -{"id":"yah","key":"yah","value":{"rev":"3-cfc0c10f85a9e3076247ca350077e90f"}}, -{"id":"yajet","key":"yajet","value":{"rev":"5-6f7f24335436c84081adf0bbb020b151"}}, -{"id":"yajl","key":"yajl","value":{"rev":"3-8ac011e5a00368aad8d58d95a64c7254"}}, -{"id":"yaml","key":"yaml","value":{"rev":"16-732e5cb6dc10eefeb7dae959e677fb5b"}}, -{"id":"yaml-config","key":"yaml-config","value":{"rev":"3-fb817000005d48526a106ecda5ac5435"}}, -{"id":"yamlish","key":"yamlish","value":{"rev":"3-604fb4f1de9d5aa5ed48432c7db4a8a1"}}, -{"id":"yamlparser","key":"yamlparser","value":{"rev":"13-130a82262c7f742c2a1e26fc58983503"}}, -{"id":"yammer-js","key":"yammer-js","value":{"rev":"3-16ec240ab0b26fa9f0513ada8c769c1f"}}, -{"id":"yanc","key":"yanc","value":{"rev":"15-33d713f0dee42efe8306e6b2a43fe336"}}, -{"id":"yanlibs","key":"yanlibs","value":{"rev":"3-e481217d43b9f79b80e22538eabadabc"}}, -{"id":"yanop","key":"yanop","value":{"rev":"5-6c407ce6f1c18b6bac37ad5945ff8fed"}}, -{"id":"yanx","key":"yanx","value":{"rev":"6-f4c4d255526eaa922baa498f37d38fe0"}}, -{"id":"yasession","key":"yasession","value":{"rev":"7-6e2598123d41b33535b88e99eb87828f"}}, -{"id":"yelp","key":"yelp","value":{"rev":"3-5c769f488a65addba313ff3b6256c365"}}, -{"id":"yeti","key":"yeti","value":{"rev":"50-65338f573ed8f799ec9b1c9bd2643e34"}}, -{"id":"youtube","key":"youtube","value":{"rev":"7-5020698499af8946e9578864a21f6ac5"}}, -{"id":"youtube-dl","key":"youtube-dl","value":{"rev":"76-a42f09b7bf87e7e6157d5d9835cca8a7"}}, -{"id":"youtube-js","key":"youtube-js","value":{"rev":"5-e2d798a185490ad98cb57c2641c4658e"}}, -{"id":"yproject","key":"yproject","value":{"rev":"7-70cb1624de9e8321c67f1f348dc80ff4"}}, -{"id":"yql","key":"yql","value":{"rev":"18-d19123b254abfb097648c4a242513fd3"}}, -{"id":"yubico","key":"yubico","value":{"rev":"9-0e2bd84479a68e1f12c89800a4049053"}}, -{"id":"yui-cli","key":"yui-cli","value":{"rev":"7-0186f7278da8734861109799b9123197"}}, -{"id":"yui-compressor","key":"yui-compressor","value":{"rev":"12-5804d78bb24bb2d3555ca2e28ecc6b70"}}, -{"id":"yui-repl","key":"yui-repl","value":{"rev":"25-9b202e835a46a07be931e6529a4ccb61"}}, -{"id":"yui3","key":"yui3","value":{"rev":"93-4decc441f19acf0ab5abd1a81e3cbb40"}}, -{"id":"yui3-2in3","key":"yui3-2in3","value":{"rev":"10-dc0429fe818aceeca80d075613c9547a"}}, -{"id":"yui3-bare","key":"yui3-bare","value":{"rev":"33-60779e2088efe782b437ecc053c01e2f"}}, -{"id":"yui3-base","key":"yui3-base","value":{"rev":"33-89017bb5dfde621fc7d179f2939e3d1b"}}, -{"id":"yui3-core","key":"yui3-core","value":{"rev":"17-3759fa0072e24f4bb29e22144cb3dda3"}}, -{"id":"yui3-gallery","key":"yui3-gallery","value":{"rev":"38-9ce6f7a60b2f815337767249d1827951"}}, -{"id":"yui3-mocha","key":"yui3-mocha","value":{"rev":"3-83ff9c42a37f63de0c132ce6cb1ad282"}}, -{"id":"yuitest","key":"yuitest","value":{"rev":"17-b5dd4ad4e82b6b310d7a6e9103570779"}}, -{"id":"zap","key":"zap","value":{"rev":"15-9b9b7c6badb0a9fd9d469934e9be12c0"}}, -{"id":"zappa","key":"zappa","value":{"rev":"26-d193767b488e778db41455924001b1fb"}}, -{"id":"zen","key":"zen","value":{"rev":"7-23a260d4379816a5c931c2e823bda1ae"}}, -{"id":"zeppelin","key":"zeppelin","value":{"rev":"7-9db2e313fe323749e259be91edcdee8e"}}, -{"id":"zeromq","key":"zeromq","value":{"rev":"24-7cb4cec19fb3a03871900ac3558fcbef"}}, -{"id":"zest","key":"zest","value":{"rev":"5-080a2a69a93d66fcaae0da7ddaa9ceab"}}, -{"id":"zest-js","key":"zest-js","value":{"rev":"5-541454063618fa3a9d6f44e0147ea622"}}, -{"id":"zip","key":"zip","value":{"rev":"11-443da314322b6a1a93b40a38124610f2"}}, -{"id":"zipfile","key":"zipfile","value":{"rev":"32-e846d29fc615e8fbc610f44653a1e085"}}, -{"id":"zipper","key":"zipper","value":{"rev":"5-cde0a4a7f03c139dcd779f3ede55bd0e"}}, -{"id":"zippy","key":"zippy","value":{"rev":"7-3906ca62dd8020e9673a7c229944bd3f"}}, -{"id":"zipwith","key":"zipwith","value":{"rev":"3-58c50c6220d6493047f8333c5db22cc9"}}, -{"id":"zlib","key":"zlib","value":{"rev":"27-e0443f2d9a0c9db31f86a6c5b9ba78ba"}}, -{"id":"zlib-sync","key":"zlib-sync","value":{"rev":"3-b17a39dd23b3455d35ffd862004ed677"}}, -{"id":"zlibcontext","key":"zlibcontext","value":{"rev":"11-1c0c6b34e87adab1b6d5ee60be6a608c"}}, -{"id":"zlibstream","key":"zlibstream","value":{"rev":"5-44e30d87de9aaaa975c64d8dcdcd1a94"}}, -{"id":"zmq","key":"zmq","value":{"rev":"7-eae5d939fcdb7be5edfb328aefeaba4e"}}, -{"id":"zo","key":"zo","value":{"rev":"5-956f084373731805e5871f4716049529"}}, -{"id":"zombie","key":"zombie","value":{"rev":"109-9eec325353a47bfcc32a94719bf147da"}}, -{"id":"zombie-https","key":"zombie-https","value":{"rev":"3-6aff25d319be319343882575acef4890"}}, -{"id":"zoneinfo","key":"zoneinfo","value":{"rev":"15-d95d2041324d961fe26a0217cf485511"}}, -{"id":"zookeeper","key":"zookeeper","value":{"rev":"11-5a5ed278a01e4b508ffa6e9a02059898"}}, -{"id":"zoom","key":"zoom","value":{"rev":"3-9d0277ad580d64c9a4d48a40d22976f0"}}, -{"id":"zsock","key":"zsock","value":{"rev":"16-4f975b91f0f9c2d2a2501e362401c368"}}, -{"id":"zutil","key":"zutil","value":{"rev":"9-3e7bc6520008b4fcd5ee6eb9e8e5adf5"}} -]} diff --git a/node_modules/JSONStream/test/fixtures/couch_sample.json b/node_modules/JSONStream/test/fixtures/couch_sample.json deleted file mode 100644 index b154c861..00000000 --- a/node_modules/JSONStream/test/fixtures/couch_sample.json +++ /dev/null @@ -1,18 +0,0 @@ -{"total_rows":129,"offset":0,"rows":[ - { "id":"change1_0.6995461115147918" - , "key":"change1_0.6995461115147918" - , "value":{"rev":"1-e240bae28c7bb3667f02760f6398d508"} - , "doc":{ - "_id": "change1_0.6995461115147918" - , "_rev": "1-e240bae28c7bb3667f02760f6398d508","hello":1} - }, - { "id":"change2_0.6995461115147918" - , "key":"change2_0.6995461115147918" - , "value":{"rev":"1-13677d36b98c0c075145bb8975105153"} - , "doc":{ - "_id":"change2_0.6995461115147918" - , "_rev":"1-13677d36b98c0c075145bb8975105153" - , "hello":2 - } - }, -]} diff --git a/node_modules/JSONStream/test/fixtures/depth.json b/node_modules/JSONStream/test/fixtures/depth.json deleted file mode 100644 index 868062f3..00000000 --- a/node_modules/JSONStream/test/fixtures/depth.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "total": 5, - "docs": [ - { - "key": { - "value": 0, - "some": "property" - } - }, - {"value": 1}, - {"value": 2}, - {"blbl": [{}, {"a":0, "b":1, "value":3}, 10]}, - {"value": 4} - ] -} \ No newline at end of file diff --git a/node_modules/JSONStream/test/fn.js b/node_modules/JSONStream/test/fn.js deleted file mode 100644 index 4acc6726..00000000 --- a/node_modules/JSONStream/test/fn.js +++ /dev/null @@ -1,39 +0,0 @@ - - -var fs = require ('fs') - , join = require('path').join - , file = join(__dirname, 'fixtures','all_npm.json') - , JSONStream = require('../') - , it = require('it-is') - -function fn (s) { - return !isNaN(parseInt(s, 10)) -} - -var expected = JSON.parse(fs.readFileSync(file)) - , parser = JSONStream.parse(['rows', fn]) - , called = 0 - , ended = false - , parsed = [] - -fs.createReadStream(file).pipe(parser) - -parser.on('data', function (data) { - called ++ - it.has({ - id: it.typeof('string'), - value: {rev: it.typeof('string')}, - key:it.typeof('string') - }) - parsed.push(data) -}) - -parser.on('end', function () { - ended = true -}) - -process.on('exit', function () { - it(called).equal(expected.rows.length) - it(parsed).deepEqual(expected.rows) - console.error('PASSED') -}) diff --git a/node_modules/JSONStream/test/gen.js b/node_modules/JSONStream/test/gen.js deleted file mode 100644 index c233722a..00000000 --- a/node_modules/JSONStream/test/gen.js +++ /dev/null @@ -1,135 +0,0 @@ -return // dont run this test for now since tape is weird and broken on 0.10 - -var fs = require('fs') -var JSONStream = require('../') -var file = process.argv[2] || '/tmp/JSONStream-test-large.json' -var size = Number(process.argv[3] || 100000) -var tape = require('tape') -// if (process.title !== 'browser') { - tape('out of mem', function (t) { - t.plan(1) - ////////////////////////////////////////////////////// - // Produces a random number between arg1 and arg2 - ////////////////////////////////////////////////////// - var randomNumber = function (min, max) { - var number = Math.floor(Math.random() * (max - min + 1) + min); - return number; - }; - - ////////////////////////////////////////////////////// - // Produces a random string of a length between arg1 and arg2 - ////////////////////////////////////////////////////// - var randomString = function (min, max) { - - // add several spaces to increase chanses of creating 'words' - var chars = ' 0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'; - var result = ''; - - var randomLength = randomNumber(min, max); - - for (var i = randomLength; i > 0; --i) { - result += chars[Math.round(Math.random() * (chars.length - 1))]; - } - return result; - }; - - ////////////////////////////////////////////////////// - // Produces a random JSON document, as a string - ////////////////////////////////////////////////////// - var randomJsonDoc = function () { - - var doc = { - "CrashOccurenceID": randomNumber(10000, 50000), - "CrashID": randomNumber(1000, 10000), - "SiteName": randomString(10, 25), - "MachineName": randomString(10, 25), - "Date": randomString(26, 26), - "ProcessDuration": randomString(18, 18), - "ThreadIdentityName": null, - "WindowsIdentityName": randomString(15, 40), - "OperatingSystemName": randomString(35, 65), - "DetailedExceptionInformation": randomString(100, 800) - }; - - doc = JSON.stringify(doc); - doc = doc.replace(/\,/g, ',\n'); // add new lines after each attribute - return doc; - }; - - ////////////////////////////////////////////////////// - // generates test data - ////////////////////////////////////////////////////// - var generateTestData = function (cb) { - - console.log('generating large data file...'); - - var stream = fs.createWriteStream(file, { - encoding: 'utf8' - }); - - var i = 0; - var max = size; - var writing = false - var split = ',\n'; - var doc = randomJsonDoc(); - stream.write('['); - - function write () { - if(writing) return - writing = true - while(++i < max) { - if(Math.random() < 0.001) - console.log('generate..', i + ' / ' + size) - if(!stream.write(doc + split)) { - writing = false - return stream.once('drain', write) - } - } - stream.write(doc + ']') - stream.end(); - console.log('END') - } - write() - stream.on('close', cb) - }; - - ////////////////////////////////////////////////////// - // Shows that parsing 100000 instances using JSONStream fails - // - // After several seconds, you will get this crash - // FATAL ERROR: JS Allocation failed - process out of memory - ////////////////////////////////////////////////////// - var testJSONStreamParse_causesOutOfMem = function (done) { - var items = 0 - console.log('parsing data files using JSONStream...'); - - var parser = JSONStream.parse([true]); - var stream = fs.createReadStream(file); - stream.pipe(parser); - - parser.on('data', function (data) { - items++ - if(Math.random() < 0.01) console.log(items, '...') - }); - - parser.on('end', function () { - t.equal(items, size) - }); - - }; - - ////////////////////////////////////////////////////// - // main - ////////////////////////////////////////////////////// - - fs.stat(file, function (err, stat) { - console.log(stat) - if(err) - generateTestData(testJSONStreamParse_causesOutOfMem); - else - testJSONStreamParse_causesOutOfMem() - }) - - }) - -// } diff --git a/node_modules/JSONStream/test/issues.js b/node_modules/JSONStream/test/issues.js deleted file mode 100644 index ea4c7433..00000000 --- a/node_modules/JSONStream/test/issues.js +++ /dev/null @@ -1,34 +0,0 @@ -var JSONStream = require('../'); -var test = require('tape') - -test('#66', function (t) { - var error = 0; - var stream = JSONStream - .parse() - .on('error', function (err) { - t.ok(err); - error++; - }) - .on('end', function () { - t.ok(error === 1); - t.end(); - }); - - stream.write('["foo":bar['); - stream.end(); - -}); - -test('#81 - failure to parse nested objects', function (t) { - var stream = JSONStream - .parse('.bar.foo') - .on('error', function (err) { - t.error(err); - }) - .on('end', function () { - t.end(); - }); - - stream.write('{"bar":{"foo":"baz"}}'); - stream.end(); -}); diff --git a/node_modules/JSONStream/test/keys.js b/node_modules/JSONStream/test/keys.js deleted file mode 100644 index c60088af..00000000 --- a/node_modules/JSONStream/test/keys.js +++ /dev/null @@ -1,85 +0,0 @@ -var test = require('tape'); -var fs = require ('fs'); -var join = require('path').join; -var couch_sample_file = join(__dirname, 'fixtures','couch_sample.json'); -var JSONStream = require('../'); - -var fixture = { - obj: { - one: 1, - two: 2, - three: 3 - } -}; - -function assertFixtureKeys(stream, t) { - var keys = []; - var values = []; - stream.on('data', function(data) { - keys.push(data.key); - values.push(data.value); - }); - - stream.on('end', function() { - t.deepEqual(keys, ['one', 'two', 'three']); - t.deepEqual(values, [1,2,3]); - t.end(); - }); - stream.write(JSON.stringify(fixture)); - stream.end(); -} - -test('keys via string', function(t) { - var stream = JSONStream.parse('obj.$*'); - assertFixtureKeys(stream, t); -}); - -test('keys via array', function(t) { - var stream = JSONStream.parse(['obj',{emitKey: true}]); - assertFixtureKeys(stream, t); -}); - -test('advanced keys', function(t) { - var advanced = fs.readFileSync(couch_sample_file); - var stream = JSONStream.parse(['rows', true, 'doc', {emitKey: true}]); - - var keys = []; - var values = []; - stream.on('data', function(data) { - keys.push(data.key); - values.push(data.value); - }); - - stream.on('end', function() { - t.deepEqual(keys, [ - '_id', '_rev', 'hello', - '_id', '_rev', 'hello' - ]); - t.deepEqual(values, [ - "change1_0.6995461115147918", "1-e240bae28c7bb3667f02760f6398d508", 1, - "change2_0.6995461115147918", "1-13677d36b98c0c075145bb8975105153", 2 - ]); - t.end(); - }); - stream.write(advanced); - stream.end(); -}); - -test('parent keys', function(t) { - var stream = JSONStream.parse('$*'); - var d = null; - stream.on('data', function(data) { - if(d) t.fail('should only be called once'); - d = data; - }); - - stream.on('end', function() { - t.deepEqual(d,{ - key: 'obj', - value: fixture.obj - }); - t.end(); - }); - stream.write(JSON.stringify(fixture)); - stream.end(); -}) diff --git a/node_modules/JSONStream/test/map.js b/node_modules/JSONStream/test/map.js deleted file mode 100644 index 29b9d896..00000000 --- a/node_modules/JSONStream/test/map.js +++ /dev/null @@ -1,40 +0,0 @@ - -var test = require('tape') - -var JSONStream = require('../') - -test('map function', function (t) { - - var actual = [] - - stream = JSONStream.parse([true], function (e) { return e*10 }) - stream.on('data', function (v) { actual.push(v)}) - stream.on('end', function () { - t.deepEqual(actual, [10,20,30,40,50,60]) - t.end() - - }) - - stream.write(JSON.stringify([1,2,3,4,5,6], null, 2)) - stream.end() - -}) - -test('filter function', function (t) { - - var actual = [] - - stream = JSONStream - .parse([true], function (e) { return e%2 ? e : null}) - .on('data', function (v) { actual.push(v)}) - .on('end', function () { - t.deepEqual(actual, [1,3,5]) - t.end() - - }) - - stream.write(JSON.stringify([1,2,3,4,5,6], null, 2)) - stream.end() - -}) - diff --git a/node_modules/JSONStream/test/multiple_objects.js b/node_modules/JSONStream/test/multiple_objects.js deleted file mode 100644 index 22f63242..00000000 --- a/node_modules/JSONStream/test/multiple_objects.js +++ /dev/null @@ -1,36 +0,0 @@ -var fs = require ('fs'); -var net = require('net'); -var join = require('path').join; -var file = join(__dirname, 'fixtures','all_npm.json'); -var it = require('it-is'); -var JSONStream = require('../'); - -var str = fs.readFileSync(file); - -var datas = {} - -var server = net.createServer(function(client) { - var data_calls = 0; - var parser = JSONStream.parse(['rows', true, 'key']); - parser.on('data', function(data) { - ++ data_calls; - datas[data] = (datas[data] || 0) + 1 - it(data).typeof('string') - }); - - parser.on('end', function() { - console.log('END') - var min = Infinity - for (var d in datas) - min = min > datas[d] ? datas[d] : min - it(min).equal(3); - server.close(); - }); - client.pipe(parser); -}); -server.listen(9999); - -var client = net.connect({ port : 9999 }, function() { - var msgs = str + ' ' + str + '\n\n' + str - client.end(msgs); -}); diff --git a/node_modules/JSONStream/test/multiple_objects_error.js b/node_modules/JSONStream/test/multiple_objects_error.js deleted file mode 100644 index 83d113b7..00000000 --- a/node_modules/JSONStream/test/multiple_objects_error.js +++ /dev/null @@ -1,29 +0,0 @@ -var fs = require ('fs'); -var net = require('net'); -var join = require('path').join; -var file = join(__dirname, 'fixtures','all_npm.json'); -var it = require('it-is'); -var JSONStream = require('../'); - -var str = fs.readFileSync(file); - -var server = net.createServer(function(client) { - var data_calls = 0; - var parser = JSONStream.parse(); - parser.on('error', function(err) { - console.log(err); - server.close(); - }); - - parser.on('end', function() { - console.log('END'); - server.close(); - }); - client.pipe(parser); -}); -server.listen(9999); - -var client = net.connect({ port : 9999 }, function() { - var msgs = str + '}'; - client.end(msgs); -}); diff --git a/node_modules/JSONStream/test/null.js b/node_modules/JSONStream/test/null.js deleted file mode 100644 index 95dd60c0..00000000 --- a/node_modules/JSONStream/test/null.js +++ /dev/null @@ -1,28 +0,0 @@ -var JSONStream = require('../') - -var data = [ - {ID: 1, optional: null}, - {ID: 2, optional: null}, - {ID: 3, optional: 20}, - {ID: 4, optional: null}, - {ID: 5, optional: 'hello'}, - {ID: 6, optional: null} -] - - -var test = require('tape') - -test ('null properties', function (t) { - var actual = [] - var stream = - - JSONStream.parse('*.optional') - .on('data', function (v) { actual.push(v) }) - .on('end', function () { - t.deepEqual(actual, [20, 'hello']) - t.end() - }) - - stream.write(JSON.stringify(data, null, 2)) - stream.end() -}) diff --git a/node_modules/JSONStream/test/parsejson.js b/node_modules/JSONStream/test/parsejson.js deleted file mode 100644 index a9433344..00000000 --- a/node_modules/JSONStream/test/parsejson.js +++ /dev/null @@ -1,25 +0,0 @@ - - -/* - sometimes jsonparse changes numbers slightly. -*/ - -var r = Math.random() - , Parser = require('jsonparse') - , p = new Parser() - , assert = require('assert') - , times = 20 -while (times --) { - - assert.equal(JSON.parse(JSON.stringify(r)), r, 'core JSON') - - p.onValue = function (v) { - console.error('parsed', v) - assert.equal(v,r) - } - console.error('correct', r) - p.write (new Buffer(JSON.stringify([r]))) - - - -} diff --git a/node_modules/JSONStream/test/stringify.js b/node_modules/JSONStream/test/stringify.js deleted file mode 100644 index b6de85ed..00000000 --- a/node_modules/JSONStream/test/stringify.js +++ /dev/null @@ -1,41 +0,0 @@ - -var fs = require ('fs') - , join = require('path').join - , file = join(__dirname, 'fixtures','all_npm.json') - , JSONStream = require('../') - , it = require('it-is').style('colour') - - function randomObj () { - return ( - Math.random () < 0.4 - ? {hello: 'eonuhckmqjk', - whatever: 236515, - lies: true, - nothing: [null], - stuff: [Math.random(),Math.random(),Math.random()] - } - : ['AOREC', 'reoubaor', {ouec: 62642}, [[[], {}, 53]]] - ) - } - -var expected = [] - , stringify = JSONStream.stringify() - , es = require('event-stream') - , stringified = '' - , called = 0 - , count = 10 - , ended = false - -while (count --) - expected.push(randomObj()) - - es.connect( - es.readArray(expected), - stringify, - //JSONStream.parse([/./]), - es.writeArray(function (err, lines) { - - it(JSON.parse(lines.join(''))).deepEqual(expected) - console.error('PASSED') - }) - ) diff --git a/node_modules/JSONStream/test/stringify_object.js b/node_modules/JSONStream/test/stringify_object.js deleted file mode 100644 index 9490115a..00000000 --- a/node_modules/JSONStream/test/stringify_object.js +++ /dev/null @@ -1,47 +0,0 @@ - -var fs = require ('fs') - , join = require('path').join - , file = join(__dirname, 'fixtures','all_npm.json') - , JSONStream = require('../') - , it = require('it-is').style('colour') - , es = require('event-stream') - , pending = 10 - , passed = true - - function randomObj () { - return ( - Math.random () < 0.4 - ? {hello: 'eonuhckmqjk', - whatever: 236515, - lies: true, - nothing: [null], - stuff: [Math.random(),Math.random(),Math.random()] - } - : ['AOREC', 'reoubaor', {ouec: 62642}, [[[], {}, 53]]] - ) - } - -for (var ix = 0; ix < pending; ix++) (function (count) { - var expected = {} - , stringify = JSONStream.stringifyObject() - - es.connect( - stringify, - es.writeArray(function (err, lines) { - it(JSON.parse(lines.join(''))).deepEqual(expected) - if (--pending === 0) { - console.error('PASSED') - } - }) - ) - - while (count --) { - var key = Math.random().toString(16).slice(2) - expected[key] = randomObj() - stringify.write([ key, expected[key] ]) - } - - process.nextTick(function () { - stringify.end() - }) -})(ix) diff --git a/node_modules/JSONStream/test/test.js b/node_modules/JSONStream/test/test.js deleted file mode 100644 index 8ea7c2e1..00000000 --- a/node_modules/JSONStream/test/test.js +++ /dev/null @@ -1,35 +0,0 @@ - - -var fs = require ('fs') - , join = require('path').join - , file = join(__dirname, 'fixtures','all_npm.json') - , JSONStream = require('../') - , it = require('it-is') - -var expected = JSON.parse(fs.readFileSync(file)) - , parser = JSONStream.parse(['rows', /\d+/ /*, 'value'*/]) - , called = 0 - , ended = false - , parsed = [] - -fs.createReadStream(file).pipe(parser) - -parser.on('data', function (data) { - called ++ - it.has({ - id: it.typeof('string'), - value: {rev: it.typeof('string')}, - key:it.typeof('string') - }) - parsed.push(data) -}) - -parser.on('end', function () { - ended = true -}) - -process.on('exit', function () { - it(called).equal(expected.rows.length) - it(parsed).deepEqual(expected.rows) - console.error('PASSED') -}) diff --git a/node_modules/JSONStream/test/test2.js b/node_modules/JSONStream/test/test2.js deleted file mode 100644 index d09df7be..00000000 --- a/node_modules/JSONStream/test/test2.js +++ /dev/null @@ -1,29 +0,0 @@ - - -var fs = require ('fs') - , join = require('path').join - , file = join(__dirname, '..','package.json') - , JSONStream = require('../') - , it = require('it-is') - -var expected = JSON.parse(fs.readFileSync(file)) - , parser = JSONStream.parse([]) - , called = 0 - , ended = false - , parsed = [] - -fs.createReadStream(file).pipe(parser) - -parser.on('data', function (data) { - called ++ - it(data).deepEqual(expected) -}) - -parser.on('end', function () { - ended = true -}) - -process.on('exit', function () { - it(called).equal(1) - console.error('PASSED') -}) \ No newline at end of file diff --git a/node_modules/JSONStream/test/two-ways.js b/node_modules/JSONStream/test/two-ways.js deleted file mode 100644 index 8f3b89c8..00000000 --- a/node_modules/JSONStream/test/two-ways.js +++ /dev/null @@ -1,41 +0,0 @@ - -var fs = require ('fs') - , join = require('path').join - , file = join(__dirname, 'fixtures','all_npm.json') - , JSONStream = require('../') - , it = require('it-is').style('colour') - - function randomObj () { - return ( - Math.random () < 0.4 - ? {hello: 'eonuhckmqjk', - whatever: 236515, - lies: true, - nothing: [null], -// stuff: [Math.random(),Math.random(),Math.random()] - } - : ['AOREC', 'reoubaor', {ouec: 62642}, [[[], {}, 53]]] - ) - } - -var expected = [] - , stringify = JSONStream.stringify() - , es = require('event-stream') - , stringified = '' - , called = 0 - , count = 10 - , ended = false - -while (count --) - expected.push(randomObj()) - - es.connect( - es.readArray(expected), - stringify, - JSONStream.parse([/./]), - es.writeArray(function (err, lines) { - - it(lines).has(expected) - console.error('PASSED') - }) - ) diff --git a/node_modules/abstract-leveldown/.jshintrc b/node_modules/abstract-leveldown/.jshintrc deleted file mode 100644 index ba4514a5..00000000 --- a/node_modules/abstract-leveldown/.jshintrc +++ /dev/null @@ -1,60 +0,0 @@ -{ - "predef": [ ] - , "bitwise": false - , "camelcase": false - , "curly": false - , "eqeqeq": false - , "forin": false - , "immed": false - , "latedef": false - , "newcap": true - , "noarg": true - , "noempty": true - , "nonew": true - , "plusplus": false - , "quotmark": true - , "regexp": false - , "undef": true - , "unused": true - , "strict": false - , "trailing": true - , "maxlen": 120 - , "asi": true - , "boss": true - , "debug": true - , "eqnull": true - , "esnext": true - , "evil": true - , "expr": true - , "funcscope": false - , "globalstrict": false - , "iterator": false - , "lastsemic": true - , "laxbreak": true - , "laxcomma": true - , "loopfunc": true - , "multistr": false - , "onecase": false - , "proto": false - , "regexdash": false - , "scripturl": true - , "smarttabs": false - , "shadow": false - , "sub": true - , "supernew": false - , "validthis": true - , "browser": true - , "couch": false - , "devel": false - , "dojo": false - , "mootools": false - , "node": true - , "nonstandard": true - , "prototypejs": false - , "rhino": false - , "worker": true - , "wsh": false - , "nomen": false - , "onevar": true - , "passfail": false -} \ No newline at end of file diff --git a/node_modules/abstract-leveldown/.npmignore b/node_modules/abstract-leveldown/.npmignore deleted file mode 100644 index 3c3629e6..00000000 --- a/node_modules/abstract-leveldown/.npmignore +++ /dev/null @@ -1 +0,0 @@ -node_modules diff --git a/node_modules/abstract-leveldown/.travis.yml b/node_modules/abstract-leveldown/.travis.yml deleted file mode 100644 index fe3f4eb1..00000000 --- a/node_modules/abstract-leveldown/.travis.yml +++ /dev/null @@ -1,10 +0,0 @@ -language: node_js -node_js: - - 0.8 - - "0.10" -branches: - only: - - master -notifications: - email: - - rod@vagg.org diff --git a/node_modules/abstract-leveldown/CHANGELOG.md b/node_modules/abstract-leveldown/CHANGELOG.md deleted file mode 100644 index 89c90135..00000000 --- a/node_modules/abstract-leveldown/CHANGELOG.md +++ /dev/null @@ -1,18 +0,0 @@ -### 0.11.1 - Nov 15 2013 - * Adjust approximate-size-test.js to account for snappy compression - -### 0.11.0 - Oct 14 2013 - * Introduce _setupIteratorOptions() method to fix options object prior to _iterator() call; makes working with gt/gte/lt/lte options a little easier (@rvagg) - -### 0.10.2 - Sep 6 2013 - - * Refactor duplicated versions of isTypedArray into util.js (@rvagg) - * Refactor duplicated versions of 'NotFound' checks into util.js, fixed too-strict version in get-test.js (@rvagg) - -### 0.10.1 - Aug 29 2013 - - * Relax check for 'Not Found: ' in error message to be case insensitive in get-test.js (@rvagg) - -### 0.10.0 - Aug 19 2013 - - * Added test for gt, gte, lt, lte ranges (@dominictarr) diff --git a/node_modules/abstract-leveldown/CONTRIBUTING.md b/node_modules/abstract-leveldown/CONTRIBUTING.md deleted file mode 100644 index 2641fd0d..00000000 --- a/node_modules/abstract-leveldown/CONTRIBUTING.md +++ /dev/null @@ -1,27 +0,0 @@ -# LevelUP is an OPEN Open Source Project - ------------------------------------------ - -## What? - -Individuals making significant and valuable contributions are given commit-access to the project to contribute as they see fit. This project is more like an open wiki than a standard guarded open source project. - -## Rules - -There are a few basic ground-rules for contributors: - -1. **No `--force` pushes** or modifying the Git history in any way. -1. **Non-master branches** ought to be used for ongoing work. -1. **External API changes and significant modifications** ought to be subject to an **internal pull-request** to solicit feedback from other contributors. -1. Internal pull-requests to solicit feedback are *encouraged* for any other non-trivial contribution but left to the discretion of the contributor. -1. Contributors should attempt to adhere to the prevailing code-style. - -## Releases - -Declaring formal releases remains the prerogative of the project maintainer. - -## Changes to this arrangement - -This is an experiment and feedback is welcome! This document may also be subject to pull-requests or changes by contributors where you believe you have something valuable to add or change. - ------------------------------------------ diff --git a/node_modules/abstract-leveldown/LICENSE.md b/node_modules/abstract-leveldown/LICENSE.md deleted file mode 100644 index 29b95e39..00000000 --- a/node_modules/abstract-leveldown/LICENSE.md +++ /dev/null @@ -1,11 +0,0 @@ -The MIT License (MIT) -===================== - -Copyright (c) 2014 Rod Vagg ---------------------------- - -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/node_modules/abstract-leveldown/README.md b/node_modules/abstract-leveldown/README.md deleted file mode 100644 index cae74f91..00000000 --- a/node_modules/abstract-leveldown/README.md +++ /dev/null @@ -1,159 +0,0 @@ -# Abstract LevelDOWN [![Build Status](https://secure.travis-ci.org/rvagg/abstract-leveldown.png)](http://travis-ci.org/rvagg/abstract-leveldown) - -[![NPM](https://nodei.co/npm/abstract-leveldown.png?downloads=true&downloadRank=true)](https://nodei.co/npm/abstract-leveldown/) -[![NPM](https://nodei.co/npm-dl/abstract-leveldown.png?months=6&height=3)](https://nodei.co/npm/abstract-leveldown/) - -An abstract prototype matching the **[LevelDOWN](https://github.com/rvagg/node-leveldown/)** API. Useful for extending **[LevelUP](https://github.com/rvagg/node-levelup)** functionality by providing a replacement to LevelDOWN. - -As of version 0.7, LevelUP allows you to pass a `'db'` option when you create a new instance. This will override the default LevelDOWN store with a LevelDOWN API compatible object. - -**Abstract LevelDOWN** provides a simple, operational *noop* base prototype that's ready for extending. By default, all operations have sensible "noops" (operations that essentially do nothing). For example, simple operations such as `.open(callback)` and `.close(callback)` will simply invoke the callback (on a *next tick*). More complex operations perform sensible actions, for example: `.get(key, callback)` will always return a `'NotFound'` `Error` on the callback. - -You add functionality by implementing the underscore versions of the operations. For example, to implement a `put()` operation you add a `_put()` method to your object. Each of these underscore methods override the default *noop* operations and are always provided with **consistent arguments**, regardless of what is passed in by the client. - -Additionally, all methods provide argument checking and sensible defaults for optional arguments. All bad-argument errors are compatible with LevelDOWN (they pass the LevelDOWN method arguments tests). For example, if you call `.open()` without a callback argument you'll get an `Error('open() requires a callback argument')`. Where optional arguments are involved, your underscore methods will receive sensible defaults. A `.get(key, callback)` will pass through to a `._get(key, options, callback)` where the `options` argument is an empty object. - -## Example - -A simplistic in-memory LevelDOWN replacement - -```js -var util = require('util') - , AbstractLevelDOWN = require('./').AbstractLevelDOWN - -// constructor, passes through the 'location' argument to the AbstractLevelDOWN constructor -function FakeLevelDOWN (location) { - AbstractLevelDOWN.call(this, location) -} - -// our new prototype inherits from AbstractLevelDOWN -util.inherits(FakeLevelDOWN, AbstractLevelDOWN) - -// implement some methods - -FakeLevelDOWN.prototype._open = function (options, callback) { - // initialise a memory storage object - this._store = {} - // optional use of nextTick to be a nice async citizen - process.nextTick(function () { callback(null, this) }.bind(this)) -} - -FakeLevelDOWN.prototype._put = function (key, value, options, callback) { - key = '_' + key // safety, to avoid key='__proto__'-type skullduggery - this._store[key] = value - process.nextTick(callback) -} - -FakeLevelDOWN.prototype._get = function (key, options, callback) { - var value = this._store['_' + key] - if (value === undefined) { - // 'NotFound' error, consistent with LevelDOWN API - return process.nextTick(function () { callback(new Error('NotFound')) }) - } - process.nextTick(function () { - callback(null, value) - }) -} - -FakeLevelDOWN.prototype._del = function (key, options, callback) { - delete this._store['_' + key] - process.nextTick(callback) -} - -// now use it in LevelUP - -var levelup = require('levelup') - -var db = levelup('/who/cares/', { - // the 'db' option replaces LevelDOWN - db: function (location) { return new FakeLevelDOWN(location) } -}) - -db.put('foo', 'bar', function (err) { - if (err) throw err - db.get('foo', function (err, value) { - if (err) throw err - console.log('Got foo =', value) - }) -}) -``` - -See [MemDOWN](https://github.com/rvagg/memdown/) if you are looking for a complete in-memory replacement for LevelDOWN. - -## Extensible API - -Remember that each of these methods, if you implement them, will receive exactly the number and order of arguments described. Optional arguments will be converted to sensible defaults. - -### AbstractLevelDOWN(location) -### AbstractLevelDOWN#_open(options, callback) -### AbstractLevelDOWN#_close(callback) -### AbstractLevelDOWN#_get(key, options, callback) -### AbstractLevelDOWN#_put(key, value, options, callback) -### AbstractLevelDOWN#_del(key, options, callback) -### AbstractLevelDOWN#_batch(array, options, callback) - -If `batch()` is called without argument or with only an options object then it should return a `Batch` object with chainable methods. Otherwise it will invoke a classic batch operation. - -### AbstractLevelDOWN#_chainedBatch() - -By default an `batch()` operation without argument returns a blank `AbstractChainedBatch` object. The prototype is available on the main exports for you to extend. If you want to implement chainable batch operations then you should extend the `AbstractChaindBatch` and return your object in the `_chainedBatch()` method. - -### AbstractLevelDOWN#_approximateSize(start, end, callback) -### AbstractLevelDOWN#_iterator(options) - -By default an `iterator()` operation returns a blank `AbstractIterator` object. The prototype is available on the main exports for you to extend. If you want to implement iterator operations then you should extend the `AbstractIterator` and return your object in the `_iterator(options)` method. - -`AbstractIterator` implements the basic state management found in LevelDOWN. It keeps track of when a `next()` is in progress and when an `end()` has been called so it doesn't allow concurrent `next()` calls, it does it allow `end()` while a `next()` is in progress and it doesn't allow either `next()` or `end()` after `end()` has been called. - -### AbstractIterator(db) - -Provided with the current instance of `AbstractLevelDOWN` by default. - -### AbstractIterator#_next(callback) -### AbstractIterator#_end(callback) - -### AbstractChainedBatch -Provided with the current instance of `AbstractLevelDOWN` by default. - -### AbstractChainedBatch#_put(key, value) -### AbstractChainedBatch#_del(key) -### AbstractChainedBatch#_clear() -### AbstractChainedBatch#_write(options, callback) - - -Contributing ------------- - -Abstract LevelDOWN is an **OPEN Open Source Project**. This means that: - -> Individuals making significant and valuable contributions are given commit-access to the project to contribute as they see fit. This project is more like an open wiki than a standard guarded open source project. - -See the [CONTRIBUTING.md](https://github.com/rvagg/node-levelup/blob/master/CONTRIBUTING.md) file for more details. - -### Contributors - -Abstract LevelDOWN is only possible due to the excellent work of the following contributors: - - - - - - - - - - - - - - - -
Rod VaggGitHub/rvaggTwitter/@rvagg
John ChesleyGitHub/cheslesTwitter/@chesles
Jake VerbatenGitHub/raynosTwitter/@raynos2
Dominic TarrGitHub/dominictarrTwitter/@dominictarr
Max OgdenGitHub/maxogdenTwitter/@maxogden
Lars-Magnus SkogGitHub/ralphtheninjaTwitter/@ralphtheninja
David BjörklundGitHub/keslaTwitter/@david_bjorklund
Julian GruberGitHub/juliangruberTwitter/@juliangruber
Paolo FragomeniGitHub/hij1nxTwitter/@hij1nx
Anton WhalleyGitHub/No9Twitter/@antonwhalley
Matteo CollinaGitHub/mcollinaTwitter/@matteocollina
Pedro TeixeiraGitHub/pgteTwitter/@pgte
James HallidayGitHub/substackTwitter/@substack
- - -License & copyright -------------------- - -Copyright (c) 2012-2014 Abstract LevelDOWN contributors (listed above). - -Abstract LevelDOWN is licensed under the MIT license. All rights not explicitly granted in the MIT license are reserved. See the included LICENSE.md file for more details. diff --git a/node_modules/abstract-leveldown/abstract-chained-batch.js b/node_modules/abstract-leveldown/abstract-chained-batch.js deleted file mode 100644 index 7e480599..00000000 --- a/node_modules/abstract-leveldown/abstract-chained-batch.js +++ /dev/null @@ -1,81 +0,0 @@ -/* Copyright (c) 2013 Rod Vagg, MIT License */ - -function AbstractChainedBatch (db) { - this._db = db - this._operations = [] - this._written = false -} - -AbstractChainedBatch.prototype._checkWritten = function () { - if (this._written) - throw new Error('write() already called on this batch') -} - -AbstractChainedBatch.prototype.put = function (key, value) { - this._checkWritten() - - var err = this._db._checkKeyValue(key, 'key', this._db._isBuffer) - if (err) throw err - err = this._db._checkKeyValue(value, 'value', this._db._isBuffer) - if (err) throw err - - if (!this._db._isBuffer(key)) key = String(key) - if (!this._db._isBuffer(value)) value = String(value) - - if (typeof this._put == 'function' ) - this._put(key, value) - else - this._operations.push({ type: 'put', key: key, value: value }) - - return this -} - -AbstractChainedBatch.prototype.del = function (key) { - this._checkWritten() - - var err = this._db._checkKeyValue(key, 'key', this._db._isBuffer) - if (err) throw err - - if (!this._db._isBuffer(key)) key = String(key) - - if (typeof this._del == 'function' ) - this._del(key) - else - this._operations.push({ type: 'del', key: key }) - - return this -} - -AbstractChainedBatch.prototype.clear = function () { - this._checkWritten() - - this._operations = [] - - if (typeof this._clear == 'function' ) - this._clear() - - return this -} - -AbstractChainedBatch.prototype.write = function (options, callback) { - this._checkWritten() - - if (typeof options == 'function') - callback = options - if (typeof callback != 'function') - throw new Error('write() requires a callback argument') - if (typeof options != 'object') - options = {} - - this._written = true - - if (typeof this._write == 'function' ) - return this._write(callback) - - if (typeof this._db._batch == 'function') - return this._db._batch(this._operations, options, callback) - - process.nextTick(callback) -} - -module.exports = AbstractChainedBatch \ No newline at end of file diff --git a/node_modules/abstract-leveldown/abstract-iterator.js b/node_modules/abstract-leveldown/abstract-iterator.js deleted file mode 100644 index 04ed6a56..00000000 --- a/node_modules/abstract-leveldown/abstract-iterator.js +++ /dev/null @@ -1,49 +0,0 @@ -/* Copyright (c) 2013 Rod Vagg, MIT License */ - -function AbstractIterator (db) { - this.db = db - this._ended = false - this._nexting = false -} - -AbstractIterator.prototype.next = function (callback) { - var self = this - - if (typeof callback != 'function') - throw new Error('next() requires a callback argument') - - if (self._ended) - return callback(new Error('cannot call next() after end()')) - if (self._nexting) - return callback(new Error('cannot call next() before previous next() has completed')) - - self._nexting = true - if (typeof self._next == 'function') { - return self._next(function () { - self._nexting = false - callback.apply(null, arguments) - }) - } - - process.nextTick(function () { - self._nexting = false - callback() - }) -} - -AbstractIterator.prototype.end = function (callback) { - if (typeof callback != 'function') - throw new Error('end() requires a callback argument') - - if (this._ended) - return callback(new Error('end() already called on iterator')) - - this._ended = true - - if (typeof this._end == 'function') - return this._end(callback) - - process.nextTick(callback) -} - -module.exports = AbstractIterator diff --git a/node_modules/abstract-leveldown/abstract-leveldown.js b/node_modules/abstract-leveldown/abstract-leveldown.js deleted file mode 100644 index 400a4aca..00000000 --- a/node_modules/abstract-leveldown/abstract-leveldown.js +++ /dev/null @@ -1,256 +0,0 @@ -/* Copyright (c) 2013 Rod Vagg, MIT License */ - -var xtend = require('xtend') - , AbstractIterator = require('./abstract-iterator') - , AbstractChainedBatch = require('./abstract-chained-batch') - -function AbstractLevelDOWN (location) { - if (!arguments.length || location === undefined) - throw new Error('constructor requires at least a location argument') - - if (typeof location != 'string') - throw new Error('constructor requires a location string argument') - - this.location = location -} - -AbstractLevelDOWN.prototype.open = function (options, callback) { - if (typeof options == 'function') - callback = options - - if (typeof callback != 'function') - throw new Error('open() requires a callback argument') - - if (typeof options != 'object') - options = {} - - if (typeof this._open == 'function') - return this._open(options, callback) - - process.nextTick(callback) -} - -AbstractLevelDOWN.prototype.close = function (callback) { - if (typeof callback != 'function') - throw new Error('close() requires a callback argument') - - if (typeof this._close == 'function') - return this._close(callback) - - process.nextTick(callback) -} - -AbstractLevelDOWN.prototype.get = function (key, options, callback) { - var err - - if (typeof options == 'function') - callback = options - - if (typeof callback != 'function') - throw new Error('get() requires a callback argument') - - if (err = this._checkKeyValue(key, 'key', this._isBuffer)) - return callback(err) - - if (!this._isBuffer(key)) - key = String(key) - - if (typeof options != 'object') - options = {} - - if (typeof this._get == 'function') - return this._get(key, options, callback) - - process.nextTick(function () { callback(new Error('NotFound')) }) -} - -AbstractLevelDOWN.prototype.put = function (key, value, options, callback) { - var err - - if (typeof options == 'function') - callback = options - - if (typeof callback != 'function') - throw new Error('put() requires a callback argument') - - if (err = this._checkKeyValue(key, 'key', this._isBuffer)) - return callback(err) - - if (err = this._checkKeyValue(value, 'value', this._isBuffer)) - return callback(err) - - if (!this._isBuffer(key)) - key = String(key) - - // coerce value to string in node, don't touch it in browser - // (indexeddb can store any JS type) - if (!this._isBuffer(value) && !process.browser) - value = String(value) - - if (typeof options != 'object') - options = {} - - if (typeof this._put == 'function') - return this._put(key, value, options, callback) - - process.nextTick(callback) -} - -AbstractLevelDOWN.prototype.del = function (key, options, callback) { - var err - - if (typeof options == 'function') - callback = options - - if (typeof callback != 'function') - throw new Error('del() requires a callback argument') - - if (err = this._checkKeyValue(key, 'key', this._isBuffer)) - return callback(err) - - if (!this._isBuffer(key)) - key = String(key) - - if (typeof options != 'object') - options = {} - - if (typeof this._del == 'function') - return this._del(key, options, callback) - - process.nextTick(callback) -} - -AbstractLevelDOWN.prototype.batch = function (array, options, callback) { - if (!arguments.length) - return this._chainedBatch() - - if (typeof options == 'function') - callback = options - - if (typeof callback != 'function') - throw new Error('batch(array) requires a callback argument') - - if (!Array.isArray(array)) - return callback(new Error('batch(array) requires an array argument')) - - if (typeof options != 'object') - options = {} - - var i = 0 - , l = array.length - , e - , err - - for (; i < l; i++) { - e = array[i] - if (typeof e != 'object') - continue - - if (err = this._checkKeyValue(e.type, 'type', this._isBuffer)) - return callback(err) - - if (err = this._checkKeyValue(e.key, 'key', this._isBuffer)) - return callback(err) - - if (e.type == 'put') { - if (err = this._checkKeyValue(e.value, 'value', this._isBuffer)) - return callback(err) - } - } - - if (typeof this._batch == 'function') - return this._batch(array, options, callback) - - process.nextTick(callback) -} - -//TODO: remove from here, not a necessary primitive -AbstractLevelDOWN.prototype.approximateSize = function (start, end, callback) { - if ( start == null - || end == null - || typeof start == 'function' - || typeof end == 'function') { - throw new Error('approximateSize() requires valid `start`, `end` and `callback` arguments') - } - - if (typeof callback != 'function') - throw new Error('approximateSize() requires a callback argument') - - if (!this._isBuffer(start)) - start = String(start) - - if (!this._isBuffer(end)) - end = String(end) - - if (typeof this._approximateSize == 'function') - return this._approximateSize(start, end, callback) - - process.nextTick(function () { - callback(null, 0) - }) -} - -AbstractLevelDOWN.prototype._setupIteratorOptions = function (options) { - var self = this - - options = xtend(options) - - ;[ 'start', 'end', 'gt', 'gte', 'lt', 'lte' ].forEach(function (o) { - if (options[o] && self._isBuffer(options[o]) && options[o].length === 0) - delete options[o] - }) - - options.reverse = !!options.reverse - - // fix `start` so it takes into account gt, gte, lt, lte as appropriate - if (options.reverse && options.lt) - options.start = options.lt - if (options.reverse && options.lte) - options.start = options.lte - if (!options.reverse && options.gt) - options.start = options.gt - if (!options.reverse && options.gte) - options.start = options.gte - - if ((options.reverse && options.lt && !options.lte) - || (!options.reverse && options.gt && !options.gte)) - options.exclusiveStart = true // start should *not* include matching key - - return options -} - -AbstractLevelDOWN.prototype.iterator = function (options) { - if (typeof options != 'object') - options = {} - - options = this._setupIteratorOptions(options) - - if (typeof this._iterator == 'function') - return this._iterator(options) - - return new AbstractIterator(this) -} - -AbstractLevelDOWN.prototype._chainedBatch = function () { - return new AbstractChainedBatch(this) -} - -AbstractLevelDOWN.prototype._isBuffer = function (obj) { - return Buffer.isBuffer(obj) -} - -AbstractLevelDOWN.prototype._checkKeyValue = function (obj, type) { - - if (obj === null || obj === undefined) - return new Error(type + ' cannot be `null` or `undefined`') - - if (this._isBuffer(obj)) { - if (obj.length === 0) - return new Error(type + ' cannot be an empty Buffer') - } else if (String(obj) === '') - return new Error(type + ' cannot be an empty String') -} - -module.exports.AbstractLevelDOWN = AbstractLevelDOWN -module.exports.AbstractIterator = AbstractIterator -module.exports.AbstractChainedBatch = AbstractChainedBatch diff --git a/node_modules/abstract-leveldown/abstract/approximate-size-test.js b/node_modules/abstract-leveldown/abstract/approximate-size-test.js deleted file mode 100644 index b67d4287..00000000 --- a/node_modules/abstract-leveldown/abstract/approximate-size-test.js +++ /dev/null @@ -1,121 +0,0 @@ -var db - -module.exports.setUp = function (leveldown, test, testCommon) { - test('setUp common', testCommon.setUp) - test('setUp db', function (t) { - db = leveldown(testCommon.location()) - db.open(t.end.bind(t)) - }) -} - -module.exports.args = function (test) { - test('test argument-less approximateSize() throws', function (t) { - t.throws( - db.approximateSize.bind(db) - , { name: 'Error', message: 'approximateSize() requires valid `start`, `end` and `callback` arguments' } - , 'no-arg approximateSize() throws' - ) - t.end() - }) - - test('test callback-less, 1-arg, approximateSize() throws', function (t) { - t.throws( - db.approximateSize.bind(db, 'foo') - , { name: 'Error', message: 'approximateSize() requires valid `start`, `end` and `callback` arguments' } - , 'callback-less, 1-arg approximateSize() throws' - ) - t.end() - }) - - test('test callback-less, 2-arg, approximateSize() throws', function (t) { - t.throws( - db.approximateSize.bind(db, 'foo', 'bar') - , { name: 'Error', message: 'approximateSize() requires a callback argument' } - , 'callback-less, 2-arg approximateSize() throws' - ) - t.end() - }) - - test('test callback-less, 3-arg, approximateSize() throws', function (t) { - t.throws( - db.approximateSize.bind(db, function () {}) - , { name: 'Error', message: 'approximateSize() requires valid `start`, `end` and `callback` arguments' } - , 'callback-only approximateSize() throws' - ) - t.end() - }) - - test('test callback-only approximateSize() throws', function (t) { - t.throws( - db.approximateSize.bind(db, function () {}) - , { name: 'Error', message: 'approximateSize() requires valid `start`, `end` and `callback` arguments' } - , 'callback-only approximateSize() throws' - ) - t.end() - }) - - test('test 1-arg + callback approximateSize() throws', function (t) { - t.throws( - db.approximateSize.bind(db, 'foo', function () {}) - , { name: 'Error', message: 'approximateSize() requires valid `start`, `end` and `callback` arguments' } - , '1-arg + callback approximateSize() throws' - ) - t.end() - }) -} - -module.exports.approximateSize = function (test) { - test('test approximateSize()', function (t) { - var data = Array.apply(null, Array(10000)).map(function () { - return 'aaaaaaaaaa' - }).join('') - - db.batch( - Array.apply(null, Array(10)).map(function (x, i) { - return { type: 'put', key: 'foo' + i, value: data } - }) - , function (err) { - t.notOk(err, 'no error') - - // cycle open/close to ensure a pack to .sst - - db.close(function (err) { - t.notOk(err, 'no error') - - db.open(function (err) { - t.notOk(err, 'no error') - - db.approximateSize('!', '~', function (err, size) { - t.notOk(err, 'no error') - - t.type(size, 'number') - t.ok( - size > 40000 // account for snappy compression - // original would be ~100000 - , 'size reports a reasonable amount (' + size + ')' - ) - - db.close(function (err) { - t.notOk(err, 'no error') - t.end() - }) - }) - }) - }) - } - ) - }) -} - -module.exports.tearDown = function (test, testCommon) { - test('tearDown', function (t) { - db.close(testCommon.tearDown.bind(null, t)) - }) -} - -module.exports.all = function (leveldown, test, testCommon) { - module.exports.setUp(leveldown, test, testCommon) - module.exports.args(test) - module.exports.approximateSize(test) - module.exports.tearDown(test, testCommon) -} diff --git a/node_modules/abstract-leveldown/abstract/batch-test.js b/node_modules/abstract-leveldown/abstract/batch-test.js deleted file mode 100644 index 45858409..00000000 --- a/node_modules/abstract-leveldown/abstract/batch-test.js +++ /dev/null @@ -1,144 +0,0 @@ -var db - , verifyNotFoundError = require('./util').verifyNotFoundError - , isTypedArray = require('./util').isTypedArray - -module.exports.setUp = function (leveldown, test, testCommon) { - test('setUp common', testCommon.setUp) - test('setUp db', function (t) { - db = leveldown(testCommon.location()) - db.open(t.end.bind(t)) - }) -} - -module.exports.args = function (test) { - test('test callback-less, 2-arg, batch() throws', function (t) { - t.throws(db.batch.bind(db, 'foo', {}), 'callback-less, 2-arg batch() throws') - t.end() - }) - - test('test batch() with missing `value`', function (t) { - db.batch([{ type: 'put', key: 'foo1' }], function (err) { - t.equal(err.message, 'value cannot be `null` or `undefined`', 'correct error message') - t.end() - }) - }) - - test('test batch() with null `value`', function (t) { - db.batch([{ type: 'put', key: 'foo1', value: null }], function (err) { - t.equal(err.message, 'value cannot be `null` or `undefined`', 'correct error message') - t.end() - }) - }) - - test('test batch() with missing `key`', function (t) { - db.batch([{ type: 'put', value: 'foo1' }], function (err) { - t.equal(err.message, 'key cannot be `null` or `undefined`', 'correct error message') - t.end() - }) - }) - - test('test batch() with null `key`', function (t) { - db.batch([{ type: 'put', key: null, value: 'foo1' }], function (err) { - t.equal(err.message, 'key cannot be `null` or `undefined`', 'correct error message') - t.end() - }) - }) - - test('test batch() with missing `key` and `value`', function (t) { - db.batch([{ type: 'put' }], function (err) { - t.equal(err.message, 'key cannot be `null` or `undefined`', 'correct error message') - t.end() - }) - }) -} - -module.exports.batch = function (test) { - test('test batch() with empty array', function (t) { - db.batch([], function (err) { - t.notOk(err, 'no error') - t.end() - }) - }) - - test('test simple batch()', function (t) { - db.batch([{ type: 'put', key: 'foo', value: 'bar' }], function (err) { - t.notOk(err, 'no error') - - db.get('foo', function (err, value) { - t.notOk(err, 'no error') - var result - if (isTypedArray(value)) { - result = String.fromCharCode.apply(null, new Uint16Array(value)) - } else { - t.ok(typeof Buffer != 'undefined' && value instanceof Buffer) - result = value.toString() - } - t.equal(result, 'bar') - t.end() - }) - }) - }) - - test('test multiple batch()', function (t) { - db.batch([ - { type: 'put', key: 'foobatch1', value: 'bar1' } - , { type: 'put', key: 'foobatch2', value: 'bar2' } - , { type: 'put', key: 'foobatch3', value: 'bar3' } - , { type: 'del', key: 'foobatch2' } - ], function (err) { - t.notOk(err, 'no error') - - var r = 0 - , done = function () { - if (++r == 3) - t.end() - } - - db.get('foobatch1', function (err, value) { - t.notOk(err, 'no error') - var result - if (isTypedArray(value)) { - result = String.fromCharCode.apply(null, new Uint16Array(value)) - } else { - t.ok(typeof Buffer != 'undefined' && value instanceof Buffer) - result = value.toString() - } - t.equal(result, 'bar1') - done() - }) - - db.get('foobatch2', function (err, value) { - t.ok(err, 'entry not found') - t.ok(typeof value == 'undefined', 'value is undefined') - t.ok(verifyNotFoundError(err), 'NotFound error') - done() - }) - - db.get('foobatch3', function (err, value) { - t.notOk(err, 'no error') - var result - if (isTypedArray(value)) { - result = String.fromCharCode.apply(null, new Uint16Array(value)) - } else { - t.ok(typeof Buffer != 'undefined' && value instanceof Buffer) - result = value.toString() - } - t.equal(result, 'bar3') - done() - }) - }) - }) -} - -module.exports.tearDown = function (test, testCommon) { - test('tearDown', function (t) { - db.close(testCommon.tearDown.bind(null, t)) - }) -} - -module.exports.all = function (leveldown, test, testCommon) { - module.exports.setUp(leveldown, test, testCommon) - module.exports.args(test) - module.exports.batch(test) - module.exports.tearDown(test, testCommon) -} diff --git a/node_modules/abstract-leveldown/abstract/chained-batch-test.js b/node_modules/abstract-leveldown/abstract/chained-batch-test.js deleted file mode 100644 index b38a68db..00000000 --- a/node_modules/abstract-leveldown/abstract/chained-batch-test.js +++ /dev/null @@ -1,222 +0,0 @@ -var db - -module.exports.setUp = function (leveldown, test, testCommon) { - test('setUp common', testCommon.setUp) - test('setUp db', function (t) { - db = leveldown(testCommon.location()) - db.open(t.end.bind(t)) - }) -} - -module.exports.args = function (test) { - test('test batch#put() with missing `value`', function (t) { - try { - db.batch().put('foo1') - } catch (err) { - t.equal(err.message, 'value cannot be `null` or `undefined`', 'correct error message') - return t.end() - } - t.fail('should have thrown') - t.end() - }) - - test('test batch#put() with null `value`', function (t) { - try { - db.batch().put('foo1', null) - } catch (err) { - t.equal(err.message, 'value cannot be `null` or `undefined`', 'correct error message') - return t.end() - } - t.fail('should have thrown') - t.end() - }) - - test('test batch#put() with missing `key`', function (t) { - try { - db.batch().put(undefined, 'foo1') - } catch (err) { - t.equal(err.message, 'key cannot be `null` or `undefined`', 'correct error message') - return t.end() - } - t.fail('should have thrown') - t.end() - }) - - test('test batch#put() with null `key`', function (t) { - try { - db.batch().put(null, 'foo1') - } catch (err) { - t.equal(err.message, 'key cannot be `null` or `undefined`', 'correct error message') - return t.end() - } - t.fail('should have thrown') - t.end() - }) - - test('test batch#put() with missing `key` and `value`', function (t) { - try { - db.batch().put() - } catch (err) { - t.equal(err.message, 'key cannot be `null` or `undefined`', 'correct error message') - return t.end() - } - t.fail('should have thrown') - t.end() - }) - - test('test batch#del() with missing `key`', function (t) { - try { - db.batch().del() - } catch (err) { - t.equal(err.message, 'key cannot be `null` or `undefined`', 'correct error message') - return t.end() - } - t.fail('should have thrown') - t.end() - }) - - test('test batch#del() with null `key`', function (t) { - try { - db.batch().del(null) - } catch (err) { - t.equal(err.message, 'key cannot be `null` or `undefined`', 'correct error message') - return t.end() - } - t.fail('should have thrown') - t.end() - }) - - test('test batch#del() with null `key`', function (t) { - try { - db.batch().del(null) - } catch (err) { - t.equal(err.message, 'key cannot be `null` or `undefined`', 'correct error message') - return t.end() - } - t.fail('should have thrown') - t.end() - }) - - test('test batch#clear() doesn\'t throw', function (t) { - db.batch().clear() - t.end() - }) - - test('test batch#write() with no callback', function (t) { - try { - db.batch().write() - } catch (err) { - t.equal(err.message, 'write() requires a callback argument', 'correct error message') - return t.end() - } - t.fail('should have thrown') - t.end() - }) - - test('test batch#put() after write()', function (t) { - var batch = db.batch().put('foo', 'bar') - batch.write(function () {}) - try { - batch.put('boom', 'bang') - } catch (err) { - t.equal(err.message, 'write() already called on this batch', 'correct error message') - return t.end() - } - t.fail('should have thrown') - t.end() - }) - - test('test batch#del() after write()', function (t) { - var batch = db.batch().put('foo', 'bar') - batch.write(function () {}) - try { - batch.del('foo') - } catch (err) { - t.equal(err.message, 'write() already called on this batch', 'correct error message') - return t.end() - } - t.fail('should have thrown') - t.end() - }) - - test('test batch#clear() after write()', function (t) { - var batch = db.batch().put('foo', 'bar') - batch.write(function () {}) - try { - batch.clear() - } catch (err) { - t.equal(err.message, 'write() already called on this batch', 'correct error message') - return t.end() - } - t.fail('should have thrown') - t.end() - }) - - test('test batch#write() after write()', function (t) { - var batch = db.batch().put('foo', 'bar') - batch.write(function () {}) - try { - batch.write(function (err) {}) - } catch (err) { - t.equal(err.message, 'write() already called on this batch', 'correct error message') - return t.end() - } - t.fail('should have thrown') - t.end() - }) -} - -module.exports.batch = function (test, testCommon) { - test('test basic batch', function (t) { - db.batch( - [ - { type: 'put', key: 'one', value: '1' } - , { type: 'put', key: 'two', value: '2' } - , { type: 'put', key: 'three', value: '3' } - ] - , function (err) { - t.notOk(err, 'no error') - - db.batch() - .put('1', 'one') - .del('2', 'two') - .put('3', 'three') - .clear() - .put('one', 'I') - .put('two', 'II') - .del('three') - .put('foo', 'bar') - .write(function (err) { - t.notOk(err, 'no error') - testCommon.collectEntries( - db.iterator({ keyAsBuffer: false, valueAsBuffer: false }) - , function (err, data) { - t.notOk(err, 'no error') - t.equal(data.length, 3, 'correct number of entries') - var expected = [ - { key: 'foo', value: 'bar' } - , { key: 'one', value: 'I' } - , { key: 'two', value: 'II' } - ] - t.deepEqual(data, expected) - t.end() - } - ) - }) - } - ) - }) -} - -module.exports.tearDown = function (test, testCommon) { - test('tearDown', function (t) { - db.close(testCommon.tearDown.bind(null, t)) - }) -} - -module.exports.all = function (leveldown, test, testCommon) { - module.exports.setUp(leveldown, test, testCommon) - module.exports.args(test) - module.exports.batch(test, testCommon) - module.exports.tearDown(test, testCommon) -} \ No newline at end of file diff --git a/node_modules/abstract-leveldown/abstract/close-test.js b/node_modules/abstract-leveldown/abstract/close-test.js deleted file mode 100644 index 7492c492..00000000 --- a/node_modules/abstract-leveldown/abstract/close-test.js +++ /dev/null @@ -1,24 +0,0 @@ -module.exports.close = function (leveldown, test, testCommon) { - test('test close()', function (t) { - var db = leveldown(testCommon.location()) - - db.open(function (err) { - t.notOk(err, 'no error') - t.throws( - db.close.bind(db) - , { name: 'Error', message: 'close() requires a callback argument' } - , 'no-arg close() throws' - ) - t.throws( - db.close.bind(db, 'foo') - , { name: 'Error', message: 'close() requires a callback argument' } - , 'non-callback close() throws' - ) - - db.close(function (err) { - t.notOk(err, 'no error') - t.end() - }) - }) - }) -} \ No newline at end of file diff --git a/node_modules/abstract-leveldown/abstract/del-test.js b/node_modules/abstract-leveldown/abstract/del-test.js deleted file mode 100644 index 8a70e7d7..00000000 --- a/node_modules/abstract-leveldown/abstract/del-test.js +++ /dev/null @@ -1,77 +0,0 @@ -var db - , verifyNotFoundError = require('./util').verifyNotFoundError - , isTypedArray = require('./util').isTypedArray - -module.exports.setUp = function (leveldown, test, testCommon) { - test('setUp common', testCommon.setUp) - test('setUp db', function (t) { - db = leveldown(testCommon.location()) - db.open(t.end.bind(t)) - }) -} - -module.exports.args = function (test) { - test('test argument-less del() throws', function (t) { - t.throws( - db.del.bind(db) - , { name: 'Error', message: 'del() requires a callback argument' } - , 'no-arg del() throws' - ) - t.end() - }) - - test('test callback-less, 1-arg, del() throws', function (t) { - t.throws( - db.del.bind(db, 'foo') - , { name: 'Error', message: 'del() requires a callback argument' } - , 'callback-less, 1-arg del() throws' - ) - t.end() - }) - - test('test callback-less, 3-arg, del() throws', function (t) { - t.throws( - db.del.bind(db, 'foo', {}) - , { name: 'Error', message: 'del() requires a callback argument' } - , 'callback-less, 2-arg del() throws' - ) - t.end() - }) -} - -module.exports.del = function (test) { - test('test simple del()', function (t) { - db.put('foo', 'bar', function (err) { - t.notOk(err, 'no error') - db.del('foo', function (err) { - t.notOk(err, 'no error') - db.get('foo', function (err) { - t.ok(err, 'entry propertly deleted') - t.ok(typeof value == 'undefined', 'value is undefined') - t.ok(verifyNotFoundError(err), 'NotFound error') - t.end() - }) - }) - }) - }) - - test('test del on non-existent key', function (t) { - db.del('blargh', function (err) { - t.notOk(err, 'should not error on delete') - t.end() - }) - }) -} - -module.exports.tearDown = function (test, testCommon) { - test('tearDown', function (t) { - db.close(testCommon.tearDown.bind(null, t)) - }) -} - -module.exports.all = function (leveldown, test, testCommon) { - module.exports.setUp(leveldown, test, testCommon) - module.exports.args(test) - module.exports.del(test) - module.exports.tearDown(test, testCommon) -} diff --git a/node_modules/abstract-leveldown/abstract/get-test.js b/node_modules/abstract-leveldown/abstract/get-test.js deleted file mode 100644 index 2b865f0b..00000000 --- a/node_modules/abstract-leveldown/abstract/get-test.js +++ /dev/null @@ -1,125 +0,0 @@ -var db - , verifyNotFoundError = require('./util').verifyNotFoundError - , isTypedArray = require('./util').isTypedArray - -module.exports.setUp = function (leveldown, test, testCommon) { - test('setUp common', testCommon.setUp) - test('setUp db', function (t) { - db = leveldown(testCommon.location()) - db.open(t.end.bind(t)) - }) -} - -module.exports.args = function (test) { - test('test argument-less get() throws', function (t) { - t.throws( - db.get.bind(db) - , { name: 'Error', message: 'get() requires a callback argument' } - , 'no-arg get() throws' - ) - t.end() - }) - - test('test callback-less, 1-arg, get() throws', function (t) { - t.throws( - db.get.bind(db, 'foo') - , { name: 'Error', message: 'get() requires a callback argument' } - , 'callback-less, 1-arg get() throws' - ) - t.end() - }) - - test('test callback-less, 3-arg, get() throws', function (t) { - t.throws( - db.get.bind(db, 'foo', {}) - , { name: 'Error', message: 'get() requires a callback argument' } - , 'callback-less, 2-arg get() throws' - ) - t.end() - }) -} - -module.exports.get = function (test) { - test('test simple get()', function (t) { - db.put('foo', 'bar', function (err) { - t.notOk(err, 'no error') - db.get('foo', function (err, value) { - t.notOk(err, 'no error') - t.ok(typeof value !== 'string', 'should not be string by default') - - var result - if (isTypedArray(value)) { - result = String.fromCharCode.apply(null, new Uint16Array(value)) - } else { - t.ok(typeof Buffer != 'undefined' && value instanceof Buffer) - result = value.toString() - } - - t.equal(result, 'bar') - - db.get('foo', {}, function (err, value) { // same but with {} - t.notOk(err, 'no error') - t.ok(typeof value !== 'string', 'should not be string by default') - - var result - if (isTypedArray(value)) { - result = String.fromCharCode.apply(null, new Uint16Array(value)) - } else { - t.ok(typeof Buffer != 'undefined' && value instanceof Buffer) - result = value.toString() - } - - t.equal(result, 'bar') - - db.get('foo', { asBuffer: false }, function (err, value) { - t.notOk(err, 'no error') - t.ok(typeof value === 'string', 'should be string if not buffer') - t.equal(value, 'bar') - t.end() - }) - }) - }) - }) - }) - - test('test simultaniously get()', function (t) { - db.put('hello', 'world', function (err) { - t.notOk(err, 'should not error') - var r = 0 - , done = function () { - if (++r == 20) - t.end() - } - , i = 0 - , j = 0 - - for (; i < 10; ++i) - db.get('hello', function(err, value) { - t.notOk(err, 'should not error') - t.equal(value.toString(), 'world') - done() - }) - - for (; j < 10; ++j) - db.get('not found', function(err, value) { - t.ok(err, 'should error') - t.ok(verifyNotFoundError(err), 'should have correct error message') - t.ok(typeof value == 'undefined', 'value is undefined') - done() - }) - }) - }) -} - -module.exports.tearDown = function (test, testCommon) { - test('tearDown', function (t) { - db.close(testCommon.tearDown.bind(null, t)) - }) -} - -module.exports.all = function (leveldown, test, testCommon) { - module.exports.setUp(leveldown, test, testCommon) - module.exports.args(test) - module.exports.get(test) - module.exports.tearDown(test, testCommon) -} \ No newline at end of file diff --git a/node_modules/abstract-leveldown/abstract/iterator-test.js b/node_modules/abstract-leveldown/abstract/iterator-test.js deleted file mode 100644 index 97b3e6b7..00000000 --- a/node_modules/abstract-leveldown/abstract/iterator-test.js +++ /dev/null @@ -1,487 +0,0 @@ -var db - , sourceData = (function () { - var d = [] - , i = 0 - , k - for (; i < 100; i++) { - k = (i < 10 ? '0' : '') + i - d.push({ - type : 'put' - , key : k - , value : Math.random() - }) - } - return d - }()) - , transformSource = function (d) { - return { key: d.key, value: String(d.value) } - } - -module.exports.sourceData = sourceData -module.exports.transformSource = transformSource - -module.exports.setUp = function (leveldown, test, testCommon) { - test('setUp common', testCommon.setUp) - test('setUp db', function (t) { - db = leveldown(testCommon.location()) - db.open(t.end.bind(t)) - }) -} - -module.exports.args = function (test) { - test('test argument-less iterator#next() throws', function (t) { - var iterator = db.iterator() - t.throws( - iterator.next.bind(iterator) - , { name: 'Error', message: 'next() requires a callback argument' } - , 'no-arg iterator#next() throws' - ) - iterator.end(t.end.bind(t)) - }) - - test('test argument-less iterator#end() after next() throws', function (t) { - var iterator = db.iterator() - iterator.next(function () { - t.throws( - iterator.end.bind(iterator) - , { name: 'Error', message: 'end() requires a callback argument' } - , 'no-arg iterator#end() throws' - ) - iterator.end(t.end.bind(t)) - }) - }) - - test('test argument-less iterator#end() throws', function (t) { - var iterator = db.iterator() - t.throws( - iterator.end.bind(iterator) - , { name: 'Error', message: 'end() requires a callback argument' } - , 'no-arg iterator#end() throws' - ) - iterator.end(t.end.bind(t)) - }) -} - -module.exports.sequence = function (test) { - test('test twice iterator#end() callback with error', function (t) { - var iterator = db.iterator() - iterator.end(function (err) { - t.notOk(err, 'no error') - iterator.end(function(err2) { - t.ok(err2, 'returned error') - t.equal(err2.name, 'Error', 'correct error') - t.equal(err2.message, 'end() already called on iterator') - t.end() - }) - }) - }) - - test('test iterator#next after iterator#end() callback with error', function (t) { - var iterator = db.iterator() - iterator.end(function (err) { - t.notOk(err, 'no error') - iterator.next(function(err2) { - t.ok(err2, 'returned error') - t.equal(err2.name, 'Error', 'correct error') - t.equal(err2.message, 'cannot call next() after end()', 'correct message') - t.end() - }) - }) - }) - - test('test twice iterator#next() throws', function (t) { - var iterator = db.iterator() - iterator.next(function (err) { - t.notOk(err, 'no error') - iterator.end(function (err) { - t.notOk(err, 'no error') - t.end() - }) - }) - - iterator.next(function(err) { - t.ok(err, 'returned error') - t.equal(err.name, 'Error', 'correct error') - t.equal(err.message, 'cannot call next() before previous next() has completed') - }) - }) -} - -module.exports.iterator = function (leveldown, test, testCommon, collectEntries) { - test('test simple iterator()', function (t) { - var data = [ - { type: 'put', key: 'foobatch1', value: 'bar1' } - , { type: 'put', key: 'foobatch2', value: 'bar2' } - , { type: 'put', key: 'foobatch3', value: 'bar3' } - ] - , idx = 0 - - db.batch(data, function (err) { - t.notOk(err, 'no error') - var iterator = db.iterator() - , fn = function (err, key, value) { - t.notOk(err, 'no error') - if (key && value) { - t.ok(Buffer.isBuffer(key), 'key argument is a Buffer') - t.ok(Buffer.isBuffer(value), 'value argument is a Buffer') - t.equal(key.toString(), data[idx].key, 'correct key') - t.equal(value.toString(), data[idx].value, 'correct value') - process.nextTick(next) - idx++ - } else { // end - t.ok(typeof err === 'undefined', 'err argument is undefined') - t.ok(typeof key === 'undefined', 'key argument is undefined') - t.ok(typeof value === 'undefined', 'value argument is undefined') - t.equal(idx, data.length, 'correct number of entries') - iterator.end(function () { - t.end() - }) - } - } - , next = function () { - iterator.next(fn) - } - - next() - }) - }) - - /** the following tests are mirroring the same series of tests in - * LevelUP read-stream-test.js - */ - - test('setUp #2', function (t) { - db.close(function () { - db = leveldown(testCommon.location()) - db.open(function () { - db.batch(sourceData, t.end.bind(t)) - }) - }) - }) - - test('test full data collection', function (t) { - collectEntries(db.iterator({ keyAsBuffer: false, valueAsBuffer: false }), function (err, data) { - t.notOk(err, 'no error') - t.equal(data.length, sourceData.length, 'correct number of entries') - var expected = sourceData.map(transformSource) - t.deepEqual(data, expected) - t.end() - }) - }) - - test('test iterator with reverse=true', function (t) { - collectEntries(db.iterator({ keyAsBuffer: false, valueAsBuffer: false, reverse: true }), function (err, data) { - t.notOk(err, 'no error') - t.equal(data.length, sourceData.length, 'correct number of entries') - var expected = sourceData.slice().reverse().map(transformSource) - t.deepEqual(data, expected) - t.end() - }) - }) - - test('test iterator with start=0', function (t) { - collectEntries(db.iterator({ keyAsBuffer: false, valueAsBuffer: false, start: '00' }), function (err, data) { - t.notOk(err, 'no error') - t.equal(data.length, sourceData.length, 'correct number of entries') - var expected = sourceData.map(transformSource) - t.deepEqual(data, expected) - t.end() - }) - }) - - test('test iterator with start=50', function (t) { - collectEntries(db.iterator({ keyAsBuffer: false, valueAsBuffer: false, start: '50' }), function (err, data) { - t.notOk(err, 'no error') - t.equal(data.length, 50, 'correct number of entries') - var expected = sourceData.slice(50).map(transformSource) - t.deepEqual(data, expected) - t.end() - }) - }) - - test('test iterator with start=50 and reverse=true', function (t) { - collectEntries(db.iterator({ keyAsBuffer: false, valueAsBuffer: false, start: '50', reverse: true }), function (err, data) { - t.notOk(err, 'no error') - t.equal(data.length, 51, 'correct number of entries') - var expected = sourceData.slice().reverse().slice(49).map(transformSource) - t.deepEqual(data, expected) - t.end() - }) - }) - - test('test iterator with start being a midway key (49.5)', function (t) { - collectEntries(db.iterator({ keyAsBuffer: false, valueAsBuffer: false, start: '49.5' }), function (err, data) { - t.notOk(err, 'no error') - t.equal(data.length, 50, 'correct number of entries') - var expected = sourceData.slice(50).map(transformSource) - t.deepEqual(data, expected) - t.end() - }) - }) - - test('test iterator with start being a midway key (49999)', function (t) { - collectEntries(db.iterator({ keyAsBuffer: false, valueAsBuffer: false, start: '49999' }), function (err, data) { - t.notOk(err, 'no error') - t.equal(data.length, 50, 'correct number of entries') - var expected = sourceData.slice(50).map(transformSource) - t.deepEqual(data, expected) - t.end() - }) - }) - - test('test iterator with start being a midway key and reverse=true', function (t) { - collectEntries(db.iterator({ keyAsBuffer: false, valueAsBuffer: false, start: '49.5', reverse: true }), function (err, data) { - t.notOk(err, 'no error') - t.equal(data.length, 50, 'correct number of entries') - var expected = sourceData.slice().reverse().slice(50).map(transformSource) - t.deepEqual(data, expected) - t.end() - }) - }) - - test('test iterator with end=50', function (t) { - collectEntries(db.iterator({ keyAsBuffer: false, valueAsBuffer: false, end: '50' }), function (err, data) { - t.notOk(err, 'no error') - t.equal(data.length, 51, 'correct number of entries') - var expected = sourceData.slice(0, 51).map(transformSource) - t.deepEqual(data, expected) - t.end() - }) - }) - - test('test iterator with end being a midway key (50.5)', function (t) { - collectEntries(db.iterator({ keyAsBuffer: false, valueAsBuffer: false, end: '50.5' }), function (err, data) { - t.notOk(err, 'no error') - t.equal(data.length, 51, 'correct number of entries') - var expected = sourceData.slice(0, 51).map(transformSource) - t.deepEqual(data, expected) - t.end() - }) - }) - - test('test iterator with end being a midway key (50555)', function (t) { - collectEntries(db.iterator({ keyAsBuffer: false, valueAsBuffer: false, end: '50555' }), function (err, data) { - t.notOk(err, 'no error') - t.equal(data.length, 51, 'correct number of entries') - var expected = sourceData.slice(0, 51).map(transformSource) - t.deepEqual(data, expected) - t.end() - }) - }) - - test('test iterator with end being a midway key and reverse=true', function (t) { - collectEntries(db.iterator({ keyAsBuffer: false, valueAsBuffer: false, end: '50.5', reverse: true }), function (err, data) { - t.notOk(err, 'no error') - t.equal(data.length, 49, 'correct number of entries') - var expected = sourceData.slice().reverse().slice(0, 49).map(transformSource) - t.deepEqual(data, expected) - t.end() - }) - }) - - // end='0', starting key is actually '00' so it should avoid it - test('test iterator with end=0', function (t) { - collectEntries(db.iterator({ keyAsBuffer: false, valueAsBuffer: false, end: '0' }), function (err, data) { - t.notOk(err, 'no error') - t.equal(data.length, 0, 'correct number of entries') - t.end() - }) - }) - - test('test iterator with start=30 and end=70', function (t) { - collectEntries(db.iterator({ keyAsBuffer: false, valueAsBuffer: false, start: '30', end: '70' }), function (err, data) { - t.notOk(err, 'no error') - t.equal(data.length, 41, 'correct number of entries') - var expected = sourceData.slice(30, 71).map(transformSource) - t.deepEqual(data, expected) - t.end() - }) - }) - - test('test iterator with start=30 and end=70 and reverse=true', function (t) { - collectEntries(db.iterator({ keyAsBuffer: false, valueAsBuffer: false, start: '70', end: '30', reverse: true }), function (err, data) { - t.notOk(err, 'no error') - t.equal(data.length, 41, 'correct number of entries') - var expected = sourceData.slice().reverse().slice(29, 70).map(transformSource) - t.deepEqual(data, expected) - t.end() - }) - }) - - test('test iterator with limit=20', function (t) { - collectEntries(db.iterator({ keyAsBuffer: false, valueAsBuffer: false, limit: 20 }), function (err, data) { - t.notOk(err, 'no error') - t.equal(data.length, 20, 'correct number of entries') - var expected = sourceData.slice(0, 20).map(transformSource) - t.deepEqual(data, expected) - t.end() - }) - }) - - test('test iterator with limit=20 and start=20', function (t) { - collectEntries(db.iterator({ keyAsBuffer: false, valueAsBuffer: false, start: '20', limit: 20 }), function (err, data) { - t.notOk(err, 'no error') - t.equal(data.length, 20, 'correct number of entries') - var expected = sourceData.slice(20, 40).map(transformSource) - t.deepEqual(data, expected) - t.end() - }) - }) - - test('test iterator with limit=20 and reverse=true', function (t) { - collectEntries(db.iterator({ keyAsBuffer: false, valueAsBuffer: false, limit: 20, reverse: true }), function (err, data) { - t.notOk(err, 'no error') - t.equal(data.length, 20, 'correct number of entries') - var expected = sourceData.slice().reverse().slice(0, 20).map(transformSource) - t.deepEqual(data, expected) - t.end() - }) - }) - - test('test iterator with limit=20 and start=20 and reverse=true', function (t) { - collectEntries(db.iterator({ keyAsBuffer: false, valueAsBuffer: false, start: '79', limit: 20, reverse: true }), function (err, data) { - t.notOk(err, 'no error') - t.equal(data.length, 20, 'correct number of entries') - var expected = sourceData.slice().reverse().slice(20, 40).map(transformSource) - t.deepEqual(data, expected) - t.end() - }) - }) - - // the default limit value from levelup is -1 - test('test iterator with limit=-1 should iterate over whole database', function (t) { - collectEntries(db.iterator({ keyAsBuffer: false, valueAsBuffer: false, limit: -1}), function (err, data) { - t.notOk(err, 'no error') - t.equal(data.length, sourceData.length, 'correct number of entries') - var expected = sourceData.map(transformSource) - t.deepEqual(data, expected) - t.end() - }) - }) - - test('test iterator with end after limit', function (t) { - collectEntries(db.iterator({ keyAsBuffer: false, valueAsBuffer: false, limit: 20, end: '50' }), function (err, data) { - t.notOk(err, 'no error') - t.equal(data.length, 20, 'correct number of entries') - var expected = sourceData.slice(0, 20).map(transformSource) - t.deepEqual(data, expected) - t.end() - }) - }) - - test('test iterator with end before limit', function (t) { - collectEntries(db.iterator({ keyAsBuffer: false, valueAsBuffer: false, limit: 50, end: '19' }), function (err, data) { - t.notOk(err, 'no error') - t.equal(data.length, 20, 'correct number of entries') - var expected = sourceData.slice(0, 20).map(transformSource) - t.deepEqual(data, expected) - t.end() - }) - }) - - test('test iterator with start after database end', function (t) { - collectEntries(db.iterator({ keyAsBuffer: false, valueAsBuffer: false, start: '9a' }), function (err, data) { - t.notOk(err, 'no error') - t.equal(data.length, 0, 'correct number of entries') - t.end() - }) - }) - - test('test iterator with start after database end and reverse=true', function (t) { - collectEntries(db.iterator({ keyAsBuffer: false, valueAsBuffer: false, start: '9a', reverse: true }), function (err, data) { - t.notOk(err, 'no error') - t.equal(data.length, sourceData.length, 'correct number of entries') - var expected = sourceData.slice().reverse().map(transformSource) - t.deepEqual(data, expected) - t.end() - }) - }) - - test('test iterator with start and end after database and and reverse=true', function (t) { - collectEntries(db.iterator({ start: '9b', end: '9a', reverse: true }), function (err, data) { - t.notOk(err, 'no error') - t.equal(data.length, 0, 'correct number of entries') - t.end() - }) - }) - - function testIteratorCollectsFullDatabase (name, iteratorOptions) { - iteratorOptions.keyAsBuffer = false - iteratorOptions.valueAsBuffer = false - test(name, function (t) { - collectEntries(db.iterator(iteratorOptions), function (err, data) { - t.notOk(err, 'no error') - t.equal(data.length, 100, 'correct number of entries') - var expected = sourceData.map(transformSource) - t.deepEqual(data, expected) - t.end() - }) - }) - } - if (!process.browser) { - // Can't use buffers as query keys in indexeddb (I think :P) - testIteratorCollectsFullDatabase( - 'test iterator with start as empty buffer' - , { start: new Buffer(0) } - ) - testIteratorCollectsFullDatabase( - 'test iterator with end as empty buffer' - , { end: new Buffer(0) } - ) - } - testIteratorCollectsFullDatabase( - 'test iterator with start as empty string' - , { start: '' } - ) - testIteratorCollectsFullDatabase( - 'test iterator with start as null' - , { start: null } - ) - testIteratorCollectsFullDatabase( - 'test iterator with end as empty string' - , { end: '' } - ) - testIteratorCollectsFullDatabase( - 'test iterator with end as null' - , { end: null } - ) -} - -module.exports.snapshot = function (leveldown, test, testCommon) { - test('setUp #3', function (t) { - db.close(function () { - db = leveldown(testCommon.location()) - db.open(function () { - db.put('foobatch1', 'bar1', t.end.bind(t)) - }) - }) - }) - - test('iterator create snapshot correctly', function (t) { - var iterator = db.iterator() - db.del('foobatch1', function () { - iterator.next(function (err, key, value) { - t.notOk(err, 'no error') - t.ok(key, 'got a key') - t.equal(key.toString(), 'foobatch1', 'correct key') - t.equal(value.toString(), 'bar1', 'correct value') - iterator.end(t.end.bind(t)) - }) - }) - }) -} - -module.exports.tearDown = function (test, testCommon) { - test('tearDown', function (t) { - db.close(testCommon.tearDown.bind(null, t)) - }) -} - -module.exports.all = function (leveldown, test, testCommon) { - module.exports.setUp(leveldown, test, testCommon) - module.exports.args(test) - module.exports.sequence(test) - module.exports.iterator(leveldown, test, testCommon, testCommon.collectEntries) - module.exports.snapshot(leveldown, test, testCommon) - module.exports.tearDown(test, testCommon) -} diff --git a/node_modules/abstract-leveldown/abstract/leveldown-test.js b/node_modules/abstract-leveldown/abstract/leveldown-test.js deleted file mode 100644 index 205122bf..00000000 --- a/node_modules/abstract-leveldown/abstract/leveldown-test.js +++ /dev/null @@ -1,17 +0,0 @@ -module.exports.args = function (leveldown, test) { - test('test database creation no-arg throws', function (t) { - t.throws( - leveldown - , { name: 'Error', message: 'constructor requires at least a location argument' } - , 'no-arg leveldown() throws' - ) - t.end() - }) - - test('test database open no-arg throws', function (t) { - var db = leveldown('foo') - t.ok(db, 'database object returned') - t.ok(typeof db.open === 'function', 'open() function exists') - t.end() - }) -} \ No newline at end of file diff --git a/node_modules/abstract-leveldown/abstract/open-test.js b/node_modules/abstract-leveldown/abstract/open-test.js deleted file mode 100644 index 5bbeeb06..00000000 --- a/node_modules/abstract-leveldown/abstract/open-test.js +++ /dev/null @@ -1,96 +0,0 @@ -module.exports.setUp = function (test, testCommon) { - test('setUp', testCommon.setUp) -} - -module.exports.args = function (leveldown, test, testCommon) { - test('test database open no-arg throws', function (t) { - var db = leveldown(testCommon.location()) - t.throws( - db.open.bind(db) - , { name: 'Error', message: 'open() requires a callback argument' } - , 'no-arg open() throws' - ) - t.end() - }) - - test('test callback-less, 1-arg, open() throws', function (t) { - var db = leveldown(testCommon.location()) - t.throws( - db.open.bind(db, {}) - , { name: 'Error', message: 'open() requires a callback argument' } - , 'callback-less, 1-arg open() throws' - ) - t.end() - }) -} - -module.exports.open = function (leveldown, test, testCommon) { - test('test database open, no options', function (t) { - var db = leveldown(testCommon.location()) - - // default createIfMissing=true, errorIfExists=false - db.open(function (err) { - t.notOk(err, 'no error') - db.close(function () { - t.end() - }) - }) - }) - - test('test database open, options and callback', function (t) { - var db = leveldown(testCommon.location()) - - // default createIfMissing=true, errorIfExists=false - db.open({}, function (err) { - t.notOk(err, 'no error') - db.close(function () { - t.end() - }) - }) - }) -} - -module.exports.openAdvanced = function (leveldown, test, testCommon) { - test('test database open createIfMissing:false', function (t) { - var db = leveldown(testCommon.location()) - - db.open({ createIfMissing: false }, function (err) { - t.ok(err, 'error') - t.ok(/does not exist/.test(err.message), 'error is about dir not existing') - t.end() - }) - }) - - test('test database open errorIfExists:true', function (t) { - var location = testCommon.location() - , db = leveldown(location) - - // make a valid database first, then close and dispose - db.open({}, function (err) { - t.notOk(err, 'no error') - db.close(function (err) { - t.notOk(err, 'no error') - - // open again with 'errorIfExists' - db = leveldown(location) - db.open({ createIfMissing: false, errorIfExists: true }, function (err) { - t.ok(err, 'error') - t.ok(/exists/.test(err.message), 'error is about already existing') - t.end() - }) - }) - }) - }) -} - -module.exports.tearDown = function (test, testCommon) { - test('tearDown', testCommon.tearDown) -} - -module.exports.all = function (leveldown, test, testCommon) { - module.exports.setUp(test, testCommon) - module.exports.args(leveldown, test, testCommon) - module.exports.open(leveldown, test, testCommon) - module.exports.openAdvanced(leveldown, test, testCommon) - module.exports.tearDown(test, testCommon) -} \ No newline at end of file diff --git a/node_modules/abstract-leveldown/abstract/put-get-del-test.js b/node_modules/abstract-leveldown/abstract/put-get-del-test.js deleted file mode 100644 index e7e0935e..00000000 --- a/node_modules/abstract-leveldown/abstract/put-get-del-test.js +++ /dev/null @@ -1,167 +0,0 @@ -/**** SETUP & UTILITY STUFF ****/ - - -var db - , testBuffer - , test - , verifyNotFoundError = require('./util').verifyNotFoundError - , isTypedArray = require('./util').isTypedArray - -function makeGetDelErrorTests (type, key, expectedError) { - test('test get() with ' + type + ' causes error', function (t) { - db.get(key, function (err) { - t.ok(err, 'has error') - t.ok(err instanceof Error) - t.ok(err.message.match(expectedError), 'correct error message') - t.end() - }) - }) - - test('test del() with ' + type + ' causes error', function (t) { - db.del(key, function (err) { - t.ok(err, 'has error') - t.ok(err instanceof Error) - t.ok(err.message.match(expectedError), 'correct error message') - t.end() - }) - }) -} - -function makePutErrorTest (type, key, value, expectedError) { - test('test put() with ' + type + ' causes error', function (t) { - db.put(key, value, function (err) { - t.ok(err, 'has error') - t.ok(err instanceof Error) - t.ok(err.message.match(expectedError), 'correct error message') - t.end() - }) - }) -} - -function makePutGetDelSuccessfulTest (type, key, value) { - test('test put()/get()/del() with ' + type, function (t) { - db.put(key, value, function (err) { - t.notOk(err, 'no error') - db.get(key, function (err, _value) { - t.notOk(err, 'no error, has key/value for `' + key + '`') - t.ok(Buffer.isBuffer(_value), 'is a Buffer') - var result = _value.toString() - value = value.toString() - t.equals(result, value) - db.del(key, function (err) { - t.notOk(err, 'no error, deleted key/value for `' + key + '`') - db.get(key, function (err, value) { - t.ok(err, 'entry propertly deleted') - t.ok(verifyNotFoundError(err), 'should have correct error message') - t.ok(typeof value == 'undefined', 'value is undefined') - t.end() - }) - }) - }) - }) - }) -} - -function makeErrorKeyTest (type, key, expectedError) { - makeGetDelErrorTests(type, key, expectedError) - makePutErrorTest(type, key, 'foo', expectedError) -} - -/**** SETUP ENVIRONMENT ****/ - -module.exports.setUp = function (leveldown, test, testCommon) { - test('setUp common', testCommon.setUp) - test('setUp db', function (t) { - db = leveldown(testCommon.location()) - db.open(t.end.bind(t)) - }) -} - -/**** TEST ERROR KEYS ****/ - -module.exports.errorKeys = function (testFunc, BufferType) { - if (!BufferType) BufferType = Buffer - test = testFunc - makeErrorKeyTest('null key', null, /key cannot be `null` or `undefined`/) - makeErrorKeyTest('undefined key', undefined, /key cannot be `null` or `undefined`/) - makeErrorKeyTest('empty String key', '', /key cannot be an empty String/) - makeErrorKeyTest('empty Buffer key', new BufferType(0), /key cannot be an empty \w*Buffer/) - makeErrorKeyTest('empty Array key', [], /key cannot be an empty String/) -} - -/**** TEST NON-ERROR KEYS ****/ - -module.exports.nonErrorKeys = function (testFunc) { - // valid falsey keys - test = testFunc - makePutGetDelSuccessfulTest('`false` key', false, 'foo false') - makePutGetDelSuccessfulTest('`0` key', 0, 'foo 0') - makePutGetDelSuccessfulTest('`NaN` key', NaN, 'foo NaN') - - // standard String key - makePutGetDelSuccessfulTest( - 'long String key' - , 'some long string that I\'m using as a key for this unit test, cross your fingers dude, we\'re going in!' - , 'foo' - ) - - if (!process.browser) { - // Buffer key - makePutGetDelSuccessfulTest('Buffer key', testBuffer, 'foo') - } - - // non-empty Array as a value - makePutGetDelSuccessfulTest('Array value', 'foo', [1,2,3,4]) -} - -/**** TEST ERROR VALUES ****/ - -module.exports.errorValues = function (testFunc, BufferType) { - if (!BufferType) BufferType = Buffer - test = testFunc - makePutErrorTest('null value', 'foo', null, /value cannot be `null` or `undefined`/) - makePutErrorTest('undefined value', 'foo', undefined, /value cannot be `null` or `undefined`/) - makePutErrorTest('empty String value', 'foo', '', /value cannot be an empty String/) - makePutErrorTest('empty Buffer value', 'foo', new BufferType(0), /value cannot be an empty \w*Buffer/) - makePutErrorTest('empty Array value', 'foo', [], /value cannot be an empty String/) -} - -module.exports.nonErrorKeys = function (testFunc) { - // valid falsey values - test = testFunc - makePutGetDelSuccessfulTest('`false` value', 'foo false', false) - makePutGetDelSuccessfulTest('`0` value', 'foo 0', 0) - makePutGetDelSuccessfulTest('`NaN` value', 'foo NaN', NaN) - - // standard String value - makePutGetDelSuccessfulTest( - 'long String value' - , 'foo' - , 'some long string that I\'m using as a key for this unit test, cross your fingers dude, we\'re going in!' - ) - - // standard Buffer value - makePutGetDelSuccessfulTest('Buffer value', 'foo', testBuffer) - - // non-empty Array as a key - makePutGetDelSuccessfulTest('Array key', [1,2,3,4], 'foo') -} - -/**** CLEANUP ENVIRONMENT ****/ - -module.exports.tearDown = function (test, testCommon) { - test('tearDown', function (t) { - db.close(testCommon.tearDown.bind(null, t)) - }) -} - -module.exports.all = function (leveldown, testFunc, testCommon, buffer, BufferType) { - testBuffer = buffer - test = testFunc - module.exports.setUp(leveldown, test, testCommon) - module.exports.errorKeys(test, BufferType) - module.exports.nonErrorKeys(test) - module.exports.errorValues(test, BufferType) - module.exports.nonErrorKeys(test) - module.exports.tearDown(test, testCommon) -} diff --git a/node_modules/abstract-leveldown/abstract/put-test.js b/node_modules/abstract-leveldown/abstract/put-test.js deleted file mode 100644 index 55558eef..00000000 --- a/node_modules/abstract-leveldown/abstract/put-test.js +++ /dev/null @@ -1,92 +0,0 @@ -var db - , verifyNotFoundError = require('./util').verifyNotFoundError - , isTypedArray = require('./util').isTypedArray - -module.exports.setUp = function (leveldown, test, testCommon) { - test('setUp common', testCommon.setUp) - test('setUp db', function (t) { - db = leveldown(testCommon.location()) - db.open(t.end.bind(t)) - }) -} - -module.exports.args = function (test) { - test('test argument-less put() throws', function (t) { - t.throws( - db.put.bind(db) - , { name: 'Error', message: 'put() requires a callback argument' } - , 'no-arg put() throws' - ) - t.end() - }) - - test('test callback-less, 1-arg, put() throws', function (t) { - t.throws( - db.put.bind(db, 'foo') - , { name: 'Error', message: 'put() requires a callback argument' } - , 'callback-less, 1-arg put() throws' - ) - t.end() - }) - - test('test callback-less, 2-arg, put() throws', function (t) { - t.throws( - db.put.bind(db, 'foo', 'bar') - , { name: 'Error', message: 'put() requires a callback argument' } - , 'callback-less, 2-arg put() throws' - ) - t.end() - }) - - test('test callback-less, 3-arg, put() throws', function (t) { - t.throws( - db.put.bind(db, 'foo', 'bar', {}) - , { name: 'Error', message: 'put() requires a callback argument' } - , 'callback-less, 3-arg put() throws' - ) - t.end() - }) -} - -module.exports.put = function (test) { - test('test simple put()', function (t) { - db.put('foo', 'bar', function (err) { - t.notOk(err, 'no error') - db.get('foo', function (err, value) { - t.notOk(err, 'no error') - var result = value.toString() - if (isTypedArray(value)) - result = String.fromCharCode.apply(null, new Uint16Array(value)) - t.equal(result, 'bar') - t.end() - }) - }) - }) - - if (process.browser) { - test('test object value put()', function (t) { - db.put('dood', {pete: 'sampras'}, function (err) { - t.notOk(err, 'no error') - db.get('dood', { asBuffer: false }, function (err, value) { - t.notOk(err, 'no error') - t.equal(JSON.stringify(value), JSON.stringify({pete: 'sampras'})) - t.end() - }) - }) - }) - } - -} - -module.exports.tearDown = function (test, testCommon) { - test('tearDown', function (t) { - db.close(testCommon.tearDown.bind(null, t)) - }) -} - -module.exports.all = function (leveldown, test, testCommon) { - module.exports.setUp(leveldown, test, testCommon) - module.exports.args(test) - module.exports.put(test) - module.exports.tearDown(test, testCommon) -} \ No newline at end of file diff --git a/node_modules/abstract-leveldown/abstract/ranges-test.js b/node_modules/abstract-leveldown/abstract/ranges-test.js deleted file mode 100644 index 9b8e1da1..00000000 --- a/node_modules/abstract-leveldown/abstract/ranges-test.js +++ /dev/null @@ -1,435 +0,0 @@ -var db - , sourceData = require('./iterator-test').sourceData - , transformSource = require('./iterator-test').transformSource - -module.exports.setUp = function (leveldown, test, testCommon) { - test('setUp common', testCommon.setUp) - test('setUp db', function (t) { - db = leveldown(testCommon.location()) - db.open(t.end.bind(t)) - }) -} - -module.exports.iterator = function (leveldown, test, testCommon, collectEntries) { - test('test simple iterator()', function (t) { - var data = [ - { type: 'put', key: 'foobatch1', value: 'bar1' } - , { type: 'put', key: 'foobatch2', value: 'bar2' } - , { type: 'put', key: 'foobatch3', value: 'bar3' } - ] - , idx = 0 - - db.batch(data, function (err) { - t.notOk(err, 'no error') - var iterator = db.iterator() - , fn = function (err, key, value) { - t.notOk(err, 'no error') - if (key && value) { - t.equal(key.toString(), data[idx].key, 'correct key') - t.equal(value.toString(), data[idx].value, 'correct value') - process.nextTick(next) - idx++ - } else { // end - t.ok(typeof err === 'undefined', 'err argument is undefined') - t.ok(typeof key === 'undefined', 'key argument is undefined') - t.ok(typeof value === 'undefined', 'value argument is undefined') - t.equal(idx, data.length, 'correct number of entries') - iterator.end(function () { - t.end() - }) - } - } - , next = function () { - iterator.next(fn) - } - - next() - }) - }) - - /** the following tests are mirroring the same series of tests in - * LevelUP read-stream-test.js - */ - - test('setUp #2', function (t) { - db.close(function () { - db = leveldown(testCommon.location()) - db.open(function () { - db.batch(sourceData, t.end.bind(t)) - }) - }) - }) - - test('test full data collection', function (t) { - collectEntries(db.iterator({ keyAsBuffer: false, valueAsBuffer: false }), function (err, data) { - t.notOk(err, 'no error') - t.equal(data.length, sourceData.length, 'correct number of entries') - var expected = sourceData.map(transformSource) - t.deepEqual(data, expected) - t.end() - }) - }) - - test('test iterator with reverse=true', function (t) { - collectEntries(db.iterator({ keyAsBuffer: false, valueAsBuffer: false, reverse: true }), function (err, data) { - t.notOk(err, 'no error') - t.equal(data.length, sourceData.length, 'correct number of entries') - var expected = sourceData.slice().reverse().map(transformSource) - t.deepEqual(data, expected) - t.end() - }) - }) - - test('test iterator with gte=0', function (t) { - collectEntries(db.iterator({ keyAsBuffer: false, valueAsBuffer: false, gte: '00' }), function (err, data) { - t.notOk(err, 'no error') - t.equal(data.length, sourceData.length, 'correct number of entries') - var expected = sourceData.map(transformSource) - t.deepEqual(data, expected) - t.end() - }) - }) - - test('test iterator with gte=50', function (t) { - collectEntries(db.iterator({ keyAsBuffer: false, valueAsBuffer: false, gte: '50' }), function (err, data) { - t.notOk(err, 'no error') - t.equal(data.length, 50, 'correct number of entries') - var expected = sourceData.slice(50).map(transformSource) - t.deepEqual(data, expected) - t.end() - }) - }) - - test('test iterator with lte=50 and reverse=true', function (t) { - collectEntries(db.iterator({ keyAsBuffer: false, valueAsBuffer: false, lte: '50', reverse: true }), function (err, data) { - t.notOk(err, 'no error') - t.equal(data.length, 51, 'correct number of entries') - var expected = sourceData.slice().reverse().slice(49).map(transformSource) - t.deepEqual(data, expected) - t.end() - }) - }) - - test('test iterator with start being a midway key (49.5)', function (t) { - collectEntries(db.iterator({ keyAsBuffer: false, valueAsBuffer: false, gte: '49.5' }), function (err, data) { - t.notOk(err, 'no error') - t.equal(data.length, 50, 'correct number of entries') - var expected = sourceData.slice(50).map(transformSource) - t.deepEqual(data, expected) - t.end() - }) - }) - - test('test iterator with start being a midway key (49999)', function (t) { - collectEntries(db.iterator({ keyAsBuffer: false, valueAsBuffer: false, gte: '49999' }), function (err, data) { - t.notOk(err, 'no error') - t.equal(data.length, 50, 'correct number of entries') - var expected = sourceData.slice(50).map(transformSource) - t.deepEqual(data, expected) - t.end() - }) - }) - - test('test iterator with start being a midway key and reverse=true', function (t) { - collectEntries(db.iterator({ keyAsBuffer: false, valueAsBuffer: false, lte: '49.5', reverse: true }), function (err, data) { - t.notOk(err, 'no error') - t.equal(data.length, 50, 'correct number of entries') - var expected = sourceData.slice().reverse().slice(50).map(transformSource) - t.deepEqual(data, expected) - t.end() - }) - }) - - test('test iterator with start being a midway key and reverse=true', function (t) { - collectEntries(db.iterator({ keyAsBuffer: false, valueAsBuffer: false, lt: '49.5', reverse: true }), function (err, data) { - t.notOk(err, 'no error') - t.equal(data.length, 50, 'correct number of entries') - var expected = sourceData.slice().reverse().slice(50).map(transformSource) - t.deepEqual(data, expected) - t.end() - }) - }) - - test('test iterator with start being a midway key and reverse=true', function (t) { - collectEntries(db.iterator({ keyAsBuffer: false, valueAsBuffer: false, lt: '50', reverse: true }), function (err, data) { - t.notOk(err, 'no error') - t.equal(data.length, 50, 'correct number of entries') - var expected = sourceData.slice().reverse().slice(50).map(transformSource) - t.deepEqual(data, expected) - t.end() - }) - }) - - test('test iterator with end=50', function (t) { - collectEntries(db.iterator({ keyAsBuffer: false, valueAsBuffer: false, lte: '50' }), function (err, data) { - t.notOk(err, 'no error') - t.equal(data.length, 51, 'correct number of entries') - var expected = sourceData.slice(0, 51).map(transformSource) - t.deepEqual(data, expected) - t.end() - }) - }) - - test('test iterator with end being a midway key (50.5)', function (t) { - collectEntries(db.iterator({ keyAsBuffer: false, valueAsBuffer: false, lte: '50.5' }), function (err, data) { - t.notOk(err, 'no error') - t.equal(data.length, 51, 'correct number of entries') - var expected = sourceData.slice(0, 51).map(transformSource) - t.deepEqual(data, expected) - t.end() - }) - }) - - test('test iterator with end being a midway key (50555)', function (t) { - collectEntries(db.iterator({ keyAsBuffer: false, valueAsBuffer: false, lte: '50555' }), function (err, data) { - t.notOk(err, 'no error') - t.equal(data.length, 51, 'correct number of entries') - var expected = sourceData.slice(0, 51).map(transformSource) - t.deepEqual(data, expected) - t.end() - }) - }) - - test('test iterator with end being a midway key (50555)', function (t) { - collectEntries(db.iterator({ keyAsBuffer: false, valueAsBuffer: false, lt: '50555' }), function (err, data) { - t.notOk(err, 'no error') - t.equal(data.length, 51, 'correct number of entries') - var expected = sourceData.slice(0, 51).map(transformSource) - t.deepEqual(data, expected) - t.end() - }) - }) - - test('test iterator with end being a midway key and reverse=true', function (t) { - collectEntries(db.iterator({ keyAsBuffer: false, valueAsBuffer: false, gte: '50.5', reverse: true }), function (err, data) { - t.notOk(err, 'no error') - t.equal(data.length, 49, 'correct number of entries') - var expected = sourceData.slice().reverse().slice(0, 49).map(transformSource) - t.deepEqual(data, expected) - t.end() - }) - }) - - test('test iterator with gt a midway key and reverse=true', function (t) { - collectEntries(db.iterator({ keyAsBuffer: false, valueAsBuffer: false, gt: '50.5', reverse: true }), function (err, data) { - t.notOk(err, 'no error') - t.equal(data.length, 49, 'correct number of entries') - var expected = sourceData.slice().reverse().slice(0, 49).map(transformSource) - t.deepEqual(data, expected) - t.end() - }) - }) - - test('test iterator with gt a midway key and reverse=true', function (t) { - collectEntries(db.iterator({ keyAsBuffer: false, valueAsBuffer: false, gt: '50', reverse: true }), function (err, data) { - t.notOk(err, 'no error') - t.equal(data.length, 49, 'correct number of entries') - var expected = sourceData.slice().reverse().slice(0, 49).map(transformSource) - t.deepEqual(data, expected) - t.end() - }) - }) - - test('test iterator with gt 50 key and reverse=true', function (t) { - collectEntries(db.iterator({ keyAsBuffer: false, valueAsBuffer: false, gt: '50', reverse: true }), function (err, data) { - t.notOk(err, 'no error') - t.equal(data.length, 49, 'correct number of entries') - var expected = sourceData.slice().reverse().slice(0, 49).map(transformSource) - t.deepEqual(data, expected) - t.end() - }) - }) - - // end='0', starting key is actually '00' so it should avoid it - test('test iterator with end=0', function (t) { - collectEntries(db.iterator({ keyAsBuffer: false, valueAsBuffer: false, lte: '0' }), function (err, data) { - t.notOk(err, 'no error') - t.equal(data.length, 0, 'correct number of entries') - t.end() - }) - }) - - // end='0', starting key is actually '00' so it should avoid it - test('test iterator with end<0', function (t) { - collectEntries(db.iterator({ keyAsBuffer: false, valueAsBuffer: false, lt: '0' }), function (err, data) { - t.notOk(err, 'no error') - t.equal(data.length, 0, 'correct number of entries') - t.end() - }) - }) - - test('test iterator with start=30 and end=70', function (t) { - collectEntries(db.iterator({ keyAsBuffer: false, valueAsBuffer: false, gte: '30', lte: '70' }), function (err, data) { - t.notOk(err, 'no error') - t.equal(data.length, 41, 'correct number of entries') - var expected = sourceData.slice(30, 71).map(transformSource) - t.deepEqual(data, expected) - t.end() - }) - }) - - test('test iterator with start=30 and end=70', function (t) { - collectEntries(db.iterator({ keyAsBuffer: false, valueAsBuffer: false, gt: '29', lt: '71' }), function (err, data) { - t.notOk(err, 'no error') - t.equal(data.length, 41, 'correct number of entries') - var expected = sourceData.slice(30, 71).map(transformSource) - t.deepEqual(data, expected) - t.end() - }) - }) - - test('test iterator with start=30 and end=70 and reverse=true', function (t) { - collectEntries(db.iterator({ keyAsBuffer: false, valueAsBuffer: false, lte: '70', gte: '30', reverse: true }), function (err, data) { - t.notOk(err, 'no error') - t.equal(data.length, 41, 'correct number of entries') - var expected = sourceData.slice().reverse().slice(29, 70).map(transformSource) - t.deepEqual(data, expected) - t.end() - }) - }) - - test('test iterator with start=30 and end=70 and reverse=true', function (t) { - collectEntries(db.iterator({ keyAsBuffer: false, valueAsBuffer: false, lt: '71', gt: '29', reverse: true }), function (err, data) { - t.notOk(err, 'no error') - t.equal(data.length, 41, 'correct number of entries') - var expected = sourceData.slice().reverse().slice(29, 70).map(transformSource) - t.deepEqual(data, expected) - t.end() - }) - }) - - test('test iterator with limit=20 and start=20', function (t) { - collectEntries(db.iterator({ keyAsBuffer: false, valueAsBuffer: false, gte: '20', limit: 20 }), function (err, data) { - t.notOk(err, 'no error') - t.equal(data.length, 20, 'correct number of entries') - var expected = sourceData.slice(20, 40).map(transformSource) - t.deepEqual(data, expected) - t.end() - }) - }) - - test('test iterator with limit=20 and start=79 and reverse=true', function (t) { - collectEntries(db.iterator({ keyAsBuffer: false, valueAsBuffer: false, lte: '79', limit: 20, reverse: true }), function (err, data) { - t.notOk(err, 'no error') - t.equal(data.length, 20, 'correct number of entries') - var expected = sourceData.slice().reverse().slice(20, 40).map(transformSource) - t.deepEqual(data, expected) - t.end() - }) - }) - - test('test iterator with end after limit', function (t) { - collectEntries(db.iterator({ keyAsBuffer: false, valueAsBuffer: false, limit: 20, lte: '50' }), function (err, data) { - t.notOk(err, 'no error') - t.equal(data.length, 20, 'correct number of entries') - var expected = sourceData.slice(0, 20).map(transformSource) - t.deepEqual(data, expected) - t.end() - }) - }) - - test('test iterator with end before limit', function (t) { - collectEntries(db.iterator({ keyAsBuffer: false, valueAsBuffer: false, limit: 50, lte: '19' }), function (err, data) { - t.notOk(err, 'no error') - t.equal(data.length, 20, 'correct number of entries') - var expected = sourceData.slice(0, 20).map(transformSource) - t.deepEqual(data, expected) - t.end() - }) - }) - - test('test iterator with start after database end', function (t) { - collectEntries(db.iterator({ keyAsBuffer: false, valueAsBuffer: false, gte: '9a' }), function (err, data) { - t.notOk(err, 'no error') - t.equal(data.length, 0, 'correct number of entries') - t.end() - }) - }) - - test('test iterator with start after database end', function (t) { - collectEntries(db.iterator({ keyAsBuffer: false, valueAsBuffer: false, gt: '9a' }), function (err, data) { - t.notOk(err, 'no error') - t.equal(data.length, 0, 'correct number of entries') - t.end() - }) - }) - - test('test iterator with start after database end and reverse=true', function (t) { - collectEntries(db.iterator({ keyAsBuffer: false, valueAsBuffer: false, lte: '9a', reverse: true }), function (err, data) { - t.notOk(err, 'no error') - t.equal(data.length, sourceData.length, 'correct number of entries') - var expected = sourceData.slice().reverse().map(transformSource) - t.deepEqual(data, expected) - t.end() - }) - }) - - test('test iterator with start and end after database and and reverse=true', function (t) { - collectEntries(db.iterator({ lte: '9b', gte: '9a', reverse: true }), function (err, data) { - t.notOk(err, 'no error') - t.equal(data.length, 0, 'correct number of entries') - t.end() - }) - }) - - test('test iterator with lt and gt after database and and reverse=true', function (t) { - collectEntries(db.iterator({ lt: '9b', gt: '9a', reverse: true }), function (err, data) { - t.notOk(err, 'no error') - t.equal(data.length, 0, 'correct number of entries') - t.end() - }) - }) - - function testIteratorCollectsFullDatabase (name, iteratorOptions) { - iteratorOptions.keyAsBuffer = false - iteratorOptions.valueAsBuffer = false - test(name, function (t) { - collectEntries(db.iterator(iteratorOptions), function (err, data) { - t.notOk(err, 'no error') - t.equal(data.length, 100, 'correct number of entries') - var expected = sourceData.map(transformSource) - t.deepEqual(data, expected) - t.end() - }) - }) - } - if (!process.browser) { - // Can't use buffers as query keys in indexeddb (I think :P) - testIteratorCollectsFullDatabase( - 'test iterator with start as empty buffer' - , { start: new Buffer(0) } - ) - testIteratorCollectsFullDatabase( - 'test iterator with end as empty buffer' - , { end: new Buffer(0) } - ) - } - testIteratorCollectsFullDatabase( - 'test iterator with start as empty string' - , { gte: '' } - ) - testIteratorCollectsFullDatabase( - 'test iterator with start as null' - , { gte: null } - ) - testIteratorCollectsFullDatabase( - 'test iterator with end as empty string' - , { lte: '' } - ) - testIteratorCollectsFullDatabase( - 'test iterator with end as null' - , { lte: null } - ) -} - -module.exports.tearDown = function (test, testCommon) { - test('tearDown', function (t) { - db.close(testCommon.tearDown.bind(null, t)) - }) -} - -module.exports.all = function (leveldown, test, testCommon) { - module.exports.setUp(leveldown, test, testCommon) - module.exports.iterator(leveldown, test, testCommon, testCommon.collectEntries) - module.exports.tearDown(test, testCommon) -} diff --git a/node_modules/abstract-leveldown/abstract/util.js b/node_modules/abstract-leveldown/abstract/util.js deleted file mode 100644 index 2ae5a4f8..00000000 --- a/node_modules/abstract-leveldown/abstract/util.js +++ /dev/null @@ -1,10 +0,0 @@ -var nfre = /NotFound/i - -module.exports.verifyNotFoundError = function verifyNotFoundError (err) { - return nfre.test(err.message) || nfre.test(err.name) -} - -module.exports.isTypedArray = function isTypedArray (value) { - return (typeof ArrayBuffer != 'undefined' && value instanceof ArrayBuffer) - || (typeof Uint8Array != 'undefined' && value instanceof Uint8Array) -} diff --git a/node_modules/abstract-leveldown/node_modules/xtend/.jshintrc b/node_modules/abstract-leveldown/node_modules/xtend/.jshintrc deleted file mode 100644 index 77887b5f..00000000 --- a/node_modules/abstract-leveldown/node_modules/xtend/.jshintrc +++ /dev/null @@ -1,30 +0,0 @@ -{ - "maxdepth": 4, - "maxstatements": 200, - "maxcomplexity": 12, - "maxlen": 80, - "maxparams": 5, - - "curly": true, - "eqeqeq": true, - "immed": true, - "latedef": false, - "noarg": true, - "noempty": true, - "nonew": true, - "undef": true, - "unused": "vars", - "trailing": true, - - "quotmark": true, - "expr": true, - "asi": true, - - "browser": false, - "esnext": true, - "devel": false, - "node": false, - "nonstandard": false, - - "predef": ["require", "module", "__dirname", "__filename"] -} diff --git a/node_modules/abstract-leveldown/node_modules/xtend/.npmignore b/node_modules/abstract-leveldown/node_modules/xtend/.npmignore deleted file mode 100644 index 3c3629e6..00000000 --- a/node_modules/abstract-leveldown/node_modules/xtend/.npmignore +++ /dev/null @@ -1 +0,0 @@ -node_modules diff --git a/node_modules/abstract-leveldown/node_modules/xtend/LICENCE b/node_modules/abstract-leveldown/node_modules/xtend/LICENCE deleted file mode 100644 index 1a14b437..00000000 --- a/node_modules/abstract-leveldown/node_modules/xtend/LICENCE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (c) 2012-2014 Raynos. - -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/node_modules/abstract-leveldown/node_modules/xtend/Makefile b/node_modules/abstract-leveldown/node_modules/xtend/Makefile deleted file mode 100644 index d583fcf4..00000000 --- a/node_modules/abstract-leveldown/node_modules/xtend/Makefile +++ /dev/null @@ -1,4 +0,0 @@ -browser: - node ./support/compile - -.PHONY: browser \ No newline at end of file diff --git a/node_modules/abstract-leveldown/node_modules/xtend/README.md b/node_modules/abstract-leveldown/node_modules/xtend/README.md deleted file mode 100644 index e7548318..00000000 --- a/node_modules/abstract-leveldown/node_modules/xtend/README.md +++ /dev/null @@ -1,28 +0,0 @@ -# xtend - -[![browser support][3]][4] - -Extend like a boss - -xtend is a basic utility library which allows you to extend an object by appending all of the properties from each object in a list. When there are identical properties, the right-most property takes presedence. - -## Examples - -```js -var extend = require("xtend") - -// extend returns a new object. Does not mutate arguments -var combination = extend({ - a: "a" -}, { - b: "b" -}) -// { a: "a", b: "b" } -``` - - -## MIT Licenced - - - [3]: http://ci.testling.com/Raynos/xtend.png - [4]: http://ci.testling.com/Raynos/xtend diff --git a/node_modules/abstract-leveldown/node_modules/xtend/index.js b/node_modules/abstract-leveldown/node_modules/xtend/index.js deleted file mode 100644 index 5b760152..00000000 --- a/node_modules/abstract-leveldown/node_modules/xtend/index.js +++ /dev/null @@ -1,17 +0,0 @@ -module.exports = extend - -function extend() { - var target = {} - - for (var i = 0; i < arguments.length; i++) { - var source = arguments[i] - - for (var key in source) { - if (source.hasOwnProperty(key)) { - target[key] = source[key] - } - } - } - - return target -} diff --git a/node_modules/abstract-leveldown/node_modules/xtend/mutable.js b/node_modules/abstract-leveldown/node_modules/xtend/mutable.js deleted file mode 100644 index a34475eb..00000000 --- a/node_modules/abstract-leveldown/node_modules/xtend/mutable.js +++ /dev/null @@ -1,15 +0,0 @@ -module.exports = extend - -function extend(target) { - for (var i = 1; i < arguments.length; i++) { - var source = arguments[i] - - for (var key in source) { - if (source.hasOwnProperty(key)) { - target[key] = source[key] - } - } - } - - return target -} diff --git a/node_modules/abstract-leveldown/node_modules/xtend/package.json b/node_modules/abstract-leveldown/node_modules/xtend/package.json deleted file mode 100644 index 8bac483a..00000000 --- a/node_modules/abstract-leveldown/node_modules/xtend/package.json +++ /dev/null @@ -1,121 +0,0 @@ -{ - "_args": [ - [ - { - "raw": "xtend@~3.0.0", - "scope": null, - "escapedName": "xtend", - "name": "xtend", - "rawSpec": "~3.0.0", - "spec": ">=3.0.0 <3.1.0", - "type": "range" - }, - "/Users/benjaminarias/Desktop/poly/node_modules/abstract-leveldown" - ] - ], - "_from": "xtend@>=3.0.0 <3.1.0", - "_id": "xtend@3.0.0", - "_inCache": true, - "_installable": true, - "_location": "/abstract-leveldown/xtend", - "_npmUser": { - "name": "raynos", - "email": "raynos2@gmail.com" - }, - "_npmVersion": "1.4.6", - "_phantomChildren": {}, - "_requested": { - "raw": "xtend@~3.0.0", - "scope": null, - "escapedName": "xtend", - "name": "xtend", - "rawSpec": "~3.0.0", - "spec": ">=3.0.0 <3.1.0", - "type": "range" - }, - "_requiredBy": [ - "/abstract-leveldown" - ], - "_resolved": "https://registry.npmjs.org/xtend/-/xtend-3.0.0.tgz", - "_shasum": "5cce7407baf642cba7becda568111c493f59665a", - "_shrinkwrap": null, - "_spec": "xtend@~3.0.0", - "_where": "/Users/benjaminarias/Desktop/poly/node_modules/abstract-leveldown", - "author": { - "name": "Raynos", - "email": "raynos2@gmail.com" - }, - "bugs": { - "url": "https://github.com/Raynos/xtend/issues", - "email": "raynos2@gmail.com" - }, - "contributors": [ - { - "name": "Jake Verbaten" - }, - { - "name": "Matt Esch" - } - ], - "dependencies": {}, - "description": "extend like a boss", - "devDependencies": { - "tape": "~1.1.0" - }, - "directories": {}, - "dist": { - "shasum": "5cce7407baf642cba7becda568111c493f59665a", - "tarball": "https://registry.npmjs.org/xtend/-/xtend-3.0.0.tgz" - }, - "engines": { - "node": ">=0.4" - }, - "homepage": "https://github.com/Raynos/xtend", - "keywords": [ - "extend", - "merge", - "options", - "opts", - "object", - "array" - ], - "licenses": [ - { - "type": "MIT", - "url": "http://github.com/raynos/xtend/raw/master/LICENSE" - } - ], - "main": "index", - "maintainers": [ - { - "name": "raynos", - "email": "raynos2@gmail.com" - } - ], - "name": "xtend", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git://github.com/Raynos/xtend.git" - }, - "scripts": { - "test": "node test" - }, - "testling": { - "files": "test.js", - "browsers": [ - "ie/7..latest", - "firefox/16..latest", - "firefox/nightly", - "chrome/22..latest", - "chrome/canary", - "opera/12..latest", - "opera/next", - "safari/5.1..latest", - "ipad/6.0..latest", - "iphone/6.0..latest" - ] - }, - "version": "3.0.0" -} diff --git a/node_modules/abstract-leveldown/node_modules/xtend/test.js b/node_modules/abstract-leveldown/node_modules/xtend/test.js deleted file mode 100644 index 3369d796..00000000 --- a/node_modules/abstract-leveldown/node_modules/xtend/test.js +++ /dev/null @@ -1,63 +0,0 @@ -var test = require("tape") -var extend = require("./") -var mutableExtend = require("./mutable") - -test("merge", function(assert) { - var a = { a: "foo" } - var b = { b: "bar" } - - assert.deepEqual(extend(a, b), { a: "foo", b: "bar" }) - assert.end() -}) - -test("replace", function(assert) { - var a = { a: "foo" } - var b = { a: "bar" } - - assert.deepEqual(extend(a, b), { a: "bar" }) - assert.end() -}) - -test("undefined", function(assert) { - var a = { a: undefined } - var b = { b: "foo" } - - assert.deepEqual(extend(a, b), { a: undefined, b: "foo" }) - assert.deepEqual(extend(b, a), { a: undefined, b: "foo" }) - assert.end() -}) - -test("handle 0", function(assert) { - var a = { a: "default" } - var b = { a: 0 } - - assert.deepEqual(extend(a, b), { a: 0 }) - assert.deepEqual(extend(b, a), { a: "default" }) - assert.end() -}) - -test("is immutable", function (assert) { - var record = {} - - extend(record, { foo: "bar" }) - assert.equal(record.foo, undefined) - assert.end() -}) - -test("null as argument", function (assert) { - var a = { foo: "bar" } - var b = null - var c = void 0 - - assert.deepEqual(extend(b, a, c), { foo: "bar" }) - assert.end() -}) - -test("mutable", function (assert) { - var a = { foo: "bar" } - - mutableExtend(a, { bar: "baz" }) - - assert.equal(a.bar, "baz") - assert.end() -}) diff --git a/node_modules/abstract-leveldown/package.json b/node_modules/abstract-leveldown/package.json deleted file mode 100644 index 206628d8..00000000 --- a/node_modules/abstract-leveldown/package.json +++ /dev/null @@ -1,158 +0,0 @@ -{ - "_args": [ - [ - { - "raw": "abstract-leveldown@~0.12.0", - "scope": null, - "escapedName": "abstract-leveldown", - "name": "abstract-leveldown", - "rawSpec": "~0.12.0", - "spec": ">=0.12.0 <0.13.0", - "type": "range" - }, - "/Users/benjaminarias/Desktop/poly/node_modules/level-js" - ] - ], - "_from": "abstract-leveldown@>=0.12.0 <0.13.0", - "_id": "abstract-leveldown@0.12.4", - "_inCache": true, - "_installable": true, - "_location": "/abstract-leveldown", - "_npmUser": { - "name": "rvagg", - "email": "rod@vagg.org" - }, - "_npmVersion": "1.4.14", - "_phantomChildren": {}, - "_requested": { - "raw": "abstract-leveldown@~0.12.0", - "scope": null, - "escapedName": "abstract-leveldown", - "name": "abstract-leveldown", - "rawSpec": "~0.12.0", - "spec": ">=0.12.0 <0.13.0", - "type": "range" - }, - "_requiredBy": [ - "/deferred-leveldown", - "/level-js" - ], - "_resolved": "https://registry.npmjs.org/abstract-leveldown/-/abstract-leveldown-0.12.4.tgz", - "_shasum": "29e18e632e60e4e221d5810247852a63d7b2e410", - "_shrinkwrap": null, - "_spec": "abstract-leveldown@~0.12.0", - "_where": "/Users/benjaminarias/Desktop/poly/node_modules/level-js", - "browser": { - "rimraf": false - }, - "bugs": { - "url": "https://github.com/rvagg/node-abstract-leveldown/issues" - }, - "contributors": [ - { - "name": "Rod Vagg", - "email": "r@va.gg", - "url": "https://github.com/rvagg" - }, - { - "name": "John Chesley", - "email": "john@chesl.es", - "url": "https://github.com/chesles/" - }, - { - "name": "Jake Verbaten", - "email": "raynos2@gmail.com", - "url": "https://github.com/raynos" - }, - { - "name": "Dominic Tarr", - "email": "dominic.tarr@gmail.com", - "url": "https://github.com/dominictarr" - }, - { - "name": "Max Ogden", - "email": "max@maxogden.com", - "url": "https://github.com/maxogden" - }, - { - "name": "Lars-Magnus Skog", - "email": "lars.magnus.skog@gmail.com", - "url": "https://github.com/ralphtheninja" - }, - { - "name": "David Björklund", - "email": "david.bjorklund@gmail.com", - "url": "https://github.com/kesla" - }, - { - "name": "Julian Gruber", - "email": "julian@juliangruber.com", - "url": "https://github.com/juliangruber" - }, - { - "name": "Paolo Fragomeni", - "email": "paolo@async.ly", - "url": "https://github.com/hij1nx" - }, - { - "name": "Anton Whalley", - "email": "anton.whalley@nearform.com", - "url": "https://github.com/No9" - }, - { - "name": "Matteo Collina", - "email": "matteo.collina@gmail.com", - "url": "https://github.com/mcollina" - }, - { - "name": "Pedro Teixeira", - "email": "pedro.teixeira@gmail.com", - "url": "https://github.com/pgte" - }, - { - "name": "James Halliday", - "email": "mail@substack.net", - "url": "https://github.com/substack" - } - ], - "dependencies": { - "xtend": "~3.0.0" - }, - "description": "An abstract prototype matching the LevelDOWN API", - "devDependencies": { - "rimraf": "*", - "sinon": "*", - "tap": "*" - }, - "directories": {}, - "dist": { - "shasum": "29e18e632e60e4e221d5810247852a63d7b2e410", - "tarball": "https://registry.npmjs.org/abstract-leveldown/-/abstract-leveldown-0.12.4.tgz" - }, - "gitHead": "7be6adfe726ccb23e52fd803ade008e85f072cd3", - "homepage": "https://github.com/rvagg/node-abstract-leveldown", - "keywords": [ - "leveldb", - "leveldown", - "levelup" - ], - "license": "MIT", - "main": "./abstract-leveldown.js", - "maintainers": [ - { - "name": "rvagg", - "email": "rod@vagg.org" - } - ], - "name": "abstract-leveldown", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git+https://github.com/rvagg/node-abstract-leveldown.git" - }, - "scripts": { - "test": "node ./test.js" - }, - "version": "0.12.4" -} diff --git a/node_modules/abstract-leveldown/test.js b/node_modules/abstract-leveldown/test.js deleted file mode 100644 index 4ec28702..00000000 --- a/node_modules/abstract-leveldown/test.js +++ /dev/null @@ -1,559 +0,0 @@ -const tap = require('tap') - , sinon = require('sinon') - , util = require('util') - , testCommon = require('./testCommon') - , AbstractLevelDOWN = require('./').AbstractLevelDOWN - , AbstractIterator = require('./').AbstractIterator - , AbstractChainedBatch = require('./').AbstractChainedBatch - -function factory (location) { - return new AbstractLevelDOWN(location) -} - -/*** compatibility with basic LevelDOWN API ***/ - -require('./abstract/leveldown-test').args(factory, tap.test, testCommon) - -require('./abstract/open-test').args(factory, tap.test, testCommon) - -require('./abstract/del-test').setUp(factory, tap.test, testCommon) -require('./abstract/del-test').args(tap.test) - -require('./abstract/get-test').setUp(factory, tap.test, testCommon) -require('./abstract/get-test').args(tap.test) - -require('./abstract/put-test').setUp(factory, tap.test, testCommon) -require('./abstract/put-test').args(tap.test) - -require('./abstract/put-get-del-test').setUp(factory, tap.test, testCommon) -require('./abstract/put-get-del-test').errorKeys(tap.test) -//require('./abstract/put-get-del-test').nonErrorKeys(tap.test, testCommon) -require('./abstract/put-get-del-test').errorValues(tap.test) -//require('./abstract/test/put-get-del-test').nonErrorKeys(tap.test, testCommon) -require('./abstract/put-get-del-test').tearDown(tap.test, testCommon) - -require('./abstract/approximate-size-test').setUp(factory, tap.test, testCommon) -require('./abstract/approximate-size-test').args(tap.test) - -require('./abstract/batch-test').setUp(factory, tap.test, testCommon) -require('./abstract/batch-test').args(tap.test) - -require('./abstract/chained-batch-test').setUp(factory, tap.test, testCommon) -require('./abstract/chained-batch-test').args(tap.test) - -require('./abstract/close-test').close(factory, tap.test, testCommon) - -require('./abstract/iterator-test').setUp(factory, tap.test, testCommon) -require('./abstract/iterator-test').args(tap.test) -require('./abstract/iterator-test').sequence(tap.test) - -/*** extensibility ***/ - -tap.test('test core extensibility', function (t) { - function Test (location) { - AbstractLevelDOWN.call(this, location) - t.equal(this.location, location, 'location set on `this`') - t.end() - } - - util.inherits(Test, AbstractLevelDOWN) - - ;new Test('foobar') -}) - -tap.test('test open() extensibility', function (t) { - var spy = sinon.spy() - , expectedCb = function () {} - , expectedOptions = { options: 1 } - , test - - function Test (location) { - AbstractLevelDOWN.call(this, location) - } - - util.inherits(Test, AbstractLevelDOWN) - - Test.prototype._open = spy - - test = new Test('foobar') - test.open(expectedCb) - - t.equal(spy.callCount, 1, 'got _open() call') - t.equal(spy.getCall(0).thisValue, test, '`this` on _open() was correct') - t.equal(spy.getCall(0).args.length, 2, 'got two arguments') - t.deepEqual(spy.getCall(0).args[0], {}, 'got blank options argument') - t.equal(spy.getCall(0).args[1], expectedCb, 'got expected cb argument') - - test.open(expectedOptions, expectedCb) - - t.equal(spy.callCount, 2, 'got _open() call') - t.equal(spy.getCall(1).thisValue, test, '`this` on _open() was correct') - t.equal(spy.getCall(1).args.length, 2, 'got two arguments') - t.deepEqual(spy.getCall(1).args[0], expectedOptions, 'got blank options argument') - t.equal(spy.getCall(1).args[1], expectedCb, 'got expected cb argument') - t.end() -}) - -tap.test('test close() extensibility', function (t) { - var spy = sinon.spy() - , expectedCb = function () {} - , test - - function Test (location) { - AbstractLevelDOWN.call(this, location) - } - - util.inherits(Test, AbstractLevelDOWN) - - Test.prototype._close = spy - - test = new Test('foobar') - test.close(expectedCb) - - t.equal(spy.callCount, 1, 'got _close() call') - t.equal(spy.getCall(0).thisValue, test, '`this` on _close() was correct') - t.equal(spy.getCall(0).args.length, 1, 'got one arguments') - t.equal(spy.getCall(0).args[0], expectedCb, 'got expected cb argument') - t.end() -}) - -tap.test('test get() extensibility', function (t) { - var spy = sinon.spy() - , expectedCb = function () {} - , expectedOptions = { options: 1 } - , expectedKey = 'a key' - , test - - function Test (location) { - AbstractLevelDOWN.call(this, location) - } - - util.inherits(Test, AbstractLevelDOWN) - - Test.prototype._get = spy - - test = new Test('foobar') - test.get(expectedKey, expectedCb) - - t.equal(spy.callCount, 1, 'got _get() call') - t.equal(spy.getCall(0).thisValue, test, '`this` on _get() was correct') - t.equal(spy.getCall(0).args.length, 3, 'got three arguments') - t.equal(spy.getCall(0).args[0], expectedKey, 'got expected key argument') - t.deepEqual(spy.getCall(0).args[1], {}, 'got blank options argument') - t.equal(spy.getCall(0).args[2], expectedCb, 'got expected cb argument') - - test.get(expectedKey, expectedOptions, expectedCb) - - t.equal(spy.callCount, 2, 'got _get() call') - t.equal(spy.getCall(1).thisValue, test, '`this` on _get() was correct') - t.equal(spy.getCall(1).args.length, 3, 'got three arguments') - t.equal(spy.getCall(1).args[0], expectedKey, 'got expected key argument') - t.deepEqual(spy.getCall(1).args[1], expectedOptions, 'got blank options argument') - t.equal(spy.getCall(1).args[2], expectedCb, 'got expected cb argument') - t.end() -}) - -tap.test('test del() extensibility', function (t) { - var spy = sinon.spy() - , expectedCb = function () {} - , expectedOptions = { options: 1 } - , expectedKey = 'a key' - , test - - function Test (location) { - AbstractLevelDOWN.call(this, location) - } - - util.inherits(Test, AbstractLevelDOWN) - - Test.prototype._del = spy - - test = new Test('foobar') - test.del(expectedKey, expectedCb) - - t.equal(spy.callCount, 1, 'got _del() call') - t.equal(spy.getCall(0).thisValue, test, '`this` on _del() was correct') - t.equal(spy.getCall(0).args.length, 3, 'got three arguments') - t.equal(spy.getCall(0).args[0], expectedKey, 'got expected key argument') - t.deepEqual(spy.getCall(0).args[1], {}, 'got blank options argument') - t.equal(spy.getCall(0).args[2], expectedCb, 'got expected cb argument') - - test.del(expectedKey, expectedOptions, expectedCb) - - t.equal(spy.callCount, 2, 'got _del() call') - t.equal(spy.getCall(1).thisValue, test, '`this` on _del() was correct') - t.equal(spy.getCall(1).args.length, 3, 'got three arguments') - t.equal(spy.getCall(1).args[0], expectedKey, 'got expected key argument') - t.deepEqual(spy.getCall(1).args[1], expectedOptions, 'got blank options argument') - t.equal(spy.getCall(1).args[2], expectedCb, 'got expected cb argument') - t.end() -}) - -tap.test('test put() extensibility', function (t) { - var spy = sinon.spy() - , expectedCb = function () {} - , expectedOptions = { options: 1 } - , expectedKey = 'a key' - , expectedValue = 'a value' - , test - - function Test (location) { - AbstractLevelDOWN.call(this, location) - } - - util.inherits(Test, AbstractLevelDOWN) - - Test.prototype._put = spy - - test = new Test('foobar') - test.put(expectedKey, expectedValue, expectedCb) - - t.equal(spy.callCount, 1, 'got _put() call') - t.equal(spy.getCall(0).thisValue, test, '`this` on _put() was correct') - t.equal(spy.getCall(0).args.length, 4, 'got four arguments') - t.equal(spy.getCall(0).args[0], expectedKey, 'got expected key argument') - t.equal(spy.getCall(0).args[1], expectedValue, 'got expected value argument') - t.deepEqual(spy.getCall(0).args[2], {}, 'got blank options argument') - t.equal(spy.getCall(0).args[3], expectedCb, 'got expected cb argument') - - test.put(expectedKey, expectedValue, expectedOptions, expectedCb) - - t.equal(spy.callCount, 2, 'got _put() call') - t.equal(spy.getCall(1).thisValue, test, '`this` on _put() was correct') - t.equal(spy.getCall(1).args.length, 4, 'got four arguments') - t.equal(spy.getCall(1).args[0], expectedKey, 'got expected key argument') - t.equal(spy.getCall(1).args[1], expectedValue, 'got expected value argument') - t.deepEqual(spy.getCall(1).args[2], expectedOptions, 'got blank options argument') - t.equal(spy.getCall(1).args[3], expectedCb, 'got expected cb argument') - t.end() -}) - -tap.test('test approximateSize() extensibility', function (t) { - var spy = sinon.spy() - , expectedCb = function () {} - , expectedStart = 'a start' - , expectedEnd = 'an end' - , test - - function Test (location) { - AbstractLevelDOWN.call(this, location) - } - - util.inherits(Test, AbstractLevelDOWN) - - Test.prototype._approximateSize = spy - - test = new Test('foobar') - test.approximateSize(expectedStart, expectedEnd, expectedCb) - - t.equal(spy.callCount, 1, 'got _approximateSize() call') - t.equal(spy.getCall(0).thisValue, test, '`this` on _approximateSize() was correct') - t.equal(spy.getCall(0).args.length, 3, 'got three arguments') - t.equal(spy.getCall(0).args[0], expectedStart, 'got expected start argument') - t.equal(spy.getCall(0).args[1], expectedEnd, 'got expected end argument') - t.equal(spy.getCall(0).args[2], expectedCb, 'got expected cb argument') - t.end() -}) - -tap.test('test batch() extensibility', function (t) { - var spy = sinon.spy() - , expectedCb = function () {} - , expectedOptions = { options: 1 } - , expectedArray = [ 1, 2 ] - , test - - function Test (location) { - AbstractLevelDOWN.call(this, location) - } - - util.inherits(Test, AbstractLevelDOWN) - - Test.prototype._batch = spy - - test = new Test('foobar') - - test.batch(expectedArray, expectedCb) - - t.equal(spy.callCount, 1, 'got _batch() call') - t.equal(spy.getCall(0).thisValue, test, '`this` on _batch() was correct') - t.equal(spy.getCall(0).args.length, 3, 'got three arguments') - t.equal(spy.getCall(0).args[0], expectedArray, 'got expected array argument') - t.deepEqual(spy.getCall(0).args[1], {}, 'got expected options argument') - t.equal(spy.getCall(0).args[2], expectedCb, 'got expected callback argument') - - test.batch(expectedArray, expectedOptions, expectedCb) - - t.equal(spy.callCount, 2, 'got _batch() call') - t.equal(spy.getCall(1).thisValue, test, '`this` on _batch() was correct') - t.equal(spy.getCall(1).args.length, 3, 'got three arguments') - t.equal(spy.getCall(1).args[0], expectedArray, 'got expected array argument') - t.deepEqual(spy.getCall(1).args[1], expectedOptions, 'got expected options argument') - t.equal(spy.getCall(1).args[2], expectedCb, 'got expected callback argument') - - t.end() -}) - -tap.test('test chained batch() (array) extensibility', function (t) { - var spy = sinon.spy() - , expectedCb = function () {} - , expectedOptions = { options: 1 } - , expectedArray = [ 1, 2 ] - , test - - function Test (location) { - AbstractLevelDOWN.call(this, location) - } - - util.inherits(Test, AbstractLevelDOWN) - - Test.prototype._batch = spy - - test = new Test('foobar') - - test.batch().put('foo', 'bar').del('bang').write(expectedCb) - - t.equal(spy.callCount, 1, 'got _batch() call') - t.equal(spy.getCall(0).thisValue, test, '`this` on _batch() was correct') - t.equal(spy.getCall(0).args.length, 3, 'got three arguments') - t.equal(spy.getCall(0).args[0].length, 2, 'got expected array argument') - t.deepEqual(spy.getCall(0).args[0][0], { type: 'put', key: 'foo', value: 'bar' }, 'got expected array argument[0]') - t.deepEqual(spy.getCall(0).args[0][1], { type: 'del', key: 'bang' }, 'got expected array argument[1]') - t.deepEqual(spy.getCall(0).args[1], {}, 'got expected options argument') - t.equal(spy.getCall(0).args[2], expectedCb, 'got expected callback argument') - - test.batch().put('foo', 'bar').del('bang').write(expectedOptions, expectedCb) - - t.equal(spy.callCount, 2, 'got _batch() call') - t.equal(spy.getCall(1).thisValue, test, '`this` on _batch() was correct') - t.equal(spy.getCall(1).args.length, 3, 'got three arguments') - t.equal(spy.getCall(1).args[0].length, 2, 'got expected array argument') - t.deepEqual(spy.getCall(1).args[0][0], { type: 'put', key: 'foo', value: 'bar' }, 'got expected array argument[0]') - t.deepEqual(spy.getCall(1).args[0][1], { type: 'del', key: 'bang' }, 'got expected array argument[1]') - t.deepEqual(spy.getCall(1).args[1], expectedOptions, 'got expected options argument') - t.equal(spy.getCall(1).args[2], expectedCb, 'got expected callback argument') - - t.end() -}) - -tap.test('test chained batch() (custom _chainedBatch) extensibility', function (t) { - var spy = sinon.spy() - , test - - function Test (location) { - AbstractLevelDOWN.call(this, location) - } - - util.inherits(Test, AbstractLevelDOWN) - - Test.prototype._chainedBatch = spy - - test = new Test('foobar') - - test.batch() - - t.equal(spy.callCount, 1, 'got _chainedBatch() call') - t.equal(spy.getCall(0).thisValue, test, '`this` on _chainedBatch() was correct') - - test.batch() - - t.equal(spy.callCount, 2, 'got _chainedBatch() call') - t.equal(spy.getCall(1).thisValue, test, '`this` on _chainedBatch() was correct') - - t.end() -}) - -tap.test('test AbstractChainedBatch extensibility', function (t) { - function Test (db) { - AbstractChainedBatch.call(this, db) - t.equal(this._db, db, 'db set on `this`') - t.end() - } - - util.inherits(Test, AbstractChainedBatch) - - new Test('foobar') -}) - -tap.test('test write() extensibility', function (t) { - var spy = sinon.spy() - , spycb = sinon.spy() - , test - - function Test (db) { - AbstractChainedBatch.call(this, db) - } - - util.inherits(Test, AbstractChainedBatch) - - Test.prototype._write = spy - - test = new Test('foobar') - test.write(spycb) - - t.equal(spy.callCount, 1, 'got _write() call') - t.equal(spy.getCall(0).thisValue, test, '`this` on _write() was correct') - t.equal(spy.getCall(0).args.length, 1, 'got one argument') - // awkward here cause of nextTick & an internal wrapped cb - t.type(spy.getCall(0).args[0], 'function', 'got a callback function') - t.equal(spycb.callCount, 0, 'spycb not called') - spy.getCall(0).args[0]() - t.equal(spycb.callCount, 1, 'spycb called, i.e. was our cb argument') - t.end() -}) - -tap.test('test put() extensibility', function (t) { - var spy = sinon.spy() - , expectedKey = 'key' - , expectedValue = 'value' - , returnValue - , test - - function Test (db) { - AbstractChainedBatch.call(this, db) - } - - util.inherits(Test, AbstractChainedBatch) - - Test.prototype._put = spy - - test = new Test(factory('foobar')) - returnValue = test.put(expectedKey, expectedValue) - t.equal(spy.callCount, 1, 'got _put call') - t.equal(spy.getCall(0).thisValue, test, '`this` on _put() was correct') - t.equal(spy.getCall(0).args.length, 2, 'got two arguments') - t.equal(spy.getCall(0).args[0], expectedKey, 'got expected key argument') - t.equal(spy.getCall(0).args[1], expectedValue, 'got expected value argument') - t.equal(returnValue, test, 'get expected return value') - t.end() -}) - -tap.test('test del() extensibility', function (t) { - var spy = sinon.spy() - , expectedKey = 'key' - , returnValue - , test - - function Test (db) { - AbstractChainedBatch.call(this, db) - } - - util.inherits(Test, AbstractChainedBatch) - - Test.prototype._del = spy - - test = new Test(factory('foobar')) - returnValue = test.del(expectedKey) - t.equal(spy.callCount, 1, 'got _del call') - t.equal(spy.getCall(0).thisValue, test, '`this` on _del() was correct') - t.equal(spy.getCall(0).args.length, 1, 'got one argument') - t.equal(spy.getCall(0).args[0], expectedKey, 'got expected key argument') - t.equal(returnValue, test, 'get expected return value') - t.end() -}) - -tap.test('test clear() extensibility', function (t) { - var spy = sinon.spy() - , returnValue - , test - - function Test (db) { - AbstractChainedBatch.call(this, db) - } - - util.inherits(Test, AbstractChainedBatch) - - Test.prototype._clear = spy - - test = new Test(factory('foobar')) - returnValue = test.clear() - t.equal(spy.callCount, 1, 'got _clear call') - t.equal(spy.getCall(0).thisValue, test, '`this` on _clear() was correct') - t.equal(spy.getCall(0).args.length, 0, 'got zero arguments') - t.equal(returnValue, test, 'get expected return value') - t.end() -}) - -tap.test('test iterator() extensibility', function (t) { - var spy = sinon.spy() - , expectedOptions = { options: 1, reverse: false } // reverse now explicitly set - , test - - function Test (location) { - AbstractLevelDOWN.call(this, location) - } - - util.inherits(Test, AbstractLevelDOWN) - - Test.prototype._iterator = spy - - test = new Test('foobar') - test.iterator({ options: 1 }) - - t.equal(spy.callCount, 1, 'got _close() call') - t.equal(spy.getCall(0).thisValue, test, '`this` on _close() was correct') - t.equal(spy.getCall(0).args.length, 1, 'got one arguments') - t.deepEqual(spy.getCall(0).args[0], expectedOptions, 'got expected options argument') - t.end() -}) - -tap.test('test AbstractIterator extensibility', function (t) { - function Test (db) { - AbstractIterator.call(this, db) - t.equal(this.db, db, 'db set on `this`') - t.end() - } - - util.inherits(Test, AbstractIterator) - - ;new Test('foobar') -}) - -tap.test('test next() extensibility', function (t) { - var spy = sinon.spy() - , spycb = sinon.spy() - , test - - function Test (db) { - AbstractIterator.call(this, db) - } - - util.inherits(Test, AbstractIterator) - - Test.prototype._next = spy - - test = new Test('foobar') - test.next(spycb) - - t.equal(spy.callCount, 1, 'got _next() call') - t.equal(spy.getCall(0).thisValue, test, '`this` on _next() was correct') - t.equal(spy.getCall(0).args.length, 1, 'got one arguments') - // awkward here cause of nextTick & an internal wrapped cb - t.type(spy.getCall(0).args[0], 'function', 'got a callback function') - t.equal(spycb.callCount, 0, 'spycb not called') - spy.getCall(0).args[0]() - t.equal(spycb.callCount, 1, 'spycb called, i.e. was our cb argument') - t.end() -}) - -tap.test('test end() extensibility', function (t) { - var spy = sinon.spy() - , expectedCb = function () {} - , test - - function Test (db) { - AbstractIterator.call(this, db) - } - - util.inherits(Test, AbstractIterator) - - Test.prototype._end = spy - - test = new Test('foobar') - test.end(expectedCb) - - t.equal(spy.callCount, 1, 'got _end() call') - t.equal(spy.getCall(0).thisValue, test, '`this` on _end() was correct') - t.equal(spy.getCall(0).args.length, 1, 'got one arguments') - t.equal(spy.getCall(0).args[0], expectedCb, 'got expected cb argument') - t.end() -}) diff --git a/node_modules/abstract-leveldown/testCommon.js b/node_modules/abstract-leveldown/testCommon.js deleted file mode 100644 index 3f9d29da..00000000 --- a/node_modules/abstract-leveldown/testCommon.js +++ /dev/null @@ -1,75 +0,0 @@ -var path = require('path') - , fs = !process.browser && require('fs') - , rimraf = !process.browser && require('rimraf') - -var dbidx = 0 - - , location = function () { - return path.join(__dirname, '_leveldown_test_db_' + dbidx++) - } - - , lastLocation = function () { - return path.join(__dirname, '_leveldown_test_db_' + dbidx) - } - - , cleanup = function (callback) { - if (process.browser) - return callback() - - fs.readdir(__dirname, function (err, list) { - if (err) return callback(err) - - list = list.filter(function (f) { - return (/^_leveldown_test_db_/).test(f) - }) - - if (!list.length) - return callback() - - var ret = 0 - - list.forEach(function (f) { - rimraf(path.join(__dirname, f), function (err) { - if (++ret == list.length) - callback() - }) - }) - }) - } - - , setUp = function (t) { - cleanup(function (err) { - t.notOk(err, 'cleanup returned an error') - t.end() - }) - } - - , tearDown = function (t) { - setUp(t) // same cleanup! - } - - , collectEntries = function (iterator, callback) { - var data = [] - , next = function () { - iterator.next(function (err, key, value) { - if (err) return callback(err) - if (!arguments.length) { - return iterator.end(function (err) { - callback(err, data) - }) - } - data.push({ key: key, value: value }) - process.nextTick(next) - }) - } - next() - } - -module.exports = { - location : location - , cleanup : cleanup - , lastLocation : lastLocation - , setUp : setUp - , tearDown : tearDown - , collectEntries : collectEntries -} diff --git a/node_modules/acorn/.editorconfig b/node_modules/acorn/.editorconfig deleted file mode 100644 index c14d5c67..00000000 --- a/node_modules/acorn/.editorconfig +++ /dev/null @@ -1,7 +0,0 @@ -root = true - -[*] -indent_style = space -indent_size = 2 -end_of_line = lf -insert_final_newline = true diff --git a/node_modules/acorn/.gitattributes b/node_modules/acorn/.gitattributes deleted file mode 100644 index fcadb2cf..00000000 --- a/node_modules/acorn/.gitattributes +++ /dev/null @@ -1 +0,0 @@ -* text eol=lf diff --git a/node_modules/acorn/.npmignore b/node_modules/acorn/.npmignore deleted file mode 100644 index ecba2911..00000000 --- a/node_modules/acorn/.npmignore +++ /dev/null @@ -1,3 +0,0 @@ -/.tern-port -/test -/local diff --git a/node_modules/acorn/.tern-project b/node_modules/acorn/.tern-project deleted file mode 100644 index 9e26dfee..00000000 --- a/node_modules/acorn/.tern-project +++ /dev/null @@ -1 +0,0 @@ -{} \ No newline at end of file diff --git a/node_modules/acorn/.travis.yml b/node_modules/acorn/.travis.yml deleted file mode 100644 index ffb9f710..00000000 --- a/node_modules/acorn/.travis.yml +++ /dev/null @@ -1,2 +0,0 @@ -language: node_js -node_js: '0.10' diff --git a/node_modules/acorn/AUTHORS b/node_modules/acorn/AUTHORS deleted file mode 100644 index 0fb284bb..00000000 --- a/node_modules/acorn/AUTHORS +++ /dev/null @@ -1,38 +0,0 @@ -List of Acorn contributors. Updated before every release. - -Adrian Rakovsky -Alistair Braidwood -Andres Suarez -Aparajita Fishman -Arian Stolwijk -Artem Govorov -Brandon Mills -Charles Hughes -Conrad Irwin -David Bonnet -Forbes Lindesay -Gilad Peleg -impinball -Ingvar Stepanyan -Jiaxing Wang -Johannes Herr -Jürg Lehni -keeyipchan -krator -Marijn Haverbeke -Martin Carlberg -Mathias Bynens -Mathieu 'p01' Henri -Max Schaefer -Max Zerzouri -Mihai Bazon -Mike Rennie -Nick Fitzgerald -Oskar Schöldström -Paul Harper -Peter Rust -PlNG -r-e-d -Rich Harris -Sebastian McKenzie -zsjforcn diff --git a/node_modules/acorn/LICENSE b/node_modules/acorn/LICENSE deleted file mode 100644 index d4c7fc58..00000000 --- a/node_modules/acorn/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (C) 2012-2014 by various contributors (see AUTHORS) - -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/node_modules/acorn/README.md b/node_modules/acorn/README.md deleted file mode 100644 index ec22d521..00000000 --- a/node_modules/acorn/README.md +++ /dev/null @@ -1,377 +0,0 @@ -# Acorn - -[![Build Status](https://travis-ci.org/marijnh/acorn.svg?branch=master)](https://travis-ci.org/marijnh/acorn) -[![NPM version](https://img.shields.io/npm/v/acorn.svg)](https://www.npmjs.org/package/acorn) -[Author funding status: ![maintainer happiness](https://marijnhaverbeke.nl/fund/status_s.png?force)](https://marijnhaverbeke.nl/fund/) - -A tiny, fast JavaScript parser, written completely in JavaScript. - -## Installation - -The easiest way to install acorn is with [`npm`][npm]. - -[npm]: http://npmjs.org - -```sh -npm install acorn -``` - -Alternately, download the source. - -```sh -git clone https://github.com/marijnh/acorn.git -``` - -## Components - -When run in a CommonJS (node.js) or AMD environment, exported values -appear in the interfaces exposed by the individual files, as usual. -When loaded in the browser (Acorn works in any JS-enabled browser more -recent than IE5) without any kind of module management, a single -global object `acorn` will be defined, and all the exported properties -will be added to that. - -### Main parser - -This is implemented in `dist/acorn.js`, and is what you get when you -`require("acorn")` in node.js. - -**parse**`(input, options)` is used to parse a JavaScript program. -The `input` parameter is a string, `options` can be undefined or an -object setting some of the options listed below. The return value will -be an abstract syntax tree object as specified by the -[Mozilla Parser API][mozapi]. - -When encountering a syntax error, the parser will raise a -`SyntaxError` object with a meaningful message. The error object will -have a `pos` property that indicates the character offset at which the -error occurred, and a `loc` object that contains a `{line, column}` -object referring to that same position. - -[mozapi]: https://developer.mozilla.org/en-US/docs/SpiderMonkey/Parser_API - -- **ecmaVersion**: Indicates the ECMAScript version to parse. Must be - either 3, 5, or 6. This influences support for strict mode, the set - of reserved words, and support for new syntax features. Default is 5. - -- **sourceType**: Indicate the mode the code should be parsed in. Can be - either `"script"` or `"module"`. - -- **onInsertedSemicolon**: If given a callback, that callback will be - called whenever a missing semicolon is inserted by the parser. The - callback will be given the character offset of the point where the - semicolon is inserted as argument, and if `locations` is on, also a - `{line, column}` object representing this position. - -- **onTrailingComma**: Like `onInsertedSemicolon`, but for trailing - commas. - -- **allowReserved**: If `false`, using a reserved word will generate - an error. Defaults to `true`. When given the value `"never"`, - reserved words and keywords can also not be used as property names - (as in Internet Explorer's old parser). - -- **allowReturnOutsideFunction**: By default, a return statement at - the top level raises an error. Set this to `true` to accept such - code. - -- **allowImportExportEverywhere**: By default, `import` and `export` - declarations can only appear at a program's top level. Setting this - option to `true` allows them anywhere where a statement is allowed. - -- **allowHashBang**: When this is enabled (off by default), if the - code starts with the characters `#!` (as in a shellscript), the - first line will be treated as a comment. - -- **locations**: When `true`, each node has a `loc` object attached - with `start` and `end` subobjects, each of which contains the - one-based line and zero-based column numbers in `{line, column}` - form. Default is `false`. - -- **onToken**: If a function is passed for this option, each found - token will be passed in same format as `tokenize()` returns. - - If array is passed, each found token is pushed to it. - - Note that you are not allowed to call the parser from the - callback—that will corrupt its internal state. - -- **onComment**: If a function is passed for this option, whenever a - comment is encountered the function will be called with the - following parameters: - - - `block`: `true` if the comment is a block comment, false if it - is a line comment. - - `text`: The content of the comment. - - `start`: Character offset of the start of the comment. - - `end`: Character offset of the end of the comment. - - When the `locations` options is on, the `{line, column}` locations - of the comment’s start and end are passed as two additional - parameters. - - If array is passed for this option, each found comment is pushed - to it as object in Esprima format: - - ```javascript - { - "type": "Line" | "Block", - "value": "comment text", - "range": ..., - "loc": ... - } - ``` - - Note that you are not allowed to call the parser from the - callback—that will corrupt its internal state. - -- **ranges**: Nodes have their start and end characters offsets - recorded in `start` and `end` properties (directly on the node, - rather than the `loc` object, which holds line/column data. To also - add a [semi-standardized][range] "range" property holding a - `[start, end]` array with the same numbers, set the `ranges` option - to `true`. - -- **program**: It is possible to parse multiple files into a single - AST by passing the tree produced by parsing the first file as the - `program` option in subsequent parses. This will add the toplevel - forms of the parsed file to the "Program" (top) node of an existing - parse tree. - -- **sourceFile**: When the `locations` option is `true`, you can pass - this option to add a `source` attribute in every node’s `loc` - object. Note that the contents of this option are not examined or - processed in any way; you are free to use whatever format you - choose. - -- **directSourceFile**: Like `sourceFile`, but a `sourceFile` property - will be added directly to the nodes, rather than the `loc` object. - -- **preserveParens**: If this option is `true`, parenthesized expressions - are represented by (non-standard) `ParenthesizedExpression` nodes - that have a single `expression` property containing the expression - inside parentheses. - -[range]: https://bugzilla.mozilla.org/show_bug.cgi?id=745678 - -**parseExpressionAt**`(input, offset, options)` will parse a single -expression in a string, and return its AST. It will not complain if -there is more of the string left after the expression. - -**getLineInfo**`(input, offset)` can be used to get a `{line, -column}` object for a given program string and character offset. - -**tokenizer**`(input, options)` returns an object with a `getToken` -method that can be called repeatedly to get the next token, a `{start, -end, type, value}` object (with added `loc` property when the -`locations` option is enabled and `range` property when the `ranges` -option is enabled). When the token's type is `tokTypes.eof`, you -should stop calling the method, since it will keep returning that same -token forever. - -In ES6 environment, returned result can be used as any other -protocol-compliant iterable: - -```javascript -for (let token of acorn.tokenize(str)) { - // iterate over the tokens -} - -// transform code to array of tokens: -var tokens = [...acorn.tokenize(str)]; -``` - -**tokTypes** holds an object mapping names to the token type objects -that end up in the `type` properties of tokens. - -#### Note on using with [Escodegen][escodegen] - -Escodegen supports generating comments from AST, attached in -Esprima-specific format. In order to simulate same format in -Acorn, consider following example: - -```javascript -var comments = [], tokens = []; - -var ast = acorn.parse('var x = 42; // answer', { - // collect ranges for each node - ranges: true, - // collect comments in Esprima's format - onComment: comments, - // collect token ranges - onToken: tokens -}); - -// attach comments using collected information -escodegen.attachComments(ast, comments, tokens); - -// generate code -console.log(escodegen.generate(ast, {comment: true})); -// > 'var x = 42; // answer' -``` - -[escodegen]: https://github.com/Constellation/escodegen - -#### Using Acorn in an environment with a Content Security Policy - -Some contexts, such as Chrome Web Apps, disallow run-time code evaluation. -Acorn uses `new Function` to generate fast functions that test whether -a word is in a given set, and will trigger a security error when used -in a context with such a -[Content Security Policy](http://www.html5rocks.com/en/tutorials/security/content-security-policy/#eval-too) -(see [#90](https://github.com/marijnh/acorn/issues/90) and -[#123](https://github.com/marijnh/acorn/issues/123)). - -The `dist/acorn_csp.js` file in the distribution (which is built -by the `bin/without_eval` script) has the generated code inlined, and -can thus run without evaluating anything. - -### dist/acorn_loose.js ### - -This file implements an error-tolerant parser. It exposes a single -function. - -**parse_dammit**`(input, options)` takes the same arguments and -returns the same syntax tree as the `parse` function in `acorn.js`, -but never raises an error, and will do its best to parse syntactically -invalid code in as meaningful a way as it can. It'll insert identifier -nodes with name `"✖"` as placeholders in places where it can't make -sense of the input. Depends on `acorn.js`, because it uses the same -tokenizer. - -### dist/walk.js ### - -Implements an abstract syntax tree walker. Will store its interface in -`acorn.walk` when loaded without a module system. - -**simple**`(node, visitors, base, state)` does a 'simple' walk over -a tree. `node` should be the AST node to walk, and `visitors` an -object with properties whose names correspond to node types in the -[Mozilla Parser API][mozapi]. The properties should contain functions -that will be called with the node object and, if applicable the state -at that point. The last two arguments are optional. `base` is a walker -algorithm, and `state` is a start state. The default walker will -simply visit all statements and expressions and not produce a -meaningful state. (An example of a use of state it to track scope at -each point in the tree.) - -**ancestor**`(node, visitors, base, state)` does a 'simple' walk over -a tree, building up an array of ancestor nodes (including the current node) -and passing the array to callbacks in the `state` parameter. - -**recursive**`(node, state, functions, base)` does a 'recursive' -walk, where the walker functions are responsible for continuing the -walk on the child nodes of their target node. `state` is the start -state, and `functions` should contain an object that maps node types -to walker functions. Such functions are called with `(node, state, c)` -arguments, and can cause the walk to continue on a sub-node by calling -the `c` argument on it with `(node, state)` arguments. The optional -`base` argument provides the fallback walker functions for node types -that aren't handled in the `functions` object. If not given, the -default walkers will be used. - -**make**`(functions, base)` builds a new walker object by using the -walker functions in `functions` and filling in the missing ones by -taking defaults from `base`. - -**findNodeAt**`(node, start, end, test, base, state)` tries to -locate a node in a tree at the given start and/or end offsets, which -satisfies the predicate `test`. `start` end `end` can be either `null` -(as wildcard) or a number. `test` may be a string (indicating a node -type) or a function that takes `(nodeType, node)` arguments and -returns a boolean indicating whether this node is interesting. `base` -and `state` are optional, and can be used to specify a custom walker. -Nodes are tested from inner to outer, so if two nodes match the -boundaries, the inner one will be preferred. - -**findNodeAround**`(node, pos, test, base, state)` is a lot like -`findNodeAt`, but will match any node that exists 'around' (spanning) -the given position. - -**findNodeAfter**`(node, pos, test, base, state)` is similar to -`findNodeAround`, but will match all nodes *after* the given position -(testing outer nodes before inner nodes). - -## Command line interface - -The `bin/acorn` utility can be used to parse a file from the command -line. It accepts as arguments its input file and the following -options: - -- `--ecma3|--ecma5|--ecma6`: Sets the ECMAScript version to parse. Default is - version 5. - -- `--locations`: Attaches a "loc" object to each node with "start" and - "end" subobjects, each of which contains the one-based line and - zero-based column numbers in `{line, column}` form. - -- `--allow-hash-bang`: If the code starts with the characters #! (as in a shellscript), the first line will be treated as a comment. - -- `--compact`: No whitespace is used in the AST output. - -- `--silent`: Do not output the AST, just return the exit status. - -- `--help`: Print the usage information and quit. - -The utility spits out the syntax tree as JSON data. - -## Build system - -Acorn is written in ECMAScript 6, as a set of small modules, in the -project's `src` directory, and compiled down to bigger ECMAScript 3 -files in `dist` using [Browserify](http://browserify.org) and -[Babel](http://babeljs.io/). If you are already using Babel, you can -consider including the modules directly. - -The command-line test runner (`npm test`) uses the ES6 modules. The -browser-based test page (`test/index.html`) uses the compiled modules. -The `bin/build-acorn.js` script builds the latter from the former. - -If you are working on Acorn, you'll probably want to try the code out -directly, without an intermediate build step. In your scripts, you can -register the Babel require shim like this: - - require("babelify/node_modules/babel-core/register") - -That will allow you to directly `require` the ES6 modules. - -## Plugins - -Acorn is designed support allow plugins which, within reasonable -bounds, redefine the way the parser works. Plugins can add new token -types and new tokenizer contexts (if necessary), and extend methods in -the parser object. This is not a clean, elegant API—using it requires -an understanding of Acorn's internals, and plugins are likely to break -whenever those internals are significantly changed. But still, it is -_possible_, in this way, to create parsers for JavaScript dialects -without forking all of Acorn. And in principle it is even possible to -combine such plugins, so that if you have, for example, a plugin for -parsing types and a plugin for parsing JSX-style XML literals, you -could load them both and parse code with both JSX tags and types. - -A plugin should register itself by adding a property to -`acorn.plugins`, which holds a function. Calling `acorn.parse`, a -`plugin` option can be passed, holding an object mapping plugin names -to configuration values (or just `true` for plugins that don't take -options). After the parser object has been created, the initialization -functions for the chosen plugins are called with `(parser, -configValue)` arguments. They are expected to use the `parser.extend` -method to extend parser methods. For example, the `readToken` method -could be extended like this: - -```javascript -parser.extend("readToken", function(nextMethod) { - return function(code) { - console.log("Reading a token!") - return nextMethod.call(this, code) - } -}) -``` - -The `nextMethod` argument passed to `extend`'s second argument is the -previous value of this method, and should usually be called through to -whenever the extended method does not handle the call itself. - -There is a proof-of-concept JSX plugin in the [`jsx` -branch](https://github.com/marijnh/acorn/tree/jsx) branch of the -Github repository. diff --git a/node_modules/acorn/bin/acorn b/node_modules/acorn/bin/acorn deleted file mode 100755 index 76d8178b..00000000 --- a/node_modules/acorn/bin/acorn +++ /dev/null @@ -1,54 +0,0 @@ -#!/usr/bin/env node - -var path = require("path"); -var fs = require("fs"); -var acorn = require("../dist/acorn.js"); - -var infile, parsed, tokens, options = {}, silent = false, compact = false, tokenize = false; - -function help(status) { - var print = (status == 0) ? console.log : console.error; - print("usage: " + path.basename(process.argv[1]) + " [--ecma3|--ecma5|--ecma6]"); - print(" [--tokenize] [--locations] [---allow-hash-bang] [--compact] [--silent] [--help] [--] infile"); - process.exit(status); -} - -for (var i = 2; i < process.argv.length; ++i) { - var arg = process.argv[i]; - if (arg[0] != "-" && !infile) infile = arg; - else if (arg == "--" && !infile && i + 2 == process.argv.length) infile = process.argv[++i]; - else if (arg == "--ecma3") options.ecmaVersion = 3; - else if (arg == "--ecma5") options.ecmaVersion = 5; - else if (arg == "--ecma6") options.ecmaVersion = 6; - else if (arg == "--ecma7") options.ecmaVersion = 7; - else if (arg == "--locations") options.locations = true; - else if (arg == "--allow-hash-bang") options.allowHashBang = true; - else if (arg == "--silent") silent = true; - else if (arg == "--compact") compact = true; - else if (arg == "--help") help(0); - else if (arg == "--tokenize") tokenize = true; - else help(1); -} - -try { - var code = fs.readFileSync(infile, "utf8"); - - if (!tokenize) - parsed = acorn.parse(code, options); - else { - var get = acorn.tokenize(code, options); - tokens = []; - while (true) { - var token = get(); - tokens.push(token); - if (token.type.type == "eof") - break; - } - } -} catch(e) { - console.log(e.message); - process.exit(1); -} - -if (!silent) - console.log(JSON.stringify(tokenize ? tokens : parsed, null, compact ? null : 2)); diff --git a/node_modules/acorn/bin/build-acorn.js b/node_modules/acorn/bin/build-acorn.js deleted file mode 100644 index a97b7575..00000000 --- a/node_modules/acorn/bin/build-acorn.js +++ /dev/null @@ -1,51 +0,0 @@ -var fs = require("fs"), path = require("path") -var stream = require("stream") - -var browserify = require("browserify") -var babelify = require("babelify").configure({loose: "all"}) - -process.chdir(path.resolve(__dirname, "..")) - -browserify({standalone: "acorn"}) - .plugin(require('browserify-derequire')) - .transform(babelify) - .require("./src/index.js", {entry: true}) - .bundle() - .on("error", function (err) { console.log("Error: " + err.message) }) - .pipe(fs.createWriteStream("dist/acorn.js")) - -function acornShim(file) { - var tr = new stream.Transform - if (file == path.resolve(__dirname, "../src/index.js")) { - var sent = false - tr._transform = function(chunk, _, callback) { - if (!sent) { - sent = true - callback(null, "module.exports = typeof acorn != 'undefined' ? acorn : _dereq_(\"./acorn\")") - } else { - callback() - } - } - } else { - tr._transform = function(chunk, _, callback) { callback(null, chunk) } - } - return tr -} - -browserify({standalone: "acorn.loose"}) - .plugin(require('browserify-derequire')) - .transform(acornShim) - .transform(babelify) - .require("./src/loose/index.js", {entry: true}) - .bundle() - .on("error", function (err) { console.log("Error: " + err.message) }) - .pipe(fs.createWriteStream("dist/acorn_loose.js")) - -browserify({standalone: "acorn.walk"}) - .plugin(require('browserify-derequire')) - .transform(acornShim) - .transform(babelify) - .require("./src/walk/index.js", {entry: true}) - .bundle() - .on("error", function (err) { console.log("Error: " + err.message) }) - .pipe(fs.createWriteStream("dist/walk.js")) diff --git a/node_modules/acorn/bin/generate-identifier-regex.js b/node_modules/acorn/bin/generate-identifier-regex.js deleted file mode 100644 index 0d7c50fc..00000000 --- a/node_modules/acorn/bin/generate-identifier-regex.js +++ /dev/null @@ -1,47 +0,0 @@ -// Note: run `npm install unicode-7.0.0` first. - -// Which Unicode version should be used? -var version = '7.0.0'; - -var start = require('unicode-' + version + '/properties/ID_Start/code-points') - .filter(function(ch) { return ch > 127; }); -var cont = [0x200c, 0x200d].concat(require('unicode-' + version + '/properties/ID_Continue/code-points') - .filter(function(ch) { return ch > 127 && start.indexOf(ch) == -1; })); - -function pad(str, width) { - while (str.length < width) str = "0" + str; - return str; -} - -function esc(code) { - var hex = code.toString(16); - if (hex.length <= 2) return "\\x" + pad(hex, 2); - else return "\\u" + pad(hex, 4); -} - -function generate(chars) { - var astral = [], re = ""; - for (var i = 0, at = 0x10000; i < chars.length; i++) { - var from = chars[i], to = from; - while (i < chars.length - 1 && chars[i + 1] == to + 1) { - i++; - to++; - } - if (to <= 0xffff) { - if (from == to) re += esc(from); - else if (from + 1 == to) re += esc(from) + esc(to); - else re += esc(from) + "-" + esc(to); - } else { - astral.push(from - at, to - from); - at = to; - } - } - return {nonASCII: re, astral: astral}; -} - -var startData = generate(start), contData = generate(cont); - -console.log(" var nonASCIIidentifierStartChars = \"" + startData.nonASCII + "\";"); -console.log(" var nonASCIIidentifierChars = \"" + contData.nonASCII + "\";"); -console.log(" var astralIdentifierStartCodes = " + JSON.stringify(startData.astral) + ";"); -console.log(" var astralIdentifierCodes = " + JSON.stringify(contData.astral) + ";"); diff --git a/node_modules/acorn/bin/prepublish.sh b/node_modules/acorn/bin/prepublish.sh deleted file mode 100755 index 879834da..00000000 --- a/node_modules/acorn/bin/prepublish.sh +++ /dev/null @@ -1,2 +0,0 @@ -node bin/build-acorn.js -node bin/without_eval > dist/acorn_csp.js diff --git a/node_modules/acorn/bin/update_authors.sh b/node_modules/acorn/bin/update_authors.sh deleted file mode 100755 index 466c8db5..00000000 --- a/node_modules/acorn/bin/update_authors.sh +++ /dev/null @@ -1,6 +0,0 @@ -# Combine existing list of authors with everyone known in git, sort, add header. -tail --lines=+3 AUTHORS > AUTHORS.tmp -git log --format='%aN' | grep -v abraidwood >> AUTHORS.tmp -echo -e "List of Acorn contributors. Updated before every release.\n" > AUTHORS -sort -u AUTHORS.tmp >> AUTHORS -rm -f AUTHORS.tmp diff --git a/node_modules/acorn/bin/without_eval b/node_modules/acorn/bin/without_eval deleted file mode 100755 index 4331e707..00000000 --- a/node_modules/acorn/bin/without_eval +++ /dev/null @@ -1,48 +0,0 @@ -#!/usr/bin/env node - -var fs = require("fs") - -var acornSrc = fs.readFileSync(require.resolve("../dist/acorn"), "utf8") -var acorn = require("../dist/acorn"), walk = require("../dist/walk") - -var ast = acorn.parse(acornSrc) -var touchups = [], uses = [] - -var makePred - -walk.simple(ast, { - FunctionDeclaration: function(node) { - if (node.id.name == "makePredicate") { - makePred = node - touchups.push({text: "// Removed to create an eval-free library", from: node.start, to: node.end}) - } - }, - ObjectExpression: function(node) { - node.properties.forEach(function(prop) { - if (prop.value.type == "CallExpression" && - prop.value.callee.name == "makePredicate") - uses.push(prop.value) - }) - } -}) - -var results = [] -var dryRun = acornSrc.slice(0, makePred.end) + "; makePredicate = (function(mp) {" + - "return function(words) { var r = mp(words); predicates.push(r); return r }})(makePredicate);" + - acornSrc.slice(makePred.end) -;(new Function("predicates", dryRun))(results) - -uses.forEach(function (node, i) { - touchups.push({text: results[i].toString(), from: node.start, to: node.end}) -}) - -var result = "", pos = 0 -touchups.sort(function(a, b) { return a.from - b.from }) -touchups.forEach(function(touchup) { - result += acornSrc.slice(pos, touchup.from) - result += touchup.text - pos = touchup.to -}) -result += acornSrc.slice(pos) - -process.stdout.write(result) diff --git a/node_modules/acorn/dist/.keep b/node_modules/acorn/dist/.keep deleted file mode 100644 index e69de29b..00000000 diff --git a/node_modules/acorn/dist/acorn.js b/node_modules/acorn/dist/acorn.js deleted file mode 100644 index 1f1b6f24..00000000 --- a/node_modules/acorn/dist/acorn.js +++ /dev/null @@ -1,4014 +0,0 @@ -(function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.acorn = f()}})(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o= len) return x; - switch (x) { - case '%s': return String(args[i++]); - case '%d': return Number(args[i++]); - case '%j': - try { - return JSON.stringify(args[i++]); - } catch (_) { - return '[Circular]'; - } - default: - return x; - } - }); - for (var x = args[i]; i < len; x = args[++i]) { - if (isNull(x) || !isObject(x)) { - str += ' ' + x; - } else { - str += ' ' + inspect(x); - } - } - return str; -}; - - -// Mark that a method should not be used. -// Returns a modified function which warns once by default. -// If --no-deprecation is set, then it is a no-op. -exports.deprecate = function(fn, msg) { - // Allow for deprecating things in the process of starting up. - if (isUndefined(global.process)) { - return function() { - return exports.deprecate(fn, msg).apply(this, arguments); - }; - } - - if (process.noDeprecation === true) { - return fn; - } - - var warned = false; - function deprecated() { - if (!warned) { - if (process.throwDeprecation) { - throw new Error(msg); - } else if (process.traceDeprecation) { - console.trace(msg); - } else { - console.error(msg); - } - warned = true; - } - return fn.apply(this, arguments); - } - - return deprecated; -}; - - -var debugs = {}; -var debugEnviron; -exports.debuglog = function(set) { - if (isUndefined(debugEnviron)) - debugEnviron = process.env.NODE_DEBUG || ''; - set = set.toUpperCase(); - if (!debugs[set]) { - if (new RegExp('\\b' + set + '\\b', 'i').test(debugEnviron)) { - var pid = process.pid; - debugs[set] = function() { - var msg = exports.format.apply(exports, arguments); - console.error('%s %d: %s', set, pid, msg); - }; - } else { - debugs[set] = function() {}; - } - } - return debugs[set]; -}; - - -/** - * Echos the value of a value. Trys to print the value out - * in the best way possible given the different types. - * - * @param {Object} obj The object to print out. - * @param {Object} opts Optional options object that alters the output. - */ -/* legacy: obj, showHidden, depth, colors*/ -function inspect(obj, opts) { - // default options - var ctx = { - seen: [], - stylize: stylizeNoColor - }; - // legacy... - if (arguments.length >= 3) ctx.depth = arguments[2]; - if (arguments.length >= 4) ctx.colors = arguments[3]; - if (isBoolean(opts)) { - // legacy... - ctx.showHidden = opts; - } else if (opts) { - // got an "options" object - exports._extend(ctx, opts); - } - // set default options - if (isUndefined(ctx.showHidden)) ctx.showHidden = false; - if (isUndefined(ctx.depth)) ctx.depth = 2; - if (isUndefined(ctx.colors)) ctx.colors = false; - if (isUndefined(ctx.customInspect)) ctx.customInspect = true; - if (ctx.colors) ctx.stylize = stylizeWithColor; - return formatValue(ctx, obj, ctx.depth); -} -exports.inspect = inspect; - - -// http://en.wikipedia.org/wiki/ANSI_escape_code#graphics -inspect.colors = { - 'bold' : [1, 22], - 'italic' : [3, 23], - 'underline' : [4, 24], - 'inverse' : [7, 27], - 'white' : [37, 39], - 'grey' : [90, 39], - 'black' : [30, 39], - 'blue' : [34, 39], - 'cyan' : [36, 39], - 'green' : [32, 39], - 'magenta' : [35, 39], - 'red' : [31, 39], - 'yellow' : [33, 39] -}; - -// Don't use 'blue' not visible on cmd.exe -inspect.styles = { - 'special': 'cyan', - 'number': 'yellow', - 'boolean': 'yellow', - 'undefined': 'grey', - 'null': 'bold', - 'string': 'green', - 'date': 'magenta', - // "name": intentionally not styling - 'regexp': 'red' -}; - - -function stylizeWithColor(str, styleType) { - var style = inspect.styles[styleType]; - - if (style) { - return '\u001b[' + inspect.colors[style][0] + 'm' + str + - '\u001b[' + inspect.colors[style][1] + 'm'; - } else { - return str; - } -} - - -function stylizeNoColor(str, styleType) { - return str; -} - - -function arrayToHash(array) { - var hash = {}; - - array.forEach(function(val, idx) { - hash[val] = true; - }); - - return hash; -} - - -function formatValue(ctx, value, recurseTimes) { - // Provide a hook for user-specified inspect functions. - // Check that value is an object with an inspect function on it - if (ctx.customInspect && - value && - isFunction(value.inspect) && - // Filter out the util module, it's inspect function is special - value.inspect !== exports.inspect && - // Also filter out any prototype objects using the circular check. - !(value.constructor && value.constructor.prototype === value)) { - var ret = value.inspect(recurseTimes, ctx); - if (!isString(ret)) { - ret = formatValue(ctx, ret, recurseTimes); - } - return ret; - } - - // Primitive types cannot have properties - var primitive = formatPrimitive(ctx, value); - if (primitive) { - return primitive; - } - - // Look up the keys of the object. - var keys = Object.keys(value); - var visibleKeys = arrayToHash(keys); - - if (ctx.showHidden) { - keys = Object.getOwnPropertyNames(value); - } - - // IE doesn't make error fields non-enumerable - // http://msdn.microsoft.com/en-us/library/ie/dww52sbt(v=vs.94).aspx - if (isError(value) - && (keys.indexOf('message') >= 0 || keys.indexOf('description') >= 0)) { - return formatError(value); - } - - // Some type of object without properties can be shortcutted. - if (keys.length === 0) { - if (isFunction(value)) { - var name = value.name ? ': ' + value.name : ''; - return ctx.stylize('[Function' + name + ']', 'special'); - } - if (isRegExp(value)) { - return ctx.stylize(RegExp.prototype.toString.call(value), 'regexp'); - } - if (isDate(value)) { - return ctx.stylize(Date.prototype.toString.call(value), 'date'); - } - if (isError(value)) { - return formatError(value); - } - } - - var base = '', array = false, braces = ['{', '}']; - - // Make Array say that they are Array - if (isArray(value)) { - array = true; - braces = ['[', ']']; - } - - // Make functions say that they are functions - if (isFunction(value)) { - var n = value.name ? ': ' + value.name : ''; - base = ' [Function' + n + ']'; - } - - // Make RegExps say that they are RegExps - if (isRegExp(value)) { - base = ' ' + RegExp.prototype.toString.call(value); - } - - // Make dates with properties first say the date - if (isDate(value)) { - base = ' ' + Date.prototype.toUTCString.call(value); - } - - // Make error with message first say the error - if (isError(value)) { - base = ' ' + formatError(value); - } - - if (keys.length === 0 && (!array || value.length == 0)) { - return braces[0] + base + braces[1]; - } - - if (recurseTimes < 0) { - if (isRegExp(value)) { - return ctx.stylize(RegExp.prototype.toString.call(value), 'regexp'); - } else { - return ctx.stylize('[Object]', 'special'); - } - } - - ctx.seen.push(value); - - var output; - if (array) { - output = formatArray(ctx, value, recurseTimes, visibleKeys, keys); - } else { - output = keys.map(function(key) { - return formatProperty(ctx, value, recurseTimes, visibleKeys, key, array); - }); - } - - ctx.seen.pop(); - - return reduceToSingleString(output, base, braces); -} - - -function formatPrimitive(ctx, value) { - if (isUndefined(value)) - return ctx.stylize('undefined', 'undefined'); - if (isString(value)) { - var simple = '\'' + JSON.stringify(value).replace(/^"|"$/g, '') - .replace(/'/g, "\\'") - .replace(/\\"/g, '"') + '\''; - return ctx.stylize(simple, 'string'); - } - if (isNumber(value)) - return ctx.stylize('' + value, 'number'); - if (isBoolean(value)) - return ctx.stylize('' + value, 'boolean'); - // For some reason typeof null is "object", so special case here. - if (isNull(value)) - return ctx.stylize('null', 'null'); -} - - -function formatError(value) { - return '[' + Error.prototype.toString.call(value) + ']'; -} - - -function formatArray(ctx, value, recurseTimes, visibleKeys, keys) { - var output = []; - for (var i = 0, l = value.length; i < l; ++i) { - if (hasOwnProperty(value, String(i))) { - output.push(formatProperty(ctx, value, recurseTimes, visibleKeys, - String(i), true)); - } else { - output.push(''); - } - } - keys.forEach(function(key) { - if (!key.match(/^\d+$/)) { - output.push(formatProperty(ctx, value, recurseTimes, visibleKeys, - key, true)); - } - }); - return output; -} - - -function formatProperty(ctx, value, recurseTimes, visibleKeys, key, array) { - var name, str, desc; - desc = Object.getOwnPropertyDescriptor(value, key) || { value: value[key] }; - if (desc.get) { - if (desc.set) { - str = ctx.stylize('[Getter/Setter]', 'special'); - } else { - str = ctx.stylize('[Getter]', 'special'); - } - } else { - if (desc.set) { - str = ctx.stylize('[Setter]', 'special'); - } - } - if (!hasOwnProperty(visibleKeys, key)) { - name = '[' + key + ']'; - } - if (!str) { - if (ctx.seen.indexOf(desc.value) < 0) { - if (isNull(recurseTimes)) { - str = formatValue(ctx, desc.value, null); - } else { - str = formatValue(ctx, desc.value, recurseTimes - 1); - } - if (str.indexOf('\n') > -1) { - if (array) { - str = str.split('\n').map(function(line) { - return ' ' + line; - }).join('\n').substr(2); - } else { - str = '\n' + str.split('\n').map(function(line) { - return ' ' + line; - }).join('\n'); - } - } - } else { - str = ctx.stylize('[Circular]', 'special'); - } - } - if (isUndefined(name)) { - if (array && key.match(/^\d+$/)) { - return str; - } - name = JSON.stringify('' + key); - if (name.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)) { - name = name.substr(1, name.length - 2); - name = ctx.stylize(name, 'name'); - } else { - name = name.replace(/'/g, "\\'") - .replace(/\\"/g, '"') - .replace(/(^"|"$)/g, "'"); - name = ctx.stylize(name, 'string'); - } - } - - return name + ': ' + str; -} - - -function reduceToSingleString(output, base, braces) { - var numLinesEst = 0; - var length = output.reduce(function(prev, cur) { - numLinesEst++; - if (cur.indexOf('\n') >= 0) numLinesEst++; - return prev + cur.replace(/\u001b\[\d\d?m/g, '').length + 1; - }, 0); - - if (length > 60) { - return braces[0] + - (base === '' ? '' : base + '\n ') + - ' ' + - output.join(',\n ') + - ' ' + - braces[1]; - } - - return braces[0] + base + ' ' + output.join(', ') + ' ' + braces[1]; -} - - -// NOTE: These type checking functions intentionally don't use `instanceof` -// because it is fragile and can be easily faked with `Object.create()`. -function isArray(ar) { - return Array.isArray(ar); -} -exports.isArray = isArray; - -function isBoolean(arg) { - return typeof arg === 'boolean'; -} -exports.isBoolean = isBoolean; - -function isNull(arg) { - return arg === null; -} -exports.isNull = isNull; - -function isNullOrUndefined(arg) { - return arg == null; -} -exports.isNullOrUndefined = isNullOrUndefined; - -function isNumber(arg) { - return typeof arg === 'number'; -} -exports.isNumber = isNumber; - -function isString(arg) { - return typeof arg === 'string'; -} -exports.isString = isString; - -function isSymbol(arg) { - return typeof arg === 'symbol'; -} -exports.isSymbol = isSymbol; - -function isUndefined(arg) { - return arg === void 0; -} -exports.isUndefined = isUndefined; - -function isRegExp(re) { - return isObject(re) && objectToString(re) === '[object RegExp]'; -} -exports.isRegExp = isRegExp; - -function isObject(arg) { - return typeof arg === 'object' && arg !== null; -} -exports.isObject = isObject; - -function isDate(d) { - return isObject(d) && objectToString(d) === '[object Date]'; -} -exports.isDate = isDate; - -function isError(e) { - return isObject(e) && - (objectToString(e) === '[object Error]' || e instanceof Error); -} -exports.isError = isError; - -function isFunction(arg) { - return typeof arg === 'function'; -} -exports.isFunction = isFunction; - -function isPrimitive(arg) { - return arg === null || - typeof arg === 'boolean' || - typeof arg === 'number' || - typeof arg === 'string' || - typeof arg === 'symbol' || // ES6 symbol - typeof arg === 'undefined'; -} -exports.isPrimitive = isPrimitive; - -exports.isBuffer = _dereq_('./support/isBuffer'); - -function objectToString(o) { - return Object.prototype.toString.call(o); -} - - -function pad(n) { - return n < 10 ? '0' + n.toString(10) : n.toString(10); -} - - -var months = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', - 'Oct', 'Nov', 'Dec']; - -// 26 Feb 16:19:34 -function timestamp() { - var d = new Date(); - var time = [pad(d.getHours()), - pad(d.getMinutes()), - pad(d.getSeconds())].join(':'); - return [d.getDate(), months[d.getMonth()], time].join(' '); -} - - -// log is just a thin wrapper to console.log that prepends a timestamp -exports.log = function() { - console.log('%s - %s', timestamp(), exports.format.apply(exports, arguments)); -}; - - -/** - * Inherit the prototype methods from one constructor into another. - * - * The Function.prototype.inherits from lang.js rewritten as a standalone - * function (not on Function.prototype). NOTE: If this file is to be loaded - * during bootstrapping this function needs to be rewritten using some native - * functions as prototype setup using normal JavaScript does not work as - * expected during bootstrapping (see mirror.js in r114903). - * - * @param {function} ctor Constructor function which needs to inherit the - * prototype. - * @param {function} superCtor Constructor function to inherit prototype from. - */ -exports.inherits = _dereq_('inherits'); - -exports._extend = function(origin, add) { - // Don't do anything if add isn't an object - if (!add || !isObject(add)) return origin; - - var keys = Object.keys(add); - var i = keys.length; - while (i--) { - origin[keys[i]] = add[keys[i]]; - } - return origin; -}; - -function hasOwnProperty(obj, prop) { - return Object.prototype.hasOwnProperty.call(obj, prop); -} - -}).call(this,_dereq_('_process'),typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) -},{"./support/isBuffer":4,"_process":3,"inherits":2}],6:[function(_dereq_,module,exports){ -// A recursive descent parser operates by defining functions for all -// syntactic elements, and recursively calling those, each function -// advancing the input stream and returning an AST node. Precedence -// of constructs (for example, the fact that `!x[1]` means `!(x[1])` -// instead of `(!x)[1]` is handled by the fact that the parser -// function that parses unary prefix operators is called first, and -// in turn calls the function that parses `[]` subscripts — that -// way, it'll receive the node for `x[1]` already parsed, and wraps -// *that* in the unary operator node. -// -// Acorn uses an [operator precedence parser][opp] to handle binary -// operator precedence, because it is much more compact than using -// the technique outlined above, which uses different, nesting -// functions to specify precedence, for all of the ten binary -// precedence levels that JavaScript defines. -// -// [opp]: http://en.wikipedia.org/wiki/Operator-precedence_parser - -"use strict"; - -var tt = _dereq_("./tokentype").types; - -var Parser = _dereq_("./state").Parser; - -var reservedWords = _dereq_("./identifier").reservedWords; - -var has = _dereq_("./util").has; - -var pp = Parser.prototype; - -// Check if property name clashes with already added. -// Object/class getters and setters are not allowed to clash — -// either with each other or with an init property — and in -// strict mode, init properties are also not allowed to be repeated. - -pp.checkPropClash = function (prop, propHash) { - if (this.options.ecmaVersion >= 6) return; - var key = prop.key, - name = undefined; - switch (key.type) { - case "Identifier": - name = key.name;break; - case "Literal": - name = String(key.value);break; - default: - return; - } - var kind = prop.kind || "init", - other = undefined; - if (has(propHash, name)) { - other = propHash[name]; - var isGetSet = kind !== "init"; - if ((this.strict || isGetSet) && other[kind] || !(isGetSet ^ other.init)) this.raise(key.start, "Redefinition of property"); - } else { - other = propHash[name] = { - init: false, - get: false, - set: false - }; - } - other[kind] = true; -}; - -// ### Expression parsing - -// These nest, from the most general expression type at the top to -// 'atomic', nondivisible expression types at the bottom. Most of -// the functions will simply let the function(s) below them parse, -// and, *if* the syntactic construct they handle is present, wrap -// the AST node that the inner parser gave them in another node. - -// Parse a full expression. The optional arguments are used to -// forbid the `in` operator (in for loops initalization expressions) -// and provide reference for storing '=' operator inside shorthand -// property assignment in contexts where both object expression -// and object pattern might appear (so it's possible to raise -// delayed syntax error at correct position). - -pp.parseExpression = function (noIn, refShorthandDefaultPos) { - var startPos = this.start, - startLoc = this.startLoc; - var expr = this.parseMaybeAssign(noIn, refShorthandDefaultPos); - if (this.type === tt.comma) { - var node = this.startNodeAt(startPos, startLoc); - node.expressions = [expr]; - while (this.eat(tt.comma)) node.expressions.push(this.parseMaybeAssign(noIn, refShorthandDefaultPos)); - return this.finishNode(node, "SequenceExpression"); - } - return expr; -}; - -// Parse an assignment expression. This includes applications of -// operators like `+=`. - -pp.parseMaybeAssign = function (noIn, refShorthandDefaultPos, afterLeftParse) { - if (this.type == tt._yield && this.inGenerator) return this.parseYield(); - - var failOnShorthandAssign = undefined; - if (!refShorthandDefaultPos) { - refShorthandDefaultPos = { start: 0 }; - failOnShorthandAssign = true; - } else { - failOnShorthandAssign = false; - } - var startPos = this.start, - startLoc = this.startLoc; - if (this.type == tt.parenL || this.type == tt.name) this.potentialArrowAt = this.start; - var left = this.parseMaybeConditional(noIn, refShorthandDefaultPos); - if (afterLeftParse) left = afterLeftParse.call(this, left, startPos, startLoc); - if (this.type.isAssign) { - var node = this.startNodeAt(startPos, startLoc); - node.operator = this.value; - node.left = this.type === tt.eq ? this.toAssignable(left) : left; - refShorthandDefaultPos.start = 0; // reset because shorthand default was used correctly - this.checkLVal(left); - this.next(); - node.right = this.parseMaybeAssign(noIn); - return this.finishNode(node, "AssignmentExpression"); - } else if (failOnShorthandAssign && refShorthandDefaultPos.start) { - this.unexpected(refShorthandDefaultPos.start); - } - return left; -}; - -// Parse a ternary conditional (`?:`) operator. - -pp.parseMaybeConditional = function (noIn, refShorthandDefaultPos) { - var startPos = this.start, - startLoc = this.startLoc; - var expr = this.parseExprOps(noIn, refShorthandDefaultPos); - if (refShorthandDefaultPos && refShorthandDefaultPos.start) return expr; - if (this.eat(tt.question)) { - var node = this.startNodeAt(startPos, startLoc); - node.test = expr; - node.consequent = this.parseMaybeAssign(); - this.expect(tt.colon); - node.alternate = this.parseMaybeAssign(noIn); - return this.finishNode(node, "ConditionalExpression"); - } - return expr; -}; - -// Start the precedence parser. - -pp.parseExprOps = function (noIn, refShorthandDefaultPos) { - var startPos = this.start, - startLoc = this.startLoc; - var expr = this.parseMaybeUnary(refShorthandDefaultPos); - if (refShorthandDefaultPos && refShorthandDefaultPos.start) return expr; - return this.parseExprOp(expr, startPos, startLoc, -1, noIn); -}; - -// Parse binary operators with the operator precedence parsing -// algorithm. `left` is the left-hand side of the operator. -// `minPrec` provides context that allows the function to stop and -// defer further parser to one of its callers when it encounters an -// operator that has a lower precedence than the set it is parsing. - -pp.parseExprOp = function (left, leftStartPos, leftStartLoc, minPrec, noIn) { - var prec = this.type.binop; - if (Array.isArray(leftStartPos)) { - if (this.options.locations && noIn === undefined) { - // shift arguments to left by one - noIn = minPrec; - minPrec = leftStartLoc; - // flatten leftStartPos - leftStartLoc = leftStartPos[1]; - leftStartPos = leftStartPos[0]; - } - } - if (prec != null && (!noIn || this.type !== tt._in)) { - if (prec > minPrec) { - var node = this.startNodeAt(leftStartPos, leftStartLoc); - node.left = left; - node.operator = this.value; - var op = this.type; - this.next(); - var startPos = this.start, - startLoc = this.startLoc; - node.right = this.parseExprOp(this.parseMaybeUnary(), startPos, startLoc, prec, noIn); - this.finishNode(node, op === tt.logicalOR || op === tt.logicalAND ? "LogicalExpression" : "BinaryExpression"); - return this.parseExprOp(node, leftStartPos, leftStartLoc, minPrec, noIn); - } - } - return left; -}; - -// Parse unary operators, both prefix and postfix. - -pp.parseMaybeUnary = function (refShorthandDefaultPos) { - if (this.type.prefix) { - var node = this.startNode(), - update = this.type === tt.incDec; - node.operator = this.value; - node.prefix = true; - this.next(); - node.argument = this.parseMaybeUnary(); - if (refShorthandDefaultPos && refShorthandDefaultPos.start) this.unexpected(refShorthandDefaultPos.start); - if (update) this.checkLVal(node.argument);else if (this.strict && node.operator === "delete" && node.argument.type === "Identifier") this.raise(node.start, "Deleting local variable in strict mode"); - return this.finishNode(node, update ? "UpdateExpression" : "UnaryExpression"); - } - var startPos = this.start, - startLoc = this.startLoc; - var expr = this.parseExprSubscripts(refShorthandDefaultPos); - if (refShorthandDefaultPos && refShorthandDefaultPos.start) return expr; - while (this.type.postfix && !this.canInsertSemicolon()) { - var node = this.startNodeAt(startPos, startLoc); - node.operator = this.value; - node.prefix = false; - node.argument = expr; - this.checkLVal(expr); - this.next(); - expr = this.finishNode(node, "UpdateExpression"); - } - return expr; -}; - -// Parse call, dot, and `[]`-subscript expressions. - -pp.parseExprSubscripts = function (refShorthandDefaultPos) { - var startPos = this.start, - startLoc = this.startLoc; - var expr = this.parseExprAtom(refShorthandDefaultPos); - if (refShorthandDefaultPos && refShorthandDefaultPos.start) return expr; - return this.parseSubscripts(expr, startPos, startLoc); -}; - -pp.parseSubscripts = function (base, startPos, startLoc, noCalls) { - if (Array.isArray(startPos)) { - if (this.options.locations && noCalls === undefined) { - // shift arguments to left by one - noCalls = startLoc; - // flatten startPos - startLoc = startPos[1]; - startPos = startPos[0]; - } - } - for (;;) { - if (this.eat(tt.dot)) { - var node = this.startNodeAt(startPos, startLoc); - node.object = base; - node.property = this.parseIdent(true); - node.computed = false; - base = this.finishNode(node, "MemberExpression"); - } else if (this.eat(tt.bracketL)) { - var node = this.startNodeAt(startPos, startLoc); - node.object = base; - node.property = this.parseExpression(); - node.computed = true; - this.expect(tt.bracketR); - base = this.finishNode(node, "MemberExpression"); - } else if (!noCalls && this.eat(tt.parenL)) { - var node = this.startNodeAt(startPos, startLoc); - node.callee = base; - node.arguments = this.parseExprList(tt.parenR, false); - base = this.finishNode(node, "CallExpression"); - } else if (this.type === tt.backQuote) { - var node = this.startNodeAt(startPos, startLoc); - node.tag = base; - node.quasi = this.parseTemplate(); - base = this.finishNode(node, "TaggedTemplateExpression"); - } else { - return base; - } - } -}; - -// Parse an atomic expression — either a single token that is an -// expression, an expression started by a keyword like `function` or -// `new`, or an expression wrapped in punctuation like `()`, `[]`, -// or `{}`. - -pp.parseExprAtom = function (refShorthandDefaultPos) { - var node = undefined, - canBeArrow = this.potentialArrowAt == this.start; - switch (this.type) { - case tt._this: - case tt._super: - var type = this.type === tt._this ? "ThisExpression" : "Super"; - node = this.startNode(); - this.next(); - return this.finishNode(node, type); - - case tt._yield: - if (this.inGenerator) this.unexpected(); - - case tt.name: - var startPos = this.start, - startLoc = this.startLoc; - var id = this.parseIdent(this.type !== tt.name); - if (canBeArrow && !this.canInsertSemicolon() && this.eat(tt.arrow)) return this.parseArrowExpression(this.startNodeAt(startPos, startLoc), [id]); - return id; - - case tt.regexp: - var value = this.value; - node = this.parseLiteral(value.value); - node.regex = { pattern: value.pattern, flags: value.flags }; - return node; - - case tt.num:case tt.string: - return this.parseLiteral(this.value); - - case tt._null:case tt._true:case tt._false: - node = this.startNode(); - node.value = this.type === tt._null ? null : this.type === tt._true; - node.raw = this.type.keyword; - this.next(); - return this.finishNode(node, "Literal"); - - case tt.parenL: - return this.parseParenAndDistinguishExpression(canBeArrow); - - case tt.bracketL: - node = this.startNode(); - this.next(); - // check whether this is array comprehension or regular array - if (this.options.ecmaVersion >= 7 && this.type === tt._for) { - return this.parseComprehension(node, false); - } - node.elements = this.parseExprList(tt.bracketR, true, true, refShorthandDefaultPos); - return this.finishNode(node, "ArrayExpression"); - - case tt.braceL: - return this.parseObj(false, refShorthandDefaultPos); - - case tt._function: - node = this.startNode(); - this.next(); - return this.parseFunction(node, false); - - case tt._class: - return this.parseClass(this.startNode(), false); - - case tt._new: - return this.parseNew(); - - case tt.backQuote: - return this.parseTemplate(); - - default: - this.unexpected(); - } -}; - -pp.parseLiteral = function (value) { - var node = this.startNode(); - node.value = value; - node.raw = this.input.slice(this.start, this.end); - this.next(); - return this.finishNode(node, "Literal"); -}; - -pp.parseParenExpression = function () { - this.expect(tt.parenL); - var val = this.parseExpression(); - this.expect(tt.parenR); - return val; -}; - -pp.parseParenAndDistinguishExpression = function (canBeArrow) { - var startPos = this.start, - startLoc = this.startLoc, - val = undefined; - if (this.options.ecmaVersion >= 6) { - this.next(); - - if (this.options.ecmaVersion >= 7 && this.type === tt._for) { - return this.parseComprehension(this.startNodeAt(startPos, startLoc), true); - } - - var innerStartPos = this.start, - innerStartLoc = this.startLoc; - var exprList = [], - first = true; - var refShorthandDefaultPos = { start: 0 }, - spreadStart = undefined, - innerParenStart = undefined; - while (this.type !== tt.parenR) { - first ? first = false : this.expect(tt.comma); - if (this.type === tt.ellipsis) { - spreadStart = this.start; - exprList.push(this.parseParenItem(this.parseRest())); - break; - } else { - if (this.type === tt.parenL && !innerParenStart) { - innerParenStart = this.start; - } - exprList.push(this.parseMaybeAssign(false, refShorthandDefaultPos, this.parseParenItem)); - } - } - var innerEndPos = this.start, - innerEndLoc = this.startLoc; - this.expect(tt.parenR); - - if (canBeArrow && !this.canInsertSemicolon() && this.eat(tt.arrow)) { - if (innerParenStart) this.unexpected(innerParenStart); - return this.parseParenArrowList(startPos, startLoc, exprList); - } - - if (!exprList.length) this.unexpected(this.lastTokStart); - if (spreadStart) this.unexpected(spreadStart); - if (refShorthandDefaultPos.start) this.unexpected(refShorthandDefaultPos.start); - - if (exprList.length > 1) { - val = this.startNodeAt(innerStartPos, innerStartLoc); - val.expressions = exprList; - this.finishNodeAt(val, "SequenceExpression", innerEndPos, innerEndLoc); - } else { - val = exprList[0]; - } - } else { - val = this.parseParenExpression(); - } - - if (this.options.preserveParens) { - var par = this.startNodeAt(startPos, startLoc); - par.expression = val; - return this.finishNode(par, "ParenthesizedExpression"); - } else { - return val; - } -}; - -pp.parseParenItem = function (item) { - return item; -}; - -pp.parseParenArrowList = function (startPos, startLoc, exprList) { - return this.parseArrowExpression(this.startNodeAt(startPos, startLoc), exprList); -}; - -// New's precedence is slightly tricky. It must allow its argument -// to be a `[]` or dot subscript expression, but not a call — at -// least, not without wrapping it in parentheses. Thus, it uses the - -var empty = []; - -pp.parseNew = function () { - var node = this.startNode(); - var meta = this.parseIdent(true); - if (this.options.ecmaVersion >= 6 && this.eat(tt.dot)) { - node.meta = meta; - node.property = this.parseIdent(true); - if (node.property.name !== "target") this.raise(node.property.start, "The only valid meta property for new is new.target"); - return this.finishNode(node, "MetaProperty"); - } - var startPos = this.start, - startLoc = this.startLoc; - node.callee = this.parseSubscripts(this.parseExprAtom(), startPos, startLoc, true); - if (this.eat(tt.parenL)) node.arguments = this.parseExprList(tt.parenR, false);else node.arguments = empty; - return this.finishNode(node, "NewExpression"); -}; - -// Parse template expression. - -pp.parseTemplateElement = function () { - var elem = this.startNode(); - elem.value = { - raw: this.input.slice(this.start, this.end), - cooked: this.value - }; - this.next(); - elem.tail = this.type === tt.backQuote; - return this.finishNode(elem, "TemplateElement"); -}; - -pp.parseTemplate = function () { - var node = this.startNode(); - this.next(); - node.expressions = []; - var curElt = this.parseTemplateElement(); - node.quasis = [curElt]; - while (!curElt.tail) { - this.expect(tt.dollarBraceL); - node.expressions.push(this.parseExpression()); - this.expect(tt.braceR); - node.quasis.push(curElt = this.parseTemplateElement()); - } - this.next(); - return this.finishNode(node, "TemplateLiteral"); -}; - -// Parse an object literal or binding pattern. - -pp.parseObj = function (isPattern, refShorthandDefaultPos) { - var node = this.startNode(), - first = true, - propHash = {}; - node.properties = []; - this.next(); - while (!this.eat(tt.braceR)) { - if (!first) { - this.expect(tt.comma); - if (this.afterTrailingComma(tt.braceR)) break; - } else first = false; - - var prop = this.startNode(), - isGenerator = undefined, - startPos = undefined, - startLoc = undefined; - if (this.options.ecmaVersion >= 6) { - prop.method = false; - prop.shorthand = false; - if (isPattern || refShorthandDefaultPos) { - startPos = this.start; - startLoc = this.startLoc; - } - if (!isPattern) isGenerator = this.eat(tt.star); - } - this.parsePropertyName(prop); - this.parsePropertyValue(prop, isPattern, isGenerator, startPos, startLoc, refShorthandDefaultPos); - this.checkPropClash(prop, propHash); - node.properties.push(this.finishNode(prop, "Property")); - } - return this.finishNode(node, isPattern ? "ObjectPattern" : "ObjectExpression"); -}; - -pp.parsePropertyValue = function (prop, isPattern, isGenerator, startPos, startLoc, refShorthandDefaultPos) { - if (this.eat(tt.colon)) { - prop.value = isPattern ? this.parseMaybeDefault(this.start, this.startLoc) : this.parseMaybeAssign(false, refShorthandDefaultPos); - prop.kind = "init"; - } else if (this.options.ecmaVersion >= 6 && this.type === tt.parenL) { - if (isPattern) this.unexpected(); - prop.kind = "init"; - prop.method = true; - prop.value = this.parseMethod(isGenerator); - } else if (this.options.ecmaVersion >= 5 && !prop.computed && prop.key.type === "Identifier" && (prop.key.name === "get" || prop.key.name === "set") && (this.type != tt.comma && this.type != tt.braceR)) { - if (isGenerator || isPattern) this.unexpected(); - prop.kind = prop.key.name; - this.parsePropertyName(prop); - prop.value = this.parseMethod(false); - } else if (this.options.ecmaVersion >= 6 && !prop.computed && prop.key.type === "Identifier") { - prop.kind = "init"; - if (isPattern) { - if (this.isKeyword(prop.key.name) || this.strict && (reservedWords.strictBind(prop.key.name) || reservedWords.strict(prop.key.name)) || !this.options.allowReserved && this.isReservedWord(prop.key.name)) this.raise(prop.key.start, "Binding " + prop.key.name); - prop.value = this.parseMaybeDefault(startPos, startLoc, prop.key); - } else if (this.type === tt.eq && refShorthandDefaultPos) { - if (!refShorthandDefaultPos.start) refShorthandDefaultPos.start = this.start; - prop.value = this.parseMaybeDefault(startPos, startLoc, prop.key); - } else { - prop.value = prop.key; - } - prop.shorthand = true; - } else this.unexpected(); -}; - -pp.parsePropertyName = function (prop) { - if (this.options.ecmaVersion >= 6) { - if (this.eat(tt.bracketL)) { - prop.computed = true; - prop.key = this.parseMaybeAssign(); - this.expect(tt.bracketR); - return prop.key; - } else { - prop.computed = false; - } - } - return prop.key = this.type === tt.num || this.type === tt.string ? this.parseExprAtom() : this.parseIdent(true); -}; - -// Initialize empty function node. - -pp.initFunction = function (node) { - node.id = null; - if (this.options.ecmaVersion >= 6) { - node.generator = false; - node.expression = false; - } -}; - -// Parse object or class method. - -pp.parseMethod = function (isGenerator) { - var node = this.startNode(); - this.initFunction(node); - this.expect(tt.parenL); - node.params = this.parseBindingList(tt.parenR, false, false); - var allowExpressionBody = undefined; - if (this.options.ecmaVersion >= 6) { - node.generator = isGenerator; - allowExpressionBody = true; - } else { - allowExpressionBody = false; - } - this.parseFunctionBody(node, allowExpressionBody); - return this.finishNode(node, "FunctionExpression"); -}; - -// Parse arrow function expression with given parameters. - -pp.parseArrowExpression = function (node, params) { - this.initFunction(node); - node.params = this.toAssignableList(params, true); - this.parseFunctionBody(node, true); - return this.finishNode(node, "ArrowFunctionExpression"); -}; - -// Parse function body and check parameters. - -pp.parseFunctionBody = function (node, allowExpression) { - var isExpression = allowExpression && this.type !== tt.braceL; - - if (isExpression) { - node.body = this.parseMaybeAssign(); - node.expression = true; - } else { - // Start a new scope with regard to labels and the `inFunction` - // flag (restore them to their old value afterwards). - var oldInFunc = this.inFunction, - oldInGen = this.inGenerator, - oldLabels = this.labels; - this.inFunction = true;this.inGenerator = node.generator;this.labels = []; - node.body = this.parseBlock(true); - node.expression = false; - this.inFunction = oldInFunc;this.inGenerator = oldInGen;this.labels = oldLabels; - } - - // If this is a strict mode function, verify that argument names - // are not repeated, and it does not try to bind the words `eval` - // or `arguments`. - if (this.strict || !isExpression && node.body.body.length && this.isUseStrict(node.body.body[0])) { - var nameHash = {}, - oldStrict = this.strict; - this.strict = true; - if (node.id) this.checkLVal(node.id, true); - for (var i = 0; i < node.params.length; i++) { - this.checkLVal(node.params[i], true, nameHash); - }this.strict = oldStrict; - } -}; - -// Parses a comma-separated list of expressions, and returns them as -// an array. `close` is the token type that ends the list, and -// `allowEmpty` can be turned on to allow subsequent commas with -// nothing in between them to be parsed as `null` (which is needed -// for array literals). - -pp.parseExprList = function (close, allowTrailingComma, allowEmpty, refShorthandDefaultPos) { - var elts = [], - first = true; - while (!this.eat(close)) { - if (!first) { - this.expect(tt.comma); - if (allowTrailingComma && this.afterTrailingComma(close)) break; - } else first = false; - - if (allowEmpty && this.type === tt.comma) { - elts.push(null); - } else { - if (this.type === tt.ellipsis) elts.push(this.parseSpread(refShorthandDefaultPos));else elts.push(this.parseMaybeAssign(false, refShorthandDefaultPos)); - } - } - return elts; -}; - -// Parse the next token as an identifier. If `liberal` is true (used -// when parsing properties), it will also convert keywords into -// identifiers. - -pp.parseIdent = function (liberal) { - var node = this.startNode(); - if (liberal && this.options.allowReserved == "never") liberal = false; - if (this.type === tt.name) { - if (!liberal && (!this.options.allowReserved && this.isReservedWord(this.value) || this.strict && reservedWords.strict(this.value) && (this.options.ecmaVersion >= 6 || this.input.slice(this.start, this.end).indexOf("\\") == -1))) this.raise(this.start, "The keyword '" + this.value + "' is reserved"); - node.name = this.value; - } else if (liberal && this.type.keyword) { - node.name = this.type.keyword; - } else { - this.unexpected(); - } - this.next(); - return this.finishNode(node, "Identifier"); -}; - -// Parses yield expression inside generator. - -pp.parseYield = function () { - var node = this.startNode(); - this.next(); - if (this.type == tt.semi || this.canInsertSemicolon() || this.type != tt.star && !this.type.startsExpr) { - node.delegate = false; - node.argument = null; - } else { - node.delegate = this.eat(tt.star); - node.argument = this.parseMaybeAssign(); - } - return this.finishNode(node, "YieldExpression"); -}; - -// Parses array and generator comprehensions. - -pp.parseComprehension = function (node, isGenerator) { - node.blocks = []; - while (this.type === tt._for) { - var block = this.startNode(); - this.next(); - this.expect(tt.parenL); - block.left = this.parseBindingAtom(); - this.checkLVal(block.left, true); - this.expectContextual("of"); - block.right = this.parseExpression(); - this.expect(tt.parenR); - node.blocks.push(this.finishNode(block, "ComprehensionBlock")); - } - node.filter = this.eat(tt._if) ? this.parseParenExpression() : null; - node.body = this.parseExpression(); - this.expect(isGenerator ? tt.parenR : tt.bracketR); - node.generator = isGenerator; - return this.finishNode(node, "ComprehensionExpression"); -}; - -},{"./identifier":7,"./state":13,"./tokentype":17,"./util":18}],7:[function(_dereq_,module,exports){ - - -// Test whether a given character code starts an identifier. - -"use strict"; - -exports.isIdentifierStart = isIdentifierStart; - -// Test whether a given character is part of an identifier. - -exports.isIdentifierChar = isIdentifierChar; -exports.__esModule = true; -// This is a trick taken from Esprima. It turns out that, on -// non-Chrome browsers, to check whether a string is in a set, a -// predicate containing a big ugly `switch` statement is faster than -// a regular expression, and on Chrome the two are about on par. -// This function uses `eval` (non-lexical) to produce such a -// predicate from a space-separated string of words. -// -// It starts by sorting the words by length. - -function makePredicate(words) { - words = words.split(" "); - var f = "", - cats = []; - out: for (var i = 0; i < words.length; ++i) { - for (var j = 0; j < cats.length; ++j) { - if (cats[j][0].length == words[i].length) { - cats[j].push(words[i]); - continue out; - } - }cats.push([words[i]]); - } - function compareTo(arr) { - if (arr.length == 1) { - return f += "return str === " + JSON.stringify(arr[0]) + ";"; - }f += "switch(str){"; - for (var i = 0; i < arr.length; ++i) { - f += "case " + JSON.stringify(arr[i]) + ":"; - }f += "return true}return false;"; - } - - // When there are more than three length categories, an outer - // switch first dispatches on the lengths, to save on comparisons. - - if (cats.length > 3) { - cats.sort(function (a, b) { - return b.length - a.length; - }); - f += "switch(str.length){"; - for (var i = 0; i < cats.length; ++i) { - var cat = cats[i]; - f += "case " + cat[0].length + ":"; - compareTo(cat); - } - f += "}" - - // Otherwise, simply generate a flat `switch` statement. - - ; - } else { - compareTo(words); - } - return new Function("str", f); -} - -// Reserved word lists for various dialects of the language - -var reservedWords = { - 3: makePredicate("abstract boolean byte char class double enum export extends final float goto implements import int interface long native package private protected public short static super synchronized throws transient volatile"), - 5: makePredicate("class enum extends super const export import"), - 6: makePredicate("enum await"), - strict: makePredicate("implements interface let package private protected public static yield"), - strictBind: makePredicate("eval arguments") -}; - -exports.reservedWords = reservedWords; -// And the keywords - -var ecma5AndLessKeywords = "break case catch continue debugger default do else finally for function if return switch throw try var while with null true false instanceof typeof void delete new in this"; - -var keywords = { - 5: makePredicate(ecma5AndLessKeywords), - 6: makePredicate(ecma5AndLessKeywords + " let const class extends export import yield super") -}; - -exports.keywords = keywords; -// ## Character categories - -// Big ugly regular expressions that match characters in the -// whitespace, identifier, and identifier-start categories. These -// are only applied when a character is found to actually have a -// code point above 128. -// Generated by `tools/generate-identifier-regex.js`. - -var nonASCIIidentifierStartChars = "ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽͿΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԯԱ-Ֆՙա-ևא-תװ-ײؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘࢠ-ࢲऄ-हऽॐक़-ॡॱ-ঀঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-హఽౘౙౠౡಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽೞೠೡೱೲഅ-ഌഎ-ഐഒ-ഺഽൎൠൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะาำเ-ๆກຂຄງຈຊຍດ-ທນ-ຟມ-ຣລວສຫອ-ະາຳຽເ-ໄໆໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿၐ-ၕၚ-ၝၡၥၦၮ-ၰၵ-ႁႎႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏼᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛸᜀ-ᜌᜎ-ᜑᜠ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៗៜᠠ-ᡷᢀ-ᢨᢪᢰ-ᣵᤀ-ᤞᥐ-ᥭᥰ-ᥴᦀ-ᦫᧁ-ᧇᨀ-ᨖᨠ-ᩔᪧᬅ-ᬳᭅ-ᭋᮃ-ᮠᮮᮯᮺ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᳩ-ᳬᳮ-ᳱᳵᳶᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕ℘-ℝℤΩℨK-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-Ⱞⰰ-ⱞⱠ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞ々-〇〡-〩〱-〵〸-〼ぁ-ゖ゛-ゟァ-ヺー-ヿㄅ-ㄭㄱ-ㆎㆠ-ㆺㇰ-ㇿ㐀-䶵一-鿌ꀀ-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚝꚠ-ꛯꜗ-ꜟꜢ-ꞈꞋ-ꞎꞐ-ꞭꞰꞱꟷ-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꧠ-ꧤꧦ-ꧯꧺ-ꧾꨀ-ꨨꩀ-ꩂꩄ-ꩋꩠ-ꩶꩺꩾ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛ-ꫝꫠ-ꫪꫲ-ꫴꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꬰ-ꭚꭜ-ꭟꭤꭥꯀ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA-Za-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ"; -var nonASCIIidentifierChars = "‌‍·̀-ͯ·҃-֑҇-ׇֽֿׁׂׅׄؐ-ًؚ-٩ٰۖ-ۜ۟-۪ۤۧۨ-ۭ۰-۹ܑܰ-݊ަ-ް߀-߉߫-߳ࠖ-࠙ࠛ-ࠣࠥ-ࠧࠩ-࡙࠭-࡛ࣤ-ःऺ-़ा-ॏ॑-ॗॢॣ०-९ঁ-ঃ়া-ৄেৈো-্ৗৢৣ০-৯ਁ-ਃ਼ਾ-ੂੇੈੋ-੍ੑ੦-ੱੵઁ-ઃ઼ા-ૅે-ૉો-્ૢૣ૦-૯ଁ-ଃ଼ା-ୄେୈୋ-୍ୖୗୢୣ୦-୯ஂா-ூெ-ைொ-்ௗ௦-௯ఀ-ఃా-ౄె-ైొ-్ౕౖౢౣ౦-౯ಁ-ಃ಼ಾ-ೄೆ-ೈೊ-್ೕೖೢೣ೦-೯ഁ-ഃാ-ൄെ-ൈൊ-്ൗൢൣ൦-൯ංඃ්ා-ුූෘ-ෟ෦-෯ෲෳัิ-ฺ็-๎๐-๙ັິ-ູົຼ່-ໍ໐-໙༘༙༠-༩༹༵༷༾༿ཱ-྄྆྇ྍ-ྗྙ-ྼ࿆ါ-ှ၀-၉ၖ-ၙၞ-ၠၢ-ၤၧ-ၭၱ-ၴႂ-ႍႏ-ႝ፝-፟፩-፱ᜒ-᜔ᜲ-᜴ᝒᝓᝲᝳ឴-៓៝០-៩᠋-᠍᠐-᠙ᢩᤠ-ᤫᤰ-᤻᥆-᥏ᦰ-ᧀᧈᧉ᧐-᧚ᨗ-ᨛᩕ-ᩞ᩠-᩿᩼-᪉᪐-᪙᪰-᪽ᬀ-ᬄ᬴-᭄᭐-᭙᭫-᭳ᮀ-ᮂᮡ-ᮭ᮰-᮹᯦-᯳ᰤ-᰷᱀-᱉᱐-᱙᳐-᳔᳒-᳨᳭ᳲ-᳴᳸᳹᷀-᷵᷼-᷿‿⁀⁔⃐-⃥⃜⃡-⃰⳯-⵿⳱ⷠ-〪ⷿ-゙゚〯꘠-꘩꙯ꙴ-꙽ꚟ꛰꛱ꠂ꠆ꠋꠣ-ꠧꢀꢁꢴ-꣄꣐-꣙꣠-꣱꤀-꤉ꤦ-꤭ꥇ-꥓ꦀ-ꦃ꦳-꧀꧐-꧙ꧥ꧰-꧹ꨩ-ꨶꩃꩌꩍ꩐-꩙ꩻ-ꩽꪰꪲ-ꪴꪷꪸꪾ꪿꫁ꫫ-ꫯꫵ꫶ꯣ-ꯪ꯬꯭꯰-꯹ﬞ︀-️︠-︭︳︴﹍-﹏0-9_"; - -var nonASCIIidentifierStart = new RegExp("[" + nonASCIIidentifierStartChars + "]"); -var nonASCIIidentifier = new RegExp("[" + nonASCIIidentifierStartChars + nonASCIIidentifierChars + "]"); - -nonASCIIidentifierStartChars = nonASCIIidentifierChars = null; - -// These are a run-length and offset encoded representation of the -// >0xffff code points that are a valid part of identifiers. The -// offset starts at 0x10000, and each pair of numbers represents an -// offset to the next range, and then a size of the range. They were -// generated by tools/generate-identifier-regex.js -var astralIdentifierStartCodes = [0, 11, 2, 25, 2, 18, 2, 1, 2, 14, 3, 13, 35, 122, 70, 52, 268, 28, 4, 48, 48, 31, 17, 26, 6, 37, 11, 29, 3, 35, 5, 7, 2, 4, 43, 157, 99, 39, 9, 51, 157, 310, 10, 21, 11, 7, 153, 5, 3, 0, 2, 43, 2, 1, 4, 0, 3, 22, 11, 22, 10, 30, 98, 21, 11, 25, 71, 55, 7, 1, 65, 0, 16, 3, 2, 2, 2, 26, 45, 28, 4, 28, 36, 7, 2, 27, 28, 53, 11, 21, 11, 18, 14, 17, 111, 72, 955, 52, 76, 44, 33, 24, 27, 35, 42, 34, 4, 0, 13, 47, 15, 3, 22, 0, 38, 17, 2, 24, 133, 46, 39, 7, 3, 1, 3, 21, 2, 6, 2, 1, 2, 4, 4, 0, 32, 4, 287, 47, 21, 1, 2, 0, 185, 46, 82, 47, 21, 0, 60, 42, 502, 63, 32, 0, 449, 56, 1288, 920, 104, 110, 2962, 1070, 13266, 568, 8, 30, 114, 29, 19, 47, 17, 3, 32, 20, 6, 18, 881, 68, 12, 0, 67, 12, 16481, 1, 3071, 106, 6, 12, 4, 8, 8, 9, 5991, 84, 2, 70, 2, 1, 3, 0, 3, 1, 3, 3, 2, 11, 2, 0, 2, 6, 2, 64, 2, 3, 3, 7, 2, 6, 2, 27, 2, 3, 2, 4, 2, 0, 4, 6, 2, 339, 3, 24, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 7, 4149, 196, 1340, 3, 2, 26, 2, 1, 2, 0, 3, 0, 2, 9, 2, 3, 2, 0, 2, 0, 7, 0, 5, 0, 2, 0, 2, 0, 2, 2, 2, 1, 2, 0, 3, 0, 2, 0, 2, 0, 2, 0, 2, 0, 2, 1, 2, 0, 3, 3, 2, 6, 2, 3, 2, 3, 2, 0, 2, 9, 2, 16, 6, 2, 2, 4, 2, 16, 4421, 42710, 42, 4148, 12, 221, 16355, 541]; -var astralIdentifierCodes = [509, 0, 227, 0, 150, 4, 294, 9, 1368, 2, 2, 1, 6, 3, 41, 2, 5, 0, 166, 1, 1306, 2, 54, 14, 32, 9, 16, 3, 46, 10, 54, 9, 7, 2, 37, 13, 2, 9, 52, 0, 13, 2, 49, 13, 16, 9, 83, 11, 168, 11, 6, 9, 8, 2, 57, 0, 2, 6, 3, 1, 3, 2, 10, 0, 11, 1, 3, 6, 4, 4, 316, 19, 13, 9, 214, 6, 3, 8, 112, 16, 16, 9, 82, 12, 9, 9, 535, 9, 20855, 9, 135, 4, 60, 6, 26, 9, 1016, 45, 17, 3, 19723, 1, 5319, 4, 4, 5, 9, 7, 3, 6, 31, 3, 149, 2, 1418, 49, 4305, 6, 792618, 239]; - -// This has a complexity linear to the value of the code. The -// assumption is that looking up astral identifier characters is -// rare. -function isInAstralSet(code, set) { - var pos = 65536; - for (var i = 0; i < set.length; i += 2) { - pos += set[i]; - if (pos > code) { - return false; - }pos += set[i + 1]; - if (pos >= code) { - return true; - } - } -} -function isIdentifierStart(code, astral) { - if (code < 65) { - return code === 36; - }if (code < 91) { - return true; - }if (code < 97) { - return code === 95; - }if (code < 123) { - return true; - }if (code <= 65535) { - return code >= 170 && nonASCIIidentifierStart.test(String.fromCharCode(code)); - }if (astral === false) { - return false; - }return isInAstralSet(code, astralIdentifierStartCodes); -} - -function isIdentifierChar(code, astral) { - if (code < 48) { - return code === 36; - }if (code < 58) { - return true; - }if (code < 65) { - return false; - }if (code < 91) { - return true; - }if (code < 97) { - return code === 95; - }if (code < 123) { - return true; - }if (code <= 65535) { - return code >= 170 && nonASCIIidentifier.test(String.fromCharCode(code)); - }if (astral === false) { - return false; - }return isInAstralSet(code, astralIdentifierStartCodes) || isInAstralSet(code, astralIdentifierCodes); -} - -},{}],8:[function(_dereq_,module,exports){ -"use strict"; - -var _classCallCheck = function (instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }; - -// The `getLineInfo` function is mostly useful when the -// `locations` option is off (for performance reasons) and you -// want to find the line/column position for a given character -// offset. `input` should be the code string that the offset refers -// into. - -exports.getLineInfo = getLineInfo; -exports.__esModule = true; - -var Parser = _dereq_("./state").Parser; - -var lineBreakG = _dereq_("./whitespace").lineBreakG; - -var deprecate = _dereq_("util").deprecate; - -// These are used when `options.locations` is on, for the -// `startLoc` and `endLoc` properties. - -var Position = exports.Position = (function () { - function Position(line, col) { - _classCallCheck(this, Position); - - this.line = line; - this.column = col; - } - - Position.prototype.offset = function offset(n) { - return new Position(this.line, this.column + n); - }; - - return Position; -})(); - -var SourceLocation = exports.SourceLocation = function SourceLocation(p, start, end) { - _classCallCheck(this, SourceLocation); - - this.start = start; - this.end = end; - if (p.sourceFile !== null) this.source = p.sourceFile; -}; - -function getLineInfo(input, offset) { - for (var line = 1, cur = 0;;) { - lineBreakG.lastIndex = cur; - var match = lineBreakG.exec(input); - if (match && match.index < offset) { - ++line; - cur = match.index + match[0].length; - } else { - return new Position(line, offset - cur); - } - } -} - -var pp = Parser.prototype; - -// This function is used to raise exceptions on parse errors. It -// takes an offset integer (into the current `input`) to indicate -// the location of the error, attaches the position to the end -// of the error message, and then raises a `SyntaxError` with that -// message. - -pp.raise = function (pos, message) { - var loc = getLineInfo(this.input, pos); - message += " (" + loc.line + ":" + loc.column + ")"; - var err = new SyntaxError(message); - err.pos = pos;err.loc = loc;err.raisedAt = this.pos; - throw err; -}; - -pp.curPosition = function () { - return new Position(this.curLine, this.pos - this.lineStart); -}; - -pp.markPosition = function () { - return this.options.locations ? [this.start, this.startLoc] : this.start; -}; - -},{"./state":13,"./whitespace":19,"util":5}],9:[function(_dereq_,module,exports){ -"use strict"; - -var tt = _dereq_("./tokentype").types; - -var Parser = _dereq_("./state").Parser; - -var reservedWords = _dereq_("./identifier").reservedWords; - -var has = _dereq_("./util").has; - -var pp = Parser.prototype; - -// Convert existing expression atom to assignable pattern -// if possible. - -pp.toAssignable = function (node, isBinding) { - if (this.options.ecmaVersion >= 6 && node) { - switch (node.type) { - case "Identifier": - case "ObjectPattern": - case "ArrayPattern": - case "AssignmentPattern": - break; - - case "ObjectExpression": - node.type = "ObjectPattern"; - for (var i = 0; i < node.properties.length; i++) { - var prop = node.properties[i]; - if (prop.kind !== "init") this.raise(prop.key.start, "Object pattern can't contain getter or setter"); - this.toAssignable(prop.value, isBinding); - } - break; - - case "ArrayExpression": - node.type = "ArrayPattern"; - this.toAssignableList(node.elements, isBinding); - break; - - case "AssignmentExpression": - if (node.operator === "=") { - node.type = "AssignmentPattern"; - } else { - this.raise(node.left.end, "Only '=' operator can be used for specifying default value."); - } - break; - - case "ParenthesizedExpression": - node.expression = this.toAssignable(node.expression, isBinding); - break; - - case "MemberExpression": - if (!isBinding) break; - - default: - this.raise(node.start, "Assigning to rvalue"); - } - } - return node; -}; - -// Convert list of expression atoms to binding list. - -pp.toAssignableList = function (exprList, isBinding) { - var end = exprList.length; - if (end) { - var last = exprList[end - 1]; - if (last && last.type == "RestElement") { - --end; - } else if (last && last.type == "SpreadElement") { - last.type = "RestElement"; - var arg = last.argument; - this.toAssignable(arg, isBinding); - if (arg.type !== "Identifier" && arg.type !== "MemberExpression" && arg.type !== "ArrayPattern") this.unexpected(arg.start); - --end; - } - } - for (var i = 0; i < end; i++) { - var elt = exprList[i]; - if (elt) this.toAssignable(elt, isBinding); - } - return exprList; -}; - -// Parses spread element. - -pp.parseSpread = function (refShorthandDefaultPos) { - var node = this.startNode(); - this.next(); - node.argument = this.parseMaybeAssign(refShorthandDefaultPos); - return this.finishNode(node, "SpreadElement"); -}; - -pp.parseRest = function () { - var node = this.startNode(); - this.next(); - node.argument = this.type === tt.name || this.type === tt.bracketL ? this.parseBindingAtom() : this.unexpected(); - return this.finishNode(node, "RestElement"); -}; - -// Parses lvalue (assignable) atom. - -pp.parseBindingAtom = function () { - if (this.options.ecmaVersion < 6) return this.parseIdent(); - switch (this.type) { - case tt.name: - return this.parseIdent(); - - case tt.bracketL: - var node = this.startNode(); - this.next(); - node.elements = this.parseBindingList(tt.bracketR, true, true); - return this.finishNode(node, "ArrayPattern"); - - case tt.braceL: - return this.parseObj(true); - - default: - this.unexpected(); - } -}; - -pp.parseBindingList = function (close, allowEmpty, allowTrailingComma) { - var elts = [], - first = true; - while (!this.eat(close)) { - if (first) first = false;else this.expect(tt.comma); - if (allowEmpty && this.type === tt.comma) { - elts.push(null); - } else if (allowTrailingComma && this.afterTrailingComma(close)) { - break; - } else if (this.type === tt.ellipsis) { - var rest = this.parseRest(); - this.parseBindingListItem(rest); - elts.push(rest); - this.expect(close); - break; - } else { - var elem = this.parseMaybeDefault(this.start, this.startLoc); - this.parseBindingListItem(elem); - elts.push(elem); - } - } - return elts; -}; - -pp.parseBindingListItem = function (param) { - return param; -}; - -// Parses assignment pattern around given atom if possible. - -pp.parseMaybeDefault = function (startPos, startLoc, left) { - if (Array.isArray(startPos)) { - if (this.options.locations && noCalls === undefined) { - // shift arguments to left by one - left = startLoc; - // flatten startPos - startLoc = startPos[1]; - startPos = startPos[0]; - } - } - left = left || this.parseBindingAtom(); - if (!this.eat(tt.eq)) return left; - var node = this.startNodeAt(startPos, startLoc); - node.operator = "="; - node.left = left; - node.right = this.parseMaybeAssign(); - return this.finishNode(node, "AssignmentPattern"); -}; - -// Verify that a node is an lval — something that can be assigned -// to. - -pp.checkLVal = function (expr, isBinding, checkClashes) { - switch (expr.type) { - case "Identifier": - if (this.strict && (reservedWords.strictBind(expr.name) || reservedWords.strict(expr.name))) this.raise(expr.start, (isBinding ? "Binding " : "Assigning to ") + expr.name + " in strict mode"); - if (checkClashes) { - if (has(checkClashes, expr.name)) this.raise(expr.start, "Argument name clash in strict mode"); - checkClashes[expr.name] = true; - } - break; - - case "MemberExpression": - if (isBinding) this.raise(expr.start, (isBinding ? "Binding" : "Assigning to") + " member expression"); - break; - - case "ObjectPattern": - for (var i = 0; i < expr.properties.length; i++) { - this.checkLVal(expr.properties[i].value, isBinding, checkClashes); - }break; - - case "ArrayPattern": - for (var i = 0; i < expr.elements.length; i++) { - var elem = expr.elements[i]; - if (elem) this.checkLVal(elem, isBinding, checkClashes); - } - break; - - case "AssignmentPattern": - this.checkLVal(expr.left, isBinding, checkClashes); - break; - - case "RestElement": - this.checkLVal(expr.argument, isBinding, checkClashes); - break; - - case "ParenthesizedExpression": - this.checkLVal(expr.expression, isBinding, checkClashes); - break; - - default: - this.raise(expr.start, (isBinding ? "Binding" : "Assigning to") + " rvalue"); - } -}; - -},{"./identifier":7,"./state":13,"./tokentype":17,"./util":18}],10:[function(_dereq_,module,exports){ -"use strict"; - -var _classCallCheck = function (instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }; - -exports.__esModule = true; - -var Parser = _dereq_("./state").Parser; - -var SourceLocation = _dereq_("./location").SourceLocation; - -// Start an AST node, attaching a start offset. - -var pp = Parser.prototype; - -var Node = exports.Node = function Node() { - _classCallCheck(this, Node); -}; - -pp.startNode = function () { - var node = new Node(); - node.start = this.start; - if (this.options.locations) node.loc = new SourceLocation(this, this.startLoc); - if (this.options.directSourceFile) node.sourceFile = this.options.directSourceFile; - if (this.options.ranges) node.range = [this.start, 0]; - return node; -}; - -pp.startNodeAt = function (pos, loc) { - var node = new Node(); - if (Array.isArray(pos)) { - if (this.options.locations && loc === undefined) { - // flatten pos - loc = pos[1]; - pos = pos[0]; - } - } - node.start = pos; - if (this.options.locations) node.loc = new SourceLocation(this, loc); - if (this.options.directSourceFile) node.sourceFile = this.options.directSourceFile; - if (this.options.ranges) node.range = [pos, 0]; - return node; -}; - -// Finish an AST node, adding `type` and `end` properties. - -pp.finishNode = function (node, type) { - node.type = type; - node.end = this.lastTokEnd; - if (this.options.locations) node.loc.end = this.lastTokEndLoc; - if (this.options.ranges) node.range[1] = this.lastTokEnd; - return node; -}; - -// Finish node at given position - -pp.finishNodeAt = function (node, type, pos, loc) { - node.type = type; - if (Array.isArray(pos)) { - if (this.options.locations && loc === undefined) { - // flatten pos - loc = pos[1]; - pos = pos[0]; - } - } - node.end = pos; - if (this.options.locations) node.loc.end = loc; - if (this.options.ranges) node.range[1] = pos; - return node; -}; - -},{"./location":8,"./state":13}],11:[function(_dereq_,module,exports){ - - -// Interpret and default an options object - -"use strict"; - -exports.getOptions = getOptions; -exports.__esModule = true; - -var _util = _dereq_("./util"); - -var has = _util.has; -var isArray = _util.isArray; - -var SourceLocation = _dereq_("./location").SourceLocation; - -// A second optional argument can be given to further configure -// the parser process. These options are recognized: - -var defaultOptions = { - // `ecmaVersion` indicates the ECMAScript version to parse. Must - // be either 3, or 5, or 6. This influences support for strict - // mode, the set of reserved words, support for getters and - // setters and other features. - ecmaVersion: 5, - // Source type ("script" or "module") for different semantics - sourceType: "script", - // `onInsertedSemicolon` can be a callback that will be called - // when a semicolon is automatically inserted. It will be passed - // th position of the comma as an offset, and if `locations` is - // enabled, it is given the location as a `{line, column}` object - // as second argument. - onInsertedSemicolon: null, - // `onTrailingComma` is similar to `onInsertedSemicolon`, but for - // trailing commas. - onTrailingComma: null, - // By default, reserved words are not enforced. Disable - // `allowReserved` to enforce them. When this option has the - // value "never", reserved words and keywords can also not be - // used as property names. - allowReserved: true, - // When enabled, a return at the top level is not considered an - // error. - allowReturnOutsideFunction: false, - // When enabled, import/export statements are not constrained to - // appearing at the top of the program. - allowImportExportEverywhere: false, - // When enabled, hashbang directive in the beginning of file - // is allowed and treated as a line comment. - allowHashBang: false, - // When `locations` is on, `loc` properties holding objects with - // `start` and `end` properties in `{line, column}` form (with - // line being 1-based and column 0-based) will be attached to the - // nodes. - locations: false, - // A function can be passed as `onToken` option, which will - // cause Acorn to call that function with object in the same - // format as tokenize() returns. Note that you are not - // allowed to call the parser from the callback—that will - // corrupt its internal state. - onToken: null, - // A function can be passed as `onComment` option, which will - // cause Acorn to call that function with `(block, text, start, - // end)` parameters whenever a comment is skipped. `block` is a - // boolean indicating whether this is a block (`/* */`) comment, - // `text` is the content of the comment, and `start` and `end` are - // character offsets that denote the start and end of the comment. - // When the `locations` option is on, two more parameters are - // passed, the full `{line, column}` locations of the start and - // end of the comments. Note that you are not allowed to call the - // parser from the callback—that will corrupt its internal state. - onComment: null, - // Nodes have their start and end characters offsets recorded in - // `start` and `end` properties (directly on the node, rather than - // the `loc` object, which holds line/column data. To also add a - // [semi-standardized][range] `range` property holding a `[start, - // end]` array with the same numbers, set the `ranges` option to - // `true`. - // - // [range]: https://bugzilla.mozilla.org/show_bug.cgi?id=745678 - ranges: false, - // It is possible to parse multiple files into a single AST by - // passing the tree produced by parsing the first file as - // `program` option in subsequent parses. This will add the - // toplevel forms of the parsed file to the `Program` (top) node - // of an existing parse tree. - program: null, - // When `locations` is on, you can pass this to record the source - // file in every node's `loc` object. - sourceFile: null, - // This value, if given, is stored in every node, whether - // `locations` is on or off. - directSourceFile: null, - // When enabled, parenthesized expressions are represented by - // (non-standard) ParenthesizedExpression nodes - preserveParens: false, - plugins: {} -};exports.defaultOptions = defaultOptions; - -function getOptions(opts) { - var options = {}; - for (var opt in defaultOptions) { - options[opt] = opts && has(opts, opt) ? opts[opt] : defaultOptions[opt]; - }if (isArray(options.onToken)) { - (function () { - var tokens = options.onToken; - options.onToken = function (token) { - return tokens.push(token); - }; - })(); - } - if (isArray(options.onComment)) options.onComment = pushComment(options, options.onComment); - - return options; -} - -function pushComment(options, array) { - return function (block, text, start, end, startLoc, endLoc) { - var comment = { - type: block ? "Block" : "Line", - value: text, - start: start, - end: end - }; - if (options.locations) comment.loc = new SourceLocation(this, startLoc, endLoc); - if (options.ranges) comment.range = [start, end]; - array.push(comment); - }; -} - -},{"./location":8,"./util":18}],12:[function(_dereq_,module,exports){ -"use strict"; - -var tt = _dereq_("./tokentype").types; - -var Parser = _dereq_("./state").Parser; - -var lineBreak = _dereq_("./whitespace").lineBreak; - -var pp = Parser.prototype; - -// ## Parser utilities - -// Test whether a statement node is the string literal `"use strict"`. - -pp.isUseStrict = function (stmt) { - return this.options.ecmaVersion >= 5 && stmt.type === "ExpressionStatement" && stmt.expression.type === "Literal" && stmt.expression.value === "use strict"; -}; - -// Predicate that tests whether the next token is of the given -// type, and if yes, consumes it as a side effect. - -pp.eat = function (type) { - if (this.type === type) { - this.next(); - return true; - } else { - return false; - } -}; - -// Tests whether parsed token is a contextual keyword. - -pp.isContextual = function (name) { - return this.type === tt.name && this.value === name; -}; - -// Consumes contextual keyword if possible. - -pp.eatContextual = function (name) { - return this.value === name && this.eat(tt.name); -}; - -// Asserts that following token is given contextual keyword. - -pp.expectContextual = function (name) { - if (!this.eatContextual(name)) this.unexpected(); -}; - -// Test whether a semicolon can be inserted at the current position. - -pp.canInsertSemicolon = function () { - return this.type === tt.eof || this.type === tt.braceR || lineBreak.test(this.input.slice(this.lastTokEnd, this.start)); -}; - -pp.insertSemicolon = function () { - if (this.canInsertSemicolon()) { - if (this.options.onInsertedSemicolon) this.options.onInsertedSemicolon(this.lastTokEnd, this.lastTokEndLoc); - return true; - } -}; - -// Consume a semicolon, or, failing that, see if we are allowed to -// pretend that there is a semicolon at this position. - -pp.semicolon = function () { - if (!this.eat(tt.semi) && !this.insertSemicolon()) this.unexpected(); -}; - -pp.afterTrailingComma = function (tokType) { - if (this.type == tokType) { - if (this.options.onTrailingComma) this.options.onTrailingComma(this.lastTokStart, this.lastTokStartLoc); - this.next(); - return true; - } -}; - -// Expect a token of a given type. If found, consume it, otherwise, -// raise an unexpected token error. - -pp.expect = function (type) { - this.eat(type) || this.unexpected(); -}; - -// Raise an unexpected token error. - -pp.unexpected = function (pos) { - this.raise(pos != null ? pos : this.start, "Unexpected token"); -}; - -},{"./state":13,"./tokentype":17,"./whitespace":19}],13:[function(_dereq_,module,exports){ -"use strict"; - -exports.Parser = Parser; -exports.__esModule = true; - -var _identifier = _dereq_("./identifier"); - -var reservedWords = _identifier.reservedWords; -var keywords = _identifier.keywords; - -var tt = _dereq_("./tokentype").types; - -var lineBreak = _dereq_("./whitespace").lineBreak; - -function Parser(options, input, startPos) { - this.options = options; - this.sourceFile = this.options.sourceFile || null; - this.isKeyword = keywords[this.options.ecmaVersion >= 6 ? 6 : 5]; - this.isReservedWord = reservedWords[this.options.ecmaVersion]; - this.input = input; - - // Load plugins - this.loadPlugins(this.options.plugins); - - // Set up token state - - // The current position of the tokenizer in the input. - if (startPos) { - this.pos = startPos; - this.lineStart = Math.max(0, this.input.lastIndexOf("\n", startPos)); - this.curLine = this.input.slice(0, this.lineStart).split(lineBreak).length; - } else { - this.pos = this.lineStart = 0; - this.curLine = 1; - } - - // Properties of the current token: - // Its type - this.type = tt.eof; - // For tokens that include more information than their type, the value - this.value = null; - // Its start and end offset - this.start = this.end = this.pos; - // And, if locations are used, the {line, column} object - // corresponding to those offsets - this.startLoc = this.endLoc = null; - - // Position information for the previous token - this.lastTokEndLoc = this.lastTokStartLoc = null; - this.lastTokStart = this.lastTokEnd = this.pos; - - // The context stack is used to superficially track syntactic - // context to predict whether a regular expression is allowed in a - // given position. - this.context = this.initialContext(); - this.exprAllowed = true; - - // Figure out if it's a module code. - this.strict = this.inModule = this.options.sourceType === "module"; - - // Used to signify the start of a potential arrow function - this.potentialArrowAt = -1; - - // Flags to track whether we are in a function, a generator. - this.inFunction = this.inGenerator = false; - // Labels in scope. - this.labels = []; - - // If enabled, skip leading hashbang line. - if (this.pos === 0 && this.options.allowHashBang && this.input.slice(0, 2) === "#!") this.skipLineComment(2); -} - -Parser.prototype.extend = function (name, f) { - this[name] = f(this[name]); -}; - -// Registered plugins - -var plugins = {}; - -exports.plugins = plugins; -Parser.prototype.loadPlugins = function (plugins) { - for (var _name in plugins) { - var plugin = exports.plugins[_name]; - if (!plugin) throw new Error("Plugin '" + _name + "' not found"); - plugin(this, plugins[_name]); - } -}; - -},{"./identifier":7,"./tokentype":17,"./whitespace":19}],14:[function(_dereq_,module,exports){ -"use strict"; - -var tt = _dereq_("./tokentype").types; - -var Parser = _dereq_("./state").Parser; - -var lineBreak = _dereq_("./whitespace").lineBreak; - -var pp = Parser.prototype; - -// ### Statement parsing - -// Parse a program. Initializes the parser, reads any number of -// statements, and wraps them in a Program node. Optionally takes a -// `program` argument. If present, the statements will be appended -// to its body instead of creating a new node. - -pp.parseTopLevel = function (node) { - var first = true; - if (!node.body) node.body = []; - while (this.type !== tt.eof) { - var stmt = this.parseStatement(true, true); - node.body.push(stmt); - if (first && this.isUseStrict(stmt)) this.setStrict(true); - first = false; - } - this.next(); - if (this.options.ecmaVersion >= 6) { - node.sourceType = this.options.sourceType; - } - return this.finishNode(node, "Program"); -}; - -var loopLabel = { kind: "loop" }, - switchLabel = { kind: "switch" }; - -// Parse a single statement. -// -// If expecting a statement and finding a slash operator, parse a -// regular expression literal. This is to handle cases like -// `if (foo) /blah/.exec(foo)`, where looking at the previous token -// does not help. - -pp.parseStatement = function (declaration, topLevel) { - var starttype = this.type, - node = this.startNode(); - - // Most types of statements are recognized by the keyword they - // start with. Many are trivial to parse, some require a bit of - // complexity. - - switch (starttype) { - case tt._break:case tt._continue: - return this.parseBreakContinueStatement(node, starttype.keyword); - case tt._debugger: - return this.parseDebuggerStatement(node); - case tt._do: - return this.parseDoStatement(node); - case tt._for: - return this.parseForStatement(node); - case tt._function: - if (!declaration && this.options.ecmaVersion >= 6) this.unexpected(); - return this.parseFunctionStatement(node); - case tt._class: - if (!declaration) this.unexpected(); - return this.parseClass(node, true); - case tt._if: - return this.parseIfStatement(node); - case tt._return: - return this.parseReturnStatement(node); - case tt._switch: - return this.parseSwitchStatement(node); - case tt._throw: - return this.parseThrowStatement(node); - case tt._try: - return this.parseTryStatement(node); - case tt._let:case tt._const: - if (!declaration) this.unexpected(); // NOTE: falls through to _var - case tt._var: - return this.parseVarStatement(node, starttype); - case tt._while: - return this.parseWhileStatement(node); - case tt._with: - return this.parseWithStatement(node); - case tt.braceL: - return this.parseBlock(); - case tt.semi: - return this.parseEmptyStatement(node); - case tt._export: - case tt._import: - if (!this.options.allowImportExportEverywhere) { - if (!topLevel) this.raise(this.start, "'import' and 'export' may only appear at the top level"); - if (!this.inModule) this.raise(this.start, "'import' and 'export' may appear only with 'sourceType: module'"); - } - return starttype === tt._import ? this.parseImport(node) : this.parseExport(node); - - // If the statement does not start with a statement keyword or a - // brace, it's an ExpressionStatement or LabeledStatement. We - // simply start parsing an expression, and afterwards, if the - // next token is a colon and the expression was a simple - // Identifier node, we switch to interpreting it as a label. - default: - var maybeName = this.value, - expr = this.parseExpression(); - if (starttype === tt.name && expr.type === "Identifier" && this.eat(tt.colon)) return this.parseLabeledStatement(node, maybeName, expr);else return this.parseExpressionStatement(node, expr); - } -}; - -pp.parseBreakContinueStatement = function (node, keyword) { - var isBreak = keyword == "break"; - this.next(); - if (this.eat(tt.semi) || this.insertSemicolon()) node.label = null;else if (this.type !== tt.name) this.unexpected();else { - node.label = this.parseIdent(); - this.semicolon(); - } - - // Verify that there is an actual destination to break or - // continue to. - for (var i = 0; i < this.labels.length; ++i) { - var lab = this.labels[i]; - if (node.label == null || lab.name === node.label.name) { - if (lab.kind != null && (isBreak || lab.kind === "loop")) break; - if (node.label && isBreak) break; - } - } - if (i === this.labels.length) this.raise(node.start, "Unsyntactic " + keyword); - return this.finishNode(node, isBreak ? "BreakStatement" : "ContinueStatement"); -}; - -pp.parseDebuggerStatement = function (node) { - this.next(); - this.semicolon(); - return this.finishNode(node, "DebuggerStatement"); -}; - -pp.parseDoStatement = function (node) { - this.next(); - this.labels.push(loopLabel); - node.body = this.parseStatement(false); - this.labels.pop(); - this.expect(tt._while); - node.test = this.parseParenExpression(); - if (this.options.ecmaVersion >= 6) this.eat(tt.semi);else this.semicolon(); - return this.finishNode(node, "DoWhileStatement"); -}; - -// Disambiguating between a `for` and a `for`/`in` or `for`/`of` -// loop is non-trivial. Basically, we have to parse the init `var` -// statement or expression, disallowing the `in` operator (see -// the second parameter to `parseExpression`), and then check -// whether the next token is `in` or `of`. When there is no init -// part (semicolon immediately after the opening parenthesis), it -// is a regular `for` loop. - -pp.parseForStatement = function (node) { - this.next(); - this.labels.push(loopLabel); - this.expect(tt.parenL); - if (this.type === tt.semi) return this.parseFor(node, null); - if (this.type === tt._var || this.type === tt._let || this.type === tt._const) { - var _init = this.startNode(), - varKind = this.type; - this.next(); - this.parseVar(_init, true, varKind); - this.finishNode(_init, "VariableDeclaration"); - if ((this.type === tt._in || this.options.ecmaVersion >= 6 && this.isContextual("of")) && _init.declarations.length === 1 && !(varKind !== tt._var && _init.declarations[0].init)) return this.parseForIn(node, _init); - return this.parseFor(node, _init); - } - var refShorthandDefaultPos = { start: 0 }; - var init = this.parseExpression(true, refShorthandDefaultPos); - if (this.type === tt._in || this.options.ecmaVersion >= 6 && this.isContextual("of")) { - this.toAssignable(init); - this.checkLVal(init); - return this.parseForIn(node, init); - } else if (refShorthandDefaultPos.start) { - this.unexpected(refShorthandDefaultPos.start); - } - return this.parseFor(node, init); -}; - -pp.parseFunctionStatement = function (node) { - this.next(); - return this.parseFunction(node, true); -}; - -pp.parseIfStatement = function (node) { - this.next(); - node.test = this.parseParenExpression(); - node.consequent = this.parseStatement(false); - node.alternate = this.eat(tt._else) ? this.parseStatement(false) : null; - return this.finishNode(node, "IfStatement"); -}; - -pp.parseReturnStatement = function (node) { - if (!this.inFunction && !this.options.allowReturnOutsideFunction) this.raise(this.start, "'return' outside of function"); - this.next(); - - // In `return` (and `break`/`continue`), the keywords with - // optional arguments, we eagerly look for a semicolon or the - // possibility to insert one. - - if (this.eat(tt.semi) || this.insertSemicolon()) node.argument = null;else { - node.argument = this.parseExpression();this.semicolon(); - } - return this.finishNode(node, "ReturnStatement"); -}; - -pp.parseSwitchStatement = function (node) { - this.next(); - node.discriminant = this.parseParenExpression(); - node.cases = []; - this.expect(tt.braceL); - this.labels.push(switchLabel); - - // Statements under must be grouped (by label) in SwitchCase - // nodes. `cur` is used to keep the node that we are currently - // adding statements to. - - for (var cur, sawDefault; this.type != tt.braceR;) { - if (this.type === tt._case || this.type === tt._default) { - var isCase = this.type === tt._case; - if (cur) this.finishNode(cur, "SwitchCase"); - node.cases.push(cur = this.startNode()); - cur.consequent = []; - this.next(); - if (isCase) { - cur.test = this.parseExpression(); - } else { - if (sawDefault) this.raise(this.lastTokStart, "Multiple default clauses"); - sawDefault = true; - cur.test = null; - } - this.expect(tt.colon); - } else { - if (!cur) this.unexpected(); - cur.consequent.push(this.parseStatement(true)); - } - } - if (cur) this.finishNode(cur, "SwitchCase"); - this.next(); // Closing brace - this.labels.pop(); - return this.finishNode(node, "SwitchStatement"); -}; - -pp.parseThrowStatement = function (node) { - this.next(); - if (lineBreak.test(this.input.slice(this.lastTokEnd, this.start))) this.raise(this.lastTokEnd, "Illegal newline after throw"); - node.argument = this.parseExpression(); - this.semicolon(); - return this.finishNode(node, "ThrowStatement"); -}; - -// Reused empty array added for node fields that are always empty. - -var empty = []; - -pp.parseTryStatement = function (node) { - this.next(); - node.block = this.parseBlock(); - node.handler = null; - if (this.type === tt._catch) { - var clause = this.startNode(); - this.next(); - this.expect(tt.parenL); - clause.param = this.parseBindingAtom(); - this.checkLVal(clause.param, true); - this.expect(tt.parenR); - clause.guard = null; - clause.body = this.parseBlock(); - node.handler = this.finishNode(clause, "CatchClause"); - } - node.guardedHandlers = empty; - node.finalizer = this.eat(tt._finally) ? this.parseBlock() : null; - if (!node.handler && !node.finalizer) this.raise(node.start, "Missing catch or finally clause"); - return this.finishNode(node, "TryStatement"); -}; - -pp.parseVarStatement = function (node, kind) { - this.next(); - this.parseVar(node, false, kind); - this.semicolon(); - return this.finishNode(node, "VariableDeclaration"); -}; - -pp.parseWhileStatement = function (node) { - this.next(); - node.test = this.parseParenExpression(); - this.labels.push(loopLabel); - node.body = this.parseStatement(false); - this.labels.pop(); - return this.finishNode(node, "WhileStatement"); -}; - -pp.parseWithStatement = function (node) { - if (this.strict) this.raise(this.start, "'with' in strict mode"); - this.next(); - node.object = this.parseParenExpression(); - node.body = this.parseStatement(false); - return this.finishNode(node, "WithStatement"); -}; - -pp.parseEmptyStatement = function (node) { - this.next(); - return this.finishNode(node, "EmptyStatement"); -}; - -pp.parseLabeledStatement = function (node, maybeName, expr) { - for (var i = 0; i < this.labels.length; ++i) { - if (this.labels[i].name === maybeName) this.raise(expr.start, "Label '" + maybeName + "' is already declared"); - }var kind = this.type.isLoop ? "loop" : this.type === tt._switch ? "switch" : null; - this.labels.push({ name: maybeName, kind: kind }); - node.body = this.parseStatement(true); - this.labels.pop(); - node.label = expr; - return this.finishNode(node, "LabeledStatement"); -}; - -pp.parseExpressionStatement = function (node, expr) { - node.expression = expr; - this.semicolon(); - return this.finishNode(node, "ExpressionStatement"); -}; - -// Parse a semicolon-enclosed block of statements, handling `"use -// strict"` declarations when `allowStrict` is true (used for -// function bodies). - -pp.parseBlock = function (allowStrict) { - var node = this.startNode(), - first = true, - oldStrict = undefined; - node.body = []; - this.expect(tt.braceL); - while (!this.eat(tt.braceR)) { - var stmt = this.parseStatement(true); - node.body.push(stmt); - if (first && allowStrict && this.isUseStrict(stmt)) { - oldStrict = this.strict; - this.setStrict(this.strict = true); - } - first = false; - } - if (oldStrict === false) this.setStrict(false); - return this.finishNode(node, "BlockStatement"); -}; - -// Parse a regular `for` loop. The disambiguation code in -// `parseStatement` will already have parsed the init statement or -// expression. - -pp.parseFor = function (node, init) { - node.init = init; - this.expect(tt.semi); - node.test = this.type === tt.semi ? null : this.parseExpression(); - this.expect(tt.semi); - node.update = this.type === tt.parenR ? null : this.parseExpression(); - this.expect(tt.parenR); - node.body = this.parseStatement(false); - this.labels.pop(); - return this.finishNode(node, "ForStatement"); -}; - -// Parse a `for`/`in` and `for`/`of` loop, which are almost -// same from parser's perspective. - -pp.parseForIn = function (node, init) { - var type = this.type === tt._in ? "ForInStatement" : "ForOfStatement"; - this.next(); - node.left = init; - node.right = this.parseExpression(); - this.expect(tt.parenR); - node.body = this.parseStatement(false); - this.labels.pop(); - return this.finishNode(node, type); -}; - -// Parse a list of variable declarations. - -pp.parseVar = function (node, isFor, kind) { - node.declarations = []; - node.kind = kind.keyword; - for (;;) { - var decl = this.startNode(); - this.parseVarId(decl); - if (this.eat(tt.eq)) { - decl.init = this.parseMaybeAssign(isFor); - } else if (kind === tt._const && !(this.type === tt._in || this.options.ecmaVersion >= 6 && this.isContextual("of"))) { - this.unexpected(); - } else if (decl.id.type != "Identifier" && !(isFor && (this.type === tt._in || this.isContextual("of")))) { - this.raise(this.lastTokEnd, "Complex binding patterns require an initialization value"); - } else { - decl.init = null; - } - node.declarations.push(this.finishNode(decl, "VariableDeclarator")); - if (!this.eat(tt.comma)) break; - } - return node; -}; - -pp.parseVarId = function (decl) { - decl.id = this.parseBindingAtom(); - this.checkLVal(decl.id, true); -}; - -// Parse a function declaration or literal (depending on the -// `isStatement` parameter). - -pp.parseFunction = function (node, isStatement, allowExpressionBody) { - this.initFunction(node); - if (this.options.ecmaVersion >= 6) node.generator = this.eat(tt.star); - if (isStatement || this.type === tt.name) node.id = this.parseIdent(); - this.parseFunctionParams(node); - this.parseFunctionBody(node, allowExpressionBody); - return this.finishNode(node, isStatement ? "FunctionDeclaration" : "FunctionExpression"); -}; - -pp.parseFunctionParams = function (node) { - this.expect(tt.parenL); - node.params = this.parseBindingList(tt.parenR, false, false); -}; - -// Parse a class declaration or literal (depending on the -// `isStatement` parameter). - -pp.parseClass = function (node, isStatement) { - this.next(); - this.parseClassId(node, isStatement); - this.parseClassSuper(node); - var classBody = this.startNode(); - var hadConstructor = false; - classBody.body = []; - this.expect(tt.braceL); - while (!this.eat(tt.braceR)) { - if (this.eat(tt.semi)) continue; - var method = this.startNode(); - var isGenerator = this.eat(tt.star); - var isMaybeStatic = this.type === tt.name && this.value === "static"; - this.parsePropertyName(method); - method["static"] = isMaybeStatic && this.type !== tt.parenL; - if (method["static"]) { - if (isGenerator) this.unexpected(); - isGenerator = this.eat(tt.star); - this.parsePropertyName(method); - } - method.kind = "method"; - if (!method.computed) { - var key = method.key; - - var isGetSet = false; - if (!isGenerator && key.type === "Identifier" && this.type !== tt.parenL && (key.name === "get" || key.name === "set")) { - isGetSet = true; - method.kind = key.name; - key = this.parsePropertyName(method); - } - if (!method["static"] && (key.type === "Identifier" && key.name === "constructor" || key.type === "Literal" && key.value === "constructor")) { - if (hadConstructor) this.raise(key.start, "Duplicate constructor in the same class"); - if (isGetSet) this.raise(key.start, "Constructor can't have get/set modifier"); - if (isGenerator) this.raise(key.start, "Constructor can't be a generator"); - method.kind = "constructor"; - hadConstructor = true; - } - } - this.parseClassMethod(classBody, method, isGenerator); - } - node.body = this.finishNode(classBody, "ClassBody"); - return this.finishNode(node, isStatement ? "ClassDeclaration" : "ClassExpression"); -}; - -pp.parseClassMethod = function (classBody, method, isGenerator) { - method.value = this.parseMethod(isGenerator); - classBody.body.push(this.finishNode(method, "MethodDefinition")); -}; - -pp.parseClassId = function (node, isStatement) { - node.id = this.type === tt.name ? this.parseIdent() : isStatement ? this.unexpected() : null; -}; - -pp.parseClassSuper = function (node) { - node.superClass = this.eat(tt._extends) ? this.parseExprSubscripts() : null; -}; - -// Parses module export declaration. - -pp.parseExport = function (node) { - this.next(); - // export * from '...' - if (this.eat(tt.star)) { - this.expectContextual("from"); - node.source = this.type === tt.string ? this.parseExprAtom() : this.unexpected(); - this.semicolon(); - return this.finishNode(node, "ExportAllDeclaration"); - } - if (this.eat(tt._default)) { - // export default ... - var expr = this.parseMaybeAssign(); - var needsSemi = true; - if (expr.type == "FunctionExpression" || expr.type == "ClassExpression") { - needsSemi = false; - if (expr.id) { - expr.type = expr.type == "FunctionExpression" ? "FunctionDeclaration" : "ClassDeclaration"; - } - } - node.declaration = expr; - if (needsSemi) this.semicolon(); - return this.finishNode(node, "ExportDefaultDeclaration"); - } - // export var|const|let|function|class ... - if (this.shouldParseExportStatement()) { - node.declaration = this.parseStatement(true); - node.specifiers = []; - node.source = null; - } else { - // export { x, y as z } [from '...'] - node.declaration = null; - node.specifiers = this.parseExportSpecifiers(); - if (this.eatContextual("from")) { - node.source = this.type === tt.string ? this.parseExprAtom() : this.unexpected(); - } else { - node.source = null; - } - this.semicolon(); - } - return this.finishNode(node, "ExportNamedDeclaration"); -}; - -pp.shouldParseExportStatement = function () { - return this.type.keyword; -}; - -// Parses a comma-separated list of module exports. - -pp.parseExportSpecifiers = function () { - var nodes = [], - first = true; - // export { x, y as z } [from '...'] - this.expect(tt.braceL); - while (!this.eat(tt.braceR)) { - if (!first) { - this.expect(tt.comma); - if (this.afterTrailingComma(tt.braceR)) break; - } else first = false; - - var node = this.startNode(); - node.local = this.parseIdent(this.type === tt._default); - node.exported = this.eatContextual("as") ? this.parseIdent(true) : node.local; - nodes.push(this.finishNode(node, "ExportSpecifier")); - } - return nodes; -}; - -// Parses import declaration. - -pp.parseImport = function (node) { - this.next(); - // import '...' - if (this.type === tt.string) { - node.specifiers = empty; - node.source = this.parseExprAtom(); - node.kind = ""; - } else { - node.specifiers = this.parseImportSpecifiers(); - this.expectContextual("from"); - node.source = this.type === tt.string ? this.parseExprAtom() : this.unexpected(); - } - this.semicolon(); - return this.finishNode(node, "ImportDeclaration"); -}; - -// Parses a comma-separated list of module imports. - -pp.parseImportSpecifiers = function () { - var nodes = [], - first = true; - if (this.type === tt.name) { - // import defaultObj, { x, y as z } from '...' - var node = this.startNode(); - node.local = this.parseIdent(); - this.checkLVal(node.local, true); - nodes.push(this.finishNode(node, "ImportDefaultSpecifier")); - if (!this.eat(tt.comma)) return nodes; - } - if (this.type === tt.star) { - var node = this.startNode(); - this.next(); - this.expectContextual("as"); - node.local = this.parseIdent(); - this.checkLVal(node.local, true); - nodes.push(this.finishNode(node, "ImportNamespaceSpecifier")); - return nodes; - } - this.expect(tt.braceL); - while (!this.eat(tt.braceR)) { - if (!first) { - this.expect(tt.comma); - if (this.afterTrailingComma(tt.braceR)) break; - } else first = false; - - var node = this.startNode(); - node.imported = this.parseIdent(true); - node.local = this.eatContextual("as") ? this.parseIdent() : node.imported; - this.checkLVal(node.local, true); - nodes.push(this.finishNode(node, "ImportSpecifier")); - } - return nodes; -}; - -},{"./state":13,"./tokentype":17,"./whitespace":19}],15:[function(_dereq_,module,exports){ -"use strict"; - -var _classCallCheck = function (instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }; - -exports.__esModule = true; -// The algorithm used to determine whether a regexp can appear at a -// given point in the program is loosely based on sweet.js' approach. -// See https://github.com/mozilla/sweet.js/wiki/design - -var Parser = _dereq_("./state").Parser; - -var tt = _dereq_("./tokentype").types; - -var lineBreak = _dereq_("./whitespace").lineBreak; - -var TokContext = exports.TokContext = function TokContext(token, isExpr, preserveSpace, override) { - _classCallCheck(this, TokContext); - - this.token = token; - this.isExpr = isExpr; - this.preserveSpace = preserveSpace; - this.override = override; -}; - -var types = { - b_stat: new TokContext("{", false), - b_expr: new TokContext("{", true), - b_tmpl: new TokContext("${", true), - p_stat: new TokContext("(", false), - p_expr: new TokContext("(", true), - q_tmpl: new TokContext("`", true, true, function (p) { - return p.readTmplToken(); - }), - f_expr: new TokContext("function", true) -}; - -exports.types = types; -var pp = Parser.prototype; - -pp.initialContext = function () { - return [types.b_stat]; -}; - -pp.braceIsBlock = function (prevType) { - var parent = undefined; - if (prevType === tt.colon && (parent = this.curContext()).token == "{") return !parent.isExpr; - if (prevType === tt._return) return lineBreak.test(this.input.slice(this.lastTokEnd, this.start)); - if (prevType === tt._else || prevType === tt.semi || prevType === tt.eof) return true; - if (prevType == tt.braceL) return this.curContext() === types.b_stat; - return !this.exprAllowed; -}; - -pp.updateContext = function (prevType) { - var update = undefined, - type = this.type; - if (type.keyword && prevType == tt.dot) this.exprAllowed = false;else if (update = type.updateContext) update.call(this, prevType);else this.exprAllowed = type.beforeExpr; -}; - -// Token-specific context update code - -tt.parenR.updateContext = tt.braceR.updateContext = function () { - if (this.context.length == 1) { - this.exprAllowed = true; - return; - } - var out = this.context.pop(); - if (out === types.b_stat && this.curContext() === types.f_expr) { - this.context.pop(); - this.exprAllowed = false; - } else if (out === types.b_tmpl) { - this.exprAllowed = true; - } else { - this.exprAllowed = !out.isExpr; - } -}; - -tt.braceL.updateContext = function (prevType) { - this.context.push(this.braceIsBlock(prevType) ? types.b_stat : types.b_expr); - this.exprAllowed = true; -}; - -tt.dollarBraceL.updateContext = function () { - this.context.push(types.b_tmpl); - this.exprAllowed = true; -}; - -tt.parenL.updateContext = function (prevType) { - var statementParens = prevType === tt._if || prevType === tt._for || prevType === tt._with || prevType === tt._while; - this.context.push(statementParens ? types.p_stat : types.p_expr); - this.exprAllowed = true; -}; - -tt.incDec.updateContext = function () {}; - -tt._function.updateContext = function () { - if (this.curContext() !== types.b_stat) this.context.push(types.f_expr); - this.exprAllowed = false; -}; - -tt.backQuote.updateContext = function () { - if (this.curContext() === types.q_tmpl) this.context.pop();else this.context.push(types.q_tmpl); - this.exprAllowed = false; -}; - -// tokExprAllowed stays unchanged - -},{"./state":13,"./tokentype":17,"./whitespace":19}],16:[function(_dereq_,module,exports){ -"use strict"; - -var _classCallCheck = function (instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }; - -exports.__esModule = true; - -var _identifier = _dereq_("./identifier"); - -var isIdentifierStart = _identifier.isIdentifierStart; -var isIdentifierChar = _identifier.isIdentifierChar; - -var _tokentype = _dereq_("./tokentype"); - -var tt = _tokentype.types; -var keywordTypes = _tokentype.keywords; - -var Parser = _dereq_("./state").Parser; - -var SourceLocation = _dereq_("./location").SourceLocation; - -var _whitespace = _dereq_("./whitespace"); - -var lineBreak = _whitespace.lineBreak; -var lineBreakG = _whitespace.lineBreakG; -var isNewLine = _whitespace.isNewLine; -var nonASCIIwhitespace = _whitespace.nonASCIIwhitespace; - -// Object type used to represent tokens. Note that normally, tokens -// simply exist as properties on the parser object. This is only -// used for the onToken callback and the external tokenizer. - -var Token = exports.Token = function Token(p) { - _classCallCheck(this, Token); - - this.type = p.type; - this.value = p.value; - this.start = p.start; - this.end = p.end; - if (p.options.locations) this.loc = new SourceLocation(p, p.startLoc, p.endLoc); - if (p.options.ranges) this.range = [p.start, p.end]; -}; - -// ## Tokenizer - -var pp = Parser.prototype; - -// Are we running under Rhino? -var isRhino = typeof Packages !== "undefined"; - -// Move to the next token - -pp.next = function () { - if (this.options.onToken) this.options.onToken(new Token(this)); - - this.lastTokEnd = this.end; - this.lastTokStart = this.start; - this.lastTokEndLoc = this.endLoc; - this.lastTokStartLoc = this.startLoc; - this.nextToken(); -}; - -pp.getToken = function () { - this.next(); - return new Token(this); -}; - -// If we're in an ES6 environment, make parsers iterable -if (typeof Symbol !== "undefined") pp[Symbol.iterator] = function () { - var self = this; - return { next: function next() { - var token = self.getToken(); - return { - done: token.type === tt.eof, - value: token - }; - } }; -}; - -// Toggle strict mode. Re-reads the next number or string to please -// pedantic tests (`"use strict"; 010;` should fail). - -pp.setStrict = function (strict) { - this.strict = strict; - if (this.type !== tt.num && this.type !== tt.string) return; - this.pos = this.start; - if (this.options.locations) { - while (this.pos < this.lineStart) { - this.lineStart = this.input.lastIndexOf("\n", this.lineStart - 2) + 1; - --this.curLine; - } - } - this.nextToken(); -}; - -pp.curContext = function () { - return this.context[this.context.length - 1]; -}; - -// Read a single token, updating the parser object's token-related -// properties. - -pp.nextToken = function () { - var curContext = this.curContext(); - if (!curContext || !curContext.preserveSpace) this.skipSpace(); - - this.start = this.pos; - if (this.options.locations) this.startLoc = this.curPosition(); - if (this.pos >= this.input.length) return this.finishToken(tt.eof); - - if (curContext.override) return curContext.override(this);else this.readToken(this.fullCharCodeAtPos()); -}; - -pp.readToken = function (code) { - // Identifier or keyword. '\uXXXX' sequences are allowed in - // identifiers, so '\' also dispatches to that. - if (isIdentifierStart(code, this.options.ecmaVersion >= 6) || code === 92 /* '\' */) return this.readWord(); - - return this.getTokenFromCode(code); -}; - -pp.fullCharCodeAtPos = function () { - var code = this.input.charCodeAt(this.pos); - if (code <= 55295 || code >= 57344) return code; - var next = this.input.charCodeAt(this.pos + 1); - return (code << 10) + next - 56613888; -}; - -pp.skipBlockComment = function () { - var startLoc = this.options.onComment && this.options.locations && this.curPosition(); - var start = this.pos, - end = this.input.indexOf("*/", this.pos += 2); - if (end === -1) this.raise(this.pos - 2, "Unterminated comment"); - this.pos = end + 2; - if (this.options.locations) { - lineBreakG.lastIndex = start; - var match = undefined; - while ((match = lineBreakG.exec(this.input)) && match.index < this.pos) { - ++this.curLine; - this.lineStart = match.index + match[0].length; - } - } - if (this.options.onComment) this.options.onComment(true, this.input.slice(start + 2, end), start, this.pos, startLoc, this.options.locations && this.curPosition()); -}; - -pp.skipLineComment = function (startSkip) { - var start = this.pos; - var startLoc = this.options.onComment && this.options.locations && this.curPosition(); - var ch = this.input.charCodeAt(this.pos += startSkip); - while (this.pos < this.input.length && ch !== 10 && ch !== 13 && ch !== 8232 && ch !== 8233) { - ++this.pos; - ch = this.input.charCodeAt(this.pos); - } - if (this.options.onComment) this.options.onComment(false, this.input.slice(start + startSkip, this.pos), start, this.pos, startLoc, this.options.locations && this.curPosition()); -}; - -// Called at the start of the parse and after every token. Skips -// whitespace and comments, and. - -pp.skipSpace = function () { - while (this.pos < this.input.length) { - var ch = this.input.charCodeAt(this.pos); - if (ch === 32) { - // ' ' - ++this.pos; - } else if (ch === 13) { - ++this.pos; - var next = this.input.charCodeAt(this.pos); - if (next === 10) { - ++this.pos; - } - if (this.options.locations) { - ++this.curLine; - this.lineStart = this.pos; - } - } else if (ch === 10 || ch === 8232 || ch === 8233) { - ++this.pos; - if (this.options.locations) { - ++this.curLine; - this.lineStart = this.pos; - } - } else if (ch > 8 && ch < 14) { - ++this.pos; - } else if (ch === 47) { - // '/' - var next = this.input.charCodeAt(this.pos + 1); - if (next === 42) { - // '*' - this.skipBlockComment(); - } else if (next === 47) { - // '/' - this.skipLineComment(2); - } else break; - } else if (ch === 160) { - // '\xa0' - ++this.pos; - } else if (ch >= 5760 && nonASCIIwhitespace.test(String.fromCharCode(ch))) { - ++this.pos; - } else { - break; - } - } -}; - -// Called at the end of every token. Sets `end`, `val`, and -// maintains `context` and `exprAllowed`, and skips the space after -// the token, so that the next one's `start` will point at the -// right position. - -pp.finishToken = function (type, val) { - this.end = this.pos; - if (this.options.locations) this.endLoc = this.curPosition(); - var prevType = this.type; - this.type = type; - this.value = val; - - this.updateContext(prevType); -}; - -// ### Token reading - -// This is the function that is called to fetch the next token. It -// is somewhat obscure, because it works in character codes rather -// than characters, and because operator parsing has been inlined -// into it. -// -// All in the name of speed. -// -pp.readToken_dot = function () { - var next = this.input.charCodeAt(this.pos + 1); - if (next >= 48 && next <= 57) return this.readNumber(true); - var next2 = this.input.charCodeAt(this.pos + 2); - if (this.options.ecmaVersion >= 6 && next === 46 && next2 === 46) { - // 46 = dot '.' - this.pos += 3; - return this.finishToken(tt.ellipsis); - } else { - ++this.pos; - return this.finishToken(tt.dot); - } -}; - -pp.readToken_slash = function () { - // '/' - var next = this.input.charCodeAt(this.pos + 1); - if (this.exprAllowed) { - ++this.pos;return this.readRegexp(); - } - if (next === 61) return this.finishOp(tt.assign, 2); - return this.finishOp(tt.slash, 1); -}; - -pp.readToken_mult_modulo = function (code) { - // '%*' - var next = this.input.charCodeAt(this.pos + 1); - if (next === 61) return this.finishOp(tt.assign, 2); - return this.finishOp(code === 42 ? tt.star : tt.modulo, 1); -}; - -pp.readToken_pipe_amp = function (code) { - // '|&' - var next = this.input.charCodeAt(this.pos + 1); - if (next === code) return this.finishOp(code === 124 ? tt.logicalOR : tt.logicalAND, 2); - if (next === 61) return this.finishOp(tt.assign, 2); - return this.finishOp(code === 124 ? tt.bitwiseOR : tt.bitwiseAND, 1); -}; - -pp.readToken_caret = function () { - // '^' - var next = this.input.charCodeAt(this.pos + 1); - if (next === 61) return this.finishOp(tt.assign, 2); - return this.finishOp(tt.bitwiseXOR, 1); -}; - -pp.readToken_plus_min = function (code) { - // '+-' - var next = this.input.charCodeAt(this.pos + 1); - if (next === code) { - if (next == 45 && this.input.charCodeAt(this.pos + 2) == 62 && lineBreak.test(this.input.slice(this.lastTokEnd, this.pos))) { - // A `-->` line comment - this.skipLineComment(3); - this.skipSpace(); - return this.nextToken(); - } - return this.finishOp(tt.incDec, 2); - } - if (next === 61) return this.finishOp(tt.assign, 2); - return this.finishOp(tt.plusMin, 1); -}; - -pp.readToken_lt_gt = function (code) { - // '<>' - var next = this.input.charCodeAt(this.pos + 1); - var size = 1; - if (next === code) { - size = code === 62 && this.input.charCodeAt(this.pos + 2) === 62 ? 3 : 2; - if (this.input.charCodeAt(this.pos + size) === 61) return this.finishOp(tt.assign, size + 1); - return this.finishOp(tt.bitShift, size); - } - if (next == 33 && code == 60 && this.input.charCodeAt(this.pos + 2) == 45 && this.input.charCodeAt(this.pos + 3) == 45) { - if (this.inModule) this.unexpected(); - // `` line comment - this.skipLineComment(3); - this.skipSpace(); - return this.nextToken(); - } - return this.finishOp(tt.incDec, 2); - } - if (next === 61) return this.finishOp(tt.assign, 2); - return this.finishOp(tt.plusMin, 1); -}; - -pp.readToken_lt_gt = function (code) { - // '<>' - var next = this.input.charCodeAt(this.pos + 1); - var size = 1; - if (next === code) { - size = code === 62 && this.input.charCodeAt(this.pos + 2) === 62 ? 3 : 2; - if (this.input.charCodeAt(this.pos + size) === 61) return this.finishOp(tt.assign, size + 1); - return this.finishOp(tt.bitShift, size); - } - if (next == 33 && code == 60 && this.input.charCodeAt(this.pos + 2) == 45 && this.input.charCodeAt(this.pos + 3) == 45) { - if (this.inModule) this.unexpected(); - // `` line comment - this.skipLineComment(3) - this.skipSpace() - return this.nextToken() - } - return this.finishOp(tt.incDec, 2) - } - if (next === 61) return this.finishOp(tt.assign, 2) - return this.finishOp(tt.plusMin, 1) -} - -pp.readToken_lt_gt = function(code) { // '<>' - let next = this.input.charCodeAt(this.pos + 1) - let size = 1 - if (next === code) { - size = code === 62 && this.input.charCodeAt(this.pos + 2) === 62 ? 3 : 2 - if (this.input.charCodeAt(this.pos + size) === 61) return this.finishOp(tt.assign, size + 1) - return this.finishOp(tt.bitShift, size) - } - if (next == 33 && code == 60 && this.input.charCodeAt(this.pos + 2) == 45 && - this.input.charCodeAt(this.pos + 3) == 45) { - if (this.inModule) this.unexpected() - // ` - -AsyncKit provides harness for `parallel` and `serial` iterators over list of items represented by arrays or objects. -Optionally it accepts abort function (should be synchronously return by iterator for each item), and terminates left over jobs upon an error event. For specific iteration order built-in (`ascending` and `descending`) and custom sort helpers also supported, via `asynckit.serialOrdered` method. - -It ensures async operations to keep behavior more stable and prevent `Maximum call stack size exceeded` errors, from sync iterators. - -| compression | size | -| :----------------- | -------: | -| asynckit.js | 12.34 kB | -| asynckit.min.js | 4.11 kB | -| asynckit.min.js.gz | 1.47 kB | - - -## Install - -```sh -$ npm install --save asynckit -``` - -## Examples - -### Parallel Jobs - -Runs iterator over provided array in parallel. Stores output in the `result` array, -on the matching positions. In unlikely event of an error from one of the jobs, -will terminate rest of the active jobs (if abort function is provided) -and return error along with salvaged data to the main callback function. - -#### Input Array - -```javascript -var parallel = require('asynckit').parallel - , assert = require('assert') - ; - -var source = [ 1, 1, 4, 16, 64, 32, 8, 2 ] - , expectedResult = [ 2, 2, 8, 32, 128, 64, 16, 4 ] - , expectedTarget = [ 1, 1, 2, 4, 8, 16, 32, 64 ] - , target = [] - ; - -parallel(source, asyncJob, function(err, result) -{ - assert.deepEqual(result, expectedResult); - assert.deepEqual(target, expectedTarget); -}); - -// async job accepts one element from the array -// and a callback function -function asyncJob(item, cb) -{ - // different delays (in ms) per item - var delay = item * 25; - - // pretend different jobs take different time to finish - // and not in consequential order - var timeoutId = setTimeout(function() { - target.push(item); - cb(null, item * 2); - }, delay); - - // allow to cancel "leftover" jobs upon error - // return function, invoking of which will abort this job - return clearTimeout.bind(null, timeoutId); -} -``` - -More examples could be found in [test/test-parallel-array.js](test/test-parallel-array.js). - -#### Input Object - -Also it supports named jobs, listed via object. - -```javascript -var parallel = require('asynckit/parallel') - , assert = require('assert') - ; - -var source = { first: 1, one: 1, four: 4, sixteen: 16, sixtyFour: 64, thirtyTwo: 32, eight: 8, two: 2 } - , expectedResult = { first: 2, one: 2, four: 8, sixteen: 32, sixtyFour: 128, thirtyTwo: 64, eight: 16, two: 4 } - , expectedTarget = [ 1, 1, 2, 4, 8, 16, 32, 64 ] - , expectedKeys = [ 'first', 'one', 'two', 'four', 'eight', 'sixteen', 'thirtyTwo', 'sixtyFour' ] - , target = [] - , keys = [] - ; - -parallel(source, asyncJob, function(err, result) -{ - assert.deepEqual(result, expectedResult); - assert.deepEqual(target, expectedTarget); - assert.deepEqual(keys, expectedKeys); -}); - -// supports full value, key, callback (shortcut) interface -function asyncJob(item, key, cb) -{ - // different delays (in ms) per item - var delay = item * 25; - - // pretend different jobs take different time to finish - // and not in consequential order - var timeoutId = setTimeout(function() { - keys.push(key); - target.push(item); - cb(null, item * 2); - }, delay); - - // allow to cancel "leftover" jobs upon error - // return function, invoking of which will abort this job - return clearTimeout.bind(null, timeoutId); -} -``` - -More examples could be found in [test/test-parallel-object.js](test/test-parallel-object.js). - -### Serial Jobs - -Runs iterator over provided array sequentially. Stores output in the `result` array, -on the matching positions. In unlikely event of an error from one of the jobs, -will not proceed to the rest of the items in the list -and return error along with salvaged data to the main callback function. - -#### Input Array - -```javascript -var serial = require('asynckit/serial') - , assert = require('assert') - ; - -var source = [ 1, 1, 4, 16, 64, 32, 8, 2 ] - , expectedResult = [ 2, 2, 8, 32, 128, 64, 16, 4 ] - , expectedTarget = [ 0, 1, 2, 3, 4, 5, 6, 7 ] - , target = [] - ; - -serial(source, asyncJob, function(err, result) -{ - assert.deepEqual(result, expectedResult); - assert.deepEqual(target, expectedTarget); -}); - -// extended interface (item, key, callback) -// also supported for arrays -function asyncJob(item, key, cb) -{ - target.push(key); - - // it will be automatically made async - // even it iterator "returns" in the same event loop - cb(null, item * 2); -} -``` - -More examples could be found in [test/test-serial-array.js](test/test-serial-array.js). - -#### Input Object - -Also it supports named jobs, listed via object. - -```javascript -var serial = require('asynckit').serial - , assert = require('assert') - ; - -var source = [ 1, 1, 4, 16, 64, 32, 8, 2 ] - , expectedResult = [ 2, 2, 8, 32, 128, 64, 16, 4 ] - , expectedTarget = [ 0, 1, 2, 3, 4, 5, 6, 7 ] - , target = [] - ; - -var source = { first: 1, one: 1, four: 4, sixteen: 16, sixtyFour: 64, thirtyTwo: 32, eight: 8, two: 2 } - , expectedResult = { first: 2, one: 2, four: 8, sixteen: 32, sixtyFour: 128, thirtyTwo: 64, eight: 16, two: 4 } - , expectedTarget = [ 1, 1, 4, 16, 64, 32, 8, 2 ] - , target = [] - ; - - -serial(source, asyncJob, function(err, result) -{ - assert.deepEqual(result, expectedResult); - assert.deepEqual(target, expectedTarget); -}); - -// shortcut interface (item, callback) -// works for object as well as for the arrays -function asyncJob(item, cb) -{ - target.push(item); - - // it will be automatically made async - // even it iterator "returns" in the same event loop - cb(null, item * 2); -} -``` - -More examples could be found in [test/test-serial-object.js](test/test-serial-object.js). - -_Note: Since _object_ is an _unordered_ collection of properties, -it may produce unexpected results with sequential iterations. -Whenever order of the jobs' execution is important please use `serialOrdered` method._ - -### Ordered Serial Iterations - -TBD - -For example [compare-property](compare-property) package. - -### Streaming interface - -TBD - -## Want to Know More? - -More examples can be found in [test folder](test/). - -Or open an [issue](https://github.com/alexindigo/asynckit/issues) with questions and/or suggestions. - -## License - -AsyncKit is licensed under the MIT license. diff --git a/node_modules/asynckit/bench.js b/node_modules/asynckit/bench.js deleted file mode 100644 index c612f1a5..00000000 --- a/node_modules/asynckit/bench.js +++ /dev/null @@ -1,76 +0,0 @@ -/* eslint no-console: "off" */ - -var asynckit = require('./') - , async = require('async') - , assert = require('assert') - , expected = 0 - ; - -var Benchmark = require('benchmark'); -var suite = new Benchmark.Suite; - -var source = []; -for (var z = 1; z < 100; z++) -{ - source.push(z); - expected += z; -} - -suite -// add tests - -.add('async.map', function(deferred) -{ - var total = 0; - - async.map(source, - function(i, cb) - { - setImmediate(function() - { - total += i; - cb(null, total); - }); - }, - function(err, result) - { - assert.ifError(err); - assert.equal(result[result.length - 1], expected); - deferred.resolve(); - }); -}, {'defer': true}) - - -.add('asynckit.parallel', function(deferred) -{ - var total = 0; - - asynckit.parallel(source, - function(i, cb) - { - setImmediate(function() - { - total += i; - cb(null, total); - }); - }, - function(err, result) - { - assert.ifError(err); - assert.equal(result[result.length - 1], expected); - deferred.resolve(); - }); -}, {'defer': true}) - - -// add listeners -.on('cycle', function(ev) -{ - console.log(String(ev.target)); -}) -.on('complete', function() -{ - console.log('Fastest is ' + this.filter('fastest').map('name')); -}) -// run async -.run({ 'async': true }); diff --git a/node_modules/asynckit/index.js b/node_modules/asynckit/index.js deleted file mode 100644 index 455f9454..00000000 --- a/node_modules/asynckit/index.js +++ /dev/null @@ -1,6 +0,0 @@ -module.exports = -{ - parallel : require('./parallel.js'), - serial : require('./serial.js'), - serialOrdered : require('./serialOrdered.js') -}; diff --git a/node_modules/asynckit/lib/abort.js b/node_modules/asynckit/lib/abort.js deleted file mode 100644 index 114367e5..00000000 --- a/node_modules/asynckit/lib/abort.js +++ /dev/null @@ -1,29 +0,0 @@ -// API -module.exports = abort; - -/** - * Aborts leftover active jobs - * - * @param {object} state - current state object - */ -function abort(state) -{ - Object.keys(state.jobs).forEach(clean.bind(state)); - - // reset leftover jobs - state.jobs = {}; -} - -/** - * Cleans up leftover job by invoking abort function for the provided job id - * - * @this state - * @param {string|number} key - job id to abort - */ -function clean(key) -{ - if (typeof this.jobs[key] == 'function') - { - this.jobs[key](); - } -} diff --git a/node_modules/asynckit/lib/async.js b/node_modules/asynckit/lib/async.js deleted file mode 100644 index 7f1288a4..00000000 --- a/node_modules/asynckit/lib/async.js +++ /dev/null @@ -1,34 +0,0 @@ -var defer = require('./defer.js'); - -// API -module.exports = async; - -/** - * Runs provided callback asynchronously - * even if callback itself is not - * - * @param {function} callback - callback to invoke - * @returns {function} - augmented callback - */ -function async(callback) -{ - var isAsync = false; - - // check if async happened - defer(function() { isAsync = true; }); - - return function async_callback(err, result) - { - if (isAsync) - { - callback(err, result); - } - else - { - defer(function nextTick_callback() - { - callback(err, result); - }); - } - }; -} diff --git a/node_modules/asynckit/lib/defer.js b/node_modules/asynckit/lib/defer.js deleted file mode 100644 index b67110c7..00000000 --- a/node_modules/asynckit/lib/defer.js +++ /dev/null @@ -1,26 +0,0 @@ -module.exports = defer; - -/** - * Runs provided function on next iteration of the event loop - * - * @param {function} fn - function to run - */ -function defer(fn) -{ - var nextTick = typeof setImmediate == 'function' - ? setImmediate - : ( - typeof process == 'object' && typeof process.nextTick == 'function' - ? process.nextTick - : null - ); - - if (nextTick) - { - nextTick(fn); - } - else - { - setTimeout(fn, 0); - } -} diff --git a/node_modules/asynckit/lib/iterate.js b/node_modules/asynckit/lib/iterate.js deleted file mode 100644 index 5d2839a5..00000000 --- a/node_modules/asynckit/lib/iterate.js +++ /dev/null @@ -1,75 +0,0 @@ -var async = require('./async.js') - , abort = require('./abort.js') - ; - -// API -module.exports = iterate; - -/** - * Iterates over each job object - * - * @param {array|object} list - array or object (named list) to iterate over - * @param {function} iterator - iterator to run - * @param {object} state - current job status - * @param {function} callback - invoked when all elements processed - */ -function iterate(list, iterator, state, callback) -{ - // store current index - var key = state['keyedList'] ? state['keyedList'][state.index] : state.index; - - state.jobs[key] = runJob(iterator, key, list[key], function(error, output) - { - // don't repeat yourself - // skip secondary callbacks - if (!(key in state.jobs)) - { - return; - } - - // clean up jobs - delete state.jobs[key]; - - if (error) - { - // don't process rest of the results - // stop still active jobs - // and reset the list - abort(state); - } - else - { - state.results[key] = output; - } - - // return salvaged results - callback(error, state.results); - }); -} - -/** - * Runs iterator over provided job element - * - * @param {function} iterator - iterator to invoke - * @param {string|number} key - key/index of the element in the list of jobs - * @param {mixed} item - job description - * @param {function} callback - invoked after iterator is done with the job - * @returns {function|mixed} - job abort function or something else - */ -function runJob(iterator, key, item, callback) -{ - var aborter; - - // allow shortcut if iterator expects only two arguments - if (iterator.length == 2) - { - aborter = iterator(item, async(callback)); - } - // otherwise go with full three arguments - else - { - aborter = iterator(item, key, async(callback)); - } - - return aborter; -} diff --git a/node_modules/asynckit/lib/readable_asynckit.js b/node_modules/asynckit/lib/readable_asynckit.js deleted file mode 100644 index 78ad240f..00000000 --- a/node_modules/asynckit/lib/readable_asynckit.js +++ /dev/null @@ -1,91 +0,0 @@ -var streamify = require('./streamify.js') - , defer = require('./defer.js') - ; - -// API -module.exports = ReadableAsyncKit; - -/** - * Base constructor for all streams - * used to hold properties/methods - */ -function ReadableAsyncKit() -{ - ReadableAsyncKit.super_.apply(this, arguments); - - // list of active jobs - this.jobs = {}; - - // add stream methods - this.destroy = destroy; - this._start = _start; - this._read = _read; -} - -/** - * Destroys readable stream, - * by aborting outstanding jobs - * - * @returns {void} - */ -function destroy() -{ - if (this.destroyed) - { - return; - } - - this.destroyed = true; - - if (typeof this.terminator == 'function') - { - this.terminator(); - } -} - -/** - * Starts provided jobs in async manner - * - * @private - */ -function _start() -{ - // first argument – runner function - var runner = arguments[0] - // take away first argument - , args = Array.prototype.slice.call(arguments, 1) - // second argument - input data - , input = args[0] - // last argument - result callback - , endCb = streamify.callback.call(this, args[args.length - 1]) - ; - - args[args.length - 1] = endCb; - // third argument - iterator - args[1] = streamify.iterator.call(this, args[1]); - - // allow time for proper setup - defer(function() - { - if (!this.destroyed) - { - this.terminator = runner.apply(null, args); - } - else - { - endCb(null, Array.isArray(input) ? [] : {}); - } - }.bind(this)); -} - - -/** - * Implement _read to comply with Readable streams - * Doesn't really make sense for flowing object mode - * - * @private - */ -function _read() -{ - -} diff --git a/node_modules/asynckit/lib/readable_parallel.js b/node_modules/asynckit/lib/readable_parallel.js deleted file mode 100644 index 5d2929f7..00000000 --- a/node_modules/asynckit/lib/readable_parallel.js +++ /dev/null @@ -1,25 +0,0 @@ -var parallel = require('../parallel.js'); - -// API -module.exports = ReadableParallel; - -/** - * Streaming wrapper to `asynckit.parallel` - * - * @param {array|object} list - array or object (named list) to iterate over - * @param {function} iterator - iterator to run - * @param {function} callback - invoked when all elements processed - * @returns {stream.Readable#} - */ -function ReadableParallel(list, iterator, callback) -{ - if (!(this instanceof ReadableParallel)) - { - return new ReadableParallel(list, iterator, callback); - } - - // turn on object mode - ReadableParallel.super_.call(this, {objectMode: true}); - - this._start(parallel, list, iterator, callback); -} diff --git a/node_modules/asynckit/lib/readable_serial.js b/node_modules/asynckit/lib/readable_serial.js deleted file mode 100644 index 78226982..00000000 --- a/node_modules/asynckit/lib/readable_serial.js +++ /dev/null @@ -1,25 +0,0 @@ -var serial = require('../serial.js'); - -// API -module.exports = ReadableSerial; - -/** - * Streaming wrapper to `asynckit.serial` - * - * @param {array|object} list - array or object (named list) to iterate over - * @param {function} iterator - iterator to run - * @param {function} callback - invoked when all elements processed - * @returns {stream.Readable#} - */ -function ReadableSerial(list, iterator, callback) -{ - if (!(this instanceof ReadableSerial)) - { - return new ReadableSerial(list, iterator, callback); - } - - // turn on object mode - ReadableSerial.super_.call(this, {objectMode: true}); - - this._start(serial, list, iterator, callback); -} diff --git a/node_modules/asynckit/lib/readable_serial_ordered.js b/node_modules/asynckit/lib/readable_serial_ordered.js deleted file mode 100644 index 3de89c47..00000000 --- a/node_modules/asynckit/lib/readable_serial_ordered.js +++ /dev/null @@ -1,29 +0,0 @@ -var serialOrdered = require('../serialOrdered.js'); - -// API -module.exports = ReadableSerialOrdered; -// expose sort helpers -module.exports.ascending = serialOrdered.ascending; -module.exports.descending = serialOrdered.descending; - -/** - * Streaming wrapper to `asynckit.serialOrdered` - * - * @param {array|object} list - array or object (named list) to iterate over - * @param {function} iterator - iterator to run - * @param {function} sortMethod - custom sort function - * @param {function} callback - invoked when all elements processed - * @returns {stream.Readable#} - */ -function ReadableSerialOrdered(list, iterator, sortMethod, callback) -{ - if (!(this instanceof ReadableSerialOrdered)) - { - return new ReadableSerialOrdered(list, iterator, sortMethod, callback); - } - - // turn on object mode - ReadableSerialOrdered.super_.call(this, {objectMode: true}); - - this._start(serialOrdered, list, iterator, sortMethod, callback); -} diff --git a/node_modules/asynckit/lib/state.js b/node_modules/asynckit/lib/state.js deleted file mode 100644 index cbea7ad8..00000000 --- a/node_modules/asynckit/lib/state.js +++ /dev/null @@ -1,37 +0,0 @@ -// API -module.exports = state; - -/** - * Creates initial state object - * for iteration over list - * - * @param {array|object} list - list to iterate over - * @param {function|null} sortMethod - function to use for keys sort, - * or `null` to keep them as is - * @returns {object} - initial state object - */ -function state(list, sortMethod) -{ - var isNamedList = !Array.isArray(list) - , initState = - { - index : 0, - keyedList: isNamedList || sortMethod ? Object.keys(list) : null, - jobs : {}, - results : isNamedList ? {} : [], - size : isNamedList ? Object.keys(list).length : list.length - } - ; - - if (sortMethod) - { - // sort array keys based on it's values - // sort object's keys just on own merit - initState.keyedList.sort(isNamedList ? sortMethod : function(a, b) - { - return sortMethod(list[a], list[b]); - }); - } - - return initState; -} diff --git a/node_modules/asynckit/lib/streamify.js b/node_modules/asynckit/lib/streamify.js deleted file mode 100644 index f56a1c92..00000000 --- a/node_modules/asynckit/lib/streamify.js +++ /dev/null @@ -1,141 +0,0 @@ -var async = require('./async.js'); - -// API -module.exports = { - iterator: wrapIterator, - callback: wrapCallback -}; - -/** - * Wraps iterators with long signature - * - * @this ReadableAsyncKit# - * @param {function} iterator - function to wrap - * @returns {function} - wrapped function - */ -function wrapIterator(iterator) -{ - var stream = this; - - return function(item, key, cb) - { - var aborter - , wrappedCb = async(wrapIteratorCallback.call(stream, cb, key)) - ; - - stream.jobs[key] = wrappedCb; - - // it's either shortcut (item, cb) - if (iterator.length == 2) - { - aborter = iterator(item, wrappedCb); - } - // or long format (item, key, cb) - else - { - aborter = iterator(item, key, wrappedCb); - } - - return aborter; - }; -} - -/** - * Wraps provided callback function - * allowing to execute snitch function before - * real callback - * - * @this ReadableAsyncKit# - * @param {function} callback - function to wrap - * @returns {function} - wrapped function - */ -function wrapCallback(callback) -{ - var stream = this; - - var wrapped = function(error, result) - { - return finisher.call(stream, error, result, callback); - }; - - return wrapped; -} - -/** - * Wraps provided iterator callback function - * makes sure snitch only called once, - * but passes secondary calls to the original callback - * - * @this ReadableAsyncKit# - * @param {function} callback - callback to wrap - * @param {number|string} key - iteration key - * @returns {function} wrapped callback - */ -function wrapIteratorCallback(callback, key) -{ - var stream = this; - - return function(error, output) - { - // don't repeat yourself - if (!(key in stream.jobs)) - { - callback(error, output); - return; - } - - // clean up jobs - delete stream.jobs[key]; - - return streamer.call(stream, error, {key: key, value: output}, callback); - }; -} - -/** - * Stream wrapper for iterator callback - * - * @this ReadableAsyncKit# - * @param {mixed} error - error response - * @param {mixed} output - iterator output - * @param {function} callback - callback that expects iterator results - */ -function streamer(error, output, callback) -{ - if (error && !this.error) - { - this.error = error; - this.pause(); - this.emit('error', error); - // send back value only, as expected - callback(error, output && output.value); - return; - } - - // stream stuff - this.push(output); - - // back to original track - // send back value only, as expected - callback(error, output && output.value); -} - -/** - * Stream wrapper for finishing callback - * - * @this ReadableAsyncKit# - * @param {mixed} error - error response - * @param {mixed} output - iterator output - * @param {function} callback - callback that expects final results - */ -function finisher(error, output, callback) -{ - // signal end of the stream - // only for successfully finished streams - if (!error) - { - this.push(null); - } - - // back to original track - callback(error, output); -} diff --git a/node_modules/asynckit/lib/terminator.js b/node_modules/asynckit/lib/terminator.js deleted file mode 100644 index d6eb9921..00000000 --- a/node_modules/asynckit/lib/terminator.js +++ /dev/null @@ -1,29 +0,0 @@ -var abort = require('./abort.js') - , async = require('./async.js') - ; - -// API -module.exports = terminator; - -/** - * Terminates jobs in the attached state context - * - * @this AsyncKitState# - * @param {function} callback - final callback to invoke after termination - */ -function terminator(callback) -{ - if (!Object.keys(this.jobs).length) - { - return; - } - - // fast forward iteration index - this.index = this.size; - - // abort jobs - abort(this); - - // send back results we have so far - async(callback)(null, this.results); -} diff --git a/node_modules/asynckit/package.json b/node_modules/asynckit/package.json deleted file mode 100644 index c4f2db7d..00000000 --- a/node_modules/asynckit/package.json +++ /dev/null @@ -1,127 +0,0 @@ -{ - "_args": [ - [ - { - "raw": "asynckit@^0.4.0", - "scope": null, - "escapedName": "asynckit", - "name": "asynckit", - "rawSpec": "^0.4.0", - "spec": ">=0.4.0 <0.5.0", - "type": "range" - }, - "/Users/benjaminarias/Desktop/poly/node_modules/form-data" - ] - ], - "_from": "asynckit@>=0.4.0 <0.5.0", - "_id": "asynckit@0.4.0", - "_inCache": true, - "_installable": true, - "_location": "/asynckit", - "_nodeVersion": "0.12.11", - "_npmOperationalInternal": { - "host": "packages-16-east.internal.npmjs.com", - "tmp": "tmp/asynckit-0.4.0.tgz_1465928940169_0.8008207362145185" - }, - "_npmUser": { - "name": "alexindigo", - "email": "iam@alexindigo.com" - }, - "_npmVersion": "2.15.6", - "_phantomChildren": {}, - "_requested": { - "raw": "asynckit@^0.4.0", - "scope": null, - "escapedName": "asynckit", - "name": "asynckit", - "rawSpec": "^0.4.0", - "spec": ">=0.4.0 <0.5.0", - "type": "range" - }, - "_requiredBy": [ - "/form-data" - ], - "_resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", - "_shasum": "c79ed97f7f34cb8f2ba1bc9790bcc366474b4b79", - "_shrinkwrap": null, - "_spec": "asynckit@^0.4.0", - "_where": "/Users/benjaminarias/Desktop/poly/node_modules/form-data", - "author": { - "name": "Alex Indigo", - "email": "iam@alexindigo.com" - }, - "bugs": { - "url": "https://github.com/alexindigo/asynckit/issues" - }, - "dependencies": {}, - "description": "Minimal async jobs utility library, with streams support", - "devDependencies": { - "browserify": "^13.0.0", - "browserify-istanbul": "^2.0.0", - "coveralls": "^2.11.9", - "eslint": "^2.9.0", - "istanbul": "^0.4.3", - "obake": "^0.1.2", - "phantomjs-prebuilt": "^2.1.7", - "pre-commit": "^1.1.3", - "reamde": "^1.1.0", - "rimraf": "^2.5.2", - "size-table": "^0.2.0", - "tap-spec": "^4.1.1", - "tape": "^4.5.1" - }, - "directories": {}, - "dist": { - "shasum": "c79ed97f7f34cb8f2ba1bc9790bcc366474b4b79", - "tarball": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz" - }, - "gitHead": "583a75ed4fe41761b66416bb6e703ebb1f8963bf", - "homepage": "https://github.com/alexindigo/asynckit#readme", - "keywords": [ - "async", - "jobs", - "parallel", - "serial", - "iterator", - "array", - "object", - "stream", - "destroy", - "terminate", - "abort" - ], - "license": "MIT", - "main": "index.js", - "maintainers": [ - { - "name": "alexindigo", - "email": "iam@alexindigo.com" - } - ], - "name": "asynckit", - "optionalDependencies": {}, - "pre-commit": [ - "clean", - "lint", - "test", - "browser", - "report", - "size" - ], - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git+https://github.com/alexindigo/asynckit.git" - }, - "scripts": { - "browser": "browserify -t browserify-istanbul test/lib/browserify_adjustment.js test/test-*.js | obake --coverage | tap-spec", - "clean": "rimraf coverage", - "debug": "tape test/test-*.js", - "lint": "eslint *.js lib/*.js test/*.js", - "report": "istanbul report", - "size": "browserify index.js | size-table asynckit", - "test": "istanbul cover --reporter=json tape -- 'test/test-*.js' | tap-spec", - "win-test": "tape test/test-*.js" - }, - "version": "0.4.0" -} diff --git a/node_modules/asynckit/parallel.js b/node_modules/asynckit/parallel.js deleted file mode 100644 index 3c50344d..00000000 --- a/node_modules/asynckit/parallel.js +++ /dev/null @@ -1,43 +0,0 @@ -var iterate = require('./lib/iterate.js') - , initState = require('./lib/state.js') - , terminator = require('./lib/terminator.js') - ; - -// Public API -module.exports = parallel; - -/** - * Runs iterator over provided array elements in parallel - * - * @param {array|object} list - array or object (named list) to iterate over - * @param {function} iterator - iterator to run - * @param {function} callback - invoked when all elements processed - * @returns {function} - jobs terminator - */ -function parallel(list, iterator, callback) -{ - var state = initState(list); - - while (state.index < (state['keyedList'] || list).length) - { - iterate(list, iterator, state, function(error, result) - { - if (error) - { - callback(error, result); - return; - } - - // looks like it's the last one - if (Object.keys(state.jobs).length === 0) - { - callback(null, state.results); - return; - } - }); - - state.index++; - } - - return terminator.bind(state, callback); -} diff --git a/node_modules/asynckit/serial.js b/node_modules/asynckit/serial.js deleted file mode 100644 index 6cd949a6..00000000 --- a/node_modules/asynckit/serial.js +++ /dev/null @@ -1,17 +0,0 @@ -var serialOrdered = require('./serialOrdered.js'); - -// Public API -module.exports = serial; - -/** - * Runs iterator over provided array elements in series - * - * @param {array|object} list - array or object (named list) to iterate over - * @param {function} iterator - iterator to run - * @param {function} callback - invoked when all elements processed - * @returns {function} - jobs terminator - */ -function serial(list, iterator, callback) -{ - return serialOrdered(list, iterator, null, callback); -} diff --git a/node_modules/asynckit/serialOrdered.js b/node_modules/asynckit/serialOrdered.js deleted file mode 100644 index 607eafea..00000000 --- a/node_modules/asynckit/serialOrdered.js +++ /dev/null @@ -1,75 +0,0 @@ -var iterate = require('./lib/iterate.js') - , initState = require('./lib/state.js') - , terminator = require('./lib/terminator.js') - ; - -// Public API -module.exports = serialOrdered; -// sorting helpers -module.exports.ascending = ascending; -module.exports.descending = descending; - -/** - * Runs iterator over provided sorted array elements in series - * - * @param {array|object} list - array or object (named list) to iterate over - * @param {function} iterator - iterator to run - * @param {function} sortMethod - custom sort function - * @param {function} callback - invoked when all elements processed - * @returns {function} - jobs terminator - */ -function serialOrdered(list, iterator, sortMethod, callback) -{ - var state = initState(list, sortMethod); - - iterate(list, iterator, state, function iteratorHandler(error, result) - { - if (error) - { - callback(error, result); - return; - } - - state.index++; - - // are we there yet? - if (state.index < (state['keyedList'] || list).length) - { - iterate(list, iterator, state, iteratorHandler); - return; - } - - // done here - callback(null, state.results); - }); - - return terminator.bind(state, callback); -} - -/* - * -- Sort methods - */ - -/** - * sort helper to sort array elements in ascending order - * - * @param {mixed} a - an item to compare - * @param {mixed} b - an item to compare - * @returns {number} - comparison result - */ -function ascending(a, b) -{ - return a < b ? -1 : a > b ? 1 : 0; -} - -/** - * sort helper to sort array elements in descending order - * - * @param {mixed} a - an item to compare - * @param {mixed} b - an item to compare - * @returns {number} - comparison result - */ -function descending(a, b) -{ - return -1 * ascending(a, b); -} diff --git a/node_modules/asynckit/stream.js b/node_modules/asynckit/stream.js deleted file mode 100644 index d43465f9..00000000 --- a/node_modules/asynckit/stream.js +++ /dev/null @@ -1,21 +0,0 @@ -var inherits = require('util').inherits - , Readable = require('stream').Readable - , ReadableAsyncKit = require('./lib/readable_asynckit.js') - , ReadableParallel = require('./lib/readable_parallel.js') - , ReadableSerial = require('./lib/readable_serial.js') - , ReadableSerialOrdered = require('./lib/readable_serial_ordered.js') - ; - -// API -module.exports = -{ - parallel : ReadableParallel, - serial : ReadableSerial, - serialOrdered : ReadableSerialOrdered, -}; - -inherits(ReadableAsyncKit, Readable); - -inherits(ReadableParallel, ReadableAsyncKit); -inherits(ReadableSerial, ReadableAsyncKit); -inherits(ReadableSerialOrdered, ReadableAsyncKit); diff --git a/node_modules/aws-sign2/LICENSE b/node_modules/aws-sign2/LICENSE deleted file mode 100644 index a4a9aee0..00000000 --- a/node_modules/aws-sign2/LICENSE +++ /dev/null @@ -1,55 +0,0 @@ -Apache License - -Version 2.0, January 2004 - -http://www.apache.org/licenses/ - -TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - -1. Definitions. - -"License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. - -"Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. - -"Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. - -"You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. - -"Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. - -"Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. - -"Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). - -"Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. - -"Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." - -"Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. - -2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. - -3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. - -4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: - -You must give any other recipients of the Work or Derivative Works a copy of this License; and - -You must cause any modified files to carry prominent notices stating that You changed the files; and - -You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and - -If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. - -5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. - -6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. - -7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. - -8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. - -9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. - -END OF TERMS AND CONDITIONS \ No newline at end of file diff --git a/node_modules/aws-sign2/README.md b/node_modules/aws-sign2/README.md deleted file mode 100644 index 763564e0..00000000 --- a/node_modules/aws-sign2/README.md +++ /dev/null @@ -1,4 +0,0 @@ -aws-sign -======== - -AWS signing. Originally pulled from LearnBoost/knox, maintained as vendor in request, now a standalone module. diff --git a/node_modules/aws-sign2/index.js b/node_modules/aws-sign2/index.js deleted file mode 100644 index ac720930..00000000 --- a/node_modules/aws-sign2/index.js +++ /dev/null @@ -1,212 +0,0 @@ - -/*! - * Copyright 2010 LearnBoost - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/** - * Module dependencies. - */ - -var crypto = require('crypto') - , parse = require('url').parse - ; - -/** - * Valid keys. - */ - -var keys = - [ 'acl' - , 'location' - , 'logging' - , 'notification' - , 'partNumber' - , 'policy' - , 'requestPayment' - , 'torrent' - , 'uploadId' - , 'uploads' - , 'versionId' - , 'versioning' - , 'versions' - , 'website' - ] - -/** - * Return an "Authorization" header value with the given `options` - * in the form of "AWS :" - * - * @param {Object} options - * @return {String} - * @api private - */ - -function authorization (options) { - return 'AWS ' + options.key + ':' + sign(options) -} - -module.exports = authorization -module.exports.authorization = authorization - -/** - * Simple HMAC-SHA1 Wrapper - * - * @param {Object} options - * @return {String} - * @api private - */ - -function hmacSha1 (options) { - return crypto.createHmac('sha1', options.secret).update(options.message).digest('base64') -} - -module.exports.hmacSha1 = hmacSha1 - -/** - * Create a base64 sha1 HMAC for `options`. - * - * @param {Object} options - * @return {String} - * @api private - */ - -function sign (options) { - options.message = stringToSign(options) - return hmacSha1(options) -} -module.exports.sign = sign - -/** - * Create a base64 sha1 HMAC for `options`. - * - * Specifically to be used with S3 presigned URLs - * - * @param {Object} options - * @return {String} - * @api private - */ - -function signQuery (options) { - options.message = queryStringToSign(options) - return hmacSha1(options) -} -module.exports.signQuery= signQuery - -/** - * Return a string for sign() with the given `options`. - * - * Spec: - * - * \n - * \n - * \n - * \n - * [headers\n] - * - * - * @param {Object} options - * @return {String} - * @api private - */ - -function stringToSign (options) { - var headers = options.amazonHeaders || '' - if (headers) headers += '\n' - var r = - [ options.verb - , options.md5 - , options.contentType - , options.date ? options.date.toUTCString() : '' - , headers + options.resource - ] - return r.join('\n') -} -module.exports.queryStringToSign = stringToSign - -/** - * Return a string for sign() with the given `options`, but is meant exclusively - * for S3 presigned URLs - * - * Spec: - * - * \n - * - * - * @param {Object} options - * @return {String} - * @api private - */ - -function queryStringToSign (options){ - return 'GET\n\n\n' + options.date + '\n' + options.resource -} -module.exports.queryStringToSign = queryStringToSign - -/** - * Perform the following: - * - * - ignore non-amazon headers - * - lowercase fields - * - sort lexicographically - * - trim whitespace between ":" - * - join with newline - * - * @param {Object} headers - * @return {String} - * @api private - */ - -function canonicalizeHeaders (headers) { - var buf = [] - , fields = Object.keys(headers) - ; - for (var i = 0, len = fields.length; i < len; ++i) { - var field = fields[i] - , val = headers[field] - , field = field.toLowerCase() - ; - if (0 !== field.indexOf('x-amz')) continue - buf.push(field + ':' + val) - } - return buf.sort().join('\n') -} -module.exports.canonicalizeHeaders = canonicalizeHeaders - -/** - * Perform the following: - * - * - ignore non sub-resources - * - sort lexicographically - * - * @param {String} resource - * @return {String} - * @api private - */ - -function canonicalizeResource (resource) { - var url = parse(resource, true) - , path = url.pathname - , buf = [] - ; - - Object.keys(url.query).forEach(function(key){ - if (!~keys.indexOf(key)) return - var val = '' == url.query[key] ? '' : '=' + encodeURIComponent(url.query[key]) - buf.push(key + val) - }) - - return path + (buf.length ? '?' + buf.sort().join('&') : '') -} -module.exports.canonicalizeResource = canonicalizeResource diff --git a/node_modules/aws-sign2/package.json b/node_modules/aws-sign2/package.json deleted file mode 100644 index 1795ec15..00000000 --- a/node_modules/aws-sign2/package.json +++ /dev/null @@ -1,82 +0,0 @@ -{ - "_args": [ - [ - { - "raw": "aws-sign2@~0.6.0", - "scope": null, - "escapedName": "aws-sign2", - "name": "aws-sign2", - "rawSpec": "~0.6.0", - "spec": ">=0.6.0 <0.7.0", - "type": "range" - }, - "/Users/benjaminarias/Desktop/poly/node_modules/request" - ] - ], - "_from": "aws-sign2@>=0.6.0 <0.7.0", - "_id": "aws-sign2@0.6.0", - "_inCache": true, - "_installable": true, - "_location": "/aws-sign2", - "_nodeVersion": "4.1.2", - "_npmUser": { - "name": "mikeal", - "email": "mikeal.rogers@gmail.com" - }, - "_npmVersion": "2.14.4", - "_phantomChildren": {}, - "_requested": { - "raw": "aws-sign2@~0.6.0", - "scope": null, - "escapedName": "aws-sign2", - "name": "aws-sign2", - "rawSpec": "~0.6.0", - "spec": ">=0.6.0 <0.7.0", - "type": "range" - }, - "_requiredBy": [ - "/request" - ], - "_resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.6.0.tgz", - "_shasum": "14342dd38dbcc94d0e5b87d763cd63612c0e794f", - "_shrinkwrap": null, - "_spec": "aws-sign2@~0.6.0", - "_where": "/Users/benjaminarias/Desktop/poly/node_modules/request", - "author": { - "name": "Mikeal Rogers", - "email": "mikeal.rogers@gmail.com", - "url": "http://www.futurealoof.com" - }, - "bugs": { - "url": "https://github.com/mikeal/aws-sign/issues" - }, - "dependencies": {}, - "description": "AWS signing. Originally pulled from LearnBoost/knox, maintained as vendor in request, now a standalone module.", - "devDependencies": {}, - "directories": {}, - "dist": { - "shasum": "14342dd38dbcc94d0e5b87d763cd63612c0e794f", - "tarball": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.6.0.tgz" - }, - "engines": { - "node": "*" - }, - "gitHead": "8554bdb41268fa295eb1ee300f4adaa9f7f07fec", - "homepage": "https://github.com/mikeal/aws-sign#readme", - "license": "Apache-2.0", - "main": "index.js", - "maintainers": [ - { - "name": "mikeal", - "email": "mikeal.rogers@gmail.com" - } - ], - "name": "aws-sign2", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "url": "git+https://github.com/mikeal/aws-sign.git" - }, - "scripts": {}, - "version": "0.6.0" -} diff --git a/node_modules/aws4/.npmignore b/node_modules/aws4/.npmignore deleted file mode 100644 index 6c6ade6f..00000000 --- a/node_modules/aws4/.npmignore +++ /dev/null @@ -1,4 +0,0 @@ -test -examples -example.js -browser diff --git a/node_modules/aws4/.tern-port b/node_modules/aws4/.tern-port deleted file mode 100644 index 7fd1b522..00000000 --- a/node_modules/aws4/.tern-port +++ /dev/null @@ -1 +0,0 @@ -62638 \ No newline at end of file diff --git a/node_modules/aws4/.travis.yml b/node_modules/aws4/.travis.yml deleted file mode 100644 index 61d06340..00000000 --- a/node_modules/aws4/.travis.yml +++ /dev/null @@ -1,5 +0,0 @@ -language: node_js -node_js: - - "0.10" - - "0.12" - - "4.2" diff --git a/node_modules/aws4/LICENSE b/node_modules/aws4/LICENSE deleted file mode 100644 index 4f321e59..00000000 --- a/node_modules/aws4/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright 2013 Michael Hart (michael.hart.au@gmail.com) - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies -of the Software, and to permit persons to whom the Software is furnished to do -so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/node_modules/aws4/README.md b/node_modules/aws4/README.md deleted file mode 100644 index 6b002d02..00000000 --- a/node_modules/aws4/README.md +++ /dev/null @@ -1,523 +0,0 @@ -aws4 ----- - -[![Build Status](https://secure.travis-ci.org/mhart/aws4.png?branch=master)](http://travis-ci.org/mhart/aws4) - -A small utility to sign vanilla node.js http(s) request options using Amazon's -[AWS Signature Version 4](http://docs.amazonwebservices.com/general/latest/gr/signature-version-4.html). - -Can also be used [in the browser](./browser). - -This signature is supported by nearly all Amazon services, including -[S3](http://docs.aws.amazon.com/AmazonS3/latest/API/), -[EC2](http://docs.aws.amazon.com/AWSEC2/latest/APIReference/), -[DynamoDB](http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/API.html), -[Kinesis](http://docs.aws.amazon.com/kinesis/latest/APIReference/), -[Lambda](http://docs.aws.amazon.com/lambda/latest/dg/API_Reference.html), -[SQS](http://docs.aws.amazon.com/AWSSimpleQueueService/latest/APIReference/), -[SNS](http://docs.aws.amazon.com/sns/latest/api/), -[IAM](http://docs.aws.amazon.com/IAM/latest/APIReference/), -[STS](http://docs.aws.amazon.com/STS/latest/APIReference/), -[RDS](http://docs.aws.amazon.com/AmazonRDS/latest/APIReference/), -[CloudWatch](http://docs.aws.amazon.com/AmazonCloudWatch/latest/APIReference/), -[CloudWatch Logs](http://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/), -[CodeDeploy](http://docs.aws.amazon.com/codedeploy/latest/APIReference/), -[CloudFront](http://docs.aws.amazon.com/AmazonCloudFront/latest/APIReference/), -[CloudTrail](http://docs.aws.amazon.com/awscloudtrail/latest/APIReference/), -[ElastiCache](http://docs.aws.amazon.com/AmazonElastiCache/latest/APIReference/), -[EMR](http://docs.aws.amazon.com/ElasticMapReduce/latest/API/), -[Glacier](http://docs.aws.amazon.com/amazonglacier/latest/dev/amazon-glacier-api.html), -[CloudSearch](http://docs.aws.amazon.com/cloudsearch/latest/developerguide/APIReq.html), -[Elastic Load Balancing](http://docs.aws.amazon.com/ElasticLoadBalancing/latest/APIReference/), -[Elastic Transcoder](http://docs.aws.amazon.com/elastictranscoder/latest/developerguide/api-reference.html), -[CloudFormation](http://docs.aws.amazon.com/AWSCloudFormation/latest/APIReference/), -[Elastic Beanstalk](http://docs.aws.amazon.com/elasticbeanstalk/latest/api/), -[Storage Gateway](http://docs.aws.amazon.com/storagegateway/latest/userguide/AWSStorageGatewayAPI.html), -[Data Pipeline](http://docs.aws.amazon.com/datapipeline/latest/APIReference/), -[Direct Connect](http://docs.aws.amazon.com/directconnect/latest/APIReference/), -[Redshift](http://docs.aws.amazon.com/redshift/latest/APIReference/), -[OpsWorks](http://docs.aws.amazon.com/opsworks/latest/APIReference/), -[SES](http://docs.aws.amazon.com/ses/latest/APIReference/), -[SWF](http://docs.aws.amazon.com/amazonswf/latest/apireference/), -[AutoScaling](http://docs.aws.amazon.com/AutoScaling/latest/APIReference/), -[Mobile Analytics](http://docs.aws.amazon.com/mobileanalytics/latest/ug/server-reference.html), -[Cognito Identity](http://docs.aws.amazon.com/cognitoidentity/latest/APIReference/), -[Cognito Sync](http://docs.aws.amazon.com/cognitosync/latest/APIReference/), -[Container Service](http://docs.aws.amazon.com/AmazonECS/latest/APIReference/), -[AppStream](http://docs.aws.amazon.com/appstream/latest/developerguide/appstream-api-rest.html), -[Key Management Service](http://docs.aws.amazon.com/kms/latest/APIReference/), -[Config](http://docs.aws.amazon.com/config/latest/APIReference/), -[CloudHSM](http://docs.aws.amazon.com/cloudhsm/latest/dg/api-ref.html), -[Route53](http://docs.aws.amazon.com/Route53/latest/APIReference/requests-rest.html) and -[Route53 Domains](http://docs.aws.amazon.com/Route53/latest/APIReference/requests-rpc.html). - -Indeed, the only AWS services that *don't* support v4 as of 2014-12-30 are -[Import/Export](http://docs.aws.amazon.com/AWSImportExport/latest/DG/api-reference.html) and -[SimpleDB](http://docs.aws.amazon.com/AmazonSimpleDB/latest/DeveloperGuide/SDB_API.html) -(they only support [AWS Signature Version 2](https://github.com/mhart/aws2)). - -It also provides defaults for a number of core AWS headers and -request parameters, making it very easy to query AWS services, or -build out a fully-featured AWS library. - -Example -------- - -```javascript -var http = require('http'), - https = require('https'), - aws4 = require('aws4') - -// given an options object you could pass to http.request -var opts = {host: 'sqs.us-east-1.amazonaws.com', path: '/?Action=ListQueues'} - -// alternatively (as aws4 can infer the host): -opts = {service: 'sqs', region: 'us-east-1', path: '/?Action=ListQueues'} - -// alternatively (as us-east-1 is default): -opts = {service: 'sqs', path: '/?Action=ListQueues'} - -aws4.sign(opts) // assumes AWS credentials are available in process.env - -console.log(opts) -/* -{ - host: 'sqs.us-east-1.amazonaws.com', - path: '/?Action=ListQueues', - headers: { - Host: 'sqs.us-east-1.amazonaws.com', - 'X-Amz-Date': '20121226T061030Z', - Authorization: 'AWS4-HMAC-SHA256 Credential=ABCDEF/20121226/us-east-1/sqs/aws4_request, ...' - } -} -*/ - -// we can now use this to query AWS using the standard node.js http API -http.request(opts, function(res) { res.pipe(process.stdout) }).end() -/* - - -... -*/ -``` - -More options ------------- - -```javascript -// you can also pass AWS credentials in explicitly (otherwise taken from process.env) -aws4.sign(opts, {accessKeyId: '', secretAccessKey: ''}) - -// can also add the signature to query strings -aws4.sign({service: 's3', path: '/my-bucket?X-Amz-Expires=12345', signQuery: true}) - -// create a utility function to pipe to stdout (with https this time) -function request(o) { https.request(o, function(res) { res.pipe(process.stdout) }).end(o.body || '') } - -// aws4 can infer the HTTP method if a body is passed in -// method will be POST and Content-Type: 'application/x-www-form-urlencoded; charset=utf-8' -request(aws4.sign({service: 'iam', body: 'Action=ListGroups&Version=2010-05-08'})) -/* - -... -*/ - -// can specify any custom option or header as per usual -request(aws4.sign({ - service: 'dynamodb', - region: 'ap-southeast-2', - method: 'POST', - path: '/', - headers: { - 'Content-Type': 'application/x-amz-json-1.0', - 'X-Amz-Target': 'DynamoDB_20120810.ListTables' - }, - body: '{}' -})) -/* -{"TableNames":[]} -... -*/ - -// works with all other services that support Signature Version 4 - -request(aws4.sign({service: 's3', path: '/', signQuery: true})) -/* - -... -*/ - -request(aws4.sign({service: 'ec2', path: '/?Action=DescribeRegions&Version=2014-06-15'})) -/* - -... -*/ - -request(aws4.sign({service: 'sns', path: '/?Action=ListTopics&Version=2010-03-31'})) -/* - -... -*/ - -request(aws4.sign({service: 'sts', path: '/?Action=GetSessionToken&Version=2011-06-15'})) -/* - -... -*/ - -request(aws4.sign({service: 'cloudsearch', path: '/?Action=ListDomainNames&Version=2013-01-01'})) -/* - -... -*/ - -request(aws4.sign({service: 'ses', path: '/?Action=ListIdentities&Version=2010-12-01'})) -/* - -... -*/ - -request(aws4.sign({service: 'autoscaling', path: '/?Action=DescribeAutoScalingInstances&Version=2011-01-01'})) -/* - -... -*/ - -request(aws4.sign({service: 'elasticloadbalancing', path: '/?Action=DescribeLoadBalancers&Version=2012-06-01'})) -/* - -... -*/ - -request(aws4.sign({service: 'cloudformation', path: '/?Action=ListStacks&Version=2010-05-15'})) -/* - -... -*/ - -request(aws4.sign({service: 'elasticbeanstalk', path: '/?Action=ListAvailableSolutionStacks&Version=2010-12-01'})) -/* - -... -*/ - -request(aws4.sign({service: 'rds', path: '/?Action=DescribeDBInstances&Version=2012-09-17'})) -/* - -... -*/ - -request(aws4.sign({service: 'monitoring', path: '/?Action=ListMetrics&Version=2010-08-01'})) -/* - -... -*/ - -request(aws4.sign({service: 'redshift', path: '/?Action=DescribeClusters&Version=2012-12-01'})) -/* - -... -*/ - -request(aws4.sign({service: 'cloudfront', path: '/2014-05-31/distribution'})) -/* - -... -*/ - -request(aws4.sign({service: 'elasticache', path: '/?Action=DescribeCacheClusters&Version=2014-07-15'})) -/* - -... -*/ - -request(aws4.sign({service: 'elasticmapreduce', path: '/?Action=DescribeJobFlows&Version=2009-03-31'})) -/* - -... -*/ - -request(aws4.sign({service: 'route53', path: '/2013-04-01/hostedzone'})) -/* - -... -*/ - -request(aws4.sign({service: 'appstream', path: '/applications'})) -/* -{"_links":{"curie":[{"href":"http://docs.aws.amazon.com/appstream/latest/... -... -*/ - -request(aws4.sign({service: 'cognito-sync', path: '/identitypools'})) -/* -{"Count":0,"IdentityPoolUsages":[],"MaxResults":16,"NextToken":null} -... -*/ - -request(aws4.sign({service: 'elastictranscoder', path: '/2012-09-25/pipelines'})) -/* -{"NextPageToken":null,"Pipelines":[]} -... -*/ - -request(aws4.sign({service: 'lambda', path: '/2014-11-13/functions/'})) -/* -{"Functions":[],"NextMarker":null} -... -*/ - -request(aws4.sign({service: 'ecs', path: '/?Action=ListClusters&Version=2014-11-13'})) -/* - -... -*/ - -request(aws4.sign({service: 'glacier', path: '/-/vaults', headers: {'X-Amz-Glacier-Version': '2012-06-01'}})) -/* -{"Marker":null,"VaultList":[]} -... -*/ - -request(aws4.sign({service: 'storagegateway', body: '{}', headers: { - 'Content-Type': 'application/x-amz-json-1.1', - 'X-Amz-Target': 'StorageGateway_20120630.ListGateways' -}})) -/* -{"Gateways":[]} -... -*/ - -request(aws4.sign({service: 'datapipeline', body: '{}', headers: { - 'Content-Type': 'application/x-amz-json-1.1', - 'X-Amz-Target': 'DataPipeline.ListPipelines' -}})) -/* -{"hasMoreResults":false,"pipelineIdList":[]} -... -*/ - -request(aws4.sign({service: 'opsworks', body: '{}', headers: { - 'Content-Type': 'application/x-amz-json-1.1', - 'X-Amz-Target': 'OpsWorks_20130218.DescribeStacks' -}})) -/* -{"Stacks":[]} -... -*/ - -request(aws4.sign({service: 'route53domains', body: '{}', headers: { - 'Content-Type': 'application/x-amz-json-1.1', - 'X-Amz-Target': 'Route53Domains_v20140515.ListDomains' -}})) -/* -{"Domains":[]} -... -*/ - -request(aws4.sign({service: 'kinesis', body: '{}', headers: { - 'Content-Type': 'application/x-amz-json-1.1', - 'X-Amz-Target': 'Kinesis_20131202.ListStreams' -}})) -/* -{"HasMoreStreams":false,"StreamNames":[]} -... -*/ - -request(aws4.sign({service: 'cloudtrail', body: '{}', headers: { - 'Content-Type': 'application/x-amz-json-1.1', - 'X-Amz-Target': 'CloudTrail_20131101.DescribeTrails' -}})) -/* -{"trailList":[]} -... -*/ - -request(aws4.sign({service: 'logs', body: '{}', headers: { - 'Content-Type': 'application/x-amz-json-1.1', - 'X-Amz-Target': 'Logs_20140328.DescribeLogGroups' -}})) -/* -{"logGroups":[]} -... -*/ - -request(aws4.sign({service: 'codedeploy', body: '{}', headers: { - 'Content-Type': 'application/x-amz-json-1.1', - 'X-Amz-Target': 'CodeDeploy_20141006.ListApplications' -}})) -/* -{"applications":[]} -... -*/ - -request(aws4.sign({service: 'directconnect', body: '{}', headers: { - 'Content-Type': 'application/x-amz-json-1.1', - 'X-Amz-Target': 'OvertureService.DescribeConnections' -}})) -/* -{"connections":[]} -... -*/ - -request(aws4.sign({service: 'kms', body: '{}', headers: { - 'Content-Type': 'application/x-amz-json-1.1', - 'X-Amz-Target': 'TrentService.ListKeys' -}})) -/* -{"Keys":[],"Truncated":false} -... -*/ - -request(aws4.sign({service: 'config', body: '{}', headers: { - 'Content-Type': 'application/x-amz-json-1.1', - 'X-Amz-Target': 'StarlingDoveService.DescribeDeliveryChannels' -}})) -/* -{"DeliveryChannels":[]} -... -*/ - -request(aws4.sign({service: 'cloudhsm', body: '{}', headers: { - 'Content-Type': 'application/x-amz-json-1.1', - 'X-Amz-Target': 'CloudHsmFrontendService.ListAvailableZones' -}})) -/* -{"AZList":["us-east-1a","us-east-1b","us-east-1c"]} -... -*/ - -request(aws4.sign({ - service: 'swf', - body: '{"registrationStatus":"REGISTERED"}', - headers: { - 'Content-Type': 'application/x-amz-json-1.0', - 'X-Amz-Target': 'SimpleWorkflowService.ListDomains' - } -})) -/* -{"domainInfos":[]} -... -*/ - -request(aws4.sign({ - service: 'cognito-identity', - body: '{"MaxResults": 1}', - headers: { - 'Content-Type': 'application/x-amz-json-1.1', - 'X-Amz-Target': 'AWSCognitoIdentityService.ListIdentityPools' - } -})) -/* -{"IdentityPools":[]} -... -*/ - -request(aws4.sign({ - service: 'mobileanalytics', - path: '/2014-06-05/events', - body: JSON.stringify({events:[{ - eventType: 'a', - timestamp: new Date().toISOString(), - session: {}, - }]}), - headers: { - 'Content-Type': 'application/json', - 'X-Amz-Client-Context': JSON.stringify({ - client: {client_id: 'a', app_title: 'a'}, - custom: {}, - env: {platform: 'a'}, - services: {}, - }), - } -})) -/* -(HTTP 202, empty response) -*/ - -// Generate CodeCommit Git access password -var signer = new aws4.RequestSigner({ - service: 'codecommit', - host: 'git-codecommit.us-east-1.amazonaws.com', - method: 'GIT', - path: '/v1/repos/MyAwesomeRepo', -}) -var password = signer.getDateTime() + 'Z' + signer.signature() -``` - -API ---- - -### aws4.sign(requestOptions, [credentials]) - -This calculates and populates the `Authorization` header of -`requestOptions`, and any other necessary AWS headers and/or request -options. Returns `requestOptions` as a convenience for chaining. - -`requestOptions` is an object holding the same options that the node.js -[http.request](http://nodejs.org/docs/latest/api/http.html#http_http_request_options_callback) -function takes. - -The following properties of `requestOptions` are used in the signing or -populated if they don't already exist: - -- `hostname` or `host` (will be determined from `service` and `region` if not given) -- `method` (will use `'GET'` if not given or `'POST'` if there is a `body`) -- `path` (will use `'/'` if not given) -- `body` (will use `''` if not given) -- `service` (will be calculated from `hostname` or `host` if not given) -- `region` (will be calculated from `hostname` or `host` or use `'us-east-1'` if not given) -- `headers['Host']` (will use `hostname` or `host` or be calculated if not given) -- `headers['Content-Type']` (will use `'application/x-www-form-urlencoded; charset=utf-8'` - if not given and there is a `body`) -- `headers['Date']` (used to calculate the signature date if given, otherwise `new Date` is used) - -Your AWS credentials (which can be found in your -[AWS console](https://portal.aws.amazon.com/gp/aws/securityCredentials)) -can be specified in one of two ways: - -- As the second argument, like this: - -```javascript -aws4.sign(requestOptions, { - secretAccessKey: "", - accessKeyId: "", - sessionToken: "" -}) -``` - -- From `process.env`, such as this: - -``` -export AWS_SECRET_ACCESS_KEY="" -export AWS_ACCESS_KEY_ID="" -export AWS_SESSION_TOKEN="" -``` - -(will also use `AWS_ACCESS_KEY` and `AWS_SECRET_KEY` if available) - -The `sessionToken` property and `AWS_SESSION_TOKEN` environment variable are optional for signing -with [IAM STS temporary credentials](http://docs.aws.amazon.com/STS/latest/UsingSTS/using-temp-creds.html). - -Installation ------------- - -With [npm](http://npmjs.org/) do: - -``` -npm install aws4 -``` - -Can also be used [in the browser](./browser). - -Thanks ------- - -Thanks to [@jed](https://github.com/jed) for his -[dynamo-client](https://github.com/jed/dynamo-client) lib where I first -committed and subsequently extracted this code. - -Also thanks to the -[official node.js AWS SDK](https://github.com/aws/aws-sdk-js) for giving -me a start on implementing the v4 signature. - diff --git a/node_modules/aws4/aws4.js b/node_modules/aws4/aws4.js deleted file mode 100644 index a5431806..00000000 --- a/node_modules/aws4/aws4.js +++ /dev/null @@ -1,323 +0,0 @@ -var aws4 = exports, - url = require('url'), - querystring = require('querystring'), - crypto = require('crypto'), - lru = require('./lru'), - credentialsCache = lru(1000) - -// http://docs.amazonwebservices.com/general/latest/gr/signature-version-4.html - -function hmac(key, string, encoding) { - return crypto.createHmac('sha256', key).update(string, 'utf8').digest(encoding) -} - -function hash(string, encoding) { - return crypto.createHash('sha256').update(string, 'utf8').digest(encoding) -} - -// This function assumes the string has already been percent encoded -function encodeRfc3986(urlEncodedString) { - return urlEncodedString.replace(/[!'()*]/g, function(c) { - return '%' + c.charCodeAt(0).toString(16).toUpperCase() - }) -} - -// request: { path | body, [host], [method], [headers], [service], [region] } -// credentials: { accessKeyId, secretAccessKey, [sessionToken] } -function RequestSigner(request, credentials) { - - if (typeof request === 'string') request = url.parse(request) - - var headers = request.headers = (request.headers || {}), - hostParts = this.matchHost(request.hostname || request.host || headers.Host || headers.host) - - this.request = request - this.credentials = credentials || this.defaultCredentials() - - this.service = request.service || hostParts[0] || '' - this.region = request.region || hostParts[1] || 'us-east-1' - - // SES uses a different domain from the service name - if (this.service === 'email') this.service = 'ses' - - if (!request.method && request.body) - request.method = 'POST' - - if (!headers.Host && !headers.host) { - headers.Host = request.hostname || request.host || this.createHost() - - // If a port is specified explicitly, use it as is - if (request.port) - headers.Host += ':' + request.port - } - if (!request.hostname && !request.host) - request.hostname = headers.Host || headers.host - - this.isCodeCommitGit = this.service === 'codecommit' && request.method === 'GIT' -} - -RequestSigner.prototype.matchHost = function(host) { - var match = (host || '').match(/([^\.]+)\.(?:([^\.]*)\.)?amazonaws\.com$/) - var hostParts = (match || []).slice(1, 3) - - // ES's hostParts are sometimes the other way round, if the value that is expected - // to be region equals ‘es’ switch them back - // e.g. search-cluster-name-aaaa00aaaa0aaa0aaaaaaa0aaa.us-east-1.es.amazonaws.com - if (hostParts[1] === 'es') - hostParts = hostParts.reverse() - - return hostParts -} - -// http://docs.aws.amazon.com/general/latest/gr/rande.html -RequestSigner.prototype.isSingleRegion = function() { - // Special case for S3 and SimpleDB in us-east-1 - if (['s3', 'sdb'].indexOf(this.service) >= 0 && this.region === 'us-east-1') return true - - return ['cloudfront', 'ls', 'route53', 'iam', 'importexport', 'sts'] - .indexOf(this.service) >= 0 -} - -RequestSigner.prototype.createHost = function() { - var region = this.isSingleRegion() ? '' : - (this.service === 's3' && this.region !== 'us-east-1' ? '-' : '.') + this.region, - service = this.service === 'ses' ? 'email' : this.service - return service + region + '.amazonaws.com' -} - -RequestSigner.prototype.prepareRequest = function() { - this.parsePath() - - var request = this.request, headers = request.headers, query - - if (request.signQuery) { - - this.parsedPath.query = query = this.parsedPath.query || {} - - if (this.credentials.sessionToken) - query['X-Amz-Security-Token'] = this.credentials.sessionToken - - if (this.service === 's3' && !query['X-Amz-Expires']) - query['X-Amz-Expires'] = 86400 - - if (query['X-Amz-Date']) - this.datetime = query['X-Amz-Date'] - else - query['X-Amz-Date'] = this.getDateTime() - - query['X-Amz-Algorithm'] = 'AWS4-HMAC-SHA256' - query['X-Amz-Credential'] = this.credentials.accessKeyId + '/' + this.credentialString() - query['X-Amz-SignedHeaders'] = this.signedHeaders() - - } else { - - if (!request.doNotModifyHeaders && !this.isCodeCommitGit) { - if (request.body && !headers['Content-Type'] && !headers['content-type']) - headers['Content-Type'] = 'application/x-www-form-urlencoded; charset=utf-8' - - if (request.body && !headers['Content-Length'] && !headers['content-length']) - headers['Content-Length'] = Buffer.byteLength(request.body) - - if (this.credentials.sessionToken) - headers['X-Amz-Security-Token'] = this.credentials.sessionToken - - if (this.service === 's3') - headers['X-Amz-Content-Sha256'] = hash(this.request.body || '', 'hex') - - if (headers['X-Amz-Date']) - this.datetime = headers['X-Amz-Date'] - else - headers['X-Amz-Date'] = this.getDateTime() - } - - delete headers.Authorization - delete headers.authorization - } -} - -RequestSigner.prototype.sign = function() { - if (!this.parsedPath) this.prepareRequest() - - if (this.request.signQuery) { - this.parsedPath.query['X-Amz-Signature'] = this.signature() - } else { - this.request.headers.Authorization = this.authHeader() - } - - this.request.path = this.formatPath() - - return this.request -} - -RequestSigner.prototype.getDateTime = function() { - if (!this.datetime) { - var headers = this.request.headers, - date = new Date(headers.Date || headers.date || new Date) - - this.datetime = date.toISOString().replace(/[:\-]|\.\d{3}/g, '') - - // Remove the trailing 'Z' on the timestamp string for CodeCommit git access - if (this.isCodeCommitGit) this.datetime = this.datetime.slice(0, -1) - } - return this.datetime -} - -RequestSigner.prototype.getDate = function() { - return this.getDateTime().substr(0, 8) -} - -RequestSigner.prototype.authHeader = function() { - return [ - 'AWS4-HMAC-SHA256 Credential=' + this.credentials.accessKeyId + '/' + this.credentialString(), - 'SignedHeaders=' + this.signedHeaders(), - 'Signature=' + this.signature(), - ].join(', ') -} - -RequestSigner.prototype.signature = function() { - var date = this.getDate(), - cacheKey = [this.credentials.secretAccessKey, date, this.region, this.service].join(), - kDate, kRegion, kService, kCredentials = credentialsCache.get(cacheKey) - if (!kCredentials) { - kDate = hmac('AWS4' + this.credentials.secretAccessKey, date) - kRegion = hmac(kDate, this.region) - kService = hmac(kRegion, this.service) - kCredentials = hmac(kService, 'aws4_request') - credentialsCache.set(cacheKey, kCredentials) - } - return hmac(kCredentials, this.stringToSign(), 'hex') -} - -RequestSigner.prototype.stringToSign = function() { - return [ - 'AWS4-HMAC-SHA256', - this.getDateTime(), - this.credentialString(), - hash(this.canonicalString(), 'hex'), - ].join('\n') -} - -RequestSigner.prototype.canonicalString = function() { - if (!this.parsedPath) this.prepareRequest() - - var pathStr = this.parsedPath.path, - query = this.parsedPath.query, - queryStr = '', - normalizePath = this.service !== 's3', - decodePath = this.service === 's3' || this.request.doNotEncodePath, - decodeSlashesInPath = this.service === 's3', - firstValOnly = this.service === 's3', - bodyHash = this.service === 's3' && this.request.signQuery ? 'UNSIGNED-PAYLOAD' : - (this.isCodeCommitGit ? '' : hash(this.request.body || '', 'hex')) - - if (query) { - queryStr = encodeRfc3986(querystring.stringify(Object.keys(query).sort().reduce(function(obj, key) { - if (!key) return obj - obj[key] = !Array.isArray(query[key]) ? query[key] : - (firstValOnly ? query[key][0] : query[key].slice().sort()) - return obj - }, {}))) - } - if (pathStr !== '/') { - if (normalizePath) pathStr = pathStr.replace(/\/{2,}/g, '/') - pathStr = pathStr.split('/').reduce(function(path, piece) { - if (normalizePath && piece === '..') { - path.pop() - } else if (!normalizePath || piece !== '.') { - if (decodePath) piece = querystring.unescape(piece) - path.push(encodeRfc3986(querystring.escape(piece))) - } - return path - }, []).join('/') - if (pathStr[0] !== '/') pathStr = '/' + pathStr - if (decodeSlashesInPath) pathStr = pathStr.replace(/%2F/g, '/') - } - - return [ - this.request.method || 'GET', - pathStr, - queryStr, - this.canonicalHeaders() + '\n', - this.signedHeaders(), - bodyHash, - ].join('\n') -} - -RequestSigner.prototype.canonicalHeaders = function() { - var headers = this.request.headers - function trimAll(header) { - return header.toString().trim().replace(/\s+/g, ' ') - } - return Object.keys(headers) - .sort(function(a, b) { return a.toLowerCase() < b.toLowerCase() ? -1 : 1 }) - .map(function(key) { return key.toLowerCase() + ':' + trimAll(headers[key]) }) - .join('\n') -} - -RequestSigner.prototype.signedHeaders = function() { - return Object.keys(this.request.headers) - .map(function(key) { return key.toLowerCase() }) - .sort() - .join(';') -} - -RequestSigner.prototype.credentialString = function() { - return [ - this.getDate(), - this.region, - this.service, - 'aws4_request', - ].join('/') -} - -RequestSigner.prototype.defaultCredentials = function() { - var env = process.env - return { - accessKeyId: env.AWS_ACCESS_KEY_ID || env.AWS_ACCESS_KEY, - secretAccessKey: env.AWS_SECRET_ACCESS_KEY || env.AWS_SECRET_KEY, - sessionToken: env.AWS_SESSION_TOKEN, - } -} - -RequestSigner.prototype.parsePath = function() { - var path = this.request.path || '/', - queryIx = path.indexOf('?'), - query = null - - if (queryIx >= 0) { - query = querystring.parse(path.slice(queryIx + 1)) - path = path.slice(0, queryIx) - } - - // S3 doesn't always encode characters > 127 correctly and - // all services don't encode characters > 255 correctly - // So if there are non-reserved chars (and it's not already all % encoded), just encode them all - if (/[^0-9A-Za-z!'()*\-._~%/]/.test(path)) { - path = path.split('/').map(function(piece) { - return querystring.escape(querystring.unescape(piece)) - }).join('/') - } - - this.parsedPath = { - path: path, - query: query, - } -} - -RequestSigner.prototype.formatPath = function() { - var path = this.parsedPath.path, - query = this.parsedPath.query - - if (!query) return path - - // Services don't support empty query string keys - if (query[''] != null) delete query[''] - - return path + '?' + encodeRfc3986(querystring.stringify(query)) -} - -aws4.RequestSigner = RequestSigner - -aws4.sign = function(request, credentials) { - return new RequestSigner(request, credentials).sign() -} diff --git a/node_modules/aws4/lru.js b/node_modules/aws4/lru.js deleted file mode 100644 index 333f66a4..00000000 --- a/node_modules/aws4/lru.js +++ /dev/null @@ -1,96 +0,0 @@ -module.exports = function(size) { - return new LruCache(size) -} - -function LruCache(size) { - this.capacity = size | 0 - this.map = Object.create(null) - this.list = new DoublyLinkedList() -} - -LruCache.prototype.get = function(key) { - var node = this.map[key] - if (node == null) return undefined - this.used(node) - return node.val -} - -LruCache.prototype.set = function(key, val) { - var node = this.map[key] - if (node != null) { - node.val = val - } else { - if (!this.capacity) this.prune() - if (!this.capacity) return false - node = new DoublyLinkedNode(key, val) - this.map[key] = node - this.capacity-- - } - this.used(node) - return true -} - -LruCache.prototype.used = function(node) { - this.list.moveToFront(node) -} - -LruCache.prototype.prune = function() { - var node = this.list.pop() - if (node != null) { - delete this.map[node.key] - this.capacity++ - } -} - - -function DoublyLinkedList() { - this.firstNode = null - this.lastNode = null -} - -DoublyLinkedList.prototype.moveToFront = function(node) { - if (this.firstNode == node) return - - this.remove(node) - - if (this.firstNode == null) { - this.firstNode = node - this.lastNode = node - node.prev = null - node.next = null - } else { - node.prev = null - node.next = this.firstNode - node.next.prev = node - this.firstNode = node - } -} - -DoublyLinkedList.prototype.pop = function() { - var lastNode = this.lastNode - if (lastNode != null) { - this.remove(lastNode) - } - return lastNode -} - -DoublyLinkedList.prototype.remove = function(node) { - if (this.firstNode == node) { - this.firstNode = node.next - } else if (node.prev != null) { - node.prev.next = node.next - } - if (this.lastNode == node) { - this.lastNode = node.prev - } else if (node.next != null) { - node.next.prev = node.prev - } -} - - -function DoublyLinkedNode(key, val) { - this.key = key - this.val = val - this.prev = null - this.next = null -} diff --git a/node_modules/aws4/package.json b/node_modules/aws4/package.json deleted file mode 100644 index b6b323c9..00000000 --- a/node_modules/aws4/package.json +++ /dev/null @@ -1,141 +0,0 @@ -{ - "_args": [ - [ - { - "raw": "aws4@^1.2.1", - "scope": null, - "escapedName": "aws4", - "name": "aws4", - "rawSpec": "^1.2.1", - "spec": ">=1.2.1 <2.0.0", - "type": "range" - }, - "/Users/benjaminarias/Desktop/poly/node_modules/request" - ] - ], - "_from": "aws4@>=1.2.1 <2.0.0", - "_id": "aws4@1.5.0", - "_inCache": true, - "_installable": true, - "_location": "/aws4", - "_nodeVersion": "4.5.0", - "_npmOperationalInternal": { - "host": "packages-16-east.internal.npmjs.com", - "tmp": "tmp/aws4-1.5.0.tgz_1476226259635_0.2796843808609992" - }, - "_npmUser": { - "name": "hichaelmart", - "email": "michael.hart.au@gmail.com" - }, - "_npmVersion": "2.15.11", - "_phantomChildren": {}, - "_requested": { - "raw": "aws4@^1.2.1", - "scope": null, - "escapedName": "aws4", - "name": "aws4", - "rawSpec": "^1.2.1", - "spec": ">=1.2.1 <2.0.0", - "type": "range" - }, - "_requiredBy": [ - "/request" - ], - "_resolved": "https://registry.npmjs.org/aws4/-/aws4-1.5.0.tgz", - "_shasum": "0a29ffb79c31c9e712eeb087e8e7a64b4a56d755", - "_shrinkwrap": null, - "_spec": "aws4@^1.2.1", - "_where": "/Users/benjaminarias/Desktop/poly/node_modules/request", - "author": { - "name": "Michael Hart", - "email": "michael.hart.au@gmail.com", - "url": "http://github.com/mhart" - }, - "bugs": { - "url": "https://github.com/mhart/aws4/issues" - }, - "dependencies": {}, - "description": "Signs and prepares requests using AWS Signature Version 4", - "devDependencies": { - "mocha": "^2.4.5", - "should": "^8.2.2" - }, - "directories": {}, - "dist": { - "shasum": "0a29ffb79c31c9e712eeb087e8e7a64b4a56d755", - "tarball": "https://registry.npmjs.org/aws4/-/aws4-1.5.0.tgz" - }, - "gitHead": "ba136334ee08884c6042c8578a22e376233eef34", - "homepage": "https://github.com/mhart/aws4#readme", - "keywords": [ - "amazon", - "aws", - "signature", - "s3", - "ec2", - "autoscaling", - "cloudformation", - "elasticloadbalancing", - "elb", - "elasticbeanstalk", - "cloudsearch", - "dynamodb", - "kinesis", - "lambda", - "glacier", - "sqs", - "sns", - "iam", - "sts", - "ses", - "swf", - "storagegateway", - "datapipeline", - "directconnect", - "redshift", - "opsworks", - "rds", - "monitoring", - "cloudtrail", - "cloudfront", - "codedeploy", - "elasticache", - "elasticmapreduce", - "elastictranscoder", - "emr", - "cloudwatch", - "mobileanalytics", - "cognitoidentity", - "cognitosync", - "cognito", - "containerservice", - "ecs", - "appstream", - "keymanagementservice", - "kms", - "config", - "cloudhsm", - "route53", - "route53domains", - "logs" - ], - "license": "MIT", - "main": "aws4.js", - "maintainers": [ - { - "name": "hichaelmart", - "email": "michael.hart.au@gmail.com" - } - ], - "name": "aws4", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git+https://github.com/mhart/aws4.git" - }, - "scripts": { - "test": "mocha ./test/fast.js ./test/slow.js -b -t 100s -R list" - }, - "version": "1.5.0" -} diff --git a/node_modules/balanced-match/.npmignore b/node_modules/balanced-match/.npmignore deleted file mode 100644 index ae5d8c36..00000000 --- a/node_modules/balanced-match/.npmignore +++ /dev/null @@ -1,5 +0,0 @@ -test -.gitignore -.travis.yml -Makefile -example.js diff --git a/node_modules/balanced-match/LICENSE.md b/node_modules/balanced-match/LICENSE.md deleted file mode 100644 index 2cdc8e41..00000000 --- a/node_modules/balanced-match/LICENSE.md +++ /dev/null @@ -1,21 +0,0 @@ -(MIT) - -Copyright (c) 2013 Julian Gruber <julian@juliangruber.com> - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies -of the Software, and to permit persons to whom the Software is furnished to do -so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/node_modules/balanced-match/README.md b/node_modules/balanced-match/README.md deleted file mode 100644 index 08e918c0..00000000 --- a/node_modules/balanced-match/README.md +++ /dev/null @@ -1,91 +0,0 @@ -# balanced-match - -Match balanced string pairs, like `{` and `}` or `` and ``. Supports regular expressions as well! - -[![build status](https://secure.travis-ci.org/juliangruber/balanced-match.svg)](http://travis-ci.org/juliangruber/balanced-match) -[![downloads](https://img.shields.io/npm/dm/balanced-match.svg)](https://www.npmjs.org/package/balanced-match) - -[![testling badge](https://ci.testling.com/juliangruber/balanced-match.png)](https://ci.testling.com/juliangruber/balanced-match) - -## Example - -Get the first matching pair of braces: - -```js -var balanced = require('balanced-match'); - -console.log(balanced('{', '}', 'pre{in{nested}}post')); -console.log(balanced('{', '}', 'pre{first}between{second}post')); -console.log(balanced(/\s+\{\s+/, /\s+\}\s+/, 'pre { in{nest} } post')); -``` - -The matches are: - -```bash -$ node example.js -{ start: 3, end: 14, pre: 'pre', body: 'in{nested}', post: 'post' } -{ start: 3, - end: 9, - pre: 'pre', - body: 'first', - post: 'between{second}post' } -{ start: 3, end: 17, pre: 'pre', body: 'in{nest}', post: 'post' } -``` - -## API - -### var m = balanced(a, b, str) - -For the first non-nested matching pair of `a` and `b` in `str`, return an -object with those keys: - -* **start** the index of the first match of `a` -* **end** the index of the matching `b` -* **pre** the preamble, `a` and `b` not included -* **body** the match, `a` and `b` not included -* **post** the postscript, `a` and `b` not included - -If there's no match, `undefined` will be returned. - -If the `str` contains more `a` than `b` / there are unmatched pairs, the first match that was closed will be used. For example, `{{a}` will match `['{', 'a', '']` and `{a}}` will match `['', 'a', '}']`. - -### var r = balanced.range(a, b, str) - -For the first non-nested matching pair of `a` and `b` in `str`, return an -array with indexes: `[ , ]`. - -If there's no match, `undefined` will be returned. - -If the `str` contains more `a` than `b` / there are unmatched pairs, the first match that was closed will be used. For example, `{{a}` will match `[ 1, 3 ]` and `{a}}` will match `[0, 2]`. - -## Installation - -With [npm](https://npmjs.org) do: - -```bash -npm install balanced-match -``` - -## License - -(MIT) - -Copyright (c) 2013 Julian Gruber <julian@juliangruber.com> - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies -of the Software, and to permit persons to whom the Software is furnished to do -so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/node_modules/balanced-match/index.js b/node_modules/balanced-match/index.js deleted file mode 100644 index e8d85870..00000000 --- a/node_modules/balanced-match/index.js +++ /dev/null @@ -1,58 +0,0 @@ -module.exports = balanced; -function balanced(a, b, str) { - if (a instanceof RegExp) a = maybeMatch(a, str); - if (b instanceof RegExp) b = maybeMatch(b, str); - - var r = range(a, b, str); - - return r && { - start: r[0], - end: r[1], - pre: str.slice(0, r[0]), - body: str.slice(r[0] + a.length, r[1]), - post: str.slice(r[1] + b.length) - }; -} - -function maybeMatch(reg, str) { - var m = str.match(reg); - return m ? m[0] : null; -} - -balanced.range = range; -function range(a, b, str) { - var begs, beg, left, right, result; - var ai = str.indexOf(a); - var bi = str.indexOf(b, ai + 1); - var i = ai; - - if (ai >= 0 && bi > 0) { - begs = []; - left = str.length; - - while (i >= 0 && !result) { - if (i == ai) { - begs.push(i); - ai = str.indexOf(a, i + 1); - } else if (begs.length == 1) { - result = [ begs.pop(), bi ]; - } else { - beg = begs.pop(); - if (beg < left) { - left = beg; - right = bi; - } - - bi = str.indexOf(b, i + 1); - } - - i = ai < bi && ai >= 0 ? ai : bi; - } - - if (begs.length) { - result = [ left, right ]; - } - } - - return result; -} diff --git a/node_modules/balanced-match/package.json b/node_modules/balanced-match/package.json deleted file mode 100644 index 683e5614..00000000 --- a/node_modules/balanced-match/package.json +++ /dev/null @@ -1,111 +0,0 @@ -{ - "_args": [ - [ - { - "raw": "balanced-match@^0.4.1", - "scope": null, - "escapedName": "balanced-match", - "name": "balanced-match", - "rawSpec": "^0.4.1", - "spec": ">=0.4.1 <0.5.0", - "type": "range" - }, - "/Users/benjaminarias/Desktop/poly/node_modules/brace-expansion" - ] - ], - "_from": "balanced-match@>=0.4.1 <0.5.0", - "_id": "balanced-match@0.4.2", - "_inCache": true, - "_installable": true, - "_location": "/balanced-match", - "_nodeVersion": "4.4.7", - "_npmOperationalInternal": { - "host": "packages-16-east.internal.npmjs.com", - "tmp": "tmp/balanced-match-0.4.2.tgz_1468834991581_0.6590619895141572" - }, - "_npmUser": { - "name": "juliangruber", - "email": "julian@juliangruber.com" - }, - "_npmVersion": "2.15.8", - "_phantomChildren": {}, - "_requested": { - "raw": "balanced-match@^0.4.1", - "scope": null, - "escapedName": "balanced-match", - "name": "balanced-match", - "rawSpec": "^0.4.1", - "spec": ">=0.4.1 <0.5.0", - "type": "range" - }, - "_requiredBy": [ - "/brace-expansion" - ], - "_resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-0.4.2.tgz", - "_shasum": "cb3f3e3c732dc0f01ee70b403f302e61d7709838", - "_shrinkwrap": null, - "_spec": "balanced-match@^0.4.1", - "_where": "/Users/benjaminarias/Desktop/poly/node_modules/brace-expansion", - "author": { - "name": "Julian Gruber", - "email": "mail@juliangruber.com", - "url": "http://juliangruber.com" - }, - "bugs": { - "url": "https://github.com/juliangruber/balanced-match/issues" - }, - "dependencies": {}, - "description": "Match balanced character pairs, like \"{\" and \"}\"", - "devDependencies": { - "tape": "^4.6.0" - }, - "directories": {}, - "dist": { - "shasum": "cb3f3e3c732dc0f01ee70b403f302e61d7709838", - "tarball": "https://registry.npmjs.org/balanced-match/-/balanced-match-0.4.2.tgz" - }, - "gitHead": "57c2ea29d89a2844ae3bdcc637c6e2cbb73725e2", - "homepage": "https://github.com/juliangruber/balanced-match", - "keywords": [ - "match", - "regexp", - "test", - "balanced", - "parse" - ], - "license": "MIT", - "main": "index.js", - "maintainers": [ - { - "name": "juliangruber", - "email": "julian@juliangruber.com" - } - ], - "name": "balanced-match", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git://github.com/juliangruber/balanced-match.git" - }, - "scripts": { - "test": "make test" - }, - "testling": { - "files": "test/*.js", - "browsers": [ - "ie/8..latest", - "firefox/20..latest", - "firefox/nightly", - "chrome/25..latest", - "chrome/canary", - "opera/12..latest", - "opera/next", - "safari/5.1..latest", - "ipad/6.0..latest", - "iphone/6.0..latest", - "android-browser/4.2..latest" - ] - }, - "version": "0.4.2" -} diff --git a/node_modules/base64-js/.travis.yml b/node_modules/base64-js/.travis.yml deleted file mode 100644 index 939cb517..00000000 --- a/node_modules/base64-js/.travis.yml +++ /dev/null @@ -1,5 +0,0 @@ -language: node_js -node_js: - - "0.8" - - "0.10" - - "0.11" \ No newline at end of file diff --git a/node_modules/base64-js/LICENSE.MIT b/node_modules/base64-js/LICENSE.MIT deleted file mode 100644 index 96d3f68a..00000000 --- a/node_modules/base64-js/LICENSE.MIT +++ /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/node_modules/base64-js/README.md b/node_modules/base64-js/README.md deleted file mode 100644 index ed31d1ab..00000000 --- a/node_modules/base64-js/README.md +++ /dev/null @@ -1,31 +0,0 @@ -base64-js -========= - -`base64-js` does basic base64 encoding/decoding in pure JS. - -[![build status](https://secure.travis-ci.org/beatgammit/base64-js.png)](http://travis-ci.org/beatgammit/base64-js) - -[![testling badge](https://ci.testling.com/beatgammit/base64-js.png)](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 two exposed functions, `toByteArray` and `fromByteArray`, which both take a single argument. - -* `toByteArray` - Takes a base64 string and returns a byte array -* `fromByteArray` - Takes a byte array and returns a base64 string - -## license - -MIT \ No newline at end of file diff --git a/node_modules/base64-js/bench/bench.js b/node_modules/base64-js/bench/bench.js deleted file mode 100644 index 0689e08a..00000000 --- a/node_modules/base64-js/bench/bench.js +++ /dev/null @@ -1,19 +0,0 @@ -var random = require('crypto').pseudoRandomBytes - -var b64 = require('../') -var fs = require('fs') -var path = require('path') -var data = random(1e6).toString('base64') -//fs.readFileSync(path.join(__dirname, 'example.b64'), 'ascii').split('\n').join('') -var start = Date.now() -var raw = b64.toByteArray(data) -var middle = Date.now() -var data = b64.fromByteArray(raw) -var end = Date.now() - -console.log('decode ms, decode ops/ms, encode ms, encode ops/ms') -console.log( - middle - start, data.length / (middle - start), - end - middle, data.length / (end - middle)) -//console.log(data) - diff --git a/node_modules/base64-js/lib/b64.js b/node_modules/base64-js/lib/b64.js deleted file mode 100644 index 46001d2f..00000000 --- a/node_modules/base64-js/lib/b64.js +++ /dev/null @@ -1,124 +0,0 @@ -var lookup = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'; - -;(function (exports) { - 'use strict'; - - var Arr = (typeof Uint8Array !== 'undefined') - ? Uint8Array - : Array - - var PLUS = '+'.charCodeAt(0) - var SLASH = '/'.charCodeAt(0) - var NUMBER = '0'.charCodeAt(0) - var LOWER = 'a'.charCodeAt(0) - var UPPER = 'A'.charCodeAt(0) - var PLUS_URL_SAFE = '-'.charCodeAt(0) - var SLASH_URL_SAFE = '_'.charCodeAt(0) - - function decode (elt) { - var code = elt.charCodeAt(0) - if (code === PLUS || - code === PLUS_URL_SAFE) - return 62 // '+' - if (code === SLASH || - code === SLASH_URL_SAFE) - return 63 // '/' - if (code < NUMBER) - return -1 //no match - if (code < NUMBER + 10) - return code - NUMBER + 26 + 26 - if (code < UPPER + 26) - return code - UPPER - if (code < LOWER + 26) - return code - LOWER + 26 - } - - function b64ToByteArray (b64) { - var i, j, l, tmp, placeHolders, arr - - if (b64.length % 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 - var len = b64.length - placeHolders = '=' === b64.charAt(len - 2) ? 2 : '=' === b64.charAt(len - 1) ? 1 : 0 - - // base64 is 4/3 + up to two characters of the original data - arr = new Arr(b64.length * 3 / 4 - placeHolders) - - // if there are placeholders, only get up to the last complete 4 chars - l = placeHolders > 0 ? b64.length - 4 : b64.length - - var L = 0 - - function push (v) { - arr[L++] = v - } - - for (i = 0, j = 0; i < l; i += 4, j += 3) { - tmp = (decode(b64.charAt(i)) << 18) | (decode(b64.charAt(i + 1)) << 12) | (decode(b64.charAt(i + 2)) << 6) | decode(b64.charAt(i + 3)) - push((tmp & 0xFF0000) >> 16) - push((tmp & 0xFF00) >> 8) - push(tmp & 0xFF) - } - - if (placeHolders === 2) { - tmp = (decode(b64.charAt(i)) << 2) | (decode(b64.charAt(i + 1)) >> 4) - push(tmp & 0xFF) - } else if (placeHolders === 1) { - tmp = (decode(b64.charAt(i)) << 10) | (decode(b64.charAt(i + 1)) << 4) | (decode(b64.charAt(i + 2)) >> 2) - push((tmp >> 8) & 0xFF) - push(tmp & 0xFF) - } - - return arr - } - - function uint8ToBase64 (uint8) { - var i, - extraBytes = uint8.length % 3, // if we have 1 byte left, pad 2 bytes - output = "", - temp, length - - function encode (num) { - return lookup.charAt(num) - } - - function tripletToBase64 (num) { - return encode(num >> 18 & 0x3F) + encode(num >> 12 & 0x3F) + encode(num >> 6 & 0x3F) + encode(num & 0x3F) - } - - // go through the array every three bytes, we'll deal with trailing stuff later - for (i = 0, length = uint8.length - extraBytes; i < length; i += 3) { - temp = (uint8[i] << 16) + (uint8[i + 1] << 8) + (uint8[i + 2]) - output += tripletToBase64(temp) - } - - // pad the end with zeros, but make sure to not forget the extra bytes - switch (extraBytes) { - case 1: - temp = uint8[uint8.length - 1] - output += encode(temp >> 2) - output += encode((temp << 4) & 0x3F) - output += '==' - break - case 2: - temp = (uint8[uint8.length - 2] << 8) + (uint8[uint8.length - 1]) - output += encode(temp >> 10) - output += encode((temp >> 4) & 0x3F) - output += encode((temp << 2) & 0x3F) - output += '=' - break - } - - return output - } - - exports.toByteArray = b64ToByteArray - exports.fromByteArray = uint8ToBase64 -}(typeof exports === 'undefined' ? (this.base64js = {}) : exports)) diff --git a/node_modules/base64-js/package.json b/node_modules/base64-js/package.json deleted file mode 100644 index 9fa54f6e..00000000 --- a/node_modules/base64-js/package.json +++ /dev/null @@ -1,102 +0,0 @@ -{ - "_args": [ - [ - { - "raw": "base64-js@0.0.8", - "scope": null, - "escapedName": "base64-js", - "name": "base64-js", - "rawSpec": "0.0.8", - "spec": "0.0.8", - "type": "version" - }, - "/Users/benjaminarias/Desktop/poly/node_modules/buffer" - ] - ], - "_from": "base64-js@0.0.8", - "_id": "base64-js@0.0.8", - "_inCache": true, - "_installable": true, - "_location": "/base64-js", - "_nodeVersion": "0.10.35", - "_npmUser": { - "name": "feross", - "email": "feross@feross.org" - }, - "_npmVersion": "2.1.16", - "_phantomChildren": {}, - "_requested": { - "raw": "base64-js@0.0.8", - "scope": null, - "escapedName": "base64-js", - "name": "base64-js", - "rawSpec": "0.0.8", - "spec": "0.0.8", - "type": "version" - }, - "_requiredBy": [ - "/buffer" - ], - "_resolved": "https://registry.npmjs.org/base64-js/-/base64-js-0.0.8.tgz", - "_shasum": "1101e9544f4a76b1bc3b26d452ca96d7a35e7978", - "_shrinkwrap": null, - "_spec": "base64-js@0.0.8", - "_where": "/Users/benjaminarias/Desktop/poly/node_modules/buffer", - "author": { - "name": "T. Jameson Little", - "email": "t.jameson.little@gmail.com" - }, - "bugs": { - "url": "https://github.com/beatgammit/base64-js/issues" - }, - "dependencies": {}, - "description": "Base64 encoding/decoding in pure JS", - "devDependencies": { - "tape": "~2.3.2" - }, - "directories": {}, - "dist": { - "shasum": "1101e9544f4a76b1bc3b26d452ca96d7a35e7978", - "tarball": "https://registry.npmjs.org/base64-js/-/base64-js-0.0.8.tgz" - }, - "engines": { - "node": ">= 0.4" - }, - "gitHead": "b4a8a5fa9b0caeddb5ad94dd1108253d8f2a315f", - "homepage": "https://github.com/beatgammit/base64-js", - "license": "MIT", - "main": "lib/b64.js", - "maintainers": [ - { - "name": "beatgammit", - "email": "t.jameson.little@gmail.com" - }, - { - "name": "feross", - "email": "feross@feross.org" - } - ], - "name": "base64-js", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git://github.com/beatgammit/base64-js.git" - }, - "scripts": { - "test": "tape test/*.js" - }, - "testling": { - "files": "test/*.js", - "browsers": [ - "ie/6..latest", - "chrome/4..latest", - "firefox/3..latest", - "safari/5.1..latest", - "opera/11.0..latest", - "iphone/6", - "ipad/6" - ] - }, - "version": "0.0.8" -} diff --git a/node_modules/base64-js/test/convert.js b/node_modules/base64-js/test/convert.js deleted file mode 100644 index 60b09c01..00000000 --- a/node_modules/base64-js/test/convert.js +++ /dev/null @@ -1,51 +0,0 @@ -var test = require('tape'), - b64 = require('../lib/b64'), - checks = [ - 'a', - 'aa', - 'aaa', - 'hi', - 'hi!', - 'hi!!', - 'sup', - 'sup?', - 'sup?!' - ]; - -test('convert to base64 and back', function (t) { - t.plan(checks.length); - - for (var i = 0; i < checks.length; i++) { - var check = checks[i], - 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); - } - -}); - -function map (arr, callback) { - var res = [], - 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/node_modules/base64-js/test/url-safe.js b/node_modules/base64-js/test/url-safe.js deleted file mode 100644 index dc437e96..00000000 --- a/node_modules/base64-js/test/url-safe.js +++ /dev/null @@ -1,18 +0,0 @@ -var test = require('tape'), - b64 = require('../lib/b64'); - -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 (var i = 0; i < actual.length; i++) { - t.equal(actual[i], expected[i]) - } - - t.end(); -}); diff --git a/node_modules/base64-url/LICENSE b/node_modules/base64-url/LICENSE deleted file mode 100644 index 95491436..00000000 --- a/node_modules/base64-url/LICENSE +++ /dev/null @@ -1,15 +0,0 @@ -The ISC License - -Copyright (c) 2014, Joaquim José F. Serafim - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR -IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/node_modules/base64-url/README.md b/node_modules/base64-url/README.md deleted file mode 100644 index dfa3e707..00000000 --- a/node_modules/base64-url/README.md +++ /dev/null @@ -1,50 +0,0 @@ -# base64-url - -Base64 encode, decode, escape and unescape for URL applications. - - - -[![Build Status](https://travis-ci.org/joaquimserafim/base64-url.png?branch=master)](https://travis-ci.org/joaquimserafim/base64-url) - - -## API - -```js -base64url.encode('Node.js is awesome.'); -// returns Tm9kZS5qcyBpcyBhd2Vzb21lLg - -base64url.decode('Tm9kZS5qcyBpcyBhd2Vzb21lLg'); -// returns Node.js is awesome. - -base64url.escape('This+is/goingto+escape=='); -// returns This-is_goingto-escape - -base64url.unescape('This-is_goingto-escape'); -// returns This+is/goingto+escape== -``` - - -## Development - -**this projet has been set up with a precommit that forces you to follow a code style, no jshint issues and 100% of code coverage before commit** - - -to run test -``` js -npm test -``` - -to run lint -``` js -npm run lint -``` - -to run code style -``` js -npm run style -``` - -to check code coverage -``` js -npm run coverage:check -``` diff --git a/node_modules/base64-url/index.js b/node_modules/base64-url/index.js deleted file mode 100644 index 9ba16e90..00000000 --- a/node_modules/base64-url/index.js +++ /dev/null @@ -1,23 +0,0 @@ -'use strict'; - -var base64url = module.exports; - -base64url.unescape = function unescape (str) { - return (str + '==='.slice((str.length + 3) % 4)) - .replace(/\-/g, '+') - .replace(/_/g, '/'); -}; - -base64url.escape = function escape (str) { - return str.replace(/\+/g, '-') - .replace(/\//g, '_') - .replace(/=/g, ''); -}; - -base64url.encode = function encode (str) { - return this.escape(new Buffer(str).toString('base64')); -}; - -base64url.decode = function decode (str) { - return new Buffer(this.unescape(str), 'base64').toString(); -}; diff --git a/node_modules/base64-url/package.json b/node_modules/base64-url/package.json deleted file mode 100644 index 5f9dc99a..00000000 --- a/node_modules/base64-url/package.json +++ /dev/null @@ -1,109 +0,0 @@ -{ - "_args": [ - [ - { - "raw": "base64-url@^1.2.1", - "scope": null, - "escapedName": "base64-url", - "name": "base64-url", - "rawSpec": "^1.2.1", - "spec": ">=1.2.1 <2.0.0", - "type": "range" - }, - "/Users/benjaminarias/Desktop/poly/node_modules/ecdsa-sig-formatter" - ] - ], - "_from": "base64-url@>=1.2.1 <2.0.0", - "_id": "base64-url@1.3.2", - "_inCache": true, - "_installable": true, - "_location": "/base64-url", - "_nodeVersion": "4.4.2", - "_npmOperationalInternal": { - "host": "packages-16-east.internal.npmjs.com", - "tmp": "tmp/base64-url-1.3.2.tgz_1468593630635_0.8208693880587816" - }, - "_npmUser": { - "name": "quim", - "email": "joaquim.serafim@gmail.com" - }, - "_npmVersion": "2.15.0", - "_phantomChildren": {}, - "_requested": { - "raw": "base64-url@^1.2.1", - "scope": null, - "escapedName": "base64-url", - "name": "base64-url", - "rawSpec": "^1.2.1", - "spec": ">=1.2.1 <2.0.0", - "type": "range" - }, - "_requiredBy": [ - "/ecdsa-sig-formatter" - ], - "_resolved": "https://registry.npmjs.org/base64-url/-/base64-url-1.3.2.tgz", - "_shasum": "4b08113b49d23889f306be64372762d31412f7a8", - "_shrinkwrap": null, - "_spec": "base64-url@^1.2.1", - "_where": "/Users/benjaminarias/Desktop/poly/node_modules/ecdsa-sig-formatter", - "author": { - "name": "@joaquimserafim" - }, - "bugs": { - "url": "https://github.com/joaquimserafim/base64-url/issues" - }, - "dependencies": {}, - "description": "Base64 encode, decode, escape and unescape for URL applications", - "devDependencies": { - "istanbul": "^0.3.5", - "jscs": "^1.9.0", - "jshint": "^2.5.11", - "pre-commit": "^1.1.3", - "tape": "^4.6.0" - }, - "directories": {}, - "dist": { - "shasum": "4b08113b49d23889f306be64372762d31412f7a8", - "tarball": "https://registry.npmjs.org/base64-url/-/base64-url-1.3.2.tgz" - }, - "files": [ - "LICENSE", - "README.md", - "index.js" - ], - "gitHead": "356442c220fe38d00fa34078519c9b3ac31b1312", - "homepage": "https://github.com/joaquimserafim/base64-url", - "keywords": [ - "base64", - "base64url" - ], - "license": "ISC", - "main": "index.js", - "maintainers": [ - { - "name": "quim", - "email": "joaquim.serafim@gmail.com" - } - ], - "name": "base64-url", - "optionalDependencies": {}, - "pre-commit": [ - "lint", - "style", - "test", - "coverage:check" - ], - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git://github.com/joaquimserafim/base64-url.git" - }, - "scripts": { - "coverage": "open coverage/lcov-report/index.html", - "coverage:check": "istanbul check-coverage --statements 100 --functions 100 --lines 100 --branches 100", - "lint": "jshint -c .jshintrc *.js", - "style": "jscs -p google *.js", - "test": "istanbul cover tape test.js" - }, - "version": "1.3.2" -} diff --git a/node_modules/base64url/.npmignore b/node_modules/base64url/.npmignore deleted file mode 100644 index 3c3629e6..00000000 --- a/node_modules/base64url/.npmignore +++ /dev/null @@ -1 +0,0 @@ -node_modules diff --git a/node_modules/base64url/.travis.yml b/node_modules/base64url/.travis.yml deleted file mode 100644 index 20fd86b6..00000000 --- a/node_modules/base64url/.travis.yml +++ /dev/null @@ -1,3 +0,0 @@ -language: node_js -node_js: - - 0.10 diff --git a/node_modules/base64url/LICENSE b/node_modules/base64url/LICENSE deleted file mode 100644 index 8c2ca83f..00000000 --- a/node_modules/base64url/LICENSE +++ /dev/null @@ -1,20 +0,0 @@ -Copyright (c) 2013 Brian J. Brennan - -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/node_modules/base64url/bin/base64url b/node_modules/base64url/bin/base64url deleted file mode 100755 index a9445b7c..00000000 --- a/node_modules/base64url/bin/base64url +++ /dev/null @@ -1,105 +0,0 @@ -#!/usr/bin/env node - -var fs = require('fs'); -var concat = require('concat-stream'); -var base64url = require('../'); -var cli = require('meow')({ - pkg: '../package.json', - help: [ - 'Usage: base64url [-hvD] [-b num] [-i in_file] [-o out_file]', - ' -h, --help display this message', - ' -v, --version display version info', - ' -D, --decode decodes input', - ' -b, --break break encoded string into num character lines', - ' -i, --input input file (default: stdin)', - ' -o, --output output file (default: stdout)' - ].join('\n') -}, { - boolean: [ - 'D', 'decode', - 'h', 'help', - 'v', 'version', - ], - string: [ - 'i', 'input', - 'o', 'output', - 'b', 'break', - ], -}); - -var decode = cli.flags.d || cli.flags.decode; -var fn = decode && base64url.decode || base64url.encode; - -function processStream(outputStream, breakLength) { - outputStream = outputStream || process.stdout; - return concat(function (buf) { - outputStream.write(format(fn(buf), breakLength)); - process.exit(0); - }); -} - -function format(string, breakLength) { - if (!breakLength) - return string; - var regex = new RegExp('(.{' + breakLength + '})', 'g'); - return string.replace(regex, '$1\n'); -} - -function main() { - var help = cli.flags.h || cli.flags.help; - var version = cli.flags.v || cli.flags.version; - - if (help) { - return cli.showHelp(); - } - - if (version) { - console.log(cli.pkg.version); - process.exit(0); - } - - var breakLines = parseInt(cli.flags.b || cli.flags.break, 10); - var inputFile = cli.flags.i || cli.flags.input; - var outputFile = cli.flags.o || cli.flags.output; - var writeStream = process.stdout; - - if (Array.isArray(inputFile)) - inputFile = inputFile.pop(); - - if (cli.input.length > 0) - inputFile = cli.input.pop(); - - if (outputFile) { - writeStream = fs.createWriteStream(outputFile); - writeStream.on('error', fileStreamErrHandler(outputFile)); - } - - var outStream = processStream(writeStream, breakLines); - - if (!inputFile) { - return process.stdin.pipe(outStream); - } - - var readStream = fs.createReadStream(inputFile); - readStream.on('error', fileStreamErrHandler(inputFile)); - - return readStream.pipe(outStream); -} - -function fileStreamErrHandler(file) { - return function (err) { - switch (err.code) { - case 'ENOENT': - console.error('Unable to open \'%s\': No such file or directory', file); - break; - case 'EISDIR': - console.error('Unable to process \'%s\': Cannot operate on directories', file); - break; - } - - process.exit(err.errno || 1); - console.log(err); - }; -} - -main(); diff --git a/node_modules/base64url/index.js b/node_modules/base64url/index.js deleted file mode 100644 index 519a47e9..00000000 --- a/node_modules/base64url/index.js +++ /dev/null @@ -1,54 +0,0 @@ -function fromBase64(base64string) { - return ( - base64string - .replace(/=/g, '') - .replace(/\+/g, '-') - .replace(/\//g, '_') - ); -} - -function toBase64(base64UrlString) { - if (Buffer.isBuffer(base64UrlString)) - base64UrlString = base64UrlString.toString(); - - var b64str = padString(base64UrlString) - .replace(/\-/g, '+') - .replace(/_/g, '/'); - return b64str; -} - -function padString(string) { - var segmentLength = 4; - var stringLength = string.length; - var diff = string.length % segmentLength; - if (!diff) - return string; - var position = stringLength; - var padLength = segmentLength - diff; - var paddedStringLength = stringLength + padLength; - var buffer = Buffer(paddedStringLength); - buffer.write(string); - while (padLength--) - buffer.write('=', position++); - return buffer.toString(); -} - -function decodeBase64Url(base64UrlString, encoding) { - return Buffer(toBase64(base64UrlString), 'base64').toString(encoding); -} - -function base64url(stringOrBuffer, encoding) { - return fromBase64(Buffer(stringOrBuffer, encoding).toString('base64')); -} - -function toBuffer(base64string) { - return Buffer(toBase64(base64string), 'base64'); -} - -base64url.toBase64 = toBase64; -base64url.fromBase64 = fromBase64; -base64url.decode = decodeBase64Url; -base64url.encode = base64url; -base64url.toBuffer = toBuffer; - -module.exports = base64url; diff --git a/node_modules/base64url/package.json b/node_modules/base64url/package.json deleted file mode 100644 index 35e74f6b..00000000 --- a/node_modules/base64url/package.json +++ /dev/null @@ -1,96 +0,0 @@ -{ - "_args": [ - [ - { - "raw": "base64url@~1.0.4", - "scope": null, - "escapedName": "base64url", - "name": "base64url", - "rawSpec": "~1.0.4", - "spec": ">=1.0.4 <1.1.0", - "type": "range" - }, - "/Users/benjaminarias/Desktop/poly/node_modules/jws" - ] - ], - "_from": "base64url@>=1.0.4 <1.1.0", - "_id": "base64url@1.0.6", - "_inCache": true, - "_installable": true, - "_location": "/base64url", - "_nodeVersion": "5.2.0", - "_npmOperationalInternal": { - "host": "packages-9-west.internal.npmjs.com", - "tmp": "tmp/base64url-1.0.6.tgz_1455309394658_0.6706331633031368" - }, - "_npmUser": { - "name": "brianloveswords", - "email": "brianloveswords@gmail.com" - }, - "_npmVersion": "3.3.12", - "_phantomChildren": {}, - "_requested": { - "raw": "base64url@~1.0.4", - "scope": null, - "escapedName": "base64url", - "name": "base64url", - "rawSpec": "~1.0.4", - "spec": ">=1.0.4 <1.1.0", - "type": "range" - }, - "_requiredBy": [ - "/jws" - ], - "_resolved": "https://registry.npmjs.org/base64url/-/base64url-1.0.6.tgz", - "_shasum": "d64d375d68a7c640d912e2358d170dca5bb54681", - "_shrinkwrap": null, - "_spec": "base64url@~1.0.4", - "_where": "/Users/benjaminarias/Desktop/poly/node_modules/jws", - "author": { - "name": "Brian J Brennan" - }, - "bin": { - "base64url": "./bin/base64url" - }, - "bugs": { - "url": "https://github.com/brianloveswords/base64url/issues" - }, - "dependencies": { - "concat-stream": "~1.4.7", - "meow": "~2.0.0" - }, - "description": "For encoding to/from base64urls", - "devDependencies": { - "tap": "~0.3.3" - }, - "directories": {}, - "dist": { - "shasum": "d64d375d68a7c640d912e2358d170dca5bb54681", - "tarball": "https://registry.npmjs.org/base64url/-/base64url-1.0.6.tgz" - }, - "gitHead": "a219306e93712cb4380286b44360fea4406d49d3", - "homepage": "https://github.com/brianloveswords/base64url#readme", - "keywords": [ - "base64", - "base64url" - ], - "license": "MIT", - "main": "index.js", - "maintainers": [ - { - "name": "brianloveswords", - "email": "brian@nyhacker.org" - } - ], - "name": "base64url", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git://github.com/brianloveswords/base64url.git" - }, - "scripts": { - "test": "tap test/*.test.js" - }, - "version": "1.0.6" -} diff --git a/node_modules/base64url/readme.md b/node_modules/base64url/readme.md deleted file mode 100644 index a2214eee..00000000 --- a/node_modules/base64url/readme.md +++ /dev/null @@ -1,126 +0,0 @@ -# base64url [![Build Status](https://secure.travis-ci.org/brianloveswords/base64url.png)](http://travis-ci.org/brianloveswords/base64url) - -Converting to, and from, [base64url](http://en.wikipedia.org/wiki/Base64#RFC_4648) - -# Install - -```bash -$ npm install base64url -``` - -# Usage - -## CLI - -```bash -$ npm install -g base64url - -$ echo 'Here is some text to encode' | base64url -> SGVyZSBpcyBzb21lIHRleHQgdG8gZW5jb2RlCg - -$ echo SGVyZSBpcyBzb21lIHRleHQgdG8gZW5jb2RlCg | base64url -D -> Here is some text to encode - -$ base64url --help - - For encoding to/from base64urls - - Usage: base64url [-hvD] [-b num] [-i in_file] [-o out_file] - -h, --help display this message - -v, --version display version info - -D, --decode decodes input - -b, --break break encoded string into num character lines - -i, --input input file (default: stdin) - -o, --output output file (default: stdout), -``` - -## Library - -### base64url(stringOrBuffer) ### - -### base64url.encode(stringOrBuffer) ### - -base64url encode `stringOrBuffer` - - -Example - -```js -> base64url('ladies and gentlemen, we are floating in space') -'bGFkaWVzIGFuZCBnZW50bGVtYW4sIHdlIGFyZSBmbG9hdGluZyBpbiBzcGFjZQ' -``` - ---- - -### base64url.decode(b64UrlEncodedString, [encoding]) - -Convert a base64url encoded string into a raw string. Encoding defaults to `'utf8'`. - -```js -> base64url.decode('cmlkZTogZHJlYW1zIGJ1cm4gZG93bg') -'ride: dreams burn down' -``` - ---- - -### base64url.fromBase64(b64EncodedString) - -Convert a base64 encoded string to a base64url encoded string - -Example - -```js -> base64url.fromBase64('qL8R4QIcQ/ZsRqOAbeRfcZhilN/MksRtDaErMA==') -'qL8R4QIcQ_ZsRqOAbeRfcZhilN_MksRtDaErMA' -``` - ---- - - -### base64url.toBase64(b64UrlEncodedString) - -Convert a base64url encoded string to a base64 encoded string - -```js -> base64url.toBase64('qL8R4QIcQ_ZsRqOAbeRfcZhilN_MksRtDaErMA') -'qL8R4QIcQ/ZsRqOAbeRfcZhilN/MksRtDaErMA==' -``` - ---- - - -### base64url.toBuffer(b64UrlEncodedString) - -Convert a base64url encoded string to a Buffer - -```js -> base64url.toBuffer('c3Bpcml0dWFsaXplZA') - -``` - -# License - -MIT - -``` -Copyright (c) 2014 Brian J. Brennan - -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/node_modules/base64url/test/base64url.test.js b/node_modules/base64url/test/base64url.test.js deleted file mode 100644 index 61ef6f41..00000000 --- a/node_modules/base64url/test/base64url.test.js +++ /dev/null @@ -1,56 +0,0 @@ -const fs = require('fs'); -const test = require('tap').test; -const base64url = require('..'); -const testBuffer = fs.readFileSync(__dirname + '/test.jpg'); - -function base64(s) { - return Buffer(s, 'binary').toString('base64'); -} - -test('from string to base64url', function (t) { - const b64 = base64(testBuffer); - const b64url = base64url(testBuffer, 'binary'); - t.same(b64url.indexOf('+'), -1, 'should not contain plus signs'); - t.same(b64url.indexOf('/'), -1, 'should not contain slashes'); - t.same(b64url.indexOf('='), -1, 'should not contain equal signs'); - t.same(b64.indexOf('+'), b64url.indexOf('-'), 'should replace + with -'); - t.same(b64.indexOf('/'), b64url.indexOf('_'), 'should replace / with _'); - t.end(); -}); - -test('from base64url to base64', function (t) { - const b64 = base64(testBuffer); - const b64url = base64url(testBuffer, 'binary'); - const result = base64url.toBase64(b64url); - t.same(result, b64, 'should be able to convert back'); - t.end(); -}); - -test('from base64 to base64url', function (t) { - const b64 = base64(testBuffer); - const b64url = base64url(testBuffer, 'binary'); - const result = base64url.fromBase64(b64); - t.same(result, b64url, 'should be able to convert to b64url from b64'); - t.end(); -}); - -test('from base64url to string', function (t) { - const b64url = base64url(testBuffer, 'binary'); - const result = base64url.decode(b64url, 'binary'); - t.same(result, testBuffer.toString('binary'), 'should be able to decode'); - t.end(); -}); - -test('from base64url to string (buffer)', function (t) { - const b64url = base64url(testBuffer, 'binary'); - const result = base64url.decode(new Buffer(b64url), 'binary'); - t.same(result, testBuffer.toString('binary'), 'should be able to decode'); - t.end(); -}); - -test('from base64url to buffer', function (t) { - const b64url = base64url(testBuffer, 'binary'); - const result = base64url.toBuffer(b64url); - t.same(result, testBuffer, 'should be able to convert to buffer'); - t.end(); -}); diff --git a/node_modules/base64url/test/test.jpg b/node_modules/base64url/test/test.jpg deleted file mode 100644 index 0b80cb49..00000000 Binary files a/node_modules/base64url/test/test.jpg and /dev/null differ diff --git a/node_modules/bcrypt-pbkdf/README.md b/node_modules/bcrypt-pbkdf/README.md deleted file mode 100644 index 12018090..00000000 --- a/node_modules/bcrypt-pbkdf/README.md +++ /dev/null @@ -1,39 +0,0 @@ -Port of the OpenBSD `bcrypt_pbkdf` function to pure Javascript. `npm`-ified -version of [Devi Mandiri's port] -(https://github.com/devi/tmp/blob/master/js/bcrypt_pbkdf.js), -with some minor performance improvements. The code is copied verbatim (and -un-styled) from Devi's work. - -This product includes software developed by Niels Provos. - -## API - -### `bcrypt_pbkdf.pbkdf(pass, passlen, salt, saltlen, key, keylen, rounds)` - -Derive a cryptographic key of arbitrary length from a given password and salt, -using the OpenBSD `bcrypt_pbkdf` function. This is a combination of Blowfish and -SHA-512. - -See [this article](http://www.tedunangst.com/flak/post/bcrypt-pbkdf) for -further information. - -Parameters: - - * `pass`, a Uint8Array of length `passlen` - * `passlen`, an integer Number - * `salt`, a Uint8Array of length `saltlen` - * `saltlen`, an integer Number - * `key`, a Uint8Array of length `keylen`, will be filled with output - * `keylen`, an integer Number - * `rounds`, an integer Number, number of rounds of the PBKDF to run - -### `bcrypt_pbkdf.hash(sha2pass, sha2salt, out)` - -Calculate a Blowfish hash, given SHA2-512 output of a password and salt. Used as -part of the inner round function in the PBKDF. - -Parameters: - - * `sha2pass`, a Uint8Array of length 64 - * `sha2salt`, a Uint8Array of length 64 - * `out`, a Uint8Array of length 32, will be filled with output diff --git a/node_modules/bcrypt-pbkdf/index.js b/node_modules/bcrypt-pbkdf/index.js deleted file mode 100644 index ea29aa96..00000000 --- a/node_modules/bcrypt-pbkdf/index.js +++ /dev/null @@ -1,559 +0,0 @@ -'use strict'; - -var crypto_hash_sha512 = require('tweetnacl').lowlevel.crypto_hash; - -/* - * This file is a 1:1 port from the OpenBSD blowfish.c and bcrypt_pbkdf.c. As a - * result, it retains the original copyright and license. The two files are - * under slightly different (but compatible) licenses, and are here combined in - * one file. - * - * Credit for the actual porting work goes to: - * Devi Mandiri - */ - -/* - * The Blowfish portions are under the following license: - * - * Blowfish block cipher for OpenBSD - * Copyright 1997 Niels Provos - * All rights reserved. - * - * Implementation advice by David Mazieres . - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by Niels Provos. - * 4. The name of the author may not be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. - * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT - * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* - * The bcrypt_pbkdf portions are under the following license: - * - * Copyright (c) 2013 Ted Unangst - * - * Permission to use, copy, modify, and distribute this software for any - * purpose with or without fee is hereby granted, provided that the above - * copyright notice and this permission notice appear in all copies. - * - * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES - * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR - * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN - * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF - * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - */ - -/* - * Performance improvements (Javascript-specific): - * - * Copyright 2016, Joyent Inc - * Author: Alex Wilson - * - * Permission to use, copy, modify, and distribute this software for any - * purpose with or without fee is hereby granted, provided that the above - * copyright notice and this permission notice appear in all copies. - * - * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES - * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR - * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN - * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF - * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - */ - -// Ported from OpenBSD bcrypt_pbkdf.c v1.9 - -var BLF_J = 0; - -var Blowfish = function() { - this.S = [ - new Uint32Array([ - 0xd1310ba6, 0x98dfb5ac, 0x2ffd72db, 0xd01adfb7, - 0xb8e1afed, 0x6a267e96, 0xba7c9045, 0xf12c7f99, - 0x24a19947, 0xb3916cf7, 0x0801f2e2, 0x858efc16, - 0x636920d8, 0x71574e69, 0xa458fea3, 0xf4933d7e, - 0x0d95748f, 0x728eb658, 0x718bcd58, 0x82154aee, - 0x7b54a41d, 0xc25a59b5, 0x9c30d539, 0x2af26013, - 0xc5d1b023, 0x286085f0, 0xca417918, 0xb8db38ef, - 0x8e79dcb0, 0x603a180e, 0x6c9e0e8b, 0xb01e8a3e, - 0xd71577c1, 0xbd314b27, 0x78af2fda, 0x55605c60, - 0xe65525f3, 0xaa55ab94, 0x57489862, 0x63e81440, - 0x55ca396a, 0x2aab10b6, 0xb4cc5c34, 0x1141e8ce, - 0xa15486af, 0x7c72e993, 0xb3ee1411, 0x636fbc2a, - 0x2ba9c55d, 0x741831f6, 0xce5c3e16, 0x9b87931e, - 0xafd6ba33, 0x6c24cf5c, 0x7a325381, 0x28958677, - 0x3b8f4898, 0x6b4bb9af, 0xc4bfe81b, 0x66282193, - 0x61d809cc, 0xfb21a991, 0x487cac60, 0x5dec8032, - 0xef845d5d, 0xe98575b1, 0xdc262302, 0xeb651b88, - 0x23893e81, 0xd396acc5, 0x0f6d6ff3, 0x83f44239, - 0x2e0b4482, 0xa4842004, 0x69c8f04a, 0x9e1f9b5e, - 0x21c66842, 0xf6e96c9a, 0x670c9c61, 0xabd388f0, - 0x6a51a0d2, 0xd8542f68, 0x960fa728, 0xab5133a3, - 0x6eef0b6c, 0x137a3be4, 0xba3bf050, 0x7efb2a98, - 0xa1f1651d, 0x39af0176, 0x66ca593e, 0x82430e88, - 0x8cee8619, 0x456f9fb4, 0x7d84a5c3, 0x3b8b5ebe, - 0xe06f75d8, 0x85c12073, 0x401a449f, 0x56c16aa6, - 0x4ed3aa62, 0x363f7706, 0x1bfedf72, 0x429b023d, - 0x37d0d724, 0xd00a1248, 0xdb0fead3, 0x49f1c09b, - 0x075372c9, 0x80991b7b, 0x25d479d8, 0xf6e8def7, - 0xe3fe501a, 0xb6794c3b, 0x976ce0bd, 0x04c006ba, - 0xc1a94fb6, 0x409f60c4, 0x5e5c9ec2, 0x196a2463, - 0x68fb6faf, 0x3e6c53b5, 0x1339b2eb, 0x3b52ec6f, - 0x6dfc511f, 0x9b30952c, 0xcc814544, 0xaf5ebd09, - 0xbee3d004, 0xde334afd, 0x660f2807, 0x192e4bb3, - 0xc0cba857, 0x45c8740f, 0xd20b5f39, 0xb9d3fbdb, - 0x5579c0bd, 0x1a60320a, 0xd6a100c6, 0x402c7279, - 0x679f25fe, 0xfb1fa3cc, 0x8ea5e9f8, 0xdb3222f8, - 0x3c7516df, 0xfd616b15, 0x2f501ec8, 0xad0552ab, - 0x323db5fa, 0xfd238760, 0x53317b48, 0x3e00df82, - 0x9e5c57bb, 0xca6f8ca0, 0x1a87562e, 0xdf1769db, - 0xd542a8f6, 0x287effc3, 0xac6732c6, 0x8c4f5573, - 0x695b27b0, 0xbbca58c8, 0xe1ffa35d, 0xb8f011a0, - 0x10fa3d98, 0xfd2183b8, 0x4afcb56c, 0x2dd1d35b, - 0x9a53e479, 0xb6f84565, 0xd28e49bc, 0x4bfb9790, - 0xe1ddf2da, 0xa4cb7e33, 0x62fb1341, 0xcee4c6e8, - 0xef20cada, 0x36774c01, 0xd07e9efe, 0x2bf11fb4, - 0x95dbda4d, 0xae909198, 0xeaad8e71, 0x6b93d5a0, - 0xd08ed1d0, 0xafc725e0, 0x8e3c5b2f, 0x8e7594b7, - 0x8ff6e2fb, 0xf2122b64, 0x8888b812, 0x900df01c, - 0x4fad5ea0, 0x688fc31c, 0xd1cff191, 0xb3a8c1ad, - 0x2f2f2218, 0xbe0e1777, 0xea752dfe, 0x8b021fa1, - 0xe5a0cc0f, 0xb56f74e8, 0x18acf3d6, 0xce89e299, - 0xb4a84fe0, 0xfd13e0b7, 0x7cc43b81, 0xd2ada8d9, - 0x165fa266, 0x80957705, 0x93cc7314, 0x211a1477, - 0xe6ad2065, 0x77b5fa86, 0xc75442f5, 0xfb9d35cf, - 0xebcdaf0c, 0x7b3e89a0, 0xd6411bd3, 0xae1e7e49, - 0x00250e2d, 0x2071b35e, 0x226800bb, 0x57b8e0af, - 0x2464369b, 0xf009b91e, 0x5563911d, 0x59dfa6aa, - 0x78c14389, 0xd95a537f, 0x207d5ba2, 0x02e5b9c5, - 0x83260376, 0x6295cfa9, 0x11c81968, 0x4e734a41, - 0xb3472dca, 0x7b14a94a, 0x1b510052, 0x9a532915, - 0xd60f573f, 0xbc9bc6e4, 0x2b60a476, 0x81e67400, - 0x08ba6fb5, 0x571be91f, 0xf296ec6b, 0x2a0dd915, - 0xb6636521, 0xe7b9f9b6, 0xff34052e, 0xc5855664, - 0x53b02d5d, 0xa99f8fa1, 0x08ba4799, 0x6e85076a]), - new Uint32Array([ - 0x4b7a70e9, 0xb5b32944, 0xdb75092e, 0xc4192623, - 0xad6ea6b0, 0x49a7df7d, 0x9cee60b8, 0x8fedb266, - 0xecaa8c71, 0x699a17ff, 0x5664526c, 0xc2b19ee1, - 0x193602a5, 0x75094c29, 0xa0591340, 0xe4183a3e, - 0x3f54989a, 0x5b429d65, 0x6b8fe4d6, 0x99f73fd6, - 0xa1d29c07, 0xefe830f5, 0x4d2d38e6, 0xf0255dc1, - 0x4cdd2086, 0x8470eb26, 0x6382e9c6, 0x021ecc5e, - 0x09686b3f, 0x3ebaefc9, 0x3c971814, 0x6b6a70a1, - 0x687f3584, 0x52a0e286, 0xb79c5305, 0xaa500737, - 0x3e07841c, 0x7fdeae5c, 0x8e7d44ec, 0x5716f2b8, - 0xb03ada37, 0xf0500c0d, 0xf01c1f04, 0x0200b3ff, - 0xae0cf51a, 0x3cb574b2, 0x25837a58, 0xdc0921bd, - 0xd19113f9, 0x7ca92ff6, 0x94324773, 0x22f54701, - 0x3ae5e581, 0x37c2dadc, 0xc8b57634, 0x9af3dda7, - 0xa9446146, 0x0fd0030e, 0xecc8c73e, 0xa4751e41, - 0xe238cd99, 0x3bea0e2f, 0x3280bba1, 0x183eb331, - 0x4e548b38, 0x4f6db908, 0x6f420d03, 0xf60a04bf, - 0x2cb81290, 0x24977c79, 0x5679b072, 0xbcaf89af, - 0xde9a771f, 0xd9930810, 0xb38bae12, 0xdccf3f2e, - 0x5512721f, 0x2e6b7124, 0x501adde6, 0x9f84cd87, - 0x7a584718, 0x7408da17, 0xbc9f9abc, 0xe94b7d8c, - 0xec7aec3a, 0xdb851dfa, 0x63094366, 0xc464c3d2, - 0xef1c1847, 0x3215d908, 0xdd433b37, 0x24c2ba16, - 0x12a14d43, 0x2a65c451, 0x50940002, 0x133ae4dd, - 0x71dff89e, 0x10314e55, 0x81ac77d6, 0x5f11199b, - 0x043556f1, 0xd7a3c76b, 0x3c11183b, 0x5924a509, - 0xf28fe6ed, 0x97f1fbfa, 0x9ebabf2c, 0x1e153c6e, - 0x86e34570, 0xeae96fb1, 0x860e5e0a, 0x5a3e2ab3, - 0x771fe71c, 0x4e3d06fa, 0x2965dcb9, 0x99e71d0f, - 0x803e89d6, 0x5266c825, 0x2e4cc978, 0x9c10b36a, - 0xc6150eba, 0x94e2ea78, 0xa5fc3c53, 0x1e0a2df4, - 0xf2f74ea7, 0x361d2b3d, 0x1939260f, 0x19c27960, - 0x5223a708, 0xf71312b6, 0xebadfe6e, 0xeac31f66, - 0xe3bc4595, 0xa67bc883, 0xb17f37d1, 0x018cff28, - 0xc332ddef, 0xbe6c5aa5, 0x65582185, 0x68ab9802, - 0xeecea50f, 0xdb2f953b, 0x2aef7dad, 0x5b6e2f84, - 0x1521b628, 0x29076170, 0xecdd4775, 0x619f1510, - 0x13cca830, 0xeb61bd96, 0x0334fe1e, 0xaa0363cf, - 0xb5735c90, 0x4c70a239, 0xd59e9e0b, 0xcbaade14, - 0xeecc86bc, 0x60622ca7, 0x9cab5cab, 0xb2f3846e, - 0x648b1eaf, 0x19bdf0ca, 0xa02369b9, 0x655abb50, - 0x40685a32, 0x3c2ab4b3, 0x319ee9d5, 0xc021b8f7, - 0x9b540b19, 0x875fa099, 0x95f7997e, 0x623d7da8, - 0xf837889a, 0x97e32d77, 0x11ed935f, 0x16681281, - 0x0e358829, 0xc7e61fd6, 0x96dedfa1, 0x7858ba99, - 0x57f584a5, 0x1b227263, 0x9b83c3ff, 0x1ac24696, - 0xcdb30aeb, 0x532e3054, 0x8fd948e4, 0x6dbc3128, - 0x58ebf2ef, 0x34c6ffea, 0xfe28ed61, 0xee7c3c73, - 0x5d4a14d9, 0xe864b7e3, 0x42105d14, 0x203e13e0, - 0x45eee2b6, 0xa3aaabea, 0xdb6c4f15, 0xfacb4fd0, - 0xc742f442, 0xef6abbb5, 0x654f3b1d, 0x41cd2105, - 0xd81e799e, 0x86854dc7, 0xe44b476a, 0x3d816250, - 0xcf62a1f2, 0x5b8d2646, 0xfc8883a0, 0xc1c7b6a3, - 0x7f1524c3, 0x69cb7492, 0x47848a0b, 0x5692b285, - 0x095bbf00, 0xad19489d, 0x1462b174, 0x23820e00, - 0x58428d2a, 0x0c55f5ea, 0x1dadf43e, 0x233f7061, - 0x3372f092, 0x8d937e41, 0xd65fecf1, 0x6c223bdb, - 0x7cde3759, 0xcbee7460, 0x4085f2a7, 0xce77326e, - 0xa6078084, 0x19f8509e, 0xe8efd855, 0x61d99735, - 0xa969a7aa, 0xc50c06c2, 0x5a04abfc, 0x800bcadc, - 0x9e447a2e, 0xc3453484, 0xfdd56705, 0x0e1e9ec9, - 0xdb73dbd3, 0x105588cd, 0x675fda79, 0xe3674340, - 0xc5c43465, 0x713e38d8, 0x3d28f89e, 0xf16dff20, - 0x153e21e7, 0x8fb03d4a, 0xe6e39f2b, 0xdb83adf7]), - new Uint32Array([ - 0xe93d5a68, 0x948140f7, 0xf64c261c, 0x94692934, - 0x411520f7, 0x7602d4f7, 0xbcf46b2e, 0xd4a20068, - 0xd4082471, 0x3320f46a, 0x43b7d4b7, 0x500061af, - 0x1e39f62e, 0x97244546, 0x14214f74, 0xbf8b8840, - 0x4d95fc1d, 0x96b591af, 0x70f4ddd3, 0x66a02f45, - 0xbfbc09ec, 0x03bd9785, 0x7fac6dd0, 0x31cb8504, - 0x96eb27b3, 0x55fd3941, 0xda2547e6, 0xabca0a9a, - 0x28507825, 0x530429f4, 0x0a2c86da, 0xe9b66dfb, - 0x68dc1462, 0xd7486900, 0x680ec0a4, 0x27a18dee, - 0x4f3ffea2, 0xe887ad8c, 0xb58ce006, 0x7af4d6b6, - 0xaace1e7c, 0xd3375fec, 0xce78a399, 0x406b2a42, - 0x20fe9e35, 0xd9f385b9, 0xee39d7ab, 0x3b124e8b, - 0x1dc9faf7, 0x4b6d1856, 0x26a36631, 0xeae397b2, - 0x3a6efa74, 0xdd5b4332, 0x6841e7f7, 0xca7820fb, - 0xfb0af54e, 0xd8feb397, 0x454056ac, 0xba489527, - 0x55533a3a, 0x20838d87, 0xfe6ba9b7, 0xd096954b, - 0x55a867bc, 0xa1159a58, 0xcca92963, 0x99e1db33, - 0xa62a4a56, 0x3f3125f9, 0x5ef47e1c, 0x9029317c, - 0xfdf8e802, 0x04272f70, 0x80bb155c, 0x05282ce3, - 0x95c11548, 0xe4c66d22, 0x48c1133f, 0xc70f86dc, - 0x07f9c9ee, 0x41041f0f, 0x404779a4, 0x5d886e17, - 0x325f51eb, 0xd59bc0d1, 0xf2bcc18f, 0x41113564, - 0x257b7834, 0x602a9c60, 0xdff8e8a3, 0x1f636c1b, - 0x0e12b4c2, 0x02e1329e, 0xaf664fd1, 0xcad18115, - 0x6b2395e0, 0x333e92e1, 0x3b240b62, 0xeebeb922, - 0x85b2a20e, 0xe6ba0d99, 0xde720c8c, 0x2da2f728, - 0xd0127845, 0x95b794fd, 0x647d0862, 0xe7ccf5f0, - 0x5449a36f, 0x877d48fa, 0xc39dfd27, 0xf33e8d1e, - 0x0a476341, 0x992eff74, 0x3a6f6eab, 0xf4f8fd37, - 0xa812dc60, 0xa1ebddf8, 0x991be14c, 0xdb6e6b0d, - 0xc67b5510, 0x6d672c37, 0x2765d43b, 0xdcd0e804, - 0xf1290dc7, 0xcc00ffa3, 0xb5390f92, 0x690fed0b, - 0x667b9ffb, 0xcedb7d9c, 0xa091cf0b, 0xd9155ea3, - 0xbb132f88, 0x515bad24, 0x7b9479bf, 0x763bd6eb, - 0x37392eb3, 0xcc115979, 0x8026e297, 0xf42e312d, - 0x6842ada7, 0xc66a2b3b, 0x12754ccc, 0x782ef11c, - 0x6a124237, 0xb79251e7, 0x06a1bbe6, 0x4bfb6350, - 0x1a6b1018, 0x11caedfa, 0x3d25bdd8, 0xe2e1c3c9, - 0x44421659, 0x0a121386, 0xd90cec6e, 0xd5abea2a, - 0x64af674e, 0xda86a85f, 0xbebfe988, 0x64e4c3fe, - 0x9dbc8057, 0xf0f7c086, 0x60787bf8, 0x6003604d, - 0xd1fd8346, 0xf6381fb0, 0x7745ae04, 0xd736fccc, - 0x83426b33, 0xf01eab71, 0xb0804187, 0x3c005e5f, - 0x77a057be, 0xbde8ae24, 0x55464299, 0xbf582e61, - 0x4e58f48f, 0xf2ddfda2, 0xf474ef38, 0x8789bdc2, - 0x5366f9c3, 0xc8b38e74, 0xb475f255, 0x46fcd9b9, - 0x7aeb2661, 0x8b1ddf84, 0x846a0e79, 0x915f95e2, - 0x466e598e, 0x20b45770, 0x8cd55591, 0xc902de4c, - 0xb90bace1, 0xbb8205d0, 0x11a86248, 0x7574a99e, - 0xb77f19b6, 0xe0a9dc09, 0x662d09a1, 0xc4324633, - 0xe85a1f02, 0x09f0be8c, 0x4a99a025, 0x1d6efe10, - 0x1ab93d1d, 0x0ba5a4df, 0xa186f20f, 0x2868f169, - 0xdcb7da83, 0x573906fe, 0xa1e2ce9b, 0x4fcd7f52, - 0x50115e01, 0xa70683fa, 0xa002b5c4, 0x0de6d027, - 0x9af88c27, 0x773f8641, 0xc3604c06, 0x61a806b5, - 0xf0177a28, 0xc0f586e0, 0x006058aa, 0x30dc7d62, - 0x11e69ed7, 0x2338ea63, 0x53c2dd94, 0xc2c21634, - 0xbbcbee56, 0x90bcb6de, 0xebfc7da1, 0xce591d76, - 0x6f05e409, 0x4b7c0188, 0x39720a3d, 0x7c927c24, - 0x86e3725f, 0x724d9db9, 0x1ac15bb4, 0xd39eb8fc, - 0xed545578, 0x08fca5b5, 0xd83d7cd3, 0x4dad0fc4, - 0x1e50ef5e, 0xb161e6f8, 0xa28514d9, 0x6c51133c, - 0x6fd5c7e7, 0x56e14ec4, 0x362abfce, 0xddc6c837, - 0xd79a3234, 0x92638212, 0x670efa8e, 0x406000e0]), - new Uint32Array([ - 0x3a39ce37, 0xd3faf5cf, 0xabc27737, 0x5ac52d1b, - 0x5cb0679e, 0x4fa33742, 0xd3822740, 0x99bc9bbe, - 0xd5118e9d, 0xbf0f7315, 0xd62d1c7e, 0xc700c47b, - 0xb78c1b6b, 0x21a19045, 0xb26eb1be, 0x6a366eb4, - 0x5748ab2f, 0xbc946e79, 0xc6a376d2, 0x6549c2c8, - 0x530ff8ee, 0x468dde7d, 0xd5730a1d, 0x4cd04dc6, - 0x2939bbdb, 0xa9ba4650, 0xac9526e8, 0xbe5ee304, - 0xa1fad5f0, 0x6a2d519a, 0x63ef8ce2, 0x9a86ee22, - 0xc089c2b8, 0x43242ef6, 0xa51e03aa, 0x9cf2d0a4, - 0x83c061ba, 0x9be96a4d, 0x8fe51550, 0xba645bd6, - 0x2826a2f9, 0xa73a3ae1, 0x4ba99586, 0xef5562e9, - 0xc72fefd3, 0xf752f7da, 0x3f046f69, 0x77fa0a59, - 0x80e4a915, 0x87b08601, 0x9b09e6ad, 0x3b3ee593, - 0xe990fd5a, 0x9e34d797, 0x2cf0b7d9, 0x022b8b51, - 0x96d5ac3a, 0x017da67d, 0xd1cf3ed6, 0x7c7d2d28, - 0x1f9f25cf, 0xadf2b89b, 0x5ad6b472, 0x5a88f54c, - 0xe029ac71, 0xe019a5e6, 0x47b0acfd, 0xed93fa9b, - 0xe8d3c48d, 0x283b57cc, 0xf8d56629, 0x79132e28, - 0x785f0191, 0xed756055, 0xf7960e44, 0xe3d35e8c, - 0x15056dd4, 0x88f46dba, 0x03a16125, 0x0564f0bd, - 0xc3eb9e15, 0x3c9057a2, 0x97271aec, 0xa93a072a, - 0x1b3f6d9b, 0x1e6321f5, 0xf59c66fb, 0x26dcf319, - 0x7533d928, 0xb155fdf5, 0x03563482, 0x8aba3cbb, - 0x28517711, 0xc20ad9f8, 0xabcc5167, 0xccad925f, - 0x4de81751, 0x3830dc8e, 0x379d5862, 0x9320f991, - 0xea7a90c2, 0xfb3e7bce, 0x5121ce64, 0x774fbe32, - 0xa8b6e37e, 0xc3293d46, 0x48de5369, 0x6413e680, - 0xa2ae0810, 0xdd6db224, 0x69852dfd, 0x09072166, - 0xb39a460a, 0x6445c0dd, 0x586cdecf, 0x1c20c8ae, - 0x5bbef7dd, 0x1b588d40, 0xccd2017f, 0x6bb4e3bb, - 0xdda26a7e, 0x3a59ff45, 0x3e350a44, 0xbcb4cdd5, - 0x72eacea8, 0xfa6484bb, 0x8d6612ae, 0xbf3c6f47, - 0xd29be463, 0x542f5d9e, 0xaec2771b, 0xf64e6370, - 0x740e0d8d, 0xe75b1357, 0xf8721671, 0xaf537d5d, - 0x4040cb08, 0x4eb4e2cc, 0x34d2466a, 0x0115af84, - 0xe1b00428, 0x95983a1d, 0x06b89fb4, 0xce6ea048, - 0x6f3f3b82, 0x3520ab82, 0x011a1d4b, 0x277227f8, - 0x611560b1, 0xe7933fdc, 0xbb3a792b, 0x344525bd, - 0xa08839e1, 0x51ce794b, 0x2f32c9b7, 0xa01fbac9, - 0xe01cc87e, 0xbcc7d1f6, 0xcf0111c3, 0xa1e8aac7, - 0x1a908749, 0xd44fbd9a, 0xd0dadecb, 0xd50ada38, - 0x0339c32a, 0xc6913667, 0x8df9317c, 0xe0b12b4f, - 0xf79e59b7, 0x43f5bb3a, 0xf2d519ff, 0x27d9459c, - 0xbf97222c, 0x15e6fc2a, 0x0f91fc71, 0x9b941525, - 0xfae59361, 0xceb69ceb, 0xc2a86459, 0x12baa8d1, - 0xb6c1075e, 0xe3056a0c, 0x10d25065, 0xcb03a442, - 0xe0ec6e0e, 0x1698db3b, 0x4c98a0be, 0x3278e964, - 0x9f1f9532, 0xe0d392df, 0xd3a0342b, 0x8971f21e, - 0x1b0a7441, 0x4ba3348c, 0xc5be7120, 0xc37632d8, - 0xdf359f8d, 0x9b992f2e, 0xe60b6f47, 0x0fe3f11d, - 0xe54cda54, 0x1edad891, 0xce6279cf, 0xcd3e7e6f, - 0x1618b166, 0xfd2c1d05, 0x848fd2c5, 0xf6fb2299, - 0xf523f357, 0xa6327623, 0x93a83531, 0x56cccd02, - 0xacf08162, 0x5a75ebb5, 0x6e163697, 0x88d273cc, - 0xde966292, 0x81b949d0, 0x4c50901b, 0x71c65614, - 0xe6c6c7bd, 0x327a140a, 0x45e1d006, 0xc3f27b9a, - 0xc9aa53fd, 0x62a80f00, 0xbb25bfe2, 0x35bdd2f6, - 0x71126905, 0xb2040222, 0xb6cbcf7c, 0xcd769c2b, - 0x53113ec0, 0x1640e3d3, 0x38abbd60, 0x2547adf0, - 0xba38209c, 0xf746ce76, 0x77afa1c5, 0x20756060, - 0x85cbfe4e, 0x8ae88dd8, 0x7aaaf9b0, 0x4cf9aa7e, - 0x1948c25c, 0x02fb8a8c, 0x01c36ae4, 0xd6ebe1f9, - 0x90d4f869, 0xa65cdea0, 0x3f09252d, 0xc208e69f, - 0xb74e6132, 0xce77e25b, 0x578fdfe3, 0x3ac372e6]) - ]; - this.P = new Uint32Array([ - 0x243f6a88, 0x85a308d3, 0x13198a2e, 0x03707344, - 0xa4093822, 0x299f31d0, 0x082efa98, 0xec4e6c89, - 0x452821e6, 0x38d01377, 0xbe5466cf, 0x34e90c6c, - 0xc0ac29b7, 0xc97c50dd, 0x3f84d5b5, 0xb5470917, - 0x9216d5d9, 0x8979fb1b]); -}; - -function F(S, x8, i) { - return (((S[0][x8[i+3]] + - S[1][x8[i+2]]) ^ - S[2][x8[i+1]]) + - S[3][x8[i]]); -}; - -Blowfish.prototype.encipher = function(x, x8) { - if (x8 === undefined) { - x8 = new Uint8Array(x.buffer); - if (x.byteOffset !== 0) - x8 = x8.subarray(x.byteOffset); - } - x[0] ^= this.P[0]; - for (var i = 1; i < 16; i += 2) { - x[1] ^= F(this.S, x8, 0) ^ this.P[i]; - x[0] ^= F(this.S, x8, 4) ^ this.P[i+1]; - } - var t = x[0]; - x[0] = x[1] ^ this.P[17]; - x[1] = t; -}; - -Blowfish.prototype.decipher = function(x) { - var x8 = new Uint8Array(x.buffer); - if (x.byteOffset !== 0) - x8 = x8.subarray(x.byteOffset); - x[0] ^= this.P[17]; - for (var i = 16; i > 0; i -= 2) { - x[1] ^= F(this.S, x8, 0) ^ this.P[i]; - x[0] ^= F(this.S, x8, 4) ^ this.P[i-1]; - } - var t = x[0]; - x[0] = x[1] ^ this.P[0]; - x[1] = t; -}; - -function stream2word(data, databytes){ - var i, temp = 0; - for (i = 0; i < 4; i++, BLF_J++) { - if (BLF_J >= databytes) BLF_J = 0; - temp = (temp << 8) | data[BLF_J]; - } - return temp; -}; - -Blowfish.prototype.expand0state = function(key, keybytes) { - var d = new Uint32Array(2), i, k; - var d8 = new Uint8Array(d.buffer); - - for (i = 0, BLF_J = 0; i < 18; i++) { - this.P[i] ^= stream2word(key, keybytes); - } - BLF_J = 0; - - for (i = 0; i < 18; i += 2) { - this.encipher(d, d8); - this.P[i] = d[0]; - this.P[i+1] = d[1]; - } - - for (i = 0; i < 4; i++) { - for (k = 0; k < 256; k += 2) { - this.encipher(d, d8); - this.S[i][k] = d[0]; - this.S[i][k+1] = d[1]; - } - } -}; - -Blowfish.prototype.expandstate = function(data, databytes, key, keybytes) { - var d = new Uint32Array(2), i, k; - - for (i = 0, BLF_J = 0; i < 18; i++) { - this.P[i] ^= stream2word(key, keybytes); - } - - for (i = 0, BLF_J = 0; i < 18; i += 2) { - d[0] ^= stream2word(data, databytes); - d[1] ^= stream2word(data, databytes); - this.encipher(d); - this.P[i] = d[0]; - this.P[i+1] = d[1]; - } - - for (i = 0; i < 4; i++) { - for (k = 0; k < 256; k += 2) { - d[0] ^= stream2word(data, databytes); - d[1] ^= stream2word(data, databytes); - this.encipher(d); - this.S[i][k] = d[0]; - this.S[i][k+1] = d[1]; - } - } - BLF_J = 0; -}; - -Blowfish.prototype.enc = function(data, blocks) { - for (var i = 0; i < blocks; i++) { - this.encipher(data.subarray(i*2)); - } -}; - -Blowfish.prototype.dec = function(data, blocks) { - for (var i = 0; i < blocks; i++) { - this.decipher(data.subarray(i*2)); - } -}; - -var BCRYPT_BLOCKS = 8, - BCRYPT_HASHSIZE = 32; - -function bcrypt_hash(sha2pass, sha2salt, out) { - var state = new Blowfish(), - cdata = new Uint32Array(BCRYPT_BLOCKS), i, - ciphertext = new Uint8Array([79,120,121,99,104,114,111,109,97,116,105, - 99,66,108,111,119,102,105,115,104,83,119,97,116,68,121,110,97,109, - 105,116,101]); //"OxychromaticBlowfishSwatDynamite" - - state.expandstate(sha2salt, 64, sha2pass, 64); - for (i = 0; i < 64; i++) { - state.expand0state(sha2salt, 64); - state.expand0state(sha2pass, 64); - } - - for (i = 0; i < BCRYPT_BLOCKS; i++) - cdata[i] = stream2word(ciphertext, ciphertext.byteLength); - for (i = 0; i < 64; i++) - state.enc(cdata, cdata.byteLength / 8); - - for (i = 0; i < BCRYPT_BLOCKS; i++) { - out[4*i+3] = cdata[i] >>> 24; - out[4*i+2] = cdata[i] >>> 16; - out[4*i+1] = cdata[i] >>> 8; - out[4*i+0] = cdata[i]; - } -}; - -function bcrypt_pbkdf(pass, passlen, salt, saltlen, key, keylen, rounds) { - var sha2pass = new Uint8Array(64), - sha2salt = new Uint8Array(64), - out = new Uint8Array(BCRYPT_HASHSIZE), - tmpout = new Uint8Array(BCRYPT_HASHSIZE), - countsalt = new Uint8Array(saltlen+4), - i, j, amt, stride, dest, count, - origkeylen = keylen; - - if (rounds < 1) - return -1; - if (passlen === 0 || saltlen === 0 || keylen === 0 || - keylen > (out.byteLength * out.byteLength) || saltlen > (1<<20)) - return -1; - - stride = Math.floor((keylen + out.byteLength - 1) / out.byteLength); - amt = Math.floor((keylen + stride - 1) / stride); - - for (i = 0; i < saltlen; i++) - countsalt[i] = salt[i]; - - crypto_hash_sha512(sha2pass, pass, passlen); - - for (count = 1; keylen > 0; count++) { - countsalt[saltlen+0] = count >>> 24; - countsalt[saltlen+1] = count >>> 16; - countsalt[saltlen+2] = count >>> 8; - countsalt[saltlen+3] = count; - - crypto_hash_sha512(sha2salt, countsalt, saltlen + 4); - bcrypt_hash(sha2pass, sha2salt, tmpout); - for (i = out.byteLength; i--;) - out[i] = tmpout[i]; - - for (i = 1; i < rounds; i++) { - crypto_hash_sha512(sha2salt, tmpout, tmpout.byteLength); - bcrypt_hash(sha2pass, sha2salt, tmpout); - for (j = 0; j < out.byteLength; j++) - out[j] ^= tmpout[j]; - } - - amt = Math.min(amt, keylen); - for (i = 0; i < amt; i++) { - dest = i * stride + (count - 1); - if (dest >= origkeylen) - break; - key[dest] = out[i]; - } - keylen -= i; - } - - return 0; -}; - -module.exports = { - BLOCKS: BCRYPT_BLOCKS, - HASHSIZE: BCRYPT_HASHSIZE, - hash: bcrypt_hash, - pbkdf: bcrypt_pbkdf -}; diff --git a/node_modules/bcrypt-pbkdf/package.json b/node_modules/bcrypt-pbkdf/package.json deleted file mode 100644 index 99ea70ed..00000000 --- a/node_modules/bcrypt-pbkdf/package.json +++ /dev/null @@ -1,73 +0,0 @@ -{ - "_args": [ - [ - { - "raw": "bcrypt-pbkdf@^1.0.0", - "scope": null, - "escapedName": "bcrypt-pbkdf", - "name": "bcrypt-pbkdf", - "rawSpec": "^1.0.0", - "spec": ">=1.0.0 <2.0.0", - "type": "range" - }, - "/Users/benjaminarias/Desktop/poly/node_modules/sshpk" - ] - ], - "_from": "bcrypt-pbkdf@>=1.0.0 <2.0.0", - "_id": "bcrypt-pbkdf@1.0.0", - "_inCache": true, - "_installable": true, - "_location": "/bcrypt-pbkdf", - "_nodeVersion": "0.12.15", - "_npmOperationalInternal": { - "host": "packages-16-east.internal.npmjs.com", - "tmp": "tmp/bcrypt-pbkdf-1.0.0.tgz_1471381825814_0.06877309852279723" - }, - "_npmUser": { - "name": "arekinath", - "email": "alex@cooperi.net" - }, - "_npmVersion": "3.10.3", - "_phantomChildren": {}, - "_requested": { - "raw": "bcrypt-pbkdf@^1.0.0", - "scope": null, - "escapedName": "bcrypt-pbkdf", - "name": "bcrypt-pbkdf", - "rawSpec": "^1.0.0", - "spec": ">=1.0.0 <2.0.0", - "type": "range" - }, - "_requiredBy": [ - "/sshpk" - ], - "_resolved": "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.0.tgz", - "_shasum": "3ca76b85241c7170bf7d9703e7b9aa74630040d4", - "_shrinkwrap": null, - "_spec": "bcrypt-pbkdf@^1.0.0", - "_where": "/Users/benjaminarias/Desktop/poly/node_modules/sshpk", - "dependencies": { - "tweetnacl": "^0.14.3" - }, - "description": "Port of the OpenBSD bcrypt_pbkdf function to pure JS", - "devDependencies": {}, - "directories": {}, - "dist": { - "shasum": "3ca76b85241c7170bf7d9703e7b9aa74630040d4", - "tarball": "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.0.tgz" - }, - "gitHead": "e88be37d3cd25395b4aa496ac468b33671368be6", - "license": "BSD-4-Clause", - "main": "index.js", - "maintainers": [ - { - "name": "arekinath", - "email": "alex@cooperi.net" - } - ], - "name": "bcrypt-pbkdf", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "scripts": {}, - "version": "1.0.0" -} diff --git a/node_modules/bl/.jshintrc b/node_modules/bl/.jshintrc deleted file mode 100644 index c8ef3ca4..00000000 --- a/node_modules/bl/.jshintrc +++ /dev/null @@ -1,59 +0,0 @@ -{ - "predef": [ ] - , "bitwise": false - , "camelcase": false - , "curly": false - , "eqeqeq": false - , "forin": false - , "immed": false - , "latedef": false - , "noarg": true - , "noempty": true - , "nonew": true - , "plusplus": false - , "quotmark": true - , "regexp": false - , "undef": true - , "unused": true - , "strict": false - , "trailing": true - , "maxlen": 120 - , "asi": true - , "boss": true - , "debug": true - , "eqnull": true - , "esnext": true - , "evil": true - , "expr": true - , "funcscope": false - , "globalstrict": false - , "iterator": false - , "lastsemic": true - , "laxbreak": true - , "laxcomma": true - , "loopfunc": true - , "multistr": false - , "onecase": false - , "proto": false - , "regexdash": false - , "scripturl": true - , "smarttabs": false - , "shadow": false - , "sub": true - , "supernew": false - , "validthis": true - , "browser": true - , "couch": false - , "devel": false - , "dojo": false - , "mootools": false - , "node": true - , "nonstandard": true - , "prototypejs": false - , "rhino": false - , "worker": true - , "wsh": false - , "nomen": false - , "onevar": false - , "passfail": false -} \ No newline at end of file diff --git a/node_modules/bl/.npmignore b/node_modules/bl/.npmignore deleted file mode 100644 index 40b878db..00000000 --- a/node_modules/bl/.npmignore +++ /dev/null @@ -1 +0,0 @@ -node_modules/ \ No newline at end of file diff --git a/node_modules/bl/.travis.yml b/node_modules/bl/.travis.yml deleted file mode 100644 index 5cb0480b..00000000 --- a/node_modules/bl/.travis.yml +++ /dev/null @@ -1,13 +0,0 @@ -sudo: false -language: node_js -node_js: - - '0.10' - - '0.12' - - '4' - - '5' -branches: - only: - - master -notifications: - email: - - rod@vagg.org diff --git a/node_modules/bl/LICENSE.md b/node_modules/bl/LICENSE.md deleted file mode 100644 index ccb24797..00000000 --- a/node_modules/bl/LICENSE.md +++ /dev/null @@ -1,13 +0,0 @@ -The MIT License (MIT) -===================== - -Copyright (c) 2014 bl contributors ----------------------------------- - -*bl contributors listed at * - -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/node_modules/bl/README.md b/node_modules/bl/README.md deleted file mode 100644 index f7044db2..00000000 --- a/node_modules/bl/README.md +++ /dev/null @@ -1,200 +0,0 @@ -# bl *(BufferList)* - -[![Build Status](https://travis-ci.org/rvagg/bl.svg?branch=master)](https://travis-ci.org/rvagg/bl) - -**A Node.js Buffer list collector, reader and streamer thingy.** - -[![NPM](https://nodei.co/npm/bl.png?downloads=true&downloadRank=true)](https://nodei.co/npm/bl/) -[![NPM](https://nodei.co/npm-dl/bl.png?months=6&height=3)](https://nodei.co/npm/bl/) - -**bl** is a storage object for collections of Node Buffers, exposing them with the main Buffer readable API. Also works as a duplex stream so you can collect buffers from a stream that emits them and emit buffers to a stream that consumes them! - -The original buffers are kept intact and copies are only done as necessary. Any reads that require the use of a single original buffer will return a slice of that buffer only (which references the same memory as the original buffer). Reads that span buffers perform concatenation as required and return the results transparently. - -```js -const BufferList = require('bl') - -var bl = new BufferList() -bl.append(new Buffer('abcd')) -bl.append(new Buffer('efg')) -bl.append('hi') // bl will also accept & convert Strings -bl.append(new Buffer('j')) -bl.append(new Buffer([ 0x3, 0x4 ])) - -console.log(bl.length) // 12 - -console.log(bl.slice(0, 10).toString('ascii')) // 'abcdefghij' -console.log(bl.slice(3, 10).toString('ascii')) // 'defghij' -console.log(bl.slice(3, 6).toString('ascii')) // 'def' -console.log(bl.slice(3, 8).toString('ascii')) // 'defgh' -console.log(bl.slice(5, 10).toString('ascii')) // 'fghij' - -// or just use toString! -console.log(bl.toString()) // 'abcdefghij\u0003\u0004' -console.log(bl.toString('ascii', 3, 8)) // 'defgh' -console.log(bl.toString('ascii', 5, 10)) // 'fghij' - -// other standard Buffer readables -console.log(bl.readUInt16BE(10)) // 0x0304 -console.log(bl.readUInt16LE(10)) // 0x0403 -``` - -Give it a callback in the constructor and use it just like **[concat-stream](https://github.com/maxogden/node-concat-stream)**: - -```js -const bl = require('bl') - , fs = require('fs') - -fs.createReadStream('README.md') - .pipe(bl(function (err, data) { // note 'new' isn't strictly required - // `data` is a complete Buffer object containing the full data - console.log(data.toString()) - })) -``` - -Note that when you use the *callback* method like this, the resulting `data` parameter is a concatenation of all `Buffer` objects in the list. If you want to avoid the overhead of this concatenation (in cases of extreme performance consciousness), then avoid the *callback* method and just listen to `'end'` instead, like a standard Stream. - -Or to fetch a URL using [hyperquest](https://github.com/substack/hyperquest) (should work with [request](http://github.com/mikeal/request) and even plain Node http too!): -```js -const hyperquest = require('hyperquest') - , bl = require('bl') - , url = 'https://raw.github.com/rvagg/bl/master/README.md' - -hyperquest(url).pipe(bl(function (err, data) { - console.log(data.toString()) -})) -``` - -Or, use it as a readable stream to recompose a list of Buffers to an output source: - -```js -const BufferList = require('bl') - , fs = require('fs') - -var bl = new BufferList() -bl.append(new Buffer('abcd')) -bl.append(new Buffer('efg')) -bl.append(new Buffer('hi')) -bl.append(new Buffer('j')) - -bl.pipe(fs.createWriteStream('gibberish.txt')) -``` - -## API - - * new BufferList([ callback ]) - * bl.length - * bl.append(buffer) - * bl.get(index) - * bl.slice([ start[, end ] ]) - * bl.copy(dest, [ destStart, [ srcStart [, srcEnd ] ] ]) - * bl.duplicate() - * bl.consume(bytes) - * bl.toString([encoding, [ start, [ end ]]]) - * bl.readDoubleBE(), bl.readDoubleLE(), bl.readFloatBE(), bl.readFloatLE(), bl.readInt32BE(), bl.readInt32LE(), bl.readUInt32BE(), bl.readUInt32LE(), bl.readInt16BE(), bl.readInt16LE(), bl.readUInt16BE(), bl.readUInt16LE(), bl.readInt8(), bl.readUInt8() - * Streams - --------------------------------------------------------- - -### new BufferList([ callback | Buffer | Buffer array | BufferList | BufferList array | String ]) -The constructor takes an optional callback, if supplied, the callback will be called with an error argument followed by a reference to the **bl** instance, when `bl.end()` is called (i.e. from a piped stream). This is a convenient method of collecting the entire contents of a stream, particularly when the stream is *chunky*, such as a network stream. - -Normally, no arguments are required for the constructor, but you can initialise the list by passing in a single `Buffer` object or an array of `Buffer` object. - -`new` is not strictly required, if you don't instantiate a new object, it will be done automatically for you so you can create a new instance simply with: - -```js -var bl = require('bl') -var myinstance = bl() - -// equivilant to: - -var BufferList = require('bl') -var myinstance = new BufferList() -``` - --------------------------------------------------------- - -### bl.length -Get the length of the list in bytes. This is the sum of the lengths of all of the buffers contained in the list, minus any initial offset for a semi-consumed buffer at the beginning. Should accurately represent the total number of bytes that can be read from the list. - --------------------------------------------------------- - -### bl.append(Buffer | Buffer array | BufferList | BufferList array | String) -`append(buffer)` adds an additional buffer or BufferList to the internal list. `this` is returned so it can be chained. - --------------------------------------------------------- - -### bl.get(index) -`get()` will return the byte at the specified index. - --------------------------------------------------------- - -### bl.slice([ start, [ end ] ]) -`slice()` returns a new `Buffer` object containing the bytes within the range specified. Both `start` and `end` are optional and will default to the beginning and end of the list respectively. - -If the requested range spans a single internal buffer then a slice of that buffer will be returned which shares the original memory range of that Buffer. If the range spans multiple buffers then copy operations will likely occur to give you a uniform Buffer. - --------------------------------------------------------- - -### bl.copy(dest, [ destStart, [ srcStart [, srcEnd ] ] ]) -`copy()` copies the content of the list in the `dest` buffer, starting from `destStart` and containing the bytes within the range specified with `srcStart` to `srcEnd`. `destStart`, `start` and `end` are optional and will default to the beginning of the `dest` buffer, and the beginning and end of the list respectively. - --------------------------------------------------------- - -### bl.duplicate() -`duplicate()` performs a **shallow-copy** of the list. The internal Buffers remains the same, so if you change the underlying Buffers, the change will be reflected in both the original and the duplicate. This method is needed if you want to call `consume()` or `pipe()` and still keep the original list.Example: - -```js -var bl = new BufferList() - -bl.append('hello') -bl.append(' world') -bl.append('\n') - -bl.duplicate().pipe(process.stdout, { end: false }) - -console.log(bl.toString()) -``` - --------------------------------------------------------- - -### bl.consume(bytes) -`consume()` will shift bytes *off the start of the list*. The number of bytes consumed don't need to line up with the sizes of the internal Buffers—initial offsets will be calculated accordingly in order to give you a consistent view of the data. - --------------------------------------------------------- - -### bl.toString([encoding, [ start, [ end ]]]) -`toString()` will return a string representation of the buffer. The optional `start` and `end` arguments are passed on to `slice()`, while the `encoding` is passed on to `toString()` of the resulting Buffer. See the [Buffer#toString()](http://nodejs.org/docs/latest/api/buffer.html#buffer_buf_tostring_encoding_start_end) documentation for more information. - --------------------------------------------------------- - -### bl.readDoubleBE(), bl.readDoubleLE(), bl.readFloatBE(), bl.readFloatLE(), bl.readInt32BE(), bl.readInt32LE(), bl.readUInt32BE(), bl.readUInt32LE(), bl.readInt16BE(), bl.readInt16LE(), bl.readUInt16BE(), bl.readUInt16LE(), bl.readInt8(), bl.readUInt8() - -All of the standard byte-reading methods of the `Buffer` interface are implemented and will operate across internal Buffer boundaries transparently. - -See the [Buffer](http://nodejs.org/docs/latest/api/buffer.html) documentation for how these work. - --------------------------------------------------------- - -### Streams -**bl** is a Node **[Duplex Stream](http://nodejs.org/docs/latest/api/stream.html#stream_class_stream_duplex)**, so it can be read from and written to like a standard Node stream. You can also `pipe()` to and from a **bl** instance. - --------------------------------------------------------- - -## Contributors - -**bl** is brought to you by the following hackers: - - * [Rod Vagg](https://github.com/rvagg) - * [Matteo Collina](https://github.com/mcollina) - * [Jarett Cruger](https://github.com/jcrugzz) - -======= - - -## License & copyright - -Copyright (c) 2013-2014 bl contributors (listed above). - -bl is licensed under the MIT license. All rights not explicitly granted in the MIT license are reserved. See the included LICENSE.md file for more details. diff --git a/node_modules/bl/bl.js b/node_modules/bl/bl.js deleted file mode 100644 index f585df17..00000000 --- a/node_modules/bl/bl.js +++ /dev/null @@ -1,243 +0,0 @@ -var DuplexStream = require('readable-stream/duplex') - , util = require('util') - - -function BufferList (callback) { - if (!(this instanceof BufferList)) - return new BufferList(callback) - - this._bufs = [] - this.length = 0 - - if (typeof callback == 'function') { - this._callback = callback - - var piper = function piper (err) { - if (this._callback) { - this._callback(err) - this._callback = null - } - }.bind(this) - - this.on('pipe', function onPipe (src) { - src.on('error', piper) - }) - this.on('unpipe', function onUnpipe (src) { - src.removeListener('error', piper) - }) - } else { - this.append(callback) - } - - DuplexStream.call(this) -} - - -util.inherits(BufferList, DuplexStream) - - -BufferList.prototype._offset = function _offset (offset) { - var tot = 0, i = 0, _t - for (; i < this._bufs.length; i++) { - _t = tot + this._bufs[i].length - if (offset < _t) - return [ i, offset - tot ] - tot = _t - } -} - - -BufferList.prototype.append = function append (buf) { - var i = 0 - , newBuf - - if (Array.isArray(buf)) { - for (; i < buf.length; i++) - this.append(buf[i]) - } else if (buf instanceof BufferList) { - // unwrap argument into individual BufferLists - for (; i < buf._bufs.length; i++) - this.append(buf._bufs[i]) - } else if (buf != null) { - // coerce number arguments to strings, since Buffer(number) does - // uninitialized memory allocation - if (typeof buf == 'number') - buf = buf.toString() - - newBuf = Buffer.isBuffer(buf) ? buf : new Buffer(buf) - this._bufs.push(newBuf) - this.length += newBuf.length - } - - return this -} - - -BufferList.prototype._write = function _write (buf, encoding, callback) { - this.append(buf) - - if (typeof callback == 'function') - callback() -} - - -BufferList.prototype._read = function _read (size) { - if (!this.length) - return this.push(null) - - size = Math.min(size, this.length) - this.push(this.slice(0, size)) - this.consume(size) -} - - -BufferList.prototype.end = function end (chunk) { - DuplexStream.prototype.end.call(this, chunk) - - if (this._callback) { - this._callback(null, this.slice()) - this._callback = null - } -} - - -BufferList.prototype.get = function get (index) { - return this.slice(index, index + 1)[0] -} - - -BufferList.prototype.slice = function slice (start, end) { - return this.copy(null, 0, start, end) -} - - -BufferList.prototype.copy = function copy (dst, dstStart, srcStart, srcEnd) { - if (typeof srcStart != 'number' || srcStart < 0) - srcStart = 0 - if (typeof srcEnd != 'number' || srcEnd > this.length) - srcEnd = this.length - if (srcStart >= this.length) - return dst || new Buffer(0) - if (srcEnd <= 0) - return dst || new Buffer(0) - - var copy = !!dst - , off = this._offset(srcStart) - , len = srcEnd - srcStart - , bytes = len - , bufoff = (copy && dstStart) || 0 - , start = off[1] - , l - , i - - // copy/slice everything - if (srcStart === 0 && srcEnd == this.length) { - if (!copy) // slice, just return a full concat - return Buffer.concat(this._bufs) - - // copy, need to copy individual buffers - for (i = 0; i < this._bufs.length; i++) { - this._bufs[i].copy(dst, bufoff) - bufoff += this._bufs[i].length - } - - return dst - } - - // easy, cheap case where it's a subset of one of the buffers - if (bytes <= this._bufs[off[0]].length - start) { - return copy - ? this._bufs[off[0]].copy(dst, dstStart, start, start + bytes) - : this._bufs[off[0]].slice(start, start + bytes) - } - - if (!copy) // a slice, we need something to copy in to - dst = new Buffer(len) - - for (i = off[0]; i < this._bufs.length; i++) { - l = this._bufs[i].length - start - - if (bytes > l) { - this._bufs[i].copy(dst, bufoff, start) - } else { - this._bufs[i].copy(dst, bufoff, start, start + bytes) - break - } - - bufoff += l - bytes -= l - - if (start) - start = 0 - } - - return dst -} - -BufferList.prototype.toString = function toString (encoding, start, end) { - return this.slice(start, end).toString(encoding) -} - -BufferList.prototype.consume = function consume (bytes) { - while (this._bufs.length) { - if (bytes >= this._bufs[0].length) { - bytes -= this._bufs[0].length - this.length -= this._bufs[0].length - this._bufs.shift() - } else { - this._bufs[0] = this._bufs[0].slice(bytes) - this.length -= bytes - break - } - } - return this -} - - -BufferList.prototype.duplicate = function duplicate () { - var i = 0 - , copy = new BufferList() - - for (; i < this._bufs.length; i++) - copy.append(this._bufs[i]) - - return copy -} - - -BufferList.prototype.destroy = function destroy () { - this._bufs.length = 0 - this.length = 0 - this.push(null) -} - - -;(function () { - var methods = { - 'readDoubleBE' : 8 - , 'readDoubleLE' : 8 - , 'readFloatBE' : 4 - , 'readFloatLE' : 4 - , 'readInt32BE' : 4 - , 'readInt32LE' : 4 - , 'readUInt32BE' : 4 - , 'readUInt32LE' : 4 - , 'readInt16BE' : 2 - , 'readInt16LE' : 2 - , 'readUInt16BE' : 2 - , 'readUInt16LE' : 2 - , 'readInt8' : 1 - , 'readUInt8' : 1 - } - - for (var m in methods) { - (function (m) { - BufferList.prototype[m] = function (offset) { - return this.slice(offset, offset + methods[m])[m](0) - } - }(m)) - } -}()) - - -module.exports = BufferList diff --git a/node_modules/bl/node_modules/isarray/.npmignore b/node_modules/bl/node_modules/isarray/.npmignore deleted file mode 100644 index 3c3629e6..00000000 --- a/node_modules/bl/node_modules/isarray/.npmignore +++ /dev/null @@ -1 +0,0 @@ -node_modules diff --git a/node_modules/bl/node_modules/isarray/.travis.yml b/node_modules/bl/node_modules/isarray/.travis.yml deleted file mode 100644 index cc4dba29..00000000 --- a/node_modules/bl/node_modules/isarray/.travis.yml +++ /dev/null @@ -1,4 +0,0 @@ -language: node_js -node_js: - - "0.8" - - "0.10" diff --git a/node_modules/bl/node_modules/isarray/Makefile b/node_modules/bl/node_modules/isarray/Makefile deleted file mode 100644 index 787d56e1..00000000 --- a/node_modules/bl/node_modules/isarray/Makefile +++ /dev/null @@ -1,6 +0,0 @@ - -test: - @node_modules/.bin/tape test.js - -.PHONY: test - diff --git a/node_modules/bl/node_modules/isarray/README.md b/node_modules/bl/node_modules/isarray/README.md deleted file mode 100644 index 16d2c59c..00000000 --- a/node_modules/bl/node_modules/isarray/README.md +++ /dev/null @@ -1,60 +0,0 @@ - -# isarray - -`Array#isArray` for older browsers. - -[![build status](https://secure.travis-ci.org/juliangruber/isarray.svg)](http://travis-ci.org/juliangruber/isarray) -[![downloads](https://img.shields.io/npm/dm/isarray.svg)](https://www.npmjs.org/package/isarray) - -[![browser support](https://ci.testling.com/juliangruber/isarray.png) -](https://ci.testling.com/juliangruber/isarray) - -## Usage - -```js -var isArray = require('isarray'); - -console.log(isArray([])); // => true -console.log(isArray({})); // => false -``` - -## Installation - -With [npm](http://npmjs.org) do - -```bash -$ npm install isarray -``` - -Then bundle for the browser with -[browserify](https://github.com/substack/browserify). - -With [component](http://component.io) do - -```bash -$ component install juliangruber/isarray -``` - -## License - -(MIT) - -Copyright (c) 2013 Julian Gruber <julian@juliangruber.com> - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies -of the Software, and to permit persons to whom the Software is furnished to do -so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/node_modules/bl/node_modules/isarray/component.json b/node_modules/bl/node_modules/isarray/component.json deleted file mode 100644 index 9e31b683..00000000 --- a/node_modules/bl/node_modules/isarray/component.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "name" : "isarray", - "description" : "Array#isArray for older browsers", - "version" : "0.0.1", - "repository" : "juliangruber/isarray", - "homepage": "https://github.com/juliangruber/isarray", - "main" : "index.js", - "scripts" : [ - "index.js" - ], - "dependencies" : {}, - "keywords": ["browser","isarray","array"], - "author": { - "name": "Julian Gruber", - "email": "mail@juliangruber.com", - "url": "http://juliangruber.com" - }, - "license": "MIT" -} diff --git a/node_modules/bl/node_modules/isarray/index.js b/node_modules/bl/node_modules/isarray/index.js deleted file mode 100644 index a57f6349..00000000 --- a/node_modules/bl/node_modules/isarray/index.js +++ /dev/null @@ -1,5 +0,0 @@ -var toString = {}.toString; - -module.exports = Array.isArray || function (arr) { - return toString.call(arr) == '[object Array]'; -}; diff --git a/node_modules/bl/node_modules/isarray/package.json b/node_modules/bl/node_modules/isarray/package.json deleted file mode 100644 index 48a419c2..00000000 --- a/node_modules/bl/node_modules/isarray/package.json +++ /dev/null @@ -1,105 +0,0 @@ -{ - "_args": [ - [ - { - "raw": "isarray@~1.0.0", - "scope": null, - "escapedName": "isarray", - "name": "isarray", - "rawSpec": "~1.0.0", - "spec": ">=1.0.0 <1.1.0", - "type": "range" - }, - "/Users/benjaminarias/Desktop/poly/node_modules/bl/node_modules/readable-stream" - ] - ], - "_from": "isarray@>=1.0.0 <1.1.0", - "_id": "isarray@1.0.0", - "_inCache": true, - "_installable": true, - "_location": "/bl/isarray", - "_nodeVersion": "5.1.0", - "_npmUser": { - "name": "juliangruber", - "email": "julian@juliangruber.com" - }, - "_npmVersion": "3.3.12", - "_phantomChildren": {}, - "_requested": { - "raw": "isarray@~1.0.0", - "scope": null, - "escapedName": "isarray", - "name": "isarray", - "rawSpec": "~1.0.0", - "spec": ">=1.0.0 <1.1.0", - "type": "range" - }, - "_requiredBy": [ - "/bl/readable-stream" - ], - "_resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", - "_shasum": "bb935d48582cba168c06834957a54a3e07124f11", - "_shrinkwrap": null, - "_spec": "isarray@~1.0.0", - "_where": "/Users/benjaminarias/Desktop/poly/node_modules/bl/node_modules/readable-stream", - "author": { - "name": "Julian Gruber", - "email": "mail@juliangruber.com", - "url": "http://juliangruber.com" - }, - "bugs": { - "url": "https://github.com/juliangruber/isarray/issues" - }, - "dependencies": {}, - "description": "Array#isArray for older browsers", - "devDependencies": { - "tape": "~2.13.4" - }, - "directories": {}, - "dist": { - "shasum": "bb935d48582cba168c06834957a54a3e07124f11", - "tarball": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz" - }, - "gitHead": "2a23a281f369e9ae06394c0fb4d2381355a6ba33", - "homepage": "https://github.com/juliangruber/isarray", - "keywords": [ - "browser", - "isarray", - "array" - ], - "license": "MIT", - "main": "index.js", - "maintainers": [ - { - "name": "juliangruber", - "email": "julian@juliangruber.com" - } - ], - "name": "isarray", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git://github.com/juliangruber/isarray.git" - }, - "scripts": { - "test": "tape test.js" - }, - "testling": { - "files": "test.js", - "browsers": [ - "ie/8..latest", - "firefox/17..latest", - "firefox/nightly", - "chrome/22..latest", - "chrome/canary", - "opera/12..latest", - "opera/next", - "safari/5.1..latest", - "ipad/6.0..latest", - "iphone/6.0..latest", - "android-browser/4.2..latest" - ] - }, - "version": "1.0.0" -} diff --git a/node_modules/bl/node_modules/isarray/test.js b/node_modules/bl/node_modules/isarray/test.js deleted file mode 100644 index e0c3444d..00000000 --- a/node_modules/bl/node_modules/isarray/test.js +++ /dev/null @@ -1,20 +0,0 @@ -var isArray = require('./'); -var test = require('tape'); - -test('is array', function(t){ - t.ok(isArray([])); - t.notOk(isArray({})); - t.notOk(isArray(null)); - t.notOk(isArray(false)); - - var obj = {}; - obj[0] = true; - t.notOk(isArray(obj)); - - var arr = []; - arr.foo = 'bar'; - t.ok(isArray(arr)); - - t.end(); -}); - diff --git a/node_modules/bl/node_modules/readable-stream/.npmignore b/node_modules/bl/node_modules/readable-stream/.npmignore deleted file mode 100644 index 38344f87..00000000 --- a/node_modules/bl/node_modules/readable-stream/.npmignore +++ /dev/null @@ -1,5 +0,0 @@ -build/ -test/ -examples/ -fs.js -zlib.js \ No newline at end of file diff --git a/node_modules/bl/node_modules/readable-stream/.travis.yml b/node_modules/bl/node_modules/readable-stream/.travis.yml deleted file mode 100644 index 1b821184..00000000 --- a/node_modules/bl/node_modules/readable-stream/.travis.yml +++ /dev/null @@ -1,52 +0,0 @@ -sudo: false -language: node_js -before_install: - - npm install -g npm@2 - - npm install -g npm -notifications: - email: false -matrix: - fast_finish: true - allow_failures: - - env: TASK=browser BROWSER_NAME=ipad BROWSER_VERSION="6.0..latest" - - env: TASK=browser BROWSER_NAME=iphone BROWSER_VERSION="6.0..latest" - include: - - node_js: '0.8' - env: TASK=test - - node_js: '0.10' - env: TASK=test - - node_js: '0.11' - env: TASK=test - - node_js: '0.12' - env: TASK=test - - node_js: 1 - env: TASK=test - - node_js: 2 - env: TASK=test - - node_js: 3 - env: TASK=test - - node_js: 4 - env: TASK=test - - node_js: 5 - env: TASK=test - - node_js: 5 - env: TASK=browser BROWSER_NAME=android BROWSER_VERSION="4.0..latest" - - node_js: 5 - env: TASK=browser BROWSER_NAME=ie BROWSER_VERSION="9..latest" - - node_js: 5 - env: TASK=browser BROWSER_NAME=opera BROWSER_VERSION="11..latest" - - node_js: 5 - env: TASK=browser BROWSER_NAME=chrome BROWSER_VERSION="-3..latest" - - node_js: 5 - env: TASK=browser BROWSER_NAME=firefox BROWSER_VERSION="-3..latest" - - node_js: 5 - env: TASK=browser BROWSER_NAME=ipad BROWSER_VERSION="6.0..latest" - - node_js: 5 - env: TASK=browser BROWSER_NAME=iphone BROWSER_VERSION="6.0..latest" - - node_js: 5 - env: TASK=browser BROWSER_NAME=safari BROWSER_VERSION="5..latest" -script: "npm run $TASK" -env: - global: - - secure: rE2Vvo7vnjabYNULNyLFxOyt98BoJexDqsiOnfiD6kLYYsiQGfr/sbZkPMOFm9qfQG7pjqx+zZWZjGSswhTt+626C0t/njXqug7Yps4c3dFblzGfreQHp7wNX5TFsvrxd6dAowVasMp61sJcRnB2w8cUzoe3RAYUDHyiHktwqMc= - - secure: g9YINaKAdMatsJ28G9jCGbSaguXCyxSTy+pBO6Ch0Cf57ZLOTka3HqDj8p3nV28LUIHZ3ut5WO43CeYKwt4AUtLpBS3a0dndHdY6D83uY6b2qh5hXlrcbeQTq2cvw2y95F7hm4D1kwrgZ7ViqaKggRcEupAL69YbJnxeUDKWEdI= diff --git a/node_modules/bl/node_modules/readable-stream/.zuul.yml b/node_modules/bl/node_modules/readable-stream/.zuul.yml deleted file mode 100644 index 96d9cfbd..00000000 --- a/node_modules/bl/node_modules/readable-stream/.zuul.yml +++ /dev/null @@ -1 +0,0 @@ -ui: tape diff --git a/node_modules/bl/node_modules/readable-stream/LICENSE b/node_modules/bl/node_modules/readable-stream/LICENSE deleted file mode 100644 index e3d4e695..00000000 --- a/node_modules/bl/node_modules/readable-stream/LICENSE +++ /dev/null @@ -1,18 +0,0 @@ -Copyright Joyent, Inc. and other Node contributors. All rights reserved. -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to -deal in the Software without restriction, including without limitation the -rights to use, copy, modify, merge, publish, distribute, sublicense, and/or -sell copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS -IN THE SOFTWARE. diff --git a/node_modules/bl/node_modules/readable-stream/README.md b/node_modules/bl/node_modules/readable-stream/README.md deleted file mode 100644 index 86b95a3b..00000000 --- a/node_modules/bl/node_modules/readable-stream/README.md +++ /dev/null @@ -1,36 +0,0 @@ -# readable-stream - -***Node-core v5.8.0 streams for userland*** [![Build Status](https://travis-ci.org/nodejs/readable-stream.svg?branch=master)](https://travis-ci.org/nodejs/readable-stream) - - -[![NPM](https://nodei.co/npm/readable-stream.png?downloads=true&downloadRank=true)](https://nodei.co/npm/readable-stream/) -[![NPM](https://nodei.co/npm-dl/readable-stream.png?&months=6&height=3)](https://nodei.co/npm/readable-stream/) - - -[![Sauce Test Status](https://saucelabs.com/browser-matrix/readable-stream.svg)](https://saucelabs.com/u/readable-stream) - -```bash -npm install --save readable-stream -``` - -***Node-core streams for userland*** - -This package is a mirror of the Streams2 and Streams3 implementations in -Node-core, including [documentation](doc/stream.markdown). - -If you want to guarantee a stable streams base, regardless of what version of -Node you, or the users of your libraries are using, use **readable-stream** *only* and avoid the *"stream"* module in Node-core, for background see [this blogpost](http://r.va.gg/2014/06/why-i-dont-use-nodes-core-stream-module.html). - -As of version 2.0.0 **readable-stream** uses semantic versioning. - -# Streams WG Team Members - -* **Chris Dickinson** ([@chrisdickinson](https://github.com/chrisdickinson)) <christopher.s.dickinson@gmail.com> - - Release GPG key: 9554F04D7259F04124DE6B476D5A82AC7E37093B -* **Calvin Metcalf** ([@calvinmetcalf](https://github.com/calvinmetcalf)) <calvin.metcalf@gmail.com> - - Release GPG key: F3EF5F62A87FC27A22E643F714CE4FF5015AA242 -* **Rod Vagg** ([@rvagg](https://github.com/rvagg)) <rod@vagg.org> - - Release GPG key: DD8F2338BAE7501E3DD5AC78C273792F7D83545D -* **Sam Newman** ([@sonewman](https://github.com/sonewman)) <newmansam@outlook.com> -* **Mathias Buus** ([@mafintosh](https://github.com/mafintosh)) <mathiasbuus@gmail.com> -* **Domenic Denicola** ([@domenic](https://github.com/domenic)) <d@domenic.me> diff --git a/node_modules/bl/node_modules/readable-stream/doc/stream.markdown b/node_modules/bl/node_modules/readable-stream/doc/stream.markdown deleted file mode 100644 index 0bc3819e..00000000 --- a/node_modules/bl/node_modules/readable-stream/doc/stream.markdown +++ /dev/null @@ -1,1760 +0,0 @@ -# Stream - - Stability: 2 - Stable - -A stream is an abstract interface implemented by various objects in -Node.js. For example a [request to an HTTP server][http-incoming-message] is a -stream, as is [`process.stdout`][]. Streams are readable, writable, or both. All -streams are instances of [`EventEmitter`][]. - -You can load the Stream base classes by doing `require('stream')`. -There are base classes provided for [Readable][] streams, [Writable][] -streams, [Duplex][] streams, and [Transform][] streams. - -This document is split up into 3 sections: - -1. The first section explains the parts of the API that you need to be - aware of to use streams in your programs. -2. The second section explains the parts of the API that you need to - use if you implement your own custom streams yourself. The API is designed to - make this easy for you to do. -3. The third section goes into more depth about how streams work, - including some of the internal mechanisms and functions that you - should probably not modify unless you definitely know what you are - doing. - - -## API for Stream Consumers - - - -Streams can be either [Readable][], [Writable][], or both ([Duplex][]). - -All streams are EventEmitters, but they also have other custom methods -and properties depending on whether they are Readable, Writable, or -Duplex. - -If a stream is both Readable and Writable, then it implements all of -the methods and events. So, a [Duplex][] or [Transform][] stream is -fully described by this API, though their implementation may be -somewhat different. - -It is not necessary to implement Stream interfaces in order to consume -streams in your programs. If you **are** implementing streaming -interfaces in your own program, please also refer to -[API for Stream Implementors][]. - -Almost all Node.js programs, no matter how simple, use Streams in some -way. Here is an example of using Streams in an Node.js program: - -```js -const http = require('http'); - -var server = http.createServer( (req, res) => { - // req is an http.IncomingMessage, which is a Readable Stream - // res is an http.ServerResponse, which is a Writable Stream - - var body = ''; - // we want to get the data as utf8 strings - // If you don't set an encoding, then you'll get Buffer objects - req.setEncoding('utf8'); - - // Readable streams emit 'data' events once a listener is added - req.on('data', (chunk) => { - body += chunk; - }); - - // the end event tells you that you have entire body - req.on('end', () => { - try { - var data = JSON.parse(body); - } catch (er) { - // uh oh! bad json! - res.statusCode = 400; - return res.end(`error: ${er.message}`); - } - - // write back something interesting to the user: - res.write(typeof data); - res.end(); - }); -}); - -server.listen(1337); - -// $ curl localhost:1337 -d '{}' -// object -// $ curl localhost:1337 -d '"foo"' -// string -// $ curl localhost:1337 -d 'not json' -// error: Unexpected token o -``` - -### Class: stream.Duplex - -Duplex streams are streams that implement both the [Readable][] and -[Writable][] interfaces. - -Examples of Duplex streams include: - -* [TCP sockets][] -* [zlib streams][zlib] -* [crypto streams][crypto] - -### Class: stream.Readable - - - -The Readable stream interface is the abstraction for a *source* of -data that you are reading from. In other words, data comes *out* of a -Readable stream. - -A Readable stream will not start emitting data until you indicate that -you are ready to receive it. - -Readable streams have two "modes": a **flowing mode** and a **paused -mode**. When in flowing mode, data is read from the underlying system -and provided to your program as fast as possible. In paused mode, you -must explicitly call [`stream.read()`][stream-read] to get chunks of data out. -Streams start out in paused mode. - -**Note**: If no data event handlers are attached, and there are no -[`stream.pipe()`][] destinations, and the stream is switched into flowing -mode, then data will be lost. - -You can switch to flowing mode by doing any of the following: - -* Adding a [`'data'`][] event handler to listen for data. -* Calling the [`stream.resume()`][stream-resume] method to explicitly open the - flow. -* Calling the [`stream.pipe()`][] method to send the data to a [Writable][]. - -You can switch back to paused mode by doing either of the following: - -* If there are no pipe destinations, by calling the - [`stream.pause()`][stream-pause] method. -* If there are pipe destinations, by removing any [`'data'`][] event - handlers, and removing all pipe destinations by calling the - [`stream.unpipe()`][] method. - -Note that, for backwards compatibility reasons, removing [`'data'`][] -event handlers will **not** automatically pause the stream. Also, if -there are piped destinations, then calling [`stream.pause()`][stream-pause] will -not guarantee that the stream will *remain* paused once those -destinations drain and ask for more data. - -Examples of readable streams include: - -* [HTTP responses, on the client][http-incoming-message] -* [HTTP requests, on the server][http-incoming-message] -* [fs read streams][] -* [zlib streams][zlib] -* [crypto streams][crypto] -* [TCP sockets][] -* [child process stdout and stderr][] -* [`process.stdin`][] - -#### Event: 'close' - -Emitted when the stream and any of its underlying resources (a file -descriptor, for example) have been closed. The event indicates that -no more events will be emitted, and no further computation will occur. - -Not all streams will emit the `'close'` event. - -#### Event: 'data' - -* `chunk` {Buffer|String} The chunk of data. - -Attaching a `'data'` event listener to a stream that has not been -explicitly paused will switch the stream into flowing mode. Data will -then be passed as soon as it is available. - -If you just want to get all the data out of the stream as fast as -possible, this is the best way to do so. - -```js -var readable = getReadableStreamSomehow(); -readable.on('data', (chunk) => { - console.log('got %d bytes of data', chunk.length); -}); -``` - -#### Event: 'end' - -This event fires when there will be no more data to read. - -Note that the `'end'` event **will not fire** unless the data is -completely consumed. This can be done by switching into flowing mode, -or by calling [`stream.read()`][stream-read] repeatedly until you get to the -end. - -```js -var readable = getReadableStreamSomehow(); -readable.on('data', (chunk) => { - console.log('got %d bytes of data', chunk.length); -}); -readable.on('end', () => { - console.log('there will be no more data.'); -}); -``` - -#### Event: 'error' - -* {Error Object} - -Emitted if there was an error receiving data. - -#### Event: 'readable' - -When a chunk of data can be read from the stream, it will emit a -`'readable'` event. - -In some cases, listening for a `'readable'` event will cause some data -to be read into the internal buffer from the underlying system, if it -hadn't already. - -```javascript -var readable = getReadableStreamSomehow(); -readable.on('readable', () => { - // there is some data to read now -}); -``` - -Once the internal buffer is drained, a `'readable'` event will fire -again when more data is available. - -The `'readable'` event is not emitted in the "flowing" mode with the -sole exception of the last one, on end-of-stream. - -The `'readable'` event indicates that the stream has new information: -either new data is available or the end of the stream has been reached. -In the former case, [`stream.read()`][stream-read] will return that data. In the -latter case, [`stream.read()`][stream-read] will return null. For instance, in -the following example, `foo.txt` is an empty file: - -```js -const fs = require('fs'); -var rr = fs.createReadStream('foo.txt'); -rr.on('readable', () => { - console.log('readable:', rr.read()); -}); -rr.on('end', () => { - console.log('end'); -}); -``` - -The output of running this script is: - -``` -$ node test.js -readable: null -end -``` - -#### readable.isPaused() - -* Return: {Boolean} - -This method returns whether or not the `readable` has been **explicitly** -paused by client code (using [`stream.pause()`][stream-pause] without a -corresponding [`stream.resume()`][stream-resume]). - -```js -var readable = new stream.Readable - -readable.isPaused() // === false -readable.pause() -readable.isPaused() // === true -readable.resume() -readable.isPaused() // === false -``` - -#### readable.pause() - -* Return: `this` - -This method will cause a stream in flowing mode to stop emitting -[`'data'`][] events, switching out of flowing mode. Any data that becomes -available will remain in the internal buffer. - -```js -var readable = getReadableStreamSomehow(); -readable.on('data', (chunk) => { - console.log('got %d bytes of data', chunk.length); - readable.pause(); - console.log('there will be no more data for 1 second'); - setTimeout(() => { - console.log('now data will start flowing again'); - readable.resume(); - }, 1000); -}); -``` - -#### readable.pipe(destination[, options]) - -* `destination` {stream.Writable} The destination for writing data -* `options` {Object} Pipe options - * `end` {Boolean} End the writer when the reader ends. Default = `true` - -This method pulls all the data out of a readable stream, and writes it -to the supplied destination, automatically managing the flow so that -the destination is not overwhelmed by a fast readable stream. - -Multiple destinations can be piped to safely. - -```js -var readable = getReadableStreamSomehow(); -var writable = fs.createWriteStream('file.txt'); -// All the data from readable goes into 'file.txt' -readable.pipe(writable); -``` - -This function returns the destination stream, so you can set up pipe -chains like so: - -```js -var r = fs.createReadStream('file.txt'); -var z = zlib.createGzip(); -var w = fs.createWriteStream('file.txt.gz'); -r.pipe(z).pipe(w); -``` - -For example, emulating the Unix `cat` command: - -```js -process.stdin.pipe(process.stdout); -``` - -By default [`stream.end()`][stream-end] is called on the destination when the -source stream emits [`'end'`][], so that `destination` is no longer writable. -Pass `{ end: false }` as `options` to keep the destination stream open. - -This keeps `writer` open so that "Goodbye" can be written at the -end. - -```js -reader.pipe(writer, { end: false }); -reader.on('end', () => { - writer.end('Goodbye\n'); -}); -``` - -Note that [`process.stderr`][] and [`process.stdout`][] are never closed until -the process exits, regardless of the specified options. - -#### readable.read([size]) - -* `size` {Number} Optional argument to specify how much data to read. -* Return {String|Buffer|Null} - -The `read()` method pulls some data out of the internal buffer and -returns it. If there is no data available, then it will return -`null`. - -If you pass in a `size` argument, then it will return that many -bytes. If `size` bytes are not available, then it will return `null`, -unless we've ended, in which case it will return the data remaining -in the buffer. - -If you do not specify a `size` argument, then it will return all the -data in the internal buffer. - -This method should only be called in paused mode. In flowing mode, -this method is called automatically until the internal buffer is -drained. - -```js -var readable = getReadableStreamSomehow(); -readable.on('readable', () => { - var chunk; - while (null !== (chunk = readable.read())) { - console.log('got %d bytes of data', chunk.length); - } -}); -``` - -If this method returns a data chunk, then it will also trigger the -emission of a [`'data'`][] event. - -Note that calling [`stream.read([size])`][stream-read] after the [`'end'`][] -event has been triggered will return `null`. No runtime error will be raised. - -#### readable.resume() - -* Return: `this` - -This method will cause the readable stream to resume emitting [`'data'`][] -events. - -This method will switch the stream into flowing mode. If you do *not* -want to consume the data from a stream, but you *do* want to get to -its [`'end'`][] event, you can call [`stream.resume()`][stream-resume] to open -the flow of data. - -```js -var readable = getReadableStreamSomehow(); -readable.resume(); -readable.on('end', () => { - console.log('got to the end, but did not read anything'); -}); -``` - -#### readable.setEncoding(encoding) - -* `encoding` {String} The encoding to use. -* Return: `this` - -Call this function to cause the stream to return strings of the specified -encoding instead of Buffer objects. For example, if you do -`readable.setEncoding('utf8')`, then the output data will be interpreted as -UTF-8 data, and returned as strings. If you do `readable.setEncoding('hex')`, -then the data will be encoded in hexadecimal string format. - -This properly handles multi-byte characters that would otherwise be -potentially mangled if you simply pulled the Buffers directly and -called [`buf.toString(encoding)`][] on them. If you want to read the data -as strings, always use this method. - -Also you can disable any encoding at all with `readable.setEncoding(null)`. -This approach is very useful if you deal with binary data or with large -multi-byte strings spread out over multiple chunks. - -```js -var readable = getReadableStreamSomehow(); -readable.setEncoding('utf8'); -readable.on('data', (chunk) => { - assert.equal(typeof chunk, 'string'); - console.log('got %d characters of string data', chunk.length); -}); -``` - -#### readable.unpipe([destination]) - -* `destination` {stream.Writable} Optional specific stream to unpipe - -This method will remove the hooks set up for a previous [`stream.pipe()`][] -call. - -If the destination is not specified, then all pipes are removed. - -If the destination is specified, but no pipe is set up for it, then -this is a no-op. - -```js -var readable = getReadableStreamSomehow(); -var writable = fs.createWriteStream('file.txt'); -// All the data from readable goes into 'file.txt', -// but only for the first second -readable.pipe(writable); -setTimeout(() => { - console.log('stop writing to file.txt'); - readable.unpipe(writable); - console.log('manually close the file stream'); - writable.end(); -}, 1000); -``` - -#### readable.unshift(chunk) - -* `chunk` {Buffer|String} Chunk of data to unshift onto the read queue - -This is useful in certain cases where a stream is being consumed by a -parser, which needs to "un-consume" some data that it has -optimistically pulled out of the source, so that the stream can be -passed on to some other party. - -Note that `stream.unshift(chunk)` cannot be called after the [`'end'`][] event -has been triggered; a runtime error will be raised. - -If you find that you must often call `stream.unshift(chunk)` in your -programs, consider implementing a [Transform][] stream instead. (See [API -for Stream Implementors][].) - -```js -// Pull off a header delimited by \n\n -// use unshift() if we get too much -// Call the callback with (error, header, stream) -const StringDecoder = require('string_decoder').StringDecoder; -function parseHeader(stream, callback) { - stream.on('error', callback); - stream.on('readable', onReadable); - var decoder = new StringDecoder('utf8'); - var header = ''; - function onReadable() { - var chunk; - while (null !== (chunk = stream.read())) { - var str = decoder.write(chunk); - if (str.match(/\n\n/)) { - // found the header boundary - var split = str.split(/\n\n/); - header += split.shift(); - var remaining = split.join('\n\n'); - var buf = new Buffer(remaining, 'utf8'); - if (buf.length) - stream.unshift(buf); - stream.removeListener('error', callback); - stream.removeListener('readable', onReadable); - // now the body of the message can be read from the stream. - callback(null, header, stream); - } else { - // still reading the header. - header += str; - } - } - } -} -``` - -Note that, unlike [`stream.push(chunk)`][stream-push], `stream.unshift(chunk)` -will not end the reading process by resetting the internal reading state of the -stream. This can cause unexpected results if `unshift()` is called during a -read (i.e. from within a [`stream._read()`][stream-_read] implementation on a -custom stream). Following the call to `unshift()` with an immediate -[`stream.push('')`][stream-push] will reset the reading state appropriately, -however it is best to simply avoid calling `unshift()` while in the process of -performing a read. - -#### readable.wrap(stream) - -* `stream` {Stream} An "old style" readable stream - -Versions of Node.js prior to v0.10 had streams that did not implement the -entire Streams API as it is today. (See [Compatibility][] for -more information.) - -If you are using an older Node.js library that emits [`'data'`][] events and -has a [`stream.pause()`][stream-pause] method that is advisory only, then you -can use the `wrap()` method to create a [Readable][] stream that uses the old -stream as its data source. - -You will very rarely ever need to call this function, but it exists -as a convenience for interacting with old Node.js programs and libraries. - -For example: - -```js -const OldReader = require('./old-api-module.js').OldReader; -const Readable = require('stream').Readable; -const oreader = new OldReader; -const myReader = new Readable().wrap(oreader); - -myReader.on('readable', () => { - myReader.read(); // etc. -}); -``` - -### Class: stream.Transform - -Transform streams are [Duplex][] streams where the output is in some way -computed from the input. They implement both the [Readable][] and -[Writable][] interfaces. - -Examples of Transform streams include: - -* [zlib streams][zlib] -* [crypto streams][crypto] - -### Class: stream.Writable - - - -The Writable stream interface is an abstraction for a *destination* -that you are writing data *to*. - -Examples of writable streams include: - -* [HTTP requests, on the client][] -* [HTTP responses, on the server][] -* [fs write streams][] -* [zlib streams][zlib] -* [crypto streams][crypto] -* [TCP sockets][] -* [child process stdin][] -* [`process.stdout`][], [`process.stderr`][] - -#### Event: 'drain' - -If a [`stream.write(chunk)`][stream-write] call returns `false`, then the -`'drain'` event will indicate when it is appropriate to begin writing more data -to the stream. - -```js -// Write the data to the supplied writable stream one million times. -// Be attentive to back-pressure. -function writeOneMillionTimes(writer, data, encoding, callback) { - var i = 1000000; - write(); - function write() { - var ok = true; - do { - i -= 1; - if (i === 0) { - // last time! - writer.write(data, encoding, callback); - } else { - // see if we should continue, or wait - // don't pass the callback, because we're not done yet. - ok = writer.write(data, encoding); - } - } while (i > 0 && ok); - if (i > 0) { - // had to stop early! - // write some more once it drains - writer.once('drain', write); - } - } -} -``` - -#### Event: 'error' - -* {Error} - -Emitted if there was an error when writing or piping data. - -#### Event: 'finish' - -When the [`stream.end()`][stream-end] method has been called, and all data has -been flushed to the underlying system, this event is emitted. - -```javascript -var writer = getWritableStreamSomehow(); -for (var i = 0; i < 100; i ++) { - writer.write('hello, #${i}!\n'); -} -writer.end('this is the end\n'); -writer.on('finish', () => { - console.error('all writes are now complete.'); -}); -``` - -#### Event: 'pipe' - -* `src` {stream.Readable} source stream that is piping to this writable - -This is emitted whenever the [`stream.pipe()`][] method is called on a readable -stream, adding this writable to its set of destinations. - -```js -var writer = getWritableStreamSomehow(); -var reader = getReadableStreamSomehow(); -writer.on('pipe', (src) => { - console.error('something is piping into the writer'); - assert.equal(src, reader); -}); -reader.pipe(writer); -``` - -#### Event: 'unpipe' - -* `src` {[Readable][] Stream} The source stream that - [unpiped][`stream.unpipe()`] this writable - -This is emitted whenever the [`stream.unpipe()`][] method is called on a -readable stream, removing this writable from its set of destinations. - -```js -var writer = getWritableStreamSomehow(); -var reader = getReadableStreamSomehow(); -writer.on('unpipe', (src) => { - console.error('something has stopped piping into the writer'); - assert.equal(src, reader); -}); -reader.pipe(writer); -reader.unpipe(writer); -``` - -#### writable.cork() - -Forces buffering of all writes. - -Buffered data will be flushed either at [`stream.uncork()`][] or at -[`stream.end()`][stream-end] call. - -#### writable.end([chunk][, encoding][, callback]) - -* `chunk` {String|Buffer} Optional data to write -* `encoding` {String} The encoding, if `chunk` is a String -* `callback` {Function} Optional callback for when the stream is finished - -Call this method when no more data will be written to the stream. If supplied, -the callback is attached as a listener on the [`'finish'`][] event. - -Calling [`stream.write()`][stream-write] after calling -[`stream.end()`][stream-end] will raise an error. - -```js -// write 'hello, ' and then end with 'world!' -var file = fs.createWriteStream('example.txt'); -file.write('hello, '); -file.end('world!'); -// writing more now is not allowed! -``` - -#### writable.setDefaultEncoding(encoding) - -* `encoding` {String} The new default encoding - -Sets the default encoding for a writable stream. - -#### writable.uncork() - -Flush all data, buffered since [`stream.cork()`][] call. - -#### writable.write(chunk[, encoding][, callback]) - -* `chunk` {String|Buffer} The data to write -* `encoding` {String} The encoding, if `chunk` is a String -* `callback` {Function} Callback for when this chunk of data is flushed -* Returns: {Boolean} `true` if the data was handled completely. - -This method writes some data to the underlying system, and calls the -supplied callback once the data has been fully handled. - -The return value indicates if you should continue writing right now. -If the data had to be buffered internally, then it will return -`false`. Otherwise, it will return `true`. - -This return value is strictly advisory. You MAY continue to write, -even if it returns `false`. However, writes will be buffered in -memory, so it is best not to do this excessively. Instead, wait for -the [`'drain'`][] event before writing more data. - - -## API for Stream Implementors - - - -To implement any sort of stream, the pattern is the same: - -1. Extend the appropriate parent class in your own subclass. (The - [`util.inherits()`][] method is particularly helpful for this.) -2. Call the appropriate parent class constructor in your constructor, - to be sure that the internal mechanisms are set up properly. -3. Implement one or more specific methods, as detailed below. - -The class to extend and the method(s) to implement depend on the sort -of stream class you are writing: - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-

Use-case

-
-

Class

-
-

Method(s) to implement

-
-

Reading only

-
-

[Readable](#stream_class_stream_readable_1)

-
-

[_read][stream-_read]

-
-

Writing only

-
-

[Writable](#stream_class_stream_writable_1)

-
-

[_write][stream-_write], [_writev][stream-_writev]

-
-

Reading and writing

-
-

[Duplex](#stream_class_stream_duplex_1)

-
-

[_read][stream-_read], [_write][stream-_write], [_writev][stream-_writev]

-
-

Operate on written data, then read the result

-
-

[Transform](#stream_class_stream_transform_1)

-
-

[_transform][stream-_transform], [_flush][stream-_flush]

-
- -In your implementation code, it is very important to never call the methods -described in [API for Stream Consumers][]. Otherwise, you can potentially cause -adverse side effects in programs that consume your streaming interfaces. - -### Class: stream.Duplex - - - -A "duplex" stream is one that is both Readable and Writable, such as a TCP -socket connection. - -Note that `stream.Duplex` is an abstract class designed to be extended -with an underlying implementation of the [`stream._read(size)`][stream-_read] -and [`stream._write(chunk, encoding, callback)`][stream-_write] methods as you -would with a Readable or Writable stream class. - -Since JavaScript doesn't have multiple prototypal inheritance, this class -prototypally inherits from Readable, and then parasitically from Writable. It is -thus up to the user to implement both the low-level -[`stream._read(n)`][stream-_read] method as well as the low-level -[`stream._write(chunk, encoding, callback)`][stream-_write] method on extension -duplex classes. - -#### new stream.Duplex(options) - -* `options` {Object} Passed to both Writable and Readable - constructors. Also has the following fields: - * `allowHalfOpen` {Boolean} Default = `true`. If set to `false`, then - the stream will automatically end the readable side when the - writable side ends and vice versa. - * `readableObjectMode` {Boolean} Default = `false`. Sets `objectMode` - for readable side of the stream. Has no effect if `objectMode` - is `true`. - * `writableObjectMode` {Boolean} Default = `false`. Sets `objectMode` - for writable side of the stream. Has no effect if `objectMode` - is `true`. - -In classes that extend the Duplex class, make sure to call the -constructor so that the buffering settings can be properly -initialized. - -### Class: stream.PassThrough - -This is a trivial implementation of a [Transform][] stream that simply -passes the input bytes across to the output. Its purpose is mainly -for examples and testing, but there are occasionally use cases where -it can come in handy as a building block for novel sorts of streams. - -### Class: stream.Readable - - - -`stream.Readable` is an abstract class designed to be extended with an -underlying implementation of the [`stream._read(size)`][stream-_read] method. - -Please see [API for Stream Consumers][] for how to consume -streams in your programs. What follows is an explanation of how to -implement Readable streams in your programs. - -#### new stream.Readable([options]) - -* `options` {Object} - * `highWaterMark` {Number} The maximum number of bytes to store in - the internal buffer before ceasing to read from the underlying - resource. Default = `16384` (16kb), or `16` for `objectMode` streams - * `encoding` {String} If specified, then buffers will be decoded to - strings using the specified encoding. Default = `null` - * `objectMode` {Boolean} Whether this stream should behave - as a stream of objects. Meaning that [`stream.read(n)`][stream-read] returns - a single value instead of a Buffer of size n. Default = `false` - * `read` {Function} Implementation for the [`stream._read()`][stream-_read] - method. - -In classes that extend the Readable class, make sure to call the -Readable constructor so that the buffering settings can be properly -initialized. - -#### readable.\_read(size) - -* `size` {Number} Number of bytes to read asynchronously - -Note: **Implement this method, but do NOT call it directly.** - -This method is prefixed with an underscore because it is internal to the -class that defines it and should only be called by the internal Readable -class methods. All Readable stream implementations must provide a \_read -method to fetch data from the underlying resource. - -When `_read()` is called, if data is available from the resource, the `_read()` -implementation should start pushing that data into the read queue by calling -[`this.push(dataChunk)`][stream-push]. `_read()` should continue reading from -the resource and pushing data until push returns `false`, at which point it -should stop reading from the resource. Only when `_read()` is called again after -it has stopped should it start reading more data from the resource and pushing -that data onto the queue. - -Note: once the `_read()` method is called, it will not be called again until -the [`stream.push()`][stream-push] method is called. - -The `size` argument is advisory. Implementations where a "read" is a -single call that returns data can use this to know how much data to -fetch. Implementations where that is not relevant, such as TCP or -TLS, may ignore this argument, and simply provide data whenever it -becomes available. There is no need, for example to "wait" until -`size` bytes are available before calling [`stream.push(chunk)`][stream-push]. - -#### readable.push(chunk[, encoding]) - - -* `chunk` {Buffer|Null|String} Chunk of data to push into the read queue -* `encoding` {String} Encoding of String chunks. Must be a valid - Buffer encoding, such as `'utf8'` or `'ascii'` -* return {Boolean} Whether or not more pushes should be performed - -Note: **This method should be called by Readable implementors, NOT -by consumers of Readable streams.** - -If a value other than null is passed, The `push()` method adds a chunk of data -into the queue for subsequent stream processors to consume. If `null` is -passed, it signals the end of the stream (EOF), after which no more data -can be written. - -The data added with `push()` can be pulled out by calling the -[`stream.read()`][stream-read] method when the [`'readable'`][] event fires. - -This API is designed to be as flexible as possible. For example, -you may be wrapping a lower-level source which has some sort of -pause/resume mechanism, and a data callback. In those cases, you -could wrap the low-level source object by doing something like this: - -```js -// source is an object with readStop() and readStart() methods, -// and an `ondata` member that gets called when it has data, and -// an `onend` member that gets called when the data is over. - -util.inherits(SourceWrapper, Readable); - -function SourceWrapper(options) { - Readable.call(this, options); - - this._source = getLowlevelSourceObject(); - - // Every time there's data, we push it into the internal buffer. - this._source.ondata = (chunk) => { - // if push() returns false, then we need to stop reading from source - if (!this.push(chunk)) - this._source.readStop(); - }; - - // When the source ends, we push the EOF-signaling `null` chunk - this._source.onend = () => { - this.push(null); - }; -} - -// _read will be called when the stream wants to pull more data in -// the advisory size argument is ignored in this case. -SourceWrapper.prototype._read = function(size) { - this._source.readStart(); -}; -``` - -#### Example: A Counting Stream - - - -This is a basic example of a Readable stream. It emits the numerals -from 1 to 1,000,000 in ascending order, and then ends. - -```js -const Readable = require('stream').Readable; -const util = require('util'); -util.inherits(Counter, Readable); - -function Counter(opt) { - Readable.call(this, opt); - this._max = 1000000; - this._index = 1; -} - -Counter.prototype._read = function() { - var i = this._index++; - if (i > this._max) - this.push(null); - else { - var str = '' + i; - var buf = new Buffer(str, 'ascii'); - this.push(buf); - } -}; -``` - -#### Example: SimpleProtocol v1 (Sub-optimal) - -This is similar to the `parseHeader` function described -[here](#stream_readable_unshift_chunk), but implemented as a custom stream. -Also, note that this implementation does not convert the incoming data to a -string. - -However, this would be better implemented as a [Transform][] stream. See -[SimpleProtocol v2][] for a better implementation. - -```js -// A parser for a simple data protocol. -// The "header" is a JSON object, followed by 2 \n characters, and -// then a message body. -// -// NOTE: This can be done more simply as a Transform stream! -// Using Readable directly for this is sub-optimal. See the -// alternative example below under the Transform section. - -const Readable = require('stream').Readable; -const util = require('util'); - -util.inherits(SimpleProtocol, Readable); - -function SimpleProtocol(source, options) { - if (!(this instanceof SimpleProtocol)) - return new SimpleProtocol(source, options); - - Readable.call(this, options); - this._inBody = false; - this._sawFirstCr = false; - - // source is a readable stream, such as a socket or file - this._source = source; - - var self = this; - source.on('end', () => { - self.push(null); - }); - - // give it a kick whenever the source is readable - // read(0) will not consume any bytes - source.on('readable', () => { - self.read(0); - }); - - this._rawHeader = []; - this.header = null; -} - -SimpleProtocol.prototype._read = function(n) { - if (!this._inBody) { - var chunk = this._source.read(); - - // if the source doesn't have data, we don't have data yet. - if (chunk === null) - return this.push(''); - - // check if the chunk has a \n\n - var split = -1; - for (var i = 0; i < chunk.length; i++) { - if (chunk[i] === 10) { // '\n' - if (this._sawFirstCr) { - split = i; - break; - } else { - this._sawFirstCr = true; - } - } else { - this._sawFirstCr = false; - } - } - - if (split === -1) { - // still waiting for the \n\n - // stash the chunk, and try again. - this._rawHeader.push(chunk); - this.push(''); - } else { - this._inBody = true; - var h = chunk.slice(0, split); - this._rawHeader.push(h); - var header = Buffer.concat(this._rawHeader).toString(); - try { - this.header = JSON.parse(header); - } catch (er) { - this.emit('error', new Error('invalid simple protocol data')); - return; - } - // now, because we got some extra data, unshift the rest - // back into the read queue so that our consumer will see it. - var b = chunk.slice(split); - this.unshift(b); - // calling unshift by itself does not reset the reading state - // of the stream; since we're inside _read, doing an additional - // push('') will reset the state appropriately. - this.push(''); - - // and let them know that we are done parsing the header. - this.emit('header', this.header); - } - } else { - // from there on, just provide the data to our consumer. - // careful not to push(null), since that would indicate EOF. - var chunk = this._source.read(); - if (chunk) this.push(chunk); - } -}; - -// Usage: -// var parser = new SimpleProtocol(source); -// Now parser is a readable stream that will emit 'header' -// with the parsed header data. -``` - -### Class: stream.Transform - -A "transform" stream is a duplex stream where the output is causally -connected in some way to the input, such as a [zlib][] stream or a -[crypto][] stream. - -There is no requirement that the output be the same size as the input, -the same number of chunks, or arrive at the same time. For example, a -Hash stream will only ever have a single chunk of output which is -provided when the input is ended. A zlib stream will produce output -that is either much smaller or much larger than its input. - -Rather than implement the [`stream._read()`][stream-_read] and -[`stream._write()`][stream-_write] methods, Transform classes must implement the -[`stream._transform()`][stream-_transform] method, and may optionally -also implement the [`stream._flush()`][stream-_flush] method. (See below.) - -#### new stream.Transform([options]) - -* `options` {Object} Passed to both Writable and Readable - constructors. Also has the following fields: - * `transform` {Function} Implementation for the - [`stream._transform()`][stream-_transform] method. - * `flush` {Function} Implementation for the [`stream._flush()`][stream-_flush] - method. - -In classes that extend the Transform class, make sure to call the -constructor so that the buffering settings can be properly -initialized. - -#### Events: 'finish' and 'end' - -The [`'finish'`][] and [`'end'`][] events are from the parent Writable -and Readable classes respectively. The `'finish'` event is fired after -[`stream.end()`][stream-end] is called and all chunks have been processed by -[`stream._transform()`][stream-_transform], `'end'` is fired after all data has -been output which is after the callback in [`stream._flush()`][stream-_flush] -has been called. - -#### transform.\_flush(callback) - -* `callback` {Function} Call this function (optionally with an error - argument) when you are done flushing any remaining data. - -Note: **This function MUST NOT be called directly.** It MAY be implemented -by child classes, and if so, will be called by the internal Transform -class methods only. - -In some cases, your transform operation may need to emit a bit more -data at the end of the stream. For example, a `Zlib` compression -stream will store up some internal state so that it can optimally -compress the output. At the end, however, it needs to do the best it -can with what is left, so that the data will be complete. - -In those cases, you can implement a `_flush()` method, which will be -called at the very end, after all the written data is consumed, but -before emitting [`'end'`][] to signal the end of the readable side. Just -like with [`stream._transform()`][stream-_transform], call -`transform.push(chunk)` zero or more times, as appropriate, and call `callback` -when the flush operation is complete. - -This method is prefixed with an underscore because it is internal to -the class that defines it, and should not be called directly by user -programs. However, you **are** expected to override this method in -your own extension classes. - -#### transform.\_transform(chunk, encoding, callback) - -* `chunk` {Buffer|String} The chunk to be transformed. Will **always** - be a buffer unless the `decodeStrings` option was set to `false`. -* `encoding` {String} If the chunk is a string, then this is the - encoding type. If chunk is a buffer, then this is the special - value - 'buffer', ignore it in this case. -* `callback` {Function} Call this function (optionally with an error - argument and data) when you are done processing the supplied chunk. - -Note: **This function MUST NOT be called directly.** It should be -implemented by child classes, and called by the internal Transform -class methods only. - -All Transform stream implementations must provide a `_transform()` -method to accept input and produce output. - -`_transform()` should do whatever has to be done in this specific -Transform class, to handle the bytes being written, and pass them off -to the readable portion of the interface. Do asynchronous I/O, -process things, and so on. - -Call `transform.push(outputChunk)` 0 or more times to generate output -from this input chunk, depending on how much data you want to output -as a result of this chunk. - -Call the callback function only when the current chunk is completely -consumed. Note that there may or may not be output as a result of any -particular input chunk. If you supply a second argument to the callback -it will be passed to the push method. In other words the following are -equivalent: - -```js -transform.prototype._transform = function (data, encoding, callback) { - this.push(data); - callback(); -}; - -transform.prototype._transform = function (data, encoding, callback) { - callback(null, data); -}; -``` - -This method is prefixed with an underscore because it is internal to -the class that defines it, and should not be called directly by user -programs. However, you **are** expected to override this method in -your own extension classes. - -#### Example: `SimpleProtocol` parser v2 - -The example [here](#stream_example_simpleprotocol_v1_sub_optimal) of a simple -protocol parser can be implemented simply by using the higher level -[Transform][] stream class, similar to the `parseHeader` and `SimpleProtocol -v1` examples. - -In this example, rather than providing the input as an argument, it -would be piped into the parser, which is a more idiomatic Node.js stream -approach. - -```javascript -const util = require('util'); -const Transform = require('stream').Transform; -util.inherits(SimpleProtocol, Transform); - -function SimpleProtocol(options) { - if (!(this instanceof SimpleProtocol)) - return new SimpleProtocol(options); - - Transform.call(this, options); - this._inBody = false; - this._sawFirstCr = false; - this._rawHeader = []; - this.header = null; -} - -SimpleProtocol.prototype._transform = function(chunk, encoding, done) { - if (!this._inBody) { - // check if the chunk has a \n\n - var split = -1; - for (var i = 0; i < chunk.length; i++) { - if (chunk[i] === 10) { // '\n' - if (this._sawFirstCr) { - split = i; - break; - } else { - this._sawFirstCr = true; - } - } else { - this._sawFirstCr = false; - } - } - - if (split === -1) { - // still waiting for the \n\n - // stash the chunk, and try again. - this._rawHeader.push(chunk); - } else { - this._inBody = true; - var h = chunk.slice(0, split); - this._rawHeader.push(h); - var header = Buffer.concat(this._rawHeader).toString(); - try { - this.header = JSON.parse(header); - } catch (er) { - this.emit('error', new Error('invalid simple protocol data')); - return; - } - // and let them know that we are done parsing the header. - this.emit('header', this.header); - - // now, because we got some extra data, emit this first. - this.push(chunk.slice(split)); - } - } else { - // from there on, just provide the data to our consumer as-is. - this.push(chunk); - } - done(); -}; - -// Usage: -// var parser = new SimpleProtocol(); -// source.pipe(parser) -// Now parser is a readable stream that will emit 'header' -// with the parsed header data. -``` - -### Class: stream.Writable - - - -`stream.Writable` is an abstract class designed to be extended with an -underlying implementation of the -[`stream._write(chunk, encoding, callback)`][stream-_write] method. - -Please see [API for Stream Consumers][] for how to consume -writable streams in your programs. What follows is an explanation of -how to implement Writable streams in your programs. - -#### new stream.Writable([options]) - -* `options` {Object} - * `highWaterMark` {Number} Buffer level when - [`stream.write()`][stream-write] starts returning `false`. Default = `16384` - (16kb), or `16` for `objectMode` streams. - * `decodeStrings` {Boolean} Whether or not to decode strings into - Buffers before passing them to [`stream._write()`][stream-_write]. - Default = `true` - * `objectMode` {Boolean} Whether or not the - [`stream.write(anyObj)`][stream-write] is a valid operation. If set you can - write arbitrary data instead of only `Buffer` / `String` data. - Default = `false` - * `write` {Function} Implementation for the - [`stream._write()`][stream-_write] method. - * `writev` {Function} Implementation for the - [`stream._writev()`][stream-_writev] method. - -In classes that extend the Writable class, make sure to call the -constructor so that the buffering settings can be properly -initialized. - -#### writable.\_write(chunk, encoding, callback) - -* `chunk` {Buffer|String} The chunk to be written. Will **always** - be a buffer unless the `decodeStrings` option was set to `false`. -* `encoding` {String} If the chunk is a string, then this is the - encoding type. If chunk is a buffer, then this is the special - value - 'buffer', ignore it in this case. -* `callback` {Function} Call this function (optionally with an error - argument) when you are done processing the supplied chunk. - -All Writable stream implementations must provide a -[`stream._write()`][stream-_write] method to send data to the underlying -resource. - -Note: **This function MUST NOT be called directly.** It should be -implemented by child classes, and called by the internal Writable -class methods only. - -Call the callback using the standard `callback(error)` pattern to -signal that the write completed successfully or with an error. - -If the `decodeStrings` flag is set in the constructor options, then -`chunk` may be a string rather than a Buffer, and `encoding` will -indicate the sort of string that it is. This is to support -implementations that have an optimized handling for certain string -data encodings. If you do not explicitly set the `decodeStrings` -option to `false`, then you can safely ignore the `encoding` argument, -and assume that `chunk` will always be a Buffer. - -This method is prefixed with an underscore because it is internal to -the class that defines it, and should not be called directly by user -programs. However, you **are** expected to override this method in -your own extension classes. - -#### writable.\_writev(chunks, callback) - -* `chunks` {Array} The chunks to be written. Each chunk has following - format: `{ chunk: ..., encoding: ... }`. -* `callback` {Function} Call this function (optionally with an error - argument) when you are done processing the supplied chunks. - -Note: **This function MUST NOT be called directly.** It may be -implemented by child classes, and called by the internal Writable -class methods only. - -This function is completely optional to implement. In most cases it is -unnecessary. If implemented, it will be called with all the chunks -that are buffered in the write queue. - - -## Simplified Constructor API - - - -In simple cases there is now the added benefit of being able to construct a -stream without inheritance. - -This can be done by passing the appropriate methods as constructor options: - -Examples: - -### Duplex - -```js -var duplex = new stream.Duplex({ - read: function(n) { - // sets this._read under the hood - - // push data onto the read queue, passing null - // will signal the end of the stream (EOF) - this.push(chunk); - }, - write: function(chunk, encoding, next) { - // sets this._write under the hood - - // An optional error can be passed as the first argument - next() - } -}); - -// or - -var duplex = new stream.Duplex({ - read: function(n) { - // sets this._read under the hood - - // push data onto the read queue, passing null - // will signal the end of the stream (EOF) - this.push(chunk); - }, - writev: function(chunks, next) { - // sets this._writev under the hood - - // An optional error can be passed as the first argument - next() - } -}); -``` - -### Readable - -```js -var readable = new stream.Readable({ - read: function(n) { - // sets this._read under the hood - - // push data onto the read queue, passing null - // will signal the end of the stream (EOF) - this.push(chunk); - } -}); -``` - -### Transform - -```js -var transform = new stream.Transform({ - transform: function(chunk, encoding, next) { - // sets this._transform under the hood - - // generate output as many times as needed - // this.push(chunk); - - // call when the current chunk is consumed - next(); - }, - flush: function(done) { - // sets this._flush under the hood - - // generate output as many times as needed - // this.push(chunk); - - done(); - } -}); -``` - -### Writable - -```js -var writable = new stream.Writable({ - write: function(chunk, encoding, next) { - // sets this._write under the hood - - // An optional error can be passed as the first argument - next() - } -}); - -// or - -var writable = new stream.Writable({ - writev: function(chunks, next) { - // sets this._writev under the hood - - // An optional error can be passed as the first argument - next() - } -}); -``` - -## Streams: Under the Hood - - - -### Buffering - - - -Both Writable and Readable streams will buffer data on an internal -object which can be retrieved from `_writableState.getBuffer()` or -`_readableState.buffer`, respectively. - -The amount of data that will potentially be buffered depends on the -`highWaterMark` option which is passed into the constructor. - -Buffering in Readable streams happens when the implementation calls -[`stream.push(chunk)`][stream-push]. If the consumer of the Stream does not -call [`stream.read()`][stream-read], then the data will sit in the internal -queue until it is consumed. - -Buffering in Writable streams happens when the user calls -[`stream.write(chunk)`][stream-write] repeatedly, even when it returns `false`. - -The purpose of streams, especially with the [`stream.pipe()`][] method, is to -limit the buffering of data to acceptable levels, so that sources and -destinations of varying speed will not overwhelm the available memory. - -### Compatibility with Older Node.js Versions - - - -In versions of Node.js prior to v0.10, the Readable stream interface was -simpler, but also less powerful and less useful. - -* Rather than waiting for you to call the [`stream.read()`][stream-read] method, - [`'data'`][] events would start emitting immediately. If you needed to do - some I/O to decide how to handle data, then you had to store the chunks - in some kind of buffer so that they would not be lost. -* The [`stream.pause()`][stream-pause] method was advisory, rather than - guaranteed. This meant that you still had to be prepared to receive - [`'data'`][] events even when the stream was in a paused state. - -In Node.js v0.10, the [Readable][] class was added. -For backwards compatibility with older Node.js programs, Readable streams -switch into "flowing mode" when a [`'data'`][] event handler is added, or -when the [`stream.resume()`][stream-resume] method is called. The effect is -that, even if you are not using the new [`stream.read()`][stream-read] method -and [`'readable'`][] event, you no longer have to worry about losing -[`'data'`][] chunks. - -Most programs will continue to function normally. However, this -introduces an edge case in the following conditions: - -* No [`'data'`][] event handler is added. -* The [`stream.resume()`][stream-resume] method is never called. -* The stream is not piped to any writable destination. - -For example, consider the following code: - -```js -// WARNING! BROKEN! -net.createServer((socket) => { - - // we add an 'end' method, but never consume the data - socket.on('end', () => { - // It will never get here. - socket.end('I got your message (but didnt read it)\n'); - }); - -}).listen(1337); -``` - -In versions of Node.js prior to v0.10, the incoming message data would be -simply discarded. However, in Node.js v0.10 and beyond, -the socket will remain paused forever. - -The workaround in this situation is to call the -[`stream.resume()`][stream-resume] method to start the flow of data: - -```js -// Workaround -net.createServer((socket) => { - - socket.on('end', () => { - socket.end('I got your message (but didnt read it)\n'); - }); - - // start the flow of data, discarding it. - socket.resume(); - -}).listen(1337); -``` - -In addition to new Readable streams switching into flowing mode, -pre-v0.10 style streams can be wrapped in a Readable class using the -[`stream.wrap()`][] method. - - -### Object Mode - - - -Normally, Streams operate on Strings and Buffers exclusively. - -Streams that are in **object mode** can emit generic JavaScript values -other than Buffers and Strings. - -A Readable stream in object mode will always return a single item from -a call to [`stream.read(size)`][stream-read], regardless of what the size -argument is. - -A Writable stream in object mode will always ignore the `encoding` -argument to [`stream.write(data, encoding)`][stream-write]. - -The special value `null` still retains its special value for object -mode streams. That is, for object mode readable streams, `null` as a -return value from [`stream.read()`][stream-read] indicates that there is no more -data, and [`stream.push(null)`][stream-push] will signal the end of stream data -(`EOF`). - -No streams in Node.js core are object mode streams. This pattern is only -used by userland streaming libraries. - -You should set `objectMode` in your stream child class constructor on -the options object. Setting `objectMode` mid-stream is not safe. - -For Duplex streams `objectMode` can be set exclusively for readable or -writable side with `readableObjectMode` and `writableObjectMode` -respectively. These options can be used to implement parsers and -serializers with Transform streams. - -```js -const util = require('util'); -const StringDecoder = require('string_decoder').StringDecoder; -const Transform = require('stream').Transform; -util.inherits(JSONParseStream, Transform); - -// Gets \n-delimited JSON string data, and emits the parsed objects -function JSONParseStream() { - if (!(this instanceof JSONParseStream)) - return new JSONParseStream(); - - Transform.call(this, { readableObjectMode : true }); - - this._buffer = ''; - this._decoder = new StringDecoder('utf8'); -} - -JSONParseStream.prototype._transform = function(chunk, encoding, cb) { - this._buffer += this._decoder.write(chunk); - // split on newlines - var lines = this._buffer.split(/\r?\n/); - // keep the last partial line buffered - this._buffer = lines.pop(); - for (var l = 0; l < lines.length; l++) { - var line = lines[l]; - try { - var obj = JSON.parse(line); - } catch (er) { - this.emit('error', er); - return; - } - // push the parsed object out to the readable consumer - this.push(obj); - } - cb(); -}; - -JSONParseStream.prototype._flush = function(cb) { - // Just handle any leftover - var rem = this._buffer.trim(); - if (rem) { - try { - var obj = JSON.parse(rem); - } catch (er) { - this.emit('error', er); - return; - } - // push the parsed object out to the readable consumer - this.push(obj); - } - cb(); -}; -``` - -### `stream.read(0)` - -There are some cases where you want to trigger a refresh of the -underlying readable stream mechanisms, without actually consuming any -data. In that case, you can call `stream.read(0)`, which will always -return null. - -If the internal read buffer is below the `highWaterMark`, and the -stream is not currently reading, then calling `stream.read(0)` will trigger -a low-level [`stream._read()`][stream-_read] call. - -There is almost never a need to do this. However, you will see some -cases in Node.js's internals where this is done, particularly in the -Readable stream class internals. - -### `stream.push('')` - -Pushing a zero-byte string or Buffer (when not in [Object mode][]) has an -interesting side effect. Because it *is* a call to -[`stream.push()`][stream-push], it will end the `reading` process. However, it -does *not* add any data to the readable buffer, so there's nothing for -a user to consume. - -Very rarely, there are cases where you have no data to provide now, -but the consumer of your stream (or, perhaps, another bit of your own -code) will know when to check again, by calling [`stream.read(0)`][stream-read]. -In those cases, you *may* call `stream.push('')`. - -So far, the only use case for this functionality is in the -[`tls.CryptoStream`][] class, which is deprecated in Node.js/io.js v1.0. If you -find that you have to use `stream.push('')`, please consider another -approach, because it almost certainly indicates that something is -horribly wrong. - -[`'data'`]: #stream_event_data -[`'drain'`]: #stream_event_drain -[`'end'`]: #stream_event_end -[`'finish'`]: #stream_event_finish -[`'readable'`]: #stream_event_readable -[`buf.toString(encoding)`]: https://nodejs.org/docs/v5.8.0/api/buffer.html#buffer_buf_tostring_encoding_start_end -[`EventEmitter`]: https://nodejs.org/docs/v5.8.0/api/events.html#events_class_eventemitter -[`process.stderr`]: https://nodejs.org/docs/v5.8.0/api/process.html#process_process_stderr -[`process.stdin`]: https://nodejs.org/docs/v5.8.0/api/process.html#process_process_stdin -[`process.stdout`]: https://nodejs.org/docs/v5.8.0/api/process.html#process_process_stdout -[`stream.cork()`]: #stream_writable_cork -[`stream.pipe()`]: #stream_readable_pipe_destination_options -[`stream.uncork()`]: #stream_writable_uncork -[`stream.unpipe()`]: #stream_readable_unpipe_destination -[`stream.wrap()`]: #stream_readable_wrap_stream -[`tls.CryptoStream`]: https://nodejs.org/docs/v5.8.0/api/tls.html#tls_class_cryptostream -[`util.inherits()`]: https://nodejs.org/docs/v5.8.0/api/util.html#util_util_inherits_constructor_superconstructor -[API for Stream Consumers]: #stream_api_for_stream_consumers -[API for Stream Implementors]: #stream_api_for_stream_implementors -[child process stdin]: https://nodejs.org/docs/v5.8.0/api/child_process.html#child_process_child_stdin -[child process stdout and stderr]: https://nodejs.org/docs/v5.8.0/api/child_process.html#child_process_child_stdout -[Compatibility]: #stream_compatibility_with_older_node_js_versions -[crypto]: crypto.html -[Duplex]: #stream_class_stream_duplex -[fs read streams]: https://nodejs.org/docs/v5.8.0/api/fs.html#fs_class_fs_readstream -[fs write streams]: https://nodejs.org/docs/v5.8.0/api/fs.html#fs_class_fs_writestream -[HTTP requests, on the client]: https://nodejs.org/docs/v5.8.0/api/http.html#http_class_http_clientrequest -[HTTP responses, on the server]: https://nodejs.org/docs/v5.8.0/api/http.html#http_class_http_serverresponse -[http-incoming-message]: https://nodejs.org/docs/v5.8.0/api/http.html#http_class_http_incomingmessage -[Object mode]: #stream_object_mode -[Readable]: #stream_class_stream_readable -[SimpleProtocol v2]: #stream_example_simpleprotocol_parser_v2 -[stream-_flush]: #stream_transform_flush_callback -[stream-_read]: #stream_readable_read_size_1 -[stream-_transform]: #stream_transform_transform_chunk_encoding_callback -[stream-_write]: #stream_writable_write_chunk_encoding_callback_1 -[stream-_writev]: #stream_writable_writev_chunks_callback -[stream-end]: #stream_writable_end_chunk_encoding_callback -[stream-pause]: #stream_readable_pause -[stream-push]: #stream_readable_push_chunk_encoding -[stream-read]: #stream_readable_read_size -[stream-resume]: #stream_readable_resume -[stream-write]: #stream_writable_write_chunk_encoding_callback -[TCP sockets]: https://nodejs.org/docs/v5.8.0/api/net.html#net_class_net_socket -[Transform]: #stream_class_stream_transform -[Writable]: #stream_class_stream_writable -[zlib]: zlib.html diff --git a/node_modules/bl/node_modules/readable-stream/doc/wg-meetings/2015-01-30.md b/node_modules/bl/node_modules/readable-stream/doc/wg-meetings/2015-01-30.md deleted file mode 100644 index 83275f19..00000000 --- a/node_modules/bl/node_modules/readable-stream/doc/wg-meetings/2015-01-30.md +++ /dev/null @@ -1,60 +0,0 @@ -# streams WG Meeting 2015-01-30 - -## Links - -* **Google Hangouts Video**: http://www.youtube.com/watch?v=I9nDOSGfwZg -* **GitHub Issue**: https://github.com/iojs/readable-stream/issues/106 -* **Original Minutes Google Doc**: https://docs.google.com/document/d/17aTgLnjMXIrfjgNaTUnHQO7m3xgzHR2VXBTmi03Qii4/ - -## Agenda - -Extracted from https://github.com/iojs/readable-stream/labels/wg-agenda prior to meeting. - -* adopt a charter [#105](https://github.com/iojs/readable-stream/issues/105) -* release and versioning strategy [#101](https://github.com/iojs/readable-stream/issues/101) -* simpler stream creation [#102](https://github.com/iojs/readable-stream/issues/102) -* proposal: deprecate implicit flowing of streams [#99](https://github.com/iojs/readable-stream/issues/99) - -## Minutes - -### adopt a charter - -* group: +1's all around - -### What versioning scheme should be adopted? -* group: +1’s 3.0.0 -* domenic+group: pulling in patches from other sources where appropriate -* mikeal: version independently, suggesting versions for io.js -* mikeal+domenic: work with TC to notify in advance of changes -simpler stream creation - -### streamline creation of streams -* sam: streamline creation of streams -* domenic: nice simple solution posted - but, we lose the opportunity to change the model - may not be backwards incompatible (double check keys) - - **action item:** domenic will check - -### remove implicit flowing of streams on(‘data’) -* add isFlowing / isPaused -* mikeal: worrying that we’re documenting polyfill methods – confuses users -* domenic: more reflective API is probably good, with warning labels for users -* new section for mad scientists (reflective stream access) -* calvin: name the “third state” -* mikeal: maybe borrow the name from whatwg? -* domenic: we’re missing the “third state” -* consensus: kind of difficult to name the third state -* mikeal: figure out differences in states / compat -* mathias: always flow on data – eliminates third state - * explore what it breaks - -**action items:** -* ask isaac for ability to list packages by what public io.js APIs they use (esp. Stream) -* ask rod/build for infrastructure -* **chris**: explore the “flow on data” approach -* add isPaused/isFlowing -* add new docs section -* move isPaused to that section - - diff --git a/node_modules/bl/node_modules/readable-stream/duplex.js b/node_modules/bl/node_modules/readable-stream/duplex.js deleted file mode 100644 index ca807af8..00000000 --- a/node_modules/bl/node_modules/readable-stream/duplex.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require("./lib/_stream_duplex.js") diff --git a/node_modules/bl/node_modules/readable-stream/lib/_stream_duplex.js b/node_modules/bl/node_modules/readable-stream/lib/_stream_duplex.js deleted file mode 100644 index 736693b8..00000000 --- a/node_modules/bl/node_modules/readable-stream/lib/_stream_duplex.js +++ /dev/null @@ -1,75 +0,0 @@ -// a duplex stream is just a stream that is both readable and writable. -// Since JS doesn't have multiple prototypal inheritance, this class -// prototypally inherits from Readable, and then parasitically from -// Writable. - -'use strict'; - -/**/ - -var objectKeys = Object.keys || function (obj) { - var keys = []; - for (var key in obj) { - keys.push(key); - }return keys; -}; -/**/ - -module.exports = Duplex; - -/**/ -var processNextTick = require('process-nextick-args'); -/**/ - -/**/ -var util = require('core-util-is'); -util.inherits = require('inherits'); -/**/ - -var Readable = require('./_stream_readable'); -var Writable = require('./_stream_writable'); - -util.inherits(Duplex, Readable); - -var keys = objectKeys(Writable.prototype); -for (var v = 0; v < keys.length; v++) { - var method = keys[v]; - if (!Duplex.prototype[method]) Duplex.prototype[method] = Writable.prototype[method]; -} - -function Duplex(options) { - if (!(this instanceof Duplex)) return new Duplex(options); - - Readable.call(this, options); - Writable.call(this, options); - - if (options && options.readable === false) this.readable = false; - - if (options && options.writable === false) this.writable = false; - - this.allowHalfOpen = true; - if (options && options.allowHalfOpen === false) this.allowHalfOpen = false; - - this.once('end', onend); -} - -// the no-half-open enforcer -function onend() { - // if we allow half-open state, or if the writable side ended, - // then we're ok. - if (this.allowHalfOpen || this._writableState.ended) return; - - // no more data can be written. - // But allow more writes to happen in this tick. - processNextTick(onEndNT, this); -} - -function onEndNT(self) { - self.end(); -} - -function forEach(xs, f) { - for (var i = 0, l = xs.length; i < l; i++) { - f(xs[i], i); - } -} \ No newline at end of file diff --git a/node_modules/bl/node_modules/readable-stream/lib/_stream_passthrough.js b/node_modules/bl/node_modules/readable-stream/lib/_stream_passthrough.js deleted file mode 100644 index d06f71f1..00000000 --- a/node_modules/bl/node_modules/readable-stream/lib/_stream_passthrough.js +++ /dev/null @@ -1,26 +0,0 @@ -// a passthrough stream. -// basically just the most minimal sort of Transform stream. -// Every written chunk gets output as-is. - -'use strict'; - -module.exports = PassThrough; - -var Transform = require('./_stream_transform'); - -/**/ -var util = require('core-util-is'); -util.inherits = require('inherits'); -/**/ - -util.inherits(PassThrough, Transform); - -function PassThrough(options) { - if (!(this instanceof PassThrough)) return new PassThrough(options); - - Transform.call(this, options); -} - -PassThrough.prototype._transform = function (chunk, encoding, cb) { - cb(null, chunk); -}; \ No newline at end of file diff --git a/node_modules/bl/node_modules/readable-stream/lib/_stream_readable.js b/node_modules/bl/node_modules/readable-stream/lib/_stream_readable.js deleted file mode 100644 index 54a9d5c5..00000000 --- a/node_modules/bl/node_modules/readable-stream/lib/_stream_readable.js +++ /dev/null @@ -1,880 +0,0 @@ -'use strict'; - -module.exports = Readable; - -/**/ -var processNextTick = require('process-nextick-args'); -/**/ - -/**/ -var isArray = require('isarray'); -/**/ - -/**/ -var Buffer = require('buffer').Buffer; -/**/ - -Readable.ReadableState = ReadableState; - -var EE = require('events'); - -/**/ -var EElistenerCount = function (emitter, type) { - return emitter.listeners(type).length; -}; -/**/ - -/**/ -var Stream; -(function () { - try { - Stream = require('st' + 'ream'); - } catch (_) {} finally { - if (!Stream) Stream = require('events').EventEmitter; - } -})(); -/**/ - -var Buffer = require('buffer').Buffer; - -/**/ -var util = require('core-util-is'); -util.inherits = require('inherits'); -/**/ - -/**/ -var debugUtil = require('util'); -var debug = undefined; -if (debugUtil && debugUtil.debuglog) { - debug = debugUtil.debuglog('stream'); -} else { - debug = function () {}; -} -/**/ - -var StringDecoder; - -util.inherits(Readable, Stream); - -var Duplex; -function ReadableState(options, stream) { - Duplex = Duplex || require('./_stream_duplex'); - - options = options || {}; - - // object stream flag. Used to make read(n) ignore n and to - // make all the buffer merging and length checks go away - this.objectMode = !!options.objectMode; - - if (stream instanceof Duplex) this.objectMode = this.objectMode || !!options.readableObjectMode; - - // the point at which it stops calling _read() to fill the buffer - // Note: 0 is a valid value, means "don't call _read preemptively ever" - var hwm = options.highWaterMark; - var defaultHwm = this.objectMode ? 16 : 16 * 1024; - this.highWaterMark = hwm || hwm === 0 ? hwm : defaultHwm; - - // cast to ints. - this.highWaterMark = ~ ~this.highWaterMark; - - this.buffer = []; - this.length = 0; - this.pipes = null; - this.pipesCount = 0; - this.flowing = null; - this.ended = false; - this.endEmitted = false; - this.reading = false; - - // a flag to be able to tell if the onwrite cb is called immediately, - // or on a later tick. We set this to true at first, because any - // actions that shouldn't happen until "later" should generally also - // not happen before the first write call. - this.sync = true; - - // whenever we return null, then we set a flag to say - // that we're awaiting a 'readable' event emission. - this.needReadable = false; - this.emittedReadable = false; - this.readableListening = false; - this.resumeScheduled = false; - - // Crypto is kind of old and crusty. Historically, its default string - // encoding is 'binary' so we have to make this configurable. - // Everything else in the universe uses 'utf8', though. - this.defaultEncoding = options.defaultEncoding || 'utf8'; - - // when piping, we only care about 'readable' events that happen - // after read()ing all the bytes and not getting any pushback. - this.ranOut = false; - - // the number of writers that are awaiting a drain event in .pipe()s - this.awaitDrain = 0; - - // if true, a maybeReadMore has been scheduled - this.readingMore = false; - - this.decoder = null; - this.encoding = null; - if (options.encoding) { - if (!StringDecoder) StringDecoder = require('string_decoder/').StringDecoder; - this.decoder = new StringDecoder(options.encoding); - this.encoding = options.encoding; - } -} - -var Duplex; -function Readable(options) { - Duplex = Duplex || require('./_stream_duplex'); - - if (!(this instanceof Readable)) return new Readable(options); - - this._readableState = new ReadableState(options, this); - - // legacy - this.readable = true; - - if (options && typeof options.read === 'function') this._read = options.read; - - Stream.call(this); -} - -// Manually shove something into the read() buffer. -// This returns true if the highWaterMark has not been hit yet, -// similar to how Writable.write() returns true if you should -// write() some more. -Readable.prototype.push = function (chunk, encoding) { - var state = this._readableState; - - if (!state.objectMode && typeof chunk === 'string') { - encoding = encoding || state.defaultEncoding; - if (encoding !== state.encoding) { - chunk = new Buffer(chunk, encoding); - encoding = ''; - } - } - - return readableAddChunk(this, state, chunk, encoding, false); -}; - -// Unshift should *always* be something directly out of read() -Readable.prototype.unshift = function (chunk) { - var state = this._readableState; - return readableAddChunk(this, state, chunk, '', true); -}; - -Readable.prototype.isPaused = function () { - return this._readableState.flowing === false; -}; - -function readableAddChunk(stream, state, chunk, encoding, addToFront) { - var er = chunkInvalid(state, chunk); - if (er) { - stream.emit('error', er); - } else if (chunk === null) { - state.reading = false; - onEofChunk(stream, state); - } else if (state.objectMode || chunk && chunk.length > 0) { - if (state.ended && !addToFront) { - var e = new Error('stream.push() after EOF'); - stream.emit('error', e); - } else if (state.endEmitted && addToFront) { - var e = new Error('stream.unshift() after end event'); - stream.emit('error', e); - } else { - var skipAdd; - if (state.decoder && !addToFront && !encoding) { - chunk = state.decoder.write(chunk); - skipAdd = !state.objectMode && chunk.length === 0; - } - - if (!addToFront) state.reading = false; - - // Don't add to the buffer if we've decoded to an empty string chunk and - // we're not in object mode - if (!skipAdd) { - // if we want the data now, just emit it. - if (state.flowing && state.length === 0 && !state.sync) { - stream.emit('data', chunk); - stream.read(0); - } else { - // update the buffer info. - state.length += state.objectMode ? 1 : chunk.length; - if (addToFront) state.buffer.unshift(chunk);else state.buffer.push(chunk); - - if (state.needReadable) emitReadable(stream); - } - } - - maybeReadMore(stream, state); - } - } else if (!addToFront) { - state.reading = false; - } - - return needMoreData(state); -} - -// if it's past the high water mark, we can push in some more. -// Also, if we have no data yet, we can stand some -// more bytes. This is to work around cases where hwm=0, -// such as the repl. Also, if the push() triggered a -// readable event, and the user called read(largeNumber) such that -// needReadable was set, then we ought to push more, so that another -// 'readable' event will be triggered. -function needMoreData(state) { - return !state.ended && (state.needReadable || state.length < state.highWaterMark || state.length === 0); -} - -// backwards compatibility. -Readable.prototype.setEncoding = function (enc) { - if (!StringDecoder) StringDecoder = require('string_decoder/').StringDecoder; - this._readableState.decoder = new StringDecoder(enc); - this._readableState.encoding = enc; - return this; -}; - -// Don't raise the hwm > 8MB -var MAX_HWM = 0x800000; -function computeNewHighWaterMark(n) { - if (n >= MAX_HWM) { - n = MAX_HWM; - } else { - // Get the next highest power of 2 - n--; - n |= n >>> 1; - n |= n >>> 2; - n |= n >>> 4; - n |= n >>> 8; - n |= n >>> 16; - n++; - } - return n; -} - -function howMuchToRead(n, state) { - if (state.length === 0 && state.ended) return 0; - - if (state.objectMode) return n === 0 ? 0 : 1; - - if (n === null || isNaN(n)) { - // only flow one buffer at a time - if (state.flowing && state.buffer.length) return state.buffer[0].length;else return state.length; - } - - if (n <= 0) return 0; - - // If we're asking for more than the target buffer level, - // then raise the water mark. Bump up to the next highest - // power of 2, to prevent increasing it excessively in tiny - // amounts. - if (n > state.highWaterMark) state.highWaterMark = computeNewHighWaterMark(n); - - // don't have that much. return null, unless we've ended. - if (n > state.length) { - if (!state.ended) { - state.needReadable = true; - return 0; - } else { - return state.length; - } - } - - return n; -} - -// you can override either this method, or the async _read(n) below. -Readable.prototype.read = function (n) { - debug('read', n); - var state = this._readableState; - var nOrig = n; - - if (typeof n !== 'number' || n > 0) state.emittedReadable = false; - - // if we're doing read(0) to trigger a readable event, but we - // already have a bunch of data in the buffer, then just trigger - // the 'readable' event and move on. - if (n === 0 && state.needReadable && (state.length >= state.highWaterMark || state.ended)) { - debug('read: emitReadable', state.length, state.ended); - if (state.length === 0 && state.ended) endReadable(this);else emitReadable(this); - return null; - } - - n = howMuchToRead(n, state); - - // if we've ended, and we're now clear, then finish it up. - if (n === 0 && state.ended) { - if (state.length === 0) endReadable(this); - return null; - } - - // All the actual chunk generation logic needs to be - // *below* the call to _read. The reason is that in certain - // synthetic stream cases, such as passthrough streams, _read - // may be a completely synchronous operation which may change - // the state of the read buffer, providing enough data when - // before there was *not* enough. - // - // So, the steps are: - // 1. Figure out what the state of things will be after we do - // a read from the buffer. - // - // 2. If that resulting state will trigger a _read, then call _read. - // Note that this may be asynchronous, or synchronous. Yes, it is - // deeply ugly to write APIs this way, but that still doesn't mean - // that the Readable class should behave improperly, as streams are - // designed to be sync/async agnostic. - // Take note if the _read call is sync or async (ie, if the read call - // has returned yet), so that we know whether or not it's safe to emit - // 'readable' etc. - // - // 3. Actually pull the requested chunks out of the buffer and return. - - // if we need a readable event, then we need to do some reading. - var doRead = state.needReadable; - debug('need readable', doRead); - - // if we currently have less than the highWaterMark, then also read some - if (state.length === 0 || state.length - n < state.highWaterMark) { - doRead = true; - debug('length less than watermark', doRead); - } - - // however, if we've ended, then there's no point, and if we're already - // reading, then it's unnecessary. - if (state.ended || state.reading) { - doRead = false; - debug('reading or ended', doRead); - } - - if (doRead) { - debug('do read'); - state.reading = true; - state.sync = true; - // if the length is currently zero, then we *need* a readable event. - if (state.length === 0) state.needReadable = true; - // call internal read method - this._read(state.highWaterMark); - state.sync = false; - } - - // If _read pushed data synchronously, then `reading` will be false, - // and we need to re-evaluate how much data we can return to the user. - if (doRead && !state.reading) n = howMuchToRead(nOrig, state); - - var ret; - if (n > 0) ret = fromList(n, state);else ret = null; - - if (ret === null) { - state.needReadable = true; - n = 0; - } - - state.length -= n; - - // If we have nothing in the buffer, then we want to know - // as soon as we *do* get something into the buffer. - if (state.length === 0 && !state.ended) state.needReadable = true; - - // If we tried to read() past the EOF, then emit end on the next tick. - if (nOrig !== n && state.ended && state.length === 0) endReadable(this); - - if (ret !== null) this.emit('data', ret); - - return ret; -}; - -function chunkInvalid(state, chunk) { - var er = null; - if (!Buffer.isBuffer(chunk) && typeof chunk !== 'string' && chunk !== null && chunk !== undefined && !state.objectMode) { - er = new TypeError('Invalid non-string/buffer chunk'); - } - return er; -} - -function onEofChunk(stream, state) { - if (state.ended) return; - if (state.decoder) { - var chunk = state.decoder.end(); - if (chunk && chunk.length) { - state.buffer.push(chunk); - state.length += state.objectMode ? 1 : chunk.length; - } - } - state.ended = true; - - // emit 'readable' now to make sure it gets picked up. - emitReadable(stream); -} - -// Don't emit readable right away in sync mode, because this can trigger -// another read() call => stack overflow. This way, it might trigger -// a nextTick recursion warning, but that's not so bad. -function emitReadable(stream) { - var state = stream._readableState; - state.needReadable = false; - if (!state.emittedReadable) { - debug('emitReadable', state.flowing); - state.emittedReadable = true; - if (state.sync) processNextTick(emitReadable_, stream);else emitReadable_(stream); - } -} - -function emitReadable_(stream) { - debug('emit readable'); - stream.emit('readable'); - flow(stream); -} - -// at this point, the user has presumably seen the 'readable' event, -// and called read() to consume some data. that may have triggered -// in turn another _read(n) call, in which case reading = true if -// it's in progress. -// However, if we're not ended, or reading, and the length < hwm, -// then go ahead and try to read some more preemptively. -function maybeReadMore(stream, state) { - if (!state.readingMore) { - state.readingMore = true; - processNextTick(maybeReadMore_, stream, state); - } -} - -function maybeReadMore_(stream, state) { - var len = state.length; - while (!state.reading && !state.flowing && !state.ended && state.length < state.highWaterMark) { - debug('maybeReadMore read 0'); - stream.read(0); - if (len === state.length) - // didn't get any data, stop spinning. - break;else len = state.length; - } - state.readingMore = false; -} - -// abstract method. to be overridden in specific implementation classes. -// call cb(er, data) where data is <= n in length. -// for virtual (non-string, non-buffer) streams, "length" is somewhat -// arbitrary, and perhaps not very meaningful. -Readable.prototype._read = function (n) { - this.emit('error', new Error('not implemented')); -}; - -Readable.prototype.pipe = function (dest, pipeOpts) { - var src = this; - var state = this._readableState; - - switch (state.pipesCount) { - case 0: - state.pipes = dest; - break; - case 1: - state.pipes = [state.pipes, dest]; - break; - default: - state.pipes.push(dest); - break; - } - state.pipesCount += 1; - debug('pipe count=%d opts=%j', state.pipesCount, pipeOpts); - - var doEnd = (!pipeOpts || pipeOpts.end !== false) && dest !== process.stdout && dest !== process.stderr; - - var endFn = doEnd ? onend : cleanup; - if (state.endEmitted) processNextTick(endFn);else src.once('end', endFn); - - dest.on('unpipe', onunpipe); - function onunpipe(readable) { - debug('onunpipe'); - if (readable === src) { - cleanup(); - } - } - - function onend() { - debug('onend'); - dest.end(); - } - - // when the dest drains, it reduces the awaitDrain counter - // on the source. This would be more elegant with a .once() - // handler in flow(), but adding and removing repeatedly is - // too slow. - var ondrain = pipeOnDrain(src); - dest.on('drain', ondrain); - - var cleanedUp = false; - function cleanup() { - debug('cleanup'); - // cleanup event handlers once the pipe is broken - dest.removeListener('close', onclose); - dest.removeListener('finish', onfinish); - dest.removeListener('drain', ondrain); - dest.removeListener('error', onerror); - dest.removeListener('unpipe', onunpipe); - src.removeListener('end', onend); - src.removeListener('end', cleanup); - src.removeListener('data', ondata); - - cleanedUp = true; - - // if the reader is waiting for a drain event from this - // specific writer, then it would cause it to never start - // flowing again. - // So, if this is awaiting a drain, then we just call it now. - // If we don't know, then assume that we are waiting for one. - if (state.awaitDrain && (!dest._writableState || dest._writableState.needDrain)) ondrain(); - } - - src.on('data', ondata); - function ondata(chunk) { - debug('ondata'); - var ret = dest.write(chunk); - if (false === ret) { - // If the user unpiped during `dest.write()`, it is possible - // to get stuck in a permanently paused state if that write - // also returned false. - if (state.pipesCount === 1 && state.pipes[0] === dest && src.listenerCount('data') === 1 && !cleanedUp) { - debug('false write response, pause', src._readableState.awaitDrain); - src._readableState.awaitDrain++; - } - src.pause(); - } - } - - // if the dest has an error, then stop piping into it. - // however, don't suppress the throwing behavior for this. - function onerror(er) { - debug('onerror', er); - unpipe(); - dest.removeListener('error', onerror); - if (EElistenerCount(dest, 'error') === 0) dest.emit('error', er); - } - // This is a brutally ugly hack to make sure that our error handler - // is attached before any userland ones. NEVER DO THIS. - if (!dest._events || !dest._events.error) dest.on('error', onerror);else if (isArray(dest._events.error)) dest._events.error.unshift(onerror);else dest._events.error = [onerror, dest._events.error]; - - // Both close and finish should trigger unpipe, but only once. - function onclose() { - dest.removeListener('finish', onfinish); - unpipe(); - } - dest.once('close', onclose); - function onfinish() { - debug('onfinish'); - dest.removeListener('close', onclose); - unpipe(); - } - dest.once('finish', onfinish); - - function unpipe() { - debug('unpipe'); - src.unpipe(dest); - } - - // tell the dest that it's being piped to - dest.emit('pipe', src); - - // start the flow if it hasn't been started already. - if (!state.flowing) { - debug('pipe resume'); - src.resume(); - } - - return dest; -}; - -function pipeOnDrain(src) { - return function () { - var state = src._readableState; - debug('pipeOnDrain', state.awaitDrain); - if (state.awaitDrain) state.awaitDrain--; - if (state.awaitDrain === 0 && EElistenerCount(src, 'data')) { - state.flowing = true; - flow(src); - } - }; -} - -Readable.prototype.unpipe = function (dest) { - var state = this._readableState; - - // if we're not piping anywhere, then do nothing. - if (state.pipesCount === 0) return this; - - // just one destination. most common case. - if (state.pipesCount === 1) { - // passed in one, but it's not the right one. - if (dest && dest !== state.pipes) return this; - - if (!dest) dest = state.pipes; - - // got a match. - state.pipes = null; - state.pipesCount = 0; - state.flowing = false; - if (dest) dest.emit('unpipe', this); - return this; - } - - // slow case. multiple pipe destinations. - - if (!dest) { - // remove all. - var dests = state.pipes; - var len = state.pipesCount; - state.pipes = null; - state.pipesCount = 0; - state.flowing = false; - - for (var _i = 0; _i < len; _i++) { - dests[_i].emit('unpipe', this); - }return this; - } - - // try to find the right one. - var i = indexOf(state.pipes, dest); - if (i === -1) return this; - - state.pipes.splice(i, 1); - state.pipesCount -= 1; - if (state.pipesCount === 1) state.pipes = state.pipes[0]; - - dest.emit('unpipe', this); - - return this; -}; - -// set up data events if they are asked for -// Ensure readable listeners eventually get something -Readable.prototype.on = function (ev, fn) { - var res = Stream.prototype.on.call(this, ev, fn); - - // If listening to data, and it has not explicitly been paused, - // then call resume to start the flow of data on the next tick. - if (ev === 'data' && false !== this._readableState.flowing) { - this.resume(); - } - - if (ev === 'readable' && !this._readableState.endEmitted) { - var state = this._readableState; - if (!state.readableListening) { - state.readableListening = true; - state.emittedReadable = false; - state.needReadable = true; - if (!state.reading) { - processNextTick(nReadingNextTick, this); - } else if (state.length) { - emitReadable(this, state); - } - } - } - - return res; -}; -Readable.prototype.addListener = Readable.prototype.on; - -function nReadingNextTick(self) { - debug('readable nexttick read 0'); - self.read(0); -} - -// pause() and resume() are remnants of the legacy readable stream API -// If the user uses them, then switch into old mode. -Readable.prototype.resume = function () { - var state = this._readableState; - if (!state.flowing) { - debug('resume'); - state.flowing = true; - resume(this, state); - } - return this; -}; - -function resume(stream, state) { - if (!state.resumeScheduled) { - state.resumeScheduled = true; - processNextTick(resume_, stream, state); - } -} - -function resume_(stream, state) { - if (!state.reading) { - debug('resume read 0'); - stream.read(0); - } - - state.resumeScheduled = false; - stream.emit('resume'); - flow(stream); - if (state.flowing && !state.reading) stream.read(0); -} - -Readable.prototype.pause = function () { - debug('call pause flowing=%j', this._readableState.flowing); - if (false !== this._readableState.flowing) { - debug('pause'); - this._readableState.flowing = false; - this.emit('pause'); - } - return this; -}; - -function flow(stream) { - var state = stream._readableState; - debug('flow', state.flowing); - if (state.flowing) { - do { - var chunk = stream.read(); - } while (null !== chunk && state.flowing); - } -} - -// wrap an old-style stream as the async data source. -// This is *not* part of the readable stream interface. -// It is an ugly unfortunate mess of history. -Readable.prototype.wrap = function (stream) { - var state = this._readableState; - var paused = false; - - var self = this; - stream.on('end', function () { - debug('wrapped end'); - if (state.decoder && !state.ended) { - var chunk = state.decoder.end(); - if (chunk && chunk.length) self.push(chunk); - } - - self.push(null); - }); - - stream.on('data', function (chunk) { - debug('wrapped data'); - if (state.decoder) chunk = state.decoder.write(chunk); - - // don't skip over falsy values in objectMode - if (state.objectMode && (chunk === null || chunk === undefined)) return;else if (!state.objectMode && (!chunk || !chunk.length)) return; - - var ret = self.push(chunk); - if (!ret) { - paused = true; - stream.pause(); - } - }); - - // proxy all the other methods. - // important when wrapping filters and duplexes. - for (var i in stream) { - if (this[i] === undefined && typeof stream[i] === 'function') { - this[i] = function (method) { - return function () { - return stream[method].apply(stream, arguments); - }; - }(i); - } - } - - // proxy certain important events. - var events = ['error', 'close', 'destroy', 'pause', 'resume']; - forEach(events, function (ev) { - stream.on(ev, self.emit.bind(self, ev)); - }); - - // when we try to consume some more bytes, simply unpause the - // underlying stream. - self._read = function (n) { - debug('wrapped _read', n); - if (paused) { - paused = false; - stream.resume(); - } - }; - - return self; -}; - -// exposed for testing purposes only. -Readable._fromList = fromList; - -// Pluck off n bytes from an array of buffers. -// Length is the combined lengths of all the buffers in the list. -function fromList(n, state) { - var list = state.buffer; - var length = state.length; - var stringMode = !!state.decoder; - var objectMode = !!state.objectMode; - var ret; - - // nothing in the list, definitely empty. - if (list.length === 0) return null; - - if (length === 0) ret = null;else if (objectMode) ret = list.shift();else if (!n || n >= length) { - // read it all, truncate the array. - if (stringMode) ret = list.join('');else if (list.length === 1) ret = list[0];else ret = Buffer.concat(list, length); - list.length = 0; - } else { - // read just some of it. - if (n < list[0].length) { - // just take a part of the first list item. - // slice is the same for buffers and strings. - var buf = list[0]; - ret = buf.slice(0, n); - list[0] = buf.slice(n); - } else if (n === list[0].length) { - // first list is a perfect match - ret = list.shift(); - } else { - // complex case. - // we have enough to cover it, but it spans past the first buffer. - if (stringMode) ret = '';else ret = new Buffer(n); - - var c = 0; - for (var i = 0, l = list.length; i < l && c < n; i++) { - var buf = list[0]; - var cpy = Math.min(n - c, buf.length); - - if (stringMode) ret += buf.slice(0, cpy);else buf.copy(ret, c, 0, cpy); - - if (cpy < buf.length) list[0] = buf.slice(cpy);else list.shift(); - - c += cpy; - } - } - } - - return ret; -} - -function endReadable(stream) { - var state = stream._readableState; - - // If we get here before consuming all the bytes, then that is a - // bug in node. Should never happen. - if (state.length > 0) throw new Error('endReadable called on non-empty stream'); - - if (!state.endEmitted) { - state.ended = true; - processNextTick(endReadableNT, state, stream); - } -} - -function endReadableNT(state, stream) { - // Check that we didn't get one last unshift. - if (!state.endEmitted && state.length === 0) { - state.endEmitted = true; - stream.readable = false; - stream.emit('end'); - } -} - -function forEach(xs, f) { - for (var i = 0, l = xs.length; i < l; i++) { - f(xs[i], i); - } -} - -function indexOf(xs, x) { - for (var i = 0, l = xs.length; i < l; i++) { - if (xs[i] === x) return i; - } - return -1; -} \ No newline at end of file diff --git a/node_modules/bl/node_modules/readable-stream/lib/_stream_transform.js b/node_modules/bl/node_modules/readable-stream/lib/_stream_transform.js deleted file mode 100644 index 625cdc17..00000000 --- a/node_modules/bl/node_modules/readable-stream/lib/_stream_transform.js +++ /dev/null @@ -1,180 +0,0 @@ -// a transform stream is a readable/writable stream where you do -// something with the data. Sometimes it's called a "filter", -// but that's not a great name for it, since that implies a thing where -// some bits pass through, and others are simply ignored. (That would -// be a valid example of a transform, of course.) -// -// While the output is causally related to the input, it's not a -// necessarily symmetric or synchronous transformation. For example, -// a zlib stream might take multiple plain-text writes(), and then -// emit a single compressed chunk some time in the future. -// -// Here's how this works: -// -// The Transform stream has all the aspects of the readable and writable -// stream classes. When you write(chunk), that calls _write(chunk,cb) -// internally, and returns false if there's a lot of pending writes -// buffered up. When you call read(), that calls _read(n) until -// there's enough pending readable data buffered up. -// -// In a transform stream, the written data is placed in a buffer. When -// _read(n) is called, it transforms the queued up data, calling the -// buffered _write cb's as it consumes chunks. If consuming a single -// written chunk would result in multiple output chunks, then the first -// outputted bit calls the readcb, and subsequent chunks just go into -// the read buffer, and will cause it to emit 'readable' if necessary. -// -// This way, back-pressure is actually determined by the reading side, -// since _read has to be called to start processing a new chunk. However, -// a pathological inflate type of transform can cause excessive buffering -// here. For example, imagine a stream where every byte of input is -// interpreted as an integer from 0-255, and then results in that many -// bytes of output. Writing the 4 bytes {ff,ff,ff,ff} would result in -// 1kb of data being output. In this case, you could write a very small -// amount of input, and end up with a very large amount of output. In -// such a pathological inflating mechanism, there'd be no way to tell -// the system to stop doing the transform. A single 4MB write could -// cause the system to run out of memory. -// -// However, even in such a pathological case, only a single written chunk -// would be consumed, and then the rest would wait (un-transformed) until -// the results of the previous transformed chunk were consumed. - -'use strict'; - -module.exports = Transform; - -var Duplex = require('./_stream_duplex'); - -/**/ -var util = require('core-util-is'); -util.inherits = require('inherits'); -/**/ - -util.inherits(Transform, Duplex); - -function TransformState(stream) { - this.afterTransform = function (er, data) { - return afterTransform(stream, er, data); - }; - - this.needTransform = false; - this.transforming = false; - this.writecb = null; - this.writechunk = null; - this.writeencoding = null; -} - -function afterTransform(stream, er, data) { - var ts = stream._transformState; - ts.transforming = false; - - var cb = ts.writecb; - - if (!cb) return stream.emit('error', new Error('no writecb in Transform class')); - - ts.writechunk = null; - ts.writecb = null; - - if (data !== null && data !== undefined) stream.push(data); - - cb(er); - - var rs = stream._readableState; - rs.reading = false; - if (rs.needReadable || rs.length < rs.highWaterMark) { - stream._read(rs.highWaterMark); - } -} - -function Transform(options) { - if (!(this instanceof Transform)) return new Transform(options); - - Duplex.call(this, options); - - this._transformState = new TransformState(this); - - // when the writable side finishes, then flush out anything remaining. - var stream = this; - - // start out asking for a readable event once data is transformed. - this._readableState.needReadable = true; - - // we have implemented the _read method, and done the other things - // that Readable wants before the first _read call, so unset the - // sync guard flag. - this._readableState.sync = false; - - if (options) { - if (typeof options.transform === 'function') this._transform = options.transform; - - if (typeof options.flush === 'function') this._flush = options.flush; - } - - this.once('prefinish', function () { - if (typeof this._flush === 'function') this._flush(function (er) { - done(stream, er); - });else done(stream); - }); -} - -Transform.prototype.push = function (chunk, encoding) { - this._transformState.needTransform = false; - return Duplex.prototype.push.call(this, chunk, encoding); -}; - -// This is the part where you do stuff! -// override this function in implementation classes. -// 'chunk' is an input chunk. -// -// Call `push(newChunk)` to pass along transformed output -// to the readable side. You may call 'push' zero or more times. -// -// Call `cb(err)` when you are done with this chunk. If you pass -// an error, then that'll put the hurt on the whole operation. If you -// never call cb(), then you'll never get another chunk. -Transform.prototype._transform = function (chunk, encoding, cb) { - throw new Error('not implemented'); -}; - -Transform.prototype._write = function (chunk, encoding, cb) { - var ts = this._transformState; - ts.writecb = cb; - ts.writechunk = chunk; - ts.writeencoding = encoding; - if (!ts.transforming) { - var rs = this._readableState; - if (ts.needTransform || rs.needReadable || rs.length < rs.highWaterMark) this._read(rs.highWaterMark); - } -}; - -// Doesn't matter what the args are here. -// _transform does all the work. -// That we got here means that the readable side wants more data. -Transform.prototype._read = function (n) { - var ts = this._transformState; - - if (ts.writechunk !== null && ts.writecb && !ts.transforming) { - ts.transforming = true; - this._transform(ts.writechunk, ts.writeencoding, ts.afterTransform); - } else { - // mark that we need a transform, so that any data that comes in - // will get processed, now that we've asked for it. - ts.needTransform = true; - } -}; - -function done(stream, er) { - if (er) return stream.emit('error', er); - - // if there's nothing in the write buffer, then that means - // that nothing more will ever be provided - var ws = stream._writableState; - var ts = stream._transformState; - - if (ws.length) throw new Error('calling transform done when ws.length != 0'); - - if (ts.transforming) throw new Error('calling transform done when still transforming'); - - return stream.push(null); -} \ No newline at end of file diff --git a/node_modules/bl/node_modules/readable-stream/lib/_stream_writable.js b/node_modules/bl/node_modules/readable-stream/lib/_stream_writable.js deleted file mode 100644 index 95916c99..00000000 --- a/node_modules/bl/node_modules/readable-stream/lib/_stream_writable.js +++ /dev/null @@ -1,516 +0,0 @@ -// A bit simpler than readable streams. -// Implement an async ._write(chunk, encoding, cb), and it'll handle all -// the drain event emission and buffering. - -'use strict'; - -module.exports = Writable; - -/**/ -var processNextTick = require('process-nextick-args'); -/**/ - -/**/ -var asyncWrite = !process.browser && ['v0.10', 'v0.9.'].indexOf(process.version.slice(0, 5)) > -1 ? setImmediate : processNextTick; -/**/ - -/**/ -var Buffer = require('buffer').Buffer; -/**/ - -Writable.WritableState = WritableState; - -/**/ -var util = require('core-util-is'); -util.inherits = require('inherits'); -/**/ - -/**/ -var internalUtil = { - deprecate: require('util-deprecate') -}; -/**/ - -/**/ -var Stream; -(function () { - try { - Stream = require('st' + 'ream'); - } catch (_) {} finally { - if (!Stream) Stream = require('events').EventEmitter; - } -})(); -/**/ - -var Buffer = require('buffer').Buffer; - -util.inherits(Writable, Stream); - -function nop() {} - -function WriteReq(chunk, encoding, cb) { - this.chunk = chunk; - this.encoding = encoding; - this.callback = cb; - this.next = null; -} - -var Duplex; -function WritableState(options, stream) { - Duplex = Duplex || require('./_stream_duplex'); - - options = options || {}; - - // object stream flag to indicate whether or not this stream - // contains buffers or objects. - this.objectMode = !!options.objectMode; - - if (stream instanceof Duplex) this.objectMode = this.objectMode || !!options.writableObjectMode; - - // the point at which write() starts returning false - // Note: 0 is a valid value, means that we always return false if - // the entire buffer is not flushed immediately on write() - var hwm = options.highWaterMark; - var defaultHwm = this.objectMode ? 16 : 16 * 1024; - this.highWaterMark = hwm || hwm === 0 ? hwm : defaultHwm; - - // cast to ints. - this.highWaterMark = ~ ~this.highWaterMark; - - this.needDrain = false; - // at the start of calling end() - this.ending = false; - // when end() has been called, and returned - this.ended = false; - // when 'finish' is emitted - this.finished = false; - - // should we decode strings into buffers before passing to _write? - // this is here so that some node-core streams can optimize string - // handling at a lower level. - var noDecode = options.decodeStrings === false; - this.decodeStrings = !noDecode; - - // Crypto is kind of old and crusty. Historically, its default string - // encoding is 'binary' so we have to make this configurable. - // Everything else in the universe uses 'utf8', though. - this.defaultEncoding = options.defaultEncoding || 'utf8'; - - // not an actual buffer we keep track of, but a measurement - // of how much we're waiting to get pushed to some underlying - // socket or file. - this.length = 0; - - // a flag to see when we're in the middle of a write. - this.writing = false; - - // when true all writes will be buffered until .uncork() call - this.corked = 0; - - // a flag to be able to tell if the onwrite cb is called immediately, - // or on a later tick. We set this to true at first, because any - // actions that shouldn't happen until "later" should generally also - // not happen before the first write call. - this.sync = true; - - // a flag to know if we're processing previously buffered items, which - // may call the _write() callback in the same tick, so that we don't - // end up in an overlapped onwrite situation. - this.bufferProcessing = false; - - // the callback that's passed to _write(chunk,cb) - this.onwrite = function (er) { - onwrite(stream, er); - }; - - // the callback that the user supplies to write(chunk,encoding,cb) - this.writecb = null; - - // the amount that is being written when _write is called. - this.writelen = 0; - - this.bufferedRequest = null; - this.lastBufferedRequest = null; - - // number of pending user-supplied write callbacks - // this must be 0 before 'finish' can be emitted - this.pendingcb = 0; - - // emit prefinish if the only thing we're waiting for is _write cbs - // This is relevant for synchronous Transform streams - this.prefinished = false; - - // True if the error was already emitted and should not be thrown again - this.errorEmitted = false; - - // count buffered requests - this.bufferedRequestCount = 0; - - // create the two objects needed to store the corked requests - // they are not a linked list, as no new elements are inserted in there - this.corkedRequestsFree = new CorkedRequest(this); - this.corkedRequestsFree.next = new CorkedRequest(this); -} - -WritableState.prototype.getBuffer = function writableStateGetBuffer() { - var current = this.bufferedRequest; - var out = []; - while (current) { - out.push(current); - current = current.next; - } - return out; -}; - -(function () { - try { - Object.defineProperty(WritableState.prototype, 'buffer', { - get: internalUtil.deprecate(function () { - return this.getBuffer(); - }, '_writableState.buffer is deprecated. Use _writableState.getBuffer ' + 'instead.') - }); - } catch (_) {} -})(); - -var Duplex; -function Writable(options) { - Duplex = Duplex || require('./_stream_duplex'); - - // Writable ctor is applied to Duplexes, though they're not - // instanceof Writable, they're instanceof Readable. - if (!(this instanceof Writable) && !(this instanceof Duplex)) return new Writable(options); - - this._writableState = new WritableState(options, this); - - // legacy. - this.writable = true; - - if (options) { - if (typeof options.write === 'function') this._write = options.write; - - if (typeof options.writev === 'function') this._writev = options.writev; - } - - Stream.call(this); -} - -// Otherwise people can pipe Writable streams, which is just wrong. -Writable.prototype.pipe = function () { - this.emit('error', new Error('Cannot pipe. Not readable.')); -}; - -function writeAfterEnd(stream, cb) { - var er = new Error('write after end'); - // TODO: defer error events consistently everywhere, not just the cb - stream.emit('error', er); - processNextTick(cb, er); -} - -// If we get something that is not a buffer, string, null, or undefined, -// and we're not in objectMode, then that's an error. -// Otherwise stream chunks are all considered to be of length=1, and the -// watermarks determine how many objects to keep in the buffer, rather than -// how many bytes or characters. -function validChunk(stream, state, chunk, cb) { - var valid = true; - - if (!Buffer.isBuffer(chunk) && typeof chunk !== 'string' && chunk !== null && chunk !== undefined && !state.objectMode) { - var er = new TypeError('Invalid non-string/buffer chunk'); - stream.emit('error', er); - processNextTick(cb, er); - valid = false; - } - return valid; -} - -Writable.prototype.write = function (chunk, encoding, cb) { - var state = this._writableState; - var ret = false; - - if (typeof encoding === 'function') { - cb = encoding; - encoding = null; - } - - if (Buffer.isBuffer(chunk)) encoding = 'buffer';else if (!encoding) encoding = state.defaultEncoding; - - if (typeof cb !== 'function') cb = nop; - - if (state.ended) writeAfterEnd(this, cb);else if (validChunk(this, state, chunk, cb)) { - state.pendingcb++; - ret = writeOrBuffer(this, state, chunk, encoding, cb); - } - - return ret; -}; - -Writable.prototype.cork = function () { - var state = this._writableState; - - state.corked++; -}; - -Writable.prototype.uncork = function () { - var state = this._writableState; - - if (state.corked) { - state.corked--; - - if (!state.writing && !state.corked && !state.finished && !state.bufferProcessing && state.bufferedRequest) clearBuffer(this, state); - } -}; - -Writable.prototype.setDefaultEncoding = function setDefaultEncoding(encoding) { - // node::ParseEncoding() requires lower case. - if (typeof encoding === 'string') encoding = encoding.toLowerCase(); - if (!(['hex', 'utf8', 'utf-8', 'ascii', 'binary', 'base64', 'ucs2', 'ucs-2', 'utf16le', 'utf-16le', 'raw'].indexOf((encoding + '').toLowerCase()) > -1)) throw new TypeError('Unknown encoding: ' + encoding); - this._writableState.defaultEncoding = encoding; -}; - -function decodeChunk(state, chunk, encoding) { - if (!state.objectMode && state.decodeStrings !== false && typeof chunk === 'string') { - chunk = new Buffer(chunk, encoding); - } - return chunk; -} - -// if we're already writing something, then just put this -// in the queue, and wait our turn. Otherwise, call _write -// If we return false, then we need a drain event, so set that flag. -function writeOrBuffer(stream, state, chunk, encoding, cb) { - chunk = decodeChunk(state, chunk, encoding); - - if (Buffer.isBuffer(chunk)) encoding = 'buffer'; - var len = state.objectMode ? 1 : chunk.length; - - state.length += len; - - var ret = state.length < state.highWaterMark; - // we must ensure that previous needDrain will not be reset to false. - if (!ret) state.needDrain = true; - - if (state.writing || state.corked) { - var last = state.lastBufferedRequest; - state.lastBufferedRequest = new WriteReq(chunk, encoding, cb); - if (last) { - last.next = state.lastBufferedRequest; - } else { - state.bufferedRequest = state.lastBufferedRequest; - } - state.bufferedRequestCount += 1; - } else { - doWrite(stream, state, false, len, chunk, encoding, cb); - } - - return ret; -} - -function doWrite(stream, state, writev, len, chunk, encoding, cb) { - state.writelen = len; - state.writecb = cb; - state.writing = true; - state.sync = true; - if (writev) stream._writev(chunk, state.onwrite);else stream._write(chunk, encoding, state.onwrite); - state.sync = false; -} - -function onwriteError(stream, state, sync, er, cb) { - --state.pendingcb; - if (sync) processNextTick(cb, er);else cb(er); - - stream._writableState.errorEmitted = true; - stream.emit('error', er); -} - -function onwriteStateUpdate(state) { - state.writing = false; - state.writecb = null; - state.length -= state.writelen; - state.writelen = 0; -} - -function onwrite(stream, er) { - var state = stream._writableState; - var sync = state.sync; - var cb = state.writecb; - - onwriteStateUpdate(state); - - if (er) onwriteError(stream, state, sync, er, cb);else { - // Check if we're actually ready to finish, but don't emit yet - var finished = needFinish(state); - - if (!finished && !state.corked && !state.bufferProcessing && state.bufferedRequest) { - clearBuffer(stream, state); - } - - if (sync) { - /**/ - asyncWrite(afterWrite, stream, state, finished, cb); - /**/ - } else { - afterWrite(stream, state, finished, cb); - } - } -} - -function afterWrite(stream, state, finished, cb) { - if (!finished) onwriteDrain(stream, state); - state.pendingcb--; - cb(); - finishMaybe(stream, state); -} - -// Must force callback to be called on nextTick, so that we don't -// emit 'drain' before the write() consumer gets the 'false' return -// value, and has a chance to attach a 'drain' listener. -function onwriteDrain(stream, state) { - if (state.length === 0 && state.needDrain) { - state.needDrain = false; - stream.emit('drain'); - } -} - -// if there's something in the buffer waiting, then process it -function clearBuffer(stream, state) { - state.bufferProcessing = true; - var entry = state.bufferedRequest; - - if (stream._writev && entry && entry.next) { - // Fast case, write everything using _writev() - var l = state.bufferedRequestCount; - var buffer = new Array(l); - var holder = state.corkedRequestsFree; - holder.entry = entry; - - var count = 0; - while (entry) { - buffer[count] = entry; - entry = entry.next; - count += 1; - } - - doWrite(stream, state, true, state.length, buffer, '', holder.finish); - - // doWrite is always async, defer these to save a bit of time - // as the hot path ends with doWrite - state.pendingcb++; - state.lastBufferedRequest = null; - state.corkedRequestsFree = holder.next; - holder.next = null; - } else { - // Slow case, write chunks one-by-one - while (entry) { - var chunk = entry.chunk; - var encoding = entry.encoding; - var cb = entry.callback; - var len = state.objectMode ? 1 : chunk.length; - - doWrite(stream, state, false, len, chunk, encoding, cb); - entry = entry.next; - // if we didn't call the onwrite immediately, then - // it means that we need to wait until it does. - // also, that means that the chunk and cb are currently - // being processed, so move the buffer counter past them. - if (state.writing) { - break; - } - } - - if (entry === null) state.lastBufferedRequest = null; - } - - state.bufferedRequestCount = 0; - state.bufferedRequest = entry; - state.bufferProcessing = false; -} - -Writable.prototype._write = function (chunk, encoding, cb) { - cb(new Error('not implemented')); -}; - -Writable.prototype._writev = null; - -Writable.prototype.end = function (chunk, encoding, cb) { - var state = this._writableState; - - if (typeof chunk === 'function') { - cb = chunk; - chunk = null; - encoding = null; - } else if (typeof encoding === 'function') { - cb = encoding; - encoding = null; - } - - if (chunk !== null && chunk !== undefined) this.write(chunk, encoding); - - // .end() fully uncorks - if (state.corked) { - state.corked = 1; - this.uncork(); - } - - // ignore unnecessary end() calls. - if (!state.ending && !state.finished) endWritable(this, state, cb); -}; - -function needFinish(state) { - return state.ending && state.length === 0 && state.bufferedRequest === null && !state.finished && !state.writing; -} - -function prefinish(stream, state) { - if (!state.prefinished) { - state.prefinished = true; - stream.emit('prefinish'); - } -} - -function finishMaybe(stream, state) { - var need = needFinish(state); - if (need) { - if (state.pendingcb === 0) { - prefinish(stream, state); - state.finished = true; - stream.emit('finish'); - } else { - prefinish(stream, state); - } - } - return need; -} - -function endWritable(stream, state, cb) { - state.ending = true; - finishMaybe(stream, state); - if (cb) { - if (state.finished) processNextTick(cb);else stream.once('finish', cb); - } - state.ended = true; - stream.writable = false; -} - -// It seems a linked list but it is not -// there will be only 2 of these for each stream -function CorkedRequest(state) { - var _this = this; - - this.next = null; - this.entry = null; - - this.finish = function (err) { - var entry = _this.entry; - _this.entry = null; - while (entry) { - var cb = entry.callback; - state.pendingcb--; - cb(err); - entry = entry.next; - } - if (state.corkedRequestsFree) { - state.corkedRequestsFree.next = _this; - } else { - state.corkedRequestsFree = _this; - } - }; -} \ No newline at end of file diff --git a/node_modules/bl/node_modules/readable-stream/package.json b/node_modules/bl/node_modules/readable-stream/package.json deleted file mode 100644 index e15d1c56..00000000 --- a/node_modules/bl/node_modules/readable-stream/package.json +++ /dev/null @@ -1,114 +0,0 @@ -{ - "_args": [ - [ - { - "raw": "readable-stream@~2.0.5", - "scope": null, - "escapedName": "readable-stream", - "name": "readable-stream", - "rawSpec": "~2.0.5", - "spec": ">=2.0.5 <2.1.0", - "type": "range" - }, - "/Users/benjaminarias/Desktop/poly/node_modules/bl" - ] - ], - "_from": "readable-stream@>=2.0.5 <2.1.0", - "_id": "readable-stream@2.0.6", - "_inCache": true, - "_installable": true, - "_location": "/bl/readable-stream", - "_nodeVersion": "5.7.0", - "_npmOperationalInternal": { - "host": "packages-12-west.internal.npmjs.com", - "tmp": "tmp/readable-stream-2.0.6.tgz_1457893507709_0.369257491780445" - }, - "_npmUser": { - "name": "cwmma", - "email": "calvin.metcalf@gmail.com" - }, - "_npmVersion": "3.6.0", - "_phantomChildren": {}, - "_requested": { - "raw": "readable-stream@~2.0.5", - "scope": null, - "escapedName": "readable-stream", - "name": "readable-stream", - "rawSpec": "~2.0.5", - "spec": ">=2.0.5 <2.1.0", - "type": "range" - }, - "_requiredBy": [ - "/bl" - ], - "_resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.0.6.tgz", - "_shasum": "8f90341e68a53ccc928788dacfcd11b36eb9b78e", - "_shrinkwrap": null, - "_spec": "readable-stream@~2.0.5", - "_where": "/Users/benjaminarias/Desktop/poly/node_modules/bl", - "browser": { - "util": false - }, - "bugs": { - "url": "https://github.com/nodejs/readable-stream/issues" - }, - "dependencies": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.1", - "isarray": "~1.0.0", - "process-nextick-args": "~1.0.6", - "string_decoder": "~0.10.x", - "util-deprecate": "~1.0.1" - }, - "description": "Streams3, a user-land copy of the stream library from Node.js", - "devDependencies": { - "tap": "~0.2.6", - "tape": "~4.5.1", - "zuul": "~3.9.0" - }, - "directories": {}, - "dist": { - "shasum": "8f90341e68a53ccc928788dacfcd11b36eb9b78e", - "tarball": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.0.6.tgz" - }, - "gitHead": "01fb5608a970b42c900b96746cadc13d27dd9d7e", - "homepage": "https://github.com/nodejs/readable-stream#readme", - "keywords": [ - "readable", - "stream", - "pipe" - ], - "license": "MIT", - "main": "readable.js", - "maintainers": [ - { - "name": "isaacs", - "email": "isaacs@npmjs.com" - }, - { - "name": "tootallnate", - "email": "nathan@tootallnate.net" - }, - { - "name": "rvagg", - "email": "rod@vagg.org" - }, - { - "name": "cwmma", - "email": "calvin.metcalf@gmail.com" - } - ], - "name": "readable-stream", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git://github.com/nodejs/readable-stream.git" - }, - "scripts": { - "browser": "npm run write-zuul && zuul -- test/browser.js", - "test": "tap test/parallel/*.js test/ours/*.js", - "write-zuul": "printf \"ui: tape\nbrowsers:\n - name: $BROWSER_NAME\n version: $BROWSER_VERSION\n\">.zuul.yml" - }, - "version": "2.0.6" -} diff --git a/node_modules/bl/node_modules/readable-stream/passthrough.js b/node_modules/bl/node_modules/readable-stream/passthrough.js deleted file mode 100644 index 27e8d8a5..00000000 --- a/node_modules/bl/node_modules/readable-stream/passthrough.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require("./lib/_stream_passthrough.js") diff --git a/node_modules/bl/node_modules/readable-stream/readable.js b/node_modules/bl/node_modules/readable-stream/readable.js deleted file mode 100644 index 6222a579..00000000 --- a/node_modules/bl/node_modules/readable-stream/readable.js +++ /dev/null @@ -1,12 +0,0 @@ -var Stream = (function (){ - try { - return require('st' + 'ream'); // hack to fix a circular dependency issue when used with browserify - } catch(_){} -}()); -exports = module.exports = require('./lib/_stream_readable.js'); -exports.Stream = Stream || exports; -exports.Readable = exports; -exports.Writable = require('./lib/_stream_writable.js'); -exports.Duplex = require('./lib/_stream_duplex.js'); -exports.Transform = require('./lib/_stream_transform.js'); -exports.PassThrough = require('./lib/_stream_passthrough.js'); diff --git a/node_modules/bl/node_modules/readable-stream/transform.js b/node_modules/bl/node_modules/readable-stream/transform.js deleted file mode 100644 index 5d482f07..00000000 --- a/node_modules/bl/node_modules/readable-stream/transform.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require("./lib/_stream_transform.js") diff --git a/node_modules/bl/node_modules/readable-stream/writable.js b/node_modules/bl/node_modules/readable-stream/writable.js deleted file mode 100644 index e1e9efdf..00000000 --- a/node_modules/bl/node_modules/readable-stream/writable.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require("./lib/_stream_writable.js") diff --git a/node_modules/bl/package.json b/node_modules/bl/package.json deleted file mode 100644 index 11147e08..00000000 --- a/node_modules/bl/package.json +++ /dev/null @@ -1,104 +0,0 @@ -{ - "_args": [ - [ - { - "raw": "bl@~1.1.2", - "scope": null, - "escapedName": "bl", - "name": "bl", - "rawSpec": "~1.1.2", - "spec": ">=1.1.2 <1.2.0", - "type": "range" - }, - "/Users/benjaminarias/Desktop/poly/node_modules/request" - ] - ], - "_from": "bl@>=1.1.2 <1.2.0", - "_id": "bl@1.1.2", - "_inCache": true, - "_installable": true, - "_location": "/bl", - "_nodeVersion": "5.3.0", - "_npmOperationalInternal": { - "host": "packages-9-west.internal.npmjs.com", - "tmp": "tmp/bl-1.1.2.tgz_1455246621698_0.6300242957659066" - }, - "_npmUser": { - "name": "rvagg", - "email": "rod@vagg.org" - }, - "_npmVersion": "3.3.12", - "_phantomChildren": { - "core-util-is": "1.0.2", - "inherits": "2.0.3", - "process-nextick-args": "1.0.7", - "string_decoder": "0.10.31", - "util-deprecate": "1.0.2" - }, - "_requested": { - "raw": "bl@~1.1.2", - "scope": null, - "escapedName": "bl", - "name": "bl", - "rawSpec": "~1.1.2", - "spec": ">=1.1.2 <1.2.0", - "type": "range" - }, - "_requiredBy": [ - "/request" - ], - "_resolved": "https://registry.npmjs.org/bl/-/bl-1.1.2.tgz", - "_shasum": "fdca871a99713aa00d19e3bbba41c44787a65398", - "_shrinkwrap": null, - "_spec": "bl@~1.1.2", - "_where": "/Users/benjaminarias/Desktop/poly/node_modules/request", - "authors": [ - "Rod Vagg (https://github.com/rvagg)", - "Matteo Collina (https://github.com/mcollina)", - "Jarett Cruger (https://github.com/jcrugzz)" - ], - "bugs": { - "url": "https://github.com/rvagg/bl/issues" - }, - "dependencies": { - "readable-stream": "~2.0.5" - }, - "description": "Buffer List: collect buffers and access with a standard readable Buffer interface, streamable too!", - "devDependencies": { - "faucet": "0.0.1", - "hash_file": "~0.1.1", - "tape": "~4.4.0" - }, - "directories": {}, - "dist": { - "shasum": "fdca871a99713aa00d19e3bbba41c44787a65398", - "tarball": "https://registry.npmjs.org/bl/-/bl-1.1.2.tgz" - }, - "gitHead": "ea42021059dc65fc60d7f4b9217c73431f09d23d", - "homepage": "https://github.com/rvagg/bl", - "keywords": [ - "buffer", - "buffers", - "stream", - "awesomesauce" - ], - "license": "MIT", - "main": "bl.js", - "maintainers": [ - { - "name": "rvagg", - "email": "rod@vagg.org" - } - ], - "name": "bl", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git+https://github.com/rvagg/bl.git" - }, - "scripts": { - "test": "node test/test.js | faucet" - }, - "version": "1.1.2" -} diff --git a/node_modules/bl/test/test.js b/node_modules/bl/test/test.js deleted file mode 100644 index c95b1ba4..00000000 --- a/node_modules/bl/test/test.js +++ /dev/null @@ -1,640 +0,0 @@ -var tape = require('tape') - , crypto = require('crypto') - , fs = require('fs') - , hash = require('hash_file') - , BufferList = require('../') - - , encodings = - ('hex utf8 utf-8 ascii binary base64' - + (process.browser ? '' : ' ucs2 ucs-2 utf16le utf-16le')).split(' ') - -tape('single bytes from single buffer', function (t) { - var bl = new BufferList() - bl.append(new Buffer('abcd')) - - t.equal(bl.length, 4) - - t.equal(bl.get(0), 97) - t.equal(bl.get(1), 98) - t.equal(bl.get(2), 99) - t.equal(bl.get(3), 100) - - t.end() -}) - -tape('single bytes from multiple buffers', function (t) { - var bl = new BufferList() - bl.append(new Buffer('abcd')) - bl.append(new Buffer('efg')) - bl.append(new Buffer('hi')) - bl.append(new Buffer('j')) - - t.equal(bl.length, 10) - - t.equal(bl.get(0), 97) - t.equal(bl.get(1), 98) - t.equal(bl.get(2), 99) - t.equal(bl.get(3), 100) - t.equal(bl.get(4), 101) - t.equal(bl.get(5), 102) - t.equal(bl.get(6), 103) - t.equal(bl.get(7), 104) - t.equal(bl.get(8), 105) - t.equal(bl.get(9), 106) - t.end() -}) - -tape('multi bytes from single buffer', function (t) { - var bl = new BufferList() - bl.append(new Buffer('abcd')) - - t.equal(bl.length, 4) - - t.equal(bl.slice(0, 4).toString('ascii'), 'abcd') - t.equal(bl.slice(0, 3).toString('ascii'), 'abc') - t.equal(bl.slice(1, 4).toString('ascii'), 'bcd') - - t.end() -}) - -tape('multiple bytes from multiple buffers', function (t) { - var bl = new BufferList() - - bl.append(new Buffer('abcd')) - bl.append(new Buffer('efg')) - bl.append(new Buffer('hi')) - bl.append(new Buffer('j')) - - t.equal(bl.length, 10) - - t.equal(bl.slice(0, 10).toString('ascii'), 'abcdefghij') - t.equal(bl.slice(3, 10).toString('ascii'), 'defghij') - t.equal(bl.slice(3, 6).toString('ascii'), 'def') - t.equal(bl.slice(3, 8).toString('ascii'), 'defgh') - t.equal(bl.slice(5, 10).toString('ascii'), 'fghij') - - t.end() -}) - -tape('multiple bytes from multiple buffer lists', function (t) { - var bl = new BufferList() - - bl.append(new BufferList([ new Buffer('abcd'), new Buffer('efg') ])) - bl.append(new BufferList([ new Buffer('hi'), new Buffer('j') ])) - - t.equal(bl.length, 10) - - t.equal(bl.slice(0, 10).toString('ascii'), 'abcdefghij') - - t.equal(bl.slice(3, 10).toString('ascii'), 'defghij') - t.equal(bl.slice(3, 6).toString('ascii'), 'def') - t.equal(bl.slice(3, 8).toString('ascii'), 'defgh') - t.equal(bl.slice(5, 10).toString('ascii'), 'fghij') - - t.end() -}) - -// same data as previous test, just using nested constructors -tape('multiple bytes from crazy nested buffer lists', function (t) { - var bl = new BufferList() - - bl.append(new BufferList([ - new BufferList([ - new BufferList(new Buffer('abc')) - , new Buffer('d') - , new BufferList(new Buffer('efg')) - ]) - , new BufferList([ new Buffer('hi') ]) - , new BufferList(new Buffer('j')) - ])) - - t.equal(bl.length, 10) - - t.equal(bl.slice(0, 10).toString('ascii'), 'abcdefghij') - - t.equal(bl.slice(3, 10).toString('ascii'), 'defghij') - t.equal(bl.slice(3, 6).toString('ascii'), 'def') - t.equal(bl.slice(3, 8).toString('ascii'), 'defgh') - t.equal(bl.slice(5, 10).toString('ascii'), 'fghij') - - t.end() -}) - -tape('append accepts arrays of Buffers', function (t) { - var bl = new BufferList() - bl.append(new Buffer('abc')) - bl.append([ new Buffer('def') ]) - bl.append([ new Buffer('ghi'), new Buffer('jkl') ]) - bl.append([ new Buffer('mnop'), new Buffer('qrstu'), new Buffer('vwxyz') ]) - t.equal(bl.length, 26) - t.equal(bl.slice().toString('ascii'), 'abcdefghijklmnopqrstuvwxyz') - t.end() -}) - -tape('append accepts arrays of BufferLists', function (t) { - var bl = new BufferList() - bl.append(new Buffer('abc')) - bl.append([ new BufferList('def') ]) - bl.append(new BufferList([ new Buffer('ghi'), new BufferList('jkl') ])) - bl.append([ new Buffer('mnop'), new BufferList([ new Buffer('qrstu'), new Buffer('vwxyz') ]) ]) - t.equal(bl.length, 26) - t.equal(bl.slice().toString('ascii'), 'abcdefghijklmnopqrstuvwxyz') - t.end() -}) - -tape('append chainable', function (t) { - var bl = new BufferList() - t.ok(bl.append(new Buffer('abcd')) === bl) - t.ok(bl.append([ new Buffer('abcd') ]) === bl) - t.ok(bl.append(new BufferList(new Buffer('abcd'))) === bl) - t.ok(bl.append([ new BufferList(new Buffer('abcd')) ]) === bl) - t.end() -}) - -tape('append chainable (test results)', function (t) { - var bl = new BufferList('abc') - .append([ new BufferList('def') ]) - .append(new BufferList([ new Buffer('ghi'), new BufferList('jkl') ])) - .append([ new Buffer('mnop'), new BufferList([ new Buffer('qrstu'), new Buffer('vwxyz') ]) ]) - - t.equal(bl.length, 26) - t.equal(bl.slice().toString('ascii'), 'abcdefghijklmnopqrstuvwxyz') - t.end() -}) - -tape('consuming from multiple buffers', function (t) { - var bl = new BufferList() - - bl.append(new Buffer('abcd')) - bl.append(new Buffer('efg')) - bl.append(new Buffer('hi')) - bl.append(new Buffer('j')) - - t.equal(bl.length, 10) - - t.equal(bl.slice(0, 10).toString('ascii'), 'abcdefghij') - - bl.consume(3) - t.equal(bl.length, 7) - t.equal(bl.slice(0, 7).toString('ascii'), 'defghij') - - bl.consume(2) - t.equal(bl.length, 5) - t.equal(bl.slice(0, 5).toString('ascii'), 'fghij') - - bl.consume(1) - t.equal(bl.length, 4) - t.equal(bl.slice(0, 4).toString('ascii'), 'ghij') - - bl.consume(1) - t.equal(bl.length, 3) - t.equal(bl.slice(0, 3).toString('ascii'), 'hij') - - bl.consume(2) - t.equal(bl.length, 1) - t.equal(bl.slice(0, 1).toString('ascii'), 'j') - - t.end() -}) - -tape('complete consumption', function (t) { - var bl = new BufferList() - - bl.append(new Buffer('a')) - bl.append(new Buffer('b')) - - bl.consume(2) - - t.equal(bl.length, 0) - t.equal(bl._bufs.length, 0) - - t.end() -}) - -tape('test readUInt8 / readInt8', function (t) { - var buf1 = new Buffer(1) - , buf2 = new Buffer(3) - , buf3 = new Buffer(3) - , bl = new BufferList() - - buf2[1] = 0x3 - buf2[2] = 0x4 - buf3[0] = 0x23 - buf3[1] = 0x42 - - bl.append(buf1) - bl.append(buf2) - bl.append(buf3) - - t.equal(bl.readUInt8(2), 0x3) - t.equal(bl.readInt8(2), 0x3) - t.equal(bl.readUInt8(3), 0x4) - t.equal(bl.readInt8(3), 0x4) - t.equal(bl.readUInt8(4), 0x23) - t.equal(bl.readInt8(4), 0x23) - t.equal(bl.readUInt8(5), 0x42) - t.equal(bl.readInt8(5), 0x42) - t.end() -}) - -tape('test readUInt16LE / readUInt16BE / readInt16LE / readInt16BE', function (t) { - var buf1 = new Buffer(1) - , buf2 = new Buffer(3) - , buf3 = new Buffer(3) - , bl = new BufferList() - - buf2[1] = 0x3 - buf2[2] = 0x4 - buf3[0] = 0x23 - buf3[1] = 0x42 - - bl.append(buf1) - bl.append(buf2) - bl.append(buf3) - - t.equal(bl.readUInt16BE(2), 0x0304) - t.equal(bl.readUInt16LE(2), 0x0403) - t.equal(bl.readInt16BE(2), 0x0304) - t.equal(bl.readInt16LE(2), 0x0403) - t.equal(bl.readUInt16BE(3), 0x0423) - t.equal(bl.readUInt16LE(3), 0x2304) - t.equal(bl.readInt16BE(3), 0x0423) - t.equal(bl.readInt16LE(3), 0x2304) - t.equal(bl.readUInt16BE(4), 0x2342) - t.equal(bl.readUInt16LE(4), 0x4223) - t.equal(bl.readInt16BE(4), 0x2342) - t.equal(bl.readInt16LE(4), 0x4223) - t.end() -}) - -tape('test readUInt32LE / readUInt32BE / readInt32LE / readInt32BE', function (t) { - var buf1 = new Buffer(1) - , buf2 = new Buffer(3) - , buf3 = new Buffer(3) - , bl = new BufferList() - - buf2[1] = 0x3 - buf2[2] = 0x4 - buf3[0] = 0x23 - buf3[1] = 0x42 - - bl.append(buf1) - bl.append(buf2) - bl.append(buf3) - - t.equal(bl.readUInt32BE(2), 0x03042342) - t.equal(bl.readUInt32LE(2), 0x42230403) - t.equal(bl.readInt32BE(2), 0x03042342) - t.equal(bl.readInt32LE(2), 0x42230403) - t.end() -}) - -tape('test readFloatLE / readFloatBE', function (t) { - var buf1 = new Buffer(1) - , buf2 = new Buffer(3) - , buf3 = new Buffer(3) - , bl = new BufferList() - - buf2[1] = 0x00 - buf2[2] = 0x00 - buf3[0] = 0x80 - buf3[1] = 0x3f - - bl.append(buf1) - bl.append(buf2) - bl.append(buf3) - - t.equal(bl.readFloatLE(2), 0x01) - t.end() -}) - -tape('test readDoubleLE / readDoubleBE', function (t) { - var buf1 = new Buffer(1) - , buf2 = new Buffer(3) - , buf3 = new Buffer(10) - , bl = new BufferList() - - buf2[1] = 0x55 - buf2[2] = 0x55 - buf3[0] = 0x55 - buf3[1] = 0x55 - buf3[2] = 0x55 - buf3[3] = 0x55 - buf3[4] = 0xd5 - buf3[5] = 0x3f - - bl.append(buf1) - bl.append(buf2) - bl.append(buf3) - - t.equal(bl.readDoubleLE(2), 0.3333333333333333) - t.end() -}) - -tape('test toString', function (t) { - var bl = new BufferList() - - bl.append(new Buffer('abcd')) - bl.append(new Buffer('efg')) - bl.append(new Buffer('hi')) - bl.append(new Buffer('j')) - - t.equal(bl.toString('ascii', 0, 10), 'abcdefghij') - t.equal(bl.toString('ascii', 3, 10), 'defghij') - t.equal(bl.toString('ascii', 3, 6), 'def') - t.equal(bl.toString('ascii', 3, 8), 'defgh') - t.equal(bl.toString('ascii', 5, 10), 'fghij') - - t.end() -}) - -tape('test toString encoding', function (t) { - var bl = new BufferList() - , b = new Buffer('abcdefghij\xff\x00') - - bl.append(new Buffer('abcd')) - bl.append(new Buffer('efg')) - bl.append(new Buffer('hi')) - bl.append(new Buffer('j')) - bl.append(new Buffer('\xff\x00')) - - encodings.forEach(function (enc) { - t.equal(bl.toString(enc), b.toString(enc), enc) - }) - - t.end() -}) - -!process.browser && tape('test stream', function (t) { - var random = crypto.randomBytes(65534) - , rndhash = hash(random, 'md5') - , md5sum = crypto.createHash('md5') - , bl = new BufferList(function (err, buf) { - t.ok(Buffer.isBuffer(buf)) - t.ok(err === null) - t.equal(rndhash, hash(bl.slice(), 'md5')) - t.equal(rndhash, hash(buf, 'md5')) - - bl.pipe(fs.createWriteStream('/tmp/bl_test_rnd_out.dat')) - .on('close', function () { - var s = fs.createReadStream('/tmp/bl_test_rnd_out.dat') - s.on('data', md5sum.update.bind(md5sum)) - s.on('end', function() { - t.equal(rndhash, md5sum.digest('hex'), 'woohoo! correct hash!') - t.end() - }) - }) - - }) - - fs.writeFileSync('/tmp/bl_test_rnd.dat', random) - fs.createReadStream('/tmp/bl_test_rnd.dat').pipe(bl) -}) - -tape('instantiation with Buffer', function (t) { - var buf = crypto.randomBytes(1024) - , buf2 = crypto.randomBytes(1024) - , b = BufferList(buf) - - t.equal(buf.toString('hex'), b.slice().toString('hex'), 'same buffer') - b = BufferList([ buf, buf2 ]) - t.equal(b.slice().toString('hex'), Buffer.concat([ buf, buf2 ]).toString('hex'), 'same buffer') - t.end() -}) - -tape('test String appendage', function (t) { - var bl = new BufferList() - , b = new Buffer('abcdefghij\xff\x00') - - bl.append('abcd') - bl.append('efg') - bl.append('hi') - bl.append('j') - bl.append('\xff\x00') - - encodings.forEach(function (enc) { - t.equal(bl.toString(enc), b.toString(enc)) - }) - - t.end() -}) - -tape('test Number appendage', function (t) { - var bl = new BufferList() - , b = new Buffer('1234567890') - - bl.append(1234) - bl.append(567) - bl.append(89) - bl.append(0) - - encodings.forEach(function (enc) { - t.equal(bl.toString(enc), b.toString(enc)) - }) - - t.end() -}) - -tape('write nothing, should get empty buffer', function (t) { - t.plan(3) - BufferList(function (err, data) { - t.notOk(err, 'no error') - t.ok(Buffer.isBuffer(data), 'got a buffer') - t.equal(0, data.length, 'got a zero-length buffer') - t.end() - }).end() -}) - -tape('unicode string', function (t) { - t.plan(2) - var inp1 = '\u2600' - , inp2 = '\u2603' - , exp = inp1 + ' and ' + inp2 - , bl = BufferList() - bl.write(inp1) - bl.write(' and ') - bl.write(inp2) - t.equal(exp, bl.toString()) - t.equal(new Buffer(exp).toString('hex'), bl.toString('hex')) -}) - -tape('should emit finish', function (t) { - var source = BufferList() - , dest = BufferList() - - source.write('hello') - source.pipe(dest) - - dest.on('finish', function () { - t.equal(dest.toString('utf8'), 'hello') - t.end() - }) -}) - -tape('basic copy', function (t) { - var buf = crypto.randomBytes(1024) - , buf2 = new Buffer(1024) - , b = BufferList(buf) - - b.copy(buf2) - t.equal(b.slice().toString('hex'), buf2.toString('hex'), 'same buffer') - t.end() -}) - -tape('copy after many appends', function (t) { - var buf = crypto.randomBytes(512) - , buf2 = new Buffer(1024) - , b = BufferList(buf) - - b.append(buf) - b.copy(buf2) - t.equal(b.slice().toString('hex'), buf2.toString('hex'), 'same buffer') - t.end() -}) - -tape('copy at a precise position', function (t) { - var buf = crypto.randomBytes(1004) - , buf2 = new Buffer(1024) - , b = BufferList(buf) - - b.copy(buf2, 20) - t.equal(b.slice().toString('hex'), buf2.slice(20).toString('hex'), 'same buffer') - t.end() -}) - -tape('copy starting from a precise location', function (t) { - var buf = crypto.randomBytes(10) - , buf2 = new Buffer(5) - , b = BufferList(buf) - - b.copy(buf2, 0, 5) - t.equal(b.slice(5).toString('hex'), buf2.toString('hex'), 'same buffer') - t.end() -}) - -tape('copy in an interval', function (t) { - var rnd = crypto.randomBytes(10) - , b = BufferList(rnd) // put the random bytes there - , actual = new Buffer(3) - , expected = new Buffer(3) - - rnd.copy(expected, 0, 5, 8) - b.copy(actual, 0, 5, 8) - - t.equal(actual.toString('hex'), expected.toString('hex'), 'same buffer') - t.end() -}) - -tape('copy an interval between two buffers', function (t) { - var buf = crypto.randomBytes(10) - , buf2 = new Buffer(10) - , b = BufferList(buf) - - b.append(buf) - b.copy(buf2, 0, 5, 15) - - t.equal(b.slice(5, 15).toString('hex'), buf2.toString('hex'), 'same buffer') - t.end() -}) - -tape('duplicate', function (t) { - t.plan(2) - - var bl = new BufferList('abcdefghij\xff\x00') - , dup = bl.duplicate() - - t.equal(bl.prototype, dup.prototype) - t.equal(bl.toString('hex'), dup.toString('hex')) -}) - -tape('destroy no pipe', function (t) { - t.plan(2) - - var bl = new BufferList('alsdkfja;lsdkfja;lsdk') - bl.destroy() - - t.equal(bl._bufs.length, 0) - t.equal(bl.length, 0) -}) - -!process.browser && tape('destroy with pipe before read end', function (t) { - t.plan(2) - - var bl = new BufferList() - fs.createReadStream(__dirname + '/test.js') - .pipe(bl) - - bl.destroy() - - t.equal(bl._bufs.length, 0) - t.equal(bl.length, 0) - -}) - -!process.browser && tape('destroy with pipe before read end with race', function (t) { - t.plan(2) - - var bl = new BufferList() - fs.createReadStream(__dirname + '/test.js') - .pipe(bl) - - setTimeout(function () { - bl.destroy() - setTimeout(function () { - t.equal(bl._bufs.length, 0) - t.equal(bl.length, 0) - }, 500) - }, 500) -}) - -!process.browser && tape('destroy with pipe after read end', function (t) { - t.plan(2) - - var bl = new BufferList() - fs.createReadStream(__dirname + '/test.js') - .on('end', onEnd) - .pipe(bl) - - function onEnd () { - bl.destroy() - - t.equal(bl._bufs.length, 0) - t.equal(bl.length, 0) - } -}) - -!process.browser && tape('destroy with pipe while writing to a destination', function (t) { - t.plan(4) - - var bl = new BufferList() - , ds = new BufferList() - - fs.createReadStream(__dirname + '/test.js') - .on('end', onEnd) - .pipe(bl) - - function onEnd () { - bl.pipe(ds) - - setTimeout(function () { - bl.destroy() - - t.equals(bl._bufs.length, 0) - t.equals(bl.length, 0) - - ds.destroy() - - t.equals(bl._bufs.length, 0) - t.equals(bl.length, 0) - - }, 100) - } -}) - -!process.browser && tape('handle error', function (t) { - t.plan(2) - fs.createReadStream('/does/not/exist').pipe(BufferList(function (err, data) { - t.ok(err instanceof Error, 'has error') - t.notOk(data, 'no data') - })) -}) diff --git a/node_modules/bluebird/LICENSE b/node_modules/bluebird/LICENSE deleted file mode 100644 index 4182a1e1..00000000 --- a/node_modules/bluebird/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2013-2015 Petka Antonov - -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/node_modules/bluebird/README.md b/node_modules/bluebird/README.md deleted file mode 100644 index fcb1daa7..00000000 --- a/node_modules/bluebird/README.md +++ /dev/null @@ -1,677 +0,0 @@ - - Promises/A+ logo - -[![Build Status](https://travis-ci.org/petkaantonov/bluebird.svg?branch=master)](https://travis-ci.org/petkaantonov/bluebird) -[![coverage-98%](http://img.shields.io/badge/coverage-98%-brightgreen.svg?style=flat)](http://petkaantonov.github.io/bluebird/coverage/debug/index.html) - -**Got a question?** Join us on [stackoverflow](http://stackoverflow.com/questions/tagged/bluebird), the [mailing list](https://groups.google.com/forum/#!forum/bluebird-js) or chat on [IRC](https://webchat.freenode.net/?channels=#promises) - -# Introduction - -Bluebird is a fully featured [promise](#what-are-promises-and-why-should-i-use-them) library with focus on innovative features and performance - - - -# Topics - -- [Features](#features) -- [Quick start](#quick-start) -- [API Reference and examples](API.md) -- [Support](#support) -- [What are promises and why should I use them?](#what-are-promises-and-why-should-i-use-them) -- [Questions and issues](#questions-and-issues) -- [Error handling](#error-handling) -- [Development](#development) - - [Testing](#testing) - - [Benchmarking](#benchmarks) - - [Custom builds](#custom-builds) - - [For library authors](#for-library-authors) -- [What is the sync build?](#what-is-the-sync-build) -- [License](#license) -- [Snippets for common problems](https://github.com/petkaantonov/bluebird/wiki/Snippets) -- [Promise anti-patterns](https://github.com/petkaantonov/bluebird/wiki/Promise-anti-patterns) -- [Changelog](changelog.md) -- [Optimization guide](#optimization-guide) - -# Features -bluebird logo - -- [Promises A+](http://promisesaplus.com) -- [Synchronous inspection](API.md#synchronous-inspection) -- [Concurrency coordination](API.md#collections) -- [Promisification on steroids](API.md#promisification) -- [Resource management through a parallel of python `with`/C# `using`](API.md#resource-management) -- [Cancellation and timeouts](API.md#cancellation) -- [Parallel for C# `async` and `await`](API.md#generators) -- Mind blowing utilities such as - - [`.bind()`](API.md#binddynamic-thisarg---promise) - - [`.call()`](API.md#callstring-propertyname--dynamic-arg---promise) - - [`Promise.join()`](API.md#promisejoinpromisethenablevalue-promises-function-handler---promise) - - [And](API.md#core) [much](API.md#timers) [more](API.md#utility)! -- [Practical debugging solutions and sane defaults](#error-handling) -- [Sick performance](benchmark/) - -
- -# Quick start - -## Node.js - - npm install bluebird - -Then: - -```js -var Promise = require("bluebird"); -``` - -## Browsers - -There are many ways to use bluebird in browsers: - -- Direct downloads - - Full build [bluebird.js](https://cdn.jsdelivr.net/bluebird/2.10.2/bluebird.js) - - Full build minified [bluebird.min.js](https://cdn.jsdelivr.net/bluebird/2.10.2/bluebird.min.js) -- You may use browserify on the main export -- You may use the [bower](http://bower.io) package. - -When using script tags the global variables `Promise` and `P` (alias for `Promise`) become available. - -A [minimal bluebird browser build](#custom-builds) is ≈38.92KB minified*, 11.65KB gzipped and has no external dependencies. - -*Google Closure Compiler using Simple. - -#### Browser support - -Browsers that [implement ECMA-262, edition 3](http://en.wikipedia.org/wiki/Ecmascript#Implementations) and later are supported. - -[![Selenium Test Status](https://saucelabs.com/browser-matrix/petka_antonov.svg)](https://saucelabs.com/u/petka_antonov) - -**Note** that in ECMA-262, edition 3 (IE7, IE8 etc.) it is not possible to use methods that have keyword names like `.catch` and `.finally`. The [API documentation](API.md) always lists a compatible alternative name that you can use if you need to support these browsers. For example `.catch` is replaced with `.caught` and `.finally` with `.lastly`. - -Also, [long stack trace](API.md#promiselongstacktraces---void) support is only available in Chrome, Firefox and Internet Explorer 10+. - -After quick start, see [API Reference and examples](API.md) - -
- -# Support - -- Mailing list: [bluebird-js@googlegroups.com](https://groups.google.com/forum/#!forum/bluebird-js) -- IRC: #promises @freenode -- StackOverflow: [bluebird tag](http://stackoverflow.com/questions/tagged/bluebird) -- Bugs and feature requests: [github issue tracker](https://github.com/petkaantonov/bluebird/issues?state=open) - -
- -# What are promises and why should I use them? - -You should use promises to turn this: - -```js -fs.readFile("file.json", function(err, val) { - if( err ) { - console.error("unable to read file"); - } - else { - try { - val = JSON.parse(val); - console.log(val.success); - } - catch( e ) { - console.error("invalid json in file"); - } - } -}); -``` - -Into this: - -```js -fs.readFileAsync("file.json").then(JSON.parse).then(function(val) { - console.log(val.success); -}) -.catch(SyntaxError, function(e) { - console.error("invalid json in file"); -}) -.catch(function(e) { - console.error("unable to read file"); -}); -``` - -*If you are wondering "there is no `readFileAsync` method on `fs` that returns a promise", see [promisification](API.md#promisification)* - -Actually you might notice the latter has a lot in common with code that would do the same using synchronous I/O: - -```js -try { - var val = JSON.parse(fs.readFileSync("file.json")); - console.log(val.success); -} -//Syntax actually not supported in JS but drives the point -catch(SyntaxError e) { - console.error("invalid json in file"); -} -catch(Error e) { - console.error("unable to read file"); -} -``` - -And that is the point - being able to have something that is a lot like `return` and `throw` in synchronous code. - -You can also use promises to improve code that was written with callback helpers: - - -```js -//Copyright Plato http://stackoverflow.com/a/19385911/995876 -//CC BY-SA 2.5 -mapSeries(URLs, function (URL, done) { - var options = {}; - needle.get(URL, options, function (error, response, body) { - if (error) { - return done(error); - } - try { - var ret = JSON.parse(body); - return done(null, ret); - } - catch (e) { - done(e); - } - }); -}, function (err, results) { - if (err) { - console.log(err); - } else { - console.log('All Needle requests successful'); - // results is a 1 to 1 mapping in order of URLs > needle.body - processAndSaveAllInDB(results, function (err) { - if (err) { - return done(err); - } - console.log('All Needle requests saved'); - done(null); - }); - } -}); -``` - -Is more pleasing to the eye when done with promises: - -```js -Promise.promisifyAll(needle); -var options = {}; - -var current = Promise.resolve(); -Promise.map(URLs, function(URL) { - current = current.then(function () { - return needle.getAsync(URL, options); - }); - return current; -}).map(function(responseAndBody){ - return JSON.parse(responseAndBody[1]); -}).then(function (results) { - return processAndSaveAllInDB(results); -}).then(function(){ - console.log('All Needle requests saved'); -}).catch(function (e) { - console.log(e); -}); -``` - -Also promises don't just give you correspondences for synchronous features but can also be used as limited event emitters or callback aggregators. - -More reading: - - - [Promise nuggets](https://promise-nuggets.github.io/) - - [Why I am switching to promises](http://spion.github.io/posts/why-i-am-switching-to-promises.html) - - [What is the the point of promises](http://domenic.me/2012/10/14/youre-missing-the-point-of-promises/#toc_1) - - [Snippets for common problems](https://github.com/petkaantonov/bluebird/wiki/Snippets) - - [Promise anti-patterns](https://github.com/petkaantonov/bluebird/wiki/Promise-anti-patterns) - -# Questions and issues - -The [github issue tracker](https://github.com/petkaantonov/bluebird/issues) is **_only_** for bug reports and feature requests. Anything else, such as questions for help in using the library, should be posted in [StackOverflow](http://stackoverflow.com/questions/tagged/bluebird) under tags `promise` and `bluebird`. - -# Error handling - -This is a problem every promise library needs to handle in some way. Unhandled rejections/exceptions don't really have a good agreed-on asynchronous correspondence. The problem is that it is impossible to predict the future and know if a rejected promise will eventually be handled. - -There are two common pragmatic attempts at solving the problem that promise libraries do. - -The more popular one is to have the user explicitly communicate that they are done and any unhandled rejections should be thrown, like so: - -```js -download().then(...).then(...).done(); -``` - -For handling this problem, in my opinion, this is completely unacceptable and pointless. The user must remember to explicitly call `.done` and that cannot be justified when the problem is forgetting to create an error handler in the first place. - -The second approach, which is what bluebird by default takes, is to call a registered handler if a rejection is unhandled by the start of a second turn. The default handler is to write the stack trace to `stderr` or `console.error` in browsers. This is close to what happens with synchronous code - your code doesn't work as expected and you open console and see a stack trace. Nice. - -Of course this is not perfect, if your code for some reason needs to swoop in and attach error handler to some promise after the promise has been hanging around a while then you will see annoying messages. In that case you can use the `.done()` method to signal that any hanging exceptions should be thrown. - -If you want to override the default handler for these possibly unhandled rejections, you can pass yours like so: - -```js -Promise.onPossiblyUnhandledRejection(function(error){ - throw error; -}); -``` - -If you want to also enable long stack traces, call: - -```js -Promise.longStackTraces(); -``` - -right after the library is loaded. - -In node.js use the environment flag `BLUEBIRD_DEBUG`: - -``` -BLUEBIRD_DEBUG=1 node server.js -``` - -to enable long stack traces in all instances of bluebird. - -Long stack traces cannot be disabled after being enabled, and cannot be enabled after promises have already been created. Long stack traces imply a substantial performance penalty, even after using every trick to optimize them. - -Long stack traces are enabled by default in the debug build. - -#### Expected and unexpected errors - -A practical problem with Promises/A+ is that it models Javascript `try-catch` too closely for its own good. Therefore by default promises inherit `try-catch` warts such as the inability to specify the error types that the catch block is eligible for. It is an anti-pattern in every other language to use catch-all handlers because they swallow exceptions that you might not know about. - -Now, Javascript does have a perfectly fine and working way of creating error type hierarchies. It is still quite awkward to use them with the built-in `try-catch` however: - -```js -try { - //code -} -catch(e) { - if( e instanceof WhatIWantError) { - //handle - } - else { - throw e; - } -} -``` - -Without such checking, unexpected errors would be silently swallowed. However, with promises, bluebird brings the future (hopefully) here now and extends the `.catch` to [accept potential error type eligibility](API.md#catchfunction-errorclass-function-handler---promise). - -For instance here it is expected that some evil or incompetent entity will try to crash our server from `SyntaxError` by providing syntactically invalid JSON: - -```js -getJSONFromSomewhere().then(function(jsonString) { - return JSON.parse(jsonString); -}).then(function(object) { - console.log("it was valid json: ", object); -}).catch(SyntaxError, function(e){ - console.log("don't be evil"); -}); -``` - -Here any kind of unexpected error will be automatically reported on `stderr` along with a stack trace because we only register a handler for the expected `SyntaxError`. - -Ok, so, that's pretty neat. But actually not many libraries define error types and it is in fact a complete ghetto out there with ad hoc strings being attached as some arbitrary property name like `.name`, `.type`, `.code`, not having any property at all or even throwing strings as errors and so on. So how can we still listen for expected errors? - -Bluebird defines a special error type `OperationalError` (you can get a reference from `Promise.OperationalError`). This type of error is given as rejection reason by promisified methods when -their underlying library gives an untyped, but expected error. Primitives such as strings, and error objects that are directly created like `new Error("database didn't respond")` are considered untyped. - -Example of such library is the node core library `fs`. So if we promisify it, we can catch just the errors we want pretty easily and have programmer errors be redirected to unhandled rejection handler so that we notice them: - -```js -//Read more about promisification in the API Reference: -//API.md -var fs = Promise.promisifyAll(require("fs")); - -fs.readFileAsync("myfile.json").then(JSON.parse).then(function (json) { - console.log("Successful json"); -}).catch(SyntaxError, function (e) { - console.error("file contains invalid json"); -}).catch(Promise.OperationalError, function (e) { - console.error("unable to read file, because: ", e.message); -}); -``` - -The last `catch` handler is only invoked when the `fs` module explicitly used the `err` argument convention of async callbacks to inform of an expected error. The `OperationalError` instance will contain the original error in its `.cause` property but it does have a direct copy of the `.message` and `.stack` too. In this code any unexpected error - be it in our code or the `fs` module - would not be caught by these handlers and therefore not swallowed. - -Since a `catch` handler typed to `Promise.OperationalError` is expected to be used very often, it has a neat shorthand: - -```js -.error(function (e) { - console.error("unable to read file, because: ", e.message); -}); -``` - -See [API documentation for `.error()`](API.md#error-rejectedhandler----promise) - -Finally, Bluebird also supports predicate-based filters. If you pass a -predicate function instead of an error type, the predicate will receive -the error as an argument. The return result will be used to determine whether -the error handler should be called. - -Predicates should allow for very fine grained control over caught errors: -pattern matching, error typesets with set operations and many other techniques -can be implemented on top of them. - -Example of using a predicate-based filter: - -```js -var Promise = require("bluebird"); -var request = Promise.promisify(require("request")); - -function clientError(e) { - return e.code >= 400 && e.code < 500; -} - -request("http://www.google.com").then(function(contents){ - console.log(contents); -}).catch(clientError, function(e){ - //A client error like 400 Bad Request happened -}); -``` - -**Danger:** The JavaScript language allows throwing primitive values like strings. Throwing primitives can lead to worse or no stack traces. Primitives [are not exceptions](http://www.devthought.com/2011/12/22/a-string-is-not-an-error/). You should consider always throwing Error objects when handling exceptions. - -
- -#### How do long stack traces differ from e.g. Q? - -Bluebird attempts to have more elaborate traces. Consider: - -```js -Error.stackTraceLimit = 25; -Q.longStackSupport = true; -Q().then(function outer() { - return Q().then(function inner() { - return Q().then(function evenMoreInner() { - a.b.c.d(); - }).catch(function catcher(e){ - console.error(e.stack); - }); - }) -}); -``` - -You will see - - ReferenceError: a is not defined - at evenMoreInner (:7:13) - From previous event: - at inner (:6:20) - -Compare to: - -```js -Error.stackTraceLimit = 25; -Promise.longStackTraces(); -Promise.resolve().then(function outer() { - return Promise.resolve().then(function inner() { - return Promise.resolve().then(function evenMoreInner() { - a.b.c.d(); - }).catch(function catcher(e){ - console.error(e.stack); - }); - }); -}); -``` - - ReferenceError: a is not defined - at evenMoreInner (:7:13) - From previous event: - at inner (:6:36) - From previous event: - at outer (:5:32) - From previous event: - at :4:21 - at Object.InjectedScript._evaluateOn (:572:39) - at Object.InjectedScript._evaluateAndWrap (:531:52) - at Object.InjectedScript.evaluate (:450:21) - - -A better and more practical example of the differences can be seen in gorgikosev's [debuggability competition](https://github.com/spion/async-compare#debuggability). - -
- -# Development - -For development tasks such as running benchmarks or testing, you need to clone the repository and install dev-dependencies. - -Install [node](http://nodejs.org/) and [npm](https://npmjs.org/) - - git clone git@github.com:petkaantonov/bluebird.git - cd bluebird - npm install - -## Testing - -To run all tests, run - - node tools/test - -If you need to run generator tests run the `tool/test.js` script with `--harmony` argument and node 0.11+: - - node-dev --harmony tools/test - -You may specify an individual test file to run with the `--run` script flag: - - node tools/test --run=cancel.js - - -This enables output from the test and may give a better idea where the test is failing. The parameter to `--run` can be any file name located in `test/mocha` folder. - -#### Testing in browsers - -To run the test in a browser instead of node, pass the flag `--browser` to the test tool - - node tools/test --run=cancel.js --browser - -This will automatically create a server (default port 9999) and open it in your default browser once the tests have been compiled. - -Keep the test tab active because some tests are timing-sensitive and will fail if the browser is throttling timeouts. Chrome will do this for example when the tab is not active. - -#### Supported options by the test tool - -The value of boolean flags is determined by presence, if you want to pass false value for a boolean flag, use the `no-`-prefix e.g. `--no-browser`. - - - `--run=String` - Which tests to run (or compile when testing in browser). Default `"all"`. Can also be a glob string (relative to ./test/mocha folder). - - `--cover=String`. Create code coverage using the String as istanbul reporter. Coverage is created in the ./coverage folder. No coverage is created by default, default reporter is `"html"` (use `--cover` to use default reporter). - - `--browser` - Whether to compile tests for browsers. Default `false`. - - `--port=Number` - Port where local server is hosted when testing in browser. Default `9999` - - `--execute-browser-tests` - Whether to execute the compiled tests for browser when using `--browser`. Default `true`. - - `--open-browser` - Whether to open the default browser when executing browser tests. Default `true`. - - `--fake-timers` - Whether to use fake timers (`setTimeout` etc) when running tests in node. Default `true`. - - `--js-hint` - Whether to run JSHint on source files. Default `true`. - - `--saucelabs` - Whether to create a tunnel to sauce labs and run tests in their VMs instead of your browser when compiling tests for browser. Default `false`. - -## Benchmarks - -To run a benchmark, run the given command for a benchmark while on the project root. Requires bash (on windows the mingw32 that comes with git works fine too). - -Node 0.11.2+ is required to run the generator examples. - -### 1\. DoxBee sequential - -Currently the most relevant benchmark is @gorkikosev's benchmark in the article [Analysis of generators and other async patterns in node](http://spion.github.io/posts/analysis-generators-and-other-async-patterns-node.html). The benchmark emulates a situation where n amount of users are making a request in parallel to execute some mixed async/sync action. The benchmark has been modified to include a warm-up phase to minimize any JITing during timed sections. - -Command: `bench doxbee` - -### 2\. Made-up parallel - -This made-up scenario runs 15 shimmed queries in parallel. - -Command: `bench parallel` - -## Custom builds - -Custom builds for browsers are supported through a command-line utility. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
The following features can be disabled
Feature(s)Command line identifier
.any and Promise.anyany
.race and Promise.racerace
.call and .getcall_get
.filter and Promise.filterfilter
.map and Promise.mapmap
.reduce and Promise.reducereduce
.props and Promise.propsprops
.settle and Promise.settlesettle
.some and Promise.somesome
.nodeifynodeify
Promise.coroutine and Promise.spawngenerators
Progressionprogress
Promisificationpromisify
Cancellationcancel
Timerstimers
Resource managementusing
- - -Make sure you have cloned the repo somewhere and did `npm install` successfully. - -After that you can run: - - node tools/build --features="core" - - -The above builds the most minimal build you can get. You can add more features separated by spaces from the above list: - - node tools/build --features="core filter map reduce" - -The custom build file will be found from `/js/browser/bluebird.js`. It will have a comment that lists the disabled and enabled features. - -Note that the build leaves the `/js/main` etc folders with same features so if you use the folder for node.js at the same time, don't forget to build -a full version afterwards (after having taken a copy of the bluebird.js somewhere): - - node tools/build --debug --main --zalgo --browser --minify - -#### Supported options by the build tool - -The value of boolean flags is determined by presence, if you want to pass false value for a boolean flag, use the `no-`-prefix e.g. `--no-debug`. - - - `--main` - Whether to build the main build. The main build is placed at `js/main` directory. Default `false`. - - `--debug` - Whether to build the debug build. The debug build is placed at `js/debug` directory. Default `false`. - - `--zalgo` - Whether to build the zalgo build. The zalgo build is placed at `js/zalgo` directory. Default `false`. - - `--browser` - Whether to compile the browser build. The browser build file is placed at `js/browser/bluebird.js` Default `false`. - - `--minify` - Whether to minify the compiled browser build. The minified browser build file is placed at `js/browser/bluebird.min.js` Default `true`. - - `--features=String` - See [custom builds](#custom-builds) - -
- -## For library authors - -Building a library that depends on bluebird? You should know about a few features. - -If your library needs to do something obtrusive like adding or modifying methods on the `Promise` prototype, uses long stack traces or uses a custom unhandled rejection handler then... that's totally ok as long as you don't use `require("bluebird")`. Instead you should create a file -that creates an isolated copy. For example, creating a file called `bluebird-extended.js` that contains: - -```js - //NOTE the function call right after -module.exports = require("bluebird/js/main/promise")(); -``` - -Your library can then use `var Promise = require("bluebird-extended");` and do whatever it wants with it. Then if the application or other library uses their own bluebird promises they will all play well together because of Promises/A+ thenable assimilation magic. - -You should also know about [`.nodeify()`](API.md#nodeifyfunction-callback---promise) which makes it easy to provide a dual callback/promise API. - -
- -## What is the sync build? - -You may now use sync build by: - - var Promise = require("bluebird/zalgo"); - -The sync build is provided to see how forced asynchronity affects benchmarks. It should not be used in real code due to the implied hazards. - -The normal async build gives Promises/A+ guarantees about asynchronous resolution of promises. Some people think this affects performance or just plain love their code having a possibility -of stack overflow errors and non-deterministic behavior. - -The sync build skips the async call trampoline completely, e.g code like: - - async.invoke( this.fn, this, val ); - -Appears as this in the sync build: - - this.fn(val); - -This should pressure the CPU slightly less and thus the sync build should perform better. Indeed it does, but only marginally. The biggest performance boosts are from writing efficient Javascript, not from compromising determinism. - -Note that while some benchmarks are waiting for the next event tick, the CPU is actually not in use during that time. So the resulting benchmark result is not completely accurate because on node.js you only care about how much the CPU is taxed. Any time spent on CPU is time the whole process (or server) is paralyzed. And it is not graceful like it would be with threads. - - -```js -var cache = new Map(); //ES6 Map or DataStructures/Map or whatever... -function getResult(url) { - var resolver = Promise.pending(); - if (cache.has(url)) { - resolver.resolve(cache.get(url)); - } - else { - http.get(url, function(err, content) { - if (err) resolver.reject(err); - else { - cache.set(url, content); - resolver.resolve(content); - } - }); - } - return resolver.promise; -} - - - -//The result of console.log is truly random without async guarantees -function guessWhatItPrints( url ) { - var i = 3; - getResult(url).then(function(){ - i = 4; - }); - console.log(i); -} -``` - -# Optimization guide - -Articles about optimization will be periodically posted in [the wiki section](https://github.com/petkaantonov/bluebird/wiki), polishing edits are welcome. - -A single cohesive guide compiled from the articles will probably be done eventually. - -# License - -The MIT License (MIT) - -Copyright (c) 2015 Petka Antonov - -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/node_modules/bluebird/changelog.md b/node_modules/bluebird/changelog.md deleted file mode 100644 index 406d2156..00000000 --- a/node_modules/bluebird/changelog.md +++ /dev/null @@ -1,1730 +0,0 @@ -## 2.11.0 (2016-08-30) - -Features: - - - Add Promise.version - - Add Promise.getNewLibraryCopy - -## 2.10.2 (2015-10-01) - -Features: - - - `.timeout()` now takes a custom error object as second argument - -## 2.10.1 (2015-09-21) - - - Fix error "Cannot promisify an API that has normal methods with 'Async'-suffix" when promisifying certain objects with a custom promisifier - -## 2.10.0 (2015-09-08) - -Features: - - - `Promise.using` can now take the promises-for-resources as an array ([#733](.)). - - Browser builds for minimal core are now hosted on CDN ([#724](.)). - -Bugfixes: - - - Disabling debug mode with `BLUEBIRD_DEBUG=0` environment variable now works ([#719](.)). - - Fix unhandled rejection reporting when passing rejected promise to `.return()` ([#721](.)). - - Fix unbound promise's then handlers being called with wrong `this` value ([#738](.)). - -## 2.9.34 (2015-07-15) - -Bugfixes: - -- Correct domain for .map, .each, .filter, .reduce callbacks ([#701](.)). - - Preserve bound-with-promise promises across the entire chain ([#702](.)). - -## 2.9.33 (2015-07-09) - -Bugfixes: - - - Methods on `Function.prototype` are no longer promisified ([#680](.)). - -## 2.9.32 (2015-07-03) - -Bugfixes: - - - Fix `.return(primitiveValue)` returning a wrapped version of the primitive value when a Node.js domain is active ([#689](.)). - -## 2.9.31 (2015-07-03) - -Bugfixes: - - - Fix Promises/A+ compliance issue regarding circular thenables: the correct behavior is to go into an infinite loop instead of warning with an error (Fixes [#682](.)). - - Fix "(node) warning: possible EventEmitter memory leak detected" ([#661](.)). - - Fix callbacks sometimes being called with a wrong node.js domain ([#664](.)). - - Fix callbacks sometimes not being called at all in iOS 8.1 WebApp mode ([#666](.), [#687](.)). - -## 2.9.30 (2015-06-14) - -Bugfixes: - - - Fix regression with `promisifyAll` not promisifying certain methods - -## 2.9.29 (2015-06-14) - -Bugfixes: - - - Improve `promisifyAll` detection of functions that are class constructors. Fixes mongodb 2.x promisification. - -## 2.9.28 (2015-06-14) - -Bugfixes: - - - Fix handled rejection being reported as unhandled in certain scenarios when using [.all](.) or [Promise.join](.) ([#645](.)) - - Fix custom scheduler not being called in Google Chrome when long stack traces are enabled ([#650](.)) - -## 2.9.27 (2015-05-30) - -Bugfixes: - - - Fix `sinon.useFakeTimers()` breaking scheduler ([#631](.)) - -Misc: - - - Add nw testing facilities (`node tools/test --nw`) - -## 2.9.26 (2015-05-25) - -Bugfixes: - - - Fix crash in NW [#624](.) - - Fix [`.return()`](.) not supporting `undefined` as return value [#627](.) - -## 2.9.25 (2015-04-28) - -Bugfixes: - - - Fix crash in node 0.8 - -## 2.9.24 (2015-04-02) - -Bugfixes: - - - Fix not being able to load multiple bluebird copies introduced in 2.9.22 ([#559](.), [#561](.), [#560](.)). - -## 2.9.23 (2015-04-02) - -Bugfixes: - - - Fix node.js domain propagation ([#521](.)). - -## 2.9.22 (2015-04-02) - - - Fix `.promisify` crashing in phantom JS ([#556](.)) - -## 2.9.21 (2015-03-30) - - - Fix error object's `'stack'`' overwriting causing an error when its defined to be a setter that throws an error ([#552](.)). - -## 2.9.20 (2015-03-29) - -Bugfixes: - - - Fix regression where there is a long delay between calling `.cancel()` and promise actually getting cancelled in Chrome when long stack traces are enabled - -## 2.9.19 (2015-03-29) - -Bugfixes: - - - Fix crashing in Chrome when long stack traces are disabled - -## 2.9.18 (2015-03-29) - -Bugfixes: - - - Fix settlePromises using trampoline - -## 2.9.17 (2015-03-29) - - -Bugfixes: - - - Fix Chrome DevTools async stack traceability ([#542](.)). - -## 2.9.16 (2015-03-28) - -Features: - - - Use setImmediate if available - -## 2.9.15 (2015-03-26) - -Features: - - - Added `.asCallback` alias for `.nodeify`. - -Bugfixes: - - - Don't always use nextTick, but try to pick up setImmediate or setTimeout in NW. Fixes [#534](.), [#525](.) - - Make progress a core feature. Fixes [#535](.) Note that progress has been removed in 3.x - this is only a fix necessary for 2.x custom builds. - -## 2.9.14 (2015-03-12) - -Bugfixes: - - - Always use process.nextTick. Fixes [#525](.) - -## 2.9.13 (2015-02-27) - -Bugfixes: - - - Fix .each, .filter, .reduce and .map callbacks being called synchornously if the input is immediate. ([#513](https://github.com/petkaantonov/bluebird/issues/513)) - -## 2.9.12 (2015-02-19) - -Bugfixes: - - - Fix memory leak introduced in 2.9.0 ([#502](https://github.com/petkaantonov/bluebird/issues/502)) - -## 2.9.11 (2015-02-19) - -Bugfixes: - - - Fix [#503](https://github.com/petkaantonov/bluebird/issues/503) - -## 2.9.10 (2015-02-18) - -Bugfixes: - - - Fix [#501](https://github.com/petkaantonov/bluebird/issues/501) - -## 2.9.9 (2015-02-12) - -Bugfixes: - - - Fix `TypeError: Cannot assign to read only property 'length'` when jsdom has declared a read-only length for all objects to inherit. - -## 2.9.8 (2015-02-10) - -Bugfixes: - - - Fix regression introduced in 2.9.7 where promisify didn't properly dynamically look up methods on `this` - -## 2.9.7 (2015-02-08) - -Bugfixes: - - - Fix `promisify` not retaining custom properties of the function. This enables promisifying the `"request"` module's export function and its methods at the same time. - - Fix `promisifyAll` methods being dependent on `this` when they are not originally dependent on `this`. This enables e.g. passing promisified `fs` functions directly as callbacks without having to bind them to `fs`. - - Fix `process.nextTick` being used over `setImmediate` in node. - -## 2.9.6 (2015-02-02) - -Bugfixes: - - - Node environment detection can no longer be fooled - -## 2.9.5 (2015-02-02) - -Misc: - - - Warn when [`.then()`](.) is passed non-functions - -## 2.9.4 (2015-01-30) - -Bugfixes: - - - Fix [.timeout()](.) not calling `clearTimeout` with the proper handle in node causing the process to wait for unneeded timeout. This was a regression introduced in 2.9.1. - -## 2.9.3 (2015-01-27) - -Bugfixes: - - - Fix node-webkit compatibility issue ([#467](https://github.com/petkaantonov/bluebird/pull/467)) - - Fix long stack trace support in recent firefox versions - -## 2.9.2 (2015-01-26) - -Bugfixes: - - - Fix critical bug regarding to using promisifyAll in browser that was introduced in 2.9.0 ([#466](https://github.com/petkaantonov/bluebird/issues/466)). - -Misc: - - - Add `"browser"` entry point to package.json - -## 2.9.1 (2015-01-24) - -Features: - - - If a bound promise is returned by the callback to [`Promise.method`](#promisemethodfunction-fn---function) and [`Promise.try`](#promisetryfunction-fn--arraydynamicdynamic-arguments--dynamic-ctx----promise), the returned promise will be bound to the same value - -## 2.9.0 (2015-01-24) - -Features: - - - Add [`Promise.fromNode`](API.md#promisefromnodefunction-resolver---promise) - - Add new paramter `value` for [`Promise.bind`](API.md#promisebinddynamic-thisarg--dynamic-value---promise) - -Bugfixes: - - - Fix several issues with [`cancellation`](API.md#cancellation) and [`.bind()`](API.md#binddynamic-thisarg---promise) interoperation when `thisArg` is a promise or thenable - - Fix promises created in [`disposers`](API#disposerfunction-disposer---disposer) not having proper long stack trace context - - Fix [`Promise.join`](API.md#promisejoinpromisethenablevalue-promises-function-handler---promise) sometimes passing the passed in callback function as the last argument to itself. - -Misc: - - - Reduce minified full browser build file size by not including unused code generation functionality. - - Major internal refactoring related to testing code and source code file layout - -## 2.8.2 (2015-01-20) - -Features: - - - [Global rejection events](https://github.com/petkaantonov/bluebird/blob/master/API.md#global-rejection-events) are now fired both as DOM3 events and as legacy events in browsers - -## 2.8.1 (2015-01-20) - -Bugfixes: - - - Fix long stack trace stiching consistency when rejected from thenables - -## 2.8.0 (2015-01-19) - -Features: - - - Major debuggability improvements: - - Long stack traces have been re-designed. They are now much more readable, - succint, relevant and consistent across bluebird features. - - Long stack traces are supported now in IE10+ - -## 2.7.1 (2015-01-15) - -Bugfixes: - - - Fix [#447](https://github.com/petkaantonov/bluebird/issues/447) - -## 2.7.0 (2015-01-15) - -Features: - - - Added more context to stack traces originating from coroutines ([#421](https://github.com/petkaantonov/bluebird/issues/421)) - - Implemented [global rejection events](https://github.com/petkaantonov/bluebird/blob/master/API.md#global-rejection-events) ([#428](https://github.com/petkaantonov/bluebird/issues/428), [#357](https://github.com/petkaantonov/bluebird/issues/357)) - - [Custom promisifiers](https://github.com/petkaantonov/bluebird/blob/master/API.md#option-promisifier) are now passed the default promisifier which can be used to add enhancements on top of normal node promisification - - [Promisification filters](https://github.com/petkaantonov/bluebird/blob/master/API.md#option-filter) are now passed `passesDefaultFilter` boolean - -Bugfixes: - - - Fix `.noConflict()` call signature ([#446](https://github.com/petkaantonov/bluebird/issues/446)) - - Fix `Promise.method`ified functions being called with `undefined` when they were called with no arguments - -## 2.6.4 (2015-01-12) - -Bugfixes: - - - `OperationalErrors` thrown by promisified functions retain custom properties, such as `.code` and `.path`. - -## 2.6.3 (2015-01-12) - -Bugfixes: - - - Fix [#429](https://github.com/petkaantonov/bluebird/issues/429) - - Fix [#432](https://github.com/petkaantonov/bluebird/issues/432) - - Fix [#433](https://github.com/petkaantonov/bluebird/issues/433) - -## 2.6.2 (2015-01-07) - -Bugfixes: - - - Fix [#426](https://github.com/petkaantonov/bluebird/issues/426) - -## 2.6.1 (2015-01-07) - -Bugfixes: - - - Fixed built browser files not being included in the git tag release for bower - -## 2.6.0 (2015-01-06) - -Features: - - - Significantly improve parallel promise performance and memory usage (+50% faster, -50% less memory) - - -## 2.5.3 (2014-12-30) - -## 2.5.2 (2014-12-29) - -Bugfixes: - - - Fix bug where already resolved promise gets attached more handlers while calling its handlers resulting in some handlers not being called - - Fix bug where then handlers are not called in the same order as they would run if Promises/A+ 2.3.2 was implemented as adoption - - Fix bug where using `Object.create(null)` as a rejection reason would crash bluebird - -## 2.5.1 (2014-12-29) - -Bugfixes: - - - Fix `.finally` throwing null error when it is derived from a promise that is resolved with a promise that is resolved with a promise - -## 2.5.0 (2014-12-28) - -Features: - - - [`.get`](#API.md#https://github.com/petkaantonov/bluebird/blob/master/API.md#getstring-propertyname---promise) now supports negative indexing. - -Bugfixes: - - - Fix bug with `Promise.method` wrapped function returning a promise that never resolves if the function returns a promise that is resolved with another promise - - Fix bug with `Promise.delay` never resolving if the value is a promise that is resolved with another promise - -## 2.4.3 (2014-12-28) - -Bugfixes: - - - Fix memory leak as described in [this Promises/A+ spec issue](https://github.com/promises-aplus/promises-spec/issues/179). - -## 2.4.2 (2014-12-21) - -Bugfixes: - - - Fix bug where spread rejected handler is ignored in case of rejection - - Fix synchronous scheduler passed to `setScheduler` causing infinite loop - -## 2.4.1 (2014-12-20) - -Features: - - - Error messages now have links to wiki pages for additional information - - Promises now clean up all references (to handlers, child promises etc) as soon as possible. - -## 2.4.0 (2014-12-18) - -Features: - - - Better filtering of bluebird internal calls in long stack traces, especially when using minified file in browsers - - Small performance improvements for all collection methods - - Promises now delete references to handlers attached to them as soon as possible - - Additional stack traces are now output on stderr/`console.warn` for errors that are thrown in the process/window from rejected `.done()` promises. See [#411](https://github.com/petkaantonov/bluebird/issues/411) - -## 2.3.11 (2014-10-31) - -Bugfixes: - - - Fix [#371](https://github.com/petkaantonov/bluebird/issues/371), [#373](https://github.com/petkaantonov/bluebird/issues/373) - - -## 2.3.10 (2014-10-28) - -Features: - - - `Promise.method` no longer wraps primitive errors - - `Promise.try` no longer wraps primitive errors - -## 2.3.7 (2014-10-25) - -Bugfixes: - - - Fix [#359](https://github.com/petkaantonov/bluebird/issues/359), [#362](https://github.com/petkaantonov/bluebird/issues/362) and [#364](https://github.com/petkaantonov/bluebird/issues/364) - -## 2.3.6 (2014-10-15) - -Features: - - - Implement [`.reflect()`](API.md#reflect---promisepromiseinspection) - -## 2.3.5 (2014-10-06) - -Bugfixes: - - - Fix issue when promisifying methods whose names contain the string 'args' - -## 2.3.4 (2014-09-27) - - - `P` alias was not declared inside WebWorkers - -## 2.3.3 (2014-09-27) - -Bugfixes: - - - Fix [#318](https://github.com/petkaantonov/bluebird/issues/318), [#314](https://github.com/petkaantonov/bluebird/issues/314) - -## 2.3.2 (2014-08-25) - -Bugfixes: - - - `P` alias for `Promise` now exists in global scope when using browser builds without a module loader, fixing an issue with firefox extensions - -## 2.3.1 (2014-08-23) - -Features: - - - `.using` can now be used with disposers created from different bluebird copy - -## 2.3.0 (2014-08-13) - -Features: - - - [`.bind()`](API.md#binddynamic-thisarg---promise) and [`Promise.bind()`](API.md#promisebinddynamic-thisarg---promise) now await for the resolution of the `thisArg` if it's a promise or a thenable - -Bugfixes: - - - Fix [#276](https://github.com/petkaantonov/bluebird/issues/276) - -## 2.2.2 (2014-07-14) - - - Fix [#259](https://github.com/petkaantonov/bluebird/issues/259) - -## 2.2.1 (2014-07-07) - - - Fix multiline error messages only showing the first line - -## 2.2.0 (2014-07-07) - -Bugfixes: - - - `.any` and `.some` now consistently reject with RangeError when input array contains too few promises - - Fix iteration bug with `.reduce` when input array contains already fulfilled promises - -## 2.1.3 (2014-06-18) - -Bugfixes: - - - Fix [#235](https://github.com/petkaantonov/bluebird/issues/235) - -## 2.1.2 (2014-06-15) - -Bugfixes: - - - Fix [#232](https://github.com/petkaantonov/bluebird/issues/232) - -## 2.1.1 (2014-06-11) - -## 2.1.0 (2014-06-11) - -Features: - - - Add [`promisifier`](API.md#option-promisifier) option to `Promise.promisifyAll()` - - Improve performance of `.props()` and collection methods when used with immediate values - - -Bugfixes: - - - Fix a bug where .reduce calls the callback for an already visited item - - Fix a bug where stack trace limit is calculated to be too small, which resulted in too short stack traces - -Add undocumented experimental `yieldHandler` option to `Promise.coroutine` - -## 2.0.7 (2014-06-08) -## 2.0.6 (2014-06-07) -## 2.0.5 (2014-06-05) -## 2.0.4 (2014-06-05) -## 2.0.3 (2014-06-05) -## 2.0.2 (2014-06-04) -## 2.0.1 (2014-06-04) - -## 2.0.0 (2014-06-04) - -#What's new in 2.0 - -- [Resource management](API.md#resource-management) - never leak resources again -- [Promisification](API.md#promisification) on steroids - entire modules can now be promisified with one line of code -- [`.map()`](API.md#mapfunction-mapper--object-options---promise), [`.each()`](API.md#eachfunction-iterator---promise), [`.filter()`](API.md#filterfunction-filterer--object-options---promise), [`.reduce()`](API.md#reducefunction-reducer--dynamic-initialvalue---promise) reimagined from simple sugar to powerful concurrency coordination tools -- [API Documentation](API.md) has been reorganized and more elaborate examples added -- Deprecated [progression](#progression-migration) and [deferreds](#deferred-migration) -- Improved performance and readability - -Features: - -- Added [`using()`](API.md#promiseusingpromisedisposer-promise-promisedisposer-promise--function-handler---promise) and [`disposer()`](API.md#disposerfunction-disposer---disposer) -- [`.map()`](API.md#mapfunction-mapper--object-options---promise) now calls the handler as soon as items in the input array become fulfilled -- Added a concurrency option to [`.map()`](API.md#mapfunction-mapper--object-options---promise) -- [`.filter()`](API.md#filterfunction-filterer--object-options---promise) now calls the handler as soon as items in the input array become fulfilled -- Added a concurrency option to [`.filter()`](API.md#filterfunction-filterer--object-options---promise) -- [`.reduce()`](API.md#reducefunction-reducer--dynamic-initialvalue---promise) now calls the handler as soon as items in the input array become fulfilled, but in-order -- Added [`.each()`](API.md#eachfunction-iterator---promise) -- [`Promise.resolve()`](API.md#promiseresolvedynamic-value---promise) behaves like `Promise.cast`. `Promise.cast` deprecated. -- [Synchronous inspection](API.md#synchronous-inspection): Removed `.inspect()`, added [`.value()`](API.md#value---dynamic) and [`.reason()`](API.md#reason---dynamic) -- [`Promise.join()`](API.md#promisejoinpromisethenablevalue-promises-function-handler---promise) now takes a function as the last argument -- Added [`Promise.setScheduler()`](API.md#promisesetschedulerfunction-scheduler---void) -- [`.cancel()`](API.md#cancelerror-reason---promise) supports a custom cancellation reason -- [`.timeout()`](API.md#timeoutint-ms--string-message---promise) now cancels the promise instead of rejecting it -- [`.nodeify()`](API.md#nodeifyfunction-callback--object-options---promise) now supports passing multiple success results when mapping promises to nodebacks -- Added `suffix` and `filter` options to [`Promise.promisifyAll()`](API.md#promisepromisifyallobject-target--object-options---object) - -Breaking changes: - -- Sparse array holes are not skipped by collection methods but treated as existing elements with `undefined` value -- `.map()` and `.filter()` do not call the given mapper or filterer function in any specific order -- Removed the `.inspect()` method -- Yielding an array from a coroutine is not supported by default. You can use [`coroutine.addYieldHandler()`](API.md#promisecoroutineaddyieldhandlerfunction-handler---void) to configure the old behavior (or any behavior you want). -- [`.any()`](API.md#any---promise) and [`.some()`](API.md#someint-count---promise) no longer use an array as the rejection reason. [`AggregateError`](API.md#aggregateerror) is used instead. - - -## 1.2.4 (2014-04-27) - -Bugfixes: - - - Fix promisifyAll causing a syntax error when a method name is not a valid identifier - - Fix syntax error when es5.js is used in strict mode - -## 1.2.3 (2014-04-17) - -Bugfixes: - - - Fix [#179](https://github.com/petkaantonov/bluebird/issues/179) - -## 1.2.2 (2014-04-09) - -Bugfixes: - - - Promisified methods from promisifyAll no longer call the original method when it is overriden - - Nodeify doesn't pass second argument to the callback if the promise is fulfilled with `undefined` - -## 1.2.1 (2014-03-31) - -Bugfixes: - - - Fix [#168](https://github.com/petkaantonov/bluebird/issues/168) - -## 1.2.0 (2014-03-29) - -Features: - - - New method: [`.value()`](https://github.com/petkaantonov/bluebird/blob/master/API.md#value---dynamic) - - New method: [`.reason()`](https://github.com/petkaantonov/bluebird/blob/master/API.md#reason---dynamic) - - New method: [`Promise.onUnhandledRejectionHandled()`](https://github.com/petkaantonov/bluebird/blob/master/API.md#promiseonunhandledrejectionhandledfunction-handler---undefined) - - `Promise.map()`, `.map()`, `Promise.filter()` and `.filter()` start calling their callbacks as soon as possible while retaining a correct order. See [`8085922f`](https://github.com/petkaantonov/bluebird/commit/8085922fb95a9987fda0cf2337598ab4a98dc315). - -Bugfixes: - - - Fix [#165](https://github.com/petkaantonov/bluebird/issues/165) - - Fix [#166](https://github.com/petkaantonov/bluebird/issues/166) - -## 1.1.1 (2014-03-18) - -Bugfixes: - - - [#138](https://github.com/petkaantonov/bluebird/issues/138) - - [#144](https://github.com/petkaantonov/bluebird/issues/144) - - [#148](https://github.com/petkaantonov/bluebird/issues/148) - - [#151](https://github.com/petkaantonov/bluebird/issues/151) - -## 1.1.0 (2014-03-08) - -Features: - - - Implement [`Promise.prototype.tap()`](https://github.com/petkaantonov/bluebird/blob/master/API.md#tapfunction-handler---promise) - - Implement [`Promise.coroutine.addYieldHandler()`](https://github.com/petkaantonov/bluebird/blob/master/API.md#promisecoroutineaddyieldhandlerfunction-handler---void) - - Deprecate `Promise.prototype.spawn` - -Bugfixes: - - - Fix already rejected promises being reported as unhandled when handled through collection methods - - Fix browserisfy crashing from checking `process.version.indexOf` - -## 1.0.8 (2014-03-03) - -Bugfixes: - - - Fix active domain being lost across asynchronous boundaries in Node.JS 10.xx - -## 1.0.7 (2014-02-25) - -Bugfixes: - - - Fix handled errors being reported - -## 1.0.6 (2014-02-17) - -Bugfixes: - - - Fix bug with unhandled rejections not being reported - when using `Promise.try` or `Promise.method` without - attaching further handlers - -## 1.0.5 (2014-02-15) - -Features: - - - Node.js performance: promisified functions try to check amount of passed arguments in most optimal order - - Node.js promisified functions will have same `.length` as the original function minus one (for the callback parameter) - -## 1.0.4 (2014-02-09) - -Features: - - - Possibly unhandled rejection handler will always get a stack trace, even if the rejection or thrown error was not an error - - Unhandled rejections are tracked per promise, not per error. So if you create multiple branches from a single ancestor and that ancestor gets rejected, each branch with no error handler with the end will cause a possibly unhandled rejection handler invocation - -Bugfixes: - - - Fix unhandled non-writable objects or primitives not reported by possibly unhandled rejection handler - -## 1.0.3 (2014-02-05) - -Bugfixes: - - - [#93](https://github.com/petkaantonov/bluebird/issues/93) - -## 1.0.2 (2014-02-04) - -Features: - - - Significantly improve performance of foreign bluebird thenables - -Bugfixes: - - - [#88](https://github.com/petkaantonov/bluebird/issues/88) - -## 1.0.1 (2014-01-28) - -Features: - - - Error objects that have property `.isAsync = true` will now be caught by `.error()` - -Bugfixes: - - - Fix TypeError and RangeError shims not working without `new` operator - -## 1.0.0 (2014-01-12) - -Features: - - - `.filter`, `.map`, and `.reduce` no longer skip sparse array holes. This is a backwards incompatible change. - - Like `.map` and `.filter`, `.reduce` now allows returning promises and thenables from the iteration function. - -Bugfixes: - - - [#58](https://github.com/petkaantonov/bluebird/issues/58) - - [#61](https://github.com/petkaantonov/bluebird/issues/61) - - [#64](https://github.com/petkaantonov/bluebird/issues/64) - - [#60](https://github.com/petkaantonov/bluebird/issues/60) - -## 0.11.6-1 (2013-12-29) - -## 0.11.6-0 (2013-12-29) - -Features: - - - You may now return promises and thenables from the filterer function used in `Promise.filter` and `Promise.prototype.filter`. - - - `.error()` now catches additional sources of rejections: - - - Rejections originating from `Promise.reject` - - - Rejections originating from thenables using - the `reject` callback - - - Rejections originating from promisified callbacks - which use the `errback` argument - - - Rejections originating from `new Promise` constructor - where the `reject` callback is called explicitly - - - Rejections originating from `PromiseResolver` where - `.reject()` method is called explicitly - -Bugfixes: - - - Fix `captureStackTrace` being called when it was `null` - - Fix `Promise.map` not unwrapping thenables - -## 0.11.5-1 (2013-12-15) - -## 0.11.5-0 (2013-12-03) - -Features: - - - Improve performance of collection methods - - Improve performance of promise chains - -## 0.11.4-1 (2013-12-02) - -## 0.11.4-0 (2013-12-02) - -Bugfixes: - - - Fix `Promise.some` behavior with arguments like negative integers, 0... - - Fix stack traces of synchronously throwing promisified functions' - -## 0.11.3-0 (2013-12-02) - -Features: - - - Improve performance of generators - -Bugfixes: - - - Fix critical bug with collection methods. - -## 0.11.2-0 (2013-12-02) - -Features: - - - Improve performance of all collection methods - -## 0.11.1-0 (2013-12-02) - -Features: - -- Improve overall performance. -- Improve performance of promisified functions. -- Improve performance of catch filters. -- Improve performance of .finally. - -Bugfixes: - -- Fix `.finally()` rejecting if passed non-function. It will now ignore non-functions like `.then`. -- Fix `.finally()` not converting thenables returned from the handler to promises. -- `.spread()` now rejects if the ultimate value given to it is not spreadable. - -## 0.11.0-0 (2013-12-02) - -Features: - - - Improve overall performance when not using `.bind()` or cancellation. - - Promises are now not cancellable by default. This is backwards incompatible change - see [`.cancellable()`](https://github.com/petkaantonov/bluebird/blob/master/API.md#cancellable---promise) - - [`Promise.delay`](https://github.com/petkaantonov/bluebird/blob/master/API.md#promisedelaydynamic-value-int-ms---promise) - - [`.delay()`](https://github.com/petkaantonov/bluebird/blob/master/API.md#delayint-ms---promise) - - [`.timeout()`](https://github.com/petkaantonov/bluebird/blob/master/API.md#timeoutint-ms--string-message---promise) - -## 0.10.14-0 (2013-12-01) - -Bugfixes: - - - Fix race condition when mixing 3rd party asynchrony. - -## 0.10.13-1 (2013-11-30) - -## 0.10.13-0 (2013-11-30) - -Bugfixes: - - - Fix another bug with progression. - -## 0.10.12-0 (2013-11-30) - -Bugfixes: - - - Fix bug with progression. - -## 0.10.11-4 (2013-11-29) - -## 0.10.11-2 (2013-11-29) - -Bugfixes: - - - Fix `.race()` not propagating bound values. - -## 0.10.11-1 (2013-11-29) - -Features: - - - Improve performance of `Promise.race` - -## 0.10.11-0 (2013-11-29) - -Bugfixes: - - - Fixed `Promise.promisifyAll` invoking property accessors. Only data properties with function values are considered. - -## 0.10.10-0 (2013-11-28) - -Features: - - - Disable long stack traces in browsers by default. Call `Promise.longStackTraces()` to enable them. - -## 0.10.9-1 (2013-11-27) - -Bugfixes: - - - Fail early when `new Promise` is constructed incorrectly - -## 0.10.9-0 (2013-11-27) - -Bugfixes: - - - Promise.props now takes a [thenable-for-collection](https://github.com/petkaantonov/bluebird/blob/f41edac61b7c421608ff439bb5a09b7cffeadcf9/test/mocha/props.js#L197-L217) - - All promise collection methods now reject when a promise-or-thenable-for-collection turns out not to give a collection - -## 0.10.8-0 (2013-11-25) - -Features: - - - All static collection methods take thenable-for-collection - -## 0.10.7-0 (2013-11-25) - -Features: - - - throw TypeError when thenable resolves with itself - - Make .race() and Promise.race() forever pending on empty collections - -## 0.10.6-0 (2013-11-25) - -Bugfixes: - - - Promise.resolve and PromiseResolver.resolve follow thenables too. - -## 0.10.5-0 (2013-11-24) - -Bugfixes: - - - Fix infinite loop when thenable resolves with itself - -## 0.10.4-1 (2013-11-24) - -Bugfixes: - - - Fix a file missing from build. (Critical fix) - -## 0.10.4-0 (2013-11-24) - -Features: - - - Remove dependency of es5-shim and es5-sham when using ES3. - -## 0.10.3-0 (2013-11-24) - -Features: - - - Improve performance of `Promise.method` - -## 0.10.2-1 (2013-11-24) - -Features: - - - Rename PromiseResolver#asCallback to PromiseResolver#callback - -## 0.10.2-0 (2013-11-24) - -Features: - - - Remove memoization of thenables - -## 0.10.1-0 (2013-11-21) - -Features: - - - Add methods `Promise.resolve()`, `Promise.reject()`, `Promise.defer()` and `.resolve()`. - -## 0.10.0-1 (2013-11-17) - -## 0.10.0-0 (2013-11-17) - -Features: - - - Implement `Promise.method()` - - Implement `.return()` - - Implement `.throw()` - -Bugfixes: - - - Fix promises being able to use themselves as resolution or follower value - -## 0.9.11-1 (2013-11-14) - -Features: - - - Implicit `Promise.all()` when yielding an array from generators - -## 0.9.11-0 (2013-11-13) - -Bugfixes: - - - Fix `.spread` not unwrapping thenables - -## 0.9.10-2 (2013-11-13) - -Features: - - - Improve performance of promisified functions on V8 - -Bugfixes: - - - Report unhandled rejections even when long stack traces are disabled - - Fix `.error()` showing up in stack traces - -## 0.9.10-1 (2013-11-05) - -Bugfixes: - - - Catch filter method calls showing in stack traces - -## 0.9.10-0 (2013-11-05) - -Bugfixes: - - - Support primitives in catch filters - -## 0.9.9-0 (2013-11-05) - -Features: - - - Add `Promise.race()` and `.race()` - -## 0.9.8-0 (2013-11-01) - -Bugfixes: - - - Fix bug with `Promise.try` not unwrapping returned promises and thenables - -## 0.9.7-0 (2013-10-29) - -Bugfixes: - - - Fix bug with build files containing duplicated code for promise.js - -## 0.9.6-0 (2013-10-28) - -Features: - - - Improve output of reporting unhandled non-errors - - Implement RejectionError wrapping and `.error()` method - -## 0.9.5-0 (2013-10-27) - -Features: - - - Allow fresh copies of the library to be made - -## 0.9.4-1 (2013-10-27) - -## 0.9.4-0 (2013-10-27) - -Bugfixes: - - - Rollback non-working multiple fresh copies feature - -## 0.9.3-0 (2013-10-27) - -Features: - - - Allow fresh copies of the library to be made - - Add more components to customized builds - -## 0.9.2-1 (2013-10-25) - -## 0.9.2-0 (2013-10-25) - -Features: - - - Allow custom builds - -## 0.9.1-1 (2013-10-22) - -Bugfixes: - - - Fix unhandled rethrown exceptions not reported - -## 0.9.1-0 (2013-10-22) - -Features: - - - Improve performance of `Promise.try` - - Extend `Promise.try` to accept arguments and ctx to make it more usable in promisification of synchronous functions. - -## 0.9.0-0 (2013-10-18) - -Features: - - - Implement `.bind` and `Promise.bind` - -Bugfixes: - - - Fix `.some()` when argument is a pending promise that later resolves to an array - -## 0.8.5-1 (2013-10-17) - -Features: - - - Enable process wide long stack traces through BLUEBIRD_DEBUG environment variable - -## 0.8.5-0 (2013-10-16) - -Features: - - - Improve performance of all collection methods - -Bugfixes: - - - Fix .finally passing the value to handlers - - Remove kew from benchmarks due to bugs in the library breaking the benchmark - - Fix some bluebird library calls potentially appearing in stack traces - -## 0.8.4-1 (2013-10-15) - -Bugfixes: - - - Fix .pending() call showing in long stack traces - -## 0.8.4-0 (2013-10-15) - -Bugfixes: - - - Fix PromiseArray and its sub-classes swallowing possibly unhandled rejections - -## 0.8.3-3 (2013-10-14) - -Bugfixes: - - - Fix AMD-declaration using named module. - -## 0.8.3-2 (2013-10-14) - -Features: - - - The mortals that can handle it may now release Zalgo by `require("bluebird/zalgo");` - -## 0.8.3-1 (2013-10-14) - -Bugfixes: - - - Fix memory leak when using the same promise to attach handlers over and over again - -## 0.8.3-0 (2013-10-13) - -Features: - - - Add `Promise.props()` and `Promise.prototype.props()`. They work like `.all()` for object properties. - -Bugfixes: - - - Fix bug with .some returning garbage when sparse arrays have rejections - -## 0.8.2-2 (2013-10-13) - -Features: - - - Improve performance of `.reduce()` when `initialValue` can be synchronously cast to a value - -## 0.8.2-1 (2013-10-12) - -Bugfixes: - - - Fix .npmignore having irrelevant files - -## 0.8.2-0 (2013-10-12) - -Features: - - - Improve performance of `.some()` - -## 0.8.1-0 (2013-10-11) - -Bugfixes: - - - Remove uses of dynamic evaluation (`new Function`, `eval` etc) when strictly not necessary. Use feature detection to use static evaluation to avoid errors when dynamic evaluation is prohibited. - -## 0.8.0-3 (2013-10-10) - -Features: - - - Add `.asCallback` property to `PromiseResolver`s - -## 0.8.0-2 (2013-10-10) - -## 0.8.0-1 (2013-10-09) - -Features: - - - Improve overall performance. Be able to sustain infinite recursion when using promises. - -## 0.8.0-0 (2013-10-09) - -Bugfixes: - - - Fix stackoverflow error when function calls itself "synchronously" from a promise handler - -## 0.7.12-2 (2013-10-09) - -Bugfixes: - - - Fix safari 6 not using `MutationObserver` as a scheduler - - Fix process exceptions interfering with internal queue flushing - -## 0.7.12-1 (2013-10-09) - -Bugfixes: - - - Don't try to detect if generators are available to allow shims to be used - -## 0.7.12-0 (2013-10-08) - -Features: - - - Promisification now consider all functions on the object and its prototype chain - - Individual promisifcation uses current `this` if no explicit receiver is given - - Give better stack traces when promisified callbacks throw or errback primitives such as strings by wrapping them in an `Error` object. - -Bugfixes: - - - Fix runtime APIs throwing synchronous errors - -## 0.7.11-0 (2013-10-08) - -Features: - - - Deprecate `Promise.promisify(Object target)` in favor of `Promise.promisifyAll(Object target)` to avoid confusion with function objects - - Coroutines now throw error when a non-promise is `yielded` - -## 0.7.10-1 (2013-10-05) - -Features: - - - Make tests pass Internet Explorer 8 - -## 0.7.10-0 (2013-10-05) - -Features: - - - Create browser tests - -## 0.7.9-1 (2013-10-03) - -Bugfixes: - - - Fix promise cast bug when thenable fulfills using itself as the fulfillment value - -## 0.7.9-0 (2013-10-03) - -Features: - - - More performance improvements when long stack traces are enabled - -## 0.7.8-1 (2013-10-02) - -Features: - - - Performance improvements when long stack traces are enabled - -## 0.7.8-0 (2013-10-02) - -Bugfixes: - - - Fix promisified methods not turning synchronous exceptions into rejections - -## 0.7.7-1 (2013-10-02) - -Features: - - - feature - -Bugfixes: - - - bugfix - -## 0.7.7-0 (2013-10-01) - -Features: - - - feature - -Bugfixes: - - - bugfix - -## 0.7.6-0 (2013-09-29) - -Features: - - - feature - -Bugfixes: - - - bugfix - -## 0.7.5-0 (2013-09-28) - -Features: - - - feature - -Bugfixes: - - - bugfix - -## 0.7.4-1 (2013-09-28) - -Features: - - - feature - -Bugfixes: - - - bugfix - -## 0.7.4-0 (2013-09-28) - -Features: - - - feature - -Bugfixes: - - - bugfix - -## 0.7.3-1 (2013-09-28) - -Features: - - - feature - -Bugfixes: - - - bugfix - -## 0.7.3-0 (2013-09-27) - -Features: - - - feature - -Bugfixes: - - - bugfix - -## 0.7.2-0 (2013-09-27) - -Features: - - - feature - -Bugfixes: - - - bugfix - -## 0.7.1-5 (2013-09-26) - -Features: - - - feature - -Bugfixes: - - - bugfix - -## 0.7.1-4 (2013-09-25) - -Features: - - - feature - -Bugfixes: - - - bugfix - -## 0.7.1-3 (2013-09-25) - -Features: - - - feature - -Bugfixes: - - - bugfix - -## 0.7.1-2 (2013-09-24) - -Features: - - - feature - -Bugfixes: - - - bugfix - -## 0.7.1-1 (2013-09-24) - -Features: - - - feature - -Bugfixes: - - - bugfix - -## 0.7.1-0 (2013-09-24) - -Features: - - - feature - -Bugfixes: - - - bugfix - -## 0.7.0-1 (2013-09-23) - -Features: - - - feature - -Bugfixes: - - - bugfix - -## 0.7.0-0 (2013-09-23) - -Features: - - - feature - -Bugfixes: - - - bugfix - -## 0.6.5-2 (2013-09-20) - -Features: - - - feature - -Bugfixes: - - - bugfix - -## 0.6.5-1 (2013-09-18) - -Features: - - - feature - -Bugfixes: - - - bugfix - -## 0.6.5-0 (2013-09-18) - -Features: - - - feature - -Bugfixes: - - - bugfix - -## 0.6.4-1 (2013-09-18) - -Features: - - - feature - -Bugfixes: - - - bugfix - -## 0.6.4-0 (2013-09-18) - -Features: - - - feature - -Bugfixes: - - - bugfix - -## 0.6.3-4 (2013-09-18) - -Features: - - - feature - -Bugfixes: - - - bugfix - -## 0.6.3-3 (2013-09-18) - -Features: - - - feature - -Bugfixes: - - - bugfix - -## 0.6.3-2 (2013-09-16) - -Features: - - - feature - -Bugfixes: - - - bugfix - -## 0.6.3-1 (2013-09-16) - -Features: - - - feature - -Bugfixes: - - - bugfix - -## 0.6.3-0 (2013-09-15) - -Features: - - - feature - -Bugfixes: - - - bugfix - -## 0.6.2-1 (2013-09-14) - -Features: - - - feature - -Bugfixes: - - - bugfix - -## 0.6.2-0 (2013-09-14) - -Features: - - - feature - -Bugfixes: - - - bugfix - -## 0.6.1-0 (2013-09-14) - -Features: - - - feature - -Bugfixes: - - - bugfix - -## 0.6.0-0 (2013-09-13) - -Features: - - - feature - -Bugfixes: - - - bugfix - -## 0.5.9-6 (2013-09-12) - -Features: - - - feature - -Bugfixes: - - - bugfix - -## 0.5.9-5 (2013-09-12) - -Features: - - - feature - -Bugfixes: - - - bugfix - -## 0.5.9-4 (2013-09-12) - -Features: - - - feature - -Bugfixes: - - - bugfix - -## 0.5.9-3 (2013-09-11) - -Features: - - - feature - -Bugfixes: - - - bugfix - -## 0.5.9-2 (2013-09-11) - -Features: - - - feature - -Bugfixes: - - - bugfix - -## 0.5.9-1 (2013-09-11) - -Features: - - - feature - -Bugfixes: - - - bugfix - -## 0.5.9-0 (2013-09-11) - -Features: - - - feature - -Bugfixes: - - - bugfix - -## 0.5.8-1 (2013-09-11) - -Features: - - - feature - -Bugfixes: - - - bugfix - -## 0.5.8-0 (2013-09-11) - -Features: - - - feature - -Bugfixes: - - - bugfix - -## 0.5.7-0 (2013-09-11) - -Features: - - - feature - -Bugfixes: - - - bugfix - -## 0.5.6-1 (2013-09-10) - -Features: - - - feature - -Bugfixes: - - - bugfix - -## 0.5.6-0 (2013-09-10) - -Features: - - - feature - -Bugfixes: - - - bugfix - -## 0.5.5-1 (2013-09-10) - -Features: - - - feature - -Bugfixes: - - - bugfix - -## 0.5.5-0 (2013-09-09) - -Features: - - - feature - -Bugfixes: - - - bugfix - -## 0.5.4-1 (2013-09-08) - -Features: - - - feature - -Bugfixes: - - - bugfix - -## 0.5.4-0 (2013-09-08) - -Features: - - - feature - -Bugfixes: - - - bugfix - -## 0.5.3-0 (2013-09-07) - -Features: - - - feature - -Bugfixes: - - - bugfix - -## 0.5.2-0 (2013-09-07) - -Features: - - - feature - -Bugfixes: - - - bugfix - -## 0.5.1-0 (2013-09-07) - -Features: - - - feature - -Bugfixes: - - - bugfix - -## 0.5.0-0 (2013-09-07) - -Features: - - - feature - -Bugfixes: - - - bugfix - -## 0.4.0-0 (2013-09-06) - -Features: - - - feature - -Bugfixes: - - - bugfix - -## 0.3.0-1 (2013-09-06) - -Features: - - - feature - -Bugfixes: - - - bugfix - -## 0.3.0 (2013-09-06) diff --git a/node_modules/bluebird/js/browser/bluebird.js b/node_modules/bluebird/js/browser/bluebird.js deleted file mode 100644 index 2f7c13ff..00000000 --- a/node_modules/bluebird/js/browser/bluebird.js +++ /dev/null @@ -1,4892 +0,0 @@ -/* @preserve - * The MIT License (MIT) - * - * Copyright (c) 2013-2015 Petka Antonov - * - * 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. - * - */ -/** - * bluebird build version 2.11.0 - * Features enabled: core, race, call_get, generators, map, nodeify, promisify, props, reduce, settle, some, cancel, using, filter, any, each, timers -*/ -!function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var f;"undefined"!=typeof window?f=window:"undefined"!=typeof global?f=global:"undefined"!=typeof self&&(f=self),f.Promise=e()}}(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof _dereq_=="function"&&_dereq_;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof _dereq_=="function"&&_dereq_;for(var o=0;o 0; -}; - -Async.prototype.throwLater = function(fn, arg) { - if (arguments.length === 1) { - arg = fn; - fn = function () { throw arg; }; - } - if (typeof setTimeout !== "undefined") { - setTimeout(function() { - fn(arg); - }, 0); - } else try { - this._schedule(function() { - fn(arg); - }); - } catch (e) { - throw new Error("No async scheduler available\u000a\u000a See http://goo.gl/m3OTXk\u000a"); - } -}; - -function AsyncInvokeLater(fn, receiver, arg) { - this._lateQueue.push(fn, receiver, arg); - this._queueTick(); -} - -function AsyncInvoke(fn, receiver, arg) { - this._normalQueue.push(fn, receiver, arg); - this._queueTick(); -} - -function AsyncSettlePromises(promise) { - this._normalQueue._pushOne(promise); - this._queueTick(); -} - -if (!util.hasDevTools) { - Async.prototype.invokeLater = AsyncInvokeLater; - Async.prototype.invoke = AsyncInvoke; - Async.prototype.settlePromises = AsyncSettlePromises; -} else { - if (schedule.isStatic) { - schedule = function(fn) { setTimeout(fn, 0); }; - } - Async.prototype.invokeLater = function (fn, receiver, arg) { - if (this._trampolineEnabled) { - AsyncInvokeLater.call(this, fn, receiver, arg); - } else { - this._schedule(function() { - setTimeout(function() { - fn.call(receiver, arg); - }, 100); - }); - } - }; - - Async.prototype.invoke = function (fn, receiver, arg) { - if (this._trampolineEnabled) { - AsyncInvoke.call(this, fn, receiver, arg); - } else { - this._schedule(function() { - fn.call(receiver, arg); - }); - } - }; - - Async.prototype.settlePromises = function(promise) { - if (this._trampolineEnabled) { - AsyncSettlePromises.call(this, promise); - } else { - this._schedule(function() { - promise._settlePromises(); - }); - } - }; -} - -Async.prototype.invokeFirst = function (fn, receiver, arg) { - this._normalQueue.unshift(fn, receiver, arg); - this._queueTick(); -}; - -Async.prototype._drainQueue = function(queue) { - while (queue.length() > 0) { - var fn = queue.shift(); - if (typeof fn !== "function") { - fn._settlePromises(); - continue; - } - var receiver = queue.shift(); - var arg = queue.shift(); - fn.call(receiver, arg); - } -}; - -Async.prototype._drainQueues = function () { - this._drainQueue(this._normalQueue); - this._reset(); - this._drainQueue(this._lateQueue); -}; - -Async.prototype._queueTick = function () { - if (!this._isTickUsed) { - this._isTickUsed = true; - this._schedule(this.drainQueues); - } -}; - -Async.prototype._reset = function () { - this._isTickUsed = false; -}; - -module.exports = new Async(); -module.exports.firstLineError = firstLineError; - -},{"./queue.js":28,"./schedule.js":31,"./util.js":38}],3:[function(_dereq_,module,exports){ -"use strict"; -module.exports = function(Promise, INTERNAL, tryConvertToPromise) { -var rejectThis = function(_, e) { - this._reject(e); -}; - -var targetRejected = function(e, context) { - context.promiseRejectionQueued = true; - context.bindingPromise._then(rejectThis, rejectThis, null, this, e); -}; - -var bindingResolved = function(thisArg, context) { - if (this._isPending()) { - this._resolveCallback(context.target); - } -}; - -var bindingRejected = function(e, context) { - if (!context.promiseRejectionQueued) this._reject(e); -}; - -Promise.prototype.bind = function (thisArg) { - var maybePromise = tryConvertToPromise(thisArg); - var ret = new Promise(INTERNAL); - ret._propagateFrom(this, 1); - var target = this._target(); - - ret._setBoundTo(maybePromise); - if (maybePromise instanceof Promise) { - var context = { - promiseRejectionQueued: false, - promise: ret, - target: target, - bindingPromise: maybePromise - }; - target._then(INTERNAL, targetRejected, ret._progress, ret, context); - maybePromise._then( - bindingResolved, bindingRejected, ret._progress, ret, context); - } else { - ret._resolveCallback(target); - } - return ret; -}; - -Promise.prototype._setBoundTo = function (obj) { - if (obj !== undefined) { - this._bitField = this._bitField | 131072; - this._boundTo = obj; - } else { - this._bitField = this._bitField & (~131072); - } -}; - -Promise.prototype._isBound = function () { - return (this._bitField & 131072) === 131072; -}; - -Promise.bind = function (thisArg, value) { - var maybePromise = tryConvertToPromise(thisArg); - var ret = new Promise(INTERNAL); - - ret._setBoundTo(maybePromise); - if (maybePromise instanceof Promise) { - maybePromise._then(function() { - ret._resolveCallback(value); - }, ret._reject, ret._progress, ret, null); - } else { - ret._resolveCallback(value); - } - return ret; -}; -}; - -},{}],4:[function(_dereq_,module,exports){ -"use strict"; -var old; -if (typeof Promise !== "undefined") old = Promise; -function noConflict() { - try { if (Promise === bluebird) Promise = old; } - catch (e) {} - return bluebird; -} -var bluebird = _dereq_("./promise.js")(); -bluebird.noConflict = noConflict; -module.exports = bluebird; - -},{"./promise.js":23}],5:[function(_dereq_,module,exports){ -"use strict"; -var cr = Object.create; -if (cr) { - var callerCache = cr(null); - var getterCache = cr(null); - callerCache[" size"] = getterCache[" size"] = 0; -} - -module.exports = function(Promise) { -var util = _dereq_("./util.js"); -var canEvaluate = util.canEvaluate; -var isIdentifier = util.isIdentifier; - -var getMethodCaller; -var getGetter; -if (!true) { -var makeMethodCaller = function (methodName) { - return new Function("ensureMethod", " \n\ - return function(obj) { \n\ - 'use strict' \n\ - var len = this.length; \n\ - ensureMethod(obj, 'methodName'); \n\ - switch(len) { \n\ - case 1: return obj.methodName(this[0]); \n\ - case 2: return obj.methodName(this[0], this[1]); \n\ - case 3: return obj.methodName(this[0], this[1], this[2]); \n\ - case 0: return obj.methodName(); \n\ - default: \n\ - return obj.methodName.apply(obj, this); \n\ - } \n\ - }; \n\ - ".replace(/methodName/g, methodName))(ensureMethod); -}; - -var makeGetter = function (propertyName) { - return new Function("obj", " \n\ - 'use strict'; \n\ - return obj.propertyName; \n\ - ".replace("propertyName", propertyName)); -}; - -var getCompiled = function(name, compiler, cache) { - var ret = cache[name]; - if (typeof ret !== "function") { - if (!isIdentifier(name)) { - return null; - } - ret = compiler(name); - cache[name] = ret; - cache[" size"]++; - if (cache[" size"] > 512) { - var keys = Object.keys(cache); - for (var i = 0; i < 256; ++i) delete cache[keys[i]]; - cache[" size"] = keys.length - 256; - } - } - return ret; -}; - -getMethodCaller = function(name) { - return getCompiled(name, makeMethodCaller, callerCache); -}; - -getGetter = function(name) { - return getCompiled(name, makeGetter, getterCache); -}; -} - -function ensureMethod(obj, methodName) { - var fn; - if (obj != null) fn = obj[methodName]; - if (typeof fn !== "function") { - var message = "Object " + util.classString(obj) + " has no method '" + - util.toString(methodName) + "'"; - throw new Promise.TypeError(message); - } - return fn; -} - -function caller(obj) { - var methodName = this.pop(); - var fn = ensureMethod(obj, methodName); - return fn.apply(obj, this); -} -Promise.prototype.call = function (methodName) { - var $_len = arguments.length;var args = new Array($_len - 1); for(var $_i = 1; $_i < $_len; ++$_i) {args[$_i - 1] = arguments[$_i];} - if (!true) { - if (canEvaluate) { - var maybeCaller = getMethodCaller(methodName); - if (maybeCaller !== null) { - return this._then( - maybeCaller, undefined, undefined, args, undefined); - } - } - } - args.push(methodName); - return this._then(caller, undefined, undefined, args, undefined); -}; - -function namedGetter(obj) { - return obj[this]; -} -function indexedGetter(obj) { - var index = +this; - if (index < 0) index = Math.max(0, index + obj.length); - return obj[index]; -} -Promise.prototype.get = function (propertyName) { - var isIndex = (typeof propertyName === "number"); - var getter; - if (!isIndex) { - if (canEvaluate) { - var maybeGetter = getGetter(propertyName); - getter = maybeGetter !== null ? maybeGetter : namedGetter; - } else { - getter = namedGetter; - } - } else { - getter = indexedGetter; - } - return this._then(getter, undefined, undefined, propertyName, undefined); -}; -}; - -},{"./util.js":38}],6:[function(_dereq_,module,exports){ -"use strict"; -module.exports = function(Promise) { -var errors = _dereq_("./errors.js"); -var async = _dereq_("./async.js"); -var CancellationError = errors.CancellationError; - -Promise.prototype._cancel = function (reason) { - if (!this.isCancellable()) return this; - var parent; - var promiseToReject = this; - while ((parent = promiseToReject._cancellationParent) !== undefined && - parent.isCancellable()) { - promiseToReject = parent; - } - this._unsetCancellable(); - promiseToReject._target()._rejectCallback(reason, false, true); -}; - -Promise.prototype.cancel = function (reason) { - if (!this.isCancellable()) return this; - if (reason === undefined) reason = new CancellationError(); - async.invokeLater(this._cancel, this, reason); - return this; -}; - -Promise.prototype.cancellable = function () { - if (this._cancellable()) return this; - async.enableTrampoline(); - this._setCancellable(); - this._cancellationParent = undefined; - return this; -}; - -Promise.prototype.uncancellable = function () { - var ret = this.then(); - ret._unsetCancellable(); - return ret; -}; - -Promise.prototype.fork = function (didFulfill, didReject, didProgress) { - var ret = this._then(didFulfill, didReject, didProgress, - undefined, undefined); - - ret._setCancellable(); - ret._cancellationParent = undefined; - return ret; -}; -}; - -},{"./async.js":2,"./errors.js":13}],7:[function(_dereq_,module,exports){ -"use strict"; -module.exports = function() { -var async = _dereq_("./async.js"); -var util = _dereq_("./util.js"); -var bluebirdFramePattern = - /[\\\/]bluebird[\\\/]js[\\\/](main|debug|zalgo|instrumented)/; -var stackFramePattern = null; -var formatStack = null; -var indentStackFrames = false; -var warn; - -function CapturedTrace(parent) { - this._parent = parent; - var length = this._length = 1 + (parent === undefined ? 0 : parent._length); - captureStackTrace(this, CapturedTrace); - if (length > 32) this.uncycle(); -} -util.inherits(CapturedTrace, Error); - -CapturedTrace.prototype.uncycle = function() { - var length = this._length; - if (length < 2) return; - var nodes = []; - var stackToIndex = {}; - - for (var i = 0, node = this; node !== undefined; ++i) { - nodes.push(node); - node = node._parent; - } - length = this._length = i; - for (var i = length - 1; i >= 0; --i) { - var stack = nodes[i].stack; - if (stackToIndex[stack] === undefined) { - stackToIndex[stack] = i; - } - } - for (var i = 0; i < length; ++i) { - var currentStack = nodes[i].stack; - var index = stackToIndex[currentStack]; - if (index !== undefined && index !== i) { - if (index > 0) { - nodes[index - 1]._parent = undefined; - nodes[index - 1]._length = 1; - } - nodes[i]._parent = undefined; - nodes[i]._length = 1; - var cycleEdgeNode = i > 0 ? nodes[i - 1] : this; - - if (index < length - 1) { - cycleEdgeNode._parent = nodes[index + 1]; - cycleEdgeNode._parent.uncycle(); - cycleEdgeNode._length = - cycleEdgeNode._parent._length + 1; - } else { - cycleEdgeNode._parent = undefined; - cycleEdgeNode._length = 1; - } - var currentChildLength = cycleEdgeNode._length + 1; - for (var j = i - 2; j >= 0; --j) { - nodes[j]._length = currentChildLength; - currentChildLength++; - } - return; - } - } -}; - -CapturedTrace.prototype.parent = function() { - return this._parent; -}; - -CapturedTrace.prototype.hasParent = function() { - return this._parent !== undefined; -}; - -CapturedTrace.prototype.attachExtraTrace = function(error) { - if (error.__stackCleaned__) return; - this.uncycle(); - var parsed = CapturedTrace.parseStackAndMessage(error); - var message = parsed.message; - var stacks = [parsed.stack]; - - var trace = this; - while (trace !== undefined) { - stacks.push(cleanStack(trace.stack.split("\n"))); - trace = trace._parent; - } - removeCommonRoots(stacks); - removeDuplicateOrEmptyJumps(stacks); - util.notEnumerableProp(error, "stack", reconstructStack(message, stacks)); - util.notEnumerableProp(error, "__stackCleaned__", true); -}; - -function reconstructStack(message, stacks) { - for (var i = 0; i < stacks.length - 1; ++i) { - stacks[i].push("From previous event:"); - stacks[i] = stacks[i].join("\n"); - } - if (i < stacks.length) { - stacks[i] = stacks[i].join("\n"); - } - return message + "\n" + stacks.join("\n"); -} - -function removeDuplicateOrEmptyJumps(stacks) { - for (var i = 0; i < stacks.length; ++i) { - if (stacks[i].length === 0 || - ((i + 1 < stacks.length) && stacks[i][0] === stacks[i+1][0])) { - stacks.splice(i, 1); - i--; - } - } -} - -function removeCommonRoots(stacks) { - var current = stacks[0]; - for (var i = 1; i < stacks.length; ++i) { - var prev = stacks[i]; - var currentLastIndex = current.length - 1; - var currentLastLine = current[currentLastIndex]; - var commonRootMeetPoint = -1; - - for (var j = prev.length - 1; j >= 0; --j) { - if (prev[j] === currentLastLine) { - commonRootMeetPoint = j; - break; - } - } - - for (var j = commonRootMeetPoint; j >= 0; --j) { - var line = prev[j]; - if (current[currentLastIndex] === line) { - current.pop(); - currentLastIndex--; - } else { - break; - } - } - current = prev; - } -} - -function cleanStack(stack) { - var ret = []; - for (var i = 0; i < stack.length; ++i) { - var line = stack[i]; - var isTraceLine = stackFramePattern.test(line) || - " (No stack trace)" === line; - var isInternalFrame = isTraceLine && shouldIgnore(line); - if (isTraceLine && !isInternalFrame) { - if (indentStackFrames && line.charAt(0) !== " ") { - line = " " + line; - } - ret.push(line); - } - } - return ret; -} - -function stackFramesAsArray(error) { - var stack = error.stack.replace(/\s+$/g, "").split("\n"); - for (var i = 0; i < stack.length; ++i) { - var line = stack[i]; - if (" (No stack trace)" === line || stackFramePattern.test(line)) { - break; - } - } - if (i > 0) { - stack = stack.slice(i); - } - return stack; -} - -CapturedTrace.parseStackAndMessage = function(error) { - var stack = error.stack; - var message = error.toString(); - stack = typeof stack === "string" && stack.length > 0 - ? stackFramesAsArray(error) : [" (No stack trace)"]; - return { - message: message, - stack: cleanStack(stack) - }; -}; - -CapturedTrace.formatAndLogError = function(error, title) { - if (typeof console !== "undefined") { - var message; - if (typeof error === "object" || typeof error === "function") { - var stack = error.stack; - message = title + formatStack(stack, error); - } else { - message = title + String(error); - } - if (typeof warn === "function") { - warn(message); - } else if (typeof console.log === "function" || - typeof console.log === "object") { - console.log(message); - } - } -}; - -CapturedTrace.unhandledRejection = function (reason) { - CapturedTrace.formatAndLogError(reason, "^--- With additional stack trace: "); -}; - -CapturedTrace.isSupported = function () { - return typeof captureStackTrace === "function"; -}; - -CapturedTrace.fireRejectionEvent = -function(name, localHandler, reason, promise) { - var localEventFired = false; - try { - if (typeof localHandler === "function") { - localEventFired = true; - if (name === "rejectionHandled") { - localHandler(promise); - } else { - localHandler(reason, promise); - } - } - } catch (e) { - async.throwLater(e); - } - - var globalEventFired = false; - try { - globalEventFired = fireGlobalEvent(name, reason, promise); - } catch (e) { - globalEventFired = true; - async.throwLater(e); - } - - var domEventFired = false; - if (fireDomEvent) { - try { - domEventFired = fireDomEvent(name.toLowerCase(), { - reason: reason, - promise: promise - }); - } catch (e) { - domEventFired = true; - async.throwLater(e); - } - } - - if (!globalEventFired && !localEventFired && !domEventFired && - name === "unhandledRejection") { - CapturedTrace.formatAndLogError(reason, "Unhandled rejection "); - } -}; - -function formatNonError(obj) { - var str; - if (typeof obj === "function") { - str = "[function " + - (obj.name || "anonymous") + - "]"; - } else { - str = obj.toString(); - var ruselessToString = /\[object [a-zA-Z0-9$_]+\]/; - if (ruselessToString.test(str)) { - try { - var newStr = JSON.stringify(obj); - str = newStr; - } - catch(e) { - - } - } - if (str.length === 0) { - str = "(empty array)"; - } - } - return ("(<" + snip(str) + ">, no stack trace)"); -} - -function snip(str) { - var maxChars = 41; - if (str.length < maxChars) { - return str; - } - return str.substr(0, maxChars - 3) + "..."; -} - -var shouldIgnore = function() { return false; }; -var parseLineInfoRegex = /[\/<\(]([^:\/]+):(\d+):(?:\d+)\)?\s*$/; -function parseLineInfo(line) { - var matches = line.match(parseLineInfoRegex); - if (matches) { - return { - fileName: matches[1], - line: parseInt(matches[2], 10) - }; - } -} -CapturedTrace.setBounds = function(firstLineError, lastLineError) { - if (!CapturedTrace.isSupported()) return; - var firstStackLines = firstLineError.stack.split("\n"); - var lastStackLines = lastLineError.stack.split("\n"); - var firstIndex = -1; - var lastIndex = -1; - var firstFileName; - var lastFileName; - for (var i = 0; i < firstStackLines.length; ++i) { - var result = parseLineInfo(firstStackLines[i]); - if (result) { - firstFileName = result.fileName; - firstIndex = result.line; - break; - } - } - for (var i = 0; i < lastStackLines.length; ++i) { - var result = parseLineInfo(lastStackLines[i]); - if (result) { - lastFileName = result.fileName; - lastIndex = result.line; - break; - } - } - if (firstIndex < 0 || lastIndex < 0 || !firstFileName || !lastFileName || - firstFileName !== lastFileName || firstIndex >= lastIndex) { - return; - } - - shouldIgnore = function(line) { - if (bluebirdFramePattern.test(line)) return true; - var info = parseLineInfo(line); - if (info) { - if (info.fileName === firstFileName && - (firstIndex <= info.line && info.line <= lastIndex)) { - return true; - } - } - return false; - }; -}; - -var captureStackTrace = (function stackDetection() { - var v8stackFramePattern = /^\s*at\s*/; - var v8stackFormatter = function(stack, error) { - if (typeof stack === "string") return stack; - - if (error.name !== undefined && - error.message !== undefined) { - return error.toString(); - } - return formatNonError(error); - }; - - if (typeof Error.stackTraceLimit === "number" && - typeof Error.captureStackTrace === "function") { - Error.stackTraceLimit = Error.stackTraceLimit + 6; - stackFramePattern = v8stackFramePattern; - formatStack = v8stackFormatter; - var captureStackTrace = Error.captureStackTrace; - - shouldIgnore = function(line) { - return bluebirdFramePattern.test(line); - }; - return function(receiver, ignoreUntil) { - Error.stackTraceLimit = Error.stackTraceLimit + 6; - captureStackTrace(receiver, ignoreUntil); - Error.stackTraceLimit = Error.stackTraceLimit - 6; - }; - } - var err = new Error(); - - if (typeof err.stack === "string" && - err.stack.split("\n")[0].indexOf("stackDetection@") >= 0) { - stackFramePattern = /@/; - formatStack = v8stackFormatter; - indentStackFrames = true; - return function captureStackTrace(o) { - o.stack = new Error().stack; - }; - } - - var hasStackAfterThrow; - try { throw new Error(); } - catch(e) { - hasStackAfterThrow = ("stack" in e); - } - if (!("stack" in err) && hasStackAfterThrow && - typeof Error.stackTraceLimit === "number") { - stackFramePattern = v8stackFramePattern; - formatStack = v8stackFormatter; - return function captureStackTrace(o) { - Error.stackTraceLimit = Error.stackTraceLimit + 6; - try { throw new Error(); } - catch(e) { o.stack = e.stack; } - Error.stackTraceLimit = Error.stackTraceLimit - 6; - }; - } - - formatStack = function(stack, error) { - if (typeof stack === "string") return stack; - - if ((typeof error === "object" || - typeof error === "function") && - error.name !== undefined && - error.message !== undefined) { - return error.toString(); - } - return formatNonError(error); - }; - - return null; - -})([]); - -var fireDomEvent; -var fireGlobalEvent = (function() { - if (util.isNode) { - return function(name, reason, promise) { - if (name === "rejectionHandled") { - return process.emit(name, promise); - } else { - return process.emit(name, reason, promise); - } - }; - } else { - var customEventWorks = false; - var anyEventWorks = true; - try { - var ev = new self.CustomEvent("test"); - customEventWorks = ev instanceof CustomEvent; - } catch (e) {} - if (!customEventWorks) { - try { - var event = document.createEvent("CustomEvent"); - event.initCustomEvent("testingtheevent", false, true, {}); - self.dispatchEvent(event); - } catch (e) { - anyEventWorks = false; - } - } - if (anyEventWorks) { - fireDomEvent = function(type, detail) { - var event; - if (customEventWorks) { - event = new self.CustomEvent(type, { - detail: detail, - bubbles: false, - cancelable: true - }); - } else if (self.dispatchEvent) { - event = document.createEvent("CustomEvent"); - event.initCustomEvent(type, false, true, detail); - } - - return event ? !self.dispatchEvent(event) : false; - }; - } - - var toWindowMethodNameMap = {}; - toWindowMethodNameMap["unhandledRejection"] = ("on" + - "unhandledRejection").toLowerCase(); - toWindowMethodNameMap["rejectionHandled"] = ("on" + - "rejectionHandled").toLowerCase(); - - return function(name, reason, promise) { - var methodName = toWindowMethodNameMap[name]; - var method = self[methodName]; - if (!method) return false; - if (name === "rejectionHandled") { - method.call(self, promise); - } else { - method.call(self, reason, promise); - } - return true; - }; - } -})(); - -if (typeof console !== "undefined" && typeof console.warn !== "undefined") { - warn = function (message) { - console.warn(message); - }; - if (util.isNode && process.stderr.isTTY) { - warn = function(message) { - process.stderr.write("\u001b[31m" + message + "\u001b[39m\n"); - }; - } else if (!util.isNode && typeof (new Error().stack) === "string") { - warn = function(message) { - console.warn("%c" + message, "color: red"); - }; - } -} - -return CapturedTrace; -}; - -},{"./async.js":2,"./util.js":38}],8:[function(_dereq_,module,exports){ -"use strict"; -module.exports = function(NEXT_FILTER) { -var util = _dereq_("./util.js"); -var errors = _dereq_("./errors.js"); -var tryCatch = util.tryCatch; -var errorObj = util.errorObj; -var keys = _dereq_("./es5.js").keys; -var TypeError = errors.TypeError; - -function CatchFilter(instances, callback, promise) { - this._instances = instances; - this._callback = callback; - this._promise = promise; -} - -function safePredicate(predicate, e) { - var safeObject = {}; - var retfilter = tryCatch(predicate).call(safeObject, e); - - if (retfilter === errorObj) return retfilter; - - var safeKeys = keys(safeObject); - if (safeKeys.length) { - errorObj.e = new TypeError("Catch filter must inherit from Error or be a simple predicate function\u000a\u000a See http://goo.gl/o84o68\u000a"); - return errorObj; - } - return retfilter; -} - -CatchFilter.prototype.doFilter = function (e) { - var cb = this._callback; - var promise = this._promise; - var boundTo = promise._boundValue(); - for (var i = 0, len = this._instances.length; i < len; ++i) { - var item = this._instances[i]; - var itemIsErrorType = item === Error || - (item != null && item.prototype instanceof Error); - - if (itemIsErrorType && e instanceof item) { - var ret = tryCatch(cb).call(boundTo, e); - if (ret === errorObj) { - NEXT_FILTER.e = ret.e; - return NEXT_FILTER; - } - return ret; - } else if (typeof item === "function" && !itemIsErrorType) { - var shouldHandle = safePredicate(item, e); - if (shouldHandle === errorObj) { - e = errorObj.e; - break; - } else if (shouldHandle) { - var ret = tryCatch(cb).call(boundTo, e); - if (ret === errorObj) { - NEXT_FILTER.e = ret.e; - return NEXT_FILTER; - } - return ret; - } - } - } - NEXT_FILTER.e = e; - return NEXT_FILTER; -}; - -return CatchFilter; -}; - -},{"./errors.js":13,"./es5.js":14,"./util.js":38}],9:[function(_dereq_,module,exports){ -"use strict"; -module.exports = function(Promise, CapturedTrace, isDebugging) { -var contextStack = []; -function Context() { - this._trace = new CapturedTrace(peekContext()); -} -Context.prototype._pushContext = function () { - if (!isDebugging()) return; - if (this._trace !== undefined) { - contextStack.push(this._trace); - } -}; - -Context.prototype._popContext = function () { - if (!isDebugging()) return; - if (this._trace !== undefined) { - contextStack.pop(); - } -}; - -function createContext() { - if (isDebugging()) return new Context(); -} - -function peekContext() { - var lastIndex = contextStack.length - 1; - if (lastIndex >= 0) { - return contextStack[lastIndex]; - } - return undefined; -} - -Promise.prototype._peekContext = peekContext; -Promise.prototype._pushContext = Context.prototype._pushContext; -Promise.prototype._popContext = Context.prototype._popContext; - -return createContext; -}; - -},{}],10:[function(_dereq_,module,exports){ -"use strict"; -module.exports = function(Promise, CapturedTrace) { -var getDomain = Promise._getDomain; -var async = _dereq_("./async.js"); -var Warning = _dereq_("./errors.js").Warning; -var util = _dereq_("./util.js"); -var canAttachTrace = util.canAttachTrace; -var unhandledRejectionHandled; -var possiblyUnhandledRejection; -var debugging = false || (util.isNode && - (!!process.env["BLUEBIRD_DEBUG"] || - process.env["NODE_ENV"] === "development")); - -if (util.isNode && process.env["BLUEBIRD_DEBUG"] == 0) debugging = false; - -if (debugging) { - async.disableTrampolineIfNecessary(); -} - -Promise.prototype._ignoreRejections = function() { - this._unsetRejectionIsUnhandled(); - this._bitField = this._bitField | 16777216; -}; - -Promise.prototype._ensurePossibleRejectionHandled = function () { - if ((this._bitField & 16777216) !== 0) return; - this._setRejectionIsUnhandled(); - async.invokeLater(this._notifyUnhandledRejection, this, undefined); -}; - -Promise.prototype._notifyUnhandledRejectionIsHandled = function () { - CapturedTrace.fireRejectionEvent("rejectionHandled", - unhandledRejectionHandled, undefined, this); -}; - -Promise.prototype._notifyUnhandledRejection = function () { - if (this._isRejectionUnhandled()) { - var reason = this._getCarriedStackTrace() || this._settledValue; - this._setUnhandledRejectionIsNotified(); - CapturedTrace.fireRejectionEvent("unhandledRejection", - possiblyUnhandledRejection, reason, this); - } -}; - -Promise.prototype._setUnhandledRejectionIsNotified = function () { - this._bitField = this._bitField | 524288; -}; - -Promise.prototype._unsetUnhandledRejectionIsNotified = function () { - this._bitField = this._bitField & (~524288); -}; - -Promise.prototype._isUnhandledRejectionNotified = function () { - return (this._bitField & 524288) > 0; -}; - -Promise.prototype._setRejectionIsUnhandled = function () { - this._bitField = this._bitField | 2097152; -}; - -Promise.prototype._unsetRejectionIsUnhandled = function () { - this._bitField = this._bitField & (~2097152); - if (this._isUnhandledRejectionNotified()) { - this._unsetUnhandledRejectionIsNotified(); - this._notifyUnhandledRejectionIsHandled(); - } -}; - -Promise.prototype._isRejectionUnhandled = function () { - return (this._bitField & 2097152) > 0; -}; - -Promise.prototype._setCarriedStackTrace = function (capturedTrace) { - this._bitField = this._bitField | 1048576; - this._fulfillmentHandler0 = capturedTrace; -}; - -Promise.prototype._isCarryingStackTrace = function () { - return (this._bitField & 1048576) > 0; -}; - -Promise.prototype._getCarriedStackTrace = function () { - return this._isCarryingStackTrace() - ? this._fulfillmentHandler0 - : undefined; -}; - -Promise.prototype._captureStackTrace = function () { - if (debugging) { - this._trace = new CapturedTrace(this._peekContext()); - } - return this; -}; - -Promise.prototype._attachExtraTrace = function (error, ignoreSelf) { - if (debugging && canAttachTrace(error)) { - var trace = this._trace; - if (trace !== undefined) { - if (ignoreSelf) trace = trace._parent; - } - if (trace !== undefined) { - trace.attachExtraTrace(error); - } else if (!error.__stackCleaned__) { - var parsed = CapturedTrace.parseStackAndMessage(error); - util.notEnumerableProp(error, "stack", - parsed.message + "\n" + parsed.stack.join("\n")); - util.notEnumerableProp(error, "__stackCleaned__", true); - } - } -}; - -Promise.prototype._warn = function(message) { - var warning = new Warning(message); - var ctx = this._peekContext(); - if (ctx) { - ctx.attachExtraTrace(warning); - } else { - var parsed = CapturedTrace.parseStackAndMessage(warning); - warning.stack = parsed.message + "\n" + parsed.stack.join("\n"); - } - CapturedTrace.formatAndLogError(warning, ""); -}; - -Promise.onPossiblyUnhandledRejection = function (fn) { - var domain = getDomain(); - possiblyUnhandledRejection = - typeof fn === "function" ? (domain === null ? fn : domain.bind(fn)) - : undefined; -}; - -Promise.onUnhandledRejectionHandled = function (fn) { - var domain = getDomain(); - unhandledRejectionHandled = - typeof fn === "function" ? (domain === null ? fn : domain.bind(fn)) - : undefined; -}; - -Promise.longStackTraces = function () { - if (async.haveItemsQueued() && - debugging === false - ) { - throw new Error("cannot enable long stack traces after promises have been created\u000a\u000a See http://goo.gl/DT1qyG\u000a"); - } - debugging = CapturedTrace.isSupported(); - if (debugging) { - async.disableTrampolineIfNecessary(); - } -}; - -Promise.hasLongStackTraces = function () { - return debugging && CapturedTrace.isSupported(); -}; - -if (!CapturedTrace.isSupported()) { - Promise.longStackTraces = function(){}; - debugging = false; -} - -return function() { - return debugging; -}; -}; - -},{"./async.js":2,"./errors.js":13,"./util.js":38}],11:[function(_dereq_,module,exports){ -"use strict"; -var util = _dereq_("./util.js"); -var isPrimitive = util.isPrimitive; - -module.exports = function(Promise) { -var returner = function () { - return this; -}; -var thrower = function () { - throw this; -}; -var returnUndefined = function() {}; -var throwUndefined = function() { - throw undefined; -}; - -var wrapper = function (value, action) { - if (action === 1) { - return function () { - throw value; - }; - } else if (action === 2) { - return function () { - return value; - }; - } -}; - - -Promise.prototype["return"] = -Promise.prototype.thenReturn = function (value) { - if (value === undefined) return this.then(returnUndefined); - - if (isPrimitive(value)) { - return this._then( - wrapper(value, 2), - undefined, - undefined, - undefined, - undefined - ); - } else if (value instanceof Promise) { - value._ignoreRejections(); - } - return this._then(returner, undefined, undefined, value, undefined); -}; - -Promise.prototype["throw"] = -Promise.prototype.thenThrow = function (reason) { - if (reason === undefined) return this.then(throwUndefined); - - if (isPrimitive(reason)) { - return this._then( - wrapper(reason, 1), - undefined, - undefined, - undefined, - undefined - ); - } - return this._then(thrower, undefined, undefined, reason, undefined); -}; -}; - -},{"./util.js":38}],12:[function(_dereq_,module,exports){ -"use strict"; -module.exports = function(Promise, INTERNAL) { -var PromiseReduce = Promise.reduce; - -Promise.prototype.each = function (fn) { - return PromiseReduce(this, fn, null, INTERNAL); -}; - -Promise.each = function (promises, fn) { - return PromiseReduce(promises, fn, null, INTERNAL); -}; -}; - -},{}],13:[function(_dereq_,module,exports){ -"use strict"; -var es5 = _dereq_("./es5.js"); -var Objectfreeze = es5.freeze; -var util = _dereq_("./util.js"); -var inherits = util.inherits; -var notEnumerableProp = util.notEnumerableProp; - -function subError(nameProperty, defaultMessage) { - function SubError(message) { - if (!(this instanceof SubError)) return new SubError(message); - notEnumerableProp(this, "message", - typeof message === "string" ? message : defaultMessage); - notEnumerableProp(this, "name", nameProperty); - if (Error.captureStackTrace) { - Error.captureStackTrace(this, this.constructor); - } else { - Error.call(this); - } - } - inherits(SubError, Error); - return SubError; -} - -var _TypeError, _RangeError; -var Warning = subError("Warning", "warning"); -var CancellationError = subError("CancellationError", "cancellation error"); -var TimeoutError = subError("TimeoutError", "timeout error"); -var AggregateError = subError("AggregateError", "aggregate error"); -try { - _TypeError = TypeError; - _RangeError = RangeError; -} catch(e) { - _TypeError = subError("TypeError", "type error"); - _RangeError = subError("RangeError", "range error"); -} - -var methods = ("join pop push shift unshift slice filter forEach some " + - "every map indexOf lastIndexOf reduce reduceRight sort reverse").split(" "); - -for (var i = 0; i < methods.length; ++i) { - if (typeof Array.prototype[methods[i]] === "function") { - AggregateError.prototype[methods[i]] = Array.prototype[methods[i]]; - } -} - -es5.defineProperty(AggregateError.prototype, "length", { - value: 0, - configurable: false, - writable: true, - enumerable: true -}); -AggregateError.prototype["isOperational"] = true; -var level = 0; -AggregateError.prototype.toString = function() { - var indent = Array(level * 4 + 1).join(" "); - var ret = "\n" + indent + "AggregateError of:" + "\n"; - level++; - indent = Array(level * 4 + 1).join(" "); - for (var i = 0; i < this.length; ++i) { - var str = this[i] === this ? "[Circular AggregateError]" : this[i] + ""; - var lines = str.split("\n"); - for (var j = 0; j < lines.length; ++j) { - lines[j] = indent + lines[j]; - } - str = lines.join("\n"); - ret += str + "\n"; - } - level--; - return ret; -}; - -function OperationalError(message) { - if (!(this instanceof OperationalError)) - return new OperationalError(message); - notEnumerableProp(this, "name", "OperationalError"); - notEnumerableProp(this, "message", message); - this.cause = message; - this["isOperational"] = true; - - if (message instanceof Error) { - notEnumerableProp(this, "message", message.message); - notEnumerableProp(this, "stack", message.stack); - } else if (Error.captureStackTrace) { - Error.captureStackTrace(this, this.constructor); - } - -} -inherits(OperationalError, Error); - -var errorTypes = Error["__BluebirdErrorTypes__"]; -if (!errorTypes) { - errorTypes = Objectfreeze({ - CancellationError: CancellationError, - TimeoutError: TimeoutError, - OperationalError: OperationalError, - RejectionError: OperationalError, - AggregateError: AggregateError - }); - notEnumerableProp(Error, "__BluebirdErrorTypes__", errorTypes); -} - -module.exports = { - Error: Error, - TypeError: _TypeError, - RangeError: _RangeError, - CancellationError: errorTypes.CancellationError, - OperationalError: errorTypes.OperationalError, - TimeoutError: errorTypes.TimeoutError, - AggregateError: errorTypes.AggregateError, - Warning: Warning -}; - -},{"./es5.js":14,"./util.js":38}],14:[function(_dereq_,module,exports){ -var isES5 = (function(){ - "use strict"; - return this === undefined; -})(); - -if (isES5) { - module.exports = { - freeze: Object.freeze, - defineProperty: Object.defineProperty, - getDescriptor: Object.getOwnPropertyDescriptor, - keys: Object.keys, - names: Object.getOwnPropertyNames, - getPrototypeOf: Object.getPrototypeOf, - isArray: Array.isArray, - isES5: isES5, - propertyIsWritable: function(obj, prop) { - var descriptor = Object.getOwnPropertyDescriptor(obj, prop); - return !!(!descriptor || descriptor.writable || descriptor.set); - } - }; -} else { - var has = {}.hasOwnProperty; - var str = {}.toString; - var proto = {}.constructor.prototype; - - var ObjectKeys = function (o) { - var ret = []; - for (var key in o) { - if (has.call(o, key)) { - ret.push(key); - } - } - return ret; - }; - - var ObjectGetDescriptor = function(o, key) { - return {value: o[key]}; - }; - - var ObjectDefineProperty = function (o, key, desc) { - o[key] = desc.value; - return o; - }; - - var ObjectFreeze = function (obj) { - return obj; - }; - - var ObjectGetPrototypeOf = function (obj) { - try { - return Object(obj).constructor.prototype; - } - catch (e) { - return proto; - } - }; - - var ArrayIsArray = function (obj) { - try { - return str.call(obj) === "[object Array]"; - } - catch(e) { - return false; - } - }; - - module.exports = { - isArray: ArrayIsArray, - keys: ObjectKeys, - names: ObjectKeys, - defineProperty: ObjectDefineProperty, - getDescriptor: ObjectGetDescriptor, - freeze: ObjectFreeze, - getPrototypeOf: ObjectGetPrototypeOf, - isES5: isES5, - propertyIsWritable: function() { - return true; - } - }; -} - -},{}],15:[function(_dereq_,module,exports){ -"use strict"; -module.exports = function(Promise, INTERNAL) { -var PromiseMap = Promise.map; - -Promise.prototype.filter = function (fn, options) { - return PromiseMap(this, fn, options, INTERNAL); -}; - -Promise.filter = function (promises, fn, options) { - return PromiseMap(promises, fn, options, INTERNAL); -}; -}; - -},{}],16:[function(_dereq_,module,exports){ -"use strict"; -module.exports = function(Promise, NEXT_FILTER, tryConvertToPromise) { -var util = _dereq_("./util.js"); -var isPrimitive = util.isPrimitive; -var thrower = util.thrower; - -function returnThis() { - return this; -} -function throwThis() { - throw this; -} -function return$(r) { - return function() { - return r; - }; -} -function throw$(r) { - return function() { - throw r; - }; -} -function promisedFinally(ret, reasonOrValue, isFulfilled) { - var then; - if (isPrimitive(reasonOrValue)) { - then = isFulfilled ? return$(reasonOrValue) : throw$(reasonOrValue); - } else { - then = isFulfilled ? returnThis : throwThis; - } - return ret._then(then, thrower, undefined, reasonOrValue, undefined); -} - -function finallyHandler(reasonOrValue) { - var promise = this.promise; - var handler = this.handler; - - var ret = promise._isBound() - ? handler.call(promise._boundValue()) - : handler(); - - if (ret !== undefined) { - var maybePromise = tryConvertToPromise(ret, promise); - if (maybePromise instanceof Promise) { - maybePromise = maybePromise._target(); - return promisedFinally(maybePromise, reasonOrValue, - promise.isFulfilled()); - } - } - - if (promise.isRejected()) { - NEXT_FILTER.e = reasonOrValue; - return NEXT_FILTER; - } else { - return reasonOrValue; - } -} - -function tapHandler(value) { - var promise = this.promise; - var handler = this.handler; - - var ret = promise._isBound() - ? handler.call(promise._boundValue(), value) - : handler(value); - - if (ret !== undefined) { - var maybePromise = tryConvertToPromise(ret, promise); - if (maybePromise instanceof Promise) { - maybePromise = maybePromise._target(); - return promisedFinally(maybePromise, value, true); - } - } - return value; -} - -Promise.prototype._passThroughHandler = function (handler, isFinally) { - if (typeof handler !== "function") return this.then(); - - var promiseAndHandler = { - promise: this, - handler: handler - }; - - return this._then( - isFinally ? finallyHandler : tapHandler, - isFinally ? finallyHandler : undefined, undefined, - promiseAndHandler, undefined); -}; - -Promise.prototype.lastly = -Promise.prototype["finally"] = function (handler) { - return this._passThroughHandler(handler, true); -}; - -Promise.prototype.tap = function (handler) { - return this._passThroughHandler(handler, false); -}; -}; - -},{"./util.js":38}],17:[function(_dereq_,module,exports){ -"use strict"; -module.exports = function(Promise, - apiRejection, - INTERNAL, - tryConvertToPromise) { -var errors = _dereq_("./errors.js"); -var TypeError = errors.TypeError; -var util = _dereq_("./util.js"); -var errorObj = util.errorObj; -var tryCatch = util.tryCatch; -var yieldHandlers = []; - -function promiseFromYieldHandler(value, yieldHandlers, traceParent) { - for (var i = 0; i < yieldHandlers.length; ++i) { - traceParent._pushContext(); - var result = tryCatch(yieldHandlers[i])(value); - traceParent._popContext(); - if (result === errorObj) { - traceParent._pushContext(); - var ret = Promise.reject(errorObj.e); - traceParent._popContext(); - return ret; - } - var maybePromise = tryConvertToPromise(result, traceParent); - if (maybePromise instanceof Promise) return maybePromise; - } - return null; -} - -function PromiseSpawn(generatorFunction, receiver, yieldHandler, stack) { - var promise = this._promise = new Promise(INTERNAL); - promise._captureStackTrace(); - this._stack = stack; - this._generatorFunction = generatorFunction; - this._receiver = receiver; - this._generator = undefined; - this._yieldHandlers = typeof yieldHandler === "function" - ? [yieldHandler].concat(yieldHandlers) - : yieldHandlers; -} - -PromiseSpawn.prototype.promise = function () { - return this._promise; -}; - -PromiseSpawn.prototype._run = function () { - this._generator = this._generatorFunction.call(this._receiver); - this._receiver = - this._generatorFunction = undefined; - this._next(undefined); -}; - -PromiseSpawn.prototype._continue = function (result) { - if (result === errorObj) { - return this._promise._rejectCallback(result.e, false, true); - } - - var value = result.value; - if (result.done === true) { - this._promise._resolveCallback(value); - } else { - var maybePromise = tryConvertToPromise(value, this._promise); - if (!(maybePromise instanceof Promise)) { - maybePromise = - promiseFromYieldHandler(maybePromise, - this._yieldHandlers, - this._promise); - if (maybePromise === null) { - this._throw( - new TypeError( - "A value %s was yielded that could not be treated as a promise\u000a\u000a See http://goo.gl/4Y4pDk\u000a\u000a".replace("%s", value) + - "From coroutine:\u000a" + - this._stack.split("\n").slice(1, -7).join("\n") - ) - ); - return; - } - } - maybePromise._then( - this._next, - this._throw, - undefined, - this, - null - ); - } -}; - -PromiseSpawn.prototype._throw = function (reason) { - this._promise._attachExtraTrace(reason); - this._promise._pushContext(); - var result = tryCatch(this._generator["throw"]) - .call(this._generator, reason); - this._promise._popContext(); - this._continue(result); -}; - -PromiseSpawn.prototype._next = function (value) { - this._promise._pushContext(); - var result = tryCatch(this._generator.next).call(this._generator, value); - this._promise._popContext(); - this._continue(result); -}; - -Promise.coroutine = function (generatorFunction, options) { - if (typeof generatorFunction !== "function") { - throw new TypeError("generatorFunction must be a function\u000a\u000a See http://goo.gl/6Vqhm0\u000a"); - } - var yieldHandler = Object(options).yieldHandler; - var PromiseSpawn$ = PromiseSpawn; - var stack = new Error().stack; - return function () { - var generator = generatorFunction.apply(this, arguments); - var spawn = new PromiseSpawn$(undefined, undefined, yieldHandler, - stack); - spawn._generator = generator; - spawn._next(undefined); - return spawn.promise(); - }; -}; - -Promise.coroutine.addYieldHandler = function(fn) { - if (typeof fn !== "function") throw new TypeError("fn must be a function\u000a\u000a See http://goo.gl/916lJJ\u000a"); - yieldHandlers.push(fn); -}; - -Promise.spawn = function (generatorFunction) { - if (typeof generatorFunction !== "function") { - return apiRejection("generatorFunction must be a function\u000a\u000a See http://goo.gl/6Vqhm0\u000a"); - } - var spawn = new PromiseSpawn(generatorFunction, this); - var ret = spawn.promise(); - spawn._run(Promise.spawn); - return ret; -}; -}; - -},{"./errors.js":13,"./util.js":38}],18:[function(_dereq_,module,exports){ -"use strict"; -module.exports = -function(Promise, PromiseArray, tryConvertToPromise, INTERNAL) { -var util = _dereq_("./util.js"); -var canEvaluate = util.canEvaluate; -var tryCatch = util.tryCatch; -var errorObj = util.errorObj; -var reject; - -if (!true) { -if (canEvaluate) { - var thenCallback = function(i) { - return new Function("value", "holder", " \n\ - 'use strict'; \n\ - holder.pIndex = value; \n\ - holder.checkFulfillment(this); \n\ - ".replace(/Index/g, i)); - }; - - var caller = function(count) { - var values = []; - for (var i = 1; i <= count; ++i) values.push("holder.p" + i); - return new Function("holder", " \n\ - 'use strict'; \n\ - var callback = holder.fn; \n\ - return callback(values); \n\ - ".replace(/values/g, values.join(", "))); - }; - var thenCallbacks = []; - var callers = [undefined]; - for (var i = 1; i <= 5; ++i) { - thenCallbacks.push(thenCallback(i)); - callers.push(caller(i)); - } - - var Holder = function(total, fn) { - this.p1 = this.p2 = this.p3 = this.p4 = this.p5 = null; - this.fn = fn; - this.total = total; - this.now = 0; - }; - - Holder.prototype.callers = callers; - Holder.prototype.checkFulfillment = function(promise) { - var now = this.now; - now++; - var total = this.total; - if (now >= total) { - var handler = this.callers[total]; - promise._pushContext(); - var ret = tryCatch(handler)(this); - promise._popContext(); - if (ret === errorObj) { - promise._rejectCallback(ret.e, false, true); - } else { - promise._resolveCallback(ret); - } - } else { - this.now = now; - } - }; - - var reject = function (reason) { - this._reject(reason); - }; -} -} - -Promise.join = function () { - var last = arguments.length - 1; - var fn; - if (last > 0 && typeof arguments[last] === "function") { - fn = arguments[last]; - if (!true) { - if (last < 6 && canEvaluate) { - var ret = new Promise(INTERNAL); - ret._captureStackTrace(); - var holder = new Holder(last, fn); - var callbacks = thenCallbacks; - for (var i = 0; i < last; ++i) { - var maybePromise = tryConvertToPromise(arguments[i], ret); - if (maybePromise instanceof Promise) { - maybePromise = maybePromise._target(); - if (maybePromise._isPending()) { - maybePromise._then(callbacks[i], reject, - undefined, ret, holder); - } else if (maybePromise._isFulfilled()) { - callbacks[i].call(ret, - maybePromise._value(), holder); - } else { - ret._reject(maybePromise._reason()); - } - } else { - callbacks[i].call(ret, maybePromise, holder); - } - } - return ret; - } - } - } - var $_len = arguments.length;var args = new Array($_len); for(var $_i = 0; $_i < $_len; ++$_i) {args[$_i] = arguments[$_i];} - if (fn) args.pop(); - var ret = new PromiseArray(args).promise(); - return fn !== undefined ? ret.spread(fn) : ret; -}; - -}; - -},{"./util.js":38}],19:[function(_dereq_,module,exports){ -"use strict"; -module.exports = function(Promise, - PromiseArray, - apiRejection, - tryConvertToPromise, - INTERNAL) { -var getDomain = Promise._getDomain; -var async = _dereq_("./async.js"); -var util = _dereq_("./util.js"); -var tryCatch = util.tryCatch; -var errorObj = util.errorObj; -var PENDING = {}; -var EMPTY_ARRAY = []; - -function MappingPromiseArray(promises, fn, limit, _filter) { - this.constructor$(promises); - this._promise._captureStackTrace(); - var domain = getDomain(); - this._callback = domain === null ? fn : domain.bind(fn); - this._preservedValues = _filter === INTERNAL - ? new Array(this.length()) - : null; - this._limit = limit; - this._inFlight = 0; - this._queue = limit >= 1 ? [] : EMPTY_ARRAY; - async.invoke(init, this, undefined); -} -util.inherits(MappingPromiseArray, PromiseArray); -function init() {this._init$(undefined, -2);} - -MappingPromiseArray.prototype._init = function () {}; - -MappingPromiseArray.prototype._promiseFulfilled = function (value, index) { - var values = this._values; - var length = this.length(); - var preservedValues = this._preservedValues; - var limit = this._limit; - if (values[index] === PENDING) { - values[index] = value; - if (limit >= 1) { - this._inFlight--; - this._drainQueue(); - if (this._isResolved()) return; - } - } else { - if (limit >= 1 && this._inFlight >= limit) { - values[index] = value; - this._queue.push(index); - return; - } - if (preservedValues !== null) preservedValues[index] = value; - - var callback = this._callback; - var receiver = this._promise._boundValue(); - this._promise._pushContext(); - var ret = tryCatch(callback).call(receiver, value, index, length); - this._promise._popContext(); - if (ret === errorObj) return this._reject(ret.e); - - var maybePromise = tryConvertToPromise(ret, this._promise); - if (maybePromise instanceof Promise) { - maybePromise = maybePromise._target(); - if (maybePromise._isPending()) { - if (limit >= 1) this._inFlight++; - values[index] = PENDING; - return maybePromise._proxyPromiseArray(this, index); - } else if (maybePromise._isFulfilled()) { - ret = maybePromise._value(); - } else { - return this._reject(maybePromise._reason()); - } - } - values[index] = ret; - } - var totalResolved = ++this._totalResolved; - if (totalResolved >= length) { - if (preservedValues !== null) { - this._filter(values, preservedValues); - } else { - this._resolve(values); - } - - } -}; - -MappingPromiseArray.prototype._drainQueue = function () { - var queue = this._queue; - var limit = this._limit; - var values = this._values; - while (queue.length > 0 && this._inFlight < limit) { - if (this._isResolved()) return; - var index = queue.pop(); - this._promiseFulfilled(values[index], index); - } -}; - -MappingPromiseArray.prototype._filter = function (booleans, values) { - var len = values.length; - var ret = new Array(len); - var j = 0; - for (var i = 0; i < len; ++i) { - if (booleans[i]) ret[j++] = values[i]; - } - ret.length = j; - this._resolve(ret); -}; - -MappingPromiseArray.prototype.preservedValues = function () { - return this._preservedValues; -}; - -function map(promises, fn, options, _filter) { - var limit = typeof options === "object" && options !== null - ? options.concurrency - : 0; - limit = typeof limit === "number" && - isFinite(limit) && limit >= 1 ? limit : 0; - return new MappingPromiseArray(promises, fn, limit, _filter); -} - -Promise.prototype.map = function (fn, options) { - if (typeof fn !== "function") return apiRejection("fn must be a function\u000a\u000a See http://goo.gl/916lJJ\u000a"); - - return map(this, fn, options, null).promise(); -}; - -Promise.map = function (promises, fn, options, _filter) { - if (typeof fn !== "function") return apiRejection("fn must be a function\u000a\u000a See http://goo.gl/916lJJ\u000a"); - return map(promises, fn, options, _filter).promise(); -}; - - -}; - -},{"./async.js":2,"./util.js":38}],20:[function(_dereq_,module,exports){ -"use strict"; -module.exports = -function(Promise, INTERNAL, tryConvertToPromise, apiRejection) { -var util = _dereq_("./util.js"); -var tryCatch = util.tryCatch; - -Promise.method = function (fn) { - if (typeof fn !== "function") { - throw new Promise.TypeError("fn must be a function\u000a\u000a See http://goo.gl/916lJJ\u000a"); - } - return function () { - var ret = new Promise(INTERNAL); - ret._captureStackTrace(); - ret._pushContext(); - var value = tryCatch(fn).apply(this, arguments); - ret._popContext(); - ret._resolveFromSyncValue(value); - return ret; - }; -}; - -Promise.attempt = Promise["try"] = function (fn, args, ctx) { - if (typeof fn !== "function") { - return apiRejection("fn must be a function\u000a\u000a See http://goo.gl/916lJJ\u000a"); - } - var ret = new Promise(INTERNAL); - ret._captureStackTrace(); - ret._pushContext(); - var value = util.isArray(args) - ? tryCatch(fn).apply(ctx, args) - : tryCatch(fn).call(ctx, args); - ret._popContext(); - ret._resolveFromSyncValue(value); - return ret; -}; - -Promise.prototype._resolveFromSyncValue = function (value) { - if (value === util.errorObj) { - this._rejectCallback(value.e, false, true); - } else { - this._resolveCallback(value, true); - } -}; -}; - -},{"./util.js":38}],21:[function(_dereq_,module,exports){ -"use strict"; -module.exports = function(Promise) { -var util = _dereq_("./util.js"); -var async = _dereq_("./async.js"); -var tryCatch = util.tryCatch; -var errorObj = util.errorObj; - -function spreadAdapter(val, nodeback) { - var promise = this; - if (!util.isArray(val)) return successAdapter.call(promise, val, nodeback); - var ret = - tryCatch(nodeback).apply(promise._boundValue(), [null].concat(val)); - if (ret === errorObj) { - async.throwLater(ret.e); - } -} - -function successAdapter(val, nodeback) { - var promise = this; - var receiver = promise._boundValue(); - var ret = val === undefined - ? tryCatch(nodeback).call(receiver, null) - : tryCatch(nodeback).call(receiver, null, val); - if (ret === errorObj) { - async.throwLater(ret.e); - } -} -function errorAdapter(reason, nodeback) { - var promise = this; - if (!reason) { - var target = promise._target(); - var newReason = target._getCarriedStackTrace(); - newReason.cause = reason; - reason = newReason; - } - var ret = tryCatch(nodeback).call(promise._boundValue(), reason); - if (ret === errorObj) { - async.throwLater(ret.e); - } -} - -Promise.prototype.asCallback = -Promise.prototype.nodeify = function (nodeback, options) { - if (typeof nodeback == "function") { - var adapter = successAdapter; - if (options !== undefined && Object(options).spread) { - adapter = spreadAdapter; - } - this._then( - adapter, - errorAdapter, - undefined, - this, - nodeback - ); - } - return this; -}; -}; - -},{"./async.js":2,"./util.js":38}],22:[function(_dereq_,module,exports){ -"use strict"; -module.exports = function(Promise, PromiseArray) { -var util = _dereq_("./util.js"); -var async = _dereq_("./async.js"); -var tryCatch = util.tryCatch; -var errorObj = util.errorObj; - -Promise.prototype.progressed = function (handler) { - return this._then(undefined, undefined, handler, undefined, undefined); -}; - -Promise.prototype._progress = function (progressValue) { - if (this._isFollowingOrFulfilledOrRejected()) return; - this._target()._progressUnchecked(progressValue); - -}; - -Promise.prototype._progressHandlerAt = function (index) { - return index === 0 - ? this._progressHandler0 - : this[(index << 2) + index - 5 + 2]; -}; - -Promise.prototype._doProgressWith = function (progression) { - var progressValue = progression.value; - var handler = progression.handler; - var promise = progression.promise; - var receiver = progression.receiver; - - var ret = tryCatch(handler).call(receiver, progressValue); - if (ret === errorObj) { - if (ret.e != null && - ret.e.name !== "StopProgressPropagation") { - var trace = util.canAttachTrace(ret.e) - ? ret.e : new Error(util.toString(ret.e)); - promise._attachExtraTrace(trace); - promise._progress(ret.e); - } - } else if (ret instanceof Promise) { - ret._then(promise._progress, null, null, promise, undefined); - } else { - promise._progress(ret); - } -}; - - -Promise.prototype._progressUnchecked = function (progressValue) { - var len = this._length(); - var progress = this._progress; - for (var i = 0; i < len; i++) { - var handler = this._progressHandlerAt(i); - var promise = this._promiseAt(i); - if (!(promise instanceof Promise)) { - var receiver = this._receiverAt(i); - if (typeof handler === "function") { - handler.call(receiver, progressValue, promise); - } else if (receiver instanceof PromiseArray && - !receiver._isResolved()) { - receiver._promiseProgressed(progressValue, promise); - } - continue; - } - - if (typeof handler === "function") { - async.invoke(this._doProgressWith, this, { - handler: handler, - promise: promise, - receiver: this._receiverAt(i), - value: progressValue - }); - } else { - async.invoke(progress, promise, progressValue); - } - } -}; -}; - -},{"./async.js":2,"./util.js":38}],23:[function(_dereq_,module,exports){ -"use strict"; -module.exports = function() { -var makeSelfResolutionError = function () { - return new TypeError("circular promise resolution chain\u000a\u000a See http://goo.gl/LhFpo0\u000a"); -}; -var reflect = function() { - return new Promise.PromiseInspection(this._target()); -}; -var apiRejection = function(msg) { - return Promise.reject(new TypeError(msg)); -}; - -var util = _dereq_("./util.js"); - -var getDomain; -if (util.isNode) { - getDomain = function() { - var ret = process.domain; - if (ret === undefined) ret = null; - return ret; - }; -} else { - getDomain = function() { - return null; - }; -} -util.notEnumerableProp(Promise, "_getDomain", getDomain); - -var UNDEFINED_BINDING = {}; -var async = _dereq_("./async.js"); -var errors = _dereq_("./errors.js"); -var TypeError = Promise.TypeError = errors.TypeError; -Promise.RangeError = errors.RangeError; -Promise.CancellationError = errors.CancellationError; -Promise.TimeoutError = errors.TimeoutError; -Promise.OperationalError = errors.OperationalError; -Promise.RejectionError = errors.OperationalError; -Promise.AggregateError = errors.AggregateError; -var INTERNAL = function(){}; -var APPLY = {}; -var NEXT_FILTER = {e: null}; -var tryConvertToPromise = _dereq_("./thenables.js")(Promise, INTERNAL); -var PromiseArray = - _dereq_("./promise_array.js")(Promise, INTERNAL, - tryConvertToPromise, apiRejection); -var CapturedTrace = _dereq_("./captured_trace.js")(); -var isDebugging = _dereq_("./debuggability.js")(Promise, CapturedTrace); - /*jshint unused:false*/ -var createContext = - _dereq_("./context.js")(Promise, CapturedTrace, isDebugging); -var CatchFilter = _dereq_("./catch_filter.js")(NEXT_FILTER); -var PromiseResolver = _dereq_("./promise_resolver.js"); -var nodebackForPromise = PromiseResolver._nodebackForPromise; -var errorObj = util.errorObj; -var tryCatch = util.tryCatch; - -function Promise(resolver) { - if (typeof resolver !== "function") { - throw new TypeError("the promise constructor requires a resolver function\u000a\u000a See http://goo.gl/EC22Yn\u000a"); - } - if (this.constructor !== Promise) { - throw new TypeError("the promise constructor cannot be invoked directly\u000a\u000a See http://goo.gl/KsIlge\u000a"); - } - this._bitField = 0; - this._fulfillmentHandler0 = undefined; - this._rejectionHandler0 = undefined; - this._progressHandler0 = undefined; - this._promise0 = undefined; - this._receiver0 = undefined; - this._settledValue = undefined; - if (resolver !== INTERNAL) this._resolveFromResolver(resolver); -} - -Promise.prototype.toString = function () { - return "[object Promise]"; -}; - -Promise.prototype.caught = Promise.prototype["catch"] = function (fn) { - var len = arguments.length; - if (len > 1) { - var catchInstances = new Array(len - 1), - j = 0, i; - for (i = 0; i < len - 1; ++i) { - var item = arguments[i]; - if (typeof item === "function") { - catchInstances[j++] = item; - } else { - return Promise.reject( - new TypeError("Catch filter must inherit from Error or be a simple predicate function\u000a\u000a See http://goo.gl/o84o68\u000a")); - } - } - catchInstances.length = j; - fn = arguments[i]; - var catchFilter = new CatchFilter(catchInstances, fn, this); - return this._then(undefined, catchFilter.doFilter, undefined, - catchFilter, undefined); - } - return this._then(undefined, fn, undefined, undefined, undefined); -}; - -Promise.prototype.reflect = function () { - return this._then(reflect, reflect, undefined, this, undefined); -}; - -Promise.prototype.then = function (didFulfill, didReject, didProgress) { - if (isDebugging() && arguments.length > 0 && - typeof didFulfill !== "function" && - typeof didReject !== "function") { - var msg = ".then() only accepts functions but was passed: " + - util.classString(didFulfill); - if (arguments.length > 1) { - msg += ", " + util.classString(didReject); - } - this._warn(msg); - } - return this._then(didFulfill, didReject, didProgress, - undefined, undefined); -}; - -Promise.prototype.done = function (didFulfill, didReject, didProgress) { - var promise = this._then(didFulfill, didReject, didProgress, - undefined, undefined); - promise._setIsFinal(); -}; - -Promise.prototype.spread = function (didFulfill, didReject) { - return this.all()._then(didFulfill, didReject, undefined, APPLY, undefined); -}; - -Promise.prototype.isCancellable = function () { - return !this.isResolved() && - this._cancellable(); -}; - -Promise.prototype.toJSON = function () { - var ret = { - isFulfilled: false, - isRejected: false, - fulfillmentValue: undefined, - rejectionReason: undefined - }; - if (this.isFulfilled()) { - ret.fulfillmentValue = this.value(); - ret.isFulfilled = true; - } else if (this.isRejected()) { - ret.rejectionReason = this.reason(); - ret.isRejected = true; - } - return ret; -}; - -Promise.prototype.all = function () { - return new PromiseArray(this).promise(); -}; - -Promise.prototype.error = function (fn) { - return this.caught(util.originatesFromRejection, fn); -}; - -Promise.getNewLibraryCopy = module.exports; - -Promise.is = function (val) { - return val instanceof Promise; -}; - -Promise.fromNode = function(fn) { - var ret = new Promise(INTERNAL); - var result = tryCatch(fn)(nodebackForPromise(ret)); - if (result === errorObj) { - ret._rejectCallback(result.e, true, true); - } - return ret; -}; - -Promise.all = function (promises) { - return new PromiseArray(promises).promise(); -}; - -Promise.defer = Promise.pending = function () { - var promise = new Promise(INTERNAL); - return new PromiseResolver(promise); -}; - -Promise.cast = function (obj) { - var ret = tryConvertToPromise(obj); - if (!(ret instanceof Promise)) { - var val = ret; - ret = new Promise(INTERNAL); - ret._fulfillUnchecked(val); - } - return ret; -}; - -Promise.resolve = Promise.fulfilled = Promise.cast; - -Promise.reject = Promise.rejected = function (reason) { - var ret = new Promise(INTERNAL); - ret._captureStackTrace(); - ret._rejectCallback(reason, true); - return ret; -}; - -Promise.setScheduler = function(fn) { - if (typeof fn !== "function") throw new TypeError("fn must be a function\u000a\u000a See http://goo.gl/916lJJ\u000a"); - var prev = async._schedule; - async._schedule = fn; - return prev; -}; - -Promise.prototype._then = function ( - didFulfill, - didReject, - didProgress, - receiver, - internalData -) { - var haveInternalData = internalData !== undefined; - var ret = haveInternalData ? internalData : new Promise(INTERNAL); - - if (!haveInternalData) { - ret._propagateFrom(this, 4 | 1); - ret._captureStackTrace(); - } - - var target = this._target(); - if (target !== this) { - if (receiver === undefined) receiver = this._boundTo; - if (!haveInternalData) ret._setIsMigrated(); - } - - var callbackIndex = target._addCallbacks(didFulfill, - didReject, - didProgress, - ret, - receiver, - getDomain()); - - if (target._isResolved() && !target._isSettlePromisesQueued()) { - async.invoke( - target._settlePromiseAtPostResolution, target, callbackIndex); - } - - return ret; -}; - -Promise.prototype._settlePromiseAtPostResolution = function (index) { - if (this._isRejectionUnhandled()) this._unsetRejectionIsUnhandled(); - this._settlePromiseAt(index); -}; - -Promise.prototype._length = function () { - return this._bitField & 131071; -}; - -Promise.prototype._isFollowingOrFulfilledOrRejected = function () { - return (this._bitField & 939524096) > 0; -}; - -Promise.prototype._isFollowing = function () { - return (this._bitField & 536870912) === 536870912; -}; - -Promise.prototype._setLength = function (len) { - this._bitField = (this._bitField & -131072) | - (len & 131071); -}; - -Promise.prototype._setFulfilled = function () { - this._bitField = this._bitField | 268435456; -}; - -Promise.prototype._setRejected = function () { - this._bitField = this._bitField | 134217728; -}; - -Promise.prototype._setFollowing = function () { - this._bitField = this._bitField | 536870912; -}; - -Promise.prototype._setIsFinal = function () { - this._bitField = this._bitField | 33554432; -}; - -Promise.prototype._isFinal = function () { - return (this._bitField & 33554432) > 0; -}; - -Promise.prototype._cancellable = function () { - return (this._bitField & 67108864) > 0; -}; - -Promise.prototype._setCancellable = function () { - this._bitField = this._bitField | 67108864; -}; - -Promise.prototype._unsetCancellable = function () { - this._bitField = this._bitField & (~67108864); -}; - -Promise.prototype._setIsMigrated = function () { - this._bitField = this._bitField | 4194304; -}; - -Promise.prototype._unsetIsMigrated = function () { - this._bitField = this._bitField & (~4194304); -}; - -Promise.prototype._isMigrated = function () { - return (this._bitField & 4194304) > 0; -}; - -Promise.prototype._receiverAt = function (index) { - var ret = index === 0 - ? this._receiver0 - : this[ - index * 5 - 5 + 4]; - if (ret === UNDEFINED_BINDING) { - return undefined; - } else if (ret === undefined && this._isBound()) { - return this._boundValue(); - } - return ret; -}; - -Promise.prototype._promiseAt = function (index) { - return index === 0 - ? this._promise0 - : this[index * 5 - 5 + 3]; -}; - -Promise.prototype._fulfillmentHandlerAt = function (index) { - return index === 0 - ? this._fulfillmentHandler0 - : this[index * 5 - 5 + 0]; -}; - -Promise.prototype._rejectionHandlerAt = function (index) { - return index === 0 - ? this._rejectionHandler0 - : this[index * 5 - 5 + 1]; -}; - -Promise.prototype._boundValue = function() { - var ret = this._boundTo; - if (ret !== undefined) { - if (ret instanceof Promise) { - if (ret.isFulfilled()) { - return ret.value(); - } else { - return undefined; - } - } - } - return ret; -}; - -Promise.prototype._migrateCallbacks = function (follower, index) { - var fulfill = follower._fulfillmentHandlerAt(index); - var reject = follower._rejectionHandlerAt(index); - var progress = follower._progressHandlerAt(index); - var promise = follower._promiseAt(index); - var receiver = follower._receiverAt(index); - if (promise instanceof Promise) promise._setIsMigrated(); - if (receiver === undefined) receiver = UNDEFINED_BINDING; - this._addCallbacks(fulfill, reject, progress, promise, receiver, null); -}; - -Promise.prototype._addCallbacks = function ( - fulfill, - reject, - progress, - promise, - receiver, - domain -) { - var index = this._length(); - - if (index >= 131071 - 5) { - index = 0; - this._setLength(0); - } - - if (index === 0) { - this._promise0 = promise; - if (receiver !== undefined) this._receiver0 = receiver; - if (typeof fulfill === "function" && !this._isCarryingStackTrace()) { - this._fulfillmentHandler0 = - domain === null ? fulfill : domain.bind(fulfill); - } - if (typeof reject === "function") { - this._rejectionHandler0 = - domain === null ? reject : domain.bind(reject); - } - if (typeof progress === "function") { - this._progressHandler0 = - domain === null ? progress : domain.bind(progress); - } - } else { - var base = index * 5 - 5; - this[base + 3] = promise; - this[base + 4] = receiver; - if (typeof fulfill === "function") { - this[base + 0] = - domain === null ? fulfill : domain.bind(fulfill); - } - if (typeof reject === "function") { - this[base + 1] = - domain === null ? reject : domain.bind(reject); - } - if (typeof progress === "function") { - this[base + 2] = - domain === null ? progress : domain.bind(progress); - } - } - this._setLength(index + 1); - return index; -}; - -Promise.prototype._setProxyHandlers = function (receiver, promiseSlotValue) { - var index = this._length(); - - if (index >= 131071 - 5) { - index = 0; - this._setLength(0); - } - if (index === 0) { - this._promise0 = promiseSlotValue; - this._receiver0 = receiver; - } else { - var base = index * 5 - 5; - this[base + 3] = promiseSlotValue; - this[base + 4] = receiver; - } - this._setLength(index + 1); -}; - -Promise.prototype._proxyPromiseArray = function (promiseArray, index) { - this._setProxyHandlers(promiseArray, index); -}; - -Promise.prototype._resolveCallback = function(value, shouldBind) { - if (this._isFollowingOrFulfilledOrRejected()) return; - if (value === this) - return this._rejectCallback(makeSelfResolutionError(), false, true); - var maybePromise = tryConvertToPromise(value, this); - if (!(maybePromise instanceof Promise)) return this._fulfill(value); - - var propagationFlags = 1 | (shouldBind ? 4 : 0); - this._propagateFrom(maybePromise, propagationFlags); - var promise = maybePromise._target(); - if (promise._isPending()) { - var len = this._length(); - for (var i = 0; i < len; ++i) { - promise._migrateCallbacks(this, i); - } - this._setFollowing(); - this._setLength(0); - this._setFollowee(promise); - } else if (promise._isFulfilled()) { - this._fulfillUnchecked(promise._value()); - } else { - this._rejectUnchecked(promise._reason(), - promise._getCarriedStackTrace()); - } -}; - -Promise.prototype._rejectCallback = -function(reason, synchronous, shouldNotMarkOriginatingFromRejection) { - if (!shouldNotMarkOriginatingFromRejection) { - util.markAsOriginatingFromRejection(reason); - } - var trace = util.ensureErrorObject(reason); - var hasStack = trace === reason; - this._attachExtraTrace(trace, synchronous ? hasStack : false); - this._reject(reason, hasStack ? undefined : trace); -}; - -Promise.prototype._resolveFromResolver = function (resolver) { - var promise = this; - this._captureStackTrace(); - this._pushContext(); - var synchronous = true; - var r = tryCatch(resolver)(function(value) { - if (promise === null) return; - promise._resolveCallback(value); - promise = null; - }, function (reason) { - if (promise === null) return; - promise._rejectCallback(reason, synchronous); - promise = null; - }); - synchronous = false; - this._popContext(); - - if (r !== undefined && r === errorObj && promise !== null) { - promise._rejectCallback(r.e, true, true); - promise = null; - } -}; - -Promise.prototype._settlePromiseFromHandler = function ( - handler, receiver, value, promise -) { - if (promise._isRejected()) return; - promise._pushContext(); - var x; - if (receiver === APPLY && !this._isRejected()) { - x = tryCatch(handler).apply(this._boundValue(), value); - } else { - x = tryCatch(handler).call(receiver, value); - } - promise._popContext(); - - if (x === errorObj || x === promise || x === NEXT_FILTER) { - var err = x === promise ? makeSelfResolutionError() : x.e; - promise._rejectCallback(err, false, true); - } else { - promise._resolveCallback(x); - } -}; - -Promise.prototype._target = function() { - var ret = this; - while (ret._isFollowing()) ret = ret._followee(); - return ret; -}; - -Promise.prototype._followee = function() { - return this._rejectionHandler0; -}; - -Promise.prototype._setFollowee = function(promise) { - this._rejectionHandler0 = promise; -}; - -Promise.prototype._cleanValues = function () { - if (this._cancellable()) { - this._cancellationParent = undefined; - } -}; - -Promise.prototype._propagateFrom = function (parent, flags) { - if ((flags & 1) > 0 && parent._cancellable()) { - this._setCancellable(); - this._cancellationParent = parent; - } - if ((flags & 4) > 0 && parent._isBound()) { - this._setBoundTo(parent._boundTo); - } -}; - -Promise.prototype._fulfill = function (value) { - if (this._isFollowingOrFulfilledOrRejected()) return; - this._fulfillUnchecked(value); -}; - -Promise.prototype._reject = function (reason, carriedStackTrace) { - if (this._isFollowingOrFulfilledOrRejected()) return; - this._rejectUnchecked(reason, carriedStackTrace); -}; - -Promise.prototype._settlePromiseAt = function (index) { - var promise = this._promiseAt(index); - var isPromise = promise instanceof Promise; - - if (isPromise && promise._isMigrated()) { - promise._unsetIsMigrated(); - return async.invoke(this._settlePromiseAt, this, index); - } - var handler = this._isFulfilled() - ? this._fulfillmentHandlerAt(index) - : this._rejectionHandlerAt(index); - - var carriedStackTrace = - this._isCarryingStackTrace() ? this._getCarriedStackTrace() : undefined; - var value = this._settledValue; - var receiver = this._receiverAt(index); - this._clearCallbackDataAtIndex(index); - - if (typeof handler === "function") { - if (!isPromise) { - handler.call(receiver, value, promise); - } else { - this._settlePromiseFromHandler(handler, receiver, value, promise); - } - } else if (receiver instanceof PromiseArray) { - if (!receiver._isResolved()) { - if (this._isFulfilled()) { - receiver._promiseFulfilled(value, promise); - } - else { - receiver._promiseRejected(value, promise); - } - } - } else if (isPromise) { - if (this._isFulfilled()) { - promise._fulfill(value); - } else { - promise._reject(value, carriedStackTrace); - } - } - - if (index >= 4 && (index & 31) === 4) - async.invokeLater(this._setLength, this, 0); -}; - -Promise.prototype._clearCallbackDataAtIndex = function(index) { - if (index === 0) { - if (!this._isCarryingStackTrace()) { - this._fulfillmentHandler0 = undefined; - } - this._rejectionHandler0 = - this._progressHandler0 = - this._receiver0 = - this._promise0 = undefined; - } else { - var base = index * 5 - 5; - this[base + 3] = - this[base + 4] = - this[base + 0] = - this[base + 1] = - this[base + 2] = undefined; - } -}; - -Promise.prototype._isSettlePromisesQueued = function () { - return (this._bitField & - -1073741824) === -1073741824; -}; - -Promise.prototype._setSettlePromisesQueued = function () { - this._bitField = this._bitField | -1073741824; -}; - -Promise.prototype._unsetSettlePromisesQueued = function () { - this._bitField = this._bitField & (~-1073741824); -}; - -Promise.prototype._queueSettlePromises = function() { - async.settlePromises(this); - this._setSettlePromisesQueued(); -}; - -Promise.prototype._fulfillUnchecked = function (value) { - if (value === this) { - var err = makeSelfResolutionError(); - this._attachExtraTrace(err); - return this._rejectUnchecked(err, undefined); - } - this._setFulfilled(); - this._settledValue = value; - this._cleanValues(); - - if (this._length() > 0) { - this._queueSettlePromises(); - } -}; - -Promise.prototype._rejectUncheckedCheckError = function (reason) { - var trace = util.ensureErrorObject(reason); - this._rejectUnchecked(reason, trace === reason ? undefined : trace); -}; - -Promise.prototype._rejectUnchecked = function (reason, trace) { - if (reason === this) { - var err = makeSelfResolutionError(); - this._attachExtraTrace(err); - return this._rejectUnchecked(err); - } - this._setRejected(); - this._settledValue = reason; - this._cleanValues(); - - if (this._isFinal()) { - async.throwLater(function(e) { - if ("stack" in e) { - async.invokeFirst( - CapturedTrace.unhandledRejection, undefined, e); - } - throw e; - }, trace === undefined ? reason : trace); - return; - } - - if (trace !== undefined && trace !== reason) { - this._setCarriedStackTrace(trace); - } - - if (this._length() > 0) { - this._queueSettlePromises(); - } else { - this._ensurePossibleRejectionHandled(); - } -}; - -Promise.prototype._settlePromises = function () { - this._unsetSettlePromisesQueued(); - var len = this._length(); - for (var i = 0; i < len; i++) { - this._settlePromiseAt(i); - } -}; - - -util.notEnumerableProp(Promise, - "_makeSelfResolutionError", - makeSelfResolutionError); - -_dereq_("./progress.js")(Promise, PromiseArray); -_dereq_("./method.js")(Promise, INTERNAL, tryConvertToPromise, apiRejection); -_dereq_("./bind.js")(Promise, INTERNAL, tryConvertToPromise); -_dereq_("./finally.js")(Promise, NEXT_FILTER, tryConvertToPromise); -_dereq_("./direct_resolve.js")(Promise); -_dereq_("./synchronous_inspection.js")(Promise); -_dereq_("./join.js")(Promise, PromiseArray, tryConvertToPromise, INTERNAL); -Promise.version = "2.11.0"; -Promise.Promise = Promise; -_dereq_('./map.js')(Promise, PromiseArray, apiRejection, tryConvertToPromise, INTERNAL); -_dereq_('./cancel.js')(Promise); -_dereq_('./using.js')(Promise, apiRejection, tryConvertToPromise, createContext); -_dereq_('./generators.js')(Promise, apiRejection, INTERNAL, tryConvertToPromise); -_dereq_('./nodeify.js')(Promise); -_dereq_('./call_get.js')(Promise); -_dereq_('./props.js')(Promise, PromiseArray, tryConvertToPromise, apiRejection); -_dereq_('./race.js')(Promise, INTERNAL, tryConvertToPromise, apiRejection); -_dereq_('./reduce.js')(Promise, PromiseArray, apiRejection, tryConvertToPromise, INTERNAL); -_dereq_('./settle.js')(Promise, PromiseArray); -_dereq_('./some.js')(Promise, PromiseArray, apiRejection); -_dereq_('./promisify.js')(Promise, INTERNAL); -_dereq_('./any.js')(Promise); -_dereq_('./each.js')(Promise, INTERNAL); -_dereq_('./timers.js')(Promise, INTERNAL); -_dereq_('./filter.js')(Promise, INTERNAL); - - util.toFastProperties(Promise); - util.toFastProperties(Promise.prototype); - function fillTypes(value) { - var p = new Promise(INTERNAL); - p._fulfillmentHandler0 = value; - p._rejectionHandler0 = value; - p._progressHandler0 = value; - p._promise0 = value; - p._receiver0 = value; - p._settledValue = value; - } - // Complete slack tracking, opt out of field-type tracking and - // stabilize map - fillTypes({a: 1}); - fillTypes({b: 2}); - fillTypes({c: 3}); - fillTypes(1); - fillTypes(function(){}); - fillTypes(undefined); - fillTypes(false); - fillTypes(new Promise(INTERNAL)); - CapturedTrace.setBounds(async.firstLineError, util.lastLineError); - return Promise; - -}; - -},{"./any.js":1,"./async.js":2,"./bind.js":3,"./call_get.js":5,"./cancel.js":6,"./captured_trace.js":7,"./catch_filter.js":8,"./context.js":9,"./debuggability.js":10,"./direct_resolve.js":11,"./each.js":12,"./errors.js":13,"./filter.js":15,"./finally.js":16,"./generators.js":17,"./join.js":18,"./map.js":19,"./method.js":20,"./nodeify.js":21,"./progress.js":22,"./promise_array.js":24,"./promise_resolver.js":25,"./promisify.js":26,"./props.js":27,"./race.js":29,"./reduce.js":30,"./settle.js":32,"./some.js":33,"./synchronous_inspection.js":34,"./thenables.js":35,"./timers.js":36,"./using.js":37,"./util.js":38}],24:[function(_dereq_,module,exports){ -"use strict"; -module.exports = function(Promise, INTERNAL, tryConvertToPromise, - apiRejection) { -var util = _dereq_("./util.js"); -var isArray = util.isArray; - -function toResolutionValue(val) { - switch(val) { - case -2: return []; - case -3: return {}; - } -} - -function PromiseArray(values) { - var promise = this._promise = new Promise(INTERNAL); - var parent; - if (values instanceof Promise) { - parent = values; - promise._propagateFrom(parent, 1 | 4); - } - this._values = values; - this._length = 0; - this._totalResolved = 0; - this._init(undefined, -2); -} -PromiseArray.prototype.length = function () { - return this._length; -}; - -PromiseArray.prototype.promise = function () { - return this._promise; -}; - -PromiseArray.prototype._init = function init(_, resolveValueIfEmpty) { - var values = tryConvertToPromise(this._values, this._promise); - if (values instanceof Promise) { - values = values._target(); - this._values = values; - if (values._isFulfilled()) { - values = values._value(); - if (!isArray(values)) { - var err = new Promise.TypeError("expecting an array, a promise or a thenable\u000a\u000a See http://goo.gl/s8MMhc\u000a"); - this.__hardReject__(err); - return; - } - } else if (values._isPending()) { - values._then( - init, - this._reject, - undefined, - this, - resolveValueIfEmpty - ); - return; - } else { - this._reject(values._reason()); - return; - } - } else if (!isArray(values)) { - this._promise._reject(apiRejection("expecting an array, a promise or a thenable\u000a\u000a See http://goo.gl/s8MMhc\u000a")._reason()); - return; - } - - if (values.length === 0) { - if (resolveValueIfEmpty === -5) { - this._resolveEmptyArray(); - } - else { - this._resolve(toResolutionValue(resolveValueIfEmpty)); - } - return; - } - var len = this.getActualLength(values.length); - this._length = len; - this._values = this.shouldCopyValues() ? new Array(len) : this._values; - var promise = this._promise; - for (var i = 0; i < len; ++i) { - var isResolved = this._isResolved(); - var maybePromise = tryConvertToPromise(values[i], promise); - if (maybePromise instanceof Promise) { - maybePromise = maybePromise._target(); - if (isResolved) { - maybePromise._ignoreRejections(); - } else if (maybePromise._isPending()) { - maybePromise._proxyPromiseArray(this, i); - } else if (maybePromise._isFulfilled()) { - this._promiseFulfilled(maybePromise._value(), i); - } else { - this._promiseRejected(maybePromise._reason(), i); - } - } else if (!isResolved) { - this._promiseFulfilled(maybePromise, i); - } - } -}; - -PromiseArray.prototype._isResolved = function () { - return this._values === null; -}; - -PromiseArray.prototype._resolve = function (value) { - this._values = null; - this._promise._fulfill(value); -}; - -PromiseArray.prototype.__hardReject__ = -PromiseArray.prototype._reject = function (reason) { - this._values = null; - this._promise._rejectCallback(reason, false, true); -}; - -PromiseArray.prototype._promiseProgressed = function (progressValue, index) { - this._promise._progress({ - index: index, - value: progressValue - }); -}; - - -PromiseArray.prototype._promiseFulfilled = function (value, index) { - this._values[index] = value; - var totalResolved = ++this._totalResolved; - if (totalResolved >= this._length) { - this._resolve(this._values); - } -}; - -PromiseArray.prototype._promiseRejected = function (reason, index) { - this._totalResolved++; - this._reject(reason); -}; - -PromiseArray.prototype.shouldCopyValues = function () { - return true; -}; - -PromiseArray.prototype.getActualLength = function (len) { - return len; -}; - -return PromiseArray; -}; - -},{"./util.js":38}],25:[function(_dereq_,module,exports){ -"use strict"; -var util = _dereq_("./util.js"); -var maybeWrapAsError = util.maybeWrapAsError; -var errors = _dereq_("./errors.js"); -var TimeoutError = errors.TimeoutError; -var OperationalError = errors.OperationalError; -var haveGetters = util.haveGetters; -var es5 = _dereq_("./es5.js"); - -function isUntypedError(obj) { - return obj instanceof Error && - es5.getPrototypeOf(obj) === Error.prototype; -} - -var rErrorKey = /^(?:name|message|stack|cause)$/; -function wrapAsOperationalError(obj) { - var ret; - if (isUntypedError(obj)) { - ret = new OperationalError(obj); - ret.name = obj.name; - ret.message = obj.message; - ret.stack = obj.stack; - var keys = es5.keys(obj); - for (var i = 0; i < keys.length; ++i) { - var key = keys[i]; - if (!rErrorKey.test(key)) { - ret[key] = obj[key]; - } - } - return ret; - } - util.markAsOriginatingFromRejection(obj); - return obj; -} - -function nodebackForPromise(promise) { - return function(err, value) { - if (promise === null) return; - - if (err) { - var wrapped = wrapAsOperationalError(maybeWrapAsError(err)); - promise._attachExtraTrace(wrapped); - promise._reject(wrapped); - } else if (arguments.length > 2) { - var $_len = arguments.length;var args = new Array($_len - 1); for(var $_i = 1; $_i < $_len; ++$_i) {args[$_i - 1] = arguments[$_i];} - promise._fulfill(args); - } else { - promise._fulfill(value); - } - - promise = null; - }; -} - - -var PromiseResolver; -if (!haveGetters) { - PromiseResolver = function (promise) { - this.promise = promise; - this.asCallback = nodebackForPromise(promise); - this.callback = this.asCallback; - }; -} -else { - PromiseResolver = function (promise) { - this.promise = promise; - }; -} -if (haveGetters) { - var prop = { - get: function() { - return nodebackForPromise(this.promise); - } - }; - es5.defineProperty(PromiseResolver.prototype, "asCallback", prop); - es5.defineProperty(PromiseResolver.prototype, "callback", prop); -} - -PromiseResolver._nodebackForPromise = nodebackForPromise; - -PromiseResolver.prototype.toString = function () { - return "[object PromiseResolver]"; -}; - -PromiseResolver.prototype.resolve = -PromiseResolver.prototype.fulfill = function (value) { - if (!(this instanceof PromiseResolver)) { - throw new TypeError("Illegal invocation, resolver resolve/reject must be called within a resolver context. Consider using the promise constructor instead.\u000a\u000a See http://goo.gl/sdkXL9\u000a"); - } - this.promise._resolveCallback(value); -}; - -PromiseResolver.prototype.reject = function (reason) { - if (!(this instanceof PromiseResolver)) { - throw new TypeError("Illegal invocation, resolver resolve/reject must be called within a resolver context. Consider using the promise constructor instead.\u000a\u000a See http://goo.gl/sdkXL9\u000a"); - } - this.promise._rejectCallback(reason); -}; - -PromiseResolver.prototype.progress = function (value) { - if (!(this instanceof PromiseResolver)) { - throw new TypeError("Illegal invocation, resolver resolve/reject must be called within a resolver context. Consider using the promise constructor instead.\u000a\u000a See http://goo.gl/sdkXL9\u000a"); - } - this.promise._progress(value); -}; - -PromiseResolver.prototype.cancel = function (err) { - this.promise.cancel(err); -}; - -PromiseResolver.prototype.timeout = function () { - this.reject(new TimeoutError("timeout")); -}; - -PromiseResolver.prototype.isResolved = function () { - return this.promise.isResolved(); -}; - -PromiseResolver.prototype.toJSON = function () { - return this.promise.toJSON(); -}; - -module.exports = PromiseResolver; - -},{"./errors.js":13,"./es5.js":14,"./util.js":38}],26:[function(_dereq_,module,exports){ -"use strict"; -module.exports = function(Promise, INTERNAL) { -var THIS = {}; -var util = _dereq_("./util.js"); -var nodebackForPromise = _dereq_("./promise_resolver.js") - ._nodebackForPromise; -var withAppended = util.withAppended; -var maybeWrapAsError = util.maybeWrapAsError; -var canEvaluate = util.canEvaluate; -var TypeError = _dereq_("./errors").TypeError; -var defaultSuffix = "Async"; -var defaultPromisified = {__isPromisified__: true}; -var noCopyProps = [ - "arity", "length", - "name", - "arguments", - "caller", - "callee", - "prototype", - "__isPromisified__" -]; -var noCopyPropsPattern = new RegExp("^(?:" + noCopyProps.join("|") + ")$"); - -var defaultFilter = function(name) { - return util.isIdentifier(name) && - name.charAt(0) !== "_" && - name !== "constructor"; -}; - -function propsFilter(key) { - return !noCopyPropsPattern.test(key); -} - -function isPromisified(fn) { - try { - return fn.__isPromisified__ === true; - } - catch (e) { - return false; - } -} - -function hasPromisified(obj, key, suffix) { - var val = util.getDataPropertyOrDefault(obj, key + suffix, - defaultPromisified); - return val ? isPromisified(val) : false; -} -function checkValid(ret, suffix, suffixRegexp) { - for (var i = 0; i < ret.length; i += 2) { - var key = ret[i]; - if (suffixRegexp.test(key)) { - var keyWithoutAsyncSuffix = key.replace(suffixRegexp, ""); - for (var j = 0; j < ret.length; j += 2) { - if (ret[j] === keyWithoutAsyncSuffix) { - throw new TypeError("Cannot promisify an API that has normal methods with '%s'-suffix\u000a\u000a See http://goo.gl/iWrZbw\u000a" - .replace("%s", suffix)); - } - } - } - } -} - -function promisifiableMethods(obj, suffix, suffixRegexp, filter) { - var keys = util.inheritedDataKeys(obj); - var ret = []; - for (var i = 0; i < keys.length; ++i) { - var key = keys[i]; - var value = obj[key]; - var passesDefaultFilter = filter === defaultFilter - ? true : defaultFilter(key, value, obj); - if (typeof value === "function" && - !isPromisified(value) && - !hasPromisified(obj, key, suffix) && - filter(key, value, obj, passesDefaultFilter)) { - ret.push(key, value); - } - } - checkValid(ret, suffix, suffixRegexp); - return ret; -} - -var escapeIdentRegex = function(str) { - return str.replace(/([$])/, "\\$"); -}; - -var makeNodePromisifiedEval; -if (!true) { -var switchCaseArgumentOrder = function(likelyArgumentCount) { - var ret = [likelyArgumentCount]; - var min = Math.max(0, likelyArgumentCount - 1 - 3); - for(var i = likelyArgumentCount - 1; i >= min; --i) { - ret.push(i); - } - for(var i = likelyArgumentCount + 1; i <= 3; ++i) { - ret.push(i); - } - return ret; -}; - -var argumentSequence = function(argumentCount) { - return util.filledRange(argumentCount, "_arg", ""); -}; - -var parameterDeclaration = function(parameterCount) { - return util.filledRange( - Math.max(parameterCount, 3), "_arg", ""); -}; - -var parameterCount = function(fn) { - if (typeof fn.length === "number") { - return Math.max(Math.min(fn.length, 1023 + 1), 0); - } - return 0; -}; - -makeNodePromisifiedEval = -function(callback, receiver, originalName, fn) { - var newParameterCount = Math.max(0, parameterCount(fn) - 1); - var argumentOrder = switchCaseArgumentOrder(newParameterCount); - var shouldProxyThis = typeof callback === "string" || receiver === THIS; - - function generateCallForArgumentCount(count) { - var args = argumentSequence(count).join(", "); - var comma = count > 0 ? ", " : ""; - var ret; - if (shouldProxyThis) { - ret = "ret = callback.call(this, {{args}}, nodeback); break;\n"; - } else { - ret = receiver === undefined - ? "ret = callback({{args}}, nodeback); break;\n" - : "ret = callback.call(receiver, {{args}}, nodeback); break;\n"; - } - return ret.replace("{{args}}", args).replace(", ", comma); - } - - function generateArgumentSwitchCase() { - var ret = ""; - for (var i = 0; i < argumentOrder.length; ++i) { - ret += "case " + argumentOrder[i] +":" + - generateCallForArgumentCount(argumentOrder[i]); - } - - ret += " \n\ - default: \n\ - var args = new Array(len + 1); \n\ - var i = 0; \n\ - for (var i = 0; i < len; ++i) { \n\ - args[i] = arguments[i]; \n\ - } \n\ - args[i] = nodeback; \n\ - [CodeForCall] \n\ - break; \n\ - ".replace("[CodeForCall]", (shouldProxyThis - ? "ret = callback.apply(this, args);\n" - : "ret = callback.apply(receiver, args);\n")); - return ret; - } - - var getFunctionCode = typeof callback === "string" - ? ("this != null ? this['"+callback+"'] : fn") - : "fn"; - - return new Function("Promise", - "fn", - "receiver", - "withAppended", - "maybeWrapAsError", - "nodebackForPromise", - "tryCatch", - "errorObj", - "notEnumerableProp", - "INTERNAL","'use strict'; \n\ - var ret = function (Parameters) { \n\ - 'use strict'; \n\ - var len = arguments.length; \n\ - var promise = new Promise(INTERNAL); \n\ - promise._captureStackTrace(); \n\ - var nodeback = nodebackForPromise(promise); \n\ - var ret; \n\ - var callback = tryCatch([GetFunctionCode]); \n\ - switch(len) { \n\ - [CodeForSwitchCase] \n\ - } \n\ - if (ret === errorObj) { \n\ - promise._rejectCallback(maybeWrapAsError(ret.e), true, true);\n\ - } \n\ - return promise; \n\ - }; \n\ - notEnumerableProp(ret, '__isPromisified__', true); \n\ - return ret; \n\ - " - .replace("Parameters", parameterDeclaration(newParameterCount)) - .replace("[CodeForSwitchCase]", generateArgumentSwitchCase()) - .replace("[GetFunctionCode]", getFunctionCode))( - Promise, - fn, - receiver, - withAppended, - maybeWrapAsError, - nodebackForPromise, - util.tryCatch, - util.errorObj, - util.notEnumerableProp, - INTERNAL - ); -}; -} - -function makeNodePromisifiedClosure(callback, receiver, _, fn) { - var defaultThis = (function() {return this;})(); - var method = callback; - if (typeof method === "string") { - callback = fn; - } - function promisified() { - var _receiver = receiver; - if (receiver === THIS) _receiver = this; - var promise = new Promise(INTERNAL); - promise._captureStackTrace(); - var cb = typeof method === "string" && this !== defaultThis - ? this[method] : callback; - var fn = nodebackForPromise(promise); - try { - cb.apply(_receiver, withAppended(arguments, fn)); - } catch(e) { - promise._rejectCallback(maybeWrapAsError(e), true, true); - } - return promise; - } - util.notEnumerableProp(promisified, "__isPromisified__", true); - return promisified; -} - -var makeNodePromisified = canEvaluate - ? makeNodePromisifiedEval - : makeNodePromisifiedClosure; - -function promisifyAll(obj, suffix, filter, promisifier) { - var suffixRegexp = new RegExp(escapeIdentRegex(suffix) + "$"); - var methods = - promisifiableMethods(obj, suffix, suffixRegexp, filter); - - for (var i = 0, len = methods.length; i < len; i+= 2) { - var key = methods[i]; - var fn = methods[i+1]; - var promisifiedKey = key + suffix; - if (promisifier === makeNodePromisified) { - obj[promisifiedKey] = - makeNodePromisified(key, THIS, key, fn, suffix); - } else { - var promisified = promisifier(fn, function() { - return makeNodePromisified(key, THIS, key, fn, suffix); - }); - util.notEnumerableProp(promisified, "__isPromisified__", true); - obj[promisifiedKey] = promisified; - } - } - util.toFastProperties(obj); - return obj; -} - -function promisify(callback, receiver) { - return makeNodePromisified(callback, receiver, undefined, callback); -} - -Promise.promisify = function (fn, receiver) { - if (typeof fn !== "function") { - throw new TypeError("fn must be a function\u000a\u000a See http://goo.gl/916lJJ\u000a"); - } - if (isPromisified(fn)) { - return fn; - } - var ret = promisify(fn, arguments.length < 2 ? THIS : receiver); - util.copyDescriptors(fn, ret, propsFilter); - return ret; -}; - -Promise.promisifyAll = function (target, options) { - if (typeof target !== "function" && typeof target !== "object") { - throw new TypeError("the target of promisifyAll must be an object or a function\u000a\u000a See http://goo.gl/9ITlV0\u000a"); - } - options = Object(options); - var suffix = options.suffix; - if (typeof suffix !== "string") suffix = defaultSuffix; - var filter = options.filter; - if (typeof filter !== "function") filter = defaultFilter; - var promisifier = options.promisifier; - if (typeof promisifier !== "function") promisifier = makeNodePromisified; - - if (!util.isIdentifier(suffix)) { - throw new RangeError("suffix must be a valid identifier\u000a\u000a See http://goo.gl/8FZo5V\u000a"); - } - - var keys = util.inheritedDataKeys(target); - for (var i = 0; i < keys.length; ++i) { - var value = target[keys[i]]; - if (keys[i] !== "constructor" && - util.isClass(value)) { - promisifyAll(value.prototype, suffix, filter, promisifier); - promisifyAll(value, suffix, filter, promisifier); - } - } - - return promisifyAll(target, suffix, filter, promisifier); -}; -}; - - -},{"./errors":13,"./promise_resolver.js":25,"./util.js":38}],27:[function(_dereq_,module,exports){ -"use strict"; -module.exports = function( - Promise, PromiseArray, tryConvertToPromise, apiRejection) { -var util = _dereq_("./util.js"); -var isObject = util.isObject; -var es5 = _dereq_("./es5.js"); - -function PropertiesPromiseArray(obj) { - var keys = es5.keys(obj); - var len = keys.length; - var values = new Array(len * 2); - for (var i = 0; i < len; ++i) { - var key = keys[i]; - values[i] = obj[key]; - values[i + len] = key; - } - this.constructor$(values); -} -util.inherits(PropertiesPromiseArray, PromiseArray); - -PropertiesPromiseArray.prototype._init = function () { - this._init$(undefined, -3) ; -}; - -PropertiesPromiseArray.prototype._promiseFulfilled = function (value, index) { - this._values[index] = value; - var totalResolved = ++this._totalResolved; - if (totalResolved >= this._length) { - var val = {}; - var keyOffset = this.length(); - for (var i = 0, len = this.length(); i < len; ++i) { - val[this._values[i + keyOffset]] = this._values[i]; - } - this._resolve(val); - } -}; - -PropertiesPromiseArray.prototype._promiseProgressed = function (value, index) { - this._promise._progress({ - key: this._values[index + this.length()], - value: value - }); -}; - -PropertiesPromiseArray.prototype.shouldCopyValues = function () { - return false; -}; - -PropertiesPromiseArray.prototype.getActualLength = function (len) { - return len >> 1; -}; - -function props(promises) { - var ret; - var castValue = tryConvertToPromise(promises); - - if (!isObject(castValue)) { - return apiRejection("cannot await properties of a non-object\u000a\u000a See http://goo.gl/OsFKC8\u000a"); - } else if (castValue instanceof Promise) { - ret = castValue._then( - Promise.props, undefined, undefined, undefined, undefined); - } else { - ret = new PropertiesPromiseArray(castValue).promise(); - } - - if (castValue instanceof Promise) { - ret._propagateFrom(castValue, 4); - } - return ret; -} - -Promise.prototype.props = function () { - return props(this); -}; - -Promise.props = function (promises) { - return props(promises); -}; -}; - -},{"./es5.js":14,"./util.js":38}],28:[function(_dereq_,module,exports){ -"use strict"; -function arrayMove(src, srcIndex, dst, dstIndex, len) { - for (var j = 0; j < len; ++j) { - dst[j + dstIndex] = src[j + srcIndex]; - src[j + srcIndex] = void 0; - } -} - -function Queue(capacity) { - this._capacity = capacity; - this._length = 0; - this._front = 0; -} - -Queue.prototype._willBeOverCapacity = function (size) { - return this._capacity < size; -}; - -Queue.prototype._pushOne = function (arg) { - var length = this.length(); - this._checkCapacity(length + 1); - var i = (this._front + length) & (this._capacity - 1); - this[i] = arg; - this._length = length + 1; -}; - -Queue.prototype._unshiftOne = function(value) { - var capacity = this._capacity; - this._checkCapacity(this.length() + 1); - var front = this._front; - var i = (((( front - 1 ) & - ( capacity - 1) ) ^ capacity ) - capacity ); - this[i] = value; - this._front = i; - this._length = this.length() + 1; -}; - -Queue.prototype.unshift = function(fn, receiver, arg) { - this._unshiftOne(arg); - this._unshiftOne(receiver); - this._unshiftOne(fn); -}; - -Queue.prototype.push = function (fn, receiver, arg) { - var length = this.length() + 3; - if (this._willBeOverCapacity(length)) { - this._pushOne(fn); - this._pushOne(receiver); - this._pushOne(arg); - return; - } - var j = this._front + length - 3; - this._checkCapacity(length); - var wrapMask = this._capacity - 1; - this[(j + 0) & wrapMask] = fn; - this[(j + 1) & wrapMask] = receiver; - this[(j + 2) & wrapMask] = arg; - this._length = length; -}; - -Queue.prototype.shift = function () { - var front = this._front, - ret = this[front]; - - this[front] = undefined; - this._front = (front + 1) & (this._capacity - 1); - this._length--; - return ret; -}; - -Queue.prototype.length = function () { - return this._length; -}; - -Queue.prototype._checkCapacity = function (size) { - if (this._capacity < size) { - this._resizeTo(this._capacity << 1); - } -}; - -Queue.prototype._resizeTo = function (capacity) { - var oldCapacity = this._capacity; - this._capacity = capacity; - var front = this._front; - var length = this._length; - var moveItemsCount = (front + length) & (oldCapacity - 1); - arrayMove(this, 0, this, oldCapacity, moveItemsCount); -}; - -module.exports = Queue; - -},{}],29:[function(_dereq_,module,exports){ -"use strict"; -module.exports = function( - Promise, INTERNAL, tryConvertToPromise, apiRejection) { -var isArray = _dereq_("./util.js").isArray; - -var raceLater = function (promise) { - return promise.then(function(array) { - return race(array, promise); - }); -}; - -function race(promises, parent) { - var maybePromise = tryConvertToPromise(promises); - - if (maybePromise instanceof Promise) { - return raceLater(maybePromise); - } else if (!isArray(promises)) { - return apiRejection("expecting an array, a promise or a thenable\u000a\u000a See http://goo.gl/s8MMhc\u000a"); - } - - var ret = new Promise(INTERNAL); - if (parent !== undefined) { - ret._propagateFrom(parent, 4 | 1); - } - var fulfill = ret._fulfill; - var reject = ret._reject; - for (var i = 0, len = promises.length; i < len; ++i) { - var val = promises[i]; - - if (val === undefined && !(i in promises)) { - continue; - } - - Promise.cast(val)._then(fulfill, reject, undefined, ret, null); - } - return ret; -} - -Promise.race = function (promises) { - return race(promises, undefined); -}; - -Promise.prototype.race = function () { - return race(this, undefined); -}; - -}; - -},{"./util.js":38}],30:[function(_dereq_,module,exports){ -"use strict"; -module.exports = function(Promise, - PromiseArray, - apiRejection, - tryConvertToPromise, - INTERNAL) { -var getDomain = Promise._getDomain; -var async = _dereq_("./async.js"); -var util = _dereq_("./util.js"); -var tryCatch = util.tryCatch; -var errorObj = util.errorObj; -function ReductionPromiseArray(promises, fn, accum, _each) { - this.constructor$(promises); - this._promise._captureStackTrace(); - this._preservedValues = _each === INTERNAL ? [] : null; - this._zerothIsAccum = (accum === undefined); - this._gotAccum = false; - this._reducingIndex = (this._zerothIsAccum ? 1 : 0); - this._valuesPhase = undefined; - var maybePromise = tryConvertToPromise(accum, this._promise); - var rejected = false; - var isPromise = maybePromise instanceof Promise; - if (isPromise) { - maybePromise = maybePromise._target(); - if (maybePromise._isPending()) { - maybePromise._proxyPromiseArray(this, -1); - } else if (maybePromise._isFulfilled()) { - accum = maybePromise._value(); - this._gotAccum = true; - } else { - this._reject(maybePromise._reason()); - rejected = true; - } - } - if (!(isPromise || this._zerothIsAccum)) this._gotAccum = true; - var domain = getDomain(); - this._callback = domain === null ? fn : domain.bind(fn); - this._accum = accum; - if (!rejected) async.invoke(init, this, undefined); -} -function init() { - this._init$(undefined, -5); -} -util.inherits(ReductionPromiseArray, PromiseArray); - -ReductionPromiseArray.prototype._init = function () {}; - -ReductionPromiseArray.prototype._resolveEmptyArray = function () { - if (this._gotAccum || this._zerothIsAccum) { - this._resolve(this._preservedValues !== null - ? [] : this._accum); - } -}; - -ReductionPromiseArray.prototype._promiseFulfilled = function (value, index) { - var values = this._values; - values[index] = value; - var length = this.length(); - var preservedValues = this._preservedValues; - var isEach = preservedValues !== null; - var gotAccum = this._gotAccum; - var valuesPhase = this._valuesPhase; - var valuesPhaseIndex; - if (!valuesPhase) { - valuesPhase = this._valuesPhase = new Array(length); - for (valuesPhaseIndex=0; valuesPhaseIndex= this._length) { - this._resolve(this._values); - } -}; - -SettledPromiseArray.prototype._promiseFulfilled = function (value, index) { - var ret = new PromiseInspection(); - ret._bitField = 268435456; - ret._settledValue = value; - this._promiseResolved(index, ret); -}; -SettledPromiseArray.prototype._promiseRejected = function (reason, index) { - var ret = new PromiseInspection(); - ret._bitField = 134217728; - ret._settledValue = reason; - this._promiseResolved(index, ret); -}; - -Promise.settle = function (promises) { - return new SettledPromiseArray(promises).promise(); -}; - -Promise.prototype.settle = function () { - return new SettledPromiseArray(this).promise(); -}; -}; - -},{"./util.js":38}],33:[function(_dereq_,module,exports){ -"use strict"; -module.exports = -function(Promise, PromiseArray, apiRejection) { -var util = _dereq_("./util.js"); -var RangeError = _dereq_("./errors.js").RangeError; -var AggregateError = _dereq_("./errors.js").AggregateError; -var isArray = util.isArray; - - -function SomePromiseArray(values) { - this.constructor$(values); - this._howMany = 0; - this._unwrap = false; - this._initialized = false; -} -util.inherits(SomePromiseArray, PromiseArray); - -SomePromiseArray.prototype._init = function () { - if (!this._initialized) { - return; - } - if (this._howMany === 0) { - this._resolve([]); - return; - } - this._init$(undefined, -5); - var isArrayResolved = isArray(this._values); - if (!this._isResolved() && - isArrayResolved && - this._howMany > this._canPossiblyFulfill()) { - this._reject(this._getRangeError(this.length())); - } -}; - -SomePromiseArray.prototype.init = function () { - this._initialized = true; - this._init(); -}; - -SomePromiseArray.prototype.setUnwrap = function () { - this._unwrap = true; -}; - -SomePromiseArray.prototype.howMany = function () { - return this._howMany; -}; - -SomePromiseArray.prototype.setHowMany = function (count) { - this._howMany = count; -}; - -SomePromiseArray.prototype._promiseFulfilled = function (value) { - this._addFulfilled(value); - if (this._fulfilled() === this.howMany()) { - this._values.length = this.howMany(); - if (this.howMany() === 1 && this._unwrap) { - this._resolve(this._values[0]); - } else { - this._resolve(this._values); - } - } - -}; -SomePromiseArray.prototype._promiseRejected = function (reason) { - this._addRejected(reason); - if (this.howMany() > this._canPossiblyFulfill()) { - var e = new AggregateError(); - for (var i = this.length(); i < this._values.length; ++i) { - e.push(this._values[i]); - } - this._reject(e); - } -}; - -SomePromiseArray.prototype._fulfilled = function () { - return this._totalResolved; -}; - -SomePromiseArray.prototype._rejected = function () { - return this._values.length - this.length(); -}; - -SomePromiseArray.prototype._addRejected = function (reason) { - this._values.push(reason); -}; - -SomePromiseArray.prototype._addFulfilled = function (value) { - this._values[this._totalResolved++] = value; -}; - -SomePromiseArray.prototype._canPossiblyFulfill = function () { - return this.length() - this._rejected(); -}; - -SomePromiseArray.prototype._getRangeError = function (count) { - var message = "Input array must contain at least " + - this._howMany + " items but contains only " + count + " items"; - return new RangeError(message); -}; - -SomePromiseArray.prototype._resolveEmptyArray = function () { - this._reject(this._getRangeError(0)); -}; - -function some(promises, howMany) { - if ((howMany | 0) !== howMany || howMany < 0) { - return apiRejection("expecting a positive integer\u000a\u000a See http://goo.gl/1wAmHx\u000a"); - } - var ret = new SomePromiseArray(promises); - var promise = ret.promise(); - ret.setHowMany(howMany); - ret.init(); - return promise; -} - -Promise.some = function (promises, howMany) { - return some(promises, howMany); -}; - -Promise.prototype.some = function (howMany) { - return some(this, howMany); -}; - -Promise._SomePromiseArray = SomePromiseArray; -}; - -},{"./errors.js":13,"./util.js":38}],34:[function(_dereq_,module,exports){ -"use strict"; -module.exports = function(Promise) { -function PromiseInspection(promise) { - if (promise !== undefined) { - promise = promise._target(); - this._bitField = promise._bitField; - this._settledValue = promise._settledValue; - } - else { - this._bitField = 0; - this._settledValue = undefined; - } -} - -PromiseInspection.prototype.value = function () { - if (!this.isFulfilled()) { - throw new TypeError("cannot get fulfillment value of a non-fulfilled promise\u000a\u000a See http://goo.gl/hc1DLj\u000a"); - } - return this._settledValue; -}; - -PromiseInspection.prototype.error = -PromiseInspection.prototype.reason = function () { - if (!this.isRejected()) { - throw new TypeError("cannot get rejection reason of a non-rejected promise\u000a\u000a See http://goo.gl/hPuiwB\u000a"); - } - return this._settledValue; -}; - -PromiseInspection.prototype.isFulfilled = -Promise.prototype._isFulfilled = function () { - return (this._bitField & 268435456) > 0; -}; - -PromiseInspection.prototype.isRejected = -Promise.prototype._isRejected = function () { - return (this._bitField & 134217728) > 0; -}; - -PromiseInspection.prototype.isPending = -Promise.prototype._isPending = function () { - return (this._bitField & 402653184) === 0; -}; - -PromiseInspection.prototype.isResolved = -Promise.prototype._isResolved = function () { - return (this._bitField & 402653184) > 0; -}; - -Promise.prototype.isPending = function() { - return this._target()._isPending(); -}; - -Promise.prototype.isRejected = function() { - return this._target()._isRejected(); -}; - -Promise.prototype.isFulfilled = function() { - return this._target()._isFulfilled(); -}; - -Promise.prototype.isResolved = function() { - return this._target()._isResolved(); -}; - -Promise.prototype._value = function() { - return this._settledValue; -}; - -Promise.prototype._reason = function() { - this._unsetRejectionIsUnhandled(); - return this._settledValue; -}; - -Promise.prototype.value = function() { - var target = this._target(); - if (!target.isFulfilled()) { - throw new TypeError("cannot get fulfillment value of a non-fulfilled promise\u000a\u000a See http://goo.gl/hc1DLj\u000a"); - } - return target._settledValue; -}; - -Promise.prototype.reason = function() { - var target = this._target(); - if (!target.isRejected()) { - throw new TypeError("cannot get rejection reason of a non-rejected promise\u000a\u000a See http://goo.gl/hPuiwB\u000a"); - } - target._unsetRejectionIsUnhandled(); - return target._settledValue; -}; - - -Promise.PromiseInspection = PromiseInspection; -}; - -},{}],35:[function(_dereq_,module,exports){ -"use strict"; -module.exports = function(Promise, INTERNAL) { -var util = _dereq_("./util.js"); -var errorObj = util.errorObj; -var isObject = util.isObject; - -function tryConvertToPromise(obj, context) { - if (isObject(obj)) { - if (obj instanceof Promise) { - return obj; - } - else if (isAnyBluebirdPromise(obj)) { - var ret = new Promise(INTERNAL); - obj._then( - ret._fulfillUnchecked, - ret._rejectUncheckedCheckError, - ret._progressUnchecked, - ret, - null - ); - return ret; - } - var then = util.tryCatch(getThen)(obj); - if (then === errorObj) { - if (context) context._pushContext(); - var ret = Promise.reject(then.e); - if (context) context._popContext(); - return ret; - } else if (typeof then === "function") { - return doThenable(obj, then, context); - } - } - return obj; -} - -function getThen(obj) { - return obj.then; -} - -var hasProp = {}.hasOwnProperty; -function isAnyBluebirdPromise(obj) { - return hasProp.call(obj, "_promise0"); -} - -function doThenable(x, then, context) { - var promise = new Promise(INTERNAL); - var ret = promise; - if (context) context._pushContext(); - promise._captureStackTrace(); - if (context) context._popContext(); - var synchronous = true; - var result = util.tryCatch(then).call(x, - resolveFromThenable, - rejectFromThenable, - progressFromThenable); - synchronous = false; - if (promise && result === errorObj) { - promise._rejectCallback(result.e, true, true); - promise = null; - } - - function resolveFromThenable(value) { - if (!promise) return; - promise._resolveCallback(value); - promise = null; - } - - function rejectFromThenable(reason) { - if (!promise) return; - promise._rejectCallback(reason, synchronous, true); - promise = null; - } - - function progressFromThenable(value) { - if (!promise) return; - if (typeof promise._progress === "function") { - promise._progress(value); - } - } - return ret; -} - -return tryConvertToPromise; -}; - -},{"./util.js":38}],36:[function(_dereq_,module,exports){ -"use strict"; -module.exports = function(Promise, INTERNAL) { -var util = _dereq_("./util.js"); -var TimeoutError = Promise.TimeoutError; - -var afterTimeout = function (promise, message) { - if (!promise.isPending()) return; - - var err; - if(!util.isPrimitive(message) && (message instanceof Error)) { - err = message; - } else { - if (typeof message !== "string") { - message = "operation timed out"; - } - err = new TimeoutError(message); - } - util.markAsOriginatingFromRejection(err); - promise._attachExtraTrace(err); - promise._cancel(err); -}; - -var afterValue = function(value) { return delay(+this).thenReturn(value); }; -var delay = Promise.delay = function (value, ms) { - if (ms === undefined) { - ms = value; - value = undefined; - var ret = new Promise(INTERNAL); - setTimeout(function() { ret._fulfill(); }, ms); - return ret; - } - ms = +ms; - return Promise.resolve(value)._then(afterValue, null, null, ms, undefined); -}; - -Promise.prototype.delay = function (ms) { - return delay(this, ms); -}; - -function successClear(value) { - var handle = this; - if (handle instanceof Number) handle = +handle; - clearTimeout(handle); - return value; -} - -function failureClear(reason) { - var handle = this; - if (handle instanceof Number) handle = +handle; - clearTimeout(handle); - throw reason; -} - -Promise.prototype.timeout = function (ms, message) { - ms = +ms; - var ret = this.then().cancellable(); - ret._cancellationParent = this; - var handle = setTimeout(function timeoutTimeout() { - afterTimeout(ret, message); - }, ms); - return ret._then(successClear, failureClear, undefined, handle, undefined); -}; - -}; - -},{"./util.js":38}],37:[function(_dereq_,module,exports){ -"use strict"; -module.exports = function (Promise, apiRejection, tryConvertToPromise, - createContext) { - var TypeError = _dereq_("./errors.js").TypeError; - var inherits = _dereq_("./util.js").inherits; - var PromiseInspection = Promise.PromiseInspection; - - function inspectionMapper(inspections) { - var len = inspections.length; - for (var i = 0; i < len; ++i) { - var inspection = inspections[i]; - if (inspection.isRejected()) { - return Promise.reject(inspection.error()); - } - inspections[i] = inspection._settledValue; - } - return inspections; - } - - function thrower(e) { - setTimeout(function(){throw e;}, 0); - } - - function castPreservingDisposable(thenable) { - var maybePromise = tryConvertToPromise(thenable); - if (maybePromise !== thenable && - typeof thenable._isDisposable === "function" && - typeof thenable._getDisposer === "function" && - thenable._isDisposable()) { - maybePromise._setDisposable(thenable._getDisposer()); - } - return maybePromise; - } - function dispose(resources, inspection) { - var i = 0; - var len = resources.length; - var ret = Promise.defer(); - function iterator() { - if (i >= len) return ret.resolve(); - var maybePromise = castPreservingDisposable(resources[i++]); - if (maybePromise instanceof Promise && - maybePromise._isDisposable()) { - try { - maybePromise = tryConvertToPromise( - maybePromise._getDisposer().tryDispose(inspection), - resources.promise); - } catch (e) { - return thrower(e); - } - if (maybePromise instanceof Promise) { - return maybePromise._then(iterator, thrower, - null, null, null); - } - } - iterator(); - } - iterator(); - return ret.promise; - } - - function disposerSuccess(value) { - var inspection = new PromiseInspection(); - inspection._settledValue = value; - inspection._bitField = 268435456; - return dispose(this, inspection).thenReturn(value); - } - - function disposerFail(reason) { - var inspection = new PromiseInspection(); - inspection._settledValue = reason; - inspection._bitField = 134217728; - return dispose(this, inspection).thenThrow(reason); - } - - function Disposer(data, promise, context) { - this._data = data; - this._promise = promise; - this._context = context; - } - - Disposer.prototype.data = function () { - return this._data; - }; - - Disposer.prototype.promise = function () { - return this._promise; - }; - - Disposer.prototype.resource = function () { - if (this.promise().isFulfilled()) { - return this.promise().value(); - } - return null; - }; - - Disposer.prototype.tryDispose = function(inspection) { - var resource = this.resource(); - var context = this._context; - if (context !== undefined) context._pushContext(); - var ret = resource !== null - ? this.doDispose(resource, inspection) : null; - if (context !== undefined) context._popContext(); - this._promise._unsetDisposable(); - this._data = null; - return ret; - }; - - Disposer.isDisposer = function (d) { - return (d != null && - typeof d.resource === "function" && - typeof d.tryDispose === "function"); - }; - - function FunctionDisposer(fn, promise, context) { - this.constructor$(fn, promise, context); - } - inherits(FunctionDisposer, Disposer); - - FunctionDisposer.prototype.doDispose = function (resource, inspection) { - var fn = this.data(); - return fn.call(resource, resource, inspection); - }; - - function maybeUnwrapDisposer(value) { - if (Disposer.isDisposer(value)) { - this.resources[this.index]._setDisposable(value); - return value.promise(); - } - return value; - } - - Promise.using = function () { - var len = arguments.length; - if (len < 2) return apiRejection( - "you must pass at least 2 arguments to Promise.using"); - var fn = arguments[len - 1]; - if (typeof fn !== "function") return apiRejection("fn must be a function\u000a\u000a See http://goo.gl/916lJJ\u000a"); - - var input; - var spreadArgs = true; - if (len === 2 && Array.isArray(arguments[0])) { - input = arguments[0]; - len = input.length; - spreadArgs = false; - } else { - input = arguments; - len--; - } - var resources = new Array(len); - for (var i = 0; i < len; ++i) { - var resource = input[i]; - if (Disposer.isDisposer(resource)) { - var disposer = resource; - resource = resource.promise(); - resource._setDisposable(disposer); - } else { - var maybePromise = tryConvertToPromise(resource); - if (maybePromise instanceof Promise) { - resource = - maybePromise._then(maybeUnwrapDisposer, null, null, { - resources: resources, - index: i - }, undefined); - } - } - resources[i] = resource; - } - - var promise = Promise.settle(resources) - .then(inspectionMapper) - .then(function(vals) { - promise._pushContext(); - var ret; - try { - ret = spreadArgs - ? fn.apply(undefined, vals) : fn.call(undefined, vals); - } finally { - promise._popContext(); - } - return ret; - }) - ._then( - disposerSuccess, disposerFail, undefined, resources, undefined); - resources.promise = promise; - return promise; - }; - - Promise.prototype._setDisposable = function (disposer) { - this._bitField = this._bitField | 262144; - this._disposer = disposer; - }; - - Promise.prototype._isDisposable = function () { - return (this._bitField & 262144) > 0; - }; - - Promise.prototype._getDisposer = function () { - return this._disposer; - }; - - Promise.prototype._unsetDisposable = function () { - this._bitField = this._bitField & (~262144); - this._disposer = undefined; - }; - - Promise.prototype.disposer = function (fn) { - if (typeof fn === "function") { - return new FunctionDisposer(fn, this, createContext()); - } - throw new TypeError(); - }; - -}; - -},{"./errors.js":13,"./util.js":38}],38:[function(_dereq_,module,exports){ -"use strict"; -var es5 = _dereq_("./es5.js"); -var canEvaluate = typeof navigator == "undefined"; -var haveGetters = (function(){ - try { - var o = {}; - es5.defineProperty(o, "f", { - get: function () { - return 3; - } - }); - return o.f === 3; - } - catch (e) { - return false; - } - -})(); - -var errorObj = {e: {}}; -var tryCatchTarget; -function tryCatcher() { - try { - var target = tryCatchTarget; - tryCatchTarget = null; - return target.apply(this, arguments); - } catch (e) { - errorObj.e = e; - return errorObj; - } -} -function tryCatch(fn) { - tryCatchTarget = fn; - return tryCatcher; -} - -var inherits = function(Child, Parent) { - var hasProp = {}.hasOwnProperty; - - function T() { - this.constructor = Child; - this.constructor$ = Parent; - for (var propertyName in Parent.prototype) { - if (hasProp.call(Parent.prototype, propertyName) && - propertyName.charAt(propertyName.length-1) !== "$" - ) { - this[propertyName + "$"] = Parent.prototype[propertyName]; - } - } - } - T.prototype = Parent.prototype; - Child.prototype = new T(); - return Child.prototype; -}; - - -function isPrimitive(val) { - return val == null || val === true || val === false || - typeof val === "string" || typeof val === "number"; - -} - -function isObject(value) { - return !isPrimitive(value); -} - -function maybeWrapAsError(maybeError) { - if (!isPrimitive(maybeError)) return maybeError; - - return new Error(safeToString(maybeError)); -} - -function withAppended(target, appendee) { - var len = target.length; - var ret = new Array(len + 1); - var i; - for (i = 0; i < len; ++i) { - ret[i] = target[i]; - } - ret[i] = appendee; - return ret; -} - -function getDataPropertyOrDefault(obj, key, defaultValue) { - if (es5.isES5) { - var desc = Object.getOwnPropertyDescriptor(obj, key); - - if (desc != null) { - return desc.get == null && desc.set == null - ? desc.value - : defaultValue; - } - } else { - return {}.hasOwnProperty.call(obj, key) ? obj[key] : undefined; - } -} - -function notEnumerableProp(obj, name, value) { - if (isPrimitive(obj)) return obj; - var descriptor = { - value: value, - configurable: true, - enumerable: false, - writable: true - }; - es5.defineProperty(obj, name, descriptor); - return obj; -} - -function thrower(r) { - throw r; -} - -var inheritedDataKeys = (function() { - var excludedPrototypes = [ - Array.prototype, - Object.prototype, - Function.prototype - ]; - - var isExcludedProto = function(val) { - for (var i = 0; i < excludedPrototypes.length; ++i) { - if (excludedPrototypes[i] === val) { - return true; - } - } - return false; - }; - - if (es5.isES5) { - var getKeys = Object.getOwnPropertyNames; - return function(obj) { - var ret = []; - var visitedKeys = Object.create(null); - while (obj != null && !isExcludedProto(obj)) { - var keys; - try { - keys = getKeys(obj); - } catch (e) { - return ret; - } - for (var i = 0; i < keys.length; ++i) { - var key = keys[i]; - if (visitedKeys[key]) continue; - visitedKeys[key] = true; - var desc = Object.getOwnPropertyDescriptor(obj, key); - if (desc != null && desc.get == null && desc.set == null) { - ret.push(key); - } - } - obj = es5.getPrototypeOf(obj); - } - return ret; - }; - } else { - var hasProp = {}.hasOwnProperty; - return function(obj) { - if (isExcludedProto(obj)) return []; - var ret = []; - - /*jshint forin:false */ - enumeration: for (var key in obj) { - if (hasProp.call(obj, key)) { - ret.push(key); - } else { - for (var i = 0; i < excludedPrototypes.length; ++i) { - if (hasProp.call(excludedPrototypes[i], key)) { - continue enumeration; - } - } - ret.push(key); - } - } - return ret; - }; - } - -})(); - -var thisAssignmentPattern = /this\s*\.\s*\S+\s*=/; -function isClass(fn) { - try { - if (typeof fn === "function") { - var keys = es5.names(fn.prototype); - - var hasMethods = es5.isES5 && keys.length > 1; - var hasMethodsOtherThanConstructor = keys.length > 0 && - !(keys.length === 1 && keys[0] === "constructor"); - var hasThisAssignmentAndStaticMethods = - thisAssignmentPattern.test(fn + "") && es5.names(fn).length > 0; - - if (hasMethods || hasMethodsOtherThanConstructor || - hasThisAssignmentAndStaticMethods) { - return true; - } - } - return false; - } catch (e) { - return false; - } -} - -function toFastProperties(obj) { - /*jshint -W027,-W055,-W031*/ - function f() {} - f.prototype = obj; - var l = 8; - while (l--) new f(); - return obj; - eval(obj); -} - -var rident = /^[a-z$_][a-z$_0-9]*$/i; -function isIdentifier(str) { - return rident.test(str); -} - -function filledRange(count, prefix, suffix) { - var ret = new Array(count); - for(var i = 0; i < count; ++i) { - ret[i] = prefix + i + suffix; - } - return ret; -} - -function safeToString(obj) { - try { - return obj + ""; - } catch (e) { - return "[no string representation]"; - } -} - -function markAsOriginatingFromRejection(e) { - try { - notEnumerableProp(e, "isOperational", true); - } - catch(ignore) {} -} - -function originatesFromRejection(e) { - if (e == null) return false; - return ((e instanceof Error["__BluebirdErrorTypes__"].OperationalError) || - e["isOperational"] === true); -} - -function canAttachTrace(obj) { - return obj instanceof Error && es5.propertyIsWritable(obj, "stack"); -} - -var ensureErrorObject = (function() { - if (!("stack" in new Error())) { - return function(value) { - if (canAttachTrace(value)) return value; - try {throw new Error(safeToString(value));} - catch(err) {return err;} - }; - } else { - return function(value) { - if (canAttachTrace(value)) return value; - return new Error(safeToString(value)); - }; - } -})(); - -function classString(obj) { - return {}.toString.call(obj); -} - -function copyDescriptors(from, to, filter) { - var keys = es5.names(from); - for (var i = 0; i < keys.length; ++i) { - var key = keys[i]; - if (filter(key)) { - try { - es5.defineProperty(to, key, es5.getDescriptor(from, key)); - } catch (ignore) {} - } - } -} - -var ret = { - isClass: isClass, - isIdentifier: isIdentifier, - inheritedDataKeys: inheritedDataKeys, - getDataPropertyOrDefault: getDataPropertyOrDefault, - thrower: thrower, - isArray: es5.isArray, - haveGetters: haveGetters, - notEnumerableProp: notEnumerableProp, - isPrimitive: isPrimitive, - isObject: isObject, - canEvaluate: canEvaluate, - errorObj: errorObj, - tryCatch: tryCatch, - inherits: inherits, - withAppended: withAppended, - maybeWrapAsError: maybeWrapAsError, - toFastProperties: toFastProperties, - filledRange: filledRange, - toString: safeToString, - canAttachTrace: canAttachTrace, - ensureErrorObject: ensureErrorObject, - originatesFromRejection: originatesFromRejection, - markAsOriginatingFromRejection: markAsOriginatingFromRejection, - classString: classString, - copyDescriptors: copyDescriptors, - hasDevTools: typeof chrome !== "undefined" && chrome && - typeof chrome.loadTimes === "function", - isNode: typeof process !== "undefined" && - classString(process).toLowerCase() === "[object process]" -}; -ret.isRecentNode = ret.isNode && (function() { - var version = process.versions.node.split(".").map(Number); - return (version[0] === 0 && version[1] > 10) || (version[0] > 0); -})(); - -if (ret.isNode) ret.toFastProperties(process); - -try {throw new Error(); } catch (e) {ret.lastLineError = e;} -module.exports = ret; - -},{"./es5.js":14}]},{},[4])(4) -}); ;if (typeof window !== 'undefined' && window !== null) { window.P = window.Promise; } else if (typeof self !== 'undefined' && self !== null) { self.P = self.Promise; } \ No newline at end of file diff --git a/node_modules/bluebird/js/browser/bluebird.min.js b/node_modules/bluebird/js/browser/bluebird.min.js deleted file mode 100644 index bcbd9658..00000000 --- a/node_modules/bluebird/js/browser/bluebird.min.js +++ /dev/null @@ -1,31 +0,0 @@ -/* @preserve - * The MIT License (MIT) - * - * Copyright (c) 2013-2015 Petka Antonov - * - * 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. - * - */ -/** - * bluebird build version 2.11.0 - * Features enabled: core, race, call_get, generators, map, nodeify, promisify, props, reduce, settle, some, cancel, using, filter, any, each, timers -*/ -!function(t){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var e;"undefined"!=typeof window?e=window:"undefined"!=typeof global?e=global:"undefined"!=typeof self&&(e=self),e.Promise=t()}}(function(){var t,e,r;return function n(t,e,r){function i(s,a){if(!e[s]){if(!t[s]){var u="function"==typeof _dereq_&&_dereq_;if(!a&&u)return u(s,!0);if(o)return o(s,!0);var c=new Error("Cannot find module '"+s+"'");throw c.code="MODULE_NOT_FOUND",c}var l=e[s]={exports:{}};t[s][0].call(l.exports,function(e){var r=t[s][1][e];return i(r?r:e)},l,l.exports,n,t,e,r)}return e[s].exports}for(var o="function"==typeof _dereq_&&_dereq_,s=0;s0},n.prototype.throwLater=function(t,e){if(1===arguments.length&&(e=t,t=function(){throw e}),"undefined"!=typeof setTimeout)setTimeout(function(){t(e)},0);else try{this._schedule(function(){t(e)})}catch(r){throw new Error("No async scheduler available\n\n See http://goo.gl/m3OTXk\n")}},h.hasDevTools?(c.isStatic&&(c=function(t){setTimeout(t,0)}),n.prototype.invokeLater=function(t,e,r){this._trampolineEnabled?i.call(this,t,e,r):this._schedule(function(){setTimeout(function(){t.call(e,r)},100)})},n.prototype.invoke=function(t,e,r){this._trampolineEnabled?o.call(this,t,e,r):this._schedule(function(){t.call(e,r)})},n.prototype.settlePromises=function(t){this._trampolineEnabled?s.call(this,t):this._schedule(function(){t._settlePromises()})}):(n.prototype.invokeLater=i,n.prototype.invoke=o,n.prototype.settlePromises=s),n.prototype.invokeFirst=function(t,e,r){this._normalQueue.unshift(t,e,r),this._queueTick()},n.prototype._drainQueue=function(t){for(;t.length()>0;){var e=t.shift();if("function"==typeof e){var r=t.shift(),n=t.shift();e.call(r,n)}else e._settlePromises()}},n.prototype._drainQueues=function(){this._drainQueue(this._normalQueue),this._reset(),this._drainQueue(this._lateQueue)},n.prototype._queueTick=function(){this._isTickUsed||(this._isTickUsed=!0,this._schedule(this.drainQueues))},n.prototype._reset=function(){this._isTickUsed=!1},e.exports=new n,e.exports.firstLineError=a},{"./queue.js":28,"./schedule.js":31,"./util.js":38}],3:[function(t,e,r){"use strict";e.exports=function(t,e,r){var n=function(t,e){this._reject(e)},i=function(t,e){e.promiseRejectionQueued=!0,e.bindingPromise._then(n,n,null,this,t)},o=function(t,e){this._isPending()&&this._resolveCallback(e.target)},s=function(t,e){e.promiseRejectionQueued||this._reject(t)};t.prototype.bind=function(n){var a=r(n),u=new t(e);u._propagateFrom(this,1);var c=this._target();if(u._setBoundTo(a),a instanceof t){var l={promiseRejectionQueued:!1,promise:u,target:c,bindingPromise:a};c._then(e,i,u._progress,u,l),a._then(o,s,u._progress,u,l)}else u._resolveCallback(c);return u},t.prototype._setBoundTo=function(t){void 0!==t?(this._bitField=131072|this._bitField,this._boundTo=t):this._bitField=-131073&this._bitField},t.prototype._isBound=function(){return 131072===(131072&this._bitField)},t.bind=function(n,i){var o=r(n),s=new t(e);return s._setBoundTo(o),o instanceof t?o._then(function(){s._resolveCallback(i)},s._reject,s._progress,s,null):s._resolveCallback(i),s}}},{}],4:[function(t,e,r){"use strict";function n(){try{Promise===o&&(Promise=i)}catch(t){}return o}var i;"undefined"!=typeof Promise&&(i=Promise);var o=t("./promise.js")();o.noConflict=n,e.exports=o},{"./promise.js":23}],5:[function(t,e,r){"use strict";var n=Object.create;if(n){var i=n(null),o=n(null);i[" size"]=o[" size"]=0}e.exports=function(e){function r(t,r){var n;if(null!=t&&(n=t[r]),"function"!=typeof n){var i="Object "+a.classString(t)+" has no method '"+a.toString(r)+"'";throw new e.TypeError(i)}return n}function n(t){var e=this.pop(),n=r(t,e);return n.apply(t,this)}function i(t){return t[this]}function o(t){var e=+this;return 0>e&&(e=Math.max(0,e+t.length)),t[e]}var s,a=t("./util.js"),u=a.canEvaluate;a.isIdentifier;e.prototype.call=function(t){for(var e=arguments.length,r=new Array(e-1),i=1;e>i;++i)r[i-1]=arguments[i];return r.push(t),this._then(n,void 0,void 0,r,void 0)},e.prototype.get=function(t){var e,r="number"==typeof t;if(r)e=o;else if(u){var n=s(t);e=null!==n?n:i}else e=i;return this._then(e,void 0,void 0,t,void 0)}}},{"./util.js":38}],6:[function(t,e,r){"use strict";e.exports=function(e){var r=t("./errors.js"),n=t("./async.js"),i=r.CancellationError;e.prototype._cancel=function(t){if(!this.isCancellable())return this;for(var e,r=this;void 0!==(e=r._cancellationParent)&&e.isCancellable();)r=e;this._unsetCancellable(),r._target()._rejectCallback(t,!1,!0)},e.prototype.cancel=function(t){return this.isCancellable()?(void 0===t&&(t=new i),n.invokeLater(this._cancel,this,t),this):this},e.prototype.cancellable=function(){return this._cancellable()?this:(n.enableTrampoline(),this._setCancellable(),this._cancellationParent=void 0,this)},e.prototype.uncancellable=function(){var t=this.then();return t._unsetCancellable(),t},e.prototype.fork=function(t,e,r){var n=this._then(t,e,r,void 0,void 0);return n._setCancellable(),n._cancellationParent=void 0,n}}},{"./async.js":2,"./errors.js":13}],7:[function(t,e,r){"use strict";e.exports=function(){function e(t){this._parent=t;var r=this._length=1+(void 0===t?0:t._length);j(this,e),r>32&&this.uncycle()}function r(t,e){for(var r=0;r=0;--a)if(n[a]===o){s=a;break}for(var a=s;a>=0;--a){var u=n[a];if(e[i]!==u)break;e.pop(),i--}e=n}}function o(t){for(var e=[],r=0;r0&&(e=e.slice(r)),e}function a(t){var e;if("function"==typeof t)e="[function "+(t.name||"anonymous")+"]";else{e=t.toString();var r=/\[object [a-zA-Z0-9$_]+\]/;if(r.test(e))try{var n=JSON.stringify(t);e=n}catch(i){}0===e.length&&(e="(empty array)")}return"(<"+u(e)+">, no stack trace)"}function u(t){var e=41;return t.lengtht)){for(var e=[],r={},n=0,i=this;void 0!==i;++n)e.push(i),i=i._parent;t=this._length=n;for(var n=t-1;n>=0;--n){var o=e[n].stack;void 0===r[o]&&(r[o]=n)}for(var n=0;t>n;++n){var s=e[n].stack,a=r[s];if(void 0!==a&&a!==n){a>0&&(e[a-1]._parent=void 0,e[a-1]._length=1),e[n]._parent=void 0,e[n]._length=1;var u=n>0?e[n-1]:this;t-1>a?(u._parent=e[a+1],u._parent.uncycle(),u._length=u._parent._length+1):(u._parent=void 0,u._length=1);for(var c=u._length+1,l=n-2;l>=0;--l)e[l]._length=c,c++;return}}}},e.prototype.parent=function(){return this._parent},e.prototype.hasParent=function(){return void 0!==this._parent},e.prototype.attachExtraTrace=function(t){if(!t.__stackCleaned__){this.uncycle();for(var s=e.parseStackAndMessage(t),a=s.message,u=[s.stack],c=this;void 0!==c;)u.push(o(c.stack.split("\n"))),c=c._parent;i(u),n(u),p.notEnumerableProp(t,"stack",r(a,u)),p.notEnumerableProp(t,"__stackCleaned__",!0)}},e.parseStackAndMessage=function(t){var e=t.stack,r=t.toString();return e="string"==typeof e&&e.length>0?s(t):[" (No stack trace)"],{message:r,stack:o(e)}},e.formatAndLogError=function(t,e){if("undefined"!=typeof console){var r;if("object"==typeof t||"function"==typeof t){var n=t.stack;r=e+d(n,t)}else r=e+String(t);"function"==typeof l?l(r):("function"==typeof console.log||"object"==typeof console.log)&&console.log(r)}},e.unhandledRejection=function(t){e.formatAndLogError(t,"^--- With additional stack trace: ")},e.isSupported=function(){return"function"==typeof j},e.fireRejectionEvent=function(t,r,n,i){var o=!1;try{"function"==typeof r&&(o=!0,"rejectionHandled"===t?r(i):r(n,i))}catch(s){h.throwLater(s)}var a=!1;try{a=b(t,n,i)}catch(s){a=!0,h.throwLater(s)}var u=!1;if(m)try{u=m(t.toLowerCase(),{reason:n,promise:i})}catch(s){u=!0,h.throwLater(s)}a||o||u||"unhandledRejection"!==t||e.formatAndLogError(n,"Unhandled rejection ")};var y=function(){return!1},g=/[\/<\(]([^:\/]+):(\d+):(?:\d+)\)?\s*$/;e.setBounds=function(t,r){if(e.isSupported()){for(var n,i,o=t.stack.split("\n"),s=r.stack.split("\n"),a=-1,u=-1,l=0;la||0>u||!n||!i||n!==i||a>=u||(y=function(t){if(f.test(t))return!0;var e=c(t);return e&&e.fileName===n&&a<=e.line&&e.line<=u?!0:!1})}};var m,j=function(){var t=/^\s*at\s*/,e=function(t,e){return"string"==typeof t?t:void 0!==e.name&&void 0!==e.message?e.toString():a(e)};if("number"==typeof Error.stackTraceLimit&&"function"==typeof Error.captureStackTrace){Error.stackTraceLimit=Error.stackTraceLimit+6,_=t,d=e;var r=Error.captureStackTrace;return y=function(t){return f.test(t)},function(t,e){Error.stackTraceLimit=Error.stackTraceLimit+6,r(t,e),Error.stackTraceLimit=Error.stackTraceLimit-6}}var n=new Error;if("string"==typeof n.stack&&n.stack.split("\n")[0].indexOf("stackDetection@")>=0)return _=/@/,d=e,v=!0,function(t){t.stack=(new Error).stack};var i;try{throw new Error}catch(o){i="stack"in o}return"stack"in n||!i||"number"!=typeof Error.stackTraceLimit?(d=function(t,e){return"string"==typeof t?t:"object"!=typeof e&&"function"!=typeof e||void 0===e.name||void 0===e.message?a(e):e.toString()},null):(_=t,d=e,function(t){Error.stackTraceLimit=Error.stackTraceLimit+6;try{throw new Error}catch(e){t.stack=e.stack}Error.stackTraceLimit=Error.stackTraceLimit-6})}([]),b=function(){if(p.isNode)return function(t,e,r){return"rejectionHandled"===t?process.emit(t,r):process.emit(t,e,r)};var t=!1,e=!0;try{var r=new self.CustomEvent("test");t=r instanceof CustomEvent}catch(n){}if(!t)try{var i=document.createEvent("CustomEvent");i.initCustomEvent("testingtheevent",!1,!0,{}),self.dispatchEvent(i)}catch(n){e=!1}e&&(m=function(e,r){var n;return t?n=new self.CustomEvent(e,{detail:r,bubbles:!1,cancelable:!0}):self.dispatchEvent&&(n=document.createEvent("CustomEvent"),n.initCustomEvent(e,!1,!0,r)),n?!self.dispatchEvent(n):!1});var o={};return o.unhandledRejection="onunhandledRejection".toLowerCase(),o.rejectionHandled="onrejectionHandled".toLowerCase(),function(t,e,r){var n=o[t],i=self[n];return i?("rejectionHandled"===t?i.call(self,r):i.call(self,e,r),!0):!1}}();return"undefined"!=typeof console&&"undefined"!=typeof console.warn&&(l=function(t){console.warn(t)},p.isNode&&process.stderr.isTTY?l=function(t){process.stderr.write(""+t+"\n")}:p.isNode||"string"!=typeof(new Error).stack||(l=function(t){console.warn("%c"+t,"color: red")})),e}},{"./async.js":2,"./util.js":38}],8:[function(t,e,r){"use strict";e.exports=function(e){function r(t,e,r){this._instances=t,this._callback=e,this._promise=r}function n(t,e){var r={},n=s(t).call(r,e);if(n===a)return n;var i=u(r);return i.length?(a.e=new c("Catch filter must inherit from Error or be a simple predicate function\n\n See http://goo.gl/o84o68\n"),a):n}var i=t("./util.js"),o=t("./errors.js"),s=i.tryCatch,a=i.errorObj,u=t("./es5.js").keys,c=o.TypeError;return r.prototype.doFilter=function(t){for(var r=this._callback,i=this._promise,o=i._boundValue(),u=0,c=this._instances.length;c>u;++u){var l=this._instances[u],h=l===Error||null!=l&&l.prototype instanceof Error;if(h&&t instanceof l){var p=s(r).call(o,t);return p===a?(e.e=p.e,e):p}if("function"==typeof l&&!h){var f=n(l,t);if(f===a){t=a.e;break}if(f){var p=s(r).call(o,t);return p===a?(e.e=p.e,e):p}}}return e.e=t,e},r}},{"./errors.js":13,"./es5.js":14,"./util.js":38}],9:[function(t,e,r){"use strict";e.exports=function(t,e,r){function n(){this._trace=new e(o())}function i(){return r()?new n:void 0}function o(){var t=s.length-1;return t>=0?s[t]:void 0}var s=[];return n.prototype._pushContext=function(){r()&&void 0!==this._trace&&s.push(this._trace)},n.prototype._popContext=function(){r()&&void 0!==this._trace&&s.pop()},t.prototype._peekContext=o,t.prototype._pushContext=n.prototype._pushContext,t.prototype._popContext=n.prototype._popContext,i}},{}],10:[function(t,e,r){"use strict";e.exports=function(e,r){var n,i,o=e._getDomain,s=t("./async.js"),a=t("./errors.js").Warning,u=t("./util.js"),c=u.canAttachTrace,l=u.isNode&&(!!process.env.BLUEBIRD_DEBUG||"development"===process.env.NODE_ENV);return u.isNode&&0==process.env.BLUEBIRD_DEBUG&&(l=!1),l&&s.disableTrampolineIfNecessary(),e.prototype._ignoreRejections=function(){this._unsetRejectionIsUnhandled(),this._bitField=16777216|this._bitField},e.prototype._ensurePossibleRejectionHandled=function(){0===(16777216&this._bitField)&&(this._setRejectionIsUnhandled(),s.invokeLater(this._notifyUnhandledRejection,this,void 0))},e.prototype._notifyUnhandledRejectionIsHandled=function(){r.fireRejectionEvent("rejectionHandled",n,void 0,this)},e.prototype._notifyUnhandledRejection=function(){if(this._isRejectionUnhandled()){var t=this._getCarriedStackTrace()||this._settledValue;this._setUnhandledRejectionIsNotified(),r.fireRejectionEvent("unhandledRejection",i,t,this)}},e.prototype._setUnhandledRejectionIsNotified=function(){this._bitField=524288|this._bitField},e.prototype._unsetUnhandledRejectionIsNotified=function(){this._bitField=-524289&this._bitField},e.prototype._isUnhandledRejectionNotified=function(){return(524288&this._bitField)>0},e.prototype._setRejectionIsUnhandled=function(){this._bitField=2097152|this._bitField},e.prototype._unsetRejectionIsUnhandled=function(){this._bitField=-2097153&this._bitField,this._isUnhandledRejectionNotified()&&(this._unsetUnhandledRejectionIsNotified(),this._notifyUnhandledRejectionIsHandled())},e.prototype._isRejectionUnhandled=function(){return(2097152&this._bitField)>0},e.prototype._setCarriedStackTrace=function(t){this._bitField=1048576|this._bitField,this._fulfillmentHandler0=t},e.prototype._isCarryingStackTrace=function(){return(1048576&this._bitField)>0},e.prototype._getCarriedStackTrace=function(){return this._isCarryingStackTrace()?this._fulfillmentHandler0:void 0},e.prototype._captureStackTrace=function(){return l&&(this._trace=new r(this._peekContext())),this},e.prototype._attachExtraTrace=function(t,e){if(l&&c(t)){var n=this._trace;if(void 0!==n&&e&&(n=n._parent),void 0!==n)n.attachExtraTrace(t);else if(!t.__stackCleaned__){var i=r.parseStackAndMessage(t);u.notEnumerableProp(t,"stack",i.message+"\n"+i.stack.join("\n")),u.notEnumerableProp(t,"__stackCleaned__",!0)}}},e.prototype._warn=function(t){var e=new a(t),n=this._peekContext();if(n)n.attachExtraTrace(e);else{var i=r.parseStackAndMessage(e);e.stack=i.message+"\n"+i.stack.join("\n")}r.formatAndLogError(e,"")},e.onPossiblyUnhandledRejection=function(t){var e=o();i="function"==typeof t?null===e?t:e.bind(t):void 0},e.onUnhandledRejectionHandled=function(t){var e=o();n="function"==typeof t?null===e?t:e.bind(t):void 0},e.longStackTraces=function(){if(s.haveItemsQueued()&&l===!1)throw new Error("cannot enable long stack traces after promises have been created\n\n See http://goo.gl/DT1qyG\n");l=r.isSupported(),l&&s.disableTrampolineIfNecessary()},e.hasLongStackTraces=function(){return l&&r.isSupported()},r.isSupported()||(e.longStackTraces=function(){},l=!1),function(){return l}}},{"./async.js":2,"./errors.js":13,"./util.js":38}],11:[function(t,e,r){"use strict";var n=t("./util.js"),i=n.isPrimitive;e.exports=function(t){var e=function(){return this},r=function(){throw this},n=function(){},o=function(){throw void 0},s=function(t,e){return 1===e?function(){throw t}:2===e?function(){return t}:void 0};t.prototype["return"]=t.prototype.thenReturn=function(r){return void 0===r?this.then(n):i(r)?this._then(s(r,2),void 0,void 0,void 0,void 0):(r instanceof t&&r._ignoreRejections(),this._then(e,void 0,void 0,r,void 0))},t.prototype["throw"]=t.prototype.thenThrow=function(t){return void 0===t?this.then(o):i(t)?this._then(s(t,1),void 0,void 0,void 0,void 0):this._then(r,void 0,void 0,t,void 0)}}},{"./util.js":38}],12:[function(t,e,r){"use strict";e.exports=function(t,e){var r=t.reduce;t.prototype.each=function(t){return r(this,t,null,e)},t.each=function(t,n){return r(t,n,null,e)}}},{}],13:[function(t,e,r){"use strict";function n(t,e){function r(n){return this instanceof r?(h(this,"message","string"==typeof n?n:e),h(this,"name",t),void(Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):Error.call(this))):new r(n)}return l(r,Error),r}function i(t){return this instanceof i?(h(this,"name","OperationalError"),h(this,"message",t),this.cause=t,this.isOperational=!0,void(t instanceof Error?(h(this,"message",t.message),h(this,"stack",t.stack)):Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor))):new i(t)}var o,s,a=t("./es5.js"),u=a.freeze,c=t("./util.js"),l=c.inherits,h=c.notEnumerableProp,p=n("Warning","warning"),f=n("CancellationError","cancellation error"),_=n("TimeoutError","timeout error"),d=n("AggregateError","aggregate error");try{o=TypeError,s=RangeError}catch(v){o=n("TypeError","type error"),s=n("RangeError","range error")}for(var y="join pop push shift unshift slice filter forEach some every map indexOf lastIndexOf reduce reduceRight sort reverse".split(" "),g=0;g0&&"function"==typeof arguments[e]){t=arguments[e];var n}for(var i=arguments.length,o=new Array(i),s=0;i>s;++s)o[s]=arguments[s];t&&o.pop();var n=new r(o).promise();return void 0!==t?n.spread(t):n}}},{"./util.js":38}],19:[function(t,e,r){"use strict";e.exports=function(e,r,n,i,o){function s(t,e,r,n){this.constructor$(t),this._promise._captureStackTrace();var i=c();this._callback=null===i?e:i.bind(e),this._preservedValues=n===o?new Array(this.length()):null,this._limit=r,this._inFlight=0,this._queue=r>=1?[]:d,l.invoke(a,this,void 0)}function a(){this._init$(void 0,-2)}function u(t,e,r,n){var i="object"==typeof r&&null!==r?r.concurrency:0;return i="number"==typeof i&&isFinite(i)&&i>=1?i:0,new s(t,e,i,n)}var c=e._getDomain,l=t("./async.js"),h=t("./util.js"),p=h.tryCatch,f=h.errorObj,_={},d=[];h.inherits(s,r),s.prototype._init=function(){},s.prototype._promiseFulfilled=function(t,r){var n=this._values,o=this.length(),s=this._preservedValues,a=this._limit;if(n[r]===_){if(n[r]=t,a>=1&&(this._inFlight--,this._drainQueue(),this._isResolved()))return}else{if(a>=1&&this._inFlight>=a)return n[r]=t,void this._queue.push(r);null!==s&&(s[r]=t);var u=this._callback,c=this._promise._boundValue();this._promise._pushContext();var l=p(u).call(c,t,r,o);if(this._promise._popContext(),l===f)return this._reject(l.e);var h=i(l,this._promise);if(h instanceof e){if(h=h._target(),h._isPending())return a>=1&&this._inFlight++,n[r]=_,h._proxyPromiseArray(this,r);if(!h._isFulfilled())return this._reject(h._reason());l=h._value()}n[r]=l}var d=++this._totalResolved;d>=o&&(null!==s?this._filter(n,s):this._resolve(n))},s.prototype._drainQueue=function(){for(var t=this._queue,e=this._limit,r=this._values;t.length>0&&this._inFlighto;++o)t[o]&&(n[i++]=e[o]);n.length=i,this._resolve(n)},s.prototype.preservedValues=function(){return this._preservedValues},e.prototype.map=function(t,e){return"function"!=typeof t?n("fn must be a function\n\n See http://goo.gl/916lJJ\n"):u(this,t,e,null).promise()},e.map=function(t,e,r,i){return"function"!=typeof e?n("fn must be a function\n\n See http://goo.gl/916lJJ\n"):u(t,e,r,i).promise()}}},{"./async.js":2,"./util.js":38}],20:[function(t,e,r){"use strict";e.exports=function(e,r,n,i){var o=t("./util.js"),s=o.tryCatch;e.method=function(t){if("function"!=typeof t)throw new e.TypeError("fn must be a function\n\n See http://goo.gl/916lJJ\n");return function(){var n=new e(r);n._captureStackTrace(),n._pushContext();var i=s(t).apply(this,arguments);return n._popContext(),n._resolveFromSyncValue(i),n}},e.attempt=e["try"]=function(t,n,a){if("function"!=typeof t)return i("fn must be a function\n\n See http://goo.gl/916lJJ\n");var u=new e(r);u._captureStackTrace(),u._pushContext();var c=o.isArray(n)?s(t).apply(a,n):s(t).call(a,n);return u._popContext(),u._resolveFromSyncValue(c),u},e.prototype._resolveFromSyncValue=function(t){t===o.errorObj?this._rejectCallback(t.e,!1,!0):this._resolveCallback(t,!0)}}},{"./util.js":38}],21:[function(t,e,r){"use strict";e.exports=function(e){function r(t,e){var r=this;if(!o.isArray(t))return n.call(r,t,e);var i=a(e).apply(r._boundValue(),[null].concat(t));i===u&&s.throwLater(i.e)}function n(t,e){var r=this,n=r._boundValue(),i=void 0===t?a(e).call(n,null):a(e).call(n,null,t);i===u&&s.throwLater(i.e)}function i(t,e){var r=this;if(!t){var n=r._target(),i=n._getCarriedStackTrace();i.cause=t,t=i}var o=a(e).call(r._boundValue(),t);o===u&&s.throwLater(o.e)}var o=t("./util.js"),s=t("./async.js"),a=o.tryCatch,u=o.errorObj;e.prototype.asCallback=e.prototype.nodeify=function(t,e){if("function"==typeof t){var o=n;void 0!==e&&Object(e).spread&&(o=r),this._then(o,i,void 0,this,t)}return this}}},{"./async.js":2,"./util.js":38}],22:[function(t,e,r){"use strict";e.exports=function(e,r){var n=t("./util.js"),i=t("./async.js"),o=n.tryCatch,s=n.errorObj;e.prototype.progressed=function(t){return this._then(void 0,void 0,t,void 0,void 0)},e.prototype._progress=function(t){this._isFollowingOrFulfilledOrRejected()||this._target()._progressUnchecked(t)},e.prototype._progressHandlerAt=function(t){return 0===t?this._progressHandler0:this[(t<<2)+t-5+2]},e.prototype._doProgressWith=function(t){var r=t.value,i=t.handler,a=t.promise,u=t.receiver,c=o(i).call(u,r);if(c===s){if(null!=c.e&&"StopProgressPropagation"!==c.e.name){var l=n.canAttachTrace(c.e)?c.e:new Error(n.toString(c.e));a._attachExtraTrace(l),a._progress(c.e)}}else c instanceof e?c._then(a._progress,null,null,a,void 0):a._progress(c)},e.prototype._progressUnchecked=function(t){for(var n=this._length(),o=this._progress,s=0;n>s;s++){var a=this._progressHandlerAt(s),u=this._promiseAt(s);if(u instanceof e)"function"==typeof a?i.invoke(this._doProgressWith,this,{handler:a,promise:u,receiver:this._receiverAt(s),value:t}):i.invoke(o,u,t);else{var c=this._receiverAt(s);"function"==typeof a?a.call(c,t,u):c instanceof r&&!c._isResolved()&&c._promiseProgressed(t,u)}}}}},{"./async.js":2,"./util.js":38}],23:[function(t,e,r){"use strict";e.exports=function(){function r(t){if("function"!=typeof t)throw new p("the promise constructor requires a resolver function\n\n See http://goo.gl/EC22Yn\n");if(this.constructor!==r)throw new p("the promise constructor cannot be invoked directly\n\n See http://goo.gl/KsIlge\n");this._bitField=0,this._fulfillmentHandler0=void 0,this._rejectionHandler0=void 0,this._progressHandler0=void 0,this._promise0=void 0,this._receiver0=void 0,this._settledValue=void 0,t!==f&&this._resolveFromResolver(t)}function n(t){var e=new r(f);e._fulfillmentHandler0=t,e._rejectionHandler0=t,e._progressHandler0=t,e._promise0=t,e._receiver0=t,e._settledValue=t}var i,o=function(){return new p("circular promise resolution chain\n\n See http://goo.gl/LhFpo0\n")},s=function(){return new r.PromiseInspection(this._target())},a=function(t){return r.reject(new p(t))},u=t("./util.js");i=u.isNode?function(){var t=process.domain;return void 0===t&&(t=null),t}:function(){return null},u.notEnumerableProp(r,"_getDomain",i);var c={},l=t("./async.js"),h=t("./errors.js"),p=r.TypeError=h.TypeError;r.RangeError=h.RangeError,r.CancellationError=h.CancellationError,r.TimeoutError=h.TimeoutError,r.OperationalError=h.OperationalError,r.RejectionError=h.OperationalError,r.AggregateError=h.AggregateError;var f=function(){},_={},d={e:null},v=t("./thenables.js")(r,f),y=t("./promise_array.js")(r,f,v,a),g=t("./captured_trace.js")(),m=t("./debuggability.js")(r,g),j=t("./context.js")(r,g,m),b=t("./catch_filter.js")(d),w=t("./promise_resolver.js"),k=w._nodebackForPromise,E=u.errorObj,F=u.tryCatch;return r.prototype.toString=function(){return"[object Promise]"},r.prototype.caught=r.prototype["catch"]=function(t){var e=arguments.length;if(e>1){var n,i=new Array(e-1),o=0;for(n=0;e-1>n;++n){var s=arguments[n];if("function"!=typeof s)return r.reject(new p("Catch filter must inherit from Error or be a simple predicate function\n\n See http://goo.gl/o84o68\n"));i[o++]=s}i.length=o,t=arguments[n];var a=new b(i,t,this);return this._then(void 0,a.doFilter,void 0,a,void 0)}return this._then(void 0,t,void 0,void 0,void 0)},r.prototype.reflect=function(){return this._then(s,s,void 0,this,void 0)},r.prototype.then=function(t,e,r){if(m()&&arguments.length>0&&"function"!=typeof t&&"function"!=typeof e){var n=".then() only accepts functions but was passed: "+u.classString(t);arguments.length>1&&(n+=", "+u.classString(e)),this._warn(n)}return this._then(t,e,r,void 0,void 0); -},r.prototype.done=function(t,e,r){var n=this._then(t,e,r,void 0,void 0);n._setIsFinal()},r.prototype.spread=function(t,e){return this.all()._then(t,e,void 0,_,void 0)},r.prototype.isCancellable=function(){return!this.isResolved()&&this._cancellable()},r.prototype.toJSON=function(){var t={isFulfilled:!1,isRejected:!1,fulfillmentValue:void 0,rejectionReason:void 0};return this.isFulfilled()?(t.fulfillmentValue=this.value(),t.isFulfilled=!0):this.isRejected()&&(t.rejectionReason=this.reason(),t.isRejected=!0),t},r.prototype.all=function(){return new y(this).promise()},r.prototype.error=function(t){return this.caught(u.originatesFromRejection,t)},r.getNewLibraryCopy=e.exports,r.is=function(t){return t instanceof r},r.fromNode=function(t){var e=new r(f),n=F(t)(k(e));return n===E&&e._rejectCallback(n.e,!0,!0),e},r.all=function(t){return new y(t).promise()},r.defer=r.pending=function(){var t=new r(f);return new w(t)},r.cast=function(t){var e=v(t);if(!(e instanceof r)){var n=e;e=new r(f),e._fulfillUnchecked(n)}return e},r.resolve=r.fulfilled=r.cast,r.reject=r.rejected=function(t){var e=new r(f);return e._captureStackTrace(),e._rejectCallback(t,!0),e},r.setScheduler=function(t){if("function"!=typeof t)throw new p("fn must be a function\n\n See http://goo.gl/916lJJ\n");var e=l._schedule;return l._schedule=t,e},r.prototype._then=function(t,e,n,o,s){var a=void 0!==s,u=a?s:new r(f);a||(u._propagateFrom(this,5),u._captureStackTrace());var c=this._target();c!==this&&(void 0===o&&(o=this._boundTo),a||u._setIsMigrated());var h=c._addCallbacks(t,e,n,u,o,i());return c._isResolved()&&!c._isSettlePromisesQueued()&&l.invoke(c._settlePromiseAtPostResolution,c,h),u},r.prototype._settlePromiseAtPostResolution=function(t){this._isRejectionUnhandled()&&this._unsetRejectionIsUnhandled(),this._settlePromiseAt(t)},r.prototype._length=function(){return 131071&this._bitField},r.prototype._isFollowingOrFulfilledOrRejected=function(){return(939524096&this._bitField)>0},r.prototype._isFollowing=function(){return 536870912===(536870912&this._bitField)},r.prototype._setLength=function(t){this._bitField=-131072&this._bitField|131071&t},r.prototype._setFulfilled=function(){this._bitField=268435456|this._bitField},r.prototype._setRejected=function(){this._bitField=134217728|this._bitField},r.prototype._setFollowing=function(){this._bitField=536870912|this._bitField},r.prototype._setIsFinal=function(){this._bitField=33554432|this._bitField},r.prototype._isFinal=function(){return(33554432&this._bitField)>0},r.prototype._cancellable=function(){return(67108864&this._bitField)>0},r.prototype._setCancellable=function(){this._bitField=67108864|this._bitField},r.prototype._unsetCancellable=function(){this._bitField=-67108865&this._bitField},r.prototype._setIsMigrated=function(){this._bitField=4194304|this._bitField},r.prototype._unsetIsMigrated=function(){this._bitField=-4194305&this._bitField},r.prototype._isMigrated=function(){return(4194304&this._bitField)>0},r.prototype._receiverAt=function(t){var e=0===t?this._receiver0:this[5*t-5+4];return e===c?void 0:void 0===e&&this._isBound()?this._boundValue():e},r.prototype._promiseAt=function(t){return 0===t?this._promise0:this[5*t-5+3]},r.prototype._fulfillmentHandlerAt=function(t){return 0===t?this._fulfillmentHandler0:this[5*t-5+0]},r.prototype._rejectionHandlerAt=function(t){return 0===t?this._rejectionHandler0:this[5*t-5+1]},r.prototype._boundValue=function(){var t=this._boundTo;return void 0!==t&&t instanceof r?t.isFulfilled()?t.value():void 0:t},r.prototype._migrateCallbacks=function(t,e){var n=t._fulfillmentHandlerAt(e),i=t._rejectionHandlerAt(e),o=t._progressHandlerAt(e),s=t._promiseAt(e),a=t._receiverAt(e);s instanceof r&&s._setIsMigrated(),void 0===a&&(a=c),this._addCallbacks(n,i,o,s,a,null)},r.prototype._addCallbacks=function(t,e,r,n,i,o){var s=this._length();if(s>=131066&&(s=0,this._setLength(0)),0===s)this._promise0=n,void 0!==i&&(this._receiver0=i),"function"!=typeof t||this._isCarryingStackTrace()||(this._fulfillmentHandler0=null===o?t:o.bind(t)),"function"==typeof e&&(this._rejectionHandler0=null===o?e:o.bind(e)),"function"==typeof r&&(this._progressHandler0=null===o?r:o.bind(r));else{var a=5*s-5;this[a+3]=n,this[a+4]=i,"function"==typeof t&&(this[a+0]=null===o?t:o.bind(t)),"function"==typeof e&&(this[a+1]=null===o?e:o.bind(e)),"function"==typeof r&&(this[a+2]=null===o?r:o.bind(r))}return this._setLength(s+1),s},r.prototype._setProxyHandlers=function(t,e){var r=this._length();if(r>=131066&&(r=0,this._setLength(0)),0===r)this._promise0=e,this._receiver0=t;else{var n=5*r-5;this[n+3]=e,this[n+4]=t}this._setLength(r+1)},r.prototype._proxyPromiseArray=function(t,e){this._setProxyHandlers(t,e)},r.prototype._resolveCallback=function(t,e){if(!this._isFollowingOrFulfilledOrRejected()){if(t===this)return this._rejectCallback(o(),!1,!0);var n=v(t,this);if(!(n instanceof r))return this._fulfill(t);var i=1|(e?4:0);this._propagateFrom(n,i);var s=n._target();if(s._isPending()){for(var a=this._length(),u=0;a>u;++u)s._migrateCallbacks(this,u);this._setFollowing(),this._setLength(0),this._setFollowee(s)}else s._isFulfilled()?this._fulfillUnchecked(s._value()):this._rejectUnchecked(s._reason(),s._getCarriedStackTrace())}},r.prototype._rejectCallback=function(t,e,r){r||u.markAsOriginatingFromRejection(t);var n=u.ensureErrorObject(t),i=n===t;this._attachExtraTrace(n,e?i:!1),this._reject(t,i?void 0:n)},r.prototype._resolveFromResolver=function(t){var e=this;this._captureStackTrace(),this._pushContext();var r=!0,n=F(t)(function(t){null!==e&&(e._resolveCallback(t),e=null)},function(t){null!==e&&(e._rejectCallback(t,r),e=null)});r=!1,this._popContext(),void 0!==n&&n===E&&null!==e&&(e._rejectCallback(n.e,!0,!0),e=null)},r.prototype._settlePromiseFromHandler=function(t,e,r,n){if(!n._isRejected()){n._pushContext();var i;if(i=e!==_||this._isRejected()?F(t).call(e,r):F(t).apply(this._boundValue(),r),n._popContext(),i===E||i===n||i===d){var s=i===n?o():i.e;n._rejectCallback(s,!1,!0)}else n._resolveCallback(i)}},r.prototype._target=function(){for(var t=this;t._isFollowing();)t=t._followee();return t},r.prototype._followee=function(){return this._rejectionHandler0},r.prototype._setFollowee=function(t){this._rejectionHandler0=t},r.prototype._cleanValues=function(){this._cancellable()&&(this._cancellationParent=void 0)},r.prototype._propagateFrom=function(t,e){(1&e)>0&&t._cancellable()&&(this._setCancellable(),this._cancellationParent=t),(4&e)>0&&t._isBound()&&this._setBoundTo(t._boundTo)},r.prototype._fulfill=function(t){this._isFollowingOrFulfilledOrRejected()||this._fulfillUnchecked(t)},r.prototype._reject=function(t,e){this._isFollowingOrFulfilledOrRejected()||this._rejectUnchecked(t,e)},r.prototype._settlePromiseAt=function(t){var e=this._promiseAt(t),n=e instanceof r;if(n&&e._isMigrated())return e._unsetIsMigrated(),l.invoke(this._settlePromiseAt,this,t);var i=this._isFulfilled()?this._fulfillmentHandlerAt(t):this._rejectionHandlerAt(t),o=this._isCarryingStackTrace()?this._getCarriedStackTrace():void 0,s=this._settledValue,a=this._receiverAt(t);this._clearCallbackDataAtIndex(t),"function"==typeof i?n?this._settlePromiseFromHandler(i,a,s,e):i.call(a,s,e):a instanceof y?a._isResolved()||(this._isFulfilled()?a._promiseFulfilled(s,e):a._promiseRejected(s,e)):n&&(this._isFulfilled()?e._fulfill(s):e._reject(s,o)),t>=4&&4===(31&t)&&l.invokeLater(this._setLength,this,0)},r.prototype._clearCallbackDataAtIndex=function(t){if(0===t)this._isCarryingStackTrace()||(this._fulfillmentHandler0=void 0),this._rejectionHandler0=this._progressHandler0=this._receiver0=this._promise0=void 0;else{var e=5*t-5;this[e+3]=this[e+4]=this[e+0]=this[e+1]=this[e+2]=void 0}},r.prototype._isSettlePromisesQueued=function(){return-1073741824===(-1073741824&this._bitField)},r.prototype._setSettlePromisesQueued=function(){this._bitField=-1073741824|this._bitField},r.prototype._unsetSettlePromisesQueued=function(){this._bitField=1073741823&this._bitField},r.prototype._queueSettlePromises=function(){l.settlePromises(this),this._setSettlePromisesQueued()},r.prototype._fulfillUnchecked=function(t){if(t===this){var e=o();return this._attachExtraTrace(e),this._rejectUnchecked(e,void 0)}this._setFulfilled(),this._settledValue=t,this._cleanValues(),this._length()>0&&this._queueSettlePromises()},r.prototype._rejectUncheckedCheckError=function(t){var e=u.ensureErrorObject(t);this._rejectUnchecked(t,e===t?void 0:e)},r.prototype._rejectUnchecked=function(t,e){if(t===this){var r=o();return this._attachExtraTrace(r),this._rejectUnchecked(r)}return this._setRejected(),this._settledValue=t,this._cleanValues(),this._isFinal()?void l.throwLater(function(t){throw"stack"in t&&l.invokeFirst(g.unhandledRejection,void 0,t),t},void 0===e?t:e):(void 0!==e&&e!==t&&this._setCarriedStackTrace(e),void(this._length()>0?this._queueSettlePromises():this._ensurePossibleRejectionHandled()))},r.prototype._settlePromises=function(){this._unsetSettlePromisesQueued();for(var t=this._length(),e=0;t>e;e++)this._settlePromiseAt(e)},u.notEnumerableProp(r,"_makeSelfResolutionError",o),t("./progress.js")(r,y),t("./method.js")(r,f,v,a),t("./bind.js")(r,f,v),t("./finally.js")(r,d,v),t("./direct_resolve.js")(r),t("./synchronous_inspection.js")(r),t("./join.js")(r,y,v,f),r.version="2.11.0",r.Promise=r,t("./map.js")(r,y,a,v,f),t("./cancel.js")(r),t("./using.js")(r,a,v,j),t("./generators.js")(r,a,f,v),t("./nodeify.js")(r),t("./call_get.js")(r),t("./props.js")(r,y,v,a),t("./race.js")(r,f,v,a),t("./reduce.js")(r,y,a,v,f),t("./settle.js")(r,y),t("./some.js")(r,y,a),t("./promisify.js")(r,f),t("./any.js")(r),t("./each.js")(r,f),t("./timers.js")(r,f),t("./filter.js")(r,f),u.toFastProperties(r),u.toFastProperties(r.prototype),n({a:1}),n({b:2}),n({c:3}),n(1),n(function(){}),n(void 0),n(!1),n(new r(f)),g.setBounds(l.firstLineError,u.lastLineError),r}},{"./any.js":1,"./async.js":2,"./bind.js":3,"./call_get.js":5,"./cancel.js":6,"./captured_trace.js":7,"./catch_filter.js":8,"./context.js":9,"./debuggability.js":10,"./direct_resolve.js":11,"./each.js":12,"./errors.js":13,"./filter.js":15,"./finally.js":16,"./generators.js":17,"./join.js":18,"./map.js":19,"./method.js":20,"./nodeify.js":21,"./progress.js":22,"./promise_array.js":24,"./promise_resolver.js":25,"./promisify.js":26,"./props.js":27,"./race.js":29,"./reduce.js":30,"./settle.js":32,"./some.js":33,"./synchronous_inspection.js":34,"./thenables.js":35,"./timers.js":36,"./using.js":37,"./util.js":38}],24:[function(t,e,r){"use strict";e.exports=function(e,r,n,i){function o(t){switch(t){case-2:return[];case-3:return{}}}function s(t){var n,i=this._promise=new e(r);t instanceof e&&(n=t,i._propagateFrom(n,5)),this._values=t,this._length=0,this._totalResolved=0,this._init(void 0,-2)}var a=t("./util.js"),u=a.isArray;return s.prototype.length=function(){return this._length},s.prototype.promise=function(){return this._promise},s.prototype._init=function c(t,r){var s=n(this._values,this._promise);if(s instanceof e){if(s=s._target(),this._values=s,!s._isFulfilled())return s._isPending()?void s._then(c,this._reject,void 0,this,r):void this._reject(s._reason());if(s=s._value(),!u(s)){var a=new e.TypeError("expecting an array, a promise or a thenable\n\n See http://goo.gl/s8MMhc\n");return void this.__hardReject__(a)}}else if(!u(s))return void this._promise._reject(i("expecting an array, a promise or a thenable\n\n See http://goo.gl/s8MMhc\n")._reason());if(0===s.length)return void(-5===r?this._resolveEmptyArray():this._resolve(o(r)));var l=this.getActualLength(s.length);this._length=l,this._values=this.shouldCopyValues()?new Array(l):this._values;for(var h=this._promise,p=0;l>p;++p){var f=this._isResolved(),_=n(s[p],h);_ instanceof e?(_=_._target(),f?_._ignoreRejections():_._isPending()?_._proxyPromiseArray(this,p):_._isFulfilled()?this._promiseFulfilled(_._value(),p):this._promiseRejected(_._reason(),p)):f||this._promiseFulfilled(_,p)}},s.prototype._isResolved=function(){return null===this._values},s.prototype._resolve=function(t){this._values=null,this._promise._fulfill(t)},s.prototype.__hardReject__=s.prototype._reject=function(t){this._values=null,this._promise._rejectCallback(t,!1,!0)},s.prototype._promiseProgressed=function(t,e){this._promise._progress({index:e,value:t})},s.prototype._promiseFulfilled=function(t,e){this._values[e]=t;var r=++this._totalResolved;r>=this._length&&this._resolve(this._values)},s.prototype._promiseRejected=function(t,e){this._totalResolved++,this._reject(t)},s.prototype.shouldCopyValues=function(){return!0},s.prototype.getActualLength=function(t){return t},s}},{"./util.js":38}],25:[function(t,e,r){"use strict";function n(t){return t instanceof Error&&f.getPrototypeOf(t)===Error.prototype}function i(t){var e;if(n(t)){e=new h(t),e.name=t.name,e.message=t.message,e.stack=t.stack;for(var r=f.keys(t),i=0;i2){for(var o=arguments.length,s=new Array(o-1),a=1;o>a;++a)s[a-1]=arguments[a];t._fulfill(s)}else t._fulfill(r);t=null}}}var s,a=t("./util.js"),u=a.maybeWrapAsError,c=t("./errors.js"),l=c.TimeoutError,h=c.OperationalError,p=a.haveGetters,f=t("./es5.js"),_=/^(?:name|message|stack|cause)$/;if(s=p?function(t){this.promise=t}:function(t){this.promise=t,this.asCallback=o(t),this.callback=this.asCallback},p){var d={get:function(){return o(this.promise)}};f.defineProperty(s.prototype,"asCallback",d),f.defineProperty(s.prototype,"callback",d)}s._nodebackForPromise=o,s.prototype.toString=function(){return"[object PromiseResolver]"},s.prototype.resolve=s.prototype.fulfill=function(t){if(!(this instanceof s))throw new TypeError("Illegal invocation, resolver resolve/reject must be called within a resolver context. Consider using the promise constructor instead.\n\n See http://goo.gl/sdkXL9\n");this.promise._resolveCallback(t)},s.prototype.reject=function(t){if(!(this instanceof s))throw new TypeError("Illegal invocation, resolver resolve/reject must be called within a resolver context. Consider using the promise constructor instead.\n\n See http://goo.gl/sdkXL9\n");this.promise._rejectCallback(t)},s.prototype.progress=function(t){if(!(this instanceof s))throw new TypeError("Illegal invocation, resolver resolve/reject must be called within a resolver context. Consider using the promise constructor instead.\n\n See http://goo.gl/sdkXL9\n");this.promise._progress(t)},s.prototype.cancel=function(t){this.promise.cancel(t)},s.prototype.timeout=function(){this.reject(new l("timeout"))},s.prototype.isResolved=function(){return this.promise.isResolved()},s.prototype.toJSON=function(){return this.promise.toJSON()},e.exports=s},{"./errors.js":13,"./es5.js":14,"./util.js":38}],26:[function(t,e,r){"use strict";e.exports=function(e,r){function n(t){return!w.test(t)}function i(t){try{return t.__isPromisified__===!0}catch(e){return!1}}function o(t,e,r){var n=f.getDataPropertyOrDefault(t,e+r,j);return n?i(n):!1}function s(t,e,r){for(var n=0;ns;s+=2){var c=o[s],l=o[s+1],h=c+e;if(n===F)t[h]=F(c,p,c,l,e);else{var _=n(l,function(){return F(c,p,c,l,e)});f.notEnumerableProp(_,"__isPromisified__",!0),t[h]=_}}return f.toFastProperties(t),t}function l(t,e){return F(t,e,void 0,t)}var h,p={},f=t("./util.js"),_=t("./promise_resolver.js")._nodebackForPromise,d=f.withAppended,v=f.maybeWrapAsError,y=f.canEvaluate,g=t("./errors").TypeError,m="Async",j={__isPromisified__:!0},b=["arity","length","name","arguments","caller","callee","prototype","__isPromisified__"],w=new RegExp("^(?:"+b.join("|")+")$"),k=function(t){return f.isIdentifier(t)&&"_"!==t.charAt(0)&&"constructor"!==t},E=function(t){return t.replace(/([$])/,"\\$")},F=y?h:u;e.promisify=function(t,e){if("function"!=typeof t)throw new g("fn must be a function\n\n See http://goo.gl/916lJJ\n");if(i(t))return t;var r=l(t,arguments.length<2?p:e);return f.copyDescriptors(t,r,n),r},e.promisifyAll=function(t,e){if("function"!=typeof t&&"object"!=typeof t)throw new g("the target of promisifyAll must be an object or a function\n\n See http://goo.gl/9ITlV0\n");e=Object(e);var r=e.suffix;"string"!=typeof r&&(r=m);var n=e.filter;"function"!=typeof n&&(n=k);var i=e.promisifier;if("function"!=typeof i&&(i=F),!f.isIdentifier(r))throw new RangeError("suffix must be a valid identifier\n\n See http://goo.gl/8FZo5V\n");for(var o=f.inheritedDataKeys(t),s=0;si;++i){var o=e[i];n[i]=t[o],n[i+r]=o}this.constructor$(n)}function s(t){var r,s=n(t);return u(s)?(r=s instanceof e?s._then(e.props,void 0,void 0,void 0,void 0):new o(s).promise(),s instanceof e&&r._propagateFrom(s,4),r):i("cannot await properties of a non-object\n\n See http://goo.gl/OsFKC8\n")}var a=t("./util.js"),u=a.isObject,c=t("./es5.js");a.inherits(o,r),o.prototype._init=function(){this._init$(void 0,-3)},o.prototype._promiseFulfilled=function(t,e){this._values[e]=t;var r=++this._totalResolved;if(r>=this._length){for(var n={},i=this.length(),o=0,s=this.length();s>o;++o)n[this._values[o+i]]=this._values[o];this._resolve(n)}},o.prototype._promiseProgressed=function(t,e){this._promise._progress({key:this._values[e+this.length()],value:t})},o.prototype.shouldCopyValues=function(){return!1},o.prototype.getActualLength=function(t){return t>>1},e.prototype.props=function(){return s(this)},e.props=function(t){return s(t)}}},{"./es5.js":14,"./util.js":38}],28:[function(t,e,r){"use strict";function n(t,e,r,n,i){for(var o=0;i>o;++o)r[o+n]=t[o+e],t[o+e]=void 0}function i(t){this._capacity=t,this._length=0,this._front=0}i.prototype._willBeOverCapacity=function(t){return this._capacityp;++p){var _=t[p];(void 0!==_||p in t)&&e.cast(_)._then(l,h,void 0,c,null)}return c}var s=t("./util.js").isArray,a=function(t){return t.then(function(e){return o(e,t)})};e.race=function(t){return o(t,void 0)},e.prototype.race=function(){return o(this,void 0)}}},{"./util.js":38}],30:[function(t,e,r){"use strict";e.exports=function(e,r,n,i,o){function s(t,r,n,s){this.constructor$(t),this._promise._captureStackTrace(),this._preservedValues=s===o?[]:null,this._zerothIsAccum=void 0===n,this._gotAccum=!1,this._reducingIndex=this._zerothIsAccum?1:0,this._valuesPhase=void 0;var u=i(n,this._promise),h=!1,p=u instanceof e;p&&(u=u._target(),u._isPending()?u._proxyPromiseArray(this,-1):u._isFulfilled()?(n=u._value(),this._gotAccum=!0):(this._reject(u._reason()),h=!0)),p||this._zerothIsAccum||(this._gotAccum=!0);var f=c();this._callback=null===f?r:f.bind(r),this._accum=n,h||l.invoke(a,this,void 0)}function a(){this._init$(void 0,-5)}function u(t,e,r,i){if("function"!=typeof e)return n("fn must be a function\n\n See http://goo.gl/916lJJ\n");var o=new s(t,e,r,i);return o.promise()}var c=e._getDomain,l=t("./async.js"),h=t("./util.js"),p=h.tryCatch,f=h.errorObj;h.inherits(s,r),s.prototype._init=function(){},s.prototype._resolveEmptyArray=function(){(this._gotAccum||this._zerothIsAccum)&&this._resolve(null!==this._preservedValues?[]:this._accum)},s.prototype._promiseFulfilled=function(t,r){var n=this._values;n[r]=t;var o,s=this.length(),a=this._preservedValues,u=null!==a,c=this._gotAccum,l=this._valuesPhase;if(!l)for(l=this._valuesPhase=new Array(s),o=0;s>o;++o)l[o]=0;if(o=l[r],0===r&&this._zerothIsAccum?(this._accum=t,this._gotAccum=c=!0,l[r]=0===o?1:2):-1===r?(this._accum=t,this._gotAccum=c=!0):0===o?l[r]=1:(l[r]=2,this._accum=t),c){for(var h,_=this._callback,d=this._promise._boundValue(),v=this._reducingIndex;s>v;++v)if(o=l[v],2!==o){if(1!==o)return;if(t=n[v],this._promise._pushContext(),u?(a.push(t),h=p(_).call(d,t,v,s)):h=p(_).call(d,this._accum,t,v,s),this._promise._popContext(),h===f)return this._reject(h.e);var y=i(h,this._promise);if(y instanceof e){if(y=y._target(),y._isPending())return l[v]=4,y._proxyPromiseArray(this,v);if(!y._isFulfilled())return this._reject(y._reason());h=y._value()}this._reducingIndex=v+1,this._accum=h}else this._reducingIndex=v+1;this._resolve(u?a:this._accum)}},e.prototype.reduce=function(t,e){return u(this,t,e,null)},e.reduce=function(t,e,r,n){return u(t,e,r,n)}}},{"./async.js":2,"./util.js":38}],31:[function(t,e,r){"use strict";var n,i=t("./util"),o=function(){throw new Error("No async scheduler available\n\n See http://goo.gl/m3OTXk\n")};if(i.isNode&&"undefined"==typeof MutationObserver){var s=global.setImmediate,a=process.nextTick;n=i.isRecentNode?function(t){s.call(global,t)}:function(t){a.call(process,t)}}else"undefined"==typeof MutationObserver||"undefined"!=typeof window&&window.navigator&&window.navigator.standalone?n="undefined"!=typeof setImmediate?function(t){setImmediate(t)}:"undefined"!=typeof setTimeout?function(t){setTimeout(t,0)}:o:(n=function(t){var e=document.createElement("div"),r=new MutationObserver(t);return r.observe(e,{attributes:!0}),function(){e.classList.toggle("foo")}},n.isStatic=!0);e.exports=n},{"./util":38}],32:[function(t,e,r){"use strict";e.exports=function(e,r){function n(t){this.constructor$(t)}var i=e.PromiseInspection,o=t("./util.js");o.inherits(n,r),n.prototype._promiseResolved=function(t,e){this._values[t]=e;var r=++this._totalResolved;r>=this._length&&this._resolve(this._values)},n.prototype._promiseFulfilled=function(t,e){var r=new i;r._bitField=268435456,r._settledValue=t,this._promiseResolved(e,r)},n.prototype._promiseRejected=function(t,e){var r=new i;r._bitField=134217728,r._settledValue=t,this._promiseResolved(e,r)},e.settle=function(t){return new n(t).promise()},e.prototype.settle=function(){return new n(this).promise()}}},{"./util.js":38}],33:[function(t,e,r){"use strict";e.exports=function(e,r,n){function i(t){this.constructor$(t),this._howMany=0,this._unwrap=!1,this._initialized=!1}function o(t,e){if((0|e)!==e||0>e)return n("expecting a positive integer\n\n See http://goo.gl/1wAmHx\n");var r=new i(t),o=r.promise();return r.setHowMany(e),r.init(),o}var s=t("./util.js"),a=t("./errors.js").RangeError,u=t("./errors.js").AggregateError,c=s.isArray;s.inherits(i,r),i.prototype._init=function(){if(this._initialized){if(0===this._howMany)return void this._resolve([]);this._init$(void 0,-5);var t=c(this._values);!this._isResolved()&&t&&this._howMany>this._canPossiblyFulfill()&&this._reject(this._getRangeError(this.length()))}},i.prototype.init=function(){this._initialized=!0,this._init()},i.prototype.setUnwrap=function(){this._unwrap=!0},i.prototype.howMany=function(){return this._howMany},i.prototype.setHowMany=function(t){this._howMany=t},i.prototype._promiseFulfilled=function(t){this._addFulfilled(t),this._fulfilled()===this.howMany()&&(this._values.length=this.howMany(),1===this.howMany()&&this._unwrap?this._resolve(this._values[0]):this._resolve(this._values))},i.prototype._promiseRejected=function(t){if(this._addRejected(t),this.howMany()>this._canPossiblyFulfill()){for(var e=new u,r=this.length();r0},e.prototype.isRejected=t.prototype._isRejected=function(){return(134217728&this._bitField)>0},e.prototype.isPending=t.prototype._isPending=function(){return 0===(402653184&this._bitField)},e.prototype.isResolved=t.prototype._isResolved=function(){return(402653184&this._bitField)>0},t.prototype.isPending=function(){return this._target()._isPending()},t.prototype.isRejected=function(){return this._target()._isRejected()},t.prototype.isFulfilled=function(){return this._target()._isFulfilled()},t.prototype.isResolved=function(){return this._target()._isResolved()},t.prototype._value=function(){return this._settledValue},t.prototype._reason=function(){return this._unsetRejectionIsUnhandled(),this._settledValue},t.prototype.value=function(){var t=this._target();if(!t.isFulfilled())throw new TypeError("cannot get fulfillment value of a non-fulfilled promise\n\n See http://goo.gl/hc1DLj\n");return t._settledValue},t.prototype.reason=function(){var t=this._target();if(!t.isRejected())throw new TypeError("cannot get rejection reason of a non-rejected promise\n\n See http://goo.gl/hPuiwB\n");return t._unsetRejectionIsUnhandled(),t._settledValue},t.PromiseInspection=e}},{}],35:[function(t,e,r){"use strict";e.exports=function(e,r){function n(t,n){if(c(t)){if(t instanceof e)return t;if(o(t)){var l=new e(r);return t._then(l._fulfillUnchecked,l._rejectUncheckedCheckError,l._progressUnchecked,l,null),l}var h=a.tryCatch(i)(t);if(h===u){n&&n._pushContext();var l=e.reject(h.e);return n&&n._popContext(),l}if("function"==typeof h)return s(t,h,n)}return t}function i(t){return t.then}function o(t){return l.call(t,"_promise0")}function s(t,n,i){function o(t){l&&(l._resolveCallback(t),l=null)}function s(t){l&&(l._rejectCallback(t,p,!0),l=null)}function c(t){l&&"function"==typeof l._progress&&l._progress(t)}var l=new e(r),h=l;i&&i._pushContext(),l._captureStackTrace(),i&&i._popContext();var p=!0,f=a.tryCatch(n).call(t,o,s,c);return p=!1,l&&f===u&&(l._rejectCallback(f.e,!0,!0),l=null),h}var a=t("./util.js"),u=a.errorObj,c=a.isObject,l={}.hasOwnProperty;return n}},{"./util.js":38}],36:[function(t,e,r){"use strict";e.exports=function(e,r){function n(t){var e=this;return e instanceof Number&&(e=+e),clearTimeout(e),t}function i(t){var e=this;throw e instanceof Number&&(e=+e),clearTimeout(e),t}var o=t("./util.js"),s=e.TimeoutError,a=function(t,e){if(t.isPending()){var r;!o.isPrimitive(e)&&e instanceof Error?r=e:("string"!=typeof e&&(e="operation timed out"),r=new s(e)),o.markAsOriginatingFromRejection(r),t._attachExtraTrace(r),t._cancel(r)}},u=function(t){return c(+this).thenReturn(t)},c=e.delay=function(t,n){if(void 0===n){n=t,t=void 0;var i=new e(r);return setTimeout(function(){i._fulfill()},n),i}return n=+n,e.resolve(t)._then(u,null,null,n,void 0)};e.prototype.delay=function(t){return c(this,t)},e.prototype.timeout=function(t,e){t=+t;var r=this.then().cancellable();r._cancellationParent=this;var o=setTimeout(function(){a(r,e)},t);return r._then(n,i,void 0,o,void 0)}}},{"./util.js":38}],37:[function(t,e,r){"use strict";e.exports=function(e,r,n,i){function o(t){for(var r=t.length,n=0;r>n;++n){var i=t[n];if(i.isRejected())return e.reject(i.error());t[n]=i._settledValue}return t}function s(t){setTimeout(function(){throw t},0)}function a(t){var e=n(t);return e!==t&&"function"==typeof t._isDisposable&&"function"==typeof t._getDisposer&&t._isDisposable()&&e._setDisposable(t._getDisposer()),e}function u(t,r){function i(){if(o>=u)return c.resolve();var l=a(t[o++]);if(l instanceof e&&l._isDisposable()){try{l=n(l._getDisposer().tryDispose(r),t.promise)}catch(h){return s(h)}if(l instanceof e)return l._then(i,s,null,null,null)}i()}var o=0,u=t.length,c=e.defer();return i(),c.promise}function c(t){var e=new v;return e._settledValue=t,e._bitField=268435456,u(this,e).thenReturn(t)}function l(t){var e=new v;return e._settledValue=t,e._bitField=134217728,u(this,e).thenThrow(t)}function h(t,e,r){this._data=t,this._promise=e,this._context=r}function p(t,e,r){this.constructor$(t,e,r)}function f(t){return h.isDisposer(t)?(this.resources[this.index]._setDisposable(t),t.promise()):t}var _=t("./errors.js").TypeError,d=t("./util.js").inherits,v=e.PromiseInspection;h.prototype.data=function(){return this._data},h.prototype.promise=function(){return this._promise},h.prototype.resource=function(){return this.promise().isFulfilled()?this.promise().value():null},h.prototype.tryDispose=function(t){var e=this.resource(),r=this._context;void 0!==r&&r._pushContext();var n=null!==e?this.doDispose(e,t):null;return void 0!==r&&r._popContext(),this._promise._unsetDisposable(),this._data=null,n},h.isDisposer=function(t){return null!=t&&"function"==typeof t.resource&&"function"==typeof t.tryDispose},d(p,h),p.prototype.doDispose=function(t,e){var r=this.data();return r.call(t,t,e)},e.using=function(){var t=arguments.length;if(2>t)return r("you must pass at least 2 arguments to Promise.using");var i=arguments[t-1];if("function"!=typeof i)return r("fn must be a function\n\n See http://goo.gl/916lJJ\n");var s,a=!0;2===t&&Array.isArray(arguments[0])?(s=arguments[0], -t=s.length,a=!1):(s=arguments,t--);for(var u=new Array(t),p=0;t>p;++p){var _=s[p];if(h.isDisposer(_)){var d=_;_=_.promise(),_._setDisposable(d)}else{var v=n(_);v instanceof e&&(_=v._then(f,null,null,{resources:u,index:p},void 0))}u[p]=_}var y=e.settle(u).then(o).then(function(t){y._pushContext();var e;try{e=a?i.apply(void 0,t):i.call(void 0,t)}finally{y._popContext()}return e})._then(c,l,void 0,u,void 0);return u.promise=y,y},e.prototype._setDisposable=function(t){this._bitField=262144|this._bitField,this._disposer=t},e.prototype._isDisposable=function(){return(262144&this._bitField)>0},e.prototype._getDisposer=function(){return this._disposer},e.prototype._unsetDisposable=function(){this._bitField=-262145&this._bitField,this._disposer=void 0},e.prototype.disposer=function(t){if("function"==typeof t)return new p(t,this,i());throw new _}}},{"./errors.js":13,"./util.js":38}],38:[function(t,e,r){"use strict";function n(){try{var t=C;return C=null,t.apply(this,arguments)}catch(e){return F.e=e,F}}function i(t){return C=t,n}function o(t){return null==t||t===!0||t===!1||"string"==typeof t||"number"==typeof t}function s(t){return!o(t)}function a(t){return o(t)?new Error(v(t)):t}function u(t,e){var r,n=t.length,i=new Array(n+1);for(r=0;n>r;++r)i[r]=t[r];return i[r]=e,i}function c(t,e,r){if(!w.isES5)return{}.hasOwnProperty.call(t,e)?t[e]:void 0;var n=Object.getOwnPropertyDescriptor(t,e);return null!=n?null==n.get&&null==n.set?n.value:r:void 0}function l(t,e,r){if(o(t))return t;var n={value:r,configurable:!0,enumerable:!1,writable:!0};return w.defineProperty(t,e,n),t}function h(t){throw t}function p(t){try{if("function"==typeof t){var e=w.names(t.prototype),r=w.isES5&&e.length>1,n=e.length>0&&!(1===e.length&&"constructor"===e[0]),i=x.test(t+"")&&w.names(t).length>0;if(r||n||i)return!0}return!1}catch(o){return!1}}function f(t){function e(){}e.prototype=t;for(var r=8;r--;)new e;return t}function _(t){return R.test(t)}function d(t,e,r){for(var n=new Array(t),i=0;t>i;++i)n[i]=e+i+r;return n}function v(t){try{return t+""}catch(e){return"[no string representation]"}}function y(t){try{l(t,"isOperational",!0)}catch(e){}}function g(t){return null==t?!1:t instanceof Error.__BluebirdErrorTypes__.OperationalError||t.isOperational===!0}function m(t){return t instanceof Error&&w.propertyIsWritable(t,"stack")}function j(t){return{}.toString.call(t)}function b(t,e,r){for(var n=w.names(t),i=0;i10||t[0]>0}(),A.isNode&&A.toFastProperties(process);try{throw new Error}catch(O){A.lastLineError=O}e.exports=A},{"./es5.js":14}]},{},[4])(4)}),"undefined"!=typeof window&&null!==window?window.P=window.Promise:"undefined"!=typeof self&&null!==self&&(self.P=self.Promise); \ No newline at end of file diff --git a/node_modules/bluebird/js/main/any.js b/node_modules/bluebird/js/main/any.js deleted file mode 100644 index 05a6228e..00000000 --- a/node_modules/bluebird/js/main/any.js +++ /dev/null @@ -1,21 +0,0 @@ -"use strict"; -module.exports = function(Promise) { -var SomePromiseArray = Promise._SomePromiseArray; -function any(promises) { - var ret = new SomePromiseArray(promises); - var promise = ret.promise(); - ret.setHowMany(1); - ret.setUnwrap(); - ret.init(); - return promise; -} - -Promise.any = function (promises) { - return any(promises); -}; - -Promise.prototype.any = function () { - return any(this); -}; - -}; diff --git a/node_modules/bluebird/js/main/assert.js b/node_modules/bluebird/js/main/assert.js deleted file mode 100644 index a98955c4..00000000 --- a/node_modules/bluebird/js/main/assert.js +++ /dev/null @@ -1,55 +0,0 @@ -"use strict"; -module.exports = (function(){ -var AssertionError = (function() { - function AssertionError(a) { - this.constructor$(a); - this.message = a; - this.name = "AssertionError"; - } - AssertionError.prototype = new Error(); - AssertionError.prototype.constructor = AssertionError; - AssertionError.prototype.constructor$ = Error; - return AssertionError; -})(); - -function getParams(args) { - var params = []; - for (var i = 0; i < args.length; ++i) params.push("arg" + i); - return params; -} - -function nativeAssert(callName, args, expect) { - try { - var params = getParams(args); - var constructorArgs = params; - constructorArgs.push("return " + - callName + "("+ params.join(",") + ");"); - var fn = Function.apply(null, constructorArgs); - return fn.apply(null, args); - } catch (e) { - if (!(e instanceof SyntaxError)) { - throw e; - } else { - return expect; - } - } -} - -return function assert(boolExpr, message) { - if (boolExpr === true) return; - - if (typeof boolExpr === "string" && - boolExpr.charAt(0) === "%") { - var nativeCallName = boolExpr; - var $_len = arguments.length;var args = new Array($_len - 2); for(var $_i = 2; $_i < $_len; ++$_i) {args[$_i - 2] = arguments[$_i];} - if (nativeAssert(nativeCallName, args, message) === message) return; - message = (nativeCallName + " !== " + message); - } - - var ret = new AssertionError(message); - if (Error.captureStackTrace) { - Error.captureStackTrace(ret, assert); - } - throw ret; -}; -})(); diff --git a/node_modules/bluebird/js/main/async.js b/node_modules/bluebird/js/main/async.js deleted file mode 100644 index 01044596..00000000 --- a/node_modules/bluebird/js/main/async.js +++ /dev/null @@ -1,150 +0,0 @@ -"use strict"; -var firstLineError; -try {throw new Error(); } catch (e) {firstLineError = e;} -var schedule = require("./schedule.js"); -var Queue = require("./queue.js"); -var util = require("./util.js"); - -function Async() { - this._isTickUsed = false; - this._lateQueue = new Queue(16); - this._normalQueue = new Queue(16); - this._trampolineEnabled = true; - var self = this; - this.drainQueues = function () { - self._drainQueues(); - }; - this._schedule = - schedule.isStatic ? schedule(this.drainQueues) : schedule; -} - -Async.prototype.disableTrampolineIfNecessary = function() { - if (util.hasDevTools) { - this._trampolineEnabled = false; - } -}; - -Async.prototype.enableTrampoline = function() { - if (!this._trampolineEnabled) { - this._trampolineEnabled = true; - this._schedule = function(fn) { - setTimeout(fn, 0); - }; - } -}; - -Async.prototype.haveItemsQueued = function () { - return this._normalQueue.length() > 0; -}; - -Async.prototype.throwLater = function(fn, arg) { - if (arguments.length === 1) { - arg = fn; - fn = function () { throw arg; }; - } - if (typeof setTimeout !== "undefined") { - setTimeout(function() { - fn(arg); - }, 0); - } else try { - this._schedule(function() { - fn(arg); - }); - } catch (e) { - throw new Error("No async scheduler available\u000a\u000a See http://goo.gl/m3OTXk\u000a"); - } -}; - -function AsyncInvokeLater(fn, receiver, arg) { - this._lateQueue.push(fn, receiver, arg); - this._queueTick(); -} - -function AsyncInvoke(fn, receiver, arg) { - this._normalQueue.push(fn, receiver, arg); - this._queueTick(); -} - -function AsyncSettlePromises(promise) { - this._normalQueue._pushOne(promise); - this._queueTick(); -} - -if (!util.hasDevTools) { - Async.prototype.invokeLater = AsyncInvokeLater; - Async.prototype.invoke = AsyncInvoke; - Async.prototype.settlePromises = AsyncSettlePromises; -} else { - if (schedule.isStatic) { - schedule = function(fn) { setTimeout(fn, 0); }; - } - Async.prototype.invokeLater = function (fn, receiver, arg) { - if (this._trampolineEnabled) { - AsyncInvokeLater.call(this, fn, receiver, arg); - } else { - this._schedule(function() { - setTimeout(function() { - fn.call(receiver, arg); - }, 100); - }); - } - }; - - Async.prototype.invoke = function (fn, receiver, arg) { - if (this._trampolineEnabled) { - AsyncInvoke.call(this, fn, receiver, arg); - } else { - this._schedule(function() { - fn.call(receiver, arg); - }); - } - }; - - Async.prototype.settlePromises = function(promise) { - if (this._trampolineEnabled) { - AsyncSettlePromises.call(this, promise); - } else { - this._schedule(function() { - promise._settlePromises(); - }); - } - }; -} - -Async.prototype.invokeFirst = function (fn, receiver, arg) { - this._normalQueue.unshift(fn, receiver, arg); - this._queueTick(); -}; - -Async.prototype._drainQueue = function(queue) { - while (queue.length() > 0) { - var fn = queue.shift(); - if (typeof fn !== "function") { - fn._settlePromises(); - continue; - } - var receiver = queue.shift(); - var arg = queue.shift(); - fn.call(receiver, arg); - } -}; - -Async.prototype._drainQueues = function () { - this._drainQueue(this._normalQueue); - this._reset(); - this._drainQueue(this._lateQueue); -}; - -Async.prototype._queueTick = function () { - if (!this._isTickUsed) { - this._isTickUsed = true; - this._schedule(this.drainQueues); - } -}; - -Async.prototype._reset = function () { - this._isTickUsed = false; -}; - -module.exports = new Async(); -module.exports.firstLineError = firstLineError; diff --git a/node_modules/bluebird/js/main/bind.js b/node_modules/bluebird/js/main/bind.js deleted file mode 100644 index 9d8257ae..00000000 --- a/node_modules/bluebird/js/main/bind.js +++ /dev/null @@ -1,72 +0,0 @@ -"use strict"; -module.exports = function(Promise, INTERNAL, tryConvertToPromise) { -var rejectThis = function(_, e) { - this._reject(e); -}; - -var targetRejected = function(e, context) { - context.promiseRejectionQueued = true; - context.bindingPromise._then(rejectThis, rejectThis, null, this, e); -}; - -var bindingResolved = function(thisArg, context) { - if (this._isPending()) { - this._resolveCallback(context.target); - } -}; - -var bindingRejected = function(e, context) { - if (!context.promiseRejectionQueued) this._reject(e); -}; - -Promise.prototype.bind = function (thisArg) { - var maybePromise = tryConvertToPromise(thisArg); - var ret = new Promise(INTERNAL); - ret._propagateFrom(this, 1); - var target = this._target(); - - ret._setBoundTo(maybePromise); - if (maybePromise instanceof Promise) { - var context = { - promiseRejectionQueued: false, - promise: ret, - target: target, - bindingPromise: maybePromise - }; - target._then(INTERNAL, targetRejected, ret._progress, ret, context); - maybePromise._then( - bindingResolved, bindingRejected, ret._progress, ret, context); - } else { - ret._resolveCallback(target); - } - return ret; -}; - -Promise.prototype._setBoundTo = function (obj) { - if (obj !== undefined) { - this._bitField = this._bitField | 131072; - this._boundTo = obj; - } else { - this._bitField = this._bitField & (~131072); - } -}; - -Promise.prototype._isBound = function () { - return (this._bitField & 131072) === 131072; -}; - -Promise.bind = function (thisArg, value) { - var maybePromise = tryConvertToPromise(thisArg); - var ret = new Promise(INTERNAL); - - ret._setBoundTo(maybePromise); - if (maybePromise instanceof Promise) { - maybePromise._then(function() { - ret._resolveCallback(value); - }, ret._reject, ret._progress, ret, null); - } else { - ret._resolveCallback(value); - } - return ret; -}; -}; diff --git a/node_modules/bluebird/js/main/bluebird.js b/node_modules/bluebird/js/main/bluebird.js deleted file mode 100644 index ed6226e7..00000000 --- a/node_modules/bluebird/js/main/bluebird.js +++ /dev/null @@ -1,11 +0,0 @@ -"use strict"; -var old; -if (typeof Promise !== "undefined") old = Promise; -function noConflict() { - try { if (Promise === bluebird) Promise = old; } - catch (e) {} - return bluebird; -} -var bluebird = require("./promise.js")(); -bluebird.noConflict = noConflict; -module.exports = bluebird; diff --git a/node_modules/bluebird/js/main/call_get.js b/node_modules/bluebird/js/main/call_get.js deleted file mode 100644 index 62c166d5..00000000 --- a/node_modules/bluebird/js/main/call_get.js +++ /dev/null @@ -1,123 +0,0 @@ -"use strict"; -var cr = Object.create; -if (cr) { - var callerCache = cr(null); - var getterCache = cr(null); - callerCache[" size"] = getterCache[" size"] = 0; -} - -module.exports = function(Promise) { -var util = require("./util.js"); -var canEvaluate = util.canEvaluate; -var isIdentifier = util.isIdentifier; - -var getMethodCaller; -var getGetter; -if (!false) { -var makeMethodCaller = function (methodName) { - return new Function("ensureMethod", " \n\ - return function(obj) { \n\ - 'use strict' \n\ - var len = this.length; \n\ - ensureMethod(obj, 'methodName'); \n\ - switch(len) { \n\ - case 1: return obj.methodName(this[0]); \n\ - case 2: return obj.methodName(this[0], this[1]); \n\ - case 3: return obj.methodName(this[0], this[1], this[2]); \n\ - case 0: return obj.methodName(); \n\ - default: \n\ - return obj.methodName.apply(obj, this); \n\ - } \n\ - }; \n\ - ".replace(/methodName/g, methodName))(ensureMethod); -}; - -var makeGetter = function (propertyName) { - return new Function("obj", " \n\ - 'use strict'; \n\ - return obj.propertyName; \n\ - ".replace("propertyName", propertyName)); -}; - -var getCompiled = function(name, compiler, cache) { - var ret = cache[name]; - if (typeof ret !== "function") { - if (!isIdentifier(name)) { - return null; - } - ret = compiler(name); - cache[name] = ret; - cache[" size"]++; - if (cache[" size"] > 512) { - var keys = Object.keys(cache); - for (var i = 0; i < 256; ++i) delete cache[keys[i]]; - cache[" size"] = keys.length - 256; - } - } - return ret; -}; - -getMethodCaller = function(name) { - return getCompiled(name, makeMethodCaller, callerCache); -}; - -getGetter = function(name) { - return getCompiled(name, makeGetter, getterCache); -}; -} - -function ensureMethod(obj, methodName) { - var fn; - if (obj != null) fn = obj[methodName]; - if (typeof fn !== "function") { - var message = "Object " + util.classString(obj) + " has no method '" + - util.toString(methodName) + "'"; - throw new Promise.TypeError(message); - } - return fn; -} - -function caller(obj) { - var methodName = this.pop(); - var fn = ensureMethod(obj, methodName); - return fn.apply(obj, this); -} -Promise.prototype.call = function (methodName) { - var $_len = arguments.length;var args = new Array($_len - 1); for(var $_i = 1; $_i < $_len; ++$_i) {args[$_i - 1] = arguments[$_i];} - if (!false) { - if (canEvaluate) { - var maybeCaller = getMethodCaller(methodName); - if (maybeCaller !== null) { - return this._then( - maybeCaller, undefined, undefined, args, undefined); - } - } - } - args.push(methodName); - return this._then(caller, undefined, undefined, args, undefined); -}; - -function namedGetter(obj) { - return obj[this]; -} -function indexedGetter(obj) { - var index = +this; - if (index < 0) index = Math.max(0, index + obj.length); - return obj[index]; -} -Promise.prototype.get = function (propertyName) { - var isIndex = (typeof propertyName === "number"); - var getter; - if (!isIndex) { - if (canEvaluate) { - var maybeGetter = getGetter(propertyName); - getter = maybeGetter !== null ? maybeGetter : namedGetter; - } else { - getter = namedGetter; - } - } else { - getter = indexedGetter; - } - return this._then(getter, undefined, undefined, propertyName, undefined); -}; -}; diff --git a/node_modules/bluebird/js/main/cancel.js b/node_modules/bluebird/js/main/cancel.js deleted file mode 100644 index 9eb40b6f..00000000 --- a/node_modules/bluebird/js/main/cancel.js +++ /dev/null @@ -1,48 +0,0 @@ -"use strict"; -module.exports = function(Promise) { -var errors = require("./errors.js"); -var async = require("./async.js"); -var CancellationError = errors.CancellationError; - -Promise.prototype._cancel = function (reason) { - if (!this.isCancellable()) return this; - var parent; - var promiseToReject = this; - while ((parent = promiseToReject._cancellationParent) !== undefined && - parent.isCancellable()) { - promiseToReject = parent; - } - this._unsetCancellable(); - promiseToReject._target()._rejectCallback(reason, false, true); -}; - -Promise.prototype.cancel = function (reason) { - if (!this.isCancellable()) return this; - if (reason === undefined) reason = new CancellationError(); - async.invokeLater(this._cancel, this, reason); - return this; -}; - -Promise.prototype.cancellable = function () { - if (this._cancellable()) return this; - async.enableTrampoline(); - this._setCancellable(); - this._cancellationParent = undefined; - return this; -}; - -Promise.prototype.uncancellable = function () { - var ret = this.then(); - ret._unsetCancellable(); - return ret; -}; - -Promise.prototype.fork = function (didFulfill, didReject, didProgress) { - var ret = this._then(didFulfill, didReject, didProgress, - undefined, undefined); - - ret._setCancellable(); - ret._cancellationParent = undefined; - return ret; -}; -}; diff --git a/node_modules/bluebird/js/main/captured_trace.js b/node_modules/bluebird/js/main/captured_trace.js deleted file mode 100644 index 802acd35..00000000 --- a/node_modules/bluebird/js/main/captured_trace.js +++ /dev/null @@ -1,493 +0,0 @@ -"use strict"; -module.exports = function() { -var async = require("./async.js"); -var util = require("./util.js"); -var bluebirdFramePattern = - /[\\\/]bluebird[\\\/]js[\\\/](main|debug|zalgo|instrumented)/; -var stackFramePattern = null; -var formatStack = null; -var indentStackFrames = false; -var warn; - -function CapturedTrace(parent) { - this._parent = parent; - var length = this._length = 1 + (parent === undefined ? 0 : parent._length); - captureStackTrace(this, CapturedTrace); - if (length > 32) this.uncycle(); -} -util.inherits(CapturedTrace, Error); - -CapturedTrace.prototype.uncycle = function() { - var length = this._length; - if (length < 2) return; - var nodes = []; - var stackToIndex = {}; - - for (var i = 0, node = this; node !== undefined; ++i) { - nodes.push(node); - node = node._parent; - } - length = this._length = i; - for (var i = length - 1; i >= 0; --i) { - var stack = nodes[i].stack; - if (stackToIndex[stack] === undefined) { - stackToIndex[stack] = i; - } - } - for (var i = 0; i < length; ++i) { - var currentStack = nodes[i].stack; - var index = stackToIndex[currentStack]; - if (index !== undefined && index !== i) { - if (index > 0) { - nodes[index - 1]._parent = undefined; - nodes[index - 1]._length = 1; - } - nodes[i]._parent = undefined; - nodes[i]._length = 1; - var cycleEdgeNode = i > 0 ? nodes[i - 1] : this; - - if (index < length - 1) { - cycleEdgeNode._parent = nodes[index + 1]; - cycleEdgeNode._parent.uncycle(); - cycleEdgeNode._length = - cycleEdgeNode._parent._length + 1; - } else { - cycleEdgeNode._parent = undefined; - cycleEdgeNode._length = 1; - } - var currentChildLength = cycleEdgeNode._length + 1; - for (var j = i - 2; j >= 0; --j) { - nodes[j]._length = currentChildLength; - currentChildLength++; - } - return; - } - } -}; - -CapturedTrace.prototype.parent = function() { - return this._parent; -}; - -CapturedTrace.prototype.hasParent = function() { - return this._parent !== undefined; -}; - -CapturedTrace.prototype.attachExtraTrace = function(error) { - if (error.__stackCleaned__) return; - this.uncycle(); - var parsed = CapturedTrace.parseStackAndMessage(error); - var message = parsed.message; - var stacks = [parsed.stack]; - - var trace = this; - while (trace !== undefined) { - stacks.push(cleanStack(trace.stack.split("\n"))); - trace = trace._parent; - } - removeCommonRoots(stacks); - removeDuplicateOrEmptyJumps(stacks); - util.notEnumerableProp(error, "stack", reconstructStack(message, stacks)); - util.notEnumerableProp(error, "__stackCleaned__", true); -}; - -function reconstructStack(message, stacks) { - for (var i = 0; i < stacks.length - 1; ++i) { - stacks[i].push("From previous event:"); - stacks[i] = stacks[i].join("\n"); - } - if (i < stacks.length) { - stacks[i] = stacks[i].join("\n"); - } - return message + "\n" + stacks.join("\n"); -} - -function removeDuplicateOrEmptyJumps(stacks) { - for (var i = 0; i < stacks.length; ++i) { - if (stacks[i].length === 0 || - ((i + 1 < stacks.length) && stacks[i][0] === stacks[i+1][0])) { - stacks.splice(i, 1); - i--; - } - } -} - -function removeCommonRoots(stacks) { - var current = stacks[0]; - for (var i = 1; i < stacks.length; ++i) { - var prev = stacks[i]; - var currentLastIndex = current.length - 1; - var currentLastLine = current[currentLastIndex]; - var commonRootMeetPoint = -1; - - for (var j = prev.length - 1; j >= 0; --j) { - if (prev[j] === currentLastLine) { - commonRootMeetPoint = j; - break; - } - } - - for (var j = commonRootMeetPoint; j >= 0; --j) { - var line = prev[j]; - if (current[currentLastIndex] === line) { - current.pop(); - currentLastIndex--; - } else { - break; - } - } - current = prev; - } -} - -function cleanStack(stack) { - var ret = []; - for (var i = 0; i < stack.length; ++i) { - var line = stack[i]; - var isTraceLine = stackFramePattern.test(line) || - " (No stack trace)" === line; - var isInternalFrame = isTraceLine && shouldIgnore(line); - if (isTraceLine && !isInternalFrame) { - if (indentStackFrames && line.charAt(0) !== " ") { - line = " " + line; - } - ret.push(line); - } - } - return ret; -} - -function stackFramesAsArray(error) { - var stack = error.stack.replace(/\s+$/g, "").split("\n"); - for (var i = 0; i < stack.length; ++i) { - var line = stack[i]; - if (" (No stack trace)" === line || stackFramePattern.test(line)) { - break; - } - } - if (i > 0) { - stack = stack.slice(i); - } - return stack; -} - -CapturedTrace.parseStackAndMessage = function(error) { - var stack = error.stack; - var message = error.toString(); - stack = typeof stack === "string" && stack.length > 0 - ? stackFramesAsArray(error) : [" (No stack trace)"]; - return { - message: message, - stack: cleanStack(stack) - }; -}; - -CapturedTrace.formatAndLogError = function(error, title) { - if (typeof console !== "undefined") { - var message; - if (typeof error === "object" || typeof error === "function") { - var stack = error.stack; - message = title + formatStack(stack, error); - } else { - message = title + String(error); - } - if (typeof warn === "function") { - warn(message); - } else if (typeof console.log === "function" || - typeof console.log === "object") { - console.log(message); - } - } -}; - -CapturedTrace.unhandledRejection = function (reason) { - CapturedTrace.formatAndLogError(reason, "^--- With additional stack trace: "); -}; - -CapturedTrace.isSupported = function () { - return typeof captureStackTrace === "function"; -}; - -CapturedTrace.fireRejectionEvent = -function(name, localHandler, reason, promise) { - var localEventFired = false; - try { - if (typeof localHandler === "function") { - localEventFired = true; - if (name === "rejectionHandled") { - localHandler(promise); - } else { - localHandler(reason, promise); - } - } - } catch (e) { - async.throwLater(e); - } - - var globalEventFired = false; - try { - globalEventFired = fireGlobalEvent(name, reason, promise); - } catch (e) { - globalEventFired = true; - async.throwLater(e); - } - - var domEventFired = false; - if (fireDomEvent) { - try { - domEventFired = fireDomEvent(name.toLowerCase(), { - reason: reason, - promise: promise - }); - } catch (e) { - domEventFired = true; - async.throwLater(e); - } - } - - if (!globalEventFired && !localEventFired && !domEventFired && - name === "unhandledRejection") { - CapturedTrace.formatAndLogError(reason, "Unhandled rejection "); - } -}; - -function formatNonError(obj) { - var str; - if (typeof obj === "function") { - str = "[function " + - (obj.name || "anonymous") + - "]"; - } else { - str = obj.toString(); - var ruselessToString = /\[object [a-zA-Z0-9$_]+\]/; - if (ruselessToString.test(str)) { - try { - var newStr = JSON.stringify(obj); - str = newStr; - } - catch(e) { - - } - } - if (str.length === 0) { - str = "(empty array)"; - } - } - return ("(<" + snip(str) + ">, no stack trace)"); -} - -function snip(str) { - var maxChars = 41; - if (str.length < maxChars) { - return str; - } - return str.substr(0, maxChars - 3) + "..."; -} - -var shouldIgnore = function() { return false; }; -var parseLineInfoRegex = /[\/<\(]([^:\/]+):(\d+):(?:\d+)\)?\s*$/; -function parseLineInfo(line) { - var matches = line.match(parseLineInfoRegex); - if (matches) { - return { - fileName: matches[1], - line: parseInt(matches[2], 10) - }; - } -} -CapturedTrace.setBounds = function(firstLineError, lastLineError) { - if (!CapturedTrace.isSupported()) return; - var firstStackLines = firstLineError.stack.split("\n"); - var lastStackLines = lastLineError.stack.split("\n"); - var firstIndex = -1; - var lastIndex = -1; - var firstFileName; - var lastFileName; - for (var i = 0; i < firstStackLines.length; ++i) { - var result = parseLineInfo(firstStackLines[i]); - if (result) { - firstFileName = result.fileName; - firstIndex = result.line; - break; - } - } - for (var i = 0; i < lastStackLines.length; ++i) { - var result = parseLineInfo(lastStackLines[i]); - if (result) { - lastFileName = result.fileName; - lastIndex = result.line; - break; - } - } - if (firstIndex < 0 || lastIndex < 0 || !firstFileName || !lastFileName || - firstFileName !== lastFileName || firstIndex >= lastIndex) { - return; - } - - shouldIgnore = function(line) { - if (bluebirdFramePattern.test(line)) return true; - var info = parseLineInfo(line); - if (info) { - if (info.fileName === firstFileName && - (firstIndex <= info.line && info.line <= lastIndex)) { - return true; - } - } - return false; - }; -}; - -var captureStackTrace = (function stackDetection() { - var v8stackFramePattern = /^\s*at\s*/; - var v8stackFormatter = function(stack, error) { - if (typeof stack === "string") return stack; - - if (error.name !== undefined && - error.message !== undefined) { - return error.toString(); - } - return formatNonError(error); - }; - - if (typeof Error.stackTraceLimit === "number" && - typeof Error.captureStackTrace === "function") { - Error.stackTraceLimit = Error.stackTraceLimit + 6; - stackFramePattern = v8stackFramePattern; - formatStack = v8stackFormatter; - var captureStackTrace = Error.captureStackTrace; - - shouldIgnore = function(line) { - return bluebirdFramePattern.test(line); - }; - return function(receiver, ignoreUntil) { - Error.stackTraceLimit = Error.stackTraceLimit + 6; - captureStackTrace(receiver, ignoreUntil); - Error.stackTraceLimit = Error.stackTraceLimit - 6; - }; - } - var err = new Error(); - - if (typeof err.stack === "string" && - err.stack.split("\n")[0].indexOf("stackDetection@") >= 0) { - stackFramePattern = /@/; - formatStack = v8stackFormatter; - indentStackFrames = true; - return function captureStackTrace(o) { - o.stack = new Error().stack; - }; - } - - var hasStackAfterThrow; - try { throw new Error(); } - catch(e) { - hasStackAfterThrow = ("stack" in e); - } - if (!("stack" in err) && hasStackAfterThrow && - typeof Error.stackTraceLimit === "number") { - stackFramePattern = v8stackFramePattern; - formatStack = v8stackFormatter; - return function captureStackTrace(o) { - Error.stackTraceLimit = Error.stackTraceLimit + 6; - try { throw new Error(); } - catch(e) { o.stack = e.stack; } - Error.stackTraceLimit = Error.stackTraceLimit - 6; - }; - } - - formatStack = function(stack, error) { - if (typeof stack === "string") return stack; - - if ((typeof error === "object" || - typeof error === "function") && - error.name !== undefined && - error.message !== undefined) { - return error.toString(); - } - return formatNonError(error); - }; - - return null; - -})([]); - -var fireDomEvent; -var fireGlobalEvent = (function() { - if (util.isNode) { - return function(name, reason, promise) { - if (name === "rejectionHandled") { - return process.emit(name, promise); - } else { - return process.emit(name, reason, promise); - } - }; - } else { - var customEventWorks = false; - var anyEventWorks = true; - try { - var ev = new self.CustomEvent("test"); - customEventWorks = ev instanceof CustomEvent; - } catch (e) {} - if (!customEventWorks) { - try { - var event = document.createEvent("CustomEvent"); - event.initCustomEvent("testingtheevent", false, true, {}); - self.dispatchEvent(event); - } catch (e) { - anyEventWorks = false; - } - } - if (anyEventWorks) { - fireDomEvent = function(type, detail) { - var event; - if (customEventWorks) { - event = new self.CustomEvent(type, { - detail: detail, - bubbles: false, - cancelable: true - }); - } else if (self.dispatchEvent) { - event = document.createEvent("CustomEvent"); - event.initCustomEvent(type, false, true, detail); - } - - return event ? !self.dispatchEvent(event) : false; - }; - } - - var toWindowMethodNameMap = {}; - toWindowMethodNameMap["unhandledRejection"] = ("on" + - "unhandledRejection").toLowerCase(); - toWindowMethodNameMap["rejectionHandled"] = ("on" + - "rejectionHandled").toLowerCase(); - - return function(name, reason, promise) { - var methodName = toWindowMethodNameMap[name]; - var method = self[methodName]; - if (!method) return false; - if (name === "rejectionHandled") { - method.call(self, promise); - } else { - method.call(self, reason, promise); - } - return true; - }; - } -})(); - -if (typeof console !== "undefined" && typeof console.warn !== "undefined") { - warn = function (message) { - console.warn(message); - }; - if (util.isNode && process.stderr.isTTY) { - warn = function(message) { - process.stderr.write("\u001b[31m" + message + "\u001b[39m\n"); - }; - } else if (!util.isNode && typeof (new Error().stack) === "string") { - warn = function(message) { - console.warn("%c" + message, "color: red"); - }; - } -} - -return CapturedTrace; -}; diff --git a/node_modules/bluebird/js/main/catch_filter.js b/node_modules/bluebird/js/main/catch_filter.js deleted file mode 100644 index df127333..00000000 --- a/node_modules/bluebird/js/main/catch_filter.js +++ /dev/null @@ -1,66 +0,0 @@ -"use strict"; -module.exports = function(NEXT_FILTER) { -var util = require("./util.js"); -var errors = require("./errors.js"); -var tryCatch = util.tryCatch; -var errorObj = util.errorObj; -var keys = require("./es5.js").keys; -var TypeError = errors.TypeError; - -function CatchFilter(instances, callback, promise) { - this._instances = instances; - this._callback = callback; - this._promise = promise; -} - -function safePredicate(predicate, e) { - var safeObject = {}; - var retfilter = tryCatch(predicate).call(safeObject, e); - - if (retfilter === errorObj) return retfilter; - - var safeKeys = keys(safeObject); - if (safeKeys.length) { - errorObj.e = new TypeError("Catch filter must inherit from Error or be a simple predicate function\u000a\u000a See http://goo.gl/o84o68\u000a"); - return errorObj; - } - return retfilter; -} - -CatchFilter.prototype.doFilter = function (e) { - var cb = this._callback; - var promise = this._promise; - var boundTo = promise._boundValue(); - for (var i = 0, len = this._instances.length; i < len; ++i) { - var item = this._instances[i]; - var itemIsErrorType = item === Error || - (item != null && item.prototype instanceof Error); - - if (itemIsErrorType && e instanceof item) { - var ret = tryCatch(cb).call(boundTo, e); - if (ret === errorObj) { - NEXT_FILTER.e = ret.e; - return NEXT_FILTER; - } - return ret; - } else if (typeof item === "function" && !itemIsErrorType) { - var shouldHandle = safePredicate(item, e); - if (shouldHandle === errorObj) { - e = errorObj.e; - break; - } else if (shouldHandle) { - var ret = tryCatch(cb).call(boundTo, e); - if (ret === errorObj) { - NEXT_FILTER.e = ret.e; - return NEXT_FILTER; - } - return ret; - } - } - } - NEXT_FILTER.e = e; - return NEXT_FILTER; -}; - -return CatchFilter; -}; diff --git a/node_modules/bluebird/js/main/context.js b/node_modules/bluebird/js/main/context.js deleted file mode 100644 index ccd7702b..00000000 --- a/node_modules/bluebird/js/main/context.js +++ /dev/null @@ -1,38 +0,0 @@ -"use strict"; -module.exports = function(Promise, CapturedTrace, isDebugging) { -var contextStack = []; -function Context() { - this._trace = new CapturedTrace(peekContext()); -} -Context.prototype._pushContext = function () { - if (!isDebugging()) return; - if (this._trace !== undefined) { - contextStack.push(this._trace); - } -}; - -Context.prototype._popContext = function () { - if (!isDebugging()) return; - if (this._trace !== undefined) { - contextStack.pop(); - } -}; - -function createContext() { - if (isDebugging()) return new Context(); -} - -function peekContext() { - var lastIndex = contextStack.length - 1; - if (lastIndex >= 0) { - return contextStack[lastIndex]; - } - return undefined; -} - -Promise.prototype._peekContext = peekContext; -Promise.prototype._pushContext = Context.prototype._pushContext; -Promise.prototype._popContext = Context.prototype._popContext; - -return createContext; -}; diff --git a/node_modules/bluebird/js/main/debuggability.js b/node_modules/bluebird/js/main/debuggability.js deleted file mode 100644 index 106baf65..00000000 --- a/node_modules/bluebird/js/main/debuggability.js +++ /dev/null @@ -1,162 +0,0 @@ -"use strict"; -module.exports = function(Promise, CapturedTrace) { -var getDomain = Promise._getDomain; -var async = require("./async.js"); -var Warning = require("./errors.js").Warning; -var util = require("./util.js"); -var canAttachTrace = util.canAttachTrace; -var unhandledRejectionHandled; -var possiblyUnhandledRejection; -var debugging = false || (util.isNode && - (!!process.env["BLUEBIRD_DEBUG"] || - process.env["NODE_ENV"] === "development")); - -if (util.isNode && process.env["BLUEBIRD_DEBUG"] == 0) debugging = false; - -if (debugging) { - async.disableTrampolineIfNecessary(); -} - -Promise.prototype._ignoreRejections = function() { - this._unsetRejectionIsUnhandled(); - this._bitField = this._bitField | 16777216; -}; - -Promise.prototype._ensurePossibleRejectionHandled = function () { - if ((this._bitField & 16777216) !== 0) return; - this._setRejectionIsUnhandled(); - async.invokeLater(this._notifyUnhandledRejection, this, undefined); -}; - -Promise.prototype._notifyUnhandledRejectionIsHandled = function () { - CapturedTrace.fireRejectionEvent("rejectionHandled", - unhandledRejectionHandled, undefined, this); -}; - -Promise.prototype._notifyUnhandledRejection = function () { - if (this._isRejectionUnhandled()) { - var reason = this._getCarriedStackTrace() || this._settledValue; - this._setUnhandledRejectionIsNotified(); - CapturedTrace.fireRejectionEvent("unhandledRejection", - possiblyUnhandledRejection, reason, this); - } -}; - -Promise.prototype._setUnhandledRejectionIsNotified = function () { - this._bitField = this._bitField | 524288; -}; - -Promise.prototype._unsetUnhandledRejectionIsNotified = function () { - this._bitField = this._bitField & (~524288); -}; - -Promise.prototype._isUnhandledRejectionNotified = function () { - return (this._bitField & 524288) > 0; -}; - -Promise.prototype._setRejectionIsUnhandled = function () { - this._bitField = this._bitField | 2097152; -}; - -Promise.prototype._unsetRejectionIsUnhandled = function () { - this._bitField = this._bitField & (~2097152); - if (this._isUnhandledRejectionNotified()) { - this._unsetUnhandledRejectionIsNotified(); - this._notifyUnhandledRejectionIsHandled(); - } -}; - -Promise.prototype._isRejectionUnhandled = function () { - return (this._bitField & 2097152) > 0; -}; - -Promise.prototype._setCarriedStackTrace = function (capturedTrace) { - this._bitField = this._bitField | 1048576; - this._fulfillmentHandler0 = capturedTrace; -}; - -Promise.prototype._isCarryingStackTrace = function () { - return (this._bitField & 1048576) > 0; -}; - -Promise.prototype._getCarriedStackTrace = function () { - return this._isCarryingStackTrace() - ? this._fulfillmentHandler0 - : undefined; -}; - -Promise.prototype._captureStackTrace = function () { - if (debugging) { - this._trace = new CapturedTrace(this._peekContext()); - } - return this; -}; - -Promise.prototype._attachExtraTrace = function (error, ignoreSelf) { - if (debugging && canAttachTrace(error)) { - var trace = this._trace; - if (trace !== undefined) { - if (ignoreSelf) trace = trace._parent; - } - if (trace !== undefined) { - trace.attachExtraTrace(error); - } else if (!error.__stackCleaned__) { - var parsed = CapturedTrace.parseStackAndMessage(error); - util.notEnumerableProp(error, "stack", - parsed.message + "\n" + parsed.stack.join("\n")); - util.notEnumerableProp(error, "__stackCleaned__", true); - } - } -}; - -Promise.prototype._warn = function(message) { - var warning = new Warning(message); - var ctx = this._peekContext(); - if (ctx) { - ctx.attachExtraTrace(warning); - } else { - var parsed = CapturedTrace.parseStackAndMessage(warning); - warning.stack = parsed.message + "\n" + parsed.stack.join("\n"); - } - CapturedTrace.formatAndLogError(warning, ""); -}; - -Promise.onPossiblyUnhandledRejection = function (fn) { - var domain = getDomain(); - possiblyUnhandledRejection = - typeof fn === "function" ? (domain === null ? fn : domain.bind(fn)) - : undefined; -}; - -Promise.onUnhandledRejectionHandled = function (fn) { - var domain = getDomain(); - unhandledRejectionHandled = - typeof fn === "function" ? (domain === null ? fn : domain.bind(fn)) - : undefined; -}; - -Promise.longStackTraces = function () { - if (async.haveItemsQueued() && - debugging === false - ) { - throw new Error("cannot enable long stack traces after promises have been created\u000a\u000a See http://goo.gl/DT1qyG\u000a"); - } - debugging = CapturedTrace.isSupported(); - if (debugging) { - async.disableTrampolineIfNecessary(); - } -}; - -Promise.hasLongStackTraces = function () { - return debugging && CapturedTrace.isSupported(); -}; - -if (!CapturedTrace.isSupported()) { - Promise.longStackTraces = function(){}; - debugging = false; -} - -return function() { - return debugging; -}; -}; diff --git a/node_modules/bluebird/js/main/direct_resolve.js b/node_modules/bluebird/js/main/direct_resolve.js deleted file mode 100644 index 054685a1..00000000 --- a/node_modules/bluebird/js/main/direct_resolve.js +++ /dev/null @@ -1,63 +0,0 @@ -"use strict"; -var util = require("./util.js"); -var isPrimitive = util.isPrimitive; - -module.exports = function(Promise) { -var returner = function () { - return this; -}; -var thrower = function () { - throw this; -}; -var returnUndefined = function() {}; -var throwUndefined = function() { - throw undefined; -}; - -var wrapper = function (value, action) { - if (action === 1) { - return function () { - throw value; - }; - } else if (action === 2) { - return function () { - return value; - }; - } -}; - - -Promise.prototype["return"] = -Promise.prototype.thenReturn = function (value) { - if (value === undefined) return this.then(returnUndefined); - - if (isPrimitive(value)) { - return this._then( - wrapper(value, 2), - undefined, - undefined, - undefined, - undefined - ); - } else if (value instanceof Promise) { - value._ignoreRejections(); - } - return this._then(returner, undefined, undefined, value, undefined); -}; - -Promise.prototype["throw"] = -Promise.prototype.thenThrow = function (reason) { - if (reason === undefined) return this.then(throwUndefined); - - if (isPrimitive(reason)) { - return this._then( - wrapper(reason, 1), - undefined, - undefined, - undefined, - undefined - ); - } - return this._then(thrower, undefined, undefined, reason, undefined); -}; -}; diff --git a/node_modules/bluebird/js/main/each.js b/node_modules/bluebird/js/main/each.js deleted file mode 100644 index a37e22c0..00000000 --- a/node_modules/bluebird/js/main/each.js +++ /dev/null @@ -1,12 +0,0 @@ -"use strict"; -module.exports = function(Promise, INTERNAL) { -var PromiseReduce = Promise.reduce; - -Promise.prototype.each = function (fn) { - return PromiseReduce(this, fn, null, INTERNAL); -}; - -Promise.each = function (promises, fn) { - return PromiseReduce(promises, fn, null, INTERNAL); -}; -}; diff --git a/node_modules/bluebird/js/main/errors.js b/node_modules/bluebird/js/main/errors.js deleted file mode 100644 index c334bb1c..00000000 --- a/node_modules/bluebird/js/main/errors.js +++ /dev/null @@ -1,111 +0,0 @@ -"use strict"; -var es5 = require("./es5.js"); -var Objectfreeze = es5.freeze; -var util = require("./util.js"); -var inherits = util.inherits; -var notEnumerableProp = util.notEnumerableProp; - -function subError(nameProperty, defaultMessage) { - function SubError(message) { - if (!(this instanceof SubError)) return new SubError(message); - notEnumerableProp(this, "message", - typeof message === "string" ? message : defaultMessage); - notEnumerableProp(this, "name", nameProperty); - if (Error.captureStackTrace) { - Error.captureStackTrace(this, this.constructor); - } else { - Error.call(this); - } - } - inherits(SubError, Error); - return SubError; -} - -var _TypeError, _RangeError; -var Warning = subError("Warning", "warning"); -var CancellationError = subError("CancellationError", "cancellation error"); -var TimeoutError = subError("TimeoutError", "timeout error"); -var AggregateError = subError("AggregateError", "aggregate error"); -try { - _TypeError = TypeError; - _RangeError = RangeError; -} catch(e) { - _TypeError = subError("TypeError", "type error"); - _RangeError = subError("RangeError", "range error"); -} - -var methods = ("join pop push shift unshift slice filter forEach some " + - "every map indexOf lastIndexOf reduce reduceRight sort reverse").split(" "); - -for (var i = 0; i < methods.length; ++i) { - if (typeof Array.prototype[methods[i]] === "function") { - AggregateError.prototype[methods[i]] = Array.prototype[methods[i]]; - } -} - -es5.defineProperty(AggregateError.prototype, "length", { - value: 0, - configurable: false, - writable: true, - enumerable: true -}); -AggregateError.prototype["isOperational"] = true; -var level = 0; -AggregateError.prototype.toString = function() { - var indent = Array(level * 4 + 1).join(" "); - var ret = "\n" + indent + "AggregateError of:" + "\n"; - level++; - indent = Array(level * 4 + 1).join(" "); - for (var i = 0; i < this.length; ++i) { - var str = this[i] === this ? "[Circular AggregateError]" : this[i] + ""; - var lines = str.split("\n"); - for (var j = 0; j < lines.length; ++j) { - lines[j] = indent + lines[j]; - } - str = lines.join("\n"); - ret += str + "\n"; - } - level--; - return ret; -}; - -function OperationalError(message) { - if (!(this instanceof OperationalError)) - return new OperationalError(message); - notEnumerableProp(this, "name", "OperationalError"); - notEnumerableProp(this, "message", message); - this.cause = message; - this["isOperational"] = true; - - if (message instanceof Error) { - notEnumerableProp(this, "message", message.message); - notEnumerableProp(this, "stack", message.stack); - } else if (Error.captureStackTrace) { - Error.captureStackTrace(this, this.constructor); - } - -} -inherits(OperationalError, Error); - -var errorTypes = Error["__BluebirdErrorTypes__"]; -if (!errorTypes) { - errorTypes = Objectfreeze({ - CancellationError: CancellationError, - TimeoutError: TimeoutError, - OperationalError: OperationalError, - RejectionError: OperationalError, - AggregateError: AggregateError - }); - notEnumerableProp(Error, "__BluebirdErrorTypes__", errorTypes); -} - -module.exports = { - Error: Error, - TypeError: _TypeError, - RangeError: _RangeError, - CancellationError: errorTypes.CancellationError, - OperationalError: errorTypes.OperationalError, - TimeoutError: errorTypes.TimeoutError, - AggregateError: errorTypes.AggregateError, - Warning: Warning -}; diff --git a/node_modules/bluebird/js/main/es5.js b/node_modules/bluebird/js/main/es5.js deleted file mode 100644 index ea41d5a5..00000000 --- a/node_modules/bluebird/js/main/es5.js +++ /dev/null @@ -1,80 +0,0 @@ -var isES5 = (function(){ - "use strict"; - return this === undefined; -})(); - -if (isES5) { - module.exports = { - freeze: Object.freeze, - defineProperty: Object.defineProperty, - getDescriptor: Object.getOwnPropertyDescriptor, - keys: Object.keys, - names: Object.getOwnPropertyNames, - getPrototypeOf: Object.getPrototypeOf, - isArray: Array.isArray, - isES5: isES5, - propertyIsWritable: function(obj, prop) { - var descriptor = Object.getOwnPropertyDescriptor(obj, prop); - return !!(!descriptor || descriptor.writable || descriptor.set); - } - }; -} else { - var has = {}.hasOwnProperty; - var str = {}.toString; - var proto = {}.constructor.prototype; - - var ObjectKeys = function (o) { - var ret = []; - for (var key in o) { - if (has.call(o, key)) { - ret.push(key); - } - } - return ret; - }; - - var ObjectGetDescriptor = function(o, key) { - return {value: o[key]}; - }; - - var ObjectDefineProperty = function (o, key, desc) { - o[key] = desc.value; - return o; - }; - - var ObjectFreeze = function (obj) { - return obj; - }; - - var ObjectGetPrototypeOf = function (obj) { - try { - return Object(obj).constructor.prototype; - } - catch (e) { - return proto; - } - }; - - var ArrayIsArray = function (obj) { - try { - return str.call(obj) === "[object Array]"; - } - catch(e) { - return false; - } - }; - - module.exports = { - isArray: ArrayIsArray, - keys: ObjectKeys, - names: ObjectKeys, - defineProperty: ObjectDefineProperty, - getDescriptor: ObjectGetDescriptor, - freeze: ObjectFreeze, - getPrototypeOf: ObjectGetPrototypeOf, - isES5: isES5, - propertyIsWritable: function() { - return true; - } - }; -} diff --git a/node_modules/bluebird/js/main/filter.js b/node_modules/bluebird/js/main/filter.js deleted file mode 100644 index ed57bf01..00000000 --- a/node_modules/bluebird/js/main/filter.js +++ /dev/null @@ -1,12 +0,0 @@ -"use strict"; -module.exports = function(Promise, INTERNAL) { -var PromiseMap = Promise.map; - -Promise.prototype.filter = function (fn, options) { - return PromiseMap(this, fn, options, INTERNAL); -}; - -Promise.filter = function (promises, fn, options) { - return PromiseMap(promises, fn, options, INTERNAL); -}; -}; diff --git a/node_modules/bluebird/js/main/finally.js b/node_modules/bluebird/js/main/finally.js deleted file mode 100644 index c9342bcf..00000000 --- a/node_modules/bluebird/js/main/finally.js +++ /dev/null @@ -1,98 +0,0 @@ -"use strict"; -module.exports = function(Promise, NEXT_FILTER, tryConvertToPromise) { -var util = require("./util.js"); -var isPrimitive = util.isPrimitive; -var thrower = util.thrower; - -function returnThis() { - return this; -} -function throwThis() { - throw this; -} -function return$(r) { - return function() { - return r; - }; -} -function throw$(r) { - return function() { - throw r; - }; -} -function promisedFinally(ret, reasonOrValue, isFulfilled) { - var then; - if (isPrimitive(reasonOrValue)) { - then = isFulfilled ? return$(reasonOrValue) : throw$(reasonOrValue); - } else { - then = isFulfilled ? returnThis : throwThis; - } - return ret._then(then, thrower, undefined, reasonOrValue, undefined); -} - -function finallyHandler(reasonOrValue) { - var promise = this.promise; - var handler = this.handler; - - var ret = promise._isBound() - ? handler.call(promise._boundValue()) - : handler(); - - if (ret !== undefined) { - var maybePromise = tryConvertToPromise(ret, promise); - if (maybePromise instanceof Promise) { - maybePromise = maybePromise._target(); - return promisedFinally(maybePromise, reasonOrValue, - promise.isFulfilled()); - } - } - - if (promise.isRejected()) { - NEXT_FILTER.e = reasonOrValue; - return NEXT_FILTER; - } else { - return reasonOrValue; - } -} - -function tapHandler(value) { - var promise = this.promise; - var handler = this.handler; - - var ret = promise._isBound() - ? handler.call(promise._boundValue(), value) - : handler(value); - - if (ret !== undefined) { - var maybePromise = tryConvertToPromise(ret, promise); - if (maybePromise instanceof Promise) { - maybePromise = maybePromise._target(); - return promisedFinally(maybePromise, value, true); - } - } - return value; -} - -Promise.prototype._passThroughHandler = function (handler, isFinally) { - if (typeof handler !== "function") return this.then(); - - var promiseAndHandler = { - promise: this, - handler: handler - }; - - return this._then( - isFinally ? finallyHandler : tapHandler, - isFinally ? finallyHandler : undefined, undefined, - promiseAndHandler, undefined); -}; - -Promise.prototype.lastly = -Promise.prototype["finally"] = function (handler) { - return this._passThroughHandler(handler, true); -}; - -Promise.prototype.tap = function (handler) { - return this._passThroughHandler(handler, false); -}; -}; diff --git a/node_modules/bluebird/js/main/generators.js b/node_modules/bluebird/js/main/generators.js deleted file mode 100644 index 4c0568d2..00000000 --- a/node_modules/bluebird/js/main/generators.js +++ /dev/null @@ -1,136 +0,0 @@ -"use strict"; -module.exports = function(Promise, - apiRejection, - INTERNAL, - tryConvertToPromise) { -var errors = require("./errors.js"); -var TypeError = errors.TypeError; -var util = require("./util.js"); -var errorObj = util.errorObj; -var tryCatch = util.tryCatch; -var yieldHandlers = []; - -function promiseFromYieldHandler(value, yieldHandlers, traceParent) { - for (var i = 0; i < yieldHandlers.length; ++i) { - traceParent._pushContext(); - var result = tryCatch(yieldHandlers[i])(value); - traceParent._popContext(); - if (result === errorObj) { - traceParent._pushContext(); - var ret = Promise.reject(errorObj.e); - traceParent._popContext(); - return ret; - } - var maybePromise = tryConvertToPromise(result, traceParent); - if (maybePromise instanceof Promise) return maybePromise; - } - return null; -} - -function PromiseSpawn(generatorFunction, receiver, yieldHandler, stack) { - var promise = this._promise = new Promise(INTERNAL); - promise._captureStackTrace(); - this._stack = stack; - this._generatorFunction = generatorFunction; - this._receiver = receiver; - this._generator = undefined; - this._yieldHandlers = typeof yieldHandler === "function" - ? [yieldHandler].concat(yieldHandlers) - : yieldHandlers; -} - -PromiseSpawn.prototype.promise = function () { - return this._promise; -}; - -PromiseSpawn.prototype._run = function () { - this._generator = this._generatorFunction.call(this._receiver); - this._receiver = - this._generatorFunction = undefined; - this._next(undefined); -}; - -PromiseSpawn.prototype._continue = function (result) { - if (result === errorObj) { - return this._promise._rejectCallback(result.e, false, true); - } - - var value = result.value; - if (result.done === true) { - this._promise._resolveCallback(value); - } else { - var maybePromise = tryConvertToPromise(value, this._promise); - if (!(maybePromise instanceof Promise)) { - maybePromise = - promiseFromYieldHandler(maybePromise, - this._yieldHandlers, - this._promise); - if (maybePromise === null) { - this._throw( - new TypeError( - "A value %s was yielded that could not be treated as a promise\u000a\u000a See http://goo.gl/4Y4pDk\u000a\u000a".replace("%s", value) + - "From coroutine:\u000a" + - this._stack.split("\n").slice(1, -7).join("\n") - ) - ); - return; - } - } - maybePromise._then( - this._next, - this._throw, - undefined, - this, - null - ); - } -}; - -PromiseSpawn.prototype._throw = function (reason) { - this._promise._attachExtraTrace(reason); - this._promise._pushContext(); - var result = tryCatch(this._generator["throw"]) - .call(this._generator, reason); - this._promise._popContext(); - this._continue(result); -}; - -PromiseSpawn.prototype._next = function (value) { - this._promise._pushContext(); - var result = tryCatch(this._generator.next).call(this._generator, value); - this._promise._popContext(); - this._continue(result); -}; - -Promise.coroutine = function (generatorFunction, options) { - if (typeof generatorFunction !== "function") { - throw new TypeError("generatorFunction must be a function\u000a\u000a See http://goo.gl/6Vqhm0\u000a"); - } - var yieldHandler = Object(options).yieldHandler; - var PromiseSpawn$ = PromiseSpawn; - var stack = new Error().stack; - return function () { - var generator = generatorFunction.apply(this, arguments); - var spawn = new PromiseSpawn$(undefined, undefined, yieldHandler, - stack); - spawn._generator = generator; - spawn._next(undefined); - return spawn.promise(); - }; -}; - -Promise.coroutine.addYieldHandler = function(fn) { - if (typeof fn !== "function") throw new TypeError("fn must be a function\u000a\u000a See http://goo.gl/916lJJ\u000a"); - yieldHandlers.push(fn); -}; - -Promise.spawn = function (generatorFunction) { - if (typeof generatorFunction !== "function") { - return apiRejection("generatorFunction must be a function\u000a\u000a See http://goo.gl/6Vqhm0\u000a"); - } - var spawn = new PromiseSpawn(generatorFunction, this); - var ret = spawn.promise(); - spawn._run(Promise.spawn); - return ret; -}; -}; diff --git a/node_modules/bluebird/js/main/join.js b/node_modules/bluebird/js/main/join.js deleted file mode 100644 index cf33eb1d..00000000 --- a/node_modules/bluebird/js/main/join.js +++ /dev/null @@ -1,107 +0,0 @@ -"use strict"; -module.exports = -function(Promise, PromiseArray, tryConvertToPromise, INTERNAL) { -var util = require("./util.js"); -var canEvaluate = util.canEvaluate; -var tryCatch = util.tryCatch; -var errorObj = util.errorObj; -var reject; - -if (!false) { -if (canEvaluate) { - var thenCallback = function(i) { - return new Function("value", "holder", " \n\ - 'use strict'; \n\ - holder.pIndex = value; \n\ - holder.checkFulfillment(this); \n\ - ".replace(/Index/g, i)); - }; - - var caller = function(count) { - var values = []; - for (var i = 1; i <= count; ++i) values.push("holder.p" + i); - return new Function("holder", " \n\ - 'use strict'; \n\ - var callback = holder.fn; \n\ - return callback(values); \n\ - ".replace(/values/g, values.join(", "))); - }; - var thenCallbacks = []; - var callers = [undefined]; - for (var i = 1; i <= 5; ++i) { - thenCallbacks.push(thenCallback(i)); - callers.push(caller(i)); - } - - var Holder = function(total, fn) { - this.p1 = this.p2 = this.p3 = this.p4 = this.p5 = null; - this.fn = fn; - this.total = total; - this.now = 0; - }; - - Holder.prototype.callers = callers; - Holder.prototype.checkFulfillment = function(promise) { - var now = this.now; - now++; - var total = this.total; - if (now >= total) { - var handler = this.callers[total]; - promise._pushContext(); - var ret = tryCatch(handler)(this); - promise._popContext(); - if (ret === errorObj) { - promise._rejectCallback(ret.e, false, true); - } else { - promise._resolveCallback(ret); - } - } else { - this.now = now; - } - }; - - var reject = function (reason) { - this._reject(reason); - }; -} -} - -Promise.join = function () { - var last = arguments.length - 1; - var fn; - if (last > 0 && typeof arguments[last] === "function") { - fn = arguments[last]; - if (!false) { - if (last < 6 && canEvaluate) { - var ret = new Promise(INTERNAL); - ret._captureStackTrace(); - var holder = new Holder(last, fn); - var callbacks = thenCallbacks; - for (var i = 0; i < last; ++i) { - var maybePromise = tryConvertToPromise(arguments[i], ret); - if (maybePromise instanceof Promise) { - maybePromise = maybePromise._target(); - if (maybePromise._isPending()) { - maybePromise._then(callbacks[i], reject, - undefined, ret, holder); - } else if (maybePromise._isFulfilled()) { - callbacks[i].call(ret, - maybePromise._value(), holder); - } else { - ret._reject(maybePromise._reason()); - } - } else { - callbacks[i].call(ret, maybePromise, holder); - } - } - return ret; - } - } - } - var $_len = arguments.length;var args = new Array($_len); for(var $_i = 0; $_i < $_len; ++$_i) {args[$_i] = arguments[$_i];} - if (fn) args.pop(); - var ret = new PromiseArray(args).promise(); - return fn !== undefined ? ret.spread(fn) : ret; -}; - -}; diff --git a/node_modules/bluebird/js/main/map.js b/node_modules/bluebird/js/main/map.js deleted file mode 100644 index 2f40efd2..00000000 --- a/node_modules/bluebird/js/main/map.js +++ /dev/null @@ -1,133 +0,0 @@ -"use strict"; -module.exports = function(Promise, - PromiseArray, - apiRejection, - tryConvertToPromise, - INTERNAL) { -var getDomain = Promise._getDomain; -var async = require("./async.js"); -var util = require("./util.js"); -var tryCatch = util.tryCatch; -var errorObj = util.errorObj; -var PENDING = {}; -var EMPTY_ARRAY = []; - -function MappingPromiseArray(promises, fn, limit, _filter) { - this.constructor$(promises); - this._promise._captureStackTrace(); - var domain = getDomain(); - this._callback = domain === null ? fn : domain.bind(fn); - this._preservedValues = _filter === INTERNAL - ? new Array(this.length()) - : null; - this._limit = limit; - this._inFlight = 0; - this._queue = limit >= 1 ? [] : EMPTY_ARRAY; - async.invoke(init, this, undefined); -} -util.inherits(MappingPromiseArray, PromiseArray); -function init() {this._init$(undefined, -2);} - -MappingPromiseArray.prototype._init = function () {}; - -MappingPromiseArray.prototype._promiseFulfilled = function (value, index) { - var values = this._values; - var length = this.length(); - var preservedValues = this._preservedValues; - var limit = this._limit; - if (values[index] === PENDING) { - values[index] = value; - if (limit >= 1) { - this._inFlight--; - this._drainQueue(); - if (this._isResolved()) return; - } - } else { - if (limit >= 1 && this._inFlight >= limit) { - values[index] = value; - this._queue.push(index); - return; - } - if (preservedValues !== null) preservedValues[index] = value; - - var callback = this._callback; - var receiver = this._promise._boundValue(); - this._promise._pushContext(); - var ret = tryCatch(callback).call(receiver, value, index, length); - this._promise._popContext(); - if (ret === errorObj) return this._reject(ret.e); - - var maybePromise = tryConvertToPromise(ret, this._promise); - if (maybePromise instanceof Promise) { - maybePromise = maybePromise._target(); - if (maybePromise._isPending()) { - if (limit >= 1) this._inFlight++; - values[index] = PENDING; - return maybePromise._proxyPromiseArray(this, index); - } else if (maybePromise._isFulfilled()) { - ret = maybePromise._value(); - } else { - return this._reject(maybePromise._reason()); - } - } - values[index] = ret; - } - var totalResolved = ++this._totalResolved; - if (totalResolved >= length) { - if (preservedValues !== null) { - this._filter(values, preservedValues); - } else { - this._resolve(values); - } - - } -}; - -MappingPromiseArray.prototype._drainQueue = function () { - var queue = this._queue; - var limit = this._limit; - var values = this._values; - while (queue.length > 0 && this._inFlight < limit) { - if (this._isResolved()) return; - var index = queue.pop(); - this._promiseFulfilled(values[index], index); - } -}; - -MappingPromiseArray.prototype._filter = function (booleans, values) { - var len = values.length; - var ret = new Array(len); - var j = 0; - for (var i = 0; i < len; ++i) { - if (booleans[i]) ret[j++] = values[i]; - } - ret.length = j; - this._resolve(ret); -}; - -MappingPromiseArray.prototype.preservedValues = function () { - return this._preservedValues; -}; - -function map(promises, fn, options, _filter) { - var limit = typeof options === "object" && options !== null - ? options.concurrency - : 0; - limit = typeof limit === "number" && - isFinite(limit) && limit >= 1 ? limit : 0; - return new MappingPromiseArray(promises, fn, limit, _filter); -} - -Promise.prototype.map = function (fn, options) { - if (typeof fn !== "function") return apiRejection("fn must be a function\u000a\u000a See http://goo.gl/916lJJ\u000a"); - - return map(this, fn, options, null).promise(); -}; - -Promise.map = function (promises, fn, options, _filter) { - if (typeof fn !== "function") return apiRejection("fn must be a function\u000a\u000a See http://goo.gl/916lJJ\u000a"); - return map(promises, fn, options, _filter).promise(); -}; - - -}; diff --git a/node_modules/bluebird/js/main/method.js b/node_modules/bluebird/js/main/method.js deleted file mode 100644 index 3d3eeb17..00000000 --- a/node_modules/bluebird/js/main/method.js +++ /dev/null @@ -1,44 +0,0 @@ -"use strict"; -module.exports = -function(Promise, INTERNAL, tryConvertToPromise, apiRejection) { -var util = require("./util.js"); -var tryCatch = util.tryCatch; - -Promise.method = function (fn) { - if (typeof fn !== "function") { - throw new Promise.TypeError("fn must be a function\u000a\u000a See http://goo.gl/916lJJ\u000a"); - } - return function () { - var ret = new Promise(INTERNAL); - ret._captureStackTrace(); - ret._pushContext(); - var value = tryCatch(fn).apply(this, arguments); - ret._popContext(); - ret._resolveFromSyncValue(value); - return ret; - }; -}; - -Promise.attempt = Promise["try"] = function (fn, args, ctx) { - if (typeof fn !== "function") { - return apiRejection("fn must be a function\u000a\u000a See http://goo.gl/916lJJ\u000a"); - } - var ret = new Promise(INTERNAL); - ret._captureStackTrace(); - ret._pushContext(); - var value = util.isArray(args) - ? tryCatch(fn).apply(ctx, args) - : tryCatch(fn).call(ctx, args); - ret._popContext(); - ret._resolveFromSyncValue(value); - return ret; -}; - -Promise.prototype._resolveFromSyncValue = function (value) { - if (value === util.errorObj) { - this._rejectCallback(value.e, false, true); - } else { - this._resolveCallback(value, true); - } -}; -}; diff --git a/node_modules/bluebird/js/main/nodeify.js b/node_modules/bluebird/js/main/nodeify.js deleted file mode 100644 index 257565db..00000000 --- a/node_modules/bluebird/js/main/nodeify.js +++ /dev/null @@ -1,59 +0,0 @@ -"use strict"; -module.exports = function(Promise) { -var util = require("./util.js"); -var async = require("./async.js"); -var tryCatch = util.tryCatch; -var errorObj = util.errorObj; - -function spreadAdapter(val, nodeback) { - var promise = this; - if (!util.isArray(val)) return successAdapter.call(promise, val, nodeback); - var ret = - tryCatch(nodeback).apply(promise._boundValue(), [null].concat(val)); - if (ret === errorObj) { - async.throwLater(ret.e); - } -} - -function successAdapter(val, nodeback) { - var promise = this; - var receiver = promise._boundValue(); - var ret = val === undefined - ? tryCatch(nodeback).call(receiver, null) - : tryCatch(nodeback).call(receiver, null, val); - if (ret === errorObj) { - async.throwLater(ret.e); - } -} -function errorAdapter(reason, nodeback) { - var promise = this; - if (!reason) { - var target = promise._target(); - var newReason = target._getCarriedStackTrace(); - newReason.cause = reason; - reason = newReason; - } - var ret = tryCatch(nodeback).call(promise._boundValue(), reason); - if (ret === errorObj) { - async.throwLater(ret.e); - } -} - -Promise.prototype.asCallback = -Promise.prototype.nodeify = function (nodeback, options) { - if (typeof nodeback == "function") { - var adapter = successAdapter; - if (options !== undefined && Object(options).spread) { - adapter = spreadAdapter; - } - this._then( - adapter, - errorAdapter, - undefined, - this, - nodeback - ); - } - return this; -}; -}; diff --git a/node_modules/bluebird/js/main/progress.js b/node_modules/bluebird/js/main/progress.js deleted file mode 100644 index 2e3e95e5..00000000 --- a/node_modules/bluebird/js/main/progress.js +++ /dev/null @@ -1,76 +0,0 @@ -"use strict"; -module.exports = function(Promise, PromiseArray) { -var util = require("./util.js"); -var async = require("./async.js"); -var tryCatch = util.tryCatch; -var errorObj = util.errorObj; - -Promise.prototype.progressed = function (handler) { - return this._then(undefined, undefined, handler, undefined, undefined); -}; - -Promise.prototype._progress = function (progressValue) { - if (this._isFollowingOrFulfilledOrRejected()) return; - this._target()._progressUnchecked(progressValue); - -}; - -Promise.prototype._progressHandlerAt = function (index) { - return index === 0 - ? this._progressHandler0 - : this[(index << 2) + index - 5 + 2]; -}; - -Promise.prototype._doProgressWith = function (progression) { - var progressValue = progression.value; - var handler = progression.handler; - var promise = progression.promise; - var receiver = progression.receiver; - - var ret = tryCatch(handler).call(receiver, progressValue); - if (ret === errorObj) { - if (ret.e != null && - ret.e.name !== "StopProgressPropagation") { - var trace = util.canAttachTrace(ret.e) - ? ret.e : new Error(util.toString(ret.e)); - promise._attachExtraTrace(trace); - promise._progress(ret.e); - } - } else if (ret instanceof Promise) { - ret._then(promise._progress, null, null, promise, undefined); - } else { - promise._progress(ret); - } -}; - - -Promise.prototype._progressUnchecked = function (progressValue) { - var len = this._length(); - var progress = this._progress; - for (var i = 0; i < len; i++) { - var handler = this._progressHandlerAt(i); - var promise = this._promiseAt(i); - if (!(promise instanceof Promise)) { - var receiver = this._receiverAt(i); - if (typeof handler === "function") { - handler.call(receiver, progressValue, promise); - } else if (receiver instanceof PromiseArray && - !receiver._isResolved()) { - receiver._promiseProgressed(progressValue, promise); - } - continue; - } - - if (typeof handler === "function") { - async.invoke(this._doProgressWith, this, { - handler: handler, - promise: promise, - receiver: this._receiverAt(i), - value: progressValue - }); - } else { - async.invoke(progress, promise, progressValue); - } - } -}; -}; diff --git a/node_modules/bluebird/js/main/promise.js b/node_modules/bluebird/js/main/promise.js deleted file mode 100644 index 820d0c78..00000000 --- a/node_modules/bluebird/js/main/promise.js +++ /dev/null @@ -1,759 +0,0 @@ -"use strict"; -module.exports = function() { -var makeSelfResolutionError = function () { - return new TypeError("circular promise resolution chain\u000a\u000a See http://goo.gl/LhFpo0\u000a"); -}; -var reflect = function() { - return new Promise.PromiseInspection(this._target()); -}; -var apiRejection = function(msg) { - return Promise.reject(new TypeError(msg)); -}; - -var util = require("./util.js"); - -var getDomain; -if (util.isNode) { - getDomain = function() { - var ret = process.domain; - if (ret === undefined) ret = null; - return ret; - }; -} else { - getDomain = function() { - return null; - }; -} -util.notEnumerableProp(Promise, "_getDomain", getDomain); - -var UNDEFINED_BINDING = {}; -var async = require("./async.js"); -var errors = require("./errors.js"); -var TypeError = Promise.TypeError = errors.TypeError; -Promise.RangeError = errors.RangeError; -Promise.CancellationError = errors.CancellationError; -Promise.TimeoutError = errors.TimeoutError; -Promise.OperationalError = errors.OperationalError; -Promise.RejectionError = errors.OperationalError; -Promise.AggregateError = errors.AggregateError; -var INTERNAL = function(){}; -var APPLY = {}; -var NEXT_FILTER = {e: null}; -var tryConvertToPromise = require("./thenables.js")(Promise, INTERNAL); -var PromiseArray = - require("./promise_array.js")(Promise, INTERNAL, - tryConvertToPromise, apiRejection); -var CapturedTrace = require("./captured_trace.js")(); -var isDebugging = require("./debuggability.js")(Promise, CapturedTrace); - /*jshint unused:false*/ -var createContext = - require("./context.js")(Promise, CapturedTrace, isDebugging); -var CatchFilter = require("./catch_filter.js")(NEXT_FILTER); -var PromiseResolver = require("./promise_resolver.js"); -var nodebackForPromise = PromiseResolver._nodebackForPromise; -var errorObj = util.errorObj; -var tryCatch = util.tryCatch; - -function Promise(resolver) { - if (typeof resolver !== "function") { - throw new TypeError("the promise constructor requires a resolver function\u000a\u000a See http://goo.gl/EC22Yn\u000a"); - } - if (this.constructor !== Promise) { - throw new TypeError("the promise constructor cannot be invoked directly\u000a\u000a See http://goo.gl/KsIlge\u000a"); - } - this._bitField = 0; - this._fulfillmentHandler0 = undefined; - this._rejectionHandler0 = undefined; - this._progressHandler0 = undefined; - this._promise0 = undefined; - this._receiver0 = undefined; - this._settledValue = undefined; - if (resolver !== INTERNAL) this._resolveFromResolver(resolver); -} - -Promise.prototype.toString = function () { - return "[object Promise]"; -}; - -Promise.prototype.caught = Promise.prototype["catch"] = function (fn) { - var len = arguments.length; - if (len > 1) { - var catchInstances = new Array(len - 1), - j = 0, i; - for (i = 0; i < len - 1; ++i) { - var item = arguments[i]; - if (typeof item === "function") { - catchInstances[j++] = item; - } else { - return Promise.reject( - new TypeError("Catch filter must inherit from Error or be a simple predicate function\u000a\u000a See http://goo.gl/o84o68\u000a")); - } - } - catchInstances.length = j; - fn = arguments[i]; - var catchFilter = new CatchFilter(catchInstances, fn, this); - return this._then(undefined, catchFilter.doFilter, undefined, - catchFilter, undefined); - } - return this._then(undefined, fn, undefined, undefined, undefined); -}; - -Promise.prototype.reflect = function () { - return this._then(reflect, reflect, undefined, this, undefined); -}; - -Promise.prototype.then = function (didFulfill, didReject, didProgress) { - if (isDebugging() && arguments.length > 0 && - typeof didFulfill !== "function" && - typeof didReject !== "function") { - var msg = ".then() only accepts functions but was passed: " + - util.classString(didFulfill); - if (arguments.length > 1) { - msg += ", " + util.classString(didReject); - } - this._warn(msg); - } - return this._then(didFulfill, didReject, didProgress, - undefined, undefined); -}; - -Promise.prototype.done = function (didFulfill, didReject, didProgress) { - var promise = this._then(didFulfill, didReject, didProgress, - undefined, undefined); - promise._setIsFinal(); -}; - -Promise.prototype.spread = function (didFulfill, didReject) { - return this.all()._then(didFulfill, didReject, undefined, APPLY, undefined); -}; - -Promise.prototype.isCancellable = function () { - return !this.isResolved() && - this._cancellable(); -}; - -Promise.prototype.toJSON = function () { - var ret = { - isFulfilled: false, - isRejected: false, - fulfillmentValue: undefined, - rejectionReason: undefined - }; - if (this.isFulfilled()) { - ret.fulfillmentValue = this.value(); - ret.isFulfilled = true; - } else if (this.isRejected()) { - ret.rejectionReason = this.reason(); - ret.isRejected = true; - } - return ret; -}; - -Promise.prototype.all = function () { - return new PromiseArray(this).promise(); -}; - -Promise.prototype.error = function (fn) { - return this.caught(util.originatesFromRejection, fn); -}; - -Promise.getNewLibraryCopy = module.exports; - -Promise.is = function (val) { - return val instanceof Promise; -}; - -Promise.fromNode = function(fn) { - var ret = new Promise(INTERNAL); - var result = tryCatch(fn)(nodebackForPromise(ret)); - if (result === errorObj) { - ret._rejectCallback(result.e, true, true); - } - return ret; -}; - -Promise.all = function (promises) { - return new PromiseArray(promises).promise(); -}; - -Promise.defer = Promise.pending = function () { - var promise = new Promise(INTERNAL); - return new PromiseResolver(promise); -}; - -Promise.cast = function (obj) { - var ret = tryConvertToPromise(obj); - if (!(ret instanceof Promise)) { - var val = ret; - ret = new Promise(INTERNAL); - ret._fulfillUnchecked(val); - } - return ret; -}; - -Promise.resolve = Promise.fulfilled = Promise.cast; - -Promise.reject = Promise.rejected = function (reason) { - var ret = new Promise(INTERNAL); - ret._captureStackTrace(); - ret._rejectCallback(reason, true); - return ret; -}; - -Promise.setScheduler = function(fn) { - if (typeof fn !== "function") throw new TypeError("fn must be a function\u000a\u000a See http://goo.gl/916lJJ\u000a"); - var prev = async._schedule; - async._schedule = fn; - return prev; -}; - -Promise.prototype._then = function ( - didFulfill, - didReject, - didProgress, - receiver, - internalData -) { - var haveInternalData = internalData !== undefined; - var ret = haveInternalData ? internalData : new Promise(INTERNAL); - - if (!haveInternalData) { - ret._propagateFrom(this, 4 | 1); - ret._captureStackTrace(); - } - - var target = this._target(); - if (target !== this) { - if (receiver === undefined) receiver = this._boundTo; - if (!haveInternalData) ret._setIsMigrated(); - } - - var callbackIndex = target._addCallbacks(didFulfill, - didReject, - didProgress, - ret, - receiver, - getDomain()); - - if (target._isResolved() && !target._isSettlePromisesQueued()) { - async.invoke( - target._settlePromiseAtPostResolution, target, callbackIndex); - } - - return ret; -}; - -Promise.prototype._settlePromiseAtPostResolution = function (index) { - if (this._isRejectionUnhandled()) this._unsetRejectionIsUnhandled(); - this._settlePromiseAt(index); -}; - -Promise.prototype._length = function () { - return this._bitField & 131071; -}; - -Promise.prototype._isFollowingOrFulfilledOrRejected = function () { - return (this._bitField & 939524096) > 0; -}; - -Promise.prototype._isFollowing = function () { - return (this._bitField & 536870912) === 536870912; -}; - -Promise.prototype._setLength = function (len) { - this._bitField = (this._bitField & -131072) | - (len & 131071); -}; - -Promise.prototype._setFulfilled = function () { - this._bitField = this._bitField | 268435456; -}; - -Promise.prototype._setRejected = function () { - this._bitField = this._bitField | 134217728; -}; - -Promise.prototype._setFollowing = function () { - this._bitField = this._bitField | 536870912; -}; - -Promise.prototype._setIsFinal = function () { - this._bitField = this._bitField | 33554432; -}; - -Promise.prototype._isFinal = function () { - return (this._bitField & 33554432) > 0; -}; - -Promise.prototype._cancellable = function () { - return (this._bitField & 67108864) > 0; -}; - -Promise.prototype._setCancellable = function () { - this._bitField = this._bitField | 67108864; -}; - -Promise.prototype._unsetCancellable = function () { - this._bitField = this._bitField & (~67108864); -}; - -Promise.prototype._setIsMigrated = function () { - this._bitField = this._bitField | 4194304; -}; - -Promise.prototype._unsetIsMigrated = function () { - this._bitField = this._bitField & (~4194304); -}; - -Promise.prototype._isMigrated = function () { - return (this._bitField & 4194304) > 0; -}; - -Promise.prototype._receiverAt = function (index) { - var ret = index === 0 - ? this._receiver0 - : this[ - index * 5 - 5 + 4]; - if (ret === UNDEFINED_BINDING) { - return undefined; - } else if (ret === undefined && this._isBound()) { - return this._boundValue(); - } - return ret; -}; - -Promise.prototype._promiseAt = function (index) { - return index === 0 - ? this._promise0 - : this[index * 5 - 5 + 3]; -}; - -Promise.prototype._fulfillmentHandlerAt = function (index) { - return index === 0 - ? this._fulfillmentHandler0 - : this[index * 5 - 5 + 0]; -}; - -Promise.prototype._rejectionHandlerAt = function (index) { - return index === 0 - ? this._rejectionHandler0 - : this[index * 5 - 5 + 1]; -}; - -Promise.prototype._boundValue = function() { - var ret = this._boundTo; - if (ret !== undefined) { - if (ret instanceof Promise) { - if (ret.isFulfilled()) { - return ret.value(); - } else { - return undefined; - } - } - } - return ret; -}; - -Promise.prototype._migrateCallbacks = function (follower, index) { - var fulfill = follower._fulfillmentHandlerAt(index); - var reject = follower._rejectionHandlerAt(index); - var progress = follower._progressHandlerAt(index); - var promise = follower._promiseAt(index); - var receiver = follower._receiverAt(index); - if (promise instanceof Promise) promise._setIsMigrated(); - if (receiver === undefined) receiver = UNDEFINED_BINDING; - this._addCallbacks(fulfill, reject, progress, promise, receiver, null); -}; - -Promise.prototype._addCallbacks = function ( - fulfill, - reject, - progress, - promise, - receiver, - domain -) { - var index = this._length(); - - if (index >= 131071 - 5) { - index = 0; - this._setLength(0); - } - - if (index === 0) { - this._promise0 = promise; - if (receiver !== undefined) this._receiver0 = receiver; - if (typeof fulfill === "function" && !this._isCarryingStackTrace()) { - this._fulfillmentHandler0 = - domain === null ? fulfill : domain.bind(fulfill); - } - if (typeof reject === "function") { - this._rejectionHandler0 = - domain === null ? reject : domain.bind(reject); - } - if (typeof progress === "function") { - this._progressHandler0 = - domain === null ? progress : domain.bind(progress); - } - } else { - var base = index * 5 - 5; - this[base + 3] = promise; - this[base + 4] = receiver; - if (typeof fulfill === "function") { - this[base + 0] = - domain === null ? fulfill : domain.bind(fulfill); - } - if (typeof reject === "function") { - this[base + 1] = - domain === null ? reject : domain.bind(reject); - } - if (typeof progress === "function") { - this[base + 2] = - domain === null ? progress : domain.bind(progress); - } - } - this._setLength(index + 1); - return index; -}; - -Promise.prototype._setProxyHandlers = function (receiver, promiseSlotValue) { - var index = this._length(); - - if (index >= 131071 - 5) { - index = 0; - this._setLength(0); - } - if (index === 0) { - this._promise0 = promiseSlotValue; - this._receiver0 = receiver; - } else { - var base = index * 5 - 5; - this[base + 3] = promiseSlotValue; - this[base + 4] = receiver; - } - this._setLength(index + 1); -}; - -Promise.prototype._proxyPromiseArray = function (promiseArray, index) { - this._setProxyHandlers(promiseArray, index); -}; - -Promise.prototype._resolveCallback = function(value, shouldBind) { - if (this._isFollowingOrFulfilledOrRejected()) return; - if (value === this) - return this._rejectCallback(makeSelfResolutionError(), false, true); - var maybePromise = tryConvertToPromise(value, this); - if (!(maybePromise instanceof Promise)) return this._fulfill(value); - - var propagationFlags = 1 | (shouldBind ? 4 : 0); - this._propagateFrom(maybePromise, propagationFlags); - var promise = maybePromise._target(); - if (promise._isPending()) { - var len = this._length(); - for (var i = 0; i < len; ++i) { - promise._migrateCallbacks(this, i); - } - this._setFollowing(); - this._setLength(0); - this._setFollowee(promise); - } else if (promise._isFulfilled()) { - this._fulfillUnchecked(promise._value()); - } else { - this._rejectUnchecked(promise._reason(), - promise._getCarriedStackTrace()); - } -}; - -Promise.prototype._rejectCallback = -function(reason, synchronous, shouldNotMarkOriginatingFromRejection) { - if (!shouldNotMarkOriginatingFromRejection) { - util.markAsOriginatingFromRejection(reason); - } - var trace = util.ensureErrorObject(reason); - var hasStack = trace === reason; - this._attachExtraTrace(trace, synchronous ? hasStack : false); - this._reject(reason, hasStack ? undefined : trace); -}; - -Promise.prototype._resolveFromResolver = function (resolver) { - var promise = this; - this._captureStackTrace(); - this._pushContext(); - var synchronous = true; - var r = tryCatch(resolver)(function(value) { - if (promise === null) return; - promise._resolveCallback(value); - promise = null; - }, function (reason) { - if (promise === null) return; - promise._rejectCallback(reason, synchronous); - promise = null; - }); - synchronous = false; - this._popContext(); - - if (r !== undefined && r === errorObj && promise !== null) { - promise._rejectCallback(r.e, true, true); - promise = null; - } -}; - -Promise.prototype._settlePromiseFromHandler = function ( - handler, receiver, value, promise -) { - if (promise._isRejected()) return; - promise._pushContext(); - var x; - if (receiver === APPLY && !this._isRejected()) { - x = tryCatch(handler).apply(this._boundValue(), value); - } else { - x = tryCatch(handler).call(receiver, value); - } - promise._popContext(); - - if (x === errorObj || x === promise || x === NEXT_FILTER) { - var err = x === promise ? makeSelfResolutionError() : x.e; - promise._rejectCallback(err, false, true); - } else { - promise._resolveCallback(x); - } -}; - -Promise.prototype._target = function() { - var ret = this; - while (ret._isFollowing()) ret = ret._followee(); - return ret; -}; - -Promise.prototype._followee = function() { - return this._rejectionHandler0; -}; - -Promise.prototype._setFollowee = function(promise) { - this._rejectionHandler0 = promise; -}; - -Promise.prototype._cleanValues = function () { - if (this._cancellable()) { - this._cancellationParent = undefined; - } -}; - -Promise.prototype._propagateFrom = function (parent, flags) { - if ((flags & 1) > 0 && parent._cancellable()) { - this._setCancellable(); - this._cancellationParent = parent; - } - if ((flags & 4) > 0 && parent._isBound()) { - this._setBoundTo(parent._boundTo); - } -}; - -Promise.prototype._fulfill = function (value) { - if (this._isFollowingOrFulfilledOrRejected()) return; - this._fulfillUnchecked(value); -}; - -Promise.prototype._reject = function (reason, carriedStackTrace) { - if (this._isFollowingOrFulfilledOrRejected()) return; - this._rejectUnchecked(reason, carriedStackTrace); -}; - -Promise.prototype._settlePromiseAt = function (index) { - var promise = this._promiseAt(index); - var isPromise = promise instanceof Promise; - - if (isPromise && promise._isMigrated()) { - promise._unsetIsMigrated(); - return async.invoke(this._settlePromiseAt, this, index); - } - var handler = this._isFulfilled() - ? this._fulfillmentHandlerAt(index) - : this._rejectionHandlerAt(index); - - var carriedStackTrace = - this._isCarryingStackTrace() ? this._getCarriedStackTrace() : undefined; - var value = this._settledValue; - var receiver = this._receiverAt(index); - this._clearCallbackDataAtIndex(index); - - if (typeof handler === "function") { - if (!isPromise) { - handler.call(receiver, value, promise); - } else { - this._settlePromiseFromHandler(handler, receiver, value, promise); - } - } else if (receiver instanceof PromiseArray) { - if (!receiver._isResolved()) { - if (this._isFulfilled()) { - receiver._promiseFulfilled(value, promise); - } - else { - receiver._promiseRejected(value, promise); - } - } - } else if (isPromise) { - if (this._isFulfilled()) { - promise._fulfill(value); - } else { - promise._reject(value, carriedStackTrace); - } - } - - if (index >= 4 && (index & 31) === 4) - async.invokeLater(this._setLength, this, 0); -}; - -Promise.prototype._clearCallbackDataAtIndex = function(index) { - if (index === 0) { - if (!this._isCarryingStackTrace()) { - this._fulfillmentHandler0 = undefined; - } - this._rejectionHandler0 = - this._progressHandler0 = - this._receiver0 = - this._promise0 = undefined; - } else { - var base = index * 5 - 5; - this[base + 3] = - this[base + 4] = - this[base + 0] = - this[base + 1] = - this[base + 2] = undefined; - } -}; - -Promise.prototype._isSettlePromisesQueued = function () { - return (this._bitField & - -1073741824) === -1073741824; -}; - -Promise.prototype._setSettlePromisesQueued = function () { - this._bitField = this._bitField | -1073741824; -}; - -Promise.prototype._unsetSettlePromisesQueued = function () { - this._bitField = this._bitField & (~-1073741824); -}; - -Promise.prototype._queueSettlePromises = function() { - async.settlePromises(this); - this._setSettlePromisesQueued(); -}; - -Promise.prototype._fulfillUnchecked = function (value) { - if (value === this) { - var err = makeSelfResolutionError(); - this._attachExtraTrace(err); - return this._rejectUnchecked(err, undefined); - } - this._setFulfilled(); - this._settledValue = value; - this._cleanValues(); - - if (this._length() > 0) { - this._queueSettlePromises(); - } -}; - -Promise.prototype._rejectUncheckedCheckError = function (reason) { - var trace = util.ensureErrorObject(reason); - this._rejectUnchecked(reason, trace === reason ? undefined : trace); -}; - -Promise.prototype._rejectUnchecked = function (reason, trace) { - if (reason === this) { - var err = makeSelfResolutionError(); - this._attachExtraTrace(err); - return this._rejectUnchecked(err); - } - this._setRejected(); - this._settledValue = reason; - this._cleanValues(); - - if (this._isFinal()) { - async.throwLater(function(e) { - if ("stack" in e) { - async.invokeFirst( - CapturedTrace.unhandledRejection, undefined, e); - } - throw e; - }, trace === undefined ? reason : trace); - return; - } - - if (trace !== undefined && trace !== reason) { - this._setCarriedStackTrace(trace); - } - - if (this._length() > 0) { - this._queueSettlePromises(); - } else { - this._ensurePossibleRejectionHandled(); - } -}; - -Promise.prototype._settlePromises = function () { - this._unsetSettlePromisesQueued(); - var len = this._length(); - for (var i = 0; i < len; i++) { - this._settlePromiseAt(i); - } -}; - - -util.notEnumerableProp(Promise, - "_makeSelfResolutionError", - makeSelfResolutionError); - -require("./progress.js")(Promise, PromiseArray); -require("./method.js")(Promise, INTERNAL, tryConvertToPromise, apiRejection); -require("./bind.js")(Promise, INTERNAL, tryConvertToPromise); -require("./finally.js")(Promise, NEXT_FILTER, tryConvertToPromise); -require("./direct_resolve.js")(Promise); -require("./synchronous_inspection.js")(Promise); -require("./join.js")(Promise, PromiseArray, tryConvertToPromise, INTERNAL); -Promise.version = "2.11.0"; -Promise.Promise = Promise; -require('./map.js')(Promise, PromiseArray, apiRejection, tryConvertToPromise, INTERNAL); -require('./cancel.js')(Promise); -require('./using.js')(Promise, apiRejection, tryConvertToPromise, createContext); -require('./generators.js')(Promise, apiRejection, INTERNAL, tryConvertToPromise); -require('./nodeify.js')(Promise); -require('./call_get.js')(Promise); -require('./props.js')(Promise, PromiseArray, tryConvertToPromise, apiRejection); -require('./race.js')(Promise, INTERNAL, tryConvertToPromise, apiRejection); -require('./reduce.js')(Promise, PromiseArray, apiRejection, tryConvertToPromise, INTERNAL); -require('./settle.js')(Promise, PromiseArray); -require('./some.js')(Promise, PromiseArray, apiRejection); -require('./promisify.js')(Promise, INTERNAL); -require('./any.js')(Promise); -require('./each.js')(Promise, INTERNAL); -require('./timers.js')(Promise, INTERNAL); -require('./filter.js')(Promise, INTERNAL); - - util.toFastProperties(Promise); - util.toFastProperties(Promise.prototype); - function fillTypes(value) { - var p = new Promise(INTERNAL); - p._fulfillmentHandler0 = value; - p._rejectionHandler0 = value; - p._progressHandler0 = value; - p._promise0 = value; - p._receiver0 = value; - p._settledValue = value; - } - // Complete slack tracking, opt out of field-type tracking and - // stabilize map - fillTypes({a: 1}); - fillTypes({b: 2}); - fillTypes({c: 3}); - fillTypes(1); - fillTypes(function(){}); - fillTypes(undefined); - fillTypes(false); - fillTypes(new Promise(INTERNAL)); - CapturedTrace.setBounds(async.firstLineError, util.lastLineError); - return Promise; - -}; diff --git a/node_modules/bluebird/js/main/promise_array.js b/node_modules/bluebird/js/main/promise_array.js deleted file mode 100644 index b2e8f1cc..00000000 --- a/node_modules/bluebird/js/main/promise_array.js +++ /dev/null @@ -1,142 +0,0 @@ -"use strict"; -module.exports = function(Promise, INTERNAL, tryConvertToPromise, - apiRejection) { -var util = require("./util.js"); -var isArray = util.isArray; - -function toResolutionValue(val) { - switch(val) { - case -2: return []; - case -3: return {}; - } -} - -function PromiseArray(values) { - var promise = this._promise = new Promise(INTERNAL); - var parent; - if (values instanceof Promise) { - parent = values; - promise._propagateFrom(parent, 1 | 4); - } - this._values = values; - this._length = 0; - this._totalResolved = 0; - this._init(undefined, -2); -} -PromiseArray.prototype.length = function () { - return this._length; -}; - -PromiseArray.prototype.promise = function () { - return this._promise; -}; - -PromiseArray.prototype._init = function init(_, resolveValueIfEmpty) { - var values = tryConvertToPromise(this._values, this._promise); - if (values instanceof Promise) { - values = values._target(); - this._values = values; - if (values._isFulfilled()) { - values = values._value(); - if (!isArray(values)) { - var err = new Promise.TypeError("expecting an array, a promise or a thenable\u000a\u000a See http://goo.gl/s8MMhc\u000a"); - this.__hardReject__(err); - return; - } - } else if (values._isPending()) { - values._then( - init, - this._reject, - undefined, - this, - resolveValueIfEmpty - ); - return; - } else { - this._reject(values._reason()); - return; - } - } else if (!isArray(values)) { - this._promise._reject(apiRejection("expecting an array, a promise or a thenable\u000a\u000a See http://goo.gl/s8MMhc\u000a")._reason()); - return; - } - - if (values.length === 0) { - if (resolveValueIfEmpty === -5) { - this._resolveEmptyArray(); - } - else { - this._resolve(toResolutionValue(resolveValueIfEmpty)); - } - return; - } - var len = this.getActualLength(values.length); - this._length = len; - this._values = this.shouldCopyValues() ? new Array(len) : this._values; - var promise = this._promise; - for (var i = 0; i < len; ++i) { - var isResolved = this._isResolved(); - var maybePromise = tryConvertToPromise(values[i], promise); - if (maybePromise instanceof Promise) { - maybePromise = maybePromise._target(); - if (isResolved) { - maybePromise._ignoreRejections(); - } else if (maybePromise._isPending()) { - maybePromise._proxyPromiseArray(this, i); - } else if (maybePromise._isFulfilled()) { - this._promiseFulfilled(maybePromise._value(), i); - } else { - this._promiseRejected(maybePromise._reason(), i); - } - } else if (!isResolved) { - this._promiseFulfilled(maybePromise, i); - } - } -}; - -PromiseArray.prototype._isResolved = function () { - return this._values === null; -}; - -PromiseArray.prototype._resolve = function (value) { - this._values = null; - this._promise._fulfill(value); -}; - -PromiseArray.prototype.__hardReject__ = -PromiseArray.prototype._reject = function (reason) { - this._values = null; - this._promise._rejectCallback(reason, false, true); -}; - -PromiseArray.prototype._promiseProgressed = function (progressValue, index) { - this._promise._progress({ - index: index, - value: progressValue - }); -}; - - -PromiseArray.prototype._promiseFulfilled = function (value, index) { - this._values[index] = value; - var totalResolved = ++this._totalResolved; - if (totalResolved >= this._length) { - this._resolve(this._values); - } -}; - -PromiseArray.prototype._promiseRejected = function (reason, index) { - this._totalResolved++; - this._reject(reason); -}; - -PromiseArray.prototype.shouldCopyValues = function () { - return true; -}; - -PromiseArray.prototype.getActualLength = function (len) { - return len; -}; - -return PromiseArray; -}; diff --git a/node_modules/bluebird/js/main/promise_resolver.js b/node_modules/bluebird/js/main/promise_resolver.js deleted file mode 100644 index b180a328..00000000 --- a/node_modules/bluebird/js/main/promise_resolver.js +++ /dev/null @@ -1,123 +0,0 @@ -"use strict"; -var util = require("./util.js"); -var maybeWrapAsError = util.maybeWrapAsError; -var errors = require("./errors.js"); -var TimeoutError = errors.TimeoutError; -var OperationalError = errors.OperationalError; -var haveGetters = util.haveGetters; -var es5 = require("./es5.js"); - -function isUntypedError(obj) { - return obj instanceof Error && - es5.getPrototypeOf(obj) === Error.prototype; -} - -var rErrorKey = /^(?:name|message|stack|cause)$/; -function wrapAsOperationalError(obj) { - var ret; - if (isUntypedError(obj)) { - ret = new OperationalError(obj); - ret.name = obj.name; - ret.message = obj.message; - ret.stack = obj.stack; - var keys = es5.keys(obj); - for (var i = 0; i < keys.length; ++i) { - var key = keys[i]; - if (!rErrorKey.test(key)) { - ret[key] = obj[key]; - } - } - return ret; - } - util.markAsOriginatingFromRejection(obj); - return obj; -} - -function nodebackForPromise(promise) { - return function(err, value) { - if (promise === null) return; - - if (err) { - var wrapped = wrapAsOperationalError(maybeWrapAsError(err)); - promise._attachExtraTrace(wrapped); - promise._reject(wrapped); - } else if (arguments.length > 2) { - var $_len = arguments.length;var args = new Array($_len - 1); for(var $_i = 1; $_i < $_len; ++$_i) {args[$_i - 1] = arguments[$_i];} - promise._fulfill(args); - } else { - promise._fulfill(value); - } - - promise = null; - }; -} - - -var PromiseResolver; -if (!haveGetters) { - PromiseResolver = function (promise) { - this.promise = promise; - this.asCallback = nodebackForPromise(promise); - this.callback = this.asCallback; - }; -} -else { - PromiseResolver = function (promise) { - this.promise = promise; - }; -} -if (haveGetters) { - var prop = { - get: function() { - return nodebackForPromise(this.promise); - } - }; - es5.defineProperty(PromiseResolver.prototype, "asCallback", prop); - es5.defineProperty(PromiseResolver.prototype, "callback", prop); -} - -PromiseResolver._nodebackForPromise = nodebackForPromise; - -PromiseResolver.prototype.toString = function () { - return "[object PromiseResolver]"; -}; - -PromiseResolver.prototype.resolve = -PromiseResolver.prototype.fulfill = function (value) { - if (!(this instanceof PromiseResolver)) { - throw new TypeError("Illegal invocation, resolver resolve/reject must be called within a resolver context. Consider using the promise constructor instead.\u000a\u000a See http://goo.gl/sdkXL9\u000a"); - } - this.promise._resolveCallback(value); -}; - -PromiseResolver.prototype.reject = function (reason) { - if (!(this instanceof PromiseResolver)) { - throw new TypeError("Illegal invocation, resolver resolve/reject must be called within a resolver context. Consider using the promise constructor instead.\u000a\u000a See http://goo.gl/sdkXL9\u000a"); - } - this.promise._rejectCallback(reason); -}; - -PromiseResolver.prototype.progress = function (value) { - if (!(this instanceof PromiseResolver)) { - throw new TypeError("Illegal invocation, resolver resolve/reject must be called within a resolver context. Consider using the promise constructor instead.\u000a\u000a See http://goo.gl/sdkXL9\u000a"); - } - this.promise._progress(value); -}; - -PromiseResolver.prototype.cancel = function (err) { - this.promise.cancel(err); -}; - -PromiseResolver.prototype.timeout = function () { - this.reject(new TimeoutError("timeout")); -}; - -PromiseResolver.prototype.isResolved = function () { - return this.promise.isResolved(); -}; - -PromiseResolver.prototype.toJSON = function () { - return this.promise.toJSON(); -}; - -module.exports = PromiseResolver; diff --git a/node_modules/bluebird/js/main/promisify.js b/node_modules/bluebird/js/main/promisify.js deleted file mode 100644 index 86763d60..00000000 --- a/node_modules/bluebird/js/main/promisify.js +++ /dev/null @@ -1,307 +0,0 @@ -"use strict"; -module.exports = function(Promise, INTERNAL) { -var THIS = {}; -var util = require("./util.js"); -var nodebackForPromise = require("./promise_resolver.js") - ._nodebackForPromise; -var withAppended = util.withAppended; -var maybeWrapAsError = util.maybeWrapAsError; -var canEvaluate = util.canEvaluate; -var TypeError = require("./errors").TypeError; -var defaultSuffix = "Async"; -var defaultPromisified = {__isPromisified__: true}; -var noCopyProps = [ - "arity", "length", - "name", - "arguments", - "caller", - "callee", - "prototype", - "__isPromisified__" -]; -var noCopyPropsPattern = new RegExp("^(?:" + noCopyProps.join("|") + ")$"); - -var defaultFilter = function(name) { - return util.isIdentifier(name) && - name.charAt(0) !== "_" && - name !== "constructor"; -}; - -function propsFilter(key) { - return !noCopyPropsPattern.test(key); -} - -function isPromisified(fn) { - try { - return fn.__isPromisified__ === true; - } - catch (e) { - return false; - } -} - -function hasPromisified(obj, key, suffix) { - var val = util.getDataPropertyOrDefault(obj, key + suffix, - defaultPromisified); - return val ? isPromisified(val) : false; -} -function checkValid(ret, suffix, suffixRegexp) { - for (var i = 0; i < ret.length; i += 2) { - var key = ret[i]; - if (suffixRegexp.test(key)) { - var keyWithoutAsyncSuffix = key.replace(suffixRegexp, ""); - for (var j = 0; j < ret.length; j += 2) { - if (ret[j] === keyWithoutAsyncSuffix) { - throw new TypeError("Cannot promisify an API that has normal methods with '%s'-suffix\u000a\u000a See http://goo.gl/iWrZbw\u000a" - .replace("%s", suffix)); - } - } - } - } -} - -function promisifiableMethods(obj, suffix, suffixRegexp, filter) { - var keys = util.inheritedDataKeys(obj); - var ret = []; - for (var i = 0; i < keys.length; ++i) { - var key = keys[i]; - var value = obj[key]; - var passesDefaultFilter = filter === defaultFilter - ? true : defaultFilter(key, value, obj); - if (typeof value === "function" && - !isPromisified(value) && - !hasPromisified(obj, key, suffix) && - filter(key, value, obj, passesDefaultFilter)) { - ret.push(key, value); - } - } - checkValid(ret, suffix, suffixRegexp); - return ret; -} - -var escapeIdentRegex = function(str) { - return str.replace(/([$])/, "\\$"); -}; - -var makeNodePromisifiedEval; -if (!false) { -var switchCaseArgumentOrder = function(likelyArgumentCount) { - var ret = [likelyArgumentCount]; - var min = Math.max(0, likelyArgumentCount - 1 - 3); - for(var i = likelyArgumentCount - 1; i >= min; --i) { - ret.push(i); - } - for(var i = likelyArgumentCount + 1; i <= 3; ++i) { - ret.push(i); - } - return ret; -}; - -var argumentSequence = function(argumentCount) { - return util.filledRange(argumentCount, "_arg", ""); -}; - -var parameterDeclaration = function(parameterCount) { - return util.filledRange( - Math.max(parameterCount, 3), "_arg", ""); -}; - -var parameterCount = function(fn) { - if (typeof fn.length === "number") { - return Math.max(Math.min(fn.length, 1023 + 1), 0); - } - return 0; -}; - -makeNodePromisifiedEval = -function(callback, receiver, originalName, fn) { - var newParameterCount = Math.max(0, parameterCount(fn) - 1); - var argumentOrder = switchCaseArgumentOrder(newParameterCount); - var shouldProxyThis = typeof callback === "string" || receiver === THIS; - - function generateCallForArgumentCount(count) { - var args = argumentSequence(count).join(", "); - var comma = count > 0 ? ", " : ""; - var ret; - if (shouldProxyThis) { - ret = "ret = callback.call(this, {{args}}, nodeback); break;\n"; - } else { - ret = receiver === undefined - ? "ret = callback({{args}}, nodeback); break;\n" - : "ret = callback.call(receiver, {{args}}, nodeback); break;\n"; - } - return ret.replace("{{args}}", args).replace(", ", comma); - } - - function generateArgumentSwitchCase() { - var ret = ""; - for (var i = 0; i < argumentOrder.length; ++i) { - ret += "case " + argumentOrder[i] +":" + - generateCallForArgumentCount(argumentOrder[i]); - } - - ret += " \n\ - default: \n\ - var args = new Array(len + 1); \n\ - var i = 0; \n\ - for (var i = 0; i < len; ++i) { \n\ - args[i] = arguments[i]; \n\ - } \n\ - args[i] = nodeback; \n\ - [CodeForCall] \n\ - break; \n\ - ".replace("[CodeForCall]", (shouldProxyThis - ? "ret = callback.apply(this, args);\n" - : "ret = callback.apply(receiver, args);\n")); - return ret; - } - - var getFunctionCode = typeof callback === "string" - ? ("this != null ? this['"+callback+"'] : fn") - : "fn"; - - return new Function("Promise", - "fn", - "receiver", - "withAppended", - "maybeWrapAsError", - "nodebackForPromise", - "tryCatch", - "errorObj", - "notEnumerableProp", - "INTERNAL","'use strict'; \n\ - var ret = function (Parameters) { \n\ - 'use strict'; \n\ - var len = arguments.length; \n\ - var promise = new Promise(INTERNAL); \n\ - promise._captureStackTrace(); \n\ - var nodeback = nodebackForPromise(promise); \n\ - var ret; \n\ - var callback = tryCatch([GetFunctionCode]); \n\ - switch(len) { \n\ - [CodeForSwitchCase] \n\ - } \n\ - if (ret === errorObj) { \n\ - promise._rejectCallback(maybeWrapAsError(ret.e), true, true);\n\ - } \n\ - return promise; \n\ - }; \n\ - notEnumerableProp(ret, '__isPromisified__', true); \n\ - return ret; \n\ - " - .replace("Parameters", parameterDeclaration(newParameterCount)) - .replace("[CodeForSwitchCase]", generateArgumentSwitchCase()) - .replace("[GetFunctionCode]", getFunctionCode))( - Promise, - fn, - receiver, - withAppended, - maybeWrapAsError, - nodebackForPromise, - util.tryCatch, - util.errorObj, - util.notEnumerableProp, - INTERNAL - ); -}; -} - -function makeNodePromisifiedClosure(callback, receiver, _, fn) { - var defaultThis = (function() {return this;})(); - var method = callback; - if (typeof method === "string") { - callback = fn; - } - function promisified() { - var _receiver = receiver; - if (receiver === THIS) _receiver = this; - var promise = new Promise(INTERNAL); - promise._captureStackTrace(); - var cb = typeof method === "string" && this !== defaultThis - ? this[method] : callback; - var fn = nodebackForPromise(promise); - try { - cb.apply(_receiver, withAppended(arguments, fn)); - } catch(e) { - promise._rejectCallback(maybeWrapAsError(e), true, true); - } - return promise; - } - util.notEnumerableProp(promisified, "__isPromisified__", true); - return promisified; -} - -var makeNodePromisified = canEvaluate - ? makeNodePromisifiedEval - : makeNodePromisifiedClosure; - -function promisifyAll(obj, suffix, filter, promisifier) { - var suffixRegexp = new RegExp(escapeIdentRegex(suffix) + "$"); - var methods = - promisifiableMethods(obj, suffix, suffixRegexp, filter); - - for (var i = 0, len = methods.length; i < len; i+= 2) { - var key = methods[i]; - var fn = methods[i+1]; - var promisifiedKey = key + suffix; - if (promisifier === makeNodePromisified) { - obj[promisifiedKey] = - makeNodePromisified(key, THIS, key, fn, suffix); - } else { - var promisified = promisifier(fn, function() { - return makeNodePromisified(key, THIS, key, fn, suffix); - }); - util.notEnumerableProp(promisified, "__isPromisified__", true); - obj[promisifiedKey] = promisified; - } - } - util.toFastProperties(obj); - return obj; -} - -function promisify(callback, receiver) { - return makeNodePromisified(callback, receiver, undefined, callback); -} - -Promise.promisify = function (fn, receiver) { - if (typeof fn !== "function") { - throw new TypeError("fn must be a function\u000a\u000a See http://goo.gl/916lJJ\u000a"); - } - if (isPromisified(fn)) { - return fn; - } - var ret = promisify(fn, arguments.length < 2 ? THIS : receiver); - util.copyDescriptors(fn, ret, propsFilter); - return ret; -}; - -Promise.promisifyAll = function (target, options) { - if (typeof target !== "function" && typeof target !== "object") { - throw new TypeError("the target of promisifyAll must be an object or a function\u000a\u000a See http://goo.gl/9ITlV0\u000a"); - } - options = Object(options); - var suffix = options.suffix; - if (typeof suffix !== "string") suffix = defaultSuffix; - var filter = options.filter; - if (typeof filter !== "function") filter = defaultFilter; - var promisifier = options.promisifier; - if (typeof promisifier !== "function") promisifier = makeNodePromisified; - - if (!util.isIdentifier(suffix)) { - throw new RangeError("suffix must be a valid identifier\u000a\u000a See http://goo.gl/8FZo5V\u000a"); - } - - var keys = util.inheritedDataKeys(target); - for (var i = 0; i < keys.length; ++i) { - var value = target[keys[i]]; - if (keys[i] !== "constructor" && - util.isClass(value)) { - promisifyAll(value.prototype, suffix, filter, promisifier); - promisifyAll(value, suffix, filter, promisifier); - } - } - - return promisifyAll(target, suffix, filter, promisifier); -}; -}; - diff --git a/node_modules/bluebird/js/main/props.js b/node_modules/bluebird/js/main/props.js deleted file mode 100644 index d6f9e64b..00000000 --- a/node_modules/bluebird/js/main/props.js +++ /dev/null @@ -1,79 +0,0 @@ -"use strict"; -module.exports = function( - Promise, PromiseArray, tryConvertToPromise, apiRejection) { -var util = require("./util.js"); -var isObject = util.isObject; -var es5 = require("./es5.js"); - -function PropertiesPromiseArray(obj) { - var keys = es5.keys(obj); - var len = keys.length; - var values = new Array(len * 2); - for (var i = 0; i < len; ++i) { - var key = keys[i]; - values[i] = obj[key]; - values[i + len] = key; - } - this.constructor$(values); -} -util.inherits(PropertiesPromiseArray, PromiseArray); - -PropertiesPromiseArray.prototype._init = function () { - this._init$(undefined, -3) ; -}; - -PropertiesPromiseArray.prototype._promiseFulfilled = function (value, index) { - this._values[index] = value; - var totalResolved = ++this._totalResolved; - if (totalResolved >= this._length) { - var val = {}; - var keyOffset = this.length(); - for (var i = 0, len = this.length(); i < len; ++i) { - val[this._values[i + keyOffset]] = this._values[i]; - } - this._resolve(val); - } -}; - -PropertiesPromiseArray.prototype._promiseProgressed = function (value, index) { - this._promise._progress({ - key: this._values[index + this.length()], - value: value - }); -}; - -PropertiesPromiseArray.prototype.shouldCopyValues = function () { - return false; -}; - -PropertiesPromiseArray.prototype.getActualLength = function (len) { - return len >> 1; -}; - -function props(promises) { - var ret; - var castValue = tryConvertToPromise(promises); - - if (!isObject(castValue)) { - return apiRejection("cannot await properties of a non-object\u000a\u000a See http://goo.gl/OsFKC8\u000a"); - } else if (castValue instanceof Promise) { - ret = castValue._then( - Promise.props, undefined, undefined, undefined, undefined); - } else { - ret = new PropertiesPromiseArray(castValue).promise(); - } - - if (castValue instanceof Promise) { - ret._propagateFrom(castValue, 4); - } - return ret; -} - -Promise.prototype.props = function () { - return props(this); -}; - -Promise.props = function (promises) { - return props(promises); -}; -}; diff --git a/node_modules/bluebird/js/main/queue.js b/node_modules/bluebird/js/main/queue.js deleted file mode 100644 index 84d57d5f..00000000 --- a/node_modules/bluebird/js/main/queue.js +++ /dev/null @@ -1,90 +0,0 @@ -"use strict"; -function arrayMove(src, srcIndex, dst, dstIndex, len) { - for (var j = 0; j < len; ++j) { - dst[j + dstIndex] = src[j + srcIndex]; - src[j + srcIndex] = void 0; - } -} - -function Queue(capacity) { - this._capacity = capacity; - this._length = 0; - this._front = 0; -} - -Queue.prototype._willBeOverCapacity = function (size) { - return this._capacity < size; -}; - -Queue.prototype._pushOne = function (arg) { - var length = this.length(); - this._checkCapacity(length + 1); - var i = (this._front + length) & (this._capacity - 1); - this[i] = arg; - this._length = length + 1; -}; - -Queue.prototype._unshiftOne = function(value) { - var capacity = this._capacity; - this._checkCapacity(this.length() + 1); - var front = this._front; - var i = (((( front - 1 ) & - ( capacity - 1) ) ^ capacity ) - capacity ); - this[i] = value; - this._front = i; - this._length = this.length() + 1; -}; - -Queue.prototype.unshift = function(fn, receiver, arg) { - this._unshiftOne(arg); - this._unshiftOne(receiver); - this._unshiftOne(fn); -}; - -Queue.prototype.push = function (fn, receiver, arg) { - var length = this.length() + 3; - if (this._willBeOverCapacity(length)) { - this._pushOne(fn); - this._pushOne(receiver); - this._pushOne(arg); - return; - } - var j = this._front + length - 3; - this._checkCapacity(length); - var wrapMask = this._capacity - 1; - this[(j + 0) & wrapMask] = fn; - this[(j + 1) & wrapMask] = receiver; - this[(j + 2) & wrapMask] = arg; - this._length = length; -}; - -Queue.prototype.shift = function () { - var front = this._front, - ret = this[front]; - - this[front] = undefined; - this._front = (front + 1) & (this._capacity - 1); - this._length--; - return ret; -}; - -Queue.prototype.length = function () { - return this._length; -}; - -Queue.prototype._checkCapacity = function (size) { - if (this._capacity < size) { - this._resizeTo(this._capacity << 1); - } -}; - -Queue.prototype._resizeTo = function (capacity) { - var oldCapacity = this._capacity; - this._capacity = capacity; - var front = this._front; - var length = this._length; - var moveItemsCount = (front + length) & (oldCapacity - 1); - arrayMove(this, 0, this, oldCapacity, moveItemsCount); -}; - -module.exports = Queue; diff --git a/node_modules/bluebird/js/main/race.js b/node_modules/bluebird/js/main/race.js deleted file mode 100644 index 30e7bb09..00000000 --- a/node_modules/bluebird/js/main/race.js +++ /dev/null @@ -1,47 +0,0 @@ -"use strict"; -module.exports = function( - Promise, INTERNAL, tryConvertToPromise, apiRejection) { -var isArray = require("./util.js").isArray; - -var raceLater = function (promise) { - return promise.then(function(array) { - return race(array, promise); - }); -}; - -function race(promises, parent) { - var maybePromise = tryConvertToPromise(promises); - - if (maybePromise instanceof Promise) { - return raceLater(maybePromise); - } else if (!isArray(promises)) { - return apiRejection("expecting an array, a promise or a thenable\u000a\u000a See http://goo.gl/s8MMhc\u000a"); - } - - var ret = new Promise(INTERNAL); - if (parent !== undefined) { - ret._propagateFrom(parent, 4 | 1); - } - var fulfill = ret._fulfill; - var reject = ret._reject; - for (var i = 0, len = promises.length; i < len; ++i) { - var val = promises[i]; - - if (val === undefined && !(i in promises)) { - continue; - } - - Promise.cast(val)._then(fulfill, reject, undefined, ret, null); - } - return ret; -} - -Promise.race = function (promises) { - return race(promises, undefined); -}; - -Promise.prototype.race = function () { - return race(this, undefined); -}; - -}; diff --git a/node_modules/bluebird/js/main/reduce.js b/node_modules/bluebird/js/main/reduce.js deleted file mode 100644 index 1f92dafa..00000000 --- a/node_modules/bluebird/js/main/reduce.js +++ /dev/null @@ -1,148 +0,0 @@ -"use strict"; -module.exports = function(Promise, - PromiseArray, - apiRejection, - tryConvertToPromise, - INTERNAL) { -var getDomain = Promise._getDomain; -var async = require("./async.js"); -var util = require("./util.js"); -var tryCatch = util.tryCatch; -var errorObj = util.errorObj; -function ReductionPromiseArray(promises, fn, accum, _each) { - this.constructor$(promises); - this._promise._captureStackTrace(); - this._preservedValues = _each === INTERNAL ? [] : null; - this._zerothIsAccum = (accum === undefined); - this._gotAccum = false; - this._reducingIndex = (this._zerothIsAccum ? 1 : 0); - this._valuesPhase = undefined; - var maybePromise = tryConvertToPromise(accum, this._promise); - var rejected = false; - var isPromise = maybePromise instanceof Promise; - if (isPromise) { - maybePromise = maybePromise._target(); - if (maybePromise._isPending()) { - maybePromise._proxyPromiseArray(this, -1); - } else if (maybePromise._isFulfilled()) { - accum = maybePromise._value(); - this._gotAccum = true; - } else { - this._reject(maybePromise._reason()); - rejected = true; - } - } - if (!(isPromise || this._zerothIsAccum)) this._gotAccum = true; - var domain = getDomain(); - this._callback = domain === null ? fn : domain.bind(fn); - this._accum = accum; - if (!rejected) async.invoke(init, this, undefined); -} -function init() { - this._init$(undefined, -5); -} -util.inherits(ReductionPromiseArray, PromiseArray); - -ReductionPromiseArray.prototype._init = function () {}; - -ReductionPromiseArray.prototype._resolveEmptyArray = function () { - if (this._gotAccum || this._zerothIsAccum) { - this._resolve(this._preservedValues !== null - ? [] : this._accum); - } -}; - -ReductionPromiseArray.prototype._promiseFulfilled = function (value, index) { - var values = this._values; - values[index] = value; - var length = this.length(); - var preservedValues = this._preservedValues; - var isEach = preservedValues !== null; - var gotAccum = this._gotAccum; - var valuesPhase = this._valuesPhase; - var valuesPhaseIndex; - if (!valuesPhase) { - valuesPhase = this._valuesPhase = new Array(length); - for (valuesPhaseIndex=0; valuesPhaseIndex= this._length) { - this._resolve(this._values); - } -}; - -SettledPromiseArray.prototype._promiseFulfilled = function (value, index) { - var ret = new PromiseInspection(); - ret._bitField = 268435456; - ret._settledValue = value; - this._promiseResolved(index, ret); -}; -SettledPromiseArray.prototype._promiseRejected = function (reason, index) { - var ret = new PromiseInspection(); - ret._bitField = 134217728; - ret._settledValue = reason; - this._promiseResolved(index, ret); -}; - -Promise.settle = function (promises) { - return new SettledPromiseArray(promises).promise(); -}; - -Promise.prototype.settle = function () { - return new SettledPromiseArray(this).promise(); -}; -}; diff --git a/node_modules/bluebird/js/main/some.js b/node_modules/bluebird/js/main/some.js deleted file mode 100644 index f3968cf1..00000000 --- a/node_modules/bluebird/js/main/some.js +++ /dev/null @@ -1,125 +0,0 @@ -"use strict"; -module.exports = -function(Promise, PromiseArray, apiRejection) { -var util = require("./util.js"); -var RangeError = require("./errors.js").RangeError; -var AggregateError = require("./errors.js").AggregateError; -var isArray = util.isArray; - - -function SomePromiseArray(values) { - this.constructor$(values); - this._howMany = 0; - this._unwrap = false; - this._initialized = false; -} -util.inherits(SomePromiseArray, PromiseArray); - -SomePromiseArray.prototype._init = function () { - if (!this._initialized) { - return; - } - if (this._howMany === 0) { - this._resolve([]); - return; - } - this._init$(undefined, -5); - var isArrayResolved = isArray(this._values); - if (!this._isResolved() && - isArrayResolved && - this._howMany > this._canPossiblyFulfill()) { - this._reject(this._getRangeError(this.length())); - } -}; - -SomePromiseArray.prototype.init = function () { - this._initialized = true; - this._init(); -}; - -SomePromiseArray.prototype.setUnwrap = function () { - this._unwrap = true; -}; - -SomePromiseArray.prototype.howMany = function () { - return this._howMany; -}; - -SomePromiseArray.prototype.setHowMany = function (count) { - this._howMany = count; -}; - -SomePromiseArray.prototype._promiseFulfilled = function (value) { - this._addFulfilled(value); - if (this._fulfilled() === this.howMany()) { - this._values.length = this.howMany(); - if (this.howMany() === 1 && this._unwrap) { - this._resolve(this._values[0]); - } else { - this._resolve(this._values); - } - } - -}; -SomePromiseArray.prototype._promiseRejected = function (reason) { - this._addRejected(reason); - if (this.howMany() > this._canPossiblyFulfill()) { - var e = new AggregateError(); - for (var i = this.length(); i < this._values.length; ++i) { - e.push(this._values[i]); - } - this._reject(e); - } -}; - -SomePromiseArray.prototype._fulfilled = function () { - return this._totalResolved; -}; - -SomePromiseArray.prototype._rejected = function () { - return this._values.length - this.length(); -}; - -SomePromiseArray.prototype._addRejected = function (reason) { - this._values.push(reason); -}; - -SomePromiseArray.prototype._addFulfilled = function (value) { - this._values[this._totalResolved++] = value; -}; - -SomePromiseArray.prototype._canPossiblyFulfill = function () { - return this.length() - this._rejected(); -}; - -SomePromiseArray.prototype._getRangeError = function (count) { - var message = "Input array must contain at least " + - this._howMany + " items but contains only " + count + " items"; - return new RangeError(message); -}; - -SomePromiseArray.prototype._resolveEmptyArray = function () { - this._reject(this._getRangeError(0)); -}; - -function some(promises, howMany) { - if ((howMany | 0) !== howMany || howMany < 0) { - return apiRejection("expecting a positive integer\u000a\u000a See http://goo.gl/1wAmHx\u000a"); - } - var ret = new SomePromiseArray(promises); - var promise = ret.promise(); - ret.setHowMany(howMany); - ret.init(); - return promise; -} - -Promise.some = function (promises, howMany) { - return some(promises, howMany); -}; - -Promise.prototype.some = function (howMany) { - return some(this, howMany); -}; - -Promise._SomePromiseArray = SomePromiseArray; -}; diff --git a/node_modules/bluebird/js/main/synchronous_inspection.js b/node_modules/bluebird/js/main/synchronous_inspection.js deleted file mode 100644 index 7aac1496..00000000 --- a/node_modules/bluebird/js/main/synchronous_inspection.js +++ /dev/null @@ -1,94 +0,0 @@ -"use strict"; -module.exports = function(Promise) { -function PromiseInspection(promise) { - if (promise !== undefined) { - promise = promise._target(); - this._bitField = promise._bitField; - this._settledValue = promise._settledValue; - } - else { - this._bitField = 0; - this._settledValue = undefined; - } -} - -PromiseInspection.prototype.value = function () { - if (!this.isFulfilled()) { - throw new TypeError("cannot get fulfillment value of a non-fulfilled promise\u000a\u000a See http://goo.gl/hc1DLj\u000a"); - } - return this._settledValue; -}; - -PromiseInspection.prototype.error = -PromiseInspection.prototype.reason = function () { - if (!this.isRejected()) { - throw new TypeError("cannot get rejection reason of a non-rejected promise\u000a\u000a See http://goo.gl/hPuiwB\u000a"); - } - return this._settledValue; -}; - -PromiseInspection.prototype.isFulfilled = -Promise.prototype._isFulfilled = function () { - return (this._bitField & 268435456) > 0; -}; - -PromiseInspection.prototype.isRejected = -Promise.prototype._isRejected = function () { - return (this._bitField & 134217728) > 0; -}; - -PromiseInspection.prototype.isPending = -Promise.prototype._isPending = function () { - return (this._bitField & 402653184) === 0; -}; - -PromiseInspection.prototype.isResolved = -Promise.prototype._isResolved = function () { - return (this._bitField & 402653184) > 0; -}; - -Promise.prototype.isPending = function() { - return this._target()._isPending(); -}; - -Promise.prototype.isRejected = function() { - return this._target()._isRejected(); -}; - -Promise.prototype.isFulfilled = function() { - return this._target()._isFulfilled(); -}; - -Promise.prototype.isResolved = function() { - return this._target()._isResolved(); -}; - -Promise.prototype._value = function() { - return this._settledValue; -}; - -Promise.prototype._reason = function() { - this._unsetRejectionIsUnhandled(); - return this._settledValue; -}; - -Promise.prototype.value = function() { - var target = this._target(); - if (!target.isFulfilled()) { - throw new TypeError("cannot get fulfillment value of a non-fulfilled promise\u000a\u000a See http://goo.gl/hc1DLj\u000a"); - } - return target._settledValue; -}; - -Promise.prototype.reason = function() { - var target = this._target(); - if (!target.isRejected()) { - throw new TypeError("cannot get rejection reason of a non-rejected promise\u000a\u000a See http://goo.gl/hPuiwB\u000a"); - } - target._unsetRejectionIsUnhandled(); - return target._settledValue; -}; - - -Promise.PromiseInspection = PromiseInspection; -}; diff --git a/node_modules/bluebird/js/main/thenables.js b/node_modules/bluebird/js/main/thenables.js deleted file mode 100644 index eadfffb5..00000000 --- a/node_modules/bluebird/js/main/thenables.js +++ /dev/null @@ -1,84 +0,0 @@ -"use strict"; -module.exports = function(Promise, INTERNAL) { -var util = require("./util.js"); -var errorObj = util.errorObj; -var isObject = util.isObject; - -function tryConvertToPromise(obj, context) { - if (isObject(obj)) { - if (obj instanceof Promise) { - return obj; - } - else if (isAnyBluebirdPromise(obj)) { - var ret = new Promise(INTERNAL); - obj._then( - ret._fulfillUnchecked, - ret._rejectUncheckedCheckError, - ret._progressUnchecked, - ret, - null - ); - return ret; - } - var then = util.tryCatch(getThen)(obj); - if (then === errorObj) { - if (context) context._pushContext(); - var ret = Promise.reject(then.e); - if (context) context._popContext(); - return ret; - } else if (typeof then === "function") { - return doThenable(obj, then, context); - } - } - return obj; -} - -function getThen(obj) { - return obj.then; -} - -var hasProp = {}.hasOwnProperty; -function isAnyBluebirdPromise(obj) { - return hasProp.call(obj, "_promise0"); -} - -function doThenable(x, then, context) { - var promise = new Promise(INTERNAL); - var ret = promise; - if (context) context._pushContext(); - promise._captureStackTrace(); - if (context) context._popContext(); - var synchronous = true; - var result = util.tryCatch(then).call(x, - resolveFromThenable, - rejectFromThenable, - progressFromThenable); - synchronous = false; - if (promise && result === errorObj) { - promise._rejectCallback(result.e, true, true); - promise = null; - } - - function resolveFromThenable(value) { - if (!promise) return; - promise._resolveCallback(value); - promise = null; - } - - function rejectFromThenable(reason) { - if (!promise) return; - promise._rejectCallback(reason, synchronous, true); - promise = null; - } - - function progressFromThenable(value) { - if (!promise) return; - if (typeof promise._progress === "function") { - promise._progress(value); - } - } - return ret; -} - -return tryConvertToPromise; -}; diff --git a/node_modules/bluebird/js/main/timers.js b/node_modules/bluebird/js/main/timers.js deleted file mode 100644 index f26431a1..00000000 --- a/node_modules/bluebird/js/main/timers.js +++ /dev/null @@ -1,64 +0,0 @@ -"use strict"; -module.exports = function(Promise, INTERNAL) { -var util = require("./util.js"); -var TimeoutError = Promise.TimeoutError; - -var afterTimeout = function (promise, message) { - if (!promise.isPending()) return; - - var err; - if(!util.isPrimitive(message) && (message instanceof Error)) { - err = message; - } else { - if (typeof message !== "string") { - message = "operation timed out"; - } - err = new TimeoutError(message); - } - util.markAsOriginatingFromRejection(err); - promise._attachExtraTrace(err); - promise._cancel(err); -}; - -var afterValue = function(value) { return delay(+this).thenReturn(value); }; -var delay = Promise.delay = function (value, ms) { - if (ms === undefined) { - ms = value; - value = undefined; - var ret = new Promise(INTERNAL); - setTimeout(function() { ret._fulfill(); }, ms); - return ret; - } - ms = +ms; - return Promise.resolve(value)._then(afterValue, null, null, ms, undefined); -}; - -Promise.prototype.delay = function (ms) { - return delay(this, ms); -}; - -function successClear(value) { - var handle = this; - if (handle instanceof Number) handle = +handle; - clearTimeout(handle); - return value; -} - -function failureClear(reason) { - var handle = this; - if (handle instanceof Number) handle = +handle; - clearTimeout(handle); - throw reason; -} - -Promise.prototype.timeout = function (ms, message) { - ms = +ms; - var ret = this.then().cancellable(); - ret._cancellationParent = this; - var handle = setTimeout(function timeoutTimeout() { - afterTimeout(ret, message); - }, ms); - return ret._then(successClear, failureClear, undefined, handle, undefined); -}; - -}; diff --git a/node_modules/bluebird/js/main/using.js b/node_modules/bluebird/js/main/using.js deleted file mode 100644 index 957182d0..00000000 --- a/node_modules/bluebird/js/main/using.js +++ /dev/null @@ -1,213 +0,0 @@ -"use strict"; -module.exports = function (Promise, apiRejection, tryConvertToPromise, - createContext) { - var TypeError = require("./errors.js").TypeError; - var inherits = require("./util.js").inherits; - var PromiseInspection = Promise.PromiseInspection; - - function inspectionMapper(inspections) { - var len = inspections.length; - for (var i = 0; i < len; ++i) { - var inspection = inspections[i]; - if (inspection.isRejected()) { - return Promise.reject(inspection.error()); - } - inspections[i] = inspection._settledValue; - } - return inspections; - } - - function thrower(e) { - setTimeout(function(){throw e;}, 0); - } - - function castPreservingDisposable(thenable) { - var maybePromise = tryConvertToPromise(thenable); - if (maybePromise !== thenable && - typeof thenable._isDisposable === "function" && - typeof thenable._getDisposer === "function" && - thenable._isDisposable()) { - maybePromise._setDisposable(thenable._getDisposer()); - } - return maybePromise; - } - function dispose(resources, inspection) { - var i = 0; - var len = resources.length; - var ret = Promise.defer(); - function iterator() { - if (i >= len) return ret.resolve(); - var maybePromise = castPreservingDisposable(resources[i++]); - if (maybePromise instanceof Promise && - maybePromise._isDisposable()) { - try { - maybePromise = tryConvertToPromise( - maybePromise._getDisposer().tryDispose(inspection), - resources.promise); - } catch (e) { - return thrower(e); - } - if (maybePromise instanceof Promise) { - return maybePromise._then(iterator, thrower, - null, null, null); - } - } - iterator(); - } - iterator(); - return ret.promise; - } - - function disposerSuccess(value) { - var inspection = new PromiseInspection(); - inspection._settledValue = value; - inspection._bitField = 268435456; - return dispose(this, inspection).thenReturn(value); - } - - function disposerFail(reason) { - var inspection = new PromiseInspection(); - inspection._settledValue = reason; - inspection._bitField = 134217728; - return dispose(this, inspection).thenThrow(reason); - } - - function Disposer(data, promise, context) { - this._data = data; - this._promise = promise; - this._context = context; - } - - Disposer.prototype.data = function () { - return this._data; - }; - - Disposer.prototype.promise = function () { - return this._promise; - }; - - Disposer.prototype.resource = function () { - if (this.promise().isFulfilled()) { - return this.promise().value(); - } - return null; - }; - - Disposer.prototype.tryDispose = function(inspection) { - var resource = this.resource(); - var context = this._context; - if (context !== undefined) context._pushContext(); - var ret = resource !== null - ? this.doDispose(resource, inspection) : null; - if (context !== undefined) context._popContext(); - this._promise._unsetDisposable(); - this._data = null; - return ret; - }; - - Disposer.isDisposer = function (d) { - return (d != null && - typeof d.resource === "function" && - typeof d.tryDispose === "function"); - }; - - function FunctionDisposer(fn, promise, context) { - this.constructor$(fn, promise, context); - } - inherits(FunctionDisposer, Disposer); - - FunctionDisposer.prototype.doDispose = function (resource, inspection) { - var fn = this.data(); - return fn.call(resource, resource, inspection); - }; - - function maybeUnwrapDisposer(value) { - if (Disposer.isDisposer(value)) { - this.resources[this.index]._setDisposable(value); - return value.promise(); - } - return value; - } - - Promise.using = function () { - var len = arguments.length; - if (len < 2) return apiRejection( - "you must pass at least 2 arguments to Promise.using"); - var fn = arguments[len - 1]; - if (typeof fn !== "function") return apiRejection("fn must be a function\u000a\u000a See http://goo.gl/916lJJ\u000a"); - - var input; - var spreadArgs = true; - if (len === 2 && Array.isArray(arguments[0])) { - input = arguments[0]; - len = input.length; - spreadArgs = false; - } else { - input = arguments; - len--; - } - var resources = new Array(len); - for (var i = 0; i < len; ++i) { - var resource = input[i]; - if (Disposer.isDisposer(resource)) { - var disposer = resource; - resource = resource.promise(); - resource._setDisposable(disposer); - } else { - var maybePromise = tryConvertToPromise(resource); - if (maybePromise instanceof Promise) { - resource = - maybePromise._then(maybeUnwrapDisposer, null, null, { - resources: resources, - index: i - }, undefined); - } - } - resources[i] = resource; - } - - var promise = Promise.settle(resources) - .then(inspectionMapper) - .then(function(vals) { - promise._pushContext(); - var ret; - try { - ret = spreadArgs - ? fn.apply(undefined, vals) : fn.call(undefined, vals); - } finally { - promise._popContext(); - } - return ret; - }) - ._then( - disposerSuccess, disposerFail, undefined, resources, undefined); - resources.promise = promise; - return promise; - }; - - Promise.prototype._setDisposable = function (disposer) { - this._bitField = this._bitField | 262144; - this._disposer = disposer; - }; - - Promise.prototype._isDisposable = function () { - return (this._bitField & 262144) > 0; - }; - - Promise.prototype._getDisposer = function () { - return this._disposer; - }; - - Promise.prototype._unsetDisposable = function () { - this._bitField = this._bitField & (~262144); - this._disposer = undefined; - }; - - Promise.prototype.disposer = function (fn) { - if (typeof fn === "function") { - return new FunctionDisposer(fn, this, createContext()); - } - throw new TypeError(); - }; - -}; diff --git a/node_modules/bluebird/js/main/util.js b/node_modules/bluebird/js/main/util.js deleted file mode 100644 index ea393447..00000000 --- a/node_modules/bluebird/js/main/util.js +++ /dev/null @@ -1,321 +0,0 @@ -"use strict"; -var es5 = require("./es5.js"); -var canEvaluate = typeof navigator == "undefined"; -var haveGetters = (function(){ - try { - var o = {}; - es5.defineProperty(o, "f", { - get: function () { - return 3; - } - }); - return o.f === 3; - } - catch (e) { - return false; - } - -})(); - -var errorObj = {e: {}}; -var tryCatchTarget; -function tryCatcher() { - try { - var target = tryCatchTarget; - tryCatchTarget = null; - return target.apply(this, arguments); - } catch (e) { - errorObj.e = e; - return errorObj; - } -} -function tryCatch(fn) { - tryCatchTarget = fn; - return tryCatcher; -} - -var inherits = function(Child, Parent) { - var hasProp = {}.hasOwnProperty; - - function T() { - this.constructor = Child; - this.constructor$ = Parent; - for (var propertyName in Parent.prototype) { - if (hasProp.call(Parent.prototype, propertyName) && - propertyName.charAt(propertyName.length-1) !== "$" - ) { - this[propertyName + "$"] = Parent.prototype[propertyName]; - } - } - } - T.prototype = Parent.prototype; - Child.prototype = new T(); - return Child.prototype; -}; - - -function isPrimitive(val) { - return val == null || val === true || val === false || - typeof val === "string" || typeof val === "number"; - -} - -function isObject(value) { - return !isPrimitive(value); -} - -function maybeWrapAsError(maybeError) { - if (!isPrimitive(maybeError)) return maybeError; - - return new Error(safeToString(maybeError)); -} - -function withAppended(target, appendee) { - var len = target.length; - var ret = new Array(len + 1); - var i; - for (i = 0; i < len; ++i) { - ret[i] = target[i]; - } - ret[i] = appendee; - return ret; -} - -function getDataPropertyOrDefault(obj, key, defaultValue) { - if (es5.isES5) { - var desc = Object.getOwnPropertyDescriptor(obj, key); - - if (desc != null) { - return desc.get == null && desc.set == null - ? desc.value - : defaultValue; - } - } else { - return {}.hasOwnProperty.call(obj, key) ? obj[key] : undefined; - } -} - -function notEnumerableProp(obj, name, value) { - if (isPrimitive(obj)) return obj; - var descriptor = { - value: value, - configurable: true, - enumerable: false, - writable: true - }; - es5.defineProperty(obj, name, descriptor); - return obj; -} - -function thrower(r) { - throw r; -} - -var inheritedDataKeys = (function() { - var excludedPrototypes = [ - Array.prototype, - Object.prototype, - Function.prototype - ]; - - var isExcludedProto = function(val) { - for (var i = 0; i < excludedPrototypes.length; ++i) { - if (excludedPrototypes[i] === val) { - return true; - } - } - return false; - }; - - if (es5.isES5) { - var getKeys = Object.getOwnPropertyNames; - return function(obj) { - var ret = []; - var visitedKeys = Object.create(null); - while (obj != null && !isExcludedProto(obj)) { - var keys; - try { - keys = getKeys(obj); - } catch (e) { - return ret; - } - for (var i = 0; i < keys.length; ++i) { - var key = keys[i]; - if (visitedKeys[key]) continue; - visitedKeys[key] = true; - var desc = Object.getOwnPropertyDescriptor(obj, key); - if (desc != null && desc.get == null && desc.set == null) { - ret.push(key); - } - } - obj = es5.getPrototypeOf(obj); - } - return ret; - }; - } else { - var hasProp = {}.hasOwnProperty; - return function(obj) { - if (isExcludedProto(obj)) return []; - var ret = []; - - /*jshint forin:false */ - enumeration: for (var key in obj) { - if (hasProp.call(obj, key)) { - ret.push(key); - } else { - for (var i = 0; i < excludedPrototypes.length; ++i) { - if (hasProp.call(excludedPrototypes[i], key)) { - continue enumeration; - } - } - ret.push(key); - } - } - return ret; - }; - } - -})(); - -var thisAssignmentPattern = /this\s*\.\s*\S+\s*=/; -function isClass(fn) { - try { - if (typeof fn === "function") { - var keys = es5.names(fn.prototype); - - var hasMethods = es5.isES5 && keys.length > 1; - var hasMethodsOtherThanConstructor = keys.length > 0 && - !(keys.length === 1 && keys[0] === "constructor"); - var hasThisAssignmentAndStaticMethods = - thisAssignmentPattern.test(fn + "") && es5.names(fn).length > 0; - - if (hasMethods || hasMethodsOtherThanConstructor || - hasThisAssignmentAndStaticMethods) { - return true; - } - } - return false; - } catch (e) { - return false; - } -} - -function toFastProperties(obj) { - /*jshint -W027,-W055,-W031*/ - function f() {} - f.prototype = obj; - var l = 8; - while (l--) new f(); - return obj; - eval(obj); -} - -var rident = /^[a-z$_][a-z$_0-9]*$/i; -function isIdentifier(str) { - return rident.test(str); -} - -function filledRange(count, prefix, suffix) { - var ret = new Array(count); - for(var i = 0; i < count; ++i) { - ret[i] = prefix + i + suffix; - } - return ret; -} - -function safeToString(obj) { - try { - return obj + ""; - } catch (e) { - return "[no string representation]"; - } -} - -function markAsOriginatingFromRejection(e) { - try { - notEnumerableProp(e, "isOperational", true); - } - catch(ignore) {} -} - -function originatesFromRejection(e) { - if (e == null) return false; - return ((e instanceof Error["__BluebirdErrorTypes__"].OperationalError) || - e["isOperational"] === true); -} - -function canAttachTrace(obj) { - return obj instanceof Error && es5.propertyIsWritable(obj, "stack"); -} - -var ensureErrorObject = (function() { - if (!("stack" in new Error())) { - return function(value) { - if (canAttachTrace(value)) return value; - try {throw new Error(safeToString(value));} - catch(err) {return err;} - }; - } else { - return function(value) { - if (canAttachTrace(value)) return value; - return new Error(safeToString(value)); - }; - } -})(); - -function classString(obj) { - return {}.toString.call(obj); -} - -function copyDescriptors(from, to, filter) { - var keys = es5.names(from); - for (var i = 0; i < keys.length; ++i) { - var key = keys[i]; - if (filter(key)) { - try { - es5.defineProperty(to, key, es5.getDescriptor(from, key)); - } catch (ignore) {} - } - } -} - -var ret = { - isClass: isClass, - isIdentifier: isIdentifier, - inheritedDataKeys: inheritedDataKeys, - getDataPropertyOrDefault: getDataPropertyOrDefault, - thrower: thrower, - isArray: es5.isArray, - haveGetters: haveGetters, - notEnumerableProp: notEnumerableProp, - isPrimitive: isPrimitive, - isObject: isObject, - canEvaluate: canEvaluate, - errorObj: errorObj, - tryCatch: tryCatch, - inherits: inherits, - withAppended: withAppended, - maybeWrapAsError: maybeWrapAsError, - toFastProperties: toFastProperties, - filledRange: filledRange, - toString: safeToString, - canAttachTrace: canAttachTrace, - ensureErrorObject: ensureErrorObject, - originatesFromRejection: originatesFromRejection, - markAsOriginatingFromRejection: markAsOriginatingFromRejection, - classString: classString, - copyDescriptors: copyDescriptors, - hasDevTools: typeof chrome !== "undefined" && chrome && - typeof chrome.loadTimes === "function", - isNode: typeof process !== "undefined" && - classString(process).toLowerCase() === "[object process]" -}; -ret.isRecentNode = ret.isNode && (function() { - var version = process.versions.node.split(".").map(Number); - return (version[0] === 0 && version[1] > 10) || (version[0] > 0); -})(); - -if (ret.isNode) ret.toFastProperties(process); - -try {throw new Error(); } catch (e) {ret.lastLineError = e;} -module.exports = ret; diff --git a/node_modules/bluebird/package.json b/node_modules/bluebird/package.json deleted file mode 100644 index 06d0e5db..00000000 --- a/node_modules/bluebird/package.json +++ /dev/null @@ -1,140 +0,0 @@ -{ - "_args": [ - [ - { - "raw": "bluebird@^2.9.30", - "scope": null, - "escapedName": "bluebird", - "name": "bluebird", - "rawSpec": "^2.9.30", - "spec": ">=2.9.30 <3.0.0", - "type": "range" - }, - "/Users/benjaminarias/Desktop/poly/node_modules/google-auth-library/node_modules/har-validator" - ] - ], - "_from": "bluebird@>=2.9.30 <3.0.0", - "_id": "bluebird@2.11.0", - "_inCache": true, - "_installable": true, - "_location": "/bluebird", - "_nodeVersion": "6.4.0", - "_npmOperationalInternal": { - "host": "packages-12-west.internal.npmjs.com", - "tmp": "tmp/bluebird-2.11.0.tgz_1472582304041_0.4355931559111923" - }, - "_npmUser": { - "name": "esailija", - "email": "petka_antonov@hotmail.com" - }, - "_npmVersion": "3.10.3", - "_phantomChildren": {}, - "_requested": { - "raw": "bluebird@^2.9.30", - "scope": null, - "escapedName": "bluebird", - "name": "bluebird", - "rawSpec": "^2.9.30", - "spec": ">=2.9.30 <3.0.0", - "type": "range" - }, - "_requiredBy": [ - "/google-auth-library/har-validator" - ], - "_resolved": "https://registry.npmjs.org/bluebird/-/bluebird-2.11.0.tgz", - "_shasum": "534b9033c022c9579c56ba3b3e5a5caafbb650e1", - "_shrinkwrap": null, - "_spec": "bluebird@^2.9.30", - "_where": "/Users/benjaminarias/Desktop/poly/node_modules/google-auth-library/node_modules/har-validator", - "author": { - "name": "Petka Antonov", - "email": "petka_antonov@hotmail.com", - "url": "http://github.com/petkaantonov/" - }, - "browser": "./js/browser/bluebird.js", - "bugs": { - "url": "http://github.com/petkaantonov/bluebird/issues" - }, - "dependencies": {}, - "description": "Full featured Promises/A+ implementation with exceptionally good performance", - "devDependencies": { - "acorn": "~0.6.0", - "baconjs": "^0.7.43", - "bluebird": "^2.9.2", - "body-parser": "^1.10.2", - "browserify": "^8.1.1", - "cli-table": "~0.3.1", - "co": "^4.2.0", - "cross-spawn": "^0.2.3", - "glob": "^4.3.2", - "grunt-saucelabs": "~8.4.1", - "highland": "^2.3.0", - "istanbul": "^0.3.5", - "jshint": "^2.6.0", - "jshint-stylish": "~0.2.0", - "kefir": "^2.4.1", - "mkdirp": "~0.5.0", - "mocha": "~2.1", - "open": "~0.0.5", - "optimist": "~0.6.1", - "rimraf": "~2.2.6", - "rx": "^2.3.25", - "serve-static": "^1.7.1", - "sinon": "~1.7.3", - "uglify-js": "~2.4.16" - }, - "directories": {}, - "dist": { - "shasum": "534b9033c022c9579c56ba3b3e5a5caafbb650e1", - "tarball": "https://registry.npmjs.org/bluebird/-/bluebird-2.11.0.tgz" - }, - "files": [ - "js/browser", - "js/main", - "js/zalgo", - "zalgo.js" - ], - "gitHead": "c9f2ef8960c00a6eb49be7e02a83562c5df8409d", - "homepage": "https://github.com/petkaantonov/bluebird", - "keywords": [ - "promise", - "performance", - "promises", - "promises-a", - "promises-aplus", - "async", - "await", - "deferred", - "deferreds", - "future", - "flow control", - "dsl", - "fluent interface", - "parallel", - "thread", - "concurrency" - ], - "license": "MIT", - "main": "./js/main/bluebird.js", - "maintainers": [ - { - "name": "esailija", - "email": "petka_antonov@hotmail.com" - } - ], - "name": "bluebird", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git://github.com/petkaantonov/bluebird.git" - }, - "scripts": { - "generate-browser-core": "node tools/build.js --features=core --no-debug --main --zalgo --browser --minify && mv js/browser/bluebird.js js/browser/bluebird.core.js && mv js/browser/bluebird.min.js js/browser/bluebird.core.min.js", - "istanbul": "istanbul", - "lint": "node scripts/jshint.js", - "prepublish": "node tools/build.js --no-debug --main --zalgo --browser --minify", - "test": "node tools/test.js" - }, - "version": "2.11.0" -} diff --git a/node_modules/bn.js/.npmignore b/node_modules/bn.js/.npmignore deleted file mode 100644 index 6d1eebbd..00000000 --- a/node_modules/bn.js/.npmignore +++ /dev/null @@ -1,6 +0,0 @@ -benchmarks/ -coverage/ -node_modules/ -npm-debug.log -1.js -logo.png diff --git a/node_modules/bn.js/.travis.yml b/node_modules/bn.js/.travis.yml deleted file mode 100644 index 936b7b78..00000000 --- a/node_modules/bn.js/.travis.yml +++ /dev/null @@ -1,15 +0,0 @@ -sudo: false -language: node_js -node_js: - - "0.10" - - "0.12" - - "4" - - "5" -env: - matrix: - - TEST_SUITE=unit -matrix: - include: - - node_js: "4" - env: TEST_SUITE=lint -script: npm run $TEST_SUITE diff --git a/node_modules/bn.js/README.md b/node_modules/bn.js/README.md deleted file mode 100644 index fee65baa..00000000 --- a/node_modules/bn.js/README.md +++ /dev/null @@ -1,219 +0,0 @@ -# bn.js - -> BigNum in pure javascript - -[![Build Status](https://secure.travis-ci.org/indutny/bn.js.png)](http://travis-ci.org/indutny/bn.js) - -## Install -`npm install --save bn.js` - -## Usage - -```js -const BN = require('bn.js'); - -var a = new BN('dead', 16); -var b = new BN('101010', 2); - -var res = a.add(b); -console.log(res.toString(10)); // 57047 -``` - -**Note**: decimals are not supported in this library. - -## Notation - -### Prefixes - -There are several prefixes to instructions that affect the way the work. Here -is the list of them in the order of appearance in the function name: - -* `i` - perform operation in-place, storing the result in the host object (on - which the method was invoked). Might be used to avoid number allocation costs -* `u` - unsigned, ignore the sign of operands when performing operation, or - always return positive value. Second case applies to reduction operations - like `mod()`. In such cases if the result will be negative - modulo will be - added to the result to make it positive - -### Postfixes - -The only available postfix at the moment is: - -* `n` - which means that the argument of the function must be a plain JavaScript - number - -### Examples - -* `a.iadd(b)` - perform addition on `a` and `b`, storing the result in `a` -* `a.pmod(b)` - reduce `a` modulo `b`, returning positive value -* `a.iushln(13)` - shift bits of `a` left by 13 - -## Instructions - -Prefixes/postfixes are put in parens at the of the line. `endian` - could be -either `le` (little-endian) or `be` (big-endian). - -### Utilities - -* `a.clone()` - clone number -* `a.toString(base, length)` - convert to base-string and pad with zeroes -* `a.toNumber()` - convert to Javascript Number (limited to 53 bits) -* `a.toJSON()` - convert to JSON compatible hex string (alias of `toString(16)`) -* `a.toArray(endian, length)` - convert to byte `Array`, and optionally zero - pad to length, throwing if already exceeding -* `a.toArrayLike(type, endian, length)` - convert to an instance of `type`, - which must behave like an `Array` -* `a.toBuffer(endian, length)` - convert to Node.js Buffer (if available) -* `a.bitLength()` - get number of bits occupied -* `a.zeroBits()` - return number of less-significant consequent zero bits - (example: `1010000` has 4 zero bits) -* `a.byteLength()` - return number of bytes occupied -* `a.isNeg()` - true if the number is negative -* `a.isEven()` - no comments -* `a.isOdd()` - no comments -* `a.isZero()` - no comments -* `a.cmp(b)` - compare numbers and return `-1` (a `<` b), `0` (a `==` b), or `1` (a `>` b) - depending on the comparison result (`ucmp`, `cmpn`) -* `a.lt(b)` - `a` less than `b` (`n`) -* `a.lte(b)` - `a` less than or equals `b` (`n`) -* `a.gt(b)` - `a` greater than `b` (`n`) -* `a.gte(b)` - `a` greater than or equals `b` (`n`) -* `a.eq(b)` - `a` equals `b` (`n`) -* `a.toTwos(width)` - convert to two's complement representation, where `width` is bit width -* `a.fromTwos(width)` - convert from two's complement representation, where `width` is the bit width -* `a.isBN(object)` - returns true if the supplied `object` is a BN.js instance - -### Arithmetics - -* `a.neg()` - negate sign (`i`) -* `a.abs()` - absolute value (`i`) -* `a.add(b)` - addition (`i`, `n`, `in`) -* `a.sub(b)` - subtraction (`i`, `n`, `in`) -* `a.mul(b)` - multiply (`i`, `n`, `in`) -* `a.sqr()` - square (`i`) -* `a.pow(b)` - raise `a` to the power of `b` -* `a.div(b)` - divide (`divn`, `idivn`) -* `a.mod(b)` - reduct (`u`, `n`) (but no `umodn`) -* `a.divRound(b)` - rounded division - -### Bit operations - -* `a.or(b)` - or (`i`, `u`, `iu`) -* `a.and(b)` - and (`i`, `u`, `iu`, `andln`) (NOTE: `andln` is going to be replaced - with `andn` in future) -* `a.xor(b)` - xor (`i`, `u`, `iu`) -* `a.setn(b)` - set specified bit to `1` -* `a.shln(b)` - shift left (`i`, `u`, `iu`) -* `a.shrn(b)` - shift right (`i`, `u`, `iu`) -* `a.testn(b)` - test if specified bit is set -* `a.maskn(b)` - clear bits with indexes higher or equal to `b` (`i`) -* `a.bincn(b)` - add `1 << b` to the number -* `a.notn(w)` - not (for the width specified by `w`) (`i`) - -### Reduction - -* `a.gcd(b)` - GCD -* `a.egcd(b)` - Extended GCD results (`{ a: ..., b: ..., gcd: ... }`) -* `a.invm(b)` - inverse `a` modulo `b` - -## Fast reduction - -When doing lots of reductions using the same modulo, it might be beneficial to -use some tricks: like [Montgomery multiplication][0], or using special algorithm -for [Mersenne Prime][1]. - -### Reduction context - -To enable this tricks one should create a reduction context: - -```js -var red = BN.red(num); -``` -where `num` is just a BN instance. - -Or: - -```js -var red = BN.red(primeName); -``` - -Where `primeName` is either of these [Mersenne Primes][1]: - -* `'k256'` -* `'p224'` -* `'p192'` -* `'p25519'` - -Or: - -```js -var red = BN.mont(num); -``` - -To reduce numbers with [Montgomery trick][1]. `.mont()` is generally faster than -`.red(num)`, but slower than `BN.red(primeName)`. - -### Converting numbers - -Before performing anything in reduction context - numbers should be converted -to it. Usually, this means that one should: - -* Convert inputs to reducted ones -* Operate on them in reduction context -* Convert outputs back from the reduction context - -Here is how one may convert numbers to `red`: - -```js -var redA = a.toRed(red); -``` -Where `red` is a reduction context created using instructions above - -Here is how to convert them back: - -```js -var a = redA.fromRed(); -``` - -### Red instructions - -Most of the instructions from the very start of this readme have their -counterparts in red context: - -* `a.redAdd(b)`, `a.redIAdd(b)` -* `a.redSub(b)`, `a.redISub(b)` -* `a.redShl(num)` -* `a.redMul(b)`, `a.redIMul(b)` -* `a.redSqr()`, `a.redISqr()` -* `a.redSqrt()` - square root modulo reduction context's prime -* `a.redInvm()` - modular inverse of the number -* `a.redNeg()` -* `a.redPow(b)` - modular exponentiation - -## LICENSE - -This software is licensed under the MIT License. - -Copyright Fedor Indutny, 2015. - -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. - -[0]: https://en.wikipedia.org/wiki/Montgomery_modular_multiplication -[1]: https://en.wikipedia.org/wiki/Mersenne_prime diff --git a/node_modules/bn.js/lib/bn.js b/node_modules/bn.js/lib/bn.js deleted file mode 100644 index 29a4c51a..00000000 --- a/node_modules/bn.js/lib/bn.js +++ /dev/null @@ -1,3427 +0,0 @@ -(function (module, exports) { - 'use strict'; - - // Utils - function assert (val, msg) { - if (!val) throw new Error(msg || 'Assertion failed'); - } - - // Could use `inherits` module, but don't want to move from single file - // architecture yet. - function inherits (ctor, superCtor) { - ctor.super_ = superCtor; - var TempCtor = function () {}; - TempCtor.prototype = superCtor.prototype; - ctor.prototype = new TempCtor(); - ctor.prototype.constructor = ctor; - } - - // BN - - function BN (number, base, endian) { - if (BN.isBN(number)) { - return number; - } - - this.negative = 0; - this.words = null; - this.length = 0; - - // Reduction context - this.red = null; - - if (number !== null) { - if (base === 'le' || base === 'be') { - endian = base; - base = 10; - } - - this._init(number || 0, base || 10, endian || 'be'); - } - } - if (typeof module === 'object') { - module.exports = BN; - } else { - exports.BN = BN; - } - - BN.BN = BN; - BN.wordSize = 26; - - var Buffer; - try { - Buffer = require('buf' + 'fer').Buffer; - } catch (e) { - } - - BN.isBN = function isBN (num) { - if (num instanceof BN) { - return true; - } - - return num !== null && typeof num === 'object' && - num.constructor.wordSize === BN.wordSize && Array.isArray(num.words); - }; - - BN.max = function max (left, right) { - if (left.cmp(right) > 0) return left; - return right; - }; - - BN.min = function min (left, right) { - if (left.cmp(right) < 0) return left; - return right; - }; - - BN.prototype._init = function init (number, base, endian) { - if (typeof number === 'number') { - return this._initNumber(number, base, endian); - } - - if (typeof number === 'object') { - return this._initArray(number, base, endian); - } - - if (base === 'hex') { - base = 16; - } - assert(base === (base | 0) && base >= 2 && base <= 36); - - number = number.toString().replace(/\s+/g, ''); - var start = 0; - if (number[0] === '-') { - start++; - } - - if (base === 16) { - this._parseHex(number, start); - } else { - this._parseBase(number, base, start); - } - - if (number[0] === '-') { - this.negative = 1; - } - - this.strip(); - - if (endian !== 'le') return; - - this._initArray(this.toArray(), base, endian); - }; - - BN.prototype._initNumber = function _initNumber (number, base, endian) { - if (number < 0) { - this.negative = 1; - number = -number; - } - if (number < 0x4000000) { - this.words = [ number & 0x3ffffff ]; - this.length = 1; - } else if (number < 0x10000000000000) { - this.words = [ - number & 0x3ffffff, - (number / 0x4000000) & 0x3ffffff - ]; - this.length = 2; - } else { - assert(number < 0x20000000000000); // 2 ^ 53 (unsafe) - this.words = [ - number & 0x3ffffff, - (number / 0x4000000) & 0x3ffffff, - 1 - ]; - this.length = 3; - } - - if (endian !== 'le') return; - - // Reverse the bytes - this._initArray(this.toArray(), base, endian); - }; - - BN.prototype._initArray = function _initArray (number, base, endian) { - // Perhaps a Uint8Array - assert(typeof number.length === 'number'); - if (number.length <= 0) { - this.words = [ 0 ]; - this.length = 1; - return this; - } - - this.length = Math.ceil(number.length / 3); - this.words = new Array(this.length); - for (var i = 0; i < this.length; i++) { - this.words[i] = 0; - } - - var j, w; - var off = 0; - if (endian === 'be') { - for (i = number.length - 1, j = 0; i >= 0; i -= 3) { - w = number[i] | (number[i - 1] << 8) | (number[i - 2] << 16); - this.words[j] |= (w << off) & 0x3ffffff; - this.words[j + 1] = (w >>> (26 - off)) & 0x3ffffff; - off += 24; - if (off >= 26) { - off -= 26; - j++; - } - } - } else if (endian === 'le') { - for (i = 0, j = 0; i < number.length; i += 3) { - w = number[i] | (number[i + 1] << 8) | (number[i + 2] << 16); - this.words[j] |= (w << off) & 0x3ffffff; - this.words[j + 1] = (w >>> (26 - off)) & 0x3ffffff; - off += 24; - if (off >= 26) { - off -= 26; - j++; - } - } - } - return this.strip(); - }; - - function parseHex (str, start, end) { - var r = 0; - var len = Math.min(str.length, end); - for (var i = start; i < len; i++) { - var c = str.charCodeAt(i) - 48; - - r <<= 4; - - // 'a' - 'f' - if (c >= 49 && c <= 54) { - r |= c - 49 + 0xa; - - // 'A' - 'F' - } else if (c >= 17 && c <= 22) { - r |= c - 17 + 0xa; - - // '0' - '9' - } else { - r |= c & 0xf; - } - } - return r; - } - - BN.prototype._parseHex = function _parseHex (number, start) { - // Create possibly bigger array to ensure that it fits the number - this.length = Math.ceil((number.length - start) / 6); - this.words = new Array(this.length); - for (var i = 0; i < this.length; i++) { - this.words[i] = 0; - } - - var j, w; - // Scan 24-bit chunks and add them to the number - var off = 0; - for (i = number.length - 6, j = 0; i >= start; i -= 6) { - w = parseHex(number, i, i + 6); - this.words[j] |= (w << off) & 0x3ffffff; - // NOTE: `0x3fffff` is intentional here, 26bits max shift + 24bit hex limb - this.words[j + 1] |= w >>> (26 - off) & 0x3fffff; - off += 24; - if (off >= 26) { - off -= 26; - j++; - } - } - if (i + 6 !== start) { - w = parseHex(number, start, i + 6); - this.words[j] |= (w << off) & 0x3ffffff; - this.words[j + 1] |= w >>> (26 - off) & 0x3fffff; - } - this.strip(); - }; - - function parseBase (str, start, end, mul) { - var r = 0; - var len = Math.min(str.length, end); - for (var i = start; i < len; i++) { - var c = str.charCodeAt(i) - 48; - - r *= mul; - - // 'a' - if (c >= 49) { - r += c - 49 + 0xa; - - // 'A' - } else if (c >= 17) { - r += c - 17 + 0xa; - - // '0' - '9' - } else { - r += c; - } - } - return r; - } - - BN.prototype._parseBase = function _parseBase (number, base, start) { - // Initialize as zero - this.words = [ 0 ]; - this.length = 1; - - // Find length of limb in base - for (var limbLen = 0, limbPow = 1; limbPow <= 0x3ffffff; limbPow *= base) { - limbLen++; - } - limbLen--; - limbPow = (limbPow / base) | 0; - - var total = number.length - start; - var mod = total % limbLen; - var end = Math.min(total, total - mod) + start; - - var word = 0; - for (var i = start; i < end; i += limbLen) { - word = parseBase(number, i, i + limbLen, base); - - this.imuln(limbPow); - if (this.words[0] + word < 0x4000000) { - this.words[0] += word; - } else { - this._iaddn(word); - } - } - - if (mod !== 0) { - var pow = 1; - word = parseBase(number, i, number.length, base); - - for (i = 0; i < mod; i++) { - pow *= base; - } - - this.imuln(pow); - if (this.words[0] + word < 0x4000000) { - this.words[0] += word; - } else { - this._iaddn(word); - } - } - }; - - BN.prototype.copy = function copy (dest) { - dest.words = new Array(this.length); - for (var i = 0; i < this.length; i++) { - dest.words[i] = this.words[i]; - } - dest.length = this.length; - dest.negative = this.negative; - dest.red = this.red; - }; - - BN.prototype.clone = function clone () { - var r = new BN(null); - this.copy(r); - return r; - }; - - BN.prototype._expand = function _expand (size) { - while (this.length < size) { - this.words[this.length++] = 0; - } - return this; - }; - - // Remove leading `0` from `this` - BN.prototype.strip = function strip () { - while (this.length > 1 && this.words[this.length - 1] === 0) { - this.length--; - } - return this._normSign(); - }; - - BN.prototype._normSign = function _normSign () { - // -0 = 0 - if (this.length === 1 && this.words[0] === 0) { - this.negative = 0; - } - return this; - }; - - BN.prototype.inspect = function inspect () { - return (this.red ? ''; - }; - - /* - - var zeros = []; - var groupSizes = []; - var groupBases = []; - - var s = ''; - var i = -1; - while (++i < BN.wordSize) { - zeros[i] = s; - s += '0'; - } - groupSizes[0] = 0; - groupSizes[1] = 0; - groupBases[0] = 0; - groupBases[1] = 0; - var base = 2 - 1; - while (++base < 36 + 1) { - var groupSize = 0; - var groupBase = 1; - while (groupBase < (1 << BN.wordSize) / base) { - groupBase *= base; - groupSize += 1; - } - groupSizes[base] = groupSize; - groupBases[base] = groupBase; - } - - */ - - var zeros = [ - '', - '0', - '00', - '000', - '0000', - '00000', - '000000', - '0000000', - '00000000', - '000000000', - '0000000000', - '00000000000', - '000000000000', - '0000000000000', - '00000000000000', - '000000000000000', - '0000000000000000', - '00000000000000000', - '000000000000000000', - '0000000000000000000', - '00000000000000000000', - '000000000000000000000', - '0000000000000000000000', - '00000000000000000000000', - '000000000000000000000000', - '0000000000000000000000000' - ]; - - var groupSizes = [ - 0, 0, - 25, 16, 12, 11, 10, 9, 8, - 8, 7, 7, 7, 7, 6, 6, - 6, 6, 6, 6, 6, 5, 5, - 5, 5, 5, 5, 5, 5, 5, - 5, 5, 5, 5, 5, 5, 5 - ]; - - var groupBases = [ - 0, 0, - 33554432, 43046721, 16777216, 48828125, 60466176, 40353607, 16777216, - 43046721, 10000000, 19487171, 35831808, 62748517, 7529536, 11390625, - 16777216, 24137569, 34012224, 47045881, 64000000, 4084101, 5153632, - 6436343, 7962624, 9765625, 11881376, 14348907, 17210368, 20511149, - 24300000, 28629151, 33554432, 39135393, 45435424, 52521875, 60466176 - ]; - - BN.prototype.toString = function toString (base, padding) { - base = base || 10; - padding = padding | 0 || 1; - - var out; - if (base === 16 || base === 'hex') { - out = ''; - var off = 0; - var carry = 0; - for (var i = 0; i < this.length; i++) { - var w = this.words[i]; - var word = (((w << off) | carry) & 0xffffff).toString(16); - carry = (w >>> (24 - off)) & 0xffffff; - if (carry !== 0 || i !== this.length - 1) { - out = zeros[6 - word.length] + word + out; - } else { - out = word + out; - } - off += 2; - if (off >= 26) { - off -= 26; - i--; - } - } - if (carry !== 0) { - out = carry.toString(16) + out; - } - while (out.length % padding !== 0) { - out = '0' + out; - } - if (this.negative !== 0) { - out = '-' + out; - } - return out; - } - - if (base === (base | 0) && base >= 2 && base <= 36) { - // var groupSize = Math.floor(BN.wordSize * Math.LN2 / Math.log(base)); - var groupSize = groupSizes[base]; - // var groupBase = Math.pow(base, groupSize); - var groupBase = groupBases[base]; - out = ''; - var c = this.clone(); - c.negative = 0; - while (!c.isZero()) { - var r = c.modn(groupBase).toString(base); - c = c.idivn(groupBase); - - if (!c.isZero()) { - out = zeros[groupSize - r.length] + r + out; - } else { - out = r + out; - } - } - if (this.isZero()) { - out = '0' + out; - } - while (out.length % padding !== 0) { - out = '0' + out; - } - if (this.negative !== 0) { - out = '-' + out; - } - return out; - } - - assert(false, 'Base should be between 2 and 36'); - }; - - BN.prototype.toNumber = function toNumber () { - var ret = this.words[0]; - if (this.length === 2) { - ret += this.words[1] * 0x4000000; - } else if (this.length === 3 && this.words[2] === 0x01) { - // NOTE: at this stage it is known that the top bit is set - ret += 0x10000000000000 + (this.words[1] * 0x4000000); - } else if (this.length > 2) { - assert(false, 'Number can only safely store up to 53 bits'); - } - return (this.negative !== 0) ? -ret : ret; - }; - - BN.prototype.toJSON = function toJSON () { - return this.toString(16); - }; - - BN.prototype.toBuffer = function toBuffer (endian, length) { - assert(typeof Buffer !== 'undefined'); - return this.toArrayLike(Buffer, endian, length); - }; - - BN.prototype.toArray = function toArray (endian, length) { - return this.toArrayLike(Array, endian, length); - }; - - BN.prototype.toArrayLike = function toArrayLike (ArrayType, endian, length) { - var byteLength = this.byteLength(); - var reqLength = length || Math.max(1, byteLength); - assert(byteLength <= reqLength, 'byte array longer than desired length'); - assert(reqLength > 0, 'Requested array length <= 0'); - - this.strip(); - var littleEndian = endian === 'le'; - var res = new ArrayType(reqLength); - - var b, i; - var q = this.clone(); - if (!littleEndian) { - // Assume big-endian - for (i = 0; i < reqLength - byteLength; i++) { - res[i] = 0; - } - - for (i = 0; !q.isZero(); i++) { - b = q.andln(0xff); - q.iushrn(8); - - res[reqLength - i - 1] = b; - } - } else { - for (i = 0; !q.isZero(); i++) { - b = q.andln(0xff); - q.iushrn(8); - - res[i] = b; - } - - for (; i < reqLength; i++) { - res[i] = 0; - } - } - - return res; - }; - - if (Math.clz32) { - BN.prototype._countBits = function _countBits (w) { - return 32 - Math.clz32(w); - }; - } else { - BN.prototype._countBits = function _countBits (w) { - var t = w; - var r = 0; - if (t >= 0x1000) { - r += 13; - t >>>= 13; - } - if (t >= 0x40) { - r += 7; - t >>>= 7; - } - if (t >= 0x8) { - r += 4; - t >>>= 4; - } - if (t >= 0x02) { - r += 2; - t >>>= 2; - } - return r + t; - }; - } - - BN.prototype._zeroBits = function _zeroBits (w) { - // Short-cut - if (w === 0) return 26; - - var t = w; - var r = 0; - if ((t & 0x1fff) === 0) { - r += 13; - t >>>= 13; - } - if ((t & 0x7f) === 0) { - r += 7; - t >>>= 7; - } - if ((t & 0xf) === 0) { - r += 4; - t >>>= 4; - } - if ((t & 0x3) === 0) { - r += 2; - t >>>= 2; - } - if ((t & 0x1) === 0) { - r++; - } - return r; - }; - - // Return number of used bits in a BN - BN.prototype.bitLength = function bitLength () { - var w = this.words[this.length - 1]; - var hi = this._countBits(w); - return (this.length - 1) * 26 + hi; - }; - - function toBitArray (num) { - var w = new Array(num.bitLength()); - - for (var bit = 0; bit < w.length; bit++) { - var off = (bit / 26) | 0; - var wbit = bit % 26; - - w[bit] = (num.words[off] & (1 << wbit)) >>> wbit; - } - - return w; - } - - // Number of trailing zero bits - BN.prototype.zeroBits = function zeroBits () { - if (this.isZero()) return 0; - - var r = 0; - for (var i = 0; i < this.length; i++) { - var b = this._zeroBits(this.words[i]); - r += b; - if (b !== 26) break; - } - return r; - }; - - BN.prototype.byteLength = function byteLength () { - return Math.ceil(this.bitLength() / 8); - }; - - BN.prototype.toTwos = function toTwos (width) { - if (this.negative !== 0) { - return this.abs().inotn(width).iaddn(1); - } - return this.clone(); - }; - - BN.prototype.fromTwos = function fromTwos (width) { - if (this.testn(width - 1)) { - return this.notn(width).iaddn(1).ineg(); - } - return this.clone(); - }; - - BN.prototype.isNeg = function isNeg () { - return this.negative !== 0; - }; - - // Return negative clone of `this` - BN.prototype.neg = function neg () { - return this.clone().ineg(); - }; - - BN.prototype.ineg = function ineg () { - if (!this.isZero()) { - this.negative ^= 1; - } - - return this; - }; - - // Or `num` with `this` in-place - BN.prototype.iuor = function iuor (num) { - while (this.length < num.length) { - this.words[this.length++] = 0; - } - - for (var i = 0; i < num.length; i++) { - this.words[i] = this.words[i] | num.words[i]; - } - - return this.strip(); - }; - - BN.prototype.ior = function ior (num) { - assert((this.negative | num.negative) === 0); - return this.iuor(num); - }; - - // Or `num` with `this` - BN.prototype.or = function or (num) { - if (this.length > num.length) return this.clone().ior(num); - return num.clone().ior(this); - }; - - BN.prototype.uor = function uor (num) { - if (this.length > num.length) return this.clone().iuor(num); - return num.clone().iuor(this); - }; - - // And `num` with `this` in-place - BN.prototype.iuand = function iuand (num) { - // b = min-length(num, this) - var b; - if (this.length > num.length) { - b = num; - } else { - b = this; - } - - for (var i = 0; i < b.length; i++) { - this.words[i] = this.words[i] & num.words[i]; - } - - this.length = b.length; - - return this.strip(); - }; - - BN.prototype.iand = function iand (num) { - assert((this.negative | num.negative) === 0); - return this.iuand(num); - }; - - // And `num` with `this` - BN.prototype.and = function and (num) { - if (this.length > num.length) return this.clone().iand(num); - return num.clone().iand(this); - }; - - BN.prototype.uand = function uand (num) { - if (this.length > num.length) return this.clone().iuand(num); - return num.clone().iuand(this); - }; - - // Xor `num` with `this` in-place - BN.prototype.iuxor = function iuxor (num) { - // a.length > b.length - var a; - var b; - if (this.length > num.length) { - a = this; - b = num; - } else { - a = num; - b = this; - } - - for (var i = 0; i < b.length; i++) { - this.words[i] = a.words[i] ^ b.words[i]; - } - - if (this !== a) { - for (; i < a.length; i++) { - this.words[i] = a.words[i]; - } - } - - this.length = a.length; - - return this.strip(); - }; - - BN.prototype.ixor = function ixor (num) { - assert((this.negative | num.negative) === 0); - return this.iuxor(num); - }; - - // Xor `num` with `this` - BN.prototype.xor = function xor (num) { - if (this.length > num.length) return this.clone().ixor(num); - return num.clone().ixor(this); - }; - - BN.prototype.uxor = function uxor (num) { - if (this.length > num.length) return this.clone().iuxor(num); - return num.clone().iuxor(this); - }; - - // Not ``this`` with ``width`` bitwidth - BN.prototype.inotn = function inotn (width) { - assert(typeof width === 'number' && width >= 0); - - var bytesNeeded = Math.ceil(width / 26) | 0; - var bitsLeft = width % 26; - - // Extend the buffer with leading zeroes - this._expand(bytesNeeded); - - if (bitsLeft > 0) { - bytesNeeded--; - } - - // Handle complete words - for (var i = 0; i < bytesNeeded; i++) { - this.words[i] = ~this.words[i] & 0x3ffffff; - } - - // Handle the residue - if (bitsLeft > 0) { - this.words[i] = ~this.words[i] & (0x3ffffff >> (26 - bitsLeft)); - } - - // And remove leading zeroes - return this.strip(); - }; - - BN.prototype.notn = function notn (width) { - return this.clone().inotn(width); - }; - - // Set `bit` of `this` - BN.prototype.setn = function setn (bit, val) { - assert(typeof bit === 'number' && bit >= 0); - - var off = (bit / 26) | 0; - var wbit = bit % 26; - - this._expand(off + 1); - - if (val) { - this.words[off] = this.words[off] | (1 << wbit); - } else { - this.words[off] = this.words[off] & ~(1 << wbit); - } - - return this.strip(); - }; - - // Add `num` to `this` in-place - BN.prototype.iadd = function iadd (num) { - var r; - - // negative + positive - if (this.negative !== 0 && num.negative === 0) { - this.negative = 0; - r = this.isub(num); - this.negative ^= 1; - return this._normSign(); - - // positive + negative - } else if (this.negative === 0 && num.negative !== 0) { - num.negative = 0; - r = this.isub(num); - num.negative = 1; - return r._normSign(); - } - - // a.length > b.length - var a, b; - if (this.length > num.length) { - a = this; - b = num; - } else { - a = num; - b = this; - } - - var carry = 0; - for (var i = 0; i < b.length; i++) { - r = (a.words[i] | 0) + (b.words[i] | 0) + carry; - this.words[i] = r & 0x3ffffff; - carry = r >>> 26; - } - for (; carry !== 0 && i < a.length; i++) { - r = (a.words[i] | 0) + carry; - this.words[i] = r & 0x3ffffff; - carry = r >>> 26; - } - - this.length = a.length; - if (carry !== 0) { - this.words[this.length] = carry; - this.length++; - // Copy the rest of the words - } else if (a !== this) { - for (; i < a.length; i++) { - this.words[i] = a.words[i]; - } - } - - return this; - }; - - // Add `num` to `this` - BN.prototype.add = function add (num) { - var res; - if (num.negative !== 0 && this.negative === 0) { - num.negative = 0; - res = this.sub(num); - num.negative ^= 1; - return res; - } else if (num.negative === 0 && this.negative !== 0) { - this.negative = 0; - res = num.sub(this); - this.negative = 1; - return res; - } - - if (this.length > num.length) return this.clone().iadd(num); - - return num.clone().iadd(this); - }; - - // Subtract `num` from `this` in-place - BN.prototype.isub = function isub (num) { - // this - (-num) = this + num - if (num.negative !== 0) { - num.negative = 0; - var r = this.iadd(num); - num.negative = 1; - return r._normSign(); - - // -this - num = -(this + num) - } else if (this.negative !== 0) { - this.negative = 0; - this.iadd(num); - this.negative = 1; - return this._normSign(); - } - - // At this point both numbers are positive - var cmp = this.cmp(num); - - // Optimization - zeroify - if (cmp === 0) { - this.negative = 0; - this.length = 1; - this.words[0] = 0; - return this; - } - - // a > b - var a, b; - if (cmp > 0) { - a = this; - b = num; - } else { - a = num; - b = this; - } - - var carry = 0; - for (var i = 0; i < b.length; i++) { - r = (a.words[i] | 0) - (b.words[i] | 0) + carry; - carry = r >> 26; - this.words[i] = r & 0x3ffffff; - } - for (; carry !== 0 && i < a.length; i++) { - r = (a.words[i] | 0) + carry; - carry = r >> 26; - this.words[i] = r & 0x3ffffff; - } - - // Copy rest of the words - if (carry === 0 && i < a.length && a !== this) { - for (; i < a.length; i++) { - this.words[i] = a.words[i]; - } - } - - this.length = Math.max(this.length, i); - - if (a !== this) { - this.negative = 1; - } - - return this.strip(); - }; - - // Subtract `num` from `this` - BN.prototype.sub = function sub (num) { - return this.clone().isub(num); - }; - - function smallMulTo (self, num, out) { - out.negative = num.negative ^ self.negative; - var len = (self.length + num.length) | 0; - out.length = len; - len = (len - 1) | 0; - - // Peel one iteration (compiler can't do it, because of code complexity) - var a = self.words[0] | 0; - var b = num.words[0] | 0; - var r = a * b; - - var lo = r & 0x3ffffff; - var carry = (r / 0x4000000) | 0; - out.words[0] = lo; - - for (var k = 1; k < len; k++) { - // Sum all words with the same `i + j = k` and accumulate `ncarry`, - // note that ncarry could be >= 0x3ffffff - var ncarry = carry >>> 26; - var rword = carry & 0x3ffffff; - var maxJ = Math.min(k, num.length - 1); - for (var j = Math.max(0, k - self.length + 1); j <= maxJ; j++) { - var i = (k - j) | 0; - a = self.words[i] | 0; - b = num.words[j] | 0; - r = a * b + rword; - ncarry += (r / 0x4000000) | 0; - rword = r & 0x3ffffff; - } - out.words[k] = rword | 0; - carry = ncarry | 0; - } - if (carry !== 0) { - out.words[k] = carry | 0; - } else { - out.length--; - } - - return out.strip(); - } - - // TODO(indutny): it may be reasonable to omit it for users who don't need - // to work with 256-bit numbers, otherwise it gives 20% improvement for 256-bit - // multiplication (like elliptic secp256k1). - var comb10MulTo = function comb10MulTo (self, num, out) { - var a = self.words; - var b = num.words; - var o = out.words; - var c = 0; - var lo; - var mid; - var hi; - var a0 = a[0] | 0; - var al0 = a0 & 0x1fff; - var ah0 = a0 >>> 13; - var a1 = a[1] | 0; - var al1 = a1 & 0x1fff; - var ah1 = a1 >>> 13; - var a2 = a[2] | 0; - var al2 = a2 & 0x1fff; - var ah2 = a2 >>> 13; - var a3 = a[3] | 0; - var al3 = a3 & 0x1fff; - var ah3 = a3 >>> 13; - var a4 = a[4] | 0; - var al4 = a4 & 0x1fff; - var ah4 = a4 >>> 13; - var a5 = a[5] | 0; - var al5 = a5 & 0x1fff; - var ah5 = a5 >>> 13; - var a6 = a[6] | 0; - var al6 = a6 & 0x1fff; - var ah6 = a6 >>> 13; - var a7 = a[7] | 0; - var al7 = a7 & 0x1fff; - var ah7 = a7 >>> 13; - var a8 = a[8] | 0; - var al8 = a8 & 0x1fff; - var ah8 = a8 >>> 13; - var a9 = a[9] | 0; - var al9 = a9 & 0x1fff; - var ah9 = a9 >>> 13; - var b0 = b[0] | 0; - var bl0 = b0 & 0x1fff; - var bh0 = b0 >>> 13; - var b1 = b[1] | 0; - var bl1 = b1 & 0x1fff; - var bh1 = b1 >>> 13; - var b2 = b[2] | 0; - var bl2 = b2 & 0x1fff; - var bh2 = b2 >>> 13; - var b3 = b[3] | 0; - var bl3 = b3 & 0x1fff; - var bh3 = b3 >>> 13; - var b4 = b[4] | 0; - var bl4 = b4 & 0x1fff; - var bh4 = b4 >>> 13; - var b5 = b[5] | 0; - var bl5 = b5 & 0x1fff; - var bh5 = b5 >>> 13; - var b6 = b[6] | 0; - var bl6 = b6 & 0x1fff; - var bh6 = b6 >>> 13; - var b7 = b[7] | 0; - var bl7 = b7 & 0x1fff; - var bh7 = b7 >>> 13; - var b8 = b[8] | 0; - var bl8 = b8 & 0x1fff; - var bh8 = b8 >>> 13; - var b9 = b[9] | 0; - var bl9 = b9 & 0x1fff; - var bh9 = b9 >>> 13; - - out.negative = self.negative ^ num.negative; - out.length = 19; - /* k = 0 */ - lo = Math.imul(al0, bl0); - mid = Math.imul(al0, bh0); - mid = (mid + Math.imul(ah0, bl0)) | 0; - hi = Math.imul(ah0, bh0); - var w0 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0; - c = (((hi + (mid >>> 13)) | 0) + (w0 >>> 26)) | 0; - w0 &= 0x3ffffff; - /* k = 1 */ - lo = Math.imul(al1, bl0); - mid = Math.imul(al1, bh0); - mid = (mid + Math.imul(ah1, bl0)) | 0; - hi = Math.imul(ah1, bh0); - lo = (lo + Math.imul(al0, bl1)) | 0; - mid = (mid + Math.imul(al0, bh1)) | 0; - mid = (mid + Math.imul(ah0, bl1)) | 0; - hi = (hi + Math.imul(ah0, bh1)) | 0; - var w1 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0; - c = (((hi + (mid >>> 13)) | 0) + (w1 >>> 26)) | 0; - w1 &= 0x3ffffff; - /* k = 2 */ - lo = Math.imul(al2, bl0); - mid = Math.imul(al2, bh0); - mid = (mid + Math.imul(ah2, bl0)) | 0; - hi = Math.imul(ah2, bh0); - lo = (lo + Math.imul(al1, bl1)) | 0; - mid = (mid + Math.imul(al1, bh1)) | 0; - mid = (mid + Math.imul(ah1, bl1)) | 0; - hi = (hi + Math.imul(ah1, bh1)) | 0; - lo = (lo + Math.imul(al0, bl2)) | 0; - mid = (mid + Math.imul(al0, bh2)) | 0; - mid = (mid + Math.imul(ah0, bl2)) | 0; - hi = (hi + Math.imul(ah0, bh2)) | 0; - var w2 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0; - c = (((hi + (mid >>> 13)) | 0) + (w2 >>> 26)) | 0; - w2 &= 0x3ffffff; - /* k = 3 */ - lo = Math.imul(al3, bl0); - mid = Math.imul(al3, bh0); - mid = (mid + Math.imul(ah3, bl0)) | 0; - hi = Math.imul(ah3, bh0); - lo = (lo + Math.imul(al2, bl1)) | 0; - mid = (mid + Math.imul(al2, bh1)) | 0; - mid = (mid + Math.imul(ah2, bl1)) | 0; - hi = (hi + Math.imul(ah2, bh1)) | 0; - lo = (lo + Math.imul(al1, bl2)) | 0; - mid = (mid + Math.imul(al1, bh2)) | 0; - mid = (mid + Math.imul(ah1, bl2)) | 0; - hi = (hi + Math.imul(ah1, bh2)) | 0; - lo = (lo + Math.imul(al0, bl3)) | 0; - mid = (mid + Math.imul(al0, bh3)) | 0; - mid = (mid + Math.imul(ah0, bl3)) | 0; - hi = (hi + Math.imul(ah0, bh3)) | 0; - var w3 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0; - c = (((hi + (mid >>> 13)) | 0) + (w3 >>> 26)) | 0; - w3 &= 0x3ffffff; - /* k = 4 */ - lo = Math.imul(al4, bl0); - mid = Math.imul(al4, bh0); - mid = (mid + Math.imul(ah4, bl0)) | 0; - hi = Math.imul(ah4, bh0); - lo = (lo + Math.imul(al3, bl1)) | 0; - mid = (mid + Math.imul(al3, bh1)) | 0; - mid = (mid + Math.imul(ah3, bl1)) | 0; - hi = (hi + Math.imul(ah3, bh1)) | 0; - lo = (lo + Math.imul(al2, bl2)) | 0; - mid = (mid + Math.imul(al2, bh2)) | 0; - mid = (mid + Math.imul(ah2, bl2)) | 0; - hi = (hi + Math.imul(ah2, bh2)) | 0; - lo = (lo + Math.imul(al1, bl3)) | 0; - mid = (mid + Math.imul(al1, bh3)) | 0; - mid = (mid + Math.imul(ah1, bl3)) | 0; - hi = (hi + Math.imul(ah1, bh3)) | 0; - lo = (lo + Math.imul(al0, bl4)) | 0; - mid = (mid + Math.imul(al0, bh4)) | 0; - mid = (mid + Math.imul(ah0, bl4)) | 0; - hi = (hi + Math.imul(ah0, bh4)) | 0; - var w4 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0; - c = (((hi + (mid >>> 13)) | 0) + (w4 >>> 26)) | 0; - w4 &= 0x3ffffff; - /* k = 5 */ - lo = Math.imul(al5, bl0); - mid = Math.imul(al5, bh0); - mid = (mid + Math.imul(ah5, bl0)) | 0; - hi = Math.imul(ah5, bh0); - lo = (lo + Math.imul(al4, bl1)) | 0; - mid = (mid + Math.imul(al4, bh1)) | 0; - mid = (mid + Math.imul(ah4, bl1)) | 0; - hi = (hi + Math.imul(ah4, bh1)) | 0; - lo = (lo + Math.imul(al3, bl2)) | 0; - mid = (mid + Math.imul(al3, bh2)) | 0; - mid = (mid + Math.imul(ah3, bl2)) | 0; - hi = (hi + Math.imul(ah3, bh2)) | 0; - lo = (lo + Math.imul(al2, bl3)) | 0; - mid = (mid + Math.imul(al2, bh3)) | 0; - mid = (mid + Math.imul(ah2, bl3)) | 0; - hi = (hi + Math.imul(ah2, bh3)) | 0; - lo = (lo + Math.imul(al1, bl4)) | 0; - mid = (mid + Math.imul(al1, bh4)) | 0; - mid = (mid + Math.imul(ah1, bl4)) | 0; - hi = (hi + Math.imul(ah1, bh4)) | 0; - lo = (lo + Math.imul(al0, bl5)) | 0; - mid = (mid + Math.imul(al0, bh5)) | 0; - mid = (mid + Math.imul(ah0, bl5)) | 0; - hi = (hi + Math.imul(ah0, bh5)) | 0; - var w5 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0; - c = (((hi + (mid >>> 13)) | 0) + (w5 >>> 26)) | 0; - w5 &= 0x3ffffff; - /* k = 6 */ - lo = Math.imul(al6, bl0); - mid = Math.imul(al6, bh0); - mid = (mid + Math.imul(ah6, bl0)) | 0; - hi = Math.imul(ah6, bh0); - lo = (lo + Math.imul(al5, bl1)) | 0; - mid = (mid + Math.imul(al5, bh1)) | 0; - mid = (mid + Math.imul(ah5, bl1)) | 0; - hi = (hi + Math.imul(ah5, bh1)) | 0; - lo = (lo + Math.imul(al4, bl2)) | 0; - mid = (mid + Math.imul(al4, bh2)) | 0; - mid = (mid + Math.imul(ah4, bl2)) | 0; - hi = (hi + Math.imul(ah4, bh2)) | 0; - lo = (lo + Math.imul(al3, bl3)) | 0; - mid = (mid + Math.imul(al3, bh3)) | 0; - mid = (mid + Math.imul(ah3, bl3)) | 0; - hi = (hi + Math.imul(ah3, bh3)) | 0; - lo = (lo + Math.imul(al2, bl4)) | 0; - mid = (mid + Math.imul(al2, bh4)) | 0; - mid = (mid + Math.imul(ah2, bl4)) | 0; - hi = (hi + Math.imul(ah2, bh4)) | 0; - lo = (lo + Math.imul(al1, bl5)) | 0; - mid = (mid + Math.imul(al1, bh5)) | 0; - mid = (mid + Math.imul(ah1, bl5)) | 0; - hi = (hi + Math.imul(ah1, bh5)) | 0; - lo = (lo + Math.imul(al0, bl6)) | 0; - mid = (mid + Math.imul(al0, bh6)) | 0; - mid = (mid + Math.imul(ah0, bl6)) | 0; - hi = (hi + Math.imul(ah0, bh6)) | 0; - var w6 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0; - c = (((hi + (mid >>> 13)) | 0) + (w6 >>> 26)) | 0; - w6 &= 0x3ffffff; - /* k = 7 */ - lo = Math.imul(al7, bl0); - mid = Math.imul(al7, bh0); - mid = (mid + Math.imul(ah7, bl0)) | 0; - hi = Math.imul(ah7, bh0); - lo = (lo + Math.imul(al6, bl1)) | 0; - mid = (mid + Math.imul(al6, bh1)) | 0; - mid = (mid + Math.imul(ah6, bl1)) | 0; - hi = (hi + Math.imul(ah6, bh1)) | 0; - lo = (lo + Math.imul(al5, bl2)) | 0; - mid = (mid + Math.imul(al5, bh2)) | 0; - mid = (mid + Math.imul(ah5, bl2)) | 0; - hi = (hi + Math.imul(ah5, bh2)) | 0; - lo = (lo + Math.imul(al4, bl3)) | 0; - mid = (mid + Math.imul(al4, bh3)) | 0; - mid = (mid + Math.imul(ah4, bl3)) | 0; - hi = (hi + Math.imul(ah4, bh3)) | 0; - lo = (lo + Math.imul(al3, bl4)) | 0; - mid = (mid + Math.imul(al3, bh4)) | 0; - mid = (mid + Math.imul(ah3, bl4)) | 0; - hi = (hi + Math.imul(ah3, bh4)) | 0; - lo = (lo + Math.imul(al2, bl5)) | 0; - mid = (mid + Math.imul(al2, bh5)) | 0; - mid = (mid + Math.imul(ah2, bl5)) | 0; - hi = (hi + Math.imul(ah2, bh5)) | 0; - lo = (lo + Math.imul(al1, bl6)) | 0; - mid = (mid + Math.imul(al1, bh6)) | 0; - mid = (mid + Math.imul(ah1, bl6)) | 0; - hi = (hi + Math.imul(ah1, bh6)) | 0; - lo = (lo + Math.imul(al0, bl7)) | 0; - mid = (mid + Math.imul(al0, bh7)) | 0; - mid = (mid + Math.imul(ah0, bl7)) | 0; - hi = (hi + Math.imul(ah0, bh7)) | 0; - var w7 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0; - c = (((hi + (mid >>> 13)) | 0) + (w7 >>> 26)) | 0; - w7 &= 0x3ffffff; - /* k = 8 */ - lo = Math.imul(al8, bl0); - mid = Math.imul(al8, bh0); - mid = (mid + Math.imul(ah8, bl0)) | 0; - hi = Math.imul(ah8, bh0); - lo = (lo + Math.imul(al7, bl1)) | 0; - mid = (mid + Math.imul(al7, bh1)) | 0; - mid = (mid + Math.imul(ah7, bl1)) | 0; - hi = (hi + Math.imul(ah7, bh1)) | 0; - lo = (lo + Math.imul(al6, bl2)) | 0; - mid = (mid + Math.imul(al6, bh2)) | 0; - mid = (mid + Math.imul(ah6, bl2)) | 0; - hi = (hi + Math.imul(ah6, bh2)) | 0; - lo = (lo + Math.imul(al5, bl3)) | 0; - mid = (mid + Math.imul(al5, bh3)) | 0; - mid = (mid + Math.imul(ah5, bl3)) | 0; - hi = (hi + Math.imul(ah5, bh3)) | 0; - lo = (lo + Math.imul(al4, bl4)) | 0; - mid = (mid + Math.imul(al4, bh4)) | 0; - mid = (mid + Math.imul(ah4, bl4)) | 0; - hi = (hi + Math.imul(ah4, bh4)) | 0; - lo = (lo + Math.imul(al3, bl5)) | 0; - mid = (mid + Math.imul(al3, bh5)) | 0; - mid = (mid + Math.imul(ah3, bl5)) | 0; - hi = (hi + Math.imul(ah3, bh5)) | 0; - lo = (lo + Math.imul(al2, bl6)) | 0; - mid = (mid + Math.imul(al2, bh6)) | 0; - mid = (mid + Math.imul(ah2, bl6)) | 0; - hi = (hi + Math.imul(ah2, bh6)) | 0; - lo = (lo + Math.imul(al1, bl7)) | 0; - mid = (mid + Math.imul(al1, bh7)) | 0; - mid = (mid + Math.imul(ah1, bl7)) | 0; - hi = (hi + Math.imul(ah1, bh7)) | 0; - lo = (lo + Math.imul(al0, bl8)) | 0; - mid = (mid + Math.imul(al0, bh8)) | 0; - mid = (mid + Math.imul(ah0, bl8)) | 0; - hi = (hi + Math.imul(ah0, bh8)) | 0; - var w8 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0; - c = (((hi + (mid >>> 13)) | 0) + (w8 >>> 26)) | 0; - w8 &= 0x3ffffff; - /* k = 9 */ - lo = Math.imul(al9, bl0); - mid = Math.imul(al9, bh0); - mid = (mid + Math.imul(ah9, bl0)) | 0; - hi = Math.imul(ah9, bh0); - lo = (lo + Math.imul(al8, bl1)) | 0; - mid = (mid + Math.imul(al8, bh1)) | 0; - mid = (mid + Math.imul(ah8, bl1)) | 0; - hi = (hi + Math.imul(ah8, bh1)) | 0; - lo = (lo + Math.imul(al7, bl2)) | 0; - mid = (mid + Math.imul(al7, bh2)) | 0; - mid = (mid + Math.imul(ah7, bl2)) | 0; - hi = (hi + Math.imul(ah7, bh2)) | 0; - lo = (lo + Math.imul(al6, bl3)) | 0; - mid = (mid + Math.imul(al6, bh3)) | 0; - mid = (mid + Math.imul(ah6, bl3)) | 0; - hi = (hi + Math.imul(ah6, bh3)) | 0; - lo = (lo + Math.imul(al5, bl4)) | 0; - mid = (mid + Math.imul(al5, bh4)) | 0; - mid = (mid + Math.imul(ah5, bl4)) | 0; - hi = (hi + Math.imul(ah5, bh4)) | 0; - lo = (lo + Math.imul(al4, bl5)) | 0; - mid = (mid + Math.imul(al4, bh5)) | 0; - mid = (mid + Math.imul(ah4, bl5)) | 0; - hi = (hi + Math.imul(ah4, bh5)) | 0; - lo = (lo + Math.imul(al3, bl6)) | 0; - mid = (mid + Math.imul(al3, bh6)) | 0; - mid = (mid + Math.imul(ah3, bl6)) | 0; - hi = (hi + Math.imul(ah3, bh6)) | 0; - lo = (lo + Math.imul(al2, bl7)) | 0; - mid = (mid + Math.imul(al2, bh7)) | 0; - mid = (mid + Math.imul(ah2, bl7)) | 0; - hi = (hi + Math.imul(ah2, bh7)) | 0; - lo = (lo + Math.imul(al1, bl8)) | 0; - mid = (mid + Math.imul(al1, bh8)) | 0; - mid = (mid + Math.imul(ah1, bl8)) | 0; - hi = (hi + Math.imul(ah1, bh8)) | 0; - lo = (lo + Math.imul(al0, bl9)) | 0; - mid = (mid + Math.imul(al0, bh9)) | 0; - mid = (mid + Math.imul(ah0, bl9)) | 0; - hi = (hi + Math.imul(ah0, bh9)) | 0; - var w9 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0; - c = (((hi + (mid >>> 13)) | 0) + (w9 >>> 26)) | 0; - w9 &= 0x3ffffff; - /* k = 10 */ - lo = Math.imul(al9, bl1); - mid = Math.imul(al9, bh1); - mid = (mid + Math.imul(ah9, bl1)) | 0; - hi = Math.imul(ah9, bh1); - lo = (lo + Math.imul(al8, bl2)) | 0; - mid = (mid + Math.imul(al8, bh2)) | 0; - mid = (mid + Math.imul(ah8, bl2)) | 0; - hi = (hi + Math.imul(ah8, bh2)) | 0; - lo = (lo + Math.imul(al7, bl3)) | 0; - mid = (mid + Math.imul(al7, bh3)) | 0; - mid = (mid + Math.imul(ah7, bl3)) | 0; - hi = (hi + Math.imul(ah7, bh3)) | 0; - lo = (lo + Math.imul(al6, bl4)) | 0; - mid = (mid + Math.imul(al6, bh4)) | 0; - mid = (mid + Math.imul(ah6, bl4)) | 0; - hi = (hi + Math.imul(ah6, bh4)) | 0; - lo = (lo + Math.imul(al5, bl5)) | 0; - mid = (mid + Math.imul(al5, bh5)) | 0; - mid = (mid + Math.imul(ah5, bl5)) | 0; - hi = (hi + Math.imul(ah5, bh5)) | 0; - lo = (lo + Math.imul(al4, bl6)) | 0; - mid = (mid + Math.imul(al4, bh6)) | 0; - mid = (mid + Math.imul(ah4, bl6)) | 0; - hi = (hi + Math.imul(ah4, bh6)) | 0; - lo = (lo + Math.imul(al3, bl7)) | 0; - mid = (mid + Math.imul(al3, bh7)) | 0; - mid = (mid + Math.imul(ah3, bl7)) | 0; - hi = (hi + Math.imul(ah3, bh7)) | 0; - lo = (lo + Math.imul(al2, bl8)) | 0; - mid = (mid + Math.imul(al2, bh8)) | 0; - mid = (mid + Math.imul(ah2, bl8)) | 0; - hi = (hi + Math.imul(ah2, bh8)) | 0; - lo = (lo + Math.imul(al1, bl9)) | 0; - mid = (mid + Math.imul(al1, bh9)) | 0; - mid = (mid + Math.imul(ah1, bl9)) | 0; - hi = (hi + Math.imul(ah1, bh9)) | 0; - var w10 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0; - c = (((hi + (mid >>> 13)) | 0) + (w10 >>> 26)) | 0; - w10 &= 0x3ffffff; - /* k = 11 */ - lo = Math.imul(al9, bl2); - mid = Math.imul(al9, bh2); - mid = (mid + Math.imul(ah9, bl2)) | 0; - hi = Math.imul(ah9, bh2); - lo = (lo + Math.imul(al8, bl3)) | 0; - mid = (mid + Math.imul(al8, bh3)) | 0; - mid = (mid + Math.imul(ah8, bl3)) | 0; - hi = (hi + Math.imul(ah8, bh3)) | 0; - lo = (lo + Math.imul(al7, bl4)) | 0; - mid = (mid + Math.imul(al7, bh4)) | 0; - mid = (mid + Math.imul(ah7, bl4)) | 0; - hi = (hi + Math.imul(ah7, bh4)) | 0; - lo = (lo + Math.imul(al6, bl5)) | 0; - mid = (mid + Math.imul(al6, bh5)) | 0; - mid = (mid + Math.imul(ah6, bl5)) | 0; - hi = (hi + Math.imul(ah6, bh5)) | 0; - lo = (lo + Math.imul(al5, bl6)) | 0; - mid = (mid + Math.imul(al5, bh6)) | 0; - mid = (mid + Math.imul(ah5, bl6)) | 0; - hi = (hi + Math.imul(ah5, bh6)) | 0; - lo = (lo + Math.imul(al4, bl7)) | 0; - mid = (mid + Math.imul(al4, bh7)) | 0; - mid = (mid + Math.imul(ah4, bl7)) | 0; - hi = (hi + Math.imul(ah4, bh7)) | 0; - lo = (lo + Math.imul(al3, bl8)) | 0; - mid = (mid + Math.imul(al3, bh8)) | 0; - mid = (mid + Math.imul(ah3, bl8)) | 0; - hi = (hi + Math.imul(ah3, bh8)) | 0; - lo = (lo + Math.imul(al2, bl9)) | 0; - mid = (mid + Math.imul(al2, bh9)) | 0; - mid = (mid + Math.imul(ah2, bl9)) | 0; - hi = (hi + Math.imul(ah2, bh9)) | 0; - var w11 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0; - c = (((hi + (mid >>> 13)) | 0) + (w11 >>> 26)) | 0; - w11 &= 0x3ffffff; - /* k = 12 */ - lo = Math.imul(al9, bl3); - mid = Math.imul(al9, bh3); - mid = (mid + Math.imul(ah9, bl3)) | 0; - hi = Math.imul(ah9, bh3); - lo = (lo + Math.imul(al8, bl4)) | 0; - mid = (mid + Math.imul(al8, bh4)) | 0; - mid = (mid + Math.imul(ah8, bl4)) | 0; - hi = (hi + Math.imul(ah8, bh4)) | 0; - lo = (lo + Math.imul(al7, bl5)) | 0; - mid = (mid + Math.imul(al7, bh5)) | 0; - mid = (mid + Math.imul(ah7, bl5)) | 0; - hi = (hi + Math.imul(ah7, bh5)) | 0; - lo = (lo + Math.imul(al6, bl6)) | 0; - mid = (mid + Math.imul(al6, bh6)) | 0; - mid = (mid + Math.imul(ah6, bl6)) | 0; - hi = (hi + Math.imul(ah6, bh6)) | 0; - lo = (lo + Math.imul(al5, bl7)) | 0; - mid = (mid + Math.imul(al5, bh7)) | 0; - mid = (mid + Math.imul(ah5, bl7)) | 0; - hi = (hi + Math.imul(ah5, bh7)) | 0; - lo = (lo + Math.imul(al4, bl8)) | 0; - mid = (mid + Math.imul(al4, bh8)) | 0; - mid = (mid + Math.imul(ah4, bl8)) | 0; - hi = (hi + Math.imul(ah4, bh8)) | 0; - lo = (lo + Math.imul(al3, bl9)) | 0; - mid = (mid + Math.imul(al3, bh9)) | 0; - mid = (mid + Math.imul(ah3, bl9)) | 0; - hi = (hi + Math.imul(ah3, bh9)) | 0; - var w12 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0; - c = (((hi + (mid >>> 13)) | 0) + (w12 >>> 26)) | 0; - w12 &= 0x3ffffff; - /* k = 13 */ - lo = Math.imul(al9, bl4); - mid = Math.imul(al9, bh4); - mid = (mid + Math.imul(ah9, bl4)) | 0; - hi = Math.imul(ah9, bh4); - lo = (lo + Math.imul(al8, bl5)) | 0; - mid = (mid + Math.imul(al8, bh5)) | 0; - mid = (mid + Math.imul(ah8, bl5)) | 0; - hi = (hi + Math.imul(ah8, bh5)) | 0; - lo = (lo + Math.imul(al7, bl6)) | 0; - mid = (mid + Math.imul(al7, bh6)) | 0; - mid = (mid + Math.imul(ah7, bl6)) | 0; - hi = (hi + Math.imul(ah7, bh6)) | 0; - lo = (lo + Math.imul(al6, bl7)) | 0; - mid = (mid + Math.imul(al6, bh7)) | 0; - mid = (mid + Math.imul(ah6, bl7)) | 0; - hi = (hi + Math.imul(ah6, bh7)) | 0; - lo = (lo + Math.imul(al5, bl8)) | 0; - mid = (mid + Math.imul(al5, bh8)) | 0; - mid = (mid + Math.imul(ah5, bl8)) | 0; - hi = (hi + Math.imul(ah5, bh8)) | 0; - lo = (lo + Math.imul(al4, bl9)) | 0; - mid = (mid + Math.imul(al4, bh9)) | 0; - mid = (mid + Math.imul(ah4, bl9)) | 0; - hi = (hi + Math.imul(ah4, bh9)) | 0; - var w13 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0; - c = (((hi + (mid >>> 13)) | 0) + (w13 >>> 26)) | 0; - w13 &= 0x3ffffff; - /* k = 14 */ - lo = Math.imul(al9, bl5); - mid = Math.imul(al9, bh5); - mid = (mid + Math.imul(ah9, bl5)) | 0; - hi = Math.imul(ah9, bh5); - lo = (lo + Math.imul(al8, bl6)) | 0; - mid = (mid + Math.imul(al8, bh6)) | 0; - mid = (mid + Math.imul(ah8, bl6)) | 0; - hi = (hi + Math.imul(ah8, bh6)) | 0; - lo = (lo + Math.imul(al7, bl7)) | 0; - mid = (mid + Math.imul(al7, bh7)) | 0; - mid = (mid + Math.imul(ah7, bl7)) | 0; - hi = (hi + Math.imul(ah7, bh7)) | 0; - lo = (lo + Math.imul(al6, bl8)) | 0; - mid = (mid + Math.imul(al6, bh8)) | 0; - mid = (mid + Math.imul(ah6, bl8)) | 0; - hi = (hi + Math.imul(ah6, bh8)) | 0; - lo = (lo + Math.imul(al5, bl9)) | 0; - mid = (mid + Math.imul(al5, bh9)) | 0; - mid = (mid + Math.imul(ah5, bl9)) | 0; - hi = (hi + Math.imul(ah5, bh9)) | 0; - var w14 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0; - c = (((hi + (mid >>> 13)) | 0) + (w14 >>> 26)) | 0; - w14 &= 0x3ffffff; - /* k = 15 */ - lo = Math.imul(al9, bl6); - mid = Math.imul(al9, bh6); - mid = (mid + Math.imul(ah9, bl6)) | 0; - hi = Math.imul(ah9, bh6); - lo = (lo + Math.imul(al8, bl7)) | 0; - mid = (mid + Math.imul(al8, bh7)) | 0; - mid = (mid + Math.imul(ah8, bl7)) | 0; - hi = (hi + Math.imul(ah8, bh7)) | 0; - lo = (lo + Math.imul(al7, bl8)) | 0; - mid = (mid + Math.imul(al7, bh8)) | 0; - mid = (mid + Math.imul(ah7, bl8)) | 0; - hi = (hi + Math.imul(ah7, bh8)) | 0; - lo = (lo + Math.imul(al6, bl9)) | 0; - mid = (mid + Math.imul(al6, bh9)) | 0; - mid = (mid + Math.imul(ah6, bl9)) | 0; - hi = (hi + Math.imul(ah6, bh9)) | 0; - var w15 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0; - c = (((hi + (mid >>> 13)) | 0) + (w15 >>> 26)) | 0; - w15 &= 0x3ffffff; - /* k = 16 */ - lo = Math.imul(al9, bl7); - mid = Math.imul(al9, bh7); - mid = (mid + Math.imul(ah9, bl7)) | 0; - hi = Math.imul(ah9, bh7); - lo = (lo + Math.imul(al8, bl8)) | 0; - mid = (mid + Math.imul(al8, bh8)) | 0; - mid = (mid + Math.imul(ah8, bl8)) | 0; - hi = (hi + Math.imul(ah8, bh8)) | 0; - lo = (lo + Math.imul(al7, bl9)) | 0; - mid = (mid + Math.imul(al7, bh9)) | 0; - mid = (mid + Math.imul(ah7, bl9)) | 0; - hi = (hi + Math.imul(ah7, bh9)) | 0; - var w16 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0; - c = (((hi + (mid >>> 13)) | 0) + (w16 >>> 26)) | 0; - w16 &= 0x3ffffff; - /* k = 17 */ - lo = Math.imul(al9, bl8); - mid = Math.imul(al9, bh8); - mid = (mid + Math.imul(ah9, bl8)) | 0; - hi = Math.imul(ah9, bh8); - lo = (lo + Math.imul(al8, bl9)) | 0; - mid = (mid + Math.imul(al8, bh9)) | 0; - mid = (mid + Math.imul(ah8, bl9)) | 0; - hi = (hi + Math.imul(ah8, bh9)) | 0; - var w17 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0; - c = (((hi + (mid >>> 13)) | 0) + (w17 >>> 26)) | 0; - w17 &= 0x3ffffff; - /* k = 18 */ - lo = Math.imul(al9, bl9); - mid = Math.imul(al9, bh9); - mid = (mid + Math.imul(ah9, bl9)) | 0; - hi = Math.imul(ah9, bh9); - var w18 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0; - c = (((hi + (mid >>> 13)) | 0) + (w18 >>> 26)) | 0; - w18 &= 0x3ffffff; - o[0] = w0; - o[1] = w1; - o[2] = w2; - o[3] = w3; - o[4] = w4; - o[5] = w5; - o[6] = w6; - o[7] = w7; - o[8] = w8; - o[9] = w9; - o[10] = w10; - o[11] = w11; - o[12] = w12; - o[13] = w13; - o[14] = w14; - o[15] = w15; - o[16] = w16; - o[17] = w17; - o[18] = w18; - if (c !== 0) { - o[19] = c; - out.length++; - } - return out; - }; - - // Polyfill comb - if (!Math.imul) { - comb10MulTo = smallMulTo; - } - - function bigMulTo (self, num, out) { - out.negative = num.negative ^ self.negative; - out.length = self.length + num.length; - - var carry = 0; - var hncarry = 0; - for (var k = 0; k < out.length - 1; k++) { - // Sum all words with the same `i + j = k` and accumulate `ncarry`, - // note that ncarry could be >= 0x3ffffff - var ncarry = hncarry; - hncarry = 0; - var rword = carry & 0x3ffffff; - var maxJ = Math.min(k, num.length - 1); - for (var j = Math.max(0, k - self.length + 1); j <= maxJ; j++) { - var i = k - j; - var a = self.words[i] | 0; - var b = num.words[j] | 0; - var r = a * b; - - var lo = r & 0x3ffffff; - ncarry = (ncarry + ((r / 0x4000000) | 0)) | 0; - lo = (lo + rword) | 0; - rword = lo & 0x3ffffff; - ncarry = (ncarry + (lo >>> 26)) | 0; - - hncarry += ncarry >>> 26; - ncarry &= 0x3ffffff; - } - out.words[k] = rword; - carry = ncarry; - ncarry = hncarry; - } - if (carry !== 0) { - out.words[k] = carry; - } else { - out.length--; - } - - return out.strip(); - } - - function jumboMulTo (self, num, out) { - var fftm = new FFTM(); - return fftm.mulp(self, num, out); - } - - BN.prototype.mulTo = function mulTo (num, out) { - var res; - var len = this.length + num.length; - if (this.length === 10 && num.length === 10) { - res = comb10MulTo(this, num, out); - } else if (len < 63) { - res = smallMulTo(this, num, out); - } else if (len < 1024) { - res = bigMulTo(this, num, out); - } else { - res = jumboMulTo(this, num, out); - } - - return res; - }; - - // Cooley-Tukey algorithm for FFT - // slightly revisited to rely on looping instead of recursion - - function FFTM (x, y) { - this.x = x; - this.y = y; - } - - FFTM.prototype.makeRBT = function makeRBT (N) { - var t = new Array(N); - var l = BN.prototype._countBits(N) - 1; - for (var i = 0; i < N; i++) { - t[i] = this.revBin(i, l, N); - } - - return t; - }; - - // Returns binary-reversed representation of `x` - FFTM.prototype.revBin = function revBin (x, l, N) { - if (x === 0 || x === N - 1) return x; - - var rb = 0; - for (var i = 0; i < l; i++) { - rb |= (x & 1) << (l - i - 1); - x >>= 1; - } - - return rb; - }; - - // Performs "tweedling" phase, therefore 'emulating' - // behaviour of the recursive algorithm - FFTM.prototype.permute = function permute (rbt, rws, iws, rtws, itws, N) { - for (var i = 0; i < N; i++) { - rtws[i] = rws[rbt[i]]; - itws[i] = iws[rbt[i]]; - } - }; - - FFTM.prototype.transform = function transform (rws, iws, rtws, itws, N, rbt) { - this.permute(rbt, rws, iws, rtws, itws, N); - - for (var s = 1; s < N; s <<= 1) { - var l = s << 1; - - var rtwdf = Math.cos(2 * Math.PI / l); - var itwdf = Math.sin(2 * Math.PI / l); - - for (var p = 0; p < N; p += l) { - var rtwdf_ = rtwdf; - var itwdf_ = itwdf; - - for (var j = 0; j < s; j++) { - var re = rtws[p + j]; - var ie = itws[p + j]; - - var ro = rtws[p + j + s]; - var io = itws[p + j + s]; - - var rx = rtwdf_ * ro - itwdf_ * io; - - io = rtwdf_ * io + itwdf_ * ro; - ro = rx; - - rtws[p + j] = re + ro; - itws[p + j] = ie + io; - - rtws[p + j + s] = re - ro; - itws[p + j + s] = ie - io; - - /* jshint maxdepth : false */ - if (j !== l) { - rx = rtwdf * rtwdf_ - itwdf * itwdf_; - - itwdf_ = rtwdf * itwdf_ + itwdf * rtwdf_; - rtwdf_ = rx; - } - } - } - } - }; - - FFTM.prototype.guessLen13b = function guessLen13b (n, m) { - var N = Math.max(m, n) | 1; - var odd = N & 1; - var i = 0; - for (N = N / 2 | 0; N; N = N >>> 1) { - i++; - } - - return 1 << i + 1 + odd; - }; - - FFTM.prototype.conjugate = function conjugate (rws, iws, N) { - if (N <= 1) return; - - for (var i = 0; i < N / 2; i++) { - var t = rws[i]; - - rws[i] = rws[N - i - 1]; - rws[N - i - 1] = t; - - t = iws[i]; - - iws[i] = -iws[N - i - 1]; - iws[N - i - 1] = -t; - } - }; - - FFTM.prototype.normalize13b = function normalize13b (ws, N) { - var carry = 0; - for (var i = 0; i < N / 2; i++) { - var w = Math.round(ws[2 * i + 1] / N) * 0x2000 + - Math.round(ws[2 * i] / N) + - carry; - - ws[i] = w & 0x3ffffff; - - if (w < 0x4000000) { - carry = 0; - } else { - carry = w / 0x4000000 | 0; - } - } - - return ws; - }; - - FFTM.prototype.convert13b = function convert13b (ws, len, rws, N) { - var carry = 0; - for (var i = 0; i < len; i++) { - carry = carry + (ws[i] | 0); - - rws[2 * i] = carry & 0x1fff; carry = carry >>> 13; - rws[2 * i + 1] = carry & 0x1fff; carry = carry >>> 13; - } - - // Pad with zeroes - for (i = 2 * len; i < N; ++i) { - rws[i] = 0; - } - - assert(carry === 0); - assert((carry & ~0x1fff) === 0); - }; - - FFTM.prototype.stub = function stub (N) { - var ph = new Array(N); - for (var i = 0; i < N; i++) { - ph[i] = 0; - } - - return ph; - }; - - FFTM.prototype.mulp = function mulp (x, y, out) { - var N = 2 * this.guessLen13b(x.length, y.length); - - var rbt = this.makeRBT(N); - - var _ = this.stub(N); - - var rws = new Array(N); - var rwst = new Array(N); - var iwst = new Array(N); - - var nrws = new Array(N); - var nrwst = new Array(N); - var niwst = new Array(N); - - var rmws = out.words; - rmws.length = N; - - this.convert13b(x.words, x.length, rws, N); - this.convert13b(y.words, y.length, nrws, N); - - this.transform(rws, _, rwst, iwst, N, rbt); - this.transform(nrws, _, nrwst, niwst, N, rbt); - - for (var i = 0; i < N; i++) { - var rx = rwst[i] * nrwst[i] - iwst[i] * niwst[i]; - iwst[i] = rwst[i] * niwst[i] + iwst[i] * nrwst[i]; - rwst[i] = rx; - } - - this.conjugate(rwst, iwst, N); - this.transform(rwst, iwst, rmws, _, N, rbt); - this.conjugate(rmws, _, N); - this.normalize13b(rmws, N); - - out.negative = x.negative ^ y.negative; - out.length = x.length + y.length; - return out.strip(); - }; - - // Multiply `this` by `num` - BN.prototype.mul = function mul (num) { - var out = new BN(null); - out.words = new Array(this.length + num.length); - return this.mulTo(num, out); - }; - - // Multiply employing FFT - BN.prototype.mulf = function mulf (num) { - var out = new BN(null); - out.words = new Array(this.length + num.length); - return jumboMulTo(this, num, out); - }; - - // In-place Multiplication - BN.prototype.imul = function imul (num) { - return this.clone().mulTo(num, this); - }; - - BN.prototype.imuln = function imuln (num) { - assert(typeof num === 'number'); - assert(num < 0x4000000); - - // Carry - var carry = 0; - for (var i = 0; i < this.length; i++) { - var w = (this.words[i] | 0) * num; - var lo = (w & 0x3ffffff) + (carry & 0x3ffffff); - carry >>= 26; - carry += (w / 0x4000000) | 0; - // NOTE: lo is 27bit maximum - carry += lo >>> 26; - this.words[i] = lo & 0x3ffffff; - } - - if (carry !== 0) { - this.words[i] = carry; - this.length++; - } - - return this; - }; - - BN.prototype.muln = function muln (num) { - return this.clone().imuln(num); - }; - - // `this` * `this` - BN.prototype.sqr = function sqr () { - return this.mul(this); - }; - - // `this` * `this` in-place - BN.prototype.isqr = function isqr () { - return this.imul(this.clone()); - }; - - // Math.pow(`this`, `num`) - BN.prototype.pow = function pow (num) { - var w = toBitArray(num); - if (w.length === 0) return new BN(1); - - // Skip leading zeroes - var res = this; - for (var i = 0; i < w.length; i++, res = res.sqr()) { - if (w[i] !== 0) break; - } - - if (++i < w.length) { - for (var q = res.sqr(); i < w.length; i++, q = q.sqr()) { - if (w[i] === 0) continue; - - res = res.mul(q); - } - } - - return res; - }; - - // Shift-left in-place - BN.prototype.iushln = function iushln (bits) { - assert(typeof bits === 'number' && bits >= 0); - var r = bits % 26; - var s = (bits - r) / 26; - var carryMask = (0x3ffffff >>> (26 - r)) << (26 - r); - var i; - - if (r !== 0) { - var carry = 0; - - for (i = 0; i < this.length; i++) { - var newCarry = this.words[i] & carryMask; - var c = ((this.words[i] | 0) - newCarry) << r; - this.words[i] = c | carry; - carry = newCarry >>> (26 - r); - } - - if (carry) { - this.words[i] = carry; - this.length++; - } - } - - if (s !== 0) { - for (i = this.length - 1; i >= 0; i--) { - this.words[i + s] = this.words[i]; - } - - for (i = 0; i < s; i++) { - this.words[i] = 0; - } - - this.length += s; - } - - return this.strip(); - }; - - BN.prototype.ishln = function ishln (bits) { - // TODO(indutny): implement me - assert(this.negative === 0); - return this.iushln(bits); - }; - - // Shift-right in-place - // NOTE: `hint` is a lowest bit before trailing zeroes - // NOTE: if `extended` is present - it will be filled with destroyed bits - BN.prototype.iushrn = function iushrn (bits, hint, extended) { - assert(typeof bits === 'number' && bits >= 0); - var h; - if (hint) { - h = (hint - (hint % 26)) / 26; - } else { - h = 0; - } - - var r = bits % 26; - var s = Math.min((bits - r) / 26, this.length); - var mask = 0x3ffffff ^ ((0x3ffffff >>> r) << r); - var maskedWords = extended; - - h -= s; - h = Math.max(0, h); - - // Extended mode, copy masked part - if (maskedWords) { - for (var i = 0; i < s; i++) { - maskedWords.words[i] = this.words[i]; - } - maskedWords.length = s; - } - - if (s === 0) { - // No-op, we should not move anything at all - } else if (this.length > s) { - this.length -= s; - for (i = 0; i < this.length; i++) { - this.words[i] = this.words[i + s]; - } - } else { - this.words[0] = 0; - this.length = 1; - } - - var carry = 0; - for (i = this.length - 1; i >= 0 && (carry !== 0 || i >= h); i--) { - var word = this.words[i] | 0; - this.words[i] = (carry << (26 - r)) | (word >>> r); - carry = word & mask; - } - - // Push carried bits as a mask - if (maskedWords && carry !== 0) { - maskedWords.words[maskedWords.length++] = carry; - } - - if (this.length === 0) { - this.words[0] = 0; - this.length = 1; - } - - return this.strip(); - }; - - BN.prototype.ishrn = function ishrn (bits, hint, extended) { - // TODO(indutny): implement me - assert(this.negative === 0); - return this.iushrn(bits, hint, extended); - }; - - // Shift-left - BN.prototype.shln = function shln (bits) { - return this.clone().ishln(bits); - }; - - BN.prototype.ushln = function ushln (bits) { - return this.clone().iushln(bits); - }; - - // Shift-right - BN.prototype.shrn = function shrn (bits) { - return this.clone().ishrn(bits); - }; - - BN.prototype.ushrn = function ushrn (bits) { - return this.clone().iushrn(bits); - }; - - // Test if n bit is set - BN.prototype.testn = function testn (bit) { - assert(typeof bit === 'number' && bit >= 0); - var r = bit % 26; - var s = (bit - r) / 26; - var q = 1 << r; - - // Fast case: bit is much higher than all existing words - if (this.length <= s) return false; - - // Check bit and return - var w = this.words[s]; - - return !!(w & q); - }; - - // Return only lowers bits of number (in-place) - BN.prototype.imaskn = function imaskn (bits) { - assert(typeof bits === 'number' && bits >= 0); - var r = bits % 26; - var s = (bits - r) / 26; - - assert(this.negative === 0, 'imaskn works only with positive numbers'); - - if (this.length <= s) { - return this; - } - - if (r !== 0) { - s++; - } - this.length = Math.min(s, this.length); - - if (r !== 0) { - var mask = 0x3ffffff ^ ((0x3ffffff >>> r) << r); - this.words[this.length - 1] &= mask; - } - - return this.strip(); - }; - - // Return only lowers bits of number - BN.prototype.maskn = function maskn (bits) { - return this.clone().imaskn(bits); - }; - - // Add plain number `num` to `this` - BN.prototype.iaddn = function iaddn (num) { - assert(typeof num === 'number'); - assert(num < 0x4000000); - if (num < 0) return this.isubn(-num); - - // Possible sign change - if (this.negative !== 0) { - if (this.length === 1 && (this.words[0] | 0) < num) { - this.words[0] = num - (this.words[0] | 0); - this.negative = 0; - return this; - } - - this.negative = 0; - this.isubn(num); - this.negative = 1; - return this; - } - - // Add without checks - return this._iaddn(num); - }; - - BN.prototype._iaddn = function _iaddn (num) { - this.words[0] += num; - - // Carry - for (var i = 0; i < this.length && this.words[i] >= 0x4000000; i++) { - this.words[i] -= 0x4000000; - if (i === this.length - 1) { - this.words[i + 1] = 1; - } else { - this.words[i + 1]++; - } - } - this.length = Math.max(this.length, i + 1); - - return this; - }; - - // Subtract plain number `num` from `this` - BN.prototype.isubn = function isubn (num) { - assert(typeof num === 'number'); - assert(num < 0x4000000); - if (num < 0) return this.iaddn(-num); - - if (this.negative !== 0) { - this.negative = 0; - this.iaddn(num); - this.negative = 1; - return this; - } - - this.words[0] -= num; - - if (this.length === 1 && this.words[0] < 0) { - this.words[0] = -this.words[0]; - this.negative = 1; - } else { - // Carry - for (var i = 0; i < this.length && this.words[i] < 0; i++) { - this.words[i] += 0x4000000; - this.words[i + 1] -= 1; - } - } - - return this.strip(); - }; - - BN.prototype.addn = function addn (num) { - return this.clone().iaddn(num); - }; - - BN.prototype.subn = function subn (num) { - return this.clone().isubn(num); - }; - - BN.prototype.iabs = function iabs () { - this.negative = 0; - - return this; - }; - - BN.prototype.abs = function abs () { - return this.clone().iabs(); - }; - - BN.prototype._ishlnsubmul = function _ishlnsubmul (num, mul, shift) { - var len = num.length + shift; - var i; - - this._expand(len); - - var w; - var carry = 0; - for (i = 0; i < num.length; i++) { - w = (this.words[i + shift] | 0) + carry; - var right = (num.words[i] | 0) * mul; - w -= right & 0x3ffffff; - carry = (w >> 26) - ((right / 0x4000000) | 0); - this.words[i + shift] = w & 0x3ffffff; - } - for (; i < this.length - shift; i++) { - w = (this.words[i + shift] | 0) + carry; - carry = w >> 26; - this.words[i + shift] = w & 0x3ffffff; - } - - if (carry === 0) return this.strip(); - - // Subtraction overflow - assert(carry === -1); - carry = 0; - for (i = 0; i < this.length; i++) { - w = -(this.words[i] | 0) + carry; - carry = w >> 26; - this.words[i] = w & 0x3ffffff; - } - this.negative = 1; - - return this.strip(); - }; - - BN.prototype._wordDiv = function _wordDiv (num, mode) { - var shift = this.length - num.length; - - var a = this.clone(); - var b = num; - - // Normalize - var bhi = b.words[b.length - 1] | 0; - var bhiBits = this._countBits(bhi); - shift = 26 - bhiBits; - if (shift !== 0) { - b = b.ushln(shift); - a.iushln(shift); - bhi = b.words[b.length - 1] | 0; - } - - // Initialize quotient - var m = a.length - b.length; - var q; - - if (mode !== 'mod') { - q = new BN(null); - q.length = m + 1; - q.words = new Array(q.length); - for (var i = 0; i < q.length; i++) { - q.words[i] = 0; - } - } - - var diff = a.clone()._ishlnsubmul(b, 1, m); - if (diff.negative === 0) { - a = diff; - if (q) { - q.words[m] = 1; - } - } - - for (var j = m - 1; j >= 0; j--) { - var qj = (a.words[b.length + j] | 0) * 0x4000000 + - (a.words[b.length + j - 1] | 0); - - // NOTE: (qj / bhi) is (0x3ffffff * 0x4000000 + 0x3ffffff) / 0x2000000 max - // (0x7ffffff) - qj = Math.min((qj / bhi) | 0, 0x3ffffff); - - a._ishlnsubmul(b, qj, j); - while (a.negative !== 0) { - qj--; - a.negative = 0; - a._ishlnsubmul(b, 1, j); - if (!a.isZero()) { - a.negative ^= 1; - } - } - if (q) { - q.words[j] = qj; - } - } - if (q) { - q.strip(); - } - a.strip(); - - // Denormalize - if (mode !== 'div' && shift !== 0) { - a.iushrn(shift); - } - - return { - div: q || null, - mod: a - }; - }; - - // NOTE: 1) `mode` can be set to `mod` to request mod only, - // to `div` to request div only, or be absent to - // request both div & mod - // 2) `positive` is true if unsigned mod is requested - BN.prototype.divmod = function divmod (num, mode, positive) { - assert(!num.isZero()); - - if (this.isZero()) { - return { - div: new BN(0), - mod: new BN(0) - }; - } - - var div, mod, res; - if (this.negative !== 0 && num.negative === 0) { - res = this.neg().divmod(num, mode); - - if (mode !== 'mod') { - div = res.div.neg(); - } - - if (mode !== 'div') { - mod = res.mod.neg(); - if (positive && mod.negative !== 0) { - mod.iadd(num); - } - } - - return { - div: div, - mod: mod - }; - } - - if (this.negative === 0 && num.negative !== 0) { - res = this.divmod(num.neg(), mode); - - if (mode !== 'mod') { - div = res.div.neg(); - } - - return { - div: div, - mod: res.mod - }; - } - - if ((this.negative & num.negative) !== 0) { - res = this.neg().divmod(num.neg(), mode); - - if (mode !== 'div') { - mod = res.mod.neg(); - if (positive && mod.negative !== 0) { - mod.isub(num); - } - } - - return { - div: res.div, - mod: mod - }; - } - - // Both numbers are positive at this point - - // Strip both numbers to approximate shift value - if (num.length > this.length || this.cmp(num) < 0) { - return { - div: new BN(0), - mod: this - }; - } - - // Very short reduction - if (num.length === 1) { - if (mode === 'div') { - return { - div: this.divn(num.words[0]), - mod: null - }; - } - - if (mode === 'mod') { - return { - div: null, - mod: new BN(this.modn(num.words[0])) - }; - } - - return { - div: this.divn(num.words[0]), - mod: new BN(this.modn(num.words[0])) - }; - } - - return this._wordDiv(num, mode); - }; - - // Find `this` / `num` - BN.prototype.div = function div (num) { - return this.divmod(num, 'div', false).div; - }; - - // Find `this` % `num` - BN.prototype.mod = function mod (num) { - return this.divmod(num, 'mod', false).mod; - }; - - BN.prototype.umod = function umod (num) { - return this.divmod(num, 'mod', true).mod; - }; - - // Find Round(`this` / `num`) - BN.prototype.divRound = function divRound (num) { - var dm = this.divmod(num); - - // Fast case - exact division - if (dm.mod.isZero()) return dm.div; - - var mod = dm.div.negative !== 0 ? dm.mod.isub(num) : dm.mod; - - var half = num.ushrn(1); - var r2 = num.andln(1); - var cmp = mod.cmp(half); - - // Round down - if (cmp < 0 || r2 === 1 && cmp === 0) return dm.div; - - // Round up - return dm.div.negative !== 0 ? dm.div.isubn(1) : dm.div.iaddn(1); - }; - - BN.prototype.modn = function modn (num) { - assert(num <= 0x3ffffff); - var p = (1 << 26) % num; - - var acc = 0; - for (var i = this.length - 1; i >= 0; i--) { - acc = (p * acc + (this.words[i] | 0)) % num; - } - - return acc; - }; - - // In-place division by number - BN.prototype.idivn = function idivn (num) { - assert(num <= 0x3ffffff); - - var carry = 0; - for (var i = this.length - 1; i >= 0; i--) { - var w = (this.words[i] | 0) + carry * 0x4000000; - this.words[i] = (w / num) | 0; - carry = w % num; - } - - return this.strip(); - }; - - BN.prototype.divn = function divn (num) { - return this.clone().idivn(num); - }; - - BN.prototype.egcd = function egcd (p) { - assert(p.negative === 0); - assert(!p.isZero()); - - var x = this; - var y = p.clone(); - - if (x.negative !== 0) { - x = x.umod(p); - } else { - x = x.clone(); - } - - // A * x + B * y = x - var A = new BN(1); - var B = new BN(0); - - // C * x + D * y = y - var C = new BN(0); - var D = new BN(1); - - var g = 0; - - while (x.isEven() && y.isEven()) { - x.iushrn(1); - y.iushrn(1); - ++g; - } - - var yp = y.clone(); - var xp = x.clone(); - - while (!x.isZero()) { - for (var i = 0, im = 1; (x.words[0] & im) === 0 && i < 26; ++i, im <<= 1); - if (i > 0) { - x.iushrn(i); - while (i-- > 0) { - if (A.isOdd() || B.isOdd()) { - A.iadd(yp); - B.isub(xp); - } - - A.iushrn(1); - B.iushrn(1); - } - } - - for (var j = 0, jm = 1; (y.words[0] & jm) === 0 && j < 26; ++j, jm <<= 1); - if (j > 0) { - y.iushrn(j); - while (j-- > 0) { - if (C.isOdd() || D.isOdd()) { - C.iadd(yp); - D.isub(xp); - } - - C.iushrn(1); - D.iushrn(1); - } - } - - if (x.cmp(y) >= 0) { - x.isub(y); - A.isub(C); - B.isub(D); - } else { - y.isub(x); - C.isub(A); - D.isub(B); - } - } - - return { - a: C, - b: D, - gcd: y.iushln(g) - }; - }; - - // This is reduced incarnation of the binary EEA - // above, designated to invert members of the - // _prime_ fields F(p) at a maximal speed - BN.prototype._invmp = function _invmp (p) { - assert(p.negative === 0); - assert(!p.isZero()); - - var a = this; - var b = p.clone(); - - if (a.negative !== 0) { - a = a.umod(p); - } else { - a = a.clone(); - } - - var x1 = new BN(1); - var x2 = new BN(0); - - var delta = b.clone(); - - while (a.cmpn(1) > 0 && b.cmpn(1) > 0) { - for (var i = 0, im = 1; (a.words[0] & im) === 0 && i < 26; ++i, im <<= 1); - if (i > 0) { - a.iushrn(i); - while (i-- > 0) { - if (x1.isOdd()) { - x1.iadd(delta); - } - - x1.iushrn(1); - } - } - - for (var j = 0, jm = 1; (b.words[0] & jm) === 0 && j < 26; ++j, jm <<= 1); - if (j > 0) { - b.iushrn(j); - while (j-- > 0) { - if (x2.isOdd()) { - x2.iadd(delta); - } - - x2.iushrn(1); - } - } - - if (a.cmp(b) >= 0) { - a.isub(b); - x1.isub(x2); - } else { - b.isub(a); - x2.isub(x1); - } - } - - var res; - if (a.cmpn(1) === 0) { - res = x1; - } else { - res = x2; - } - - if (res.cmpn(0) < 0) { - res.iadd(p); - } - - return res; - }; - - BN.prototype.gcd = function gcd (num) { - if (this.isZero()) return num.abs(); - if (num.isZero()) return this.abs(); - - var a = this.clone(); - var b = num.clone(); - a.negative = 0; - b.negative = 0; - - // Remove common factor of two - for (var shift = 0; a.isEven() && b.isEven(); shift++) { - a.iushrn(1); - b.iushrn(1); - } - - do { - while (a.isEven()) { - a.iushrn(1); - } - while (b.isEven()) { - b.iushrn(1); - } - - var r = a.cmp(b); - if (r < 0) { - // Swap `a` and `b` to make `a` always bigger than `b` - var t = a; - a = b; - b = t; - } else if (r === 0 || b.cmpn(1) === 0) { - break; - } - - a.isub(b); - } while (true); - - return b.iushln(shift); - }; - - // Invert number in the field F(num) - BN.prototype.invm = function invm (num) { - return this.egcd(num).a.umod(num); - }; - - BN.prototype.isEven = function isEven () { - return (this.words[0] & 1) === 0; - }; - - BN.prototype.isOdd = function isOdd () { - return (this.words[0] & 1) === 1; - }; - - // And first word and num - BN.prototype.andln = function andln (num) { - return this.words[0] & num; - }; - - // Increment at the bit position in-line - BN.prototype.bincn = function bincn (bit) { - assert(typeof bit === 'number'); - var r = bit % 26; - var s = (bit - r) / 26; - var q = 1 << r; - - // Fast case: bit is much higher than all existing words - if (this.length <= s) { - this._expand(s + 1); - this.words[s] |= q; - return this; - } - - // Add bit and propagate, if needed - var carry = q; - for (var i = s; carry !== 0 && i < this.length; i++) { - var w = this.words[i] | 0; - w += carry; - carry = w >>> 26; - w &= 0x3ffffff; - this.words[i] = w; - } - if (carry !== 0) { - this.words[i] = carry; - this.length++; - } - return this; - }; - - BN.prototype.isZero = function isZero () { - return this.length === 1 && this.words[0] === 0; - }; - - BN.prototype.cmpn = function cmpn (num) { - var negative = num < 0; - - if (this.negative !== 0 && !negative) return -1; - if (this.negative === 0 && negative) return 1; - - this.strip(); - - var res; - if (this.length > 1) { - res = 1; - } else { - if (negative) { - num = -num; - } - - assert(num <= 0x3ffffff, 'Number is too big'); - - var w = this.words[0] | 0; - res = w === num ? 0 : w < num ? -1 : 1; - } - if (this.negative !== 0) return -res | 0; - return res; - }; - - // Compare two numbers and return: - // 1 - if `this` > `num` - // 0 - if `this` == `num` - // -1 - if `this` < `num` - BN.prototype.cmp = function cmp (num) { - if (this.negative !== 0 && num.negative === 0) return -1; - if (this.negative === 0 && num.negative !== 0) return 1; - - var res = this.ucmp(num); - if (this.negative !== 0) return -res | 0; - return res; - }; - - // Unsigned comparison - BN.prototype.ucmp = function ucmp (num) { - // At this point both numbers have the same sign - if (this.length > num.length) return 1; - if (this.length < num.length) return -1; - - var res = 0; - for (var i = this.length - 1; i >= 0; i--) { - var a = this.words[i] | 0; - var b = num.words[i] | 0; - - if (a === b) continue; - if (a < b) { - res = -1; - } else if (a > b) { - res = 1; - } - break; - } - return res; - }; - - BN.prototype.gtn = function gtn (num) { - return this.cmpn(num) === 1; - }; - - BN.prototype.gt = function gt (num) { - return this.cmp(num) === 1; - }; - - BN.prototype.gten = function gten (num) { - return this.cmpn(num) >= 0; - }; - - BN.prototype.gte = function gte (num) { - return this.cmp(num) >= 0; - }; - - BN.prototype.ltn = function ltn (num) { - return this.cmpn(num) === -1; - }; - - BN.prototype.lt = function lt (num) { - return this.cmp(num) === -1; - }; - - BN.prototype.lten = function lten (num) { - return this.cmpn(num) <= 0; - }; - - BN.prototype.lte = function lte (num) { - return this.cmp(num) <= 0; - }; - - BN.prototype.eqn = function eqn (num) { - return this.cmpn(num) === 0; - }; - - BN.prototype.eq = function eq (num) { - return this.cmp(num) === 0; - }; - - // - // A reduce context, could be using montgomery or something better, depending - // on the `m` itself. - // - BN.red = function red (num) { - return new Red(num); - }; - - BN.prototype.toRed = function toRed (ctx) { - assert(!this.red, 'Already a number in reduction context'); - assert(this.negative === 0, 'red works only with positives'); - return ctx.convertTo(this)._forceRed(ctx); - }; - - BN.prototype.fromRed = function fromRed () { - assert(this.red, 'fromRed works only with numbers in reduction context'); - return this.red.convertFrom(this); - }; - - BN.prototype._forceRed = function _forceRed (ctx) { - this.red = ctx; - return this; - }; - - BN.prototype.forceRed = function forceRed (ctx) { - assert(!this.red, 'Already a number in reduction context'); - return this._forceRed(ctx); - }; - - BN.prototype.redAdd = function redAdd (num) { - assert(this.red, 'redAdd works only with red numbers'); - return this.red.add(this, num); - }; - - BN.prototype.redIAdd = function redIAdd (num) { - assert(this.red, 'redIAdd works only with red numbers'); - return this.red.iadd(this, num); - }; - - BN.prototype.redSub = function redSub (num) { - assert(this.red, 'redSub works only with red numbers'); - return this.red.sub(this, num); - }; - - BN.prototype.redISub = function redISub (num) { - assert(this.red, 'redISub works only with red numbers'); - return this.red.isub(this, num); - }; - - BN.prototype.redShl = function redShl (num) { - assert(this.red, 'redShl works only with red numbers'); - return this.red.shl(this, num); - }; - - BN.prototype.redMul = function redMul (num) { - assert(this.red, 'redMul works only with red numbers'); - this.red._verify2(this, num); - return this.red.mul(this, num); - }; - - BN.prototype.redIMul = function redIMul (num) { - assert(this.red, 'redMul works only with red numbers'); - this.red._verify2(this, num); - return this.red.imul(this, num); - }; - - BN.prototype.redSqr = function redSqr () { - assert(this.red, 'redSqr works only with red numbers'); - this.red._verify1(this); - return this.red.sqr(this); - }; - - BN.prototype.redISqr = function redISqr () { - assert(this.red, 'redISqr works only with red numbers'); - this.red._verify1(this); - return this.red.isqr(this); - }; - - // Square root over p - BN.prototype.redSqrt = function redSqrt () { - assert(this.red, 'redSqrt works only with red numbers'); - this.red._verify1(this); - return this.red.sqrt(this); - }; - - BN.prototype.redInvm = function redInvm () { - assert(this.red, 'redInvm works only with red numbers'); - this.red._verify1(this); - return this.red.invm(this); - }; - - // Return negative clone of `this` % `red modulo` - BN.prototype.redNeg = function redNeg () { - assert(this.red, 'redNeg works only with red numbers'); - this.red._verify1(this); - return this.red.neg(this); - }; - - BN.prototype.redPow = function redPow (num) { - assert(this.red && !num.red, 'redPow(normalNum)'); - this.red._verify1(this); - return this.red.pow(this, num); - }; - - // Prime numbers with efficient reduction - var primes = { - k256: null, - p224: null, - p192: null, - p25519: null - }; - - // Pseudo-Mersenne prime - function MPrime (name, p) { - // P = 2 ^ N - K - this.name = name; - this.p = new BN(p, 16); - this.n = this.p.bitLength(); - this.k = new BN(1).iushln(this.n).isub(this.p); - - this.tmp = this._tmp(); - } - - MPrime.prototype._tmp = function _tmp () { - var tmp = new BN(null); - tmp.words = new Array(Math.ceil(this.n / 13)); - return tmp; - }; - - MPrime.prototype.ireduce = function ireduce (num) { - // Assumes that `num` is less than `P^2` - // num = HI * (2 ^ N - K) + HI * K + LO = HI * K + LO (mod P) - var r = num; - var rlen; - - do { - this.split(r, this.tmp); - r = this.imulK(r); - r = r.iadd(this.tmp); - rlen = r.bitLength(); - } while (rlen > this.n); - - var cmp = rlen < this.n ? -1 : r.ucmp(this.p); - if (cmp === 0) { - r.words[0] = 0; - r.length = 1; - } else if (cmp > 0) { - r.isub(this.p); - } else { - r.strip(); - } - - return r; - }; - - MPrime.prototype.split = function split (input, out) { - input.iushrn(this.n, 0, out); - }; - - MPrime.prototype.imulK = function imulK (num) { - return num.imul(this.k); - }; - - function K256 () { - MPrime.call( - this, - 'k256', - 'ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f'); - } - inherits(K256, MPrime); - - K256.prototype.split = function split (input, output) { - // 256 = 9 * 26 + 22 - var mask = 0x3fffff; - - var outLen = Math.min(input.length, 9); - for (var i = 0; i < outLen; i++) { - output.words[i] = input.words[i]; - } - output.length = outLen; - - if (input.length <= 9) { - input.words[0] = 0; - input.length = 1; - return; - } - - // Shift by 9 limbs - var prev = input.words[9]; - output.words[output.length++] = prev & mask; - - for (i = 10; i < input.length; i++) { - var next = input.words[i] | 0; - input.words[i - 10] = ((next & mask) << 4) | (prev >>> 22); - prev = next; - } - prev >>>= 22; - input.words[i - 10] = prev; - if (prev === 0 && input.length > 10) { - input.length -= 10; - } else { - input.length -= 9; - } - }; - - K256.prototype.imulK = function imulK (num) { - // K = 0x1000003d1 = [ 0x40, 0x3d1 ] - num.words[num.length] = 0; - num.words[num.length + 1] = 0; - num.length += 2; - - // bounded at: 0x40 * 0x3ffffff + 0x3d0 = 0x100000390 - var lo = 0; - for (var i = 0; i < num.length; i++) { - var w = num.words[i] | 0; - lo += w * 0x3d1; - num.words[i] = lo & 0x3ffffff; - lo = w * 0x40 + ((lo / 0x4000000) | 0); - } - - // Fast length reduction - if (num.words[num.length - 1] === 0) { - num.length--; - if (num.words[num.length - 1] === 0) { - num.length--; - } - } - return num; - }; - - function P224 () { - MPrime.call( - this, - 'p224', - 'ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001'); - } - inherits(P224, MPrime); - - function P192 () { - MPrime.call( - this, - 'p192', - 'ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff'); - } - inherits(P192, MPrime); - - function P25519 () { - // 2 ^ 255 - 19 - MPrime.call( - this, - '25519', - '7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed'); - } - inherits(P25519, MPrime); - - P25519.prototype.imulK = function imulK (num) { - // K = 0x13 - var carry = 0; - for (var i = 0; i < num.length; i++) { - var hi = (num.words[i] | 0) * 0x13 + carry; - var lo = hi & 0x3ffffff; - hi >>>= 26; - - num.words[i] = lo; - carry = hi; - } - if (carry !== 0) { - num.words[num.length++] = carry; - } - return num; - }; - - // Exported mostly for testing purposes, use plain name instead - BN._prime = function prime (name) { - // Cached version of prime - if (primes[name]) return primes[name]; - - var prime; - if (name === 'k256') { - prime = new K256(); - } else if (name === 'p224') { - prime = new P224(); - } else if (name === 'p192') { - prime = new P192(); - } else if (name === 'p25519') { - prime = new P25519(); - } else { - throw new Error('Unknown prime ' + name); - } - primes[name] = prime; - - return prime; - }; - - // - // Base reduction engine - // - function Red (m) { - if (typeof m === 'string') { - var prime = BN._prime(m); - this.m = prime.p; - this.prime = prime; - } else { - assert(m.gtn(1), 'modulus must be greater than 1'); - this.m = m; - this.prime = null; - } - } - - Red.prototype._verify1 = function _verify1 (a) { - assert(a.negative === 0, 'red works only with positives'); - assert(a.red, 'red works only with red numbers'); - }; - - Red.prototype._verify2 = function _verify2 (a, b) { - assert((a.negative | b.negative) === 0, 'red works only with positives'); - assert(a.red && a.red === b.red, - 'red works only with red numbers'); - }; - - Red.prototype.imod = function imod (a) { - if (this.prime) return this.prime.ireduce(a)._forceRed(this); - return a.umod(this.m)._forceRed(this); - }; - - Red.prototype.neg = function neg (a) { - if (a.isZero()) { - return a.clone(); - } - - return this.m.sub(a)._forceRed(this); - }; - - Red.prototype.add = function add (a, b) { - this._verify2(a, b); - - var res = a.add(b); - if (res.cmp(this.m) >= 0) { - res.isub(this.m); - } - return res._forceRed(this); - }; - - Red.prototype.iadd = function iadd (a, b) { - this._verify2(a, b); - - var res = a.iadd(b); - if (res.cmp(this.m) >= 0) { - res.isub(this.m); - } - return res; - }; - - Red.prototype.sub = function sub (a, b) { - this._verify2(a, b); - - var res = a.sub(b); - if (res.cmpn(0) < 0) { - res.iadd(this.m); - } - return res._forceRed(this); - }; - - Red.prototype.isub = function isub (a, b) { - this._verify2(a, b); - - var res = a.isub(b); - if (res.cmpn(0) < 0) { - res.iadd(this.m); - } - return res; - }; - - Red.prototype.shl = function shl (a, num) { - this._verify1(a); - return this.imod(a.ushln(num)); - }; - - Red.prototype.imul = function imul (a, b) { - this._verify2(a, b); - return this.imod(a.imul(b)); - }; - - Red.prototype.mul = function mul (a, b) { - this._verify2(a, b); - return this.imod(a.mul(b)); - }; - - Red.prototype.isqr = function isqr (a) { - return this.imul(a, a.clone()); - }; - - Red.prototype.sqr = function sqr (a) { - return this.mul(a, a); - }; - - Red.prototype.sqrt = function sqrt (a) { - if (a.isZero()) return a.clone(); - - var mod3 = this.m.andln(3); - assert(mod3 % 2 === 1); - - // Fast case - if (mod3 === 3) { - var pow = this.m.add(new BN(1)).iushrn(2); - return this.pow(a, pow); - } - - // Tonelli-Shanks algorithm (Totally unoptimized and slow) - // - // Find Q and S, that Q * 2 ^ S = (P - 1) - var q = this.m.subn(1); - var s = 0; - while (!q.isZero() && q.andln(1) === 0) { - s++; - q.iushrn(1); - } - assert(!q.isZero()); - - var one = new BN(1).toRed(this); - var nOne = one.redNeg(); - - // Find quadratic non-residue - // NOTE: Max is such because of generalized Riemann hypothesis. - var lpow = this.m.subn(1).iushrn(1); - var z = this.m.bitLength(); - z = new BN(2 * z * z).toRed(this); - - while (this.pow(z, lpow).cmp(nOne) !== 0) { - z.redIAdd(nOne); - } - - var c = this.pow(z, q); - var r = this.pow(a, q.addn(1).iushrn(1)); - var t = this.pow(a, q); - var m = s; - while (t.cmp(one) !== 0) { - var tmp = t; - for (var i = 0; tmp.cmp(one) !== 0; i++) { - tmp = tmp.redSqr(); - } - assert(i < m); - var b = this.pow(c, new BN(1).iushln(m - i - 1)); - - r = r.redMul(b); - c = b.redSqr(); - t = t.redMul(c); - m = i; - } - - return r; - }; - - Red.prototype.invm = function invm (a) { - var inv = a._invmp(this.m); - if (inv.negative !== 0) { - inv.negative = 0; - return this.imod(inv).redNeg(); - } else { - return this.imod(inv); - } - }; - - Red.prototype.pow = function pow (a, num) { - if (num.isZero()) return new BN(1); - if (num.cmpn(1) === 0) return a.clone(); - - var windowSize = 4; - var wnd = new Array(1 << windowSize); - wnd[0] = new BN(1).toRed(this); - wnd[1] = a; - for (var i = 2; i < wnd.length; i++) { - wnd[i] = this.mul(wnd[i - 1], a); - } - - var res = wnd[0]; - var current = 0; - var currentLen = 0; - var start = num.bitLength() % 26; - if (start === 0) { - start = 26; - } - - for (i = num.length - 1; i >= 0; i--) { - var word = num.words[i]; - for (var j = start - 1; j >= 0; j--) { - var bit = (word >> j) & 1; - if (res !== wnd[0]) { - res = this.sqr(res); - } - - if (bit === 0 && current === 0) { - currentLen = 0; - continue; - } - - current <<= 1; - current |= bit; - currentLen++; - if (currentLen !== windowSize && (i !== 0 || j !== 0)) continue; - - res = this.mul(res, wnd[current]); - currentLen = 0; - current = 0; - } - start = 26; - } - - return res; - }; - - Red.prototype.convertTo = function convertTo (num) { - var r = num.umod(this.m); - - return r === num ? r.clone() : r; - }; - - Red.prototype.convertFrom = function convertFrom (num) { - var res = num.clone(); - res.red = null; - return res; - }; - - // - // Montgomery method engine - // - - BN.mont = function mont (num) { - return new Mont(num); - }; - - function Mont (m) { - Red.call(this, m); - - this.shift = this.m.bitLength(); - if (this.shift % 26 !== 0) { - this.shift += 26 - (this.shift % 26); - } - - this.r = new BN(1).iushln(this.shift); - this.r2 = this.imod(this.r.sqr()); - this.rinv = this.r._invmp(this.m); - - this.minv = this.rinv.mul(this.r).isubn(1).div(this.m); - this.minv = this.minv.umod(this.r); - this.minv = this.r.sub(this.minv); - } - inherits(Mont, Red); - - Mont.prototype.convertTo = function convertTo (num) { - return this.imod(num.ushln(this.shift)); - }; - - Mont.prototype.convertFrom = function convertFrom (num) { - var r = this.imod(num.mul(this.rinv)); - r.red = null; - return r; - }; - - Mont.prototype.imul = function imul (a, b) { - if (a.isZero() || b.isZero()) { - a.words[0] = 0; - a.length = 1; - return a; - } - - var t = a.imul(b); - var c = t.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m); - var u = t.isub(c).iushrn(this.shift); - var res = u; - - if (u.cmp(this.m) >= 0) { - res = u.isub(this.m); - } else if (u.cmpn(0) < 0) { - res = u.iadd(this.m); - } - - return res._forceRed(this); - }; - - Mont.prototype.mul = function mul (a, b) { - if (a.isZero() || b.isZero()) return new BN(0)._forceRed(this); - - var t = a.mul(b); - var c = t.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m); - var u = t.isub(c).iushrn(this.shift); - var res = u; - if (u.cmp(this.m) >= 0) { - res = u.isub(this.m); - } else if (u.cmpn(0) < 0) { - res = u.iadd(this.m); - } - - return res._forceRed(this); - }; - - Mont.prototype.invm = function invm (a) { - // (AR)^-1 * R^2 = (A^-1 * R^-1) * R^2 = A^-1 * R - var res = this.imod(a._invmp(this.m).mul(this.r2)); - return res._forceRed(this); - }; -})(typeof module === 'undefined' || module, this); diff --git a/node_modules/bn.js/package.json b/node_modules/bn.js/package.json deleted file mode 100644 index 1a4dde01..00000000 --- a/node_modules/bn.js/package.json +++ /dev/null @@ -1,113 +0,0 @@ -{ - "_args": [ - [ - { - "raw": "bn.js@^4.1.1", - "scope": null, - "escapedName": "bn.js", - "name": "bn.js", - "rawSpec": "^4.1.1", - "spec": ">=4.1.1 <5.0.0", - "type": "range" - }, - "/Users/benjaminarias/Desktop/poly/node_modules/browserify-sign" - ] - ], - "_from": "bn.js@>=4.1.1 <5.0.0", - "_id": "bn.js@4.11.6", - "_inCache": true, - "_installable": true, - "_location": "/bn.js", - "_nodeVersion": "6.3.0", - "_npmOperationalInternal": { - "host": "packages-16-east.internal.npmjs.com", - "tmp": "tmp/bn.js-4.11.6.tgz_1470100429753_0.28054949711076915" - }, - "_npmUser": { - "name": "indutny", - "email": "fedor@indutny.com" - }, - "_npmVersion": "3.10.3", - "_phantomChildren": {}, - "_requested": { - "raw": "bn.js@^4.1.1", - "scope": null, - "escapedName": "bn.js", - "name": "bn.js", - "rawSpec": "^4.1.1", - "spec": ">=4.1.1 <5.0.0", - "type": "range" - }, - "_requiredBy": [ - "/asn1.js", - "/browserify-rsa", - "/browserify-sign", - "/create-ecdh", - "/diffie-hellman", - "/elliptic", - "/miller-rabin", - "/public-encrypt" - ], - "_resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.6.tgz", - "_shasum": "53344adb14617a13f6e8dd2ce28905d1c0ba3215", - "_shrinkwrap": null, - "_spec": "bn.js@^4.1.1", - "_where": "/Users/benjaminarias/Desktop/poly/node_modules/browserify-sign", - "author": { - "name": "Fedor Indutny", - "email": "fedor@indutny.com" - }, - "bugs": { - "url": "https://github.com/indutny/bn.js/issues" - }, - "dependencies": {}, - "description": "Big number implementation in pure javascript", - "devDependencies": { - "istanbul": "^0.3.5", - "mocha": "^2.1.0", - "semistandard": "^7.0.4" - }, - "directories": {}, - "dist": { - "shasum": "53344adb14617a13f6e8dd2ce28905d1c0ba3215", - "tarball": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.6.tgz" - }, - "gitHead": "e4a82134c89ed85b0c3a03da7fabc016206898a4", - "homepage": "https://github.com/indutny/bn.js", - "keywords": [ - "BN", - "BigNum", - "Big number", - "Modulo", - "Montgomery" - ], - "license": "MIT", - "main": "lib/bn.js", - "maintainers": [ - { - "name": "cwmma", - "email": "calvin.metcalf@gmail.com" - }, - { - "name": "dcousens", - "email": "email@dcousens.com" - }, - { - "name": "indutny", - "email": "fedor@indutny.com" - } - ], - "name": "bn.js", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git+ssh://git@github.com/indutny/bn.js.git" - }, - "scripts": { - "lint": "semistandard", - "test": "npm run lint && npm run unit", - "unit": "mocha --reporter=spec test/*-test.js" - }, - "version": "4.11.6" -} diff --git a/node_modules/bn.js/test/arithmetic-test.js b/node_modules/bn.js/test/arithmetic-test.js deleted file mode 100644 index c3a0d7d5..00000000 --- a/node_modules/bn.js/test/arithmetic-test.js +++ /dev/null @@ -1,635 +0,0 @@ -/* global describe, it */ - -var assert = require('assert'); -var BN = require('../').BN; -var fixtures = require('./fixtures'); - -describe('BN.js/Arithmetic', function () { - describe('.add()', function () { - it('should add numbers', function () { - assert.equal(new BN(14).add(new BN(26)).toString(16), '28'); - var k = new BN(0x1234); - var r = k; - - for (var i = 0; i < 257; i++) { - r = r.add(k); - } - - assert.equal(r.toString(16), '125868'); - }); - - it('should handle carry properly (in-place)', function () { - var k = new BN('abcdefabcdefabcdef', 16); - var r = new BN('deadbeef', 16); - - for (var i = 0; i < 257; i++) { - r.iadd(k); - } - - assert.equal(r.toString(16), 'ac79bd9b79be7a277bde'); - }); - - it('should properly do positive + negative', function () { - var a = new BN('abcd', 16); - var b = new BN('-abce', 16); - - assert.equal(a.iadd(b).toString(16), '-1'); - - a = new BN('abcd', 16); - b = new BN('-abce', 16); - - assert.equal(a.add(b).toString(16), '-1'); - assert.equal(b.add(a).toString(16), '-1'); - }); - }); - - describe('.iaddn()', function () { - it('should allow a sign change', function () { - var a = new BN(-100); - assert.equal(a.negative, 1); - - a.iaddn(200); - - assert.equal(a.negative, 0); - assert.equal(a.toString(), '100'); - }); - - it('should add negative number', function () { - var a = new BN(-100); - assert.equal(a.negative, 1); - - a.iaddn(-200); - - assert.equal(a.toString(), '-300'); - }); - - it('should allow neg + pos with big number', function () { - var a = new BN('-1000000000', 10); - assert.equal(a.negative, 1); - - a.iaddn(200); - - assert.equal(a.toString(), '-999999800'); - }); - - it('should carry limb', function () { - var a = new BN('3ffffff', 16); - - assert.equal(a.iaddn(1).toString(16), '4000000'); - }); - - it('should throw error with num eq 0x4000000', function () { - assert.throws(function () { - new BN(0).iaddn(0x4000000); - }, /^Error: Assertion failed$/); - }); - }); - - describe('.sub()', function () { - it('should subtract small numbers', function () { - assert.equal(new BN(26).sub(new BN(14)).toString(16), 'c'); - assert.equal(new BN(14).sub(new BN(26)).toString(16), '-c'); - assert.equal(new BN(26).sub(new BN(26)).toString(16), '0'); - assert.equal(new BN(-26).sub(new BN(26)).toString(16), '-34'); - }); - - var a = new BN( - '31ff3c61db2db84b9823d320907a573f6ad37c437abe458b1802cda041d6384' + - 'a7d8daef41395491e2', - 16); - var b = new BN( - '6f0e4d9f1d6071c183677f601af9305721c91d31b0bbbae8fb790000', - 16); - var r = new BN( - '31ff3c61db2db84b9823d3208989726578fd75276287cd9516533a9acfb9a67' + - '76281f34583ddb91e2', - 16); - - it('should subtract big numbers', function () { - assert.equal(a.sub(b).cmp(r), 0); - }); - - it('should subtract numbers in place', function () { - assert.equal(b.clone().isub(a).neg().cmp(r), 0); - }); - - it('should subtract with carry', function () { - // Carry and copy - var a = new BN('12345', 16); - var b = new BN('1000000000000', 16); - assert.equal(a.isub(b).toString(16), '-fffffffedcbb'); - - a = new BN('12345', 16); - b = new BN('1000000000000', 16); - assert.equal(b.isub(a).toString(16), 'fffffffedcbb'); - }); - }); - - describe('.isubn()', function () { - it('should subtract negative number', function () { - var r = new BN( - '7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b', 16); - assert.equal(r.isubn(-1).toString(16), - '7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681c'); - }); - - it('should work for positive numbers', function () { - var a = new BN(-100); - assert.equal(a.negative, 1); - - a.isubn(200); - assert.equal(a.negative, 1); - assert.equal(a.toString(), '-300'); - }); - - it('should not allow a sign change', function () { - var a = new BN(-100); - assert.equal(a.negative, 1); - - a.isubn(-200); - assert.equal(a.negative, 0); - assert.equal(a.toString(), '100'); - }); - - it('should change sign on small numbers at 0', function () { - var a = new BN(0).subn(2); - assert.equal(a.toString(), '-2'); - }); - - it('should change sign on small numbers at 1', function () { - var a = new BN(1).subn(2); - assert.equal(a.toString(), '-1'); - }); - - it('should throw error with num eq 0x4000000', function () { - assert.throws(function () { - new BN(0).isubn(0x4000000); - }, /^Error: Assertion failed$/); - }); - }); - - function testMethod (name, mul) { - describe(name, function () { - it('should multiply numbers of different signs', function () { - var offsets = [ - 1, // smallMulTo - 250, // comb10MulTo - 1000, // bigMulTo - 15000 // jumboMulTo - ]; - - for (var i = 0; i < offsets.length; ++i) { - var x = new BN(1).ishln(offsets[i]); - - assert.equal(mul(x, x).isNeg(), false); - assert.equal(mul(x, x.neg()).isNeg(), true); - assert.equal(mul(x.neg(), x).isNeg(), true); - assert.equal(mul(x.neg(), x.neg()).isNeg(), false); - } - }); - - it('should multiply with carry', function () { - var n = new BN(0x1001); - var r = n; - - for (var i = 0; i < 4; i++) { - r = mul(r, n); - } - - assert.equal(r.toString(16), '100500a00a005001'); - }); - - it('should correctly multiply big numbers', function () { - var n = new BN( - '79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798', - 16 - ); - assert.equal( - mul(n, n).toString(16), - '39e58a8055b6fb264b75ec8c646509784204ac15a8c24e05babc9729ab9' + - 'b055c3a9458e4ce3289560a38e08ba8175a9446ce14e608245ab3a9' + - '978a8bd8acaa40'); - assert.equal( - mul(mul(n, n), n).toString(16), - '1b888e01a06e974017a28a5b4da436169761c9730b7aeedf75fc60f687b' + - '46e0cf2cb11667f795d5569482640fe5f628939467a01a612b02350' + - '0d0161e9730279a7561043af6197798e41b7432458463e64fa81158' + - '907322dc330562697d0d600'); - }); - - it('should multiply neg number on 0', function () { - assert.equal( - mul(new BN('-100000000000'), new BN('3').div(new BN('4'))) - .toString(16), - '0' - ); - }); - - it('should regress mul big numbers', function () { - var q = fixtures.dhGroups.p17.q; - var qs = fixtures.dhGroups.p17.qs; - - q = new BN(q, 16); - assert.equal(mul(q, q).toString(16), qs); - }); - }); - } - - testMethod('.mul()', function (x, y) { - return BN.prototype.mul.apply(x, [ y ]); - }); - - testMethod('.mulf()', function (x, y) { - return BN.prototype.mulf.apply(x, [ y ]); - }); - - describe('.imul()', function () { - it('should multiply numbers in-place', function () { - var a = new BN('abcdef01234567890abcd', 16); - var b = new BN('deadbeefa551edebabba8', 16); - var c = a.mul(b); - - assert.equal(a.imul(b).toString(16), c.toString(16)); - - a = new BN('abcdef01234567890abcd214a25123f512361e6d236', 16); - b = new BN('deadbeefa551edebabba8121234fd21bac0341324dd', 16); - c = a.mul(b); - - assert.equal(a.imul(b).toString(16), c.toString(16)); - }); - - it('should multiply by 0', function () { - var a = new BN('abcdef01234567890abcd', 16); - var b = new BN('0', 16); - var c = a.mul(b); - - assert.equal(a.imul(b).toString(16), c.toString(16)); - }); - - it('should regress mul big numbers in-place', function () { - var q = fixtures.dhGroups.p17.q; - var qs = fixtures.dhGroups.p17.qs; - - q = new BN(q, 16); - - assert.equal(q.isqr().toString(16), qs); - }); - }); - - describe('.muln()', function () { - it('should multiply number by small number', function () { - var a = new BN('abcdef01234567890abcd', 16); - var b = new BN('dead', 16); - var c = a.mul(b); - - assert.equal(a.muln(0xdead).toString(16), c.toString(16)); - }); - - it('should throw error with num eq 0x4000000', function () { - assert.throws(function () { - new BN(0).imuln(0x4000000); - }, /^Error: Assertion failed$/); - }); - }); - - describe('.pow()', function () { - it('should raise number to the power', function () { - var a = new BN('ab', 16); - var b = new BN('13', 10); - var c = a.pow(b); - - assert.equal(c.toString(16), '15963da06977df51909c9ba5b'); - }); - }); - - describe('.div()', function () { - it('should divide small numbers (<=26 bits)', function () { - assert.equal(new BN('256').div(new BN(10)).toString(10), - '25'); - assert.equal(new BN('-256').div(new BN(10)).toString(10), - '-25'); - assert.equal(new BN('256').div(new BN(-10)).toString(10), - '-25'); - assert.equal(new BN('-256').div(new BN(-10)).toString(10), - '25'); - - assert.equal(new BN('10').div(new BN(256)).toString(10), - '0'); - assert.equal(new BN('-10').div(new BN(256)).toString(10), - '0'); - assert.equal(new BN('10').div(new BN(-256)).toString(10), - '0'); - assert.equal(new BN('-10').div(new BN(-256)).toString(10), - '0'); - }); - - it('should divide large numbers (>53 bits)', function () { - assert.equal(new BN('1222222225255589').div(new BN('611111124969028')) - .toString(10), '1'); - assert.equal(new BN('-1222222225255589').div(new BN('611111124969028')) - .toString(10), '-1'); - assert.equal(new BN('1222222225255589').div(new BN('-611111124969028')) - .toString(10), '-1'); - assert.equal(new BN('-1222222225255589').div(new BN('-611111124969028')) - .toString(10), '1'); - - assert.equal(new BN('611111124969028').div(new BN('1222222225255589')) - .toString(10), '0'); - assert.equal(new BN('-611111124969028').div(new BN('1222222225255589')) - .toString(10), '0'); - assert.equal(new BN('611111124969028').div(new BN('-1222222225255589')) - .toString(10), '0'); - assert.equal(new BN('-611111124969028').div(new BN('-1222222225255589')) - .toString(10), '0'); - }); - - it('should divide numbers', function () { - assert.equal(new BN('69527932928').div(new BN('16974594')).toString(16), - 'fff'); - assert.equal(new BN('-69527932928').div(new BN('16974594')).toString(16), - '-fff'); - - var b = new BN( - '39e58a8055b6fb264b75ec8c646509784204ac15a8c24e05babc9729ab9' + - 'b055c3a9458e4ce3289560a38e08ba8175a9446ce14e608245ab3a9' + - '978a8bd8acaa40', - 16); - var n = new BN( - '79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798', - 16 - ); - assert.equal(b.div(n).toString(16), n.toString(16)); - - assert.equal(new BN('1').div(new BN('-5')).toString(10), '0'); - }); - - it('should not fail on regression after moving to _wordDiv', function () { - // Regression after moving to word div - var p = new BN( - 'fffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f', - 16); - var a = new BN( - '79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798', - 16); - var as = a.sqr(); - assert.equal( - as.div(p).toString(16), - '39e58a8055b6fb264b75ec8c646509784204ac15a8c24e05babc9729e58090b9'); - - p = new BN( - 'ffffffff00000001000000000000000000000000ffffffffffffffffffffffff', - 16); - a = new BN( - 'fffffffe00000003fffffffd0000000200000001fffffffe00000002ffffffff' + - 'ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff', - 16); - assert.equal( - a.div(p).toString(16), - 'ffffffff00000002000000000000000000000001000000000000000000000001'); - }); - }); - - describe('.idivn()', function () { - it('should divide numbers in-place', function () { - assert.equal(new BN('10', 16).idivn(3).toString(16), '5'); - assert.equal(new BN('12', 16).idivn(3).toString(16), '6'); - assert.equal(new BN('10000000000000000').idivn(3).toString(10), - '3333333333333333'); - assert.equal( - new BN('100000000000000000000000000000').idivn(3).toString(10), - '33333333333333333333333333333'); - - var t = new BN(3); - assert.equal( - new BN('12345678901234567890123456', 16).idivn(3).toString(16), - new BN('12345678901234567890123456', 16).div(t).toString(16)); - }); - }); - - describe('.divRound()', function () { - it('should divide numbers with rounding', function () { - assert.equal(new BN(9).divRound(new BN(20)).toString(10), - '0'); - assert.equal(new BN(10).divRound(new BN(20)).toString(10), - '1'); - assert.equal(new BN(150).divRound(new BN(20)).toString(10), - '8'); - assert.equal(new BN(149).divRound(new BN(20)).toString(10), - '7'); - assert.equal(new BN(149).divRound(new BN(17)).toString(10), - '9'); - assert.equal(new BN(144).divRound(new BN(17)).toString(10), - '8'); - assert.equal(new BN(-144).divRound(new BN(17)).toString(10), - '-8'); - }); - - it('should return 1 on exact division', function () { - assert.equal(new BN(144).divRound(new BN(144)).toString(10), '1'); - }); - }); - - describe('.mod()', function () { - it('should modulo small numbers (<=26 bits)', function () { - assert.equal(new BN('256').mod(new BN(10)).toString(10), - '6'); - assert.equal(new BN('-256').mod(new BN(10)).toString(10), - '-6'); - assert.equal(new BN('256').mod(new BN(-10)).toString(10), - '6'); - assert.equal(new BN('-256').mod(new BN(-10)).toString(10), - '-6'); - - assert.equal(new BN('10').mod(new BN(256)).toString(10), - '10'); - assert.equal(new BN('-10').mod(new BN(256)).toString(10), - '-10'); - assert.equal(new BN('10').mod(new BN(-256)).toString(10), - '10'); - assert.equal(new BN('-10').mod(new BN(-256)).toString(10), - '-10'); - }); - - it('should modulo large numbers (>53 bits)', function () { - assert.equal(new BN('1222222225255589').mod(new BN('611111124969028')) - .toString(10), '611111100286561'); - assert.equal(new BN('-1222222225255589').mod(new BN('611111124969028')) - .toString(10), '-611111100286561'); - assert.equal(new BN('1222222225255589').mod(new BN('-611111124969028')) - .toString(10), '611111100286561'); - assert.equal(new BN('-1222222225255589').mod(new BN('-611111124969028')) - .toString(10), '-611111100286561'); - - assert.equal(new BN('611111124969028').mod(new BN('1222222225255589')) - .toString(10), '611111124969028'); - assert.equal(new BN('-611111124969028').mod(new BN('1222222225255589')) - .toString(10), '-611111124969028'); - assert.equal(new BN('611111124969028').mod(new BN('-1222222225255589')) - .toString(10), '611111124969028'); - assert.equal(new BN('-611111124969028').mod(new BN('-1222222225255589')) - .toString(10), '-611111124969028'); - }); - - it('should mod numbers', function () { - assert.equal(new BN('10').mod(new BN(256)).toString(16), - 'a'); - assert.equal(new BN('69527932928').mod(new BN('16974594')).toString(16), - '102f302'); - - // 178 = 10 * 17 + 8 - assert.equal(new BN(178).div(new BN(10)).toNumber(), 17); - assert.equal(new BN(178).mod(new BN(10)).toNumber(), 8); - assert.equal(new BN(178).umod(new BN(10)).toNumber(), 8); - - // -178 = 10 * (-17) + (-8) - assert.equal(new BN(-178).div(new BN(10)).toNumber(), -17); - assert.equal(new BN(-178).mod(new BN(10)).toNumber(), -8); - assert.equal(new BN(-178).umod(new BN(10)).toNumber(), 2); - - // 178 = -10 * (-17) + 8 - assert.equal(new BN(178).div(new BN(-10)).toNumber(), -17); - assert.equal(new BN(178).mod(new BN(-10)).toNumber(), 8); - assert.equal(new BN(178).umod(new BN(-10)).toNumber(), 8); - - // -178 = -10 * (17) + (-8) - assert.equal(new BN(-178).div(new BN(-10)).toNumber(), 17); - assert.equal(new BN(-178).mod(new BN(-10)).toNumber(), -8); - assert.equal(new BN(-178).umod(new BN(-10)).toNumber(), 2); - - // -4 = 1 * (-3) + -1 - assert.equal(new BN(-4).div(new BN(-3)).toNumber(), 1); - assert.equal(new BN(-4).mod(new BN(-3)).toNumber(), -1); - - // -4 = -1 * (3) + -1 - assert.equal(new BN(-4).mod(new BN(3)).toNumber(), -1); - // -4 = 1 * (-3) + (-1 + 3) - assert.equal(new BN(-4).umod(new BN(-3)).toNumber(), 2); - - var p = new BN( - 'ffffffff00000001000000000000000000000000ffffffffffffffffffffffff', - 16); - var a = new BN( - 'fffffffe00000003fffffffd0000000200000001fffffffe00000002ffffffff' + - 'ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff', - 16); - assert.equal( - a.mod(p).toString(16), - '0'); - }); - - it('should properly carry the sign inside division', function () { - var a = new BN('945304eb96065b2a98b57a48a06ae28d285a71b5', 'hex'); - var b = new BN( - 'fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe', - 'hex'); - - assert.equal(a.mul(b).mod(a).cmpn(0), 0); - }); - }); - - describe('.modn()', function () { - it('should act like .mod() on small numbers', function () { - assert.equal(new BN('10', 16).modn(256).toString(16), '10'); - assert.equal(new BN('100', 16).modn(256).toString(16), '0'); - assert.equal(new BN('1001', 16).modn(256).toString(16), '1'); - assert.equal(new BN('100000000001', 16).modn(256).toString(16), '1'); - assert.equal(new BN('100000000001', 16).modn(257).toString(16), - new BN('100000000001', 16).mod(new BN(257)).toString(16)); - assert.equal(new BN('123456789012', 16).modn(3).toString(16), - new BN('123456789012', 16).mod(new BN(3)).toString(16)); - }); - }); - - describe('.abs()', function () { - it('should return absolute value', function () { - assert.equal(new BN(0x1001).abs().toString(), '4097'); - assert.equal(new BN(-0x1001).abs().toString(), '4097'); - assert.equal(new BN('ffffffff', 16).abs().toString(), '4294967295'); - }); - }); - - describe('.invm()', function () { - it('should invert relatively-prime numbers', function () { - var p = new BN(257); - var a = new BN(3); - var b = a.invm(p); - assert.equal(a.mul(b).mod(p).toString(16), '1'); - - var p192 = new BN( - 'fffffffffffffffffffffffffffffffeffffffffffffffff', - 16); - a = new BN('deadbeef', 16); - b = a.invm(p192); - assert.equal(a.mul(b).mod(p192).toString(16), '1'); - - // Even base - var phi = new BN('872d9b030ba368706b68932cf07a0e0c', 16); - var e = new BN(65537); - var d = e.invm(phi); - assert.equal(e.mul(d).mod(phi).toString(16), '1'); - - // Even base (take #2) - a = new BN('5'); - b = new BN('6'); - var r = a.invm(b); - assert.equal(r.mul(a).mod(b).toString(16), '1'); - }); - }); - - describe('.gcd()', function () { - it('should return GCD', function () { - assert.equal(new BN(3).gcd(new BN(2)).toString(10), '1'); - assert.equal(new BN(18).gcd(new BN(12)).toString(10), '6'); - assert.equal(new BN(-18).gcd(new BN(12)).toString(10), '6'); - assert.equal(new BN(-18).gcd(new BN(-12)).toString(10), '6'); - assert.equal(new BN(-18).gcd(new BN(0)).toString(10), '18'); - assert.equal(new BN(0).gcd(new BN(-18)).toString(10), '18'); - assert.equal(new BN(2).gcd(new BN(0)).toString(10), '2'); - assert.equal(new BN(0).gcd(new BN(3)).toString(10), '3'); - assert.equal(new BN(0).gcd(new BN(0)).toString(10), '0'); - }); - }); - - describe('.egcd()', function () { - it('should return EGCD', function () { - assert.equal(new BN(3).egcd(new BN(2)).gcd.toString(10), '1'); - assert.equal(new BN(18).egcd(new BN(12)).gcd.toString(10), '6'); - assert.equal(new BN(-18).egcd(new BN(12)).gcd.toString(10), '6'); - assert.equal(new BN(0).egcd(new BN(12)).gcd.toString(10), '12'); - }); - it('should not allow 0 input', function () { - assert.throws(function () { - new BN(1).egcd(0); - }, /^Error: Assertion failed$/); - }); - it('should not allow negative input', function () { - assert.throws(function () { - new BN(1).egcd(-1); - }, /^Error: Assertion failed$/); - }); - }); - - describe('BN.max(a, b)', function () { - it('should return maximum', function () { - assert.equal(BN.max(new BN(3), new BN(2)).toString(16), '3'); - assert.equal(BN.max(new BN(2), new BN(3)).toString(16), '3'); - assert.equal(BN.max(new BN(2), new BN(2)).toString(16), '2'); - assert.equal(BN.max(new BN(2), new BN(-2)).toString(16), '2'); - }); - }); - - describe('BN.min(a, b)', function () { - it('should return minimum', function () { - assert.equal(BN.min(new BN(3), new BN(2)).toString(16), '2'); - assert.equal(BN.min(new BN(2), new BN(3)).toString(16), '2'); - assert.equal(BN.min(new BN(2), new BN(2)).toString(16), '2'); - assert.equal(BN.min(new BN(2), new BN(-2)).toString(16), '-2'); - }); - }); - - describe('BN.ineg', function () { - it('shouldn\'t change sign for zero', function () { - assert.equal(new BN(0).ineg().toString(10), '0'); - }); - }); -}); diff --git a/node_modules/bn.js/test/binary-test.js b/node_modules/bn.js/test/binary-test.js deleted file mode 100644 index 37b6421d..00000000 --- a/node_modules/bn.js/test/binary-test.js +++ /dev/null @@ -1,233 +0,0 @@ -/* global describe, it */ - -var assert = require('assert'); -var BN = require('../').BN; - -describe('BN.js/Binary', function () { - describe('.shl()', function () { - it('should shl numbers', function () { - // TODO(indutny): add negative numbers when the time will come - assert.equal(new BN('69527932928').shln(13).toString(16), - '2060602000000'); - assert.equal(new BN('69527932928').shln(45).toString(16), - '206060200000000000000'); - }); - - it('should ushl numbers', function () { - assert.equal(new BN('69527932928').ushln(13).toString(16), - '2060602000000'); - assert.equal(new BN('69527932928').ushln(45).toString(16), - '206060200000000000000'); - }); - }); - - describe('.shr()', function () { - it('should shr numbers', function () { - // TODO(indutny): add negative numbers when the time will come - assert.equal(new BN('69527932928').shrn(13).toString(16), - '818180'); - assert.equal(new BN('69527932928').shrn(17).toString(16), - '81818'); - assert.equal(new BN('69527932928').shrn(256).toString(16), - '0'); - }); - - it('should ushr numbers', function () { - assert.equal(new BN('69527932928').ushrn(13).toString(16), - '818180'); - assert.equal(new BN('69527932928').ushrn(17).toString(16), - '81818'); - assert.equal(new BN('69527932928').ushrn(256).toString(16), - '0'); - }); - }); - - describe('.bincn()', function () { - it('should increment bit', function () { - assert.equal(new BN(0).bincn(1).toString(16), '2'); - assert.equal(new BN(2).bincn(1).toString(16), '4'); - assert.equal(new BN(2).bincn(1).bincn(1).toString(16), - new BN(2).bincn(2).toString(16)); - assert.equal(new BN(0xffffff).bincn(1).toString(16), '1000001'); - assert.equal(new BN(2).bincn(63).toString(16), - '8000000000000002'); - }); - }); - - describe('.imaskn()', function () { - it('should mask bits in-place', function () { - assert.equal(new BN(0).imaskn(1).toString(16), '0'); - assert.equal(new BN(3).imaskn(1).toString(16), '1'); - assert.equal(new BN('123456789', 16).imaskn(4).toString(16), '9'); - assert.equal(new BN('123456789', 16).imaskn(16).toString(16), '6789'); - assert.equal(new BN('123456789', 16).imaskn(28).toString(16), '3456789'); - }); - - it('should not mask when number is bigger than length', function () { - assert.equal(new BN(0xe3).imaskn(56).toString(16), 'e3'); - assert.equal(new BN(0xe3).imaskn(26).toString(16), 'e3'); - }); - }); - - describe('.testn()', function () { - it('should support test specific bit', function () { - [ - 'ff', - 'ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff' - ].forEach(function (hex) { - var bn = new BN(hex, 16); - var bl = bn.bitLength(); - - for (var i = 0; i < bl; ++i) { - assert.equal(bn.testn(i), true); - } - - // test off the end - assert.equal(bn.testn(bl), false); - }); - - var xbits = '01111001010111001001000100011101' + - '11010011101100011000111001011101' + - '10010100111000000001011000111101' + - '01011111001111100100011110000010' + - '01011010100111010001010011000100' + - '01101001011110100001001111100110' + - '001110010111'; - - var x = new BN( - '23478905234580795234378912401239784125643978256123048348957342' - ); - for (var i = 0; i < x.bitLength(); ++i) { - assert.equal(x.testn(i), (xbits.charAt(i) === '1'), 'Failed @ bit ' + i); - } - }); - - it('should have short-cuts', function () { - var x = new BN('abcd', 16); - assert(!x.testn(128)); - }); - }); - - describe('.and()', function () { - it('should and numbers', function () { - assert.equal(new BN('1010101010101010101010101010101010101010', 2) - .and(new BN('101010101010101010101010101010101010101', 2)) - .toString(2), '0'); - }); - - it('should and numbers of different limb-length', function () { - assert.equal( - new BN('abcd0000ffff', 16) - .and(new BN('abcd', 16)).toString(16), - 'abcd'); - }); - }); - - describe('.iand()', function () { - it('should iand numbers', function () { - assert.equal(new BN('1010101010101010101010101010101010101010', 2) - .iand(new BN('101010101010101010101010101010101010101', 2)) - .toString(2), '0'); - assert.equal(new BN('1000000000000000000000000000000000000001', 2) - .iand(new BN('1', 2)) - .toString(2), '1'); - assert.equal(new BN('1', 2) - .iand(new BN('1000000000000000000000000000000000000001', 2)) - .toString(2), '1'); - }); - }); - - describe('.or()', function () { - it('should or numbers', function () { - assert.equal(new BN('1010101010101010101010101010101010101010', 2) - .or(new BN('101010101010101010101010101010101010101', 2)) - .toString(2), '1111111111111111111111111111111111111111'); - }); - - it('should or numbers of different limb-length', function () { - assert.equal( - new BN('abcd00000000', 16) - .or(new BN('abcd', 16)).toString(16), - 'abcd0000abcd'); - }); - }); - - describe('.ior()', function () { - it('should ior numbers', function () { - assert.equal(new BN('1010101010101010101010101010101010101010', 2) - .ior(new BN('101010101010101010101010101010101010101', 2)) - .toString(2), '1111111111111111111111111111111111111111'); - assert.equal(new BN('1000000000000000000000000000000000000000', 2) - .ior(new BN('1', 2)) - .toString(2), '1000000000000000000000000000000000000001'); - assert.equal(new BN('1', 2) - .ior(new BN('1000000000000000000000000000000000000000', 2)) - .toString(2), '1000000000000000000000000000000000000001'); - }); - }); - - describe('.xor()', function () { - it('should xor numbers', function () { - assert.equal(new BN('11001100110011001100110011001100', 2) - .xor(new BN('1100110011001100110011001100110', 2)) - .toString(2), '10101010101010101010101010101010'); - }); - }); - - describe('.ixor()', function () { - it('should ixor numbers', function () { - assert.equal(new BN('11001100110011001100110011001100', 2) - .ixor(new BN('1100110011001100110011001100110', 2)) - .toString(2), '10101010101010101010101010101010'); - assert.equal(new BN('11001100110011001100110011001100', 2) - .ixor(new BN('1', 2)) - .toString(2), '11001100110011001100110011001101'); - assert.equal(new BN('1', 2) - .ixor(new BN('11001100110011001100110011001100', 2)) - .toString(2), '11001100110011001100110011001101'); - }); - - it('should and numbers of different limb-length', function () { - assert.equal( - new BN('abcd0000ffff', 16) - .xor(new BN('abcd', 16)).toString(16), - 'abcd00005432'); - }); - }); - - describe('.setn()', function () { - it('should allow single bits to be set', function () { - assert.equal(new BN(0).setn(2, true).toString(2), '100'); - assert.equal(new BN(0).setn(27, true).toString(2), - '1000000000000000000000000000'); - assert.equal(new BN(0).setn(63, true).toString(16), - new BN(1).iushln(63).toString(16)); - assert.equal(new BN('1000000000000000000000000001', 2).setn(27, false) - .toString(2), '1'); - assert.equal(new BN('101', 2).setn(2, false).toString(2), '1'); - }); - }); - - describe('.notn()', function () { - it('should allow bitwise negation', function () { - assert.equal(new BN('111000111', 2).notn(9).toString(2), - '111000'); - assert.equal(new BN('000111000', 2).notn(9).toString(2), - '111000111'); - assert.equal(new BN('111000111', 2).notn(9).toString(2), - '111000'); - assert.equal(new BN('000111000', 2).notn(9).toString(2), - '111000111'); - assert.equal(new BN('111000111', 2).notn(32).toString(2), - '11111111111111111111111000111000'); - assert.equal(new BN('000111000', 2).notn(32).toString(2), - '11111111111111111111111111000111'); - assert.equal(new BN('111000111', 2).notn(68).toString(2), - '11111111111111111111111111111111' + - '111111111111111111111111111000111000'); - assert.equal(new BN('000111000', 2).notn(68).toString(2), - '11111111111111111111111111111111' + - '111111111111111111111111111111000111'); - }); - }); -}); diff --git a/node_modules/bn.js/test/constructor-test.js b/node_modules/bn.js/test/constructor-test.js deleted file mode 100644 index 11c7df08..00000000 --- a/node_modules/bn.js/test/constructor-test.js +++ /dev/null @@ -1,149 +0,0 @@ -/* global describe, it */ - -var assert = require('assert'); -var BN = require('../').BN; - -describe('BN.js/Constructor', function () { - describe('with Smi input', function () { - it('should accept one limb number', function () { - assert.equal(new BN(12345).toString(16), '3039'); - }); - - it('should accept two-limb number', function () { - assert.equal(new BN(0x4123456).toString(16), '4123456'); - }); - - it('should accept 52 bits of precision', function () { - var num = Math.pow(2, 52); - assert.equal(new BN(num, 10).toString(10), num.toString(10)); - }); - - it('should accept max safe integer', function () { - var num = Math.pow(2, 53) - 1; - assert.equal(new BN(num, 10).toString(10), num.toString(10)); - }); - - it('should not accept an unsafe integer', function () { - var num = Math.pow(2, 53); - - assert.throws(function () { - return new BN(num, 10); - }, /^Error: Assertion failed$/); - }); - - it('should accept two-limb LE number', function () { - assert.equal(new BN(0x4123456, null, 'le').toString(16), '56341204'); - }); - }); - - describe('with String input', function () { - it('should accept base-16', function () { - assert.equal(new BN('1A6B765D8CDF', 16).toString(16), '1a6b765d8cdf'); - assert.equal(new BN('1A6B765D8CDF', 16).toString(), '29048849665247'); - }); - - it('should accept base-hex', function () { - assert.equal(new BN('FF', 'hex').toString(), '255'); - }); - - it('should accept base-16 with spaces', function () { - var num = 'a89c e5af8724 c0a23e0e 0ff77500'; - assert.equal(new BN(num, 16).toString(16), num.replace(/ /g, '')); - }); - - it('should accept long base-16', function () { - var num = '123456789abcdef123456789abcdef123456789abcdef'; - assert.equal(new BN(num, 16).toString(16), num); - }); - - it('should accept positive base-10', function () { - assert.equal(new BN('10654321').toString(), '10654321'); - assert.equal(new BN('29048849665247').toString(16), '1a6b765d8cdf'); - }); - - it('should accept negative base-10', function () { - assert.equal(new BN('-29048849665247').toString(16), '-1a6b765d8cdf'); - }); - - it('should accept long base-10', function () { - var num = '10000000000000000'; - assert.equal(new BN(num).toString(10), num); - }); - - it('should accept base-2', function () { - var base2 = '11111111111111111111111111111111111111111111111111111'; - assert.equal(new BN(base2, 2).toString(2), base2); - }); - - it('should accept base-36', function () { - var base36 = 'zzZzzzZzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz'; - assert.equal(new BN(base36, 36).toString(36), base36.toLowerCase()); - }); - - it('should not overflow limbs during base-10', function () { - var num = '65820182292848241686198767302293' + - '20890292528855852623664389292032'; - assert(new BN(num).words[0] < 0x4000000); - }); - - it('should accept base-16 LE integer', function () { - assert.equal(new BN('1A6B765D8CDF', 16, 'le').toString(16), - 'df8c5d766b1a'); - }); - }); - - describe('with Array input', function () { - it('should not fail on empty array', function () { - assert.equal(new BN([]).toString(16), '0'); - }); - - it('should import/export big endian', function () { - assert.equal(new BN([ 1, 2, 3 ]).toString(16), '10203'); - assert.equal(new BN([ 1, 2, 3, 4 ]).toString(16), '1020304'); - assert.equal(new BN([ 1, 2, 3, 4, 5 ]).toString(16), '102030405'); - assert.equal(new BN([ 1, 2, 3, 4, 5, 6, 7, 8 ]).toString(16), - '102030405060708'); - assert.equal(new BN([ 1, 2, 3, 4 ]).toArray().join(','), '1,2,3,4'); - assert.equal(new BN([ 1, 2, 3, 4, 5, 6, 7, 8 ]).toArray().join(','), - '1,2,3,4,5,6,7,8'); - }); - - it('should import little endian', function () { - assert.equal(new BN([ 1, 2, 3 ], 10, 'le').toString(16), '30201'); - assert.equal(new BN([ 1, 2, 3, 4 ], 10, 'le').toString(16), '4030201'); - assert.equal(new BN([ 1, 2, 3, 4, 5 ], 10, 'le').toString(16), - '504030201'); - assert.equal(new BN([ 1, 2, 3, 4, 5, 6, 7, 8 ], 'le').toString(16), - '807060504030201'); - assert.equal(new BN([ 1, 2, 3, 4 ]).toArray('le').join(','), '4,3,2,1'); - assert.equal(new BN([ 1, 2, 3, 4, 5, 6, 7, 8 ]).toArray('le').join(','), - '8,7,6,5,4,3,2,1'); - }); - - it('should import big endian with implicit base', function () { - assert.equal(new BN([ 1, 2, 3, 4, 5 ], 'le').toString(16), '504030201'); - }); - }); - - // the Array code is able to handle Buffer - describe('with Buffer input', function () { - it('should not fail on empty Buffer', function () { - assert.equal(new BN(new Buffer(0)).toString(16), '0'); - }); - - it('should import/export big endian', function () { - assert.equal(new BN(new Buffer('010203', 'hex')).toString(16), '10203'); - }); - - it('should import little endian', function () { - assert.equal(new BN(new Buffer('010203', 'hex'), 'le').toString(16), '30201'); - }); - }); - - describe('with BN input', function () { - it('should clone BN', function () { - var num = new BN(12345); - assert.equal(new BN(num).toString(10), '12345'); - }); - }); -}); diff --git a/node_modules/bn.js/test/fixtures.js b/node_modules/bn.js/test/fixtures.js deleted file mode 100644 index 39fd661d..00000000 --- a/node_modules/bn.js/test/fixtures.js +++ /dev/null @@ -1,264 +0,0 @@ -exports.dhGroups = { - p16: { - prime: 'ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd1' + - '29024e088a67cc74020bbea63b139b22514a08798e3404dd' + - 'ef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245' + - 'e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7ed' + - 'ee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3d' + - 'c2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f' + - '83655d23dca3ad961c62f356208552bb9ed529077096966d' + - '670c354e4abc9804f1746c08ca18217c32905e462e36ce3b' + - 'e39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9' + - 'de2bcbf6955817183995497cea956ae515d2261898fa0510' + - '15728e5a8aaac42dad33170d04507a33a85521abdf1cba64' + - 'ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7' + - 'abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6b' + - 'f12ffa06d98a0864d87602733ec86a64521f2b18177b200c' + - 'bbe117577a615d6c770988c0bad946e208e24fa074e5ab31' + - '43db5bfce0fd108e4b82d120a92108011a723c12a787e6d7' + - '88719a10bdba5b2699c327186af4e23c1a946834b6150bda' + - '2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6' + - '287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed' + - '1f612970cee2d7afb81bdd762170481cd0069127d5b05aa9' + - '93b4ea988d8fddc186ffb7dc90a6c08f4df435c934063199' + - 'ffffffffffffffff', - priv: '6d5923e6449122cbbcc1b96093e0b7e4fd3e469f58daddae' + - '53b49b20664f4132675df9ce98ae0cfdcac0f4181ccb643b' + - '625f98104dcf6f7d8e81961e2cab4b5014895260cb977c7d' + - '2f981f8532fb5da60b3676dfe57f293f05d525866053ac7e' + - '65abfd19241146e92e64f309a97ef3b529af4d6189fa416c' + - '9e1a816c3bdf88e5edf48fbd8233ef9038bb46faa95122c0' + - '5a426be72039639cd2d53d37254b3d258960dcb33c255ede' + - '20e9d7b4b123c8b4f4b986f53cdd510d042166f7dd7dca98' + - '7c39ab36381ba30a5fdd027eb6128d2ef8e5802a2194d422' + - 'b05fe6e1cb4817789b923d8636c1ec4b7601c90da3ddc178' + - '52f59217ae070d87f2e75cbfb6ff92430ad26a71c8373452' + - 'ae1cc5c93350e2d7b87e0acfeba401aaf518580937bf0b6c' + - '341f8c49165a47e49ce50853989d07171c00f43dcddddf72' + - '94fb9c3f4e1124e98ef656b797ef48974ddcd43a21fa06d0' + - '565ae8ce494747ce9e0ea0166e76eb45279e5c6471db7df8' + - 'cc88764be29666de9c545e72da36da2f7a352fb17bdeb982' + - 'a6dc0193ec4bf00b2e533efd6cd4d46e6fb237b775615576' + - 'dd6c7c7bbc087a25e6909d1ebc6e5b38e5c8472c0fc429c6' + - 'f17da1838cbcd9bbef57c5b5522fd6053e62ba21fe97c826' + - 'd3889d0cc17e5fa00b54d8d9f0f46fb523698af965950f4b' + - '941369e180f0aece3870d9335f2301db251595d173902cad' + - '394eaa6ffef8be6c', - pub: 'd53703b7340bc89bfc47176d351e5cf86d5a18d9662eca3c' + - '9759c83b6ccda8859649a5866524d77f79e501db923416ca' + - '2636243836d3e6df752defc0fb19cc386e3ae48ad647753f' + - 'bf415e2612f8a9fd01efe7aca249589590c7e6a0332630bb' + - '29c5b3501265d720213790556f0f1d114a9e2071be3620bd' + - '4ee1e8bb96689ac9e226f0a4203025f0267adc273a43582b' + - '00b70b490343529eaec4dcff140773cd6654658517f51193' + - '13f21f0a8e04fe7d7b21ffeca85ff8f87c42bb8d9cb13a72' + - 'c00e9c6e9dfcedda0777af951cc8ccab90d35e915e707d8e' + - '4c2aca219547dd78e9a1a0730accdc9ad0b854e51edd1e91' + - '4756760bab156ca6e3cb9c625cf0870def34e9ac2e552800' + - 'd6ce506d43dbbc75acfa0c8d8fb12daa3c783fb726f187d5' + - '58131779239c912d389d0511e0f3a81969d12aeee670e48f' + - 'ba41f7ed9f10705543689c2506b976a8ffabed45e33795b0' + - '1df4f6b993a33d1deab1316a67419afa31fbb6fdd252ee8c' + - '7c7d1d016c44e3fcf6b41898d7f206aa33760b505e4eff2e' + - 'c624bc7fe636b1d59e45d6f904fc391419f13d1f0cdb5b6c' + - '2378b09434159917dde709f8a6b5dc30994d056e3f964371' + - '11587ac7af0a442b8367a7bd940f752ddabf31cf01171e24' + - 'd78df136e9681cd974ce4f858a5fb6efd3234a91857bb52d' + - '9e7b414a8bc66db4b5a73bbeccfb6eb764b4f0cbf0375136' + - 'b024b04e698d54a5' - }, - p17: { - prime: 'ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd1' + - '29024e088a67cc74020bbea63b139b22514a08798e3404dd' + - 'ef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245' + - 'e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7ed' + - 'ee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3d' + - 'c2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f' + - '83655d23dca3ad961c62f356208552bb9ed529077096966d' + - '670c354e4abc9804f1746c08ca18217c32905e462e36ce3b' + - 'e39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9' + - 'de2bcbf6955817183995497cea956ae515d2261898fa0510' + - '15728e5a8aaac42dad33170d04507a33a85521abdf1cba64' + - 'ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7' + - 'abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6b' + - 'f12ffa06d98a0864d87602733ec86a64521f2b18177b200c' + - 'bbe117577a615d6c770988c0bad946e208e24fa074e5ab31' + - '43db5bfce0fd108e4b82d120a92108011a723c12a787e6d7' + - '88719a10bdba5b2699c327186af4e23c1a946834b6150bda' + - '2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6' + - '287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed' + - '1f612970cee2d7afb81bdd762170481cd0069127d5b05aa9' + - '93b4ea988d8fddc186ffb7dc90a6c08f4df435c934028492' + - '36c3fab4d27c7026c1d4dcb2602646dec9751e763dba37bd' + - 'f8ff9406ad9e530ee5db382f413001aeb06a53ed9027d831' + - '179727b0865a8918da3edbebcf9b14ed44ce6cbaced4bb1b' + - 'db7f1447e6cc254b332051512bd7af426fb8f401378cd2bf' + - '5983ca01c64b92ecf032ea15d1721d03f482d7ce6e74fef6' + - 'd55e702f46980c82b5a84031900b1c9e59e7c97fbec7e8f3' + - '23a97a7e36cc88be0f1d45b7ff585ac54bd407b22b4154aa' + - 'cc8f6d7ebf48e1d814cc5ed20f8037e0a79715eef29be328' + - '06a1d58bb7c5da76f550aa3d8a1fbff0eb19ccb1a313d55c' + - 'da56c9ec2ef29632387fe8d76e3c0468043e8f663f4860ee' + - '12bf2d5b0b7474d6e694f91e6dcc4024ffffffffffffffff', - priv: '6017f2bc23e1caff5b0a8b4e1fc72422b5204415787801dc' + - '025762b8dbb98ab57603aaaa27c4e6bdf742b4a1726b9375' + - 'a8ca3cf07771779589831d8bd18ddeb79c43e7e77d433950' + - 'e652e49df35b11fa09644874d71d62fdaffb580816c2c88c' + - '2c4a2eefd4a660360316741b05a15a2e37f236692ad3c463' + - 'fff559938fc6b77176e84e1bb47fb41af691c5eb7bb81bd8' + - 'c918f52625a1128f754b08f5a1403b84667231c4dfe07ed4' + - '326234c113931ce606037e960f35a2dfdec38a5f057884d3' + - '0af8fab3be39c1eeb390205fd65982191fc21d5aa30ddf51' + - 'a8e1c58c0c19fc4b4a7380ea9e836aaf671c90c29bc4bcc7' + - '813811aa436a7a9005de9b507957c56a9caa1351b6efc620' + - '7225a18f6e97f830fb6a8c4f03b82f4611e67ab9497b9271' + - 'd6ac252793cc3e5538990dbd894d2dbc2d152801937d9f74' + - 'da4b741b50b4d40e4c75e2ac163f7b397fd555648b249f97' + - 'ffe58ffb6d096aa84534c4c5729cff137759bd34e80db4ab' + - '47e2b9c52064e7f0bf677f72ac9e5d0c6606943683f9d12f' + - '180cf065a5cb8ec3179a874f358847a907f8471d15f1e728' + - '7023249d6d13c82da52628654438f47b8b5cdf4761fbf6ad' + - '9219eceac657dbd06cf2ab776ad4c968f81c3d039367f0a4' + - 'd77c7ec4435c27b6c147071665100063b5666e06eb2fb2cc' + - '3159ba34bc98ca346342195f6f1fb053ddc3bc1873564d40' + - '1c6738cdf764d6e1ff25ca5926f80102ea6593c17170966b' + - 'b5d7352dd7fb821230237ea3ebed1f920feaadbd21be295a' + - '69f2083deae9c5cdf5f4830eb04b7c1f80cc61c17232d79f' + - '7ecc2cc462a7965f804001c89982734e5abba2d31df1b012' + - '152c6b226dff34510b54be8c2cd68d795def66c57a3abfb6' + - '896f1d139e633417f8c694764974d268f46ece3a8d6616ea' + - 'a592144be48ee1e0a1595d3e5edfede5b27cec6c48ceb2ff' + - 'b42cb44275851b0ebf87dfc9aa2d0cb0805e9454b051dfe8' + - 'a29fadd82491a4b4c23f2d06ba45483ab59976da1433c9ce' + - '500164b957a04cf62dd67595319b512fc4b998424d1164dd' + - 'bbe5d1a0f7257cbb04ec9b5ed92079a1502d98725023ecb2', - pub: '3bf836229c7dd874fe37c1790d201e82ed8e192ed61571ca' + - '7285264974eb2a0171f3747b2fc23969a916cbd21e14f7e2' + - 'f0d72dcd2247affba926f9e7bb99944cb5609aed85e71b89' + - 'e89d2651550cb5bd8281bd3144066af78f194032aa777739' + - 'cccb7862a1af401f99f7e5c693f25ddce2dedd9686633820' + - 'd28d0f5ed0c6b5a094f5fe6170b8e2cbc9dff118398baee6' + - 'e895a6301cb6e881b3cae749a5bdf5c56fc897ff68bc73f2' + - '4811bb108b882872bade1f147d886a415cda2b93dd90190c' + - 'be5c2dd53fe78add5960e97f58ff2506afe437f4cf4c912a' + - '397c1a2139ac6207d3ab76e6b7ffd23bb6866dd7f87a9ae5' + - '578789084ff2d06ea0d30156d7a10496e8ebe094f5703539' + - '730f5fdbebc066de417be82c99c7da59953071f49da7878d' + - 'a588775ff2a7f0084de390f009f372af75cdeba292b08ea8' + - '4bd13a87e1ca678f9ad148145f7cef3620d69a891be46fbb' + - 'cad858e2401ec0fd72abdea2f643e6d0197b7646fbb83220' + - '0f4cf7a7f6a7559f9fb0d0f1680822af9dbd8dec4cd1b5e1' + - '7bc799e902d9fe746ddf41da3b7020350d3600347398999a' + - 'baf75d53e03ad2ee17de8a2032f1008c6c2e6618b62f225b' + - 'a2f350179445debe68500fcbb6cae970a9920e321b468b74' + - '5fb524fb88abbcacdca121d737c44d30724227a99745c209' + - 'b970d1ff93bbc9f28b01b4e714d6c9cbd9ea032d4e964d8e' + - '8fff01db095160c20b7646d9fcd314c4bc11bcc232aeccc0' + - 'fbedccbc786951025597522eef283e3f56b44561a0765783' + - '420128638c257e54b972a76e4261892d81222b3e2039c61a' + - 'ab8408fcaac3d634f848ab3ee65ea1bd13c6cd75d2e78060' + - 'e13cf67fbef8de66d2049e26c0541c679fff3e6afc290efe' + - '875c213df9678e4a7ec484bc87dae5f0a1c26d7583e38941' + - 'b7c68b004d4df8b004b666f9448aac1cc3ea21461f41ea5d' + - 'd0f7a9e6161cfe0f58bcfd304bdc11d78c2e9d542e86c0b5' + - '6985cc83f693f686eaac17411a8247bf62f5ccc7782349b5' + - 'cc1f20e312fa2acc0197154d1bfee507e8db77e8f2732f2d' + - '641440ccf248e8643b2bd1e1f9e8239356ab91098fcb431d', - q: 'a899c59999bf877d96442d284359783bdc64b5f878b688fe' + - '51407f0526e616553ad0aaaac4d5bed3046f10a1faaf42bb' + - '2342dc4b7908eea0c46e4c4576897675c2bfdc4467870d3d' + - 'cd90adaed4359237a4bc6924bfb99aa6bf5f5ede15b574ea' + - 'e977eac096f3c67d09bda574c6306c6123fa89d2f086b8dc' + - 'ff92bc570c18d83fe6c810ccfd22ce4c749ef5e6ead3fffe' + - 'c63d95e0e3fde1df9db6a35fa1d107058f37e41957769199' + - 'd945dd7a373622c65f0af3fd9eb1ddc5c764bbfaf7a3dc37' + - '2548e683b970dac4aa4b9869080d2376c9adecebb84e172c' + - '09aeeb25fb8df23e60033260c4f8aac6b8b98ab894b1fb84' + - 'ebb83c0fb2081c3f3eee07f44e24d8fabf76f19ed167b0d7' + - 'ff971565aa4efa3625fce5a43ceeaa3eebb3ce88a00f597f' + - '048c69292b38dba2103ecdd5ec4ccfe3b2d87fa6202f334b' + - 'c1cab83b608dfc875b650b69f2c7e23c0b2b4adf149a6100' + - 'db1b6dbad4679ecb1ea95eafaba3bd00db11c2134f5a8686' + - '358b8b2ab49a1b2e85e1e45caeac5cd4dc0b3b5fffba8871' + - '1c6baf399edd48dad5e5c313702737a6dbdcede80ca358e5' + - '1d1c4fe42e8948a084403f61baed38aa9a1a5ce2918e9f33' + - '100050a430b47bc592995606440272a4994677577a6aaa1b' + - 'a101045dbec5a4e9566dab5445d1af3ed19519f07ac4e2a8' + - 'bd0a84b01978f203a9125a0be020f71fab56c2c9e344d4f4' + - '12d53d3cd8eb74ca5122002e931e3cb0bd4b7492436be17a' + - 'd7ebe27148671f59432c36d8c56eb762655711cfc8471f70' + - '83a8b7283bcb3b1b1d47d37c23d030288cfcef05fbdb4e16' + - '652ee03ee7b77056a808cd700bc3d9ef826eca9a59be959c' + - '947c865d6b372a1ca2d503d7df6d7611b12111665438475a' + - '1c64145849b3da8c2d343410df892d958db232617f9896f1' + - 'de95b8b5a47132be80dd65298c7f2047858409bf762dbc05' + - 'a62ca392ac40cfb8201a0607a2cae07d99a307625f2b2d04' + - 'fe83fbd3ab53602263410f143b73d5b46fc761882e78c782' + - 'd2c36e716a770a7aefaf7f76cea872db7bffefdbc4c2f9e0' + - '39c19adac915e7a63dcb8c8c78c113f29a3e0bc10e100ce0', - qs: '6f0a2fb763eaeb8eb324d564f03d4a55fdcd709e5f1b65e9' + - '5702b0141182f9f945d71bc3e64a7dfdae7482a7dd5a4e58' + - 'bc38f78de2013f2c468a621f08536969d2c8d011bb3bc259' + - '2124692c91140a5472cad224acdacdeae5751dadfdf068b8' + - '77bfa7374694c6a7be159fc3d24ff9eeeecaf62580427ad8' + - '622d48c51a1c4b1701d768c79d8c819776e096d2694107a2' + - 'f3ec0c32224795b59d32894834039dacb369280afb221bc0' + - '90570a93cf409889b818bb30cccee98b2aa26dbba0f28499' + - '08e1a3cd43fa1f1fb71049e5c77c3724d74dc351d9989057' + - '37bbda3805bd6b1293da8774410fb66e3194e18cdb304dd9' + - 'a0b59b583dcbc9fc045ac9d56aea5cfc9f8a0b95da1e11b7' + - '574d1f976e45fe12294997fac66ca0b83fc056183549e850' + - 'a11413cc4abbe39a211e8c8cbf82f2a23266b3c10ab9e286' + - '07a1b6088909cddff856e1eb6b2cde8bdac53fa939827736' + - 'ca1b892f6c95899613442bd02dbdb747f02487718e2d3f22' + - 'f73734d29767ed8d0e346d0c4098b6fdcb4df7d0c4d29603' + - '5bffe80d6c65ae0a1b814150d349096baaf950f2caf298d2' + - 'b292a1d48cf82b10734fe8cedfa16914076dfe3e9b51337b' + - 'ed28ea1e6824bb717b641ca0e526e175d3e5ed7892aebab0' + - 'f207562cc938a821e2956107c09b6ce4049adddcd0b7505d' + - '49ae6c69a20122461102d465d93dc03db026be54c303613a' + - 'b8e5ce3fd4f65d0b6162ff740a0bf5469ffd442d8c509cd2' + - '3b40dab90f6776ca17fc0678774bd6eee1fa85ababa52ec1' + - 'a15031eb677c6c488661dddd8b83d6031fe294489ded5f08' + - '8ad1689a14baeae7e688afa3033899c81f58de39b392ca94' + - 'af6f15a46f19fa95c06f9493c8b96a9be25e78b9ea35013b' + - 'caa76de6303939299d07426a88a334278fc3d0d9fa71373e' + - 'be51d3c1076ab93a11d3d0d703366ff8cde4c11261d488e5' + - '60a2bdf3bfe2476032294800d6a4a39d306e65c6d7d8d66e' + - '5ec63eee94531e83a9bddc458a2b508285c0ee10b7bd94da' + - '2815a0c5bd5b2e15cbe66355e42f5af8955cdfc0b3a4996d' + - '288db1f4b32b15643b18193e378cb7491f3c3951cdd044b1' + - 'a519571bffac2da986f5f1d506c66530a55f70751e24fa8e' + - 'd83ac2347f4069fb561a5565e78c6f0207da24e889a93a96' + - '65f717d9fe8a2938a09ab5f81be7ccecf466c0397fc15a57' + - '469939793f302739765773c256a3ca55d0548afd117a7cae' + - '98ca7e0d749a130c7b743d376848e255f8fdbe4cb4480b63' + - 'cd2c015d1020cf095d175f3ca9dcdfbaf1b2a6e6468eee4c' + - 'c750f2132a77f376bd9782b9d0ff4da98621b898e251a263' + - '4301ba2214a8c430b2f7a79dbbfd6d7ff6e9b0c137b025ff' + - '587c0bf912f0b19d4fff96b1ecd2ca990c89b386055c60f2' + - '3b94214bd55096f17a7b2c0fa12b333235101cd6f28a128c' + - '782e8a72671adadebbd073ded30bd7f09fb693565dcf0bf3' + - '090c21d13e5b0989dd8956f18f17f4f69449a13549c9d80a' + - '77e5e61b5aeeee9528634100e7bc390672f0ded1ca53555b' + - 'abddbcf700b9da6192255bddf50a76b709fbed251dce4c7e' + - '1ca36b85d1e97c1bc9d38c887a5adf140f9eeef674c31422' + - 'e65f63cae719f8c1324e42fa5fd8500899ef5aa3f9856aa7' + - 'ce10c85600a040343204f36bfeab8cfa6e9deb8a2edd2a8e' + - '018d00c7c9fa3a251ad0f57183c37e6377797653f382ec7a' + - '2b0145e16d3c856bc3634b46d90d7198aff12aff88a30e34' + - 'e2bfaf62705f3382576a9d3eeb0829fca2387b5b654af46e' + - '5cf6316fb57d59e5ea6c369061ac64d99671b0e516529dd5' + - 'd9c48ea0503e55fee090d36c5ea8b5954f6fcc0060794e1c' + - 'b7bc24aa1e5c0142fd4ce6e8fd5aa92a7bf84317ea9e1642' + - 'b6995bac6705adf93cbce72433ed0871139970d640f67b78' + - 'e63a7a6d849db2567df69ac7d79f8c62664ac221df228289' + - 'd0a4f9ebd9acb4f87d49da64e51a619fd3f3baccbd9feb12' + - '5abe0cc2c8d17ed1d8546da2b6c641f4d3020a5f9b9f26ac' + - '16546c2d61385505612275ea344c2bbf1ce890023738f715' + - '5e9eba6a071678c8ebd009c328c3eb643679de86e69a9fa5' + - '67a9e146030ff03d546310a0a568c5ba0070e0da22f2cef8' + - '54714b04d399bbc8fd261f9e8efcd0e83bdbc3f5cfb2d024' + - '3e398478cc598e000124eb8858f9df8f52946c2a1ca5c400' - } -}; diff --git a/node_modules/bn.js/test/pummel/dh-group-test.js b/node_modules/bn.js/test/pummel/dh-group-test.js deleted file mode 100644 index 37a259ff..00000000 --- a/node_modules/bn.js/test/pummel/dh-group-test.js +++ /dev/null @@ -1,23 +0,0 @@ -/* global describe, it */ - -var assert = require('assert'); -var BN = require('../../').BN; -var fixtures = require('../fixtures'); - -describe('BN.js/Slow DH test', function () { - var groups = fixtures.dhGroups; - Object.keys(groups).forEach(function (name) { - it('should match public key for ' + name + ' group', function () { - var group = groups[name]; - - this.timeout(3600 * 1000); - - var base = new BN(2); - var mont = BN.red(new BN(group.prime, 16)); - var priv = new BN(group.priv, 16); - var multed = base.toRed(mont).redPow(priv).fromRed(); - var actual = new Buffer(multed.toArray()); - assert.equal(actual.toString('hex'), group.pub); - }); - }); -}); diff --git a/node_modules/bn.js/test/red-test.js b/node_modules/bn.js/test/red-test.js deleted file mode 100644 index fc2498c9..00000000 --- a/node_modules/bn.js/test/red-test.js +++ /dev/null @@ -1,263 +0,0 @@ -/* global describe, it */ - -var assert = require('assert'); -var BN = require('../').BN; - -describe('BN.js/Reduction context', function () { - function testMethod (name, fn) { - describe(name + ' method', function () { - it('should support add, iadd, sub, isub operations', function () { - var p = new BN(257); - var m = fn(p); - var a = new BN(123).toRed(m); - var b = new BN(231).toRed(m); - - assert.equal(a.redAdd(b).fromRed().toString(10), '97'); - assert.equal(a.redSub(b).fromRed().toString(10), '149'); - assert.equal(b.redSub(a).fromRed().toString(10), '108'); - - assert.equal(a.clone().redIAdd(b).fromRed().toString(10), '97'); - assert.equal(a.clone().redISub(b).fromRed().toString(10), '149'); - assert.equal(b.clone().redISub(a).fromRed().toString(10), '108'); - }); - - it('should support pow and mul operations', function () { - var p192 = new BN( - 'fffffffffffffffffffffffffffffffeffffffffffffffff', - 16); - var m = fn(p192); - var a = new BN(123); - var b = new BN(231); - var c = a.toRed(m).redMul(b.toRed(m)).fromRed(); - assert(c.cmp(a.mul(b).mod(p192)) === 0); - - assert.equal(a.toRed(m).redPow(new BN(3)).fromRed() - .cmp(a.sqr().mul(a)), 0); - assert.equal(a.toRed(m).redPow(new BN(4)).fromRed() - .cmp(a.sqr().sqr()), 0); - assert.equal(a.toRed(m).redPow(new BN(8)).fromRed() - .cmp(a.sqr().sqr().sqr()), 0); - assert.equal(a.toRed(m).redPow(new BN(9)).fromRed() - .cmp(a.sqr().sqr().sqr().mul(a)), 0); - assert.equal(a.toRed(m).redPow(new BN(17)).fromRed() - .cmp(a.sqr().sqr().sqr().sqr().mul(a)), 0); - assert.equal( - a.toRed(m).redPow(new BN('deadbeefabbadead', 16)).fromRed() - .toString(16), - '3aa0e7e304e320b68ef61592bcb00341866d6fa66e11a4d6'); - }); - - it('should sqrtm numbers', function () { - var p = new BN(263); - var m = fn(p); - var q = new BN(11).toRed(m); - - var qr = q.redSqrt(); - assert.equal(qr.redSqr().cmp(q), 0); - - qr = q.redSqrt(); - assert.equal(qr.redSqr().cmp(q), 0); - - p = new BN( - 'fffffffffffffffffffffffffffffffeffffffffffffffff', - 16); - m = fn(p); - - q = new BN(13).toRed(m); - qr = q.redSqrt(true, p); - assert.equal(qr.redSqr().cmp(q), 0); - - qr = q.redSqrt(false, p); - assert.equal(qr.redSqr().cmp(q), 0); - - // Tonelli-shanks - p = new BN(13); - m = fn(p); - q = new BN(10).toRed(m); - assert.equal(q.redSqrt().fromRed().toString(10), '7'); - }); - - it('should invm numbers', function () { - var p = new BN(257); - var m = fn(p); - var a = new BN(3).toRed(m); - var b = a.redInvm(); - assert.equal(a.redMul(b).fromRed().toString(16), '1'); - }); - - it('should invm numbers (regression)', function () { - var p = new BN( - 'ffffffff00000001000000000000000000000000ffffffffffffffffffffffff', - 16); - var a = new BN( - 'e1d969b8192fbac73ea5b7921896d6a2263d4d4077bb8e5055361d1f7f8163f3', - 16); - - var m = fn(p); - a = a.toRed(m); - - assert.equal(a.redInvm().fromRed().negative, 0); - }); - - it('should imul numbers', function () { - var p = new BN( - 'fffffffffffffffffffffffffffffffeffffffffffffffff', - 16); - var m = fn(p); - - var a = new BN('deadbeefabbadead', 16); - var b = new BN('abbadeadbeefdead', 16); - var c = a.mul(b).mod(p); - - assert.equal(a.toRed(m).redIMul(b.toRed(m)).fromRed().toString(16), - c.toString(16)); - }); - - it('should pow(base, 0) == 1', function () { - var base = new BN(256).toRed(BN.red('k256')); - var exponent = new BN(0); - var result = base.redPow(exponent); - assert.equal(result.toString(), '1'); - }); - - it('should shl numbers', function () { - var base = new BN(256).toRed(BN.red('k256')); - var result = base.redShl(1); - assert.equal(result.toString(), '512'); - }); - - it('should reduce when converting to red', function () { - var p = new BN(257); - var m = fn(p); - var a = new BN(5).toRed(m); - - assert.doesNotThrow(function () { - var b = a.redISub(new BN(512).toRed(m)); - b.redISub(new BN(512).toRed(m)); - }); - }); - - it('redNeg and zero value', function () { - var a = new BN(0).toRed(BN.red('k256')).redNeg(); - assert.equal(a.isZero(), true); - }); - - it('should not allow modulus <= 1', function () { - assert.throws(function () { - BN.red(new BN(0)); - }, /^Error: modulus must be greater than 1$/); - - assert.throws(function () { - BN.red(new BN(1)); - }, /^Error: modulus must be greater than 1$/); - - assert.doesNotThrow(function () { - BN.red(new BN(2)); - }); - }); - }); - } - - testMethod('Plain', BN.red); - testMethod('Montgomery', BN.mont); - - describe('Pseudo-Mersenne Primes', function () { - it('should reduce numbers mod k256', function () { - var p = BN._prime('k256'); - - assert.equal(p.ireduce(new BN(0xdead)).toString(16), 'dead'); - assert.equal(p.ireduce(new BN('deadbeef', 16)).toString(16), 'deadbeef'); - - var num = new BN('fedcba9876543210fedcba9876543210dead' + - 'fedcba9876543210fedcba9876543210dead', - 16); - var exp = num.mod(p.p).toString(16); - assert.equal(p.ireduce(num).toString(16), exp); - - var regr = new BN('f7e46df64c1815962bf7bc9c56128798' + - '3f4fcef9cb1979573163b477eab93959' + - '335dfb29ef07a4d835d22aa3b6797760' + - '70a8b8f59ba73d56d01a79af9', - 16); - exp = regr.mod(p.p).toString(16); - - assert.equal(p.ireduce(regr).toString(16), exp); - }); - - it('should not fail to invm number mod k256', function () { - var regr2 = new BN( - '6c150c4aa9a8cf1934485d40674d4a7cd494675537bda36d49405c5d2c6f496f', 16); - regr2 = regr2.toRed(BN.red('k256')); - assert.equal(regr2.redInvm().redMul(regr2).fromRed().cmpn(1), 0); - }); - - it('should correctly square the number', function () { - var p = BN._prime('k256').p; - var red = BN.red('k256'); - - var n = new BN('9cd8cb48c3281596139f147c1364a3ed' + - 'e88d3f310fdb0eb98c924e599ca1b3c9', - 16); - var expected = n.sqr().mod(p); - var actual = n.toRed(red).redSqr().fromRed(); - - assert.equal(actual.toString(16), expected.toString(16)); - }); - - it('redISqr should return right result', function () { - var n = new BN('30f28939', 16); - var actual = n.toRed(BN.red('k256')).redISqr().fromRed(); - assert.equal(actual.toString(16), '95bd93d19520eb1'); - }); - }); - - it('should avoid 4.1.0 regresion', function () { - function bits2int (obits, q) { - var bits = new BN(obits); - var shift = (obits.length << 3) - q.bitLength(); - if (shift > 0) { - bits.ishrn(shift); - } - return bits; - } - var t = new Buffer('aff1651e4cd6036d57aa8b2a05ccf1a9d5a40166340ecbbdc55' + - 'be10b568aa0aa3d05ce9a2fcec9df8ed018e29683c6051cb83e' + - '46ce31ba4edb045356a8d0d80b', 'hex'); - var g = new BN('5c7ff6b06f8f143fe8288433493e4769c4d988ace5be25a0e24809670' + - '716c613d7b0cee6932f8faa7c44d2cb24523da53fbe4f6ec3595892d1' + - 'aa58c4328a06c46a15662e7eaa703a1decf8bbb2d05dbe2eb956c142a' + - '338661d10461c0d135472085057f3494309ffa73c611f78b32adbb574' + - '0c361c9f35be90997db2014e2ef5aa61782f52abeb8bd6432c4dd097b' + - 'c5423b285dafb60dc364e8161f4a2a35aca3a10b1c4d203cc76a470a3' + - '3afdcbdd92959859abd8b56e1725252d78eac66e71ba9ae3f1dd24871' + - '99874393cd4d832186800654760e1e34c09e4d155179f9ec0dc4473f9' + - '96bdce6eed1cabed8b6f116f7ad9cf505df0f998e34ab27514b0ffe7', - 16); - var p = new BN('9db6fb5951b66bb6fe1e140f1d2ce5502374161fd6538df1648218642' + - 'f0b5c48c8f7a41aadfa187324b87674fa1822b00f1ecf8136943d7c55' + - '757264e5a1a44ffe012e9936e00c1d3e9310b01c7d179805d3058b2a9' + - 'f4bb6f9716bfe6117c6b5b3cc4d9be341104ad4a80ad6c94e005f4b99' + - '3e14f091eb51743bf33050c38de235567e1b34c3d6a5c0ceaa1a0f368' + - '213c3d19843d0b4b09dcb9fc72d39c8de41f1bf14d4bb4563ca283716' + - '21cad3324b6a2d392145bebfac748805236f5ca2fe92b871cd8f9c36d' + - '3292b5509ca8caa77a2adfc7bfd77dda6f71125a7456fea153e433256' + - 'a2261c6a06ed3693797e7995fad5aabbcfbe3eda2741e375404ae25b', - 16); - var q = new BN('f2c3119374ce76c9356990b465374a17f23f9ed35089bd969f61c6dde' + - '9998c1f', 16); - var k = bits2int(t, q); - var expectedR = '89ec4bb1400eccff8e7d9aa515cd1de7803f2daff09693ee7fd1353e' + - '90a68307'; - var r = g.toRed(BN.mont(p)).redPow(k).fromRed().mod(q); - assert.equal(r.toString(16), expectedR); - }); - - it('K256.split for 512 bits number should return equal numbers', function () { - var red = BN.red('k256'); - var input = new BN(1).iushln(512).subn(1); - assert.equal(input.bitLength(), 512); - var output = new BN(0); - red.prime.split(input, output); - assert.equal(input.cmp(output), 0); - }); -}); diff --git a/node_modules/bn.js/test/utils-test.js b/node_modules/bn.js/test/utils-test.js deleted file mode 100644 index 8571905a..00000000 --- a/node_modules/bn.js/test/utils-test.js +++ /dev/null @@ -1,345 +0,0 @@ -/* global describe, it */ - -var assert = require('assert'); -var BN = require('../').BN; - -describe('BN.js/Utils', function () { - describe('.toString()', function () { - describe('binary padding', function () { - it('should have a length of 256', function () { - var a = new BN(0); - - assert.equal(a.toString(2, 256).length, 256); - }); - }); - describe('hex padding', function () { - it('should have length of 8 from leading 15', function () { - var a = new BN('ffb9602', 16); - - assert.equal(a.toString('hex', 2).length, 8); - }); - - it('should have length of 8 from leading zero', function () { - var a = new BN('fb9604', 16); - - assert.equal(a.toString('hex', 8).length, 8); - }); - - it('should have length of 8 from leading zeros', function () { - var a = new BN(0); - - assert.equal(a.toString('hex', 8).length, 8); - }); - - it('should have length of 64 from leading 15', function () { - var a = new BN( - 'ffb96ff654e61130ba8422f0debca77a0ea74ae5ea8bca9b54ab64aabf01003', - 16); - - assert.equal(a.toString('hex', 2).length, 64); - }); - - it('should have length of 64 from leading zero', function () { - var a = new BN( - 'fb96ff654e61130ba8422f0debca77a0ea74ae5ea8bca9b54ab64aabf01003', - 16); - - assert.equal(a.toString('hex', 64).length, 64); - }); - }); - }); - - describe('.isNeg()', function () { - it('should return true for negative numbers', function () { - assert.equal(new BN(-1).isNeg(), true); - assert.equal(new BN(1).isNeg(), false); - assert.equal(new BN(0).isNeg(), false); - assert.equal(new BN('-0', 10).isNeg(), false); - }); - }); - - describe('.isOdd()', function () { - it('should return true for odd numbers', function () { - assert.equal(new BN(0).isOdd(), false); - assert.equal(new BN(1).isOdd(), true); - assert.equal(new BN(2).isOdd(), false); - assert.equal(new BN('-0', 10).isOdd(), false); - assert.equal(new BN('-1', 10).isOdd(), true); - assert.equal(new BN('-2', 10).isOdd(), false); - }); - }); - - describe('.isEven()', function () { - it('should return true for even numbers', function () { - assert.equal(new BN(0).isEven(), true); - assert.equal(new BN(1).isEven(), false); - assert.equal(new BN(2).isEven(), true); - assert.equal(new BN('-0', 10).isEven(), true); - assert.equal(new BN('-1', 10).isEven(), false); - assert.equal(new BN('-2', 10).isEven(), true); - }); - }); - - describe('.isZero()', function () { - it('should return true for zero', function () { - assert.equal(new BN(0).isZero(), true); - assert.equal(new BN(1).isZero(), false); - assert.equal(new BN(0xffffffff).isZero(), false); - }); - }); - - describe('.bitLength()', function () { - it('should return proper bitLength', function () { - assert.equal(new BN(0).bitLength(), 0); - assert.equal(new BN(0x1).bitLength(), 1); - assert.equal(new BN(0x2).bitLength(), 2); - assert.equal(new BN(0x3).bitLength(), 2); - assert.equal(new BN(0x4).bitLength(), 3); - assert.equal(new BN(0x8).bitLength(), 4); - assert.equal(new BN(0x10).bitLength(), 5); - assert.equal(new BN(0x100).bitLength(), 9); - assert.equal(new BN(0x123456).bitLength(), 21); - assert.equal(new BN('123456789', 16).bitLength(), 33); - assert.equal(new BN('8023456789', 16).bitLength(), 40); - }); - }); - - describe('.byteLength()', function () { - it('should return proper byteLength', function () { - assert.equal(new BN(0).byteLength(), 0); - assert.equal(new BN(0x1).byteLength(), 1); - assert.equal(new BN(0x2).byteLength(), 1); - assert.equal(new BN(0x3).byteLength(), 1); - assert.equal(new BN(0x4).byteLength(), 1); - assert.equal(new BN(0x8).byteLength(), 1); - assert.equal(new BN(0x10).byteLength(), 1); - assert.equal(new BN(0x100).byteLength(), 2); - assert.equal(new BN(0x123456).byteLength(), 3); - assert.equal(new BN('123456789', 16).byteLength(), 5); - assert.equal(new BN('8023456789', 16).byteLength(), 5); - }); - }); - - describe('.toArray()', function () { - it('should return [ 0 ] for `0`', function () { - var n = new BN(0); - assert.deepEqual(n.toArray('be'), [ 0 ]); - assert.deepEqual(n.toArray('le'), [ 0 ]); - }); - - it('should zero pad to desired lengths', function () { - var n = new BN(0x123456); - assert.deepEqual(n.toArray('be', 5), [ 0x00, 0x00, 0x12, 0x34, 0x56 ]); - assert.deepEqual(n.toArray('le', 5), [ 0x56, 0x34, 0x12, 0x00, 0x00 ]); - }); - - it('should throw when naturally larger than desired length', function () { - var n = new BN(0x123456); - assert.throws(function () { - n.toArray('be', 2); - }, /^Error: byte array longer than desired length$/); - }); - }); - - describe('.toBuffer', function () { - it('should return proper Buffer', function () { - var n = new BN(0x123456); - assert.deepEqual(n.toBuffer('be', 5).toString('hex'), '0000123456'); - assert.deepEqual(n.toBuffer('le', 5).toString('hex'), '5634120000'); - }); - }); - - describe('.toNumber()', function () { - it('should return proper Number if below the limit', function () { - assert.deepEqual(new BN(0x123456).toNumber(), 0x123456); - assert.deepEqual(new BN(0x3ffffff).toNumber(), 0x3ffffff); - assert.deepEqual(new BN(0x4000000).toNumber(), 0x4000000); - assert.deepEqual(new BN(0x10000000000000).toNumber(), 0x10000000000000); - assert.deepEqual(new BN(0x10040004004000).toNumber(), 0x10040004004000); - assert.deepEqual(new BN(-0x123456).toNumber(), -0x123456); - assert.deepEqual(new BN(-0x3ffffff).toNumber(), -0x3ffffff); - assert.deepEqual(new BN(-0x4000000).toNumber(), -0x4000000); - assert.deepEqual(new BN(-0x10000000000000).toNumber(), -0x10000000000000); - assert.deepEqual(new BN(-0x10040004004000).toNumber(), -0x10040004004000); - }); - - it('should throw when number exceeds 53 bits', function () { - var n = new BN(1).iushln(54); - assert.throws(function () { - n.toNumber(); - }, /^Error: Number can only safely store up to 53 bits$/); - }); - }); - - describe('.zeroBits()', function () { - it('should return proper zeroBits', function () { - assert.equal(new BN(0).zeroBits(), 0); - assert.equal(new BN(0x1).zeroBits(), 0); - assert.equal(new BN(0x2).zeroBits(), 1); - assert.equal(new BN(0x3).zeroBits(), 0); - assert.equal(new BN(0x4).zeroBits(), 2); - assert.equal(new BN(0x8).zeroBits(), 3); - assert.equal(new BN(0x10).zeroBits(), 4); - assert.equal(new BN(0x100).zeroBits(), 8); - assert.equal(new BN(0x1000000).zeroBits(), 24); - assert.equal(new BN(0x123456).zeroBits(), 1); - }); - }); - - describe('.toJSON', function () { - it('should return hex string', function () { - assert.equal(new BN(0x123).toJSON(), '123'); - }); - }); - - describe('.cmpn', function () { - it('should return -1, 0, 1 correctly', function () { - assert.equal(new BN(42).cmpn(42), 0); - assert.equal(new BN(42).cmpn(43), -1); - assert.equal(new BN(42).cmpn(41), 1); - assert.equal(new BN(0x3fffffe).cmpn(0x3fffffe), 0); - assert.equal(new BN(0x3fffffe).cmpn(0x3ffffff), -1); - assert.equal(new BN(0x3fffffe).cmpn(0x3fffffd), 1); - assert.throws(function () { - new BN(0x3fffffe).cmpn(0x4000000); - }, /^Error: Number is too big$/); - assert.equal(new BN(42).cmpn(-42), 1); - assert.equal(new BN(-42).cmpn(42), -1); - assert.equal(new BN(-42).cmpn(-42), 0); - assert.equal(1 / new BN(-42).cmpn(-42), Infinity); - }); - }); - - describe('.cmp', function () { - it('should return -1, 0, 1 correctly', function () { - assert.equal(new BN(42).cmp(new BN(42)), 0); - assert.equal(new BN(42).cmp(new BN(43)), -1); - assert.equal(new BN(42).cmp(new BN(41)), 1); - assert.equal(new BN(0x3fffffe).cmp(new BN(0x3fffffe)), 0); - assert.equal(new BN(0x3fffffe).cmp(new BN(0x3ffffff)), -1); - assert.equal(new BN(0x3fffffe).cmp(new BN(0x3fffffd)), 1); - assert.equal(new BN(0x3fffffe).cmp(new BN(0x4000000)), -1); - assert.equal(new BN(42).cmp(new BN(-42)), 1); - assert.equal(new BN(-42).cmp(new BN(42)), -1); - assert.equal(new BN(-42).cmp(new BN(-42)), 0); - assert.equal(1 / new BN(-42).cmp(new BN(-42)), Infinity); - }); - }); - - describe('comparison shorthands', function () { - it('.gtn greater than', function () { - assert.equal(new BN(3).gtn(2), true); - assert.equal(new BN(3).gtn(3), false); - assert.equal(new BN(3).gtn(4), false); - }); - it('.gt greater than', function () { - assert.equal(new BN(3).gt(new BN(2)), true); - assert.equal(new BN(3).gt(new BN(3)), false); - assert.equal(new BN(3).gt(new BN(4)), false); - }); - it('.gten greater than or equal', function () { - assert.equal(new BN(3).gten(3), true); - assert.equal(new BN(3).gten(2), true); - assert.equal(new BN(3).gten(4), false); - }); - it('.gte greater than or equal', function () { - assert.equal(new BN(3).gte(new BN(3)), true); - assert.equal(new BN(3).gte(new BN(2)), true); - assert.equal(new BN(3).gte(new BN(4)), false); - }); - it('.ltn less than', function () { - assert.equal(new BN(2).ltn(3), true); - assert.equal(new BN(2).ltn(2), false); - assert.equal(new BN(2).ltn(1), false); - }); - it('.lt less than', function () { - assert.equal(new BN(2).lt(new BN(3)), true); - assert.equal(new BN(2).lt(new BN(2)), false); - assert.equal(new BN(2).lt(new BN(1)), false); - }); - it('.lten less than or equal', function () { - assert.equal(new BN(3).lten(3), true); - assert.equal(new BN(3).lten(2), false); - assert.equal(new BN(3).lten(4), true); - }); - it('.lte less than or equal', function () { - assert.equal(new BN(3).lte(new BN(3)), true); - assert.equal(new BN(3).lte(new BN(2)), false); - assert.equal(new BN(3).lte(new BN(4)), true); - }); - it('.eqn equal', function () { - assert.equal(new BN(3).eqn(3), true); - assert.equal(new BN(3).eqn(2), false); - assert.equal(new BN(3).eqn(4), false); - }); - it('.eq equal', function () { - assert.equal(new BN(3).eq(new BN(3)), true); - assert.equal(new BN(3).eq(new BN(2)), false); - assert.equal(new BN(3).eq(new BN(4)), false); - }); - }); - - describe('.fromTwos', function () { - it('should convert from two\'s complement to negative number', function () { - assert.equal(new BN('00000000', 16).fromTwos(32).toNumber(), 0); - assert.equal(new BN('00000001', 16).fromTwos(32).toNumber(), 1); - assert.equal(new BN('7fffffff', 16).fromTwos(32).toNumber(), 2147483647); - assert.equal(new BN('80000000', 16).fromTwos(32).toNumber(), -2147483648); - assert.equal(new BN('f0000000', 16).fromTwos(32).toNumber(), -268435456); - assert.equal(new BN('f1234567', 16).fromTwos(32).toNumber(), -249346713); - assert.equal(new BN('ffffffff', 16).fromTwos(32).toNumber(), -1); - assert.equal(new BN('fffffffe', 16).fromTwos(32).toNumber(), -2); - assert.equal(new BN('fffffffffffffffffffffffffffffffe', 16) - .fromTwos(128).toNumber(), -2); - assert.equal(new BN('ffffffffffffffffffffffffffffffff' + - 'fffffffffffffffffffffffffffffffe', 16).fromTwos(256).toNumber(), -2); - assert.equal(new BN('ffffffffffffffffffffffffffffffff' + - 'ffffffffffffffffffffffffffffffff', 16).fromTwos(256).toNumber(), -1); - assert.equal(new BN('7fffffffffffffffffffffffffffffff' + - 'ffffffffffffffffffffffffffffffff', 16).fromTwos(256).toString(10), - new BN('5789604461865809771178549250434395392663499' + - '2332820282019728792003956564819967', 10).toString(10)); - assert.equal(new BN('80000000000000000000000000000000' + - '00000000000000000000000000000000', 16).fromTwos(256).toString(10), - new BN('-578960446186580977117854925043439539266349' + - '92332820282019728792003956564819968', 10).toString(10)); - }); - }); - - describe('.toTwos', function () { - it('should convert from negative number to two\'s complement', function () { - assert.equal(new BN(0).toTwos(32).toString(16), '0'); - assert.equal(new BN(1).toTwos(32).toString(16), '1'); - assert.equal(new BN(2147483647).toTwos(32).toString(16), '7fffffff'); - assert.equal(new BN('-2147483648', 10).toTwos(32).toString(16), '80000000'); - assert.equal(new BN('-268435456', 10).toTwos(32).toString(16), 'f0000000'); - assert.equal(new BN('-249346713', 10).toTwos(32).toString(16), 'f1234567'); - assert.equal(new BN('-1', 10).toTwos(32).toString(16), 'ffffffff'); - assert.equal(new BN('-2', 10).toTwos(32).toString(16), 'fffffffe'); - assert.equal(new BN('-2', 10).toTwos(128).toString(16), - 'fffffffffffffffffffffffffffffffe'); - assert.equal(new BN('-2', 10).toTwos(256).toString(16), - 'fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe'); - assert.equal(new BN('-1', 10).toTwos(256).toString(16), - 'ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff'); - assert.equal(new BN('5789604461865809771178549250434395392663' + - '4992332820282019728792003956564819967', 10).toTwos(256).toString(16), - '7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff'); - assert.equal(new BN('-578960446186580977117854925043439539266' + - '34992332820282019728792003956564819968', 10).toTwos(256).toString(16), - '8000000000000000000000000000000000000000000000000000000000000000'); - }); - }); - - describe('.isBN', function () { - it('should return true for BN', function () { - assert.equal(BN.isBN(new BN()), true); - }); - - it('should return false for everything else', function () { - assert.equal(BN.isBN(1), false); - assert.equal(BN.isBN([]), false); - assert.equal(BN.isBN({}), false); - }); - }); -}); diff --git a/node_modules/bn.js/util/genCombMulTo.js b/node_modules/bn.js/util/genCombMulTo.js deleted file mode 100644 index 8b456c7c..00000000 --- a/node_modules/bn.js/util/genCombMulTo.js +++ /dev/null @@ -1,65 +0,0 @@ -'use strict'; - -// NOTE: This could be potentionally used to generate loop-less multiplications -function genCombMulTo (alen, blen) { - var len = alen + blen - 1; - var src = [ - 'var a = self.words;', - 'var b = num.words;', - 'var o = out.words;', - 'var c = 0;', - 'var lo;', - 'var mid;', - 'var hi;' - ]; - for (var i = 0; i < alen; i++) { - src.push('var a' + i + ' = a[' + i + '] | 0;'); - src.push('var al' + i + ' = a' + i + ' & 0x1fff;'); - src.push('var ah' + i + ' = a' + i + ' >>> 13;'); - } - for (i = 0; i < blen; i++) { - src.push('var b' + i + ' = b[' + i + '] | 0;'); - src.push('var bl' + i + ' = b' + i + ' & 0x1fff;'); - src.push('var bh' + i + ' = b' + i + ' >>> 13;'); - } - src.push(''); - src.push('out.negative = self.negative ^ num.negative;'); - src.push('out.length = ' + len + ';'); - - for (var k = 0; k < len; k++) { - var minJ = Math.max(0, k - alen + 1); - var maxJ = Math.min(k, blen - 1); - - src.push('\/* k = ' + k + ' *\/'); - src.push('var w' + k + ' = c;'); - src.push('c = 0;'); - for (var j = minJ; j <= maxJ; j++) { - i = k - j; - - src.push('lo = Math.imul(al' + i + ', bl' + j + ');'); - src.push('mid = Math.imul(al' + i + ', bh' + j + ');'); - src.push('mid = (mid + Math.imul(ah' + i + ', bl' + j + ')) | 0;'); - src.push('hi = Math.imul(ah' + i + ', bh' + j + ');'); - - src.push('w' + k + ' = (w' + k + ' + lo) | 0;'); - src.push('w' + k + ' = (w' + k + ' + ((mid & 0x1fff) << 13)) | 0;'); - src.push('c = (c + hi) | 0;'); - src.push('c = (c + (mid >>> 13)) | 0;'); - src.push('c = (c + (w' + k + ' >>> 26)) | 0;'); - src.push('w' + k + ' &= 0x3ffffff;'); - } - } - // Store in separate step for better memory access - for (k = 0; k < len; k++) { - src.push('o[' + k + '] = w' + k + ';'); - } - src.push('if (c !== 0) {', - ' o[' + k + '] = c;', - ' out.length++;', - '}', - 'return out;'); - - return src.join('\n'); -} - -console.log(genCombMulTo(10, 10)); diff --git a/node_modules/bn.js/util/genCombMulTo10.js b/node_modules/bn.js/util/genCombMulTo10.js deleted file mode 100644 index cf2e6e80..00000000 --- a/node_modules/bn.js/util/genCombMulTo10.js +++ /dev/null @@ -1,65 +0,0 @@ -'use strict'; - -function genCombMulTo (alen, blen) { - var len = alen + blen - 1; - var src = [ - 'var a = self.words;', - 'var b = num.words;', - 'var o = out.words;', - 'var c = 0;', - 'var lo;', - 'var mid;', - 'var hi;' - ]; - for (var i = 0; i < alen; i++) { - src.push('var a' + i + ' = a[' + i + '] | 0;'); - src.push('var al' + i + ' = a' + i + ' & 0x1fff;'); - src.push('var ah' + i + ' = a' + i + ' >>> 13;'); - } - for (i = 0; i < blen; i++) { - src.push('var b' + i + ' = b[' + i + '] | 0;'); - src.push('var bl' + i + ' = b' + i + ' & 0x1fff;'); - src.push('var bh' + i + ' = b' + i + ' >>> 13;'); - } - src.push(''); - src.push('out.negative = self.negative ^ num.negative;'); - src.push('out.length = ' + len + ';'); - - for (var k = 0; k < len; k++) { - var minJ = Math.max(0, k - alen + 1); - var maxJ = Math.min(k, blen - 1); - - src.push('\/* k = ' + k + ' *\/'); - src.push('lo = Math.imul(al' + (k - minJ) + ', bl' + minJ + ');'); - src.push('mid = Math.imul(al' + (k - minJ) + ', bh' + minJ + ');'); - src.push( - 'mid = (mid + Math.imul(ah' + (k - minJ) + ', bl' + minJ + ')) | 0;'); - src.push('hi = Math.imul(ah' + (k - minJ) + ', bh' + minJ + ');'); - - for (var j = minJ + 1; j <= maxJ; j++) { - i = k - j; - - src.push('lo = (lo + Math.imul(al' + i + ', bl' + j + ')) | 0;'); - src.push('mid = (mid + Math.imul(al' + i + ', bh' + j + ')) | 0;'); - src.push('mid = (mid + Math.imul(ah' + i + ', bl' + j + ')) | 0;'); - src.push('hi = (hi + Math.imul(ah' + i + ', bh' + j + ')) | 0;'); - } - - src.push('var w' + k + ' = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;'); - src.push('c = (((hi + (mid >>> 13)) | 0) + (w' + k + ' >>> 26)) | 0;'); - src.push('w' + k + ' &= 0x3ffffff;'); - } - // Store in separate step for better memory access - for (k = 0; k < len; k++) { - src.push('o[' + k + '] = w' + k + ';'); - } - src.push('if (c !== 0) {', - ' o[' + k + '] = c;', - ' out.length++;', - '}', - 'return out;'); - - return src.join('\n'); -} - -console.log(genCombMulTo(10, 10)); diff --git a/node_modules/boom/.npmignore b/node_modules/boom/.npmignore deleted file mode 100644 index 77ba16cb..00000000 --- a/node_modules/boom/.npmignore +++ /dev/null @@ -1,18 +0,0 @@ -.idea -*.iml -npm-debug.log -dump.rdb -node_modules -results.tap -results.xml -npm-shrinkwrap.json -config.json -.DS_Store -*/.DS_Store -*/*/.DS_Store -._* -*/._* -*/*/._* -coverage.* -lib-cov - diff --git a/node_modules/boom/.travis.yml b/node_modules/boom/.travis.yml deleted file mode 100755 index dd1b24f1..00000000 --- a/node_modules/boom/.travis.yml +++ /dev/null @@ -1,8 +0,0 @@ -language: node_js - -node_js: - - 0.10 - - 4.0 - -sudo: false - diff --git a/node_modules/boom/CONTRIBUTING.md b/node_modules/boom/CONTRIBUTING.md deleted file mode 100644 index 89283615..00000000 --- a/node_modules/boom/CONTRIBUTING.md +++ /dev/null @@ -1 +0,0 @@ -Please view our [hapijs contributing guide](https://github.com/hapijs/hapi/blob/master/CONTRIBUTING.md). diff --git a/node_modules/boom/LICENSE b/node_modules/boom/LICENSE deleted file mode 100755 index 39468893..00000000 --- a/node_modules/boom/LICENSE +++ /dev/null @@ -1,28 +0,0 @@ -Copyright (c) 2012-2014, Walmart and other contributors. -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * The names of any contributors may not be used to endorse or promote - products derived from this software without specific prior written - permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS AND CONTRIBUTORS BE LIABLE FOR ANY -DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - * * * - -The complete list of contributors can be found at: https://github.com/hapijs/boom/graphs/contributors \ No newline at end of file diff --git a/node_modules/boom/README.md b/node_modules/boom/README.md deleted file mode 100755 index cbd91c93..00000000 --- a/node_modules/boom/README.md +++ /dev/null @@ -1,652 +0,0 @@ -![boom Logo](https://raw.github.com/hapijs/boom/master/images/boom.png) - -HTTP-friendly error objects - -[![Build Status](https://secure.travis-ci.org/hapijs/boom.png)](http://travis-ci.org/hapijs/boom) -[![Current Version](https://img.shields.io/npm/v/boom.svg)](https://www.npmjs.com/package/boom) - -Lead Maintainer: [Adam Bretz](https://github.com/arb) - -**boom** provides a set of utilities for returning HTTP errors. Each utility returns a `Boom` error response -object (instance of `Error`) which includes the following properties: -- `isBoom` - if `true`, indicates this is a `Boom` object instance. -- `isServer` - convenience bool indicating status code >= 500. -- `message` - the error message. -- `output` - the formatted response. Can be directly manipulated after object construction to return a custom - error response. Allowed root keys: - - `statusCode` - the HTTP status code (typically 4xx or 5xx). - - `headers` - an object containing any HTTP headers where each key is a header name and value is the header content. - - `payload` - the formatted object used as the response payload (stringified). Can be directly manipulated but any - changes will be lost - if `reformat()` is called. Any content allowed and by default includes the following content: - - `statusCode` - the HTTP status code, derived from `error.output.statusCode`. - - `error` - the HTTP status message (e.g. 'Bad Request', 'Internal Server Error') derived from `statusCode`. - - `message` - the error message derived from `error.message`. -- inherited `Error` properties. - -The `Boom` object also supports the following method: -- `reformat()` - rebuilds `error.output` using the other object properties. - -## Overview - -- Helper methods - - [`wrap(error, [statusCode], [message])`](#wraperror-statuscode-message) - - [`create(statusCode, [message], [data])`](#createstatuscode-message-data) -- HTTP 4xx Errors - - 400: [`Boom.badRequest([message], [data])`](#boombadrequestmessage-data) - - 401: [`Boom.unauthorized([message], [scheme], [attributes])`](#boomunauthorizedmessage-scheme-attributes) - - 403: [`Boom.forbidden([message], [data])`](#boomforbiddenmessage-data) - - 404: [`Boom.notFound([message], [data])`](#boomnotfoundmessage-data) - - 405: [`Boom.methodNotAllowed([message], [data])`](#boommethodnotallowedmessage-data) - - 406: [`Boom.notAcceptable([message], [data])`](#boomnotacceptablemessage-data) - - 407: [`Boom.proxyAuthRequired([message], [data])`](#boomproxyauthrequiredmessage-data) - - 408: [`Boom.clientTimeout([message], [data])`](#boomclienttimeoutmessage-data) - - 409: [`Boom.conflict([message], [data])`](#boomconflictmessage-data) - - 410: [`Boom.resourceGone([message], [data])`](#boomresourcegonemessage-data) - - 411: [`Boom.lengthRequired([message], [data])`](#boomlengthrequiredmessage-data) - - 412: [`Boom.preconditionFailed([message], [data])`](#boompreconditionfailedmessage-data) - - 413: [`Boom.entityTooLarge([message], [data])`](#boomentitytoolargemessage-data) - - 414: [`Boom.uriTooLong([message], [data])`](#boomuritoolongmessage-data) - - 415: [`Boom.unsupportedMediaType([message], [data])`](#boomunsupportedmediatypemessage-data) - - 416: [`Boom.rangeNotSatisfiable([message], [data])`](#boomrangenotsatisfiablemessage-data) - - 417: [`Boom.expectationFailed([message], [data])`](#boomexpectationfailedmessage-data) - - 422: [`Boom.badData([message], [data])`](#boombaddatamessage-data) - - 428: [`Boom.preconditionRequired([message], [data])`](#boompreconditionrequiredmessage-data) - - 429: [`Boom.tooManyRequests([message], [data])`](#boomtoomanyrequestsmessage-data) -- HTTP 5xx Errors - - 500: [`Boom.badImplementation([message], [data])`](#boombadimplementationmessage-data) - - 501: [`Boom.notImplemented([message], [data])`](#boomnotimplementedmessage-data) - - 502: [`Boom.badGateway([message], [data])`](#boombadgatewaymessage-data) - - 503: [`Boom.serverTimeout([message], [data])`](#boomservertimeoutmessage-data) - - 504: [`Boom.gatewayTimeout([message], [data])`](#boomgatewaytimeoutmessage-data) -- [FAQ](#faq) - - -## Helper Methods - -### `wrap(error, [statusCode], [message])` - -Decorates an error with the **boom** properties where: -- `error` - the error object to wrap. If `error` is already a **boom** object, returns back the same object. -- `statusCode` - optional HTTP status code. Defaults to `500`. -- `message` - optional message string. If the error already has a message, it adds the message as a prefix. - Defaults to no message. - -```js -var error = new Error('Unexpected input'); -Boom.wrap(error, 400); -``` - -### `create(statusCode, [message], [data])` - -Generates an `Error` object with the **boom** decorations where: -- `statusCode` - an HTTP error code number. Must be greater or equal 400. -- `message` - optional message string. -- `data` - additional error data set to `error.data` property. - -```js -var error = Boom.create(400, 'Bad request', { timestamp: Date.now() }); -``` - -## HTTP 4xx Errors - -### `Boom.badRequest([message], [data])` - -Returns a 400 Bad Request error where: -- `message` - optional message. -- `data` - optional additional error data. - -```js -Boom.badRequest('invalid query'); -``` - -Generates the following response payload: - -```json -{ - "statusCode": 400, - "error": "Bad Request", - "message": "invalid query" -} -``` - -### `Boom.unauthorized([message], [scheme], [attributes])` - -Returns a 401 Unauthorized error where: -- `message` - optional message. -- `scheme` can be one of the following: - - an authentication scheme name - - an array of string values. These values will be separated by ', ' and set to the 'WWW-Authenticate' header. -- `attributes` - an object of values to use while setting the 'WWW-Authenticate' header. This value is only used - when `schema` is a string, otherwise it is ignored. Every key/value pair will be included in the - 'WWW-Authenticate' in the format of 'key="value"' as well as in the response payload under the `attributes` key. - `null` and `undefined` will be replaced with an empty string. If `attributes` is set, `message` will be used as - the 'error' segment of the 'WWW-Authenticate' header. If `message` is unset, the 'error' segment of the header - will not be present and `isMissing` will be true on the error object. - -If either `scheme` or `attributes` are set, the resultant `Boom` object will have the 'WWW-Authenticate' header set for the response. - -```js -Boom.unauthorized('invalid password'); -``` - -Generates the following response: - -```json -"payload": { - "statusCode": 401, - "error": "Unauthorized", - "message": "invalid password" -}, -"headers" {} -``` - -```js -Boom.unauthorized('invalid password', 'sample'); -``` - -Generates the following response: - -```json -"payload": { - "statusCode": 401, - "error": "Unauthorized", - "message": "invalid password", - "attributes": { - "error": "invalid password" - } -}, -"headers" { - "WWW-Authenticate": "sample error=\"invalid password\"" -} -``` - -```js -Boom.unauthorized('invalid password', 'sample', { ttl: 0, cache: null, foo: 'bar' }); -``` - -Generates the following response: - -```json -"payload": { - "statusCode": 401, - "error": "Unauthorized", - "message": "invalid password", - "attributes": { - "error": "invalid password", - "ttl": 0, - "cache": "", - "foo": "bar" - } -}, -"headers" { - "WWW-Authenticate": "sample ttl=\"0\", cache=\"\", foo=\"bar\", error=\"invalid password\"" -} -``` - -### `Boom.forbidden([message], [data])` - -Returns a 403 Forbidden error where: -- `message` - optional message. -- `data` - optional additional error data. - -```js -Boom.forbidden('try again some time'); -``` - -Generates the following response payload: - -```json -{ - "statusCode": 403, - "error": "Forbidden", - "message": "try again some time" -} -``` - -### `Boom.notFound([message], [data])` - -Returns a 404 Not Found error where: -- `message` - optional message. -- `data` - optional additional error data. - -```js -Boom.notFound('missing'); -``` - -Generates the following response payload: - -```json -{ - "statusCode": 404, - "error": "Not Found", - "message": "missing" -} -``` - -### `Boom.methodNotAllowed([message], [data])` - -Returns a 405 Method Not Allowed error where: -- `message` - optional message. -- `data` - optional additional error data. - -```js -Boom.methodNotAllowed('that method is not allowed'); -``` - -Generates the following response payload: - -```json -{ - "statusCode": 405, - "error": "Method Not Allowed", - "message": "that method is not allowed" -} -``` - -### `Boom.notAcceptable([message], [data])` - -Returns a 406 Not Acceptable error where: -- `message` - optional message. -- `data` - optional additional error data. - -```js -Boom.notAcceptable('unacceptable'); -``` - -Generates the following response payload: - -```json -{ - "statusCode": 406, - "error": "Not Acceptable", - "message": "unacceptable" -} -``` - -### `Boom.proxyAuthRequired([message], [data])` - -Returns a 407 Proxy Authentication Required error where: -- `message` - optional message. -- `data` - optional additional error data. - -```js -Boom.proxyAuthRequired('auth missing'); -``` - -Generates the following response payload: - -```json -{ - "statusCode": 407, - "error": "Proxy Authentication Required", - "message": "auth missing" -} -``` - -### `Boom.clientTimeout([message], [data])` - -Returns a 408 Request Time-out error where: -- `message` - optional message. -- `data` - optional additional error data. - -```js -Boom.clientTimeout('timed out'); -``` - -Generates the following response payload: - -```json -{ - "statusCode": 408, - "error": "Request Time-out", - "message": "timed out" -} -``` - -### `Boom.conflict([message], [data])` - -Returns a 409 Conflict error where: -- `message` - optional message. -- `data` - optional additional error data. - -```js -Boom.conflict('there was a conflict'); -``` - -Generates the following response payload: - -```json -{ - "statusCode": 409, - "error": "Conflict", - "message": "there was a conflict" -} -``` - -### `Boom.resourceGone([message], [data])` - -Returns a 410 Gone error where: -- `message` - optional message. -- `data` - optional additional error data. - -```js -Boom.resourceGone('it is gone'); -``` - -Generates the following response payload: - -```json -{ - "statusCode": 410, - "error": "Gone", - "message": "it is gone" -} -``` - -### `Boom.lengthRequired([message], [data])` - -Returns a 411 Length Required error where: -- `message` - optional message. -- `data` - optional additional error data. - -```js -Boom.lengthRequired('length needed'); -``` - -Generates the following response payload: - -```json -{ - "statusCode": 411, - "error": "Length Required", - "message": "length needed" -} -``` - -### `Boom.preconditionFailed([message], [data])` - -Returns a 412 Precondition Failed error where: -- `message` - optional message. -- `data` - optional additional error data. - -```js -Boom.preconditionFailed(); -``` - -Generates the following response payload: - -```json -{ - "statusCode": 412, - "error": "Precondition Failed" -} -``` - -### `Boom.entityTooLarge([message], [data])` - -Returns a 413 Request Entity Too Large error where: -- `message` - optional message. -- `data` - optional additional error data. - -```js -Boom.entityTooLarge('too big'); -``` - -Generates the following response payload: - -```json -{ - "statusCode": 413, - "error": "Request Entity Too Large", - "message": "too big" -} -``` - -### `Boom.uriTooLong([message], [data])` - -Returns a 414 Request-URI Too Large error where: -- `message` - optional message. -- `data` - optional additional error data. - -```js -Boom.uriTooLong('uri is too long'); -``` - -Generates the following response payload: - -```json -{ - "statusCode": 414, - "error": "Request-URI Too Large", - "message": "uri is too long" -} -``` - -### `Boom.unsupportedMediaType([message], [data])` - -Returns a 415 Unsupported Media Type error where: -- `message` - optional message. -- `data` - optional additional error data. - -```js -Boom.unsupportedMediaType('that media is not supported'); -``` - -Generates the following response payload: - -```json -{ - "statusCode": 415, - "error": "Unsupported Media Type", - "message": "that media is not supported" -} -``` - -### `Boom.rangeNotSatisfiable([message], [data])` - -Returns a 416 Requested Range Not Satisfiable error where: -- `message` - optional message. -- `data` - optional additional error data. - -```js -Boom.rangeNotSatisfiable(); -``` - -Generates the following response payload: - -```json -{ - "statusCode": 416, - "error": "Requested Range Not Satisfiable" -} -``` - -### `Boom.expectationFailed([message], [data])` - -Returns a 417 Expectation Failed error where: -- `message` - optional message. -- `data` - optional additional error data. - -```js -Boom.expectationFailed('expected this to work'); -``` - -Generates the following response payload: - -```json -{ - "statusCode": 417, - "error": "Expectation Failed", - "message": "expected this to work" -} -``` - -### `Boom.badData([message], [data])` - -Returns a 422 Unprocessable Entity error where: -- `message` - optional message. -- `data` - optional additional error data. - -```js -Boom.badData('your data is bad and you should feel bad'); -``` - -Generates the following response payload: - -```json -{ - "statusCode": 422, - "error": "Unprocessable Entity", - "message": "your data is bad and you should feel bad" -} -``` - -### `Boom.preconditionRequired([message], [data])` - -Returns a 428 Precondition Required error where: -- `message` - optional message. -- `data` - optional additional error data. - -```js -Boom.preconditionRequired('you must supply an If-Match header'); -``` - -Generates the following response payload: - -```json -{ - "statusCode": 428, - "error": "Precondition Required", - "message": "you must supply an If-Match header" -} -``` - -### `Boom.tooManyRequests([message], [data])` - -Returns a 429 Too Many Requests error where: -- `message` - optional message. -- `data` - optional additional error data. - -```js -Boom.tooManyRequests('you have exceeded your request limit'); -``` - -Generates the following response payload: - -```json -{ - "statusCode": 429, - "error": "Too Many Requests", - "message": "you have exceeded your request limit" -} -``` - -## HTTP 5xx Errors - -All 500 errors hide your message from the end user. Your message is recorded in the server log. - -### `Boom.badImplementation([message], [data])` - -Returns a 500 Internal Server Error error where: -- `message` - optional message. -- `data` - optional additional error data. - -```js -Boom.badImplementation('terrible implementation'); -``` - -Generates the following response payload: - -```json -{ - "statusCode": 500, - "error": "Internal Server Error", - "message": "An internal server error occurred" -} -``` - -### `Boom.notImplemented([message], [data])` - -Returns a 501 Not Implemented error where: -- `message` - optional message. -- `data` - optional additional error data. - -```js -Boom.notImplemented('method not implemented'); -``` - -Generates the following response payload: - -```json -{ - "statusCode": 501, - "error": "Not Implemented", - "message": "method not implemented" -} -``` - -### `Boom.badGateway([message], [data])` - -Returns a 502 Bad Gateway error where: -- `message` - optional message. -- `data` - optional additional error data. - -```js -Boom.badGateway('that is a bad gateway'); -``` - -Generates the following response payload: - -```json -{ - "statusCode": 502, - "error": "Bad Gateway", - "message": "that is a bad gateway" -} -``` - -### `Boom.serverTimeout([message], [data])` - -Returns a 503 Service Unavailable error where: -- `message` - optional message. -- `data` - optional additional error data. - -```js -Boom.serverTimeout('unavailable'); -``` - -Generates the following response payload: - -```json -{ - "statusCode": 503, - "error": "Service Unavailable", - "message": "unavailable" -} -``` - -### `Boom.gatewayTimeout([message], [data])` - -Returns a 504 Gateway Time-out error where: -- `message` - optional message. -- `data` - optional additional error data. - -```js -Boom.gatewayTimeout(); -``` - -Generates the following response payload: - -```json -{ - "statusCode": 504, - "error": "Gateway Time-out" -} -``` - -## F.A.Q. - -###### How do I include extra information in my responses? `output.payload` is missing `data`, what gives? - -There is a reason the values passed back in the response payloads are pretty locked down. It's mostly for security and to not leak any important information back to the client. This means you will need to put in a little more effort to include extra information about your custom error. Check out the ["Error transformation"](https://github.com/hapijs/hapi/blob/master/API.md#error-transformation) section in the hapi documentation. diff --git a/node_modules/boom/images/boom.png b/node_modules/boom/images/boom.png deleted file mode 100755 index 373bc134..00000000 Binary files a/node_modules/boom/images/boom.png and /dev/null differ diff --git a/node_modules/boom/lib/index.js b/node_modules/boom/lib/index.js deleted file mode 100755 index 6bdea693..00000000 --- a/node_modules/boom/lib/index.js +++ /dev/null @@ -1,318 +0,0 @@ -// Load modules - -var Http = require('http'); -var Hoek = require('hoek'); - - -// Declare internals - -var internals = {}; - -exports.wrap = function (error, statusCode, message) { - - Hoek.assert(error instanceof Error, 'Cannot wrap non-Error object'); - return (error.isBoom ? error : internals.initialize(error, statusCode || 500, message)); -}; - - -exports.create = function (statusCode, message, data) { - - return internals.create(statusCode, message, data, exports.create); -}; - -internals.create = function (statusCode, message, data, ctor) { - - var error = new Error(message ? message : undefined); // Avoids settings null message - Error.captureStackTrace(error, ctor); // Filter the stack to our external API - error.data = data || null; - internals.initialize(error, statusCode); - return error; -}; - -internals.initialize = function (error, statusCode, message) { - - var numberCode = parseInt(statusCode, 10); - Hoek.assert(!isNaN(numberCode) && numberCode >= 400, 'First argument must be a number (400+):', statusCode); - - error.isBoom = true; - error.isServer = numberCode >= 500; - - if (!error.hasOwnProperty('data')) { - error.data = null; - } - - error.output = { - statusCode: numberCode, - payload: {}, - headers: {} - }; - - error.reformat = internals.reformat; - error.reformat(); - - if (!message && - !error.message) { - - message = error.output.payload.error; - } - - if (message) { - error.message = (message + (error.message ? ': ' + error.message : '')); - } - - return error; -}; - - -internals.reformat = function () { - - this.output.payload.statusCode = this.output.statusCode; - this.output.payload.error = Http.STATUS_CODES[this.output.statusCode] || 'Unknown'; - - if (this.output.statusCode === 500) { - this.output.payload.message = 'An internal server error occurred'; // Hide actual error from user - } - else if (this.message) { - this.output.payload.message = this.message; - } -}; - - -// 4xx Client Errors - -exports.badRequest = function (message, data) { - - return internals.create(400, message, data, exports.badRequest); -}; - - -exports.unauthorized = function (message, scheme, attributes) { // Or function (message, wwwAuthenticate[]) - - var err = internals.create(401, message, undefined, exports.unauthorized); - - if (!scheme) { - return err; - } - - var wwwAuthenticate = ''; - var i = 0; - var il = 0; - - if (typeof scheme === 'string') { - - // function (message, scheme, attributes) - - wwwAuthenticate = scheme; - - if (attributes || message) { - err.output.payload.attributes = {}; - } - - if (attributes) { - var names = Object.keys(attributes); - for (i = 0, il = names.length; i < il; ++i) { - var name = names[i]; - if (i) { - wwwAuthenticate += ','; - } - - var value = attributes[name]; - if (value === null || - value === undefined) { // Value can be zero - - value = ''; - } - wwwAuthenticate += ' ' + name + '="' + Hoek.escapeHeaderAttribute(value.toString()) + '"'; - err.output.payload.attributes[name] = value; - } - } - - if (message) { - if (attributes) { - wwwAuthenticate += ','; - } - wwwAuthenticate += ' error="' + Hoek.escapeHeaderAttribute(message) + '"'; - err.output.payload.attributes.error = message; - } - else { - err.isMissing = true; - } - } - else { - - // function (message, wwwAuthenticate[]) - - var wwwArray = scheme; - for (i = 0, il = wwwArray.length; i < il; ++i) { - if (i) { - wwwAuthenticate += ', '; - } - - wwwAuthenticate += wwwArray[i]; - } - } - - err.output.headers['WWW-Authenticate'] = wwwAuthenticate; - - return err; -}; - - -exports.forbidden = function (message, data) { - - return internals.create(403, message, data, exports.forbidden); -}; - - -exports.notFound = function (message, data) { - - return internals.create(404, message, data, exports.notFound); -}; - - -exports.methodNotAllowed = function (message, data) { - - return internals.create(405, message, data, exports.methodNotAllowed); -}; - - -exports.notAcceptable = function (message, data) { - - return internals.create(406, message, data, exports.notAcceptable); -}; - - -exports.proxyAuthRequired = function (message, data) { - - return internals.create(407, message, data, exports.proxyAuthRequired); -}; - - -exports.clientTimeout = function (message, data) { - - return internals.create(408, message, data, exports.clientTimeout); -}; - - -exports.conflict = function (message, data) { - - return internals.create(409, message, data, exports.conflict); -}; - - -exports.resourceGone = function (message, data) { - - return internals.create(410, message, data, exports.resourceGone); -}; - - -exports.lengthRequired = function (message, data) { - - return internals.create(411, message, data, exports.lengthRequired); -}; - - -exports.preconditionFailed = function (message, data) { - - return internals.create(412, message, data, exports.preconditionFailed); -}; - - -exports.entityTooLarge = function (message, data) { - - return internals.create(413, message, data, exports.entityTooLarge); -}; - - -exports.uriTooLong = function (message, data) { - - return internals.create(414, message, data, exports.uriTooLong); -}; - - -exports.unsupportedMediaType = function (message, data) { - - return internals.create(415, message, data, exports.unsupportedMediaType); -}; - - -exports.rangeNotSatisfiable = function (message, data) { - - return internals.create(416, message, data, exports.rangeNotSatisfiable); -}; - - -exports.expectationFailed = function (message, data) { - - return internals.create(417, message, data, exports.expectationFailed); -}; - -exports.badData = function (message, data) { - - return internals.create(422, message, data, exports.badData); -}; - - -exports.preconditionRequired = function (message, data) { - - return internals.create(428, message, data, exports.preconditionRequired); -}; - - -exports.tooManyRequests = function (message, data) { - - return internals.create(429, message, data, exports.tooManyRequests); -}; - - -// 5xx Server Errors - -exports.internal = function (message, data, statusCode) { - - return internals.serverError(message, data, statusCode, exports.internal); -}; - -internals.serverError = function (message, data, statusCode, ctor) { - - var error; - if (data instanceof Error) { - error = exports.wrap(data, statusCode, message); - } else { - error = internals.create(statusCode || 500, message, undefined, ctor); - error.data = data; - } - - return error; -}; - - -exports.notImplemented = function (message, data) { - - return internals.serverError(message, data, 501, exports.notImplemented); -}; - - -exports.badGateway = function (message, data) { - - return internals.serverError(message, data, 502, exports.badGateway); -}; - - -exports.serverTimeout = function (message, data) { - - return internals.serverError(message, data, 503, exports.serverTimeout); -}; - - -exports.gatewayTimeout = function (message, data) { - - return internals.serverError(message, data, 504, exports.gatewayTimeout); -}; - - -exports.badImplementation = function (message, data) { - - var err = internals.serverError(message, data, 500, exports.badImplementation); - err.isDeveloperError = true; - return err; -}; diff --git a/node_modules/boom/package.json b/node_modules/boom/package.json deleted file mode 100644 index 230b10ee..00000000 --- a/node_modules/boom/package.json +++ /dev/null @@ -1,99 +0,0 @@ -{ - "_args": [ - [ - { - "raw": "boom@2.x.x", - "scope": null, - "escapedName": "boom", - "name": "boom", - "rawSpec": "2.x.x", - "spec": ">=2.0.0 <3.0.0", - "type": "range" - }, - "/Users/benjaminarias/Desktop/poly/node_modules/hawk" - ] - ], - "_from": "boom@>=2.0.0 <3.0.0", - "_id": "boom@2.10.1", - "_inCache": true, - "_installable": true, - "_location": "/boom", - "_nodeVersion": "0.10.40", - "_npmUser": { - "name": "arb", - "email": "arbretz@gmail.com" - }, - "_npmVersion": "2.11.1", - "_phantomChildren": {}, - "_requested": { - "raw": "boom@2.x.x", - "scope": null, - "escapedName": "boom", - "name": "boom", - "rawSpec": "2.x.x", - "spec": ">=2.0.0 <3.0.0", - "type": "range" - }, - "_requiredBy": [ - "/cryptiles", - "/hawk" - ], - "_resolved": "https://registry.npmjs.org/boom/-/boom-2.10.1.tgz", - "_shasum": "39c8918ceff5799f83f9492a848f625add0c766f", - "_shrinkwrap": null, - "_spec": "boom@2.x.x", - "_where": "/Users/benjaminarias/Desktop/poly/node_modules/hawk", - "bugs": { - "url": "https://github.com/hapijs/boom/issues" - }, - "dependencies": { - "hoek": "2.x.x" - }, - "description": "HTTP-friendly error objects", - "devDependencies": { - "code": "1.x.x", - "lab": "7.x.x" - }, - "directories": {}, - "dist": { - "shasum": "39c8918ceff5799f83f9492a848f625add0c766f", - "tarball": "https://registry.npmjs.org/boom/-/boom-2.10.1.tgz" - }, - "engines": { - "node": ">=0.10.40" - }, - "gitHead": "ff1a662a86b39426cdd18f4441b112d307a34a6f", - "homepage": "https://github.com/hapijs/boom#readme", - "keywords": [ - "error", - "http" - ], - "license": "BSD-3-Clause", - "main": "lib/index.js", - "maintainers": [ - { - "name": "hueniverse", - "email": "eran@hueniverse.com" - }, - { - "name": "wyatt", - "email": "wpreul@gmail.com" - }, - { - "name": "arb", - "email": "arbretz@gmail.com" - } - ], - "name": "boom", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git://github.com/hapijs/boom.git" - }, - "scripts": { - "test": "lab -a code -t 100 -L", - "test-cov-html": "lab -a code -r html -o coverage.html -L" - }, - "version": "2.10.1" -} diff --git a/node_modules/boom/test/index.js b/node_modules/boom/test/index.js deleted file mode 100755 index 79a59e9f..00000000 --- a/node_modules/boom/test/index.js +++ /dev/null @@ -1,654 +0,0 @@ -// Load modules - -var Code = require('code'); -var Boom = require('../lib'); -var Lab = require('lab'); - - -// Declare internals - -var internals = {}; - - -// Test shortcuts - -var lab = exports.lab = Lab.script(); -var describe = lab.describe; -var it = lab.it; -var expect = Code.expect; - - -it('returns the same object when already boom', function (done) { - - var error = Boom.badRequest(); - var wrapped = Boom.wrap(error); - expect(error).to.equal(wrapped); - done(); -}); - -it('returns an error with info when constructed using another error', function (done) { - - var error = new Error('ka-boom'); - error.xyz = 123; - var err = Boom.wrap(error); - expect(err.xyz).to.equal(123); - expect(err.message).to.equal('ka-boom'); - expect(err.output).to.deep.equal({ - statusCode: 500, - payload: { - statusCode: 500, - error: 'Internal Server Error', - message: 'An internal server error occurred' - }, - headers: {} - }); - expect(err.data).to.equal(null); - done(); -}); - -it('does not override data when constructed using another error', function (done) { - - var error = new Error('ka-boom'); - error.data = { useful: 'data' }; - var err = Boom.wrap(error); - expect(err.data).to.equal(error.data); - done(); -}); - -it('sets new message when none exists', function (done) { - - var error = new Error(); - var wrapped = Boom.wrap(error, 400, 'something bad'); - expect(wrapped.message).to.equal('something bad'); - done(); -}); - -it('throws when statusCode is not a number', function (done) { - - expect(function () { - - Boom.create('x'); - }).to.throw('First argument must be a number (400+): x'); - done(); -}); - -it('will cast a number-string to an integer', function (done) { - - var codes = [ - { input: '404', result: 404 }, - { input: '404.1', result: 404 }, - { input: 400, result: 400 }, - { input: 400.123, result: 400 }]; - for (var i = 0, il = codes.length; i < il; ++i) { - var code = codes[i]; - var err = Boom.create(code.input); - expect(err.output.statusCode).to.equal(code.result); - } - - done(); -}); - -it('throws when statusCode is not finite', function (done) { - - expect(function () { - - Boom.create(1 / 0); - }).to.throw('First argument must be a number (400+): null'); - done(); -}); - -it('sets error code to unknown', function (done) { - - var err = Boom.create(999); - expect(err.output.payload.error).to.equal('Unknown'); - done(); -}); - -describe('create()', function () { - - it('does not sets null message', function (done) { - - var error = Boom.unauthorized(null); - expect(error.output.payload.message).to.not.exist(); - expect(error.isServer).to.be.false(); - done(); - }); - - it('sets message and data', function (done) { - - var error = Boom.badRequest('Missing data', { type: 'user' }); - expect(error.data.type).to.equal('user'); - expect(error.output.payload.message).to.equal('Missing data'); - done(); - }); -}); - -describe('isBoom()', function () { - - it('returns true for Boom object', function (done) { - - expect(Boom.badRequest().isBoom).to.equal(true); - done(); - }); - - it('returns false for Error object', function (done) { - - expect((new Error()).isBoom).to.not.exist(); - done(); - }); -}); - -describe('badRequest()', function () { - - it('returns a 400 error statusCode', function (done) { - - var error = Boom.badRequest(); - - expect(error.output.statusCode).to.equal(400); - expect(error.isServer).to.be.false(); - done(); - }); - - it('sets the message with the passed in message', function (done) { - - expect(Boom.badRequest('my message').message).to.equal('my message'); - done(); - }); - - it('sets the message to HTTP status if none provided', function (done) { - - expect(Boom.badRequest().message).to.equal('Bad Request'); - done(); - }); -}); - -describe('unauthorized()', function () { - - it('returns a 401 error statusCode', function (done) { - - var err = Boom.unauthorized(); - expect(err.output.statusCode).to.equal(401); - expect(err.output.headers).to.deep.equal({}); - done(); - }); - - it('sets the message with the passed in message', function (done) { - - expect(Boom.unauthorized('my message').message).to.equal('my message'); - done(); - }); - - it('returns a WWW-Authenticate header when passed a scheme', function (done) { - - var err = Boom.unauthorized('boom', 'Test'); - expect(err.output.statusCode).to.equal(401); - expect(err.output.headers['WWW-Authenticate']).to.equal('Test error="boom"'); - done(); - }); - - it('returns a WWW-Authenticate header set to the schema array value', function (done) { - - var err = Boom.unauthorized(null, ['Test','one','two']); - expect(err.output.statusCode).to.equal(401); - expect(err.output.headers['WWW-Authenticate']).to.equal('Test, one, two'); - done(); - }); - - it('returns a WWW-Authenticate header when passed a scheme and attributes', function (done) { - - var err = Boom.unauthorized('boom', 'Test', { a: 1, b: 'something', c: null, d: 0 }); - expect(err.output.statusCode).to.equal(401); - expect(err.output.headers['WWW-Authenticate']).to.equal('Test a="1", b="something", c="", d="0", error="boom"'); - expect(err.output.payload.attributes).to.deep.equal({ a: 1, b: 'something', c: '', d: 0, error: 'boom' }); - done(); - }); - - it('returns a WWW-Authenticate header when passed attributes, missing error', function (done) { - - var err = Boom.unauthorized(null, 'Test', { a: 1, b: 'something', c: null, d: 0 }); - expect(err.output.statusCode).to.equal(401); - expect(err.output.headers['WWW-Authenticate']).to.equal('Test a="1", b="something", c="", d="0"'); - expect(err.isMissing).to.equal(true); - done(); - }); - - it('sets the isMissing flag when error message is empty', function (done) { - - var err = Boom.unauthorized('', 'Basic'); - expect(err.isMissing).to.equal(true); - done(); - }); - - it('does not set the isMissing flag when error message is not empty', function (done) { - - var err = Boom.unauthorized('message', 'Basic'); - expect(err.isMissing).to.equal(undefined); - done(); - }); - - it('sets a WWW-Authenticate when passed as an array', function (done) { - - var err = Boom.unauthorized('message', ['Basic', 'Example e="1"', 'Another x="3", y="4"']); - expect(err.output.headers['WWW-Authenticate']).to.equal('Basic, Example e="1", Another x="3", y="4"'); - done(); - }); -}); - - -describe('methodNotAllowed()', function () { - - it('returns a 405 error statusCode', function (done) { - - expect(Boom.methodNotAllowed().output.statusCode).to.equal(405); - done(); - }); - - it('sets the message with the passed in message', function (done) { - - expect(Boom.methodNotAllowed('my message').message).to.equal('my message'); - done(); - }); -}); - - -describe('notAcceptable()', function () { - - it('returns a 406 error statusCode', function (done) { - - expect(Boom.notAcceptable().output.statusCode).to.equal(406); - done(); - }); - - it('sets the message with the passed in message', function (done) { - - expect(Boom.notAcceptable('my message').message).to.equal('my message'); - done(); - }); -}); - - -describe('proxyAuthRequired()', function () { - - it('returns a 407 error statusCode', function (done) { - - expect(Boom.proxyAuthRequired().output.statusCode).to.equal(407); - done(); - }); - - it('sets the message with the passed in message', function (done) { - - expect(Boom.proxyAuthRequired('my message').message).to.equal('my message'); - done(); - }); -}); - - -describe('clientTimeout()', function () { - - it('returns a 408 error statusCode', function (done) { - - expect(Boom.clientTimeout().output.statusCode).to.equal(408); - done(); - }); - - it('sets the message with the passed in message', function (done) { - - expect(Boom.clientTimeout('my message').message).to.equal('my message'); - done(); - }); -}); - - -describe('conflict()', function () { - - it('returns a 409 error statusCode', function (done) { - - expect(Boom.conflict().output.statusCode).to.equal(409); - done(); - }); - - it('sets the message with the passed in message', function (done) { - - expect(Boom.conflict('my message').message).to.equal('my message'); - done(); - }); -}); - - -describe('resourceGone()', function () { - - it('returns a 410 error statusCode', function (done) { - - expect(Boom.resourceGone().output.statusCode).to.equal(410); - done(); - }); - - it('sets the message with the passed in message', function (done) { - - expect(Boom.resourceGone('my message').message).to.equal('my message'); - done(); - }); -}); - - -describe('lengthRequired()', function () { - - it('returns a 411 error statusCode', function (done) { - - expect(Boom.lengthRequired().output.statusCode).to.equal(411); - done(); - }); - - it('sets the message with the passed in message', function (done) { - - expect(Boom.lengthRequired('my message').message).to.equal('my message'); - done(); - }); -}); - - -describe('preconditionFailed()', function () { - - it('returns a 412 error statusCode', function (done) { - - expect(Boom.preconditionFailed().output.statusCode).to.equal(412); - done(); - }); - - it('sets the message with the passed in message', function (done) { - - expect(Boom.preconditionFailed('my message').message).to.equal('my message'); - done(); - }); -}); - - -describe('entityTooLarge()', function () { - - it('returns a 413 error statusCode', function (done) { - - expect(Boom.entityTooLarge().output.statusCode).to.equal(413); - done(); - }); - - it('sets the message with the passed in message', function (done) { - - expect(Boom.entityTooLarge('my message').message).to.equal('my message'); - done(); - }); -}); - - -describe('uriTooLong()', function () { - - it('returns a 414 error statusCode', function (done) { - - expect(Boom.uriTooLong().output.statusCode).to.equal(414); - done(); - }); - - it('sets the message with the passed in message', function (done) { - - expect(Boom.uriTooLong('my message').message).to.equal('my message'); - done(); - }); -}); - - -describe('unsupportedMediaType()', function () { - - it('returns a 415 error statusCode', function (done) { - - expect(Boom.unsupportedMediaType().output.statusCode).to.equal(415); - done(); - }); - - it('sets the message with the passed in message', function (done) { - - expect(Boom.unsupportedMediaType('my message').message).to.equal('my message'); - done(); - }); -}); - - -describe('rangeNotSatisfiable()', function () { - - it('returns a 416 error statusCode', function (done) { - - expect(Boom.rangeNotSatisfiable().output.statusCode).to.equal(416); - done(); - }); - - it('sets the message with the passed in message', function (done) { - - expect(Boom.rangeNotSatisfiable('my message').message).to.equal('my message'); - done(); - }); -}); - - -describe('expectationFailed()', function () { - - it('returns a 417 error statusCode', function (done) { - - expect(Boom.expectationFailed().output.statusCode).to.equal(417); - done(); - }); - - it('sets the message with the passed in message', function (done) { - - expect(Boom.expectationFailed('my message').message).to.equal('my message'); - done(); - }); -}); - - -describe('badData()', function () { - - it('returns a 422 error statusCode', function (done) { - - expect(Boom.badData().output.statusCode).to.equal(422); - done(); - }); - - it('sets the message with the passed in message', function (done) { - - expect(Boom.badData('my message').message).to.equal('my message'); - done(); - }); -}); - - -describe('preconditionRequired()', function () { - - it('returns a 428 error statusCode', function (done) { - - expect(Boom.preconditionRequired().output.statusCode).to.equal(428); - done(); - }); - - it('sets the message with the passed in message', function (done) { - - expect(Boom.preconditionRequired('my message').message).to.equal('my message'); - done(); - }); -}); - - -describe('tooManyRequests()', function () { - - it('returns a 429 error statusCode', function (done) { - - expect(Boom.tooManyRequests().output.statusCode).to.equal(429); - done(); - }); - - it('sets the message with the passed-in message', function (done) { - - expect(Boom.tooManyRequests('my message').message).to.equal('my message'); - done(); - }); -}); - -describe('serverTimeout()', function () { - - it('returns a 503 error statusCode', function (done) { - - expect(Boom.serverTimeout().output.statusCode).to.equal(503); - done(); - }); - - it('sets the message with the passed in message', function (done) { - - expect(Boom.serverTimeout('my message').message).to.equal('my message'); - done(); - }); -}); - -describe('forbidden()', function () { - - it('returns a 403 error statusCode', function (done) { - - expect(Boom.forbidden().output.statusCode).to.equal(403); - done(); - }); - - it('sets the message with the passed in message', function (done) { - - expect(Boom.forbidden('my message').message).to.equal('my message'); - done(); - }); -}); - -describe('notFound()', function () { - - it('returns a 404 error statusCode', function (done) { - - expect(Boom.notFound().output.statusCode).to.equal(404); - done(); - }); - - it('sets the message with the passed in message', function (done) { - - expect(Boom.notFound('my message').message).to.equal('my message'); - done(); - }); -}); - -describe('internal()', function () { - - it('returns a 500 error statusCode', function (done) { - - expect(Boom.internal().output.statusCode).to.equal(500); - done(); - }); - - it('sets the message with the passed in message', function (done) { - - var err = Boom.internal('my message'); - expect(err.message).to.equal('my message'); - expect(err.isServer).to.true(); - expect(err.output.payload.message).to.equal('An internal server error occurred'); - done(); - }); - - it('passes data on the callback if its passed in', function (done) { - - expect(Boom.internal('my message', { my: 'data' }).data.my).to.equal('data'); - done(); - }); - - it('returns an error with composite message', function (done) { - - try { - JSON.parse('{'); - } - catch (err) { - var boom = Boom.internal('Someting bad', err); - expect(boom.message).to.equal('Someting bad: Unexpected end of input'); - expect(boom.isServer).to.be.true(); - done(); - } - }); -}); - -describe('notImplemented()', function () { - - it('returns a 501 error statusCode', function (done) { - - expect(Boom.notImplemented().output.statusCode).to.equal(501); - done(); - }); - - it('sets the message with the passed in message', function (done) { - - expect(Boom.notImplemented('my message').message).to.equal('my message'); - done(); - }); -}); - - -describe('badGateway()', function () { - - it('returns a 502 error statusCode', function (done) { - - expect(Boom.badGateway().output.statusCode).to.equal(502); - done(); - }); - - it('sets the message with the passed in message', function (done) { - - expect(Boom.badGateway('my message').message).to.equal('my message'); - done(); - }); -}); - -describe('gatewayTimeout()', function () { - - it('returns a 504 error statusCode', function (done) { - - expect(Boom.gatewayTimeout().output.statusCode).to.equal(504); - done(); - }); - - it('sets the message with the passed in message', function (done) { - - expect(Boom.gatewayTimeout('my message').message).to.equal('my message'); - done(); - }); -}); - -describe('badImplementation()', function () { - - it('returns a 500 error statusCode', function (done) { - - var err = Boom.badImplementation(); - expect(err.output.statusCode).to.equal(500); - expect(err.isDeveloperError).to.equal(true); - expect(err.isServer).to.be.true(); - done(); - }); -}); - -describe('stack trace', function () { - - it('should omit lib', function (done) { - - ['badRequest', 'unauthorized', 'forbidden', 'notFound', 'methodNotAllowed', - 'notAcceptable', 'proxyAuthRequired', 'clientTimeout', 'conflict', - 'resourceGone', 'lengthRequired', 'preconditionFailed', 'entityTooLarge', - 'uriTooLong', 'unsupportedMediaType', 'rangeNotSatisfiable', 'expectationFailed', - 'badData', 'preconditionRequired', 'tooManyRequests', - - // 500s - 'internal', 'notImplemented', 'badGateway', 'serverTimeout', 'gatewayTimeout', - 'badImplementation' - ].forEach(function (name) { - - var err = Boom[name](); - expect(err.stack).to.not.match(/\/lib\/index\.js/); - }); - - done(); - }); -}); diff --git a/node_modules/brace-expansion/README.md b/node_modules/brace-expansion/README.md deleted file mode 100644 index 17939297..00000000 --- a/node_modules/brace-expansion/README.md +++ /dev/null @@ -1,122 +0,0 @@ -# brace-expansion - -[Brace expansion](https://www.gnu.org/software/bash/manual/html_node/Brace-Expansion.html), -as known from sh/bash, in JavaScript. - -[![build status](https://secure.travis-ci.org/juliangruber/brace-expansion.svg)](http://travis-ci.org/juliangruber/brace-expansion) -[![downloads](https://img.shields.io/npm/dm/brace-expansion.svg)](https://www.npmjs.org/package/brace-expansion) - -[![testling badge](https://ci.testling.com/juliangruber/brace-expansion.png)](https://ci.testling.com/juliangruber/brace-expansion) - -## Example - -```js -var expand = require('brace-expansion'); - -expand('file-{a,b,c}.jpg') -// => ['file-a.jpg', 'file-b.jpg', 'file-c.jpg'] - -expand('-v{,,}') -// => ['-v', '-v', '-v'] - -expand('file{0..2}.jpg') -// => ['file0.jpg', 'file1.jpg', 'file2.jpg'] - -expand('file-{a..c}.jpg') -// => ['file-a.jpg', 'file-b.jpg', 'file-c.jpg'] - -expand('file{2..0}.jpg') -// => ['file2.jpg', 'file1.jpg', 'file0.jpg'] - -expand('file{0..4..2}.jpg') -// => ['file0.jpg', 'file2.jpg', 'file4.jpg'] - -expand('file-{a..e..2}.jpg') -// => ['file-a.jpg', 'file-c.jpg', 'file-e.jpg'] - -expand('file{00..10..5}.jpg') -// => ['file00.jpg', 'file05.jpg', 'file10.jpg'] - -expand('{{A..C},{a..c}}') -// => ['A', 'B', 'C', 'a', 'b', 'c'] - -expand('ppp{,config,oe{,conf}}') -// => ['ppp', 'pppconfig', 'pppoe', 'pppoeconf'] -``` - -## API - -```js -var expand = require('brace-expansion'); -``` - -### var expanded = expand(str) - -Return an array of all possible and valid expansions of `str`. If none are -found, `[str]` is returned. - -Valid expansions are: - -```js -/^(.*,)+(.+)?$/ -// {a,b,...} -``` - -A comma seperated list of options, like `{a,b}` or `{a,{b,c}}` or `{,a,}`. - -```js -/^-?\d+\.\.-?\d+(\.\.-?\d+)?$/ -// {x..y[..incr]} -``` - -A numeric sequence from `x` to `y` inclusive, with optional increment. -If `x` or `y` start with a leading `0`, all the numbers will be padded -to have equal length. Negative numbers and backwards iteration work too. - -```js -/^-?\d+\.\.-?\d+(\.\.-?\d+)?$/ -// {x..y[..incr]} -``` - -An alphabetic sequence from `x` to `y` inclusive, with optional increment. -`x` and `y` must be exactly one character, and if given, `incr` must be a -number. - -For compatibility reasons, the string `${` is not eligible for brace expansion. - -## Installation - -With [npm](https://npmjs.org) do: - -```bash -npm install brace-expansion -``` - -## Contributors - -- [Julian Gruber](https://github.com/juliangruber) -- [Isaac Z. Schlueter](https://github.com/isaacs) - -## License - -(MIT) - -Copyright (c) 2013 Julian Gruber <julian@juliangruber.com> - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies -of the Software, and to permit persons to whom the Software is furnished to do -so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/node_modules/brace-expansion/index.js b/node_modules/brace-expansion/index.js deleted file mode 100644 index 955f27c8..00000000 --- a/node_modules/brace-expansion/index.js +++ /dev/null @@ -1,201 +0,0 @@ -var concatMap = require('concat-map'); -var balanced = require('balanced-match'); - -module.exports = expandTop; - -var escSlash = '\0SLASH'+Math.random()+'\0'; -var escOpen = '\0OPEN'+Math.random()+'\0'; -var escClose = '\0CLOSE'+Math.random()+'\0'; -var escComma = '\0COMMA'+Math.random()+'\0'; -var escPeriod = '\0PERIOD'+Math.random()+'\0'; - -function numeric(str) { - return parseInt(str, 10) == str - ? parseInt(str, 10) - : str.charCodeAt(0); -} - -function escapeBraces(str) { - return str.split('\\\\').join(escSlash) - .split('\\{').join(escOpen) - .split('\\}').join(escClose) - .split('\\,').join(escComma) - .split('\\.').join(escPeriod); -} - -function unescapeBraces(str) { - return str.split(escSlash).join('\\') - .split(escOpen).join('{') - .split(escClose).join('}') - .split(escComma).join(',') - .split(escPeriod).join('.'); -} - - -// Basically just str.split(","), but handling cases -// where we have nested braced sections, which should be -// treated as individual members, like {a,{b,c},d} -function parseCommaParts(str) { - if (!str) - return ['']; - - var parts = []; - var m = balanced('{', '}', str); - - if (!m) - return str.split(','); - - var pre = m.pre; - var body = m.body; - var post = m.post; - var p = pre.split(','); - - p[p.length-1] += '{' + body + '}'; - var postParts = parseCommaParts(post); - if (post.length) { - p[p.length-1] += postParts.shift(); - p.push.apply(p, postParts); - } - - parts.push.apply(parts, p); - - return parts; -} - -function expandTop(str) { - if (!str) - return []; - - // I don't know why Bash 4.3 does this, but it does. - // Anything starting with {} will have the first two bytes preserved - // but *only* at the top level, so {},a}b will not expand to anything, - // but a{},b}c will be expanded to [a}c,abc]. - // One could argue that this is a bug in Bash, but since the goal of - // this module is to match Bash's rules, we escape a leading {} - if (str.substr(0, 2) === '{}') { - str = '\\{\\}' + str.substr(2); - } - - return expand(escapeBraces(str), true).map(unescapeBraces); -} - -function identity(e) { - return e; -} - -function embrace(str) { - return '{' + str + '}'; -} -function isPadded(el) { - return /^-?0\d/.test(el); -} - -function lte(i, y) { - return i <= y; -} -function gte(i, y) { - return i >= y; -} - -function expand(str, isTop) { - var expansions = []; - - var m = balanced('{', '}', str); - if (!m || /\$$/.test(m.pre)) return [str]; - - var isNumericSequence = /^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(m.body); - var isAlphaSequence = /^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(m.body); - var isSequence = isNumericSequence || isAlphaSequence; - var isOptions = /^(.*,)+(.+)?$/.test(m.body); - if (!isSequence && !isOptions) { - // {a},b} - if (m.post.match(/,.*\}/)) { - str = m.pre + '{' + m.body + escClose + m.post; - return expand(str); - } - return [str]; - } - - var n; - if (isSequence) { - n = m.body.split(/\.\./); - } else { - n = parseCommaParts(m.body); - if (n.length === 1) { - // x{{a,b}}y ==> x{a}y x{b}y - n = expand(n[0], false).map(embrace); - if (n.length === 1) { - var post = m.post.length - ? expand(m.post, false) - : ['']; - return post.map(function(p) { - return m.pre + n[0] + p; - }); - } - } - } - - // at this point, n is the parts, and we know it's not a comma set - // with a single entry. - - // no need to expand pre, since it is guaranteed to be free of brace-sets - var pre = m.pre; - var post = m.post.length - ? expand(m.post, false) - : ['']; - - var N; - - if (isSequence) { - var x = numeric(n[0]); - var y = numeric(n[1]); - var width = Math.max(n[0].length, n[1].length) - var incr = n.length == 3 - ? Math.abs(numeric(n[2])) - : 1; - var test = lte; - var reverse = y < x; - if (reverse) { - incr *= -1; - test = gte; - } - var pad = n.some(isPadded); - - N = []; - - for (var i = x; test(i, y); i += incr) { - var c; - if (isAlphaSequence) { - c = String.fromCharCode(i); - if (c === '\\') - c = ''; - } else { - c = String(i); - if (pad) { - var need = width - c.length; - if (need > 0) { - var z = new Array(need + 1).join('0'); - if (i < 0) - c = '-' + z + c.slice(1); - else - c = z + c; - } - } - } - N.push(c); - } - } else { - N = concatMap(n, function(el) { return expand(el, false) }); - } - - for (var j = 0; j < N.length; j++) { - for (var k = 0; k < post.length; k++) { - var expansion = pre + N[j] + post[k]; - if (!isTop || isSequence || expansion) - expansions.push(expansion); - } - } - - return expansions; -} - diff --git a/node_modules/brace-expansion/package.json b/node_modules/brace-expansion/package.json deleted file mode 100644 index 73d076a2..00000000 --- a/node_modules/brace-expansion/package.json +++ /dev/null @@ -1,113 +0,0 @@ -{ - "_args": [ - [ - { - "raw": "brace-expansion@^1.0.0", - "scope": null, - "escapedName": "brace-expansion", - "name": "brace-expansion", - "rawSpec": "^1.0.0", - "spec": ">=1.0.0 <2.0.0", - "type": "range" - }, - "/Users/benjaminarias/Desktop/poly/node_modules/minimatch" - ] - ], - "_from": "brace-expansion@>=1.0.0 <2.0.0", - "_id": "brace-expansion@1.1.6", - "_inCache": true, - "_installable": true, - "_location": "/brace-expansion", - "_nodeVersion": "4.4.7", - "_npmOperationalInternal": { - "host": "packages-16-east.internal.npmjs.com", - "tmp": "tmp/brace-expansion-1.1.6.tgz_1469047715600_0.9362958471756428" - }, - "_npmUser": { - "name": "juliangruber", - "email": "julian@juliangruber.com" - }, - "_npmVersion": "2.15.8", - "_phantomChildren": {}, - "_requested": { - "raw": "brace-expansion@^1.0.0", - "scope": null, - "escapedName": "brace-expansion", - "name": "brace-expansion", - "rawSpec": "^1.0.0", - "spec": ">=1.0.0 <2.0.0", - "type": "range" - }, - "_requiredBy": [ - "/minimatch" - ], - "_resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.6.tgz", - "_shasum": "7197d7eaa9b87e648390ea61fc66c84427420df9", - "_shrinkwrap": null, - "_spec": "brace-expansion@^1.0.0", - "_where": "/Users/benjaminarias/Desktop/poly/node_modules/minimatch", - "author": { - "name": "Julian Gruber", - "email": "mail@juliangruber.com", - "url": "http://juliangruber.com" - }, - "bugs": { - "url": "https://github.com/juliangruber/brace-expansion/issues" - }, - "dependencies": { - "balanced-match": "^0.4.1", - "concat-map": "0.0.1" - }, - "description": "Brace expansion as known from sh/bash", - "devDependencies": { - "tape": "^4.6.0" - }, - "directories": {}, - "dist": { - "shasum": "7197d7eaa9b87e648390ea61fc66c84427420df9", - "tarball": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.6.tgz" - }, - "gitHead": "791262fa06625e9c5594cde529a21d82086af5f2", - "homepage": "https://github.com/juliangruber/brace-expansion", - "keywords": [], - "license": "MIT", - "main": "index.js", - "maintainers": [ - { - "name": "juliangruber", - "email": "julian@juliangruber.com" - }, - { - "name": "isaacs", - "email": "isaacs@npmjs.com" - } - ], - "name": "brace-expansion", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git://github.com/juliangruber/brace-expansion.git" - }, - "scripts": { - "gentest": "bash test/generate.sh", - "test": "tape test/*.js" - }, - "testling": { - "files": "test/*.js", - "browsers": [ - "ie/8..latest", - "firefox/20..latest", - "firefox/nightly", - "chrome/25..latest", - "chrome/canary", - "opera/12..latest", - "opera/next", - "safari/5.1..latest", - "ipad/6.0..latest", - "iphone/6.0..latest", - "android-browser/4.2..latest" - ] - }, - "version": "1.1.6" -} diff --git a/node_modules/brorand/.npmignore b/node_modules/brorand/.npmignore deleted file mode 100644 index 1ca95717..00000000 --- a/node_modules/brorand/.npmignore +++ /dev/null @@ -1,2 +0,0 @@ -node_modules/ -npm-debug.log diff --git a/node_modules/brorand/README.md b/node_modules/brorand/README.md deleted file mode 100644 index f80437d1..00000000 --- a/node_modules/brorand/README.md +++ /dev/null @@ -1,26 +0,0 @@ -# Brorand - -#### LICENSE - -This software is licensed under the MIT License. - -Copyright Fedor Indutny, 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/node_modules/brorand/index.js b/node_modules/brorand/index.js deleted file mode 100644 index 17f08555..00000000 --- a/node_modules/brorand/index.js +++ /dev/null @@ -1,57 +0,0 @@ -var r; - -module.exports = function rand(len) { - if (!r) - r = new Rand(null); - - return r.generate(len); -}; - -function Rand(rand) { - this.rand = rand; -} -module.exports.Rand = Rand; - -Rand.prototype.generate = function generate(len) { - return this._rand(len); -}; - -if (typeof window === 'object') { - if (window.crypto && window.crypto.getRandomValues) { - // Modern browsers - Rand.prototype._rand = function _rand(n) { - var arr = new Uint8Array(n); - window.crypto.getRandomValues(arr); - return arr; - }; - } else if (window.msCrypto && window.msCrypto.getRandomValues) { - // IE - Rand.prototype._rand = function _rand(n) { - var arr = new Uint8Array(n); - window.msCrypto.getRandomValues(arr); - return arr; - }; - } else { - // Old junk - Rand.prototype._rand = function() { - throw new Error('Not implemented yet'); - }; - } -} else { - // Node.js or Web worker - try { - var crypto = require('crypto'); - - Rand.prototype._rand = function _rand(n) { - return crypto.randomBytes(n); - }; - } catch (e) { - // Emulate crypto API using randy - Rand.prototype._rand = function _rand(n) { - var res = new Uint8Array(n); - for (var i = 0; i < res.length; i++) - res[i] = this.rand.getByte(); - return res; - }; - } -} diff --git a/node_modules/brorand/package.json b/node_modules/brorand/package.json deleted file mode 100644 index 20b7e8b8..00000000 --- a/node_modules/brorand/package.json +++ /dev/null @@ -1,97 +0,0 @@ -{ - "_args": [ - [ - { - "raw": "brorand@^1.0.1", - "scope": null, - "escapedName": "brorand", - "name": "brorand", - "rawSpec": "^1.0.1", - "spec": ">=1.0.1 <2.0.0", - "type": "range" - }, - "/Users/benjaminarias/Desktop/poly/node_modules/elliptic" - ] - ], - "_from": "brorand@>=1.0.1 <2.0.0", - "_id": "brorand@1.0.6", - "_inCache": true, - "_installable": true, - "_location": "/brorand", - "_nodeVersion": "6.3.0", - "_npmOperationalInternal": { - "host": "packages-12-west.internal.npmjs.com", - "tmp": "tmp/brorand-1.0.6.tgz_1473323651066_0.41867022518999875" - }, - "_npmUser": { - "name": "indutny", - "email": "fedor@indutny.com" - }, - "_npmVersion": "3.10.3", - "_phantomChildren": {}, - "_requested": { - "raw": "brorand@^1.0.1", - "scope": null, - "escapedName": "brorand", - "name": "brorand", - "rawSpec": "^1.0.1", - "spec": ">=1.0.1 <2.0.0", - "type": "range" - }, - "_requiredBy": [ - "/elliptic", - "/miller-rabin" - ], - "_resolved": "https://registry.npmjs.org/brorand/-/brorand-1.0.6.tgz", - "_shasum": "4028706b915f91f7b349a2e0bf3c376039d216e5", - "_shrinkwrap": null, - "_spec": "brorand@^1.0.1", - "_where": "/Users/benjaminarias/Desktop/poly/node_modules/elliptic", - "author": { - "name": "Fedor Indutny", - "email": "fedor@indutny.com" - }, - "browser": { - "crypto": false - }, - "bugs": { - "url": "https://github.com/indutny/brorand/issues" - }, - "dependencies": {}, - "description": "Random number generator for browsers and node.js", - "devDependencies": { - "mocha": "^2.0.1" - }, - "directories": {}, - "dist": { - "shasum": "4028706b915f91f7b349a2e0bf3c376039d216e5", - "tarball": "https://registry.npmjs.org/brorand/-/brorand-1.0.6.tgz" - }, - "gitHead": "f077f0a95c627f2707d7b7699ccddca308a58d15", - "homepage": "https://github.com/indutny/brorand", - "keywords": [ - "Random", - "RNG", - "browser", - "crypto" - ], - "license": "MIT", - "main": "index.js", - "maintainers": [ - { - "name": "indutny", - "email": "fedor@indutny.com" - } - ], - "name": "brorand", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git+ssh://git@github.com/indutny/brorand.git" - }, - "scripts": { - "test": "mocha --reporter=spec test/**/*-test.js" - }, - "version": "1.0.6" -} diff --git a/node_modules/brorand/test/api-test.js b/node_modules/brorand/test/api-test.js deleted file mode 100644 index b6c876d3..00000000 --- a/node_modules/brorand/test/api-test.js +++ /dev/null @@ -1,8 +0,0 @@ -var brorand = require('../'); -var assert = require('assert'); - -describe('Brorand', function() { - it('should generate random numbers', function() { - assert.equal(brorand(100).length, 100); - }); -}); diff --git a/node_modules/browser-pack/.npmignore b/node_modules/browser-pack/.npmignore deleted file mode 100644 index 3c3629e6..00000000 --- a/node_modules/browser-pack/.npmignore +++ /dev/null @@ -1 +0,0 @@ -node_modules diff --git a/node_modules/browser-pack/.travis.yml b/node_modules/browser-pack/.travis.yml deleted file mode 100644 index bc21ef61..00000000 --- a/node_modules/browser-pack/.travis.yml +++ /dev/null @@ -1,8 +0,0 @@ -language: node_js -node_js: - - "0.8" - - "0.10" - - "0.12" - - "iojs" -before_install: - - npm install -g npm@~1.4.6 \ No newline at end of file diff --git a/node_modules/browser-pack/LICENSE b/node_modules/browser-pack/LICENSE deleted file mode 100644 index ee27ba4b..00000000 --- a/node_modules/browser-pack/LICENSE +++ /dev/null @@ -1,18 +0,0 @@ -This software is released under the MIT license: - -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/node_modules/browser-pack/_prelude.js b/node_modules/browser-pack/_prelude.js deleted file mode 100644 index 4ab156fe..00000000 --- a/node_modules/browser-pack/_prelude.js +++ /dev/null @@ -1 +0,0 @@ -(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o=5.0.0 <6.0.0", - "type": "range" - }, - "/Users/benjaminarias/Desktop/poly/node_modules/browserify" - ] - ], - "_from": "browser-pack@>=5.0.0 <6.0.0", - "_id": "browser-pack@5.0.1", - "_inCache": true, - "_installable": true, - "_location": "/browser-pack", - "_nodeVersion": "0.10.38", - "_npmUser": { - "name": "zertosh", - "email": "zertosh@gmail.com" - }, - "_npmVersion": "2.10.1", - "_phantomChildren": {}, - "_requested": { - "raw": "browser-pack@^5.0.0", - "scope": null, - "escapedName": "browser-pack", - "name": "browser-pack", - "rawSpec": "^5.0.0", - "spec": ">=5.0.0 <6.0.0", - "type": "range" - }, - "_requiredBy": [ - "/browserify" - ], - "_resolved": "https://registry.npmjs.org/browser-pack/-/browser-pack-5.0.1.tgz", - "_shasum": "4197719b20c6e0aaa09451c5111e53efb6fbc18d", - "_shrinkwrap": null, - "_spec": "browser-pack@^5.0.0", - "_where": "/Users/benjaminarias/Desktop/poly/node_modules/browserify", - "author": { - "name": "James Halliday", - "email": "mail@substack.net", - "url": "http://substack.net" - }, - "bin": { - "browser-pack": "bin/cmd.js" - }, - "bugs": { - "url": "https://github.com/substack/browser-pack/issues" - }, - "dependencies": { - "JSONStream": "^1.0.3", - "combine-source-map": "~0.6.1", - "defined": "^1.0.0", - "through2": "^1.0.0", - "umd": "^3.0.0" - }, - "description": "pack node-style source files from a json stream into a browser bundle", - "devDependencies": { - "concat-stream": "~1.4.1", - "convert-source-map": "~1.1.0", - "parse-base64vlq-mappings": "~0.1.1", - "tap": "^1.1.0", - "uglify-js": "1.3.5" - }, - "directories": {}, - "dist": { - "shasum": "4197719b20c6e0aaa09451c5111e53efb6fbc18d", - "tarball": "https://registry.npmjs.org/browser-pack/-/browser-pack-5.0.1.tgz" - }, - "gitHead": "aadeabea66feac48193d27d233daf1c85209357e", - "homepage": "https://github.com/substack/browser-pack", - "keywords": [ - "browser", - "bundle", - "commonjs", - "commonj-esque", - "exports", - "module.exports", - "require" - ], - "license": "MIT", - "main": "index.js", - "maintainers": [ - { - "name": "substack", - "email": "substack@gmail.com" - }, - { - "name": "forbeslindesay", - "email": "forbes@lindesay.co.uk" - }, - { - "name": "zertosh", - "email": "zertosh@gmail.com" - } - ], - "name": "browser-pack", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git://github.com/substack/browser-pack.git" - }, - "scripts": { - "prepublish": "node bin/prepublish.js", - "test": "tap test/*.js" - }, - "testling": { - "files": "test/*.js", - "browsers": [ - "ie/8", - "ie/9", - "ie/10", - "chrome/15", - "chrome/latest", - "firefox/10", - "firefox/latest", - "safari/latest", - "opera/latest" - ] - }, - "version": "5.0.1" -} diff --git a/node_modules/browser-pack/prelude.js b/node_modules/browser-pack/prelude.js deleted file mode 100644 index d291c694..00000000 --- a/node_modules/browser-pack/prelude.js +++ /dev/null @@ -1,44 +0,0 @@ - -// modules are defined as an array -// [ module function, map of requireuires ] -// -// map of requireuires is short require name -> numeric require -// -// anything defined in a previous bundle is accessed via the -// orig method which is the requireuire for previous bundles - -(function outer (modules, cache, entry) { - // Save the require from previous bundle to this closure if any - var previousRequire = typeof require == "function" && require; - - function newRequire(name, jumped){ - if(!cache[name]) { - if(!modules[name]) { - // if we cannot find the module within our internal map or - // cache jump to the current global require ie. the last bundle - // that was added to the page. - var currentRequire = typeof require == "function" && require; - if (!jumped && currentRequire) return currentRequire(name, true); - - // If there are other bundles on this page the require from the - // previous one is saved to 'previousRequire'. Repeat this as - // many times as there are bundles until the module is found or - // we exhaust the require chain. - if (previousRequire) return previousRequire(name, true); - var err = new Error('Cannot find module \'' + name + '\''); - err.code = 'MODULE_NOT_FOUND'; - throw err; - } - var m = cache[name] = {exports:{}}; - modules[name][0].call(m.exports, function(x){ - var id = modules[name][1][x]; - return newRequire(id ? id : x); - },m,m.exports,outer,modules,cache,entry); - } - return cache[name].exports; - } - for(var i=0;i - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/node_modules/browser-resolve/empty.js b/node_modules/browser-resolve/empty.js deleted file mode 100644 index e69de29b..00000000 diff --git a/node_modules/browser-resolve/index.js b/node_modules/browser-resolve/index.js deleted file mode 100644 index 97d89357..00000000 --- a/node_modules/browser-resolve/index.js +++ /dev/null @@ -1,343 +0,0 @@ -// builtin -var fs = require('fs'); -var path = require('path'); - -// vendor -var resv = require('resolve'); - -// given a path, create an array of node_module paths for it -// borrowed from substack/resolve -function nodeModulesPaths (start, cb) { - var splitRe = process.platform === 'win32' ? /[\/\\]/ : /\/+/; - var parts = start.split(splitRe); - - var dirs = []; - for (var i = parts.length - 1; i >= 0; i--) { - if (parts[i] === 'node_modules') continue; - var dir = path.join.apply( - path, parts.slice(0, i + 1).concat(['node_modules']) - ); - if (!parts[0].match(/([A-Za-z]:)/)) { - dir = '/' + dir; - } - dirs.push(dir); - } - return dirs; -} - -function find_shims_in_package(pkgJson, cur_path, shims, browser) { - try { - var info = JSON.parse(pkgJson); - } - catch (err) { - err.message = pkgJson + ' : ' + err.message - throw err; - } - - var replacements = getReplacements(info, browser); - - // no replacements, skip shims - if (!replacements) { - return; - } - - // if browser mapping is a string - // then it just replaces the main entry point - if (typeof replacements === 'string') { - var key = path.resolve(cur_path, info.main || 'index.js'); - shims[key] = path.resolve(cur_path, replacements); - return; - } - - // http://nodejs.org/api/modules.html#modules_loading_from_node_modules_folders - Object.keys(replacements).forEach(function(key) { - var val; - if (replacements[key] === false) { - val = __dirname + '/empty.js'; - } - else { - val = replacements[key]; - // if target is a relative path, then resolve - // otherwise we assume target is a module - if (val[0] === '.') { - val = path.resolve(cur_path, val); - } - } - - if (key[0] === '/' || key[0] === '.') { - // if begins with / ../ or ./ then we must resolve to a full path - key = path.resolve(cur_path, key); - } - shims[key] = val; - }); - - [ '.js', '.json' ].forEach(function (ext) { - Object.keys(shims).forEach(function (key) { - if (!shims[key + ext]) { - shims[key + ext] = shims[key]; - } - }); - }); -} - -// paths is mutated -// load shims from first package.json file found -function load_shims(paths, browser, cb) { - // identify if our file should be replaced per the browser field - // original filename|id -> replacement - var shims = Object.create(null); - - (function next() { - var cur_path = paths.shift(); - if (!cur_path) { - return cb(null, shims); - } - - var pkg_path = path.join(cur_path, 'package.json'); - - fs.readFile(pkg_path, 'utf8', function(err, data) { - if (err) { - // ignore paths we can't open - // avoids an exists check - if (err.code === 'ENOENT') { - return next(); - } - - return cb(err); - } - try { - find_shims_in_package(data, cur_path, shims, browser); - return cb(null, shims); - } - catch (err) { - return cb(err); - } - }); - })(); -}; - -// paths is mutated -// synchronously load shims from first package.json file found -function load_shims_sync(paths, browser) { - // identify if our file should be replaced per the browser field - // original filename|id -> replacement - var shims = Object.create(null); - var cur_path; - - while (cur_path = paths.shift()) { - var pkg_path = path.join(cur_path, 'package.json'); - - try { - var data = fs.readFileSync(pkg_path, 'utf8'); - find_shims_in_package(data, cur_path, shims, browser); - return shims; - } - catch (err) { - // ignore paths we can't open - // avoids an exists check - if (err.code === 'ENOENT') { - continue; - } - - throw err; - } - } - return shims; -} - -function build_resolve_opts(opts, base) { - var packageFilter = opts.packageFilter; - var browser = normalizeBrowserFieldName(opts.browser) - - opts.basedir = base; - opts.packageFilter = function (info, pkgdir) { - if (packageFilter) info = packageFilter(info, pkgdir); - - var replacements = getReplacements(info, browser); - - // no browser field, keep info unchanged - if (!replacements) { - return info; - } - - info[browser] = replacements; - - // replace main - if (typeof replacements === 'string') { - info.main = replacements; - return info; - } - - var replace_main = replacements[info.main || './index.js'] || - replacements['./' + info.main || './index.js']; - - info.main = replace_main || info.main; - return info; - }; - - var pathFilter = opts.pathFilter; - opts.pathFilter = function(info, resvPath, relativePath) { - if (relativePath[0] != '.') { - relativePath = './' + relativePath; - } - var mappedPath; - if (pathFilter) { - mappedPath = pathFilter.apply(this, arguments); - } - if (mappedPath) { - return mappedPath; - } - - var replacements = info[browser]; - if (!replacements) { - return; - } - - mappedPath = replacements[relativePath]; - if (!mappedPath && path.extname(relativePath) === '') { - mappedPath = replacements[relativePath + '.js']; - if (!mappedPath) { - mappedPath = replacements[relativePath + '.json']; - } - } - return mappedPath; - }; - - return opts; -} - -function resolve(id, opts, cb) { - - // opts.filename - // opts.paths - // opts.modules - // opts.packageFilter - - opts = opts || {}; - opts.filename = opts.filename || ''; - - var base = path.dirname(opts.filename); - - if (opts.basedir) { - base = opts.basedir; - } - - var paths = nodeModulesPaths(base); - - if (opts.paths) { - paths.push.apply(paths, opts.paths); - } - - paths = paths.map(function(p) { - return path.dirname(p); - }); - - // we must always load shims because the browser field could shim out a module - load_shims(paths, opts.browser, function(err, shims) { - if (err) { - return cb(err); - } - - var resid = path.resolve(opts.basedir || path.dirname(opts.filename), id); - if (shims[id] || shims[resid]) { - var xid = shims[id] ? id : resid; - // if the shim was is an absolute path, it was fully resolved - if (shims[xid][0] === '/') { - return resv(shims[xid], build_resolve_opts(opts, base), function(err, full, pkg) { - cb(null, full, pkg); - }); - } - - // module -> alt-module shims - id = shims[xid]; - } - - var modules = opts.modules || Object.create(null); - var shim_path = modules[id]; - if (shim_path) { - return cb(null, shim_path); - } - - // our browser field resolver - // if browser field is an object tho? - var full = resv(id, build_resolve_opts(opts, base), function(err, full, pkg) { - if (err) { - return cb(err); - } - - var resolved = (shims) ? shims[full] || full : full; - cb(null, resolved, pkg); - }); - }); -}; - -resolve.sync = function (id, opts) { - - // opts.filename - // opts.paths - // opts.modules - // opts.packageFilter - - opts = opts || {}; - opts.filename = opts.filename || ''; - - var base = path.dirname(opts.filename); - - if (opts.basedir) { - base = opts.basedir; - } - - var paths = nodeModulesPaths(base); - - if (opts.paths) { - paths.push.apply(paths, opts.paths); - } - - paths = paths.map(function(p) { - return path.dirname(p); - }); - - // we must always load shims because the browser field could shim out a module - var shims = load_shims_sync(paths, opts.browser); - - if (shims[id]) { - // if the shim was is an absolute path, it was fully resolved - if (shims[id][0] === '/') { - return shims[id]; - } - - // module -> alt-module shims - id = shims[id]; - } - - var modules = opts.modules || Object.create(null); - var shim_path = modules[id]; - if (shim_path) { - return shim_path; - } - - // our browser field resolver - // if browser field is an object tho? - var full = resv.sync(id, build_resolve_opts(opts, base)); - - return (shims) ? shims[full] || full : full; -}; - -function normalizeBrowserFieldName(browser) { - return browser || 'browser'; -} - -function getReplacements(info, browser) { - browser = normalizeBrowserFieldName(browser); - var replacements = info[browser] || info.browser; - - // support legacy browserify field for easier migration from legacy - // many packages used this field historically - if (typeof info.browserify === 'string' && !replacements) { - replacements = info.browserify; - } - - return replacements; -} - -module.exports = resolve; diff --git a/node_modules/browser-resolve/package.json b/node_modules/browser-resolve/package.json deleted file mode 100644 index 09792856..00000000 --- a/node_modules/browser-resolve/package.json +++ /dev/null @@ -1,102 +0,0 @@ -{ - "_args": [ - [ - { - "raw": "browser-resolve@^1.7.1", - "scope": null, - "escapedName": "browser-resolve", - "name": "browser-resolve", - "rawSpec": "^1.7.1", - "spec": ">=1.7.1 <2.0.0", - "type": "range" - }, - "/Users/benjaminarias/Desktop/poly/node_modules/browserify" - ] - ], - "_from": "browser-resolve@>=1.7.1 <2.0.0", - "_id": "browser-resolve@1.11.2", - "_inCache": true, - "_installable": true, - "_location": "/browser-resolve", - "_nodeVersion": "6.2.0", - "_npmOperationalInternal": { - "host": "packages-12-west.internal.npmjs.com", - "tmp": "tmp/browser-resolve-1.11.2.tgz_1464190222040_0.7355328067205846" - }, - "_npmUser": { - "name": "defunctzombie", - "email": "shtylman@gmail.com" - }, - "_npmVersion": "3.8.9", - "_phantomChildren": {}, - "_requested": { - "raw": "browser-resolve@^1.7.1", - "scope": null, - "escapedName": "browser-resolve", - "name": "browser-resolve", - "rawSpec": "^1.7.1", - "spec": ">=1.7.1 <2.0.0", - "type": "range" - }, - "_requiredBy": [ - "/browserify", - "/module-deps" - ], - "_resolved": "https://registry.npmjs.org/browser-resolve/-/browser-resolve-1.11.2.tgz", - "_shasum": "8ff09b0a2c421718a1051c260b32e48f442938ce", - "_shrinkwrap": null, - "_spec": "browser-resolve@^1.7.1", - "_where": "/Users/benjaminarias/Desktop/poly/node_modules/browserify", - "author": { - "name": "Roman Shtylman", - "email": "shtylman@gmail.com" - }, - "bugs": { - "url": "https://github.com/shtylman/node-browser-resolve/issues" - }, - "dependencies": { - "resolve": "1.1.7" - }, - "description": "resolve which handles browser field support in package.json", - "devDependencies": { - "mocha": "1.14.0" - }, - "directories": {}, - "dist": { - "shasum": "8ff09b0a2c421718a1051c260b32e48f442938ce", - "tarball": "https://registry.npmjs.org/browser-resolve/-/browser-resolve-1.11.2.tgz" - }, - "files": [ - "index.js", - "empty.js" - ], - "gitHead": "0955bafbb275d2ec1e425b2d776d4d619bd72282", - "homepage": "https://github.com/shtylman/node-browser-resolve#readme", - "keywords": [ - "resolve", - "browser" - ], - "license": "MIT", - "main": "index.js", - "maintainers": [ - { - "name": "substack", - "email": "substack@gmail.com" - }, - { - "name": "defunctzombie", - "email": "shtylman@gmail.com" - } - ], - "name": "browser-resolve", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git://github.com/shtylman/node-browser-resolve.git" - }, - "scripts": { - "test": "mocha --reporter list test/*.js" - }, - "version": "1.11.2" -} diff --git a/node_modules/browserify-aes/.eslintrc b/node_modules/browserify-aes/.eslintrc deleted file mode 100644 index bed248a0..00000000 --- a/node_modules/browserify-aes/.eslintrc +++ /dev/null @@ -1,132 +0,0 @@ -{ - "ecmaFeatures": { - "modules": true, - "experimentalObjectRestSpread": true - }, - - "env": { - "browser": false, - "es6": true, - "node": true - }, - - "plugins": [ - "standard" - ], - - "globals": { - "document": false, - "navigator": false, - "window": false - }, - - "rules": { - "accessor-pairs": 2, - "arrow-spacing": [2, { "before": true, "after": true }], - "block-spacing": [2, "always"], - "brace-style": [2, "1tbs", { "allowSingleLine": true }], - "comma-dangle": [2, "never"], - "comma-spacing": [2, { "before": false, "after": true }], - "comma-style": [2, "last"], - "constructor-super": 2, - "curly": [2, "multi-line"], - "dot-location": [2, "property"], - "eol-last": 2, - "eqeqeq": [2, "allow-null"], - "generator-star-spacing": [2, { "before": true, "after": true }], - "handle-callback-err": [2, "^(err|error)$" ], - "indent": [2, 2, { "SwitchCase": 1 }], - "key-spacing": [2, { "beforeColon": false, "afterColon": true }], - "new-cap": [2, { "newIsCap": true, "capIsNew": false }], - "new-parens": 2, - "no-array-constructor": 2, - "no-caller": 2, - "no-class-assign": 2, - "no-cond-assign": 2, - "no-const-assign": 2, - "no-control-regex": 2, - "no-debugger": 2, - "no-delete-var": 2, - "no-dupe-args": 2, - "no-dupe-class-members": 2, - "no-dupe-keys": 2, - "no-duplicate-case": 2, - "no-empty-character-class": 2, - "no-empty-label": 2, - "no-eval": 2, - "no-ex-assign": 2, - "no-extend-native": 2, - "no-extra-bind": 2, - "no-extra-boolean-cast": 2, - "no-extra-parens": [2, "functions"], - "no-fallthrough": 2, - "no-floating-decimal": 2, - "no-func-assign": 2, - "no-implied-eval": 2, - "no-inner-declarations": [2, "functions"], - "no-invalid-regexp": 2, - "no-irregular-whitespace": 2, - "no-iterator": 2, - "no-label-var": 2, - "no-labels": 2, - "no-lone-blocks": 2, - "no-mixed-spaces-and-tabs": 2, - "no-multi-spaces": 2, - "no-multi-str": 2, - "no-multiple-empty-lines": [2, { "max": 1 }], - "no-native-reassign": 2, - "no-negated-in-lhs": 2, - "no-new": 2, - "no-new-func": 2, - "no-new-object": 2, - "no-new-require": 2, - "no-new-wrappers": 2, - "no-obj-calls": 2, - "no-octal": 2, - "no-octal-escape": 2, - "no-proto": 2, - "no-redeclare": 2, - "no-regex-spaces": 2, - "no-return-assign": 2, - "no-self-compare": 2, - "no-sequences": 2, - "no-shadow-restricted-names": 2, - "no-spaced-func": 2, - "no-sparse-arrays": 2, - "no-this-before-super": 2, - "no-throw-literal": 2, - "no-trailing-spaces": 2, - "no-undef": 2, - "no-undef-init": 2, - "no-unexpected-multiline": 2, - "no-unneeded-ternary": [2, { "defaultAssignment": false }], - "no-unreachable": 2, - "no-unused-vars": [2, { "vars": "all", "args": "none" }], - "no-useless-call": 2, - "no-with": 2, - "one-var": [2, { "initialized": "never" }], - "operator-linebreak": [2, "after", { "overrides": { "?": "before", ":": "before" } }], - "padded-blocks": [2, "never"], - "quotes": [2, "single", "avoid-escape"], - "radix": 2, - "semi": [2, "never"], - "semi-spacing": [2, { "before": false, "after": true }], - "space-after-keywords": [2, "always"], - "space-before-blocks": [2, "always"], - "space-before-function-paren": [2, "always"], - "space-before-keywords": [2, "always"], - "space-in-parens": [2, "never"], - "space-infix-ops": 2, - "space-return-throw-case": 2, - "space-unary-ops": [2, { "words": true, "nonwords": false }], - "spaced-comment": [2, "always", { "markers": ["global", "globals", "eslint", "eslint-disable", "*package", "!", ","] }], - "use-isnan": 2, - "valid-typeof": 2, - "wrap-iife": [2, "any"], - "yoda": [2, "never"], - - "standard/object-curly-even-spacing": [2, "either"], - "standard/array-bracket-even-spacing": [2, "either"], - "standard/computed-property-even-spacing": [2, "even"] - } -} diff --git a/node_modules/browserify-aes/.npmignore b/node_modules/browserify-aes/.npmignore deleted file mode 100644 index 65e3ba2e..00000000 --- a/node_modules/browserify-aes/.npmignore +++ /dev/null @@ -1 +0,0 @@ -test/ diff --git a/node_modules/browserify-aes/.travis.yml b/node_modules/browserify-aes/.travis.yml deleted file mode 100644 index eb83acd9..00000000 --- a/node_modules/browserify-aes/.travis.yml +++ /dev/null @@ -1,6 +0,0 @@ -language: node_js -node_js: - - "0.11" - - "0.10" - - "0.12" - - "iojs" diff --git a/node_modules/browserify-aes/LICENSE b/node_modules/browserify-aes/LICENSE deleted file mode 100644 index 924b38b1..00000000 --- a/node_modules/browserify-aes/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2014-2015 browserify-aes contributors - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/node_modules/browserify-aes/aes.js b/node_modules/browserify-aes/aes.js deleted file mode 100644 index 4829057f..00000000 --- a/node_modules/browserify-aes/aes.js +++ /dev/null @@ -1,177 +0,0 @@ -// based on the aes implimentation in triple sec -// https://github.com/keybase/triplesec - -// which is in turn based on the one from crypto-js -// https://code.google.com/p/crypto-js/ - -var uint_max = Math.pow(2, 32) -function fixup_uint32 (x) { - var ret, x_pos - ret = x > uint_max || x < 0 ? (x_pos = Math.abs(x) % uint_max, x < 0 ? uint_max - x_pos : x_pos) : x - return ret -} -function scrub_vec (v) { - for (var i = 0; i < v.length; v++) { - v[i] = 0 - } - return false -} - -function Global () { - this.SBOX = [] - this.INV_SBOX = [] - this.SUB_MIX = [[], [], [], []] - this.INV_SUB_MIX = [[], [], [], []] - this.init() - this.RCON = [0x00, 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80, 0x1b, 0x36] -} - -Global.prototype.init = function () { - var d, i, sx, t, x, x2, x4, x8, xi, _i - d = (function () { - var _i, _results - _results = [] - for (i = _i = 0; _i < 256; i = ++_i) { - if (i < 128) { - _results.push(i << 1) - } else { - _results.push((i << 1) ^ 0x11b) - } - } - return _results - })() - x = 0 - xi = 0 - for (i = _i = 0; _i < 256; i = ++_i) { - sx = xi ^ (xi << 1) ^ (xi << 2) ^ (xi << 3) ^ (xi << 4) - sx = (sx >>> 8) ^ (sx & 0xff) ^ 0x63 - this.SBOX[x] = sx - this.INV_SBOX[sx] = x - x2 = d[x] - x4 = d[x2] - x8 = d[x4] - t = (d[sx] * 0x101) ^ (sx * 0x1010100) - this.SUB_MIX[0][x] = (t << 24) | (t >>> 8) - this.SUB_MIX[1][x] = (t << 16) | (t >>> 16) - this.SUB_MIX[2][x] = (t << 8) | (t >>> 24) - this.SUB_MIX[3][x] = t - t = (x8 * 0x1010101) ^ (x4 * 0x10001) ^ (x2 * 0x101) ^ (x * 0x1010100) - this.INV_SUB_MIX[0][sx] = (t << 24) | (t >>> 8) - this.INV_SUB_MIX[1][sx] = (t << 16) | (t >>> 16) - this.INV_SUB_MIX[2][sx] = (t << 8) | (t >>> 24) - this.INV_SUB_MIX[3][sx] = t - if (x === 0) { - x = xi = 1 - } else { - x = x2 ^ d[d[d[x8 ^ x2]]] - xi ^= d[d[xi]] - } - } - return true -} - -var G = new Global() - -AES.blockSize = 4 * 4 - -AES.prototype.blockSize = AES.blockSize - -AES.keySize = 256 / 8 - -AES.prototype.keySize = AES.keySize - -function bufferToArray (buf) { - var len = buf.length / 4 - var out = new Array(len) - var i = -1 - while (++i < len) { - out[i] = buf.readUInt32BE(i * 4) - } - return out -} -function AES (key) { - this._key = bufferToArray(key) - this._doReset() -} - -AES.prototype._doReset = function () { - var invKsRow, keySize, keyWords, ksRow, ksRows, t - keyWords = this._key - keySize = keyWords.length - this._nRounds = keySize + 6 - ksRows = (this._nRounds + 1) * 4 - this._keySchedule = [] - for (ksRow = 0; ksRow < ksRows; ksRow++) { - this._keySchedule[ksRow] = ksRow < keySize ? keyWords[ksRow] : (t = this._keySchedule[ksRow - 1], (ksRow % keySize) === 0 ? (t = (t << 8) | (t >>> 24), t = (G.SBOX[t >>> 24] << 24) | (G.SBOX[(t >>> 16) & 0xff] << 16) | (G.SBOX[(t >>> 8) & 0xff] << 8) | G.SBOX[t & 0xff], t ^= G.RCON[(ksRow / keySize) | 0] << 24) : keySize > 6 && ksRow % keySize === 4 ? t = (G.SBOX[t >>> 24] << 24) | (G.SBOX[(t >>> 16) & 0xff] << 16) | (G.SBOX[(t >>> 8) & 0xff] << 8) | G.SBOX[t & 0xff] : void 0, this._keySchedule[ksRow - keySize] ^ t) - } - this._invKeySchedule = [] - for (invKsRow = 0; invKsRow < ksRows; invKsRow++) { - ksRow = ksRows - invKsRow - t = this._keySchedule[ksRow - (invKsRow % 4 ? 0 : 4)] - this._invKeySchedule[invKsRow] = invKsRow < 4 || ksRow <= 4 ? t : G.INV_SUB_MIX[0][G.SBOX[t >>> 24]] ^ G.INV_SUB_MIX[1][G.SBOX[(t >>> 16) & 0xff]] ^ G.INV_SUB_MIX[2][G.SBOX[(t >>> 8) & 0xff]] ^ G.INV_SUB_MIX[3][G.SBOX[t & 0xff]] - } - return true -} - -AES.prototype.encryptBlock = function (M) { - M = bufferToArray(new Buffer(M)) - var out = this._doCryptBlock(M, this._keySchedule, G.SUB_MIX, G.SBOX) - var buf = new Buffer(16) - buf.writeUInt32BE(out[0], 0) - buf.writeUInt32BE(out[1], 4) - buf.writeUInt32BE(out[2], 8) - buf.writeUInt32BE(out[3], 12) - return buf -} - -AES.prototype.decryptBlock = function (M) { - M = bufferToArray(new Buffer(M)) - var temp = [M[3], M[1]] - M[1] = temp[0] - M[3] = temp[1] - var out = this._doCryptBlock(M, this._invKeySchedule, G.INV_SUB_MIX, G.INV_SBOX) - var buf = new Buffer(16) - buf.writeUInt32BE(out[0], 0) - buf.writeUInt32BE(out[3], 4) - buf.writeUInt32BE(out[2], 8) - buf.writeUInt32BE(out[1], 12) - return buf -} - -AES.prototype.scrub = function () { - scrub_vec(this._keySchedule) - scrub_vec(this._invKeySchedule) - scrub_vec(this._key) -} - -AES.prototype._doCryptBlock = function (M, keySchedule, SUB_MIX, SBOX) { - var ksRow, s0, s1, s2, s3, t0, t1, t2, t3 - - s0 = M[0] ^ keySchedule[0] - s1 = M[1] ^ keySchedule[1] - s2 = M[2] ^ keySchedule[2] - s3 = M[3] ^ keySchedule[3] - ksRow = 4 - for (var round = 1; round < this._nRounds; round++) { - t0 = SUB_MIX[0][s0 >>> 24] ^ SUB_MIX[1][(s1 >>> 16) & 0xff] ^ SUB_MIX[2][(s2 >>> 8) & 0xff] ^ SUB_MIX[3][s3 & 0xff] ^ keySchedule[ksRow++] - t1 = SUB_MIX[0][s1 >>> 24] ^ SUB_MIX[1][(s2 >>> 16) & 0xff] ^ SUB_MIX[2][(s3 >>> 8) & 0xff] ^ SUB_MIX[3][s0 & 0xff] ^ keySchedule[ksRow++] - t2 = SUB_MIX[0][s2 >>> 24] ^ SUB_MIX[1][(s3 >>> 16) & 0xff] ^ SUB_MIX[2][(s0 >>> 8) & 0xff] ^ SUB_MIX[3][s1 & 0xff] ^ keySchedule[ksRow++] - t3 = SUB_MIX[0][s3 >>> 24] ^ SUB_MIX[1][(s0 >>> 16) & 0xff] ^ SUB_MIX[2][(s1 >>> 8) & 0xff] ^ SUB_MIX[3][s2 & 0xff] ^ keySchedule[ksRow++] - s0 = t0 - s1 = t1 - s2 = t2 - s3 = t3 - } - t0 = ((SBOX[s0 >>> 24] << 24) | (SBOX[(s1 >>> 16) & 0xff] << 16) | (SBOX[(s2 >>> 8) & 0xff] << 8) | SBOX[s3 & 0xff]) ^ keySchedule[ksRow++] - t1 = ((SBOX[s1 >>> 24] << 24) | (SBOX[(s2 >>> 16) & 0xff] << 16) | (SBOX[(s3 >>> 8) & 0xff] << 8) | SBOX[s0 & 0xff]) ^ keySchedule[ksRow++] - t2 = ((SBOX[s2 >>> 24] << 24) | (SBOX[(s3 >>> 16) & 0xff] << 16) | (SBOX[(s0 >>> 8) & 0xff] << 8) | SBOX[s1 & 0xff]) ^ keySchedule[ksRow++] - t3 = ((SBOX[s3 >>> 24] << 24) | (SBOX[(s0 >>> 16) & 0xff] << 16) | (SBOX[(s1 >>> 8) & 0xff] << 8) | SBOX[s2 & 0xff]) ^ keySchedule[ksRow++] - return [ - fixup_uint32(t0), - fixup_uint32(t1), - fixup_uint32(t2), - fixup_uint32(t3) - ] -} - -exports.AES = AES diff --git a/node_modules/browserify-aes/authCipher.js b/node_modules/browserify-aes/authCipher.js deleted file mode 100644 index 1107a01a..00000000 --- a/node_modules/browserify-aes/authCipher.js +++ /dev/null @@ -1,97 +0,0 @@ -var aes = require('./aes') -var Transform = require('cipher-base') -var inherits = require('inherits') -var GHASH = require('./ghash') -var xor = require('buffer-xor') -inherits(StreamCipher, Transform) -module.exports = StreamCipher - -function StreamCipher (mode, key, iv, decrypt) { - if (!(this instanceof StreamCipher)) { - return new StreamCipher(mode, key, iv) - } - Transform.call(this) - this._finID = Buffer.concat([iv, new Buffer([0, 0, 0, 1])]) - iv = Buffer.concat([iv, new Buffer([0, 0, 0, 2])]) - this._cipher = new aes.AES(key) - this._prev = new Buffer(iv.length) - this._cache = new Buffer('') - this._secCache = new Buffer('') - this._decrypt = decrypt - this._alen = 0 - this._len = 0 - iv.copy(this._prev) - this._mode = mode - var h = new Buffer(4) - h.fill(0) - this._ghash = new GHASH(this._cipher.encryptBlock(h)) - this._authTag = null - this._called = false -} -StreamCipher.prototype._update = function (chunk) { - if (!this._called && this._alen) { - var rump = 16 - (this._alen % 16) - if (rump < 16) { - rump = new Buffer(rump) - rump.fill(0) - this._ghash.update(rump) - } - } - this._called = true - var out = this._mode.encrypt(this, chunk) - if (this._decrypt) { - this._ghash.update(chunk) - } else { - this._ghash.update(out) - } - this._len += chunk.length - return out -} -StreamCipher.prototype._final = function () { - if (this._decrypt && !this._authTag) { - throw new Error('Unsupported state or unable to authenticate data') - } - var tag = xor(this._ghash.final(this._alen * 8, this._len * 8), this._cipher.encryptBlock(this._finID)) - if (this._decrypt) { - if (xorTest(tag, this._authTag)) { - throw new Error('Unsupported state or unable to authenticate data') - } - } else { - this._authTag = tag - } - this._cipher.scrub() -} -StreamCipher.prototype.getAuthTag = function getAuthTag () { - if (!this._decrypt && Buffer.isBuffer(this._authTag)) { - return this._authTag - } else { - throw new Error('Attempting to get auth tag in unsupported state') - } -} -StreamCipher.prototype.setAuthTag = function setAuthTag (tag) { - if (this._decrypt) { - this._authTag = tag - } else { - throw new Error('Attempting to set auth tag in unsupported state') - } -} -StreamCipher.prototype.setAAD = function setAAD (buf) { - if (!this._called) { - this._ghash.update(buf) - this._alen += buf.length - } else { - throw new Error('Attempting to set AAD in unsupported state') - } -} -function xorTest (a, b) { - var out = 0 - if (a.length !== b.length) { - out++ - } - var len = Math.min(a.length, b.length) - var i = -1 - while (++i < len) { - out += (a[i] ^ b[i]) - } - return out -} diff --git a/node_modules/browserify-aes/browser.js b/node_modules/browserify-aes/browser.js deleted file mode 100644 index a058a84d..00000000 --- a/node_modules/browserify-aes/browser.js +++ /dev/null @@ -1,11 +0,0 @@ -var ciphers = require('./encrypter') -exports.createCipher = exports.Cipher = ciphers.createCipher -exports.createCipheriv = exports.Cipheriv = ciphers.createCipheriv -var deciphers = require('./decrypter') -exports.createDecipher = exports.Decipher = deciphers.createDecipher -exports.createDecipheriv = exports.Decipheriv = deciphers.createDecipheriv -var modes = require('./modes') -function getCiphers () { - return Object.keys(modes) -} -exports.listCiphers = exports.getCiphers = getCiphers diff --git a/node_modules/browserify-aes/decrypter.js b/node_modules/browserify-aes/decrypter.js deleted file mode 100644 index b7b8bb02..00000000 --- a/node_modules/browserify-aes/decrypter.js +++ /dev/null @@ -1,137 +0,0 @@ -var aes = require('./aes') -var Transform = require('cipher-base') -var inherits = require('inherits') -var modes = require('./modes') -var StreamCipher = require('./streamCipher') -var AuthCipher = require('./authCipher') -var ebtk = require('evp_bytestokey') - -inherits(Decipher, Transform) -function Decipher (mode, key, iv) { - if (!(this instanceof Decipher)) { - return new Decipher(mode, key, iv) - } - Transform.call(this) - this._cache = new Splitter() - this._last = void 0 - this._cipher = new aes.AES(key) - this._prev = new Buffer(iv.length) - iv.copy(this._prev) - this._mode = mode - this._autopadding = true -} -Decipher.prototype._update = function (data) { - this._cache.add(data) - var chunk - var thing - var out = [] - while ((chunk = this._cache.get(this._autopadding))) { - thing = this._mode.decrypt(this, chunk) - out.push(thing) - } - return Buffer.concat(out) -} -Decipher.prototype._final = function () { - var chunk = this._cache.flush() - if (this._autopadding) { - return unpad(this._mode.decrypt(this, chunk)) - } else if (chunk) { - throw new Error('data not multiple of block length') - } -} -Decipher.prototype.setAutoPadding = function (setTo) { - this._autopadding = !!setTo - return this -} -function Splitter () { - if (!(this instanceof Splitter)) { - return new Splitter() - } - this.cache = new Buffer('') -} -Splitter.prototype.add = function (data) { - this.cache = Buffer.concat([this.cache, data]) -} - -Splitter.prototype.get = function (autoPadding) { - var out - if (autoPadding) { - if (this.cache.length > 16) { - out = this.cache.slice(0, 16) - this.cache = this.cache.slice(16) - return out - } - } else { - if (this.cache.length >= 16) { - out = this.cache.slice(0, 16) - this.cache = this.cache.slice(16) - return out - } - } - return null -} -Splitter.prototype.flush = function () { - if (this.cache.length) { - return this.cache - } -} -function unpad (last) { - var padded = last[15] - var i = -1 - while (++i < padded) { - if (last[(i + (16 - padded))] !== padded) { - throw new Error('unable to decrypt data') - } - } - if (padded === 16) { - return - } - return last.slice(0, 16 - padded) -} - -var modelist = { - ECB: require('./modes/ecb'), - CBC: require('./modes/cbc'), - CFB: require('./modes/cfb'), - CFB8: require('./modes/cfb8'), - CFB1: require('./modes/cfb1'), - OFB: require('./modes/ofb'), - CTR: require('./modes/ctr'), - GCM: require('./modes/ctr') -} - -function createDecipheriv (suite, password, iv) { - var config = modes[suite.toLowerCase()] - if (!config) { - throw new TypeError('invalid suite type') - } - if (typeof iv === 'string') { - iv = new Buffer(iv) - } - if (typeof password === 'string') { - password = new Buffer(password) - } - if (password.length !== config.key / 8) { - throw new TypeError('invalid key length ' + password.length) - } - if (iv.length !== config.iv) { - throw new TypeError('invalid iv length ' + iv.length) - } - if (config.type === 'stream') { - return new StreamCipher(modelist[config.mode], password, iv, true) - } else if (config.type === 'auth') { - return new AuthCipher(modelist[config.mode], password, iv, true) - } - return new Decipher(modelist[config.mode], password, iv) -} - -function createDecipher (suite, password) { - var config = modes[suite.toLowerCase()] - if (!config) { - throw new TypeError('invalid suite type') - } - var keys = ebtk(password, false, config.key, config.iv) - return createDecipheriv(suite, keys.key, keys.iv) -} -exports.createDecipher = createDecipher -exports.createDecipheriv = createDecipheriv diff --git a/node_modules/browserify-aes/encrypter.js b/node_modules/browserify-aes/encrypter.js deleted file mode 100644 index 3d3f561e..00000000 --- a/node_modules/browserify-aes/encrypter.js +++ /dev/null @@ -1,122 +0,0 @@ -var aes = require('./aes') -var Transform = require('cipher-base') -var inherits = require('inherits') -var modes = require('./modes') -var ebtk = require('evp_bytestokey') -var StreamCipher = require('./streamCipher') -var AuthCipher = require('./authCipher') -inherits(Cipher, Transform) -function Cipher (mode, key, iv) { - if (!(this instanceof Cipher)) { - return new Cipher(mode, key, iv) - } - Transform.call(this) - this._cache = new Splitter() - this._cipher = new aes.AES(key) - this._prev = new Buffer(iv.length) - iv.copy(this._prev) - this._mode = mode - this._autopadding = true -} -Cipher.prototype._update = function (data) { - this._cache.add(data) - var chunk - var thing - var out = [] - while ((chunk = this._cache.get())) { - thing = this._mode.encrypt(this, chunk) - out.push(thing) - } - return Buffer.concat(out) -} -Cipher.prototype._final = function () { - var chunk = this._cache.flush() - if (this._autopadding) { - chunk = this._mode.encrypt(this, chunk) - this._cipher.scrub() - return chunk - } else if (chunk.toString('hex') !== '10101010101010101010101010101010') { - this._cipher.scrub() - throw new Error('data not multiple of block length') - } -} -Cipher.prototype.setAutoPadding = function (setTo) { - this._autopadding = !!setTo - return this -} - -function Splitter () { - if (!(this instanceof Splitter)) { - return new Splitter() - } - this.cache = new Buffer('') -} -Splitter.prototype.add = function (data) { - this.cache = Buffer.concat([this.cache, data]) -} - -Splitter.prototype.get = function () { - if (this.cache.length > 15) { - var out = this.cache.slice(0, 16) - this.cache = this.cache.slice(16) - return out - } - return null -} -Splitter.prototype.flush = function () { - var len = 16 - this.cache.length - var padBuff = new Buffer(len) - - var i = -1 - while (++i < len) { - padBuff.writeUInt8(len, i) - } - var out = Buffer.concat([this.cache, padBuff]) - return out -} -var modelist = { - ECB: require('./modes/ecb'), - CBC: require('./modes/cbc'), - CFB: require('./modes/cfb'), - CFB8: require('./modes/cfb8'), - CFB1: require('./modes/cfb1'), - OFB: require('./modes/ofb'), - CTR: require('./modes/ctr'), - GCM: require('./modes/ctr') -} - -function createCipheriv (suite, password, iv) { - var config = modes[suite.toLowerCase()] - if (!config) { - throw new TypeError('invalid suite type') - } - if (typeof iv === 'string') { - iv = new Buffer(iv) - } - if (typeof password === 'string') { - password = new Buffer(password) - } - if (password.length !== config.key / 8) { - throw new TypeError('invalid key length ' + password.length) - } - if (iv.length !== config.iv) { - throw new TypeError('invalid iv length ' + iv.length) - } - if (config.type === 'stream') { - return new StreamCipher(modelist[config.mode], password, iv) - } else if (config.type === 'auth') { - return new AuthCipher(modelist[config.mode], password, iv) - } - return new Cipher(modelist[config.mode], password, iv) -} -function createCipher (suite, password) { - var config = modes[suite.toLowerCase()] - if (!config) { - throw new TypeError('invalid suite type') - } - var keys = ebtk(password, false, config.key, config.iv) - return createCipheriv(suite, keys.key, keys.iv) -} - -exports.createCipheriv = createCipheriv -exports.createCipher = createCipher diff --git a/node_modules/browserify-aes/ghash.js b/node_modules/browserify-aes/ghash.js deleted file mode 100644 index 0ca143cd..00000000 --- a/node_modules/browserify-aes/ghash.js +++ /dev/null @@ -1,98 +0,0 @@ -var zeros = new Buffer(16) -zeros.fill(0) -module.exports = GHASH -function GHASH (key) { - this.h = key - this.state = new Buffer(16) - this.state.fill(0) - this.cache = new Buffer('') -} -// from http://bitwiseshiftleft.github.io/sjcl/doc/symbols/src/core_gcm.js.html -// by Juho Vähä-Herttua -GHASH.prototype.ghash = function (block) { - var i = -1 - while (++i < block.length) { - this.state[i] ^= block[i] - } - this._multiply() -} - -GHASH.prototype._multiply = function () { - var Vi = toArray(this.h) - var Zi = [0, 0, 0, 0] - var j, xi, lsb_Vi - var i = -1 - while (++i < 128) { - xi = (this.state[~~(i / 8)] & (1 << (7 - i % 8))) !== 0 - if (xi) { - // Z_i+1 = Z_i ^ V_i - Zi = xor(Zi, Vi) - } - - // Store the value of LSB(V_i) - lsb_Vi = (Vi[3] & 1) !== 0 - - // V_i+1 = V_i >> 1 - for (j = 3; j > 0; j--) { - Vi[j] = (Vi[j] >>> 1) | ((Vi[j - 1] & 1) << 31) - } - Vi[0] = Vi[0] >>> 1 - - // If LSB(V_i) is 1, V_i+1 = (V_i >> 1) ^ R - if (lsb_Vi) { - Vi[0] = Vi[0] ^ (0xe1 << 24) - } - } - this.state = fromArray(Zi) -} -GHASH.prototype.update = function (buf) { - this.cache = Buffer.concat([this.cache, buf]) - var chunk - while (this.cache.length >= 16) { - chunk = this.cache.slice(0, 16) - this.cache = this.cache.slice(16) - this.ghash(chunk) - } -} -GHASH.prototype.final = function (abl, bl) { - if (this.cache.length) { - this.ghash(Buffer.concat([this.cache, zeros], 16)) - } - this.ghash(fromArray([ - 0, abl, - 0, bl - ])) - return this.state -} - -function toArray (buf) { - return [ - buf.readUInt32BE(0), - buf.readUInt32BE(4), - buf.readUInt32BE(8), - buf.readUInt32BE(12) - ] -} -function fromArray (out) { - out = out.map(fixup_uint32) - var buf = new Buffer(16) - buf.writeUInt32BE(out[0], 0) - buf.writeUInt32BE(out[1], 4) - buf.writeUInt32BE(out[2], 8) - buf.writeUInt32BE(out[3], 12) - return buf -} -var uint_max = Math.pow(2, 32) -function fixup_uint32 (x) { - var ret, x_pos - ret = x > uint_max || x < 0 ? (x_pos = Math.abs(x) % uint_max, x < 0 ? uint_max - x_pos : x_pos) : x - return ret -} -function xor (a, b) { - return [ - a[0] ^ b[0], - a[1] ^ b[1], - a[2] ^ b[2], - a[3] ^ b[3] - ] -} diff --git a/node_modules/browserify-aes/index.js b/node_modules/browserify-aes/index.js deleted file mode 100644 index 58fa883f..00000000 --- a/node_modules/browserify-aes/index.js +++ /dev/null @@ -1,7 +0,0 @@ -var crypto = require('crypto') - -exports.createCipher = exports.Cipher = crypto.createCipher -exports.createCipheriv = exports.Cipheriv = crypto.createCipheriv -exports.createDecipher = exports.Decipher = crypto.createDecipher -exports.createDecipheriv = exports.Decipheriv = crypto.createDecipheriv -exports.listCiphers = exports.getCiphers = crypto.getCiphers diff --git a/node_modules/browserify-aes/modes.js b/node_modules/browserify-aes/modes.js deleted file mode 100644 index c070086d..00000000 --- a/node_modules/browserify-aes/modes.js +++ /dev/null @@ -1,171 +0,0 @@ -exports['aes-128-ecb'] = { - cipher: 'AES', - key: 128, - iv: 0, - mode: 'ECB', - type: 'block' -} -exports['aes-192-ecb'] = { - cipher: 'AES', - key: 192, - iv: 0, - mode: 'ECB', - type: 'block' -} -exports['aes-256-ecb'] = { - cipher: 'AES', - key: 256, - iv: 0, - mode: 'ECB', - type: 'block' -} -exports['aes-128-cbc'] = { - cipher: 'AES', - key: 128, - iv: 16, - mode: 'CBC', - type: 'block' -} -exports['aes-192-cbc'] = { - cipher: 'AES', - key: 192, - iv: 16, - mode: 'CBC', - type: 'block' -} -exports['aes-256-cbc'] = { - cipher: 'AES', - key: 256, - iv: 16, - mode: 'CBC', - type: 'block' -} -exports['aes128'] = exports['aes-128-cbc'] -exports['aes192'] = exports['aes-192-cbc'] -exports['aes256'] = exports['aes-256-cbc'] -exports['aes-128-cfb'] = { - cipher: 'AES', - key: 128, - iv: 16, - mode: 'CFB', - type: 'stream' -} -exports['aes-192-cfb'] = { - cipher: 'AES', - key: 192, - iv: 16, - mode: 'CFB', - type: 'stream' -} -exports['aes-256-cfb'] = { - cipher: 'AES', - key: 256, - iv: 16, - mode: 'CFB', - type: 'stream' -} -exports['aes-128-cfb8'] = { - cipher: 'AES', - key: 128, - iv: 16, - mode: 'CFB8', - type: 'stream' -} -exports['aes-192-cfb8'] = { - cipher: 'AES', - key: 192, - iv: 16, - mode: 'CFB8', - type: 'stream' -} -exports['aes-256-cfb8'] = { - cipher: 'AES', - key: 256, - iv: 16, - mode: 'CFB8', - type: 'stream' -} -exports['aes-128-cfb1'] = { - cipher: 'AES', - key: 128, - iv: 16, - mode: 'CFB1', - type: 'stream' -} -exports['aes-192-cfb1'] = { - cipher: 'AES', - key: 192, - iv: 16, - mode: 'CFB1', - type: 'stream' -} -exports['aes-256-cfb1'] = { - cipher: 'AES', - key: 256, - iv: 16, - mode: 'CFB1', - type: 'stream' -} -exports['aes-128-ofb'] = { - cipher: 'AES', - key: 128, - iv: 16, - mode: 'OFB', - type: 'stream' -} -exports['aes-192-ofb'] = { - cipher: 'AES', - key: 192, - iv: 16, - mode: 'OFB', - type: 'stream' -} -exports['aes-256-ofb'] = { - cipher: 'AES', - key: 256, - iv: 16, - mode: 'OFB', - type: 'stream' -} -exports['aes-128-ctr'] = { - cipher: 'AES', - key: 128, - iv: 16, - mode: 'CTR', - type: 'stream' -} -exports['aes-192-ctr'] = { - cipher: 'AES', - key: 192, - iv: 16, - mode: 'CTR', - type: 'stream' -} -exports['aes-256-ctr'] = { - cipher: 'AES', - key: 256, - iv: 16, - mode: 'CTR', - type: 'stream' -} -exports['aes-128-gcm'] = { - cipher: 'AES', - key: 128, - iv: 12, - mode: 'GCM', - type: 'auth' -} -exports['aes-192-gcm'] = { - cipher: 'AES', - key: 192, - iv: 12, - mode: 'GCM', - type: 'auth' -} -exports['aes-256-gcm'] = { - cipher: 'AES', - key: 256, - iv: 12, - mode: 'GCM', - type: 'auth' -} diff --git a/node_modules/browserify-aes/modes/cbc.js b/node_modules/browserify-aes/modes/cbc.js deleted file mode 100644 index b133e406..00000000 --- a/node_modules/browserify-aes/modes/cbc.js +++ /dev/null @@ -1,17 +0,0 @@ -var xor = require('buffer-xor') - -exports.encrypt = function (self, block) { - var data = xor(block, self._prev) - - self._prev = self._cipher.encryptBlock(data) - return self._prev -} - -exports.decrypt = function (self, block) { - var pad = self._prev - - self._prev = block - var out = self._cipher.decryptBlock(block) - - return xor(out, pad) -} diff --git a/node_modules/browserify-aes/modes/cfb.js b/node_modules/browserify-aes/modes/cfb.js deleted file mode 100644 index 0bfe4fab..00000000 --- a/node_modules/browserify-aes/modes/cfb.js +++ /dev/null @@ -1,31 +0,0 @@ -var xor = require('buffer-xor') - -exports.encrypt = function (self, data, decrypt) { - var out = new Buffer('') - var len - - while (data.length) { - if (self._cache.length === 0) { - self._cache = self._cipher.encryptBlock(self._prev) - self._prev = new Buffer('') - } - - if (self._cache.length <= data.length) { - len = self._cache.length - out = Buffer.concat([out, encryptStart(self, data.slice(0, len), decrypt)]) - data = data.slice(len) - } else { - out = Buffer.concat([out, encryptStart(self, data, decrypt)]) - break - } - } - - return out -} -function encryptStart (self, data, decrypt) { - var len = data.length - var out = xor(data, self._cache) - self._cache = self._cache.slice(len) - self._prev = Buffer.concat([self._prev, decrypt ? data : out]) - return out -} diff --git a/node_modules/browserify-aes/modes/cfb1.js b/node_modules/browserify-aes/modes/cfb1.js deleted file mode 100644 index 335542e2..00000000 --- a/node_modules/browserify-aes/modes/cfb1.js +++ /dev/null @@ -1,34 +0,0 @@ -function encryptByte (self, byteParam, decrypt) { - var pad - var i = -1 - var len = 8 - var out = 0 - var bit, value - while (++i < len) { - pad = self._cipher.encryptBlock(self._prev) - bit = (byteParam & (1 << (7 - i))) ? 0x80 : 0 - value = pad[0] ^ bit - out += ((value & 0x80) >> (i % 8)) - self._prev = shiftIn(self._prev, decrypt ? bit : value) - } - return out -} -exports.encrypt = function (self, chunk, decrypt) { - var len = chunk.length - var out = new Buffer(len) - var i = -1 - while (++i < len) { - out[i] = encryptByte(self, chunk[i], decrypt) - } - return out -} -function shiftIn (buffer, value) { - var len = buffer.length - var i = -1 - var out = new Buffer(buffer.length) - buffer = Buffer.concat([buffer, new Buffer([value])]) - while (++i < len) { - out[i] = buffer[i] << 1 | buffer[i + 1] >> (7) - } - return out -} diff --git a/node_modules/browserify-aes/modes/cfb8.js b/node_modules/browserify-aes/modes/cfb8.js deleted file mode 100644 index c967a959..00000000 --- a/node_modules/browserify-aes/modes/cfb8.js +++ /dev/null @@ -1,15 +0,0 @@ -function encryptByte (self, byteParam, decrypt) { - var pad = self._cipher.encryptBlock(self._prev) - var out = pad[0] ^ byteParam - self._prev = Buffer.concat([self._prev.slice(1), new Buffer([decrypt ? byteParam : out])]) - return out -} -exports.encrypt = function (self, chunk, decrypt) { - var len = chunk.length - var out = new Buffer(len) - var i = -1 - while (++i < len) { - out[i] = encryptByte(self, chunk[i], decrypt) - } - return out -} diff --git a/node_modules/browserify-aes/modes/ctr.js b/node_modules/browserify-aes/modes/ctr.js deleted file mode 100644 index 0ef2278b..00000000 --- a/node_modules/browserify-aes/modes/ctr.js +++ /dev/null @@ -1,31 +0,0 @@ -var xor = require('buffer-xor') - -function incr32 (iv) { - var len = iv.length - var item - while (len--) { - item = iv.readUInt8(len) - if (item === 255) { - iv.writeUInt8(0, len) - } else { - item++ - iv.writeUInt8(item, len) - break - } - } -} - -function getBlock (self) { - var out = self._cipher.encryptBlock(self._prev) - incr32(self._prev) - return out -} - -exports.encrypt = function (self, chunk) { - while (self._cache.length < chunk.length) { - self._cache = Buffer.concat([self._cache, getBlock(self)]) - } - var pad = self._cache.slice(0, chunk.length) - self._cache = self._cache.slice(chunk.length) - return xor(chunk, pad) -} diff --git a/node_modules/browserify-aes/modes/ecb.js b/node_modules/browserify-aes/modes/ecb.js deleted file mode 100644 index 4dd97e7d..00000000 --- a/node_modules/browserify-aes/modes/ecb.js +++ /dev/null @@ -1,6 +0,0 @@ -exports.encrypt = function (self, block) { - return self._cipher.encryptBlock(block) -} -exports.decrypt = function (self, block) { - return self._cipher.decryptBlock(block) -} diff --git a/node_modules/browserify-aes/modes/ofb.js b/node_modules/browserify-aes/modes/ofb.js deleted file mode 100644 index bd875589..00000000 --- a/node_modules/browserify-aes/modes/ofb.js +++ /dev/null @@ -1,16 +0,0 @@ -var xor = require('buffer-xor') - -function getBlock (self) { - self._prev = self._cipher.encryptBlock(self._prev) - return self._prev -} - -exports.encrypt = function (self, chunk) { - while (self._cache.length < chunk.length) { - self._cache = Buffer.concat([self._cache, getBlock(self)]) - } - - var pad = self._cache.slice(0, chunk.length) - self._cache = self._cache.slice(chunk.length) - return xor(chunk, pad) -} diff --git a/node_modules/browserify-aes/package.json b/node_modules/browserify-aes/package.json deleted file mode 100644 index d301a7e9..00000000 --- a/node_modules/browserify-aes/package.json +++ /dev/null @@ -1,113 +0,0 @@ -{ - "_args": [ - [ - { - "raw": "browserify-aes@^1.0.4", - "scope": null, - "escapedName": "browserify-aes", - "name": "browserify-aes", - "rawSpec": "^1.0.4", - "spec": ">=1.0.4 <2.0.0", - "type": "range" - }, - "/Users/benjaminarias/Desktop/poly/node_modules/browserify-cipher" - ] - ], - "_from": "browserify-aes@>=1.0.4 <2.0.0", - "_id": "browserify-aes@1.0.6", - "_inCache": true, - "_installable": true, - "_location": "/browserify-aes", - "_nodeVersion": "5.4.0", - "_npmUser": { - "name": "cwmma", - "email": "calvin.metcalf@gmail.com" - }, - "_npmVersion": "3.3.12", - "_phantomChildren": {}, - "_requested": { - "raw": "browserify-aes@^1.0.4", - "scope": null, - "escapedName": "browserify-aes", - "name": "browserify-aes", - "rawSpec": "^1.0.4", - "spec": ">=1.0.4 <2.0.0", - "type": "range" - }, - "_requiredBy": [ - "/browserify-cipher", - "/parse-asn1" - ], - "_resolved": "https://registry.npmjs.org/browserify-aes/-/browserify-aes-1.0.6.tgz", - "_shasum": "5e7725dbdef1fd5930d4ebab48567ce451c48a0a", - "_shrinkwrap": null, - "_spec": "browserify-aes@^1.0.4", - "_where": "/Users/benjaminarias/Desktop/poly/node_modules/browserify-cipher", - "author": "", - "browser": "browser.js", - "bugs": { - "url": "https://github.com/crypto-browserify/browserify-aes/issues" - }, - "dependencies": { - "buffer-xor": "^1.0.2", - "cipher-base": "^1.0.0", - "create-hash": "^1.1.0", - "evp_bytestokey": "^1.0.0", - "inherits": "^2.0.1" - }, - "description": "aes, for browserify", - "devDependencies": { - "standard": "^3.7.3", - "tap-spec": "^1.0.0", - "tape": "^3.0.0" - }, - "directories": { - "test": "test" - }, - "dist": { - "shasum": "5e7725dbdef1fd5930d4ebab48567ce451c48a0a", - "tarball": "https://registry.npmjs.org/browserify-aes/-/browserify-aes-1.0.6.tgz" - }, - "gitHead": "51f8b9055371c045af448fa07bacaae3df6c8e51", - "homepage": "https://github.com/crypto-browserify/browserify-aes", - "keywords": [ - "aes", - "crypto", - "browserify" - ], - "license": "MIT", - "main": "index.js", - "maintainers": [ - { - "name": "cwmma", - "email": "calvin.metcalf@gmail.com" - }, - { - "name": "dcousens", - "email": "email@dcousens.com" - }, - { - "name": "dominictarr", - "email": "dominic.tarr@gmail.com" - }, - { - "name": "jprichardson", - "email": "jprichardson@gmail.com" - }, - { - "name": "indutny", - "email": "fedor@indutny.com" - } - ], - "name": "browserify-aes", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git://github.com/crypto-browserify/browserify-aes.git" - }, - "scripts": { - "test": "standard && node test/index.js|tspec" - }, - "version": "1.0.6" -} diff --git a/node_modules/browserify-aes/populateFixtures.js b/node_modules/browserify-aes/populateFixtures.js deleted file mode 100644 index ac31eb33..00000000 --- a/node_modules/browserify-aes/populateFixtures.js +++ /dev/null @@ -1,25 +0,0 @@ -var modes = require('./modes') -var fixtures = require('./test/fixtures.json') -var crypto = require('crypto') -var types = ['aes-128-cfb1', 'aes-192-cfb1', 'aes-256-cfb1'] -var ebtk = require('./EVP_BytesToKey') -var fs = require('fs') - -fixtures.forEach(function (fixture) { - types.forEach(function (cipher) { - var suite = crypto.createCipher(cipher, new Buffer(fixture.password)) - var buf = new Buffer('') - buf = Buffer.concat([buf, suite.update(new Buffer(fixture.text))]) - buf = Buffer.concat([buf, suite.final()]) - fixture.results.ciphers[cipher] = buf.toString('hex') - if (modes[cipher].mode === 'ECB') { - return - } - var suite2 = crypto.createCipheriv(cipher, ebtk(crypto, fixture.password, modes[cipher].key).key, new Buffer(fixture.iv, 'hex')) - var buf2 = new Buffer('') - buf2 = Buffer.concat([buf2, suite2.update(new Buffer(fixture.text))]) - buf2 = Buffer.concat([buf2, suite2.final()]) - fixture.results.cipherivs[cipher] = buf2.toString('hex') - }) -}) -fs.writeFileSync('./test/fixturesNew.json', JSON.stringify(fixtures, false, 4)) diff --git a/node_modules/browserify-aes/readme.md b/node_modules/browserify-aes/readme.md deleted file mode 100644 index 1d7b0855..00000000 --- a/node_modules/browserify-aes/readme.md +++ /dev/null @@ -1,18 +0,0 @@ -browserify-aes -==== - -[![Build Status](https://travis-ci.org/crypto-browserify/browserify-aes.svg)](https://travis-ci.org/crypto-browserify/browserify-aes) - -Node style aes for use in the browser. Implements: - - - createCipher - - createCipheriv - - createDecipher - - createDecipheriv - - getCiphers - -In node.js, the `crypto` implementation is used, in browsers it falls back to a pure JavaScript implementation. - -Much of this library has been taken from the aes implementation in [triplesec](https://github.com/keybase/triplesec), a partial derivation of [crypto-js](https://code.google.com/p/crypto-js/). - -`EVP_BytesToKey` is a straight up port of the same function from OpenSSL as there is literally no documenation on it beyond it using 'undocumented extensions' for longer keys. diff --git a/node_modules/browserify-aes/streamCipher.js b/node_modules/browserify-aes/streamCipher.js deleted file mode 100644 index a55c762d..00000000 --- a/node_modules/browserify-aes/streamCipher.js +++ /dev/null @@ -1,25 +0,0 @@ -var aes = require('./aes') -var Transform = require('cipher-base') -var inherits = require('inherits') - -inherits(StreamCipher, Transform) -module.exports = StreamCipher -function StreamCipher (mode, key, iv, decrypt) { - if (!(this instanceof StreamCipher)) { - return new StreamCipher(mode, key, iv) - } - Transform.call(this) - this._cipher = new aes.AES(key) - this._prev = new Buffer(iv.length) - this._cache = new Buffer('') - this._secCache = new Buffer('') - this._decrypt = decrypt - iv.copy(this._prev) - this._mode = mode -} -StreamCipher.prototype._update = function (chunk) { - return this._mode.encrypt(this, chunk, this._decrypt) -} -StreamCipher.prototype._final = function () { - this._cipher.scrub() -} diff --git a/node_modules/browserify-cache-api/.eslintignore b/node_modules/browserify-cache-api/.eslintignore deleted file mode 100644 index d36310f2..00000000 --- a/node_modules/browserify-cache-api/.eslintignore +++ /dev/null @@ -1,2 +0,0 @@ -example/output/ -example/test-module/ \ No newline at end of file diff --git a/node_modules/browserify-cache-api/.eslintrc.js b/node_modules/browserify-cache-api/.eslintrc.js deleted file mode 100644 index 8a415150..00000000 --- a/node_modules/browserify-cache-api/.eslintrc.js +++ /dev/null @@ -1,41 +0,0 @@ -module.exports = { - extends: "eslint:recommended", - parserOptions: { - ecmaVersion: 6, - sourceType: "module", - }, - env: { - node: true, - }, - rules: { - "no-console": 0, - // style - "semi": 2, - "no-extra-semi": 2, - "no-multi-spaces": 2, - "array-bracket-spacing": 2, - "block-spacing": 2, - "comma-spacing": 2, - "comma-dangle": [2, "always-multiline"], - "computed-property-spacing": 2, - "eol-last": 2, - "indent": [2, 2], - "keyword-spacing": 2, - "linebreak-style": 2, - "no-spaced-func": 2, - "no-trailing-spaces": 2, - "object-curly-spacing": 2, - "quotes": [2, "single", "avoid-escape"], - "semi": 2, - "semi-spacing": 2, - "space-before-blocks": 2, - "space-before-function-paren": [2, "never"], - "space-in-parens": 2, - "space-infix-ops": 2, - "space-unary-ops": 2, - "arrow-spacing": 2, - "generator-star-spacing": 2, - "template-curly-spacing": 2, - "yield-star-spacing": 2, - } -}; diff --git a/node_modules/browserify-cache-api/.npmignore b/node_modules/browserify-cache-api/.npmignore deleted file mode 100644 index 161a07e9..00000000 --- a/node_modules/browserify-cache-api/.npmignore +++ /dev/null @@ -1,3 +0,0 @@ -example -support -test diff --git a/node_modules/browserify-cache-api/.travis.yml b/node_modules/browserify-cache-api/.travis.yml deleted file mode 100644 index 36b3e92f..00000000 --- a/node_modules/browserify-cache-api/.travis.yml +++ /dev/null @@ -1,3 +0,0 @@ -language: node_js -node_js: - - "4.2" \ No newline at end of file diff --git a/node_modules/browserify-cache-api/CONTRIBUTING.md b/node_modules/browserify-cache-api/CONTRIBUTING.md deleted file mode 100644 index ea1590ff..00000000 --- a/node_modules/browserify-cache-api/CONTRIBUTING.md +++ /dev/null @@ -1,9 +0,0 @@ -# Contributor Guidelines - -This project has automated tests which can be run with `npm test`. This will be -run in Travis CI when you make a Pull Request so please try to ensure that they -are passing when submitting one. - -The source code of this project is also checked for coding errors and code style -consistency using ESLint. You can run it with `npm run lint` to see any errors, -and you can automatically fix some coding style errors using `npm run lint-fix`. diff --git a/node_modules/browserify-cache-api/README.md b/node_modules/browserify-cache-api/README.md deleted file mode 100644 index dfe67a0d..00000000 --- a/node_modules/browserify-cache-api/README.md +++ /dev/null @@ -1,26 +0,0 @@ -# browserify-cache-api - -Attaches per-module caching of module resolution and transformation to a browserify instance. - -Caches to a file on disk, invalidated by source file modification time. - -Used by [browserify-incremental](https://github.com/jsdf/browserify-incremental) - -```js - // create a browserify instance - var b = browserify({ - // cache and packageCache opts are required - cache: {}, - packageCache: {}, - // and then your opts... - }); - - // attach caching, specifying a location to store the cache file - browserifyCache(b, {cacheFile: './tmp/browserify-cache.json'}); - - // browserify module resolution + transformation is now cached -``` - -## Contributing - -Please see the [Contributor Guidelines](CONTRIBUTING.md). diff --git a/node_modules/browserify-cache-api/index.js b/node_modules/browserify-cache-api/index.js deleted file mode 100644 index 79b5e9b0..00000000 --- a/node_modules/browserify-cache-api/index.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('./lib/BrowserifyCache'); diff --git a/node_modules/browserify-cache-api/lib/BrowserifyCache.js b/node_modules/browserify-cache-api/lib/BrowserifyCache.js deleted file mode 100644 index 3ce6fdcc..00000000 --- a/node_modules/browserify-cache-api/lib/BrowserifyCache.js +++ /dev/null @@ -1,222 +0,0 @@ -var fs = require('fs'); -var assert = require('assert'); -var through = require('through2'); -var assign = require('xtend/mutable'); - -var assertExists = require('./assertExists'); -var proxyEvent = require('./proxyEvent'); -var Cache = require('./Cache'); -var invalidateCache = require('./invalidateCache'); -var invalidateDependentFiles = require('./invalidateDependentFiles'); - -function BrowserifyCache(b, opts) { - assertExists(b); - opts = opts || {}; - - if (BrowserifyCache.getCache(b)) return b; // already attached - - // certain opts must have been set when browserify instance was created - assert(b._options.cache, "required browserify 'cache' opt not set"); - - // load cache from file specified by cacheFile opt - var cacheFile = opts.cacheFile || opts.cachefile || b._options && b._options.cacheFile || null; - var cacheData = loadCacheData(b, cacheFile); - - // b._options.cache is a shared object into which loaded module cache is merged. - // it will be reused for each build, and mutated when the cache is invalidated. - assign(b._options.cache, cacheData.modules); - cacheData.modules = b._options.cache; - - var cache = Cache(cacheData); - BrowserifyCache.setCache(b, cache); - - attachCacheHooksToPipeline(b); - attachCacheDiscoveryHandlers(b); - attachCachePersistHandler(b, cacheFile); - - return b; -} - -BrowserifyCache.args = { - cache: {}, - packageCache: {}, -}; - -BrowserifyCache.getCache = function(b) { - return b.__cacheObjects; -}; - -BrowserifyCache.setCache = function(b, cache) { - b.__cacheObjects = cache; -}; - -// keep track of deps which are pending for the purpose of writing cache file -// (eg. being transformed) -function addCacheBlocker(b) { - if (b.__cacheBlockerCount == null) { - b.__cacheBlockerCount = 0; - } - - b.__cacheBlockerCount++; -} - -function removeCacheBlocker(b) { - assert(b.__cacheBlockerCount >= 1); - - b.__cacheBlockerCount--; - - if (b.__cacheBlockerCount === 0) { - b.emit('_cacheReadyToWrite'); - } -} - -function attachCacheHooksToPipeline(b) { - var prevBundle = b.bundle; - b.bundle = function(cb) { - var outputStream = through.obj(); - - invalidateCacheBeforeBundling(b, function(err) { - if (err) return outputStream.emit('error', err); - - var bundleStream = prevBundle.call(b, cb); - proxyEvent(bundleStream, outputStream, 'file'); - proxyEvent(bundleStream, outputStream, 'package'); - proxyEvent(bundleStream, outputStream, 'transform'); - proxyEvent(bundleStream, outputStream, 'error'); - bundleStream.pipe(outputStream); - }); - - return outputStream; - }; -} - -function invalidateCacheBeforeBundling(b, done) { - var cache = BrowserifyCache.getCache(b); - - invalidateCache(cache.mtimes, cache.modules, function(err, invalidated, deleted) { - invalidateDependentFiles(cache, [].concat(invalidated, deleted), function(err) { - b.emit('changedDeps', invalidated, deleted); - done(err, invalidated); - }); - }); -} - -function attachCacheDiscoveryHandlers(b) { - // based on how watchify adds deps to cache - function insertDepCollector() { - b.pipeline.get('deps').push(through.obj(function(row, enc, next) { - var file = row.expose ? b._expose[row.id] : row.file; - - var dep = { - file: file, - source: row.source, - deps: assign({}, row.deps), - }; - - addCacheBlocker(b); - updateCacheOnDep(b, dep, function(err) { - if (err) b.emit('error', err); - removeCacheBlocker(b); - }); - - this.push(row); - next(); - })); - } - - b.on('reset', insertDepCollector); - insertDepCollector(); - - b.on('transform', function(transformStream, moduleFile) { - transformStream.on('file', function(dependentFile) { - addCacheBlocker(b); - updateCacheOnTransformFile(b, moduleFile, dependentFile, function(err) { - if (err) b.emit('error', err); - removeCacheBlocker(b); - }); - }); - }); -} - -function updateCacheOnDep(b, dep, done) { - var cache = BrowserifyCache.getCache(b); - - var file = dep.file || dep.id; - if (typeof file === 'string') { - if (dep.source != null) { - cache.modules[file] = dep; - if (!cache.mtimes[file]) - return updateMtime(cache.mtimes, file, done); - } else { - console.warn('missing source for dep', file); - } - } else { - console.warn('got dep missing file or string id', file); - } - done(); -} - -function updateCacheOnTransformFile(b, moduleFile, dependentFile, done) { - var cache = BrowserifyCache.getCache(b); - if (cache.dependentFiles[dependentFile] == null) { - cache.dependentFiles[dependentFile] = {}; - } - cache.dependentFiles[dependentFile][moduleFile] = true; - if (!cache.mtimes[dependentFile]) - return updateMtime(cache.mtimes, dependentFile, done); - done(); -} - -function attachCachePersistHandler(b, cacheFile) { - if (!cacheFile) return; - - b.on('bundle', function(bundleStream) { - addCacheBlocker(b); - bundleStream.on('end', function() { - removeCacheBlocker(b); - }); - // We need to wait until the cache is done being populated. - // Use .once because the `b` browserify object can be re-used for multiple - // bundles. We only want to save the cache once per bundle call. - b.once('_cacheReadyToWrite', function() { - storeCache(b, cacheFile); - }); - }); -} - -function storeCache(b, cacheFile) { - assertExists(cacheFile); - - var cache = BrowserifyCache.getCache(b); - fs.writeFile(cacheFile, JSON.stringify(cache), {encoding: 'utf8'}, function(err) { - if (err) b.emit('_cacheFileWriteError', err); - else b.emit('_cacheFileWritten', cacheFile); - }); -} - -function loadCacheData(b, cacheFile) { - var cacheData = {}; - - if (cacheFile) { - try { - cacheData = JSON.parse(fs.readFileSync(cacheFile, {encoding: 'utf8'})); - } catch (err) { - // no existing cache file - b.emit('_cacheFileReadError', err); - } - } - - return cacheData; -} - -function updateMtime(mtimes, file, done) { - assertExists(mtimes); - assertExists(file); - - fs.stat(file, function(err, stat) { - if (!err) mtimes[file] = stat.mtime.getTime(); - done(); - }); -} - -module.exports = BrowserifyCache; diff --git a/node_modules/browserify-cache-api/lib/Cache.js b/node_modules/browserify-cache-api/lib/Cache.js deleted file mode 100644 index 0c700dd3..00000000 --- a/node_modules/browserify-cache-api/lib/Cache.js +++ /dev/null @@ -1,11 +0,0 @@ -function Cache(cacheData) { - var cache = cacheData || {}; - - cache.modules = cache.modules || {}; // module-deps opt 'cache' - cache.mtimes = cache.mtimes || {}; // maps cached file filepath to mtime when cached - cache.dependentFiles = cache.dependentFiles || {}; - - return cache; -} - -module.exports = Cache; diff --git a/node_modules/browserify-cache-api/lib/assertExists.js b/node_modules/browserify-cache-api/lib/assertExists.js deleted file mode 100644 index 1d90797b..00000000 --- a/node_modules/browserify-cache-api/lib/assertExists.js +++ /dev/null @@ -1,7 +0,0 @@ -var assert = require('assert'); - -function assertExists(value, name) { - assert(value != null, 'missing ' + (name || 'argument')); -} - -module.exports = assertExists; diff --git a/node_modules/browserify-cache-api/lib/invalidateCache.js b/node_modules/browserify-cache-api/lib/invalidateCache.js deleted file mode 100644 index ef657c68..00000000 --- a/node_modules/browserify-cache-api/lib/invalidateCache.js +++ /dev/null @@ -1,12 +0,0 @@ -var assertExists = require('./assertExists'); -var invalidateModifiedFiles = require('./invalidateModifiedFiles'); - -function invalidateCache(mtimes, cache, done) { - assertExists(mtimes); - - invalidateModifiedFiles(mtimes, Object.keys(cache), function(file) { - delete cache[file]; - }, done); -} - -module.exports = invalidateCache; diff --git a/node_modules/browserify-cache-api/lib/invalidateDependentFiles.js b/node_modules/browserify-cache-api/lib/invalidateDependentFiles.js deleted file mode 100644 index 73b9112b..00000000 --- a/node_modules/browserify-cache-api/lib/invalidateDependentFiles.js +++ /dev/null @@ -1,28 +0,0 @@ -var invalidateModifiedFiles = require('./invalidateModifiedFiles'); - -function invalidateDependentFiles(cache, invalidatedModules, done) { - var dependentFiles = cache.dependentFiles; - - // clean up maybe-no-longer-dependent modules - var maybeNoLongerDependentModules = {}; - invalidatedModules.forEach(function(module) { - maybeNoLongerDependentModules[module] = true; - }); - Object.keys(dependentFiles).forEach(function(dependentFile) { - if (dependentFiles[dependentFile]) { - Object.keys(dependentFiles[dependentFile]).forEach(function(module) { - if (maybeNoLongerDependentModules[module]) { - delete dependentFiles[dependentFile][module]; - } - }); - } - }); - - invalidateModifiedFiles(cache.mtimes, Object.keys(dependentFiles), function(dependentFile) { - Object.keys(dependentFiles[dependentFile]).forEach(function(module) { - delete cache.modules[module]; - }); - }, function(err) { done(err); }); -} - -module.exports = invalidateDependentFiles; diff --git a/node_modules/browserify-cache-api/lib/invalidateModifiedFiles.js b/node_modules/browserify-cache-api/lib/invalidateModifiedFiles.js deleted file mode 100644 index eb93819b..00000000 --- a/node_modules/browserify-cache-api/lib/invalidateModifiedFiles.js +++ /dev/null @@ -1,28 +0,0 @@ -var fs = require('fs'); -var async = require('async'); - -var CONCURRENCY_LIMIT = 40; - -function invalidateModifiedFiles(mtimes, files, invalidate, done) { - var invalidated = []; - var deleted = []; - async.eachLimit(files, CONCURRENCY_LIMIT, function(file, fileDone) { - fs.stat(file, function(err, stat) { - if (err) { - deleted.push(file); - return fileDone(); - } - var mtimeNew = stat.mtime.getTime(); - if (!(mtimes[file] && mtimeNew && mtimeNew == mtimes[file])) { - invalidate(file); - invalidated.push(file); - } - mtimes[file] = mtimeNew; - fileDone(); - }); - }, function() { - done(null, invalidated, deleted); - }); -} - -module.exports = invalidateModifiedFiles; diff --git a/node_modules/browserify-cache-api/lib/proxyEvent.js b/node_modules/browserify-cache-api/lib/proxyEvent.js deleted file mode 100644 index 94f317d4..00000000 --- a/node_modules/browserify-cache-api/lib/proxyEvent.js +++ /dev/null @@ -1,7 +0,0 @@ -function proxyEvent(source, target, name) { - source.on(name, function() { - target.emit.apply(target, [name].concat([].slice.call(arguments))); - }); -} - -module.exports = proxyEvent; diff --git a/node_modules/browserify-cache-api/node_modules/isarray/.npmignore b/node_modules/browserify-cache-api/node_modules/isarray/.npmignore deleted file mode 100644 index 3c3629e6..00000000 --- a/node_modules/browserify-cache-api/node_modules/isarray/.npmignore +++ /dev/null @@ -1 +0,0 @@ -node_modules diff --git a/node_modules/browserify-cache-api/node_modules/isarray/.travis.yml b/node_modules/browserify-cache-api/node_modules/isarray/.travis.yml deleted file mode 100644 index cc4dba29..00000000 --- a/node_modules/browserify-cache-api/node_modules/isarray/.travis.yml +++ /dev/null @@ -1,4 +0,0 @@ -language: node_js -node_js: - - "0.8" - - "0.10" diff --git a/node_modules/browserify-cache-api/node_modules/isarray/Makefile b/node_modules/browserify-cache-api/node_modules/isarray/Makefile deleted file mode 100644 index 787d56e1..00000000 --- a/node_modules/browserify-cache-api/node_modules/isarray/Makefile +++ /dev/null @@ -1,6 +0,0 @@ - -test: - @node_modules/.bin/tape test.js - -.PHONY: test - diff --git a/node_modules/browserify-cache-api/node_modules/isarray/README.md b/node_modules/browserify-cache-api/node_modules/isarray/README.md deleted file mode 100644 index 16d2c59c..00000000 --- a/node_modules/browserify-cache-api/node_modules/isarray/README.md +++ /dev/null @@ -1,60 +0,0 @@ - -# isarray - -`Array#isArray` for older browsers. - -[![build status](https://secure.travis-ci.org/juliangruber/isarray.svg)](http://travis-ci.org/juliangruber/isarray) -[![downloads](https://img.shields.io/npm/dm/isarray.svg)](https://www.npmjs.org/package/isarray) - -[![browser support](https://ci.testling.com/juliangruber/isarray.png) -](https://ci.testling.com/juliangruber/isarray) - -## Usage - -```js -var isArray = require('isarray'); - -console.log(isArray([])); // => true -console.log(isArray({})); // => false -``` - -## Installation - -With [npm](http://npmjs.org) do - -```bash -$ npm install isarray -``` - -Then bundle for the browser with -[browserify](https://github.com/substack/browserify). - -With [component](http://component.io) do - -```bash -$ component install juliangruber/isarray -``` - -## License - -(MIT) - -Copyright (c) 2013 Julian Gruber <julian@juliangruber.com> - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies -of the Software, and to permit persons to whom the Software is furnished to do -so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/node_modules/browserify-cache-api/node_modules/isarray/component.json b/node_modules/browserify-cache-api/node_modules/isarray/component.json deleted file mode 100644 index 9e31b683..00000000 --- a/node_modules/browserify-cache-api/node_modules/isarray/component.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "name" : "isarray", - "description" : "Array#isArray for older browsers", - "version" : "0.0.1", - "repository" : "juliangruber/isarray", - "homepage": "https://github.com/juliangruber/isarray", - "main" : "index.js", - "scripts" : [ - "index.js" - ], - "dependencies" : {}, - "keywords": ["browser","isarray","array"], - "author": { - "name": "Julian Gruber", - "email": "mail@juliangruber.com", - "url": "http://juliangruber.com" - }, - "license": "MIT" -} diff --git a/node_modules/browserify-cache-api/node_modules/isarray/index.js b/node_modules/browserify-cache-api/node_modules/isarray/index.js deleted file mode 100644 index a57f6349..00000000 --- a/node_modules/browserify-cache-api/node_modules/isarray/index.js +++ /dev/null @@ -1,5 +0,0 @@ -var toString = {}.toString; - -module.exports = Array.isArray || function (arr) { - return toString.call(arr) == '[object Array]'; -}; diff --git a/node_modules/browserify-cache-api/node_modules/isarray/package.json b/node_modules/browserify-cache-api/node_modules/isarray/package.json deleted file mode 100644 index 418fe17d..00000000 --- a/node_modules/browserify-cache-api/node_modules/isarray/package.json +++ /dev/null @@ -1,105 +0,0 @@ -{ - "_args": [ - [ - { - "raw": "isarray@~1.0.0", - "scope": null, - "escapedName": "isarray", - "name": "isarray", - "rawSpec": "~1.0.0", - "spec": ">=1.0.0 <1.1.0", - "type": "range" - }, - "/Users/benjaminarias/Desktop/poly/node_modules/browserify-cache-api/node_modules/readable-stream" - ] - ], - "_from": "isarray@>=1.0.0 <1.1.0", - "_id": "isarray@1.0.0", - "_inCache": true, - "_installable": true, - "_location": "/browserify-cache-api/isarray", - "_nodeVersion": "5.1.0", - "_npmUser": { - "name": "juliangruber", - "email": "julian@juliangruber.com" - }, - "_npmVersion": "3.3.12", - "_phantomChildren": {}, - "_requested": { - "raw": "isarray@~1.0.0", - "scope": null, - "escapedName": "isarray", - "name": "isarray", - "rawSpec": "~1.0.0", - "spec": ">=1.0.0 <1.1.0", - "type": "range" - }, - "_requiredBy": [ - "/browserify-cache-api/readable-stream" - ], - "_resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", - "_shasum": "bb935d48582cba168c06834957a54a3e07124f11", - "_shrinkwrap": null, - "_spec": "isarray@~1.0.0", - "_where": "/Users/benjaminarias/Desktop/poly/node_modules/browserify-cache-api/node_modules/readable-stream", - "author": { - "name": "Julian Gruber", - "email": "mail@juliangruber.com", - "url": "http://juliangruber.com" - }, - "bugs": { - "url": "https://github.com/juliangruber/isarray/issues" - }, - "dependencies": {}, - "description": "Array#isArray for older browsers", - "devDependencies": { - "tape": "~2.13.4" - }, - "directories": {}, - "dist": { - "shasum": "bb935d48582cba168c06834957a54a3e07124f11", - "tarball": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz" - }, - "gitHead": "2a23a281f369e9ae06394c0fb4d2381355a6ba33", - "homepage": "https://github.com/juliangruber/isarray", - "keywords": [ - "browser", - "isarray", - "array" - ], - "license": "MIT", - "main": "index.js", - "maintainers": [ - { - "name": "juliangruber", - "email": "julian@juliangruber.com" - } - ], - "name": "isarray", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git://github.com/juliangruber/isarray.git" - }, - "scripts": { - "test": "tape test.js" - }, - "testling": { - "files": "test.js", - "browsers": [ - "ie/8..latest", - "firefox/17..latest", - "firefox/nightly", - "chrome/22..latest", - "chrome/canary", - "opera/12..latest", - "opera/next", - "safari/5.1..latest", - "ipad/6.0..latest", - "iphone/6.0..latest", - "android-browser/4.2..latest" - ] - }, - "version": "1.0.0" -} diff --git a/node_modules/browserify-cache-api/node_modules/isarray/test.js b/node_modules/browserify-cache-api/node_modules/isarray/test.js deleted file mode 100644 index e0c3444d..00000000 --- a/node_modules/browserify-cache-api/node_modules/isarray/test.js +++ /dev/null @@ -1,20 +0,0 @@ -var isArray = require('./'); -var test = require('tape'); - -test('is array', function(t){ - t.ok(isArray([])); - t.notOk(isArray({})); - t.notOk(isArray(null)); - t.notOk(isArray(false)); - - var obj = {}; - obj[0] = true; - t.notOk(isArray(obj)); - - var arr = []; - arr.foo = 'bar'; - t.ok(isArray(arr)); - - t.end(); -}); - diff --git a/node_modules/browserify-cache-api/node_modules/readable-stream/.npmignore b/node_modules/browserify-cache-api/node_modules/readable-stream/.npmignore deleted file mode 100644 index 38344f87..00000000 --- a/node_modules/browserify-cache-api/node_modules/readable-stream/.npmignore +++ /dev/null @@ -1,5 +0,0 @@ -build/ -test/ -examples/ -fs.js -zlib.js \ No newline at end of file diff --git a/node_modules/browserify-cache-api/node_modules/readable-stream/.travis.yml b/node_modules/browserify-cache-api/node_modules/readable-stream/.travis.yml deleted file mode 100644 index 1b821184..00000000 --- a/node_modules/browserify-cache-api/node_modules/readable-stream/.travis.yml +++ /dev/null @@ -1,52 +0,0 @@ -sudo: false -language: node_js -before_install: - - npm install -g npm@2 - - npm install -g npm -notifications: - email: false -matrix: - fast_finish: true - allow_failures: - - env: TASK=browser BROWSER_NAME=ipad BROWSER_VERSION="6.0..latest" - - env: TASK=browser BROWSER_NAME=iphone BROWSER_VERSION="6.0..latest" - include: - - node_js: '0.8' - env: TASK=test - - node_js: '0.10' - env: TASK=test - - node_js: '0.11' - env: TASK=test - - node_js: '0.12' - env: TASK=test - - node_js: 1 - env: TASK=test - - node_js: 2 - env: TASK=test - - node_js: 3 - env: TASK=test - - node_js: 4 - env: TASK=test - - node_js: 5 - env: TASK=test - - node_js: 5 - env: TASK=browser BROWSER_NAME=android BROWSER_VERSION="4.0..latest" - - node_js: 5 - env: TASK=browser BROWSER_NAME=ie BROWSER_VERSION="9..latest" - - node_js: 5 - env: TASK=browser BROWSER_NAME=opera BROWSER_VERSION="11..latest" - - node_js: 5 - env: TASK=browser BROWSER_NAME=chrome BROWSER_VERSION="-3..latest" - - node_js: 5 - env: TASK=browser BROWSER_NAME=firefox BROWSER_VERSION="-3..latest" - - node_js: 5 - env: TASK=browser BROWSER_NAME=ipad BROWSER_VERSION="6.0..latest" - - node_js: 5 - env: TASK=browser BROWSER_NAME=iphone BROWSER_VERSION="6.0..latest" - - node_js: 5 - env: TASK=browser BROWSER_NAME=safari BROWSER_VERSION="5..latest" -script: "npm run $TASK" -env: - global: - - secure: rE2Vvo7vnjabYNULNyLFxOyt98BoJexDqsiOnfiD6kLYYsiQGfr/sbZkPMOFm9qfQG7pjqx+zZWZjGSswhTt+626C0t/njXqug7Yps4c3dFblzGfreQHp7wNX5TFsvrxd6dAowVasMp61sJcRnB2w8cUzoe3RAYUDHyiHktwqMc= - - secure: g9YINaKAdMatsJ28G9jCGbSaguXCyxSTy+pBO6Ch0Cf57ZLOTka3HqDj8p3nV28LUIHZ3ut5WO43CeYKwt4AUtLpBS3a0dndHdY6D83uY6b2qh5hXlrcbeQTq2cvw2y95F7hm4D1kwrgZ7ViqaKggRcEupAL69YbJnxeUDKWEdI= diff --git a/node_modules/browserify-cache-api/node_modules/readable-stream/.zuul.yml b/node_modules/browserify-cache-api/node_modules/readable-stream/.zuul.yml deleted file mode 100644 index 96d9cfbd..00000000 --- a/node_modules/browserify-cache-api/node_modules/readable-stream/.zuul.yml +++ /dev/null @@ -1 +0,0 @@ -ui: tape diff --git a/node_modules/browserify-cache-api/node_modules/readable-stream/LICENSE b/node_modules/browserify-cache-api/node_modules/readable-stream/LICENSE deleted file mode 100644 index e3d4e695..00000000 --- a/node_modules/browserify-cache-api/node_modules/readable-stream/LICENSE +++ /dev/null @@ -1,18 +0,0 @@ -Copyright Joyent, Inc. and other Node contributors. All rights reserved. -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to -deal in the Software without restriction, including without limitation the -rights to use, copy, modify, merge, publish, distribute, sublicense, and/or -sell copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS -IN THE SOFTWARE. diff --git a/node_modules/browserify-cache-api/node_modules/readable-stream/README.md b/node_modules/browserify-cache-api/node_modules/readable-stream/README.md deleted file mode 100644 index 86b95a3b..00000000 --- a/node_modules/browserify-cache-api/node_modules/readable-stream/README.md +++ /dev/null @@ -1,36 +0,0 @@ -# readable-stream - -***Node-core v5.8.0 streams for userland*** [![Build Status](https://travis-ci.org/nodejs/readable-stream.svg?branch=master)](https://travis-ci.org/nodejs/readable-stream) - - -[![NPM](https://nodei.co/npm/readable-stream.png?downloads=true&downloadRank=true)](https://nodei.co/npm/readable-stream/) -[![NPM](https://nodei.co/npm-dl/readable-stream.png?&months=6&height=3)](https://nodei.co/npm/readable-stream/) - - -[![Sauce Test Status](https://saucelabs.com/browser-matrix/readable-stream.svg)](https://saucelabs.com/u/readable-stream) - -```bash -npm install --save readable-stream -``` - -***Node-core streams for userland*** - -This package is a mirror of the Streams2 and Streams3 implementations in -Node-core, including [documentation](doc/stream.markdown). - -If you want to guarantee a stable streams base, regardless of what version of -Node you, or the users of your libraries are using, use **readable-stream** *only* and avoid the *"stream"* module in Node-core, for background see [this blogpost](http://r.va.gg/2014/06/why-i-dont-use-nodes-core-stream-module.html). - -As of version 2.0.0 **readable-stream** uses semantic versioning. - -# Streams WG Team Members - -* **Chris Dickinson** ([@chrisdickinson](https://github.com/chrisdickinson)) <christopher.s.dickinson@gmail.com> - - Release GPG key: 9554F04D7259F04124DE6B476D5A82AC7E37093B -* **Calvin Metcalf** ([@calvinmetcalf](https://github.com/calvinmetcalf)) <calvin.metcalf@gmail.com> - - Release GPG key: F3EF5F62A87FC27A22E643F714CE4FF5015AA242 -* **Rod Vagg** ([@rvagg](https://github.com/rvagg)) <rod@vagg.org> - - Release GPG key: DD8F2338BAE7501E3DD5AC78C273792F7D83545D -* **Sam Newman** ([@sonewman](https://github.com/sonewman)) <newmansam@outlook.com> -* **Mathias Buus** ([@mafintosh](https://github.com/mafintosh)) <mathiasbuus@gmail.com> -* **Domenic Denicola** ([@domenic](https://github.com/domenic)) <d@domenic.me> diff --git a/node_modules/browserify-cache-api/node_modules/readable-stream/doc/stream.markdown b/node_modules/browserify-cache-api/node_modules/readable-stream/doc/stream.markdown deleted file mode 100644 index 0bc3819e..00000000 --- a/node_modules/browserify-cache-api/node_modules/readable-stream/doc/stream.markdown +++ /dev/null @@ -1,1760 +0,0 @@ -# Stream - - Stability: 2 - Stable - -A stream is an abstract interface implemented by various objects in -Node.js. For example a [request to an HTTP server][http-incoming-message] is a -stream, as is [`process.stdout`][]. Streams are readable, writable, or both. All -streams are instances of [`EventEmitter`][]. - -You can load the Stream base classes by doing `require('stream')`. -There are base classes provided for [Readable][] streams, [Writable][] -streams, [Duplex][] streams, and [Transform][] streams. - -This document is split up into 3 sections: - -1. The first section explains the parts of the API that you need to be - aware of to use streams in your programs. -2. The second section explains the parts of the API that you need to - use if you implement your own custom streams yourself. The API is designed to - make this easy for you to do. -3. The third section goes into more depth about how streams work, - including some of the internal mechanisms and functions that you - should probably not modify unless you definitely know what you are - doing. - - -## API for Stream Consumers - - - -Streams can be either [Readable][], [Writable][], or both ([Duplex][]). - -All streams are EventEmitters, but they also have other custom methods -and properties depending on whether they are Readable, Writable, or -Duplex. - -If a stream is both Readable and Writable, then it implements all of -the methods and events. So, a [Duplex][] or [Transform][] stream is -fully described by this API, though their implementation may be -somewhat different. - -It is not necessary to implement Stream interfaces in order to consume -streams in your programs. If you **are** implementing streaming -interfaces in your own program, please also refer to -[API for Stream Implementors][]. - -Almost all Node.js programs, no matter how simple, use Streams in some -way. Here is an example of using Streams in an Node.js program: - -```js -const http = require('http'); - -var server = http.createServer( (req, res) => { - // req is an http.IncomingMessage, which is a Readable Stream - // res is an http.ServerResponse, which is a Writable Stream - - var body = ''; - // we want to get the data as utf8 strings - // If you don't set an encoding, then you'll get Buffer objects - req.setEncoding('utf8'); - - // Readable streams emit 'data' events once a listener is added - req.on('data', (chunk) => { - body += chunk; - }); - - // the end event tells you that you have entire body - req.on('end', () => { - try { - var data = JSON.parse(body); - } catch (er) { - // uh oh! bad json! - res.statusCode = 400; - return res.end(`error: ${er.message}`); - } - - // write back something interesting to the user: - res.write(typeof data); - res.end(); - }); -}); - -server.listen(1337); - -// $ curl localhost:1337 -d '{}' -// object -// $ curl localhost:1337 -d '"foo"' -// string -// $ curl localhost:1337 -d 'not json' -// error: Unexpected token o -``` - -### Class: stream.Duplex - -Duplex streams are streams that implement both the [Readable][] and -[Writable][] interfaces. - -Examples of Duplex streams include: - -* [TCP sockets][] -* [zlib streams][zlib] -* [crypto streams][crypto] - -### Class: stream.Readable - - - -The Readable stream interface is the abstraction for a *source* of -data that you are reading from. In other words, data comes *out* of a -Readable stream. - -A Readable stream will not start emitting data until you indicate that -you are ready to receive it. - -Readable streams have two "modes": a **flowing mode** and a **paused -mode**. When in flowing mode, data is read from the underlying system -and provided to your program as fast as possible. In paused mode, you -must explicitly call [`stream.read()`][stream-read] to get chunks of data out. -Streams start out in paused mode. - -**Note**: If no data event handlers are attached, and there are no -[`stream.pipe()`][] destinations, and the stream is switched into flowing -mode, then data will be lost. - -You can switch to flowing mode by doing any of the following: - -* Adding a [`'data'`][] event handler to listen for data. -* Calling the [`stream.resume()`][stream-resume] method to explicitly open the - flow. -* Calling the [`stream.pipe()`][] method to send the data to a [Writable][]. - -You can switch back to paused mode by doing either of the following: - -* If there are no pipe destinations, by calling the - [`stream.pause()`][stream-pause] method. -* If there are pipe destinations, by removing any [`'data'`][] event - handlers, and removing all pipe destinations by calling the - [`stream.unpipe()`][] method. - -Note that, for backwards compatibility reasons, removing [`'data'`][] -event handlers will **not** automatically pause the stream. Also, if -there are piped destinations, then calling [`stream.pause()`][stream-pause] will -not guarantee that the stream will *remain* paused once those -destinations drain and ask for more data. - -Examples of readable streams include: - -* [HTTP responses, on the client][http-incoming-message] -* [HTTP requests, on the server][http-incoming-message] -* [fs read streams][] -* [zlib streams][zlib] -* [crypto streams][crypto] -* [TCP sockets][] -* [child process stdout and stderr][] -* [`process.stdin`][] - -#### Event: 'close' - -Emitted when the stream and any of its underlying resources (a file -descriptor, for example) have been closed. The event indicates that -no more events will be emitted, and no further computation will occur. - -Not all streams will emit the `'close'` event. - -#### Event: 'data' - -* `chunk` {Buffer|String} The chunk of data. - -Attaching a `'data'` event listener to a stream that has not been -explicitly paused will switch the stream into flowing mode. Data will -then be passed as soon as it is available. - -If you just want to get all the data out of the stream as fast as -possible, this is the best way to do so. - -```js -var readable = getReadableStreamSomehow(); -readable.on('data', (chunk) => { - console.log('got %d bytes of data', chunk.length); -}); -``` - -#### Event: 'end' - -This event fires when there will be no more data to read. - -Note that the `'end'` event **will not fire** unless the data is -completely consumed. This can be done by switching into flowing mode, -or by calling [`stream.read()`][stream-read] repeatedly until you get to the -end. - -```js -var readable = getReadableStreamSomehow(); -readable.on('data', (chunk) => { - console.log('got %d bytes of data', chunk.length); -}); -readable.on('end', () => { - console.log('there will be no more data.'); -}); -``` - -#### Event: 'error' - -* {Error Object} - -Emitted if there was an error receiving data. - -#### Event: 'readable' - -When a chunk of data can be read from the stream, it will emit a -`'readable'` event. - -In some cases, listening for a `'readable'` event will cause some data -to be read into the internal buffer from the underlying system, if it -hadn't already. - -```javascript -var readable = getReadableStreamSomehow(); -readable.on('readable', () => { - // there is some data to read now -}); -``` - -Once the internal buffer is drained, a `'readable'` event will fire -again when more data is available. - -The `'readable'` event is not emitted in the "flowing" mode with the -sole exception of the last one, on end-of-stream. - -The `'readable'` event indicates that the stream has new information: -either new data is available or the end of the stream has been reached. -In the former case, [`stream.read()`][stream-read] will return that data. In the -latter case, [`stream.read()`][stream-read] will return null. For instance, in -the following example, `foo.txt` is an empty file: - -```js -const fs = require('fs'); -var rr = fs.createReadStream('foo.txt'); -rr.on('readable', () => { - console.log('readable:', rr.read()); -}); -rr.on('end', () => { - console.log('end'); -}); -``` - -The output of running this script is: - -``` -$ node test.js -readable: null -end -``` - -#### readable.isPaused() - -* Return: {Boolean} - -This method returns whether or not the `readable` has been **explicitly** -paused by client code (using [`stream.pause()`][stream-pause] without a -corresponding [`stream.resume()`][stream-resume]). - -```js -var readable = new stream.Readable - -readable.isPaused() // === false -readable.pause() -readable.isPaused() // === true -readable.resume() -readable.isPaused() // === false -``` - -#### readable.pause() - -* Return: `this` - -This method will cause a stream in flowing mode to stop emitting -[`'data'`][] events, switching out of flowing mode. Any data that becomes -available will remain in the internal buffer. - -```js -var readable = getReadableStreamSomehow(); -readable.on('data', (chunk) => { - console.log('got %d bytes of data', chunk.length); - readable.pause(); - console.log('there will be no more data for 1 second'); - setTimeout(() => { - console.log('now data will start flowing again'); - readable.resume(); - }, 1000); -}); -``` - -#### readable.pipe(destination[, options]) - -* `destination` {stream.Writable} The destination for writing data -* `options` {Object} Pipe options - * `end` {Boolean} End the writer when the reader ends. Default = `true` - -This method pulls all the data out of a readable stream, and writes it -to the supplied destination, automatically managing the flow so that -the destination is not overwhelmed by a fast readable stream. - -Multiple destinations can be piped to safely. - -```js -var readable = getReadableStreamSomehow(); -var writable = fs.createWriteStream('file.txt'); -// All the data from readable goes into 'file.txt' -readable.pipe(writable); -``` - -This function returns the destination stream, so you can set up pipe -chains like so: - -```js -var r = fs.createReadStream('file.txt'); -var z = zlib.createGzip(); -var w = fs.createWriteStream('file.txt.gz'); -r.pipe(z).pipe(w); -``` - -For example, emulating the Unix `cat` command: - -```js -process.stdin.pipe(process.stdout); -``` - -By default [`stream.end()`][stream-end] is called on the destination when the -source stream emits [`'end'`][], so that `destination` is no longer writable. -Pass `{ end: false }` as `options` to keep the destination stream open. - -This keeps `writer` open so that "Goodbye" can be written at the -end. - -```js -reader.pipe(writer, { end: false }); -reader.on('end', () => { - writer.end('Goodbye\n'); -}); -``` - -Note that [`process.stderr`][] and [`process.stdout`][] are never closed until -the process exits, regardless of the specified options. - -#### readable.read([size]) - -* `size` {Number} Optional argument to specify how much data to read. -* Return {String|Buffer|Null} - -The `read()` method pulls some data out of the internal buffer and -returns it. If there is no data available, then it will return -`null`. - -If you pass in a `size` argument, then it will return that many -bytes. If `size` bytes are not available, then it will return `null`, -unless we've ended, in which case it will return the data remaining -in the buffer. - -If you do not specify a `size` argument, then it will return all the -data in the internal buffer. - -This method should only be called in paused mode. In flowing mode, -this method is called automatically until the internal buffer is -drained. - -```js -var readable = getReadableStreamSomehow(); -readable.on('readable', () => { - var chunk; - while (null !== (chunk = readable.read())) { - console.log('got %d bytes of data', chunk.length); - } -}); -``` - -If this method returns a data chunk, then it will also trigger the -emission of a [`'data'`][] event. - -Note that calling [`stream.read([size])`][stream-read] after the [`'end'`][] -event has been triggered will return `null`. No runtime error will be raised. - -#### readable.resume() - -* Return: `this` - -This method will cause the readable stream to resume emitting [`'data'`][] -events. - -This method will switch the stream into flowing mode. If you do *not* -want to consume the data from a stream, but you *do* want to get to -its [`'end'`][] event, you can call [`stream.resume()`][stream-resume] to open -the flow of data. - -```js -var readable = getReadableStreamSomehow(); -readable.resume(); -readable.on('end', () => { - console.log('got to the end, but did not read anything'); -}); -``` - -#### readable.setEncoding(encoding) - -* `encoding` {String} The encoding to use. -* Return: `this` - -Call this function to cause the stream to return strings of the specified -encoding instead of Buffer objects. For example, if you do -`readable.setEncoding('utf8')`, then the output data will be interpreted as -UTF-8 data, and returned as strings. If you do `readable.setEncoding('hex')`, -then the data will be encoded in hexadecimal string format. - -This properly handles multi-byte characters that would otherwise be -potentially mangled if you simply pulled the Buffers directly and -called [`buf.toString(encoding)`][] on them. If you want to read the data -as strings, always use this method. - -Also you can disable any encoding at all with `readable.setEncoding(null)`. -This approach is very useful if you deal with binary data or with large -multi-byte strings spread out over multiple chunks. - -```js -var readable = getReadableStreamSomehow(); -readable.setEncoding('utf8'); -readable.on('data', (chunk) => { - assert.equal(typeof chunk, 'string'); - console.log('got %d characters of string data', chunk.length); -}); -``` - -#### readable.unpipe([destination]) - -* `destination` {stream.Writable} Optional specific stream to unpipe - -This method will remove the hooks set up for a previous [`stream.pipe()`][] -call. - -If the destination is not specified, then all pipes are removed. - -If the destination is specified, but no pipe is set up for it, then -this is a no-op. - -```js -var readable = getReadableStreamSomehow(); -var writable = fs.createWriteStream('file.txt'); -// All the data from readable goes into 'file.txt', -// but only for the first second -readable.pipe(writable); -setTimeout(() => { - console.log('stop writing to file.txt'); - readable.unpipe(writable); - console.log('manually close the file stream'); - writable.end(); -}, 1000); -``` - -#### readable.unshift(chunk) - -* `chunk` {Buffer|String} Chunk of data to unshift onto the read queue - -This is useful in certain cases where a stream is being consumed by a -parser, which needs to "un-consume" some data that it has -optimistically pulled out of the source, so that the stream can be -passed on to some other party. - -Note that `stream.unshift(chunk)` cannot be called after the [`'end'`][] event -has been triggered; a runtime error will be raised. - -If you find that you must often call `stream.unshift(chunk)` in your -programs, consider implementing a [Transform][] stream instead. (See [API -for Stream Implementors][].) - -```js -// Pull off a header delimited by \n\n -// use unshift() if we get too much -// Call the callback with (error, header, stream) -const StringDecoder = require('string_decoder').StringDecoder; -function parseHeader(stream, callback) { - stream.on('error', callback); - stream.on('readable', onReadable); - var decoder = new StringDecoder('utf8'); - var header = ''; - function onReadable() { - var chunk; - while (null !== (chunk = stream.read())) { - var str = decoder.write(chunk); - if (str.match(/\n\n/)) { - // found the header boundary - var split = str.split(/\n\n/); - header += split.shift(); - var remaining = split.join('\n\n'); - var buf = new Buffer(remaining, 'utf8'); - if (buf.length) - stream.unshift(buf); - stream.removeListener('error', callback); - stream.removeListener('readable', onReadable); - // now the body of the message can be read from the stream. - callback(null, header, stream); - } else { - // still reading the header. - header += str; - } - } - } -} -``` - -Note that, unlike [`stream.push(chunk)`][stream-push], `stream.unshift(chunk)` -will not end the reading process by resetting the internal reading state of the -stream. This can cause unexpected results if `unshift()` is called during a -read (i.e. from within a [`stream._read()`][stream-_read] implementation on a -custom stream). Following the call to `unshift()` with an immediate -[`stream.push('')`][stream-push] will reset the reading state appropriately, -however it is best to simply avoid calling `unshift()` while in the process of -performing a read. - -#### readable.wrap(stream) - -* `stream` {Stream} An "old style" readable stream - -Versions of Node.js prior to v0.10 had streams that did not implement the -entire Streams API as it is today. (See [Compatibility][] for -more information.) - -If you are using an older Node.js library that emits [`'data'`][] events and -has a [`stream.pause()`][stream-pause] method that is advisory only, then you -can use the `wrap()` method to create a [Readable][] stream that uses the old -stream as its data source. - -You will very rarely ever need to call this function, but it exists -as a convenience for interacting with old Node.js programs and libraries. - -For example: - -```js -const OldReader = require('./old-api-module.js').OldReader; -const Readable = require('stream').Readable; -const oreader = new OldReader; -const myReader = new Readable().wrap(oreader); - -myReader.on('readable', () => { - myReader.read(); // etc. -}); -``` - -### Class: stream.Transform - -Transform streams are [Duplex][] streams where the output is in some way -computed from the input. They implement both the [Readable][] and -[Writable][] interfaces. - -Examples of Transform streams include: - -* [zlib streams][zlib] -* [crypto streams][crypto] - -### Class: stream.Writable - - - -The Writable stream interface is an abstraction for a *destination* -that you are writing data *to*. - -Examples of writable streams include: - -* [HTTP requests, on the client][] -* [HTTP responses, on the server][] -* [fs write streams][] -* [zlib streams][zlib] -* [crypto streams][crypto] -* [TCP sockets][] -* [child process stdin][] -* [`process.stdout`][], [`process.stderr`][] - -#### Event: 'drain' - -If a [`stream.write(chunk)`][stream-write] call returns `false`, then the -`'drain'` event will indicate when it is appropriate to begin writing more data -to the stream. - -```js -// Write the data to the supplied writable stream one million times. -// Be attentive to back-pressure. -function writeOneMillionTimes(writer, data, encoding, callback) { - var i = 1000000; - write(); - function write() { - var ok = true; - do { - i -= 1; - if (i === 0) { - // last time! - writer.write(data, encoding, callback); - } else { - // see if we should continue, or wait - // don't pass the callback, because we're not done yet. - ok = writer.write(data, encoding); - } - } while (i > 0 && ok); - if (i > 0) { - // had to stop early! - // write some more once it drains - writer.once('drain', write); - } - } -} -``` - -#### Event: 'error' - -* {Error} - -Emitted if there was an error when writing or piping data. - -#### Event: 'finish' - -When the [`stream.end()`][stream-end] method has been called, and all data has -been flushed to the underlying system, this event is emitted. - -```javascript -var writer = getWritableStreamSomehow(); -for (var i = 0; i < 100; i ++) { - writer.write('hello, #${i}!\n'); -} -writer.end('this is the end\n'); -writer.on('finish', () => { - console.error('all writes are now complete.'); -}); -``` - -#### Event: 'pipe' - -* `src` {stream.Readable} source stream that is piping to this writable - -This is emitted whenever the [`stream.pipe()`][] method is called on a readable -stream, adding this writable to its set of destinations. - -```js -var writer = getWritableStreamSomehow(); -var reader = getReadableStreamSomehow(); -writer.on('pipe', (src) => { - console.error('something is piping into the writer'); - assert.equal(src, reader); -}); -reader.pipe(writer); -``` - -#### Event: 'unpipe' - -* `src` {[Readable][] Stream} The source stream that - [unpiped][`stream.unpipe()`] this writable - -This is emitted whenever the [`stream.unpipe()`][] method is called on a -readable stream, removing this writable from its set of destinations. - -```js -var writer = getWritableStreamSomehow(); -var reader = getReadableStreamSomehow(); -writer.on('unpipe', (src) => { - console.error('something has stopped piping into the writer'); - assert.equal(src, reader); -}); -reader.pipe(writer); -reader.unpipe(writer); -``` - -#### writable.cork() - -Forces buffering of all writes. - -Buffered data will be flushed either at [`stream.uncork()`][] or at -[`stream.end()`][stream-end] call. - -#### writable.end([chunk][, encoding][, callback]) - -* `chunk` {String|Buffer} Optional data to write -* `encoding` {String} The encoding, if `chunk` is a String -* `callback` {Function} Optional callback for when the stream is finished - -Call this method when no more data will be written to the stream. If supplied, -the callback is attached as a listener on the [`'finish'`][] event. - -Calling [`stream.write()`][stream-write] after calling -[`stream.end()`][stream-end] will raise an error. - -```js -// write 'hello, ' and then end with 'world!' -var file = fs.createWriteStream('example.txt'); -file.write('hello, '); -file.end('world!'); -// writing more now is not allowed! -``` - -#### writable.setDefaultEncoding(encoding) - -* `encoding` {String} The new default encoding - -Sets the default encoding for a writable stream. - -#### writable.uncork() - -Flush all data, buffered since [`stream.cork()`][] call. - -#### writable.write(chunk[, encoding][, callback]) - -* `chunk` {String|Buffer} The data to write -* `encoding` {String} The encoding, if `chunk` is a String -* `callback` {Function} Callback for when this chunk of data is flushed -* Returns: {Boolean} `true` if the data was handled completely. - -This method writes some data to the underlying system, and calls the -supplied callback once the data has been fully handled. - -The return value indicates if you should continue writing right now. -If the data had to be buffered internally, then it will return -`false`. Otherwise, it will return `true`. - -This return value is strictly advisory. You MAY continue to write, -even if it returns `false`. However, writes will be buffered in -memory, so it is best not to do this excessively. Instead, wait for -the [`'drain'`][] event before writing more data. - - -## API for Stream Implementors - - - -To implement any sort of stream, the pattern is the same: - -1. Extend the appropriate parent class in your own subclass. (The - [`util.inherits()`][] method is particularly helpful for this.) -2. Call the appropriate parent class constructor in your constructor, - to be sure that the internal mechanisms are set up properly. -3. Implement one or more specific methods, as detailed below. - -The class to extend and the method(s) to implement depend on the sort -of stream class you are writing: - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-

Use-case

-
-

Class

-
-

Method(s) to implement

-
-

Reading only

-
-

[Readable](#stream_class_stream_readable_1)

-
-

[_read][stream-_read]

-
-

Writing only

-
-

[Writable](#stream_class_stream_writable_1)

-
-

[_write][stream-_write], [_writev][stream-_writev]

-
-

Reading and writing

-
-

[Duplex](#stream_class_stream_duplex_1)

-
-

[_read][stream-_read], [_write][stream-_write], [_writev][stream-_writev]

-
-

Operate on written data, then read the result

-
-

[Transform](#stream_class_stream_transform_1)

-
-

[_transform][stream-_transform], [_flush][stream-_flush]

-
- -In your implementation code, it is very important to never call the methods -described in [API for Stream Consumers][]. Otherwise, you can potentially cause -adverse side effects in programs that consume your streaming interfaces. - -### Class: stream.Duplex - - - -A "duplex" stream is one that is both Readable and Writable, such as a TCP -socket connection. - -Note that `stream.Duplex` is an abstract class designed to be extended -with an underlying implementation of the [`stream._read(size)`][stream-_read] -and [`stream._write(chunk, encoding, callback)`][stream-_write] methods as you -would with a Readable or Writable stream class. - -Since JavaScript doesn't have multiple prototypal inheritance, this class -prototypally inherits from Readable, and then parasitically from Writable. It is -thus up to the user to implement both the low-level -[`stream._read(n)`][stream-_read] method as well as the low-level -[`stream._write(chunk, encoding, callback)`][stream-_write] method on extension -duplex classes. - -#### new stream.Duplex(options) - -* `options` {Object} Passed to both Writable and Readable - constructors. Also has the following fields: - * `allowHalfOpen` {Boolean} Default = `true`. If set to `false`, then - the stream will automatically end the readable side when the - writable side ends and vice versa. - * `readableObjectMode` {Boolean} Default = `false`. Sets `objectMode` - for readable side of the stream. Has no effect if `objectMode` - is `true`. - * `writableObjectMode` {Boolean} Default = `false`. Sets `objectMode` - for writable side of the stream. Has no effect if `objectMode` - is `true`. - -In classes that extend the Duplex class, make sure to call the -constructor so that the buffering settings can be properly -initialized. - -### Class: stream.PassThrough - -This is a trivial implementation of a [Transform][] stream that simply -passes the input bytes across to the output. Its purpose is mainly -for examples and testing, but there are occasionally use cases where -it can come in handy as a building block for novel sorts of streams. - -### Class: stream.Readable - - - -`stream.Readable` is an abstract class designed to be extended with an -underlying implementation of the [`stream._read(size)`][stream-_read] method. - -Please see [API for Stream Consumers][] for how to consume -streams in your programs. What follows is an explanation of how to -implement Readable streams in your programs. - -#### new stream.Readable([options]) - -* `options` {Object} - * `highWaterMark` {Number} The maximum number of bytes to store in - the internal buffer before ceasing to read from the underlying - resource. Default = `16384` (16kb), or `16` for `objectMode` streams - * `encoding` {String} If specified, then buffers will be decoded to - strings using the specified encoding. Default = `null` - * `objectMode` {Boolean} Whether this stream should behave - as a stream of objects. Meaning that [`stream.read(n)`][stream-read] returns - a single value instead of a Buffer of size n. Default = `false` - * `read` {Function} Implementation for the [`stream._read()`][stream-_read] - method. - -In classes that extend the Readable class, make sure to call the -Readable constructor so that the buffering settings can be properly -initialized. - -#### readable.\_read(size) - -* `size` {Number} Number of bytes to read asynchronously - -Note: **Implement this method, but do NOT call it directly.** - -This method is prefixed with an underscore because it is internal to the -class that defines it and should only be called by the internal Readable -class methods. All Readable stream implementations must provide a \_read -method to fetch data from the underlying resource. - -When `_read()` is called, if data is available from the resource, the `_read()` -implementation should start pushing that data into the read queue by calling -[`this.push(dataChunk)`][stream-push]. `_read()` should continue reading from -the resource and pushing data until push returns `false`, at which point it -should stop reading from the resource. Only when `_read()` is called again after -it has stopped should it start reading more data from the resource and pushing -that data onto the queue. - -Note: once the `_read()` method is called, it will not be called again until -the [`stream.push()`][stream-push] method is called. - -The `size` argument is advisory. Implementations where a "read" is a -single call that returns data can use this to know how much data to -fetch. Implementations where that is not relevant, such as TCP or -TLS, may ignore this argument, and simply provide data whenever it -becomes available. There is no need, for example to "wait" until -`size` bytes are available before calling [`stream.push(chunk)`][stream-push]. - -#### readable.push(chunk[, encoding]) - - -* `chunk` {Buffer|Null|String} Chunk of data to push into the read queue -* `encoding` {String} Encoding of String chunks. Must be a valid - Buffer encoding, such as `'utf8'` or `'ascii'` -* return {Boolean} Whether or not more pushes should be performed - -Note: **This method should be called by Readable implementors, NOT -by consumers of Readable streams.** - -If a value other than null is passed, The `push()` method adds a chunk of data -into the queue for subsequent stream processors to consume. If `null` is -passed, it signals the end of the stream (EOF), after which no more data -can be written. - -The data added with `push()` can be pulled out by calling the -[`stream.read()`][stream-read] method when the [`'readable'`][] event fires. - -This API is designed to be as flexible as possible. For example, -you may be wrapping a lower-level source which has some sort of -pause/resume mechanism, and a data callback. In those cases, you -could wrap the low-level source object by doing something like this: - -```js -// source is an object with readStop() and readStart() methods, -// and an `ondata` member that gets called when it has data, and -// an `onend` member that gets called when the data is over. - -util.inherits(SourceWrapper, Readable); - -function SourceWrapper(options) { - Readable.call(this, options); - - this._source = getLowlevelSourceObject(); - - // Every time there's data, we push it into the internal buffer. - this._source.ondata = (chunk) => { - // if push() returns false, then we need to stop reading from source - if (!this.push(chunk)) - this._source.readStop(); - }; - - // When the source ends, we push the EOF-signaling `null` chunk - this._source.onend = () => { - this.push(null); - }; -} - -// _read will be called when the stream wants to pull more data in -// the advisory size argument is ignored in this case. -SourceWrapper.prototype._read = function(size) { - this._source.readStart(); -}; -``` - -#### Example: A Counting Stream - - - -This is a basic example of a Readable stream. It emits the numerals -from 1 to 1,000,000 in ascending order, and then ends. - -```js -const Readable = require('stream').Readable; -const util = require('util'); -util.inherits(Counter, Readable); - -function Counter(opt) { - Readable.call(this, opt); - this._max = 1000000; - this._index = 1; -} - -Counter.prototype._read = function() { - var i = this._index++; - if (i > this._max) - this.push(null); - else { - var str = '' + i; - var buf = new Buffer(str, 'ascii'); - this.push(buf); - } -}; -``` - -#### Example: SimpleProtocol v1 (Sub-optimal) - -This is similar to the `parseHeader` function described -[here](#stream_readable_unshift_chunk), but implemented as a custom stream. -Also, note that this implementation does not convert the incoming data to a -string. - -However, this would be better implemented as a [Transform][] stream. See -[SimpleProtocol v2][] for a better implementation. - -```js -// A parser for a simple data protocol. -// The "header" is a JSON object, followed by 2 \n characters, and -// then a message body. -// -// NOTE: This can be done more simply as a Transform stream! -// Using Readable directly for this is sub-optimal. See the -// alternative example below under the Transform section. - -const Readable = require('stream').Readable; -const util = require('util'); - -util.inherits(SimpleProtocol, Readable); - -function SimpleProtocol(source, options) { - if (!(this instanceof SimpleProtocol)) - return new SimpleProtocol(source, options); - - Readable.call(this, options); - this._inBody = false; - this._sawFirstCr = false; - - // source is a readable stream, such as a socket or file - this._source = source; - - var self = this; - source.on('end', () => { - self.push(null); - }); - - // give it a kick whenever the source is readable - // read(0) will not consume any bytes - source.on('readable', () => { - self.read(0); - }); - - this._rawHeader = []; - this.header = null; -} - -SimpleProtocol.prototype._read = function(n) { - if (!this._inBody) { - var chunk = this._source.read(); - - // if the source doesn't have data, we don't have data yet. - if (chunk === null) - return this.push(''); - - // check if the chunk has a \n\n - var split = -1; - for (var i = 0; i < chunk.length; i++) { - if (chunk[i] === 10) { // '\n' - if (this._sawFirstCr) { - split = i; - break; - } else { - this._sawFirstCr = true; - } - } else { - this._sawFirstCr = false; - } - } - - if (split === -1) { - // still waiting for the \n\n - // stash the chunk, and try again. - this._rawHeader.push(chunk); - this.push(''); - } else { - this._inBody = true; - var h = chunk.slice(0, split); - this._rawHeader.push(h); - var header = Buffer.concat(this._rawHeader).toString(); - try { - this.header = JSON.parse(header); - } catch (er) { - this.emit('error', new Error('invalid simple protocol data')); - return; - } - // now, because we got some extra data, unshift the rest - // back into the read queue so that our consumer will see it. - var b = chunk.slice(split); - this.unshift(b); - // calling unshift by itself does not reset the reading state - // of the stream; since we're inside _read, doing an additional - // push('') will reset the state appropriately. - this.push(''); - - // and let them know that we are done parsing the header. - this.emit('header', this.header); - } - } else { - // from there on, just provide the data to our consumer. - // careful not to push(null), since that would indicate EOF. - var chunk = this._source.read(); - if (chunk) this.push(chunk); - } -}; - -// Usage: -// var parser = new SimpleProtocol(source); -// Now parser is a readable stream that will emit 'header' -// with the parsed header data. -``` - -### Class: stream.Transform - -A "transform" stream is a duplex stream where the output is causally -connected in some way to the input, such as a [zlib][] stream or a -[crypto][] stream. - -There is no requirement that the output be the same size as the input, -the same number of chunks, or arrive at the same time. For example, a -Hash stream will only ever have a single chunk of output which is -provided when the input is ended. A zlib stream will produce output -that is either much smaller or much larger than its input. - -Rather than implement the [`stream._read()`][stream-_read] and -[`stream._write()`][stream-_write] methods, Transform classes must implement the -[`stream._transform()`][stream-_transform] method, and may optionally -also implement the [`stream._flush()`][stream-_flush] method. (See below.) - -#### new stream.Transform([options]) - -* `options` {Object} Passed to both Writable and Readable - constructors. Also has the following fields: - * `transform` {Function} Implementation for the - [`stream._transform()`][stream-_transform] method. - * `flush` {Function} Implementation for the [`stream._flush()`][stream-_flush] - method. - -In classes that extend the Transform class, make sure to call the -constructor so that the buffering settings can be properly -initialized. - -#### Events: 'finish' and 'end' - -The [`'finish'`][] and [`'end'`][] events are from the parent Writable -and Readable classes respectively. The `'finish'` event is fired after -[`stream.end()`][stream-end] is called and all chunks have been processed by -[`stream._transform()`][stream-_transform], `'end'` is fired after all data has -been output which is after the callback in [`stream._flush()`][stream-_flush] -has been called. - -#### transform.\_flush(callback) - -* `callback` {Function} Call this function (optionally with an error - argument) when you are done flushing any remaining data. - -Note: **This function MUST NOT be called directly.** It MAY be implemented -by child classes, and if so, will be called by the internal Transform -class methods only. - -In some cases, your transform operation may need to emit a bit more -data at the end of the stream. For example, a `Zlib` compression -stream will store up some internal state so that it can optimally -compress the output. At the end, however, it needs to do the best it -can with what is left, so that the data will be complete. - -In those cases, you can implement a `_flush()` method, which will be -called at the very end, after all the written data is consumed, but -before emitting [`'end'`][] to signal the end of the readable side. Just -like with [`stream._transform()`][stream-_transform], call -`transform.push(chunk)` zero or more times, as appropriate, and call `callback` -when the flush operation is complete. - -This method is prefixed with an underscore because it is internal to -the class that defines it, and should not be called directly by user -programs. However, you **are** expected to override this method in -your own extension classes. - -#### transform.\_transform(chunk, encoding, callback) - -* `chunk` {Buffer|String} The chunk to be transformed. Will **always** - be a buffer unless the `decodeStrings` option was set to `false`. -* `encoding` {String} If the chunk is a string, then this is the - encoding type. If chunk is a buffer, then this is the special - value - 'buffer', ignore it in this case. -* `callback` {Function} Call this function (optionally with an error - argument and data) when you are done processing the supplied chunk. - -Note: **This function MUST NOT be called directly.** It should be -implemented by child classes, and called by the internal Transform -class methods only. - -All Transform stream implementations must provide a `_transform()` -method to accept input and produce output. - -`_transform()` should do whatever has to be done in this specific -Transform class, to handle the bytes being written, and pass them off -to the readable portion of the interface. Do asynchronous I/O, -process things, and so on. - -Call `transform.push(outputChunk)` 0 or more times to generate output -from this input chunk, depending on how much data you want to output -as a result of this chunk. - -Call the callback function only when the current chunk is completely -consumed. Note that there may or may not be output as a result of any -particular input chunk. If you supply a second argument to the callback -it will be passed to the push method. In other words the following are -equivalent: - -```js -transform.prototype._transform = function (data, encoding, callback) { - this.push(data); - callback(); -}; - -transform.prototype._transform = function (data, encoding, callback) { - callback(null, data); -}; -``` - -This method is prefixed with an underscore because it is internal to -the class that defines it, and should not be called directly by user -programs. However, you **are** expected to override this method in -your own extension classes. - -#### Example: `SimpleProtocol` parser v2 - -The example [here](#stream_example_simpleprotocol_v1_sub_optimal) of a simple -protocol parser can be implemented simply by using the higher level -[Transform][] stream class, similar to the `parseHeader` and `SimpleProtocol -v1` examples. - -In this example, rather than providing the input as an argument, it -would be piped into the parser, which is a more idiomatic Node.js stream -approach. - -```javascript -const util = require('util'); -const Transform = require('stream').Transform; -util.inherits(SimpleProtocol, Transform); - -function SimpleProtocol(options) { - if (!(this instanceof SimpleProtocol)) - return new SimpleProtocol(options); - - Transform.call(this, options); - this._inBody = false; - this._sawFirstCr = false; - this._rawHeader = []; - this.header = null; -} - -SimpleProtocol.prototype._transform = function(chunk, encoding, done) { - if (!this._inBody) { - // check if the chunk has a \n\n - var split = -1; - for (var i = 0; i < chunk.length; i++) { - if (chunk[i] === 10) { // '\n' - if (this._sawFirstCr) { - split = i; - break; - } else { - this._sawFirstCr = true; - } - } else { - this._sawFirstCr = false; - } - } - - if (split === -1) { - // still waiting for the \n\n - // stash the chunk, and try again. - this._rawHeader.push(chunk); - } else { - this._inBody = true; - var h = chunk.slice(0, split); - this._rawHeader.push(h); - var header = Buffer.concat(this._rawHeader).toString(); - try { - this.header = JSON.parse(header); - } catch (er) { - this.emit('error', new Error('invalid simple protocol data')); - return; - } - // and let them know that we are done parsing the header. - this.emit('header', this.header); - - // now, because we got some extra data, emit this first. - this.push(chunk.slice(split)); - } - } else { - // from there on, just provide the data to our consumer as-is. - this.push(chunk); - } - done(); -}; - -// Usage: -// var parser = new SimpleProtocol(); -// source.pipe(parser) -// Now parser is a readable stream that will emit 'header' -// with the parsed header data. -``` - -### Class: stream.Writable - - - -`stream.Writable` is an abstract class designed to be extended with an -underlying implementation of the -[`stream._write(chunk, encoding, callback)`][stream-_write] method. - -Please see [API for Stream Consumers][] for how to consume -writable streams in your programs. What follows is an explanation of -how to implement Writable streams in your programs. - -#### new stream.Writable([options]) - -* `options` {Object} - * `highWaterMark` {Number} Buffer level when - [`stream.write()`][stream-write] starts returning `false`. Default = `16384` - (16kb), or `16` for `objectMode` streams. - * `decodeStrings` {Boolean} Whether or not to decode strings into - Buffers before passing them to [`stream._write()`][stream-_write]. - Default = `true` - * `objectMode` {Boolean} Whether or not the - [`stream.write(anyObj)`][stream-write] is a valid operation. If set you can - write arbitrary data instead of only `Buffer` / `String` data. - Default = `false` - * `write` {Function} Implementation for the - [`stream._write()`][stream-_write] method. - * `writev` {Function} Implementation for the - [`stream._writev()`][stream-_writev] method. - -In classes that extend the Writable class, make sure to call the -constructor so that the buffering settings can be properly -initialized. - -#### writable.\_write(chunk, encoding, callback) - -* `chunk` {Buffer|String} The chunk to be written. Will **always** - be a buffer unless the `decodeStrings` option was set to `false`. -* `encoding` {String} If the chunk is a string, then this is the - encoding type. If chunk is a buffer, then this is the special - value - 'buffer', ignore it in this case. -* `callback` {Function} Call this function (optionally with an error - argument) when you are done processing the supplied chunk. - -All Writable stream implementations must provide a -[`stream._write()`][stream-_write] method to send data to the underlying -resource. - -Note: **This function MUST NOT be called directly.** It should be -implemented by child classes, and called by the internal Writable -class methods only. - -Call the callback using the standard `callback(error)` pattern to -signal that the write completed successfully or with an error. - -If the `decodeStrings` flag is set in the constructor options, then -`chunk` may be a string rather than a Buffer, and `encoding` will -indicate the sort of string that it is. This is to support -implementations that have an optimized handling for certain string -data encodings. If you do not explicitly set the `decodeStrings` -option to `false`, then you can safely ignore the `encoding` argument, -and assume that `chunk` will always be a Buffer. - -This method is prefixed with an underscore because it is internal to -the class that defines it, and should not be called directly by user -programs. However, you **are** expected to override this method in -your own extension classes. - -#### writable.\_writev(chunks, callback) - -* `chunks` {Array} The chunks to be written. Each chunk has following - format: `{ chunk: ..., encoding: ... }`. -* `callback` {Function} Call this function (optionally with an error - argument) when you are done processing the supplied chunks. - -Note: **This function MUST NOT be called directly.** It may be -implemented by child classes, and called by the internal Writable -class methods only. - -This function is completely optional to implement. In most cases it is -unnecessary. If implemented, it will be called with all the chunks -that are buffered in the write queue. - - -## Simplified Constructor API - - - -In simple cases there is now the added benefit of being able to construct a -stream without inheritance. - -This can be done by passing the appropriate methods as constructor options: - -Examples: - -### Duplex - -```js -var duplex = new stream.Duplex({ - read: function(n) { - // sets this._read under the hood - - // push data onto the read queue, passing null - // will signal the end of the stream (EOF) - this.push(chunk); - }, - write: function(chunk, encoding, next) { - // sets this._write under the hood - - // An optional error can be passed as the first argument - next() - } -}); - -// or - -var duplex = new stream.Duplex({ - read: function(n) { - // sets this._read under the hood - - // push data onto the read queue, passing null - // will signal the end of the stream (EOF) - this.push(chunk); - }, - writev: function(chunks, next) { - // sets this._writev under the hood - - // An optional error can be passed as the first argument - next() - } -}); -``` - -### Readable - -```js -var readable = new stream.Readable({ - read: function(n) { - // sets this._read under the hood - - // push data onto the read queue, passing null - // will signal the end of the stream (EOF) - this.push(chunk); - } -}); -``` - -### Transform - -```js -var transform = new stream.Transform({ - transform: function(chunk, encoding, next) { - // sets this._transform under the hood - - // generate output as many times as needed - // this.push(chunk); - - // call when the current chunk is consumed - next(); - }, - flush: function(done) { - // sets this._flush under the hood - - // generate output as many times as needed - // this.push(chunk); - - done(); - } -}); -``` - -### Writable - -```js -var writable = new stream.Writable({ - write: function(chunk, encoding, next) { - // sets this._write under the hood - - // An optional error can be passed as the first argument - next() - } -}); - -// or - -var writable = new stream.Writable({ - writev: function(chunks, next) { - // sets this._writev under the hood - - // An optional error can be passed as the first argument - next() - } -}); -``` - -## Streams: Under the Hood - - - -### Buffering - - - -Both Writable and Readable streams will buffer data on an internal -object which can be retrieved from `_writableState.getBuffer()` or -`_readableState.buffer`, respectively. - -The amount of data that will potentially be buffered depends on the -`highWaterMark` option which is passed into the constructor. - -Buffering in Readable streams happens when the implementation calls -[`stream.push(chunk)`][stream-push]. If the consumer of the Stream does not -call [`stream.read()`][stream-read], then the data will sit in the internal -queue until it is consumed. - -Buffering in Writable streams happens when the user calls -[`stream.write(chunk)`][stream-write] repeatedly, even when it returns `false`. - -The purpose of streams, especially with the [`stream.pipe()`][] method, is to -limit the buffering of data to acceptable levels, so that sources and -destinations of varying speed will not overwhelm the available memory. - -### Compatibility with Older Node.js Versions - - - -In versions of Node.js prior to v0.10, the Readable stream interface was -simpler, but also less powerful and less useful. - -* Rather than waiting for you to call the [`stream.read()`][stream-read] method, - [`'data'`][] events would start emitting immediately. If you needed to do - some I/O to decide how to handle data, then you had to store the chunks - in some kind of buffer so that they would not be lost. -* The [`stream.pause()`][stream-pause] method was advisory, rather than - guaranteed. This meant that you still had to be prepared to receive - [`'data'`][] events even when the stream was in a paused state. - -In Node.js v0.10, the [Readable][] class was added. -For backwards compatibility with older Node.js programs, Readable streams -switch into "flowing mode" when a [`'data'`][] event handler is added, or -when the [`stream.resume()`][stream-resume] method is called. The effect is -that, even if you are not using the new [`stream.read()`][stream-read] method -and [`'readable'`][] event, you no longer have to worry about losing -[`'data'`][] chunks. - -Most programs will continue to function normally. However, this -introduces an edge case in the following conditions: - -* No [`'data'`][] event handler is added. -* The [`stream.resume()`][stream-resume] method is never called. -* The stream is not piped to any writable destination. - -For example, consider the following code: - -```js -// WARNING! BROKEN! -net.createServer((socket) => { - - // we add an 'end' method, but never consume the data - socket.on('end', () => { - // It will never get here. - socket.end('I got your message (but didnt read it)\n'); - }); - -}).listen(1337); -``` - -In versions of Node.js prior to v0.10, the incoming message data would be -simply discarded. However, in Node.js v0.10 and beyond, -the socket will remain paused forever. - -The workaround in this situation is to call the -[`stream.resume()`][stream-resume] method to start the flow of data: - -```js -// Workaround -net.createServer((socket) => { - - socket.on('end', () => { - socket.end('I got your message (but didnt read it)\n'); - }); - - // start the flow of data, discarding it. - socket.resume(); - -}).listen(1337); -``` - -In addition to new Readable streams switching into flowing mode, -pre-v0.10 style streams can be wrapped in a Readable class using the -[`stream.wrap()`][] method. - - -### Object Mode - - - -Normally, Streams operate on Strings and Buffers exclusively. - -Streams that are in **object mode** can emit generic JavaScript values -other than Buffers and Strings. - -A Readable stream in object mode will always return a single item from -a call to [`stream.read(size)`][stream-read], regardless of what the size -argument is. - -A Writable stream in object mode will always ignore the `encoding` -argument to [`stream.write(data, encoding)`][stream-write]. - -The special value `null` still retains its special value for object -mode streams. That is, for object mode readable streams, `null` as a -return value from [`stream.read()`][stream-read] indicates that there is no more -data, and [`stream.push(null)`][stream-push] will signal the end of stream data -(`EOF`). - -No streams in Node.js core are object mode streams. This pattern is only -used by userland streaming libraries. - -You should set `objectMode` in your stream child class constructor on -the options object. Setting `objectMode` mid-stream is not safe. - -For Duplex streams `objectMode` can be set exclusively for readable or -writable side with `readableObjectMode` and `writableObjectMode` -respectively. These options can be used to implement parsers and -serializers with Transform streams. - -```js -const util = require('util'); -const StringDecoder = require('string_decoder').StringDecoder; -const Transform = require('stream').Transform; -util.inherits(JSONParseStream, Transform); - -// Gets \n-delimited JSON string data, and emits the parsed objects -function JSONParseStream() { - if (!(this instanceof JSONParseStream)) - return new JSONParseStream(); - - Transform.call(this, { readableObjectMode : true }); - - this._buffer = ''; - this._decoder = new StringDecoder('utf8'); -} - -JSONParseStream.prototype._transform = function(chunk, encoding, cb) { - this._buffer += this._decoder.write(chunk); - // split on newlines - var lines = this._buffer.split(/\r?\n/); - // keep the last partial line buffered - this._buffer = lines.pop(); - for (var l = 0; l < lines.length; l++) { - var line = lines[l]; - try { - var obj = JSON.parse(line); - } catch (er) { - this.emit('error', er); - return; - } - // push the parsed object out to the readable consumer - this.push(obj); - } - cb(); -}; - -JSONParseStream.prototype._flush = function(cb) { - // Just handle any leftover - var rem = this._buffer.trim(); - if (rem) { - try { - var obj = JSON.parse(rem); - } catch (er) { - this.emit('error', er); - return; - } - // push the parsed object out to the readable consumer - this.push(obj); - } - cb(); -}; -``` - -### `stream.read(0)` - -There are some cases where you want to trigger a refresh of the -underlying readable stream mechanisms, without actually consuming any -data. In that case, you can call `stream.read(0)`, which will always -return null. - -If the internal read buffer is below the `highWaterMark`, and the -stream is not currently reading, then calling `stream.read(0)` will trigger -a low-level [`stream._read()`][stream-_read] call. - -There is almost never a need to do this. However, you will see some -cases in Node.js's internals where this is done, particularly in the -Readable stream class internals. - -### `stream.push('')` - -Pushing a zero-byte string or Buffer (when not in [Object mode][]) has an -interesting side effect. Because it *is* a call to -[`stream.push()`][stream-push], it will end the `reading` process. However, it -does *not* add any data to the readable buffer, so there's nothing for -a user to consume. - -Very rarely, there are cases where you have no data to provide now, -but the consumer of your stream (or, perhaps, another bit of your own -code) will know when to check again, by calling [`stream.read(0)`][stream-read]. -In those cases, you *may* call `stream.push('')`. - -So far, the only use case for this functionality is in the -[`tls.CryptoStream`][] class, which is deprecated in Node.js/io.js v1.0. If you -find that you have to use `stream.push('')`, please consider another -approach, because it almost certainly indicates that something is -horribly wrong. - -[`'data'`]: #stream_event_data -[`'drain'`]: #stream_event_drain -[`'end'`]: #stream_event_end -[`'finish'`]: #stream_event_finish -[`'readable'`]: #stream_event_readable -[`buf.toString(encoding)`]: https://nodejs.org/docs/v5.8.0/api/buffer.html#buffer_buf_tostring_encoding_start_end -[`EventEmitter`]: https://nodejs.org/docs/v5.8.0/api/events.html#events_class_eventemitter -[`process.stderr`]: https://nodejs.org/docs/v5.8.0/api/process.html#process_process_stderr -[`process.stdin`]: https://nodejs.org/docs/v5.8.0/api/process.html#process_process_stdin -[`process.stdout`]: https://nodejs.org/docs/v5.8.0/api/process.html#process_process_stdout -[`stream.cork()`]: #stream_writable_cork -[`stream.pipe()`]: #stream_readable_pipe_destination_options -[`stream.uncork()`]: #stream_writable_uncork -[`stream.unpipe()`]: #stream_readable_unpipe_destination -[`stream.wrap()`]: #stream_readable_wrap_stream -[`tls.CryptoStream`]: https://nodejs.org/docs/v5.8.0/api/tls.html#tls_class_cryptostream -[`util.inherits()`]: https://nodejs.org/docs/v5.8.0/api/util.html#util_util_inherits_constructor_superconstructor -[API for Stream Consumers]: #stream_api_for_stream_consumers -[API for Stream Implementors]: #stream_api_for_stream_implementors -[child process stdin]: https://nodejs.org/docs/v5.8.0/api/child_process.html#child_process_child_stdin -[child process stdout and stderr]: https://nodejs.org/docs/v5.8.0/api/child_process.html#child_process_child_stdout -[Compatibility]: #stream_compatibility_with_older_node_js_versions -[crypto]: crypto.html -[Duplex]: #stream_class_stream_duplex -[fs read streams]: https://nodejs.org/docs/v5.8.0/api/fs.html#fs_class_fs_readstream -[fs write streams]: https://nodejs.org/docs/v5.8.0/api/fs.html#fs_class_fs_writestream -[HTTP requests, on the client]: https://nodejs.org/docs/v5.8.0/api/http.html#http_class_http_clientrequest -[HTTP responses, on the server]: https://nodejs.org/docs/v5.8.0/api/http.html#http_class_http_serverresponse -[http-incoming-message]: https://nodejs.org/docs/v5.8.0/api/http.html#http_class_http_incomingmessage -[Object mode]: #stream_object_mode -[Readable]: #stream_class_stream_readable -[SimpleProtocol v2]: #stream_example_simpleprotocol_parser_v2 -[stream-_flush]: #stream_transform_flush_callback -[stream-_read]: #stream_readable_read_size_1 -[stream-_transform]: #stream_transform_transform_chunk_encoding_callback -[stream-_write]: #stream_writable_write_chunk_encoding_callback_1 -[stream-_writev]: #stream_writable_writev_chunks_callback -[stream-end]: #stream_writable_end_chunk_encoding_callback -[stream-pause]: #stream_readable_pause -[stream-push]: #stream_readable_push_chunk_encoding -[stream-read]: #stream_readable_read_size -[stream-resume]: #stream_readable_resume -[stream-write]: #stream_writable_write_chunk_encoding_callback -[TCP sockets]: https://nodejs.org/docs/v5.8.0/api/net.html#net_class_net_socket -[Transform]: #stream_class_stream_transform -[Writable]: #stream_class_stream_writable -[zlib]: zlib.html diff --git a/node_modules/browserify-cache-api/node_modules/readable-stream/doc/wg-meetings/2015-01-30.md b/node_modules/browserify-cache-api/node_modules/readable-stream/doc/wg-meetings/2015-01-30.md deleted file mode 100644 index 83275f19..00000000 --- a/node_modules/browserify-cache-api/node_modules/readable-stream/doc/wg-meetings/2015-01-30.md +++ /dev/null @@ -1,60 +0,0 @@ -# streams WG Meeting 2015-01-30 - -## Links - -* **Google Hangouts Video**: http://www.youtube.com/watch?v=I9nDOSGfwZg -* **GitHub Issue**: https://github.com/iojs/readable-stream/issues/106 -* **Original Minutes Google Doc**: https://docs.google.com/document/d/17aTgLnjMXIrfjgNaTUnHQO7m3xgzHR2VXBTmi03Qii4/ - -## Agenda - -Extracted from https://github.com/iojs/readable-stream/labels/wg-agenda prior to meeting. - -* adopt a charter [#105](https://github.com/iojs/readable-stream/issues/105) -* release and versioning strategy [#101](https://github.com/iojs/readable-stream/issues/101) -* simpler stream creation [#102](https://github.com/iojs/readable-stream/issues/102) -* proposal: deprecate implicit flowing of streams [#99](https://github.com/iojs/readable-stream/issues/99) - -## Minutes - -### adopt a charter - -* group: +1's all around - -### What versioning scheme should be adopted? -* group: +1’s 3.0.0 -* domenic+group: pulling in patches from other sources where appropriate -* mikeal: version independently, suggesting versions for io.js -* mikeal+domenic: work with TC to notify in advance of changes -simpler stream creation - -### streamline creation of streams -* sam: streamline creation of streams -* domenic: nice simple solution posted - but, we lose the opportunity to change the model - may not be backwards incompatible (double check keys) - - **action item:** domenic will check - -### remove implicit flowing of streams on(‘data’) -* add isFlowing / isPaused -* mikeal: worrying that we’re documenting polyfill methods – confuses users -* domenic: more reflective API is probably good, with warning labels for users -* new section for mad scientists (reflective stream access) -* calvin: name the “third state” -* mikeal: maybe borrow the name from whatwg? -* domenic: we’re missing the “third state” -* consensus: kind of difficult to name the third state -* mikeal: figure out differences in states / compat -* mathias: always flow on data – eliminates third state - * explore what it breaks - -**action items:** -* ask isaac for ability to list packages by what public io.js APIs they use (esp. Stream) -* ask rod/build for infrastructure -* **chris**: explore the “flow on data” approach -* add isPaused/isFlowing -* add new docs section -* move isPaused to that section - - diff --git a/node_modules/browserify-cache-api/node_modules/readable-stream/duplex.js b/node_modules/browserify-cache-api/node_modules/readable-stream/duplex.js deleted file mode 100644 index ca807af8..00000000 --- a/node_modules/browserify-cache-api/node_modules/readable-stream/duplex.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require("./lib/_stream_duplex.js") diff --git a/node_modules/browserify-cache-api/node_modules/readable-stream/lib/_stream_duplex.js b/node_modules/browserify-cache-api/node_modules/readable-stream/lib/_stream_duplex.js deleted file mode 100644 index 736693b8..00000000 --- a/node_modules/browserify-cache-api/node_modules/readable-stream/lib/_stream_duplex.js +++ /dev/null @@ -1,75 +0,0 @@ -// a duplex stream is just a stream that is both readable and writable. -// Since JS doesn't have multiple prototypal inheritance, this class -// prototypally inherits from Readable, and then parasitically from -// Writable. - -'use strict'; - -/**/ - -var objectKeys = Object.keys || function (obj) { - var keys = []; - for (var key in obj) { - keys.push(key); - }return keys; -}; -/**/ - -module.exports = Duplex; - -/**/ -var processNextTick = require('process-nextick-args'); -/**/ - -/**/ -var util = require('core-util-is'); -util.inherits = require('inherits'); -/**/ - -var Readable = require('./_stream_readable'); -var Writable = require('./_stream_writable'); - -util.inherits(Duplex, Readable); - -var keys = objectKeys(Writable.prototype); -for (var v = 0; v < keys.length; v++) { - var method = keys[v]; - if (!Duplex.prototype[method]) Duplex.prototype[method] = Writable.prototype[method]; -} - -function Duplex(options) { - if (!(this instanceof Duplex)) return new Duplex(options); - - Readable.call(this, options); - Writable.call(this, options); - - if (options && options.readable === false) this.readable = false; - - if (options && options.writable === false) this.writable = false; - - this.allowHalfOpen = true; - if (options && options.allowHalfOpen === false) this.allowHalfOpen = false; - - this.once('end', onend); -} - -// the no-half-open enforcer -function onend() { - // if we allow half-open state, or if the writable side ended, - // then we're ok. - if (this.allowHalfOpen || this._writableState.ended) return; - - // no more data can be written. - // But allow more writes to happen in this tick. - processNextTick(onEndNT, this); -} - -function onEndNT(self) { - self.end(); -} - -function forEach(xs, f) { - for (var i = 0, l = xs.length; i < l; i++) { - f(xs[i], i); - } -} \ No newline at end of file diff --git a/node_modules/browserify-cache-api/node_modules/readable-stream/lib/_stream_passthrough.js b/node_modules/browserify-cache-api/node_modules/readable-stream/lib/_stream_passthrough.js deleted file mode 100644 index d06f71f1..00000000 --- a/node_modules/browserify-cache-api/node_modules/readable-stream/lib/_stream_passthrough.js +++ /dev/null @@ -1,26 +0,0 @@ -// a passthrough stream. -// basically just the most minimal sort of Transform stream. -// Every written chunk gets output as-is. - -'use strict'; - -module.exports = PassThrough; - -var Transform = require('./_stream_transform'); - -/**/ -var util = require('core-util-is'); -util.inherits = require('inherits'); -/**/ - -util.inherits(PassThrough, Transform); - -function PassThrough(options) { - if (!(this instanceof PassThrough)) return new PassThrough(options); - - Transform.call(this, options); -} - -PassThrough.prototype._transform = function (chunk, encoding, cb) { - cb(null, chunk); -}; \ No newline at end of file diff --git a/node_modules/browserify-cache-api/node_modules/readable-stream/lib/_stream_readable.js b/node_modules/browserify-cache-api/node_modules/readable-stream/lib/_stream_readable.js deleted file mode 100644 index 54a9d5c5..00000000 --- a/node_modules/browserify-cache-api/node_modules/readable-stream/lib/_stream_readable.js +++ /dev/null @@ -1,880 +0,0 @@ -'use strict'; - -module.exports = Readable; - -/**/ -var processNextTick = require('process-nextick-args'); -/**/ - -/**/ -var isArray = require('isarray'); -/**/ - -/**/ -var Buffer = require('buffer').Buffer; -/**/ - -Readable.ReadableState = ReadableState; - -var EE = require('events'); - -/**/ -var EElistenerCount = function (emitter, type) { - return emitter.listeners(type).length; -}; -/**/ - -/**/ -var Stream; -(function () { - try { - Stream = require('st' + 'ream'); - } catch (_) {} finally { - if (!Stream) Stream = require('events').EventEmitter; - } -})(); -/**/ - -var Buffer = require('buffer').Buffer; - -/**/ -var util = require('core-util-is'); -util.inherits = require('inherits'); -/**/ - -/**/ -var debugUtil = require('util'); -var debug = undefined; -if (debugUtil && debugUtil.debuglog) { - debug = debugUtil.debuglog('stream'); -} else { - debug = function () {}; -} -/**/ - -var StringDecoder; - -util.inherits(Readable, Stream); - -var Duplex; -function ReadableState(options, stream) { - Duplex = Duplex || require('./_stream_duplex'); - - options = options || {}; - - // object stream flag. Used to make read(n) ignore n and to - // make all the buffer merging and length checks go away - this.objectMode = !!options.objectMode; - - if (stream instanceof Duplex) this.objectMode = this.objectMode || !!options.readableObjectMode; - - // the point at which it stops calling _read() to fill the buffer - // Note: 0 is a valid value, means "don't call _read preemptively ever" - var hwm = options.highWaterMark; - var defaultHwm = this.objectMode ? 16 : 16 * 1024; - this.highWaterMark = hwm || hwm === 0 ? hwm : defaultHwm; - - // cast to ints. - this.highWaterMark = ~ ~this.highWaterMark; - - this.buffer = []; - this.length = 0; - this.pipes = null; - this.pipesCount = 0; - this.flowing = null; - this.ended = false; - this.endEmitted = false; - this.reading = false; - - // a flag to be able to tell if the onwrite cb is called immediately, - // or on a later tick. We set this to true at first, because any - // actions that shouldn't happen until "later" should generally also - // not happen before the first write call. - this.sync = true; - - // whenever we return null, then we set a flag to say - // that we're awaiting a 'readable' event emission. - this.needReadable = false; - this.emittedReadable = false; - this.readableListening = false; - this.resumeScheduled = false; - - // Crypto is kind of old and crusty. Historically, its default string - // encoding is 'binary' so we have to make this configurable. - // Everything else in the universe uses 'utf8', though. - this.defaultEncoding = options.defaultEncoding || 'utf8'; - - // when piping, we only care about 'readable' events that happen - // after read()ing all the bytes and not getting any pushback. - this.ranOut = false; - - // the number of writers that are awaiting a drain event in .pipe()s - this.awaitDrain = 0; - - // if true, a maybeReadMore has been scheduled - this.readingMore = false; - - this.decoder = null; - this.encoding = null; - if (options.encoding) { - if (!StringDecoder) StringDecoder = require('string_decoder/').StringDecoder; - this.decoder = new StringDecoder(options.encoding); - this.encoding = options.encoding; - } -} - -var Duplex; -function Readable(options) { - Duplex = Duplex || require('./_stream_duplex'); - - if (!(this instanceof Readable)) return new Readable(options); - - this._readableState = new ReadableState(options, this); - - // legacy - this.readable = true; - - if (options && typeof options.read === 'function') this._read = options.read; - - Stream.call(this); -} - -// Manually shove something into the read() buffer. -// This returns true if the highWaterMark has not been hit yet, -// similar to how Writable.write() returns true if you should -// write() some more. -Readable.prototype.push = function (chunk, encoding) { - var state = this._readableState; - - if (!state.objectMode && typeof chunk === 'string') { - encoding = encoding || state.defaultEncoding; - if (encoding !== state.encoding) { - chunk = new Buffer(chunk, encoding); - encoding = ''; - } - } - - return readableAddChunk(this, state, chunk, encoding, false); -}; - -// Unshift should *always* be something directly out of read() -Readable.prototype.unshift = function (chunk) { - var state = this._readableState; - return readableAddChunk(this, state, chunk, '', true); -}; - -Readable.prototype.isPaused = function () { - return this._readableState.flowing === false; -}; - -function readableAddChunk(stream, state, chunk, encoding, addToFront) { - var er = chunkInvalid(state, chunk); - if (er) { - stream.emit('error', er); - } else if (chunk === null) { - state.reading = false; - onEofChunk(stream, state); - } else if (state.objectMode || chunk && chunk.length > 0) { - if (state.ended && !addToFront) { - var e = new Error('stream.push() after EOF'); - stream.emit('error', e); - } else if (state.endEmitted && addToFront) { - var e = new Error('stream.unshift() after end event'); - stream.emit('error', e); - } else { - var skipAdd; - if (state.decoder && !addToFront && !encoding) { - chunk = state.decoder.write(chunk); - skipAdd = !state.objectMode && chunk.length === 0; - } - - if (!addToFront) state.reading = false; - - // Don't add to the buffer if we've decoded to an empty string chunk and - // we're not in object mode - if (!skipAdd) { - // if we want the data now, just emit it. - if (state.flowing && state.length === 0 && !state.sync) { - stream.emit('data', chunk); - stream.read(0); - } else { - // update the buffer info. - state.length += state.objectMode ? 1 : chunk.length; - if (addToFront) state.buffer.unshift(chunk);else state.buffer.push(chunk); - - if (state.needReadable) emitReadable(stream); - } - } - - maybeReadMore(stream, state); - } - } else if (!addToFront) { - state.reading = false; - } - - return needMoreData(state); -} - -// if it's past the high water mark, we can push in some more. -// Also, if we have no data yet, we can stand some -// more bytes. This is to work around cases where hwm=0, -// such as the repl. Also, if the push() triggered a -// readable event, and the user called read(largeNumber) such that -// needReadable was set, then we ought to push more, so that another -// 'readable' event will be triggered. -function needMoreData(state) { - return !state.ended && (state.needReadable || state.length < state.highWaterMark || state.length === 0); -} - -// backwards compatibility. -Readable.prototype.setEncoding = function (enc) { - if (!StringDecoder) StringDecoder = require('string_decoder/').StringDecoder; - this._readableState.decoder = new StringDecoder(enc); - this._readableState.encoding = enc; - return this; -}; - -// Don't raise the hwm > 8MB -var MAX_HWM = 0x800000; -function computeNewHighWaterMark(n) { - if (n >= MAX_HWM) { - n = MAX_HWM; - } else { - // Get the next highest power of 2 - n--; - n |= n >>> 1; - n |= n >>> 2; - n |= n >>> 4; - n |= n >>> 8; - n |= n >>> 16; - n++; - } - return n; -} - -function howMuchToRead(n, state) { - if (state.length === 0 && state.ended) return 0; - - if (state.objectMode) return n === 0 ? 0 : 1; - - if (n === null || isNaN(n)) { - // only flow one buffer at a time - if (state.flowing && state.buffer.length) return state.buffer[0].length;else return state.length; - } - - if (n <= 0) return 0; - - // If we're asking for more than the target buffer level, - // then raise the water mark. Bump up to the next highest - // power of 2, to prevent increasing it excessively in tiny - // amounts. - if (n > state.highWaterMark) state.highWaterMark = computeNewHighWaterMark(n); - - // don't have that much. return null, unless we've ended. - if (n > state.length) { - if (!state.ended) { - state.needReadable = true; - return 0; - } else { - return state.length; - } - } - - return n; -} - -// you can override either this method, or the async _read(n) below. -Readable.prototype.read = function (n) { - debug('read', n); - var state = this._readableState; - var nOrig = n; - - if (typeof n !== 'number' || n > 0) state.emittedReadable = false; - - // if we're doing read(0) to trigger a readable event, but we - // already have a bunch of data in the buffer, then just trigger - // the 'readable' event and move on. - if (n === 0 && state.needReadable && (state.length >= state.highWaterMark || state.ended)) { - debug('read: emitReadable', state.length, state.ended); - if (state.length === 0 && state.ended) endReadable(this);else emitReadable(this); - return null; - } - - n = howMuchToRead(n, state); - - // if we've ended, and we're now clear, then finish it up. - if (n === 0 && state.ended) { - if (state.length === 0) endReadable(this); - return null; - } - - // All the actual chunk generation logic needs to be - // *below* the call to _read. The reason is that in certain - // synthetic stream cases, such as passthrough streams, _read - // may be a completely synchronous operation which may change - // the state of the read buffer, providing enough data when - // before there was *not* enough. - // - // So, the steps are: - // 1. Figure out what the state of things will be after we do - // a read from the buffer. - // - // 2. If that resulting state will trigger a _read, then call _read. - // Note that this may be asynchronous, or synchronous. Yes, it is - // deeply ugly to write APIs this way, but that still doesn't mean - // that the Readable class should behave improperly, as streams are - // designed to be sync/async agnostic. - // Take note if the _read call is sync or async (ie, if the read call - // has returned yet), so that we know whether or not it's safe to emit - // 'readable' etc. - // - // 3. Actually pull the requested chunks out of the buffer and return. - - // if we need a readable event, then we need to do some reading. - var doRead = state.needReadable; - debug('need readable', doRead); - - // if we currently have less than the highWaterMark, then also read some - if (state.length === 0 || state.length - n < state.highWaterMark) { - doRead = true; - debug('length less than watermark', doRead); - } - - // however, if we've ended, then there's no point, and if we're already - // reading, then it's unnecessary. - if (state.ended || state.reading) { - doRead = false; - debug('reading or ended', doRead); - } - - if (doRead) { - debug('do read'); - state.reading = true; - state.sync = true; - // if the length is currently zero, then we *need* a readable event. - if (state.length === 0) state.needReadable = true; - // call internal read method - this._read(state.highWaterMark); - state.sync = false; - } - - // If _read pushed data synchronously, then `reading` will be false, - // and we need to re-evaluate how much data we can return to the user. - if (doRead && !state.reading) n = howMuchToRead(nOrig, state); - - var ret; - if (n > 0) ret = fromList(n, state);else ret = null; - - if (ret === null) { - state.needReadable = true; - n = 0; - } - - state.length -= n; - - // If we have nothing in the buffer, then we want to know - // as soon as we *do* get something into the buffer. - if (state.length === 0 && !state.ended) state.needReadable = true; - - // If we tried to read() past the EOF, then emit end on the next tick. - if (nOrig !== n && state.ended && state.length === 0) endReadable(this); - - if (ret !== null) this.emit('data', ret); - - return ret; -}; - -function chunkInvalid(state, chunk) { - var er = null; - if (!Buffer.isBuffer(chunk) && typeof chunk !== 'string' && chunk !== null && chunk !== undefined && !state.objectMode) { - er = new TypeError('Invalid non-string/buffer chunk'); - } - return er; -} - -function onEofChunk(stream, state) { - if (state.ended) return; - if (state.decoder) { - var chunk = state.decoder.end(); - if (chunk && chunk.length) { - state.buffer.push(chunk); - state.length += state.objectMode ? 1 : chunk.length; - } - } - state.ended = true; - - // emit 'readable' now to make sure it gets picked up. - emitReadable(stream); -} - -// Don't emit readable right away in sync mode, because this can trigger -// another read() call => stack overflow. This way, it might trigger -// a nextTick recursion warning, but that's not so bad. -function emitReadable(stream) { - var state = stream._readableState; - state.needReadable = false; - if (!state.emittedReadable) { - debug('emitReadable', state.flowing); - state.emittedReadable = true; - if (state.sync) processNextTick(emitReadable_, stream);else emitReadable_(stream); - } -} - -function emitReadable_(stream) { - debug('emit readable'); - stream.emit('readable'); - flow(stream); -} - -// at this point, the user has presumably seen the 'readable' event, -// and called read() to consume some data. that may have triggered -// in turn another _read(n) call, in which case reading = true if -// it's in progress. -// However, if we're not ended, or reading, and the length < hwm, -// then go ahead and try to read some more preemptively. -function maybeReadMore(stream, state) { - if (!state.readingMore) { - state.readingMore = true; - processNextTick(maybeReadMore_, stream, state); - } -} - -function maybeReadMore_(stream, state) { - var len = state.length; - while (!state.reading && !state.flowing && !state.ended && state.length < state.highWaterMark) { - debug('maybeReadMore read 0'); - stream.read(0); - if (len === state.length) - // didn't get any data, stop spinning. - break;else len = state.length; - } - state.readingMore = false; -} - -// abstract method. to be overridden in specific implementation classes. -// call cb(er, data) where data is <= n in length. -// for virtual (non-string, non-buffer) streams, "length" is somewhat -// arbitrary, and perhaps not very meaningful. -Readable.prototype._read = function (n) { - this.emit('error', new Error('not implemented')); -}; - -Readable.prototype.pipe = function (dest, pipeOpts) { - var src = this; - var state = this._readableState; - - switch (state.pipesCount) { - case 0: - state.pipes = dest; - break; - case 1: - state.pipes = [state.pipes, dest]; - break; - default: - state.pipes.push(dest); - break; - } - state.pipesCount += 1; - debug('pipe count=%d opts=%j', state.pipesCount, pipeOpts); - - var doEnd = (!pipeOpts || pipeOpts.end !== false) && dest !== process.stdout && dest !== process.stderr; - - var endFn = doEnd ? onend : cleanup; - if (state.endEmitted) processNextTick(endFn);else src.once('end', endFn); - - dest.on('unpipe', onunpipe); - function onunpipe(readable) { - debug('onunpipe'); - if (readable === src) { - cleanup(); - } - } - - function onend() { - debug('onend'); - dest.end(); - } - - // when the dest drains, it reduces the awaitDrain counter - // on the source. This would be more elegant with a .once() - // handler in flow(), but adding and removing repeatedly is - // too slow. - var ondrain = pipeOnDrain(src); - dest.on('drain', ondrain); - - var cleanedUp = false; - function cleanup() { - debug('cleanup'); - // cleanup event handlers once the pipe is broken - dest.removeListener('close', onclose); - dest.removeListener('finish', onfinish); - dest.removeListener('drain', ondrain); - dest.removeListener('error', onerror); - dest.removeListener('unpipe', onunpipe); - src.removeListener('end', onend); - src.removeListener('end', cleanup); - src.removeListener('data', ondata); - - cleanedUp = true; - - // if the reader is waiting for a drain event from this - // specific writer, then it would cause it to never start - // flowing again. - // So, if this is awaiting a drain, then we just call it now. - // If we don't know, then assume that we are waiting for one. - if (state.awaitDrain && (!dest._writableState || dest._writableState.needDrain)) ondrain(); - } - - src.on('data', ondata); - function ondata(chunk) { - debug('ondata'); - var ret = dest.write(chunk); - if (false === ret) { - // If the user unpiped during `dest.write()`, it is possible - // to get stuck in a permanently paused state if that write - // also returned false. - if (state.pipesCount === 1 && state.pipes[0] === dest && src.listenerCount('data') === 1 && !cleanedUp) { - debug('false write response, pause', src._readableState.awaitDrain); - src._readableState.awaitDrain++; - } - src.pause(); - } - } - - // if the dest has an error, then stop piping into it. - // however, don't suppress the throwing behavior for this. - function onerror(er) { - debug('onerror', er); - unpipe(); - dest.removeListener('error', onerror); - if (EElistenerCount(dest, 'error') === 0) dest.emit('error', er); - } - // This is a brutally ugly hack to make sure that our error handler - // is attached before any userland ones. NEVER DO THIS. - if (!dest._events || !dest._events.error) dest.on('error', onerror);else if (isArray(dest._events.error)) dest._events.error.unshift(onerror);else dest._events.error = [onerror, dest._events.error]; - - // Both close and finish should trigger unpipe, but only once. - function onclose() { - dest.removeListener('finish', onfinish); - unpipe(); - } - dest.once('close', onclose); - function onfinish() { - debug('onfinish'); - dest.removeListener('close', onclose); - unpipe(); - } - dest.once('finish', onfinish); - - function unpipe() { - debug('unpipe'); - src.unpipe(dest); - } - - // tell the dest that it's being piped to - dest.emit('pipe', src); - - // start the flow if it hasn't been started already. - if (!state.flowing) { - debug('pipe resume'); - src.resume(); - } - - return dest; -}; - -function pipeOnDrain(src) { - return function () { - var state = src._readableState; - debug('pipeOnDrain', state.awaitDrain); - if (state.awaitDrain) state.awaitDrain--; - if (state.awaitDrain === 0 && EElistenerCount(src, 'data')) { - state.flowing = true; - flow(src); - } - }; -} - -Readable.prototype.unpipe = function (dest) { - var state = this._readableState; - - // if we're not piping anywhere, then do nothing. - if (state.pipesCount === 0) return this; - - // just one destination. most common case. - if (state.pipesCount === 1) { - // passed in one, but it's not the right one. - if (dest && dest !== state.pipes) return this; - - if (!dest) dest = state.pipes; - - // got a match. - state.pipes = null; - state.pipesCount = 0; - state.flowing = false; - if (dest) dest.emit('unpipe', this); - return this; - } - - // slow case. multiple pipe destinations. - - if (!dest) { - // remove all. - var dests = state.pipes; - var len = state.pipesCount; - state.pipes = null; - state.pipesCount = 0; - state.flowing = false; - - for (var _i = 0; _i < len; _i++) { - dests[_i].emit('unpipe', this); - }return this; - } - - // try to find the right one. - var i = indexOf(state.pipes, dest); - if (i === -1) return this; - - state.pipes.splice(i, 1); - state.pipesCount -= 1; - if (state.pipesCount === 1) state.pipes = state.pipes[0]; - - dest.emit('unpipe', this); - - return this; -}; - -// set up data events if they are asked for -// Ensure readable listeners eventually get something -Readable.prototype.on = function (ev, fn) { - var res = Stream.prototype.on.call(this, ev, fn); - - // If listening to data, and it has not explicitly been paused, - // then call resume to start the flow of data on the next tick. - if (ev === 'data' && false !== this._readableState.flowing) { - this.resume(); - } - - if (ev === 'readable' && !this._readableState.endEmitted) { - var state = this._readableState; - if (!state.readableListening) { - state.readableListening = true; - state.emittedReadable = false; - state.needReadable = true; - if (!state.reading) { - processNextTick(nReadingNextTick, this); - } else if (state.length) { - emitReadable(this, state); - } - } - } - - return res; -}; -Readable.prototype.addListener = Readable.prototype.on; - -function nReadingNextTick(self) { - debug('readable nexttick read 0'); - self.read(0); -} - -// pause() and resume() are remnants of the legacy readable stream API -// If the user uses them, then switch into old mode. -Readable.prototype.resume = function () { - var state = this._readableState; - if (!state.flowing) { - debug('resume'); - state.flowing = true; - resume(this, state); - } - return this; -}; - -function resume(stream, state) { - if (!state.resumeScheduled) { - state.resumeScheduled = true; - processNextTick(resume_, stream, state); - } -} - -function resume_(stream, state) { - if (!state.reading) { - debug('resume read 0'); - stream.read(0); - } - - state.resumeScheduled = false; - stream.emit('resume'); - flow(stream); - if (state.flowing && !state.reading) stream.read(0); -} - -Readable.prototype.pause = function () { - debug('call pause flowing=%j', this._readableState.flowing); - if (false !== this._readableState.flowing) { - debug('pause'); - this._readableState.flowing = false; - this.emit('pause'); - } - return this; -}; - -function flow(stream) { - var state = stream._readableState; - debug('flow', state.flowing); - if (state.flowing) { - do { - var chunk = stream.read(); - } while (null !== chunk && state.flowing); - } -} - -// wrap an old-style stream as the async data source. -// This is *not* part of the readable stream interface. -// It is an ugly unfortunate mess of history. -Readable.prototype.wrap = function (stream) { - var state = this._readableState; - var paused = false; - - var self = this; - stream.on('end', function () { - debug('wrapped end'); - if (state.decoder && !state.ended) { - var chunk = state.decoder.end(); - if (chunk && chunk.length) self.push(chunk); - } - - self.push(null); - }); - - stream.on('data', function (chunk) { - debug('wrapped data'); - if (state.decoder) chunk = state.decoder.write(chunk); - - // don't skip over falsy values in objectMode - if (state.objectMode && (chunk === null || chunk === undefined)) return;else if (!state.objectMode && (!chunk || !chunk.length)) return; - - var ret = self.push(chunk); - if (!ret) { - paused = true; - stream.pause(); - } - }); - - // proxy all the other methods. - // important when wrapping filters and duplexes. - for (var i in stream) { - if (this[i] === undefined && typeof stream[i] === 'function') { - this[i] = function (method) { - return function () { - return stream[method].apply(stream, arguments); - }; - }(i); - } - } - - // proxy certain important events. - var events = ['error', 'close', 'destroy', 'pause', 'resume']; - forEach(events, function (ev) { - stream.on(ev, self.emit.bind(self, ev)); - }); - - // when we try to consume some more bytes, simply unpause the - // underlying stream. - self._read = function (n) { - debug('wrapped _read', n); - if (paused) { - paused = false; - stream.resume(); - } - }; - - return self; -}; - -// exposed for testing purposes only. -Readable._fromList = fromList; - -// Pluck off n bytes from an array of buffers. -// Length is the combined lengths of all the buffers in the list. -function fromList(n, state) { - var list = state.buffer; - var length = state.length; - var stringMode = !!state.decoder; - var objectMode = !!state.objectMode; - var ret; - - // nothing in the list, definitely empty. - if (list.length === 0) return null; - - if (length === 0) ret = null;else if (objectMode) ret = list.shift();else if (!n || n >= length) { - // read it all, truncate the array. - if (stringMode) ret = list.join('');else if (list.length === 1) ret = list[0];else ret = Buffer.concat(list, length); - list.length = 0; - } else { - // read just some of it. - if (n < list[0].length) { - // just take a part of the first list item. - // slice is the same for buffers and strings. - var buf = list[0]; - ret = buf.slice(0, n); - list[0] = buf.slice(n); - } else if (n === list[0].length) { - // first list is a perfect match - ret = list.shift(); - } else { - // complex case. - // we have enough to cover it, but it spans past the first buffer. - if (stringMode) ret = '';else ret = new Buffer(n); - - var c = 0; - for (var i = 0, l = list.length; i < l && c < n; i++) { - var buf = list[0]; - var cpy = Math.min(n - c, buf.length); - - if (stringMode) ret += buf.slice(0, cpy);else buf.copy(ret, c, 0, cpy); - - if (cpy < buf.length) list[0] = buf.slice(cpy);else list.shift(); - - c += cpy; - } - } - } - - return ret; -} - -function endReadable(stream) { - var state = stream._readableState; - - // If we get here before consuming all the bytes, then that is a - // bug in node. Should never happen. - if (state.length > 0) throw new Error('endReadable called on non-empty stream'); - - if (!state.endEmitted) { - state.ended = true; - processNextTick(endReadableNT, state, stream); - } -} - -function endReadableNT(state, stream) { - // Check that we didn't get one last unshift. - if (!state.endEmitted && state.length === 0) { - state.endEmitted = true; - stream.readable = false; - stream.emit('end'); - } -} - -function forEach(xs, f) { - for (var i = 0, l = xs.length; i < l; i++) { - f(xs[i], i); - } -} - -function indexOf(xs, x) { - for (var i = 0, l = xs.length; i < l; i++) { - if (xs[i] === x) return i; - } - return -1; -} \ No newline at end of file diff --git a/node_modules/browserify-cache-api/node_modules/readable-stream/lib/_stream_transform.js b/node_modules/browserify-cache-api/node_modules/readable-stream/lib/_stream_transform.js deleted file mode 100644 index 625cdc17..00000000 --- a/node_modules/browserify-cache-api/node_modules/readable-stream/lib/_stream_transform.js +++ /dev/null @@ -1,180 +0,0 @@ -// a transform stream is a readable/writable stream where you do -// something with the data. Sometimes it's called a "filter", -// but that's not a great name for it, since that implies a thing where -// some bits pass through, and others are simply ignored. (That would -// be a valid example of a transform, of course.) -// -// While the output is causally related to the input, it's not a -// necessarily symmetric or synchronous transformation. For example, -// a zlib stream might take multiple plain-text writes(), and then -// emit a single compressed chunk some time in the future. -// -// Here's how this works: -// -// The Transform stream has all the aspects of the readable and writable -// stream classes. When you write(chunk), that calls _write(chunk,cb) -// internally, and returns false if there's a lot of pending writes -// buffered up. When you call read(), that calls _read(n) until -// there's enough pending readable data buffered up. -// -// In a transform stream, the written data is placed in a buffer. When -// _read(n) is called, it transforms the queued up data, calling the -// buffered _write cb's as it consumes chunks. If consuming a single -// written chunk would result in multiple output chunks, then the first -// outputted bit calls the readcb, and subsequent chunks just go into -// the read buffer, and will cause it to emit 'readable' if necessary. -// -// This way, back-pressure is actually determined by the reading side, -// since _read has to be called to start processing a new chunk. However, -// a pathological inflate type of transform can cause excessive buffering -// here. For example, imagine a stream where every byte of input is -// interpreted as an integer from 0-255, and then results in that many -// bytes of output. Writing the 4 bytes {ff,ff,ff,ff} would result in -// 1kb of data being output. In this case, you could write a very small -// amount of input, and end up with a very large amount of output. In -// such a pathological inflating mechanism, there'd be no way to tell -// the system to stop doing the transform. A single 4MB write could -// cause the system to run out of memory. -// -// However, even in such a pathological case, only a single written chunk -// would be consumed, and then the rest would wait (un-transformed) until -// the results of the previous transformed chunk were consumed. - -'use strict'; - -module.exports = Transform; - -var Duplex = require('./_stream_duplex'); - -/**/ -var util = require('core-util-is'); -util.inherits = require('inherits'); -/**/ - -util.inherits(Transform, Duplex); - -function TransformState(stream) { - this.afterTransform = function (er, data) { - return afterTransform(stream, er, data); - }; - - this.needTransform = false; - this.transforming = false; - this.writecb = null; - this.writechunk = null; - this.writeencoding = null; -} - -function afterTransform(stream, er, data) { - var ts = stream._transformState; - ts.transforming = false; - - var cb = ts.writecb; - - if (!cb) return stream.emit('error', new Error('no writecb in Transform class')); - - ts.writechunk = null; - ts.writecb = null; - - if (data !== null && data !== undefined) stream.push(data); - - cb(er); - - var rs = stream._readableState; - rs.reading = false; - if (rs.needReadable || rs.length < rs.highWaterMark) { - stream._read(rs.highWaterMark); - } -} - -function Transform(options) { - if (!(this instanceof Transform)) return new Transform(options); - - Duplex.call(this, options); - - this._transformState = new TransformState(this); - - // when the writable side finishes, then flush out anything remaining. - var stream = this; - - // start out asking for a readable event once data is transformed. - this._readableState.needReadable = true; - - // we have implemented the _read method, and done the other things - // that Readable wants before the first _read call, so unset the - // sync guard flag. - this._readableState.sync = false; - - if (options) { - if (typeof options.transform === 'function') this._transform = options.transform; - - if (typeof options.flush === 'function') this._flush = options.flush; - } - - this.once('prefinish', function () { - if (typeof this._flush === 'function') this._flush(function (er) { - done(stream, er); - });else done(stream); - }); -} - -Transform.prototype.push = function (chunk, encoding) { - this._transformState.needTransform = false; - return Duplex.prototype.push.call(this, chunk, encoding); -}; - -// This is the part where you do stuff! -// override this function in implementation classes. -// 'chunk' is an input chunk. -// -// Call `push(newChunk)` to pass along transformed output -// to the readable side. You may call 'push' zero or more times. -// -// Call `cb(err)` when you are done with this chunk. If you pass -// an error, then that'll put the hurt on the whole operation. If you -// never call cb(), then you'll never get another chunk. -Transform.prototype._transform = function (chunk, encoding, cb) { - throw new Error('not implemented'); -}; - -Transform.prototype._write = function (chunk, encoding, cb) { - var ts = this._transformState; - ts.writecb = cb; - ts.writechunk = chunk; - ts.writeencoding = encoding; - if (!ts.transforming) { - var rs = this._readableState; - if (ts.needTransform || rs.needReadable || rs.length < rs.highWaterMark) this._read(rs.highWaterMark); - } -}; - -// Doesn't matter what the args are here. -// _transform does all the work. -// That we got here means that the readable side wants more data. -Transform.prototype._read = function (n) { - var ts = this._transformState; - - if (ts.writechunk !== null && ts.writecb && !ts.transforming) { - ts.transforming = true; - this._transform(ts.writechunk, ts.writeencoding, ts.afterTransform); - } else { - // mark that we need a transform, so that any data that comes in - // will get processed, now that we've asked for it. - ts.needTransform = true; - } -}; - -function done(stream, er) { - if (er) return stream.emit('error', er); - - // if there's nothing in the write buffer, then that means - // that nothing more will ever be provided - var ws = stream._writableState; - var ts = stream._transformState; - - if (ws.length) throw new Error('calling transform done when ws.length != 0'); - - if (ts.transforming) throw new Error('calling transform done when still transforming'); - - return stream.push(null); -} \ No newline at end of file diff --git a/node_modules/browserify-cache-api/node_modules/readable-stream/lib/_stream_writable.js b/node_modules/browserify-cache-api/node_modules/readable-stream/lib/_stream_writable.js deleted file mode 100644 index 95916c99..00000000 --- a/node_modules/browserify-cache-api/node_modules/readable-stream/lib/_stream_writable.js +++ /dev/null @@ -1,516 +0,0 @@ -// A bit simpler than readable streams. -// Implement an async ._write(chunk, encoding, cb), and it'll handle all -// the drain event emission and buffering. - -'use strict'; - -module.exports = Writable; - -/**/ -var processNextTick = require('process-nextick-args'); -/**/ - -/**/ -var asyncWrite = !process.browser && ['v0.10', 'v0.9.'].indexOf(process.version.slice(0, 5)) > -1 ? setImmediate : processNextTick; -/**/ - -/**/ -var Buffer = require('buffer').Buffer; -/**/ - -Writable.WritableState = WritableState; - -/**/ -var util = require('core-util-is'); -util.inherits = require('inherits'); -/**/ - -/**/ -var internalUtil = { - deprecate: require('util-deprecate') -}; -/**/ - -/**/ -var Stream; -(function () { - try { - Stream = require('st' + 'ream'); - } catch (_) {} finally { - if (!Stream) Stream = require('events').EventEmitter; - } -})(); -/**/ - -var Buffer = require('buffer').Buffer; - -util.inherits(Writable, Stream); - -function nop() {} - -function WriteReq(chunk, encoding, cb) { - this.chunk = chunk; - this.encoding = encoding; - this.callback = cb; - this.next = null; -} - -var Duplex; -function WritableState(options, stream) { - Duplex = Duplex || require('./_stream_duplex'); - - options = options || {}; - - // object stream flag to indicate whether or not this stream - // contains buffers or objects. - this.objectMode = !!options.objectMode; - - if (stream instanceof Duplex) this.objectMode = this.objectMode || !!options.writableObjectMode; - - // the point at which write() starts returning false - // Note: 0 is a valid value, means that we always return false if - // the entire buffer is not flushed immediately on write() - var hwm = options.highWaterMark; - var defaultHwm = this.objectMode ? 16 : 16 * 1024; - this.highWaterMark = hwm || hwm === 0 ? hwm : defaultHwm; - - // cast to ints. - this.highWaterMark = ~ ~this.highWaterMark; - - this.needDrain = false; - // at the start of calling end() - this.ending = false; - // when end() has been called, and returned - this.ended = false; - // when 'finish' is emitted - this.finished = false; - - // should we decode strings into buffers before passing to _write? - // this is here so that some node-core streams can optimize string - // handling at a lower level. - var noDecode = options.decodeStrings === false; - this.decodeStrings = !noDecode; - - // Crypto is kind of old and crusty. Historically, its default string - // encoding is 'binary' so we have to make this configurable. - // Everything else in the universe uses 'utf8', though. - this.defaultEncoding = options.defaultEncoding || 'utf8'; - - // not an actual buffer we keep track of, but a measurement - // of how much we're waiting to get pushed to some underlying - // socket or file. - this.length = 0; - - // a flag to see when we're in the middle of a write. - this.writing = false; - - // when true all writes will be buffered until .uncork() call - this.corked = 0; - - // a flag to be able to tell if the onwrite cb is called immediately, - // or on a later tick. We set this to true at first, because any - // actions that shouldn't happen until "later" should generally also - // not happen before the first write call. - this.sync = true; - - // a flag to know if we're processing previously buffered items, which - // may call the _write() callback in the same tick, so that we don't - // end up in an overlapped onwrite situation. - this.bufferProcessing = false; - - // the callback that's passed to _write(chunk,cb) - this.onwrite = function (er) { - onwrite(stream, er); - }; - - // the callback that the user supplies to write(chunk,encoding,cb) - this.writecb = null; - - // the amount that is being written when _write is called. - this.writelen = 0; - - this.bufferedRequest = null; - this.lastBufferedRequest = null; - - // number of pending user-supplied write callbacks - // this must be 0 before 'finish' can be emitted - this.pendingcb = 0; - - // emit prefinish if the only thing we're waiting for is _write cbs - // This is relevant for synchronous Transform streams - this.prefinished = false; - - // True if the error was already emitted and should not be thrown again - this.errorEmitted = false; - - // count buffered requests - this.bufferedRequestCount = 0; - - // create the two objects needed to store the corked requests - // they are not a linked list, as no new elements are inserted in there - this.corkedRequestsFree = new CorkedRequest(this); - this.corkedRequestsFree.next = new CorkedRequest(this); -} - -WritableState.prototype.getBuffer = function writableStateGetBuffer() { - var current = this.bufferedRequest; - var out = []; - while (current) { - out.push(current); - current = current.next; - } - return out; -}; - -(function () { - try { - Object.defineProperty(WritableState.prototype, 'buffer', { - get: internalUtil.deprecate(function () { - return this.getBuffer(); - }, '_writableState.buffer is deprecated. Use _writableState.getBuffer ' + 'instead.') - }); - } catch (_) {} -})(); - -var Duplex; -function Writable(options) { - Duplex = Duplex || require('./_stream_duplex'); - - // Writable ctor is applied to Duplexes, though they're not - // instanceof Writable, they're instanceof Readable. - if (!(this instanceof Writable) && !(this instanceof Duplex)) return new Writable(options); - - this._writableState = new WritableState(options, this); - - // legacy. - this.writable = true; - - if (options) { - if (typeof options.write === 'function') this._write = options.write; - - if (typeof options.writev === 'function') this._writev = options.writev; - } - - Stream.call(this); -} - -// Otherwise people can pipe Writable streams, which is just wrong. -Writable.prototype.pipe = function () { - this.emit('error', new Error('Cannot pipe. Not readable.')); -}; - -function writeAfterEnd(stream, cb) { - var er = new Error('write after end'); - // TODO: defer error events consistently everywhere, not just the cb - stream.emit('error', er); - processNextTick(cb, er); -} - -// If we get something that is not a buffer, string, null, or undefined, -// and we're not in objectMode, then that's an error. -// Otherwise stream chunks are all considered to be of length=1, and the -// watermarks determine how many objects to keep in the buffer, rather than -// how many bytes or characters. -function validChunk(stream, state, chunk, cb) { - var valid = true; - - if (!Buffer.isBuffer(chunk) && typeof chunk !== 'string' && chunk !== null && chunk !== undefined && !state.objectMode) { - var er = new TypeError('Invalid non-string/buffer chunk'); - stream.emit('error', er); - processNextTick(cb, er); - valid = false; - } - return valid; -} - -Writable.prototype.write = function (chunk, encoding, cb) { - var state = this._writableState; - var ret = false; - - if (typeof encoding === 'function') { - cb = encoding; - encoding = null; - } - - if (Buffer.isBuffer(chunk)) encoding = 'buffer';else if (!encoding) encoding = state.defaultEncoding; - - if (typeof cb !== 'function') cb = nop; - - if (state.ended) writeAfterEnd(this, cb);else if (validChunk(this, state, chunk, cb)) { - state.pendingcb++; - ret = writeOrBuffer(this, state, chunk, encoding, cb); - } - - return ret; -}; - -Writable.prototype.cork = function () { - var state = this._writableState; - - state.corked++; -}; - -Writable.prototype.uncork = function () { - var state = this._writableState; - - if (state.corked) { - state.corked--; - - if (!state.writing && !state.corked && !state.finished && !state.bufferProcessing && state.bufferedRequest) clearBuffer(this, state); - } -}; - -Writable.prototype.setDefaultEncoding = function setDefaultEncoding(encoding) { - // node::ParseEncoding() requires lower case. - if (typeof encoding === 'string') encoding = encoding.toLowerCase(); - if (!(['hex', 'utf8', 'utf-8', 'ascii', 'binary', 'base64', 'ucs2', 'ucs-2', 'utf16le', 'utf-16le', 'raw'].indexOf((encoding + '').toLowerCase()) > -1)) throw new TypeError('Unknown encoding: ' + encoding); - this._writableState.defaultEncoding = encoding; -}; - -function decodeChunk(state, chunk, encoding) { - if (!state.objectMode && state.decodeStrings !== false && typeof chunk === 'string') { - chunk = new Buffer(chunk, encoding); - } - return chunk; -} - -// if we're already writing something, then just put this -// in the queue, and wait our turn. Otherwise, call _write -// If we return false, then we need a drain event, so set that flag. -function writeOrBuffer(stream, state, chunk, encoding, cb) { - chunk = decodeChunk(state, chunk, encoding); - - if (Buffer.isBuffer(chunk)) encoding = 'buffer'; - var len = state.objectMode ? 1 : chunk.length; - - state.length += len; - - var ret = state.length < state.highWaterMark; - // we must ensure that previous needDrain will not be reset to false. - if (!ret) state.needDrain = true; - - if (state.writing || state.corked) { - var last = state.lastBufferedRequest; - state.lastBufferedRequest = new WriteReq(chunk, encoding, cb); - if (last) { - last.next = state.lastBufferedRequest; - } else { - state.bufferedRequest = state.lastBufferedRequest; - } - state.bufferedRequestCount += 1; - } else { - doWrite(stream, state, false, len, chunk, encoding, cb); - } - - return ret; -} - -function doWrite(stream, state, writev, len, chunk, encoding, cb) { - state.writelen = len; - state.writecb = cb; - state.writing = true; - state.sync = true; - if (writev) stream._writev(chunk, state.onwrite);else stream._write(chunk, encoding, state.onwrite); - state.sync = false; -} - -function onwriteError(stream, state, sync, er, cb) { - --state.pendingcb; - if (sync) processNextTick(cb, er);else cb(er); - - stream._writableState.errorEmitted = true; - stream.emit('error', er); -} - -function onwriteStateUpdate(state) { - state.writing = false; - state.writecb = null; - state.length -= state.writelen; - state.writelen = 0; -} - -function onwrite(stream, er) { - var state = stream._writableState; - var sync = state.sync; - var cb = state.writecb; - - onwriteStateUpdate(state); - - if (er) onwriteError(stream, state, sync, er, cb);else { - // Check if we're actually ready to finish, but don't emit yet - var finished = needFinish(state); - - if (!finished && !state.corked && !state.bufferProcessing && state.bufferedRequest) { - clearBuffer(stream, state); - } - - if (sync) { - /**/ - asyncWrite(afterWrite, stream, state, finished, cb); - /**/ - } else { - afterWrite(stream, state, finished, cb); - } - } -} - -function afterWrite(stream, state, finished, cb) { - if (!finished) onwriteDrain(stream, state); - state.pendingcb--; - cb(); - finishMaybe(stream, state); -} - -// Must force callback to be called on nextTick, so that we don't -// emit 'drain' before the write() consumer gets the 'false' return -// value, and has a chance to attach a 'drain' listener. -function onwriteDrain(stream, state) { - if (state.length === 0 && state.needDrain) { - state.needDrain = false; - stream.emit('drain'); - } -} - -// if there's something in the buffer waiting, then process it -function clearBuffer(stream, state) { - state.bufferProcessing = true; - var entry = state.bufferedRequest; - - if (stream._writev && entry && entry.next) { - // Fast case, write everything using _writev() - var l = state.bufferedRequestCount; - var buffer = new Array(l); - var holder = state.corkedRequestsFree; - holder.entry = entry; - - var count = 0; - while (entry) { - buffer[count] = entry; - entry = entry.next; - count += 1; - } - - doWrite(stream, state, true, state.length, buffer, '', holder.finish); - - // doWrite is always async, defer these to save a bit of time - // as the hot path ends with doWrite - state.pendingcb++; - state.lastBufferedRequest = null; - state.corkedRequestsFree = holder.next; - holder.next = null; - } else { - // Slow case, write chunks one-by-one - while (entry) { - var chunk = entry.chunk; - var encoding = entry.encoding; - var cb = entry.callback; - var len = state.objectMode ? 1 : chunk.length; - - doWrite(stream, state, false, len, chunk, encoding, cb); - entry = entry.next; - // if we didn't call the onwrite immediately, then - // it means that we need to wait until it does. - // also, that means that the chunk and cb are currently - // being processed, so move the buffer counter past them. - if (state.writing) { - break; - } - } - - if (entry === null) state.lastBufferedRequest = null; - } - - state.bufferedRequestCount = 0; - state.bufferedRequest = entry; - state.bufferProcessing = false; -} - -Writable.prototype._write = function (chunk, encoding, cb) { - cb(new Error('not implemented')); -}; - -Writable.prototype._writev = null; - -Writable.prototype.end = function (chunk, encoding, cb) { - var state = this._writableState; - - if (typeof chunk === 'function') { - cb = chunk; - chunk = null; - encoding = null; - } else if (typeof encoding === 'function') { - cb = encoding; - encoding = null; - } - - if (chunk !== null && chunk !== undefined) this.write(chunk, encoding); - - // .end() fully uncorks - if (state.corked) { - state.corked = 1; - this.uncork(); - } - - // ignore unnecessary end() calls. - if (!state.ending && !state.finished) endWritable(this, state, cb); -}; - -function needFinish(state) { - return state.ending && state.length === 0 && state.bufferedRequest === null && !state.finished && !state.writing; -} - -function prefinish(stream, state) { - if (!state.prefinished) { - state.prefinished = true; - stream.emit('prefinish'); - } -} - -function finishMaybe(stream, state) { - var need = needFinish(state); - if (need) { - if (state.pendingcb === 0) { - prefinish(stream, state); - state.finished = true; - stream.emit('finish'); - } else { - prefinish(stream, state); - } - } - return need; -} - -function endWritable(stream, state, cb) { - state.ending = true; - finishMaybe(stream, state); - if (cb) { - if (state.finished) processNextTick(cb);else stream.once('finish', cb); - } - state.ended = true; - stream.writable = false; -} - -// It seems a linked list but it is not -// there will be only 2 of these for each stream -function CorkedRequest(state) { - var _this = this; - - this.next = null; - this.entry = null; - - this.finish = function (err) { - var entry = _this.entry; - _this.entry = null; - while (entry) { - var cb = entry.callback; - state.pendingcb--; - cb(err); - entry = entry.next; - } - if (state.corkedRequestsFree) { - state.corkedRequestsFree.next = _this; - } else { - state.corkedRequestsFree = _this; - } - }; -} \ No newline at end of file diff --git a/node_modules/browserify-cache-api/node_modules/readable-stream/package.json b/node_modules/browserify-cache-api/node_modules/readable-stream/package.json deleted file mode 100644 index f64b3a50..00000000 --- a/node_modules/browserify-cache-api/node_modules/readable-stream/package.json +++ /dev/null @@ -1,114 +0,0 @@ -{ - "_args": [ - [ - { - "raw": "readable-stream@~2.0.0", - "scope": null, - "escapedName": "readable-stream", - "name": "readable-stream", - "rawSpec": "~2.0.0", - "spec": ">=2.0.0 <2.1.0", - "type": "range" - }, - "/Users/benjaminarias/Desktop/poly/node_modules/browserify-cache-api/node_modules/through2" - ] - ], - "_from": "readable-stream@>=2.0.0 <2.1.0", - "_id": "readable-stream@2.0.6", - "_inCache": true, - "_installable": true, - "_location": "/browserify-cache-api/readable-stream", - "_nodeVersion": "5.7.0", - "_npmOperationalInternal": { - "host": "packages-12-west.internal.npmjs.com", - "tmp": "tmp/readable-stream-2.0.6.tgz_1457893507709_0.369257491780445" - }, - "_npmUser": { - "name": "cwmma", - "email": "calvin.metcalf@gmail.com" - }, - "_npmVersion": "3.6.0", - "_phantomChildren": {}, - "_requested": { - "raw": "readable-stream@~2.0.0", - "scope": null, - "escapedName": "readable-stream", - "name": "readable-stream", - "rawSpec": "~2.0.0", - "spec": ">=2.0.0 <2.1.0", - "type": "range" - }, - "_requiredBy": [ - "/browserify-cache-api/through2" - ], - "_resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.0.6.tgz", - "_shasum": "8f90341e68a53ccc928788dacfcd11b36eb9b78e", - "_shrinkwrap": null, - "_spec": "readable-stream@~2.0.0", - "_where": "/Users/benjaminarias/Desktop/poly/node_modules/browserify-cache-api/node_modules/through2", - "browser": { - "util": false - }, - "bugs": { - "url": "https://github.com/nodejs/readable-stream/issues" - }, - "dependencies": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.1", - "isarray": "~1.0.0", - "process-nextick-args": "~1.0.6", - "string_decoder": "~0.10.x", - "util-deprecate": "~1.0.1" - }, - "description": "Streams3, a user-land copy of the stream library from Node.js", - "devDependencies": { - "tap": "~0.2.6", - "tape": "~4.5.1", - "zuul": "~3.9.0" - }, - "directories": {}, - "dist": { - "shasum": "8f90341e68a53ccc928788dacfcd11b36eb9b78e", - "tarball": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.0.6.tgz" - }, - "gitHead": "01fb5608a970b42c900b96746cadc13d27dd9d7e", - "homepage": "https://github.com/nodejs/readable-stream#readme", - "keywords": [ - "readable", - "stream", - "pipe" - ], - "license": "MIT", - "main": "readable.js", - "maintainers": [ - { - "name": "isaacs", - "email": "isaacs@npmjs.com" - }, - { - "name": "tootallnate", - "email": "nathan@tootallnate.net" - }, - { - "name": "rvagg", - "email": "rod@vagg.org" - }, - { - "name": "cwmma", - "email": "calvin.metcalf@gmail.com" - } - ], - "name": "readable-stream", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git://github.com/nodejs/readable-stream.git" - }, - "scripts": { - "browser": "npm run write-zuul && zuul -- test/browser.js", - "test": "tap test/parallel/*.js test/ours/*.js", - "write-zuul": "printf \"ui: tape\nbrowsers:\n - name: $BROWSER_NAME\n version: $BROWSER_VERSION\n\">.zuul.yml" - }, - "version": "2.0.6" -} diff --git a/node_modules/browserify-cache-api/node_modules/readable-stream/passthrough.js b/node_modules/browserify-cache-api/node_modules/readable-stream/passthrough.js deleted file mode 100644 index 27e8d8a5..00000000 --- a/node_modules/browserify-cache-api/node_modules/readable-stream/passthrough.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require("./lib/_stream_passthrough.js") diff --git a/node_modules/browserify-cache-api/node_modules/readable-stream/readable.js b/node_modules/browserify-cache-api/node_modules/readable-stream/readable.js deleted file mode 100644 index 6222a579..00000000 --- a/node_modules/browserify-cache-api/node_modules/readable-stream/readable.js +++ /dev/null @@ -1,12 +0,0 @@ -var Stream = (function (){ - try { - return require('st' + 'ream'); // hack to fix a circular dependency issue when used with browserify - } catch(_){} -}()); -exports = module.exports = require('./lib/_stream_readable.js'); -exports.Stream = Stream || exports; -exports.Readable = exports; -exports.Writable = require('./lib/_stream_writable.js'); -exports.Duplex = require('./lib/_stream_duplex.js'); -exports.Transform = require('./lib/_stream_transform.js'); -exports.PassThrough = require('./lib/_stream_passthrough.js'); diff --git a/node_modules/browserify-cache-api/node_modules/readable-stream/transform.js b/node_modules/browserify-cache-api/node_modules/readable-stream/transform.js deleted file mode 100644 index 5d482f07..00000000 --- a/node_modules/browserify-cache-api/node_modules/readable-stream/transform.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require("./lib/_stream_transform.js") diff --git a/node_modules/browserify-cache-api/node_modules/readable-stream/writable.js b/node_modules/browserify-cache-api/node_modules/readable-stream/writable.js deleted file mode 100644 index e1e9efdf..00000000 --- a/node_modules/browserify-cache-api/node_modules/readable-stream/writable.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require("./lib/_stream_writable.js") diff --git a/node_modules/browserify-cache-api/node_modules/through2/.npmignore b/node_modules/browserify-cache-api/node_modules/through2/.npmignore deleted file mode 100644 index 1e1dcab3..00000000 --- a/node_modules/browserify-cache-api/node_modules/through2/.npmignore +++ /dev/null @@ -1,3 +0,0 @@ -test -.jshintrc -.travis.yml \ No newline at end of file diff --git a/node_modules/browserify-cache-api/node_modules/through2/LICENSE b/node_modules/browserify-cache-api/node_modules/through2/LICENSE deleted file mode 100644 index f6a0029d..00000000 --- a/node_modules/browserify-cache-api/node_modules/through2/LICENSE +++ /dev/null @@ -1,39 +0,0 @@ -Copyright 2013, Rod Vagg (the "Original Author") -All rights reserved. - -MIT +no-false-attribs License - -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. - -Distributions of all or part of the Software intended to be used -by the recipients as they would use the unmodified Software, -containing modifications that substantially alter, remove, or -disable functionality of the Software, outside of the documented -configuration mechanisms provided by the Software, shall be -modified such that the Original Author's bug reporting email -addresses and urls are either replaced with the contact information -of the parties responsible for the changes, or removed entirely. - -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. - - -Except where noted, this license applies to any and all software -programs and associated documentation files created by the -Original Author, when distributed with the Software. \ No newline at end of file diff --git a/node_modules/browserify-cache-api/node_modules/through2/README.md b/node_modules/browserify-cache-api/node_modules/through2/README.md deleted file mode 100644 index c84b3464..00000000 --- a/node_modules/browserify-cache-api/node_modules/through2/README.md +++ /dev/null @@ -1,133 +0,0 @@ -# through2 - -[![NPM](https://nodei.co/npm/through2.png?downloads&downloadRank)](https://nodei.co/npm/through2/) - -**A tiny wrapper around Node streams.Transform (Streams2) to avoid explicit subclassing noise** - -Inspired by [Dominic Tarr](https://github.com/dominictarr)'s [through](https://github.com/dominictarr/through) in that it's so much easier to make a stream out of a function than it is to set up the prototype chain properly: `through(function (chunk) { ... })`. - -Note: As 2.x.x this module starts using **Streams3** instead of Stream2. To continue using a Streams2 version use `npm install through2@0` to fetch the latest version of 0.x.x. More information about Streams2 vs Streams3 and recommendations see the article **[Why I don't use Node's core 'stream' module](http://r.va.gg/2014/06/why-i-dont-use-nodes-core-stream-module.html)**. - -```js -fs.createReadStream('ex.txt') - .pipe(through2(function (chunk, enc, callback) { - for (var i = 0; i < chunk.length; i++) - if (chunk[i] == 97) - chunk[i] = 122 // swap 'a' for 'z' - - this.push(chunk) - - callback() - })) - .pipe(fs.createWriteStream('out.txt')) -``` - -Or object streams: - -```js -var all = [] - -fs.createReadStream('data.csv') - .pipe(csv2()) - .pipe(through2.obj(function (chunk, enc, callback) { - var data = { - name : chunk[0] - , address : chunk[3] - , phone : chunk[10] - } - this.push(data) - - callback() - })) - .on('data', function (data) { - all.push(data) - }) - .on('end', function () { - doSomethingSpecial(all) - }) -``` - -Note that `through2.obj(fn)` is a convenience wrapper around `through2({ objectMode: true }, fn)`. - -## API - -through2([ options, ] [ transformFunction ] [, flushFunction ]) - -Consult the **[stream.Transform](http://nodejs.org/docs/latest/api/stream.html#stream_class_stream_transform)** documentation for the exact rules of the `transformFunction` (i.e. `this._transform`) and the optional `flushFunction` (i.e. `this._flush`). - -### options - -The options argument is optional and is passed straight through to `stream.Transform`. So you can use `objectMode:true` if you are processing non-binary streams (or just use `through2.obj()`). - -The `options` argument is first, unlike standard convention, because if I'm passing in an anonymous function then I'd prefer for the options argument to not get lost at the end of the call: - -```js -fs.createReadStream('/tmp/important.dat') - .pipe(through2({ objectMode: true, allowHalfOpen: false }, - function (chunk, enc, cb) { - cb(null, 'wut?') // note we can use the second argument on the callback - // to provide data as an alternative to this.push('wut?') - } - ) - .pipe(fs.createWriteStream('/tmp/wut.txt')) -``` - -### transformFunction - -The `transformFunction` must have the following signature: `function (chunk, encoding, callback) {}`. A minimal implementation should call the `callback` function to indicate that the transformation is done, even if that transformation means discarding the chunk. - -To queue a new chunk, call `this.push(chunk)`—this can be called as many times as required before the `callback()` if you have multiple pieces to send on. - -Alternatively, you may use `callback(err, chunk)` as shorthand for emitting a single chunk or an error. - -If you **do not provide a `transformFunction`** then you will get a simple pass-through stream. - -### flushFunction - -The optional `flushFunction` is provided as the last argument (2nd or 3rd, depending on whether you've supplied options) is called just prior to the stream ending. Can be used to finish up any processing that may be in progress. - -```js -fs.createReadStream('/tmp/important.dat') - .pipe(through2( - function (chunk, enc, cb) { cb(null, chunk) }, // transform is a noop - function (cb) { // flush function - this.push('tacking on an extra buffer to the end'); - cb(); - } - )) - .pipe(fs.createWriteStream('/tmp/wut.txt')); -``` - -through2.ctor([ options, ] transformFunction[, flushFunction ]) - -Instead of returning a `stream.Transform` instance, `through2.ctor()` returns a **constructor** for a custom Transform. This is useful when you want to use the same transform logic in multiple instances. - -```js -var FToC = through2.ctor({objectMode: true}, function (record, encoding, callback) { - if (record.temp != null && record.unit == "F") { - record.temp = ( ( record.temp - 32 ) * 5 ) / 9 - record.unit = "C" - } - this.push(record) - callback() -}) - -// Create instances of FToC like so: -var converter = new FToC() -// Or: -var converter = FToC() -// Or specify/override options when you instantiate, if you prefer: -var converter = FToC({objectMode: true}) -``` - -## See Also - - - [through2-map](https://github.com/brycebaril/through2-map) - Array.prototype.map analog for streams. - - [through2-filter](https://github.com/brycebaril/through2-filter) - Array.prototype.filter analog for streams. - - [through2-reduce](https://github.com/brycebaril/through2-reduce) - Array.prototype.reduce analog for streams. - - [through2-spy](https://github.com/brycebaril/through2-spy) - Wrapper for simple stream.PassThrough spies. - - the [mississippi stream utility collection](https://github.com/maxogden/mississippi) includes `through2` as well as many more useful stream modules similar to this one - -## License - -**through2** is Copyright (c) 2013 Rod Vagg [@rvagg](https://twitter.com/rvagg) and licensed under the MIT license. All rights not explicitly granted in the MIT license are reserved. See the included LICENSE file for more details. diff --git a/node_modules/browserify-cache-api/node_modules/through2/package.json b/node_modules/browserify-cache-api/node_modules/through2/package.json deleted file mode 100644 index f7155886..00000000 --- a/node_modules/browserify-cache-api/node_modules/through2/package.json +++ /dev/null @@ -1,105 +0,0 @@ -{ - "_args": [ - [ - { - "raw": "through2@^2.0.0", - "scope": null, - "escapedName": "through2", - "name": "through2", - "rawSpec": "^2.0.0", - "spec": ">=2.0.0 <3.0.0", - "type": "range" - }, - "/Users/benjaminarias/Desktop/poly/node_modules/browserify-cache-api" - ] - ], - "_from": "through2@>=2.0.0 <3.0.0", - "_id": "through2@2.0.1", - "_inCache": true, - "_installable": true, - "_location": "/browserify-cache-api/through2", - "_nodeVersion": "5.5.0", - "_npmOperationalInternal": { - "host": "packages-6-west.internal.npmjs.com", - "tmp": "tmp/through2-2.0.1.tgz_1454928418348_0.7339043114334345" - }, - "_npmUser": { - "name": "rvagg", - "email": "rod@vagg.org" - }, - "_npmVersion": "3.6.0", - "_phantomChildren": {}, - "_requested": { - "raw": "through2@^2.0.0", - "scope": null, - "escapedName": "through2", - "name": "through2", - "rawSpec": "^2.0.0", - "spec": ">=2.0.0 <3.0.0", - "type": "range" - }, - "_requiredBy": [ - "/browserify-cache-api" - ], - "_resolved": "https://registry.npmjs.org/through2/-/through2-2.0.1.tgz", - "_shasum": "384e75314d49f32de12eebb8136b8eb6b5d59da9", - "_shrinkwrap": null, - "_spec": "through2@^2.0.0", - "_where": "/Users/benjaminarias/Desktop/poly/node_modules/browserify-cache-api", - "author": { - "name": "Rod Vagg", - "email": "r@va.gg", - "url": "https://github.com/rvagg" - }, - "bugs": { - "url": "https://github.com/rvagg/through2/issues" - }, - "dependencies": { - "readable-stream": "~2.0.0", - "xtend": "~4.0.0" - }, - "description": "A tiny wrapper around Node streams2 Transform to avoid explicit subclassing noise", - "devDependencies": { - "bl": "~0.9.4", - "faucet": "0.0.1", - "stream-spigot": "~3.0.5", - "tape": "~4.0.0" - }, - "directories": {}, - "dist": { - "shasum": "384e75314d49f32de12eebb8136b8eb6b5d59da9", - "tarball": "https://registry.npmjs.org/through2/-/through2-2.0.1.tgz" - }, - "gitHead": "6d52a1b77db13a741f2708cd5854a198e4ae3072", - "homepage": "https://github.com/rvagg/through2#readme", - "keywords": [ - "stream", - "streams2", - "through", - "transform" - ], - "license": "MIT", - "main": "through2.js", - "maintainers": [ - { - "name": "rvagg", - "email": "rod@vagg.org" - }, - { - "name": "bryce", - "email": "bryce@ravenwall.com" - } - ], - "name": "through2", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git+https://github.com/rvagg/through2.git" - }, - "scripts": { - "test": "node test/test.js | faucet", - "test-local": "brtapsauce-local test/basic-test.js" - }, - "version": "2.0.1" -} diff --git a/node_modules/browserify-cache-api/node_modules/through2/through2.js b/node_modules/browserify-cache-api/node_modules/through2/through2.js deleted file mode 100644 index 5b7a880e..00000000 --- a/node_modules/browserify-cache-api/node_modules/through2/through2.js +++ /dev/null @@ -1,96 +0,0 @@ -var Transform = require('readable-stream/transform') - , inherits = require('util').inherits - , xtend = require('xtend') - -function DestroyableTransform(opts) { - Transform.call(this, opts) - this._destroyed = false -} - -inherits(DestroyableTransform, Transform) - -DestroyableTransform.prototype.destroy = function(err) { - if (this._destroyed) return - this._destroyed = true - - var self = this - process.nextTick(function() { - if (err) - self.emit('error', err) - self.emit('close') - }) -} - -// a noop _transform function -function noop (chunk, enc, callback) { - callback(null, chunk) -} - - -// create a new export function, used by both the main export and -// the .ctor export, contains common logic for dealing with arguments -function through2 (construct) { - return function (options, transform, flush) { - if (typeof options == 'function') { - flush = transform - transform = options - options = {} - } - - if (typeof transform != 'function') - transform = noop - - if (typeof flush != 'function') - flush = null - - return construct(options, transform, flush) - } -} - - -// main export, just make me a transform stream! -module.exports = through2(function (options, transform, flush) { - var t2 = new DestroyableTransform(options) - - t2._transform = transform - - if (flush) - t2._flush = flush - - return t2 -}) - - -// make me a reusable prototype that I can `new`, or implicitly `new` -// with a constructor call -module.exports.ctor = through2(function (options, transform, flush) { - function Through2 (override) { - if (!(this instanceof Through2)) - return new Through2(override) - - this.options = xtend(options, override) - - DestroyableTransform.call(this, this.options) - } - - inherits(Through2, DestroyableTransform) - - Through2.prototype._transform = transform - - if (flush) - Through2.prototype._flush = flush - - return Through2 -}) - - -module.exports.obj = through2(function (options, transform, flush) { - var t2 = new DestroyableTransform(xtend({ objectMode: true, highWaterMark: 16 }, options)) - - t2._transform = transform - - if (flush) - t2._flush = flush - - return t2 -}) diff --git a/node_modules/browserify-cache-api/package.json b/node_modules/browserify-cache-api/package.json deleted file mode 100644 index 9bbd898f..00000000 --- a/node_modules/browserify-cache-api/package.json +++ /dev/null @@ -1,108 +0,0 @@ -{ - "_args": [ - [ - { - "raw": "browserify-cache-api@^3.0.0", - "scope": null, - "escapedName": "browserify-cache-api", - "name": "browserify-cache-api", - "rawSpec": "^3.0.0", - "spec": ">=3.0.0 <4.0.0", - "type": "range" - }, - "/Users/benjaminarias/Desktop/poly/node_modules/browserify-incremental" - ] - ], - "_from": "browserify-cache-api@>=3.0.0 <4.0.0", - "_id": "browserify-cache-api@3.0.1", - "_inCache": true, - "_installable": true, - "_location": "/browserify-cache-api", - "_nodeVersion": "6.2.2", - "_npmOperationalInternal": { - "host": "packages-16-east.internal.npmjs.com", - "tmp": "tmp/browserify-cache-api-3.0.1.tgz_1469745948305_0.5194907758850604" - }, - "_npmUser": { - "name": "agentme", - "email": "agentme49@gmail.com" - }, - "_npmVersion": "3.9.5", - "_phantomChildren": { - "core-util-is": "1.0.2", - "inherits": "2.0.3", - "process-nextick-args": "1.0.7", - "string_decoder": "0.10.31", - "util-deprecate": "1.0.2", - "xtend": "4.0.1" - }, - "_requested": { - "raw": "browserify-cache-api@^3.0.0", - "scope": null, - "escapedName": "browserify-cache-api", - "name": "browserify-cache-api", - "rawSpec": "^3.0.0", - "spec": ">=3.0.0 <4.0.0", - "type": "range" - }, - "_requiredBy": [ - "/browserify-incremental" - ], - "_resolved": "https://registry.npmjs.org/browserify-cache-api/-/browserify-cache-api-3.0.1.tgz", - "_shasum": "96247e853f068fd6e0d45cc73f0bb2cd9778ef02", - "_shrinkwrap": null, - "_spec": "browserify-cache-api@^3.0.0", - "_where": "/Users/benjaminarias/Desktop/poly/node_modules/browserify-incremental", - "author": { - "name": "James Friend", - "email": "james@jsdf.co", - "url": "http://jsdf.co/" - }, - "bugs": { - "url": "https://github.com/jsdf/browserify-cache-api/issues" - }, - "dependencies": { - "async": "^1.5.2", - "through2": "^2.0.0", - "xtend": "^4.0.0" - }, - "description": "Attaches per-module caching of module resolution and transformation to a browserify instance.", - "devDependencies": { - "browserify": "^9.0.3", - "eslint": "2.4.0", - "rimraf": "^2.5.2", - "tap": "^5.7.0" - }, - "directories": {}, - "dist": { - "shasum": "96247e853f068fd6e0d45cc73f0bb2cd9778ef02", - "tarball": "https://registry.npmjs.org/browserify-cache-api/-/browserify-cache-api-3.0.1.tgz" - }, - "gitHead": "d74efc645c27c4a44a83369b9e50f88feb7267fc", - "homepage": "https://github.com/jsdf/browserify-cache-api", - "license": "MIT", - "main": "index.js", - "maintainers": [ - { - "name": "agentme", - "email": "agentme49@gmail.com" - }, - { - "name": "jsdf", - "email": "james@jsdf.co" - } - ], - "name": "browserify-cache-api", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git://github.com/jsdf/browserify-cache-api.git" - }, - "scripts": { - "lint": "eslint .", - "lint-fix": "eslint . --fix", - "test": "npm run lint && tap test" - }, - "version": "3.0.1" -} diff --git a/node_modules/browserify-cipher/.travis.yml b/node_modules/browserify-cipher/.travis.yml deleted file mode 100644 index eb83acd9..00000000 --- a/node_modules/browserify-cipher/.travis.yml +++ /dev/null @@ -1,6 +0,0 @@ -language: node_js -node_js: - - "0.11" - - "0.10" - - "0.12" - - "iojs" diff --git a/node_modules/browserify-cipher/browser.js b/node_modules/browserify-cipher/browser.js deleted file mode 100644 index e009f931..00000000 --- a/node_modules/browserify-cipher/browser.js +++ /dev/null @@ -1,73 +0,0 @@ -var ebtk = require('evp_bytestokey') -var aes = require('browserify-aes/browser') -var DES = require('browserify-des') -var desModes = require('browserify-des/modes') -var aesModes = require('browserify-aes/modes') -function createCipher (suite, password) { - var keyLen, ivLen - suite = suite.toLowerCase() - if (aesModes[suite]) { - keyLen = aesModes[suite].key - ivLen = aesModes[suite].iv - } else if (desModes[suite]) { - keyLen = desModes[suite].key * 8 - ivLen = desModes[suite].iv - } else { - throw new TypeError('invalid suite type') - } - var keys = ebtk(password, false, keyLen, ivLen) - return createCipheriv(suite, keys.key, keys.iv) -} -function createDecipher (suite, password) { - var keyLen, ivLen - suite = suite.toLowerCase() - if (aesModes[suite]) { - keyLen = aesModes[suite].key - ivLen = aesModes[suite].iv - } else if (desModes[suite]) { - keyLen = desModes[suite].key * 8 - ivLen = desModes[suite].iv - } else { - throw new TypeError('invalid suite type') - } - var keys = ebtk(password, false, keyLen, ivLen) - return createDecipheriv(suite, keys.key, keys.iv) -} - -function createCipheriv (suite, key, iv) { - suite = suite.toLowerCase() - if (aesModes[suite]) { - return aes.createCipheriv(suite, key, iv) - } else if (desModes[suite]) { - return new DES({ - key: key, - iv: iv, - mode: suite - }) - } else { - throw new TypeError('invalid suite type') - } -} -function createDecipheriv (suite, key, iv) { - suite = suite.toLowerCase() - if (aesModes[suite]) { - return aes.createDecipheriv(suite, key, iv) - } else if (desModes[suite]) { - return new DES({ - key: key, - iv: iv, - mode: suite, - decrypt: true - }) - } else { - throw new TypeError('invalid suite type') - } -} -exports.createCipher = exports.Cipher = createCipher -exports.createCipheriv = exports.Cipheriv = createCipheriv -exports.createDecipher = exports.Decipher = createDecipher -exports.createDecipheriv = exports.Decipheriv = createDecipheriv -function getCiphers () { - return Object.keys(desModes).concat(aes.getCiphers()) -} -exports.listCiphers = exports.getCiphers = getCiphers diff --git a/node_modules/browserify-cipher/index.js b/node_modules/browserify-cipher/index.js deleted file mode 100644 index 58fa883f..00000000 --- a/node_modules/browserify-cipher/index.js +++ /dev/null @@ -1,7 +0,0 @@ -var crypto = require('crypto') - -exports.createCipher = exports.Cipher = crypto.createCipher -exports.createCipheriv = exports.Cipheriv = crypto.createCipheriv -exports.createDecipher = exports.Decipher = crypto.createDecipher -exports.createDecipheriv = exports.Decipheriv = crypto.createDecipheriv -exports.listCiphers = exports.getCiphers = crypto.getCiphers diff --git a/node_modules/browserify-cipher/package.json b/node_modules/browserify-cipher/package.json deleted file mode 100644 index 50305e5b..00000000 --- a/node_modules/browserify-cipher/package.json +++ /dev/null @@ -1,90 +0,0 @@ -{ - "_args": [ - [ - { - "raw": "browserify-cipher@^1.0.0", - "scope": null, - "escapedName": "browserify-cipher", - "name": "browserify-cipher", - "rawSpec": "^1.0.0", - "spec": ">=1.0.0 <2.0.0", - "type": "range" - }, - "/Users/benjaminarias/Desktop/poly/node_modules/crypto-browserify" - ] - ], - "_from": "browserify-cipher@>=1.0.0 <2.0.0", - "_id": "browserify-cipher@1.0.0", - "_inCache": true, - "_installable": true, - "_location": "/browserify-cipher", - "_nodeVersion": "4.1.1", - "_npmUser": { - "name": "cwmma", - "email": "calvin.metcalf@gmail.com" - }, - "_npmVersion": "2.14.4", - "_phantomChildren": {}, - "_requested": { - "raw": "browserify-cipher@^1.0.0", - "scope": null, - "escapedName": "browserify-cipher", - "name": "browserify-cipher", - "rawSpec": "^1.0.0", - "spec": ">=1.0.0 <2.0.0", - "type": "range" - }, - "_requiredBy": [ - "/crypto-browserify" - ], - "_resolved": "https://registry.npmjs.org/browserify-cipher/-/browserify-cipher-1.0.0.tgz", - "_shasum": "9988244874bf5ed4e28da95666dcd66ac8fc363a", - "_shrinkwrap": null, - "_spec": "browserify-cipher@^1.0.0", - "_where": "/Users/benjaminarias/Desktop/poly/node_modules/crypto-browserify", - "author": { - "name": "Calvin Metcalf", - "email": "calvin.metcalf@gmail.com" - }, - "browser": "browser.js", - "bugs": { - "url": "https://github.com/crypto-browserify/browserify-cipher/issues" - }, - "dependencies": { - "browserify-aes": "^1.0.4", - "browserify-des": "^1.0.0", - "evp_bytestokey": "^1.0.0" - }, - "description": "ciphers for the browser", - "devDependencies": { - "standard": "^5.3.1", - "tap-spec": "^4.1.0", - "tape": "^4.2.0" - }, - "directories": {}, - "dist": { - "shasum": "9988244874bf5ed4e28da95666dcd66ac8fc363a", - "tarball": "https://registry.npmjs.org/browserify-cipher/-/browserify-cipher-1.0.0.tgz" - }, - "gitHead": "a293143d06e1aa03aee035521c3379e9402c3074", - "homepage": "https://github.com/crypto-browserify/browserify-cipher#readme", - "license": "MIT", - "main": "index.js", - "maintainers": [ - { - "name": "cwmma", - "email": "calvin.metcalf@gmail.com" - } - ], - "name": "browserify-cipher", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git+ssh://git@github.com/crypto-browserify/browserify-cipher.git" - }, - "scripts": { - "test": "standard && node test.js | tspec" - }, - "version": "1.0.0" -} diff --git a/node_modules/browserify-cipher/readme.md b/node_modules/browserify-cipher/readme.md deleted file mode 100644 index 3c0b1576..00000000 --- a/node_modules/browserify-cipher/readme.md +++ /dev/null @@ -1,7 +0,0 @@ -browserify-cipher -=== - -[![Build Status](https://travis-ci.org/crypto-browserify/browserify-cipher.svg)](https://travis-ci.org/crypto-browserify/browserify-cipher) - -Provides createCipher, createDecipher, createCipheriv, createDecipheriv and -getCiphers for the browserify. Includes AES and DES ciphers. diff --git a/node_modules/browserify-cipher/test.js b/node_modules/browserify-cipher/test.js deleted file mode 100644 index d4beaa0f..00000000 --- a/node_modules/browserify-cipher/test.js +++ /dev/null @@ -1,55 +0,0 @@ -var test = require('tape') -var crypto = require('crypto') -var desModes = require('browserify-des/modes') -var aesModes = require('browserify-aes/modes') -var ourCrypto = require('./browser') - -function runIvTest (mode, keyLen, ivLen) { - test('mode: ' + mode, function (t) { - var i = 0 - while (++i < 10) { - run(i) - } - function run (i) { - t.test('run: ' + i, function (t) { - t.plan(2) - var key = crypto.randomBytes(keyLen) - var iv = crypto.randomBytes(ivLen) - var text = crypto.randomBytes(200) - var ourEncrypt - try { - ourEncrypt = ourCrypto.createCipheriv(mode, key, iv) - } catch (e) { - t.notOk(e, e.stack) - } - var nodeEncrypt - try { - nodeEncrypt = crypto.createCipheriv(mode, key, iv) - } catch (e) { - t.notOk(e, e.stack) - } - var ourCipherText = Buffer.concat([ourEncrypt.update(text), ourEncrypt.final()]) - var authTag - if (mode.slice(-3) === 'gcm') { - authTag = ourEncrypt.getAuthTag() - } - var nodeCipherText = Buffer.concat([nodeEncrypt.update(text), nodeEncrypt.final()]) - t.equals(nodeCipherText.toString('hex'), ourCipherText.toString('hex')) - var ourDecrypt = ourCrypto.createDecipheriv(mode, key, iv) - if (mode.slice(-3) === 'gcm') { - ourDecrypt.setAuthTag(authTag) - } - var plainText = Buffer.concat([ourDecrypt.update(ourCipherText), ourDecrypt.final()]) - t.equals(text.toString('hex'), plainText.toString('hex')) - }) - } - }) -} -Object.keys(aesModes).forEach(function (modeName) { - var mode = aesModes[modeName] - runIvTest(modeName, mode.key / 8, mode.iv) -}) -Object.keys(desModes).forEach(function (modeName) { - var mode = desModes[modeName] - runIvTest(modeName, mode.key, mode.iv) -}) diff --git a/node_modules/browserify-des/index.js b/node_modules/browserify-des/index.js deleted file mode 100644 index 2889bb77..00000000 --- a/node_modules/browserify-des/index.js +++ /dev/null @@ -1,43 +0,0 @@ -var CipherBase = require('cipher-base') -var des = require('des.js') -var inherits = require('inherits') - -var modes = { - 'des-ede3-cbc': des.CBC.instantiate(des.EDE), - 'des-ede3': des.EDE, - 'des-ede-cbc': des.CBC.instantiate(des.EDE), - 'des-ede': des.EDE, - 'des-cbc': des.CBC.instantiate(des.DES), - 'des-ecb': des.DES -} -modes.des = modes['des-cbc'] -modes.des3 = modes['des-ede3-cbc'] -module.exports = DES -inherits(DES, CipherBase) -function DES (opts) { - CipherBase.call(this) - var modeName = opts.mode.toLowerCase() - var mode = modes[modeName] - var type - if (opts.decrypt) { - type = 'decrypt' - } else { - type = 'encrypt' - } - var key = opts.key - if (modeName === 'des-ede' || modeName === 'des-ede-cbc') { - key = Buffer.concat([key, key.slice(0, 8)]) - } - var iv = opts.iv - this._des = mode.create({ - key: key, - iv: iv, - type: type - }) -} -DES.prototype._update = function (data) { - return new Buffer(this._des.update(data)) -} -DES.prototype._final = function () { - return new Buffer(this._des.final()) -} diff --git a/node_modules/browserify-des/modes.js b/node_modules/browserify-des/modes.js deleted file mode 100644 index 72f308de..00000000 --- a/node_modules/browserify-des/modes.js +++ /dev/null @@ -1,24 +0,0 @@ -exports['des-ecb'] = { - key: 8, - iv: 0 -} -exports['des-cbc'] = exports.des = { - key: 8, - iv: 8 -} -exports['des-ede3-cbc'] = exports.des3 = { - key: 24, - iv: 8 -} -exports['des-ede3'] = { - key: 24, - iv: 0 -} -exports['des-ede-cbc'] = { - key: 16, - iv: 8 -} -exports['des-ede'] = { - key: 16, - iv: 0 -} diff --git a/node_modules/browserify-des/package.json b/node_modules/browserify-des/package.json deleted file mode 100644 index 708dff72..00000000 --- a/node_modules/browserify-des/package.json +++ /dev/null @@ -1,89 +0,0 @@ -{ - "_args": [ - [ - { - "raw": "browserify-des@^1.0.0", - "scope": null, - "escapedName": "browserify-des", - "name": "browserify-des", - "rawSpec": "^1.0.0", - "spec": ">=1.0.0 <2.0.0", - "type": "range" - }, - "/Users/benjaminarias/Desktop/poly/node_modules/browserify-cipher" - ] - ], - "_from": "browserify-des@>=1.0.0 <2.0.0", - "_id": "browserify-des@1.0.0", - "_inCache": true, - "_installable": true, - "_location": "/browserify-des", - "_nodeVersion": "4.1.1", - "_npmUser": { - "name": "cwmma", - "email": "calvin.metcalf@gmail.com" - }, - "_npmVersion": "2.14.4", - "_phantomChildren": {}, - "_requested": { - "raw": "browserify-des@^1.0.0", - "scope": null, - "escapedName": "browserify-des", - "name": "browserify-des", - "rawSpec": "^1.0.0", - "spec": ">=1.0.0 <2.0.0", - "type": "range" - }, - "_requiredBy": [ - "/browserify-cipher" - ], - "_resolved": "https://registry.npmjs.org/browserify-des/-/browserify-des-1.0.0.tgz", - "_shasum": "daa277717470922ed2fe18594118a175439721dd", - "_shrinkwrap": null, - "_spec": "browserify-des@^1.0.0", - "_where": "/Users/benjaminarias/Desktop/poly/node_modules/browserify-cipher", - "author": { - "name": "Calvin Metcalf", - "email": "calvin.metcalf@gmail.com" - }, - "bugs": { - "url": "https://github.com/crypto-browserify/browserify-des/issues" - }, - "dependencies": { - "cipher-base": "^1.0.1", - "des.js": "^1.0.0", - "inherits": "^2.0.1" - }, - "description": "browserify-des ===", - "devDependencies": { - "standard": "^5.3.1", - "tap-spec": "^4.1.0", - "tape": "^4.2.0" - }, - "directories": {}, - "dist": { - "shasum": "daa277717470922ed2fe18594118a175439721dd", - "tarball": "https://registry.npmjs.org/browserify-des/-/browserify-des-1.0.0.tgz" - }, - "gitHead": "ec4fc6ad180ab43efe687bdb6e84100d048c9c53", - "homepage": "https://github.com/crypto-browserify/browserify-des#readme", - "license": "MIT", - "main": "index.js", - "maintainers": [ - { - "name": "cwmma", - "email": "calvin.metcalf@gmail.com" - } - ], - "name": "browserify-des", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git+https://github.com/crypto-browserify/browserify-des.git" - }, - "scripts": { - "test": "standard && node test.js | tspec" - }, - "version": "1.0.0" -} diff --git a/node_modules/browserify-des/readme.md b/node_modules/browserify-des/readme.md deleted file mode 100644 index c29c1b21..00000000 --- a/node_modules/browserify-des/readme.md +++ /dev/null @@ -1,4 +0,0 @@ -browserify-des -=== - -DES for browserify diff --git a/node_modules/browserify-des/test.js b/node_modules/browserify-des/test.js deleted file mode 100644 index 6324f43b..00000000 --- a/node_modules/browserify-des/test.js +++ /dev/null @@ -1,48 +0,0 @@ -var test = require('tape') -var DES = require('./') -var modes = require('./modes') -var crypto = require('crypto') - -Object.keys(modes).forEach(function (mode) { - test(mode, function (t) { - var i = 0 - while (++i < 10) { - runOnce(i) - } - function runOnce (i) { - t.test('run: ' + i, function (t) { - t.plan(2) - var key = crypto.randomBytes(modes[mode].key) - var iv = crypto.randomBytes(modes[mode].iv) - var text = crypto.randomBytes(200) - var ourEncrypt - try { - ourEncrypt = new DES({ - mode: mode, - key: key, - iv: iv - }) - } catch (e) { - t.notOk(e, e.stack) - } - var nodeEncrypt - try { - nodeEncrypt = crypto.createCipheriv(mode, key, iv) - } catch (e) { - t.notOk(e, e.stack) - } - var ourCipherText = Buffer.concat([ourEncrypt.update(text), ourEncrypt.final()]) - var nodeCipherText = Buffer.concat([nodeEncrypt.update(text), nodeEncrypt.final()]) - t.equals(nodeCipherText.toString('hex'), ourCipherText.toString('hex')) - var ourDecrypt = new DES({ - mode: mode, - key: key, - iv: iv, - decrypt: true - }) - var plainText = Buffer.concat([ourDecrypt.update(ourCipherText), ourDecrypt.final()]) - t.equals(text.toString('hex'), plainText.toString('hex')) - }) - } - }) -}) diff --git a/node_modules/browserify-fs/.npmignore b/node_modules/browserify-fs/.npmignore deleted file mode 100644 index 3c3629e6..00000000 --- a/node_modules/browserify-fs/.npmignore +++ /dev/null @@ -1 +0,0 @@ -node_modules diff --git a/node_modules/browserify-fs/README.md b/node_modules/browserify-fs/README.md deleted file mode 100644 index 72ca852e..00000000 --- a/node_modules/browserify-fs/README.md +++ /dev/null @@ -1,33 +0,0 @@ -# browserify-fs - -[fs](http://nodejs.org/api/fs.html) for the browser using [level-filesystem](https://github.com/mafintosh/level-filesystem) and [browserify](https://github.com/substack/node-browserify) - - npm install browserify-fs - -## Usage - -To use simply require it and use it as you would fs - -``` js -var fs = require('browserify-fs'); - -fs.mkdir('/home', function() { - fs.writeFile('/home/hello-world.txt', 'Hello world!\n', function() { - fs.readFile('/home/hello-world.txt', 'utf-8', function(err, data) { - console.log(data); - }); - }); -}); -``` - -You can also make browserify replace `require('fs')` with browserify-fs using - - browserify -r fs:browserify-fs - -Using the replacement you browserify modules like [tar-fs](https://github.com/mafintosh/tar-fs) and [mkdirp](https://github.com/substack/node-mkdirp)! - -Checkout [level-filesystem](https://github.com/mafintosh/level-filesystem) to see which browsers are supported - -## License - -MIT \ No newline at end of file diff --git a/node_modules/browserify-fs/example.js b/node_modules/browserify-fs/example.js deleted file mode 100644 index e8538587..00000000 --- a/node_modules/browserify-fs/example.js +++ /dev/null @@ -1,9 +0,0 @@ -var fs = require('browserify-fs'); - -fs.mkdir('/home', function() { - fs.writeFile('/home/hello-world.txt', 'Hello world!\n', function() { - fs.readFile('/home/hello-world.txt', 'utf-8', function(err, data) { - console.log(data); - }); - }); -}); diff --git a/node_modules/browserify-fs/index.js b/node_modules/browserify-fs/index.js deleted file mode 100644 index 44060085..00000000 --- a/node_modules/browserify-fs/index.js +++ /dev/null @@ -1,6 +0,0 @@ -var leveljs = require('level-js'); -var levelup = require('levelup'); -var fs = require('level-filesystem'); - -var db = levelup('level-filesystem', {db:leveljs}); -module.exports = fs(db); \ No newline at end of file diff --git a/node_modules/browserify-fs/node_modules/level-filesystem/.npmignore b/node_modules/browserify-fs/node_modules/level-filesystem/.npmignore deleted file mode 100644 index 626cab59..00000000 --- a/node_modules/browserify-fs/node_modules/level-filesystem/.npmignore +++ /dev/null @@ -1,4 +0,0 @@ -node_modules -TODO -sandbox.js -out diff --git a/node_modules/browserify-fs/node_modules/level-filesystem/.travis.yml b/node_modules/browserify-fs/node_modules/level-filesystem/.travis.yml deleted file mode 100644 index 17f94330..00000000 --- a/node_modules/browserify-fs/node_modules/level-filesystem/.travis.yml +++ /dev/null @@ -1,5 +0,0 @@ -language: node_js -node_js: - - "0.10" - -script: "npm test" diff --git a/node_modules/browserify-fs/node_modules/level-filesystem/LICENSE b/node_modules/browserify-fs/node_modules/level-filesystem/LICENSE deleted file mode 100644 index 757562ec..00000000 --- a/node_modules/browserify-fs/node_modules/level-filesystem/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2014 Mathias Buus - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. \ No newline at end of file diff --git a/node_modules/browserify-fs/node_modules/level-filesystem/README.md b/node_modules/browserify-fs/node_modules/level-filesystem/README.md deleted file mode 100644 index 02f40431..00000000 --- a/node_modules/browserify-fs/node_modules/level-filesystem/README.md +++ /dev/null @@ -1,107 +0,0 @@ -# level-filesystem - -Full implementation of the fs module on top of leveldb (except sync ops) - - npm install level-filesystem - -[![build status](http://img.shields.io/travis/mafintosh/level-filesystem.svg?style=flat)](http://travis-ci.org/mafintosh/level-filesystem) -![dat](http://img.shields.io/badge/Development%20sponsored%20by-dat-green.svg?style=flat) - - -[![browser support](https://ci.testling.com/mafintosh/level-filesystem.png) -](https://ci.testling.com/mafintosh/level-filesystem) - -## Current status - -All async methods in the fs module are supported and well tested (including links!) - -``` -✓ fs.rmdir(path, callback) -✓ fs.mkdir(path, [mode], callback) -✓ fs.readdir(path, callback) -✓ fs.stat(path, callback) -✓ fs.exists(path, callback) -✓ fs.chmod(path, mode, callback) -✓ fs.chown(path, uid, gid, callback) -✓ fs.rename(oldPath, newPath, callback) -✓ fs.realpath(path, [cache], callback) -✓ fs.readFile(filename, [options], callback) -✓ fs.writeFile(filename, data, [options], callback) -✓ fs.appendFile(filename, data, [options], callback) -✓ fs.utimes(path, atime, mtime, callback) -✓ fs.unlink(path, callback) -✓ fs.createReadStream(path, [options]) -✓ fs.createWriteStream(path, [options]) -✓ fs.truncate(path, len, callback) -✓ fs.watchFile(filename, [options], listener) -✓ fs.unwatchFile(filename, [listener]) -✓ fs.watch(filename, [options], [listener]) -✓ fs.fsync(fd, callback) -✓ fs.write(fd, buffer, offset, length, position, callback) -✓ fs.read(fd, buffer, offset, length, position, callback) -✓ fs.close(fd, callback) -✓ fs.open(path, flags, [mode], callback) -✓ fs.futimes(fd, atime, mtime, callback) -✓ fs.fchown(fd, uid, gid, callback) -✓ fs.ftruncate(fd, len, callback) -✓ fs.fchmod(fd, mode, callback) -✓ fs.fstat(fd, callback) -✓ fs.lchown(path, uid, gid, callback) -✓ fs.lchmod(path, mode, callback) -✓ fs.symlink(srcpath, dstpath, [type], callback) -✓ fs.lstat(path, callback) -✓ fs.readlink(path, callback) -✓ fs.link(srcpath, dstpath, callback) -``` - -If any of the methods do not behave as you would expect please add a test case or open an issue. - -## Usage - -``` js -var filesystem = require('level-filesystem'); -var fs = filesystem(db); // where db is a levelup instance - -// use fs as you would node cores fs module - -fs.mkdir('/hello', function(err) { - if (err) throw err; - fs.writeFile('/hello/world.txt', 'world', function(err) { - if (err) throw err; - fs.readFile('/hello/world.txt', 'utf-8', function(err, data) { - console.log(data); - }); - }); -}); -``` - -## Errors - -When you get an error in a callback it is similar to what you get in Node core fs. - -``` js -fs.mkdir('/hello', function() { - fs.mkdir('/hello', function(err) { - console.log(err); // err.code is EEXIST - }); -}); - -fs.mkdir('/hello', function() { - fs.readFile('/hello', function(err) { - console.log(err); // err.code is EISDIR - }); -}); - -... -``` - -## Relation to level-fs - -The goal of this module is similar to [level-fs](https://github.com/juliangruber/level-fs) and is probably gonna end up as a PR to that module. -I decided to make this as a standalone module (for now) since adding proper directory support to [level-fs](https://github.com/juliangruber/level-fs) -turned out to be non-trivial (more or a less a complete rewrite). - - -## License - -MIT diff --git a/node_modules/browserify-fs/node_modules/level-filesystem/errno.js b/node_modules/browserify-fs/node_modules/level-filesystem/errno.js deleted file mode 100644 index dbaafe28..00000000 --- a/node_modules/browserify-fs/node_modules/level-filesystem/errno.js +++ /dev/null @@ -1,13 +0,0 @@ -var errno = require('errno'); - -Object.keys(errno.code).forEach(function(code) { - var e = errno.code[code]; - - exports[code] = function(path) { - var err = new Error(code+', '+e.description+(path ? ' \''+path+'\'' : '')); - err.errno = e.errno; - err.code = code; - err.path = path; - return err; - }; -}); \ No newline at end of file diff --git a/node_modules/browserify-fs/node_modules/level-filesystem/index.js b/node_modules/browserify-fs/node_modules/level-filesystem/index.js deleted file mode 100644 index cd26b21e..00000000 --- a/node_modules/browserify-fs/node_modules/level-filesystem/index.js +++ /dev/null @@ -1,597 +0,0 @@ -var fwd = require('fwd-stream'); -var sublevel = require('level-sublevel'); -var blobs = require('level-blobs'); -var peek = require('level-peek'); -var once = require('once'); -var octal = require('octal') -var errno = require('./errno'); -var paths = require('./paths'); -var watchers = require('./watchers'); - -var nextTick = function(cb, err, val) { - process.nextTick(function() { - cb(err, val); - }); -}; - -var noop = function() {}; - -module.exports = function(db, opts) { - var fs = {}; - - db = sublevel(db); - - var bl = blobs(db.sublevel('blobs'), opts); - var ps = paths(db.sublevel('stats')); - var links = db.sublevel('links'); - - var listeners = watchers(); - var fds = []; - - var now = Date.now(); - var inc = function() { - return ++now; - }; - - fs.mkdir = function(key, mode, cb) { - if (typeof mode === 'function') return fs.mkdir(key, null, mode); - if (!mode) mode = octal(777); - if (!cb) cb = noop; - - ps.follow(key, function(err, stat, key) { - if (err && err.code !== 'ENOENT') return cb(err); - if (stat) return cb(errno.EEXIST(key)); - - ps.put(key, { - type:'directory', - mode: mode, - size: 4096 - }, listeners.cb(key, cb)); - }); - }; - - fs.rmdir = function(key, cb) { - if (!cb) cb = noop; - ps.follow(key, function(err, stat, key) { - if (err) return cb(err); - fs.readdir(key, function(err, files) { - if (err) return cb(err); - if (files.length) return cb(errno.ENOTEMPTY(key)); - ps.del(key, listeners.cb(key, cb)); - }); - }); - - }; - - fs.readdir = function(key, cb) { - ps.follow(key, function(err, stat, key) { - if (err) return cb(err); - if (!stat) return cb(errno.ENOENT(key)); - if (!stat.isDirectory()) return cb(errno.ENOTDIR(key)); - ps.list(key, cb); - }); - }; - - var stat = function(key, lookup, cb) { - lookup(key, function(err, stat, key) { - if (err) return cb(err); - if (!stat.isFile()) return cb(null, stat); - var blob = stat && stat.blob || key; - bl.size(blob, function(err, size) { - if (err) return cb(err); - stat.size = size; - cb(null, stat); - }); - }); - }; - - fs.stat = function(key, cb) { - stat(key, ps.follow, cb); - }; - - fs.lstat = function(key, cb) { - stat(key, ps.get, cb); - }; - - fs.exists = function(key, cb) { - ps.follow(key, function(err) { - cb(!err); - }); - }; - - var chmod = function(key, lookup, mode, cb) { - if (!cb) cb = noop; - lookup(key, function(err, stat, key) { - if (err) return cb(err); - ps.update(key, {mode:mode}, listeners.cb(key, cb)); - }); - }; - - fs.chmod = function(key, mode, cb) { - chmod(key, ps.follow, mode, cb); - }; - - fs.lchmod = function(key, mode, cb) { - chmod(key, ps.get, mode, cb); - }; - - var chown = function(key, lookup, uid, gid, cb) { - if (!cb) cb = noop; - lookup(key, function(err, stat, key) { - if (err) return cb(err); - ps.update(key, {uid:uid, gid:gid}, listeners.cb(key, cb)); - }); - }; - - fs.chown = function(key, uid, gid, cb) { - chown(key, ps.follow, uid, gid, cb); - }; - - fs.lchown = function(key, uid, gid, cb) { - chown(key, ps.get, uid, gid, cb); - }; - - fs.utimes = function(key, atime, mtime, cb) { - if (!cb) cb = noop; - ps.follow(key, function(err, stat, key) { - if (err) return cb(err); - var upd = {}; - if (atime) upd.atime = atime; - if (mtime) upd.mtime = mtime; - ps.update(key, upd, listeners.cb(key, cb)); - }); - }; - - fs.rename = function(from, to, cb) { - if (!cb) cb = noop; - - ps.follow(from, function(err, statFrom, from) { - if (err) return cb(err); - - var rename = function() { - cb = listeners.cb(to, listeners.cb(from, cb)); - ps.put(to, statFrom, function(err) { - if (err) return cb(err); - ps.del(from, cb); - }); - }; - - ps.follow(to, function(err, statTo, to) { - if (err && err.code !== 'ENOENT') return cb(err); - if (!statTo) return rename(); - if (statFrom.isDirectory() !== statTo.isDirectory()) return cb(errno.EISDIR(from)); - - if (statTo.isDirectory()) { - fs.readdir(to, function(err, list) { - if (err) return cb(err); - if (list.length) return cb(errno.ENOTEMPTY(from)); - rename(); - }); - return; - } - - rename(); - }); - }); - }; - - fs.realpath = function(key, cache, cb) { - if (typeof cache === 'function') return fs.realpath(key, null, cache); - ps.follow(key, function(err, stat, key) { - if (err) return cb(err); - cb(null, key); - }); - }; - - fs.writeFile = function(key, data, opts, cb) { - if (typeof opts === 'function') return fs.writeFile(key, data, null, opts); - if (typeof opts === 'string') opts = {encoding:opts}; - if (!opts) opts = {}; - if (!cb) cb = noop; - - if (!Buffer.isBuffer(data)) data = new Buffer(data, opts.encoding || 'utf-8'); - - var flags = opts.flags || 'w'; - opts.append = flags[0] !== 'w'; - - ps.follow(key, function(err, stat, key) { - if (err && err.code !== 'ENOENT') return cb(err); - if (stat && stat.isDirectory()) return cb(errno.EISDIR(key)); - if (stat && flags[1] === 'x') return cb(errno.EEXIST(key)); - - var blob = stat && stat.blob || key; - ps.writable(key, function(err) { - if (err) return cb(err); - - bl.write(blob, data, opts, function(err) { - if (err) return cb(err); - - ps.put(key, { - ctime: stat && stat.ctime, - mtime: new Date(), - mode: opts.mode || octal(666), - type:'file' - }, listeners.cb(key, cb)); - }); - }); - }); - }; - - fs.appendFile = function(key, data, opts, cb) { - if (typeof opts === 'function') return fs.appendFile(key, data, null, opts); - if (typeof opts === 'string') opts = {encoding:opts}; - if (!opts) opts = {}; - - opts.flags = 'a'; - fs.writeFile(key, data, opts, cb); - }; - - fs.unlink = function(key, cb) { - if (!cb) cb = noop; - - ps.get(key, function(err, stat, key) { - if (err) return cb(err); - if (stat.isDirectory()) return cb(errno.EISDIR(key)); - - var clean = function(target) { - peek(links, {start:target+'\xff', end:target+'\xff\xff'}, function(err) { - if (err) return bl.remove(target, cb); // no more links - cb(); - }); - }; - - var onlink = function() { - var target = stat.link.slice(0, stat.link.indexOf('\xff')); - links.del(stat.link, function(err) { - if (err) return cb(err); - clean(target); - }); - }; - - ps.del(key, listeners.cb(key, function(err) { - if (err) return cb(err); - if (stat.link) return onlink(); - links.del(key+'\xff', function(err) { - if (err) return cb(err); - clean(key); - }); - })); - }); - }; - - fs.readFile = function(key, opts, cb) { - if (typeof opts === 'function') return fs.readFile(key, null, opts); - if (typeof opts === 'string') opts = {encoding:opts}; - if (!opts) opts = {}; - - var encoding = opts.encoding || 'binary'; - var flag = opts.flag || 'r'; - - ps.follow(key, function(err, stat, key) { - if (err) return cb(err); - if (stat.isDirectory()) return cb(errno.EISDIR(key)); - - var blob = stat && stat.blob || key; - bl.read(blob, function(err, data) { - if (err) return cb(err); - cb(null, opts.encoding ? data.toString(opts.encoding) : data); - }); - }); - }; - - fs.createReadStream = function(key, opts) { - if (!opts) opts = {}; - - var closed = false; - var rs = fwd.readable(function(cb) { - ps.follow(key, function(err, stat, key) { - if (err) return cb(err); - if (stat.isDirectory()) return cb(errno.EISDIR(key)); - - var blob = stat && stat.blob || key; - var r = bl.createReadStream(blob, opts); - - rs.emit('open'); - r.on('end', function() { - process.nextTick(function() { - if (!closed) rs.emit('close'); - }); - }); - - cb(null, r); - }); - }); - - rs.on('close', function() { - closed = true; - }); - - return rs; - }; - - fs.createWriteStream = function(key, opts) { - if (!opts) opts = {}; - - var flags = opts.flags || 'w'; - var closed = false; - var mode = opts.mode || octal(666); - - opts.append = flags[0] === 'a'; - - var ws = fwd.writable(function(cb) { - ps.follow(key, function(err, stat, key) { - if (err && err.code !== 'ENOENT') return cb(err); - if (stat && stat.isDirectory()) return cb(errno.EISDIR(key)); - if (stat && flags[1] === 'x') return cb(errno.EEXIST(key)); - - var blob = stat && stat.blob || key; - ps.writable(blob, function(err) { - if (err) return cb(err); - - var ctime = stat ? stat.ctime : new Date(); - var s = { - ctime: ctime, - mtime: new Date(), - mode: mode, - type:'file' - }; - - ps.put(key, s, function(err) { - if (err) return cb(err); - - var w = bl.createWriteStream(blob, opts); - - ws.emit('open'); - w.on('finish', function() { - s.mtime = new Date(); - ps.put(key, s, function() { - listeners.change(key); - if (!closed) ws.emit('close'); - }); - }); - - cb(null, w); - }); - }); - }); - }); - - ws.on('close', function() { - closed = true; - }); - - return ws; - }; - - fs.truncate = function(key, len, cb) { - ps.follow(key, function(err, stat, key) { - if (err) return cb(err); - - var blob = stat && stat.blob || key; - bl.size(blob, function(err, size) { - if (err) return cb(err); - - ps.writable(key, function(err) { - if (err) return cb(err); - - cb = once(listeners.cb(key, cb)); - if (!len) return bl.remove(blob, cb); - - var ws = bl.createWriteStream(blob, { - start:size < len ? len-1 : len - }); - - ws.on('error', cb); - ws.on('finish', cb); - - if (size < len) ws.write(new Buffer([0])); - ws.end(); - }); - }); - }); - }; - - fs.watchFile = function(key, opts, cb) { - if (typeof opts === 'function') return fs.watchFile(key, null, opts); - return listeners.watch(ps.normalize(key), cb); - }; - - fs.unwatchFile = function(key, cb) { - listeners.unwatch(ps.normalize(key), cb); - }; - - fs.watch = function(key, opts, cb) { - if (typeof opts === 'function') return fs.watch(key, null, opts) - return listeners.watcher(ps.normalize(key), cb); - }; - - fs.notify = function(cb) { - listeners.on('change', cb) - } - - fs.open = function(key, flags, mode, cb) { - if (typeof mode === 'function') return fs.open(key, flags, null, mode); - - ps.follow(key, function(err, stat, key) { - if (err && err.code !== 'ENOENT') return cb(err); - - var fl = flags[0]; - var plus = flags[1] === '+' || flags[2] === '+'; - var blob = stat && stat.blob || key; - - var f = { - key: key, - blob: blob, - mode: mode || octal(666), - readable: fl === 'r' || ((fl === 'w' || fl === 'a') && plus), - writable: fl === 'w' || fl === 'a' || (fl === 'r' && plus), - append: fl === 'a' - }; - - if (fl === 'r' && err) return cb(err); - if (flags[1] === 'x' && stat) return cb(errno.EEXIST(key)); - if (stat && stat.isDirectory()) return cb(errno.EISDIR(key)); - - bl.size(blob, function(err, size) { - if (err) return cb(err); - - if (f.append) f.writePos = size; - - ps.writable(key, function(err) { - if (err) return cb(err); - - var onready = function(err) { - if (err) return cb(err); - - var i = fds.indexOf(null); - if (i === -1) i = 10+fds.push(fds.length+10)-1; - - f.fd = i; - fds[i] = f; - listeners.change(key); - - cb(null, f.fd); - }; - - var ontruncate = function(err) { - if (err) return cb(err); - if (stat) return onready(); - ps.put(blob, {ctime:stat && stat.ctime, type:'file'}, onready); - }; - - if (!f.append && f.writable) return bl.remove(blob, ontruncate); - ontruncate(); - }); - }); - }); - }; - - fs.close = function(fd, cb) { - var f = fds[fd]; - if (!f) return nextTick(cb, errno.EBADF()); - - fds[fd] = null; - nextTick(listeners.cb(f.key, cb)); - }; - - fs.write = function(fd, buf, off, len, pos, cb) { - var f = fds[fd]; - if (!cb) cb = noop; - if (!f || !f.writable) return nextTick(cb, errno.EBADF()); - - if (pos === null) pos = f.writePos || 0; - - var slice = buf.slice(off, off+len); - f.writePos = pos + slice.length; - - bl.write(f.blob, slice, {start:pos, append:true}, function(err) { - if (err) return cb(err); - cb(null, len, buf); - }); - }; - - fs.read = function(fd, buf, off, len, pos, cb) { - var f = fds[fd]; - if (!cb) cb = noop; - if (!f || !f.readable) return nextTick(cb, errno.EBADF()); - - if (pos === null) pos = fs.readPos || 0; - - bl.read(f.blob, {start:pos, end:pos+len-1}, function(err, read) { - if (err) return cb(err); - var slice = read.slice(0, len); - slice.copy(buf, off); - fs.readPos = pos+slice.length; - cb(null, slice.length, buf); - }); - }; - - fs.fsync = function(fd, cb) { - var f = fds[fd]; - if (!cb) cb = noop; - if (!f || !f.writable) return nextTick(cb, errno.EBADF()); - - nextTick(cb); - }; - - fs.ftruncate = function(fd, len, cb) { - var f = fds[fd]; - if (!cb) cb = noop; - if (!f) return nextTick(cb, errno.EBADF()); - - fs.truncate(f.blob, len, cb); - }; - - fs.fchown = function(fd, uid, gid, cb) { - var f = fds[fd]; - if (!cb) cb = noop; - if (!f) return nextTick(cb, errno.EBADF()); - - fs.chown(f.key, uid, gid, cb); - }; - - fs.fchmod = function(fd, mode, cb) { - var f = fds[fd]; - if (!cb) cb = noop; - if (!f) return nextTick(cb, errno.EBADF()); - - fs.chmod(f.key, mode, cb); - }; - - fs.futimes = function(fd, atime, mtime, cb) { - var f = fds[fd]; - if (!cb) cb = noop; - if (!f) return nextTick(cb, errno.EBADF()); - - fs.utimes(f.key, atime, mtime, cb); - }; - - fs.fstat = function(fd, cb) { - var f = fds[fd]; - if (!f) return nextTick(cb, errno.EBADF()); - - fs.stat(f.key, cb); - }; - - fs.symlink = function(target, name, cb) { - if (!cb) cb = noop; - ps.follow(target, function(err, stat, target) { - if (err) return cb(err); - ps.get(name, function(err, stat) { - if (err && err.code !== 'ENOENT') return cb(err); - if (stat) return cb(errno.EEXIST(name)); - ps.put(name, {type:'symlink', target:target, mode:octal(777)}, cb); - }); - }); - }; - - fs.readlink = function(key, cb) { - ps.get(key, function(err, stat) { - if (err) return cb(err); - if (!stat.target) return cb(errno.EINVAL(key)); - cb(null, stat.target); - }); - }; - - fs.link = function(target, name, cb) { - if (!cb) cb = noop; - ps.follow(target, function(err, stat, target) { - if (err) return cb(err); - if (!stat.isFile()) return cb(errno.EINVAL(target)); - ps.get(name, function(err, st) { - if (err && err.code !== 'ENOENT') return cb(err); - if (st) return cb(errno.EEXIST(name)); - var link = target+'\xff'+inc(); - links.put(target+'\xff', target, function(err) { - if (err) return cb(err); - links.put(link, target, function(err) { - if (err) return cb(err); - ps.put(name, {type:'file', link:link, blob:target, mode:stat.mode}, cb); - }); - }); - }); - }); - }; - - return fs; -}; diff --git a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/.bin/errno b/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/.bin/errno deleted file mode 120000 index 5a98e539..00000000 --- a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/.bin/errno +++ /dev/null @@ -1 +0,0 @@ -../errno/cli.js \ No newline at end of file diff --git a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/concat-stream/LICENSE b/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/concat-stream/LICENSE deleted file mode 100644 index 99c130e1..00000000 --- a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/concat-stream/LICENSE +++ /dev/null @@ -1,24 +0,0 @@ -The MIT License - -Copyright (c) 2013 Max Ogden - -Permission is hereby granted, free of charge, -to any person obtaining a copy of this software and -associated documentation files (the "Software"), to -deal in the Software without restriction, including -without limitation the rights to use, copy, modify, -merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom -the Software is furnished to do so, -subject to the following conditions: - -The above copyright notice and this permission notice -shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES -OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR -ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/concat-stream/index.js b/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/concat-stream/index.js deleted file mode 100644 index b16ad134..00000000 --- a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/concat-stream/index.js +++ /dev/null @@ -1,143 +0,0 @@ -var Writable = require('readable-stream').Writable -var inherits = require('inherits') - -if (typeof Uint8Array === 'undefined') { - var U8 = require('typedarray').Uint8Array -} else { - var U8 = Uint8Array -} - -function ConcatStream(opts, cb) { - if (!(this instanceof ConcatStream)) return new ConcatStream(opts, cb) - - if (typeof opts === 'function') { - cb = opts - opts = {} - } - if (!opts) opts = {} - - var encoding = opts.encoding - var shouldInferEncoding = false - - if (!encoding) { - shouldInferEncoding = true - } else { - encoding = String(encoding).toLowerCase() - if (encoding === 'u8' || encoding === 'uint8') { - encoding = 'uint8array' - } - } - - Writable.call(this, { objectMode: true }) - - this.encoding = encoding - this.shouldInferEncoding = shouldInferEncoding - - if (cb) this.on('finish', function () { cb(this.getBody()) }) - this.body = [] -} - -module.exports = ConcatStream -inherits(ConcatStream, Writable) - -ConcatStream.prototype._write = function(chunk, enc, next) { - this.body.push(chunk) - next() -} - -ConcatStream.prototype.inferEncoding = function (buff) { - var firstBuffer = buff === undefined ? this.body[0] : buff; - if (Buffer.isBuffer(firstBuffer)) return 'buffer' - if (typeof Uint8Array !== 'undefined' && firstBuffer instanceof Uint8Array) return 'uint8array' - if (Array.isArray(firstBuffer)) return 'array' - if (typeof firstBuffer === 'string') return 'string' - if (Object.prototype.toString.call(firstBuffer) === "[object Object]") return 'object' - return 'buffer' -} - -ConcatStream.prototype.getBody = function () { - if (!this.encoding && this.body.length === 0) return [] - if (this.shouldInferEncoding) this.encoding = this.inferEncoding() - if (this.encoding === 'array') return arrayConcat(this.body) - if (this.encoding === 'string') return stringConcat(this.body) - if (this.encoding === 'buffer') return bufferConcat(this.body) - if (this.encoding === 'uint8array') return u8Concat(this.body) - return this.body -} - -var isArray = Array.isArray || function (arr) { - return Object.prototype.toString.call(arr) == '[object Array]' -} - -function isArrayish (arr) { - return /Array\]$/.test(Object.prototype.toString.call(arr)) -} - -function isBufferish (p) { - return typeof p === 'string' || isArrayish(p) || (p && typeof p.subarray === 'function') -} - -function stringConcat (parts) { - var strings = [] - var needsToString = false - for (var i = 0; i < parts.length; i++) { - var p = parts[i] - if (typeof p === 'string') { - strings.push(p) - } else if (Buffer.isBuffer(p)) { - strings.push(p) - } else if (isBufferish(p)) { - strings.push(new Buffer(p)) - } else { - strings.push(new Buffer(String(p))) - } - } - if (Buffer.isBuffer(parts[0])) { - strings = Buffer.concat(strings) - strings = strings.toString('utf8') - } else { - strings = strings.join('') - } - return strings -} - -function bufferConcat (parts) { - var bufs = [] - for (var i = 0; i < parts.length; i++) { - var p = parts[i] - if (Buffer.isBuffer(p)) { - bufs.push(p) - } else if (isBufferish(p)) { - bufs.push(new Buffer(p)) - } else { - bufs.push(new Buffer(String(p))) - } - } - return Buffer.concat(bufs) -} - -function arrayConcat (parts) { - var res = [] - for (var i = 0; i < parts.length; i++) { - res.push.apply(res, parts[i]) - } - return res -} - -function u8Concat (parts) { - var len = 0 - for (var i = 0; i < parts.length; i++) { - if (typeof parts[i] === 'string') { - parts[i] = new Buffer(parts[i]) - } - len += parts[i].length - } - var u8 = new U8(len) - for (var i = 0, offset = 0; i < parts.length; i++) { - var part = parts[i] - for (var j = 0; j < part.length; j++) { - u8[offset++] = part[j] - } - } - return u8 -} diff --git a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/concat-stream/node_modules/inherits/LICENSE b/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/concat-stream/node_modules/inherits/LICENSE deleted file mode 100644 index dea3013d..00000000 --- a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/concat-stream/node_modules/inherits/LICENSE +++ /dev/null @@ -1,16 +0,0 @@ -The ISC License - -Copyright (c) Isaac Z. Schlueter - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH -REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND -FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, -INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM -LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR -OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR -PERFORMANCE OF THIS SOFTWARE. - diff --git a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/concat-stream/node_modules/inherits/README.md b/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/concat-stream/node_modules/inherits/README.md deleted file mode 100644 index b1c56658..00000000 --- a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/concat-stream/node_modules/inherits/README.md +++ /dev/null @@ -1,42 +0,0 @@ -Browser-friendly inheritance fully compatible with standard node.js -[inherits](http://nodejs.org/api/util.html#util_util_inherits_constructor_superconstructor). - -This package exports standard `inherits` from node.js `util` module in -node environment, but also provides alternative browser-friendly -implementation through [browser -field](https://gist.github.com/shtylman/4339901). Alternative -implementation is a literal copy of standard one located in standalone -module to avoid requiring of `util`. It also has a shim for old -browsers with no `Object.create` support. - -While keeping you sure you are using standard `inherits` -implementation in node.js environment, it allows bundlers such as -[browserify](https://github.com/substack/node-browserify) to not -include full `util` package to your client code if all you need is -just `inherits` function. It worth, because browser shim for `util` -package is large and `inherits` is often the single function you need -from it. - -It's recommended to use this package instead of -`require('util').inherits` for any code that has chances to be used -not only in node.js but in browser too. - -## usage - -```js -var inherits = require('inherits'); -// then use exactly as the standard one -``` - -## note on version ~1.0 - -Version ~1.0 had completely different motivation and is not compatible -neither with 2.0 nor with standard node.js `inherits`. - -If you are using version ~1.0 and planning to switch to ~2.0, be -careful: - -* new version uses `super_` instead of `super` for referencing - superclass -* new version overwrites current prototype while old one preserves any - existing fields on it diff --git a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/concat-stream/node_modules/inherits/inherits.js b/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/concat-stream/node_modules/inherits/inherits.js deleted file mode 100644 index 3b94763a..00000000 --- a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/concat-stream/node_modules/inherits/inherits.js +++ /dev/null @@ -1,7 +0,0 @@ -try { - var util = require('util'); - if (typeof util.inherits !== 'function') throw ''; - module.exports = util.inherits; -} catch (e) { - module.exports = require('./inherits_browser.js'); -} diff --git a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/concat-stream/node_modules/inherits/inherits_browser.js b/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/concat-stream/node_modules/inherits/inherits_browser.js deleted file mode 100644 index c1e78a75..00000000 --- a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/concat-stream/node_modules/inherits/inherits_browser.js +++ /dev/null @@ -1,23 +0,0 @@ -if (typeof Object.create === 'function') { - // implementation from standard node.js 'util' module - module.exports = function inherits(ctor, superCtor) { - ctor.super_ = superCtor - ctor.prototype = Object.create(superCtor.prototype, { - constructor: { - value: ctor, - enumerable: false, - writable: true, - configurable: true - } - }); - }; -} else { - // old school shim for old browsers - module.exports = function inherits(ctor, superCtor) { - ctor.super_ = superCtor - var TempCtor = function () {} - TempCtor.prototype = superCtor.prototype - ctor.prototype = new TempCtor() - ctor.prototype.constructor = ctor - } -} diff --git a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/concat-stream/node_modules/inherits/package.json b/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/concat-stream/node_modules/inherits/package.json deleted file mode 100644 index 2d09e762..00000000 --- a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/concat-stream/node_modules/inherits/package.json +++ /dev/null @@ -1,63 +0,0 @@ -{ - "name": "inherits", - "description": "Browser-friendly inheritance fully compatible with standard node.js inherits()", - "version": "2.0.3", - "keywords": [ - "inheritance", - "class", - "klass", - "oop", - "object-oriented", - "inherits", - "browser", - "browserify" - ], - "main": "./inherits.js", - "browser": "./inherits_browser.js", - "repository": { - "type": "git", - "url": "git://github.com/isaacs/inherits.git" - }, - "license": "ISC", - "scripts": { - "test": "node test" - }, - "devDependencies": { - "tap": "^7.1.0" - }, - "files": [ - "inherits.js", - "inherits_browser.js" - ], - "gitHead": "e05d0fb27c61a3ec687214f0476386b765364d5f", - "bugs": { - "url": "https://github.com/isaacs/inherits/issues" - }, - "homepage": "https://github.com/isaacs/inherits#readme", - "_id": "inherits@2.0.3", - "_shasum": "633c2c83e3da42a502f52466022480f4208261de", - "_from": "inherits@>=2.0.3 <3.0.0", - "_npmVersion": "3.10.7", - "_nodeVersion": "6.5.0", - "_npmUser": { - "name": "isaacs", - "email": "i@izs.me" - }, - "dist": { - "shasum": "633c2c83e3da42a502f52466022480f4208261de", - "tarball": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz" - }, - "maintainers": [ - { - "name": "isaacs", - "email": "i@izs.me" - } - ], - "_npmOperationalInternal": { - "host": "packages-16-east.internal.npmjs.com", - "tmp": "tmp/inherits-2.0.3.tgz_1473295776489_0.08142363070510328" - }, - "directories": {}, - "_resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", - "readme": "ERROR: No README data found!" -} diff --git a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/concat-stream/node_modules/readable-stream/.npmignore b/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/concat-stream/node_modules/readable-stream/.npmignore deleted file mode 100644 index 6d270c6c..00000000 --- a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/concat-stream/node_modules/readable-stream/.npmignore +++ /dev/null @@ -1,9 +0,0 @@ -build/ -test/ -examples/ -fs.js -zlib.js -.zuul.yml -.nyc_output -coverage -docs/ diff --git a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/concat-stream/node_modules/readable-stream/.travis.yml b/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/concat-stream/node_modules/readable-stream/.travis.yml deleted file mode 100644 index 84504c98..00000000 --- a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/concat-stream/node_modules/readable-stream/.travis.yml +++ /dev/null @@ -1,49 +0,0 @@ -sudo: false -language: node_js -before_install: - - npm install -g npm@2 - - npm install -g npm -notifications: - email: false -matrix: - fast_finish: true - include: - - node_js: '0.8' - env: TASK=test - - node_js: '0.10' - env: TASK=test - - node_js: '0.11' - env: TASK=test - - node_js: '0.12' - env: TASK=test - - node_js: 1 - env: TASK=test - - node_js: 2 - env: TASK=test - - node_js: 3 - env: TASK=test - - node_js: 4 - env: TASK=test - - node_js: 5 - env: TASK=test - - node_js: 6 - env: TASK=test - - node_js: 5 - env: TASK=browser BROWSER_NAME=android BROWSER_VERSION="4.0..latest" - - node_js: 5 - env: TASK=browser BROWSER_NAME=ie BROWSER_VERSION="9..latest" - - node_js: 5 - env: TASK=browser BROWSER_NAME=opera BROWSER_VERSION="11..latest" - - node_js: 5 - env: TASK=browser BROWSER_NAME=chrome BROWSER_VERSION="-3..latest" - - node_js: 5 - env: TASK=browser BROWSER_NAME=firefox BROWSER_VERSION="-3..latest" - - node_js: 5 - env: TASK=browser BROWSER_NAME=safari BROWSER_VERSION="5..latest" - - node_js: 5 - env: TASK=browser BROWSER_NAME=microsoftedge BROWSER_VERSION=latest -script: "npm run $TASK" -env: - global: - - secure: rE2Vvo7vnjabYNULNyLFxOyt98BoJexDqsiOnfiD6kLYYsiQGfr/sbZkPMOFm9qfQG7pjqx+zZWZjGSswhTt+626C0t/njXqug7Yps4c3dFblzGfreQHp7wNX5TFsvrxd6dAowVasMp61sJcRnB2w8cUzoe3RAYUDHyiHktwqMc= - - secure: g9YINaKAdMatsJ28G9jCGbSaguXCyxSTy+pBO6Ch0Cf57ZLOTka3HqDj8p3nV28LUIHZ3ut5WO43CeYKwt4AUtLpBS3a0dndHdY6D83uY6b2qh5hXlrcbeQTq2cvw2y95F7hm4D1kwrgZ7ViqaKggRcEupAL69YbJnxeUDKWEdI= diff --git a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/concat-stream/node_modules/readable-stream/LICENSE b/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/concat-stream/node_modules/readable-stream/LICENSE deleted file mode 100644 index e3d4e695..00000000 --- a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/concat-stream/node_modules/readable-stream/LICENSE +++ /dev/null @@ -1,18 +0,0 @@ -Copyright Joyent, Inc. and other Node contributors. All rights reserved. -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to -deal in the Software without restriction, including without limitation the -rights to use, copy, modify, merge, publish, distribute, sublicense, and/or -sell copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS -IN THE SOFTWARE. diff --git a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/concat-stream/node_modules/readable-stream/README.md b/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/concat-stream/node_modules/readable-stream/README.md deleted file mode 100644 index 9be2adb1..00000000 --- a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/concat-stream/node_modules/readable-stream/README.md +++ /dev/null @@ -1,40 +0,0 @@ -# readable-stream - -***Node-core v7.0.0 streams for userland*** [![Build Status](https://travis-ci.org/nodejs/readable-stream.svg?branch=master)](https://travis-ci.org/nodejs/readable-stream) - - -[![NPM](https://nodei.co/npm/readable-stream.png?downloads=true&downloadRank=true)](https://nodei.co/npm/readable-stream/) -[![NPM](https://nodei.co/npm-dl/readable-stream.png?&months=6&height=3)](https://nodei.co/npm/readable-stream/) - - -[![Sauce Test Status](https://saucelabs.com/browser-matrix/readable-stream.svg)](https://saucelabs.com/u/readable-stream) - -```bash -npm install --save readable-stream -``` - -***Node-core streams for userland*** - -This package is a mirror of the Streams2 and Streams3 implementations in -Node-core. - -Full documentation may be found on the [Node.js website](https://nodejs.org/dist/v7.1.0/docs/api/). - -If you want to guarantee a stable streams base, regardless of what version of -Node you, or the users of your libraries are using, use **readable-stream** *only* and avoid the *"stream"* module in Node-core, for background see [this blogpost](http://r.va.gg/2014/06/why-i-dont-use-nodes-core-stream-module.html). - -As of version 2.0.0 **readable-stream** uses semantic versioning. - -# Streams WG Team Members - -* **Chris Dickinson** ([@chrisdickinson](https://github.com/chrisdickinson)) <christopher.s.dickinson@gmail.com> - - Release GPG key: 9554F04D7259F04124DE6B476D5A82AC7E37093B -* **Calvin Metcalf** ([@calvinmetcalf](https://github.com/calvinmetcalf)) <calvin.metcalf@gmail.com> - - Release GPG key: F3EF5F62A87FC27A22E643F714CE4FF5015AA242 -* **Rod Vagg** ([@rvagg](https://github.com/rvagg)) <rod@vagg.org> - - Release GPG key: DD8F2338BAE7501E3DD5AC78C273792F7D83545D -* **Sam Newman** ([@sonewman](https://github.com/sonewman)) <newmansam@outlook.com> -* **Mathias Buus** ([@mafintosh](https://github.com/mafintosh)) <mathiasbuus@gmail.com> -* **Domenic Denicola** ([@domenic](https://github.com/domenic)) <d@domenic.me> -* **Matteo Collina** ([@mcollina](https://github.com/mcollina)) <matteo.collina@gmail.com> - - Release GPG key: 3ABC01543F22DD2239285CDD818674489FBC127E diff --git a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/concat-stream/node_modules/readable-stream/doc/wg-meetings/2015-01-30.md b/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/concat-stream/node_modules/readable-stream/doc/wg-meetings/2015-01-30.md deleted file mode 100644 index 83275f19..00000000 --- a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/concat-stream/node_modules/readable-stream/doc/wg-meetings/2015-01-30.md +++ /dev/null @@ -1,60 +0,0 @@ -# streams WG Meeting 2015-01-30 - -## Links - -* **Google Hangouts Video**: http://www.youtube.com/watch?v=I9nDOSGfwZg -* **GitHub Issue**: https://github.com/iojs/readable-stream/issues/106 -* **Original Minutes Google Doc**: https://docs.google.com/document/d/17aTgLnjMXIrfjgNaTUnHQO7m3xgzHR2VXBTmi03Qii4/ - -## Agenda - -Extracted from https://github.com/iojs/readable-stream/labels/wg-agenda prior to meeting. - -* adopt a charter [#105](https://github.com/iojs/readable-stream/issues/105) -* release and versioning strategy [#101](https://github.com/iojs/readable-stream/issues/101) -* simpler stream creation [#102](https://github.com/iojs/readable-stream/issues/102) -* proposal: deprecate implicit flowing of streams [#99](https://github.com/iojs/readable-stream/issues/99) - -## Minutes - -### adopt a charter - -* group: +1's all around - -### What versioning scheme should be adopted? -* group: +1’s 3.0.0 -* domenic+group: pulling in patches from other sources where appropriate -* mikeal: version independently, suggesting versions for io.js -* mikeal+domenic: work with TC to notify in advance of changes -simpler stream creation - -### streamline creation of streams -* sam: streamline creation of streams -* domenic: nice simple solution posted - but, we lose the opportunity to change the model - may not be backwards incompatible (double check keys) - - **action item:** domenic will check - -### remove implicit flowing of streams on(‘data’) -* add isFlowing / isPaused -* mikeal: worrying that we’re documenting polyfill methods – confuses users -* domenic: more reflective API is probably good, with warning labels for users -* new section for mad scientists (reflective stream access) -* calvin: name the “third state” -* mikeal: maybe borrow the name from whatwg? -* domenic: we’re missing the “third state” -* consensus: kind of difficult to name the third state -* mikeal: figure out differences in states / compat -* mathias: always flow on data – eliminates third state - * explore what it breaks - -**action items:** -* ask isaac for ability to list packages by what public io.js APIs they use (esp. Stream) -* ask rod/build for infrastructure -* **chris**: explore the “flow on data” approach -* add isPaused/isFlowing -* add new docs section -* move isPaused to that section - - diff --git a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/concat-stream/node_modules/readable-stream/duplex.js b/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/concat-stream/node_modules/readable-stream/duplex.js deleted file mode 100644 index ca807af8..00000000 --- a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/concat-stream/node_modules/readable-stream/duplex.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require("./lib/_stream_duplex.js") diff --git a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/concat-stream/node_modules/readable-stream/lib/_stream_duplex.js b/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/concat-stream/node_modules/readable-stream/lib/_stream_duplex.js deleted file mode 100644 index 736693b8..00000000 --- a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/concat-stream/node_modules/readable-stream/lib/_stream_duplex.js +++ /dev/null @@ -1,75 +0,0 @@ -// a duplex stream is just a stream that is both readable and writable. -// Since JS doesn't have multiple prototypal inheritance, this class -// prototypally inherits from Readable, and then parasitically from -// Writable. - -'use strict'; - -/**/ - -var objectKeys = Object.keys || function (obj) { - var keys = []; - for (var key in obj) { - keys.push(key); - }return keys; -}; -/**/ - -module.exports = Duplex; - -/**/ -var processNextTick = require('process-nextick-args'); -/**/ - -/**/ -var util = require('core-util-is'); -util.inherits = require('inherits'); -/**/ - -var Readable = require('./_stream_readable'); -var Writable = require('./_stream_writable'); - -util.inherits(Duplex, Readable); - -var keys = objectKeys(Writable.prototype); -for (var v = 0; v < keys.length; v++) { - var method = keys[v]; - if (!Duplex.prototype[method]) Duplex.prototype[method] = Writable.prototype[method]; -} - -function Duplex(options) { - if (!(this instanceof Duplex)) return new Duplex(options); - - Readable.call(this, options); - Writable.call(this, options); - - if (options && options.readable === false) this.readable = false; - - if (options && options.writable === false) this.writable = false; - - this.allowHalfOpen = true; - if (options && options.allowHalfOpen === false) this.allowHalfOpen = false; - - this.once('end', onend); -} - -// the no-half-open enforcer -function onend() { - // if we allow half-open state, or if the writable side ended, - // then we're ok. - if (this.allowHalfOpen || this._writableState.ended) return; - - // no more data can be written. - // But allow more writes to happen in this tick. - processNextTick(onEndNT, this); -} - -function onEndNT(self) { - self.end(); -} - -function forEach(xs, f) { - for (var i = 0, l = xs.length; i < l; i++) { - f(xs[i], i); - } -} \ No newline at end of file diff --git a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/concat-stream/node_modules/readable-stream/lib/_stream_passthrough.js b/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/concat-stream/node_modules/readable-stream/lib/_stream_passthrough.js deleted file mode 100644 index d06f71f1..00000000 --- a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/concat-stream/node_modules/readable-stream/lib/_stream_passthrough.js +++ /dev/null @@ -1,26 +0,0 @@ -// a passthrough stream. -// basically just the most minimal sort of Transform stream. -// Every written chunk gets output as-is. - -'use strict'; - -module.exports = PassThrough; - -var Transform = require('./_stream_transform'); - -/**/ -var util = require('core-util-is'); -util.inherits = require('inherits'); -/**/ - -util.inherits(PassThrough, Transform); - -function PassThrough(options) { - if (!(this instanceof PassThrough)) return new PassThrough(options); - - Transform.call(this, options); -} - -PassThrough.prototype._transform = function (chunk, encoding, cb) { - cb(null, chunk); -}; \ No newline at end of file diff --git a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/concat-stream/node_modules/readable-stream/lib/_stream_readable.js b/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/concat-stream/node_modules/readable-stream/lib/_stream_readable.js deleted file mode 100644 index 3a7d42d6..00000000 --- a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/concat-stream/node_modules/readable-stream/lib/_stream_readable.js +++ /dev/null @@ -1,941 +0,0 @@ -'use strict'; - -module.exports = Readable; - -/**/ -var processNextTick = require('process-nextick-args'); -/**/ - -/**/ -var isArray = require('isarray'); -/**/ - -/**/ -var Duplex; -/**/ - -Readable.ReadableState = ReadableState; - -/**/ -var EE = require('events').EventEmitter; - -var EElistenerCount = function (emitter, type) { - return emitter.listeners(type).length; -}; -/**/ - -/**/ -var Stream; -(function () { - try { - Stream = require('st' + 'ream'); - } catch (_) {} finally { - if (!Stream) Stream = require('events').EventEmitter; - } -})(); -/**/ - -var Buffer = require('buffer').Buffer; -/**/ -var bufferShim = require('buffer-shims'); -/**/ - -/**/ -var util = require('core-util-is'); -util.inherits = require('inherits'); -/**/ - -/**/ -var debugUtil = require('util'); -var debug = void 0; -if (debugUtil && debugUtil.debuglog) { - debug = debugUtil.debuglog('stream'); -} else { - debug = function () {}; -} -/**/ - -var BufferList = require('./internal/streams/BufferList'); -var StringDecoder; - -util.inherits(Readable, Stream); - -function prependListener(emitter, event, fn) { - // Sadly this is not cacheable as some libraries bundle their own - // event emitter implementation with them. - if (typeof emitter.prependListener === 'function') { - return emitter.prependListener(event, fn); - } else { - // This is a hack to make sure that our error handler is attached before any - // userland ones. NEVER DO THIS. This is here only because this code needs - // to continue to work with older versions of Node.js that do not include - // the prependListener() method. The goal is to eventually remove this hack. - if (!emitter._events || !emitter._events[event]) emitter.on(event, fn);else if (isArray(emitter._events[event])) emitter._events[event].unshift(fn);else emitter._events[event] = [fn, emitter._events[event]]; - } -} - -function ReadableState(options, stream) { - Duplex = Duplex || require('./_stream_duplex'); - - options = options || {}; - - // object stream flag. Used to make read(n) ignore n and to - // make all the buffer merging and length checks go away - this.objectMode = !!options.objectMode; - - if (stream instanceof Duplex) this.objectMode = this.objectMode || !!options.readableObjectMode; - - // the point at which it stops calling _read() to fill the buffer - // Note: 0 is a valid value, means "don't call _read preemptively ever" - var hwm = options.highWaterMark; - var defaultHwm = this.objectMode ? 16 : 16 * 1024; - this.highWaterMark = hwm || hwm === 0 ? hwm : defaultHwm; - - // cast to ints. - this.highWaterMark = ~ ~this.highWaterMark; - - // A linked list is used to store data chunks instead of an array because the - // linked list can remove elements from the beginning faster than - // array.shift() - this.buffer = new BufferList(); - this.length = 0; - this.pipes = null; - this.pipesCount = 0; - this.flowing = null; - this.ended = false; - this.endEmitted = false; - this.reading = false; - - // a flag to be able to tell if the onwrite cb is called immediately, - // or on a later tick. We set this to true at first, because any - // actions that shouldn't happen until "later" should generally also - // not happen before the first write call. - this.sync = true; - - // whenever we return null, then we set a flag to say - // that we're awaiting a 'readable' event emission. - this.needReadable = false; - this.emittedReadable = false; - this.readableListening = false; - this.resumeScheduled = false; - - // Crypto is kind of old and crusty. Historically, its default string - // encoding is 'binary' so we have to make this configurable. - // Everything else in the universe uses 'utf8', though. - this.defaultEncoding = options.defaultEncoding || 'utf8'; - - // when piping, we only care about 'readable' events that happen - // after read()ing all the bytes and not getting any pushback. - this.ranOut = false; - - // the number of writers that are awaiting a drain event in .pipe()s - this.awaitDrain = 0; - - // if true, a maybeReadMore has been scheduled - this.readingMore = false; - - this.decoder = null; - this.encoding = null; - if (options.encoding) { - if (!StringDecoder) StringDecoder = require('string_decoder/').StringDecoder; - this.decoder = new StringDecoder(options.encoding); - this.encoding = options.encoding; - } -} - -function Readable(options) { - Duplex = Duplex || require('./_stream_duplex'); - - if (!(this instanceof Readable)) return new Readable(options); - - this._readableState = new ReadableState(options, this); - - // legacy - this.readable = true; - - if (options && typeof options.read === 'function') this._read = options.read; - - Stream.call(this); -} - -// Manually shove something into the read() buffer. -// This returns true if the highWaterMark has not been hit yet, -// similar to how Writable.write() returns true if you should -// write() some more. -Readable.prototype.push = function (chunk, encoding) { - var state = this._readableState; - - if (!state.objectMode && typeof chunk === 'string') { - encoding = encoding || state.defaultEncoding; - if (encoding !== state.encoding) { - chunk = bufferShim.from(chunk, encoding); - encoding = ''; - } - } - - return readableAddChunk(this, state, chunk, encoding, false); -}; - -// Unshift should *always* be something directly out of read() -Readable.prototype.unshift = function (chunk) { - var state = this._readableState; - return readableAddChunk(this, state, chunk, '', true); -}; - -Readable.prototype.isPaused = function () { - return this._readableState.flowing === false; -}; - -function readableAddChunk(stream, state, chunk, encoding, addToFront) { - var er = chunkInvalid(state, chunk); - if (er) { - stream.emit('error', er); - } else if (chunk === null) { - state.reading = false; - onEofChunk(stream, state); - } else if (state.objectMode || chunk && chunk.length > 0) { - if (state.ended && !addToFront) { - var e = new Error('stream.push() after EOF'); - stream.emit('error', e); - } else if (state.endEmitted && addToFront) { - var _e = new Error('stream.unshift() after end event'); - stream.emit('error', _e); - } else { - var skipAdd; - if (state.decoder && !addToFront && !encoding) { - chunk = state.decoder.write(chunk); - skipAdd = !state.objectMode && chunk.length === 0; - } - - if (!addToFront) state.reading = false; - - // Don't add to the buffer if we've decoded to an empty string chunk and - // we're not in object mode - if (!skipAdd) { - // if we want the data now, just emit it. - if (state.flowing && state.length === 0 && !state.sync) { - stream.emit('data', chunk); - stream.read(0); - } else { - // update the buffer info. - state.length += state.objectMode ? 1 : chunk.length; - if (addToFront) state.buffer.unshift(chunk);else state.buffer.push(chunk); - - if (state.needReadable) emitReadable(stream); - } - } - - maybeReadMore(stream, state); - } - } else if (!addToFront) { - state.reading = false; - } - - return needMoreData(state); -} - -// if it's past the high water mark, we can push in some more. -// Also, if we have no data yet, we can stand some -// more bytes. This is to work around cases where hwm=0, -// such as the repl. Also, if the push() triggered a -// readable event, and the user called read(largeNumber) such that -// needReadable was set, then we ought to push more, so that another -// 'readable' event will be triggered. -function needMoreData(state) { - return !state.ended && (state.needReadable || state.length < state.highWaterMark || state.length === 0); -} - -// backwards compatibility. -Readable.prototype.setEncoding = function (enc) { - if (!StringDecoder) StringDecoder = require('string_decoder/').StringDecoder; - this._readableState.decoder = new StringDecoder(enc); - this._readableState.encoding = enc; - return this; -}; - -// Don't raise the hwm > 8MB -var MAX_HWM = 0x800000; -function computeNewHighWaterMark(n) { - if (n >= MAX_HWM) { - n = MAX_HWM; - } else { - // Get the next highest power of 2 to prevent increasing hwm excessively in - // tiny amounts - n--; - n |= n >>> 1; - n |= n >>> 2; - n |= n >>> 4; - n |= n >>> 8; - n |= n >>> 16; - n++; - } - return n; -} - -// This function is designed to be inlinable, so please take care when making -// changes to the function body. -function howMuchToRead(n, state) { - if (n <= 0 || state.length === 0 && state.ended) return 0; - if (state.objectMode) return 1; - if (n !== n) { - // Only flow one buffer at a time - if (state.flowing && state.length) return state.buffer.head.data.length;else return state.length; - } - // If we're asking for more than the current hwm, then raise the hwm. - if (n > state.highWaterMark) state.highWaterMark = computeNewHighWaterMark(n); - if (n <= state.length) return n; - // Don't have enough - if (!state.ended) { - state.needReadable = true; - return 0; - } - return state.length; -} - -// you can override either this method, or the async _read(n) below. -Readable.prototype.read = function (n) { - debug('read', n); - n = parseInt(n, 10); - var state = this._readableState; - var nOrig = n; - - if (n !== 0) state.emittedReadable = false; - - // if we're doing read(0) to trigger a readable event, but we - // already have a bunch of data in the buffer, then just trigger - // the 'readable' event and move on. - if (n === 0 && state.needReadable && (state.length >= state.highWaterMark || state.ended)) { - debug('read: emitReadable', state.length, state.ended); - if (state.length === 0 && state.ended) endReadable(this);else emitReadable(this); - return null; - } - - n = howMuchToRead(n, state); - - // if we've ended, and we're now clear, then finish it up. - if (n === 0 && state.ended) { - if (state.length === 0) endReadable(this); - return null; - } - - // All the actual chunk generation logic needs to be - // *below* the call to _read. The reason is that in certain - // synthetic stream cases, such as passthrough streams, _read - // may be a completely synchronous operation which may change - // the state of the read buffer, providing enough data when - // before there was *not* enough. - // - // So, the steps are: - // 1. Figure out what the state of things will be after we do - // a read from the buffer. - // - // 2. If that resulting state will trigger a _read, then call _read. - // Note that this may be asynchronous, or synchronous. Yes, it is - // deeply ugly to write APIs this way, but that still doesn't mean - // that the Readable class should behave improperly, as streams are - // designed to be sync/async agnostic. - // Take note if the _read call is sync or async (ie, if the read call - // has returned yet), so that we know whether or not it's safe to emit - // 'readable' etc. - // - // 3. Actually pull the requested chunks out of the buffer and return. - - // if we need a readable event, then we need to do some reading. - var doRead = state.needReadable; - debug('need readable', doRead); - - // if we currently have less than the highWaterMark, then also read some - if (state.length === 0 || state.length - n < state.highWaterMark) { - doRead = true; - debug('length less than watermark', doRead); - } - - // however, if we've ended, then there's no point, and if we're already - // reading, then it's unnecessary. - if (state.ended || state.reading) { - doRead = false; - debug('reading or ended', doRead); - } else if (doRead) { - debug('do read'); - state.reading = true; - state.sync = true; - // if the length is currently zero, then we *need* a readable event. - if (state.length === 0) state.needReadable = true; - // call internal read method - this._read(state.highWaterMark); - state.sync = false; - // If _read pushed data synchronously, then `reading` will be false, - // and we need to re-evaluate how much data we can return to the user. - if (!state.reading) n = howMuchToRead(nOrig, state); - } - - var ret; - if (n > 0) ret = fromList(n, state);else ret = null; - - if (ret === null) { - state.needReadable = true; - n = 0; - } else { - state.length -= n; - } - - if (state.length === 0) { - // If we have nothing in the buffer, then we want to know - // as soon as we *do* get something into the buffer. - if (!state.ended) state.needReadable = true; - - // If we tried to read() past the EOF, then emit end on the next tick. - if (nOrig !== n && state.ended) endReadable(this); - } - - if (ret !== null) this.emit('data', ret); - - return ret; -}; - -function chunkInvalid(state, chunk) { - var er = null; - if (!Buffer.isBuffer(chunk) && typeof chunk !== 'string' && chunk !== null && chunk !== undefined && !state.objectMode) { - er = new TypeError('Invalid non-string/buffer chunk'); - } - return er; -} - -function onEofChunk(stream, state) { - if (state.ended) return; - if (state.decoder) { - var chunk = state.decoder.end(); - if (chunk && chunk.length) { - state.buffer.push(chunk); - state.length += state.objectMode ? 1 : chunk.length; - } - } - state.ended = true; - - // emit 'readable' now to make sure it gets picked up. - emitReadable(stream); -} - -// Don't emit readable right away in sync mode, because this can trigger -// another read() call => stack overflow. This way, it might trigger -// a nextTick recursion warning, but that's not so bad. -function emitReadable(stream) { - var state = stream._readableState; - state.needReadable = false; - if (!state.emittedReadable) { - debug('emitReadable', state.flowing); - state.emittedReadable = true; - if (state.sync) processNextTick(emitReadable_, stream);else emitReadable_(stream); - } -} - -function emitReadable_(stream) { - debug('emit readable'); - stream.emit('readable'); - flow(stream); -} - -// at this point, the user has presumably seen the 'readable' event, -// and called read() to consume some data. that may have triggered -// in turn another _read(n) call, in which case reading = true if -// it's in progress. -// However, if we're not ended, or reading, and the length < hwm, -// then go ahead and try to read some more preemptively. -function maybeReadMore(stream, state) { - if (!state.readingMore) { - state.readingMore = true; - processNextTick(maybeReadMore_, stream, state); - } -} - -function maybeReadMore_(stream, state) { - var len = state.length; - while (!state.reading && !state.flowing && !state.ended && state.length < state.highWaterMark) { - debug('maybeReadMore read 0'); - stream.read(0); - if (len === state.length) - // didn't get any data, stop spinning. - break;else len = state.length; - } - state.readingMore = false; -} - -// abstract method. to be overridden in specific implementation classes. -// call cb(er, data) where data is <= n in length. -// for virtual (non-string, non-buffer) streams, "length" is somewhat -// arbitrary, and perhaps not very meaningful. -Readable.prototype._read = function (n) { - this.emit('error', new Error('_read() is not implemented')); -}; - -Readable.prototype.pipe = function (dest, pipeOpts) { - var src = this; - var state = this._readableState; - - switch (state.pipesCount) { - case 0: - state.pipes = dest; - break; - case 1: - state.pipes = [state.pipes, dest]; - break; - default: - state.pipes.push(dest); - break; - } - state.pipesCount += 1; - debug('pipe count=%d opts=%j', state.pipesCount, pipeOpts); - - var doEnd = (!pipeOpts || pipeOpts.end !== false) && dest !== process.stdout && dest !== process.stderr; - - var endFn = doEnd ? onend : cleanup; - if (state.endEmitted) processNextTick(endFn);else src.once('end', endFn); - - dest.on('unpipe', onunpipe); - function onunpipe(readable) { - debug('onunpipe'); - if (readable === src) { - cleanup(); - } - } - - function onend() { - debug('onend'); - dest.end(); - } - - // when the dest drains, it reduces the awaitDrain counter - // on the source. This would be more elegant with a .once() - // handler in flow(), but adding and removing repeatedly is - // too slow. - var ondrain = pipeOnDrain(src); - dest.on('drain', ondrain); - - var cleanedUp = false; - function cleanup() { - debug('cleanup'); - // cleanup event handlers once the pipe is broken - dest.removeListener('close', onclose); - dest.removeListener('finish', onfinish); - dest.removeListener('drain', ondrain); - dest.removeListener('error', onerror); - dest.removeListener('unpipe', onunpipe); - src.removeListener('end', onend); - src.removeListener('end', cleanup); - src.removeListener('data', ondata); - - cleanedUp = true; - - // if the reader is waiting for a drain event from this - // specific writer, then it would cause it to never start - // flowing again. - // So, if this is awaiting a drain, then we just call it now. - // If we don't know, then assume that we are waiting for one. - if (state.awaitDrain && (!dest._writableState || dest._writableState.needDrain)) ondrain(); - } - - // If the user pushes more data while we're writing to dest then we'll end up - // in ondata again. However, we only want to increase awaitDrain once because - // dest will only emit one 'drain' event for the multiple writes. - // => Introduce a guard on increasing awaitDrain. - var increasedAwaitDrain = false; - src.on('data', ondata); - function ondata(chunk) { - debug('ondata'); - increasedAwaitDrain = false; - var ret = dest.write(chunk); - if (false === ret && !increasedAwaitDrain) { - // If the user unpiped during `dest.write()`, it is possible - // to get stuck in a permanently paused state if that write - // also returned false. - // => Check whether `dest` is still a piping destination. - if ((state.pipesCount === 1 && state.pipes === dest || state.pipesCount > 1 && indexOf(state.pipes, dest) !== -1) && !cleanedUp) { - debug('false write response, pause', src._readableState.awaitDrain); - src._readableState.awaitDrain++; - increasedAwaitDrain = true; - } - src.pause(); - } - } - - // if the dest has an error, then stop piping into it. - // however, don't suppress the throwing behavior for this. - function onerror(er) { - debug('onerror', er); - unpipe(); - dest.removeListener('error', onerror); - if (EElistenerCount(dest, 'error') === 0) dest.emit('error', er); - } - - // Make sure our error handler is attached before userland ones. - prependListener(dest, 'error', onerror); - - // Both close and finish should trigger unpipe, but only once. - function onclose() { - dest.removeListener('finish', onfinish); - unpipe(); - } - dest.once('close', onclose); - function onfinish() { - debug('onfinish'); - dest.removeListener('close', onclose); - unpipe(); - } - dest.once('finish', onfinish); - - function unpipe() { - debug('unpipe'); - src.unpipe(dest); - } - - // tell the dest that it's being piped to - dest.emit('pipe', src); - - // start the flow if it hasn't been started already. - if (!state.flowing) { - debug('pipe resume'); - src.resume(); - } - - return dest; -}; - -function pipeOnDrain(src) { - return function () { - var state = src._readableState; - debug('pipeOnDrain', state.awaitDrain); - if (state.awaitDrain) state.awaitDrain--; - if (state.awaitDrain === 0 && EElistenerCount(src, 'data')) { - state.flowing = true; - flow(src); - } - }; -} - -Readable.prototype.unpipe = function (dest) { - var state = this._readableState; - - // if we're not piping anywhere, then do nothing. - if (state.pipesCount === 0) return this; - - // just one destination. most common case. - if (state.pipesCount === 1) { - // passed in one, but it's not the right one. - if (dest && dest !== state.pipes) return this; - - if (!dest) dest = state.pipes; - - // got a match. - state.pipes = null; - state.pipesCount = 0; - state.flowing = false; - if (dest) dest.emit('unpipe', this); - return this; - } - - // slow case. multiple pipe destinations. - - if (!dest) { - // remove all. - var dests = state.pipes; - var len = state.pipesCount; - state.pipes = null; - state.pipesCount = 0; - state.flowing = false; - - for (var i = 0; i < len; i++) { - dests[i].emit('unpipe', this); - }return this; - } - - // try to find the right one. - var index = indexOf(state.pipes, dest); - if (index === -1) return this; - - state.pipes.splice(index, 1); - state.pipesCount -= 1; - if (state.pipesCount === 1) state.pipes = state.pipes[0]; - - dest.emit('unpipe', this); - - return this; -}; - -// set up data events if they are asked for -// Ensure readable listeners eventually get something -Readable.prototype.on = function (ev, fn) { - var res = Stream.prototype.on.call(this, ev, fn); - - if (ev === 'data') { - // Start flowing on next tick if stream isn't explicitly paused - if (this._readableState.flowing !== false) this.resume(); - } else if (ev === 'readable') { - var state = this._readableState; - if (!state.endEmitted && !state.readableListening) { - state.readableListening = state.needReadable = true; - state.emittedReadable = false; - if (!state.reading) { - processNextTick(nReadingNextTick, this); - } else if (state.length) { - emitReadable(this, state); - } - } - } - - return res; -}; -Readable.prototype.addListener = Readable.prototype.on; - -function nReadingNextTick(self) { - debug('readable nexttick read 0'); - self.read(0); -} - -// pause() and resume() are remnants of the legacy readable stream API -// If the user uses them, then switch into old mode. -Readable.prototype.resume = function () { - var state = this._readableState; - if (!state.flowing) { - debug('resume'); - state.flowing = true; - resume(this, state); - } - return this; -}; - -function resume(stream, state) { - if (!state.resumeScheduled) { - state.resumeScheduled = true; - processNextTick(resume_, stream, state); - } -} - -function resume_(stream, state) { - if (!state.reading) { - debug('resume read 0'); - stream.read(0); - } - - state.resumeScheduled = false; - state.awaitDrain = 0; - stream.emit('resume'); - flow(stream); - if (state.flowing && !state.reading) stream.read(0); -} - -Readable.prototype.pause = function () { - debug('call pause flowing=%j', this._readableState.flowing); - if (false !== this._readableState.flowing) { - debug('pause'); - this._readableState.flowing = false; - this.emit('pause'); - } - return this; -}; - -function flow(stream) { - var state = stream._readableState; - debug('flow', state.flowing); - while (state.flowing && stream.read() !== null) {} -} - -// wrap an old-style stream as the async data source. -// This is *not* part of the readable stream interface. -// It is an ugly unfortunate mess of history. -Readable.prototype.wrap = function (stream) { - var state = this._readableState; - var paused = false; - - var self = this; - stream.on('end', function () { - debug('wrapped end'); - if (state.decoder && !state.ended) { - var chunk = state.decoder.end(); - if (chunk && chunk.length) self.push(chunk); - } - - self.push(null); - }); - - stream.on('data', function (chunk) { - debug('wrapped data'); - if (state.decoder) chunk = state.decoder.write(chunk); - - // don't skip over falsy values in objectMode - if (state.objectMode && (chunk === null || chunk === undefined)) return;else if (!state.objectMode && (!chunk || !chunk.length)) return; - - var ret = self.push(chunk); - if (!ret) { - paused = true; - stream.pause(); - } - }); - - // proxy all the other methods. - // important when wrapping filters and duplexes. - for (var i in stream) { - if (this[i] === undefined && typeof stream[i] === 'function') { - this[i] = function (method) { - return function () { - return stream[method].apply(stream, arguments); - }; - }(i); - } - } - - // proxy certain important events. - var events = ['error', 'close', 'destroy', 'pause', 'resume']; - forEach(events, function (ev) { - stream.on(ev, self.emit.bind(self, ev)); - }); - - // when we try to consume some more bytes, simply unpause the - // underlying stream. - self._read = function (n) { - debug('wrapped _read', n); - if (paused) { - paused = false; - stream.resume(); - } - }; - - return self; -}; - -// exposed for testing purposes only. -Readable._fromList = fromList; - -// Pluck off n bytes from an array of buffers. -// Length is the combined lengths of all the buffers in the list. -// This function is designed to be inlinable, so please take care when making -// changes to the function body. -function fromList(n, state) { - // nothing buffered - if (state.length === 0) return null; - - var ret; - if (state.objectMode) ret = state.buffer.shift();else if (!n || n >= state.length) { - // read it all, truncate the list - if (state.decoder) ret = state.buffer.join('');else if (state.buffer.length === 1) ret = state.buffer.head.data;else ret = state.buffer.concat(state.length); - state.buffer.clear(); - } else { - // read part of list - ret = fromListPartial(n, state.buffer, state.decoder); - } - - return ret; -} - -// Extracts only enough buffered data to satisfy the amount requested. -// This function is designed to be inlinable, so please take care when making -// changes to the function body. -function fromListPartial(n, list, hasStrings) { - var ret; - if (n < list.head.data.length) { - // slice is the same for buffers and strings - ret = list.head.data.slice(0, n); - list.head.data = list.head.data.slice(n); - } else if (n === list.head.data.length) { - // first chunk is a perfect match - ret = list.shift(); - } else { - // result spans more than one buffer - ret = hasStrings ? copyFromBufferString(n, list) : copyFromBuffer(n, list); - } - return ret; -} - -// Copies a specified amount of characters from the list of buffered data -// chunks. -// This function is designed to be inlinable, so please take care when making -// changes to the function body. -function copyFromBufferString(n, list) { - var p = list.head; - var c = 1; - var ret = p.data; - n -= ret.length; - while (p = p.next) { - var str = p.data; - var nb = n > str.length ? str.length : n; - if (nb === str.length) ret += str;else ret += str.slice(0, n); - n -= nb; - if (n === 0) { - if (nb === str.length) { - ++c; - if (p.next) list.head = p.next;else list.head = list.tail = null; - } else { - list.head = p; - p.data = str.slice(nb); - } - break; - } - ++c; - } - list.length -= c; - return ret; -} - -// Copies a specified amount of bytes from the list of buffered data chunks. -// This function is designed to be inlinable, so please take care when making -// changes to the function body. -function copyFromBuffer(n, list) { - var ret = bufferShim.allocUnsafe(n); - var p = list.head; - var c = 1; - p.data.copy(ret); - n -= p.data.length; - while (p = p.next) { - var buf = p.data; - var nb = n > buf.length ? buf.length : n; - buf.copy(ret, ret.length - n, 0, nb); - n -= nb; - if (n === 0) { - if (nb === buf.length) { - ++c; - if (p.next) list.head = p.next;else list.head = list.tail = null; - } else { - list.head = p; - p.data = buf.slice(nb); - } - break; - } - ++c; - } - list.length -= c; - return ret; -} - -function endReadable(stream) { - var state = stream._readableState; - - // If we get here before consuming all the bytes, then that is a - // bug in node. Should never happen. - if (state.length > 0) throw new Error('"endReadable()" called on non-empty stream'); - - if (!state.endEmitted) { - state.ended = true; - processNextTick(endReadableNT, state, stream); - } -} - -function endReadableNT(state, stream) { - // Check that we didn't get one last unshift. - if (!state.endEmitted && state.length === 0) { - state.endEmitted = true; - stream.readable = false; - stream.emit('end'); - } -} - -function forEach(xs, f) { - for (var i = 0, l = xs.length; i < l; i++) { - f(xs[i], i); - } -} - -function indexOf(xs, x) { - for (var i = 0, l = xs.length; i < l; i++) { - if (xs[i] === x) return i; - } - return -1; -} \ No newline at end of file diff --git a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/concat-stream/node_modules/readable-stream/lib/_stream_transform.js b/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/concat-stream/node_modules/readable-stream/lib/_stream_transform.js deleted file mode 100644 index cd258320..00000000 --- a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/concat-stream/node_modules/readable-stream/lib/_stream_transform.js +++ /dev/null @@ -1,182 +0,0 @@ -// a transform stream is a readable/writable stream where you do -// something with the data. Sometimes it's called a "filter", -// but that's not a great name for it, since that implies a thing where -// some bits pass through, and others are simply ignored. (That would -// be a valid example of a transform, of course.) -// -// While the output is causally related to the input, it's not a -// necessarily symmetric or synchronous transformation. For example, -// a zlib stream might take multiple plain-text writes(), and then -// emit a single compressed chunk some time in the future. -// -// Here's how this works: -// -// The Transform stream has all the aspects of the readable and writable -// stream classes. When you write(chunk), that calls _write(chunk,cb) -// internally, and returns false if there's a lot of pending writes -// buffered up. When you call read(), that calls _read(n) until -// there's enough pending readable data buffered up. -// -// In a transform stream, the written data is placed in a buffer. When -// _read(n) is called, it transforms the queued up data, calling the -// buffered _write cb's as it consumes chunks. If consuming a single -// written chunk would result in multiple output chunks, then the first -// outputted bit calls the readcb, and subsequent chunks just go into -// the read buffer, and will cause it to emit 'readable' if necessary. -// -// This way, back-pressure is actually determined by the reading side, -// since _read has to be called to start processing a new chunk. However, -// a pathological inflate type of transform can cause excessive buffering -// here. For example, imagine a stream where every byte of input is -// interpreted as an integer from 0-255, and then results in that many -// bytes of output. Writing the 4 bytes {ff,ff,ff,ff} would result in -// 1kb of data being output. In this case, you could write a very small -// amount of input, and end up with a very large amount of output. In -// such a pathological inflating mechanism, there'd be no way to tell -// the system to stop doing the transform. A single 4MB write could -// cause the system to run out of memory. -// -// However, even in such a pathological case, only a single written chunk -// would be consumed, and then the rest would wait (un-transformed) until -// the results of the previous transformed chunk were consumed. - -'use strict'; - -module.exports = Transform; - -var Duplex = require('./_stream_duplex'); - -/**/ -var util = require('core-util-is'); -util.inherits = require('inherits'); -/**/ - -util.inherits(Transform, Duplex); - -function TransformState(stream) { - this.afterTransform = function (er, data) { - return afterTransform(stream, er, data); - }; - - this.needTransform = false; - this.transforming = false; - this.writecb = null; - this.writechunk = null; - this.writeencoding = null; -} - -function afterTransform(stream, er, data) { - var ts = stream._transformState; - ts.transforming = false; - - var cb = ts.writecb; - - if (!cb) return stream.emit('error', new Error('no writecb in Transform class')); - - ts.writechunk = null; - ts.writecb = null; - - if (data !== null && data !== undefined) stream.push(data); - - cb(er); - - var rs = stream._readableState; - rs.reading = false; - if (rs.needReadable || rs.length < rs.highWaterMark) { - stream._read(rs.highWaterMark); - } -} - -function Transform(options) { - if (!(this instanceof Transform)) return new Transform(options); - - Duplex.call(this, options); - - this._transformState = new TransformState(this); - - var stream = this; - - // start out asking for a readable event once data is transformed. - this._readableState.needReadable = true; - - // we have implemented the _read method, and done the other things - // that Readable wants before the first _read call, so unset the - // sync guard flag. - this._readableState.sync = false; - - if (options) { - if (typeof options.transform === 'function') this._transform = options.transform; - - if (typeof options.flush === 'function') this._flush = options.flush; - } - - // When the writable side finishes, then flush out anything remaining. - this.once('prefinish', function () { - if (typeof this._flush === 'function') this._flush(function (er, data) { - done(stream, er, data); - });else done(stream); - }); -} - -Transform.prototype.push = function (chunk, encoding) { - this._transformState.needTransform = false; - return Duplex.prototype.push.call(this, chunk, encoding); -}; - -// This is the part where you do stuff! -// override this function in implementation classes. -// 'chunk' is an input chunk. -// -// Call `push(newChunk)` to pass along transformed output -// to the readable side. You may call 'push' zero or more times. -// -// Call `cb(err)` when you are done with this chunk. If you pass -// an error, then that'll put the hurt on the whole operation. If you -// never call cb(), then you'll never get another chunk. -Transform.prototype._transform = function (chunk, encoding, cb) { - throw new Error('_transform() is not implemented'); -}; - -Transform.prototype._write = function (chunk, encoding, cb) { - var ts = this._transformState; - ts.writecb = cb; - ts.writechunk = chunk; - ts.writeencoding = encoding; - if (!ts.transforming) { - var rs = this._readableState; - if (ts.needTransform || rs.needReadable || rs.length < rs.highWaterMark) this._read(rs.highWaterMark); - } -}; - -// Doesn't matter what the args are here. -// _transform does all the work. -// That we got here means that the readable side wants more data. -Transform.prototype._read = function (n) { - var ts = this._transformState; - - if (ts.writechunk !== null && ts.writecb && !ts.transforming) { - ts.transforming = true; - this._transform(ts.writechunk, ts.writeencoding, ts.afterTransform); - } else { - // mark that we need a transform, so that any data that comes in - // will get processed, now that we've asked for it. - ts.needTransform = true; - } -}; - -function done(stream, er, data) { - if (er) return stream.emit('error', er); - - if (data !== null && data !== undefined) stream.push(data); - - // if there's nothing in the write buffer, then that means - // that nothing more will ever be provided - var ws = stream._writableState; - var ts = stream._transformState; - - if (ws.length) throw new Error('Calling transform done when ws.length != 0'); - - if (ts.transforming) throw new Error('Calling transform done when still transforming'); - - return stream.push(null); -} \ No newline at end of file diff --git a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/concat-stream/node_modules/readable-stream/lib/_stream_writable.js b/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/concat-stream/node_modules/readable-stream/lib/_stream_writable.js deleted file mode 100644 index 4d9c62ba..00000000 --- a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/concat-stream/node_modules/readable-stream/lib/_stream_writable.js +++ /dev/null @@ -1,554 +0,0 @@ -// A bit simpler than readable streams. -// Implement an async ._write(chunk, encoding, cb), and it'll handle all -// the drain event emission and buffering. - -'use strict'; - -module.exports = Writable; - -/**/ -var processNextTick = require('process-nextick-args'); -/**/ - -/**/ -var asyncWrite = !process.browser && ['v0.10', 'v0.9.'].indexOf(process.version.slice(0, 5)) > -1 ? setImmediate : processNextTick; -/**/ - -/**/ -var Duplex; -/**/ - -Writable.WritableState = WritableState; - -/**/ -var util = require('core-util-is'); -util.inherits = require('inherits'); -/**/ - -/**/ -var internalUtil = { - deprecate: require('util-deprecate') -}; -/**/ - -/**/ -var Stream; -(function () { - try { - Stream = require('st' + 'ream'); - } catch (_) {} finally { - if (!Stream) Stream = require('events').EventEmitter; - } -})(); -/**/ - -var Buffer = require('buffer').Buffer; -/**/ -var bufferShim = require('buffer-shims'); -/**/ - -util.inherits(Writable, Stream); - -function nop() {} - -function WriteReq(chunk, encoding, cb) { - this.chunk = chunk; - this.encoding = encoding; - this.callback = cb; - this.next = null; -} - -function WritableState(options, stream) { - Duplex = Duplex || require('./_stream_duplex'); - - options = options || {}; - - // object stream flag to indicate whether or not this stream - // contains buffers or objects. - this.objectMode = !!options.objectMode; - - if (stream instanceof Duplex) this.objectMode = this.objectMode || !!options.writableObjectMode; - - // the point at which write() starts returning false - // Note: 0 is a valid value, means that we always return false if - // the entire buffer is not flushed immediately on write() - var hwm = options.highWaterMark; - var defaultHwm = this.objectMode ? 16 : 16 * 1024; - this.highWaterMark = hwm || hwm === 0 ? hwm : defaultHwm; - - // cast to ints. - this.highWaterMark = ~ ~this.highWaterMark; - - // drain event flag. - this.needDrain = false; - // at the start of calling end() - this.ending = false; - // when end() has been called, and returned - this.ended = false; - // when 'finish' is emitted - this.finished = false; - - // should we decode strings into buffers before passing to _write? - // this is here so that some node-core streams can optimize string - // handling at a lower level. - var noDecode = options.decodeStrings === false; - this.decodeStrings = !noDecode; - - // Crypto is kind of old and crusty. Historically, its default string - // encoding is 'binary' so we have to make this configurable. - // Everything else in the universe uses 'utf8', though. - this.defaultEncoding = options.defaultEncoding || 'utf8'; - - // not an actual buffer we keep track of, but a measurement - // of how much we're waiting to get pushed to some underlying - // socket or file. - this.length = 0; - - // a flag to see when we're in the middle of a write. - this.writing = false; - - // when true all writes will be buffered until .uncork() call - this.corked = 0; - - // a flag to be able to tell if the onwrite cb is called immediately, - // or on a later tick. We set this to true at first, because any - // actions that shouldn't happen until "later" should generally also - // not happen before the first write call. - this.sync = true; - - // a flag to know if we're processing previously buffered items, which - // may call the _write() callback in the same tick, so that we don't - // end up in an overlapped onwrite situation. - this.bufferProcessing = false; - - // the callback that's passed to _write(chunk,cb) - this.onwrite = function (er) { - onwrite(stream, er); - }; - - // the callback that the user supplies to write(chunk,encoding,cb) - this.writecb = null; - - // the amount that is being written when _write is called. - this.writelen = 0; - - this.bufferedRequest = null; - this.lastBufferedRequest = null; - - // number of pending user-supplied write callbacks - // this must be 0 before 'finish' can be emitted - this.pendingcb = 0; - - // emit prefinish if the only thing we're waiting for is _write cbs - // This is relevant for synchronous Transform streams - this.prefinished = false; - - // True if the error was already emitted and should not be thrown again - this.errorEmitted = false; - - // count buffered requests - this.bufferedRequestCount = 0; - - // allocate the first CorkedRequest, there is always - // one allocated and free to use, and we maintain at most two - this.corkedRequestsFree = new CorkedRequest(this); -} - -WritableState.prototype.getBuffer = function getBuffer() { - var current = this.bufferedRequest; - var out = []; - while (current) { - out.push(current); - current = current.next; - } - return out; -}; - -(function () { - try { - Object.defineProperty(WritableState.prototype, 'buffer', { - get: internalUtil.deprecate(function () { - return this.getBuffer(); - }, '_writableState.buffer is deprecated. Use _writableState.getBuffer ' + 'instead.') - }); - } catch (_) {} -})(); - -// Test _writableState for inheritance to account for Duplex streams, -// whose prototype chain only points to Readable. -var realHasInstance; -if (typeof Symbol === 'function' && Symbol.hasInstance && typeof Function.prototype[Symbol.hasInstance] === 'function') { - realHasInstance = Function.prototype[Symbol.hasInstance]; - Object.defineProperty(Writable, Symbol.hasInstance, { - value: function (object) { - if (realHasInstance.call(this, object)) return true; - - return object && object._writableState instanceof WritableState; - } - }); -} else { - realHasInstance = function (object) { - return object instanceof this; - }; -} - -function Writable(options) { - Duplex = Duplex || require('./_stream_duplex'); - - // Writable ctor is applied to Duplexes, too. - // `realHasInstance` is necessary because using plain `instanceof` - // would return false, as no `_writableState` property is attached. - - // Trying to use the custom `instanceof` for Writable here will also break the - // Node.js LazyTransform implementation, which has a non-trivial getter for - // `_writableState` that would lead to infinite recursion. - if (!realHasInstance.call(Writable, this) && !(this instanceof Duplex)) { - return new Writable(options); - } - - this._writableState = new WritableState(options, this); - - // legacy. - this.writable = true; - - if (options) { - if (typeof options.write === 'function') this._write = options.write; - - if (typeof options.writev === 'function') this._writev = options.writev; - } - - Stream.call(this); -} - -// Otherwise people can pipe Writable streams, which is just wrong. -Writable.prototype.pipe = function () { - this.emit('error', new Error('Cannot pipe, not readable')); -}; - -function writeAfterEnd(stream, cb) { - var er = new Error('write after end'); - // TODO: defer error events consistently everywhere, not just the cb - stream.emit('error', er); - processNextTick(cb, er); -} - -// If we get something that is not a buffer, string, null, or undefined, -// and we're not in objectMode, then that's an error. -// Otherwise stream chunks are all considered to be of length=1, and the -// watermarks determine how many objects to keep in the buffer, rather than -// how many bytes or characters. -function validChunk(stream, state, chunk, cb) { - var valid = true; - var er = false; - // Always throw error if a null is written - // if we are not in object mode then throw - // if it is not a buffer, string, or undefined. - if (chunk === null) { - er = new TypeError('May not write null values to stream'); - } else if (!Buffer.isBuffer(chunk) && typeof chunk !== 'string' && chunk !== undefined && !state.objectMode) { - er = new TypeError('Invalid non-string/buffer chunk'); - } - if (er) { - stream.emit('error', er); - processNextTick(cb, er); - valid = false; - } - return valid; -} - -Writable.prototype.write = function (chunk, encoding, cb) { - var state = this._writableState; - var ret = false; - - if (typeof encoding === 'function') { - cb = encoding; - encoding = null; - } - - if (Buffer.isBuffer(chunk)) encoding = 'buffer';else if (!encoding) encoding = state.defaultEncoding; - - if (typeof cb !== 'function') cb = nop; - - if (state.ended) writeAfterEnd(this, cb);else if (validChunk(this, state, chunk, cb)) { - state.pendingcb++; - ret = writeOrBuffer(this, state, chunk, encoding, cb); - } - - return ret; -}; - -Writable.prototype.cork = function () { - var state = this._writableState; - - state.corked++; -}; - -Writable.prototype.uncork = function () { - var state = this._writableState; - - if (state.corked) { - state.corked--; - - if (!state.writing && !state.corked && !state.finished && !state.bufferProcessing && state.bufferedRequest) clearBuffer(this, state); - } -}; - -Writable.prototype.setDefaultEncoding = function setDefaultEncoding(encoding) { - // node::ParseEncoding() requires lower case. - if (typeof encoding === 'string') encoding = encoding.toLowerCase(); - if (!(['hex', 'utf8', 'utf-8', 'ascii', 'binary', 'base64', 'ucs2', 'ucs-2', 'utf16le', 'utf-16le', 'raw'].indexOf((encoding + '').toLowerCase()) > -1)) throw new TypeError('Unknown encoding: ' + encoding); - this._writableState.defaultEncoding = encoding; - return this; -}; - -function decodeChunk(state, chunk, encoding) { - if (!state.objectMode && state.decodeStrings !== false && typeof chunk === 'string') { - chunk = bufferShim.from(chunk, encoding); - } - return chunk; -} - -// if we're already writing something, then just put this -// in the queue, and wait our turn. Otherwise, call _write -// If we return false, then we need a drain event, so set that flag. -function writeOrBuffer(stream, state, chunk, encoding, cb) { - chunk = decodeChunk(state, chunk, encoding); - - if (Buffer.isBuffer(chunk)) encoding = 'buffer'; - var len = state.objectMode ? 1 : chunk.length; - - state.length += len; - - var ret = state.length < state.highWaterMark; - // we must ensure that previous needDrain will not be reset to false. - if (!ret) state.needDrain = true; - - if (state.writing || state.corked) { - var last = state.lastBufferedRequest; - state.lastBufferedRequest = new WriteReq(chunk, encoding, cb); - if (last) { - last.next = state.lastBufferedRequest; - } else { - state.bufferedRequest = state.lastBufferedRequest; - } - state.bufferedRequestCount += 1; - } else { - doWrite(stream, state, false, len, chunk, encoding, cb); - } - - return ret; -} - -function doWrite(stream, state, writev, len, chunk, encoding, cb) { - state.writelen = len; - state.writecb = cb; - state.writing = true; - state.sync = true; - if (writev) stream._writev(chunk, state.onwrite);else stream._write(chunk, encoding, state.onwrite); - state.sync = false; -} - -function onwriteError(stream, state, sync, er, cb) { - --state.pendingcb; - if (sync) processNextTick(cb, er);else cb(er); - - stream._writableState.errorEmitted = true; - stream.emit('error', er); -} - -function onwriteStateUpdate(state) { - state.writing = false; - state.writecb = null; - state.length -= state.writelen; - state.writelen = 0; -} - -function onwrite(stream, er) { - var state = stream._writableState; - var sync = state.sync; - var cb = state.writecb; - - onwriteStateUpdate(state); - - if (er) onwriteError(stream, state, sync, er, cb);else { - // Check if we're actually ready to finish, but don't emit yet - var finished = needFinish(state); - - if (!finished && !state.corked && !state.bufferProcessing && state.bufferedRequest) { - clearBuffer(stream, state); - } - - if (sync) { - /**/ - asyncWrite(afterWrite, stream, state, finished, cb); - /**/ - } else { - afterWrite(stream, state, finished, cb); - } - } -} - -function afterWrite(stream, state, finished, cb) { - if (!finished) onwriteDrain(stream, state); - state.pendingcb--; - cb(); - finishMaybe(stream, state); -} - -// Must force callback to be called on nextTick, so that we don't -// emit 'drain' before the write() consumer gets the 'false' return -// value, and has a chance to attach a 'drain' listener. -function onwriteDrain(stream, state) { - if (state.length === 0 && state.needDrain) { - state.needDrain = false; - stream.emit('drain'); - } -} - -// if there's something in the buffer waiting, then process it -function clearBuffer(stream, state) { - state.bufferProcessing = true; - var entry = state.bufferedRequest; - - if (stream._writev && entry && entry.next) { - // Fast case, write everything using _writev() - var l = state.bufferedRequestCount; - var buffer = new Array(l); - var holder = state.corkedRequestsFree; - holder.entry = entry; - - var count = 0; - while (entry) { - buffer[count] = entry; - entry = entry.next; - count += 1; - } - - doWrite(stream, state, true, state.length, buffer, '', holder.finish); - - // doWrite is almost always async, defer these to save a bit of time - // as the hot path ends with doWrite - state.pendingcb++; - state.lastBufferedRequest = null; - if (holder.next) { - state.corkedRequestsFree = holder.next; - holder.next = null; - } else { - state.corkedRequestsFree = new CorkedRequest(state); - } - } else { - // Slow case, write chunks one-by-one - while (entry) { - var chunk = entry.chunk; - var encoding = entry.encoding; - var cb = entry.callback; - var len = state.objectMode ? 1 : chunk.length; - - doWrite(stream, state, false, len, chunk, encoding, cb); - entry = entry.next; - // if we didn't call the onwrite immediately, then - // it means that we need to wait until it does. - // also, that means that the chunk and cb are currently - // being processed, so move the buffer counter past them. - if (state.writing) { - break; - } - } - - if (entry === null) state.lastBufferedRequest = null; - } - - state.bufferedRequestCount = 0; - state.bufferedRequest = entry; - state.bufferProcessing = false; -} - -Writable.prototype._write = function (chunk, encoding, cb) { - cb(new Error('_write() is not implemented')); -}; - -Writable.prototype._writev = null; - -Writable.prototype.end = function (chunk, encoding, cb) { - var state = this._writableState; - - if (typeof chunk === 'function') { - cb = chunk; - chunk = null; - encoding = null; - } else if (typeof encoding === 'function') { - cb = encoding; - encoding = null; - } - - if (chunk !== null && chunk !== undefined) this.write(chunk, encoding); - - // .end() fully uncorks - if (state.corked) { - state.corked = 1; - this.uncork(); - } - - // ignore unnecessary end() calls. - if (!state.ending && !state.finished) endWritable(this, state, cb); -}; - -function needFinish(state) { - return state.ending && state.length === 0 && state.bufferedRequest === null && !state.finished && !state.writing; -} - -function prefinish(stream, state) { - if (!state.prefinished) { - state.prefinished = true; - stream.emit('prefinish'); - } -} - -function finishMaybe(stream, state) { - var need = needFinish(state); - if (need) { - if (state.pendingcb === 0) { - prefinish(stream, state); - state.finished = true; - stream.emit('finish'); - } else { - prefinish(stream, state); - } - } - return need; -} - -function endWritable(stream, state, cb) { - state.ending = true; - finishMaybe(stream, state); - if (cb) { - if (state.finished) processNextTick(cb);else stream.once('finish', cb); - } - state.ended = true; - stream.writable = false; -} - -// It seems a linked list but it is not -// there will be only 2 of these for each stream -function CorkedRequest(state) { - var _this = this; - - this.next = null; - this.entry = null; - - this.finish = function (err) { - var entry = _this.entry; - _this.entry = null; - while (entry) { - var cb = entry.callback; - state.pendingcb--; - cb(err); - entry = entry.next; - } - if (state.corkedRequestsFree) { - state.corkedRequestsFree.next = _this; - } else { - state.corkedRequestsFree = _this; - } - }; -} \ No newline at end of file diff --git a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/concat-stream/node_modules/readable-stream/lib/internal/streams/BufferList.js b/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/concat-stream/node_modules/readable-stream/lib/internal/streams/BufferList.js deleted file mode 100644 index e4bfcf02..00000000 --- a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/concat-stream/node_modules/readable-stream/lib/internal/streams/BufferList.js +++ /dev/null @@ -1,64 +0,0 @@ -'use strict'; - -var Buffer = require('buffer').Buffer; -/**/ -var bufferShim = require('buffer-shims'); -/**/ - -module.exports = BufferList; - -function BufferList() { - this.head = null; - this.tail = null; - this.length = 0; -} - -BufferList.prototype.push = function (v) { - var entry = { data: v, next: null }; - if (this.length > 0) this.tail.next = entry;else this.head = entry; - this.tail = entry; - ++this.length; -}; - -BufferList.prototype.unshift = function (v) { - var entry = { data: v, next: this.head }; - if (this.length === 0) this.tail = entry; - this.head = entry; - ++this.length; -}; - -BufferList.prototype.shift = function () { - if (this.length === 0) return; - var ret = this.head.data; - if (this.length === 1) this.head = this.tail = null;else this.head = this.head.next; - --this.length; - return ret; -}; - -BufferList.prototype.clear = function () { - this.head = this.tail = null; - this.length = 0; -}; - -BufferList.prototype.join = function (s) { - if (this.length === 0) return ''; - var p = this.head; - var ret = '' + p.data; - while (p = p.next) { - ret += s + p.data; - }return ret; -}; - -BufferList.prototype.concat = function (n) { - if (this.length === 0) return bufferShim.alloc(0); - if (this.length === 1) return this.head.data; - var ret = bufferShim.allocUnsafe(n >>> 0); - var p = this.head; - var i = 0; - while (p) { - p.data.copy(ret, i); - i += p.data.length; - p = p.next; - } - return ret; -}; \ No newline at end of file diff --git a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/concat-stream/node_modules/readable-stream/node_modules/buffer-shims/index.js b/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/concat-stream/node_modules/readable-stream/node_modules/buffer-shims/index.js deleted file mode 100644 index 1cab4c05..00000000 --- a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/concat-stream/node_modules/readable-stream/node_modules/buffer-shims/index.js +++ /dev/null @@ -1,108 +0,0 @@ -'use strict'; - -var buffer = require('buffer'); -var Buffer = buffer.Buffer; -var SlowBuffer = buffer.SlowBuffer; -var MAX_LEN = buffer.kMaxLength || 2147483647; -exports.alloc = function alloc(size, fill, encoding) { - if (typeof Buffer.alloc === 'function') { - return Buffer.alloc(size, fill, encoding); - } - if (typeof encoding === 'number') { - throw new TypeError('encoding must not be number'); - } - if (typeof size !== 'number') { - throw new TypeError('size must be a number'); - } - if (size > MAX_LEN) { - throw new RangeError('size is too large'); - } - var enc = encoding; - var _fill = fill; - if (_fill === undefined) { - enc = undefined; - _fill = 0; - } - var buf = new Buffer(size); - if (typeof _fill === 'string') { - var fillBuf = new Buffer(_fill, enc); - var flen = fillBuf.length; - var i = -1; - while (++i < size) { - buf[i] = fillBuf[i % flen]; - } - } else { - buf.fill(_fill); - } - return buf; -} -exports.allocUnsafe = function allocUnsafe(size) { - if (typeof Buffer.allocUnsafe === 'function') { - return Buffer.allocUnsafe(size); - } - if (typeof size !== 'number') { - throw new TypeError('size must be a number'); - } - if (size > MAX_LEN) { - throw new RangeError('size is too large'); - } - return new Buffer(size); -} -exports.from = function from(value, encodingOrOffset, length) { - if (typeof Buffer.from === 'function' && (!global.Uint8Array || Uint8Array.from !== Buffer.from)) { - return Buffer.from(value, encodingOrOffset, length); - } - if (typeof value === 'number') { - throw new TypeError('"value" argument must not be a number'); - } - if (typeof value === 'string') { - return new Buffer(value, encodingOrOffset); - } - if (typeof ArrayBuffer !== 'undefined' && value instanceof ArrayBuffer) { - var offset = encodingOrOffset; - if (arguments.length === 1) { - return new Buffer(value); - } - if (typeof offset === 'undefined') { - offset = 0; - } - var len = length; - if (typeof len === 'undefined') { - len = value.byteLength - offset; - } - if (offset >= value.byteLength) { - throw new RangeError('\'offset\' is out of bounds'); - } - if (len > value.byteLength - offset) { - throw new RangeError('\'length\' is out of bounds'); - } - return new Buffer(value.slice(offset, offset + len)); - } - if (Buffer.isBuffer(value)) { - var out = new Buffer(value.length); - value.copy(out, 0, 0, value.length); - return out; - } - if (value) { - if (Array.isArray(value) || (typeof ArrayBuffer !== 'undefined' && value.buffer instanceof ArrayBuffer) || 'length' in value) { - return new Buffer(value); - } - if (value.type === 'Buffer' && Array.isArray(value.data)) { - return new Buffer(value.data); - } - } - - throw new TypeError('First argument must be a string, Buffer, ' + 'ArrayBuffer, Array, or array-like object.'); -} -exports.allocUnsafeSlow = function allocUnsafeSlow(size) { - if (typeof Buffer.allocUnsafeSlow === 'function') { - return Buffer.allocUnsafeSlow(size); - } - if (typeof size !== 'number') { - throw new TypeError('size must be a number'); - } - if (size >= MAX_LEN) { - throw new RangeError('size is too large'); - } - return new SlowBuffer(size); -} diff --git a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/concat-stream/node_modules/readable-stream/node_modules/buffer-shims/license.md b/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/concat-stream/node_modules/readable-stream/node_modules/buffer-shims/license.md deleted file mode 100644 index 01cfaefe..00000000 --- a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/concat-stream/node_modules/readable-stream/node_modules/buffer-shims/license.md +++ /dev/null @@ -1,19 +0,0 @@ -# Copyright (c) 2016 Calvin Metcalf - -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/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/concat-stream/node_modules/readable-stream/node_modules/buffer-shims/package.json b/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/concat-stream/node_modules/readable-stream/node_modules/buffer-shims/package.json deleted file mode 100644 index dc602d75..00000000 --- a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/concat-stream/node_modules/readable-stream/node_modules/buffer-shims/package.json +++ /dev/null @@ -1,51 +0,0 @@ -{ - "name": "buffer-shims", - "version": "1.0.0", - "description": "some shims for node buffers", - "main": "index.js", - "scripts": { - "test": "tape test/*.js" - }, - "files": [ - "index.js" - ], - "license": "MIT", - "devDependencies": { - "tape": "^4.5.1" - }, - "repository": { - "type": "git", - "url": "git@github.com:calvinmetcalf/buffer-shims.git" - }, - "gitHead": "ea89b3857ab5b8203957922a84e9a48cf4c47e0a", - "bugs": { - "url": "https://github.com/calvinmetcalf/buffer-shims/issues" - }, - "_id": "buffer-shims@1.0.0", - "_shasum": "9978ce317388c649ad8793028c3477ef044a8b51", - "_from": "buffer-shims@>=1.0.0 <2.0.0", - "_npmVersion": "3.8.6", - "_nodeVersion": "5.11.0", - "_npmUser": { - "name": "cwmma", - "email": "calvin.metcalf@gmail.com" - }, - "dist": { - "shasum": "9978ce317388c649ad8793028c3477ef044a8b51", - "tarball": "https://registry.npmjs.org/buffer-shims/-/buffer-shims-1.0.0.tgz" - }, - "maintainers": [ - { - "name": "cwmma", - "email": "calvin.metcalf@gmail.com" - } - ], - "_npmOperationalInternal": { - "host": "packages-16-east.internal.npmjs.com", - "tmp": "tmp/buffer-shims-1.0.0.tgz_1462560889323_0.8640750856138766" - }, - "directories": {}, - "_resolved": "https://registry.npmjs.org/buffer-shims/-/buffer-shims-1.0.0.tgz", - "readme": "ERROR: No README data found!", - "homepage": "https://github.com/calvinmetcalf/buffer-shims" -} diff --git a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/concat-stream/node_modules/readable-stream/node_modules/buffer-shims/readme.md b/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/concat-stream/node_modules/readable-stream/node_modules/buffer-shims/readme.md deleted file mode 100644 index 7ea6475e..00000000 --- a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/concat-stream/node_modules/readable-stream/node_modules/buffer-shims/readme.md +++ /dev/null @@ -1,21 +0,0 @@ -buffer-shims -=== - -functions to make sure the new buffer methods work in older browsers. - -```js -var bufferShim = require('buffer-shims'); -bufferShim.from('foo'); -bufferShim.alloc(9, 'cafeface', 'hex'); -bufferShim.allocUnsafe(15); -bufferShim.allocUnsafeSlow(21); -``` - -should just use the original in newer nodes and on older nodes uses fallbacks. - -Known Issues -=== -- this does not patch the buffer object, only the constructor stuff -- it's actually a polyfill - -![](https://i.imgur.com/zxII3jJ.gif) diff --git a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/concat-stream/node_modules/readable-stream/node_modules/core-util-is/LICENSE b/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/concat-stream/node_modules/readable-stream/node_modules/core-util-is/LICENSE deleted file mode 100644 index d8d7f943..00000000 --- a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/concat-stream/node_modules/readable-stream/node_modules/core-util-is/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright Node.js contributors. All rights reserved. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to -deal in the Software without restriction, including without limitation the -rights to use, copy, modify, merge, publish, distribute, sublicense, and/or -sell copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS -IN THE SOFTWARE. diff --git a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/concat-stream/node_modules/readable-stream/node_modules/core-util-is/README.md b/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/concat-stream/node_modules/readable-stream/node_modules/core-util-is/README.md deleted file mode 100644 index 5a76b414..00000000 --- a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/concat-stream/node_modules/readable-stream/node_modules/core-util-is/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# core-util-is - -The `util.is*` functions introduced in Node v0.12. diff --git a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/concat-stream/node_modules/readable-stream/node_modules/core-util-is/float.patch b/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/concat-stream/node_modules/readable-stream/node_modules/core-util-is/float.patch deleted file mode 100644 index a06d5c05..00000000 --- a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/concat-stream/node_modules/readable-stream/node_modules/core-util-is/float.patch +++ /dev/null @@ -1,604 +0,0 @@ -diff --git a/lib/util.js b/lib/util.js -index a03e874..9074e8e 100644 ---- a/lib/util.js -+++ b/lib/util.js -@@ -19,430 +19,6 @@ - // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE - // USE OR OTHER DEALINGS IN THE SOFTWARE. - --var formatRegExp = /%[sdj%]/g; --exports.format = function(f) { -- if (!isString(f)) { -- var objects = []; -- for (var i = 0; i < arguments.length; i++) { -- objects.push(inspect(arguments[i])); -- } -- return objects.join(' '); -- } -- -- var i = 1; -- var args = arguments; -- var len = args.length; -- var str = String(f).replace(formatRegExp, function(x) { -- if (x === '%%') return '%'; -- if (i >= len) return x; -- switch (x) { -- case '%s': return String(args[i++]); -- case '%d': return Number(args[i++]); -- case '%j': -- try { -- return JSON.stringify(args[i++]); -- } catch (_) { -- return '[Circular]'; -- } -- default: -- return x; -- } -- }); -- for (var x = args[i]; i < len; x = args[++i]) { -- if (isNull(x) || !isObject(x)) { -- str += ' ' + x; -- } else { -- str += ' ' + inspect(x); -- } -- } -- return str; --}; -- -- --// Mark that a method should not be used. --// Returns a modified function which warns once by default. --// If --no-deprecation is set, then it is a no-op. --exports.deprecate = function(fn, msg) { -- // Allow for deprecating things in the process of starting up. -- if (isUndefined(global.process)) { -- return function() { -- return exports.deprecate(fn, msg).apply(this, arguments); -- }; -- } -- -- if (process.noDeprecation === true) { -- return fn; -- } -- -- var warned = false; -- function deprecated() { -- if (!warned) { -- if (process.throwDeprecation) { -- throw new Error(msg); -- } else if (process.traceDeprecation) { -- console.trace(msg); -- } else { -- console.error(msg); -- } -- warned = true; -- } -- return fn.apply(this, arguments); -- } -- -- return deprecated; --}; -- -- --var debugs = {}; --var debugEnviron; --exports.debuglog = function(set) { -- if (isUndefined(debugEnviron)) -- debugEnviron = process.env.NODE_DEBUG || ''; -- set = set.toUpperCase(); -- if (!debugs[set]) { -- if (new RegExp('\\b' + set + '\\b', 'i').test(debugEnviron)) { -- var pid = process.pid; -- debugs[set] = function() { -- var msg = exports.format.apply(exports, arguments); -- console.error('%s %d: %s', set, pid, msg); -- }; -- } else { -- debugs[set] = function() {}; -- } -- } -- return debugs[set]; --}; -- -- --/** -- * Echos the value of a value. Trys to print the value out -- * in the best way possible given the different types. -- * -- * @param {Object} obj The object to print out. -- * @param {Object} opts Optional options object that alters the output. -- */ --/* legacy: obj, showHidden, depth, colors*/ --function inspect(obj, opts) { -- // default options -- var ctx = { -- seen: [], -- stylize: stylizeNoColor -- }; -- // legacy... -- if (arguments.length >= 3) ctx.depth = arguments[2]; -- if (arguments.length >= 4) ctx.colors = arguments[3]; -- if (isBoolean(opts)) { -- // legacy... -- ctx.showHidden = opts; -- } else if (opts) { -- // got an "options" object -- exports._extend(ctx, opts); -- } -- // set default options -- if (isUndefined(ctx.showHidden)) ctx.showHidden = false; -- if (isUndefined(ctx.depth)) ctx.depth = 2; -- if (isUndefined(ctx.colors)) ctx.colors = false; -- if (isUndefined(ctx.customInspect)) ctx.customInspect = true; -- if (ctx.colors) ctx.stylize = stylizeWithColor; -- return formatValue(ctx, obj, ctx.depth); --} --exports.inspect = inspect; -- -- --// http://en.wikipedia.org/wiki/ANSI_escape_code#graphics --inspect.colors = { -- 'bold' : [1, 22], -- 'italic' : [3, 23], -- 'underline' : [4, 24], -- 'inverse' : [7, 27], -- 'white' : [37, 39], -- 'grey' : [90, 39], -- 'black' : [30, 39], -- 'blue' : [34, 39], -- 'cyan' : [36, 39], -- 'green' : [32, 39], -- 'magenta' : [35, 39], -- 'red' : [31, 39], -- 'yellow' : [33, 39] --}; -- --// Don't use 'blue' not visible on cmd.exe --inspect.styles = { -- 'special': 'cyan', -- 'number': 'yellow', -- 'boolean': 'yellow', -- 'undefined': 'grey', -- 'null': 'bold', -- 'string': 'green', -- 'date': 'magenta', -- // "name": intentionally not styling -- 'regexp': 'red' --}; -- -- --function stylizeWithColor(str, styleType) { -- var style = inspect.styles[styleType]; -- -- if (style) { -- return '\u001b[' + inspect.colors[style][0] + 'm' + str + -- '\u001b[' + inspect.colors[style][1] + 'm'; -- } else { -- return str; -- } --} -- -- --function stylizeNoColor(str, styleType) { -- return str; --} -- -- --function arrayToHash(array) { -- var hash = {}; -- -- array.forEach(function(val, idx) { -- hash[val] = true; -- }); -- -- return hash; --} -- -- --function formatValue(ctx, value, recurseTimes) { -- // Provide a hook for user-specified inspect functions. -- // Check that value is an object with an inspect function on it -- if (ctx.customInspect && -- value && -- isFunction(value.inspect) && -- // Filter out the util module, it's inspect function is special -- value.inspect !== exports.inspect && -- // Also filter out any prototype objects using the circular check. -- !(value.constructor && value.constructor.prototype === value)) { -- var ret = value.inspect(recurseTimes, ctx); -- if (!isString(ret)) { -- ret = formatValue(ctx, ret, recurseTimes); -- } -- return ret; -- } -- -- // Primitive types cannot have properties -- var primitive = formatPrimitive(ctx, value); -- if (primitive) { -- return primitive; -- } -- -- // Look up the keys of the object. -- var keys = Object.keys(value); -- var visibleKeys = arrayToHash(keys); -- -- if (ctx.showHidden) { -- keys = Object.getOwnPropertyNames(value); -- } -- -- // Some type of object without properties can be shortcutted. -- if (keys.length === 0) { -- if (isFunction(value)) { -- var name = value.name ? ': ' + value.name : ''; -- return ctx.stylize('[Function' + name + ']', 'special'); -- } -- if (isRegExp(value)) { -- return ctx.stylize(RegExp.prototype.toString.call(value), 'regexp'); -- } -- if (isDate(value)) { -- return ctx.stylize(Date.prototype.toString.call(value), 'date'); -- } -- if (isError(value)) { -- return formatError(value); -- } -- } -- -- var base = '', array = false, braces = ['{', '}']; -- -- // Make Array say that they are Array -- if (isArray(value)) { -- array = true; -- braces = ['[', ']']; -- } -- -- // Make functions say that they are functions -- if (isFunction(value)) { -- var n = value.name ? ': ' + value.name : ''; -- base = ' [Function' + n + ']'; -- } -- -- // Make RegExps say that they are RegExps -- if (isRegExp(value)) { -- base = ' ' + RegExp.prototype.toString.call(value); -- } -- -- // Make dates with properties first say the date -- if (isDate(value)) { -- base = ' ' + Date.prototype.toUTCString.call(value); -- } -- -- // Make error with message first say the error -- if (isError(value)) { -- base = ' ' + formatError(value); -- } -- -- if (keys.length === 0 && (!array || value.length == 0)) { -- return braces[0] + base + braces[1]; -- } -- -- if (recurseTimes < 0) { -- if (isRegExp(value)) { -- return ctx.stylize(RegExp.prototype.toString.call(value), 'regexp'); -- } else { -- return ctx.stylize('[Object]', 'special'); -- } -- } -- -- ctx.seen.push(value); -- -- var output; -- if (array) { -- output = formatArray(ctx, value, recurseTimes, visibleKeys, keys); -- } else { -- output = keys.map(function(key) { -- return formatProperty(ctx, value, recurseTimes, visibleKeys, key, array); -- }); -- } -- -- ctx.seen.pop(); -- -- return reduceToSingleString(output, base, braces); --} -- -- --function formatPrimitive(ctx, value) { -- if (isUndefined(value)) -- return ctx.stylize('undefined', 'undefined'); -- if (isString(value)) { -- var simple = '\'' + JSON.stringify(value).replace(/^"|"$/g, '') -- .replace(/'/g, "\\'") -- .replace(/\\"/g, '"') + '\''; -- return ctx.stylize(simple, 'string'); -- } -- if (isNumber(value)) { -- // Format -0 as '-0'. Strict equality won't distinguish 0 from -0, -- // so instead we use the fact that 1 / -0 < 0 whereas 1 / 0 > 0 . -- if (value === 0 && 1 / value < 0) -- return ctx.stylize('-0', 'number'); -- return ctx.stylize('' + value, 'number'); -- } -- if (isBoolean(value)) -- return ctx.stylize('' + value, 'boolean'); -- // For some reason typeof null is "object", so special case here. -- if (isNull(value)) -- return ctx.stylize('null', 'null'); --} -- -- --function formatError(value) { -- return '[' + Error.prototype.toString.call(value) + ']'; --} -- -- --function formatArray(ctx, value, recurseTimes, visibleKeys, keys) { -- var output = []; -- for (var i = 0, l = value.length; i < l; ++i) { -- if (hasOwnProperty(value, String(i))) { -- output.push(formatProperty(ctx, value, recurseTimes, visibleKeys, -- String(i), true)); -- } else { -- output.push(''); -- } -- } -- keys.forEach(function(key) { -- if (!key.match(/^\d+$/)) { -- output.push(formatProperty(ctx, value, recurseTimes, visibleKeys, -- key, true)); -- } -- }); -- return output; --} -- -- --function formatProperty(ctx, value, recurseTimes, visibleKeys, key, array) { -- var name, str, desc; -- desc = Object.getOwnPropertyDescriptor(value, key) || { value: value[key] }; -- if (desc.get) { -- if (desc.set) { -- str = ctx.stylize('[Getter/Setter]', 'special'); -- } else { -- str = ctx.stylize('[Getter]', 'special'); -- } -- } else { -- if (desc.set) { -- str = ctx.stylize('[Setter]', 'special'); -- } -- } -- if (!hasOwnProperty(visibleKeys, key)) { -- name = '[' + key + ']'; -- } -- if (!str) { -- if (ctx.seen.indexOf(desc.value) < 0) { -- if (isNull(recurseTimes)) { -- str = formatValue(ctx, desc.value, null); -- } else { -- str = formatValue(ctx, desc.value, recurseTimes - 1); -- } -- if (str.indexOf('\n') > -1) { -- if (array) { -- str = str.split('\n').map(function(line) { -- return ' ' + line; -- }).join('\n').substr(2); -- } else { -- str = '\n' + str.split('\n').map(function(line) { -- return ' ' + line; -- }).join('\n'); -- } -- } -- } else { -- str = ctx.stylize('[Circular]', 'special'); -- } -- } -- if (isUndefined(name)) { -- if (array && key.match(/^\d+$/)) { -- return str; -- } -- name = JSON.stringify('' + key); -- if (name.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)) { -- name = name.substr(1, name.length - 2); -- name = ctx.stylize(name, 'name'); -- } else { -- name = name.replace(/'/g, "\\'") -- .replace(/\\"/g, '"') -- .replace(/(^"|"$)/g, "'"); -- name = ctx.stylize(name, 'string'); -- } -- } -- -- return name + ': ' + str; --} -- -- --function reduceToSingleString(output, base, braces) { -- var numLinesEst = 0; -- var length = output.reduce(function(prev, cur) { -- numLinesEst++; -- if (cur.indexOf('\n') >= 0) numLinesEst++; -- return prev + cur.replace(/\u001b\[\d\d?m/g, '').length + 1; -- }, 0); -- -- if (length > 60) { -- return braces[0] + -- (base === '' ? '' : base + '\n ') + -- ' ' + -- output.join(',\n ') + -- ' ' + -- braces[1]; -- } -- -- return braces[0] + base + ' ' + output.join(', ') + ' ' + braces[1]; --} -- -- - // NOTE: These type checking functions intentionally don't use `instanceof` - // because it is fragile and can be easily faked with `Object.create()`. - function isArray(ar) { -@@ -522,166 +98,10 @@ function isPrimitive(arg) { - exports.isPrimitive = isPrimitive; - - function isBuffer(arg) { -- return arg instanceof Buffer; -+ return Buffer.isBuffer(arg); - } - exports.isBuffer = isBuffer; - - function objectToString(o) { - return Object.prototype.toString.call(o); --} -- -- --function pad(n) { -- return n < 10 ? '0' + n.toString(10) : n.toString(10); --} -- -- --var months = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', -- 'Oct', 'Nov', 'Dec']; -- --// 26 Feb 16:19:34 --function timestamp() { -- var d = new Date(); -- var time = [pad(d.getHours()), -- pad(d.getMinutes()), -- pad(d.getSeconds())].join(':'); -- return [d.getDate(), months[d.getMonth()], time].join(' '); --} -- -- --// log is just a thin wrapper to console.log that prepends a timestamp --exports.log = function() { -- console.log('%s - %s', timestamp(), exports.format.apply(exports, arguments)); --}; -- -- --/** -- * Inherit the prototype methods from one constructor into another. -- * -- * The Function.prototype.inherits from lang.js rewritten as a standalone -- * function (not on Function.prototype). NOTE: If this file is to be loaded -- * during bootstrapping this function needs to be rewritten using some native -- * functions as prototype setup using normal JavaScript does not work as -- * expected during bootstrapping (see mirror.js in r114903). -- * -- * @param {function} ctor Constructor function which needs to inherit the -- * prototype. -- * @param {function} superCtor Constructor function to inherit prototype from. -- */ --exports.inherits = function(ctor, superCtor) { -- ctor.super_ = superCtor; -- ctor.prototype = Object.create(superCtor.prototype, { -- constructor: { -- value: ctor, -- enumerable: false, -- writable: true, -- configurable: true -- } -- }); --}; -- --exports._extend = function(origin, add) { -- // Don't do anything if add isn't an object -- if (!add || !isObject(add)) return origin; -- -- var keys = Object.keys(add); -- var i = keys.length; -- while (i--) { -- origin[keys[i]] = add[keys[i]]; -- } -- return origin; --}; -- --function hasOwnProperty(obj, prop) { -- return Object.prototype.hasOwnProperty.call(obj, prop); --} -- -- --// Deprecated old stuff. -- --exports.p = exports.deprecate(function() { -- for (var i = 0, len = arguments.length; i < len; ++i) { -- console.error(exports.inspect(arguments[i])); -- } --}, 'util.p: Use console.error() instead'); -- -- --exports.exec = exports.deprecate(function() { -- return require('child_process').exec.apply(this, arguments); --}, 'util.exec is now called `child_process.exec`.'); -- -- --exports.print = exports.deprecate(function() { -- for (var i = 0, len = arguments.length; i < len; ++i) { -- process.stdout.write(String(arguments[i])); -- } --}, 'util.print: Use console.log instead'); -- -- --exports.puts = exports.deprecate(function() { -- for (var i = 0, len = arguments.length; i < len; ++i) { -- process.stdout.write(arguments[i] + '\n'); -- } --}, 'util.puts: Use console.log instead'); -- -- --exports.debug = exports.deprecate(function(x) { -- process.stderr.write('DEBUG: ' + x + '\n'); --}, 'util.debug: Use console.error instead'); -- -- --exports.error = exports.deprecate(function(x) { -- for (var i = 0, len = arguments.length; i < len; ++i) { -- process.stderr.write(arguments[i] + '\n'); -- } --}, 'util.error: Use console.error instead'); -- -- --exports.pump = exports.deprecate(function(readStream, writeStream, callback) { -- var callbackCalled = false; -- -- function call(a, b, c) { -- if (callback && !callbackCalled) { -- callback(a, b, c); -- callbackCalled = true; -- } -- } -- -- readStream.addListener('data', function(chunk) { -- if (writeStream.write(chunk) === false) readStream.pause(); -- }); -- -- writeStream.addListener('drain', function() { -- readStream.resume(); -- }); -- -- readStream.addListener('end', function() { -- writeStream.end(); -- }); -- -- readStream.addListener('close', function() { -- call(); -- }); -- -- readStream.addListener('error', function(err) { -- writeStream.end(); -- call(err); -- }); -- -- writeStream.addListener('error', function(err) { -- readStream.destroy(); -- call(err); -- }); --}, 'util.pump(): Use readableStream.pipe() instead'); -- -- --var uv; --exports._errnoException = function(err, syscall) { -- if (isUndefined(uv)) uv = process.binding('uv'); -- var errname = uv.errname(err); -- var e = new Error(syscall + ' ' + errname); -- e.code = errname; -- e.errno = errname; -- e.syscall = syscall; -- return e; --}; -+} \ No newline at end of file diff --git a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/concat-stream/node_modules/readable-stream/node_modules/core-util-is/lib/util.js b/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/concat-stream/node_modules/readable-stream/node_modules/core-util-is/lib/util.js deleted file mode 100644 index ff4c851c..00000000 --- a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/concat-stream/node_modules/readable-stream/node_modules/core-util-is/lib/util.js +++ /dev/null @@ -1,107 +0,0 @@ -// Copyright Joyent, Inc. and other Node contributors. -// -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to permit -// persons to whom the Software is furnished to do so, subject to the -// following conditions: -// -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -// USE OR OTHER DEALINGS IN THE SOFTWARE. - -// NOTE: These type checking functions intentionally don't use `instanceof` -// because it is fragile and can be easily faked with `Object.create()`. - -function isArray(arg) { - if (Array.isArray) { - return Array.isArray(arg); - } - return objectToString(arg) === '[object Array]'; -} -exports.isArray = isArray; - -function isBoolean(arg) { - return typeof arg === 'boolean'; -} -exports.isBoolean = isBoolean; - -function isNull(arg) { - return arg === null; -} -exports.isNull = isNull; - -function isNullOrUndefined(arg) { - return arg == null; -} -exports.isNullOrUndefined = isNullOrUndefined; - -function isNumber(arg) { - return typeof arg === 'number'; -} -exports.isNumber = isNumber; - -function isString(arg) { - return typeof arg === 'string'; -} -exports.isString = isString; - -function isSymbol(arg) { - return typeof arg === 'symbol'; -} -exports.isSymbol = isSymbol; - -function isUndefined(arg) { - return arg === void 0; -} -exports.isUndefined = isUndefined; - -function isRegExp(re) { - return objectToString(re) === '[object RegExp]'; -} -exports.isRegExp = isRegExp; - -function isObject(arg) { - return typeof arg === 'object' && arg !== null; -} -exports.isObject = isObject; - -function isDate(d) { - return objectToString(d) === '[object Date]'; -} -exports.isDate = isDate; - -function isError(e) { - return (objectToString(e) === '[object Error]' || e instanceof Error); -} -exports.isError = isError; - -function isFunction(arg) { - return typeof arg === 'function'; -} -exports.isFunction = isFunction; - -function isPrimitive(arg) { - return arg === null || - typeof arg === 'boolean' || - typeof arg === 'number' || - typeof arg === 'string' || - typeof arg === 'symbol' || // ES6 symbol - typeof arg === 'undefined'; -} -exports.isPrimitive = isPrimitive; - -exports.isBuffer = Buffer.isBuffer; - -function objectToString(o) { - return Object.prototype.toString.call(o); -} diff --git a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/concat-stream/node_modules/readable-stream/node_modules/core-util-is/package.json b/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/concat-stream/node_modules/readable-stream/node_modules/core-util-is/package.json deleted file mode 100644 index ddd227e6..00000000 --- a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/concat-stream/node_modules/readable-stream/node_modules/core-util-is/package.json +++ /dev/null @@ -1,60 +0,0 @@ -{ - "name": "core-util-is", - "version": "1.0.2", - "description": "The `util.is*` functions introduced in Node v0.12.", - "main": "lib/util.js", - "repository": { - "type": "git", - "url": "git://github.com/isaacs/core-util-is.git" - }, - "keywords": [ - "util", - "isBuffer", - "isArray", - "isNumber", - "isString", - "isRegExp", - "isThis", - "isThat", - "polyfill" - ], - "author": { - "name": "Isaac Z. Schlueter", - "email": "i@izs.me", - "url": "http://blog.izs.me/" - }, - "license": "MIT", - "bugs": { - "url": "https://github.com/isaacs/core-util-is/issues" - }, - "scripts": { - "test": "tap test.js" - }, - "devDependencies": { - "tap": "^2.3.0" - }, - "gitHead": "a177da234df5638b363ddc15fa324619a38577c8", - "homepage": "https://github.com/isaacs/core-util-is#readme", - "_id": "core-util-is@1.0.2", - "_shasum": "b5fd54220aa2bc5ab57aab7140c940754503c1a7", - "_from": "core-util-is@>=1.0.0 <1.1.0", - "_npmVersion": "3.3.2", - "_nodeVersion": "4.0.0", - "_npmUser": { - "name": "isaacs", - "email": "i@izs.me" - }, - "dist": { - "shasum": "b5fd54220aa2bc5ab57aab7140c940754503c1a7", - "tarball": "http://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz" - }, - "maintainers": [ - { - "name": "isaacs", - "email": "i@izs.me" - } - ], - "directories": {}, - "_resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", - "readme": "ERROR: No README data found!" -} diff --git a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/concat-stream/node_modules/readable-stream/node_modules/core-util-is/test.js b/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/concat-stream/node_modules/readable-stream/node_modules/core-util-is/test.js deleted file mode 100644 index 1a490c65..00000000 --- a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/concat-stream/node_modules/readable-stream/node_modules/core-util-is/test.js +++ /dev/null @@ -1,68 +0,0 @@ -var assert = require('tap'); - -var t = require('./lib/util'); - -assert.equal(t.isArray([]), true); -assert.equal(t.isArray({}), false); - -assert.equal(t.isBoolean(null), false); -assert.equal(t.isBoolean(true), true); -assert.equal(t.isBoolean(false), true); - -assert.equal(t.isNull(null), true); -assert.equal(t.isNull(undefined), false); -assert.equal(t.isNull(false), false); -assert.equal(t.isNull(), false); - -assert.equal(t.isNullOrUndefined(null), true); -assert.equal(t.isNullOrUndefined(undefined), true); -assert.equal(t.isNullOrUndefined(false), false); -assert.equal(t.isNullOrUndefined(), true); - -assert.equal(t.isNumber(null), false); -assert.equal(t.isNumber('1'), false); -assert.equal(t.isNumber(1), true); - -assert.equal(t.isString(null), false); -assert.equal(t.isString('1'), true); -assert.equal(t.isString(1), false); - -assert.equal(t.isSymbol(null), false); -assert.equal(t.isSymbol('1'), false); -assert.equal(t.isSymbol(1), false); -assert.equal(t.isSymbol(Symbol()), true); - -assert.equal(t.isUndefined(null), false); -assert.equal(t.isUndefined(undefined), true); -assert.equal(t.isUndefined(false), false); -assert.equal(t.isUndefined(), true); - -assert.equal(t.isRegExp(null), false); -assert.equal(t.isRegExp('1'), false); -assert.equal(t.isRegExp(new RegExp()), true); - -assert.equal(t.isObject({}), true); -assert.equal(t.isObject([]), true); -assert.equal(t.isObject(new RegExp()), true); -assert.equal(t.isObject(new Date()), true); - -assert.equal(t.isDate(null), false); -assert.equal(t.isDate('1'), false); -assert.equal(t.isDate(new Date()), true); - -assert.equal(t.isError(null), false); -assert.equal(t.isError({ err: true }), false); -assert.equal(t.isError(new Error()), true); - -assert.equal(t.isFunction(null), false); -assert.equal(t.isFunction({ }), false); -assert.equal(t.isFunction(function() {}), true); - -assert.equal(t.isPrimitive(null), true); -assert.equal(t.isPrimitive(''), true); -assert.equal(t.isPrimitive(0), true); -assert.equal(t.isPrimitive(new Date()), false); - -assert.equal(t.isBuffer(null), false); -assert.equal(t.isBuffer({}), false); -assert.equal(t.isBuffer(new Buffer(0)), true); diff --git a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/concat-stream/node_modules/readable-stream/node_modules/isarray/.npmignore b/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/concat-stream/node_modules/readable-stream/node_modules/isarray/.npmignore deleted file mode 100644 index 3c3629e6..00000000 --- a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/concat-stream/node_modules/readable-stream/node_modules/isarray/.npmignore +++ /dev/null @@ -1 +0,0 @@ -node_modules diff --git a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/concat-stream/node_modules/readable-stream/node_modules/isarray/.travis.yml b/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/concat-stream/node_modules/readable-stream/node_modules/isarray/.travis.yml deleted file mode 100644 index cc4dba29..00000000 --- a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/concat-stream/node_modules/readable-stream/node_modules/isarray/.travis.yml +++ /dev/null @@ -1,4 +0,0 @@ -language: node_js -node_js: - - "0.8" - - "0.10" diff --git a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/concat-stream/node_modules/readable-stream/node_modules/isarray/Makefile b/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/concat-stream/node_modules/readable-stream/node_modules/isarray/Makefile deleted file mode 100644 index 787d56e1..00000000 --- a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/concat-stream/node_modules/readable-stream/node_modules/isarray/Makefile +++ /dev/null @@ -1,6 +0,0 @@ - -test: - @node_modules/.bin/tape test.js - -.PHONY: test - diff --git a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/concat-stream/node_modules/readable-stream/node_modules/isarray/README.md b/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/concat-stream/node_modules/readable-stream/node_modules/isarray/README.md deleted file mode 100644 index 16d2c59c..00000000 --- a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/concat-stream/node_modules/readable-stream/node_modules/isarray/README.md +++ /dev/null @@ -1,60 +0,0 @@ - -# isarray - -`Array#isArray` for older browsers. - -[![build status](https://secure.travis-ci.org/juliangruber/isarray.svg)](http://travis-ci.org/juliangruber/isarray) -[![downloads](https://img.shields.io/npm/dm/isarray.svg)](https://www.npmjs.org/package/isarray) - -[![browser support](https://ci.testling.com/juliangruber/isarray.png) -](https://ci.testling.com/juliangruber/isarray) - -## Usage - -```js -var isArray = require('isarray'); - -console.log(isArray([])); // => true -console.log(isArray({})); // => false -``` - -## Installation - -With [npm](http://npmjs.org) do - -```bash -$ npm install isarray -``` - -Then bundle for the browser with -[browserify](https://github.com/substack/browserify). - -With [component](http://component.io) do - -```bash -$ component install juliangruber/isarray -``` - -## License - -(MIT) - -Copyright (c) 2013 Julian Gruber <julian@juliangruber.com> - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies -of the Software, and to permit persons to whom the Software is furnished to do -so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/concat-stream/node_modules/readable-stream/node_modules/isarray/component.json b/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/concat-stream/node_modules/readable-stream/node_modules/isarray/component.json deleted file mode 100644 index 9e31b683..00000000 --- a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/concat-stream/node_modules/readable-stream/node_modules/isarray/component.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "name" : "isarray", - "description" : "Array#isArray for older browsers", - "version" : "0.0.1", - "repository" : "juliangruber/isarray", - "homepage": "https://github.com/juliangruber/isarray", - "main" : "index.js", - "scripts" : [ - "index.js" - ], - "dependencies" : {}, - "keywords": ["browser","isarray","array"], - "author": { - "name": "Julian Gruber", - "email": "mail@juliangruber.com", - "url": "http://juliangruber.com" - }, - "license": "MIT" -} diff --git a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/concat-stream/node_modules/readable-stream/node_modules/isarray/index.js b/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/concat-stream/node_modules/readable-stream/node_modules/isarray/index.js deleted file mode 100644 index a57f6349..00000000 --- a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/concat-stream/node_modules/readable-stream/node_modules/isarray/index.js +++ /dev/null @@ -1,5 +0,0 @@ -var toString = {}.toString; - -module.exports = Array.isArray || function (arr) { - return toString.call(arr) == '[object Array]'; -}; diff --git a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/concat-stream/node_modules/readable-stream/node_modules/isarray/package.json b/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/concat-stream/node_modules/readable-stream/node_modules/isarray/package.json deleted file mode 100644 index e86d232e..00000000 --- a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/concat-stream/node_modules/readable-stream/node_modules/isarray/package.json +++ /dev/null @@ -1,71 +0,0 @@ -{ - "name": "isarray", - "description": "Array#isArray for older browsers", - "version": "1.0.0", - "repository": { - "type": "git", - "url": "git://github.com/juliangruber/isarray.git" - }, - "homepage": "https://github.com/juliangruber/isarray", - "main": "index.js", - "dependencies": {}, - "devDependencies": { - "tape": "~2.13.4" - }, - "keywords": [ - "browser", - "isarray", - "array" - ], - "author": { - "name": "Julian Gruber", - "email": "mail@juliangruber.com", - "url": "http://juliangruber.com" - }, - "license": "MIT", - "testling": { - "files": "test.js", - "browsers": [ - "ie/8..latest", - "firefox/17..latest", - "firefox/nightly", - "chrome/22..latest", - "chrome/canary", - "opera/12..latest", - "opera/next", - "safari/5.1..latest", - "ipad/6.0..latest", - "iphone/6.0..latest", - "android-browser/4.2..latest" - ] - }, - "scripts": { - "test": "tape test.js" - }, - "gitHead": "2a23a281f369e9ae06394c0fb4d2381355a6ba33", - "bugs": { - "url": "https://github.com/juliangruber/isarray/issues" - }, - "_id": "isarray@1.0.0", - "_shasum": "bb935d48582cba168c06834957a54a3e07124f11", - "_from": "isarray@>=1.0.0 <1.1.0", - "_npmVersion": "3.3.12", - "_nodeVersion": "5.1.0", - "_npmUser": { - "name": "juliangruber", - "email": "julian@juliangruber.com" - }, - "dist": { - "shasum": "bb935d48582cba168c06834957a54a3e07124f11", - "tarball": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz" - }, - "maintainers": [ - { - "name": "juliangruber", - "email": "julian@juliangruber.com" - } - ], - "directories": {}, - "_resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", - "readme": "ERROR: No README data found!" -} diff --git a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/concat-stream/node_modules/readable-stream/node_modules/isarray/test.js b/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/concat-stream/node_modules/readable-stream/node_modules/isarray/test.js deleted file mode 100644 index e0c3444d..00000000 --- a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/concat-stream/node_modules/readable-stream/node_modules/isarray/test.js +++ /dev/null @@ -1,20 +0,0 @@ -var isArray = require('./'); -var test = require('tape'); - -test('is array', function(t){ - t.ok(isArray([])); - t.notOk(isArray({})); - t.notOk(isArray(null)); - t.notOk(isArray(false)); - - var obj = {}; - obj[0] = true; - t.notOk(isArray(obj)); - - var arr = []; - arr.foo = 'bar'; - t.ok(isArray(arr)); - - t.end(); -}); - diff --git a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/concat-stream/node_modules/readable-stream/node_modules/process-nextick-args/.travis.yml b/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/concat-stream/node_modules/readable-stream/node_modules/process-nextick-args/.travis.yml deleted file mode 100644 index 36201b10..00000000 --- a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/concat-stream/node_modules/readable-stream/node_modules/process-nextick-args/.travis.yml +++ /dev/null @@ -1,12 +0,0 @@ -language: node_js -node_js: - - "0.8" - - "0.10" - - "0.11" - - "0.12" - - "1.7.1" - - 1 - - 2 - - 3 - - 4 - - 5 diff --git a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/concat-stream/node_modules/readable-stream/node_modules/process-nextick-args/index.js b/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/concat-stream/node_modules/readable-stream/node_modules/process-nextick-args/index.js deleted file mode 100644 index a4f40f84..00000000 --- a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/concat-stream/node_modules/readable-stream/node_modules/process-nextick-args/index.js +++ /dev/null @@ -1,43 +0,0 @@ -'use strict'; - -if (!process.version || - process.version.indexOf('v0.') === 0 || - process.version.indexOf('v1.') === 0 && process.version.indexOf('v1.8.') !== 0) { - module.exports = nextTick; -} else { - module.exports = process.nextTick; -} - -function nextTick(fn, arg1, arg2, arg3) { - if (typeof fn !== 'function') { - throw new TypeError('"callback" argument must be a function'); - } - var len = arguments.length; - var args, i; - switch (len) { - case 0: - case 1: - return process.nextTick(fn); - case 2: - return process.nextTick(function afterTickOne() { - fn.call(null, arg1); - }); - case 3: - return process.nextTick(function afterTickTwo() { - fn.call(null, arg1, arg2); - }); - case 4: - return process.nextTick(function afterTickThree() { - fn.call(null, arg1, arg2, arg3); - }); - default: - args = new Array(len - 1); - i = 0; - while (i < args.length) { - args[i++] = arguments[i]; - } - return process.nextTick(function afterTick() { - fn.apply(null, args); - }); - } -} diff --git a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/concat-stream/node_modules/readable-stream/node_modules/process-nextick-args/license.md b/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/concat-stream/node_modules/readable-stream/node_modules/process-nextick-args/license.md deleted file mode 100644 index c67e3532..00000000 --- a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/concat-stream/node_modules/readable-stream/node_modules/process-nextick-args/license.md +++ /dev/null @@ -1,19 +0,0 @@ -# Copyright (c) 2015 Calvin Metcalf - -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/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/concat-stream/node_modules/readable-stream/node_modules/process-nextick-args/package.json b/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/concat-stream/node_modules/readable-stream/node_modules/process-nextick-args/package.json deleted file mode 100644 index 58e66b1f..00000000 --- a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/concat-stream/node_modules/readable-stream/node_modules/process-nextick-args/package.json +++ /dev/null @@ -1,49 +0,0 @@ -{ - "name": "process-nextick-args", - "version": "1.0.7", - "description": "process.nextTick but always with args", - "main": "index.js", - "scripts": { - "test": "node test.js" - }, - "repository": { - "type": "git", - "url": "https://github.com/calvinmetcalf/process-nextick-args.git" - }, - "author": "", - "license": "MIT", - "bugs": { - "url": "https://github.com/calvinmetcalf/process-nextick-args/issues" - }, - "homepage": "https://github.com/calvinmetcalf/process-nextick-args", - "devDependencies": { - "tap": "~0.2.6" - }, - "gitHead": "5c00899ab01dd32f93ad4b5743da33da91404f39", - "_id": "process-nextick-args@1.0.7", - "_shasum": "150e20b756590ad3f91093f25a4f2ad8bff30ba3", - "_from": "process-nextick-args@>=1.0.6 <1.1.0", - "_npmVersion": "3.8.6", - "_nodeVersion": "5.11.0", - "_npmUser": { - "name": "cwmma", - "email": "calvin.metcalf@gmail.com" - }, - "dist": { - "shasum": "150e20b756590ad3f91093f25a4f2ad8bff30ba3", - "tarball": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-1.0.7.tgz" - }, - "maintainers": [ - { - "name": "cwmma", - "email": "calvin.metcalf@gmail.com" - } - ], - "_npmOperationalInternal": { - "host": "packages-12-west.internal.npmjs.com", - "tmp": "tmp/process-nextick-args-1.0.7.tgz_1462394251778_0.36989671061746776" - }, - "directories": {}, - "_resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-1.0.7.tgz", - "readme": "ERROR: No README data found!" -} diff --git a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/concat-stream/node_modules/readable-stream/node_modules/process-nextick-args/readme.md b/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/concat-stream/node_modules/readable-stream/node_modules/process-nextick-args/readme.md deleted file mode 100644 index 78e7cfae..00000000 --- a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/concat-stream/node_modules/readable-stream/node_modules/process-nextick-args/readme.md +++ /dev/null @@ -1,18 +0,0 @@ -process-nextick-args -===== - -[![Build Status](https://travis-ci.org/calvinmetcalf/process-nextick-args.svg?branch=master)](https://travis-ci.org/calvinmetcalf/process-nextick-args) - -```bash -npm install --save process-nextick-args -``` - -Always be able to pass arguments to process.nextTick, no matter the platform - -```js -var nextTick = require('process-nextick-args'); - -nextTick(function (a, b, c) { - console.log(a, b, c); -}, 'step', 3, 'profit'); -``` diff --git a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/concat-stream/node_modules/readable-stream/node_modules/process-nextick-args/test.js b/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/concat-stream/node_modules/readable-stream/node_modules/process-nextick-args/test.js deleted file mode 100644 index ef157215..00000000 --- a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/concat-stream/node_modules/readable-stream/node_modules/process-nextick-args/test.js +++ /dev/null @@ -1,24 +0,0 @@ -var test = require("tap").test; -var nextTick = require('./'); - -test('should work', function (t) { - t.plan(5); - nextTick(function (a) { - t.ok(a); - nextTick(function (thing) { - t.equals(thing, 7); - }, 7); - }, true); - nextTick(function (a, b, c) { - t.equals(a, 'step'); - t.equals(b, 3); - t.equals(c, 'profit'); - }, 'step', 3, 'profit'); -}); - -test('correct number of arguments', function (t) { - t.plan(1); - nextTick(function () { - t.equals(2, arguments.length, 'correct number'); - }, 1, 2); -}); diff --git a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/concat-stream/node_modules/readable-stream/node_modules/string_decoder/.npmignore b/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/concat-stream/node_modules/readable-stream/node_modules/string_decoder/.npmignore deleted file mode 100644 index 206320cc..00000000 --- a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/concat-stream/node_modules/readable-stream/node_modules/string_decoder/.npmignore +++ /dev/null @@ -1,2 +0,0 @@ -build -test diff --git a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/concat-stream/node_modules/readable-stream/node_modules/string_decoder/LICENSE b/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/concat-stream/node_modules/readable-stream/node_modules/string_decoder/LICENSE deleted file mode 100644 index 6de584a4..00000000 --- a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/concat-stream/node_modules/readable-stream/node_modules/string_decoder/LICENSE +++ /dev/null @@ -1,20 +0,0 @@ -Copyright Joyent, Inc. and other Node contributors. - -Permission is hereby granted, free of charge, to any person obtaining a -copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to permit -persons to whom the Software is furnished to do so, subject to the -following conditions: - -The above copyright notice and this permission notice shall be included -in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/concat-stream/node_modules/readable-stream/node_modules/string_decoder/README.md b/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/concat-stream/node_modules/readable-stream/node_modules/string_decoder/README.md deleted file mode 100644 index 4d2aa001..00000000 --- a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/concat-stream/node_modules/readable-stream/node_modules/string_decoder/README.md +++ /dev/null @@ -1,7 +0,0 @@ -**string_decoder.js** (`require('string_decoder')`) from Node.js core - -Copyright Joyent, Inc. and other Node contributors. See LICENCE file for details. - -Version numbers match the versions found in Node core, e.g. 0.10.24 matches Node 0.10.24, likewise 0.11.10 matches Node 0.11.10. **Prefer the stable version over the unstable.** - -The *build/* directory contains a build script that will scrape the source from the [joyent/node](https://github.com/joyent/node) repo given a specific Node version. \ No newline at end of file diff --git a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/concat-stream/node_modules/readable-stream/node_modules/string_decoder/index.js b/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/concat-stream/node_modules/readable-stream/node_modules/string_decoder/index.js deleted file mode 100644 index b00e54fb..00000000 --- a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/concat-stream/node_modules/readable-stream/node_modules/string_decoder/index.js +++ /dev/null @@ -1,221 +0,0 @@ -// Copyright Joyent, Inc. and other Node contributors. -// -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to permit -// persons to whom the Software is furnished to do so, subject to the -// following conditions: -// -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -// USE OR OTHER DEALINGS IN THE SOFTWARE. - -var Buffer = require('buffer').Buffer; - -var isBufferEncoding = Buffer.isEncoding - || function(encoding) { - switch (encoding && encoding.toLowerCase()) { - case 'hex': case 'utf8': case 'utf-8': case 'ascii': case 'binary': case 'base64': case 'ucs2': case 'ucs-2': case 'utf16le': case 'utf-16le': case 'raw': return true; - default: return false; - } - } - - -function assertEncoding(encoding) { - if (encoding && !isBufferEncoding(encoding)) { - throw new Error('Unknown encoding: ' + encoding); - } -} - -// StringDecoder provides an interface for efficiently splitting a series of -// buffers into a series of JS strings without breaking apart multi-byte -// characters. CESU-8 is handled as part of the UTF-8 encoding. -// -// @TODO Handling all encodings inside a single object makes it very difficult -// to reason about this code, so it should be split up in the future. -// @TODO There should be a utf8-strict encoding that rejects invalid UTF-8 code -// points as used by CESU-8. -var StringDecoder = exports.StringDecoder = function(encoding) { - this.encoding = (encoding || 'utf8').toLowerCase().replace(/[-_]/, ''); - assertEncoding(encoding); - switch (this.encoding) { - case 'utf8': - // CESU-8 represents each of Surrogate Pair by 3-bytes - this.surrogateSize = 3; - break; - case 'ucs2': - case 'utf16le': - // UTF-16 represents each of Surrogate Pair by 2-bytes - this.surrogateSize = 2; - this.detectIncompleteChar = utf16DetectIncompleteChar; - break; - case 'base64': - // Base-64 stores 3 bytes in 4 chars, and pads the remainder. - this.surrogateSize = 3; - this.detectIncompleteChar = base64DetectIncompleteChar; - break; - default: - this.write = passThroughWrite; - return; - } - - // Enough space to store all bytes of a single character. UTF-8 needs 4 - // bytes, but CESU-8 may require up to 6 (3 bytes per surrogate). - this.charBuffer = new Buffer(6); - // Number of bytes received for the current incomplete multi-byte character. - this.charReceived = 0; - // Number of bytes expected for the current incomplete multi-byte character. - this.charLength = 0; -}; - - -// write decodes the given buffer and returns it as JS string that is -// guaranteed to not contain any partial multi-byte characters. Any partial -// character found at the end of the buffer is buffered up, and will be -// returned when calling write again with the remaining bytes. -// -// Note: Converting a Buffer containing an orphan surrogate to a String -// currently works, but converting a String to a Buffer (via `new Buffer`, or -// Buffer#write) will replace incomplete surrogates with the unicode -// replacement character. See https://codereview.chromium.org/121173009/ . -StringDecoder.prototype.write = function(buffer) { - var charStr = ''; - // if our last write ended with an incomplete multibyte character - while (this.charLength) { - // determine how many remaining bytes this buffer has to offer for this char - var available = (buffer.length >= this.charLength - this.charReceived) ? - this.charLength - this.charReceived : - buffer.length; - - // add the new bytes to the char buffer - buffer.copy(this.charBuffer, this.charReceived, 0, available); - this.charReceived += available; - - if (this.charReceived < this.charLength) { - // still not enough chars in this buffer? wait for more ... - return ''; - } - - // remove bytes belonging to the current character from the buffer - buffer = buffer.slice(available, buffer.length); - - // get the character that was split - charStr = this.charBuffer.slice(0, this.charLength).toString(this.encoding); - - // CESU-8: lead surrogate (D800-DBFF) is also the incomplete character - var charCode = charStr.charCodeAt(charStr.length - 1); - if (charCode >= 0xD800 && charCode <= 0xDBFF) { - this.charLength += this.surrogateSize; - charStr = ''; - continue; - } - this.charReceived = this.charLength = 0; - - // if there are no more bytes in this buffer, just emit our char - if (buffer.length === 0) { - return charStr; - } - break; - } - - // determine and set charLength / charReceived - this.detectIncompleteChar(buffer); - - var end = buffer.length; - if (this.charLength) { - // buffer the incomplete character bytes we got - buffer.copy(this.charBuffer, 0, buffer.length - this.charReceived, end); - end -= this.charReceived; - } - - charStr += buffer.toString(this.encoding, 0, end); - - var end = charStr.length - 1; - var charCode = charStr.charCodeAt(end); - // CESU-8: lead surrogate (D800-DBFF) is also the incomplete character - if (charCode >= 0xD800 && charCode <= 0xDBFF) { - var size = this.surrogateSize; - this.charLength += size; - this.charReceived += size; - this.charBuffer.copy(this.charBuffer, size, 0, size); - buffer.copy(this.charBuffer, 0, 0, size); - return charStr.substring(0, end); - } - - // or just emit the charStr - return charStr; -}; - -// detectIncompleteChar determines if there is an incomplete UTF-8 character at -// the end of the given buffer. If so, it sets this.charLength to the byte -// length that character, and sets this.charReceived to the number of bytes -// that are available for this character. -StringDecoder.prototype.detectIncompleteChar = function(buffer) { - // determine how many bytes we have to check at the end of this buffer - var i = (buffer.length >= 3) ? 3 : buffer.length; - - // Figure out if one of the last i bytes of our buffer announces an - // incomplete char. - for (; i > 0; i--) { - var c = buffer[buffer.length - i]; - - // See http://en.wikipedia.org/wiki/UTF-8#Description - - // 110XXXXX - if (i == 1 && c >> 5 == 0x06) { - this.charLength = 2; - break; - } - - // 1110XXXX - if (i <= 2 && c >> 4 == 0x0E) { - this.charLength = 3; - break; - } - - // 11110XXX - if (i <= 3 && c >> 3 == 0x1E) { - this.charLength = 4; - break; - } - } - this.charReceived = i; -}; - -StringDecoder.prototype.end = function(buffer) { - var res = ''; - if (buffer && buffer.length) - res = this.write(buffer); - - if (this.charReceived) { - var cr = this.charReceived; - var buf = this.charBuffer; - var enc = this.encoding; - res += buf.slice(0, cr).toString(enc); - } - - return res; -}; - -function passThroughWrite(buffer) { - return buffer.toString(this.encoding); -} - -function utf16DetectIncompleteChar(buffer) { - this.charReceived = buffer.length % 2; - this.charLength = this.charReceived ? 2 : 0; -} - -function base64DetectIncompleteChar(buffer) { - this.charReceived = buffer.length % 3; - this.charLength = this.charReceived ? 3 : 0; -} diff --git a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/concat-stream/node_modules/readable-stream/node_modules/string_decoder/package.json b/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/concat-stream/node_modules/readable-stream/node_modules/string_decoder/package.json deleted file mode 100644 index 0364d54b..00000000 --- a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/concat-stream/node_modules/readable-stream/node_modules/string_decoder/package.json +++ /dev/null @@ -1,54 +0,0 @@ -{ - "name": "string_decoder", - "version": "0.10.31", - "description": "The string_decoder module from Node core", - "main": "index.js", - "dependencies": {}, - "devDependencies": { - "tap": "~0.4.8" - }, - "scripts": { - "test": "tap test/simple/*.js" - }, - "repository": { - "type": "git", - "url": "git://github.com/rvagg/string_decoder.git" - }, - "homepage": "https://github.com/rvagg/string_decoder", - "keywords": [ - "string", - "decoder", - "browser", - "browserify" - ], - "license": "MIT", - "gitHead": "d46d4fd87cf1d06e031c23f1ba170ca7d4ade9a0", - "bugs": { - "url": "https://github.com/rvagg/string_decoder/issues" - }, - "_id": "string_decoder@0.10.31", - "_shasum": "62e203bc41766c6c28c9fc84301dab1c5310fa94", - "_from": "string_decoder@>=0.10.0 <0.11.0", - "_npmVersion": "1.4.23", - "_npmUser": { - "name": "rvagg", - "email": "rod@vagg.org" - }, - "maintainers": [ - { - "name": "substack", - "email": "mail@substack.net" - }, - { - "name": "rvagg", - "email": "rod@vagg.org" - } - ], - "dist": { - "shasum": "62e203bc41766c6c28c9fc84301dab1c5310fa94", - "tarball": "http://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz" - }, - "directories": {}, - "_resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", - "readme": "ERROR: No README data found!" -} diff --git a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/concat-stream/node_modules/readable-stream/node_modules/util-deprecate/History.md b/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/concat-stream/node_modules/readable-stream/node_modules/util-deprecate/History.md deleted file mode 100644 index acc86753..00000000 --- a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/concat-stream/node_modules/readable-stream/node_modules/util-deprecate/History.md +++ /dev/null @@ -1,16 +0,0 @@ - -1.0.2 / 2015-10-07 -================== - - * use try/catch when checking `localStorage` (#3, @kumavis) - -1.0.1 / 2014-11-25 -================== - - * browser: use `console.warn()` for deprecation calls - * browser: more jsdocs - -1.0.0 / 2014-04-30 -================== - - * initial commit diff --git a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/concat-stream/node_modules/readable-stream/node_modules/util-deprecate/LICENSE b/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/concat-stream/node_modules/readable-stream/node_modules/util-deprecate/LICENSE deleted file mode 100644 index 6a60e8c2..00000000 --- a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/concat-stream/node_modules/readable-stream/node_modules/util-deprecate/LICENSE +++ /dev/null @@ -1,24 +0,0 @@ -(The MIT License) - -Copyright (c) 2014 Nathan Rajlich - -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/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/concat-stream/node_modules/readable-stream/node_modules/util-deprecate/README.md b/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/concat-stream/node_modules/readable-stream/node_modules/util-deprecate/README.md deleted file mode 100644 index 75622fa7..00000000 --- a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/concat-stream/node_modules/readable-stream/node_modules/util-deprecate/README.md +++ /dev/null @@ -1,53 +0,0 @@ -util-deprecate -============== -### The Node.js `util.deprecate()` function with browser support - -In Node.js, this module simply re-exports the `util.deprecate()` function. - -In the web browser (i.e. via browserify), a browser-specific implementation -of the `util.deprecate()` function is used. - - -## API - -A `deprecate()` function is the only thing exposed by this module. - -``` javascript -// setup: -exports.foo = deprecate(foo, 'foo() is deprecated, use bar() instead'); - - -// users see: -foo(); -// foo() is deprecated, use bar() instead -foo(); -foo(); -``` - - -## License - -(The MIT License) - -Copyright (c) 2014 Nathan Rajlich - -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/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/concat-stream/node_modules/readable-stream/node_modules/util-deprecate/browser.js b/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/concat-stream/node_modules/readable-stream/node_modules/util-deprecate/browser.js deleted file mode 100644 index 549ae2f0..00000000 --- a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/concat-stream/node_modules/readable-stream/node_modules/util-deprecate/browser.js +++ /dev/null @@ -1,67 +0,0 @@ - -/** - * Module exports. - */ - -module.exports = deprecate; - -/** - * Mark that a method should not be used. - * Returns a modified function which warns once by default. - * - * If `localStorage.noDeprecation = true` is set, then it is a no-op. - * - * If `localStorage.throwDeprecation = true` is set, then deprecated functions - * will throw an Error when invoked. - * - * If `localStorage.traceDeprecation = true` is set, then deprecated functions - * will invoke `console.trace()` instead of `console.error()`. - * - * @param {Function} fn - the function to deprecate - * @param {String} msg - the string to print to the console when `fn` is invoked - * @returns {Function} a new "deprecated" version of `fn` - * @api public - */ - -function deprecate (fn, msg) { - if (config('noDeprecation')) { - return fn; - } - - var warned = false; - function deprecated() { - if (!warned) { - if (config('throwDeprecation')) { - throw new Error(msg); - } else if (config('traceDeprecation')) { - console.trace(msg); - } else { - console.warn(msg); - } - warned = true; - } - return fn.apply(this, arguments); - } - - return deprecated; -} - -/** - * Checks `localStorage` for boolean values for the given `name`. - * - * @param {String} name - * @returns {Boolean} - * @api private - */ - -function config (name) { - // accessing global.localStorage can trigger a DOMException in sandboxed iframes - try { - if (!global.localStorage) return false; - } catch (_) { - return false; - } - var val = global.localStorage[name]; - if (null == val) return false; - return String(val).toLowerCase() === 'true'; -} diff --git a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/concat-stream/node_modules/readable-stream/node_modules/util-deprecate/node.js b/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/concat-stream/node_modules/readable-stream/node_modules/util-deprecate/node.js deleted file mode 100644 index 5e6fcff5..00000000 --- a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/concat-stream/node_modules/readable-stream/node_modules/util-deprecate/node.js +++ /dev/null @@ -1,6 +0,0 @@ - -/** - * For Node.js, simply re-export the core `util.deprecate` function. - */ - -module.exports = require('util').deprecate; diff --git a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/concat-stream/node_modules/readable-stream/node_modules/util-deprecate/package.json b/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/concat-stream/node_modules/readable-stream/node_modules/util-deprecate/package.json deleted file mode 100644 index ae0c70f6..00000000 --- a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/concat-stream/node_modules/readable-stream/node_modules/util-deprecate/package.json +++ /dev/null @@ -1,54 +0,0 @@ -{ - "name": "util-deprecate", - "version": "1.0.2", - "description": "The Node.js `util.deprecate()` function with browser support", - "main": "node.js", - "browser": "browser.js", - "scripts": { - "test": "echo \"Error: no test specified\" && exit 1" - }, - "repository": { - "type": "git", - "url": "git://github.com/TooTallNate/util-deprecate.git" - }, - "keywords": [ - "util", - "deprecate", - "browserify", - "browser", - "node" - ], - "author": { - "name": "Nathan Rajlich", - "email": "nathan@tootallnate.net", - "url": "http://n8.io/" - }, - "license": "MIT", - "bugs": { - "url": "https://github.com/TooTallNate/util-deprecate/issues" - }, - "homepage": "https://github.com/TooTallNate/util-deprecate", - "gitHead": "475fb6857cd23fafff20c1be846c1350abf8e6d4", - "_id": "util-deprecate@1.0.2", - "_shasum": "450d4dc9fa70de732762fbd2d4a28981419a0ccf", - "_from": "util-deprecate@>=1.0.1 <1.1.0", - "_npmVersion": "2.14.4", - "_nodeVersion": "4.1.2", - "_npmUser": { - "name": "tootallnate", - "email": "nathan@tootallnate.net" - }, - "maintainers": [ - { - "name": "tootallnate", - "email": "nathan@tootallnate.net" - } - ], - "dist": { - "shasum": "450d4dc9fa70de732762fbd2d4a28981419a0ccf", - "tarball": "http://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz" - }, - "directories": {}, - "_resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", - "readme": "ERROR: No README data found!" -} diff --git a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/concat-stream/node_modules/readable-stream/package.json b/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/concat-stream/node_modules/readable-stream/package.json deleted file mode 100644 index c71eaedf..00000000 --- a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/concat-stream/node_modules/readable-stream/package.json +++ /dev/null @@ -1,93 +0,0 @@ -{ - "name": "readable-stream", - "version": "2.2.2", - "description": "Streams3, a user-land copy of the stream library from Node.js", - "main": "readable.js", - "dependencies": { - "buffer-shims": "^1.0.0", - "core-util-is": "~1.0.0", - "isarray": "~1.0.0", - "inherits": "~2.0.1", - "process-nextick-args": "~1.0.6", - "string_decoder": "~0.10.x", - "util-deprecate": "~1.0.1" - }, - "devDependencies": { - "assert": "~1.4.0", - "babel-polyfill": "^6.9.1", - "buffer": "^4.9.0", - "nyc": "^6.4.0", - "tap": "~0.7.1", - "tape": "~4.5.1", - "zuul": "~3.10.0" - }, - "scripts": { - "test": "tap test/parallel/*.js test/ours/*.js", - "browser": "npm run write-zuul && zuul --browser-retries 2 -- test/browser.js", - "write-zuul": "printf \"ui: tape\nbrowsers:\n - name: $BROWSER_NAME\n version: $BROWSER_VERSION\n\">.zuul.yml", - "local": "zuul --local 3000 --no-coverage -- test/browser.js", - "cover": "nyc npm test", - "report": "nyc report --reporter=lcov" - }, - "repository": { - "type": "git", - "url": "git://github.com/nodejs/readable-stream.git" - }, - "keywords": [ - "readable", - "stream", - "pipe" - ], - "browser": { - "util": false - }, - "nyc": { - "include": [ - "lib/**.js" - ] - }, - "license": "MIT", - "gitHead": "f239454e183d2032c0eb7d79a1c08f674fdd8db4", - "bugs": { - "url": "https://github.com/nodejs/readable-stream/issues" - }, - "homepage": "https://github.com/nodejs/readable-stream#readme", - "_id": "readable-stream@2.2.2", - "_shasum": "a9e6fec3c7dda85f8bb1b3ba7028604556fc825e", - "_from": "readable-stream@>=2.2.2 <3.0.0", - "_npmVersion": "3.10.7", - "_nodeVersion": "7.1.0", - "_npmUser": { - "name": "cwmma", - "email": "calvin.metcalf@gmail.com" - }, - "dist": { - "shasum": "a9e6fec3c7dda85f8bb1b3ba7028604556fc825e", - "tarball": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.2.2.tgz" - }, - "maintainers": [ - { - "name": "isaacs", - "email": "isaacs@npmjs.com" - }, - { - "name": "tootallnate", - "email": "nathan@tootallnate.net" - }, - { - "name": "rvagg", - "email": "rod@vagg.org" - }, - { - "name": "cwmma", - "email": "calvin.metcalf@gmail.com" - } - ], - "_npmOperationalInternal": { - "host": "packages-18-east.internal.npmjs.com", - "tmp": "tmp/readable-stream-2.2.2.tgz_1479128709230_0.5291099038440734" - }, - "directories": {}, - "_resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.2.2.tgz", - "readme": "ERROR: No README data found!" -} diff --git a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/concat-stream/node_modules/readable-stream/passthrough.js b/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/concat-stream/node_modules/readable-stream/passthrough.js deleted file mode 100644 index 27e8d8a5..00000000 --- a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/concat-stream/node_modules/readable-stream/passthrough.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require("./lib/_stream_passthrough.js") diff --git a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/concat-stream/node_modules/readable-stream/readable.js b/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/concat-stream/node_modules/readable-stream/readable.js deleted file mode 100644 index be2688a0..00000000 --- a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/concat-stream/node_modules/readable-stream/readable.js +++ /dev/null @@ -1,16 +0,0 @@ -var Stream = (function (){ - try { - return require('st' + 'ream'); // hack to fix a circular dependency issue when used with browserify - } catch(_){} -}()); -exports = module.exports = require('./lib/_stream_readable.js'); -exports.Stream = Stream || exports; -exports.Readable = exports; -exports.Writable = require('./lib/_stream_writable.js'); -exports.Duplex = require('./lib/_stream_duplex.js'); -exports.Transform = require('./lib/_stream_transform.js'); -exports.PassThrough = require('./lib/_stream_passthrough.js'); - -if (!process.browser && process.env.READABLE_STREAM === 'disable' && Stream) { - module.exports = Stream; -} diff --git a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/concat-stream/node_modules/readable-stream/transform.js b/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/concat-stream/node_modules/readable-stream/transform.js deleted file mode 100644 index 5d482f07..00000000 --- a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/concat-stream/node_modules/readable-stream/transform.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require("./lib/_stream_transform.js") diff --git a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/concat-stream/node_modules/readable-stream/writable.js b/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/concat-stream/node_modules/readable-stream/writable.js deleted file mode 100644 index e1e9efdf..00000000 --- a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/concat-stream/node_modules/readable-stream/writable.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require("./lib/_stream_writable.js") diff --git a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/concat-stream/node_modules/typedarray/.travis.yml b/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/concat-stream/node_modules/typedarray/.travis.yml deleted file mode 100644 index cc4dba29..00000000 --- a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/concat-stream/node_modules/typedarray/.travis.yml +++ /dev/null @@ -1,4 +0,0 @@ -language: node_js -node_js: - - "0.8" - - "0.10" diff --git a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/concat-stream/node_modules/typedarray/LICENSE b/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/concat-stream/node_modules/typedarray/LICENSE deleted file mode 100644 index 11adfaec..00000000 --- a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/concat-stream/node_modules/typedarray/LICENSE +++ /dev/null @@ -1,35 +0,0 @@ -/* - Copyright (c) 2010, Linden Research, Inc. - Copyright (c) 2012, Joshua Bell - - 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. - $/LicenseInfo$ - */ - -// Original can be found at: -// https://bitbucket.org/lindenlab/llsd -// Modifications by Joshua Bell inexorabletash@gmail.com -// https://github.com/inexorabletash/polyfill - -// ES3/ES5 implementation of the Krhonos Typed Array Specification -// Ref: http://www.khronos.org/registry/typedarray/specs/latest/ -// Date: 2011-02-01 -// -// Variations: -// * Allows typed_array.get/set() as alias for subscripts (typed_array[]) diff --git a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/concat-stream/node_modules/typedarray/example/tarray.js b/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/concat-stream/node_modules/typedarray/example/tarray.js deleted file mode 100644 index 8423d7c9..00000000 --- a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/concat-stream/node_modules/typedarray/example/tarray.js +++ /dev/null @@ -1,4 +0,0 @@ -var Uint8Array = require('../').Uint8Array; -var ua = new Uint8Array(5); -ua[1] = 256 + 55; -console.log(ua[1]); diff --git a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/concat-stream/node_modules/typedarray/index.js b/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/concat-stream/node_modules/typedarray/index.js deleted file mode 100644 index 5e540841..00000000 --- a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/concat-stream/node_modules/typedarray/index.js +++ /dev/null @@ -1,630 +0,0 @@ -var undefined = (void 0); // Paranoia - -// Beyond this value, index getters/setters (i.e. array[0], array[1]) are so slow to -// create, and consume so much memory, that the browser appears frozen. -var MAX_ARRAY_LENGTH = 1e5; - -// Approximations of internal ECMAScript conversion functions -var ECMAScript = (function() { - // Stash a copy in case other scripts modify these - var opts = Object.prototype.toString, - ophop = Object.prototype.hasOwnProperty; - - return { - // Class returns internal [[Class]] property, used to avoid cross-frame instanceof issues: - Class: function(v) { return opts.call(v).replace(/^\[object *|\]$/g, ''); }, - HasProperty: function(o, p) { return p in o; }, - HasOwnProperty: function(o, p) { return ophop.call(o, p); }, - IsCallable: function(o) { return typeof o === 'function'; }, - ToInt32: function(v) { return v >> 0; }, - ToUint32: function(v) { return v >>> 0; } - }; -}()); - -// Snapshot intrinsics -var LN2 = Math.LN2, - abs = Math.abs, - floor = Math.floor, - log = Math.log, - min = Math.min, - pow = Math.pow, - round = Math.round; - -// ES5: lock down object properties -function configureProperties(obj) { - if (getOwnPropNames && defineProp) { - var props = getOwnPropNames(obj), i; - for (i = 0; i < props.length; i += 1) { - defineProp(obj, props[i], { - value: obj[props[i]], - writable: false, - enumerable: false, - configurable: false - }); - } - } -} - -// emulate ES5 getter/setter API using legacy APIs -// http://blogs.msdn.com/b/ie/archive/2010/09/07/transitioning-existing-code-to-the-es5-getter-setter-apis.aspx -// (second clause tests for Object.defineProperty() in IE<9 that only supports extending DOM prototypes, but -// note that IE<9 does not support __defineGetter__ or __defineSetter__ so it just renders the method harmless) -var defineProp -if (Object.defineProperty && (function() { - try { - Object.defineProperty({}, 'x', {}); - return true; - } catch (e) { - return false; - } - })()) { - defineProp = Object.defineProperty; -} else { - defineProp = function(o, p, desc) { - if (!o === Object(o)) throw new TypeError("Object.defineProperty called on non-object"); - if (ECMAScript.HasProperty(desc, 'get') && Object.prototype.__defineGetter__) { Object.prototype.__defineGetter__.call(o, p, desc.get); } - if (ECMAScript.HasProperty(desc, 'set') && Object.prototype.__defineSetter__) { Object.prototype.__defineSetter__.call(o, p, desc.set); } - if (ECMAScript.HasProperty(desc, 'value')) { o[p] = desc.value; } - return o; - }; -} - -var getOwnPropNames = Object.getOwnPropertyNames || function (o) { - if (o !== Object(o)) throw new TypeError("Object.getOwnPropertyNames called on non-object"); - var props = [], p; - for (p in o) { - if (ECMAScript.HasOwnProperty(o, p)) { - props.push(p); - } - } - return props; -}; - -// ES5: Make obj[index] an alias for obj._getter(index)/obj._setter(index, value) -// for index in 0 ... obj.length -function makeArrayAccessors(obj) { - if (!defineProp) { return; } - - if (obj.length > MAX_ARRAY_LENGTH) throw new RangeError("Array too large for polyfill"); - - function makeArrayAccessor(index) { - defineProp(obj, index, { - 'get': function() { return obj._getter(index); }, - 'set': function(v) { obj._setter(index, v); }, - enumerable: true, - configurable: false - }); - } - - var i; - for (i = 0; i < obj.length; i += 1) { - makeArrayAccessor(i); - } -} - -// Internal conversion functions: -// pack() - take a number (interpreted as Type), output a byte array -// unpack() - take a byte array, output a Type-like number - -function as_signed(value, bits) { var s = 32 - bits; return (value << s) >> s; } -function as_unsigned(value, bits) { var s = 32 - bits; return (value << s) >>> s; } - -function packI8(n) { return [n & 0xff]; } -function unpackI8(bytes) { return as_signed(bytes[0], 8); } - -function packU8(n) { return [n & 0xff]; } -function unpackU8(bytes) { return as_unsigned(bytes[0], 8); } - -function packU8Clamped(n) { n = round(Number(n)); return [n < 0 ? 0 : n > 0xff ? 0xff : n & 0xff]; } - -function packI16(n) { return [(n >> 8) & 0xff, n & 0xff]; } -function unpackI16(bytes) { return as_signed(bytes[0] << 8 | bytes[1], 16); } - -function packU16(n) { return [(n >> 8) & 0xff, n & 0xff]; } -function unpackU16(bytes) { return as_unsigned(bytes[0] << 8 | bytes[1], 16); } - -function packI32(n) { return [(n >> 24) & 0xff, (n >> 16) & 0xff, (n >> 8) & 0xff, n & 0xff]; } -function unpackI32(bytes) { return as_signed(bytes[0] << 24 | bytes[1] << 16 | bytes[2] << 8 | bytes[3], 32); } - -function packU32(n) { return [(n >> 24) & 0xff, (n >> 16) & 0xff, (n >> 8) & 0xff, n & 0xff]; } -function unpackU32(bytes) { return as_unsigned(bytes[0] << 24 | bytes[1] << 16 | bytes[2] << 8 | bytes[3], 32); } - -function packIEEE754(v, ebits, fbits) { - - var bias = (1 << (ebits - 1)) - 1, - s, e, f, ln, - i, bits, str, bytes; - - function roundToEven(n) { - var w = floor(n), f = n - w; - if (f < 0.5) - return w; - if (f > 0.5) - return w + 1; - return w % 2 ? w + 1 : w; - } - - // Compute sign, exponent, fraction - if (v !== v) { - // NaN - // http://dev.w3.org/2006/webapi/WebIDL/#es-type-mapping - e = (1 << ebits) - 1; f = pow(2, fbits - 1); s = 0; - } else if (v === Infinity || v === -Infinity) { - e = (1 << ebits) - 1; f = 0; s = (v < 0) ? 1 : 0; - } else if (v === 0) { - e = 0; f = 0; s = (1 / v === -Infinity) ? 1 : 0; - } else { - s = v < 0; - v = abs(v); - - if (v >= pow(2, 1 - bias)) { - e = min(floor(log(v) / LN2), 1023); - f = roundToEven(v / pow(2, e) * pow(2, fbits)); - if (f / pow(2, fbits) >= 2) { - e = e + 1; - f = 1; - } - if (e > bias) { - // Overflow - e = (1 << ebits) - 1; - f = 0; - } else { - // Normalized - e = e + bias; - f = f - pow(2, fbits); - } - } else { - // Denormalized - e = 0; - f = roundToEven(v / pow(2, 1 - bias - fbits)); - } - } - - // Pack sign, exponent, fraction - bits = []; - for (i = fbits; i; i -= 1) { bits.push(f % 2 ? 1 : 0); f = floor(f / 2); } - for (i = ebits; i; i -= 1) { bits.push(e % 2 ? 1 : 0); e = floor(e / 2); } - bits.push(s ? 1 : 0); - bits.reverse(); - str = bits.join(''); - - // Bits to bytes - bytes = []; - while (str.length) { - bytes.push(parseInt(str.substring(0, 8), 2)); - str = str.substring(8); - } - return bytes; -} - -function unpackIEEE754(bytes, ebits, fbits) { - - // Bytes to bits - var bits = [], i, j, b, str, - bias, s, e, f; - - for (i = bytes.length; i; i -= 1) { - b = bytes[i - 1]; - for (j = 8; j; j -= 1) { - bits.push(b % 2 ? 1 : 0); b = b >> 1; - } - } - bits.reverse(); - str = bits.join(''); - - // Unpack sign, exponent, fraction - bias = (1 << (ebits - 1)) - 1; - s = parseInt(str.substring(0, 1), 2) ? -1 : 1; - e = parseInt(str.substring(1, 1 + ebits), 2); - f = parseInt(str.substring(1 + ebits), 2); - - // Produce number - if (e === (1 << ebits) - 1) { - return f !== 0 ? NaN : s * Infinity; - } else if (e > 0) { - // Normalized - return s * pow(2, e - bias) * (1 + f / pow(2, fbits)); - } else if (f !== 0) { - // Denormalized - return s * pow(2, -(bias - 1)) * (f / pow(2, fbits)); - } else { - return s < 0 ? -0 : 0; - } -} - -function unpackF64(b) { return unpackIEEE754(b, 11, 52); } -function packF64(v) { return packIEEE754(v, 11, 52); } -function unpackF32(b) { return unpackIEEE754(b, 8, 23); } -function packF32(v) { return packIEEE754(v, 8, 23); } - - -// -// 3 The ArrayBuffer Type -// - -(function() { - - /** @constructor */ - var ArrayBuffer = function ArrayBuffer(length) { - length = ECMAScript.ToInt32(length); - if (length < 0) throw new RangeError('ArrayBuffer size is not a small enough positive integer'); - - this.byteLength = length; - this._bytes = []; - this._bytes.length = length; - - var i; - for (i = 0; i < this.byteLength; i += 1) { - this._bytes[i] = 0; - } - - configureProperties(this); - }; - - exports.ArrayBuffer = exports.ArrayBuffer || ArrayBuffer; - - // - // 4 The ArrayBufferView Type - // - - // NOTE: this constructor is not exported - /** @constructor */ - var ArrayBufferView = function ArrayBufferView() { - //this.buffer = null; - //this.byteOffset = 0; - //this.byteLength = 0; - }; - - // - // 5 The Typed Array View Types - // - - function makeConstructor(bytesPerElement, pack, unpack) { - // Each TypedArray type requires a distinct constructor instance with - // identical logic, which this produces. - - var ctor; - ctor = function(buffer, byteOffset, length) { - var array, sequence, i, s; - - if (!arguments.length || typeof arguments[0] === 'number') { - // Constructor(unsigned long length) - this.length = ECMAScript.ToInt32(arguments[0]); - if (length < 0) throw new RangeError('ArrayBufferView size is not a small enough positive integer'); - - this.byteLength = this.length * this.BYTES_PER_ELEMENT; - this.buffer = new ArrayBuffer(this.byteLength); - this.byteOffset = 0; - } else if (typeof arguments[0] === 'object' && arguments[0].constructor === ctor) { - // Constructor(TypedArray array) - array = arguments[0]; - - this.length = array.length; - this.byteLength = this.length * this.BYTES_PER_ELEMENT; - this.buffer = new ArrayBuffer(this.byteLength); - this.byteOffset = 0; - - for (i = 0; i < this.length; i += 1) { - this._setter(i, array._getter(i)); - } - } else if (typeof arguments[0] === 'object' && - !(arguments[0] instanceof ArrayBuffer || ECMAScript.Class(arguments[0]) === 'ArrayBuffer')) { - // Constructor(sequence array) - sequence = arguments[0]; - - this.length = ECMAScript.ToUint32(sequence.length); - this.byteLength = this.length * this.BYTES_PER_ELEMENT; - this.buffer = new ArrayBuffer(this.byteLength); - this.byteOffset = 0; - - for (i = 0; i < this.length; i += 1) { - s = sequence[i]; - this._setter(i, Number(s)); - } - } else if (typeof arguments[0] === 'object' && - (arguments[0] instanceof ArrayBuffer || ECMAScript.Class(arguments[0]) === 'ArrayBuffer')) { - // Constructor(ArrayBuffer buffer, - // optional unsigned long byteOffset, optional unsigned long length) - this.buffer = buffer; - - this.byteOffset = ECMAScript.ToUint32(byteOffset); - if (this.byteOffset > this.buffer.byteLength) { - throw new RangeError("byteOffset out of range"); - } - - if (this.byteOffset % this.BYTES_PER_ELEMENT) { - // The given byteOffset must be a multiple of the element - // size of the specific type, otherwise an exception is raised. - throw new RangeError("ArrayBuffer length minus the byteOffset is not a multiple of the element size."); - } - - if (arguments.length < 3) { - this.byteLength = this.buffer.byteLength - this.byteOffset; - - if (this.byteLength % this.BYTES_PER_ELEMENT) { - throw new RangeError("length of buffer minus byteOffset not a multiple of the element size"); - } - this.length = this.byteLength / this.BYTES_PER_ELEMENT; - } else { - this.length = ECMAScript.ToUint32(length); - this.byteLength = this.length * this.BYTES_PER_ELEMENT; - } - - if ((this.byteOffset + this.byteLength) > this.buffer.byteLength) { - throw new RangeError("byteOffset and length reference an area beyond the end of the buffer"); - } - } else { - throw new TypeError("Unexpected argument type(s)"); - } - - this.constructor = ctor; - - configureProperties(this); - makeArrayAccessors(this); - }; - - ctor.prototype = new ArrayBufferView(); - ctor.prototype.BYTES_PER_ELEMENT = bytesPerElement; - ctor.prototype._pack = pack; - ctor.prototype._unpack = unpack; - ctor.BYTES_PER_ELEMENT = bytesPerElement; - - // getter type (unsigned long index); - ctor.prototype._getter = function(index) { - if (arguments.length < 1) throw new SyntaxError("Not enough arguments"); - - index = ECMAScript.ToUint32(index); - if (index >= this.length) { - return undefined; - } - - var bytes = [], i, o; - for (i = 0, o = this.byteOffset + index * this.BYTES_PER_ELEMENT; - i < this.BYTES_PER_ELEMENT; - i += 1, o += 1) { - bytes.push(this.buffer._bytes[o]); - } - return this._unpack(bytes); - }; - - // NONSTANDARD: convenience alias for getter: type get(unsigned long index); - ctor.prototype.get = ctor.prototype._getter; - - // setter void (unsigned long index, type value); - ctor.prototype._setter = function(index, value) { - if (arguments.length < 2) throw new SyntaxError("Not enough arguments"); - - index = ECMAScript.ToUint32(index); - if (index >= this.length) { - return undefined; - } - - var bytes = this._pack(value), i, o; - for (i = 0, o = this.byteOffset + index * this.BYTES_PER_ELEMENT; - i < this.BYTES_PER_ELEMENT; - i += 1, o += 1) { - this.buffer._bytes[o] = bytes[i]; - } - }; - - // void set(TypedArray array, optional unsigned long offset); - // void set(sequence array, optional unsigned long offset); - ctor.prototype.set = function(index, value) { - if (arguments.length < 1) throw new SyntaxError("Not enough arguments"); - var array, sequence, offset, len, - i, s, d, - byteOffset, byteLength, tmp; - - if (typeof arguments[0] === 'object' && arguments[0].constructor === this.constructor) { - // void set(TypedArray array, optional unsigned long offset); - array = arguments[0]; - offset = ECMAScript.ToUint32(arguments[1]); - - if (offset + array.length > this.length) { - throw new RangeError("Offset plus length of array is out of range"); - } - - byteOffset = this.byteOffset + offset * this.BYTES_PER_ELEMENT; - byteLength = array.length * this.BYTES_PER_ELEMENT; - - if (array.buffer === this.buffer) { - tmp = []; - for (i = 0, s = array.byteOffset; i < byteLength; i += 1, s += 1) { - tmp[i] = array.buffer._bytes[s]; - } - for (i = 0, d = byteOffset; i < byteLength; i += 1, d += 1) { - this.buffer._bytes[d] = tmp[i]; - } - } else { - for (i = 0, s = array.byteOffset, d = byteOffset; - i < byteLength; i += 1, s += 1, d += 1) { - this.buffer._bytes[d] = array.buffer._bytes[s]; - } - } - } else if (typeof arguments[0] === 'object' && typeof arguments[0].length !== 'undefined') { - // void set(sequence array, optional unsigned long offset); - sequence = arguments[0]; - len = ECMAScript.ToUint32(sequence.length); - offset = ECMAScript.ToUint32(arguments[1]); - - if (offset + len > this.length) { - throw new RangeError("Offset plus length of array is out of range"); - } - - for (i = 0; i < len; i += 1) { - s = sequence[i]; - this._setter(offset + i, Number(s)); - } - } else { - throw new TypeError("Unexpected argument type(s)"); - } - }; - - // TypedArray subarray(long begin, optional long end); - ctor.prototype.subarray = function(start, end) { - function clamp(v, min, max) { return v < min ? min : v > max ? max : v; } - - start = ECMAScript.ToInt32(start); - end = ECMAScript.ToInt32(end); - - if (arguments.length < 1) { start = 0; } - if (arguments.length < 2) { end = this.length; } - - if (start < 0) { start = this.length + start; } - if (end < 0) { end = this.length + end; } - - start = clamp(start, 0, this.length); - end = clamp(end, 0, this.length); - - var len = end - start; - if (len < 0) { - len = 0; - } - - return new this.constructor( - this.buffer, this.byteOffset + start * this.BYTES_PER_ELEMENT, len); - }; - - return ctor; - } - - var Int8Array = makeConstructor(1, packI8, unpackI8); - var Uint8Array = makeConstructor(1, packU8, unpackU8); - var Uint8ClampedArray = makeConstructor(1, packU8Clamped, unpackU8); - var Int16Array = makeConstructor(2, packI16, unpackI16); - var Uint16Array = makeConstructor(2, packU16, unpackU16); - var Int32Array = makeConstructor(4, packI32, unpackI32); - var Uint32Array = makeConstructor(4, packU32, unpackU32); - var Float32Array = makeConstructor(4, packF32, unpackF32); - var Float64Array = makeConstructor(8, packF64, unpackF64); - - exports.Int8Array = exports.Int8Array || Int8Array; - exports.Uint8Array = exports.Uint8Array || Uint8Array; - exports.Uint8ClampedArray = exports.Uint8ClampedArray || Uint8ClampedArray; - exports.Int16Array = exports.Int16Array || Int16Array; - exports.Uint16Array = exports.Uint16Array || Uint16Array; - exports.Int32Array = exports.Int32Array || Int32Array; - exports.Uint32Array = exports.Uint32Array || Uint32Array; - exports.Float32Array = exports.Float32Array || Float32Array; - exports.Float64Array = exports.Float64Array || Float64Array; -}()); - -// -// 6 The DataView View Type -// - -(function() { - function r(array, index) { - return ECMAScript.IsCallable(array.get) ? array.get(index) : array[index]; - } - - var IS_BIG_ENDIAN = (function() { - var u16array = new(exports.Uint16Array)([0x1234]), - u8array = new(exports.Uint8Array)(u16array.buffer); - return r(u8array, 0) === 0x12; - }()); - - // Constructor(ArrayBuffer buffer, - // optional unsigned long byteOffset, - // optional unsigned long byteLength) - /** @constructor */ - var DataView = function DataView(buffer, byteOffset, byteLength) { - if (arguments.length === 0) { - buffer = new exports.ArrayBuffer(0); - } else if (!(buffer instanceof exports.ArrayBuffer || ECMAScript.Class(buffer) === 'ArrayBuffer')) { - throw new TypeError("TypeError"); - } - - this.buffer = buffer || new exports.ArrayBuffer(0); - - this.byteOffset = ECMAScript.ToUint32(byteOffset); - if (this.byteOffset > this.buffer.byteLength) { - throw new RangeError("byteOffset out of range"); - } - - if (arguments.length < 3) { - this.byteLength = this.buffer.byteLength - this.byteOffset; - } else { - this.byteLength = ECMAScript.ToUint32(byteLength); - } - - if ((this.byteOffset + this.byteLength) > this.buffer.byteLength) { - throw new RangeError("byteOffset and length reference an area beyond the end of the buffer"); - } - - configureProperties(this); - }; - - function makeGetter(arrayType) { - return function(byteOffset, littleEndian) { - - byteOffset = ECMAScript.ToUint32(byteOffset); - - if (byteOffset + arrayType.BYTES_PER_ELEMENT > this.byteLength) { - throw new RangeError("Array index out of range"); - } - byteOffset += this.byteOffset; - - var uint8Array = new exports.Uint8Array(this.buffer, byteOffset, arrayType.BYTES_PER_ELEMENT), - bytes = [], i; - for (i = 0; i < arrayType.BYTES_PER_ELEMENT; i += 1) { - bytes.push(r(uint8Array, i)); - } - - if (Boolean(littleEndian) === Boolean(IS_BIG_ENDIAN)) { - bytes.reverse(); - } - - return r(new arrayType(new exports.Uint8Array(bytes).buffer), 0); - }; - } - - DataView.prototype.getUint8 = makeGetter(exports.Uint8Array); - DataView.prototype.getInt8 = makeGetter(exports.Int8Array); - DataView.prototype.getUint16 = makeGetter(exports.Uint16Array); - DataView.prototype.getInt16 = makeGetter(exports.Int16Array); - DataView.prototype.getUint32 = makeGetter(exports.Uint32Array); - DataView.prototype.getInt32 = makeGetter(exports.Int32Array); - DataView.prototype.getFloat32 = makeGetter(exports.Float32Array); - DataView.prototype.getFloat64 = makeGetter(exports.Float64Array); - - function makeSetter(arrayType) { - return function(byteOffset, value, littleEndian) { - - byteOffset = ECMAScript.ToUint32(byteOffset); - if (byteOffset + arrayType.BYTES_PER_ELEMENT > this.byteLength) { - throw new RangeError("Array index out of range"); - } - - // Get bytes - var typeArray = new arrayType([value]), - byteArray = new exports.Uint8Array(typeArray.buffer), - bytes = [], i, byteView; - - for (i = 0; i < arrayType.BYTES_PER_ELEMENT; i += 1) { - bytes.push(r(byteArray, i)); - } - - // Flip if necessary - if (Boolean(littleEndian) === Boolean(IS_BIG_ENDIAN)) { - bytes.reverse(); - } - - // Write them - byteView = new exports.Uint8Array(this.buffer, byteOffset, arrayType.BYTES_PER_ELEMENT); - byteView.set(bytes); - }; - } - - DataView.prototype.setUint8 = makeSetter(exports.Uint8Array); - DataView.prototype.setInt8 = makeSetter(exports.Int8Array); - DataView.prototype.setUint16 = makeSetter(exports.Uint16Array); - DataView.prototype.setInt16 = makeSetter(exports.Int16Array); - DataView.prototype.setUint32 = makeSetter(exports.Uint32Array); - DataView.prototype.setInt32 = makeSetter(exports.Int32Array); - DataView.prototype.setFloat32 = makeSetter(exports.Float32Array); - DataView.prototype.setFloat64 = makeSetter(exports.Float64Array); - - exports.DataView = exports.DataView || DataView; - -}()); diff --git a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/concat-stream/node_modules/typedarray/package.json b/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/concat-stream/node_modules/typedarray/package.json deleted file mode 100644 index 8961ef14..00000000 --- a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/concat-stream/node_modules/typedarray/package.json +++ /dev/null @@ -1,79 +0,0 @@ -{ - "name": "typedarray", - "version": "0.0.6", - "description": "TypedArray polyfill for old browsers", - "main": "index.js", - "devDependencies": { - "tape": "~2.3.2" - }, - "scripts": { - "test": "tape test/*.js test/server/*.js" - }, - "repository": { - "type": "git", - "url": "git://github.com/substack/typedarray.git" - }, - "homepage": "https://github.com/substack/typedarray", - "keywords": [ - "ArrayBuffer", - "DataView", - "Float32Array", - "Float64Array", - "Int8Array", - "Int16Array", - "Int32Array", - "Uint8Array", - "Uint8ClampedArray", - "Uint16Array", - "Uint32Array", - "typed", - "array", - "polyfill" - ], - "author": { - "name": "James Halliday", - "email": "mail@substack.net", - "url": "http://substack.net" - }, - "license": "MIT", - "testling": { - "files": "test/*.js", - "browsers": [ - "ie/6..latest", - "firefox/16..latest", - "firefox/nightly", - "chrome/22..latest", - "chrome/canary", - "opera/12..latest", - "opera/next", - "safari/5.1..latest", - "ipad/6.0..latest", - "iphone/6.0..latest", - "android-browser/4.2..latest" - ] - }, - "bugs": { - "url": "https://github.com/substack/typedarray/issues" - }, - "_id": "typedarray@0.0.6", - "dist": { - "shasum": "867ac74e3864187b1d3d47d996a78ec5c8830777", - "tarball": "http://registry.npmjs.org/typedarray/-/typedarray-0.0.6.tgz" - }, - "_from": "typedarray@>=0.0.6 <0.0.7", - "_npmVersion": "1.4.3", - "_npmUser": { - "name": "substack", - "email": "mail@substack.net" - }, - "maintainers": [ - { - "name": "substack", - "email": "mail@substack.net" - } - ], - "directories": {}, - "_shasum": "867ac74e3864187b1d3d47d996a78ec5c8830777", - "_resolved": "https://registry.npmjs.org/typedarray/-/typedarray-0.0.6.tgz", - "readme": "ERROR: No README data found!" -} diff --git a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/concat-stream/node_modules/typedarray/readme.markdown b/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/concat-stream/node_modules/typedarray/readme.markdown deleted file mode 100644 index d18f6f71..00000000 --- a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/concat-stream/node_modules/typedarray/readme.markdown +++ /dev/null @@ -1,61 +0,0 @@ -# typedarray - -TypedArray polyfill ripped from [this -module](https://raw.github.com/inexorabletash/polyfill). - -[![build status](https://secure.travis-ci.org/substack/typedarray.png)](http://travis-ci.org/substack/typedarray) - -[![testling badge](https://ci.testling.com/substack/typedarray.png)](https://ci.testling.com/substack/typedarray) - -# example - -``` js -var Uint8Array = require('typedarray').Uint8Array; -var ua = new Uint8Array(5); -ua[1] = 256 + 55; -console.log(ua[1]); -``` - -output: - -``` -55 -``` - -# methods - -``` js -var TA = require('typedarray') -``` - -The `TA` object has the following constructors: - -* TA.ArrayBuffer -* TA.DataView -* TA.Float32Array -* TA.Float64Array -* TA.Int8Array -* TA.Int16Array -* TA.Int32Array -* TA.Uint8Array -* TA.Uint8ClampedArray -* TA.Uint16Array -* TA.Uint32Array - -# install - -With [npm](https://npmjs.org) do: - -``` -npm install typedarray -``` - -To use this module in the browser, compile with -[browserify](http://browserify.org) -or download a UMD build from browserify CDN: - -http://wzrd.in/standalone/typedarray@latest - -# license - -MIT diff --git a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/concat-stream/node_modules/typedarray/test/server/undef_globals.js b/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/concat-stream/node_modules/typedarray/test/server/undef_globals.js deleted file mode 100644 index 425950f9..00000000 --- a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/concat-stream/node_modules/typedarray/test/server/undef_globals.js +++ /dev/null @@ -1,19 +0,0 @@ -var test = require('tape'); -var vm = require('vm'); -var fs = require('fs'); -var src = fs.readFileSync(__dirname + '/../../index.js', 'utf8'); - -test('u8a without globals', function (t) { - var c = { - module: { exports: {} }, - }; - c.exports = c.module.exports; - vm.runInNewContext(src, c); - var TA = c.module.exports; - var ua = new(TA.Uint8Array)(5); - - t.equal(ua.length, 5); - ua[1] = 256 + 55; - t.equal(ua[1], 55); - t.end(); -}); diff --git a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/concat-stream/node_modules/typedarray/test/tarray.js b/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/concat-stream/node_modules/typedarray/test/tarray.js deleted file mode 100644 index df596a34..00000000 --- a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/concat-stream/node_modules/typedarray/test/tarray.js +++ /dev/null @@ -1,10 +0,0 @@ -var TA = require('../'); -var test = require('tape'); - -test('tiny u8a test', function (t) { - var ua = new(TA.Uint8Array)(5); - t.equal(ua.length, 5); - ua[1] = 256 + 55; - t.equal(ua[1], 55); - t.end(); -}); diff --git a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/concat-stream/package.json b/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/concat-stream/package.json deleted file mode 100644 index bb29f7fb..00000000 --- a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/concat-stream/package.json +++ /dev/null @@ -1,88 +0,0 @@ -{ - "name": "concat-stream", - "version": "1.6.0", - "description": "writable stream that concatenates strings or binary data and calls a callback with the result", - "tags": [ - "stream", - "simple", - "util", - "utility" - ], - "author": { - "name": "Max Ogden", - "email": "max@maxogden.com" - }, - "repository": { - "type": "git", - "url": "http://github.com/maxogden/concat-stream.git" - }, - "bugs": { - "url": "http://github.com/maxogden/concat-stream/issues" - }, - "engines": [ - "node >= 0.8" - ], - "main": "index.js", - "files": [ - "index.js" - ], - "scripts": { - "test": "tape test/*.js test/server/*.js" - }, - "license": "MIT", - "dependencies": { - "inherits": "^2.0.3", - "typedarray": "^0.0.6", - "readable-stream": "^2.2.2" - }, - "devDependencies": { - "tape": "^4.6.3" - }, - "testling": { - "files": "test/*.js", - "browsers": [ - "ie/8..latest", - "firefox/17..latest", - "firefox/nightly", - "chrome/22..latest", - "chrome/canary", - "opera/12..latest", - "opera/next", - "safari/5.1..latest", - "ipad/6.0..latest", - "iphone/6.0..latest", - "android-browser/4.2..latest" - ] - }, - "gitHead": "e482281642c1e011fc158f5749ef40a71c77a426", - "homepage": "https://github.com/maxogden/concat-stream", - "_id": "concat-stream@1.6.0", - "_shasum": "0aac662fd52be78964d5532f694784e70110acf7", - "_from": "concat-stream@>=1.4.4 <2.0.0", - "_npmVersion": "2.15.11", - "_nodeVersion": "4.6.2", - "_npmUser": { - "name": "mafintosh", - "email": "mathiasbuus@gmail.com" - }, - "dist": { - "shasum": "0aac662fd52be78964d5532f694784e70110acf7", - "tarball": "https://registry.npmjs.org/concat-stream/-/concat-stream-1.6.0.tgz" - }, - "maintainers": [ - { - "name": "mafintosh", - "email": "mathiasbuus@gmail.com" - }, - { - "name": "maxogden", - "email": "max@maxogden.com" - } - ], - "_npmOperationalInternal": { - "host": "packages-12-west.internal.npmjs.com", - "tmp": "tmp/concat-stream-1.6.0.tgz_1482162257023_0.2988202746491879" - }, - "directories": {}, - "_resolved": "https://registry.npmjs.org/concat-stream/-/concat-stream-1.6.0.tgz" -} diff --git a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/concat-stream/readme.md b/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/concat-stream/readme.md deleted file mode 100644 index f45e6fc8..00000000 --- a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/concat-stream/readme.md +++ /dev/null @@ -1,102 +0,0 @@ -# concat-stream - -Writable stream that concatenates all the data from a stream and calls a callback with the result. Use this when you want to collect all the data from a stream into a single buffer. - -[![Build Status](https://travis-ci.org/maxogden/concat-stream.svg?branch=master)](https://travis-ci.org/maxogden/concat-stream) - -[![NPM](https://nodei.co/npm/concat-stream.png)](https://nodei.co/npm/concat-stream/) - -### description - -Streams emit many buffers. If you want to collect all of the buffers, and when the stream ends concatenate all of the buffers together and receive a single buffer then this is the module for you. - -Only use this if you know you can fit all of the output of your stream into a single Buffer (e.g. in RAM). - -There are also `objectMode` streams that emit things other than Buffers, and you can concatenate these too. See below for details. - -## Related - -`concat-stream` is part of the [mississippi stream utility collection](https://github.com/maxogden/mississippi) which includes more useful stream modules similar to this one. - -### examples - -#### Buffers - -```js -var fs = require('fs') -var concat = require('concat-stream') - -var readStream = fs.createReadStream('cat.png') -var concatStream = concat(gotPicture) - -readStream.on('error', handleError) -readStream.pipe(concatStream) - -function gotPicture(imageBuffer) { - // imageBuffer is all of `cat.png` as a node.js Buffer -} - -function handleError(err) { - // handle your error appropriately here, e.g.: - console.error(err) // print the error to STDERR - process.exit(1) // exit program with non-zero exit code -} - -``` - -#### Arrays - -```js -var write = concat(function(data) {}) -write.write([1,2,3]) -write.write([4,5,6]) -write.end() -// data will be [1,2,3,4,5,6] in the above callback -``` - -#### Uint8Arrays - -```js -var write = concat(function(data) {}) -var a = new Uint8Array(3) -a[0] = 97; a[1] = 98; a[2] = 99 -write.write(a) -write.write('!') -write.end(Buffer('!!1')) -``` - -See `test/` for more examples - -# methods - -```js -var concat = require('concat-stream') -``` - -## var writable = concat(opts={}, cb) - -Return a `writable` stream that will fire `cb(data)` with all of the data that -was written to the stream. Data can be written to `writable` as strings, -Buffers, arrays of byte integers, and Uint8Arrays. - -By default `concat-stream` will give you back the same data type as the type of the first buffer written to the stream. Use `opts.encoding` to set what format `data` should be returned as, e.g. if you if you don't want to rely on the built-in type checking or for some other reason. - -* `string` - get a string -* `buffer` - get back a Buffer -* `array` - get an array of byte integers -* `uint8array`, `u8`, `uint8` - get back a Uint8Array -* `object`, get back an array of Objects - -If you don't specify an encoding, and the types can't be inferred (e.g. you write things that aren't in the list above), it will try to convert concat them into a `Buffer`. - -If nothing is written to `writable` then `data` will be an empty array `[]`. - -# error handling - -`concat-stream` does not handle errors for you, so you must handle errors on whatever streams you pipe into `concat-stream`. This is a general rule when programming with node.js streams: always handle errors on each and every stream. Since `concat-stream` is not itself a stream it does not emit errors. - -We recommend using [`end-of-stream`](https://npmjs.org/end-of-stream) or [`pump`](https://npmjs.org/pump) for writing error tolerant stream code. - -# license - -MIT LICENSE diff --git a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/errno/.jshintrc b/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/errno/.jshintrc deleted file mode 100644 index c8ef3ca4..00000000 --- a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/errno/.jshintrc +++ /dev/null @@ -1,59 +0,0 @@ -{ - "predef": [ ] - , "bitwise": false - , "camelcase": false - , "curly": false - , "eqeqeq": false - , "forin": false - , "immed": false - , "latedef": false - , "noarg": true - , "noempty": true - , "nonew": true - , "plusplus": false - , "quotmark": true - , "regexp": false - , "undef": true - , "unused": true - , "strict": false - , "trailing": true - , "maxlen": 120 - , "asi": true - , "boss": true - , "debug": true - , "eqnull": true - , "esnext": true - , "evil": true - , "expr": true - , "funcscope": false - , "globalstrict": false - , "iterator": false - , "lastsemic": true - , "laxbreak": true - , "laxcomma": true - , "loopfunc": true - , "multistr": false - , "onecase": false - , "proto": false - , "regexdash": false - , "scripturl": true - , "smarttabs": false - , "shadow": false - , "sub": true - , "supernew": false - , "validthis": true - , "browser": true - , "couch": false - , "devel": false - , "dojo": false - , "mootools": false - , "node": true - , "nonstandard": true - , "prototypejs": false - , "rhino": false - , "worker": true - , "wsh": false - , "nomen": false - , "onevar": false - , "passfail": false -} \ No newline at end of file diff --git a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/errno/.npmignore b/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/errno/.npmignore deleted file mode 100644 index b512c09d..00000000 --- a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/errno/.npmignore +++ /dev/null @@ -1 +0,0 @@ -node_modules \ No newline at end of file diff --git a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/errno/README.md b/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/errno/README.md deleted file mode 100644 index 2c1f8a52..00000000 --- a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/errno/README.md +++ /dev/null @@ -1,141 +0,0 @@ -# node-errno - -Better [libuv](https://github.com/libuv/libuv)/[Node.js](https://nodejs.org)/[io.js](https://iojs.org) error handling & reporting. Available in npm as *errno*. - -* [errno exposed](#errnoexposed) -* [Custom errors](#customerrors) - - -## errno exposed - -Ever find yourself needing more details about Node.js errors? Me too, so *node-errno* contains the errno mappings direct from libuv so you can use them in your code. - -**By errno:** - -```js -require('errno').errno[3] -// → { -// "errno": 3, -// "code": "EACCES", -// "description": "permission denied" -// } -``` - -**By code:** - -```js -require('errno').code.ENOTEMPTY -// → { -// "errno": 53, -// "code": "ENOTEMPTY", -// "description": "directory not empty" -// } -``` - -**Make your errors more descriptive:** - -```js -var errno = require('errno') - -function errmsg(err) { - var str = 'Error: ' - // if it's a libuv error then get the description from errno - if (errno.errno[err.errno]) - str += errno.errno[err.errno].description - else - str += err.message - - // if it's a `fs` error then it'll have a 'path' property - if (err.path) - str += ' [' + err.path + ']' - - return str -} - -var fs = require('fs') - -fs.readFile('thisisnotarealfile.txt', function (err, data) { - if (err) - console.log(errmsg(err)) -}) -``` - -**Use as a command line tool:** - -``` -~ $ errno 53 -{ - "errno": 53, - "code": "ENOTEMPTY", - "description": "directory not empty" -} -~ $ errno EROFS -{ - "errno": 56, - "code": "EROFS", - "description": "read-only file system" -} -~ $ errno foo -No such errno/code: "foo" -``` - -Supply no arguments for the full list. Error codes are processed case-insensitive. - -You will need to install with `npm install errno -g` if you want the `errno` command to be available without supplying a full path to the node_modules installation. - - -## Custom errors - -Use `errno.custom.createError()` to create custom `Error` objects to throw around in your Node.js library. Create error heirachies so `instanceof` becomes a useful tool in tracking errors. Call-stack is correctly captured at the time you create an instance of the error object, plus a `cause` property will make available the original error object if you pass one in to the constructor. - -```js -var create = require('errno').custom.createError -var MyError = create('MyError') // inherits from Error -var SpecificError = create('SpecificError', MyError) // inherits from MyError -var OtherError = create('OtherError', MyError) - -// use them! -if (condition) throw new SpecificError('Eeek! Something bad happened') - -if (err) return callback(new OtherError(err)) -``` - -Also available is a `errno.custom.FilesystemError` with in-built access to errno properties: - -```js -fs.readFile('foo', function (err, data) { - if (err) return callback(new errno.custom.FilesystemError(err)) - // do something else -}) -``` - -The resulting error object passed through the callback will have the following properties: `code`, `errno`, `path` and `message` will contain a descriptive human-readable message. - -## Contributors - -* [bahamas10](https://github.com/bahamas10) (Dave Eddy) - Added CLI -* [ralphtheninja](https://github.com/ralphtheninja) (Lars-Magnus Skog) - -## Copyright & Licence - -*Copyright (c) 2012-2015 [Rod Vagg](https://github.com/rvagg) ([@rvagg](https://twitter.com/rvagg))* - -Made available under the MIT licence: - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is furnished -to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. \ No newline at end of file diff --git a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/errno/build.js b/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/errno/build.js deleted file mode 100755 index fce89260..00000000 --- a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/errno/build.js +++ /dev/null @@ -1,43 +0,0 @@ -#!/usr/bin/env node - -var request = require('request') - , fs = require('fs') - - , uvheadloc = 'https://raw.github.com/joyent/libuv/master/include/uv.h' - , defreg = /^\s*XX\(\s*([\-\d]+),\s*([A-Z]+),\s*"([^"]*)"\s*\)\s*\\?$/ - - -request(uvheadloc, function (err, response) { - if (err) - throw err - - var data, out - - data = response.body - .split('\n') - .map(function (line) { return line.match(defreg) }) - .filter(function (match) { return match }) - .map(function (match) { return { - errno: parseInt(match[1], 10) - , code: match[2] - , description: match[3] - }}) - - out = 'var all = module.exports.all = ' + JSON.stringify(data, 0, 1) + '\n\n' - - out += '\nmodule.exports.errno = {\n ' - + data.map(function (e, i) { - return '\'' + e.errno + '\': all[' + i + ']' - }).join('\n , ') - + '\n}\n\n' - - out += '\nmodule.exports.code = {\n ' - + data.map(function (e, i) { - return '\'' + e.code + '\': all[' + i + ']' - }).join('\n , ') - + '\n}\n\n' - - out += '\nmodule.exports.custom = require("./custom")(module.exports)\n' - - fs.writeFile('errno.js', out) -}) \ No newline at end of file diff --git a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/errno/cli.js b/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/errno/cli.js deleted file mode 100755 index f841771b..00000000 --- a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/errno/cli.js +++ /dev/null @@ -1,20 +0,0 @@ -#!/usr/bin/env node - -var errno = require('./') - , arg = process.argv[2] - , data, code - -if (arg === undefined) - return console.log(JSON.stringify(errno.code, null, 2)) - -if ((code = +arg) == arg) - data = errno.errno[code] -else - data = errno.code[arg] || errno.code[arg.toUpperCase()] - -if (data) - console.log(JSON.stringify(data, null, 2)) -else { - console.error('No such errno/code: "' + arg + '"') - process.exit(1) -} \ No newline at end of file diff --git a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/errno/custom.js b/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/errno/custom.js deleted file mode 100644 index 7be16c1e..00000000 --- a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/errno/custom.js +++ /dev/null @@ -1,55 +0,0 @@ -var prr = require('prr') - -function init (type, message, cause) { - prr(this, { - type : type - , name : type - // can be passed just a 'cause' - , cause : typeof message != 'string' ? message : cause - , message : !!message && typeof message != 'string' ? message.message : message - - }, 'ewr') -} - -// generic prototype, not intended to be actually used - helpful for `instanceof` -function CustomError (message, cause) { - Error.call(this) - if (Error.captureStackTrace) - Error.captureStackTrace(this, arguments.callee) - init.call(this, 'CustomError', message, cause) -} - -CustomError.prototype = new Error() - -function createError (errno, type, proto) { - var err = function (message, cause) { - init.call(this, type, message, cause) - //TODO: the specificity here is stupid, errno should be available everywhere - if (type == 'FilesystemError') { - this.code = this.cause.code - this.path = this.cause.path - this.errno = this.cause.errno - this.message = - (errno.errno[this.cause.errno] - ? errno.errno[this.cause.errno].description - : this.cause.message) - + (this.cause.path ? ' [' + this.cause.path + ']' : '') - } - Error.call(this) - if (Error.captureStackTrace) - Error.captureStackTrace(this, arguments.callee) - } - err.prototype = !!proto ? new proto() : new CustomError() - return err -} - -module.exports = function (errno) { - var ce = function (type, proto) { - return createError(errno, type, proto) - } - return { - CustomError : CustomError - , FilesystemError : ce('FilesystemError') - , createError : ce - } -} diff --git a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/errno/errno.js b/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/errno/errno.js deleted file mode 100644 index efb79d41..00000000 --- a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/errno/errno.js +++ /dev/null @@ -1,313 +0,0 @@ -var all = module.exports.all = [ - { - errno: -2, - code: 'ENOENT', - description: 'no such file or directory' - }, - { - errno: -1, - code: 'UNKNOWN', - description: 'unknown error' - }, - { - errno: 0, - code: 'OK', - description: 'success' - }, - { - errno: 1, - code: 'EOF', - description: 'end of file' - }, - { - errno: 2, - code: 'EADDRINFO', - description: 'getaddrinfo error' - }, - { - errno: 3, - code: 'EACCES', - description: 'permission denied' - }, - { - errno: 4, - code: 'EAGAIN', - description: 'resource temporarily unavailable' - }, - { - errno: 5, - code: 'EADDRINUSE', - description: 'address already in use' - }, - { - errno: 6, - code: 'EADDRNOTAVAIL', - description: 'address not available' - }, - { - errno: 7, - code: 'EAFNOSUPPORT', - description: 'address family not supported' - }, - { - errno: 8, - code: 'EALREADY', - description: 'connection already in progress' - }, - { - errno: 9, - code: 'EBADF', - description: 'bad file descriptor' - }, - { - errno: 10, - code: 'EBUSY', - description: 'resource busy or locked' - }, - { - errno: 11, - code: 'ECONNABORTED', - description: 'software caused connection abort' - }, - { - errno: 12, - code: 'ECONNREFUSED', - description: 'connection refused' - }, - { - errno: 13, - code: 'ECONNRESET', - description: 'connection reset by peer' - }, - { - errno: 14, - code: 'EDESTADDRREQ', - description: 'destination address required' - }, - { - errno: 15, - code: 'EFAULT', - description: 'bad address in system call argument' - }, - { - errno: 16, - code: 'EHOSTUNREACH', - description: 'host is unreachable' - }, - { - errno: 17, - code: 'EINTR', - description: 'interrupted system call' - }, - { - errno: 18, - code: 'EINVAL', - description: 'invalid argument' - }, - { - errno: 19, - code: 'EISCONN', - description: 'socket is already connected' - }, - { - errno: 20, - code: 'EMFILE', - description: 'too many open files' - }, - { - errno: 21, - code: 'EMSGSIZE', - description: 'message too long' - }, - { - errno: 22, - code: 'ENETDOWN', - description: 'network is down' - }, - { - errno: 23, - code: 'ENETUNREACH', - description: 'network is unreachable' - }, - { - errno: 24, - code: 'ENFILE', - description: 'file table overflow' - }, - { - errno: 25, - code: 'ENOBUFS', - description: 'no buffer space available' - }, - { - errno: 26, - code: 'ENOMEM', - description: 'not enough memory' - }, - { - errno: 27, - code: 'ENOTDIR', - description: 'not a directory' - }, - { - errno: 28, - code: 'EISDIR', - description: 'illegal operation on a directory' - }, - { - errno: 29, - code: 'ENONET', - description: 'machine is not on the network' - }, - { - errno: 31, - code: 'ENOTCONN', - description: 'socket is not connected' - }, - { - errno: 32, - code: 'ENOTSOCK', - description: 'socket operation on non-socket' - }, - { - errno: 33, - code: 'ENOTSUP', - description: 'operation not supported on socket' - }, - { - errno: 34, - code: 'ENOENT', - description: 'no such file or directory' - }, - { - errno: 35, - code: 'ENOSYS', - description: 'function not implemented' - }, - { - errno: 36, - code: 'EPIPE', - description: 'broken pipe' - }, - { - errno: 37, - code: 'EPROTO', - description: 'protocol error' - }, - { - errno: 38, - code: 'EPROTONOSUPPORT', - description: 'protocol not supported' - }, - { - errno: 39, - code: 'EPROTOTYPE', - description: 'protocol wrong type for socket' - }, - { - errno: 40, - code: 'ETIMEDOUT', - description: 'connection timed out' - }, - { - errno: 41, - code: 'ECHARSET', - description: 'invalid Unicode character' - }, - { - errno: 42, - code: 'EAIFAMNOSUPPORT', - description: 'address family for hostname not supported' - }, - { - errno: 44, - code: 'EAISERVICE', - description: 'servname not supported for ai_socktype' - }, - { - errno: 45, - code: 'EAISOCKTYPE', - description: 'ai_socktype not supported' - }, - { - errno: 46, - code: 'ESHUTDOWN', - description: 'cannot send after transport endpoint shutdown' - }, - { - errno: 47, - code: 'EEXIST', - description: 'file already exists' - }, - { - errno: 48, - code: 'ESRCH', - description: 'no such process' - }, - { - errno: 49, - code: 'ENAMETOOLONG', - description: 'name too long' - }, - { - errno: 50, - code: 'EPERM', - description: 'operation not permitted' - }, - { - errno: 51, - code: 'ELOOP', - description: 'too many symbolic links encountered' - }, - { - errno: 52, - code: 'EXDEV', - description: 'cross-device link not permitted' - }, - { - errno: 53, - code: 'ENOTEMPTY', - description: 'directory not empty' - }, - { - errno: 54, - code: 'ENOSPC', - description: 'no space left on device' - }, - { - errno: 55, - code: 'EIO', - description: 'i/o error' - }, - { - errno: 56, - code: 'EROFS', - description: 'read-only file system' - }, - { - errno: 57, - code: 'ENODEV', - description: 'no such device' - }, - { - errno: 58, - code: 'ESPIPE', - description: 'invalid seek' - }, - { - errno: 59, - code: 'ECANCELED', - description: 'operation canceled' - } -] - -module.exports.errno = {} -module.exports.code = {} - -all.forEach(function (error) { - module.exports.errno[error.errno] = error - module.exports.code[error.code] = error -}) - -module.exports.custom = require('./custom')(module.exports) -module.exports.create = module.exports.custom.createError diff --git a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/errno/node_modules/prr/.jshintrc b/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/errno/node_modules/prr/.jshintrc deleted file mode 100644 index 6a7a956c..00000000 --- a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/errno/node_modules/prr/.jshintrc +++ /dev/null @@ -1,61 +0,0 @@ -{ - "predef": [ ] - , "bitwise": false - , "camelcase": false - , "curly": false - , "eqeqeq": false - , "forin": false - , "immed": false - , "latedef": false - , "newcap": true - , "noarg": true - , "noempty": true - , "nonew": true - , "plusplus": false - , "quotmark": true - , "regexp": false - , "undef": true - , "unused": true - , "strict": false - , "trailing": true - , "maxlen": 120 - , "asi": true - , "boss": true - , "debug": true - , "eqnull": true - , "es5": true - , "esnext": true - , "evil": true - , "expr": true - , "funcscope": false - , "globalstrict": false - , "iterator": false - , "lastsemic": true - , "laxbreak": true - , "laxcomma": true - , "loopfunc": true - , "multistr": false - , "onecase": false - , "proto": false - , "regexdash": false - , "scripturl": true - , "smarttabs": false - , "shadow": false - , "sub": true - , "supernew": false - , "validthis": true - , "browser": true - , "couch": false - , "devel": false - , "dojo": false - , "mootools": false - , "node": true - , "nonstandard": true - , "prototypejs": false - , "rhino": false - , "worker": true - , "wsh": false - , "nomen": false - , "onevar": true - , "passfail": false -} \ No newline at end of file diff --git a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/errno/node_modules/prr/.npmignore b/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/errno/node_modules/prr/.npmignore deleted file mode 100644 index b512c09d..00000000 --- a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/errno/node_modules/prr/.npmignore +++ /dev/null @@ -1 +0,0 @@ -node_modules \ No newline at end of file diff --git a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/errno/node_modules/prr/.travis.yml b/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/errno/node_modules/prr/.travis.yml deleted file mode 100644 index fe3f4eb1..00000000 --- a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/errno/node_modules/prr/.travis.yml +++ /dev/null @@ -1,10 +0,0 @@ -language: node_js -node_js: - - 0.8 - - "0.10" -branches: - only: - - master -notifications: - email: - - rod@vagg.org diff --git a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/errno/node_modules/prr/LICENSE b/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/errno/node_modules/prr/LICENSE deleted file mode 100644 index f6a0029d..00000000 --- a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/errno/node_modules/prr/LICENSE +++ /dev/null @@ -1,39 +0,0 @@ -Copyright 2013, Rod Vagg (the "Original Author") -All rights reserved. - -MIT +no-false-attribs License - -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. - -Distributions of all or part of the Software intended to be used -by the recipients as they would use the unmodified Software, -containing modifications that substantially alter, remove, or -disable functionality of the Software, outside of the documented -configuration mechanisms provided by the Software, shall be -modified such that the Original Author's bug reporting email -addresses and urls are either replaced with the contact information -of the parties responsible for the changes, or removed entirely. - -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. - - -Except where noted, this license applies to any and all software -programs and associated documentation files created by the -Original Author, when distributed with the Software. \ No newline at end of file diff --git a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/errno/node_modules/prr/README.md b/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/errno/node_modules/prr/README.md deleted file mode 100644 index 3e709e3b..00000000 --- a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/errno/node_modules/prr/README.md +++ /dev/null @@ -1,45 +0,0 @@ -# prr [![Build Status](https://secure.travis-ci.org/rvagg/prr.png)](http://travis-ci.org/rvagg/prr) - -An sensible alternative to `Object.defineProperty()`. Available in npm and Ender as **prr**. - -## Usage - -Set the property `'foo'` (`obj.foo`) to have the value `'bar'` with default options (*enumerable, configurable and writable are all false*): - -```js -prr(obj, 'foo', 'bar') -``` - -Adjust the default options: - -```js -prr(obj, 'foo', 'bar', { enumerable: true, writable: true }) -``` - -Do the same operation for multiple properties: - -```js -prr(obj, { one: 'one', two: 'two' }) -// or with options: -prr(obj, { one: 'one', two: 'two' }, { enumerable: true, writable: true }) -``` - -But obviously, having to write out the full options object makes it nearly as bad as the original `Object.defineProperty()` so we can **simplify**. - -As an alternative method we can use an options string where each character represents a option: `'e'=='enumerable'`, `'c'=='configurable'` and `'w'=='writable'`: - -```js -prr(obj, 'foo', 'bar', 'ew') // enumerable and writable but not configurable -// muliple properties: -prr(obj, { one: 'one', two: 'two' }, 'ewc') // configurable too -``` - -## Where can I use it? - -Anywhere! For pre-ES5 environments *prr* will simply fall-back to an `object[property] = value` so you can get close to what you want. - -*prr* is Ender-compatible so you can include it in your Ender build and `$.prr(...)` or `var prr = require('prr'); prr(...)`. - -## Licence - -prr is Copyright (c) 2013 Rod Vagg [@rvagg](https://twitter.com/rvagg) and licensed under the MIT licence. All rights not explicitly granted in the MIT license are reserved. See the included LICENSE file for more details. \ No newline at end of file diff --git a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/errno/node_modules/prr/package.json b/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/errno/node_modules/prr/package.json deleted file mode 100644 index ed41a166..00000000 --- a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/errno/node_modules/prr/package.json +++ /dev/null @@ -1,52 +0,0 @@ -{ - "name": "prr", - "description": "A better Object.defineProperty()", - "version": "0.0.0", - "homepage": "https://github.com/rvagg/prr", - "authors": [ - "Rod Vagg (https://github.com/rvagg)" - ], - "keywords": [ - "property", - "properties", - "defineProperty", - "ender" - ], - "main": "./prr.js", - "repository": { - "type": "git", - "url": "https://github.com/rvagg/prr.git" - }, - "dependencies": {}, - "devDependencies": { - "tap": "*" - }, - "scripts": { - "test": "node ./test.js" - }, - "license": "MIT", - "_id": "prr@0.0.0", - "dist": { - "shasum": "1a84b85908325501411853d0081ee3fa86e2926a", - "tarball": "https://registry.npmjs.org/prr/-/prr-0.0.0.tgz" - }, - "_from": "prr@>=0.0.0 <0.1.0", - "_npmVersion": "1.2.15", - "_npmUser": { - "name": "rvagg", - "email": "rod@vagg.org" - }, - "maintainers": [ - { - "name": "rvagg", - "email": "rod@vagg.org" - } - ], - "directories": {}, - "_shasum": "1a84b85908325501411853d0081ee3fa86e2926a", - "_resolved": "https://registry.npmjs.org/prr/-/prr-0.0.0.tgz", - "bugs": { - "url": "https://github.com/rvagg/prr/issues" - }, - "readme": "ERROR: No README data found!" -} diff --git a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/errno/node_modules/prr/prr.js b/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/errno/node_modules/prr/prr.js deleted file mode 100644 index 94f58628..00000000 --- a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/errno/node_modules/prr/prr.js +++ /dev/null @@ -1,63 +0,0 @@ -/*! - * prr - * (c) 2013 Rod Vagg - * https://github.com/rvagg/prr - * License: MIT - */ - -(function (name, context, definition) { - if (typeof module != 'undefined' && module.exports) - module.exports = definition() - else - context[name] = definition() -})('prr', this, function() { - - var setProperty = typeof Object.defineProperty == 'function' - ? function (obj, key, options) { - Object.defineProperty(obj, key, options) - return obj - } - : function (obj, key, options) { // < es5 - obj[key] = options.value - return obj - } - - , makeOptions = function (value, options) { - var oo = typeof options == 'object' - , os = !oo && typeof options == 'string' - , op = function (p) { - return oo - ? !!options[p] - : os - ? options.indexOf(p[0]) > -1 - : false - } - - return { - enumerable : op('enumerable') - , configurable : op('configurable') - , writable : op('writable') - , value : value - } - } - - , prr = function (obj, key, value, options) { - var k - - options = makeOptions(value, options) - - if (typeof key == 'object') { - for (k in key) { - if (Object.hasOwnProperty.call(key, k)) { - options.value = key[k] - setProperty(obj, k, options) - } - } - return obj - } - - return setProperty(obj, key, options) - } - - return prr -}) \ No newline at end of file diff --git a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/errno/node_modules/prr/test.js b/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/errno/node_modules/prr/test.js deleted file mode 100644 index 5222e307..00000000 --- a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/errno/node_modules/prr/test.js +++ /dev/null @@ -1,169 +0,0 @@ -const test = require('tap').test - , prr = require('./') - -test('test prr(o, key, value) form', function (t) { - t.plan(2) - - var o = {} - prr(o, 'foo', 'bar') - t.equal(o.foo, 'bar', 'correct value') - t.deepEqual( - Object.getOwnPropertyDescriptor(o, 'foo') - , { - enumerable : false - , configurable : false - , writable : false - , value : 'bar' - } - , 'correct property descriptor' - ) - t.end() -}) - -test('test prr(o, { key: value }) form', function (t) { - t.plan(2) - - var o = {} - prr(o, { foo: 'bar' }) - - t.equal(o.foo, 'bar', 'correct value') - t.deepEqual( - Object.getOwnPropertyDescriptor(o, 'foo') - , { - enumerable : false - , configurable : false - , writable : false - , value : 'bar' - } - , 'correct property descriptor' - ) - t.end() -}) - -test('test multiple key:value pairs', function (t) { - var o = { foo: 'bar' } - - prr(o, { one: 'ONE', two: 'TWO', obj: { o: 'o' }}) - - t.deepEqual(o, { foo: 'bar' }, 'properties are not enumerable') - t.equal(o.one, 'ONE', 'correctly set property') - t.equal(o.two, 'TWO', 'correctly set property') - t.deepEqual(o.obj, { o: 'o' }, 'correctly set property') - - ;[ 'one', 'two', 'obj' ].forEach(function (p) { - t.deepEqual( - Object.getOwnPropertyDescriptor(o, p) - , { - enumerable : false - , configurable : false - , writable : false - , value : p == 'obj' ? { o: 'o' } : p.toUpperCase() - } - , 'correct property descriptor' - ) - }) - - t.end() -}) - -test('test descriptor options', function (t) { - var o = {} - - prr(o, 'foo', 'bar', { - enumerable : true - , configurable : false - }) - t.equal(o.foo, 'bar', 'correct value') - t.deepEqual( - Object.getOwnPropertyDescriptor(o, 'foo') - , { - enumerable : true - , configurable : false - , writable : false - , value : 'bar' - } - , 'correct property descriptor' - ) - - prr(o, 'foo2', 'bar2', { - enumerable : true - , configurable : true - , writable : false - }) - t.equal(o.foo2, 'bar2', 'correct value') - t.deepEqual( - Object.getOwnPropertyDescriptor(o, 'foo2') - , { - enumerable : true - , configurable : true - , writable : false - , value : 'bar2' - } - , 'correct property descriptor' - ) - - prr(o, 'foo3', 'bar3', { - enumerable : true - , configurable : true - , writable : true - }) - t.equal(o.foo3, 'bar3', 'correct value') - t.deepEqual( - Object.getOwnPropertyDescriptor(o, 'foo3') - , { - enumerable : true - , configurable : true - , writable : true - , value : 'bar3' - } - , 'correct property descriptor' - ) - - t.end() -}) - - -test('test descriptor options, string form', function (t) { - var o = {} - - prr(o, 'foo', 'bar', 'e') - t.equal(o.foo, 'bar', 'correct value') - t.deepEqual( - Object.getOwnPropertyDescriptor(o, 'foo') - , { - enumerable : true - , configurable : false - , writable : false - , value : 'bar' - } - , 'correct property descriptor' - ) - - prr(o, 'foo2', 'bar2', 'ec') - t.equal(o.foo2, 'bar2', 'correct value') - t.deepEqual( - Object.getOwnPropertyDescriptor(o, 'foo2') - , { - enumerable : true - , configurable : true - , writable : false - , value : 'bar2' - } - , 'correct property descriptor' - ) - - prr(o, 'foo3', 'bar3', 'ecw') - t.equal(o.foo3, 'bar3', 'correct value') - t.deepEqual( - Object.getOwnPropertyDescriptor(o, 'foo3') - , { - enumerable : true - , configurable : true - , writable : true - , value : 'bar3' - } - , 'correct property descriptor' - ) - - t.end() -}) diff --git a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/errno/package.json b/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/errno/package.json deleted file mode 100644 index ea5e6dc9..00000000 --- a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/errno/package.json +++ /dev/null @@ -1,57 +0,0 @@ -{ - "name": "errno", - "authors": [ - "Rod Vagg @rvagg (https://github.com/rvagg)" - ], - "description": "libuv errno details exposed", - "keywords": [ - "errors", - "errno", - "libuv" - ], - "version": "0.1.4", - "main": "errno.js", - "dependencies": { - "prr": "~0.0.0" - }, - "bin": { - "errno": "./cli.js" - }, - "devDependencies": { - "tape": "~3.5.0" - }, - "repository": { - "type": "git", - "url": "https://github.com/rvagg/node-errno.git" - }, - "license": "MIT", - "scripts": { - "test": "tape test.js" - }, - "gitHead": "1c2b1fcbf22ef2bafbf6cda378cfed400f5163fd", - "bugs": { - "url": "https://github.com/rvagg/node-errno/issues" - }, - "homepage": "https://github.com/rvagg/node-errno", - "_id": "errno@0.1.4", - "_shasum": "b896e23a9e5e8ba33871fc996abd3635fc9a1c7d", - "_from": "errno@>=0.1.1 <0.2.0", - "_npmVersion": "2.13.3", - "_nodeVersion": "3.0.0", - "_npmUser": { - "name": "rvagg", - "email": "rod@vagg.org" - }, - "maintainers": [ - { - "name": "rvagg", - "email": "rod@vagg.org" - } - ], - "dist": { - "shasum": "b896e23a9e5e8ba33871fc996abd3635fc9a1c7d", - "tarball": "https://registry.npmjs.org/errno/-/errno-0.1.4.tgz" - }, - "directories": {}, - "_resolved": "https://registry.npmjs.org/errno/-/errno-0.1.4.tgz" -} diff --git a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/errno/test.js b/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/errno/test.js deleted file mode 100755 index 6b76a85a..00000000 --- a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/errno/test.js +++ /dev/null @@ -1,31 +0,0 @@ -#!/usr/bin/env node - -var test = require('tape') - , errno = require('./') - -test('sanity checks', function (t) { - t.ok(errno.all, 'errno.all not found') - t.ok(errno.errno, 'errno.errno not found') - t.ok(errno.code, 'errno.code not found') - - t.equal(errno.all.length, 59, 'found ' + errno.all.length + ', expected 59') - t.equal(errno.errno['-1'], errno.all[0], 'errno -1 not first element') - - t.equal(errno.code['UNKNOWN'], errno.all[0], 'code UNKNOWN not first element') - - t.equal(errno.errno[1], errno.all[2], 'errno 1 not third element') - - t.equal(errno.code['EOF'], errno.all[2], 'code EOF not third element') - t.end() -}) - -test('custom errors', function (t) { - var Cust = errno.create('FooNotBarError') - var cust = new Cust('foo is not bar') - - t.equal(cust.name, 'FooNotBarError', 'correct custom name') - t.equal(cust.type, 'FooNotBarError', 'correct custom type') - t.equal(cust.message, 'foo is not bar', 'correct custom message') - t.notOk(cust.cause, 'no cause') - t.end() -}) diff --git a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/fwd-stream/.npmignore b/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/fwd-stream/.npmignore deleted file mode 100644 index 3c3629e6..00000000 --- a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/fwd-stream/.npmignore +++ /dev/null @@ -1 +0,0 @@ -node_modules diff --git a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/fwd-stream/.travis.yml b/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/fwd-stream/.travis.yml deleted file mode 100644 index 4ff8a05b..00000000 --- a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/fwd-stream/.travis.yml +++ /dev/null @@ -1,6 +0,0 @@ -language: node_js -node_js: - - "0.8" - - "0.10" - -script: "npm test" diff --git a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/fwd-stream/README.md b/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/fwd-stream/README.md deleted file mode 100644 index 7923186d..00000000 --- a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/fwd-stream/README.md +++ /dev/null @@ -1,98 +0,0 @@ -# fwd-stream - -Forward a readable stream to another readable stream or a writable stream to another writable stream. -Featuring streams2 support and async instantiating. - - npm install fwd-stream - -[![build status](https://secure.travis-ci.org/mafintosh/fwd-stream.png)](http://travis-ci.org/mafintosh/fwd-stream) - -## When should I use this? - -This module makes it easy to return a stream synchroniously that wraps another stream from an async context. -Say for example you wanted to create a folder before writing a write you could do - -``` js -var fs = require('fs'); -var fwd = require('fwd-stream'); - -var ws = fwd.writable(function(cb) { - fs.mkdir('my-folder', function() { - cb(null, fs.createWriteStream('my-folder/my-file.txt')); - }); -}); - -ws.write('content of my-file.txt'); -``` - -## Usage - -Forward readable streams - -``` js -var fwd = require('fwd-stream'); - -// rs will be a stream that forwards someReadableStream's data and events -// backpressure etc will still be respected - -var rs = fwd.readable(someReadableStream); - -// or using async instantiating - -var rs = fwd.readable(function(cb) { - setTimeout(function() { - cb(null, someReadableStream); - }, 1000); -}); - -// or using objectMode - -var rs = fwd.readable({objectMode:true}, someReadableObjectStream); -``` - -Forward writable streams - -``` js -var ws = fwd.writable(someWritableStream); - -// or using async instantiating - -var ws = fwd.writable(function(cb) { - setTimeout(function() { - cb(null, ws); - }, 1000); -}); - -// or using objectMode - -var ws = fwd.writable({objectMode:true}, someWritableObjectStream); -``` - -Forward duplex streams - -``` js -var dupl = fwd.duplex(someWritableStream, someReadableStream); - -// or using async instantiating - -var dupl = fwd.duplex( - function(cb) { - setTimeout(function() { - cb(null, someWritableStream); - }, 1000); - }, - function(cb) { - setTimeout(function() { - cb(null, someReadableStream); - }, 1000); - } -); - -// or using objectMode - -var dupl = fwd.duplex({objectMode:true}, someReadableObjStream, someWritableObjStream); -``` - -## License - -MIT \ No newline at end of file diff --git a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/fwd-stream/index.js b/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/fwd-stream/index.js deleted file mode 100644 index 68d723ac..00000000 --- a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/fwd-stream/index.js +++ /dev/null @@ -1,159 +0,0 @@ -var Writable = require('readable-stream/writable'); -var Readable = require('readable-stream/readable'); -var Duplex = require('readable-stream/duplex'); - -var DUMMY = new Buffer(0); -var noop = function() {}; - -var toFunction = function(fn) { - if (typeof fn === 'function') return fn; - return function(cb) { - cb(null, fn); - }; -}; - -var onreadable = function(rs, init) { - var reading = false; - var destroyed = false; - - rs._read = function() { - reading = true; - }; - - rs.destroy = function() { - destroyed = true; - }; - - init(function(err, source) { - if (err) return rs.emit('error', err); - - var fwd = function() { - var data; - while ((data = source.read()) !== null) { - reading = false; - rs.push(data); - } - }; - - source.on('readable', function() { - if (reading) fwd(); - }); - - source.on('end', function() { - fwd(); - rs.push(null); - }); - - source.on('error', function(err) { - rs.emit('error', err); - }); - - source.on('close', function() { - fwd(); - process.nextTick(function() { - rs.emit('close'); - }); - }); - - rs._read = function() { - reading = true; - fwd(); - }; - - rs.destroy = function() { - if (destroyed) return; - destroyed = true; - if (source.destroy) source.destroy(); - }; - - if (destroyed) { - destroyed = false; - rs.destroy(); - return; - } - - if (reading) fwd(); - }); - - return rs; -}; - -var onwritable = function(ws, init) { - var ready = noop; - var destroyed = false; - - ws._write = function(data, enc, cb) { - ready = cb; - }; - - ws.destroy = function() { - destroyed = true; - }; - - ws.write(DUMMY); - - init(function(err, source) { - if (err) return ws.emit('error', err); - - source.on('close', function() { - ws.emit('close'); - }); - - source.on('error', function(err) { - ws.emit('error', err); - }); - - ws._write = function(data, enc, cb) { - if (data === DUMMY) return cb(); - source.write(data, enc, cb); - }; - - var emit = ws.emit; - - source.on('finish', function() { - emit.call(ws, 'finish'); - }); - - ws.destroy = function() { - if (destroyed) return; - destroyed = true; - if (source.destroy) source.destroy(); - }; - - ws.emit = function(name) { - if (name !== 'finish') return emit.apply(ws, arguments); - source.end(); - }; - - if (destroyed) { - destroyed = false; - ws.destroy(); - return; - } - - ready(); - }); - - return ws; -}; - -exports.readable = function(opts, init) { - if (arguments.length === 1) return exports.readable(null, opts); - if (!opts) opts = {}; - return onreadable(new Readable(opts), toFunction(init)); -}; - -exports.writable = function(opts, init) { - if (arguments.length === 1) return exports.writable(null, opts); - if (!opts) opts = {}; - return onwritable(new Writable(opts), toFunction(init)); -}; - -exports.duplex = function(opts, initWritable, initReadable) { - if (arguments.length === 2) return exports.duplex(null, opts, initWritable); - if (!opts) opts = {}; - var dupl = new Duplex(opts); - onwritable(dupl, toFunction(initWritable)); - onreadable(dupl, toFunction(initReadable)); - return dupl; -}; \ No newline at end of file diff --git a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/fwd-stream/node_modules/readable-stream/.npmignore b/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/fwd-stream/node_modules/readable-stream/.npmignore deleted file mode 100644 index 38344f87..00000000 --- a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/fwd-stream/node_modules/readable-stream/.npmignore +++ /dev/null @@ -1,5 +0,0 @@ -build/ -test/ -examples/ -fs.js -zlib.js \ No newline at end of file diff --git a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/fwd-stream/node_modules/readable-stream/LICENSE b/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/fwd-stream/node_modules/readable-stream/LICENSE deleted file mode 100644 index e3d4e695..00000000 --- a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/fwd-stream/node_modules/readable-stream/LICENSE +++ /dev/null @@ -1,18 +0,0 @@ -Copyright Joyent, Inc. and other Node contributors. All rights reserved. -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to -deal in the Software without restriction, including without limitation the -rights to use, copy, modify, merge, publish, distribute, sublicense, and/or -sell copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS -IN THE SOFTWARE. diff --git a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/fwd-stream/node_modules/readable-stream/README.md b/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/fwd-stream/node_modules/readable-stream/README.md deleted file mode 100644 index 3fb3e802..00000000 --- a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/fwd-stream/node_modules/readable-stream/README.md +++ /dev/null @@ -1,15 +0,0 @@ -# readable-stream - -***Node-core streams for userland*** - -[![NPM](https://nodei.co/npm/readable-stream.png?downloads=true&downloadRank=true)](https://nodei.co/npm/readable-stream/) -[![NPM](https://nodei.co/npm-dl/readable-stream.png?&months=6&height=3)](https://nodei.co/npm/readable-stream/) - -This package is a mirror of the Streams2 and Streams3 implementations in Node-core. - -If you want to guarantee a stable streams base, regardless of what version of Node you, or the users of your libraries are using, use **readable-stream** *only* and avoid the *"stream"* module in Node-core. - -**readable-stream** comes in two major versions, v1.0.x and v1.1.x. The former tracks the Streams2 implementation in Node 0.10, including bug-fixes and minor improvements as they are added. The latter tracks Streams3 as it develops in Node 0.11; we will likely see a v1.2.x branch for Node 0.12. - -**readable-stream** uses proper patch-level versioning so if you pin to `"~1.0.0"` you’ll get the latest Node 0.10 Streams2 implementation, including any fixes and minor non-breaking improvements. The patch-level versions of 1.0.x and 1.1.x should mirror the patch-level versions of Node-core releases. You should prefer the **1.0.x** releases for now and when you’re ready to start using Streams3, pin to `"~1.1.0"` - diff --git a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/fwd-stream/node_modules/readable-stream/duplex.js b/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/fwd-stream/node_modules/readable-stream/duplex.js deleted file mode 100644 index ca807af8..00000000 --- a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/fwd-stream/node_modules/readable-stream/duplex.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require("./lib/_stream_duplex.js") diff --git a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/fwd-stream/node_modules/readable-stream/lib/_stream_duplex.js b/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/fwd-stream/node_modules/readable-stream/lib/_stream_duplex.js deleted file mode 100644 index b513d61a..00000000 --- a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/fwd-stream/node_modules/readable-stream/lib/_stream_duplex.js +++ /dev/null @@ -1,89 +0,0 @@ -// Copyright Joyent, Inc. and other Node contributors. -// -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to permit -// persons to whom the Software is furnished to do so, subject to the -// following conditions: -// -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -// USE OR OTHER DEALINGS IN THE SOFTWARE. - -// a duplex stream is just a stream that is both readable and writable. -// Since JS doesn't have multiple prototypal inheritance, this class -// prototypally inherits from Readable, and then parasitically from -// Writable. - -module.exports = Duplex; - -/**/ -var objectKeys = Object.keys || function (obj) { - var keys = []; - for (var key in obj) keys.push(key); - return keys; -} -/**/ - - -/**/ -var util = require('core-util-is'); -util.inherits = require('inherits'); -/**/ - -var Readable = require('./_stream_readable'); -var Writable = require('./_stream_writable'); - -util.inherits(Duplex, Readable); - -forEach(objectKeys(Writable.prototype), function(method) { - if (!Duplex.prototype[method]) - Duplex.prototype[method] = Writable.prototype[method]; -}); - -function Duplex(options) { - if (!(this instanceof Duplex)) - return new Duplex(options); - - Readable.call(this, options); - Writable.call(this, options); - - if (options && options.readable === false) - this.readable = false; - - if (options && options.writable === false) - this.writable = false; - - this.allowHalfOpen = true; - if (options && options.allowHalfOpen === false) - this.allowHalfOpen = false; - - this.once('end', onend); -} - -// the no-half-open enforcer -function onend() { - // if we allow half-open state, or if the writable side ended, - // then we're ok. - if (this.allowHalfOpen || this._writableState.ended) - return; - - // no more data can be written. - // But allow more writes to happen in this tick. - process.nextTick(this.end.bind(this)); -} - -function forEach (xs, f) { - for (var i = 0, l = xs.length; i < l; i++) { - f(xs[i], i); - } -} diff --git a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/fwd-stream/node_modules/readable-stream/lib/_stream_passthrough.js b/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/fwd-stream/node_modules/readable-stream/lib/_stream_passthrough.js deleted file mode 100644 index 895ca50a..00000000 --- a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/fwd-stream/node_modules/readable-stream/lib/_stream_passthrough.js +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright Joyent, Inc. and other Node contributors. -// -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to permit -// persons to whom the Software is furnished to do so, subject to the -// following conditions: -// -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -// USE OR OTHER DEALINGS IN THE SOFTWARE. - -// a passthrough stream. -// basically just the most minimal sort of Transform stream. -// Every written chunk gets output as-is. - -module.exports = PassThrough; - -var Transform = require('./_stream_transform'); - -/**/ -var util = require('core-util-is'); -util.inherits = require('inherits'); -/**/ - -util.inherits(PassThrough, Transform); - -function PassThrough(options) { - if (!(this instanceof PassThrough)) - return new PassThrough(options); - - Transform.call(this, options); -} - -PassThrough.prototype._transform = function(chunk, encoding, cb) { - cb(null, chunk); -}; diff --git a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/fwd-stream/node_modules/readable-stream/lib/_stream_readable.js b/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/fwd-stream/node_modules/readable-stream/lib/_stream_readable.js deleted file mode 100644 index 63072209..00000000 --- a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/fwd-stream/node_modules/readable-stream/lib/_stream_readable.js +++ /dev/null @@ -1,982 +0,0 @@ -// Copyright Joyent, Inc. and other Node contributors. -// -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to permit -// persons to whom the Software is furnished to do so, subject to the -// following conditions: -// -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -// USE OR OTHER DEALINGS IN THE SOFTWARE. - -module.exports = Readable; - -/**/ -var isArray = require('isarray'); -/**/ - - -/**/ -var Buffer = require('buffer').Buffer; -/**/ - -Readable.ReadableState = ReadableState; - -var EE = require('events').EventEmitter; - -/**/ -if (!EE.listenerCount) EE.listenerCount = function(emitter, type) { - return emitter.listeners(type).length; -}; -/**/ - -var Stream = require('stream'); - -/**/ -var util = require('core-util-is'); -util.inherits = require('inherits'); -/**/ - -var StringDecoder; - -util.inherits(Readable, Stream); - -function ReadableState(options, stream) { - options = options || {}; - - // the point at which it stops calling _read() to fill the buffer - // Note: 0 is a valid value, means "don't call _read preemptively ever" - var hwm = options.highWaterMark; - this.highWaterMark = (hwm || hwm === 0) ? hwm : 16 * 1024; - - // cast to ints. - this.highWaterMark = ~~this.highWaterMark; - - this.buffer = []; - this.length = 0; - this.pipes = null; - this.pipesCount = 0; - this.flowing = false; - this.ended = false; - this.endEmitted = false; - this.reading = false; - - // In streams that never have any data, and do push(null) right away, - // the consumer can miss the 'end' event if they do some I/O before - // consuming the stream. So, we don't emit('end') until some reading - // happens. - this.calledRead = false; - - // a flag to be able to tell if the onwrite cb is called immediately, - // or on a later tick. We set this to true at first, becuase any - // actions that shouldn't happen until "later" should generally also - // not happen before the first write call. - this.sync = true; - - // whenever we return null, then we set a flag to say - // that we're awaiting a 'readable' event emission. - this.needReadable = false; - this.emittedReadable = false; - this.readableListening = false; - - - // object stream flag. Used to make read(n) ignore n and to - // make all the buffer merging and length checks go away - this.objectMode = !!options.objectMode; - - // Crypto is kind of old and crusty. Historically, its default string - // encoding is 'binary' so we have to make this configurable. - // Everything else in the universe uses 'utf8', though. - this.defaultEncoding = options.defaultEncoding || 'utf8'; - - // when piping, we only care about 'readable' events that happen - // after read()ing all the bytes and not getting any pushback. - this.ranOut = false; - - // the number of writers that are awaiting a drain event in .pipe()s - this.awaitDrain = 0; - - // if true, a maybeReadMore has been scheduled - this.readingMore = false; - - this.decoder = null; - this.encoding = null; - if (options.encoding) { - if (!StringDecoder) - StringDecoder = require('string_decoder/').StringDecoder; - this.decoder = new StringDecoder(options.encoding); - this.encoding = options.encoding; - } -} - -function Readable(options) { - if (!(this instanceof Readable)) - return new Readable(options); - - this._readableState = new ReadableState(options, this); - - // legacy - this.readable = true; - - Stream.call(this); -} - -// Manually shove something into the read() buffer. -// This returns true if the highWaterMark has not been hit yet, -// similar to how Writable.write() returns true if you should -// write() some more. -Readable.prototype.push = function(chunk, encoding) { - var state = this._readableState; - - if (typeof chunk === 'string' && !state.objectMode) { - encoding = encoding || state.defaultEncoding; - if (encoding !== state.encoding) { - chunk = new Buffer(chunk, encoding); - encoding = ''; - } - } - - return readableAddChunk(this, state, chunk, encoding, false); -}; - -// Unshift should *always* be something directly out of read() -Readable.prototype.unshift = function(chunk) { - var state = this._readableState; - return readableAddChunk(this, state, chunk, '', true); -}; - -function readableAddChunk(stream, state, chunk, encoding, addToFront) { - var er = chunkInvalid(state, chunk); - if (er) { - stream.emit('error', er); - } else if (chunk === null || chunk === undefined) { - state.reading = false; - if (!state.ended) - onEofChunk(stream, state); - } else if (state.objectMode || chunk && chunk.length > 0) { - if (state.ended && !addToFront) { - var e = new Error('stream.push() after EOF'); - stream.emit('error', e); - } else if (state.endEmitted && addToFront) { - var e = new Error('stream.unshift() after end event'); - stream.emit('error', e); - } else { - if (state.decoder && !addToFront && !encoding) - chunk = state.decoder.write(chunk); - - // update the buffer info. - state.length += state.objectMode ? 1 : chunk.length; - if (addToFront) { - state.buffer.unshift(chunk); - } else { - state.reading = false; - state.buffer.push(chunk); - } - - if (state.needReadable) - emitReadable(stream); - - maybeReadMore(stream, state); - } - } else if (!addToFront) { - state.reading = false; - } - - return needMoreData(state); -} - - - -// if it's past the high water mark, we can push in some more. -// Also, if we have no data yet, we can stand some -// more bytes. This is to work around cases where hwm=0, -// such as the repl. Also, if the push() triggered a -// readable event, and the user called read(largeNumber) such that -// needReadable was set, then we ought to push more, so that another -// 'readable' event will be triggered. -function needMoreData(state) { - return !state.ended && - (state.needReadable || - state.length < state.highWaterMark || - state.length === 0); -} - -// backwards compatibility. -Readable.prototype.setEncoding = function(enc) { - if (!StringDecoder) - StringDecoder = require('string_decoder/').StringDecoder; - this._readableState.decoder = new StringDecoder(enc); - this._readableState.encoding = enc; -}; - -// Don't raise the hwm > 128MB -var MAX_HWM = 0x800000; -function roundUpToNextPowerOf2(n) { - if (n >= MAX_HWM) { - n = MAX_HWM; - } else { - // Get the next highest power of 2 - n--; - for (var p = 1; p < 32; p <<= 1) n |= n >> p; - n++; - } - return n; -} - -function howMuchToRead(n, state) { - if (state.length === 0 && state.ended) - return 0; - - if (state.objectMode) - return n === 0 ? 0 : 1; - - if (n === null || isNaN(n)) { - // only flow one buffer at a time - if (state.flowing && state.buffer.length) - return state.buffer[0].length; - else - return state.length; - } - - if (n <= 0) - return 0; - - // If we're asking for more than the target buffer level, - // then raise the water mark. Bump up to the next highest - // power of 2, to prevent increasing it excessively in tiny - // amounts. - if (n > state.highWaterMark) - state.highWaterMark = roundUpToNextPowerOf2(n); - - // don't have that much. return null, unless we've ended. - if (n > state.length) { - if (!state.ended) { - state.needReadable = true; - return 0; - } else - return state.length; - } - - return n; -} - -// you can override either this method, or the async _read(n) below. -Readable.prototype.read = function(n) { - var state = this._readableState; - state.calledRead = true; - var nOrig = n; - var ret; - - if (typeof n !== 'number' || n > 0) - state.emittedReadable = false; - - // if we're doing read(0) to trigger a readable event, but we - // already have a bunch of data in the buffer, then just trigger - // the 'readable' event and move on. - if (n === 0 && - state.needReadable && - (state.length >= state.highWaterMark || state.ended)) { - emitReadable(this); - return null; - } - - n = howMuchToRead(n, state); - - // if we've ended, and we're now clear, then finish it up. - if (n === 0 && state.ended) { - ret = null; - - // In cases where the decoder did not receive enough data - // to produce a full chunk, then immediately received an - // EOF, state.buffer will contain [, ]. - // howMuchToRead will see this and coerce the amount to - // read to zero (because it's looking at the length of the - // first in state.buffer), and we'll end up here. - // - // This can only happen via state.decoder -- no other venue - // exists for pushing a zero-length chunk into state.buffer - // and triggering this behavior. In this case, we return our - // remaining data and end the stream, if appropriate. - if (state.length > 0 && state.decoder) { - ret = fromList(n, state); - state.length -= ret.length; - } - - if (state.length === 0) - endReadable(this); - - return ret; - } - - // All the actual chunk generation logic needs to be - // *below* the call to _read. The reason is that in certain - // synthetic stream cases, such as passthrough streams, _read - // may be a completely synchronous operation which may change - // the state of the read buffer, providing enough data when - // before there was *not* enough. - // - // So, the steps are: - // 1. Figure out what the state of things will be after we do - // a read from the buffer. - // - // 2. If that resulting state will trigger a _read, then call _read. - // Note that this may be asynchronous, or synchronous. Yes, it is - // deeply ugly to write APIs this way, but that still doesn't mean - // that the Readable class should behave improperly, as streams are - // designed to be sync/async agnostic. - // Take note if the _read call is sync or async (ie, if the read call - // has returned yet), so that we know whether or not it's safe to emit - // 'readable' etc. - // - // 3. Actually pull the requested chunks out of the buffer and return. - - // if we need a readable event, then we need to do some reading. - var doRead = state.needReadable; - - // if we currently have less than the highWaterMark, then also read some - if (state.length - n <= state.highWaterMark) - doRead = true; - - // however, if we've ended, then there's no point, and if we're already - // reading, then it's unnecessary. - if (state.ended || state.reading) - doRead = false; - - if (doRead) { - state.reading = true; - state.sync = true; - // if the length is currently zero, then we *need* a readable event. - if (state.length === 0) - state.needReadable = true; - // call internal read method - this._read(state.highWaterMark); - state.sync = false; - } - - // If _read called its callback synchronously, then `reading` - // will be false, and we need to re-evaluate how much data we - // can return to the user. - if (doRead && !state.reading) - n = howMuchToRead(nOrig, state); - - if (n > 0) - ret = fromList(n, state); - else - ret = null; - - if (ret === null) { - state.needReadable = true; - n = 0; - } - - state.length -= n; - - // If we have nothing in the buffer, then we want to know - // as soon as we *do* get something into the buffer. - if (state.length === 0 && !state.ended) - state.needReadable = true; - - // If we happened to read() exactly the remaining amount in the - // buffer, and the EOF has been seen at this point, then make sure - // that we emit 'end' on the very next tick. - if (state.ended && !state.endEmitted && state.length === 0) - endReadable(this); - - return ret; -}; - -function chunkInvalid(state, chunk) { - var er = null; - if (!Buffer.isBuffer(chunk) && - 'string' !== typeof chunk && - chunk !== null && - chunk !== undefined && - !state.objectMode) { - er = new TypeError('Invalid non-string/buffer chunk'); - } - return er; -} - - -function onEofChunk(stream, state) { - if (state.decoder && !state.ended) { - var chunk = state.decoder.end(); - if (chunk && chunk.length) { - state.buffer.push(chunk); - state.length += state.objectMode ? 1 : chunk.length; - } - } - state.ended = true; - - // if we've ended and we have some data left, then emit - // 'readable' now to make sure it gets picked up. - if (state.length > 0) - emitReadable(stream); - else - endReadable(stream); -} - -// Don't emit readable right away in sync mode, because this can trigger -// another read() call => stack overflow. This way, it might trigger -// a nextTick recursion warning, but that's not so bad. -function emitReadable(stream) { - var state = stream._readableState; - state.needReadable = false; - if (state.emittedReadable) - return; - - state.emittedReadable = true; - if (state.sync) - process.nextTick(function() { - emitReadable_(stream); - }); - else - emitReadable_(stream); -} - -function emitReadable_(stream) { - stream.emit('readable'); -} - - -// at this point, the user has presumably seen the 'readable' event, -// and called read() to consume some data. that may have triggered -// in turn another _read(n) call, in which case reading = true if -// it's in progress. -// However, if we're not ended, or reading, and the length < hwm, -// then go ahead and try to read some more preemptively. -function maybeReadMore(stream, state) { - if (!state.readingMore) { - state.readingMore = true; - process.nextTick(function() { - maybeReadMore_(stream, state); - }); - } -} - -function maybeReadMore_(stream, state) { - var len = state.length; - while (!state.reading && !state.flowing && !state.ended && - state.length < state.highWaterMark) { - stream.read(0); - if (len === state.length) - // didn't get any data, stop spinning. - break; - else - len = state.length; - } - state.readingMore = false; -} - -// abstract method. to be overridden in specific implementation classes. -// call cb(er, data) where data is <= n in length. -// for virtual (non-string, non-buffer) streams, "length" is somewhat -// arbitrary, and perhaps not very meaningful. -Readable.prototype._read = function(n) { - this.emit('error', new Error('not implemented')); -}; - -Readable.prototype.pipe = function(dest, pipeOpts) { - var src = this; - var state = this._readableState; - - switch (state.pipesCount) { - case 0: - state.pipes = dest; - break; - case 1: - state.pipes = [state.pipes, dest]; - break; - default: - state.pipes.push(dest); - break; - } - state.pipesCount += 1; - - var doEnd = (!pipeOpts || pipeOpts.end !== false) && - dest !== process.stdout && - dest !== process.stderr; - - var endFn = doEnd ? onend : cleanup; - if (state.endEmitted) - process.nextTick(endFn); - else - src.once('end', endFn); - - dest.on('unpipe', onunpipe); - function onunpipe(readable) { - if (readable !== src) return; - cleanup(); - } - - function onend() { - dest.end(); - } - - // when the dest drains, it reduces the awaitDrain counter - // on the source. This would be more elegant with a .once() - // handler in flow(), but adding and removing repeatedly is - // too slow. - var ondrain = pipeOnDrain(src); - dest.on('drain', ondrain); - - function cleanup() { - // cleanup event handlers once the pipe is broken - dest.removeListener('close', onclose); - dest.removeListener('finish', onfinish); - dest.removeListener('drain', ondrain); - dest.removeListener('error', onerror); - dest.removeListener('unpipe', onunpipe); - src.removeListener('end', onend); - src.removeListener('end', cleanup); - - // if the reader is waiting for a drain event from this - // specific writer, then it would cause it to never start - // flowing again. - // So, if this is awaiting a drain, then we just call it now. - // If we don't know, then assume that we are waiting for one. - if (!dest._writableState || dest._writableState.needDrain) - ondrain(); - } - - // if the dest has an error, then stop piping into it. - // however, don't suppress the throwing behavior for this. - function onerror(er) { - unpipe(); - dest.removeListener('error', onerror); - if (EE.listenerCount(dest, 'error') === 0) - dest.emit('error', er); - } - // This is a brutally ugly hack to make sure that our error handler - // is attached before any userland ones. NEVER DO THIS. - if (!dest._events || !dest._events.error) - dest.on('error', onerror); - else if (isArray(dest._events.error)) - dest._events.error.unshift(onerror); - else - dest._events.error = [onerror, dest._events.error]; - - - - // Both close and finish should trigger unpipe, but only once. - function onclose() { - dest.removeListener('finish', onfinish); - unpipe(); - } - dest.once('close', onclose); - function onfinish() { - dest.removeListener('close', onclose); - unpipe(); - } - dest.once('finish', onfinish); - - function unpipe() { - src.unpipe(dest); - } - - // tell the dest that it's being piped to - dest.emit('pipe', src); - - // start the flow if it hasn't been started already. - if (!state.flowing) { - // the handler that waits for readable events after all - // the data gets sucked out in flow. - // This would be easier to follow with a .once() handler - // in flow(), but that is too slow. - this.on('readable', pipeOnReadable); - - state.flowing = true; - process.nextTick(function() { - flow(src); - }); - } - - return dest; -}; - -function pipeOnDrain(src) { - return function() { - var dest = this; - var state = src._readableState; - state.awaitDrain--; - if (state.awaitDrain === 0) - flow(src); - }; -} - -function flow(src) { - var state = src._readableState; - var chunk; - state.awaitDrain = 0; - - function write(dest, i, list) { - var written = dest.write(chunk); - if (false === written) { - state.awaitDrain++; - } - } - - while (state.pipesCount && null !== (chunk = src.read())) { - - if (state.pipesCount === 1) - write(state.pipes, 0, null); - else - forEach(state.pipes, write); - - src.emit('data', chunk); - - // if anyone needs a drain, then we have to wait for that. - if (state.awaitDrain > 0) - return; - } - - // if every destination was unpiped, either before entering this - // function, or in the while loop, then stop flowing. - // - // NB: This is a pretty rare edge case. - if (state.pipesCount === 0) { - state.flowing = false; - - // if there were data event listeners added, then switch to old mode. - if (EE.listenerCount(src, 'data') > 0) - emitDataEvents(src); - return; - } - - // at this point, no one needed a drain, so we just ran out of data - // on the next readable event, start it over again. - state.ranOut = true; -} - -function pipeOnReadable() { - if (this._readableState.ranOut) { - this._readableState.ranOut = false; - flow(this); - } -} - - -Readable.prototype.unpipe = function(dest) { - var state = this._readableState; - - // if we're not piping anywhere, then do nothing. - if (state.pipesCount === 0) - return this; - - // just one destination. most common case. - if (state.pipesCount === 1) { - // passed in one, but it's not the right one. - if (dest && dest !== state.pipes) - return this; - - if (!dest) - dest = state.pipes; - - // got a match. - state.pipes = null; - state.pipesCount = 0; - this.removeListener('readable', pipeOnReadable); - state.flowing = false; - if (dest) - dest.emit('unpipe', this); - return this; - } - - // slow case. multiple pipe destinations. - - if (!dest) { - // remove all. - var dests = state.pipes; - var len = state.pipesCount; - state.pipes = null; - state.pipesCount = 0; - this.removeListener('readable', pipeOnReadable); - state.flowing = false; - - for (var i = 0; i < len; i++) - dests[i].emit('unpipe', this); - return this; - } - - // try to find the right one. - var i = indexOf(state.pipes, dest); - if (i === -1) - return this; - - state.pipes.splice(i, 1); - state.pipesCount -= 1; - if (state.pipesCount === 1) - state.pipes = state.pipes[0]; - - dest.emit('unpipe', this); - - return this; -}; - -// set up data events if they are asked for -// Ensure readable listeners eventually get something -Readable.prototype.on = function(ev, fn) { - var res = Stream.prototype.on.call(this, ev, fn); - - if (ev === 'data' && !this._readableState.flowing) - emitDataEvents(this); - - if (ev === 'readable' && this.readable) { - var state = this._readableState; - if (!state.readableListening) { - state.readableListening = true; - state.emittedReadable = false; - state.needReadable = true; - if (!state.reading) { - this.read(0); - } else if (state.length) { - emitReadable(this, state); - } - } - } - - return res; -}; -Readable.prototype.addListener = Readable.prototype.on; - -// pause() and resume() are remnants of the legacy readable stream API -// If the user uses them, then switch into old mode. -Readable.prototype.resume = function() { - emitDataEvents(this); - this.read(0); - this.emit('resume'); -}; - -Readable.prototype.pause = function() { - emitDataEvents(this, true); - this.emit('pause'); -}; - -function emitDataEvents(stream, startPaused) { - var state = stream._readableState; - - if (state.flowing) { - // https://github.com/isaacs/readable-stream/issues/16 - throw new Error('Cannot switch to old mode now.'); - } - - var paused = startPaused || false; - var readable = false; - - // convert to an old-style stream. - stream.readable = true; - stream.pipe = Stream.prototype.pipe; - stream.on = stream.addListener = Stream.prototype.on; - - stream.on('readable', function() { - readable = true; - - var c; - while (!paused && (null !== (c = stream.read()))) - stream.emit('data', c); - - if (c === null) { - readable = false; - stream._readableState.needReadable = true; - } - }); - - stream.pause = function() { - paused = true; - this.emit('pause'); - }; - - stream.resume = function() { - paused = false; - if (readable) - process.nextTick(function() { - stream.emit('readable'); - }); - else - this.read(0); - this.emit('resume'); - }; - - // now make it start, just in case it hadn't already. - stream.emit('readable'); -} - -// wrap an old-style stream as the async data source. -// This is *not* part of the readable stream interface. -// It is an ugly unfortunate mess of history. -Readable.prototype.wrap = function(stream) { - var state = this._readableState; - var paused = false; - - var self = this; - stream.on('end', function() { - if (state.decoder && !state.ended) { - var chunk = state.decoder.end(); - if (chunk && chunk.length) - self.push(chunk); - } - - self.push(null); - }); - - stream.on('data', function(chunk) { - if (state.decoder) - chunk = state.decoder.write(chunk); - - // don't skip over falsy values in objectMode - //if (state.objectMode && util.isNullOrUndefined(chunk)) - if (state.objectMode && (chunk === null || chunk === undefined)) - return; - else if (!state.objectMode && (!chunk || !chunk.length)) - return; - - var ret = self.push(chunk); - if (!ret) { - paused = true; - stream.pause(); - } - }); - - // proxy all the other methods. - // important when wrapping filters and duplexes. - for (var i in stream) { - if (typeof stream[i] === 'function' && - typeof this[i] === 'undefined') { - this[i] = function(method) { return function() { - return stream[method].apply(stream, arguments); - }}(i); - } - } - - // proxy certain important events. - var events = ['error', 'close', 'destroy', 'pause', 'resume']; - forEach(events, function(ev) { - stream.on(ev, self.emit.bind(self, ev)); - }); - - // when we try to consume some more bytes, simply unpause the - // underlying stream. - self._read = function(n) { - if (paused) { - paused = false; - stream.resume(); - } - }; - - return self; -}; - - - -// exposed for testing purposes only. -Readable._fromList = fromList; - -// Pluck off n bytes from an array of buffers. -// Length is the combined lengths of all the buffers in the list. -function fromList(n, state) { - var list = state.buffer; - var length = state.length; - var stringMode = !!state.decoder; - var objectMode = !!state.objectMode; - var ret; - - // nothing in the list, definitely empty. - if (list.length === 0) - return null; - - if (length === 0) - ret = null; - else if (objectMode) - ret = list.shift(); - else if (!n || n >= length) { - // read it all, truncate the array. - if (stringMode) - ret = list.join(''); - else - ret = Buffer.concat(list, length); - list.length = 0; - } else { - // read just some of it. - if (n < list[0].length) { - // just take a part of the first list item. - // slice is the same for buffers and strings. - var buf = list[0]; - ret = buf.slice(0, n); - list[0] = buf.slice(n); - } else if (n === list[0].length) { - // first list is a perfect match - ret = list.shift(); - } else { - // complex case. - // we have enough to cover it, but it spans past the first buffer. - if (stringMode) - ret = ''; - else - ret = new Buffer(n); - - var c = 0; - for (var i = 0, l = list.length; i < l && c < n; i++) { - var buf = list[0]; - var cpy = Math.min(n - c, buf.length); - - if (stringMode) - ret += buf.slice(0, cpy); - else - buf.copy(ret, c, 0, cpy); - - if (cpy < buf.length) - list[0] = buf.slice(cpy); - else - list.shift(); - - c += cpy; - } - } - } - - return ret; -} - -function endReadable(stream) { - var state = stream._readableState; - - // If we get here before consuming all the bytes, then that is a - // bug in node. Should never happen. - if (state.length > 0) - throw new Error('endReadable called on non-empty stream'); - - if (!state.endEmitted && state.calledRead) { - state.ended = true; - process.nextTick(function() { - // Check that we didn't get one last unshift. - if (!state.endEmitted && state.length === 0) { - state.endEmitted = true; - stream.readable = false; - stream.emit('end'); - } - }); - } -} - -function forEach (xs, f) { - for (var i = 0, l = xs.length; i < l; i++) { - f(xs[i], i); - } -} - -function indexOf (xs, x) { - for (var i = 0, l = xs.length; i < l; i++) { - if (xs[i] === x) return i; - } - return -1; -} diff --git a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/fwd-stream/node_modules/readable-stream/lib/_stream_transform.js b/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/fwd-stream/node_modules/readable-stream/lib/_stream_transform.js deleted file mode 100644 index eb188df3..00000000 --- a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/fwd-stream/node_modules/readable-stream/lib/_stream_transform.js +++ /dev/null @@ -1,210 +0,0 @@ -// Copyright Joyent, Inc. and other Node contributors. -// -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to permit -// persons to whom the Software is furnished to do so, subject to the -// following conditions: -// -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -// USE OR OTHER DEALINGS IN THE SOFTWARE. - - -// a transform stream is a readable/writable stream where you do -// something with the data. Sometimes it's called a "filter", -// but that's not a great name for it, since that implies a thing where -// some bits pass through, and others are simply ignored. (That would -// be a valid example of a transform, of course.) -// -// While the output is causally related to the input, it's not a -// necessarily symmetric or synchronous transformation. For example, -// a zlib stream might take multiple plain-text writes(), and then -// emit a single compressed chunk some time in the future. -// -// Here's how this works: -// -// The Transform stream has all the aspects of the readable and writable -// stream classes. When you write(chunk), that calls _write(chunk,cb) -// internally, and returns false if there's a lot of pending writes -// buffered up. When you call read(), that calls _read(n) until -// there's enough pending readable data buffered up. -// -// In a transform stream, the written data is placed in a buffer. When -// _read(n) is called, it transforms the queued up data, calling the -// buffered _write cb's as it consumes chunks. If consuming a single -// written chunk would result in multiple output chunks, then the first -// outputted bit calls the readcb, and subsequent chunks just go into -// the read buffer, and will cause it to emit 'readable' if necessary. -// -// This way, back-pressure is actually determined by the reading side, -// since _read has to be called to start processing a new chunk. However, -// a pathological inflate type of transform can cause excessive buffering -// here. For example, imagine a stream where every byte of input is -// interpreted as an integer from 0-255, and then results in that many -// bytes of output. Writing the 4 bytes {ff,ff,ff,ff} would result in -// 1kb of data being output. In this case, you could write a very small -// amount of input, and end up with a very large amount of output. In -// such a pathological inflating mechanism, there'd be no way to tell -// the system to stop doing the transform. A single 4MB write could -// cause the system to run out of memory. -// -// However, even in such a pathological case, only a single written chunk -// would be consumed, and then the rest would wait (un-transformed) until -// the results of the previous transformed chunk were consumed. - -module.exports = Transform; - -var Duplex = require('./_stream_duplex'); - -/**/ -var util = require('core-util-is'); -util.inherits = require('inherits'); -/**/ - -util.inherits(Transform, Duplex); - - -function TransformState(options, stream) { - this.afterTransform = function(er, data) { - return afterTransform(stream, er, data); - }; - - this.needTransform = false; - this.transforming = false; - this.writecb = null; - this.writechunk = null; -} - -function afterTransform(stream, er, data) { - var ts = stream._transformState; - ts.transforming = false; - - var cb = ts.writecb; - - if (!cb) - return stream.emit('error', new Error('no writecb in Transform class')); - - ts.writechunk = null; - ts.writecb = null; - - if (data !== null && data !== undefined) - stream.push(data); - - if (cb) - cb(er); - - var rs = stream._readableState; - rs.reading = false; - if (rs.needReadable || rs.length < rs.highWaterMark) { - stream._read(rs.highWaterMark); - } -} - - -function Transform(options) { - if (!(this instanceof Transform)) - return new Transform(options); - - Duplex.call(this, options); - - var ts = this._transformState = new TransformState(options, this); - - // when the writable side finishes, then flush out anything remaining. - var stream = this; - - // start out asking for a readable event once data is transformed. - this._readableState.needReadable = true; - - // we have implemented the _read method, and done the other things - // that Readable wants before the first _read call, so unset the - // sync guard flag. - this._readableState.sync = false; - - this.once('finish', function() { - if ('function' === typeof this._flush) - this._flush(function(er) { - done(stream, er); - }); - else - done(stream); - }); -} - -Transform.prototype.push = function(chunk, encoding) { - this._transformState.needTransform = false; - return Duplex.prototype.push.call(this, chunk, encoding); -}; - -// This is the part where you do stuff! -// override this function in implementation classes. -// 'chunk' is an input chunk. -// -// Call `push(newChunk)` to pass along transformed output -// to the readable side. You may call 'push' zero or more times. -// -// Call `cb(err)` when you are done with this chunk. If you pass -// an error, then that'll put the hurt on the whole operation. If you -// never call cb(), then you'll never get another chunk. -Transform.prototype._transform = function(chunk, encoding, cb) { - throw new Error('not implemented'); -}; - -Transform.prototype._write = function(chunk, encoding, cb) { - var ts = this._transformState; - ts.writecb = cb; - ts.writechunk = chunk; - ts.writeencoding = encoding; - if (!ts.transforming) { - var rs = this._readableState; - if (ts.needTransform || - rs.needReadable || - rs.length < rs.highWaterMark) - this._read(rs.highWaterMark); - } -}; - -// Doesn't matter what the args are here. -// _transform does all the work. -// That we got here means that the readable side wants more data. -Transform.prototype._read = function(n) { - var ts = this._transformState; - - if (ts.writechunk !== null && ts.writecb && !ts.transforming) { - ts.transforming = true; - this._transform(ts.writechunk, ts.writeencoding, ts.afterTransform); - } else { - // mark that we need a transform, so that any data that comes in - // will get processed, now that we've asked for it. - ts.needTransform = true; - } -}; - - -function done(stream, er) { - if (er) - return stream.emit('error', er); - - // if there's nothing in the write buffer, then that means - // that nothing more will ever be provided - var ws = stream._writableState; - var rs = stream._readableState; - var ts = stream._transformState; - - if (ws.length) - throw new Error('calling transform done when ws.length != 0'); - - if (ts.transforming) - throw new Error('calling transform done when still transforming'); - - return stream.push(null); -} diff --git a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/fwd-stream/node_modules/readable-stream/lib/_stream_writable.js b/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/fwd-stream/node_modules/readable-stream/lib/_stream_writable.js deleted file mode 100644 index 4bdaa4fa..00000000 --- a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/fwd-stream/node_modules/readable-stream/lib/_stream_writable.js +++ /dev/null @@ -1,386 +0,0 @@ -// Copyright Joyent, Inc. and other Node contributors. -// -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to permit -// persons to whom the Software is furnished to do so, subject to the -// following conditions: -// -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -// USE OR OTHER DEALINGS IN THE SOFTWARE. - -// A bit simpler than readable streams. -// Implement an async ._write(chunk, cb), and it'll handle all -// the drain event emission and buffering. - -module.exports = Writable; - -/**/ -var Buffer = require('buffer').Buffer; -/**/ - -Writable.WritableState = WritableState; - - -/**/ -var util = require('core-util-is'); -util.inherits = require('inherits'); -/**/ - -var Stream = require('stream'); - -util.inherits(Writable, Stream); - -function WriteReq(chunk, encoding, cb) { - this.chunk = chunk; - this.encoding = encoding; - this.callback = cb; -} - -function WritableState(options, stream) { - options = options || {}; - - // the point at which write() starts returning false - // Note: 0 is a valid value, means that we always return false if - // the entire buffer is not flushed immediately on write() - var hwm = options.highWaterMark; - this.highWaterMark = (hwm || hwm === 0) ? hwm : 16 * 1024; - - // object stream flag to indicate whether or not this stream - // contains buffers or objects. - this.objectMode = !!options.objectMode; - - // cast to ints. - this.highWaterMark = ~~this.highWaterMark; - - this.needDrain = false; - // at the start of calling end() - this.ending = false; - // when end() has been called, and returned - this.ended = false; - // when 'finish' is emitted - this.finished = false; - - // should we decode strings into buffers before passing to _write? - // this is here so that some node-core streams can optimize string - // handling at a lower level. - var noDecode = options.decodeStrings === false; - this.decodeStrings = !noDecode; - - // Crypto is kind of old and crusty. Historically, its default string - // encoding is 'binary' so we have to make this configurable. - // Everything else in the universe uses 'utf8', though. - this.defaultEncoding = options.defaultEncoding || 'utf8'; - - // not an actual buffer we keep track of, but a measurement - // of how much we're waiting to get pushed to some underlying - // socket or file. - this.length = 0; - - // a flag to see when we're in the middle of a write. - this.writing = false; - - // a flag to be able to tell if the onwrite cb is called immediately, - // or on a later tick. We set this to true at first, becuase any - // actions that shouldn't happen until "later" should generally also - // not happen before the first write call. - this.sync = true; - - // a flag to know if we're processing previously buffered items, which - // may call the _write() callback in the same tick, so that we don't - // end up in an overlapped onwrite situation. - this.bufferProcessing = false; - - // the callback that's passed to _write(chunk,cb) - this.onwrite = function(er) { - onwrite(stream, er); - }; - - // the callback that the user supplies to write(chunk,encoding,cb) - this.writecb = null; - - // the amount that is being written when _write is called. - this.writelen = 0; - - this.buffer = []; - - // True if the error was already emitted and should not be thrown again - this.errorEmitted = false; -} - -function Writable(options) { - var Duplex = require('./_stream_duplex'); - - // Writable ctor is applied to Duplexes, though they're not - // instanceof Writable, they're instanceof Readable. - if (!(this instanceof Writable) && !(this instanceof Duplex)) - return new Writable(options); - - this._writableState = new WritableState(options, this); - - // legacy. - this.writable = true; - - Stream.call(this); -} - -// Otherwise people can pipe Writable streams, which is just wrong. -Writable.prototype.pipe = function() { - this.emit('error', new Error('Cannot pipe. Not readable.')); -}; - - -function writeAfterEnd(stream, state, cb) { - var er = new Error('write after end'); - // TODO: defer error events consistently everywhere, not just the cb - stream.emit('error', er); - process.nextTick(function() { - cb(er); - }); -} - -// If we get something that is not a buffer, string, null, or undefined, -// and we're not in objectMode, then that's an error. -// Otherwise stream chunks are all considered to be of length=1, and the -// watermarks determine how many objects to keep in the buffer, rather than -// how many bytes or characters. -function validChunk(stream, state, chunk, cb) { - var valid = true; - if (!Buffer.isBuffer(chunk) && - 'string' !== typeof chunk && - chunk !== null && - chunk !== undefined && - !state.objectMode) { - var er = new TypeError('Invalid non-string/buffer chunk'); - stream.emit('error', er); - process.nextTick(function() { - cb(er); - }); - valid = false; - } - return valid; -} - -Writable.prototype.write = function(chunk, encoding, cb) { - var state = this._writableState; - var ret = false; - - if (typeof encoding === 'function') { - cb = encoding; - encoding = null; - } - - if (Buffer.isBuffer(chunk)) - encoding = 'buffer'; - else if (!encoding) - encoding = state.defaultEncoding; - - if (typeof cb !== 'function') - cb = function() {}; - - if (state.ended) - writeAfterEnd(this, state, cb); - else if (validChunk(this, state, chunk, cb)) - ret = writeOrBuffer(this, state, chunk, encoding, cb); - - return ret; -}; - -function decodeChunk(state, chunk, encoding) { - if (!state.objectMode && - state.decodeStrings !== false && - typeof chunk === 'string') { - chunk = new Buffer(chunk, encoding); - } - return chunk; -} - -// if we're already writing something, then just put this -// in the queue, and wait our turn. Otherwise, call _write -// If we return false, then we need a drain event, so set that flag. -function writeOrBuffer(stream, state, chunk, encoding, cb) { - chunk = decodeChunk(state, chunk, encoding); - if (Buffer.isBuffer(chunk)) - encoding = 'buffer'; - var len = state.objectMode ? 1 : chunk.length; - - state.length += len; - - var ret = state.length < state.highWaterMark; - // we must ensure that previous needDrain will not be reset to false. - if (!ret) - state.needDrain = true; - - if (state.writing) - state.buffer.push(new WriteReq(chunk, encoding, cb)); - else - doWrite(stream, state, len, chunk, encoding, cb); - - return ret; -} - -function doWrite(stream, state, len, chunk, encoding, cb) { - state.writelen = len; - state.writecb = cb; - state.writing = true; - state.sync = true; - stream._write(chunk, encoding, state.onwrite); - state.sync = false; -} - -function onwriteError(stream, state, sync, er, cb) { - if (sync) - process.nextTick(function() { - cb(er); - }); - else - cb(er); - - stream._writableState.errorEmitted = true; - stream.emit('error', er); -} - -function onwriteStateUpdate(state) { - state.writing = false; - state.writecb = null; - state.length -= state.writelen; - state.writelen = 0; -} - -function onwrite(stream, er) { - var state = stream._writableState; - var sync = state.sync; - var cb = state.writecb; - - onwriteStateUpdate(state); - - if (er) - onwriteError(stream, state, sync, er, cb); - else { - // Check if we're actually ready to finish, but don't emit yet - var finished = needFinish(stream, state); - - if (!finished && !state.bufferProcessing && state.buffer.length) - clearBuffer(stream, state); - - if (sync) { - process.nextTick(function() { - afterWrite(stream, state, finished, cb); - }); - } else { - afterWrite(stream, state, finished, cb); - } - } -} - -function afterWrite(stream, state, finished, cb) { - if (!finished) - onwriteDrain(stream, state); - cb(); - if (finished) - finishMaybe(stream, state); -} - -// Must force callback to be called on nextTick, so that we don't -// emit 'drain' before the write() consumer gets the 'false' return -// value, and has a chance to attach a 'drain' listener. -function onwriteDrain(stream, state) { - if (state.length === 0 && state.needDrain) { - state.needDrain = false; - stream.emit('drain'); - } -} - - -// if there's something in the buffer waiting, then process it -function clearBuffer(stream, state) { - state.bufferProcessing = true; - - for (var c = 0; c < state.buffer.length; c++) { - var entry = state.buffer[c]; - var chunk = entry.chunk; - var encoding = entry.encoding; - var cb = entry.callback; - var len = state.objectMode ? 1 : chunk.length; - - doWrite(stream, state, len, chunk, encoding, cb); - - // if we didn't call the onwrite immediately, then - // it means that we need to wait until it does. - // also, that means that the chunk and cb are currently - // being processed, so move the buffer counter past them. - if (state.writing) { - c++; - break; - } - } - - state.bufferProcessing = false; - if (c < state.buffer.length) - state.buffer = state.buffer.slice(c); - else - state.buffer.length = 0; -} - -Writable.prototype._write = function(chunk, encoding, cb) { - cb(new Error('not implemented')); -}; - -Writable.prototype.end = function(chunk, encoding, cb) { - var state = this._writableState; - - if (typeof chunk === 'function') { - cb = chunk; - chunk = null; - encoding = null; - } else if (typeof encoding === 'function') { - cb = encoding; - encoding = null; - } - - if (typeof chunk !== 'undefined' && chunk !== null) - this.write(chunk, encoding); - - // ignore unnecessary end() calls. - if (!state.ending && !state.finished) - endWritable(this, state, cb); -}; - - -function needFinish(stream, state) { - return (state.ending && - state.length === 0 && - !state.finished && - !state.writing); -} - -function finishMaybe(stream, state) { - var need = needFinish(stream, state); - if (need) { - state.finished = true; - stream.emit('finish'); - } - return need; -} - -function endWritable(stream, state, cb) { - state.ending = true; - finishMaybe(stream, state); - if (cb) { - if (state.finished) - process.nextTick(cb); - else - stream.once('finish', cb); - } - state.ended = true; -} diff --git a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/fwd-stream/node_modules/readable-stream/node_modules/core-util-is/LICENSE b/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/fwd-stream/node_modules/readable-stream/node_modules/core-util-is/LICENSE deleted file mode 100644 index d8d7f943..00000000 --- a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/fwd-stream/node_modules/readable-stream/node_modules/core-util-is/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright Node.js contributors. All rights reserved. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to -deal in the Software without restriction, including without limitation the -rights to use, copy, modify, merge, publish, distribute, sublicense, and/or -sell copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS -IN THE SOFTWARE. diff --git a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/fwd-stream/node_modules/readable-stream/node_modules/core-util-is/README.md b/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/fwd-stream/node_modules/readable-stream/node_modules/core-util-is/README.md deleted file mode 100644 index 5a76b414..00000000 --- a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/fwd-stream/node_modules/readable-stream/node_modules/core-util-is/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# core-util-is - -The `util.is*` functions introduced in Node v0.12. diff --git a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/fwd-stream/node_modules/readable-stream/node_modules/core-util-is/float.patch b/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/fwd-stream/node_modules/readable-stream/node_modules/core-util-is/float.patch deleted file mode 100644 index a06d5c05..00000000 --- a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/fwd-stream/node_modules/readable-stream/node_modules/core-util-is/float.patch +++ /dev/null @@ -1,604 +0,0 @@ -diff --git a/lib/util.js b/lib/util.js -index a03e874..9074e8e 100644 ---- a/lib/util.js -+++ b/lib/util.js -@@ -19,430 +19,6 @@ - // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE - // USE OR OTHER DEALINGS IN THE SOFTWARE. - --var formatRegExp = /%[sdj%]/g; --exports.format = function(f) { -- if (!isString(f)) { -- var objects = []; -- for (var i = 0; i < arguments.length; i++) { -- objects.push(inspect(arguments[i])); -- } -- return objects.join(' '); -- } -- -- var i = 1; -- var args = arguments; -- var len = args.length; -- var str = String(f).replace(formatRegExp, function(x) { -- if (x === '%%') return '%'; -- if (i >= len) return x; -- switch (x) { -- case '%s': return String(args[i++]); -- case '%d': return Number(args[i++]); -- case '%j': -- try { -- return JSON.stringify(args[i++]); -- } catch (_) { -- return '[Circular]'; -- } -- default: -- return x; -- } -- }); -- for (var x = args[i]; i < len; x = args[++i]) { -- if (isNull(x) || !isObject(x)) { -- str += ' ' + x; -- } else { -- str += ' ' + inspect(x); -- } -- } -- return str; --}; -- -- --// Mark that a method should not be used. --// Returns a modified function which warns once by default. --// If --no-deprecation is set, then it is a no-op. --exports.deprecate = function(fn, msg) { -- // Allow for deprecating things in the process of starting up. -- if (isUndefined(global.process)) { -- return function() { -- return exports.deprecate(fn, msg).apply(this, arguments); -- }; -- } -- -- if (process.noDeprecation === true) { -- return fn; -- } -- -- var warned = false; -- function deprecated() { -- if (!warned) { -- if (process.throwDeprecation) { -- throw new Error(msg); -- } else if (process.traceDeprecation) { -- console.trace(msg); -- } else { -- console.error(msg); -- } -- warned = true; -- } -- return fn.apply(this, arguments); -- } -- -- return deprecated; --}; -- -- --var debugs = {}; --var debugEnviron; --exports.debuglog = function(set) { -- if (isUndefined(debugEnviron)) -- debugEnviron = process.env.NODE_DEBUG || ''; -- set = set.toUpperCase(); -- if (!debugs[set]) { -- if (new RegExp('\\b' + set + '\\b', 'i').test(debugEnviron)) { -- var pid = process.pid; -- debugs[set] = function() { -- var msg = exports.format.apply(exports, arguments); -- console.error('%s %d: %s', set, pid, msg); -- }; -- } else { -- debugs[set] = function() {}; -- } -- } -- return debugs[set]; --}; -- -- --/** -- * Echos the value of a value. Trys to print the value out -- * in the best way possible given the different types. -- * -- * @param {Object} obj The object to print out. -- * @param {Object} opts Optional options object that alters the output. -- */ --/* legacy: obj, showHidden, depth, colors*/ --function inspect(obj, opts) { -- // default options -- var ctx = { -- seen: [], -- stylize: stylizeNoColor -- }; -- // legacy... -- if (arguments.length >= 3) ctx.depth = arguments[2]; -- if (arguments.length >= 4) ctx.colors = arguments[3]; -- if (isBoolean(opts)) { -- // legacy... -- ctx.showHidden = opts; -- } else if (opts) { -- // got an "options" object -- exports._extend(ctx, opts); -- } -- // set default options -- if (isUndefined(ctx.showHidden)) ctx.showHidden = false; -- if (isUndefined(ctx.depth)) ctx.depth = 2; -- if (isUndefined(ctx.colors)) ctx.colors = false; -- if (isUndefined(ctx.customInspect)) ctx.customInspect = true; -- if (ctx.colors) ctx.stylize = stylizeWithColor; -- return formatValue(ctx, obj, ctx.depth); --} --exports.inspect = inspect; -- -- --// http://en.wikipedia.org/wiki/ANSI_escape_code#graphics --inspect.colors = { -- 'bold' : [1, 22], -- 'italic' : [3, 23], -- 'underline' : [4, 24], -- 'inverse' : [7, 27], -- 'white' : [37, 39], -- 'grey' : [90, 39], -- 'black' : [30, 39], -- 'blue' : [34, 39], -- 'cyan' : [36, 39], -- 'green' : [32, 39], -- 'magenta' : [35, 39], -- 'red' : [31, 39], -- 'yellow' : [33, 39] --}; -- --// Don't use 'blue' not visible on cmd.exe --inspect.styles = { -- 'special': 'cyan', -- 'number': 'yellow', -- 'boolean': 'yellow', -- 'undefined': 'grey', -- 'null': 'bold', -- 'string': 'green', -- 'date': 'magenta', -- // "name": intentionally not styling -- 'regexp': 'red' --}; -- -- --function stylizeWithColor(str, styleType) { -- var style = inspect.styles[styleType]; -- -- if (style) { -- return '\u001b[' + inspect.colors[style][0] + 'm' + str + -- '\u001b[' + inspect.colors[style][1] + 'm'; -- } else { -- return str; -- } --} -- -- --function stylizeNoColor(str, styleType) { -- return str; --} -- -- --function arrayToHash(array) { -- var hash = {}; -- -- array.forEach(function(val, idx) { -- hash[val] = true; -- }); -- -- return hash; --} -- -- --function formatValue(ctx, value, recurseTimes) { -- // Provide a hook for user-specified inspect functions. -- // Check that value is an object with an inspect function on it -- if (ctx.customInspect && -- value && -- isFunction(value.inspect) && -- // Filter out the util module, it's inspect function is special -- value.inspect !== exports.inspect && -- // Also filter out any prototype objects using the circular check. -- !(value.constructor && value.constructor.prototype === value)) { -- var ret = value.inspect(recurseTimes, ctx); -- if (!isString(ret)) { -- ret = formatValue(ctx, ret, recurseTimes); -- } -- return ret; -- } -- -- // Primitive types cannot have properties -- var primitive = formatPrimitive(ctx, value); -- if (primitive) { -- return primitive; -- } -- -- // Look up the keys of the object. -- var keys = Object.keys(value); -- var visibleKeys = arrayToHash(keys); -- -- if (ctx.showHidden) { -- keys = Object.getOwnPropertyNames(value); -- } -- -- // Some type of object without properties can be shortcutted. -- if (keys.length === 0) { -- if (isFunction(value)) { -- var name = value.name ? ': ' + value.name : ''; -- return ctx.stylize('[Function' + name + ']', 'special'); -- } -- if (isRegExp(value)) { -- return ctx.stylize(RegExp.prototype.toString.call(value), 'regexp'); -- } -- if (isDate(value)) { -- return ctx.stylize(Date.prototype.toString.call(value), 'date'); -- } -- if (isError(value)) { -- return formatError(value); -- } -- } -- -- var base = '', array = false, braces = ['{', '}']; -- -- // Make Array say that they are Array -- if (isArray(value)) { -- array = true; -- braces = ['[', ']']; -- } -- -- // Make functions say that they are functions -- if (isFunction(value)) { -- var n = value.name ? ': ' + value.name : ''; -- base = ' [Function' + n + ']'; -- } -- -- // Make RegExps say that they are RegExps -- if (isRegExp(value)) { -- base = ' ' + RegExp.prototype.toString.call(value); -- } -- -- // Make dates with properties first say the date -- if (isDate(value)) { -- base = ' ' + Date.prototype.toUTCString.call(value); -- } -- -- // Make error with message first say the error -- if (isError(value)) { -- base = ' ' + formatError(value); -- } -- -- if (keys.length === 0 && (!array || value.length == 0)) { -- return braces[0] + base + braces[1]; -- } -- -- if (recurseTimes < 0) { -- if (isRegExp(value)) { -- return ctx.stylize(RegExp.prototype.toString.call(value), 'regexp'); -- } else { -- return ctx.stylize('[Object]', 'special'); -- } -- } -- -- ctx.seen.push(value); -- -- var output; -- if (array) { -- output = formatArray(ctx, value, recurseTimes, visibleKeys, keys); -- } else { -- output = keys.map(function(key) { -- return formatProperty(ctx, value, recurseTimes, visibleKeys, key, array); -- }); -- } -- -- ctx.seen.pop(); -- -- return reduceToSingleString(output, base, braces); --} -- -- --function formatPrimitive(ctx, value) { -- if (isUndefined(value)) -- return ctx.stylize('undefined', 'undefined'); -- if (isString(value)) { -- var simple = '\'' + JSON.stringify(value).replace(/^"|"$/g, '') -- .replace(/'/g, "\\'") -- .replace(/\\"/g, '"') + '\''; -- return ctx.stylize(simple, 'string'); -- } -- if (isNumber(value)) { -- // Format -0 as '-0'. Strict equality won't distinguish 0 from -0, -- // so instead we use the fact that 1 / -0 < 0 whereas 1 / 0 > 0 . -- if (value === 0 && 1 / value < 0) -- return ctx.stylize('-0', 'number'); -- return ctx.stylize('' + value, 'number'); -- } -- if (isBoolean(value)) -- return ctx.stylize('' + value, 'boolean'); -- // For some reason typeof null is "object", so special case here. -- if (isNull(value)) -- return ctx.stylize('null', 'null'); --} -- -- --function formatError(value) { -- return '[' + Error.prototype.toString.call(value) + ']'; --} -- -- --function formatArray(ctx, value, recurseTimes, visibleKeys, keys) { -- var output = []; -- for (var i = 0, l = value.length; i < l; ++i) { -- if (hasOwnProperty(value, String(i))) { -- output.push(formatProperty(ctx, value, recurseTimes, visibleKeys, -- String(i), true)); -- } else { -- output.push(''); -- } -- } -- keys.forEach(function(key) { -- if (!key.match(/^\d+$/)) { -- output.push(formatProperty(ctx, value, recurseTimes, visibleKeys, -- key, true)); -- } -- }); -- return output; --} -- -- --function formatProperty(ctx, value, recurseTimes, visibleKeys, key, array) { -- var name, str, desc; -- desc = Object.getOwnPropertyDescriptor(value, key) || { value: value[key] }; -- if (desc.get) { -- if (desc.set) { -- str = ctx.stylize('[Getter/Setter]', 'special'); -- } else { -- str = ctx.stylize('[Getter]', 'special'); -- } -- } else { -- if (desc.set) { -- str = ctx.stylize('[Setter]', 'special'); -- } -- } -- if (!hasOwnProperty(visibleKeys, key)) { -- name = '[' + key + ']'; -- } -- if (!str) { -- if (ctx.seen.indexOf(desc.value) < 0) { -- if (isNull(recurseTimes)) { -- str = formatValue(ctx, desc.value, null); -- } else { -- str = formatValue(ctx, desc.value, recurseTimes - 1); -- } -- if (str.indexOf('\n') > -1) { -- if (array) { -- str = str.split('\n').map(function(line) { -- return ' ' + line; -- }).join('\n').substr(2); -- } else { -- str = '\n' + str.split('\n').map(function(line) { -- return ' ' + line; -- }).join('\n'); -- } -- } -- } else { -- str = ctx.stylize('[Circular]', 'special'); -- } -- } -- if (isUndefined(name)) { -- if (array && key.match(/^\d+$/)) { -- return str; -- } -- name = JSON.stringify('' + key); -- if (name.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)) { -- name = name.substr(1, name.length - 2); -- name = ctx.stylize(name, 'name'); -- } else { -- name = name.replace(/'/g, "\\'") -- .replace(/\\"/g, '"') -- .replace(/(^"|"$)/g, "'"); -- name = ctx.stylize(name, 'string'); -- } -- } -- -- return name + ': ' + str; --} -- -- --function reduceToSingleString(output, base, braces) { -- var numLinesEst = 0; -- var length = output.reduce(function(prev, cur) { -- numLinesEst++; -- if (cur.indexOf('\n') >= 0) numLinesEst++; -- return prev + cur.replace(/\u001b\[\d\d?m/g, '').length + 1; -- }, 0); -- -- if (length > 60) { -- return braces[0] + -- (base === '' ? '' : base + '\n ') + -- ' ' + -- output.join(',\n ') + -- ' ' + -- braces[1]; -- } -- -- return braces[0] + base + ' ' + output.join(', ') + ' ' + braces[1]; --} -- -- - // NOTE: These type checking functions intentionally don't use `instanceof` - // because it is fragile and can be easily faked with `Object.create()`. - function isArray(ar) { -@@ -522,166 +98,10 @@ function isPrimitive(arg) { - exports.isPrimitive = isPrimitive; - - function isBuffer(arg) { -- return arg instanceof Buffer; -+ return Buffer.isBuffer(arg); - } - exports.isBuffer = isBuffer; - - function objectToString(o) { - return Object.prototype.toString.call(o); --} -- -- --function pad(n) { -- return n < 10 ? '0' + n.toString(10) : n.toString(10); --} -- -- --var months = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', -- 'Oct', 'Nov', 'Dec']; -- --// 26 Feb 16:19:34 --function timestamp() { -- var d = new Date(); -- var time = [pad(d.getHours()), -- pad(d.getMinutes()), -- pad(d.getSeconds())].join(':'); -- return [d.getDate(), months[d.getMonth()], time].join(' '); --} -- -- --// log is just a thin wrapper to console.log that prepends a timestamp --exports.log = function() { -- console.log('%s - %s', timestamp(), exports.format.apply(exports, arguments)); --}; -- -- --/** -- * Inherit the prototype methods from one constructor into another. -- * -- * The Function.prototype.inherits from lang.js rewritten as a standalone -- * function (not on Function.prototype). NOTE: If this file is to be loaded -- * during bootstrapping this function needs to be rewritten using some native -- * functions as prototype setup using normal JavaScript does not work as -- * expected during bootstrapping (see mirror.js in r114903). -- * -- * @param {function} ctor Constructor function which needs to inherit the -- * prototype. -- * @param {function} superCtor Constructor function to inherit prototype from. -- */ --exports.inherits = function(ctor, superCtor) { -- ctor.super_ = superCtor; -- ctor.prototype = Object.create(superCtor.prototype, { -- constructor: { -- value: ctor, -- enumerable: false, -- writable: true, -- configurable: true -- } -- }); --}; -- --exports._extend = function(origin, add) { -- // Don't do anything if add isn't an object -- if (!add || !isObject(add)) return origin; -- -- var keys = Object.keys(add); -- var i = keys.length; -- while (i--) { -- origin[keys[i]] = add[keys[i]]; -- } -- return origin; --}; -- --function hasOwnProperty(obj, prop) { -- return Object.prototype.hasOwnProperty.call(obj, prop); --} -- -- --// Deprecated old stuff. -- --exports.p = exports.deprecate(function() { -- for (var i = 0, len = arguments.length; i < len; ++i) { -- console.error(exports.inspect(arguments[i])); -- } --}, 'util.p: Use console.error() instead'); -- -- --exports.exec = exports.deprecate(function() { -- return require('child_process').exec.apply(this, arguments); --}, 'util.exec is now called `child_process.exec`.'); -- -- --exports.print = exports.deprecate(function() { -- for (var i = 0, len = arguments.length; i < len; ++i) { -- process.stdout.write(String(arguments[i])); -- } --}, 'util.print: Use console.log instead'); -- -- --exports.puts = exports.deprecate(function() { -- for (var i = 0, len = arguments.length; i < len; ++i) { -- process.stdout.write(arguments[i] + '\n'); -- } --}, 'util.puts: Use console.log instead'); -- -- --exports.debug = exports.deprecate(function(x) { -- process.stderr.write('DEBUG: ' + x + '\n'); --}, 'util.debug: Use console.error instead'); -- -- --exports.error = exports.deprecate(function(x) { -- for (var i = 0, len = arguments.length; i < len; ++i) { -- process.stderr.write(arguments[i] + '\n'); -- } --}, 'util.error: Use console.error instead'); -- -- --exports.pump = exports.deprecate(function(readStream, writeStream, callback) { -- var callbackCalled = false; -- -- function call(a, b, c) { -- if (callback && !callbackCalled) { -- callback(a, b, c); -- callbackCalled = true; -- } -- } -- -- readStream.addListener('data', function(chunk) { -- if (writeStream.write(chunk) === false) readStream.pause(); -- }); -- -- writeStream.addListener('drain', function() { -- readStream.resume(); -- }); -- -- readStream.addListener('end', function() { -- writeStream.end(); -- }); -- -- readStream.addListener('close', function() { -- call(); -- }); -- -- readStream.addListener('error', function(err) { -- writeStream.end(); -- call(err); -- }); -- -- writeStream.addListener('error', function(err) { -- readStream.destroy(); -- call(err); -- }); --}, 'util.pump(): Use readableStream.pipe() instead'); -- -- --var uv; --exports._errnoException = function(err, syscall) { -- if (isUndefined(uv)) uv = process.binding('uv'); -- var errname = uv.errname(err); -- var e = new Error(syscall + ' ' + errname); -- e.code = errname; -- e.errno = errname; -- e.syscall = syscall; -- return e; --}; -+} \ No newline at end of file diff --git a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/fwd-stream/node_modules/readable-stream/node_modules/core-util-is/lib/util.js b/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/fwd-stream/node_modules/readable-stream/node_modules/core-util-is/lib/util.js deleted file mode 100644 index ff4c851c..00000000 --- a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/fwd-stream/node_modules/readable-stream/node_modules/core-util-is/lib/util.js +++ /dev/null @@ -1,107 +0,0 @@ -// Copyright Joyent, Inc. and other Node contributors. -// -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to permit -// persons to whom the Software is furnished to do so, subject to the -// following conditions: -// -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -// USE OR OTHER DEALINGS IN THE SOFTWARE. - -// NOTE: These type checking functions intentionally don't use `instanceof` -// because it is fragile and can be easily faked with `Object.create()`. - -function isArray(arg) { - if (Array.isArray) { - return Array.isArray(arg); - } - return objectToString(arg) === '[object Array]'; -} -exports.isArray = isArray; - -function isBoolean(arg) { - return typeof arg === 'boolean'; -} -exports.isBoolean = isBoolean; - -function isNull(arg) { - return arg === null; -} -exports.isNull = isNull; - -function isNullOrUndefined(arg) { - return arg == null; -} -exports.isNullOrUndefined = isNullOrUndefined; - -function isNumber(arg) { - return typeof arg === 'number'; -} -exports.isNumber = isNumber; - -function isString(arg) { - return typeof arg === 'string'; -} -exports.isString = isString; - -function isSymbol(arg) { - return typeof arg === 'symbol'; -} -exports.isSymbol = isSymbol; - -function isUndefined(arg) { - return arg === void 0; -} -exports.isUndefined = isUndefined; - -function isRegExp(re) { - return objectToString(re) === '[object RegExp]'; -} -exports.isRegExp = isRegExp; - -function isObject(arg) { - return typeof arg === 'object' && arg !== null; -} -exports.isObject = isObject; - -function isDate(d) { - return objectToString(d) === '[object Date]'; -} -exports.isDate = isDate; - -function isError(e) { - return (objectToString(e) === '[object Error]' || e instanceof Error); -} -exports.isError = isError; - -function isFunction(arg) { - return typeof arg === 'function'; -} -exports.isFunction = isFunction; - -function isPrimitive(arg) { - return arg === null || - typeof arg === 'boolean' || - typeof arg === 'number' || - typeof arg === 'string' || - typeof arg === 'symbol' || // ES6 symbol - typeof arg === 'undefined'; -} -exports.isPrimitive = isPrimitive; - -exports.isBuffer = Buffer.isBuffer; - -function objectToString(o) { - return Object.prototype.toString.call(o); -} diff --git a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/fwd-stream/node_modules/readable-stream/node_modules/core-util-is/package.json b/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/fwd-stream/node_modules/readable-stream/node_modules/core-util-is/package.json deleted file mode 100644 index ddd227e6..00000000 --- a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/fwd-stream/node_modules/readable-stream/node_modules/core-util-is/package.json +++ /dev/null @@ -1,60 +0,0 @@ -{ - "name": "core-util-is", - "version": "1.0.2", - "description": "The `util.is*` functions introduced in Node v0.12.", - "main": "lib/util.js", - "repository": { - "type": "git", - "url": "git://github.com/isaacs/core-util-is.git" - }, - "keywords": [ - "util", - "isBuffer", - "isArray", - "isNumber", - "isString", - "isRegExp", - "isThis", - "isThat", - "polyfill" - ], - "author": { - "name": "Isaac Z. Schlueter", - "email": "i@izs.me", - "url": "http://blog.izs.me/" - }, - "license": "MIT", - "bugs": { - "url": "https://github.com/isaacs/core-util-is/issues" - }, - "scripts": { - "test": "tap test.js" - }, - "devDependencies": { - "tap": "^2.3.0" - }, - "gitHead": "a177da234df5638b363ddc15fa324619a38577c8", - "homepage": "https://github.com/isaacs/core-util-is#readme", - "_id": "core-util-is@1.0.2", - "_shasum": "b5fd54220aa2bc5ab57aab7140c940754503c1a7", - "_from": "core-util-is@>=1.0.0 <1.1.0", - "_npmVersion": "3.3.2", - "_nodeVersion": "4.0.0", - "_npmUser": { - "name": "isaacs", - "email": "i@izs.me" - }, - "dist": { - "shasum": "b5fd54220aa2bc5ab57aab7140c940754503c1a7", - "tarball": "http://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz" - }, - "maintainers": [ - { - "name": "isaacs", - "email": "i@izs.me" - } - ], - "directories": {}, - "_resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", - "readme": "ERROR: No README data found!" -} diff --git a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/fwd-stream/node_modules/readable-stream/node_modules/core-util-is/test.js b/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/fwd-stream/node_modules/readable-stream/node_modules/core-util-is/test.js deleted file mode 100644 index 1a490c65..00000000 --- a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/fwd-stream/node_modules/readable-stream/node_modules/core-util-is/test.js +++ /dev/null @@ -1,68 +0,0 @@ -var assert = require('tap'); - -var t = require('./lib/util'); - -assert.equal(t.isArray([]), true); -assert.equal(t.isArray({}), false); - -assert.equal(t.isBoolean(null), false); -assert.equal(t.isBoolean(true), true); -assert.equal(t.isBoolean(false), true); - -assert.equal(t.isNull(null), true); -assert.equal(t.isNull(undefined), false); -assert.equal(t.isNull(false), false); -assert.equal(t.isNull(), false); - -assert.equal(t.isNullOrUndefined(null), true); -assert.equal(t.isNullOrUndefined(undefined), true); -assert.equal(t.isNullOrUndefined(false), false); -assert.equal(t.isNullOrUndefined(), true); - -assert.equal(t.isNumber(null), false); -assert.equal(t.isNumber('1'), false); -assert.equal(t.isNumber(1), true); - -assert.equal(t.isString(null), false); -assert.equal(t.isString('1'), true); -assert.equal(t.isString(1), false); - -assert.equal(t.isSymbol(null), false); -assert.equal(t.isSymbol('1'), false); -assert.equal(t.isSymbol(1), false); -assert.equal(t.isSymbol(Symbol()), true); - -assert.equal(t.isUndefined(null), false); -assert.equal(t.isUndefined(undefined), true); -assert.equal(t.isUndefined(false), false); -assert.equal(t.isUndefined(), true); - -assert.equal(t.isRegExp(null), false); -assert.equal(t.isRegExp('1'), false); -assert.equal(t.isRegExp(new RegExp()), true); - -assert.equal(t.isObject({}), true); -assert.equal(t.isObject([]), true); -assert.equal(t.isObject(new RegExp()), true); -assert.equal(t.isObject(new Date()), true); - -assert.equal(t.isDate(null), false); -assert.equal(t.isDate('1'), false); -assert.equal(t.isDate(new Date()), true); - -assert.equal(t.isError(null), false); -assert.equal(t.isError({ err: true }), false); -assert.equal(t.isError(new Error()), true); - -assert.equal(t.isFunction(null), false); -assert.equal(t.isFunction({ }), false); -assert.equal(t.isFunction(function() {}), true); - -assert.equal(t.isPrimitive(null), true); -assert.equal(t.isPrimitive(''), true); -assert.equal(t.isPrimitive(0), true); -assert.equal(t.isPrimitive(new Date()), false); - -assert.equal(t.isBuffer(null), false); -assert.equal(t.isBuffer({}), false); -assert.equal(t.isBuffer(new Buffer(0)), true); diff --git a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/fwd-stream/node_modules/readable-stream/node_modules/inherits/LICENSE b/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/fwd-stream/node_modules/readable-stream/node_modules/inherits/LICENSE deleted file mode 100644 index dea3013d..00000000 --- a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/fwd-stream/node_modules/readable-stream/node_modules/inherits/LICENSE +++ /dev/null @@ -1,16 +0,0 @@ -The ISC License - -Copyright (c) Isaac Z. Schlueter - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH -REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND -FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, -INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM -LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR -OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR -PERFORMANCE OF THIS SOFTWARE. - diff --git a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/fwd-stream/node_modules/readable-stream/node_modules/inherits/README.md b/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/fwd-stream/node_modules/readable-stream/node_modules/inherits/README.md deleted file mode 100644 index b1c56658..00000000 --- a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/fwd-stream/node_modules/readable-stream/node_modules/inherits/README.md +++ /dev/null @@ -1,42 +0,0 @@ -Browser-friendly inheritance fully compatible with standard node.js -[inherits](http://nodejs.org/api/util.html#util_util_inherits_constructor_superconstructor). - -This package exports standard `inherits` from node.js `util` module in -node environment, but also provides alternative browser-friendly -implementation through [browser -field](https://gist.github.com/shtylman/4339901). Alternative -implementation is a literal copy of standard one located in standalone -module to avoid requiring of `util`. It also has a shim for old -browsers with no `Object.create` support. - -While keeping you sure you are using standard `inherits` -implementation in node.js environment, it allows bundlers such as -[browserify](https://github.com/substack/node-browserify) to not -include full `util` package to your client code if all you need is -just `inherits` function. It worth, because browser shim for `util` -package is large and `inherits` is often the single function you need -from it. - -It's recommended to use this package instead of -`require('util').inherits` for any code that has chances to be used -not only in node.js but in browser too. - -## usage - -```js -var inherits = require('inherits'); -// then use exactly as the standard one -``` - -## note on version ~1.0 - -Version ~1.0 had completely different motivation and is not compatible -neither with 2.0 nor with standard node.js `inherits`. - -If you are using version ~1.0 and planning to switch to ~2.0, be -careful: - -* new version uses `super_` instead of `super` for referencing - superclass -* new version overwrites current prototype while old one preserves any - existing fields on it diff --git a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/fwd-stream/node_modules/readable-stream/node_modules/inherits/inherits.js b/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/fwd-stream/node_modules/readable-stream/node_modules/inherits/inherits.js deleted file mode 100644 index 3b94763a..00000000 --- a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/fwd-stream/node_modules/readable-stream/node_modules/inherits/inherits.js +++ /dev/null @@ -1,7 +0,0 @@ -try { - var util = require('util'); - if (typeof util.inherits !== 'function') throw ''; - module.exports = util.inherits; -} catch (e) { - module.exports = require('./inherits_browser.js'); -} diff --git a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/fwd-stream/node_modules/readable-stream/node_modules/inherits/inherits_browser.js b/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/fwd-stream/node_modules/readable-stream/node_modules/inherits/inherits_browser.js deleted file mode 100644 index c1e78a75..00000000 --- a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/fwd-stream/node_modules/readable-stream/node_modules/inherits/inherits_browser.js +++ /dev/null @@ -1,23 +0,0 @@ -if (typeof Object.create === 'function') { - // implementation from standard node.js 'util' module - module.exports = function inherits(ctor, superCtor) { - ctor.super_ = superCtor - ctor.prototype = Object.create(superCtor.prototype, { - constructor: { - value: ctor, - enumerable: false, - writable: true, - configurable: true - } - }); - }; -} else { - // old school shim for old browsers - module.exports = function inherits(ctor, superCtor) { - ctor.super_ = superCtor - var TempCtor = function () {} - TempCtor.prototype = superCtor.prototype - ctor.prototype = new TempCtor() - ctor.prototype.constructor = ctor - } -} diff --git a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/fwd-stream/node_modules/readable-stream/node_modules/inherits/package.json b/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/fwd-stream/node_modules/readable-stream/node_modules/inherits/package.json deleted file mode 100644 index 9146e757..00000000 --- a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/fwd-stream/node_modules/readable-stream/node_modules/inherits/package.json +++ /dev/null @@ -1,63 +0,0 @@ -{ - "name": "inherits", - "description": "Browser-friendly inheritance fully compatible with standard node.js inherits()", - "version": "2.0.3", - "keywords": [ - "inheritance", - "class", - "klass", - "oop", - "object-oriented", - "inherits", - "browser", - "browserify" - ], - "main": "./inherits.js", - "browser": "./inherits_browser.js", - "repository": { - "type": "git", - "url": "git://github.com/isaacs/inherits.git" - }, - "license": "ISC", - "scripts": { - "test": "node test" - }, - "devDependencies": { - "tap": "^7.1.0" - }, - "files": [ - "inherits.js", - "inherits_browser.js" - ], - "gitHead": "e05d0fb27c61a3ec687214f0476386b765364d5f", - "bugs": { - "url": "https://github.com/isaacs/inherits/issues" - }, - "homepage": "https://github.com/isaacs/inherits#readme", - "_id": "inherits@2.0.3", - "_shasum": "633c2c83e3da42a502f52466022480f4208261de", - "_from": "inherits@>=2.0.1 <2.1.0", - "_npmVersion": "3.10.7", - "_nodeVersion": "6.5.0", - "_npmUser": { - "name": "isaacs", - "email": "i@izs.me" - }, - "dist": { - "shasum": "633c2c83e3da42a502f52466022480f4208261de", - "tarball": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz" - }, - "maintainers": [ - { - "name": "isaacs", - "email": "i@izs.me" - } - ], - "_npmOperationalInternal": { - "host": "packages-16-east.internal.npmjs.com", - "tmp": "tmp/inherits-2.0.3.tgz_1473295776489_0.08142363070510328" - }, - "directories": {}, - "_resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", - "readme": "ERROR: No README data found!" -} diff --git a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/fwd-stream/node_modules/readable-stream/node_modules/isarray/README.md b/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/fwd-stream/node_modules/readable-stream/node_modules/isarray/README.md deleted file mode 100644 index 052a62b8..00000000 --- a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/fwd-stream/node_modules/readable-stream/node_modules/isarray/README.md +++ /dev/null @@ -1,54 +0,0 @@ - -# isarray - -`Array#isArray` for older browsers. - -## Usage - -```js -var isArray = require('isarray'); - -console.log(isArray([])); // => true -console.log(isArray({})); // => false -``` - -## Installation - -With [npm](http://npmjs.org) do - -```bash -$ npm install isarray -``` - -Then bundle for the browser with -[browserify](https://github.com/substack/browserify). - -With [component](http://component.io) do - -```bash -$ component install juliangruber/isarray -``` - -## License - -(MIT) - -Copyright (c) 2013 Julian Gruber <julian@juliangruber.com> - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies -of the Software, and to permit persons to whom the Software is furnished to do -so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/fwd-stream/node_modules/readable-stream/node_modules/isarray/build/build.js b/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/fwd-stream/node_modules/readable-stream/node_modules/isarray/build/build.js deleted file mode 100644 index ec58596a..00000000 --- a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/fwd-stream/node_modules/readable-stream/node_modules/isarray/build/build.js +++ /dev/null @@ -1,209 +0,0 @@ - -/** - * Require the given path. - * - * @param {String} path - * @return {Object} exports - * @api public - */ - -function require(path, parent, orig) { - var resolved = require.resolve(path); - - // lookup failed - if (null == resolved) { - orig = orig || path; - parent = parent || 'root'; - var err = new Error('Failed to require "' + orig + '" from "' + parent + '"'); - err.path = orig; - err.parent = parent; - err.require = true; - throw err; - } - - var module = require.modules[resolved]; - - // perform real require() - // by invoking the module's - // registered function - if (!module.exports) { - module.exports = {}; - module.client = module.component = true; - module.call(this, module.exports, require.relative(resolved), module); - } - - return module.exports; -} - -/** - * Registered modules. - */ - -require.modules = {}; - -/** - * Registered aliases. - */ - -require.aliases = {}; - -/** - * Resolve `path`. - * - * Lookup: - * - * - PATH/index.js - * - PATH.js - * - PATH - * - * @param {String} path - * @return {String} path or null - * @api private - */ - -require.resolve = function(path) { - if (path.charAt(0) === '/') path = path.slice(1); - var index = path + '/index.js'; - - var paths = [ - path, - path + '.js', - path + '.json', - path + '/index.js', - path + '/index.json' - ]; - - for (var i = 0; i < paths.length; i++) { - var path = paths[i]; - if (require.modules.hasOwnProperty(path)) return path; - } - - if (require.aliases.hasOwnProperty(index)) { - return require.aliases[index]; - } -}; - -/** - * Normalize `path` relative to the current path. - * - * @param {String} curr - * @param {String} path - * @return {String} - * @api private - */ - -require.normalize = function(curr, path) { - var segs = []; - - if ('.' != path.charAt(0)) return path; - - curr = curr.split('/'); - path = path.split('/'); - - for (var i = 0; i < path.length; ++i) { - if ('..' == path[i]) { - curr.pop(); - } else if ('.' != path[i] && '' != path[i]) { - segs.push(path[i]); - } - } - - return curr.concat(segs).join('/'); -}; - -/** - * Register module at `path` with callback `definition`. - * - * @param {String} path - * @param {Function} definition - * @api private - */ - -require.register = function(path, definition) { - require.modules[path] = definition; -}; - -/** - * Alias a module definition. - * - * @param {String} from - * @param {String} to - * @api private - */ - -require.alias = function(from, to) { - if (!require.modules.hasOwnProperty(from)) { - throw new Error('Failed to alias "' + from + '", it does not exist'); - } - require.aliases[to] = from; -}; - -/** - * Return a require function relative to the `parent` path. - * - * @param {String} parent - * @return {Function} - * @api private - */ - -require.relative = function(parent) { - var p = require.normalize(parent, '..'); - - /** - * lastIndexOf helper. - */ - - function lastIndexOf(arr, obj) { - var i = arr.length; - while (i--) { - if (arr[i] === obj) return i; - } - return -1; - } - - /** - * The relative require() itself. - */ - - function localRequire(path) { - var resolved = localRequire.resolve(path); - return require(resolved, parent, path); - } - - /** - * Resolve relative to the parent. - */ - - localRequire.resolve = function(path) { - var c = path.charAt(0); - if ('/' == c) return path.slice(1); - if ('.' == c) return require.normalize(p, path); - - // resolve deps by returning - // the dep in the nearest "deps" - // directory - var segs = parent.split('/'); - var i = lastIndexOf(segs, 'deps') + 1; - if (!i) i = 0; - path = segs.slice(0, i + 1).join('/') + '/deps/' + path; - return path; - }; - - /** - * Check if module is defined at `path`. - */ - - localRequire.exists = function(path) { - return require.modules.hasOwnProperty(localRequire.resolve(path)); - }; - - return localRequire; -}; -require.register("isarray/index.js", function(exports, require, module){ -module.exports = Array.isArray || function (arr) { - return Object.prototype.toString.call(arr) == '[object Array]'; -}; - -}); -require.alias("isarray/index.js", "isarray/index.js"); - diff --git a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/fwd-stream/node_modules/readable-stream/node_modules/isarray/component.json b/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/fwd-stream/node_modules/readable-stream/node_modules/isarray/component.json deleted file mode 100644 index 9e31b683..00000000 --- a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/fwd-stream/node_modules/readable-stream/node_modules/isarray/component.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "name" : "isarray", - "description" : "Array#isArray for older browsers", - "version" : "0.0.1", - "repository" : "juliangruber/isarray", - "homepage": "https://github.com/juliangruber/isarray", - "main" : "index.js", - "scripts" : [ - "index.js" - ], - "dependencies" : {}, - "keywords": ["browser","isarray","array"], - "author": { - "name": "Julian Gruber", - "email": "mail@juliangruber.com", - "url": "http://juliangruber.com" - }, - "license": "MIT" -} diff --git a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/fwd-stream/node_modules/readable-stream/node_modules/isarray/index.js b/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/fwd-stream/node_modules/readable-stream/node_modules/isarray/index.js deleted file mode 100644 index 5f5ad45d..00000000 --- a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/fwd-stream/node_modules/readable-stream/node_modules/isarray/index.js +++ /dev/null @@ -1,3 +0,0 @@ -module.exports = Array.isArray || function (arr) { - return Object.prototype.toString.call(arr) == '[object Array]'; -}; diff --git a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/fwd-stream/node_modules/readable-stream/node_modules/isarray/package.json b/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/fwd-stream/node_modules/readable-stream/node_modules/isarray/package.json deleted file mode 100644 index 25c8581b..00000000 --- a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/fwd-stream/node_modules/readable-stream/node_modules/isarray/package.json +++ /dev/null @@ -1,54 +0,0 @@ -{ - "name": "isarray", - "description": "Array#isArray for older browsers", - "version": "0.0.1", - "repository": { - "type": "git", - "url": "git://github.com/juliangruber/isarray.git" - }, - "homepage": "https://github.com/juliangruber/isarray", - "main": "index.js", - "scripts": { - "test": "tap test/*.js" - }, - "dependencies": {}, - "devDependencies": { - "tap": "*" - }, - "keywords": [ - "browser", - "isarray", - "array" - ], - "author": { - "name": "Julian Gruber", - "email": "mail@juliangruber.com", - "url": "http://juliangruber.com" - }, - "license": "MIT", - "_id": "isarray@0.0.1", - "dist": { - "shasum": "8a18acfca9a8f4177e09abfc6038939b05d1eedf", - "tarball": "http://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz" - }, - "_from": "isarray@0.0.1", - "_npmVersion": "1.2.18", - "_npmUser": { - "name": "juliangruber", - "email": "julian@juliangruber.com" - }, - "maintainers": [ - { - "name": "juliangruber", - "email": "julian@juliangruber.com" - } - ], - "directories": {}, - "_shasum": "8a18acfca9a8f4177e09abfc6038939b05d1eedf", - "_resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", - "readme": "\n# isarray\n\n`Array#isArray` for older browsers.\n\n## Usage\n\n```js\nvar isArray = require('isarray');\n\nconsole.log(isArray([])); // => true\nconsole.log(isArray({})); // => false\n```\n\n## Installation\n\nWith [npm](http://npmjs.org) do\n\n```bash\n$ npm install isarray\n```\n\nThen bundle for the browser with\n[browserify](https://github.com/substack/browserify).\n\nWith [component](http://component.io) do\n\n```bash\n$ component install juliangruber/isarray\n```\n\n## License\n\n(MIT)\n\nCopyright (c) 2013 Julian Gruber <julian@juliangruber.com>\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of\nthis software and associated documentation files (the \"Software\"), to deal in\nthe Software without restriction, including without limitation the rights to\nuse, copy, modify, merge, publish, distribute, sublicense, and/or sell copies\nof the Software, and to permit persons to whom the Software is furnished to do\nso, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n", - "readmeFilename": "README.md", - "bugs": { - "url": "https://github.com/juliangruber/isarray/issues" - } -} diff --git a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/fwd-stream/node_modules/readable-stream/node_modules/string_decoder/.npmignore b/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/fwd-stream/node_modules/readable-stream/node_modules/string_decoder/.npmignore deleted file mode 100644 index 206320cc..00000000 --- a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/fwd-stream/node_modules/readable-stream/node_modules/string_decoder/.npmignore +++ /dev/null @@ -1,2 +0,0 @@ -build -test diff --git a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/fwd-stream/node_modules/readable-stream/node_modules/string_decoder/LICENSE b/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/fwd-stream/node_modules/readable-stream/node_modules/string_decoder/LICENSE deleted file mode 100644 index 6de584a4..00000000 --- a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/fwd-stream/node_modules/readable-stream/node_modules/string_decoder/LICENSE +++ /dev/null @@ -1,20 +0,0 @@ -Copyright Joyent, Inc. and other Node contributors. - -Permission is hereby granted, free of charge, to any person obtaining a -copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to permit -persons to whom the Software is furnished to do so, subject to the -following conditions: - -The above copyright notice and this permission notice shall be included -in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/fwd-stream/node_modules/readable-stream/node_modules/string_decoder/README.md b/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/fwd-stream/node_modules/readable-stream/node_modules/string_decoder/README.md deleted file mode 100644 index 4d2aa001..00000000 --- a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/fwd-stream/node_modules/readable-stream/node_modules/string_decoder/README.md +++ /dev/null @@ -1,7 +0,0 @@ -**string_decoder.js** (`require('string_decoder')`) from Node.js core - -Copyright Joyent, Inc. and other Node contributors. See LICENCE file for details. - -Version numbers match the versions found in Node core, e.g. 0.10.24 matches Node 0.10.24, likewise 0.11.10 matches Node 0.11.10. **Prefer the stable version over the unstable.** - -The *build/* directory contains a build script that will scrape the source from the [joyent/node](https://github.com/joyent/node) repo given a specific Node version. \ No newline at end of file diff --git a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/fwd-stream/node_modules/readable-stream/node_modules/string_decoder/index.js b/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/fwd-stream/node_modules/readable-stream/node_modules/string_decoder/index.js deleted file mode 100644 index b00e54fb..00000000 --- a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/fwd-stream/node_modules/readable-stream/node_modules/string_decoder/index.js +++ /dev/null @@ -1,221 +0,0 @@ -// Copyright Joyent, Inc. and other Node contributors. -// -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to permit -// persons to whom the Software is furnished to do so, subject to the -// following conditions: -// -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -// USE OR OTHER DEALINGS IN THE SOFTWARE. - -var Buffer = require('buffer').Buffer; - -var isBufferEncoding = Buffer.isEncoding - || function(encoding) { - switch (encoding && encoding.toLowerCase()) { - case 'hex': case 'utf8': case 'utf-8': case 'ascii': case 'binary': case 'base64': case 'ucs2': case 'ucs-2': case 'utf16le': case 'utf-16le': case 'raw': return true; - default: return false; - } - } - - -function assertEncoding(encoding) { - if (encoding && !isBufferEncoding(encoding)) { - throw new Error('Unknown encoding: ' + encoding); - } -} - -// StringDecoder provides an interface for efficiently splitting a series of -// buffers into a series of JS strings without breaking apart multi-byte -// characters. CESU-8 is handled as part of the UTF-8 encoding. -// -// @TODO Handling all encodings inside a single object makes it very difficult -// to reason about this code, so it should be split up in the future. -// @TODO There should be a utf8-strict encoding that rejects invalid UTF-8 code -// points as used by CESU-8. -var StringDecoder = exports.StringDecoder = function(encoding) { - this.encoding = (encoding || 'utf8').toLowerCase().replace(/[-_]/, ''); - assertEncoding(encoding); - switch (this.encoding) { - case 'utf8': - // CESU-8 represents each of Surrogate Pair by 3-bytes - this.surrogateSize = 3; - break; - case 'ucs2': - case 'utf16le': - // UTF-16 represents each of Surrogate Pair by 2-bytes - this.surrogateSize = 2; - this.detectIncompleteChar = utf16DetectIncompleteChar; - break; - case 'base64': - // Base-64 stores 3 bytes in 4 chars, and pads the remainder. - this.surrogateSize = 3; - this.detectIncompleteChar = base64DetectIncompleteChar; - break; - default: - this.write = passThroughWrite; - return; - } - - // Enough space to store all bytes of a single character. UTF-8 needs 4 - // bytes, but CESU-8 may require up to 6 (3 bytes per surrogate). - this.charBuffer = new Buffer(6); - // Number of bytes received for the current incomplete multi-byte character. - this.charReceived = 0; - // Number of bytes expected for the current incomplete multi-byte character. - this.charLength = 0; -}; - - -// write decodes the given buffer and returns it as JS string that is -// guaranteed to not contain any partial multi-byte characters. Any partial -// character found at the end of the buffer is buffered up, and will be -// returned when calling write again with the remaining bytes. -// -// Note: Converting a Buffer containing an orphan surrogate to a String -// currently works, but converting a String to a Buffer (via `new Buffer`, or -// Buffer#write) will replace incomplete surrogates with the unicode -// replacement character. See https://codereview.chromium.org/121173009/ . -StringDecoder.prototype.write = function(buffer) { - var charStr = ''; - // if our last write ended with an incomplete multibyte character - while (this.charLength) { - // determine how many remaining bytes this buffer has to offer for this char - var available = (buffer.length >= this.charLength - this.charReceived) ? - this.charLength - this.charReceived : - buffer.length; - - // add the new bytes to the char buffer - buffer.copy(this.charBuffer, this.charReceived, 0, available); - this.charReceived += available; - - if (this.charReceived < this.charLength) { - // still not enough chars in this buffer? wait for more ... - return ''; - } - - // remove bytes belonging to the current character from the buffer - buffer = buffer.slice(available, buffer.length); - - // get the character that was split - charStr = this.charBuffer.slice(0, this.charLength).toString(this.encoding); - - // CESU-8: lead surrogate (D800-DBFF) is also the incomplete character - var charCode = charStr.charCodeAt(charStr.length - 1); - if (charCode >= 0xD800 && charCode <= 0xDBFF) { - this.charLength += this.surrogateSize; - charStr = ''; - continue; - } - this.charReceived = this.charLength = 0; - - // if there are no more bytes in this buffer, just emit our char - if (buffer.length === 0) { - return charStr; - } - break; - } - - // determine and set charLength / charReceived - this.detectIncompleteChar(buffer); - - var end = buffer.length; - if (this.charLength) { - // buffer the incomplete character bytes we got - buffer.copy(this.charBuffer, 0, buffer.length - this.charReceived, end); - end -= this.charReceived; - } - - charStr += buffer.toString(this.encoding, 0, end); - - var end = charStr.length - 1; - var charCode = charStr.charCodeAt(end); - // CESU-8: lead surrogate (D800-DBFF) is also the incomplete character - if (charCode >= 0xD800 && charCode <= 0xDBFF) { - var size = this.surrogateSize; - this.charLength += size; - this.charReceived += size; - this.charBuffer.copy(this.charBuffer, size, 0, size); - buffer.copy(this.charBuffer, 0, 0, size); - return charStr.substring(0, end); - } - - // or just emit the charStr - return charStr; -}; - -// detectIncompleteChar determines if there is an incomplete UTF-8 character at -// the end of the given buffer. If so, it sets this.charLength to the byte -// length that character, and sets this.charReceived to the number of bytes -// that are available for this character. -StringDecoder.prototype.detectIncompleteChar = function(buffer) { - // determine how many bytes we have to check at the end of this buffer - var i = (buffer.length >= 3) ? 3 : buffer.length; - - // Figure out if one of the last i bytes of our buffer announces an - // incomplete char. - for (; i > 0; i--) { - var c = buffer[buffer.length - i]; - - // See http://en.wikipedia.org/wiki/UTF-8#Description - - // 110XXXXX - if (i == 1 && c >> 5 == 0x06) { - this.charLength = 2; - break; - } - - // 1110XXXX - if (i <= 2 && c >> 4 == 0x0E) { - this.charLength = 3; - break; - } - - // 11110XXX - if (i <= 3 && c >> 3 == 0x1E) { - this.charLength = 4; - break; - } - } - this.charReceived = i; -}; - -StringDecoder.prototype.end = function(buffer) { - var res = ''; - if (buffer && buffer.length) - res = this.write(buffer); - - if (this.charReceived) { - var cr = this.charReceived; - var buf = this.charBuffer; - var enc = this.encoding; - res += buf.slice(0, cr).toString(enc); - } - - return res; -}; - -function passThroughWrite(buffer) { - return buffer.toString(this.encoding); -} - -function utf16DetectIncompleteChar(buffer) { - this.charReceived = buffer.length % 2; - this.charLength = this.charReceived ? 2 : 0; -} - -function base64DetectIncompleteChar(buffer) { - this.charReceived = buffer.length % 3; - this.charLength = this.charReceived ? 3 : 0; -} diff --git a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/fwd-stream/node_modules/readable-stream/node_modules/string_decoder/package.json b/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/fwd-stream/node_modules/readable-stream/node_modules/string_decoder/package.json deleted file mode 100644 index 0364d54b..00000000 --- a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/fwd-stream/node_modules/readable-stream/node_modules/string_decoder/package.json +++ /dev/null @@ -1,54 +0,0 @@ -{ - "name": "string_decoder", - "version": "0.10.31", - "description": "The string_decoder module from Node core", - "main": "index.js", - "dependencies": {}, - "devDependencies": { - "tap": "~0.4.8" - }, - "scripts": { - "test": "tap test/simple/*.js" - }, - "repository": { - "type": "git", - "url": "git://github.com/rvagg/string_decoder.git" - }, - "homepage": "https://github.com/rvagg/string_decoder", - "keywords": [ - "string", - "decoder", - "browser", - "browserify" - ], - "license": "MIT", - "gitHead": "d46d4fd87cf1d06e031c23f1ba170ca7d4ade9a0", - "bugs": { - "url": "https://github.com/rvagg/string_decoder/issues" - }, - "_id": "string_decoder@0.10.31", - "_shasum": "62e203bc41766c6c28c9fc84301dab1c5310fa94", - "_from": "string_decoder@>=0.10.0 <0.11.0", - "_npmVersion": "1.4.23", - "_npmUser": { - "name": "rvagg", - "email": "rod@vagg.org" - }, - "maintainers": [ - { - "name": "substack", - "email": "mail@substack.net" - }, - { - "name": "rvagg", - "email": "rod@vagg.org" - } - ], - "dist": { - "shasum": "62e203bc41766c6c28c9fc84301dab1c5310fa94", - "tarball": "http://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz" - }, - "directories": {}, - "_resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", - "readme": "ERROR: No README data found!" -} diff --git a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/fwd-stream/node_modules/readable-stream/package.json b/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/fwd-stream/node_modules/readable-stream/package.json deleted file mode 100644 index 8a904696..00000000 --- a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/fwd-stream/node_modules/readable-stream/package.json +++ /dev/null @@ -1,79 +0,0 @@ -{ - "name": "readable-stream", - "version": "1.0.34", - "description": "Streams2, a user-land copy of the stream library from Node.js v0.10.x", - "main": "readable.js", - "dependencies": { - "core-util-is": "~1.0.0", - "isarray": "0.0.1", - "string_decoder": "~0.10.x", - "inherits": "~2.0.1" - }, - "devDependencies": { - "tap": "~0.2.6" - }, - "scripts": { - "test": "tap test/simple/*.js" - }, - "repository": { - "type": "git", - "url": "git://github.com/isaacs/readable-stream" - }, - "keywords": [ - "readable", - "stream", - "pipe" - ], - "browser": { - "util": false - }, - "author": { - "name": "Isaac Z. Schlueter", - "email": "i@izs.me", - "url": "http://blog.izs.me/" - }, - "license": "MIT", - "gitHead": "1227c7b66deedb1dc5284a89425854d5f7ad9576", - "bugs": { - "url": "https://github.com/isaacs/readable-stream/issues" - }, - "_id": "readable-stream@1.0.34", - "_shasum": "125820e34bc842d2f2aaafafe4c2916ee32c157c", - "_from": "readable-stream@>=1.0.26-4 <1.1.0", - "_npmVersion": "3.8.3", - "_nodeVersion": "5.10.1", - "_npmUser": { - "name": "cwmma", - "email": "calvin.metcalf@gmail.com" - }, - "dist": { - "shasum": "125820e34bc842d2f2aaafafe4c2916ee32c157c", - "tarball": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.0.34.tgz" - }, - "maintainers": [ - { - "name": "isaacs", - "email": "isaacs@npmjs.com" - }, - { - "name": "tootallnate", - "email": "nathan@tootallnate.net" - }, - { - "name": "rvagg", - "email": "rod@vagg.org" - }, - { - "name": "cwmma", - "email": "calvin.metcalf@gmail.com" - } - ], - "_npmOperationalInternal": { - "host": "packages-12-west.internal.npmjs.com", - "tmp": "tmp/readable-stream-1.0.34.tgz_1460562521506_0.019665231462568045" - }, - "directories": {}, - "_resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.0.34.tgz", - "readme": "ERROR: No README data found!", - "homepage": "https://github.com/isaacs/readable-stream" -} diff --git a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/fwd-stream/node_modules/readable-stream/passthrough.js b/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/fwd-stream/node_modules/readable-stream/passthrough.js deleted file mode 100644 index 27e8d8a5..00000000 --- a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/fwd-stream/node_modules/readable-stream/passthrough.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require("./lib/_stream_passthrough.js") diff --git a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/fwd-stream/node_modules/readable-stream/readable.js b/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/fwd-stream/node_modules/readable-stream/readable.js deleted file mode 100644 index 26511e87..00000000 --- a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/fwd-stream/node_modules/readable-stream/readable.js +++ /dev/null @@ -1,11 +0,0 @@ -var Stream = require('stream'); // hack to fix a circular dependency issue when used with browserify -exports = module.exports = require('./lib/_stream_readable.js'); -exports.Stream = Stream; -exports.Readable = exports; -exports.Writable = require('./lib/_stream_writable.js'); -exports.Duplex = require('./lib/_stream_duplex.js'); -exports.Transform = require('./lib/_stream_transform.js'); -exports.PassThrough = require('./lib/_stream_passthrough.js'); -if (!process.browser && process.env.READABLE_STREAM === 'disable') { - module.exports = require('stream'); -} diff --git a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/fwd-stream/node_modules/readable-stream/transform.js b/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/fwd-stream/node_modules/readable-stream/transform.js deleted file mode 100644 index 5d482f07..00000000 --- a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/fwd-stream/node_modules/readable-stream/transform.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require("./lib/_stream_transform.js") diff --git a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/fwd-stream/node_modules/readable-stream/writable.js b/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/fwd-stream/node_modules/readable-stream/writable.js deleted file mode 100644 index e1e9efdf..00000000 --- a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/fwd-stream/node_modules/readable-stream/writable.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require("./lib/_stream_writable.js") diff --git a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/fwd-stream/package.json b/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/fwd-stream/package.json deleted file mode 100644 index bc55e8db..00000000 --- a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/fwd-stream/package.json +++ /dev/null @@ -1,42 +0,0 @@ -{ - "name": "fwd-stream", - "description": "Forward a readable stream to another readable stream or a writable stream to another writable stream", - "version": "1.0.4", - "repository": { - "type": "git", - "url": "git://github.com/mafintosh/fwd-stream" - }, - "dependencies": { - "readable-stream": "~1.0.26-4" - }, - "devDependencies": { - "tape": "~2.12.3" - }, - "scripts": { - "test": "tape test.js" - }, - "bugs": { - "url": "https://github.com/mafintosh/fwd-stream/issues" - }, - "homepage": "https://github.com/mafintosh/fwd-stream", - "_id": "fwd-stream@1.0.4", - "dist": { - "shasum": "ed281cabed46feecf921ee32dc4c50b372ac7cfa", - "tarball": "https://registry.npmjs.org/fwd-stream/-/fwd-stream-1.0.4.tgz" - }, - "_from": "fwd-stream@>=1.0.4 <2.0.0", - "_npmVersion": "1.4.3", - "_npmUser": { - "name": "mafintosh", - "email": "mathiasbuus@gmail.com" - }, - "maintainers": [ - { - "name": "mafintosh", - "email": "mathiasbuus@gmail.com" - } - ], - "directories": {}, - "_shasum": "ed281cabed46feecf921ee32dc4c50b372ac7cfa", - "_resolved": "https://registry.npmjs.org/fwd-stream/-/fwd-stream-1.0.4.tgz" -} diff --git a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/fwd-stream/test.js b/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/fwd-stream/test.js deleted file mode 100644 index d2e757da..00000000 --- a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/fwd-stream/test.js +++ /dev/null @@ -1,171 +0,0 @@ -var fwd = require('./'); -var tape = require('tape'); -var PassThrough = require('readable-stream/passthrough'); - -tape('fwd.readable', function(t) { - var rs = fwd.readable({objectMode:true}, function(cb) { - process.nextTick(function() { - var pt = new PassThrough({objectMode:true}); - - pt.write('hello'); - pt.write('world'); - pt.end(); - - cb(null, pt); - }); - }); - - var expects = ['hello', 'world']; - - rs.on('data', function(data) { - t.same(data, expects.shift()); - }); - - rs.on('end', function() { - t.same(expects, []); - t.end(); - }); -}); - -tape('fwd.readable and close', function(t) { - var rs = fwd.readable({objectMode:true}, function(cb) { - process.nextTick(function() { - var pt = new PassThrough({objectMode:true}); - - process.nextTick(function() { - pt.write('hello'); - pt.write('world'); - pt.end(); - pt.emit('close'); - }); - - cb(null, pt); - }); - }); - - var expects = ['hello', 'world']; - - rs.on('data', function(data) { - t.same(data, expects.shift()); - }); - - rs.on('close', function() { - t.ok(rs._readableState.ended); - t.same(expects, []); - t.end(); - }); -}); - -tape('fwd.writable', function(t) { - var expects = ['hello', 'world']; - var ws = fwd.writable({objectMode:true}, function(cb) { - process.nextTick(function() { - var pt = new PassThrough({objectMode:true}); - - pt.on('data', function(data) { - t.same(data, expects.shift()); - }); - - pt.on('end', function() { - t.same(expects, []); - t.end(); - }); - - cb(null, pt); - }); - }); - - ws.write('hello'); - ws.write('world'); - ws.end(); -}); - -tape('fwd.writable and just end', function(t) { - var ws = fwd.writable({objectMode:true}, function(cb) { - process.nextTick(function() { - var pt = new PassThrough({objectMode:true}); - - pt.on('finish', function() { - t.ok(true); - t.end(); - }); - - cb(null, pt); - }); - }); - - ws.end(); -}); - -tape('fwd.writable binary', function(t) { - var ws = fwd.writable(function(cb) { - process.nextTick(function() { - var pt = new PassThrough({objectMode:true}); - var buf = []; - - pt.on('data', function(data) { - buf.push(data); - }); - - pt.on('end', function() { - t.same(Buffer.concat(buf), new Buffer('helloworld')); - t.end(); - }); - - cb(null, pt); - }); - }); - - ws.write('hello'); - ws.write('world'); - ws.end(); -}); - -tape('fwd.duplex', function(t) { - t.plan(6); - - var dupl = fwd.duplex({objectMode:true}, - function(cb) { - var expects = ['hello', 'world']; - - process.nextTick(function() { - var pt = new PassThrough({objectMode:true}); - - pt.on('data', function(data) { - t.same(data, expects.shift()); - }); - - pt.on('end', function() { - t.same(expects, []); - }); - - cb(null, pt); - }); - }, - function(cb) { - process.nextTick(function() { - var pt = new PassThrough({objectMode:true}); - - pt.write('guttentag'); - pt.write('welt'); - pt.end(); - - cb(null, pt); - }); - } - ); - - dupl.write('hello'); - dupl.write('world'); - dupl.end(); - - var expects = ['guttentag', 'welt']; - - dupl.on('data', function(data) { - t.same(data, expects.shift()); - }); - - dupl.on('end', function() { - t.same(expects, []); - }); -}); diff --git a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-blobs/.npmignore b/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-blobs/.npmignore deleted file mode 100644 index 3c3629e6..00000000 --- a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-blobs/.npmignore +++ /dev/null @@ -1 +0,0 @@ -node_modules diff --git a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-blobs/.travis.yml b/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-blobs/.travis.yml deleted file mode 100644 index 6e5919de..00000000 --- a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-blobs/.travis.yml +++ /dev/null @@ -1,3 +0,0 @@ -language: node_js -node_js: - - "0.10" diff --git a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-blobs/LICENSE b/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-blobs/LICENSE deleted file mode 100644 index 757562ec..00000000 --- a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-blobs/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2014 Mathias Buus - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. \ No newline at end of file diff --git a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-blobs/README.md b/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-blobs/README.md deleted file mode 100644 index af8e872b..00000000 --- a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-blobs/README.md +++ /dev/null @@ -1,89 +0,0 @@ -# level-blobs - -Save binary blobs in level and stream then back. -Similar to [level-store](https://github.com/juliangruber/level-store) but streams2 and with support for random access writes and reads - - npm install level-blobs - -[![build status](http://img.shields.io/travis/mafintosh/level-filesystem.svg?style=flat)](http://travis-ci.org/mafintosh/level-blobs) -![dat](http://img.shields.io/badge/Development%20sponsored%20by-dat-green.svg?style=flat) - -[![browser support](https://ci.testling.com/mafintosh/level-blobs.png)](https://ci.testling.com/mafintosh/level-blobs) - -## Usage - -``` js -var blobs = require('level-blobs'); -var level = require('level'); - -var db = level('/tmp/my-blobs-db'); -var bl = blobs(db); - -// create a write stream -var ws = blobs.createWriteStream('my-file.txt'); - -ws.on('finish', function() { - // lets read the blob and pipe it to stdout - var rs = blobs.createReadStream('my-file.txt'); - rs.pipe(process.stdout); -}); - -ws.write('hello '); -ws.write('world'); -ws.end(); -``` - -## API - -#### `blobs(db, opts)` - -Create a new blobs instance. Options default to - -``` js -{ - blockSize: 65536, // byte size for each block of data stored - batch: 100 // batch at max 100 blocks when writing -} -``` - -#### `bl.createReadStream(name, opts)` - -Create a read stream for `name`. Options default to - -``` js -{ - start: 0 // start reading from this byte offset - end: Infinity // end at end-of-file or this offset (inclusive) -} -``` - -#### `bl.createWriteStream(name, opts)` - -Create a write stream to `name`. Options default to - -``` js -{ - start: 0 // start writing at this offset - // if append === true start defaults to end-of-file - append: false // set to true if you want to append to the file - // if not true the file will be truncated before writing -} -``` - -#### `bl.read(name, opts, cb)` - -Create a read stream and buffer the stream into a single buffer that is passed to the callback. -Options are passed to `createReadStream`. - -#### `bl.write(name, data, opts, cb)` - -Write `data` to `name` and call the callback when done. -Options are passed to `createWriteStream`. - -#### `bl.remove(name, cb)` - -Remove `name` from the blob store - -## License - -MIT diff --git a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-blobs/index.js b/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-blobs/index.js deleted file mode 100644 index 87777ac1..00000000 --- a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-blobs/index.js +++ /dev/null @@ -1,392 +0,0 @@ -var Writable = require('readable-stream/writable'); -var Readable = require('readable-stream/readable'); -var peek = require('level-peek'); -var util = require('util'); -var once = require('once'); - -var EMPTY = new Buffer(0); -var ENCODER = { - encode: function(data) { - return typeof data === 'string' ? data = new Buffer(data) : data; - }, - decode: function(data) { - return Buffer.isBuffer(data) ? data : new Buffer(data); - }, - buffer: true, - type: 'raw' -}; - -var noop = function() {}; - -var pad = function(n) { - n = n.toString(16); - return '00000000'.slice(0, -n.length)+n; -}; - -var expand = function(buf, len) { - var tmp = new Buffer(len); - buf.copy(tmp); - return tmp; -}; - -module.exports = function(db, opts) { - if (!opts) opts = {}; - - var blobs = {}; - - var blockSize = opts.blockSize || 65536; - var maxBatch = opts.batch || 100; - var blank = new Buffer(blockSize); - - db.put('\x00', 'ignore', noop); // memdown#12 workaround - - var reservations = {}; - var mutateBlock = function(key, offset, block, append, cb) { - var release = function() { - if (!--reservations[key].locks) delete reservations[key]; - }; - - var onreservation = function(r) { - r.locks++; - - if (!r.block && !offset) { - r.block = block; - cb(null, r.block, release); - return; - } - - if (!r.block) r.block = new Buffer(blockSize); - if (r.block.length < offset + block.length) r.block = expand(r.block, offset + block.length); - - block.copy(r.block, offset); - - if (!append && offset + block.length < r.block.length) r.block = r.block.slice(0, offset+block.length); - cb(null, r.block, release); - }; - - if (reservations[key]) return onreservation(reservations[key]); - - db.get(key, {valueEncoding:ENCODER}, function(err, block) { - if (err && !err.notFound) return cb(err); - if (!reservations[key]) reservations[key] = {locks:0, block:block}; - onreservation(reservations[key]); - }); - }; - - var WriteStream = function(name, opts) { - if (!(this instanceof WriteStream)) return new WriteStream(name, opts); - if (!opts) opts = {}; - - this.name = name; - this.blocks = []; - this.batch = []; - this.bytesWritten = 0; - this.truncate = !opts.append; - this.append = opts.append; - - this._shouldInitAppend = this.append && opts.start === undefined; - this._destroyed = false; - this._init(opts.start || 0); - - Writable.call(this); - }; - - util.inherits(WriteStream, Writable); - - WriteStream.prototype._init = function(start) { - this.blockIndex = (start / blockSize) | 0; - this.blockOffset = start - this.blockIndex * blockSize; - this.blockLength = this.blockOffset; - }; - - WriteStream.prototype._flush = function(cb) { - if (!this.batch.length) return cb(); - - var key = this.batch[this.batch.length-1].key; - var batch = this.batch; - this.batch = []; - - if (!this.truncate) return db.batch(batch, cb); - this.truncate = false; - this._truncate(batch, key, cb); - }; - - WriteStream.prototype._truncate = function(batch, key, cb) { - cb = once(cb); - - var dels = []; - var keys = db.createKeyStream({ - start: key, - end: this.name+'\xff\xff' - }); - - keys.on('error', cb); - - keys.on('data', function(key) { - dels.push({type:'del', key:key}); - }); - - keys.on('end', function() { - dels.push.apply(dels, batch); - db.batch(dels, cb); - }); - }; - - WriteStream.prototype._writeBlock = function(cb) { - var block = this.blocks.length === 1 ? this.blocks[0] : Buffer.concat(this.blocks, this.blockLength - this.blockOffset); - var index = this.blockIndex; - var offset = this.blockOffset; - var self = this; - - this.blockOffset = 0; - this.blockLength = 0; - this.blockIndex++; - this.blocks = []; - - var key = this.name+'\xff'+pad(index); - - var append = function(block, force, cb) { - if (block.length) { - self.batch.push({ - type: 'put', - key: key, - value: block, - valueEncoding: ENCODER - }); - } - - if (!force && self.batch.length < maxBatch) return cb(); - return self._flush(cb); - }; - - if (!offset && block.length === blockSize) return append(block, false, cb); - if (!offset && !this.append) return append(block, false, cb); - - // partial write - mutateBlock(key, offset, block, this.append, function(err, block, release) { - if (err) return cb(err); - append(block, true, function(err) { - release(); - cb(err); - }); - }); - }; - - WriteStream.prototype._initAppend = function(data, enc, cb) { - var self = this; - this._shouldInitAppend = false; - blobs.size(this.name, function(err, size) { - if (err) return cb(err); - self._init(size); - self._write(data, enc, cb); - }); - }; - - WriteStream.prototype._write = function(data, enc, cb) { - if (!data.length || this._destroyed) return cb(); - if (this._shouldInitAppend) return this._initAppend(data, enc, cb); - - var self = this; - var overflow; - var free = blockSize - this.blockLength; - - var done = function(err) { - if (err) return cb(err); - if (overflow) return self._write(overflow, enc, cb); - cb(); - }; - - if (data.length > free) { - overflow = data.slice(free); - data = data.slice(0, free); - } - - this.bytesWritten += data.length; - this.blockLength += data.length; - this.blocks.push(data); - - if (data.length < free) return done(); - this._writeBlock(done); - }; - - WriteStream.prototype.destroy = function() { - if (this._destroyed) return; - this._destroyed = true; - process.nextTick(this.emit.bind(this, 'close')); - }; - - WriteStream.prototype.end = function(data) { - var self = this; - var args = arguments; - - if (data && typeof data !== 'function') { - this.write(data); - data = EMPTY; - } - - this.write(EMPTY, function() { - self._writeBlock(function(err) { - if (err) return self.emit('error', err); - self._flush(function(err) { - if (err) return self.emit('error', err); - Writable.prototype.end.apply(self, args); - }); - }); - }); - }; - - var ReadStream = function(name, opts) { - if (!opts) opts = {}; - - var self = this; - - var start = opts.start || 0; - var blockIndex = (start / blockSize) | 0; - var blockOffset = start - blockIndex * blockSize; - var key = name+'\xff'+pad(blockIndex); - - this.name = name; - this._missing = (typeof opts.end === 'number' ? opts.end : Infinity) - start + 1; - this._paused = false; - this._destroyed = false; - - this._reader = db.createReadStream({ - start: key, - end: name+'\xff\xff', - valueEncoding: ENCODER - }); - - var onblock = function(val) { - key = name+'\xff'+pad(++blockIndex); - - if (!self._missing) return false; - - if (blockOffset) { - val = val.slice(blockOffset); - blockOffset = 0; - if (!val.length) return true; - } - - if (val.length > self._missing) val = val.slice(0, self._missing); - - self._missing -= val.length; - self._pause(!self.push(val)); - - return !!self._missing; - }; - - this._reader.on('data', function(data) { - while (data.key > key) { - if (!onblock(blank)) return; - } - - onblock(data.value); - }); - - this._reader.on('error', function(err) { - self.emit('error', err); - }); - - this._reader.on('end', function() { - self.push(null); - }); - - Readable.call(this); - }; - - util.inherits(ReadStream, Readable); - - ReadStream.prototype.destroy = function() { - if (this._destroyed) return; - this._destroyed = true; - this._reader.destroy(); - process.nextTick(this.emit.bind(this, 'close')); - }; - - ReadStream.prototype._pause = function(paused) { - if (this._paused === paused) return; - this._paused = paused; - if (this._paused) this._reader.pause(); - else this._reader.resume(); - }; - - ReadStream.prototype._read = function() { - this._pause(false); - }; - - blobs.remove = function(name, cb) { - cb = once(cb || noop); - - var batch = []; - var keys = db.createKeyStream({ - start: name+'\xff', - end: name+'\xff\xff' - }); - - keys.on('error', cb); - - keys.on('data', function(key) { - batch.push({type:'del', key:key}); - }); - - keys.on('end', function() { - db.batch(batch, cb); - }); - }; - - blobs.size = function(name, cb) { - peek.last(db, { - start: name+'\xff', - end: name+'\xff\xff', - valueEncoding:ENCODER - }, function(err, latest, val) { - if (err && err.message === 'range not found') return cb(null, 0); - if (err) return cb(err); - if (latest.slice(0, name.length+1) !== name+'\xff') return cb(null, 0); - - cb(null, parseInt(latest.toString().slice(name.length+1), 16) * blockSize + val.length); - }); - }; - - blobs.write = function(name, data, opts, cb) { - if (typeof opts === 'function') return blobs.write(name, data, null, opts); - if (!opts) opts = {}; - if (!cb) cb = noop; - - var ws = blobs.createWriteStream(name, opts); - - ws.on('error', cb); - ws.on('finish', function() { - cb(); - }); - - ws.write(data); - ws.end(); - } - - blobs.read = function(name, opts, cb) { - if (typeof opts === 'function') return blobs.read(name, null, opts); - if (!opts) opts = {}; - - var rs = blobs.createReadStream(name, opts); - var list = []; - - rs.on('error', cb); - rs.on('data', function(data) { - list.push(data); - }); - rs.on('end', function() { - cb(null, list.length === 1 ? list[0] : Buffer.concat(list)); - }); - }; - - blobs.createReadStream = function(name, opts) { - return new ReadStream(name, opts); - }; - - blobs.createWriteStream = function(name, opts) { - return new WriteStream(name, opts); - }; - - return blobs; -}; \ No newline at end of file diff --git a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-blobs/node_modules/readable-stream/.npmignore b/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-blobs/node_modules/readable-stream/.npmignore deleted file mode 100644 index 38344f87..00000000 --- a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-blobs/node_modules/readable-stream/.npmignore +++ /dev/null @@ -1,5 +0,0 @@ -build/ -test/ -examples/ -fs.js -zlib.js \ No newline at end of file diff --git a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-blobs/node_modules/readable-stream/LICENSE b/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-blobs/node_modules/readable-stream/LICENSE deleted file mode 100644 index e3d4e695..00000000 --- a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-blobs/node_modules/readable-stream/LICENSE +++ /dev/null @@ -1,18 +0,0 @@ -Copyright Joyent, Inc. and other Node contributors. All rights reserved. -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to -deal in the Software without restriction, including without limitation the -rights to use, copy, modify, merge, publish, distribute, sublicense, and/or -sell copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS -IN THE SOFTWARE. diff --git a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-blobs/node_modules/readable-stream/README.md b/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-blobs/node_modules/readable-stream/README.md deleted file mode 100644 index e46b8239..00000000 --- a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-blobs/node_modules/readable-stream/README.md +++ /dev/null @@ -1,15 +0,0 @@ -# readable-stream - -***Node-core streams for userland*** - -[![NPM](https://nodei.co/npm/readable-stream.png?downloads=true&downloadRank=true)](https://nodei.co/npm/readable-stream/) -[![NPM](https://nodei.co/npm-dl/readable-stream.png&months=6&height=3)](https://nodei.co/npm/readable-stream/) - -This package is a mirror of the Streams2 and Streams3 implementations in Node-core. - -If you want to guarantee a stable streams base, regardless of what version of Node you, or the users of your libraries are using, use **readable-stream** *only* and avoid the *"stream"* module in Node-core. - -**readable-stream** comes in two major versions, v1.0.x and v1.1.x. The former tracks the Streams2 implementation in Node 0.10, including bug-fixes and minor improvements as they are added. The latter tracks Streams3 as it develops in Node 0.11; we will likely see a v1.2.x branch for Node 0.12. - -**readable-stream** uses proper patch-level versioning so if you pin to `"~1.0.0"` you’ll get the latest Node 0.10 Streams2 implementation, including any fixes and minor non-breaking improvements. The patch-level versions of 1.0.x and 1.1.x should mirror the patch-level versions of Node-core releases. You should prefer the **1.0.x** releases for now and when you’re ready to start using Streams3, pin to `"~1.1.0"` - diff --git a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-blobs/node_modules/readable-stream/duplex.js b/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-blobs/node_modules/readable-stream/duplex.js deleted file mode 100644 index ca807af8..00000000 --- a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-blobs/node_modules/readable-stream/duplex.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require("./lib/_stream_duplex.js") diff --git a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-blobs/node_modules/readable-stream/float.patch b/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-blobs/node_modules/readable-stream/float.patch deleted file mode 100644 index b984607a..00000000 --- a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-blobs/node_modules/readable-stream/float.patch +++ /dev/null @@ -1,923 +0,0 @@ -diff --git a/lib/_stream_duplex.js b/lib/_stream_duplex.js -index c5a741c..a2e0d8e 100644 ---- a/lib/_stream_duplex.js -+++ b/lib/_stream_duplex.js -@@ -26,8 +26,8 @@ - - module.exports = Duplex; - var util = require('util'); --var Readable = require('_stream_readable'); --var Writable = require('_stream_writable'); -+var Readable = require('./_stream_readable'); -+var Writable = require('./_stream_writable'); - - util.inherits(Duplex, Readable); - -diff --git a/lib/_stream_passthrough.js b/lib/_stream_passthrough.js -index a5e9864..330c247 100644 ---- a/lib/_stream_passthrough.js -+++ b/lib/_stream_passthrough.js -@@ -25,7 +25,7 @@ - - module.exports = PassThrough; - --var Transform = require('_stream_transform'); -+var Transform = require('./_stream_transform'); - var util = require('util'); - util.inherits(PassThrough, Transform); - -diff --git a/lib/_stream_readable.js b/lib/_stream_readable.js -index 0c3fe3e..90a8298 100644 ---- a/lib/_stream_readable.js -+++ b/lib/_stream_readable.js -@@ -23,10 +23,34 @@ module.exports = Readable; - Readable.ReadableState = ReadableState; - - var EE = require('events').EventEmitter; -+if (!EE.listenerCount) EE.listenerCount = function(emitter, type) { -+ return emitter.listeners(type).length; -+}; -+ -+if (!global.setImmediate) global.setImmediate = function setImmediate(fn) { -+ return setTimeout(fn, 0); -+}; -+if (!global.clearImmediate) global.clearImmediate = function clearImmediate(i) { -+ return clearTimeout(i); -+}; -+ - var Stream = require('stream'); - var util = require('util'); -+if (!util.isUndefined) { -+ var utilIs = require('core-util-is'); -+ for (var f in utilIs) { -+ util[f] = utilIs[f]; -+ } -+} - var StringDecoder; --var debug = util.debuglog('stream'); -+var debug; -+if (util.debuglog) -+ debug = util.debuglog('stream'); -+else try { -+ debug = require('debuglog')('stream'); -+} catch (er) { -+ debug = function() {}; -+} - - util.inherits(Readable, Stream); - -@@ -380,7 +404,7 @@ function chunkInvalid(state, chunk) { - - - function onEofChunk(stream, state) { -- if (state.decoder && !state.ended) { -+ if (state.decoder && !state.ended && state.decoder.end) { - var chunk = state.decoder.end(); - if (chunk && chunk.length) { - state.buffer.push(chunk); -diff --git a/lib/_stream_transform.js b/lib/_stream_transform.js -index b1f9fcc..b0caf57 100644 ---- a/lib/_stream_transform.js -+++ b/lib/_stream_transform.js -@@ -64,8 +64,14 @@ - - module.exports = Transform; - --var Duplex = require('_stream_duplex'); -+var Duplex = require('./_stream_duplex'); - var util = require('util'); -+if (!util.isUndefined) { -+ var utilIs = require('core-util-is'); -+ for (var f in utilIs) { -+ util[f] = utilIs[f]; -+ } -+} - util.inherits(Transform, Duplex); - - -diff --git a/lib/_stream_writable.js b/lib/_stream_writable.js -index ba2e920..f49288b 100644 ---- a/lib/_stream_writable.js -+++ b/lib/_stream_writable.js -@@ -27,6 +27,12 @@ module.exports = Writable; - Writable.WritableState = WritableState; - - var util = require('util'); -+if (!util.isUndefined) { -+ var utilIs = require('core-util-is'); -+ for (var f in utilIs) { -+ util[f] = utilIs[f]; -+ } -+} - var Stream = require('stream'); - - util.inherits(Writable, Stream); -@@ -119,7 +125,7 @@ function WritableState(options, stream) { - function Writable(options) { - // Writable ctor is applied to Duplexes, though they're not - // instanceof Writable, they're instanceof Readable. -- if (!(this instanceof Writable) && !(this instanceof Stream.Duplex)) -+ if (!(this instanceof Writable) && !(this instanceof require('./_stream_duplex'))) - return new Writable(options); - - this._writableState = new WritableState(options, this); -diff --git a/test/simple/test-stream-big-push.js b/test/simple/test-stream-big-push.js -index e3787e4..8cd2127 100644 ---- a/test/simple/test-stream-big-push.js -+++ b/test/simple/test-stream-big-push.js -@@ -21,7 +21,7 @@ - - var common = require('../common'); - var assert = require('assert'); --var stream = require('stream'); -+var stream = require('../../'); - var str = 'asdfasdfasdfasdfasdf'; - - var r = new stream.Readable({ -diff --git a/test/simple/test-stream-end-paused.js b/test/simple/test-stream-end-paused.js -index bb73777..d40efc7 100644 ---- a/test/simple/test-stream-end-paused.js -+++ b/test/simple/test-stream-end-paused.js -@@ -25,7 +25,7 @@ var gotEnd = false; - - // Make sure we don't miss the end event for paused 0-length streams - --var Readable = require('stream').Readable; -+var Readable = require('../../').Readable; - var stream = new Readable(); - var calledRead = false; - stream._read = function() { -diff --git a/test/simple/test-stream-pipe-after-end.js b/test/simple/test-stream-pipe-after-end.js -index b46ee90..0be8366 100644 ---- a/test/simple/test-stream-pipe-after-end.js -+++ b/test/simple/test-stream-pipe-after-end.js -@@ -22,8 +22,8 @@ - var common = require('../common'); - var assert = require('assert'); - --var Readable = require('_stream_readable'); --var Writable = require('_stream_writable'); -+var Readable = require('../../lib/_stream_readable'); -+var Writable = require('../../lib/_stream_writable'); - var util = require('util'); - - util.inherits(TestReadable, Readable); -diff --git a/test/simple/test-stream-pipe-cleanup.js b/test/simple/test-stream-pipe-cleanup.js -deleted file mode 100644 -index f689358..0000000 ---- a/test/simple/test-stream-pipe-cleanup.js -+++ /dev/null -@@ -1,122 +0,0 @@ --// Copyright Joyent, Inc. and other Node contributors. --// --// Permission is hereby granted, free of charge, to any person obtaining a --// copy of this software and associated documentation files (the --// "Software"), to deal in the Software without restriction, including --// without limitation the rights to use, copy, modify, merge, publish, --// distribute, sublicense, and/or sell copies of the Software, and to permit --// persons to whom the Software is furnished to do so, subject to the --// following conditions: --// --// The above copyright notice and this permission notice shall be included --// in all copies or substantial portions of the Software. --// --// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS --// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF --// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN --// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, --// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR --// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE --// USE OR OTHER DEALINGS IN THE SOFTWARE. -- --// This test asserts that Stream.prototype.pipe does not leave listeners --// hanging on the source or dest. -- --var common = require('../common'); --var stream = require('stream'); --var assert = require('assert'); --var util = require('util'); -- --function Writable() { -- this.writable = true; -- this.endCalls = 0; -- stream.Stream.call(this); --} --util.inherits(Writable, stream.Stream); --Writable.prototype.end = function() { -- this.endCalls++; --}; -- --Writable.prototype.destroy = function() { -- this.endCalls++; --}; -- --function Readable() { -- this.readable = true; -- stream.Stream.call(this); --} --util.inherits(Readable, stream.Stream); -- --function Duplex() { -- this.readable = true; -- Writable.call(this); --} --util.inherits(Duplex, Writable); -- --var i = 0; --var limit = 100; -- --var w = new Writable(); -- --var r; -- --for (i = 0; i < limit; i++) { -- r = new Readable(); -- r.pipe(w); -- r.emit('end'); --} --assert.equal(0, r.listeners('end').length); --assert.equal(limit, w.endCalls); -- --w.endCalls = 0; -- --for (i = 0; i < limit; i++) { -- r = new Readable(); -- r.pipe(w); -- r.emit('close'); --} --assert.equal(0, r.listeners('close').length); --assert.equal(limit, w.endCalls); -- --w.endCalls = 0; -- --r = new Readable(); -- --for (i = 0; i < limit; i++) { -- w = new Writable(); -- r.pipe(w); -- w.emit('close'); --} --assert.equal(0, w.listeners('close').length); -- --r = new Readable(); --w = new Writable(); --var d = new Duplex(); --r.pipe(d); // pipeline A --d.pipe(w); // pipeline B --assert.equal(r.listeners('end').length, 2); // A.onend, A.cleanup --assert.equal(r.listeners('close').length, 2); // A.onclose, A.cleanup --assert.equal(d.listeners('end').length, 2); // B.onend, B.cleanup --assert.equal(d.listeners('close').length, 3); // A.cleanup, B.onclose, B.cleanup --assert.equal(w.listeners('end').length, 0); --assert.equal(w.listeners('close').length, 1); // B.cleanup -- --r.emit('end'); --assert.equal(d.endCalls, 1); --assert.equal(w.endCalls, 0); --assert.equal(r.listeners('end').length, 0); --assert.equal(r.listeners('close').length, 0); --assert.equal(d.listeners('end').length, 2); // B.onend, B.cleanup --assert.equal(d.listeners('close').length, 2); // B.onclose, B.cleanup --assert.equal(w.listeners('end').length, 0); --assert.equal(w.listeners('close').length, 1); // B.cleanup -- --d.emit('end'); --assert.equal(d.endCalls, 1); --assert.equal(w.endCalls, 1); --assert.equal(r.listeners('end').length, 0); --assert.equal(r.listeners('close').length, 0); --assert.equal(d.listeners('end').length, 0); --assert.equal(d.listeners('close').length, 0); --assert.equal(w.listeners('end').length, 0); --assert.equal(w.listeners('close').length, 0); -diff --git a/test/simple/test-stream-pipe-error-handling.js b/test/simple/test-stream-pipe-error-handling.js -index c5d724b..c7d6b7d 100644 ---- a/test/simple/test-stream-pipe-error-handling.js -+++ b/test/simple/test-stream-pipe-error-handling.js -@@ -21,7 +21,7 @@ - - var common = require('../common'); - var assert = require('assert'); --var Stream = require('stream').Stream; -+var Stream = require('../../').Stream; - - (function testErrorListenerCatches() { - var source = new Stream(); -diff --git a/test/simple/test-stream-pipe-event.js b/test/simple/test-stream-pipe-event.js -index cb9d5fe..56f8d61 100644 ---- a/test/simple/test-stream-pipe-event.js -+++ b/test/simple/test-stream-pipe-event.js -@@ -20,7 +20,7 @@ - // USE OR OTHER DEALINGS IN THE SOFTWARE. - - var common = require('../common'); --var stream = require('stream'); -+var stream = require('../../'); - var assert = require('assert'); - var util = require('util'); - -diff --git a/test/simple/test-stream-push-order.js b/test/simple/test-stream-push-order.js -index f2e6ec2..a5c9bf9 100644 ---- a/test/simple/test-stream-push-order.js -+++ b/test/simple/test-stream-push-order.js -@@ -20,7 +20,7 @@ - // USE OR OTHER DEALINGS IN THE SOFTWARE. - - var common = require('../common.js'); --var Readable = require('stream').Readable; -+var Readable = require('../../').Readable; - var assert = require('assert'); - - var s = new Readable({ -diff --git a/test/simple/test-stream-push-strings.js b/test/simple/test-stream-push-strings.js -index 06f43dc..1701a9a 100644 ---- a/test/simple/test-stream-push-strings.js -+++ b/test/simple/test-stream-push-strings.js -@@ -22,7 +22,7 @@ - var common = require('../common'); - var assert = require('assert'); - --var Readable = require('stream').Readable; -+var Readable = require('../../').Readable; - var util = require('util'); - - util.inherits(MyStream, Readable); -diff --git a/test/simple/test-stream-readable-event.js b/test/simple/test-stream-readable-event.js -index ba6a577..a8e6f7b 100644 ---- a/test/simple/test-stream-readable-event.js -+++ b/test/simple/test-stream-readable-event.js -@@ -22,7 +22,7 @@ - var common = require('../common'); - var assert = require('assert'); - --var Readable = require('stream').Readable; -+var Readable = require('../../').Readable; - - (function first() { - // First test, not reading when the readable is added. -diff --git a/test/simple/test-stream-readable-flow-recursion.js b/test/simple/test-stream-readable-flow-recursion.js -index 2891ad6..11689ba 100644 ---- a/test/simple/test-stream-readable-flow-recursion.js -+++ b/test/simple/test-stream-readable-flow-recursion.js -@@ -27,7 +27,7 @@ var assert = require('assert'); - // more data continuously, but without triggering a nextTick - // warning or RangeError. - --var Readable = require('stream').Readable; -+var Readable = require('../../').Readable; - - // throw an error if we trigger a nextTick warning. - process.throwDeprecation = true; -diff --git a/test/simple/test-stream-unshift-empty-chunk.js b/test/simple/test-stream-unshift-empty-chunk.js -index 0c96476..7827538 100644 ---- a/test/simple/test-stream-unshift-empty-chunk.js -+++ b/test/simple/test-stream-unshift-empty-chunk.js -@@ -24,7 +24,7 @@ var assert = require('assert'); - - // This test verifies that stream.unshift(Buffer(0)) or - // stream.unshift('') does not set state.reading=false. --var Readable = require('stream').Readable; -+var Readable = require('../../').Readable; - - var r = new Readable(); - var nChunks = 10; -diff --git a/test/simple/test-stream-unshift-read-race.js b/test/simple/test-stream-unshift-read-race.js -index 83fd9fa..17c18aa 100644 ---- a/test/simple/test-stream-unshift-read-race.js -+++ b/test/simple/test-stream-unshift-read-race.js -@@ -29,7 +29,7 @@ var assert = require('assert'); - // 3. push() after the EOF signaling null is an error. - // 4. _read() is not called after pushing the EOF null chunk. - --var stream = require('stream'); -+var stream = require('../../'); - var hwm = 10; - var r = stream.Readable({ highWaterMark: hwm }); - var chunks = 10; -@@ -51,7 +51,14 @@ r._read = function(n) { - - function push(fast) { - assert(!pushedNull, 'push() after null push'); -- var c = pos >= data.length ? null : data.slice(pos, pos + n); -+ var c; -+ if (pos >= data.length) -+ c = null; -+ else { -+ if (n + pos > data.length) -+ n = data.length - pos; -+ c = data.slice(pos, pos + n); -+ } - pushedNull = c === null; - if (fast) { - pos += n; -diff --git a/test/simple/test-stream-writev.js b/test/simple/test-stream-writev.js -index 5b49e6e..b5321f3 100644 ---- a/test/simple/test-stream-writev.js -+++ b/test/simple/test-stream-writev.js -@@ -22,7 +22,7 @@ - var common = require('../common'); - var assert = require('assert'); - --var stream = require('stream'); -+var stream = require('../../'); - - var queue = []; - for (var decode = 0; decode < 2; decode++) { -diff --git a/test/simple/test-stream2-basic.js b/test/simple/test-stream2-basic.js -index 3814bf0..248c1be 100644 ---- a/test/simple/test-stream2-basic.js -+++ b/test/simple/test-stream2-basic.js -@@ -21,7 +21,7 @@ - - - var common = require('../common.js'); --var R = require('_stream_readable'); -+var R = require('../../lib/_stream_readable'); - var assert = require('assert'); - - var util = require('util'); -diff --git a/test/simple/test-stream2-compatibility.js b/test/simple/test-stream2-compatibility.js -index 6cdd4e9..f0fa84b 100644 ---- a/test/simple/test-stream2-compatibility.js -+++ b/test/simple/test-stream2-compatibility.js -@@ -21,7 +21,7 @@ - - - var common = require('../common.js'); --var R = require('_stream_readable'); -+var R = require('../../lib/_stream_readable'); - var assert = require('assert'); - - var util = require('util'); -diff --git a/test/simple/test-stream2-finish-pipe.js b/test/simple/test-stream2-finish-pipe.js -index 39b274f..006a19b 100644 ---- a/test/simple/test-stream2-finish-pipe.js -+++ b/test/simple/test-stream2-finish-pipe.js -@@ -20,7 +20,7 @@ - // USE OR OTHER DEALINGS IN THE SOFTWARE. - - var common = require('../common.js'); --var stream = require('stream'); -+var stream = require('../../'); - var Buffer = require('buffer').Buffer; - - var r = new stream.Readable(); -diff --git a/test/simple/test-stream2-fs.js b/test/simple/test-stream2-fs.js -deleted file mode 100644 -index e162406..0000000 ---- a/test/simple/test-stream2-fs.js -+++ /dev/null -@@ -1,72 +0,0 @@ --// Copyright Joyent, Inc. and other Node contributors. --// --// Permission is hereby granted, free of charge, to any person obtaining a --// copy of this software and associated documentation files (the --// "Software"), to deal in the Software without restriction, including --// without limitation the rights to use, copy, modify, merge, publish, --// distribute, sublicense, and/or sell copies of the Software, and to permit --// persons to whom the Software is furnished to do so, subject to the --// following conditions: --// --// The above copyright notice and this permission notice shall be included --// in all copies or substantial portions of the Software. --// --// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS --// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF --// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN --// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, --// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR --// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE --// USE OR OTHER DEALINGS IN THE SOFTWARE. -- -- --var common = require('../common.js'); --var R = require('_stream_readable'); --var assert = require('assert'); -- --var fs = require('fs'); --var FSReadable = fs.ReadStream; -- --var path = require('path'); --var file = path.resolve(common.fixturesDir, 'x1024.txt'); -- --var size = fs.statSync(file).size; -- --var expectLengths = [1024]; -- --var util = require('util'); --var Stream = require('stream'); -- --util.inherits(TestWriter, Stream); -- --function TestWriter() { -- Stream.apply(this); -- this.buffer = []; -- this.length = 0; --} -- --TestWriter.prototype.write = function(c) { -- this.buffer.push(c.toString()); -- this.length += c.length; -- return true; --}; -- --TestWriter.prototype.end = function(c) { -- if (c) this.buffer.push(c.toString()); -- this.emit('results', this.buffer); --} -- --var r = new FSReadable(file); --var w = new TestWriter(); -- --w.on('results', function(res) { -- console.error(res, w.length); -- assert.equal(w.length, size); -- var l = 0; -- assert.deepEqual(res.map(function (c) { -- return c.length; -- }), expectLengths); -- console.log('ok'); --}); -- --r.pipe(w); -diff --git a/test/simple/test-stream2-httpclient-response-end.js b/test/simple/test-stream2-httpclient-response-end.js -deleted file mode 100644 -index 15cffc2..0000000 ---- a/test/simple/test-stream2-httpclient-response-end.js -+++ /dev/null -@@ -1,52 +0,0 @@ --// Copyright Joyent, Inc. and other Node contributors. --// --// Permission is hereby granted, free of charge, to any person obtaining a --// copy of this software and associated documentation files (the --// "Software"), to deal in the Software without restriction, including --// without limitation the rights to use, copy, modify, merge, publish, --// distribute, sublicense, and/or sell copies of the Software, and to permit --// persons to whom the Software is furnished to do so, subject to the --// following conditions: --// --// The above copyright notice and this permission notice shall be included --// in all copies or substantial portions of the Software. --// --// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS --// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF --// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN --// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, --// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR --// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE --// USE OR OTHER DEALINGS IN THE SOFTWARE. -- --var common = require('../common.js'); --var assert = require('assert'); --var http = require('http'); --var msg = 'Hello'; --var readable_event = false; --var end_event = false; --var server = http.createServer(function(req, res) { -- res.writeHead(200, {'Content-Type': 'text/plain'}); -- res.end(msg); --}).listen(common.PORT, function() { -- http.get({port: common.PORT}, function(res) { -- var data = ''; -- res.on('readable', function() { -- console.log('readable event'); -- readable_event = true; -- data += res.read(); -- }); -- res.on('end', function() { -- console.log('end event'); -- end_event = true; -- assert.strictEqual(msg, data); -- server.close(); -- }); -- }); --}); -- --process.on('exit', function() { -- assert(readable_event); -- assert(end_event); --}); -- -diff --git a/test/simple/test-stream2-large-read-stall.js b/test/simple/test-stream2-large-read-stall.js -index 2fbfbca..667985b 100644 ---- a/test/simple/test-stream2-large-read-stall.js -+++ b/test/simple/test-stream2-large-read-stall.js -@@ -30,7 +30,7 @@ var PUSHSIZE = 20; - var PUSHCOUNT = 1000; - var HWM = 50; - --var Readable = require('stream').Readable; -+var Readable = require('../../').Readable; - var r = new Readable({ - highWaterMark: HWM - }); -@@ -39,23 +39,23 @@ var rs = r._readableState; - r._read = push; - - r.on('readable', function() { -- console.error('>> readable'); -+ //console.error('>> readable'); - do { -- console.error(' > read(%d)', READSIZE); -+ //console.error(' > read(%d)', READSIZE); - var ret = r.read(READSIZE); -- console.error(' < %j (%d remain)', ret && ret.length, rs.length); -+ //console.error(' < %j (%d remain)', ret && ret.length, rs.length); - } while (ret && ret.length === READSIZE); - -- console.error('<< after read()', -- ret && ret.length, -- rs.needReadable, -- rs.length); -+ //console.error('<< after read()', -+ // ret && ret.length, -+ // rs.needReadable, -+ // rs.length); - }); - - var endEmitted = false; - r.on('end', function() { - endEmitted = true; -- console.error('end'); -+ //console.error('end'); - }); - - var pushes = 0; -@@ -64,11 +64,11 @@ function push() { - return; - - if (pushes++ === PUSHCOUNT) { -- console.error(' push(EOF)'); -+ //console.error(' push(EOF)'); - return r.push(null); - } - -- console.error(' push #%d', pushes); -+ //console.error(' push #%d', pushes); - if (r.push(new Buffer(PUSHSIZE))) - setTimeout(push); - } -diff --git a/test/simple/test-stream2-objects.js b/test/simple/test-stream2-objects.js -index 3e6931d..ff47d89 100644 ---- a/test/simple/test-stream2-objects.js -+++ b/test/simple/test-stream2-objects.js -@@ -21,8 +21,8 @@ - - - var common = require('../common.js'); --var Readable = require('_stream_readable'); --var Writable = require('_stream_writable'); -+var Readable = require('../../lib/_stream_readable'); -+var Writable = require('../../lib/_stream_writable'); - var assert = require('assert'); - - // tiny node-tap lookalike. -diff --git a/test/simple/test-stream2-pipe-error-handling.js b/test/simple/test-stream2-pipe-error-handling.js -index cf7531c..e3f3e4e 100644 ---- a/test/simple/test-stream2-pipe-error-handling.js -+++ b/test/simple/test-stream2-pipe-error-handling.js -@@ -21,7 +21,7 @@ - - var common = require('../common'); - var assert = require('assert'); --var stream = require('stream'); -+var stream = require('../../'); - - (function testErrorListenerCatches() { - var count = 1000; -diff --git a/test/simple/test-stream2-pipe-error-once-listener.js b/test/simple/test-stream2-pipe-error-once-listener.js -index 5e8e3cb..53b2616 100755 ---- a/test/simple/test-stream2-pipe-error-once-listener.js -+++ b/test/simple/test-stream2-pipe-error-once-listener.js -@@ -24,7 +24,7 @@ var common = require('../common.js'); - var assert = require('assert'); - - var util = require('util'); --var stream = require('stream'); -+var stream = require('../../'); - - - var Read = function() { -diff --git a/test/simple/test-stream2-push.js b/test/simple/test-stream2-push.js -index b63edc3..eb2b0e9 100644 ---- a/test/simple/test-stream2-push.js -+++ b/test/simple/test-stream2-push.js -@@ -20,7 +20,7 @@ - // USE OR OTHER DEALINGS IN THE SOFTWARE. - - var common = require('../common.js'); --var stream = require('stream'); -+var stream = require('../../'); - var Readable = stream.Readable; - var Writable = stream.Writable; - var assert = require('assert'); -diff --git a/test/simple/test-stream2-read-sync-stack.js b/test/simple/test-stream2-read-sync-stack.js -index e8a7305..9740a47 100644 ---- a/test/simple/test-stream2-read-sync-stack.js -+++ b/test/simple/test-stream2-read-sync-stack.js -@@ -21,7 +21,7 @@ - - var common = require('../common'); - var assert = require('assert'); --var Readable = require('stream').Readable; -+var Readable = require('../../').Readable; - var r = new Readable(); - var N = 256 * 1024; - -diff --git a/test/simple/test-stream2-readable-empty-buffer-no-eof.js b/test/simple/test-stream2-readable-empty-buffer-no-eof.js -index cd30178..4b1659d 100644 ---- a/test/simple/test-stream2-readable-empty-buffer-no-eof.js -+++ b/test/simple/test-stream2-readable-empty-buffer-no-eof.js -@@ -22,10 +22,9 @@ - var common = require('../common'); - var assert = require('assert'); - --var Readable = require('stream').Readable; -+var Readable = require('../../').Readable; - - test1(); --test2(); - - function test1() { - var r = new Readable(); -@@ -88,31 +87,3 @@ function test1() { - console.log('ok'); - }); - } -- --function test2() { -- var r = new Readable({ encoding: 'base64' }); -- var reads = 5; -- r._read = function(n) { -- if (!reads--) -- return r.push(null); // EOF -- else -- return r.push(new Buffer('x')); -- }; -- -- var results = []; -- function flow() { -- var chunk; -- while (null !== (chunk = r.read())) -- results.push(chunk + ''); -- } -- r.on('readable', flow); -- r.on('end', function() { -- results.push('EOF'); -- }); -- flow(); -- -- process.on('exit', function() { -- assert.deepEqual(results, [ 'eHh4', 'eHg=', 'EOF' ]); -- console.log('ok'); -- }); --} -diff --git a/test/simple/test-stream2-readable-from-list.js b/test/simple/test-stream2-readable-from-list.js -index 7c96ffe..04a96f5 100644 ---- a/test/simple/test-stream2-readable-from-list.js -+++ b/test/simple/test-stream2-readable-from-list.js -@@ -21,7 +21,7 @@ - - var assert = require('assert'); - var common = require('../common.js'); --var fromList = require('_stream_readable')._fromList; -+var fromList = require('../../lib/_stream_readable')._fromList; - - // tiny node-tap lookalike. - var tests = []; -diff --git a/test/simple/test-stream2-readable-legacy-drain.js b/test/simple/test-stream2-readable-legacy-drain.js -index 675da8e..51fd3d5 100644 ---- a/test/simple/test-stream2-readable-legacy-drain.js -+++ b/test/simple/test-stream2-readable-legacy-drain.js -@@ -22,7 +22,7 @@ - var common = require('../common'); - var assert = require('assert'); - --var Stream = require('stream'); -+var Stream = require('../../'); - var Readable = Stream.Readable; - - var r = new Readable(); -diff --git a/test/simple/test-stream2-readable-non-empty-end.js b/test/simple/test-stream2-readable-non-empty-end.js -index 7314ae7..c971898 100644 ---- a/test/simple/test-stream2-readable-non-empty-end.js -+++ b/test/simple/test-stream2-readable-non-empty-end.js -@@ -21,7 +21,7 @@ - - var assert = require('assert'); - var common = require('../common.js'); --var Readable = require('_stream_readable'); -+var Readable = require('../../lib/_stream_readable'); - - var len = 0; - var chunks = new Array(10); -diff --git a/test/simple/test-stream2-readable-wrap-empty.js b/test/simple/test-stream2-readable-wrap-empty.js -index 2e5cf25..fd8a3dc 100644 ---- a/test/simple/test-stream2-readable-wrap-empty.js -+++ b/test/simple/test-stream2-readable-wrap-empty.js -@@ -22,7 +22,7 @@ - var common = require('../common'); - var assert = require('assert'); - --var Readable = require('_stream_readable'); -+var Readable = require('../../lib/_stream_readable'); - var EE = require('events').EventEmitter; - - var oldStream = new EE(); -diff --git a/test/simple/test-stream2-readable-wrap.js b/test/simple/test-stream2-readable-wrap.js -index 90eea01..6b177f7 100644 ---- a/test/simple/test-stream2-readable-wrap.js -+++ b/test/simple/test-stream2-readable-wrap.js -@@ -22,8 +22,8 @@ - var common = require('../common'); - var assert = require('assert'); - --var Readable = require('_stream_readable'); --var Writable = require('_stream_writable'); -+var Readable = require('../../lib/_stream_readable'); -+var Writable = require('../../lib/_stream_writable'); - var EE = require('events').EventEmitter; - - var testRuns = 0, completedRuns = 0; -diff --git a/test/simple/test-stream2-set-encoding.js b/test/simple/test-stream2-set-encoding.js -index 5d2c32a..685531b 100644 ---- a/test/simple/test-stream2-set-encoding.js -+++ b/test/simple/test-stream2-set-encoding.js -@@ -22,7 +22,7 @@ - - var common = require('../common.js'); - var assert = require('assert'); --var R = require('_stream_readable'); -+var R = require('../../lib/_stream_readable'); - var util = require('util'); - - // tiny node-tap lookalike. -diff --git a/test/simple/test-stream2-transform.js b/test/simple/test-stream2-transform.js -index 9c9ddd8..a0cacc6 100644 ---- a/test/simple/test-stream2-transform.js -+++ b/test/simple/test-stream2-transform.js -@@ -21,8 +21,8 @@ - - var assert = require('assert'); - var common = require('../common.js'); --var PassThrough = require('_stream_passthrough'); --var Transform = require('_stream_transform'); -+var PassThrough = require('../../').PassThrough; -+var Transform = require('../../').Transform; - - // tiny node-tap lookalike. - var tests = []; -diff --git a/test/simple/test-stream2-unpipe-drain.js b/test/simple/test-stream2-unpipe-drain.js -index d66dc3c..365b327 100644 ---- a/test/simple/test-stream2-unpipe-drain.js -+++ b/test/simple/test-stream2-unpipe-drain.js -@@ -22,7 +22,7 @@ - - var common = require('../common.js'); - var assert = require('assert'); --var stream = require('stream'); -+var stream = require('../../'); - var crypto = require('crypto'); - - var util = require('util'); -diff --git a/test/simple/test-stream2-unpipe-leak.js b/test/simple/test-stream2-unpipe-leak.js -index 99f8746..17c92ae 100644 ---- a/test/simple/test-stream2-unpipe-leak.js -+++ b/test/simple/test-stream2-unpipe-leak.js -@@ -22,7 +22,7 @@ - - var common = require('../common.js'); - var assert = require('assert'); --var stream = require('stream'); -+var stream = require('../../'); - - var chunk = new Buffer('hallo'); - -diff --git a/test/simple/test-stream2-writable.js b/test/simple/test-stream2-writable.js -index 704100c..209c3a6 100644 ---- a/test/simple/test-stream2-writable.js -+++ b/test/simple/test-stream2-writable.js -@@ -20,8 +20,8 @@ - // USE OR OTHER DEALINGS IN THE SOFTWARE. - - var common = require('../common.js'); --var W = require('_stream_writable'); --var D = require('_stream_duplex'); -+var W = require('../../').Writable; -+var D = require('../../').Duplex; - var assert = require('assert'); - - var util = require('util'); -diff --git a/test/simple/test-stream3-pause-then-read.js b/test/simple/test-stream3-pause-then-read.js -index b91bde3..2f72c15 100644 ---- a/test/simple/test-stream3-pause-then-read.js -+++ b/test/simple/test-stream3-pause-then-read.js -@@ -22,7 +22,7 @@ - var common = require('../common'); - var assert = require('assert'); - --var stream = require('stream'); -+var stream = require('../../'); - var Readable = stream.Readable; - var Writable = stream.Writable; - diff --git a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-blobs/node_modules/readable-stream/lib/_stream_duplex.js b/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-blobs/node_modules/readable-stream/lib/_stream_duplex.js deleted file mode 100644 index b513d61a..00000000 --- a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-blobs/node_modules/readable-stream/lib/_stream_duplex.js +++ /dev/null @@ -1,89 +0,0 @@ -// Copyright Joyent, Inc. and other Node contributors. -// -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to permit -// persons to whom the Software is furnished to do so, subject to the -// following conditions: -// -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -// USE OR OTHER DEALINGS IN THE SOFTWARE. - -// a duplex stream is just a stream that is both readable and writable. -// Since JS doesn't have multiple prototypal inheritance, this class -// prototypally inherits from Readable, and then parasitically from -// Writable. - -module.exports = Duplex; - -/**/ -var objectKeys = Object.keys || function (obj) { - var keys = []; - for (var key in obj) keys.push(key); - return keys; -} -/**/ - - -/**/ -var util = require('core-util-is'); -util.inherits = require('inherits'); -/**/ - -var Readable = require('./_stream_readable'); -var Writable = require('./_stream_writable'); - -util.inherits(Duplex, Readable); - -forEach(objectKeys(Writable.prototype), function(method) { - if (!Duplex.prototype[method]) - Duplex.prototype[method] = Writable.prototype[method]; -}); - -function Duplex(options) { - if (!(this instanceof Duplex)) - return new Duplex(options); - - Readable.call(this, options); - Writable.call(this, options); - - if (options && options.readable === false) - this.readable = false; - - if (options && options.writable === false) - this.writable = false; - - this.allowHalfOpen = true; - if (options && options.allowHalfOpen === false) - this.allowHalfOpen = false; - - this.once('end', onend); -} - -// the no-half-open enforcer -function onend() { - // if we allow half-open state, or if the writable side ended, - // then we're ok. - if (this.allowHalfOpen || this._writableState.ended) - return; - - // no more data can be written. - // But allow more writes to happen in this tick. - process.nextTick(this.end.bind(this)); -} - -function forEach (xs, f) { - for (var i = 0, l = xs.length; i < l; i++) { - f(xs[i], i); - } -} diff --git a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-blobs/node_modules/readable-stream/lib/_stream_passthrough.js b/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-blobs/node_modules/readable-stream/lib/_stream_passthrough.js deleted file mode 100644 index 895ca50a..00000000 --- a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-blobs/node_modules/readable-stream/lib/_stream_passthrough.js +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright Joyent, Inc. and other Node contributors. -// -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to permit -// persons to whom the Software is furnished to do so, subject to the -// following conditions: -// -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -// USE OR OTHER DEALINGS IN THE SOFTWARE. - -// a passthrough stream. -// basically just the most minimal sort of Transform stream. -// Every written chunk gets output as-is. - -module.exports = PassThrough; - -var Transform = require('./_stream_transform'); - -/**/ -var util = require('core-util-is'); -util.inherits = require('inherits'); -/**/ - -util.inherits(PassThrough, Transform); - -function PassThrough(options) { - if (!(this instanceof PassThrough)) - return new PassThrough(options); - - Transform.call(this, options); -} - -PassThrough.prototype._transform = function(chunk, encoding, cb) { - cb(null, chunk); -}; diff --git a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-blobs/node_modules/readable-stream/lib/_stream_readable.js b/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-blobs/node_modules/readable-stream/lib/_stream_readable.js deleted file mode 100644 index 19ab3588..00000000 --- a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-blobs/node_modules/readable-stream/lib/_stream_readable.js +++ /dev/null @@ -1,951 +0,0 @@ -// Copyright Joyent, Inc. and other Node contributors. -// -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to permit -// persons to whom the Software is furnished to do so, subject to the -// following conditions: -// -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -// USE OR OTHER DEALINGS IN THE SOFTWARE. - -module.exports = Readable; - -/**/ -var isArray = require('isarray'); -/**/ - - -/**/ -var Buffer = require('buffer').Buffer; -/**/ - -Readable.ReadableState = ReadableState; - -var EE = require('events').EventEmitter; - -/**/ -if (!EE.listenerCount) EE.listenerCount = function(emitter, type) { - return emitter.listeners(type).length; -}; -/**/ - -var Stream = require('stream'); - -/**/ -var util = require('core-util-is'); -util.inherits = require('inherits'); -/**/ - -var StringDecoder; - - -/**/ -var debug = require('util'); -if (debug && debug.debuglog) { - debug = debug.debuglog('stream'); -} else { - debug = function () {}; -} -/**/ - - -util.inherits(Readable, Stream); - -function ReadableState(options, stream) { - var Duplex = require('./_stream_duplex'); - - options = options || {}; - - // the point at which it stops calling _read() to fill the buffer - // Note: 0 is a valid value, means "don't call _read preemptively ever" - var hwm = options.highWaterMark; - var defaultHwm = options.objectMode ? 16 : 16 * 1024; - this.highWaterMark = (hwm || hwm === 0) ? hwm : defaultHwm; - - // cast to ints. - this.highWaterMark = ~~this.highWaterMark; - - this.buffer = []; - this.length = 0; - this.pipes = null; - this.pipesCount = 0; - this.flowing = null; - this.ended = false; - this.endEmitted = false; - this.reading = false; - - // a flag to be able to tell if the onwrite cb is called immediately, - // or on a later tick. We set this to true at first, because any - // actions that shouldn't happen until "later" should generally also - // not happen before the first write call. - this.sync = true; - - // whenever we return null, then we set a flag to say - // that we're awaiting a 'readable' event emission. - this.needReadable = false; - this.emittedReadable = false; - this.readableListening = false; - - - // object stream flag. Used to make read(n) ignore n and to - // make all the buffer merging and length checks go away - this.objectMode = !!options.objectMode; - - if (stream instanceof Duplex) - this.objectMode = this.objectMode || !!options.readableObjectMode; - - // Crypto is kind of old and crusty. Historically, its default string - // encoding is 'binary' so we have to make this configurable. - // Everything else in the universe uses 'utf8', though. - this.defaultEncoding = options.defaultEncoding || 'utf8'; - - // when piping, we only care about 'readable' events that happen - // after read()ing all the bytes and not getting any pushback. - this.ranOut = false; - - // the number of writers that are awaiting a drain event in .pipe()s - this.awaitDrain = 0; - - // if true, a maybeReadMore has been scheduled - this.readingMore = false; - - this.decoder = null; - this.encoding = null; - if (options.encoding) { - if (!StringDecoder) - StringDecoder = require('string_decoder/').StringDecoder; - this.decoder = new StringDecoder(options.encoding); - this.encoding = options.encoding; - } -} - -function Readable(options) { - var Duplex = require('./_stream_duplex'); - - if (!(this instanceof Readable)) - return new Readable(options); - - this._readableState = new ReadableState(options, this); - - // legacy - this.readable = true; - - Stream.call(this); -} - -// Manually shove something into the read() buffer. -// This returns true if the highWaterMark has not been hit yet, -// similar to how Writable.write() returns true if you should -// write() some more. -Readable.prototype.push = function(chunk, encoding) { - var state = this._readableState; - - if (util.isString(chunk) && !state.objectMode) { - encoding = encoding || state.defaultEncoding; - if (encoding !== state.encoding) { - chunk = new Buffer(chunk, encoding); - encoding = ''; - } - } - - return readableAddChunk(this, state, chunk, encoding, false); -}; - -// Unshift should *always* be something directly out of read() -Readable.prototype.unshift = function(chunk) { - var state = this._readableState; - return readableAddChunk(this, state, chunk, '', true); -}; - -function readableAddChunk(stream, state, chunk, encoding, addToFront) { - var er = chunkInvalid(state, chunk); - if (er) { - stream.emit('error', er); - } else if (util.isNullOrUndefined(chunk)) { - state.reading = false; - if (!state.ended) - onEofChunk(stream, state); - } else if (state.objectMode || chunk && chunk.length > 0) { - if (state.ended && !addToFront) { - var e = new Error('stream.push() after EOF'); - stream.emit('error', e); - } else if (state.endEmitted && addToFront) { - var e = new Error('stream.unshift() after end event'); - stream.emit('error', e); - } else { - if (state.decoder && !addToFront && !encoding) - chunk = state.decoder.write(chunk); - - if (!addToFront) - state.reading = false; - - // if we want the data now, just emit it. - if (state.flowing && state.length === 0 && !state.sync) { - stream.emit('data', chunk); - stream.read(0); - } else { - // update the buffer info. - state.length += state.objectMode ? 1 : chunk.length; - if (addToFront) - state.buffer.unshift(chunk); - else - state.buffer.push(chunk); - - if (state.needReadable) - emitReadable(stream); - } - - maybeReadMore(stream, state); - } - } else if (!addToFront) { - state.reading = false; - } - - return needMoreData(state); -} - - - -// if it's past the high water mark, we can push in some more. -// Also, if we have no data yet, we can stand some -// more bytes. This is to work around cases where hwm=0, -// such as the repl. Also, if the push() triggered a -// readable event, and the user called read(largeNumber) such that -// needReadable was set, then we ought to push more, so that another -// 'readable' event will be triggered. -function needMoreData(state) { - return !state.ended && - (state.needReadable || - state.length < state.highWaterMark || - state.length === 0); -} - -// backwards compatibility. -Readable.prototype.setEncoding = function(enc) { - if (!StringDecoder) - StringDecoder = require('string_decoder/').StringDecoder; - this._readableState.decoder = new StringDecoder(enc); - this._readableState.encoding = enc; - return this; -}; - -// Don't raise the hwm > 128MB -var MAX_HWM = 0x800000; -function roundUpToNextPowerOf2(n) { - if (n >= MAX_HWM) { - n = MAX_HWM; - } else { - // Get the next highest power of 2 - n--; - for (var p = 1; p < 32; p <<= 1) n |= n >> p; - n++; - } - return n; -} - -function howMuchToRead(n, state) { - if (state.length === 0 && state.ended) - return 0; - - if (state.objectMode) - return n === 0 ? 0 : 1; - - if (isNaN(n) || util.isNull(n)) { - // only flow one buffer at a time - if (state.flowing && state.buffer.length) - return state.buffer[0].length; - else - return state.length; - } - - if (n <= 0) - return 0; - - // If we're asking for more than the target buffer level, - // then raise the water mark. Bump up to the next highest - // power of 2, to prevent increasing it excessively in tiny - // amounts. - if (n > state.highWaterMark) - state.highWaterMark = roundUpToNextPowerOf2(n); - - // don't have that much. return null, unless we've ended. - if (n > state.length) { - if (!state.ended) { - state.needReadable = true; - return 0; - } else - return state.length; - } - - return n; -} - -// you can override either this method, or the async _read(n) below. -Readable.prototype.read = function(n) { - debug('read', n); - var state = this._readableState; - var nOrig = n; - - if (!util.isNumber(n) || n > 0) - state.emittedReadable = false; - - // if we're doing read(0) to trigger a readable event, but we - // already have a bunch of data in the buffer, then just trigger - // the 'readable' event and move on. - if (n === 0 && - state.needReadable && - (state.length >= state.highWaterMark || state.ended)) { - debug('read: emitReadable', state.length, state.ended); - if (state.length === 0 && state.ended) - endReadable(this); - else - emitReadable(this); - return null; - } - - n = howMuchToRead(n, state); - - // if we've ended, and we're now clear, then finish it up. - if (n === 0 && state.ended) { - if (state.length === 0) - endReadable(this); - return null; - } - - // All the actual chunk generation logic needs to be - // *below* the call to _read. The reason is that in certain - // synthetic stream cases, such as passthrough streams, _read - // may be a completely synchronous operation which may change - // the state of the read buffer, providing enough data when - // before there was *not* enough. - // - // So, the steps are: - // 1. Figure out what the state of things will be after we do - // a read from the buffer. - // - // 2. If that resulting state will trigger a _read, then call _read. - // Note that this may be asynchronous, or synchronous. Yes, it is - // deeply ugly to write APIs this way, but that still doesn't mean - // that the Readable class should behave improperly, as streams are - // designed to be sync/async agnostic. - // Take note if the _read call is sync or async (ie, if the read call - // has returned yet), so that we know whether or not it's safe to emit - // 'readable' etc. - // - // 3. Actually pull the requested chunks out of the buffer and return. - - // if we need a readable event, then we need to do some reading. - var doRead = state.needReadable; - debug('need readable', doRead); - - // if we currently have less than the highWaterMark, then also read some - if (state.length === 0 || state.length - n < state.highWaterMark) { - doRead = true; - debug('length less than watermark', doRead); - } - - // however, if we've ended, then there's no point, and if we're already - // reading, then it's unnecessary. - if (state.ended || state.reading) { - doRead = false; - debug('reading or ended', doRead); - } - - if (doRead) { - debug('do read'); - state.reading = true; - state.sync = true; - // if the length is currently zero, then we *need* a readable event. - if (state.length === 0) - state.needReadable = true; - // call internal read method - this._read(state.highWaterMark); - state.sync = false; - } - - // If _read pushed data synchronously, then `reading` will be false, - // and we need to re-evaluate how much data we can return to the user. - if (doRead && !state.reading) - n = howMuchToRead(nOrig, state); - - var ret; - if (n > 0) - ret = fromList(n, state); - else - ret = null; - - if (util.isNull(ret)) { - state.needReadable = true; - n = 0; - } - - state.length -= n; - - // If we have nothing in the buffer, then we want to know - // as soon as we *do* get something into the buffer. - if (state.length === 0 && !state.ended) - state.needReadable = true; - - // If we tried to read() past the EOF, then emit end on the next tick. - if (nOrig !== n && state.ended && state.length === 0) - endReadable(this); - - if (!util.isNull(ret)) - this.emit('data', ret); - - return ret; -}; - -function chunkInvalid(state, chunk) { - var er = null; - if (!util.isBuffer(chunk) && - !util.isString(chunk) && - !util.isNullOrUndefined(chunk) && - !state.objectMode) { - er = new TypeError('Invalid non-string/buffer chunk'); - } - return er; -} - - -function onEofChunk(stream, state) { - if (state.decoder && !state.ended) { - var chunk = state.decoder.end(); - if (chunk && chunk.length) { - state.buffer.push(chunk); - state.length += state.objectMode ? 1 : chunk.length; - } - } - state.ended = true; - - // emit 'readable' now to make sure it gets picked up. - emitReadable(stream); -} - -// Don't emit readable right away in sync mode, because this can trigger -// another read() call => stack overflow. This way, it might trigger -// a nextTick recursion warning, but that's not so bad. -function emitReadable(stream) { - var state = stream._readableState; - state.needReadable = false; - if (!state.emittedReadable) { - debug('emitReadable', state.flowing); - state.emittedReadable = true; - if (state.sync) - process.nextTick(function() { - emitReadable_(stream); - }); - else - emitReadable_(stream); - } -} - -function emitReadable_(stream) { - debug('emit readable'); - stream.emit('readable'); - flow(stream); -} - - -// at this point, the user has presumably seen the 'readable' event, -// and called read() to consume some data. that may have triggered -// in turn another _read(n) call, in which case reading = true if -// it's in progress. -// However, if we're not ended, or reading, and the length < hwm, -// then go ahead and try to read some more preemptively. -function maybeReadMore(stream, state) { - if (!state.readingMore) { - state.readingMore = true; - process.nextTick(function() { - maybeReadMore_(stream, state); - }); - } -} - -function maybeReadMore_(stream, state) { - var len = state.length; - while (!state.reading && !state.flowing && !state.ended && - state.length < state.highWaterMark) { - debug('maybeReadMore read 0'); - stream.read(0); - if (len === state.length) - // didn't get any data, stop spinning. - break; - else - len = state.length; - } - state.readingMore = false; -} - -// abstract method. to be overridden in specific implementation classes. -// call cb(er, data) where data is <= n in length. -// for virtual (non-string, non-buffer) streams, "length" is somewhat -// arbitrary, and perhaps not very meaningful. -Readable.prototype._read = function(n) { - this.emit('error', new Error('not implemented')); -}; - -Readable.prototype.pipe = function(dest, pipeOpts) { - var src = this; - var state = this._readableState; - - switch (state.pipesCount) { - case 0: - state.pipes = dest; - break; - case 1: - state.pipes = [state.pipes, dest]; - break; - default: - state.pipes.push(dest); - break; - } - state.pipesCount += 1; - debug('pipe count=%d opts=%j', state.pipesCount, pipeOpts); - - var doEnd = (!pipeOpts || pipeOpts.end !== false) && - dest !== process.stdout && - dest !== process.stderr; - - var endFn = doEnd ? onend : cleanup; - if (state.endEmitted) - process.nextTick(endFn); - else - src.once('end', endFn); - - dest.on('unpipe', onunpipe); - function onunpipe(readable) { - debug('onunpipe'); - if (readable === src) { - cleanup(); - } - } - - function onend() { - debug('onend'); - dest.end(); - } - - // when the dest drains, it reduces the awaitDrain counter - // on the source. This would be more elegant with a .once() - // handler in flow(), but adding and removing repeatedly is - // too slow. - var ondrain = pipeOnDrain(src); - dest.on('drain', ondrain); - - function cleanup() { - debug('cleanup'); - // cleanup event handlers once the pipe is broken - dest.removeListener('close', onclose); - dest.removeListener('finish', onfinish); - dest.removeListener('drain', ondrain); - dest.removeListener('error', onerror); - dest.removeListener('unpipe', onunpipe); - src.removeListener('end', onend); - src.removeListener('end', cleanup); - src.removeListener('data', ondata); - - // if the reader is waiting for a drain event from this - // specific writer, then it would cause it to never start - // flowing again. - // So, if this is awaiting a drain, then we just call it now. - // If we don't know, then assume that we are waiting for one. - if (state.awaitDrain && - (!dest._writableState || dest._writableState.needDrain)) - ondrain(); - } - - src.on('data', ondata); - function ondata(chunk) { - debug('ondata'); - var ret = dest.write(chunk); - if (false === ret) { - debug('false write response, pause', - src._readableState.awaitDrain); - src._readableState.awaitDrain++; - src.pause(); - } - } - - // if the dest has an error, then stop piping into it. - // however, don't suppress the throwing behavior for this. - function onerror(er) { - debug('onerror', er); - unpipe(); - dest.removeListener('error', onerror); - if (EE.listenerCount(dest, 'error') === 0) - dest.emit('error', er); - } - // This is a brutally ugly hack to make sure that our error handler - // is attached before any userland ones. NEVER DO THIS. - if (!dest._events || !dest._events.error) - dest.on('error', onerror); - else if (isArray(dest._events.error)) - dest._events.error.unshift(onerror); - else - dest._events.error = [onerror, dest._events.error]; - - - - // Both close and finish should trigger unpipe, but only once. - function onclose() { - dest.removeListener('finish', onfinish); - unpipe(); - } - dest.once('close', onclose); - function onfinish() { - debug('onfinish'); - dest.removeListener('close', onclose); - unpipe(); - } - dest.once('finish', onfinish); - - function unpipe() { - debug('unpipe'); - src.unpipe(dest); - } - - // tell the dest that it's being piped to - dest.emit('pipe', src); - - // start the flow if it hasn't been started already. - if (!state.flowing) { - debug('pipe resume'); - src.resume(); - } - - return dest; -}; - -function pipeOnDrain(src) { - return function() { - var state = src._readableState; - debug('pipeOnDrain', state.awaitDrain); - if (state.awaitDrain) - state.awaitDrain--; - if (state.awaitDrain === 0 && EE.listenerCount(src, 'data')) { - state.flowing = true; - flow(src); - } - }; -} - - -Readable.prototype.unpipe = function(dest) { - var state = this._readableState; - - // if we're not piping anywhere, then do nothing. - if (state.pipesCount === 0) - return this; - - // just one destination. most common case. - if (state.pipesCount === 1) { - // passed in one, but it's not the right one. - if (dest && dest !== state.pipes) - return this; - - if (!dest) - dest = state.pipes; - - // got a match. - state.pipes = null; - state.pipesCount = 0; - state.flowing = false; - if (dest) - dest.emit('unpipe', this); - return this; - } - - // slow case. multiple pipe destinations. - - if (!dest) { - // remove all. - var dests = state.pipes; - var len = state.pipesCount; - state.pipes = null; - state.pipesCount = 0; - state.flowing = false; - - for (var i = 0; i < len; i++) - dests[i].emit('unpipe', this); - return this; - } - - // try to find the right one. - var i = indexOf(state.pipes, dest); - if (i === -1) - return this; - - state.pipes.splice(i, 1); - state.pipesCount -= 1; - if (state.pipesCount === 1) - state.pipes = state.pipes[0]; - - dest.emit('unpipe', this); - - return this; -}; - -// set up data events if they are asked for -// Ensure readable listeners eventually get something -Readable.prototype.on = function(ev, fn) { - var res = Stream.prototype.on.call(this, ev, fn); - - // If listening to data, and it has not explicitly been paused, - // then call resume to start the flow of data on the next tick. - if (ev === 'data' && false !== this._readableState.flowing) { - this.resume(); - } - - if (ev === 'readable' && this.readable) { - var state = this._readableState; - if (!state.readableListening) { - state.readableListening = true; - state.emittedReadable = false; - state.needReadable = true; - if (!state.reading) { - var self = this; - process.nextTick(function() { - debug('readable nexttick read 0'); - self.read(0); - }); - } else if (state.length) { - emitReadable(this, state); - } - } - } - - return res; -}; -Readable.prototype.addListener = Readable.prototype.on; - -// pause() and resume() are remnants of the legacy readable stream API -// If the user uses them, then switch into old mode. -Readable.prototype.resume = function() { - var state = this._readableState; - if (!state.flowing) { - debug('resume'); - state.flowing = true; - if (!state.reading) { - debug('resume read 0'); - this.read(0); - } - resume(this, state); - } - return this; -}; - -function resume(stream, state) { - if (!state.resumeScheduled) { - state.resumeScheduled = true; - process.nextTick(function() { - resume_(stream, state); - }); - } -} - -function resume_(stream, state) { - state.resumeScheduled = false; - stream.emit('resume'); - flow(stream); - if (state.flowing && !state.reading) - stream.read(0); -} - -Readable.prototype.pause = function() { - debug('call pause flowing=%j', this._readableState.flowing); - if (false !== this._readableState.flowing) { - debug('pause'); - this._readableState.flowing = false; - this.emit('pause'); - } - return this; -}; - -function flow(stream) { - var state = stream._readableState; - debug('flow', state.flowing); - if (state.flowing) { - do { - var chunk = stream.read(); - } while (null !== chunk && state.flowing); - } -} - -// wrap an old-style stream as the async data source. -// This is *not* part of the readable stream interface. -// It is an ugly unfortunate mess of history. -Readable.prototype.wrap = function(stream) { - var state = this._readableState; - var paused = false; - - var self = this; - stream.on('end', function() { - debug('wrapped end'); - if (state.decoder && !state.ended) { - var chunk = state.decoder.end(); - if (chunk && chunk.length) - self.push(chunk); - } - - self.push(null); - }); - - stream.on('data', function(chunk) { - debug('wrapped data'); - if (state.decoder) - chunk = state.decoder.write(chunk); - if (!chunk || !state.objectMode && !chunk.length) - return; - - var ret = self.push(chunk); - if (!ret) { - paused = true; - stream.pause(); - } - }); - - // proxy all the other methods. - // important when wrapping filters and duplexes. - for (var i in stream) { - if (util.isFunction(stream[i]) && util.isUndefined(this[i])) { - this[i] = function(method) { return function() { - return stream[method].apply(stream, arguments); - }}(i); - } - } - - // proxy certain important events. - var events = ['error', 'close', 'destroy', 'pause', 'resume']; - forEach(events, function(ev) { - stream.on(ev, self.emit.bind(self, ev)); - }); - - // when we try to consume some more bytes, simply unpause the - // underlying stream. - self._read = function(n) { - debug('wrapped _read', n); - if (paused) { - paused = false; - stream.resume(); - } - }; - - return self; -}; - - - -// exposed for testing purposes only. -Readable._fromList = fromList; - -// Pluck off n bytes from an array of buffers. -// Length is the combined lengths of all the buffers in the list. -function fromList(n, state) { - var list = state.buffer; - var length = state.length; - var stringMode = !!state.decoder; - var objectMode = !!state.objectMode; - var ret; - - // nothing in the list, definitely empty. - if (list.length === 0) - return null; - - if (length === 0) - ret = null; - else if (objectMode) - ret = list.shift(); - else if (!n || n >= length) { - // read it all, truncate the array. - if (stringMode) - ret = list.join(''); - else - ret = Buffer.concat(list, length); - list.length = 0; - } else { - // read just some of it. - if (n < list[0].length) { - // just take a part of the first list item. - // slice is the same for buffers and strings. - var buf = list[0]; - ret = buf.slice(0, n); - list[0] = buf.slice(n); - } else if (n === list[0].length) { - // first list is a perfect match - ret = list.shift(); - } else { - // complex case. - // we have enough to cover it, but it spans past the first buffer. - if (stringMode) - ret = ''; - else - ret = new Buffer(n); - - var c = 0; - for (var i = 0, l = list.length; i < l && c < n; i++) { - var buf = list[0]; - var cpy = Math.min(n - c, buf.length); - - if (stringMode) - ret += buf.slice(0, cpy); - else - buf.copy(ret, c, 0, cpy); - - if (cpy < buf.length) - list[0] = buf.slice(cpy); - else - list.shift(); - - c += cpy; - } - } - } - - return ret; -} - -function endReadable(stream) { - var state = stream._readableState; - - // If we get here before consuming all the bytes, then that is a - // bug in node. Should never happen. - if (state.length > 0) - throw new Error('endReadable called on non-empty stream'); - - if (!state.endEmitted) { - state.ended = true; - process.nextTick(function() { - // Check that we didn't get one last unshift. - if (!state.endEmitted && state.length === 0) { - state.endEmitted = true; - stream.readable = false; - stream.emit('end'); - } - }); - } -} - -function forEach (xs, f) { - for (var i = 0, l = xs.length; i < l; i++) { - f(xs[i], i); - } -} - -function indexOf (xs, x) { - for (var i = 0, l = xs.length; i < l; i++) { - if (xs[i] === x) return i; - } - return -1; -} diff --git a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-blobs/node_modules/readable-stream/lib/_stream_transform.js b/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-blobs/node_modules/readable-stream/lib/_stream_transform.js deleted file mode 100644 index 905c5e45..00000000 --- a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-blobs/node_modules/readable-stream/lib/_stream_transform.js +++ /dev/null @@ -1,209 +0,0 @@ -// Copyright Joyent, Inc. and other Node contributors. -// -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to permit -// persons to whom the Software is furnished to do so, subject to the -// following conditions: -// -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -// USE OR OTHER DEALINGS IN THE SOFTWARE. - - -// a transform stream is a readable/writable stream where you do -// something with the data. Sometimes it's called a "filter", -// but that's not a great name for it, since that implies a thing where -// some bits pass through, and others are simply ignored. (That would -// be a valid example of a transform, of course.) -// -// While the output is causally related to the input, it's not a -// necessarily symmetric or synchronous transformation. For example, -// a zlib stream might take multiple plain-text writes(), and then -// emit a single compressed chunk some time in the future. -// -// Here's how this works: -// -// The Transform stream has all the aspects of the readable and writable -// stream classes. When you write(chunk), that calls _write(chunk,cb) -// internally, and returns false if there's a lot of pending writes -// buffered up. When you call read(), that calls _read(n) until -// there's enough pending readable data buffered up. -// -// In a transform stream, the written data is placed in a buffer. When -// _read(n) is called, it transforms the queued up data, calling the -// buffered _write cb's as it consumes chunks. If consuming a single -// written chunk would result in multiple output chunks, then the first -// outputted bit calls the readcb, and subsequent chunks just go into -// the read buffer, and will cause it to emit 'readable' if necessary. -// -// This way, back-pressure is actually determined by the reading side, -// since _read has to be called to start processing a new chunk. However, -// a pathological inflate type of transform can cause excessive buffering -// here. For example, imagine a stream where every byte of input is -// interpreted as an integer from 0-255, and then results in that many -// bytes of output. Writing the 4 bytes {ff,ff,ff,ff} would result in -// 1kb of data being output. In this case, you could write a very small -// amount of input, and end up with a very large amount of output. In -// such a pathological inflating mechanism, there'd be no way to tell -// the system to stop doing the transform. A single 4MB write could -// cause the system to run out of memory. -// -// However, even in such a pathological case, only a single written chunk -// would be consumed, and then the rest would wait (un-transformed) until -// the results of the previous transformed chunk were consumed. - -module.exports = Transform; - -var Duplex = require('./_stream_duplex'); - -/**/ -var util = require('core-util-is'); -util.inherits = require('inherits'); -/**/ - -util.inherits(Transform, Duplex); - - -function TransformState(options, stream) { - this.afterTransform = function(er, data) { - return afterTransform(stream, er, data); - }; - - this.needTransform = false; - this.transforming = false; - this.writecb = null; - this.writechunk = null; -} - -function afterTransform(stream, er, data) { - var ts = stream._transformState; - ts.transforming = false; - - var cb = ts.writecb; - - if (!cb) - return stream.emit('error', new Error('no writecb in Transform class')); - - ts.writechunk = null; - ts.writecb = null; - - if (!util.isNullOrUndefined(data)) - stream.push(data); - - if (cb) - cb(er); - - var rs = stream._readableState; - rs.reading = false; - if (rs.needReadable || rs.length < rs.highWaterMark) { - stream._read(rs.highWaterMark); - } -} - - -function Transform(options) { - if (!(this instanceof Transform)) - return new Transform(options); - - Duplex.call(this, options); - - this._transformState = new TransformState(options, this); - - // when the writable side finishes, then flush out anything remaining. - var stream = this; - - // start out asking for a readable event once data is transformed. - this._readableState.needReadable = true; - - // we have implemented the _read method, and done the other things - // that Readable wants before the first _read call, so unset the - // sync guard flag. - this._readableState.sync = false; - - this.once('prefinish', function() { - if (util.isFunction(this._flush)) - this._flush(function(er) { - done(stream, er); - }); - else - done(stream); - }); -} - -Transform.prototype.push = function(chunk, encoding) { - this._transformState.needTransform = false; - return Duplex.prototype.push.call(this, chunk, encoding); -}; - -// This is the part where you do stuff! -// override this function in implementation classes. -// 'chunk' is an input chunk. -// -// Call `push(newChunk)` to pass along transformed output -// to the readable side. You may call 'push' zero or more times. -// -// Call `cb(err)` when you are done with this chunk. If you pass -// an error, then that'll put the hurt on the whole operation. If you -// never call cb(), then you'll never get another chunk. -Transform.prototype._transform = function(chunk, encoding, cb) { - throw new Error('not implemented'); -}; - -Transform.prototype._write = function(chunk, encoding, cb) { - var ts = this._transformState; - ts.writecb = cb; - ts.writechunk = chunk; - ts.writeencoding = encoding; - if (!ts.transforming) { - var rs = this._readableState; - if (ts.needTransform || - rs.needReadable || - rs.length < rs.highWaterMark) - this._read(rs.highWaterMark); - } -}; - -// Doesn't matter what the args are here. -// _transform does all the work. -// That we got here means that the readable side wants more data. -Transform.prototype._read = function(n) { - var ts = this._transformState; - - if (!util.isNull(ts.writechunk) && ts.writecb && !ts.transforming) { - ts.transforming = true; - this._transform(ts.writechunk, ts.writeencoding, ts.afterTransform); - } else { - // mark that we need a transform, so that any data that comes in - // will get processed, now that we've asked for it. - ts.needTransform = true; - } -}; - - -function done(stream, er) { - if (er) - return stream.emit('error', er); - - // if there's nothing in the write buffer, then that means - // that nothing more will ever be provided - var ws = stream._writableState; - var ts = stream._transformState; - - if (ws.length) - throw new Error('calling transform done when ws.length != 0'); - - if (ts.transforming) - throw new Error('calling transform done when still transforming'); - - return stream.push(null); -} diff --git a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-blobs/node_modules/readable-stream/lib/_stream_writable.js b/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-blobs/node_modules/readable-stream/lib/_stream_writable.js deleted file mode 100644 index db8539cd..00000000 --- a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-blobs/node_modules/readable-stream/lib/_stream_writable.js +++ /dev/null @@ -1,477 +0,0 @@ -// Copyright Joyent, Inc. and other Node contributors. -// -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to permit -// persons to whom the Software is furnished to do so, subject to the -// following conditions: -// -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -// USE OR OTHER DEALINGS IN THE SOFTWARE. - -// A bit simpler than readable streams. -// Implement an async ._write(chunk, cb), and it'll handle all -// the drain event emission and buffering. - -module.exports = Writable; - -/**/ -var Buffer = require('buffer').Buffer; -/**/ - -Writable.WritableState = WritableState; - - -/**/ -var util = require('core-util-is'); -util.inherits = require('inherits'); -/**/ - -var Stream = require('stream'); - -util.inherits(Writable, Stream); - -function WriteReq(chunk, encoding, cb) { - this.chunk = chunk; - this.encoding = encoding; - this.callback = cb; -} - -function WritableState(options, stream) { - var Duplex = require('./_stream_duplex'); - - options = options || {}; - - // the point at which write() starts returning false - // Note: 0 is a valid value, means that we always return false if - // the entire buffer is not flushed immediately on write() - var hwm = options.highWaterMark; - var defaultHwm = options.objectMode ? 16 : 16 * 1024; - this.highWaterMark = (hwm || hwm === 0) ? hwm : defaultHwm; - - // object stream flag to indicate whether or not this stream - // contains buffers or objects. - this.objectMode = !!options.objectMode; - - if (stream instanceof Duplex) - this.objectMode = this.objectMode || !!options.writableObjectMode; - - // cast to ints. - this.highWaterMark = ~~this.highWaterMark; - - this.needDrain = false; - // at the start of calling end() - this.ending = false; - // when end() has been called, and returned - this.ended = false; - // when 'finish' is emitted - this.finished = false; - - // should we decode strings into buffers before passing to _write? - // this is here so that some node-core streams can optimize string - // handling at a lower level. - var noDecode = options.decodeStrings === false; - this.decodeStrings = !noDecode; - - // Crypto is kind of old and crusty. Historically, its default string - // encoding is 'binary' so we have to make this configurable. - // Everything else in the universe uses 'utf8', though. - this.defaultEncoding = options.defaultEncoding || 'utf8'; - - // not an actual buffer we keep track of, but a measurement - // of how much we're waiting to get pushed to some underlying - // socket or file. - this.length = 0; - - // a flag to see when we're in the middle of a write. - this.writing = false; - - // when true all writes will be buffered until .uncork() call - this.corked = 0; - - // a flag to be able to tell if the onwrite cb is called immediately, - // or on a later tick. We set this to true at first, because any - // actions that shouldn't happen until "later" should generally also - // not happen before the first write call. - this.sync = true; - - // a flag to know if we're processing previously buffered items, which - // may call the _write() callback in the same tick, so that we don't - // end up in an overlapped onwrite situation. - this.bufferProcessing = false; - - // the callback that's passed to _write(chunk,cb) - this.onwrite = function(er) { - onwrite(stream, er); - }; - - // the callback that the user supplies to write(chunk,encoding,cb) - this.writecb = null; - - // the amount that is being written when _write is called. - this.writelen = 0; - - this.buffer = []; - - // number of pending user-supplied write callbacks - // this must be 0 before 'finish' can be emitted - this.pendingcb = 0; - - // emit prefinish if the only thing we're waiting for is _write cbs - // This is relevant for synchronous Transform streams - this.prefinished = false; - - // True if the error was already emitted and should not be thrown again - this.errorEmitted = false; -} - -function Writable(options) { - var Duplex = require('./_stream_duplex'); - - // Writable ctor is applied to Duplexes, though they're not - // instanceof Writable, they're instanceof Readable. - if (!(this instanceof Writable) && !(this instanceof Duplex)) - return new Writable(options); - - this._writableState = new WritableState(options, this); - - // legacy. - this.writable = true; - - Stream.call(this); -} - -// Otherwise people can pipe Writable streams, which is just wrong. -Writable.prototype.pipe = function() { - this.emit('error', new Error('Cannot pipe. Not readable.')); -}; - - -function writeAfterEnd(stream, state, cb) { - var er = new Error('write after end'); - // TODO: defer error events consistently everywhere, not just the cb - stream.emit('error', er); - process.nextTick(function() { - cb(er); - }); -} - -// If we get something that is not a buffer, string, null, or undefined, -// and we're not in objectMode, then that's an error. -// Otherwise stream chunks are all considered to be of length=1, and the -// watermarks determine how many objects to keep in the buffer, rather than -// how many bytes or characters. -function validChunk(stream, state, chunk, cb) { - var valid = true; - if (!util.isBuffer(chunk) && - !util.isString(chunk) && - !util.isNullOrUndefined(chunk) && - !state.objectMode) { - var er = new TypeError('Invalid non-string/buffer chunk'); - stream.emit('error', er); - process.nextTick(function() { - cb(er); - }); - valid = false; - } - return valid; -} - -Writable.prototype.write = function(chunk, encoding, cb) { - var state = this._writableState; - var ret = false; - - if (util.isFunction(encoding)) { - cb = encoding; - encoding = null; - } - - if (util.isBuffer(chunk)) - encoding = 'buffer'; - else if (!encoding) - encoding = state.defaultEncoding; - - if (!util.isFunction(cb)) - cb = function() {}; - - if (state.ended) - writeAfterEnd(this, state, cb); - else if (validChunk(this, state, chunk, cb)) { - state.pendingcb++; - ret = writeOrBuffer(this, state, chunk, encoding, cb); - } - - return ret; -}; - -Writable.prototype.cork = function() { - var state = this._writableState; - - state.corked++; -}; - -Writable.prototype.uncork = function() { - var state = this._writableState; - - if (state.corked) { - state.corked--; - - if (!state.writing && - !state.corked && - !state.finished && - !state.bufferProcessing && - state.buffer.length) - clearBuffer(this, state); - } -}; - -function decodeChunk(state, chunk, encoding) { - if (!state.objectMode && - state.decodeStrings !== false && - util.isString(chunk)) { - chunk = new Buffer(chunk, encoding); - } - return chunk; -} - -// if we're already writing something, then just put this -// in the queue, and wait our turn. Otherwise, call _write -// If we return false, then we need a drain event, so set that flag. -function writeOrBuffer(stream, state, chunk, encoding, cb) { - chunk = decodeChunk(state, chunk, encoding); - if (util.isBuffer(chunk)) - encoding = 'buffer'; - var len = state.objectMode ? 1 : chunk.length; - - state.length += len; - - var ret = state.length < state.highWaterMark; - // we must ensure that previous needDrain will not be reset to false. - if (!ret) - state.needDrain = true; - - if (state.writing || state.corked) - state.buffer.push(new WriteReq(chunk, encoding, cb)); - else - doWrite(stream, state, false, len, chunk, encoding, cb); - - return ret; -} - -function doWrite(stream, state, writev, len, chunk, encoding, cb) { - state.writelen = len; - state.writecb = cb; - state.writing = true; - state.sync = true; - if (writev) - stream._writev(chunk, state.onwrite); - else - stream._write(chunk, encoding, state.onwrite); - state.sync = false; -} - -function onwriteError(stream, state, sync, er, cb) { - if (sync) - process.nextTick(function() { - state.pendingcb--; - cb(er); - }); - else { - state.pendingcb--; - cb(er); - } - - stream._writableState.errorEmitted = true; - stream.emit('error', er); -} - -function onwriteStateUpdate(state) { - state.writing = false; - state.writecb = null; - state.length -= state.writelen; - state.writelen = 0; -} - -function onwrite(stream, er) { - var state = stream._writableState; - var sync = state.sync; - var cb = state.writecb; - - onwriteStateUpdate(state); - - if (er) - onwriteError(stream, state, sync, er, cb); - else { - // Check if we're actually ready to finish, but don't emit yet - var finished = needFinish(stream, state); - - if (!finished && - !state.corked && - !state.bufferProcessing && - state.buffer.length) { - clearBuffer(stream, state); - } - - if (sync) { - process.nextTick(function() { - afterWrite(stream, state, finished, cb); - }); - } else { - afterWrite(stream, state, finished, cb); - } - } -} - -function afterWrite(stream, state, finished, cb) { - if (!finished) - onwriteDrain(stream, state); - state.pendingcb--; - cb(); - finishMaybe(stream, state); -} - -// Must force callback to be called on nextTick, so that we don't -// emit 'drain' before the write() consumer gets the 'false' return -// value, and has a chance to attach a 'drain' listener. -function onwriteDrain(stream, state) { - if (state.length === 0 && state.needDrain) { - state.needDrain = false; - stream.emit('drain'); - } -} - - -// if there's something in the buffer waiting, then process it -function clearBuffer(stream, state) { - state.bufferProcessing = true; - - if (stream._writev && state.buffer.length > 1) { - // Fast case, write everything using _writev() - var cbs = []; - for (var c = 0; c < state.buffer.length; c++) - cbs.push(state.buffer[c].callback); - - // count the one we are adding, as well. - // TODO(isaacs) clean this up - state.pendingcb++; - doWrite(stream, state, true, state.length, state.buffer, '', function(err) { - for (var i = 0; i < cbs.length; i++) { - state.pendingcb--; - cbs[i](err); - } - }); - - // Clear buffer - state.buffer = []; - } else { - // Slow case, write chunks one-by-one - for (var c = 0; c < state.buffer.length; c++) { - var entry = state.buffer[c]; - var chunk = entry.chunk; - var encoding = entry.encoding; - var cb = entry.callback; - var len = state.objectMode ? 1 : chunk.length; - - doWrite(stream, state, false, len, chunk, encoding, cb); - - // if we didn't call the onwrite immediately, then - // it means that we need to wait until it does. - // also, that means that the chunk and cb are currently - // being processed, so move the buffer counter past them. - if (state.writing) { - c++; - break; - } - } - - if (c < state.buffer.length) - state.buffer = state.buffer.slice(c); - else - state.buffer.length = 0; - } - - state.bufferProcessing = false; -} - -Writable.prototype._write = function(chunk, encoding, cb) { - cb(new Error('not implemented')); - -}; - -Writable.prototype._writev = null; - -Writable.prototype.end = function(chunk, encoding, cb) { - var state = this._writableState; - - if (util.isFunction(chunk)) { - cb = chunk; - chunk = null; - encoding = null; - } else if (util.isFunction(encoding)) { - cb = encoding; - encoding = null; - } - - if (!util.isNullOrUndefined(chunk)) - this.write(chunk, encoding); - - // .end() fully uncorks - if (state.corked) { - state.corked = 1; - this.uncork(); - } - - // ignore unnecessary end() calls. - if (!state.ending && !state.finished) - endWritable(this, state, cb); -}; - - -function needFinish(stream, state) { - return (state.ending && - state.length === 0 && - !state.finished && - !state.writing); -} - -function prefinish(stream, state) { - if (!state.prefinished) { - state.prefinished = true; - stream.emit('prefinish'); - } -} - -function finishMaybe(stream, state) { - var need = needFinish(stream, state); - if (need) { - if (state.pendingcb === 0) { - prefinish(stream, state); - state.finished = true; - stream.emit('finish'); - } else - prefinish(stream, state); - } - return need; -} - -function endWritable(stream, state, cb) { - state.ending = true; - finishMaybe(stream, state); - if (cb) { - if (state.finished) - process.nextTick(cb); - else - stream.once('finish', cb); - } - state.ended = true; -} diff --git a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-blobs/node_modules/readable-stream/node_modules/core-util-is/LICENSE b/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-blobs/node_modules/readable-stream/node_modules/core-util-is/LICENSE deleted file mode 100644 index d8d7f943..00000000 --- a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-blobs/node_modules/readable-stream/node_modules/core-util-is/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright Node.js contributors. All rights reserved. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to -deal in the Software without restriction, including without limitation the -rights to use, copy, modify, merge, publish, distribute, sublicense, and/or -sell copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS -IN THE SOFTWARE. diff --git a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-blobs/node_modules/readable-stream/node_modules/core-util-is/README.md b/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-blobs/node_modules/readable-stream/node_modules/core-util-is/README.md deleted file mode 100644 index 5a76b414..00000000 --- a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-blobs/node_modules/readable-stream/node_modules/core-util-is/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# core-util-is - -The `util.is*` functions introduced in Node v0.12. diff --git a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-blobs/node_modules/readable-stream/node_modules/core-util-is/float.patch b/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-blobs/node_modules/readable-stream/node_modules/core-util-is/float.patch deleted file mode 100644 index a06d5c05..00000000 --- a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-blobs/node_modules/readable-stream/node_modules/core-util-is/float.patch +++ /dev/null @@ -1,604 +0,0 @@ -diff --git a/lib/util.js b/lib/util.js -index a03e874..9074e8e 100644 ---- a/lib/util.js -+++ b/lib/util.js -@@ -19,430 +19,6 @@ - // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE - // USE OR OTHER DEALINGS IN THE SOFTWARE. - --var formatRegExp = /%[sdj%]/g; --exports.format = function(f) { -- if (!isString(f)) { -- var objects = []; -- for (var i = 0; i < arguments.length; i++) { -- objects.push(inspect(arguments[i])); -- } -- return objects.join(' '); -- } -- -- var i = 1; -- var args = arguments; -- var len = args.length; -- var str = String(f).replace(formatRegExp, function(x) { -- if (x === '%%') return '%'; -- if (i >= len) return x; -- switch (x) { -- case '%s': return String(args[i++]); -- case '%d': return Number(args[i++]); -- case '%j': -- try { -- return JSON.stringify(args[i++]); -- } catch (_) { -- return '[Circular]'; -- } -- default: -- return x; -- } -- }); -- for (var x = args[i]; i < len; x = args[++i]) { -- if (isNull(x) || !isObject(x)) { -- str += ' ' + x; -- } else { -- str += ' ' + inspect(x); -- } -- } -- return str; --}; -- -- --// Mark that a method should not be used. --// Returns a modified function which warns once by default. --// If --no-deprecation is set, then it is a no-op. --exports.deprecate = function(fn, msg) { -- // Allow for deprecating things in the process of starting up. -- if (isUndefined(global.process)) { -- return function() { -- return exports.deprecate(fn, msg).apply(this, arguments); -- }; -- } -- -- if (process.noDeprecation === true) { -- return fn; -- } -- -- var warned = false; -- function deprecated() { -- if (!warned) { -- if (process.throwDeprecation) { -- throw new Error(msg); -- } else if (process.traceDeprecation) { -- console.trace(msg); -- } else { -- console.error(msg); -- } -- warned = true; -- } -- return fn.apply(this, arguments); -- } -- -- return deprecated; --}; -- -- --var debugs = {}; --var debugEnviron; --exports.debuglog = function(set) { -- if (isUndefined(debugEnviron)) -- debugEnviron = process.env.NODE_DEBUG || ''; -- set = set.toUpperCase(); -- if (!debugs[set]) { -- if (new RegExp('\\b' + set + '\\b', 'i').test(debugEnviron)) { -- var pid = process.pid; -- debugs[set] = function() { -- var msg = exports.format.apply(exports, arguments); -- console.error('%s %d: %s', set, pid, msg); -- }; -- } else { -- debugs[set] = function() {}; -- } -- } -- return debugs[set]; --}; -- -- --/** -- * Echos the value of a value. Trys to print the value out -- * in the best way possible given the different types. -- * -- * @param {Object} obj The object to print out. -- * @param {Object} opts Optional options object that alters the output. -- */ --/* legacy: obj, showHidden, depth, colors*/ --function inspect(obj, opts) { -- // default options -- var ctx = { -- seen: [], -- stylize: stylizeNoColor -- }; -- // legacy... -- if (arguments.length >= 3) ctx.depth = arguments[2]; -- if (arguments.length >= 4) ctx.colors = arguments[3]; -- if (isBoolean(opts)) { -- // legacy... -- ctx.showHidden = opts; -- } else if (opts) { -- // got an "options" object -- exports._extend(ctx, opts); -- } -- // set default options -- if (isUndefined(ctx.showHidden)) ctx.showHidden = false; -- if (isUndefined(ctx.depth)) ctx.depth = 2; -- if (isUndefined(ctx.colors)) ctx.colors = false; -- if (isUndefined(ctx.customInspect)) ctx.customInspect = true; -- if (ctx.colors) ctx.stylize = stylizeWithColor; -- return formatValue(ctx, obj, ctx.depth); --} --exports.inspect = inspect; -- -- --// http://en.wikipedia.org/wiki/ANSI_escape_code#graphics --inspect.colors = { -- 'bold' : [1, 22], -- 'italic' : [3, 23], -- 'underline' : [4, 24], -- 'inverse' : [7, 27], -- 'white' : [37, 39], -- 'grey' : [90, 39], -- 'black' : [30, 39], -- 'blue' : [34, 39], -- 'cyan' : [36, 39], -- 'green' : [32, 39], -- 'magenta' : [35, 39], -- 'red' : [31, 39], -- 'yellow' : [33, 39] --}; -- --// Don't use 'blue' not visible on cmd.exe --inspect.styles = { -- 'special': 'cyan', -- 'number': 'yellow', -- 'boolean': 'yellow', -- 'undefined': 'grey', -- 'null': 'bold', -- 'string': 'green', -- 'date': 'magenta', -- // "name": intentionally not styling -- 'regexp': 'red' --}; -- -- --function stylizeWithColor(str, styleType) { -- var style = inspect.styles[styleType]; -- -- if (style) { -- return '\u001b[' + inspect.colors[style][0] + 'm' + str + -- '\u001b[' + inspect.colors[style][1] + 'm'; -- } else { -- return str; -- } --} -- -- --function stylizeNoColor(str, styleType) { -- return str; --} -- -- --function arrayToHash(array) { -- var hash = {}; -- -- array.forEach(function(val, idx) { -- hash[val] = true; -- }); -- -- return hash; --} -- -- --function formatValue(ctx, value, recurseTimes) { -- // Provide a hook for user-specified inspect functions. -- // Check that value is an object with an inspect function on it -- if (ctx.customInspect && -- value && -- isFunction(value.inspect) && -- // Filter out the util module, it's inspect function is special -- value.inspect !== exports.inspect && -- // Also filter out any prototype objects using the circular check. -- !(value.constructor && value.constructor.prototype === value)) { -- var ret = value.inspect(recurseTimes, ctx); -- if (!isString(ret)) { -- ret = formatValue(ctx, ret, recurseTimes); -- } -- return ret; -- } -- -- // Primitive types cannot have properties -- var primitive = formatPrimitive(ctx, value); -- if (primitive) { -- return primitive; -- } -- -- // Look up the keys of the object. -- var keys = Object.keys(value); -- var visibleKeys = arrayToHash(keys); -- -- if (ctx.showHidden) { -- keys = Object.getOwnPropertyNames(value); -- } -- -- // Some type of object without properties can be shortcutted. -- if (keys.length === 0) { -- if (isFunction(value)) { -- var name = value.name ? ': ' + value.name : ''; -- return ctx.stylize('[Function' + name + ']', 'special'); -- } -- if (isRegExp(value)) { -- return ctx.stylize(RegExp.prototype.toString.call(value), 'regexp'); -- } -- if (isDate(value)) { -- return ctx.stylize(Date.prototype.toString.call(value), 'date'); -- } -- if (isError(value)) { -- return formatError(value); -- } -- } -- -- var base = '', array = false, braces = ['{', '}']; -- -- // Make Array say that they are Array -- if (isArray(value)) { -- array = true; -- braces = ['[', ']']; -- } -- -- // Make functions say that they are functions -- if (isFunction(value)) { -- var n = value.name ? ': ' + value.name : ''; -- base = ' [Function' + n + ']'; -- } -- -- // Make RegExps say that they are RegExps -- if (isRegExp(value)) { -- base = ' ' + RegExp.prototype.toString.call(value); -- } -- -- // Make dates with properties first say the date -- if (isDate(value)) { -- base = ' ' + Date.prototype.toUTCString.call(value); -- } -- -- // Make error with message first say the error -- if (isError(value)) { -- base = ' ' + formatError(value); -- } -- -- if (keys.length === 0 && (!array || value.length == 0)) { -- return braces[0] + base + braces[1]; -- } -- -- if (recurseTimes < 0) { -- if (isRegExp(value)) { -- return ctx.stylize(RegExp.prototype.toString.call(value), 'regexp'); -- } else { -- return ctx.stylize('[Object]', 'special'); -- } -- } -- -- ctx.seen.push(value); -- -- var output; -- if (array) { -- output = formatArray(ctx, value, recurseTimes, visibleKeys, keys); -- } else { -- output = keys.map(function(key) { -- return formatProperty(ctx, value, recurseTimes, visibleKeys, key, array); -- }); -- } -- -- ctx.seen.pop(); -- -- return reduceToSingleString(output, base, braces); --} -- -- --function formatPrimitive(ctx, value) { -- if (isUndefined(value)) -- return ctx.stylize('undefined', 'undefined'); -- if (isString(value)) { -- var simple = '\'' + JSON.stringify(value).replace(/^"|"$/g, '') -- .replace(/'/g, "\\'") -- .replace(/\\"/g, '"') + '\''; -- return ctx.stylize(simple, 'string'); -- } -- if (isNumber(value)) { -- // Format -0 as '-0'. Strict equality won't distinguish 0 from -0, -- // so instead we use the fact that 1 / -0 < 0 whereas 1 / 0 > 0 . -- if (value === 0 && 1 / value < 0) -- return ctx.stylize('-0', 'number'); -- return ctx.stylize('' + value, 'number'); -- } -- if (isBoolean(value)) -- return ctx.stylize('' + value, 'boolean'); -- // For some reason typeof null is "object", so special case here. -- if (isNull(value)) -- return ctx.stylize('null', 'null'); --} -- -- --function formatError(value) { -- return '[' + Error.prototype.toString.call(value) + ']'; --} -- -- --function formatArray(ctx, value, recurseTimes, visibleKeys, keys) { -- var output = []; -- for (var i = 0, l = value.length; i < l; ++i) { -- if (hasOwnProperty(value, String(i))) { -- output.push(formatProperty(ctx, value, recurseTimes, visibleKeys, -- String(i), true)); -- } else { -- output.push(''); -- } -- } -- keys.forEach(function(key) { -- if (!key.match(/^\d+$/)) { -- output.push(formatProperty(ctx, value, recurseTimes, visibleKeys, -- key, true)); -- } -- }); -- return output; --} -- -- --function formatProperty(ctx, value, recurseTimes, visibleKeys, key, array) { -- var name, str, desc; -- desc = Object.getOwnPropertyDescriptor(value, key) || { value: value[key] }; -- if (desc.get) { -- if (desc.set) { -- str = ctx.stylize('[Getter/Setter]', 'special'); -- } else { -- str = ctx.stylize('[Getter]', 'special'); -- } -- } else { -- if (desc.set) { -- str = ctx.stylize('[Setter]', 'special'); -- } -- } -- if (!hasOwnProperty(visibleKeys, key)) { -- name = '[' + key + ']'; -- } -- if (!str) { -- if (ctx.seen.indexOf(desc.value) < 0) { -- if (isNull(recurseTimes)) { -- str = formatValue(ctx, desc.value, null); -- } else { -- str = formatValue(ctx, desc.value, recurseTimes - 1); -- } -- if (str.indexOf('\n') > -1) { -- if (array) { -- str = str.split('\n').map(function(line) { -- return ' ' + line; -- }).join('\n').substr(2); -- } else { -- str = '\n' + str.split('\n').map(function(line) { -- return ' ' + line; -- }).join('\n'); -- } -- } -- } else { -- str = ctx.stylize('[Circular]', 'special'); -- } -- } -- if (isUndefined(name)) { -- if (array && key.match(/^\d+$/)) { -- return str; -- } -- name = JSON.stringify('' + key); -- if (name.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)) { -- name = name.substr(1, name.length - 2); -- name = ctx.stylize(name, 'name'); -- } else { -- name = name.replace(/'/g, "\\'") -- .replace(/\\"/g, '"') -- .replace(/(^"|"$)/g, "'"); -- name = ctx.stylize(name, 'string'); -- } -- } -- -- return name + ': ' + str; --} -- -- --function reduceToSingleString(output, base, braces) { -- var numLinesEst = 0; -- var length = output.reduce(function(prev, cur) { -- numLinesEst++; -- if (cur.indexOf('\n') >= 0) numLinesEst++; -- return prev + cur.replace(/\u001b\[\d\d?m/g, '').length + 1; -- }, 0); -- -- if (length > 60) { -- return braces[0] + -- (base === '' ? '' : base + '\n ') + -- ' ' + -- output.join(',\n ') + -- ' ' + -- braces[1]; -- } -- -- return braces[0] + base + ' ' + output.join(', ') + ' ' + braces[1]; --} -- -- - // NOTE: These type checking functions intentionally don't use `instanceof` - // because it is fragile and can be easily faked with `Object.create()`. - function isArray(ar) { -@@ -522,166 +98,10 @@ function isPrimitive(arg) { - exports.isPrimitive = isPrimitive; - - function isBuffer(arg) { -- return arg instanceof Buffer; -+ return Buffer.isBuffer(arg); - } - exports.isBuffer = isBuffer; - - function objectToString(o) { - return Object.prototype.toString.call(o); --} -- -- --function pad(n) { -- return n < 10 ? '0' + n.toString(10) : n.toString(10); --} -- -- --var months = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', -- 'Oct', 'Nov', 'Dec']; -- --// 26 Feb 16:19:34 --function timestamp() { -- var d = new Date(); -- var time = [pad(d.getHours()), -- pad(d.getMinutes()), -- pad(d.getSeconds())].join(':'); -- return [d.getDate(), months[d.getMonth()], time].join(' '); --} -- -- --// log is just a thin wrapper to console.log that prepends a timestamp --exports.log = function() { -- console.log('%s - %s', timestamp(), exports.format.apply(exports, arguments)); --}; -- -- --/** -- * Inherit the prototype methods from one constructor into another. -- * -- * The Function.prototype.inherits from lang.js rewritten as a standalone -- * function (not on Function.prototype). NOTE: If this file is to be loaded -- * during bootstrapping this function needs to be rewritten using some native -- * functions as prototype setup using normal JavaScript does not work as -- * expected during bootstrapping (see mirror.js in r114903). -- * -- * @param {function} ctor Constructor function which needs to inherit the -- * prototype. -- * @param {function} superCtor Constructor function to inherit prototype from. -- */ --exports.inherits = function(ctor, superCtor) { -- ctor.super_ = superCtor; -- ctor.prototype = Object.create(superCtor.prototype, { -- constructor: { -- value: ctor, -- enumerable: false, -- writable: true, -- configurable: true -- } -- }); --}; -- --exports._extend = function(origin, add) { -- // Don't do anything if add isn't an object -- if (!add || !isObject(add)) return origin; -- -- var keys = Object.keys(add); -- var i = keys.length; -- while (i--) { -- origin[keys[i]] = add[keys[i]]; -- } -- return origin; --}; -- --function hasOwnProperty(obj, prop) { -- return Object.prototype.hasOwnProperty.call(obj, prop); --} -- -- --// Deprecated old stuff. -- --exports.p = exports.deprecate(function() { -- for (var i = 0, len = arguments.length; i < len; ++i) { -- console.error(exports.inspect(arguments[i])); -- } --}, 'util.p: Use console.error() instead'); -- -- --exports.exec = exports.deprecate(function() { -- return require('child_process').exec.apply(this, arguments); --}, 'util.exec is now called `child_process.exec`.'); -- -- --exports.print = exports.deprecate(function() { -- for (var i = 0, len = arguments.length; i < len; ++i) { -- process.stdout.write(String(arguments[i])); -- } --}, 'util.print: Use console.log instead'); -- -- --exports.puts = exports.deprecate(function() { -- for (var i = 0, len = arguments.length; i < len; ++i) { -- process.stdout.write(arguments[i] + '\n'); -- } --}, 'util.puts: Use console.log instead'); -- -- --exports.debug = exports.deprecate(function(x) { -- process.stderr.write('DEBUG: ' + x + '\n'); --}, 'util.debug: Use console.error instead'); -- -- --exports.error = exports.deprecate(function(x) { -- for (var i = 0, len = arguments.length; i < len; ++i) { -- process.stderr.write(arguments[i] + '\n'); -- } --}, 'util.error: Use console.error instead'); -- -- --exports.pump = exports.deprecate(function(readStream, writeStream, callback) { -- var callbackCalled = false; -- -- function call(a, b, c) { -- if (callback && !callbackCalled) { -- callback(a, b, c); -- callbackCalled = true; -- } -- } -- -- readStream.addListener('data', function(chunk) { -- if (writeStream.write(chunk) === false) readStream.pause(); -- }); -- -- writeStream.addListener('drain', function() { -- readStream.resume(); -- }); -- -- readStream.addListener('end', function() { -- writeStream.end(); -- }); -- -- readStream.addListener('close', function() { -- call(); -- }); -- -- readStream.addListener('error', function(err) { -- writeStream.end(); -- call(err); -- }); -- -- writeStream.addListener('error', function(err) { -- readStream.destroy(); -- call(err); -- }); --}, 'util.pump(): Use readableStream.pipe() instead'); -- -- --var uv; --exports._errnoException = function(err, syscall) { -- if (isUndefined(uv)) uv = process.binding('uv'); -- var errname = uv.errname(err); -- var e = new Error(syscall + ' ' + errname); -- e.code = errname; -- e.errno = errname; -- e.syscall = syscall; -- return e; --}; -+} \ No newline at end of file diff --git a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-blobs/node_modules/readable-stream/node_modules/core-util-is/lib/util.js b/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-blobs/node_modules/readable-stream/node_modules/core-util-is/lib/util.js deleted file mode 100644 index ff4c851c..00000000 --- a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-blobs/node_modules/readable-stream/node_modules/core-util-is/lib/util.js +++ /dev/null @@ -1,107 +0,0 @@ -// Copyright Joyent, Inc. and other Node contributors. -// -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to permit -// persons to whom the Software is furnished to do so, subject to the -// following conditions: -// -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -// USE OR OTHER DEALINGS IN THE SOFTWARE. - -// NOTE: These type checking functions intentionally don't use `instanceof` -// because it is fragile and can be easily faked with `Object.create()`. - -function isArray(arg) { - if (Array.isArray) { - return Array.isArray(arg); - } - return objectToString(arg) === '[object Array]'; -} -exports.isArray = isArray; - -function isBoolean(arg) { - return typeof arg === 'boolean'; -} -exports.isBoolean = isBoolean; - -function isNull(arg) { - return arg === null; -} -exports.isNull = isNull; - -function isNullOrUndefined(arg) { - return arg == null; -} -exports.isNullOrUndefined = isNullOrUndefined; - -function isNumber(arg) { - return typeof arg === 'number'; -} -exports.isNumber = isNumber; - -function isString(arg) { - return typeof arg === 'string'; -} -exports.isString = isString; - -function isSymbol(arg) { - return typeof arg === 'symbol'; -} -exports.isSymbol = isSymbol; - -function isUndefined(arg) { - return arg === void 0; -} -exports.isUndefined = isUndefined; - -function isRegExp(re) { - return objectToString(re) === '[object RegExp]'; -} -exports.isRegExp = isRegExp; - -function isObject(arg) { - return typeof arg === 'object' && arg !== null; -} -exports.isObject = isObject; - -function isDate(d) { - return objectToString(d) === '[object Date]'; -} -exports.isDate = isDate; - -function isError(e) { - return (objectToString(e) === '[object Error]' || e instanceof Error); -} -exports.isError = isError; - -function isFunction(arg) { - return typeof arg === 'function'; -} -exports.isFunction = isFunction; - -function isPrimitive(arg) { - return arg === null || - typeof arg === 'boolean' || - typeof arg === 'number' || - typeof arg === 'string' || - typeof arg === 'symbol' || // ES6 symbol - typeof arg === 'undefined'; -} -exports.isPrimitive = isPrimitive; - -exports.isBuffer = Buffer.isBuffer; - -function objectToString(o) { - return Object.prototype.toString.call(o); -} diff --git a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-blobs/node_modules/readable-stream/node_modules/core-util-is/package.json b/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-blobs/node_modules/readable-stream/node_modules/core-util-is/package.json deleted file mode 100644 index ddd227e6..00000000 --- a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-blobs/node_modules/readable-stream/node_modules/core-util-is/package.json +++ /dev/null @@ -1,60 +0,0 @@ -{ - "name": "core-util-is", - "version": "1.0.2", - "description": "The `util.is*` functions introduced in Node v0.12.", - "main": "lib/util.js", - "repository": { - "type": "git", - "url": "git://github.com/isaacs/core-util-is.git" - }, - "keywords": [ - "util", - "isBuffer", - "isArray", - "isNumber", - "isString", - "isRegExp", - "isThis", - "isThat", - "polyfill" - ], - "author": { - "name": "Isaac Z. Schlueter", - "email": "i@izs.me", - "url": "http://blog.izs.me/" - }, - "license": "MIT", - "bugs": { - "url": "https://github.com/isaacs/core-util-is/issues" - }, - "scripts": { - "test": "tap test.js" - }, - "devDependencies": { - "tap": "^2.3.0" - }, - "gitHead": "a177da234df5638b363ddc15fa324619a38577c8", - "homepage": "https://github.com/isaacs/core-util-is#readme", - "_id": "core-util-is@1.0.2", - "_shasum": "b5fd54220aa2bc5ab57aab7140c940754503c1a7", - "_from": "core-util-is@>=1.0.0 <1.1.0", - "_npmVersion": "3.3.2", - "_nodeVersion": "4.0.0", - "_npmUser": { - "name": "isaacs", - "email": "i@izs.me" - }, - "dist": { - "shasum": "b5fd54220aa2bc5ab57aab7140c940754503c1a7", - "tarball": "http://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz" - }, - "maintainers": [ - { - "name": "isaacs", - "email": "i@izs.me" - } - ], - "directories": {}, - "_resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", - "readme": "ERROR: No README data found!" -} diff --git a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-blobs/node_modules/readable-stream/node_modules/core-util-is/test.js b/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-blobs/node_modules/readable-stream/node_modules/core-util-is/test.js deleted file mode 100644 index 1a490c65..00000000 --- a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-blobs/node_modules/readable-stream/node_modules/core-util-is/test.js +++ /dev/null @@ -1,68 +0,0 @@ -var assert = require('tap'); - -var t = require('./lib/util'); - -assert.equal(t.isArray([]), true); -assert.equal(t.isArray({}), false); - -assert.equal(t.isBoolean(null), false); -assert.equal(t.isBoolean(true), true); -assert.equal(t.isBoolean(false), true); - -assert.equal(t.isNull(null), true); -assert.equal(t.isNull(undefined), false); -assert.equal(t.isNull(false), false); -assert.equal(t.isNull(), false); - -assert.equal(t.isNullOrUndefined(null), true); -assert.equal(t.isNullOrUndefined(undefined), true); -assert.equal(t.isNullOrUndefined(false), false); -assert.equal(t.isNullOrUndefined(), true); - -assert.equal(t.isNumber(null), false); -assert.equal(t.isNumber('1'), false); -assert.equal(t.isNumber(1), true); - -assert.equal(t.isString(null), false); -assert.equal(t.isString('1'), true); -assert.equal(t.isString(1), false); - -assert.equal(t.isSymbol(null), false); -assert.equal(t.isSymbol('1'), false); -assert.equal(t.isSymbol(1), false); -assert.equal(t.isSymbol(Symbol()), true); - -assert.equal(t.isUndefined(null), false); -assert.equal(t.isUndefined(undefined), true); -assert.equal(t.isUndefined(false), false); -assert.equal(t.isUndefined(), true); - -assert.equal(t.isRegExp(null), false); -assert.equal(t.isRegExp('1'), false); -assert.equal(t.isRegExp(new RegExp()), true); - -assert.equal(t.isObject({}), true); -assert.equal(t.isObject([]), true); -assert.equal(t.isObject(new RegExp()), true); -assert.equal(t.isObject(new Date()), true); - -assert.equal(t.isDate(null), false); -assert.equal(t.isDate('1'), false); -assert.equal(t.isDate(new Date()), true); - -assert.equal(t.isError(null), false); -assert.equal(t.isError({ err: true }), false); -assert.equal(t.isError(new Error()), true); - -assert.equal(t.isFunction(null), false); -assert.equal(t.isFunction({ }), false); -assert.equal(t.isFunction(function() {}), true); - -assert.equal(t.isPrimitive(null), true); -assert.equal(t.isPrimitive(''), true); -assert.equal(t.isPrimitive(0), true); -assert.equal(t.isPrimitive(new Date()), false); - -assert.equal(t.isBuffer(null), false); -assert.equal(t.isBuffer({}), false); -assert.equal(t.isBuffer(new Buffer(0)), true); diff --git a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-blobs/node_modules/readable-stream/node_modules/inherits/LICENSE b/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-blobs/node_modules/readable-stream/node_modules/inherits/LICENSE deleted file mode 100644 index dea3013d..00000000 --- a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-blobs/node_modules/readable-stream/node_modules/inherits/LICENSE +++ /dev/null @@ -1,16 +0,0 @@ -The ISC License - -Copyright (c) Isaac Z. Schlueter - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH -REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND -FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, -INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM -LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR -OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR -PERFORMANCE OF THIS SOFTWARE. - diff --git a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-blobs/node_modules/readable-stream/node_modules/inherits/README.md b/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-blobs/node_modules/readable-stream/node_modules/inherits/README.md deleted file mode 100644 index b1c56658..00000000 --- a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-blobs/node_modules/readable-stream/node_modules/inherits/README.md +++ /dev/null @@ -1,42 +0,0 @@ -Browser-friendly inheritance fully compatible with standard node.js -[inherits](http://nodejs.org/api/util.html#util_util_inherits_constructor_superconstructor). - -This package exports standard `inherits` from node.js `util` module in -node environment, but also provides alternative browser-friendly -implementation through [browser -field](https://gist.github.com/shtylman/4339901). Alternative -implementation is a literal copy of standard one located in standalone -module to avoid requiring of `util`. It also has a shim for old -browsers with no `Object.create` support. - -While keeping you sure you are using standard `inherits` -implementation in node.js environment, it allows bundlers such as -[browserify](https://github.com/substack/node-browserify) to not -include full `util` package to your client code if all you need is -just `inherits` function. It worth, because browser shim for `util` -package is large and `inherits` is often the single function you need -from it. - -It's recommended to use this package instead of -`require('util').inherits` for any code that has chances to be used -not only in node.js but in browser too. - -## usage - -```js -var inherits = require('inherits'); -// then use exactly as the standard one -``` - -## note on version ~1.0 - -Version ~1.0 had completely different motivation and is not compatible -neither with 2.0 nor with standard node.js `inherits`. - -If you are using version ~1.0 and planning to switch to ~2.0, be -careful: - -* new version uses `super_` instead of `super` for referencing - superclass -* new version overwrites current prototype while old one preserves any - existing fields on it diff --git a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-blobs/node_modules/readable-stream/node_modules/inherits/inherits.js b/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-blobs/node_modules/readable-stream/node_modules/inherits/inherits.js deleted file mode 100644 index 3b94763a..00000000 --- a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-blobs/node_modules/readable-stream/node_modules/inherits/inherits.js +++ /dev/null @@ -1,7 +0,0 @@ -try { - var util = require('util'); - if (typeof util.inherits !== 'function') throw ''; - module.exports = util.inherits; -} catch (e) { - module.exports = require('./inherits_browser.js'); -} diff --git a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-blobs/node_modules/readable-stream/node_modules/inherits/inherits_browser.js b/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-blobs/node_modules/readable-stream/node_modules/inherits/inherits_browser.js deleted file mode 100644 index c1e78a75..00000000 --- a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-blobs/node_modules/readable-stream/node_modules/inherits/inherits_browser.js +++ /dev/null @@ -1,23 +0,0 @@ -if (typeof Object.create === 'function') { - // implementation from standard node.js 'util' module - module.exports = function inherits(ctor, superCtor) { - ctor.super_ = superCtor - ctor.prototype = Object.create(superCtor.prototype, { - constructor: { - value: ctor, - enumerable: false, - writable: true, - configurable: true - } - }); - }; -} else { - // old school shim for old browsers - module.exports = function inherits(ctor, superCtor) { - ctor.super_ = superCtor - var TempCtor = function () {} - TempCtor.prototype = superCtor.prototype - ctor.prototype = new TempCtor() - ctor.prototype.constructor = ctor - } -} diff --git a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-blobs/node_modules/readable-stream/node_modules/inherits/package.json b/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-blobs/node_modules/readable-stream/node_modules/inherits/package.json deleted file mode 100644 index 9146e757..00000000 --- a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-blobs/node_modules/readable-stream/node_modules/inherits/package.json +++ /dev/null @@ -1,63 +0,0 @@ -{ - "name": "inherits", - "description": "Browser-friendly inheritance fully compatible with standard node.js inherits()", - "version": "2.0.3", - "keywords": [ - "inheritance", - "class", - "klass", - "oop", - "object-oriented", - "inherits", - "browser", - "browserify" - ], - "main": "./inherits.js", - "browser": "./inherits_browser.js", - "repository": { - "type": "git", - "url": "git://github.com/isaacs/inherits.git" - }, - "license": "ISC", - "scripts": { - "test": "node test" - }, - "devDependencies": { - "tap": "^7.1.0" - }, - "files": [ - "inherits.js", - "inherits_browser.js" - ], - "gitHead": "e05d0fb27c61a3ec687214f0476386b765364d5f", - "bugs": { - "url": "https://github.com/isaacs/inherits/issues" - }, - "homepage": "https://github.com/isaacs/inherits#readme", - "_id": "inherits@2.0.3", - "_shasum": "633c2c83e3da42a502f52466022480f4208261de", - "_from": "inherits@>=2.0.1 <2.1.0", - "_npmVersion": "3.10.7", - "_nodeVersion": "6.5.0", - "_npmUser": { - "name": "isaacs", - "email": "i@izs.me" - }, - "dist": { - "shasum": "633c2c83e3da42a502f52466022480f4208261de", - "tarball": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz" - }, - "maintainers": [ - { - "name": "isaacs", - "email": "i@izs.me" - } - ], - "_npmOperationalInternal": { - "host": "packages-16-east.internal.npmjs.com", - "tmp": "tmp/inherits-2.0.3.tgz_1473295776489_0.08142363070510328" - }, - "directories": {}, - "_resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", - "readme": "ERROR: No README data found!" -} diff --git a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-blobs/node_modules/readable-stream/node_modules/isarray/README.md b/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-blobs/node_modules/readable-stream/node_modules/isarray/README.md deleted file mode 100644 index 052a62b8..00000000 --- a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-blobs/node_modules/readable-stream/node_modules/isarray/README.md +++ /dev/null @@ -1,54 +0,0 @@ - -# isarray - -`Array#isArray` for older browsers. - -## Usage - -```js -var isArray = require('isarray'); - -console.log(isArray([])); // => true -console.log(isArray({})); // => false -``` - -## Installation - -With [npm](http://npmjs.org) do - -```bash -$ npm install isarray -``` - -Then bundle for the browser with -[browserify](https://github.com/substack/browserify). - -With [component](http://component.io) do - -```bash -$ component install juliangruber/isarray -``` - -## License - -(MIT) - -Copyright (c) 2013 Julian Gruber <julian@juliangruber.com> - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies -of the Software, and to permit persons to whom the Software is furnished to do -so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-blobs/node_modules/readable-stream/node_modules/isarray/build/build.js b/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-blobs/node_modules/readable-stream/node_modules/isarray/build/build.js deleted file mode 100644 index ec58596a..00000000 --- a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-blobs/node_modules/readable-stream/node_modules/isarray/build/build.js +++ /dev/null @@ -1,209 +0,0 @@ - -/** - * Require the given path. - * - * @param {String} path - * @return {Object} exports - * @api public - */ - -function require(path, parent, orig) { - var resolved = require.resolve(path); - - // lookup failed - if (null == resolved) { - orig = orig || path; - parent = parent || 'root'; - var err = new Error('Failed to require "' + orig + '" from "' + parent + '"'); - err.path = orig; - err.parent = parent; - err.require = true; - throw err; - } - - var module = require.modules[resolved]; - - // perform real require() - // by invoking the module's - // registered function - if (!module.exports) { - module.exports = {}; - module.client = module.component = true; - module.call(this, module.exports, require.relative(resolved), module); - } - - return module.exports; -} - -/** - * Registered modules. - */ - -require.modules = {}; - -/** - * Registered aliases. - */ - -require.aliases = {}; - -/** - * Resolve `path`. - * - * Lookup: - * - * - PATH/index.js - * - PATH.js - * - PATH - * - * @param {String} path - * @return {String} path or null - * @api private - */ - -require.resolve = function(path) { - if (path.charAt(0) === '/') path = path.slice(1); - var index = path + '/index.js'; - - var paths = [ - path, - path + '.js', - path + '.json', - path + '/index.js', - path + '/index.json' - ]; - - for (var i = 0; i < paths.length; i++) { - var path = paths[i]; - if (require.modules.hasOwnProperty(path)) return path; - } - - if (require.aliases.hasOwnProperty(index)) { - return require.aliases[index]; - } -}; - -/** - * Normalize `path` relative to the current path. - * - * @param {String} curr - * @param {String} path - * @return {String} - * @api private - */ - -require.normalize = function(curr, path) { - var segs = []; - - if ('.' != path.charAt(0)) return path; - - curr = curr.split('/'); - path = path.split('/'); - - for (var i = 0; i < path.length; ++i) { - if ('..' == path[i]) { - curr.pop(); - } else if ('.' != path[i] && '' != path[i]) { - segs.push(path[i]); - } - } - - return curr.concat(segs).join('/'); -}; - -/** - * Register module at `path` with callback `definition`. - * - * @param {String} path - * @param {Function} definition - * @api private - */ - -require.register = function(path, definition) { - require.modules[path] = definition; -}; - -/** - * Alias a module definition. - * - * @param {String} from - * @param {String} to - * @api private - */ - -require.alias = function(from, to) { - if (!require.modules.hasOwnProperty(from)) { - throw new Error('Failed to alias "' + from + '", it does not exist'); - } - require.aliases[to] = from; -}; - -/** - * Return a require function relative to the `parent` path. - * - * @param {String} parent - * @return {Function} - * @api private - */ - -require.relative = function(parent) { - var p = require.normalize(parent, '..'); - - /** - * lastIndexOf helper. - */ - - function lastIndexOf(arr, obj) { - var i = arr.length; - while (i--) { - if (arr[i] === obj) return i; - } - return -1; - } - - /** - * The relative require() itself. - */ - - function localRequire(path) { - var resolved = localRequire.resolve(path); - return require(resolved, parent, path); - } - - /** - * Resolve relative to the parent. - */ - - localRequire.resolve = function(path) { - var c = path.charAt(0); - if ('/' == c) return path.slice(1); - if ('.' == c) return require.normalize(p, path); - - // resolve deps by returning - // the dep in the nearest "deps" - // directory - var segs = parent.split('/'); - var i = lastIndexOf(segs, 'deps') + 1; - if (!i) i = 0; - path = segs.slice(0, i + 1).join('/') + '/deps/' + path; - return path; - }; - - /** - * Check if module is defined at `path`. - */ - - localRequire.exists = function(path) { - return require.modules.hasOwnProperty(localRequire.resolve(path)); - }; - - return localRequire; -}; -require.register("isarray/index.js", function(exports, require, module){ -module.exports = Array.isArray || function (arr) { - return Object.prototype.toString.call(arr) == '[object Array]'; -}; - -}); -require.alias("isarray/index.js", "isarray/index.js"); - diff --git a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-blobs/node_modules/readable-stream/node_modules/isarray/component.json b/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-blobs/node_modules/readable-stream/node_modules/isarray/component.json deleted file mode 100644 index 9e31b683..00000000 --- a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-blobs/node_modules/readable-stream/node_modules/isarray/component.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "name" : "isarray", - "description" : "Array#isArray for older browsers", - "version" : "0.0.1", - "repository" : "juliangruber/isarray", - "homepage": "https://github.com/juliangruber/isarray", - "main" : "index.js", - "scripts" : [ - "index.js" - ], - "dependencies" : {}, - "keywords": ["browser","isarray","array"], - "author": { - "name": "Julian Gruber", - "email": "mail@juliangruber.com", - "url": "http://juliangruber.com" - }, - "license": "MIT" -} diff --git a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-blobs/node_modules/readable-stream/node_modules/isarray/index.js b/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-blobs/node_modules/readable-stream/node_modules/isarray/index.js deleted file mode 100644 index 5f5ad45d..00000000 --- a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-blobs/node_modules/readable-stream/node_modules/isarray/index.js +++ /dev/null @@ -1,3 +0,0 @@ -module.exports = Array.isArray || function (arr) { - return Object.prototype.toString.call(arr) == '[object Array]'; -}; diff --git a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-blobs/node_modules/readable-stream/node_modules/isarray/package.json b/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-blobs/node_modules/readable-stream/node_modules/isarray/package.json deleted file mode 100644 index 25c8581b..00000000 --- a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-blobs/node_modules/readable-stream/node_modules/isarray/package.json +++ /dev/null @@ -1,54 +0,0 @@ -{ - "name": "isarray", - "description": "Array#isArray for older browsers", - "version": "0.0.1", - "repository": { - "type": "git", - "url": "git://github.com/juliangruber/isarray.git" - }, - "homepage": "https://github.com/juliangruber/isarray", - "main": "index.js", - "scripts": { - "test": "tap test/*.js" - }, - "dependencies": {}, - "devDependencies": { - "tap": "*" - }, - "keywords": [ - "browser", - "isarray", - "array" - ], - "author": { - "name": "Julian Gruber", - "email": "mail@juliangruber.com", - "url": "http://juliangruber.com" - }, - "license": "MIT", - "_id": "isarray@0.0.1", - "dist": { - "shasum": "8a18acfca9a8f4177e09abfc6038939b05d1eedf", - "tarball": "http://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz" - }, - "_from": "isarray@0.0.1", - "_npmVersion": "1.2.18", - "_npmUser": { - "name": "juliangruber", - "email": "julian@juliangruber.com" - }, - "maintainers": [ - { - "name": "juliangruber", - "email": "julian@juliangruber.com" - } - ], - "directories": {}, - "_shasum": "8a18acfca9a8f4177e09abfc6038939b05d1eedf", - "_resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", - "readme": "\n# isarray\n\n`Array#isArray` for older browsers.\n\n## Usage\n\n```js\nvar isArray = require('isarray');\n\nconsole.log(isArray([])); // => true\nconsole.log(isArray({})); // => false\n```\n\n## Installation\n\nWith [npm](http://npmjs.org) do\n\n```bash\n$ npm install isarray\n```\n\nThen bundle for the browser with\n[browserify](https://github.com/substack/browserify).\n\nWith [component](http://component.io) do\n\n```bash\n$ component install juliangruber/isarray\n```\n\n## License\n\n(MIT)\n\nCopyright (c) 2013 Julian Gruber <julian@juliangruber.com>\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of\nthis software and associated documentation files (the \"Software\"), to deal in\nthe Software without restriction, including without limitation the rights to\nuse, copy, modify, merge, publish, distribute, sublicense, and/or sell copies\nof the Software, and to permit persons to whom the Software is furnished to do\nso, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n", - "readmeFilename": "README.md", - "bugs": { - "url": "https://github.com/juliangruber/isarray/issues" - } -} diff --git a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-blobs/node_modules/readable-stream/node_modules/string_decoder/.npmignore b/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-blobs/node_modules/readable-stream/node_modules/string_decoder/.npmignore deleted file mode 100644 index 206320cc..00000000 --- a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-blobs/node_modules/readable-stream/node_modules/string_decoder/.npmignore +++ /dev/null @@ -1,2 +0,0 @@ -build -test diff --git a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-blobs/node_modules/readable-stream/node_modules/string_decoder/LICENSE b/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-blobs/node_modules/readable-stream/node_modules/string_decoder/LICENSE deleted file mode 100644 index 6de584a4..00000000 --- a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-blobs/node_modules/readable-stream/node_modules/string_decoder/LICENSE +++ /dev/null @@ -1,20 +0,0 @@ -Copyright Joyent, Inc. and other Node contributors. - -Permission is hereby granted, free of charge, to any person obtaining a -copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to permit -persons to whom the Software is furnished to do so, subject to the -following conditions: - -The above copyright notice and this permission notice shall be included -in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-blobs/node_modules/readable-stream/node_modules/string_decoder/README.md b/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-blobs/node_modules/readable-stream/node_modules/string_decoder/README.md deleted file mode 100644 index 4d2aa001..00000000 --- a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-blobs/node_modules/readable-stream/node_modules/string_decoder/README.md +++ /dev/null @@ -1,7 +0,0 @@ -**string_decoder.js** (`require('string_decoder')`) from Node.js core - -Copyright Joyent, Inc. and other Node contributors. See LICENCE file for details. - -Version numbers match the versions found in Node core, e.g. 0.10.24 matches Node 0.10.24, likewise 0.11.10 matches Node 0.11.10. **Prefer the stable version over the unstable.** - -The *build/* directory contains a build script that will scrape the source from the [joyent/node](https://github.com/joyent/node) repo given a specific Node version. \ No newline at end of file diff --git a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-blobs/node_modules/readable-stream/node_modules/string_decoder/index.js b/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-blobs/node_modules/readable-stream/node_modules/string_decoder/index.js deleted file mode 100644 index b00e54fb..00000000 --- a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-blobs/node_modules/readable-stream/node_modules/string_decoder/index.js +++ /dev/null @@ -1,221 +0,0 @@ -// Copyright Joyent, Inc. and other Node contributors. -// -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to permit -// persons to whom the Software is furnished to do so, subject to the -// following conditions: -// -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -// USE OR OTHER DEALINGS IN THE SOFTWARE. - -var Buffer = require('buffer').Buffer; - -var isBufferEncoding = Buffer.isEncoding - || function(encoding) { - switch (encoding && encoding.toLowerCase()) { - case 'hex': case 'utf8': case 'utf-8': case 'ascii': case 'binary': case 'base64': case 'ucs2': case 'ucs-2': case 'utf16le': case 'utf-16le': case 'raw': return true; - default: return false; - } - } - - -function assertEncoding(encoding) { - if (encoding && !isBufferEncoding(encoding)) { - throw new Error('Unknown encoding: ' + encoding); - } -} - -// StringDecoder provides an interface for efficiently splitting a series of -// buffers into a series of JS strings without breaking apart multi-byte -// characters. CESU-8 is handled as part of the UTF-8 encoding. -// -// @TODO Handling all encodings inside a single object makes it very difficult -// to reason about this code, so it should be split up in the future. -// @TODO There should be a utf8-strict encoding that rejects invalid UTF-8 code -// points as used by CESU-8. -var StringDecoder = exports.StringDecoder = function(encoding) { - this.encoding = (encoding || 'utf8').toLowerCase().replace(/[-_]/, ''); - assertEncoding(encoding); - switch (this.encoding) { - case 'utf8': - // CESU-8 represents each of Surrogate Pair by 3-bytes - this.surrogateSize = 3; - break; - case 'ucs2': - case 'utf16le': - // UTF-16 represents each of Surrogate Pair by 2-bytes - this.surrogateSize = 2; - this.detectIncompleteChar = utf16DetectIncompleteChar; - break; - case 'base64': - // Base-64 stores 3 bytes in 4 chars, and pads the remainder. - this.surrogateSize = 3; - this.detectIncompleteChar = base64DetectIncompleteChar; - break; - default: - this.write = passThroughWrite; - return; - } - - // Enough space to store all bytes of a single character. UTF-8 needs 4 - // bytes, but CESU-8 may require up to 6 (3 bytes per surrogate). - this.charBuffer = new Buffer(6); - // Number of bytes received for the current incomplete multi-byte character. - this.charReceived = 0; - // Number of bytes expected for the current incomplete multi-byte character. - this.charLength = 0; -}; - - -// write decodes the given buffer and returns it as JS string that is -// guaranteed to not contain any partial multi-byte characters. Any partial -// character found at the end of the buffer is buffered up, and will be -// returned when calling write again with the remaining bytes. -// -// Note: Converting a Buffer containing an orphan surrogate to a String -// currently works, but converting a String to a Buffer (via `new Buffer`, or -// Buffer#write) will replace incomplete surrogates with the unicode -// replacement character. See https://codereview.chromium.org/121173009/ . -StringDecoder.prototype.write = function(buffer) { - var charStr = ''; - // if our last write ended with an incomplete multibyte character - while (this.charLength) { - // determine how many remaining bytes this buffer has to offer for this char - var available = (buffer.length >= this.charLength - this.charReceived) ? - this.charLength - this.charReceived : - buffer.length; - - // add the new bytes to the char buffer - buffer.copy(this.charBuffer, this.charReceived, 0, available); - this.charReceived += available; - - if (this.charReceived < this.charLength) { - // still not enough chars in this buffer? wait for more ... - return ''; - } - - // remove bytes belonging to the current character from the buffer - buffer = buffer.slice(available, buffer.length); - - // get the character that was split - charStr = this.charBuffer.slice(0, this.charLength).toString(this.encoding); - - // CESU-8: lead surrogate (D800-DBFF) is also the incomplete character - var charCode = charStr.charCodeAt(charStr.length - 1); - if (charCode >= 0xD800 && charCode <= 0xDBFF) { - this.charLength += this.surrogateSize; - charStr = ''; - continue; - } - this.charReceived = this.charLength = 0; - - // if there are no more bytes in this buffer, just emit our char - if (buffer.length === 0) { - return charStr; - } - break; - } - - // determine and set charLength / charReceived - this.detectIncompleteChar(buffer); - - var end = buffer.length; - if (this.charLength) { - // buffer the incomplete character bytes we got - buffer.copy(this.charBuffer, 0, buffer.length - this.charReceived, end); - end -= this.charReceived; - } - - charStr += buffer.toString(this.encoding, 0, end); - - var end = charStr.length - 1; - var charCode = charStr.charCodeAt(end); - // CESU-8: lead surrogate (D800-DBFF) is also the incomplete character - if (charCode >= 0xD800 && charCode <= 0xDBFF) { - var size = this.surrogateSize; - this.charLength += size; - this.charReceived += size; - this.charBuffer.copy(this.charBuffer, size, 0, size); - buffer.copy(this.charBuffer, 0, 0, size); - return charStr.substring(0, end); - } - - // or just emit the charStr - return charStr; -}; - -// detectIncompleteChar determines if there is an incomplete UTF-8 character at -// the end of the given buffer. If so, it sets this.charLength to the byte -// length that character, and sets this.charReceived to the number of bytes -// that are available for this character. -StringDecoder.prototype.detectIncompleteChar = function(buffer) { - // determine how many bytes we have to check at the end of this buffer - var i = (buffer.length >= 3) ? 3 : buffer.length; - - // Figure out if one of the last i bytes of our buffer announces an - // incomplete char. - for (; i > 0; i--) { - var c = buffer[buffer.length - i]; - - // See http://en.wikipedia.org/wiki/UTF-8#Description - - // 110XXXXX - if (i == 1 && c >> 5 == 0x06) { - this.charLength = 2; - break; - } - - // 1110XXXX - if (i <= 2 && c >> 4 == 0x0E) { - this.charLength = 3; - break; - } - - // 11110XXX - if (i <= 3 && c >> 3 == 0x1E) { - this.charLength = 4; - break; - } - } - this.charReceived = i; -}; - -StringDecoder.prototype.end = function(buffer) { - var res = ''; - if (buffer && buffer.length) - res = this.write(buffer); - - if (this.charReceived) { - var cr = this.charReceived; - var buf = this.charBuffer; - var enc = this.encoding; - res += buf.slice(0, cr).toString(enc); - } - - return res; -}; - -function passThroughWrite(buffer) { - return buffer.toString(this.encoding); -} - -function utf16DetectIncompleteChar(buffer) { - this.charReceived = buffer.length % 2; - this.charLength = this.charReceived ? 2 : 0; -} - -function base64DetectIncompleteChar(buffer) { - this.charReceived = buffer.length % 3; - this.charLength = this.charReceived ? 3 : 0; -} diff --git a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-blobs/node_modules/readable-stream/node_modules/string_decoder/package.json b/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-blobs/node_modules/readable-stream/node_modules/string_decoder/package.json deleted file mode 100644 index 0364d54b..00000000 --- a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-blobs/node_modules/readable-stream/node_modules/string_decoder/package.json +++ /dev/null @@ -1,54 +0,0 @@ -{ - "name": "string_decoder", - "version": "0.10.31", - "description": "The string_decoder module from Node core", - "main": "index.js", - "dependencies": {}, - "devDependencies": { - "tap": "~0.4.8" - }, - "scripts": { - "test": "tap test/simple/*.js" - }, - "repository": { - "type": "git", - "url": "git://github.com/rvagg/string_decoder.git" - }, - "homepage": "https://github.com/rvagg/string_decoder", - "keywords": [ - "string", - "decoder", - "browser", - "browserify" - ], - "license": "MIT", - "gitHead": "d46d4fd87cf1d06e031c23f1ba170ca7d4ade9a0", - "bugs": { - "url": "https://github.com/rvagg/string_decoder/issues" - }, - "_id": "string_decoder@0.10.31", - "_shasum": "62e203bc41766c6c28c9fc84301dab1c5310fa94", - "_from": "string_decoder@>=0.10.0 <0.11.0", - "_npmVersion": "1.4.23", - "_npmUser": { - "name": "rvagg", - "email": "rod@vagg.org" - }, - "maintainers": [ - { - "name": "substack", - "email": "mail@substack.net" - }, - { - "name": "rvagg", - "email": "rod@vagg.org" - } - ], - "dist": { - "shasum": "62e203bc41766c6c28c9fc84301dab1c5310fa94", - "tarball": "http://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz" - }, - "directories": {}, - "_resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", - "readme": "ERROR: No README data found!" -} diff --git a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-blobs/node_modules/readable-stream/package.json b/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-blobs/node_modules/readable-stream/package.json deleted file mode 100644 index b8b7ad87..00000000 --- a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-blobs/node_modules/readable-stream/package.json +++ /dev/null @@ -1,77 +0,0 @@ -{ - "name": "readable-stream", - "version": "1.1.14", - "description": "Streams3, a user-land copy of the stream library from Node.js v0.11.x", - "main": "readable.js", - "dependencies": { - "core-util-is": "~1.0.0", - "isarray": "0.0.1", - "string_decoder": "~0.10.x", - "inherits": "~2.0.1" - }, - "devDependencies": { - "tap": "~0.2.6" - }, - "scripts": { - "test": "tap test/simple/*.js" - }, - "repository": { - "type": "git", - "url": "git://github.com/isaacs/readable-stream" - }, - "keywords": [ - "readable", - "stream", - "pipe" - ], - "browser": { - "util": false - }, - "author": { - "name": "Isaac Z. Schlueter", - "email": "i@izs.me", - "url": "http://blog.izs.me/" - }, - "license": "MIT", - "gitHead": "52550840cb1d6e8a98ef9a909a4bea360bc6f7da", - "bugs": { - "url": "https://github.com/isaacs/readable-stream/issues" - }, - "_id": "readable-stream@1.1.14", - "_shasum": "7cf4c54ef648e3813084c636dd2079e166c081d9", - "_from": "readable-stream@>=1.0.26-4 <2.0.0", - "_npmVersion": "3.8.3", - "_nodeVersion": "5.10.1", - "_npmUser": { - "name": "cwmma", - "email": "calvin.metcalf@gmail.com" - }, - "dist": { - "shasum": "7cf4c54ef648e3813084c636dd2079e166c081d9", - "tarball": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.1.14.tgz" - }, - "maintainers": [ - { - "name": "isaacs", - "email": "isaacs@npmjs.com" - }, - { - "name": "tootallnate", - "email": "nathan@tootallnate.net" - }, - { - "name": "rvagg", - "email": "rod@vagg.org" - }, - { - "name": "cwmma", - "email": "calvin.metcalf@gmail.com" - } - ], - "_npmOperationalInternal": { - "host": "packages-16-east.internal.npmjs.com", - "tmp": "tmp/readable-stream-1.1.14.tgz_1460563293219_0.5682175166439265" - }, - "directories": {}, - "_resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.1.14.tgz" -} diff --git a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-blobs/node_modules/readable-stream/passthrough.js b/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-blobs/node_modules/readable-stream/passthrough.js deleted file mode 100644 index 27e8d8a5..00000000 --- a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-blobs/node_modules/readable-stream/passthrough.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require("./lib/_stream_passthrough.js") diff --git a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-blobs/node_modules/readable-stream/readable.js b/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-blobs/node_modules/readable-stream/readable.js deleted file mode 100644 index 2a8b5c6b..00000000 --- a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-blobs/node_modules/readable-stream/readable.js +++ /dev/null @@ -1,10 +0,0 @@ -exports = module.exports = require('./lib/_stream_readable.js'); -exports.Stream = require('stream'); -exports.Readable = exports; -exports.Writable = require('./lib/_stream_writable.js'); -exports.Duplex = require('./lib/_stream_duplex.js'); -exports.Transform = require('./lib/_stream_transform.js'); -exports.PassThrough = require('./lib/_stream_passthrough.js'); -if (!process.browser && process.env.READABLE_STREAM === 'disable') { - module.exports = require('stream'); -} diff --git a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-blobs/node_modules/readable-stream/transform.js b/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-blobs/node_modules/readable-stream/transform.js deleted file mode 100644 index 5d482f07..00000000 --- a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-blobs/node_modules/readable-stream/transform.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require("./lib/_stream_transform.js") diff --git a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-blobs/node_modules/readable-stream/writable.js b/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-blobs/node_modules/readable-stream/writable.js deleted file mode 100644 index e1e9efdf..00000000 --- a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-blobs/node_modules/readable-stream/writable.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require("./lib/_stream_writable.js") diff --git a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-blobs/package.json b/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-blobs/package.json deleted file mode 100644 index 3bb0b9be..00000000 --- a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-blobs/package.json +++ /dev/null @@ -1,72 +0,0 @@ -{ - "name": "level-blobs", - "version": "0.1.7", - "description": "Save binary blobs in level and stream then back", - "repository": { - "type": "git", - "url": "git://github.com/mafintosh/level-blobs.git" - }, - "keywords": [ - "level", - "db", - "blobs", - "stream", - "buffer", - "data", - "store" - ], - "dependencies": { - "once": "^1.3.0", - "readable-stream": "^1.0.26-4", - "level-peek": "1.0.6" - }, - "devDependencies": { - "tape": "^2.12.3", - "memdown": "git://github.com/maxogden/memdown", - "levelup": "^0.18.2" - }, - "scripts": { - "test": "tape test/*.js" - }, - "testling": { - "files": "test/*.js", - "browsers": [ - "ie/8..latest", - "firefox/17..latest", - "firefox/nightly", - "chrome/22..latest", - "chrome/canary", - "opera/12..latest", - "opera/next", - "safari/5.1..latest", - "ipad/6.0..latest", - "iphone/6.0..latest", - "android-browser/4.2..latest" - ] - }, - "gitHead": "adb3411fedc611ea05ba1a3462eab53aa7de4324", - "bugs": { - "url": "https://github.com/mafintosh/level-blobs/issues" - }, - "homepage": "https://github.com/mafintosh/level-blobs", - "_id": "level-blobs@0.1.7", - "_shasum": "9ab9b97bb99f1edbf9f78a3433e21ed56386bdaf", - "_from": "level-blobs@>=0.1.7 <0.2.0", - "_npmVersion": "2.0.0", - "_npmUser": { - "name": "mafintosh", - "email": "mathiasbuus@gmail.com" - }, - "maintainers": [ - { - "name": "mafintosh", - "email": "mathiasbuus@gmail.com" - } - ], - "dist": { - "shasum": "9ab9b97bb99f1edbf9f78a3433e21ed56386bdaf", - "tarball": "https://registry.npmjs.org/level-blobs/-/level-blobs-0.1.7.tgz" - }, - "directories": {}, - "_resolved": "https://registry.npmjs.org/level-blobs/-/level-blobs-0.1.7.tgz" -} diff --git a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-blobs/test/basic.js b/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-blobs/test/basic.js deleted file mode 100644 index 7798dd17..00000000 --- a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-blobs/test/basic.js +++ /dev/null @@ -1,108 +0,0 @@ -var tape = require('tape'); -var levelup = require('levelup'); -var memdown = require('memdown'); - -var blobs = function() { - return require('../')(levelup('mem', {db:memdown})); -}; - -tape('write + read', function(t) { - var bl = blobs(); - - bl.write('test', 'hello world', function(err) { - t.ok(!err); - bl.read('test', function(err, buf) { - t.ok(!err); - t.same(buf.toString(), 'hello world'); - t.end(); - }); - }); -}); - -tape('streams', function(t) { - var bl = blobs(); - var ws = bl.createWriteStream('test'); - - ws.on('finish', function() { - var rs = bl.createReadStream('test'); - var buffer = []; - - rs.on('data', function(data) { - buffer.push(data); - }); - rs.on('end', function() { - t.same(Buffer.concat(buffer).toString(), 'hello world'); - t.end(); - }); - }); - - ws.write('hello '); - ws.end('world'); -}); - -tape('random access', function(t) { - var bl = blobs(); - - bl.write('test', 'hello world', function() { - bl.read('test', {start:6}, function(err, buf) { - t.ok(!err); - t.same(buf.toString(), 'world'); - t.end(); - }); - }); -}); - -tape('append', function(t) { - var bl = blobs(); - - bl.write('test', 'hello ', function() { - bl.write('test', 'world', {append:true}, function() { - bl.read('test', {start:6}, function(err, buf) { - t.ok(!err); - t.same(buf.toString(), 'world'); - t.end(); - }); - }); - }); -}); - -tape('write read write read', function(t) { - var bl = blobs(); - - bl.write('test', 'hello', function() { - bl.read('test', function(err, buf) { - t.same(buf.toString(), 'hello'); - bl.write('test', 'world', function() { - bl.read('test', function(err, buf) { - t.same(buf.toString(), 'world'); - t.end(); - }); - }); - }); - }); -}); - -tape('write + size', function(t) { - var bl = blobs(); - - bl.size('bar', function(err, size) { - t.same(size, 0); - bl.write('bar', 'world', function() { - bl.size('bar', function(err, size) { - t.same(size, 5); - bl.size('foo', function(err, size) { - t.same(size, 0); - bl.write('baz', 'hi', function() { - bl.size('baz', function(err, size) { - t.same(size, 2); - bl.size('bar', function(err, size) { - t.same(size, 5); - t.end(); - }); - }); - }); - }); - }); - }); - }); -}); \ No newline at end of file diff --git a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-blobs/test/multi-block.js b/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-blobs/test/multi-block.js deleted file mode 100644 index 3111fffc..00000000 --- a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-blobs/test/multi-block.js +++ /dev/null @@ -1,114 +0,0 @@ -var tape = require('tape'); -var levelup = require('levelup'); -var memdown = require('memdown'); - -var blobs = function() { - return require('../')(levelup('mem', {db:memdown})); -}; - -var allocer = function() { - var i = 0; - return function() { - var buf = new Buffer(50000); - buf.fill(i++); - return buf; - }; -}; - -tape('write + read', function(t) { - var bl = blobs(); - - var output = []; - var alloc = allocer(); - var ws = bl.createWriteStream('test'); - - ws.on('finish', function() { - var rs = bl.createReadStream('test'); - var input = []; - - rs.on('data', function(data) { - input.push(data); - }); - rs.on('end', function() { - t.same(Buffer.concat(input), Buffer.concat(output)); - t.end(); - }); - }); - - for (var i = 0; i < 25; i++) { - var b = alloc(); - output.push(b); - ws.write(b); - } - ws.end(); -}); - -tape('random access', function(t) { - var bl = blobs(); - - var output = []; - var alloc = allocer(); - var ws = bl.createWriteStream('test'); - - ws.on('finish', function() { - var rs = bl.createReadStream('test', {start:77777}); - var input = []; - - rs.on('data', function(data) { - input.push(data); - }); - rs.on('end', function() { - t.same(Buffer.concat(input).length, Buffer.concat(output).slice(77777).length); - t.same(Buffer.concat(input), Buffer.concat(output).slice(77777)); - t.end(); - }); - }); - - for (var i = 0; i < 3; i++) { - var b = alloc(); - output.push(b); - ws.write(b); - } - ws.end(); -}); - -tape('append', function(t) { - var bl = blobs(); - - var output = []; - var alloc = allocer(); - var ws = bl.createWriteStream('test'); - - ws.on('finish', function() { - ws = bl.createWriteStream('test', {append:true}); - - ws.on('finish', function() { - var rs = bl.createReadStream('test'); - var input = []; - - rs.on('data', function(data) { - input.push(data); - }); - rs.on('end', function() { - t.same(Buffer.concat(input).length, Buffer.concat(output).length); - t.same(Buffer.concat(input).toString('hex'), Buffer.concat(output).toString('hex')); - t.end(); - }); - }); - - for (var i = 0; i < 3; i++) { - var b = alloc(); - output.push(b); - ws.write(b); - } - - ws.end(); - }); - - for (var i = 0; i < 3; i++) { - var b = alloc(); - output.push(b); - ws.write(b); - } - ws.end(); -}); diff --git a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-peek/.npmignore b/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-peek/.npmignore deleted file mode 100644 index 13abef4f..00000000 --- a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-peek/.npmignore +++ /dev/null @@ -1,3 +0,0 @@ -node_modules -node_modules/* -npm_debug.log diff --git a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-peek/.travis.yml b/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-peek/.travis.yml deleted file mode 100644 index 895dbd36..00000000 --- a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-peek/.travis.yml +++ /dev/null @@ -1,4 +0,0 @@ -language: node_js -node_js: - - 0.6 - - 0.8 diff --git a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-peek/LICENSE b/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-peek/LICENSE deleted file mode 100644 index b799ec00..00000000 --- a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-peek/LICENSE +++ /dev/null @@ -1,22 +0,0 @@ -Copyright (c) 2013 Dominic Tarr - -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/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-peek/README.md b/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-peek/README.md deleted file mode 100644 index b59794bb..00000000 --- a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-peek/README.md +++ /dev/null @@ -1,30 +0,0 @@ -# level-peek - -peek the first or last record in a leveldb range. - -## example - -``` js -var levelup = require('levelup') -var db = levelup(PATH_TO_DB) - -var peek = require('level-peek') - -//get the first value, 'a' or after -peek.first(db, {start: 'a'}, function (err, key, value) { - console.log(key, value) -}) - -//get last value, 'z' or before. -peek.last(db, {end: 'z'}, function (err, key, value) { - console.log(key, value) -}) -``` - - -see also, [level-fix-range](https://github.com/dominictarr/level-fix-range) -and https://github.com/rvagg/node-levelup/issues/110 - -## License - -MIT diff --git a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-peek/index.js b/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-peek/index.js deleted file mode 100644 index b0bfee7c..00000000 --- a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-peek/index.js +++ /dev/null @@ -1,75 +0,0 @@ -var fixRange = require('level-fix-range') -//get the first/last record in a range - -exports = module.exports = peek -exports.first = first -exports.last = last - -function once(emitter, events, listener) { - var remove = [] - events.forEach(function (e) { - function onEvent (arg) { - if(listener(e, arg) === false) return - remove.forEach(function (r) { - r() - }) - } - emitter.on(e, onEvent) - remove.push(function () { - emitter.removeListener(e, onEvent) - }) - }) - return emitter -} - - -function peek (db, opts, cb) { - opts.limit = opts.reverse ? 2 : 1 - var stream = once(db.createReadStream(opts), - ['data', 'error', 'end'], - function (event, data) { - if(opts.reverse && data && opts.start - && (data.key.toString() > opts.start)) - return false - if(event == 'error') cb(data) - else if(event == 'end') cb(new Error('range not found'), null, null) - else cb(null, data.key, data.value) - }) -} - -function first (db, opts, cb) { - if (!cb) { - cb = opts; - opts = {}; - } - opts.reverse = false - return peek(db, fixRange(opts), cb) -} - -//SO, this is pretty horrible, -//but it's works around an issue here -//https://github.com/rvagg/node-levelup/issues/110 - -function last (db, opts, cb) { - if (!cb) { - cb = opts; - opts = {}; - } - var start = opts.start - opts.reverse = true - return peek(db, fixRange(opts), function (err, key, value) { - if(err) { - var _start = opts.start - opts.start = null - peek (db, opts, function (_, key, value) { - if(!key) return cb(err, null, null) - var _key = key.toString() - if(_key <= _start && (!opts.end || _key >= opts.end)) - cb(_, key, value) - else cb(err, null, null) - }) - } - else cb(err, key, value) - }) -} - diff --git a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-peek/node_modules/level-fix-range/.npmignore b/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-peek/node_modules/level-fix-range/.npmignore deleted file mode 100644 index 13abef4f..00000000 --- a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-peek/node_modules/level-fix-range/.npmignore +++ /dev/null @@ -1,3 +0,0 @@ -node_modules -node_modules/* -npm_debug.log diff --git a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-peek/node_modules/level-fix-range/.travis.yml b/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-peek/node_modules/level-fix-range/.travis.yml deleted file mode 100644 index 895dbd36..00000000 --- a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-peek/node_modules/level-fix-range/.travis.yml +++ /dev/null @@ -1,4 +0,0 @@ -language: node_js -node_js: - - 0.6 - - 0.8 diff --git a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-peek/node_modules/level-fix-range/LICENSE b/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-peek/node_modules/level-fix-range/LICENSE deleted file mode 100644 index b799ec00..00000000 --- a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-peek/node_modules/level-fix-range/LICENSE +++ /dev/null @@ -1,22 +0,0 @@ -Copyright (c) 2013 Dominic Tarr - -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/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-peek/node_modules/level-fix-range/README.md b/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-peek/node_modules/level-fix-range/README.md deleted file mode 100644 index d091c82d..00000000 --- a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-peek/node_modules/level-fix-range/README.md +++ /dev/null @@ -1,42 +0,0 @@ -# level-fix-range - -make reverse ranges easier to use. - -## Stability - -Stable: Expect patches, possible features additions. - -## Example - -When you use reverse ranges, you have to reverse the `start` and `end` also, - -``` js -db.createReadStream({start: 'a', end: 'z'}) -db.createReadStream({start: 'z', end: 'a', reverse: true}) -``` - -this is confusing and bug-ridden. - -level-fix-range fixes the options so they always make sense. -if you want a range to reverse, just set reverse. - -``` js -var fix = require('level-fix-range') -db.createReadStream({start: 'a', end: 'z'}) -db.createReadStream(fix({start: 'a', end: 'z', reverse: true})) -``` - -When you either `start` _OR_ `end`, and the order is `reversed: true`, -it will also reverse the range, -so that: - -``` js -{start: X, end: null} //from X to end of database -{start: null, end: X} //from start of database to X -``` -and you will get the some data, whether you have reverse=true|false, -but only the order will change. - -## License - -MIT diff --git a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-peek/node_modules/level-fix-range/index.js b/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-peek/node_modules/level-fix-range/index.js deleted file mode 100644 index f4b676a5..00000000 --- a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-peek/node_modules/level-fix-range/index.js +++ /dev/null @@ -1,18 +0,0 @@ - -module.exports = -function fixRange(opts) { - var reverse = opts.reverse - var end = opts.end - var start = opts.start - - var range = [start, end] - if(start != null && end != null) - range.sort() - if(reverse) - range = range.reverse() - - opts.start = range[0] - opts.end = range[1] - return opts -} - diff --git a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-peek/node_modules/level-fix-range/package.json b/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-peek/node_modules/level-fix-range/package.json deleted file mode 100644 index 8dd102dc..00000000 --- a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-peek/node_modules/level-fix-range/package.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "name": "level-fix-range", - "description": "make using levelup reverse ranges easy", - "version": "1.0.2", - "homepage": "https://github.com/dominictarr/level-fix-range", - "repository": { - "type": "git", - "url": "git://github.com/dominictarr/level-fix-range.git" - }, - "dependencies": {}, - "devDependencies": { - "tape": "~0.3.2" - }, - "scripts": { - "test": "set -e; for t in test/*.js; do node $t; done" - }, - "author": { - "name": "Dominic Tarr", - "email": "dominic.tarr@gmail.com", - "url": "http://dominictarr.com" - }, - "license": "MIT", - "stability": "stable", - "readme": "# level-fix-range\n\nmake reverse ranges easier to use.\n\n## Stability\n\nStable: Expect patches, possible features additions.\n\n## Example\n\nWhen you use reverse ranges, you have to reverse the `start` and `end` also,\n\n``` js\ndb.createReadStream({start: 'a', end: 'z'})\ndb.createReadStream({start: 'z', end: 'a', reverse: true})\n```\n\nthis is confusing and bug-ridden.\n\nlevel-fix-range fixes the options so they always make sense.\nif you want a range to reverse, just set reverse.\n\n``` js\nvar fix = require('level-fix-range')\ndb.createReadStream({start: 'a', end: 'z'})\ndb.createReadStream(fix({start: 'a', end: 'z', reverse: true}))\n```\n\nWhen you either `start` _OR_ `end`, and the order is `reversed: true`,\nit will also reverse the range,\nso that:\n\n``` js\n{start: X, end: null} //from X to end of database\n{start: null, end: X} //from start of database to X\n```\nand you will get the some data, whether you have reverse=true|false,\nbut only the order will change.\n\n## License\n\nMIT\n", - "readmeFilename": "README.md", - "_id": "level-fix-range@1.0.2", - "dist": { - "shasum": "bf15b915ae36d8470c821e883ddf79cd16420828", - "tarball": "https://registry.npmjs.org/level-fix-range/-/level-fix-range-1.0.2.tgz" - }, - "_from": "level-fix-range@>=1.0.2 <1.1.0", - "_npmVersion": "1.2.3", - "_npmUser": { - "name": "dominictarr", - "email": "dominic.tarr@gmail.com" - }, - "maintainers": [ - { - "name": "dominictarr", - "email": "dominic.tarr@gmail.com" - } - ], - "directories": {}, - "_shasum": "bf15b915ae36d8470c821e883ddf79cd16420828", - "_resolved": "https://registry.npmjs.org/level-fix-range/-/level-fix-range-1.0.2.tgz" -} diff --git a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-peek/node_modules/level-fix-range/test/index.js b/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-peek/node_modules/level-fix-range/test/index.js deleted file mode 100644 index 26b5b7fe..00000000 --- a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-peek/node_modules/level-fix-range/test/index.js +++ /dev/null @@ -1,54 +0,0 @@ -var test = require('tape') -var range = require('../') - - -function reverse(t, opts) { - var _opts = JSON.parse(JSON.stringify(opts)) - var opts = range(opts) - if(opts.reverse) { - t.ok(opts.start == _opts.end) - t.ok(opts.end == _opts.start) - } - else { - t.ok(opts.start == _opts.start) - t.ok(opts.end == _opts.end) - } - t.ok(opts.reverse == _opts.reverse) - -} - -function ordered(t, opts, reverse) { - var opts = range(opts) - //don't change order if there is only start OR end, - //but not both. - - console.log([!!opts.reverse,'===', opts.start, '>', opts.end].join(' ')) - t.ok(!!opts.reverse === opts.start > opts.end, - [opts.start, opts.reverse ? '>' : '<', opts.end].join(' ') - ) -} - - -test('set correct order', function (t) { - ordered = ordered.bind(null, t) - ordered({start: 'a', end: 'z'}) - ordered({start: 'v', end: 'e'}) - ordered({start: 'e', end: 'v', reverse: true}) - ordered({start: 'v', end: 'e', reverse: true}) - t.end() -}) - -//{start: 'v'} and {end: 'v'} are both valid orders, -//from start: 'v' to the end of the db, -//and end: 'v' from the start of the db to 'v'. -//so don't fix them. - -test("don't change order", function (t) { - reverse = reverse.bind(null, t) - reverse({start: 'v', reverse: true}) - reverse({ end: 'v', reverse: true}) - reverse({ end: 'v' }) - reverse({start: 'v' }) - t.end() -}) - diff --git a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-peek/package.json b/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-peek/package.json deleted file mode 100644 index 1aa94814..00000000 --- a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-peek/package.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "name": "level-peek", - "description": "peek the first or last record in a leveldb range.", - "version": "1.0.6", - "homepage": "https://github.com/dominictarr/level-peek", - "repository": { - "type": "git", - "url": "git://github.com/dominictarr/level-peek.git" - }, - "dependencies": { - "level-fix-range": "~1.0.2" - }, - "devDependencies": { - "levelup": "~0.6.2", - "tape": "~0.3.2" - }, - "scripts": { - "test": "set -e; for t in test/*.js; do node $t; done" - }, - "author": { - "name": "Dominic Tarr", - "email": "dominic.tarr@gmail.com", - "url": "http://dominictarr.com" - }, - "license": "MIT", - "_id": "level-peek@1.0.6", - "dist": { - "shasum": "bec51c72a82ee464d336434c7c876c3fcbcce77f", - "tarball": "https://registry.npmjs.org/level-peek/-/level-peek-1.0.6.tgz" - }, - "_from": "level-peek@>=1.0.6 <2.0.0", - "_npmVersion": "1.2.3", - "_npmUser": { - "name": "dominictarr", - "email": "dominic.tarr@gmail.com" - }, - "maintainers": [ - { - "name": "dominictarr", - "email": "dominic.tarr@gmail.com" - } - ], - "directories": {}, - "_shasum": "bec51c72a82ee464d336434c7c876c3fcbcce77f", - "_resolved": "https://registry.npmjs.org/level-peek/-/level-peek-1.0.6.tgz" -} diff --git a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-peek/test/index.js b/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-peek/test/index.js deleted file mode 100644 index f5f600d6..00000000 --- a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-peek/test/index.js +++ /dev/null @@ -1,86 +0,0 @@ - - -var test = require('tape') -var peek = require('../') - -var levelup = require('levelup') - -var db = levelup('/tmp/test-level-peek') - -db.batch([ - {key: 'A', value: 'apple', type: 'put'}, - {key: 'B', value: 'banana', type: 'put'}, - {key: 'C', value: 'cherry', type: 'put'}, - {key: 'D', value: 'durian', type: 'put'}, - {key: 'E', value: 'elder-berry', type: 'put'}, -], function (err) { - if(err) throw err - - - test('peek.first', function (t) { - var n = 7 - - peek.first(db, {}, function (err, key, value) { - t.equal(value, 'apple') - t.end() - }) - - }) - - test('peek.last', function (t) { - - peek.last(db, {}, function (err, key, value) { - t.equal(value, 'elder-berry') - t.end() - }) - - }) - - test('peek.last({end: "C"})', function (t) { - - peek.last(db, {end: 'C'}, function (err, key, value) { - console.log('LAST') - t.equal(value, 'cherry') - t.end() - }) - - }) - - test('peek.last({end: "D~"})', function (t) { - - peek.last(db, {end: 'D~'}, function (err, key, value) { - console.log('LAST') - t.equal(value, 'durian') - t.end() - }) - }) - - //start: from a middle record - test('peek.first({start: "C"})', function (t) { - - peek.first(db, {start: 'C'}, function (err, key, value) { - t.equal(value, 'cherry') - t.end() - }) - - }) - - //start to after the last record. - test('peek.last({end: "E~"})', function (t) { - - peek.last(db, {end: 'E~'}, function (err, key, value) { - t.equal(value, 'elder-berry') - t.end() - }) - - }) - - test("peek.last({start: 'E~', end: 'E!'})", function (t) { - peek.last(db, {start: 'E~', end: 'E!'}, function (err, key, value) { - t.equal(value, null) - t.end() - }) - }) -}) - - diff --git a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-peek/test/test2.js b/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-peek/test/test2.js deleted file mode 100644 index 7298529d..00000000 --- a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-peek/test/test2.js +++ /dev/null @@ -1,40 +0,0 @@ - - -var test = require('tape') -var peek = require('../') - -var levelup = require('levelup') - -var db = levelup('/tmp/test-level-peek2') - -db.batch([ - {key: 'key!0000001', value: 'foo', type: 'put'}, - {key: 'key!0000002', value: 'bar', type: 'put'}, - {key: 'key!0000003', value: 'baz', type: 'put'}, - {key: '~~~', value: 'EOF', type: 'put'}, -], function (err) { - if(err) throw err - - - test('last', function (t) { - var n = 2 - - peek.last(db, {start: 'key ', end: 'key~'}, function (err, key, value) { - t.equal(value, 'baz') - t.end() - }) - }) - - test('first', function (t) { - var n = 2 - - peek.first(db, {start: 'key ', end: 'key~'}, function (err, key, value) { - t.equal(value, 'foo') - t.end() - }) - }) - - -}) - - diff --git a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-sublevel/.npmignore b/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-sublevel/.npmignore deleted file mode 100644 index 13abef4f..00000000 --- a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-sublevel/.npmignore +++ /dev/null @@ -1,3 +0,0 @@ -node_modules -node_modules/* -npm_debug.log diff --git a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-sublevel/.travis.yml b/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-sublevel/.travis.yml deleted file mode 100644 index 6e5919de..00000000 --- a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-sublevel/.travis.yml +++ /dev/null @@ -1,3 +0,0 @@ -language: node_js -node_js: - - "0.10" diff --git a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-sublevel/LICENSE b/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-sublevel/LICENSE deleted file mode 100644 index 0983b0ae..00000000 --- a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-sublevel/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (c) 2013 Dominic Tarr - -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/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-sublevel/README.md b/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-sublevel/README.md deleted file mode 100644 index 8d137636..00000000 --- a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-sublevel/README.md +++ /dev/null @@ -1,99 +0,0 @@ -# level-sublevel - -Separate sections of levelup, with hooks! - -[![build status](https://secure.travis-ci.org/dominictarr/level-sublevel.png)](http://travis-ci.org/dominictarr/level-sublevel) - -This module allows you to create seperate sections of a -[levelup](https://github.com/rvagg/node-levelup) database, -kinda like tables in an sql database, but evented, and ranged, -for real-time changing data. - -## Stability - -Unstable: Expect patches and features, possible api changes. - -This is module is working well, but may change in the future as its use is futher explored. - -## Example - -``` js -var LevelUp = require('levelup') -var Sublevel = require('level-sublevel') - -var db = Sublevel(LevelUp('/tmp/sublevel-example')) -var sub = db.sublevel('stuff') - -//put a key into the main levelup -db.put(key, value, function () { - -}) - -//put a key into the sub-section! -sub.put(key2, value, function () { - -}) -``` - -Sublevel prefixes each subsection so that it will not collide -with the outer db when saving or reading! - -## Hooks - -Hooks are specially built into Sublevel so that you can -do all sorts of clever stuff, like generating views or -logs when records are inserted! - -Records added via hooks will be atomically inserted with the triggering change. - -### Hooks Example - -Whenever a record is inserted, -save an index to it by the time it was inserted. - -``` js -var sub = db.sublevel('SEQ') - -db.pre(function (ch, add) { - add({ - key: ''+Date.now(), - value: ch.key, - type: 'put', - prefix: sub //NOTE pass the destination db to add - //and the value will end up in that subsection! - }) -}) - -db.put('key', 'VALUE', function (err) { - - //read all the records inserted by the hook! - - sub.createReadStream() - .on('data', console.log) - -}) -``` - -Notice that `sub` is the second argument to `add`, -which tells the hook to save the new record in the `sub` section. - -## Batches - -In `sublevel` batches also support a `prefix: subdb` property, -if set, this row will be inserted into that database section, -instead of the current section. - -``` js -var sub1 = db.sublevel('SUB_1') -var sub2 = db.sublevel('SUM_2') - -sub.batch([ - {key: 'key', value: 'Value', type: 'put'}, - {key: 'key', value: 'Value', type: 'put', prefix: sub2}, -], function (err) {...}) -``` - -## License - -MIT - diff --git a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-sublevel/batch.js b/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-sublevel/batch.js deleted file mode 100644 index 9320e733..00000000 --- a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-sublevel/batch.js +++ /dev/null @@ -1,38 +0,0 @@ -function addOperation (type, key, value, options) { - var operation = { - type: type, - key: key, - value: value, - options: options - } - - if (options && options.prefix) { - operation.prefix = options.prefix - delete options.prefix - } - - this._operations.push(operation) - - return this -} - -function Batch(sdb) { - this._operations = [] - this._sdb = sdb - - this.put = addOperation.bind(this, 'put') - this.del = addOperation.bind(this, 'del') -} - -var B = Batch.prototype - - -B.clear = function () { - this._operations = [] -} - -B.write = function (cb) { - this._sdb.batch(this._operations, cb) -} - -module.exports = Batch diff --git a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-sublevel/examples/queue.js b/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-sublevel/examples/queue.js deleted file mode 100644 index d28292c2..00000000 --- a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-sublevel/examples/queue.js +++ /dev/null @@ -1,66 +0,0 @@ -var shasum = require('shasum') - -//if a job starts, and another is queued before the current job ends, -//delay it, so that the job is only triggered once. - - -module.exports = function (input, jobs, map, work) { - if(!work) work = map, map = function (data) { return data.key } - //create a subsection for the jobs, - //if you don't pass in a separate db, - //create a section inside the input - var pending = {}, running = {} - - if('string' === typeof jobs) - jobs = input.sublevel(jobs) - - var retry = [] - - function doJob (data) { - //don't process deletes! - if(!data.value) return - var hash = shasum(data.value) - - if(!running[hash]) - running[hash] = true - else return - - var done = false - - work(data.value, function (err) { - if(done) return - done = true - if(err) { - running[hash] - return setTimeout(function () { - doJob(data) - }, 500) - } - - jobs.del(data.key, function (err) { - if(err) return retry.push(data) - delete running[hash] - if(pending[hash]) { - delete pending[hash] - doJob(data) - } - }) - }) - } - - input.pre(function (ch, add) { - var key = map(ch) - var hash = shasum(key) - console.log('KEY', key) - if(!pending[hash]) - add({key: Date.now(), value: key, type: 'put'}, jobs) - else - pending[hash] = (0 || pending[hash]) + 1 - }) - - jobs.createReadStream().on('data', doJob) - jobs.post(doJob) - - return jobs -} - diff --git a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-sublevel/examples/trigger.js b/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-sublevel/examples/trigger.js deleted file mode 100644 index 36f01dcc..00000000 --- a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-sublevel/examples/trigger.js +++ /dev/null @@ -1,26 +0,0 @@ - -var db = require('../')(require('levelup')('/tmp/whatever')) -var copy = require('../')(require('levelup')('/tmp/whatever2')) - -var makeQueue = require('./queue') - -makeQueue(db, 'jobs', function (key, done) { - console.log("JOB KEY", key) - db.get(key, function (err, value) { - console.log(key, value, err) - value && copy.put(key, value, done) || done() - }) -}) - -db.put('hello' + Date.now(), 'value_' + new Date(), function () { - - setTimeout(function () { - - copy - .createReadStream() - .on('data', console.log) - - }, 1000) - -}) - diff --git a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-sublevel/index.js b/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-sublevel/index.js deleted file mode 100644 index bf5ef062..00000000 --- a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-sublevel/index.js +++ /dev/null @@ -1,90 +0,0 @@ -var EventEmitter = require('events').EventEmitter -var next = process.nextTick -var SubDb = require('./sub') -var Batch = require('./batch') -var fixRange = require('level-fix-range') - -var Hooks = require('level-hooks') - -module.exports = function (_db, options) { - function DB () {} - DB.prototype = _db - var db = new DB() - - if (db.sublevel) return db - - options = options || {} - - //use \xff (255) as the seperator, - //so that sections of the database will sort after the regular keys - var sep = options.sep = options.sep || '\xff' - db._options = options - - Hooks(db) - - db.sublevels = {} - - db.sublevel = function (prefix, options) { - if(db.sublevels[prefix]) - return db.sublevels[prefix] - return new SubDb(db, prefix, options || this._options) - } - - db.methods = {} - - db.prefix = function (key) { - return '' + (key || '') - } - - db.pre = function (range, hook) { - if(!hook) - hook = range, range = { - max : sep - } - return db.hooks.pre(range, hook) - } - - db.post = function (range, hook) { - if(!hook) - hook = range, range = { - max : sep - } - return db.hooks.post(range, hook) - } - - function safeRange(fun) { - return function (opts) { - opts = opts || {} - opts = fixRange(opts) - - if(opts.reverse) opts.start = opts.start || sep - else opts.end = opts.end || sep - - return fun.call(db, opts) - } - } - - db.readStream = - db.createReadStream = safeRange(db.createReadStream) - db.keyStream = - db.createKeyStream = safeRange(db.createKeyStream) - db.valuesStream = - db.createValueStream = safeRange(db.createValueStream) - - var batch = db.batch - db.batch = function (changes, opts, cb) { - if(!Array.isArray(changes)) - return new Batch(db) - changes.forEach(function (e) { - if(e.prefix) { - if('function' === typeof e.prefix.prefix) - e.key = e.prefix.prefix(e.key) - else if('string' === typeof e.prefix) - e.key = e.prefix + e.key - } - }) - batch.call(db, changes, opts, cb) - } - return db -} - diff --git a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-sublevel/node_modules/level-fix-range/.npmignore b/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-sublevel/node_modules/level-fix-range/.npmignore deleted file mode 100644 index 13abef4f..00000000 --- a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-sublevel/node_modules/level-fix-range/.npmignore +++ /dev/null @@ -1,3 +0,0 @@ -node_modules -node_modules/* -npm_debug.log diff --git a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-sublevel/node_modules/level-fix-range/.travis.yml b/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-sublevel/node_modules/level-fix-range/.travis.yml deleted file mode 100644 index 895dbd36..00000000 --- a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-sublevel/node_modules/level-fix-range/.travis.yml +++ /dev/null @@ -1,4 +0,0 @@ -language: node_js -node_js: - - 0.6 - - 0.8 diff --git a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-sublevel/node_modules/level-fix-range/LICENSE b/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-sublevel/node_modules/level-fix-range/LICENSE deleted file mode 100644 index b799ec00..00000000 --- a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-sublevel/node_modules/level-fix-range/LICENSE +++ /dev/null @@ -1,22 +0,0 @@ -Copyright (c) 2013 Dominic Tarr - -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/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-sublevel/node_modules/level-fix-range/README.md b/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-sublevel/node_modules/level-fix-range/README.md deleted file mode 100644 index d091c82d..00000000 --- a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-sublevel/node_modules/level-fix-range/README.md +++ /dev/null @@ -1,42 +0,0 @@ -# level-fix-range - -make reverse ranges easier to use. - -## Stability - -Stable: Expect patches, possible features additions. - -## Example - -When you use reverse ranges, you have to reverse the `start` and `end` also, - -``` js -db.createReadStream({start: 'a', end: 'z'}) -db.createReadStream({start: 'z', end: 'a', reverse: true}) -``` - -this is confusing and bug-ridden. - -level-fix-range fixes the options so they always make sense. -if you want a range to reverse, just set reverse. - -``` js -var fix = require('level-fix-range') -db.createReadStream({start: 'a', end: 'z'}) -db.createReadStream(fix({start: 'a', end: 'z', reverse: true})) -``` - -When you either `start` _OR_ `end`, and the order is `reversed: true`, -it will also reverse the range, -so that: - -``` js -{start: X, end: null} //from X to end of database -{start: null, end: X} //from start of database to X -``` -and you will get the some data, whether you have reverse=true|false, -but only the order will change. - -## License - -MIT diff --git a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-sublevel/node_modules/level-fix-range/index.js b/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-sublevel/node_modules/level-fix-range/index.js deleted file mode 100644 index 88626b89..00000000 --- a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-sublevel/node_modules/level-fix-range/index.js +++ /dev/null @@ -1,24 +0,0 @@ -var clone = require('clone') - -module.exports = -function fixRange(opts) { - opts = clone(opts) - - var reverse = opts.reverse - var end = opts.max || opts.end - var start = opts.min || opts.start - - var range = [start, end] - if(start != null && end != null) - range.sort() - if(reverse) - range = range.reverse() - - opts.start = range[0] - opts.end = range[1] - - delete opts.min - delete opts.max - - return opts -} diff --git a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-sublevel/node_modules/level-fix-range/node_modules/clone/.npmignore b/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-sublevel/node_modules/level-fix-range/node_modules/clone/.npmignore deleted file mode 100644 index c2658d7d..00000000 --- a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-sublevel/node_modules/level-fix-range/node_modules/clone/.npmignore +++ /dev/null @@ -1 +0,0 @@ -node_modules/ diff --git a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-sublevel/node_modules/level-fix-range/node_modules/clone/.travis.yml b/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-sublevel/node_modules/level-fix-range/node_modules/clone/.travis.yml deleted file mode 100644 index 58f23716..00000000 --- a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-sublevel/node_modules/level-fix-range/node_modules/clone/.travis.yml +++ /dev/null @@ -1,5 +0,0 @@ -language: node_js -node_js: - - 0.6 - - 0.8 - - 0.10 diff --git a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-sublevel/node_modules/level-fix-range/node_modules/clone/LICENSE b/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-sublevel/node_modules/level-fix-range/node_modules/clone/LICENSE deleted file mode 100644 index fc808cce..00000000 --- a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-sublevel/node_modules/level-fix-range/node_modules/clone/LICENSE +++ /dev/null @@ -1,18 +0,0 @@ -Copyright © 2011-2014 Paul Vorbach - -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, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-sublevel/node_modules/level-fix-range/node_modules/clone/README.md b/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-sublevel/node_modules/level-fix-range/node_modules/clone/README.md deleted file mode 100644 index d7231cfc..00000000 --- a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-sublevel/node_modules/level-fix-range/node_modules/clone/README.md +++ /dev/null @@ -1,126 +0,0 @@ -# clone - -[![build status](https://secure.travis-ci.org/pvorb/node-clone.png)](http://travis-ci.org/pvorb/node-clone) - -offers foolproof _deep cloning_ of variables in JavaScript. - - -## Installation - - npm install clone - -or - - ender build clone - - -## Example - -~~~ javascript -var clone = require('clone'); - -var a, b; - -a = { foo: { bar: 'baz' } }; // initial value of a - -b = clone(a); // clone a -> b -a.foo.bar = 'foo'; // change a - -console.log(a); // show a -console.log(b); // show b -~~~ - -This will print: - -~~~ javascript -{ foo: { bar: 'foo' } } -{ foo: { bar: 'baz' } } -~~~ - -**clone** masters cloning simple objects (even with custom prototype), arrays, -Date objects, and RegExp objects. Everything is cloned recursively, so that you -can clone dates in arrays in objects, for example. - - -## API - -`clone(val, circular, depth)` - - * `val` -- the value that you want to clone, any type allowed - * `circular` -- boolean - - Call `clone` with `circular` set to `false` if you are certain that `obj` - contains no circular references. This will give better performance if needed. - There is no error if `undefined` or `null` is passed as `obj`. - * `depth` -- depth to which the object is to be cloned (optional, - defaults to infinity) - -`clone.clonePrototype(obj)` - - * `obj` -- the object that you want to clone - -Does a prototype clone as -[described by Oran Looney](http://oranlooney.com/functional-javascript/). - - -## Circular References - -~~~ javascript -var a, b; - -a = { hello: 'world' }; - -a.myself = a; -b = clone(a); - -console.log(b); -~~~ - -This will print: - -~~~ javascript -{ hello: "world", myself: [Circular] } -~~~ - -So, `b.myself` points to `b`, not `a`. Neat! - - -## Test - - npm test - - -## Caveat - -Some special objects like a socket or `process.stdout`/`stderr` are known to not -be cloneable. If you find other objects that cannot be cloned, please [open an -issue](https://github.com/pvorb/node-clone/issues/new). - - -## Bugs and Issues - -If you encounter any bugs or issues, feel free to [open an issue at -github](https://github.com/pvorb/node-clone/issues) or send me an email to -. I also always like to hear from you, if you’re using my code. - -## License - -Copyright © 2011-2014 [Paul Vorbach](http://paul.vorba.ch/) and -[contributors](https://github.com/pvorb/node-clone/graphs/contributors). - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the “Software”), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of -the Software, and to permit persons to whom the Software is furnished to do so, -subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-sublevel/node_modules/level-fix-range/node_modules/clone/clone.js b/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-sublevel/node_modules/level-fix-range/node_modules/clone/clone.js deleted file mode 100644 index f8fa3159..00000000 --- a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-sublevel/node_modules/level-fix-range/node_modules/clone/clone.js +++ /dev/null @@ -1,144 +0,0 @@ -'use strict'; - -function objectToString(o) { - return Object.prototype.toString.call(o); -} - -// shim for Node's 'util' package -// DO NOT REMOVE THIS! It is required for compatibility with EnderJS (http://enderjs.com/). -var util = { - isArray: function (ar) { - return Array.isArray(ar) || (typeof ar === 'object' && objectToString(ar) === '[object Array]'); - }, - isDate: function (d) { - return typeof d === 'object' && objectToString(d) === '[object Date]'; - }, - isRegExp: function (re) { - return typeof re === 'object' && objectToString(re) === '[object RegExp]'; - }, - getRegExpFlags: function (re) { - var flags = ''; - re.global && (flags += 'g'); - re.ignoreCase && (flags += 'i'); - re.multiline && (flags += 'm'); - return flags; - } -}; - - -if (typeof module === 'object') - module.exports = clone; - -/** - * Clones (copies) an Object using deep copying. - * - * This function supports circular references by default, but if you are certain - * there are no circular references in your object, you can save some CPU time - * by calling clone(obj, false). - * - * Caution: if `circular` is false and `parent` contains circular references, - * your program may enter an infinite loop and crash. - * - * @param `parent` - the object to be cloned - * @param `circular` - set to true if the object to be cloned may contain - * circular references. (optional - true by default) - * @param `depth` - set to a number if the object is only to be cloned to - * a particular depth. (optional - defaults to Infinity) - * @param `prototype` - sets the prototype to be used when cloning an object. - * (optional - defaults to parent prototype). -*/ - -function clone(parent, circular, depth, prototype) { - // maintain two arrays for circular references, where corresponding parents - // and children have the same index - var allParents = []; - var allChildren = []; - - var useBuffer = typeof Buffer != 'undefined'; - - if (typeof circular == 'undefined') - circular = true; - - if (typeof depth == 'undefined') - depth = Infinity; - - // recurse this function so we don't reset allParents and allChildren - function _clone(parent, depth) { - // cloning null always returns null - if (parent === null) - return null; - - if (depth == 0) - return parent; - - var child; - var proto; - if (typeof parent != 'object') { - return parent; - } - - if (util.isArray(parent)) { - child = []; - } else if (util.isRegExp(parent)) { - child = new RegExp(parent.source, util.getRegExpFlags(parent)); - if (parent.lastIndex) child.lastIndex = parent.lastIndex; - } else if (util.isDate(parent)) { - child = new Date(parent.getTime()); - } else if (useBuffer && Buffer.isBuffer(parent)) { - child = new Buffer(parent.length); - parent.copy(child); - return child; - } else { - if (typeof prototype == 'undefined') { - proto = Object.getPrototypeOf(parent); - child = Object.create(proto); - } - else { - child = Object.create(prototype); - proto = prototype; - } - } - - if (circular) { - var index = allParents.indexOf(parent); - - if (index != -1) { - return allChildren[index]; - } - allParents.push(parent); - allChildren.push(child); - } - - for (var i in parent) { - var attrs; - if (proto) { - attrs = Object.getOwnPropertyDescriptor(proto, i); - } - - if (attrs && attrs.set == null) { - continue; - } - child[i] = _clone(parent[i], depth - 1); - } - - return child; - } - - return _clone(parent, depth); -} - -/** - * Simple flat clone using prototype, accepts only objects, usefull for property - * override on FLAT configuration object (no nested props). - * - * USE WITH CAUTION! This may not behave as you wish if you do not know how this - * works. - */ -clone.clonePrototype = function(parent) { - if (parent === null) - return null; - - var c = function () {}; - c.prototype = parent; - return new c(); -}; diff --git a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-sublevel/node_modules/level-fix-range/node_modules/clone/package.json b/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-sublevel/node_modules/level-fix-range/node_modules/clone/package.json deleted file mode 100644 index 01fc767d..00000000 --- a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-sublevel/node_modules/level-fix-range/node_modules/clone/package.json +++ /dev/null @@ -1,126 +0,0 @@ -{ - "name": "clone", - "description": "deep cloning of objects and arrays", - "tags": [ - "clone", - "object", - "array", - "function", - "date" - ], - "version": "0.1.19", - "repository": { - "type": "git", - "url": "git://github.com/pvorb/node-clone.git" - }, - "bugs": { - "url": "https://github.com/pvorb/node-clone/issues" - }, - "main": "clone.js", - "author": { - "name": "Paul Vorbach", - "email": "paul@vorba.ch", - "url": "http://paul.vorba.ch/" - }, - "contributors": [ - { - "name": "Blake Miner", - "email": "miner.blake@gmail.com", - "url": "http://www.blakeminer.com/" - }, - { - "name": "Tian You", - "email": "axqd001@gmail.com", - "url": "http://blog.axqd.net/" - }, - { - "name": "George Stagas", - "email": "gstagas@gmail.com", - "url": "http://stagas.com/" - }, - { - "name": "Tobiasz Cudnik", - "email": "tobiasz.cudnik@gmail.com", - "url": "https://github.com/TobiaszCudnik" - }, - { - "name": "Pavel Lang", - "email": "langpavel@phpskelet.org", - "url": "https://github.com/langpavel" - }, - { - "name": "Dan MacTough", - "url": "http://yabfog.com/" - }, - { - "name": "w1nk", - "url": "https://github.com/w1nk" - }, - { - "name": "Hugh Kennedy", - "url": "http://twitter.com/hughskennedy" - }, - { - "name": "Dustin Diaz", - "url": "http://dustindiaz.com" - }, - { - "name": "Ilya Shaisultanov", - "url": "https://github.com/diversario" - }, - { - "name": "Nathan MacInnes", - "email": "nathan@macinn.es", - "url": "http://macinn.es/" - }, - { - "name": "Benjamin E. Coe", - "email": "ben@npmjs.com", - "url": "https://twitter.com/benjamincoe" - }, - { - "name": "Nathan Zadoks", - "url": "https://github.com/nathan7" - }, - { - "name": "Róbert Oroszi", - "email": "robert+gh@oroszi.net", - "url": "https://github.com/oroce" - } - ], - "license": "MIT", - "engines": { - "node": "*" - }, - "dependencies": {}, - "devDependencies": { - "underscore": "*", - "nodeunit": "*" - }, - "optionalDependencies": {}, - "scripts": { - "test": "nodeunit test.js" - }, - "gitHead": "bb11a43363a0f69e8ac014cb5376ce215ea1f8fd", - "homepage": "https://github.com/pvorb/node-clone", - "_id": "clone@0.1.19", - "_shasum": "613fb68639b26a494ac53253e15b1a6bd88ada85", - "_from": "clone@>=0.1.9 <0.2.0", - "_npmVersion": "1.4.14", - "_npmUser": { - "name": "pvorb", - "email": "paul@vorba.ch" - }, - "maintainers": [ - { - "name": "pvorb", - "email": "paul@vorb.de" - } - ], - "dist": { - "shasum": "613fb68639b26a494ac53253e15b1a6bd88ada85", - "tarball": "https://registry.npmjs.org/clone/-/clone-0.1.19.tgz" - }, - "directories": {}, - "_resolved": "https://registry.npmjs.org/clone/-/clone-0.1.19.tgz" -} diff --git a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-sublevel/node_modules/level-fix-range/node_modules/clone/test.js b/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-sublevel/node_modules/level-fix-range/node_modules/clone/test.js deleted file mode 100644 index cb3d1663..00000000 --- a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-sublevel/node_modules/level-fix-range/node_modules/clone/test.js +++ /dev/null @@ -1,289 +0,0 @@ -if(module.parent === null) { - console.log('Run this test file with nodeunit:'); - console.log('$ nodeunit test.js'); -} - - -var clone = require('./'); -var util = require('util'); -var _ = require('underscore'); - - - -exports["clone string"] = function(test) { - test.expect(2); // how many tests? - - var a = "foo"; - test.strictEqual(clone(a), a); - a = ""; - test.strictEqual(clone(a), a); - - test.done(); -}; - - - -exports["clone number"] = function(test) { - test.expect(5); // how many tests? - - var a = 0; - test.strictEqual(clone(a), a); - a = 1; - test.strictEqual(clone(a), a); - a = -1000; - test.strictEqual(clone(a), a); - a = 3.1415927; - test.strictEqual(clone(a), a); - a = -3.1415927; - test.strictEqual(clone(a), a); - - test.done(); -}; - - - -exports["clone date"] = function(test) { - test.expect(3); // how many tests? - - var a = new Date; - var c = clone(a); - test.ok(a instanceof Date); - test.ok(c instanceof Date); - test.equal(c.getTime(), a.getTime()); - - test.done(); -}; - - - -exports["clone object"] = function(test) { - test.expect(2); // how many tests? - - var a = { foo: { bar: "baz" } }; - var b = clone(a); - - test.ok(_(a).isEqual(b), "underscore equal"); - test.deepEqual(b, a); - - test.done(); -}; - - - -exports["clone array"] = function(test) { - test.expect(2); // how many tests? - - var a = [ - { foo: "bar" }, - "baz" - ]; - var b = clone(a); - - test.ok(_(a).isEqual(b), "underscore equal"); - test.deepEqual(b, a); - - test.done(); -}; - -exports["clone buffer"] = function(test) { - test.expect(1); - - var a = new Buffer("this is a test buffer"); - var b = clone(a); - - // no underscore equal since it has no concept of Buffers - test.deepEqual(b, a); - test.done(); -}; - - - -exports["clone regexp"] = function(test) { - test.expect(5); - - var a = /abc123/gi; - var b = clone(a); - - test.deepEqual(b, a); - - var c = /a/g; - test.ok(c.lastIndex === 0); - - c.exec('123a456a'); - test.ok(c.lastIndex === 4); - - var d = clone(c); - test.ok(d.global); - test.ok(d.lastIndex === 4); - - test.done(); -}; - - -exports["clone object containing array"] = function(test) { - test.expect(2); // how many tests? - - var a = { - arr1: [ { a: '1234', b: '2345' } ], - arr2: [ { c: '345', d: '456' } ] - }; - var b = clone(a); - - test.ok(_(a).isEqual(b), "underscore equal"); - test.deepEqual(b, a); - - test.done(); -}; - - - -exports["clone object with circular reference"] = function(test) { - test.expect(8); // how many tests? - - var _ = test.ok; - var c = [1, "foo", {'hello': 'bar'}, function() {}, false, [2]]; - var b = [c, 2, 3, 4]; - var a = {'b': b, 'c': c}; - a.loop = a; - a.loop2 = a; - c.loop = c; - c.aloop = a; - var aCopy = clone(a); - _(a != aCopy); - _(a.c != aCopy.c); - _(aCopy.c == aCopy.b[0]); - _(aCopy.c.loop.loop.aloop == aCopy); - _(aCopy.c[0] == a.c[0]); - - //console.log(util.inspect(aCopy, true, null) ); - //console.log("------------------------------------------------------------"); - //console.log(util.inspect(a, true, null) ); - _(eq(a, aCopy)); - aCopy.c[0] = 2; - _(!eq(a, aCopy)); - aCopy.c = "2"; - _(!eq(a, aCopy)); - //console.log("------------------------------------------------------------"); - //console.log(util.inspect(aCopy, true, null) ); - - function eq(x, y) { - return util.inspect(x, true, null) === util.inspect(y, true, null); - } - - test.done(); -}; - - - -exports['clonePrototype'] = function(test) { - test.expect(3); // how many tests? - - var a = { - a: "aaa", - x: 123, - y: 45.65 - }; - var b = clone.clonePrototype(a); - - test.strictEqual(b.a, a.a); - test.strictEqual(b.x, a.x); - test.strictEqual(b.y, a.y); - - test.done(); -} - -exports['cloneWithinNewVMContext'] = function(test) { - test.expect(3); - var vm = require('vm'); - var ctx = vm.createContext({ clone: clone }); - var script = "clone( {array: [1, 2, 3], date: new Date(), regex: /^foo$/ig} );"; - var results = vm.runInContext(script, ctx); - test.ok(results.array instanceof Array); - test.ok(results.date instanceof Date); - test.ok(results.regex instanceof RegExp); - test.done(); -} - -exports['cloneObjectWithNoConstructor'] = function(test) { - test.expect(3); - var n = null; - var a = { foo: 'bar' }; - a.__proto__ = n; - test.ok(typeof a === 'object'); - test.ok(typeof a !== null); - var b = clone(a); - test.ok(a.foo, b.foo); - test.done(); -} - -exports['clone object with depth argument'] = function (test) { - test.expect(6); - var a = { - foo: { - bar : { - baz : 'qux' - } - } - }; - var b = clone(a, false, 1); - test.deepEqual(b, a); - test.notEqual(b, a); - test.strictEqual(b.foo, a.foo); - - b = clone(a, true, 2); - test.deepEqual(b, a); - test.notEqual(b.foo, a.foo); - test.strictEqual(b.foo.bar, a.foo.bar); - test.done(); -} - -exports['maintain prototype chain in clones'] = function (test) { - test.expect(1); - function Constructor() {} - var a = new Constructor(); - var b = clone(a); - test.strictEqual(Object.getPrototypeOf(a), Object.getPrototypeOf(b)); - test.done(); -} - -exports['parent prototype is overriden with prototype provided'] = function (test) { - test.expect(1); - function Constructor() {} - var a = new Constructor(); - var b = clone(a, true, Infinity, null); - test.strictEqual(b.__defineSetter__, undefined); - test.done(); -} - -exports['clone object with null children'] = function(test) { - test.expect(1); - var a = { - foo: { - bar: null, - baz: { - qux: false - } - } - }; - var b = clone(a); - test.deepEqual(b, a); - test.done(); -} - -exports['clone instance with getter'] = function(test) { - test.expect(1); - function Ctor() {}; - Object.defineProperty(Ctor.prototype, 'prop', { - configurable: true, - enumerable: true, - get: function() { - return 'value'; - } - }); - - var a = new Ctor(); - var b = clone(a); - - test.strictEqual(b.prop, 'value'); - test.done(); -}; \ No newline at end of file diff --git a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-sublevel/node_modules/level-fix-range/package.json b/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-sublevel/node_modules/level-fix-range/package.json deleted file mode 100644 index 609bdc2b..00000000 --- a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-sublevel/node_modules/level-fix-range/package.json +++ /dev/null @@ -1,51 +0,0 @@ -{ - "name": "level-fix-range", - "description": "make using levelup reverse ranges easy", - "version": "2.0.0", - "homepage": "https://github.com/dominictarr/level-fix-range", - "repository": { - "type": "git", - "url": "git://github.com/dominictarr/level-fix-range.git" - }, - "dependencies": { - "clone": "~0.1.9" - }, - "devDependencies": { - "tape": "~1.0.4" - }, - "scripts": { - "test": "set -e; for t in test/*.js; do node $t; done" - }, - "author": { - "name": "Dominic Tarr", - "email": "dominic.tarr@gmail.com", - "url": "http://dominictarr.com" - }, - "license": "MIT", - "stability": "stable", - "readme": "# level-fix-range\n\nmake reverse ranges easier to use.\n\n## Stability\n\nStable: Expect patches, possible features additions.\n\n## Example\n\nWhen you use reverse ranges, you have to reverse the `start` and `end` also,\n\n``` js\ndb.createReadStream({start: 'a', end: 'z'})\ndb.createReadStream({start: 'z', end: 'a', reverse: true})\n```\n\nthis is confusing and bug-ridden.\n\nlevel-fix-range fixes the options so they always make sense.\nif you want a range to reverse, just set reverse.\n\n``` js\nvar fix = require('level-fix-range')\ndb.createReadStream({start: 'a', end: 'z'})\ndb.createReadStream(fix({start: 'a', end: 'z', reverse: true}))\n```\n\nWhen you either `start` _OR_ `end`, and the order is `reversed: true`,\nit will also reverse the range,\nso that:\n\n``` js\n{start: X, end: null} //from X to end of database\n{start: null, end: X} //from start of database to X\n```\nand you will get the some data, whether you have reverse=true|false,\nbut only the order will change.\n\n## License\n\nMIT\n", - "readmeFilename": "README.md", - "bugs": { - "url": "https://github.com/dominictarr/level-fix-range/issues" - }, - "_id": "level-fix-range@2.0.0", - "dist": { - "shasum": "c417d62159442151a19d9a2367868f1724c2d548", - "tarball": "https://registry.npmjs.org/level-fix-range/-/level-fix-range-2.0.0.tgz" - }, - "_from": "level-fix-range@>=2.0.0 <2.1.0", - "_npmVersion": "1.3.6", - "_npmUser": { - "name": "dominictarr", - "email": "dominic.tarr@gmail.com" - }, - "maintainers": [ - { - "name": "dominictarr", - "email": "dominic.tarr@gmail.com" - } - ], - "directories": {}, - "_shasum": "c417d62159442151a19d9a2367868f1724c2d548", - "_resolved": "https://registry.npmjs.org/level-fix-range/-/level-fix-range-2.0.0.tgz" -} diff --git a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-sublevel/node_modules/level-fix-range/test/index.js b/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-sublevel/node_modules/level-fix-range/test/index.js deleted file mode 100644 index be03c37e..00000000 --- a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-sublevel/node_modules/level-fix-range/test/index.js +++ /dev/null @@ -1,81 +0,0 @@ -var test = require('tape') -var range = require('../') - - -function reverse(t, opts) { - var _opts = JSON.parse(JSON.stringify(opts)) - var opts = range(opts) - if(opts.reverse) { - t.ok(opts.start == _opts.end) - t.ok(opts.end == _opts.start) - } - else { - t.ok(opts.start == _opts.start) - t.ok(opts.end == _opts.end) - } - t.ok(opts.reverse == _opts.reverse) - -} - -function ordered(t, opts, reverse) { - var opts = range(opts) - //don't change order if there is only start OR end, - //but not both. - - console.log([!!opts.reverse,'===', opts.start, '>', opts.end].join(' ')) - t.ok(!!opts.reverse === opts.start > opts.end, - [opts.start, opts.reverse ? '>' : '<', opts.end].join(' ') - ) -} - - -test('set correct order', function (t) { - ordered = ordered.bind(null, t) - ordered({start: 'a', end: 'z'}) - ordered({start: 'v', end: 'e'}) - ordered({start: 'e', end: 'v', reverse: true}) - ordered({start: 'v', end: 'e', reverse: true}) - t.end() -}) - -//{start: 'v'} and {end: 'v'} are both valid orders, -//from start: 'v' to the end of the db, -//and end: 'v' from the start of the db to 'v'. -//so don't fix them. - -test("don't change order", function (t) { - reverse = reverse.bind(null, t) - reverse({start: 'v', reverse: true}) - reverse({ end: 'v', reverse: true}) - reverse({ end: 'v' }) - reverse({start: 'v' }) - t.end() -}) - - -test('alias min and max to start and end', function (t) { - - function alias(fixable, fixed) { - fixable = range(fixable) - t.equal(fixable.start, fixed.start, 'start') - t.equal(fixable.end, fixed.end, 'end') - t.equal(fixable.reverse, fixed.reverse, 'reverse') - } - - alias({min: 'a', max: 'z'}, {start: 'a', end: 'z'}) - alias({min: 'a', max: 'z', reverse: true}, {start: 'z', end: 'a', reverse: true}) - alias({max: 'z'}, {end: 'z'}) - alias({max: 'z', reverse: true}, {start: 'z', reverse: true}) - alias({min: 'a'}, {start: 'a'}) - alias({min: 'a', reverse: true}, {end: 'a', reverse: true}) - - t.end() -}) - - -test('no side effects', function (t) { - var fixable = {min: 'a', max: 'b', reverse: true} - range(fixable) - t.deepEqual(fixable, {min: 'a', max: 'b', reverse: true}) - t.end() -}) diff --git a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-sublevel/node_modules/level-hooks/.npmignore b/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-sublevel/node_modules/level-hooks/.npmignore deleted file mode 100644 index 13abef4f..00000000 --- a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-sublevel/node_modules/level-hooks/.npmignore +++ /dev/null @@ -1,3 +0,0 @@ -node_modules -node_modules/* -npm_debug.log diff --git a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-sublevel/node_modules/level-hooks/.travis.yml b/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-sublevel/node_modules/level-hooks/.travis.yml deleted file mode 100644 index 895dbd36..00000000 --- a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-sublevel/node_modules/level-hooks/.travis.yml +++ /dev/null @@ -1,4 +0,0 @@ -language: node_js -node_js: - - 0.6 - - 0.8 diff --git a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-sublevel/node_modules/level-hooks/LICENSE b/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-sublevel/node_modules/level-hooks/LICENSE deleted file mode 100644 index 6d03581f..00000000 --- a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-sublevel/node_modules/level-hooks/LICENSE +++ /dev/null @@ -1,22 +0,0 @@ -Copyright (c) 2012 'Dominic Tarr' - -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/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-sublevel/node_modules/level-hooks/README.md b/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-sublevel/node_modules/level-hooks/README.md deleted file mode 100644 index e0bd5c3a..00000000 --- a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-sublevel/node_modules/level-hooks/README.md +++ /dev/null @@ -1,88 +0,0 @@ -# Pre/Post hooks for leveldb - -Intercept put/delete/batch operations on levelup. - -## Warning - Breaking Changes - -The API for implementing pre hooks has changed. -Instead of mutating an array at once, the prehook -is called on each change `hook(change, add)` -and may call `add(_change)` to add a new item into the batch. - -Also, attaching hooks to leveldb is now simpler -``` js -var Hooks = require('level-hooks') -Hooks(db) //previously: Hooks()(db) -``` - -## Example - -``` js -var levelup = require('levelup') -var timestamp = require('monotonic-timestamp') -var hooks = require('level-hooks') - -levelup(file, {createIfMissing: true}, function (err, db) { - - //install hooks onto db. - hooks(db) - - db.hooks.pre({start: '', end: '~'}, function (change, add) { - //change is same pattern as the an element in the batch array. - //add a log to record every put operation. - add({type: 'put', key: '~log-'+timestamp()+'-'+change.type, value: change.key}) - }) - - //add a hook that responds after an operation has completed. - db.hooks.post(function (ch) { - //{type: 'put'|'del', key: ..., value: ...} - }) - -}) -``` - -Used by [map-reduce](https://github.com/dominictarr/map-reduce) -to make map-reduce durable across crashes! - -## API - -### rm = db.hooks.pre (range?, hook(change, add(op), batch)) - -If `prefix` is a `string` or `object` that defines the range the pre-hook triggers on. -If `prefix' is a string, then the hook only triggers on keys that _start_ with that -string. If the hook is an object it must be of form `{start: START, end: END}` - -`hook` is a function, and will be called on each item in the batch -(if it was a `put` or `del`, it will be called on the change) -`op` is always of the form `{key: key, value: value, type:'put' | 'del'}` - -Pass additional changes to `add` to add them to the batch. -If add is passed a string as the second argument it will prepend that prefix -to any keys you add. - -You can check what opperations are currently in the batch with the third argument. -Do not modify the `batch` directly, instead use `add` - -To veto (remove) the current change call `add(false)`. - -`db.hooks.pre` returns a function that will remove the hook when called. - -#### unsafe mode - -normally, pre hooks prevent you from inserting into the hooked range -when the hook is triggered. However, sometimes you do need to do this. -In those cases, pass in a range with `{start: START, end: END, safe: false}` -and level-hooks will not error. If you use this option, your hook must -avoid triggering in a loop itself. - -### rm = db.hooks.post (range?, hook) - -Post hooks do not offer any chance to change the value. -but do take a range option, just like `pre` - -`db.hooks.post` returns a function that will remove the hook when called. - - -## License - -MIT diff --git a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-sublevel/node_modules/level-hooks/index.js b/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-sublevel/node_modules/level-hooks/index.js deleted file mode 100644 index cb9e8d69..00000000 --- a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-sublevel/node_modules/level-hooks/index.js +++ /dev/null @@ -1,168 +0,0 @@ -var ranges = require('string-range') - -module.exports = function (db) { - - if(db.hooks) { - return - } - - var posthooks = [] - var prehooks = [] - - function getPrefix (p) { - return p && ( - 'string' === typeof p ? p - : 'string' === typeof p.prefix ? p.prefix - : 'function' === typeof p.prefix ? p.prefix() - : '' - ) - } - - function getKeyEncoding (db) { - if(db && db._getKeyEncoding) - return db._getKeyEncoding(db) - } - - function getValueEncoding (db) { - if(db && db._getValueEncoding) - return db._getValueEncoding(db) - } - - function remover (array, item) { - return function () { - var i = array.indexOf(item) - if(!~i) return false - array.splice(i, 1) - return true - } - } - - db.hooks = { - post: function (prefix, hook) { - if(!hook) hook = prefix, prefix = '' - var h = {test: ranges.checker(prefix), hook: hook} - posthooks.push(h) - return remover(posthooks, h) - }, - pre: function (prefix, hook) { - if(!hook) hook = prefix, prefix = '' - var h = { - test: ranges.checker(prefix), - hook: hook, - safe: false !== prefix.safe - } - prehooks.push(h) - return remover(prehooks, h) - }, - posthooks: posthooks, - prehooks: prehooks - } - - //POST HOOKS - - function each (e) { - if(e && e.type) { - posthooks.forEach(function (h) { - if(h.test(e.key)) h.hook(e) - }) - } - } - - db.on('put', function (key, val) { - each({type: 'put', key: key, value: val}) - }) - db.on('del', function (key, val) { - each({type: 'del', key: key, value: val}) - }) - db.on('batch', function onBatch (ary) { - ary.forEach(each) - }) - - //PRE HOOKS - - var put = db.put - var del = db.del - var batch = db.batch - - function callHooks (isBatch, b, opts, cb) { - try { - b.forEach(function hook(e, i) { - prehooks.forEach(function (h) { - if(h.test(String(e.key))) { - //optimize this? - //maybe faster to not create a new object each time? - //have one object and expose scope to it? - var context = { - add: function (ch, db) { - if(typeof ch === 'undefined') { - return this - } - if(ch === false) - return delete b[i] - var prefix = ( - getPrefix(ch.prefix) || - getPrefix(db) || - h.prefix || '' - ) - //don't leave a circular json object there incase using multilevel. - if(prefix) ch.prefix = prefix - ch.key = prefix + ch.key - if(h.safe && h.test(String(ch.key))) { - //this usually means a stack overflow. - throw new Error('prehook cannot insert into own range') - } - var ke = ch.keyEncoding || getKeyEncoding(ch.prefix) - var ve = ch.valueEncoding || getValueEncoding(ch.prefix) - if(ke) ch.keyEncoding = ke - if(ve) ch.valueEncoding = ve - - b.push(ch) - hook(ch, b.length - 1) - return this - }, - put: function (ch, db) { - if('object' === typeof ch) ch.type = 'put' - return this.add(ch, db) - }, - del: function (ch, db) { - if('object' === typeof ch) ch.type = 'del' - return this.add(ch, db) - }, - veto: function () { - return this.add(false) - } - } - h.hook.call(context, e, context.add, b) - } - }) - }) - } catch (err) { - return (cb || opts)(err) - } - b = b.filter(function (e) { - return e && e.type //filter out empty items - }) - - if(b.length == 1 && !isBatch) { - var change = b[0] - return change.type == 'put' - ? put.call(db, change.key, change.value, opts, cb) - : del.call(db, change.key, opts, cb) - } - return batch.call(db, b, opts, cb) - } - - db.put = function (key, value, opts, cb ) { - var batch = [{key: key, value: value, type: 'put'}] - return callHooks(false, batch, opts, cb) - } - - db.del = function (key, opts, cb) { - var batch = [{key: key, type: 'del'}] - return callHooks(false, batch, opts, cb) - } - - db.batch = function (batch, opts, cb) { - return callHooks(true, batch, opts, cb) - } -} diff --git a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-sublevel/node_modules/level-hooks/package.json b/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-sublevel/node_modules/level-hooks/package.json deleted file mode 100644 index 6273a29d..00000000 --- a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-sublevel/node_modules/level-hooks/package.json +++ /dev/null @@ -1,50 +0,0 @@ -{ - "name": "level-hooks", - "description": "pre/post hooks for leveldb", - "version": "4.5.0", - "homepage": "https://github.com/dominictarr/level-hooks", - "repository": { - "type": "git", - "url": "git://github.com/dominictarr/level-hooks.git" - }, - "author": { - "name": "Dominic Tarr", - "email": "dominic.tarr@gmail.com", - "url": "http://bit.ly/dominictarr" - }, - "dependencies": { - "string-range": "~1.2" - }, - "devDependencies": { - "rimraf": "~2.0.2", - "macgyver": "~1.9", - "range-bucket": "0.0.0", - "level-test": "~1.4.0" - }, - "scripts": { - "test": "set -e; for t in test/*.js; do node $t; done" - }, - "bugs": { - "url": "https://github.com/dominictarr/level-hooks/issues" - }, - "_id": "level-hooks@4.5.0", - "_shasum": "1b9ae61922930f3305d1a61fc4d83c8102c0dd93", - "_from": "level-hooks@>=4.4.0 <5.0.0", - "_npmVersion": "1.4.9", - "_npmUser": { - "name": "dominictarr", - "email": "dominic.tarr@gmail.com" - }, - "maintainers": [ - { - "name": "dominictarr", - "email": "dominic.tarr@gmail.com" - } - ], - "dist": { - "shasum": "1b9ae61922930f3305d1a61fc4d83c8102c0dd93", - "tarball": "https://registry.npmjs.org/level-hooks/-/level-hooks-4.5.0.tgz" - }, - "directories": {}, - "_resolved": "https://registry.npmjs.org/level-hooks/-/level-hooks-4.5.0.tgz" -} diff --git a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-sublevel/node_modules/level-hooks/test/error.js b/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-sublevel/node_modules/level-hooks/test/error.js deleted file mode 100644 index f4d86bf2..00000000 --- a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-sublevel/node_modules/level-hooks/test/error.js +++ /dev/null @@ -1,23 +0,0 @@ -var level = require('level-test')() - -var Hooks = require('../') - -var assert = require('assert') -var mac = require('macgyver')().autoValidate() - -var db = level('map-reduce-prehook-test') - -Hooks(db) - -db.hooks.pre({min: 'a', max:'z'}, function (ch, add) { - console.log(ch) - add(ch) //this should cause an error -}) - -db.put('c', 'whatever', mac(function (err) { - - console.log('expect error:', err) - assert.ok(err) -}).once()) - - diff --git a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-sublevel/node_modules/level-hooks/test/fixtures/insert.js b/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-sublevel/node_modules/level-hooks/test/fixtures/insert.js deleted file mode 100644 index 17397787..00000000 --- a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-sublevel/node_modules/level-hooks/test/fixtures/insert.js +++ /dev/null @@ -1,50 +0,0 @@ - -var levelup = require('levelup') -var rimraf = require('rimraf') - -// if(!module.parent) { - -// var dir = '/tmp/map-reduce-sum-test' - -// rimraf(dir, function () { - -// levelup(dir, {createIfMissing: true}, function (err, db) { - -// var l = 10e3, i = 1 -// var stream = db.writeStream() -// while(l--) -// stream.write({key: JSON.stringify(i++), value: JSON.stringify(i)}) -// }) - -// }) - -// } - -module.exports = sum - -function sum(db, list, callback) { - rimraf(db, function (err) { - if (err) { - return callback(err) - } - - levelup(db, { createIfMissing: true }, function (err, db) { - if (err) { - return callback(err) - } - - var stream = db.writeStream() - - list.forEach(function (item) { - stream.write(item) - }) - - stream.end() - - stream.on("close", function () { - callback(null) - }) - }) - }) -} - diff --git a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-sublevel/node_modules/level-hooks/test/fixtures/sum.js b/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-sublevel/node_modules/level-hooks/test/fixtures/sum.js deleted file mode 100644 index e96ba4a9..00000000 --- a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-sublevel/node_modules/level-hooks/test/fixtures/sum.js +++ /dev/null @@ -1,30 +0,0 @@ - -var levelup = require('levelup') -var rimraf = require('rimraf') -var pad = require('pad') - -function genSum (path, cb) { - rimraf(path, function () { - levelup(path, {createIfMissing: true}, function (err, db) { - - //install plugin system - require('../../use')(db) - - var l = 1e3, i = 0 - var stream = db.writeStream() - while(l--) - stream.write({key: pad(6, ''+ ++i, '0'), value: JSON.stringify(i)}) - stream.end() - if(cb) stream.on('close', function () { - cb(null, db) - }) - }) - }) -} - -if(!module.parent) { - genSum('/tmp/map-reduce-sum-test') -} - -module.exports = genSum - diff --git a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-sublevel/node_modules/level-hooks/test/intercept.js b/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-sublevel/node_modules/level-hooks/test/intercept.js deleted file mode 100644 index a0d67e4c..00000000 --- a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-sublevel/node_modules/level-hooks/test/intercept.js +++ /dev/null @@ -1,33 +0,0 @@ -var level = require('level-test')() -var hooks = require('..') - -var assert = require('assert') -var mac = require('macgyver')().autoValidate() - -var db = level('map-reduce-intercept-test') - -hooks(db) -var _batch = [] -//hook keys that start with a word character -db.hooks.pre(/^\w/, mac(function (ch, add) { - - _batch.push(ch) - var a - add(a = {key: '~h', value: 'hello', type: 'put'}) - _batch.push(a) -}).atLeast(1)) - -//assert that it really became a batch -db.on('batch', mac(function (batch) { - console.log('batch', _batch) - assert.deepEqual(_batch, batch.map(function (e) { - return {key: ''+e.key, value: ''+ e.value, type: e.type} - })) -}).once()) - - -db.put('hello' , 'whatever' , mac(function (){ - -}).once()) - - diff --git a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-sublevel/node_modules/level-hooks/test/order.js b/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-sublevel/node_modules/level-hooks/test/order.js deleted file mode 100644 index 839b92f1..00000000 --- a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-sublevel/node_modules/level-hooks/test/order.js +++ /dev/null @@ -1,39 +0,0 @@ - -var assert = require('assert') -var alphabet = '$&[{}(=*)+]!#%7531902468`"\'?^/@\|-_abcdefghijklmnopqrstuvwxyz,.:;<>\\~' -console.log(alphabet.split('').sort().join('')) -function randomLetter(n) { - var a = alphabet[~~(Math.random()*26)] - return (n ? a + randomLetter(n - 1) : a).toUpperCase() -} - -var sep = ',' - -function toKey(g) { - return g.map(function (e) { - return encodeURIComponent(e) - }).join(sep) -} - -function fromKey (a) { - return a.split(sep).map(decodeURIComponent) -} - -var groups = [] - -function gen (a) { - var l = 3 - a = a || [] - if(a.length > 3) return - - while(l --) { - var _a = a.slice() - _a.push(randomLetter(3)) - gen(_a) - _a.unshift(_a.length) - groups.push(toKey(_a)) - } -} - -gen() - diff --git a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-sublevel/node_modules/level-hooks/test/prehook.js b/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-sublevel/node_modules/level-hooks/test/prehook.js deleted file mode 100644 index 6e1673bc..00000000 --- a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-sublevel/node_modules/level-hooks/test/prehook.js +++ /dev/null @@ -1,52 +0,0 @@ -var level = require('level-test')() - -var Hooks = require('../') - -var assert = require('assert') -var mac = require('macgyver')().autoValidate() - -var db = level('map-reduce-prehook-test') - -var SEQ = 0 - -Hooks(db) - -db.hooks.pre(/^\w/, mac(function (ch, add, batch) { - //iterate backwards so you can push without breaking stuff. - - assert.ok(Array.isArray(batch)) - assert.notEqual(batch.indexOf(ch), -1) - var key = ch.key - add({ - type: 'put', - key: new Buffer('~log~'+ ++SEQ), - value: new Buffer(JSON.stringify({ - type: ch.type, - key: key.toString(), - time: Date.now() - })) - }) - add({type: 'put', key: new Buffer('~seq'), value: new Buffer(SEQ.toString())}) - -}).atLeast(1)) - -var n = 3 - -var next = mac(function () { - console.log('test', n) - if(--n) return - - db.get('~seq', mac(function (err, val) { - console.log('seq=', ''+val) - assert.equal(Number(''+val), 3) - db.createReadStream({start: '~log~', end: '~log~~'}) - .on('data', function (data) { - console.log(data.key.toString(), data.value.toString()) - }) - }).once()) -}).times(3) - -db.put('hello' , 'whatever' , next) -db.put('hi' , 'message' , next) -db.put('yoohoo', 'test 1, 2', next) - diff --git a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-sublevel/node_modules/level-hooks/test/prehook2.js b/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-sublevel/node_modules/level-hooks/test/prehook2.js deleted file mode 100644 index 8f834372..00000000 --- a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-sublevel/node_modules/level-hooks/test/prehook2.js +++ /dev/null @@ -1,96 +0,0 @@ -var level = require('level-test')() - -var Hooks = require('../') - -var assert = require('assert') -var mac = require('macgyver')().autoValidate() - -var db = level('map-reduce-prehook-test') - -var SEQ = 0, LOGSEQ = 0 - -Hooks(db) - -db.hooks.pre(/^\w/, mac(function (ch, add) { - //iterate backwards so you can push without breaking stuff. - var key = ch.key - add({ - type: 'put', - key: ++SEQ, - value: key.toString() - }, '~log~') - - add({ - type: 'put', key: new Buffer('~seq'), - value: new Buffer(SEQ.toString()) - }) - -}).atLeast(1)) - -var removeLogHook = db.hooks.pre('~log', mac(function (ch, add) { - //iterate backwards so you can push without breaking stuff. - console.log('LOG2', ch) - var key = ch.key - add({ - type: 'put', - key: ++LOGSEQ, - value: Date.now(), - prefix: '~LOGSEQ~' - }) - -}).atLeast(1)) - - -var n = 4 - -var next = mac(function () { - console.log('test', n) - if(--n) return - - db.get('~seq', mac(function (err, val) { - console.log('seq=', ''+val) - assert.equal(Number(''+val), 4) - db.readStream({start: '~log~', end: '~log~~'}) - .on('data', function (data) { - console.log(data.key.toString(), data.value.toString()) - }) - }).once()) - - var all = {} - - db.readStream() - .on('data', function (data) { - all[data.key.toString()] = data.value.toString() - }) - .on('end', function () { - console.log(all) - - //these will be times, and will have changed. - delete all['~LOGSEQ~1'] - delete all['~LOGSEQ~2'] - delete all['~LOGSEQ~3'] - - assert.deepEqual(all, { - hello: 'whatever', - hi: 'message', - thing: 'WHATEVER', - yoohoo: 'test 1, 2', - '~log~1': 'hello', - '~log~2': 'hi', - '~log~3': 'yoohoo', - '~log~4': 'thing', - '~seq': '4' - }) - - }) - -}).times(4) - -db.put('hello' , 'whatever' , next) -db.put('hi' , 'message' , next) -db.put('yoohoo', 'test 1, 2', next) - -removeLogHook() - -db.put('thing' , 'WHATEVER' , next) - diff --git a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-sublevel/node_modules/level-hooks/test/unsafe.js b/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-sublevel/node_modules/level-hooks/test/unsafe.js deleted file mode 100644 index c37e44a2..00000000 --- a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-sublevel/node_modules/level-hooks/test/unsafe.js +++ /dev/null @@ -1,30 +0,0 @@ -var level = require('level-test')() - -var Hooks = require('../') - -var assert = require('assert') -var mac = require('macgyver')().autoValidate() - -var db = level('map-reduce-prehook-test') - -Hooks(db) - -//safe: false means do not prevent me from inserting into the same range. -//when this option is set, the user's hook is responsible for not -//causing a stack overflow. -db.hooks.pre({min: 'a', max:'z', safe: false}, function (ch, add) { - console.log(ch) - //this is an absurd example - if(ch.key !== 'p') - add({key: 'p', value: ch.key, type: 'put'}) //this should cause an error -}) - -db.put('c', 'whatever', mac(function (err) { - assert.ifError(err) - db.get('p', mac(function (err, c) { - assert.ifError(err) - assert.equal(c, 'c') - }).once()) -}).once()) - - diff --git a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-sublevel/node_modules/string-range/.npmignore b/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-sublevel/node_modules/string-range/.npmignore deleted file mode 100644 index 13abef4f..00000000 --- a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-sublevel/node_modules/string-range/.npmignore +++ /dev/null @@ -1,3 +0,0 @@ -node_modules -node_modules/* -npm_debug.log diff --git a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-sublevel/node_modules/string-range/.travis.yml b/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-sublevel/node_modules/string-range/.travis.yml deleted file mode 100644 index 895dbd36..00000000 --- a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-sublevel/node_modules/string-range/.travis.yml +++ /dev/null @@ -1,4 +0,0 @@ -language: node_js -node_js: - - 0.6 - - 0.8 diff --git a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-sublevel/node_modules/string-range/LICENSE b/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-sublevel/node_modules/string-range/LICENSE deleted file mode 100644 index b799ec00..00000000 --- a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-sublevel/node_modules/string-range/LICENSE +++ /dev/null @@ -1,22 +0,0 @@ -Copyright (c) 2013 Dominic Tarr - -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/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-sublevel/node_modules/string-range/README.md b/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-sublevel/node_modules/string-range/README.md deleted file mode 100644 index 1b1a4a5f..00000000 --- a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-sublevel/node_modules/string-range/README.md +++ /dev/null @@ -1,25 +0,0 @@ -# string-range - -Check whether a string is within a range. - -## Example - -``` js -var ranges = require('string-range') - -ranges.satisfies('hello', {min: 'a', max: 'z'}) -=> true -ranges.satisfies('Hello', {min: 'a', max: 'z'}) -=> false - -//force a range inside a prefix! - -ranges.satisfies('TYPE~key', ranges.prefix({min:'a', max:'z'}, 'TYPE') -=> true -``` - -`min` and `max` are alaises for `start` and `end`. - -## License - -MIT diff --git a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-sublevel/node_modules/string-range/index.js b/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-sublevel/node_modules/string-range/index.js deleted file mode 100644 index 0b9aeacf..00000000 --- a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-sublevel/node_modules/string-range/index.js +++ /dev/null @@ -1,72 +0,0 @@ - -//force to a valid range -var range = exports.range = function (obj) { - return null == obj ? {} : 'string' === typeof range ? { - min: range, max: range + '\xff' - } : obj -} - -//turn into a sub range. -var prefix = exports.prefix = function (range, within, term) { - range = exports.range(range) - var _range = {} - term = term || '\xff' - if(range instanceof RegExp || 'function' == typeof range) { - _range.min = within - _range.max = within + term, - _range.inner = function (k) { - var j = k.substring(within.length) - if(range.test) - return range.test(j) - return range(j) - } - } - else if('object' === typeof range) { - _range.min = within + (range.min || range.start || '') - _range.max = within + (range.max || range.end || (term || '~')) - _range.reverse = !!range.reverse - } - return _range -} - -//return a function that checks a range -var checker = exports.checker = function (range) { - if(!range) range = {} - - if ('string' === typeof range) - return function (key) { - return key.indexOf(range) == 0 - } - else if(range instanceof RegExp) - return function (key) { - return range.test(key) - } - else if('object' === typeof range) - return function (key) { - var min = range.min || range.start - var max = range.max || range.end - - // fixes keys passed as ints from sublevels - key = String(key) - - return ( - !min || key >= min - ) && ( - !max || key <= max - ) && ( - !range.inner || ( - range.inner.test - ? range.inner.test(key) - : range.inner(key) - ) - ) - } - else if('function' === typeof range) - return range -} -//check if a key is within a range. -var satifies = exports.satisfies = function (key, range) { - return checker(range)(key) -} - - diff --git a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-sublevel/node_modules/string-range/package.json b/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-sublevel/node_modules/string-range/package.json deleted file mode 100644 index 8772e7f3..00000000 --- a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-sublevel/node_modules/string-range/package.json +++ /dev/null @@ -1,49 +0,0 @@ -{ - "name": "string-range", - "description": "check if a string is within a range", - "version": "1.2.2", - "homepage": "https://github.com/dominictarr/string-range", - "repository": { - "type": "git", - "url": "git://github.com/dominictarr/string-range.git" - }, - "dependencies": {}, - "devDependencies": { - "tape": "~0.3.0", - "level-fix-range": "~1.1.2" - }, - "scripts": { - "test": "set -e; for t in test/*.js; do node $t; done" - }, - "author": { - "name": "Dominic Tarr", - "email": "dominic.tarr@gmail.com", - "url": "http://dominictarr.com" - }, - "license": "MIT", - "readme": "# string-range\n\nCheck whether a string is within a range.\n\n## Example\n\n``` js\nvar ranges = require('string-range')\n\nranges.satisfies('hello', {min: 'a', max: 'z'})\n=> true\nranges.satisfies('Hello', {min: 'a', max: 'z'})\n=> false\n\n//force a range inside a prefix!\n\nranges.satisfies('TYPE~key', ranges.prefix({min:'a', max:'z'}, 'TYPE')\n=> true\n```\n\n`min` and `max` are alaises for `start` and `end`.\n\n## License\n\nMIT\n", - "readmeFilename": "README.md", - "bugs": { - "url": "https://github.com/dominictarr/string-range/issues" - }, - "_id": "string-range@1.2.2", - "dist": { - "shasum": "a893ed347e72299bc83befbbf2a692a8d239d5dd", - "tarball": "https://registry.npmjs.org/string-range/-/string-range-1.2.2.tgz" - }, - "_from": "string-range@>=1.2.1 <1.3.0", - "_npmVersion": "1.3.0", - "_npmUser": { - "name": "dominictarr", - "email": "dominic.tarr@gmail.com" - }, - "maintainers": [ - { - "name": "dominictarr", - "email": "dominic.tarr@gmail.com" - } - ], - "directories": {}, - "_shasum": "a893ed347e72299bc83befbbf2a692a8d239d5dd", - "_resolved": "https://registry.npmjs.org/string-range/-/string-range-1.2.2.tgz" -} diff --git a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-sublevel/node_modules/string-range/test/fix-range.js b/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-sublevel/node_modules/string-range/test/fix-range.js deleted file mode 100644 index 03c2a2ff..00000000 --- a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-sublevel/node_modules/string-range/test/fix-range.js +++ /dev/null @@ -1,11 +0,0 @@ - -var fix = require('level-fix-range') -var range = require('../') - -var r = range.range(fix({min: 'a', max: 'z', reverse: true})) - -console.log(r) - -var _r = fix(range.prefix(r, '~thing~')) - -console.log(_r) diff --git a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-sublevel/node_modules/string-range/test/index.js b/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-sublevel/node_modules/string-range/test/index.js deleted file mode 100644 index f8f79457..00000000 --- a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-sublevel/node_modules/string-range/test/index.js +++ /dev/null @@ -1,75 +0,0 @@ - -var ranges = require('../') -var test = require('tape') - -function stringify (range) { - return '<'+[ - range.start ? JSON.stringify(range.start) + ' <=' : '', - range.start || range.end ? 'x' : '', - range.end ? ' <=' + JSON.stringify(range.end) : '', - range.inner ? - '&& ' + range.inner.toString().substring(0, 100) - : '' - ].filter(function (e) {return e}).join(' ')+ '>' -} - -function p(t, key, range) { - t.ok(ranges.satisfies(key, range), - 'key:' + key + ' satisfies range:' + stringify(range)) -} -function f(t, key, range) { - t.notOk(ranges.satisfies(key, range), - 'key:' + key + ' *must not* satisfy range:' + stringify(range)) -} -test('test range', function (t) { - p(t, 'hi', {}) - p(t, 'hi', {start: '!', end: '~'}) - p(t, 'hi', /^\w/) - p(t, '---hi', {start: '!', end: '~'}) - p(t, 'a---hi', {start: 'A', end: 'z'}) - f(t, '---hi', {start: 'A', end: 'z'}) - p(t, 'hi', {start: 'a', end: 'z'}) - p(t, 'words~hi', ranges.prefix({start: 'a', end: 'z'}, 'words~')) - p(t, 'WORDS~hi', ranges.prefix(/^[a-z]/, 'WORDS~')) - - f(t, 'WORDS~X', ranges.prefix(/^[a-z]/, 'WORDS~')) - - f(t, 'word~hi', ranges.prefix({start: 'a', end: 'z'}, 'words~')) - t.end() -}) - -test('test range min,max', function (t) { - - p(t, 'hi', {min: '!', max: '~'}) - p(t, '---hi', {min: '!', max: '~'}) - p(t, 'a---hi', {min: 'A', max: 'z'}) - f(t, '---hi', {min: 'A', max: 'z'}) - p(t, 'hi', {min: 'a', max: 'z'}) - p(t, 'words~hi', - ranges.prefix({min: 'a', max: 'z'}, 'words~')) - - f(t, 'word~hi', - ranges.prefix({min: 'a', max: 'z'}, 'words~')) - - t.end() -}) - - -test('test range2', function (t) { - p(t, 'hi', /^\w/) - p(t, 'hi', function (e) { return e[0] === 'h' }) - p(t, 'words~hi', ranges.prefix(/^\w/, 'words~')) - f(t, 'word~hi', ranges.prefix(/^\w/, 'words~')) - t.end() -}) - - -test("test int key within range",function(t){ - p(t,2,{start: '1', end: '3'}) - t.end(); -}) - -test("test int key within int range",function(t){ - p(t,2,{start: 1, end: 3}) - t.end(); -}) diff --git a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-sublevel/node_modules/xtend/.npmignore b/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-sublevel/node_modules/xtend/.npmignore deleted file mode 100644 index 3c3629e6..00000000 --- a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-sublevel/node_modules/xtend/.npmignore +++ /dev/null @@ -1 +0,0 @@ -node_modules diff --git a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-sublevel/node_modules/xtend/LICENCE b/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-sublevel/node_modules/xtend/LICENCE deleted file mode 100644 index a23e08a8..00000000 --- a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-sublevel/node_modules/xtend/LICENCE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (c) 2012 Raynos. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. \ No newline at end of file diff --git a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-sublevel/node_modules/xtend/Makefile b/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-sublevel/node_modules/xtend/Makefile deleted file mode 100644 index d583fcf4..00000000 --- a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-sublevel/node_modules/xtend/Makefile +++ /dev/null @@ -1,4 +0,0 @@ -browser: - node ./support/compile - -.PHONY: browser \ No newline at end of file diff --git a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-sublevel/node_modules/xtend/README.md b/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-sublevel/node_modules/xtend/README.md deleted file mode 100644 index 389adae3..00000000 --- a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-sublevel/node_modules/xtend/README.md +++ /dev/null @@ -1,27 +0,0 @@ -# xtend - -[![browser support][3]][4] - -Extend like a boss - -xtend is a basic utility library which allows you to extend an object by appending all of the properties from each object in a list. When there are identical properties, the right-most property takes presedence. - -## Examples - -```js -var extend = require("xtend") - -var combination = extend({ - a: "a" -}, { - b: "b" -}) -// { a: "a", b: "b" } -``` - - -## MIT Licenced - - - [3]: http://ci.testling.com/Raynos/xtend.png - [4]: http://ci.testling.com/Raynos/xtend diff --git a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-sublevel/node_modules/xtend/has-keys.js b/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-sublevel/node_modules/xtend/has-keys.js deleted file mode 100644 index 62391e78..00000000 --- a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-sublevel/node_modules/xtend/has-keys.js +++ /dev/null @@ -1,7 +0,0 @@ -module.exports = hasKeys - -function hasKeys(source) { - return source !== null && - (typeof source === "object" || - typeof source === "function") -} diff --git a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-sublevel/node_modules/xtend/index.js b/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-sublevel/node_modules/xtend/index.js deleted file mode 100644 index 20937d19..00000000 --- a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-sublevel/node_modules/xtend/index.js +++ /dev/null @@ -1,25 +0,0 @@ -var Keys = require("object-keys") -var hasKeys = require("./has-keys") - -module.exports = extend - -function extend() { - var target = {} - - for (var i = 0; i < arguments.length; i++) { - var source = arguments[i] - - if (!hasKeys(source)) { - continue - } - - var keys = Keys(source) - - for (var j = 0; j < keys.length; j++) { - var name = keys[j] - target[name] = source[name] - } - } - - return target -} diff --git a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-sublevel/node_modules/xtend/mutable.js b/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-sublevel/node_modules/xtend/mutable.js deleted file mode 100644 index 29e3b221..00000000 --- a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-sublevel/node_modules/xtend/mutable.js +++ /dev/null @@ -1,19 +0,0 @@ -var hasKeys = require("./has-keys") - -module.exports = extend - -function extend(target) { - var sources = [].slice.call(arguments, 1) - - sources.forEach(function (source) { - if (!hasKeys(source)) { - return - } - - Object.keys(source).forEach(function (name) { - target[name] = source[name] - }) - }) - - return target -} diff --git a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-sublevel/node_modules/xtend/node_modules/is-object/.npmignore b/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-sublevel/node_modules/xtend/node_modules/is-object/.npmignore deleted file mode 100644 index fd31f5ee..00000000 --- a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-sublevel/node_modules/xtend/node_modules/is-object/.npmignore +++ /dev/null @@ -1,15 +0,0 @@ -.DS_Store -.monitor -.*.swp -.nodemonignore -releases -*.log -*.err -fleet.json -public/browserify -bin/*.json -.bin -build -compile -.lock-wscript -node_modules diff --git a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-sublevel/node_modules/xtend/node_modules/is-object/.testem.json b/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-sublevel/node_modules/xtend/node_modules/is-object/.testem.json deleted file mode 100644 index 287edfe1..00000000 --- a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-sublevel/node_modules/xtend/node_modules/is-object/.testem.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "launchers": { - "node": { - "command": "node ./test" - } - }, - "src_files": [ - "./**/*.js" - ], - "before_tests": "npm run build", - "on_exit": "rm test/static/bundle.js", - "test_page": "test/static/index.html", - "launch_in_dev": ["node", "phantomjs"] -} diff --git a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-sublevel/node_modules/xtend/node_modules/is-object/.travis.yml b/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-sublevel/node_modules/xtend/node_modules/is-object/.travis.yml deleted file mode 100644 index ed178f63..00000000 --- a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-sublevel/node_modules/xtend/node_modules/is-object/.travis.yml +++ /dev/null @@ -1,4 +0,0 @@ -language: node_js -node_js: - - 0.8 - - 0.9 diff --git a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-sublevel/node_modules/xtend/node_modules/is-object/LICENCE b/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-sublevel/node_modules/xtend/node_modules/is-object/LICENCE deleted file mode 100644 index 72d356c1..00000000 --- a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-sublevel/node_modules/xtend/node_modules/is-object/LICENCE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (c) 2013 Colingo. - -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/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-sublevel/node_modules/xtend/node_modules/is-object/README.md b/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-sublevel/node_modules/xtend/node_modules/is-object/README.md deleted file mode 100644 index 607a7d94..00000000 --- a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-sublevel/node_modules/xtend/node_modules/is-object/README.md +++ /dev/null @@ -1,35 +0,0 @@ -# is-object - -[![build status][1]][2] [![dependency status][3]][4] - -[![browser support][5]][6] - -Checks whether a value is an object - -Because `typeof null` is a troll. - -## Example - -```js -var isObject = require("is-object") - -console.log(isObject(null)) // false -console.log(isObject(require("util"))) // true -``` - -## Installation - -`npm install is-object` - -## Contributors - - - Raynos - -## MIT Licenced - - [1]: https://secure.travis-ci.org/Colingo/is-object.png - [2]: http://travis-ci.org/Colingo/is-object - [3]: http://david-dm.org/Colingo/is-object/status.png - [4]: http://david-dm.org/Colingo/is-object - [5]: http://ci.testling.com/Colingo/is-object.png - [6]: http://ci.testling.com/Colingo/is-object diff --git a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-sublevel/node_modules/xtend/node_modules/is-object/examples/simple.js b/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-sublevel/node_modules/xtend/node_modules/is-object/examples/simple.js deleted file mode 100644 index e69de29b..00000000 diff --git a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-sublevel/node_modules/xtend/node_modules/is-object/index.js b/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-sublevel/node_modules/xtend/node_modules/is-object/index.js deleted file mode 100644 index 38348b10..00000000 --- a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-sublevel/node_modules/xtend/node_modules/is-object/index.js +++ /dev/null @@ -1,5 +0,0 @@ -module.exports = isObject - -function isObject(x) { - return typeof x === "object" && x !== null -} diff --git a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-sublevel/node_modules/xtend/node_modules/is-object/package.json b/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-sublevel/node_modules/xtend/node_modules/is-object/package.json deleted file mode 100644 index fa2b8587..00000000 --- a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-sublevel/node_modules/xtend/node_modules/is-object/package.json +++ /dev/null @@ -1,79 +0,0 @@ -{ - "name": "is-object", - "version": "0.1.2", - "description": "Checks whether a value is an object", - "keywords": [], - "author": { - "name": "Raynos", - "email": "raynos2@gmail.com" - }, - "repository": { - "type": "git", - "url": "git://github.com/Colingo/is-object.git" - }, - "main": "index", - "homepage": "https://github.com/Colingo/is-object", - "contributors": [ - { - "name": "Raynos" - } - ], - "bugs": { - "url": "https://github.com/Colingo/is-object/issues", - "email": "raynos2@gmail.com" - }, - "dependencies": {}, - "devDependencies": { - "tape": "~0.2.2", - "browserify-server": "~2.1.18", - "browservefy": "~0.0.7", - "testem": "https://github.com/raynos/testem/tarball/master" - }, - "licenses": [ - { - "type": "MIT", - "url": "http://github.com/Colingo/is-object/raw/master/LICENSE" - } - ], - "scripts": { - "test": "testem ci", - "build": "browserify-server --bundle=test/index.js -o test/static/bundle.js --debug", - "testem": "testem", - "example": "browservefy ./examples/simple.js --browserify='browserify-server' --live -- --debug --bundle" - }, - "testling": { - "files": "test/index.js", - "browsers": [ - "ie/8..latest", - "firefox/16..latest", - "firefox/nightly", - "chrome/22..latest", - "chrome/canary", - "opera/12..latest", - "opera/next", - "safari/5.1..latest", - "ipad/6.0..latest", - "iphone/6.0..latest" - ] - }, - "_id": "is-object@0.1.2", - "dist": { - "shasum": "00efbc08816c33cfc4ac8251d132e10dc65098d7", - "tarball": "https://registry.npmjs.org/is-object/-/is-object-0.1.2.tgz" - }, - "_from": "is-object@>=0.1.2 <0.2.0", - "_npmVersion": "1.2.14", - "_npmUser": { - "name": "raynos", - "email": "raynos2@gmail.com" - }, - "maintainers": [ - { - "name": "raynos", - "email": "raynos2@gmail.com" - } - ], - "directories": {}, - "_shasum": "00efbc08816c33cfc4ac8251d132e10dc65098d7", - "_resolved": "https://registry.npmjs.org/is-object/-/is-object-0.1.2.tgz" -} diff --git a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-sublevel/node_modules/xtend/node_modules/is-object/test/index.js b/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-sublevel/node_modules/xtend/node_modules/is-object/test/index.js deleted file mode 100644 index b4c7abbc..00000000 --- a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-sublevel/node_modules/xtend/node_modules/is-object/test/index.js +++ /dev/null @@ -1,23 +0,0 @@ -var test = require("tape") - -var isObject = require("../index") - -test("returns true for objects", function (assert) { - assert.equal(isObject({}), true) - assert.equal(isObject([]), true) - - assert.end() -}) - -test("returns false for null", function (assert) { - assert.equal(isObject(null), false) - - assert.end() -}) - -test("returns false for primitives", function (assert) { - assert.equal(isObject(42), false) - assert.equal(isObject("foo"), false) - - assert.end() -}) diff --git a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-sublevel/node_modules/xtend/node_modules/is-object/test/static/index.html b/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-sublevel/node_modules/xtend/node_modules/is-object/test/static/index.html deleted file mode 100644 index 60f6ef8b..00000000 --- a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-sublevel/node_modules/xtend/node_modules/is-object/test/static/index.html +++ /dev/null @@ -1,11 +0,0 @@ - - - - TAPE Example - - - - - - - diff --git a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-sublevel/node_modules/xtend/node_modules/is-object/test/static/test-adapter.js b/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-sublevel/node_modules/xtend/node_modules/is-object/test/static/test-adapter.js deleted file mode 100644 index c5127925..00000000 --- a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-sublevel/node_modules/xtend/node_modules/is-object/test/static/test-adapter.js +++ /dev/null @@ -1,49 +0,0 @@ -(function () { - var Testem = window.Testem - var regex = /^((?:not )?ok) (\d+) (.+)$/ - - Testem.useCustomAdapter(tapAdapter) - - function tapAdapter(socket){ - var results = { - failed: 0 - , passed: 0 - , total: 0 - , tests: [] - } - - socket.emit('tests-start') - - Testem.handleConsoleMessage = function(msg){ - var m = msg.match(regex) - if (m) { - var passed = m[1] === 'ok' - var test = { - passed: passed ? 1 : 0, - failed: passed ? 0 : 1, - total: 1, - id: m[2], - name: m[3], - items: [] - } - - if (passed) { - results.passed++ - } else { - results.failed++ - } - - results.total++ - - socket.emit('test-result', test) - results.tests.push(test) - } else if (msg === '# ok' || msg.match(/^# tests \d+/)){ - socket.emit('all-test-results', results) - } - - // return false if you want to prevent the console message from - // going to the console - // return false - } - } -}()) diff --git a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-sublevel/node_modules/xtend/node_modules/object-keys/.npmignore b/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-sublevel/node_modules/xtend/node_modules/object-keys/.npmignore deleted file mode 100644 index 3c3629e6..00000000 --- a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-sublevel/node_modules/xtend/node_modules/object-keys/.npmignore +++ /dev/null @@ -1 +0,0 @@ -node_modules diff --git a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-sublevel/node_modules/xtend/node_modules/object-keys/.travis.yml b/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-sublevel/node_modules/xtend/node_modules/object-keys/.travis.yml deleted file mode 100644 index 8170a81f..00000000 --- a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-sublevel/node_modules/xtend/node_modules/object-keys/.travis.yml +++ /dev/null @@ -1,4 +0,0 @@ -language: node_js -node_js: - - "0.8" - - "0.6" diff --git a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-sublevel/node_modules/xtend/node_modules/object-keys/README.md b/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-sublevel/node_modules/xtend/node_modules/object-keys/README.md deleted file mode 100644 index c49e3a80..00000000 --- a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-sublevel/node_modules/xtend/node_modules/object-keys/README.md +++ /dev/null @@ -1,38 +0,0 @@ -#object-keys [![Version Badge][2]][1] - -[![Build Status][3]][4] [![dependency status][5]][6] - -[![browser support][7]][8] - -An Object.keys shim. Uses Object.keys if available. - -## Example - -```js -var keys = require('object-keys'); -var assert = require('assert'); -var obj = { - a: true, - b: true, - c: true -}; - -assert.equal(keys(obj), ['a', 'b', 'c']); -``` - -## Source -Implementation taken directly from [9] - -## Tests -Tests currently use tape - which doesn't work in node 0.10, but works in browserify. Rest assured, they pass. - -[1]: https://npmjs.org/package/object-keys -[2]: http://vb.teelaun.ch/ljharb/object-keys.svg -[3]: https://travis-ci.org/ljharb/object-keys.png -[4]: https://travis-ci.org/ljharb/object-keys -[5]: https://david-dm.org/ljharb/object-keys.png -[6]: https://david-dm.org/ljharb/object-keys -[7]: https://ci.testling.com/ljharb/object-keys.png -[8]: https://ci.testling.com/ljharb/object-keys -[9]: https://github.com/kriskowal/es5-shim/blob/master/es5-shim.js#L542-589 - diff --git a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-sublevel/node_modules/xtend/node_modules/object-keys/index.js b/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-sublevel/node_modules/xtend/node_modules/object-keys/index.js deleted file mode 100644 index f5b24b6d..00000000 --- a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-sublevel/node_modules/xtend/node_modules/object-keys/index.js +++ /dev/null @@ -1,2 +0,0 @@ -module.exports = Object.keys || require('./shim'); - diff --git a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-sublevel/node_modules/xtend/node_modules/object-keys/node_modules/foreach/.npmignore b/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-sublevel/node_modules/xtend/node_modules/object-keys/node_modules/foreach/.npmignore deleted file mode 100644 index d135df67..00000000 --- a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-sublevel/node_modules/xtend/node_modules/object-keys/node_modules/foreach/.npmignore +++ /dev/null @@ -1,3 +0,0 @@ -node_modules -components -build \ No newline at end of file diff --git a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-sublevel/node_modules/xtend/node_modules/object-keys/node_modules/foreach/LICENSE b/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-sublevel/node_modules/xtend/node_modules/object-keys/node_modules/foreach/LICENSE deleted file mode 100644 index 3032d6e3..00000000 --- a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-sublevel/node_modules/xtend/node_modules/object-keys/node_modules/foreach/LICENSE +++ /dev/null @@ -1,24 +0,0 @@ -The MIT License - -Copyright (c) 2013 Manuel Stofer - -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/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-sublevel/node_modules/xtend/node_modules/object-keys/node_modules/foreach/Makefile b/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-sublevel/node_modules/xtend/node_modules/object-keys/node_modules/foreach/Makefile deleted file mode 100644 index eae41178..00000000 --- a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-sublevel/node_modules/xtend/node_modules/object-keys/node_modules/foreach/Makefile +++ /dev/null @@ -1,11 +0,0 @@ - -build: components - @component build - -components: component.json - @component install --dev - -clean: - rm -fr build components template.js - -.PHONY: clean diff --git a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-sublevel/node_modules/xtend/node_modules/object-keys/node_modules/foreach/Readme.md b/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-sublevel/node_modules/xtend/node_modules/object-keys/node_modules/foreach/Readme.md deleted file mode 100644 index 2752b574..00000000 --- a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-sublevel/node_modules/xtend/node_modules/object-keys/node_modules/foreach/Readme.md +++ /dev/null @@ -1,30 +0,0 @@ - -# foreach - -Iterate over the key value pairs of either an array-like object or a dictionary like object. - -[![browser support][1]][2] - -## API - -### foreach(object, function, [context]) - -```js -var each = require('foreach'); - -each([1,2,3], function (value, key, array) { - // value === 1, 2, 3 - // key === 0, 1, 2 - // array === [1, 2, 3] -}); - -each({0:1,1:2,2:3}, function (value, key, object) { - // value === 1, 2, 3 - // key === 0, 1, 2 - // object === {0:1,1:2,2:3} -}); -``` - -[1]: https://ci.testling.com/manuelstofer/foreach.png -[2]: https://ci.testling.com/manuelstofer/foreach - diff --git a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-sublevel/node_modules/xtend/node_modules/object-keys/node_modules/foreach/component.json b/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-sublevel/node_modules/xtend/node_modules/object-keys/node_modules/foreach/component.json deleted file mode 100644 index 0eeecb51..00000000 --- a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-sublevel/node_modules/xtend/node_modules/object-keys/node_modules/foreach/component.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "name": "foreach", - "description": "foreach component + npm package", - "version": "2.0.5", - "keywords": [], - "dependencies": {}, - "scripts": [ - "index.js" - ], - "repo": "manuelstofer/foreach" -} diff --git a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-sublevel/node_modules/xtend/node_modules/object-keys/node_modules/foreach/index.js b/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-sublevel/node_modules/xtend/node_modules/object-keys/node_modules/foreach/index.js deleted file mode 100644 index a961e4e1..00000000 --- a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-sublevel/node_modules/xtend/node_modules/object-keys/node_modules/foreach/index.js +++ /dev/null @@ -1,22 +0,0 @@ - -var hasOwn = Object.prototype.hasOwnProperty; -var toString = Object.prototype.toString; - -module.exports = function forEach (obj, fn, ctx) { - if (toString.call(fn) !== '[object Function]') { - throw new TypeError('iterator must be a function'); - } - var l = obj.length; - if (l === +l) { - for (var i = 0; i < l; i++) { - fn.call(ctx, obj[i], i, obj); - } - } else { - for (var k in obj) { - if (hasOwn.call(obj, k)) { - fn.call(ctx, obj[k], k, obj); - } - } - } -}; - diff --git a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-sublevel/node_modules/xtend/node_modules/object-keys/node_modules/foreach/package.json b/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-sublevel/node_modules/xtend/node_modules/object-keys/node_modules/foreach/package.json deleted file mode 100644 index 02937689..00000000 --- a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-sublevel/node_modules/xtend/node_modules/object-keys/node_modules/foreach/package.json +++ /dev/null @@ -1,84 +0,0 @@ -{ - "name": "foreach", - "description": "foreach component + npm package", - "version": "2.0.5", - "author": { - "name": "Manuel Stofer", - "email": "manuel@takimata.ch" - }, - "contributors": [ - { - "name": "Manuel Stofer" - }, - { - "name": "Jordan Harband", - "url": "https://github.com/ljharb" - } - ], - "license": "MIT", - "main": "index.js", - "scripts": { - "test": "node test.js", - "coverage": "covert test.js", - "coverage-quiet": "covert --quiet test.js" - }, - "repository": { - "type": "git", - "url": "git://github.com/manuelstofer/foreach" - }, - "keywords": [ - "shim", - "Array.prototype.forEach", - "forEach", - "Array#forEach", - "each" - ], - "dependencies": {}, - "devDependencies": { - "tape": "*", - "covert": "*" - }, - "testling": { - "files": "test.js", - "browsers": [ - "iexplore/6.0..latest", - "firefox/3.0", - "firefox/15.0..latest", - "firefox/nightly", - "chrome/4.0", - "chrome/22.0..latest", - "chrome/canary", - "opera/10.0..latest", - "opera/next", - "safari/5.0.5..latest", - "ipad/6.0..latest", - "iphone/6.0..latest", - "android-browser/4.2" - ] - }, - "bugs": { - "url": "https://github.com/manuelstofer/foreach/issues" - }, - "homepage": "https://github.com/manuelstofer/foreach", - "_id": "foreach@2.0.5", - "_shasum": "0bee005018aeb260d0a3af3ae658dd0136ec1b99", - "_from": "foreach@>=2.0.1 <2.1.0", - "_npmVersion": "1.4.9", - "_npmUser": { - "name": "manuelstofer", - "email": "manuel@takimata.ch" - }, - "maintainers": [ - { - "name": "manuelstofer", - "email": "manuel@takimata.ch" - } - ], - "dist": { - "shasum": "0bee005018aeb260d0a3af3ae658dd0136ec1b99", - "tarball": "http://registry.npmjs.org/foreach/-/foreach-2.0.5.tgz" - }, - "directories": {}, - "_resolved": "https://registry.npmjs.org/foreach/-/foreach-2.0.5.tgz", - "readme": "ERROR: No README data found!" -} diff --git a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-sublevel/node_modules/xtend/node_modules/object-keys/node_modules/foreach/test.js b/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-sublevel/node_modules/xtend/node_modules/object-keys/node_modules/foreach/test.js deleted file mode 100644 index c6283c3c..00000000 --- a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-sublevel/node_modules/xtend/node_modules/object-keys/node_modules/foreach/test.js +++ /dev/null @@ -1,153 +0,0 @@ -var test = require('tape'); -var forEach = require('./index.js'); - - -test('second argument: iterator', function (t) { - var arr = []; - t.throws(function () { forEach(arr); }, TypeError, 'undefined is not a function'); - t.throws(function () { forEach(arr, null); }, TypeError, 'null is not a function'); - t.throws(function () { forEach(arr, ''); }, TypeError, 'string is not a function'); - t.throws(function () { forEach(arr, /a/); }, TypeError, 'regex is not a function'); - t.throws(function () { forEach(arr, true); }, TypeError, 'true is not a function'); - t.throws(function () { forEach(arr, false); }, TypeError, 'false is not a function'); - t.throws(function () { forEach(arr, NaN); }, TypeError, 'NaN is not a function'); - t.throws(function () { forEach(arr, 42); }, TypeError, '42 is not a function'); - t.doesNotThrow(function () { forEach(arr, function () {}); }, 'function is a function'); - t.end(); -}); - -test('array', function (t) { - var arr = [1, 2, 3]; - - t.test('iterates over every item', function (st) { - var index = 0; - forEach(arr, function () { index += 1; }); - st.equal(index, arr.length, 'iterates ' + arr.length + ' times'); - st.end(); - }); - - t.test('first iterator argument', function (st) { - var index = 0; - st.plan(arr.length); - forEach(arr, function (item) { - st.equal(arr[index], item, 'item ' + index + ' is passed as first argument'); - index += 1; - }); - st.end(); - }); - - t.test('second iterator argument', function (st) { - var counter = 0; - st.plan(arr.length); - forEach(arr, function (item, index) { - st.equal(counter, index, 'index ' + index + ' is passed as second argument'); - counter += 1; - }); - st.end(); - }); - - t.test('third iterator argument', function (st) { - st.plan(arr.length); - forEach(arr, function (item, index, array) { - st.deepEqual(arr, array, 'array is passed as third argument'); - }); - st.end(); - }); - - t.test('context argument', function (st) { - var context = {}; - st.plan(1); - forEach([1], function () { - st.equal(this, context, '"this" is the passed context'); - }, context); - st.end(); - }); - - t.end(); -}); - -test('object', function (t) { - var obj = { - a: 1, - b: 2, - c: 3 - }; - var keys = ['a', 'b', 'c']; - - var F = function () { - this.a = 1; - this.b = 2; - }; - F.prototype.c = 3; - var fKeys = ['a', 'b']; - - t.test('iterates over every object literal key', function (st) { - var counter = 0; - forEach(obj, function () { counter += 1; }); - st.equal(counter, keys.length, 'iterated ' + counter + ' times'); - st.end(); - }); - - t.test('iterates only over own keys', function (st) { - var counter = 0; - forEach(new F(), function () { counter += 1; }); - st.equal(counter, fKeys.length, 'iterated ' + fKeys.length + ' times'); - st.end(); - }); - - t.test('first iterator argument', function (st) { - var index = 0; - st.plan(keys.length); - forEach(obj, function (item) { - st.equal(obj[keys[index]], item, 'item at key ' + keys[index] + ' is passed as first argument'); - index += 1; - }); - st.end(); - }); - - t.test('second iterator argument', function (st) { - var counter = 0; - st.plan(keys.length); - forEach(obj, function (item, key) { - st.equal(keys[counter], key, 'key ' + key + ' is passed as second argument'); - counter += 1; - }); - st.end(); - }); - - t.test('third iterator argument', function (st) { - st.plan(keys.length); - forEach(obj, function (item, key, object) { - st.deepEqual(obj, object, 'object is passed as third argument'); - }); - st.end(); - }); - - t.test('context argument', function (st) { - var context = {}; - st.plan(1); - forEach({ a: 1 }, function () { - st.equal(this, context, '"this" is the passed context'); - }, context); - st.end(); - }); - - t.end(); -}); - - -test('string', function (t) { - var str = 'str'; - t.test('second iterator argument', function (st) { - var counter = 0; - st.plan(str.length * 2 + 1); - forEach(str, function (item, index) { - st.equal(counter, index, 'index ' + index + ' is passed as second argument'); - st.equal(str.charAt(index), item); - counter += 1; - }); - st.equal(counter, str.length, 'iterates ' + str.length + ' times'); - }); - t.end(); -}); - diff --git a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-sublevel/node_modules/xtend/node_modules/object-keys/node_modules/indexof/.npmignore b/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-sublevel/node_modules/xtend/node_modules/object-keys/node_modules/indexof/.npmignore deleted file mode 100644 index 48a2e246..00000000 --- a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-sublevel/node_modules/xtend/node_modules/object-keys/node_modules/indexof/.npmignore +++ /dev/null @@ -1,2 +0,0 @@ -components -build diff --git a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-sublevel/node_modules/xtend/node_modules/object-keys/node_modules/indexof/Makefile b/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-sublevel/node_modules/xtend/node_modules/object-keys/node_modules/indexof/Makefile deleted file mode 100644 index 3f6119d2..00000000 --- a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-sublevel/node_modules/xtend/node_modules/object-keys/node_modules/indexof/Makefile +++ /dev/null @@ -1,11 +0,0 @@ - -build: components index.js - @component build - -components: - @Component install - -clean: - rm -fr build components template.js - -.PHONY: clean diff --git a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-sublevel/node_modules/xtend/node_modules/object-keys/node_modules/indexof/Readme.md b/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-sublevel/node_modules/xtend/node_modules/object-keys/node_modules/indexof/Readme.md deleted file mode 100644 index 99c8dfc8..00000000 --- a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-sublevel/node_modules/xtend/node_modules/object-keys/node_modules/indexof/Readme.md +++ /dev/null @@ -1,15 +0,0 @@ - -# indexOf - - Lame indexOf thing, thanks microsoft - -## Example - -```js -var index = require('indexof'); -index(arr, obj); -``` - -## License - - MIT \ No newline at end of file diff --git a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-sublevel/node_modules/xtend/node_modules/object-keys/node_modules/indexof/component.json b/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-sublevel/node_modules/xtend/node_modules/object-keys/node_modules/indexof/component.json deleted file mode 100644 index e3430d75..00000000 --- a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-sublevel/node_modules/xtend/node_modules/object-keys/node_modules/indexof/component.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "name": "indexof", - "description": "Microsoft sucks", - "version": "0.0.1", - "keywords": ["index", "array", "indexOf"], - "dependencies": {}, - "scripts": [ - "index.js" - ] -} \ No newline at end of file diff --git a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-sublevel/node_modules/xtend/node_modules/object-keys/node_modules/indexof/index.js b/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-sublevel/node_modules/xtend/node_modules/object-keys/node_modules/indexof/index.js deleted file mode 100644 index 9d9667b2..00000000 --- a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-sublevel/node_modules/xtend/node_modules/object-keys/node_modules/indexof/index.js +++ /dev/null @@ -1,10 +0,0 @@ - -var indexOf = [].indexOf; - -module.exports = function(arr, obj){ - if (indexOf) return arr.indexOf(obj); - for (var i = 0; i < arr.length; ++i) { - if (arr[i] === obj) return i; - } - return -1; -}; \ No newline at end of file diff --git a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-sublevel/node_modules/xtend/node_modules/object-keys/node_modules/indexof/package.json b/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-sublevel/node_modules/xtend/node_modules/object-keys/node_modules/indexof/package.json deleted file mode 100644 index 5367f580..00000000 --- a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-sublevel/node_modules/xtend/node_modules/object-keys/node_modules/indexof/package.json +++ /dev/null @@ -1,32 +0,0 @@ -{ - "name": "indexof", - "description": "Microsoft sucks", - "version": "0.0.1", - "keywords": [ - "index", - "array", - "indexOf" - ], - "dependencies": {}, - "component": { - "scripts": { - "indexof/index.js": "index.js" - } - }, - "_id": "indexof@0.0.1", - "dist": { - "shasum": "82dc336d232b9062179d05ab3293a66059fd435d", - "tarball": "http://registry.npmjs.org/indexof/-/indexof-0.0.1.tgz" - }, - "maintainers": [ - { - "name": "tjholowaychuk", - "email": "tj@vision-media.ca" - } - ], - "directories": {}, - "_shasum": "82dc336d232b9062179d05ab3293a66059fd435d", - "_resolved": "https://registry.npmjs.org/indexof/-/indexof-0.0.1.tgz", - "_from": "indexof@>=0.0.1 <0.1.0", - "readme": "ERROR: No README data found!" -} diff --git a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-sublevel/node_modules/xtend/node_modules/object-keys/node_modules/is/LICENSE.md b/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-sublevel/node_modules/xtend/node_modules/object-keys/node_modules/is/LICENSE.md deleted file mode 100644 index b0b7e1a8..00000000 --- a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-sublevel/node_modules/xtend/node_modules/object-keys/node_modules/is/LICENSE.md +++ /dev/null @@ -1,22 +0,0 @@ -(The MIT License) - -Copyright (c) 2013 Enrico Marino - -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/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-sublevel/node_modules/xtend/node_modules/object-keys/node_modules/is/README.md b/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-sublevel/node_modules/xtend/node_modules/object-keys/node_modules/is/README.md deleted file mode 100644 index 412a962a..00000000 --- a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-sublevel/node_modules/xtend/node_modules/object-keys/node_modules/is/README.md +++ /dev/null @@ -1,129 +0,0 @@ -# is - -The definitive JavaScript type testing library - -To be or not to be? This is the library! - -[![browser support][1]][2] - -## Installation - -As a node.js module - - $ npm install is - -As a component - - $ component install enricomarino/is - -## API - -### general - - - is.a (value, type) or is.type (value, type) - - is.defined (value) - - is.empty (value) - - is.equal (value, other) - - is.hosted (value, host) - - is.instance (value, constructor) - - is.instanceof (value, constructor) - deprecated, because in ES3 browsers, "instanceof" is a reserved word - - is.null (value) - deprecated, because in ES3 browsers, "null" is a reserved word - - is.undefined (value) - -### arguments - - - is.arguments (value) - - is.arguments.empty (value) - -### array - - - is.array (value) - - is.array.empty (value) - - is.arraylike (value) - -### boolean - - - is.boolean (value) - - is.false (value) - deprecated, because in ES3 browsers, "false" is a reserved word - - is.true (value) - deprecated, because in ES3 browsers, "true" is a reserved word - -### date - - - is.date (value) - -### element - - - is.element (value) - -### error - - - is.error (value) - -### function - - - is.fn(value) - - is.function(value) - deprecated, because in ES3 browsers, "function" is a reserved word - -### number - - - is.number (value) - - is.infinite (value) - - is.decimal (value) - - is.divisibleBy (value, n) - - is.int (value) - - is.maximum (value, others) - - is.minimum (value, others) - - is.nan (value) - - is.even (value) - - is.odd (value) - - is.ge (value, other) - - is.gt (value, other) - - is.le (value, other) - - is.lt (value, other) - - is.within (value, start, finish) - -### object - - - is.object (value) - -### regexp - - - is.regexp (value) - -### string - - - is.string (value) - - -## Contributors - -- [Jordan Harband](https://github.com/ljharb) - -## License - -(The MIT License) - -Copyright (c) 2013 Enrico Marino - -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. - -[1]: https://ci.testling.com/enricomarino/is.png -[2]: https://ci.testling.com/enricomarino/is - diff --git a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-sublevel/node_modules/xtend/node_modules/object-keys/node_modules/is/component.json b/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-sublevel/node_modules/xtend/node_modules/object-keys/node_modules/is/component.json deleted file mode 100644 index 50f6cd91..00000000 --- a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-sublevel/node_modules/xtend/node_modules/object-keys/node_modules/is/component.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "name": "is", - "repo": "enricomarino/is", - "description": "The definitive type testing library", - "version": "0.2.0", - "dependencies": {}, - "scripts": ["index.js"] -} diff --git a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-sublevel/node_modules/xtend/node_modules/object-keys/node_modules/is/index.js b/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-sublevel/node_modules/xtend/node_modules/object-keys/node_modules/is/index.js deleted file mode 100644 index 6e48c468..00000000 --- a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-sublevel/node_modules/xtend/node_modules/object-keys/node_modules/is/index.js +++ /dev/null @@ -1,702 +0,0 @@ - -/**! - * is - * the definitive JavaScript type testing library - * - * @copyright 2013 Enrico Marino - * @license MIT - */ - -var objProto = Object.prototype; -var owns = objProto.hasOwnProperty; -var toString = objProto.toString; -var isActualNaN = function (value) { - return value !== value; -}; -var NON_HOST_TYPES = { - "boolean": 1, - "number": 1, - "string": 1, - "undefined": 1 -}; - -/** - * Expose `is` - */ - -var is = module.exports = {}; - -/** - * Test general. - */ - -/** - * is.type - * Test if `value` is a type of `type`. - * - * @param {Mixed} value value to test - * @param {String} type type - * @return {Boolean} true if `value` is a type of `type`, false otherwise - * @api public - */ - -is.a = -is.type = function (value, type) { - return typeof value === type; -}; - -/** - * is.defined - * Test if `value` is defined. - * - * @param {Mixed} value value to test - * @return {Boolean} true if 'value' is defined, false otherwise - * @api public - */ - -is.defined = function (value) { - return value !== undefined; -}; - -/** - * is.empty - * Test if `value` is empty. - * - * @param {Mixed} value value to test - * @return {Boolean} true if `value` is empty, false otherwise - * @api public - */ - -is.empty = function (value) { - var type = toString.call(value); - var key; - - if ('[object Array]' === type || '[object Arguments]' === type) { - return value.length === 0; - } - - if ('[object Object]' === type) { - for (key in value) if (owns.call(value, key)) return false; - return true; - } - - if ('[object String]' === type) { - return '' === value; - } - - return false; -}; - -/** - * is.equal - * Test if `value` is equal to `other`. - * - * @param {Mixed} value value to test - * @param {Mixed} other value to compare with - * @return {Boolean} true if `value` is equal to `other`, false otherwise - */ - -is.equal = function (value, other) { - var type = toString.call(value) - var key; - - if (type !== toString.call(other)) { - return false; - } - - if ('[object Object]' === type) { - for (key in value) { - if (!is.equal(value[key], other[key])) { - return false; - } - } - return true; - } - - if ('[object Array]' === type) { - key = value.length; - if (key !== other.length) { - return false; - } - while (--key) { - if (!is.equal(value[key], other[key])) { - return false; - } - } - return true; - } - - if ('[object Function]' === type) { - return value.prototype === other.prototype; - } - - if ('[object Date]' === type) { - return value.getTime() === other.getTime(); - } - - return value === other; -}; - -/** - * is.hosted - * Test if `value` is hosted by `host`. - * - * @param {Mixed} value to test - * @param {Mixed} host host to test with - * @return {Boolean} true if `value` is hosted by `host`, false otherwise - * @api public - */ - -is.hosted = function (value, host) { - var type = typeof host[value]; - return type === 'object' ? !!host[value] : !NON_HOST_TYPES[type]; -}; - -/** - * is.instance - * Test if `value` is an instance of `constructor`. - * - * @param {Mixed} value value to test - * @return {Boolean} true if `value` is an instance of `constructor` - * @api public - */ - -is.instance = is['instanceof'] = function (value, constructor) { - return value instanceof constructor; -}; - -/** - * is.null - * Test if `value` is null. - * - * @param {Mixed} value value to test - * @return {Boolean} true if `value` is null, false otherwise - * @api public - */ - -is['null'] = function (value) { - return value === null; -}; - -/** - * is.undefined - * Test if `value` is undefined. - * - * @param {Mixed} value value to test - * @return {Boolean} true if `value` is undefined, false otherwise - * @api public - */ - -is.undefined = function (value) { - return value === undefined; -}; - -/** - * Test arguments. - */ - -/** - * is.arguments - * Test if `value` is an arguments object. - * - * @param {Mixed} value value to test - * @return {Boolean} true if `value` is an arguments object, false otherwise - * @api public - */ - -is.arguments = function (value) { - var isStandardArguments = '[object Arguments]' === toString.call(value); - var isOldArguments = !is.array(value) && is.arraylike(value) && is.object(value) && is.fn(value.callee); - return isStandardArguments || isOldArguments; -}; - -/** - * Test array. - */ - -/** - * is.array - * Test if 'value' is an array. - * - * @param {Mixed} value value to test - * @return {Boolean} true if `value` is an array, false otherwise - * @api public - */ - -is.array = function (value) { - return '[object Array]' === toString.call(value); -}; - -/** - * is.arguments.empty - * Test if `value` is an empty arguments object. - * - * @param {Mixed} value value to test - * @return {Boolean} true if `value` is an empty arguments object, false otherwise - * @api public - */ -is.arguments.empty = function (value) { - return is.arguments(value) && value.length === 0; -}; - -/** - * is.array.empty - * Test if `value` is an empty array. - * - * @param {Mixed} value value to test - * @return {Boolean} true if `value` is an empty array, false otherwise - * @api public - */ -is.array.empty = function (value) { - return is.array(value) && value.length === 0; -}; - -/** - * is.arraylike - * Test if `value` is an arraylike object. - * - * @param {Mixed} value value to test - * @return {Boolean} true if `value` is an arguments object, false otherwise - * @api public - */ - -is.arraylike = function (value) { - return !!value && !is.boolean(value) - && owns.call(value, 'length') - && isFinite(value.length) - && is.number(value.length) - && value.length >= 0; -}; - -/** - * Test boolean. - */ - -/** - * is.boolean - * Test if `value` is a boolean. - * - * @param {Mixed} value value to test - * @return {Boolean} true if `value` is a boolean, false otherwise - * @api public - */ - -is.boolean = function (value) { - return '[object Boolean]' === toString.call(value); -}; - -/** - * is.false - * Test if `value` is false. - * - * @param {Mixed} value value to test - * @return {Boolean} true if `value` is false, false otherwise - * @api public - */ - -is['false'] = function (value) { - return is.boolean(value) && (value === false || value.valueOf() === false); -}; - -/** - * is.true - * Test if `value` is true. - * - * @param {Mixed} value value to test - * @return {Boolean} true if `value` is true, false otherwise - * @api public - */ - -is['true'] = function (value) { - return is.boolean(value) && (value === true || value.valueOf() === true); -}; - -/** - * Test date. - */ - -/** - * is.date - * Test if `value` is a date. - * - * @param {Mixed} value value to test - * @return {Boolean} true if `value` is a date, false otherwise - * @api public - */ - -is.date = function (value) { - return '[object Date]' === toString.call(value); -}; - -/** - * Test element. - */ - -/** - * is.element - * Test if `value` is an html element. - * - * @param {Mixed} value value to test - * @return {Boolean} true if `value` is an HTML Element, false otherwise - * @api public - */ - -is.element = function (value) { - return value !== undefined - && typeof HTMLElement !== 'undefined' - && value instanceof HTMLElement - && value.nodeType === 1; -}; - -/** - * Test error. - */ - -/** - * is.error - * Test if `value` is an error object. - * - * @param {Mixed} value value to test - * @return {Boolean} true if `value` is an error object, false otherwise - * @api public - */ - -is.error = function (value) { - return '[object Error]' === toString.call(value); -}; - -/** - * Test function. - */ - -/** - * is.fn / is.function (deprecated) - * Test if `value` is a function. - * - * @param {Mixed} value value to test - * @return {Boolean} true if `value` is a function, false otherwise - * @api public - */ - -is.fn = is['function'] = function (value) { - var isAlert = typeof window !== 'undefined' && value === window.alert; - return isAlert || '[object Function]' === toString.call(value); -}; - -/** - * Test number. - */ - -/** - * is.number - * Test if `value` is a number. - * - * @param {Mixed} value value to test - * @return {Boolean} true if `value` is a number, false otherwise - * @api public - */ - -is.number = function (value) { - return '[object Number]' === toString.call(value); -}; - -/** - * is.infinite - * Test if `value` is positive or negative infinity. - * - * @param {Mixed} value value to test - * @return {Boolean} true if `value` is positive or negative Infinity, false otherwise - * @api public - */ -is.infinite = function (value) { - return value === Infinity || value === -Infinity; -}; - -/** - * is.decimal - * Test if `value` is a decimal number. - * - * @param {Mixed} value value to test - * @return {Boolean} true if `value` is a decimal number, false otherwise - * @api public - */ - -is.decimal = function (value) { - return is.number(value) && !isActualNaN(value) && !is.infinite(value) && value % 1 !== 0; -}; - -/** - * is.divisibleBy - * Test if `value` is divisible by `n`. - * - * @param {Number} value value to test - * @param {Number} n dividend - * @return {Boolean} true if `value` is divisible by `n`, false otherwise - * @api public - */ - -is.divisibleBy = function (value, n) { - var isDividendInfinite = is.infinite(value); - var isDivisorInfinite = is.infinite(n); - var isNonZeroNumber = is.number(value) && !isActualNaN(value) && is.number(n) && !isActualNaN(n) && n !== 0; - return isDividendInfinite || isDivisorInfinite || (isNonZeroNumber && value % n === 0); -}; - -/** - * is.int - * Test if `value` is an integer. - * - * @param value to test - * @return {Boolean} true if `value` is an integer, false otherwise - * @api public - */ - -is.int = function (value) { - return is.number(value) && !isActualNaN(value) && value % 1 === 0; -}; - -/** - * is.maximum - * Test if `value` is greater than 'others' values. - * - * @param {Number} value value to test - * @param {Array} others values to compare with - * @return {Boolean} true if `value` is greater than `others` values - * @api public - */ - -is.maximum = function (value, others) { - if (isActualNaN(value)) { - throw new TypeError('NaN is not a valid value'); - } else if (!is.arraylike(others)) { - throw new TypeError('second argument must be array-like'); - } - var len = others.length; - - while (--len >= 0) { - if (value < others[len]) { - return false; - } - } - - return true; -}; - -/** - * is.minimum - * Test if `value` is less than `others` values. - * - * @param {Number} value value to test - * @param {Array} others values to compare with - * @return {Boolean} true if `value` is less than `others` values - * @api public - */ - -is.minimum = function (value, others) { - if (isActualNaN(value)) { - throw new TypeError('NaN is not a valid value'); - } else if (!is.arraylike(others)) { - throw new TypeError('second argument must be array-like'); - } - var len = others.length; - - while (--len >= 0) { - if (value > others[len]) { - return false; - } - } - - return true; -}; - -/** - * is.nan - * Test if `value` is not a number. - * - * @param {Mixed} value value to test - * @return {Boolean} true if `value` is not a number, false otherwise - * @api public - */ - -is.nan = function (value) { - return !is.number(value) || value !== value; -}; - -/** - * is.even - * Test if `value` is an even number. - * - * @param {Number} value value to test - * @return {Boolean} true if `value` is an even number, false otherwise - * @api public - */ - -is.even = function (value) { - return is.infinite(value) || (is.number(value) && value === value && value % 2 === 0); -}; - -/** - * is.odd - * Test if `value` is an odd number. - * - * @param {Number} value value to test - * @return {Boolean} true if `value` is an odd number, false otherwise - * @api public - */ - -is.odd = function (value) { - return is.infinite(value) || (is.number(value) && value === value && value % 2 !== 0); -}; - -/** - * is.ge - * Test if `value` is greater than or equal to `other`. - * - * @param {Number} value value to test - * @param {Number} other value to compare with - * @return {Boolean} - * @api public - */ - -is.ge = function (value, other) { - if (isActualNaN(value) || isActualNaN(other)) { - throw new TypeError('NaN is not a valid value'); - } - return !is.infinite(value) && !is.infinite(other) && value >= other; -}; - -/** - * is.gt - * Test if `value` is greater than `other`. - * - * @param {Number} value value to test - * @param {Number} other value to compare with - * @return {Boolean} - * @api public - */ - -is.gt = function (value, other) { - if (isActualNaN(value) || isActualNaN(other)) { - throw new TypeError('NaN is not a valid value'); - } - return !is.infinite(value) && !is.infinite(other) && value > other; -}; - -/** - * is.le - * Test if `value` is less than or equal to `other`. - * - * @param {Number} value value to test - * @param {Number} other value to compare with - * @return {Boolean} if 'value' is less than or equal to 'other' - * @api public - */ - -is.le = function (value, other) { - if (isActualNaN(value) || isActualNaN(other)) { - throw new TypeError('NaN is not a valid value'); - } - return !is.infinite(value) && !is.infinite(other) && value <= other; -}; - -/** - * is.lt - * Test if `value` is less than `other`. - * - * @param {Number} value value to test - * @param {Number} other value to compare with - * @return {Boolean} if `value` is less than `other` - * @api public - */ - -is.lt = function (value, other) { - if (isActualNaN(value) || isActualNaN(other)) { - throw new TypeError('NaN is not a valid value'); - } - return !is.infinite(value) && !is.infinite(other) && value < other; -}; - -/** - * is.within - * Test if `value` is within `start` and `finish`. - * - * @param {Number} value value to test - * @param {Number} start lower bound - * @param {Number} finish upper bound - * @return {Boolean} true if 'value' is is within 'start' and 'finish' - * @api public - */ -is.within = function (value, start, finish) { - if (isActualNaN(value) || isActualNaN(start) || isActualNaN(finish)) { - throw new TypeError('NaN is not a valid value'); - } else if (!is.number(value) || !is.number(start) || !is.number(finish)) { - throw new TypeError('all arguments must be numbers'); - } - var isAnyInfinite = is.infinite(value) || is.infinite(start) || is.infinite(finish); - return isAnyInfinite || (value >= start && value <= finish); -}; - -/** - * Test object. - */ - -/** - * is.object - * Test if `value` is an object. - * - * @param {Mixed} value value to test - * @return {Boolean} true if `value` is an object, false otherwise - * @api public - */ - -is.object = function (value) { - return value && '[object Object]' === toString.call(value); -}; - -/** - * is.hash - * Test if `value` is a hash - a plain object literal. - * - * @param {Mixed} value value to test - * @return {Boolean} true if `value` is a hash, false otherwise - * @api public - */ - -is.hash = function (value) { - return is.object(value) && value.constructor === Object && !value.nodeType && !value.setInterval; -}; - -/** - * Test regexp. - */ - -/** - * is.regexp - * Test if `value` is a regular expression. - * - * @param {Mixed} value value to test - * @return {Boolean} true if `value` is a regexp, false otherwise - * @api public - */ - -is.regexp = function (value) { - return '[object RegExp]' === toString.call(value); -}; - -/** - * Test string. - */ - -/** - * is.string - * Test if `value` is a string. - * - * @param {Mixed} value value to test - * @return {Boolean} true if 'value' is a string, false otherwise - * @api public - */ - -is.string = function (value) { - return '[object String]' === toString.call(value); -}; - diff --git a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-sublevel/node_modules/xtend/node_modules/object-keys/node_modules/is/package.json b/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-sublevel/node_modules/xtend/node_modules/object-keys/node_modules/is/package.json deleted file mode 100644 index 4cd5839c..00000000 --- a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-sublevel/node_modules/xtend/node_modules/object-keys/node_modules/is/package.json +++ /dev/null @@ -1,81 +0,0 @@ -{ - "name": "is", - "author": { - "name": "Enrico Marino", - "url": "http://onirame.com" - }, - "description": "the definitive JavaScript type testing library", - "homepage": "https://github.com/enricomarino/is", - "keywords": [ - "util", - "type", - "test" - ], - "contributors": [ - { - "name": "Jordan Harband", - "url": "https://github.com/ljharb" - } - ], - "dependencies": {}, - "repository": { - "type": "git", - "url": "git://github.com/enricomarino/is.git" - }, - "main": "index.js", - "version": "0.2.7", - "scripts": { - "test": "node test/index.js" - }, - "devDependencies": { - "tape": "~2.3.2", - "foreach": "~2.0.4" - }, - "testling": { - "files": "test/index.js", - "browsers": [ - "iexplore/6.0..latest", - "firefox/3.0", - "firefox/15.0..latest", - "firefox/nightly", - "chrome/4.0", - "chrome/22.0..latest", - "chrome/canary", - "opera/10.0..latest", - "opera/next", - "safari/5.0.5..latest", - "ipad/6.0..latest", - "iphone/6.0..latest" - ] - }, - "engines": { - "node": "*" - }, - "bugs": { - "url": "https://github.com/enricomarino/is/issues" - }, - "_id": "is@0.2.7", - "dist": { - "shasum": "3b34a2c48f359972f35042849193ae7264b63562", - "tarball": "https://registry.npmjs.org/is/-/is-0.2.7.tgz" - }, - "_from": "is@>=0.2.6 <0.3.0", - "_npmVersion": "1.3.17", - "_npmUser": { - "name": "ljharb", - "email": "ljharb@gmail.com" - }, - "maintainers": [ - { - "name": "ljharb", - "email": "ljharb@gmail.com" - }, - { - "name": "enricomarino", - "email": "enrico.marino@email.com" - } - ], - "directories": {}, - "_shasum": "3b34a2c48f359972f35042849193ae7264b63562", - "_resolved": "https://registry.npmjs.org/is/-/is-0.2.7.tgz" -} diff --git a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-sublevel/node_modules/xtend/node_modules/object-keys/node_modules/is/test/index.js b/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-sublevel/node_modules/xtend/node_modules/object-keys/node_modules/is/test/index.js deleted file mode 100644 index 51e32b33..00000000 --- a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-sublevel/node_modules/xtend/node_modules/object-keys/node_modules/is/test/index.js +++ /dev/null @@ -1,482 +0,0 @@ -var test = require('tape'); -var is = require('../index.js'); - -var forEach = require('foreach'); -var now = Date.now || function () { return +new Date(); }; - -test('is.type', function (t) { - var booleans = [true, false]; - forEach(booleans, function (boolean) { - t.ok(is.type(boolean, 'boolean'), '"' + boolean + '" is a boolean'); - }); - - var numbers = [1, 0 / 1, 0 / -1, NaN, Infinity, -Infinity]; - forEach(numbers, function (number) { - t.ok(is.type(number, 'number'), '"' + number + '" is a number'); - }); - - var objects = [{}, null, new Date()]; - forEach(objects, function (object) { - t.ok(is.type(object, 'object'), '"' + object + '" is an object'); - }); - - var strings = ['', 'abc']; - forEach(strings, function (string) { - t.ok(is.type(string, 'string'), '"' + string + '" is a string'); - }); - - t.ok(is.type(undefined, 'undefined'), 'undefined is undefined'); - - t.end(); -}); - -test('is.undefined', function (t) { - t.ok(is.undefined(), 'undefined is undefined'); - t.notOk(is.undefined(null), 'null is not undefined'); - t.notOk(is.undefined({}), 'object is not undefined'); - t.end(); -}); - -test('is.defined', function (t) { - t.notOk(is.defined(), 'undefined is not defined'); - t.ok(is.defined(null), 'null is defined'); - t.ok(is.defined({}), 'object is undefined'); - t.end(); -}); - -test('is.empty', function (t) { - t.ok(is.empty(''), 'empty string is empty'); - t.ok(is.empty([]), 'empty array is empty'); - t.ok(is.empty({}), 'empty object is empty'); - (function () { t.ok(is.empty(arguments), 'empty arguments is empty'); }()); - t.end(); -}); - -test('is.equal', function (t) { - t.ok(is.equal([1, 2, 3], [1, 2, 3]), 'arrays are shallowly equal'); - t.ok(is.equal([1, 2, [3, 4]], [1, 2, [3, 4]]), 'arrays are deep equal'); - t.ok(is.equal({ a: 1, b: 2, c: 3 }, { a: 1, b: 2, c: 3 }), 'objects are shallowly equal'); - t.ok(is.equal({ a: { b: 1 } }, { a: { b: 1 } }), 'objects are deep equal'); - var nowTS = now(); - t.ok(is.equal(new Date(nowTS), new Date(nowTS)), 'two equal date objects are equal'); - - var F = function () {}; - F.prototype = {}; - t.ok(is.equal(new F(), new F()), 'two object instances are equal when the prototype is the same'); - t.end(); -}); - -test('is.hosted', function (t) { - t.ok(is.hosted('a', { a: {} }), 'object is hosted'); - t.ok(is.hosted('a', { a: [] }), 'array is hosted'); - t.ok(is.hosted('a', { a: function () {} }), 'function is hosted'); - t.notOk(is.hosted('a', { a: true }), 'boolean value is not hosted'); - t.notOk(is.hosted('a', { a: false }), 'boolean value is not hosted'); - t.notOk(is.hosted('a', { a: 3 }), 'number value is not hosted'); - t.notOk(is.hosted('a', { a: undefined }), 'undefined value is not hosted'); - t.notOk(is.hosted('a', { a: 'abc' }), 'string value is not hosted'); - t.notOk(is.hosted('a', { a: null }), 'null value is not hosted'); - t.end(); -}); - -test('is.instance', function (t) { - t.ok(is.instance(new Date(), Date), 'new Date is instanceof Date'); - var F = function () {}; - t.ok(is.instance(new F(), F), 'new constructor is instanceof constructor'); - t.end(); -}); - -test('is.null', function (t) { - var isNull = is['null']; - t.ok(isNull(null), 'null is null'); - t.notOk(isNull(undefined), 'undefined is not null'); - t.notOk(isNull({}), 'object is not null'); - t.end(); -}); - -test('is.arguments', function (t) { - t.notOk(is.arguments([]), 'array is not arguments'); - (function () { t.ok(is.arguments(arguments), 'arguments is arguments'); }()); - (function () { t.notOk(is.arguments(Array.prototype.slice.call(arguments)), 'sliced arguments is not arguments'); }()); - t.end(); -}); - -test('is.array', function (t) { - t.ok(is.array([]), 'array is array'); - (function () { t.ok(is.array(Array.prototype.slice.call(arguments)), 'sliced arguments is array'); }()); - t.end(); -}); - -test('is.array.empty', function (t) { - t.ok(is.array.empty([]), 'empty array is empty array'); - (function () { t.notOk(is.array.empty(arguments), 'empty arguments is not empty array'); }()); - (function () { t.ok(is.array.empty(Array.prototype.slice.call(arguments)), 'empty sliced arguments is empty array'); }()); - t.end(); -}); - -test('is.arguments.empty', function (t) { - t.notOk(is.arguments.empty([]), 'empty array is not empty arguments'); - (function () { t.ok(is.arguments.empty(arguments), 'empty arguments is empty arguments'); }()); - (function () { t.notOk(is.arguments.empty(Array.prototype.slice.call(arguments)), 'empty sliced arguments is not empty arguments'); }()); - t.end(); -}); - -test('is.isarraylike', function (t) { - t.notOk(is.arraylike(), 'undefined is not array-like'); - t.notOk(is.arraylike(null), 'null is not array-like'); - t.notOk(is.arraylike(false), 'false is not array-like'); - t.notOk(is.arraylike(true), 'true is not array-like'); - t.ok(is.arraylike({ length: 0 }), 'object with zero length is array-like'); - t.ok(is.arraylike({ length: 1 }), 'object with positive length is array-like'); - t.notOk(is.arraylike({ length: -1 }), 'object with negative length is not array-like'); - t.notOk(is.arraylike({ length: NaN }), 'object with NaN length is not array-like'); - t.notOk(is.arraylike({ length: 'foo' }), 'object with string length is not array-like'); - t.notOk(is.arraylike({ length: '' }), 'object with empty string length is not array-like'); - t.ok(is.arraylike([]), 'array is array-like'); - (function () { t.ok(is.arraylike(arguments), 'empty arguments is array-like'); }()); - (function () { t.ok(is.arraylike(arguments), 'nonempty arguments is array-like'); }(1, 2, 3)); - t.end(); -}); - -test('is.boolean', function (t) { - t.ok(is.boolean(true), 'literal true is a boolean'); - t.ok(is.boolean(false), 'literal false is a boolean'); - t.ok(is.boolean(new Boolean(true)), 'object true is a boolean'); - t.ok(is.boolean(new Boolean(false)), 'object false is a boolean'); - t.notOk(is.boolean(), 'undefined is not a boolean'); - t.notOk(is.boolean(null), 'null is not a boolean'); - t.end(); -}); - -test('is.false', function (t) { - var isFalse = is['false']; - t.ok(isFalse(false), 'false is false'); - t.ok(isFalse(new Boolean(false)), 'object false is false'); - t.notOk(isFalse(true), 'true is not false'); - t.notOk(isFalse(), 'undefined is not false'); - t.notOk(isFalse(null), 'null is not false'); - t.notOk(isFalse(''), 'empty string is not false'); - t.end(); -}); - -test('is.true', function (t) { - var isTrue = is['true']; - t.ok(isTrue(true), 'true is true'); - t.ok(isTrue(new Boolean(true)), 'object true is true'); - t.notOk(isTrue(false), 'false is not true'); - t.notOk(isTrue(), 'undefined is not true'); - t.notOk(isTrue(null), 'null is not true'); - t.notOk(isTrue(''), 'empty string is not true'); - t.end(); -}); - -test('is.date', function (t) { - t.ok(is.date(new Date()), 'new Date is date'); - t.notOk(is.date(), 'undefined is not date'); - t.notOk(is.date(null), 'null is not date'); - t.notOk(is.date(''), 'empty string is not date'); - t.notOk(is.date(now()), 'timestamp is not date'); - var F = function () {}; - F.prototype = new Date(); - t.notOk(is.date(new F()), 'Date subtype is not date'); - t.end(); -}); - -test('is.element', function (t) { - if (typeof HTMLElement !== 'undefined') { - var element = document.createElement('div'); - t.ok(is.element(element), 'HTMLElement is element'); - t.notOk(is.element({ nodeType: 1 }), 'object with nodeType is not element'); - } else { - t.ok(true, 'Skipping is.element test in a non-browser environment'); - } - t.end(); -}); - -test('is.error', function (t) { - var err = new Error('foo'); - t.ok(is.error(err), 'Error is error'); - t.notOk(is.error({}), 'object is not error'); - t.notOk(is.error({ toString: function () { return '[object Error]'; } }), 'object with error\'s toString is not error'); - t.end(); -}); - -test('is.fn', function (t) { - t.equal(is['function'], is.fn, 'alias works'); - t.ok(is.fn(function () {}), 'function is function'); - t.ok(is.fn(console.log), 'console.log is function'); - if (typeof window !== 'undefined') { - // in IE7/8, typeof alert === 'object' - t.ok(is.fn(window.alert), 'window.alert is function'); - } - t.notOk(is.fn({}), 'object is not function'); - t.notOk(is.fn(null), 'null is not function'); - t.end(); -}); - -test('is.number', function (t) { - t.ok(is.number(0), 'positive zero is number'); - t.ok(is.number(0 / -1), 'negative zero is number'); - t.ok(is.number(3), 'three is number'); - t.ok(is.number(NaN), 'NaN is number'); - t.ok(is.number(Infinity), 'infinity is number'); - t.ok(is.number(-Infinity), 'negative infinity is number'); - t.ok(is.number(new Number(42)), 'object number is number'); - t.notOk(is.number(), 'undefined is not number'); - t.notOk(is.number(null), 'null is not number'); - t.notOk(is.number(true), 'true is not number'); - t.end(); -}); - -test('is.infinite', function (t) { - t.ok(is.infinite(Infinity), 'positive infinity is infinite'); - t.ok(is.infinite(-Infinity), 'negative infinity is infinite'); - t.notOk(is.infinite(NaN), 'NaN is not infinite'); - t.notOk(is.infinite(0), 'a number is not infinite'); - t.end(); -}); - -test('is.decimal', function (t) { - t.ok(is.decimal(1.1), 'decimal is decimal'); - t.notOk(is.decimal(0), 'zero is not decimal'); - t.notOk(is.decimal(1), 'integer is not decimal'); - t.notOk(is.decimal(NaN), 'NaN is not decimal'); - t.notOk(is.decimal(Infinity), 'Infinity is not decimal'); - t.end(); -}); - -test('is.divisibleBy', function (t) { - t.ok(is.divisibleBy(4, 2), '4 is divisible by 2'); - t.ok(is.divisibleBy(4, 2), '4 is divisible by 2'); - t.ok(is.divisibleBy(0, 1), '0 is divisible by 1'); - t.ok(is.divisibleBy(Infinity, 1), 'infinity is divisible by anything'); - t.ok(is.divisibleBy(1, Infinity), 'anything is divisible by infinity'); - t.ok(is.divisibleBy(Infinity, Infinity), 'infinity is divisible by infinity'); - t.notOk(is.divisibleBy(1, 0), '1 is not divisible by 0'); - t.notOk(is.divisibleBy(NaN, 1), 'NaN is not divisible by 1'); - t.notOk(is.divisibleBy(1, NaN), '1 is not divisible by NaN'); - t.notOk(is.divisibleBy(NaN, NaN), 'NaN is not divisible by NaN'); - t.notOk(is.divisibleBy(1, 3), '1 is not divisible by 3'); - t.end(); -}); - -test('is.int', function (t) { - t.ok(is.int(0), '0 is integer'); - t.ok(is.int(3), '3 is integer'); - t.notOk(is.int(1.1), '1.1 is not integer'); - t.notOk(is.int(NaN), 'NaN is not integer'); - t.notOk(is.int(Infinity), 'infinity is not integer'); - t.notOk(is.int(null), 'null is not integer'); - t.notOk(is.int(), 'undefined is not integer'); - t.end(); -}); - -test('is.maximum', function (t) { - t.ok(is.maximum(3, [3, 2, 1]), '3 is maximum of [3,2,1]'); - t.ok(is.maximum(3, [1, 2, 3]), '3 is maximum of [1,2,3]'); - t.ok(is.maximum(4, [1, 2, 3]), '4 is maximum of [1,2,3]'); - t.ok(is.maximum('c', ['a', 'b', 'c']), 'c is maximum of [a,b,c]'); - t.notOk(is.maximum(2, [1, 2, 3]), '2 is not maximum of [1,2,3]'); - var error = new TypeError('second argument must be array-like'); - t.throws(function () { return is.maximum(2, null); }, error, 'throws when second value is not array-like'); - t.throws(function () { return is.maximum(2, {}); }, error, 'throws when second value is not array-like'); - t.end(); -}); - -test('is.minimum', function (t) { - t.ok(is.minimum(1, [1, 2, 3]), '1 is minimum of [1,2,3]'); - t.ok(is.minimum(0, [1, 2, 3]), '0 is minimum of [1,2,3]'); - t.ok(is.minimum('a', ['a', 'b', 'c']), 'a is minimum of [a,b,c]'); - t.notOk(is.minimum(2, [1, 2, 3]), '2 is not minimum of [1,2,3]'); - var error = new TypeError('second argument must be array-like'); - t.throws(function () { return is.minimum(2, null); }, error, 'throws when second value is not array-like'); - t.throws(function () { return is.minimum(2, {}); }, error, 'throws when second value is not array-like'); - t.end(); -}); - -test('is.nan', function (t) { - t.ok(is.nan(NaN), 'NaN is not a number'); - t.ok(is.nan('abc'), 'string is not a number'); - t.ok(is.nan(true), 'boolean is not a number'); - t.ok(is.nan({}), 'object is not a number'); - t.ok(is.nan([]), 'array is not a number'); - t.ok(is.nan(function () {}), 'function is not a number'); - t.notOk(is.nan(0), 'zero is a number'); - t.notOk(is.nan(3), 'three is a number'); - t.notOk(is.nan(1.1), '1.1 is a number'); - t.notOk(is.nan(Infinity), 'infinity is a number'); - t.end(); -}); - -test('is.even', function (t) { - t.ok(is.even(0), 'zero is even'); - t.ok(is.even(2), 'two is even'); - t.ok(is.even(Infinity), 'infinity is even'); - t.notOk(is.even(1), '1 is not even'); - t.notOk(is.even(), 'undefined is not even'); - t.notOk(is.even(null), 'null is not even'); - t.notOk(is.even(NaN), 'NaN is not even'); - t.end(); -}); - -test('is.odd', function (t) { - t.ok(is.odd(1), 'zero is odd'); - t.ok(is.odd(3), 'two is odd'); - t.ok(is.odd(Infinity), 'infinity is odd'); - t.notOk(is.odd(0), '0 is not odd'); - t.notOk(is.odd(2), '2 is not odd'); - t.notOk(is.odd(), 'undefined is not odd'); - t.notOk(is.odd(null), 'null is not odd'); - t.notOk(is.odd(NaN), 'NaN is not odd'); - t.end(); -}); - -test('is.ge', function (t) { - t.ok(is.ge(3, 2), '3 is greater than 2'); - t.notOk(is.ge(2, 3), '2 is not greater than 3'); - t.ok(is.ge(3, 3), '3 is greater than or equal to 3'); - t.ok(is.ge('abc', 'a'), 'abc is greater than a'); - t.ok(is.ge('abc', 'abc'), 'abc is greater than or equal to abc'); - t.notOk(is.ge('a', 'abc'), 'a is not greater than abc'); - t.notOk(is.ge(Infinity, 0), 'infinity is not greater than anything'); - t.notOk(is.ge(0, Infinity), 'anything is not greater than infinity'); - var error = new TypeError('NaN is not a valid value'); - t.throws(function () { return is.ge(NaN, 2); }, error, 'throws when first value is NaN'); - t.throws(function () { return is.ge(2, NaN); }, error, 'throws when second value is NaN'); - t.end(); -}); - -test('is.gt', function (t) { - t.ok(is.gt(3, 2), '3 is greater than 2'); - t.notOk(is.gt(2, 3), '2 is not greater than 3'); - t.notOk(is.gt(3, 3), '3 is not greater than 3'); - t.ok(is.gt('abc', 'a'), 'abc is greater than a'); - t.notOk(is.gt('abc', 'abc'), 'abc is not greater than abc'); - t.notOk(is.gt('a', 'abc'), 'a is not greater than abc'); - t.notOk(is.gt(Infinity, 0), 'infinity is not greater than anything'); - t.notOk(is.gt(0, Infinity), 'anything is not greater than infinity'); - var error = new TypeError('NaN is not a valid value'); - t.throws(function () { return is.gt(NaN, 2); }, error, 'throws when first value is NaN'); - t.throws(function () { return is.gt(2, NaN); }, error, 'throws when second value is NaN'); - t.end(); -}); - -test('is.le', function (t) { - t.ok(is.le(2, 3), '2 is lesser than or equal to 3'); - t.notOk(is.le(3, 2), '3 is not lesser than or equal to 2'); - t.ok(is.le(3, 3), '3 is lesser than or equal to 3'); - t.ok(is.le('a', 'abc'), 'a is lesser than or equal to abc'); - t.ok(is.le('abc', 'abc'), 'abc is lesser than or equal to abc'); - t.notOk(is.le('abc', 'a'), 'abc is not lesser than or equal to a'); - t.notOk(is.le(Infinity, 0), 'infinity is not lesser than or equal to anything'); - t.notOk(is.le(0, Infinity), 'anything is not lesser than or equal to infinity'); - var error = new TypeError('NaN is not a valid value'); - t.throws(function () { return is.le(NaN, 2); }, error, 'throws when first value is NaN'); - t.throws(function () { return is.le(2, NaN); }, error, 'throws when second value is NaN'); - t.end(); -}); - -test('is.lt', function (t) { - t.ok(is.lt(2, 3), '2 is lesser than 3'); - t.notOk(is.lt(3, 2), '3 is not lesser than 2'); - t.notOk(is.lt(3, 3), '3 is not lesser than 3'); - t.ok(is.lt('a', 'abc'), 'a is lesser than abc'); - t.notOk(is.lt('abc', 'abc'), 'abc is not lesser than abc'); - t.notOk(is.lt('abc', 'a'), 'abc is not lesser than a'); - t.notOk(is.lt(Infinity, 0), 'infinity is not lesser than anything'); - t.notOk(is.lt(0, Infinity), 'anything is not lesser than infinity'); - var error = new TypeError('NaN is not a valid value'); - t.throws(function () { return is.lt(NaN, 2); }, error, 'throws when first value is NaN'); - t.throws(function () { return is.lt(2, NaN); }, error, 'throws when second value is NaN'); - t.end(); -}); - -test('is.within', function (t) { - var nanError = new TypeError('NaN is not a valid value'); - t.throws(function () { return is.within(NaN, 0, 0); }, nanError, 'throws when first value is NaN'); - t.throws(function () { return is.within(0, NaN, 0); }, nanError, 'throws when second value is NaN'); - t.throws(function () { return is.within(0, 0, NaN); }, nanError, 'throws when third value is NaN'); - - var error = new TypeError('all arguments must be numbers'); - t.throws(function () { return is.within('', 0, 0); }, error, 'throws when first value is string'); - t.throws(function () { return is.within(0, '', 0); }, error, 'throws when second value is string'); - t.throws(function () { return is.within(0, 0, ''); }, error, 'throws when third value is string'); - t.throws(function () { return is.within({}, 0, 0); }, error, 'throws when first value is object'); - t.throws(function () { return is.within(0, {}, 0); }, error, 'throws when second value is object'); - t.throws(function () { return is.within(0, 0, {}); }, error, 'throws when third value is object'); - t.throws(function () { return is.within(null, 0, 0); }, error, 'throws when first value is null'); - t.throws(function () { return is.within(0, null, 0); }, error, 'throws when second value is null'); - t.throws(function () { return is.within(0, 0, null); }, error, 'throws when third value is null'); - t.throws(function () { return is.within(undefined, 0, 0); }, error, 'throws when first value is undefined'); - t.throws(function () { return is.within(0, undefined, 0); }, error, 'throws when second value is undefined'); - t.throws(function () { return is.within(0, 0, undefined); }, error, 'throws when third value is undefined'); - - t.ok(is.within(2, 1, 3), '2 is between 1 and 3'); - t.ok(is.within(0, -1, 1), '0 is between -1 and 1'); - t.ok(is.within(2, 0, Infinity), 'infinity always returns true'); - t.ok(is.within(2, Infinity, 2), 'infinity always returns true'); - t.ok(is.within(Infinity, 0, 1), 'infinity always returns true'); - t.notOk(is.within(2, -1, -1), '2 is not between -1 and 1'); - t.end(); -}); - -test('is.object', function (t) { - t.ok(is.object({}), 'object literal is object'); - t.notOk(is.object(), 'undefined is not an object'); - t.notOk(is.object(null), 'null is not an object'); - t.notOk(is.object(true), 'true is not an object'); - t.notOk(is.object(''), 'string is not an object'); - t.notOk(is.object(NaN), 'NaN is not an object'); - t.notOk(is.object(Object), 'object constructor is not an object'); - t.notOk(is.object(function () {}), 'function is not an object'); - t.end(); -}); - -test('is.hash', function (t) { - t.ok(is.hash({}), 'empty object literal is hash'); - t.ok(is.hash({ 1: 2, a: "b" }), 'object literal is hash'); - t.notOk(is.hash(), 'undefined is not a hash'); - t.notOk(is.hash(null), 'null is not a hash'); - t.notOk(is.hash(new Date()), 'date is not a hash'); - t.notOk(is.hash(new String()), 'string object is not a hash'); - t.notOk(is.hash(''), 'string literal is not a hash'); - t.notOk(is.hash(new Number()), 'number object is not a hash'); - t.notOk(is.hash(1), 'number literal is not a hash'); - t.notOk(is.hash(true), 'true is not a hash'); - t.notOk(is.hash(false), 'false is not a hash'); - t.notOk(is.hash(new Boolean()), 'boolean obj is not hash'); - t.notOk(is.hash(false), 'literal false is not hash'); - t.notOk(is.hash(true), 'literal true is not hash'); - if (typeof module !== 'undefined') { - t.ok(is.hash(module.exports), 'module.exports is a hash'); - } - if (typeof window !== 'undefined') { - t.notOk(is.hash(window), 'window is not a hash'); - t.notOk(is.hash(document.createElement('div')), 'element is not a hash'); - } else if (typeof process !== 'undefined') { - t.notOk(is.hash(global), 'global is not a hash'); - t.notOk(is.hash(process), 'process is not a hash'); - } - t.end(); -}); - -test('is.regexp', function (t) { - t.ok(is.regexp(/a/g), 'regex literal is regex'); - t.ok(is.regexp(new RegExp('a', 'g')), 'regex object is regex'); - t.notOk(is.regexp(), 'undefined is not regex'); - t.notOk(is.regexp(function () {}), 'function is not regex'); - t.notOk(is.regexp('/a/g'), 'string regex is not regex'); - t.end(); -}); - -test('is.string', function (t) { - t.ok(is.string('foo'), 'string literal is string'); - t.ok(is.string(new String('foo')), 'string literal is string'); - t.notOk(is.string(), 'undefined is not string'); - t.notOk(is.string(String), 'string constructor is not string'); - var F = function () {}; - F.prototype = new String(); - t.notOk(is.string(F), 'string subtype is not string'); - t.end(); -}); - diff --git a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-sublevel/node_modules/xtend/node_modules/object-keys/package.json b/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-sublevel/node_modules/xtend/node_modules/object-keys/package.json deleted file mode 100644 index e35dc78c..00000000 --- a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-sublevel/node_modules/xtend/node_modules/object-keys/package.json +++ /dev/null @@ -1,69 +0,0 @@ -{ - "name": "object-keys", - "version": "0.2.0", - "author": { - "name": "Jordan Harband" - }, - "description": "An Object.keys replacement, in case Object.keys is not available. From https://github.com/kriskowal/es5-shim", - "license": "MIT", - "main": "index.js", - "scripts": { - "test": "node test.js" - }, - "repository": { - "type": "git", - "url": "git://github.com/ljharb/object-keys.git" - }, - "keywords": [ - "Object.keys", - "keys", - "ES5", - "shim" - ], - "dependencies": { - "foreach": "~2.0.1", - "indexof": "~0.0.1", - "is": "~0.2.6" - }, - "devDependencies": { - "tape": "~1.0.2" - }, - "testling": { - "files": "test.js", - "browsers": [ - "iexplore/6.0..latest", - "firefox/3.0..6.0", - "firefox/15.0..latest", - "firefox/nightly", - "chrome/4.0..10.0", - "chrome/20.0..latest", - "chrome/canary", - "opera/10.0..latest", - "opera/next", - "safari/4.0..latest", - "ipad/6.0..latest", - "iphone/6.0..latest" - ] - }, - "_id": "object-keys@0.2.0", - "dist": { - "shasum": "cddec02998b091be42bf1035ae32e49f1cb6ea67", - "tarball": "https://registry.npmjs.org/object-keys/-/object-keys-0.2.0.tgz" - }, - "_from": "object-keys@>=0.2.0 <0.3.0", - "_npmVersion": "1.2.18", - "_npmUser": { - "name": "ljharb", - "email": "ljharb@gmail.com" - }, - "maintainers": [ - { - "name": "ljharb", - "email": "ljharb@gmail.com" - } - ], - "directories": {}, - "deprecated": "Please update to the latest object-keys", - "_shasum": "cddec02998b091be42bf1035ae32e49f1cb6ea67", - "_resolved": "https://registry.npmjs.org/object-keys/-/object-keys-0.2.0.tgz" -} diff --git a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-sublevel/node_modules/xtend/node_modules/object-keys/shim.js b/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-sublevel/node_modules/xtend/node_modules/object-keys/shim.js deleted file mode 100644 index 0d13f4a5..00000000 --- a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-sublevel/node_modules/xtend/node_modules/object-keys/shim.js +++ /dev/null @@ -1,44 +0,0 @@ -(function () { - "use strict"; - - // modified from https://github.com/kriskowal/es5-shim - var has = Object.prototype.hasOwnProperty, - is = require('is'), - forEach = require('foreach'), - hasDontEnumBug = !({'toString': null}).propertyIsEnumerable('toString'), - dontEnums = [ - "toString", - "toLocaleString", - "valueOf", - "hasOwnProperty", - "isPrototypeOf", - "propertyIsEnumerable", - "constructor" - ], - keysShim; - - keysShim = function keys(object) { - if (!is.object(object) && !is.array(object)) { - throw new TypeError("Object.keys called on a non-object"); - } - - var name, theKeys = []; - for (name in object) { - if (has.call(object, name)) { - theKeys.push(name); - } - } - - if (hasDontEnumBug) { - forEach(dontEnums, function (dontEnum) { - if (has.call(object, dontEnum)) { - theKeys.push(dontEnum); - } - }); - } - return theKeys; - }; - - module.exports = keysShim; -}()); - diff --git a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-sublevel/node_modules/xtend/node_modules/object-keys/test.js b/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-sublevel/node_modules/xtend/node_modules/object-keys/test.js deleted file mode 100644 index 66737015..00000000 --- a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-sublevel/node_modules/xtend/node_modules/object-keys/test.js +++ /dev/null @@ -1,88 +0,0 @@ -var test = require('tape'); -var shimmedKeys = require('./index.js'); -var is = require('is'); -var keys = require('./shim.js'); -var forEach = require('foreach'); -var indexOf = require('indexof'); - -test('works', function (t) { - var obj = { - "str": "boz", - "obj": {}, - "arr": [], - "bool": true, - "num": 42, - "aNull": null, - "undef": undefined - }; - var objKeys = ['str', 'obj', 'arr', 'bool', 'num', 'aNull', 'undef']; - - t.test('exports a function', function (st) { - if (Object.keys) { - st.equal(Object.keys, shimmedKeys, 'Object.keys is supported and exported'); - } else { - st.equal(keys, shimmedKeys, 'Object.keys is not supported; shim is exported'); - } - st.end(); - }); - - t.test('working with actual shim', function (st) { - st.notEqual(Object.keys, keys, 'keys shim is not native Object.keys'); - st.end(); - }); - - t.test('works with an object literal', function (st) { - var theKeys = keys(obj); - st.equal(is.array(theKeys), true, 'returns an array'); - st.deepEqual(theKeys, objKeys, 'Object has expected keys'); - st.end(); - }); - - t.test('works with an array', function (st) { - var arr = [1, 2, 3]; - var theKeys = keys(arr); - st.equal(is.array(theKeys), true, 'returns an array'); - st.deepEqual(theKeys, ['0', '1', '2'], 'Array has expected keys'); - st.end(); - }); - - t.test('returns names which are own properties', function (st) { - forEach(keys(obj), function (name) { - st.equal(obj.hasOwnProperty(name), true, name + ' should be returned'); - }); - st.end(); - }); - - t.test('returns names which are enumerable', function (st) { - var k, loopedValues = []; - for (k in obj) { - loopedValues.push(k); - } - forEach(keys(obj), function (name) { - st.notEqual(indexOf(loopedValues, name), -1, name + ' is not enumerable'); - }); - st.end(); - }); - - t.test('throws an error for a non-object', function (st) { - st.throws( - function () { return keys(42); }, - new TypeError('Object.keys called on a non-object'), - 'throws on a non-object' - ); - st.end(); - }); - t.end(); -}); - -test('works with an object instance', function (t) { - var Prototype = function () {}; - Prototype.prototype.foo = true; - var obj = new Prototype(); - obj.bar = true; - var theKeys = keys(obj); - t.equal(is.array(theKeys), true, 'returns an array'); - t.deepEqual(theKeys, ['bar'], 'Instance has expected keys'); - t.end(); -}); - diff --git a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-sublevel/node_modules/xtend/package.json b/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-sublevel/node_modules/xtend/package.json deleted file mode 100644 index beeb004d..00000000 --- a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-sublevel/node_modules/xtend/package.json +++ /dev/null @@ -1,82 +0,0 @@ -{ - "name": "xtend", - "version": "2.0.6", - "description": "extend like a boss", - "keywords": [], - "author": { - "name": "Raynos", - "email": "raynos2@gmail.com" - }, - "repository": { - "type": "git", - "url": "git://github.com/Raynos/xtend.git" - }, - "main": "index", - "scripts": { - "test": "node test" - }, - "dependencies": { - "is-object": "~0.1.2", - "object-keys": "~0.2.0" - }, - "devDependencies": { - "tape": "~1.0.2" - }, - "homepage": "https://github.com/Raynos/xtend", - "contributors": [ - { - "name": "Jake Verbaten" - }, - { - "name": "Matt Esch" - } - ], - "bugs": { - "url": "https://github.com/Raynos/xtend/issues", - "email": "raynos2@gmail.com" - }, - "licenses": [ - { - "type": "MIT", - "url": "http://github.com/raynos/xtend/raw/master/LICENSE" - } - ], - "testling": { - "files": "test.js", - "browsers": [ - "ie/7..latest", - "firefox/16..latest", - "firefox/nightly", - "chrome/22..latest", - "chrome/canary", - "opera/12..latest", - "opera/next", - "safari/5.1..latest", - "ipad/6.0..latest", - "iphone/6.0..latest" - ] - }, - "engines": { - "node": ">=0.4" - }, - "_id": "xtend@2.0.6", - "dist": { - "shasum": "5ea657a6dba447069c2e59c58a1138cb0c5e6cee", - "tarball": "https://registry.npmjs.org/xtend/-/xtend-2.0.6.tgz" - }, - "_from": "xtend@>=2.0.4 <2.1.0", - "_npmVersion": "1.2.21", - "_npmUser": { - "name": "raynos", - "email": "raynos2@gmail.com" - }, - "maintainers": [ - { - "name": "raynos", - "email": "raynos2@gmail.com" - } - ], - "directories": {}, - "_shasum": "5ea657a6dba447069c2e59c58a1138cb0c5e6cee", - "_resolved": "https://registry.npmjs.org/xtend/-/xtend-2.0.6.tgz" -} diff --git a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-sublevel/node_modules/xtend/test.js b/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-sublevel/node_modules/xtend/test.js deleted file mode 100644 index 3369d796..00000000 --- a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-sublevel/node_modules/xtend/test.js +++ /dev/null @@ -1,63 +0,0 @@ -var test = require("tape") -var extend = require("./") -var mutableExtend = require("./mutable") - -test("merge", function(assert) { - var a = { a: "foo" } - var b = { b: "bar" } - - assert.deepEqual(extend(a, b), { a: "foo", b: "bar" }) - assert.end() -}) - -test("replace", function(assert) { - var a = { a: "foo" } - var b = { a: "bar" } - - assert.deepEqual(extend(a, b), { a: "bar" }) - assert.end() -}) - -test("undefined", function(assert) { - var a = { a: undefined } - var b = { b: "foo" } - - assert.deepEqual(extend(a, b), { a: undefined, b: "foo" }) - assert.deepEqual(extend(b, a), { a: undefined, b: "foo" }) - assert.end() -}) - -test("handle 0", function(assert) { - var a = { a: "default" } - var b = { a: 0 } - - assert.deepEqual(extend(a, b), { a: 0 }) - assert.deepEqual(extend(b, a), { a: "default" }) - assert.end() -}) - -test("is immutable", function (assert) { - var record = {} - - extend(record, { foo: "bar" }) - assert.equal(record.foo, undefined) - assert.end() -}) - -test("null as argument", function (assert) { - var a = { foo: "bar" } - var b = null - var c = void 0 - - assert.deepEqual(extend(b, a, c), { foo: "bar" }) - assert.end() -}) - -test("mutable", function (assert) { - var a = { foo: "bar" } - - mutableExtend(a, { bar: "baz" }) - - assert.equal(a.bar, "baz") - assert.end() -}) diff --git a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-sublevel/package.json b/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-sublevel/package.json deleted file mode 100644 index 6ca23ab4..00000000 --- a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-sublevel/package.json +++ /dev/null @@ -1,62 +0,0 @@ -{ - "name": "level-sublevel", - "description": "partition levelup databases", - "version": "5.2.3", - "homepage": "https://github.com/dominictarr/level-sublevel", - "repository": { - "type": "git", - "url": "git://github.com/dominictarr/level-sublevel.git" - }, - "dependencies": { - "level-hooks": ">=4.4.0 <5", - "string-range": "~1.2.1", - "level-fix-range": "2.0", - "xtend": "~2.0.4" - }, - "devDependencies": { - "rimraf": "~2.1.4", - "shasum": "0.0.2", - "monotonic-timestamp": "0.0.8", - "pull-stream": "~2.18.2", - "pull-level": "~1.1.1", - "level-test": "~1.6.3", - "stream-to-pull-stream": "~1.2.0", - "tape": "~1.0.4", - "through": "~2.3.4", - "level": "~0.15.0" - }, - "scripts": { - "test": "set -e; for t in test/*.js; do node $t; done" - }, - "author": { - "name": "Dominic Tarr", - "email": "dominic.tarr@gmail.com", - "url": "http://dominictarr.com" - }, - "license": "MIT", - "stability": "unstable", - "gitHead": "e27d6bc1a5eaedf28312a2d3cb118615f87e1233", - "bugs": { - "url": "https://github.com/dominictarr/level-sublevel/issues" - }, - "_id": "level-sublevel@5.2.3", - "_shasum": "744c12c72d2e72be78dde3b9b5cd84d62191413a", - "_from": "level-sublevel@>=5.2.0 <6.0.0", - "_npmVersion": "1.4.25", - "_npmUser": { - "name": "dominictarr", - "email": "dominic.tarr@gmail.com" - }, - "maintainers": [ - { - "name": "dominictarr", - "email": "dominic.tarr@gmail.com" - } - ], - "dist": { - "shasum": "744c12c72d2e72be78dde3b9b5cd84d62191413a", - "tarball": "https://registry.npmjs.org/level-sublevel/-/level-sublevel-5.2.3.tgz" - }, - "directories": {}, - "_resolved": "https://registry.npmjs.org/level-sublevel/-/level-sublevel-5.2.3.tgz" -} diff --git a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-sublevel/sub.js b/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-sublevel/sub.js deleted file mode 100644 index f1b9bd1f..00000000 --- a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-sublevel/sub.js +++ /dev/null @@ -1,277 +0,0 @@ -var EventEmitter = require('events').EventEmitter -var inherits = require('util').inherits -var ranges = require('string-range') -var fixRange = require('level-fix-range') -var xtend = require('xtend') -var Batch = require('./batch') - -inherits(SubDB, EventEmitter) - -function SubDB (db, prefix, options) { - if('string' === typeof options) { - console.error('db.sublevel(name, seperator) is depreciated') - console.error('use db.sublevel(name, {sep: separator})) if you must') - options = {sep: options} - } - if(!(this instanceof SubDB)) return new SubDB(db, prefix, options) - if(!db) throw new Error('must provide db') - if(!prefix) throw new Error('must provide prefix') - - options = options || {} - options.sep = options.sep || '\xff' - - this._parent = db - this._options = options - this.options = options - this._prefix = prefix - this._root = root(this) - db.sublevels[prefix] = this - this.sublevels = {} - this.methods = {} - var self = this - this.hooks = { - pre: function () { - return self.pre.apply(self, arguments) - }, - post: function () { - return self.post.apply(self, arguments) - } - } -} - -var SDB = SubDB.prototype - -SDB._key = function (key) { - var sep = this._options.sep - return sep - + this._prefix - + sep - + key -} - -SDB._getOptsAndCb = function (opts, cb) { - if (typeof opts == 'function') { - cb = opts - opts = {} - } - return { opts: xtend(opts, this._options), cb: cb } -} - -SDB.sublevel = function (prefix, options) { - if(this.sublevels[prefix]) - return this.sublevels[prefix] - return new SubDB(this, prefix, options || this._options) -} - -SDB.put = function (key, value, opts, cb) { - var res = this._getOptsAndCb(opts, cb) - this._root.put(this.prefix(key), value, res.opts, res.cb) -} - -SDB.get = function (key, opts, cb) { - var res = this._getOptsAndCb(opts, cb) - this._root.get(this.prefix(key), res.opts, res.cb) -} - -SDB.del = function (key, opts, cb) { - var res = this._getOptsAndCb(opts, cb) - this._root.del(this.prefix(key), res.opts, res.cb) -} - -SDB.batch = function (changes, opts, cb) { - if(!Array.isArray(changes)) - return new Batch(this) - var self = this, - res = this._getOptsAndCb(opts, cb) - changes.forEach(function (ch) { - - //OH YEAH, WE NEED TO VALIDATE THAT UPDATING THIS KEY/PREFIX IS ALLOWED - if('string' === typeof ch.prefix) - ch.key = ch.prefix + ch.key - else - ch.key = (ch.prefix || self).prefix(ch.key) - - if(ch.prefix) ch.prefix = null - }) - this._root.batch(changes, res.opts, res.cb) -} - -SDB._getKeyEncoding = function () { - if(this.options.keyEncoding) - return this.options.keyEncoding - if(this._parent && this._parent._getKeyEncoding) - return this._parent._getKeyEncoding() -} - -SDB._getValueEncoding = function () { - if(this.options.valueEncoding) - return this.options.valueEncoding - if(this._parent && this._parent._getValueEncoding) - return this._parent._getValueEncoding() -} - -SDB.prefix = function (key) { - var sep = this._options.sep - return this._parent.prefix() + sep + this._prefix + sep + (key || '') -} - -SDB.keyStream = -SDB.createKeyStream = function (opts) { - opts = opts || {} - opts.keys = true - opts.values = false - return this.createReadStream(opts) -} - -SDB.valueStream = -SDB.createValueStream = function (opts) { - opts = opts || {} - opts.keys = false - opts.values = true - opts.keys = false - return this.createReadStream(opts) -} - -function selectivelyMerge(_opts, opts) { - [ 'valueEncoding' - , 'encoding' - , 'keyEncoding' - , 'reverse' - , 'values' - , 'keys' - , 'limit' - , 'fillCache' - ] - .forEach(function (k) { - if (opts.hasOwnProperty(k)) _opts[k] = opts[k] - }) -} - -SDB.readStream = -SDB.createReadStream = function (opts) { - opts = opts || {} - var r = root(this) - var p = this.prefix() - - var _opts = ranges.prefix(opts, p) - selectivelyMerge(_opts, xtend(opts, this._options)) - - var s = r.createReadStream(_opts) - - if(_opts.values === false) { - var read = s.read - if (read) { - s.read = function (size) { - var val = read.call(this, size) - if (val) val = val.substring(p.length) - return val - } - } else { - var emit = s.emit - s.emit = function (event, val) { - if(event === 'data') { - emit.call(this, 'data', val.substring(p.length)) - } else - emit.call(this, event, val) - } - } - return s - } else if(_opts.keys === false) - return s - else { - var read = s.read - if (read) { - s.read = function (size) { - var d = read.call(this, size) - if (d) d.key = d.key.substring(p.length) - return d - } - } else { - s.on('data', function (d) { - //mutate the prefix! - //this doesn't work for createKeyStream admittedly. - d.key = d.key.substring(p.length) - }) - } - return s - } -} - - -SDB.writeStream = -SDB.createWriteStream = function () { - var r = root(this) - var p = this.prefix() - var ws = r.createWriteStream.apply(r, arguments) - var write = ws.write - - var encoding = this._options.encoding - var valueEncoding = this._options.valueEncoding - var keyEncoding = this._options.keyEncoding - - // slight optimization, if no encoding was specified at all, - // which will be the case most times, make write not check at all - var nocheck = !encoding && !valueEncoding && !keyEncoding - - ws.write = nocheck - ? function (data) { - data.key = p + data.key - return write.call(ws, data) - } - : function (data) { - data.key = p + data.key - - // not merging all options here since this happens on every write and things could get slowed down - // at this point we only consider encoding important to propagate - if (encoding && typeof data.encoding === 'undefined') - data.encoding = encoding - if (valueEncoding && typeof data.valueEncoding === 'undefined') - data.valueEncoding = valueEncoding - if (keyEncoding && typeof data.keyEncoding === 'undefined') - data.keyEncoding = keyEncoding - - return write.call(ws, data) - } - return ws -} - -SDB.approximateSize = function () { - var r = root(db) - return r.approximateSize.apply(r, arguments) -} - -function root(db) { - if(!db._parent) return db - return root(db._parent) -} - -SDB.pre = function (range, hook) { - if(!hook) hook = range, range = null - range = ranges.prefix(range, this.prefix(), this._options.sep) - var r = root(this._parent) - var p = this.prefix() - return r.hooks.pre(fixRange(range), function (ch, add, batch) { - hook({ - key: ch.key.substring(p.length), - value: ch.value, - type: ch.type - }, function (ch, _p) { - //maybe remove the second add arg now - //that op can have prefix? - add(ch, ch.prefix ? _p : (_p || p)) - }, batch) - }) -} - -SDB.post = function (range, hook) { - if(!hook) hook = range, range = null - var r = root(this._parent) - var p = this.prefix() - range = ranges.prefix(range, p, this._options.sep) - return r.hooks.post(fixRange(range), function (data) { - hook({key: data.key.substring(p.length), value: data.value, type: data.type}) - }) -} - -var exports = module.exports = SubDB - diff --git a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-sublevel/test/batch.js b/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-sublevel/test/batch.js deleted file mode 100644 index 5f92437d..00000000 --- a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-sublevel/test/batch.js +++ /dev/null @@ -1,294 +0,0 @@ -var test = require('tape') -var level = require('level-test')() - -function all (db, cb) { - var obj = {}, fin = false - - function done (err) { - if(fin) return - fin = true - cb(err, obj) - } - - db.createReadStream({end: '\xff\xff'}) - .on('data', function (ch) { - obj[ch.key] = ch.value - }) - .on('end', done) - .on('error', done) -} - -var sublevel = require('../') -function sl(name) { - return sublevel(level(name), {sep: "~"}) -} - - -test('sublevel - batch', function (t) { - - var base = sl('test-sublevel') - - var a = base.sublevel('A') - var b = base.sublevel('B') - - - var sum = 0 - - a.batch([ - {key: 'a', value: 1, type: 'put'}, - {key: 'b', value: 2, type: 'put'}, - {key: 'c', value: 3, type: 'put'}, - {key: 'd', value: 4, type: 'put'}, - {key: 'e', value: 5, type: 'put'}, - ], function (err) { - all(a, function (err, obj) { - t.notOk(err) - var keys = Object.keys(obj).join('') - for(var k in obj) { - sum += Number(obj[k]) - } - t.equal(keys, 'abcde') - t.equal(sum, 15) - t.end() - }) - }) - -}) - -test('sublevel - prefixed batches', function (t) { - - var base = sl('test-sublevel2') - - var a = base.sublevel('A') - var b = base.sublevel('B') - - base.batch([ - {key: 'a', value: 1, type: 'put'}, - {key: 'b', value: 2, type: 'put', prefix: b}, - {key: 'c', value: 3, type: 'put'}, - {key: 'd', value: 4, type: 'put', prefix: a}, - {key: 'e', value: 5, type: 'put', prefix: base}, - ], function (err) { - all(base, function (_, obj) { - t.deepEqual(obj, { - 'a': '1', - 'c': '3', - 'e': '5', - '~A~d': '4', - '~B~b': '2' - }) - console.log(obj) - t.end() - }) - }) -}) - -test('sublevel - prefixed batches on subsection', function (t) { - - var base = sl('test-sublevel3') - - var a = base.sublevel('A') - var b = base.sublevel('B') - - a.batch([ - {key: 'a', value: 1, type: 'put', prefix: base}, - {key: 'b', value: 2, type: 'put', prefix: b}, - {key: 'c', value: 3, type: 'put', prefix: base}, - {key: 'd', value: 4, type: 'put'}, - {key: 'e', value: 5, type: 'put', prefix: base}, - ], function (err) { - all(base, function (_, obj) { - t.deepEqual(obj, { - 'a': '1', - 'c': '3', - 'e': '5', - '~A~d': '4', - '~B~b': '2' - }) - t.end() - }) - }) -}) - - -test('sublevel - prefixed batches on subsection - strings', function (t) { - - var base = sl('test-sublevel4') - - var a = base.sublevel('A') - var b = base.sublevel('B') - var b_c = b.sublevel('C') - - base.batch([ - {key: 'a', value: 1, type: 'put'}, - {key: 'b', value: 2, type: 'put', prefix: b.prefix()}, - {key: 'c', value: 3, type: 'put'}, - {key: 'd', value: 4, type: 'put', prefix: a.prefix()}, - {key: 'e', value: 5, type: 'put'}, - {key: 'f', value: 6, type: 'put', prefix: b_c.prefix()}, - ], function (err) { - all(base, function (_, obj) { - t.deepEqual(obj, { - 'a': '1', - 'c': '3', - 'e': '5', - '~A~d': '4', - '~B~b': '2', - '~B~~C~f': '6' - }) - console.log(obj) - t.end() - }) - }) -}) - -test('sublevel - batch - chained', function (t) { - - var base = sl('test-sublevel5') - - var a = base.sublevel('A') - var b = base.sublevel('B') - - - var sum = 0 - - a.batch() - .put('a', 1) - .put('b', 2) - .put('c', 3) - .put('d', 4) - .put('e', 5) - .write(function (err) { - all(a, function (err, obj) { - t.notOk(err) - var keys = Object.keys(obj).join('') - for(var k in obj) { - sum += Number(obj[k]) - } - t.equal(keys, 'abcde') - t.equal(sum, 15) - t.end() - }) - }) - -}) - -test('sublevel - prefixed batches - chained', function (t) { - - var base = sl('test-sublevel6') - - var a = base.sublevel('A') - var b = base.sublevel('B') - - base.batch() - .put('a', 1) - .put('b', 2, {prefix: b}) - .put('c', 3) - .put('d', 4, {prefix: a}) - .put('e', 5, {prefix: base}) - .write(function (err) { - all(base, function (_, obj) { - t.deepEqual(obj, { - 'a': '1', - 'c': '3', - 'e': '5', - '~A~d': '4', - '~B~b': '2' - }) - console.log(obj) - t.end() - }) - }) -}) - -test('sublevel - prefixed batches on subsection - chained', function (t) { - - var base = sl('test-sublevel7') - - var a = base.sublevel('A') - var b = base.sublevel('B') - - a.batch() - .put('a', 1, {prefix: base}) - .put('b', 2, {prefix: b}) - .put('c', 3, {prefix: base}) - .put('d', 4) - .put('e', 5, {prefix: base}) - .write(function (err) { - all(base, function (_, obj) { - t.deepEqual(obj, { - 'a': '1', - 'c': '3', - 'e': '5', - '~A~d': '4', - '~B~b': '2' - }) - t.end() - }) - }) -}) - - -test('sublevel - prefixed batches on subsection - strings - chained', function (t) { - - var base = sl('test-sublevel8') - - var a = base.sublevel('A') - var b = base.sublevel('B') - var b_c = b.sublevel('C') - - base.batch() - .put('a', 1) - .put('b', 2, {prefix: b.prefix()}) - .put('c', 3) - .put('d', 4, {prefix: a.prefix()}) - .put('e', 5) - .put('f', 6, {prefix: b_c.prefix()}) - .write(function (err) { - all(base, function (_, obj) { - t.deepEqual(obj, { - 'a': '1', - 'c': '3', - 'e': '5', - '~A~d': '4', - '~B~b': '2', - '~B~~C~f': '6' - }) - console.log(obj) - t.end() - }) - }) -}) - -test('sublevel - delete - chained', function(t) { - var base = sl('test-sublevel9') - - var a = base.sublevel('A') - var b = base.sublevel('B') - - var sum = 0 - - a.batch() - .put('a', 1) - .put('b', 2) - .put('c', 3) - .put('d', 4) - .put('e', 5) - .write() - - a.batch() - .del('c') - .del('e') - .write(function (err) { - all(a, function (err, obj) { - t.notOk(err) - var keys = Object.keys(obj).join('') - for(var k in obj) { - sum += Number(obj[k]) - } - t.equal(keys, 'abd') - t.equal(sum, 7) - t.end() - }) - }) -}) diff --git a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-sublevel/test/hook.js b/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-sublevel/test/hook.js deleted file mode 100644 index dba0d7fd..00000000 --- a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-sublevel/test/hook.js +++ /dev/null @@ -1,55 +0,0 @@ -var level = require('level-test')() -var Sublevel = require('../') - -function sl (name) { - return Sublevel(level(name), {sep: '~'}) -} - -require('tape')('sublevel', function (t) { - - var base = sl('test-sublevel') - - var a = base.sublevel('A') - var b = base.sublevel('SEQ') - - var i = 0 - - function all(db, cb) { - var o = {} - db.createReadStream({end: '\xff\xff'}).on('data', function (data) { - o[data.key.toString()] = data.value.toString() - }) - .on('end', function () { - cb(null, o) - }) - .on('error', cb) - } - - a.pre(function (ch, add) { - console.log(ch) - add({key: i++, value: ch.key, type: 'put'}, b) - }) - - var n = 3, _a, _b, _c - - a.put('a', _a ='AAA_'+Math.random(), next) - a.put('b', _b = 'BBB_'+Math.random(), next) - a.put('c', _c = 'CCC_'+Math.random(), next) - - function next () { - if(--n) return - - all(base, function (err, obj) { - console.log(obj) - t.deepEqual(obj, - { '~A~a': _a, - '~A~b': _b, - '~A~c': _c, - '~SEQ~0': 'a', - '~SEQ~1': 'b', - '~SEQ~2': 'c' }) - t.end() - }) - } - -}) diff --git a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-sublevel/test/key-stream-issues.js b/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-sublevel/test/key-stream-issues.js deleted file mode 100644 index cbba9c50..00000000 --- a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-sublevel/test/key-stream-issues.js +++ /dev/null @@ -1,53 +0,0 @@ -var test = require('tape') -var SubLevel = require('../') -var levelup = require('level-test')() -var through = require('through') - -var base = SubLevel(levelup('test-sublevel')) - -var sub = base.sublevel('levelup-users') - - -function put (user, contrib) { - return { key: user, value: { contrib: contrib }, type: 'put', valueEncoding : 'json' }; -} - -var batch = [ - [ 'rvagg', 'leveldown' ] -, [ 'dominictarr', 'levelup' ] -, [ 'juliangruber', 'multilevel' ] -].map(function (x) { return put(x[0], x[1]) }) - -// the two following tests ensure that https://github.com/dominictarr/level-sublevel/issues/30 is and stays fixed -test('key only stream keys do not include sublevel prefix', function (t) { - - sub.batch(batch, function (err, res) { - if (err) return t.fail(err) - }) - - var arr = [] - sub.createReadStream({ keys: true, values: false }) - .pipe(through(arr.push.bind(arr), function () { - t.ok(~arr.indexOf('rvagg'), 'has rvagg without prefix') - t.ok(~arr.indexOf('dominictarr'), 'has dominictarr without prefix') - t.ok(~arr.indexOf('juliangruber'), 'has juliangruber without prefix') - t.end() - })) -}) - -test('key/value stream keys don not include sublevel prefix', function (t) { - - sub.batch(batch, function (err, res) { - if (err) return t.fail(err) - }) - - var arr = [] - sub.createReadStream({ keys: true, values: true }) - .pipe(through(arr.push.bind(arr), function () { - var keys = arr.map(function (x) { return x.key }) - t.ok(~keys.indexOf('rvagg'), 'has rvagg without prefix') - t.ok(~keys.indexOf('dominictarr'), 'has dominictarr without prefix') - t.ok(~keys.indexOf('juliangruber'), 'has juliangruber without prefix') - t.end() - })) -}) diff --git a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-sublevel/test/key-value-stream.js b/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-sublevel/test/key-value-stream.js deleted file mode 100644 index 3e967c04..00000000 --- a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-sublevel/test/key-value-stream.js +++ /dev/null @@ -1,45 +0,0 @@ - -var pl = require('pull-level') -var pull = require('pull-stream') -var toPull = require('stream-to-pull-stream') - -var level = require('level-test')() -var sublevel = require('../') -var tape = require('tape') - -tape('keys', function (t) { - - var db = sublevel(level()).sublevel('test') - - pull.count(10) - .pipe(pull.map(function (i) { - return {key: 'key_'+i, value: 'value_' + i} - })) - .pipe(pl.write(db, function (err) { - if(err) { - t.notOk(err) - throw err - } - - toPull(db.createKeyStream()) - .pipe(pull.collect(function (err, ary) { - console.log(ary) - ary.forEach(function (e) { - t.equal(typeof e, 'string') - t.ok(/^key_/.test(e)) - }) - toPull(db.createValueStream()) - .pipe(pull.collect(function (err, ary) { - console.log(ary) - ary.forEach(function (e) { - t.equal(typeof e, 'string') - t.ok(/^value_/.test(e)) - console.log(e) - }) - - t.end() - })) - })) - })) -}) - diff --git a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-sublevel/test/keyvalue.js b/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-sublevel/test/keyvalue.js deleted file mode 100644 index 9b90e1e2..00000000 --- a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-sublevel/test/keyvalue.js +++ /dev/null @@ -1,69 +0,0 @@ -var test = require('tape') -var SubLevel = require('../') -var levelup = require('level-test')() - -var base = SubLevel(levelup('test-sublevel')) - -var sub = base.sublevel('fruit') - -var docs = { - '001': 'apple', - '002': 'orange', - '003': 'banana' -}; - -test('sublevel - key/value options', function (t) { - - sub.batch(Object.keys(docs).map(function (key) { - return {key: key, value: docs[key], type: 'put'} - }), function (err) { - if (err) throw err - - t.plan(4) - - ;(function testCreateKeyStream () { - var results = [] - sub.createKeyStream() - .on('data', function (data) { - results.push(data) - }) - .on('end', function () { - t.deepEqual(results, ['001', '002', '003']) - }) - })() - - ;(function testCreateKeyReadStream () { - var results = [] - sub.createReadStream({values: false}) - .on('data', function (data) { - results.push(data) - }) - .on('end', function () { - t.deepEqual(results, ['001', '002', '003']) - }) - })() - - ;(function testCreateValueStream () { - var results = [] - sub.createValueStream({keys: false}) - .on('data', function (data) { - results.push(data) - }) - .on('end', function () { - t.deepEqual(results, ['apple', 'orange', 'banana']) - }) - })() - - ;(function testCreateValueReadStream () { - var results = [] - sub.createReadStream({keys: false}) - .on('data', function (data) { - results.push(data) - }) - .on('end', function () { - t.deepEqual(results, ['apple', 'orange', 'banana']) - }) - })() - }) -}) - diff --git a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-sublevel/test/limit.js b/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-sublevel/test/limit.js deleted file mode 100644 index 923ad9b5..00000000 --- a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-sublevel/test/limit.js +++ /dev/null @@ -1,123 +0,0 @@ -var test = require('tape') - -function all (db, range, cb) { - var o = {} - db.createReadStream(range) - .on('data', function (data) { - o[data.key] = data.value - }) - .on('end', function () { - cb(null, o) - }) -} - -function makeTest(db, name) { - - test(name, function (t) { - - t.plan(19) - - var docs = { - a: 'apple', - b: 'banana', - c: 'cherry', - d: 'durian', - e: 'elder-berry' - } - - function limit(a, b) { - t.deepEqual(a, b) - t.equal(JSON.stringify(a), JSON.stringify(b)) - } - - db.batch(Object.keys(docs).map(function (key) { - console.log(key, docs[key]) - return {key: key, value: docs[key], type: 'put'} - }), function (err) { - t.notOk(err) - - all(db, {limit: -1}, function (err, all) { - limit(all, docs) - }) - - all(db, {limit: 2, min: 'a~'}, function (err, all) { - limit(all, { - b: 'banana', - c: 'cherry' - }) - }) - - all(db, {limit: 3, min: 'b'}, function (err, all) { - limit(all, { - b: 'banana', - c: 'cherry', - d: 'durian' - }) - }) - - - all(db, {limit: 2, min: 'a~', reverse: true}, function (err, all) { - limit(all, { - e: 'elder-berry', - d: 'durian' - }) - }) - - all(db, {limit: 1, min: 'c~', reverse: true}, function (err, all) { - console.log(all) - limit(all, { - e: 'elder-berry' - }) - }) - - all(db, {limit: 1, min: 'c~', max: 'd~'}, function (err, all) { - console.log(all) - limit(all, { - d: 'durian', - }) - }) - - all(db, {limit: 3, min: 'a~'}, function (err, all) { - limit(all, { - b: 'banana', - c: 'cherry', - d: 'durian' - }) - }) - - all(db, {limit: 1, min: 'c~'}, function (err, all) { - console.log('d, e', all) - limit(all, { - d: 'durian' - }) - }) - - all(db, {limit: 2, min: 'c~', max: 'd~', reverse: true}, function (err, all) { - console.log(all) - limit(all, { - d: 'durian', - }) - }) - }) - }) -} - - -var levelup = require('level-test')() - -var base = require('../')(levelup('test-sublevel-limit')) - -var A = base.sublevel('A') -makeTest(base, 'simple') - -makeTest(A, 'sublevel') - -makeTest(base, 'simple, again') - -var A_B = A.sublevel('B') -makeTest(A_B, 'sublevel2') - -makeTest(A, 'sublevel, again') - -makeTest(base, 'simple, again 2') - diff --git a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-sublevel/test/mixed-value-encodings-per-action-del.js b/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-sublevel/test/mixed-value-encodings-per-action-del.js deleted file mode 100644 index 50b5e3c7..00000000 --- a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-sublevel/test/mixed-value-encodings-per-action-del.js +++ /dev/null @@ -1,39 +0,0 @@ -var levelup = require('level-test')() -var base = require('../')(levelup('test-mixed-value-encodings-per-del')) - -var test = require('tape') - -test('subsections support mixed encodings per del', function (t) { - t.plan(6) - - var foo = base.sublevel('foo') - var bar = base.sublevel('bar') - - foo.put('foo1', 'foo1-value', { valueEncoding: 'utf8' }, function () { - bar.put('bar1', { obj: 'ect' }, { valueEncoding: 'json' }, function () { - - foo.get('foo1', { valueEncoding: 'utf8' }, function (err, value) { - t.notOk(err, 'getting string value by key has no error') - t.equal(value, 'foo1-value', 'and returns value for that key') - - foo.del('foo1', { valueEncoding: 'utf8' }, function (err, value) { - foo.get('foo1', { valueEncoding: 'utf8' }, function (err, value) { - t.equal(err.name, 'NotFoundError', 'properly deletes utf8 encoded value') - }) - }) - }) - - bar.get('bar1', { valueEncoding: 'json' }, function (err, value) { - t.notOk(err, 'getting object value by key has no error') - t.equal(value.obj, 'ect', 'and returns value for that key') - - bar.del('bar1', { valueEncoding: 'json' }, function (err, value) { - bar.get('bar1', { valueEncoding: 'json' }, function (err, value) { - t.equal(err.name, 'NotFoundError', 'properly deletes json encoded value') - }) - }) - }) - - }) - }) -}) diff --git a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-sublevel/test/mixed-value-encodings-per-action.js b/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-sublevel/test/mixed-value-encodings-per-action.js deleted file mode 100644 index 901fce4d..00000000 --- a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-sublevel/test/mixed-value-encodings-per-action.js +++ /dev/null @@ -1,49 +0,0 @@ -var levelup = require('level-test')() -var base = require('../')(levelup('test-mixed-value-encodings-per-put')) - -var test = require('tape') - -test('subsections support mixed encodings per put', function (t) { - t.plan(10) - - var foo = base.sublevel('foo') - var bar = base.sublevel('bar') - - foo.put('foo1', 'foo1-value', { valueEncoding: 'utf8' }, function () { - bar.put('bar1', { obj: 'ect' }, { valueEncoding: 'json' }, function () { - - foo.get('foo1', { valueEncoding: 'utf8' }, function (err, value) { - t.notOk(err, 'getting string value by key has no error') - t.equal(value, 'foo1-value', 'and returns value for that key') - }) - - bar.get('bar1', { valueEncoding: 'json' }, function (err, value) { - t.notOk(err, 'getting object value by key has no error') - t.equal(value.obj, 'ect', 'and returns value for that key') - }) - - var foodata, fooerr - - foo.createReadStream({ start: 'foo1', end: 'foo1\xff', valueEncoding: 'utf8' }) - .on('data', function (d) { foodata = d }) - .on('error', function (err) { fooerr = err }) - .on('end', function () { - t.notOk(fooerr, 'streaming string value by key emits no error') - t.equal(foodata.key, 'foo1', 'streaming string value emits key') - t.equal(foodata.value, 'foo1-value', 'streaming string value emits value') - }) - - var bardata, barerr - - bar.createReadStream({ start: 'bar1', end: 'bar1\xff', valueEncoding: 'json' }) - .on('data', function (d) { bardata = d }) - .on('error', function (err) { barerr = err }) - .on('end', function () { - t.notOk(barerr, 'streaming object value by key emits no error') - t.equal(bardata.key, 'bar1', 'streaming string value emits key') - t.equal(bardata.value.obj, 'ect', 'streaming object value emits value') - }) - }) - }) - -}) diff --git a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-sublevel/test/mixed-value-encodings-per-sub-del.js b/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-sublevel/test/mixed-value-encodings-per-sub-del.js deleted file mode 100644 index 7a8f880e..00000000 --- a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-sublevel/test/mixed-value-encodings-per-sub-del.js +++ /dev/null @@ -1,39 +0,0 @@ -var levelup = require('level-test')() -var base = require('../')(levelup('test-mixed-value-encodings-per-sub-del')) - -var test = require('tape') - -test('subsections support mixed encodings per sub with del', function (t) { - t.plan(6) - - var foo = base.sublevel('foo', { valueEncoding: 'utf8' }) - var bar = base.sublevel('bar', { valueEncoding: 'json' }) - - foo.put('foo1', 'foo1-value', function () { - bar.put('bar1', { obj: 'ect' }, function () { - - foo.get('foo1', function (err, value) { - t.notOk(err, 'getting string value by key has no error') - t.equal(value, 'foo1-value', 'and returns value for that key') - - foo.del('foo1', function (err, value) { - foo.get('foo1', { valueEncoding: 'utf8' }, function (err, value) { - t.equal(err.name, 'NotFoundError', 'properly deletes utf8 encoded value') - }) - }) - }) - - bar.get('bar1', function (err, value) { - t.notOk(err, 'getting object value by key has no error') - t.equal(value.obj, 'ect', 'and returns value for that key') - - bar.del('bar1', function (err, value) { - bar.get('bar1', { valueEncoding: 'json' }, function (err, value) { - t.equal(err.name, 'NotFoundError', 'properly deletes json encoded value') - }) - }) - }) - - }) - }) -}) diff --git a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-sublevel/test/mixed-value-encodings-per-sub.js b/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-sublevel/test/mixed-value-encodings-per-sub.js deleted file mode 100644 index 17c10f8c..00000000 --- a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-sublevel/test/mixed-value-encodings-per-sub.js +++ /dev/null @@ -1,51 +0,0 @@ -var levelup = require('level-test')() -var base = require('../')(levelup('test-mixed-value-encodings-per-sub')) - -var test = require('tape') - -test('subsections support mixed encodings per sub with put/get', function (t) { - t.plan(10) - - var foo = base.sublevel('foo', { valueEncoding: 'utf8' }) - var bar = base.sublevel('bar', { valueEncoding: 'json' }) - - foo.put('foo1', 'foo1-value', function () { - bar.put('bar1', { obj: 'ect' }, function () { - - foo.get('foo1', function (err, value) { - t.notOk(err, 'getting string value by key has no error') - t.equal(value, 'foo1-value', 'and returns value for that key') - }) - - bar.get('bar1', function (err, value) { - t.notOk(err, 'getting object value by key has no error') - t.equal(value.obj, 'ect', 'and returns value for that key') - }) - - - var foodata, fooerr - - foo.createReadStream({ start: 'foo1', end: 'foo1\xff' }) - .on('data', function (d) { foodata = d }) - .on('error', function (err) { fooerr = err }) - .on('end', function () { - console.error('foodata: ', foodata); - - t.notOk(fooerr, 'streaming string value by key emits no error') - t.equal(foodata.key, 'foo1', 'streaming string value emits key') - t.equal(foodata.value, 'foo1-value', 'streaming string value emits value') - }) - - var bardata, barerr - - bar.createReadStream({ start: 'bar1', end: 'bar1\xff' }) - .on('data', function (d) { bardata = d }) - .on('error', function (err) { barerr = err }) - .on('end', function () { - t.notOk(barerr, 'streaming object value by key emits no error') - t.equal(bardata.key, 'bar1', 'streaming string value emits key') - t.equal(bardata.value.obj, 'ect', 'streaming object value emits value') - }) - }) - }) -}) diff --git a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-sublevel/test/mixed-value-encodings-writeStream-per-sub.js b/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-sublevel/test/mixed-value-encodings-writeStream-per-sub.js deleted file mode 100644 index c8e48d3d..00000000 --- a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-sublevel/test/mixed-value-encodings-writeStream-per-sub.js +++ /dev/null @@ -1,36 +0,0 @@ -var levelup = require('level-test')() -var base = require('../')(levelup('test-mixed-value-encodings-writeStream-sub')) - -var test = require('tape') - -test('subsections support mixed encodings per sub for write stream', function (t) { - t.plan(6) - - var foo = base.sublevel('foo', { valueEncoding: 'utf8' }) - var foos = foo.createWriteStream() - - foos.write({ key: 'foo1', value: 'foo1-value' }) - foos.end() - foos.on('close', function (err) { - t.notOk(err, 'writing utf8 encoded stream has no error') - - foo.get('foo1', { valueEncoding: 'utf8' }, function (err, value) { - t.notOk(err, 'getting string value by key has no error') - t.equal(value, 'foo1-value', 'and returns value for that key') - }) - }) - - var bar = base.sublevel('bar', { valueEncoding: 'json' }) - var bars = bar.createWriteStream() - - bars.write({ key: 'bar1', value: { obj: 'ect' } }) - bars.end() - bars.on('close', function (err) { - t.notOk(err, 'writing utf8 encoded stream has no error') - - bar.get('bar1', { valueEncoding: 'json' }, function (err, value) { - t.notOk(err, 'getting object value by key has no error') - t.equal(value.obj, 'ect', 'and returns value for that key') - }) - }) -}) diff --git a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-sublevel/test/mixed-value-encodings-writeStream-per-write.js b/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-sublevel/test/mixed-value-encodings-writeStream-per-write.js deleted file mode 100644 index a3cb113d..00000000 --- a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-sublevel/test/mixed-value-encodings-writeStream-per-write.js +++ /dev/null @@ -1,36 +0,0 @@ -var levelup = require('level-test')() -var base = require('../')(levelup('test-mixed-value-encodings-writeStream-write')) - -var test = require('tape') - -test('subsections support mixed encodings per write for write stream', function (t) { - t.plan(6) - - var foo = base.sublevel('foo') - var foos = foo.createWriteStream() - - foos.write({ key: 'foo1', value: 'foo1-value' }, { valueEncoding: 'utf8' }) - foos.end() - foos.on('close', function (err) { - t.notOk(err, 'writing utf8 encoded stream has no error') - - foo.get('foo1', { valueEncoding: 'utf8' }, function (err, value) { - t.notOk(err, 'getting string value by key has no error') - t.equal(value, 'foo1-value', 'and returns value for that key') - }) - }) - - var bar = base.sublevel('bar') - var bars = bar.createWriteStream() - - bars.write({ key: 'bar1', value: { obj: 'ect' }, valueEncoding: 'json' }) - bars.end() - bars.on('close', function (err) { - t.notOk(err, 'writing utf8 encoded stream has no error') - - bar.get('bar1', { valueEncoding: 'json' }, function (err, value) { - t.notOk(err, 'getting object value by key has no error') - t.equal(value.obj, 'ect', 'and returns value for that key') - }) - }) -}) diff --git a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-sublevel/test/nested-prehooks.js b/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-sublevel/test/nested-prehooks.js deleted file mode 100644 index e19c50ae..00000000 --- a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-sublevel/test/nested-prehooks.js +++ /dev/null @@ -1,52 +0,0 @@ -var level = require('level-test')() -var Sublevel = require('../') - -function sl (name) { - return Sublevel(level(name), { sep: '~' }) - -} - -require('tape')('sublevel', function (t) { - - var base = sl('test-sublevel') - - var a = base.sublevel('A') - var a_a = a.sublevel('A') - - var as = {} - var aas = {} - - a.pre(function (e) { - as[e.key] = e.value - console.log('A :', e) - }) - - a_a.pre(function (e) { - aas[e.key] = e.value - console.log('A_A :', e) - }) - - var n = 3 - a.put('apple', '1', next) - a.put('banana', '2', next) - - a_a.put('aardvark', 'animal1', next) - - function next() { - if(--n) return - t.deepEqual(as, {apple: '1', banana: '2'}) - t.deepEqual(aas, {aardvark: 'animal1'}) - t.end() - } - - function all(db, cb) { - var o = {} - db.createReadStream().on('data', function (data) { - o[data.key.toString()] = data.value.toString() - }) - .on('end', function () { - cb(null, o) - }) - .on('error', cb) - } -}) diff --git a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-sublevel/test/posthook-ranges.js b/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-sublevel/test/posthook-ranges.js deleted file mode 100644 index 42f92560..00000000 --- a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-sublevel/test/posthook-ranges.js +++ /dev/null @@ -1,63 +0,0 @@ -var test = require('tape') -var level = require('level-test')() -var SubLevel = require('../') - -test('sublevel - batch', function (t) { - - var base = SubLevel(level('test-sublevel')) - - var lc = [], uc = [] - - base.post(/^[a-z]/, function (data) { - lc.push(data.key) - }) - - base.post(/^[A-Z]/, function (data) { - uc.push(data.key) - }) - var n = 4 - - base.put('thing', Math.random(), next) - base.put('Thing', Math.random(), next) - base.put('lalala', Math.random(), next) - base.put('WHATEVER', Math.random(), next) - - function next () { - if(--n) return - t.deepEqual(lc.sort(), ['lalala', 'thing']) - t.deepEqual(uc.sort(), ['Thing', 'WHATEVER']) - t.end() - } -}) - - -test('sublevel - post hook rang on sublevel', function (t) { - - var db = SubLevel(level('test-sublevel2')) - var base = db.sublevel('stuff') - - var lc = [], uc = [] - - base.post(/^[a-z]/, function (data) { - console.log('POST', data) - lc.push(data.key) - }) - - base.post(/^[A-Z]/, function (data) { - uc.push(data.key) - }) - var n = 4 - - base.put('thing', Math.random(), next) - base.put('Thing', Math.random(), next) - base.put('lalala', Math.random(), next) - base.put('WHATEVER', Math.random(), next) - - function next () { - if(--n) return - t.deepEqual(lc.sort(), ['lalala', 'thing']) - t.deepEqual(uc.sort(), ['Thing', 'WHATEVER']) - t.end() - } -}) - diff --git a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-sublevel/test/prehook-batch.js b/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-sublevel/test/prehook-batch.js deleted file mode 100644 index 4a288959..00000000 --- a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-sublevel/test/prehook-batch.js +++ /dev/null @@ -1,72 +0,0 @@ -var level = require('level-test')() -var sublevel = require('../') -var test = require('tape') - -function find(ary, test) { - for(var i = 0; i < ary.length; i++) { - if(test(ary[i], i, ary)) return ary[i] - } -} - -test('prehook can introspect whole batch', function (t) { - - var db = sublevel(level('introspect')) - var logDb = db.sublevel('log') - - var didHaveLog = 0, didNotHaveLog = 0 - - var prefix = logDb.prefix() - - db.pre(function (op, add, batch) { - if(find(batch, function (_op) { - return op.key == _op.value && _op.key.indexOf(prefix) === 0 - })) - didHaveLog ++ - else { - add({key: Date.now(), value: op.key, type: 'put', prefix: logDb}) - didNotHaveLog ++ - } - }) - - db.batch([ - {key: 'foo', value: new Date(), type: 'put'}, - {key: Date.now(), value: 'foo', type: 'put', prefix: logDb}, - ], function (err) { - if(err) console.error(err.stack) - t.notOk(err, 'save did not error') - t.ok(didHaveLog) - t.end() - }) - -}) - -test('prehook can introspect whole batch - when sublevel', function (t) { - - var db = sublevel(level('introspect2')).sublevel('main') - var logDb = db.sublevel('log') - - var didHaveLog = 0, didNotHaveLog = 0 - var prefix = logDb.prefix() - - db.pre(function (op, add, batch) { - if(find(batch, function (_op) { - return op.key == _op.value && _op.key.indexOf(prefix) === 0 - })) - didHaveLog ++ - else { - add({key: Date.now(), value: op.key, type: 'put', prefix: logDb}) - didNotHaveLog ++ - } - }) - - db.batch([ - {key: 'foo', value: new Date(), type: 'put'}, - {key: Date.now(), value: 'foo', type: 'put', prefix: logDb}, - ], function (err) { - if(err) console.error(err.stack) - t.notOk(err, 'save did not error') - t.ok(didHaveLog) - t.end() - }) - -}) diff --git a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-sublevel/test/prehook-insert.js b/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-sublevel/test/prehook-insert.js deleted file mode 100644 index 0301f364..00000000 --- a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-sublevel/test/prehook-insert.js +++ /dev/null @@ -1,103 +0,0 @@ -var Sublevel = require('../') -var level = require('level-test')() - -var tape = require('tape') - -tape('insert in prehook', function (t) { - - var base = Sublevel(level('test-sublevel')) - - Sublevel(base, { sep: '~' }) - - var a = base.sublevel('A') - var b = base.sublevel('B') - - var as = {} - var aas = {} - - a.pre(function (op, add) { - as[op.key] = op.value - console.log('A :', op) - add({ - key: op.key, value: op.value, - type: 'put', prefix: b.prefix() - }) - }) - - var val = 'random_' + Math.random() - a.put('foo', val, function () { - - b.get('foo', function (err, _val) { - t.equal(_val, val) - t.end() - }) - }) - -}) - -tape('insert in prehook 2', function (t) { - - var base = Sublevel(level('test-sublevel2')) - - Sublevel(base, '~') - - var a = base.sublevel('A') - var b = base.sublevel('B') - - var as = {} - var aas = {} - - a.pre(function (op, add) { - as[op.key] = op.value - console.log('A :', op) - add({ - key: op.key, value: op.value, - type: 'put', prefix: b - }) - }) - - var val = 'random_' + Math.random() - a.put('foo', val, function () { - - b.get('foo', function (err, _val) { - t.equal(_val, val) - t.end() - }) - }) - -}) - - -tape('insert in prehook - encodings', function (t) { - - var base = Sublevel(level('test-sublevel3', {valueEncoding: 'json'})) - - Sublevel(base, '~') - - var b = base.sublevel('B', {valueEncoding: 'utf8'}) - - var as = {} -// var aas = {} - - base.pre(function (op, add) { - as[op.key] = op.value - console.log('A :', op) - add({ - key: op.key, value: JSON.stringify({value: op.value}), - type: 'put', prefix: b, valueEncoding: 'utf8' - }) - }) - - var val = {'random': + Math.random()} - base.put('foo', val, function (err) { - if(err) throw err - b.get('foo', function (err, _val) { - console.log('GET', _val, val) - t.deepEqual(JSON.parse(_val), {value: val}) - t.end() - }) - }) - -}) - - diff --git a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-sublevel/test/reverse-order.js b/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-sublevel/test/reverse-order.js deleted file mode 100644 index 2da9ed1e..00000000 --- a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-sublevel/test/reverse-order.js +++ /dev/null @@ -1,61 +0,0 @@ -"use strict"; - -var test = require('tape') -var LevelUp = require('level-test')(); -var Sublevel = require('../'); -var timestamp = require('monotonic-timestamp') - -var db = Sublevel( LevelUp('test-level-sublevel_myDB', {valueEncoding: 'json'}) ); -var groups = db.sublevel('groups'); -var topics = db.sublevel('topics'); - -var timeGroup1 = timestamp(); -var timeGroup2 = timestamp(); - -var timeTopic1 = timestamp(); -var timeTopic2 = timestamp(); -var timeTopic3 = timestamp(); - -console.log(timeTopic1,timeTopic2,timeTopic3) - -test('reverse:true', function (t) { - - groups.put(timeGroup1, {name: 'Cats', title: 'discussion about cats!'}, function (err) { - if (err) return console.log('Ooops!', err) - topics.put(timeGroup1 + '!' + timeTopic1, {title: 'dancing cats'}, function (err) { - if (err) return console.log('Ooops!', err) - - topics.put(timeGroup1 + '!' + timeTopic2, {title: 'cat in a box'}, function (err) { - if (err) return console.log('Ooops!', err) - - // groups.put(timeGroup2, {name: 'Node.js', title: 'Node.js talk'}, function (err) { - // if (err) return console.log('Ooops!', err) - - topics.put(timeGroup2 + '!' + timeTopic3, {title: 'Is there a good example for website without Express.js?'}, function (err) { - if (err) return console.log('Ooops!', err) - - var order = [ - timeGroup1 + '!' + timeTopic1, - timeGroup1 + '!' + timeTopic2 - ].sort().reverse() - - topics.createReadStream({max: timeGroup1 + '!~', min: ''+timeGroup1, reverse: true }) - .on('data', function (data) { - t.equal(data.key, order.shift()) - console.log('topic:', data.key, '=', data.value) - }) - .on('end', function () { - t.end() - console.log('Stream ended') - }) - }); - }); - // }); - }); - }); - -}) -// output is not in revese order: -// topic: 1366613791702!1366613791702.002 = { title: 'dancing cats' } -// topic: 1366613791702!1366613791702.003 = { title: 'cat in a box' } - diff --git a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-sublevel/test/reverse.js b/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-sublevel/test/reverse.js deleted file mode 100644 index 9a3dc3eb..00000000 --- a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-sublevel/test/reverse.js +++ /dev/null @@ -1,128 +0,0 @@ -var test = require('tape') -var level = require('level-test')() -var base = require('../')(level('test-sublevel-reverse')) - -function all (db, range, cb) { - var o = {} - db.createReadStream(range) - .on('data', function (data) { - o[data.key] = data.value - }) - .on('end', function () { - cb(null, o) - }) -} - -function makeTest(db, name) { - - test(name, function (t) { - - t.plan(19) - - var docs = { - a: 'apple', - b: 'banana', - c: 'cherry', - d: 'durian', - e: 'elder-berry' - } - - function order(a, b) { - t.deepEqual(a, b) - t.equal(JSON.stringify(a), JSON.stringify(b)) - } - - db.batch(Object.keys(docs).map(function (key) { - console.log(key, docs[key]) - return {key: key, value: docs[key], type: 'put'} - }), function (err) { - t.notOk(err) - - all(db, {}, function (err, all) { - order(all, docs) - }) - - all(db, {min: 'a~'}, function (err, all) { - order(all, { - b: 'banana', - c: 'cherry', - d: 'durian', - e: 'elder-berry' - }) - }) - - all(db, {min: 'b'}, function (err, all) { - order(all, { - b: 'banana', - c: 'cherry', - d: 'durian', - e: 'elder-berry' - }) - }) - - - all(db, {min: 'a~', reverse: true}, function (err, all) { - order(all, { - e: 'elder-berry', - d: 'durian', - c: 'cherry', - b: 'banana' - }) - }) - - all(db, {min: 'c~', reverse: true}, function (err, all) { - console.log(all) - order(all, { - e: 'elder-berry', - d: 'durian' - }) - }) - - all(db, {min: 'c~', max: 'd~'}, function (err, all) { - console.log(all) - order(all, { - d: 'durian', - }) - }) - - all(db, {min: 'a~'}, function (err, all) { - order(all, { - b: 'banana', - c: 'cherry', - d: 'durian', - e: 'elder-berry' - }) - }) - - all(db, {min: 'c~'}, function (err, all) { - console.log('d, e', all) - order(all, { - d: 'durian', - e: 'elder-berry' - }) - }) - - all(db, {min: 'c~', max: 'd~', reverse: true}, function (err, all) { - console.log(all) - order(all, { - d: 'durian', - }) - }) - }) - }) -} - -var A = base.sublevel('A') -makeTest(base, 'simple') - -makeTest(A, 'sublevel') - -makeTest(base, 'simple, again') - -var A_B = A.sublevel('B') -makeTest(A_B, 'sublevel2') - -makeTest(A, 'sublevel, again') - -makeTest(base, 'simple, again 2') - diff --git a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-sublevel/test/streams-sublevel-key-value.js b/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-sublevel/test/streams-sublevel-key-value.js deleted file mode 100644 index 07dd55bd..00000000 --- a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-sublevel/test/streams-sublevel-key-value.js +++ /dev/null @@ -1,36 +0,0 @@ -var levelup = require('level-test')() - -var base = require('../')(levelup('test-streams-sublevel-key-value')) - -var test = require('tape') - -test('sublevel value streams emit values and sublevel key streams emit keys', function (t) { - t.plan(4) - - var foo = base.sublevel('foo') - - foo.put('foo1', 'foo1-value', function () { - - var valdata, valerr - - foo.createValueStream({ start: 'foo1', end: 'foo1\xff' }) - .on('data', function (d) { valdata = d }) - .on('error', function (err) { valerr = err }) - .on('end', function () { - t.notOk(valerr, 'value stream emits no error') - t.equal(valdata, 'foo1-value', 'emits value only') - }) - - var keydata, keyerr - - foo.createKeyStream({ start: 'foo1', end: 'foo1\xff' }) - .on('data', function (d) { keydata = d }) - .on('error', function (err) { keyerr = err }) - .on('end', function () { - t.notOk(keyerr, 'key stream emits no error') - - t.equal(keydata, 'foo1', 'emits fully namespaced key only') - }) - }) - -}) diff --git a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-sublevel/test/streams.js b/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-sublevel/test/streams.js deleted file mode 100644 index 240bfd12..00000000 --- a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-sublevel/test/streams.js +++ /dev/null @@ -1,57 +0,0 @@ -var level = require('level-test')() -var sublevel = require('../') - -function sl (name) { - return sublevel(level(name), {sep: '~'}) -} - -require('tape')('sublevel', function (t) { - - require('rimraf').sync('/tmp/test-sublevel-readstream') - - var base = sl('test-sublevel-readstream') - - var a = base.sublevel('A') - - var i = 0 - - function all(db, cb) { - var o = {} - db.createReadStream({end: '\xff\xff'}).on('data', function (data) { - o[data.key.toString()] = data.value.toString() - }) - .on('end', function () { - cb(null, o) - }) - .on('error', cb) - } - - var _a, _b, _c - - var as = a.createWriteStream() - as.write({key: 'a', value: _a ='AAA_'+Math.random()}) - as.write({key: 'b', value: _b = 'BBB_'+Math.random()}) - as.write({key: 'c', value: _c = 'CCC_'+Math.random()}) - as.end() - as.on('close', function () { - - all(base, function (err, obj) { - console.log(obj) - t.deepEqual(obj, - { '~A~a': _a, - '~A~b': _b, - '~A~c': _c - }) - - all(a, function (err, obj) { - console.log(obj) - t.deepEqual(obj, - { 'a': _a, - 'b': _b, - 'c': _c - }) - t.end() - }) - }) - }) -}) diff --git a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-sublevel/test/sublevels.js b/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-sublevel/test/sublevels.js deleted file mode 100644 index bf3d5dfc..00000000 --- a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/level-sublevel/test/sublevels.js +++ /dev/null @@ -1,33 +0,0 @@ -var levelup = require('level-test')() - -var base = require('../')(levelup('test-sublevels')) - -var test = require('tape') - -test('subsections', function (t) { - t.deepEqual(base.sublevels, {}) - - var foo = base.sublevel('foo') - var bar = base.sublevel('bar') - - t.deepEqual(base.sublevels, {foo: foo, bar: bar}) - t.deepEqual(foo.sublevels, {}) - - t.strictEqual(base.sublevel('foo'), foo) - t.strictEqual(base.sublevel('bar'), bar) - - console.log('prefix:', foo.prefix()) - console.log('prefix:', bar.prefix()) - - var fooBlerg = foo.sublevel('blerg') - t.deepEqual(foo.sublevels, {blerg: fooBlerg}) - - t.strictEqual(foo.sublevel('blerg'), fooBlerg) - - t.end() -}) - - - - - diff --git a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/octal/.npmignore b/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/octal/.npmignore deleted file mode 100644 index 3c3629e6..00000000 --- a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/octal/.npmignore +++ /dev/null @@ -1 +0,0 @@ -node_modules diff --git a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/octal/.travis.yml b/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/octal/.travis.yml deleted file mode 100644 index ab2fee27..00000000 --- a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/octal/.travis.yml +++ /dev/null @@ -1,6 +0,0 @@ -language: node_js -node_js: - - '5' - - '4' - - '0.12' - - '0.10' diff --git a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/octal/LICENSE b/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/octal/LICENSE deleted file mode 100644 index 66a4d2a1..00000000 --- a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/octal/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2015 Mathias Buus - -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/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/octal/README.md b/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/octal/README.md deleted file mode 100644 index 930fa8bd..00000000 --- a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/octal/README.md +++ /dev/null @@ -1,22 +0,0 @@ -# octal - -Interpret a number as base 8. - -Same as the `0` notation but works in strict mode / standard js. - -``` -npm install octal -``` - -[![build status](http://img.shields.io/travis/mafintosh/octal.svg?style=flat)](http://travis-ci.org/mafintosh/octal) - -## Usage - -``` js -var octal = require('octal') -console.log(octal(777)) // prints 511 which is 0777 -``` - -## License - -MIT diff --git a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/octal/index.js b/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/octal/index.js deleted file mode 100644 index 7b0711b6..00000000 --- a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/octal/index.js +++ /dev/null @@ -1,3 +0,0 @@ -module.exports = function (num, base) { - return parseInt(num.toString(), base || 8) -} diff --git a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/octal/package.json b/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/octal/package.json deleted file mode 100644 index 1aeb60f8..00000000 --- a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/octal/package.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "name": "octal", - "version": "1.0.0", - "description": "Interpret a number as base 8", - "main": "index.js", - "dependencies": {}, - "devDependencies": { - "tape": "^4.2.2" - }, - "repository": { - "type": "git", - "url": "https://github.com/mafintosh/octal.git" - }, - "author": { - "name": "Mathias Buus", - "url": "@mafintosh" - }, - "license": "MIT", - "bugs": { - "url": "https://github.com/mafintosh/octal/issues" - }, - "homepage": "https://github.com/mafintosh/octal", - "gitHead": "4fd1af09d4e4f6954b13c324a98f26b0f2d2fa0a", - "_id": "octal@1.0.0", - "scripts": {}, - "_shasum": "63e7162a68efbeb9e213588d58e989d1e5c4530b", - "_from": "octal@>=1.0.0 <2.0.0", - "_npmVersion": "2.14.7", - "_nodeVersion": "4.2.2", - "_npmUser": { - "name": "mafintosh", - "email": "mathiasbuus@gmail.com" - }, - "dist": { - "shasum": "63e7162a68efbeb9e213588d58e989d1e5c4530b", - "tarball": "https://registry.npmjs.org/octal/-/octal-1.0.0.tgz" - }, - "maintainers": [ - { - "name": "mafintosh", - "email": "mathiasbuus@gmail.com" - } - ], - "directories": {}, - "_resolved": "https://registry.npmjs.org/octal/-/octal-1.0.0.tgz" -} diff --git a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/octal/test.js b/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/octal/test.js deleted file mode 100644 index c96b3c31..00000000 --- a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/octal/test.js +++ /dev/null @@ -1,10 +0,0 @@ -var tape = require('tape') -var octal = require('./') - -tape('parses', function (t) { - t.same(octal(0), 0, 'octal(0)') - t.same(octal(10), 8, 'octal(10)') - t.same(octal(100), 8 * 8, 'octal(100)') - t.same(octal(8).toString(), 'NaN', 'octal(8)') - t.end() -}) diff --git a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/once/LICENSE b/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/once/LICENSE deleted file mode 100644 index 19129e31..00000000 --- a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/once/LICENSE +++ /dev/null @@ -1,15 +0,0 @@ -The ISC License - -Copyright (c) Isaac Z. Schlueter and Contributors - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR -IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/once/README.md b/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/once/README.md deleted file mode 100644 index 1f1ffca9..00000000 --- a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/once/README.md +++ /dev/null @@ -1,79 +0,0 @@ -# once - -Only call a function once. - -## usage - -```javascript -var once = require('once') - -function load (file, cb) { - cb = once(cb) - loader.load('file') - loader.once('load', cb) - loader.once('error', cb) -} -``` - -Or add to the Function.prototype in a responsible way: - -```javascript -// only has to be done once -require('once').proto() - -function load (file, cb) { - cb = cb.once() - loader.load('file') - loader.once('load', cb) - loader.once('error', cb) -} -``` - -Ironically, the prototype feature makes this module twice as -complicated as necessary. - -To check whether you function has been called, use `fn.called`. Once the -function is called for the first time the return value of the original -function is saved in `fn.value` and subsequent calls will continue to -return this value. - -```javascript -var once = require('once') - -function load (cb) { - cb = once(cb) - var stream = createStream() - stream.once('data', cb) - stream.once('end', function () { - if (!cb.called) cb(new Error('not found')) - }) -} -``` - -## `once.strict(func)` - -Throw an error if the function is called twice. - -Some functions are expected to be called only once. Using `once` for them would -potentially hide logical errors. - -In the example below, the `greet` function has to call the callback only once: - -```javascript -function greet (name, cb) { - // return is missing from the if statement - // when no name is passed, the callback is called twice - if (!name) cb('Hello anonymous') - cb('Hello ' + name) -} - -function log (msg) { - console.log(msg) -} - -// this will print 'Hello anonymous' but the logical error will be missed -greet(null, once(msg)) - -// once.strict will print 'Hello anonymous' and throw an error when the callback will be called the second time -greet(null, once.strict(msg)) -``` diff --git a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/once/node_modules/wrappy/LICENSE b/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/once/node_modules/wrappy/LICENSE deleted file mode 100644 index 19129e31..00000000 --- a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/once/node_modules/wrappy/LICENSE +++ /dev/null @@ -1,15 +0,0 @@ -The ISC License - -Copyright (c) Isaac Z. Schlueter and Contributors - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR -IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/once/node_modules/wrappy/README.md b/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/once/node_modules/wrappy/README.md deleted file mode 100644 index 98eab252..00000000 --- a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/once/node_modules/wrappy/README.md +++ /dev/null @@ -1,36 +0,0 @@ -# wrappy - -Callback wrapping utility - -## USAGE - -```javascript -var wrappy = require("wrappy") - -// var wrapper = wrappy(wrapperFunction) - -// make sure a cb is called only once -// See also: http://npm.im/once for this specific use case -var once = wrappy(function (cb) { - var called = false - return function () { - if (called) return - called = true - return cb.apply(this, arguments) - } -}) - -function printBoo () { - console.log('boo') -} -// has some rando property -printBoo.iAmBooPrinter = true - -var onlyPrintOnce = once(printBoo) - -onlyPrintOnce() // prints 'boo' -onlyPrintOnce() // does nothing - -// random property is retained! -assert.equal(onlyPrintOnce.iAmBooPrinter, true) -``` diff --git a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/once/node_modules/wrappy/package.json b/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/once/node_modules/wrappy/package.json deleted file mode 100644 index 842d22b1..00000000 --- a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/once/node_modules/wrappy/package.json +++ /dev/null @@ -1,62 +0,0 @@ -{ - "name": "wrappy", - "version": "1.0.2", - "description": "Callback wrapping utility", - "main": "wrappy.js", - "files": [ - "wrappy.js" - ], - "directories": { - "test": "test" - }, - "dependencies": {}, - "devDependencies": { - "tap": "^2.3.1" - }, - "scripts": { - "test": "tap --coverage test/*.js" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/npm/wrappy.git" - }, - "author": { - "name": "Isaac Z. Schlueter", - "email": "i@izs.me", - "url": "http://blog.izs.me/" - }, - "license": "ISC", - "bugs": { - "url": "https://github.com/npm/wrappy/issues" - }, - "homepage": "https://github.com/npm/wrappy", - "gitHead": "71d91b6dc5bdeac37e218c2cf03f9ab55b60d214", - "_id": "wrappy@1.0.2", - "_shasum": "b5243d8f3ec1aa35f1364605bc0d1036e30ab69f", - "_from": "wrappy@>=1.0.0 <2.0.0", - "_npmVersion": "3.9.1", - "_nodeVersion": "5.10.1", - "_npmUser": { - "name": "zkat", - "email": "kat@sykosomatic.org" - }, - "dist": { - "shasum": "b5243d8f3ec1aa35f1364605bc0d1036e30ab69f", - "tarball": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz" - }, - "maintainers": [ - { - "name": "isaacs", - "email": "i@izs.me" - }, - { - "name": "zkat", - "email": "kat@sykosomatic.org" - } - ], - "_npmOperationalInternal": { - "host": "packages-16-east.internal.npmjs.com", - "tmp": "tmp/wrappy-1.0.2.tgz_1463527848281_0.037129373755306005" - }, - "_resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz" -} diff --git a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/once/node_modules/wrappy/wrappy.js b/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/once/node_modules/wrappy/wrappy.js deleted file mode 100644 index bb7e7d6f..00000000 --- a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/once/node_modules/wrappy/wrappy.js +++ /dev/null @@ -1,33 +0,0 @@ -// Returns a wrapper function that returns a wrapped callback -// The wrapper function should do some stuff, and return a -// presumably different callback function. -// This makes sure that own properties are retained, so that -// decorations and such are not lost along the way. -module.exports = wrappy -function wrappy (fn, cb) { - if (fn && cb) return wrappy(fn)(cb) - - if (typeof fn !== 'function') - throw new TypeError('need wrapper function') - - Object.keys(fn).forEach(function (k) { - wrapper[k] = fn[k] - }) - - return wrapper - - function wrapper() { - var args = new Array(arguments.length) - for (var i = 0; i < args.length; i++) { - args[i] = arguments[i] - } - var ret = fn.apply(this, args) - var cb = args[args.length-1] - if (typeof ret === 'function' && ret !== cb) { - Object.keys(cb).forEach(function (k) { - ret[k] = cb[k] - }) - } - return ret - } -} diff --git a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/once/once.js b/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/once/once.js deleted file mode 100644 index 23540673..00000000 --- a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/once/once.js +++ /dev/null @@ -1,42 +0,0 @@ -var wrappy = require('wrappy') -module.exports = wrappy(once) -module.exports.strict = wrappy(onceStrict) - -once.proto = once(function () { - Object.defineProperty(Function.prototype, 'once', { - value: function () { - return once(this) - }, - configurable: true - }) - - Object.defineProperty(Function.prototype, 'onceStrict', { - value: function () { - return onceStrict(this) - }, - configurable: true - }) -}) - -function once (fn) { - var f = function () { - if (f.called) return f.value - f.called = true - return f.value = fn.apply(this, arguments) - } - f.called = false - return f -} - -function onceStrict (fn) { - var f = function () { - if (f.called) - throw new Error(f.onceError) - f.called = true - return f.value = fn.apply(this, arguments) - } - var name = fn.name || 'Function wrapped with `once`' - f.onceError = name + " shouldn't be called more than once" - f.called = false - return f -} diff --git a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/once/package.json b/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/once/package.json deleted file mode 100644 index 30b53e05..00000000 --- a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/once/package.json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "name": "once", - "version": "1.4.0", - "description": "Run a function exactly one time", - "main": "once.js", - "directories": { - "test": "test" - }, - "dependencies": { - "wrappy": "1" - }, - "devDependencies": { - "tap": "^7.0.1" - }, - "scripts": { - "test": "tap test/*.js" - }, - "files": [ - "once.js" - ], - "repository": { - "type": "git", - "url": "git://github.com/isaacs/once.git" - }, - "keywords": [ - "once", - "function", - "one", - "single" - ], - "author": { - "name": "Isaac Z. Schlueter", - "email": "i@izs.me", - "url": "http://blog.izs.me/" - }, - "license": "ISC", - "gitHead": "0e614d9f5a7e6f0305c625f6b581f6d80b33b8a6", - "bugs": { - "url": "https://github.com/isaacs/once/issues" - }, - "homepage": "https://github.com/isaacs/once#readme", - "_id": "once@1.4.0", - "_shasum": "583b1aa775961d4b113ac17d9c50baef9dd76bd1", - "_from": "once@>=1.3.0 <2.0.0", - "_npmVersion": "3.10.7", - "_nodeVersion": "6.5.0", - "_npmUser": { - "name": "isaacs", - "email": "i@izs.me" - }, - "dist": { - "shasum": "583b1aa775961d4b113ac17d9c50baef9dd76bd1", - "tarball": "https://registry.npmjs.org/once/-/once-1.4.0.tgz" - }, - "maintainers": [ - { - "name": "isaacs", - "email": "i@izs.me" - } - ], - "_npmOperationalInternal": { - "host": "packages-12-west.internal.npmjs.com", - "tmp": "tmp/once-1.4.0.tgz_1473196269128_0.537820661207661" - }, - "_resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz" -} diff --git a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/xtend/.jshintrc b/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/xtend/.jshintrc deleted file mode 100644 index 77887b5f..00000000 --- a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/xtend/.jshintrc +++ /dev/null @@ -1,30 +0,0 @@ -{ - "maxdepth": 4, - "maxstatements": 200, - "maxcomplexity": 12, - "maxlen": 80, - "maxparams": 5, - - "curly": true, - "eqeqeq": true, - "immed": true, - "latedef": false, - "noarg": true, - "noempty": true, - "nonew": true, - "undef": true, - "unused": "vars", - "trailing": true, - - "quotmark": true, - "expr": true, - "asi": true, - - "browser": false, - "esnext": true, - "devel": false, - "node": false, - "nonstandard": false, - - "predef": ["require", "module", "__dirname", "__filename"] -} diff --git a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/xtend/.npmignore b/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/xtend/.npmignore deleted file mode 100644 index 3c3629e6..00000000 --- a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/xtend/.npmignore +++ /dev/null @@ -1 +0,0 @@ -node_modules diff --git a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/xtend/LICENCE b/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/xtend/LICENCE deleted file mode 100644 index a23e08a8..00000000 --- a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/xtend/LICENCE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (c) 2012 Raynos. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. \ No newline at end of file diff --git a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/xtend/Makefile b/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/xtend/Makefile deleted file mode 100644 index d583fcf4..00000000 --- a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/xtend/Makefile +++ /dev/null @@ -1,4 +0,0 @@ -browser: - node ./support/compile - -.PHONY: browser \ No newline at end of file diff --git a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/xtend/README.md b/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/xtend/README.md deleted file mode 100644 index 389adae3..00000000 --- a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/xtend/README.md +++ /dev/null @@ -1,27 +0,0 @@ -# xtend - -[![browser support][3]][4] - -Extend like a boss - -xtend is a basic utility library which allows you to extend an object by appending all of the properties from each object in a list. When there are identical properties, the right-most property takes presedence. - -## Examples - -```js -var extend = require("xtend") - -var combination = extend({ - a: "a" -}, { - b: "b" -}) -// { a: "a", b: "b" } -``` - - -## MIT Licenced - - - [3]: http://ci.testling.com/Raynos/xtend.png - [4]: http://ci.testling.com/Raynos/xtend diff --git a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/xtend/has-keys.js b/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/xtend/has-keys.js deleted file mode 100644 index 62391e78..00000000 --- a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/xtend/has-keys.js +++ /dev/null @@ -1,7 +0,0 @@ -module.exports = hasKeys - -function hasKeys(source) { - return source !== null && - (typeof source === "object" || - typeof source === "function") -} diff --git a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/xtend/index.js b/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/xtend/index.js deleted file mode 100644 index 91e62439..00000000 --- a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/xtend/index.js +++ /dev/null @@ -1,23 +0,0 @@ -var hasKeys = require("./has-keys") - -module.exports = extend - -function extend() { - var target = {} - - for (var i = 0; i < arguments.length; i++) { - var source = arguments[i] - - if (!hasKeys(source)) { - continue - } - - for (var key in source) { - if (source.hasOwnProperty(key)) { - target[key] = source[key] - } - } - } - - return target -} diff --git a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/xtend/mutable.js b/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/xtend/mutable.js deleted file mode 100644 index 39b855ec..00000000 --- a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/xtend/mutable.js +++ /dev/null @@ -1,23 +0,0 @@ -var hasKeys = require("./has-keys") - -module.exports = extend - -function extend(target) { - var sources = [].slice.call(arguments, 1) - - for (var i = 0; i < sources.length; i++) { - var source = sources[i] - - if (!hasKeys(source)) { - continue - } - - for (var key in source) { - if (source.hasOwnProperty(key)) { - target[key] = source[key] - } - } - } - - return target -} diff --git a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/xtend/package.json b/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/xtend/package.json deleted file mode 100644 index a0eb48a0..00000000 --- a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/xtend/package.json +++ /dev/null @@ -1,86 +0,0 @@ -{ - "name": "xtend", - "version": "2.2.0", - "description": "extend like a boss", - "keywords": [ - "extend", - "merge", - "options", - "opts", - "object", - "array" - ], - "author": { - "name": "Raynos", - "email": "raynos2@gmail.com" - }, - "repository": { - "type": "git", - "url": "git://github.com/Raynos/xtend.git" - }, - "main": "index", - "scripts": { - "test": "node test" - }, - "dependencies": {}, - "devDependencies": { - "tape": "~1.1.0" - }, - "homepage": "https://github.com/Raynos/xtend", - "contributors": [ - { - "name": "Jake Verbaten" - }, - { - "name": "Matt Esch" - } - ], - "bugs": { - "url": "https://github.com/Raynos/xtend/issues", - "email": "raynos2@gmail.com" - }, - "licenses": [ - { - "type": "MIT", - "url": "http://github.com/raynos/xtend/raw/master/LICENSE" - } - ], - "testling": { - "files": "test.js", - "browsers": [ - "ie/7..latest", - "firefox/16..latest", - "firefox/nightly", - "chrome/22..latest", - "chrome/canary", - "opera/12..latest", - "opera/next", - "safari/5.1..latest", - "ipad/6.0..latest", - "iphone/6.0..latest" - ] - }, - "engines": { - "node": ">=0.4" - }, - "_id": "xtend@2.2.0", - "dist": { - "shasum": "eef6b1f198c1c8deafad8b1765a04dad4a01c5a9", - "tarball": "https://registry.npmjs.org/xtend/-/xtend-2.2.0.tgz" - }, - "_from": "xtend@>=2.2.0 <3.0.0", - "_npmVersion": "1.4.6", - "_npmUser": { - "name": "raynos", - "email": "raynos2@gmail.com" - }, - "maintainers": [ - { - "name": "raynos", - "email": "raynos2@gmail.com" - } - ], - "directories": {}, - "_shasum": "eef6b1f198c1c8deafad8b1765a04dad4a01c5a9", - "_resolved": "https://registry.npmjs.org/xtend/-/xtend-2.2.0.tgz" -} diff --git a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/xtend/test.js b/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/xtend/test.js deleted file mode 100644 index 3369d796..00000000 --- a/node_modules/browserify-fs/node_modules/level-filesystem/node_modules/xtend/test.js +++ /dev/null @@ -1,63 +0,0 @@ -var test = require("tape") -var extend = require("./") -var mutableExtend = require("./mutable") - -test("merge", function(assert) { - var a = { a: "foo" } - var b = { b: "bar" } - - assert.deepEqual(extend(a, b), { a: "foo", b: "bar" }) - assert.end() -}) - -test("replace", function(assert) { - var a = { a: "foo" } - var b = { a: "bar" } - - assert.deepEqual(extend(a, b), { a: "bar" }) - assert.end() -}) - -test("undefined", function(assert) { - var a = { a: undefined } - var b = { b: "foo" } - - assert.deepEqual(extend(a, b), { a: undefined, b: "foo" }) - assert.deepEqual(extend(b, a), { a: undefined, b: "foo" }) - assert.end() -}) - -test("handle 0", function(assert) { - var a = { a: "default" } - var b = { a: 0 } - - assert.deepEqual(extend(a, b), { a: 0 }) - assert.deepEqual(extend(b, a), { a: "default" }) - assert.end() -}) - -test("is immutable", function (assert) { - var record = {} - - extend(record, { foo: "bar" }) - assert.equal(record.foo, undefined) - assert.end() -}) - -test("null as argument", function (assert) { - var a = { foo: "bar" } - var b = null - var c = void 0 - - assert.deepEqual(extend(b, a, c), { foo: "bar" }) - assert.end() -}) - -test("mutable", function (assert) { - var a = { foo: "bar" } - - mutableExtend(a, { bar: "baz" }) - - assert.equal(a.bar, "baz") - assert.end() -}) diff --git a/node_modules/browserify-fs/node_modules/level-filesystem/package.json b/node_modules/browserify-fs/node_modules/level-filesystem/package.json deleted file mode 100644 index 8e731972..00000000 --- a/node_modules/browserify-fs/node_modules/level-filesystem/package.json +++ /dev/null @@ -1,80 +0,0 @@ -{ - "name": "level-filesystem", - "version": "1.2.0", - "description": "Full implementation of the fs module on top of leveldb", - "repository": { - "type": "git", - "url": "git://github.com:mafintosh/level-filesystem.git" - }, - "dependencies": { - "octal": "^1.0.0", - "once": "^1.3.0", - "errno": "^0.1.1", - "concat-stream": "^1.4.4", - "level-sublevel": "^5.2.0", - "level-blobs": "^0.1.7", - "fwd-stream": "^1.0.4", - "xtend": "^2.2.0", - "level-peek": "^1.0.6" - }, - "devDependencies": { - "memdb": "^0.1.0", - "tape": "^2.12.0", - "memdown": "git://github.com/maxogden/memdown", - "levelup": "^0.18.2", - "browserify": "^12.0.1" - }, - "keywords": [ - "leveldb", - "level", - "filesystem", - "fs", - "file", - "replacement" - ], - "scripts": { - "test": "tape test/*.js" - }, - "testling": { - "files": "test/*.js", - "browsers": [ - "ie/8..latest", - "firefox/17..latest", - "firefox/nightly", - "chrome/22..latest", - "chrome/canary", - "opera/12..latest", - "opera/next", - "safari/5.1..latest", - "ipad/6.0..latest", - "iphone/6.0..latest", - "android-browser/4.2..latest" - ] - }, - "gitHead": "213a7c1bf71a91a9f88447339a12b6dd1f92d85d", - "bugs": { - "url": "https://github.com/mafintosh/level-filesystem/issues" - }, - "homepage": "https://github.com/mafintosh/level-filesystem", - "_id": "level-filesystem@1.2.0", - "_shasum": "a00aca9919c4a4dfafdca6a8108d225aadff63b3", - "_from": "level-filesystem@>=1.0.1 <2.0.0", - "_npmVersion": "2.14.7", - "_nodeVersion": "4.2.2", - "_npmUser": { - "name": "mafintosh", - "email": "mathiasbuus@gmail.com" - }, - "dist": { - "shasum": "a00aca9919c4a4dfafdca6a8108d225aadff63b3", - "tarball": "https://registry.npmjs.org/level-filesystem/-/level-filesystem-1.2.0.tgz" - }, - "maintainers": [ - { - "name": "mafintosh", - "email": "mathiasbuus@gmail.com" - } - ], - "directories": {}, - "_resolved": "https://registry.npmjs.org/level-filesystem/-/level-filesystem-1.2.0.tgz" -} diff --git a/node_modules/browserify-fs/node_modules/level-filesystem/paths.js b/node_modules/browserify-fs/node_modules/level-filesystem/paths.js deleted file mode 100644 index e4707d9a..00000000 --- a/node_modules/browserify-fs/node_modules/level-filesystem/paths.js +++ /dev/null @@ -1,116 +0,0 @@ -var path = require('path'); -var once = require('once'); -var concat = require('concat-stream'); -var octal = require('octal') -var stat = require('./stat'); -var xtend = require('xtend'); -var errno = require('./errno'); - -var ROOT = stat({ - type: 'directory', - mode: octal(777), - size: 4096 -}); - -var normalize = function(key) { - key = key[0] === '/' ? key : '/' + key; - key = path.normalize(key); - if (key === '/') return key; - return key[key.length-1] === '/' ? key.slice(0, -1) : key; -}; - -var prefix = function(key) { - var depth = key.split('/').length.toString(36); - return '0000000000'.slice(depth.length)+depth+key; -}; - -module.exports = function(db) { - var that = {}; - - that.normalize = normalize; - - that.get = function(key, cb) { - key = normalize(key); - if (key === '/') return process.nextTick(cb.bind(null, null, ROOT, '/')); - db.get(prefix(key), {valueEncoding:'json'}, function(err, doc) { - if (err && err.notFound) return cb(errno.ENOENT(key), null, key); - if (err) return cb(err, null, key); - cb(null, stat(doc), key); - }); - }; - - that.writable = function(key, cb) { - key = normalize(key); - if (key === '/') return process.nextTick(cb.bind(null, errno.EPERM(key))); - that.follow(path.dirname(key), function(err, parent) { - if (err) return cb(err); - if (!parent.isDirectory()) return cb(errno.ENOTDIR(key)); - cb(null, key); - }); - }; - - that.list = function(key, cb) { - key = normalize(key); - - var start = prefix(key === '/' ? key : key + '/'); - var keys = db.createKeyStream({start: start, end: start+'\xff'}); - - cb = once(cb); - - keys.on('error', cb); - keys.pipe(concat({encoding:'object'}, function(files) { - files = files.map(function(file) { - return file.split('/').pop(); - }); - - cb(null, files); - })); - }; - - var resolve = function(dir, cb) { - var root = '/'; - var parts = dir.split('/').slice(1); - - var loop = function() { - that.get(path.join(root, parts.shift()), function(err, doc, key) { - if (err) return cb(err, doc, dir); - root = doc.target || key; - if (!parts.length) return cb(null, doc, key); - loop(); - }); - }; - - loop(); - }; - - that.follow = function(key, cb) { - resolve(normalize(key), function loop(err, doc, key) { - if (err) return cb(err, null, key); - if (doc.target) return that.get(doc.target, loop); - cb(null, stat(doc), key); - }); - }; - - that.update = function(key, opts, cb) { - that.get(key, function(err, doc, key) { - if (err) return cb(err); - if (key === '/') return cb(errno.EPERM(key)); - that.put(key, xtend(doc, opts), cb); - }); - }; - - that.put = function(key, opts, cb) { - that.writable(key, function(err, key) { - if (err) return cb(err); - db.put(prefix(key), stat(opts), {valueEncoding:'json'}, cb); - }); - }; - - that.del = function(key, cb) { - key = normalize(key); - if (key === '/') return process.nextTick(cb.bind(null, errno.EPERM(key))); - db.del(prefix(key), cb); - }; - - return that; -}; diff --git a/node_modules/browserify-fs/node_modules/level-filesystem/stat.js b/node_modules/browserify-fs/node_modules/level-filesystem/stat.js deleted file mode 100644 index 1b091aad..00000000 --- a/node_modules/browserify-fs/node_modules/level-filesystem/stat.js +++ /dev/null @@ -1,51 +0,0 @@ -var toDate = function(date) { - if (!date) return new Date(); - if (typeof date === 'string') return new Date(date); - return date; -}; - -var Stat = function(opts) { - this.uid = opts.uid || 0; - this.gid = opts.gid || 0; - this.mode = opts.mode || 0; - this.size = opts.size || 0; - this.mtime = toDate(opts.mtime); - this.atime = toDate(opts.atime); - this.ctime = toDate(opts.ctime); - this.type = opts.type; - this.target = opts.target; - this.link = opts.link; - this.blob = opts.blob; -}; - -Stat.prototype.isDirectory = function() { - return this.type === 'directory'; -}; - -Stat.prototype.isFile = function() { - return this.type === 'file'; -}; - -Stat.prototype.isBlockDevice = function() { - return false; -}; - -Stat.prototype.isCharacterDevice = function() { - return false; -}; - -Stat.prototype.isSymbolicLink = function() { - return this.type === 'symlink'; -}; - -Stat.prototype.isFIFO = function() { - return false; -}; - -Stat.prototype.isSocket = function() { - return false; -}; - -module.exports = function(opts) { - return new Stat(opts); -}; \ No newline at end of file diff --git a/node_modules/browserify-fs/node_modules/level-filesystem/test/append-file.js b/node_modules/browserify-fs/node_modules/level-filesystem/test/append-file.js deleted file mode 100644 index aa63babf..00000000 --- a/node_modules/browserify-fs/node_modules/level-filesystem/test/append-file.js +++ /dev/null @@ -1,13 +0,0 @@ -var test = require('./helpers/test'); - -test('appendFile', function(fs, t) { - fs.writeFile('/test.txt', 'hello', function(err) { - fs.appendFile('/test.txt', ' world', function(err) { - t.notOk(err); - fs.readFile('/test.txt', function(err, data) { - t.same(data.toString(), 'hello world'); - t.end(); - }); - }); - }); -}); \ No newline at end of file diff --git a/node_modules/browserify-fs/node_modules/level-filesystem/test/chmod.js b/node_modules/browserify-fs/node_modules/level-filesystem/test/chmod.js deleted file mode 100644 index 1b4a3ad2..00000000 --- a/node_modules/browserify-fs/node_modules/level-filesystem/test/chmod.js +++ /dev/null @@ -1,15 +0,0 @@ -var octal = require('octal') -var test = require('./helpers/test'); - -test('chmod', function(fs, t) { - fs.mkdir('/foo', function() { - fs.chmod('/foo', octal(755), function(err) { - t.notOk(err); - fs.stat('/foo', function(err, stat) { - t.notOk(err); - t.same(stat.mode, octal(755)); - t.end(); - }); - }); - }); -}); diff --git a/node_modules/browserify-fs/node_modules/level-filesystem/test/chown.js b/node_modules/browserify-fs/node_modules/level-filesystem/test/chown.js deleted file mode 100644 index 0efa1fa8..00000000 --- a/node_modules/browserify-fs/node_modules/level-filesystem/test/chown.js +++ /dev/null @@ -1,15 +0,0 @@ -var test = require('./helpers/test'); - -test('chown', function(fs, t) { - fs.mkdir('/foo', function() { - fs.chown('/foo', 10, 11, function(err) { - t.notOk(err); - fs.stat('/foo', function(err, stat) { - t.notOk(err); - t.same(stat.uid, 10); - t.same(stat.gid, 11); - t.end(); - }); - }); - }); -}); \ No newline at end of file diff --git a/node_modules/browserify-fs/node_modules/level-filesystem/test/close.js b/node_modules/browserify-fs/node_modules/level-filesystem/test/close.js deleted file mode 100644 index a6e03fe6..00000000 --- a/node_modules/browserify-fs/node_modules/level-filesystem/test/close.js +++ /dev/null @@ -1,15 +0,0 @@ -var test = require('./helpers/test'); - -test('close', function(fs, t) { - fs.open('/test', 'w', function(err, fd) { - t.ok(!err); - fs.close(fd, function(err) { - t.ok(!err); - fs.fsync(fd, function(err) { - t.ok(err); - t.same(err.code, 'EBADF'); - t.end(); - }) - }); - }); -}); diff --git a/node_modules/browserify-fs/node_modules/level-filesystem/test/exists.js b/node_modules/browserify-fs/node_modules/level-filesystem/test/exists.js deleted file mode 100644 index ac631f1b..00000000 --- a/node_modules/browserify-fs/node_modules/level-filesystem/test/exists.js +++ /dev/null @@ -1,16 +0,0 @@ -var test = require('./helpers/test'); - -test('exists', function(fs, t) { - fs.exists('/', function(exists) { - t.ok(exists); - fs.exists('/foo', function(exists) { - t.notOk(exists); - fs.mkdir('/foo', function() { - fs.exists('/foo', function(exists) { - t.ok(exists); - t.end(); - }); - }); - }); - }); -}); \ No newline at end of file diff --git a/node_modules/browserify-fs/node_modules/level-filesystem/test/fchmod.js b/node_modules/browserify-fs/node_modules/level-filesystem/test/fchmod.js deleted file mode 100644 index 80d99528..00000000 --- a/node_modules/browserify-fs/node_modules/level-filesystem/test/fchmod.js +++ /dev/null @@ -1,16 +0,0 @@ -var test = require('./helpers/test'); - -test('fchmod', function(fs, t) { - fs.writeFile('/foo', 'bar', function() { - fs.open('/foo', 'r', function(err, fd) { - fs.fchmod(fd, 0655, function(err) { - t.notOk(err); - fs.stat('/foo', function(err, stat) { - t.notOk(err); - t.same(stat.mode, 0655); - t.end(); - }); - }); - }); - }); -}); \ No newline at end of file diff --git a/node_modules/browserify-fs/node_modules/level-filesystem/test/fchown.js b/node_modules/browserify-fs/node_modules/level-filesystem/test/fchown.js deleted file mode 100644 index 7b5901e8..00000000 --- a/node_modules/browserify-fs/node_modules/level-filesystem/test/fchown.js +++ /dev/null @@ -1,17 +0,0 @@ -var test = require('./helpers/test'); - -test('fchown', function(fs, t) { - fs.writeFile('/foo', 'bar', function() { - fs.open('/foo', 'r', function(err, fd) { - fs.fchown(fd, 10, 11, function(err) { - t.notOk(err); - fs.stat('/foo', function(err, stat) { - t.notOk(err); - t.same(stat.uid, 10); - t.same(stat.gid, 11); - t.end(); - }); - }); - }); - }); -}); \ No newline at end of file diff --git a/node_modules/browserify-fs/node_modules/level-filesystem/test/fstat.js b/node_modules/browserify-fs/node_modules/level-filesystem/test/fstat.js deleted file mode 100644 index a6185598..00000000 --- a/node_modules/browserify-fs/node_modules/level-filesystem/test/fstat.js +++ /dev/null @@ -1,21 +0,0 @@ -var test = require('./helpers/test'); - -test('fstat root and folder', function(fs, t) { - fs.writeFile('/foo', 'bar', function() { - fs.open('/foo', 'r', function(err, fd) { - fs.fstat(fd, function(err, stat) { - t.notOk(err); - t.ok(stat.size, 3); - t.end(); - }); - }); - }); -}); - -test('fstat not exist', function(fs, t) { - fs.fstat(42, function(err) { - t.ok(err); - t.same(err.code, 'EBADF'); - t.end(); - }); -}); \ No newline at end of file diff --git a/node_modules/browserify-fs/node_modules/level-filesystem/test/fsync.js b/node_modules/browserify-fs/node_modules/level-filesystem/test/fsync.js deleted file mode 100644 index 8596f513..00000000 --- a/node_modules/browserify-fs/node_modules/level-filesystem/test/fsync.js +++ /dev/null @@ -1,18 +0,0 @@ -var test = require('./helpers/test'); - -test('fsync', function(fs, t) { - fs.open('/test', 'w+', function(err, fd) { - t.ok(!err); - var w = new Buffer('hello'); - fs.write(fd, w, 0, 5, null, function() { - fs.fsync(fd, function() { - var r = new Buffer(5); - fs.read(fd, r, 0, 5, 0, function(err) { - t.ok(!err); - t.same(r, w); - t.end(); - }) - }); - }); - }); -}); diff --git a/node_modules/browserify-fs/node_modules/level-filesystem/test/ftruncate.js b/node_modules/browserify-fs/node_modules/level-filesystem/test/ftruncate.js deleted file mode 100644 index f84de1d4..00000000 --- a/node_modules/browserify-fs/node_modules/level-filesystem/test/ftruncate.js +++ /dev/null @@ -1,22 +0,0 @@ -var test = require('./helpers/test'); - -test('ftruncate', function(fs, t) { - fs.writeFile('/test', new Buffer(1), function() { - fs.open('/test', 'w', function(err, fd) { - fs.ftruncate(fd, 10000, function(err) { - fs.fstat(fd, function(err, stat) { - t.same(stat.size, 10000); - fs.ftruncate(fd, 1235, function() { - fs.fstat(fd, function(err, stat) { - t.same(stat.size, 1235); - fs.readFile('/test', function(err, buf) { - t.same(buf.length, 1235); - t.end(); - }) - }); - }); - }); - }); - }); - }); -}); diff --git a/node_modules/browserify-fs/node_modules/level-filesystem/test/futimes.js b/node_modules/browserify-fs/node_modules/level-filesystem/test/futimes.js deleted file mode 100644 index fadbba19..00000000 --- a/node_modules/browserify-fs/node_modules/level-filesystem/test/futimes.js +++ /dev/null @@ -1,24 +0,0 @@ -var test = require('./helpers/test'); - -test('futimes', function(fs, t) { - fs.writeFile('/foo', 'bar', function() { - fs.open('/foo', 'r', function(err, fd) { - fs.futimes(fd, new Date(0), new Date(0), function(err) { - t.notOk(err); - fs.fstat(fd, function(err, stat) { - t.same(stat.atime.getTime(), 0); - t.same(stat.mtime.getTime(), 0); - - fs.futimes(fd, new Date(10000), new Date(20000), function(err) { - t.notOk(err); - fs.fstat(fd, function(err, stat) { - t.same(stat.atime.getTime(), 10000); - t.same(stat.mtime.getTime(), 20000); - t.end(); - }); - }); - }); - }); - }); - }); -}); \ No newline at end of file diff --git a/node_modules/browserify-fs/node_modules/level-filesystem/test/helpers/test.js b/node_modules/browserify-fs/node_modules/level-filesystem/test/helpers/test.js deleted file mode 100644 index 7f614ee6..00000000 --- a/node_modules/browserify-fs/node_modules/level-filesystem/test/helpers/test.js +++ /dev/null @@ -1,14 +0,0 @@ -var filesystem = require('../../'); -var test = require('tape'); -var levelup = require('levelup'); -var memdown = require('memdown'); - -var reset = function() { - return filesystem(levelup('memdb', {db:memdown})); -}; - -module.exports = function(name, fn) { - test(name, function(t) { - fn(reset(), t); - }); -}; \ No newline at end of file diff --git a/node_modules/browserify-fs/node_modules/level-filesystem/test/lchmod.js b/node_modules/browserify-fs/node_modules/level-filesystem/test/lchmod.js deleted file mode 100644 index 5914846d..00000000 --- a/node_modules/browserify-fs/node_modules/level-filesystem/test/lchmod.js +++ /dev/null @@ -1,17 +0,0 @@ -var octal = require('octal') -var test = require('./helpers/test'); - -test('lchmod', function(fs, t) { - fs.mkdir('/foo', function() { - fs.symlink('/foo', '/bar', function() { - fs.lchmod('/bar', octal(755), function(err) { - t.notOk(err); - fs.lstat('/bar', function(err, stat) { - t.notOk(err); - t.same(stat.mode, octal(755)); - t.end(); - }); - }); - }); - }); -}); diff --git a/node_modules/browserify-fs/node_modules/level-filesystem/test/lchown.js b/node_modules/browserify-fs/node_modules/level-filesystem/test/lchown.js deleted file mode 100644 index 4a672ec9..00000000 --- a/node_modules/browserify-fs/node_modules/level-filesystem/test/lchown.js +++ /dev/null @@ -1,17 +0,0 @@ -var test = require('./helpers/test'); - -test('lchown', function(fs, t) { - fs.mkdir('/foo', function() { - fs.symlink('/foo', '/bar', function() { - fs.lchown('/bar', 10, 11, function(err) { - t.notOk(err); - fs.lstat('/bar', function(err, stat) { - t.notOk(err); - t.same(stat.uid, 10); - t.same(stat.gid, 11); - t.end(); - }); - }); - }); - }); -}); \ No newline at end of file diff --git a/node_modules/browserify-fs/node_modules/level-filesystem/test/link.js b/node_modules/browserify-fs/node_modules/level-filesystem/test/link.js deleted file mode 100644 index 15a0c8da..00000000 --- a/node_modules/browserify-fs/node_modules/level-filesystem/test/link.js +++ /dev/null @@ -1,55 +0,0 @@ -var test = require('./helpers/test'); - -test('link', function(fs, t) { - fs.writeFile('/test.txt', 'hello', function(err) { - fs.link('/test.txt', '/foo', function(err) { - t.ok(!err); - fs.readFile('/foo', function(err, data) { - t.same(data.toString(), 'hello'); - fs.stat('/foo', function(err, stat) { - t.same(stat.mode, 0666); - t.same(stat.size, 5); - t.ok(stat.isFile()); - t.end(); - }); - }); - }); - }); -}); - -test('link + unlink', function(fs, t) { - fs.writeFile('/test.txt', 'hello', function(err) { - fs.link('/test.txt', '/foo', function(err) { - t.ok(!err); - fs.unlink('/test.txt', function() { - fs.readFile('/foo', function(err, data) { - t.same(data.toString(), 'hello'); - fs.stat('/foo', function(err, stat) { - t.same(stat.mode, 0666); - t.same(stat.size, 5); - t.ok(stat.isFile()); - t.end(); - }); - }); - }); - }); - }); -}); - -test('link + unlink twice', function(fs, t) { - fs.writeFile('/test.txt', 'hello', function(err) { - fs.link('/test.txt', '/foo', function(err) { - t.ok(!err); - fs.unlink('/test.txt', function() { - fs.unlink('/foo', function() { - fs.writeFile('/test.txt', 'a', {flag:'a'}, function() { - fs.readFile('/test.txt', function(err, data) { - t.same(data.toString(), 'a'); - t.end(); - }); - }); - }); - }); - }); - }); -}); \ No newline at end of file diff --git a/node_modules/browserify-fs/node_modules/level-filesystem/test/lstat.js b/node_modules/browserify-fs/node_modules/level-filesystem/test/lstat.js deleted file mode 100644 index 02397cb6..00000000 --- a/node_modules/browserify-fs/node_modules/level-filesystem/test/lstat.js +++ /dev/null @@ -1,13 +0,0 @@ -var test = require('./helpers/test'); - -test('lstat', function(fs, t) { - fs.writeFile('/test.txt', 'hello', function(err) { - fs.symlink('/test.txt', '/foo', function(err) { - fs.lstat('/foo', function(err, stat) { - t.ok(!err); - t.ok(stat.isSymbolicLink()); - t.end(); - }); - }); - }); -}); diff --git a/node_modules/browserify-fs/node_modules/level-filesystem/test/mkdir.js b/node_modules/browserify-fs/node_modules/level-filesystem/test/mkdir.js deleted file mode 100644 index 95de7dca..00000000 --- a/node_modules/browserify-fs/node_modules/level-filesystem/test/mkdir.js +++ /dev/null @@ -1,45 +0,0 @@ -var octal = require('octal') -var test = require('./helpers/test'); - -test('mkdir', function(fs, t) { - fs.mkdir('/foo/bar', function(err) { - t.ok(err); - t.same(err.code, 'ENOENT'); - - fs.mkdir('/foo', function(err) { - t.notOk(err); - - fs.mkdir('/foo', function(err) { - t.ok(err); - t.same(err.code, 'EEXIST'); - - fs.mkdir('/foo/bar', function(err) { - t.notOk(err); - t.end(); - }); - }); - }); - }); -}); - -test('mkdir + stat', function(fs, t) { - fs.mkdir('/foo', function() { - fs.stat('/foo', function(err, stat) { - t.notOk(err); - t.same(stat.mode, octal(777)); - t.ok(stat.isDirectory()); - t.end(); - }); - }); -}); - -test('mkdir with modes', function(fs, t) { - fs.mkdir('/foo', 0766, function() { - fs.stat('/foo', function(err, stat) { - t.notOk(err); - t.same(stat.mode, 0766); - t.ok(stat.isDirectory()); - t.end(); - }); - }); -}); diff --git a/node_modules/browserify-fs/node_modules/level-filesystem/test/open.js b/node_modules/browserify-fs/node_modules/level-filesystem/test/open.js deleted file mode 100644 index b0a49f11..00000000 --- a/node_modules/browserify-fs/node_modules/level-filesystem/test/open.js +++ /dev/null @@ -1,33 +0,0 @@ -var test = require('./helpers/test'); - -test('open', function(fs, t) { - fs.open('/test', 'w', function(err, fd) { - t.ok(!err); - t.same(typeof fd, 'number'); - t.end() - }); -}); - -test('open not exist', function(fs, t) { - fs.open('/test', 'r', function(err, fd) { - t.ok(err); - t.same(err.code, 'ENOENT'); - fs.open('/test', 'w', function(err, fd) { - t.ok(!err); - t.same(typeof fd, 'number'); - t.end() - }); - }); -}); - -test('open w+', function(fs, t) { - fs.open('/test', 'w+', function(err, fd) { - t.ok(!err); - t.same(typeof fd, 'number'); - - fs.stat('/test', function(err, stat) { - t.ok(!err); - t.end(); - }); - }); -}); diff --git a/node_modules/browserify-fs/node_modules/level-filesystem/test/read-file.js b/node_modules/browserify-fs/node_modules/level-filesystem/test/read-file.js deleted file mode 100644 index 7f211f89..00000000 --- a/node_modules/browserify-fs/node_modules/level-filesystem/test/read-file.js +++ /dev/null @@ -1,32 +0,0 @@ -var test = require('./helpers/test'); - -test('readFile', function(fs, t) { - fs.writeFile('/test.txt', 'hello', function(err) { - fs.readFile('/test.txt', function(err, data) { - t.notOk(err); - t.ok(Buffer.isBuffer(data)); - t.same(data.toString(), 'hello'); - t.end(); - }); - }); -}); - -test('readFile + encoding', function(fs, t) { - fs.writeFile('/foo', 'hello', function(err) { - fs.readFile('/foo', 'hex', function(err, data) { - t.notOk(err); - t.same(data, '68656c6c6f'); - t.end(); - }); - }); -}); - -test('cannot readFile dir', function(fs, t) { - fs.mkdir('/test', function() { - fs.readFile('/test', function(err) { - t.ok(err); - t.same(err.code, 'EISDIR'); - t.end(); - }); - }); -}); \ No newline at end of file diff --git a/node_modules/browserify-fs/node_modules/level-filesystem/test/read-stream.js b/node_modules/browserify-fs/node_modules/level-filesystem/test/read-stream.js deleted file mode 100644 index 6f1839cb..00000000 --- a/node_modules/browserify-fs/node_modules/level-filesystem/test/read-stream.js +++ /dev/null @@ -1,47 +0,0 @@ -var test = require('./helpers/test'); -var concat = require('concat-stream'); - -test('createReadStream', function(fs, t) { - fs.writeFile('/test.txt', 'hello', function(err) { - var rs = fs.createReadStream('/test.txt'); - rs.pipe(concat(function(data) { - t.same(data, new Buffer('hello')); - t.end(); - })) - }); -}); - -test('createReadStream big file', function(fs, t) { - var big = new Buffer(100 * 1024); - - fs.writeFile('/test.txt', big, function(err) { - var rs = fs.createReadStream('/test.txt'); - rs.pipe(concat(function(data) { - t.same(data, big); - t.end(); - })) - }); -}); - -test('createReadStream random access', function(fs, t) { - fs.writeFile('/test.txt', 'hello world', function(err) { - var rs = fs.createReadStream('/test.txt', { - start: 2, - end: 5 - }); - rs.pipe(concat(function(data) { - t.same(data, new Buffer('llo ')); - t.end(); - })) - }); -}); - -test('createReadStream enoent', function(fs, t) { - var rs = fs.createReadStream('/test.txt'); - - rs.on('error', function(err) { - t.same(err.code, 'ENOENT'); - t.ok(true); - t.end(); - }); -}); \ No newline at end of file diff --git a/node_modules/browserify-fs/node_modules/level-filesystem/test/read.js b/node_modules/browserify-fs/node_modules/level-filesystem/test/read.js deleted file mode 100644 index a1c2a257..00000000 --- a/node_modules/browserify-fs/node_modules/level-filesystem/test/read.js +++ /dev/null @@ -1,39 +0,0 @@ -var test = require('./helpers/test'); - -test('read', function(fs, t) { - fs.writeFile('/test', 'hello worldy world', function() { - fs.open('/test', 'r', function(err, fd) { - var b = new Buffer(1024); - fs.read(fd, b, 0, 11, null, function(err, read) { - t.ok(!err); - t.same(read, 11); - t.same(b.slice(0, 11), new Buffer('hello world')) - fs.read(fd, b, 0, 11, null, function(err, read) { - t.ok(!err); - t.same(read, 7); - t.same(b.slice(0, 11), new Buffer('y worldorld')); - t.end(); - }); - }); - }); - }); -}); - -test('read', function(fs, t) { - fs.writeFile('/test', 'hello worldy world', function() { - fs.open('/test', 'r', function(err, fd) { - var b = new Buffer(1024); - fs.read(fd, b, 0, 11, 0, function(err, read) { - t.ok(!err); - t.same(read, 11); - t.same(b.slice(0, 11), new Buffer('hello world')) - fs.read(fd, b, 0, 11, 1, function(err, read) { - t.ok(!err); - t.same(read, 11); - t.same(b.slice(0, 11), new Buffer('ello worldy')); - t.end(); - }); - }); - }); - }); -}); \ No newline at end of file diff --git a/node_modules/browserify-fs/node_modules/level-filesystem/test/readdir.js b/node_modules/browserify-fs/node_modules/level-filesystem/test/readdir.js deleted file mode 100644 index 9356e6ff..00000000 --- a/node_modules/browserify-fs/node_modules/level-filesystem/test/readdir.js +++ /dev/null @@ -1,45 +0,0 @@ -var test = require('./helpers/test'); - -test('readdir', function(fs, t) { - fs.readdir('/', function(err, list) { - t.notOk(err); - t.same(list, []); - - fs.readdir('/foo', function(err, list) { - t.ok(err); - t.notOk(list); - t.same(err.code, 'ENOENT'); - - fs.mkdir('/foo', function() { - fs.readdir('/', function(err, list) { - t.notOk(err); - t.same(list, ['foo']); - - fs.readdir('/foo', function(err, list) { - t.notOk(err); - t.same(list, []); - t.end(); - }); - }); - }); - }); - }); -}); - -test('readdir not recursive', function(fs, t) { - fs.mkdir('/foo', function() { - fs.mkdir('/foo/bar', function() { - fs.mkdir('/foo/bar/baz', function() { - fs.readdir('/foo', function(err, list) { - t.notOk(err); - t.same(list, ['bar']); - fs.readdir('/foo/bar', function(err, list) { - t.notOk(err); - t.same(list, ['baz']); - t.end(); - }); - }); - }); - }); - }); -}); \ No newline at end of file diff --git a/node_modules/browserify-fs/node_modules/level-filesystem/test/readlink.js b/node_modules/browserify-fs/node_modules/level-filesystem/test/readlink.js deleted file mode 100644 index 4cc3e110..00000000 --- a/node_modules/browserify-fs/node_modules/level-filesystem/test/readlink.js +++ /dev/null @@ -1,13 +0,0 @@ -var test = require('./helpers/test'); - -test('readlink', function(fs, t) { - fs.writeFile('/test.txt', 'hello', function(err) { - fs.symlink('/test.txt', '/foo', function(err) { - fs.readlink('/foo', function(err, target) { - t.ok(!err); - t.same(target, '/test.txt'); - t.end(); - }); - }); - }); -}); \ No newline at end of file diff --git a/node_modules/browserify-fs/node_modules/level-filesystem/test/rename.js b/node_modules/browserify-fs/node_modules/level-filesystem/test/rename.js deleted file mode 100644 index 76c222e7..00000000 --- a/node_modules/browserify-fs/node_modules/level-filesystem/test/rename.js +++ /dev/null @@ -1,34 +0,0 @@ -var test = require('./helpers/test'); - -test('rename', function(fs, t) { - fs.mkdir('/foo', function() { - fs.rename('/foo', '/bar', function(err) { - t.notOk(err); - - fs.readdir('/', function(err, list) { - t.notOk(err); - t.same(list, ['bar']); - t.end(); - }); - }); - }); -}); - -test('rename to non empty dir', function(fs, t) { - fs.mkdir('/foo', function() { - fs.mkdir('/bar', function() { - fs.mkdir('/bar/baz', function() { - fs.rename('/foo', '/bar', function(err) { - t.ok(err); - t.same(err.code, 'ENOTEMPTY'); - - fs.readdir('/', function(err, list) { - t.notOk(err); - t.same(list.sort(), ['bar', 'foo']); - t.end(); - }); - }); - }); - }); - }); -}); \ No newline at end of file diff --git a/node_modules/browserify-fs/node_modules/level-filesystem/test/rmdir.js b/node_modules/browserify-fs/node_modules/level-filesystem/test/rmdir.js deleted file mode 100644 index 531b68e7..00000000 --- a/node_modules/browserify-fs/node_modules/level-filesystem/test/rmdir.js +++ /dev/null @@ -1,19 +0,0 @@ -var test = require('./helpers/test'); - -test('rmdir', function(fs, t) { - fs.rmdir('/', function(err) { - t.ok(err); - t.same(err.code, 'EPERM'); - - fs.mkdir('/foo', function() { - fs.rmdir('/foo', function(err) { - t.notOk(err); - fs.rmdir('/foo', function(err) { - t.ok(err); - t.same(err.code, 'ENOENT'); - t.end(); - }); - }); - }); - }); -}); diff --git a/node_modules/browserify-fs/node_modules/level-filesystem/test/stat.js b/node_modules/browserify-fs/node_modules/level-filesystem/test/stat.js deleted file mode 100644 index b3158a4f..00000000 --- a/node_modules/browserify-fs/node_modules/level-filesystem/test/stat.js +++ /dev/null @@ -1,28 +0,0 @@ -var test = require('./helpers/test'); - -test('stat root and folder', function(fs, t) { - fs.stat('/', function(err, stat) { - t.notOk(err); - t.ok(stat.isDirectory()); - t.ok(stat.mtime); - t.ok(stat.ctime); - t.ok(stat.atime); - - fs.mkdir('/foo', function() { - fs.stat('/foo', function(err, stat) { - t.notOk(err); - t.ok(stat.isDirectory()); - t.end(); - }); - }); - - }); -}); - -test('stat not exist', function(fs, t) { - fs.stat('/foo/bar', function(err) { - t.ok(err); - t.same(err.code, 'ENOENT'); - t.end(); - }); -}); \ No newline at end of file diff --git a/node_modules/browserify-fs/node_modules/level-filesystem/test/symlink.js b/node_modules/browserify-fs/node_modules/level-filesystem/test/symlink.js deleted file mode 100644 index d067286d..00000000 --- a/node_modules/browserify-fs/node_modules/level-filesystem/test/symlink.js +++ /dev/null @@ -1,54 +0,0 @@ -var test = require('./helpers/test'); - -test('symlink', function(fs, t) { - fs.writeFile('/test.txt', 'hello', function(err) { - fs.symlink('/test.txt', '/foo', function(err) { - t.ok(!err); - fs.readFile('/foo', function(err, data) { - t.same(data.toString(), 'hello'); - fs.stat('/test.txt', function(err, stat) { - t.same(stat.mode, 0666); - t.same(stat.size, 5); - t.ok(stat.isFile()); - t.end(); - }); - }); - }); - }); -}); - -test('symlink parent', function(fs, t) { - fs.mkdir('/hello', function() { - fs.writeFile('/hello/world.txt', 'hello', function(err) { - t.ok(!err) - fs.symlink('/hello', '/hi', function(err) { - t.ok(!err) - fs.readFile('/hi/world.txt', function(err, data) { - t.ok(!err) - t.same(data.toString(), 'hello') - t.end() - }) - }) - }) - }) -}); - -test('symlink unlink', function(fs, t) { - fs.writeFile('/test.txt', 'hello', function(err) { - fs.symlink('/test.txt', '/foo', function(err) { - t.ok(!err); - fs.readFile('/foo', function(err, data) { - t.same(data.toString(), 'hello'); - fs.unlink('/foo', function(err) { - t.ok(!err); - fs.stat('/test.txt', function(err, stat) { - t.same(stat.mode, 0666); - t.same(stat.size, 5); - t.ok(stat.isFile()); - t.end(); - }); - }) - }); - }); - }); -}); \ No newline at end of file diff --git a/node_modules/browserify-fs/node_modules/level-filesystem/test/truncate.js b/node_modules/browserify-fs/node_modules/level-filesystem/test/truncate.js deleted file mode 100644 index edaeae4c..00000000 --- a/node_modules/browserify-fs/node_modules/level-filesystem/test/truncate.js +++ /dev/null @@ -1,20 +0,0 @@ -var test = require('./helpers/test'); - -test('truncate', function(fs, t) { - fs.writeFile('/test', new Buffer(1), function() { - fs.truncate('/test', 10000, function(err) { - fs.stat('/test', function(err, stat) { - t.same(stat.size, 10000); - fs.truncate('/test', 1235, function() { - fs.stat('/test', function(err, stat) { - t.same(stat.size, 1235); - fs.readFile('/test', function(err, buf) { - t.same(buf.length, 1235); - t.end(); - }) - }); - }); - }); - }); - }); -}); diff --git a/node_modules/browserify-fs/node_modules/level-filesystem/test/unlink.js b/node_modules/browserify-fs/node_modules/level-filesystem/test/unlink.js deleted file mode 100644 index a976776c..00000000 --- a/node_modules/browserify-fs/node_modules/level-filesystem/test/unlink.js +++ /dev/null @@ -1,27 +0,0 @@ -var test = require('./helpers/test'); - -test('unlink', function(fs, t) { - fs.unlink('/test', function(err) { - t.ok(err); - t.same(err.code, 'ENOENT'); - fs.writeFile('/test', 'hello', function() { - fs.unlink('/test', function(err) { - t.notOk(err); - fs.exists('/test', function(exists) { - t.notOk(exists); - t.end(); - }); - }); - }); - }); -}); - -test('cannot unlink dir', function(fs, t) { - fs.mkdir('/test', function() { - fs.unlink('/test', function(err) { - t.ok(err); - t.same(err.code, 'EISDIR'); - t.end(); - }); - }); -}); \ No newline at end of file diff --git a/node_modules/browserify-fs/node_modules/level-filesystem/test/unwatch-file.js b/node_modules/browserify-fs/node_modules/level-filesystem/test/unwatch-file.js deleted file mode 100644 index f6af6b27..00000000 --- a/node_modules/browserify-fs/node_modules/level-filesystem/test/unwatch-file.js +++ /dev/null @@ -1,16 +0,0 @@ -var test = require('./helpers/test'); - -test('unwatchFile', function(fs, t) { - t.plan(1); - - fs.watchFile('/test', function() { - t.ok(true); - }); - - fs.writeFile('/test', new Buffer(1), function() { - fs.unwatchFile('/test'); - fs.truncate('/test', 10000, function() { - fs.unlink('/test'); - }); - }); -}); diff --git a/node_modules/browserify-fs/node_modules/level-filesystem/test/utimes.js b/node_modules/browserify-fs/node_modules/level-filesystem/test/utimes.js deleted file mode 100644 index f6ce410e..00000000 --- a/node_modules/browserify-fs/node_modules/level-filesystem/test/utimes.js +++ /dev/null @@ -1,22 +0,0 @@ -var test = require('./helpers/test'); - -test('utimes', function(fs, t) { - fs.mkdir('/foo', function() { - fs.utimes('/foo', new Date(0), new Date(0), function(err) { - t.notOk(err); - fs.stat('/foo', function(err, stat) { - t.same(stat.atime.getTime(), 0); - t.same(stat.mtime.getTime(), 0); - - fs.utimes('/foo', new Date(10000), new Date(20000), function(err) { - t.notOk(err); - fs.stat('/foo', function(err, stat) { - t.same(stat.atime.getTime(), 10000); - t.same(stat.mtime.getTime(), 20000); - t.end(); - }); - }); - }); - }); - }); -}); \ No newline at end of file diff --git a/node_modules/browserify-fs/node_modules/level-filesystem/test/watch-file.js b/node_modules/browserify-fs/node_modules/level-filesystem/test/watch-file.js deleted file mode 100644 index 529f4daa..00000000 --- a/node_modules/browserify-fs/node_modules/level-filesystem/test/watch-file.js +++ /dev/null @@ -1,15 +0,0 @@ -var test = require('./helpers/test'); - -test('watchFile', function(fs, t) { - t.plan(3); - - fs.watchFile('/test', function() { - t.ok(true); - }); - - fs.writeFile('/test', new Buffer(1), function() { - fs.truncate('/test', 10000, function(err) { - fs.unlink('/test'); - }); - }); -}); diff --git a/node_modules/browserify-fs/node_modules/level-filesystem/test/write-file.js b/node_modules/browserify-fs/node_modules/level-filesystem/test/write-file.js deleted file mode 100644 index fde5f492..00000000 --- a/node_modules/browserify-fs/node_modules/level-filesystem/test/write-file.js +++ /dev/null @@ -1,82 +0,0 @@ -var test = require('./helpers/test'); - -test('writeFile', function(fs, t) { - fs.writeFile('/test.txt', 'hello', function(err) { - t.notOk(err); - fs.readFile('/test.txt', function(err, data) { - t.same(data.toString(), 'hello'); - fs.stat('/test.txt', function(err, stat) { - t.same(stat.mode, 0666); - t.same(stat.size, 5); - t.ok(stat.isFile()); - t.end(); - }); - }); - }); -}); - -test('writeFile + encoding', function(fs, t) { - fs.writeFile('/foo', new Buffer('foo'), function(err) { - t.notOk(err); - fs.readFile('/foo', function(err, data) { - t.same(data.toString(), 'foo'); - fs.writeFile('/foo', '68656c6c6f', 'hex', function(err) { - t.notOk(err); - fs.readFile('/foo', function(err, data) { - t.same(data.toString(), 'hello'); - t.end(); - }); - }); - }); - }); -}); - -test('multiple writeFile', function(fs, t) { - fs.writeFile('/foo', new Buffer('foo'), function(err) { - t.notOk(err); - fs.writeFile('/foo', new Buffer('bar'), function(err) { - t.notOk(err); - fs.writeFile('/foo', new Buffer('baz'), function(err) { - t.notOk(err); - fs.readFile('/foo', function(err, data) { - t.same(data.toString(), 'baz'); - t.end(); - }); - }); - }); - }); -}); - - -test('writeFile + mode', function(fs, t) { - fs.writeFile('/foo', new Buffer('foo'), {mode:0644}, function(err) { - t.notOk(err); - fs.stat('/foo', function(err, stat) { - t.same(stat.mode, 0644); - t.end(); - }); - }); -}); - -test('overwrite file', function(fs, t) { - fs.writeFile('/test.txt', 'foo', function(err) { - t.notOk(err); - fs.writeFile('/test.txt', 'bar', function(err) { - t.notOk(err); - fs.readFile('/test.txt', function(err, data) { - t.same(data.toString(), 'bar'); - t.end(); - }); - }); - }); -}); - -test('cannot writeFile to dir', function(fs, t) { - fs.mkdir('/test', function() { - fs.writeFile('/test', 'hello', function(err) { - t.ok(err); - t.same(err.code, 'EISDIR'); - t.end(); - }); - }); -}); \ No newline at end of file diff --git a/node_modules/browserify-fs/node_modules/level-filesystem/test/write-stream.js b/node_modules/browserify-fs/node_modules/level-filesystem/test/write-stream.js deleted file mode 100644 index 04480308..00000000 --- a/node_modules/browserify-fs/node_modules/level-filesystem/test/write-stream.js +++ /dev/null @@ -1,91 +0,0 @@ -var test = require('./helpers/test'); -var concat = require('concat-stream'); - -test('createWriteStream', function(fs, t) { - var ws = fs.createWriteStream('/test.txt'); - - ws.write('hello '); - ws.write('hi '); - ws.write('ho '); - ws.write('hey '); - ws.end('world'); - - ws.on('finish', function() { - fs.readFile('/test.txt', 'utf-8', function(err, buf) { - t.ok(!err); - t.same(buf, 'hello hi ho hey world'); - t.end(); - }); - }); -}); - -test('createWriteStream big', function(fs, t) { - var ws = fs.createWriteStream('/test.txt'); - var big = new Buffer(100 * 1024); - - ws.end(big); - - ws.on('finish', function() { - fs.readFile('/test.txt', function(err, buf) { - t.ok(!err); - t.same(buf, big); - t.end(); - }); - }); -}); - -test('createWriteStream append', function(fs, t) { - var ws = fs.createWriteStream('/test.txt'); - - ws.write('hello '); - ws.end('world'); - - ws.on('finish', function() { - var ws = fs.createWriteStream('/test.txt', {flags:'a'}); - - ws.write(' hej '); - ws.end('verden'); - - ws.on('finish', function() { - - fs.readFile('/test.txt', 'utf-8', function(err, buf) { - t.ok(!err); - t.same(buf, 'hello world hej verden'); - t.end(); - }); - }); - }); -}); - -test('createWriteStream not exists', function(fs, t) { - var ws = fs.createWriteStream('/test.txt'); - - ws.write('hello '); - ws.end('world'); - - ws.on('finish', function() { - var ws = fs.createWriteStream('/test.txt', {flags:'wx'}); - - ws.write(' hej '); - ws.end('verden'); - - ws.on('error', function(err) { - t.ok(err); - t.same(err.code, 'EEXIST'); - t.end(); - }); - }); -}); - -test('createWriteStream is dir', function(fs, t) { - var ws = fs.createWriteStream('/'); - - ws.write('hello '); - ws.end('world'); - - ws.on('error', function(err) { - t.ok(err); - t.same(err.code, 'EISDIR'); - t.end(); - }); -}); \ No newline at end of file diff --git a/node_modules/browserify-fs/node_modules/level-filesystem/test/write.js b/node_modules/browserify-fs/node_modules/level-filesystem/test/write.js deleted file mode 100644 index 9ded3a40..00000000 --- a/node_modules/browserify-fs/node_modules/level-filesystem/test/write.js +++ /dev/null @@ -1,73 +0,0 @@ -var test = require('./helpers/test'); - -test('write', function(fs, t) { - fs.open('/test', 'w', function(err, fd) { - fs.write(fd, new Buffer('hello world'), 0, 11, null, function(err, written, buf) { - t.ok(!err); - t.ok(buf); - t.same(written, 11); - fs.close(fd, function() { - fs.readFile('/test', 'utf-8', function(err, buf) { - t.same(buf, 'hello world'); - t.end(); - }); - }); - }); - }); -}); - -test('write + partial', function(fs, t) { - fs.open('/test', 'w', function(err, fd) { - fs.write(fd, new Buffer('hello'), 0, 5, null, function(err, written, buf) { - fs.write(fd, new Buffer(' world'), 0, 6, null, function(err, written, buf) { - t.ok(!err); - t.ok(buf); - t.same(written, 6); - fs.close(fd, function() { - fs.readFile('/test', 'utf-8', function(err, buf) { - t.same(buf, 'hello world'); - t.end(); - }); - }); - }); - }); - }); -}); - -test('write + pos', function(fs, t) { - fs.open('/test', 'w', function(err, fd) { - fs.write(fd, new Buffer('111111'), 0, 6, 0, function() { - fs.write(fd, new Buffer('222222'), 0, 5, 0, function() { - fs.write(fd, new Buffer('333333'), 0, 4, 0, function() { - fs.write(fd, new Buffer('444444'), 0, 3, 0, function() { - fs.write(fd, new Buffer('555555'), 0, 2, 0, function() { - fs.write(fd, new Buffer('666666'), 0, 1, 0, function() { - fs.close(fd, function() { - fs.readFile('/test', 'utf-8', function(err, buf) { - t.same(buf, '654321'); - t.end(); - }); - }); - }); - }); - }); - }); - }); - }); - }); -}); - -test('write + append', function(fs, t) { - fs.writeFile('/test', 'hello world', function() { - fs.open('/test', 'a', function(err, fd) { - fs.write(fd, new Buffer(' world'), 0, 6, null, function() { - fs.close(fd, function() { - fs.readFile('/test', 'utf-8', function(err, buf) { - t.same(buf, 'hello world world'); - t.end(); - }); - }); - }); - }); - }); -}); \ No newline at end of file diff --git a/node_modules/browserify-fs/node_modules/level-filesystem/watchers.js b/node_modules/browserify-fs/node_modules/level-filesystem/watchers.js deleted file mode 100644 index f3ae159c..00000000 --- a/node_modules/browserify-fs/node_modules/level-filesystem/watchers.js +++ /dev/null @@ -1,52 +0,0 @@ -var events = require('events'); - -module.exports = function() { - var listeners = {}; - var that = new events.EventEmitter(); - - that.watch = function(key, cb) { - if (!listeners[key]) { - listeners[key] = new events.EventEmitter(); - listeners[key].setMaxListeners(0); - } - - if (cb) listeners[key].on('change', cb); - return listeners[key]; - }; - - that.watcher = function(key, cb) { - var watcher = new events.EventEmitter(); - var onchange = function() { - watcher.emit('change', 'change', key); - }; - - that.watch(key, onchange); - if (cb) watcher.on('change', cb); - watcher.close = function() { - that.unwatch(key, onchange); - }; - - return watcher; - }; - - that.unwatch = function(key, cb) { - if (!listeners[key]) return; - if (cb) listeners[key].removeListener('change', cb); - else listeners[key].removeAllListeners('change'); - if (!listeners[key].listeners('change').length) delete listeners[key];; - }; - - that.change = function(key) { - if (listeners[key]) listeners[key].emit('change'); - that.emit('change', key); - }; - - that.cb = function(key, cb) { - return function(err, val) { - if (key) that.change(key); - if (cb) cb(err, val); - }; - }; - - return that; -}; \ No newline at end of file diff --git a/node_modules/browserify-fs/node_modules/level-js/.npmignore b/node_modules/browserify-fs/node_modules/level-js/.npmignore deleted file mode 100644 index 28f1ba75..00000000 --- a/node_modules/browserify-fs/node_modules/level-js/.npmignore +++ /dev/null @@ -1,2 +0,0 @@ -node_modules -.DS_Store \ No newline at end of file diff --git a/node_modules/browserify-fs/node_modules/level-js/README.md b/node_modules/browserify-fs/node_modules/level-js/README.md deleted file mode 100644 index 03b5d08e..00000000 --- a/node_modules/browserify-fs/node_modules/level-js/README.md +++ /dev/null @@ -1,59 +0,0 @@ -![logo](logo.png) - -level.js an implementation of the [leveldown](https://github.com/rvagg/node-leveldown) API on top of [IndexedDB](https://developer.mozilla.org/en-US/docs/IndexedDB) (which is in turn implemented on top of [LevelDB](https://code.google.com/p/leveldb/), which brings this whole shebang full circle) - -**Most people use [levelup](http://github.com/rvagg/node-levelup) on top of this library. See `test-levelup.js` for details** - -For some demos of it working, see @brycebaril's presentation "Path of the NodeBases Jedi": http://brycebaril.github.io/nodebase_jedi/#/vanilla - -[![NPM](https://nodei.co/npm/level-js.png)](https://nodei.co/npm/level-js/) - -level.js uses [IDBWrapper](https://github.com/jensarps/IDBWrapper) by jensarps to ensure compatibility between IDB implementations. - -Here are the goals of this level.js: - -- Store large amounts of ascii (strings, JSON) and binary (ArrayBuffers, Typed Arrays) data in modern browsers -- Be as fast as possible -- Use the leveldown test suite and sync with [multilevel](https://github.com/juliangruber/multilevel) over either ascii or binary transports (websockets and xhr both have ascii/binary modes in browsers now) - -Being leveldown compatible means you can use many of the [level-* modules](https://github.com/rvagg/node-levelup/wiki/Modules) on top of this library. - -## install - -```sh -npm install level-js -``` - -(Not to be confused with [leveljs](https://github.com/rvagg/node-leveljs)) - -This library is best used with [browserify](http://browserify.org) - -## code examples - -```js -var leveljs = require('level-js') -var db = leveljs('bigdata') -db.open(function onOpen() { }) -``` - -The test suite for this library is in the [abstract-leveldown](https://github.com/rvagg/node-abstract-leveldown) repo and is shared between various leveldown implementations across different environments and platforms. - -For more code examples see the [abstract-leveldown test suite](https://github.com/rvagg/node-abstract-leveldown/tree/master/abstract) - -The only differences between this and leveldown is that you can store `ArrayBuffers` in this (whereas leveldown just uses node `Buffer` objects) - -## run the tests - -```sh -git clone git@github.com:maxogden/level.js.git -cd level.js -npm install -npm test -open localhost:9966 -``` - -Then look in your browser console - -## license - -BSD diff --git a/node_modules/browserify-fs/node_modules/level-js/collaborators.md b/node_modules/browserify-fs/node_modules/level-js/collaborators.md deleted file mode 100644 index 94fc582c..00000000 --- a/node_modules/browserify-fs/node_modules/level-js/collaborators.md +++ /dev/null @@ -1,10 +0,0 @@ -## Collaborators - -level.js is only possible due to the excellent work of the following collaborators: - - - - - - -
juliangruberGitHub/juliangruber
maxogdenGitHub/maxogden
mcollinaGitHub/mcollina
JamesKyburzGitHub/JamesKyburz
nolanlawsonGitHub/nolanlawson
diff --git a/node_modules/browserify-fs/node_modules/level-js/index.js b/node_modules/browserify-fs/node_modules/level-js/index.js deleted file mode 100644 index be7a0fd8..00000000 --- a/node_modules/browserify-fs/node_modules/level-js/index.js +++ /dev/null @@ -1,174 +0,0 @@ -module.exports = Level - -var IDB = require('idb-wrapper') -var AbstractLevelDOWN = require('abstract-leveldown').AbstractLevelDOWN -var util = require('util') -var Iterator = require('./iterator') -var isBuffer = require('isbuffer') -var xtend = require('xtend') -var toBuffer = require('typedarray-to-buffer') - -function Level(location) { - if (!(this instanceof Level)) return new Level(location) - if (!location) throw new Error("constructor requires at least a location argument") - this.IDBOptions = {} - this.location = location -} - -util.inherits(Level, AbstractLevelDOWN) - -Level.prototype._open = function(options, callback) { - var self = this - - var idbOpts = { - storeName: this.location, - autoIncrement: false, - keyPath: null, - onStoreReady: function () { - callback && callback(null, self.idb) - }, - onError: function(err) { - callback && callback(err) - } - } - - xtend(idbOpts, options) - this.IDBOptions = idbOpts - this.idb = new IDB(idbOpts) -} - -Level.prototype._get = function (key, options, callback) { - this.idb.get(key, function (value) { - if (value === undefined) { - // 'NotFound' error, consistent with LevelDOWN API - return callback(new Error('NotFound')) - } - // by default return buffers, unless explicitly told not to - var asBuffer = true - if (options.asBuffer === false) asBuffer = false - if (options.raw) asBuffer = false - if (asBuffer) { - if (value instanceof Uint8Array) value = toBuffer(value) - else value = new Buffer(String(value)) - } - return callback(null, value, key) - }, callback) -} - -Level.prototype._del = function(id, options, callback) { - this.idb.remove(id, callback, callback) -} - -Level.prototype._put = function (key, value, options, callback) { - if (value instanceof ArrayBuffer) { - value = toBuffer(new Uint8Array(value)) - } - var obj = this.convertEncoding(key, value, options) - if (Buffer.isBuffer(obj.value)) { - if (typeof value.toArrayBuffer === 'function') { - obj.value = new Uint8Array(value.toArrayBuffer()) - } else { - obj.value = new Uint8Array(value) - } - } - this.idb.put(obj.key, obj.value, function() { callback() }, callback) -} - -Level.prototype.convertEncoding = function(key, value, options) { - if (options.raw) return {key: key, value: value} - if (value) { - var stringed = value.toString() - if (stringed === 'NaN') value = 'NaN' - } - var valEnc = options.valueEncoding - var obj = {key: key, value: value} - if (value && (!valEnc || valEnc !== 'binary')) { - if (typeof obj.value !== 'object') { - obj.value = stringed - } - } - return obj -} - -Level.prototype.iterator = function (options) { - if (typeof options !== 'object') options = {} - return new Iterator(this.idb, options) -} - -Level.prototype._batch = function (array, options, callback) { - var op - var i - var k - var copiedOp - var currentOp - var modified = [] - - if (array.length === 0) return setTimeout(callback, 0) - - for (i = 0; i < array.length; i++) { - copiedOp = {} - currentOp = array[i] - modified[i] = copiedOp - - var converted = this.convertEncoding(currentOp.key, currentOp.value, options) - currentOp.key = converted.key - currentOp.value = converted.value - - for (k in currentOp) { - if (k === 'type' && currentOp[k] == 'del') { - copiedOp[k] = 'remove' - } else { - copiedOp[k] = currentOp[k] - } - } - } - - return this.idb.batch(modified, function(){ callback() }, callback) -} - -Level.prototype._close = function (callback) { - this.idb.db.close() - callback() -} - -Level.prototype._approximateSize = function (start, end, callback) { - var err = new Error('Not implemented') - if (callback) - return callback(err) - - throw err -} - -Level.prototype._isBuffer = function (obj) { - return Buffer.isBuffer(obj) -} - -Level.destroy = function (db, callback) { - if (typeof db === 'object') { - var prefix = db.IDBOptions.storePrefix || 'IDBWrapper-' - var dbname = db.location - } else { - var prefix = 'IDBWrapper-' - var dbname = db - } - var request = indexedDB.deleteDatabase(prefix + dbname) - request.onsuccess = function() { - callback() - } - request.onerror = function(err) { - callback(err) - } -} - -var checkKeyValue = Level.prototype._checkKeyValue = function (obj, type) { - if (obj === null || obj === undefined) - return new Error(type + ' cannot be `null` or `undefined`') - if (obj === null || obj === undefined) - return new Error(type + ' cannot be `null` or `undefined`') - if (isBuffer(obj) && obj.byteLength === 0) - return new Error(type + ' cannot be an empty ArrayBuffer') - if (String(obj) === '') - return new Error(type + ' cannot be an empty String') - if (obj.length === 0) - return new Error(type + ' cannot be an empty Array') -} diff --git a/node_modules/browserify-fs/node_modules/level-js/iterator.js b/node_modules/browserify-fs/node_modules/level-js/iterator.js deleted file mode 100644 index be6749bd..00000000 --- a/node_modules/browserify-fs/node_modules/level-js/iterator.js +++ /dev/null @@ -1,72 +0,0 @@ -var util = require('util') -var AbstractIterator = require('abstract-leveldown').AbstractIterator -var ltgt = require('ltgt') - -module.exports = Iterator - -function Iterator (db, options) { - if (!options) options = {} - this.options = options - AbstractIterator.call(this, db) - this._order = options.reverse ? 'DESC': 'ASC' - this._limit = options.limit - this._count = 0 - this._done = false - var lower = ltgt.lowerBound(options) - var upper = ltgt.upperBound(options) - try { - this._keyRange = lower || upper ? this.db.makeKeyRange({ - lower: lower, - upper: upper, - excludeLower: ltgt.lowerBoundExclusive(options), - excludeUpper: ltgt.upperBoundExclusive(options) - }) : null - } catch (e) { - // The lower key is greater than the upper key. - // IndexedDB throws an error, but we'll just return 0 results. - this._keyRangeError = true - } - this.callback = null -} - -util.inherits(Iterator, AbstractIterator) - -Iterator.prototype.createIterator = function() { - var self = this - - self.iterator = self.db.iterate(function () { - self.onItem.apply(self, arguments) - }, { - keyRange: self._keyRange, - autoContinue: false, - order: self._order, - onError: function(err) { console.log('horrible error', err) }, - }) -} - -// TODO the limit implementation here just ignores all reads after limit has been reached -// it should cancel the iterator instead but I don't know how -Iterator.prototype.onItem = function (value, cursor, cursorTransaction) { - if (!cursor && this.callback) { - this.callback() - this.callback = false - return - } - var shouldCall = true - - if (!!this._limit && this._limit > 0 && this._count++ >= this._limit) - shouldCall = false - - if (shouldCall) this.callback(false, cursor.key, cursor.value) - if (cursor) cursor['continue']() -} - -Iterator.prototype._next = function (callback) { - if (!callback) return new Error('next() requires a callback argument') - if (this._keyRangeError) return callback() - if (!this._started) { - this.createIterator() - this._started = true - } - this.callback = callback -} diff --git a/node_modules/browserify-fs/node_modules/level-js/logo.png b/node_modules/browserify-fs/node_modules/level-js/logo.png deleted file mode 100644 index bc2ac9b7..00000000 Binary files a/node_modules/browserify-fs/node_modules/level-js/logo.png and /dev/null differ diff --git a/node_modules/browserify-fs/node_modules/level-js/node_modules/abstract-leveldown/.jshintrc b/node_modules/browserify-fs/node_modules/level-js/node_modules/abstract-leveldown/.jshintrc deleted file mode 100644 index ba4514a5..00000000 --- a/node_modules/browserify-fs/node_modules/level-js/node_modules/abstract-leveldown/.jshintrc +++ /dev/null @@ -1,60 +0,0 @@ -{ - "predef": [ ] - , "bitwise": false - , "camelcase": false - , "curly": false - , "eqeqeq": false - , "forin": false - , "immed": false - , "latedef": false - , "newcap": true - , "noarg": true - , "noempty": true - , "nonew": true - , "plusplus": false - , "quotmark": true - , "regexp": false - , "undef": true - , "unused": true - , "strict": false - , "trailing": true - , "maxlen": 120 - , "asi": true - , "boss": true - , "debug": true - , "eqnull": true - , "esnext": true - , "evil": true - , "expr": true - , "funcscope": false - , "globalstrict": false - , "iterator": false - , "lastsemic": true - , "laxbreak": true - , "laxcomma": true - , "loopfunc": true - , "multistr": false - , "onecase": false - , "proto": false - , "regexdash": false - , "scripturl": true - , "smarttabs": false - , "shadow": false - , "sub": true - , "supernew": false - , "validthis": true - , "browser": true - , "couch": false - , "devel": false - , "dojo": false - , "mootools": false - , "node": true - , "nonstandard": true - , "prototypejs": false - , "rhino": false - , "worker": true - , "wsh": false - , "nomen": false - , "onevar": true - , "passfail": false -} \ No newline at end of file diff --git a/node_modules/browserify-fs/node_modules/level-js/node_modules/abstract-leveldown/.npmignore b/node_modules/browserify-fs/node_modules/level-js/node_modules/abstract-leveldown/.npmignore deleted file mode 100644 index 3c3629e6..00000000 --- a/node_modules/browserify-fs/node_modules/level-js/node_modules/abstract-leveldown/.npmignore +++ /dev/null @@ -1 +0,0 @@ -node_modules diff --git a/node_modules/browserify-fs/node_modules/level-js/node_modules/abstract-leveldown/.travis.yml b/node_modules/browserify-fs/node_modules/level-js/node_modules/abstract-leveldown/.travis.yml deleted file mode 100644 index fe3f4eb1..00000000 --- a/node_modules/browserify-fs/node_modules/level-js/node_modules/abstract-leveldown/.travis.yml +++ /dev/null @@ -1,10 +0,0 @@ -language: node_js -node_js: - - 0.8 - - "0.10" -branches: - only: - - master -notifications: - email: - - rod@vagg.org diff --git a/node_modules/browserify-fs/node_modules/level-js/node_modules/abstract-leveldown/CHANGELOG.md b/node_modules/browserify-fs/node_modules/level-js/node_modules/abstract-leveldown/CHANGELOG.md deleted file mode 100644 index 89c90135..00000000 --- a/node_modules/browserify-fs/node_modules/level-js/node_modules/abstract-leveldown/CHANGELOG.md +++ /dev/null @@ -1,18 +0,0 @@ -### 0.11.1 - Nov 15 2013 - * Adjust approximate-size-test.js to account for snappy compression - -### 0.11.0 - Oct 14 2013 - * Introduce _setupIteratorOptions() method to fix options object prior to _iterator() call; makes working with gt/gte/lt/lte options a little easier (@rvagg) - -### 0.10.2 - Sep 6 2013 - - * Refactor duplicated versions of isTypedArray into util.js (@rvagg) - * Refactor duplicated versions of 'NotFound' checks into util.js, fixed too-strict version in get-test.js (@rvagg) - -### 0.10.1 - Aug 29 2013 - - * Relax check for 'Not Found: ' in error message to be case insensitive in get-test.js (@rvagg) - -### 0.10.0 - Aug 19 2013 - - * Added test for gt, gte, lt, lte ranges (@dominictarr) diff --git a/node_modules/browserify-fs/node_modules/level-js/node_modules/abstract-leveldown/CONTRIBUTING.md b/node_modules/browserify-fs/node_modules/level-js/node_modules/abstract-leveldown/CONTRIBUTING.md deleted file mode 100644 index 2641fd0d..00000000 --- a/node_modules/browserify-fs/node_modules/level-js/node_modules/abstract-leveldown/CONTRIBUTING.md +++ /dev/null @@ -1,27 +0,0 @@ -# LevelUP is an OPEN Open Source Project - ------------------------------------------ - -## What? - -Individuals making significant and valuable contributions are given commit-access to the project to contribute as they see fit. This project is more like an open wiki than a standard guarded open source project. - -## Rules - -There are a few basic ground-rules for contributors: - -1. **No `--force` pushes** or modifying the Git history in any way. -1. **Non-master branches** ought to be used for ongoing work. -1. **External API changes and significant modifications** ought to be subject to an **internal pull-request** to solicit feedback from other contributors. -1. Internal pull-requests to solicit feedback are *encouraged* for any other non-trivial contribution but left to the discretion of the contributor. -1. Contributors should attempt to adhere to the prevailing code-style. - -## Releases - -Declaring formal releases remains the prerogative of the project maintainer. - -## Changes to this arrangement - -This is an experiment and feedback is welcome! This document may also be subject to pull-requests or changes by contributors where you believe you have something valuable to add or change. - ------------------------------------------ diff --git a/node_modules/browserify-fs/node_modules/level-js/node_modules/abstract-leveldown/LICENSE.md b/node_modules/browserify-fs/node_modules/level-js/node_modules/abstract-leveldown/LICENSE.md deleted file mode 100644 index 29b95e39..00000000 --- a/node_modules/browserify-fs/node_modules/level-js/node_modules/abstract-leveldown/LICENSE.md +++ /dev/null @@ -1,11 +0,0 @@ -The MIT License (MIT) -===================== - -Copyright (c) 2014 Rod Vagg ---------------------------- - -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/node_modules/browserify-fs/node_modules/level-js/node_modules/abstract-leveldown/README.md b/node_modules/browserify-fs/node_modules/level-js/node_modules/abstract-leveldown/README.md deleted file mode 100644 index cae74f91..00000000 --- a/node_modules/browserify-fs/node_modules/level-js/node_modules/abstract-leveldown/README.md +++ /dev/null @@ -1,159 +0,0 @@ -# Abstract LevelDOWN [![Build Status](https://secure.travis-ci.org/rvagg/abstract-leveldown.png)](http://travis-ci.org/rvagg/abstract-leveldown) - -[![NPM](https://nodei.co/npm/abstract-leveldown.png?downloads=true&downloadRank=true)](https://nodei.co/npm/abstract-leveldown/) -[![NPM](https://nodei.co/npm-dl/abstract-leveldown.png?months=6&height=3)](https://nodei.co/npm/abstract-leveldown/) - -An abstract prototype matching the **[LevelDOWN](https://github.com/rvagg/node-leveldown/)** API. Useful for extending **[LevelUP](https://github.com/rvagg/node-levelup)** functionality by providing a replacement to LevelDOWN. - -As of version 0.7, LevelUP allows you to pass a `'db'` option when you create a new instance. This will override the default LevelDOWN store with a LevelDOWN API compatible object. - -**Abstract LevelDOWN** provides a simple, operational *noop* base prototype that's ready for extending. By default, all operations have sensible "noops" (operations that essentially do nothing). For example, simple operations such as `.open(callback)` and `.close(callback)` will simply invoke the callback (on a *next tick*). More complex operations perform sensible actions, for example: `.get(key, callback)` will always return a `'NotFound'` `Error` on the callback. - -You add functionality by implementing the underscore versions of the operations. For example, to implement a `put()` operation you add a `_put()` method to your object. Each of these underscore methods override the default *noop* operations and are always provided with **consistent arguments**, regardless of what is passed in by the client. - -Additionally, all methods provide argument checking and sensible defaults for optional arguments. All bad-argument errors are compatible with LevelDOWN (they pass the LevelDOWN method arguments tests). For example, if you call `.open()` without a callback argument you'll get an `Error('open() requires a callback argument')`. Where optional arguments are involved, your underscore methods will receive sensible defaults. A `.get(key, callback)` will pass through to a `._get(key, options, callback)` where the `options` argument is an empty object. - -## Example - -A simplistic in-memory LevelDOWN replacement - -```js -var util = require('util') - , AbstractLevelDOWN = require('./').AbstractLevelDOWN - -// constructor, passes through the 'location' argument to the AbstractLevelDOWN constructor -function FakeLevelDOWN (location) { - AbstractLevelDOWN.call(this, location) -} - -// our new prototype inherits from AbstractLevelDOWN -util.inherits(FakeLevelDOWN, AbstractLevelDOWN) - -// implement some methods - -FakeLevelDOWN.prototype._open = function (options, callback) { - // initialise a memory storage object - this._store = {} - // optional use of nextTick to be a nice async citizen - process.nextTick(function () { callback(null, this) }.bind(this)) -} - -FakeLevelDOWN.prototype._put = function (key, value, options, callback) { - key = '_' + key // safety, to avoid key='__proto__'-type skullduggery - this._store[key] = value - process.nextTick(callback) -} - -FakeLevelDOWN.prototype._get = function (key, options, callback) { - var value = this._store['_' + key] - if (value === undefined) { - // 'NotFound' error, consistent with LevelDOWN API - return process.nextTick(function () { callback(new Error('NotFound')) }) - } - process.nextTick(function () { - callback(null, value) - }) -} - -FakeLevelDOWN.prototype._del = function (key, options, callback) { - delete this._store['_' + key] - process.nextTick(callback) -} - -// now use it in LevelUP - -var levelup = require('levelup') - -var db = levelup('/who/cares/', { - // the 'db' option replaces LevelDOWN - db: function (location) { return new FakeLevelDOWN(location) } -}) - -db.put('foo', 'bar', function (err) { - if (err) throw err - db.get('foo', function (err, value) { - if (err) throw err - console.log('Got foo =', value) - }) -}) -``` - -See [MemDOWN](https://github.com/rvagg/memdown/) if you are looking for a complete in-memory replacement for LevelDOWN. - -## Extensible API - -Remember that each of these methods, if you implement them, will receive exactly the number and order of arguments described. Optional arguments will be converted to sensible defaults. - -### AbstractLevelDOWN(location) -### AbstractLevelDOWN#_open(options, callback) -### AbstractLevelDOWN#_close(callback) -### AbstractLevelDOWN#_get(key, options, callback) -### AbstractLevelDOWN#_put(key, value, options, callback) -### AbstractLevelDOWN#_del(key, options, callback) -### AbstractLevelDOWN#_batch(array, options, callback) - -If `batch()` is called without argument or with only an options object then it should return a `Batch` object with chainable methods. Otherwise it will invoke a classic batch operation. - -### AbstractLevelDOWN#_chainedBatch() - -By default an `batch()` operation without argument returns a blank `AbstractChainedBatch` object. The prototype is available on the main exports for you to extend. If you want to implement chainable batch operations then you should extend the `AbstractChaindBatch` and return your object in the `_chainedBatch()` method. - -### AbstractLevelDOWN#_approximateSize(start, end, callback) -### AbstractLevelDOWN#_iterator(options) - -By default an `iterator()` operation returns a blank `AbstractIterator` object. The prototype is available on the main exports for you to extend. If you want to implement iterator operations then you should extend the `AbstractIterator` and return your object in the `_iterator(options)` method. - -`AbstractIterator` implements the basic state management found in LevelDOWN. It keeps track of when a `next()` is in progress and when an `end()` has been called so it doesn't allow concurrent `next()` calls, it does it allow `end()` while a `next()` is in progress and it doesn't allow either `next()` or `end()` after `end()` has been called. - -### AbstractIterator(db) - -Provided with the current instance of `AbstractLevelDOWN` by default. - -### AbstractIterator#_next(callback) -### AbstractIterator#_end(callback) - -### AbstractChainedBatch -Provided with the current instance of `AbstractLevelDOWN` by default. - -### AbstractChainedBatch#_put(key, value) -### AbstractChainedBatch#_del(key) -### AbstractChainedBatch#_clear() -### AbstractChainedBatch#_write(options, callback) - - -Contributing ------------- - -Abstract LevelDOWN is an **OPEN Open Source Project**. This means that: - -> Individuals making significant and valuable contributions are given commit-access to the project to contribute as they see fit. This project is more like an open wiki than a standard guarded open source project. - -See the [CONTRIBUTING.md](https://github.com/rvagg/node-levelup/blob/master/CONTRIBUTING.md) file for more details. - -### Contributors - -Abstract LevelDOWN is only possible due to the excellent work of the following contributors: - - - - - - - - - - - - - - - -
Rod VaggGitHub/rvaggTwitter/@rvagg
John ChesleyGitHub/cheslesTwitter/@chesles
Jake VerbatenGitHub/raynosTwitter/@raynos2
Dominic TarrGitHub/dominictarrTwitter/@dominictarr
Max OgdenGitHub/maxogdenTwitter/@maxogden
Lars-Magnus SkogGitHub/ralphtheninjaTwitter/@ralphtheninja
David BjörklundGitHub/keslaTwitter/@david_bjorklund
Julian GruberGitHub/juliangruberTwitter/@juliangruber
Paolo FragomeniGitHub/hij1nxTwitter/@hij1nx
Anton WhalleyGitHub/No9Twitter/@antonwhalley
Matteo CollinaGitHub/mcollinaTwitter/@matteocollina
Pedro TeixeiraGitHub/pgteTwitter/@pgte
James HallidayGitHub/substackTwitter/@substack
- - -License & copyright -------------------- - -Copyright (c) 2012-2014 Abstract LevelDOWN contributors (listed above). - -Abstract LevelDOWN is licensed under the MIT license. All rights not explicitly granted in the MIT license are reserved. See the included LICENSE.md file for more details. diff --git a/node_modules/browserify-fs/node_modules/level-js/node_modules/abstract-leveldown/abstract-chained-batch.js b/node_modules/browserify-fs/node_modules/level-js/node_modules/abstract-leveldown/abstract-chained-batch.js deleted file mode 100644 index 7e480599..00000000 --- a/node_modules/browserify-fs/node_modules/level-js/node_modules/abstract-leveldown/abstract-chained-batch.js +++ /dev/null @@ -1,81 +0,0 @@ -/* Copyright (c) 2013 Rod Vagg, MIT License */ - -function AbstractChainedBatch (db) { - this._db = db - this._operations = [] - this._written = false -} - -AbstractChainedBatch.prototype._checkWritten = function () { - if (this._written) - throw new Error('write() already called on this batch') -} - -AbstractChainedBatch.prototype.put = function (key, value) { - this._checkWritten() - - var err = this._db._checkKeyValue(key, 'key', this._db._isBuffer) - if (err) throw err - err = this._db._checkKeyValue(value, 'value', this._db._isBuffer) - if (err) throw err - - if (!this._db._isBuffer(key)) key = String(key) - if (!this._db._isBuffer(value)) value = String(value) - - if (typeof this._put == 'function' ) - this._put(key, value) - else - this._operations.push({ type: 'put', key: key, value: value }) - - return this -} - -AbstractChainedBatch.prototype.del = function (key) { - this._checkWritten() - - var err = this._db._checkKeyValue(key, 'key', this._db._isBuffer) - if (err) throw err - - if (!this._db._isBuffer(key)) key = String(key) - - if (typeof this._del == 'function' ) - this._del(key) - else - this._operations.push({ type: 'del', key: key }) - - return this -} - -AbstractChainedBatch.prototype.clear = function () { - this._checkWritten() - - this._operations = [] - - if (typeof this._clear == 'function' ) - this._clear() - - return this -} - -AbstractChainedBatch.prototype.write = function (options, callback) { - this._checkWritten() - - if (typeof options == 'function') - callback = options - if (typeof callback != 'function') - throw new Error('write() requires a callback argument') - if (typeof options != 'object') - options = {} - - this._written = true - - if (typeof this._write == 'function' ) - return this._write(callback) - - if (typeof this._db._batch == 'function') - return this._db._batch(this._operations, options, callback) - - process.nextTick(callback) -} - -module.exports = AbstractChainedBatch \ No newline at end of file diff --git a/node_modules/browserify-fs/node_modules/level-js/node_modules/abstract-leveldown/abstract-iterator.js b/node_modules/browserify-fs/node_modules/level-js/node_modules/abstract-leveldown/abstract-iterator.js deleted file mode 100644 index 04ed6a56..00000000 --- a/node_modules/browserify-fs/node_modules/level-js/node_modules/abstract-leveldown/abstract-iterator.js +++ /dev/null @@ -1,49 +0,0 @@ -/* Copyright (c) 2013 Rod Vagg, MIT License */ - -function AbstractIterator (db) { - this.db = db - this._ended = false - this._nexting = false -} - -AbstractIterator.prototype.next = function (callback) { - var self = this - - if (typeof callback != 'function') - throw new Error('next() requires a callback argument') - - if (self._ended) - return callback(new Error('cannot call next() after end()')) - if (self._nexting) - return callback(new Error('cannot call next() before previous next() has completed')) - - self._nexting = true - if (typeof self._next == 'function') { - return self._next(function () { - self._nexting = false - callback.apply(null, arguments) - }) - } - - process.nextTick(function () { - self._nexting = false - callback() - }) -} - -AbstractIterator.prototype.end = function (callback) { - if (typeof callback != 'function') - throw new Error('end() requires a callback argument') - - if (this._ended) - return callback(new Error('end() already called on iterator')) - - this._ended = true - - if (typeof this._end == 'function') - return this._end(callback) - - process.nextTick(callback) -} - -module.exports = AbstractIterator diff --git a/node_modules/browserify-fs/node_modules/level-js/node_modules/abstract-leveldown/abstract-leveldown.js b/node_modules/browserify-fs/node_modules/level-js/node_modules/abstract-leveldown/abstract-leveldown.js deleted file mode 100644 index 400a4aca..00000000 --- a/node_modules/browserify-fs/node_modules/level-js/node_modules/abstract-leveldown/abstract-leveldown.js +++ /dev/null @@ -1,256 +0,0 @@ -/* Copyright (c) 2013 Rod Vagg, MIT License */ - -var xtend = require('xtend') - , AbstractIterator = require('./abstract-iterator') - , AbstractChainedBatch = require('./abstract-chained-batch') - -function AbstractLevelDOWN (location) { - if (!arguments.length || location === undefined) - throw new Error('constructor requires at least a location argument') - - if (typeof location != 'string') - throw new Error('constructor requires a location string argument') - - this.location = location -} - -AbstractLevelDOWN.prototype.open = function (options, callback) { - if (typeof options == 'function') - callback = options - - if (typeof callback != 'function') - throw new Error('open() requires a callback argument') - - if (typeof options != 'object') - options = {} - - if (typeof this._open == 'function') - return this._open(options, callback) - - process.nextTick(callback) -} - -AbstractLevelDOWN.prototype.close = function (callback) { - if (typeof callback != 'function') - throw new Error('close() requires a callback argument') - - if (typeof this._close == 'function') - return this._close(callback) - - process.nextTick(callback) -} - -AbstractLevelDOWN.prototype.get = function (key, options, callback) { - var err - - if (typeof options == 'function') - callback = options - - if (typeof callback != 'function') - throw new Error('get() requires a callback argument') - - if (err = this._checkKeyValue(key, 'key', this._isBuffer)) - return callback(err) - - if (!this._isBuffer(key)) - key = String(key) - - if (typeof options != 'object') - options = {} - - if (typeof this._get == 'function') - return this._get(key, options, callback) - - process.nextTick(function () { callback(new Error('NotFound')) }) -} - -AbstractLevelDOWN.prototype.put = function (key, value, options, callback) { - var err - - if (typeof options == 'function') - callback = options - - if (typeof callback != 'function') - throw new Error('put() requires a callback argument') - - if (err = this._checkKeyValue(key, 'key', this._isBuffer)) - return callback(err) - - if (err = this._checkKeyValue(value, 'value', this._isBuffer)) - return callback(err) - - if (!this._isBuffer(key)) - key = String(key) - - // coerce value to string in node, don't touch it in browser - // (indexeddb can store any JS type) - if (!this._isBuffer(value) && !process.browser) - value = String(value) - - if (typeof options != 'object') - options = {} - - if (typeof this._put == 'function') - return this._put(key, value, options, callback) - - process.nextTick(callback) -} - -AbstractLevelDOWN.prototype.del = function (key, options, callback) { - var err - - if (typeof options == 'function') - callback = options - - if (typeof callback != 'function') - throw new Error('del() requires a callback argument') - - if (err = this._checkKeyValue(key, 'key', this._isBuffer)) - return callback(err) - - if (!this._isBuffer(key)) - key = String(key) - - if (typeof options != 'object') - options = {} - - if (typeof this._del == 'function') - return this._del(key, options, callback) - - process.nextTick(callback) -} - -AbstractLevelDOWN.prototype.batch = function (array, options, callback) { - if (!arguments.length) - return this._chainedBatch() - - if (typeof options == 'function') - callback = options - - if (typeof callback != 'function') - throw new Error('batch(array) requires a callback argument') - - if (!Array.isArray(array)) - return callback(new Error('batch(array) requires an array argument')) - - if (typeof options != 'object') - options = {} - - var i = 0 - , l = array.length - , e - , err - - for (; i < l; i++) { - e = array[i] - if (typeof e != 'object') - continue - - if (err = this._checkKeyValue(e.type, 'type', this._isBuffer)) - return callback(err) - - if (err = this._checkKeyValue(e.key, 'key', this._isBuffer)) - return callback(err) - - if (e.type == 'put') { - if (err = this._checkKeyValue(e.value, 'value', this._isBuffer)) - return callback(err) - } - } - - if (typeof this._batch == 'function') - return this._batch(array, options, callback) - - process.nextTick(callback) -} - -//TODO: remove from here, not a necessary primitive -AbstractLevelDOWN.prototype.approximateSize = function (start, end, callback) { - if ( start == null - || end == null - || typeof start == 'function' - || typeof end == 'function') { - throw new Error('approximateSize() requires valid `start`, `end` and `callback` arguments') - } - - if (typeof callback != 'function') - throw new Error('approximateSize() requires a callback argument') - - if (!this._isBuffer(start)) - start = String(start) - - if (!this._isBuffer(end)) - end = String(end) - - if (typeof this._approximateSize == 'function') - return this._approximateSize(start, end, callback) - - process.nextTick(function () { - callback(null, 0) - }) -} - -AbstractLevelDOWN.prototype._setupIteratorOptions = function (options) { - var self = this - - options = xtend(options) - - ;[ 'start', 'end', 'gt', 'gte', 'lt', 'lte' ].forEach(function (o) { - if (options[o] && self._isBuffer(options[o]) && options[o].length === 0) - delete options[o] - }) - - options.reverse = !!options.reverse - - // fix `start` so it takes into account gt, gte, lt, lte as appropriate - if (options.reverse && options.lt) - options.start = options.lt - if (options.reverse && options.lte) - options.start = options.lte - if (!options.reverse && options.gt) - options.start = options.gt - if (!options.reverse && options.gte) - options.start = options.gte - - if ((options.reverse && options.lt && !options.lte) - || (!options.reverse && options.gt && !options.gte)) - options.exclusiveStart = true // start should *not* include matching key - - return options -} - -AbstractLevelDOWN.prototype.iterator = function (options) { - if (typeof options != 'object') - options = {} - - options = this._setupIteratorOptions(options) - - if (typeof this._iterator == 'function') - return this._iterator(options) - - return new AbstractIterator(this) -} - -AbstractLevelDOWN.prototype._chainedBatch = function () { - return new AbstractChainedBatch(this) -} - -AbstractLevelDOWN.prototype._isBuffer = function (obj) { - return Buffer.isBuffer(obj) -} - -AbstractLevelDOWN.prototype._checkKeyValue = function (obj, type) { - - if (obj === null || obj === undefined) - return new Error(type + ' cannot be `null` or `undefined`') - - if (this._isBuffer(obj)) { - if (obj.length === 0) - return new Error(type + ' cannot be an empty Buffer') - } else if (String(obj) === '') - return new Error(type + ' cannot be an empty String') -} - -module.exports.AbstractLevelDOWN = AbstractLevelDOWN -module.exports.AbstractIterator = AbstractIterator -module.exports.AbstractChainedBatch = AbstractChainedBatch diff --git a/node_modules/browserify-fs/node_modules/level-js/node_modules/abstract-leveldown/abstract/approximate-size-test.js b/node_modules/browserify-fs/node_modules/level-js/node_modules/abstract-leveldown/abstract/approximate-size-test.js deleted file mode 100644 index b67d4287..00000000 --- a/node_modules/browserify-fs/node_modules/level-js/node_modules/abstract-leveldown/abstract/approximate-size-test.js +++ /dev/null @@ -1,121 +0,0 @@ -var db - -module.exports.setUp = function (leveldown, test, testCommon) { - test('setUp common', testCommon.setUp) - test('setUp db', function (t) { - db = leveldown(testCommon.location()) - db.open(t.end.bind(t)) - }) -} - -module.exports.args = function (test) { - test('test argument-less approximateSize() throws', function (t) { - t.throws( - db.approximateSize.bind(db) - , { name: 'Error', message: 'approximateSize() requires valid `start`, `end` and `callback` arguments' } - , 'no-arg approximateSize() throws' - ) - t.end() - }) - - test('test callback-less, 1-arg, approximateSize() throws', function (t) { - t.throws( - db.approximateSize.bind(db, 'foo') - , { name: 'Error', message: 'approximateSize() requires valid `start`, `end` and `callback` arguments' } - , 'callback-less, 1-arg approximateSize() throws' - ) - t.end() - }) - - test('test callback-less, 2-arg, approximateSize() throws', function (t) { - t.throws( - db.approximateSize.bind(db, 'foo', 'bar') - , { name: 'Error', message: 'approximateSize() requires a callback argument' } - , 'callback-less, 2-arg approximateSize() throws' - ) - t.end() - }) - - test('test callback-less, 3-arg, approximateSize() throws', function (t) { - t.throws( - db.approximateSize.bind(db, function () {}) - , { name: 'Error', message: 'approximateSize() requires valid `start`, `end` and `callback` arguments' } - , 'callback-only approximateSize() throws' - ) - t.end() - }) - - test('test callback-only approximateSize() throws', function (t) { - t.throws( - db.approximateSize.bind(db, function () {}) - , { name: 'Error', message: 'approximateSize() requires valid `start`, `end` and `callback` arguments' } - , 'callback-only approximateSize() throws' - ) - t.end() - }) - - test('test 1-arg + callback approximateSize() throws', function (t) { - t.throws( - db.approximateSize.bind(db, 'foo', function () {}) - , { name: 'Error', message: 'approximateSize() requires valid `start`, `end` and `callback` arguments' } - , '1-arg + callback approximateSize() throws' - ) - t.end() - }) -} - -module.exports.approximateSize = function (test) { - test('test approximateSize()', function (t) { - var data = Array.apply(null, Array(10000)).map(function () { - return 'aaaaaaaaaa' - }).join('') - - db.batch( - Array.apply(null, Array(10)).map(function (x, i) { - return { type: 'put', key: 'foo' + i, value: data } - }) - , function (err) { - t.notOk(err, 'no error') - - // cycle open/close to ensure a pack to .sst - - db.close(function (err) { - t.notOk(err, 'no error') - - db.open(function (err) { - t.notOk(err, 'no error') - - db.approximateSize('!', '~', function (err, size) { - t.notOk(err, 'no error') - - t.type(size, 'number') - t.ok( - size > 40000 // account for snappy compression - // original would be ~100000 - , 'size reports a reasonable amount (' + size + ')' - ) - - db.close(function (err) { - t.notOk(err, 'no error') - t.end() - }) - }) - }) - }) - } - ) - }) -} - -module.exports.tearDown = function (test, testCommon) { - test('tearDown', function (t) { - db.close(testCommon.tearDown.bind(null, t)) - }) -} - -module.exports.all = function (leveldown, test, testCommon) { - module.exports.setUp(leveldown, test, testCommon) - module.exports.args(test) - module.exports.approximateSize(test) - module.exports.tearDown(test, testCommon) -} diff --git a/node_modules/browserify-fs/node_modules/level-js/node_modules/abstract-leveldown/abstract/batch-test.js b/node_modules/browserify-fs/node_modules/level-js/node_modules/abstract-leveldown/abstract/batch-test.js deleted file mode 100644 index 45858409..00000000 --- a/node_modules/browserify-fs/node_modules/level-js/node_modules/abstract-leveldown/abstract/batch-test.js +++ /dev/null @@ -1,144 +0,0 @@ -var db - , verifyNotFoundError = require('./util').verifyNotFoundError - , isTypedArray = require('./util').isTypedArray - -module.exports.setUp = function (leveldown, test, testCommon) { - test('setUp common', testCommon.setUp) - test('setUp db', function (t) { - db = leveldown(testCommon.location()) - db.open(t.end.bind(t)) - }) -} - -module.exports.args = function (test) { - test('test callback-less, 2-arg, batch() throws', function (t) { - t.throws(db.batch.bind(db, 'foo', {}), 'callback-less, 2-arg batch() throws') - t.end() - }) - - test('test batch() with missing `value`', function (t) { - db.batch([{ type: 'put', key: 'foo1' }], function (err) { - t.equal(err.message, 'value cannot be `null` or `undefined`', 'correct error message') - t.end() - }) - }) - - test('test batch() with null `value`', function (t) { - db.batch([{ type: 'put', key: 'foo1', value: null }], function (err) { - t.equal(err.message, 'value cannot be `null` or `undefined`', 'correct error message') - t.end() - }) - }) - - test('test batch() with missing `key`', function (t) { - db.batch([{ type: 'put', value: 'foo1' }], function (err) { - t.equal(err.message, 'key cannot be `null` or `undefined`', 'correct error message') - t.end() - }) - }) - - test('test batch() with null `key`', function (t) { - db.batch([{ type: 'put', key: null, value: 'foo1' }], function (err) { - t.equal(err.message, 'key cannot be `null` or `undefined`', 'correct error message') - t.end() - }) - }) - - test('test batch() with missing `key` and `value`', function (t) { - db.batch([{ type: 'put' }], function (err) { - t.equal(err.message, 'key cannot be `null` or `undefined`', 'correct error message') - t.end() - }) - }) -} - -module.exports.batch = function (test) { - test('test batch() with empty array', function (t) { - db.batch([], function (err) { - t.notOk(err, 'no error') - t.end() - }) - }) - - test('test simple batch()', function (t) { - db.batch([{ type: 'put', key: 'foo', value: 'bar' }], function (err) { - t.notOk(err, 'no error') - - db.get('foo', function (err, value) { - t.notOk(err, 'no error') - var result - if (isTypedArray(value)) { - result = String.fromCharCode.apply(null, new Uint16Array(value)) - } else { - t.ok(typeof Buffer != 'undefined' && value instanceof Buffer) - result = value.toString() - } - t.equal(result, 'bar') - t.end() - }) - }) - }) - - test('test multiple batch()', function (t) { - db.batch([ - { type: 'put', key: 'foobatch1', value: 'bar1' } - , { type: 'put', key: 'foobatch2', value: 'bar2' } - , { type: 'put', key: 'foobatch3', value: 'bar3' } - , { type: 'del', key: 'foobatch2' } - ], function (err) { - t.notOk(err, 'no error') - - var r = 0 - , done = function () { - if (++r == 3) - t.end() - } - - db.get('foobatch1', function (err, value) { - t.notOk(err, 'no error') - var result - if (isTypedArray(value)) { - result = String.fromCharCode.apply(null, new Uint16Array(value)) - } else { - t.ok(typeof Buffer != 'undefined' && value instanceof Buffer) - result = value.toString() - } - t.equal(result, 'bar1') - done() - }) - - db.get('foobatch2', function (err, value) { - t.ok(err, 'entry not found') - t.ok(typeof value == 'undefined', 'value is undefined') - t.ok(verifyNotFoundError(err), 'NotFound error') - done() - }) - - db.get('foobatch3', function (err, value) { - t.notOk(err, 'no error') - var result - if (isTypedArray(value)) { - result = String.fromCharCode.apply(null, new Uint16Array(value)) - } else { - t.ok(typeof Buffer != 'undefined' && value instanceof Buffer) - result = value.toString() - } - t.equal(result, 'bar3') - done() - }) - }) - }) -} - -module.exports.tearDown = function (test, testCommon) { - test('tearDown', function (t) { - db.close(testCommon.tearDown.bind(null, t)) - }) -} - -module.exports.all = function (leveldown, test, testCommon) { - module.exports.setUp(leveldown, test, testCommon) - module.exports.args(test) - module.exports.batch(test) - module.exports.tearDown(test, testCommon) -} diff --git a/node_modules/browserify-fs/node_modules/level-js/node_modules/abstract-leveldown/abstract/chained-batch-test.js b/node_modules/browserify-fs/node_modules/level-js/node_modules/abstract-leveldown/abstract/chained-batch-test.js deleted file mode 100644 index b38a68db..00000000 --- a/node_modules/browserify-fs/node_modules/level-js/node_modules/abstract-leveldown/abstract/chained-batch-test.js +++ /dev/null @@ -1,222 +0,0 @@ -var db - -module.exports.setUp = function (leveldown, test, testCommon) { - test('setUp common', testCommon.setUp) - test('setUp db', function (t) { - db = leveldown(testCommon.location()) - db.open(t.end.bind(t)) - }) -} - -module.exports.args = function (test) { - test('test batch#put() with missing `value`', function (t) { - try { - db.batch().put('foo1') - } catch (err) { - t.equal(err.message, 'value cannot be `null` or `undefined`', 'correct error message') - return t.end() - } - t.fail('should have thrown') - t.end() - }) - - test('test batch#put() with null `value`', function (t) { - try { - db.batch().put('foo1', null) - } catch (err) { - t.equal(err.message, 'value cannot be `null` or `undefined`', 'correct error message') - return t.end() - } - t.fail('should have thrown') - t.end() - }) - - test('test batch#put() with missing `key`', function (t) { - try { - db.batch().put(undefined, 'foo1') - } catch (err) { - t.equal(err.message, 'key cannot be `null` or `undefined`', 'correct error message') - return t.end() - } - t.fail('should have thrown') - t.end() - }) - - test('test batch#put() with null `key`', function (t) { - try { - db.batch().put(null, 'foo1') - } catch (err) { - t.equal(err.message, 'key cannot be `null` or `undefined`', 'correct error message') - return t.end() - } - t.fail('should have thrown') - t.end() - }) - - test('test batch#put() with missing `key` and `value`', function (t) { - try { - db.batch().put() - } catch (err) { - t.equal(err.message, 'key cannot be `null` or `undefined`', 'correct error message') - return t.end() - } - t.fail('should have thrown') - t.end() - }) - - test('test batch#del() with missing `key`', function (t) { - try { - db.batch().del() - } catch (err) { - t.equal(err.message, 'key cannot be `null` or `undefined`', 'correct error message') - return t.end() - } - t.fail('should have thrown') - t.end() - }) - - test('test batch#del() with null `key`', function (t) { - try { - db.batch().del(null) - } catch (err) { - t.equal(err.message, 'key cannot be `null` or `undefined`', 'correct error message') - return t.end() - } - t.fail('should have thrown') - t.end() - }) - - test('test batch#del() with null `key`', function (t) { - try { - db.batch().del(null) - } catch (err) { - t.equal(err.message, 'key cannot be `null` or `undefined`', 'correct error message') - return t.end() - } - t.fail('should have thrown') - t.end() - }) - - test('test batch#clear() doesn\'t throw', function (t) { - db.batch().clear() - t.end() - }) - - test('test batch#write() with no callback', function (t) { - try { - db.batch().write() - } catch (err) { - t.equal(err.message, 'write() requires a callback argument', 'correct error message') - return t.end() - } - t.fail('should have thrown') - t.end() - }) - - test('test batch#put() after write()', function (t) { - var batch = db.batch().put('foo', 'bar') - batch.write(function () {}) - try { - batch.put('boom', 'bang') - } catch (err) { - t.equal(err.message, 'write() already called on this batch', 'correct error message') - return t.end() - } - t.fail('should have thrown') - t.end() - }) - - test('test batch#del() after write()', function (t) { - var batch = db.batch().put('foo', 'bar') - batch.write(function () {}) - try { - batch.del('foo') - } catch (err) { - t.equal(err.message, 'write() already called on this batch', 'correct error message') - return t.end() - } - t.fail('should have thrown') - t.end() - }) - - test('test batch#clear() after write()', function (t) { - var batch = db.batch().put('foo', 'bar') - batch.write(function () {}) - try { - batch.clear() - } catch (err) { - t.equal(err.message, 'write() already called on this batch', 'correct error message') - return t.end() - } - t.fail('should have thrown') - t.end() - }) - - test('test batch#write() after write()', function (t) { - var batch = db.batch().put('foo', 'bar') - batch.write(function () {}) - try { - batch.write(function (err) {}) - } catch (err) { - t.equal(err.message, 'write() already called on this batch', 'correct error message') - return t.end() - } - t.fail('should have thrown') - t.end() - }) -} - -module.exports.batch = function (test, testCommon) { - test('test basic batch', function (t) { - db.batch( - [ - { type: 'put', key: 'one', value: '1' } - , { type: 'put', key: 'two', value: '2' } - , { type: 'put', key: 'three', value: '3' } - ] - , function (err) { - t.notOk(err, 'no error') - - db.batch() - .put('1', 'one') - .del('2', 'two') - .put('3', 'three') - .clear() - .put('one', 'I') - .put('two', 'II') - .del('three') - .put('foo', 'bar') - .write(function (err) { - t.notOk(err, 'no error') - testCommon.collectEntries( - db.iterator({ keyAsBuffer: false, valueAsBuffer: false }) - , function (err, data) { - t.notOk(err, 'no error') - t.equal(data.length, 3, 'correct number of entries') - var expected = [ - { key: 'foo', value: 'bar' } - , { key: 'one', value: 'I' } - , { key: 'two', value: 'II' } - ] - t.deepEqual(data, expected) - t.end() - } - ) - }) - } - ) - }) -} - -module.exports.tearDown = function (test, testCommon) { - test('tearDown', function (t) { - db.close(testCommon.tearDown.bind(null, t)) - }) -} - -module.exports.all = function (leveldown, test, testCommon) { - module.exports.setUp(leveldown, test, testCommon) - module.exports.args(test) - module.exports.batch(test, testCommon) - module.exports.tearDown(test, testCommon) -} \ No newline at end of file diff --git a/node_modules/browserify-fs/node_modules/level-js/node_modules/abstract-leveldown/abstract/close-test.js b/node_modules/browserify-fs/node_modules/level-js/node_modules/abstract-leveldown/abstract/close-test.js deleted file mode 100644 index 7492c492..00000000 --- a/node_modules/browserify-fs/node_modules/level-js/node_modules/abstract-leveldown/abstract/close-test.js +++ /dev/null @@ -1,24 +0,0 @@ -module.exports.close = function (leveldown, test, testCommon) { - test('test close()', function (t) { - var db = leveldown(testCommon.location()) - - db.open(function (err) { - t.notOk(err, 'no error') - t.throws( - db.close.bind(db) - , { name: 'Error', message: 'close() requires a callback argument' } - , 'no-arg close() throws' - ) - t.throws( - db.close.bind(db, 'foo') - , { name: 'Error', message: 'close() requires a callback argument' } - , 'non-callback close() throws' - ) - - db.close(function (err) { - t.notOk(err, 'no error') - t.end() - }) - }) - }) -} \ No newline at end of file diff --git a/node_modules/browserify-fs/node_modules/level-js/node_modules/abstract-leveldown/abstract/del-test.js b/node_modules/browserify-fs/node_modules/level-js/node_modules/abstract-leveldown/abstract/del-test.js deleted file mode 100644 index 8a70e7d7..00000000 --- a/node_modules/browserify-fs/node_modules/level-js/node_modules/abstract-leveldown/abstract/del-test.js +++ /dev/null @@ -1,77 +0,0 @@ -var db - , verifyNotFoundError = require('./util').verifyNotFoundError - , isTypedArray = require('./util').isTypedArray - -module.exports.setUp = function (leveldown, test, testCommon) { - test('setUp common', testCommon.setUp) - test('setUp db', function (t) { - db = leveldown(testCommon.location()) - db.open(t.end.bind(t)) - }) -} - -module.exports.args = function (test) { - test('test argument-less del() throws', function (t) { - t.throws( - db.del.bind(db) - , { name: 'Error', message: 'del() requires a callback argument' } - , 'no-arg del() throws' - ) - t.end() - }) - - test('test callback-less, 1-arg, del() throws', function (t) { - t.throws( - db.del.bind(db, 'foo') - , { name: 'Error', message: 'del() requires a callback argument' } - , 'callback-less, 1-arg del() throws' - ) - t.end() - }) - - test('test callback-less, 3-arg, del() throws', function (t) { - t.throws( - db.del.bind(db, 'foo', {}) - , { name: 'Error', message: 'del() requires a callback argument' } - , 'callback-less, 2-arg del() throws' - ) - t.end() - }) -} - -module.exports.del = function (test) { - test('test simple del()', function (t) { - db.put('foo', 'bar', function (err) { - t.notOk(err, 'no error') - db.del('foo', function (err) { - t.notOk(err, 'no error') - db.get('foo', function (err) { - t.ok(err, 'entry propertly deleted') - t.ok(typeof value == 'undefined', 'value is undefined') - t.ok(verifyNotFoundError(err), 'NotFound error') - t.end() - }) - }) - }) - }) - - test('test del on non-existent key', function (t) { - db.del('blargh', function (err) { - t.notOk(err, 'should not error on delete') - t.end() - }) - }) -} - -module.exports.tearDown = function (test, testCommon) { - test('tearDown', function (t) { - db.close(testCommon.tearDown.bind(null, t)) - }) -} - -module.exports.all = function (leveldown, test, testCommon) { - module.exports.setUp(leveldown, test, testCommon) - module.exports.args(test) - module.exports.del(test) - module.exports.tearDown(test, testCommon) -} diff --git a/node_modules/browserify-fs/node_modules/level-js/node_modules/abstract-leveldown/abstract/get-test.js b/node_modules/browserify-fs/node_modules/level-js/node_modules/abstract-leveldown/abstract/get-test.js deleted file mode 100644 index 2b865f0b..00000000 --- a/node_modules/browserify-fs/node_modules/level-js/node_modules/abstract-leveldown/abstract/get-test.js +++ /dev/null @@ -1,125 +0,0 @@ -var db - , verifyNotFoundError = require('./util').verifyNotFoundError - , isTypedArray = require('./util').isTypedArray - -module.exports.setUp = function (leveldown, test, testCommon) { - test('setUp common', testCommon.setUp) - test('setUp db', function (t) { - db = leveldown(testCommon.location()) - db.open(t.end.bind(t)) - }) -} - -module.exports.args = function (test) { - test('test argument-less get() throws', function (t) { - t.throws( - db.get.bind(db) - , { name: 'Error', message: 'get() requires a callback argument' } - , 'no-arg get() throws' - ) - t.end() - }) - - test('test callback-less, 1-arg, get() throws', function (t) { - t.throws( - db.get.bind(db, 'foo') - , { name: 'Error', message: 'get() requires a callback argument' } - , 'callback-less, 1-arg get() throws' - ) - t.end() - }) - - test('test callback-less, 3-arg, get() throws', function (t) { - t.throws( - db.get.bind(db, 'foo', {}) - , { name: 'Error', message: 'get() requires a callback argument' } - , 'callback-less, 2-arg get() throws' - ) - t.end() - }) -} - -module.exports.get = function (test) { - test('test simple get()', function (t) { - db.put('foo', 'bar', function (err) { - t.notOk(err, 'no error') - db.get('foo', function (err, value) { - t.notOk(err, 'no error') - t.ok(typeof value !== 'string', 'should not be string by default') - - var result - if (isTypedArray(value)) { - result = String.fromCharCode.apply(null, new Uint16Array(value)) - } else { - t.ok(typeof Buffer != 'undefined' && value instanceof Buffer) - result = value.toString() - } - - t.equal(result, 'bar') - - db.get('foo', {}, function (err, value) { // same but with {} - t.notOk(err, 'no error') - t.ok(typeof value !== 'string', 'should not be string by default') - - var result - if (isTypedArray(value)) { - result = String.fromCharCode.apply(null, new Uint16Array(value)) - } else { - t.ok(typeof Buffer != 'undefined' && value instanceof Buffer) - result = value.toString() - } - - t.equal(result, 'bar') - - db.get('foo', { asBuffer: false }, function (err, value) { - t.notOk(err, 'no error') - t.ok(typeof value === 'string', 'should be string if not buffer') - t.equal(value, 'bar') - t.end() - }) - }) - }) - }) - }) - - test('test simultaniously get()', function (t) { - db.put('hello', 'world', function (err) { - t.notOk(err, 'should not error') - var r = 0 - , done = function () { - if (++r == 20) - t.end() - } - , i = 0 - , j = 0 - - for (; i < 10; ++i) - db.get('hello', function(err, value) { - t.notOk(err, 'should not error') - t.equal(value.toString(), 'world') - done() - }) - - for (; j < 10; ++j) - db.get('not found', function(err, value) { - t.ok(err, 'should error') - t.ok(verifyNotFoundError(err), 'should have correct error message') - t.ok(typeof value == 'undefined', 'value is undefined') - done() - }) - }) - }) -} - -module.exports.tearDown = function (test, testCommon) { - test('tearDown', function (t) { - db.close(testCommon.tearDown.bind(null, t)) - }) -} - -module.exports.all = function (leveldown, test, testCommon) { - module.exports.setUp(leveldown, test, testCommon) - module.exports.args(test) - module.exports.get(test) - module.exports.tearDown(test, testCommon) -} \ No newline at end of file diff --git a/node_modules/browserify-fs/node_modules/level-js/node_modules/abstract-leveldown/abstract/iterator-test.js b/node_modules/browserify-fs/node_modules/level-js/node_modules/abstract-leveldown/abstract/iterator-test.js deleted file mode 100644 index 97b3e6b7..00000000 --- a/node_modules/browserify-fs/node_modules/level-js/node_modules/abstract-leveldown/abstract/iterator-test.js +++ /dev/null @@ -1,487 +0,0 @@ -var db - , sourceData = (function () { - var d = [] - , i = 0 - , k - for (; i < 100; i++) { - k = (i < 10 ? '0' : '') + i - d.push({ - type : 'put' - , key : k - , value : Math.random() - }) - } - return d - }()) - , transformSource = function (d) { - return { key: d.key, value: String(d.value) } - } - -module.exports.sourceData = sourceData -module.exports.transformSource = transformSource - -module.exports.setUp = function (leveldown, test, testCommon) { - test('setUp common', testCommon.setUp) - test('setUp db', function (t) { - db = leveldown(testCommon.location()) - db.open(t.end.bind(t)) - }) -} - -module.exports.args = function (test) { - test('test argument-less iterator#next() throws', function (t) { - var iterator = db.iterator() - t.throws( - iterator.next.bind(iterator) - , { name: 'Error', message: 'next() requires a callback argument' } - , 'no-arg iterator#next() throws' - ) - iterator.end(t.end.bind(t)) - }) - - test('test argument-less iterator#end() after next() throws', function (t) { - var iterator = db.iterator() - iterator.next(function () { - t.throws( - iterator.end.bind(iterator) - , { name: 'Error', message: 'end() requires a callback argument' } - , 'no-arg iterator#end() throws' - ) - iterator.end(t.end.bind(t)) - }) - }) - - test('test argument-less iterator#end() throws', function (t) { - var iterator = db.iterator() - t.throws( - iterator.end.bind(iterator) - , { name: 'Error', message: 'end() requires a callback argument' } - , 'no-arg iterator#end() throws' - ) - iterator.end(t.end.bind(t)) - }) -} - -module.exports.sequence = function (test) { - test('test twice iterator#end() callback with error', function (t) { - var iterator = db.iterator() - iterator.end(function (err) { - t.notOk(err, 'no error') - iterator.end(function(err2) { - t.ok(err2, 'returned error') - t.equal(err2.name, 'Error', 'correct error') - t.equal(err2.message, 'end() already called on iterator') - t.end() - }) - }) - }) - - test('test iterator#next after iterator#end() callback with error', function (t) { - var iterator = db.iterator() - iterator.end(function (err) { - t.notOk(err, 'no error') - iterator.next(function(err2) { - t.ok(err2, 'returned error') - t.equal(err2.name, 'Error', 'correct error') - t.equal(err2.message, 'cannot call next() after end()', 'correct message') - t.end() - }) - }) - }) - - test('test twice iterator#next() throws', function (t) { - var iterator = db.iterator() - iterator.next(function (err) { - t.notOk(err, 'no error') - iterator.end(function (err) { - t.notOk(err, 'no error') - t.end() - }) - }) - - iterator.next(function(err) { - t.ok(err, 'returned error') - t.equal(err.name, 'Error', 'correct error') - t.equal(err.message, 'cannot call next() before previous next() has completed') - }) - }) -} - -module.exports.iterator = function (leveldown, test, testCommon, collectEntries) { - test('test simple iterator()', function (t) { - var data = [ - { type: 'put', key: 'foobatch1', value: 'bar1' } - , { type: 'put', key: 'foobatch2', value: 'bar2' } - , { type: 'put', key: 'foobatch3', value: 'bar3' } - ] - , idx = 0 - - db.batch(data, function (err) { - t.notOk(err, 'no error') - var iterator = db.iterator() - , fn = function (err, key, value) { - t.notOk(err, 'no error') - if (key && value) { - t.ok(Buffer.isBuffer(key), 'key argument is a Buffer') - t.ok(Buffer.isBuffer(value), 'value argument is a Buffer') - t.equal(key.toString(), data[idx].key, 'correct key') - t.equal(value.toString(), data[idx].value, 'correct value') - process.nextTick(next) - idx++ - } else { // end - t.ok(typeof err === 'undefined', 'err argument is undefined') - t.ok(typeof key === 'undefined', 'key argument is undefined') - t.ok(typeof value === 'undefined', 'value argument is undefined') - t.equal(idx, data.length, 'correct number of entries') - iterator.end(function () { - t.end() - }) - } - } - , next = function () { - iterator.next(fn) - } - - next() - }) - }) - - /** the following tests are mirroring the same series of tests in - * LevelUP read-stream-test.js - */ - - test('setUp #2', function (t) { - db.close(function () { - db = leveldown(testCommon.location()) - db.open(function () { - db.batch(sourceData, t.end.bind(t)) - }) - }) - }) - - test('test full data collection', function (t) { - collectEntries(db.iterator({ keyAsBuffer: false, valueAsBuffer: false }), function (err, data) { - t.notOk(err, 'no error') - t.equal(data.length, sourceData.length, 'correct number of entries') - var expected = sourceData.map(transformSource) - t.deepEqual(data, expected) - t.end() - }) - }) - - test('test iterator with reverse=true', function (t) { - collectEntries(db.iterator({ keyAsBuffer: false, valueAsBuffer: false, reverse: true }), function (err, data) { - t.notOk(err, 'no error') - t.equal(data.length, sourceData.length, 'correct number of entries') - var expected = sourceData.slice().reverse().map(transformSource) - t.deepEqual(data, expected) - t.end() - }) - }) - - test('test iterator with start=0', function (t) { - collectEntries(db.iterator({ keyAsBuffer: false, valueAsBuffer: false, start: '00' }), function (err, data) { - t.notOk(err, 'no error') - t.equal(data.length, sourceData.length, 'correct number of entries') - var expected = sourceData.map(transformSource) - t.deepEqual(data, expected) - t.end() - }) - }) - - test('test iterator with start=50', function (t) { - collectEntries(db.iterator({ keyAsBuffer: false, valueAsBuffer: false, start: '50' }), function (err, data) { - t.notOk(err, 'no error') - t.equal(data.length, 50, 'correct number of entries') - var expected = sourceData.slice(50).map(transformSource) - t.deepEqual(data, expected) - t.end() - }) - }) - - test('test iterator with start=50 and reverse=true', function (t) { - collectEntries(db.iterator({ keyAsBuffer: false, valueAsBuffer: false, start: '50', reverse: true }), function (err, data) { - t.notOk(err, 'no error') - t.equal(data.length, 51, 'correct number of entries') - var expected = sourceData.slice().reverse().slice(49).map(transformSource) - t.deepEqual(data, expected) - t.end() - }) - }) - - test('test iterator with start being a midway key (49.5)', function (t) { - collectEntries(db.iterator({ keyAsBuffer: false, valueAsBuffer: false, start: '49.5' }), function (err, data) { - t.notOk(err, 'no error') - t.equal(data.length, 50, 'correct number of entries') - var expected = sourceData.slice(50).map(transformSource) - t.deepEqual(data, expected) - t.end() - }) - }) - - test('test iterator with start being a midway key (49999)', function (t) { - collectEntries(db.iterator({ keyAsBuffer: false, valueAsBuffer: false, start: '49999' }), function (err, data) { - t.notOk(err, 'no error') - t.equal(data.length, 50, 'correct number of entries') - var expected = sourceData.slice(50).map(transformSource) - t.deepEqual(data, expected) - t.end() - }) - }) - - test('test iterator with start being a midway key and reverse=true', function (t) { - collectEntries(db.iterator({ keyAsBuffer: false, valueAsBuffer: false, start: '49.5', reverse: true }), function (err, data) { - t.notOk(err, 'no error') - t.equal(data.length, 50, 'correct number of entries') - var expected = sourceData.slice().reverse().slice(50).map(transformSource) - t.deepEqual(data, expected) - t.end() - }) - }) - - test('test iterator with end=50', function (t) { - collectEntries(db.iterator({ keyAsBuffer: false, valueAsBuffer: false, end: '50' }), function (err, data) { - t.notOk(err, 'no error') - t.equal(data.length, 51, 'correct number of entries') - var expected = sourceData.slice(0, 51).map(transformSource) - t.deepEqual(data, expected) - t.end() - }) - }) - - test('test iterator with end being a midway key (50.5)', function (t) { - collectEntries(db.iterator({ keyAsBuffer: false, valueAsBuffer: false, end: '50.5' }), function (err, data) { - t.notOk(err, 'no error') - t.equal(data.length, 51, 'correct number of entries') - var expected = sourceData.slice(0, 51).map(transformSource) - t.deepEqual(data, expected) - t.end() - }) - }) - - test('test iterator with end being a midway key (50555)', function (t) { - collectEntries(db.iterator({ keyAsBuffer: false, valueAsBuffer: false, end: '50555' }), function (err, data) { - t.notOk(err, 'no error') - t.equal(data.length, 51, 'correct number of entries') - var expected = sourceData.slice(0, 51).map(transformSource) - t.deepEqual(data, expected) - t.end() - }) - }) - - test('test iterator with end being a midway key and reverse=true', function (t) { - collectEntries(db.iterator({ keyAsBuffer: false, valueAsBuffer: false, end: '50.5', reverse: true }), function (err, data) { - t.notOk(err, 'no error') - t.equal(data.length, 49, 'correct number of entries') - var expected = sourceData.slice().reverse().slice(0, 49).map(transformSource) - t.deepEqual(data, expected) - t.end() - }) - }) - - // end='0', starting key is actually '00' so it should avoid it - test('test iterator with end=0', function (t) { - collectEntries(db.iterator({ keyAsBuffer: false, valueAsBuffer: false, end: '0' }), function (err, data) { - t.notOk(err, 'no error') - t.equal(data.length, 0, 'correct number of entries') - t.end() - }) - }) - - test('test iterator with start=30 and end=70', function (t) { - collectEntries(db.iterator({ keyAsBuffer: false, valueAsBuffer: false, start: '30', end: '70' }), function (err, data) { - t.notOk(err, 'no error') - t.equal(data.length, 41, 'correct number of entries') - var expected = sourceData.slice(30, 71).map(transformSource) - t.deepEqual(data, expected) - t.end() - }) - }) - - test('test iterator with start=30 and end=70 and reverse=true', function (t) { - collectEntries(db.iterator({ keyAsBuffer: false, valueAsBuffer: false, start: '70', end: '30', reverse: true }), function (err, data) { - t.notOk(err, 'no error') - t.equal(data.length, 41, 'correct number of entries') - var expected = sourceData.slice().reverse().slice(29, 70).map(transformSource) - t.deepEqual(data, expected) - t.end() - }) - }) - - test('test iterator with limit=20', function (t) { - collectEntries(db.iterator({ keyAsBuffer: false, valueAsBuffer: false, limit: 20 }), function (err, data) { - t.notOk(err, 'no error') - t.equal(data.length, 20, 'correct number of entries') - var expected = sourceData.slice(0, 20).map(transformSource) - t.deepEqual(data, expected) - t.end() - }) - }) - - test('test iterator with limit=20 and start=20', function (t) { - collectEntries(db.iterator({ keyAsBuffer: false, valueAsBuffer: false, start: '20', limit: 20 }), function (err, data) { - t.notOk(err, 'no error') - t.equal(data.length, 20, 'correct number of entries') - var expected = sourceData.slice(20, 40).map(transformSource) - t.deepEqual(data, expected) - t.end() - }) - }) - - test('test iterator with limit=20 and reverse=true', function (t) { - collectEntries(db.iterator({ keyAsBuffer: false, valueAsBuffer: false, limit: 20, reverse: true }), function (err, data) { - t.notOk(err, 'no error') - t.equal(data.length, 20, 'correct number of entries') - var expected = sourceData.slice().reverse().slice(0, 20).map(transformSource) - t.deepEqual(data, expected) - t.end() - }) - }) - - test('test iterator with limit=20 and start=20 and reverse=true', function (t) { - collectEntries(db.iterator({ keyAsBuffer: false, valueAsBuffer: false, start: '79', limit: 20, reverse: true }), function (err, data) { - t.notOk(err, 'no error') - t.equal(data.length, 20, 'correct number of entries') - var expected = sourceData.slice().reverse().slice(20, 40).map(transformSource) - t.deepEqual(data, expected) - t.end() - }) - }) - - // the default limit value from levelup is -1 - test('test iterator with limit=-1 should iterate over whole database', function (t) { - collectEntries(db.iterator({ keyAsBuffer: false, valueAsBuffer: false, limit: -1}), function (err, data) { - t.notOk(err, 'no error') - t.equal(data.length, sourceData.length, 'correct number of entries') - var expected = sourceData.map(transformSource) - t.deepEqual(data, expected) - t.end() - }) - }) - - test('test iterator with end after limit', function (t) { - collectEntries(db.iterator({ keyAsBuffer: false, valueAsBuffer: false, limit: 20, end: '50' }), function (err, data) { - t.notOk(err, 'no error') - t.equal(data.length, 20, 'correct number of entries') - var expected = sourceData.slice(0, 20).map(transformSource) - t.deepEqual(data, expected) - t.end() - }) - }) - - test('test iterator with end before limit', function (t) { - collectEntries(db.iterator({ keyAsBuffer: false, valueAsBuffer: false, limit: 50, end: '19' }), function (err, data) { - t.notOk(err, 'no error') - t.equal(data.length, 20, 'correct number of entries') - var expected = sourceData.slice(0, 20).map(transformSource) - t.deepEqual(data, expected) - t.end() - }) - }) - - test('test iterator with start after database end', function (t) { - collectEntries(db.iterator({ keyAsBuffer: false, valueAsBuffer: false, start: '9a' }), function (err, data) { - t.notOk(err, 'no error') - t.equal(data.length, 0, 'correct number of entries') - t.end() - }) - }) - - test('test iterator with start after database end and reverse=true', function (t) { - collectEntries(db.iterator({ keyAsBuffer: false, valueAsBuffer: false, start: '9a', reverse: true }), function (err, data) { - t.notOk(err, 'no error') - t.equal(data.length, sourceData.length, 'correct number of entries') - var expected = sourceData.slice().reverse().map(transformSource) - t.deepEqual(data, expected) - t.end() - }) - }) - - test('test iterator with start and end after database and and reverse=true', function (t) { - collectEntries(db.iterator({ start: '9b', end: '9a', reverse: true }), function (err, data) { - t.notOk(err, 'no error') - t.equal(data.length, 0, 'correct number of entries') - t.end() - }) - }) - - function testIteratorCollectsFullDatabase (name, iteratorOptions) { - iteratorOptions.keyAsBuffer = false - iteratorOptions.valueAsBuffer = false - test(name, function (t) { - collectEntries(db.iterator(iteratorOptions), function (err, data) { - t.notOk(err, 'no error') - t.equal(data.length, 100, 'correct number of entries') - var expected = sourceData.map(transformSource) - t.deepEqual(data, expected) - t.end() - }) - }) - } - if (!process.browser) { - // Can't use buffers as query keys in indexeddb (I think :P) - testIteratorCollectsFullDatabase( - 'test iterator with start as empty buffer' - , { start: new Buffer(0) } - ) - testIteratorCollectsFullDatabase( - 'test iterator with end as empty buffer' - , { end: new Buffer(0) } - ) - } - testIteratorCollectsFullDatabase( - 'test iterator with start as empty string' - , { start: '' } - ) - testIteratorCollectsFullDatabase( - 'test iterator with start as null' - , { start: null } - ) - testIteratorCollectsFullDatabase( - 'test iterator with end as empty string' - , { end: '' } - ) - testIteratorCollectsFullDatabase( - 'test iterator with end as null' - , { end: null } - ) -} - -module.exports.snapshot = function (leveldown, test, testCommon) { - test('setUp #3', function (t) { - db.close(function () { - db = leveldown(testCommon.location()) - db.open(function () { - db.put('foobatch1', 'bar1', t.end.bind(t)) - }) - }) - }) - - test('iterator create snapshot correctly', function (t) { - var iterator = db.iterator() - db.del('foobatch1', function () { - iterator.next(function (err, key, value) { - t.notOk(err, 'no error') - t.ok(key, 'got a key') - t.equal(key.toString(), 'foobatch1', 'correct key') - t.equal(value.toString(), 'bar1', 'correct value') - iterator.end(t.end.bind(t)) - }) - }) - }) -} - -module.exports.tearDown = function (test, testCommon) { - test('tearDown', function (t) { - db.close(testCommon.tearDown.bind(null, t)) - }) -} - -module.exports.all = function (leveldown, test, testCommon) { - module.exports.setUp(leveldown, test, testCommon) - module.exports.args(test) - module.exports.sequence(test) - module.exports.iterator(leveldown, test, testCommon, testCommon.collectEntries) - module.exports.snapshot(leveldown, test, testCommon) - module.exports.tearDown(test, testCommon) -} diff --git a/node_modules/browserify-fs/node_modules/level-js/node_modules/abstract-leveldown/abstract/leveldown-test.js b/node_modules/browserify-fs/node_modules/level-js/node_modules/abstract-leveldown/abstract/leveldown-test.js deleted file mode 100644 index 205122bf..00000000 --- a/node_modules/browserify-fs/node_modules/level-js/node_modules/abstract-leveldown/abstract/leveldown-test.js +++ /dev/null @@ -1,17 +0,0 @@ -module.exports.args = function (leveldown, test) { - test('test database creation no-arg throws', function (t) { - t.throws( - leveldown - , { name: 'Error', message: 'constructor requires at least a location argument' } - , 'no-arg leveldown() throws' - ) - t.end() - }) - - test('test database open no-arg throws', function (t) { - var db = leveldown('foo') - t.ok(db, 'database object returned') - t.ok(typeof db.open === 'function', 'open() function exists') - t.end() - }) -} \ No newline at end of file diff --git a/node_modules/browserify-fs/node_modules/level-js/node_modules/abstract-leveldown/abstract/open-test.js b/node_modules/browserify-fs/node_modules/level-js/node_modules/abstract-leveldown/abstract/open-test.js deleted file mode 100644 index 5bbeeb06..00000000 --- a/node_modules/browserify-fs/node_modules/level-js/node_modules/abstract-leveldown/abstract/open-test.js +++ /dev/null @@ -1,96 +0,0 @@ -module.exports.setUp = function (test, testCommon) { - test('setUp', testCommon.setUp) -} - -module.exports.args = function (leveldown, test, testCommon) { - test('test database open no-arg throws', function (t) { - var db = leveldown(testCommon.location()) - t.throws( - db.open.bind(db) - , { name: 'Error', message: 'open() requires a callback argument' } - , 'no-arg open() throws' - ) - t.end() - }) - - test('test callback-less, 1-arg, open() throws', function (t) { - var db = leveldown(testCommon.location()) - t.throws( - db.open.bind(db, {}) - , { name: 'Error', message: 'open() requires a callback argument' } - , 'callback-less, 1-arg open() throws' - ) - t.end() - }) -} - -module.exports.open = function (leveldown, test, testCommon) { - test('test database open, no options', function (t) { - var db = leveldown(testCommon.location()) - - // default createIfMissing=true, errorIfExists=false - db.open(function (err) { - t.notOk(err, 'no error') - db.close(function () { - t.end() - }) - }) - }) - - test('test database open, options and callback', function (t) { - var db = leveldown(testCommon.location()) - - // default createIfMissing=true, errorIfExists=false - db.open({}, function (err) { - t.notOk(err, 'no error') - db.close(function () { - t.end() - }) - }) - }) -} - -module.exports.openAdvanced = function (leveldown, test, testCommon) { - test('test database open createIfMissing:false', function (t) { - var db = leveldown(testCommon.location()) - - db.open({ createIfMissing: false }, function (err) { - t.ok(err, 'error') - t.ok(/does not exist/.test(err.message), 'error is about dir not existing') - t.end() - }) - }) - - test('test database open errorIfExists:true', function (t) { - var location = testCommon.location() - , db = leveldown(location) - - // make a valid database first, then close and dispose - db.open({}, function (err) { - t.notOk(err, 'no error') - db.close(function (err) { - t.notOk(err, 'no error') - - // open again with 'errorIfExists' - db = leveldown(location) - db.open({ createIfMissing: false, errorIfExists: true }, function (err) { - t.ok(err, 'error') - t.ok(/exists/.test(err.message), 'error is about already existing') - t.end() - }) - }) - }) - }) -} - -module.exports.tearDown = function (test, testCommon) { - test('tearDown', testCommon.tearDown) -} - -module.exports.all = function (leveldown, test, testCommon) { - module.exports.setUp(test, testCommon) - module.exports.args(leveldown, test, testCommon) - module.exports.open(leveldown, test, testCommon) - module.exports.openAdvanced(leveldown, test, testCommon) - module.exports.tearDown(test, testCommon) -} \ No newline at end of file diff --git a/node_modules/browserify-fs/node_modules/level-js/node_modules/abstract-leveldown/abstract/put-get-del-test.js b/node_modules/browserify-fs/node_modules/level-js/node_modules/abstract-leveldown/abstract/put-get-del-test.js deleted file mode 100644 index e7e0935e..00000000 --- a/node_modules/browserify-fs/node_modules/level-js/node_modules/abstract-leveldown/abstract/put-get-del-test.js +++ /dev/null @@ -1,167 +0,0 @@ -/**** SETUP & UTILITY STUFF ****/ - - -var db - , testBuffer - , test - , verifyNotFoundError = require('./util').verifyNotFoundError - , isTypedArray = require('./util').isTypedArray - -function makeGetDelErrorTests (type, key, expectedError) { - test('test get() with ' + type + ' causes error', function (t) { - db.get(key, function (err) { - t.ok(err, 'has error') - t.ok(err instanceof Error) - t.ok(err.message.match(expectedError), 'correct error message') - t.end() - }) - }) - - test('test del() with ' + type + ' causes error', function (t) { - db.del(key, function (err) { - t.ok(err, 'has error') - t.ok(err instanceof Error) - t.ok(err.message.match(expectedError), 'correct error message') - t.end() - }) - }) -} - -function makePutErrorTest (type, key, value, expectedError) { - test('test put() with ' + type + ' causes error', function (t) { - db.put(key, value, function (err) { - t.ok(err, 'has error') - t.ok(err instanceof Error) - t.ok(err.message.match(expectedError), 'correct error message') - t.end() - }) - }) -} - -function makePutGetDelSuccessfulTest (type, key, value) { - test('test put()/get()/del() with ' + type, function (t) { - db.put(key, value, function (err) { - t.notOk(err, 'no error') - db.get(key, function (err, _value) { - t.notOk(err, 'no error, has key/value for `' + key + '`') - t.ok(Buffer.isBuffer(_value), 'is a Buffer') - var result = _value.toString() - value = value.toString() - t.equals(result, value) - db.del(key, function (err) { - t.notOk(err, 'no error, deleted key/value for `' + key + '`') - db.get(key, function (err, value) { - t.ok(err, 'entry propertly deleted') - t.ok(verifyNotFoundError(err), 'should have correct error message') - t.ok(typeof value == 'undefined', 'value is undefined') - t.end() - }) - }) - }) - }) - }) -} - -function makeErrorKeyTest (type, key, expectedError) { - makeGetDelErrorTests(type, key, expectedError) - makePutErrorTest(type, key, 'foo', expectedError) -} - -/**** SETUP ENVIRONMENT ****/ - -module.exports.setUp = function (leveldown, test, testCommon) { - test('setUp common', testCommon.setUp) - test('setUp db', function (t) { - db = leveldown(testCommon.location()) - db.open(t.end.bind(t)) - }) -} - -/**** TEST ERROR KEYS ****/ - -module.exports.errorKeys = function (testFunc, BufferType) { - if (!BufferType) BufferType = Buffer - test = testFunc - makeErrorKeyTest('null key', null, /key cannot be `null` or `undefined`/) - makeErrorKeyTest('undefined key', undefined, /key cannot be `null` or `undefined`/) - makeErrorKeyTest('empty String key', '', /key cannot be an empty String/) - makeErrorKeyTest('empty Buffer key', new BufferType(0), /key cannot be an empty \w*Buffer/) - makeErrorKeyTest('empty Array key', [], /key cannot be an empty String/) -} - -/**** TEST NON-ERROR KEYS ****/ - -module.exports.nonErrorKeys = function (testFunc) { - // valid falsey keys - test = testFunc - makePutGetDelSuccessfulTest('`false` key', false, 'foo false') - makePutGetDelSuccessfulTest('`0` key', 0, 'foo 0') - makePutGetDelSuccessfulTest('`NaN` key', NaN, 'foo NaN') - - // standard String key - makePutGetDelSuccessfulTest( - 'long String key' - , 'some long string that I\'m using as a key for this unit test, cross your fingers dude, we\'re going in!' - , 'foo' - ) - - if (!process.browser) { - // Buffer key - makePutGetDelSuccessfulTest('Buffer key', testBuffer, 'foo') - } - - // non-empty Array as a value - makePutGetDelSuccessfulTest('Array value', 'foo', [1,2,3,4]) -} - -/**** TEST ERROR VALUES ****/ - -module.exports.errorValues = function (testFunc, BufferType) { - if (!BufferType) BufferType = Buffer - test = testFunc - makePutErrorTest('null value', 'foo', null, /value cannot be `null` or `undefined`/) - makePutErrorTest('undefined value', 'foo', undefined, /value cannot be `null` or `undefined`/) - makePutErrorTest('empty String value', 'foo', '', /value cannot be an empty String/) - makePutErrorTest('empty Buffer value', 'foo', new BufferType(0), /value cannot be an empty \w*Buffer/) - makePutErrorTest('empty Array value', 'foo', [], /value cannot be an empty String/) -} - -module.exports.nonErrorKeys = function (testFunc) { - // valid falsey values - test = testFunc - makePutGetDelSuccessfulTest('`false` value', 'foo false', false) - makePutGetDelSuccessfulTest('`0` value', 'foo 0', 0) - makePutGetDelSuccessfulTest('`NaN` value', 'foo NaN', NaN) - - // standard String value - makePutGetDelSuccessfulTest( - 'long String value' - , 'foo' - , 'some long string that I\'m using as a key for this unit test, cross your fingers dude, we\'re going in!' - ) - - // standard Buffer value - makePutGetDelSuccessfulTest('Buffer value', 'foo', testBuffer) - - // non-empty Array as a key - makePutGetDelSuccessfulTest('Array key', [1,2,3,4], 'foo') -} - -/**** CLEANUP ENVIRONMENT ****/ - -module.exports.tearDown = function (test, testCommon) { - test('tearDown', function (t) { - db.close(testCommon.tearDown.bind(null, t)) - }) -} - -module.exports.all = function (leveldown, testFunc, testCommon, buffer, BufferType) { - testBuffer = buffer - test = testFunc - module.exports.setUp(leveldown, test, testCommon) - module.exports.errorKeys(test, BufferType) - module.exports.nonErrorKeys(test) - module.exports.errorValues(test, BufferType) - module.exports.nonErrorKeys(test) - module.exports.tearDown(test, testCommon) -} diff --git a/node_modules/browserify-fs/node_modules/level-js/node_modules/abstract-leveldown/abstract/put-test.js b/node_modules/browserify-fs/node_modules/level-js/node_modules/abstract-leveldown/abstract/put-test.js deleted file mode 100644 index 55558eef..00000000 --- a/node_modules/browserify-fs/node_modules/level-js/node_modules/abstract-leveldown/abstract/put-test.js +++ /dev/null @@ -1,92 +0,0 @@ -var db - , verifyNotFoundError = require('./util').verifyNotFoundError - , isTypedArray = require('./util').isTypedArray - -module.exports.setUp = function (leveldown, test, testCommon) { - test('setUp common', testCommon.setUp) - test('setUp db', function (t) { - db = leveldown(testCommon.location()) - db.open(t.end.bind(t)) - }) -} - -module.exports.args = function (test) { - test('test argument-less put() throws', function (t) { - t.throws( - db.put.bind(db) - , { name: 'Error', message: 'put() requires a callback argument' } - , 'no-arg put() throws' - ) - t.end() - }) - - test('test callback-less, 1-arg, put() throws', function (t) { - t.throws( - db.put.bind(db, 'foo') - , { name: 'Error', message: 'put() requires a callback argument' } - , 'callback-less, 1-arg put() throws' - ) - t.end() - }) - - test('test callback-less, 2-arg, put() throws', function (t) { - t.throws( - db.put.bind(db, 'foo', 'bar') - , { name: 'Error', message: 'put() requires a callback argument' } - , 'callback-less, 2-arg put() throws' - ) - t.end() - }) - - test('test callback-less, 3-arg, put() throws', function (t) { - t.throws( - db.put.bind(db, 'foo', 'bar', {}) - , { name: 'Error', message: 'put() requires a callback argument' } - , 'callback-less, 3-arg put() throws' - ) - t.end() - }) -} - -module.exports.put = function (test) { - test('test simple put()', function (t) { - db.put('foo', 'bar', function (err) { - t.notOk(err, 'no error') - db.get('foo', function (err, value) { - t.notOk(err, 'no error') - var result = value.toString() - if (isTypedArray(value)) - result = String.fromCharCode.apply(null, new Uint16Array(value)) - t.equal(result, 'bar') - t.end() - }) - }) - }) - - if (process.browser) { - test('test object value put()', function (t) { - db.put('dood', {pete: 'sampras'}, function (err) { - t.notOk(err, 'no error') - db.get('dood', { asBuffer: false }, function (err, value) { - t.notOk(err, 'no error') - t.equal(JSON.stringify(value), JSON.stringify({pete: 'sampras'})) - t.end() - }) - }) - }) - } - -} - -module.exports.tearDown = function (test, testCommon) { - test('tearDown', function (t) { - db.close(testCommon.tearDown.bind(null, t)) - }) -} - -module.exports.all = function (leveldown, test, testCommon) { - module.exports.setUp(leveldown, test, testCommon) - module.exports.args(test) - module.exports.put(test) - module.exports.tearDown(test, testCommon) -} \ No newline at end of file diff --git a/node_modules/browserify-fs/node_modules/level-js/node_modules/abstract-leveldown/abstract/ranges-test.js b/node_modules/browserify-fs/node_modules/level-js/node_modules/abstract-leveldown/abstract/ranges-test.js deleted file mode 100644 index 9b8e1da1..00000000 --- a/node_modules/browserify-fs/node_modules/level-js/node_modules/abstract-leveldown/abstract/ranges-test.js +++ /dev/null @@ -1,435 +0,0 @@ -var db - , sourceData = require('./iterator-test').sourceData - , transformSource = require('./iterator-test').transformSource - -module.exports.setUp = function (leveldown, test, testCommon) { - test('setUp common', testCommon.setUp) - test('setUp db', function (t) { - db = leveldown(testCommon.location()) - db.open(t.end.bind(t)) - }) -} - -module.exports.iterator = function (leveldown, test, testCommon, collectEntries) { - test('test simple iterator()', function (t) { - var data = [ - { type: 'put', key: 'foobatch1', value: 'bar1' } - , { type: 'put', key: 'foobatch2', value: 'bar2' } - , { type: 'put', key: 'foobatch3', value: 'bar3' } - ] - , idx = 0 - - db.batch(data, function (err) { - t.notOk(err, 'no error') - var iterator = db.iterator() - , fn = function (err, key, value) { - t.notOk(err, 'no error') - if (key && value) { - t.equal(key.toString(), data[idx].key, 'correct key') - t.equal(value.toString(), data[idx].value, 'correct value') - process.nextTick(next) - idx++ - } else { // end - t.ok(typeof err === 'undefined', 'err argument is undefined') - t.ok(typeof key === 'undefined', 'key argument is undefined') - t.ok(typeof value === 'undefined', 'value argument is undefined') - t.equal(idx, data.length, 'correct number of entries') - iterator.end(function () { - t.end() - }) - } - } - , next = function () { - iterator.next(fn) - } - - next() - }) - }) - - /** the following tests are mirroring the same series of tests in - * LevelUP read-stream-test.js - */ - - test('setUp #2', function (t) { - db.close(function () { - db = leveldown(testCommon.location()) - db.open(function () { - db.batch(sourceData, t.end.bind(t)) - }) - }) - }) - - test('test full data collection', function (t) { - collectEntries(db.iterator({ keyAsBuffer: false, valueAsBuffer: false }), function (err, data) { - t.notOk(err, 'no error') - t.equal(data.length, sourceData.length, 'correct number of entries') - var expected = sourceData.map(transformSource) - t.deepEqual(data, expected) - t.end() - }) - }) - - test('test iterator with reverse=true', function (t) { - collectEntries(db.iterator({ keyAsBuffer: false, valueAsBuffer: false, reverse: true }), function (err, data) { - t.notOk(err, 'no error') - t.equal(data.length, sourceData.length, 'correct number of entries') - var expected = sourceData.slice().reverse().map(transformSource) - t.deepEqual(data, expected) - t.end() - }) - }) - - test('test iterator with gte=0', function (t) { - collectEntries(db.iterator({ keyAsBuffer: false, valueAsBuffer: false, gte: '00' }), function (err, data) { - t.notOk(err, 'no error') - t.equal(data.length, sourceData.length, 'correct number of entries') - var expected = sourceData.map(transformSource) - t.deepEqual(data, expected) - t.end() - }) - }) - - test('test iterator with gte=50', function (t) { - collectEntries(db.iterator({ keyAsBuffer: false, valueAsBuffer: false, gte: '50' }), function (err, data) { - t.notOk(err, 'no error') - t.equal(data.length, 50, 'correct number of entries') - var expected = sourceData.slice(50).map(transformSource) - t.deepEqual(data, expected) - t.end() - }) - }) - - test('test iterator with lte=50 and reverse=true', function (t) { - collectEntries(db.iterator({ keyAsBuffer: false, valueAsBuffer: false, lte: '50', reverse: true }), function (err, data) { - t.notOk(err, 'no error') - t.equal(data.length, 51, 'correct number of entries') - var expected = sourceData.slice().reverse().slice(49).map(transformSource) - t.deepEqual(data, expected) - t.end() - }) - }) - - test('test iterator with start being a midway key (49.5)', function (t) { - collectEntries(db.iterator({ keyAsBuffer: false, valueAsBuffer: false, gte: '49.5' }), function (err, data) { - t.notOk(err, 'no error') - t.equal(data.length, 50, 'correct number of entries') - var expected = sourceData.slice(50).map(transformSource) - t.deepEqual(data, expected) - t.end() - }) - }) - - test('test iterator with start being a midway key (49999)', function (t) { - collectEntries(db.iterator({ keyAsBuffer: false, valueAsBuffer: false, gte: '49999' }), function (err, data) { - t.notOk(err, 'no error') - t.equal(data.length, 50, 'correct number of entries') - var expected = sourceData.slice(50).map(transformSource) - t.deepEqual(data, expected) - t.end() - }) - }) - - test('test iterator with start being a midway key and reverse=true', function (t) { - collectEntries(db.iterator({ keyAsBuffer: false, valueAsBuffer: false, lte: '49.5', reverse: true }), function (err, data) { - t.notOk(err, 'no error') - t.equal(data.length, 50, 'correct number of entries') - var expected = sourceData.slice().reverse().slice(50).map(transformSource) - t.deepEqual(data, expected) - t.end() - }) - }) - - test('test iterator with start being a midway key and reverse=true', function (t) { - collectEntries(db.iterator({ keyAsBuffer: false, valueAsBuffer: false, lt: '49.5', reverse: true }), function (err, data) { - t.notOk(err, 'no error') - t.equal(data.length, 50, 'correct number of entries') - var expected = sourceData.slice().reverse().slice(50).map(transformSource) - t.deepEqual(data, expected) - t.end() - }) - }) - - test('test iterator with start being a midway key and reverse=true', function (t) { - collectEntries(db.iterator({ keyAsBuffer: false, valueAsBuffer: false, lt: '50', reverse: true }), function (err, data) { - t.notOk(err, 'no error') - t.equal(data.length, 50, 'correct number of entries') - var expected = sourceData.slice().reverse().slice(50).map(transformSource) - t.deepEqual(data, expected) - t.end() - }) - }) - - test('test iterator with end=50', function (t) { - collectEntries(db.iterator({ keyAsBuffer: false, valueAsBuffer: false, lte: '50' }), function (err, data) { - t.notOk(err, 'no error') - t.equal(data.length, 51, 'correct number of entries') - var expected = sourceData.slice(0, 51).map(transformSource) - t.deepEqual(data, expected) - t.end() - }) - }) - - test('test iterator with end being a midway key (50.5)', function (t) { - collectEntries(db.iterator({ keyAsBuffer: false, valueAsBuffer: false, lte: '50.5' }), function (err, data) { - t.notOk(err, 'no error') - t.equal(data.length, 51, 'correct number of entries') - var expected = sourceData.slice(0, 51).map(transformSource) - t.deepEqual(data, expected) - t.end() - }) - }) - - test('test iterator with end being a midway key (50555)', function (t) { - collectEntries(db.iterator({ keyAsBuffer: false, valueAsBuffer: false, lte: '50555' }), function (err, data) { - t.notOk(err, 'no error') - t.equal(data.length, 51, 'correct number of entries') - var expected = sourceData.slice(0, 51).map(transformSource) - t.deepEqual(data, expected) - t.end() - }) - }) - - test('test iterator with end being a midway key (50555)', function (t) { - collectEntries(db.iterator({ keyAsBuffer: false, valueAsBuffer: false, lt: '50555' }), function (err, data) { - t.notOk(err, 'no error') - t.equal(data.length, 51, 'correct number of entries') - var expected = sourceData.slice(0, 51).map(transformSource) - t.deepEqual(data, expected) - t.end() - }) - }) - - test('test iterator with end being a midway key and reverse=true', function (t) { - collectEntries(db.iterator({ keyAsBuffer: false, valueAsBuffer: false, gte: '50.5', reverse: true }), function (err, data) { - t.notOk(err, 'no error') - t.equal(data.length, 49, 'correct number of entries') - var expected = sourceData.slice().reverse().slice(0, 49).map(transformSource) - t.deepEqual(data, expected) - t.end() - }) - }) - - test('test iterator with gt a midway key and reverse=true', function (t) { - collectEntries(db.iterator({ keyAsBuffer: false, valueAsBuffer: false, gt: '50.5', reverse: true }), function (err, data) { - t.notOk(err, 'no error') - t.equal(data.length, 49, 'correct number of entries') - var expected = sourceData.slice().reverse().slice(0, 49).map(transformSource) - t.deepEqual(data, expected) - t.end() - }) - }) - - test('test iterator with gt a midway key and reverse=true', function (t) { - collectEntries(db.iterator({ keyAsBuffer: false, valueAsBuffer: false, gt: '50', reverse: true }), function (err, data) { - t.notOk(err, 'no error') - t.equal(data.length, 49, 'correct number of entries') - var expected = sourceData.slice().reverse().slice(0, 49).map(transformSource) - t.deepEqual(data, expected) - t.end() - }) - }) - - test('test iterator with gt 50 key and reverse=true', function (t) { - collectEntries(db.iterator({ keyAsBuffer: false, valueAsBuffer: false, gt: '50', reverse: true }), function (err, data) { - t.notOk(err, 'no error') - t.equal(data.length, 49, 'correct number of entries') - var expected = sourceData.slice().reverse().slice(0, 49).map(transformSource) - t.deepEqual(data, expected) - t.end() - }) - }) - - // end='0', starting key is actually '00' so it should avoid it - test('test iterator with end=0', function (t) { - collectEntries(db.iterator({ keyAsBuffer: false, valueAsBuffer: false, lte: '0' }), function (err, data) { - t.notOk(err, 'no error') - t.equal(data.length, 0, 'correct number of entries') - t.end() - }) - }) - - // end='0', starting key is actually '00' so it should avoid it - test('test iterator with end<0', function (t) { - collectEntries(db.iterator({ keyAsBuffer: false, valueAsBuffer: false, lt: '0' }), function (err, data) { - t.notOk(err, 'no error') - t.equal(data.length, 0, 'correct number of entries') - t.end() - }) - }) - - test('test iterator with start=30 and end=70', function (t) { - collectEntries(db.iterator({ keyAsBuffer: false, valueAsBuffer: false, gte: '30', lte: '70' }), function (err, data) { - t.notOk(err, 'no error') - t.equal(data.length, 41, 'correct number of entries') - var expected = sourceData.slice(30, 71).map(transformSource) - t.deepEqual(data, expected) - t.end() - }) - }) - - test('test iterator with start=30 and end=70', function (t) { - collectEntries(db.iterator({ keyAsBuffer: false, valueAsBuffer: false, gt: '29', lt: '71' }), function (err, data) { - t.notOk(err, 'no error') - t.equal(data.length, 41, 'correct number of entries') - var expected = sourceData.slice(30, 71).map(transformSource) - t.deepEqual(data, expected) - t.end() - }) - }) - - test('test iterator with start=30 and end=70 and reverse=true', function (t) { - collectEntries(db.iterator({ keyAsBuffer: false, valueAsBuffer: false, lte: '70', gte: '30', reverse: true }), function (err, data) { - t.notOk(err, 'no error') - t.equal(data.length, 41, 'correct number of entries') - var expected = sourceData.slice().reverse().slice(29, 70).map(transformSource) - t.deepEqual(data, expected) - t.end() - }) - }) - - test('test iterator with start=30 and end=70 and reverse=true', function (t) { - collectEntries(db.iterator({ keyAsBuffer: false, valueAsBuffer: false, lt: '71', gt: '29', reverse: true }), function (err, data) { - t.notOk(err, 'no error') - t.equal(data.length, 41, 'correct number of entries') - var expected = sourceData.slice().reverse().slice(29, 70).map(transformSource) - t.deepEqual(data, expected) - t.end() - }) - }) - - test('test iterator with limit=20 and start=20', function (t) { - collectEntries(db.iterator({ keyAsBuffer: false, valueAsBuffer: false, gte: '20', limit: 20 }), function (err, data) { - t.notOk(err, 'no error') - t.equal(data.length, 20, 'correct number of entries') - var expected = sourceData.slice(20, 40).map(transformSource) - t.deepEqual(data, expected) - t.end() - }) - }) - - test('test iterator with limit=20 and start=79 and reverse=true', function (t) { - collectEntries(db.iterator({ keyAsBuffer: false, valueAsBuffer: false, lte: '79', limit: 20, reverse: true }), function (err, data) { - t.notOk(err, 'no error') - t.equal(data.length, 20, 'correct number of entries') - var expected = sourceData.slice().reverse().slice(20, 40).map(transformSource) - t.deepEqual(data, expected) - t.end() - }) - }) - - test('test iterator with end after limit', function (t) { - collectEntries(db.iterator({ keyAsBuffer: false, valueAsBuffer: false, limit: 20, lte: '50' }), function (err, data) { - t.notOk(err, 'no error') - t.equal(data.length, 20, 'correct number of entries') - var expected = sourceData.slice(0, 20).map(transformSource) - t.deepEqual(data, expected) - t.end() - }) - }) - - test('test iterator with end before limit', function (t) { - collectEntries(db.iterator({ keyAsBuffer: false, valueAsBuffer: false, limit: 50, lte: '19' }), function (err, data) { - t.notOk(err, 'no error') - t.equal(data.length, 20, 'correct number of entries') - var expected = sourceData.slice(0, 20).map(transformSource) - t.deepEqual(data, expected) - t.end() - }) - }) - - test('test iterator with start after database end', function (t) { - collectEntries(db.iterator({ keyAsBuffer: false, valueAsBuffer: false, gte: '9a' }), function (err, data) { - t.notOk(err, 'no error') - t.equal(data.length, 0, 'correct number of entries') - t.end() - }) - }) - - test('test iterator with start after database end', function (t) { - collectEntries(db.iterator({ keyAsBuffer: false, valueAsBuffer: false, gt: '9a' }), function (err, data) { - t.notOk(err, 'no error') - t.equal(data.length, 0, 'correct number of entries') - t.end() - }) - }) - - test('test iterator with start after database end and reverse=true', function (t) { - collectEntries(db.iterator({ keyAsBuffer: false, valueAsBuffer: false, lte: '9a', reverse: true }), function (err, data) { - t.notOk(err, 'no error') - t.equal(data.length, sourceData.length, 'correct number of entries') - var expected = sourceData.slice().reverse().map(transformSource) - t.deepEqual(data, expected) - t.end() - }) - }) - - test('test iterator with start and end after database and and reverse=true', function (t) { - collectEntries(db.iterator({ lte: '9b', gte: '9a', reverse: true }), function (err, data) { - t.notOk(err, 'no error') - t.equal(data.length, 0, 'correct number of entries') - t.end() - }) - }) - - test('test iterator with lt and gt after database and and reverse=true', function (t) { - collectEntries(db.iterator({ lt: '9b', gt: '9a', reverse: true }), function (err, data) { - t.notOk(err, 'no error') - t.equal(data.length, 0, 'correct number of entries') - t.end() - }) - }) - - function testIteratorCollectsFullDatabase (name, iteratorOptions) { - iteratorOptions.keyAsBuffer = false - iteratorOptions.valueAsBuffer = false - test(name, function (t) { - collectEntries(db.iterator(iteratorOptions), function (err, data) { - t.notOk(err, 'no error') - t.equal(data.length, 100, 'correct number of entries') - var expected = sourceData.map(transformSource) - t.deepEqual(data, expected) - t.end() - }) - }) - } - if (!process.browser) { - // Can't use buffers as query keys in indexeddb (I think :P) - testIteratorCollectsFullDatabase( - 'test iterator with start as empty buffer' - , { start: new Buffer(0) } - ) - testIteratorCollectsFullDatabase( - 'test iterator with end as empty buffer' - , { end: new Buffer(0) } - ) - } - testIteratorCollectsFullDatabase( - 'test iterator with start as empty string' - , { gte: '' } - ) - testIteratorCollectsFullDatabase( - 'test iterator with start as null' - , { gte: null } - ) - testIteratorCollectsFullDatabase( - 'test iterator with end as empty string' - , { lte: '' } - ) - testIteratorCollectsFullDatabase( - 'test iterator with end as null' - , { lte: null } - ) -} - -module.exports.tearDown = function (test, testCommon) { - test('tearDown', function (t) { - db.close(testCommon.tearDown.bind(null, t)) - }) -} - -module.exports.all = function (leveldown, test, testCommon) { - module.exports.setUp(leveldown, test, testCommon) - module.exports.iterator(leveldown, test, testCommon, testCommon.collectEntries) - module.exports.tearDown(test, testCommon) -} diff --git a/node_modules/browserify-fs/node_modules/level-js/node_modules/abstract-leveldown/abstract/util.js b/node_modules/browserify-fs/node_modules/level-js/node_modules/abstract-leveldown/abstract/util.js deleted file mode 100644 index 2ae5a4f8..00000000 --- a/node_modules/browserify-fs/node_modules/level-js/node_modules/abstract-leveldown/abstract/util.js +++ /dev/null @@ -1,10 +0,0 @@ -var nfre = /NotFound/i - -module.exports.verifyNotFoundError = function verifyNotFoundError (err) { - return nfre.test(err.message) || nfre.test(err.name) -} - -module.exports.isTypedArray = function isTypedArray (value) { - return (typeof ArrayBuffer != 'undefined' && value instanceof ArrayBuffer) - || (typeof Uint8Array != 'undefined' && value instanceof Uint8Array) -} diff --git a/node_modules/browserify-fs/node_modules/level-js/node_modules/abstract-leveldown/node_modules/xtend/.jshintrc b/node_modules/browserify-fs/node_modules/level-js/node_modules/abstract-leveldown/node_modules/xtend/.jshintrc deleted file mode 100644 index 77887b5f..00000000 --- a/node_modules/browserify-fs/node_modules/level-js/node_modules/abstract-leveldown/node_modules/xtend/.jshintrc +++ /dev/null @@ -1,30 +0,0 @@ -{ - "maxdepth": 4, - "maxstatements": 200, - "maxcomplexity": 12, - "maxlen": 80, - "maxparams": 5, - - "curly": true, - "eqeqeq": true, - "immed": true, - "latedef": false, - "noarg": true, - "noempty": true, - "nonew": true, - "undef": true, - "unused": "vars", - "trailing": true, - - "quotmark": true, - "expr": true, - "asi": true, - - "browser": false, - "esnext": true, - "devel": false, - "node": false, - "nonstandard": false, - - "predef": ["require", "module", "__dirname", "__filename"] -} diff --git a/node_modules/browserify-fs/node_modules/level-js/node_modules/abstract-leveldown/node_modules/xtend/.npmignore b/node_modules/browserify-fs/node_modules/level-js/node_modules/abstract-leveldown/node_modules/xtend/.npmignore deleted file mode 100644 index 3c3629e6..00000000 --- a/node_modules/browserify-fs/node_modules/level-js/node_modules/abstract-leveldown/node_modules/xtend/.npmignore +++ /dev/null @@ -1 +0,0 @@ -node_modules diff --git a/node_modules/browserify-fs/node_modules/level-js/node_modules/abstract-leveldown/node_modules/xtend/LICENCE b/node_modules/browserify-fs/node_modules/level-js/node_modules/abstract-leveldown/node_modules/xtend/LICENCE deleted file mode 100644 index 1a14b437..00000000 --- a/node_modules/browserify-fs/node_modules/level-js/node_modules/abstract-leveldown/node_modules/xtend/LICENCE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (c) 2012-2014 Raynos. - -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/node_modules/browserify-fs/node_modules/level-js/node_modules/abstract-leveldown/node_modules/xtend/Makefile b/node_modules/browserify-fs/node_modules/level-js/node_modules/abstract-leveldown/node_modules/xtend/Makefile deleted file mode 100644 index d583fcf4..00000000 --- a/node_modules/browserify-fs/node_modules/level-js/node_modules/abstract-leveldown/node_modules/xtend/Makefile +++ /dev/null @@ -1,4 +0,0 @@ -browser: - node ./support/compile - -.PHONY: browser \ No newline at end of file diff --git a/node_modules/browserify-fs/node_modules/level-js/node_modules/abstract-leveldown/node_modules/xtend/README.md b/node_modules/browserify-fs/node_modules/level-js/node_modules/abstract-leveldown/node_modules/xtend/README.md deleted file mode 100644 index e7548318..00000000 --- a/node_modules/browserify-fs/node_modules/level-js/node_modules/abstract-leveldown/node_modules/xtend/README.md +++ /dev/null @@ -1,28 +0,0 @@ -# xtend - -[![browser support][3]][4] - -Extend like a boss - -xtend is a basic utility library which allows you to extend an object by appending all of the properties from each object in a list. When there are identical properties, the right-most property takes presedence. - -## Examples - -```js -var extend = require("xtend") - -// extend returns a new object. Does not mutate arguments -var combination = extend({ - a: "a" -}, { - b: "b" -}) -// { a: "a", b: "b" } -``` - - -## MIT Licenced - - - [3]: http://ci.testling.com/Raynos/xtend.png - [4]: http://ci.testling.com/Raynos/xtend diff --git a/node_modules/browserify-fs/node_modules/level-js/node_modules/abstract-leveldown/node_modules/xtend/index.js b/node_modules/browserify-fs/node_modules/level-js/node_modules/abstract-leveldown/node_modules/xtend/index.js deleted file mode 100644 index 5b760152..00000000 --- a/node_modules/browserify-fs/node_modules/level-js/node_modules/abstract-leveldown/node_modules/xtend/index.js +++ /dev/null @@ -1,17 +0,0 @@ -module.exports = extend - -function extend() { - var target = {} - - for (var i = 0; i < arguments.length; i++) { - var source = arguments[i] - - for (var key in source) { - if (source.hasOwnProperty(key)) { - target[key] = source[key] - } - } - } - - return target -} diff --git a/node_modules/browserify-fs/node_modules/level-js/node_modules/abstract-leveldown/node_modules/xtend/mutable.js b/node_modules/browserify-fs/node_modules/level-js/node_modules/abstract-leveldown/node_modules/xtend/mutable.js deleted file mode 100644 index a34475eb..00000000 --- a/node_modules/browserify-fs/node_modules/level-js/node_modules/abstract-leveldown/node_modules/xtend/mutable.js +++ /dev/null @@ -1,15 +0,0 @@ -module.exports = extend - -function extend(target) { - for (var i = 1; i < arguments.length; i++) { - var source = arguments[i] - - for (var key in source) { - if (source.hasOwnProperty(key)) { - target[key] = source[key] - } - } - } - - return target -} diff --git a/node_modules/browserify-fs/node_modules/level-js/node_modules/abstract-leveldown/node_modules/xtend/package.json b/node_modules/browserify-fs/node_modules/level-js/node_modules/abstract-leveldown/node_modules/xtend/package.json deleted file mode 100644 index f62a02f3..00000000 --- a/node_modules/browserify-fs/node_modules/level-js/node_modules/abstract-leveldown/node_modules/xtend/package.json +++ /dev/null @@ -1,87 +0,0 @@ -{ - "name": "xtend", - "version": "3.0.0", - "description": "extend like a boss", - "keywords": [ - "extend", - "merge", - "options", - "opts", - "object", - "array" - ], - "author": { - "name": "Raynos", - "email": "raynos2@gmail.com" - }, - "repository": { - "type": "git", - "url": "git://github.com/Raynos/xtend.git" - }, - "main": "index", - "scripts": { - "test": "node test" - }, - "dependencies": {}, - "devDependencies": { - "tape": "~1.1.0" - }, - "homepage": "https://github.com/Raynos/xtend", - "contributors": [ - { - "name": "Jake Verbaten" - }, - { - "name": "Matt Esch" - } - ], - "bugs": { - "url": "https://github.com/Raynos/xtend/issues", - "email": "raynos2@gmail.com" - }, - "licenses": [ - { - "type": "MIT", - "url": "http://github.com/raynos/xtend/raw/master/LICENSE" - } - ], - "testling": { - "files": "test.js", - "browsers": [ - "ie/7..latest", - "firefox/16..latest", - "firefox/nightly", - "chrome/22..latest", - "chrome/canary", - "opera/12..latest", - "opera/next", - "safari/5.1..latest", - "ipad/6.0..latest", - "iphone/6.0..latest" - ] - }, - "engines": { - "node": ">=0.4" - }, - "_id": "xtend@3.0.0", - "dist": { - "shasum": "5cce7407baf642cba7becda568111c493f59665a", - "tarball": "https://registry.npmjs.org/xtend/-/xtend-3.0.0.tgz" - }, - "_from": "xtend@>=3.0.0 <3.1.0", - "_npmVersion": "1.4.6", - "_npmUser": { - "name": "raynos", - "email": "raynos2@gmail.com" - }, - "maintainers": [ - { - "name": "raynos", - "email": "raynos2@gmail.com" - } - ], - "directories": {}, - "_shasum": "5cce7407baf642cba7becda568111c493f59665a", - "_resolved": "https://registry.npmjs.org/xtend/-/xtend-3.0.0.tgz", - "readme": "ERROR: No README data found!" -} diff --git a/node_modules/browserify-fs/node_modules/level-js/node_modules/abstract-leveldown/node_modules/xtend/test.js b/node_modules/browserify-fs/node_modules/level-js/node_modules/abstract-leveldown/node_modules/xtend/test.js deleted file mode 100644 index 3369d796..00000000 --- a/node_modules/browserify-fs/node_modules/level-js/node_modules/abstract-leveldown/node_modules/xtend/test.js +++ /dev/null @@ -1,63 +0,0 @@ -var test = require("tape") -var extend = require("./") -var mutableExtend = require("./mutable") - -test("merge", function(assert) { - var a = { a: "foo" } - var b = { b: "bar" } - - assert.deepEqual(extend(a, b), { a: "foo", b: "bar" }) - assert.end() -}) - -test("replace", function(assert) { - var a = { a: "foo" } - var b = { a: "bar" } - - assert.deepEqual(extend(a, b), { a: "bar" }) - assert.end() -}) - -test("undefined", function(assert) { - var a = { a: undefined } - var b = { b: "foo" } - - assert.deepEqual(extend(a, b), { a: undefined, b: "foo" }) - assert.deepEqual(extend(b, a), { a: undefined, b: "foo" }) - assert.end() -}) - -test("handle 0", function(assert) { - var a = { a: "default" } - var b = { a: 0 } - - assert.deepEqual(extend(a, b), { a: 0 }) - assert.deepEqual(extend(b, a), { a: "default" }) - assert.end() -}) - -test("is immutable", function (assert) { - var record = {} - - extend(record, { foo: "bar" }) - assert.equal(record.foo, undefined) - assert.end() -}) - -test("null as argument", function (assert) { - var a = { foo: "bar" } - var b = null - var c = void 0 - - assert.deepEqual(extend(b, a, c), { foo: "bar" }) - assert.end() -}) - -test("mutable", function (assert) { - var a = { foo: "bar" } - - mutableExtend(a, { bar: "baz" }) - - assert.equal(a.bar, "baz") - assert.end() -}) diff --git a/node_modules/browserify-fs/node_modules/level-js/node_modules/abstract-leveldown/package.json b/node_modules/browserify-fs/node_modules/level-js/node_modules/abstract-leveldown/package.json deleted file mode 100644 index fe5eea89..00000000 --- a/node_modules/browserify-fs/node_modules/level-js/node_modules/abstract-leveldown/package.json +++ /dev/null @@ -1,122 +0,0 @@ -{ - "name": "abstract-leveldown", - "description": "An abstract prototype matching the LevelDOWN API", - "version": "0.12.4", - "contributors": [ - { - "name": "Rod Vagg", - "email": "r@va.gg", - "url": "https://github.com/rvagg" - }, - { - "name": "John Chesley", - "email": "john@chesl.es", - "url": "https://github.com/chesles/" - }, - { - "name": "Jake Verbaten", - "email": "raynos2@gmail.com", - "url": "https://github.com/raynos" - }, - { - "name": "Dominic Tarr", - "email": "dominic.tarr@gmail.com", - "url": "https://github.com/dominictarr" - }, - { - "name": "Max Ogden", - "email": "max@maxogden.com", - "url": "https://github.com/maxogden" - }, - { - "name": "Lars-Magnus Skog", - "email": "lars.magnus.skog@gmail.com", - "url": "https://github.com/ralphtheninja" - }, - { - "name": "David Björklund", - "email": "david.bjorklund@gmail.com", - "url": "https://github.com/kesla" - }, - { - "name": "Julian Gruber", - "email": "julian@juliangruber.com", - "url": "https://github.com/juliangruber" - }, - { - "name": "Paolo Fragomeni", - "email": "paolo@async.ly", - "url": "https://github.com/hij1nx" - }, - { - "name": "Anton Whalley", - "email": "anton.whalley@nearform.com", - "url": "https://github.com/No9" - }, - { - "name": "Matteo Collina", - "email": "matteo.collina@gmail.com", - "url": "https://github.com/mcollina" - }, - { - "name": "Pedro Teixeira", - "email": "pedro.teixeira@gmail.com", - "url": "https://github.com/pgte" - }, - { - "name": "James Halliday", - "email": "mail@substack.net", - "url": "https://github.com/substack" - } - ], - "repository": { - "type": "git", - "url": "https://github.com/rvagg/node-abstract-leveldown.git" - }, - "homepage": "https://github.com/rvagg/node-abstract-leveldown", - "keywords": [ - "leveldb", - "leveldown", - "levelup" - ], - "main": "./abstract-leveldown.js", - "dependencies": { - "xtend": "~3.0.0" - }, - "devDependencies": { - "tap": "*", - "sinon": "*", - "rimraf": "*" - }, - "browser": { - "rimraf": false - }, - "scripts": { - "test": "node ./test.js" - }, - "license": "MIT", - "gitHead": "7be6adfe726ccb23e52fd803ade008e85f072cd3", - "bugs": { - "url": "https://github.com/rvagg/node-abstract-leveldown/issues" - }, - "_id": "abstract-leveldown@0.12.4", - "_shasum": "29e18e632e60e4e221d5810247852a63d7b2e410", - "_from": "abstract-leveldown@>=0.12.0 <0.13.0", - "_npmVersion": "1.4.14", - "_npmUser": { - "name": "rvagg", - "email": "rod@vagg.org" - }, - "maintainers": [ - { - "name": "rvagg", - "email": "rod@vagg.org" - } - ], - "dist": { - "shasum": "29e18e632e60e4e221d5810247852a63d7b2e410", - "tarball": "https://registry.npmjs.org/abstract-leveldown/-/abstract-leveldown-0.12.4.tgz" - }, - "directories": {}, - "_resolved": "https://registry.npmjs.org/abstract-leveldown/-/abstract-leveldown-0.12.4.tgz" -} diff --git a/node_modules/browserify-fs/node_modules/level-js/node_modules/abstract-leveldown/test.js b/node_modules/browserify-fs/node_modules/level-js/node_modules/abstract-leveldown/test.js deleted file mode 100644 index 4ec28702..00000000 --- a/node_modules/browserify-fs/node_modules/level-js/node_modules/abstract-leveldown/test.js +++ /dev/null @@ -1,559 +0,0 @@ -const tap = require('tap') - , sinon = require('sinon') - , util = require('util') - , testCommon = require('./testCommon') - , AbstractLevelDOWN = require('./').AbstractLevelDOWN - , AbstractIterator = require('./').AbstractIterator - , AbstractChainedBatch = require('./').AbstractChainedBatch - -function factory (location) { - return new AbstractLevelDOWN(location) -} - -/*** compatibility with basic LevelDOWN API ***/ - -require('./abstract/leveldown-test').args(factory, tap.test, testCommon) - -require('./abstract/open-test').args(factory, tap.test, testCommon) - -require('./abstract/del-test').setUp(factory, tap.test, testCommon) -require('./abstract/del-test').args(tap.test) - -require('./abstract/get-test').setUp(factory, tap.test, testCommon) -require('./abstract/get-test').args(tap.test) - -require('./abstract/put-test').setUp(factory, tap.test, testCommon) -require('./abstract/put-test').args(tap.test) - -require('./abstract/put-get-del-test').setUp(factory, tap.test, testCommon) -require('./abstract/put-get-del-test').errorKeys(tap.test) -//require('./abstract/put-get-del-test').nonErrorKeys(tap.test, testCommon) -require('./abstract/put-get-del-test').errorValues(tap.test) -//require('./abstract/test/put-get-del-test').nonErrorKeys(tap.test, testCommon) -require('./abstract/put-get-del-test').tearDown(tap.test, testCommon) - -require('./abstract/approximate-size-test').setUp(factory, tap.test, testCommon) -require('./abstract/approximate-size-test').args(tap.test) - -require('./abstract/batch-test').setUp(factory, tap.test, testCommon) -require('./abstract/batch-test').args(tap.test) - -require('./abstract/chained-batch-test').setUp(factory, tap.test, testCommon) -require('./abstract/chained-batch-test').args(tap.test) - -require('./abstract/close-test').close(factory, tap.test, testCommon) - -require('./abstract/iterator-test').setUp(factory, tap.test, testCommon) -require('./abstract/iterator-test').args(tap.test) -require('./abstract/iterator-test').sequence(tap.test) - -/*** extensibility ***/ - -tap.test('test core extensibility', function (t) { - function Test (location) { - AbstractLevelDOWN.call(this, location) - t.equal(this.location, location, 'location set on `this`') - t.end() - } - - util.inherits(Test, AbstractLevelDOWN) - - ;new Test('foobar') -}) - -tap.test('test open() extensibility', function (t) { - var spy = sinon.spy() - , expectedCb = function () {} - , expectedOptions = { options: 1 } - , test - - function Test (location) { - AbstractLevelDOWN.call(this, location) - } - - util.inherits(Test, AbstractLevelDOWN) - - Test.prototype._open = spy - - test = new Test('foobar') - test.open(expectedCb) - - t.equal(spy.callCount, 1, 'got _open() call') - t.equal(spy.getCall(0).thisValue, test, '`this` on _open() was correct') - t.equal(spy.getCall(0).args.length, 2, 'got two arguments') - t.deepEqual(spy.getCall(0).args[0], {}, 'got blank options argument') - t.equal(spy.getCall(0).args[1], expectedCb, 'got expected cb argument') - - test.open(expectedOptions, expectedCb) - - t.equal(spy.callCount, 2, 'got _open() call') - t.equal(spy.getCall(1).thisValue, test, '`this` on _open() was correct') - t.equal(spy.getCall(1).args.length, 2, 'got two arguments') - t.deepEqual(spy.getCall(1).args[0], expectedOptions, 'got blank options argument') - t.equal(spy.getCall(1).args[1], expectedCb, 'got expected cb argument') - t.end() -}) - -tap.test('test close() extensibility', function (t) { - var spy = sinon.spy() - , expectedCb = function () {} - , test - - function Test (location) { - AbstractLevelDOWN.call(this, location) - } - - util.inherits(Test, AbstractLevelDOWN) - - Test.prototype._close = spy - - test = new Test('foobar') - test.close(expectedCb) - - t.equal(spy.callCount, 1, 'got _close() call') - t.equal(spy.getCall(0).thisValue, test, '`this` on _close() was correct') - t.equal(spy.getCall(0).args.length, 1, 'got one arguments') - t.equal(spy.getCall(0).args[0], expectedCb, 'got expected cb argument') - t.end() -}) - -tap.test('test get() extensibility', function (t) { - var spy = sinon.spy() - , expectedCb = function () {} - , expectedOptions = { options: 1 } - , expectedKey = 'a key' - , test - - function Test (location) { - AbstractLevelDOWN.call(this, location) - } - - util.inherits(Test, AbstractLevelDOWN) - - Test.prototype._get = spy - - test = new Test('foobar') - test.get(expectedKey, expectedCb) - - t.equal(spy.callCount, 1, 'got _get() call') - t.equal(spy.getCall(0).thisValue, test, '`this` on _get() was correct') - t.equal(spy.getCall(0).args.length, 3, 'got three arguments') - t.equal(spy.getCall(0).args[0], expectedKey, 'got expected key argument') - t.deepEqual(spy.getCall(0).args[1], {}, 'got blank options argument') - t.equal(spy.getCall(0).args[2], expectedCb, 'got expected cb argument') - - test.get(expectedKey, expectedOptions, expectedCb) - - t.equal(spy.callCount, 2, 'got _get() call') - t.equal(spy.getCall(1).thisValue, test, '`this` on _get() was correct') - t.equal(spy.getCall(1).args.length, 3, 'got three arguments') - t.equal(spy.getCall(1).args[0], expectedKey, 'got expected key argument') - t.deepEqual(spy.getCall(1).args[1], expectedOptions, 'got blank options argument') - t.equal(spy.getCall(1).args[2], expectedCb, 'got expected cb argument') - t.end() -}) - -tap.test('test del() extensibility', function (t) { - var spy = sinon.spy() - , expectedCb = function () {} - , expectedOptions = { options: 1 } - , expectedKey = 'a key' - , test - - function Test (location) { - AbstractLevelDOWN.call(this, location) - } - - util.inherits(Test, AbstractLevelDOWN) - - Test.prototype._del = spy - - test = new Test('foobar') - test.del(expectedKey, expectedCb) - - t.equal(spy.callCount, 1, 'got _del() call') - t.equal(spy.getCall(0).thisValue, test, '`this` on _del() was correct') - t.equal(spy.getCall(0).args.length, 3, 'got three arguments') - t.equal(spy.getCall(0).args[0], expectedKey, 'got expected key argument') - t.deepEqual(spy.getCall(0).args[1], {}, 'got blank options argument') - t.equal(spy.getCall(0).args[2], expectedCb, 'got expected cb argument') - - test.del(expectedKey, expectedOptions, expectedCb) - - t.equal(spy.callCount, 2, 'got _del() call') - t.equal(spy.getCall(1).thisValue, test, '`this` on _del() was correct') - t.equal(spy.getCall(1).args.length, 3, 'got three arguments') - t.equal(spy.getCall(1).args[0], expectedKey, 'got expected key argument') - t.deepEqual(spy.getCall(1).args[1], expectedOptions, 'got blank options argument') - t.equal(spy.getCall(1).args[2], expectedCb, 'got expected cb argument') - t.end() -}) - -tap.test('test put() extensibility', function (t) { - var spy = sinon.spy() - , expectedCb = function () {} - , expectedOptions = { options: 1 } - , expectedKey = 'a key' - , expectedValue = 'a value' - , test - - function Test (location) { - AbstractLevelDOWN.call(this, location) - } - - util.inherits(Test, AbstractLevelDOWN) - - Test.prototype._put = spy - - test = new Test('foobar') - test.put(expectedKey, expectedValue, expectedCb) - - t.equal(spy.callCount, 1, 'got _put() call') - t.equal(spy.getCall(0).thisValue, test, '`this` on _put() was correct') - t.equal(spy.getCall(0).args.length, 4, 'got four arguments') - t.equal(spy.getCall(0).args[0], expectedKey, 'got expected key argument') - t.equal(spy.getCall(0).args[1], expectedValue, 'got expected value argument') - t.deepEqual(spy.getCall(0).args[2], {}, 'got blank options argument') - t.equal(spy.getCall(0).args[3], expectedCb, 'got expected cb argument') - - test.put(expectedKey, expectedValue, expectedOptions, expectedCb) - - t.equal(spy.callCount, 2, 'got _put() call') - t.equal(spy.getCall(1).thisValue, test, '`this` on _put() was correct') - t.equal(spy.getCall(1).args.length, 4, 'got four arguments') - t.equal(spy.getCall(1).args[0], expectedKey, 'got expected key argument') - t.equal(spy.getCall(1).args[1], expectedValue, 'got expected value argument') - t.deepEqual(spy.getCall(1).args[2], expectedOptions, 'got blank options argument') - t.equal(spy.getCall(1).args[3], expectedCb, 'got expected cb argument') - t.end() -}) - -tap.test('test approximateSize() extensibility', function (t) { - var spy = sinon.spy() - , expectedCb = function () {} - , expectedStart = 'a start' - , expectedEnd = 'an end' - , test - - function Test (location) { - AbstractLevelDOWN.call(this, location) - } - - util.inherits(Test, AbstractLevelDOWN) - - Test.prototype._approximateSize = spy - - test = new Test('foobar') - test.approximateSize(expectedStart, expectedEnd, expectedCb) - - t.equal(spy.callCount, 1, 'got _approximateSize() call') - t.equal(spy.getCall(0).thisValue, test, '`this` on _approximateSize() was correct') - t.equal(spy.getCall(0).args.length, 3, 'got three arguments') - t.equal(spy.getCall(0).args[0], expectedStart, 'got expected start argument') - t.equal(spy.getCall(0).args[1], expectedEnd, 'got expected end argument') - t.equal(spy.getCall(0).args[2], expectedCb, 'got expected cb argument') - t.end() -}) - -tap.test('test batch() extensibility', function (t) { - var spy = sinon.spy() - , expectedCb = function () {} - , expectedOptions = { options: 1 } - , expectedArray = [ 1, 2 ] - , test - - function Test (location) { - AbstractLevelDOWN.call(this, location) - } - - util.inherits(Test, AbstractLevelDOWN) - - Test.prototype._batch = spy - - test = new Test('foobar') - - test.batch(expectedArray, expectedCb) - - t.equal(spy.callCount, 1, 'got _batch() call') - t.equal(spy.getCall(0).thisValue, test, '`this` on _batch() was correct') - t.equal(spy.getCall(0).args.length, 3, 'got three arguments') - t.equal(spy.getCall(0).args[0], expectedArray, 'got expected array argument') - t.deepEqual(spy.getCall(0).args[1], {}, 'got expected options argument') - t.equal(spy.getCall(0).args[2], expectedCb, 'got expected callback argument') - - test.batch(expectedArray, expectedOptions, expectedCb) - - t.equal(spy.callCount, 2, 'got _batch() call') - t.equal(spy.getCall(1).thisValue, test, '`this` on _batch() was correct') - t.equal(spy.getCall(1).args.length, 3, 'got three arguments') - t.equal(spy.getCall(1).args[0], expectedArray, 'got expected array argument') - t.deepEqual(spy.getCall(1).args[1], expectedOptions, 'got expected options argument') - t.equal(spy.getCall(1).args[2], expectedCb, 'got expected callback argument') - - t.end() -}) - -tap.test('test chained batch() (array) extensibility', function (t) { - var spy = sinon.spy() - , expectedCb = function () {} - , expectedOptions = { options: 1 } - , expectedArray = [ 1, 2 ] - , test - - function Test (location) { - AbstractLevelDOWN.call(this, location) - } - - util.inherits(Test, AbstractLevelDOWN) - - Test.prototype._batch = spy - - test = new Test('foobar') - - test.batch().put('foo', 'bar').del('bang').write(expectedCb) - - t.equal(spy.callCount, 1, 'got _batch() call') - t.equal(spy.getCall(0).thisValue, test, '`this` on _batch() was correct') - t.equal(spy.getCall(0).args.length, 3, 'got three arguments') - t.equal(spy.getCall(0).args[0].length, 2, 'got expected array argument') - t.deepEqual(spy.getCall(0).args[0][0], { type: 'put', key: 'foo', value: 'bar' }, 'got expected array argument[0]') - t.deepEqual(spy.getCall(0).args[0][1], { type: 'del', key: 'bang' }, 'got expected array argument[1]') - t.deepEqual(spy.getCall(0).args[1], {}, 'got expected options argument') - t.equal(spy.getCall(0).args[2], expectedCb, 'got expected callback argument') - - test.batch().put('foo', 'bar').del('bang').write(expectedOptions, expectedCb) - - t.equal(spy.callCount, 2, 'got _batch() call') - t.equal(spy.getCall(1).thisValue, test, '`this` on _batch() was correct') - t.equal(spy.getCall(1).args.length, 3, 'got three arguments') - t.equal(spy.getCall(1).args[0].length, 2, 'got expected array argument') - t.deepEqual(spy.getCall(1).args[0][0], { type: 'put', key: 'foo', value: 'bar' }, 'got expected array argument[0]') - t.deepEqual(spy.getCall(1).args[0][1], { type: 'del', key: 'bang' }, 'got expected array argument[1]') - t.deepEqual(spy.getCall(1).args[1], expectedOptions, 'got expected options argument') - t.equal(spy.getCall(1).args[2], expectedCb, 'got expected callback argument') - - t.end() -}) - -tap.test('test chained batch() (custom _chainedBatch) extensibility', function (t) { - var spy = sinon.spy() - , test - - function Test (location) { - AbstractLevelDOWN.call(this, location) - } - - util.inherits(Test, AbstractLevelDOWN) - - Test.prototype._chainedBatch = spy - - test = new Test('foobar') - - test.batch() - - t.equal(spy.callCount, 1, 'got _chainedBatch() call') - t.equal(spy.getCall(0).thisValue, test, '`this` on _chainedBatch() was correct') - - test.batch() - - t.equal(spy.callCount, 2, 'got _chainedBatch() call') - t.equal(spy.getCall(1).thisValue, test, '`this` on _chainedBatch() was correct') - - t.end() -}) - -tap.test('test AbstractChainedBatch extensibility', function (t) { - function Test (db) { - AbstractChainedBatch.call(this, db) - t.equal(this._db, db, 'db set on `this`') - t.end() - } - - util.inherits(Test, AbstractChainedBatch) - - new Test('foobar') -}) - -tap.test('test write() extensibility', function (t) { - var spy = sinon.spy() - , spycb = sinon.spy() - , test - - function Test (db) { - AbstractChainedBatch.call(this, db) - } - - util.inherits(Test, AbstractChainedBatch) - - Test.prototype._write = spy - - test = new Test('foobar') - test.write(spycb) - - t.equal(spy.callCount, 1, 'got _write() call') - t.equal(spy.getCall(0).thisValue, test, '`this` on _write() was correct') - t.equal(spy.getCall(0).args.length, 1, 'got one argument') - // awkward here cause of nextTick & an internal wrapped cb - t.type(spy.getCall(0).args[0], 'function', 'got a callback function') - t.equal(spycb.callCount, 0, 'spycb not called') - spy.getCall(0).args[0]() - t.equal(spycb.callCount, 1, 'spycb called, i.e. was our cb argument') - t.end() -}) - -tap.test('test put() extensibility', function (t) { - var spy = sinon.spy() - , expectedKey = 'key' - , expectedValue = 'value' - , returnValue - , test - - function Test (db) { - AbstractChainedBatch.call(this, db) - } - - util.inherits(Test, AbstractChainedBatch) - - Test.prototype._put = spy - - test = new Test(factory('foobar')) - returnValue = test.put(expectedKey, expectedValue) - t.equal(spy.callCount, 1, 'got _put call') - t.equal(spy.getCall(0).thisValue, test, '`this` on _put() was correct') - t.equal(spy.getCall(0).args.length, 2, 'got two arguments') - t.equal(spy.getCall(0).args[0], expectedKey, 'got expected key argument') - t.equal(spy.getCall(0).args[1], expectedValue, 'got expected value argument') - t.equal(returnValue, test, 'get expected return value') - t.end() -}) - -tap.test('test del() extensibility', function (t) { - var spy = sinon.spy() - , expectedKey = 'key' - , returnValue - , test - - function Test (db) { - AbstractChainedBatch.call(this, db) - } - - util.inherits(Test, AbstractChainedBatch) - - Test.prototype._del = spy - - test = new Test(factory('foobar')) - returnValue = test.del(expectedKey) - t.equal(spy.callCount, 1, 'got _del call') - t.equal(spy.getCall(0).thisValue, test, '`this` on _del() was correct') - t.equal(spy.getCall(0).args.length, 1, 'got one argument') - t.equal(spy.getCall(0).args[0], expectedKey, 'got expected key argument') - t.equal(returnValue, test, 'get expected return value') - t.end() -}) - -tap.test('test clear() extensibility', function (t) { - var spy = sinon.spy() - , returnValue - , test - - function Test (db) { - AbstractChainedBatch.call(this, db) - } - - util.inherits(Test, AbstractChainedBatch) - - Test.prototype._clear = spy - - test = new Test(factory('foobar')) - returnValue = test.clear() - t.equal(spy.callCount, 1, 'got _clear call') - t.equal(spy.getCall(0).thisValue, test, '`this` on _clear() was correct') - t.equal(spy.getCall(0).args.length, 0, 'got zero arguments') - t.equal(returnValue, test, 'get expected return value') - t.end() -}) - -tap.test('test iterator() extensibility', function (t) { - var spy = sinon.spy() - , expectedOptions = { options: 1, reverse: false } // reverse now explicitly set - , test - - function Test (location) { - AbstractLevelDOWN.call(this, location) - } - - util.inherits(Test, AbstractLevelDOWN) - - Test.prototype._iterator = spy - - test = new Test('foobar') - test.iterator({ options: 1 }) - - t.equal(spy.callCount, 1, 'got _close() call') - t.equal(spy.getCall(0).thisValue, test, '`this` on _close() was correct') - t.equal(spy.getCall(0).args.length, 1, 'got one arguments') - t.deepEqual(spy.getCall(0).args[0], expectedOptions, 'got expected options argument') - t.end() -}) - -tap.test('test AbstractIterator extensibility', function (t) { - function Test (db) { - AbstractIterator.call(this, db) - t.equal(this.db, db, 'db set on `this`') - t.end() - } - - util.inherits(Test, AbstractIterator) - - ;new Test('foobar') -}) - -tap.test('test next() extensibility', function (t) { - var spy = sinon.spy() - , spycb = sinon.spy() - , test - - function Test (db) { - AbstractIterator.call(this, db) - } - - util.inherits(Test, AbstractIterator) - - Test.prototype._next = spy - - test = new Test('foobar') - test.next(spycb) - - t.equal(spy.callCount, 1, 'got _next() call') - t.equal(spy.getCall(0).thisValue, test, '`this` on _next() was correct') - t.equal(spy.getCall(0).args.length, 1, 'got one arguments') - // awkward here cause of nextTick & an internal wrapped cb - t.type(spy.getCall(0).args[0], 'function', 'got a callback function') - t.equal(spycb.callCount, 0, 'spycb not called') - spy.getCall(0).args[0]() - t.equal(spycb.callCount, 1, 'spycb called, i.e. was our cb argument') - t.end() -}) - -tap.test('test end() extensibility', function (t) { - var spy = sinon.spy() - , expectedCb = function () {} - , test - - function Test (db) { - AbstractIterator.call(this, db) - } - - util.inherits(Test, AbstractIterator) - - Test.prototype._end = spy - - test = new Test('foobar') - test.end(expectedCb) - - t.equal(spy.callCount, 1, 'got _end() call') - t.equal(spy.getCall(0).thisValue, test, '`this` on _end() was correct') - t.equal(spy.getCall(0).args.length, 1, 'got one arguments') - t.equal(spy.getCall(0).args[0], expectedCb, 'got expected cb argument') - t.end() -}) diff --git a/node_modules/browserify-fs/node_modules/level-js/node_modules/abstract-leveldown/testCommon.js b/node_modules/browserify-fs/node_modules/level-js/node_modules/abstract-leveldown/testCommon.js deleted file mode 100644 index 3f9d29da..00000000 --- a/node_modules/browserify-fs/node_modules/level-js/node_modules/abstract-leveldown/testCommon.js +++ /dev/null @@ -1,75 +0,0 @@ -var path = require('path') - , fs = !process.browser && require('fs') - , rimraf = !process.browser && require('rimraf') - -var dbidx = 0 - - , location = function () { - return path.join(__dirname, '_leveldown_test_db_' + dbidx++) - } - - , lastLocation = function () { - return path.join(__dirname, '_leveldown_test_db_' + dbidx) - } - - , cleanup = function (callback) { - if (process.browser) - return callback() - - fs.readdir(__dirname, function (err, list) { - if (err) return callback(err) - - list = list.filter(function (f) { - return (/^_leveldown_test_db_/).test(f) - }) - - if (!list.length) - return callback() - - var ret = 0 - - list.forEach(function (f) { - rimraf(path.join(__dirname, f), function (err) { - if (++ret == list.length) - callback() - }) - }) - }) - } - - , setUp = function (t) { - cleanup(function (err) { - t.notOk(err, 'cleanup returned an error') - t.end() - }) - } - - , tearDown = function (t) { - setUp(t) // same cleanup! - } - - , collectEntries = function (iterator, callback) { - var data = [] - , next = function () { - iterator.next(function (err, key, value) { - if (err) return callback(err) - if (!arguments.length) { - return iterator.end(function (err) { - callback(err, data) - }) - } - data.push({ key: key, value: value }) - process.nextTick(next) - }) - } - next() - } - -module.exports = { - location : location - , cleanup : cleanup - , lastLocation : lastLocation - , setUp : setUp - , tearDown : tearDown - , collectEntries : collectEntries -} diff --git a/node_modules/browserify-fs/node_modules/level-js/node_modules/idb-wrapper/.editorconfig b/node_modules/browserify-fs/node_modules/level-js/node_modules/idb-wrapper/.editorconfig deleted file mode 100644 index fd348ca8..00000000 --- a/node_modules/browserify-fs/node_modules/level-js/node_modules/idb-wrapper/.editorconfig +++ /dev/null @@ -1,14 +0,0 @@ -root = true - -# Unix-style newlines with a newline ending every file -[*] -end_of_line = lf -insert_final_newline = true -trim_trailing_whitespace = true - -# Matches multiple files with brace expansion notation -# Set default charset -[*.{js,html}] -charset = utf-8 -indent_style = space -indent_size = 4 diff --git a/node_modules/browserify-fs/node_modules/level-js/node_modules/idb-wrapper/.jshintrc b/node_modules/browserify-fs/node_modules/level-js/node_modules/idb-wrapper/.jshintrc deleted file mode 100644 index da3d84d6..00000000 --- a/node_modules/browserify-fs/node_modules/level-js/node_modules/idb-wrapper/.jshintrc +++ /dev/null @@ -1,24 +0,0 @@ -{ - "bitwise": true, - "curly": true, - "eqeqeq": false, - "forin": false, - "freeze": true, - "futurehostile": true, - "latedef": "nofunc", - "noarg": true, - "nonbsp": true, - "nonew": true, - "strict": "function", - "undef": true, - "unused": true, - - "expr": true, - - "camelcase": true, - "quotmark": "single", - "newcap": true, - - "browser": true, - "worker": true -} diff --git a/node_modules/browserify-fs/node_modules/level-js/node_modules/idb-wrapper/.npmignore b/node_modules/browserify-fs/node_modules/level-js/node_modules/idb-wrapper/.npmignore deleted file mode 100644 index 069134c7..00000000 --- a/node_modules/browserify-fs/node_modules/level-js/node_modules/idb-wrapper/.npmignore +++ /dev/null @@ -1,6 +0,0 @@ -.idea -.git* -node_modules -test -doc -example diff --git a/node_modules/browserify-fs/node_modules/level-js/node_modules/idb-wrapper/CHANGELOG b/node_modules/browserify-fs/node_modules/level-js/node_modules/idb-wrapper/CHANGELOG deleted file mode 100644 index d0d9a6c5..00000000 --- a/node_modules/browserify-fs/node_modules/level-js/node_modules/idb-wrapper/CHANGELOG +++ /dev/null @@ -1,151 +0,0 @@ -1.7.1 / 2016-08-31 ------------------- - -* Improve error handling during store creation -* For the full changelog, please see: https://github.com/jensarps/IDBWrapper/compare/v1.7.0...v1.7.1 - - - -1.7.0 / 2016-04-01 ------------------- - -* Add `filter` option to `query()` -* Add `allowItemRejection` option to `iterate()` -* For the full changelog, please see: https://github.com/jensarps/IDBWrapper/compare/v1.6.2...v1.7.0 - - - -1.6.2 / 2016-03-02 ------------------- - -* Switch from Makefile to Grunt for running tasks -* Provide version-specific documentation -* For the full changelog, please see: https://github.com/jensarps/IDBWrapper/compare/v1.6.1...v1.6.2 - - - -1.6.1 / 2015-11-07 ------------------- - -* Make implementation preference configurable, don't prefer shim by default -* For the full changelog, please see: https://github.com/jensarps/IDBWrapper/compare/v1.6.0...v1.6.1 - - - -1.6.0 / 2015-10-05 ------------------- - -* Remove support for old Firefox browsers without autoIncrement -* prefer `shimIndexedDB` to allow using the shim instead of native IDB on buggy Safaris -* For the full changelog, please see: https://github.com/jensarps/IDBWrapper/compare/v1.5...v1.6.0 - - - -1.5.0 / 2015-04-22 ------------------- - -* Add pagination to `query()` -* Add `upsertBatch()` -* Add callbacks to `deleteDatabase()` -* Stability improvements - - - -1.4.1 / 2013-11-11 ------------------- - -* Support deletion of indexes through constructor arguments -* Fix issue when using out-of-line keyPath setup with IE10 -* Fix issue when using compound indexes (keyPath sequences) -* Add integration tests - - - -1.4.0 / 2013-09-24 ------------------- - -* Add .only property to makeKeyRange() options -* Add getBatch() method -* Fix bug when calling IDBStore without arguments -* Fix bug when calling IDBStore with ready callback as only argument -* Point IDBStore prototype's constructor property to IDBStore -* Make all methods that open a transaction return this transaction. These - methods are: put, get, remove, getAll, clear, batch, putBatch, removeBatch, - getBatch, iterate, query and count -* Stability improvements - - - -1.3.0 / 2013-08-13 ------------------- - -* Make IDBWrapper able to run inside of Workers -* Add putBatch() and removeBatch() methods -* Add worker example -* Move JSHint settings to own config file - - - -1.2.0 / 2013-05-31 ------------------- - -* Add autoContinue option to iterate() method [maxogden] -* Make put() method work with out-of-line keys [maxogden] -* Make batch() method work with out-of-line keys [maxogden] -* Misc Refactoring - - - -1.1.0 / 2013-03-26 ------------------- - -* Move all callbacks from request level to transaction level -* Misc Refactoring - - - -1.0.0 / 2013-02-05 ------------------- - -* Add query() method -* Add storePrefix property to constructor [englercj] -* Add JSDoc -* Add input checks to the batch() method -* Add Closure Compiler to repository -* Add MAKEFILE -* Misc cleanup - - - -0.3.1 / 2013-01-04 ------------------- - -* lowercase idbstore.js -* Add minified version -* Add version property to IDBStore - - - -0.3.0 / 2012-12-18 ------------------- - -* Fix potentially non-unique generated IDs -* Add batch() method [Raynos] -* Fix a bug where the success handler could be called even if there was an error -* Fix a bug where old IndexedDB implementations were not detected successfully - - - -0.2.1 / 2012-11-20 ------------------- - -* Add error handler to constructor -* Remove support for numeric transaction and cursor types. -* Misc cleanup - - - -0.2.0 / 2012-11-20 ------------------- - -* Start versioning diff --git a/node_modules/browserify-fs/node_modules/level-js/node_modules/idb-wrapper/Gruntfile.js b/node_modules/browserify-fs/node_modules/level-js/node_modules/idb-wrapper/Gruntfile.js deleted file mode 100644 index c3f5717a..00000000 --- a/node_modules/browserify-fs/node_modules/level-js/node_modules/idb-wrapper/Gruntfile.js +++ /dev/null @@ -1,132 +0,0 @@ -/*global module,require */ -module.exports = function (grunt) { - - 'use strict'; - - var fs = require('fs'); - - var pkg = grunt.file.readJSON('package.json'); - - var additionalCSS = [ - '.navbar { display: none; }', - '#toc { top: 0; }' - ]; - - grunt.initConfig({ - - pkg: pkg, - - jshint: { - all: ['Gruntfile.js', pkg.main], - options: { - jshintrc: '.jshintrc' - } - }, - - jsdoc: { - dist: { - src: [pkg.main], - options: { - destination: 'doc/' + pkg.version, - private: false, - template: './node_modules/jsdoc-oblivion/template', - configure: 'conf.json' - } - } - }, - - closurecompiler: { - minify: { - files: { - 'idbstore.min.js': [pkg.main] - }, - options: { - 'compilation_level': 'SIMPLE_OPTIMIZATIONS' - } - } - }, - - karma: { - postbuild: { - configFile: 'karma.conf.js', - files: { - src: [ - 'idbstore.min.js', - 'test/**/*spec.js' - ] - } - }, - dev: { - configFile: 'karma.conf.js' - } - } - }); - - grunt.loadNpmTasks('grunt-contrib-jshint'); - grunt.loadNpmTasks('grunt-jsdoc'); - grunt.loadNpmTasks('grunt-closurecompiler'); - grunt.loadNpmTasks('grunt-karma'); - grunt.loadNpmTasks('grunt-contrib-copy'); - - /* doc related code */ - - var indexTemplate = '' + - '' + - 'Available IDBWrapper Documentation' + - '

Available IDBWrapper documentation:

' + - '
    {{list}}
' + - ''; - - grunt.registerTask('modifyDocs', function () { - var docPath = 'doc/' + pkg.version, - styleSheet = docPath + '/styles/site.oblivion.css', - css = grunt.file.read(styleSheet); - - css += additionalCSS.join('\n') + '\n'; - grunt.file.write(styleSheet, css); - }); - - grunt.registerTask('copyLatestDocs', function () { - grunt.config.set('copy.docs', { - cwd: 'doc/' + pkg.version, - src: '**/*', - dest: 'doc/latest/', - expand: true - }); - grunt.task.run('copy:docs'); - }); - - grunt.registerTask('writeDocIndex', function () { - var list = fs.readdirSync('doc').filter(function (entry) { - return grunt.file.isDir('doc/' + entry); - }).map(function (entry) { - return '
  • ' + entry + '
  • '; - }).join(''); - - var index = indexTemplate.replace('{{list}}', list); - grunt.file.write('doc/index.html', index); - }); - - - //################// - // Main Tasks // - //################// - - grunt.registerTask('test', [ - 'karma:dev' - ]); - - grunt.registerTask('docs', [ - 'jsdoc:dist', - 'modifyDocs', - 'copyLatestDocs', - 'writeDocIndex' - ]); - - grunt.registerTask('build', [ - 'jshint', - 'karma:dev', - 'closurecompiler', - 'karma:postbuild' - ]); -}; diff --git a/node_modules/browserify-fs/node_modules/level-js/node_modules/idb-wrapper/LICENSE b/node_modules/browserify-fs/node_modules/level-js/node_modules/idb-wrapper/LICENSE deleted file mode 100644 index d507d823..00000000 --- a/node_modules/browserify-fs/node_modules/level-js/node_modules/idb-wrapper/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (c) 2011 - 2016 Jens Arps - -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/node_modules/browserify-fs/node_modules/level-js/node_modules/idb-wrapper/README.md b/node_modules/browserify-fs/node_modules/level-js/node_modules/idb-wrapper/README.md deleted file mode 100644 index 4d40afd9..00000000 --- a/node_modules/browserify-fs/node_modules/level-js/node_modules/idb-wrapper/README.md +++ /dev/null @@ -1,114 +0,0 @@ -[![NPM version](https://badge.fury.io/js/idb-wrapper.svg)](http://badge.fury.io/js/idb-wrapper) -[![Dependency Status](https://gemnasium.com/jensarps/IDBWrapper.png)](https://gemnasium.com/jensarps/IDBWrapper) - - -**IDBWrapper** is a cross-browser wrapper for the HTML5 IndexedDB API. While this -API is the future of offline storage, it is not very intuitive to use. -IDBWrapper is there to provide easy access to IndexedDB's features. - -Browser Support ---- - -IDBWrapper works on all browsers supporting the IndexedDB API, which are: - -**Desktop** - -Chrome, Firefox, Opera 15+, IE 10+, Safari 8+ - -**Mobile** - -Chrome for Android, Firefox for Android, Opera for Android, IE10 for WP8, iOS 8+ - -**Worker** - -IDBWrapper runs inside of a worker on following browsers: - -Chrome (also on Android), Firefox (also on Android), Opera (also on Android), IE10+ (also on WP8+) - -If using in an older browser supporting WebSql along with [IndexedDBShim](https://github.com/axemclion/IndexedDBShim), IndexedDBShim needs to run first. - -Note on limited/buggy IndexedDB support: - -* IE has limited support, which can be fixed by including [idb-iegap](https://github.com/dfahlander/idb-iegap) -* Safari has buggy support, which can be fixed by using the above mentioned shim -* Details on how to change the implementation being used can be found in the [wiki](https://github.com/jensarps/IDBWrapper/wiki/Usage#defining-implementation-preference-aka-make-idbwrapper-use-the-shim) -* Here's a guide to [feature detecting limited/buggy IndexedDB support](http://jensarps.de/2015/12/16/how-to-detect-buggy-indexeddb-implementations/) - -Using IDBWrapper -=== - -Tutorials ---- - -There are two tutorials to get you up and running: - -Part 1: Setup and CRUD operations -http://jensarps.de/2011/11/25/working-with-idbwrapper-part-1/ - -Part 2: Running Queries against the store -http://jensarps.de/2012/11/13/working-with-idbwrapper-part-2/ - -Examples ---- - -There are some examples to run right in your browser over here: http://jensarps.github.io/IDBWrapper/example/ - -The source for these examples are in the `example` folder of this repository. - -Wiki ---- - -For usage instructions, details about mothods for reading and writing -data, setting up indexes and running queries, please refer to the -[Wiki](https://github.com/jensarps/IDBWrapper/wiki). - -API Reference ---- - -There's an API reference over here: http://jensarps.github.io/IDBWrapper/doc/latest/IDBStore.html - -For references of older versions, please refer to this index: http://jensarps.github.io/IDBWrapper/doc/ - -Obtaining IDBWrapper -=== - -cdnjs ---- - -IDBWrapper is also available on [cdnjs](http://cdnjs.com/). You can directly -point a script tag there, or `require()` it from there. cdnjs supports http, -https and spdy, so you can just leave the protocol off. The URLs for the -different versions of IDBWrapper can be found here: -[https://cdnjs.com/libraries/idbwrapper](https://cdnjs.com/libraries/idbwrapper) - -Package Managers ---- - -If you use NPM as your package manager, you can get it from there, too, by -running: - -```bash -$ npm install idb-wrapper -``` - -If you use bower as your package manager, run the following: - -```bash -$ bower install idbwrapper -``` - -If you want to add IDBWrapper to a volo project, just run: - -```bash -$ volo add idbwrapper -``` - -git ---- - -You can git clone the repository, or download a zip file here: https://github.com/jensarps/IDBWrapper/releases - -License -=== - -[MIT style (X11)](https://github.com/jensarps/IDBWrapper/blob/master/LICENSE) diff --git a/node_modules/browserify-fs/node_modules/level-js/node_modules/idb-wrapper/conf.json b/node_modules/browserify-fs/node_modules/level-js/node_modules/idb-wrapper/conf.json deleted file mode 100644 index 57c27d43..00000000 --- a/node_modules/browserify-fs/node_modules/level-js/node_modules/idb-wrapper/conf.json +++ /dev/null @@ -1,26 +0,0 @@ -{ - "tags": { - "allowUnknownTags": true - }, - "source": { - "includePattern": ".+\\.js(doc)?$", - "excludePattern": "(^|\\/|\\\\)_" - }, - "plugins": [], - "templates": { - "cleverLinks": false, - "monospaceLinks": false, - "default": { - "outputSourceFiles": true - }, - "systemName": "IDBWrapper", - "footer": "", - "copyright": "Copyright © 2016 Jens Arps", - "navType": "vertical", - "outputSourceFiles": true, - "theme": "oblivion", - "linenums": true, - "collapseSymbols": false, - "inverseNav": false - } -} diff --git a/node_modules/browserify-fs/node_modules/level-js/node_modules/idb-wrapper/idbstore.js b/node_modules/browserify-fs/node_modules/level-js/node_modules/idb-wrapper/idbstore.js deleted file mode 100644 index 13a22318..00000000 --- a/node_modules/browserify-fs/node_modules/level-js/node_modules/idb-wrapper/idbstore.js +++ /dev/null @@ -1,1405 +0,0 @@ -/*global window:false, self:false, define:false, module:false */ - -/** - * @license IDBWrapper - A cross-browser wrapper for IndexedDB - * Version 1.7.1 - * Copyright (c) 2011 - 2016 Jens Arps - * http://jensarps.de/ - * - * Licensed under the MIT (X11) license - */ - -(function (name, definition, global) { - - 'use strict'; - - if (typeof define === 'function') { - define(definition); - } else if (typeof module !== 'undefined' && module.exports) { - module.exports = definition(); - } else { - global[name] = definition(); - } -})('IDBStore', function () { - - 'use strict'; - - var defaultErrorHandler = function (error) { - throw error; - }; - var defaultSuccessHandler = function () { - }; - - var defaults = { - storeName: 'Store', - storePrefix: 'IDBWrapper-', - dbVersion: 1, - keyPath: 'id', - autoIncrement: true, - onStoreReady: function () { - }, - onError: defaultErrorHandler, - indexes: [], - implementationPreference: [ - 'indexedDB', - 'webkitIndexedDB', - 'mozIndexedDB', - 'shimIndexedDB' - ] - }; - - /** - * - * The IDBStore constructor - * - * @constructor - * @name IDBStore - * @version 1.7.1 - * - * @param {Object} [kwArgs] An options object used to configure the store and - * set callbacks - * @param {String} [kwArgs.storeName='Store'] The name of the store - * @param {String} [kwArgs.storePrefix='IDBWrapper-'] A prefix that is - * internally used to construct the name of the database, which will be - * kwArgs.storePrefix + kwArgs.storeName - * @param {Number} [kwArgs.dbVersion=1] The version of the store - * @param {String} [kwArgs.keyPath='id'] The key path to use. If you want to - * setup IDBWrapper to work with out-of-line keys, you need to set this to - * `null` - * @param {Boolean} [kwArgs.autoIncrement=true] If set to true, IDBStore will - * automatically make sure a unique keyPath value is present on each object - * that is stored. - * @param {Function} [kwArgs.onStoreReady] A callback to be called when the - * store is ready to be used. - * @param {Function} [kwArgs.onError=throw] A callback to be called when an - * error occurred during instantiation of the store. - * @param {Array} [kwArgs.indexes=[]] An array of indexData objects - * defining the indexes to use with the store. For every index to be used - * one indexData object needs to be passed in the array. - * An indexData object is defined as follows: - * @param {Object} [kwArgs.indexes.indexData] An object defining the index to - * use - * @param {String} kwArgs.indexes.indexData.name The name of the index - * @param {String} [kwArgs.indexes.indexData.keyPath] The key path of the index - * @param {Boolean} [kwArgs.indexes.indexData.unique] Whether the index is unique - * @param {Boolean} [kwArgs.indexes.indexData.multiEntry] Whether the index is multi entry - * @param {Array} [kwArgs.implementationPreference=['indexedDB','webkitIndexedDB','mozIndexedDB','shimIndexedDB']] An array of strings naming implementations to be used, in order or preference - * @param {Function} [onStoreReady] A callback to be called when the store - * is ready to be used. - * @example - // create a store for customers with an additional index over the - // `lastname` property. - var myCustomerStore = new IDBStore({ - dbVersion: 1, - storeName: 'customer-index', - keyPath: 'customerid', - autoIncrement: true, - onStoreReady: populateTable, - indexes: [ - { name: 'lastname', keyPath: 'lastname', unique: false, multiEntry: false } - ] - }); - * @example - // create a generic store - var myCustomerStore = new IDBStore({ - storeName: 'my-data-store', - onStoreReady: function(){ - // start working with the store. - } - }); - */ - var IDBStore = function (kwArgs, onStoreReady) { - - if (typeof onStoreReady == 'undefined' && typeof kwArgs == 'function') { - onStoreReady = kwArgs; - } - if (Object.prototype.toString.call(kwArgs) != '[object Object]') { - kwArgs = {}; - } - - for (var key in defaults) { - this[key] = typeof kwArgs[key] != 'undefined' ? kwArgs[key] : defaults[key]; - } - - this.dbName = this.storePrefix + this.storeName; - this.dbVersion = parseInt(this.dbVersion, 10) || 1; - - onStoreReady && (this.onStoreReady = onStoreReady); - - var env = typeof window == 'object' ? window : self; - var availableImplementations = this.implementationPreference.filter(function (implName) { - return implName in env; - }); - this.implementation = availableImplementations[0]; - this.idb = env[this.implementation]; - this.keyRange = env.IDBKeyRange || env.webkitIDBKeyRange || env.mozIDBKeyRange; - - this.consts = { - 'READ_ONLY': 'readonly', - 'READ_WRITE': 'readwrite', - 'VERSION_CHANGE': 'versionchange', - 'NEXT': 'next', - 'NEXT_NO_DUPLICATE': 'nextunique', - 'PREV': 'prev', - 'PREV_NO_DUPLICATE': 'prevunique' - }; - - this.openDB(); - }; - - /** @lends IDBStore.prototype */ - var proto = { - - /** - * A pointer to the IDBStore ctor - * - * @private - * @type {Function} - * @constructs - */ - constructor: IDBStore, - - /** - * The version of IDBStore - * - * @type {String} - */ - version: '1.7.1', - - /** - * A reference to the IndexedDB object - * - * @type {IDBDatabase} - */ - db: null, - - /** - * The full name of the IndexedDB used by IDBStore, composed of - * this.storePrefix + this.storeName - * - * @type {String} - */ - dbName: null, - - /** - * The version of the IndexedDB used by IDBStore - * - * @type {Number} - */ - dbVersion: null, - - /** - * A reference to the objectStore used by IDBStore - * - * @type {IDBObjectStore} - */ - store: null, - - /** - * The store name - * - * @type {String} - */ - storeName: null, - - /** - * The prefix to prepend to the store name - * - * @type {String} - */ - storePrefix: null, - - /** - * The key path - * - * @type {String} - */ - keyPath: null, - - /** - * Whether IDBStore uses autoIncrement - * - * @type {Boolean} - */ - autoIncrement: null, - - /** - * The indexes used by IDBStore - * - * @type {Array} - */ - indexes: null, - - /** - * The implemantations to try to use, in order of preference - * - * @type {Array} - */ - implementationPreference: null, - - /** - * The actual implementation being used - * - * @type {String} - */ - implementation: '', - - /** - * The callback to be called when the store is ready to be used - * - * @type {Function} - */ - onStoreReady: null, - - /** - * The callback to be called if an error occurred during instantiation - * of the store - * - * @type {Function} - */ - onError: null, - - /** - * The internal insertID counter - * - * @type {Number} - * @private - */ - _insertIdCount: 0, - - /** - * Opens an IndexedDB; called by the constructor. - * - * Will check if versions match and compare provided index configuration - * with existing ones, and update indexes if necessary. - * - * Will call this.onStoreReady() if everything went well and the store - * is ready to use, and this.onError() is something went wrong. - * - * @private - * - */ - openDB: function () { - - var openRequest = this.idb.open(this.dbName, this.dbVersion); - var preventSuccessCallback = false; - - openRequest.onerror = function (errorEvent) { - - if (hasVersionError(errorEvent)) { - this.onError(new Error('The version number provided is lower than the existing one.')); - } else { - var error; - - if (errorEvent.target.error) { - error = errorEvent.target.error; - } else { - var errorMessage = 'IndexedDB unknown error occurred when opening DB ' + this.dbName + ' version ' + this.dbVersion; - if ('errorCode' in errorEvent.target) { - errorMessage += ' with error code ' + errorEvent.target.errorCode; - } - error = new Error(errorMessage); - } - - this.onError(error); - } - }.bind(this); - - openRequest.onsuccess = function (event) { - - if (preventSuccessCallback) { - return; - } - - if (this.db) { - this.onStoreReady(); - return; - } - - this.db = event.target.result; - - if (typeof this.db.version == 'string') { - this.onError(new Error('The IndexedDB implementation in this browser is outdated. Please upgrade your browser.')); - return; - } - - if (!this.db.objectStoreNames.contains(this.storeName)) { - // We should never ever get here. - // Lets notify the user anyway. - this.onError(new Error('Object store couldn\'t be created.')); - return; - } - - var emptyTransaction = this.db.transaction([this.storeName], this.consts.READ_ONLY); - this.store = emptyTransaction.objectStore(this.storeName); - - // check indexes - var existingIndexes = Array.prototype.slice.call(this.getIndexList()); - this.indexes.forEach(function (indexData) { - var indexName = indexData.name; - - if (!indexName) { - preventSuccessCallback = true; - this.onError(new Error('Cannot create index: No index name given.')); - return; - } - - this.normalizeIndexData(indexData); - - if (this.hasIndex(indexName)) { - // check if it complies - var actualIndex = this.store.index(indexName); - var complies = this.indexComplies(actualIndex, indexData); - if (!complies) { - preventSuccessCallback = true; - this.onError(new Error('Cannot modify index "' + indexName + '" for current version. Please bump version number to ' + ( this.dbVersion + 1 ) + '.')); - } - - existingIndexes.splice(existingIndexes.indexOf(indexName), 1); - } else { - preventSuccessCallback = true; - this.onError(new Error('Cannot create new index "' + indexName + '" for current version. Please bump version number to ' + ( this.dbVersion + 1 ) + '.')); - } - - }, this); - - if (existingIndexes.length) { - preventSuccessCallback = true; - this.onError(new Error('Cannot delete index(es) "' + existingIndexes.toString() + '" for current version. Please bump version number to ' + ( this.dbVersion + 1 ) + '.')); - } - - preventSuccessCallback || this.onStoreReady(); - }.bind(this); - - openRequest.onupgradeneeded = function (/* IDBVersionChangeEvent */ event) { - - this.db = event.target.result; - - if (this.db.objectStoreNames.contains(this.storeName)) { - this.store = event.target.transaction.objectStore(this.storeName); - } else { - var optionalParameters = {autoIncrement: this.autoIncrement}; - if (this.keyPath !== null) { - optionalParameters.keyPath = this.keyPath; - } - this.store = this.db.createObjectStore(this.storeName, optionalParameters); - } - - var existingIndexes = Array.prototype.slice.call(this.getIndexList()); - this.indexes.forEach(function (indexData) { - var indexName = indexData.name; - - if (!indexName) { - preventSuccessCallback = true; - this.onError(new Error('Cannot create index: No index name given.')); - } - - this.normalizeIndexData(indexData); - - if (this.hasIndex(indexName)) { - // check if it complies - var actualIndex = this.store.index(indexName); - var complies = this.indexComplies(actualIndex, indexData); - if (!complies) { - // index differs, need to delete and re-create - this.store.deleteIndex(indexName); - this.store.createIndex(indexName, indexData.keyPath, { - unique: indexData.unique, - multiEntry: indexData.multiEntry - }); - } - - existingIndexes.splice(existingIndexes.indexOf(indexName), 1); - } else { - this.store.createIndex(indexName, indexData.keyPath, { - unique: indexData.unique, - multiEntry: indexData.multiEntry - }); - } - - }, this); - - if (existingIndexes.length) { - existingIndexes.forEach(function (_indexName) { - this.store.deleteIndex(_indexName); - }, this); - } - - }.bind(this); - }, - - /** - * Deletes the database used for this store if the IDB implementations - * provides that functionality. - * - * @param {Function} [onSuccess] A callback that is called if deletion - * was successful. - * @param {Function} [onError] A callback that is called if deletion - * failed. - */ - deleteDatabase: function (onSuccess, onError) { - if (this.idb.deleteDatabase) { - this.db.close(); - var deleteRequest = this.idb.deleteDatabase(this.dbName); - deleteRequest.onsuccess = onSuccess; - deleteRequest.onerror = onError; - } else { - onError(new Error('Browser does not support IndexedDB deleteDatabase!')); - } - }, - - /********************* - * data manipulation * - *********************/ - - /** - * Puts an object into the store. If an entry with the given id exists, - * it will be overwritten. This method has a different signature for inline - * keys and out-of-line keys; please see the examples below. - * - * @param {*} [key] The key to store. This is only needed if IDBWrapper - * is set to use out-of-line keys. For inline keys - the default scenario - - * this can be omitted. - * @param {Object} value The data object to store. - * @param {Function} [onSuccess] A callback that is called if insertion - * was successful. - * @param {Function} [onError] A callback that is called if insertion - * failed. - * @returns {IDBTransaction} The transaction used for this operation. - * @example - // Storing an object, using inline keys (the default scenario): - var myCustomer = { - customerid: 2346223, - lastname: 'Doe', - firstname: 'John' - }; - myCustomerStore.put(myCustomer, mySuccessHandler, myErrorHandler); - // Note that passing success- and error-handlers is optional. - * @example - // Storing an object, using out-of-line keys: - var myCustomer = { - lastname: 'Doe', - firstname: 'John' - }; - myCustomerStore.put(2346223, myCustomer, mySuccessHandler, myErrorHandler); - // Note that passing success- and error-handlers is optional. - */ - put: function (key, value, onSuccess, onError) { - if (this.keyPath !== null) { - onError = onSuccess; - onSuccess = value; - value = key; - } - onError || (onError = defaultErrorHandler); - onSuccess || (onSuccess = defaultSuccessHandler); - - var hasSuccess = false, - result = null, - putRequest; - - var putTransaction = this.db.transaction([this.storeName], this.consts.READ_WRITE); - putTransaction.oncomplete = function () { - var callback = hasSuccess ? onSuccess : onError; - callback(result); - }; - putTransaction.onabort = onError; - putTransaction.onerror = onError; - - if (this.keyPath !== null) { // in-line keys - this._addIdPropertyIfNeeded(value); - putRequest = putTransaction.objectStore(this.storeName).put(value); - } else { // out-of-line keys - putRequest = putTransaction.objectStore(this.storeName).put(value, key); - } - putRequest.onsuccess = function (event) { - hasSuccess = true; - result = event.target.result; - }; - putRequest.onerror = onError; - - return putTransaction; - }, - - /** - * Retrieves an object from the store. If no entry exists with the given id, - * the success handler will be called with null as first and only argument. - * - * @param {*} key The id of the object to fetch. - * @param {Function} [onSuccess] A callback that is called if fetching - * was successful. Will receive the object as only argument. - * @param {Function} [onError] A callback that will be called if an error - * occurred during the operation. - * @returns {IDBTransaction} The transaction used for this operation. - */ - get: function (key, onSuccess, onError) { - onError || (onError = defaultErrorHandler); - onSuccess || (onSuccess = defaultSuccessHandler); - - var hasSuccess = false, - result = null; - - var getTransaction = this.db.transaction([this.storeName], this.consts.READ_ONLY); - getTransaction.oncomplete = function () { - var callback = hasSuccess ? onSuccess : onError; - callback(result); - }; - getTransaction.onabort = onError; - getTransaction.onerror = onError; - var getRequest = getTransaction.objectStore(this.storeName).get(key); - getRequest.onsuccess = function (event) { - hasSuccess = true; - result = event.target.result; - }; - getRequest.onerror = onError; - - return getTransaction; - }, - - /** - * Removes an object from the store. - * - * @param {*} key The id of the object to remove. - * @param {Function} [onSuccess] A callback that is called if the removal - * was successful. - * @param {Function} [onError] A callback that will be called if an error - * occurred during the operation. - * @returns {IDBTransaction} The transaction used for this operation. - */ - remove: function (key, onSuccess, onError) { - onError || (onError = defaultErrorHandler); - onSuccess || (onSuccess = defaultSuccessHandler); - - var hasSuccess = false, - result = null; - - var removeTransaction = this.db.transaction([this.storeName], this.consts.READ_WRITE); - removeTransaction.oncomplete = function () { - var callback = hasSuccess ? onSuccess : onError; - callback(result); - }; - removeTransaction.onabort = onError; - removeTransaction.onerror = onError; - - var deleteRequest = removeTransaction.objectStore(this.storeName)['delete'](key); - deleteRequest.onsuccess = function (event) { - hasSuccess = true; - result = event.target.result; - }; - deleteRequest.onerror = onError; - - return removeTransaction; - }, - - /** - * Runs a batch of put and/or remove operations on the store. - * - * @param {Array} dataArray An array of objects containing the operation to run - * and the data object (for put operations). - * @param {Function} [onSuccess] A callback that is called if all operations - * were successful. - * @param {Function} [onError] A callback that is called if an error - * occurred during one of the operations. - * @returns {IDBTransaction} The transaction used for this operation. - */ - batch: function (dataArray, onSuccess, onError) { - onError || (onError = defaultErrorHandler); - onSuccess || (onSuccess = defaultSuccessHandler); - - if (Object.prototype.toString.call(dataArray) != '[object Array]') { - onError(new Error('dataArray argument must be of type Array.')); - } else if (dataArray.length === 0) { - return onSuccess(true); - } - - var count = dataArray.length; - var called = false; - var hasSuccess = false; - - var batchTransaction = this.db.transaction([this.storeName], this.consts.READ_WRITE); - batchTransaction.oncomplete = function () { - var callback = hasSuccess ? onSuccess : onError; - callback(hasSuccess); - }; - batchTransaction.onabort = onError; - batchTransaction.onerror = onError; - - - var onItemSuccess = function () { - count--; - if (count === 0 && !called) { - called = true; - hasSuccess = true; - } - }; - - dataArray.forEach(function (operation) { - var type = operation.type; - var key = operation.key; - var value = operation.value; - - var onItemError = function (err) { - batchTransaction.abort(); - if (!called) { - called = true; - onError(err, type, key); - } - }; - - if (type == 'remove') { - var deleteRequest = batchTransaction.objectStore(this.storeName)['delete'](key); - deleteRequest.onsuccess = onItemSuccess; - deleteRequest.onerror = onItemError; - } else if (type == 'put') { - var putRequest; - if (this.keyPath !== null) { // in-line keys - this._addIdPropertyIfNeeded(value); - putRequest = batchTransaction.objectStore(this.storeName).put(value); - } else { // out-of-line keys - putRequest = batchTransaction.objectStore(this.storeName).put(value, key); - } - putRequest.onsuccess = onItemSuccess; - putRequest.onerror = onItemError; - } - }, this); - - return batchTransaction; - }, - - /** - * Takes an array of objects and stores them in a single transaction. - * - * @param {Array} dataArray An array of objects to store - * @param {Function} [onSuccess] A callback that is called if all operations - * were successful. - * @param {Function} [onError] A callback that is called if an error - * occurred during one of the operations. - * @returns {IDBTransaction} The transaction used for this operation. - */ - putBatch: function (dataArray, onSuccess, onError) { - var batchData = dataArray.map(function (item) { - return {type: 'put', value: item}; - }); - - return this.batch(batchData, onSuccess, onError); - }, - - /** - * Like putBatch, takes an array of objects and stores them in a single - * transaction, but allows processing of the result values. Returns the - * processed records containing the key for newly created records to the - * onSuccess calllback instead of only returning true or false for success. - * In addition, added the option for the caller to specify a key field that - * should be set to the newly created key. - * - * @param {Array} dataArray An array of objects to store - * @param {Object} [options] An object containing optional options - * @param {String} [options.keyField=this.keyPath] Specifies a field in the record to update - * with the auto-incrementing key. Defaults to the store's keyPath. - * @param {Function} [onSuccess] A callback that is called if all operations - * were successful. - * @param {Function} [onError] A callback that is called if an error - * occurred during one of the operations. - * @returns {IDBTransaction} The transaction used for this operation. - * - */ - upsertBatch: function (dataArray, options, onSuccess, onError) { - // handle `dataArray, onSuccess, onError` signature - if (typeof options == 'function') { - onSuccess = options; - onError = onSuccess; - options = {}; - } - - onError || (onError = defaultErrorHandler); - onSuccess || (onSuccess = defaultSuccessHandler); - options || (options = {}); - - if (Object.prototype.toString.call(dataArray) != '[object Array]') { - onError(new Error('dataArray argument must be of type Array.')); - } - - var keyField = options.keyField || this.keyPath; - var count = dataArray.length; - var called = false; - var hasSuccess = false; - var index = 0; // assume success callbacks are executed in order - - var batchTransaction = this.db.transaction([this.storeName], this.consts.READ_WRITE); - batchTransaction.oncomplete = function () { - if (hasSuccess) { - onSuccess(dataArray); - } else { - onError(false); - } - }; - batchTransaction.onabort = onError; - batchTransaction.onerror = onError; - - var onItemSuccess = function (event) { - var record = dataArray[index++]; - record[keyField] = event.target.result; - - count--; - if (count === 0 && !called) { - called = true; - hasSuccess = true; - } - }; - - dataArray.forEach(function (record) { - var key = record.key; - - var onItemError = function (err) { - batchTransaction.abort(); - if (!called) { - called = true; - onError(err); - } - }; - - var putRequest; - if (this.keyPath !== null) { // in-line keys - this._addIdPropertyIfNeeded(record); - putRequest = batchTransaction.objectStore(this.storeName).put(record); - } else { // out-of-line keys - putRequest = batchTransaction.objectStore(this.storeName).put(record, key); - } - putRequest.onsuccess = onItemSuccess; - putRequest.onerror = onItemError; - }, this); - - return batchTransaction; - }, - - /** - * Takes an array of keys and removes matching objects in a single - * transaction. - * - * @param {Array} keyArray An array of keys to remove - * @param {Function} [onSuccess] A callback that is called if all operations - * were successful. - * @param {Function} [onError] A callback that is called if an error - * occurred during one of the operations. - * @returns {IDBTransaction} The transaction used for this operation. - */ - removeBatch: function (keyArray, onSuccess, onError) { - var batchData = keyArray.map(function (key) { - return {type: 'remove', key: key}; - }); - - return this.batch(batchData, onSuccess, onError); - }, - - /** - * Takes an array of keys and fetches matching objects - * - * @param {Array} keyArray An array of keys identifying the objects to fetch - * @param {Function} [onSuccess] A callback that is called if all operations - * were successful. - * @param {Function} [onError] A callback that is called if an error - * occurred during one of the operations. - * @param {String} [arrayType='sparse'] The type of array to pass to the - * success handler. May be one of 'sparse', 'dense' or 'skip'. Defaults to - * 'sparse'. This parameter specifies how to handle the situation if a get - * operation did not throw an error, but there was no matching object in - * the database. In most cases, 'sparse' provides the most desired - * behavior. See the examples for details. - * @returns {IDBTransaction} The transaction used for this operation. - * @example - // given that there are two objects in the database with the keypath - // values 1 and 2, and the call looks like this: - myStore.getBatch([1, 5, 2], onError, function (data) { … }, arrayType); - - // this is what the `data` array will be like: - - // arrayType == 'sparse': - // data is a sparse array containing two entries and having a length of 3: - [Object, 2: Object] - 0: Object - 2: Object - length: 3 - // calling forEach on data will result in the callback being called two - // times, with the index parameter matching the index of the key in the - // keyArray. - - // arrayType == 'dense': - // data is a dense array containing three entries and having a length of 3, - // where data[1] is of type undefined: - [Object, undefined, Object] - 0: Object - 1: undefined - 2: Object - length: 3 - // calling forEach on data will result in the callback being called three - // times, with the index parameter matching the index of the key in the - // keyArray, but the second call will have undefined as first argument. - - // arrayType == 'skip': - // data is a dense array containing two entries and having a length of 2: - [Object, Object] - 0: Object - 1: Object - length: 2 - // calling forEach on data will result in the callback being called two - // times, with the index parameter not matching the index of the key in the - // keyArray. - */ - getBatch: function (keyArray, onSuccess, onError, arrayType) { - onError || (onError = defaultErrorHandler); - onSuccess || (onSuccess = defaultSuccessHandler); - arrayType || (arrayType = 'sparse'); - - if (Object.prototype.toString.call(keyArray) != '[object Array]') { - onError(new Error('keyArray argument must be of type Array.')); - } else if (keyArray.length === 0) { - return onSuccess([]); - } - - var data = []; - var count = keyArray.length; - var called = false; - var hasSuccess = false; - var result = null; - - var batchTransaction = this.db.transaction([this.storeName], this.consts.READ_ONLY); - batchTransaction.oncomplete = function () { - var callback = hasSuccess ? onSuccess : onError; - callback(result); - }; - batchTransaction.onabort = onError; - batchTransaction.onerror = onError; - - var onItemSuccess = function (event) { - if (event.target.result || arrayType == 'dense') { - data.push(event.target.result); - } else if (arrayType == 'sparse') { - data.length++; - } - count--; - if (count === 0) { - called = true; - hasSuccess = true; - result = data; - } - }; - - keyArray.forEach(function (key) { - - var onItemError = function (err) { - called = true; - result = err; - onError(err); - batchTransaction.abort(); - }; - - var getRequest = batchTransaction.objectStore(this.storeName).get(key); - getRequest.onsuccess = onItemSuccess; - getRequest.onerror = onItemError; - - }, this); - - return batchTransaction; - }, - - /** - * Fetches all entries in the store. - * - * @param {Function} [onSuccess] A callback that is called if the operation - * was successful. Will receive an array of objects. - * @param {Function} [onError] A callback that will be called if an error - * occurred during the operation. - * @returns {IDBTransaction} The transaction used for this operation. - */ - getAll: function (onSuccess, onError) { - onError || (onError = defaultErrorHandler); - onSuccess || (onSuccess = defaultSuccessHandler); - var getAllTransaction = this.db.transaction([this.storeName], this.consts.READ_ONLY); - var store = getAllTransaction.objectStore(this.storeName); - if (store.getAll) { - this._getAllNative(getAllTransaction, store, onSuccess, onError); - } else { - this._getAllCursor(getAllTransaction, store, onSuccess, onError); - } - - return getAllTransaction; - }, - - /** - * Implements getAll for IDB implementations that have a non-standard - * getAll() method. - * - * @param {IDBTransaction} getAllTransaction An open READ transaction. - * @param {IDBObjectStore} store A reference to the store. - * @param {Function} onSuccess A callback that will be called if the - * operation was successful. - * @param {Function} onError A callback that will be called if an - * error occurred during the operation. - * @private - */ - _getAllNative: function (getAllTransaction, store, onSuccess, onError) { - var hasSuccess = false, - result = null; - - getAllTransaction.oncomplete = function () { - var callback = hasSuccess ? onSuccess : onError; - callback(result); - }; - getAllTransaction.onabort = onError; - getAllTransaction.onerror = onError; - - var getAllRequest = store.getAll(); - getAllRequest.onsuccess = function (event) { - hasSuccess = true; - result = event.target.result; - }; - getAllRequest.onerror = onError; - }, - - /** - * Implements getAll for IDB implementations that do not have a getAll() - * method. - * - * @param {IDBTransaction} getAllTransaction An open READ transaction. - * @param {IDBObjectStore} store A reference to the store. - * @param {Function} onSuccess A callback that will be called if the - * operation was successful. - * @param {Function} onError A callback that will be called if an - * error occurred during the operation. - * @private - */ - _getAllCursor: function (getAllTransaction, store, onSuccess, onError) { - var all = [], - hasSuccess = false, - result = null; - - getAllTransaction.oncomplete = function () { - var callback = hasSuccess ? onSuccess : onError; - callback(result); - }; - getAllTransaction.onabort = onError; - getAllTransaction.onerror = onError; - - var cursorRequest = store.openCursor(); - cursorRequest.onsuccess = function (event) { - var cursor = event.target.result; - if (cursor) { - all.push(cursor.value); - cursor['continue'](); - } - else { - hasSuccess = true; - result = all; - } - }; - cursorRequest.onError = onError; - }, - - /** - * Clears the store, i.e. deletes all entries in the store. - * - * @param {Function} [onSuccess] A callback that will be called if the - * operation was successful. - * @param {Function} [onError] A callback that will be called if an - * error occurred during the operation. - * @returns {IDBTransaction} The transaction used for this operation. - */ - clear: function (onSuccess, onError) { - onError || (onError = defaultErrorHandler); - onSuccess || (onSuccess = defaultSuccessHandler); - - var hasSuccess = false, - result = null; - - var clearTransaction = this.db.transaction([this.storeName], this.consts.READ_WRITE); - clearTransaction.oncomplete = function () { - var callback = hasSuccess ? onSuccess : onError; - callback(result); - }; - clearTransaction.onabort = onError; - clearTransaction.onerror = onError; - - var clearRequest = clearTransaction.objectStore(this.storeName).clear(); - clearRequest.onsuccess = function (event) { - hasSuccess = true; - result = event.target.result; - }; - clearRequest.onerror = onError; - - return clearTransaction; - }, - - /** - * Checks if an id property needs to present on a object and adds one if - * necessary. - * - * @param {Object} dataObj The data object that is about to be stored - * @private - */ - _addIdPropertyIfNeeded: function (dataObj) { - if (typeof dataObj[this.keyPath] == 'undefined') { - dataObj[this.keyPath] = this._insertIdCount++ + Date.now(); - } - }, - - /************ - * indexing * - ************/ - - /** - * Returns a DOMStringList of index names of the store. - * - * @return {DOMStringList} The list of index names - */ - getIndexList: function () { - return this.store.indexNames; - }, - - /** - * Checks if an index with the given name exists in the store. - * - * @param {String} indexName The name of the index to look for - * @return {Boolean} Whether the store contains an index with the given name - */ - hasIndex: function (indexName) { - return this.store.indexNames.contains(indexName); - }, - - /** - * Normalizes an object containing index data and assures that all - * properties are set. - * - * @param {Object} indexData The index data object to normalize - * @param {String} indexData.name The name of the index - * @param {String} [indexData.keyPath] The key path of the index - * @param {Boolean} [indexData.unique] Whether the index is unique - * @param {Boolean} [indexData.multiEntry] Whether the index is multi entry - */ - normalizeIndexData: function (indexData) { - indexData.keyPath = indexData.keyPath || indexData.name; - indexData.unique = !!indexData.unique; - indexData.multiEntry = !!indexData.multiEntry; - }, - - /** - * Checks if an actual index complies with an expected index. - * - * @param {IDBIndex} actual The actual index found in the store - * @param {Object} expected An Object describing an expected index - * @return {Boolean} Whether both index definitions are identical - */ - indexComplies: function (actual, expected) { - var complies = ['keyPath', 'unique', 'multiEntry'].every(function (key) { - // IE10 returns undefined for no multiEntry - if (key == 'multiEntry' && actual[key] === undefined && expected[key] === false) { - return true; - } - // Compound keys - if (key == 'keyPath' && Object.prototype.toString.call(expected[key]) == '[object Array]') { - var exp = expected.keyPath; - var act = actual.keyPath; - - // IE10 can't handle keyPath sequences and stores them as a string. - // The index will be unusable there, but let's still return true if - // the keyPath sequence matches. - if (typeof act == 'string') { - return exp.toString() == act; - } - - // Chrome/Opera stores keyPath squences as DOMStringList, Firefox - // as Array - if (!(typeof act.contains == 'function' || typeof act.indexOf == 'function')) { - return false; - } - - if (act.length !== exp.length) { - return false; - } - - for (var i = 0, m = exp.length; i < m; i++) { - if (!( (act.contains && act.contains(exp[i])) || act.indexOf(exp[i] !== -1) )) { - return false; - } - } - return true; - } - return expected[key] == actual[key]; - }); - return complies; - }, - - /********** - * cursor * - **********/ - - /** - * Iterates over the store using the given options and calling onItem - * for each entry matching the options. - * - * @param {Function} onItem A callback to be called for each match - * @param {Object} [options] An object defining specific options - * @param {String} [options.index=null] A name of an IDBIndex to operate on - * @param {String} [options.order=ASC] The order in which to provide the - * results, can be 'DESC' or 'ASC' - * @param {Boolean} [options.autoContinue=true] Whether to automatically - * iterate the cursor to the next result - * @param {Boolean} [options.filterDuplicates=false] Whether to exclude - * duplicate matches - * @param {IDBKeyRange} [options.keyRange=null] An IDBKeyRange to use - * @param {Boolean} [options.writeAccess=false] Whether grant write access - * to the store in the onItem callback - * @param {Function} [options.onEnd=null] A callback to be called after - * iteration has ended - * @param {Function} [options.onError=throw] A callback to be called - * if an error occurred during the operation. - * @param {Number} [options.limit=Infinity] Limit the number of returned - * results to this number - * @param {Number} [options.offset=0] Skip the provided number of results - * in the resultset - * @param {Boolean} [options.allowItemRejection=false] Allows the onItem - * function to return a Boolean to accept or reject the current item - * @returns {IDBTransaction} The transaction used for this operation. - */ - iterate: function (onItem, options) { - options = mixin({ - index: null, - order: 'ASC', - autoContinue: true, - filterDuplicates: false, - keyRange: null, - writeAccess: false, - onEnd: null, - onError: defaultErrorHandler, - limit: Infinity, - offset: 0, - allowItemRejection: false - }, options || {}); - - var directionType = options.order.toLowerCase() == 'desc' ? 'PREV' : 'NEXT'; - if (options.filterDuplicates) { - directionType += '_NO_DUPLICATE'; - } - - var hasSuccess = false; - var cursorTransaction = this.db.transaction([this.storeName], this.consts[options.writeAccess ? 'READ_WRITE' : 'READ_ONLY']); - var cursorTarget = cursorTransaction.objectStore(this.storeName); - if (options.index) { - cursorTarget = cursorTarget.index(options.index); - } - var recordCount = 0; - - cursorTransaction.oncomplete = function () { - if (!hasSuccess) { - options.onError(null); - return; - } - if (options.onEnd) { - options.onEnd(); - } else { - onItem(null); - } - }; - cursorTransaction.onabort = options.onError; - cursorTransaction.onerror = options.onError; - - var cursorRequest = cursorTarget.openCursor(options.keyRange, this.consts[directionType]); - cursorRequest.onerror = options.onError; - cursorRequest.onsuccess = function (event) { - var cursor = event.target.result; - if (cursor) { - if (options.offset) { - cursor.advance(options.offset); - options.offset = 0; - } else { - var onItemReturn = onItem(cursor.value, cursor, cursorTransaction); - if (!options.allowItemRejection || onItemReturn !== false) { - recordCount++; - } - if (options.autoContinue) { - if (recordCount + options.offset < options.limit) { - cursor['continue'](); - } else { - hasSuccess = true; - } - } - } - } else { - hasSuccess = true; - } - }; - - return cursorTransaction; - }, - - /** - * Runs a query against the store and passes an array containing matched - * objects to the success handler. - * - * @param {Function} onSuccess A callback to be called when the operation - * was successful. - * @param {Object} [options] An object defining specific options - * @param {String} [options.index=null] A name of an IDBIndex to operate on - * @param {String} [options.order=ASC] The order in which to provide the - * results, can be 'DESC' or 'ASC' - * @param {Boolean} [options.filterDuplicates=false] Whether to exclude - * duplicate matches - * @param {IDBKeyRange} [options.keyRange=null] An IDBKeyRange to use - * @param {Function} [options.onError=throw] A callback to be called - * if an error occurred during the operation. - * @param {Number} [options.limit=Infinity] Limit the number of returned - * results to this number - * @param {Number} [options.offset=0] Skip the provided number of results - * in the resultset - * @param {Function} [options.filter=null] A custom filter function to - * apply to query resuts before returning. Must return `false` to reject - * an item. Can be combined with keyRanges. - * @returns {IDBTransaction} The transaction used for this operation. - */ - query: function (onSuccess, options) { - var result = [], - processedItems = 0; - options = options || {}; - options.autoContinue = true; - options.writeAccess = false; - options.allowItemRejection = !!options.filter; - options.onEnd = function () { - onSuccess(result, processedItems); - }; - return this.iterate(function (item) { - processedItems++; - var accept = options.filter ? options.filter(item) : true; - if (accept !== false) { - result.push(item); - } - return accept; - }, options); - }, - - /** - * - * Runs a query against the store, but only returns the number of matches - * instead of the matches itself. - * - * @param {Function} onSuccess A callback to be called if the opration - * was successful. - * @param {Object} [options] An object defining specific options - * @param {String} [options.index=null] A name of an IDBIndex to operate on - * @param {IDBKeyRange} [options.keyRange=null] An IDBKeyRange to use - * @param {Function} [options.onError=throw] A callback to be called if an error - * occurred during the operation. - * @returns {IDBTransaction} The transaction used for this operation. - */ - count: function (onSuccess, options) { - - options = mixin({ - index: null, - keyRange: null - }, options || {}); - - var onError = options.onError || defaultErrorHandler; - - var hasSuccess = false, - result = null; - - var cursorTransaction = this.db.transaction([this.storeName], this.consts.READ_ONLY); - cursorTransaction.oncomplete = function () { - var callback = hasSuccess ? onSuccess : onError; - callback(result); - }; - cursorTransaction.onabort = onError; - cursorTransaction.onerror = onError; - - var cursorTarget = cursorTransaction.objectStore(this.storeName); - if (options.index) { - cursorTarget = cursorTarget.index(options.index); - } - var countRequest = cursorTarget.count(options.keyRange); - countRequest.onsuccess = function (evt) { - hasSuccess = true; - result = evt.target.result; - }; - countRequest.onError = onError; - - return cursorTransaction; - }, - - /**************/ - /* key ranges */ - /**************/ - - /** - * Creates a key range using specified options. This key range can be - * handed over to the count() and iterate() methods. - * - * Note: You must provide at least one or both of "lower" or "upper" value. - * - * @param {Object} options The options for the key range to create - * @param {*} [options.lower] The lower bound - * @param {Boolean} [options.excludeLower] Whether to exclude the lower - * bound passed in options.lower from the key range - * @param {*} [options.upper] The upper bound - * @param {Boolean} [options.excludeUpper] Whether to exclude the upper - * bound passed in options.upper from the key range - * @param {*} [options.only] A single key value. Use this if you need a key - * range that only includes one value for a key. Providing this - * property invalidates all other properties. - * @return {IDBKeyRange} The IDBKeyRange representing the specified options - */ - makeKeyRange: function (options) { - /*jshint onecase:true */ - var keyRange, - hasLower = typeof options.lower != 'undefined', - hasUpper = typeof options.upper != 'undefined', - isOnly = typeof options.only != 'undefined'; - - switch (true) { - case isOnly: - keyRange = this.keyRange.only(options.only); - break; - case hasLower && hasUpper: - keyRange = this.keyRange.bound(options.lower, options.upper, options.excludeLower, options.excludeUpper); - break; - case hasLower: - keyRange = this.keyRange.lowerBound(options.lower, options.excludeLower); - break; - case hasUpper: - keyRange = this.keyRange.upperBound(options.upper, options.excludeUpper); - break; - default: - throw new Error('Cannot create KeyRange. Provide one or both of "lower" or "upper" value, or an "only" value.'); - } - - return keyRange; - - } - - }; - - /** helpers **/ - var empty = {}; - - function mixin (target, source) { - var name, s; - for (name in source) { - s = source[name]; - if (s !== empty[name] && s !== target[name]) { - target[name] = s; - } - } - return target; - } - - function hasVersionError(errorEvent) { - if ('error' in errorEvent.target) { - return errorEvent.target.error.name == 'VersionError'; - } else if ('errorCode' in errorEvent.target) { - return errorEvent.target.errorCode == 12; - } - return false; - } - - IDBStore.prototype = proto; - IDBStore.version = proto.version; - - return IDBStore; - -}, this); diff --git a/node_modules/browserify-fs/node_modules/level-js/node_modules/idb-wrapper/idbstore.min.js b/node_modules/browserify-fs/node_modules/level-js/node_modules/idb-wrapper/idbstore.min.js deleted file mode 100644 index af7ace15..00000000 --- a/node_modules/browserify-fs/node_modules/level-js/node_modules/idb-wrapper/idbstore.min.js +++ /dev/null @@ -1,31 +0,0 @@ -/* - IDBWrapper - A cross-browser wrapper for IndexedDB - Version 1.7.1 - Copyright (c) 2011 - 2016 Jens Arps - http://jensarps.de/ - - Licensed under the MIT (X11) license -*/ -(function(p,h,k){"function"===typeof define?define(h):"undefined"!==typeof module&&module.exports?module.exports=h():k[p]=h()})("IDBStore",function(){function p(a,b){var c,d;for(c in b)d=b[c],d!==u[c]&&d!==a[c]&&(a[c]=d);return a}var h=function(a){throw a;},k=function(){},r={storeName:"Store",storePrefix:"IDBWrapper-",dbVersion:1,keyPath:"id",autoIncrement:!0,onStoreReady:function(){},onError:h,indexes:[],implementationPreference:["indexedDB","webkitIndexedDB","mozIndexedDB","shimIndexedDB"]},q=function(a, -b){"undefined"==typeof b&&"function"==typeof a&&(b=a);"[object Object]"!=Object.prototype.toString.call(a)&&(a={});for(var c in r)this[c]="undefined"!=typeof a[c]?a[c]:r[c];this.dbName=this.storePrefix+this.storeName;this.dbVersion=parseInt(this.dbVersion,10)||1;b&&(this.onStoreReady=b);var d="object"==typeof window?window:self;this.implementation=this.implementationPreference.filter(function(a){return a in d})[0];this.idb=d[this.implementation];this.keyRange=d.IDBKeyRange||d.webkitIDBKeyRange||d.mozIDBKeyRange; -this.consts={READ_ONLY:"readonly",READ_WRITE:"readwrite",VERSION_CHANGE:"versionchange",NEXT:"next",NEXT_NO_DUPLICATE:"nextunique",PREV:"prev",PREV_NO_DUPLICATE:"prevunique"};this.openDB()},t={constructor:q,version:"1.7.1",db:null,dbName:null,dbVersion:null,store:null,storeName:null,storePrefix:null,keyPath:null,autoIncrement:null,indexes:null,implementationPreference:null,implementation:"",onStoreReady:null,onError:null,_insertIdCount:0,openDB:function(){var a=this.idb.open(this.dbName,this.dbVersion), -b=!1;a.onerror=function(a){var b;b="error"in a.target?"VersionError"==a.target.error.name:"errorCode"in a.target?12==a.target.errorCode:!1;if(b)this.onError(Error("The version number provided is lower than the existing one."));else a.target.error?a=a.target.error:(b="IndexedDB unknown error occurred when opening DB "+this.dbName+" version "+this.dbVersion,"errorCode"in a.target&&(b+=" with error code "+a.target.errorCode),a=Error(b)),this.onError(a)}.bind(this);a.onsuccess=function(a){if(!b)if(this.db)this.onStoreReady(); -else if(this.db=a.target.result,"string"==typeof this.db.version)this.onError(Error("The IndexedDB implementation in this browser is outdated. Please upgrade your browser."));else if(this.db.objectStoreNames.contains(this.storeName)){this.store=this.db.transaction([this.storeName],this.consts.READ_ONLY).objectStore(this.storeName);var d=Array.prototype.slice.call(this.getIndexList());this.indexes.forEach(function(a){var c=a.name;if(c)if(this.normalizeIndexData(a),this.hasIndex(c)){var g=this.store.index(c); -this.indexComplies(g,a)||(b=!0,this.onError(Error('Cannot modify index "'+c+'" for current version. Please bump version number to '+(this.dbVersion+1)+".")));d.splice(d.indexOf(c),1)}else b=!0,this.onError(Error('Cannot create new index "'+c+'" for current version. Please bump version number to '+(this.dbVersion+1)+"."));else b=!0,this.onError(Error("Cannot create index: No index name given."))},this);d.length&&(b=!0,this.onError(Error('Cannot delete index(es) "'+d.toString()+'" for current version. Please bump version number to '+ -(this.dbVersion+1)+".")));b||this.onStoreReady()}else this.onError(Error("Object store couldn't be created."))}.bind(this);a.onupgradeneeded=function(a){this.db=a.target.result;this.db.objectStoreNames.contains(this.storeName)?this.store=a.target.transaction.objectStore(this.storeName):(a={autoIncrement:this.autoIncrement},null!==this.keyPath&&(a.keyPath=this.keyPath),this.store=this.db.createObjectStore(this.storeName,a));var d=Array.prototype.slice.call(this.getIndexList());this.indexes.forEach(function(a){var c= -a.name;c||(b=!0,this.onError(Error("Cannot create index: No index name given.")));this.normalizeIndexData(a);if(this.hasIndex(c)){var g=this.store.index(c);this.indexComplies(g,a)||(this.store.deleteIndex(c),this.store.createIndex(c,a.keyPath,{unique:a.unique,multiEntry:a.multiEntry}));d.splice(d.indexOf(c),1)}else this.store.createIndex(c,a.keyPath,{unique:a.unique,multiEntry:a.multiEntry})},this);d.length&&d.forEach(function(a){this.store.deleteIndex(a)},this)}.bind(this)},deleteDatabase:function(a, -b){if(this.idb.deleteDatabase){this.db.close();var c=this.idb.deleteDatabase(this.dbName);c.onsuccess=a;c.onerror=b}else b(Error("Browser does not support IndexedDB deleteDatabase!"))},put:function(a,b,c,d){null!==this.keyPath&&(d=c,c=b,b=a);d||(d=h);c||(c=k);var f=!1,e=null,g=this.db.transaction([this.storeName],this.consts.READ_WRITE);g.oncomplete=function(){(f?c:d)(e)};g.onabort=d;g.onerror=d;null!==this.keyPath?(this._addIdPropertyIfNeeded(b),a=g.objectStore(this.storeName).put(b)):a=g.objectStore(this.storeName).put(b, -a);a.onsuccess=function(a){f=!0;e=a.target.result};a.onerror=d;return g},get:function(a,b,c){c||(c=h);b||(b=k);var d=!1,f=null,e=this.db.transaction([this.storeName],this.consts.READ_ONLY);e.oncomplete=function(){(d?b:c)(f)};e.onabort=c;e.onerror=c;a=e.objectStore(this.storeName).get(a);a.onsuccess=function(a){d=!0;f=a.target.result};a.onerror=c;return e},remove:function(a,b,c){c||(c=h);b||(b=k);var d=!1,f=null,e=this.db.transaction([this.storeName],this.consts.READ_WRITE);e.oncomplete=function(){(d? -b:c)(f)};e.onabort=c;e.onerror=c;a=e.objectStore(this.storeName)["delete"](a);a.onsuccess=function(a){d=!0;f=a.target.result};a.onerror=c;return e},batch:function(a,b,c){c||(c=h);b||(b=k);if("[object Array]"!=Object.prototype.toString.call(a))c(Error("dataArray argument must be of type Array."));else if(0===a.length)return b(!0);var d=a.length,f=!1,e=!1,g=this.db.transaction([this.storeName],this.consts.READ_WRITE);g.oncomplete=function(){(e?b:c)(e)};g.onabort=c;g.onerror=c;var l=function(){d--;0!== -d||f||(e=f=!0)};a.forEach(function(a){var b=a.type,d=a.key,e=a.value;a=function(a){g.abort();f||(f=!0,c(a,b,d))};"remove"==b?(e=g.objectStore(this.storeName)["delete"](d),e.onsuccess=l,e.onerror=a):"put"==b&&(null!==this.keyPath?(this._addIdPropertyIfNeeded(e),e=g.objectStore(this.storeName).put(e)):e=g.objectStore(this.storeName).put(e,d),e.onsuccess=l,e.onerror=a)},this);return g},putBatch:function(a,b,c){a=a.map(function(a){return{type:"put",value:a}});return this.batch(a,b,c)},upsertBatch:function(a, -b,c,d){"function"==typeof b&&(d=c=b,b={});d||(d=h);c||(c=k);b||(b={});"[object Array]"!=Object.prototype.toString.call(a)&&d(Error("dataArray argument must be of type Array."));var f=b.keyField||this.keyPath,e=a.length,g=!1,l=!1,n=0,m=this.db.transaction([this.storeName],this.consts.READ_WRITE);m.oncomplete=function(){l?c(a):d(!1)};m.onabort=d;m.onerror=d;var v=function(b){a[n++][f]=b.target.result;e--;0!==e||g||(l=g=!0)};a.forEach(function(a){var b=a.key;null!==this.keyPath?(this._addIdPropertyIfNeeded(a), -a=m.objectStore(this.storeName).put(a)):a=m.objectStore(this.storeName).put(a,b);a.onsuccess=v;a.onerror=function(a){m.abort();g||(g=!0,d(a))}},this);return m},removeBatch:function(a,b,c){a=a.map(function(a){return{type:"remove",key:a}});return this.batch(a,b,c)},getBatch:function(a,b,c,d){c||(c=h);b||(b=k);d||(d="sparse");if("[object Array]"!=Object.prototype.toString.call(a))c(Error("keyArray argument must be of type Array."));else if(0===a.length)return b([]);var f=[],e=a.length,g=!1,l=null,n= -this.db.transaction([this.storeName],this.consts.READ_ONLY);n.oncomplete=function(){(g?b:c)(l)};n.onabort=c;n.onerror=c;var m=function(a){a.target.result||"dense"==d?f.push(a.target.result):"sparse"==d&&f.length++;e--;0===e&&(g=!0,l=f)};a.forEach(function(a){a=n.objectStore(this.storeName).get(a);a.onsuccess=m;a.onerror=function(a){l=a;c(a);n.abort()}},this);return n},getAll:function(a,b){b||(b=h);a||(a=k);var c=this.db.transaction([this.storeName],this.consts.READ_ONLY),d=c.objectStore(this.storeName); -d.getAll?this._getAllNative(c,d,a,b):this._getAllCursor(c,d,a,b);return c},_getAllNative:function(a,b,c,d){var f=!1,e=null;a.oncomplete=function(){(f?c:d)(e)};a.onabort=d;a.onerror=d;a=b.getAll();a.onsuccess=function(a){f=!0;e=a.target.result};a.onerror=d},_getAllCursor:function(a,b,c,d){var f=[],e=!1,g=null;a.oncomplete=function(){(e?c:d)(g)};a.onabort=d;a.onerror=d;a=b.openCursor();a.onsuccess=function(a){(a=a.target.result)?(f.push(a.value),a["continue"]()):(e=!0,g=f)};a.onError=d},clear:function(a, -b){b||(b=h);a||(a=k);var c=!1,d=null,f=this.db.transaction([this.storeName],this.consts.READ_WRITE);f.oncomplete=function(){(c?a:b)(d)};f.onabort=b;f.onerror=b;var e=f.objectStore(this.storeName).clear();e.onsuccess=function(a){c=!0;d=a.target.result};e.onerror=b;return f},_addIdPropertyIfNeeded:function(a){"undefined"==typeof a[this.keyPath]&&(a[this.keyPath]=this._insertIdCount++ +Date.now())},getIndexList:function(){return this.store.indexNames},hasIndex:function(a){return this.store.indexNames.contains(a)}, -normalizeIndexData:function(a){a.keyPath=a.keyPath||a.name;a.unique=!!a.unique;a.multiEntry=!!a.multiEntry},indexComplies:function(a,b){return["keyPath","unique","multiEntry"].every(function(c){if("multiEntry"==c&&void 0===a[c]&&!1===b[c])return!0;if("keyPath"==c&&"[object Array]"==Object.prototype.toString.call(b[c])){c=b.keyPath;var d=a.keyPath;if("string"==typeof d)return c.toString()==d;if("function"!=typeof d.contains&&"function"!=typeof d.indexOf||d.length!==c.length)return!1;for(var f=0,e= -c.length;f=1.5.0 <2.0.0", - "_npmVersion": "3.6.0", - "_nodeVersion": "5.7.0", - "_npmUser": { - "name": "jensarps", - "email": "mail@jensarps.de" - }, - "maintainers": [ - { - "name": "raynos", - "email": "raynos2@gmail.com" - }, - { - "name": "jensarps", - "email": "mail@jensarps.de" - } - ], - "dist": { - "shasum": "6a32670122e173a84ecc5cfa9668fa2ceb221b04", - "tarball": "https://registry.npmjs.org/idb-wrapper/-/idb-wrapper-1.7.1.tgz" - }, - "_npmOperationalInternal": { - "host": "packages-16-east.internal.npmjs.com", - "tmp": "tmp/idb-wrapper-1.7.1.tgz_1472629261538_0.44634073437191546" - }, - "directories": {}, - "_resolved": "https://registry.npmjs.org/idb-wrapper/-/idb-wrapper-1.7.1.tgz" -} diff --git a/node_modules/browserify-fs/node_modules/level-js/node_modules/isbuffer/.npmignore b/node_modules/browserify-fs/node_modules/level-js/node_modules/isbuffer/.npmignore deleted file mode 100644 index 249bc20e..00000000 --- a/node_modules/browserify-fs/node_modules/level-js/node_modules/isbuffer/.npmignore +++ /dev/null @@ -1,2 +0,0 @@ -node_modules -*.sw* diff --git a/node_modules/browserify-fs/node_modules/level-js/node_modules/isbuffer/README.md b/node_modules/browserify-fs/node_modules/level-js/node_modules/isbuffer/README.md deleted file mode 100644 index 126189ed..00000000 --- a/node_modules/browserify-fs/node_modules/level-js/node_modules/isbuffer/README.md +++ /dev/null @@ -1,53 +0,0 @@ - -# isBuffer - -Check if something is a [Node.js Buffer](http://nodejs.org/api/buffer.html) or -[Typed Array](https://developer.mozilla.org/en-US/docs/JavaScript/Typed_arrays) - -## Usage - -```js -var isBuffer = require('isbuffer'); - -isBuffer(new Buffer(3)); // => true -isBuffer(new Int8Array()); // => true -isBuffer(['foo']); // => false -``` - -## Api - -### isBuffer(obj) - -Return true if `obj` is a `Buffer` or `TypedArray`, otherwise return false. - -## Installation - -With [npm](http://npmjs.org) do - -```bash -$ npm install isbuffer -``` - -## License - -(MIT) - -Copyright (c) 2013 Julian Gruber <julian@juliangruber.com> - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies -of the Software, and to permit persons to whom the Software is furnished to do -so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/node_modules/browserify-fs/node_modules/level-js/node_modules/isbuffer/index.js b/node_modules/browserify-fs/node_modules/level-js/node_modules/isbuffer/index.js deleted file mode 100644 index bd632f28..00000000 --- a/node_modules/browserify-fs/node_modules/level-js/node_modules/isbuffer/index.js +++ /dev/null @@ -1,8 +0,0 @@ -var Buffer = require('buffer').Buffer; - -module.exports = isBuffer; - -function isBuffer (o) { - return Buffer.isBuffer(o) - || /\[object (.+Array|Array.+)\]/.test(Object.prototype.toString.call(o)); -} diff --git a/node_modules/browserify-fs/node_modules/level-js/node_modules/isbuffer/package.json b/node_modules/browserify-fs/node_modules/level-js/node_modules/isbuffer/package.json deleted file mode 100644 index d6f64f18..00000000 --- a/node_modules/browserify-fs/node_modules/level-js/node_modules/isbuffer/package.json +++ /dev/null @@ -1,52 +0,0 @@ -{ - "name": "isbuffer", - "description": "isBuffer for node and browser (supports typed arrays)", - "version": "0.0.0", - "repository": { - "type": "git", - "url": "git://github.com/juliangruber/isbuffer.git" - }, - "homepage": "https://github.com/juliangruber/isbuffer", - "main": "index.js", - "scripts": { - "test": "tape test.js" - }, - "dependencies": {}, - "devDependencies": { - "tape": "~1.0.2" - }, - "keywords": [ - "isbuffer", - "buffer", - "typedarrays", - "arraybuffer" - ], - "author": { - "name": "Julian Gruber", - "email": "mail@juliangruber.com", - "url": "http://juliangruber.com" - }, - "license": "MIT", - "readme": "\n# isBuffer\n\nCheck if something is a [Node.js Buffer](http://nodejs.org/api/buffer.html) or\n[Typed Array](https://developer.mozilla.org/en-US/docs/JavaScript/Typed_arrays)\n\n## Usage\n\n```js\nvar isBuffer = require('isbuffer');\n\nisBuffer(new Buffer(3)); // => true\nisBuffer(new Int8Array()); // => true\nisBuffer(['foo']); // => false\n```\n\n## Api\n\n### isBuffer(obj)\n\nReturn true if `obj` is a `Buffer` or `TypedArray`, otherwise return false.\n\n## Installation\n\nWith [npm](http://npmjs.org) do\n\n```bash\n$ npm install isbuffer\n```\n\n## License\n\n(MIT)\n\nCopyright (c) 2013 Julian Gruber <julian@juliangruber.com>\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of\nthis software and associated documentation files (the \"Software\"), to deal in\nthe Software without restriction, including without limitation the rights to\nuse, copy, modify, merge, publish, distribute, sublicense, and/or sell copies\nof the Software, and to permit persons to whom the Software is furnished to do\nso, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n", - "readmeFilename": "README.md", - "_id": "isbuffer@0.0.0", - "dist": { - "shasum": "38c146d9df528b8bf9b0701c3d43cf12df3fc39b", - "tarball": "https://registry.npmjs.org/isbuffer/-/isbuffer-0.0.0.tgz" - }, - "_from": "isbuffer@>=0.0.0 <0.1.0", - "_npmVersion": "1.2.18", - "_npmUser": { - "name": "juliangruber", - "email": "julian@juliangruber.com" - }, - "maintainers": [ - { - "name": "juliangruber", - "email": "julian@juliangruber.com" - } - ], - "directories": {}, - "_shasum": "38c146d9df528b8bf9b0701c3d43cf12df3fc39b", - "_resolved": "https://registry.npmjs.org/isbuffer/-/isbuffer-0.0.0.tgz" -} diff --git a/node_modules/browserify-fs/node_modules/level-js/node_modules/isbuffer/test.js b/node_modules/browserify-fs/node_modules/level-js/node_modules/isbuffer/test.js deleted file mode 100644 index 70a02f05..00000000 --- a/node_modules/browserify-fs/node_modules/level-js/node_modules/isbuffer/test.js +++ /dev/null @@ -1,33 +0,0 @@ -var test = require('tape'); -var isBuffer = require('./index.js'); -var Buffer = require('buffer').Buffer; - -test('node.js buffer', function (t) { - t.ok(isBuffer(new Buffer(3))); - t.end(); -}); - -test('Typed Arrays', function (t) { - if (typeof Int8Array != 'undefined') t.ok(isBuffer(new Int8Array())); - if (typeof Int16Array != 'undefined') t.ok(isBuffer(new Int16Array())); - if (typeof Int32Array != 'undefined') t.ok(isBuffer(new Int32Array())); - if (typeof Uint8Array != 'undefined') t.ok(isBuffer(new Uint8Array())); - if (typeof Uint16Array != 'undefined') t.ok(isBuffer(new Uint16Array())); - if (typeof Uint32Array != 'undefined') t.ok(isBuffer(new Uint32Array())); - if (typeof Uint8ClampedArray != 'undefined') t.ok(isBuffer(new Uint8ClampedArray())); - if (typeof Float32Array != 'undefined') t.ok(isBuffer(new Float32Array())); - if (typeof Float64Array != 'undefined') t.ok(isBuffer(new Float64Array())); - if (typeof ArrayBuffer != 'undefined') t.ok(isBuffer(new ArrayBuffer())); - t.ok(true); // have at least one passing test - t.end(); -}); - -test('non buffers', function (t) { - t.notOk(isBuffer(null)); - t.notOk(isBuffer(undefined)); - t.notOk(isBuffer(1)); - t.notOk(isBuffer('')); - t.notOk(isBuffer([])); - t.notOk(isBuffer({})); - t.end(); -}); diff --git a/node_modules/browserify-fs/node_modules/level-js/node_modules/ltgt/.travis.yml b/node_modules/browserify-fs/node_modules/level-js/node_modules/ltgt/.travis.yml deleted file mode 100644 index 895dbd36..00000000 --- a/node_modules/browserify-fs/node_modules/level-js/node_modules/ltgt/.travis.yml +++ /dev/null @@ -1,4 +0,0 @@ -language: node_js -node_js: - - 0.6 - - 0.8 diff --git a/node_modules/browserify-fs/node_modules/level-js/node_modules/ltgt/LICENSE b/node_modules/browserify-fs/node_modules/level-js/node_modules/ltgt/LICENSE deleted file mode 100644 index 9c825b19..00000000 --- a/node_modules/browserify-fs/node_modules/level-js/node_modules/ltgt/LICENSE +++ /dev/null @@ -1,22 +0,0 @@ -Copyright (c) 2014 Dominic Tarr - -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/node_modules/browserify-fs/node_modules/level-js/node_modules/ltgt/README.md b/node_modules/browserify-fs/node_modules/level-js/node_modules/ltgt/README.md deleted file mode 100644 index 50718a5e..00000000 --- a/node_modules/browserify-fs/node_modules/level-js/node_modules/ltgt/README.md +++ /dev/null @@ -1,126 +0,0 @@ -# ltgt - -implement correct ranges for level-* - -[![build status](https://secure.travis-ci.org/dominictarr/ltgt.png)](http://travis-ci.org/dominictarr/ltgt) -[![testling badge](https://ci.testling.com/dominictarr/ltgt.png)](https://ci.testling.com/dominictarr/ltgt) - -# example - - -``` js -var ltgt = require('ltgt') - -ltgt.start(range) //the start of the range -ltgt.end(range) //the end of the range - -//returns the lower/upper bound, whether it's inclusive or not. -ltgt.lowerBound(range) -ltgt.upperBound(range) - -ltgt.lt(range) -ltgt.gt(range) -ltgt.lte(range) -ltgt.gte(range) - -//return wether this is a reversed order -//(this is significant for start/end ranges -ltgt.reverse(range) -var filter = ltgt.filter(range) - -filter(key) == true //if key contained in range. - -ltgt.contains(range, key) - -``` - -# ways to specify ranges - -there have been a variety of ways to specify ranges in level-*. -this module supports them all. - -# gt/gte, lt/lte - -specify a range between a lower bound (gt, gte) and an upper bound (lt, lte) - -if `gte` and `gt` is undefined, read from the start of the database, -if `lte` and `lt` is undefined, read until the end of the database, - - -# min, max - -legacy level-sublevel style, -synonym for `gte`, `lte`. - -# start, end, reverse - -legacy levelup style. - -The range is from `start` -> `end`, `start` does not specify the lowest -record, instead it specifies the first record to be read. However, -`reverse` must also be passed correctly. This is way to specify a range is -confusing if you need to read in reverse, -so it's strongly recommended to use `gt/gte,lt/lte`. - -If `reverse` is `true`, -`start` *must* be `undefined` or less than `end`, -unless `end` is `undefined`. - -if `reverse` is `false` -`end` *must* be `undefined` or greater than `start`, -unless `start` is `undefined`. - -if start is undefined, read from the first record in the database -if end is undefined read until the last record in the database. - -# api - -## ltgt.contains(range, key, compare) - -using the provided compare method, return `true` if `key` -is within `range`. compare defaults to `ltgt.compare` - -## ltgt.filter(range, compare) - -return a function that returns true if it's argument is within range. -can be passed to `Array.filter` - -``` js -[1,2,3,4,5].filter(ltgt.filter({gt: 2, lte: 4}) -// => [3, 4] -``` - -## ltgt.lowerBound(range) - -return the lower bound of `range`. -Incase the lower bound is specified with `gt`, -check `ltgt.lowerBoundExclusive` - -## ltgt.upperBound(range) - -return the upperBound of `range`. -Incase the upper bound is specified with `gt`, -check `ltgt.upperBoundExclusive` - -## ltgt.lowerBoundExclusive(range) - -return true if upper bound is exclusive. - -## ltgt.upperBoundExclusive(range) - -return true if lower bound is exclusive. - -## ltgt.toLtgt(range, _range, map, lowerBound, upperBound) - -convert a range to a new ltgt range. `_range` -is the object to return - if you want to mutate `range` -call `ltgt.toLtgt(range, range, map)` - -`map` gets called on each key in the range, and wether it's an upper or lower bound - -so can be used as an encode function. - -`map(value, isUpperBound)` if `isUpperBound` is false, this is the lower bound. - -## License - -MIT diff --git a/node_modules/browserify-fs/node_modules/level-js/node_modules/ltgt/index.js b/node_modules/browserify-fs/node_modules/level-js/node_modules/ltgt/index.js deleted file mode 100644 index e7c68f16..00000000 --- a/node_modules/browserify-fs/node_modules/level-js/node_modules/ltgt/index.js +++ /dev/null @@ -1,151 +0,0 @@ - -exports.compare = function (a, b) { - - if(Buffer.isBuffer(a)) { - var l = Math.min(a.length, b.length) - for(var i = 0; i < l; i++) { - var cmp = a[i] - b[i] - if(cmp) return cmp - } - return a.length - b.length - } - - return a < b ? -1 : a > b ? 1 : 0 -} - -function has(obj, key) { - return Object.hasOwnProperty.call(obj, key) -} - -// to be compatible with the current abstract-leveldown tests -// nullish or empty strings. -// I could use !!val but I want to permit numbers and booleans, -// if possible. - -function isDef (val) { - return val !== undefined && val !== '' -} - -function has (range, name) { - return Object.hasOwnProperty.call(range, name) -} - -function hasKey(range, name) { - return Object.hasOwnProperty.call(range, name) && name -} - -var lowerBoundKey = exports.lowerBoundKey = function (range) { - return ( - hasKey(range, 'gt') - || hasKey(range, 'gte') - || hasKey(range, 'min') - || (range.reverse ? hasKey(range, 'end') : hasKey(range, 'start')) - || undefined - ) -} - -var lowerBound = exports.lowerBound = function (range) { - var k = lowerBoundKey(range) - return k && range[k] -} - -var lowerBoundInclusive = exports.lowerBoundInclusive = function (range) { - return has(range, 'gt') ? false : true -} - -var upperBoundInclusive = exports.upperBoundInclusive = - function (range) { - return (has(range, 'lt') /*&& !range.maxEx*/) ? false : true - } - -var lowerBoundExclusive = exports.lowerBoundExclusive = - function (range) { - return !lowerBoundInclusive(range) - } - -var upperBoundExclusive = exports.upperBoundExclusive = - function (range) { - return !upperBoundInclusive(range) - } - -var upperBoundKey = exports.upperBoundKey = function (range) { - return ( - hasKey(range, 'lt') - || hasKey(range, 'lte') - || hasKey(range, 'max') - || (range.reverse ? hasKey(range, 'start') : hasKey(range, 'end')) - || undefined - ) -} - -var upperBound = exports.upperBound = function (range) { - var k = upperBoundKey(range) - return k && range[k] -} - -function id (e) { return e } - -exports.toLtgt = function (range, _range, map, lower, upper) { - _range = _range || {} - map = map || id - var defaults = arguments.length > 3 - var lb = exports.lowerBoundKey(range) - var ub = exports.upperBoundKey(range) - if(lb) { - if(lb === 'gt') _range.gt = map(range.gt, false) - else _range.gte = map(range[lb], false) - } - else if(defaults) - _range.gte = map(lower, false) - - if(ub) { - if(ub === 'lt') _range.lt = map(range.lt, true) - else _range.lte = map(range[ub], true) - } - else if(defaults) - _range.lte = map(upper, true) - - if(range.reverse != null) - _range.reverse = !!range.reverse - - //if range was used mutably - //(in level-sublevel it's part of an options object - //that has more properties on it.) - if(has(_range, 'max')) delete _range.max - if(has(_range, 'min')) delete _range.min - if(has(_range, 'start')) delete _range.start - if(has(_range, 'end')) delete _range.end - - return _range -} - -exports.contains = function (range, key, compare) { - compare = compare || exports.compare - - var lb = lowerBound(range) - if(isDef(lb)) { - var cmp = compare(key, lb) - if(cmp < 0 || (cmp === 0 && lowerBoundExclusive(range))) - return false - } - - var ub = upperBound(range) - if(isDef(ub)) { - var cmp = compare(key, ub) - if(cmp > 0 || (cmp === 0) && upperBoundExclusive(range)) - return false - } - - return true -} - -exports.filter = function (range, compare) { - return function (key) { - return exports.contains(range, key, compare) - } -} - - - - - diff --git a/node_modules/browserify-fs/node_modules/level-js/node_modules/ltgt/package.json b/node_modules/browserify-fs/node_modules/level-js/node_modules/ltgt/package.json deleted file mode 100644 index e1b84ff3..00000000 --- a/node_modules/browserify-fs/node_modules/level-js/node_modules/ltgt/package.json +++ /dev/null @@ -1,69 +0,0 @@ -{ - "name": "ltgt", - "description": "implement correct ranges for level-*", - "version": "2.1.3", - "homepage": "https://github.com/dominictarr/ltgt", - "repository": { - "type": "git", - "url": "git://github.com/dominictarr/ltgt.git" - }, - "dependencies": {}, - "devDependencies": { - "tape": "~2.13.1" - }, - "scripts": { - "prepublish": "npm ls && node test.js", - "test": "node test.js" - }, - "author": { - "name": "Dominic Tarr", - "email": "dominic.tarr@gmail.com", - "url": "http://dominictarr.com" - }, - "license": "MIT", - "testling": { - "files": "test.js", - "browsers": [ - "ie/8..latest", - "firefox/17..latest", - "firefox/nightly", - "chrome/22..latest", - "chrome/canary", - "opera/12..latest", - "opera/next", - "safari/5.1..latest", - "ipad/6.0..latest", - "iphone/6.0..latest", - "android-browser/4.2..latest" - ] - }, - "gitHead": "9bcc2134a8918d52aa77fc5749238186b2800c0d", - "bugs": { - "url": "https://github.com/dominictarr/ltgt/issues" - }, - "_id": "ltgt@2.1.3", - "_shasum": "10851a06d9964b971178441c23c9e52698eece34", - "_from": "ltgt@>=2.1.2 <3.0.0", - "_npmVersion": "3.9.3", - "_nodeVersion": "6.4.0", - "_npmUser": { - "name": "dominictarr", - "email": "dominic.tarr@gmail.com" - }, - "dist": { - "shasum": "10851a06d9964b971178441c23c9e52698eece34", - "tarball": "https://registry.npmjs.org/ltgt/-/ltgt-2.1.3.tgz" - }, - "maintainers": [ - { - "name": "dominictarr", - "email": "dominic.tarr@gmail.com" - } - ], - "_npmOperationalInternal": { - "host": "packages-12-west.internal.npmjs.com", - "tmp": "tmp/ltgt-2.1.3.tgz_1478553792506_0.021263495553284883" - }, - "directories": {}, - "_resolved": "https://registry.npmjs.org/ltgt/-/ltgt-2.1.3.tgz" -} diff --git a/node_modules/browserify-fs/node_modules/level-js/node_modules/ltgt/test.js b/node_modules/browserify-fs/node_modules/level-js/node_modules/ltgt/test.js deleted file mode 100644 index 8970900a..00000000 --- a/node_modules/browserify-fs/node_modules/level-js/node_modules/ltgt/test.js +++ /dev/null @@ -1,355 +0,0 @@ -var tape = require('tape') -var ltgt = require('./') - -function clone (o) { - var O = {} - for(var k in o) - O[k] = o[k] - return O -} - -var elements = [ - 1, 2, 3, 4, 5 -] - -var ranges = [ - //default - { range: - {}, - selection: - elements - }, - { range: - {reverse: true }, - selection: - elements.slice().reverse() - }, - - //start/end - this has a lot of semantics because reverse is significant. - { range: - {start: 2}, - selection: - [2, 3, 4, 5] - }, - { range: - {start: 2, reverse: true}, - selection: - [2, 1] - }, - { range: - {end: 2}, - selection: - [1, 2] - }, - { range: - {end: 2, reverse: true}, - selection: - [2, 3, 4, 5].reverse() - }, - { range: - {start: 2.5}, - selection: - [3, 4, 5] - }, - { range: - {start: 2.5, reverse: true}, - selection: - [2, 1] - }, - { range: - {end: 2.5, reverse: true}, - selection: - [5, 4, 3] - }, - { range: - {start: 5}, - selection: - [5] - }, - { range: - {start: 5.5}, - selection: - [] - }, - { range: - {end: 0.5}, - selection: - [] - }, - { range: - {start: 5.5, reverse: true}, - selection: - [5, 4, 3, 2, 1] - }, - { range: - {end: 0.5, reverse: true}, - selection: - [5, 4, 3, 2, 1] - }, - - //nullish and empty strings signify are streated like null! - { range: - {end: null, reverse: true}, - selection: - [5, 4, 3, 2, 1] - }, - { range: - {end: undefined, reverse: true}, - selection: - [5, 4, 3, 2, 1] - }, - { range: - {end: '', reverse: true}, - selection: - [5, 4, 3, 2, 1] - }, - - //lt/gt/lte/gte - - { range: - {lt: 2.5}, - selection: - [1, 2] - }, - { range: - {gt: 2.5}, - selection: - [3, 4, 5] - }, - { range: - {lt: 2}, - selection: - [1] - }, - { range: - {gt: 2}, - selection: - [3, 4, 5] - }, - - { range: - {lte: 2.5}, - selection: - [1, 2] - }, - { range: - {gte: 2.5}, - selection: - [3, 4, 5] - }, - { range: - {lte: 2}, - selection: - [1, 2] - }, - { range: - {gte: 2}, - selection: - [2, 3, 4, 5] - }, - - { range: - {gt: 2.5, lt: 5}, - selection: - [3, 4] - }, - { range: - {gte: 2, lt: 3.5}, - selection: - [2, 3] - }, - { range: - {gt: 2.5, lte: 4}, - selection: - [3, 4] - }, - { range: - {gte: 2, lte: 4}, - selection: - [2, 3, 4] - }, - - //min/max - used by sublevel, equiv to gte, lte - - { range: - {min: 2, max: 4}, - selection: - [2, 3, 4] - }, - - { range: - {max: 2.5}, - selection: - [1, 2] - }, - { range: - {min: 2.5}, - selection: - [3, 4, 5] - }, - { range: - {max: 2}, - selection: - [1, 2] - }, - { range: - {min: 2}, - selection: - [2, 3, 4, 5] - } - -] - - -tape('upperBound', function (t) { - t.equal('b', ltgt.upperBound({start: 'b', reverse: true})) - t.equal('b', ltgt.upperBound({end: 'b', reverse: false})) - t.equal(undefined, ltgt.lowerBound({start: 'b', reverse: true})) - t.equal(undefined, ltgt.lowerBound({end: 'b', reverse: false})) - t.end() -}) - -tape('bounds and inclusive', function (t) { -// t.equal(ltgt.upperBound({start: 'b', reverse: true}), 'b') -// t.equal(ltgt.upperBoundInclusive({start: 'b', reverse: true}), true) -// t.equal(ltgt.upperBound({end: 'b', reverse: false}), 'b') -// -// t.equal(ltgt.lowerBound({start: 'b', reverse: true}), undefined) -// t.equal(ltgt.lowerBound({end: 'b', reverse: false}), undefined) -// t.equal(ltgt.upperBoundInclusive({start: 'b', reverse: true}), true) -// t.equal(ltgt.upperBoundInclusive({end: 'b', reverse: false}), true) -// - t.equal(ltgt.upperBound({lt: 'b', reverse: true}), 'b') - t.equal(ltgt.upperBound({lte: 'b', reverse: true}), 'b') - - t.equal(ltgt.upperBound({lt: 'b'}), 'b') - t.equal(ltgt.upperBound({lte: 'b'}), 'b') - - t.equal(ltgt.upperBoundInclusive({lt: 'b'}), false) - - t.equal(ltgt.upperBoundInclusive({lte: 'b'}), true) - - t.equal(ltgt.lowerBoundInclusive({gt: 'b'}), false) - t.equal(ltgt.lowerBoundInclusive({gte: 'b'}), true) - - - t.end() -}) - - - -var strings = ['00', '01', '02'] -var sranges = [ - {range: - {start: '00'}, - selection: - ['00', '01', '02'] - }, - {range: - {start: '03', reverse: true}, - selection: - ['02', '01', '00'] - }, - -] -function compare (a, b) { - return a - b -} - -make(elements, ranges) - -make(strings, sranges) -make(elements.map(String), ranges.map(function (e) { - var r = {} - for(var k in e.range) - if('number' === typeof e.range[k]) - r[k] = e.range.toString() - return {range: e.range, selection: e.selection.map(String)} -})) - -function make (elements, ranges) { - - ranges.forEach(function (e) { - - tape(JSON.stringify(e.range) + ' => '+ JSON.stringify(e.selection), - function (t) { - var actual = elements.filter(ltgt.filter(e.range)) - if(e.range.reverse) - actual.reverse() - t.deepEqual(actual, e.selection, 'test range:' + JSON.stringify(e.range)) - - var range = ltgt.toLtgt(e.range) - //should not just return the same thing. - t.notOk(range.min || range.max || range.start || range.end) - - var actual2 = elements.filter(ltgt.filter(range)) - if(e.range.reverse) - actual2.reverse() - t.deepEqual(actual2, e.selection) - - t.end() - }) - }) -} - - -function createLtgtTests(mutate) { - return function (t) { - function map (key) { - return 'foo!' + key - } - - function T (expected, input) { - input = clone(input) - t.deepEqual( - expected, - ltgt.toLtgt(input, mutate ? input : null, map, '!', '~') - ) - } - - //start, end - - T({gte: 'foo!a', lte: 'foo!b'}, {start: 'a', end:'b'}) - T({gte: 'foo!a', lte: 'foo!~'}, {start: 'a'}) - T({gte: 'foo!!', lte: 'foo!b'}, {end: 'b'}) - - T({gte: 'foo!a', lte: 'foo!b', reverse: true}, - {start: 'b', end: 'a', reverse: true}) - - // min, max - - T({gte: 'foo!a', lte: 'foo!b'}, {min: 'a', max:'b'}) - T({gte: 'foo!a', lte: 'foo!~'}, {min: 'a'}) - T({gte: 'foo!!', lte: 'foo!b'}, {max: 'b'}) - T({gte: 'foo!!', lte: 'foo!~'}, {}) - - // lt, gt - - T({gt: 'foo!a', lt: 'foo!b'}, {gt: 'a', lt:'b'}) - T({gt: 'foo!a', lte: 'foo!~'}, {gt: 'a'}) - T({gte: 'foo!!', lt: 'foo!b'}, {lt: 'b'}) - T({gte: 'foo!!', lte: 'foo!~'}, {}) - - // lt, gt - - T({gte: 'foo!a', lte: 'foo!b'}, {gte: 'a', lte:'b'}) - T({gte: 'foo!a', lte: 'foo!~'}, {gte: 'a'}) - T({gte: 'foo!!', lte: 'foo!b'}, {lte: 'b'}) - T({gte: 'foo!!', lte: 'foo!~'}, {}) - - t.end() - } -} - -tape('toLtgt - immutable', createLtgtTests(false)) -tape('toLtgt - mutable', createLtgtTests(true)) - - - - - - - - - - diff --git a/node_modules/browserify-fs/node_modules/level-js/node_modules/typedarray-to-buffer/.travis.yml b/node_modules/browserify-fs/node_modules/level-js/node_modules/typedarray-to-buffer/.travis.yml deleted file mode 100644 index 1416d607..00000000 --- a/node_modules/browserify-fs/node_modules/level-js/node_modules/typedarray-to-buffer/.travis.yml +++ /dev/null @@ -1,4 +0,0 @@ -language: node_js -node_js: - - "0.10" - - "0.11" \ No newline at end of file diff --git a/node_modules/browserify-fs/node_modules/level-js/node_modules/typedarray-to-buffer/LICENSE b/node_modules/browserify-fs/node_modules/level-js/node_modules/typedarray-to-buffer/LICENSE deleted file mode 100644 index 0c068cee..00000000 --- a/node_modules/browserify-fs/node_modules/level-js/node_modules/typedarray-to-buffer/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) Feross Aboukhadijeh - -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/node_modules/browserify-fs/node_modules/level-js/node_modules/typedarray-to-buffer/README.md b/node_modules/browserify-fs/node_modules/level-js/node_modules/typedarray-to-buffer/README.md deleted file mode 100644 index a274e16b..00000000 --- a/node_modules/browserify-fs/node_modules/level-js/node_modules/typedarray-to-buffer/README.md +++ /dev/null @@ -1,64 +0,0 @@ -# typedarray-to-buffer [![travis](https://img.shields.io/travis/feross/typedarray-to-buffer.svg)](https://travis-ci.org/feross/typedarray-to-buffer) [![npm](https://img.shields.io/npm/v/typedarray-to-buffer.svg)](https://npmjs.org/package/typedarray-to-buffer) [![gittip](https://img.shields.io/gittip/feross.svg)](https://www.gittip.com/feross/) - -#### Convert a typed array to a [Buffer](https://github.com/feross/buffer) without a copy. - -[![testling badge](https://ci.testling.com/feross/typedarray-to-buffer.png)](https://ci.testling.com/feross/typedarray-to-buffer) - -Say you're using the ['buffer'](https://github.com/feross/buffer) module on npm, or -[browserify](http://browserify.org/) and you're working with lots of binary data. - -Unfortunately, sometimes the browser or someone else's API gives you an `ArrayBuffer` -or a typed array like `Uint8Array` to work with and you need to convert it to a -`Buffer`. What do you do? - -Of course: `new Buffer(uint8array)` - -But, alas, every time you do `new Buffer(uint8array)` **the entire array gets copied**. -The `Buffer` constructor does a copy; this is -defined by the [node docs](http://nodejs.org/api/buffer.html) and the 'buffer' module -matches the node API exactly. - -So, how can we avoid this expensive copy in -[performance critical applications](https://github.com/feross/buffer/issues/22)? - -***Simply use this module, of course!*** - -## install - -```bash -npm install typedarray-to-buffer -``` - -## usage - -To convert a typed array to a `Buffer` **without a copy**, do this: - -```js -var toBuffer = require('typedarray-to-buffer') - -var arr = new Uint8Array([1, 2, 3]) -arr = toBuffer(arr) - -// arr is a buffer now! - -arr.toString() // '\u0001\u0002\u0003' -arr.readUInt16BE(0) // 258 -``` - -## how it works - -If the browser supports typed arrays, then `toBuffer` will **augment the Uint8Array** you -pass in with the `Buffer` methods and return it. See -[how does Buffer work?](https://github.com/feross/buffer#how-does-it-work) for more about -how augmentation works. - -If the browser doesn't support typed arrays, then `toBuffer` will create a new `Buffer` -object, copy the data into it, and return it. There's no simple performance optimization -we can do for old browsers. Oh well. - -If this module is used in node, then it will just call `new Buffer`. This is just for -the convenience of modules that work in both node and the browser. - -## license - -MIT. Copyright (C) [Feross Aboukhadijeh](http://feross.org). diff --git a/node_modules/browserify-fs/node_modules/level-js/node_modules/typedarray-to-buffer/index.js b/node_modules/browserify-fs/node_modules/level-js/node_modules/typedarray-to-buffer/index.js deleted file mode 100644 index a65d243a..00000000 --- a/node_modules/browserify-fs/node_modules/level-js/node_modules/typedarray-to-buffer/index.js +++ /dev/null @@ -1,19 +0,0 @@ -/** - * Convert a typed array to a Buffer without a copy - * - * Author: Feross Aboukhadijeh - * License: MIT - * - * `npm install typedarray-to-buffer` - */ - -module.exports = function (arr) { - if (typeof Buffer._augment === 'function' && Buffer.TYPED_ARRAY_SUPPORT) { - // If `Buffer` is from the `buffer` module and this browser supports typed arrays, - // then augment it with all the `Buffer` methods. - return Buffer._augment(arr) - } else { - // Otherwise, fallback to creating a `Buffer` with a copy. - return new Buffer(arr) - } -} diff --git a/node_modules/browserify-fs/node_modules/level-js/node_modules/typedarray-to-buffer/package.json b/node_modules/browserify-fs/node_modules/level-js/node_modules/typedarray-to-buffer/package.json deleted file mode 100644 index 5e90f370..00000000 --- a/node_modules/browserify-fs/node_modules/level-js/node_modules/typedarray-to-buffer/package.json +++ /dev/null @@ -1,76 +0,0 @@ -{ - "name": "typedarray-to-buffer", - "description": "Convert a typed array to a Buffer without a copy", - "version": "1.0.4", - "author": { - "name": "Feross Aboukhadijeh", - "email": "feross@feross.org", - "url": "http://feross.org/" - }, - "bugs": { - "url": "https://github.com/feross/typedarray-to-buffer/issues" - }, - "dependencies": {}, - "devDependencies": { - "tape": "2.x" - }, - "homepage": "http://feross.org", - "keywords": [ - "buffer", - "typed array", - "convert", - "no copy", - "uint8array", - "uint16array", - "uint32array", - "int16array", - "int32array", - "float32array", - "float64array", - "browser", - "arraybuffer", - "dataview" - ], - "license": "MIT", - "main": "index.js", - "repository": { - "type": "git", - "url": "git://github.com/feross/typedarray-to-buffer.git" - }, - "scripts": { - "test": "tape test/*.js" - }, - "testling": { - "files": "test/*.js", - "browsers": [ - "ie/6..latest", - "chrome/4..latest", - "firefox/3..latest", - "safari/5.1..latest", - "opera/11.0..latest", - "iphone/6", - "ipad/6" - ] - }, - "gitHead": "f27e6e035e07613979d6cf51cb8aa69a21dbf8cc", - "_id": "typedarray-to-buffer@1.0.4", - "_shasum": "9bb8ba0e841fb3f4cf1fe7c245e9f3fa8a5fe99c", - "_from": "typedarray-to-buffer@>=1.0.0 <1.1.0", - "_npmVersion": "1.4.23", - "_npmUser": { - "name": "feross", - "email": "feross@feross.org" - }, - "maintainers": [ - { - "name": "feross", - "email": "feross@feross.org" - } - ], - "dist": { - "shasum": "9bb8ba0e841fb3f4cf1fe7c245e9f3fa8a5fe99c", - "tarball": "https://registry.npmjs.org/typedarray-to-buffer/-/typedarray-to-buffer-1.0.4.tgz" - }, - "directories": {}, - "_resolved": "https://registry.npmjs.org/typedarray-to-buffer/-/typedarray-to-buffer-1.0.4.tgz" -} diff --git a/node_modules/browserify-fs/node_modules/level-js/node_modules/typedarray-to-buffer/test/basic.js b/node_modules/browserify-fs/node_modules/level-js/node_modules/typedarray-to-buffer/test/basic.js deleted file mode 100644 index 0b39650b..00000000 --- a/node_modules/browserify-fs/node_modules/level-js/node_modules/typedarray-to-buffer/test/basic.js +++ /dev/null @@ -1,30 +0,0 @@ -var test = require('tape') -var convertToBuffer = require('../') - -test('convert to buffer from uint8array', function (t) { - if (typeof Uint8Array !== 'undefined') { - var arr = new Uint8Array([1, 2, 3]) - arr = convertToBuffer(arr) - - t.deepEqual(arr, new Buffer([1, 2, 3]), 'contents equal') - t.ok(Buffer.isBuffer(arr), 'is buffer') - t.equal(arr.readUInt16BE(0), 258) - } else { - t.pass('browser lacks uint8array support, skip test') - } - t.end() -}) - -test('convert to buffer from another array type (uint32array)', function (t) { - if (typeof Uint32Array !== 'undefined') { - var arr = new Uint32Array([1, 2, 3]) - arr = convertToBuffer(arr) - - t.deepEqual(arr, new Buffer([1, 2, 3]), 'contents equal') - t.ok(Buffer.isBuffer(arr), 'is buffer') - t.equal(arr.readUInt16BE(0), 258) - } else { - t.pass('browser lacks uint32array support, skip test') - } - t.end() -}) diff --git a/node_modules/browserify-fs/node_modules/level-js/node_modules/xtend/.npmignore b/node_modules/browserify-fs/node_modules/level-js/node_modules/xtend/.npmignore deleted file mode 100644 index 3c3629e6..00000000 --- a/node_modules/browserify-fs/node_modules/level-js/node_modules/xtend/.npmignore +++ /dev/null @@ -1 +0,0 @@ -node_modules diff --git a/node_modules/browserify-fs/node_modules/level-js/node_modules/xtend/LICENCE b/node_modules/browserify-fs/node_modules/level-js/node_modules/xtend/LICENCE deleted file mode 100644 index a23e08a8..00000000 --- a/node_modules/browserify-fs/node_modules/level-js/node_modules/xtend/LICENCE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (c) 2012 Raynos. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. \ No newline at end of file diff --git a/node_modules/browserify-fs/node_modules/level-js/node_modules/xtend/Makefile b/node_modules/browserify-fs/node_modules/level-js/node_modules/xtend/Makefile deleted file mode 100644 index d583fcf4..00000000 --- a/node_modules/browserify-fs/node_modules/level-js/node_modules/xtend/Makefile +++ /dev/null @@ -1,4 +0,0 @@ -browser: - node ./support/compile - -.PHONY: browser \ No newline at end of file diff --git a/node_modules/browserify-fs/node_modules/level-js/node_modules/xtend/README.md b/node_modules/browserify-fs/node_modules/level-js/node_modules/xtend/README.md deleted file mode 100644 index 389adae3..00000000 --- a/node_modules/browserify-fs/node_modules/level-js/node_modules/xtend/README.md +++ /dev/null @@ -1,27 +0,0 @@ -# xtend - -[![browser support][3]][4] - -Extend like a boss - -xtend is a basic utility library which allows you to extend an object by appending all of the properties from each object in a list. When there are identical properties, the right-most property takes presedence. - -## Examples - -```js -var extend = require("xtend") - -var combination = extend({ - a: "a" -}, { - b: "b" -}) -// { a: "a", b: "b" } -``` - - -## MIT Licenced - - - [3]: http://ci.testling.com/Raynos/xtend.png - [4]: http://ci.testling.com/Raynos/xtend diff --git a/node_modules/browserify-fs/node_modules/level-js/node_modules/xtend/has-keys.js b/node_modules/browserify-fs/node_modules/level-js/node_modules/xtend/has-keys.js deleted file mode 100644 index 62391e78..00000000 --- a/node_modules/browserify-fs/node_modules/level-js/node_modules/xtend/has-keys.js +++ /dev/null @@ -1,7 +0,0 @@ -module.exports = hasKeys - -function hasKeys(source) { - return source !== null && - (typeof source === "object" || - typeof source === "function") -} diff --git a/node_modules/browserify-fs/node_modules/level-js/node_modules/xtend/index.js b/node_modules/browserify-fs/node_modules/level-js/node_modules/xtend/index.js deleted file mode 100644 index 20937d19..00000000 --- a/node_modules/browserify-fs/node_modules/level-js/node_modules/xtend/index.js +++ /dev/null @@ -1,25 +0,0 @@ -var Keys = require("object-keys") -var hasKeys = require("./has-keys") - -module.exports = extend - -function extend() { - var target = {} - - for (var i = 0; i < arguments.length; i++) { - var source = arguments[i] - - if (!hasKeys(source)) { - continue - } - - var keys = Keys(source) - - for (var j = 0; j < keys.length; j++) { - var name = keys[j] - target[name] = source[name] - } - } - - return target -} diff --git a/node_modules/browserify-fs/node_modules/level-js/node_modules/xtend/mutable.js b/node_modules/browserify-fs/node_modules/level-js/node_modules/xtend/mutable.js deleted file mode 100644 index 17454ae4..00000000 --- a/node_modules/browserify-fs/node_modules/level-js/node_modules/xtend/mutable.js +++ /dev/null @@ -1,25 +0,0 @@ -var Keys = require("object-keys") -var hasKeys = require("./has-keys") - -module.exports = extend - -function extend(target) { - var sources = [].slice.call(arguments, 1) - - for (var i = 0; i < sources.length; i++) { - var source = sources[i] - - if (!hasKeys(source)) { - continue - } - - var keys = Keys(source) - - for (var j = 0; j < keys.length; j++) { - var name = keys[j] - target[name] = source[name] - } - } - - return target -} diff --git a/node_modules/browserify-fs/node_modules/level-js/node_modules/xtend/node_modules/object-keys/.npmignore b/node_modules/browserify-fs/node_modules/level-js/node_modules/xtend/node_modules/object-keys/.npmignore deleted file mode 100644 index 3c3629e6..00000000 --- a/node_modules/browserify-fs/node_modules/level-js/node_modules/xtend/node_modules/object-keys/.npmignore +++ /dev/null @@ -1 +0,0 @@ -node_modules diff --git a/node_modules/browserify-fs/node_modules/level-js/node_modules/xtend/node_modules/object-keys/.travis.yml b/node_modules/browserify-fs/node_modules/level-js/node_modules/xtend/node_modules/object-keys/.travis.yml deleted file mode 100644 index 60d00ce1..00000000 --- a/node_modules/browserify-fs/node_modules/level-js/node_modules/xtend/node_modules/object-keys/.travis.yml +++ /dev/null @@ -1,5 +0,0 @@ -language: node_js -node_js: - - "0.10" - - "0.8" - - "0.6" diff --git a/node_modules/browserify-fs/node_modules/level-js/node_modules/xtend/node_modules/object-keys/README.md b/node_modules/browserify-fs/node_modules/level-js/node_modules/xtend/node_modules/object-keys/README.md deleted file mode 100644 index ab32d0ad..00000000 --- a/node_modules/browserify-fs/node_modules/level-js/node_modules/xtend/node_modules/object-keys/README.md +++ /dev/null @@ -1,39 +0,0 @@ -#object-keys [![Version Badge][2]][1] - -[![Build Status][3]][4] [![dependency status][5]][6] - -[![browser support][7]][8] - -An Object.keys shim. Uses Object.keys if available. - -## Example - -```js -var keys = require('object-keys'); -var assert = require('assert'); -var obj = { - a: true, - b: true, - c: true -}; - -assert.equal(keys(obj), ['a', 'b', 'c']); -``` - -## Source -Implementation taken directly from [es5-shim]([9]), with modifications, including from [lodash]([10]). - -## Tests -Simply clone the repo, `npm install`, and run `npm test` - -[1]: https://npmjs.org/package/object-keys -[2]: http://vb.teelaun.ch/ljharb/object-keys.svg -[3]: https://travis-ci.org/ljharb/object-keys.png -[4]: https://travis-ci.org/ljharb/object-keys -[5]: https://david-dm.org/ljharb/object-keys.png -[6]: https://david-dm.org/ljharb/object-keys -[7]: https://ci.testling.com/ljharb/object-keys.png -[8]: https://ci.testling.com/ljharb/object-keys -[9]: https://github.com/kriskowal/es5-shim/blob/master/es5-shim.js#L542-589 -[10]: https://github.com/bestiejs/lodash - diff --git a/node_modules/browserify-fs/node_modules/level-js/node_modules/xtend/node_modules/object-keys/foreach.js b/node_modules/browserify-fs/node_modules/level-js/node_modules/xtend/node_modules/object-keys/foreach.js deleted file mode 100644 index db32d458..00000000 --- a/node_modules/browserify-fs/node_modules/level-js/node_modules/xtend/node_modules/object-keys/foreach.js +++ /dev/null @@ -1,40 +0,0 @@ -var hasOwn = Object.prototype.hasOwnProperty; -var toString = Object.prototype.toString; - -var isFunction = function (fn) { - var isFunc = (typeof fn === 'function' && !(fn instanceof RegExp)) || toString.call(fn) === '[object Function]'; - if (!isFunc && typeof window !== 'undefined') { - isFunc = fn === window.setTimeout || fn === window.alert || fn === window.confirm || fn === window.prompt; - } - return isFunc; -}; - -module.exports = function forEach(obj, fn) { - if (!isFunction(fn)) { - throw new TypeError('iterator must be a function'); - } - var i, k, - isString = typeof obj === 'string', - l = obj.length, - context = arguments.length > 2 ? arguments[2] : null; - if (l === +l) { - for (i = 0; i < l; i++) { - if (context === null) { - fn(isString ? obj.charAt(i) : obj[i], i, obj); - } else { - fn.call(context, isString ? obj.charAt(i) : obj[i], i, obj); - } - } - } else { - for (k in obj) { - if (hasOwn.call(obj, k)) { - if (context === null) { - fn(obj[k], k, obj); - } else { - fn.call(context, obj[k], k, obj); - } - } - } - } -}; - diff --git a/node_modules/browserify-fs/node_modules/level-js/node_modules/xtend/node_modules/object-keys/index.js b/node_modules/browserify-fs/node_modules/level-js/node_modules/xtend/node_modules/object-keys/index.js deleted file mode 100644 index f5b24b6d..00000000 --- a/node_modules/browserify-fs/node_modules/level-js/node_modules/xtend/node_modules/object-keys/index.js +++ /dev/null @@ -1,2 +0,0 @@ -module.exports = Object.keys || require('./shim'); - diff --git a/node_modules/browserify-fs/node_modules/level-js/node_modules/xtend/node_modules/object-keys/isArguments.js b/node_modules/browserify-fs/node_modules/level-js/node_modules/xtend/node_modules/object-keys/isArguments.js deleted file mode 100644 index 74a09897..00000000 --- a/node_modules/browserify-fs/node_modules/level-js/node_modules/xtend/node_modules/object-keys/isArguments.js +++ /dev/null @@ -1,16 +0,0 @@ -var toString = Object.prototype.toString; - -module.exports = function isArguments(value) { - var str = toString.call(value); - var isArguments = str === '[object Arguments]'; - if (!isArguments) { - isArguments = str !== '[object Array]' - && value !== null - && typeof value === 'object' - && typeof value.length === 'number' - && value.length >= 0 - && toString.call(value.callee) === '[object Function]'; - } - return isArguments; -}; - diff --git a/node_modules/browserify-fs/node_modules/level-js/node_modules/xtend/node_modules/object-keys/package.json b/node_modules/browserify-fs/node_modules/level-js/node_modules/xtend/node_modules/object-keys/package.json deleted file mode 100644 index 01f2eef6..00000000 --- a/node_modules/browserify-fs/node_modules/level-js/node_modules/xtend/node_modules/object-keys/package.json +++ /dev/null @@ -1,56 +0,0 @@ -{ - "name": "object-keys", - "version": "0.4.0", - "author": { - "name": "Jordan Harband" - }, - "description": "An Object.keys replacement, in case Object.keys is not available. From https://github.com/kriskowal/es5-shim", - "license": "MIT", - "main": "index.js", - "scripts": { - "test": "node test/index.js" - }, - "repository": { - "type": "git", - "url": "git://github.com/ljharb/object-keys.git" - }, - "keywords": [ - "Object.keys", - "keys", - "ES5", - "shim" - ], - "dependencies": {}, - "devDependencies": { - "foreach": "~2.0.3", - "is": "~0.2.6", - "tape": "~1.0.4", - "indexof": "~0.0.1" - }, - "testling": { - "files": "test/index.js", - "browsers": [ - "iexplore/6.0..latest", - "firefox/3.0..6.0", - "firefox/15.0..latest", - "firefox/nightly", - "chrome/4.0..10.0", - "chrome/20.0..latest", - "chrome/canary", - "opera/10.0..latest", - "opera/next", - "safari/4.0..latest", - "ipad/6.0..latest", - "iphone/6.0..latest", - "android-browser/4.2" - ] - }, - "readme": "#object-keys [![Version Badge][2]][1]\n\n[![Build Status][3]][4] [![dependency status][5]][6]\n\n[![browser support][7]][8]\n\nAn Object.keys shim. Uses Object.keys if available.\n\n## Example\n\n```js\nvar keys = require('object-keys');\nvar assert = require('assert');\nvar obj = {\n\ta: true,\n\tb: true,\n\tc: true\n};\n\nassert.equal(keys(obj), ['a', 'b', 'c']);\n```\n\n## Source\nImplementation taken directly from [es5-shim]([9]), with modifications, including from [lodash]([10]).\n\n## Tests\nSimply clone the repo, `npm install`, and run `npm test`\n\n[1]: https://npmjs.org/package/object-keys\n[2]: http://vb.teelaun.ch/ljharb/object-keys.svg\n[3]: https://travis-ci.org/ljharb/object-keys.png\n[4]: https://travis-ci.org/ljharb/object-keys\n[5]: https://david-dm.org/ljharb/object-keys.png\n[6]: https://david-dm.org/ljharb/object-keys\n[7]: https://ci.testling.com/ljharb/object-keys.png\n[8]: https://ci.testling.com/ljharb/object-keys\n[9]: https://github.com/kriskowal/es5-shim/blob/master/es5-shim.js#L542-589\n[10]: https://github.com/bestiejs/lodash\n\n", - "readmeFilename": "README.md", - "bugs": { - "url": "https://github.com/ljharb/object-keys/issues" - }, - "homepage": "https://github.com/ljharb/object-keys", - "_id": "object-keys@0.4.0", - "_from": "object-keys@>=0.4.0 <0.5.0" -} diff --git a/node_modules/browserify-fs/node_modules/level-js/node_modules/xtend/node_modules/object-keys/shim.js b/node_modules/browserify-fs/node_modules/level-js/node_modules/xtend/node_modules/object-keys/shim.js deleted file mode 100644 index b88421be..00000000 --- a/node_modules/browserify-fs/node_modules/level-js/node_modules/xtend/node_modules/object-keys/shim.js +++ /dev/null @@ -1,62 +0,0 @@ -(function () { - "use strict"; - - // modified from https://github.com/kriskowal/es5-shim - var has = Object.prototype.hasOwnProperty, - toString = Object.prototype.toString, - forEach = require('./foreach'), - isArgs = require('./isArguments'), - hasDontEnumBug = !({'toString': null}).propertyIsEnumerable('toString'), - hasProtoEnumBug = (function () {}).propertyIsEnumerable('prototype'), - dontEnums = [ - "toString", - "toLocaleString", - "valueOf", - "hasOwnProperty", - "isPrototypeOf", - "propertyIsEnumerable", - "constructor" - ], - keysShim; - - keysShim = function keys(object) { - var isObject = object !== null && typeof object === 'object', - isFunction = toString.call(object) === '[object Function]', - isArguments = isArgs(object), - theKeys = []; - - if (!isObject && !isFunction && !isArguments) { - throw new TypeError("Object.keys called on a non-object"); - } - - if (isArguments) { - forEach(object, function (value) { - theKeys.push(value); - }); - } else { - var name, - skipProto = hasProtoEnumBug && isFunction; - - for (name in object) { - if (!(skipProto && name === 'prototype') && has.call(object, name)) { - theKeys.push(name); - } - } - } - - if (hasDontEnumBug) { - var ctor = object.constructor, - skipConstructor = ctor && ctor.prototype === object; - - forEach(dontEnums, function (dontEnum) { - if (!(skipConstructor && dontEnum === 'constructor') && has.call(object, dontEnum)) { - theKeys.push(dontEnum); - } - }); - } - return theKeys; - }; - - module.exports = keysShim; -}()); - diff --git a/node_modules/browserify-fs/node_modules/level-js/node_modules/xtend/node_modules/object-keys/test/foreach.js b/node_modules/browserify-fs/node_modules/level-js/node_modules/xtend/node_modules/object-keys/test/foreach.js deleted file mode 100644 index f29f065a..00000000 --- a/node_modules/browserify-fs/node_modules/level-js/node_modules/xtend/node_modules/object-keys/test/foreach.js +++ /dev/null @@ -1,156 +0,0 @@ -var test = require('tape'); -var forEach = require('../foreach.js'); - -test('second argument: iterator', function (t) { - var arr = []; - t.throws(function () { forEach(arr); }, TypeError, 'undefined is not a function'); - t.throws(function () { forEach(arr, null); }, TypeError, 'null is not a function'); - t.throws(function () { forEach(arr, ''); }, TypeError, 'string is not a function'); - t.throws(function () { forEach(arr, /a/); }, TypeError, 'regex is not a function'); - t.throws(function () { forEach(arr, true); }, TypeError, 'true is not a function'); - t.throws(function () { forEach(arr, false); }, TypeError, 'false is not a function'); - t.throws(function () { forEach(arr, NaN); }, TypeError, 'NaN is not a function'); - t.throws(function () { forEach(arr, 42); }, TypeError, '42 is not a function'); - t.doesNotThrow(function () { forEach(arr, function () {}); }, 'function is a function'); - t.doesNotThrow(function () { forEach(arr, setTimeout); }, 'setTimeout is a function'); - if (typeof window !== 'undefined') { - t.doesNotThrow(function () { forEach(arr, window.alert); }, 'alert is a function'); - } - t.end(); -}); - -test('array', function (t) { - var arr = [1, 2, 3]; - - t.test('iterates over every item', function (st) { - var index = 0; - forEach(arr, function () { index += 1; }); - st.equal(index, arr.length, 'iterates ' + arr.length + ' times'); - st.end(); - }); - - t.test('first iterator argument', function (st) { - var index = 0; - st.plan(arr.length); - forEach(arr, function (item) { - st.equal(arr[index], item, 'item ' + index + ' is passed as first argument'); - index += 1; - }); - st.end(); - }); - - t.test('second iterator argument', function (st) { - var counter = 0; - st.plan(arr.length); - forEach(arr, function (item, index) { - st.equal(counter, index, 'index ' + index + ' is passed as second argument'); - counter += 1; - }); - st.end(); - }); - - t.test('third iterator argument', function (st) { - st.plan(arr.length); - forEach(arr, function (item, index, array) { - st.deepEqual(arr, array, 'array is passed as third argument'); - }); - st.end(); - }); - - t.test('context argument', function (st) { - var context = {}; - st.plan(arr.length); - forEach(arr, function () { - st.equal(this, context, '"this" is the passed context'); - }, context); - st.end(); - }); - - t.end(); -}); - -test('object', function (t) { - var obj = { - a: 1, - b: 2, - c: 3 - }; - var keys = ['a', 'b', 'c']; - - var F = function () { - this.a = 1; - this.b = 2; - }; - F.prototype.c = 3; - var fKeys = ['a', 'b']; - - t.test('iterates over every object literal key', function (st) { - var counter = 0; - forEach(obj, function () { counter += 1; }); - st.equal(counter, keys.length, 'iterated ' + counter + ' times'); - st.end(); - }); - - t.test('iterates only over own keys', function (st) { - var counter = 0; - forEach(new F(), function () { counter += 1; }); - st.equal(counter, fKeys.length, 'iterated ' + fKeys.length + ' times'); - st.end(); - }); - - t.test('first iterator argument', function (st) { - var index = 0; - st.plan(keys.length); - forEach(obj, function (item) { - st.equal(obj[keys[index]], item, 'item at key ' + keys[index] + ' is passed as first argument'); - index += 1; - }); - st.end(); - }); - - t.test('second iterator argument', function (st) { - var counter = 0; - st.plan(keys.length); - forEach(obj, function (item, key) { - st.equal(keys[counter], key, 'key ' + key + ' is passed as second argument'); - counter += 1; - }); - st.end(); - }); - - t.test('third iterator argument', function (st) { - st.plan(keys.length); - forEach(obj, function (item, key, object) { - st.deepEqual(obj, object, 'object is passed as third argument'); - }); - st.end(); - }); - - t.test('context argument', function (st) { - var context = {}; - st.plan(1); - forEach({foo: 'bar'}, function () { - st.equal(this, context, '"this" is the passed context'); - }, context); - st.end(); - }); - - t.end(); -}); - - -test('string', function (t) { - var str = 'str'; - t.test('second iterator argument', function (st) { - var counter = 0; - st.plan(str.length * 2 + 1); - forEach(str, function (item, index) { - st.equal(counter, index, 'index ' + index + ' is passed as second argument'); - st.equal(str.charAt(index), item); - counter += 1; - }); - st.equal(counter, str.length, 'iterates ' + str.length + ' times'); - }); - t.end(); -}); - diff --git a/node_modules/browserify-fs/node_modules/level-js/node_modules/xtend/node_modules/object-keys/test/index.js b/node_modules/browserify-fs/node_modules/level-js/node_modules/xtend/node_modules/object-keys/test/index.js deleted file mode 100644 index 8b77b1fc..00000000 --- a/node_modules/browserify-fs/node_modules/level-js/node_modules/xtend/node_modules/object-keys/test/index.js +++ /dev/null @@ -1,6 +0,0 @@ - -require('./foreach'); -require('./isArguments'); - -require('./shim'); - diff --git a/node_modules/browserify-fs/node_modules/level-js/node_modules/xtend/node_modules/object-keys/test/isArguments.js b/node_modules/browserify-fs/node_modules/level-js/node_modules/xtend/node_modules/object-keys/test/isArguments.js deleted file mode 100644 index 62a07c2d..00000000 --- a/node_modules/browserify-fs/node_modules/level-js/node_modules/xtend/node_modules/object-keys/test/isArguments.js +++ /dev/null @@ -1,10 +0,0 @@ -var test = require('tape'); -var isArguments = require('../isArguments'); - -test('is.arguments', function (t) { - t.notOk(isArguments([]), 'array is not arguments'); - (function () { t.ok(isArguments(arguments), 'arguments is arguments'); }()); - (function () { t.notOk(isArguments(Array.prototype.slice.call(arguments)), 'sliced arguments is not arguments'); }()); - t.end(); -}); - diff --git a/node_modules/browserify-fs/node_modules/level-js/node_modules/xtend/node_modules/object-keys/test/shim.js b/node_modules/browserify-fs/node_modules/level-js/node_modules/xtend/node_modules/object-keys/test/shim.js deleted file mode 100644 index 9d932712..00000000 --- a/node_modules/browserify-fs/node_modules/level-js/node_modules/xtend/node_modules/object-keys/test/shim.js +++ /dev/null @@ -1,134 +0,0 @@ -var test = require('tape'); -var shimmedKeys = require('../index.js'); -var is = require('is'); -var keys = require('../shim.js'); -var forEach = require('foreach'); -var indexOf = require('indexof'); - -var obj = { - "str": "boz", - "obj": {}, - "arr": [], - "bool": true, - "num": 42, - "aNull": null, - "undef": undefined -}; -var objKeys = ['str', 'obj', 'arr', 'bool', 'num', 'aNull', 'undef']; - -test('exports a function', function (t) { - if (Object.keys) { - t.equal(Object.keys, shimmedKeys, 'Object.keys is supported and exported'); - } else { - t.equal(keys, shimmedKeys, 'Object.keys is not supported; shim is exported'); - } - t.end(); -}); - -test('working with actual shim', function (t) { - t.notEqual(Object.keys, keys, 'keys shim is not native Object.keys'); - t.end(); -}); - -test('works with an object literal', function (t) { - var theKeys = keys(obj); - t.equal(is.array(theKeys), true, 'returns an array'); - t.deepEqual(theKeys, objKeys, 'Object has expected keys'); - t.end(); -}); - -test('works with an array', function (t) { - var arr = [1, 2, 3]; - var theKeys = keys(arr); - t.equal(is.array(theKeys), true, 'returns an array'); - t.deepEqual(theKeys, ['0', '1', '2'], 'Array has expected keys'); - t.end(); -}); - -test('works with a function', function (t) { - var foo = function () {}; - foo.a = true; - - t.doesNotThrow(function () { return keys(foo); }, 'does not throw an error'); - t.deepEqual(keys(foo), ['a'], 'returns expected keys'); - t.end(); -}); - -test('returns names which are own properties', function (t) { - forEach(keys(obj), function (name) { - t.equal(obj.hasOwnProperty(name), true, name + ' should be returned'); - }); - t.end(); -}); - -test('returns names which are enumerable', function (t) { - var k, loopedValues = []; - for (k in obj) { - loopedValues.push(k); - } - forEach(keys(obj), function (name) { - t.notEqual(indexOf(loopedValues, name), -1, name + ' is not enumerable'); - }); - t.end(); -}); - -test('throws an error for a non-object', function (t) { - t.throws( - function () { return keys(42); }, - new TypeError('Object.keys called on a non-object'), - 'throws on a non-object' - ); - t.end(); -}); - -test('works with an object instance', function (t) { - var Prototype = function () {}; - Prototype.prototype.foo = true; - var obj = new Prototype(); - obj.bar = true; - var theKeys = keys(obj); - t.equal(is.array(theKeys), true, 'returns an array'); - t.deepEqual(theKeys, ['bar'], 'Instance has expected keys'); - t.end(); -}); - -test('works in iOS 5 mobile Safari', function (t) { - var Foo = function () {}; - Foo.a = function () {}; - - // the bug is keys(Foo) => ['a', 'prototype'] instead of ['a'] - t.deepEqual(keys(Foo), ['a'], 'has expected keys'); - t.end(); -}); - -test('works in environments with the dontEnum bug (IE < 9)', function (t) { - var Foo = function () {}; - Foo.prototype.a = function () {}; - - // the bug is keys(Foo.prototype) => ['a', 'constructor'] instead of ['a'] - t.deepEqual(keys(Foo.prototype), ['a'], 'has expected keys'); - t.end(); -}); - -test('shadowed properties', function (t) { - var shadowedProps = [ - 'dummyControlProp', /* just to be sure */ - 'constructor', - 'hasOwnProperty', - 'isPrototypeOf', - 'propertyIsEnumerable', - 'toLocaleString', - 'toString', - 'valueOf' - ]; - shadowedProps.sort(); - var shadowedObject = {}; - forEach(shadowedProps, function (value, index) { - shadowedObject[value] = index; - }); - var shadowedObjectKeys = keys(shadowedObject); - shadowedObjectKeys.sort(); - t.deepEqual(shadowedObjectKeys, shadowedProps, 'troublesome shadowed properties are keys of object literals'); - t.end(); -}); - diff --git a/node_modules/browserify-fs/node_modules/level-js/node_modules/xtend/package.json b/node_modules/browserify-fs/node_modules/level-js/node_modules/xtend/package.json deleted file mode 100644 index b198cdfe..00000000 --- a/node_modules/browserify-fs/node_modules/level-js/node_modules/xtend/package.json +++ /dev/null @@ -1,72 +0,0 @@ -{ - "name": "xtend", - "version": "2.1.2", - "description": "extend like a boss", - "keywords": [ - "extend", - "merge", - "options", - "opts", - "object", - "array" - ], - "author": { - "name": "Raynos", - "email": "raynos2@gmail.com" - }, - "repository": { - "type": "git", - "url": "git://github.com/Raynos/xtend.git" - }, - "main": "index", - "scripts": { - "test": "node test" - }, - "dependencies": { - "object-keys": "~0.4.0" - }, - "devDependencies": { - "tape": "~1.1.0" - }, - "homepage": "https://github.com/Raynos/xtend", - "contributors": [ - { - "name": "Jake Verbaten" - }, - { - "name": "Matt Esch" - } - ], - "bugs": { - "url": "https://github.com/Raynos/xtend/issues", - "email": "raynos2@gmail.com" - }, - "licenses": [ - { - "type": "MIT", - "url": "http://github.com/raynos/xtend/raw/master/LICENSE" - } - ], - "testling": { - "files": "test.js", - "browsers": [ - "ie/7..latest", - "firefox/16..latest", - "firefox/nightly", - "chrome/22..latest", - "chrome/canary", - "opera/12..latest", - "opera/next", - "safari/5.1..latest", - "ipad/6.0..latest", - "iphone/6.0..latest" - ] - }, - "engines": { - "node": ">=0.4" - }, - "readme": "# xtend\n\n[![browser support][3]][4]\n\nExtend like a boss\n\nxtend is a basic utility library which allows you to extend an object by appending all of the properties from each object in a list. When there are identical properties, the right-most property takes presedence.\n\n## Examples\n\n```js\nvar extend = require(\"xtend\")\n\nvar combination = extend({\n a: \"a\"\n}, {\n b: \"b\"\n})\n// { a: \"a\", b: \"b\" }\n```\n\n\n## MIT Licenced\n\n\n [3]: http://ci.testling.com/Raynos/xtend.png\n [4]: http://ci.testling.com/Raynos/xtend\n", - "readmeFilename": "README.md", - "_id": "xtend@2.1.2", - "_from": "xtend@>=2.1.2 <2.2.0" -} diff --git a/node_modules/browserify-fs/node_modules/level-js/node_modules/xtend/test.js b/node_modules/browserify-fs/node_modules/level-js/node_modules/xtend/test.js deleted file mode 100644 index 3369d796..00000000 --- a/node_modules/browserify-fs/node_modules/level-js/node_modules/xtend/test.js +++ /dev/null @@ -1,63 +0,0 @@ -var test = require("tape") -var extend = require("./") -var mutableExtend = require("./mutable") - -test("merge", function(assert) { - var a = { a: "foo" } - var b = { b: "bar" } - - assert.deepEqual(extend(a, b), { a: "foo", b: "bar" }) - assert.end() -}) - -test("replace", function(assert) { - var a = { a: "foo" } - var b = { a: "bar" } - - assert.deepEqual(extend(a, b), { a: "bar" }) - assert.end() -}) - -test("undefined", function(assert) { - var a = { a: undefined } - var b = { b: "foo" } - - assert.deepEqual(extend(a, b), { a: undefined, b: "foo" }) - assert.deepEqual(extend(b, a), { a: undefined, b: "foo" }) - assert.end() -}) - -test("handle 0", function(assert) { - var a = { a: "default" } - var b = { a: 0 } - - assert.deepEqual(extend(a, b), { a: 0 }) - assert.deepEqual(extend(b, a), { a: "default" }) - assert.end() -}) - -test("is immutable", function (assert) { - var record = {} - - extend(record, { foo: "bar" }) - assert.equal(record.foo, undefined) - assert.end() -}) - -test("null as argument", function (assert) { - var a = { foo: "bar" } - var b = null - var c = void 0 - - assert.deepEqual(extend(b, a, c), { foo: "bar" }) - assert.end() -}) - -test("mutable", function (assert) { - var a = { foo: "bar" } - - mutableExtend(a, { bar: "baz" }) - - assert.equal(a.bar, "baz") - assert.end() -}) diff --git a/node_modules/browserify-fs/node_modules/level-js/package.json b/node_modules/browserify-fs/node_modules/level-js/package.json deleted file mode 100644 index 8200417c..00000000 --- a/node_modules/browserify-fs/node_modules/level-js/package.json +++ /dev/null @@ -1,91 +0,0 @@ -{ - "name": "level-js", - "version": "2.2.4", - "description": "leveldown/leveldb library for browsers using IndexedDB", - "main": "index.js", - "scripts": { - "test": "beefy test/test.js:test.js test/test-levelup.js:test-levelup.js" - }, - "repository": { - "type": "git", - "url": "git+ssh://git@github.com/maxogden/level.js.git" - }, - "keywords": [ - "level", - "leveldb" - ], - "author": { - "name": "max ogden" - }, - "license": "BSD-2-Clause", - "devDependencies": { - "beefy": "~0.3.0", - "browserify": "^4.1.2", - "levelup": "~0.18.2", - "tape": "^4.0.0" - }, - "dependencies": { - "abstract-leveldown": "~0.12.0", - "idb-wrapper": "^1.5.0", - "isbuffer": "~0.0.0", - "ltgt": "^2.1.2", - "typedarray-to-buffer": "~1.0.0", - "xtend": "~2.1.2" - }, - "testling": { - "files": "test/test.js", - "browsers": [ - "ie/10..latest", - "firefox/17..latest", - "chrome/25..latest", - "opera/15..latest", - "safari/6.0..latest" - ] - }, - "gitHead": "e819338e87aa305e57ec9c2fe58168ab5dca6da3", - "bugs": { - "url": "https://github.com/maxogden/level.js/issues" - }, - "homepage": "https://github.com/maxogden/level.js#readme", - "_id": "level-js@2.2.4", - "_shasum": "bc055f4180635d4489b561c9486fa370e8c11697", - "_from": "level-js@>=2.1.3 <3.0.0", - "_npmVersion": "2.14.15", - "_nodeVersion": "4.2.3", - "_npmUser": { - "name": "maxogden", - "email": "max@maxogden.com" - }, - "dist": { - "shasum": "bc055f4180635d4489b561c9486fa370e8c11697", - "tarball": "https://registry.npmjs.org/level-js/-/level-js-2.2.4.tgz" - }, - "maintainers": [ - { - "name": "jameskyburz", - "email": "james.kyburz@gmail.com" - }, - { - "name": "juliangruber", - "email": "julian@juliangruber.com" - }, - { - "name": "matteo.collina", - "email": "hello@matteocollina.com" - }, - { - "name": "maxogden", - "email": "max@maxogden.com" - }, - { - "name": "nolanlawson", - "email": "nolan@nolanlawson.com" - } - ], - "_npmOperationalInternal": { - "host": "packages-12-west.internal.npmjs.com", - "tmp": "tmp/level-js-2.2.4.tgz_1462795108561_0.997035495005548" - }, - "directories": {}, - "_resolved": "https://registry.npmjs.org/level-js/-/level-js-2.2.4.tgz" -} diff --git a/node_modules/browserify-fs/node_modules/level-js/test/custom-tests.js b/node_modules/browserify-fs/node_modules/level-js/test/custom-tests.js deleted file mode 100644 index f6b801bd..00000000 --- a/node_modules/browserify-fs/node_modules/level-js/test/custom-tests.js +++ /dev/null @@ -1,78 +0,0 @@ -var levelup = require('levelup') - -module.exports.setUp = function (leveldown, test, testCommon) { - test('setUp common', testCommon.setUp) - test('setUp db', function (t) { - db = leveldown(testCommon.location()) - db.open(t.end.bind(t)) - }) -} - -module.exports.all = function(leveljs, tape, testCommon) { - - module.exports.setUp(leveljs, tape, testCommon) - - tape('store native JS types with raw = true', function(t) { - var level = leveljs(testCommon.location()) - level.open(function(err) { - t.notOk(err, 'no error') - level.put('key', true, { raw: true }, function (err) { - t.notOk(err, 'no error') - level.get('key', { raw: true }, function(err, value) { - t.notOk(err, 'no error') - t.ok(typeof value === 'boolean', 'is boolean type') - t.ok(value, 'is truthy') - t.end() - }) - }) - }) - }) - - // NOTE: in chrome (at least) indexeddb gets buggy if you try and destroy a db, - // then create it again, then try and destroy it again. these avoid doing that - - tape('test levelup .destroy w/ string', function(t) { - var level = levelup('destroy-test', {db: leveljs}) - level.put('key', 'value', function (err) { - t.notOk(err, 'no error') - level.get('key', function (err, value) { - t.notOk(err, 'no error') - t.equal(value, 'value', 'should have value') - level.close(function (err) { - t.notOk(err, 'no error') - leveljs.destroy('destroy-test', function (err) { - t.notOk(err, 'no error') - var level2 = levelup('destroy-test', {db: leveljs}) - level2.get('key', function (err, value) { - t.ok(err, 'key is not there') - t.end() - }) - }) - }) - }) - }) - }) - - tape('test levelup .destroy w/ db instance', function(t) { - var level = levelup('destroy-test-2', {db: leveljs}) - level.put('key', 'value', function (err) { - t.notOk(err, 'no error') - level.get('key', function (err, value) { - t.notOk(err, 'no error') - t.equal(value, 'value', 'should have value') - level.close(function (err) { - t.notOk(err, 'no error') - leveljs.destroy(level.db, function (err) { - t.notOk(err, 'no error') - var level2 = levelup('destroy-test-2', {db: leveljs}) - level2.get('key', function (err, value) { - t.ok(err, 'key is not there') - t.end() - }) - }) - }) - }) - }) - }) - -} diff --git a/node_modules/browserify-fs/node_modules/level-js/test/idb-shim.js b/node_modules/browserify-fs/node_modules/level-js/test/idb-shim.js deleted file mode 100644 index 59aa99c8..00000000 --- a/node_modules/browserify-fs/node_modules/level-js/test/idb-shim.js +++ /dev/null @@ -1,1686 +0,0 @@ -// this is a bundled copy of https://github.com/axemclion/IndexedDBShim/ used in the test suite for older browsers - -'use strict'; - -module.exports = function() { - /** - * An initialization file that checks for conditions, removes console.log and warn, etc - */ - var idbModules = {}; - /*jshint globalstrict: true*/ - 'use strict'; - (function(idbModules) { - /** - * A utility method to callback onsuccess, onerror, etc as soon as the calling function's context is over - * @param {Object} fn - * @param {Object} context - * @param {Object} argArray - */ - - function callback(fn, context, event, func) { - //window.setTimeout(function(){ - event.target = context; - (typeof context[fn] === "function") && context[fn].apply(context, [event]); - (typeof func === "function") && func(); - //}, 1); - } - - /** - * Throws a new DOM Exception, - * @param {Object} name - * @param {Object} message - * @param {Object} error - */ - - function throwDOMException(name, message, error) { - var e = new DOMException.constructor(0, message); - e.name = name; - e.message = message; - if (idbModules.DEBUG) { - console.log(name, message, error, e); - console.trace && console.trace(); - } - throw e; - } - - /** - * Shim the DOMStringList object. - * - */ - var StringList = function() { - this.length = 0; - this._items = []; - //Internal functions on the prototype have been made non-enumerable below. - if (Object.defineProperty) { - Object.defineProperty(this, '_items', { - enumerable: false - }); - } - }; - StringList.prototype = { - // Interface. - contains: function(str) { - return -1 !== this._items.indexOf(str); - }, - item: function(key) { - return this._items[key]; - }, - - // Helpers. Should only be used internally. - indexOf: function(str) { - return this._items.indexOf(str); - }, - push: function(item) { - this._items.push(item); - this.length += 1; - for (var i = 0; i < this._items.length; i++) { - this[i] = this._items[i]; - } - }, - splice: function( /*index, howmany, item1, ..., itemX*/ ) { - this._items.splice.apply(this._items, arguments); - this.length = this._items.length; - for (var i in this) { - if (i === String(parseInt(i, 10))) { - delete this[i]; - } - } - for (i = 0; i < this._items.length; i++) { - this[i] = this._items[i]; - } - } - }; - if (Object.defineProperty) { - for (var i in { - 'indexOf': false, - 'push': false, - 'splice': false - }) { - Object.defineProperty(StringList.prototype, i, { - enumerable: false - }); - } - } - idbModules.util = { - "throwDOMException": throwDOMException, - "callback": callback, - "quote": function(arg) { - return "'" + arg + "'"; - }, - "StringList": StringList - }; - }(idbModules)); - /*jshint globalstrict: true*/ - 'use strict'; - (function(idbModules){ - /** - * Implementation of the Structured Cloning Algorithm. Supports the - * following object types: - * - Blob - * - Boolean - * - Date object - * - File object (deserialized as Blob object). - * - Number object - * - RegExp object - * - String object - * This is accomplished by doing the following: - * 1) Using the cycle/decycle functions from: - * https://github.com/douglascrockford/JSON-js/blob/master/cycle.js - * 2) Serializing/deserializing objects to/from string that don't work with - * JSON.stringify and JSON.parse by using object specific logic (eg use - * the FileReader API to convert a Blob or File object to a data URL. - * 3) JSON.stringify and JSON.parse do the final conversion to/from string. - */ - var Sca = (function(){ - return { - decycle: function(object, callback) { - //From: https://github.com/douglascrockford/JSON-js/blob/master/cycle.js - // Contains additional logic to convert the following object types to string - // so that they can properly be encoded using JSON.stringify: - // *Boolean - // *Date - // *File - // *Blob - // *Number - // *Regex - // Make a deep copy of an object or array, assuring that there is at most - // one instance of each object or array in the resulting structure. The - // duplicate references (which might be forming cycles) are replaced with - // an object of the form - // {$ref: PATH} - // where the PATH is a JSONPath string that locates the first occurance. - // So, - // var a = []; - // a[0] = a; - // return JSON.stringify(JSON.decycle(a)); - // produces the string '[{"$ref":"$"}]'. - - // JSONPath is used to locate the unique object. $ indicates the top level of - // the object or array. [NUMBER] or [STRING] indicates a child member or - // property. - - var objects = [], // Keep a reference to each unique object or array - paths = [], // Keep the path to each unique object or array - queuedObjects = [], - returnCallback = callback; - - /** - * Check the queue to see if all objects have been processed. - * if they have, call the callback with the converted object. - */ - function checkForCompletion() { - if (queuedObjects.length === 0) { - returnCallback(derezObj); - } - } - - /** - * Convert a blob to a data URL. - * @param {Blob} blob to convert. - * @param {String} path of blob in object being encoded. - */ - function readBlobAsDataURL(blob, path) { - var reader = new FileReader(); - reader.onloadend = function(loadedEvent) { - var dataURL = loadedEvent.target.result; - var blobtype = 'blob'; - if (blob instanceof File) { - //blobtype = 'file'; - } - updateEncodedBlob(dataURL, path, blobtype); - }; - reader.readAsDataURL(blob); - } - - /** - * Async handler to update a blob object to a data URL for encoding. - * @param {String} dataURL - * @param {String} path - * @param {String} blobtype - file if the blob is a file; blob otherwise - */ - function updateEncodedBlob(dataURL, path, blobtype) { - var encoded = queuedObjects.indexOf(path); - path = path.replace('$','derezObj'); - eval(path+'.$enc="'+dataURL+'"'); - eval(path+'.$type="'+blobtype+'"'); - queuedObjects.splice(encoded, 1); - checkForCompletion(); - } - - function derez(value, path) { - - // The derez recurses through the object, producing the deep copy. - - var i, // The loop counter - name, // Property name - nu; // The new object or array - - // typeof null === 'object', so go on if this value is really an object but not - // one of the weird builtin objects. - - if (typeof value === 'object' && value !== null && - !(value instanceof Boolean) && - !(value instanceof Date) && - !(value instanceof Number) && - !(value instanceof RegExp) && - !(value instanceof Blob) && - !(value instanceof String)) { - - // If the value is an object or array, look to see if we have already - // encountered it. If so, return a $ref/path object. This is a hard way, - // linear search that will get slower as the number of unique objects grows. - - for (i = 0; i < objects.length; i += 1) { - if (objects[i] === value) { - return {$ref: paths[i]}; - } - } - - // Otherwise, accumulate the unique value and its path. - - objects.push(value); - paths.push(path); - - // If it is an array, replicate the array. - - if (Object.prototype.toString.apply(value) === '[object Array]') { - nu = []; - for (i = 0; i < value.length; i += 1) { - nu[i] = derez(value[i], path + '[' + i + ']'); - } - } else { - // If it is an object, replicate the object. - nu = {}; - for (name in value) { - if (Object.prototype.hasOwnProperty.call(value, name)) { - nu[name] = derez(value[name], - path + '[' + JSON.stringify(name) + ']'); - } - } - } - - return nu; - } else if (value instanceof Blob) { - //Queue blob for conversion - queuedObjects.push(path); - readBlobAsDataURL(value, path); - } else if (value instanceof Boolean) { - value = { - '$type': 'bool', - '$enc': value.toString() - }; - } else if (value instanceof Date) { - value = { - '$type': 'date', - '$enc': value.getTime() - }; - } else if (value instanceof Number) { - value = { - '$type': 'num', - '$enc': value.toString() - }; - } else if (value instanceof RegExp) { - value = { - '$type': 'regex', - '$enc': value.toString() - }; - } - return value; - } - var derezObj = derez(object, '$'); - checkForCompletion(); - }, - - retrocycle: function retrocycle($) { - //From: https://github.com/douglascrockford/JSON-js/blob/master/cycle.js - // Contains additional logic to convert strings to the following object types - // so that they can properly be decoded: - // *Boolean - // *Date - // *File - // *Blob - // *Number - // *Regex - // Restore an object that was reduced by decycle. Members whose values are - // objects of the form - // {$ref: PATH} - // are replaced with references to the value found by the PATH. This will - // restore cycles. The object will be mutated. - - // The eval function is used to locate the values described by a PATH. The - // root object is kept in a $ variable. A regular expression is used to - // assure that the PATH is extremely well formed. The regexp contains nested - // * quantifiers. That has been known to have extremely bad performance - // problems on some browsers for very long strings. A PATH is expected to be - // reasonably short. A PATH is allowed to belong to a very restricted subset of - // Goessner's JSONPath. - - // So, - // var s = '[{"$ref":"$"}]'; - // return JSON.retrocycle(JSON.parse(s)); - // produces an array containing a single element which is the array itself. - - var px = /^\$(?:\[(?:\d+|\"(?:[^\\\"\u0000-\u001f]|\\([\\\"\/bfnrt]|u[0-9a-zA-Z]{4}))*\")\])*$/; - - /** - * Converts the specified data URL to a Blob object - * @param {String} dataURL to convert to a Blob - * @returns {Blob} the converted Blob object - */ - function dataURLToBlob(dataURL) { - var BASE64_MARKER = ';base64,', - contentType, - parts, - raw; - if (dataURL.indexOf(BASE64_MARKER) === -1) { - parts = dataURL.split(','); - contentType = parts[0].split(':')[1]; - raw = parts[1]; - - return new Blob([raw], {type: contentType}); - } - - parts = dataURL.split(BASE64_MARKER); - contentType = parts[0].split(':')[1]; - raw = window.atob(parts[1]); - var rawLength = raw.length; - var uInt8Array = new Uint8Array(rawLength); - - for (var i = 0; i < rawLength; ++i) { - uInt8Array[i] = raw.charCodeAt(i); - } - return new Blob([uInt8Array.buffer], {type: contentType}); - } - - function rez(value) { - // The rez function walks recursively through the object looking for $ref - // properties. When it finds one that has a value that is a path, then it - // replaces the $ref object with a reference to the value that is found by - // the path. - - var i, item, name, path; - - if (value && typeof value === 'object') { - if (Object.prototype.toString.apply(value) === '[object Array]') { - for (i = 0; i < value.length; i += 1) { - item = value[i]; - if (item && typeof item === 'object') { - path = item.$ref; - if (typeof path === 'string' && px.test(path)) { - value[i] = eval(path); - } else { - value[i] = rez(item); - } - } - } - } else { - if (value.$type !== undefined) { - switch(value.$type) { - case 'blob': - case 'file': - value = dataURLToBlob(value.$enc); - break; - case 'bool': - value = Boolean(value.$enc === 'true'); - break; - case 'date': - value = new Date(value.$enc); - break; - case 'num': - value = Number(value.$enc); - break; - case 'regex': - value = eval(value.$enc); - break; - } - } else { - for (name in value) { - if (typeof value[name] === 'object') { - item = value[name]; - if (item) { - path = item.$ref; - if (typeof path === 'string' && px.test(path)) { - value[name] = eval(path); - } else { - value[name] = rez(item); - } - } - } - } - } - } - } - return value; - } - rez($); - return $; - - }, - - /** - * Encode the specified object as a string. Because of the asynchronus - * conversion of Blob/File to string, the encode function requires - * a callback - * @param {Object} val the value to convert. - * @param {function} callback the function to call once conversion is - * complete. The callback gets called with the converted value. - */ - "encode": function(val, callback){ - function finishEncode(val) { - callback(JSON.stringify(val)); - } - this.decycle(val, finishEncode); - }, - - /** - * Deserialize the specified string to an object - * @param {String} val the serialized string - * @returns {Object} the deserialized object - */ - "decode": function(val){ - return this.retrocycle(JSON.parse(val)); - } - }; - }()); - idbModules.Sca = Sca; - }(idbModules)); - /*jshint globalstrict: true*/ - 'use strict'; - (function(idbModules){ - /** - * Encodes the keys and values based on their types. This is required to maintain collations - */ - var collations = ["", "number", "string", "boolean", "object", "undefined"]; - var getGenericEncoder = function(){ - return { - "encode": function(key){ - return collations.indexOf(typeof key) + "-" + JSON.stringify(key); - }, - "decode": function(key){ - if (typeof key === "undefined") { - return undefined; - } - else { - return JSON.parse(key.substring(2)); - } - } - }; - }; - - var types = { - "number": getGenericEncoder("number"), // decoder will fail for NaN - "boolean": getGenericEncoder(), - "object": getGenericEncoder(), - "string": { - "encode": function(key){ - return collations.indexOf("string") + "-" + key; - }, - "decode": function(key){ - return "" + key.substring(2); - } - }, - "undefined": { - "encode": function(key){ - return collations.indexOf("undefined") + "-undefined"; - }, - "decode": function(key){ - return undefined; - } - } - }; - - var Key = (function(){ - return { - encode: function(key){ - return types[typeof key].encode(key); - }, - decode: function(key){ - return types[collations[key.substring(0, 1)]].decode(key); - } - }; - }()); - idbModules.Key = Key; - }(idbModules)); - - /*jshint globalstrict: true*/ - 'use strict'; - (function(idbModules, undefined){ - // The event interface used for IndexedBD Actions. - var Event = function(type, debug){ - // Returning an object instead of an even as the event's target cannot be set to IndexedDB Objects - // We still need to have event.target.result as the result of the IDB request - return { - "type": type, - debug: debug, - bubbles: false, - cancelable: false, - eventPhase: 0, - timeStamp: new Date() - }; - }; - idbModules.Event = Event; - }(idbModules)); - - /*jshint globalstrict: true*/ - 'use strict'; - (function(idbModules){ - - /** - * The IDBRequest Object that is returns for all async calls - * http://dvcs.w3.org/hg/IndexedDB/raw-file/tip/Overview.html#request-api - */ - var IDBRequest = function(){ - this.onsuccess = this.onerror = this.result = this.error = this.source = this.transaction = null; - this.readyState = "pending"; - }; - /** - * The IDBOpen Request called when a database is opened - */ - var IDBOpenRequest = function(){ - this.onblocked = this.onupgradeneeded = null; - }; - IDBOpenRequest.prototype = IDBRequest; - - idbModules.IDBRequest = IDBRequest; - idbModules.IDBOpenRequest = IDBOpenRequest; - - }(idbModules)); - - /*jshint globalstrict: true*/ - 'use strict'; - (function(idbModules, undefined){ - /** - * The IndexedDB KeyRange object - * http://dvcs.w3.org/hg/IndexedDB/raw-file/tip/Overview.html#dfn-key-range - * @param {Object} lower - * @param {Object} upper - * @param {Object} lowerOpen - * @param {Object} upperOpen - */ - var IDBKeyRange = function(lower, upper, lowerOpen, upperOpen){ - this.lower = lower; - this.upper = upper; - this.lowerOpen = lowerOpen; - this.upperOpen = upperOpen; - }; - - IDBKeyRange.only = function(value){ - return new IDBKeyRange(value, value, false, false); - }; - - IDBKeyRange.lowerBound = function(value, open){ - return new IDBKeyRange(value, undefined, open, undefined); - }; - IDBKeyRange.upperBound = function(value){ - return new IDBKeyRange(undefined, value, undefined, open); - }; - IDBKeyRange.bound = function(lower, upper, lowerOpen, upperOpen){ - return new IDBKeyRange(lower, upper, lowerOpen, upperOpen); - }; - - idbModules.IDBKeyRange = IDBKeyRange; - - }(idbModules)); - - /*jshint globalstrict: true*/ - 'use strict'; - (function(idbModules, undefined){ - /** - * The IndexedDB Cursor Object - * http://dvcs.w3.org/hg/IndexedDB/raw-file/tip/Overview.html#idl-def-IDBCursor - * @param {Object} range - * @param {Object} direction - * @param {Object} idbObjectStore - * @param {Object} cursorRequest - */ - function IDBCursor(range, direction, idbObjectStore, cursorRequest, keyColumnName, valueColumnName){ - this.__range = range; - this.source = this.__idbObjectStore = idbObjectStore; - this.__req = cursorRequest; - - this.key = undefined; - this.direction = direction; - - this.__keyColumnName = keyColumnName; - this.__valueColumnName = valueColumnName; - - if (!this.source.transaction.__active) { - idbModules.util.throwDOMException("TransactionInactiveError - The transaction this IDBObjectStore belongs to is not active."); - } - // Setting this to -1 as continue will set it to 0 anyway - this.__offset = -1; - - this.__lastKeyContinued = undefined; // Used when continuing with a key - - this["continue"](); - } - - IDBCursor.prototype.__find = function(key, tx, success, error){ - var me = this; - var sql = ["SELECT * FROM ", idbModules.util.quote(me.__idbObjectStore.name)]; - var sqlValues = []; - sql.push("WHERE ", me.__keyColumnName, " NOT NULL"); - if (me.__range && (me.__range.lower || me.__range.upper)) { - sql.push("AND"); - if (me.__range.lower) { - sql.push(me.__keyColumnName + (me.__range.lowerOpen ? " >" : " >= ") + " ?"); - sqlValues.push(idbModules.Key.encode(me.__range.lower)); - } - (me.__range.lower && me.__range.upper) && sql.push("AND"); - if (me.__range.upper) { - sql.push(me.__keyColumnName + (me.__range.upperOpen ? " < " : " <= ") + " ?"); - sqlValues.push(idbModules.Key.encode(me.__range.upper)); - } - } - if (typeof key !== "undefined") { - me.__lastKeyContinued = key; - me.__offset = 0; - } - if (me.__lastKeyContinued !== undefined) { - sql.push("AND " + me.__keyColumnName + " >= ?"); - sqlValues.push(idbModules.Key.encode(me.__lastKeyContinued)); - } - sql.push("ORDER BY ", me.__keyColumnName); - sql.push("LIMIT 1 OFFSET " + me.__offset); - idbModules.DEBUG && console.log(sql.join(" "), sqlValues); - tx.executeSql(sql.join(" "), sqlValues, function(tx, data){ - if (data.rows.length === 1) { - var key = idbModules.Key.decode(data.rows.item(0)[me.__keyColumnName]); - var primaryKey = idbModules.Key.decode(data.rows.item(0).key); - var val = me.__valueColumnName === "value" ? idbModules.Sca.decode(data.rows.item(0)[me.__valueColumnName]) : idbModules.Key.decode(data.rows.item(0)[me.__valueColumnName]); - success(key, val, primaryKey); - } - else { - idbModules.DEBUG && console.log("Reached end of cursors"); - success(undefined, undefined); - } - }, function(tx, data){ - idbModules.DEBUG && console.log("Could not execute Cursor.continue"); - error(data); - }); - }; - - IDBCursor.prototype["continue"] = function(key){ - var me = this; - this.__idbObjectStore.transaction.__addToTransactionQueue(function(tx, args, success, error){ - me.__offset++; - me.__find(key, tx, function(key, val, primaryKey){ - me.key = key; - me.value = val; - me.primaryKey = primaryKey; - success(typeof me.key !== "undefined" ? me : undefined, me.__req); - }, function(data){ - error(data); - }); - }); - }; - - IDBCursor.prototype.advance = function(count){ - if (count <= 0) { - idbModules.util.throwDOMException("Type Error - Count is invalid - 0 or negative", count); - } - var me = this; - this.__idbObjectStore.transaction.__addToTransactionQueue(function(tx, args, success, error){ - me.__offset += count; - me.__find(undefined, tx, function(key, value){ - me.key = key; - me.value = value; - success(typeof me.key !== "undefined" ? me : undefined, me.__req); - }, function(data){ - error(data); - }); - }); - }; - - IDBCursor.prototype.update = function(valueToUpdate){ - var me = this, - request = this.__idbObjectStore.transaction.__createRequest(function(){}); //Stub request - idbModules.Sca.encode(valueToUpdate, function(encoded) { - me.__idbObjectStore.transaction.__pushToQueue(request, function(tx, args, success, error){ - me.__find(undefined, tx, function(key, value, primaryKey){ - var sql = "UPDATE " + idbModules.util.quote(me.__idbObjectStore.name) + " SET value = ? WHERE key = ?"; - idbModules.DEBUG && console.log(sql, encoded, key, primaryKey); - tx.executeSql(sql, [encoded, idbModules.Key.encode(primaryKey)], function(tx, data){ - if (data.rowsAffected === 1) { - success(key); - } - else { - error("No rows with key found" + key); - } - }, function(tx, data){ - error(data); - }); - }, function(data){ - error(data); - }); - }); - }); - return request; - }; - - IDBCursor.prototype["delete"] = function(){ - var me = this; - return this.__idbObjectStore.transaction.__addToTransactionQueue(function(tx, args, success, error){ - me.__find(undefined, tx, function(key, value, primaryKey){ - var sql = "DELETE FROM " + idbModules.util.quote(me.__idbObjectStore.name) + " WHERE key = ?"; - idbModules.DEBUG && console.log(sql, key, primaryKey); - tx.executeSql(sql, [idbModules.Key.encode(primaryKey)], function(tx, data){ - if (data.rowsAffected === 1) { - // lower the offset or we will miss a row - me.__offset--; - success(undefined); - } - else { - error("No rows with key found" + key); - } - }, function(tx, data){ - error(data); - }); - }, function(data){ - error(data); - }); - }); - }; - - idbModules.IDBCursor = IDBCursor; - }(idbModules)); - - /*jshint globalstrict: true*/ - 'use strict'; - (function(idbModules, undefined){ - /** - * IDB Index - * http://www.w3.org/TR/IndexedDB/#idl-def-IDBIndex - * @param {Object} name; - * @param {Object} objectStore; - */ - function IDBIndex(indexName, idbObjectStore){ - this.indexName = this.name = indexName; - this.__idbObjectStore = this.objectStore = this.source = idbObjectStore; - - var indexList = idbObjectStore.__storeProps && idbObjectStore.__storeProps.indexList; - indexList && (indexList = JSON.parse(indexList)); - - this.keyPath = ((indexList && indexList[indexName] && indexList[indexName].keyPath) || indexName); - ['multiEntry','unique'].forEach(function(prop){ - this[prop] = !!indexList && !!indexList[indexName] && !!indexList[indexName].optionalParams && !!indexList[indexName].optionalParams[prop]; - }, this); - } - - IDBIndex.prototype.__createIndex = function(indexName, keyPath, optionalParameters){ - var me = this; - var transaction = me.__idbObjectStore.transaction; - transaction.__addToTransactionQueue(function(tx, args, success, failure){ - me.__idbObjectStore.__getStoreProps(tx, function(){ - function error(){ - idbModules.util.throwDOMException(0, "Could not create new index", arguments); - } - if (transaction.mode !== 2) { - idbModules.util.throwDOMException(0, "Invalid State error, not a version transaction", me.transaction); - } - var idxList = JSON.parse(me.__idbObjectStore.__storeProps.indexList); - if (typeof idxList[indexName] !== "undefined") { - idbModules.util.throwDOMException(0, "Index already exists on store", idxList); - } - var columnName = indexName; - idxList[indexName] = { - "columnName": columnName, - "keyPath": keyPath, - "optionalParams": optionalParameters - }; - // For this index, first create a column - me.__idbObjectStore.__storeProps.indexList = JSON.stringify(idxList); - var sql = ["ALTER TABLE", idbModules.util.quote(me.__idbObjectStore.name), "ADD", columnName, "BLOB"].join(" "); - idbModules.DEBUG && console.log(sql); - tx.executeSql(sql, [], function(tx, data){ - // Once a column is created, put existing records into the index - tx.executeSql("SELECT * FROM " + idbModules.util.quote(me.__idbObjectStore.name), [], function(tx, data){ - (function initIndexForRow(i){ - if (i < data.rows.length) { - try { - var value = idbModules.Sca.decode(data.rows.item(i).value); - var indexKey = eval("value['" + keyPath + "']"); - tx.executeSql("UPDATE " + idbModules.util.quote(me.__idbObjectStore.name) + " set " + columnName + " = ? where key = ?", [idbModules.Key.encode(indexKey), data.rows.item(i).key], function(tx, data){ - initIndexForRow(i + 1); - }, error); - } - catch (e) { - // Not a valid value to insert into index, so just continue - initIndexForRow(i + 1); - } - } - else { - idbModules.DEBUG && console.log("Updating the indexes in table", me.__idbObjectStore.__storeProps); - tx.executeSql("UPDATE __sys__ set indexList = ? where name = ?", [me.__idbObjectStore.__storeProps.indexList, me.__idbObjectStore.name], function(){ - me.__idbObjectStore.__setReadyState("createIndex", true); - success(me); - }, error); - } - }(0)); - }, error); - }, error); - }, "createObjectStore"); - }); - }; - - IDBIndex.prototype.openCursor = function(range, direction){ - var cursorRequest = new idbModules.IDBRequest(); - var cursor = new idbModules.IDBCursor(range, direction, this.source, cursorRequest, this.indexName, "value"); - return cursorRequest; - }; - - IDBIndex.prototype.openKeyCursor = function(range, direction){ - var cursorRequest = new idbModules.IDBRequest(); - var cursor = new idbModules.IDBCursor(range, direction, this.source, cursorRequest, this.indexName, "key"); - return cursorRequest; - }; - - IDBIndex.prototype.__fetchIndexData = function(key, opType){ - var me = this; - return me.__idbObjectStore.transaction.__addToTransactionQueue(function(tx, args, success, error){ - var sql = ["SELECT * FROM ", idbModules.util.quote(me.__idbObjectStore.name), " WHERE", me.indexName, "NOT NULL"]; - var sqlValues = []; - if (typeof key !== "undefined") { - sql.push("AND", me.indexName, " = ?"); - sqlValues.push(idbModules.Key.encode(key)); - } - idbModules.DEBUG && console.log("Trying to fetch data for Index", sql.join(" "), sqlValues); - tx.executeSql(sql.join(" "), sqlValues, function(tx, data){ - var d; - if (opType === "count") { - d = data.rows.length; - } - else - if (data.rows.length === 0) { - d = undefined; - } - else - if (opType === "key") { - d = idbModules.Key.decode(data.rows.item(0).key); - } - else { // when opType is value - d = idbModules.Sca.decode(data.rows.item(0).value); - } - success(d); - }, error); - }); - }; - - IDBIndex.prototype.get = function(key){ - return this.__fetchIndexData(key, "value"); - }; - - IDBIndex.prototype.getKey = function(key){ - return this.__fetchIndexData(key, "key"); - }; - - IDBIndex.prototype.count = function(key){ - return this.__fetchIndexData(key, "count"); - }; - - idbModules.IDBIndex = IDBIndex; - }(idbModules)); - - /*jshint globalstrict: true*/ - 'use strict'; - (function(idbModules){ - - /** - * IndexedDB Object Store - * http://dvcs.w3.org/hg/IndexedDB/raw-file/tip/Overview.html#idl-def-IDBObjectStore - * @param {Object} name - * @param {Object} transaction - */ - var IDBObjectStore = function(name, idbTransaction, ready){ - this.name = name; - this.transaction = idbTransaction; - this.__ready = {}; - this.__setReadyState("createObjectStore", typeof ready === "undefined" ? true : ready); - this.indexNames = new idbModules.util.StringList(); - }; - - /** - * Need this flag as createObjectStore is synchronous. So, we simply return when create ObjectStore is called - * but do the processing in the background. All other operations should wait till ready is set - * @param {Object} val - */ - IDBObjectStore.prototype.__setReadyState = function(key, val){ - this.__ready[key] = val; - }; - - /** - * Called by all operations on the object store, waits till the store is ready, and then performs the operation - * @param {Object} callback - */ - IDBObjectStore.prototype.__waitForReady = function(callback, key){ - var ready = true; - if (typeof key !== "undefined") { - ready = (typeof this.__ready[key] === "undefined") ? true : this.__ready[key]; - } - else { - for (var x in this.__ready) { - if (!this.__ready[x]) { - ready = false; - } - } - } - - if (ready) { - callback(); - } - else { - idbModules.DEBUG && console.log("Waiting for to be ready", key); - var me = this; - window.setTimeout(function(){ - me.__waitForReady(callback, key); - }, 100); - } - }; - - /** - * Gets (and optionally caches) the properties like keyPath, autoincrement, etc for this objectStore - * @param {Object} callback - */ - IDBObjectStore.prototype.__getStoreProps = function(tx, callback, waitOnProperty){ - var me = this; - this.__waitForReady(function(){ - if (me.__storeProps) { - idbModules.DEBUG && console.log("Store properties - cached", me.__storeProps); - callback(me.__storeProps); - } - else { - tx.executeSql("SELECT * FROM __sys__ where name = ?", [me.name], function(tx, data){ - if (data.rows.length !== 1) { - callback(); - } - else { - me.__storeProps = { - "name": data.rows.item(0).name, - "indexList": data.rows.item(0).indexList, - "autoInc": data.rows.item(0).autoInc, - "keyPath": data.rows.item(0).keyPath - }; - idbModules.DEBUG && console.log("Store properties", me.__storeProps); - callback(me.__storeProps); - } - }, function(){ - callback(); - }); - } - }, waitOnProperty); - }; - - /** - * From the store properties and object, extracts the value for the key in hte object Store - * If the table has auto increment, get the next in sequence - * @param {Object} props - * @param {Object} value - * @param {Object} key - */ - IDBObjectStore.prototype.__deriveKey = function(tx, value, key, callback){ - function getNextAutoIncKey(){ - tx.executeSql("SELECT * FROM sqlite_sequence where name like ?", [me.name], function(tx, data){ - if (data.rows.length !== 1) { - callback(0); - } - else { - callback(data.rows.item(0).seq); - } - }, function(tx, error){ - idbModules.util.throwDOMException(0, "Data Error - Could not get the auto increment value for key", error); - }); - } - - var me = this; - me.__getStoreProps(tx, function(props){ - if (!props) { - idbModules.util.throwDOMException(0, "Data Error - Could not locate defination for this table", props); - } - if (props.keyPath) { - if (typeof key !== "undefined") { - idbModules.util.throwDOMException(0, "Data Error - The object store uses in-line keys and the key parameter was provided", props); - } - if (value) { - try { - var primaryKey = eval("value['" + props.keyPath + "']"); - if (!primaryKey) { - if (props.autoInc === "true") { - getNextAutoIncKey(); - } - else { - idbModules.util.throwDOMException(0, "Data Error - Could not eval key from keyPath"); - } - } - else { - callback(primaryKey); - } - } - catch (e) { - idbModules.util.throwDOMException(0, "Data Error - Could not eval key from keyPath", e); - } - } - else { - idbModules.util.throwDOMException(0, "Data Error - KeyPath was specified, but value was not"); - } - } - else { - if (typeof key !== "undefined") { - callback(key); - } - else { - if (props.autoInc === "false") { - idbModules.util.throwDOMException(0, "Data Error - The object store uses out-of-line keys and has no key generator and the key parameter was not provided. ", props); - } - else { - // Looks like this has autoInc, so lets get the next in sequence and return that. - getNextAutoIncKey(); - } - } - } - }); - }; - - IDBObjectStore.prototype.__insertData = function(tx, encoded, value, primaryKey, success, error){ - var paramMap = {}; - if (typeof primaryKey !== "undefined") { - paramMap.key = idbModules.Key.encode(primaryKey); - } - var indexes = JSON.parse(this.__storeProps.indexList); - for (var key in indexes) { - try { - paramMap[indexes[key].columnName] = idbModules.Key.encode(eval("value['" + indexes[key].keyPath + "']")); - } - catch (e) { - error(e); - } - } - var sqlStart = ["INSERT INTO ", idbModules.util.quote(this.name), "("]; - var sqlEnd = [" VALUES ("]; - var sqlValues = []; - for (key in paramMap) { - sqlStart.push(key + ","); - sqlEnd.push("?,"); - sqlValues.push(paramMap[key]); - } - // removing the trailing comma - sqlStart.push("value )"); - sqlEnd.push("?)"); - sqlValues.push(encoded); - - var sql = sqlStart.join(" ") + sqlEnd.join(" "); - - idbModules.DEBUG && console.log("SQL for adding", sql, sqlValues); - tx.executeSql(sql, sqlValues, function(tx, data){ - success(primaryKey); - }, function(tx, err){ - error(err); - }); - }; - - IDBObjectStore.prototype.add = function(value, key){ - var me = this, - request = me.transaction.__createRequest(function(){}); //Stub request - idbModules.Sca.encode(value, function(encoded) { - me.transaction.__pushToQueue(request, function(tx, args, success, error){ - me.__deriveKey(tx, value, key, function(primaryKey){ - me.__insertData(tx, encoded, value, primaryKey, success, error); - }); - }); - }); - return request; - }; - - IDBObjectStore.prototype.put = function(value, key){ - var me = this, - request = me.transaction.__createRequest(function(){}); //Stub request - idbModules.Sca.encode(value, function(encoded) { - me.transaction.__pushToQueue(request, function(tx, args, success, error){ - me.__deriveKey(tx, value, key, function(primaryKey){ - // First try to delete if the record exists - var sql = "DELETE FROM " + idbModules.util.quote(me.name) + " where key = ?"; - tx.executeSql(sql, [idbModules.Key.encode(primaryKey)], function(tx, data){ - idbModules.DEBUG && console.log("Did the row with the", primaryKey, "exist? ", data.rowsAffected); - me.__insertData(tx, encoded, value, primaryKey, success, error); - }, function(tx, err){ - error(err); - }); - }); - }); - }); - return request; - }; - - IDBObjectStore.prototype.get = function(key){ - // TODO Key should also be a key range - var me = this; - return me.transaction.__addToTransactionQueue(function(tx, args, success, error){ - me.__waitForReady(function(){ - var primaryKey = idbModules.Key.encode(key); - idbModules.DEBUG && console.log("Fetching", me.name, primaryKey); - tx.executeSql("SELECT * FROM " + idbModules.util.quote(me.name) + " where key = ?", [primaryKey], function(tx, data){ - idbModules.DEBUG && console.log("Fetched data", data); - try { - // Opera can't deal with the try-catch here. - if (0 === data.rows.length) { - return success(); - } - - success(idbModules.Sca.decode(data.rows.item(0).value)); - } - catch (e) { - idbModules.DEBUG && console.log(e); - // If no result is returned, or error occurs when parsing JSON - success(undefined); - } - }, function(tx, err){ - error(err); - }); - }); - }); - }; - - IDBObjectStore.prototype["delete"] = function(key){ - // TODO key should also support key ranges - var me = this; - return me.transaction.__addToTransactionQueue(function(tx, args, success, error){ - me.__waitForReady(function(){ - var primaryKey = idbModules.Key.encode(key); - idbModules.DEBUG && console.log("Fetching", me.name, primaryKey); - tx.executeSql("DELETE FROM " + idbModules.util.quote(me.name) + " where key = ?", [primaryKey], function(tx, data){ - idbModules.DEBUG && console.log("Deleted from database", data.rowsAffected); - success(); - }, function(tx, err){ - error(err); - }); - }); - }); - }; - - IDBObjectStore.prototype.clear = function(){ - var me = this; - return me.transaction.__addToTransactionQueue(function(tx, args, success, error){ - me.__waitForReady(function(){ - tx.executeSql("DELETE FROM " + idbModules.util.quote(me.name), [], function(tx, data){ - idbModules.DEBUG && console.log("Cleared all records from database", data.rowsAffected); - success(); - }, function(tx, err){ - error(err); - }); - }); - }); - }; - - IDBObjectStore.prototype.count = function(key){ - var me = this; - return me.transaction.__addToTransactionQueue(function(tx, args, success, error){ - me.__waitForReady(function(){ - var sql = "SELECT * FROM " + idbModules.util.quote(me.name) + ((typeof key !== "undefined") ? " WHERE key = ?" : ""); - var sqlValues = []; - (typeof key !== "undefined") && sqlValues.push(idbModules.Key.encode(key)); - tx.executeSql(sql, sqlValues, function(tx, data){ - success(data.rows.length); - }, function(tx, err){ - error(err); - }); - }); - }); - }; - - IDBObjectStore.prototype.openCursor = function(range, direction){ - var cursorRequest = new idbModules.IDBRequest(); - var cursor = new idbModules.IDBCursor(range, direction, this, cursorRequest, "key", "value"); - return cursorRequest; - }; - - IDBObjectStore.prototype.index = function(indexName){ - var index = new idbModules.IDBIndex(indexName, this); - return index; - }; - - IDBObjectStore.prototype.createIndex = function(indexName, keyPath, optionalParameters){ - var me = this; - optionalParameters = optionalParameters || {}; - me.__setReadyState("createIndex", false); - var result = new idbModules.IDBIndex(indexName, me); - me.__waitForReady(function(){ - result.__createIndex(indexName, keyPath, optionalParameters); - }, "createObjectStore"); - me.indexNames.push(indexName); - return result; - }; - - IDBObjectStore.prototype.deleteIndex = function(indexName){ - var result = new idbModules.IDBIndex(indexName, this, false); - result.__deleteIndex(indexName); - return result; - }; - - idbModules.IDBObjectStore = IDBObjectStore; - }(idbModules)); - - /*jshint globalstrict: true*/ - 'use strict'; - (function(idbModules){ - - /** - * The IndexedDB Transaction - * http://dvcs.w3.org/hg/IndexedDB/raw-file/tip/Overview.html#idl-def-IDBTransaction - * @param {Object} storeNames - * @param {Object} mode - * @param {Object} db - */ - var READ = 0; - var READ_WRITE = 1; - var VERSION_TRANSACTION = 2; - - var IDBTransaction = function(storeNames, mode, db){ - if (typeof mode === "number") { - this.mode = mode; - (mode !== 2) && idbModules.DEBUG && console.log("Mode should be a string, but was specified as ", mode); - } - else - if (typeof mode === "string") { - switch (mode) { - case "readwrite": - this.mode = READ_WRITE; - break; - case "readonly": - this.mode = READ; - break; - default: - this.mode = READ; - break; - } - } - - this.storeNames = typeof storeNames === "string" ? [storeNames] : storeNames; - for (var i = 0; i < this.storeNames.length; i++) { - if (!db.objectStoreNames.contains(this.storeNames[i])) { - idbModules.util.throwDOMException(0, "The operation failed because the requested database object could not be found. For example, an object store did not exist but was being opened.", this.storeNames[i]); - } - } - this.__active = true; - this.__running = false; - this.__requests = []; - this.__aborted = false; - this.db = db; - this.error = null; - this.onabort = this.onerror = this.oncomplete = null; - var me = this; - }; - - IDBTransaction.prototype.__executeRequests = function(){ - if (this.__running && this.mode !== VERSION_TRANSACTION) { - idbModules.DEBUG && console.log("Looks like the request set is already running", this.mode); - return; - } - this.__running = true; - var me = this; - window.setTimeout(function(){ - if (me.mode !== 2 && !me.__active) { - idbModules.util.throwDOMException(0, "A request was placed against a transaction which is currently not active, or which is finished", me.__active); - } - // Start using the version transaction - me.db.__db.transaction(function(tx){ - me.__tx = tx; - var q = null, i = 0; - function success(result, req){ - if (req) { - q.req = req;// Need to do this in case of cursors - } - q.req.readyState = "done"; - q.req.result = result; - delete q.req.error; - var e = idbModules.Event("success"); - idbModules.util.callback("onsuccess", q.req, e); - i++; - executeRequest(); - } - - function error(errorVal){ - q.req.readyState = "done"; - q.req.error = "DOMError"; - var e = idbModules.Event("error", arguments); - idbModules.util.callback("onerror", q.req, e); - i++; - executeRequest(); - } - function executeRequest(){ - if (i >= me.__requests.length) { - me.__active = false; // All requests in the transaction is done - me.__requests = []; - return; - } - q = me.__requests[i]; - q.op(tx, q.args, success, error); - } - try { - executeRequest(); - } - catch (e) { - idbModules.DEBUG && console.log("An exception occured in transaction", arguments); - typeof me.onerror === "function" && me.onerror(); - } - }, function(){ - idbModules.DEBUG && console.log("An error in transaction", arguments); - typeof me.onerror === "function" && me.onerror(); - }, function(){ - idbModules.DEBUG && console.log("Transaction completed", arguments); - typeof me.oncomplete === "function" && me.oncomplete(); - }); - }, 1); - }; - - IDBTransaction.prototype.__addToTransactionQueue = function(callback, args){ - if (!this.__active && this.mode !== VERSION_TRANSACTION) { - idbModules.util.throwDOMException(0, "A request was placed against a transaction which is currently not active, or which is finished.", this.__mode); - } - var request = this.__createRequest(); - this.__pushToQueue(request, callback, args); - return request; - }; - - IDBTransaction.prototype.__createRequest = function(){ - var request = new idbModules.IDBRequest(); - request.source = this.db; - request.transaction = this; - return request; - }; - - IDBTransaction.prototype.__pushToQueue = function(request, callback, args) { - this.__requests.push({ - "op": callback, - "args": args, - "req": request - }); - // Start the queue for executing the requests - this.__executeRequests(); - }; - - IDBTransaction.prototype.objectStore = function(objectStoreName){ - return new idbModules.IDBObjectStore(objectStoreName, this); - }; - - IDBTransaction.prototype.abort = function(){ - !this.__active && idbModules.util.throwDOMException(0, "A request was placed against a transaction which is currently not active, or which is finished", this.__active); - - }; - - IDBTransaction.prototype.READ_ONLY = 0; - IDBTransaction.prototype.READ_WRITE = 1; - IDBTransaction.prototype.VERSION_CHANGE = 2; - - idbModules.IDBTransaction = IDBTransaction; - }(idbModules)); - - /*jshint globalstrict: true*/ - 'use strict'; - (function(idbModules){ - - /** - * IDB Database Object - * http://dvcs.w3.org/hg/IndexedDB/raw-file/tip/Overview.html#database-interface - * @param {Object} db - */ - var IDBDatabase = function(db, name, version, storeProperties){ - this.__db = db; - this.version = version; - this.__storeProperties = storeProperties; - this.objectStoreNames = new idbModules.util.StringList(); - for (var i = 0; i < storeProperties.rows.length; i++) { - this.objectStoreNames.push(storeProperties.rows.item(i).name); - } - this.name = name; - this.onabort = this.onerror = this.onversionchange = null; - }; - - IDBDatabase.prototype.createObjectStore = function(storeName, createOptions){ - var me = this; - createOptions = createOptions || {}; - createOptions.keyPath = createOptions.keyPath || null; - var result = new idbModules.IDBObjectStore(storeName, me.__versionTransaction, false); - - var transaction = me.__versionTransaction; - transaction.__addToTransactionQueue(function(tx, args, success, failure){ - function error(){ - idbModules.util.throwDOMException(0, "Could not create new object store", arguments); - } - - if (!me.__versionTransaction) { - idbModules.util.throwDOMException(0, "Invalid State error", me.transaction); - } - //key INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL UNIQUE - var sql = ["CREATE TABLE", idbModules.util.quote(storeName), "(key BLOB", createOptions.autoIncrement ? ", inc INTEGER PRIMARY KEY AUTOINCREMENT" : "PRIMARY KEY", ", value BLOB)"].join(" "); - idbModules.DEBUG && console.log(sql); - tx.executeSql(sql, [], function(tx, data){ - tx.executeSql("INSERT INTO __sys__ VALUES (?,?,?,?)", [storeName, createOptions.keyPath, createOptions.autoIncrement ? true : false, "{}"], function(){ - result.__setReadyState("createObjectStore", true); - success(result); - }, error); - }, error); - }); - - // The IndexedDB Specification needs us to return an Object Store immediatly, but WebSQL does not create and return the store immediatly - // Hence, this can technically be unusable, and we hack around it, by setting the ready value to false - me.objectStoreNames.push(storeName); - return result; - }; - - IDBDatabase.prototype.deleteObjectStore = function(storeName){ - var error = function(){ - idbModules.util.throwDOMException(0, "Could not delete ObjectStore", arguments); - }; - var me = this; - !me.objectStoreNames.contains(storeName) && error("Object Store does not exist"); - me.objectStoreNames.splice(me.objectStoreNames.indexOf(storeName), 1); - - var transaction = me.__versionTransaction; - transaction.__addToTransactionQueue(function(tx, args, success, failure){ - if (!me.__versionTransaction) { - idbModules.util.throwDOMException(0, "Invalid State error", me.transaction); - } - me.__db.transaction(function(tx){ - tx.executeSql("SELECT * FROM __sys__ where name = ?", [storeName], function(tx, data){ - if (data.rows.length > 0) { - tx.executeSql("DROP TABLE " + idbModules.util.quote(storeName), [], function(){ - tx.executeSql("DELETE FROM __sys__ WHERE name = ?", [storeName], function(){ - }, error); - }, error); - } - }); - }); - }); - }; - - IDBDatabase.prototype.close = function(){ - // Don't do anything coz the database automatically closes - }; - - IDBDatabase.prototype.transaction = function(storeNames, mode){ - var transaction = new idbModules.IDBTransaction(storeNames, mode || 1, this); - return transaction; - }; - - idbModules.IDBDatabase = IDBDatabase; - }(idbModules)); - - /*jshint globalstrict: true*/ - 'use strict'; - (function(idbModules){ - var DEFAULT_DB_SIZE = 4 * 1024 * 1024; - if (!window.openDatabase) { - return; - } - // The sysDB to keep track of version numbers for databases - var sysdb = window.openDatabase("__sysdb__", 1, "System Database", DEFAULT_DB_SIZE); - sysdb.transaction(function(tx){ - tx.executeSql("SELECT * FROM dbVersions", [], function(t, data){ - // dbVersions already exists - }, function(){ - // dbVersions does not exist, so creating it - sysdb.transaction(function(tx){ - tx.executeSql("CREATE TABLE IF NOT EXISTS dbVersions (name VARCHAR(255), version INT);", [], function(){ - }, function(){ - idbModules.util.throwDOMException("Could not create table __sysdb__ to save DB versions"); - }); - }); - }); - }, function(){ - // sysdb Transaction failed - idbModules.DEBUG && console.log("Error in sysdb transaction - when selecting from dbVersions", arguments); - }); - - var shimIndexedDB = { - /** - * The IndexedDB Method to create a new database and return the DB - * @param {Object} name - * @param {Object} version - */ - open: function(name, version){ - var req = new idbModules.IDBOpenRequest(); - var calledDbCreateError = false; - - function dbCreateError(){ - if (calledDbCreateError) { - return; - } - var e = idbModules.Event("error", arguments); - req.readyState = "done"; - req.error = "DOMError"; - idbModules.util.callback("onerror", req, e); - calledDbCreateError = true; - } - - function openDB(oldVersion){ - var db = window.openDatabase(name, 1, name, DEFAULT_DB_SIZE); - req.readyState = "done"; - if (typeof version === "undefined") { - version = oldVersion || 1; - } - if (version <= 0 || oldVersion > version) { - idbModules.util.throwDOMException(0, "An attempt was made to open a database using a lower version than the existing version.", version); - } - - db.transaction(function(tx){ - tx.executeSql("CREATE TABLE IF NOT EXISTS __sys__ (name VARCHAR(255), keyPath VARCHAR(255), autoInc BOOLEAN, indexList BLOB)", [], function(){ - tx.executeSql("SELECT * FROM __sys__", [], function(tx, data){ - var e = idbModules.Event("success"); - req.source = req.result = new idbModules.IDBDatabase(db, name, version, data); - if (oldVersion < version) { - // DB Upgrade in progress - sysdb.transaction(function(systx){ - systx.executeSql("UPDATE dbVersions set version = ? where name = ?", [version, name], function(){ - var e = idbModules.Event("upgradeneeded"); - e.oldVersion = oldVersion; - e.newVersion = version; - req.transaction = req.result.__versionTransaction = new idbModules.IDBTransaction([], 2, req.source); - idbModules.util.callback("onupgradeneeded", req, e, function(){ - var e = idbModules.Event("success"); - idbModules.util.callback("onsuccess", req, e); - }); - }, dbCreateError); - }, dbCreateError); - } else { - idbModules.util.callback("onsuccess", req, e); - } - }, dbCreateError); - }, dbCreateError); - }, dbCreateError); - } - - sysdb.transaction(function(tx){ - tx.executeSql("SELECT * FROM dbVersions where name = ?", [name], function(tx, data){ - if (data.rows.length === 0) { - // Database with this name does not exist - tx.executeSql("INSERT INTO dbVersions VALUES (?,?)", [name, version || 1], function(){ - openDB(0); - }, dbCreateError); - } else { - openDB(data.rows.item(0).version); - } - }, dbCreateError); - }, dbCreateError); - - return req; - }, - - "deleteDatabase": function(name){ - var req = new idbModules.IDBOpenRequest(); - var calledDBError = false; - function dbError(msg){ - if (calledDBError) { - return; - } - req.readyState = "done"; - req.error = "DOMError"; - var e = idbModules.Event("error"); - e.message = msg; - e.debug = arguments; - idbModules.util.callback("onerror", req, e); - calledDBError = true; - } - var version = null; - function deleteFromDbVersions(){ - sysdb.transaction(function(systx){ - systx.executeSql("DELETE FROM dbVersions where name = ? ", [name], function(){ - req.result = undefined; - var e = idbModules.Event("success"); - e.newVersion = null; - e.oldVersion = version; - idbModules.util.callback("onsuccess", req, e); - }, dbError); - }, dbError); - } - sysdb.transaction(function(systx){ - systx.executeSql("SELECT * FROM dbVersions where name = ?", [name], function(tx, data){ - if (data.rows.length === 0) { - req.result = undefined; - var e = idbModules.Event("success"); - e.newVersion = null; - e.oldVersion = version; - idbModules.util.callback("onsuccess", req, e); - return; - } - version = data.rows.item(0).version; - var db = window.openDatabase(name, 1, name, DEFAULT_DB_SIZE); - db.transaction(function(tx){ - tx.executeSql("SELECT * FROM __sys__", [], function(tx, data){ - var tables = data.rows; - (function deleteTables(i){ - if (i >= tables.length) { - // If all tables are deleted, delete the housekeeping tables - tx.executeSql("DROP TABLE __sys__", [], function(){ - // Finally, delete the record for this DB from sysdb - deleteFromDbVersions(); - }, dbError); - } else { - // Delete all tables in this database, maintained in the sys table - tx.executeSql("DROP TABLE " + idbModules.util.quote(tables.item(i).name), [], function(){ - deleteTables(i + 1); - }, function(){ - deleteTables(i + 1); - }); - } - }(0)); - }, function(e){ - // __sysdb table does not exist, but that does not mean delete did not happen - deleteFromDbVersions(); - }); - }, dbError); - }); - }, dbError); - return req; - }, - "cmp": function(key1, key2){ - return idbModules.Key.encode(key1) > idbModules.Key.encode(key2) ? 1 : key1 === key2 ? 0 : -1; - } - }; - - idbModules.shimIndexedDB = shimIndexedDB; - }(idbModules)); - - /*jshint globalstrict: true*/ - 'use strict'; - (function(window, idbModules){ - if (typeof window.openDatabase !== "undefined") { - window.shimIndexedDB = idbModules.shimIndexedDB; - if (window.shimIndexedDB) { - window.shimIndexedDB.__useShim = function(){ - window.indexedDB = idbModules.shimIndexedDB; - window.IDBDatabase = idbModules.IDBDatabase; - window.IDBTransaction = idbModules.IDBTransaction; - window.IDBCursor = idbModules.IDBCursor; - window.IDBKeyRange = idbModules.IDBKeyRange; - }; - window.shimIndexedDB.__debug = function(val){ - idbModules.DEBUG = val; - }; - } - } - - /* - prevent error in Firefox - */ - if(!('indexedDB' in window)) { - window.indexedDB = window.indexedDB || window.webkitIndexedDB || window.mozIndexedDB || window.oIndexedDB || window.msIndexedDB; - } - - if (typeof window.indexedDB === "undefined" && typeof window.openDatabase !== "undefined") { - window.shimIndexedDB.__useShim(); - } - else { - window.IDBDatabase = window.IDBDatabase || window.webkitIDBDatabase; - window.IDBTransaction = window.IDBTransaction || window.webkitIDBTransaction; - window.IDBCursor = window.IDBCursor || window.webkitIDBCursor; - window.IDBKeyRange = window.IDBKeyRange || window.webkitIDBKeyRange; - if(!window.IDBTransaction){ - window.IDBTransaction = {}; - } - window.IDBTransaction.READ_ONLY = window.IDBTransaction.READ_ONLY || "readonly"; - window.IDBTransaction.READ_WRITE = window.IDBTransaction.READ_WRITE || "readwrite"; - } - - }(window, idbModules)); - -} - diff --git a/node_modules/browserify-fs/node_modules/level-js/test/test-levelup.html b/node_modules/browserify-fs/node_modules/level-js/test/test-levelup.html deleted file mode 100644 index c2c64e61..00000000 --- a/node_modules/browserify-fs/node_modules/level-js/test/test-levelup.html +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - LevelUP Tests - - - - - diff --git a/node_modules/browserify-fs/node_modules/level-js/test/test-levelup.js b/node_modules/browserify-fs/node_modules/level-js/test/test-levelup.js deleted file mode 100644 index f2c9505b..00000000 --- a/node_modules/browserify-fs/node_modules/level-js/test/test-levelup.js +++ /dev/null @@ -1,59 +0,0 @@ -/*** Levelup tests - (the actual test suite isnt runnable in browser, and these arent complete) -***/ -var levelup = require('levelup') -var leveljs = require('../') - -window.db = levelup('foo', { db: leveljs }) - -db.put('name', 'LevelUP string', function (err) { - if (err) return console.log('Ooops!', err) // some kind of I/O error - db.get('name', function (err, value) { - if (err) return console.log('Ooops!', err) // likely the key was not found - console.log('name=' + value) - }) -}) - -var ary = new Uint8Array(1) -ary[0] = 1 -db.put('binary', ary, function (err) { - if (err) return console.log('Ooops!', err) // some kind of I/O error - db.get('binary', function (err, value) { - if (err) return console.log('Ooops!', err) // likely the key was not found - console.log('binary', value) - }) -}) - -var writeStream = db.createWriteStream() -writeStream.on('error', function (err) { - console.log('Oh my!', err) -}) -writeStream.on('close', function () { - console.log('Stream closed') - db.createKeyStream() - .on('data', function (data) { - console.log('KEYSTREAM', data) - }) - .on('error', function (err) { - console.log('Oh my!', err) - }) - db.createReadStream() - .on('data', function (data) { - console.log('READSTREAM', data.key, '=', data.value) - }) - .on('error', function (err) { - console.log('Oh my!', err) - }) - db.createValueStream() - .on('data', function (data) { - console.log('VALUESTREAM', data) - }) - .on('error', function (err) { - console.log('Oh my!', err) - }) -}) -writeStream.write({ key: 'name', value: 'Yuri Irsenovich Kim' }) -writeStream.write({ key: 'dob', value: '16 February 1941' }) -writeStream.write({ key: 'spouse', value: 'Kim Young-sook' }) -writeStream.write({ key: 'occupation', value: 'Clown' }) -writeStream.end() \ No newline at end of file diff --git a/node_modules/browserify-fs/node_modules/level-js/test/test.js b/node_modules/browserify-fs/node_modules/level-js/test/test.js deleted file mode 100644 index d06402f1..00000000 --- a/node_modules/browserify-fs/node_modules/level-js/test/test.js +++ /dev/null @@ -1,24 +0,0 @@ -var tape = require('tape') -var leveljs = require('../') -var testCommon = require('./testCommon') - -// load IndexedDBShim in the tests -require('./idb-shim.js')() - -var testBuffer = new Buffer('foo') - -/*** compatibility with basic LevelDOWN API ***/ -require('abstract-leveldown/abstract/leveldown-test').args(leveljs, tape, testCommon) -require('abstract-leveldown/abstract/open-test').open(leveljs, tape, testCommon) -require('abstract-leveldown/abstract/put-test').all(leveljs, tape, testCommon) -require('abstract-leveldown/abstract/del-test').all(leveljs, tape, testCommon) -require('abstract-leveldown/abstract/get-test').all(leveljs, tape, testCommon) -require('abstract-leveldown/abstract/put-get-del-test').all(leveljs, tape, testCommon, testBuffer) -require('abstract-leveldown/abstract/batch-test').all(leveljs, tape, testCommon) -require('abstract-leveldown/abstract/chained-batch-test').all(leveljs, tape, testCommon) -require('abstract-leveldown/abstract/close-test').close(leveljs, tape, testCommon) -require('abstract-leveldown/abstract/iterator-test').all(leveljs, tape, testCommon) -require('abstract-leveldown/abstract/ranges-test').all(leveljs, tape, testCommon) - -// non abstract-leveldown tests: -require('./custom-tests.js').all(leveljs, tape, testCommon) diff --git a/node_modules/browserify-fs/node_modules/level-js/test/testCommon.js b/node_modules/browserify-fs/node_modules/level-js/test/testCommon.js deleted file mode 100644 index 12690c7a..00000000 --- a/node_modules/browserify-fs/node_modules/level-js/test/testCommon.js +++ /dev/null @@ -1,94 +0,0 @@ -var dbidx = 0 - , leveljs = require('../') - , location = function () { - return '_leveldown_test_db_' + dbidx++ - } - - , lastLocation = function () { - return '_leveldown_test_db_' + dbidx - } - - , cleanup = function (callback) { - var list = [] - if (dbidx === 0) return callback() - for (var i = 0; i < dbidx; i++) { - list.push('_leveldown_test_db_' + i) - } - - function destroy() { - var f = list.pop() - if (list.length === 0) return callback() - leveljs.destroy(f, destroy) - } - - destroy() - } - - , setUp = function (t) { - cleanup(function (err) { - t.notOk(err, 'cleanup returned an error') - t.end() - }) - } - - , tearDown = function (t) { - setUp(t) // same cleanup! - } - - , collectEntries = function (iterator, callback) { - var data = [] - , next = function () { - iterator.next(function (err, key, value) { - if (err) return callback(err) - if (!arguments.length) { - return iterator.end(function (err) { - callback(err, data) - }) - } - data.push({ key: key, value: value }) - process.nextTick(next) - }) - } - next() - } - - , makeExistingDbTest = function (name, test, leveldown, testFn) { - test(name, function (t) { - cleanup(function () { - var loc = location() - , db = leveldown(loc) - , done = function (close) { - if (close === false) - return cleanup(t.end.bind(t)) - db.close(function (err) { - t.notOk(err, 'no error from close()') - cleanup(t.end.bind(t)) - }) - } - db.open(function (err) { - t.notOk(err, 'no error from open()') - db.batch( - [ - { type: 'put', key: 'one', value: '1' } - , { type: 'put', key: 'two', value: '2' } - , { type: 'put', key: 'three', value: '3' } - ] - , function (err) { - t.notOk(err, 'no error from batch()') - testFn(db, t, done, loc) - } - ) - }) - }) - }) - } - -module.exports = { - location : location - , cleanup : cleanup - , lastLocation : lastLocation - , setUp : setUp - , tearDown : tearDown - , collectEntries : collectEntries - , makeExistingDbTest : makeExistingDbTest -} diff --git a/node_modules/browserify-fs/node_modules/levelup/.dntrc b/node_modules/browserify-fs/node_modules/levelup/.dntrc deleted file mode 100644 index 1cc9d2d9..00000000 --- a/node_modules/browserify-fs/node_modules/levelup/.dntrc +++ /dev/null @@ -1,19 +0,0 @@ -## DNT config file -## see https://github.com/rvagg/dnt - -NODE_VERSIONS="\ - master \ - v0.11.9 \ - v0.11.8 \ - v0.10.22 \ - v0.10.21 \ - v0.8.26 \ -" -OUTPUT_PREFIX="levelup-" -TEST_CMD="\ - cd /dnt/ && \ - rm -rf node_modules/leveldown/ && \ - npm install --nodedir=/usr/src/node && \ - node_modules/.bin/tap test/*-test.js --stderr; \ -#" - diff --git a/node_modules/browserify-fs/node_modules/levelup/.jshintrc b/node_modules/browserify-fs/node_modules/levelup/.jshintrc deleted file mode 100644 index 79376508..00000000 --- a/node_modules/browserify-fs/node_modules/levelup/.jshintrc +++ /dev/null @@ -1,59 +0,0 @@ -{ - "predef": [ ] - , "bitwise": false - , "camelcase": false - , "curly": false - , "eqeqeq": false - , "forin": false - , "immed": false - , "latedef": false - , "noarg": true - , "noempty": true - , "nonew": true - , "plusplus": false - , "quotmark": true - , "regexp": false - , "undef": true - , "unused": true - , "strict": false - , "trailing": true - , "maxlen": 120 - , "asi": true - , "boss": true - , "debug": true - , "eqnull": true - , "esnext": true - , "evil": true - , "expr": true - , "funcscope": false - , "globalstrict": false - , "iterator": false - , "lastsemic": true - , "laxbreak": true - , "laxcomma": true - , "loopfunc": true - , "multistr": false - , "onecase": false - , "proto": false - , "regexdash": false - , "scripturl": true - , "smarttabs": false - , "shadow": false - , "sub": true - , "supernew": false - , "validthis": true - , "browser": true - , "couch": false - , "devel": false - , "dojo": false - , "mootools": false - , "node": true - , "nonstandard": true - , "prototypejs": false - , "rhino": false - , "worker": true - , "wsh": false - , "nomen": false - , "onevar": true - , "passfail": false -} \ No newline at end of file diff --git a/node_modules/browserify-fs/node_modules/levelup/.npmignore b/node_modules/browserify-fs/node_modules/levelup/.npmignore deleted file mode 100644 index e063178f..00000000 --- a/node_modules/browserify-fs/node_modules/levelup/.npmignore +++ /dev/null @@ -1,6 +0,0 @@ -*.tar.gz -build/ -test-data.tar -test-data.db.tar -test/benchmarks/ -level/ \ No newline at end of file diff --git a/node_modules/browserify-fs/node_modules/levelup/.travis.yml b/node_modules/browserify-fs/node_modules/levelup/.travis.yml deleted file mode 100644 index 731a2ea6..00000000 --- a/node_modules/browserify-fs/node_modules/levelup/.travis.yml +++ /dev/null @@ -1,24 +0,0 @@ -language: node_js -node_js: - - "0.8" - - "0.10" -branches: - only: - - master -notifications: - email: - - r@va.gg - - john@chesl.es - - raynos2@gmail.com - - dominic.tarr@gmail.com - - max@maxogden.com - - lars.magnus.skog@gmail.com - - david.bjorklund@gmail.com - - julian@juliangruber.com - - paolo@async.ly - - anton.whalley@nearform.com - - matteo.collina@gmail.com - - pedro.teixeira@gmail.com - - mail@substack.net -script: npm run-script alltests - diff --git a/node_modules/browserify-fs/node_modules/levelup/CHANGELOG.md b/node_modules/browserify-fs/node_modules/levelup/CHANGELOG.md deleted file mode 100644 index 4b7f8a70..00000000 --- a/node_modules/browserify-fs/node_modules/levelup/CHANGELOG.md +++ /dev/null @@ -1,174 +0,0 @@ -### 0.18.1 @ Nov 20 2013 - * Make chained-batch obey global LevelUP object options (@mcavage) - -### 0.18.0 @ Nov 18 2013 - - * Upgrade to LevelDOWN@0.10.0 (and bops@0.1.0 and readable-stream@1.1.9) (@rvagg) - -### 0.17.0 @ Oct 01 2013 - - * Undo factory pattern, use plain prototypal object and expose full prototype (@rvagg) - * Move Batch object to batch.js and expose (@rvagg) - * Use new package, DeferredLevelDOWN to handle all deferred open logic (@rvagg) - * Code cleanup, update deps (xtend) (@rvagg, @juliangruber) - -### 0.16.0 @ Sep 10 2013 - - * Added `notFound` boolean property and `status=404` property to NotFoundError (@rvagg) - * Upgrade to errno@0.1.0 which aliases .type and .name properties (@rvagg) - * ReadStream gracefully handles multiple destroy() calls (@mcollina) - -### 0.15.0 @ Aug 25 2013 - - * New ReadStream: upgrade to streams2, remove all state-management cruft, remove fstream support (@substack) - * Update LevelDOWN dependency to ~0.8.0 with Iterator lt/lte/gt/gte support and NAN as a dependency - * Added @substack as contributor - -### 0.14.0 @ Aug 19 2013 - - * Encodings overhaul, allow custom encoders/decoders for `keyEncoding` or `valueEncoding` (@dominictarr) - -### 0.13.0 @ Aug 11 2013 - - * Update LevelDOWN dependency version ~0.7.0 for Node 0.8->0.11 compatibility - -### 0.12.0 @ Jul 25 2013 - - * Update LevelDOWN dependency version ~0.6.2 - -### 0.11.0 @ Jul 17 2013 - - * Remove all Function#bind calls for better browser compatibility (@juliangruber) - * Switch from direct Buffer access to bops for better browser compatibility (@juliangruber) - * WriteStream#end accepts `data` argument (@pgte) - * Added @pgte as contributor - -### 0.10.0 @ Jun 14 2013 - - * Upgrade to LevelDOWN@0.6.0 which upgrades to LevelDB@1.11.0, some important bugfixes: https://groups.google.com/forum/#!topic/leveldb/vS1JvmGlp4E - -### 0.9.0 @ 21 May 2013 - - * Use LevelDOWN@0.5.0, see https://github.com/rvagg/node-leveldown/blob/master/CHANGELOG.md for details - * Race-condition(ish) fixed in ReadStream--createReadStream() does not start immediately and therefore allowed put()s to happen before the stream starts (@dominictarr) - * ReadStream doesn't emit "ready" event (@dominictarr) - * Allow separate encodings per operation in db.batch() (@juliangruber) - * Allow separate encodings per write() in WriteStream (@juliangruber) - * WriteStream supports "type" option ("put" [default] or "del") on constructor and individual write()s (@mcollina) - * Remove "leveldown" from dependencies (see http://r.va.gg/2013/05/levelup-v0.9-some-major-changes.html) (@rvagg) - * Expose LevelDOWN (or LevelDOWN substitute) as `db` property on LevelUP instance (e.g. db.db.approximateSize()) - * Chained batch exposed from LevelDOWN, invoked with argument-less db.batch() (@juliangruber, @rvagg) - * Significantly improve ReadStream performance by replacing .bind() and .apply() (@mcollina, @kesla) - * Better Browserify support (@rvagg, @juliangruber, @maxogden, etc.) - * Deprecate secondary LevelDB-specific operations on LevelUP, prefer direct LevelDOWN access (approximateSize(), repair(), destroy(), getProperty()--new in LevelDOWN@0.5.0) (@rvagg) - -### 0.8.0 @ 17 Apr 2013 - - * More comprehensive argument checking, will now report back directly or throw if there is a problem rather than on nextTick (@rvagg) - * Expose `.options` property on LevelUP instances. (@rvagg) - * Further clarify 'encoding' -> 'valueEncoding' shift. db.options.valueEncoding is now authoritative even if user used 'encoding' on initialisation. (@rvagg) - * 'level' package now published to npm that bundles LevelUP & LevelDOWN and exposes LevelUP directly; for planned shift to detaching LevelDOWN as a direct-dependency of LevelUP. (@rvagg) - -### 0.7.0 @ 8 Apr 2013 - - * Windows support in LevelDOWN @0.2.0 (@rvagg) - * added 'db' option on constructor to replace LevelDOWN (@rvagg) - * added repair() & destroy() aliases for LevelDOWN implementations (@rvagg) - * fix early 'close' emit in WriteStream (@rvagg) - * improved ReadStream reverse=true start key handling (@kesla) - * ReadStream empty start & end keys ignored rather than segfault (@kesla) - * 'encoding' option now an alias for 'valueEncoding' only, 'keyEncoding' defaults to 'utf8' and must be changed explicitly (@rvagg) - -### 0.6.2 @ 4 Mar 2013 - - * use `xtend` package instead of internal util._extend @ralphtheninja - * internal cleanup of `callback` argument detection @ralphtheninja - * move deferred-open-operations into an internal `this._db` wrapper rather than make them call public .get()/.put() etc. for a second time @dominictarr - -### 0.6.1 @ 1 Mar 2013 - - * internal code cleanup & refactoring @ralphtheninja - * fix multiple iterator.end() calls in ReadStreams throwing errors (destroy() called while read/next is in progress) #82 #83 #84 @rvagg - -### 0.6.0 @ Feb 25 2013 - - * complete transition to LevelDOWN for the LevelDB binding. No native code left in LevelUP @rvagg - - LevelDOWN now keeps its own ChangeLog at: https://github.com/rvagg/node-leveldown/blob/master/CHANGELOG.md - - LevelDB@1.9.0 and Snappy@1.1.0 are included in LevelDOWN@0.1.2 - * simplify callback signature (remove extra, undocumented properties from some callbacks) @rvagg / @dominictarr - -### 0.5.4 @ Feb 16 2013 - - * explicit namespaces in C++ @rvagg - * memory leak, Persistent callback not Dispose()d for `readStream()` @rvagg - * allow one next() at a time, improve end() handling @rvagg - * ensure iterator end & next don't conflict @rvagg - * remove CloseError @ralphtheninja - * fix put/batch bug in WriteStream#_process() @ralphtheninja - * remove `useBatch` in `copy()` @rvagg - * move encodingOpts levelup.js -> util.js @ralphtheninja - -### 0.5.3-1 @ Feb 5 2013 - - * non-shrinkwrapped release @rvagg - -### 0.5.3 @ Jan 28 2013 - - * `location` exposed as read-only property on db object @rvagg - * swap bufferstream dependency for simple-bufferstream, remove unnecessary compile @rvagg - * comment out all sqlite3 benchmarks @ralphtheninja - * put LevelUP() into closure @ralphtheninja - -### 0.5.2 @ Jan 24 2013 - - * fix: incorrect scope in approximateSize function @sandfox - -### 0.5.1 @ Jan 10 2013 - - * change `createIfMissing` option default to `true` @rvagg - * use util._extend instead of local variant @rvagg - * adjust copyright & contributors @rvagg - * idempotent open and close, and emit _state as events @dominictarr - * fix: check that UINT32_OPTION_VALUE is a Uint32 @kesla - * feature: Support setting size of LRU-cache @kesla - * use util.inherits() from node core @ralphtheninja - -### 0.4.4 @ Jan 1 2013 - - * set maxListeners to Infinity to prevent warnings when using deferred open @juliangruber - -### 0.4.3 @ Dec 31 2012 - - * added @kesla to contributors list @rvagg - * feature: added approximateSize() @kesla - -### 0.4.2 @ Dec 30 2012 - - * process.nextTick->setImmediate with polyfill Node 0.9.5 compat @rvagg - * added @ralphtheninja to contributors list @rvagg - -### 0.4.1 @ Dec 20 2013 - - * remove `useBatch` option on `writeStream()` @rvagg - -### 0.4.0 @ Dec 18 2013 - - * remove old, unused util functions @rvagg - * speed up batch() & allow non-Strings to C++ @rvagg - * fix batch() benchmarks @rvagg - * improved compression test @rvagg - * added SQLite3 to test suite @rvagg - * remove compile warnings on osx @rvagg - * return Strings not Buffers from C++ when possible @rvagg - * optimised encoders & decoders @rvagg - * added basic get() benchmarks @rvagg - * revamped benchmark suite @rvagg - * allow JS Strings through to native layer @rvagg - * cleaner build for osx @rvagg - * remove compile warnings for solaris @rvagg - * LevelDB 1.7 @rvagg - * added `compress` boolean on open() @rvagg - -### 0.3.x and prior - - * stuff diff --git a/node_modules/browserify-fs/node_modules/levelup/CONTRIBUTING.md b/node_modules/browserify-fs/node_modules/levelup/CONTRIBUTING.md deleted file mode 100644 index 2641fd0d..00000000 --- a/node_modules/browserify-fs/node_modules/levelup/CONTRIBUTING.md +++ /dev/null @@ -1,27 +0,0 @@ -# LevelUP is an OPEN Open Source Project - ------------------------------------------ - -## What? - -Individuals making significant and valuable contributions are given commit-access to the project to contribute as they see fit. This project is more like an open wiki than a standard guarded open source project. - -## Rules - -There are a few basic ground-rules for contributors: - -1. **No `--force` pushes** or modifying the Git history in any way. -1. **Non-master branches** ought to be used for ongoing work. -1. **External API changes and significant modifications** ought to be subject to an **internal pull-request** to solicit feedback from other contributors. -1. Internal pull-requests to solicit feedback are *encouraged* for any other non-trivial contribution but left to the discretion of the contributor. -1. Contributors should attempt to adhere to the prevailing code-style. - -## Releases - -Declaring formal releases remains the prerogative of the project maintainer. - -## Changes to this arrangement - -This is an experiment and feedback is welcome! This document may also be subject to pull-requests or changes by contributors where you believe you have something valuable to add or change. - ------------------------------------------ diff --git a/node_modules/browserify-fs/node_modules/levelup/LICENSE.md b/node_modules/browserify-fs/node_modules/levelup/LICENSE.md deleted file mode 100644 index 274c9b46..00000000 --- a/node_modules/browserify-fs/node_modules/levelup/LICENSE.md +++ /dev/null @@ -1,13 +0,0 @@ -The MIT License (MIT) -===================== - -Copyright (c) 2014 LevelUP contributors ---------------------------------------- - -*LevelUP contributors listed at * - -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/node_modules/browserify-fs/node_modules/levelup/README.md b/node_modules/browserify-fs/node_modules/levelup/README.md deleted file mode 100644 index c10c3dca..00000000 --- a/node_modules/browserify-fs/node_modules/levelup/README.md +++ /dev/null @@ -1,732 +0,0 @@ -LevelUP -======= - -![LevelDB Logo](https://0.gravatar.com/avatar/a498b122aecb7678490a38bb593cc12d) - -**Fast & simple storage - a Node.js-style LevelDB wrapper** - -[![Build Status](https://secure.travis-ci.org/rvagg/node-levelup.png)](http://travis-ci.org/rvagg/node-levelup) - -[![NPM](https://nodei.co/npm/levelup.png?stars&downloads)](https://nodei.co/npm/levelup/) [![NPM](https://nodei.co/npm-dl/levelup.png)](https://nodei.co/npm/levelup/) - - - * Introduction - * Relationship to LevelDOWN - * Tested & supported platforms - * Basic usage - * API - * Events - * JSON data - * Custom encodings - * Extending LevelUP - * Multi-process access - * Getting support - * Contributing - * Licence & copyright - - -Introduction ------------- - -**[LevelDB](http://code.google.com/p/leveldb/)** is a simple key/value data store built by Google, inspired by BigTable. It's used in Google Chrome and many other products. LevelDB supports arbitrary byte arrays as both keys and values, singular *get*, *put* and *delete* operations, *batched put and delete*, bi-directional iterators and simple compression using the very fast [Snappy](http://code.google.com/p/snappy/) algorithm. - -**LevelUP** aims to expose the features of LevelDB in a **Node.js-friendly way**. All standard `Buffer` encoding types are supported, as is a special JSON encoding. LevelDB's iterators are exposed as a Node.js-style **readable stream** a matching **writeable stream** converts writes to *batch* operations. - -LevelDB stores entries **sorted lexicographically by keys**. This makes LevelUP's ReadStream interface a very powerful query mechanism. - -**LevelUP** is an **OPEN Open Source Project**, see the Contributing section to find out what this means. - - -Relationship to LevelDOWN -------------------------- - -LevelUP is designed to be backed by **[LevelDOWN](https://github.com/rvagg/node-leveldown/)** which provides a pure C++ binding to LevelDB and can be used as a stand-alone package if required. - -**As of version 0.9, LevelUP no longer requires LevelDOWN as a dependency so you must `npm install leveldown` when you install LevelUP.** - -LevelDOWN is now optional because LevelUP can be used with alternative backends, such as **[level.js](https://github.com/maxogden/level.js)** in the browser or [MemDOWN](https://github.com/rvagg/node-memdown) for a pure in-memory store. - -LevelUP will look for LevelDOWN and throw an error if it can't find it in its Node `require()` path. It will also tell you if the installed version of LevelDOWN is incompatible. - -**The [level](https://github.com/level/level) package is available as an alternative installation mechanism.** Install it instead to automatically get both LevelUP & LevelDOWN. It exposes LevelUP on its export (i.e. you can `var leveldb = require('level')`). - - - -Tested & supported platforms ----------------------------- - - * **Linux**: including ARM platforms such as Raspberry Pi *and Kindle!* - * **Mac OS** - * **Solaris**: including Joyent's SmartOS & Nodejitsu - * **Windows**: Node 0.10 and above only. See installation instructions for *node-gyp's* dependencies [here](https://github.com/TooTallNate/node-gyp#installation), you'll need these (free) components from Microsoft to compile and run any native Node add-on in Windows. - - -Basic usage ------------ - -First you need to install LevelUP! - -```sh -$ npm install levelup leveldown -``` - -Or - -```sh -$ npm install level -``` - -*(this second option requires you to use LevelUP by calling `var levelup = require('level')`)* - - -All operations are asynchronous although they don't necessarily require a callback if you don't need to know when the operation was performed. - -```js -var levelup = require('levelup') - -// 1) Create our database, supply location and options. -// This will create or open the underlying LevelDB store. -var db = levelup('./mydb') - -// 2) put a key & value -db.put('name', 'LevelUP', function (err) { - if (err) return console.log('Ooops!', err) // some kind of I/O error - - // 3) fetch by key - db.get('name', function (err, value) { - if (err) return console.log('Ooops!', err) // likely the key was not found - - // ta da! - console.log('name=' + value) - }) -}) -``` - - -## API - - * levelup() - * db.open() - * db.close() - * db.put() - * db.get() - * db.del() - * db.batch() *(array form)* - * db.batch() *(chained form)* - * db.isOpen() - * db.isClosed() - * db.createReadStream() - * db.createKeyStream() - * db.createValueStream() - * db.createWriteStream() - -### Special operations exposed by LevelDOWN - - * db.db.approximateSize() - * db.db.getProperty() - * leveldown.destroy() - * leveldown.repair() - - --------------------------------------------------------- - -### levelup(location[, options[, callback]]) -### levelup(options[, callback ]) -### levelup(db[, callback ]) -levelup() is the main entry point for creating a new LevelUP instance and opening the underlying store with LevelDB. - -This function returns a new instance of LevelUP and will also initiate an open() operation. Opening the database is an asynchronous operation which will trigger your callback if you provide one. The callback should take the form: `function (err, db) {}` where the `db` is the LevelUP instance. If you don't provide a callback, any read & write operations are simply queued internally until the database is fully opened. - -This leads to two alternative ways of managing a new LevelUP instance: - -```js -levelup(location, options, function (err, db) { - if (err) throw err - db.get('foo', function (err, value) { - if (err) return console.log('foo does not exist') - console.log('got foo =', value) - }) -}) - -// vs the equivalent: - -var db = levelup(location, options) // will throw if an error occurs -db.get('foo', function (err, value) { - if (err) return console.log('foo does not exist') - console.log('got foo =', value) -}) -``` - -The `location` argument is available as a read-only property on the returned LevelUP instance. - -The `levelup(options, callback)` form (with optional `callback`) is only available where you provide a valid `'db'` property on the options object (see below). Only for back-ends that don't require a `location` argument, such as [MemDOWN](https://github.com/rvagg/memdown). - -For example: - -```js -var levelup = require('levelup') -var memdown = require('memdown') -var db = levelup({ db: memdown }) -``` - -The `levelup(db, callback)` form (with optional `callback`) is only available where `db` is a factory function, as would be provided as a `'db'` property on an `options` object (see below). Only for back-ends that don't require a `location` argument, such as [MemDOWN](https://github.com/rvagg/memdown). - -For example: - -```js -var levelup = require('levelup') -var memdown = require('memdown') -var db = levelup(memdown) -``` - -#### `options` - -`levelup()` takes an optional options object as its second argument; the following properties are accepted: - -* `'createIfMissing'` *(boolean, default: `true`)*: If `true`, will initialise an empty database at the specified location if one doesn't already exist. If `false` and a database doesn't exist you will receive an error in your `open()` callback and your database won't open. - -* `'errorIfExists'` *(boolean, default: `false`)*: If `true`, you will receive an error in your `open()` callback if the database exists at the specified location. - -* `'compression'` *(boolean, default: `true`)*: If `true`, all *compressible* data will be run through the Snappy compression algorithm before being stored. Snappy is very fast and shouldn't gain much speed by disabling so leave this on unless you have good reason to turn it off. - -* `'cacheSize'` *(number, default: `8 * 1024 * 1024`)*: The size (in bytes) of the in-memory [LRU](http://en.wikipedia.org/wiki/Cache_algorithms#Least_Recently_Used) cache with frequently used uncompressed block contents. - -* `'keyEncoding'` and `'valueEncoding'` *(string, default: `'utf8'`)*: The encoding of the keys and values passed through Node.js' `Buffer` implementation (see [Buffer#toString()](http://nodejs.org/docs/latest/api/buffer.html#buffer_buf_tostring_encoding_start_end)). -

    'utf8' is the default encoding for both keys and values so you can simply pass in strings and expect strings from your get() operations. You can also pass Buffer objects as keys and/or values and conversion will be performed.

    -

    Supported encodings are: hex, utf8, ascii, binary, base64, ucs2, utf16le.

    -

    'json' encoding is also supported, see below.

    - -* `'db'` *(object, default: LevelDOWN)*: LevelUP is backed by [LevelDOWN](https://github.com/rvagg/node-leveldown/) to provide an interface to LevelDB. You can completely replace the use of LevelDOWN by providing a "factory" function that will return a LevelDOWN API compatible object given a `location` argument. For further information, see [MemDOWN](https://github.com/rvagg/node-memdown/), a fully LevelDOWN API compatible replacement that uses a memory store rather than LevelDB. Also see [Abstract LevelDOWN](http://github.com/rvagg/node-abstract-leveldown), a partial implementation of the LevelDOWN API that can be used as a base prototype for a LevelDOWN substitute. - -Additionally, each of the main interface methods accept an optional options object that can be used to override `'keyEncoding'` and `'valueEncoding'`. - --------------------------------------------------------- - -### db.open([callback]) -open() opens the underlying LevelDB store. In general **you should never need to call this method directly** as it's automatically called by levelup(). - -However, it is possible to *reopen* a database after it has been closed with close(), although this is not generally advised. - --------------------------------------------------------- - -### db.close([callback]) -close() closes the underlying LevelDB store. The callback will receive any error encountered during closing as the first argument. - -You should always clean up your LevelUP instance by calling `close()` when you no longer need it to free up resources. A LevelDB store cannot be opened by multiple instances of LevelDB/LevelUP simultaneously. - --------------------------------------------------------- - -### db.put(key, value[, options][, callback]) -put() is the primary method for inserting data into the store. Both the `key` and `value` can be arbitrary data objects. - -The callback argument is optional but if you don't provide one and an error occurs then expect the error to be thrown. - -#### `options` - -Encoding of the `key` and `value` objects will adhere to `'keyEncoding'` and `'valueEncoding'` options provided to levelup(), although you can provide alternative encoding settings in the options for `put()` (it's recommended that you stay consistent in your encoding of keys and values in a single store). - -If you provide a `'sync'` value of `true` in your `options` object, LevelDB will perform a synchronous write of the data; although the operation will be asynchronous as far as Node is concerned. Normally, LevelDB passes the data to the operating system for writing and returns immediately, however a synchronous write will use `fsync()` or equivalent so your callback won't be triggered until the data is actually on disk. Synchronous filesystem writes are **significantly** slower than asynchronous writes but if you want to be absolutely sure that the data is flushed then you can use `'sync': true`. - --------------------------------------------------------- - -### db.get(key[, options][, callback]) -get() is the primary method for fetching data from the store. The `key` can be an arbitrary data object. If it doesn't exist in the store then the callback will receive an error as its first argument. A not-found err object will be of type `'NotFoundError'` so you can `err.type == 'NotFoundError'` or you can perform a truthy test on the property `err.notFound`. - -```js -db.get('foo', function (err, value) { - if (err) { - if (err.notFound) { - // handle a 'NotFoundError' here - return - } - // I/O or other error, pass it up the callback chain - return callback(err) - } - - // .. handle `value` here -}) -``` - -#### `options` - -Encoding of the `key` object will adhere to the `'keyEncoding'` option provided to levelup(), although you can provide alternative encoding settings in the options for `get()` (it's recommended that you stay consistent in your encoding of keys and values in a single store). - -LevelDB will by default fill the in-memory LRU Cache with data from a call to get. Disabling this is done by setting `fillCache` to `false`. - --------------------------------------------------------- - -### db.del(key[, options][, callback]) -del() is the primary method for removing data from the store. - -#### `options` - -Encoding of the `key` object will adhere to the `'keyEncoding'` option provided to levelup(), although you can provide alternative encoding settings in the options for `del()` (it's recommended that you stay consistent in your encoding of keys and values in a single store). - -A `'sync'` option can also be passed, see put() for details on how this works. - --------------------------------------------------------- - -### db.batch(array[, options][, callback]) *(array form)* -batch() can be used for very fast bulk-write operations (both *put* and *delete*). The `array` argument should contain a list of operations to be executed sequentially, although as a whole they are performed as an atomic operation inside LevelDB. Each operation is contained in an object having the following properties: `type`, `key`, `value`, where the *type* is either `'put'` or `'del'`. In the case of `'del'` the `'value'` property is ignored. Any entries with a `'key'` of `null` or `undefined` will cause an error to be returned on the `callback` and any `'type': 'put'` entry with a `'value'` of `null` or `undefined` will return an error. - -```js -var ops = [ - { type: 'del', key: 'father' } - , { type: 'put', key: 'name', value: 'Yuri Irsenovich Kim' } - , { type: 'put', key: 'dob', value: '16 February 1941' } - , { type: 'put', key: 'spouse', value: 'Kim Young-sook' } - , { type: 'put', key: 'occupation', value: 'Clown' } -] - -db.batch(ops, function (err) { - if (err) return console.log('Ooops!', err) - console.log('Great success dear leader!') -}) -``` - -#### `options` - -See put() for a discussion on the `options` object. You can overwrite default `'keyEncoding'` and `'valueEncoding'` and also specify the use of `sync` filesystem operations. - -In addition to encoding options for the whole batch you can also overwrite the encoding per operation, like: - -```js -var ops = [{ - type : 'put' - , key : new Buffer([1, 2, 3]) - , value : { some: 'json' } - , keyEncoding : 'binary' - , valueEncoding : 'json' -}] -``` - --------------------------------------------------------- - -### db.batch() *(chained form)* -batch(), when called with no arguments will return a `Batch` object which can be used to build, and eventually commit, an atomic LevelDB batch operation. Depending on how it's used, it is possible to obtain greater performance when using the chained form of `batch()` over the array form. - -```js -db.batch() - .del('father') - .put('name', 'Yuri Irsenovich Kim') - .put('dob', '16 February 1941') - .put('spouse', 'Kim Young-sook') - .put('occupation', 'Clown') - .write(function () { console.log('Done!') }) -``` - -batch.put(key, value[, options]) - -Queue a *put* operation on the current batch, not committed until a `write()` is called on the batch. - -The optional `options` argument can be used to override the default `'keyEncoding'` and/or `'valueEncoding'`. - -This method may `throw` a `WriteError` if there is a problem with your put (such as the `value` being `null` or `undefined`). - -batch.del(key[, options]) - -Queue a *del* operation on the current batch, not committed until a `write()` is called on the batch. - -The optional `options` argument can be used to override the default `'keyEncoding'`. - -This method may `throw` a `WriteError` if there is a problem with your delete. - -batch.clear() - -Clear all queued operations on the current batch, any previous operations will be discarded. - -batch.write([callback]) - -Commit the queued operations for this batch. All operations not *cleared* will be written to the database atomically, that is, they will either all succeed or fail with no partial commits. The optional `callback` will be called when the operation has completed with an *error* argument if an error has occurred; if no `callback` is supplied and an error occurs then this method will `throw` a `WriteError`. - - --------------------------------------------------------- - -### db.isOpen() - -A LevelUP object can be in one of the following states: - - * *"new"* - newly created, not opened or closed - * *"opening"* - waiting for the database to be opened - * *"open"* - successfully opened the database, available for use - * *"closing"* - waiting for the database to be closed - * *"closed"* - database has been successfully closed, should not be used - -`isOpen()` will return `true` only when the state is "open". - --------------------------------------------------------- - -### db.isClosed() - -*See isOpen()* - -`isClosed()` will return `true` only when the state is "closing" *or* "closed", it can be useful for determining if read and write operations are permissible. - --------------------------------------------------------- - -### db.createReadStream([options]) - -You can obtain a **ReadStream** of the full database by calling the `createReadStream()` method. The resulting stream is a complete Node.js-style [Readable Stream](http://nodejs.org/docs/latest/api/stream.html#stream_readable_stream) where `'data'` events emit objects with `'key'` and `'value'` pairs. You can also use the `start`, `end` and `limit` options to control the range of keys that are streamed. - -```js -db.createReadStream() - .on('data', function (data) { - console.log(data.key, '=', data.value) - }) - .on('error', function (err) { - console.log('Oh my!', err) - }) - .on('close', function () { - console.log('Stream closed') - }) - .on('end', function () { - console.log('Stream closed') - }) -``` - -The standard `pause()`, `resume()` and `destroy()` methods are implemented on the ReadStream, as is `pipe()` (see below). `'data'`, '`error'`, `'end'` and `'close'` events are emitted. - -Additionally, you can supply an options object as the first parameter to `createReadStream()` with the following options: - -* `'start'`: the key you wish to start the read at. By default it will start at the beginning of the store. Note that the *start* doesn't have to be an actual key that exists, LevelDB will simply find the *next* key, greater than the key you provide. - -* `'end'`: the key you wish to end the read on. By default it will continue until the end of the store. Again, the *end* doesn't have to be an actual key as an (inclusive) `<=`-type operation is performed to detect the end. You can also use the `destroy()` method instead of supplying an `'end'` parameter to achieve the same effect. - -* `'reverse'` *(boolean, default: `false`)*: a boolean, set to true if you want the stream to go in reverse order. Beware that due to the way LevelDB works, a reverse seek will be slower than a forward seek. - -* `'keys'` *(boolean, default: `true`)*: whether the `'data'` event should contain keys. If set to `true` and `'values'` set to `false` then `'data'` events will simply be keys, rather than objects with a `'key'` property. Used internally by the `createKeyStream()` method. - -* `'values'` *(boolean, default: `true`)*: whether the `'data'` event should contain values. If set to `true` and `'keys'` set to `false` then `'data'` events will simply be values, rather than objects with a `'value'` property. Used internally by the `createValueStream()` method. - -* `'limit'` *(number, default: `-1`)*: limit the number of results collected by this stream. This number represents a *maximum* number of results and may not be reached if you get to the end of the store or your `'end'` value first. A value of `-1` means there is no limit. - -* `'fillCache'` *(boolean, default: `false`)*: wheather LevelDB's LRU-cache should be filled with data read. - -* `'keyEncoding'` / `'valueEncoding'` *(string)*: the encoding applied to each read piece of data. - --------------------------------------------------------- - -### db.createKeyStream([options]) - -A **KeyStream** is a **ReadStream** where the `'data'` events are simply the keys from the database so it can be used like a traditional stream rather than an object stream. - -You can obtain a KeyStream either by calling the `createKeyStream()` method on a LevelUP object or by passing passing an options object to `createReadStream()` with `keys` set to `true` and `values` set to `false`. - -```js -db.createKeyStream() - .on('data', function (data) { - console.log('key=', data) - }) - -// same as: -db.createReadStream({ keys: true, values: false }) - .on('data', function (data) { - console.log('key=', data) - }) -``` - --------------------------------------------------------- - -### db.createValueStream([options]) - -A **ValueStream** is a **ReadStream** where the `'data'` events are simply the values from the database so it can be used like a traditional stream rather than an object stream. - -You can obtain a ValueStream either by calling the `createValueStream()` method on a LevelUP object or by passing passing an options object to `createReadStream()` with `values` set to `true` and `keys` set to `false`. - -```js -db.createValueStream() - .on('data', function (data) { - console.log('value=', data) - }) - -// same as: -db.createReadStream({ keys: false, values: true }) - .on('data', function (data) { - console.log('value=', data) - }) -``` - --------------------------------------------------------- - -### db.createWriteStream([options]) - -A **WriteStream** can be obtained by calling the `createWriteStream()` method. The resulting stream is a complete Node.js-style [Writable Stream](http://nodejs.org/docs/latest/api/stream.html#stream_writable_stream) which accepts objects with `'key'` and `'value'` pairs on its `write()` method. - -The WriteStream will buffer writes and submit them as a `batch()` operations where writes occur *within the same tick*. - -```js -var ws = db.createWriteStream() - -ws.on('error', function (err) { - console.log('Oh my!', err) -}) -ws.on('close', function () { - console.log('Stream closed') -}) - -ws.write({ key: 'name', value: 'Yuri Irsenovich Kim' }) -ws.write({ key: 'dob', value: '16 February 1941' }) -ws.write({ key: 'spouse', value: 'Kim Young-sook' }) -ws.write({ key: 'occupation', value: 'Clown' }) -ws.end() -``` - -The standard `write()`, `end()`, `destroy()` and `destroySoon()` methods are implemented on the WriteStream. `'drain'`, `'error'`, `'close'` and `'pipe'` events are emitted. - -You can specify encodings both for the whole stream and individual entries: - -To set the encoding for the whole stream, provide an options object as the first parameter to `createWriteStream()` with `'keyEncoding'` and/or `'valueEncoding'`. - -To set the encoding for an individual entry: - -```js -writeStream.write({ - key : new Buffer([1, 2, 3]) - , value : { some: 'json' } - , keyEncoding : 'binary' - , valueEncoding : 'json' -}) -``` - -#### write({ type: 'put' }) - -If individual `write()` operations are performed with a `'type'` property of `'del'`, they will be passed on as `'del'` operations to the batch. - -```js -var ws = db.createWriteStream() - -ws.on('error', function (err) { - console.log('Oh my!', err) -}) -ws.on('close', function () { - console.log('Stream closed') -}) - -ws.write({ type: 'del', key: 'name' }) -ws.write({ type: 'del', key: 'dob' }) -ws.write({ type: 'put', key: 'spouse' }) -ws.write({ type: 'del', key: 'occupation' }) -ws.end() -``` - -#### db.createWriteStream({ type: 'del' }) - -If the *WriteStream* is created with a `'type'` option of `'del'`, all `write()` operations will be interpreted as `'del'`, unless explicitly specified as `'put'`. - -```js -var ws = db.createWriteStream({ type: 'del' }) - -ws.on('error', function (err) { - console.log('Oh my!', err) -}) -ws.on('close', function () { - console.log('Stream closed') -}) - -ws.write({ key: 'name' }) -ws.write({ key: 'dob' }) -// but it can be overridden -ws.write({ type: 'put', key: 'spouse', value: 'Ri Sol-ju' }) -ws.write({ key: 'occupation' }) -ws.end() -``` - -#### Pipes and Node Stream compatibility - -A ReadStream can be piped directly to a WriteStream, allowing for easy copying of an entire database. A simple `copy()` operation is included in LevelUP that performs exactly this on two open databases: - -```js -function copy (srcdb, dstdb, callback) { - srcdb.createReadStream().pipe(dstdb.createWriteStream()).on('close', callback) -} -``` - -The ReadStream is also [fstream](https://github.com/isaacs/fstream)-compatible which means you should be able to pipe to and from fstreams. So you can serialize and deserialize an entire database to a directory where keys are filenames and values are their contents, or even into a *tar* file using [node-tar](https://github.com/isaacs/node-tar). See the [fstream functional test](https://github.com/rvagg/node-levelup/blob/master/test/functional/fstream-test.js) for an example. *(Note: I'm not really sure there's a great use-case for this but it's a fun example and it helps to harden the stream implementations.)* - -KeyStreams and ValueStreams can be treated like standard streams of raw data. If `'keyEncoding'` or `'valueEncoding'` is set to `'binary'` the `'data'` events will simply be standard Node `Buffer` objects straight out of the data store. - - --------------------------------------------------------- - -### db.db.approximateSize(start, end, callback) -approximateSize() can used to get the approximate number of bytes of file system space used by the range `[start..end)`. The result may not include recently written data. - -```js -var db = require('level')('./huge.db') - -db.db.approximateSize('a', 'c', function (err, size) { - if (err) return console.error('Ooops!', err) - console.log('Approximate size of range is %d', size) -}) -``` - -**Note:** `approximateSize()` is available via [LevelDOWN](https://github.com/rvagg/node-leveldown/), which by default is accessible as the `db` property of your LevelUP instance. This is a specific LevelDB operation and is not likely to be available where you replace LevelDOWN with an alternative back-end via the `'db'` option. - - --------------------------------------------------------- - -### db.db.getProperty(property) -getProperty can be used to get internal details from LevelDB. When issued with a valid property string, a readable string will be returned (this method is synchronous). - -Currently, the only valid properties are: - -* 'leveldb.num-files-at-levelN': returns the number of files at level *N*, where N is an integer representing a valid level (e.g. "0"). - -* 'leveldb.stats': returns a multi-line string describing statistics about LevelDB's internal operation. - -* 'leveldb.sstables': returns a multi-line string describing all of the *sstables* that make up contents of the current database. - - -```js -var db = require('level')('./huge.db') -console.log(db.db.getProperty('leveldb.num-files-at-level3')) -// → '243' -``` - -**Note:** `getProperty()` is available via [LevelDOWN](https://github.com/rvagg/node-leveldown/), which by default is accessible as the `db` property of your LevelUP instance. This is a specific LevelDB operation and is not likely to be available where you replace LevelDOWN with an alternative back-end via the `'db'` option. - - --------------------------------------------------------- - -### leveldown.destroy(location, callback) -destroy() is used to completely remove an existing LevelDB database directory. You can use this function in place of a full directory *rm* if you want to be sure to only remove LevelDB-related files. If the directory only contains LevelDB files, the directory itself will be removed as well. If there are additional, non-LevelDB files in the directory, those files, and the directory, will be left alone. - -The callback will be called when the destroy operation is complete, with a possible `error` argument. - -**Note:** `destroy()` is available via [LevelDOWN](https://github.com/rvagg/node-leveldown/) which you will have to install seperately, e.g.: - -```js -require('leveldown').destroy('./huge.db', function (err) { console.log('done!') }) -``` - --------------------------------------------------------- - -### leveldown.repair(location, callback) -repair() can be used to attempt a restoration of a damaged LevelDB store. From the LevelDB documentation: - -> If a DB cannot be opened, you may attempt to call this method to resurrect as much of the contents of the database as possible. Some data may be lost, so be careful when calling this function on a database that contains important information. - -You will find information on the *repair* operation in the *LOG* file inside the store directory. - -A `repair()` can also be used to perform a compaction of the LevelDB log into table files. - -The callback will be called when the repair operation is complete, with a possible `error` argument. - -**Note:** `repair()` is available via [LevelDOWN](https://github.com/rvagg/node-leveldown/) which you will have to install seperately, e.g.: - -```js -require('leveldown').repair('./huge.db', function (err) { console.log('done!') }) -``` - --------------------------------------------------------- - - -Events ------- - -LevelUP emits events when the callbacks to the corresponding methods are called. - -* `db.emit('put', key, value)` emitted when a new value is `'put'` -* `db.emit('del', key)` emitted when a value is deleted -* `db.emit('batch', ary)` emitted when a batch operation has executed -* `db.emit('ready')` emitted when the database has opened (`'open'` is synonym) -* `db.emit('closed')` emitted when the database has closed -* `db.emit('opening')` emitted when the database is opening -* `db.emit('closing')` emitted when the database is closing - -If you do not pass a callback to an async function, and there is an error, LevelUP will `emit('error', err)` instead. - - -JSON data ---------- - -You specify `'json'` encoding for both keys and/or values, you can then supply JavaScript objects to LevelUP and receive them from all fetch operations, including ReadStreams. LevelUP will automatically *stringify* your objects and store them as *utf8* and parse the strings back into objects before passing them back to you. - - -Custom encodings ----------------- - -A custom encoding may be provided by passing in an object as an value for `keyEncoding` or `valueEncoding` (wherever accepted), it must have the following properties: - -```js -{ - encode : function (val) { ... } - , decode : function (val) { ... } - , buffer : boolean // encode returns a buffer-like and decode accepts a buffer - , type : String // name of this encoding type. -} -``` - -*"buffer-like"* means either a `Buffer` if running in Node, or a Uint8Array if in a browser. Use [bops](https://github.com/chrisdickinson/bops) to get portable binary operations. - - -Extending LevelUP ------------------ - -A list of Node.js LevelDB modules and projects can be found in the wiki. - -When attempting to extend the functionality of LevelUP, it is recommended that you consider using [level-hooks](https://github.com/dominictarr/level-hooks) and/or [level-sublevel](https://github.com/dominictarr/level-sublevel). **level-sublevel** is particularly helpful for keeping additional, extension-specific, data in a LevelDB store. It allows you to partition a LevelUP instance into multiple sub-instances that each correspond to discrete namespaced key ranges. - - -Multi-process access --------------------- - -LevelDB is thread-safe but is **not** suitable for accessing with multiple processes. You should only ever have a LevelDB database open from a single Node.js process. Node.js clusters are made up of multiple processes so a LevelUP instance cannot be shared between them either. - -See the wiki for some LevelUP extensions, including [multilevel](https://github.com/juliangruber/multilevel), that may help if you require a single data store to be shared across processes. - - -Getting support ---------------- - -There are multiple ways you can find help in using LevelDB in Node.js: - - * **IRC:** you'll find an active group of LevelUP users in the **##leveldb** channel on Freenode, including most of the contributors to this project. - * **Mailing list:** there is an active [Node.js LevelDB](https://groups.google.com/forum/#!forum/node-levelup) Google Group. - * **GitHub:** you're welcome to open an issue here on this GitHub repository if you have a question. - - -Contributing ------------- - -LevelUP is an **OPEN Open Source Project**. This means that: - -> Individuals making significant and valuable contributions are given commit-access to the project to contribute as they see fit. This project is more like an open wiki than a standard guarded open source project. - -See the [CONTRIBUTING.md](https://github.com/rvagg/node-levelup/blob/master/CONTRIBUTING.md) file for more details. - -### Contributors - -LevelUP is only possible due to the excellent work of the following contributors: - - - - - - - - - - - - - - - -
    Rod VaggGitHub/rvaggTwitter/@rvagg
    John ChesleyGitHub/cheslesTwitter/@chesles
    Jake VerbatenGitHub/raynosTwitter/@raynos2
    Dominic TarrGitHub/dominictarrTwitter/@dominictarr
    Max OgdenGitHub/maxogdenTwitter/@maxogden
    Lars-Magnus SkogGitHub/ralphtheninjaTwitter/@ralphtheninja
    David BjörklundGitHub/keslaTwitter/@david_bjorklund
    Julian GruberGitHub/juliangruberTwitter/@juliangruber
    Paolo FragomeniGitHub/hij1nxTwitter/@hij1nx
    Anton WhalleyGitHub/No9Twitter/@antonwhalley
    Matteo CollinaGitHub/mcollinaTwitter/@matteocollina
    Pedro TeixeiraGitHub/pgteTwitter/@pgte
    James HallidayGitHub/substackTwitter/@substack
    - -### Windows - -A large portion of the Windows support comes from code by [Krzysztof Kowalczyk](http://blog.kowalczyk.info/) [@kjk](https://twitter.com/kjk), see his Windows LevelDB port [here](http://code.google.com/r/kkowalczyk-leveldb/). If you're using LevelUP on Windows, you should give him your thanks! - - - -License & copyright -------------------- - -Copyright (c) 2012-2014 LevelUP contributors (listed above). - -LevelUP is licensed under the MIT license. All rights not explicitly granted in the MIT license are reserved. See the included LICENSE.md file for more details. - -======= -*LevelUP builds on the excellent work of the LevelDB and Snappy teams from Google and additional contributors. LevelDB and Snappy are both issued under the [New BSD Licence](http://opensource.org/licenses/BSD-3-Clause).* diff --git a/node_modules/browserify-fs/node_modules/levelup/bulk2ssd_pop.config b/node_modules/browserify-fs/node_modules/levelup/bulk2ssd_pop.config deleted file mode 100644 index 7e1198df..00000000 --- a/node_modules/browserify-fs/node_modules/levelup/bulk2ssd_pop.config +++ /dev/null @@ -1,32 +0,0 @@ -%% -%% Prepopulate database to ~0.5Tb using 1k objects - using 500 million keys -%% - -%% Make sure this is max/infinity so the populate completes -{mode, max}. -{duration, infinity}. -%% Make this a multiple of final key size - partitioned_sequential_int keygen is fussy -{concurrent, 100}. - -%% Set up bucket to use - configure with n_val=1 -%% using riak_core_bucket:set_bucket(<<"b1">>,[{n_val,1}]). -%% from riak console -{riakc_pb_bucket, <<"b1">>}. -{key_generator, {int_to_bin, {partitioned_sequential_int, 0, 500000000}}}. -{value_generator, {fixed_bin, 1000}}. -{operations, [{put, 1}]}. - -%% To permit the sequential_int and partitioned_sequential_int -%% key generators to be able to resume where they left off after a -%% crash (of the client or of the server), uncomment the -%% sequential_int_state_dir and edit path accordingly. -{sequential_int_state_dir, "/tmp/bench9"}. - -%% Riak connection info -{riakc_pb_ips, [ "10.0.24.19" ]}. -{riakc_pb_replies, default}. - -%% Setup cruft -{driver, basho_bench_driver_riakc_pb}. -{code_paths, ["deps/riakc", - "deps/protobuffs"]}. diff --git a/node_modules/browserify-fs/node_modules/levelup/buster.js b/node_modules/browserify-fs/node_modules/levelup/buster.js deleted file mode 100644 index fdc0a670..00000000 --- a/node_modules/browserify-fs/node_modules/levelup/buster.js +++ /dev/null @@ -1,7 +0,0 @@ -var config = module.exports - -config['unit'] = { - environment: 'node' - , tests: [ 'test/*-test.js' ] - , libs: [ 'test/common.js' ] -} \ No newline at end of file diff --git a/node_modules/browserify-fs/node_modules/levelup/lib/batch.js b/node_modules/browserify-fs/node_modules/levelup/lib/batch.js deleted file mode 100644 index db20bd62..00000000 --- a/node_modules/browserify-fs/node_modules/levelup/lib/batch.js +++ /dev/null @@ -1,78 +0,0 @@ -/* Copyright (c) 2012-2014 LevelUP contributors - * See list at - * MIT License - * - */ - -var util = require('./util') - , WriteError = require('./errors').WriteError - - , getOptions = util.getOptions - , dispatchError = util.dispatchError - -function Batch (levelup) { - this._levelup = levelup - this.batch = levelup.db.batch() - this.ops = [] -} - -Batch.prototype.put = function (key_, value_, options) { - options = getOptions(this._levelup, options) - - var key = util.encodeKey(key_, options) - , value = util.encodeValue(value_, options) - - try { - this.batch.put(key, value) - } catch (e) { - throw new WriteError(e) - } - this.ops.push({ type : 'put', key : key, value : value }) - - return this -} - -Batch.prototype.del = function (key_, options) { - options = getOptions(this._levelup, options) - - var key = util.encodeKey(key_, options) - - try { - this.batch.del(key) - } catch (err) { - throw new WriteError(err) - } - this.ops.push({ type : 'del', key : key }) - - return this -} - -Batch.prototype.clear = function () { - try { - this.batch.clear() - } catch (err) { - throw new WriteError(err) - } - - this.ops = [] - return this -} - -Batch.prototype.write = function (callback) { - var levelup = this._levelup - , ops = this.ops - - try { - this.batch.write(function (err) { - if (err) - return dispatchError(levelup, new WriteError(err), callback) - levelup.emit('batch', ops) - if (callback) - callback() - }) - } catch (err) { - throw new WriteError(err) - } -} - -module.exports = Batch diff --git a/node_modules/browserify-fs/node_modules/levelup/lib/errors.js b/node_modules/browserify-fs/node_modules/levelup/lib/errors.js deleted file mode 100644 index 09e0bc8b..00000000 --- a/node_modules/browserify-fs/node_modules/levelup/lib/errors.js +++ /dev/null @@ -1,22 +0,0 @@ -/* Copyright (c) 2012-2014 LevelUP contributors - * See list at - * MIT License - * - */ - -var createError = require('errno').create - , LevelUPError = createError('LevelUPError') - , NotFoundError = createError('NotFoundError', LevelUPError) - -NotFoundError.prototype.notFound = true -NotFoundError.prototype.status = 404 - -module.exports = { - LevelUPError : LevelUPError - , InitializationError : createError('InitializationError', LevelUPError) - , OpenError : createError('OpenError', LevelUPError) - , ReadError : createError('ReadError', LevelUPError) - , WriteError : createError('WriteError', LevelUPError) - , NotFoundError : NotFoundError - , EncodingError : createError('EncodingError', LevelUPError) -} diff --git a/node_modules/browserify-fs/node_modules/levelup/lib/levelup.js b/node_modules/browserify-fs/node_modules/levelup/lib/levelup.js deleted file mode 100644 index 8bdf658c..00000000 --- a/node_modules/browserify-fs/node_modules/levelup/lib/levelup.js +++ /dev/null @@ -1,435 +0,0 @@ -/* Copyright (c) 2012-2014 LevelUP contributors - * See list at - * MIT License - * - */ - -var EventEmitter = require('events').EventEmitter - , inherits = require('util').inherits - , extend = require('xtend') - , prr = require('prr') - , DeferredLevelDOWN = require('deferred-leveldown') - - , WriteError = require('./errors').WriteError - , ReadError = require('./errors').ReadError - , NotFoundError = require('./errors').NotFoundError - , OpenError = require('./errors').OpenError - , EncodingError = require('./errors').EncodingError - , InitializationError = require('./errors').InitializationError - - , ReadStream = require('./read-stream') - , WriteStream = require('./write-stream') - , util = require('./util') - , Batch = require('./batch') - - , getOptions = util.getOptions - , defaultOptions = util.defaultOptions - , getLevelDOWN = util.getLevelDOWN - , dispatchError = util.dispatchError - -function getCallback (options, callback) { - return typeof options == 'function' ? options : callback -} - -// Possible LevelUP#_status values: -// - 'new' - newly created, not opened or closed -// - 'opening' - waiting for the database to be opened, post open() -// - 'open' - successfully opened the database, available for use -// - 'closing' - waiting for the database to be closed, post close() -// - 'closed' - database has been successfully closed, should not be -// used except for another open() operation - -function LevelUP (location, options, callback) { - if (!(this instanceof LevelUP)) - return new LevelUP(location, options, callback) - - var error - - EventEmitter.call(this) - this.setMaxListeners(Infinity) - - if (typeof location == 'function') { - options = typeof options == 'object' ? options : {} - options.db = location - location = null - } else if (typeof location == 'object' && typeof location.db == 'function') { - options = location - location = null - } - - if (typeof options == 'function') { - callback = options - options = {} - } - - if ((!options || typeof options.db != 'function') && typeof location != 'string') { - error = new InitializationError( - 'Must provide a location for the database') - if (callback) { - return process.nextTick(function () { - callback(error) - }) - } - throw error - } - - options = getOptions(this, options) - this.options = extend(defaultOptions, options) - this._status = 'new' - // set this.location as enumerable but not configurable or writable - prr(this, 'location', location, 'e') - - this.open(callback) -} - -inherits(LevelUP, EventEmitter) - -LevelUP.prototype.open = function (callback) { - var self = this - , dbFactory - , db - - if (this.isOpen()) { - if (callback) - process.nextTick(function () { callback(null, self) }) - return this - } - - if (this._isOpening()) { - return callback && this.once( - 'open' - , function () { callback(null, self) } - ) - } - - this.emit('opening') - - this._status = 'opening' - this.db = new DeferredLevelDOWN(this.location) - dbFactory = this.options.db || getLevelDOWN() - db = dbFactory(this.location) - - db.open(this.options, function (err) { - if (err) { - return dispatchError(self, new OpenError(err), callback) - } else { - self.db.setDb(db) - self.db = db - self._status = 'open' - if (callback) - callback(null, self) - self.emit('open') - self.emit('ready') - } - }) -} - -LevelUP.prototype.close = function (callback) { - var self = this - - if (this.isOpen()) { - this._status = 'closing' - this.db.close(function () { - self._status = 'closed' - self.emit('closed') - if (callback) - callback.apply(null, arguments) - }) - this.emit('closing') - this.db = null - } else if (this._status == 'closed' && callback) { - return process.nextTick(callback) - } else if (this._status == 'closing' && callback) { - this.once('closed', callback) - } else if (this._isOpening()) { - this.once('open', function () { - self.close(callback) - }) - } -} - -LevelUP.prototype.isOpen = function () { - return this._status == 'open' -} - -LevelUP.prototype._isOpening = function () { - return this._status == 'opening' -} - -LevelUP.prototype.isClosed = function () { - return (/^clos/).test(this._status) -} - -LevelUP.prototype.get = function (key_, options, callback) { - var self = this - , key - - callback = getCallback(options, callback) - - if (typeof callback != 'function') { - return dispatchError( - this - , new ReadError('get() requires key and callback arguments') - ) - } - - if (!this._isOpening() && !this.isOpen()) { - return dispatchError( - this - , new ReadError('Database is not open') - , callback - ) - } - - options = util.getOptions(this, options) - key = util.encodeKey(key_, options) - - options.asBuffer = util.isValueAsBuffer(options) - - this.db.get(key, options, function (err, value) { - if (err) { - if ((/notfound/i).test(err)) { - err = new NotFoundError( - 'Key not found in database [' + key_ + ']', err) - } else { - err = new ReadError(err) - } - return dispatchError(self, err, callback) - } - if (callback) { - try { - value = util.decodeValue(value, options) - } catch (e) { - return callback(new EncodingError(e)) - } - callback(null, value) - } - }) -} - -LevelUP.prototype.put = function (key_, value_, options, callback) { - var self = this - , key - , value - - callback = getCallback(options, callback) - - if (key_ === null || key_ === undefined - || value_ === null || value_ === undefined) { - return dispatchError( - this - , new WriteError('put() requires key and value arguments') - , callback - ) - } - - if (!this._isOpening() && !this.isOpen()) { - return dispatchError( - this - , new WriteError('Database is not open') - , callback - ) - } - - options = getOptions(this, options) - key = util.encodeKey(key_, options) - value = util.encodeValue(value_, options) - - this.db.put(key, value, options, function (err) { - if (err) { - return dispatchError(self, new WriteError(err), callback) - } else { - self.emit('put', key_, value_) - if (callback) - callback() - } - }) -} - -LevelUP.prototype.del = function (key_, options, callback) { - var self = this - , key - - callback = getCallback(options, callback) - - if (key_ === null || key_ === undefined) { - return dispatchError( - this - , new WriteError('del() requires a key argument') - , callback - ) - } - - if (!this._isOpening() && !this.isOpen()) { - return dispatchError( - this - , new WriteError('Database is not open') - , callback - ) - } - - options = getOptions(this, options) - key = util.encodeKey(key_, options) - - this.db.del(key, options, function (err) { - if (err) { - return dispatchError(self, new WriteError(err), callback) - } else { - self.emit('del', key_) - if (callback) - callback() - } - }) -} - -LevelUP.prototype.batch = function (arr_, options, callback) { - var self = this - , keyEnc - , valueEnc - , arr - - if (!arguments.length) - return new Batch(this) - - callback = getCallback(options, callback) - - if (!Array.isArray(arr_)) { - return dispatchError( - this - , new WriteError('batch() requires an array argument') - , callback - ) - } - - if (!this._isOpening() && !this.isOpen()) { - return dispatchError( - this - , new WriteError('Database is not open') - , callback - ) - } - - options = getOptions(this, options) - keyEnc = options.keyEncoding - valueEnc = options.valueEncoding - - arr = arr_.map(function (e) { - if (e.type === undefined || e.key === undefined) - return {} - - // inherit encoding - var kEnc = e.keyEncoding || keyEnc - , vEnc = e.valueEncoding || e.encoding || valueEnc - , o - - // If we're not dealing with plain utf8 strings or plain - // Buffers then we have to do some work on the array to - // encode the keys and/or values. This includes JSON types. - - if (kEnc != 'utf8' && kEnc != 'binary' - || vEnc != 'utf8' && vEnc != 'binary') { - o = { - type: e.type - , key: util.encodeKey(e.key, options, e) - } - - if (e.value !== undefined) - o.value = util.encodeValue(e.value, options, e) - - return o - } else { - return e - } - }) - - this.db.batch(arr, options, function (err) { - if (err) { - return dispatchError(self, new WriteError(err), callback) - } else { - self.emit('batch', arr_) - if (callback) - callback() - } - }) -} - -// DEPRECATED: prefer accessing LevelDOWN for this: db.db.approximateSize() -LevelUP.prototype.approximateSize = function (start_, end_, callback) { - var self = this - , start - , end - - if (start_ === null || start_ === undefined - || end_ === null || end_ === undefined - || typeof callback != 'function') { - return dispatchError( - this - , new ReadError('approximateSize() requires start, end and callback arguments') - , callback - ) - } - - start = util.encodeKey(start_, this.options) - end = util.encodeKey(end_, this.options) - - if (!this._isOpening() && !this.isOpen()) { - return dispatchError( - this - , new WriteError('Database is not open') - , callback - ) - } - - this.db.approximateSize(start, end, function (err, size) { - if (err) { - return dispatchError(self, new OpenError(err), callback) - } else if (callback) { - callback(null, size) - } - }) -} - -LevelUP.prototype.readStream = -LevelUP.prototype.createReadStream = function (options) { - var self = this - options = extend(this.options, options) - return new ReadStream( - options - , this - , function (options) { - return self.db.iterator(options) - } - ) -} - -LevelUP.prototype.keyStream = -LevelUP.prototype.createKeyStream = function (options) { - return this.createReadStream(extend(options, { keys: true, values: false })) -} - -LevelUP.prototype.valueStream = -LevelUP.prototype.createValueStream = function (options) { - return this.createReadStream(extend(options, { keys: false, values: true })) -} - -LevelUP.prototype.writeStream = -LevelUP.prototype.createWriteStream = function (options) { - return new WriteStream(extend(options), this) -} - -LevelUP.prototype.toString = function () { - return 'LevelUP' -} - -function utilStatic (name) { - return function (location, callback) { - getLevelDOWN()[name](location, callback || function () {}) - } -} - -module.exports = LevelUP -module.exports.copy = util.copy -// DEPRECATED: prefer accessing LevelDOWN for this: require('leveldown').destroy() -module.exports.destroy = utilStatic('destroy') -// DEPRECATED: prefer accessing LevelDOWN for this: require('leveldown').repair() -module.exports.repair = utilStatic('repair') diff --git a/node_modules/browserify-fs/node_modules/levelup/lib/read-stream.js b/node_modules/browserify-fs/node_modules/levelup/lib/read-stream.js deleted file mode 100644 index 12e8229c..00000000 --- a/node_modules/browserify-fs/node_modules/levelup/lib/read-stream.js +++ /dev/null @@ -1,126 +0,0 @@ -/* Copyright (c) 2012-2014 LevelUP contributors - * See list at - * MIT License - */ - -// NOTE: we are fixed to readable-stream@1.0.x for now -// for pure Streams2 across Node versions -var Readable = require('readable-stream').Readable - , inherits = require('util').inherits - , extend = require('xtend') - , EncodingError = require('./errors').EncodingError - , util = require('./util') - - , defaultOptions = { keys: true, values: true } - - , makeKeyValueData = function (key, value) { - return { - key: util.decodeKey(key, this._options) - , value: util.decodeValue(value, this._options) - } - } - , makeKeyData = function (key) { - return util.decodeKey(key, this._options) - } - , makeValueData = function (_, value) { - return util.decodeValue(value, this._options) - } - , makeNoData = function () { return null } - -function ReadStream (options, db, iteratorFactory) { - if (!(this instanceof ReadStream)) - return new ReadStream(options, db, iteratorFactory) - - Readable.call(this, { objectMode: true, highWaterMark: options.highWaterMark }) - - // purely to keep `db` around until we're done so it's not GCed if the user doesn't keep a ref - this._db = db - - options = this._options = extend(defaultOptions, options) - - this._keyEncoding = options.keyEncoding || options.encoding - this._valueEncoding = options.valueEncoding || options.encoding - - if (typeof this._options.start != 'undefined') - this._options.start = util.encodeKey(this._options.start, this._options) - if (typeof this._options.end != 'undefined') - this._options.end = util.encodeKey(this._options.end, this._options) - if (typeof this._options.limit != 'number') - this._options.limit = -1 - - this._options.keyAsBuffer = util.isKeyAsBuffer(this._options) - - this._options.valueAsBuffer = util.isValueAsBuffer(this._options) - - this._makeData = this._options.keys && this._options.values - ? makeKeyValueData : this._options.keys - ? makeKeyData : this._options.values - ? makeValueData : makeNoData - - var self = this - if (!this._db.isOpen()) { - this._db.once('ready', function () { - if (!self._destroyed) { - self._iterator = iteratorFactory(self._options) - } - }) - } else - this._iterator = iteratorFactory(this._options) -} - -inherits(ReadStream, Readable) - -ReadStream.prototype._read = function read () { - var self = this - if (!self._db.isOpen()) { - return self._db.once('ready', function () { read.call(self) }) - } - if (self._destroyed) - return - - self._iterator.next(function(err, key, value) { - if (err || (key === undefined && value === undefined)) { - if (!err && !self._destroyed) - self.push(null) - return self._cleanup(err) - } - - try { - value = self._makeData(key, value) - } catch (e) { - return self._cleanup(new EncodingError(e)) - } - if (!self._destroyed) - self.push(value) - }) -} - -ReadStream.prototype._cleanup = function (err) { - if (this._destroyed) - return - - this._destroyed = true - - var self = this - if (err) - self.emit('error', err) - - if (self._iterator) { - self._iterator.end(function () { - self._iterator = null - self.emit('close') - }) - } else { - self.emit('close') - } -} - -ReadStream.prototype.destroy = function () { - this._cleanup() -} - -ReadStream.prototype.toString = function () { - return 'LevelUP.ReadStream' -} - -module.exports = ReadStream diff --git a/node_modules/browserify-fs/node_modules/levelup/lib/util.js b/node_modules/browserify-fs/node_modules/levelup/lib/util.js deleted file mode 100644 index 8a1648e5..00000000 --- a/node_modules/browserify-fs/node_modules/levelup/lib/util.js +++ /dev/null @@ -1,182 +0,0 @@ -/* Copyright (c) 2012-2014 LevelUP contributors - * See list at - * MIT License - * - */ - -var extend = require('xtend') - , LevelUPError = require('./errors').LevelUPError - - , encodingNames = [ - 'hex' - , 'utf8' - , 'utf-8' - , 'ascii' - , 'binary' - , 'base64' - , 'ucs2' - , 'ucs-2' - , 'utf16le' - , 'utf-16le' - ] - - , defaultOptions = { - createIfMissing : true - , errorIfExists : false - , keyEncoding : 'utf8' - , valueEncoding : 'utf8' - , compression : true - } - - , leveldown - - , encodings = (function () { - function isBinary (data) { - return data === undefined || data === null || Buffer.isBuffer(data) - } - - var encodings = {} - encodings.utf8 = encodings['utf-8'] = { - encode : function (data) { - return isBinary(data) ? data : String(data) - } - , decode : function (data) { - return data - } - , buffer : false - , type : 'utf8' - } - encodings.json = { - encode : JSON.stringify - , decode : JSON.parse - , buffer : false - , type : 'json' - } - encodingNames.forEach(function (type) { - if (encodings[type]) - return - encodings[type] = { - encode : function (data) { - return isBinary(data) ? data : new Buffer(data, type) - } - , decode : function (buffer) { - return process.browser ? buffer.toString(type) : buffer; - } - , buffer : true - , type : type // useful for debugging purposes - } - }) - return encodings - })() - - , encodingOpts = (function () { - var eo = {} - encodingNames.forEach(function (e) { - eo[e] = { valueEncoding : e } - }) - return eo - }()) - -function copy (srcdb, dstdb, callback) { - srcdb.readStream() - .pipe(dstdb.writeStream()) - .on('close', callback ? callback : function () {}) - .on('error', callback ? callback : function (err) { throw err }) -} - -function getOptions (levelup, options) { - var s = typeof options == 'string' // just an encoding - if (!s && options && options.encoding && !options.valueEncoding) - options.valueEncoding = options.encoding - return extend( - (levelup && levelup.options) || {} - , s ? encodingOpts[options] || encodingOpts[defaultOptions.valueEncoding] - : options - ) -} - -function getLevelDOWN () { - if (leveldown) - return leveldown - - var requiredVersion = require('../package.json').devDependencies.leveldown - , missingLevelDOWNError = 'Could not locate LevelDOWN, try `npm install leveldown`' - , leveldownVersion - - try { - leveldownVersion = require('leveldown/package').version - } catch (e) { - throw new LevelUPError(missingLevelDOWNError) - } - - if (!require('semver').satisfies(leveldownVersion, requiredVersion)) { - throw new LevelUPError( - 'Installed version of LevelDOWN (' - + leveldownVersion - + ') does not match required version (' - + requiredVersion - + ')' - ) - } - - try { - return leveldown = require('leveldown') - } catch (e) { - throw new LevelUPError(missingLevelDOWNError) - } -} - -function dispatchError (levelup, error, callback) { - return typeof callback == 'function' - ? callback(error) - : levelup.emit('error', error) -} - -function getKeyEncoder (options, op) { - var type = ((op && op.keyEncoding) || options.keyEncoding) || 'utf8' - return encodings[type] || type -} - -function getValueEncoder (options, op) { - var type = (((op && (op.valueEncoding || op.encoding)) - || options.valueEncoding || options.encoding)) || 'utf8' - return encodings[type] || type -} - -function encodeKey (key, options, op) { - return getKeyEncoder(options, op).encode(key) -} - -function encodeValue (value, options, op) { - return getValueEncoder(options, op).encode(value) -} - -function decodeKey (key, options) { - return getKeyEncoder(options).decode(key) -} - -function decodeValue (value, options) { - return getValueEncoder(options).decode(value) -} - -function isValueAsBuffer (options, op) { - return getValueEncoder(options, op).buffer -} - -function isKeyAsBuffer (options, op) { - return getKeyEncoder(options, op).buffer -} - -module.exports = { - defaultOptions : defaultOptions - , copy : copy - , getOptions : getOptions - , getLevelDOWN : getLevelDOWN - , dispatchError : dispatchError - , encodeKey : encodeKey - , encodeValue : encodeValue - , isValueAsBuffer : isValueAsBuffer - , isKeyAsBuffer : isKeyAsBuffer - , decodeValue : decodeValue - , decodeKey : decodeKey -} diff --git a/node_modules/browserify-fs/node_modules/levelup/lib/write-stream.js b/node_modules/browserify-fs/node_modules/levelup/lib/write-stream.js deleted file mode 100644 index 6b50b988..00000000 --- a/node_modules/browserify-fs/node_modules/levelup/lib/write-stream.js +++ /dev/null @@ -1,178 +0,0 @@ -/* Copyright (c) 2012-2014 LevelUP contributors - * See list at - * MIT License - * - */ - -var Stream = require('stream').Stream - , inherits = require('util').inherits - , extend = require('xtend') - , bl = require('bl') - - , setImmediate = global.setImmediate || process.nextTick - - , getOptions = require('./util').getOptions - - , defaultOptions = { type: 'put' } - -function WriteStream (options, db) { - if (!(this instanceof WriteStream)) - return new WriteStream(options, db) - - Stream.call(this) - this._options = extend(defaultOptions, getOptions(db, options)) - this._db = db - this._buffer = [] - this._status = 'init' - this._end = false - this.writable = true - this.readable = false - - var self = this - , ready = function () { - if (!self.writable) - return - self._status = 'ready' - self.emit('ready') - self._process() - } - - if (db.isOpen()) - setImmediate(ready) - else - db.once('ready', ready) -} - -inherits(WriteStream, Stream) - -WriteStream.prototype.write = function (data) { - if (!this.writable) - return false - this._buffer.push(data) - if (this._status != 'init') - this._processDelayed() - if (this._options.maxBufferLength && - this._buffer.length > this._options.maxBufferLength) { - this._writeBlock = true - return false - } - return true -} - -WriteStream.prototype.end = function (data) { - var self = this - if (data) - this.write(data) - setImmediate(function () { - self._end = true - self._process() - }) -} - -WriteStream.prototype.destroy = function () { - this.writable = false - this.end() -} - -WriteStream.prototype.destroySoon = function () { - this.end() -} - -WriteStream.prototype.add = function (entry) { - if (!entry.props) - return - if (entry.props.Directory) - entry.pipe(this._db.writeStream(this._options)) - else if (entry.props.File || entry.File || entry.type == 'File') - this._write(entry) - return true -} - -WriteStream.prototype._processDelayed = function () { - var self = this - setImmediate(function () { - self._process() - }) -} - -WriteStream.prototype._process = function () { - var buffer - , self = this - - , cb = function (err) { - if (!self.writable) - return - if (self._status != 'closed') - self._status = 'ready' - if (err) { - self.writable = false - return self.emit('error', err) - } - self._process() - } - - if (self._status != 'ready' && self.writable) { - if (self._buffer.length && self._status != 'closed') - self._processDelayed() - return - } - - if (self._buffer.length && self.writable) { - self._status = 'writing' - buffer = self._buffer - self._buffer = [] - - self._db.batch(buffer.map(function (d) { - return { - type : d.type || self._options.type - , key : d.key - , value : d.value - , keyEncoding : d.keyEncoding || self._options.keyEncoding - , valueEncoding : d.valueEncoding - || d.encoding - || self._options.valueEncoding - } - }), cb) - - if (self._writeBlock) { - self._writeBlock = false - self.emit('drain') - } - - // don't allow close until callback has returned - return - } - - if (self._end && self._status != 'closed') { - self._status = 'closed' - self.writable = false - self.emit('close') - } -} - -WriteStream.prototype._write = function (entry) { - var key = entry.path || entry.props.path - , self = this - - if (!key) - return - - entry.pipe(bl(function (err, data) { - if (err) { - self.writable = false - return self.emit('error', err) - } - - if (self._options.fstreamRoot && - key.indexOf(self._options.fstreamRoot) > -1) - key = key.substr(self._options.fstreamRoot.length + 1) - - self.write({ key: key, value: data.slice(0) }) - })) -} - -WriteStream.prototype.toString = function () { - return 'LevelUP.WriteStream' -} - -module.exports = WriteStream diff --git a/node_modules/browserify-fs/node_modules/levelup/node_modules/.bin/errno b/node_modules/browserify-fs/node_modules/levelup/node_modules/.bin/errno deleted file mode 120000 index 5a98e539..00000000 --- a/node_modules/browserify-fs/node_modules/levelup/node_modules/.bin/errno +++ /dev/null @@ -1 +0,0 @@ -../errno/cli.js \ No newline at end of file diff --git a/node_modules/browserify-fs/node_modules/levelup/node_modules/.bin/semver b/node_modules/browserify-fs/node_modules/levelup/node_modules/.bin/semver deleted file mode 120000 index 317eb293..00000000 --- a/node_modules/browserify-fs/node_modules/levelup/node_modules/.bin/semver +++ /dev/null @@ -1 +0,0 @@ -../semver/bin/semver \ No newline at end of file diff --git a/node_modules/browserify-fs/node_modules/levelup/node_modules/bl/.jshintrc b/node_modules/browserify-fs/node_modules/levelup/node_modules/bl/.jshintrc deleted file mode 100644 index c8ef3ca4..00000000 --- a/node_modules/browserify-fs/node_modules/levelup/node_modules/bl/.jshintrc +++ /dev/null @@ -1,59 +0,0 @@ -{ - "predef": [ ] - , "bitwise": false - , "camelcase": false - , "curly": false - , "eqeqeq": false - , "forin": false - , "immed": false - , "latedef": false - , "noarg": true - , "noempty": true - , "nonew": true - , "plusplus": false - , "quotmark": true - , "regexp": false - , "undef": true - , "unused": true - , "strict": false - , "trailing": true - , "maxlen": 120 - , "asi": true - , "boss": true - , "debug": true - , "eqnull": true - , "esnext": true - , "evil": true - , "expr": true - , "funcscope": false - , "globalstrict": false - , "iterator": false - , "lastsemic": true - , "laxbreak": true - , "laxcomma": true - , "loopfunc": true - , "multistr": false - , "onecase": false - , "proto": false - , "regexdash": false - , "scripturl": true - , "smarttabs": false - , "shadow": false - , "sub": true - , "supernew": false - , "validthis": true - , "browser": true - , "couch": false - , "devel": false - , "dojo": false - , "mootools": false - , "node": true - , "nonstandard": true - , "prototypejs": false - , "rhino": false - , "worker": true - , "wsh": false - , "nomen": false - , "onevar": false - , "passfail": false -} \ No newline at end of file diff --git a/node_modules/browserify-fs/node_modules/levelup/node_modules/bl/.npmignore b/node_modules/browserify-fs/node_modules/levelup/node_modules/bl/.npmignore deleted file mode 100644 index 40b878db..00000000 --- a/node_modules/browserify-fs/node_modules/levelup/node_modules/bl/.npmignore +++ /dev/null @@ -1 +0,0 @@ -node_modules/ \ No newline at end of file diff --git a/node_modules/browserify-fs/node_modules/levelup/node_modules/bl/.travis.yml b/node_modules/browserify-fs/node_modules/levelup/node_modules/bl/.travis.yml deleted file mode 100644 index 7ddb9c97..00000000 --- a/node_modules/browserify-fs/node_modules/levelup/node_modules/bl/.travis.yml +++ /dev/null @@ -1,11 +0,0 @@ -language: node_js -node_js: - - 0.8 - - "0.10" -branches: - only: - - master -notifications: - email: - - rod@vagg.org -script: npm test \ No newline at end of file diff --git a/node_modules/browserify-fs/node_modules/levelup/node_modules/bl/LICENSE b/node_modules/browserify-fs/node_modules/levelup/node_modules/bl/LICENSE deleted file mode 100644 index f6a0029d..00000000 --- a/node_modules/browserify-fs/node_modules/levelup/node_modules/bl/LICENSE +++ /dev/null @@ -1,39 +0,0 @@ -Copyright 2013, Rod Vagg (the "Original Author") -All rights reserved. - -MIT +no-false-attribs License - -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. - -Distributions of all or part of the Software intended to be used -by the recipients as they would use the unmodified Software, -containing modifications that substantially alter, remove, or -disable functionality of the Software, outside of the documented -configuration mechanisms provided by the Software, shall be -modified such that the Original Author's bug reporting email -addresses and urls are either replaced with the contact information -of the parties responsible for the changes, or removed entirely. - -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. - - -Except where noted, this license applies to any and all software -programs and associated documentation files created by the -Original Author, when distributed with the Software. \ No newline at end of file diff --git a/node_modules/browserify-fs/node_modules/levelup/node_modules/bl/README.md b/node_modules/browserify-fs/node_modules/levelup/node_modules/bl/README.md deleted file mode 100644 index 8e77009c..00000000 --- a/node_modules/browserify-fs/node_modules/levelup/node_modules/bl/README.md +++ /dev/null @@ -1,196 +0,0 @@ -# bl *(BufferList)* - -[![Build Status](https://secure.travis-ci.org/rvagg/bl.png)](http://travis-ci.org/rvagg/bl) - -**A Node.js Buffer list collector, reader and streamer thingy.** - -[![NPM](https://nodei.co/npm/bl.png?downloads=true)](https://nodei.co/npm/bl/) -[![NPM](https://nodei.co/npm-dl/bl.png?months=6)](https://nodei.co/npm/bl/) - -**bl** is a storage object for collections of Node Buffers, exposing them with the main Buffer readable API. Also works as a duplex stream so you can collect buffers from a stream that emits them and emit buffers to a stream that consumes them! - -The original buffers are kept intact and copies are only done as necessary. Any reads that require the use of a single original buffer will return a slice of that buffer only (which references the same memory as the original buffer). Reads that span buffers perform concatenation as required and return the results transparently. - -```js -const BufferList = require('bl') - -var bl = new BufferList() -bl.append(new Buffer('abcd')) -bl.append(new Buffer('efg')) -bl.append('hi') // bl will also accept & convert Strings -bl.append(new Buffer('j')) -bl.append(new Buffer([ 0x3, 0x4 ])) - -console.log(bl.length) // 12 - -console.log(bl.slice(0, 10).toString('ascii')) // 'abcdefghij' -console.log(bl.slice(3, 10).toString('ascii')) // 'defghij' -console.log(bl.slice(3, 6).toString('ascii')) // 'def' -console.log(bl.slice(3, 8).toString('ascii')) // 'defgh' -console.log(bl.slice(5, 10).toString('ascii')) // 'fghij' - -// or just use toString! -console.log(bl.toString()) // 'abcdefghij\u0003\u0004' -console.log(bl.toString('ascii', 3, 8)) // 'defgh' -console.log(bl.toString('ascii', 5, 10)) // 'fghij' - -// other standard Buffer readables -console.log(bl.readUInt16BE(10)) // 0x0304 -console.log(bl.readUInt16LE(10)) // 0x0403 -``` - -Give it a callback in the constructor and use it just like **[concat-stream](https://github.com/maxogden/node-concat-stream)**: - -```js -const bl = require('bl') - , fs = require('fs') - -fs.createReadStream('README.md') - .pipe(bl(function (err, data) { // note 'new' isn't strictly required - // `data` is a complete Buffer object containing the full data - console.log(data.toString()) - })) -``` - -Note that when you use the *callback* method like this, the resulting `data` parameter is a concatenation of all `Buffer` objects in the list. If you want to avoid the overhead of this concatenation (in cases of extreme performance consciousness), then avoid the *callback* method and just listen to `'end'` instead, like a standard Stream. - -Or to fetch a URL using [hyperquest](https://github.com/substack/hyperquest) (should work with [request](http://github.com/mikeal/request) and even plain Node http too!): -```js -const hyperquest = require('hyperquest') - , bl = require('bl') - , url = 'https://raw.github.com/rvagg/bl/master/README.md' - -hyperquest(url).pipe(bl(function (err, data) { - console.log(data.toString()) -})) -``` - -Or, use it as a readable stream to recompose a list of Buffers to an output source: - -```js -const BufferList = require('bl') - , fs = require('fs') - -var bl = new BufferList() -bl.append(new Buffer('abcd')) -bl.append(new Buffer('efg')) -bl.append(new Buffer('hi')) -bl.append(new Buffer('j')) - -bl.pipe(fs.createWriteStream('gibberish.txt')) -``` - -## API - - * new BufferList([ callback ]) - * bl.length - * bl.append(buffer) - * bl.get(index) - * bl.slice([ start[, end ] ]) - * bl.copy(dest, [ destStart, [ srcStart [, srcEnd ] ] ]) - * bl.duplicate() - * bl.consume(bytes) - * bl.toString([encoding, [ start, [ end ]]]) - * bl.readDoubleBE(), bl.readDoubleLE(), bl.readFloatBE(), bl.readFloatLE(), bl.readInt32BE(), bl.readInt32LE(), bl.readUInt32BE(), bl.readUInt32LE(), bl.readInt16BE(), bl.readInt16LE(), bl.readUInt16BE(), bl.readUInt16LE(), bl.readInt8(), bl.readUInt8() - * Streams - --------------------------------------------------------- - -### new BufferList([ callback | buffer | buffer array ]) -The constructor takes an optional callback, if supplied, the callback will be called with an error argument followed by a reference to the **bl** instance, when `bl.end()` is called (i.e. from a piped stream). This is a convenient method of collecting the entire contents of a stream, particularly when the stream is *chunky*, such as a network stream. - -Normally, no arguments are required for the constructor, but you can initialise the list by passing in a single `Buffer` object or an array of `Buffer` object. - -`new` is not strictly required, if you don't instantiate a new object, it will be done automatically for you so you can create a new instance simply with: - -```js -var bl = require('bl') -var myinstance = bl() - -// equivilant to: - -var BufferList = require('bl') -var myinstance = new BufferList() -``` - --------------------------------------------------------- - -### bl.length -Get the length of the list in bytes. This is the sum of the lengths of all of the buffers contained in the list, minus any initial offset for a semi-consumed buffer at the beginning. Should accurately represent the total number of bytes that can be read from the list. - --------------------------------------------------------- - -### bl.append(buffer) -`append(buffer)` adds an additional buffer to the internal list. - --------------------------------------------------------- - -### bl.get(index) -`get()` will return the byte at the specified index. - --------------------------------------------------------- - -### bl.slice([ start, [ end ] ]) -`slice()` returns a new `Buffer` object containing the bytes within the range specified. Both `start` and `end` are optional and will default to the beginning and end of the list respectively. - -If the requested range spans a single internal buffer then a slice of that buffer will be returned which shares the original memory range of that Buffer. If the range spans multiple buffers then copy operations will likely occur to give you a uniform Buffer. - --------------------------------------------------------- - -### bl.copy(dest, [ destStart, [ srcStart [, srcEnd ] ] ]) -`copy()` copies the content of the list in the `dest` buffer, starting from `destStart` and containing the bytes within the range specified with `srcStart` to `srcEnd`. `destStart`, `start` and `end` are optional and will default to the beginning of the `dest` buffer, and the beginning and end of the list respectively. - --------------------------------------------------------- - -### bl.duplicate() -`duplicate()` performs a **shallow-copy** of the list. The internal Buffers remains the same, so if you change the underlying Buffers, the change will be reflected in both the original and the duplicate. This method is needed if you want to call `consume()` or `pipe()` and still keep the original list.Example: - -```js -var bl = new BufferList() - -bl.append('hello') -bl.append(' world') -bl.append('\n') - -bl.duplicate().pipe(process.stdout, { end: false }) - -console.log(bl.toString()) -``` - --------------------------------------------------------- - -### bl.consume(bytes) -`consume()` will shift bytes *off the start of the list*. The number of bytes consumed don't need to line up with the sizes of the internal Buffers—initial offsets will be calculated accordingly in order to give you a consistent view of the data. - --------------------------------------------------------- - -### bl.toString([encoding, [ start, [ end ]]]) -`toString()` will return a string representation of the buffer. The optional `start` and `end` arguments are passed on to `slice()`, while the `encoding` is passed on to `toString()` of the resulting Buffer. See the [Buffer#toString()](http://nodejs.org/docs/latest/api/buffer.html#buffer_buf_tostring_encoding_start_end) documentation for more information. - --------------------------------------------------------- - -### bl.readDoubleBE(), bl.readDoubleLE(), bl.readFloatBE(), bl.readFloatLE(), bl.readInt32BE(), bl.readInt32LE(), bl.readUInt32BE(), bl.readUInt32LE(), bl.readInt16BE(), bl.readInt16LE(), bl.readUInt16BE(), bl.readUInt16LE(), bl.readInt8(), bl.readUInt8() - -All of the standard byte-reading methods of the `Buffer` interface are implemented and will operate across internal Buffer boundaries transparently. - -See the [Buffer](http://nodejs.org/docs/latest/api/buffer.html) documentation for how these work. - --------------------------------------------------------- - -### Streams -**bl** is a Node **[Duplex Stream](http://nodejs.org/docs/latest/api/stream.html#stream_class_stream_duplex)**, so it can be read from and written to like a standard Node stream. You can also `pipe()` to and from a **bl** instance. - --------------------------------------------------------- - -## Contributors - -**bl** is brought to you by the following hackers: - - * [Rod Vagg](https://github.com/rvagg) - * [Matteo Collina](https://github.com/mcollina) - -======= - -## License - -**bl** is Copyright (c) 2013 Rod Vagg [@rvagg](https://twitter.com/rvagg) and licenced under the MIT licence. All rights not explicitly granted in the MIT license are reserved. See the included LICENSE file for more details. diff --git a/node_modules/browserify-fs/node_modules/levelup/node_modules/bl/bl.js b/node_modules/browserify-fs/node_modules/levelup/node_modules/bl/bl.js deleted file mode 100644 index 36c98168..00000000 --- a/node_modules/browserify-fs/node_modules/levelup/node_modules/bl/bl.js +++ /dev/null @@ -1,213 +0,0 @@ -var DuplexStream = require('readable-stream').Duplex - , util = require('util') - -function BufferList (callback) { - if (!(this instanceof BufferList)) - return new BufferList(callback) - - this._bufs = [] - this.length = 0 - - if (typeof callback == 'function') { - this._callback = callback - - var piper = function (err) { - if (this._callback) { - this._callback(err) - this._callback = null - } - }.bind(this) - - this.on('pipe', function (src) { - src.on('error', piper) - }) - this.on('unpipe', function (src) { - src.removeListener('error', piper) - }) - } - else if (Buffer.isBuffer(callback)) - this.append(callback) - else if (Array.isArray(callback)) { - callback.forEach(function (b) { - Buffer.isBuffer(b) && this.append(b) - }.bind(this)) - } - - DuplexStream.call(this) -} - -util.inherits(BufferList, DuplexStream) - -BufferList.prototype._offset = function (offset) { - var tot = 0, i = 0, _t - for (; i < this._bufs.length; i++) { - _t = tot + this._bufs[i].length - if (offset < _t) - return [ i, offset - tot ] - tot = _t - } -} - -BufferList.prototype.append = function (buf) { - this._bufs.push(Buffer.isBuffer(buf) ? buf : new Buffer(buf)) - this.length += buf.length - return this -} - -BufferList.prototype._write = function (buf, encoding, callback) { - this.append(buf) - if (callback) - callback() -} - -BufferList.prototype._read = function (size) { - if (!this.length) - return this.push(null) - size = Math.min(size, this.length) - this.push(this.slice(0, size)) - this.consume(size) -} - -BufferList.prototype.end = function (chunk) { - DuplexStream.prototype.end.call(this, chunk) - - if (this._callback) { - this._callback(null, this.slice()) - this._callback = null - } -} - -BufferList.prototype.get = function (index) { - return this.slice(index, index + 1)[0] -} - -BufferList.prototype.slice = function (start, end) { - return this.copy(null, 0, start, end) -} - -BufferList.prototype.copy = function (dst, dstStart, srcStart, srcEnd) { - if (typeof srcStart != 'number' || srcStart < 0) - srcStart = 0 - if (typeof srcEnd != 'number' || srcEnd > this.length) - srcEnd = this.length - if (srcStart >= this.length) - return dst || new Buffer(0) - if (srcEnd <= 0) - return dst || new Buffer(0) - - var copy = !!dst - , off = this._offset(srcStart) - , len = srcEnd - srcStart - , bytes = len - , bufoff = (copy && dstStart) || 0 - , start = off[1] - , l - , i - - // copy/slice everything - if (srcStart === 0 && srcEnd == this.length) { - if (!copy) // slice, just return a full concat - return Buffer.concat(this._bufs) - - // copy, need to copy individual buffers - for (i = 0; i < this._bufs.length; i++) { - this._bufs[i].copy(dst, bufoff) - bufoff += this._bufs[i].length - } - - return dst - } - - // easy, cheap case where it's a subset of one of the buffers - if (bytes <= this._bufs[off[0]].length - start) { - return copy - ? this._bufs[off[0]].copy(dst, dstStart, start, start + bytes) - : this._bufs[off[0]].slice(start, start + bytes) - } - - if (!copy) // a slice, we need something to copy in to - dst = new Buffer(len) - - for (i = off[0]; i < this._bufs.length; i++) { - l = this._bufs[i].length - start - - if (bytes > l) { - this._bufs[i].copy(dst, bufoff, start) - } else { - this._bufs[i].copy(dst, bufoff, start, start + bytes) - break - } - - bufoff += l - bytes -= l - - if (start) - start = 0 - } - - return dst -} - -BufferList.prototype.toString = function (encoding, start, end) { - return this.slice(start, end).toString(encoding) -} - -BufferList.prototype.consume = function (bytes) { - while (this._bufs.length) { - if (bytes > this._bufs[0].length) { - bytes -= this._bufs[0].length - this.length -= this._bufs[0].length - this._bufs.shift() - } else { - this._bufs[0] = this._bufs[0].slice(bytes) - this.length -= bytes - break - } - } - return this -} - -BufferList.prototype.duplicate = function () { - var i = 0 - , copy = new BufferList() - - for (; i < this._bufs.length; i++) - copy.append(this._bufs[i]) - - return copy -} - -BufferList.prototype.destroy = function () { - this._bufs.length = 0; - this.length = 0; - this.push(null); -} - -;(function () { - var methods = { - 'readDoubleBE' : 8 - , 'readDoubleLE' : 8 - , 'readFloatBE' : 4 - , 'readFloatLE' : 4 - , 'readInt32BE' : 4 - , 'readInt32LE' : 4 - , 'readUInt32BE' : 4 - , 'readUInt32LE' : 4 - , 'readInt16BE' : 2 - , 'readInt16LE' : 2 - , 'readUInt16BE' : 2 - , 'readUInt16LE' : 2 - , 'readInt8' : 1 - , 'readUInt8' : 1 - } - - for (var m in methods) { - (function (m) { - BufferList.prototype[m] = function (offset) { - return this.slice(offset, offset + methods[m])[m](0) - } - }(m)) - } -}()) - -module.exports = BufferList diff --git a/node_modules/browserify-fs/node_modules/levelup/node_modules/bl/package.json b/node_modules/browserify-fs/node_modules/levelup/node_modules/bl/package.json deleted file mode 100644 index 9e88689e..00000000 --- a/node_modules/browserify-fs/node_modules/levelup/node_modules/bl/package.json +++ /dev/null @@ -1,59 +0,0 @@ -{ - "name": "bl", - "version": "0.8.2", - "description": "Buffer List: collect buffers and access with a standard readable Buffer interface, streamable too!", - "main": "bl.js", - "scripts": { - "test": "node test/test.js | faucet", - "test-local": "brtapsauce-local test/basic-test.js" - }, - "repository": { - "type": "git", - "url": "https://github.com/rvagg/bl.git" - }, - "homepage": "https://github.com/rvagg/bl", - "authors": [ - "Rod Vagg (https://github.com/rvagg)", - "Matteo Collina (https://github.com/mcollina)" - ], - "keywords": [ - "buffer", - "buffers", - "stream", - "awesomesauce" - ], - "license": "MIT", - "dependencies": { - "readable-stream": "~1.0.26" - }, - "devDependencies": { - "tape": "~2.12.3", - "hash_file": "~0.1.1", - "faucet": "~0.0.1", - "brtapsauce": "~0.3.0" - }, - "gitHead": "1b67e141ebf47eb0c2ace434bd510286842d9959", - "bugs": { - "url": "https://github.com/rvagg/bl/issues" - }, - "_id": "bl@0.8.2", - "_shasum": "c9b6bca08d1bc2ea00fc8afb4f1a5fd1e1c66e4e", - "_from": "bl@>=0.8.1 <0.9.0", - "_npmVersion": "1.4.14", - "_npmUser": { - "name": "rvagg", - "email": "rod@vagg.org" - }, - "maintainers": [ - { - "name": "rvagg", - "email": "rod@vagg.org" - } - ], - "dist": { - "shasum": "c9b6bca08d1bc2ea00fc8afb4f1a5fd1e1c66e4e", - "tarball": "https://registry.npmjs.org/bl/-/bl-0.8.2.tgz" - }, - "directories": {}, - "_resolved": "https://registry.npmjs.org/bl/-/bl-0.8.2.tgz" -} diff --git a/node_modules/browserify-fs/node_modules/levelup/node_modules/bl/test/basic-test.js b/node_modules/browserify-fs/node_modules/levelup/node_modules/bl/test/basic-test.js deleted file mode 100644 index 129658a1..00000000 --- a/node_modules/browserify-fs/node_modules/levelup/node_modules/bl/test/basic-test.js +++ /dev/null @@ -1,524 +0,0 @@ -var tape = require('tape') - , crypto = require('crypto') - , fs = require('fs') - , hash = require('hash_file') - , BufferList = require('../') - - , encodings = - ('hex utf8 utf-8 ascii binary base64' - + (process.browser ? '' : ' ucs2 ucs-2 utf16le utf-16le')).split(' ') - -tape('single bytes from single buffer', function (t) { - var bl = new BufferList() - bl.append(new Buffer('abcd')) - - t.equal(bl.length, 4) - - t.equal(bl.get(0), 97) - t.equal(bl.get(1), 98) - t.equal(bl.get(2), 99) - t.equal(bl.get(3), 100) - - t.end() -}) - -tape('single bytes from multiple buffers', function (t) { - var bl = new BufferList() - bl.append(new Buffer('abcd')) - bl.append(new Buffer('efg')) - bl.append(new Buffer('hi')) - bl.append(new Buffer('j')) - - t.equal(bl.length, 10) - - t.equal(bl.get(0), 97) - t.equal(bl.get(1), 98) - t.equal(bl.get(2), 99) - t.equal(bl.get(3), 100) - t.equal(bl.get(4), 101) - t.equal(bl.get(5), 102) - t.equal(bl.get(6), 103) - t.equal(bl.get(7), 104) - t.equal(bl.get(8), 105) - t.equal(bl.get(9), 106) - t.end() -}) - -tape('multi bytes from single buffer', function (t) { - var bl = new BufferList() - bl.append(new Buffer('abcd')) - - t.equal(bl.length, 4) - - t.equal(bl.slice(0, 4).toString('ascii'), 'abcd') - t.equal(bl.slice(0, 3).toString('ascii'), 'abc') - t.equal(bl.slice(1, 4).toString('ascii'), 'bcd') - - t.end() -}) - -tape('multiple bytes from multiple buffers', function (t) { - var bl = new BufferList() - - bl.append(new Buffer('abcd')) - bl.append(new Buffer('efg')) - bl.append(new Buffer('hi')) - bl.append(new Buffer('j')) - - t.equal(bl.length, 10) - - t.equal(bl.slice(0, 10).toString('ascii'), 'abcdefghij') - t.equal(bl.slice(3, 10).toString('ascii'), 'defghij') - t.equal(bl.slice(3, 6).toString('ascii'), 'def') - t.equal(bl.slice(3, 8).toString('ascii'), 'defgh') - t.equal(bl.slice(5, 10).toString('ascii'), 'fghij') - - t.end() -}) - -tape('consuming from multiple buffers', function (t) { - var bl = new BufferList() - - bl.append(new Buffer('abcd')) - bl.append(new Buffer('efg')) - bl.append(new Buffer('hi')) - bl.append(new Buffer('j')) - - t.equal(bl.length, 10) - - t.equal(bl.slice(0, 10).toString('ascii'), 'abcdefghij') - - bl.consume(3) - t.equal(bl.length, 7) - t.equal(bl.slice(0, 7).toString('ascii'), 'defghij') - - bl.consume(2) - t.equal(bl.length, 5) - t.equal(bl.slice(0, 5).toString('ascii'), 'fghij') - - bl.consume(1) - t.equal(bl.length, 4) - t.equal(bl.slice(0, 4).toString('ascii'), 'ghij') - - bl.consume(1) - t.equal(bl.length, 3) - t.equal(bl.slice(0, 3).toString('ascii'), 'hij') - - bl.consume(2) - t.equal(bl.length, 1) - t.equal(bl.slice(0, 1).toString('ascii'), 'j') - - t.end() -}) - -tape('test readUInt8 / readInt8', function (t) { - var buf1 = new Buffer(1) - , buf2 = new Buffer(3) - , buf3 = new Buffer(3) - , bl = new BufferList() - - buf2[1] = 0x3 - buf2[2] = 0x4 - buf3[0] = 0x23 - buf3[1] = 0x42 - - bl.append(buf1) - bl.append(buf2) - bl.append(buf3) - - t.equal(bl.readUInt8(2), 0x3) - t.equal(bl.readInt8(2), 0x3) - t.equal(bl.readUInt8(3), 0x4) - t.equal(bl.readInt8(3), 0x4) - t.equal(bl.readUInt8(4), 0x23) - t.equal(bl.readInt8(4), 0x23) - t.equal(bl.readUInt8(5), 0x42) - t.equal(bl.readInt8(5), 0x42) - t.end() -}) - -tape('test readUInt16LE / readUInt16BE / readInt16LE / readInt16BE', function (t) { - var buf1 = new Buffer(1) - , buf2 = new Buffer(3) - , buf3 = new Buffer(3) - , bl = new BufferList() - - buf2[1] = 0x3 - buf2[2] = 0x4 - buf3[0] = 0x23 - buf3[1] = 0x42 - - bl.append(buf1) - bl.append(buf2) - bl.append(buf3) - - t.equal(bl.readUInt16BE(2), 0x0304) - t.equal(bl.readUInt16LE(2), 0x0403) - t.equal(bl.readInt16BE(2), 0x0304) - t.equal(bl.readInt16LE(2), 0x0403) - t.equal(bl.readUInt16BE(3), 0x0423) - t.equal(bl.readUInt16LE(3), 0x2304) - t.equal(bl.readInt16BE(3), 0x0423) - t.equal(bl.readInt16LE(3), 0x2304) - t.equal(bl.readUInt16BE(4), 0x2342) - t.equal(bl.readUInt16LE(4), 0x4223) - t.equal(bl.readInt16BE(4), 0x2342) - t.equal(bl.readInt16LE(4), 0x4223) - t.end() -}) - -tape('test readUInt32LE / readUInt32BE / readInt32LE / readInt32BE', function (t) { - var buf1 = new Buffer(1) - , buf2 = new Buffer(3) - , buf3 = new Buffer(3) - , bl = new BufferList() - - buf2[1] = 0x3 - buf2[2] = 0x4 - buf3[0] = 0x23 - buf3[1] = 0x42 - - bl.append(buf1) - bl.append(buf2) - bl.append(buf3) - - t.equal(bl.readUInt32BE(2), 0x03042342) - t.equal(bl.readUInt32LE(2), 0x42230403) - t.equal(bl.readInt32BE(2), 0x03042342) - t.equal(bl.readInt32LE(2), 0x42230403) - t.end() -}) - -tape('test readFloatLE / readFloatBE', function (t) { - var buf1 = new Buffer(1) - , buf2 = new Buffer(3) - , buf3 = new Buffer(3) - , bl = new BufferList() - - buf2[1] = 0x00 - buf2[2] = 0x00 - buf3[0] = 0x80 - buf3[1] = 0x3f - - bl.append(buf1) - bl.append(buf2) - bl.append(buf3) - - t.equal(bl.readFloatLE(2), 0x01) - t.end() -}) - -tape('test readDoubleLE / readDoubleBE', function (t) { - var buf1 = new Buffer(1) - , buf2 = new Buffer(3) - , buf3 = new Buffer(10) - , bl = new BufferList() - - buf2[1] = 0x55 - buf2[2] = 0x55 - buf3[0] = 0x55 - buf3[1] = 0x55 - buf3[2] = 0x55 - buf3[3] = 0x55 - buf3[4] = 0xd5 - buf3[5] = 0x3f - - bl.append(buf1) - bl.append(buf2) - bl.append(buf3) - - t.equal(bl.readDoubleLE(2), 0.3333333333333333) - t.end() -}) - -tape('test toString', function (t) { - var bl = new BufferList() - - bl.append(new Buffer('abcd')) - bl.append(new Buffer('efg')) - bl.append(new Buffer('hi')) - bl.append(new Buffer('j')) - - t.equal(bl.toString('ascii', 0, 10), 'abcdefghij') - t.equal(bl.toString('ascii', 3, 10), 'defghij') - t.equal(bl.toString('ascii', 3, 6), 'def') - t.equal(bl.toString('ascii', 3, 8), 'defgh') - t.equal(bl.toString('ascii', 5, 10), 'fghij') - - t.end() -}) - -tape('test toString encoding', function (t) { - var bl = new BufferList() - , b = new Buffer('abcdefghij\xff\x00') - - bl.append(new Buffer('abcd')) - bl.append(new Buffer('efg')) - bl.append(new Buffer('hi')) - bl.append(new Buffer('j')) - bl.append(new Buffer('\xff\x00')) - - encodings.forEach(function (enc) { - t.equal(bl.toString(enc), b.toString(enc), enc) - }) - - t.end() -}) - -!process.browser && tape('test stream', function (t) { - var random = crypto.randomBytes(65534) - , rndhash = hash(random, 'md5') - , md5sum = crypto.createHash('md5') - , bl = new BufferList(function (err, buf) { - t.ok(Buffer.isBuffer(buf)) - t.ok(err === null) - t.equal(rndhash, hash(bl.slice(), 'md5')) - t.equal(rndhash, hash(buf, 'md5')) - - bl.pipe(fs.createWriteStream('/tmp/bl_test_rnd_out.dat')) - .on('close', function () { - var s = fs.createReadStream('/tmp/bl_test_rnd_out.dat') - s.on('data', md5sum.update.bind(md5sum)) - s.on('end', function() { - t.equal(rndhash, md5sum.digest('hex'), 'woohoo! correct hash!') - t.end() - }) - }) - - }) - - fs.writeFileSync('/tmp/bl_test_rnd.dat', random) - fs.createReadStream('/tmp/bl_test_rnd.dat').pipe(bl) -}) - -tape('instantiation with Buffer', function (t) { - var buf = crypto.randomBytes(1024) - , buf2 = crypto.randomBytes(1024) - , b = BufferList(buf) - - t.equal(buf.toString('hex'), b.slice().toString('hex'), 'same buffer') - b = BufferList([ buf, buf2 ]) - t.equal(b.slice().toString('hex'), Buffer.concat([ buf, buf2 ]).toString('hex'), 'same buffer') - t.end() -}) - -tape('test String appendage', function (t) { - var bl = new BufferList() - , b = new Buffer('abcdefghij\xff\x00') - - bl.append('abcd') - bl.append('efg') - bl.append('hi') - bl.append('j') - bl.append('\xff\x00') - - encodings.forEach(function (enc) { - t.equal(bl.toString(enc), b.toString(enc)) - }) - - t.end() -}) - -tape('write nothing, should get empty buffer', function (t) { - t.plan(3) - BufferList(function (err, data) { - t.notOk(err, 'no error') - t.ok(Buffer.isBuffer(data), 'got a buffer') - t.equal(0, data.length, 'got a zero-length buffer') - t.end() - }).end() -}) - -tape('unicode string', function (t) { - t.plan(2) - var inp1 = '\u2600' - , inp2 = '\u2603' - , exp = inp1 + ' and ' + inp2 - , bl = BufferList() - bl.write(inp1) - bl.write(' and ') - bl.write(inp2) - t.equal(exp, bl.toString()) - t.equal(new Buffer(exp).toString('hex'), bl.toString('hex')) -}) - -tape('should emit finish', function (t) { - var source = BufferList() - , dest = BufferList() - - source.write('hello') - source.pipe(dest) - - dest.on('finish', function () { - t.equal(dest.toString('utf8'), 'hello') - t.end() - }) -}) - -tape('basic copy', function (t) { - var buf = crypto.randomBytes(1024) - , buf2 = new Buffer(1024) - , b = BufferList(buf) - - b.copy(buf2) - t.equal(b.slice().toString('hex'), buf2.toString('hex'), 'same buffer') - t.end() -}) - -tape('copy after many appends', function (t) { - var buf = crypto.randomBytes(512) - , buf2 = new Buffer(1024) - , b = BufferList(buf) - - b.append(buf) - b.copy(buf2) - t.equal(b.slice().toString('hex'), buf2.toString('hex'), 'same buffer') - t.end() -}) - -tape('copy at a precise position', function (t) { - var buf = crypto.randomBytes(1004) - , buf2 = new Buffer(1024) - , b = BufferList(buf) - - b.copy(buf2, 20) - t.equal(b.slice().toString('hex'), buf2.slice(20).toString('hex'), 'same buffer') - t.end() -}) - -tape('copy starting from a precise location', function (t) { - var buf = crypto.randomBytes(10) - , buf2 = new Buffer(5) - , b = BufferList(buf) - - b.copy(buf2, 0, 5) - t.equal(b.slice(5).toString('hex'), buf2.toString('hex'), 'same buffer') - t.end() -}) - -tape('copy in an interval', function (t) { - var rnd = crypto.randomBytes(10) - , b = BufferList(rnd) // put the random bytes there - , actual = new Buffer(3) - , expected = new Buffer(3) - - rnd.copy(expected, 0, 5, 8) - b.copy(actual, 0, 5, 8) - - t.equal(actual.toString('hex'), expected.toString('hex'), 'same buffer') - t.end() -}) - -tape('copy an interval between two buffers', function (t) { - var buf = crypto.randomBytes(10) - , buf2 = new Buffer(10) - , b = BufferList(buf) - - b.append(buf) - b.copy(buf2, 0, 5, 15) - - t.equal(b.slice(5, 15).toString('hex'), buf2.toString('hex'), 'same buffer') - t.end() -}) - -tape('duplicate', function (t) { - t.plan(2) - - var bl = new BufferList('abcdefghij\xff\x00') - , dup = bl.duplicate() - - t.equal(bl.prototype, dup.prototype) - t.equal(bl.toString('hex'), dup.toString('hex')) -}) - -tape('destroy no pipe', function (t) { - t.plan(2) - - var bl = new BufferList('alsdkfja;lsdkfja;lsdk') - bl.destroy() - - t.equal(bl._bufs.length, 0) - t.equal(bl.length, 0) -}) - -!process.browser && tape('destroy with pipe before read end', function (t) { - t.plan(2) - - var bl = new BufferList() - fs.createReadStream(__dirname + '/sauce.js') - .pipe(bl) - - bl.destroy() - - t.equal(bl._bufs.length, 0) - t.equal(bl.length, 0) - -}) - -!process.browser && tape('destroy with pipe before read end with race', function (t) { - t.plan(2) - - var bl = new BufferList() - fs.createReadStream(__dirname + '/sauce.js') - .pipe(bl) - - setTimeout(function () { - bl.destroy() - setTimeout(function () { - t.equal(bl._bufs.length, 0) - t.equal(bl.length, 0) - }, 500) - }, 500) -}) - -!process.browser && tape('destroy with pipe after read end', function (t) { - t.plan(2) - - var bl = new BufferList() - fs.createReadStream(__dirname + '/sauce.js') - .on('end', onEnd) - .pipe(bl) - - function onEnd () { - bl.destroy() - - t.equal(bl._bufs.length, 0) - t.equal(bl.length, 0) - } -}) - -!process.browser && tape('destroy with pipe while writing to a destination', function (t) { - t.plan(4) - - var bl = new BufferList() - , ds = new BufferList() - - fs.createReadStream(__dirname + '/sauce.js') - .on('end', onEnd) - .pipe(bl) - - function onEnd () { - bl.pipe(ds) - - setTimeout(function () { - bl.destroy() - - t.equals(bl._bufs.length, 0) - t.equals(bl.length, 0) - - ds.destroy() - - t.equals(bl._bufs.length, 0) - t.equals(bl.length, 0) - - }, 100) - } -}) - -!process.browser && tape('handle error', function (t) { - t.plan(2) - fs.createReadStream('/does/not/exist').pipe(BufferList(function (err, data) { - t.ok(err instanceof Error, 'has error') - t.notOk(data, 'no data') - })) -}) diff --git a/node_modules/browserify-fs/node_modules/levelup/node_modules/bl/test/sauce.js b/node_modules/browserify-fs/node_modules/levelup/node_modules/bl/test/sauce.js deleted file mode 100644 index a6d28625..00000000 --- a/node_modules/browserify-fs/node_modules/levelup/node_modules/bl/test/sauce.js +++ /dev/null @@ -1,38 +0,0 @@ -#!/usr/bin/env node - -const user = process.env.SAUCE_USER - , key = process.env.SAUCE_KEY - , path = require('path') - , brtapsauce = require('brtapsauce') - , testFile = path.join(__dirname, 'basic-test.js') - - , capabilities = [ - { browserName: 'chrome' , platform: 'Windows XP', version: '' } - , { browserName: 'firefox' , platform: 'Windows 8' , version: '' } - , { browserName: 'firefox' , platform: 'Windows XP', version: '4' } - , { browserName: 'internet explorer' , platform: 'Windows 8' , version: '10' } - , { browserName: 'internet explorer' , platform: 'Windows 7' , version: '9' } - , { browserName: 'internet explorer' , platform: 'Windows 7' , version: '8' } - , { browserName: 'internet explorer' , platform: 'Windows XP', version: '7' } - , { browserName: 'internet explorer' , platform: 'Windows XP', version: '6' } - , { browserName: 'safari' , platform: 'Windows 7' , version: '5' } - , { browserName: 'safari' , platform: 'OS X 10.8' , version: '6' } - , { browserName: 'opera' , platform: 'Windows 7' , version: '' } - , { browserName: 'opera' , platform: 'Windows 7' , version: '11' } - , { browserName: 'ipad' , platform: 'OS X 10.8' , version: '6' } - , { browserName: 'android' , platform: 'Linux' , version: '4.0', 'device-type': 'tablet' } - ] - -if (!user) - throw new Error('Must set a SAUCE_USER env var') -if (!key) - throw new Error('Must set a SAUCE_KEY env var') - -brtapsauce({ - name : 'Traversty' - , user : user - , key : key - , brsrc : testFile - , capabilities : capabilities - , options : { timeout: 60 * 6 } -}) \ No newline at end of file diff --git a/node_modules/browserify-fs/node_modules/levelup/node_modules/bl/test/test.js b/node_modules/browserify-fs/node_modules/levelup/node_modules/bl/test/test.js deleted file mode 100644 index aa9b4877..00000000 --- a/node_modules/browserify-fs/node_modules/levelup/node_modules/bl/test/test.js +++ /dev/null @@ -1,9 +0,0 @@ -require('./basic-test') - -if (!process.env.SAUCE_KEY || !process.env.SAUCE_USER) - return console.log('SAUCE_KEY and/or SAUCE_USER not set, not running sauce tests') - -if (!/v0\.10/.test(process.version)) - return console.log('Not Node v0.10.x, not running sauce tests') - -require('./sauce.js') \ No newline at end of file diff --git a/node_modules/browserify-fs/node_modules/levelup/node_modules/deferred-leveldown/.jshintrc b/node_modules/browserify-fs/node_modules/levelup/node_modules/deferred-leveldown/.jshintrc deleted file mode 100644 index 79376508..00000000 --- a/node_modules/browserify-fs/node_modules/levelup/node_modules/deferred-leveldown/.jshintrc +++ /dev/null @@ -1,59 +0,0 @@ -{ - "predef": [ ] - , "bitwise": false - , "camelcase": false - , "curly": false - , "eqeqeq": false - , "forin": false - , "immed": false - , "latedef": false - , "noarg": true - , "noempty": true - , "nonew": true - , "plusplus": false - , "quotmark": true - , "regexp": false - , "undef": true - , "unused": true - , "strict": false - , "trailing": true - , "maxlen": 120 - , "asi": true - , "boss": true - , "debug": true - , "eqnull": true - , "esnext": true - , "evil": true - , "expr": true - , "funcscope": false - , "globalstrict": false - , "iterator": false - , "lastsemic": true - , "laxbreak": true - , "laxcomma": true - , "loopfunc": true - , "multistr": false - , "onecase": false - , "proto": false - , "regexdash": false - , "scripturl": true - , "smarttabs": false - , "shadow": false - , "sub": true - , "supernew": false - , "validthis": true - , "browser": true - , "couch": false - , "devel": false - , "dojo": false - , "mootools": false - , "node": true - , "nonstandard": true - , "prototypejs": false - , "rhino": false - , "worker": true - , "wsh": false - , "nomen": false - , "onevar": true - , "passfail": false -} \ No newline at end of file diff --git a/node_modules/browserify-fs/node_modules/levelup/node_modules/deferred-leveldown/.npmignore b/node_modules/browserify-fs/node_modules/levelup/node_modules/deferred-leveldown/.npmignore deleted file mode 100644 index c2658d7d..00000000 --- a/node_modules/browserify-fs/node_modules/levelup/node_modules/deferred-leveldown/.npmignore +++ /dev/null @@ -1 +0,0 @@ -node_modules/ diff --git a/node_modules/browserify-fs/node_modules/levelup/node_modules/deferred-leveldown/.travis.yml b/node_modules/browserify-fs/node_modules/levelup/node_modules/deferred-leveldown/.travis.yml deleted file mode 100644 index 1fec2ab9..00000000 --- a/node_modules/browserify-fs/node_modules/levelup/node_modules/deferred-leveldown/.travis.yml +++ /dev/null @@ -1,12 +0,0 @@ -language: node_js -node_js: - - "0.8" - - "0.10" - - "0.11" -branches: - only: - - master -notifications: - email: - - rod@vagg.org -script: npm test diff --git a/node_modules/browserify-fs/node_modules/levelup/node_modules/deferred-leveldown/README.md b/node_modules/browserify-fs/node_modules/levelup/node_modules/deferred-leveldown/README.md deleted file mode 100644 index 861b79ca..00000000 --- a/node_modules/browserify-fs/node_modules/levelup/node_modules/deferred-leveldown/README.md +++ /dev/null @@ -1,55 +0,0 @@ -DeferredLevelDOWN -================= - -**A mock LevelDOWN implementation that queues operations while a real LevelDOWN instance is being opened.** - -![LevelDB Logo](https://twimg0-a.akamaihd.net/profile_images/3360574989/92fc472928b444980408147e5e5db2fa_bigger.png) - -[![Build Status](https://secure.travis-ci.org/Level/deferred-leveldown.png)](http://travis-ci.org/rvagg/deferred-leveldown) - -[![NPM](https://nodei.co/npm/deferred-leveldown.png?compact)](https://nodei.co/npm/deferred-leveldown/) - -**DeferredLevelDOWN** implements the basic [AbstractLevelDOWN](https://github.com/rvagg/node-abstract-leveldown) API so it can be used as a drop-in replacement where LevelDOWN is needed. - -`put()`, `get()`, `del()` and `batch()` operations are all queued and kept in memory until a new LevelDOWN-compatible object can be supplied. - -The `setDb(db)` method is used to supply a new LevelDOWN object. Once received, all queued operations are replayed against that object, in order. - -`batch()` operations will all be replayed as the array form. Chained-batch operations are converted before being stored. - -Contributing ------------- - -DeferredLevelDOWN is an **OPEN Open Source Project**. This means that: - -> Individuals making significant and valuable contributions are given commit-access to the project to contribute as they see fit. This project is more like an open wiki than a standard guarded open source project. - -See the [CONTRIBUTING.md](https://github.com/rvagg/node-levelup/blob/master/CONTRIBUTING.md) file for more details. - -### Contributors - -DeferredLevelDOWN is only possible due to the excellent work of the following contributors: - - - - - - - - - - - - - - - -
    Rod VaggGitHub/rvaggTwitter/@rvagg
    John ChesleyGitHub/cheslesTwitter/@chesles
    Jake VerbatenGitHub/raynosTwitter/@raynos2
    Dominic TarrGitHub/dominictarrTwitter/@dominictarr
    Max OgdenGitHub/maxogdenTwitter/@maxogden
    Lars-Magnus SkogGitHub/ralphtheninjaTwitter/@ralphtheninja
    David BjörklundGitHub/keslaTwitter/@david_bjorklund
    Julian GruberGitHub/juliangruberTwitter/@juliangruber
    Paolo FragomeniGitHub/hij1nxTwitter/@hij1nx
    Anton WhalleyGitHub/No9Twitter/@antonwhalley
    Matteo CollinaGitHub/mcollinaTwitter/@matteocollina
    Pedro TeixeiraGitHub/pgteTwitter/@pgte
    James HallidayGitHub/substackTwitter/@substack
    - - -Licence & copyright -------------------- - -Copyright (c) 2013 DeferredLevelDOWN contributors (listed above). - -DeferredLevelDOWN is licensed under an MIT +no-false-attribs license. All rights not explicitly granted in the MIT license are reserved. See the included LICENSE file for more details. diff --git a/node_modules/browserify-fs/node_modules/levelup/node_modules/deferred-leveldown/deferred-leveldown.js b/node_modules/browserify-fs/node_modules/levelup/node_modules/deferred-leveldown/deferred-leveldown.js deleted file mode 100644 index 93184f34..00000000 --- a/node_modules/browserify-fs/node_modules/levelup/node_modules/deferred-leveldown/deferred-leveldown.js +++ /dev/null @@ -1,47 +0,0 @@ -var util = require('util') - , AbstractLevelDOWN = require('abstract-leveldown').AbstractLevelDOWN - -function DeferredLevelDOWN (location) { - AbstractLevelDOWN.call(this, typeof location == 'string' ? location : '') // optional location, who cares? - this._db = undefined - this._operations = [] -} - -util.inherits(DeferredLevelDOWN, AbstractLevelDOWN) - -// called by LevelUP when we have a real DB to take its place -DeferredLevelDOWN.prototype.setDb = function (db) { - this._db = db - this._operations.forEach(function (op) { - db[op.method].apply(db, op.args) - }) -} - -DeferredLevelDOWN.prototype._open = function (options, callback) { - return process.nextTick(callback) -} - -// queue a new deferred operation -DeferredLevelDOWN.prototype._operation = function (method, args) { - if (this._db) - return this._db[method].apply(this._db, args) - this._operations.push({ method: method, args: args }) -} - -// deferrables -'put get del batch approximateSize'.split(' ').forEach(function (m) { - DeferredLevelDOWN.prototype['_' + m] = function () { - this._operation(m, arguments) - } -}) - -DeferredLevelDOWN.prototype._isBuffer = function (obj) { - return Buffer.isBuffer(obj) -} - -// don't need to implement this as LevelUP's ReadStream checks for 'ready' state -DeferredLevelDOWN.prototype._iterator = function () { - throw new TypeError('not implemented') -} - -module.exports = DeferredLevelDOWN diff --git a/node_modules/browserify-fs/node_modules/levelup/node_modules/deferred-leveldown/node_modules/abstract-leveldown/.jshintrc b/node_modules/browserify-fs/node_modules/levelup/node_modules/deferred-leveldown/node_modules/abstract-leveldown/.jshintrc deleted file mode 100644 index ba4514a5..00000000 --- a/node_modules/browserify-fs/node_modules/levelup/node_modules/deferred-leveldown/node_modules/abstract-leveldown/.jshintrc +++ /dev/null @@ -1,60 +0,0 @@ -{ - "predef": [ ] - , "bitwise": false - , "camelcase": false - , "curly": false - , "eqeqeq": false - , "forin": false - , "immed": false - , "latedef": false - , "newcap": true - , "noarg": true - , "noempty": true - , "nonew": true - , "plusplus": false - , "quotmark": true - , "regexp": false - , "undef": true - , "unused": true - , "strict": false - , "trailing": true - , "maxlen": 120 - , "asi": true - , "boss": true - , "debug": true - , "eqnull": true - , "esnext": true - , "evil": true - , "expr": true - , "funcscope": false - , "globalstrict": false - , "iterator": false - , "lastsemic": true - , "laxbreak": true - , "laxcomma": true - , "loopfunc": true - , "multistr": false - , "onecase": false - , "proto": false - , "regexdash": false - , "scripturl": true - , "smarttabs": false - , "shadow": false - , "sub": true - , "supernew": false - , "validthis": true - , "browser": true - , "couch": false - , "devel": false - , "dojo": false - , "mootools": false - , "node": true - , "nonstandard": true - , "prototypejs": false - , "rhino": false - , "worker": true - , "wsh": false - , "nomen": false - , "onevar": true - , "passfail": false -} \ No newline at end of file diff --git a/node_modules/browserify-fs/node_modules/levelup/node_modules/deferred-leveldown/node_modules/abstract-leveldown/.npmignore b/node_modules/browserify-fs/node_modules/levelup/node_modules/deferred-leveldown/node_modules/abstract-leveldown/.npmignore deleted file mode 100644 index 3c3629e6..00000000 --- a/node_modules/browserify-fs/node_modules/levelup/node_modules/deferred-leveldown/node_modules/abstract-leveldown/.npmignore +++ /dev/null @@ -1 +0,0 @@ -node_modules diff --git a/node_modules/browserify-fs/node_modules/levelup/node_modules/deferred-leveldown/node_modules/abstract-leveldown/.travis.yml b/node_modules/browserify-fs/node_modules/levelup/node_modules/deferred-leveldown/node_modules/abstract-leveldown/.travis.yml deleted file mode 100644 index fe3f4eb1..00000000 --- a/node_modules/browserify-fs/node_modules/levelup/node_modules/deferred-leveldown/node_modules/abstract-leveldown/.travis.yml +++ /dev/null @@ -1,10 +0,0 @@ -language: node_js -node_js: - - 0.8 - - "0.10" -branches: - only: - - master -notifications: - email: - - rod@vagg.org diff --git a/node_modules/browserify-fs/node_modules/levelup/node_modules/deferred-leveldown/node_modules/abstract-leveldown/CHANGELOG.md b/node_modules/browserify-fs/node_modules/levelup/node_modules/deferred-leveldown/node_modules/abstract-leveldown/CHANGELOG.md deleted file mode 100644 index 89c90135..00000000 --- a/node_modules/browserify-fs/node_modules/levelup/node_modules/deferred-leveldown/node_modules/abstract-leveldown/CHANGELOG.md +++ /dev/null @@ -1,18 +0,0 @@ -### 0.11.1 - Nov 15 2013 - * Adjust approximate-size-test.js to account for snappy compression - -### 0.11.0 - Oct 14 2013 - * Introduce _setupIteratorOptions() method to fix options object prior to _iterator() call; makes working with gt/gte/lt/lte options a little easier (@rvagg) - -### 0.10.2 - Sep 6 2013 - - * Refactor duplicated versions of isTypedArray into util.js (@rvagg) - * Refactor duplicated versions of 'NotFound' checks into util.js, fixed too-strict version in get-test.js (@rvagg) - -### 0.10.1 - Aug 29 2013 - - * Relax check for 'Not Found: ' in error message to be case insensitive in get-test.js (@rvagg) - -### 0.10.0 - Aug 19 2013 - - * Added test for gt, gte, lt, lte ranges (@dominictarr) diff --git a/node_modules/browserify-fs/node_modules/levelup/node_modules/deferred-leveldown/node_modules/abstract-leveldown/CONTRIBUTING.md b/node_modules/browserify-fs/node_modules/levelup/node_modules/deferred-leveldown/node_modules/abstract-leveldown/CONTRIBUTING.md deleted file mode 100644 index 2641fd0d..00000000 --- a/node_modules/browserify-fs/node_modules/levelup/node_modules/deferred-leveldown/node_modules/abstract-leveldown/CONTRIBUTING.md +++ /dev/null @@ -1,27 +0,0 @@ -# LevelUP is an OPEN Open Source Project - ------------------------------------------ - -## What? - -Individuals making significant and valuable contributions are given commit-access to the project to contribute as they see fit. This project is more like an open wiki than a standard guarded open source project. - -## Rules - -There are a few basic ground-rules for contributors: - -1. **No `--force` pushes** or modifying the Git history in any way. -1. **Non-master branches** ought to be used for ongoing work. -1. **External API changes and significant modifications** ought to be subject to an **internal pull-request** to solicit feedback from other contributors. -1. Internal pull-requests to solicit feedback are *encouraged* for any other non-trivial contribution but left to the discretion of the contributor. -1. Contributors should attempt to adhere to the prevailing code-style. - -## Releases - -Declaring formal releases remains the prerogative of the project maintainer. - -## Changes to this arrangement - -This is an experiment and feedback is welcome! This document may also be subject to pull-requests or changes by contributors where you believe you have something valuable to add or change. - ------------------------------------------ diff --git a/node_modules/browserify-fs/node_modules/levelup/node_modules/deferred-leveldown/node_modules/abstract-leveldown/LICENSE.md b/node_modules/browserify-fs/node_modules/levelup/node_modules/deferred-leveldown/node_modules/abstract-leveldown/LICENSE.md deleted file mode 100644 index 29b95e39..00000000 --- a/node_modules/browserify-fs/node_modules/levelup/node_modules/deferred-leveldown/node_modules/abstract-leveldown/LICENSE.md +++ /dev/null @@ -1,11 +0,0 @@ -The MIT License (MIT) -===================== - -Copyright (c) 2014 Rod Vagg ---------------------------- - -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/node_modules/browserify-fs/node_modules/levelup/node_modules/deferred-leveldown/node_modules/abstract-leveldown/README.md b/node_modules/browserify-fs/node_modules/levelup/node_modules/deferred-leveldown/node_modules/abstract-leveldown/README.md deleted file mode 100644 index cae74f91..00000000 --- a/node_modules/browserify-fs/node_modules/levelup/node_modules/deferred-leveldown/node_modules/abstract-leveldown/README.md +++ /dev/null @@ -1,159 +0,0 @@ -# Abstract LevelDOWN [![Build Status](https://secure.travis-ci.org/rvagg/abstract-leveldown.png)](http://travis-ci.org/rvagg/abstract-leveldown) - -[![NPM](https://nodei.co/npm/abstract-leveldown.png?downloads=true&downloadRank=true)](https://nodei.co/npm/abstract-leveldown/) -[![NPM](https://nodei.co/npm-dl/abstract-leveldown.png?months=6&height=3)](https://nodei.co/npm/abstract-leveldown/) - -An abstract prototype matching the **[LevelDOWN](https://github.com/rvagg/node-leveldown/)** API. Useful for extending **[LevelUP](https://github.com/rvagg/node-levelup)** functionality by providing a replacement to LevelDOWN. - -As of version 0.7, LevelUP allows you to pass a `'db'` option when you create a new instance. This will override the default LevelDOWN store with a LevelDOWN API compatible object. - -**Abstract LevelDOWN** provides a simple, operational *noop* base prototype that's ready for extending. By default, all operations have sensible "noops" (operations that essentially do nothing). For example, simple operations such as `.open(callback)` and `.close(callback)` will simply invoke the callback (on a *next tick*). More complex operations perform sensible actions, for example: `.get(key, callback)` will always return a `'NotFound'` `Error` on the callback. - -You add functionality by implementing the underscore versions of the operations. For example, to implement a `put()` operation you add a `_put()` method to your object. Each of these underscore methods override the default *noop* operations and are always provided with **consistent arguments**, regardless of what is passed in by the client. - -Additionally, all methods provide argument checking and sensible defaults for optional arguments. All bad-argument errors are compatible with LevelDOWN (they pass the LevelDOWN method arguments tests). For example, if you call `.open()` without a callback argument you'll get an `Error('open() requires a callback argument')`. Where optional arguments are involved, your underscore methods will receive sensible defaults. A `.get(key, callback)` will pass through to a `._get(key, options, callback)` where the `options` argument is an empty object. - -## Example - -A simplistic in-memory LevelDOWN replacement - -```js -var util = require('util') - , AbstractLevelDOWN = require('./').AbstractLevelDOWN - -// constructor, passes through the 'location' argument to the AbstractLevelDOWN constructor -function FakeLevelDOWN (location) { - AbstractLevelDOWN.call(this, location) -} - -// our new prototype inherits from AbstractLevelDOWN -util.inherits(FakeLevelDOWN, AbstractLevelDOWN) - -// implement some methods - -FakeLevelDOWN.prototype._open = function (options, callback) { - // initialise a memory storage object - this._store = {} - // optional use of nextTick to be a nice async citizen - process.nextTick(function () { callback(null, this) }.bind(this)) -} - -FakeLevelDOWN.prototype._put = function (key, value, options, callback) { - key = '_' + key // safety, to avoid key='__proto__'-type skullduggery - this._store[key] = value - process.nextTick(callback) -} - -FakeLevelDOWN.prototype._get = function (key, options, callback) { - var value = this._store['_' + key] - if (value === undefined) { - // 'NotFound' error, consistent with LevelDOWN API - return process.nextTick(function () { callback(new Error('NotFound')) }) - } - process.nextTick(function () { - callback(null, value) - }) -} - -FakeLevelDOWN.prototype._del = function (key, options, callback) { - delete this._store['_' + key] - process.nextTick(callback) -} - -// now use it in LevelUP - -var levelup = require('levelup') - -var db = levelup('/who/cares/', { - // the 'db' option replaces LevelDOWN - db: function (location) { return new FakeLevelDOWN(location) } -}) - -db.put('foo', 'bar', function (err) { - if (err) throw err - db.get('foo', function (err, value) { - if (err) throw err - console.log('Got foo =', value) - }) -}) -``` - -See [MemDOWN](https://github.com/rvagg/memdown/) if you are looking for a complete in-memory replacement for LevelDOWN. - -## Extensible API - -Remember that each of these methods, if you implement them, will receive exactly the number and order of arguments described. Optional arguments will be converted to sensible defaults. - -### AbstractLevelDOWN(location) -### AbstractLevelDOWN#_open(options, callback) -### AbstractLevelDOWN#_close(callback) -### AbstractLevelDOWN#_get(key, options, callback) -### AbstractLevelDOWN#_put(key, value, options, callback) -### AbstractLevelDOWN#_del(key, options, callback) -### AbstractLevelDOWN#_batch(array, options, callback) - -If `batch()` is called without argument or with only an options object then it should return a `Batch` object with chainable methods. Otherwise it will invoke a classic batch operation. - -### AbstractLevelDOWN#_chainedBatch() - -By default an `batch()` operation without argument returns a blank `AbstractChainedBatch` object. The prototype is available on the main exports for you to extend. If you want to implement chainable batch operations then you should extend the `AbstractChaindBatch` and return your object in the `_chainedBatch()` method. - -### AbstractLevelDOWN#_approximateSize(start, end, callback) -### AbstractLevelDOWN#_iterator(options) - -By default an `iterator()` operation returns a blank `AbstractIterator` object. The prototype is available on the main exports for you to extend. If you want to implement iterator operations then you should extend the `AbstractIterator` and return your object in the `_iterator(options)` method. - -`AbstractIterator` implements the basic state management found in LevelDOWN. It keeps track of when a `next()` is in progress and when an `end()` has been called so it doesn't allow concurrent `next()` calls, it does it allow `end()` while a `next()` is in progress and it doesn't allow either `next()` or `end()` after `end()` has been called. - -### AbstractIterator(db) - -Provided with the current instance of `AbstractLevelDOWN` by default. - -### AbstractIterator#_next(callback) -### AbstractIterator#_end(callback) - -### AbstractChainedBatch -Provided with the current instance of `AbstractLevelDOWN` by default. - -### AbstractChainedBatch#_put(key, value) -### AbstractChainedBatch#_del(key) -### AbstractChainedBatch#_clear() -### AbstractChainedBatch#_write(options, callback) - - -Contributing ------------- - -Abstract LevelDOWN is an **OPEN Open Source Project**. This means that: - -> Individuals making significant and valuable contributions are given commit-access to the project to contribute as they see fit. This project is more like an open wiki than a standard guarded open source project. - -See the [CONTRIBUTING.md](https://github.com/rvagg/node-levelup/blob/master/CONTRIBUTING.md) file for more details. - -### Contributors - -Abstract LevelDOWN is only possible due to the excellent work of the following contributors: - - - - - - - - - - - - - - - -
    Rod VaggGitHub/rvaggTwitter/@rvagg
    John ChesleyGitHub/cheslesTwitter/@chesles
    Jake VerbatenGitHub/raynosTwitter/@raynos2
    Dominic TarrGitHub/dominictarrTwitter/@dominictarr
    Max OgdenGitHub/maxogdenTwitter/@maxogden
    Lars-Magnus SkogGitHub/ralphtheninjaTwitter/@ralphtheninja
    David BjörklundGitHub/keslaTwitter/@david_bjorklund
    Julian GruberGitHub/juliangruberTwitter/@juliangruber
    Paolo FragomeniGitHub/hij1nxTwitter/@hij1nx
    Anton WhalleyGitHub/No9Twitter/@antonwhalley
    Matteo CollinaGitHub/mcollinaTwitter/@matteocollina
    Pedro TeixeiraGitHub/pgteTwitter/@pgte
    James HallidayGitHub/substackTwitter/@substack
    - - -License & copyright -------------------- - -Copyright (c) 2012-2014 Abstract LevelDOWN contributors (listed above). - -Abstract LevelDOWN is licensed under the MIT license. All rights not explicitly granted in the MIT license are reserved. See the included LICENSE.md file for more details. diff --git a/node_modules/browserify-fs/node_modules/levelup/node_modules/deferred-leveldown/node_modules/abstract-leveldown/abstract-chained-batch.js b/node_modules/browserify-fs/node_modules/levelup/node_modules/deferred-leveldown/node_modules/abstract-leveldown/abstract-chained-batch.js deleted file mode 100644 index 7e480599..00000000 --- a/node_modules/browserify-fs/node_modules/levelup/node_modules/deferred-leveldown/node_modules/abstract-leveldown/abstract-chained-batch.js +++ /dev/null @@ -1,81 +0,0 @@ -/* Copyright (c) 2013 Rod Vagg, MIT License */ - -function AbstractChainedBatch (db) { - this._db = db - this._operations = [] - this._written = false -} - -AbstractChainedBatch.prototype._checkWritten = function () { - if (this._written) - throw new Error('write() already called on this batch') -} - -AbstractChainedBatch.prototype.put = function (key, value) { - this._checkWritten() - - var err = this._db._checkKeyValue(key, 'key', this._db._isBuffer) - if (err) throw err - err = this._db._checkKeyValue(value, 'value', this._db._isBuffer) - if (err) throw err - - if (!this._db._isBuffer(key)) key = String(key) - if (!this._db._isBuffer(value)) value = String(value) - - if (typeof this._put == 'function' ) - this._put(key, value) - else - this._operations.push({ type: 'put', key: key, value: value }) - - return this -} - -AbstractChainedBatch.prototype.del = function (key) { - this._checkWritten() - - var err = this._db._checkKeyValue(key, 'key', this._db._isBuffer) - if (err) throw err - - if (!this._db._isBuffer(key)) key = String(key) - - if (typeof this._del == 'function' ) - this._del(key) - else - this._operations.push({ type: 'del', key: key }) - - return this -} - -AbstractChainedBatch.prototype.clear = function () { - this._checkWritten() - - this._operations = [] - - if (typeof this._clear == 'function' ) - this._clear() - - return this -} - -AbstractChainedBatch.prototype.write = function (options, callback) { - this._checkWritten() - - if (typeof options == 'function') - callback = options - if (typeof callback != 'function') - throw new Error('write() requires a callback argument') - if (typeof options != 'object') - options = {} - - this._written = true - - if (typeof this._write == 'function' ) - return this._write(callback) - - if (typeof this._db._batch == 'function') - return this._db._batch(this._operations, options, callback) - - process.nextTick(callback) -} - -module.exports = AbstractChainedBatch \ No newline at end of file diff --git a/node_modules/browserify-fs/node_modules/levelup/node_modules/deferred-leveldown/node_modules/abstract-leveldown/abstract-iterator.js b/node_modules/browserify-fs/node_modules/levelup/node_modules/deferred-leveldown/node_modules/abstract-leveldown/abstract-iterator.js deleted file mode 100644 index 04ed6a56..00000000 --- a/node_modules/browserify-fs/node_modules/levelup/node_modules/deferred-leveldown/node_modules/abstract-leveldown/abstract-iterator.js +++ /dev/null @@ -1,49 +0,0 @@ -/* Copyright (c) 2013 Rod Vagg, MIT License */ - -function AbstractIterator (db) { - this.db = db - this._ended = false - this._nexting = false -} - -AbstractIterator.prototype.next = function (callback) { - var self = this - - if (typeof callback != 'function') - throw new Error('next() requires a callback argument') - - if (self._ended) - return callback(new Error('cannot call next() after end()')) - if (self._nexting) - return callback(new Error('cannot call next() before previous next() has completed')) - - self._nexting = true - if (typeof self._next == 'function') { - return self._next(function () { - self._nexting = false - callback.apply(null, arguments) - }) - } - - process.nextTick(function () { - self._nexting = false - callback() - }) -} - -AbstractIterator.prototype.end = function (callback) { - if (typeof callback != 'function') - throw new Error('end() requires a callback argument') - - if (this._ended) - return callback(new Error('end() already called on iterator')) - - this._ended = true - - if (typeof this._end == 'function') - return this._end(callback) - - process.nextTick(callback) -} - -module.exports = AbstractIterator diff --git a/node_modules/browserify-fs/node_modules/levelup/node_modules/deferred-leveldown/node_modules/abstract-leveldown/abstract-leveldown.js b/node_modules/browserify-fs/node_modules/levelup/node_modules/deferred-leveldown/node_modules/abstract-leveldown/abstract-leveldown.js deleted file mode 100644 index 400a4aca..00000000 --- a/node_modules/browserify-fs/node_modules/levelup/node_modules/deferred-leveldown/node_modules/abstract-leveldown/abstract-leveldown.js +++ /dev/null @@ -1,256 +0,0 @@ -/* Copyright (c) 2013 Rod Vagg, MIT License */ - -var xtend = require('xtend') - , AbstractIterator = require('./abstract-iterator') - , AbstractChainedBatch = require('./abstract-chained-batch') - -function AbstractLevelDOWN (location) { - if (!arguments.length || location === undefined) - throw new Error('constructor requires at least a location argument') - - if (typeof location != 'string') - throw new Error('constructor requires a location string argument') - - this.location = location -} - -AbstractLevelDOWN.prototype.open = function (options, callback) { - if (typeof options == 'function') - callback = options - - if (typeof callback != 'function') - throw new Error('open() requires a callback argument') - - if (typeof options != 'object') - options = {} - - if (typeof this._open == 'function') - return this._open(options, callback) - - process.nextTick(callback) -} - -AbstractLevelDOWN.prototype.close = function (callback) { - if (typeof callback != 'function') - throw new Error('close() requires a callback argument') - - if (typeof this._close == 'function') - return this._close(callback) - - process.nextTick(callback) -} - -AbstractLevelDOWN.prototype.get = function (key, options, callback) { - var err - - if (typeof options == 'function') - callback = options - - if (typeof callback != 'function') - throw new Error('get() requires a callback argument') - - if (err = this._checkKeyValue(key, 'key', this._isBuffer)) - return callback(err) - - if (!this._isBuffer(key)) - key = String(key) - - if (typeof options != 'object') - options = {} - - if (typeof this._get == 'function') - return this._get(key, options, callback) - - process.nextTick(function () { callback(new Error('NotFound')) }) -} - -AbstractLevelDOWN.prototype.put = function (key, value, options, callback) { - var err - - if (typeof options == 'function') - callback = options - - if (typeof callback != 'function') - throw new Error('put() requires a callback argument') - - if (err = this._checkKeyValue(key, 'key', this._isBuffer)) - return callback(err) - - if (err = this._checkKeyValue(value, 'value', this._isBuffer)) - return callback(err) - - if (!this._isBuffer(key)) - key = String(key) - - // coerce value to string in node, don't touch it in browser - // (indexeddb can store any JS type) - if (!this._isBuffer(value) && !process.browser) - value = String(value) - - if (typeof options != 'object') - options = {} - - if (typeof this._put == 'function') - return this._put(key, value, options, callback) - - process.nextTick(callback) -} - -AbstractLevelDOWN.prototype.del = function (key, options, callback) { - var err - - if (typeof options == 'function') - callback = options - - if (typeof callback != 'function') - throw new Error('del() requires a callback argument') - - if (err = this._checkKeyValue(key, 'key', this._isBuffer)) - return callback(err) - - if (!this._isBuffer(key)) - key = String(key) - - if (typeof options != 'object') - options = {} - - if (typeof this._del == 'function') - return this._del(key, options, callback) - - process.nextTick(callback) -} - -AbstractLevelDOWN.prototype.batch = function (array, options, callback) { - if (!arguments.length) - return this._chainedBatch() - - if (typeof options == 'function') - callback = options - - if (typeof callback != 'function') - throw new Error('batch(array) requires a callback argument') - - if (!Array.isArray(array)) - return callback(new Error('batch(array) requires an array argument')) - - if (typeof options != 'object') - options = {} - - var i = 0 - , l = array.length - , e - , err - - for (; i < l; i++) { - e = array[i] - if (typeof e != 'object') - continue - - if (err = this._checkKeyValue(e.type, 'type', this._isBuffer)) - return callback(err) - - if (err = this._checkKeyValue(e.key, 'key', this._isBuffer)) - return callback(err) - - if (e.type == 'put') { - if (err = this._checkKeyValue(e.value, 'value', this._isBuffer)) - return callback(err) - } - } - - if (typeof this._batch == 'function') - return this._batch(array, options, callback) - - process.nextTick(callback) -} - -//TODO: remove from here, not a necessary primitive -AbstractLevelDOWN.prototype.approximateSize = function (start, end, callback) { - if ( start == null - || end == null - || typeof start == 'function' - || typeof end == 'function') { - throw new Error('approximateSize() requires valid `start`, `end` and `callback` arguments') - } - - if (typeof callback != 'function') - throw new Error('approximateSize() requires a callback argument') - - if (!this._isBuffer(start)) - start = String(start) - - if (!this._isBuffer(end)) - end = String(end) - - if (typeof this._approximateSize == 'function') - return this._approximateSize(start, end, callback) - - process.nextTick(function () { - callback(null, 0) - }) -} - -AbstractLevelDOWN.prototype._setupIteratorOptions = function (options) { - var self = this - - options = xtend(options) - - ;[ 'start', 'end', 'gt', 'gte', 'lt', 'lte' ].forEach(function (o) { - if (options[o] && self._isBuffer(options[o]) && options[o].length === 0) - delete options[o] - }) - - options.reverse = !!options.reverse - - // fix `start` so it takes into account gt, gte, lt, lte as appropriate - if (options.reverse && options.lt) - options.start = options.lt - if (options.reverse && options.lte) - options.start = options.lte - if (!options.reverse && options.gt) - options.start = options.gt - if (!options.reverse && options.gte) - options.start = options.gte - - if ((options.reverse && options.lt && !options.lte) - || (!options.reverse && options.gt && !options.gte)) - options.exclusiveStart = true // start should *not* include matching key - - return options -} - -AbstractLevelDOWN.prototype.iterator = function (options) { - if (typeof options != 'object') - options = {} - - options = this._setupIteratorOptions(options) - - if (typeof this._iterator == 'function') - return this._iterator(options) - - return new AbstractIterator(this) -} - -AbstractLevelDOWN.prototype._chainedBatch = function () { - return new AbstractChainedBatch(this) -} - -AbstractLevelDOWN.prototype._isBuffer = function (obj) { - return Buffer.isBuffer(obj) -} - -AbstractLevelDOWN.prototype._checkKeyValue = function (obj, type) { - - if (obj === null || obj === undefined) - return new Error(type + ' cannot be `null` or `undefined`') - - if (this._isBuffer(obj)) { - if (obj.length === 0) - return new Error(type + ' cannot be an empty Buffer') - } else if (String(obj) === '') - return new Error(type + ' cannot be an empty String') -} - -module.exports.AbstractLevelDOWN = AbstractLevelDOWN -module.exports.AbstractIterator = AbstractIterator -module.exports.AbstractChainedBatch = AbstractChainedBatch diff --git a/node_modules/browserify-fs/node_modules/levelup/node_modules/deferred-leveldown/node_modules/abstract-leveldown/abstract/approximate-size-test.js b/node_modules/browserify-fs/node_modules/levelup/node_modules/deferred-leveldown/node_modules/abstract-leveldown/abstract/approximate-size-test.js deleted file mode 100644 index b67d4287..00000000 --- a/node_modules/browserify-fs/node_modules/levelup/node_modules/deferred-leveldown/node_modules/abstract-leveldown/abstract/approximate-size-test.js +++ /dev/null @@ -1,121 +0,0 @@ -var db - -module.exports.setUp = function (leveldown, test, testCommon) { - test('setUp common', testCommon.setUp) - test('setUp db', function (t) { - db = leveldown(testCommon.location()) - db.open(t.end.bind(t)) - }) -} - -module.exports.args = function (test) { - test('test argument-less approximateSize() throws', function (t) { - t.throws( - db.approximateSize.bind(db) - , { name: 'Error', message: 'approximateSize() requires valid `start`, `end` and `callback` arguments' } - , 'no-arg approximateSize() throws' - ) - t.end() - }) - - test('test callback-less, 1-arg, approximateSize() throws', function (t) { - t.throws( - db.approximateSize.bind(db, 'foo') - , { name: 'Error', message: 'approximateSize() requires valid `start`, `end` and `callback` arguments' } - , 'callback-less, 1-arg approximateSize() throws' - ) - t.end() - }) - - test('test callback-less, 2-arg, approximateSize() throws', function (t) { - t.throws( - db.approximateSize.bind(db, 'foo', 'bar') - , { name: 'Error', message: 'approximateSize() requires a callback argument' } - , 'callback-less, 2-arg approximateSize() throws' - ) - t.end() - }) - - test('test callback-less, 3-arg, approximateSize() throws', function (t) { - t.throws( - db.approximateSize.bind(db, function () {}) - , { name: 'Error', message: 'approximateSize() requires valid `start`, `end` and `callback` arguments' } - , 'callback-only approximateSize() throws' - ) - t.end() - }) - - test('test callback-only approximateSize() throws', function (t) { - t.throws( - db.approximateSize.bind(db, function () {}) - , { name: 'Error', message: 'approximateSize() requires valid `start`, `end` and `callback` arguments' } - , 'callback-only approximateSize() throws' - ) - t.end() - }) - - test('test 1-arg + callback approximateSize() throws', function (t) { - t.throws( - db.approximateSize.bind(db, 'foo', function () {}) - , { name: 'Error', message: 'approximateSize() requires valid `start`, `end` and `callback` arguments' } - , '1-arg + callback approximateSize() throws' - ) - t.end() - }) -} - -module.exports.approximateSize = function (test) { - test('test approximateSize()', function (t) { - var data = Array.apply(null, Array(10000)).map(function () { - return 'aaaaaaaaaa' - }).join('') - - db.batch( - Array.apply(null, Array(10)).map(function (x, i) { - return { type: 'put', key: 'foo' + i, value: data } - }) - , function (err) { - t.notOk(err, 'no error') - - // cycle open/close to ensure a pack to .sst - - db.close(function (err) { - t.notOk(err, 'no error') - - db.open(function (err) { - t.notOk(err, 'no error') - - db.approximateSize('!', '~', function (err, size) { - t.notOk(err, 'no error') - - t.type(size, 'number') - t.ok( - size > 40000 // account for snappy compression - // original would be ~100000 - , 'size reports a reasonable amount (' + size + ')' - ) - - db.close(function (err) { - t.notOk(err, 'no error') - t.end() - }) - }) - }) - }) - } - ) - }) -} - -module.exports.tearDown = function (test, testCommon) { - test('tearDown', function (t) { - db.close(testCommon.tearDown.bind(null, t)) - }) -} - -module.exports.all = function (leveldown, test, testCommon) { - module.exports.setUp(leveldown, test, testCommon) - module.exports.args(test) - module.exports.approximateSize(test) - module.exports.tearDown(test, testCommon) -} diff --git a/node_modules/browserify-fs/node_modules/levelup/node_modules/deferred-leveldown/node_modules/abstract-leveldown/abstract/batch-test.js b/node_modules/browserify-fs/node_modules/levelup/node_modules/deferred-leveldown/node_modules/abstract-leveldown/abstract/batch-test.js deleted file mode 100644 index 45858409..00000000 --- a/node_modules/browserify-fs/node_modules/levelup/node_modules/deferred-leveldown/node_modules/abstract-leveldown/abstract/batch-test.js +++ /dev/null @@ -1,144 +0,0 @@ -var db - , verifyNotFoundError = require('./util').verifyNotFoundError - , isTypedArray = require('./util').isTypedArray - -module.exports.setUp = function (leveldown, test, testCommon) { - test('setUp common', testCommon.setUp) - test('setUp db', function (t) { - db = leveldown(testCommon.location()) - db.open(t.end.bind(t)) - }) -} - -module.exports.args = function (test) { - test('test callback-less, 2-arg, batch() throws', function (t) { - t.throws(db.batch.bind(db, 'foo', {}), 'callback-less, 2-arg batch() throws') - t.end() - }) - - test('test batch() with missing `value`', function (t) { - db.batch([{ type: 'put', key: 'foo1' }], function (err) { - t.equal(err.message, 'value cannot be `null` or `undefined`', 'correct error message') - t.end() - }) - }) - - test('test batch() with null `value`', function (t) { - db.batch([{ type: 'put', key: 'foo1', value: null }], function (err) { - t.equal(err.message, 'value cannot be `null` or `undefined`', 'correct error message') - t.end() - }) - }) - - test('test batch() with missing `key`', function (t) { - db.batch([{ type: 'put', value: 'foo1' }], function (err) { - t.equal(err.message, 'key cannot be `null` or `undefined`', 'correct error message') - t.end() - }) - }) - - test('test batch() with null `key`', function (t) { - db.batch([{ type: 'put', key: null, value: 'foo1' }], function (err) { - t.equal(err.message, 'key cannot be `null` or `undefined`', 'correct error message') - t.end() - }) - }) - - test('test batch() with missing `key` and `value`', function (t) { - db.batch([{ type: 'put' }], function (err) { - t.equal(err.message, 'key cannot be `null` or `undefined`', 'correct error message') - t.end() - }) - }) -} - -module.exports.batch = function (test) { - test('test batch() with empty array', function (t) { - db.batch([], function (err) { - t.notOk(err, 'no error') - t.end() - }) - }) - - test('test simple batch()', function (t) { - db.batch([{ type: 'put', key: 'foo', value: 'bar' }], function (err) { - t.notOk(err, 'no error') - - db.get('foo', function (err, value) { - t.notOk(err, 'no error') - var result - if (isTypedArray(value)) { - result = String.fromCharCode.apply(null, new Uint16Array(value)) - } else { - t.ok(typeof Buffer != 'undefined' && value instanceof Buffer) - result = value.toString() - } - t.equal(result, 'bar') - t.end() - }) - }) - }) - - test('test multiple batch()', function (t) { - db.batch([ - { type: 'put', key: 'foobatch1', value: 'bar1' } - , { type: 'put', key: 'foobatch2', value: 'bar2' } - , { type: 'put', key: 'foobatch3', value: 'bar3' } - , { type: 'del', key: 'foobatch2' } - ], function (err) { - t.notOk(err, 'no error') - - var r = 0 - , done = function () { - if (++r == 3) - t.end() - } - - db.get('foobatch1', function (err, value) { - t.notOk(err, 'no error') - var result - if (isTypedArray(value)) { - result = String.fromCharCode.apply(null, new Uint16Array(value)) - } else { - t.ok(typeof Buffer != 'undefined' && value instanceof Buffer) - result = value.toString() - } - t.equal(result, 'bar1') - done() - }) - - db.get('foobatch2', function (err, value) { - t.ok(err, 'entry not found') - t.ok(typeof value == 'undefined', 'value is undefined') - t.ok(verifyNotFoundError(err), 'NotFound error') - done() - }) - - db.get('foobatch3', function (err, value) { - t.notOk(err, 'no error') - var result - if (isTypedArray(value)) { - result = String.fromCharCode.apply(null, new Uint16Array(value)) - } else { - t.ok(typeof Buffer != 'undefined' && value instanceof Buffer) - result = value.toString() - } - t.equal(result, 'bar3') - done() - }) - }) - }) -} - -module.exports.tearDown = function (test, testCommon) { - test('tearDown', function (t) { - db.close(testCommon.tearDown.bind(null, t)) - }) -} - -module.exports.all = function (leveldown, test, testCommon) { - module.exports.setUp(leveldown, test, testCommon) - module.exports.args(test) - module.exports.batch(test) - module.exports.tearDown(test, testCommon) -} diff --git a/node_modules/browserify-fs/node_modules/levelup/node_modules/deferred-leveldown/node_modules/abstract-leveldown/abstract/chained-batch-test.js b/node_modules/browserify-fs/node_modules/levelup/node_modules/deferred-leveldown/node_modules/abstract-leveldown/abstract/chained-batch-test.js deleted file mode 100644 index b38a68db..00000000 --- a/node_modules/browserify-fs/node_modules/levelup/node_modules/deferred-leveldown/node_modules/abstract-leveldown/abstract/chained-batch-test.js +++ /dev/null @@ -1,222 +0,0 @@ -var db - -module.exports.setUp = function (leveldown, test, testCommon) { - test('setUp common', testCommon.setUp) - test('setUp db', function (t) { - db = leveldown(testCommon.location()) - db.open(t.end.bind(t)) - }) -} - -module.exports.args = function (test) { - test('test batch#put() with missing `value`', function (t) { - try { - db.batch().put('foo1') - } catch (err) { - t.equal(err.message, 'value cannot be `null` or `undefined`', 'correct error message') - return t.end() - } - t.fail('should have thrown') - t.end() - }) - - test('test batch#put() with null `value`', function (t) { - try { - db.batch().put('foo1', null) - } catch (err) { - t.equal(err.message, 'value cannot be `null` or `undefined`', 'correct error message') - return t.end() - } - t.fail('should have thrown') - t.end() - }) - - test('test batch#put() with missing `key`', function (t) { - try { - db.batch().put(undefined, 'foo1') - } catch (err) { - t.equal(err.message, 'key cannot be `null` or `undefined`', 'correct error message') - return t.end() - } - t.fail('should have thrown') - t.end() - }) - - test('test batch#put() with null `key`', function (t) { - try { - db.batch().put(null, 'foo1') - } catch (err) { - t.equal(err.message, 'key cannot be `null` or `undefined`', 'correct error message') - return t.end() - } - t.fail('should have thrown') - t.end() - }) - - test('test batch#put() with missing `key` and `value`', function (t) { - try { - db.batch().put() - } catch (err) { - t.equal(err.message, 'key cannot be `null` or `undefined`', 'correct error message') - return t.end() - } - t.fail('should have thrown') - t.end() - }) - - test('test batch#del() with missing `key`', function (t) { - try { - db.batch().del() - } catch (err) { - t.equal(err.message, 'key cannot be `null` or `undefined`', 'correct error message') - return t.end() - } - t.fail('should have thrown') - t.end() - }) - - test('test batch#del() with null `key`', function (t) { - try { - db.batch().del(null) - } catch (err) { - t.equal(err.message, 'key cannot be `null` or `undefined`', 'correct error message') - return t.end() - } - t.fail('should have thrown') - t.end() - }) - - test('test batch#del() with null `key`', function (t) { - try { - db.batch().del(null) - } catch (err) { - t.equal(err.message, 'key cannot be `null` or `undefined`', 'correct error message') - return t.end() - } - t.fail('should have thrown') - t.end() - }) - - test('test batch#clear() doesn\'t throw', function (t) { - db.batch().clear() - t.end() - }) - - test('test batch#write() with no callback', function (t) { - try { - db.batch().write() - } catch (err) { - t.equal(err.message, 'write() requires a callback argument', 'correct error message') - return t.end() - } - t.fail('should have thrown') - t.end() - }) - - test('test batch#put() after write()', function (t) { - var batch = db.batch().put('foo', 'bar') - batch.write(function () {}) - try { - batch.put('boom', 'bang') - } catch (err) { - t.equal(err.message, 'write() already called on this batch', 'correct error message') - return t.end() - } - t.fail('should have thrown') - t.end() - }) - - test('test batch#del() after write()', function (t) { - var batch = db.batch().put('foo', 'bar') - batch.write(function () {}) - try { - batch.del('foo') - } catch (err) { - t.equal(err.message, 'write() already called on this batch', 'correct error message') - return t.end() - } - t.fail('should have thrown') - t.end() - }) - - test('test batch#clear() after write()', function (t) { - var batch = db.batch().put('foo', 'bar') - batch.write(function () {}) - try { - batch.clear() - } catch (err) { - t.equal(err.message, 'write() already called on this batch', 'correct error message') - return t.end() - } - t.fail('should have thrown') - t.end() - }) - - test('test batch#write() after write()', function (t) { - var batch = db.batch().put('foo', 'bar') - batch.write(function () {}) - try { - batch.write(function (err) {}) - } catch (err) { - t.equal(err.message, 'write() already called on this batch', 'correct error message') - return t.end() - } - t.fail('should have thrown') - t.end() - }) -} - -module.exports.batch = function (test, testCommon) { - test('test basic batch', function (t) { - db.batch( - [ - { type: 'put', key: 'one', value: '1' } - , { type: 'put', key: 'two', value: '2' } - , { type: 'put', key: 'three', value: '3' } - ] - , function (err) { - t.notOk(err, 'no error') - - db.batch() - .put('1', 'one') - .del('2', 'two') - .put('3', 'three') - .clear() - .put('one', 'I') - .put('two', 'II') - .del('three') - .put('foo', 'bar') - .write(function (err) { - t.notOk(err, 'no error') - testCommon.collectEntries( - db.iterator({ keyAsBuffer: false, valueAsBuffer: false }) - , function (err, data) { - t.notOk(err, 'no error') - t.equal(data.length, 3, 'correct number of entries') - var expected = [ - { key: 'foo', value: 'bar' } - , { key: 'one', value: 'I' } - , { key: 'two', value: 'II' } - ] - t.deepEqual(data, expected) - t.end() - } - ) - }) - } - ) - }) -} - -module.exports.tearDown = function (test, testCommon) { - test('tearDown', function (t) { - db.close(testCommon.tearDown.bind(null, t)) - }) -} - -module.exports.all = function (leveldown, test, testCommon) { - module.exports.setUp(leveldown, test, testCommon) - module.exports.args(test) - module.exports.batch(test, testCommon) - module.exports.tearDown(test, testCommon) -} \ No newline at end of file diff --git a/node_modules/browserify-fs/node_modules/levelup/node_modules/deferred-leveldown/node_modules/abstract-leveldown/abstract/close-test.js b/node_modules/browserify-fs/node_modules/levelup/node_modules/deferred-leveldown/node_modules/abstract-leveldown/abstract/close-test.js deleted file mode 100644 index 7492c492..00000000 --- a/node_modules/browserify-fs/node_modules/levelup/node_modules/deferred-leveldown/node_modules/abstract-leveldown/abstract/close-test.js +++ /dev/null @@ -1,24 +0,0 @@ -module.exports.close = function (leveldown, test, testCommon) { - test('test close()', function (t) { - var db = leveldown(testCommon.location()) - - db.open(function (err) { - t.notOk(err, 'no error') - t.throws( - db.close.bind(db) - , { name: 'Error', message: 'close() requires a callback argument' } - , 'no-arg close() throws' - ) - t.throws( - db.close.bind(db, 'foo') - , { name: 'Error', message: 'close() requires a callback argument' } - , 'non-callback close() throws' - ) - - db.close(function (err) { - t.notOk(err, 'no error') - t.end() - }) - }) - }) -} \ No newline at end of file diff --git a/node_modules/browserify-fs/node_modules/levelup/node_modules/deferred-leveldown/node_modules/abstract-leveldown/abstract/del-test.js b/node_modules/browserify-fs/node_modules/levelup/node_modules/deferred-leveldown/node_modules/abstract-leveldown/abstract/del-test.js deleted file mode 100644 index 8a70e7d7..00000000 --- a/node_modules/browserify-fs/node_modules/levelup/node_modules/deferred-leveldown/node_modules/abstract-leveldown/abstract/del-test.js +++ /dev/null @@ -1,77 +0,0 @@ -var db - , verifyNotFoundError = require('./util').verifyNotFoundError - , isTypedArray = require('./util').isTypedArray - -module.exports.setUp = function (leveldown, test, testCommon) { - test('setUp common', testCommon.setUp) - test('setUp db', function (t) { - db = leveldown(testCommon.location()) - db.open(t.end.bind(t)) - }) -} - -module.exports.args = function (test) { - test('test argument-less del() throws', function (t) { - t.throws( - db.del.bind(db) - , { name: 'Error', message: 'del() requires a callback argument' } - , 'no-arg del() throws' - ) - t.end() - }) - - test('test callback-less, 1-arg, del() throws', function (t) { - t.throws( - db.del.bind(db, 'foo') - , { name: 'Error', message: 'del() requires a callback argument' } - , 'callback-less, 1-arg del() throws' - ) - t.end() - }) - - test('test callback-less, 3-arg, del() throws', function (t) { - t.throws( - db.del.bind(db, 'foo', {}) - , { name: 'Error', message: 'del() requires a callback argument' } - , 'callback-less, 2-arg del() throws' - ) - t.end() - }) -} - -module.exports.del = function (test) { - test('test simple del()', function (t) { - db.put('foo', 'bar', function (err) { - t.notOk(err, 'no error') - db.del('foo', function (err) { - t.notOk(err, 'no error') - db.get('foo', function (err) { - t.ok(err, 'entry propertly deleted') - t.ok(typeof value == 'undefined', 'value is undefined') - t.ok(verifyNotFoundError(err), 'NotFound error') - t.end() - }) - }) - }) - }) - - test('test del on non-existent key', function (t) { - db.del('blargh', function (err) { - t.notOk(err, 'should not error on delete') - t.end() - }) - }) -} - -module.exports.tearDown = function (test, testCommon) { - test('tearDown', function (t) { - db.close(testCommon.tearDown.bind(null, t)) - }) -} - -module.exports.all = function (leveldown, test, testCommon) { - module.exports.setUp(leveldown, test, testCommon) - module.exports.args(test) - module.exports.del(test) - module.exports.tearDown(test, testCommon) -} diff --git a/node_modules/browserify-fs/node_modules/levelup/node_modules/deferred-leveldown/node_modules/abstract-leveldown/abstract/get-test.js b/node_modules/browserify-fs/node_modules/levelup/node_modules/deferred-leveldown/node_modules/abstract-leveldown/abstract/get-test.js deleted file mode 100644 index 2b865f0b..00000000 --- a/node_modules/browserify-fs/node_modules/levelup/node_modules/deferred-leveldown/node_modules/abstract-leveldown/abstract/get-test.js +++ /dev/null @@ -1,125 +0,0 @@ -var db - , verifyNotFoundError = require('./util').verifyNotFoundError - , isTypedArray = require('./util').isTypedArray - -module.exports.setUp = function (leveldown, test, testCommon) { - test('setUp common', testCommon.setUp) - test('setUp db', function (t) { - db = leveldown(testCommon.location()) - db.open(t.end.bind(t)) - }) -} - -module.exports.args = function (test) { - test('test argument-less get() throws', function (t) { - t.throws( - db.get.bind(db) - , { name: 'Error', message: 'get() requires a callback argument' } - , 'no-arg get() throws' - ) - t.end() - }) - - test('test callback-less, 1-arg, get() throws', function (t) { - t.throws( - db.get.bind(db, 'foo') - , { name: 'Error', message: 'get() requires a callback argument' } - , 'callback-less, 1-arg get() throws' - ) - t.end() - }) - - test('test callback-less, 3-arg, get() throws', function (t) { - t.throws( - db.get.bind(db, 'foo', {}) - , { name: 'Error', message: 'get() requires a callback argument' } - , 'callback-less, 2-arg get() throws' - ) - t.end() - }) -} - -module.exports.get = function (test) { - test('test simple get()', function (t) { - db.put('foo', 'bar', function (err) { - t.notOk(err, 'no error') - db.get('foo', function (err, value) { - t.notOk(err, 'no error') - t.ok(typeof value !== 'string', 'should not be string by default') - - var result - if (isTypedArray(value)) { - result = String.fromCharCode.apply(null, new Uint16Array(value)) - } else { - t.ok(typeof Buffer != 'undefined' && value instanceof Buffer) - result = value.toString() - } - - t.equal(result, 'bar') - - db.get('foo', {}, function (err, value) { // same but with {} - t.notOk(err, 'no error') - t.ok(typeof value !== 'string', 'should not be string by default') - - var result - if (isTypedArray(value)) { - result = String.fromCharCode.apply(null, new Uint16Array(value)) - } else { - t.ok(typeof Buffer != 'undefined' && value instanceof Buffer) - result = value.toString() - } - - t.equal(result, 'bar') - - db.get('foo', { asBuffer: false }, function (err, value) { - t.notOk(err, 'no error') - t.ok(typeof value === 'string', 'should be string if not buffer') - t.equal(value, 'bar') - t.end() - }) - }) - }) - }) - }) - - test('test simultaniously get()', function (t) { - db.put('hello', 'world', function (err) { - t.notOk(err, 'should not error') - var r = 0 - , done = function () { - if (++r == 20) - t.end() - } - , i = 0 - , j = 0 - - for (; i < 10; ++i) - db.get('hello', function(err, value) { - t.notOk(err, 'should not error') - t.equal(value.toString(), 'world') - done() - }) - - for (; j < 10; ++j) - db.get('not found', function(err, value) { - t.ok(err, 'should error') - t.ok(verifyNotFoundError(err), 'should have correct error message') - t.ok(typeof value == 'undefined', 'value is undefined') - done() - }) - }) - }) -} - -module.exports.tearDown = function (test, testCommon) { - test('tearDown', function (t) { - db.close(testCommon.tearDown.bind(null, t)) - }) -} - -module.exports.all = function (leveldown, test, testCommon) { - module.exports.setUp(leveldown, test, testCommon) - module.exports.args(test) - module.exports.get(test) - module.exports.tearDown(test, testCommon) -} \ No newline at end of file diff --git a/node_modules/browserify-fs/node_modules/levelup/node_modules/deferred-leveldown/node_modules/abstract-leveldown/abstract/iterator-test.js b/node_modules/browserify-fs/node_modules/levelup/node_modules/deferred-leveldown/node_modules/abstract-leveldown/abstract/iterator-test.js deleted file mode 100644 index 97b3e6b7..00000000 --- a/node_modules/browserify-fs/node_modules/levelup/node_modules/deferred-leveldown/node_modules/abstract-leveldown/abstract/iterator-test.js +++ /dev/null @@ -1,487 +0,0 @@ -var db - , sourceData = (function () { - var d = [] - , i = 0 - , k - for (; i < 100; i++) { - k = (i < 10 ? '0' : '') + i - d.push({ - type : 'put' - , key : k - , value : Math.random() - }) - } - return d - }()) - , transformSource = function (d) { - return { key: d.key, value: String(d.value) } - } - -module.exports.sourceData = sourceData -module.exports.transformSource = transformSource - -module.exports.setUp = function (leveldown, test, testCommon) { - test('setUp common', testCommon.setUp) - test('setUp db', function (t) { - db = leveldown(testCommon.location()) - db.open(t.end.bind(t)) - }) -} - -module.exports.args = function (test) { - test('test argument-less iterator#next() throws', function (t) { - var iterator = db.iterator() - t.throws( - iterator.next.bind(iterator) - , { name: 'Error', message: 'next() requires a callback argument' } - , 'no-arg iterator#next() throws' - ) - iterator.end(t.end.bind(t)) - }) - - test('test argument-less iterator#end() after next() throws', function (t) { - var iterator = db.iterator() - iterator.next(function () { - t.throws( - iterator.end.bind(iterator) - , { name: 'Error', message: 'end() requires a callback argument' } - , 'no-arg iterator#end() throws' - ) - iterator.end(t.end.bind(t)) - }) - }) - - test('test argument-less iterator#end() throws', function (t) { - var iterator = db.iterator() - t.throws( - iterator.end.bind(iterator) - , { name: 'Error', message: 'end() requires a callback argument' } - , 'no-arg iterator#end() throws' - ) - iterator.end(t.end.bind(t)) - }) -} - -module.exports.sequence = function (test) { - test('test twice iterator#end() callback with error', function (t) { - var iterator = db.iterator() - iterator.end(function (err) { - t.notOk(err, 'no error') - iterator.end(function(err2) { - t.ok(err2, 'returned error') - t.equal(err2.name, 'Error', 'correct error') - t.equal(err2.message, 'end() already called on iterator') - t.end() - }) - }) - }) - - test('test iterator#next after iterator#end() callback with error', function (t) { - var iterator = db.iterator() - iterator.end(function (err) { - t.notOk(err, 'no error') - iterator.next(function(err2) { - t.ok(err2, 'returned error') - t.equal(err2.name, 'Error', 'correct error') - t.equal(err2.message, 'cannot call next() after end()', 'correct message') - t.end() - }) - }) - }) - - test('test twice iterator#next() throws', function (t) { - var iterator = db.iterator() - iterator.next(function (err) { - t.notOk(err, 'no error') - iterator.end(function (err) { - t.notOk(err, 'no error') - t.end() - }) - }) - - iterator.next(function(err) { - t.ok(err, 'returned error') - t.equal(err.name, 'Error', 'correct error') - t.equal(err.message, 'cannot call next() before previous next() has completed') - }) - }) -} - -module.exports.iterator = function (leveldown, test, testCommon, collectEntries) { - test('test simple iterator()', function (t) { - var data = [ - { type: 'put', key: 'foobatch1', value: 'bar1' } - , { type: 'put', key: 'foobatch2', value: 'bar2' } - , { type: 'put', key: 'foobatch3', value: 'bar3' } - ] - , idx = 0 - - db.batch(data, function (err) { - t.notOk(err, 'no error') - var iterator = db.iterator() - , fn = function (err, key, value) { - t.notOk(err, 'no error') - if (key && value) { - t.ok(Buffer.isBuffer(key), 'key argument is a Buffer') - t.ok(Buffer.isBuffer(value), 'value argument is a Buffer') - t.equal(key.toString(), data[idx].key, 'correct key') - t.equal(value.toString(), data[idx].value, 'correct value') - process.nextTick(next) - idx++ - } else { // end - t.ok(typeof err === 'undefined', 'err argument is undefined') - t.ok(typeof key === 'undefined', 'key argument is undefined') - t.ok(typeof value === 'undefined', 'value argument is undefined') - t.equal(idx, data.length, 'correct number of entries') - iterator.end(function () { - t.end() - }) - } - } - , next = function () { - iterator.next(fn) - } - - next() - }) - }) - - /** the following tests are mirroring the same series of tests in - * LevelUP read-stream-test.js - */ - - test('setUp #2', function (t) { - db.close(function () { - db = leveldown(testCommon.location()) - db.open(function () { - db.batch(sourceData, t.end.bind(t)) - }) - }) - }) - - test('test full data collection', function (t) { - collectEntries(db.iterator({ keyAsBuffer: false, valueAsBuffer: false }), function (err, data) { - t.notOk(err, 'no error') - t.equal(data.length, sourceData.length, 'correct number of entries') - var expected = sourceData.map(transformSource) - t.deepEqual(data, expected) - t.end() - }) - }) - - test('test iterator with reverse=true', function (t) { - collectEntries(db.iterator({ keyAsBuffer: false, valueAsBuffer: false, reverse: true }), function (err, data) { - t.notOk(err, 'no error') - t.equal(data.length, sourceData.length, 'correct number of entries') - var expected = sourceData.slice().reverse().map(transformSource) - t.deepEqual(data, expected) - t.end() - }) - }) - - test('test iterator with start=0', function (t) { - collectEntries(db.iterator({ keyAsBuffer: false, valueAsBuffer: false, start: '00' }), function (err, data) { - t.notOk(err, 'no error') - t.equal(data.length, sourceData.length, 'correct number of entries') - var expected = sourceData.map(transformSource) - t.deepEqual(data, expected) - t.end() - }) - }) - - test('test iterator with start=50', function (t) { - collectEntries(db.iterator({ keyAsBuffer: false, valueAsBuffer: false, start: '50' }), function (err, data) { - t.notOk(err, 'no error') - t.equal(data.length, 50, 'correct number of entries') - var expected = sourceData.slice(50).map(transformSource) - t.deepEqual(data, expected) - t.end() - }) - }) - - test('test iterator with start=50 and reverse=true', function (t) { - collectEntries(db.iterator({ keyAsBuffer: false, valueAsBuffer: false, start: '50', reverse: true }), function (err, data) { - t.notOk(err, 'no error') - t.equal(data.length, 51, 'correct number of entries') - var expected = sourceData.slice().reverse().slice(49).map(transformSource) - t.deepEqual(data, expected) - t.end() - }) - }) - - test('test iterator with start being a midway key (49.5)', function (t) { - collectEntries(db.iterator({ keyAsBuffer: false, valueAsBuffer: false, start: '49.5' }), function (err, data) { - t.notOk(err, 'no error') - t.equal(data.length, 50, 'correct number of entries') - var expected = sourceData.slice(50).map(transformSource) - t.deepEqual(data, expected) - t.end() - }) - }) - - test('test iterator with start being a midway key (49999)', function (t) { - collectEntries(db.iterator({ keyAsBuffer: false, valueAsBuffer: false, start: '49999' }), function (err, data) { - t.notOk(err, 'no error') - t.equal(data.length, 50, 'correct number of entries') - var expected = sourceData.slice(50).map(transformSource) - t.deepEqual(data, expected) - t.end() - }) - }) - - test('test iterator with start being a midway key and reverse=true', function (t) { - collectEntries(db.iterator({ keyAsBuffer: false, valueAsBuffer: false, start: '49.5', reverse: true }), function (err, data) { - t.notOk(err, 'no error') - t.equal(data.length, 50, 'correct number of entries') - var expected = sourceData.slice().reverse().slice(50).map(transformSource) - t.deepEqual(data, expected) - t.end() - }) - }) - - test('test iterator with end=50', function (t) { - collectEntries(db.iterator({ keyAsBuffer: false, valueAsBuffer: false, end: '50' }), function (err, data) { - t.notOk(err, 'no error') - t.equal(data.length, 51, 'correct number of entries') - var expected = sourceData.slice(0, 51).map(transformSource) - t.deepEqual(data, expected) - t.end() - }) - }) - - test('test iterator with end being a midway key (50.5)', function (t) { - collectEntries(db.iterator({ keyAsBuffer: false, valueAsBuffer: false, end: '50.5' }), function (err, data) { - t.notOk(err, 'no error') - t.equal(data.length, 51, 'correct number of entries') - var expected = sourceData.slice(0, 51).map(transformSource) - t.deepEqual(data, expected) - t.end() - }) - }) - - test('test iterator with end being a midway key (50555)', function (t) { - collectEntries(db.iterator({ keyAsBuffer: false, valueAsBuffer: false, end: '50555' }), function (err, data) { - t.notOk(err, 'no error') - t.equal(data.length, 51, 'correct number of entries') - var expected = sourceData.slice(0, 51).map(transformSource) - t.deepEqual(data, expected) - t.end() - }) - }) - - test('test iterator with end being a midway key and reverse=true', function (t) { - collectEntries(db.iterator({ keyAsBuffer: false, valueAsBuffer: false, end: '50.5', reverse: true }), function (err, data) { - t.notOk(err, 'no error') - t.equal(data.length, 49, 'correct number of entries') - var expected = sourceData.slice().reverse().slice(0, 49).map(transformSource) - t.deepEqual(data, expected) - t.end() - }) - }) - - // end='0', starting key is actually '00' so it should avoid it - test('test iterator with end=0', function (t) { - collectEntries(db.iterator({ keyAsBuffer: false, valueAsBuffer: false, end: '0' }), function (err, data) { - t.notOk(err, 'no error') - t.equal(data.length, 0, 'correct number of entries') - t.end() - }) - }) - - test('test iterator with start=30 and end=70', function (t) { - collectEntries(db.iterator({ keyAsBuffer: false, valueAsBuffer: false, start: '30', end: '70' }), function (err, data) { - t.notOk(err, 'no error') - t.equal(data.length, 41, 'correct number of entries') - var expected = sourceData.slice(30, 71).map(transformSource) - t.deepEqual(data, expected) - t.end() - }) - }) - - test('test iterator with start=30 and end=70 and reverse=true', function (t) { - collectEntries(db.iterator({ keyAsBuffer: false, valueAsBuffer: false, start: '70', end: '30', reverse: true }), function (err, data) { - t.notOk(err, 'no error') - t.equal(data.length, 41, 'correct number of entries') - var expected = sourceData.slice().reverse().slice(29, 70).map(transformSource) - t.deepEqual(data, expected) - t.end() - }) - }) - - test('test iterator with limit=20', function (t) { - collectEntries(db.iterator({ keyAsBuffer: false, valueAsBuffer: false, limit: 20 }), function (err, data) { - t.notOk(err, 'no error') - t.equal(data.length, 20, 'correct number of entries') - var expected = sourceData.slice(0, 20).map(transformSource) - t.deepEqual(data, expected) - t.end() - }) - }) - - test('test iterator with limit=20 and start=20', function (t) { - collectEntries(db.iterator({ keyAsBuffer: false, valueAsBuffer: false, start: '20', limit: 20 }), function (err, data) { - t.notOk(err, 'no error') - t.equal(data.length, 20, 'correct number of entries') - var expected = sourceData.slice(20, 40).map(transformSource) - t.deepEqual(data, expected) - t.end() - }) - }) - - test('test iterator with limit=20 and reverse=true', function (t) { - collectEntries(db.iterator({ keyAsBuffer: false, valueAsBuffer: false, limit: 20, reverse: true }), function (err, data) { - t.notOk(err, 'no error') - t.equal(data.length, 20, 'correct number of entries') - var expected = sourceData.slice().reverse().slice(0, 20).map(transformSource) - t.deepEqual(data, expected) - t.end() - }) - }) - - test('test iterator with limit=20 and start=20 and reverse=true', function (t) { - collectEntries(db.iterator({ keyAsBuffer: false, valueAsBuffer: false, start: '79', limit: 20, reverse: true }), function (err, data) { - t.notOk(err, 'no error') - t.equal(data.length, 20, 'correct number of entries') - var expected = sourceData.slice().reverse().slice(20, 40).map(transformSource) - t.deepEqual(data, expected) - t.end() - }) - }) - - // the default limit value from levelup is -1 - test('test iterator with limit=-1 should iterate over whole database', function (t) { - collectEntries(db.iterator({ keyAsBuffer: false, valueAsBuffer: false, limit: -1}), function (err, data) { - t.notOk(err, 'no error') - t.equal(data.length, sourceData.length, 'correct number of entries') - var expected = sourceData.map(transformSource) - t.deepEqual(data, expected) - t.end() - }) - }) - - test('test iterator with end after limit', function (t) { - collectEntries(db.iterator({ keyAsBuffer: false, valueAsBuffer: false, limit: 20, end: '50' }), function (err, data) { - t.notOk(err, 'no error') - t.equal(data.length, 20, 'correct number of entries') - var expected = sourceData.slice(0, 20).map(transformSource) - t.deepEqual(data, expected) - t.end() - }) - }) - - test('test iterator with end before limit', function (t) { - collectEntries(db.iterator({ keyAsBuffer: false, valueAsBuffer: false, limit: 50, end: '19' }), function (err, data) { - t.notOk(err, 'no error') - t.equal(data.length, 20, 'correct number of entries') - var expected = sourceData.slice(0, 20).map(transformSource) - t.deepEqual(data, expected) - t.end() - }) - }) - - test('test iterator with start after database end', function (t) { - collectEntries(db.iterator({ keyAsBuffer: false, valueAsBuffer: false, start: '9a' }), function (err, data) { - t.notOk(err, 'no error') - t.equal(data.length, 0, 'correct number of entries') - t.end() - }) - }) - - test('test iterator with start after database end and reverse=true', function (t) { - collectEntries(db.iterator({ keyAsBuffer: false, valueAsBuffer: false, start: '9a', reverse: true }), function (err, data) { - t.notOk(err, 'no error') - t.equal(data.length, sourceData.length, 'correct number of entries') - var expected = sourceData.slice().reverse().map(transformSource) - t.deepEqual(data, expected) - t.end() - }) - }) - - test('test iterator with start and end after database and and reverse=true', function (t) { - collectEntries(db.iterator({ start: '9b', end: '9a', reverse: true }), function (err, data) { - t.notOk(err, 'no error') - t.equal(data.length, 0, 'correct number of entries') - t.end() - }) - }) - - function testIteratorCollectsFullDatabase (name, iteratorOptions) { - iteratorOptions.keyAsBuffer = false - iteratorOptions.valueAsBuffer = false - test(name, function (t) { - collectEntries(db.iterator(iteratorOptions), function (err, data) { - t.notOk(err, 'no error') - t.equal(data.length, 100, 'correct number of entries') - var expected = sourceData.map(transformSource) - t.deepEqual(data, expected) - t.end() - }) - }) - } - if (!process.browser) { - // Can't use buffers as query keys in indexeddb (I think :P) - testIteratorCollectsFullDatabase( - 'test iterator with start as empty buffer' - , { start: new Buffer(0) } - ) - testIteratorCollectsFullDatabase( - 'test iterator with end as empty buffer' - , { end: new Buffer(0) } - ) - } - testIteratorCollectsFullDatabase( - 'test iterator with start as empty string' - , { start: '' } - ) - testIteratorCollectsFullDatabase( - 'test iterator with start as null' - , { start: null } - ) - testIteratorCollectsFullDatabase( - 'test iterator with end as empty string' - , { end: '' } - ) - testIteratorCollectsFullDatabase( - 'test iterator with end as null' - , { end: null } - ) -} - -module.exports.snapshot = function (leveldown, test, testCommon) { - test('setUp #3', function (t) { - db.close(function () { - db = leveldown(testCommon.location()) - db.open(function () { - db.put('foobatch1', 'bar1', t.end.bind(t)) - }) - }) - }) - - test('iterator create snapshot correctly', function (t) { - var iterator = db.iterator() - db.del('foobatch1', function () { - iterator.next(function (err, key, value) { - t.notOk(err, 'no error') - t.ok(key, 'got a key') - t.equal(key.toString(), 'foobatch1', 'correct key') - t.equal(value.toString(), 'bar1', 'correct value') - iterator.end(t.end.bind(t)) - }) - }) - }) -} - -module.exports.tearDown = function (test, testCommon) { - test('tearDown', function (t) { - db.close(testCommon.tearDown.bind(null, t)) - }) -} - -module.exports.all = function (leveldown, test, testCommon) { - module.exports.setUp(leveldown, test, testCommon) - module.exports.args(test) - module.exports.sequence(test) - module.exports.iterator(leveldown, test, testCommon, testCommon.collectEntries) - module.exports.snapshot(leveldown, test, testCommon) - module.exports.tearDown(test, testCommon) -} diff --git a/node_modules/browserify-fs/node_modules/levelup/node_modules/deferred-leveldown/node_modules/abstract-leveldown/abstract/leveldown-test.js b/node_modules/browserify-fs/node_modules/levelup/node_modules/deferred-leveldown/node_modules/abstract-leveldown/abstract/leveldown-test.js deleted file mode 100644 index 205122bf..00000000 --- a/node_modules/browserify-fs/node_modules/levelup/node_modules/deferred-leveldown/node_modules/abstract-leveldown/abstract/leveldown-test.js +++ /dev/null @@ -1,17 +0,0 @@ -module.exports.args = function (leveldown, test) { - test('test database creation no-arg throws', function (t) { - t.throws( - leveldown - , { name: 'Error', message: 'constructor requires at least a location argument' } - , 'no-arg leveldown() throws' - ) - t.end() - }) - - test('test database open no-arg throws', function (t) { - var db = leveldown('foo') - t.ok(db, 'database object returned') - t.ok(typeof db.open === 'function', 'open() function exists') - t.end() - }) -} \ No newline at end of file diff --git a/node_modules/browserify-fs/node_modules/levelup/node_modules/deferred-leveldown/node_modules/abstract-leveldown/abstract/open-test.js b/node_modules/browserify-fs/node_modules/levelup/node_modules/deferred-leveldown/node_modules/abstract-leveldown/abstract/open-test.js deleted file mode 100644 index 5bbeeb06..00000000 --- a/node_modules/browserify-fs/node_modules/levelup/node_modules/deferred-leveldown/node_modules/abstract-leveldown/abstract/open-test.js +++ /dev/null @@ -1,96 +0,0 @@ -module.exports.setUp = function (test, testCommon) { - test('setUp', testCommon.setUp) -} - -module.exports.args = function (leveldown, test, testCommon) { - test('test database open no-arg throws', function (t) { - var db = leveldown(testCommon.location()) - t.throws( - db.open.bind(db) - , { name: 'Error', message: 'open() requires a callback argument' } - , 'no-arg open() throws' - ) - t.end() - }) - - test('test callback-less, 1-arg, open() throws', function (t) { - var db = leveldown(testCommon.location()) - t.throws( - db.open.bind(db, {}) - , { name: 'Error', message: 'open() requires a callback argument' } - , 'callback-less, 1-arg open() throws' - ) - t.end() - }) -} - -module.exports.open = function (leveldown, test, testCommon) { - test('test database open, no options', function (t) { - var db = leveldown(testCommon.location()) - - // default createIfMissing=true, errorIfExists=false - db.open(function (err) { - t.notOk(err, 'no error') - db.close(function () { - t.end() - }) - }) - }) - - test('test database open, options and callback', function (t) { - var db = leveldown(testCommon.location()) - - // default createIfMissing=true, errorIfExists=false - db.open({}, function (err) { - t.notOk(err, 'no error') - db.close(function () { - t.end() - }) - }) - }) -} - -module.exports.openAdvanced = function (leveldown, test, testCommon) { - test('test database open createIfMissing:false', function (t) { - var db = leveldown(testCommon.location()) - - db.open({ createIfMissing: false }, function (err) { - t.ok(err, 'error') - t.ok(/does not exist/.test(err.message), 'error is about dir not existing') - t.end() - }) - }) - - test('test database open errorIfExists:true', function (t) { - var location = testCommon.location() - , db = leveldown(location) - - // make a valid database first, then close and dispose - db.open({}, function (err) { - t.notOk(err, 'no error') - db.close(function (err) { - t.notOk(err, 'no error') - - // open again with 'errorIfExists' - db = leveldown(location) - db.open({ createIfMissing: false, errorIfExists: true }, function (err) { - t.ok(err, 'error') - t.ok(/exists/.test(err.message), 'error is about already existing') - t.end() - }) - }) - }) - }) -} - -module.exports.tearDown = function (test, testCommon) { - test('tearDown', testCommon.tearDown) -} - -module.exports.all = function (leveldown, test, testCommon) { - module.exports.setUp(test, testCommon) - module.exports.args(leveldown, test, testCommon) - module.exports.open(leveldown, test, testCommon) - module.exports.openAdvanced(leveldown, test, testCommon) - module.exports.tearDown(test, testCommon) -} \ No newline at end of file diff --git a/node_modules/browserify-fs/node_modules/levelup/node_modules/deferred-leveldown/node_modules/abstract-leveldown/abstract/put-get-del-test.js b/node_modules/browserify-fs/node_modules/levelup/node_modules/deferred-leveldown/node_modules/abstract-leveldown/abstract/put-get-del-test.js deleted file mode 100644 index e7e0935e..00000000 --- a/node_modules/browserify-fs/node_modules/levelup/node_modules/deferred-leveldown/node_modules/abstract-leveldown/abstract/put-get-del-test.js +++ /dev/null @@ -1,167 +0,0 @@ -/**** SETUP & UTILITY STUFF ****/ - - -var db - , testBuffer - , test - , verifyNotFoundError = require('./util').verifyNotFoundError - , isTypedArray = require('./util').isTypedArray - -function makeGetDelErrorTests (type, key, expectedError) { - test('test get() with ' + type + ' causes error', function (t) { - db.get(key, function (err) { - t.ok(err, 'has error') - t.ok(err instanceof Error) - t.ok(err.message.match(expectedError), 'correct error message') - t.end() - }) - }) - - test('test del() with ' + type + ' causes error', function (t) { - db.del(key, function (err) { - t.ok(err, 'has error') - t.ok(err instanceof Error) - t.ok(err.message.match(expectedError), 'correct error message') - t.end() - }) - }) -} - -function makePutErrorTest (type, key, value, expectedError) { - test('test put() with ' + type + ' causes error', function (t) { - db.put(key, value, function (err) { - t.ok(err, 'has error') - t.ok(err instanceof Error) - t.ok(err.message.match(expectedError), 'correct error message') - t.end() - }) - }) -} - -function makePutGetDelSuccessfulTest (type, key, value) { - test('test put()/get()/del() with ' + type, function (t) { - db.put(key, value, function (err) { - t.notOk(err, 'no error') - db.get(key, function (err, _value) { - t.notOk(err, 'no error, has key/value for `' + key + '`') - t.ok(Buffer.isBuffer(_value), 'is a Buffer') - var result = _value.toString() - value = value.toString() - t.equals(result, value) - db.del(key, function (err) { - t.notOk(err, 'no error, deleted key/value for `' + key + '`') - db.get(key, function (err, value) { - t.ok(err, 'entry propertly deleted') - t.ok(verifyNotFoundError(err), 'should have correct error message') - t.ok(typeof value == 'undefined', 'value is undefined') - t.end() - }) - }) - }) - }) - }) -} - -function makeErrorKeyTest (type, key, expectedError) { - makeGetDelErrorTests(type, key, expectedError) - makePutErrorTest(type, key, 'foo', expectedError) -} - -/**** SETUP ENVIRONMENT ****/ - -module.exports.setUp = function (leveldown, test, testCommon) { - test('setUp common', testCommon.setUp) - test('setUp db', function (t) { - db = leveldown(testCommon.location()) - db.open(t.end.bind(t)) - }) -} - -/**** TEST ERROR KEYS ****/ - -module.exports.errorKeys = function (testFunc, BufferType) { - if (!BufferType) BufferType = Buffer - test = testFunc - makeErrorKeyTest('null key', null, /key cannot be `null` or `undefined`/) - makeErrorKeyTest('undefined key', undefined, /key cannot be `null` or `undefined`/) - makeErrorKeyTest('empty String key', '', /key cannot be an empty String/) - makeErrorKeyTest('empty Buffer key', new BufferType(0), /key cannot be an empty \w*Buffer/) - makeErrorKeyTest('empty Array key', [], /key cannot be an empty String/) -} - -/**** TEST NON-ERROR KEYS ****/ - -module.exports.nonErrorKeys = function (testFunc) { - // valid falsey keys - test = testFunc - makePutGetDelSuccessfulTest('`false` key', false, 'foo false') - makePutGetDelSuccessfulTest('`0` key', 0, 'foo 0') - makePutGetDelSuccessfulTest('`NaN` key', NaN, 'foo NaN') - - // standard String key - makePutGetDelSuccessfulTest( - 'long String key' - , 'some long string that I\'m using as a key for this unit test, cross your fingers dude, we\'re going in!' - , 'foo' - ) - - if (!process.browser) { - // Buffer key - makePutGetDelSuccessfulTest('Buffer key', testBuffer, 'foo') - } - - // non-empty Array as a value - makePutGetDelSuccessfulTest('Array value', 'foo', [1,2,3,4]) -} - -/**** TEST ERROR VALUES ****/ - -module.exports.errorValues = function (testFunc, BufferType) { - if (!BufferType) BufferType = Buffer - test = testFunc - makePutErrorTest('null value', 'foo', null, /value cannot be `null` or `undefined`/) - makePutErrorTest('undefined value', 'foo', undefined, /value cannot be `null` or `undefined`/) - makePutErrorTest('empty String value', 'foo', '', /value cannot be an empty String/) - makePutErrorTest('empty Buffer value', 'foo', new BufferType(0), /value cannot be an empty \w*Buffer/) - makePutErrorTest('empty Array value', 'foo', [], /value cannot be an empty String/) -} - -module.exports.nonErrorKeys = function (testFunc) { - // valid falsey values - test = testFunc - makePutGetDelSuccessfulTest('`false` value', 'foo false', false) - makePutGetDelSuccessfulTest('`0` value', 'foo 0', 0) - makePutGetDelSuccessfulTest('`NaN` value', 'foo NaN', NaN) - - // standard String value - makePutGetDelSuccessfulTest( - 'long String value' - , 'foo' - , 'some long string that I\'m using as a key for this unit test, cross your fingers dude, we\'re going in!' - ) - - // standard Buffer value - makePutGetDelSuccessfulTest('Buffer value', 'foo', testBuffer) - - // non-empty Array as a key - makePutGetDelSuccessfulTest('Array key', [1,2,3,4], 'foo') -} - -/**** CLEANUP ENVIRONMENT ****/ - -module.exports.tearDown = function (test, testCommon) { - test('tearDown', function (t) { - db.close(testCommon.tearDown.bind(null, t)) - }) -} - -module.exports.all = function (leveldown, testFunc, testCommon, buffer, BufferType) { - testBuffer = buffer - test = testFunc - module.exports.setUp(leveldown, test, testCommon) - module.exports.errorKeys(test, BufferType) - module.exports.nonErrorKeys(test) - module.exports.errorValues(test, BufferType) - module.exports.nonErrorKeys(test) - module.exports.tearDown(test, testCommon) -} diff --git a/node_modules/browserify-fs/node_modules/levelup/node_modules/deferred-leveldown/node_modules/abstract-leveldown/abstract/put-test.js b/node_modules/browserify-fs/node_modules/levelup/node_modules/deferred-leveldown/node_modules/abstract-leveldown/abstract/put-test.js deleted file mode 100644 index 55558eef..00000000 --- a/node_modules/browserify-fs/node_modules/levelup/node_modules/deferred-leveldown/node_modules/abstract-leveldown/abstract/put-test.js +++ /dev/null @@ -1,92 +0,0 @@ -var db - , verifyNotFoundError = require('./util').verifyNotFoundError - , isTypedArray = require('./util').isTypedArray - -module.exports.setUp = function (leveldown, test, testCommon) { - test('setUp common', testCommon.setUp) - test('setUp db', function (t) { - db = leveldown(testCommon.location()) - db.open(t.end.bind(t)) - }) -} - -module.exports.args = function (test) { - test('test argument-less put() throws', function (t) { - t.throws( - db.put.bind(db) - , { name: 'Error', message: 'put() requires a callback argument' } - , 'no-arg put() throws' - ) - t.end() - }) - - test('test callback-less, 1-arg, put() throws', function (t) { - t.throws( - db.put.bind(db, 'foo') - , { name: 'Error', message: 'put() requires a callback argument' } - , 'callback-less, 1-arg put() throws' - ) - t.end() - }) - - test('test callback-less, 2-arg, put() throws', function (t) { - t.throws( - db.put.bind(db, 'foo', 'bar') - , { name: 'Error', message: 'put() requires a callback argument' } - , 'callback-less, 2-arg put() throws' - ) - t.end() - }) - - test('test callback-less, 3-arg, put() throws', function (t) { - t.throws( - db.put.bind(db, 'foo', 'bar', {}) - , { name: 'Error', message: 'put() requires a callback argument' } - , 'callback-less, 3-arg put() throws' - ) - t.end() - }) -} - -module.exports.put = function (test) { - test('test simple put()', function (t) { - db.put('foo', 'bar', function (err) { - t.notOk(err, 'no error') - db.get('foo', function (err, value) { - t.notOk(err, 'no error') - var result = value.toString() - if (isTypedArray(value)) - result = String.fromCharCode.apply(null, new Uint16Array(value)) - t.equal(result, 'bar') - t.end() - }) - }) - }) - - if (process.browser) { - test('test object value put()', function (t) { - db.put('dood', {pete: 'sampras'}, function (err) { - t.notOk(err, 'no error') - db.get('dood', { asBuffer: false }, function (err, value) { - t.notOk(err, 'no error') - t.equal(JSON.stringify(value), JSON.stringify({pete: 'sampras'})) - t.end() - }) - }) - }) - } - -} - -module.exports.tearDown = function (test, testCommon) { - test('tearDown', function (t) { - db.close(testCommon.tearDown.bind(null, t)) - }) -} - -module.exports.all = function (leveldown, test, testCommon) { - module.exports.setUp(leveldown, test, testCommon) - module.exports.args(test) - module.exports.put(test) - module.exports.tearDown(test, testCommon) -} \ No newline at end of file diff --git a/node_modules/browserify-fs/node_modules/levelup/node_modules/deferred-leveldown/node_modules/abstract-leveldown/abstract/ranges-test.js b/node_modules/browserify-fs/node_modules/levelup/node_modules/deferred-leveldown/node_modules/abstract-leveldown/abstract/ranges-test.js deleted file mode 100644 index 9b8e1da1..00000000 --- a/node_modules/browserify-fs/node_modules/levelup/node_modules/deferred-leveldown/node_modules/abstract-leveldown/abstract/ranges-test.js +++ /dev/null @@ -1,435 +0,0 @@ -var db - , sourceData = require('./iterator-test').sourceData - , transformSource = require('./iterator-test').transformSource - -module.exports.setUp = function (leveldown, test, testCommon) { - test('setUp common', testCommon.setUp) - test('setUp db', function (t) { - db = leveldown(testCommon.location()) - db.open(t.end.bind(t)) - }) -} - -module.exports.iterator = function (leveldown, test, testCommon, collectEntries) { - test('test simple iterator()', function (t) { - var data = [ - { type: 'put', key: 'foobatch1', value: 'bar1' } - , { type: 'put', key: 'foobatch2', value: 'bar2' } - , { type: 'put', key: 'foobatch3', value: 'bar3' } - ] - , idx = 0 - - db.batch(data, function (err) { - t.notOk(err, 'no error') - var iterator = db.iterator() - , fn = function (err, key, value) { - t.notOk(err, 'no error') - if (key && value) { - t.equal(key.toString(), data[idx].key, 'correct key') - t.equal(value.toString(), data[idx].value, 'correct value') - process.nextTick(next) - idx++ - } else { // end - t.ok(typeof err === 'undefined', 'err argument is undefined') - t.ok(typeof key === 'undefined', 'key argument is undefined') - t.ok(typeof value === 'undefined', 'value argument is undefined') - t.equal(idx, data.length, 'correct number of entries') - iterator.end(function () { - t.end() - }) - } - } - , next = function () { - iterator.next(fn) - } - - next() - }) - }) - - /** the following tests are mirroring the same series of tests in - * LevelUP read-stream-test.js - */ - - test('setUp #2', function (t) { - db.close(function () { - db = leveldown(testCommon.location()) - db.open(function () { - db.batch(sourceData, t.end.bind(t)) - }) - }) - }) - - test('test full data collection', function (t) { - collectEntries(db.iterator({ keyAsBuffer: false, valueAsBuffer: false }), function (err, data) { - t.notOk(err, 'no error') - t.equal(data.length, sourceData.length, 'correct number of entries') - var expected = sourceData.map(transformSource) - t.deepEqual(data, expected) - t.end() - }) - }) - - test('test iterator with reverse=true', function (t) { - collectEntries(db.iterator({ keyAsBuffer: false, valueAsBuffer: false, reverse: true }), function (err, data) { - t.notOk(err, 'no error') - t.equal(data.length, sourceData.length, 'correct number of entries') - var expected = sourceData.slice().reverse().map(transformSource) - t.deepEqual(data, expected) - t.end() - }) - }) - - test('test iterator with gte=0', function (t) { - collectEntries(db.iterator({ keyAsBuffer: false, valueAsBuffer: false, gte: '00' }), function (err, data) { - t.notOk(err, 'no error') - t.equal(data.length, sourceData.length, 'correct number of entries') - var expected = sourceData.map(transformSource) - t.deepEqual(data, expected) - t.end() - }) - }) - - test('test iterator with gte=50', function (t) { - collectEntries(db.iterator({ keyAsBuffer: false, valueAsBuffer: false, gte: '50' }), function (err, data) { - t.notOk(err, 'no error') - t.equal(data.length, 50, 'correct number of entries') - var expected = sourceData.slice(50).map(transformSource) - t.deepEqual(data, expected) - t.end() - }) - }) - - test('test iterator with lte=50 and reverse=true', function (t) { - collectEntries(db.iterator({ keyAsBuffer: false, valueAsBuffer: false, lte: '50', reverse: true }), function (err, data) { - t.notOk(err, 'no error') - t.equal(data.length, 51, 'correct number of entries') - var expected = sourceData.slice().reverse().slice(49).map(transformSource) - t.deepEqual(data, expected) - t.end() - }) - }) - - test('test iterator with start being a midway key (49.5)', function (t) { - collectEntries(db.iterator({ keyAsBuffer: false, valueAsBuffer: false, gte: '49.5' }), function (err, data) { - t.notOk(err, 'no error') - t.equal(data.length, 50, 'correct number of entries') - var expected = sourceData.slice(50).map(transformSource) - t.deepEqual(data, expected) - t.end() - }) - }) - - test('test iterator with start being a midway key (49999)', function (t) { - collectEntries(db.iterator({ keyAsBuffer: false, valueAsBuffer: false, gte: '49999' }), function (err, data) { - t.notOk(err, 'no error') - t.equal(data.length, 50, 'correct number of entries') - var expected = sourceData.slice(50).map(transformSource) - t.deepEqual(data, expected) - t.end() - }) - }) - - test('test iterator with start being a midway key and reverse=true', function (t) { - collectEntries(db.iterator({ keyAsBuffer: false, valueAsBuffer: false, lte: '49.5', reverse: true }), function (err, data) { - t.notOk(err, 'no error') - t.equal(data.length, 50, 'correct number of entries') - var expected = sourceData.slice().reverse().slice(50).map(transformSource) - t.deepEqual(data, expected) - t.end() - }) - }) - - test('test iterator with start being a midway key and reverse=true', function (t) { - collectEntries(db.iterator({ keyAsBuffer: false, valueAsBuffer: false, lt: '49.5', reverse: true }), function (err, data) { - t.notOk(err, 'no error') - t.equal(data.length, 50, 'correct number of entries') - var expected = sourceData.slice().reverse().slice(50).map(transformSource) - t.deepEqual(data, expected) - t.end() - }) - }) - - test('test iterator with start being a midway key and reverse=true', function (t) { - collectEntries(db.iterator({ keyAsBuffer: false, valueAsBuffer: false, lt: '50', reverse: true }), function (err, data) { - t.notOk(err, 'no error') - t.equal(data.length, 50, 'correct number of entries') - var expected = sourceData.slice().reverse().slice(50).map(transformSource) - t.deepEqual(data, expected) - t.end() - }) - }) - - test('test iterator with end=50', function (t) { - collectEntries(db.iterator({ keyAsBuffer: false, valueAsBuffer: false, lte: '50' }), function (err, data) { - t.notOk(err, 'no error') - t.equal(data.length, 51, 'correct number of entries') - var expected = sourceData.slice(0, 51).map(transformSource) - t.deepEqual(data, expected) - t.end() - }) - }) - - test('test iterator with end being a midway key (50.5)', function (t) { - collectEntries(db.iterator({ keyAsBuffer: false, valueAsBuffer: false, lte: '50.5' }), function (err, data) { - t.notOk(err, 'no error') - t.equal(data.length, 51, 'correct number of entries') - var expected = sourceData.slice(0, 51).map(transformSource) - t.deepEqual(data, expected) - t.end() - }) - }) - - test('test iterator with end being a midway key (50555)', function (t) { - collectEntries(db.iterator({ keyAsBuffer: false, valueAsBuffer: false, lte: '50555' }), function (err, data) { - t.notOk(err, 'no error') - t.equal(data.length, 51, 'correct number of entries') - var expected = sourceData.slice(0, 51).map(transformSource) - t.deepEqual(data, expected) - t.end() - }) - }) - - test('test iterator with end being a midway key (50555)', function (t) { - collectEntries(db.iterator({ keyAsBuffer: false, valueAsBuffer: false, lt: '50555' }), function (err, data) { - t.notOk(err, 'no error') - t.equal(data.length, 51, 'correct number of entries') - var expected = sourceData.slice(0, 51).map(transformSource) - t.deepEqual(data, expected) - t.end() - }) - }) - - test('test iterator with end being a midway key and reverse=true', function (t) { - collectEntries(db.iterator({ keyAsBuffer: false, valueAsBuffer: false, gte: '50.5', reverse: true }), function (err, data) { - t.notOk(err, 'no error') - t.equal(data.length, 49, 'correct number of entries') - var expected = sourceData.slice().reverse().slice(0, 49).map(transformSource) - t.deepEqual(data, expected) - t.end() - }) - }) - - test('test iterator with gt a midway key and reverse=true', function (t) { - collectEntries(db.iterator({ keyAsBuffer: false, valueAsBuffer: false, gt: '50.5', reverse: true }), function (err, data) { - t.notOk(err, 'no error') - t.equal(data.length, 49, 'correct number of entries') - var expected = sourceData.slice().reverse().slice(0, 49).map(transformSource) - t.deepEqual(data, expected) - t.end() - }) - }) - - test('test iterator with gt a midway key and reverse=true', function (t) { - collectEntries(db.iterator({ keyAsBuffer: false, valueAsBuffer: false, gt: '50', reverse: true }), function (err, data) { - t.notOk(err, 'no error') - t.equal(data.length, 49, 'correct number of entries') - var expected = sourceData.slice().reverse().slice(0, 49).map(transformSource) - t.deepEqual(data, expected) - t.end() - }) - }) - - test('test iterator with gt 50 key and reverse=true', function (t) { - collectEntries(db.iterator({ keyAsBuffer: false, valueAsBuffer: false, gt: '50', reverse: true }), function (err, data) { - t.notOk(err, 'no error') - t.equal(data.length, 49, 'correct number of entries') - var expected = sourceData.slice().reverse().slice(0, 49).map(transformSource) - t.deepEqual(data, expected) - t.end() - }) - }) - - // end='0', starting key is actually '00' so it should avoid it - test('test iterator with end=0', function (t) { - collectEntries(db.iterator({ keyAsBuffer: false, valueAsBuffer: false, lte: '0' }), function (err, data) { - t.notOk(err, 'no error') - t.equal(data.length, 0, 'correct number of entries') - t.end() - }) - }) - - // end='0', starting key is actually '00' so it should avoid it - test('test iterator with end<0', function (t) { - collectEntries(db.iterator({ keyAsBuffer: false, valueAsBuffer: false, lt: '0' }), function (err, data) { - t.notOk(err, 'no error') - t.equal(data.length, 0, 'correct number of entries') - t.end() - }) - }) - - test('test iterator with start=30 and end=70', function (t) { - collectEntries(db.iterator({ keyAsBuffer: false, valueAsBuffer: false, gte: '30', lte: '70' }), function (err, data) { - t.notOk(err, 'no error') - t.equal(data.length, 41, 'correct number of entries') - var expected = sourceData.slice(30, 71).map(transformSource) - t.deepEqual(data, expected) - t.end() - }) - }) - - test('test iterator with start=30 and end=70', function (t) { - collectEntries(db.iterator({ keyAsBuffer: false, valueAsBuffer: false, gt: '29', lt: '71' }), function (err, data) { - t.notOk(err, 'no error') - t.equal(data.length, 41, 'correct number of entries') - var expected = sourceData.slice(30, 71).map(transformSource) - t.deepEqual(data, expected) - t.end() - }) - }) - - test('test iterator with start=30 and end=70 and reverse=true', function (t) { - collectEntries(db.iterator({ keyAsBuffer: false, valueAsBuffer: false, lte: '70', gte: '30', reverse: true }), function (err, data) { - t.notOk(err, 'no error') - t.equal(data.length, 41, 'correct number of entries') - var expected = sourceData.slice().reverse().slice(29, 70).map(transformSource) - t.deepEqual(data, expected) - t.end() - }) - }) - - test('test iterator with start=30 and end=70 and reverse=true', function (t) { - collectEntries(db.iterator({ keyAsBuffer: false, valueAsBuffer: false, lt: '71', gt: '29', reverse: true }), function (err, data) { - t.notOk(err, 'no error') - t.equal(data.length, 41, 'correct number of entries') - var expected = sourceData.slice().reverse().slice(29, 70).map(transformSource) - t.deepEqual(data, expected) - t.end() - }) - }) - - test('test iterator with limit=20 and start=20', function (t) { - collectEntries(db.iterator({ keyAsBuffer: false, valueAsBuffer: false, gte: '20', limit: 20 }), function (err, data) { - t.notOk(err, 'no error') - t.equal(data.length, 20, 'correct number of entries') - var expected = sourceData.slice(20, 40).map(transformSource) - t.deepEqual(data, expected) - t.end() - }) - }) - - test('test iterator with limit=20 and start=79 and reverse=true', function (t) { - collectEntries(db.iterator({ keyAsBuffer: false, valueAsBuffer: false, lte: '79', limit: 20, reverse: true }), function (err, data) { - t.notOk(err, 'no error') - t.equal(data.length, 20, 'correct number of entries') - var expected = sourceData.slice().reverse().slice(20, 40).map(transformSource) - t.deepEqual(data, expected) - t.end() - }) - }) - - test('test iterator with end after limit', function (t) { - collectEntries(db.iterator({ keyAsBuffer: false, valueAsBuffer: false, limit: 20, lte: '50' }), function (err, data) { - t.notOk(err, 'no error') - t.equal(data.length, 20, 'correct number of entries') - var expected = sourceData.slice(0, 20).map(transformSource) - t.deepEqual(data, expected) - t.end() - }) - }) - - test('test iterator with end before limit', function (t) { - collectEntries(db.iterator({ keyAsBuffer: false, valueAsBuffer: false, limit: 50, lte: '19' }), function (err, data) { - t.notOk(err, 'no error') - t.equal(data.length, 20, 'correct number of entries') - var expected = sourceData.slice(0, 20).map(transformSource) - t.deepEqual(data, expected) - t.end() - }) - }) - - test('test iterator with start after database end', function (t) { - collectEntries(db.iterator({ keyAsBuffer: false, valueAsBuffer: false, gte: '9a' }), function (err, data) { - t.notOk(err, 'no error') - t.equal(data.length, 0, 'correct number of entries') - t.end() - }) - }) - - test('test iterator with start after database end', function (t) { - collectEntries(db.iterator({ keyAsBuffer: false, valueAsBuffer: false, gt: '9a' }), function (err, data) { - t.notOk(err, 'no error') - t.equal(data.length, 0, 'correct number of entries') - t.end() - }) - }) - - test('test iterator with start after database end and reverse=true', function (t) { - collectEntries(db.iterator({ keyAsBuffer: false, valueAsBuffer: false, lte: '9a', reverse: true }), function (err, data) { - t.notOk(err, 'no error') - t.equal(data.length, sourceData.length, 'correct number of entries') - var expected = sourceData.slice().reverse().map(transformSource) - t.deepEqual(data, expected) - t.end() - }) - }) - - test('test iterator with start and end after database and and reverse=true', function (t) { - collectEntries(db.iterator({ lte: '9b', gte: '9a', reverse: true }), function (err, data) { - t.notOk(err, 'no error') - t.equal(data.length, 0, 'correct number of entries') - t.end() - }) - }) - - test('test iterator with lt and gt after database and and reverse=true', function (t) { - collectEntries(db.iterator({ lt: '9b', gt: '9a', reverse: true }), function (err, data) { - t.notOk(err, 'no error') - t.equal(data.length, 0, 'correct number of entries') - t.end() - }) - }) - - function testIteratorCollectsFullDatabase (name, iteratorOptions) { - iteratorOptions.keyAsBuffer = false - iteratorOptions.valueAsBuffer = false - test(name, function (t) { - collectEntries(db.iterator(iteratorOptions), function (err, data) { - t.notOk(err, 'no error') - t.equal(data.length, 100, 'correct number of entries') - var expected = sourceData.map(transformSource) - t.deepEqual(data, expected) - t.end() - }) - }) - } - if (!process.browser) { - // Can't use buffers as query keys in indexeddb (I think :P) - testIteratorCollectsFullDatabase( - 'test iterator with start as empty buffer' - , { start: new Buffer(0) } - ) - testIteratorCollectsFullDatabase( - 'test iterator with end as empty buffer' - , { end: new Buffer(0) } - ) - } - testIteratorCollectsFullDatabase( - 'test iterator with start as empty string' - , { gte: '' } - ) - testIteratorCollectsFullDatabase( - 'test iterator with start as null' - , { gte: null } - ) - testIteratorCollectsFullDatabase( - 'test iterator with end as empty string' - , { lte: '' } - ) - testIteratorCollectsFullDatabase( - 'test iterator with end as null' - , { lte: null } - ) -} - -module.exports.tearDown = function (test, testCommon) { - test('tearDown', function (t) { - db.close(testCommon.tearDown.bind(null, t)) - }) -} - -module.exports.all = function (leveldown, test, testCommon) { - module.exports.setUp(leveldown, test, testCommon) - module.exports.iterator(leveldown, test, testCommon, testCommon.collectEntries) - module.exports.tearDown(test, testCommon) -} diff --git a/node_modules/browserify-fs/node_modules/levelup/node_modules/deferred-leveldown/node_modules/abstract-leveldown/abstract/util.js b/node_modules/browserify-fs/node_modules/levelup/node_modules/deferred-leveldown/node_modules/abstract-leveldown/abstract/util.js deleted file mode 100644 index 2ae5a4f8..00000000 --- a/node_modules/browserify-fs/node_modules/levelup/node_modules/deferred-leveldown/node_modules/abstract-leveldown/abstract/util.js +++ /dev/null @@ -1,10 +0,0 @@ -var nfre = /NotFound/i - -module.exports.verifyNotFoundError = function verifyNotFoundError (err) { - return nfre.test(err.message) || nfre.test(err.name) -} - -module.exports.isTypedArray = function isTypedArray (value) { - return (typeof ArrayBuffer != 'undefined' && value instanceof ArrayBuffer) - || (typeof Uint8Array != 'undefined' && value instanceof Uint8Array) -} diff --git a/node_modules/browserify-fs/node_modules/levelup/node_modules/deferred-leveldown/node_modules/abstract-leveldown/package.json b/node_modules/browserify-fs/node_modules/levelup/node_modules/deferred-leveldown/node_modules/abstract-leveldown/package.json deleted file mode 100644 index c4b82161..00000000 --- a/node_modules/browserify-fs/node_modules/levelup/node_modules/deferred-leveldown/node_modules/abstract-leveldown/package.json +++ /dev/null @@ -1,123 +0,0 @@ -{ - "name": "abstract-leveldown", - "description": "An abstract prototype matching the LevelDOWN API", - "version": "0.12.4", - "contributors": [ - { - "name": "Rod Vagg", - "email": "r@va.gg", - "url": "https://github.com/rvagg" - }, - { - "name": "John Chesley", - "email": "john@chesl.es", - "url": "https://github.com/chesles/" - }, - { - "name": "Jake Verbaten", - "email": "raynos2@gmail.com", - "url": "https://github.com/raynos" - }, - { - "name": "Dominic Tarr", - "email": "dominic.tarr@gmail.com", - "url": "https://github.com/dominictarr" - }, - { - "name": "Max Ogden", - "email": "max@maxogden.com", - "url": "https://github.com/maxogden" - }, - { - "name": "Lars-Magnus Skog", - "email": "lars.magnus.skog@gmail.com", - "url": "https://github.com/ralphtheninja" - }, - { - "name": "David Björklund", - "email": "david.bjorklund@gmail.com", - "url": "https://github.com/kesla" - }, - { - "name": "Julian Gruber", - "email": "julian@juliangruber.com", - "url": "https://github.com/juliangruber" - }, - { - "name": "Paolo Fragomeni", - "email": "paolo@async.ly", - "url": "https://github.com/hij1nx" - }, - { - "name": "Anton Whalley", - "email": "anton.whalley@nearform.com", - "url": "https://github.com/No9" - }, - { - "name": "Matteo Collina", - "email": "matteo.collina@gmail.com", - "url": "https://github.com/mcollina" - }, - { - "name": "Pedro Teixeira", - "email": "pedro.teixeira@gmail.com", - "url": "https://github.com/pgte" - }, - { - "name": "James Halliday", - "email": "mail@substack.net", - "url": "https://github.com/substack" - } - ], - "repository": { - "type": "git", - "url": "https://github.com/rvagg/node-abstract-leveldown.git" - }, - "homepage": "https://github.com/rvagg/node-abstract-leveldown", - "keywords": [ - "leveldb", - "leveldown", - "levelup" - ], - "main": "./abstract-leveldown.js", - "dependencies": { - "xtend": "~3.0.0" - }, - "devDependencies": { - "tap": "*", - "sinon": "*", - "rimraf": "*" - }, - "browser": { - "rimraf": false - }, - "scripts": { - "test": "node ./test.js" - }, - "license": "MIT", - "gitHead": "7be6adfe726ccb23e52fd803ade008e85f072cd3", - "bugs": { - "url": "https://github.com/rvagg/node-abstract-leveldown/issues" - }, - "_id": "abstract-leveldown@0.12.4", - "_shasum": "29e18e632e60e4e221d5810247852a63d7b2e410", - "_from": "abstract-leveldown@>=0.12.1 <0.13.0", - "_npmVersion": "1.4.14", - "_npmUser": { - "name": "rvagg", - "email": "rod@vagg.org" - }, - "maintainers": [ - { - "name": "rvagg", - "email": "rod@vagg.org" - } - ], - "dist": { - "shasum": "29e18e632e60e4e221d5810247852a63d7b2e410", - "tarball": "https://registry.npmjs.org/abstract-leveldown/-/abstract-leveldown-0.12.4.tgz" - }, - "directories": {}, - "_resolved": "https://registry.npmjs.org/abstract-leveldown/-/abstract-leveldown-0.12.4.tgz", - "readme": "ERROR: No README data found!" -} diff --git a/node_modules/browserify-fs/node_modules/levelup/node_modules/deferred-leveldown/node_modules/abstract-leveldown/test.js b/node_modules/browserify-fs/node_modules/levelup/node_modules/deferred-leveldown/node_modules/abstract-leveldown/test.js deleted file mode 100644 index 4ec28702..00000000 --- a/node_modules/browserify-fs/node_modules/levelup/node_modules/deferred-leveldown/node_modules/abstract-leveldown/test.js +++ /dev/null @@ -1,559 +0,0 @@ -const tap = require('tap') - , sinon = require('sinon') - , util = require('util') - , testCommon = require('./testCommon') - , AbstractLevelDOWN = require('./').AbstractLevelDOWN - , AbstractIterator = require('./').AbstractIterator - , AbstractChainedBatch = require('./').AbstractChainedBatch - -function factory (location) { - return new AbstractLevelDOWN(location) -} - -/*** compatibility with basic LevelDOWN API ***/ - -require('./abstract/leveldown-test').args(factory, tap.test, testCommon) - -require('./abstract/open-test').args(factory, tap.test, testCommon) - -require('./abstract/del-test').setUp(factory, tap.test, testCommon) -require('./abstract/del-test').args(tap.test) - -require('./abstract/get-test').setUp(factory, tap.test, testCommon) -require('./abstract/get-test').args(tap.test) - -require('./abstract/put-test').setUp(factory, tap.test, testCommon) -require('./abstract/put-test').args(tap.test) - -require('./abstract/put-get-del-test').setUp(factory, tap.test, testCommon) -require('./abstract/put-get-del-test').errorKeys(tap.test) -//require('./abstract/put-get-del-test').nonErrorKeys(tap.test, testCommon) -require('./abstract/put-get-del-test').errorValues(tap.test) -//require('./abstract/test/put-get-del-test').nonErrorKeys(tap.test, testCommon) -require('./abstract/put-get-del-test').tearDown(tap.test, testCommon) - -require('./abstract/approximate-size-test').setUp(factory, tap.test, testCommon) -require('./abstract/approximate-size-test').args(tap.test) - -require('./abstract/batch-test').setUp(factory, tap.test, testCommon) -require('./abstract/batch-test').args(tap.test) - -require('./abstract/chained-batch-test').setUp(factory, tap.test, testCommon) -require('./abstract/chained-batch-test').args(tap.test) - -require('./abstract/close-test').close(factory, tap.test, testCommon) - -require('./abstract/iterator-test').setUp(factory, tap.test, testCommon) -require('./abstract/iterator-test').args(tap.test) -require('./abstract/iterator-test').sequence(tap.test) - -/*** extensibility ***/ - -tap.test('test core extensibility', function (t) { - function Test (location) { - AbstractLevelDOWN.call(this, location) - t.equal(this.location, location, 'location set on `this`') - t.end() - } - - util.inherits(Test, AbstractLevelDOWN) - - ;new Test('foobar') -}) - -tap.test('test open() extensibility', function (t) { - var spy = sinon.spy() - , expectedCb = function () {} - , expectedOptions = { options: 1 } - , test - - function Test (location) { - AbstractLevelDOWN.call(this, location) - } - - util.inherits(Test, AbstractLevelDOWN) - - Test.prototype._open = spy - - test = new Test('foobar') - test.open(expectedCb) - - t.equal(spy.callCount, 1, 'got _open() call') - t.equal(spy.getCall(0).thisValue, test, '`this` on _open() was correct') - t.equal(spy.getCall(0).args.length, 2, 'got two arguments') - t.deepEqual(spy.getCall(0).args[0], {}, 'got blank options argument') - t.equal(spy.getCall(0).args[1], expectedCb, 'got expected cb argument') - - test.open(expectedOptions, expectedCb) - - t.equal(spy.callCount, 2, 'got _open() call') - t.equal(spy.getCall(1).thisValue, test, '`this` on _open() was correct') - t.equal(spy.getCall(1).args.length, 2, 'got two arguments') - t.deepEqual(spy.getCall(1).args[0], expectedOptions, 'got blank options argument') - t.equal(spy.getCall(1).args[1], expectedCb, 'got expected cb argument') - t.end() -}) - -tap.test('test close() extensibility', function (t) { - var spy = sinon.spy() - , expectedCb = function () {} - , test - - function Test (location) { - AbstractLevelDOWN.call(this, location) - } - - util.inherits(Test, AbstractLevelDOWN) - - Test.prototype._close = spy - - test = new Test('foobar') - test.close(expectedCb) - - t.equal(spy.callCount, 1, 'got _close() call') - t.equal(spy.getCall(0).thisValue, test, '`this` on _close() was correct') - t.equal(spy.getCall(0).args.length, 1, 'got one arguments') - t.equal(spy.getCall(0).args[0], expectedCb, 'got expected cb argument') - t.end() -}) - -tap.test('test get() extensibility', function (t) { - var spy = sinon.spy() - , expectedCb = function () {} - , expectedOptions = { options: 1 } - , expectedKey = 'a key' - , test - - function Test (location) { - AbstractLevelDOWN.call(this, location) - } - - util.inherits(Test, AbstractLevelDOWN) - - Test.prototype._get = spy - - test = new Test('foobar') - test.get(expectedKey, expectedCb) - - t.equal(spy.callCount, 1, 'got _get() call') - t.equal(spy.getCall(0).thisValue, test, '`this` on _get() was correct') - t.equal(spy.getCall(0).args.length, 3, 'got three arguments') - t.equal(spy.getCall(0).args[0], expectedKey, 'got expected key argument') - t.deepEqual(spy.getCall(0).args[1], {}, 'got blank options argument') - t.equal(spy.getCall(0).args[2], expectedCb, 'got expected cb argument') - - test.get(expectedKey, expectedOptions, expectedCb) - - t.equal(spy.callCount, 2, 'got _get() call') - t.equal(spy.getCall(1).thisValue, test, '`this` on _get() was correct') - t.equal(spy.getCall(1).args.length, 3, 'got three arguments') - t.equal(spy.getCall(1).args[0], expectedKey, 'got expected key argument') - t.deepEqual(spy.getCall(1).args[1], expectedOptions, 'got blank options argument') - t.equal(spy.getCall(1).args[2], expectedCb, 'got expected cb argument') - t.end() -}) - -tap.test('test del() extensibility', function (t) { - var spy = sinon.spy() - , expectedCb = function () {} - , expectedOptions = { options: 1 } - , expectedKey = 'a key' - , test - - function Test (location) { - AbstractLevelDOWN.call(this, location) - } - - util.inherits(Test, AbstractLevelDOWN) - - Test.prototype._del = spy - - test = new Test('foobar') - test.del(expectedKey, expectedCb) - - t.equal(spy.callCount, 1, 'got _del() call') - t.equal(spy.getCall(0).thisValue, test, '`this` on _del() was correct') - t.equal(spy.getCall(0).args.length, 3, 'got three arguments') - t.equal(spy.getCall(0).args[0], expectedKey, 'got expected key argument') - t.deepEqual(spy.getCall(0).args[1], {}, 'got blank options argument') - t.equal(spy.getCall(0).args[2], expectedCb, 'got expected cb argument') - - test.del(expectedKey, expectedOptions, expectedCb) - - t.equal(spy.callCount, 2, 'got _del() call') - t.equal(spy.getCall(1).thisValue, test, '`this` on _del() was correct') - t.equal(spy.getCall(1).args.length, 3, 'got three arguments') - t.equal(spy.getCall(1).args[0], expectedKey, 'got expected key argument') - t.deepEqual(spy.getCall(1).args[1], expectedOptions, 'got blank options argument') - t.equal(spy.getCall(1).args[2], expectedCb, 'got expected cb argument') - t.end() -}) - -tap.test('test put() extensibility', function (t) { - var spy = sinon.spy() - , expectedCb = function () {} - , expectedOptions = { options: 1 } - , expectedKey = 'a key' - , expectedValue = 'a value' - , test - - function Test (location) { - AbstractLevelDOWN.call(this, location) - } - - util.inherits(Test, AbstractLevelDOWN) - - Test.prototype._put = spy - - test = new Test('foobar') - test.put(expectedKey, expectedValue, expectedCb) - - t.equal(spy.callCount, 1, 'got _put() call') - t.equal(spy.getCall(0).thisValue, test, '`this` on _put() was correct') - t.equal(spy.getCall(0).args.length, 4, 'got four arguments') - t.equal(spy.getCall(0).args[0], expectedKey, 'got expected key argument') - t.equal(spy.getCall(0).args[1], expectedValue, 'got expected value argument') - t.deepEqual(spy.getCall(0).args[2], {}, 'got blank options argument') - t.equal(spy.getCall(0).args[3], expectedCb, 'got expected cb argument') - - test.put(expectedKey, expectedValue, expectedOptions, expectedCb) - - t.equal(spy.callCount, 2, 'got _put() call') - t.equal(spy.getCall(1).thisValue, test, '`this` on _put() was correct') - t.equal(spy.getCall(1).args.length, 4, 'got four arguments') - t.equal(spy.getCall(1).args[0], expectedKey, 'got expected key argument') - t.equal(spy.getCall(1).args[1], expectedValue, 'got expected value argument') - t.deepEqual(spy.getCall(1).args[2], expectedOptions, 'got blank options argument') - t.equal(spy.getCall(1).args[3], expectedCb, 'got expected cb argument') - t.end() -}) - -tap.test('test approximateSize() extensibility', function (t) { - var spy = sinon.spy() - , expectedCb = function () {} - , expectedStart = 'a start' - , expectedEnd = 'an end' - , test - - function Test (location) { - AbstractLevelDOWN.call(this, location) - } - - util.inherits(Test, AbstractLevelDOWN) - - Test.prototype._approximateSize = spy - - test = new Test('foobar') - test.approximateSize(expectedStart, expectedEnd, expectedCb) - - t.equal(spy.callCount, 1, 'got _approximateSize() call') - t.equal(spy.getCall(0).thisValue, test, '`this` on _approximateSize() was correct') - t.equal(spy.getCall(0).args.length, 3, 'got three arguments') - t.equal(spy.getCall(0).args[0], expectedStart, 'got expected start argument') - t.equal(spy.getCall(0).args[1], expectedEnd, 'got expected end argument') - t.equal(spy.getCall(0).args[2], expectedCb, 'got expected cb argument') - t.end() -}) - -tap.test('test batch() extensibility', function (t) { - var spy = sinon.spy() - , expectedCb = function () {} - , expectedOptions = { options: 1 } - , expectedArray = [ 1, 2 ] - , test - - function Test (location) { - AbstractLevelDOWN.call(this, location) - } - - util.inherits(Test, AbstractLevelDOWN) - - Test.prototype._batch = spy - - test = new Test('foobar') - - test.batch(expectedArray, expectedCb) - - t.equal(spy.callCount, 1, 'got _batch() call') - t.equal(spy.getCall(0).thisValue, test, '`this` on _batch() was correct') - t.equal(spy.getCall(0).args.length, 3, 'got three arguments') - t.equal(spy.getCall(0).args[0], expectedArray, 'got expected array argument') - t.deepEqual(spy.getCall(0).args[1], {}, 'got expected options argument') - t.equal(spy.getCall(0).args[2], expectedCb, 'got expected callback argument') - - test.batch(expectedArray, expectedOptions, expectedCb) - - t.equal(spy.callCount, 2, 'got _batch() call') - t.equal(spy.getCall(1).thisValue, test, '`this` on _batch() was correct') - t.equal(spy.getCall(1).args.length, 3, 'got three arguments') - t.equal(spy.getCall(1).args[0], expectedArray, 'got expected array argument') - t.deepEqual(spy.getCall(1).args[1], expectedOptions, 'got expected options argument') - t.equal(spy.getCall(1).args[2], expectedCb, 'got expected callback argument') - - t.end() -}) - -tap.test('test chained batch() (array) extensibility', function (t) { - var spy = sinon.spy() - , expectedCb = function () {} - , expectedOptions = { options: 1 } - , expectedArray = [ 1, 2 ] - , test - - function Test (location) { - AbstractLevelDOWN.call(this, location) - } - - util.inherits(Test, AbstractLevelDOWN) - - Test.prototype._batch = spy - - test = new Test('foobar') - - test.batch().put('foo', 'bar').del('bang').write(expectedCb) - - t.equal(spy.callCount, 1, 'got _batch() call') - t.equal(spy.getCall(0).thisValue, test, '`this` on _batch() was correct') - t.equal(spy.getCall(0).args.length, 3, 'got three arguments') - t.equal(spy.getCall(0).args[0].length, 2, 'got expected array argument') - t.deepEqual(spy.getCall(0).args[0][0], { type: 'put', key: 'foo', value: 'bar' }, 'got expected array argument[0]') - t.deepEqual(spy.getCall(0).args[0][1], { type: 'del', key: 'bang' }, 'got expected array argument[1]') - t.deepEqual(spy.getCall(0).args[1], {}, 'got expected options argument') - t.equal(spy.getCall(0).args[2], expectedCb, 'got expected callback argument') - - test.batch().put('foo', 'bar').del('bang').write(expectedOptions, expectedCb) - - t.equal(spy.callCount, 2, 'got _batch() call') - t.equal(spy.getCall(1).thisValue, test, '`this` on _batch() was correct') - t.equal(spy.getCall(1).args.length, 3, 'got three arguments') - t.equal(spy.getCall(1).args[0].length, 2, 'got expected array argument') - t.deepEqual(spy.getCall(1).args[0][0], { type: 'put', key: 'foo', value: 'bar' }, 'got expected array argument[0]') - t.deepEqual(spy.getCall(1).args[0][1], { type: 'del', key: 'bang' }, 'got expected array argument[1]') - t.deepEqual(spy.getCall(1).args[1], expectedOptions, 'got expected options argument') - t.equal(spy.getCall(1).args[2], expectedCb, 'got expected callback argument') - - t.end() -}) - -tap.test('test chained batch() (custom _chainedBatch) extensibility', function (t) { - var spy = sinon.spy() - , test - - function Test (location) { - AbstractLevelDOWN.call(this, location) - } - - util.inherits(Test, AbstractLevelDOWN) - - Test.prototype._chainedBatch = spy - - test = new Test('foobar') - - test.batch() - - t.equal(spy.callCount, 1, 'got _chainedBatch() call') - t.equal(spy.getCall(0).thisValue, test, '`this` on _chainedBatch() was correct') - - test.batch() - - t.equal(spy.callCount, 2, 'got _chainedBatch() call') - t.equal(spy.getCall(1).thisValue, test, '`this` on _chainedBatch() was correct') - - t.end() -}) - -tap.test('test AbstractChainedBatch extensibility', function (t) { - function Test (db) { - AbstractChainedBatch.call(this, db) - t.equal(this._db, db, 'db set on `this`') - t.end() - } - - util.inherits(Test, AbstractChainedBatch) - - new Test('foobar') -}) - -tap.test('test write() extensibility', function (t) { - var spy = sinon.spy() - , spycb = sinon.spy() - , test - - function Test (db) { - AbstractChainedBatch.call(this, db) - } - - util.inherits(Test, AbstractChainedBatch) - - Test.prototype._write = spy - - test = new Test('foobar') - test.write(spycb) - - t.equal(spy.callCount, 1, 'got _write() call') - t.equal(spy.getCall(0).thisValue, test, '`this` on _write() was correct') - t.equal(spy.getCall(0).args.length, 1, 'got one argument') - // awkward here cause of nextTick & an internal wrapped cb - t.type(spy.getCall(0).args[0], 'function', 'got a callback function') - t.equal(spycb.callCount, 0, 'spycb not called') - spy.getCall(0).args[0]() - t.equal(spycb.callCount, 1, 'spycb called, i.e. was our cb argument') - t.end() -}) - -tap.test('test put() extensibility', function (t) { - var spy = sinon.spy() - , expectedKey = 'key' - , expectedValue = 'value' - , returnValue - , test - - function Test (db) { - AbstractChainedBatch.call(this, db) - } - - util.inherits(Test, AbstractChainedBatch) - - Test.prototype._put = spy - - test = new Test(factory('foobar')) - returnValue = test.put(expectedKey, expectedValue) - t.equal(spy.callCount, 1, 'got _put call') - t.equal(spy.getCall(0).thisValue, test, '`this` on _put() was correct') - t.equal(spy.getCall(0).args.length, 2, 'got two arguments') - t.equal(spy.getCall(0).args[0], expectedKey, 'got expected key argument') - t.equal(spy.getCall(0).args[1], expectedValue, 'got expected value argument') - t.equal(returnValue, test, 'get expected return value') - t.end() -}) - -tap.test('test del() extensibility', function (t) { - var spy = sinon.spy() - , expectedKey = 'key' - , returnValue - , test - - function Test (db) { - AbstractChainedBatch.call(this, db) - } - - util.inherits(Test, AbstractChainedBatch) - - Test.prototype._del = spy - - test = new Test(factory('foobar')) - returnValue = test.del(expectedKey) - t.equal(spy.callCount, 1, 'got _del call') - t.equal(spy.getCall(0).thisValue, test, '`this` on _del() was correct') - t.equal(spy.getCall(0).args.length, 1, 'got one argument') - t.equal(spy.getCall(0).args[0], expectedKey, 'got expected key argument') - t.equal(returnValue, test, 'get expected return value') - t.end() -}) - -tap.test('test clear() extensibility', function (t) { - var spy = sinon.spy() - , returnValue - , test - - function Test (db) { - AbstractChainedBatch.call(this, db) - } - - util.inherits(Test, AbstractChainedBatch) - - Test.prototype._clear = spy - - test = new Test(factory('foobar')) - returnValue = test.clear() - t.equal(spy.callCount, 1, 'got _clear call') - t.equal(spy.getCall(0).thisValue, test, '`this` on _clear() was correct') - t.equal(spy.getCall(0).args.length, 0, 'got zero arguments') - t.equal(returnValue, test, 'get expected return value') - t.end() -}) - -tap.test('test iterator() extensibility', function (t) { - var spy = sinon.spy() - , expectedOptions = { options: 1, reverse: false } // reverse now explicitly set - , test - - function Test (location) { - AbstractLevelDOWN.call(this, location) - } - - util.inherits(Test, AbstractLevelDOWN) - - Test.prototype._iterator = spy - - test = new Test('foobar') - test.iterator({ options: 1 }) - - t.equal(spy.callCount, 1, 'got _close() call') - t.equal(spy.getCall(0).thisValue, test, '`this` on _close() was correct') - t.equal(spy.getCall(0).args.length, 1, 'got one arguments') - t.deepEqual(spy.getCall(0).args[0], expectedOptions, 'got expected options argument') - t.end() -}) - -tap.test('test AbstractIterator extensibility', function (t) { - function Test (db) { - AbstractIterator.call(this, db) - t.equal(this.db, db, 'db set on `this`') - t.end() - } - - util.inherits(Test, AbstractIterator) - - ;new Test('foobar') -}) - -tap.test('test next() extensibility', function (t) { - var spy = sinon.spy() - , spycb = sinon.spy() - , test - - function Test (db) { - AbstractIterator.call(this, db) - } - - util.inherits(Test, AbstractIterator) - - Test.prototype._next = spy - - test = new Test('foobar') - test.next(spycb) - - t.equal(spy.callCount, 1, 'got _next() call') - t.equal(spy.getCall(0).thisValue, test, '`this` on _next() was correct') - t.equal(spy.getCall(0).args.length, 1, 'got one arguments') - // awkward here cause of nextTick & an internal wrapped cb - t.type(spy.getCall(0).args[0], 'function', 'got a callback function') - t.equal(spycb.callCount, 0, 'spycb not called') - spy.getCall(0).args[0]() - t.equal(spycb.callCount, 1, 'spycb called, i.e. was our cb argument') - t.end() -}) - -tap.test('test end() extensibility', function (t) { - var spy = sinon.spy() - , expectedCb = function () {} - , test - - function Test (db) { - AbstractIterator.call(this, db) - } - - util.inherits(Test, AbstractIterator) - - Test.prototype._end = spy - - test = new Test('foobar') - test.end(expectedCb) - - t.equal(spy.callCount, 1, 'got _end() call') - t.equal(spy.getCall(0).thisValue, test, '`this` on _end() was correct') - t.equal(spy.getCall(0).args.length, 1, 'got one arguments') - t.equal(spy.getCall(0).args[0], expectedCb, 'got expected cb argument') - t.end() -}) diff --git a/node_modules/browserify-fs/node_modules/levelup/node_modules/deferred-leveldown/node_modules/abstract-leveldown/testCommon.js b/node_modules/browserify-fs/node_modules/levelup/node_modules/deferred-leveldown/node_modules/abstract-leveldown/testCommon.js deleted file mode 100644 index 3f9d29da..00000000 --- a/node_modules/browserify-fs/node_modules/levelup/node_modules/deferred-leveldown/node_modules/abstract-leveldown/testCommon.js +++ /dev/null @@ -1,75 +0,0 @@ -var path = require('path') - , fs = !process.browser && require('fs') - , rimraf = !process.browser && require('rimraf') - -var dbidx = 0 - - , location = function () { - return path.join(__dirname, '_leveldown_test_db_' + dbidx++) - } - - , lastLocation = function () { - return path.join(__dirname, '_leveldown_test_db_' + dbidx) - } - - , cleanup = function (callback) { - if (process.browser) - return callback() - - fs.readdir(__dirname, function (err, list) { - if (err) return callback(err) - - list = list.filter(function (f) { - return (/^_leveldown_test_db_/).test(f) - }) - - if (!list.length) - return callback() - - var ret = 0 - - list.forEach(function (f) { - rimraf(path.join(__dirname, f), function (err) { - if (++ret == list.length) - callback() - }) - }) - }) - } - - , setUp = function (t) { - cleanup(function (err) { - t.notOk(err, 'cleanup returned an error') - t.end() - }) - } - - , tearDown = function (t) { - setUp(t) // same cleanup! - } - - , collectEntries = function (iterator, callback) { - var data = [] - , next = function () { - iterator.next(function (err, key, value) { - if (err) return callback(err) - if (!arguments.length) { - return iterator.end(function (err) { - callback(err, data) - }) - } - data.push({ key: key, value: value }) - process.nextTick(next) - }) - } - next() - } - -module.exports = { - location : location - , cleanup : cleanup - , lastLocation : lastLocation - , setUp : setUp - , tearDown : tearDown - , collectEntries : collectEntries -} diff --git a/node_modules/browserify-fs/node_modules/levelup/node_modules/deferred-leveldown/package.json b/node_modules/browserify-fs/node_modules/levelup/node_modules/deferred-leveldown/package.json deleted file mode 100644 index 42580a7e..00000000 --- a/node_modules/browserify-fs/node_modules/levelup/node_modules/deferred-leveldown/package.json +++ /dev/null @@ -1,117 +0,0 @@ -{ - "name": "deferred-leveldown", - "description": "For handling delayed-open on LevelDOWN compatible libraries", - "version": "0.2.0", - "contributors": [ - { - "name": "Rod Vagg", - "email": "r@va.gg", - "url": "https://github.com/rvagg" - }, - { - "name": "John Chesley", - "email": "john@chesl.es", - "url": "https://github.com/chesles/" - }, - { - "name": "Jake Verbaten", - "email": "raynos2@gmail.com", - "url": "https://github.com/raynos" - }, - { - "name": "Dominic Tarr", - "email": "dominic.tarr@gmail.com", - "url": "https://github.com/dominictarr" - }, - { - "name": "Max Ogden", - "email": "max@maxogden.com", - "url": "https://github.com/maxogden" - }, - { - "name": "Lars-Magnus Skog", - "email": "lars.magnus.skog@gmail.com", - "url": "https://github.com/ralphtheninja" - }, - { - "name": "David Björklund", - "email": "david.bjorklund@gmail.com", - "url": "https://github.com/kesla" - }, - { - "name": "Julian Gruber", - "email": "julian@juliangruber.com", - "url": "https://github.com/juliangruber" - }, - { - "name": "Paolo Fragomeni", - "email": "paolo@async.ly", - "url": "https://github.com/hij1nx" - }, - { - "name": "Anton Whalley", - "email": "anton.whalley@nearform.com", - "url": "https://github.com/No9" - }, - { - "name": "Matteo Collina", - "email": "matteo.collina@gmail.com", - "url": "https://github.com/mcollina" - }, - { - "name": "Pedro Teixeira", - "email": "pedro.teixeira@gmail.com", - "url": "https://github.com/pgte" - }, - { - "name": "James Halliday", - "email": "mail@substack.net", - "url": "https://github.com/substack" - } - ], - "repository": { - "type": "git", - "url": "https://github.com/Level/deferred-leveldown.git" - }, - "homepage": "https://github.com/Level/deferred-leveldown", - "keywords": [ - "leveldb", - "level", - "levelup", - "leveldown" - ], - "main": "deferred-leveldown.js", - "dependencies": { - "abstract-leveldown": "~0.12.1" - }, - "devDependencies": { - "tape": "~1.0.4" - }, - "scripts": { - "test": "node test.js" - }, - "license": "MIT", - "bugs": { - "url": "https://github.com/Level/deferred-leveldown/issues" - }, - "_id": "deferred-leveldown@0.2.0", - "dist": { - "shasum": "2cef1f111e1c57870d8bbb8af2650e587cd2f5b4", - "tarball": "https://registry.npmjs.org/deferred-leveldown/-/deferred-leveldown-0.2.0.tgz" - }, - "_from": "deferred-leveldown@>=0.2.0 <0.3.0", - "_npmVersion": "1.4.3", - "_npmUser": { - "name": "rvagg", - "email": "rod@vagg.org" - }, - "maintainers": [ - { - "name": "rvagg", - "email": "rod@vagg.org" - } - ], - "directories": {}, - "_shasum": "2cef1f111e1c57870d8bbb8af2650e587cd2f5b4", - "_resolved": "https://registry.npmjs.org/deferred-leveldown/-/deferred-leveldown-0.2.0.tgz" -} diff --git a/node_modules/browserify-fs/node_modules/levelup/node_modules/deferred-leveldown/test.js b/node_modules/browserify-fs/node_modules/levelup/node_modules/deferred-leveldown/test.js deleted file mode 100644 index f16720c6..00000000 --- a/node_modules/browserify-fs/node_modules/levelup/node_modules/deferred-leveldown/test.js +++ /dev/null @@ -1,101 +0,0 @@ -var test = require('tape') - , DeferredLevelDOWN = require('./') - -test('single operation', function (t) { - var called = false - var ld = new DeferredLevelDOWN('loc') - ld.put('foo', 'bar', function (v) { - called = v - }) - t.ok(called === false, 'not called') - ld.setDb({ put: function (key, value, options, callback) { - t.equal(key, 'foo', 'correct key') - t.equal(value, 'bar', 'correct value') - t.deepEqual({}, options, 'empty options') - callback('called') - }}) - - t.ok(called === 'called', 'function called') - - t.end() -}) - -test('many operations', function (t) { - var calls = [] - var ld = new DeferredLevelDOWN('loc') - , puts = 0 - , gets = 0 - , batches = 0 - - ld.put('foo1', 'bar1', function (v) { calls.push({ type: 'put', key: 'foo1', v: v }) }) - ld.get('woo1', function (v) { calls.push({ type: 'get', key: 'woo1', v: v }) }) - ld.put('foo2', 'bar2', function (v) { calls.push({ type: 'put', key: 'foo2', v: v }) }) - ld.get('woo2', function (v) { calls.push({ type: 'get', key: 'woo2', v: v }) }) - ld.del('blergh', function (v) { calls.push({ type: 'del', key: 'blergh', v: v }) }) - ld.batch([ - { type: 'put', key: 'k1', value: 'v1' } - , { type: 'put', key: 'k2', value: 'v2' } - ], function () { calls.push({ type: 'batch', keys: 'k1,k2' }) }) - ld.batch().put('k3', 'v3').put('k4', 'v4').write(function () { - calls.push({ type: 'batch', keys: 'k3,k4' }) - }) - - t.ok(calls.length === 0, 'not called') - - ld.setDb({ - put: function (key, value, options, callback) { - if (puts++ === 0) { - t.equal(key, 'foo1', 'correct key') - t.equal(value, 'bar1', 'correct value') - t.deepEqual({}, options, 'empty options') - } else { - t.equal(key, 'foo2', 'correct key') - t.equal(value, 'bar2', 'correct value') - t.deepEqual({}, options, 'empty options') - } - callback('put' + puts) - } - , get: function (key, options, callback) { - if (gets++ === 0) { - t.equal('woo1', key, 'correct key') - t.deepEqual({}, options, 'empty options') - } else { - t.equal('woo2', key, 'correct key') - t.deepEqual({}, options, 'empty options') - } - callback('gets' + gets) - } - , del: function (key, options, callback) { - t.equal('blergh', key, 'correct key') - t.deepEqual({}, options, 'empty options') - callback('del') - } - , batch: function (arr, options, callback) { - if (batches++ === 0) { - t.deepEqual(arr, [ - { type: 'put', key: 'k1', value: 'v1' } - , { type: 'put', key: 'k2', value: 'v2' } - ], 'correct batch') - } else { - t.deepEqual(arr, [ - { type: 'put', key: 'k3', value: 'v3' } - , { type: 'put', key: 'k4', value: 'v4' } - ], 'correct batch') - } - callback('batches' + batches) - } - }) - - t.equal(calls.length, 7, 'all functions called') - t.deepEqual(calls, [ - { type: 'put', key: 'foo1', v: 'put1' } - , { type: 'get', key: 'woo1', v: 'gets1' } - , { type: 'put', key: 'foo2', v: 'put2' } - , { type: 'get', key: 'woo2', v: 'gets2' } - , { type: 'del', key: 'blergh', v: 'del' } - , { type: 'batch', keys: 'k1,k2' } - , { type: 'batch', keys: 'k3,k4' } - ], 'calls correctly behaved') - - t.end() -}) diff --git a/node_modules/browserify-fs/node_modules/levelup/node_modules/errno/.jshintrc b/node_modules/browserify-fs/node_modules/levelup/node_modules/errno/.jshintrc deleted file mode 100644 index c8ef3ca4..00000000 --- a/node_modules/browserify-fs/node_modules/levelup/node_modules/errno/.jshintrc +++ /dev/null @@ -1,59 +0,0 @@ -{ - "predef": [ ] - , "bitwise": false - , "camelcase": false - , "curly": false - , "eqeqeq": false - , "forin": false - , "immed": false - , "latedef": false - , "noarg": true - , "noempty": true - , "nonew": true - , "plusplus": false - , "quotmark": true - , "regexp": false - , "undef": true - , "unused": true - , "strict": false - , "trailing": true - , "maxlen": 120 - , "asi": true - , "boss": true - , "debug": true - , "eqnull": true - , "esnext": true - , "evil": true - , "expr": true - , "funcscope": false - , "globalstrict": false - , "iterator": false - , "lastsemic": true - , "laxbreak": true - , "laxcomma": true - , "loopfunc": true - , "multistr": false - , "onecase": false - , "proto": false - , "regexdash": false - , "scripturl": true - , "smarttabs": false - , "shadow": false - , "sub": true - , "supernew": false - , "validthis": true - , "browser": true - , "couch": false - , "devel": false - , "dojo": false - , "mootools": false - , "node": true - , "nonstandard": true - , "prototypejs": false - , "rhino": false - , "worker": true - , "wsh": false - , "nomen": false - , "onevar": false - , "passfail": false -} \ No newline at end of file diff --git a/node_modules/browserify-fs/node_modules/levelup/node_modules/errno/.npmignore b/node_modules/browserify-fs/node_modules/levelup/node_modules/errno/.npmignore deleted file mode 100644 index b512c09d..00000000 --- a/node_modules/browserify-fs/node_modules/levelup/node_modules/errno/.npmignore +++ /dev/null @@ -1 +0,0 @@ -node_modules \ No newline at end of file diff --git a/node_modules/browserify-fs/node_modules/levelup/node_modules/errno/README.md b/node_modules/browserify-fs/node_modules/levelup/node_modules/errno/README.md deleted file mode 100644 index 2c1f8a52..00000000 --- a/node_modules/browserify-fs/node_modules/levelup/node_modules/errno/README.md +++ /dev/null @@ -1,141 +0,0 @@ -# node-errno - -Better [libuv](https://github.com/libuv/libuv)/[Node.js](https://nodejs.org)/[io.js](https://iojs.org) error handling & reporting. Available in npm as *errno*. - -* [errno exposed](#errnoexposed) -* [Custom errors](#customerrors) - - -## errno exposed - -Ever find yourself needing more details about Node.js errors? Me too, so *node-errno* contains the errno mappings direct from libuv so you can use them in your code. - -**By errno:** - -```js -require('errno').errno[3] -// → { -// "errno": 3, -// "code": "EACCES", -// "description": "permission denied" -// } -``` - -**By code:** - -```js -require('errno').code.ENOTEMPTY -// → { -// "errno": 53, -// "code": "ENOTEMPTY", -// "description": "directory not empty" -// } -``` - -**Make your errors more descriptive:** - -```js -var errno = require('errno') - -function errmsg(err) { - var str = 'Error: ' - // if it's a libuv error then get the description from errno - if (errno.errno[err.errno]) - str += errno.errno[err.errno].description - else - str += err.message - - // if it's a `fs` error then it'll have a 'path' property - if (err.path) - str += ' [' + err.path + ']' - - return str -} - -var fs = require('fs') - -fs.readFile('thisisnotarealfile.txt', function (err, data) { - if (err) - console.log(errmsg(err)) -}) -``` - -**Use as a command line tool:** - -``` -~ $ errno 53 -{ - "errno": 53, - "code": "ENOTEMPTY", - "description": "directory not empty" -} -~ $ errno EROFS -{ - "errno": 56, - "code": "EROFS", - "description": "read-only file system" -} -~ $ errno foo -No such errno/code: "foo" -``` - -Supply no arguments for the full list. Error codes are processed case-insensitive. - -You will need to install with `npm install errno -g` if you want the `errno` command to be available without supplying a full path to the node_modules installation. - - -## Custom errors - -Use `errno.custom.createError()` to create custom `Error` objects to throw around in your Node.js library. Create error heirachies so `instanceof` becomes a useful tool in tracking errors. Call-stack is correctly captured at the time you create an instance of the error object, plus a `cause` property will make available the original error object if you pass one in to the constructor. - -```js -var create = require('errno').custom.createError -var MyError = create('MyError') // inherits from Error -var SpecificError = create('SpecificError', MyError) // inherits from MyError -var OtherError = create('OtherError', MyError) - -// use them! -if (condition) throw new SpecificError('Eeek! Something bad happened') - -if (err) return callback(new OtherError(err)) -``` - -Also available is a `errno.custom.FilesystemError` with in-built access to errno properties: - -```js -fs.readFile('foo', function (err, data) { - if (err) return callback(new errno.custom.FilesystemError(err)) - // do something else -}) -``` - -The resulting error object passed through the callback will have the following properties: `code`, `errno`, `path` and `message` will contain a descriptive human-readable message. - -## Contributors - -* [bahamas10](https://github.com/bahamas10) (Dave Eddy) - Added CLI -* [ralphtheninja](https://github.com/ralphtheninja) (Lars-Magnus Skog) - -## Copyright & Licence - -*Copyright (c) 2012-2015 [Rod Vagg](https://github.com/rvagg) ([@rvagg](https://twitter.com/rvagg))* - -Made available under the MIT licence: - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is furnished -to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. \ No newline at end of file diff --git a/node_modules/browserify-fs/node_modules/levelup/node_modules/errno/build.js b/node_modules/browserify-fs/node_modules/levelup/node_modules/errno/build.js deleted file mode 100755 index fce89260..00000000 --- a/node_modules/browserify-fs/node_modules/levelup/node_modules/errno/build.js +++ /dev/null @@ -1,43 +0,0 @@ -#!/usr/bin/env node - -var request = require('request') - , fs = require('fs') - - , uvheadloc = 'https://raw.github.com/joyent/libuv/master/include/uv.h' - , defreg = /^\s*XX\(\s*([\-\d]+),\s*([A-Z]+),\s*"([^"]*)"\s*\)\s*\\?$/ - - -request(uvheadloc, function (err, response) { - if (err) - throw err - - var data, out - - data = response.body - .split('\n') - .map(function (line) { return line.match(defreg) }) - .filter(function (match) { return match }) - .map(function (match) { return { - errno: parseInt(match[1], 10) - , code: match[2] - , description: match[3] - }}) - - out = 'var all = module.exports.all = ' + JSON.stringify(data, 0, 1) + '\n\n' - - out += '\nmodule.exports.errno = {\n ' - + data.map(function (e, i) { - return '\'' + e.errno + '\': all[' + i + ']' - }).join('\n , ') - + '\n}\n\n' - - out += '\nmodule.exports.code = {\n ' - + data.map(function (e, i) { - return '\'' + e.code + '\': all[' + i + ']' - }).join('\n , ') - + '\n}\n\n' - - out += '\nmodule.exports.custom = require("./custom")(module.exports)\n' - - fs.writeFile('errno.js', out) -}) \ No newline at end of file diff --git a/node_modules/browserify-fs/node_modules/levelup/node_modules/errno/cli.js b/node_modules/browserify-fs/node_modules/levelup/node_modules/errno/cli.js deleted file mode 100755 index f841771b..00000000 --- a/node_modules/browserify-fs/node_modules/levelup/node_modules/errno/cli.js +++ /dev/null @@ -1,20 +0,0 @@ -#!/usr/bin/env node - -var errno = require('./') - , arg = process.argv[2] - , data, code - -if (arg === undefined) - return console.log(JSON.stringify(errno.code, null, 2)) - -if ((code = +arg) == arg) - data = errno.errno[code] -else - data = errno.code[arg] || errno.code[arg.toUpperCase()] - -if (data) - console.log(JSON.stringify(data, null, 2)) -else { - console.error('No such errno/code: "' + arg + '"') - process.exit(1) -} \ No newline at end of file diff --git a/node_modules/browserify-fs/node_modules/levelup/node_modules/errno/custom.js b/node_modules/browserify-fs/node_modules/levelup/node_modules/errno/custom.js deleted file mode 100644 index 7be16c1e..00000000 --- a/node_modules/browserify-fs/node_modules/levelup/node_modules/errno/custom.js +++ /dev/null @@ -1,55 +0,0 @@ -var prr = require('prr') - -function init (type, message, cause) { - prr(this, { - type : type - , name : type - // can be passed just a 'cause' - , cause : typeof message != 'string' ? message : cause - , message : !!message && typeof message != 'string' ? message.message : message - - }, 'ewr') -} - -// generic prototype, not intended to be actually used - helpful for `instanceof` -function CustomError (message, cause) { - Error.call(this) - if (Error.captureStackTrace) - Error.captureStackTrace(this, arguments.callee) - init.call(this, 'CustomError', message, cause) -} - -CustomError.prototype = new Error() - -function createError (errno, type, proto) { - var err = function (message, cause) { - init.call(this, type, message, cause) - //TODO: the specificity here is stupid, errno should be available everywhere - if (type == 'FilesystemError') { - this.code = this.cause.code - this.path = this.cause.path - this.errno = this.cause.errno - this.message = - (errno.errno[this.cause.errno] - ? errno.errno[this.cause.errno].description - : this.cause.message) - + (this.cause.path ? ' [' + this.cause.path + ']' : '') - } - Error.call(this) - if (Error.captureStackTrace) - Error.captureStackTrace(this, arguments.callee) - } - err.prototype = !!proto ? new proto() : new CustomError() - return err -} - -module.exports = function (errno) { - var ce = function (type, proto) { - return createError(errno, type, proto) - } - return { - CustomError : CustomError - , FilesystemError : ce('FilesystemError') - , createError : ce - } -} diff --git a/node_modules/browserify-fs/node_modules/levelup/node_modules/errno/errno.js b/node_modules/browserify-fs/node_modules/levelup/node_modules/errno/errno.js deleted file mode 100644 index efb79d41..00000000 --- a/node_modules/browserify-fs/node_modules/levelup/node_modules/errno/errno.js +++ /dev/null @@ -1,313 +0,0 @@ -var all = module.exports.all = [ - { - errno: -2, - code: 'ENOENT', - description: 'no such file or directory' - }, - { - errno: -1, - code: 'UNKNOWN', - description: 'unknown error' - }, - { - errno: 0, - code: 'OK', - description: 'success' - }, - { - errno: 1, - code: 'EOF', - description: 'end of file' - }, - { - errno: 2, - code: 'EADDRINFO', - description: 'getaddrinfo error' - }, - { - errno: 3, - code: 'EACCES', - description: 'permission denied' - }, - { - errno: 4, - code: 'EAGAIN', - description: 'resource temporarily unavailable' - }, - { - errno: 5, - code: 'EADDRINUSE', - description: 'address already in use' - }, - { - errno: 6, - code: 'EADDRNOTAVAIL', - description: 'address not available' - }, - { - errno: 7, - code: 'EAFNOSUPPORT', - description: 'address family not supported' - }, - { - errno: 8, - code: 'EALREADY', - description: 'connection already in progress' - }, - { - errno: 9, - code: 'EBADF', - description: 'bad file descriptor' - }, - { - errno: 10, - code: 'EBUSY', - description: 'resource busy or locked' - }, - { - errno: 11, - code: 'ECONNABORTED', - description: 'software caused connection abort' - }, - { - errno: 12, - code: 'ECONNREFUSED', - description: 'connection refused' - }, - { - errno: 13, - code: 'ECONNRESET', - description: 'connection reset by peer' - }, - { - errno: 14, - code: 'EDESTADDRREQ', - description: 'destination address required' - }, - { - errno: 15, - code: 'EFAULT', - description: 'bad address in system call argument' - }, - { - errno: 16, - code: 'EHOSTUNREACH', - description: 'host is unreachable' - }, - { - errno: 17, - code: 'EINTR', - description: 'interrupted system call' - }, - { - errno: 18, - code: 'EINVAL', - description: 'invalid argument' - }, - { - errno: 19, - code: 'EISCONN', - description: 'socket is already connected' - }, - { - errno: 20, - code: 'EMFILE', - description: 'too many open files' - }, - { - errno: 21, - code: 'EMSGSIZE', - description: 'message too long' - }, - { - errno: 22, - code: 'ENETDOWN', - description: 'network is down' - }, - { - errno: 23, - code: 'ENETUNREACH', - description: 'network is unreachable' - }, - { - errno: 24, - code: 'ENFILE', - description: 'file table overflow' - }, - { - errno: 25, - code: 'ENOBUFS', - description: 'no buffer space available' - }, - { - errno: 26, - code: 'ENOMEM', - description: 'not enough memory' - }, - { - errno: 27, - code: 'ENOTDIR', - description: 'not a directory' - }, - { - errno: 28, - code: 'EISDIR', - description: 'illegal operation on a directory' - }, - { - errno: 29, - code: 'ENONET', - description: 'machine is not on the network' - }, - { - errno: 31, - code: 'ENOTCONN', - description: 'socket is not connected' - }, - { - errno: 32, - code: 'ENOTSOCK', - description: 'socket operation on non-socket' - }, - { - errno: 33, - code: 'ENOTSUP', - description: 'operation not supported on socket' - }, - { - errno: 34, - code: 'ENOENT', - description: 'no such file or directory' - }, - { - errno: 35, - code: 'ENOSYS', - description: 'function not implemented' - }, - { - errno: 36, - code: 'EPIPE', - description: 'broken pipe' - }, - { - errno: 37, - code: 'EPROTO', - description: 'protocol error' - }, - { - errno: 38, - code: 'EPROTONOSUPPORT', - description: 'protocol not supported' - }, - { - errno: 39, - code: 'EPROTOTYPE', - description: 'protocol wrong type for socket' - }, - { - errno: 40, - code: 'ETIMEDOUT', - description: 'connection timed out' - }, - { - errno: 41, - code: 'ECHARSET', - description: 'invalid Unicode character' - }, - { - errno: 42, - code: 'EAIFAMNOSUPPORT', - description: 'address family for hostname not supported' - }, - { - errno: 44, - code: 'EAISERVICE', - description: 'servname not supported for ai_socktype' - }, - { - errno: 45, - code: 'EAISOCKTYPE', - description: 'ai_socktype not supported' - }, - { - errno: 46, - code: 'ESHUTDOWN', - description: 'cannot send after transport endpoint shutdown' - }, - { - errno: 47, - code: 'EEXIST', - description: 'file already exists' - }, - { - errno: 48, - code: 'ESRCH', - description: 'no such process' - }, - { - errno: 49, - code: 'ENAMETOOLONG', - description: 'name too long' - }, - { - errno: 50, - code: 'EPERM', - description: 'operation not permitted' - }, - { - errno: 51, - code: 'ELOOP', - description: 'too many symbolic links encountered' - }, - { - errno: 52, - code: 'EXDEV', - description: 'cross-device link not permitted' - }, - { - errno: 53, - code: 'ENOTEMPTY', - description: 'directory not empty' - }, - { - errno: 54, - code: 'ENOSPC', - description: 'no space left on device' - }, - { - errno: 55, - code: 'EIO', - description: 'i/o error' - }, - { - errno: 56, - code: 'EROFS', - description: 'read-only file system' - }, - { - errno: 57, - code: 'ENODEV', - description: 'no such device' - }, - { - errno: 58, - code: 'ESPIPE', - description: 'invalid seek' - }, - { - errno: 59, - code: 'ECANCELED', - description: 'operation canceled' - } -] - -module.exports.errno = {} -module.exports.code = {} - -all.forEach(function (error) { - module.exports.errno[error.errno] = error - module.exports.code[error.code] = error -}) - -module.exports.custom = require('./custom')(module.exports) -module.exports.create = module.exports.custom.createError diff --git a/node_modules/browserify-fs/node_modules/levelup/node_modules/errno/package.json b/node_modules/browserify-fs/node_modules/levelup/node_modules/errno/package.json deleted file mode 100644 index fd27311c..00000000 --- a/node_modules/browserify-fs/node_modules/levelup/node_modules/errno/package.json +++ /dev/null @@ -1,58 +0,0 @@ -{ - "name": "errno", - "authors": [ - "Rod Vagg @rvagg (https://github.com/rvagg)" - ], - "description": "libuv errno details exposed", - "keywords": [ - "errors", - "errno", - "libuv" - ], - "version": "0.1.4", - "main": "errno.js", - "dependencies": { - "prr": "~0.0.0" - }, - "bin": { - "errno": "./cli.js" - }, - "devDependencies": { - "tape": "~3.5.0" - }, - "repository": { - "type": "git", - "url": "https://github.com/rvagg/node-errno.git" - }, - "license": "MIT", - "scripts": { - "test": "tape test.js" - }, - "gitHead": "1c2b1fcbf22ef2bafbf6cda378cfed400f5163fd", - "bugs": { - "url": "https://github.com/rvagg/node-errno/issues" - }, - "homepage": "https://github.com/rvagg/node-errno", - "_id": "errno@0.1.4", - "_shasum": "b896e23a9e5e8ba33871fc996abd3635fc9a1c7d", - "_from": "errno@>=0.1.1 <0.2.0", - "_npmVersion": "2.13.3", - "_nodeVersion": "3.0.0", - "_npmUser": { - "name": "rvagg", - "email": "rod@vagg.org" - }, - "maintainers": [ - { - "name": "rvagg", - "email": "rod@vagg.org" - } - ], - "dist": { - "shasum": "b896e23a9e5e8ba33871fc996abd3635fc9a1c7d", - "tarball": "https://registry.npmjs.org/errno/-/errno-0.1.4.tgz" - }, - "directories": {}, - "_resolved": "https://registry.npmjs.org/errno/-/errno-0.1.4.tgz", - "readme": "ERROR: No README data found!" -} diff --git a/node_modules/browserify-fs/node_modules/levelup/node_modules/errno/test.js b/node_modules/browserify-fs/node_modules/levelup/node_modules/errno/test.js deleted file mode 100755 index 6b76a85a..00000000 --- a/node_modules/browserify-fs/node_modules/levelup/node_modules/errno/test.js +++ /dev/null @@ -1,31 +0,0 @@ -#!/usr/bin/env node - -var test = require('tape') - , errno = require('./') - -test('sanity checks', function (t) { - t.ok(errno.all, 'errno.all not found') - t.ok(errno.errno, 'errno.errno not found') - t.ok(errno.code, 'errno.code not found') - - t.equal(errno.all.length, 59, 'found ' + errno.all.length + ', expected 59') - t.equal(errno.errno['-1'], errno.all[0], 'errno -1 not first element') - - t.equal(errno.code['UNKNOWN'], errno.all[0], 'code UNKNOWN not first element') - - t.equal(errno.errno[1], errno.all[2], 'errno 1 not third element') - - t.equal(errno.code['EOF'], errno.all[2], 'code EOF not third element') - t.end() -}) - -test('custom errors', function (t) { - var Cust = errno.create('FooNotBarError') - var cust = new Cust('foo is not bar') - - t.equal(cust.name, 'FooNotBarError', 'correct custom name') - t.equal(cust.type, 'FooNotBarError', 'correct custom type') - t.equal(cust.message, 'foo is not bar', 'correct custom message') - t.notOk(cust.cause, 'no cause') - t.end() -}) diff --git a/node_modules/browserify-fs/node_modules/levelup/node_modules/prr/.jshintrc b/node_modules/browserify-fs/node_modules/levelup/node_modules/prr/.jshintrc deleted file mode 100644 index 6a7a956c..00000000 --- a/node_modules/browserify-fs/node_modules/levelup/node_modules/prr/.jshintrc +++ /dev/null @@ -1,61 +0,0 @@ -{ - "predef": [ ] - , "bitwise": false - , "camelcase": false - , "curly": false - , "eqeqeq": false - , "forin": false - , "immed": false - , "latedef": false - , "newcap": true - , "noarg": true - , "noempty": true - , "nonew": true - , "plusplus": false - , "quotmark": true - , "regexp": false - , "undef": true - , "unused": true - , "strict": false - , "trailing": true - , "maxlen": 120 - , "asi": true - , "boss": true - , "debug": true - , "eqnull": true - , "es5": true - , "esnext": true - , "evil": true - , "expr": true - , "funcscope": false - , "globalstrict": false - , "iterator": false - , "lastsemic": true - , "laxbreak": true - , "laxcomma": true - , "loopfunc": true - , "multistr": false - , "onecase": false - , "proto": false - , "regexdash": false - , "scripturl": true - , "smarttabs": false - , "shadow": false - , "sub": true - , "supernew": false - , "validthis": true - , "browser": true - , "couch": false - , "devel": false - , "dojo": false - , "mootools": false - , "node": true - , "nonstandard": true - , "prototypejs": false - , "rhino": false - , "worker": true - , "wsh": false - , "nomen": false - , "onevar": true - , "passfail": false -} \ No newline at end of file diff --git a/node_modules/browserify-fs/node_modules/levelup/node_modules/prr/.npmignore b/node_modules/browserify-fs/node_modules/levelup/node_modules/prr/.npmignore deleted file mode 100644 index b512c09d..00000000 --- a/node_modules/browserify-fs/node_modules/levelup/node_modules/prr/.npmignore +++ /dev/null @@ -1 +0,0 @@ -node_modules \ No newline at end of file diff --git a/node_modules/browserify-fs/node_modules/levelup/node_modules/prr/.travis.yml b/node_modules/browserify-fs/node_modules/levelup/node_modules/prr/.travis.yml deleted file mode 100644 index fe3f4eb1..00000000 --- a/node_modules/browserify-fs/node_modules/levelup/node_modules/prr/.travis.yml +++ /dev/null @@ -1,10 +0,0 @@ -language: node_js -node_js: - - 0.8 - - "0.10" -branches: - only: - - master -notifications: - email: - - rod@vagg.org diff --git a/node_modules/browserify-fs/node_modules/levelup/node_modules/prr/LICENSE b/node_modules/browserify-fs/node_modules/levelup/node_modules/prr/LICENSE deleted file mode 100644 index f6a0029d..00000000 --- a/node_modules/browserify-fs/node_modules/levelup/node_modules/prr/LICENSE +++ /dev/null @@ -1,39 +0,0 @@ -Copyright 2013, Rod Vagg (the "Original Author") -All rights reserved. - -MIT +no-false-attribs License - -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. - -Distributions of all or part of the Software intended to be used -by the recipients as they would use the unmodified Software, -containing modifications that substantially alter, remove, or -disable functionality of the Software, outside of the documented -configuration mechanisms provided by the Software, shall be -modified such that the Original Author's bug reporting email -addresses and urls are either replaced with the contact information -of the parties responsible for the changes, or removed entirely. - -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. - - -Except where noted, this license applies to any and all software -programs and associated documentation files created by the -Original Author, when distributed with the Software. \ No newline at end of file diff --git a/node_modules/browserify-fs/node_modules/levelup/node_modules/prr/README.md b/node_modules/browserify-fs/node_modules/levelup/node_modules/prr/README.md deleted file mode 100644 index 3e709e3b..00000000 --- a/node_modules/browserify-fs/node_modules/levelup/node_modules/prr/README.md +++ /dev/null @@ -1,45 +0,0 @@ -# prr [![Build Status](https://secure.travis-ci.org/rvagg/prr.png)](http://travis-ci.org/rvagg/prr) - -An sensible alternative to `Object.defineProperty()`. Available in npm and Ender as **prr**. - -## Usage - -Set the property `'foo'` (`obj.foo`) to have the value `'bar'` with default options (*enumerable, configurable and writable are all false*): - -```js -prr(obj, 'foo', 'bar') -``` - -Adjust the default options: - -```js -prr(obj, 'foo', 'bar', { enumerable: true, writable: true }) -``` - -Do the same operation for multiple properties: - -```js -prr(obj, { one: 'one', two: 'two' }) -// or with options: -prr(obj, { one: 'one', two: 'two' }, { enumerable: true, writable: true }) -``` - -But obviously, having to write out the full options object makes it nearly as bad as the original `Object.defineProperty()` so we can **simplify**. - -As an alternative method we can use an options string where each character represents a option: `'e'=='enumerable'`, `'c'=='configurable'` and `'w'=='writable'`: - -```js -prr(obj, 'foo', 'bar', 'ew') // enumerable and writable but not configurable -// muliple properties: -prr(obj, { one: 'one', two: 'two' }, 'ewc') // configurable too -``` - -## Where can I use it? - -Anywhere! For pre-ES5 environments *prr* will simply fall-back to an `object[property] = value` so you can get close to what you want. - -*prr* is Ender-compatible so you can include it in your Ender build and `$.prr(...)` or `var prr = require('prr'); prr(...)`. - -## Licence - -prr is Copyright (c) 2013 Rod Vagg [@rvagg](https://twitter.com/rvagg) and licensed under the MIT licence. All rights not explicitly granted in the MIT license are reserved. See the included LICENSE file for more details. \ No newline at end of file diff --git a/node_modules/browserify-fs/node_modules/levelup/node_modules/prr/package.json b/node_modules/browserify-fs/node_modules/levelup/node_modules/prr/package.json deleted file mode 100644 index cebd32b9..00000000 --- a/node_modules/browserify-fs/node_modules/levelup/node_modules/prr/package.json +++ /dev/null @@ -1,48 +0,0 @@ -{ - "name": "prr", - "description": "A better Object.defineProperty()", - "version": "0.0.0", - "homepage": "https://github.com/rvagg/prr", - "authors": [ - "Rod Vagg (https://github.com/rvagg)" - ], - "keywords": [ - "property", - "properties", - "defineProperty", - "ender" - ], - "main": "./prr.js", - "repository": { - "type": "git", - "url": "https://github.com/rvagg/prr.git" - }, - "dependencies": {}, - "devDependencies": { - "tap": "*" - }, - "scripts": { - "test": "node ./test.js" - }, - "license": "MIT", - "_id": "prr@0.0.0", - "dist": { - "shasum": "1a84b85908325501411853d0081ee3fa86e2926a", - "tarball": "https://registry.npmjs.org/prr/-/prr-0.0.0.tgz" - }, - "_from": "prr@>=0.0.0 <0.1.0", - "_npmVersion": "1.2.15", - "_npmUser": { - "name": "rvagg", - "email": "rod@vagg.org" - }, - "maintainers": [ - { - "name": "rvagg", - "email": "rod@vagg.org" - } - ], - "directories": {}, - "_shasum": "1a84b85908325501411853d0081ee3fa86e2926a", - "_resolved": "https://registry.npmjs.org/prr/-/prr-0.0.0.tgz" -} diff --git a/node_modules/browserify-fs/node_modules/levelup/node_modules/prr/prr.js b/node_modules/browserify-fs/node_modules/levelup/node_modules/prr/prr.js deleted file mode 100644 index 94f58628..00000000 --- a/node_modules/browserify-fs/node_modules/levelup/node_modules/prr/prr.js +++ /dev/null @@ -1,63 +0,0 @@ -/*! - * prr - * (c) 2013 Rod Vagg - * https://github.com/rvagg/prr - * License: MIT - */ - -(function (name, context, definition) { - if (typeof module != 'undefined' && module.exports) - module.exports = definition() - else - context[name] = definition() -})('prr', this, function() { - - var setProperty = typeof Object.defineProperty == 'function' - ? function (obj, key, options) { - Object.defineProperty(obj, key, options) - return obj - } - : function (obj, key, options) { // < es5 - obj[key] = options.value - return obj - } - - , makeOptions = function (value, options) { - var oo = typeof options == 'object' - , os = !oo && typeof options == 'string' - , op = function (p) { - return oo - ? !!options[p] - : os - ? options.indexOf(p[0]) > -1 - : false - } - - return { - enumerable : op('enumerable') - , configurable : op('configurable') - , writable : op('writable') - , value : value - } - } - - , prr = function (obj, key, value, options) { - var k - - options = makeOptions(value, options) - - if (typeof key == 'object') { - for (k in key) { - if (Object.hasOwnProperty.call(key, k)) { - options.value = key[k] - setProperty(obj, k, options) - } - } - return obj - } - - return setProperty(obj, key, options) - } - - return prr -}) \ No newline at end of file diff --git a/node_modules/browserify-fs/node_modules/levelup/node_modules/prr/test.js b/node_modules/browserify-fs/node_modules/levelup/node_modules/prr/test.js deleted file mode 100644 index 5222e307..00000000 --- a/node_modules/browserify-fs/node_modules/levelup/node_modules/prr/test.js +++ /dev/null @@ -1,169 +0,0 @@ -const test = require('tap').test - , prr = require('./') - -test('test prr(o, key, value) form', function (t) { - t.plan(2) - - var o = {} - prr(o, 'foo', 'bar') - t.equal(o.foo, 'bar', 'correct value') - t.deepEqual( - Object.getOwnPropertyDescriptor(o, 'foo') - , { - enumerable : false - , configurable : false - , writable : false - , value : 'bar' - } - , 'correct property descriptor' - ) - t.end() -}) - -test('test prr(o, { key: value }) form', function (t) { - t.plan(2) - - var o = {} - prr(o, { foo: 'bar' }) - - t.equal(o.foo, 'bar', 'correct value') - t.deepEqual( - Object.getOwnPropertyDescriptor(o, 'foo') - , { - enumerable : false - , configurable : false - , writable : false - , value : 'bar' - } - , 'correct property descriptor' - ) - t.end() -}) - -test('test multiple key:value pairs', function (t) { - var o = { foo: 'bar' } - - prr(o, { one: 'ONE', two: 'TWO', obj: { o: 'o' }}) - - t.deepEqual(o, { foo: 'bar' }, 'properties are not enumerable') - t.equal(o.one, 'ONE', 'correctly set property') - t.equal(o.two, 'TWO', 'correctly set property') - t.deepEqual(o.obj, { o: 'o' }, 'correctly set property') - - ;[ 'one', 'two', 'obj' ].forEach(function (p) { - t.deepEqual( - Object.getOwnPropertyDescriptor(o, p) - , { - enumerable : false - , configurable : false - , writable : false - , value : p == 'obj' ? { o: 'o' } : p.toUpperCase() - } - , 'correct property descriptor' - ) - }) - - t.end() -}) - -test('test descriptor options', function (t) { - var o = {} - - prr(o, 'foo', 'bar', { - enumerable : true - , configurable : false - }) - t.equal(o.foo, 'bar', 'correct value') - t.deepEqual( - Object.getOwnPropertyDescriptor(o, 'foo') - , { - enumerable : true - , configurable : false - , writable : false - , value : 'bar' - } - , 'correct property descriptor' - ) - - prr(o, 'foo2', 'bar2', { - enumerable : true - , configurable : true - , writable : false - }) - t.equal(o.foo2, 'bar2', 'correct value') - t.deepEqual( - Object.getOwnPropertyDescriptor(o, 'foo2') - , { - enumerable : true - , configurable : true - , writable : false - , value : 'bar2' - } - , 'correct property descriptor' - ) - - prr(o, 'foo3', 'bar3', { - enumerable : true - , configurable : true - , writable : true - }) - t.equal(o.foo3, 'bar3', 'correct value') - t.deepEqual( - Object.getOwnPropertyDescriptor(o, 'foo3') - , { - enumerable : true - , configurable : true - , writable : true - , value : 'bar3' - } - , 'correct property descriptor' - ) - - t.end() -}) - - -test('test descriptor options, string form', function (t) { - var o = {} - - prr(o, 'foo', 'bar', 'e') - t.equal(o.foo, 'bar', 'correct value') - t.deepEqual( - Object.getOwnPropertyDescriptor(o, 'foo') - , { - enumerable : true - , configurable : false - , writable : false - , value : 'bar' - } - , 'correct property descriptor' - ) - - prr(o, 'foo2', 'bar2', 'ec') - t.equal(o.foo2, 'bar2', 'correct value') - t.deepEqual( - Object.getOwnPropertyDescriptor(o, 'foo2') - , { - enumerable : true - , configurable : true - , writable : false - , value : 'bar2' - } - , 'correct property descriptor' - ) - - prr(o, 'foo3', 'bar3', 'ecw') - t.equal(o.foo3, 'bar3', 'correct value') - t.deepEqual( - Object.getOwnPropertyDescriptor(o, 'foo3') - , { - enumerable : true - , configurable : true - , writable : true - , value : 'bar3' - } - , 'correct property descriptor' - ) - - t.end() -}) diff --git a/node_modules/browserify-fs/node_modules/levelup/node_modules/readable-stream/.npmignore b/node_modules/browserify-fs/node_modules/levelup/node_modules/readable-stream/.npmignore deleted file mode 100644 index 38344f87..00000000 --- a/node_modules/browserify-fs/node_modules/levelup/node_modules/readable-stream/.npmignore +++ /dev/null @@ -1,5 +0,0 @@ -build/ -test/ -examples/ -fs.js -zlib.js \ No newline at end of file diff --git a/node_modules/browserify-fs/node_modules/levelup/node_modules/readable-stream/LICENSE b/node_modules/browserify-fs/node_modules/levelup/node_modules/readable-stream/LICENSE deleted file mode 100644 index e3d4e695..00000000 --- a/node_modules/browserify-fs/node_modules/levelup/node_modules/readable-stream/LICENSE +++ /dev/null @@ -1,18 +0,0 @@ -Copyright Joyent, Inc. and other Node contributors. All rights reserved. -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to -deal in the Software without restriction, including without limitation the -rights to use, copy, modify, merge, publish, distribute, sublicense, and/or -sell copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS -IN THE SOFTWARE. diff --git a/node_modules/browserify-fs/node_modules/levelup/node_modules/readable-stream/README.md b/node_modules/browserify-fs/node_modules/levelup/node_modules/readable-stream/README.md deleted file mode 100644 index 3fb3e802..00000000 --- a/node_modules/browserify-fs/node_modules/levelup/node_modules/readable-stream/README.md +++ /dev/null @@ -1,15 +0,0 @@ -# readable-stream - -***Node-core streams for userland*** - -[![NPM](https://nodei.co/npm/readable-stream.png?downloads=true&downloadRank=true)](https://nodei.co/npm/readable-stream/) -[![NPM](https://nodei.co/npm-dl/readable-stream.png?&months=6&height=3)](https://nodei.co/npm/readable-stream/) - -This package is a mirror of the Streams2 and Streams3 implementations in Node-core. - -If you want to guarantee a stable streams base, regardless of what version of Node you, or the users of your libraries are using, use **readable-stream** *only* and avoid the *"stream"* module in Node-core. - -**readable-stream** comes in two major versions, v1.0.x and v1.1.x. The former tracks the Streams2 implementation in Node 0.10, including bug-fixes and minor improvements as they are added. The latter tracks Streams3 as it develops in Node 0.11; we will likely see a v1.2.x branch for Node 0.12. - -**readable-stream** uses proper patch-level versioning so if you pin to `"~1.0.0"` you’ll get the latest Node 0.10 Streams2 implementation, including any fixes and minor non-breaking improvements. The patch-level versions of 1.0.x and 1.1.x should mirror the patch-level versions of Node-core releases. You should prefer the **1.0.x** releases for now and when you’re ready to start using Streams3, pin to `"~1.1.0"` - diff --git a/node_modules/browserify-fs/node_modules/levelup/node_modules/readable-stream/duplex.js b/node_modules/browserify-fs/node_modules/levelup/node_modules/readable-stream/duplex.js deleted file mode 100644 index ca807af8..00000000 --- a/node_modules/browserify-fs/node_modules/levelup/node_modules/readable-stream/duplex.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require("./lib/_stream_duplex.js") diff --git a/node_modules/browserify-fs/node_modules/levelup/node_modules/readable-stream/lib/_stream_duplex.js b/node_modules/browserify-fs/node_modules/levelup/node_modules/readable-stream/lib/_stream_duplex.js deleted file mode 100644 index b513d61a..00000000 --- a/node_modules/browserify-fs/node_modules/levelup/node_modules/readable-stream/lib/_stream_duplex.js +++ /dev/null @@ -1,89 +0,0 @@ -// Copyright Joyent, Inc. and other Node contributors. -// -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to permit -// persons to whom the Software is furnished to do so, subject to the -// following conditions: -// -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -// USE OR OTHER DEALINGS IN THE SOFTWARE. - -// a duplex stream is just a stream that is both readable and writable. -// Since JS doesn't have multiple prototypal inheritance, this class -// prototypally inherits from Readable, and then parasitically from -// Writable. - -module.exports = Duplex; - -/**/ -var objectKeys = Object.keys || function (obj) { - var keys = []; - for (var key in obj) keys.push(key); - return keys; -} -/**/ - - -/**/ -var util = require('core-util-is'); -util.inherits = require('inherits'); -/**/ - -var Readable = require('./_stream_readable'); -var Writable = require('./_stream_writable'); - -util.inherits(Duplex, Readable); - -forEach(objectKeys(Writable.prototype), function(method) { - if (!Duplex.prototype[method]) - Duplex.prototype[method] = Writable.prototype[method]; -}); - -function Duplex(options) { - if (!(this instanceof Duplex)) - return new Duplex(options); - - Readable.call(this, options); - Writable.call(this, options); - - if (options && options.readable === false) - this.readable = false; - - if (options && options.writable === false) - this.writable = false; - - this.allowHalfOpen = true; - if (options && options.allowHalfOpen === false) - this.allowHalfOpen = false; - - this.once('end', onend); -} - -// the no-half-open enforcer -function onend() { - // if we allow half-open state, or if the writable side ended, - // then we're ok. - if (this.allowHalfOpen || this._writableState.ended) - return; - - // no more data can be written. - // But allow more writes to happen in this tick. - process.nextTick(this.end.bind(this)); -} - -function forEach (xs, f) { - for (var i = 0, l = xs.length; i < l; i++) { - f(xs[i], i); - } -} diff --git a/node_modules/browserify-fs/node_modules/levelup/node_modules/readable-stream/lib/_stream_passthrough.js b/node_modules/browserify-fs/node_modules/levelup/node_modules/readable-stream/lib/_stream_passthrough.js deleted file mode 100644 index 895ca50a..00000000 --- a/node_modules/browserify-fs/node_modules/levelup/node_modules/readable-stream/lib/_stream_passthrough.js +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright Joyent, Inc. and other Node contributors. -// -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to permit -// persons to whom the Software is furnished to do so, subject to the -// following conditions: -// -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -// USE OR OTHER DEALINGS IN THE SOFTWARE. - -// a passthrough stream. -// basically just the most minimal sort of Transform stream. -// Every written chunk gets output as-is. - -module.exports = PassThrough; - -var Transform = require('./_stream_transform'); - -/**/ -var util = require('core-util-is'); -util.inherits = require('inherits'); -/**/ - -util.inherits(PassThrough, Transform); - -function PassThrough(options) { - if (!(this instanceof PassThrough)) - return new PassThrough(options); - - Transform.call(this, options); -} - -PassThrough.prototype._transform = function(chunk, encoding, cb) { - cb(null, chunk); -}; diff --git a/node_modules/browserify-fs/node_modules/levelup/node_modules/readable-stream/lib/_stream_readable.js b/node_modules/browserify-fs/node_modules/levelup/node_modules/readable-stream/lib/_stream_readable.js deleted file mode 100644 index 63072209..00000000 --- a/node_modules/browserify-fs/node_modules/levelup/node_modules/readable-stream/lib/_stream_readable.js +++ /dev/null @@ -1,982 +0,0 @@ -// Copyright Joyent, Inc. and other Node contributors. -// -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to permit -// persons to whom the Software is furnished to do so, subject to the -// following conditions: -// -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -// USE OR OTHER DEALINGS IN THE SOFTWARE. - -module.exports = Readable; - -/**/ -var isArray = require('isarray'); -/**/ - - -/**/ -var Buffer = require('buffer').Buffer; -/**/ - -Readable.ReadableState = ReadableState; - -var EE = require('events').EventEmitter; - -/**/ -if (!EE.listenerCount) EE.listenerCount = function(emitter, type) { - return emitter.listeners(type).length; -}; -/**/ - -var Stream = require('stream'); - -/**/ -var util = require('core-util-is'); -util.inherits = require('inherits'); -/**/ - -var StringDecoder; - -util.inherits(Readable, Stream); - -function ReadableState(options, stream) { - options = options || {}; - - // the point at which it stops calling _read() to fill the buffer - // Note: 0 is a valid value, means "don't call _read preemptively ever" - var hwm = options.highWaterMark; - this.highWaterMark = (hwm || hwm === 0) ? hwm : 16 * 1024; - - // cast to ints. - this.highWaterMark = ~~this.highWaterMark; - - this.buffer = []; - this.length = 0; - this.pipes = null; - this.pipesCount = 0; - this.flowing = false; - this.ended = false; - this.endEmitted = false; - this.reading = false; - - // In streams that never have any data, and do push(null) right away, - // the consumer can miss the 'end' event if they do some I/O before - // consuming the stream. So, we don't emit('end') until some reading - // happens. - this.calledRead = false; - - // a flag to be able to tell if the onwrite cb is called immediately, - // or on a later tick. We set this to true at first, becuase any - // actions that shouldn't happen until "later" should generally also - // not happen before the first write call. - this.sync = true; - - // whenever we return null, then we set a flag to say - // that we're awaiting a 'readable' event emission. - this.needReadable = false; - this.emittedReadable = false; - this.readableListening = false; - - - // object stream flag. Used to make read(n) ignore n and to - // make all the buffer merging and length checks go away - this.objectMode = !!options.objectMode; - - // Crypto is kind of old and crusty. Historically, its default string - // encoding is 'binary' so we have to make this configurable. - // Everything else in the universe uses 'utf8', though. - this.defaultEncoding = options.defaultEncoding || 'utf8'; - - // when piping, we only care about 'readable' events that happen - // after read()ing all the bytes and not getting any pushback. - this.ranOut = false; - - // the number of writers that are awaiting a drain event in .pipe()s - this.awaitDrain = 0; - - // if true, a maybeReadMore has been scheduled - this.readingMore = false; - - this.decoder = null; - this.encoding = null; - if (options.encoding) { - if (!StringDecoder) - StringDecoder = require('string_decoder/').StringDecoder; - this.decoder = new StringDecoder(options.encoding); - this.encoding = options.encoding; - } -} - -function Readable(options) { - if (!(this instanceof Readable)) - return new Readable(options); - - this._readableState = new ReadableState(options, this); - - // legacy - this.readable = true; - - Stream.call(this); -} - -// Manually shove something into the read() buffer. -// This returns true if the highWaterMark has not been hit yet, -// similar to how Writable.write() returns true if you should -// write() some more. -Readable.prototype.push = function(chunk, encoding) { - var state = this._readableState; - - if (typeof chunk === 'string' && !state.objectMode) { - encoding = encoding || state.defaultEncoding; - if (encoding !== state.encoding) { - chunk = new Buffer(chunk, encoding); - encoding = ''; - } - } - - return readableAddChunk(this, state, chunk, encoding, false); -}; - -// Unshift should *always* be something directly out of read() -Readable.prototype.unshift = function(chunk) { - var state = this._readableState; - return readableAddChunk(this, state, chunk, '', true); -}; - -function readableAddChunk(stream, state, chunk, encoding, addToFront) { - var er = chunkInvalid(state, chunk); - if (er) { - stream.emit('error', er); - } else if (chunk === null || chunk === undefined) { - state.reading = false; - if (!state.ended) - onEofChunk(stream, state); - } else if (state.objectMode || chunk && chunk.length > 0) { - if (state.ended && !addToFront) { - var e = new Error('stream.push() after EOF'); - stream.emit('error', e); - } else if (state.endEmitted && addToFront) { - var e = new Error('stream.unshift() after end event'); - stream.emit('error', e); - } else { - if (state.decoder && !addToFront && !encoding) - chunk = state.decoder.write(chunk); - - // update the buffer info. - state.length += state.objectMode ? 1 : chunk.length; - if (addToFront) { - state.buffer.unshift(chunk); - } else { - state.reading = false; - state.buffer.push(chunk); - } - - if (state.needReadable) - emitReadable(stream); - - maybeReadMore(stream, state); - } - } else if (!addToFront) { - state.reading = false; - } - - return needMoreData(state); -} - - - -// if it's past the high water mark, we can push in some more. -// Also, if we have no data yet, we can stand some -// more bytes. This is to work around cases where hwm=0, -// such as the repl. Also, if the push() triggered a -// readable event, and the user called read(largeNumber) such that -// needReadable was set, then we ought to push more, so that another -// 'readable' event will be triggered. -function needMoreData(state) { - return !state.ended && - (state.needReadable || - state.length < state.highWaterMark || - state.length === 0); -} - -// backwards compatibility. -Readable.prototype.setEncoding = function(enc) { - if (!StringDecoder) - StringDecoder = require('string_decoder/').StringDecoder; - this._readableState.decoder = new StringDecoder(enc); - this._readableState.encoding = enc; -}; - -// Don't raise the hwm > 128MB -var MAX_HWM = 0x800000; -function roundUpToNextPowerOf2(n) { - if (n >= MAX_HWM) { - n = MAX_HWM; - } else { - // Get the next highest power of 2 - n--; - for (var p = 1; p < 32; p <<= 1) n |= n >> p; - n++; - } - return n; -} - -function howMuchToRead(n, state) { - if (state.length === 0 && state.ended) - return 0; - - if (state.objectMode) - return n === 0 ? 0 : 1; - - if (n === null || isNaN(n)) { - // only flow one buffer at a time - if (state.flowing && state.buffer.length) - return state.buffer[0].length; - else - return state.length; - } - - if (n <= 0) - return 0; - - // If we're asking for more than the target buffer level, - // then raise the water mark. Bump up to the next highest - // power of 2, to prevent increasing it excessively in tiny - // amounts. - if (n > state.highWaterMark) - state.highWaterMark = roundUpToNextPowerOf2(n); - - // don't have that much. return null, unless we've ended. - if (n > state.length) { - if (!state.ended) { - state.needReadable = true; - return 0; - } else - return state.length; - } - - return n; -} - -// you can override either this method, or the async _read(n) below. -Readable.prototype.read = function(n) { - var state = this._readableState; - state.calledRead = true; - var nOrig = n; - var ret; - - if (typeof n !== 'number' || n > 0) - state.emittedReadable = false; - - // if we're doing read(0) to trigger a readable event, but we - // already have a bunch of data in the buffer, then just trigger - // the 'readable' event and move on. - if (n === 0 && - state.needReadable && - (state.length >= state.highWaterMark || state.ended)) { - emitReadable(this); - return null; - } - - n = howMuchToRead(n, state); - - // if we've ended, and we're now clear, then finish it up. - if (n === 0 && state.ended) { - ret = null; - - // In cases where the decoder did not receive enough data - // to produce a full chunk, then immediately received an - // EOF, state.buffer will contain [, ]. - // howMuchToRead will see this and coerce the amount to - // read to zero (because it's looking at the length of the - // first in state.buffer), and we'll end up here. - // - // This can only happen via state.decoder -- no other venue - // exists for pushing a zero-length chunk into state.buffer - // and triggering this behavior. In this case, we return our - // remaining data and end the stream, if appropriate. - if (state.length > 0 && state.decoder) { - ret = fromList(n, state); - state.length -= ret.length; - } - - if (state.length === 0) - endReadable(this); - - return ret; - } - - // All the actual chunk generation logic needs to be - // *below* the call to _read. The reason is that in certain - // synthetic stream cases, such as passthrough streams, _read - // may be a completely synchronous operation which may change - // the state of the read buffer, providing enough data when - // before there was *not* enough. - // - // So, the steps are: - // 1. Figure out what the state of things will be after we do - // a read from the buffer. - // - // 2. If that resulting state will trigger a _read, then call _read. - // Note that this may be asynchronous, or synchronous. Yes, it is - // deeply ugly to write APIs this way, but that still doesn't mean - // that the Readable class should behave improperly, as streams are - // designed to be sync/async agnostic. - // Take note if the _read call is sync or async (ie, if the read call - // has returned yet), so that we know whether or not it's safe to emit - // 'readable' etc. - // - // 3. Actually pull the requested chunks out of the buffer and return. - - // if we need a readable event, then we need to do some reading. - var doRead = state.needReadable; - - // if we currently have less than the highWaterMark, then also read some - if (state.length - n <= state.highWaterMark) - doRead = true; - - // however, if we've ended, then there's no point, and if we're already - // reading, then it's unnecessary. - if (state.ended || state.reading) - doRead = false; - - if (doRead) { - state.reading = true; - state.sync = true; - // if the length is currently zero, then we *need* a readable event. - if (state.length === 0) - state.needReadable = true; - // call internal read method - this._read(state.highWaterMark); - state.sync = false; - } - - // If _read called its callback synchronously, then `reading` - // will be false, and we need to re-evaluate how much data we - // can return to the user. - if (doRead && !state.reading) - n = howMuchToRead(nOrig, state); - - if (n > 0) - ret = fromList(n, state); - else - ret = null; - - if (ret === null) { - state.needReadable = true; - n = 0; - } - - state.length -= n; - - // If we have nothing in the buffer, then we want to know - // as soon as we *do* get something into the buffer. - if (state.length === 0 && !state.ended) - state.needReadable = true; - - // If we happened to read() exactly the remaining amount in the - // buffer, and the EOF has been seen at this point, then make sure - // that we emit 'end' on the very next tick. - if (state.ended && !state.endEmitted && state.length === 0) - endReadable(this); - - return ret; -}; - -function chunkInvalid(state, chunk) { - var er = null; - if (!Buffer.isBuffer(chunk) && - 'string' !== typeof chunk && - chunk !== null && - chunk !== undefined && - !state.objectMode) { - er = new TypeError('Invalid non-string/buffer chunk'); - } - return er; -} - - -function onEofChunk(stream, state) { - if (state.decoder && !state.ended) { - var chunk = state.decoder.end(); - if (chunk && chunk.length) { - state.buffer.push(chunk); - state.length += state.objectMode ? 1 : chunk.length; - } - } - state.ended = true; - - // if we've ended and we have some data left, then emit - // 'readable' now to make sure it gets picked up. - if (state.length > 0) - emitReadable(stream); - else - endReadable(stream); -} - -// Don't emit readable right away in sync mode, because this can trigger -// another read() call => stack overflow. This way, it might trigger -// a nextTick recursion warning, but that's not so bad. -function emitReadable(stream) { - var state = stream._readableState; - state.needReadable = false; - if (state.emittedReadable) - return; - - state.emittedReadable = true; - if (state.sync) - process.nextTick(function() { - emitReadable_(stream); - }); - else - emitReadable_(stream); -} - -function emitReadable_(stream) { - stream.emit('readable'); -} - - -// at this point, the user has presumably seen the 'readable' event, -// and called read() to consume some data. that may have triggered -// in turn another _read(n) call, in which case reading = true if -// it's in progress. -// However, if we're not ended, or reading, and the length < hwm, -// then go ahead and try to read some more preemptively. -function maybeReadMore(stream, state) { - if (!state.readingMore) { - state.readingMore = true; - process.nextTick(function() { - maybeReadMore_(stream, state); - }); - } -} - -function maybeReadMore_(stream, state) { - var len = state.length; - while (!state.reading && !state.flowing && !state.ended && - state.length < state.highWaterMark) { - stream.read(0); - if (len === state.length) - // didn't get any data, stop spinning. - break; - else - len = state.length; - } - state.readingMore = false; -} - -// abstract method. to be overridden in specific implementation classes. -// call cb(er, data) where data is <= n in length. -// for virtual (non-string, non-buffer) streams, "length" is somewhat -// arbitrary, and perhaps not very meaningful. -Readable.prototype._read = function(n) { - this.emit('error', new Error('not implemented')); -}; - -Readable.prototype.pipe = function(dest, pipeOpts) { - var src = this; - var state = this._readableState; - - switch (state.pipesCount) { - case 0: - state.pipes = dest; - break; - case 1: - state.pipes = [state.pipes, dest]; - break; - default: - state.pipes.push(dest); - break; - } - state.pipesCount += 1; - - var doEnd = (!pipeOpts || pipeOpts.end !== false) && - dest !== process.stdout && - dest !== process.stderr; - - var endFn = doEnd ? onend : cleanup; - if (state.endEmitted) - process.nextTick(endFn); - else - src.once('end', endFn); - - dest.on('unpipe', onunpipe); - function onunpipe(readable) { - if (readable !== src) return; - cleanup(); - } - - function onend() { - dest.end(); - } - - // when the dest drains, it reduces the awaitDrain counter - // on the source. This would be more elegant with a .once() - // handler in flow(), but adding and removing repeatedly is - // too slow. - var ondrain = pipeOnDrain(src); - dest.on('drain', ondrain); - - function cleanup() { - // cleanup event handlers once the pipe is broken - dest.removeListener('close', onclose); - dest.removeListener('finish', onfinish); - dest.removeListener('drain', ondrain); - dest.removeListener('error', onerror); - dest.removeListener('unpipe', onunpipe); - src.removeListener('end', onend); - src.removeListener('end', cleanup); - - // if the reader is waiting for a drain event from this - // specific writer, then it would cause it to never start - // flowing again. - // So, if this is awaiting a drain, then we just call it now. - // If we don't know, then assume that we are waiting for one. - if (!dest._writableState || dest._writableState.needDrain) - ondrain(); - } - - // if the dest has an error, then stop piping into it. - // however, don't suppress the throwing behavior for this. - function onerror(er) { - unpipe(); - dest.removeListener('error', onerror); - if (EE.listenerCount(dest, 'error') === 0) - dest.emit('error', er); - } - // This is a brutally ugly hack to make sure that our error handler - // is attached before any userland ones. NEVER DO THIS. - if (!dest._events || !dest._events.error) - dest.on('error', onerror); - else if (isArray(dest._events.error)) - dest._events.error.unshift(onerror); - else - dest._events.error = [onerror, dest._events.error]; - - - - // Both close and finish should trigger unpipe, but only once. - function onclose() { - dest.removeListener('finish', onfinish); - unpipe(); - } - dest.once('close', onclose); - function onfinish() { - dest.removeListener('close', onclose); - unpipe(); - } - dest.once('finish', onfinish); - - function unpipe() { - src.unpipe(dest); - } - - // tell the dest that it's being piped to - dest.emit('pipe', src); - - // start the flow if it hasn't been started already. - if (!state.flowing) { - // the handler that waits for readable events after all - // the data gets sucked out in flow. - // This would be easier to follow with a .once() handler - // in flow(), but that is too slow. - this.on('readable', pipeOnReadable); - - state.flowing = true; - process.nextTick(function() { - flow(src); - }); - } - - return dest; -}; - -function pipeOnDrain(src) { - return function() { - var dest = this; - var state = src._readableState; - state.awaitDrain--; - if (state.awaitDrain === 0) - flow(src); - }; -} - -function flow(src) { - var state = src._readableState; - var chunk; - state.awaitDrain = 0; - - function write(dest, i, list) { - var written = dest.write(chunk); - if (false === written) { - state.awaitDrain++; - } - } - - while (state.pipesCount && null !== (chunk = src.read())) { - - if (state.pipesCount === 1) - write(state.pipes, 0, null); - else - forEach(state.pipes, write); - - src.emit('data', chunk); - - // if anyone needs a drain, then we have to wait for that. - if (state.awaitDrain > 0) - return; - } - - // if every destination was unpiped, either before entering this - // function, or in the while loop, then stop flowing. - // - // NB: This is a pretty rare edge case. - if (state.pipesCount === 0) { - state.flowing = false; - - // if there were data event listeners added, then switch to old mode. - if (EE.listenerCount(src, 'data') > 0) - emitDataEvents(src); - return; - } - - // at this point, no one needed a drain, so we just ran out of data - // on the next readable event, start it over again. - state.ranOut = true; -} - -function pipeOnReadable() { - if (this._readableState.ranOut) { - this._readableState.ranOut = false; - flow(this); - } -} - - -Readable.prototype.unpipe = function(dest) { - var state = this._readableState; - - // if we're not piping anywhere, then do nothing. - if (state.pipesCount === 0) - return this; - - // just one destination. most common case. - if (state.pipesCount === 1) { - // passed in one, but it's not the right one. - if (dest && dest !== state.pipes) - return this; - - if (!dest) - dest = state.pipes; - - // got a match. - state.pipes = null; - state.pipesCount = 0; - this.removeListener('readable', pipeOnReadable); - state.flowing = false; - if (dest) - dest.emit('unpipe', this); - return this; - } - - // slow case. multiple pipe destinations. - - if (!dest) { - // remove all. - var dests = state.pipes; - var len = state.pipesCount; - state.pipes = null; - state.pipesCount = 0; - this.removeListener('readable', pipeOnReadable); - state.flowing = false; - - for (var i = 0; i < len; i++) - dests[i].emit('unpipe', this); - return this; - } - - // try to find the right one. - var i = indexOf(state.pipes, dest); - if (i === -1) - return this; - - state.pipes.splice(i, 1); - state.pipesCount -= 1; - if (state.pipesCount === 1) - state.pipes = state.pipes[0]; - - dest.emit('unpipe', this); - - return this; -}; - -// set up data events if they are asked for -// Ensure readable listeners eventually get something -Readable.prototype.on = function(ev, fn) { - var res = Stream.prototype.on.call(this, ev, fn); - - if (ev === 'data' && !this._readableState.flowing) - emitDataEvents(this); - - if (ev === 'readable' && this.readable) { - var state = this._readableState; - if (!state.readableListening) { - state.readableListening = true; - state.emittedReadable = false; - state.needReadable = true; - if (!state.reading) { - this.read(0); - } else if (state.length) { - emitReadable(this, state); - } - } - } - - return res; -}; -Readable.prototype.addListener = Readable.prototype.on; - -// pause() and resume() are remnants of the legacy readable stream API -// If the user uses them, then switch into old mode. -Readable.prototype.resume = function() { - emitDataEvents(this); - this.read(0); - this.emit('resume'); -}; - -Readable.prototype.pause = function() { - emitDataEvents(this, true); - this.emit('pause'); -}; - -function emitDataEvents(stream, startPaused) { - var state = stream._readableState; - - if (state.flowing) { - // https://github.com/isaacs/readable-stream/issues/16 - throw new Error('Cannot switch to old mode now.'); - } - - var paused = startPaused || false; - var readable = false; - - // convert to an old-style stream. - stream.readable = true; - stream.pipe = Stream.prototype.pipe; - stream.on = stream.addListener = Stream.prototype.on; - - stream.on('readable', function() { - readable = true; - - var c; - while (!paused && (null !== (c = stream.read()))) - stream.emit('data', c); - - if (c === null) { - readable = false; - stream._readableState.needReadable = true; - } - }); - - stream.pause = function() { - paused = true; - this.emit('pause'); - }; - - stream.resume = function() { - paused = false; - if (readable) - process.nextTick(function() { - stream.emit('readable'); - }); - else - this.read(0); - this.emit('resume'); - }; - - // now make it start, just in case it hadn't already. - stream.emit('readable'); -} - -// wrap an old-style stream as the async data source. -// This is *not* part of the readable stream interface. -// It is an ugly unfortunate mess of history. -Readable.prototype.wrap = function(stream) { - var state = this._readableState; - var paused = false; - - var self = this; - stream.on('end', function() { - if (state.decoder && !state.ended) { - var chunk = state.decoder.end(); - if (chunk && chunk.length) - self.push(chunk); - } - - self.push(null); - }); - - stream.on('data', function(chunk) { - if (state.decoder) - chunk = state.decoder.write(chunk); - - // don't skip over falsy values in objectMode - //if (state.objectMode && util.isNullOrUndefined(chunk)) - if (state.objectMode && (chunk === null || chunk === undefined)) - return; - else if (!state.objectMode && (!chunk || !chunk.length)) - return; - - var ret = self.push(chunk); - if (!ret) { - paused = true; - stream.pause(); - } - }); - - // proxy all the other methods. - // important when wrapping filters and duplexes. - for (var i in stream) { - if (typeof stream[i] === 'function' && - typeof this[i] === 'undefined') { - this[i] = function(method) { return function() { - return stream[method].apply(stream, arguments); - }}(i); - } - } - - // proxy certain important events. - var events = ['error', 'close', 'destroy', 'pause', 'resume']; - forEach(events, function(ev) { - stream.on(ev, self.emit.bind(self, ev)); - }); - - // when we try to consume some more bytes, simply unpause the - // underlying stream. - self._read = function(n) { - if (paused) { - paused = false; - stream.resume(); - } - }; - - return self; -}; - - - -// exposed for testing purposes only. -Readable._fromList = fromList; - -// Pluck off n bytes from an array of buffers. -// Length is the combined lengths of all the buffers in the list. -function fromList(n, state) { - var list = state.buffer; - var length = state.length; - var stringMode = !!state.decoder; - var objectMode = !!state.objectMode; - var ret; - - // nothing in the list, definitely empty. - if (list.length === 0) - return null; - - if (length === 0) - ret = null; - else if (objectMode) - ret = list.shift(); - else if (!n || n >= length) { - // read it all, truncate the array. - if (stringMode) - ret = list.join(''); - else - ret = Buffer.concat(list, length); - list.length = 0; - } else { - // read just some of it. - if (n < list[0].length) { - // just take a part of the first list item. - // slice is the same for buffers and strings. - var buf = list[0]; - ret = buf.slice(0, n); - list[0] = buf.slice(n); - } else if (n === list[0].length) { - // first list is a perfect match - ret = list.shift(); - } else { - // complex case. - // we have enough to cover it, but it spans past the first buffer. - if (stringMode) - ret = ''; - else - ret = new Buffer(n); - - var c = 0; - for (var i = 0, l = list.length; i < l && c < n; i++) { - var buf = list[0]; - var cpy = Math.min(n - c, buf.length); - - if (stringMode) - ret += buf.slice(0, cpy); - else - buf.copy(ret, c, 0, cpy); - - if (cpy < buf.length) - list[0] = buf.slice(cpy); - else - list.shift(); - - c += cpy; - } - } - } - - return ret; -} - -function endReadable(stream) { - var state = stream._readableState; - - // If we get here before consuming all the bytes, then that is a - // bug in node. Should never happen. - if (state.length > 0) - throw new Error('endReadable called on non-empty stream'); - - if (!state.endEmitted && state.calledRead) { - state.ended = true; - process.nextTick(function() { - // Check that we didn't get one last unshift. - if (!state.endEmitted && state.length === 0) { - state.endEmitted = true; - stream.readable = false; - stream.emit('end'); - } - }); - } -} - -function forEach (xs, f) { - for (var i = 0, l = xs.length; i < l; i++) { - f(xs[i], i); - } -} - -function indexOf (xs, x) { - for (var i = 0, l = xs.length; i < l; i++) { - if (xs[i] === x) return i; - } - return -1; -} diff --git a/node_modules/browserify-fs/node_modules/levelup/node_modules/readable-stream/lib/_stream_transform.js b/node_modules/browserify-fs/node_modules/levelup/node_modules/readable-stream/lib/_stream_transform.js deleted file mode 100644 index eb188df3..00000000 --- a/node_modules/browserify-fs/node_modules/levelup/node_modules/readable-stream/lib/_stream_transform.js +++ /dev/null @@ -1,210 +0,0 @@ -// Copyright Joyent, Inc. and other Node contributors. -// -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to permit -// persons to whom the Software is furnished to do so, subject to the -// following conditions: -// -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -// USE OR OTHER DEALINGS IN THE SOFTWARE. - - -// a transform stream is a readable/writable stream where you do -// something with the data. Sometimes it's called a "filter", -// but that's not a great name for it, since that implies a thing where -// some bits pass through, and others are simply ignored. (That would -// be a valid example of a transform, of course.) -// -// While the output is causally related to the input, it's not a -// necessarily symmetric or synchronous transformation. For example, -// a zlib stream might take multiple plain-text writes(), and then -// emit a single compressed chunk some time in the future. -// -// Here's how this works: -// -// The Transform stream has all the aspects of the readable and writable -// stream classes. When you write(chunk), that calls _write(chunk,cb) -// internally, and returns false if there's a lot of pending writes -// buffered up. When you call read(), that calls _read(n) until -// there's enough pending readable data buffered up. -// -// In a transform stream, the written data is placed in a buffer. When -// _read(n) is called, it transforms the queued up data, calling the -// buffered _write cb's as it consumes chunks. If consuming a single -// written chunk would result in multiple output chunks, then the first -// outputted bit calls the readcb, and subsequent chunks just go into -// the read buffer, and will cause it to emit 'readable' if necessary. -// -// This way, back-pressure is actually determined by the reading side, -// since _read has to be called to start processing a new chunk. However, -// a pathological inflate type of transform can cause excessive buffering -// here. For example, imagine a stream where every byte of input is -// interpreted as an integer from 0-255, and then results in that many -// bytes of output. Writing the 4 bytes {ff,ff,ff,ff} would result in -// 1kb of data being output. In this case, you could write a very small -// amount of input, and end up with a very large amount of output. In -// such a pathological inflating mechanism, there'd be no way to tell -// the system to stop doing the transform. A single 4MB write could -// cause the system to run out of memory. -// -// However, even in such a pathological case, only a single written chunk -// would be consumed, and then the rest would wait (un-transformed) until -// the results of the previous transformed chunk were consumed. - -module.exports = Transform; - -var Duplex = require('./_stream_duplex'); - -/**/ -var util = require('core-util-is'); -util.inherits = require('inherits'); -/**/ - -util.inherits(Transform, Duplex); - - -function TransformState(options, stream) { - this.afterTransform = function(er, data) { - return afterTransform(stream, er, data); - }; - - this.needTransform = false; - this.transforming = false; - this.writecb = null; - this.writechunk = null; -} - -function afterTransform(stream, er, data) { - var ts = stream._transformState; - ts.transforming = false; - - var cb = ts.writecb; - - if (!cb) - return stream.emit('error', new Error('no writecb in Transform class')); - - ts.writechunk = null; - ts.writecb = null; - - if (data !== null && data !== undefined) - stream.push(data); - - if (cb) - cb(er); - - var rs = stream._readableState; - rs.reading = false; - if (rs.needReadable || rs.length < rs.highWaterMark) { - stream._read(rs.highWaterMark); - } -} - - -function Transform(options) { - if (!(this instanceof Transform)) - return new Transform(options); - - Duplex.call(this, options); - - var ts = this._transformState = new TransformState(options, this); - - // when the writable side finishes, then flush out anything remaining. - var stream = this; - - // start out asking for a readable event once data is transformed. - this._readableState.needReadable = true; - - // we have implemented the _read method, and done the other things - // that Readable wants before the first _read call, so unset the - // sync guard flag. - this._readableState.sync = false; - - this.once('finish', function() { - if ('function' === typeof this._flush) - this._flush(function(er) { - done(stream, er); - }); - else - done(stream); - }); -} - -Transform.prototype.push = function(chunk, encoding) { - this._transformState.needTransform = false; - return Duplex.prototype.push.call(this, chunk, encoding); -}; - -// This is the part where you do stuff! -// override this function in implementation classes. -// 'chunk' is an input chunk. -// -// Call `push(newChunk)` to pass along transformed output -// to the readable side. You may call 'push' zero or more times. -// -// Call `cb(err)` when you are done with this chunk. If you pass -// an error, then that'll put the hurt on the whole operation. If you -// never call cb(), then you'll never get another chunk. -Transform.prototype._transform = function(chunk, encoding, cb) { - throw new Error('not implemented'); -}; - -Transform.prototype._write = function(chunk, encoding, cb) { - var ts = this._transformState; - ts.writecb = cb; - ts.writechunk = chunk; - ts.writeencoding = encoding; - if (!ts.transforming) { - var rs = this._readableState; - if (ts.needTransform || - rs.needReadable || - rs.length < rs.highWaterMark) - this._read(rs.highWaterMark); - } -}; - -// Doesn't matter what the args are here. -// _transform does all the work. -// That we got here means that the readable side wants more data. -Transform.prototype._read = function(n) { - var ts = this._transformState; - - if (ts.writechunk !== null && ts.writecb && !ts.transforming) { - ts.transforming = true; - this._transform(ts.writechunk, ts.writeencoding, ts.afterTransform); - } else { - // mark that we need a transform, so that any data that comes in - // will get processed, now that we've asked for it. - ts.needTransform = true; - } -}; - - -function done(stream, er) { - if (er) - return stream.emit('error', er); - - // if there's nothing in the write buffer, then that means - // that nothing more will ever be provided - var ws = stream._writableState; - var rs = stream._readableState; - var ts = stream._transformState; - - if (ws.length) - throw new Error('calling transform done when ws.length != 0'); - - if (ts.transforming) - throw new Error('calling transform done when still transforming'); - - return stream.push(null); -} diff --git a/node_modules/browserify-fs/node_modules/levelup/node_modules/readable-stream/lib/_stream_writable.js b/node_modules/browserify-fs/node_modules/levelup/node_modules/readable-stream/lib/_stream_writable.js deleted file mode 100644 index 4bdaa4fa..00000000 --- a/node_modules/browserify-fs/node_modules/levelup/node_modules/readable-stream/lib/_stream_writable.js +++ /dev/null @@ -1,386 +0,0 @@ -// Copyright Joyent, Inc. and other Node contributors. -// -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to permit -// persons to whom the Software is furnished to do so, subject to the -// following conditions: -// -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -// USE OR OTHER DEALINGS IN THE SOFTWARE. - -// A bit simpler than readable streams. -// Implement an async ._write(chunk, cb), and it'll handle all -// the drain event emission and buffering. - -module.exports = Writable; - -/**/ -var Buffer = require('buffer').Buffer; -/**/ - -Writable.WritableState = WritableState; - - -/**/ -var util = require('core-util-is'); -util.inherits = require('inherits'); -/**/ - -var Stream = require('stream'); - -util.inherits(Writable, Stream); - -function WriteReq(chunk, encoding, cb) { - this.chunk = chunk; - this.encoding = encoding; - this.callback = cb; -} - -function WritableState(options, stream) { - options = options || {}; - - // the point at which write() starts returning false - // Note: 0 is a valid value, means that we always return false if - // the entire buffer is not flushed immediately on write() - var hwm = options.highWaterMark; - this.highWaterMark = (hwm || hwm === 0) ? hwm : 16 * 1024; - - // object stream flag to indicate whether or not this stream - // contains buffers or objects. - this.objectMode = !!options.objectMode; - - // cast to ints. - this.highWaterMark = ~~this.highWaterMark; - - this.needDrain = false; - // at the start of calling end() - this.ending = false; - // when end() has been called, and returned - this.ended = false; - // when 'finish' is emitted - this.finished = false; - - // should we decode strings into buffers before passing to _write? - // this is here so that some node-core streams can optimize string - // handling at a lower level. - var noDecode = options.decodeStrings === false; - this.decodeStrings = !noDecode; - - // Crypto is kind of old and crusty. Historically, its default string - // encoding is 'binary' so we have to make this configurable. - // Everything else in the universe uses 'utf8', though. - this.defaultEncoding = options.defaultEncoding || 'utf8'; - - // not an actual buffer we keep track of, but a measurement - // of how much we're waiting to get pushed to some underlying - // socket or file. - this.length = 0; - - // a flag to see when we're in the middle of a write. - this.writing = false; - - // a flag to be able to tell if the onwrite cb is called immediately, - // or on a later tick. We set this to true at first, becuase any - // actions that shouldn't happen until "later" should generally also - // not happen before the first write call. - this.sync = true; - - // a flag to know if we're processing previously buffered items, which - // may call the _write() callback in the same tick, so that we don't - // end up in an overlapped onwrite situation. - this.bufferProcessing = false; - - // the callback that's passed to _write(chunk,cb) - this.onwrite = function(er) { - onwrite(stream, er); - }; - - // the callback that the user supplies to write(chunk,encoding,cb) - this.writecb = null; - - // the amount that is being written when _write is called. - this.writelen = 0; - - this.buffer = []; - - // True if the error was already emitted and should not be thrown again - this.errorEmitted = false; -} - -function Writable(options) { - var Duplex = require('./_stream_duplex'); - - // Writable ctor is applied to Duplexes, though they're not - // instanceof Writable, they're instanceof Readable. - if (!(this instanceof Writable) && !(this instanceof Duplex)) - return new Writable(options); - - this._writableState = new WritableState(options, this); - - // legacy. - this.writable = true; - - Stream.call(this); -} - -// Otherwise people can pipe Writable streams, which is just wrong. -Writable.prototype.pipe = function() { - this.emit('error', new Error('Cannot pipe. Not readable.')); -}; - - -function writeAfterEnd(stream, state, cb) { - var er = new Error('write after end'); - // TODO: defer error events consistently everywhere, not just the cb - stream.emit('error', er); - process.nextTick(function() { - cb(er); - }); -} - -// If we get something that is not a buffer, string, null, or undefined, -// and we're not in objectMode, then that's an error. -// Otherwise stream chunks are all considered to be of length=1, and the -// watermarks determine how many objects to keep in the buffer, rather than -// how many bytes or characters. -function validChunk(stream, state, chunk, cb) { - var valid = true; - if (!Buffer.isBuffer(chunk) && - 'string' !== typeof chunk && - chunk !== null && - chunk !== undefined && - !state.objectMode) { - var er = new TypeError('Invalid non-string/buffer chunk'); - stream.emit('error', er); - process.nextTick(function() { - cb(er); - }); - valid = false; - } - return valid; -} - -Writable.prototype.write = function(chunk, encoding, cb) { - var state = this._writableState; - var ret = false; - - if (typeof encoding === 'function') { - cb = encoding; - encoding = null; - } - - if (Buffer.isBuffer(chunk)) - encoding = 'buffer'; - else if (!encoding) - encoding = state.defaultEncoding; - - if (typeof cb !== 'function') - cb = function() {}; - - if (state.ended) - writeAfterEnd(this, state, cb); - else if (validChunk(this, state, chunk, cb)) - ret = writeOrBuffer(this, state, chunk, encoding, cb); - - return ret; -}; - -function decodeChunk(state, chunk, encoding) { - if (!state.objectMode && - state.decodeStrings !== false && - typeof chunk === 'string') { - chunk = new Buffer(chunk, encoding); - } - return chunk; -} - -// if we're already writing something, then just put this -// in the queue, and wait our turn. Otherwise, call _write -// If we return false, then we need a drain event, so set that flag. -function writeOrBuffer(stream, state, chunk, encoding, cb) { - chunk = decodeChunk(state, chunk, encoding); - if (Buffer.isBuffer(chunk)) - encoding = 'buffer'; - var len = state.objectMode ? 1 : chunk.length; - - state.length += len; - - var ret = state.length < state.highWaterMark; - // we must ensure that previous needDrain will not be reset to false. - if (!ret) - state.needDrain = true; - - if (state.writing) - state.buffer.push(new WriteReq(chunk, encoding, cb)); - else - doWrite(stream, state, len, chunk, encoding, cb); - - return ret; -} - -function doWrite(stream, state, len, chunk, encoding, cb) { - state.writelen = len; - state.writecb = cb; - state.writing = true; - state.sync = true; - stream._write(chunk, encoding, state.onwrite); - state.sync = false; -} - -function onwriteError(stream, state, sync, er, cb) { - if (sync) - process.nextTick(function() { - cb(er); - }); - else - cb(er); - - stream._writableState.errorEmitted = true; - stream.emit('error', er); -} - -function onwriteStateUpdate(state) { - state.writing = false; - state.writecb = null; - state.length -= state.writelen; - state.writelen = 0; -} - -function onwrite(stream, er) { - var state = stream._writableState; - var sync = state.sync; - var cb = state.writecb; - - onwriteStateUpdate(state); - - if (er) - onwriteError(stream, state, sync, er, cb); - else { - // Check if we're actually ready to finish, but don't emit yet - var finished = needFinish(stream, state); - - if (!finished && !state.bufferProcessing && state.buffer.length) - clearBuffer(stream, state); - - if (sync) { - process.nextTick(function() { - afterWrite(stream, state, finished, cb); - }); - } else { - afterWrite(stream, state, finished, cb); - } - } -} - -function afterWrite(stream, state, finished, cb) { - if (!finished) - onwriteDrain(stream, state); - cb(); - if (finished) - finishMaybe(stream, state); -} - -// Must force callback to be called on nextTick, so that we don't -// emit 'drain' before the write() consumer gets the 'false' return -// value, and has a chance to attach a 'drain' listener. -function onwriteDrain(stream, state) { - if (state.length === 0 && state.needDrain) { - state.needDrain = false; - stream.emit('drain'); - } -} - - -// if there's something in the buffer waiting, then process it -function clearBuffer(stream, state) { - state.bufferProcessing = true; - - for (var c = 0; c < state.buffer.length; c++) { - var entry = state.buffer[c]; - var chunk = entry.chunk; - var encoding = entry.encoding; - var cb = entry.callback; - var len = state.objectMode ? 1 : chunk.length; - - doWrite(stream, state, len, chunk, encoding, cb); - - // if we didn't call the onwrite immediately, then - // it means that we need to wait until it does. - // also, that means that the chunk and cb are currently - // being processed, so move the buffer counter past them. - if (state.writing) { - c++; - break; - } - } - - state.bufferProcessing = false; - if (c < state.buffer.length) - state.buffer = state.buffer.slice(c); - else - state.buffer.length = 0; -} - -Writable.prototype._write = function(chunk, encoding, cb) { - cb(new Error('not implemented')); -}; - -Writable.prototype.end = function(chunk, encoding, cb) { - var state = this._writableState; - - if (typeof chunk === 'function') { - cb = chunk; - chunk = null; - encoding = null; - } else if (typeof encoding === 'function') { - cb = encoding; - encoding = null; - } - - if (typeof chunk !== 'undefined' && chunk !== null) - this.write(chunk, encoding); - - // ignore unnecessary end() calls. - if (!state.ending && !state.finished) - endWritable(this, state, cb); -}; - - -function needFinish(stream, state) { - return (state.ending && - state.length === 0 && - !state.finished && - !state.writing); -} - -function finishMaybe(stream, state) { - var need = needFinish(stream, state); - if (need) { - state.finished = true; - stream.emit('finish'); - } - return need; -} - -function endWritable(stream, state, cb) { - state.ending = true; - finishMaybe(stream, state); - if (cb) { - if (state.finished) - process.nextTick(cb); - else - stream.once('finish', cb); - } - state.ended = true; -} diff --git a/node_modules/browserify-fs/node_modules/levelup/node_modules/readable-stream/node_modules/core-util-is/LICENSE b/node_modules/browserify-fs/node_modules/levelup/node_modules/readable-stream/node_modules/core-util-is/LICENSE deleted file mode 100644 index d8d7f943..00000000 --- a/node_modules/browserify-fs/node_modules/levelup/node_modules/readable-stream/node_modules/core-util-is/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright Node.js contributors. All rights reserved. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to -deal in the Software without restriction, including without limitation the -rights to use, copy, modify, merge, publish, distribute, sublicense, and/or -sell copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS -IN THE SOFTWARE. diff --git a/node_modules/browserify-fs/node_modules/levelup/node_modules/readable-stream/node_modules/core-util-is/README.md b/node_modules/browserify-fs/node_modules/levelup/node_modules/readable-stream/node_modules/core-util-is/README.md deleted file mode 100644 index 5a76b414..00000000 --- a/node_modules/browserify-fs/node_modules/levelup/node_modules/readable-stream/node_modules/core-util-is/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# core-util-is - -The `util.is*` functions introduced in Node v0.12. diff --git a/node_modules/browserify-fs/node_modules/levelup/node_modules/readable-stream/node_modules/core-util-is/float.patch b/node_modules/browserify-fs/node_modules/levelup/node_modules/readable-stream/node_modules/core-util-is/float.patch deleted file mode 100644 index a06d5c05..00000000 --- a/node_modules/browserify-fs/node_modules/levelup/node_modules/readable-stream/node_modules/core-util-is/float.patch +++ /dev/null @@ -1,604 +0,0 @@ -diff --git a/lib/util.js b/lib/util.js -index a03e874..9074e8e 100644 ---- a/lib/util.js -+++ b/lib/util.js -@@ -19,430 +19,6 @@ - // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE - // USE OR OTHER DEALINGS IN THE SOFTWARE. - --var formatRegExp = /%[sdj%]/g; --exports.format = function(f) { -- if (!isString(f)) { -- var objects = []; -- for (var i = 0; i < arguments.length; i++) { -- objects.push(inspect(arguments[i])); -- } -- return objects.join(' '); -- } -- -- var i = 1; -- var args = arguments; -- var len = args.length; -- var str = String(f).replace(formatRegExp, function(x) { -- if (x === '%%') return '%'; -- if (i >= len) return x; -- switch (x) { -- case '%s': return String(args[i++]); -- case '%d': return Number(args[i++]); -- case '%j': -- try { -- return JSON.stringify(args[i++]); -- } catch (_) { -- return '[Circular]'; -- } -- default: -- return x; -- } -- }); -- for (var x = args[i]; i < len; x = args[++i]) { -- if (isNull(x) || !isObject(x)) { -- str += ' ' + x; -- } else { -- str += ' ' + inspect(x); -- } -- } -- return str; --}; -- -- --// Mark that a method should not be used. --// Returns a modified function which warns once by default. --// If --no-deprecation is set, then it is a no-op. --exports.deprecate = function(fn, msg) { -- // Allow for deprecating things in the process of starting up. -- if (isUndefined(global.process)) { -- return function() { -- return exports.deprecate(fn, msg).apply(this, arguments); -- }; -- } -- -- if (process.noDeprecation === true) { -- return fn; -- } -- -- var warned = false; -- function deprecated() { -- if (!warned) { -- if (process.throwDeprecation) { -- throw new Error(msg); -- } else if (process.traceDeprecation) { -- console.trace(msg); -- } else { -- console.error(msg); -- } -- warned = true; -- } -- return fn.apply(this, arguments); -- } -- -- return deprecated; --}; -- -- --var debugs = {}; --var debugEnviron; --exports.debuglog = function(set) { -- if (isUndefined(debugEnviron)) -- debugEnviron = process.env.NODE_DEBUG || ''; -- set = set.toUpperCase(); -- if (!debugs[set]) { -- if (new RegExp('\\b' + set + '\\b', 'i').test(debugEnviron)) { -- var pid = process.pid; -- debugs[set] = function() { -- var msg = exports.format.apply(exports, arguments); -- console.error('%s %d: %s', set, pid, msg); -- }; -- } else { -- debugs[set] = function() {}; -- } -- } -- return debugs[set]; --}; -- -- --/** -- * Echos the value of a value. Trys to print the value out -- * in the best way possible given the different types. -- * -- * @param {Object} obj The object to print out. -- * @param {Object} opts Optional options object that alters the output. -- */ --/* legacy: obj, showHidden, depth, colors*/ --function inspect(obj, opts) { -- // default options -- var ctx = { -- seen: [], -- stylize: stylizeNoColor -- }; -- // legacy... -- if (arguments.length >= 3) ctx.depth = arguments[2]; -- if (arguments.length >= 4) ctx.colors = arguments[3]; -- if (isBoolean(opts)) { -- // legacy... -- ctx.showHidden = opts; -- } else if (opts) { -- // got an "options" object -- exports._extend(ctx, opts); -- } -- // set default options -- if (isUndefined(ctx.showHidden)) ctx.showHidden = false; -- if (isUndefined(ctx.depth)) ctx.depth = 2; -- if (isUndefined(ctx.colors)) ctx.colors = false; -- if (isUndefined(ctx.customInspect)) ctx.customInspect = true; -- if (ctx.colors) ctx.stylize = stylizeWithColor; -- return formatValue(ctx, obj, ctx.depth); --} --exports.inspect = inspect; -- -- --// http://en.wikipedia.org/wiki/ANSI_escape_code#graphics --inspect.colors = { -- 'bold' : [1, 22], -- 'italic' : [3, 23], -- 'underline' : [4, 24], -- 'inverse' : [7, 27], -- 'white' : [37, 39], -- 'grey' : [90, 39], -- 'black' : [30, 39], -- 'blue' : [34, 39], -- 'cyan' : [36, 39], -- 'green' : [32, 39], -- 'magenta' : [35, 39], -- 'red' : [31, 39], -- 'yellow' : [33, 39] --}; -- --// Don't use 'blue' not visible on cmd.exe --inspect.styles = { -- 'special': 'cyan', -- 'number': 'yellow', -- 'boolean': 'yellow', -- 'undefined': 'grey', -- 'null': 'bold', -- 'string': 'green', -- 'date': 'magenta', -- // "name": intentionally not styling -- 'regexp': 'red' --}; -- -- --function stylizeWithColor(str, styleType) { -- var style = inspect.styles[styleType]; -- -- if (style) { -- return '\u001b[' + inspect.colors[style][0] + 'm' + str + -- '\u001b[' + inspect.colors[style][1] + 'm'; -- } else { -- return str; -- } --} -- -- --function stylizeNoColor(str, styleType) { -- return str; --} -- -- --function arrayToHash(array) { -- var hash = {}; -- -- array.forEach(function(val, idx) { -- hash[val] = true; -- }); -- -- return hash; --} -- -- --function formatValue(ctx, value, recurseTimes) { -- // Provide a hook for user-specified inspect functions. -- // Check that value is an object with an inspect function on it -- if (ctx.customInspect && -- value && -- isFunction(value.inspect) && -- // Filter out the util module, it's inspect function is special -- value.inspect !== exports.inspect && -- // Also filter out any prototype objects using the circular check. -- !(value.constructor && value.constructor.prototype === value)) { -- var ret = value.inspect(recurseTimes, ctx); -- if (!isString(ret)) { -- ret = formatValue(ctx, ret, recurseTimes); -- } -- return ret; -- } -- -- // Primitive types cannot have properties -- var primitive = formatPrimitive(ctx, value); -- if (primitive) { -- return primitive; -- } -- -- // Look up the keys of the object. -- var keys = Object.keys(value); -- var visibleKeys = arrayToHash(keys); -- -- if (ctx.showHidden) { -- keys = Object.getOwnPropertyNames(value); -- } -- -- // Some type of object without properties can be shortcutted. -- if (keys.length === 0) { -- if (isFunction(value)) { -- var name = value.name ? ': ' + value.name : ''; -- return ctx.stylize('[Function' + name + ']', 'special'); -- } -- if (isRegExp(value)) { -- return ctx.stylize(RegExp.prototype.toString.call(value), 'regexp'); -- } -- if (isDate(value)) { -- return ctx.stylize(Date.prototype.toString.call(value), 'date'); -- } -- if (isError(value)) { -- return formatError(value); -- } -- } -- -- var base = '', array = false, braces = ['{', '}']; -- -- // Make Array say that they are Array -- if (isArray(value)) { -- array = true; -- braces = ['[', ']']; -- } -- -- // Make functions say that they are functions -- if (isFunction(value)) { -- var n = value.name ? ': ' + value.name : ''; -- base = ' [Function' + n + ']'; -- } -- -- // Make RegExps say that they are RegExps -- if (isRegExp(value)) { -- base = ' ' + RegExp.prototype.toString.call(value); -- } -- -- // Make dates with properties first say the date -- if (isDate(value)) { -- base = ' ' + Date.prototype.toUTCString.call(value); -- } -- -- // Make error with message first say the error -- if (isError(value)) { -- base = ' ' + formatError(value); -- } -- -- if (keys.length === 0 && (!array || value.length == 0)) { -- return braces[0] + base + braces[1]; -- } -- -- if (recurseTimes < 0) { -- if (isRegExp(value)) { -- return ctx.stylize(RegExp.prototype.toString.call(value), 'regexp'); -- } else { -- return ctx.stylize('[Object]', 'special'); -- } -- } -- -- ctx.seen.push(value); -- -- var output; -- if (array) { -- output = formatArray(ctx, value, recurseTimes, visibleKeys, keys); -- } else { -- output = keys.map(function(key) { -- return formatProperty(ctx, value, recurseTimes, visibleKeys, key, array); -- }); -- } -- -- ctx.seen.pop(); -- -- return reduceToSingleString(output, base, braces); --} -- -- --function formatPrimitive(ctx, value) { -- if (isUndefined(value)) -- return ctx.stylize('undefined', 'undefined'); -- if (isString(value)) { -- var simple = '\'' + JSON.stringify(value).replace(/^"|"$/g, '') -- .replace(/'/g, "\\'") -- .replace(/\\"/g, '"') + '\''; -- return ctx.stylize(simple, 'string'); -- } -- if (isNumber(value)) { -- // Format -0 as '-0'. Strict equality won't distinguish 0 from -0, -- // so instead we use the fact that 1 / -0 < 0 whereas 1 / 0 > 0 . -- if (value === 0 && 1 / value < 0) -- return ctx.stylize('-0', 'number'); -- return ctx.stylize('' + value, 'number'); -- } -- if (isBoolean(value)) -- return ctx.stylize('' + value, 'boolean'); -- // For some reason typeof null is "object", so special case here. -- if (isNull(value)) -- return ctx.stylize('null', 'null'); --} -- -- --function formatError(value) { -- return '[' + Error.prototype.toString.call(value) + ']'; --} -- -- --function formatArray(ctx, value, recurseTimes, visibleKeys, keys) { -- var output = []; -- for (var i = 0, l = value.length; i < l; ++i) { -- if (hasOwnProperty(value, String(i))) { -- output.push(formatProperty(ctx, value, recurseTimes, visibleKeys, -- String(i), true)); -- } else { -- output.push(''); -- } -- } -- keys.forEach(function(key) { -- if (!key.match(/^\d+$/)) { -- output.push(formatProperty(ctx, value, recurseTimes, visibleKeys, -- key, true)); -- } -- }); -- return output; --} -- -- --function formatProperty(ctx, value, recurseTimes, visibleKeys, key, array) { -- var name, str, desc; -- desc = Object.getOwnPropertyDescriptor(value, key) || { value: value[key] }; -- if (desc.get) { -- if (desc.set) { -- str = ctx.stylize('[Getter/Setter]', 'special'); -- } else { -- str = ctx.stylize('[Getter]', 'special'); -- } -- } else { -- if (desc.set) { -- str = ctx.stylize('[Setter]', 'special'); -- } -- } -- if (!hasOwnProperty(visibleKeys, key)) { -- name = '[' + key + ']'; -- } -- if (!str) { -- if (ctx.seen.indexOf(desc.value) < 0) { -- if (isNull(recurseTimes)) { -- str = formatValue(ctx, desc.value, null); -- } else { -- str = formatValue(ctx, desc.value, recurseTimes - 1); -- } -- if (str.indexOf('\n') > -1) { -- if (array) { -- str = str.split('\n').map(function(line) { -- return ' ' + line; -- }).join('\n').substr(2); -- } else { -- str = '\n' + str.split('\n').map(function(line) { -- return ' ' + line; -- }).join('\n'); -- } -- } -- } else { -- str = ctx.stylize('[Circular]', 'special'); -- } -- } -- if (isUndefined(name)) { -- if (array && key.match(/^\d+$/)) { -- return str; -- } -- name = JSON.stringify('' + key); -- if (name.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)) { -- name = name.substr(1, name.length - 2); -- name = ctx.stylize(name, 'name'); -- } else { -- name = name.replace(/'/g, "\\'") -- .replace(/\\"/g, '"') -- .replace(/(^"|"$)/g, "'"); -- name = ctx.stylize(name, 'string'); -- } -- } -- -- return name + ': ' + str; --} -- -- --function reduceToSingleString(output, base, braces) { -- var numLinesEst = 0; -- var length = output.reduce(function(prev, cur) { -- numLinesEst++; -- if (cur.indexOf('\n') >= 0) numLinesEst++; -- return prev + cur.replace(/\u001b\[\d\d?m/g, '').length + 1; -- }, 0); -- -- if (length > 60) { -- return braces[0] + -- (base === '' ? '' : base + '\n ') + -- ' ' + -- output.join(',\n ') + -- ' ' + -- braces[1]; -- } -- -- return braces[0] + base + ' ' + output.join(', ') + ' ' + braces[1]; --} -- -- - // NOTE: These type checking functions intentionally don't use `instanceof` - // because it is fragile and can be easily faked with `Object.create()`. - function isArray(ar) { -@@ -522,166 +98,10 @@ function isPrimitive(arg) { - exports.isPrimitive = isPrimitive; - - function isBuffer(arg) { -- return arg instanceof Buffer; -+ return Buffer.isBuffer(arg); - } - exports.isBuffer = isBuffer; - - function objectToString(o) { - return Object.prototype.toString.call(o); --} -- -- --function pad(n) { -- return n < 10 ? '0' + n.toString(10) : n.toString(10); --} -- -- --var months = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', -- 'Oct', 'Nov', 'Dec']; -- --// 26 Feb 16:19:34 --function timestamp() { -- var d = new Date(); -- var time = [pad(d.getHours()), -- pad(d.getMinutes()), -- pad(d.getSeconds())].join(':'); -- return [d.getDate(), months[d.getMonth()], time].join(' '); --} -- -- --// log is just a thin wrapper to console.log that prepends a timestamp --exports.log = function() { -- console.log('%s - %s', timestamp(), exports.format.apply(exports, arguments)); --}; -- -- --/** -- * Inherit the prototype methods from one constructor into another. -- * -- * The Function.prototype.inherits from lang.js rewritten as a standalone -- * function (not on Function.prototype). NOTE: If this file is to be loaded -- * during bootstrapping this function needs to be rewritten using some native -- * functions as prototype setup using normal JavaScript does not work as -- * expected during bootstrapping (see mirror.js in r114903). -- * -- * @param {function} ctor Constructor function which needs to inherit the -- * prototype. -- * @param {function} superCtor Constructor function to inherit prototype from. -- */ --exports.inherits = function(ctor, superCtor) { -- ctor.super_ = superCtor; -- ctor.prototype = Object.create(superCtor.prototype, { -- constructor: { -- value: ctor, -- enumerable: false, -- writable: true, -- configurable: true -- } -- }); --}; -- --exports._extend = function(origin, add) { -- // Don't do anything if add isn't an object -- if (!add || !isObject(add)) return origin; -- -- var keys = Object.keys(add); -- var i = keys.length; -- while (i--) { -- origin[keys[i]] = add[keys[i]]; -- } -- return origin; --}; -- --function hasOwnProperty(obj, prop) { -- return Object.prototype.hasOwnProperty.call(obj, prop); --} -- -- --// Deprecated old stuff. -- --exports.p = exports.deprecate(function() { -- for (var i = 0, len = arguments.length; i < len; ++i) { -- console.error(exports.inspect(arguments[i])); -- } --}, 'util.p: Use console.error() instead'); -- -- --exports.exec = exports.deprecate(function() { -- return require('child_process').exec.apply(this, arguments); --}, 'util.exec is now called `child_process.exec`.'); -- -- --exports.print = exports.deprecate(function() { -- for (var i = 0, len = arguments.length; i < len; ++i) { -- process.stdout.write(String(arguments[i])); -- } --}, 'util.print: Use console.log instead'); -- -- --exports.puts = exports.deprecate(function() { -- for (var i = 0, len = arguments.length; i < len; ++i) { -- process.stdout.write(arguments[i] + '\n'); -- } --}, 'util.puts: Use console.log instead'); -- -- --exports.debug = exports.deprecate(function(x) { -- process.stderr.write('DEBUG: ' + x + '\n'); --}, 'util.debug: Use console.error instead'); -- -- --exports.error = exports.deprecate(function(x) { -- for (var i = 0, len = arguments.length; i < len; ++i) { -- process.stderr.write(arguments[i] + '\n'); -- } --}, 'util.error: Use console.error instead'); -- -- --exports.pump = exports.deprecate(function(readStream, writeStream, callback) { -- var callbackCalled = false; -- -- function call(a, b, c) { -- if (callback && !callbackCalled) { -- callback(a, b, c); -- callbackCalled = true; -- } -- } -- -- readStream.addListener('data', function(chunk) { -- if (writeStream.write(chunk) === false) readStream.pause(); -- }); -- -- writeStream.addListener('drain', function() { -- readStream.resume(); -- }); -- -- readStream.addListener('end', function() { -- writeStream.end(); -- }); -- -- readStream.addListener('close', function() { -- call(); -- }); -- -- readStream.addListener('error', function(err) { -- writeStream.end(); -- call(err); -- }); -- -- writeStream.addListener('error', function(err) { -- readStream.destroy(); -- call(err); -- }); --}, 'util.pump(): Use readableStream.pipe() instead'); -- -- --var uv; --exports._errnoException = function(err, syscall) { -- if (isUndefined(uv)) uv = process.binding('uv'); -- var errname = uv.errname(err); -- var e = new Error(syscall + ' ' + errname); -- e.code = errname; -- e.errno = errname; -- e.syscall = syscall; -- return e; --}; -+} \ No newline at end of file diff --git a/node_modules/browserify-fs/node_modules/levelup/node_modules/readable-stream/node_modules/core-util-is/lib/util.js b/node_modules/browserify-fs/node_modules/levelup/node_modules/readable-stream/node_modules/core-util-is/lib/util.js deleted file mode 100644 index ff4c851c..00000000 --- a/node_modules/browserify-fs/node_modules/levelup/node_modules/readable-stream/node_modules/core-util-is/lib/util.js +++ /dev/null @@ -1,107 +0,0 @@ -// Copyright Joyent, Inc. and other Node contributors. -// -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to permit -// persons to whom the Software is furnished to do so, subject to the -// following conditions: -// -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -// USE OR OTHER DEALINGS IN THE SOFTWARE. - -// NOTE: These type checking functions intentionally don't use `instanceof` -// because it is fragile and can be easily faked with `Object.create()`. - -function isArray(arg) { - if (Array.isArray) { - return Array.isArray(arg); - } - return objectToString(arg) === '[object Array]'; -} -exports.isArray = isArray; - -function isBoolean(arg) { - return typeof arg === 'boolean'; -} -exports.isBoolean = isBoolean; - -function isNull(arg) { - return arg === null; -} -exports.isNull = isNull; - -function isNullOrUndefined(arg) { - return arg == null; -} -exports.isNullOrUndefined = isNullOrUndefined; - -function isNumber(arg) { - return typeof arg === 'number'; -} -exports.isNumber = isNumber; - -function isString(arg) { - return typeof arg === 'string'; -} -exports.isString = isString; - -function isSymbol(arg) { - return typeof arg === 'symbol'; -} -exports.isSymbol = isSymbol; - -function isUndefined(arg) { - return arg === void 0; -} -exports.isUndefined = isUndefined; - -function isRegExp(re) { - return objectToString(re) === '[object RegExp]'; -} -exports.isRegExp = isRegExp; - -function isObject(arg) { - return typeof arg === 'object' && arg !== null; -} -exports.isObject = isObject; - -function isDate(d) { - return objectToString(d) === '[object Date]'; -} -exports.isDate = isDate; - -function isError(e) { - return (objectToString(e) === '[object Error]' || e instanceof Error); -} -exports.isError = isError; - -function isFunction(arg) { - return typeof arg === 'function'; -} -exports.isFunction = isFunction; - -function isPrimitive(arg) { - return arg === null || - typeof arg === 'boolean' || - typeof arg === 'number' || - typeof arg === 'string' || - typeof arg === 'symbol' || // ES6 symbol - typeof arg === 'undefined'; -} -exports.isPrimitive = isPrimitive; - -exports.isBuffer = Buffer.isBuffer; - -function objectToString(o) { - return Object.prototype.toString.call(o); -} diff --git a/node_modules/browserify-fs/node_modules/levelup/node_modules/readable-stream/node_modules/core-util-is/package.json b/node_modules/browserify-fs/node_modules/levelup/node_modules/readable-stream/node_modules/core-util-is/package.json deleted file mode 100644 index ddd227e6..00000000 --- a/node_modules/browserify-fs/node_modules/levelup/node_modules/readable-stream/node_modules/core-util-is/package.json +++ /dev/null @@ -1,60 +0,0 @@ -{ - "name": "core-util-is", - "version": "1.0.2", - "description": "The `util.is*` functions introduced in Node v0.12.", - "main": "lib/util.js", - "repository": { - "type": "git", - "url": "git://github.com/isaacs/core-util-is.git" - }, - "keywords": [ - "util", - "isBuffer", - "isArray", - "isNumber", - "isString", - "isRegExp", - "isThis", - "isThat", - "polyfill" - ], - "author": { - "name": "Isaac Z. Schlueter", - "email": "i@izs.me", - "url": "http://blog.izs.me/" - }, - "license": "MIT", - "bugs": { - "url": "https://github.com/isaacs/core-util-is/issues" - }, - "scripts": { - "test": "tap test.js" - }, - "devDependencies": { - "tap": "^2.3.0" - }, - "gitHead": "a177da234df5638b363ddc15fa324619a38577c8", - "homepage": "https://github.com/isaacs/core-util-is#readme", - "_id": "core-util-is@1.0.2", - "_shasum": "b5fd54220aa2bc5ab57aab7140c940754503c1a7", - "_from": "core-util-is@>=1.0.0 <1.1.0", - "_npmVersion": "3.3.2", - "_nodeVersion": "4.0.0", - "_npmUser": { - "name": "isaacs", - "email": "i@izs.me" - }, - "dist": { - "shasum": "b5fd54220aa2bc5ab57aab7140c940754503c1a7", - "tarball": "http://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz" - }, - "maintainers": [ - { - "name": "isaacs", - "email": "i@izs.me" - } - ], - "directories": {}, - "_resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", - "readme": "ERROR: No README data found!" -} diff --git a/node_modules/browserify-fs/node_modules/levelup/node_modules/readable-stream/node_modules/core-util-is/test.js b/node_modules/browserify-fs/node_modules/levelup/node_modules/readable-stream/node_modules/core-util-is/test.js deleted file mode 100644 index 1a490c65..00000000 --- a/node_modules/browserify-fs/node_modules/levelup/node_modules/readable-stream/node_modules/core-util-is/test.js +++ /dev/null @@ -1,68 +0,0 @@ -var assert = require('tap'); - -var t = require('./lib/util'); - -assert.equal(t.isArray([]), true); -assert.equal(t.isArray({}), false); - -assert.equal(t.isBoolean(null), false); -assert.equal(t.isBoolean(true), true); -assert.equal(t.isBoolean(false), true); - -assert.equal(t.isNull(null), true); -assert.equal(t.isNull(undefined), false); -assert.equal(t.isNull(false), false); -assert.equal(t.isNull(), false); - -assert.equal(t.isNullOrUndefined(null), true); -assert.equal(t.isNullOrUndefined(undefined), true); -assert.equal(t.isNullOrUndefined(false), false); -assert.equal(t.isNullOrUndefined(), true); - -assert.equal(t.isNumber(null), false); -assert.equal(t.isNumber('1'), false); -assert.equal(t.isNumber(1), true); - -assert.equal(t.isString(null), false); -assert.equal(t.isString('1'), true); -assert.equal(t.isString(1), false); - -assert.equal(t.isSymbol(null), false); -assert.equal(t.isSymbol('1'), false); -assert.equal(t.isSymbol(1), false); -assert.equal(t.isSymbol(Symbol()), true); - -assert.equal(t.isUndefined(null), false); -assert.equal(t.isUndefined(undefined), true); -assert.equal(t.isUndefined(false), false); -assert.equal(t.isUndefined(), true); - -assert.equal(t.isRegExp(null), false); -assert.equal(t.isRegExp('1'), false); -assert.equal(t.isRegExp(new RegExp()), true); - -assert.equal(t.isObject({}), true); -assert.equal(t.isObject([]), true); -assert.equal(t.isObject(new RegExp()), true); -assert.equal(t.isObject(new Date()), true); - -assert.equal(t.isDate(null), false); -assert.equal(t.isDate('1'), false); -assert.equal(t.isDate(new Date()), true); - -assert.equal(t.isError(null), false); -assert.equal(t.isError({ err: true }), false); -assert.equal(t.isError(new Error()), true); - -assert.equal(t.isFunction(null), false); -assert.equal(t.isFunction({ }), false); -assert.equal(t.isFunction(function() {}), true); - -assert.equal(t.isPrimitive(null), true); -assert.equal(t.isPrimitive(''), true); -assert.equal(t.isPrimitive(0), true); -assert.equal(t.isPrimitive(new Date()), false); - -assert.equal(t.isBuffer(null), false); -assert.equal(t.isBuffer({}), false); -assert.equal(t.isBuffer(new Buffer(0)), true); diff --git a/node_modules/browserify-fs/node_modules/levelup/node_modules/readable-stream/node_modules/inherits/LICENSE b/node_modules/browserify-fs/node_modules/levelup/node_modules/readable-stream/node_modules/inherits/LICENSE deleted file mode 100644 index dea3013d..00000000 --- a/node_modules/browserify-fs/node_modules/levelup/node_modules/readable-stream/node_modules/inherits/LICENSE +++ /dev/null @@ -1,16 +0,0 @@ -The ISC License - -Copyright (c) Isaac Z. Schlueter - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH -REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND -FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, -INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM -LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR -OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR -PERFORMANCE OF THIS SOFTWARE. - diff --git a/node_modules/browserify-fs/node_modules/levelup/node_modules/readable-stream/node_modules/inherits/README.md b/node_modules/browserify-fs/node_modules/levelup/node_modules/readable-stream/node_modules/inherits/README.md deleted file mode 100644 index b1c56658..00000000 --- a/node_modules/browserify-fs/node_modules/levelup/node_modules/readable-stream/node_modules/inherits/README.md +++ /dev/null @@ -1,42 +0,0 @@ -Browser-friendly inheritance fully compatible with standard node.js -[inherits](http://nodejs.org/api/util.html#util_util_inherits_constructor_superconstructor). - -This package exports standard `inherits` from node.js `util` module in -node environment, but also provides alternative browser-friendly -implementation through [browser -field](https://gist.github.com/shtylman/4339901). Alternative -implementation is a literal copy of standard one located in standalone -module to avoid requiring of `util`. It also has a shim for old -browsers with no `Object.create` support. - -While keeping you sure you are using standard `inherits` -implementation in node.js environment, it allows bundlers such as -[browserify](https://github.com/substack/node-browserify) to not -include full `util` package to your client code if all you need is -just `inherits` function. It worth, because browser shim for `util` -package is large and `inherits` is often the single function you need -from it. - -It's recommended to use this package instead of -`require('util').inherits` for any code that has chances to be used -not only in node.js but in browser too. - -## usage - -```js -var inherits = require('inherits'); -// then use exactly as the standard one -``` - -## note on version ~1.0 - -Version ~1.0 had completely different motivation and is not compatible -neither with 2.0 nor with standard node.js `inherits`. - -If you are using version ~1.0 and planning to switch to ~2.0, be -careful: - -* new version uses `super_` instead of `super` for referencing - superclass -* new version overwrites current prototype while old one preserves any - existing fields on it diff --git a/node_modules/browserify-fs/node_modules/levelup/node_modules/readable-stream/node_modules/inherits/inherits.js b/node_modules/browserify-fs/node_modules/levelup/node_modules/readable-stream/node_modules/inherits/inherits.js deleted file mode 100644 index 3b94763a..00000000 --- a/node_modules/browserify-fs/node_modules/levelup/node_modules/readable-stream/node_modules/inherits/inherits.js +++ /dev/null @@ -1,7 +0,0 @@ -try { - var util = require('util'); - if (typeof util.inherits !== 'function') throw ''; - module.exports = util.inherits; -} catch (e) { - module.exports = require('./inherits_browser.js'); -} diff --git a/node_modules/browserify-fs/node_modules/levelup/node_modules/readable-stream/node_modules/inherits/inherits_browser.js b/node_modules/browserify-fs/node_modules/levelup/node_modules/readable-stream/node_modules/inherits/inherits_browser.js deleted file mode 100644 index c1e78a75..00000000 --- a/node_modules/browserify-fs/node_modules/levelup/node_modules/readable-stream/node_modules/inherits/inherits_browser.js +++ /dev/null @@ -1,23 +0,0 @@ -if (typeof Object.create === 'function') { - // implementation from standard node.js 'util' module - module.exports = function inherits(ctor, superCtor) { - ctor.super_ = superCtor - ctor.prototype = Object.create(superCtor.prototype, { - constructor: { - value: ctor, - enumerable: false, - writable: true, - configurable: true - } - }); - }; -} else { - // old school shim for old browsers - module.exports = function inherits(ctor, superCtor) { - ctor.super_ = superCtor - var TempCtor = function () {} - TempCtor.prototype = superCtor.prototype - ctor.prototype = new TempCtor() - ctor.prototype.constructor = ctor - } -} diff --git a/node_modules/browserify-fs/node_modules/levelup/node_modules/readable-stream/node_modules/inherits/package.json b/node_modules/browserify-fs/node_modules/levelup/node_modules/readable-stream/node_modules/inherits/package.json deleted file mode 100644 index 9146e757..00000000 --- a/node_modules/browserify-fs/node_modules/levelup/node_modules/readable-stream/node_modules/inherits/package.json +++ /dev/null @@ -1,63 +0,0 @@ -{ - "name": "inherits", - "description": "Browser-friendly inheritance fully compatible with standard node.js inherits()", - "version": "2.0.3", - "keywords": [ - "inheritance", - "class", - "klass", - "oop", - "object-oriented", - "inherits", - "browser", - "browserify" - ], - "main": "./inherits.js", - "browser": "./inherits_browser.js", - "repository": { - "type": "git", - "url": "git://github.com/isaacs/inherits.git" - }, - "license": "ISC", - "scripts": { - "test": "node test" - }, - "devDependencies": { - "tap": "^7.1.0" - }, - "files": [ - "inherits.js", - "inherits_browser.js" - ], - "gitHead": "e05d0fb27c61a3ec687214f0476386b765364d5f", - "bugs": { - "url": "https://github.com/isaacs/inherits/issues" - }, - "homepage": "https://github.com/isaacs/inherits#readme", - "_id": "inherits@2.0.3", - "_shasum": "633c2c83e3da42a502f52466022480f4208261de", - "_from": "inherits@>=2.0.1 <2.1.0", - "_npmVersion": "3.10.7", - "_nodeVersion": "6.5.0", - "_npmUser": { - "name": "isaacs", - "email": "i@izs.me" - }, - "dist": { - "shasum": "633c2c83e3da42a502f52466022480f4208261de", - "tarball": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz" - }, - "maintainers": [ - { - "name": "isaacs", - "email": "i@izs.me" - } - ], - "_npmOperationalInternal": { - "host": "packages-16-east.internal.npmjs.com", - "tmp": "tmp/inherits-2.0.3.tgz_1473295776489_0.08142363070510328" - }, - "directories": {}, - "_resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", - "readme": "ERROR: No README data found!" -} diff --git a/node_modules/browserify-fs/node_modules/levelup/node_modules/readable-stream/node_modules/isarray/README.md b/node_modules/browserify-fs/node_modules/levelup/node_modules/readable-stream/node_modules/isarray/README.md deleted file mode 100644 index 052a62b8..00000000 --- a/node_modules/browserify-fs/node_modules/levelup/node_modules/readable-stream/node_modules/isarray/README.md +++ /dev/null @@ -1,54 +0,0 @@ - -# isarray - -`Array#isArray` for older browsers. - -## Usage - -```js -var isArray = require('isarray'); - -console.log(isArray([])); // => true -console.log(isArray({})); // => false -``` - -## Installation - -With [npm](http://npmjs.org) do - -```bash -$ npm install isarray -``` - -Then bundle for the browser with -[browserify](https://github.com/substack/browserify). - -With [component](http://component.io) do - -```bash -$ component install juliangruber/isarray -``` - -## License - -(MIT) - -Copyright (c) 2013 Julian Gruber <julian@juliangruber.com> - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies -of the Software, and to permit persons to whom the Software is furnished to do -so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/node_modules/browserify-fs/node_modules/levelup/node_modules/readable-stream/node_modules/isarray/build/build.js b/node_modules/browserify-fs/node_modules/levelup/node_modules/readable-stream/node_modules/isarray/build/build.js deleted file mode 100644 index ec58596a..00000000 --- a/node_modules/browserify-fs/node_modules/levelup/node_modules/readable-stream/node_modules/isarray/build/build.js +++ /dev/null @@ -1,209 +0,0 @@ - -/** - * Require the given path. - * - * @param {String} path - * @return {Object} exports - * @api public - */ - -function require(path, parent, orig) { - var resolved = require.resolve(path); - - // lookup failed - if (null == resolved) { - orig = orig || path; - parent = parent || 'root'; - var err = new Error('Failed to require "' + orig + '" from "' + parent + '"'); - err.path = orig; - err.parent = parent; - err.require = true; - throw err; - } - - var module = require.modules[resolved]; - - // perform real require() - // by invoking the module's - // registered function - if (!module.exports) { - module.exports = {}; - module.client = module.component = true; - module.call(this, module.exports, require.relative(resolved), module); - } - - return module.exports; -} - -/** - * Registered modules. - */ - -require.modules = {}; - -/** - * Registered aliases. - */ - -require.aliases = {}; - -/** - * Resolve `path`. - * - * Lookup: - * - * - PATH/index.js - * - PATH.js - * - PATH - * - * @param {String} path - * @return {String} path or null - * @api private - */ - -require.resolve = function(path) { - if (path.charAt(0) === '/') path = path.slice(1); - var index = path + '/index.js'; - - var paths = [ - path, - path + '.js', - path + '.json', - path + '/index.js', - path + '/index.json' - ]; - - for (var i = 0; i < paths.length; i++) { - var path = paths[i]; - if (require.modules.hasOwnProperty(path)) return path; - } - - if (require.aliases.hasOwnProperty(index)) { - return require.aliases[index]; - } -}; - -/** - * Normalize `path` relative to the current path. - * - * @param {String} curr - * @param {String} path - * @return {String} - * @api private - */ - -require.normalize = function(curr, path) { - var segs = []; - - if ('.' != path.charAt(0)) return path; - - curr = curr.split('/'); - path = path.split('/'); - - for (var i = 0; i < path.length; ++i) { - if ('..' == path[i]) { - curr.pop(); - } else if ('.' != path[i] && '' != path[i]) { - segs.push(path[i]); - } - } - - return curr.concat(segs).join('/'); -}; - -/** - * Register module at `path` with callback `definition`. - * - * @param {String} path - * @param {Function} definition - * @api private - */ - -require.register = function(path, definition) { - require.modules[path] = definition; -}; - -/** - * Alias a module definition. - * - * @param {String} from - * @param {String} to - * @api private - */ - -require.alias = function(from, to) { - if (!require.modules.hasOwnProperty(from)) { - throw new Error('Failed to alias "' + from + '", it does not exist'); - } - require.aliases[to] = from; -}; - -/** - * Return a require function relative to the `parent` path. - * - * @param {String} parent - * @return {Function} - * @api private - */ - -require.relative = function(parent) { - var p = require.normalize(parent, '..'); - - /** - * lastIndexOf helper. - */ - - function lastIndexOf(arr, obj) { - var i = arr.length; - while (i--) { - if (arr[i] === obj) return i; - } - return -1; - } - - /** - * The relative require() itself. - */ - - function localRequire(path) { - var resolved = localRequire.resolve(path); - return require(resolved, parent, path); - } - - /** - * Resolve relative to the parent. - */ - - localRequire.resolve = function(path) { - var c = path.charAt(0); - if ('/' == c) return path.slice(1); - if ('.' == c) return require.normalize(p, path); - - // resolve deps by returning - // the dep in the nearest "deps" - // directory - var segs = parent.split('/'); - var i = lastIndexOf(segs, 'deps') + 1; - if (!i) i = 0; - path = segs.slice(0, i + 1).join('/') + '/deps/' + path; - return path; - }; - - /** - * Check if module is defined at `path`. - */ - - localRequire.exists = function(path) { - return require.modules.hasOwnProperty(localRequire.resolve(path)); - }; - - return localRequire; -}; -require.register("isarray/index.js", function(exports, require, module){ -module.exports = Array.isArray || function (arr) { - return Object.prototype.toString.call(arr) == '[object Array]'; -}; - -}); -require.alias("isarray/index.js", "isarray/index.js"); - diff --git a/node_modules/browserify-fs/node_modules/levelup/node_modules/readable-stream/node_modules/isarray/component.json b/node_modules/browserify-fs/node_modules/levelup/node_modules/readable-stream/node_modules/isarray/component.json deleted file mode 100644 index 9e31b683..00000000 --- a/node_modules/browserify-fs/node_modules/levelup/node_modules/readable-stream/node_modules/isarray/component.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "name" : "isarray", - "description" : "Array#isArray for older browsers", - "version" : "0.0.1", - "repository" : "juliangruber/isarray", - "homepage": "https://github.com/juliangruber/isarray", - "main" : "index.js", - "scripts" : [ - "index.js" - ], - "dependencies" : {}, - "keywords": ["browser","isarray","array"], - "author": { - "name": "Julian Gruber", - "email": "mail@juliangruber.com", - "url": "http://juliangruber.com" - }, - "license": "MIT" -} diff --git a/node_modules/browserify-fs/node_modules/levelup/node_modules/readable-stream/node_modules/isarray/index.js b/node_modules/browserify-fs/node_modules/levelup/node_modules/readable-stream/node_modules/isarray/index.js deleted file mode 100644 index 5f5ad45d..00000000 --- a/node_modules/browserify-fs/node_modules/levelup/node_modules/readable-stream/node_modules/isarray/index.js +++ /dev/null @@ -1,3 +0,0 @@ -module.exports = Array.isArray || function (arr) { - return Object.prototype.toString.call(arr) == '[object Array]'; -}; diff --git a/node_modules/browserify-fs/node_modules/levelup/node_modules/readable-stream/node_modules/isarray/package.json b/node_modules/browserify-fs/node_modules/levelup/node_modules/readable-stream/node_modules/isarray/package.json deleted file mode 100644 index 25c8581b..00000000 --- a/node_modules/browserify-fs/node_modules/levelup/node_modules/readable-stream/node_modules/isarray/package.json +++ /dev/null @@ -1,54 +0,0 @@ -{ - "name": "isarray", - "description": "Array#isArray for older browsers", - "version": "0.0.1", - "repository": { - "type": "git", - "url": "git://github.com/juliangruber/isarray.git" - }, - "homepage": "https://github.com/juliangruber/isarray", - "main": "index.js", - "scripts": { - "test": "tap test/*.js" - }, - "dependencies": {}, - "devDependencies": { - "tap": "*" - }, - "keywords": [ - "browser", - "isarray", - "array" - ], - "author": { - "name": "Julian Gruber", - "email": "mail@juliangruber.com", - "url": "http://juliangruber.com" - }, - "license": "MIT", - "_id": "isarray@0.0.1", - "dist": { - "shasum": "8a18acfca9a8f4177e09abfc6038939b05d1eedf", - "tarball": "http://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz" - }, - "_from": "isarray@0.0.1", - "_npmVersion": "1.2.18", - "_npmUser": { - "name": "juliangruber", - "email": "julian@juliangruber.com" - }, - "maintainers": [ - { - "name": "juliangruber", - "email": "julian@juliangruber.com" - } - ], - "directories": {}, - "_shasum": "8a18acfca9a8f4177e09abfc6038939b05d1eedf", - "_resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", - "readme": "\n# isarray\n\n`Array#isArray` for older browsers.\n\n## Usage\n\n```js\nvar isArray = require('isarray');\n\nconsole.log(isArray([])); // => true\nconsole.log(isArray({})); // => false\n```\n\n## Installation\n\nWith [npm](http://npmjs.org) do\n\n```bash\n$ npm install isarray\n```\n\nThen bundle for the browser with\n[browserify](https://github.com/substack/browserify).\n\nWith [component](http://component.io) do\n\n```bash\n$ component install juliangruber/isarray\n```\n\n## License\n\n(MIT)\n\nCopyright (c) 2013 Julian Gruber <julian@juliangruber.com>\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of\nthis software and associated documentation files (the \"Software\"), to deal in\nthe Software without restriction, including without limitation the rights to\nuse, copy, modify, merge, publish, distribute, sublicense, and/or sell copies\nof the Software, and to permit persons to whom the Software is furnished to do\nso, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n", - "readmeFilename": "README.md", - "bugs": { - "url": "https://github.com/juliangruber/isarray/issues" - } -} diff --git a/node_modules/browserify-fs/node_modules/levelup/node_modules/readable-stream/node_modules/string_decoder/.npmignore b/node_modules/browserify-fs/node_modules/levelup/node_modules/readable-stream/node_modules/string_decoder/.npmignore deleted file mode 100644 index 206320cc..00000000 --- a/node_modules/browserify-fs/node_modules/levelup/node_modules/readable-stream/node_modules/string_decoder/.npmignore +++ /dev/null @@ -1,2 +0,0 @@ -build -test diff --git a/node_modules/browserify-fs/node_modules/levelup/node_modules/readable-stream/node_modules/string_decoder/LICENSE b/node_modules/browserify-fs/node_modules/levelup/node_modules/readable-stream/node_modules/string_decoder/LICENSE deleted file mode 100644 index 6de584a4..00000000 --- a/node_modules/browserify-fs/node_modules/levelup/node_modules/readable-stream/node_modules/string_decoder/LICENSE +++ /dev/null @@ -1,20 +0,0 @@ -Copyright Joyent, Inc. and other Node contributors. - -Permission is hereby granted, free of charge, to any person obtaining a -copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to permit -persons to whom the Software is furnished to do so, subject to the -following conditions: - -The above copyright notice and this permission notice shall be included -in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/browserify-fs/node_modules/levelup/node_modules/readable-stream/node_modules/string_decoder/README.md b/node_modules/browserify-fs/node_modules/levelup/node_modules/readable-stream/node_modules/string_decoder/README.md deleted file mode 100644 index 4d2aa001..00000000 --- a/node_modules/browserify-fs/node_modules/levelup/node_modules/readable-stream/node_modules/string_decoder/README.md +++ /dev/null @@ -1,7 +0,0 @@ -**string_decoder.js** (`require('string_decoder')`) from Node.js core - -Copyright Joyent, Inc. and other Node contributors. See LICENCE file for details. - -Version numbers match the versions found in Node core, e.g. 0.10.24 matches Node 0.10.24, likewise 0.11.10 matches Node 0.11.10. **Prefer the stable version over the unstable.** - -The *build/* directory contains a build script that will scrape the source from the [joyent/node](https://github.com/joyent/node) repo given a specific Node version. \ No newline at end of file diff --git a/node_modules/browserify-fs/node_modules/levelup/node_modules/readable-stream/node_modules/string_decoder/index.js b/node_modules/browserify-fs/node_modules/levelup/node_modules/readable-stream/node_modules/string_decoder/index.js deleted file mode 100644 index b00e54fb..00000000 --- a/node_modules/browserify-fs/node_modules/levelup/node_modules/readable-stream/node_modules/string_decoder/index.js +++ /dev/null @@ -1,221 +0,0 @@ -// Copyright Joyent, Inc. and other Node contributors. -// -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to permit -// persons to whom the Software is furnished to do so, subject to the -// following conditions: -// -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -// USE OR OTHER DEALINGS IN THE SOFTWARE. - -var Buffer = require('buffer').Buffer; - -var isBufferEncoding = Buffer.isEncoding - || function(encoding) { - switch (encoding && encoding.toLowerCase()) { - case 'hex': case 'utf8': case 'utf-8': case 'ascii': case 'binary': case 'base64': case 'ucs2': case 'ucs-2': case 'utf16le': case 'utf-16le': case 'raw': return true; - default: return false; - } - } - - -function assertEncoding(encoding) { - if (encoding && !isBufferEncoding(encoding)) { - throw new Error('Unknown encoding: ' + encoding); - } -} - -// StringDecoder provides an interface for efficiently splitting a series of -// buffers into a series of JS strings without breaking apart multi-byte -// characters. CESU-8 is handled as part of the UTF-8 encoding. -// -// @TODO Handling all encodings inside a single object makes it very difficult -// to reason about this code, so it should be split up in the future. -// @TODO There should be a utf8-strict encoding that rejects invalid UTF-8 code -// points as used by CESU-8. -var StringDecoder = exports.StringDecoder = function(encoding) { - this.encoding = (encoding || 'utf8').toLowerCase().replace(/[-_]/, ''); - assertEncoding(encoding); - switch (this.encoding) { - case 'utf8': - // CESU-8 represents each of Surrogate Pair by 3-bytes - this.surrogateSize = 3; - break; - case 'ucs2': - case 'utf16le': - // UTF-16 represents each of Surrogate Pair by 2-bytes - this.surrogateSize = 2; - this.detectIncompleteChar = utf16DetectIncompleteChar; - break; - case 'base64': - // Base-64 stores 3 bytes in 4 chars, and pads the remainder. - this.surrogateSize = 3; - this.detectIncompleteChar = base64DetectIncompleteChar; - break; - default: - this.write = passThroughWrite; - return; - } - - // Enough space to store all bytes of a single character. UTF-8 needs 4 - // bytes, but CESU-8 may require up to 6 (3 bytes per surrogate). - this.charBuffer = new Buffer(6); - // Number of bytes received for the current incomplete multi-byte character. - this.charReceived = 0; - // Number of bytes expected for the current incomplete multi-byte character. - this.charLength = 0; -}; - - -// write decodes the given buffer and returns it as JS string that is -// guaranteed to not contain any partial multi-byte characters. Any partial -// character found at the end of the buffer is buffered up, and will be -// returned when calling write again with the remaining bytes. -// -// Note: Converting a Buffer containing an orphan surrogate to a String -// currently works, but converting a String to a Buffer (via `new Buffer`, or -// Buffer#write) will replace incomplete surrogates with the unicode -// replacement character. See https://codereview.chromium.org/121173009/ . -StringDecoder.prototype.write = function(buffer) { - var charStr = ''; - // if our last write ended with an incomplete multibyte character - while (this.charLength) { - // determine how many remaining bytes this buffer has to offer for this char - var available = (buffer.length >= this.charLength - this.charReceived) ? - this.charLength - this.charReceived : - buffer.length; - - // add the new bytes to the char buffer - buffer.copy(this.charBuffer, this.charReceived, 0, available); - this.charReceived += available; - - if (this.charReceived < this.charLength) { - // still not enough chars in this buffer? wait for more ... - return ''; - } - - // remove bytes belonging to the current character from the buffer - buffer = buffer.slice(available, buffer.length); - - // get the character that was split - charStr = this.charBuffer.slice(0, this.charLength).toString(this.encoding); - - // CESU-8: lead surrogate (D800-DBFF) is also the incomplete character - var charCode = charStr.charCodeAt(charStr.length - 1); - if (charCode >= 0xD800 && charCode <= 0xDBFF) { - this.charLength += this.surrogateSize; - charStr = ''; - continue; - } - this.charReceived = this.charLength = 0; - - // if there are no more bytes in this buffer, just emit our char - if (buffer.length === 0) { - return charStr; - } - break; - } - - // determine and set charLength / charReceived - this.detectIncompleteChar(buffer); - - var end = buffer.length; - if (this.charLength) { - // buffer the incomplete character bytes we got - buffer.copy(this.charBuffer, 0, buffer.length - this.charReceived, end); - end -= this.charReceived; - } - - charStr += buffer.toString(this.encoding, 0, end); - - var end = charStr.length - 1; - var charCode = charStr.charCodeAt(end); - // CESU-8: lead surrogate (D800-DBFF) is also the incomplete character - if (charCode >= 0xD800 && charCode <= 0xDBFF) { - var size = this.surrogateSize; - this.charLength += size; - this.charReceived += size; - this.charBuffer.copy(this.charBuffer, size, 0, size); - buffer.copy(this.charBuffer, 0, 0, size); - return charStr.substring(0, end); - } - - // or just emit the charStr - return charStr; -}; - -// detectIncompleteChar determines if there is an incomplete UTF-8 character at -// the end of the given buffer. If so, it sets this.charLength to the byte -// length that character, and sets this.charReceived to the number of bytes -// that are available for this character. -StringDecoder.prototype.detectIncompleteChar = function(buffer) { - // determine how many bytes we have to check at the end of this buffer - var i = (buffer.length >= 3) ? 3 : buffer.length; - - // Figure out if one of the last i bytes of our buffer announces an - // incomplete char. - for (; i > 0; i--) { - var c = buffer[buffer.length - i]; - - // See http://en.wikipedia.org/wiki/UTF-8#Description - - // 110XXXXX - if (i == 1 && c >> 5 == 0x06) { - this.charLength = 2; - break; - } - - // 1110XXXX - if (i <= 2 && c >> 4 == 0x0E) { - this.charLength = 3; - break; - } - - // 11110XXX - if (i <= 3 && c >> 3 == 0x1E) { - this.charLength = 4; - break; - } - } - this.charReceived = i; -}; - -StringDecoder.prototype.end = function(buffer) { - var res = ''; - if (buffer && buffer.length) - res = this.write(buffer); - - if (this.charReceived) { - var cr = this.charReceived; - var buf = this.charBuffer; - var enc = this.encoding; - res += buf.slice(0, cr).toString(enc); - } - - return res; -}; - -function passThroughWrite(buffer) { - return buffer.toString(this.encoding); -} - -function utf16DetectIncompleteChar(buffer) { - this.charReceived = buffer.length % 2; - this.charLength = this.charReceived ? 2 : 0; -} - -function base64DetectIncompleteChar(buffer) { - this.charReceived = buffer.length % 3; - this.charLength = this.charReceived ? 3 : 0; -} diff --git a/node_modules/browserify-fs/node_modules/levelup/node_modules/readable-stream/node_modules/string_decoder/package.json b/node_modules/browserify-fs/node_modules/levelup/node_modules/readable-stream/node_modules/string_decoder/package.json deleted file mode 100644 index 0364d54b..00000000 --- a/node_modules/browserify-fs/node_modules/levelup/node_modules/readable-stream/node_modules/string_decoder/package.json +++ /dev/null @@ -1,54 +0,0 @@ -{ - "name": "string_decoder", - "version": "0.10.31", - "description": "The string_decoder module from Node core", - "main": "index.js", - "dependencies": {}, - "devDependencies": { - "tap": "~0.4.8" - }, - "scripts": { - "test": "tap test/simple/*.js" - }, - "repository": { - "type": "git", - "url": "git://github.com/rvagg/string_decoder.git" - }, - "homepage": "https://github.com/rvagg/string_decoder", - "keywords": [ - "string", - "decoder", - "browser", - "browserify" - ], - "license": "MIT", - "gitHead": "d46d4fd87cf1d06e031c23f1ba170ca7d4ade9a0", - "bugs": { - "url": "https://github.com/rvagg/string_decoder/issues" - }, - "_id": "string_decoder@0.10.31", - "_shasum": "62e203bc41766c6c28c9fc84301dab1c5310fa94", - "_from": "string_decoder@>=0.10.0 <0.11.0", - "_npmVersion": "1.4.23", - "_npmUser": { - "name": "rvagg", - "email": "rod@vagg.org" - }, - "maintainers": [ - { - "name": "substack", - "email": "mail@substack.net" - }, - { - "name": "rvagg", - "email": "rod@vagg.org" - } - ], - "dist": { - "shasum": "62e203bc41766c6c28c9fc84301dab1c5310fa94", - "tarball": "http://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz" - }, - "directories": {}, - "_resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", - "readme": "ERROR: No README data found!" -} diff --git a/node_modules/browserify-fs/node_modules/levelup/node_modules/readable-stream/package.json b/node_modules/browserify-fs/node_modules/levelup/node_modules/readable-stream/package.json deleted file mode 100644 index 1d2a34db..00000000 --- a/node_modules/browserify-fs/node_modules/levelup/node_modules/readable-stream/package.json +++ /dev/null @@ -1,77 +0,0 @@ -{ - "name": "readable-stream", - "version": "1.0.34", - "description": "Streams2, a user-land copy of the stream library from Node.js v0.10.x", - "main": "readable.js", - "dependencies": { - "core-util-is": "~1.0.0", - "isarray": "0.0.1", - "string_decoder": "~0.10.x", - "inherits": "~2.0.1" - }, - "devDependencies": { - "tap": "~0.2.6" - }, - "scripts": { - "test": "tap test/simple/*.js" - }, - "repository": { - "type": "git", - "url": "git://github.com/isaacs/readable-stream" - }, - "keywords": [ - "readable", - "stream", - "pipe" - ], - "browser": { - "util": false - }, - "author": { - "name": "Isaac Z. Schlueter", - "email": "i@izs.me", - "url": "http://blog.izs.me/" - }, - "license": "MIT", - "gitHead": "1227c7b66deedb1dc5284a89425854d5f7ad9576", - "bugs": { - "url": "https://github.com/isaacs/readable-stream/issues" - }, - "_id": "readable-stream@1.0.34", - "_shasum": "125820e34bc842d2f2aaafafe4c2916ee32c157c", - "_from": "readable-stream@>=1.0.26 <1.1.0", - "_npmVersion": "3.8.3", - "_nodeVersion": "5.10.1", - "_npmUser": { - "name": "cwmma", - "email": "calvin.metcalf@gmail.com" - }, - "dist": { - "shasum": "125820e34bc842d2f2aaafafe4c2916ee32c157c", - "tarball": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.0.34.tgz" - }, - "maintainers": [ - { - "name": "isaacs", - "email": "isaacs@npmjs.com" - }, - { - "name": "tootallnate", - "email": "nathan@tootallnate.net" - }, - { - "name": "rvagg", - "email": "rod@vagg.org" - }, - { - "name": "cwmma", - "email": "calvin.metcalf@gmail.com" - } - ], - "_npmOperationalInternal": { - "host": "packages-12-west.internal.npmjs.com", - "tmp": "tmp/readable-stream-1.0.34.tgz_1460562521506_0.019665231462568045" - }, - "directories": {}, - "_resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.0.34.tgz" -} diff --git a/node_modules/browserify-fs/node_modules/levelup/node_modules/readable-stream/passthrough.js b/node_modules/browserify-fs/node_modules/levelup/node_modules/readable-stream/passthrough.js deleted file mode 100644 index 27e8d8a5..00000000 --- a/node_modules/browserify-fs/node_modules/levelup/node_modules/readable-stream/passthrough.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require("./lib/_stream_passthrough.js") diff --git a/node_modules/browserify-fs/node_modules/levelup/node_modules/readable-stream/readable.js b/node_modules/browserify-fs/node_modules/levelup/node_modules/readable-stream/readable.js deleted file mode 100644 index 26511e87..00000000 --- a/node_modules/browserify-fs/node_modules/levelup/node_modules/readable-stream/readable.js +++ /dev/null @@ -1,11 +0,0 @@ -var Stream = require('stream'); // hack to fix a circular dependency issue when used with browserify -exports = module.exports = require('./lib/_stream_readable.js'); -exports.Stream = Stream; -exports.Readable = exports; -exports.Writable = require('./lib/_stream_writable.js'); -exports.Duplex = require('./lib/_stream_duplex.js'); -exports.Transform = require('./lib/_stream_transform.js'); -exports.PassThrough = require('./lib/_stream_passthrough.js'); -if (!process.browser && process.env.READABLE_STREAM === 'disable') { - module.exports = require('stream'); -} diff --git a/node_modules/browserify-fs/node_modules/levelup/node_modules/readable-stream/transform.js b/node_modules/browserify-fs/node_modules/levelup/node_modules/readable-stream/transform.js deleted file mode 100644 index 5d482f07..00000000 --- a/node_modules/browserify-fs/node_modules/levelup/node_modules/readable-stream/transform.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require("./lib/_stream_transform.js") diff --git a/node_modules/browserify-fs/node_modules/levelup/node_modules/readable-stream/writable.js b/node_modules/browserify-fs/node_modules/levelup/node_modules/readable-stream/writable.js deleted file mode 100644 index e1e9efdf..00000000 --- a/node_modules/browserify-fs/node_modules/levelup/node_modules/readable-stream/writable.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require("./lib/_stream_writable.js") diff --git a/node_modules/browserify-fs/node_modules/levelup/node_modules/semver/.npmignore b/node_modules/browserify-fs/node_modules/levelup/node_modules/semver/.npmignore deleted file mode 100644 index 7300fbc7..00000000 --- a/node_modules/browserify-fs/node_modules/levelup/node_modules/semver/.npmignore +++ /dev/null @@ -1 +0,0 @@ -# nada diff --git a/node_modules/browserify-fs/node_modules/levelup/node_modules/semver/LICENSE b/node_modules/browserify-fs/node_modules/levelup/node_modules/semver/LICENSE deleted file mode 100644 index 0c44ae71..00000000 --- a/node_modules/browserify-fs/node_modules/levelup/node_modules/semver/LICENSE +++ /dev/null @@ -1,27 +0,0 @@ -Copyright (c) Isaac Z. Schlueter ("Author") -All rights reserved. - -The BSD License - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: - -1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - -THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS -BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR -BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, -WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE -OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN -IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/node_modules/browserify-fs/node_modules/levelup/node_modules/semver/Makefile b/node_modules/browserify-fs/node_modules/levelup/node_modules/semver/Makefile deleted file mode 100644 index 5717ccf4..00000000 --- a/node_modules/browserify-fs/node_modules/levelup/node_modules/semver/Makefile +++ /dev/null @@ -1,24 +0,0 @@ -files = semver.browser.js \ - semver.min.js \ - semver.browser.js.gz \ - semver.min.js.gz - -all: $(files) - -clean: - rm -f $(files) - -semver.browser.js: head.js semver.js foot.js - ( cat head.js; \ - cat semver.js | \ - egrep -v '^ *\/\* nomin \*\/' | \ - perl -pi -e 's/debug\([^\)]+\)//g'; \ - cat foot.js ) > semver.browser.js - -semver.min.js: semver.browser.js - uglifyjs -m semver.min.js - -%.gz: % - gzip --stdout -9 <$< >$@ - -.PHONY: all clean diff --git a/node_modules/browserify-fs/node_modules/levelup/node_modules/semver/README.md b/node_modules/browserify-fs/node_modules/levelup/node_modules/semver/README.md deleted file mode 100644 index 4e95b846..00000000 --- a/node_modules/browserify-fs/node_modules/levelup/node_modules/semver/README.md +++ /dev/null @@ -1,158 +0,0 @@ -semver(1) -- The semantic versioner for npm -=========================================== - -## Usage - - $ npm install semver - - semver.valid('1.2.3') // '1.2.3' - semver.valid('a.b.c') // null - semver.clean(' =v1.2.3 ') // '1.2.3' - semver.satisfies('1.2.3', '1.x || >=2.5.0 || 5.0.0 - 7.2.3') // true - semver.gt('1.2.3', '9.8.7') // false - semver.lt('1.2.3', '9.8.7') // true - -As a command-line utility: - - $ semver -h - - Usage: semver [ [...]] [-r | -i | -d ] - Test if version(s) satisfy the supplied range(s), and sort them. - - Multiple versions or ranges may be supplied, unless increment - or decrement options are specified. In that case, only a single - version may be used, and it is incremented by the specified level - - Program exits successfully if any valid version satisfies - all supplied ranges, and prints all satisfying versions. - - If no versions are valid, or ranges are not satisfied, - then exits failure. - - Versions are printed in ascending order, so supplying - multiple versions to the utility will just sort them. - -## Versions - -A "version" is described by the `v2.0.0` specification found at -. - -A leading `"="` or `"v"` character is stripped off and ignored. - -## Ranges - -The following range styles are supported: - -* `1.2.3` A specific version. When nothing else will do. Must be a full - version number, with major, minor, and patch versions specified. - Note that build metadata is still ignored, so `1.2.3+build2012` will - satisfy this range. -* `>1.2.3` Greater than a specific version. -* `<1.2.3` Less than a specific version. If there is no prerelease - tag on the version range, then no prerelease version will be allowed - either, even though these are technically "less than". -* `>=1.2.3` Greater than or equal to. Note that prerelease versions - are NOT equal to their "normal" equivalents, so `1.2.3-beta` will - not satisfy this range, but `2.3.0-beta` will. -* `<=1.2.3` Less than or equal to. In this case, prerelease versions - ARE allowed, so `1.2.3-beta` would satisfy. -* `1.2.3 - 2.3.4` := `>=1.2.3 <=2.3.4` -* `~1.2.3` := `>=1.2.3-0 <1.3.0-0` "Reasonably close to `1.2.3`". When - using tilde operators, prerelease versions are supported as well, - but a prerelease of the next significant digit will NOT be - satisfactory, so `1.3.0-beta` will not satisfy `~1.2.3`. -* `^1.2.3` := `>=1.2.3-0 <2.0.0-0` "Compatible with `1.2.3`". When - using caret operators, anything from the specified version (including - prerelease) will be supported up to, but not including, the next - major version (or its prereleases). `1.5.1` will satisfy `^1.2.3`, - while `1.2.2` and `2.0.0-beta` will not. -* `^0.1.3` := `>=0.1.3-0 <0.2.0-0` "Compatible with `0.1.3`". `0.x.x` versions are - special: the first non-zero component indicates potentially breaking changes, - meaning the caret operator matches any version with the same first non-zero - component starting at the specified version. -* `^0.0.2` := `=0.0.2` "Only the version `0.0.2` is considered compatible" -* `~1.2` := `>=1.2.0-0 <1.3.0-0` "Any version starting with `1.2`" -* `^1.2` := `>=1.2.0-0 <2.0.0-0` "Any version compatible with `1.2`" -* `1.2.x` := `>=1.2.0-0 <1.3.0-0` "Any version starting with `1.2`" -* `1.2.*` Same as `1.2.x`. -* `1.2` Same as `1.2.x`. -* `~1` := `>=1.0.0-0 <2.0.0-0` "Any version starting with `1`" -* `^1` := `>=1.0.0-0 <2.0.0-0` "Any version compatible with `1`" -* `1.x` := `>=1.0.0-0 <2.0.0-0` "Any version starting with `1`" -* `1.*` Same as `1.x`. -* `1` Same as `1.x`. -* `*` Any version whatsoever. -* `x` Same as `*`. -* `""` (just an empty string) Same as `*`. - - -Ranges can be joined with either a space (which implies "and") or a -`||` (which implies "or"). - -## Functions - -All methods and classes take a final `loose` boolean argument that, if -true, will be more forgiving about not-quite-valid semver strings. -The resulting output will always be 100% strict, of course. - -Strict-mode Comparators and Ranges will be strict about the SemVer -strings that they parse. - -* `valid(v)`: Return the parsed version, or null if it's not valid. -* `inc(v, release)`: Return the version incremented by the release - type (`major`, `premajor`, `minor`, `preminor`, `patch`, - `prepatch`, or `prerelease`), or null if it's not valid - * `premajor` in one call will bump the version up to the next major - version and down to a prerelease of that major version. - `preminor`, and `prepatch` work the same way. - * If called from a non-prerelease version, the `prerelease` will work the - same as `prepatch`. It increments the patch version, then makes a - prerelease. If the input version is already a prerelease it simply - increments it. - -### Comparison - -* `gt(v1, v2)`: `v1 > v2` -* `gte(v1, v2)`: `v1 >= v2` -* `lt(v1, v2)`: `v1 < v2` -* `lte(v1, v2)`: `v1 <= v2` -* `eq(v1, v2)`: `v1 == v2` This is true if they're logically equivalent, - even if they're not the exact same string. You already know how to - compare strings. -* `neq(v1, v2)`: `v1 != v2` The opposite of `eq`. -* `cmp(v1, comparator, v2)`: Pass in a comparison string, and it'll call - the corresponding function above. `"==="` and `"!=="` do simple - string comparison, but are included for completeness. Throws if an - invalid comparison string is provided. -* `compare(v1, v2)`: Return `0` if `v1 == v2`, or `1` if `v1` is greater, or `-1` if - `v2` is greater. Sorts in ascending order if passed to `Array.sort()`. -* `rcompare(v1, v2)`: The reverse of compare. Sorts an array of versions - in descending order when passed to `Array.sort()`. - - -### Ranges - -* `validRange(range)`: Return the valid range or null if it's not valid -* `satisfies(version, range)`: Return true if the version satisfies the - range. -* `maxSatisfying(versions, range)`: Return the highest version in the list - that satisfies the range, or `null` if none of them do. -* `gtr(version, range)`: Return `true` if version is greater than all the - versions possible in the range. -* `ltr(version, range)`: Return `true` if version is less than all the - versions possible in the range. -* `outside(version, range, hilo)`: Return true if the version is outside - the bounds of the range in either the high or low direction. The - `hilo` argument must be either the string `'>'` or `'<'`. (This is - the function called by `gtr` and `ltr`.) - -Note that, since ranges may be non-contiguous, a version might not be -greater than a range, less than a range, *or* satisfy a range! For -example, the range `1.2 <1.2.9 || >2.0.0` would have a hole from `1.2.9` -until `2.0.0`, so the version `1.2.10` would not be greater than the -range (because `2.0.1` satisfies, which is higher), nor less than the -range (since `1.2.8` satisfies, which is lower), and it also does not -satisfy the range. - -If you want to know if a version satisfies or does not satisfy a -range, use the `satisfies(version, range)` function. diff --git a/node_modules/browserify-fs/node_modules/levelup/node_modules/semver/bin/semver b/node_modules/browserify-fs/node_modules/levelup/node_modules/semver/bin/semver deleted file mode 100755 index 41c148fb..00000000 --- a/node_modules/browserify-fs/node_modules/levelup/node_modules/semver/bin/semver +++ /dev/null @@ -1,125 +0,0 @@ -#!/usr/bin/env node -// Standalone semver comparison program. -// Exits successfully and prints matching version(s) if -// any supplied version is valid and passes all tests. - -var argv = process.argv.slice(2) - , versions = [] - , range = [] - , gt = [] - , lt = [] - , eq = [] - , inc = null - , version = require("../package.json").version - , loose = false - , semver = require("../semver") - , reverse = false - -main() - -function main () { - if (!argv.length) return help() - while (argv.length) { - var a = argv.shift() - var i = a.indexOf('=') - if (i !== -1) { - a = a.slice(0, i) - argv.unshift(a.slice(i + 1)) - } - switch (a) { - case "-rv": case "-rev": case "--rev": case "--reverse": - reverse = true - break - case "-l": case "--loose": - loose = true - break - case "-v": case "--version": - versions.push(argv.shift()) - break - case "-i": case "--inc": case "--increment": - switch (argv[0]) { - case "major": case "minor": case "patch": case "prerelease": - case "premajor": case "preminor": case "prepatch": - inc = argv.shift() - break - default: - inc = "patch" - break - } - break - case "-r": case "--range": - range.push(argv.shift()) - break - case "-h": case "--help": case "-?": - return help() - default: - versions.push(a) - break - } - } - - versions = versions.filter(function (v) { - return semver.valid(v, loose) - }) - if (!versions.length) return fail() - if (inc && (versions.length !== 1 || range.length)) - return failInc() - - for (var i = 0, l = range.length; i < l ; i ++) { - versions = versions.filter(function (v) { - return semver.satisfies(v, range[i], loose) - }) - if (!versions.length) return fail() - } - return success(versions) -} - -function failInc () { - console.error("--inc can only be used on a single version with no range") - fail() -} - -function fail () { process.exit(1) } - -function success () { - var compare = reverse ? "rcompare" : "compare" - versions.sort(function (a, b) { - return semver[compare](a, b, loose) - }).map(function (v) { - return semver.clean(v, loose) - }).map(function (v) { - return inc ? semver.inc(v, inc, loose) : v - }).forEach(function (v,i,_) { console.log(v) }) -} - -function help () { - console.log(["SemVer " + version - ,"" - ,"A JavaScript implementation of the http://semver.org/ specification" - ,"Copyright Isaac Z. Schlueter" - ,"" - ,"Usage: semver [options] [ [...]]" - ,"Prints valid versions sorted by SemVer precedence" - ,"" - ,"Options:" - ,"-r --range " - ," Print versions that match the specified range." - ,"" - ,"-i --increment []" - ," Increment a version by the specified level. Level can" - ," be one of: major, minor, patch, premajor, preminor," - ," prepatch, or prerelease. Default level is 'patch'." - ," Only one version may be specified." - ,"" - ,"-l --loose" - ," Interpret versions and ranges loosely" - ,"" - ,"Program exits successfully if any valid version satisfies" - ,"all supplied ranges, and prints all satisfying versions." - ,"" - ,"If no satisfying versions are found, then exits failure." - ,"" - ,"Versions are printed in ascending order, so supplying" - ,"multiple versions to the utility will just sort them." - ].join("\n")) -} diff --git a/node_modules/browserify-fs/node_modules/levelup/node_modules/semver/foot.js b/node_modules/browserify-fs/node_modules/levelup/node_modules/semver/foot.js deleted file mode 100644 index 8f83c20f..00000000 --- a/node_modules/browserify-fs/node_modules/levelup/node_modules/semver/foot.js +++ /dev/null @@ -1,6 +0,0 @@ - -})( - typeof exports === 'object' ? exports : - typeof define === 'function' && define.amd ? {} : - semver = {} -); diff --git a/node_modules/browserify-fs/node_modules/levelup/node_modules/semver/head.js b/node_modules/browserify-fs/node_modules/levelup/node_modules/semver/head.js deleted file mode 100644 index 65368651..00000000 --- a/node_modules/browserify-fs/node_modules/levelup/node_modules/semver/head.js +++ /dev/null @@ -1,2 +0,0 @@ -;(function(exports) { - diff --git a/node_modules/browserify-fs/node_modules/levelup/node_modules/semver/package.json b/node_modules/browserify-fs/node_modules/levelup/node_modules/semver/package.json deleted file mode 100644 index e22adc73..00000000 --- a/node_modules/browserify-fs/node_modules/levelup/node_modules/semver/package.json +++ /dev/null @@ -1,50 +0,0 @@ -{ - "name": "semver", - "version": "2.3.2", - "description": "The semantic version parser used by npm.", - "main": "semver.js", - "browser": "semver.browser.js", - "min": "semver.min.js", - "scripts": { - "test": "tap test/*.js", - "prepublish": "make" - }, - "devDependencies": { - "tap": "0.x >=0.0.4", - "uglify-js": "~2.3.6" - }, - "license": "BSD", - "repository": { - "type": "git", - "url": "git://github.com/isaacs/node-semver.git" - }, - "bin": { - "semver": "./bin/semver" - }, - "gitHead": "87bcf749b18fd0ce32b1808f60a98eacecd84689", - "bugs": { - "url": "https://github.com/isaacs/node-semver/issues" - }, - "homepage": "https://github.com/isaacs/node-semver", - "_id": "semver@2.3.2", - "_shasum": "b9848f25d6cf36333073ec9ef8856d42f1233e52", - "_from": "semver@>=2.3.1 <2.4.0", - "_npmVersion": "1.5.0-alpha-4", - "_npmUser": { - "name": "isaacs", - "email": "i@izs.me" - }, - "maintainers": [ - { - "name": "isaacs", - "email": "i@izs.me" - } - ], - "dist": { - "shasum": "b9848f25d6cf36333073ec9ef8856d42f1233e52", - "tarball": "http://registry.npmjs.org/semver/-/semver-2.3.2.tgz" - }, - "directories": {}, - "_resolved": "https://registry.npmjs.org/semver/-/semver-2.3.2.tgz", - "readme": "ERROR: No README data found!" -} diff --git a/node_modules/browserify-fs/node_modules/levelup/node_modules/semver/semver.browser.js b/node_modules/browserify-fs/node_modules/levelup/node_modules/semver/semver.browser.js deleted file mode 100644 index 8c89c715..00000000 --- a/node_modules/browserify-fs/node_modules/levelup/node_modules/semver/semver.browser.js +++ /dev/null @@ -1,1046 +0,0 @@ -;(function(exports) { - -// export the class if we are in a Node-like system. -if (typeof module === 'object' && module.exports === exports) - exports = module.exports = SemVer; - -// The debug function is excluded entirely from the minified version. - -// Note: this is the semver.org version of the spec that it implements -// Not necessarily the package version of this code. -exports.SEMVER_SPEC_VERSION = '2.0.0'; - -// The actual regexps go on exports.re -var re = exports.re = []; -var src = exports.src = []; -var R = 0; - -// The following Regular Expressions can be used for tokenizing, -// validating, and parsing SemVer version strings. - -// ## Numeric Identifier -// A single `0`, or a non-zero digit followed by zero or more digits. - -var NUMERICIDENTIFIER = R++; -src[NUMERICIDENTIFIER] = '0|[1-9]\\d*'; -var NUMERICIDENTIFIERLOOSE = R++; -src[NUMERICIDENTIFIERLOOSE] = '[0-9]+'; - - -// ## Non-numeric Identifier -// Zero or more digits, followed by a letter or hyphen, and then zero or -// more letters, digits, or hyphens. - -var NONNUMERICIDENTIFIER = R++; -src[NONNUMERICIDENTIFIER] = '\\d*[a-zA-Z-][a-zA-Z0-9-]*'; - - -// ## Main Version -// Three dot-separated numeric identifiers. - -var MAINVERSION = R++; -src[MAINVERSION] = '(' + src[NUMERICIDENTIFIER] + ')\\.' + - '(' + src[NUMERICIDENTIFIER] + ')\\.' + - '(' + src[NUMERICIDENTIFIER] + ')'; - -var MAINVERSIONLOOSE = R++; -src[MAINVERSIONLOOSE] = '(' + src[NUMERICIDENTIFIERLOOSE] + ')\\.' + - '(' + src[NUMERICIDENTIFIERLOOSE] + ')\\.' + - '(' + src[NUMERICIDENTIFIERLOOSE] + ')'; - -// ## Pre-release Version Identifier -// A numeric identifier, or a non-numeric identifier. - -var PRERELEASEIDENTIFIER = R++; -src[PRERELEASEIDENTIFIER] = '(?:' + src[NUMERICIDENTIFIER] + - '|' + src[NONNUMERICIDENTIFIER] + ')'; - -var PRERELEASEIDENTIFIERLOOSE = R++; -src[PRERELEASEIDENTIFIERLOOSE] = '(?:' + src[NUMERICIDENTIFIERLOOSE] + - '|' + src[NONNUMERICIDENTIFIER] + ')'; - - -// ## Pre-release Version -// Hyphen, followed by one or more dot-separated pre-release version -// identifiers. - -var PRERELEASE = R++; -src[PRERELEASE] = '(?:-(' + src[PRERELEASEIDENTIFIER] + - '(?:\\.' + src[PRERELEASEIDENTIFIER] + ')*))'; - -var PRERELEASELOOSE = R++; -src[PRERELEASELOOSE] = '(?:-?(' + src[PRERELEASEIDENTIFIERLOOSE] + - '(?:\\.' + src[PRERELEASEIDENTIFIERLOOSE] + ')*))'; - -// ## Build Metadata Identifier -// Any combination of digits, letters, or hyphens. - -var BUILDIDENTIFIER = R++; -src[BUILDIDENTIFIER] = '[0-9A-Za-z-]+'; - -// ## Build Metadata -// Plus sign, followed by one or more period-separated build metadata -// identifiers. - -var BUILD = R++; -src[BUILD] = '(?:\\+(' + src[BUILDIDENTIFIER] + - '(?:\\.' + src[BUILDIDENTIFIER] + ')*))'; - - -// ## Full Version String -// A main version, followed optionally by a pre-release version and -// build metadata. - -// Note that the only major, minor, patch, and pre-release sections of -// the version string are capturing groups. The build metadata is not a -// capturing group, because it should not ever be used in version -// comparison. - -var FULL = R++; -var FULLPLAIN = 'v?' + src[MAINVERSION] + - src[PRERELEASE] + '?' + - src[BUILD] + '?'; - -src[FULL] = '^' + FULLPLAIN + '$'; - -// like full, but allows v1.2.3 and =1.2.3, which people do sometimes. -// also, 1.0.0alpha1 (prerelease without the hyphen) which is pretty -// common in the npm registry. -var LOOSEPLAIN = '[v=\\s]*' + src[MAINVERSIONLOOSE] + - src[PRERELEASELOOSE] + '?' + - src[BUILD] + '?'; - -var LOOSE = R++; -src[LOOSE] = '^' + LOOSEPLAIN + '$'; - -var GTLT = R++; -src[GTLT] = '((?:<|>)?=?)'; - -// Something like "2.*" or "1.2.x". -// Note that "x.x" is a valid xRange identifer, meaning "any version" -// Only the first item is strictly required. -var XRANGEIDENTIFIERLOOSE = R++; -src[XRANGEIDENTIFIERLOOSE] = src[NUMERICIDENTIFIERLOOSE] + '|x|X|\\*'; -var XRANGEIDENTIFIER = R++; -src[XRANGEIDENTIFIER] = src[NUMERICIDENTIFIER] + '|x|X|\\*'; - -var XRANGEPLAIN = R++; -src[XRANGEPLAIN] = '[v=\\s]*(' + src[XRANGEIDENTIFIER] + ')' + - '(?:\\.(' + src[XRANGEIDENTIFIER] + ')' + - '(?:\\.(' + src[XRANGEIDENTIFIER] + ')' + - '(?:(' + src[PRERELEASE] + ')' + - ')?)?)?'; - -var XRANGEPLAINLOOSE = R++; -src[XRANGEPLAINLOOSE] = '[v=\\s]*(' + src[XRANGEIDENTIFIERLOOSE] + ')' + - '(?:\\.(' + src[XRANGEIDENTIFIERLOOSE] + ')' + - '(?:\\.(' + src[XRANGEIDENTIFIERLOOSE] + ')' + - '(?:(' + src[PRERELEASELOOSE] + ')' + - ')?)?)?'; - -// >=2.x, for example, means >=2.0.0-0 -// <1.x would be the same as "<1.0.0-0", though. -var XRANGE = R++; -src[XRANGE] = '^' + src[GTLT] + '\\s*' + src[XRANGEPLAIN] + '$'; -var XRANGELOOSE = R++; -src[XRANGELOOSE] = '^' + src[GTLT] + '\\s*' + src[XRANGEPLAINLOOSE] + '$'; - -// Tilde ranges. -// Meaning is "reasonably at or greater than" -var LONETILDE = R++; -src[LONETILDE] = '(?:~>?)'; - -var TILDETRIM = R++; -src[TILDETRIM] = '(\\s*)' + src[LONETILDE] + '\\s+'; -re[TILDETRIM] = new RegExp(src[TILDETRIM], 'g'); -var tildeTrimReplace = '$1~'; - -var TILDE = R++; -src[TILDE] = '^' + src[LONETILDE] + src[XRANGEPLAIN] + '$'; -var TILDELOOSE = R++; -src[TILDELOOSE] = '^' + src[LONETILDE] + src[XRANGEPLAINLOOSE] + '$'; - -// Caret ranges. -// Meaning is "at least and backwards compatible with" -var LONECARET = R++; -src[LONECARET] = '(?:\\^)'; - -var CARETTRIM = R++; -src[CARETTRIM] = '(\\s*)' + src[LONECARET] + '\\s+'; -re[CARETTRIM] = new RegExp(src[CARETTRIM], 'g'); -var caretTrimReplace = '$1^'; - -var CARET = R++; -src[CARET] = '^' + src[LONECARET] + src[XRANGEPLAIN] + '$'; -var CARETLOOSE = R++; -src[CARETLOOSE] = '^' + src[LONECARET] + src[XRANGEPLAINLOOSE] + '$'; - -// A simple gt/lt/eq thing, or just "" to indicate "any version" -var COMPARATORLOOSE = R++; -src[COMPARATORLOOSE] = '^' + src[GTLT] + '\\s*(' + LOOSEPLAIN + ')$|^$'; -var COMPARATOR = R++; -src[COMPARATOR] = '^' + src[GTLT] + '\\s*(' + FULLPLAIN + ')$|^$'; - - -// An expression to strip any whitespace between the gtlt and the thing -// it modifies, so that `> 1.2.3` ==> `>1.2.3` -var COMPARATORTRIM = R++; -src[COMPARATORTRIM] = '(\\s*)' + src[GTLT] + - '\\s*(' + LOOSEPLAIN + '|' + src[XRANGEPLAIN] + ')'; - -// this one has to use the /g flag -re[COMPARATORTRIM] = new RegExp(src[COMPARATORTRIM], 'g'); -var comparatorTrimReplace = '$1$2$3'; - - -// Something like `1.2.3 - 1.2.4` -// Note that these all use the loose form, because they'll be -// checked against either the strict or loose comparator form -// later. -var HYPHENRANGE = R++; -src[HYPHENRANGE] = '^\\s*(' + src[XRANGEPLAIN] + ')' + - '\\s+-\\s+' + - '(' + src[XRANGEPLAIN] + ')' + - '\\s*$'; - -var HYPHENRANGELOOSE = R++; -src[HYPHENRANGELOOSE] = '^\\s*(' + src[XRANGEPLAINLOOSE] + ')' + - '\\s+-\\s+' + - '(' + src[XRANGEPLAINLOOSE] + ')' + - '\\s*$'; - -// Star ranges basically just allow anything at all. -var STAR = R++; -src[STAR] = '(<|>)?=?\\s*\\*'; - -// Compile to actual regexp objects. -// All are flag-free, unless they were created above with a flag. -for (var i = 0; i < R; i++) { - ; - if (!re[i]) - re[i] = new RegExp(src[i]); -} - -exports.parse = parse; -function parse(version, loose) { - var r = loose ? re[LOOSE] : re[FULL]; - return (r.test(version)) ? new SemVer(version, loose) : null; -} - -exports.valid = valid; -function valid(version, loose) { - var v = parse(version, loose); - return v ? v.version : null; -} - - -exports.clean = clean; -function clean(version, loose) { - var s = parse(version, loose); - return s ? s.version : null; -} - -exports.SemVer = SemVer; - -function SemVer(version, loose) { - if (version instanceof SemVer) { - if (version.loose === loose) - return version; - else - version = version.version; - } else if (typeof version !== 'string') { - throw new TypeError('Invalid Version: ' + version); - } - - if (!(this instanceof SemVer)) - return new SemVer(version, loose); - - ; - this.loose = loose; - var m = version.trim().match(loose ? re[LOOSE] : re[FULL]); - - if (!m) - throw new TypeError('Invalid Version: ' + version); - - this.raw = version; - - // these are actually numbers - this.major = +m[1]; - this.minor = +m[2]; - this.patch = +m[3]; - - // numberify any prerelease numeric ids - if (!m[4]) - this.prerelease = []; - else - this.prerelease = m[4].split('.').map(function(id) { - return (/^[0-9]+$/.test(id)) ? +id : id; - }); - - this.build = m[5] ? m[5].split('.') : []; - this.format(); -} - -SemVer.prototype.format = function() { - this.version = this.major + '.' + this.minor + '.' + this.patch; - if (this.prerelease.length) - this.version += '-' + this.prerelease.join('.'); - return this.version; -}; - -SemVer.prototype.inspect = function() { - return ''; -}; - -SemVer.prototype.toString = function() { - return this.version; -}; - -SemVer.prototype.compare = function(other) { - ; - if (!(other instanceof SemVer)) - other = new SemVer(other, this.loose); - - return this.compareMain(other) || this.comparePre(other); -}; - -SemVer.prototype.compareMain = function(other) { - if (!(other instanceof SemVer)) - other = new SemVer(other, this.loose); - - return compareIdentifiers(this.major, other.major) || - compareIdentifiers(this.minor, other.minor) || - compareIdentifiers(this.patch, other.patch); -}; - -SemVer.prototype.comparePre = function(other) { - if (!(other instanceof SemVer)) - other = new SemVer(other, this.loose); - - // NOT having a prerelease is > having one - if (this.prerelease.length && !other.prerelease.length) - return -1; - else if (!this.prerelease.length && other.prerelease.length) - return 1; - else if (!this.prerelease.length && !other.prerelease.length) - return 0; - - var i = 0; - do { - var a = this.prerelease[i]; - var b = other.prerelease[i]; - ; - if (a === undefined && b === undefined) - return 0; - else if (b === undefined) - return 1; - else if (a === undefined) - return -1; - else if (a === b) - continue; - else - return compareIdentifiers(a, b); - } while (++i); -}; - -// preminor will bump the version up to the next minor release, and immediately -// down to pre-release. premajor and prepatch work the same way. -SemVer.prototype.inc = function(release) { - switch (release) { - case 'premajor': - this.inc('major'); - this.inc('pre'); - break; - case 'preminor': - this.inc('minor'); - this.inc('pre'); - break; - case 'prepatch': - // If this is already a prerelease, it will bump to the next version - // drop any prereleases that might already exist, since they are not - // relevant at this point. - this.prerelease.length = 0 - this.inc('patch'); - this.inc('pre'); - break; - // If the input is a non-prerelease version, this acts the same as - // prepatch. - case 'prerelease': - if (this.prerelease.length === 0) - this.inc('patch'); - this.inc('pre'); - break; - case 'major': - this.major++; - this.minor = -1; - case 'minor': - this.minor++; - this.patch = 0; - this.prerelease = []; - break; - case 'patch': - // If this is not a pre-release version, it will increment the patch. - // If it is a pre-release it will bump up to the same patch version. - // 1.2.0-5 patches to 1.2.0 - // 1.2.0 patches to 1.2.1 - if (this.prerelease.length === 0) - this.patch++; - this.prerelease = []; - break; - // This probably shouldn't be used publically. - // 1.0.0 "pre" would become 1.0.0-0 which is the wrong direction. - case 'pre': - if (this.prerelease.length === 0) - this.prerelease = [0]; - else { - var i = this.prerelease.length; - while (--i >= 0) { - if (typeof this.prerelease[i] === 'number') { - this.prerelease[i]++; - i = -2; - } - } - if (i === -1) // didn't increment anything - this.prerelease.push(0); - } - break; - - default: - throw new Error('invalid increment argument: ' + release); - } - this.format(); - return this; -}; - -exports.inc = inc; -function inc(version, release, loose) { - try { - return new SemVer(version, loose).inc(release).version; - } catch (er) { - return null; - } -} - -exports.compareIdentifiers = compareIdentifiers; - -var numeric = /^[0-9]+$/; -function compareIdentifiers(a, b) { - var anum = numeric.test(a); - var bnum = numeric.test(b); - - if (anum && bnum) { - a = +a; - b = +b; - } - - return (anum && !bnum) ? -1 : - (bnum && !anum) ? 1 : - a < b ? -1 : - a > b ? 1 : - 0; -} - -exports.rcompareIdentifiers = rcompareIdentifiers; -function rcompareIdentifiers(a, b) { - return compareIdentifiers(b, a); -} - -exports.compare = compare; -function compare(a, b, loose) { - return new SemVer(a, loose).compare(b); -} - -exports.compareLoose = compareLoose; -function compareLoose(a, b) { - return compare(a, b, true); -} - -exports.rcompare = rcompare; -function rcompare(a, b, loose) { - return compare(b, a, loose); -} - -exports.sort = sort; -function sort(list, loose) { - return list.sort(function(a, b) { - return exports.compare(a, b, loose); - }); -} - -exports.rsort = rsort; -function rsort(list, loose) { - return list.sort(function(a, b) { - return exports.rcompare(a, b, loose); - }); -} - -exports.gt = gt; -function gt(a, b, loose) { - return compare(a, b, loose) > 0; -} - -exports.lt = lt; -function lt(a, b, loose) { - return compare(a, b, loose) < 0; -} - -exports.eq = eq; -function eq(a, b, loose) { - return compare(a, b, loose) === 0; -} - -exports.neq = neq; -function neq(a, b, loose) { - return compare(a, b, loose) !== 0; -} - -exports.gte = gte; -function gte(a, b, loose) { - return compare(a, b, loose) >= 0; -} - -exports.lte = lte; -function lte(a, b, loose) { - return compare(a, b, loose) <= 0; -} - -exports.cmp = cmp; -function cmp(a, op, b, loose) { - var ret; - switch (op) { - case '===': ret = a === b; break; - case '!==': ret = a !== b; break; - case '': case '=': case '==': ret = eq(a, b, loose); break; - case '!=': ret = neq(a, b, loose); break; - case '>': ret = gt(a, b, loose); break; - case '>=': ret = gte(a, b, loose); break; - case '<': ret = lt(a, b, loose); break; - case '<=': ret = lte(a, b, loose); break; - default: throw new TypeError('Invalid operator: ' + op); - } - return ret; -} - -exports.Comparator = Comparator; -function Comparator(comp, loose) { - if (comp instanceof Comparator) { - if (comp.loose === loose) - return comp; - else - comp = comp.value; - } - - if (!(this instanceof Comparator)) - return new Comparator(comp, loose); - - ; - this.loose = loose; - this.parse(comp); - - if (this.semver === ANY) - this.value = ''; - else - this.value = this.operator + this.semver.version; -} - -var ANY = {}; -Comparator.prototype.parse = function(comp) { - var r = this.loose ? re[COMPARATORLOOSE] : re[COMPARATOR]; - var m = comp.match(r); - - if (!m) - throw new TypeError('Invalid comparator: ' + comp); - - this.operator = m[1]; - if (this.operator === '=') - this.operator = ''; - - // if it literally is just '>' or '' then allow anything. - if (!m[2]) - this.semver = ANY; - else { - this.semver = new SemVer(m[2], this.loose); - - // <1.2.3-rc DOES allow 1.2.3-beta (has prerelease) - // >=1.2.3 DOES NOT allow 1.2.3-beta - // <=1.2.3 DOES allow 1.2.3-beta - // However, <1.2.3 does NOT allow 1.2.3-beta, - // even though `1.2.3-beta < 1.2.3` - // The assumption is that the 1.2.3 version has something you - // *don't* want, so we push the prerelease down to the minimum. - if (this.operator === '<' && !this.semver.prerelease.length) { - this.semver.prerelease = ['0']; - this.semver.format(); - } - } -}; - -Comparator.prototype.inspect = function() { - return ''; -}; - -Comparator.prototype.toString = function() { - return this.value; -}; - -Comparator.prototype.test = function(version) { - ; - return (this.semver === ANY) ? true : - cmp(version, this.operator, this.semver, this.loose); -}; - - -exports.Range = Range; -function Range(range, loose) { - if ((range instanceof Range) && range.loose === loose) - return range; - - if (!(this instanceof Range)) - return new Range(range, loose); - - this.loose = loose; - - // First, split based on boolean or || - this.raw = range; - this.set = range.split(/\s*\|\|\s*/).map(function(range) { - return this.parseRange(range.trim()); - }, this).filter(function(c) { - // throw out any that are not relevant for whatever reason - return c.length; - }); - - if (!this.set.length) { - throw new TypeError('Invalid SemVer Range: ' + range); - } - - this.format(); -} - -Range.prototype.inspect = function() { - return ''; -}; - -Range.prototype.format = function() { - this.range = this.set.map(function(comps) { - return comps.join(' ').trim(); - }).join('||').trim(); - return this.range; -}; - -Range.prototype.toString = function() { - return this.range; -}; - -Range.prototype.parseRange = function(range) { - var loose = this.loose; - range = range.trim(); - ; - // `1.2.3 - 1.2.4` => `>=1.2.3 <=1.2.4` - var hr = loose ? re[HYPHENRANGELOOSE] : re[HYPHENRANGE]; - range = range.replace(hr, hyphenReplace); - ; - // `> 1.2.3 < 1.2.5` => `>1.2.3 <1.2.5` - range = range.replace(re[COMPARATORTRIM], comparatorTrimReplace); - ; - - // `~ 1.2.3` => `~1.2.3` - range = range.replace(re[TILDETRIM], tildeTrimReplace); - - // `^ 1.2.3` => `^1.2.3` - range = range.replace(re[CARETTRIM], caretTrimReplace); - - // normalize spaces - range = range.split(/\s+/).join(' '); - - // At this point, the range is completely trimmed and - // ready to be split into comparators. - - var compRe = loose ? re[COMPARATORLOOSE] : re[COMPARATOR]; - var set = range.split(' ').map(function(comp) { - return parseComparator(comp, loose); - }).join(' ').split(/\s+/); - if (this.loose) { - // in loose mode, throw out any that are not valid comparators - set = set.filter(function(comp) { - return !!comp.match(compRe); - }); - } - set = set.map(function(comp) { - return new Comparator(comp, loose); - }); - - return set; -}; - -// Mostly just for testing and legacy API reasons -exports.toComparators = toComparators; -function toComparators(range, loose) { - return new Range(range, loose).set.map(function(comp) { - return comp.map(function(c) { - return c.value; - }).join(' ').trim().split(' '); - }); -} - -// comprised of xranges, tildes, stars, and gtlt's at this point. -// already replaced the hyphen ranges -// turn into a set of JUST comparators. -function parseComparator(comp, loose) { - ; - comp = replaceCarets(comp, loose); - ; - comp = replaceTildes(comp, loose); - ; - comp = replaceXRanges(comp, loose); - ; - comp = replaceStars(comp, loose); - ; - return comp; -} - -function isX(id) { - return !id || id.toLowerCase() === 'x' || id === '*'; -} - -// ~, ~> --> * (any, kinda silly) -// ~2, ~2.x, ~2.x.x, ~>2, ~>2.x ~>2.x.x --> >=2.0.0 <3.0.0 -// ~2.0, ~2.0.x, ~>2.0, ~>2.0.x --> >=2.0.0 <2.1.0 -// ~1.2, ~1.2.x, ~>1.2, ~>1.2.x --> >=1.2.0 <1.3.0 -// ~1.2.3, ~>1.2.3 --> >=1.2.3 <1.3.0 -// ~1.2.0, ~>1.2.0 --> >=1.2.0 <1.3.0 -function replaceTildes(comp, loose) { - return comp.trim().split(/\s+/).map(function(comp) { - return replaceTilde(comp, loose); - }).join(' '); -} - -function replaceTilde(comp, loose) { - var r = loose ? re[TILDELOOSE] : re[TILDE]; - return comp.replace(r, function(_, M, m, p, pr) { - ; - var ret; - - if (isX(M)) - ret = ''; - else if (isX(m)) - ret = '>=' + M + '.0.0-0 <' + (+M + 1) + '.0.0-0'; - else if (isX(p)) - // ~1.2 == >=1.2.0- <1.3.0- - ret = '>=' + M + '.' + m + '.0-0 <' + M + '.' + (+m + 1) + '.0-0'; - else if (pr) { - ; - if (pr.charAt(0) !== '-') - pr = '-' + pr; - ret = '>=' + M + '.' + m + '.' + p + pr + - ' <' + M + '.' + (+m + 1) + '.0-0'; - } else - // ~1.2.3 == >=1.2.3-0 <1.3.0-0 - ret = '>=' + M + '.' + m + '.' + p + '-0' + - ' <' + M + '.' + (+m + 1) + '.0-0'; - - ; - return ret; - }); -} - -// ^ --> * (any, kinda silly) -// ^2, ^2.x, ^2.x.x --> >=2.0.0 <3.0.0 -// ^2.0, ^2.0.x --> >=2.0.0 <3.0.0 -// ^1.2, ^1.2.x --> >=1.2.0 <2.0.0 -// ^1.2.3 --> >=1.2.3 <2.0.0 -// ^1.2.0 --> >=1.2.0 <2.0.0 -function replaceCarets(comp, loose) { - return comp.trim().split(/\s+/).map(function(comp) { - return replaceCaret(comp, loose); - }).join(' '); -} - -function replaceCaret(comp, loose) { - var r = loose ? re[CARETLOOSE] : re[CARET]; - return comp.replace(r, function(_, M, m, p, pr) { - ; - var ret; - - if (isX(M)) - ret = ''; - else if (isX(m)) - ret = '>=' + M + '.0.0-0 <' + (+M + 1) + '.0.0-0'; - else if (isX(p)) { - if (M === '0') - ret = '>=' + M + '.' + m + '.0-0 <' + M + '.' + (+m + 1) + '.0-0'; - else - ret = '>=' + M + '.' + m + '.0-0 <' + (+M + 1) + '.0.0-0'; - } else if (pr) { - ; - if (pr.charAt(0) !== '-') - pr = '-' + pr; - if (M === '0') { - if (m === '0') - ret = '=' + M + '.' + m + '.' + p + pr; - else - ret = '>=' + M + '.' + m + '.' + p + pr + - ' <' + M + '.' + (+m + 1) + '.0-0'; - } else - ret = '>=' + M + '.' + m + '.' + p + pr + - ' <' + (+M + 1) + '.0.0-0'; - } else { - if (M === '0') { - if (m === '0') - ret = '=' + M + '.' + m + '.' + p; - else - ret = '>=' + M + '.' + m + '.' + p + '-0' + - ' <' + M + '.' + (+m + 1) + '.0-0'; - } else - ret = '>=' + M + '.' + m + '.' + p + '-0' + - ' <' + (+M + 1) + '.0.0-0'; - } - - ; - return ret; - }); -} - -function replaceXRanges(comp, loose) { - ; - return comp.split(/\s+/).map(function(comp) { - return replaceXRange(comp, loose); - }).join(' '); -} - -function replaceXRange(comp, loose) { - comp = comp.trim(); - var r = loose ? re[XRANGELOOSE] : re[XRANGE]; - return comp.replace(r, function(ret, gtlt, M, m, p, pr) { - ; - var xM = isX(M); - var xm = xM || isX(m); - var xp = xm || isX(p); - var anyX = xp; - - if (gtlt === '=' && anyX) - gtlt = ''; - - if (gtlt && anyX) { - // replace X with 0, and then append the -0 min-prerelease - if (xM) - M = 0; - if (xm) - m = 0; - if (xp) - p = 0; - - if (gtlt === '>') { - // >1 => >=2.0.0-0 - // >1.2 => >=1.3.0-0 - // >1.2.3 => >= 1.2.4-0 - gtlt = '>='; - if (xM) { - // no change - } else if (xm) { - M = +M + 1; - m = 0; - p = 0; - } else if (xp) { - m = +m + 1; - p = 0; - } - } - - - ret = gtlt + M + '.' + m + '.' + p + '-0'; - } else if (xM) { - // allow any - ret = '*'; - } else if (xm) { - // append '-0' onto the version, otherwise - // '1.x.x' matches '2.0.0-beta', since the tag - // *lowers* the version value - ret = '>=' + M + '.0.0-0 <' + (+M + 1) + '.0.0-0'; - } else if (xp) { - ret = '>=' + M + '.' + m + '.0-0 <' + M + '.' + (+m + 1) + '.0-0'; - } - - ; - - return ret; - }); -} - -// Because * is AND-ed with everything else in the comparator, -// and '' means "any version", just remove the *s entirely. -function replaceStars(comp, loose) { - ; - // Looseness is ignored here. star is always as loose as it gets! - return comp.trim().replace(re[STAR], ''); -} - -// This function is passed to string.replace(re[HYPHENRANGE]) -// M, m, patch, prerelease, build -// 1.2 - 3.4.5 => >=1.2.0-0 <=3.4.5 -// 1.2.3 - 3.4 => >=1.2.0-0 <3.5.0-0 Any 3.4.x will do -// 1.2 - 3.4 => >=1.2.0-0 <3.5.0-0 -function hyphenReplace($0, - from, fM, fm, fp, fpr, fb, - to, tM, tm, tp, tpr, tb) { - - if (isX(fM)) - from = ''; - else if (isX(fm)) - from = '>=' + fM + '.0.0-0'; - else if (isX(fp)) - from = '>=' + fM + '.' + fm + '.0-0'; - else - from = '>=' + from; - - if (isX(tM)) - to = ''; - else if (isX(tm)) - to = '<' + (+tM + 1) + '.0.0-0'; - else if (isX(tp)) - to = '<' + tM + '.' + (+tm + 1) + '.0-0'; - else if (tpr) - to = '<=' + tM + '.' + tm + '.' + tp + '-' + tpr; - else - to = '<=' + to; - - return (from + ' ' + to).trim(); -} - - -// if ANY of the sets match ALL of its comparators, then pass -Range.prototype.test = function(version) { - if (!version) - return false; - for (var i = 0; i < this.set.length; i++) { - if (testSet(this.set[i], version)) - return true; - } - return false; -}; - -function testSet(set, version) { - for (var i = 0; i < set.length; i++) { - if (!set[i].test(version)) - return false; - } - return true; -} - -exports.satisfies = satisfies; -function satisfies(version, range, loose) { - try { - range = new Range(range, loose); - } catch (er) { - return false; - } - return range.test(version); -} - -exports.maxSatisfying = maxSatisfying; -function maxSatisfying(versions, range, loose) { - return versions.filter(function(version) { - return satisfies(version, range, loose); - }).sort(function(a, b) { - return rcompare(a, b, loose); - })[0] || null; -} - -exports.validRange = validRange; -function validRange(range, loose) { - try { - // Return '*' instead of '' so that truthiness works. - // This will throw if it's invalid anyway - return new Range(range, loose).range || '*'; - } catch (er) { - return null; - } -} - -// Determine if version is less than all the versions possible in the range -exports.ltr = ltr; -function ltr(version, range, loose) { - return outside(version, range, '<', loose); -} - -// Determine if version is greater than all the versions possible in the range. -exports.gtr = gtr; -function gtr(version, range, loose) { - return outside(version, range, '>', loose); -} - -exports.outside = outside; -function outside(version, range, hilo, loose) { - version = new SemVer(version, loose); - range = new Range(range, loose); - - var gtfn, ltefn, ltfn, comp, ecomp; - switch (hilo) { - case '>': - gtfn = gt; - ltefn = lte; - ltfn = lt; - comp = '>'; - ecomp = '>='; - break; - case '<': - gtfn = lt; - ltefn = gte; - ltfn = gt; - comp = '<'; - ecomp = '<='; - break; - default: - throw new TypeError('Must provide a hilo val of "<" or ">"'); - } - - // If it satisifes the range it is not outside - if (satisfies(version, range, loose)) { - return false; - } - - // From now on, variable terms are as if we're in "gtr" mode. - // but note that everything is flipped for the "ltr" function. - - for (var i = 0; i < range.set.length; ++i) { - var comparators = range.set[i]; - - var high = null; - var low = null; - - comparators.forEach(function(comparator) { - high = high || comparator; - low = low || comparator; - if (gtfn(comparator.semver, high.semver, loose)) { - high = comparator; - } else if (ltfn(comparator.semver, low.semver, loose)) { - low = comparator; - } - }); - - // If the edge version comparator has a operator then our version - // isn't outside it - if (high.operator === comp || high.operator === ecomp) { - return false; - } - - // If the lowest version comparator has an operator and our version - // is less than it then it isn't higher than the range - if ((!low.operator || low.operator === comp) && - ltefn(version, low.semver)) { - return false; - } else if (low.operator === ecomp && ltfn(version, low.semver)) { - return false; - } - } - return true; -} - -// Use the define() function if we're in AMD land -if (typeof define === 'function' && define.amd) - define(exports); - -})( - typeof exports === 'object' ? exports : - typeof define === 'function' && define.amd ? {} : - semver = {} -); diff --git a/node_modules/browserify-fs/node_modules/levelup/node_modules/semver/semver.browser.js.gz b/node_modules/browserify-fs/node_modules/levelup/node_modules/semver/semver.browser.js.gz deleted file mode 100644 index eadb1fe3..00000000 Binary files a/node_modules/browserify-fs/node_modules/levelup/node_modules/semver/semver.browser.js.gz and /dev/null differ diff --git a/node_modules/browserify-fs/node_modules/levelup/node_modules/semver/semver.js b/node_modules/browserify-fs/node_modules/levelup/node_modules/semver/semver.js deleted file mode 100644 index 75f60f2a..00000000 --- a/node_modules/browserify-fs/node_modules/levelup/node_modules/semver/semver.js +++ /dev/null @@ -1,1050 +0,0 @@ -// export the class if we are in a Node-like system. -if (typeof module === 'object' && module.exports === exports) - exports = module.exports = SemVer; - -// The debug function is excluded entirely from the minified version. -/* nomin */ var debug; -/* nomin */ if (typeof process === 'object' && - /* nomin */ process.env && - /* nomin */ process.env.NODE_DEBUG && - /* nomin */ /\bsemver\b/i.test(process.env.NODE_DEBUG)) - /* nomin */ debug = function() { - /* nomin */ var args = Array.prototype.slice.call(arguments, 0); - /* nomin */ args.unshift('SEMVER'); - /* nomin */ console.log.apply(console, args); - /* nomin */ }; -/* nomin */ else - /* nomin */ debug = function() {}; - -// Note: this is the semver.org version of the spec that it implements -// Not necessarily the package version of this code. -exports.SEMVER_SPEC_VERSION = '2.0.0'; - -// The actual regexps go on exports.re -var re = exports.re = []; -var src = exports.src = []; -var R = 0; - -// The following Regular Expressions can be used for tokenizing, -// validating, and parsing SemVer version strings. - -// ## Numeric Identifier -// A single `0`, or a non-zero digit followed by zero or more digits. - -var NUMERICIDENTIFIER = R++; -src[NUMERICIDENTIFIER] = '0|[1-9]\\d*'; -var NUMERICIDENTIFIERLOOSE = R++; -src[NUMERICIDENTIFIERLOOSE] = '[0-9]+'; - - -// ## Non-numeric Identifier -// Zero or more digits, followed by a letter or hyphen, and then zero or -// more letters, digits, or hyphens. - -var NONNUMERICIDENTIFIER = R++; -src[NONNUMERICIDENTIFIER] = '\\d*[a-zA-Z-][a-zA-Z0-9-]*'; - - -// ## Main Version -// Three dot-separated numeric identifiers. - -var MAINVERSION = R++; -src[MAINVERSION] = '(' + src[NUMERICIDENTIFIER] + ')\\.' + - '(' + src[NUMERICIDENTIFIER] + ')\\.' + - '(' + src[NUMERICIDENTIFIER] + ')'; - -var MAINVERSIONLOOSE = R++; -src[MAINVERSIONLOOSE] = '(' + src[NUMERICIDENTIFIERLOOSE] + ')\\.' + - '(' + src[NUMERICIDENTIFIERLOOSE] + ')\\.' + - '(' + src[NUMERICIDENTIFIERLOOSE] + ')'; - -// ## Pre-release Version Identifier -// A numeric identifier, or a non-numeric identifier. - -var PRERELEASEIDENTIFIER = R++; -src[PRERELEASEIDENTIFIER] = '(?:' + src[NUMERICIDENTIFIER] + - '|' + src[NONNUMERICIDENTIFIER] + ')'; - -var PRERELEASEIDENTIFIERLOOSE = R++; -src[PRERELEASEIDENTIFIERLOOSE] = '(?:' + src[NUMERICIDENTIFIERLOOSE] + - '|' + src[NONNUMERICIDENTIFIER] + ')'; - - -// ## Pre-release Version -// Hyphen, followed by one or more dot-separated pre-release version -// identifiers. - -var PRERELEASE = R++; -src[PRERELEASE] = '(?:-(' + src[PRERELEASEIDENTIFIER] + - '(?:\\.' + src[PRERELEASEIDENTIFIER] + ')*))'; - -var PRERELEASELOOSE = R++; -src[PRERELEASELOOSE] = '(?:-?(' + src[PRERELEASEIDENTIFIERLOOSE] + - '(?:\\.' + src[PRERELEASEIDENTIFIERLOOSE] + ')*))'; - -// ## Build Metadata Identifier -// Any combination of digits, letters, or hyphens. - -var BUILDIDENTIFIER = R++; -src[BUILDIDENTIFIER] = '[0-9A-Za-z-]+'; - -// ## Build Metadata -// Plus sign, followed by one or more period-separated build metadata -// identifiers. - -var BUILD = R++; -src[BUILD] = '(?:\\+(' + src[BUILDIDENTIFIER] + - '(?:\\.' + src[BUILDIDENTIFIER] + ')*))'; - - -// ## Full Version String -// A main version, followed optionally by a pre-release version and -// build metadata. - -// Note that the only major, minor, patch, and pre-release sections of -// the version string are capturing groups. The build metadata is not a -// capturing group, because it should not ever be used in version -// comparison. - -var FULL = R++; -var FULLPLAIN = 'v?' + src[MAINVERSION] + - src[PRERELEASE] + '?' + - src[BUILD] + '?'; - -src[FULL] = '^' + FULLPLAIN + '$'; - -// like full, but allows v1.2.3 and =1.2.3, which people do sometimes. -// also, 1.0.0alpha1 (prerelease without the hyphen) which is pretty -// common in the npm registry. -var LOOSEPLAIN = '[v=\\s]*' + src[MAINVERSIONLOOSE] + - src[PRERELEASELOOSE] + '?' + - src[BUILD] + '?'; - -var LOOSE = R++; -src[LOOSE] = '^' + LOOSEPLAIN + '$'; - -var GTLT = R++; -src[GTLT] = '((?:<|>)?=?)'; - -// Something like "2.*" or "1.2.x". -// Note that "x.x" is a valid xRange identifer, meaning "any version" -// Only the first item is strictly required. -var XRANGEIDENTIFIERLOOSE = R++; -src[XRANGEIDENTIFIERLOOSE] = src[NUMERICIDENTIFIERLOOSE] + '|x|X|\\*'; -var XRANGEIDENTIFIER = R++; -src[XRANGEIDENTIFIER] = src[NUMERICIDENTIFIER] + '|x|X|\\*'; - -var XRANGEPLAIN = R++; -src[XRANGEPLAIN] = '[v=\\s]*(' + src[XRANGEIDENTIFIER] + ')' + - '(?:\\.(' + src[XRANGEIDENTIFIER] + ')' + - '(?:\\.(' + src[XRANGEIDENTIFIER] + ')' + - '(?:(' + src[PRERELEASE] + ')' + - ')?)?)?'; - -var XRANGEPLAINLOOSE = R++; -src[XRANGEPLAINLOOSE] = '[v=\\s]*(' + src[XRANGEIDENTIFIERLOOSE] + ')' + - '(?:\\.(' + src[XRANGEIDENTIFIERLOOSE] + ')' + - '(?:\\.(' + src[XRANGEIDENTIFIERLOOSE] + ')' + - '(?:(' + src[PRERELEASELOOSE] + ')' + - ')?)?)?'; - -// >=2.x, for example, means >=2.0.0-0 -// <1.x would be the same as "<1.0.0-0", though. -var XRANGE = R++; -src[XRANGE] = '^' + src[GTLT] + '\\s*' + src[XRANGEPLAIN] + '$'; -var XRANGELOOSE = R++; -src[XRANGELOOSE] = '^' + src[GTLT] + '\\s*' + src[XRANGEPLAINLOOSE] + '$'; - -// Tilde ranges. -// Meaning is "reasonably at or greater than" -var LONETILDE = R++; -src[LONETILDE] = '(?:~>?)'; - -var TILDETRIM = R++; -src[TILDETRIM] = '(\\s*)' + src[LONETILDE] + '\\s+'; -re[TILDETRIM] = new RegExp(src[TILDETRIM], 'g'); -var tildeTrimReplace = '$1~'; - -var TILDE = R++; -src[TILDE] = '^' + src[LONETILDE] + src[XRANGEPLAIN] + '$'; -var TILDELOOSE = R++; -src[TILDELOOSE] = '^' + src[LONETILDE] + src[XRANGEPLAINLOOSE] + '$'; - -// Caret ranges. -// Meaning is "at least and backwards compatible with" -var LONECARET = R++; -src[LONECARET] = '(?:\\^)'; - -var CARETTRIM = R++; -src[CARETTRIM] = '(\\s*)' + src[LONECARET] + '\\s+'; -re[CARETTRIM] = new RegExp(src[CARETTRIM], 'g'); -var caretTrimReplace = '$1^'; - -var CARET = R++; -src[CARET] = '^' + src[LONECARET] + src[XRANGEPLAIN] + '$'; -var CARETLOOSE = R++; -src[CARETLOOSE] = '^' + src[LONECARET] + src[XRANGEPLAINLOOSE] + '$'; - -// A simple gt/lt/eq thing, or just "" to indicate "any version" -var COMPARATORLOOSE = R++; -src[COMPARATORLOOSE] = '^' + src[GTLT] + '\\s*(' + LOOSEPLAIN + ')$|^$'; -var COMPARATOR = R++; -src[COMPARATOR] = '^' + src[GTLT] + '\\s*(' + FULLPLAIN + ')$|^$'; - - -// An expression to strip any whitespace between the gtlt and the thing -// it modifies, so that `> 1.2.3` ==> `>1.2.3` -var COMPARATORTRIM = R++; -src[COMPARATORTRIM] = '(\\s*)' + src[GTLT] + - '\\s*(' + LOOSEPLAIN + '|' + src[XRANGEPLAIN] + ')'; - -// this one has to use the /g flag -re[COMPARATORTRIM] = new RegExp(src[COMPARATORTRIM], 'g'); -var comparatorTrimReplace = '$1$2$3'; - - -// Something like `1.2.3 - 1.2.4` -// Note that these all use the loose form, because they'll be -// checked against either the strict or loose comparator form -// later. -var HYPHENRANGE = R++; -src[HYPHENRANGE] = '^\\s*(' + src[XRANGEPLAIN] + ')' + - '\\s+-\\s+' + - '(' + src[XRANGEPLAIN] + ')' + - '\\s*$'; - -var HYPHENRANGELOOSE = R++; -src[HYPHENRANGELOOSE] = '^\\s*(' + src[XRANGEPLAINLOOSE] + ')' + - '\\s+-\\s+' + - '(' + src[XRANGEPLAINLOOSE] + ')' + - '\\s*$'; - -// Star ranges basically just allow anything at all. -var STAR = R++; -src[STAR] = '(<|>)?=?\\s*\\*'; - -// Compile to actual regexp objects. -// All are flag-free, unless they were created above with a flag. -for (var i = 0; i < R; i++) { - debug(i, src[i]); - if (!re[i]) - re[i] = new RegExp(src[i]); -} - -exports.parse = parse; -function parse(version, loose) { - var r = loose ? re[LOOSE] : re[FULL]; - return (r.test(version)) ? new SemVer(version, loose) : null; -} - -exports.valid = valid; -function valid(version, loose) { - var v = parse(version, loose); - return v ? v.version : null; -} - - -exports.clean = clean; -function clean(version, loose) { - var s = parse(version, loose); - return s ? s.version : null; -} - -exports.SemVer = SemVer; - -function SemVer(version, loose) { - if (version instanceof SemVer) { - if (version.loose === loose) - return version; - else - version = version.version; - } else if (typeof version !== 'string') { - throw new TypeError('Invalid Version: ' + version); - } - - if (!(this instanceof SemVer)) - return new SemVer(version, loose); - - debug('SemVer', version, loose); - this.loose = loose; - var m = version.trim().match(loose ? re[LOOSE] : re[FULL]); - - if (!m) - throw new TypeError('Invalid Version: ' + version); - - this.raw = version; - - // these are actually numbers - this.major = +m[1]; - this.minor = +m[2]; - this.patch = +m[3]; - - // numberify any prerelease numeric ids - if (!m[4]) - this.prerelease = []; - else - this.prerelease = m[4].split('.').map(function(id) { - return (/^[0-9]+$/.test(id)) ? +id : id; - }); - - this.build = m[5] ? m[5].split('.') : []; - this.format(); -} - -SemVer.prototype.format = function() { - this.version = this.major + '.' + this.minor + '.' + this.patch; - if (this.prerelease.length) - this.version += '-' + this.prerelease.join('.'); - return this.version; -}; - -SemVer.prototype.inspect = function() { - return ''; -}; - -SemVer.prototype.toString = function() { - return this.version; -}; - -SemVer.prototype.compare = function(other) { - debug('SemVer.compare', this.version, this.loose, other); - if (!(other instanceof SemVer)) - other = new SemVer(other, this.loose); - - return this.compareMain(other) || this.comparePre(other); -}; - -SemVer.prototype.compareMain = function(other) { - if (!(other instanceof SemVer)) - other = new SemVer(other, this.loose); - - return compareIdentifiers(this.major, other.major) || - compareIdentifiers(this.minor, other.minor) || - compareIdentifiers(this.patch, other.patch); -}; - -SemVer.prototype.comparePre = function(other) { - if (!(other instanceof SemVer)) - other = new SemVer(other, this.loose); - - // NOT having a prerelease is > having one - if (this.prerelease.length && !other.prerelease.length) - return -1; - else if (!this.prerelease.length && other.prerelease.length) - return 1; - else if (!this.prerelease.length && !other.prerelease.length) - return 0; - - var i = 0; - do { - var a = this.prerelease[i]; - var b = other.prerelease[i]; - debug('prerelease compare', i, a, b); - if (a === undefined && b === undefined) - return 0; - else if (b === undefined) - return 1; - else if (a === undefined) - return -1; - else if (a === b) - continue; - else - return compareIdentifiers(a, b); - } while (++i); -}; - -// preminor will bump the version up to the next minor release, and immediately -// down to pre-release. premajor and prepatch work the same way. -SemVer.prototype.inc = function(release) { - switch (release) { - case 'premajor': - this.inc('major'); - this.inc('pre'); - break; - case 'preminor': - this.inc('minor'); - this.inc('pre'); - break; - case 'prepatch': - // If this is already a prerelease, it will bump to the next version - // drop any prereleases that might already exist, since they are not - // relevant at this point. - this.prerelease.length = 0 - this.inc('patch'); - this.inc('pre'); - break; - // If the input is a non-prerelease version, this acts the same as - // prepatch. - case 'prerelease': - if (this.prerelease.length === 0) - this.inc('patch'); - this.inc('pre'); - break; - case 'major': - this.major++; - this.minor = -1; - case 'minor': - this.minor++; - this.patch = 0; - this.prerelease = []; - break; - case 'patch': - // If this is not a pre-release version, it will increment the patch. - // If it is a pre-release it will bump up to the same patch version. - // 1.2.0-5 patches to 1.2.0 - // 1.2.0 patches to 1.2.1 - if (this.prerelease.length === 0) - this.patch++; - this.prerelease = []; - break; - // This probably shouldn't be used publically. - // 1.0.0 "pre" would become 1.0.0-0 which is the wrong direction. - case 'pre': - if (this.prerelease.length === 0) - this.prerelease = [0]; - else { - var i = this.prerelease.length; - while (--i >= 0) { - if (typeof this.prerelease[i] === 'number') { - this.prerelease[i]++; - i = -2; - } - } - if (i === -1) // didn't increment anything - this.prerelease.push(0); - } - break; - - default: - throw new Error('invalid increment argument: ' + release); - } - this.format(); - return this; -}; - -exports.inc = inc; -function inc(version, release, loose) { - try { - return new SemVer(version, loose).inc(release).version; - } catch (er) { - return null; - } -} - -exports.compareIdentifiers = compareIdentifiers; - -var numeric = /^[0-9]+$/; -function compareIdentifiers(a, b) { - var anum = numeric.test(a); - var bnum = numeric.test(b); - - if (anum && bnum) { - a = +a; - b = +b; - } - - return (anum && !bnum) ? -1 : - (bnum && !anum) ? 1 : - a < b ? -1 : - a > b ? 1 : - 0; -} - -exports.rcompareIdentifiers = rcompareIdentifiers; -function rcompareIdentifiers(a, b) { - return compareIdentifiers(b, a); -} - -exports.compare = compare; -function compare(a, b, loose) { - return new SemVer(a, loose).compare(b); -} - -exports.compareLoose = compareLoose; -function compareLoose(a, b) { - return compare(a, b, true); -} - -exports.rcompare = rcompare; -function rcompare(a, b, loose) { - return compare(b, a, loose); -} - -exports.sort = sort; -function sort(list, loose) { - return list.sort(function(a, b) { - return exports.compare(a, b, loose); - }); -} - -exports.rsort = rsort; -function rsort(list, loose) { - return list.sort(function(a, b) { - return exports.rcompare(a, b, loose); - }); -} - -exports.gt = gt; -function gt(a, b, loose) { - return compare(a, b, loose) > 0; -} - -exports.lt = lt; -function lt(a, b, loose) { - return compare(a, b, loose) < 0; -} - -exports.eq = eq; -function eq(a, b, loose) { - return compare(a, b, loose) === 0; -} - -exports.neq = neq; -function neq(a, b, loose) { - return compare(a, b, loose) !== 0; -} - -exports.gte = gte; -function gte(a, b, loose) { - return compare(a, b, loose) >= 0; -} - -exports.lte = lte; -function lte(a, b, loose) { - return compare(a, b, loose) <= 0; -} - -exports.cmp = cmp; -function cmp(a, op, b, loose) { - var ret; - switch (op) { - case '===': ret = a === b; break; - case '!==': ret = a !== b; break; - case '': case '=': case '==': ret = eq(a, b, loose); break; - case '!=': ret = neq(a, b, loose); break; - case '>': ret = gt(a, b, loose); break; - case '>=': ret = gte(a, b, loose); break; - case '<': ret = lt(a, b, loose); break; - case '<=': ret = lte(a, b, loose); break; - default: throw new TypeError('Invalid operator: ' + op); - } - return ret; -} - -exports.Comparator = Comparator; -function Comparator(comp, loose) { - if (comp instanceof Comparator) { - if (comp.loose === loose) - return comp; - else - comp = comp.value; - } - - if (!(this instanceof Comparator)) - return new Comparator(comp, loose); - - debug('comparator', comp, loose); - this.loose = loose; - this.parse(comp); - - if (this.semver === ANY) - this.value = ''; - else - this.value = this.operator + this.semver.version; -} - -var ANY = {}; -Comparator.prototype.parse = function(comp) { - var r = this.loose ? re[COMPARATORLOOSE] : re[COMPARATOR]; - var m = comp.match(r); - - if (!m) - throw new TypeError('Invalid comparator: ' + comp); - - this.operator = m[1]; - if (this.operator === '=') - this.operator = ''; - - // if it literally is just '>' or '' then allow anything. - if (!m[2]) - this.semver = ANY; - else { - this.semver = new SemVer(m[2], this.loose); - - // <1.2.3-rc DOES allow 1.2.3-beta (has prerelease) - // >=1.2.3 DOES NOT allow 1.2.3-beta - // <=1.2.3 DOES allow 1.2.3-beta - // However, <1.2.3 does NOT allow 1.2.3-beta, - // even though `1.2.3-beta < 1.2.3` - // The assumption is that the 1.2.3 version has something you - // *don't* want, so we push the prerelease down to the minimum. - if (this.operator === '<' && !this.semver.prerelease.length) { - this.semver.prerelease = ['0']; - this.semver.format(); - } - } -}; - -Comparator.prototype.inspect = function() { - return ''; -}; - -Comparator.prototype.toString = function() { - return this.value; -}; - -Comparator.prototype.test = function(version) { - debug('Comparator.test', version, this.loose); - return (this.semver === ANY) ? true : - cmp(version, this.operator, this.semver, this.loose); -}; - - -exports.Range = Range; -function Range(range, loose) { - if ((range instanceof Range) && range.loose === loose) - return range; - - if (!(this instanceof Range)) - return new Range(range, loose); - - this.loose = loose; - - // First, split based on boolean or || - this.raw = range; - this.set = range.split(/\s*\|\|\s*/).map(function(range) { - return this.parseRange(range.trim()); - }, this).filter(function(c) { - // throw out any that are not relevant for whatever reason - return c.length; - }); - - if (!this.set.length) { - throw new TypeError('Invalid SemVer Range: ' + range); - } - - this.format(); -} - -Range.prototype.inspect = function() { - return ''; -}; - -Range.prototype.format = function() { - this.range = this.set.map(function(comps) { - return comps.join(' ').trim(); - }).join('||').trim(); - return this.range; -}; - -Range.prototype.toString = function() { - return this.range; -}; - -Range.prototype.parseRange = function(range) { - var loose = this.loose; - range = range.trim(); - debug('range', range, loose); - // `1.2.3 - 1.2.4` => `>=1.2.3 <=1.2.4` - var hr = loose ? re[HYPHENRANGELOOSE] : re[HYPHENRANGE]; - range = range.replace(hr, hyphenReplace); - debug('hyphen replace', range); - // `> 1.2.3 < 1.2.5` => `>1.2.3 <1.2.5` - range = range.replace(re[COMPARATORTRIM], comparatorTrimReplace); - debug('comparator trim', range, re[COMPARATORTRIM]); - - // `~ 1.2.3` => `~1.2.3` - range = range.replace(re[TILDETRIM], tildeTrimReplace); - - // `^ 1.2.3` => `^1.2.3` - range = range.replace(re[CARETTRIM], caretTrimReplace); - - // normalize spaces - range = range.split(/\s+/).join(' '); - - // At this point, the range is completely trimmed and - // ready to be split into comparators. - - var compRe = loose ? re[COMPARATORLOOSE] : re[COMPARATOR]; - var set = range.split(' ').map(function(comp) { - return parseComparator(comp, loose); - }).join(' ').split(/\s+/); - if (this.loose) { - // in loose mode, throw out any that are not valid comparators - set = set.filter(function(comp) { - return !!comp.match(compRe); - }); - } - set = set.map(function(comp) { - return new Comparator(comp, loose); - }); - - return set; -}; - -// Mostly just for testing and legacy API reasons -exports.toComparators = toComparators; -function toComparators(range, loose) { - return new Range(range, loose).set.map(function(comp) { - return comp.map(function(c) { - return c.value; - }).join(' ').trim().split(' '); - }); -} - -// comprised of xranges, tildes, stars, and gtlt's at this point. -// already replaced the hyphen ranges -// turn into a set of JUST comparators. -function parseComparator(comp, loose) { - debug('comp', comp); - comp = replaceCarets(comp, loose); - debug('caret', comp); - comp = replaceTildes(comp, loose); - debug('tildes', comp); - comp = replaceXRanges(comp, loose); - debug('xrange', comp); - comp = replaceStars(comp, loose); - debug('stars', comp); - return comp; -} - -function isX(id) { - return !id || id.toLowerCase() === 'x' || id === '*'; -} - -// ~, ~> --> * (any, kinda silly) -// ~2, ~2.x, ~2.x.x, ~>2, ~>2.x ~>2.x.x --> >=2.0.0 <3.0.0 -// ~2.0, ~2.0.x, ~>2.0, ~>2.0.x --> >=2.0.0 <2.1.0 -// ~1.2, ~1.2.x, ~>1.2, ~>1.2.x --> >=1.2.0 <1.3.0 -// ~1.2.3, ~>1.2.3 --> >=1.2.3 <1.3.0 -// ~1.2.0, ~>1.2.0 --> >=1.2.0 <1.3.0 -function replaceTildes(comp, loose) { - return comp.trim().split(/\s+/).map(function(comp) { - return replaceTilde(comp, loose); - }).join(' '); -} - -function replaceTilde(comp, loose) { - var r = loose ? re[TILDELOOSE] : re[TILDE]; - return comp.replace(r, function(_, M, m, p, pr) { - debug('tilde', comp, _, M, m, p, pr); - var ret; - - if (isX(M)) - ret = ''; - else if (isX(m)) - ret = '>=' + M + '.0.0-0 <' + (+M + 1) + '.0.0-0'; - else if (isX(p)) - // ~1.2 == >=1.2.0- <1.3.0- - ret = '>=' + M + '.' + m + '.0-0 <' + M + '.' + (+m + 1) + '.0-0'; - else if (pr) { - debug('replaceTilde pr', pr); - if (pr.charAt(0) !== '-') - pr = '-' + pr; - ret = '>=' + M + '.' + m + '.' + p + pr + - ' <' + M + '.' + (+m + 1) + '.0-0'; - } else - // ~1.2.3 == >=1.2.3-0 <1.3.0-0 - ret = '>=' + M + '.' + m + '.' + p + '-0' + - ' <' + M + '.' + (+m + 1) + '.0-0'; - - debug('tilde return', ret); - return ret; - }); -} - -// ^ --> * (any, kinda silly) -// ^2, ^2.x, ^2.x.x --> >=2.0.0 <3.0.0 -// ^2.0, ^2.0.x --> >=2.0.0 <3.0.0 -// ^1.2, ^1.2.x --> >=1.2.0 <2.0.0 -// ^1.2.3 --> >=1.2.3 <2.0.0 -// ^1.2.0 --> >=1.2.0 <2.0.0 -function replaceCarets(comp, loose) { - return comp.trim().split(/\s+/).map(function(comp) { - return replaceCaret(comp, loose); - }).join(' '); -} - -function replaceCaret(comp, loose) { - var r = loose ? re[CARETLOOSE] : re[CARET]; - return comp.replace(r, function(_, M, m, p, pr) { - debug('caret', comp, _, M, m, p, pr); - var ret; - - if (isX(M)) - ret = ''; - else if (isX(m)) - ret = '>=' + M + '.0.0-0 <' + (+M + 1) + '.0.0-0'; - else if (isX(p)) { - if (M === '0') - ret = '>=' + M + '.' + m + '.0-0 <' + M + '.' + (+m + 1) + '.0-0'; - else - ret = '>=' + M + '.' + m + '.0-0 <' + (+M + 1) + '.0.0-0'; - } else if (pr) { - debug('replaceCaret pr', pr); - if (pr.charAt(0) !== '-') - pr = '-' + pr; - if (M === '0') { - if (m === '0') - ret = '=' + M + '.' + m + '.' + p + pr; - else - ret = '>=' + M + '.' + m + '.' + p + pr + - ' <' + M + '.' + (+m + 1) + '.0-0'; - } else - ret = '>=' + M + '.' + m + '.' + p + pr + - ' <' + (+M + 1) + '.0.0-0'; - } else { - if (M === '0') { - if (m === '0') - ret = '=' + M + '.' + m + '.' + p; - else - ret = '>=' + M + '.' + m + '.' + p + '-0' + - ' <' + M + '.' + (+m + 1) + '.0-0'; - } else - ret = '>=' + M + '.' + m + '.' + p + '-0' + - ' <' + (+M + 1) + '.0.0-0'; - } - - debug('caret return', ret); - return ret; - }); -} - -function replaceXRanges(comp, loose) { - debug('replaceXRanges', comp, loose); - return comp.split(/\s+/).map(function(comp) { - return replaceXRange(comp, loose); - }).join(' '); -} - -function replaceXRange(comp, loose) { - comp = comp.trim(); - var r = loose ? re[XRANGELOOSE] : re[XRANGE]; - return comp.replace(r, function(ret, gtlt, M, m, p, pr) { - debug('xRange', comp, ret, gtlt, M, m, p, pr); - var xM = isX(M); - var xm = xM || isX(m); - var xp = xm || isX(p); - var anyX = xp; - - if (gtlt === '=' && anyX) - gtlt = ''; - - if (gtlt && anyX) { - // replace X with 0, and then append the -0 min-prerelease - if (xM) - M = 0; - if (xm) - m = 0; - if (xp) - p = 0; - - if (gtlt === '>') { - // >1 => >=2.0.0-0 - // >1.2 => >=1.3.0-0 - // >1.2.3 => >= 1.2.4-0 - gtlt = '>='; - if (xM) { - // no change - } else if (xm) { - M = +M + 1; - m = 0; - p = 0; - } else if (xp) { - m = +m + 1; - p = 0; - } - } - - - ret = gtlt + M + '.' + m + '.' + p + '-0'; - } else if (xM) { - // allow any - ret = '*'; - } else if (xm) { - // append '-0' onto the version, otherwise - // '1.x.x' matches '2.0.0-beta', since the tag - // *lowers* the version value - ret = '>=' + M + '.0.0-0 <' + (+M + 1) + '.0.0-0'; - } else if (xp) { - ret = '>=' + M + '.' + m + '.0-0 <' + M + '.' + (+m + 1) + '.0-0'; - } - - debug('xRange return', ret); - - return ret; - }); -} - -// Because * is AND-ed with everything else in the comparator, -// and '' means "any version", just remove the *s entirely. -function replaceStars(comp, loose) { - debug('replaceStars', comp, loose); - // Looseness is ignored here. star is always as loose as it gets! - return comp.trim().replace(re[STAR], ''); -} - -// This function is passed to string.replace(re[HYPHENRANGE]) -// M, m, patch, prerelease, build -// 1.2 - 3.4.5 => >=1.2.0-0 <=3.4.5 -// 1.2.3 - 3.4 => >=1.2.0-0 <3.5.0-0 Any 3.4.x will do -// 1.2 - 3.4 => >=1.2.0-0 <3.5.0-0 -function hyphenReplace($0, - from, fM, fm, fp, fpr, fb, - to, tM, tm, tp, tpr, tb) { - - if (isX(fM)) - from = ''; - else if (isX(fm)) - from = '>=' + fM + '.0.0-0'; - else if (isX(fp)) - from = '>=' + fM + '.' + fm + '.0-0'; - else - from = '>=' + from; - - if (isX(tM)) - to = ''; - else if (isX(tm)) - to = '<' + (+tM + 1) + '.0.0-0'; - else if (isX(tp)) - to = '<' + tM + '.' + (+tm + 1) + '.0-0'; - else if (tpr) - to = '<=' + tM + '.' + tm + '.' + tp + '-' + tpr; - else - to = '<=' + to; - - return (from + ' ' + to).trim(); -} - - -// if ANY of the sets match ALL of its comparators, then pass -Range.prototype.test = function(version) { - if (!version) - return false; - for (var i = 0; i < this.set.length; i++) { - if (testSet(this.set[i], version)) - return true; - } - return false; -}; - -function testSet(set, version) { - for (var i = 0; i < set.length; i++) { - if (!set[i].test(version)) - return false; - } - return true; -} - -exports.satisfies = satisfies; -function satisfies(version, range, loose) { - try { - range = new Range(range, loose); - } catch (er) { - return false; - } - return range.test(version); -} - -exports.maxSatisfying = maxSatisfying; -function maxSatisfying(versions, range, loose) { - return versions.filter(function(version) { - return satisfies(version, range, loose); - }).sort(function(a, b) { - return rcompare(a, b, loose); - })[0] || null; -} - -exports.validRange = validRange; -function validRange(range, loose) { - try { - // Return '*' instead of '' so that truthiness works. - // This will throw if it's invalid anyway - return new Range(range, loose).range || '*'; - } catch (er) { - return null; - } -} - -// Determine if version is less than all the versions possible in the range -exports.ltr = ltr; -function ltr(version, range, loose) { - return outside(version, range, '<', loose); -} - -// Determine if version is greater than all the versions possible in the range. -exports.gtr = gtr; -function gtr(version, range, loose) { - return outside(version, range, '>', loose); -} - -exports.outside = outside; -function outside(version, range, hilo, loose) { - version = new SemVer(version, loose); - range = new Range(range, loose); - - var gtfn, ltefn, ltfn, comp, ecomp; - switch (hilo) { - case '>': - gtfn = gt; - ltefn = lte; - ltfn = lt; - comp = '>'; - ecomp = '>='; - break; - case '<': - gtfn = lt; - ltefn = gte; - ltfn = gt; - comp = '<'; - ecomp = '<='; - break; - default: - throw new TypeError('Must provide a hilo val of "<" or ">"'); - } - - // If it satisifes the range it is not outside - if (satisfies(version, range, loose)) { - return false; - } - - // From now on, variable terms are as if we're in "gtr" mode. - // but note that everything is flipped for the "ltr" function. - - for (var i = 0; i < range.set.length; ++i) { - var comparators = range.set[i]; - - var high = null; - var low = null; - - comparators.forEach(function(comparator) { - high = high || comparator; - low = low || comparator; - if (gtfn(comparator.semver, high.semver, loose)) { - high = comparator; - } else if (ltfn(comparator.semver, low.semver, loose)) { - low = comparator; - } - }); - - // If the edge version comparator has a operator then our version - // isn't outside it - if (high.operator === comp || high.operator === ecomp) { - return false; - } - - // If the lowest version comparator has an operator and our version - // is less than it then it isn't higher than the range - if ((!low.operator || low.operator === comp) && - ltefn(version, low.semver)) { - return false; - } else if (low.operator === ecomp && ltfn(version, low.semver)) { - return false; - } - } - return true; -} - -// Use the define() function if we're in AMD land -if (typeof define === 'function' && define.amd) - define(exports); diff --git a/node_modules/browserify-fs/node_modules/levelup/node_modules/semver/semver.min.js b/node_modules/browserify-fs/node_modules/levelup/node_modules/semver/semver.min.js deleted file mode 100644 index 22e32013..00000000 --- a/node_modules/browserify-fs/node_modules/levelup/node_modules/semver/semver.min.js +++ /dev/null @@ -1 +0,0 @@ -(function(e){if(typeof module==="object"&&module.exports===e)e=module.exports=H;e.SEMVER_SPEC_VERSION="2.0.0";var r=e.re=[];var t=e.src=[];var n=0;var i=n++;t[i]="0|[1-9]\\d*";var s=n++;t[s]="[0-9]+";var a=n++;t[a]="\\d*[a-zA-Z-][a-zA-Z0-9-]*";var o=n++;t[o]="("+t[i]+")\\."+"("+t[i]+")\\."+"("+t[i]+")";var f=n++;t[f]="("+t[s]+")\\."+"("+t[s]+")\\."+"("+t[s]+")";var u=n++;t[u]="(?:"+t[i]+"|"+t[a]+")";var c=n++;t[c]="(?:"+t[s]+"|"+t[a]+")";var l=n++;t[l]="(?:-("+t[u]+"(?:\\."+t[u]+")*))";var p=n++;t[p]="(?:-?("+t[c]+"(?:\\."+t[c]+")*))";var h=n++;t[h]="[0-9A-Za-z-]+";var v=n++;t[v]="(?:\\+("+t[h]+"(?:\\."+t[h]+")*))";var m=n++;var g="v?"+t[o]+t[l]+"?"+t[v]+"?";t[m]="^"+g+"$";var w="[v=\\s]*"+t[f]+t[p]+"?"+t[v]+"?";var d=n++;t[d]="^"+w+"$";var y=n++;t[y]="((?:<|>)?=?)";var b=n++;t[b]=t[s]+"|x|X|\\*";var $=n++;t[$]=t[i]+"|x|X|\\*";var j=n++;t[j]="[v=\\s]*("+t[$]+")"+"(?:\\.("+t[$]+")"+"(?:\\.("+t[$]+")"+"(?:("+t[l]+")"+")?)?)?";var k=n++;t[k]="[v=\\s]*("+t[b]+")"+"(?:\\.("+t[b]+")"+"(?:\\.("+t[b]+")"+"(?:("+t[p]+")"+")?)?)?";var E=n++;t[E]="^"+t[y]+"\\s*"+t[j]+"$";var x=n++;t[x]="^"+t[y]+"\\s*"+t[k]+"$";var R=n++;t[R]="(?:~>?)";var S=n++;t[S]="(\\s*)"+t[R]+"\\s+";r[S]=new RegExp(t[S],"g");var V="$1~";var I=n++;t[I]="^"+t[R]+t[j]+"$";var T=n++;t[T]="^"+t[R]+t[k]+"$";var A=n++;t[A]="(?:\\^)";var C=n++;t[C]="(\\s*)"+t[A]+"\\s+";r[C]=new RegExp(t[C],"g");var M="$1^";var z=n++;t[z]="^"+t[A]+t[j]+"$";var P=n++;t[P]="^"+t[A]+t[k]+"$";var Z=n++;t[Z]="^"+t[y]+"\\s*("+w+")$|^$";var q=n++;t[q]="^"+t[y]+"\\s*("+g+")$|^$";var L=n++;t[L]="(\\s*)"+t[y]+"\\s*("+w+"|"+t[j]+")";r[L]=new RegExp(t[L],"g");var X="$1$2$3";var _=n++;t[_]="^\\s*("+t[j]+")"+"\\s+-\\s+"+"("+t[j]+")"+"\\s*$";var N=n++;t[N]="^\\s*("+t[k]+")"+"\\s+-\\s+"+"("+t[k]+")"+"\\s*$";var O=n++;t[O]="(<|>)?=?\\s*\\*";for(var B=0;B'};H.prototype.toString=function(){return this.version};H.prototype.compare=function(e){if(!(e instanceof H))e=new H(e,this.loose);return this.compareMain(e)||this.comparePre(e)};H.prototype.compareMain=function(e){if(!(e instanceof H))e=new H(e,this.loose);return Q(this.major,e.major)||Q(this.minor,e.minor)||Q(this.patch,e.patch)};H.prototype.comparePre=function(e){if(!(e instanceof H))e=new H(e,this.loose);if(this.prerelease.length&&!e.prerelease.length)return-1;else if(!this.prerelease.length&&e.prerelease.length)return 1;else if(!this.prerelease.length&&!e.prerelease.length)return 0;var r=0;do{var t=this.prerelease[r];var n=e.prerelease[r];if(t===undefined&&n===undefined)return 0;else if(n===undefined)return 1;else if(t===undefined)return-1;else if(t===n)continue;else return Q(t,n)}while(++r)};H.prototype.inc=function(e){switch(e){case"premajor":this.inc("major");this.inc("pre");break;case"preminor":this.inc("minor");this.inc("pre");break;case"prepatch":this.prerelease.length=0;this.inc("patch");this.inc("pre");break;case"prerelease":if(this.prerelease.length===0)this.inc("patch");this.inc("pre");break;case"major":this.major++;this.minor=-1;case"minor":this.minor++;this.patch=0;this.prerelease=[];break;case"patch":if(this.prerelease.length===0)this.patch++;this.prerelease=[];break;case"pre":if(this.prerelease.length===0)this.prerelease=[0];else{var r=this.prerelease.length;while(--r>=0){if(typeof this.prerelease[r]==="number"){this.prerelease[r]++;r=-2}}if(r===-1)this.prerelease.push(0)}break;default:throw new Error("invalid increment argument: "+e)}this.format();return this};e.inc=J;function J(e,r,t){try{return new H(e,t).inc(r).version}catch(n){return null}}e.compareIdentifiers=Q;var K=/^[0-9]+$/;function Q(e,r){var t=K.test(e);var n=K.test(r);if(t&&n){e=+e;r=+r}return t&&!n?-1:n&&!t?1:er?1:0}e.rcompareIdentifiers=U;function U(e,r){return Q(r,e)}e.compare=W;function W(e,r,t){return new H(e,t).compare(r)}e.compareLoose=Y;function Y(e,r){return W(e,r,true)}e.rcompare=er;function er(e,r,t){return W(r,e,t)}e.sort=rr;function rr(r,t){return r.sort(function(r,n){return e.compare(r,n,t)})}e.rsort=tr;function tr(r,t){return r.sort(function(r,n){return e.rcompare(r,n,t)})}e.gt=nr;function nr(e,r,t){return W(e,r,t)>0}e.lt=ir;function ir(e,r,t){return W(e,r,t)<0}e.eq=sr;function sr(e,r,t){return W(e,r,t)===0}e.neq=ar;function ar(e,r,t){return W(e,r,t)!==0}e.gte=or;function or(e,r,t){return W(e,r,t)>=0}e.lte=fr;function fr(e,r,t){return W(e,r,t)<=0}e.cmp=ur;function ur(e,r,t,n){var i;switch(r){case"===":i=e===t;break;case"!==":i=e!==t;break;case"":case"=":case"==":i=sr(e,t,n);break;case"!=":i=ar(e,t,n);break;case">":i=nr(e,t,n);break;case">=":i=or(e,t,n);break;case"<":i=ir(e,t,n);break;case"<=":i=fr(e,t,n);break;default:throw new TypeError("Invalid operator: "+r)}return i}e.Comparator=cr;function cr(e,r){if(e instanceof cr){if(e.loose===r)return e;else e=e.value}if(!(this instanceof cr))return new cr(e,r);this.loose=r;this.parse(e);if(this.semver===lr)this.value="";else this.value=this.operator+this.semver.version}var lr={};cr.prototype.parse=function(e){var t=this.loose?r[Z]:r[q];var n=e.match(t);if(!n)throw new TypeError("Invalid comparator: "+e);this.operator=n[1];if(this.operator==="=")this.operator="";if(!n[2])this.semver=lr;else{this.semver=new H(n[2],this.loose);if(this.operator==="<"&&!this.semver.prerelease.length){this.semver.prerelease=["0"];this.semver.format()}}};cr.prototype.inspect=function(){return''};cr.prototype.toString=function(){return this.value};cr.prototype.test=function(e){return this.semver===lr?true:ur(e,this.operator,this.semver,this.loose)};e.Range=pr;function pr(e,r){if(e instanceof pr&&e.loose===r)return e;if(!(this instanceof pr))return new pr(e,r);this.loose=r;this.raw=e;this.set=e.split(/\s*\|\|\s*/).map(function(e){return this.parseRange(e.trim())},this).filter(function(e){return e.length});if(!this.set.length){throw new TypeError("Invalid SemVer Range: "+e)}this.format()}pr.prototype.inspect=function(){return''};pr.prototype.format=function(){this.range=this.set.map(function(e){return e.join(" ").trim()}).join("||").trim();return this.range};pr.prototype.toString=function(){return this.range};pr.prototype.parseRange=function(e){var t=this.loose;e=e.trim();var n=t?r[N]:r[_];e=e.replace(n,kr);e=e.replace(r[L],X);e=e.replace(r[S],V);e=e.replace(r[C],M);e=e.split(/\s+/).join(" ");var i=t?r[Z]:r[q];var s=e.split(" ").map(function(e){return vr(e,t)}).join(" ").split(/\s+/);if(this.loose){s=s.filter(function(e){return!!e.match(i)})}s=s.map(function(e){return new cr(e,t)});return s};e.toComparators=hr;function hr(e,r){return new pr(e,r).set.map(function(e){return e.map(function(e){return e.value}).join(" ").trim().split(" ")})}function vr(e,r){e=dr(e,r);e=gr(e,r);e=br(e,r);e=jr(e,r);return e}function mr(e){return!e||e.toLowerCase()==="x"||e==="*"}function gr(e,r){return e.trim().split(/\s+/).map(function(e){return wr(e,r)}).join(" ")}function wr(e,t){var n=t?r[T]:r[I];return e.replace(n,function(e,r,t,n,i){var s;if(mr(r))s="";else if(mr(t))s=">="+r+".0.0-0 <"+(+r+1)+".0.0-0";else if(mr(n))s=">="+r+"."+t+".0-0 <"+r+"."+(+t+1)+".0-0";else if(i){if(i.charAt(0)!=="-")i="-"+i;s=">="+r+"."+t+"."+n+i+" <"+r+"."+(+t+1)+".0-0"}else s=">="+r+"."+t+"."+n+"-0"+" <"+r+"."+(+t+1)+".0-0";return s})}function dr(e,r){return e.trim().split(/\s+/).map(function(e){return yr(e,r)}).join(" ")}function yr(e,t){var n=t?r[P]:r[z];return e.replace(n,function(e,r,t,n,i){var s;if(mr(r))s="";else if(mr(t))s=">="+r+".0.0-0 <"+(+r+1)+".0.0-0";else if(mr(n)){if(r==="0")s=">="+r+"."+t+".0-0 <"+r+"."+(+t+1)+".0-0";else s=">="+r+"."+t+".0-0 <"+(+r+1)+".0.0-0"}else if(i){if(i.charAt(0)!=="-")i="-"+i;if(r==="0"){if(t==="0")s="="+r+"."+t+"."+n+i;else s=">="+r+"."+t+"."+n+i+" <"+r+"."+(+t+1)+".0-0"}else s=">="+r+"."+t+"."+n+i+" <"+(+r+1)+".0.0-0"}else{if(r==="0"){if(t==="0")s="="+r+"."+t+"."+n;else s=">="+r+"."+t+"."+n+"-0"+" <"+r+"."+(+t+1)+".0-0"}else s=">="+r+"."+t+"."+n+"-0"+" <"+(+r+1)+".0.0-0"}return s})}function br(e,r){return e.split(/\s+/).map(function(e){return $r(e,r)}).join(" ")}function $r(e,t){e=e.trim();var n=t?r[x]:r[E];return e.replace(n,function(e,r,t,n,i,s){var a=mr(t);var o=a||mr(n);var f=o||mr(i);var u=f;if(r==="="&&u)r="";if(r&&u){if(a)t=0;if(o)n=0;if(f)i=0;if(r===">"){r=">=";if(a){}else if(o){t=+t+1;n=0;i=0}else if(f){n=+n+1;i=0}}e=r+t+"."+n+"."+i+"-0"}else if(a){e="*"}else if(o){e=">="+t+".0.0-0 <"+(+t+1)+".0.0-0"}else if(f){e=">="+t+"."+n+".0-0 <"+t+"."+(+n+1)+".0-0"}return e})}function jr(e,t){return e.trim().replace(r[O],"")}function kr(e,r,t,n,i,s,a,o,f,u,c,l,p){if(mr(t))r="";else if(mr(n))r=">="+t+".0.0-0";else if(mr(i))r=">="+t+"."+n+".0-0";else r=">="+r;if(mr(f))o="";else if(mr(u))o="<"+(+f+1)+".0.0-0";else if(mr(c))o="<"+f+"."+(+u+1)+".0-0";else if(l)o="<="+f+"."+u+"."+c+"-"+l;else o="<="+o;return(r+" "+o).trim()}pr.prototype.test=function(e){if(!e)return false;for(var r=0;r",t)}e.outside=Tr;function Tr(e,r,t,n){e=new H(e,n);r=new pr(r,n);var i,s,a,o,f;switch(t){case">":i=nr;s=fr;a=ir;o=">";f=">=";break;case"<":i=ir;s=or;a=nr;o="<";f="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(xr(e,r,n)){return false}for(var u=0;u=2.4.0 <2.5.0 - ['~2.4', '2.5.5'], - ['~>3.2.1', '3.3.0'], // >=3.2.1 <3.3.0 - ['~1', '2.2.3'], // >=1.0.0 <2.0.0 - ['~>1', '2.2.4'], - ['~> 1', '3.2.3'], - ['~1.0', '1.1.2'], // >=1.0.0 <1.1.0 - ['~ 1.0', '1.1.0'], - ['<1.2', '1.2.0'], - ['< 1.2', '1.2.1'], - ['1', '2.0.0beta', true], - ['~v0.5.4-pre', '0.6.0'], - ['~v0.5.4-pre', '0.6.1-pre'], - ['=0.7.x', '0.8.0'], - ['=0.7.x', '0.8.0-asdf'], - ['<=0.7.x', '0.7.0'], - ['~1.2.2', '1.3.0'], - ['1.0.0 - 2.0.0', '2.2.3'], - ['1.0.0', '1.0.1'], - ['<=2.0.0', '3.0.0'], - ['<=2.0.0', '2.9999.9999'], - ['<=2.0.0', '2.2.9'], - ['<2.0.0', '2.9999.9999'], - ['<2.0.0', '2.2.9'], - ['2.x.x', '3.1.3'], - ['1.2.x', '1.3.3'], - ['1.2.x || 2.x', '3.1.3'], - ['2.*.*', '3.1.3'], - ['1.2.*', '1.3.3'], - ['1.2.* || 2.*', '3.1.3'], - ['2', '3.1.2'], - ['2.3', '2.4.1'], - ['~2.4', '2.5.0'], // >=2.4.0 <2.5.0 - ['~>3.2.1', '3.3.2'], // >=3.2.1 <3.3.0 - ['~1', '2.2.3'], // >=1.0.0 <2.0.0 - ['~>1', '2.2.3'], - ['~1.0', '1.1.0'], // >=1.0.0 <1.1.0 - ['<1', '1.0.0'], - ['1', '2.0.0beta', true], - ['<1', '1.0.0beta', true], - ['< 1', '1.0.0beta', true], - ['=0.7.x', '0.8.2'], - ['<=0.7.x', '0.7.2'] - ].forEach(function(tuple) { - var range = tuple[0]; - var version = tuple[1]; - var loose = tuple[2] || false; - var msg = 'gtr(' + version + ', ' + range + ', ' + loose + ')'; - t.ok(gtr(version, range, loose), msg); - }); - t.end(); -}); - -test('\nnegative gtr tests', function(t) { - // [range, version, loose] - // Version should NOT be greater than range - [ - ['~0.6.1-1', '0.6.1-1'], - ['1.0.0 - 2.0.0', '1.2.3'], - ['1.0.0 - 2.0.0', '0.9.9'], - ['1.0.0', '1.0.0'], - ['>=*', '0.2.4'], - ['', '1.0.0', true], - ['*', '1.2.3'], - ['*', 'v1.2.3-foo'], - ['>=1.0.0', '1.0.0'], - ['>=1.0.0', '1.0.1'], - ['>=1.0.0', '1.1.0'], - ['>1.0.0', '1.0.1'], - ['>1.0.0', '1.1.0'], - ['<=2.0.0', '2.0.0'], - ['<=2.0.0', '1.9999.9999'], - ['<=2.0.0', '0.2.9'], - ['<2.0.0', '1.9999.9999'], - ['<2.0.0', '0.2.9'], - ['>= 1.0.0', '1.0.0'], - ['>= 1.0.0', '1.0.1'], - ['>= 1.0.0', '1.1.0'], - ['> 1.0.0', '1.0.1'], - ['> 1.0.0', '1.1.0'], - ['<= 2.0.0', '2.0.0'], - ['<= 2.0.0', '1.9999.9999'], - ['<= 2.0.0', '0.2.9'], - ['< 2.0.0', '1.9999.9999'], - ['<\t2.0.0', '0.2.9'], - ['>=0.1.97', 'v0.1.97'], - ['>=0.1.97', '0.1.97'], - ['0.1.20 || 1.2.4', '1.2.4'], - ['0.1.20 || >1.2.4', '1.2.4'], - ['0.1.20 || 1.2.4', '1.2.3'], - ['0.1.20 || 1.2.4', '0.1.20'], - ['>=0.2.3 || <0.0.1', '0.0.0'], - ['>=0.2.3 || <0.0.1', '0.2.3'], - ['>=0.2.3 || <0.0.1', '0.2.4'], - ['||', '1.3.4'], - ['2.x.x', '2.1.3'], - ['1.2.x', '1.2.3'], - ['1.2.x || 2.x', '2.1.3'], - ['1.2.x || 2.x', '1.2.3'], - ['x', '1.2.3'], - ['2.*.*', '2.1.3'], - ['1.2.*', '1.2.3'], - ['1.2.* || 2.*', '2.1.3'], - ['1.2.* || 2.*', '1.2.3'], - ['1.2.* || 2.*', '1.2.3'], - ['*', '1.2.3'], - ['2', '2.1.2'], - ['2.3', '2.3.1'], - ['~2.4', '2.4.0'], // >=2.4.0 <2.5.0 - ['~2.4', '2.4.5'], - ['~>3.2.1', '3.2.2'], // >=3.2.1 <3.3.0 - ['~1', '1.2.3'], // >=1.0.0 <2.0.0 - ['~>1', '1.2.3'], - ['~> 1', '1.2.3'], - ['~1.0', '1.0.2'], // >=1.0.0 <1.1.0 - ['~ 1.0', '1.0.2'], - ['>=1', '1.0.0'], - ['>= 1', '1.0.0'], - ['<1.2', '1.1.1'], - ['< 1.2', '1.1.1'], - ['1', '1.0.0beta', true], - ['~v0.5.4-pre', '0.5.5'], - ['~v0.5.4-pre', '0.5.4'], - ['=0.7.x', '0.7.2'], - ['>=0.7.x', '0.7.2'], - ['=0.7.x', '0.7.0-asdf'], - ['>=0.7.x', '0.7.0-asdf'], - ['<=0.7.x', '0.6.2'], - ['>0.2.3 >0.2.4 <=0.2.5', '0.2.5'], - ['>=0.2.3 <=0.2.4', '0.2.4'], - ['1.0.0 - 2.0.0', '2.0.0'], - ['^1', '0.0.0-0'], - ['^3.0.0', '2.0.0'], - ['^1.0.0 || ~2.0.1', '2.0.0'], - ['^0.1.0 || ~3.0.1 || 5.0.0', '3.2.0'], - ['^0.1.0 || ~3.0.1 || 5.0.0', '1.0.0beta', true], - ['^0.1.0 || ~3.0.1 || 5.0.0', '5.0.0-0', true], - ['^0.1.0 || ~3.0.1 || >4 <=5.0.0', '3.5.0'] - ].forEach(function(tuple) { - var range = tuple[0]; - var version = tuple[1]; - var loose = tuple[2] || false; - var msg = '!gtr(' + version + ', ' + range + ', ' + loose + ')'; - t.notOk(gtr(version, range, loose), msg); - }); - t.end(); -}); diff --git a/node_modules/browserify-fs/node_modules/levelup/node_modules/semver/test/index.js b/node_modules/browserify-fs/node_modules/levelup/node_modules/semver/test/index.js deleted file mode 100644 index 2d15ed3f..00000000 --- a/node_modules/browserify-fs/node_modules/levelup/node_modules/semver/test/index.js +++ /dev/null @@ -1,588 +0,0 @@ -'use strict'; - -var tap = require('tap'); -var test = tap.test; -var semver = require('../semver.js'); -var eq = semver.eq; -var gt = semver.gt; -var lt = semver.lt; -var neq = semver.neq; -var cmp = semver.cmp; -var gte = semver.gte; -var lte = semver.lte; -var satisfies = semver.satisfies; -var validRange = semver.validRange; -var inc = semver.inc; -var replaceStars = semver.replaceStars; -var toComparators = semver.toComparators; -var SemVer = semver.SemVer; -var Range = semver.Range; - -test('\ncomparison tests', function(t) { - // [version1, version2] - // version1 should be greater than version2 - [['0.0.0', '0.0.0-foo'], - ['0.0.1', '0.0.0'], - ['1.0.0', '0.9.9'], - ['0.10.0', '0.9.0'], - ['0.99.0', '0.10.0'], - ['2.0.0', '1.2.3'], - ['v0.0.0', '0.0.0-foo', true], - ['v0.0.1', '0.0.0', true], - ['v1.0.0', '0.9.9', true], - ['v0.10.0', '0.9.0', true], - ['v0.99.0', '0.10.0', true], - ['v2.0.0', '1.2.3', true], - ['0.0.0', 'v0.0.0-foo', true], - ['0.0.1', 'v0.0.0', true], - ['1.0.0', 'v0.9.9', true], - ['0.10.0', 'v0.9.0', true], - ['0.99.0', 'v0.10.0', true], - ['2.0.0', 'v1.2.3', true], - ['1.2.3', '1.2.3-asdf'], - ['1.2.3', '1.2.3-4'], - ['1.2.3', '1.2.3-4-foo'], - ['1.2.3-5-foo', '1.2.3-5'], - ['1.2.3-5', '1.2.3-4'], - ['1.2.3-5-foo', '1.2.3-5-Foo'], - ['3.0.0', '2.7.2+asdf'], - ['1.2.3-a.10', '1.2.3-a.5'], - ['1.2.3-a.b', '1.2.3-a.5'], - ['1.2.3-a.b', '1.2.3-a'], - ['1.2.3-a.b.c.10.d.5', '1.2.3-a.b.c.5.d.100'] - ].forEach(function(v) { - var v0 = v[0]; - var v1 = v[1]; - var loose = v[2]; - t.ok(gt(v0, v1, loose), "gt('" + v0 + "', '" + v1 + "')"); - t.ok(lt(v1, v0, loose), "lt('" + v1 + "', '" + v0 + "')"); - t.ok(!gt(v1, v0, loose), "!gt('" + v1 + "', '" + v0 + "')"); - t.ok(!lt(v0, v1, loose), "!lt('" + v0 + "', '" + v1 + "')"); - t.ok(eq(v0, v0, loose), "eq('" + v0 + "', '" + v0 + "')"); - t.ok(eq(v1, v1, loose), "eq('" + v1 + "', '" + v1 + "')"); - t.ok(neq(v0, v1, loose), "neq('" + v0 + "', '" + v1 + "')"); - t.ok(cmp(v1, '==', v1, loose), "cmp('" + v1 + "' == '" + v1 + "')"); - t.ok(cmp(v0, '>=', v1, loose), "cmp('" + v0 + "' >= '" + v1 + "')"); - t.ok(cmp(v1, '<=', v0, loose), "cmp('" + v1 + "' <= '" + v0 + "')"); - t.ok(cmp(v0, '!=', v1, loose), "cmp('" + v0 + "' != '" + v1 + "')"); - }); - t.end(); -}); - -test('\nequality tests', function(t) { - // [version1, version2] - // version1 should be equivalent to version2 - [['1.2.3', 'v1.2.3', true], - ['1.2.3', '=1.2.3', true], - ['1.2.3', 'v 1.2.3', true], - ['1.2.3', '= 1.2.3', true], - ['1.2.3', ' v1.2.3', true], - ['1.2.3', ' =1.2.3', true], - ['1.2.3', ' v 1.2.3', true], - ['1.2.3', ' = 1.2.3', true], - ['1.2.3-0', 'v1.2.3-0', true], - ['1.2.3-0', '=1.2.3-0', true], - ['1.2.3-0', 'v 1.2.3-0', true], - ['1.2.3-0', '= 1.2.3-0', true], - ['1.2.3-0', ' v1.2.3-0', true], - ['1.2.3-0', ' =1.2.3-0', true], - ['1.2.3-0', ' v 1.2.3-0', true], - ['1.2.3-0', ' = 1.2.3-0', true], - ['1.2.3-1', 'v1.2.3-1', true], - ['1.2.3-1', '=1.2.3-1', true], - ['1.2.3-1', 'v 1.2.3-1', true], - ['1.2.3-1', '= 1.2.3-1', true], - ['1.2.3-1', ' v1.2.3-1', true], - ['1.2.3-1', ' =1.2.3-1', true], - ['1.2.3-1', ' v 1.2.3-1', true], - ['1.2.3-1', ' = 1.2.3-1', true], - ['1.2.3-beta', 'v1.2.3-beta', true], - ['1.2.3-beta', '=1.2.3-beta', true], - ['1.2.3-beta', 'v 1.2.3-beta', true], - ['1.2.3-beta', '= 1.2.3-beta', true], - ['1.2.3-beta', ' v1.2.3-beta', true], - ['1.2.3-beta', ' =1.2.3-beta', true], - ['1.2.3-beta', ' v 1.2.3-beta', true], - ['1.2.3-beta', ' = 1.2.3-beta', true], - ['1.2.3-beta+build', ' = 1.2.3-beta+otherbuild', true], - ['1.2.3+build', ' = 1.2.3+otherbuild', true], - ['1.2.3-beta+build', '1.2.3-beta+otherbuild'], - ['1.2.3+build', '1.2.3+otherbuild'], - [' v1.2.3+build', '1.2.3+otherbuild'] - ].forEach(function(v) { - var v0 = v[0]; - var v1 = v[1]; - var loose = v[2]; - t.ok(eq(v0, v1, loose), "eq('" + v0 + "', '" + v1 + "')"); - t.ok(!neq(v0, v1, loose), "!neq('" + v0 + "', '" + v1 + "')"); - t.ok(cmp(v0, '==', v1, loose), 'cmp(' + v0 + '==' + v1 + ')'); - t.ok(!cmp(v0, '!=', v1, loose), '!cmp(' + v0 + '!=' + v1 + ')'); - t.ok(!cmp(v0, '===', v1, loose), '!cmp(' + v0 + '===' + v1 + ')'); - t.ok(cmp(v0, '!==', v1, loose), 'cmp(' + v0 + '!==' + v1 + ')'); - t.ok(!gt(v0, v1, loose), "!gt('" + v0 + "', '" + v1 + "')"); - t.ok(gte(v0, v1, loose), "gte('" + v0 + "', '" + v1 + "')"); - t.ok(!lt(v0, v1, loose), "!lt('" + v0 + "', '" + v1 + "')"); - t.ok(lte(v0, v1, loose), "lte('" + v0 + "', '" + v1 + "')"); - }); - t.end(); -}); - - -test('\nrange tests', function(t) { - // [range, version] - // version should be included by range - [['1.0.0 - 2.0.0', '1.2.3'], - ['1.0.0', '1.0.0'], - ['>=*', '0.2.4'], - ['', '1.0.0'], - ['*', '1.2.3'], - ['*', 'v1.2.3-foo', true], - ['>=1.0.0', '1.0.0'], - ['>=1.0.0', '1.0.1'], - ['>=1.0.0', '1.1.0'], - ['>1.0.0', '1.0.1'], - ['>1.0.0', '1.1.0'], - ['<=2.0.0', '2.0.0'], - ['<=2.0.0', '1.9999.9999'], - ['<=2.0.0', '0.2.9'], - ['<2.0.0', '1.9999.9999'], - ['<2.0.0', '0.2.9'], - ['>= 1.0.0', '1.0.0'], - ['>= 1.0.0', '1.0.1'], - ['>= 1.0.0', '1.1.0'], - ['> 1.0.0', '1.0.1'], - ['> 1.0.0', '1.1.0'], - ['<= 2.0.0', '2.0.0'], - ['<= 2.0.0', '1.9999.9999'], - ['<= 2.0.0', '0.2.9'], - ['< 2.0.0', '1.9999.9999'], - ['<\t2.0.0', '0.2.9'], - ['>=0.1.97', 'v0.1.97', true], - ['>=0.1.97', '0.1.97'], - ['0.1.20 || 1.2.4', '1.2.4'], - ['>=0.2.3 || <0.0.1', '0.0.0'], - ['>=0.2.3 || <0.0.1', '0.2.3'], - ['>=0.2.3 || <0.0.1', '0.2.4'], - ['||', '1.3.4'], - ['2.x.x', '2.1.3'], - ['1.2.x', '1.2.3'], - ['1.2.x || 2.x', '2.1.3'], - ['1.2.x || 2.x', '1.2.3'], - ['x', '1.2.3'], - ['2.*.*', '2.1.3'], - ['1.2.*', '1.2.3'], - ['1.2.* || 2.*', '2.1.3'], - ['1.2.* || 2.*', '1.2.3'], - ['*', '1.2.3'], - ['2', '2.1.2'], - ['2.3', '2.3.1'], - ['~2.4', '2.4.0'], // >=2.4.0 <2.5.0 - ['~2.4', '2.4.5'], - ['~>3.2.1', '3.2.2'], // >=3.2.1 <3.3.0, - ['~1', '1.2.3'], // >=1.0.0 <2.0.0 - ['~>1', '1.2.3'], - ['~> 1', '1.2.3'], - ['~1.0', '1.0.2'], // >=1.0.0 <1.1.0, - ['~ 1.0', '1.0.2'], - ['~ 1.0.3', '1.0.12'], - ['>=1', '1.0.0'], - ['>= 1', '1.0.0'], - ['<1.2', '1.1.1'], - ['< 1.2', '1.1.1'], - ['1', '1.0.0beta', true], - ['~v0.5.4-pre', '0.5.5'], - ['~v0.5.4-pre', '0.5.4'], - ['=0.7.x', '0.7.2'], - ['>=0.7.x', '0.7.2'], - ['=0.7.x', '0.7.0-asdf'], - ['>=0.7.x', '0.7.0-asdf'], - ['<=0.7.x', '0.6.2'], - ['~1.2.1 >=1.2.3', '1.2.3'], - ['~1.2.1 =1.2.3', '1.2.3'], - ['~1.2.1 1.2.3', '1.2.3'], - ['~1.2.1 >=1.2.3 1.2.3', '1.2.3'], - ['~1.2.1 1.2.3 >=1.2.3', '1.2.3'], - ['~1.2.1 1.2.3', '1.2.3'], - ['>=1.2.1 1.2.3', '1.2.3'], - ['1.2.3 >=1.2.1', '1.2.3'], - ['>=1.2.3 >=1.2.1', '1.2.3'], - ['>=1.2.1 >=1.2.3', '1.2.3'], - ['<=1.2.3', '1.2.3-beta'], - ['>1.2', '1.3.0-beta'], - ['>=1.2', '1.2.8'], - ['^1.2.3', '1.8.1'], - ['^1.2.3', '1.2.3-beta'], - ['^0.1.2', '0.1.2'], - ['^0.1', '0.1.2'], - ['^1.2', '1.4.2'], - ['^1.2 ^1', '1.4.2'], - ['^1.2', '1.2.0-pre'], - ['^1.2.3', '1.2.3-pre'] - ].forEach(function(v) { - var range = v[0]; - var ver = v[1]; - var loose = v[2]; - t.ok(satisfies(ver, range, loose), range + ' satisfied by ' + ver); - }); - t.end(); -}); - -test('\nnegative range tests', function(t) { - // [range, version] - // version should not be included by range - [['1.0.0 - 2.0.0', '2.2.3'], - ['1.0.0', '1.0.1'], - ['>=1.0.0', '0.0.0'], - ['>=1.0.0', '0.0.1'], - ['>=1.0.0', '0.1.0'], - ['>1.0.0', '0.0.1'], - ['>1.0.0', '0.1.0'], - ['<=2.0.0', '3.0.0'], - ['<=2.0.0', '2.9999.9999'], - ['<=2.0.0', '2.2.9'], - ['<2.0.0', '2.9999.9999'], - ['<2.0.0', '2.2.9'], - ['>=0.1.97', 'v0.1.93', true], - ['>=0.1.97', '0.1.93'], - ['0.1.20 || 1.2.4', '1.2.3'], - ['>=0.2.3 || <0.0.1', '0.0.3'], - ['>=0.2.3 || <0.0.1', '0.2.2'], - ['2.x.x', '1.1.3'], - ['2.x.x', '3.1.3'], - ['1.2.x', '1.3.3'], - ['1.2.x || 2.x', '3.1.3'], - ['1.2.x || 2.x', '1.1.3'], - ['2.*.*', '1.1.3'], - ['2.*.*', '3.1.3'], - ['1.2.*', '1.3.3'], - ['1.2.* || 2.*', '3.1.3'], - ['1.2.* || 2.*', '1.1.3'], - ['2', '1.1.2'], - ['2.3', '2.4.1'], - ['~2.4', '2.5.0'], // >=2.4.0 <2.5.0 - ['~2.4', '2.3.9'], - ['~>3.2.1', '3.3.2'], // >=3.2.1 <3.3.0 - ['~>3.2.1', '3.2.0'], // >=3.2.1 <3.3.0 - ['~1', '0.2.3'], // >=1.0.0 <2.0.0 - ['~>1', '2.2.3'], - ['~1.0', '1.1.0'], // >=1.0.0 <1.1.0 - ['<1', '1.0.0'], - ['>=1.2', '1.1.1'], - ['1', '2.0.0beta', true], - ['~v0.5.4-beta', '0.5.4-alpha'], - ['<1', '1.0.0beta', true], - ['< 1', '1.0.0beta', true], - ['=0.7.x', '0.8.2'], - ['>=0.7.x', '0.6.2'], - ['<=0.7.x', '0.7.2'], - ['<1.2.3', '1.2.3-beta'], - ['=1.2.3', '1.2.3-beta'], - ['>1.2', '1.2.8'], - ['^1.2.3', '2.0.0-alpha'], - ['^1.2.3', '1.2.2'], - ['^1.2', '1.1.9'], - // invalid ranges never satisfied! - ['blerg', '1.2.3'], - ['git+https://user:password0123@github.com/foo', '123.0.0', true], - ['^1.2.3', '2.0.0-pre'] - ].forEach(function(v) { - var range = v[0]; - var ver = v[1]; - var loose = v[2]; - var found = satisfies(ver, range, loose); - t.ok(!found, ver + ' not satisfied by ' + range); - }); - t.end(); -}); - -test('\nincrement versions test', function(t) { - // [version, inc, result] - // inc(version, inc) -> result - [['1.2.3', 'major', '2.0.0'], - ['1.2.3', 'minor', '1.3.0'], - ['1.2.3', 'patch', '1.2.4'], - ['1.2.3tag', 'major', '2.0.0', true], - ['1.2.3-tag', 'major', '2.0.0'], - ['1.2.3', 'fake', null], - ['1.2.0-0', 'patch', '1.2.0'], - ['fake', 'major', null], - ['1.2.3-4', 'major', '2.0.0'], - ['1.2.3-4', 'minor', '1.3.0'], - ['1.2.3-4', 'patch', '1.2.3'], - ['1.2.3-alpha.0.beta', 'major', '2.0.0'], - ['1.2.3-alpha.0.beta', 'minor', '1.3.0'], - ['1.2.3-alpha.0.beta', 'patch', '1.2.3'], - ['1.2.4', 'prerelease', '1.2.5-0'], - ['1.2.3-0', 'prerelease', '1.2.3-1'], - ['1.2.3-alpha.0', 'prerelease', '1.2.3-alpha.1'], - ['1.2.3-alpha.1', 'prerelease', '1.2.3-alpha.2'], - ['1.2.3-alpha.2', 'prerelease', '1.2.3-alpha.3'], - ['1.2.3-alpha.0.beta', 'prerelease', '1.2.3-alpha.1.beta'], - ['1.2.3-alpha.1.beta', 'prerelease', '1.2.3-alpha.2.beta'], - ['1.2.3-alpha.2.beta', 'prerelease', '1.2.3-alpha.3.beta'], - ['1.2.3-alpha.10.0.beta', 'prerelease', '1.2.3-alpha.10.1.beta'], - ['1.2.3-alpha.10.1.beta', 'prerelease', '1.2.3-alpha.10.2.beta'], - ['1.2.3-alpha.10.2.beta', 'prerelease', '1.2.3-alpha.10.3.beta'], - ['1.2.3-alpha.10.beta.0', 'prerelease', '1.2.3-alpha.10.beta.1'], - ['1.2.3-alpha.10.beta.1', 'prerelease', '1.2.3-alpha.10.beta.2'], - ['1.2.3-alpha.10.beta.2', 'prerelease', '1.2.3-alpha.10.beta.3'], - ['1.2.3-alpha.9.beta', 'prerelease', '1.2.3-alpha.10.beta'], - ['1.2.3-alpha.10.beta', 'prerelease', '1.2.3-alpha.11.beta'], - ['1.2.3-alpha.11.beta', 'prerelease', '1.2.3-alpha.12.beta'], - ['1.2.0', 'prepatch', '1.2.1-0'], - ['1.2.0-1', 'prepatch', '1.2.1-0'], - ['1.2.0', 'preminor', '1.3.0-0'], - ['1.2.0-1', 'preminor', '1.3.0-0'], - ['1.2.0', 'premajor', '2.0.0-0'], - ['1.2.0-1', 'premajor', '2.0.0-0'] - - - ].forEach(function(v) { - var pre = v[0]; - var what = v[1]; - var wanted = v[2]; - var loose = v[3]; - var found = inc(pre, what, loose); - t.equal(found, wanted, 'inc(' + pre + ', ' + what + ') === ' + wanted); - }); - - t.end(); -}); - -test('\nvalid range test', function(t) { - // [range, result] - // validRange(range) -> result - // translate ranges into their canonical form - [['1.0.0 - 2.0.0', '>=1.0.0 <=2.0.0'], - ['1.0.0', '1.0.0'], - ['>=*', '>=0.0.0-0'], - ['', '*'], - ['*', '*'], - ['*', '*'], - ['>=1.0.0', '>=1.0.0'], - ['>1.0.0', '>1.0.0'], - ['<=2.0.0', '<=2.0.0'], - ['1', '>=1.0.0-0 <2.0.0-0'], - ['<=2.0.0', '<=2.0.0'], - ['<=2.0.0', '<=2.0.0'], - ['<2.0.0', '<2.0.0-0'], - ['<2.0.0', '<2.0.0-0'], - ['>= 1.0.0', '>=1.0.0'], - ['>= 1.0.0', '>=1.0.0'], - ['>= 1.0.0', '>=1.0.0'], - ['> 1.0.0', '>1.0.0'], - ['> 1.0.0', '>1.0.0'], - ['<= 2.0.0', '<=2.0.0'], - ['<= 2.0.0', '<=2.0.0'], - ['<= 2.0.0', '<=2.0.0'], - ['< 2.0.0', '<2.0.0-0'], - ['< 2.0.0', '<2.0.0-0'], - ['>=0.1.97', '>=0.1.97'], - ['>=0.1.97', '>=0.1.97'], - ['0.1.20 || 1.2.4', '0.1.20||1.2.4'], - ['>=0.2.3 || <0.0.1', '>=0.2.3||<0.0.1-0'], - ['>=0.2.3 || <0.0.1', '>=0.2.3||<0.0.1-0'], - ['>=0.2.3 || <0.0.1', '>=0.2.3||<0.0.1-0'], - ['||', '||'], - ['2.x.x', '>=2.0.0-0 <3.0.0-0'], - ['1.2.x', '>=1.2.0-0 <1.3.0-0'], - ['1.2.x || 2.x', '>=1.2.0-0 <1.3.0-0||>=2.0.0-0 <3.0.0-0'], - ['1.2.x || 2.x', '>=1.2.0-0 <1.3.0-0||>=2.0.0-0 <3.0.0-0'], - ['x', '*'], - ['2.*.*', '>=2.0.0-0 <3.0.0-0'], - ['1.2.*', '>=1.2.0-0 <1.3.0-0'], - ['1.2.* || 2.*', '>=1.2.0-0 <1.3.0-0||>=2.0.0-0 <3.0.0-0'], - ['*', '*'], - ['2', '>=2.0.0-0 <3.0.0-0'], - ['2.3', '>=2.3.0-0 <2.4.0-0'], - ['~2.4', '>=2.4.0-0 <2.5.0-0'], - ['~2.4', '>=2.4.0-0 <2.5.0-0'], - ['~>3.2.1', '>=3.2.1-0 <3.3.0-0'], - ['~1', '>=1.0.0-0 <2.0.0-0'], - ['~>1', '>=1.0.0-0 <2.0.0-0'], - ['~> 1', '>=1.0.0-0 <2.0.0-0'], - ['~1.0', '>=1.0.0-0 <1.1.0-0'], - ['~ 1.0', '>=1.0.0-0 <1.1.0-0'], - ['^0', '>=0.0.0-0 <1.0.0-0'], - ['^ 1', '>=1.0.0-0 <2.0.0-0'], - ['^0.1', '>=0.1.0-0 <0.2.0-0'], - ['^1.0', '>=1.0.0-0 <2.0.0-0'], - ['^1.2', '>=1.2.0-0 <2.0.0-0'], - ['^0.0.1', '0.0.1'], - ['^0.0.1-beta', '0.0.1-beta'], - ['^0.1.2', '>=0.1.2-0 <0.2.0-0'], - ['^1.2.3', '>=1.2.3-0 <2.0.0-0'], - ['^1.2.3-beta.4', '>=1.2.3-beta.4 <2.0.0-0'], - ['<1', '<1.0.0-0'], - ['< 1', '<1.0.0-0'], - ['>=1', '>=1.0.0-0'], - ['>= 1', '>=1.0.0-0'], - ['<1.2', '<1.2.0-0'], - ['< 1.2', '<1.2.0-0'], - ['1', '>=1.0.0-0 <2.0.0-0'], - ['>01.02.03', '>1.2.3', true], - ['>01.02.03', null], - ['~1.2.3beta', '>=1.2.3-beta <1.3.0-0', true], - ['~1.2.3beta', null], - ['^ 1.2 ^ 1', '>=1.2.0-0 <2.0.0-0 >=1.0.0-0 <2.0.0-0'] - ].forEach(function(v) { - var pre = v[0]; - var wanted = v[1]; - var loose = v[2]; - var found = validRange(pre, loose); - - t.equal(found, wanted, 'validRange(' + pre + ') === ' + wanted); - }); - - t.end(); -}); - -test('\ncomparators test', function(t) { - // [range, comparators] - // turn range into a set of individual comparators - [['1.0.0 - 2.0.0', [['>=1.0.0', '<=2.0.0']]], - ['1.0.0', [['1.0.0']]], - ['>=*', [['>=0.0.0-0']]], - ['', [['']]], - ['*', [['']]], - ['*', [['']]], - ['>=1.0.0', [['>=1.0.0']]], - ['>=1.0.0', [['>=1.0.0']]], - ['>=1.0.0', [['>=1.0.0']]], - ['>1.0.0', [['>1.0.0']]], - ['>1.0.0', [['>1.0.0']]], - ['<=2.0.0', [['<=2.0.0']]], - ['1', [['>=1.0.0-0', '<2.0.0-0']]], - ['<=2.0.0', [['<=2.0.0']]], - ['<=2.0.0', [['<=2.0.0']]], - ['<2.0.0', [['<2.0.0-0']]], - ['<2.0.0', [['<2.0.0-0']]], - ['>= 1.0.0', [['>=1.0.0']]], - ['>= 1.0.0', [['>=1.0.0']]], - ['>= 1.0.0', [['>=1.0.0']]], - ['> 1.0.0', [['>1.0.0']]], - ['> 1.0.0', [['>1.0.0']]], - ['<= 2.0.0', [['<=2.0.0']]], - ['<= 2.0.0', [['<=2.0.0']]], - ['<= 2.0.0', [['<=2.0.0']]], - ['< 2.0.0', [['<2.0.0-0']]], - ['<\t2.0.0', [['<2.0.0-0']]], - ['>=0.1.97', [['>=0.1.97']]], - ['>=0.1.97', [['>=0.1.97']]], - ['0.1.20 || 1.2.4', [['0.1.20'], ['1.2.4']]], - ['>=0.2.3 || <0.0.1', [['>=0.2.3'], ['<0.0.1-0']]], - ['>=0.2.3 || <0.0.1', [['>=0.2.3'], ['<0.0.1-0']]], - ['>=0.2.3 || <0.0.1', [['>=0.2.3'], ['<0.0.1-0']]], - ['||', [[''], ['']]], - ['2.x.x', [['>=2.0.0-0', '<3.0.0-0']]], - ['1.2.x', [['>=1.2.0-0', '<1.3.0-0']]], - ['1.2.x || 2.x', [['>=1.2.0-0', '<1.3.0-0'], ['>=2.0.0-0', '<3.0.0-0']]], - ['1.2.x || 2.x', [['>=1.2.0-0', '<1.3.0-0'], ['>=2.0.0-0', '<3.0.0-0']]], - ['x', [['']]], - ['2.*.*', [['>=2.0.0-0', '<3.0.0-0']]], - ['1.2.*', [['>=1.2.0-0', '<1.3.0-0']]], - ['1.2.* || 2.*', [['>=1.2.0-0', '<1.3.0-0'], ['>=2.0.0-0', '<3.0.0-0']]], - ['1.2.* || 2.*', [['>=1.2.0-0', '<1.3.0-0'], ['>=2.0.0-0', '<3.0.0-0']]], - ['*', [['']]], - ['2', [['>=2.0.0-0', '<3.0.0-0']]], - ['2.3', [['>=2.3.0-0', '<2.4.0-0']]], - ['~2.4', [['>=2.4.0-0', '<2.5.0-0']]], - ['~2.4', [['>=2.4.0-0', '<2.5.0-0']]], - ['~>3.2.1', [['>=3.2.1-0', '<3.3.0-0']]], - ['~1', [['>=1.0.0-0', '<2.0.0-0']]], - ['~>1', [['>=1.0.0-0', '<2.0.0-0']]], - ['~> 1', [['>=1.0.0-0', '<2.0.0-0']]], - ['~1.0', [['>=1.0.0-0', '<1.1.0-0']]], - ['~ 1.0', [['>=1.0.0-0', '<1.1.0-0']]], - ['~ 1.0.3', [['>=1.0.3-0', '<1.1.0-0']]], - ['~> 1.0.3', [['>=1.0.3-0', '<1.1.0-0']]], - ['<1', [['<1.0.0-0']]], - ['< 1', [['<1.0.0-0']]], - ['>=1', [['>=1.0.0-0']]], - ['>= 1', [['>=1.0.0-0']]], - ['<1.2', [['<1.2.0-0']]], - ['< 1.2', [['<1.2.0-0']]], - ['1', [['>=1.0.0-0', '<2.0.0-0']]], - ['1 2', [['>=1.0.0-0', '<2.0.0-0', '>=2.0.0-0', '<3.0.0-0']]], - ['1.2 - 3.4.5', [['>=1.2.0-0', '<=3.4.5']]], - ['1.2.3 - 3.4', [['>=1.2.3', '<3.5.0-0']]] - ].forEach(function(v) { - var pre = v[0]; - var wanted = v[1]; - var found = toComparators(v[0]); - var jw = JSON.stringify(wanted); - t.equivalent(found, wanted, 'toComparators(' + pre + ') === ' + jw); - }); - - t.end(); -}); - -test('\ninvalid version numbers', function(t) { - ['1.2.3.4', - 'NOT VALID', - 1.2, - null, - 'Infinity.NaN.Infinity' - ].forEach(function(v) { - t.throws(function() { - new SemVer(v); - }, {name:'TypeError', message:'Invalid Version: ' + v}); - }); - - t.end(); -}); - -test('\nstrict vs loose version numbers', function(t) { - [['=1.2.3', '1.2.3'], - ['01.02.03', '1.2.3'], - ['1.2.3-beta.01', '1.2.3-beta.1'], - [' =1.2.3', '1.2.3'], - ['1.2.3foo', '1.2.3-foo'] - ].forEach(function(v) { - var loose = v[0]; - var strict = v[1]; - t.throws(function() { - new SemVer(loose); - }); - var lv = new SemVer(loose, true); - t.equal(lv.version, strict); - t.ok(eq(loose, strict, true)); - t.throws(function() { - eq(loose, strict); - }); - t.throws(function() { - new SemVer(strict).compare(loose); - }); - }); - t.end(); -}); - -test('\nstrict vs loose ranges', function(t) { - [['>=01.02.03', '>=1.2.3'], - ['~1.02.03beta', '>=1.2.3-beta <1.3.0-0'] - ].forEach(function(v) { - var loose = v[0]; - var comps = v[1]; - t.throws(function() { - new Range(loose); - }); - t.equal(new Range(loose, true).range, comps); - }); - t.end(); -}); - -test('\nmax satisfying', function(t) { - [[['1.2.3', '1.2.4'], '1.2', '1.2.4'], - [['1.2.4', '1.2.3'], '1.2', '1.2.4'], - [['1.2.3', '1.2.4', '1.2.5', '1.2.6'], '~1.2.3', '1.2.6'], - [['1.1.0', '1.2.0', '1.2.1', '1.3.0', '2.0.0b1', '2.0.0b2', '2.0.0b3', '2.0.0', '2.1.0'], '~2.0.0', '2.0.0', true] - ].forEach(function(v) { - var versions = v[0]; - var range = v[1]; - var expect = v[2]; - var loose = v[3]; - var actual = semver.maxSatisfying(versions, range, loose); - t.equal(actual, expect); - }); - t.end(); -}); diff --git a/node_modules/browserify-fs/node_modules/levelup/node_modules/semver/test/ltr.js b/node_modules/browserify-fs/node_modules/levelup/node_modules/semver/test/ltr.js deleted file mode 100644 index d1461371..00000000 --- a/node_modules/browserify-fs/node_modules/levelup/node_modules/semver/test/ltr.js +++ /dev/null @@ -1,175 +0,0 @@ -var tap = require('tap'); -var test = tap.test; -var semver = require('../semver.js'); -var ltr = semver.ltr; - -test('\nltr tests', function(t) { - // [range, version, loose] - // Version should be less than range - [ - ['~1.2.2', '1.2.1'], - ['~0.6.1-1', '0.6.1-0'], - ['1.0.0 - 2.0.0', '0.0.1'], - ['1.0.0-beta.2', '1.0.0-beta.1'], - ['1.0.0', '0.0.0'], - ['>=2.0.0', '1.1.1'], - ['>=2.0.0', '1.2.9'], - ['>2.0.0', '2.0.0'], - ['0.1.20 || 1.2.4', '0.1.5'], - ['2.x.x', '1.0.0'], - ['1.2.x', '1.1.0'], - ['1.2.x || 2.x', '1.0.0'], - ['2.*.*', '1.0.1'], - ['1.2.*', '1.1.3'], - ['1.2.* || 2.*', '1.1.9999'], - ['2', '1.0.0'], - ['2.3', '2.2.2'], - ['~2.4', '2.3.0'], // >=2.4.0 <2.5.0 - ['~2.4', '2.3.5'], - ['~>3.2.1', '3.2.0'], // >=3.2.1 <3.3.0 - ['~1', '0.2.3'], // >=1.0.0 <2.0.0 - ['~>1', '0.2.4'], - ['~> 1', '0.2.3'], - ['~1.0', '0.1.2'], // >=1.0.0 <1.1.0 - ['~ 1.0', '0.1.0'], - ['>1.2', '1.2.0'], - ['> 1.2', '1.2.1'], - ['1', '0.0.0beta', true], - ['~v0.5.4-pre', '0.5.4-alpha'], - ['~v0.5.4-pre', '0.5.4-alpha'], - ['=0.7.x', '0.6.0'], - ['=0.7.x', '0.6.0-asdf'], - ['>=0.7.x', '0.6.0'], - ['~1.2.2', '1.2.1'], - ['1.0.0 - 2.0.0', '0.2.3'], - ['1.0.0', '0.0.1'], - ['>=2.0.0', '1.0.0'], - ['>=2.0.0', '1.9999.9999'], - ['>=2.0.0', '1.2.9'], - ['>2.0.0', '2.0.0'], - ['>2.0.0', '1.2.9'], - ['2.x.x', '1.1.3'], - ['1.2.x', '1.1.3'], - ['1.2.x || 2.x', '1.1.3'], - ['2.*.*', '1.1.3'], - ['1.2.*', '1.1.3'], - ['1.2.* || 2.*', '1.1.3'], - ['2', '1.9999.9999'], - ['2.3', '2.2.1'], - ['~2.4', '2.3.0'], // >=2.4.0 <2.5.0 - ['~>3.2.1', '2.3.2'], // >=3.2.1 <3.3.0 - ['~1', '0.2.3'], // >=1.0.0 <2.0.0 - ['~>1', '0.2.3'], - ['~1.0', '0.0.0'], // >=1.0.0 <1.1.0 - ['>1', '1.0.0'], - ['2', '1.0.0beta', true], - ['>1', '1.0.0beta', true], - ['> 1', '1.0.0beta', true], - ['=0.7.x', '0.6.2'], - ['>=0.7.x', '0.6.2'] - ].forEach(function(tuple) { - var range = tuple[0]; - var version = tuple[1]; - var loose = tuple[2] || false; - var msg = 'ltr(' + version + ', ' + range + ', ' + loose + ')'; - t.ok(ltr(version, range, loose), msg); - }); - t.end(); -}); - -test('\nnegative ltr tests', function(t) { - // [range, version, loose] - // Version should NOT be greater than range - [ - ['~ 1.0', '1.1.0'], - ['~0.6.1-1', '0.6.1-1'], - ['1.0.0 - 2.0.0', '1.2.3'], - ['1.0.0 - 2.0.0', '2.9.9'], - ['1.0.0', '1.0.0'], - ['>=*', '0.2.4'], - ['', '1.0.0', true], - ['*', '1.2.3'], - ['*', 'v1.2.3-foo'], - ['>=1.0.0', '1.0.0'], - ['>=1.0.0', '1.0.1'], - ['>=1.0.0', '1.1.0'], - ['>1.0.0', '1.0.1'], - ['>1.0.0', '1.1.0'], - ['<=2.0.0', '2.0.0'], - ['<=2.0.0', '1.9999.9999'], - ['<=2.0.0', '0.2.9'], - ['<2.0.0', '1.9999.9999'], - ['<2.0.0', '0.2.9'], - ['>= 1.0.0', '1.0.0'], - ['>= 1.0.0', '1.0.1'], - ['>= 1.0.0', '1.1.0'], - ['> 1.0.0', '1.0.1'], - ['> 1.0.0', '1.1.0'], - ['<= 2.0.0', '2.0.0'], - ['<= 2.0.0', '1.9999.9999'], - ['<= 2.0.0', '0.2.9'], - ['< 2.0.0', '1.9999.9999'], - ['<\t2.0.0', '0.2.9'], - ['>=0.1.97', 'v0.1.97'], - ['>=0.1.97', '0.1.97'], - ['0.1.20 || 1.2.4', '1.2.4'], - ['0.1.20 || >1.2.4', '1.2.4'], - ['0.1.20 || 1.2.4', '1.2.3'], - ['0.1.20 || 1.2.4', '0.1.20'], - ['>=0.2.3 || <0.0.1', '0.0.0'], - ['>=0.2.3 || <0.0.1', '0.2.3'], - ['>=0.2.3 || <0.0.1', '0.2.4'], - ['||', '1.3.4'], - ['2.x.x', '2.1.3'], - ['1.2.x', '1.2.3'], - ['1.2.x || 2.x', '2.1.3'], - ['1.2.x || 2.x', '1.2.3'], - ['x', '1.2.3'], - ['2.*.*', '2.1.3'], - ['1.2.*', '1.2.3'], - ['1.2.* || 2.*', '2.1.3'], - ['1.2.* || 2.*', '1.2.3'], - ['1.2.* || 2.*', '1.2.3'], - ['*', '1.2.3'], - ['2', '2.1.2'], - ['2.3', '2.3.1'], - ['~2.4', '2.4.0'], // >=2.4.0 <2.5.0 - ['~2.4', '2.4.5'], - ['~>3.2.1', '3.2.2'], // >=3.2.1 <3.3.0 - ['~1', '1.2.3'], // >=1.0.0 <2.0.0 - ['~>1', '1.2.3'], - ['~> 1', '1.2.3'], - ['~1.0', '1.0.2'], // >=1.0.0 <1.1.0 - ['~ 1.0', '1.0.2'], - ['>=1', '1.0.0'], - ['>= 1', '1.0.0'], - ['<1.2', '1.1.1'], - ['< 1.2', '1.1.1'], - ['1', '1.0.0beta', true], - ['~v0.5.4-pre', '0.5.5'], - ['~v0.5.4-pre', '0.5.4'], - ['=0.7.x', '0.7.2'], - ['>=0.7.x', '0.7.2'], - ['=0.7.x', '0.7.0-asdf'], - ['>=0.7.x', '0.7.0-asdf'], - ['<=0.7.x', '0.6.2'], - ['>0.2.3 >0.2.4 <=0.2.5', '0.2.5'], - ['>=0.2.3 <=0.2.4', '0.2.4'], - ['1.0.0 - 2.0.0', '2.0.0'], - ['^1', '1.0.0-0'], - ['^3.0.0', '4.0.0'], - ['^1.0.0 || ~2.0.1', '2.0.0'], - ['^0.1.0 || ~3.0.1 || 5.0.0', '3.2.0'], - ['^0.1.0 || ~3.0.1 || 5.0.0', '1.0.0beta', true], - ['^0.1.0 || ~3.0.1 || 5.0.0', '5.0.0-0', true], - ['^0.1.0 || ~3.0.1 || >4 <=5.0.0', '3.5.0'], - ['=0.1.0', '1.0.0'] - ].forEach(function(tuple) { - var range = tuple[0]; - var version = tuple[1]; - var loose = tuple[2] || false; - var msg = '!ltr(' + version + ', ' + range + ', ' + loose + ')'; - t.notOk(ltr(version, range, loose), msg); - }); - t.end(); -}); diff --git a/node_modules/browserify-fs/node_modules/levelup/node_modules/semver/test/no-module.js b/node_modules/browserify-fs/node_modules/levelup/node_modules/semver/test/no-module.js deleted file mode 100644 index 96d1cd1f..00000000 --- a/node_modules/browserify-fs/node_modules/levelup/node_modules/semver/test/no-module.js +++ /dev/null @@ -1,19 +0,0 @@ -var tap = require('tap'); -var test = tap.test; - -test('no module system', function(t) { - var fs = require('fs'); - var vm = require('vm'); - var head = fs.readFileSync(require.resolve('../head.js'), 'utf8'); - var src = fs.readFileSync(require.resolve('../'), 'utf8'); - var foot = fs.readFileSync(require.resolve('../foot.js'), 'utf8'); - vm.runInThisContext(head + src + foot, 'semver.js'); - - // just some basic poking to see if it did some stuff - t.type(global.semver, 'object'); - t.type(global.semver.SemVer, 'function'); - t.type(global.semver.Range, 'function'); - t.ok(global.semver.satisfies('1.2.3', '1.2')); - t.end(); -}); - diff --git a/node_modules/browserify-fs/node_modules/levelup/node_modules/xtend/.jshintrc b/node_modules/browserify-fs/node_modules/levelup/node_modules/xtend/.jshintrc deleted file mode 100644 index 77887b5f..00000000 --- a/node_modules/browserify-fs/node_modules/levelup/node_modules/xtend/.jshintrc +++ /dev/null @@ -1,30 +0,0 @@ -{ - "maxdepth": 4, - "maxstatements": 200, - "maxcomplexity": 12, - "maxlen": 80, - "maxparams": 5, - - "curly": true, - "eqeqeq": true, - "immed": true, - "latedef": false, - "noarg": true, - "noempty": true, - "nonew": true, - "undef": true, - "unused": "vars", - "trailing": true, - - "quotmark": true, - "expr": true, - "asi": true, - - "browser": false, - "esnext": true, - "devel": false, - "node": false, - "nonstandard": false, - - "predef": ["require", "module", "__dirname", "__filename"] -} diff --git a/node_modules/browserify-fs/node_modules/levelup/node_modules/xtend/.npmignore b/node_modules/browserify-fs/node_modules/levelup/node_modules/xtend/.npmignore deleted file mode 100644 index 3c3629e6..00000000 --- a/node_modules/browserify-fs/node_modules/levelup/node_modules/xtend/.npmignore +++ /dev/null @@ -1 +0,0 @@ -node_modules diff --git a/node_modules/browserify-fs/node_modules/levelup/node_modules/xtend/LICENCE b/node_modules/browserify-fs/node_modules/levelup/node_modules/xtend/LICENCE deleted file mode 100644 index 1a14b437..00000000 --- a/node_modules/browserify-fs/node_modules/levelup/node_modules/xtend/LICENCE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (c) 2012-2014 Raynos. - -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/node_modules/browserify-fs/node_modules/levelup/node_modules/xtend/Makefile b/node_modules/browserify-fs/node_modules/levelup/node_modules/xtend/Makefile deleted file mode 100644 index d583fcf4..00000000 --- a/node_modules/browserify-fs/node_modules/levelup/node_modules/xtend/Makefile +++ /dev/null @@ -1,4 +0,0 @@ -browser: - node ./support/compile - -.PHONY: browser \ No newline at end of file diff --git a/node_modules/browserify-fs/node_modules/levelup/node_modules/xtend/README.md b/node_modules/browserify-fs/node_modules/levelup/node_modules/xtend/README.md deleted file mode 100644 index e7548318..00000000 --- a/node_modules/browserify-fs/node_modules/levelup/node_modules/xtend/README.md +++ /dev/null @@ -1,28 +0,0 @@ -# xtend - -[![browser support][3]][4] - -Extend like a boss - -xtend is a basic utility library which allows you to extend an object by appending all of the properties from each object in a list. When there are identical properties, the right-most property takes presedence. - -## Examples - -```js -var extend = require("xtend") - -// extend returns a new object. Does not mutate arguments -var combination = extend({ - a: "a" -}, { - b: "b" -}) -// { a: "a", b: "b" } -``` - - -## MIT Licenced - - - [3]: http://ci.testling.com/Raynos/xtend.png - [4]: http://ci.testling.com/Raynos/xtend diff --git a/node_modules/browserify-fs/node_modules/levelup/node_modules/xtend/index.js b/node_modules/browserify-fs/node_modules/levelup/node_modules/xtend/index.js deleted file mode 100644 index 5b760152..00000000 --- a/node_modules/browserify-fs/node_modules/levelup/node_modules/xtend/index.js +++ /dev/null @@ -1,17 +0,0 @@ -module.exports = extend - -function extend() { - var target = {} - - for (var i = 0; i < arguments.length; i++) { - var source = arguments[i] - - for (var key in source) { - if (source.hasOwnProperty(key)) { - target[key] = source[key] - } - } - } - - return target -} diff --git a/node_modules/browserify-fs/node_modules/levelup/node_modules/xtend/mutable.js b/node_modules/browserify-fs/node_modules/levelup/node_modules/xtend/mutable.js deleted file mode 100644 index a34475eb..00000000 --- a/node_modules/browserify-fs/node_modules/levelup/node_modules/xtend/mutable.js +++ /dev/null @@ -1,15 +0,0 @@ -module.exports = extend - -function extend(target) { - for (var i = 1; i < arguments.length; i++) { - var source = arguments[i] - - for (var key in source) { - if (source.hasOwnProperty(key)) { - target[key] = source[key] - } - } - } - - return target -} diff --git a/node_modules/browserify-fs/node_modules/levelup/node_modules/xtend/package.json b/node_modules/browserify-fs/node_modules/levelup/node_modules/xtend/package.json deleted file mode 100644 index c8babc9c..00000000 --- a/node_modules/browserify-fs/node_modules/levelup/node_modules/xtend/package.json +++ /dev/null @@ -1,86 +0,0 @@ -{ - "name": "xtend", - "version": "3.0.0", - "description": "extend like a boss", - "keywords": [ - "extend", - "merge", - "options", - "opts", - "object", - "array" - ], - "author": { - "name": "Raynos", - "email": "raynos2@gmail.com" - }, - "repository": { - "type": "git", - "url": "git://github.com/Raynos/xtend.git" - }, - "main": "index", - "scripts": { - "test": "node test" - }, - "dependencies": {}, - "devDependencies": { - "tape": "~1.1.0" - }, - "homepage": "https://github.com/Raynos/xtend", - "contributors": [ - { - "name": "Jake Verbaten" - }, - { - "name": "Matt Esch" - } - ], - "bugs": { - "url": "https://github.com/Raynos/xtend/issues", - "email": "raynos2@gmail.com" - }, - "licenses": [ - { - "type": "MIT", - "url": "http://github.com/raynos/xtend/raw/master/LICENSE" - } - ], - "testling": { - "files": "test.js", - "browsers": [ - "ie/7..latest", - "firefox/16..latest", - "firefox/nightly", - "chrome/22..latest", - "chrome/canary", - "opera/12..latest", - "opera/next", - "safari/5.1..latest", - "ipad/6.0..latest", - "iphone/6.0..latest" - ] - }, - "engines": { - "node": ">=0.4" - }, - "_id": "xtend@3.0.0", - "dist": { - "shasum": "5cce7407baf642cba7becda568111c493f59665a", - "tarball": "https://registry.npmjs.org/xtend/-/xtend-3.0.0.tgz" - }, - "_from": "xtend@>=3.0.0 <3.1.0", - "_npmVersion": "1.4.6", - "_npmUser": { - "name": "raynos", - "email": "raynos2@gmail.com" - }, - "maintainers": [ - { - "name": "raynos", - "email": "raynos2@gmail.com" - } - ], - "directories": {}, - "_shasum": "5cce7407baf642cba7becda568111c493f59665a", - "_resolved": "https://registry.npmjs.org/xtend/-/xtend-3.0.0.tgz" -} diff --git a/node_modules/browserify-fs/node_modules/levelup/node_modules/xtend/test.js b/node_modules/browserify-fs/node_modules/levelup/node_modules/xtend/test.js deleted file mode 100644 index 3369d796..00000000 --- a/node_modules/browserify-fs/node_modules/levelup/node_modules/xtend/test.js +++ /dev/null @@ -1,63 +0,0 @@ -var test = require("tape") -var extend = require("./") -var mutableExtend = require("./mutable") - -test("merge", function(assert) { - var a = { a: "foo" } - var b = { b: "bar" } - - assert.deepEqual(extend(a, b), { a: "foo", b: "bar" }) - assert.end() -}) - -test("replace", function(assert) { - var a = { a: "foo" } - var b = { a: "bar" } - - assert.deepEqual(extend(a, b), { a: "bar" }) - assert.end() -}) - -test("undefined", function(assert) { - var a = { a: undefined } - var b = { b: "foo" } - - assert.deepEqual(extend(a, b), { a: undefined, b: "foo" }) - assert.deepEqual(extend(b, a), { a: undefined, b: "foo" }) - assert.end() -}) - -test("handle 0", function(assert) { - var a = { a: "default" } - var b = { a: 0 } - - assert.deepEqual(extend(a, b), { a: 0 }) - assert.deepEqual(extend(b, a), { a: "default" }) - assert.end() -}) - -test("is immutable", function (assert) { - var record = {} - - extend(record, { foo: "bar" }) - assert.equal(record.foo, undefined) - assert.end() -}) - -test("null as argument", function (assert) { - var a = { foo: "bar" } - var b = null - var c = void 0 - - assert.deepEqual(extend(b, a, c), { foo: "bar" }) - assert.end() -}) - -test("mutable", function (assert) { - var a = { foo: "bar" } - - mutableExtend(a, { bar: "baz" }) - - assert.equal(a.bar, "baz") - assert.end() -}) diff --git a/node_modules/browserify-fs/node_modules/levelup/package.json b/node_modules/browserify-fs/node_modules/levelup/package.json deleted file mode 100644 index e6bc0b9c..00000000 --- a/node_modules/browserify-fs/node_modules/levelup/package.json +++ /dev/null @@ -1,149 +0,0 @@ -{ - "name": "levelup", - "description": "Fast & simple storage - a Node.js-style LevelDB wrapper", - "version": "0.18.6", - "contributors": [ - { - "name": "Rod Vagg", - "email": "r@va.gg", - "url": "https://github.com/rvagg" - }, - { - "name": "John Chesley", - "email": "john@chesl.es", - "url": "https://github.com/chesles/" - }, - { - "name": "Jake Verbaten", - "email": "raynos2@gmail.com", - "url": "https://github.com/raynos" - }, - { - "name": "Dominic Tarr", - "email": "dominic.tarr@gmail.com", - "url": "https://github.com/dominictarr" - }, - { - "name": "Max Ogden", - "email": "max@maxogden.com", - "url": "https://github.com/maxogden" - }, - { - "name": "Lars-Magnus Skog", - "email": "lars.magnus.skog@gmail.com", - "url": "https://github.com/ralphtheninja" - }, - { - "name": "David Björklund", - "email": "david.bjorklund@gmail.com", - "url": "https://github.com/kesla" - }, - { - "name": "Julian Gruber", - "email": "julian@juliangruber.com", - "url": "https://github.com/juliangruber" - }, - { - "name": "Paolo Fragomeni", - "email": "paolo@async.ly", - "url": "https://github.com/hij1nx" - }, - { - "name": "Anton Whalley", - "email": "anton.whalley@nearform.com", - "url": "https://github.com/No9" - }, - { - "name": "Matteo Collina", - "email": "matteo.collina@gmail.com", - "url": "https://github.com/mcollina" - }, - { - "name": "Pedro Teixeira", - "email": "pedro.teixeira@gmail.com", - "url": "https://github.com/pgte" - }, - { - "name": "James Halliday", - "email": "mail@substack.net", - "url": "https://github.com/substack" - } - ], - "repository": { - "type": "git", - "url": "https://github.com/rvagg/node-levelup.git" - }, - "homepage": "https://github.com/rvagg/node-levelup", - "keywords": [ - "leveldb", - "stream", - "database", - "db", - "store", - "storage", - "json" - ], - "main": "lib/levelup.js", - "dependencies": { - "bl": "~0.8.1", - "deferred-leveldown": "~0.2.0", - "errno": "~0.1.1", - "prr": "~0.0.0", - "readable-stream": "~1.0.26", - "semver": "~2.3.1", - "xtend": "~3.0.0" - }, - "devDependencies": { - "leveldown": "~0.10.0", - "bustermove": "*", - "tap": "*", - "referee": "*", - "rimraf": "*", - "async": "*", - "fstream": "*", - "tar": "*", - "mkfiletree": "*", - "readfiletree": "*", - "slow-stream": ">=0.0.4", - "delayed": "*", - "boganipsum": "*", - "du": "*", - "memdown": "*", - "msgpack-js": "*" - }, - "browser": { - "leveldown": false, - "leveldown/package": false, - "semver": false - }, - "scripts": { - "test": "tap test/*-test.js --stderr", - "functionaltests": "node ./test/functional/fstream-test.js && node ./test/functional/binary-data-test.js && node ./test/functional/compat-test.js", - "alltests": "npm test && npm run-script functionaltests" - }, - "license": "MIT", - "gitHead": "213e989e2b75273e2b44c23f84f95e35bff7ea11", - "bugs": { - "url": "https://github.com/rvagg/node-levelup/issues" - }, - "_id": "levelup@0.18.6", - "_shasum": "e6a01cb089616c8ecc0291c2a9bd3f0c44e3e5eb", - "_from": "levelup@>=0.18.2 <0.19.0", - "_npmVersion": "1.4.14", - "_npmUser": { - "name": "rvagg", - "email": "rod@vagg.org" - }, - "maintainers": [ - { - "name": "rvagg", - "email": "rod@vagg.org" - } - ], - "dist": { - "shasum": "e6a01cb089616c8ecc0291c2a9bd3f0c44e3e5eb", - "tarball": "https://registry.npmjs.org/levelup/-/levelup-0.18.6.tgz" - }, - "directories": {}, - "_resolved": "https://registry.npmjs.org/levelup/-/levelup-0.18.6.tgz" -} diff --git a/node_modules/browserify-fs/node_modules/levelup/test/approximate-size-test.js b/node_modules/browserify-fs/node_modules/levelup/test/approximate-size-test.js deleted file mode 100644 index 00784e36..00000000 --- a/node_modules/browserify-fs/node_modules/levelup/test/approximate-size-test.js +++ /dev/null @@ -1,80 +0,0 @@ -/* Copyright (c) 2012-2014 LevelUP contributors - * See list at - * MIT License - */ - -var levelup = require('../lib/levelup.js') - , async = require('async') - , common = require('./common') - - , assert = require('referee').assert - , refute = require('referee').refute - , buster = require('bustermove') - -buster.testCase('approximateSize()', { - 'setUp': common.commonSetUp - , 'tearDown': common.commonTearDown - - , 'approximateSize() works on empty database': function (done) { - this.openTestDatabase(function (db) { - db.approximateSize('a', 'z', function(err, size) { - refute(err) // sanity - assert.equals(size, 0) - done() - }) - }) - } - - , 'approximateSize() work on none-empty database': function(done) { - var location = common.nextLocation() - , db - - async.series( - [ - function (callback) { - this.openTestDatabase( - location - , function (_db) { - db = _db - callback() - } - ) - }.bind(this) - , function (callback) { - var batch = [] - , i = 0 - - for (; i < 10; ++i) { - batch.push({ - type: 'put', key: String(i), value: 'afoovalue' - }) - } - db.batch( - batch - , { sync: true } - , callback - ) - } - , function (callback) { - // close db to make sure stuff gets written to disc - db.close(callback) - } - , function (callback) { - levelup(location, function (err, _db) { - refute(err) - db = _db - callback() - }) - } - , function (callback) { - db.approximateSize('0', '99', function(err, size) { - refute(err) // sanity - refute.equals(size, 0) - callback() - }) - } - ] - , done - ) - } -}) diff --git a/node_modules/browserify-fs/node_modules/levelup/test/argument-checking-test.js b/node_modules/browserify-fs/node_modules/levelup/test/argument-checking-test.js deleted file mode 100644 index 2cd6b167..00000000 --- a/node_modules/browserify-fs/node_modules/levelup/test/argument-checking-test.js +++ /dev/null @@ -1,122 +0,0 @@ -/* Copyright (c) 2012-2014 LevelUP contributors - * See list at - * MIT License - */ - -var common = require('./common') - - , assert = require('referee').assert - , refute = require('referee').refute - , buster = require('bustermove') - -buster.testCase('Argument checking', { - 'setUp': common.commonSetUp - , 'tearDown': common.commonTearDown - - , 'test get() throwables': function (done) { - this.openTestDatabase(function (db) { - - assert.exception( - db.get.bind(db) - , { name: 'ReadError', message: 'get() requires key and callback arguments' } - , 'no-arg get() throws' - ) - - assert.exception( - db.get.bind(db, 'foo') - , { name: 'ReadError', message: 'get() requires key and callback arguments' } - , 'callback-less, 1-arg get() throws' - ) - - assert.exception( - db.get.bind(db, 'foo', {}) - , { name: 'ReadError', message: 'get() requires key and callback arguments' } - , 'callback-less, 2-arg get() throws' - ) - - done() - }) - } - - , 'test put() throwables': function (done) { - this.openTestDatabase(function (db) { - - assert.exception( - db.put.bind(db) - , { name: 'WriteError', message: 'put() requires key and value arguments' } - , 'no-arg put() throws' - ) - - assert.exception( - db.put.bind(db, 'foo') - , { name: 'WriteError', message: 'put() requires key and value arguments' } - , 'callback-less, 1-arg put() throws' - ) - - done() - }) - } - - , 'test del() throwables': function (done) { - this.openTestDatabase(function (db) { - - assert.exception( - db.del.bind(db) - , { name: 'WriteError', message: 'del() requires a key argument' } - , 'no-arg del() throws' - ) - - done() - }) - } - - , 'test approximateSize() throwables': function (done) { - this.openTestDatabase(function (db) { - - assert.exception( - db.approximateSize.bind(db) - , { name: 'ReadError', message: 'approximateSize() requires start, end and callback arguments' } - , 'no-arg approximateSize() throws' - ) - - assert.exception( - db.approximateSize.bind(db, 'foo') - , { name: 'ReadError', message: 'approximateSize() requires start, end and callback arguments' } - , 'callback-less, 1-arg approximateSize() throws' - ) - - assert.exception( - db.approximateSize.bind(db, 'foo', 'bar') - , { name: 'ReadError', message: 'approximateSize() requires start, end and callback arguments' } - , 'callback-less, 2-arg approximateSize() throws' - ) - - assert.exception( - db.approximateSize.bind(db, 'foo', 'bar', {}) - , { name: 'ReadError', message: 'approximateSize() requires start, end and callback arguments' } - , 'callback-less, 3-arg approximateSize(), no cb throws' - ) - - done() - }) - } - - , 'test batch() throwables': function (done) { - this.openTestDatabase(function (db) { - - assert.exception( - db.batch.bind(db, null, {}) - , { name: 'WriteError', message: 'batch() requires an array argument' } - , 'no-arg batch() throws' - ) - - assert.exception( - db.batch.bind(db, {}) - , { name: 'WriteError', message: 'batch() requires an array argument' } - , '1-arg, no Array batch() throws' - ) - - done() - }) - } -}) diff --git a/node_modules/browserify-fs/node_modules/levelup/test/batch-test.js b/node_modules/browserify-fs/node_modules/levelup/test/batch-test.js deleted file mode 100644 index 78378078..00000000 --- a/node_modules/browserify-fs/node_modules/levelup/test/batch-test.js +++ /dev/null @@ -1,372 +0,0 @@ -/* Copyright (c) 2012-2014 LevelUP contributors - * See list at - * MIT License - */ - -var errors = require('../lib/errors.js') - , async = require('async') - , common = require('./common') - - , assert = require('referee').assert - , refute = require('referee').refute - , buster = require('bustermove') - -buster.testCase('batch()', { - 'setUp': common.commonSetUp - , 'tearDown': common.commonTearDown - - , 'batch() with multiple puts': function (done) { - this.openTestDatabase(function (db) { - db.batch( - [ - { type: 'put', key: 'foo', value: 'afoovalue' } - , { type: 'put', key: 'bar', value: 'abarvalue' } - , { type: 'put', key: 'baz', value: 'abazvalue' } - ] - , function (err) { - refute(err) - async.forEach( - ['foo', 'bar', 'baz'] - , function (key, callback) { - db.get(key, function (err, value) { - refute(err) - assert.equals(value, 'a' + key + 'value') - callback() - }) - } - , done - ) - } - ) - }) - } - - , 'batch() with multiple puts and deletes': function (done) { - this.openTestDatabase(function (db) { - async.series( - [ - function (callback) { - db.batch( - [ - { type: 'put', key: '1', value: 'one' } - , { type: 'put', key: '2', value: 'two' } - , { type: 'put', key: '3', value: 'three' } - ] - , callback - ) - } - , function (callback) { - db.batch( - [ - { type: 'put', key: 'foo', value: 'afoovalue' } - , { type: 'del', key: '1' } - , { type: 'put', key: 'bar', value: 'abarvalue' } - , { type: 'del', key: 'foo' } - , { type: 'put', key: 'baz', value: 'abazvalue' } - ] - , callback - ) - } - , function (callback) { - // these should exist - async.forEach( - ['2', '3', 'bar', 'baz'] - , function (key, callback) { - db.get(key, function (err, value) { - refute(err) - refute.isNull(value) - callback() - }) - } - , callback - ) - } - , function (callback) { - // these shouldn't exist - async.forEach( - ['1', 'foo'] - , function (key, callback) { - db.get(key, function (err, value) { - assert(err) - assert.isInstanceOf(err, errors.NotFoundError) - refute(value) - callback() - }) - } - , callback - ) - } - ] - , done - ) - }) - } - - , 'batch() with chained interface': function (done) { - this.openTestDatabase(function (db) { - db.put('1', 'one', function (err) { - refute(err) - - db.batch() - .put('one', '1') - .del('two') - .put('three', '3') - .clear() - .del('1') - .put('2', 'two') - .put('3', 'three') - .del('3') - .write(function (err) { - refute(err) - - async.forEach( - [ 'one', 'three', '1', '2', '3'] - , function (key, callback) { - db.get(key, function (err) { - if ([ 'one', 'three', '1', '3' ].indexOf(key) > -1) - assert(err) - else - refute(err) - callback() - }) - } - , done - ) - }) - }) - }) - } - - , 'batch() with can manipulate data from put()': function (done) { - // checks encoding and whatnot - this.openTestDatabase(function (db) { - async.series( - [ - db.put.bind(db, '1', 'one') - , db.put.bind(db, '2', 'two') - , db.put.bind(db, '3', 'three') - , function (callback) { - db.batch( - [ - { type: 'put', key: 'foo', value: 'afoovalue' } - , { type: 'del', key: '1' } - , { type: 'put', key: 'bar', value: 'abarvalue' } - , { type: 'del', key: 'foo' } - , { type: 'put', key: 'baz', value: 'abazvalue' } - ] - , callback - ) - } - , function (callback) { - // these should exist - async.forEach( - ['2', '3', 'bar', 'baz'] - , function (key, callback) { - db.get(key, function (err, value) { - refute(err) - refute.isNull(value) - callback() - }) - } - , callback - ) - } - , function (callback) { - // these shouldn't exist - async.forEach( - ['1', 'foo'] - , function (key, callback) { - db.get(key, function (err, value) { - assert(err) - assert.isInstanceOf(err, errors.NotFoundError) - refute(value) - callback() - }) - } - , callback - ) - } - ] - , done - ) - }) - } - - , 'batch() data can be read with get() and del()': function (done) { - this.openTestDatabase(function (db) { - async.series( - [ - function (callback) { - db.batch( - [ - { type: 'put', key: '1', value: 'one' } - , { type: 'put', key: '2', value: 'two' } - , { type: 'put', key: '3', value: 'three' } - ] - , callback - ) - } - , db.del.bind(db, '1', 'one') - , function (callback) { - // these should exist - async.forEach( - ['2', '3'] - , function (key, callback) { - db.get(key, function (err, value) { - refute(err) - refute.isNull(value) - callback() - }) - } - , callback - ) - } - , function (callback) { - // this shouldn't exist - db.get('1', function (err, value) { - assert(err) - assert.isInstanceOf(err, errors.NotFoundError) - refute(value) - callback() - }) - } - ] - , done - ) - }) - } - - , 'chained batch() arguments': { - 'setUp': function (done) { - this.openTestDatabase(function (db) { - this.db = db - this.batch = db.batch() - done() - }.bind(this)) - } - - , 'test batch#put() with missing `value`': function () { - // value = undefined - assert.exception(this.batch.put.bind(this.batch, 'foo1'), function (err) { - console.log('err.name', err.name, 'err.message', err.message) - if (err.name != 'WriteError') - return false - if ('value cannot be `null` or `undefined`' != err.message) - return false - return true - }) - - // value = null - assert.exception(this.batch.put.bind(this.batch, 'foo1', null), function (err) { - if (err.name != 'WriteError') - return false - if ('value cannot be `null` or `undefined`' != err.message) - return false - return true - }) - } - - , 'test batch#put() with missing `key`': function () { - // key = undefined - assert.exception(this.batch.put.bind(this.batch, undefined, 'foo1'), function (err) { - if (err.name != 'WriteError') - return false - if ('key cannot be `null` or `undefined`' != err.message) - return false - return true - }) - - // key = null - assert.exception(this.batch.put.bind(this.batch, null, 'foo1'), function (err) { - if (err.name != 'WriteError') - return false - if ('key cannot be `null` or `undefined`' != err.message) - return false - return true - }) - } - - , 'test batch#put() with missing `key` and `value`': function () { - // undefined - assert.exception(this.batch.put.bind(this.batch), function (err) { - if (err.name != 'WriteError') - return false - if ('key cannot be `null` or `undefined`' != err.message) - return false - return true - }) - - // null - assert.exception(this.batch.put.bind(this.batch, null, null), function (err) { - if (err.name != 'WriteError') - return false - if ('key cannot be `null` or `undefined`' != err.message) - return false - return true - }) - } - - , 'test batch#del() with missing `key`': function () { - // key = undefined - assert.exception(this.batch.del.bind(this.batch, undefined, 'foo1'), function (err) { - if (err.name != 'WriteError') - return false - if ('key cannot be `null` or `undefined`' != err.message) - return false - return true - }) - - // key = null - assert.exception(this.batch.del.bind(this.batch, null, 'foo1'), function (err) { - if (err.name != 'WriteError') - return false - if ('key cannot be `null` or `undefined`' != err.message) - return false - return true - }) - } - - , 'test batch#write() with no callback': function () { - this.batch.write() // should not cause an error with no cb - } - - , 'test batch operations after write()': { - 'setUp': function (done) { - this.batch.put('foo', 'bar').put('boom', 'bang').del('foo').write(done) - this.verify = function (cb) { - assert.exception(cb, function (err) { - if (err.name != 'WriteError') - return false - if ('write() already called on this batch' != err.message) - return false - return true - }) - } - } - - , 'test put()': function () { - this.verify(function () { - this.batch.put('whoa', 'dude') - }.bind(this)) - } - - , 'test del()': function () { - this.verify(function () { - this.batch.del('foo') - }.bind(this)) - } - - , 'test clear()': function () { - this.verify(function () { - this.batch.clear() - }.bind(this)) - } - - , 'test write()': function () { - this.verify(function () { - this.batch.write() - }.bind(this)) - } - } - } -}) diff --git a/node_modules/browserify-fs/node_modules/levelup/test/binary-test.js b/node_modules/browserify-fs/node_modules/levelup/test/binary-test.js deleted file mode 100644 index bead65bb..00000000 --- a/node_modules/browserify-fs/node_modules/levelup/test/binary-test.js +++ /dev/null @@ -1,170 +0,0 @@ -/* Copyright (c) 2012-2014 LevelUP contributors - * See list at - * MIT License - */ - -var async = require('async') - , common = require('./common') - - , assert = require('referee').assert - , refute = require('referee').refute - , buster = require('bustermove') - -buster.testCase('Binary API', { - 'setUp': function (done) { - common.commonSetUp.call(this, function () { - common.loadBinaryTestData(function (err, data) { - refute(err) - this.testData = data - done() - }.bind(this)) - }.bind(this)) - } - - , 'tearDown': common.commonTearDown - - , 'sanity check on test data': function (done) { - assert(Buffer.isBuffer(this.testData)) - common.checkBinaryTestData(this.testData, done) - } - - , 'test put() and get() with binary value {encoding:binary}': function (done) { - this.openTestDatabase(function (db) { - db.put('binarydata', this.testData, { encoding: 'binary' }, function (err) { - refute(err) - db.get('binarydata', { encoding: 'binary' }, function (err, value) { - refute(err) - assert(value) - common.checkBinaryTestData(value, done) - }) - }) - }.bind(this)) - } - - , 'test put() and get() with binary value {encoding:binary} on createDatabase()': function (done) { - this.openTestDatabase({ createIfMissing: true, errorIfExists: true, encoding: 'binary' }, function (db) { - db.put('binarydata', this.testData, function (err) { - refute(err) - db.get('binarydata', function (err, value) { - refute(err) - assert(value) - common.checkBinaryTestData(value, done) - }) - }) - }.bind(this)) - } - - , 'test put() and get() with binary key {encoding:binary}': function (done) { - this.openTestDatabase(function (db) { - db.put(this.testData, 'binarydata', { encoding: 'binary' }, function (err) { - refute(err) - db.get(this.testData, { encoding: 'binary' }, function (err, value) { - refute(err) - assert(value instanceof Buffer, 'value is buffer') - assert.equals(value.toString(), 'binarydata') - done() - }.bind(this)) - }.bind(this)) - }.bind(this)) - } - - , 'test put() and get() with binary value {keyEncoding:utf8,valueEncoding:binary}': function (done) { - this.openTestDatabase(function (db) { - db.put('binarydata', this.testData, { keyEncoding: 'utf8', valueEncoding: 'binary' }, function (err) { - refute(err) - db.get('binarydata', { keyEncoding: 'utf8', valueEncoding: 'binary' }, function (err, value) { - refute(err) - assert(value) - common.checkBinaryTestData(value, done) - }) - }) - }.bind(this)) - } - - , 'test put() and get() with binary value {keyEncoding:utf8,valueEncoding:binary} on createDatabase()': function (done) { - this.openTestDatabase({ createIfMissing: true, errorIfExists: true, keyEncoding: 'utf8', valueEncoding: 'binary' }, function (db) { - db.put('binarydata', this.testData, function (err) { - refute(err) - db.get('binarydata', function (err, value) { - refute(err) - assert(value) - common.checkBinaryTestData(value, done) - }) - }) - }.bind(this)) - } - - , 'test put() and get() with binary key {keyEncoding:binary,valueEncoding:utf8}': function (done) { - this.openTestDatabase(function (db) { - db.put(this.testData, 'binarydata', { keyEncoding: 'binary', valueEncoding: 'utf8' }, function (err) { - refute(err) - db.get(this.testData, { keyEncoding: 'binary', valueEncoding: 'utf8' }, function (err, value) { - refute(err) - assert.equals(value, 'binarydata') - done() - }.bind(this)) - }.bind(this)) - }.bind(this)) - } - - , 'test put() and get() with binary key & value {encoding:binary}': function (done) { - this.openTestDatabase(function (db) { - db.put(this.testData, this.testData, { encoding: 'binary' }, function (err) { - refute(err) - db.get(this.testData, { encoding: 'binary' }, function (err, value) { - refute(err) - common.checkBinaryTestData(value, done) - }.bind(this)) - }.bind(this)) - }.bind(this)) - } - - - , 'test put() and del() and get() with binary key {encoding:binary}': function (done) { - this.openTestDatabase(function (db) { - db.put(this.testData, 'binarydata', { encoding: 'binary' }, function (err) { - refute(err) - db.del(this.testData, { encoding: 'binary' }, function (err) { - refute(err) - db.get(this.testData, { encoding: 'binary' }, function (err, value) { - assert(err) - refute(value) - done() - }.bind(this)) - }.bind(this)) - }.bind(this)) - }.bind(this)) - } - - , 'batch() with multiple puts': function (done) { - this.openTestDatabase(function (db) { - db.batch( - [ - { type: 'put', key: 'foo', value: this.testData } - , { type: 'put', key: 'bar', value: this.testData } - , { type: 'put', key: 'baz', value: 'abazvalue' } - ] - , { keyEncoding: 'utf8',valueEncoding: 'binary' } - , function (err) { - refute(err) - async.forEach( - ['foo', 'bar', 'baz'] - , function (key, callback) { - db.get(key, { encoding: 'binary' }, function (err, value) { - refute(err) - if (key == 'baz') { - assert(value instanceof Buffer, 'value is buffer') - assert.equals(value.toString(), 'a' + key + 'value') - callback() - } else { - common.checkBinaryTestData(value, callback) - } - }) - } - , done - ) - }.bind(this) - ) - }.bind(this)) - } -}) diff --git a/node_modules/browserify-fs/node_modules/levelup/test/common.js b/node_modules/browserify-fs/node_modules/levelup/test/common.js deleted file mode 100644 index 2be68265..00000000 --- a/node_modules/browserify-fs/node_modules/levelup/test/common.js +++ /dev/null @@ -1,156 +0,0 @@ -/* Copyright (c) 2012-2014 LevelUP contributors - * See list at - * MIT License - */ - -var referee = require('referee') - , assert = referee.assert - , refute = referee.refute - , crypto = require('crypto') - , async = require('async') - , rimraf = require('rimraf') - , fs = require('fs') - , path = require('path') - , delayed = require('delayed').delayed - , levelup = require('../lib/levelup.js') - , dbidx = 0 - -referee.add('isInstanceOf', { - assert: function (actual, expected) { - return actual instanceof expected - } - , refute: function (actual, expected) { - return !(actual instanceof expected) - } - , assertMessage: '${0} expected to be instance of ${1}' - , refuteMessage: '${0} expected not to be instance of ${1}' -}) - -referee.add('isUndefined', { - assert: function (actual) { - return actual === undefined - } - , refute: function (actual) { - return actual !== undefined - } - , assertMessage: '${0} expected to be undefined' - , refuteMessage: '${0} expected not to be undefined' -}) - -module.exports.nextLocation = function () { - return path.join(__dirname, '_levelup_test_db_' + dbidx++) -} - -module.exports.cleanup = function (callback) { - fs.readdir(__dirname, function (err, list) { - if (err) return callback(err) - - list = list.filter(function (f) { - return (/^_levelup_test_db_/).test(f) - }) - - if (!list.length) - return callback() - - var ret = 0 - - list.forEach(function (f) { - rimraf(path.join(__dirname, f), function () { - if (++ret == list.length) - callback() - }) - }) - }) -} - -module.exports.openTestDatabase = function () { - var options = typeof arguments[0] == 'object' ? arguments[0] : { createIfMissing: true, errorIfExists: true } - , callback = typeof arguments[0] == 'function' ? arguments[0] : arguments[1] - , location = typeof arguments[0] == 'string' ? arguments[0] : module.exports.nextLocation() - - rimraf(location, function (err) { - refute(err) - this.cleanupDirs.push(location) - levelup(location, options, function (err, db) { - refute(err) - if (!err) { - this.closeableDatabases.push(db) - callback(db) - } - }.bind(this)) - }.bind(this)) -} - -module.exports.commonTearDown = function (done) { - async.forEach( - this.closeableDatabases - , function (db, callback) { - db.close(callback) - } - , module.exports.cleanup.bind(null, done) - ) -} - -module.exports.loadBinaryTestData = function (callback) { - fs.readFile(path.join(__dirname, 'data/testdata.bin'), callback) -} - -module.exports.binaryTestDataMD5Sum = '920725ef1a3b32af40ccd0b78f4a62fd' - -module.exports.checkBinaryTestData = function (testData, callback) { - var md5sum = crypto.createHash('md5'); - md5sum.update(testData) - assert.equals(md5sum.digest('hex'), module.exports.binaryTestDataMD5Sum) - callback() -} - -module.exports.commonSetUp = function (done) { - this.cleanupDirs = [] - this.closeableDatabases = [] - this.openTestDatabase = module.exports.openTestDatabase.bind(this) - this.timeout = 10000 - module.exports.cleanup(done) -} - -module.exports.readStreamSetUp = function (done) { - module.exports.commonSetUp.call(this, function () { - var i, k - - this.dataSpy = this.spy() - this.endSpy = this.spy() - this.sourceData = [] - - for (i = 0; i < 100; i++) { - k = (i < 10 ? '0' : '') + i - this.sourceData.push({ - type : 'put' - , key : k - , value : Math.random() - }) - } - - this.verify = delayed(function (rs, done, data) { - if (!data) data = this.sourceData // can pass alternative data array for verification - assert.equals(this.endSpy.callCount, 1, 'ReadStream emitted single "end" event') - assert.equals(this.dataSpy.callCount, data.length, 'ReadStream emitted correct number of "data" events') - data.forEach(function (d, i) { - var call = this.dataSpy.getCall(i) - if (call) { - assert.equals(call.args.length, 1, 'ReadStream "data" event #' + i + ' fired with 1 argument') - refute.isNull(call.args[0].key, 'ReadStream "data" event #' + i + ' argument has "key" property') - refute.isNull(call.args[0].value, 'ReadStream "data" event #' + i + ' argument has "value" property') - assert.equals(call.args[0].key, d.key, 'ReadStream "data" event #' + i + ' argument has correct "key"') - assert.equals( - +call.args[0].value - , +d.value - , 'ReadStream "data" event #' + i + ' argument has correct "value"' - ) - } - }.bind(this)) - done() - }, 0.05, this) - - done() - - }.bind(this)) -} diff --git a/node_modules/browserify-fs/node_modules/levelup/test/compression-test.js b/node_modules/browserify-fs/node_modules/levelup/test/compression-test.js deleted file mode 100644 index 9e342492..00000000 --- a/node_modules/browserify-fs/node_modules/levelup/test/compression-test.js +++ /dev/null @@ -1,90 +0,0 @@ -/* Copyright (c) 2012-2014 LevelUP contributors - * See list at - * MIT License - */ - -var async = require('async') - , du = require('du') - , delayed = require('delayed') - , levelup = require('../') - , common = require('./common') - - , assert = require('referee').assert - , refute = require('referee').refute - , buster = require('bustermove') - - , compressableData = new Buffer(Array.apply(null, Array(1024 * 100)).map(function () { return 'aaaaaaaaaa' }).join('')) - , multiples = 10 - , dataSize = compressableData.length * multiples - - , verify = function (location, compression, done) { - du(location, function (err, size) { - if (err) return refute(err) - //console.log(Math.round((size / dataSize) * 100) + '% compression ratio (', size, 'b vs', dataSize, 'b)') - if (compression) - assert(size < dataSize, 'on-disk size (' + size + ') is less than data size (' + dataSize + ')') - else - assert(size >= dataSize, 'on-disk size (' + size + ') is greater than data size (' + dataSize + ')') - done() - }) - } - - // close, open, close again.. 'compaction' is also performed on open()s - , cycle = function (db, compression, callback) { - var location = db.location - db.close(function (err) { - if (err) return refute(err) - levelup(location, { errorIfExists: false, compression: compression }, function (err, db) { - if (err) return refute(err) - db.close(function (err) { - if (err) return refute(err) - callback() - }) - }) - }) - } - -buster.testCase('Compression', { - 'setUp': common.readStreamSetUp - - , 'tearDown': common.commonTearDown - - , 'test data is compressed by default (db.put())': function (done) { - this.openTestDatabase(function (db) { - async.forEach( - Array.apply(null, Array(multiples)).map(function (e, i) { - return [ i, compressableData ] - }) - , function (args, callback) { - db.put.apply(db, args.concat([callback])) - } - , cycle.bind(null, db, true, delayed.delayed(verify.bind(null, db.location, true, done), 0.01)) - ) - }) - } - - , 'test data is not compressed with compression=false on open() (db.put())': function (done) { - this.openTestDatabase({ createIfMissing: true, errorIfExists: true, compression: false }, function (db) { - async.forEach( - Array.apply(null, Array(multiples)).map(function (e, i) { - return [ i, compressableData ] - }) - , function (args, callback) { - db.put.apply(db, args.concat([callback])) - } - , cycle.bind(null, db, false, delayed.delayed(verify.bind(null, db.location, false, done), 0.01)) - ) - }) - } - - , 'test data is compressed by default (db.batch())': function (done) { - this.openTestDatabase(function (db) { - db.batch( - Array.apply(null, Array(multiples)).map(function (e, i) { - return { type: 'put', key: i, value: compressableData } - }) - , cycle.bind(null, db, false, delayed.delayed(verify.bind(null, db.location, false, done), 0.01)) - ) - }) - } -}) diff --git a/node_modules/browserify-fs/node_modules/levelup/test/copy-test.js b/node_modules/browserify-fs/node_modules/levelup/test/copy-test.js deleted file mode 100644 index c87e60d0..00000000 --- a/node_modules/browserify-fs/node_modules/levelup/test/copy-test.js +++ /dev/null @@ -1,68 +0,0 @@ -/* Copyright (c) 2012-2014 LevelUP contributors - * See list at - * MIT License - */ - -var levelup = require('../lib/levelup.js') - , async = require('async') - , common = require('./common') - - , assert = require('referee').assert - , refute = require('referee').refute - , buster = require('bustermove') - -buster.testCase('Copy', { - 'setUp': common.commonSetUp - , 'tearDown': common.commonTearDown - - , 'copy full database': function (done) { - var sourceData = [] - - for (var i = 0; i < 100; i++) { - sourceData.push({ - type : 'put' - , key : i - , value : Math.random() - }) - } - - var opensrc = function (callback) { - this.openTestDatabase(function (db) { - db.batch(sourceData.slice(), function (err) { - callback(err, db) - }) - }) - }.bind(this) - - , opendst = function (callback) { - this.openTestDatabase(function (db) { - callback(null, db) - }) - }.bind(this) - - , verify = function (dstdb) { - async.forEach( - sourceData - , function (data, callback) { - dstdb.get(data.key, function (err, value) { - refute(err) - assert.equals(+value.toString(), data.value, 'Destination data #' + data.key + ' has correct value') - callback() - }) - } - , done - ) - }.bind(this) - - async.parallel( - { src: opensrc, dst: opendst } - , function (err, dbs) { - refute(err) - levelup.copy(dbs.src, dbs.dst, function (err) { - refute(err) - verify(dbs.dst) - }) - } - ) - } -}) diff --git a/node_modules/browserify-fs/node_modules/levelup/test/create-stream-vs-put-racecondition.js b/node_modules/browserify-fs/node_modules/levelup/test/create-stream-vs-put-racecondition.js deleted file mode 100644 index 075982f6..00000000 --- a/node_modules/browserify-fs/node_modules/levelup/test/create-stream-vs-put-racecondition.js +++ /dev/null @@ -1,102 +0,0 @@ -/* Copyright (c) 2012-2014 LevelUP contributors - * See list at - * MIT License - */ - -var levelup = require('../lib/levelup.js') - , common = require('./common') - , rimraf = require('rimraf') - , async = require('async') - - , assert = require('referee').assert - , refute = require('referee').refute - , buster = require('bustermove') - -function makeTest (db, delay, done) { - // this should be an empty stream - var i = 0, j = 0, k = 0, m = 0 - var streamEnd = false, putEnd = false - - db.createReadStream() - .on('data', function (data) { - i++ - }) - .on('end', function () { - //since the readStream is created before inserting anything - //it should be empty? right? - assert.equals(i, 0, 'stream read the future') - - if(putEnd) done() - streamEnd = true - }) - - db.on('put', function (key, value) { - j++ - }) - - - //insert 10 things, - //then check the right number of events where emitted. - function insert() { - m ++ - db.put('hello'+ k++/10, k, next) - } - - delay(function () { - insert();insert();insert();insert();insert(); - insert();insert();insert();insert();insert(); - }) - - function next() { - if(--m) return - process.nextTick(function () { - assert.equals(j, 10) - assert.equals(i, 0) - - if(streamEnd) done() - putEnd = true - }) - } - -} - -buster.testCase('ReadStream', { - 'setUp': common.readStreamSetUp - - , 'tearDown': common.commonTearDown - - //TODO: test various encodings - , 'readStream and then put in nextTick': function (done) { - this.openTestDatabase(function (db) { - makeTest(db, process.nextTick, done) - }.bind(this)) - } - , 'readStream and then put in nextTick, defered open': function (done) { - var location = common.nextLocation() - , db = levelup(location) - - this.closeableDatabases.push(db) - this.cleanupDirs.push(location) - - makeTest(db, process.nextTick, done) - - } - , 'readStream and then put, defered open': function (done) { - var location = common.nextLocation() - , db = levelup(location) - - this.closeableDatabases.push(db) - this.cleanupDirs.push(location) - - makeTest(db, function (f) {f()}, done) - } - , 'readStream and then put': function (done) { - this.openTestDatabase(function (db) { - makeTest(db, function (f) {f()}, done) - }.bind(this)) - } - -}) - - - diff --git a/node_modules/browserify-fs/node_modules/levelup/test/data/testdata.bin b/node_modules/browserify-fs/node_modules/levelup/test/data/testdata.bin deleted file mode 100644 index 59229b94..00000000 Binary files a/node_modules/browserify-fs/node_modules/levelup/test/data/testdata.bin and /dev/null differ diff --git a/node_modules/browserify-fs/node_modules/levelup/test/deferred-open-test.js b/node_modules/browserify-fs/node_modules/levelup/test/deferred-open-test.js deleted file mode 100644 index 89801539..00000000 --- a/node_modules/browserify-fs/node_modules/levelup/test/deferred-open-test.js +++ /dev/null @@ -1,192 +0,0 @@ -/* Copyright (c) 2012-2014 LevelUP contributors - * See list at - * MIT License - */ - -var levelup = require('../lib/levelup.js') - , async = require('async') - , common = require('./common') - - , assert = require('referee').assert - , refute = require('referee').refute - , buster = require('bustermove') - -buster.testCase('Deferred open()', { - 'setUp': common.commonSetUp - , 'tearDown': common.commonTearDown - - , 'put() and get() on pre-opened database': function (done) { - var location = common.nextLocation() - // 1) open database without callback, opens in worker thread - , db = levelup(location, { createIfMissing: true, errorIfExists: true, encoding: 'utf8' }) - - this.closeableDatabases.push(db) - this.cleanupDirs.push(location) - assert.isObject(db) - assert.equals(db.location, location) - - async.parallel([ - // 2) insert 3 values with put(), these should be deferred until the database is actually open - db.put.bind(db, 'k1', 'v1') - , db.put.bind(db, 'k2', 'v2') - , db.put.bind(db, 'k3', 'v3') - ], function () { - // 3) when the callbacks have returned, the database should be open and those values should be in - // verify that the values are there - async.forEach( - [1,2,3] - , function (k, cb) { - db.get('k' + k, function (err, v) { - refute(err) - assert.equals(v, 'v' + k) - cb() - }) - } - // sanity, this shouldn't exist - , function () { - db.get('k4', function (err) { - assert(err) - // DONE - done() - }) - } - ) - }) - - // we should still be in a state of limbo down here, not opened or closed, but 'new' - refute(db.isOpen()) - refute(db.isClosed()) - } - - , 'batch() on pre-opened database': function (done) { - var location = common.nextLocation() - // 1) open database without callback, opens in worker thread - , db = levelup(location, { createIfMissing: true, errorIfExists: true, encoding: 'utf8' }) - - this.closeableDatabases.push(db) - this.cleanupDirs.push(location) - assert.isObject(db) - assert.equals(db.location, location) - - // 2) insert 3 values with batch(), these should be deferred until the database is actually open - db.batch([ - { type: 'put', key: 'k1', value: 'v1' } - , { type: 'put', key: 'k2', value: 'v2' } - , { type: 'put', key: 'k3', value: 'v3' } - ], function () { - // 3) when the callbacks have returned, the database should be open and those values should be in - // verify that the values are there - async.forEach( - [1,2,3] - , function (k, cb) { - db.get('k' + k, function (err, v) { - refute(err) - assert.equals(v, 'v' + k) - cb() - }) - } - // sanity, this shouldn't exist - , function () { - db.get('k4', function (err) { - assert(err) - // DONE - done() - }) - } - ) - }) - - // we should still be in a state of limbo down here, not opened or closed, but 'new' - refute(db.isOpen()) - refute(db.isClosed()) - } - - , 'chained batch() on pre-opened database': function (done) { - var location = common.nextLocation() - // 1) open database without callback, opens in worker thread - , db = levelup(location, { createIfMissing: true, errorIfExists: true, encoding: 'utf8' }) - - this.closeableDatabases.push(db) - this.cleanupDirs.push(location) - assert.isObject(db) - assert.equals(db.location, location) - - // 2) insert 3 values with batch(), these should be deferred until the database is actually open - db.batch() - .put('k1', 'v1') - .put('k2', 'v2') - .put('k3', 'v3') - .write(function () { - // 3) when the callbacks have returned, the database should be open and those values should be in - // verify that the values are there - async.forEach( - [1,2,3] - , function (k, cb) { - db.get('k' + k, function (err, v) { - refute(err) - assert.equals(v, 'v' + k) - cb() - }) - } - // sanity, this shouldn't exist - , function () { - db.get('k4', function (err) { - assert(err) - // DONE - done() - }) - } - ) - - }) - - // we should still be in a state of limbo down here, not opened or closed, but 'new' - refute(db.isOpen()) - refute(db.isClosed()) - } - - , 'test deferred ReadStream': { - 'setUp': common.readStreamSetUp - - , 'simple ReadStream': function (done) { - this.openTestDatabase(function (db) { - var location = db.location - db.batch(this.sourceData.slice(), function (err) { - refute(err) - db.close(function (err) { - refute(err, 'no error') - db = levelup(location, { createIfMissing: false, errorIfExists: false }) - var rs = db.createReadStream() - rs.on('data' , this.dataSpy) - rs.on('end' , this.endSpy) - rs.on('close', this.verify.bind(this, rs, done)) - }.bind(this)) - }.bind(this)) - }.bind(this)) - } - } - - , 'maxListeners warning': function (done) { - var location = common.nextLocation() - // 1) open database without callback, opens in worker thread - , db = levelup(location, { createIfMissing: true, errorIfExists: true, encoding: 'utf8' }) - , stderrMock = this.mock(console) - - this.closeableDatabases.push(db) - this.cleanupDirs.push(location) - stderrMock.expects('error').never() - - // 2) provoke an EventEmitter maxListeners warning - var toPut = 11 - - for (var i = 0; i < toPut; i++) { - db.put('some', 'string', function (err) { - refute(err) - - if (!--toPut) { - done() - } - }) - } - } -}) diff --git a/node_modules/browserify-fs/node_modules/levelup/test/destroy-repair-test.js b/node_modules/browserify-fs/node_modules/levelup/test/destroy-repair-test.js deleted file mode 100644 index 1b3a6488..00000000 --- a/node_modules/browserify-fs/node_modules/levelup/test/destroy-repair-test.js +++ /dev/null @@ -1,81 +0,0 @@ -/* Copyright (c) 2012-2014 LevelUP contributors - * See list at - * MIT License - */ - -var levelup = require('../lib/levelup.js') - , leveldown = require('leveldown') - - , assert = require('referee').assert - , refute = require('referee').refute - , buster = require('bustermove') - -buster.testCase('Destroy & Repair', { - 'destroy() is alias for leveldown.destroy()': function () { - var ldmock = this.mock(leveldown) - , expect = ldmock.expects('destroy').once() - levelup.destroy() - ldmock.verify() - assert.same(expect.getCall(0).args[0], undefined) - } - - , 'repair() is alias for leveldown.repair()': function () { - var ldmock = this.mock(leveldown) - , expect = ldmock.expects('repair').once() - levelup.repair() - ldmock.verify() - assert.same(expect.getCall(0).args[0], undefined) - } - - , 'destroy() passes on arguments': function () { - var ldmock = this.mock(leveldown) - , args = [ 'location', function () { } ] - , expect = ldmock - .expects('destroy') - .once() - .withExactArgs(args[0], args[1]) - - levelup.destroy.apply(null, args) - ldmock.verify() - } - - , 'repair() passes on arguments': function () { - var ldmock = this.mock(leveldown) - , args = [ 'location', function () { } ] - , expect = ldmock - .expects('repair') - .once() - .withExactArgs(args[0], args[1]) - - levelup.repair.apply(null, args) - ldmock.verify() - } - - , 'destroy() substitutes missing callback argument': function () { - var ldmock = this.mock(leveldown) - , args = [ 'location' ] - , expect = ldmock - .expects('destroy') - .once() - .withArgs(args[0]) - - levelup.destroy.apply(null, args) - ldmock.verify() - assert.equals(2, expect.getCall(0).args.length) - assert.isFunction(expect.getCall(0).args[1]) - } - - , 'repair() substitutes missing callback argument': function () { - var ldmock = this.mock(leveldown) - , args = [ 'location' ] - , expect = ldmock - .expects('repair') - .once() - .withArgs(args[0]) - - levelup.repair.apply(null, args) - ldmock.verify() - assert.equals(2, expect.getCall(0).args.length) - assert.isFunction(expect.getCall(0).args[1]) - } -}) diff --git a/node_modules/browserify-fs/node_modules/levelup/test/encoding-test.js b/node_modules/browserify-fs/node_modules/levelup/test/encoding-test.js deleted file mode 100644 index 601c8131..00000000 --- a/node_modules/browserify-fs/node_modules/levelup/test/encoding-test.js +++ /dev/null @@ -1,160 +0,0 @@ -/* Copyright (c) 2012-2014 LevelUP contributors - * See list at - * MIT License - */ - -var levelup = require('../lib/levelup.js') - , common = require('./common') - , assert = require('referee').assert - , refute = require('referee').refute - , buster = require('bustermove') - -buster.testCase('Encoding', { - 'setUp': common.readStreamSetUp - - , 'tearDown': common.commonTearDown - - , 'test safe decode in get()': function (done) { - this.openTestDatabase( - { createIfMissing: true, errorIfExists: true, encoding: 'utf8' } - , function (db) { - db.put('foo', 'this {} is [] not : json', function (err) { - refute(err) - db.close(function (err) { - refute(err) - db = levelup(db.location, { createIfMissing: false, errorIfExists: false, valueEncoding: 'json' }) - db.get('foo', function (err, value) { - assert(err) - assert.equals('EncodingError', err.name) - refute(value) - db.close(done) - }) - }) - }) - } - ) - } - - , 'test safe decode in readStream()': function (done) { - this.openTestDatabase( - { createIfMissing: true, errorIfExists: true, encoding: 'utf8' } - , function (db) { - db.put('foo', 'this {} is [] not : json', function (err) { - refute(err) - db.close(function (err) { - refute(err) - - var dataSpy = this.spy() - , errorSpy = this.spy() - - db = levelup(db.location, { createIfMissing: false, errorIfExists: false, valueEncoding: 'json' }) - db.readStream() - .on('data', dataSpy) - .on('error', errorSpy) - .on('close', function () { - assert.equals(dataSpy.callCount, 0, 'no data') - assert.equals(errorSpy.callCount, 1, 'error emitted') - assert.equals('EncodingError', errorSpy.getCall(0).args[0].name) - db.close(done) - }) - }.bind(this)) - }.bind(this)) - }.bind(this) - ) - } - - , 'test encoding = valueEncoding': function (done) { - // write a value as JSON, read as utf8 and check - // the fact that we can get with keyEncoding of utf8 should demonstrate that - // the key is not encoded as JSON - this.openTestDatabase({ encoding: 'json' }, function (db) { - db.put('foo:foo', { bar: 'bar' }, function (err) { - refute(err) - db.get('foo:foo', { keyEncoding: 'utf8', valueEncoding: 'utf8' }, function (err, value) { - refute(err) - assert.equals(value, '{"bar":"bar"}') - db.close(done) - }) - }) - }) - } - , 'test write-stream encoding': function (done) { - this.openTestDatabase({ encoding: 'json' }, function (db) { - var ws = db.createWriteStream({ - keyEncoding : 'utf8', - valueEncoding : 'binary' - }) - ws.on('close', function () { - db.get('foo', { - keyEncoding : 'utf8', - valueEncoding : 'binary' - }, function (err, val) { - refute(err) - assert.equals(val.toString(), '\u0001\u0002\u0003') - db.close(done) - }) - }) - ws.write({ key : 'foo', value : new Buffer([1, 2, 3]) }) - ws.end() - }) - } - , 'test write-stream chunk encoding': function (done) { - this.openTestDatabase({ encoding: 'json' }, function (db) { - var ws = db.createWriteStream({ - keyEncoding : 'utf8', - valueEncoding : 'binary' - }) - ws.on('close', function () { - db.get(new Buffer([1, 2, 3]), { - keyEncoding : 'binary', - valueEncoding : 'json' - }, function (err, val) { - refute(err) - assert.equals(val.some, 'json') - db.close(done) - }) - }) - ws.write({ - key : new Buffer([1, 2, 3]), - value : { some : 'json' }, - keyEncoding : 'binary', - valueEncoding : 'json' - }) - ws.end() - }) - } - , 'test batch op encoding': function (done) { - this.openTestDatabase({ encoding: 'json' }, function (db) { - db.batch([ - { - type : 'put', - key : new Buffer([1, 2, 3]), - value : new Buffer([4, 5, 6]), - keyEncoding : 'binary', - valueEncoding : 'binary' - } - , { - type : 'put', - key : 'string', - value : 'string' - } - ], { keyEncoding : 'utf8', valueEncoding : 'utf8' }, - function (err) { - refute(err) - db.get(new Buffer([1, 2, 3]), { - keyEncoding : 'binary', - valueEncoding : 'binary' - }, function (err, val) { - refute(err) - assert.equals(val.toString(), '\u0004\u0005\u0006') - - db.get('string', { valueEncoding : 'utf8' }, function (err, val) { - refute(err) - assert.equals(val, 'string') - db.close(done) - }) - }) - }) - }) - } -}) diff --git a/node_modules/browserify-fs/node_modules/levelup/test/functional/binary-data-test.js b/node_modules/browserify-fs/node_modules/levelup/test/functional/binary-data-test.js deleted file mode 100644 index ae5b9fb5..00000000 --- a/node_modules/browserify-fs/node_modules/levelup/test/functional/binary-data-test.js +++ /dev/null @@ -1,43 +0,0 @@ -/* Copyright (c) 2012-2014 LevelUP contributors - * See list at - * MIT License - */ - -/* - * This test unpacks a tar file, pushes that data into a - * database then compares the database data with the files - * on the filesystem. - * The different types of data are useful for testing, particularly - * the binary files. - */ - -var async = require('async') - , rimraf = require('rimraf') - , tarcommon = require('./tarcommon') - -console.log('***************************************************') -console.log('RUNNING BINARY-DATA-TEST...') - -async.series([ - // pre-clean - rimraf.bind(null, tarcommon.dblocation) - , rimraf.bind(null, tarcommon.datadir) - // extract data for comparison - , tarcommon.extract.bind(null, tarcommon.datatar, tarcommon.datadir) - // open database - , tarcommon.opendb.bind(null, tarcommon.dblocation) - // push the data into a database - , tarcommon.fstreamWrite - // run a sync put & del to force an fs sync - , tarcommon.sync - // verify database entries are the same as the files - , tarcommon.verify - // clean up - , rimraf.bind(null, tarcommon.dblocation) - , rimraf.bind(null, tarcommon.datadir) -], function (err) { - if (err) console.error('Error', err) - else console.log('No errors? All good then!') - console.log('***************************************************') - process.exit(err ? -1 : 0) -}) diff --git a/node_modules/browserify-fs/node_modules/levelup/test/functional/compat-test.js b/node_modules/browserify-fs/node_modules/levelup/test/functional/compat-test.js deleted file mode 100644 index 672b8c16..00000000 --- a/node_modules/browserify-fs/node_modules/levelup/test/functional/compat-test.js +++ /dev/null @@ -1,50 +0,0 @@ -/* Copyright (c) 2012-2014 LevelUP contributors - * See list at - * MIT License - */ - -/* - * This test verifies that an existing database contains the - * correct data, by comparing it to the original data contained - * in a tar file. - * Useful for comparing across LevelDB versions. - */ - -var async = require('async') - , rimraf = require('rimraf') - , path = require('path') - , tarcommon = require('./tarcommon') - - , dbtar = path.join(__dirname, 'test-data.db.tar') - , dblocation = path.join(__dirname, 'levelup_test_compat.db') - -function runTest (dbtar, callback) { - async.series([ - // pre-clean - rimraf.bind(null, tarcommon.dblocation) - , rimraf.bind(null, dblocation) - , rimraf.bind(null, tarcommon.datadir) - // extract existing database - , tarcommon.extract.bind(null, dbtar, __dirname) - // extract data for comparison - , tarcommon.extract.bind(null, tarcommon.datatar, tarcommon.datadir) - // open database - , tarcommon.opendb.bind(null, dblocation) - // verify database entries are the same as the files - , tarcommon.verify - // clean up - , rimraf.bind(null, tarcommon.dblocation) - , rimraf.bind(null, dblocation) - , rimraf.bind(null, tarcommon.datadir) - ], callback) -} - -console.log('***************************************************') -console.log('RUNNING COMPAT-DATA-TEST...') - -runTest(dbtar, function (err) { - if (err) throw err - console.log('No errors? All good then!') - console.log('***************************************************') - process.exit(err ? -1 : 0) -}) diff --git a/node_modules/browserify-fs/node_modules/levelup/test/functional/fstream-test.js b/node_modules/browserify-fs/node_modules/levelup/test/functional/fstream-test.js deleted file mode 100644 index e1b56c21..00000000 --- a/node_modules/browserify-fs/node_modules/levelup/test/functional/fstream-test.js +++ /dev/null @@ -1,102 +0,0 @@ -/* Copyright (c) 2012-2014 LevelUP contributors - * See list at - * MIT License - */ - -var assert = require('referee').assert - , refute = require('referee').refute - , fstream = require('fstream') - , async = require('async') - , mkfiletree = require('mkfiletree') - , readfiletree = require('readfiletree') - , rimraf = require('rimraf') - , bogan = require('boganipsum') - , levelup = require('../../lib/levelup') - - , fixtureFiles = { - 'foo': 'FOO!\n' - , 'a directory': { - 'bogantastic.txt': bogan() - , 'subdir': { - 'boganmeup.dat': bogan() - , 'sub sub dir': { - 'bar': 'BAR!\n' - , 'maaaaaaaate': bogan() - } - , 'bang': 'POW' - } - , 'boo': 'W00t' - } - } - , dblocation = 'levelup_test_fstream.db' - - , opendb = function (dir, callback) { - levelup(dblocation, { createIfMissing: true , errorIfExists: false }, function (err, db) { - refute(err) - callback(null, dir, db) - }) - } - - , fstreamWrite = function (dir, db, callback) { - fstream.Reader(dir) - .pipe(db.writeStream({ fstreamRoot: dir }) - .on('close', function () { - db.close(function (err) { - refute(err) - callback(null, dir) - }) - })) - } - - , fstreamRead = function (dir, db, callback) { - db.readStream({ type: 'fstream' }) - .pipe(new fstream.Writer({ path: dir + '.out', type: 'Directory' }) - .on('close', function () { - db.close(function (err) { - refute(err) - callback(null, dir) - }) - }) - ) - } - - , verify = function (dir, obj, callback) { - assert.equals(obj, fixtureFiles) - console.log('Guess what?? It worked!!') - callback(null, dir) - } - - , cleanUp = function (dir, callback) { - async.parallel([ - rimraf.bind(null, dir + '.out') - , rimraf.bind(null, dblocation) - , mkfiletree.cleanUp - ], callback) - } - -process.on('uncaughtException', function (err) { - refute(err) -}) - -console.log('***************************************************') -console.log('RUNNING FSTREAM-TEST...') - -async.waterfall([ - rimraf.bind(null, dblocation) - , mkfiletree.makeTemp.bind(null, 'levelup_test_fstream', fixtureFiles) - , opendb - , fstreamWrite - , opendb - , fstreamRead - , function (dir, callback) { - readfiletree(dir, function (err, obj) { - refute(err) - callback(err, dir, obj) - }) - } - , verify - , cleanUp - , function () { - console.log('***************************************************') - } -]) diff --git a/node_modules/browserify-fs/node_modules/levelup/test/functional/tarcommon.js b/node_modules/browserify-fs/node_modules/levelup/test/functional/tarcommon.js deleted file mode 100644 index a9b42731..00000000 --- a/node_modules/browserify-fs/node_modules/levelup/test/functional/tarcommon.js +++ /dev/null @@ -1,97 +0,0 @@ -/* Copyright (c) 2012-2014 LevelUP contributors - * See list at - * MIT License - */ - -var assert = require('referee').assert - , fs = require('fs') - , path = require('path') - , fstream = require('fstream') - , tar = require('tar') - , crypto = require('crypto') - , levelup = require('../../lib/levelup') - - , dblocation = path.join(__dirname, 'levelup_test_binary.db') - , datatar = path.join(__dirname, 'test-data.tar') - , datadir = path.join(__dirname, 'test-data') - , db - , expectedEntries - -module.exports.dblocation = dblocation -module.exports.datatar = datatar -module.exports.datadir = datadir - -module.exports.opendb = function (dblocation, callback) { - levelup( - dblocation - , { createIfMissing: true , errorIfExists: false, keyEncoding: 'utf8', valueEncoding: 'binary' } - , function (err, _db) { - db = _db - console.log('Opened database...') - callback(err) - } - ) -} - -module.exports.extract = function (tarfile, dir, callback) { - expectedEntries = 0 - fs.createReadStream(tarfile) - .pipe(tar.Extract({ path: dir })) - .on('entry', function (entry) { - if (entry.props.File || entry.File || entry.type == 'File') - expectedEntries++ - }) - .on('end', function () { - console.log('Extracted tar file...') - callback() - }) -} - -module.exports.fstreamWrite = function (callback) { - fstream.Reader(datadir) - .pipe(db.writeStream({ fstreamRoot: path.resolve(__dirname) }) - .on('close', function () { - console.log('Piped data to database...') - callback() - })) - .on('error', callback) -} - -// using sync:true will force a flush to the fs, otherwise the readStream() is too -// quick and won't get the full data -module.exports.sync = function (callback) { - db.put('__', '__', { sync: true }, function (err) { - if (err) return callback(err) - db.del('__', { sync: true }, callback) - }) -} - -module.exports.verify = function (callback) { - var entries = 0 - db.readStream() - .on('data', function (data) { - var md5sum = crypto.createHash('md5') - , dbmd5sum - - md5sum.update(data.value) - dbmd5sum = md5sum.digest('hex') - md5sum = crypto.createHash('md5') - entries++ - fs.createReadStream(path.join(__dirname, data.key)) - .on('data', function (d) { md5sum.update(d) }) - .on('end', function () { - var fsmd5sum = md5sum.digest('hex') - assert.equals( - dbmd5sum - , fsmd5sum - , 'MD5 sum compare of ' + data.key + ' failed (' + dbmd5sum + ' != ' + fsmd5sum + ')' - ) - }) - }) - .on('end', function () { - assert.equals(entries, expectedEntries, 'correct number of entries in the database') - console.log('Finished comparing database entries...') - console.log('Cleaning up...') - callback() - }) -} diff --git a/node_modules/browserify-fs/node_modules/levelup/test/get-put-del-test.js b/node_modules/browserify-fs/node_modules/levelup/test/get-put-del-test.js deleted file mode 100644 index 4e47049c..00000000 --- a/node_modules/browserify-fs/node_modules/levelup/test/get-put-del-test.js +++ /dev/null @@ -1,185 +0,0 @@ -/* Copyright (c) 2012-2014 LevelUP contributors - * See list at - * MIT License - */ - -var errors = require('../lib/errors.js') - , async = require('async') - , common = require('./common') - - , assert = require('referee').assert - , refute = require('referee').refute - , buster = require('bustermove') - -buster.testCase('get() / put() / del()', { - 'setUp': common.commonSetUp - , 'tearDown': common.commonTearDown - - , 'Simple operations': { - 'get() on empty database causes error': function (done) { - this.openTestDatabase(function (db) { - db.get('undefkey', function (err, value) { - refute(value) - assert.isInstanceOf(err, Error) - assert.isInstanceOf(err, errors.LevelUPError) - assert.isInstanceOf(err, errors.NotFoundError) - assert(err.notFound === true, 'err.notFound is `true`') - assert.equals(err.status, 404, 'err.status is 404') - assert.match(err, '[undefkey]') - done() - }) - }) - } - - , 'put() and get() simple string key/value pairs': function (done) { - this.openTestDatabase(function (db) { - db.put('some key', 'some value stored in the database', function (err) { - refute(err) - db.get('some key', function (err, value) { - refute(err) - assert.equals(value, 'some value stored in the database') - done() - }) - }) - }) - } - - , 'del() on empty database doesn\'t cause error': function (done) { - this.openTestDatabase(function (db) { - db.del('undefkey', function (err) { - refute(err) - done() - }) - }) - } - - , 'del() works on real entries': function (done) { - this.openTestDatabase(function (db) { - async.series( - [ - function (callback) { - async.forEach( - ['foo', 'bar', 'baz'] - , function (key, callback) { - db.put(key, 1 + Math.random(), callback) - } - , callback - ) - } - , function (callback) { - db.del('bar', callback) - } - , function (callback) { - async.forEach( - ['foo', 'bar', 'baz'] - , function (key, callback) { - db.get(key, function (err, value) { - // we should get foo & baz but not bar - if (key == 'bar') { - assert(err) - refute(value) - } else { - refute(err) - assert(value) - } - callback() - }) - } - , callback - ) - } - ] - , done - ) - }) - } - } - - , 'test get() throwables': function (done) { - this.openTestDatabase(function (db) { - - assert.exception( - db.get.bind(db) - , { name: 'ReadError', message: 'get() requires key and callback arguments' } - , 'no-arg get() throws' - ) - - assert.exception( - db.get.bind(db, 'foo') - , { name: 'ReadError', message: 'get() requires key and callback arguments' } - , 'callback-less, 1-arg get() throws' - ) - - assert.exception( - db.get.bind(db, 'foo', {}) - , { name: 'ReadError', message: 'get() requires key and callback arguments' } - , 'callback-less, 2-arg get() throws' - ) - - done() - }) - } - - , 'test put() throwables': function (done) { - this.openTestDatabase(function (db) { - - assert.exception( - db.put.bind(db) - , { name: 'WriteError', message: 'put() requires key and value arguments' } - , 'no-arg put() throws' - ) - - assert.exception( - db.put.bind(db, 'foo') - , { name: 'WriteError', message: 'put() requires key and value arguments' } - , 'callback-less, 1-arg put() throws' - ) - - done() - }) - } - - , 'test del() throwables': function (done) { - this.openTestDatabase(function (db) { - - assert.exception( - db.del.bind(db) - , { name: 'WriteError', message: 'del() requires a key argument' } - , 'no-arg del() throws' - ) - - done() - }) - } - - , 'test approximateSize() throwables': function (done) { - this.openTestDatabase(function (db) { - - assert.exception( - db.approximateSize.bind(db) - , { name: 'ReadError', message: 'approximateSize() requires start, end and callback arguments' } - , 'no-arg approximateSize() throws' - ) - - assert.exception( - db.approximateSize.bind(db, 'foo') - , { name: 'ReadError', message: 'approximateSize() requires start, end and callback arguments' } - , 'callback-less, 1-arg approximateSize() throws' - ) - - assert.exception( - db.approximateSize.bind(db, 'foo', 'bar') - , { name: 'ReadError', message: 'approximateSize() requires start, end and callback arguments' } - , 'callback-less, 2-arg approximateSize() throws' - ) - - assert.exception( - db.approximateSize.bind(db, 'foo', 'bar', {}) - , { name: 'ReadError', message: 'approximateSize() requires start, end and callback arguments' } - , 'callback-less, 3-arg approximateSize(), no cb throws' - ) - - done() - }) - } -}) diff --git a/node_modules/browserify-fs/node_modules/levelup/test/idempotent-test.js b/node_modules/browserify-fs/node_modules/levelup/test/idempotent-test.js deleted file mode 100644 index 619e197f..00000000 --- a/node_modules/browserify-fs/node_modules/levelup/test/idempotent-test.js +++ /dev/null @@ -1,57 +0,0 @@ -/* Copyright (c) 2012-2014 LevelUP contributors - * See list at - * MIT License - */ - -var levelup = require('../lib/levelup.js') - , common = require('./common') - - , assert = require('referee').assert - , refute = require('referee').refute - , buster = require('bustermove') - -buster.testCase('Idempotent open & close', { - 'setUp': common.readStreamSetUp - - , 'tearDown': common.commonTearDown - - , 'call open twice, should emit "open" once': function (done) { - var location = common.nextLocation() - , n = 0 - , m = 0 - , db - , close = function () { - var closing = this.spy() - db.on('closing', closing) - db.on('closed', function () { - assert.equals(closing.callCount, 1) - assert.equals(closing.getCall(0).args, []) - done() - }) - - //close needs to be idempotent too. - db.close() - process.nextTick(db.close.bind(db)) - }.bind(this) - - this.cleanupDirs.push(location) - - db = levelup( - location - , { createIfMissing: true } - , function () { - assert.equals(n++, 0, 'callback should fire only once') - if (n && m) - close() - } - ) - - db.on('open', function () { - assert.equals(m++, 0, 'callback should fire only once') - if (n && m) - close() - }) - - db.open() - } -}) diff --git a/node_modules/browserify-fs/node_modules/levelup/test/init-test.js b/node_modules/browserify-fs/node_modules/levelup/test/init-test.js deleted file mode 100644 index 7fc3fb8e..00000000 --- a/node_modules/browserify-fs/node_modules/levelup/test/init-test.js +++ /dev/null @@ -1,217 +0,0 @@ -/* Copyright (c) 2012-2014 LevelUP contributors - * See list at - * MIT License - */ - -var levelup = require('../lib/levelup.js') - , errors = require('../lib/errors.js') - , fs = require('fs') - , common = require('./common') - - , assert = require('referee').assert - , refute = require('referee').refute - , buster = require('bustermove') - , MemDOWN = require('memdown') - -buster.testCase('Init & open()', { - 'setUp': common.commonSetUp - , 'tearDown': common.commonTearDown - - , 'levelup()': function () { - assert.isFunction(levelup) - assert.equals(levelup.length, 3) // location, options & callback arguments - assert.exception(levelup, 'InitializationError') // no location - } - - , 'default options': function (done) { - var location = common.nextLocation() - levelup(location, { createIfMissing: true, errorIfExists: true }, function (err, db) { - refute(err, 'no error') - assert.isTrue(db.isOpen()) - this.closeableDatabases.push(db) - this.cleanupDirs.push(location) - db.close(function (err) { - refute(err) - - assert.isFalse(db.isOpen()) - - levelup(location, function (err, db) { // no options object - refute(err) - assert.isObject(db) - assert.isTrue(db.options.createIfMissing) - assert.isFalse(db.options.errorIfExists) - assert.equals(db.options.keyEncoding, 'utf8') - assert.equals(db.options.valueEncoding, 'utf8') - assert.equals(db.location, location) - - // read-only properties - db.location = 'foo' - assert.equals(db.location, location) - - done() - }.bind(this)) - }.bind(this)) - }.bind(this)) - } - - , 'basic options': function (done) { - var location = common.nextLocation() - levelup( - location - , { createIfMissing: true, errorIfExists: true, encoding: 'binary' } - , function (err, db) { - refute(err) - - this.closeableDatabases.push(db) - this.cleanupDirs.push(location) - assert.isObject(db) - assert.isTrue(db.options.createIfMissing) - assert.isTrue(db.options.errorIfExists) - assert.equals(db.options.keyEncoding, 'utf8') - assert.equals(db.options.valueEncoding, 'binary') - assert.equals(db.location, location) - - - // read-only properties - db.location = 'bar' - assert.equals(db.location, location) - - done() - }.bind(this) - ) - } - - , 'options with encoding': function (done) { - var location = common.nextLocation() - levelup( - location - , { createIfMissing: true, errorIfExists: true, keyEncoding: 'ascii', valueEncoding: 'json' } - , function (err, db) { - refute(err) - - this.closeableDatabases.push(db) - this.cleanupDirs.push(location) - assert.isObject(db) - assert.isTrue(db.options.createIfMissing) - assert.isTrue(db.options.errorIfExists) - assert.equals(db.options.keyEncoding, 'ascii') - assert.equals(db.options.valueEncoding, 'json') - assert.equals(db.location, location) - - - // read-only properties - db.location = 'bar' - assert.equals(db.location, location) - - done() - }.bind(this) - ) - } - - , 'without callback': function (done) { - var location = common.nextLocation() - , db = levelup(location, { createIfMissing: true, errorIfExists: true }) - - this.closeableDatabases.push(db) - this.cleanupDirs.push(location) - assert.isObject(db) - assert.isTrue(db.options.createIfMissing) - assert.isTrue(db.options.errorIfExists) - assert.equals(db.location, location) - - db.on("ready", function () { - assert.isTrue(db.isOpen()) - done() - }) - } - - , 'open() with !createIfMissing expects error': function (done) { - levelup(this.cleanupDirs[0] = common.nextLocation(), { createIfMissing: false }, function (err, db) { - assert(err) - refute(db) - assert.isInstanceOf(err, Error) - assert.isInstanceOf(err, errors.LevelUPError) - assert.isInstanceOf(err, errors.OpenError) - assert(err.notFound === undefined, 'err.notFound is `undefined`, should only be on NotFoundError') - done() - }.bind(this)) - } - - , 'open() with createIfMissing expects directory to be created': function (done) { - levelup(this.cleanupDirs[0] = common.nextLocation(), { createIfMissing: true }, function (err, db) { - this.closeableDatabases.push(db) - refute(err) - assert.isTrue(db.isOpen()) - fs.stat(this.cleanupDirs[0], function (err, stat) { - refute(err) - assert(stat.isDirectory()) - done() - }) - }.bind(this)) - } - - , 'open() with errorIfExists expects error if exists': function (done) { - levelup(this.cleanupDirs[0] = common.nextLocation(), { createIfMissing: true }, function (err, db) { - this.closeableDatabases.push(db) - refute(err) // sanity - levelup(this.cleanupDirs[0], { errorIfExists : true }, function (err) { - assert(err) - assert.isInstanceOf(err, Error) - assert.isInstanceOf(err, errors.LevelUPError) - assert.isInstanceOf(err, errors.OpenError) - done() - }) - }.bind(this)) - } - - , 'open() with !errorIfExists does not expect error if exists': function (done) { - levelup(this.cleanupDirs[0] = common.nextLocation(), { createIfMissing: true }, function (err, db) { - refute(err) // sanity - this.closeableDatabases.push(db) - assert.isTrue(db.isOpen()) - - db.close(function () { - assert.isFalse(db.isOpen()) - - levelup(this.cleanupDirs[0], { errorIfExists : false }, function (err, db) { - refute(err) - this.closeableDatabases.push(db) - assert.isTrue(db.isOpen()) - done() - }.bind(this)) - }.bind(this)) - }.bind(this)) - } - - , 'constructor with options argument uses factory': function (done) { - var db = levelup({ db: MemDOWN }) - assert.isNull(db.location, 'location property is null') - db.on('open', function () { - assert(db.db instanceof MemDOWN, 'using a memdown backend') - assert.same(db.db.location, '', 'db location property is ""') - db.put('foo', 'bar', function (err) { - refute(err, 'no error') - db.get('foo', function (err, value) { - assert.equals(value, 'bar', 'correct value') - done() - }) - }) - }) - } - - , 'constructor with only function argument uses factory': function (done) { - var db = levelup(MemDOWN) - assert.isNull(db.location, 'location property is null') - db.on('open', function () { - assert(db.db instanceof MemDOWN, 'using a memdown backend') - assert.same(db.db.location, '', 'db location property is ""') - db.put('foo', 'bar', function (err) { - refute(err, 'no error') - db.get('foo', function (err, value) { - assert.equals(value, 'bar', 'correct value') - done() - }) - }) - }) - } -}) diff --git a/node_modules/browserify-fs/node_modules/levelup/test/inject-encoding-test.js b/node_modules/browserify-fs/node_modules/levelup/test/inject-encoding-test.js deleted file mode 100644 index 05885fbd..00000000 --- a/node_modules/browserify-fs/node_modules/levelup/test/inject-encoding-test.js +++ /dev/null @@ -1,104 +0,0 @@ -/* Copyright (c) 2012-2014 LevelUP contributors - * See list at - * MIT License - */ - -var levelup = require('../lib/levelup.js') - , async = require('async') - , common = require('./common') - , msgpack = require('msgpack-js') - - , assert = require('referee').assert - , refute = require('referee').refute - , buster = require('bustermove') - -buster.testCase('JSON API', { - 'setUp': function (done) { - common.commonSetUp.call(this, function () { - this.runTest = function (testData, assertType, done) { - var location = common.nextLocation() - this.cleanupDirs.push(location) - console.log(location) - levelup(location, { - createIfMissing: true, - errorIfExists: true, - encoding: { - encode: msgpack.encode, - decode: msgpack.decode, - buffer: true, - type: 'msgpack' - } - }, function (err, db) { - refute(err) - if (err) return - - this.closeableDatabases.push(db) - - async.parallel( - testData.map(function (d) { return db.put.bind(db, d.key, d.value) }) - , function (err) { - refute(err) - - async.forEach( - testData - , function (d, callback) { - db.get(d.key, function (err, value) { - if(err) console.error(err.stack) - refute(err) - assert[assertType](d.value, value) - callback() - }) - } - , done - ) - } - ) - - }.bind(this)) - } - done() - }.bind(this)) - } - - , 'tearDown': common.commonTearDown - - , 'simple-object values in "json" encoding': function (done) { - this.runTest([ - { key: '0', value: 0 } - , { key: '1', value: 1 } - , { key: 'string', value: 'a string' } - , { key: 'true', value: true } - , { key: 'false', value: false } - ], 'same', done) - } - - , 'simple-object keys in "json" encoding': function (done) { - this.runTest([ - { value: '0', key: 0 } - , { value: '1', key: 1 } - , { value: 'string', key: 'a string' } - , { value: 'true', key: true } - , { value: 'false', key: false } - ], 'same', done) - } - - , 'complex-object values in "json" encoding': function (done) { - this.runTest([ - { key: '0', value: { - foo: 'bar' - , bar: [ 1, 2, 3 ] - , bang: { yes: true, no: false } - }} - ], 'equals', done) - } - - , 'complex-object keys in "json" encoding': function (done) { - this.runTest([ - { value: '0', key: { - foo: 'bar' - , bar: [ 1, 2, 3 ] - , bang: { yes: true, no: false } - }} - ], 'same', done) - } -}); diff --git a/node_modules/browserify-fs/node_modules/levelup/test/json-test.js b/node_modules/browserify-fs/node_modules/levelup/test/json-test.js deleted file mode 100644 index 43212089..00000000 --- a/node_modules/browserify-fs/node_modules/levelup/test/json-test.js +++ /dev/null @@ -1,93 +0,0 @@ -/* Copyright (c) 2012-2014 LevelUP contributors - * See list at - * MIT License - */ - -var levelup = require('../lib/levelup.js') - , async = require('async') - , common = require('./common') - - , assert = require('referee').assert - , refute = require('referee').refute - , buster = require('bustermove') - -buster.testCase('JSON API', { - 'setUp': function (done) { - common.commonSetUp.call(this, function () { - this.runTest = function (testData, assertType, done) { - var location = common.nextLocation() - this.cleanupDirs.push(location) - levelup(location, { createIfMissing: true, errorIfExists: true, encoding: {encode: JSON.stringify, decode: JSON.parse }}, function (err, db) { - refute(err) - if (err) return - - this.closeableDatabases.push(db) - - async.parallel( - testData.map(function (d) { return db.put.bind(db, d.key, d.value) }) - , function (err) { - refute(err) - - async.forEach( - testData - , function (d, callback) { - db.get(d.key, function (err, value) { - if(err) console.error(err.stack) - refute(err) - assert[assertType](d.value, value) - callback() - }) - } - , done - ) - } - ) - - }.bind(this)) - } - done() - }.bind(this)) - } - - , 'tearDown': common.commonTearDown - - , 'simple-object values in "json" encoding': function (done) { - this.runTest([ - { key: '0', value: 0 } - , { key: '1', value: 1 } - , { key: 'string', value: 'a string' } - , { key: 'true', value: true } - , { key: 'false', value: false } - ], 'same', done) - } - - , 'simple-object keys in "json" encoding': function (done) { - this.runTest([ - { value: '0', key: 0 } - , { value: '1', key: 1 } - , { value: 'string', key: 'a string' } - , { value: 'true', key: true } - , { value: 'false', key: false } - ], 'same', done) - } - - , 'complex-object values in "json" encoding': function (done) { - this.runTest([ - { key: '0', value: { - foo: 'bar' - , bar: [ 1, 2, 3 ] - , bang: { yes: true, no: false } - }} - ], 'equals', done) - } - - , 'complex-object keys in "json" encoding': function (done) { - this.runTest([ - { value: '0', key: { - foo: 'bar' - , bar: [ 1, 2, 3 ] - , bang: { yes: true, no: false } - }} - ], 'same', done) - } -}); diff --git a/node_modules/browserify-fs/node_modules/levelup/test/key-value-streams-test.js b/node_modules/browserify-fs/node_modules/levelup/test/key-value-streams-test.js deleted file mode 100644 index eff5c827..00000000 --- a/node_modules/browserify-fs/node_modules/levelup/test/key-value-streams-test.js +++ /dev/null @@ -1,109 +0,0 @@ -/* Copyright (c) 2012-2014 LevelUP contributors - * See list at - * MIT License - */ - -var common = require('./common') - - , assert = require('referee').assert - , refute = require('referee').refute - , buster = require('bustermove') - , delayed = require('delayed').delayed - -buster.testCase('Key and Value Streams', { - 'setUp': function (done) { - common.commonSetUp.call(this, function () { - this.dataSpy = this.spy() - this.endSpy = this.spy() - this.sourceData = [] - - for (var i = 0; i < 100; i++) { - var k = (i < 10 ? '0' : '') + i - this.sourceData.push({ - type : 'put' - , key : k - , value : Math.random() - }) - } - - this.sourceKeys = Object.keys(this.sourceData) - .map(function (k) { return this.sourceData[k].key }.bind(this)) - this.sourceValues = Object.keys(this.sourceData) - .map(function (k) { return this.sourceData[k].value }.bind(this)) - - this.verify = delayed(function (rs, data, done) { - assert.equals(this.endSpy.callCount, 1, 'Stream emitted single "end" event') - assert.equals(this.dataSpy.callCount, data.length, 'Stream emitted correct number of "data" events') - data.forEach(function (d, i) { - var call = this.dataSpy.getCall(i) - if (call) { - //console.log('call', i, ':', call.args[0].key, '=', call.args[0].value, '(expected', d.key, '=', d.value, ')') - assert.equals(call.args.length, 1, 'Stream "data" event #' + i + ' fired with 1 argument') - assert.equals(+call.args[0].toString(), +d, 'Stream correct "data" event #' + i + ': ' + d) - } - }.bind(this)) - done() - }, 0.05, this) - - done() - }.bind(this)) - } - - , 'tearDown': common.commonTearDown - - , 'test .keyStream()': function (done) { - this.openTestDatabase(function (db) { - // execute - db.batch(this.sourceData.slice(), function (err) { - refute(err) - - var rs = db.keyStream() - rs.on('data', this.dataSpy) - rs.on('end', this.endSpy) - rs.on('close', this.verify.bind(this, rs, this.sourceKeys, done)) - }.bind(this)) - }.bind(this)) - } - - , 'test .readStream({keys:true,values:false})': function (done) { - this.openTestDatabase(function (db) { - // execute - db.batch(this.sourceData.slice(), function (err) { - refute(err) - - var rs = db.readStream({ keys: true, values: false }) - rs.on('data', this.dataSpy) - rs.on('end', this.endSpy) - rs.on('close', this.verify.bind(this, rs, this.sourceKeys, done)) - }.bind(this)) - }.bind(this)) - } - - , 'test .valueStream()': function (done) { - this.openTestDatabase(function (db) { - // execute - db.batch(this.sourceData.slice(), function (err) { - refute(err) - - var rs = db.valueStream() - rs.on('data', this.dataSpy) - rs.on('end', this.endSpy) - rs.on('close', this.verify.bind(this, rs, this.sourceValues, done)) - }.bind(this)) - }.bind(this)) - } - - , 'test .readStream({keys:false,values:true})': function (done) { - this.openTestDatabase(function (db) { - // execute - db.batch(this.sourceData.slice(), function (err) { - refute(err) - - var rs = db.readStream({ keys: false, values: true }) - rs.on('data', this.dataSpy) - rs.on('end', this.endSpy) - rs.on('close', this.verify.bind(this, rs, this.sourceValues, done)) - }.bind(this)) - }.bind(this)) - } -}) diff --git a/node_modules/browserify-fs/node_modules/levelup/test/leveldown-substitution-test.js b/node_modules/browserify-fs/node_modules/levelup/test/leveldown-substitution-test.js deleted file mode 100644 index 6789286d..00000000 --- a/node_modules/browserify-fs/node_modules/levelup/test/leveldown-substitution-test.js +++ /dev/null @@ -1,56 +0,0 @@ -/* Copyright (c) 2012-2014 LevelUP contributors - * See list at - * MIT License - */ - -var levelup = require('../lib/levelup.js') - , assert = require('referee').assert - , refute = require('referee').refute - , buster = require('bustermove') - , MemDOWN = require('memdown') - -require('./common') - -buster.testCase('LevelDOWN Substitution', { - 'test substitution of LevelDOWN with MemDOWN': function (done) { - var md = new MemDOWN('foo') - , db = - levelup('/somewhere/not/writable/booya!', { db: function () { return md } }) - , entries = [] - , expected = [ - { key: 'a', value: 'A' } - , { key: 'b', value: 'B' } - , { key: 'c', value: 'C' } - , { key: 'd', value: 'D' } - , { key: 'e', value: 'E' } - , { key: 'f', value: 'F' } - , { key: 'i', value: 'I' } - ] - - db.put('f', 'F') - db.put('h', 'H') - db.put('i', 'I') - db.put('a', 'A') - db.put('c', 'C') - db.put('e', 'E') - db.del('g') - db.batch([ - { type: 'put', key: 'd', value: 'D' } - , { type: 'del', key: 'h' } - , { type: 'put', key: 'b', value: 'B' } - ]) - - db.createReadStream() - .on('data', function (data) { entries.push(data) }) - .on('error', function (err) { refute(err, 'readStream emitted an error') }) - .on('close', function () { - assert.equals(entries, expected, 'correct entries') - assert.equals( - md._keys - , expected.map(function (e) { return e.key }) - , 'memdown has the entries' - ) - done() - }) - } -}) diff --git a/node_modules/browserify-fs/node_modules/levelup/test/null-and-undefined-test.js b/node_modules/browserify-fs/node_modules/levelup/test/null-and-undefined-test.js deleted file mode 100644 index 0175477b..00000000 --- a/node_modules/browserify-fs/node_modules/levelup/test/null-and-undefined-test.js +++ /dev/null @@ -1,133 +0,0 @@ -/* Copyright (c) 2012-2014 LevelUP contributors - * See list at - * MIT License - */ - -var levelup = require('../lib/levelup.js') - , errors = require('../lib/errors.js') - , common = require('./common') - - , assert = require('referee').assert - , refute = require('referee').refute - , buster = require('bustermove') - -buster.testCase('null & undefined keys & values', { - 'setUp': common.commonSetUp - , 'tearDown': common.commonTearDown - - , 'null and undefined': { - 'setUp': function (done) { - levelup(this.cleanupDirs[0] = common.nextLocation(), { createIfMissing: true }, function (err, db) { - refute(err) // sanity - this.closeableDatabases.push(db) - assert.isTrue(db.isOpen()) - this.db = db - done() - }.bind(this)) - } - - , 'get() with null key causes error': function (done) { - this.db.get(null, function (err, value) { - refute(value) - assert.isInstanceOf(err, Error) - assert.isInstanceOf(err, errors.LevelUPError) - done() - }) - } - - , 'get() with undefined key causes error': function (done) { - this.db.get(undefined, function (err, value) { - refute(value) - assert.isInstanceOf(err, Error) - assert.isInstanceOf(err, errors.LevelUPError) - done() - }) - } - - , 'del() with null key causes error': function (done) { - this.db.del(null, function (err, value) { - refute(value) - assert.isInstanceOf(err, Error) - assert.isInstanceOf(err, errors.LevelUPError) - done() - }) - } - - , 'del() with undefined key causes error': function (done) { - this.db.del(undefined, function (err, value) { - refute(value) - assert.isInstanceOf(err, Error) - assert.isInstanceOf(err, errors.LevelUPError) - done() - }) - } - - , 'put() with null key causes error': function (done) { - this.db.put(null, 'foo', function (err, value) { - refute(value) - assert.isInstanceOf(err, Error) - assert.isInstanceOf(err, errors.LevelUPError) - done() - }) - } - - , 'put() with undefined key causes error': function (done) { - this.db.put(undefined, 'foo', function (err, value) { - refute(value) - assert.isInstanceOf(err, Error) - assert.isInstanceOf(err, errors.LevelUPError) - done() - }) - } - - , 'put() with null value causes error': function (done) { - this.db.put('foo', null, function (err, value) { - refute(value) - assert.isInstanceOf(err, Error) - assert.isInstanceOf(err, errors.LevelUPError) - done() - }) - } - - , 'put() with undefined value causes error': function (done) { - this.db.put('foo', undefined, function (err, value) { - refute(value) - assert.isInstanceOf(err, Error) - assert.isInstanceOf(err, errors.LevelUPError) - done() - }) - } - , 'batch() with undefined value causes error': function (done) { - this.db.batch([{key: 'foo', value: undefined, type: 'put'}] - , function (err) { - assert.isInstanceOf(err, Error) - assert.isInstanceOf(err, errors.LevelUPError) - done() - }) - } - , 'batch() with null value causes error': function (done) { - this.db.batch([{key: 'foo', value: null, type: 'put'}] - , function (err) { - assert.isInstanceOf(err, Error) - assert.isInstanceOf(err, errors.LevelUPError) - done() - }) - } - , 'batch() with undefined key causes error': function (done) { - this.db.batch([{key: undefined, value: 'bar', type: 'put'}] - , function (err) { - assert.isInstanceOf(err, Error) - assert.isInstanceOf(err, errors.LevelUPError) - done() - }) - } - , 'batch() with null key causes error': function (done) { - this.db.batch([{key: null, value: 'bar', type: 'put'}] - , function (err) { - assert.isInstanceOf(err, Error) - assert.isInstanceOf(err, errors.LevelUPError) - done() - }) - } - } -}) diff --git a/node_modules/browserify-fs/node_modules/levelup/test/open-patchsafe-test.js b/node_modules/browserify-fs/node_modules/levelup/test/open-patchsafe-test.js deleted file mode 100644 index 80645179..00000000 --- a/node_modules/browserify-fs/node_modules/levelup/test/open-patchsafe-test.js +++ /dev/null @@ -1,81 +0,0 @@ -/* Copyright (c) 2012-2014 LevelUP contributors - * See list at - * MIT License - */ - -var levelup = require('../lib/levelup.js') - , common = require('./common') - - , assert = require('referee').assert - , refute = require('referee').refute - , buster = require('bustermove') - -function test(fun) { - return function (done) { - var location = common.nextLocation() - // 1) open database without callback, opens in worker thread - , db = levelup(location, { createIfMissing: true, errorIfExists: true, encoding: 'utf8'}) - - this.closeableDatabases.push(db) - this.cleanupDirs.push(location) - assert.isObject(db) - assert.equals(db.location, location) - - fun(db, done) - // we should still be in a state of limbo down here, not opened or closed, but 'new' - refute(db.isOpen()) - refute(db.isClosed()) - } -} - - -buster.testCase('Deferred open() is patch-safe', { - 'setUp': common.commonSetUp - , 'tearDown': common.commonTearDown - - , 'put() on pre-opened database': test(function (db, done) { - var put = db.put - , called = 0 - - db.put = function () { - called ++ - return put.apply(this, arguments) - } - - db.put('key', 'VALUE', function () { - assert.equals(called, 1) - done() - }) - }) - , 'del() on pre-opened database': test(function (db, done) { - var del = db.del - , called = 0 - - db.del = function () { - called ++ - return del.apply(this, arguments) - } - - db.del('key', function () { - assert.equals(called, 1) - done() - }) - }) - , 'batch() on pre-opened database': test(function (db, done) { - var batch = db.batch - , called = 0 - - db.batch = function () { - called ++ - return batch.apply(this, arguments) - } - - db.batch([ - {key:'key', value: 'v', type: 'put'} - , {key:'key2', value: 'v2', type: 'put'} - ], function () { - assert.equals(called, 1) - done() - }) - }) -}) diff --git a/node_modules/browserify-fs/node_modules/levelup/test/optional-leveldown-test.js b/node_modules/browserify-fs/node_modules/levelup/test/optional-leveldown-test.js deleted file mode 100644 index 9f74e433..00000000 --- a/node_modules/browserify-fs/node_modules/levelup/test/optional-leveldown-test.js +++ /dev/null @@ -1,72 +0,0 @@ -/* Copyright (c) 2012-2014 LevelUP contributors - * See list at - * MIT License - */ - -var assert = require('referee').assert - , refute = require('referee').refute - , buster = require('bustermove') - , errors = require('../lib/errors') - -function clearCache () { - delete require.cache[require.resolve('..')] - delete require.cache[require.resolve('leveldown')] - delete require.cache[require.resolve('leveldown/package')] - delete require.cache[require.resolve('../lib/util')] -} - -buster.testCase('Optional LevelDOWN', { - 'setUp': clearCache - , 'tearDown': clearCache - - , 'test getLevelDOWN()': function () { - var util = require('../lib/util') - assert.same(util.getLevelDOWN(), require('leveldown'), 'correct leveldown provided') - } - - , 'test wrong version': function () { - var levelup = require('..') - require('leveldown/package').version = '0.0.0' - assert.exception(levelup.bind(null, '/foo/bar'), function (err) { - if (err.name != 'LevelUPError') - return false - if (!/Installed version of LevelDOWN \(0\.0\.0\) does not match required version \(~\d+\.\d+\.\d+\)/.test(err.message)) - return false - return true - }) - } - - , 'test no leveldown/package': function () { - var levelup = require('..') - // simulate an exception from a require() that doesn't resolved a package - Object.defineProperty(require.cache, require.resolve('leveldown/package'), { - get: function() { - throw new Error('Wow, this is kind of evil isn\'t it?') - } - }) - assert.exception(levelup.bind(null, '/foo/bar'), function (err) { - if (err.name != 'LevelUPError') - return false - if ('Could not locate LevelDOWN, try `npm install leveldown`' != err.message) - return false - return true - }) - } - - , 'test no leveldown': function () { - var levelup = require('..') - // simulate an exception from a require() that doesn't resolved a package - Object.defineProperty(require.cache, require.resolve('leveldown'), { - get: function() { - throw new Error('Wow, this is kind of evil isn\'t it?') - } - }) - assert.exception(levelup.bind(null, '/foo/bar'), function (err) { - if (err.name != 'LevelUPError') - return false - if ('Could not locate LevelDOWN, try `npm install leveldown`' != err.message) - return false - return true - }) - } -}) diff --git a/node_modules/browserify-fs/node_modules/levelup/test/read-stream-test.js b/node_modules/browserify-fs/node_modules/levelup/test/read-stream-test.js deleted file mode 100644 index fc5f845d..00000000 --- a/node_modules/browserify-fs/node_modules/levelup/test/read-stream-test.js +++ /dev/null @@ -1,685 +0,0 @@ -/* Copyright (c) 2012-2014 LevelUP contributors - * See list at - * MIT License - */ - -var levelup = require('../lib/levelup.js') - , common = require('./common') - , SlowStream = require('slow-stream') - , delayed = require('delayed') - , rimraf = require('rimraf') - , async = require('async') - , msgpack = require('msgpack-js') - - , assert = require('referee').assert - , refute = require('referee').refute - , buster = require('bustermove') - - , bigBlob = Array.apply(null, Array(1024 * 100)).map(function () { return 'aaaaaaaaaa' }).join('') - -buster.testCase('ReadStream', { - 'setUp': common.readStreamSetUp - - , 'tearDown': common.commonTearDown - - //TODO: test various encodings - - , 'test simple ReadStream': function (done) { - this.openTestDatabase(function (db) { - // execute - db.batch(this.sourceData.slice(), function (err) { - refute(err) - - var rs = db.createReadStream() - rs.on('data' , this.dataSpy) - rs.on('end' , this.endSpy) - rs.on('close', this.verify.bind(this, rs, done)) - }.bind(this)) - }.bind(this)) - } - - , 'test pausing': function (done) { - var calls = 0 - , rs - , pauseVerify = function () { - assert.equals(calls, 5, 'stream should still be paused') - rs.resume() - pauseVerify.called = true - } - , onData = function () { - if (++calls == 5) { - rs.pause() - setTimeout(pauseVerify, 50) - } - } - , verify = function () { - assert.equals(calls, this.sourceData.length, 'onData was used in test') - assert(pauseVerify.called, 'pauseVerify was used in test') - this.verify(rs, done) - }.bind(this) - - this.dataSpy = this.spy(onData) // so we can still verify - - this.openTestDatabase(function (db) { - // execute - db.batch(this.sourceData.slice(), function (err) { - refute(err) - - rs = db.createReadStream() - rs.on('data' , this.dataSpy) - rs.on('end' , this.endSpy) - rs.on('end', verify.bind(this)) - - }.bind(this)) - }.bind(this)) - } - - , 'test destroy() immediately': function (done) { - this.openTestDatabase(function (db) { - db.batch(this.sourceData.slice(), function (err) { - refute(err) - - var rs = db.createReadStream() - rs.on('data' , this.dataSpy) - rs.on('end' , this.endSpy) - rs.on('close', function () { - assert.equals(this.dataSpy.callCount , 0, '"data" event was not fired') - assert.equals(this.endSpy.callCount , 0, '"end" event was not fired') - done() - }.bind(this)) - rs.destroy() - }.bind(this)) - }.bind(this)) - } - - , 'test destroy() after close': function (done) { - this.openTestDatabase(function (db) { - db.batch(this.sourceData.slice(), function (err) { - refute(err) - - var rs = db.createReadStream() - rs.on('data' , this.dataSpy) - rs.on('end' , this.endSpy) - rs.on('close', function () { - rs.destroy() - done() - }.bind(this)) - }.bind(this)) - }.bind(this)) - } - - , 'test destroy() after closing db': function (done) { - this.openTestDatabase(function (db) { - db.batch(this.sourceData.slice(), function (err) { - refute(err) - db.close(function (err) { - var rs = db.createReadStream() - rs.destroy() - done() - }.bind(this)) - }.bind(this)) - }.bind(this)) - } - - , 'test destroy() twice': function (done) { - this.openTestDatabase(function (db) { - db.batch(this.sourceData.slice(), function (err) { - refute(err) - - var rs = db.createReadStream() - rs.on('data' , function () { - rs.destroy() - rs.destroy() - done() - }) - }.bind(this)) - }.bind(this)) - } - - , 'test destroy() half way through': function (done) { - this.openTestDatabase(function (db) { - db.batch(this.sourceData.slice(), function (err) { - refute(err) - - var rs = db.createReadStream() - , endSpy = this.spy() - , calls = 0 - this.dataSpy = this.spy(function () { - if (++calls == 5) - rs.destroy() - }) - rs.on('data' , this.dataSpy) - rs.on('end' , endSpy) - rs.on('close', function () { - // assert.equals(this.readySpy.callCount, 1, 'ReadStream emitted single "ready" event') - // should do "data" 5 times ONLY - assert.equals(this.dataSpy.callCount, 5, 'ReadStream emitted correct number of "data" events (5)') - this.sourceData.slice(0, 5).forEach(function (d, i) { - var call = this.dataSpy.getCall(i) - assert(call) - if (call) { - assert.equals(call.args.length, 1, 'ReadStream "data" event #' + i + ' fired with 1 argument') - refute.isNull(call.args[0].key, 'ReadStream "data" event #' + i + ' argument has "key" property') - refute.isNull(call.args[0].value, 'ReadStream "data" event #' + i + ' argument has "value" property') - assert.equals(call.args[0].key, d.key, 'ReadStream "data" event #' + i + ' argument has correct "key"') - assert.equals(+call.args[0].value, +d.value, 'ReadStream "data" event #' + i + ' argument has correct "value"') - } - }.bind(this)) - done() - }.bind(this)) - }.bind(this)) - }.bind(this)) - } - - , 'test readStream() with "reverse=true"': function (done) { - this.openTestDatabase(function (db) { - // execute - db.batch(this.sourceData.slice(), function (err) { - refute(err) - - var rs = db.createReadStream({ reverse: true }) - rs.on('data' , this.dataSpy) - rs.on('end' , this.endSpy) - rs.on('close', this.verify.bind(this, rs, done)) - - this.sourceData.reverse() // for verify - }.bind(this)) - }.bind(this)) - } - - , 'test readStream() with "start"': function (done) { - this.openTestDatabase(function (db) { - db.batch(this.sourceData.slice(), function (err) { - refute(err) - - var rs = db.createReadStream({ start: '50' }) - rs.on('data' , this.dataSpy) - rs.on('end' , this.endSpy) - rs.on('close', this.verify.bind(this, rs, done)) - - // slice off the first 50 so verify() expects only the last 50 even though all 100 are in the db - this.sourceData = this.sourceData.slice(50) - }.bind(this)) - }.bind(this)) - } - - , 'test readStream() with "start" and "reverse=true"': function (done) { - this.openTestDatabase(function (db) { - db.batch(this.sourceData.slice(), function (err) { - refute(err) - - var rs = db.createReadStream({ start: '50', reverse: true }) - rs.on('data' , this.dataSpy) - rs.on('end' , this.endSpy) - rs.on('close', this.verify.bind(this, rs, done)) - - // reverse and slice off the first 50 so verify() expects only the first 50 even though all 100 are in the db - this.sourceData.reverse() - this.sourceData = this.sourceData.slice(49) - }.bind(this)) - }.bind(this)) - } - - , 'test readStream() with "start" being mid-way key (float)': function (done) { - this.openTestDatabase(function (db) { - db.batch(this.sourceData.slice(), function (err) { - refute(err) - - // '49.5' doesn't actually exist but we expect it to start at '50' because '49' < '49.5' < '50' (in string terms as well as numeric) - var rs = db.createReadStream({ start: '49.5' }) - rs.on('data' , this.dataSpy) - rs.on('end' , this.endSpy) - rs.on('close', this.verify.bind(this, rs, done)) - - // slice off the first 50 so verify() expects only the last 50 even though all 100 are in the db - this.sourceData = this.sourceData.slice(50) - }.bind(this)) - }.bind(this)) - } - - , 'test readStream() with "start" being mid-way key (float) and "reverse=true"': function (done) { - this.openTestDatabase(function (db) { - db.batch(this.sourceData.slice(), function (err) { - refute(err) - - var rs = db.createReadStream({ start: '49.5', reverse: true }) - rs.on('data' , this.dataSpy) - rs.on('end' , this.endSpy) - rs.on('close', this.verify.bind(this, rs, done)) - - // reverse & slice off the first 50 so verify() expects only the first 50 even though all 100 are in the db - this.sourceData.reverse() - this.sourceData = this.sourceData.slice(50) - }.bind(this)) - }.bind(this)) - } - - , 'test readStream() with "start" being mid-way key (string)': function (done) { - this.openTestDatabase(function (db) { - db.batch(this.sourceData.slice(), function (err) { - refute(err) - - // '499999' doesn't actually exist but we expect it to start at '50' because '49' < '499999' < '50' (in string terms) - // the same as the previous test but we're relying solely on string ordering - var rs = db.createReadStream({ start: '499999' }) - rs.on('data' , this.dataSpy) - rs.on('end' , this.endSpy) - rs.on('close', this.verify.bind(this, rs, done)) - - // slice off the first 50 so verify() expects only the last 50 even though all 100 are in the db - this.sourceData = this.sourceData.slice(50) - }.bind(this)) - }.bind(this)) - } - - , 'test readStream() with "end"': function (done) { - this.openTestDatabase(function (db) { - db.batch(this.sourceData.slice(), function (err) { - refute(err) - - var rs = db.createReadStream({ end: '50' }) - rs.on('data' , this.dataSpy) - rs.on('end' , this.endSpy) - rs.on('close', this.verify.bind(this, rs, done)) - - // slice off the last 49 so verify() expects only 0 -> 50 inclusive, even though all 100 are in the db - this.sourceData = this.sourceData.slice(0, 51) - }.bind(this)) - }.bind(this)) - } - - , 'test readStream() with "end" being mid-way key (float)': function (done) { - this.openTestDatabase(function (db) { - db.batch(this.sourceData.slice(), function (err) { - refute(err) - - var rs = db.createReadStream({ end: '50.5' }) - rs.on('data' , this.dataSpy) - rs.on('end' , this.endSpy) - rs.on('close', this.verify.bind(this, rs, done)) - - // slice off the last 49 so verify() expects only 0 -> 50 inclusive, even though all 100 are in the db - this.sourceData = this.sourceData.slice(0, 51) - }.bind(this)) - }.bind(this)) - } - - , 'test readStream() with "end" being mid-way key (string)': function (done) { - this.openTestDatabase(function (db) { - db.batch(this.sourceData.slice(), function (err) { - refute(err) - - var rs = db.createReadStream({ end: '50555555' }) - rs.on('data' , this.dataSpy) - rs.on('end' , this.endSpy) - rs.on('close', this.verify.bind(this, rs, done)) - - // slice off the last 49 so verify() expects only 0 -> 50 inclusive, even though all 100 are in the db - this.sourceData = this.sourceData.slice(0, 51) - }.bind(this)) - }.bind(this)) - } - - , 'test readStream() with "end" being mid-way key (float) and "reverse=true"': function (done) { - this.openTestDatabase(function (db) { - db.batch(this.sourceData.slice(), function (err) { - refute(err) - - var rs = db.createReadStream({ end: '50.5', reverse: true }) - rs.on('data' , this.dataSpy) - rs.on('end' , this.endSpy) - rs.on('close', this.verify.bind(this, rs, done)) - - this.sourceData.reverse() - this.sourceData = this.sourceData.slice(0, 49) - }.bind(this)) - }.bind(this)) - } - - , 'test readStream() with both "start" and "end"': function (done) { - this.openTestDatabase(function (db) { - db.batch(this.sourceData.slice(), function (err) { - refute(err) - - var rs = db.createReadStream({ start: 30, end: 70 }) - rs.on('data' , this.dataSpy) - rs.on('end' , this.endSpy) - rs.on('close', this.verify.bind(this, rs, done)) - - // should include 30 to 70, inclusive - this.sourceData = this.sourceData.slice(30, 71) - }.bind(this)) - }.bind(this)) - } - - , 'test readStream() with both "start" and "end" and "reverse=true"': function (done) { - this.openTestDatabase(function (db) { - db.batch(this.sourceData.slice(), function (err) { - refute(err) - - var rs = db.createReadStream({ start: 70, end: 30, reverse: true }) - rs.on('data' , this.dataSpy) - rs.on('end' , this.endSpy) - rs.on('close', this.verify.bind(this, rs, done)) - - // expect 70 -> 30 inclusive - this.sourceData.reverse() - this.sourceData = this.sourceData.slice(29, 70) - }.bind(this)) - }.bind(this)) - } - - , 'test json encoding': function (done) { - var options = { createIfMissing: true, errorIfExists: true, keyEncoding: 'utf8', valueEncoding: 'json' } - , data = [ - { type: 'put', key: 'aa', value: { a: 'complex', obj: 100 } } - , { type: 'put', key: 'ab', value: { b: 'foo', bar: [ 1, 2, 3 ] } } - , { type: 'put', key: 'ac', value: { c: 'w00t', d: { e: [ 0, 10, 20, 30 ], f: 1, g: 'wow' } } } - , { type: 'put', key: 'ba', value: { a: 'complex', obj: 100 } } - , { type: 'put', key: 'bb', value: { b: 'foo', bar: [ 1, 2, 3 ] } } - , { type: 'put', key: 'bc', value: { c: 'w00t', d: { e: [ 0, 10, 20, 30 ], f: 1, g: 'wow' } } } - , { type: 'put', key: 'ca', value: { a: 'complex', obj: 100 } } - , { type: 'put', key: 'cb', value: { b: 'foo', bar: [ 1, 2, 3 ] } } - , { type: 'put', key: 'cc', value: { c: 'w00t', d: { e: [ 0, 10, 20, 30 ], f: 1, g: 'wow' } } } - ] - - this.openTestDatabase(options, function (db) { - db.batch(data.slice(), function (err) { - refute(err) - - var rs = db.createReadStream() - rs.on('data' , this.dataSpy) - rs.on('end' , this.endSpy) - rs.on('close', this.verify.bind(this, rs, done, data)) - }.bind(this)) - }.bind(this)) - } - - , 'test injectable encoding': function (done) { - var options = { createIfMissing: true, errorIfExists: true, keyEncoding: 'utf8', valueEncoding: { - decode: msgpack.decode, - encode: msgpack.encode, - buffer: true - }} - , data = [ - { type: 'put', key: 'aa', value: { a: 'complex', obj: 100 } } - , { type: 'put', key: 'ab', value: { b: 'foo', bar: [ 1, 2, 3 ] } } - , { type: 'put', key: 'ac', value: { c: 'w00t', d: { e: [ 0, 10, 20, 30 ], f: 1, g: 'wow' } } } - , { type: 'put', key: 'ba', value: { a: 'complex', obj: 100 } } - , { type: 'put', key: 'bb', value: { b: 'foo', bar: [ 1, 2, 3 ] } } - , { type: 'put', key: 'bc', value: { c: 'w00t', d: { e: [ 0, 10, 20, 30 ], f: 1, g: 'wow' } } } - , { type: 'put', key: 'ca', value: { a: 'complex', obj: 100 } } - , { type: 'put', key: 'cb', value: { b: 'foo', bar: [ 1, 2, 3 ] } } - , { type: 'put', key: 'cc', value: { c: 'w00t', d: { e: [ 0, 10, 20, 30 ], f: 1, g: 'wow' } } } - ] - - this.openTestDatabase(options, function (db) { - db.batch(data.slice(), function (err) { - refute(err) - - var rs = db.createReadStream() - rs.on('data' , this.dataSpy) - rs.on('end' , this.endSpy) - rs.on('close', this.verify.bind(this, rs, done, data)) - }.bind(this)) - }.bind(this)) - } - - , 'test readStream() "reverse=true" not sticky (issue #6)': function (done) { - this.openTestDatabase(function (db) { - // execute - db.batch(this.sourceData.slice(), function (err) { - refute(err) - // read in reverse, assume all's good - var rs = db.createReadStream({ reverse: true }) - rs.on('close', function () { - // now try reading the other way - var rs = db.createReadStream() - rs.on('data' , this.dataSpy) - rs.on('end' , this.endSpy) - rs.on('close', this.verify.bind(this, rs, done)) - }.bind(this)) - rs.resume() - }.bind(this)) - }.bind(this)) - } - - , 'test ReadStream, start=0': function (done) { - this.openTestDatabase(function (db) { - // execute - db.batch(this.sourceData.slice(), function (err) { - refute(err) - - var rs = db.createReadStream({ start: 0 }) - rs.on('data' , this.dataSpy) - rs.on('end' , this.endSpy) - rs.on('close', this.verify.bind(this, rs, done)) - }.bind(this)) - }.bind(this)) - } - - // we don't expect any data to come out of here because the keys start at '00' not 0 - // we just want to ensure that we don't kill the process - , 'test ReadStream, end=0': function (done) { - this.openTestDatabase(function (db) { - // execute - db.batch(this.sourceData.slice(), function (err) { - refute(err) - - var rs = db.createReadStream({ end: 0 }) - rs.on('data' , this.dataSpy) - rs.on('end' , this.endSpy) - rs.on('close', this.verify.bind(this, rs, done)) - - this.sourceData = [ ] - }.bind(this)) - }.bind(this)) - } - - // ok, so here's the deal, this is kind of obscure: when you have 2 databases open and - // have a readstream coming out from both of them with no references to the dbs left - // V8 will GC one of them and you'll get an failed assert from leveldb. - // This ISN'T a problem if you only have one of them open, even if the db gets GCed! - // Process: - // * open - // * batch write data - // * close - // * reopen - // * create ReadStream, keeping no reference to the db - // * pipe ReadStream through SlowStream just to make sure GC happens - // - the error should occur here if the bug exists - // * when both streams finish, verify all 'data' events happened - , 'test ReadStream without db ref doesn\'t get GCed': function (done) { - var dataSpy1 = this.spy() - , dataSpy2 = this.spy() - , location1 = common.nextLocation() - , location2 = common.nextLocation() - , sourceData = this.sourceData - , verify = function () { - // no reference to `db` here, should have been GCed by now if it could be - assert(dataSpy1.callCount, sourceData.length) - assert(dataSpy2.callCount, sourceData.length) - async.parallel([ rimraf.bind(null, location1), rimraf.bind(null, location2) ], done) - } - , execute = function (d, callback) { - // no reference to `db` here, could be GCed - d.readStream - .pipe(new SlowStream({ maxWriteInterval: 5 })) - .on('data', d.spy) - .on('close', delayed.delayed(callback, 0.05)) - } - , open = function (reopen, location, callback) { - levelup(location, { createIfMissing: !reopen, errorIfExists: !reopen }, callback) - } - , write = function (db, callback) { db.batch(sourceData.slice(), callback) } - , close = function (db, callback) { db.close(callback) } - , setup = function (callback) { - async.map([ location1, location2 ], open.bind(null, false), function (err, dbs) { - refute(err) - if (err) return - async.map(dbs, write, function (err) { - refute(err) - if (err) return - async.forEach(dbs, close, callback) - }) - }) - } - , reopen = function () { - async.map([ location1, location2 ], open.bind(null, true), function (err, dbs) { - refute(err) - if (err) return - async.forEach([ - { readStream: dbs[0].createReadStream(), spy: dataSpy1 } - , { readStream: dbs[1].createReadStream(), spy: dataSpy2 } - ], execute, verify) - }) - } - - setup(delayed.delayed(reopen, 0.05)) - } - - - // this is just a fancy way of testing levelup('/path').createReadStream() - // i.e. not waiting for 'open' to complete - // the logic for this is inside the ReadStream constructor which waits for 'ready' - , 'test ReadStream on pre-opened db': function (done) { - var execute = function (db) { - // is in limbo - refute(db.isOpen()) - refute(db.isClosed()) - - var rs = db.createReadStream() - rs.on('data' , this.dataSpy) - rs.on('end' , this.endSpy) - rs.on('close', this.verify.bind(this, rs, done)) - }.bind(this) - , setup = function (db) { - db.batch(this.sourceData.slice(), function (err) { - refute(err) - db.close(function (err) { - refute(err) - var db2 = levelup(db.location, { createIfMissing: false, errorIfExists: false, encoding: 'utf8' }) - execute(db2) - }) - }.bind(this)) - }.bind(this) - - this.openTestDatabase(setup) - } - - , 'test readStream() with "limit"': function (done) { - this.openTestDatabase(function (db) { - db.batch(this.sourceData.slice(), function (err) { - refute(err) - - var rs = db.createReadStream({ limit: 20 }) - rs.on('data' , this.dataSpy) - rs.on('end' , this.endSpy) - rs.on('close', this.verify.bind(this, rs, done)) - - this.sourceData = this.sourceData.slice(0, 20) - }.bind(this)) - }.bind(this)) - } - - , 'test readStream() with "start" and "limit"': function (done) { - this.openTestDatabase(function (db) { - db.batch(this.sourceData.slice(), function (err) { - refute(err) - - var rs = db.createReadStream({ start: '20', limit: 20 }) - //rs.on('ready', this.readySpy) - rs.on('data' , this.dataSpy) - rs.on('end' , this.endSpy) - rs.on('close', this.verify.bind(this, rs, done)) - - this.sourceData = this.sourceData.slice(20, 40) - }.bind(this)) - }.bind(this)) - } - - , 'test readStream() with "end" after "limit"': function (done) { - this.openTestDatabase(function (db) { - db.batch(this.sourceData.slice(), function (err) { - refute(err) - - var rs = db.createReadStream({ end: '50', limit: 20 }) - rs.on('data' , this.dataSpy) - rs.on('end' , this.endSpy) - rs.on('close', this.verify.bind(this, rs, done)) - - this.sourceData = this.sourceData.slice(0, 20) - }.bind(this)) - }.bind(this)) - } - - , 'test readStream() with "end" before "limit"': function (done) { - this.openTestDatabase(function (db) { - db.batch(this.sourceData.slice(), function (err) { - refute(err) - - var rs = db.createReadStream({ end: '30', limit: 50 }) - rs.on('data' , this.dataSpy) - rs.on('end' , this.endSpy) - rs.on('close', this.verify.bind(this, rs, done)) - - this.sourceData = this.sourceData.slice(0, 31) - }.bind(this)) - }.bind(this)) - } - - // can, fairly reliably, trigger a core dump if next/end isn't - // protected properly - // the use of large blobs means that next() takes time to return - // so we should be able to slip in an end() while it's working - , 'test iterator next/end race condition': function (done) { - var data = [] - , i = 5 - , v - - while (i--) { - v = bigBlob + i - data.push({ type: 'put', key: v, value: v }) - } - - this.openTestDatabase(function (db) { - db.batch(data, function (err) { - refute(!!err) - var rs = db.createReadStream().on('close', done) - rs.once('data', rs.destroy.bind(rs)) - }.bind(this)) - }.bind(this)) - } - - , 'test can only end once': function (done) { - this.openTestDatabase(function (db) { - db.batch(this.sourceData.slice(), function (err) { - refute(err) - - var rs = db.createReadStream() - .on('close', done) - - process.nextTick(function () { - rs.destroy() - }) - - }.bind(this)) - }.bind(this)) - } - - , 'test readable-stream@1.0.x': function () { - // this is here to be an explicit reminder that we're tied to - // readable-stream@1.0.x so if someone comes along and wants - // to bump version they'll have to come here and read that we're - // using Streams2 explicitly across Node versions and will - // probably delay Streams3 adoption until Node 0.12 is released - // as readable-stream@1.1.x causes some problems with downstream - // modules - // see: https://github.com/rvagg/node-levelup/issues/216 - - assert( - (/^~1\.0\.\d+$/).test(require('../package.json').dependencies['readable-stream']) - , 'using readable-stream@1.0.x' - ) - } -}) diff --git a/node_modules/browserify-fs/node_modules/levelup/test/snapshot-test.js b/node_modules/browserify-fs/node_modules/levelup/test/snapshot-test.js deleted file mode 100644 index 1fc232df..00000000 --- a/node_modules/browserify-fs/node_modules/levelup/test/snapshot-test.js +++ /dev/null @@ -1,63 +0,0 @@ -/* Copyright (c) 2012-2014 LevelUP contributors - * See list at - * MIT License - */ - -var delayed = require('delayed') - , common = require('./common') - , SlowStream = require('slow-stream') - - , assert = require('referee').assert - , refute = require('referee').refute - , buster = require('bustermove') - -buster.testCase('Snapshots', { - 'setUp': common.readStreamSetUp - - , 'tearDown': common.commonTearDown - - , 'test ReadStream implicit snapshot': function (done) { - this.openTestDatabase(function (db) { - - // 1) Store 100 random numbers stored in the database - db.batch(this.sourceData.slice(), function (err) { - refute(err) - - // 2) Create an iterator on the current data, pipe it through a SlowStream - // to make *sure* that we're going to be reading it for longer than it - // takes to overwrite the data in there. - - var rs = db.readStream() - rs = rs.pipe(new SlowStream({ maxWriteInterval: 5 })) - rs.on('data' , this.dataSpy) - rs.once('end' , this.endSpy) - - rs.once('close', delayed.delayed(this.verify.bind(this, rs, done), 0.05)) - - process.nextTick(function () { - // 3) Concoct and write new random data over the top of existing items. - // If we're not using a snapshot then then we'd expect the test - // to fail because it'll pick up these new values rather than the - // old ones. - var newData = [] - , i - , k - - for (i = 0; i < 100; i++) { - k = (i < 10 ? '0' : '') + i - newData.push({ - type : 'put' - , key : k - , value : Math.random() - }) - } - // using sync:true here to ensure it's written fully to disk - db.batch(newData.slice(), { sync: true }, function (err) { - refute(err) - // we'll return here faster than it takes the readStream to complete - }) - }.bind(this)) - }.bind(this)) - }.bind(this)) - } -}) diff --git a/node_modules/browserify-fs/node_modules/levelup/test/test-10k-times.sh b/node_modules/browserify-fs/node_modules/levelup/test/test-10k-times.sh deleted file mode 100755 index c68e67cf..00000000 --- a/node_modules/browserify-fs/node_modules/levelup/test/test-10k-times.sh +++ /dev/null @@ -1,12 +0,0 @@ -#!/bin/bash - -cd .. - -for (( i=1; i<=10000; i++ )) -do - echo "Running test $i .." - npm test - if [ $? -ne 0 ]; then - break - fi -done diff --git a/node_modules/browserify-fs/node_modules/levelup/test/write-stream-test.js b/node_modules/browserify-fs/node_modules/levelup/test/write-stream-test.js deleted file mode 100644 index a36e86be..00000000 --- a/node_modules/browserify-fs/node_modules/levelup/test/write-stream-test.js +++ /dev/null @@ -1,467 +0,0 @@ -/* Copyright (c) 2012-2014 LevelUP contributors - * See list at - * MIT License - */ - -var async = require('async') - , common = require('./common') - - , assert = require('referee').assert - , refute = require('referee').refute - , buster = require('bustermove') - -buster.testCase('WriteStream', { - 'setUp': function (done) { - common.commonSetUp.call(this, function () { - this.timeout = 1000 - - this.sourceData = [] - - for (var i = 0; i < 10; i++) { - this.sourceData.push({ - type : 'put' - , key : i - , value : Math.random() - }) - } - - this.verify = function (ws, db, done, data) { - if (!data) data = this.sourceData // can pass alternative data array for verification - async.forEach( - data - , function (data, callback) { - db.get(data.key, function (err, value) { - refute(err) - assert.equals(+value, +data.value, 'WriteStream data #' + data.key + ' has correct value') - callback() - }) - } - , done - ) - } - - done() - }.bind(this)) - } - - , 'tearDown': common.commonTearDown - - //TODO: test various encodings - - , 'test simple WriteStream': function (done) { - this.openTestDatabase(function (db) { - var ws = db.createWriteStream() - ws.on('error', function (err) { - refute(err) - }) - ws.on('close', this.verify.bind(this, ws, db, done)) - this.sourceData.forEach(function (d) { - ws.write(d) - }) - ws.once('ready', ws.end) // end after it's ready, nextTick makes this work OK - }.bind(this)) - } - - , 'test WriteStream with async writes': function (done) { - this.openTestDatabase(function (db) { - var ws = db.createWriteStream() - - ws.on('error', function (err) { - refute(err) - }) - ws.on('close', this.verify.bind(this, ws, db, done)) - async.forEachSeries( - this.sourceData - , function (d, callback) { - // some should batch() and some should put() - if (d.key % 3) { - setTimeout(function () { - ws.write(d) - callback() - }, 10) - } else { - ws.write(d) - callback() - } - } - , function () { - ws.end() - } - ) - }.bind(this)) - } - - /* - // exactly the same as previous but should avoid batch() writes - , 'test WriteStream with async writes and useBatch=false': function (done) { - this.openTestDatabase(function (db) { - db.batch = function () { - Array.prototype.slice.call(arguments).forEach(function (a) { - if (typeof a == 'function') a('Should not call batch()') - }) - } - - var ws = db.createWriteStream({ useBatch: false }) - - ws.on('error', function (err) { - refute(err) - }) - ws.on('close', this.verify.bind(this, ws, db, done)) - async.forEachSeries( - this.sourceData - , function (d, callback) { - if (d.key % 3) { - setTimeout(function () { - ws.write(d) - callback() - }, 10) - } else { - ws.write(d) - callback() - } - } - , function () { - ws.end() - } - ) - }.bind(this)) - } - */ - - , 'test end accepts data': function (done) { - this.openTestDatabase(function (db) { - var ws = db.createWriteStream() - ws.on('error', function (err) { - refute(err) - }) - ws.on('close', this.verify.bind(this, ws, db, done)) - var i = 0 - this.sourceData.forEach(function (d) { - i ++ - if (i < this.sourceData.length) { - ws.write(d) - } else { - ws.end(d) - } - }.bind(this)) - }.bind(this)) - } - - // at the moment, destroySoon() is basically just end() - , 'test destroySoon()': function (done) { - this.openTestDatabase(function (db) { - var ws = db.createWriteStream() - ws.on('error', function (err) { - refute(err) - }) - ws.on('close', this.verify.bind(this, ws, db, done)) - this.sourceData.forEach(function (d) { - ws.write(d) - }) - ws.once('ready', ws.destroySoon) // end after it's ready, nextTick makes this work OK - }.bind(this)) - } - - , 'test destroy()': function (done) { - var verify = function (ws, db) { - async.forEach( - this.sourceData - , function (data, callback) { - db.get(data.key, function (err, value) { - // none of them should exist - assert(err) - refute(value) - callback() - }) - } - , done - ) - } - - this.openTestDatabase(function (db) { - var ws = db.createWriteStream() - ws.on('error', function (err) { - refute(err) - }) - ws.on('close', verify.bind(this, ws, db)) - this.sourceData.forEach(function (d) { - ws.write(d) - }) - ws.once('ready', ws.destroy) - }.bind(this)) - } - - , 'test json encoding': function (done) { - var options = { createIfMissing: true, errorIfExists: true, keyEncoding: 'utf8', valueEncoding: 'json' } - , data = [ - { type: 'put', key: 'aa', value: { a: 'complex', obj: 100 } } - , { type: 'put', key: 'ab', value: { b: 'foo', bar: [ 1, 2, 3 ] } } - , { type: 'put', key: 'ac', value: { c: 'w00t', d: { e: [ 0, 10, 20, 30 ], f: 1, g: 'wow' } } } - , { type: 'put', key: 'ba', value: { a: 'complex', obj: 100 } } - , { type: 'put', key: 'bb', value: { b: 'foo', bar: [ 1, 2, 3 ] } } - , { type: 'put', key: 'bc', value: { c: 'w00t', d: { e: [ 0, 10, 20, 30 ], f: 1, g: 'wow' } } } - , { type: 'put', key: 'ca', value: { a: 'complex', obj: 100 } } - , { type: 'put', key: 'cb', value: { b: 'foo', bar: [ 1, 2, 3 ] } } - , { type: 'put', key: 'cc', value: { c: 'w00t', d: { e: [ 0, 10, 20, 30 ], f: 1, g: 'wow' } } } - ] - - this.openTestDatabase(options, function (db) { - var ws = db.createWriteStream() - ws.on('error', function (err) { - refute(err) - }) - ws.on('close', this.verify.bind(this, ws, db, done, data)) - data.forEach(function (d) { - ws.write(d) - }) - ws.once('ready', ws.end) // end after it's ready, nextTick makes this work OK - }.bind(this)) - } - - , 'test del capabilities for each key/value': function (done) { - - var options = { createIfMissing: true, errorIfExists: true, keyEncoding: 'utf8', valueEncoding: 'json' } - , data = [ - { type: 'put', key: 'aa', value: { a: 'complex', obj: 100 } } - , { type: 'put', key: 'ab', value: { b: 'foo', bar: [ 1, 2, 3 ] } } - , { type: 'put', key: 'ac', value: { c: 'w00t', d: { e: [ 0, 10, 20, 30 ], f: 1, g: 'wow' } } } - , { type: 'put', key: 'ba', value: { a: 'complex', obj: 100 } } - , { type: 'put', key: 'bb', value: { b: 'foo', bar: [ 1, 2, 3 ] } } - , { type: 'put', key: 'bc', value: { c: 'w00t', d: { e: [ 0, 10, 20, 30 ], f: 1, g: 'wow' } } } - , { type: 'put', key: 'ca', value: { a: 'complex', obj: 100 } } - , { type: 'put', key: 'cb', value: { b: 'foo', bar: [ 1, 2, 3 ] } } - , { type: 'put', key: 'cc', value: { c: 'w00t', d: { e: [ 0, 10, 20, 30 ], f: 1, g: 'wow' } } } - ] - - async.waterfall([ - function (cb) { - this.openTestDatabase(options, function (db) { - cb(null, db); - }); - }.bind(this), - function (db, cb) { - var ws = db.createWriteStream() - ws.on('error', function (err) { - refute(err) - }) - ws.on('close', function () { - cb(null, db); - }) - data.forEach(function (d) { - ws.write(d) - }) - - // end after it's ready, nextTick makes this work OK - ws.once('ready', ws.end) - }, - function (db, cb) { - var delStream = db.createWriteStream() - delStream.on('error', function (err) { - refute(err) - }) - delStream.on('close', function () { - cb(null, db); - }) - data.forEach(function (d) { - d.type = 'del' - delStream.write(d) - }) - - // end after it's ready, nextTick makes this work OK - delStream.once('ready', delStream.end) - }, - function (db, cb) { - async.forEach( - data - , function (data, callback) { - db.get(data.key, function (err, value) { - // none of them should exist - assert(err) - refute(value) - callback() - }) - } - , cb - ) - } - ], done) - } - - , 'test del capabilities as constructor option': function (done) { - - var options = { createIfMissing: true, errorIfExists: true, keyEncoding: 'utf8', valueEncoding: 'json' } - , data = [ - { key: 'aa', value: { a: 'complex', obj: 100 } } - , { key: 'ab', value: { b: 'foo', bar: [ 1, 2, 3 ] } } - , { key: 'ac', value: { c: 'w00t', d: { e: [ 0, 10, 20, 30 ], f: 1, g: 'wow' } } } - , { key: 'ba', value: { a: 'complex', obj: 100 } } - , { key: 'bb', value: { b: 'foo', bar: [ 1, 2, 3 ] } } - , { key: 'bc', value: { c: 'w00t', d: { e: [ 0, 10, 20, 30 ], f: 1, g: 'wow' } } } - , { key: 'ca', value: { a: 'complex', obj: 100 } } - , { key: 'cb', value: { b: 'foo', bar: [ 1, 2, 3 ] } } - , { key: 'cc', value: { c: 'w00t', d: { e: [ 0, 10, 20, 30 ], f: 1, g: 'wow' } } } - ] - - async.waterfall([ - function (cb) { - this.openTestDatabase(options, function (db) { - cb(null, db); - }); - }.bind(this), - function (db, cb) { - var ws = db.createWriteStream() - ws.on('error', function (err) { - refute(err) - }) - ws.on('close', function () { - cb(null, db); - }) - data.forEach(function (d) { - ws.write(d) - }) - - // end after it's ready, nextTick makes this work OK - ws.once('ready', ws.end) - }, - function (db, cb) { - var delStream = db.createWriteStream({ type: 'del' }) - delStream.on('error', function (err) { - refute(err) - }) - delStream.on('close', function () { - cb(null, db); - }) - data.forEach(function (d) { - delStream.write(d) - }) - - // end after it's ready, nextTick makes this work OK - delStream.once('ready', delStream.end) - }, - function (db, cb) { - async.forEach( - data - , function (data, callback) { - db.get(data.key, function (err, value) { - // none of them should exist - assert(err) - refute(value) - callback() - }) - } - , cb - ) - } - ], done) - } - - , 'test type at key/value level must take precedence on the constructor': function (done) { - - var options = { createIfMissing: true, errorIfExists: true, keyEncoding: 'utf8', valueEncoding: 'json' } - , data = [ - { key: 'aa', value: { a: 'complex', obj: 100 } } - , { key: 'ab', value: { b: 'foo', bar: [ 1, 2, 3 ] } } - , { key: 'ac', value: { c: 'w00t', d: { e: [ 0, 10, 20, 30 ], f: 1, g: 'wow' } } } - , { key: 'ba', value: { a: 'complex', obj: 100 } } - , { key: 'bb', value: { b: 'foo', bar: [ 1, 2, 3 ] } } - , { key: 'bc', value: { c: 'w00t', d: { e: [ 0, 10, 20, 30 ], f: 1, g: 'wow' } } } - , { key: 'ca', value: { a: 'complex', obj: 100 } } - , { key: 'cb', value: { b: 'foo', bar: [ 1, 2, 3 ] } } - , { key: 'cc', value: { c: 'w00t', d: { e: [ 0, 10, 20, 30 ], f: 1, g: 'wow' } } } - ] - , exception = data[0] - - exception['type'] = 'put' - - async.waterfall([ - function (cb) { - this.openTestDatabase(options, function (db) { - cb(null, db); - }); - }.bind(this), - function (db, cb) { - var ws = db.createWriteStream() - ws.on('error', function (err) { - refute(err) - }) - ws.on('close', function () { - cb(null, db); - }) - data.forEach(function (d) { - ws.write(d) - }) - - // end after it's ready, nextTick makes this work OK - ws.once('ready', ws.end) - }, - function (db, cb) { - var delStream = db.createWriteStream({ type: 'del' }) - delStream.on('error', function (err) { - refute(err) - }) - delStream.on('close', function () { - cb(null, db); - }) - data.forEach(function (d) { - delStream.write(d) - }) - - // end after it's ready, nextTick makes this work OK - delStream.once('ready', delStream.end) - }, - function (db, cb) { - async.forEach( - data - , function (data, callback) { - db.get(data.key, function (err, value) { - if (data.type === 'put') { - assert(value) - callback() - } else { - assert(err) - refute(value) - callback() - } - }) - } - , cb - ) - } - ], done) - } - - , 'test ignoring pairs with the wrong type': function (done) { - - async.waterfall([ - function (cb) { - this.openTestDatabase(cb.bind(null, null)) - }.bind(this), - function (db, cb) { - var ws = db.createWriteStream() - ws.on('error', function (err) { - refute(err) - }) - ws.on('close', cb.bind(null, db)) - this.sourceData.forEach(function (d) { - d.type = "x" + Math.random() - ws.write(d) - }) - ws.once('ready', ws.end) // end after it's ready, nextTick makes this work OK - }.bind(this), - function (db, cb) { - async.forEach( - this.sourceData - , function (data, callback) { - db.get(data.key, function (err, value) { - assert(err) - refute(value) - callback() - }) - } - , cb - ) - - }.bind(this) - ], done) - } -}) diff --git a/node_modules/browserify-fs/package.json b/node_modules/browserify-fs/package.json deleted file mode 100644 index 35b688f8..00000000 --- a/node_modules/browserify-fs/package.json +++ /dev/null @@ -1,44 +0,0 @@ -{ - "name": "browserify-fs", - "version": "1.0.0", - "description": "fs for the browser using level-filesystem and browserify", - "repository": { - "type": "git", - "url": "git://github.com/mafintosh/browserify-fs" - }, - "keywords": [ - "browserify", - "fs", - "level", - "filesystem" - ], - "dependencies": { - "level-filesystem": "^1.0.1", - "level-js": "^2.1.3", - "levelup": "^0.18.2" - }, - "bugs": { - "url": "https://github.com/mafintosh/browserify-fs/issues" - }, - "homepage": "https://github.com/mafintosh/browserify-fs", - "_id": "browserify-fs@1.0.0", - "dist": { - "shasum": "f075aa8a729d4d1716d066620e386fcc1311a96f", - "tarball": "https://registry.npmjs.org/browserify-fs/-/browserify-fs-1.0.0.tgz" - }, - "_from": "browserify-fs@>=1.0.0 <2.0.0", - "_npmVersion": "1.4.3", - "_npmUser": { - "name": "mafintosh", - "email": "mathiasbuus@gmail.com" - }, - "maintainers": [ - { - "name": "mafintosh", - "email": "mathiasbuus@gmail.com" - } - ], - "directories": {}, - "_shasum": "f075aa8a729d4d1716d066620e386fcc1311a96f", - "_resolved": "https://registry.npmjs.org/browserify-fs/-/browserify-fs-1.0.0.tgz" -} diff --git a/node_modules/browserify-incremental/.eslintignore b/node_modules/browserify-incremental/.eslintignore deleted file mode 100644 index 8682c872..00000000 --- a/node_modules/browserify-incremental/.eslintignore +++ /dev/null @@ -1,3 +0,0 @@ -example/output/ -example/test-module/ -example/command-line/ \ No newline at end of file diff --git a/node_modules/browserify-incremental/.eslintrc.js b/node_modules/browserify-incremental/.eslintrc.js deleted file mode 100644 index 8a415150..00000000 --- a/node_modules/browserify-incremental/.eslintrc.js +++ /dev/null @@ -1,41 +0,0 @@ -module.exports = { - extends: "eslint:recommended", - parserOptions: { - ecmaVersion: 6, - sourceType: "module", - }, - env: { - node: true, - }, - rules: { - "no-console": 0, - // style - "semi": 2, - "no-extra-semi": 2, - "no-multi-spaces": 2, - "array-bracket-spacing": 2, - "block-spacing": 2, - "comma-spacing": 2, - "comma-dangle": [2, "always-multiline"], - "computed-property-spacing": 2, - "eol-last": 2, - "indent": [2, 2], - "keyword-spacing": 2, - "linebreak-style": 2, - "no-spaced-func": 2, - "no-trailing-spaces": 2, - "object-curly-spacing": 2, - "quotes": [2, "single", "avoid-escape"], - "semi": 2, - "semi-spacing": 2, - "space-before-blocks": 2, - "space-before-function-paren": [2, "never"], - "space-in-parens": 2, - "space-infix-ops": 2, - "space-unary-ops": 2, - "arrow-spacing": 2, - "generator-star-spacing": 2, - "template-curly-spacing": 2, - "yield-star-spacing": 2, - } -}; diff --git a/node_modules/browserify-incremental/.npmignore b/node_modules/browserify-incremental/.npmignore deleted file mode 100644 index 161a07e9..00000000 --- a/node_modules/browserify-incremental/.npmignore +++ /dev/null @@ -1,3 +0,0 @@ -example -support -test diff --git a/node_modules/browserify-incremental/.travis.yml b/node_modules/browserify-incremental/.travis.yml deleted file mode 100644 index 36b3e92f..00000000 --- a/node_modules/browserify-incremental/.travis.yml +++ /dev/null @@ -1,3 +0,0 @@ -language: node_js -node_js: - - "4.2" \ No newline at end of file diff --git a/node_modules/browserify-incremental/CONTRIBUTING.md b/node_modules/browserify-incremental/CONTRIBUTING.md deleted file mode 100644 index b524912f..00000000 --- a/node_modules/browserify-incremental/CONTRIBUTING.md +++ /dev/null @@ -1,11 +0,0 @@ -# Contributor Guidelines - -This project has automated tests which can be run with `npm test`. This will be -run in Travis CI when you make a Pull Request so please try to ensure that they -are passing when submitting one. If your PR adds new features please also add -tests. If your PR fixes a bug, it might be helpful to add a test which would fail -if the bug was re-introduced. - -The source code of this project is also checked for coding errors and code style -consistency using ESLint. You can run it with `npm run lint` to see any errors, -and you can automatically fix some coding style errors using `npm run lint-fix`. diff --git a/node_modules/browserify-incremental/README.md b/node_modules/browserify-incremental/README.md deleted file mode 100644 index 237dfc20..00000000 --- a/node_modules/browserify-incremental/README.md +++ /dev/null @@ -1,145 +0,0 @@ -# browserify-incremental - -Incremental rebuild for browserify - -Update any source file and re-bundle, and only changed files will be parsed, -so it will build super fast (even with big dependencies like React!). - - -## How is this different from [watchify](https://github.com/substack/watchify)? - -browserify-incremental can detect changes which occured in between runs, which -means it can be used as part of build systems which are invoked on demand, -without requiring a long lived process. Whereas watchify is slow for the first -run upon each startup, browserify-incremental is fast every time after the very -first. - - -# example - -Use `browserifyinc` with all the same arguments as `browserify`, with the added -`--cachefile` argument specifying where to put the cache file: - -``` -$ browserifyinc -r react -o output/bundle.js -v -556200 bytes written to output/bundle.js (1.38 seconds) -$ browserifyinc -r react -o output/bundle.js -v -556200 bytes written to output/bundle.js (0.13 seconds) -``` - -Now if you change some files and rebuild, only the changed files will be parsed -and the rest will reuse the previous build's cached output. - -You can use `-v`/`--verbose` to get more verbose output to show which files have -changed and how long the bundling took: - -``` -$ browserifyinc test-module/ -v -o output/bundle.js -changed files: -/Users/jfriend/code/browserify-incremental/example/test-module/index.js -1000423 bytes written to output/bundle.js (0.18 seconds) -``` - -If you don't specify `--cachefile`, a `browserify-cache.json` file will be -created in the current working directory. - -# usage - -# CLI - -``` -browserifyinc --cachefile tmp/browserify-cache.json main.js > output.js -``` - -All the bundle options are the same as the browserify command except for `-v` -and `--cachefile`. - -# API - -``` js -var browserifyInc = require('browserify-incremental') -``` - -## var b = browserifyInc(opts) - -Create a browserify bundle `b` from `opts`. - -`b` is exactly like a browserify bundle except that it caches file contents and -calling `b.bundle()` extra times past the first time will be much faster -due to that caching. - -By default, when used via API, browserify-incremental will only use in-memory -caching, however you can pass a `cacheFile` option which will use an on disk -cache instead (useful for build scripts which run once and exit). - -You can also pass in a browserify instance of your own, and that will be used -instead of creating a new one, however when you create your browserify instance -you must include the following options: - -```js -{cache: {}, packageCache: {}, fullPaths: true} -``` - -For convenience, these options are available as `browserifyInc.args`, so you can -use them like: - -```js -var browserify = require('browserify') -var browserifyInc = require('browserify-incremental') -var xtend = require('xtend') - -var b = browserify(xtend(browserifyInc.args, { - // your custom opts -})) -browserifyInc(b, {cacheFile: './browserify-cache.json'}) - -b.bundle().pipe(process.stdout) -``` - -The `cacheFile` opt can be passed to either the browserify or browserify-incremental -constructor. - -# events - -## b.on('bytes', function (bytes) {}) - -When a bundle is generated, this event fires with the number of bytes written. - -## b.on('time', function (time) {}) - -When a bundle is generated, this event fires with the time it took to create the -bundle in milliseconds. - -## b.on('log', function (msg) {}) - -This event fires to with messages of the form: - -``` -X bytes written (Y seconds) -``` - -with the number of bytes in the bundle X and the time in seconds Y. - -# install - -With [npm](https://npmjs.org) do: - -``` -$ npm install -g browserify-incremental browserify -``` - -to get the browserifyinc command and: - -``` -$ npm install --save browserify-incremental browserify -``` - -to get just the library. - -## Contributing - -Please see the [Contributor Guidelines](CONTRIBUTING.md). - -# license - -MIT diff --git a/node_modules/browserify-incremental/bin/cmd.js b/node_modules/browserify-incremental/bin/cmd.js deleted file mode 100755 index 19a1a3a2..00000000 --- a/node_modules/browserify-incremental/bin/cmd.js +++ /dev/null @@ -1,87 +0,0 @@ -#!/usr/bin/env node - -var browserifyIncremental = require('../'); -var fs = require('fs'); -var fromArgs = require('browserify/bin/args'); -var JSONStream = require('JSONStream'); -var through = require('through2'); - -function run() { - process.stdout.on('error', process.exit); - - var b, outfile, verbose, cachefile; - - var b_ = fromArgs(process.argv.slice(2), browserifyIncremental.args); - cachefile = b_.argv.cachefile || './browserify-cache.json'; - outfile = b_.argv.o || b_.argv.outfile; - verbose = (b_.argv.v || b_.argv.verbose); - b = browserifyIncremental(b_, {cacheFile: cachefile}); - - b.on('update', function(changes) { - if (verbose && changes.length) console.error('changed files:\n' + changes.join('\n')); - }); - - if (b.argv.version) { - return console.log(require('../package.json').version); - } - - b.on('error', errorExit); - - if (b.argv.pack) { - process.stdin.pipe(b.pack()).pipe(process.stdout); - process.stdin.resume(); - return; - } - - if (b.argv.deps) { - var stringify = JSONStream.stringify(); - stringify.pipe(process.stdout); - b.pipeline.get('deps').push(through.obj( - function(row, enc, next) { stringify.write(row); next(); }, - function() { stringify.end(); } - )); - return b.bundle(); - } - - if (b.argv.list) { - b.pipeline.get('deps').push(through.obj(function(row, enc, next) { - console.log(row.file || row.id); - next(); - })); - return b.bundle(); - } - - var bytes, time; - b.on('bytes', function(b) { bytes = b; }); - b.on('time', function(t) { time = t; }); - - var bundle = b.bundle(); - bundle.on('error', errorExit); - - bundle.on('end', function() { - if (verbose) { - console.error(bytes + ' bytes written to ' + (outfile || 'stdout') - + ' (' + (time / 1000).toFixed(2) + ' seconds)' - ); - } - }); - - if (outfile) { - bundle.pipe(fs.createWriteStream(outfile)); - } - else { - bundle.pipe(process.stdout); - } -} - -function errorExit(err) { - if (err.stack) { - console.error(err.stack); - } - else { - console.error(String(err)); - } - process.exit(1); -} - -run(); diff --git a/node_modules/browserify-incremental/index.js b/node_modules/browserify-incremental/index.js deleted file mode 100644 index 4791ab27..00000000 --- a/node_modules/browserify-incremental/index.js +++ /dev/null @@ -1,61 +0,0 @@ -var xtend = require('xtend'); -var through = require('through2'); -var browserify = require('browserify'); -var browserifyCache = require('browserify-cache-api'); - -module.exports = browserifyIncremental; -browserifyIncremental.browserify = browserify; -browserifyIncremental.args = browserifyCache.args; - -function browserifyIncremental(files, opts) { - var b; // browserify instance - - // browserify plugin boilerplate, normalises variable arguments - if (files && typeof files.bundle === 'function') { - // browserify instance as first arg - b = files; - opts = opts || b._options; - } else { - if (!opts) { - // opts as first arg (or no args) - opts = files || {}; - files = undefined; - b = browserify(xtend(browserifyCache.args, opts)); - } else { - // files as first arg, opts as second arg - b = browserify(files, xtend(browserifyCache.args, opts)); - } - } - - browserifyCache(b, opts); - - if (!b.pipeline) b.emit('error', new Error('missing pipeline: incompatible browserify version (< 5.x)')); - b.on('reset', function() { attachMetrics(b); }); - attachMetrics(b); - - return b; -} - -function attachMetrics(b) { - var time = null; - var bytes = 0; - b.pipeline.get('record').on('end', function() { - time = Date.now(); - }); - - b.pipeline.get('wrap').push(through(write, end)); - function write(buf, enc, next) { - bytes += buf.length; - this.push(buf); - next(); - } - function end() { - var delta = Date.now() - time; - b.emit('time', delta); - b.emit('bytes', bytes); - b.emit('log', bytes + ' bytes written (' - + (delta / 1000).toFixed(2) + ' seconds)' - ); - this.push(null); - } -} diff --git a/node_modules/browserify-incremental/node_modules/.bin/JSONStream b/node_modules/browserify-incremental/node_modules/.bin/JSONStream deleted file mode 120000 index 44907374..00000000 --- a/node_modules/browserify-incremental/node_modules/.bin/JSONStream +++ /dev/null @@ -1 +0,0 @@ -../JSONStream/index.js \ No newline at end of file diff --git a/node_modules/browserify-incremental/node_modules/JSONStream/.npmignore b/node_modules/browserify-incremental/node_modules/JSONStream/.npmignore deleted file mode 100644 index a9a9d586..00000000 --- a/node_modules/browserify-incremental/node_modules/JSONStream/.npmignore +++ /dev/null @@ -1,2 +0,0 @@ -node_modules/* -node_modules diff --git a/node_modules/browserify-incremental/node_modules/JSONStream/.travis.yml b/node_modules/browserify-incremental/node_modules/JSONStream/.travis.yml deleted file mode 100644 index 6e5919de..00000000 --- a/node_modules/browserify-incremental/node_modules/JSONStream/.travis.yml +++ /dev/null @@ -1,3 +0,0 @@ -language: node_js -node_js: - - "0.10" diff --git a/node_modules/browserify-incremental/node_modules/JSONStream/LICENSE.APACHE2 b/node_modules/browserify-incremental/node_modules/JSONStream/LICENSE.APACHE2 deleted file mode 100644 index 6366c047..00000000 --- a/node_modules/browserify-incremental/node_modules/JSONStream/LICENSE.APACHE2 +++ /dev/null @@ -1,15 +0,0 @@ -Apache License, Version 2.0 - -Copyright (c) 2011 Dominic Tarr - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. diff --git a/node_modules/browserify-incremental/node_modules/JSONStream/LICENSE.MIT b/node_modules/browserify-incremental/node_modules/JSONStream/LICENSE.MIT deleted file mode 100644 index 6eafbd73..00000000 --- a/node_modules/browserify-incremental/node_modules/JSONStream/LICENSE.MIT +++ /dev/null @@ -1,24 +0,0 @@ -The MIT License - -Copyright (c) 2011 Dominic Tarr - -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/node_modules/browserify-incremental/node_modules/JSONStream/examples/all_docs.js b/node_modules/browserify-incremental/node_modules/JSONStream/examples/all_docs.js deleted file mode 100644 index fa87fe52..00000000 --- a/node_modules/browserify-incremental/node_modules/JSONStream/examples/all_docs.js +++ /dev/null @@ -1,13 +0,0 @@ -var request = require('request') - , JSONStream = require('JSONStream') - , es = require('event-stream') - -var parser = JSONStream.parse(['rows', true]) //emit parts that match this path (any element of the rows array) - , req = request({url: 'http://isaacs.couchone.com/registry/_all_docs'}) - , logger = es.mapSync(function (data) { //create a stream that logs to stderr, - console.error(data) - return data - }) - -req.pipe(parser) -parser.pipe(logger) diff --git a/node_modules/browserify-incremental/node_modules/JSONStream/index.js b/node_modules/browserify-incremental/node_modules/JSONStream/index.js deleted file mode 100755 index 2422c9c0..00000000 --- a/node_modules/browserify-incremental/node_modules/JSONStream/index.js +++ /dev/null @@ -1,193 +0,0 @@ -#! /usr/bin/env node - -var Parser = require('jsonparse') - , through = require('through') - -/* - - the value of this.stack that creationix's jsonparse has is weird. - - it makes this code ugly, but his problem is way harder that mine, - so i'll forgive him. - -*/ - -exports.parse = function (path, map) { - - var parser = new Parser() - var stream = through(function (chunk) { - if('string' === typeof chunk) - chunk = new Buffer(chunk) - parser.write(chunk) - }, - function (data) { - if(data) - stream.write(data) - stream.queue(null) - }) - - if('string' === typeof path) - path = path.split('.').map(function (e) { - if (e === '*') - return true - else if (e === '') // '..'.split('.') returns an empty string - return {recurse: true} - else - return e - }) - - - var count = 0, _key - if(!path || !path.length) - path = null - - parser.onValue = function (value) { - if (!this.root) - stream.root = value - - if(! path) return - - var i = 0 // iterates on path - var j = 0 // iterates on stack - while (i < path.length) { - var key = path[i] - var c - j++ - - if (key && !key.recurse) { - c = (j === this.stack.length) ? this : this.stack[j] - if (!c) return - if (! check(key, c.key)) return - i++ - } else { - i++ - var nextKey = path[i] - if (! nextKey) return - while (true) { - c = (j === this.stack.length) ? this : this.stack[j] - if (!c) return - if (check(nextKey, c.key)) { i++; break} - j++ - } - } - } - if (j !== this.stack.length) return - - count ++ - var actualPath = this.stack.slice(1).map(function(element) { return element.key }).concat([this.key]) - var data = this.value[this.key] - if(null != data) - if(null != (data = map ? map(data, actualPath) : data)) - stream.queue(data) - delete this.value[this.key] - } - parser._onToken = parser.onToken; - - parser.onToken = function (token, value) { - parser._onToken(token, value); - if (this.stack.length === 0) { - if (stream.root) { - if(!path) - stream.queue(stream.root) - stream.emit('root', stream.root, count) - count = 0; - stream.root = null; - } - } - } - - parser.onError = function (err) { - stream.emit('error', err) - } - - - return stream -} - -function check (x, y) { - if ('string' === typeof x) - return y == x - else if (x && 'function' === typeof x.exec) - return x.exec(y) - else if ('boolean' === typeof x) - return x - else if ('function' === typeof x) - return x(y) - return false -} - -exports.stringify = function (op, sep, cl, indent) { - indent = indent || 0 - if (op === false){ - op = '' - sep = '\n' - cl = '' - } else if (op == null) { - - op = '[\n' - sep = '\n,\n' - cl = '\n]\n' - - } - - //else, what ever you like - - var stream - , first = true - , anyData = false - stream = through(function (data) { - anyData = true - var json = JSON.stringify(data, null, indent) - if(first) { first = false ; stream.queue(op + json)} - else stream.queue(sep + json) - }, - function (data) { - if(!anyData) - stream.queue(op) - stream.queue(cl) - stream.queue(null) - }) - - return stream -} - -exports.stringifyObject = function (op, sep, cl, indent) { - indent = indent || 0 - if (op === false){ - op = '' - sep = '\n' - cl = '' - } else if (op == null) { - - op = '{\n' - sep = '\n,\n' - cl = '\n}\n' - - } - - //else, what ever you like - - var first = true - , anyData = false - stream = through(function (data) { - anyData = true - var json = JSON.stringify(data[0]) + ':' + JSON.stringify(data[1], null, indent) - if(first) { first = false ; this.queue(op + json)} - else this.queue(sep + json) - }, - function (data) { - if(!anyData) this.queue(op) - this.queue(cl) - - this.queue(null) - }) - - return stream -} - -if(!module.parent && process.title !== 'browser') { - process.stdin - .pipe(exports.parse(process.argv[2])) - .pipe(exports.stringify('[', ',\n', ']\n', 2)) - .pipe(process.stdout) -} diff --git a/node_modules/browserify-incremental/node_modules/JSONStream/node_modules/jsonparse/LICENSE b/node_modules/browserify-incremental/node_modules/JSONStream/node_modules/jsonparse/LICENSE deleted file mode 100644 index 6dc24be5..00000000 --- a/node_modules/browserify-incremental/node_modules/JSONStream/node_modules/jsonparse/LICENSE +++ /dev/null @@ -1,24 +0,0 @@ -The MIT License - -Copyright (c) 2012 Tim Caswell - -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/node_modules/browserify-incremental/node_modules/JSONStream/node_modules/jsonparse/README.markdown b/node_modules/browserify-incremental/node_modules/JSONStream/node_modules/jsonparse/README.markdown deleted file mode 100644 index 0f405d35..00000000 --- a/node_modules/browserify-incremental/node_modules/JSONStream/node_modules/jsonparse/README.markdown +++ /dev/null @@ -1,11 +0,0 @@ -This is a streaming JSON parser. For a simpler, sax-based version see this gist: https://gist.github.com/1821394 - -The MIT License (MIT) -Copyright (c) 2011-2012 Tim Caswell - -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/node_modules/browserify-incremental/node_modules/JSONStream/node_modules/jsonparse/bench.js b/node_modules/browserify-incremental/node_modules/JSONStream/node_modules/jsonparse/bench.js deleted file mode 100644 index b36d92f7..00000000 --- a/node_modules/browserify-incremental/node_modules/JSONStream/node_modules/jsonparse/bench.js +++ /dev/null @@ -1,26 +0,0 @@ -var fs = require('fs'), - Parser = require('./jsonparse'); - - -var json = fs.readFileSync("samplejson/basic.json"); - - -while (true) { - var start = Date.now(); - for (var i = 0; i < 1000; i++) { - JSON.parse(json); - } - var first = Date.now() - start; - - start = Date.now(); - var p = new Parser(); - for (var i = 0; i < 1000; i++) { - p.write(json); - } - var second = Date.now() - start; - - - console.log("JSON.parse took %s", first); - console.log("streaming parser took %s", second); - console.log("streaming is %s times slower", second / first); -} diff --git a/node_modules/browserify-incremental/node_modules/JSONStream/node_modules/jsonparse/examples/twitterfeed.js b/node_modules/browserify-incremental/node_modules/JSONStream/node_modules/jsonparse/examples/twitterfeed.js deleted file mode 100644 index 10210d47..00000000 --- a/node_modules/browserify-incremental/node_modules/JSONStream/node_modules/jsonparse/examples/twitterfeed.js +++ /dev/null @@ -1,30 +0,0 @@ -var Parser = require('../jsonparse'); -var Http = require('http'); -require('./colors'); -var p = new Parser(); -var cred = require('./credentials'); -var client = Http.createClient(80, "stream.twitter.com"); -var request = client.request("GET", "/1/statuses/sample.json", { - "Host": "stream.twitter.com", - "Authorization": (new Buffer(cred.username + ":" + cred.password)).toString("base64") -}); -request.on('response', function (response) { - console.log(response.statusCode); - console.dir(response.headers); - response.on('data', function (chunk) { - p.write(chunk); - }); - response.on('end', function () { - console.log("END"); - }); -}); -request.end(); -var text = "", name = ""; -p.onValue = function (value) { - if (this.stack.length === 1 && this.key === 'text') { text = value; } - if (this.stack.length === 2 && this.key === 'name' && this.stack[1].key === 'user') { name = value; } - if (this.stack.length === 0) { - console.log(text.blue + " - " + name.yellow); - text = name = ""; - } -}; diff --git a/node_modules/browserify-incremental/node_modules/JSONStream/node_modules/jsonparse/jsonparse.js b/node_modules/browserify-incremental/node_modules/JSONStream/node_modules/jsonparse/jsonparse.js deleted file mode 100644 index 45eefbb0..00000000 --- a/node_modules/browserify-incremental/node_modules/JSONStream/node_modules/jsonparse/jsonparse.js +++ /dev/null @@ -1,401 +0,0 @@ -/*global Buffer*/ -// Named constants with unique integer values -var C = {}; -// Tokens -var LEFT_BRACE = C.LEFT_BRACE = 0x1; -var RIGHT_BRACE = C.RIGHT_BRACE = 0x2; -var LEFT_BRACKET = C.LEFT_BRACKET = 0x3; -var RIGHT_BRACKET = C.RIGHT_BRACKET = 0x4; -var COLON = C.COLON = 0x5; -var COMMA = C.COMMA = 0x6; -var TRUE = C.TRUE = 0x7; -var FALSE = C.FALSE = 0x8; -var NULL = C.NULL = 0x9; -var STRING = C.STRING = 0xa; -var NUMBER = C.NUMBER = 0xb; -// Tokenizer States -var START = C.START = 0x11; -var TRUE1 = C.TRUE1 = 0x21; -var TRUE2 = C.TRUE2 = 0x22; -var TRUE3 = C.TRUE3 = 0x23; -var FALSE1 = C.FALSE1 = 0x31; -var FALSE2 = C.FALSE2 = 0x32; -var FALSE3 = C.FALSE3 = 0x33; -var FALSE4 = C.FALSE4 = 0x34; -var NULL1 = C.NULL1 = 0x41; -var NULL2 = C.NULL3 = 0x42; -var NULL3 = C.NULL2 = 0x43; -var NUMBER1 = C.NUMBER1 = 0x51; -var NUMBER2 = C.NUMBER2 = 0x52; -var NUMBER3 = C.NUMBER3 = 0x53; -var NUMBER4 = C.NUMBER4 = 0x54; -var NUMBER5 = C.NUMBER5 = 0x55; -var NUMBER6 = C.NUMBER6 = 0x56; -var NUMBER7 = C.NUMBER7 = 0x57; -var NUMBER8 = C.NUMBER8 = 0x58; -var STRING1 = C.STRING1 = 0x61; -var STRING2 = C.STRING2 = 0x62; -var STRING3 = C.STRING3 = 0x63; -var STRING4 = C.STRING4 = 0x64; -var STRING5 = C.STRING5 = 0x65; -var STRING6 = C.STRING6 = 0x66; -// Parser States -var VALUE = C.VALUE = 0x71; -var KEY = C.KEY = 0x72; -// Parser Modes -var OBJECT = C.OBJECT = 0x81; -var ARRAY = C.ARRAY = 0x82; - -// Slow code to string converter (only used when throwing syntax errors) -function toknam(code) { - var keys = Object.keys(C); - for (var i = 0, l = keys.length; i < l; i++) { - var key = keys[i]; - if (C[key] === code) { return key; } - } - return code && ("0x" + code.toString(16)); -} - - -function Parser() { - this.tState = START; - this.value = undefined; - - this.string = undefined; // string data - this.unicode = undefined; // unicode escapes - - // For number parsing - this.negative = undefined; - this.magnatude = undefined; - this.position = undefined; - this.exponent = undefined; - this.negativeExponent = undefined; - - this.key = undefined; - this.mode = undefined; - this.stack = []; - this.state = VALUE; - this.bytes_remaining = 0; // number of bytes remaining in multi byte utf8 char to read after split boundary - this.bytes_in_sequence = 0; // bytes in multi byte utf8 char to read - this.temp_buffs = { "2": new Buffer(2), "3": new Buffer(3), "4": new Buffer(4) }; // for rebuilding chars split before boundary is reached -} -var proto = Parser.prototype; -proto.charError = function (buffer, i) { - this.onError(new Error("Unexpected " + JSON.stringify(String.fromCharCode(buffer[i])) + " at position " + i + " in state " + toknam(this.tState))); -}; -proto.onError = function (err) { throw err; }; -proto.write = function (buffer) { - if (typeof buffer === "string") buffer = new Buffer(buffer); - //process.stdout.write("Input: "); - //console.dir(buffer.toString()); - var n; - for (var i = 0, l = buffer.length; i < l; i++) { - if (this.tState === START){ - n = buffer[i]; - if(n === 0x7b){ this.onToken(LEFT_BRACE, "{"); // { - }else if(n === 0x7d){ this.onToken(RIGHT_BRACE, "}"); // } - }else if(n === 0x5b){ this.onToken(LEFT_BRACKET, "["); // [ - }else if(n === 0x5d){ this.onToken(RIGHT_BRACKET, "]"); // ] - }else if(n === 0x3a){ this.onToken(COLON, ":"); // : - }else if(n === 0x2c){ this.onToken(COMMA, ","); // , - }else if(n === 0x74){ this.tState = TRUE1; // t - }else if(n === 0x66){ this.tState = FALSE1; // f - }else if(n === 0x6e){ this.tState = NULL1; // n - }else if(n === 0x22){ this.string = ""; this.tState = STRING1; // " - }else if(n === 0x2d){ this.negative = true; this.tState = NUMBER1; // - - }else if(n === 0x30){ this.magnatude = 0; this.tState = NUMBER2; // 0 - }else{ - if (n > 0x30 && n < 0x40) { // 1-9 - this.magnatude = n - 0x30; this.tState = NUMBER3; - } else if (n === 0x20 || n === 0x09 || n === 0x0a || n === 0x0d) { - // whitespace - } else { this.charError(buffer, i); } - } - }else if (this.tState === STRING1){ // After open quote - n = buffer[i]; // get current byte from buffer - // check for carry over of a multi byte char split between data chunks - // & fill temp buffer it with start of this data chunk up to the boundary limit set in the last iteration - if (this.bytes_remaining > 0) { - for (var j = 0; j < this.bytes_remaining; j++) { - this.temp_buffs[this.bytes_in_sequence][this.bytes_in_sequence - this.bytes_remaining + j] = buffer[j]; - } - this.string += this.temp_buffs[this.bytes_in_sequence].toString(); - this.bytes_in_sequence = this.bytes_remaining = 0; - i = i + j - 1; - } else if (this.bytes_remaining === 0 && n >= 128) { // else if no remainder bytes carried over, parse multi byte (>=128) chars one at a time - if ((n >= 194) && (n <= 223)) this.bytes_in_sequence = 2; - if ((n >= 224) && (n <= 239)) this.bytes_in_sequence = 3; - if ((n >= 240) && (n <= 244)) this.bytes_in_sequence = 4; - if ((this.bytes_in_sequence + i) > buffer.length) { // if bytes needed to complete char fall outside buffer length, we have a boundary split - for (var k = 0; k <= (buffer.length - 1 - i); k++) { - this.temp_buffs[this.bytes_in_sequence][k] = buffer[i + k]; // fill temp buffer of correct size with bytes available in this chunk - } - this.bytes_remaining = (i + this.bytes_in_sequence) - buffer.length; - i = buffer.length - 1; - } else { - this.string += buffer.slice(i, (i + this.bytes_in_sequence)).toString(); - i = i + this.bytes_in_sequence - 1; - } - } else if (n === 0x22) { this.tState = START; this.onToken(STRING, this.string); this.string = undefined; } - else if (n === 0x5c) { this.tState = STRING2; } - else if (n >= 0x20) { this.string += String.fromCharCode(n); } - else { this.charError(buffer, i); } - }else if (this.tState === STRING2){ // After backslash - n = buffer[i]; - if(n === 0x22){ this.string += "\""; this.tState = STRING1; - }else if(n === 0x5c){ this.string += "\\"; this.tState = STRING1; - }else if(n === 0x2f){ this.string += "\/"; this.tState = STRING1; - }else if(n === 0x62){ this.string += "\b"; this.tState = STRING1; - }else if(n === 0x66){ this.string += "\f"; this.tState = STRING1; - }else if(n === 0x6e){ this.string += "\n"; this.tState = STRING1; - }else if(n === 0x72){ this.string += "\r"; this.tState = STRING1; - }else if(n === 0x74){ this.string += "\t"; this.tState = STRING1; - }else if(n === 0x75){ this.unicode = ""; this.tState = STRING3; - }else{ - this.charError(buffer, i); - } - }else if (this.tState === STRING3 || this.tState === STRING4 || this.tState === STRING5 || this.tState === STRING6){ // unicode hex codes - n = buffer[i]; - // 0-9 A-F a-f - if ((n >= 0x30 && n < 0x40) || (n > 0x40 && n <= 0x46) || (n > 0x60 && n <= 0x66)) { - this.unicode += String.fromCharCode(n); - if (this.tState++ === STRING6) { - this.string += String.fromCharCode(parseInt(this.unicode, 16)); - this.unicode = undefined; - this.tState = STRING1; - } - } else { - this.charError(buffer, i); - } - }else if (this.tState === NUMBER1){ // after minus - n = buffer[i]; - if (n === 0x30) { this.magnatude = 0; this.tState = NUMBER2; } - else if (n > 0x30 && n < 0x40) { this.magnatude = n - 0x30; this.tState = NUMBER3; } - else { this.charError(buffer, i); } - }else if (this.tState === NUMBER2){ // * After initial zero - n = buffer[i]; - if(n === 0x2e){ // . - this.position = 0.1; this.tState = NUMBER4; - }else if(n === 0x65 || n === 0x45){ // e/E - this.exponent = 0; this.tState = NUMBER6; - }else{ - this.tState = START; - this.onToken(NUMBER, 0); - this.magnatude = undefined; - this.negative = undefined; - i--; - } - }else if (this.tState === NUMBER3){ // * After digit (before period) - n = buffer[i]; - if(n === 0x2e){ // . - this.position = 0.1; this.tState = NUMBER4; - }else if(n === 0x65 || n === 0x45){ // e/E - this.exponent = 0; this.tState = NUMBER6; - }else{ - if (n >= 0x30 && n < 0x40) { this.magnatude = this.magnatude * 10 + n - 0x30; } - else { - this.tState = START; - if (this.negative) { - this.magnatude = -this.magnatude; - this.negative = undefined; - } - this.onToken(NUMBER, this.magnatude); - this.magnatude = undefined; - i--; - } - } - }else if (this.tState === NUMBER4){ // After period - n = buffer[i]; - if (n >= 0x30 && n < 0x40) { // 0-9 - this.magnatude += this.position * (n - 0x30); - this.position /= 10; - this.tState = NUMBER5; - } else { this.charError(buffer, i); } - }else if (this.tState === NUMBER5){ // * After digit (after period) - n = buffer[i]; - if (n >= 0x30 && n < 0x40) { // 0-9 - this.magnatude += this.position * (n - 0x30); - this.position /= 10; - } - else if (n === 0x65 || n === 0x45) { this.exponent = 0; this.tState = NUMBER6; } // E/e - else { - this.tState = START; - if (this.negative) { - this.magnatude = -this.magnatude; - this.negative = undefined; - } - this.onToken(NUMBER, this.negative ? -this.magnatude : this.magnatude); - this.magnatude = undefined; - this.position = undefined; - i--; - } - }else if (this.tState === NUMBER6){ // After E - n = buffer[i]; - if (n === 0x2b || n === 0x2d) { // +/- - if (n === 0x2d) { this.negativeExponent = true; } - this.tState = NUMBER7; - } - else if (n >= 0x30 && n < 0x40) { - this.exponent = this.exponent * 10 + (n - 0x30); - this.tState = NUMBER8; - } - else { this.charError(buffer, i); } - }else if (this.tState === NUMBER7){ // After +/- - n = buffer[i]; - if (n >= 0x30 && n < 0x40) { // 0-9 - this.exponent = this.exponent * 10 + (n - 0x30); - this.tState = NUMBER8; - } - else { this.charError(buffer, i); } - }else if (this.tState === NUMBER8){ // * After digit (after +/-) - n = buffer[i]; - if (n >= 0x30 && n < 0x40) { // 0-9 - this.exponent = this.exponent * 10 + (n - 0x30); - } - else { - if (this.negativeExponent) { - this.exponent = -this.exponent; - this.negativeExponent = undefined; - } - this.magnatude *= Math.pow(10, this.exponent); - this.exponent = undefined; - if (this.negative) { - this.magnatude = -this.magnatude; - this.negative = undefined; - } - this.tState = START; - this.onToken(NUMBER, this.magnatude); - this.magnatude = undefined; - i--; - } - }else if (this.tState === TRUE1){ // r - if (buffer[i] === 0x72) { this.tState = TRUE2; } - else { this.charError(buffer, i); } - }else if (this.tState === TRUE2){ // u - if (buffer[i] === 0x75) { this.tState = TRUE3; } - else { this.charError(buffer, i); } - }else if (this.tState === TRUE3){ // e - if (buffer[i] === 0x65) { this.tState = START; this.onToken(TRUE, true); } - else { this.charError(buffer, i); } - }else if (this.tState === FALSE1){ // a - if (buffer[i] === 0x61) { this.tState = FALSE2; } - else { this.charError(buffer, i); } - }else if (this.tState === FALSE2){ // l - if (buffer[i] === 0x6c) { this.tState = FALSE3; } - else { this.charError(buffer, i); } - }else if (this.tState === FALSE3){ // s - if (buffer[i] === 0x73) { this.tState = FALSE4; } - else { this.charError(buffer, i); } - }else if (this.tState === FALSE4){ // e - if (buffer[i] === 0x65) { this.tState = START; this.onToken(FALSE, false); } - else { this.charError(buffer, i); } - }else if (this.tState === NULL1){ // u - if (buffer[i] === 0x75) { this.tState = NULL2; } - else { this.charError(buffer, i); } - }else if (this.tState === NULL2){ // l - if (buffer[i] === 0x6c) { this.tState = NULL3; } - else { this.charError(buffer, i); } - }else if (this.tState === NULL3){ // l - if (buffer[i] === 0x6c) { this.tState = START; this.onToken(NULL, null); } - else { this.charError(buffer, i); } - } - } -}; -proto.onToken = function (token, value) { - // Override this to get events -}; - -proto.parseError = function (token, value) { - this.onError(new Error("Unexpected " + toknam(token) + (value ? ("(" + JSON.stringify(value) + ")") : "") + " in state " + toknam(this.state))); -}; -proto.onError = function (err) { throw err; }; -proto.push = function () { - this.stack.push({value: this.value, key: this.key, mode: this.mode}); -}; -proto.pop = function () { - var value = this.value; - var parent = this.stack.pop(); - this.value = parent.value; - this.key = parent.key; - this.mode = parent.mode; - this.emit(value); - if (!this.mode) { this.state = VALUE; } -}; -proto.emit = function (value) { - if (this.mode) { this.state = COMMA; } - this.onValue(value); -}; -proto.onValue = function (value) { - // Override me -}; -proto.onToken = function (token, value) { - //console.log("OnToken: state=%s token=%s %s", toknam(this.state), toknam(token), value?JSON.stringify(value):""); - if(this.state === VALUE){ - if(token === STRING || token === NUMBER || token === TRUE || token === FALSE || token === NULL){ - if (this.value) { - this.value[this.key] = value; - } - this.emit(value); - }else if(token === LEFT_BRACE){ - this.push(); - if (this.value) { - this.value = this.value[this.key] = {}; - } else { - this.value = {}; - } - this.key = undefined; - this.state = KEY; - this.mode = OBJECT; - }else if(token === LEFT_BRACKET){ - this.push(); - if (this.value) { - this.value = this.value[this.key] = []; - } else { - this.value = []; - } - this.key = 0; - this.mode = ARRAY; - this.state = VALUE; - }else if(token === RIGHT_BRACE){ - if (this.mode === OBJECT) { - this.pop(); - } else { - this.parseError(token, value); - } - }else if(token === RIGHT_BRACKET){ - if (this.mode === ARRAY) { - this.pop(); - } else { - this.parseError(token, value); - } - }else{ - this.parseError(token, value); - } - }else if(this.state === KEY){ - if (token === STRING) { - this.key = value; - this.state = COLON; - } else if (token === RIGHT_BRACE) { - this.pop(); - } else { - this.parseError(token, value); - } - }else if(this.state === COLON){ - if (token === COLON) { this.state = VALUE; } - else { this.parseError(token, value); } - }else if(this.state === COMMA){ - if (token === COMMA) { - if (this.mode === ARRAY) { this.key++; this.state = VALUE; } - else if (this.mode === OBJECT) { this.state = KEY; } - - } else if (token === RIGHT_BRACKET && this.mode === ARRAY || token === RIGHT_BRACE && this.mode === OBJECT) { - this.pop(); - } else { - this.parseError(token, value); - } - }else{ - this.parseError(token, value); - } -}; - -module.exports = Parser; diff --git a/node_modules/browserify-incremental/node_modules/JSONStream/node_modules/jsonparse/package.json b/node_modules/browserify-incremental/node_modules/JSONStream/node_modules/jsonparse/package.json deleted file mode 100644 index d720832c..00000000 --- a/node_modules/browserify-incremental/node_modules/JSONStream/node_modules/jsonparse/package.json +++ /dev/null @@ -1,54 +0,0 @@ -{ - "name": "jsonparse", - "description": "This is a pure-js JSON streaming parser for node.js", - "tags": [ - "json", - "stream" - ], - "version": "0.0.5", - "author": { - "name": "Tim Caswell", - "email": "tim@creationix.com" - }, - "repository": { - "type": "git", - "url": "http://github.com/creationix/jsonparse.git" - }, - "devDependencies": { - "tape": "~0.1.1", - "tap": "~0.3.3" - }, - "scripts": { - "test": "tap test/*.js" - }, - "bugs": "http://github.com/creationix/jsonparse/issues", - "engines": [ - "node >= 0.2.0" - ], - "license": "MIT", - "main": "jsonparse.js", - "_id": "jsonparse@0.0.5", - "dist": { - "shasum": "330542ad3f0a654665b778f3eb2d9a9fa507ac64", - "tarball": "https://registry.npmjs.org/jsonparse/-/jsonparse-0.0.5.tgz" - }, - "_from": "jsonparse@0.0.5", - "_npmVersion": "1.2.14", - "_npmUser": { - "name": "creationix", - "email": "tim@creationix.com" - }, - "maintainers": [ - { - "name": "creationix", - "email": "tim@creationix.com" - }, - { - "name": "substack", - "email": "mail@substack.net" - } - ], - "directories": {}, - "_shasum": "330542ad3f0a654665b778f3eb2d9a9fa507ac64", - "_resolved": "https://registry.npmjs.org/jsonparse/-/jsonparse-0.0.5.tgz" -} diff --git a/node_modules/browserify-incremental/node_modules/JSONStream/node_modules/jsonparse/samplejson/basic.json b/node_modules/browserify-incremental/node_modules/JSONStream/node_modules/jsonparse/samplejson/basic.json deleted file mode 100644 index 950dff9e..00000000 --- a/node_modules/browserify-incremental/node_modules/JSONStream/node_modules/jsonparse/samplejson/basic.json +++ /dev/null @@ -1,167 +0,0 @@ -[ - { - }, - { - "image": [ - {"shape": "rect", "fill": "#333", "stroke": "#999", "x": 0.5e+1, "y": 0.5, "z": 0.8e-0, "w": 0.5e5, "u": 2E10, "foo": 2E+1, "bar": 2E-0, "width": 47, "height": 47} - ], - "jumpable": 3, - "solid": { - "1": [2,4], - "2": [], - "3": [2,6], - "4": [], - "5": [2,8,1,3,7,9,4,6], - "6": [], - "7": [4,8], - "8": [], - "9": [6,8] - }, - "corners": {"1": true,"3": true,"7": true,"9": true} - }, - { - "image": [ - {"shape": "polygon", "fill": "#248", "stroke": "#48f", "points": [[0.5,47.5],[47.5,47.5],[47.5,0.5]]} - ], - "solid": { - "1": [2,4], - "2": [1], - "3": [2], - "4": [], - "5": [2,8,1,3,7,9,4,6], - "6": [], - "7": [4,8], - "8": [], - "9": [6,8] - }, - "corners": {"1": true,"3": true,"7": false,"9": true} - }, - { - "image": [ - {"shape": "polygon", "fill": "#248", "stroke": "#48f", "points": [[0.5,0.5],[47.5,47.5],[0.5,47.5]]} - ], - "solid": { - "1": [2], - "2": [3], - "3": [2,6], - "4": [], - "5": [2,8,1,3,7,9,4,6], - "6": [], - "7": [4,8], - "8": [], - "9": [6,8] - }, - "corners": {"1": true,"3": true,"7": true,"9": false} - }, - { - "image": [ - {"shape": "polygon", "fill": "#333", "stroke": "#999", "points": [[0.5,0.5],[47.5,47.5],[47.5,0.5]]} - ], - "jumpable": 3, - "solid": { - "1": [2,4], - "2": [], - "3": [2,6], - "4": [], - "5": [2,8,1,3,7,9,4,6], - "6": [3], - "7": [4,8], - "8": [7], - "9": [6,8] - }, - "corners": {"1": false,"3": true,"7": true,"9": true} - }, - { - "image": [ - {"shape": "polygon", "fill": "#333", "stroke": "#999", "points": [[0.5,0.5],[0.5,47.5],[47.5,0.5]]} - ], - "jumpable": 3, - "solid": { - "1": [2,4], - "2": [], - "3": [2,6], - "4": [1], - "5": [2,8,1,3,7,9,4,6], - "6": [], - "7": [4,8], - "8": [9], - "9": [6,8] - }, - "corners": {"1": true,"3": false,"7": true,"9": true} - }, - { - "image": [ - {"shape": "polygon", "fill": "#482", "stroke": "#8f4", "points": [[0.5,47.5],[0.5,23.5],[24.5,23.5],[24.5,0.5],[47.5,0.5],[47.5,47.5]]} - ], - "jumpable": 3, - "solid": { - "1": [2,4], - "2": [], - "3": [6,2], - "4": [], - "5": [2,8,1,3,7,9,4,6], - "6": [9], - "7": [4,8], - "8": [], - "9": [6,8] - }, - "corners": {"1": true,"3": true,"7": false,"9": true} - }, - { - "image": [ - {"shape": "polygon", "fill": "#482", "stroke": "#8f4", "points": [[0.5,0.5],[23.5,0.5],[23.5,24.5],[47.5,24.5],[47.5,47.5],[0.5,47.5]]} - ], - "jumpable": 3, - "solid": { - "1": [4,2], - "2": [], - "3": [2,6], - "4": [7], - "5": [2,8,1,3,7,9,4,6], - "6": [], - "7": [4,8], - "8": [], - "9": [6,8] - }, - "corners": {"1": true,"3": true,"7": true,"9": false} - }, - { - "image": [ - {"shape": "circle", "fill": "#ff0", "stroke": "#ff8", "cx": 24, "cy": 24, "r": 18} - ], - "item": true - }, - { - "image": [ - {"shape": "polygon", "fill": "#842", "stroke": "#f84", "points": [[4.5,0.5],[14.5,0.5],[14.5,17.5],[34,17.5],[33.5,0.5],[43.5,0.5],[43.5,47.5],[33.5,47.5],[33.5,30.5],[14.5,30.5],[14.5,47.5],[4.5,47.5]]} - ], - "jumpable": 3 - }, - { - "image": [ - {"shape": "polygon", "fill": "#333", "stroke": "#999", "points": [[0.5,0.5],[47.5,0.5],[24,47.5]]} - ], - "jumpable": 3, - "solid": { - "1": [2,4], - "2": [], - "3": [2,6], - "4": [1], - "5": [2,8,1,3,7,9,4,6], - "6": [3], - "7": [4,8], - "8": [], - "9": [6,8] - }, - "corners": {"1": false,"3": false,"7": true,"9": true} - }, - { - "image": [ - {"shape": "rect", "fill": "#114acb", "x": 0.5, "y": 0.5, "width": 47, "height": 47}, - {"shape": "polygon", "fill": "rgba(255,255,255,0.30)", "points": [[0.5,0.5],[47.5,0.5],[40,8],[8,8],[8,40],[0.5,47.5]]}, - {"shape": "polygon", "fill": "rgba(0,0,0,0.30)", "points": [[47.5,0.5],[48,48],[0.5,47.5],[8,40],[40,40],[40,8]]}, - {"shape": "polygon", "fill": "rgb(255,255,0)", "stroke": "rgba(255,255,0,0.5)", "points": [[24,9],[35,20],[26,29],[26,33],[22,33],[22,27],[29,20],[24,15],[16,23],[13,20]]}, - {"shape": "rect", "fill": "rgb(255,255,0)", "stroke": "rgba(255,255,0,0.5)", "x": 22, "y":35, "width": 4, "height": 4} - ] - } -] diff --git a/node_modules/browserify-incremental/node_modules/JSONStream/node_modules/jsonparse/samplejson/basic2.json b/node_modules/browserify-incremental/node_modules/JSONStream/node_modules/jsonparse/samplejson/basic2.json deleted file mode 100644 index 3a6919b2..00000000 --- a/node_modules/browserify-incremental/node_modules/JSONStream/node_modules/jsonparse/samplejson/basic2.json +++ /dev/null @@ -1,180 +0,0 @@ -[ - { - }, - { - "image": [ - {"shape": "rect", "fill": "#333", "stroke": "#999", "x": 0.5, "y": 0.5, "width": 47, "height": 47} - ], - "jumpable": 3, - "solid": { - "1": [2,4], - "2": [], - "3": [2,6], - "4": [], - "5": [2,8,1,3,7,9,4,6], - "6": [], - "7": [4,8], - "8": [], - "9": [6,8] - }, - "corners": {"1": true,"3": true,"7": true,"9": true} - }, - { - "image": [ - {"shape": "polygon", "fill": "#248", "stroke": "#48f", "points": [[0.5,47.5],[47.5,47.5],[47.5,0.5]]} - ], - "solid": { - "1": [2,4], - "2": [1], - "3": [2], - "4": [], - "5": [2,8,1,3,7,9,4,6], - "6": [], - "7": [4,8], - "8": [], - "9": [6,8] - }, - "corners": {"1": true,"3": true,"7": false,"9": true} - }, - { - "image": [ - {"shape": "polygon", "fill": "#248", "stroke": "#48f", "points": [[0.5,0.5],[47.5,47.5],[0.5,47.5]]} - ], - "solid": { - "1": [2], - "2": [3], - "3": [2,6], - "4": [], - "5": [2,8,1,3,7,9,4,6], - "6": [], - "7": [4,8], - "8": [], - "9": [6,8] - }, - "corners": {"1": true,"3": true,"7": true,"9": false} - }, - { - "image": [ - {"shape": "polygon", "fill": "#333", "stroke": "#999", "points": [[0.5,0.5],[47.5,47.5],[47.5,0.5]]} - ], - "jumpable": 3, - "solid": { - "1": [2,4], - "2": [], - "3": [2,6], - "4": [], - "5": [2,8,1,3,7,9,4,6], - "6": [3], - "7": [4,8], - "8": [7], - "9": [6,8] - }, - "corners": {"1": false,"3": true,"7": true,"9": true} - }, - { - "image": [ - {"shape": "polygon", "fill": "#333", "stroke": "#999", "points": [[0.5,0.5],[0.5,47.5],[47.5,0.5]]} - ], - "jumpable": 3, - "solid": { - "1": [2,4], - "2": [], - "3": [2,6], - "4": [1], - "5": [2,8,1,3,7,9,4,6], - "6": [], - "7": [4,8], - "8": [9], - "9": [6,8] - }, - "corners": {"1": true,"3": false,"7": true,"9": true} - }, - { - "image": [ - {"shape": "polygon", "fill": "#482", "stroke": "#8f4", "points": [[0.5,47.5],[0.5,23.5],[24.5,23.5],[24.5,0.5],[47.5,0.5],[47.5,47.5]]} - ], - "jumpable": 3, - "solid": { - "1": [2,4], - "2": [], - "3": [6,2], - "4": [], - "5": [2,8,1,3,7,9,4,6], - "6": [9], - "7": [4,8], - "8": [], - "9": [6,8] - }, - "corners": {"1": true,"3": true,"7": false,"9": true} - }, - { - "image": [ - {"shape": "polygon", "fill": "#482", "stroke": "#8f4", "points": [[0.5,0.5],[23.5,0.5],[23.5,24.5],[47.5,24.5],[47.5,47.5],[0.5,47.5]]} - ], - "jumpable": 3, - "solid": { - "1": [4,2], - "2": [], - "3": [2,6], - "4": [7], - "5": [2,8,1,3,7,9,4,6], - "6": [], - "7": [4,8], - "8": [], - "9": [6,8] - }, - "corners": {"1": true,"3": true,"7": true,"9": false} - }, - { - "image": [ - {"shape": "circle", "fill": "#ff0", "stroke": "#ff8", "cx": 24, "cy": 24, "r": 18} - ], - "item": true - }, - { - "image": [ - {"shape": "polygon", "fill": "#842", "stroke": "#f84", "points": [[4.5,0.5],[14.5,0.5],[14.5,17.5],[34,17.5],[33.5,0.5],[43.5,0.5],[43.5,47.5],[33.5,47.5],[33.5,30.5],[14.5,30.5],[14.5,47.5],[4.5,47.5]]} - ], - "jumpable": 3 - }, - { - "image": [ - {"shape": "polygon", "fill": "#333", "stroke": "#999", "points": [[0.5,0.5],[47.5,0.5],[24,47.5]]} - ], - "jumpable": 3, - "solid": { - "1": [2,4], - "2": [], - "3": [2,6], - "4": [1], - "5": [2,8,1,3,7,9,4,6], - "6": [3], - "7": [4,8], - "8": [], - "9": [6,8] - }, - "corners": {"1": false,"3": false,"7": true,"9": true} - }, - { - "image": [ - {"shape": "rect", "fill": "#114acb", "x": 0.5, "y": 0.5, "width": 47, "height": 47}, - {"shape": "polygon", "fill": "rgba(255,255,255,0.30)", "points": [[0.5,0.5],[47.5,0.5],[40,8],[8,8],[8,40],[0.5,47.5]]}, - {"shape": "polygon", "fill": "rgba(0,0,0,0.30)", "points": [[47.5,0.5],[48,48],[0.5,47.5],[8,40],[40,40],[40,8]]}, - {"shape": "polygon", "fill": "rgb(255,255,0)", "stroke": "rgba(255,255,0,0.5)", "points": [[24,9],[35,20],[26,29],[26,33],[22,33],[22,27],[29,20],[24,15],[16,23],[13,20]]}, - {"shape": "rect", "fill": "rgb(255,255,0)", "stroke": "rgba(255,255,0,0.5)", "x": 22, "y":35, "width": 4, "height": 4} - ], - "item": true - }, - { - "image": [ - {"shape": "circle", "fill": "#80f", "stroke": "#88f", "cx": 24, "cy": 24, "r": 18} - ], - "item": true - }, - { - "image": [ - {"shape": "circle", "fill": "#4f4", "stroke": "#8f8", "cx": 24, "cy": 24, "r": 18} - ], - "item": true - } -] diff --git a/node_modules/browserify-incremental/node_modules/JSONStream/node_modules/jsonparse/test/boundary.js b/node_modules/browserify-incremental/node_modules/JSONStream/node_modules/jsonparse/test/boundary.js deleted file mode 100644 index 6671f5f9..00000000 --- a/node_modules/browserify-incremental/node_modules/JSONStream/node_modules/jsonparse/test/boundary.js +++ /dev/null @@ -1,110 +0,0 @@ -var test = require('tape'); -var Parser = require('../'); - -test('2 byte utf8 \'De\' character: д', function (t) { - t.plan(1); - - var p = new Parser(); - p.onValue = function (value) { - t.equal(value, 'д'); - }; - - var de_buffer = new Buffer([0xd0, 0xb4]); - - p.write('"'); - p.write(de_buffer); - p.write('"'); - -}); - -test('3 byte utf8 \'Han\' character: 我', function (t) { - t.plan(1); - - var p = new Parser(); - p.onValue = function (value) { - t.equal(value, '我'); - }; - - var han_buffer = new Buffer([0xe6, 0x88, 0x91]); - p.write('"'); - p.write(han_buffer); - p.write('"'); -}); - -test('4 byte utf8 character (unicode scalar U+2070E): 𠜎', function (t) { - t.plan(1); - - var p = new Parser(); - p.onValue = function (value) { - t.equal(value, '𠜎'); - }; - - var Ux2070E_buffer = new Buffer([0xf0, 0xa0, 0x9c, 0x8e]); - p.write('"'); - p.write(Ux2070E_buffer); - p.write('"'); -}); - -test('3 byte utf8 \'Han\' character chunked inbetween 2nd and 3rd byte: 我', function (t) { - t.plan(1); - - var p = new Parser(); - p.onValue = function (value) { - t.equal(value, '我'); - }; - - var han_buffer_first = new Buffer([0xe6, 0x88]); - var han_buffer_second = new Buffer([0x91]); - p.write('"'); - p.write(han_buffer_first); - p.write(han_buffer_second); - p.write('"'); -}); - -test('4 byte utf8 character (unicode scalar U+2070E) chunked inbetween 2nd and 3rd byte: 𠜎', function (t) { - t.plan(1); - - var p = new Parser(); - p.onValue = function (value) { - t.equal(value, '𠜎'); - }; - - var Ux2070E_buffer_first = new Buffer([0xf0, 0xa0]); - var Ux2070E_buffer_second = new Buffer([0x9c, 0x8e]); - p.write('"'); - p.write(Ux2070E_buffer_first); - p.write(Ux2070E_buffer_second); - p.write('"'); -}); - -test('1-4 byte utf8 character string chunked inbetween random bytes: Aж文𠜱B', function (t) { - t.plan(1); - -var p = new Parser(); - p.onValue = function (value) { - t.equal(value, 'Aж文𠜱B'); - }; - - var eclectic_buffer = new Buffer([0x41, // A - 0xd0, 0xb6, // ж - 0xe6, 0x96, 0x87, // 文 - 0xf0, 0xa0, 0x9c, 0xb1, // 𠜱 - 0x42]); // B - - var rand_chunk = Math.floor(Math.random() * (eclectic_buffer.length)); - var first_buffer = eclectic_buffer.slice(0, rand_chunk); - var second_buffer = eclectic_buffer.slice(rand_chunk); - - //console.log('eclectic_buffer: ' + eclectic_buffer) - //console.log('sliced from 0 to ' + rand_chunk); - //console.log(first_buffer); - //console.log('then sliced from ' + rand_chunk + ' to the end'); - //console.log(second_buffer); - - console.log('chunked after offset ' + rand_chunk); - p.write('"'); - p.write(first_buffer); - p.write(second_buffer); - p.write('"'); - -}); \ No newline at end of file diff --git a/node_modules/browserify-incremental/node_modules/JSONStream/node_modules/jsonparse/test/primitives.js b/node_modules/browserify-incremental/node_modules/JSONStream/node_modules/jsonparse/test/primitives.js deleted file mode 100644 index 3c5e7895..00000000 --- a/node_modules/browserify-incremental/node_modules/JSONStream/node_modules/jsonparse/test/primitives.js +++ /dev/null @@ -1,54 +0,0 @@ -var test = require('tape'); -var Parser = require('../'); - -var expected = [ - [ [], '' ], - [ [], 'Hello' ], - [ [], 'This"is' ], - [ [], '\r\n\f\t\\/"' ], - [ [], 'Λάμβδα' ], - [ [], '\\' ], - [ [], '/' ], - [ [], '"' ], - [ [ 0 ], 0 ], - [ [ 1 ], 1 ], - [ [ 2 ], -1 ], - [ [], [ 0, 1, -1 ] ], - [ [ 0 ], 1 ], - [ [ 1 ], 1.1 ], - [ [ 2 ], -1.1 ], - [ [ 3 ], -1 ], - [ [], [ 1, 1.1, -1.1, -1 ] ], - [ [ 0 ], -1 ], - [ [], [ -1 ] ], - [ [ 0 ], -0.1 ], - [ [], [ -0.1 ] ], - [ [ 0 ], 6.019999999999999e+23 ], - [ [], [ 6.019999999999999e+23 ] ] -]; - -test('primitives', function (t) { - t.plan(23); - - var p = new Parser(); - p.onValue = function (value) { - var keys = this.stack - .slice(1) - .map(function (item) { return item.key }) - .concat(this.key !== undefined ? this.key : []) - ; - t.deepEqual( - [ keys, value ], - expected.shift() - ); - }; - - p.write('"""Hello""This\\"is""\\r\\n\\f\\t\\\\\\/\\""'); - p.write('"\\u039b\\u03ac\\u03bc\\u03b2\\u03b4\\u03b1"'); - p.write('"\\\\"'); - p.write('"\\/"'); - p.write('"\\""'); - p.write('[0,1,-1]'); - p.write('[1.0,1.1,-1.1,-1.0][-1][-0.1]'); - p.write('[6.02e23]'); -}); diff --git a/node_modules/browserify-incremental/node_modules/JSONStream/node_modules/jsonparse/test/utf8.js b/node_modules/browserify-incremental/node_modules/JSONStream/node_modules/jsonparse/test/utf8.js deleted file mode 100644 index 6cb842f3..00000000 --- a/node_modules/browserify-incremental/node_modules/JSONStream/node_modules/jsonparse/test/utf8.js +++ /dev/null @@ -1,38 +0,0 @@ -var test = require('tape'); -var Parser = require('../'); - -test('3 bytes of utf8', function (t) { - t.plan(1); - - var p = new Parser(); - p.onValue = function (value) { - t.equal(value, '├──'); - }; - - p.write('"├──"'); -}); - -test('utf8 snowman', function (t) { - t.plan(1); - - var p = new Parser(); - p.onValue = function (value) { - t.equal(value, '☃'); - }; - - p.write('"☃"'); -}); - -test('utf8 with regular ascii', function (t) { - t.plan(4); - - var p = new Parser(); - var expected = [ "snow: ☃!", "xyz", "¡que!" ]; - expected.push(expected.slice()); - - p.onValue = function (value) { - t.deepEqual(value, expected.shift()); - }; - - p.write('["snow: ☃!","xyz","¡que!"]'); -}); diff --git a/node_modules/browserify-incremental/node_modules/JSONStream/node_modules/through/.travis.yml b/node_modules/browserify-incremental/node_modules/JSONStream/node_modules/through/.travis.yml deleted file mode 100644 index c693a939..00000000 --- a/node_modules/browserify-incremental/node_modules/JSONStream/node_modules/through/.travis.yml +++ /dev/null @@ -1,5 +0,0 @@ -language: node_js -node_js: - - 0.6 - - 0.8 - - "0.10" diff --git a/node_modules/browserify-incremental/node_modules/JSONStream/node_modules/through/LICENSE.APACHE2 b/node_modules/browserify-incremental/node_modules/JSONStream/node_modules/through/LICENSE.APACHE2 deleted file mode 100644 index 6366c047..00000000 --- a/node_modules/browserify-incremental/node_modules/JSONStream/node_modules/through/LICENSE.APACHE2 +++ /dev/null @@ -1,15 +0,0 @@ -Apache License, Version 2.0 - -Copyright (c) 2011 Dominic Tarr - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. diff --git a/node_modules/browserify-incremental/node_modules/JSONStream/node_modules/through/LICENSE.MIT b/node_modules/browserify-incremental/node_modules/JSONStream/node_modules/through/LICENSE.MIT deleted file mode 100644 index 6eafbd73..00000000 --- a/node_modules/browserify-incremental/node_modules/JSONStream/node_modules/through/LICENSE.MIT +++ /dev/null @@ -1,24 +0,0 @@ -The MIT License - -Copyright (c) 2011 Dominic Tarr - -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/node_modules/browserify-incremental/node_modules/JSONStream/node_modules/through/index.js b/node_modules/browserify-incremental/node_modules/JSONStream/node_modules/through/index.js deleted file mode 100644 index ca5fc590..00000000 --- a/node_modules/browserify-incremental/node_modules/JSONStream/node_modules/through/index.js +++ /dev/null @@ -1,108 +0,0 @@ -var Stream = require('stream') - -// through -// -// a stream that does nothing but re-emit the input. -// useful for aggregating a series of changing but not ending streams into one stream) - -exports = module.exports = through -through.through = through - -//create a readable writable stream. - -function through (write, end, opts) { - write = write || function (data) { this.queue(data) } - end = end || function () { this.queue(null) } - - var ended = false, destroyed = false, buffer = [], _ended = false - var stream = new Stream() - stream.readable = stream.writable = true - stream.paused = false - -// stream.autoPause = !(opts && opts.autoPause === false) - stream.autoDestroy = !(opts && opts.autoDestroy === false) - - stream.write = function (data) { - write.call(this, data) - return !stream.paused - } - - function drain() { - while(buffer.length && !stream.paused) { - var data = buffer.shift() - if(null === data) - return stream.emit('end') - else - stream.emit('data', data) - } - } - - stream.queue = stream.push = function (data) { -// console.error(ended) - if(_ended) return stream - if(data === null) _ended = true - buffer.push(data) - drain() - return stream - } - - //this will be registered as the first 'end' listener - //must call destroy next tick, to make sure we're after any - //stream piped from here. - //this is only a problem if end is not emitted synchronously. - //a nicer way to do this is to make sure this is the last listener for 'end' - - stream.on('end', function () { - stream.readable = false - if(!stream.writable && stream.autoDestroy) - process.nextTick(function () { - stream.destroy() - }) - }) - - function _end () { - stream.writable = false - end.call(stream) - if(!stream.readable && stream.autoDestroy) - stream.destroy() - } - - stream.end = function (data) { - if(ended) return - ended = true - if(arguments.length) stream.write(data) - _end() // will emit or queue - return stream - } - - stream.destroy = function () { - if(destroyed) return - destroyed = true - ended = true - buffer.length = 0 - stream.writable = stream.readable = false - stream.emit('close') - return stream - } - - stream.pause = function () { - if(stream.paused) return - stream.paused = true - return stream - } - - stream.resume = function () { - if(stream.paused) { - stream.paused = false - stream.emit('resume') - } - drain() - //may have become paused again, - //as drain emits 'data'. - if(!stream.paused) - stream.emit('drain') - return stream - } - return stream -} - diff --git a/node_modules/browserify-incremental/node_modules/JSONStream/node_modules/through/package.json b/node_modules/browserify-incremental/node_modules/JSONStream/node_modules/through/package.json deleted file mode 100644 index 85acfbf8..00000000 --- a/node_modules/browserify-incremental/node_modules/JSONStream/node_modules/through/package.json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "name": "through", - "version": "2.3.8", - "description": "simplified stream construction", - "main": "index.js", - "scripts": { - "test": "set -e; for t in test/*.js; do node $t; done" - }, - "devDependencies": { - "stream-spec": "~0.3.5", - "tape": "~2.3.2", - "from": "~0.1.3" - }, - "keywords": [ - "stream", - "streams", - "user-streams", - "pipe" - ], - "author": { - "name": "Dominic Tarr", - "email": "dominic.tarr@gmail.com", - "url": "dominictarr.com" - }, - "license": "MIT", - "repository": { - "type": "git", - "url": "git+https://github.com/dominictarr/through.git" - }, - "homepage": "https://github.com/dominictarr/through", - "testling": { - "browsers": [ - "ie/8..latest", - "ff/15..latest", - "chrome/20..latest", - "safari/5.1..latest" - ], - "files": "test/*.js" - }, - "gitHead": "2c5a6f9a0cc54da759b6e10964f2081c358e49dc", - "bugs": { - "url": "https://github.com/dominictarr/through/issues" - }, - "_id": "through@2.3.8", - "_shasum": "0dd4c9ffaabc357960b1b724115d7e0e86a2e1f5", - "_from": "through@>=2.2.7 <3.0.0", - "_npmVersion": "2.12.0", - "_nodeVersion": "2.3.1", - "_npmUser": { - "name": "dominictarr", - "email": "dominic.tarr@gmail.com" - }, - "maintainers": [ - { - "name": "dominictarr", - "email": "dominic.tarr@gmail.com" - } - ], - "dist": { - "shasum": "0dd4c9ffaabc357960b1b724115d7e0e86a2e1f5", - "tarball": "http://registry.npmjs.org/through/-/through-2.3.8.tgz" - }, - "directories": {}, - "_resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", - "readme": "ERROR: No README data found!" -} diff --git a/node_modules/browserify-incremental/node_modules/JSONStream/node_modules/through/readme.markdown b/node_modules/browserify-incremental/node_modules/JSONStream/node_modules/through/readme.markdown deleted file mode 100644 index cb34c813..00000000 --- a/node_modules/browserify-incremental/node_modules/JSONStream/node_modules/through/readme.markdown +++ /dev/null @@ -1,64 +0,0 @@ -#through - -[![build status](https://secure.travis-ci.org/dominictarr/through.png)](http://travis-ci.org/dominictarr/through) -[![testling badge](https://ci.testling.com/dominictarr/through.png)](https://ci.testling.com/dominictarr/through) - -Easy way to create a `Stream` that is both `readable` and `writable`. - -* Pass in optional `write` and `end` methods. -* `through` takes care of pause/resume logic if you use `this.queue(data)` instead of `this.emit('data', data)`. -* Use `this.pause()` and `this.resume()` to manage flow. -* Check `this.paused` to see current flow state. (`write` always returns `!this.paused`). - -This function is the basis for most of the synchronous streams in -[event-stream](http://github.com/dominictarr/event-stream). - -``` js -var through = require('through') - -through(function write(data) { - this.queue(data) //data *must* not be null - }, - function end () { //optional - this.queue(null) - }) -``` - -Or, can also be used _without_ buffering on pause, use `this.emit('data', data)`, -and this.emit('end') - -``` js -var through = require('through') - -through(function write(data) { - this.emit('data', data) - //this.pause() - }, - function end () { //optional - this.emit('end') - }) -``` - -## Extended Options - -You will probably not need these 99% of the time. - -### autoDestroy=false - -By default, `through` emits close when the writable -and readable side of the stream has ended. -If that is not desired, set `autoDestroy=false`. - -``` js -var through = require('through') - -//like this -var ts = through(write, end, {autoDestroy: false}) -//or like this -var ts = through(write, end) -ts.autoDestroy = false -``` - -## License - -MIT / Apache2 diff --git a/node_modules/browserify-incremental/node_modules/JSONStream/node_modules/through/test/async.js b/node_modules/browserify-incremental/node_modules/JSONStream/node_modules/through/test/async.js deleted file mode 100644 index 46bdbaeb..00000000 --- a/node_modules/browserify-incremental/node_modules/JSONStream/node_modules/through/test/async.js +++ /dev/null @@ -1,28 +0,0 @@ -var from = require('from') -var through = require('../') - -var tape = require('tape') - -tape('simple async example', function (t) { - - var n = 0, expected = [1,2,3,4,5], actual = [] - from(expected) - .pipe(through(function(data) { - this.pause() - n ++ - setTimeout(function(){ - console.log('pushing data', data) - this.push(data) - this.resume() - }.bind(this), 300) - })).pipe(through(function(data) { - console.log('pushing data second time', data); - this.push(data) - })).on('data', function (d) { - actual.push(d) - }).on('end', function() { - t.deepEqual(actual, expected) - t.end() - }) - -}) diff --git a/node_modules/browserify-incremental/node_modules/JSONStream/node_modules/through/test/auto-destroy.js b/node_modules/browserify-incremental/node_modules/JSONStream/node_modules/through/test/auto-destroy.js deleted file mode 100644 index 9a8fd000..00000000 --- a/node_modules/browserify-incremental/node_modules/JSONStream/node_modules/through/test/auto-destroy.js +++ /dev/null @@ -1,30 +0,0 @@ -var test = require('tape') -var through = require('../') - -// must emit end before close. - -test('end before close', function (assert) { - var ts = through() - ts.autoDestroy = false - var ended = false, closed = false - - ts.on('end', function () { - assert.ok(!closed) - ended = true - }) - ts.on('close', function () { - assert.ok(ended) - closed = true - }) - - ts.write(1) - ts.write(2) - ts.write(3) - ts.end() - assert.ok(ended) - assert.notOk(closed) - ts.destroy() - assert.ok(closed) - assert.end() -}) - diff --git a/node_modules/browserify-incremental/node_modules/JSONStream/node_modules/through/test/buffering.js b/node_modules/browserify-incremental/node_modules/JSONStream/node_modules/through/test/buffering.js deleted file mode 100644 index b0084bfc..00000000 --- a/node_modules/browserify-incremental/node_modules/JSONStream/node_modules/through/test/buffering.js +++ /dev/null @@ -1,71 +0,0 @@ -var test = require('tape') -var through = require('../') - -// must emit end before close. - -test('buffering', function(assert) { - var ts = through(function (data) { - this.queue(data) - }, function () { - this.queue(null) - }) - - var ended = false, actual = [] - - ts.on('data', actual.push.bind(actual)) - ts.on('end', function () { - ended = true - }) - - ts.write(1) - ts.write(2) - ts.write(3) - assert.deepEqual(actual, [1, 2, 3]) - ts.pause() - ts.write(4) - ts.write(5) - ts.write(6) - assert.deepEqual(actual, [1, 2, 3]) - ts.resume() - assert.deepEqual(actual, [1, 2, 3, 4, 5, 6]) - ts.pause() - ts.end() - assert.ok(!ended) - ts.resume() - assert.ok(ended) - assert.end() -}) - -test('buffering has data in queue, when ends', function (assert) { - - /* - * If stream ends while paused with data in the queue, - * stream should still emit end after all data is written - * on resume. - */ - - var ts = through(function (data) { - this.queue(data) - }, function () { - this.queue(null) - }) - - var ended = false, actual = [] - - ts.on('data', actual.push.bind(actual)) - ts.on('end', function () { - ended = true - }) - - ts.pause() - ts.write(1) - ts.write(2) - ts.write(3) - ts.end() - assert.deepEqual(actual, [], 'no data written yet, still paused') - assert.ok(!ended, 'end not emitted yet, still paused') - ts.resume() - assert.deepEqual(actual, [1, 2, 3], 'resumed, all data should be delivered') - assert.ok(ended, 'end should be emitted once all data was delivered') - assert.end(); -}) diff --git a/node_modules/browserify-incremental/node_modules/JSONStream/node_modules/through/test/end.js b/node_modules/browserify-incremental/node_modules/JSONStream/node_modules/through/test/end.js deleted file mode 100644 index fa113f58..00000000 --- a/node_modules/browserify-incremental/node_modules/JSONStream/node_modules/through/test/end.js +++ /dev/null @@ -1,45 +0,0 @@ -var test = require('tape') -var through = require('../') - -// must emit end before close. - -test('end before close', function (assert) { - var ts = through() - var ended = false, closed = false - - ts.on('end', function () { - assert.ok(!closed) - ended = true - }) - ts.on('close', function () { - assert.ok(ended) - closed = true - }) - - ts.write(1) - ts.write(2) - ts.write(3) - ts.end() - assert.ok(ended) - assert.ok(closed) - assert.end() -}) - -test('end only once', function (t) { - - var ts = through() - var ended = false, closed = false - - ts.on('end', function () { - t.equal(ended, false) - ended = true - }) - - ts.queue(null) - ts.queue(null) - ts.queue(null) - - ts.resume() - - t.end() -}) diff --git a/node_modules/browserify-incremental/node_modules/JSONStream/node_modules/through/test/index.js b/node_modules/browserify-incremental/node_modules/JSONStream/node_modules/through/test/index.js deleted file mode 100644 index 96da82f9..00000000 --- a/node_modules/browserify-incremental/node_modules/JSONStream/node_modules/through/test/index.js +++ /dev/null @@ -1,133 +0,0 @@ - -var test = require('tape') -var spec = require('stream-spec') -var through = require('../') - -/* - I'm using these two functions, and not streams and pipe - so there is less to break. if this test fails it must be - the implementation of _through_ -*/ - -function write(array, stream) { - array = array.slice() - function next() { - while(array.length) - if(stream.write(array.shift()) === false) - return stream.once('drain', next) - - stream.end() - } - - next() -} - -function read(stream, callback) { - var actual = [] - stream.on('data', function (data) { - actual.push(data) - }) - stream.once('end', function () { - callback(null, actual) - }) - stream.once('error', function (err) { - callback(err) - }) -} - -test('simple defaults', function(assert) { - - var l = 1000 - , expected = [] - - while(l--) expected.push(l * Math.random()) - - var t = through() - var s = spec(t).through().pausable() - - read(t, function (err, actual) { - assert.ifError(err) - assert.deepEqual(actual, expected) - assert.end() - }) - - t.on('close', s.validate) - - write(expected, t) -}); - -test('simple functions', function(assert) { - - var l = 1000 - , expected = [] - - while(l--) expected.push(l * Math.random()) - - var t = through(function (data) { - this.emit('data', data*2) - }) - var s = spec(t).through().pausable() - - - read(t, function (err, actual) { - assert.ifError(err) - assert.deepEqual(actual, expected.map(function (data) { - return data*2 - })) - assert.end() - }) - - t.on('close', s.validate) - - write(expected, t) -}) - -test('pauses', function(assert) { - - var l = 1000 - , expected = [] - - while(l--) expected.push(l) //Math.random()) - - var t = through() - - var s = spec(t) - .through() - .pausable() - - t.on('data', function () { - if(Math.random() > 0.1) return - t.pause() - process.nextTick(function () { - t.resume() - }) - }) - - read(t, function (err, actual) { - assert.ifError(err) - assert.deepEqual(actual, expected) - }) - - t.on('close', function () { - s.validate() - assert.end() - }) - - write(expected, t) -}) - -test('does not soft-end on `undefined`', function(assert) { - var stream = through() - , count = 0 - - stream.on('data', function (data) { - count++ - }) - - stream.write(undefined) - stream.write(undefined) - - assert.equal(count, 2) - - assert.end() -}) diff --git a/node_modules/browserify-incremental/node_modules/JSONStream/package.json b/node_modules/browserify-incremental/node_modules/JSONStream/package.json deleted file mode 100644 index d3295d60..00000000 --- a/node_modules/browserify-incremental/node_modules/JSONStream/package.json +++ /dev/null @@ -1,69 +0,0 @@ -{ - "name": "JSONStream", - "version": "0.10.0", - "description": "rawStream.pipe(JSONStream.parse()).pipe(streamOfObjects)", - "homepage": "http://github.com/dominictarr/JSONStream", - "repository": { - "type": "git", - "url": "git://github.com/dominictarr/JSONStream.git" - }, - "keywords": [ - "json", - "stream", - "streaming", - "parser", - "async", - "parsing" - ], - "dependencies": { - "jsonparse": "0.0.5", - "through": ">=2.2.7 <3" - }, - "devDependencies": { - "it-is": "~1", - "assertions": "~2.2.2", - "render": "~0.1.1", - "trees": "~0.0.3", - "event-stream": "~0.7.0", - "tape": "~2.12.3" - }, - "bin": { - "JSONStream": "./index.js" - }, - "author": { - "name": "Dominic Tarr", - "email": "dominic.tarr@gmail.com", - "url": "http://bit.ly/dominictarr" - }, - "scripts": { - "test": "set -e; for t in test/*.js; do echo '***' $t '***'; node $t; done" - }, - "optionalDependencies": {}, - "engines": { - "node": "*" - }, - "gitHead": "d4335321d9e2ab8a1ed94184daf71d5c0f3f90f2", - "bugs": { - "url": "https://github.com/dominictarr/JSONStream/issues" - }, - "_id": "JSONStream@0.10.0", - "_shasum": "74349d0d89522b71f30f0a03ff9bd20ca6f12ac0", - "_from": "JSONStream@>=0.10.0 <0.11.0", - "_npmVersion": "1.4.26", - "_npmUser": { - "name": "dominictarr", - "email": "dominic.tarr@gmail.com" - }, - "maintainers": [ - { - "name": "dominictarr", - "email": "dominic.tarr@gmail.com" - } - ], - "dist": { - "shasum": "74349d0d89522b71f30f0a03ff9bd20ca6f12ac0", - "tarball": "https://registry.npmjs.org/JSONStream/-/JSONStream-0.10.0.tgz" - }, - "directories": {}, - "_resolved": "https://registry.npmjs.org/JSONStream/-/JSONStream-0.10.0.tgz" -} diff --git a/node_modules/browserify-incremental/node_modules/JSONStream/readme.markdown b/node_modules/browserify-incremental/node_modules/JSONStream/readme.markdown deleted file mode 100644 index ffc743a5..00000000 --- a/node_modules/browserify-incremental/node_modules/JSONStream/readme.markdown +++ /dev/null @@ -1,178 +0,0 @@ -# JSONStream - -streaming JSON.parse and stringify - - - -## example - -``` js - -var request = require('request') - , JSONStream = require('JSONStream') - , es = require('event-stream') - -request({url: 'http://isaacs.couchone.com/registry/_all_docs'}) - .pipe(JSONStream.parse('rows.*')) - .pipe(es.mapSync(function (data) { - console.error(data) - return data - })) -``` - -## JSONStream.parse(path) - -parse stream of values that match a path - -``` js - JSONStream.parse('rows.*.doc') -``` - -The `..` operator is the recursive descent operator from [JSONPath](http://goessner.net/articles/JsonPath/), which will match a child at any depth (see examples below). - -If your keys have keys that include `.` or `*` etc, use an array instead. -`['row', true, /^doc/]`. - -If you use an array, `RegExp`s, booleans, and/or functions. The `..` operator is also available in array representation, using `{recurse: true}`. -any object that matches the path will be emitted as 'data' (and `pipe`d down stream) - -If `path` is empty or null, no 'data' events are emitted. - -### Examples - -query a couchdb view: - -``` bash -curl -sS localhost:5984/tests/_all_docs&include_docs=true -``` -you will get something like this: - -``` js -{"total_rows":129,"offset":0,"rows":[ - { "id":"change1_0.6995461115147918" - , "key":"change1_0.6995461115147918" - , "value":{"rev":"1-e240bae28c7bb3667f02760f6398d508"} - , "doc":{ - "_id": "change1_0.6995461115147918" - , "_rev": "1-e240bae28c7bb3667f02760f6398d508","hello":1} - }, - { "id":"change2_0.6995461115147918" - , "key":"change2_0.6995461115147918" - , "value":{"rev":"1-13677d36b98c0c075145bb8975105153"} - , "doc":{ - "_id":"change2_0.6995461115147918" - , "_rev":"1-13677d36b98c0c075145bb8975105153" - , "hello":2 - } - }, -]} - -``` - -we are probably most interested in the `rows.*.docs` - -create a `Stream` that parses the documents from the feed like this: - -``` js -var stream = JSONStream.parse(['rows', true, 'doc']) //rows, ANYTHING, doc - -stream.on('data', function(data) { - console.log('received:', data); -}); - -stream.on('root', function(root, count) { - if (!count) { - console.log('no matches found:', root); - } -}); -``` -awesome! - -### recursive patterns (..) - -`JSONStream.parser('docs..value')` -(or `JSONStream.parser(['docs', {recurse: true}, 'value'])` using an array) -will emit every `value` object that is a child, grand-child, etc. of the -`docs` object. In this example, it will match exactly 5 times at various depth -levels, emitting 0, 1, 2, 3 and 4 as results. - -```js -{ - "total": 5, - "docs": [ - { - "key": { - "value": 0, - "some": "property" - } - }, - {"value": 1}, - {"value": 2}, - {"blbl": [{}, {"a":0, "b":1, "value":3}, 10]}, - {"value": 4} - ] -} -``` - -## JSONStream.parse(pattern, map) - -provide a function that can be used to map or filter -the json output. `map` is passed the value at that node of the pattern, -if `map` return non-nullish (anything but `null` or `undefined`) -that value will be emitted in the stream. If it returns a nullish value, -nothing will be emitted. - -## JSONStream.stringify(open, sep, close) - -Create a writable stream. - -you may pass in custom `open`, `close`, and `seperator` strings. -But, by default, `JSONStream.stringify()` will create an array, -(with default options `open='[\n', sep='\n,\n', close='\n]\n'`) - -If you call `JSONStream.stringify(false)` -the elements will only be seperated by a newline. - -If you only write one item this will be valid JSON. - -If you write many items, -you can use a `RegExp` to split it into valid chunks. - -## JSONStream.stringifyObject(open, sep, close) - -Very much like `JSONStream.stringify`, -but creates a writable stream for objects instead of arrays. - -Accordingly, `open='{\n', sep='\n,\n', close='\n}\n'`. - -When you `.write()` to the stream you must supply an array with `[ key, data ]` -as the first argument. - -## unix tool - -query npm to see all the modules that browserify has ever depended on. - -``` bash -curl https://registry.npmjs.org/browserify | JSONStream 'versions.*.dependencies' -``` - -## numbers - -There are occasional problems parsing and unparsing very precise numbers. - -I have opened an issue here: - -https://github.com/creationix/jsonparse/issues/2 - -+1 - -## Acknowlegements - -this module depends on https://github.com/creationix/jsonparse -by Tim Caswell -and also thanks to Florent Jaby for teaching me about parsing with: -https://github.com/Floby/node-json-streams - -## license - -MIT / APACHE2 diff --git a/node_modules/browserify-incremental/node_modules/JSONStream/test/bool.js b/node_modules/browserify-incremental/node_modules/JSONStream/test/bool.js deleted file mode 100644 index 6c386d60..00000000 --- a/node_modules/browserify-incremental/node_modules/JSONStream/test/bool.js +++ /dev/null @@ -1,41 +0,0 @@ - -var fs = require ('fs') - , join = require('path').join - , file = join(__dirname, 'fixtures','all_npm.json') - , JSONStream = require('../') - , it = require('it-is').style('colour') - - function randomObj () { - return ( - Math.random () < 0.4 - ? {hello: 'eonuhckmqjk', - whatever: 236515, - lies: true, - nothing: [null], -// stuff: [Math.random(),Math.random(),Math.random()] - } - : ['AOREC', 'reoubaor', {ouec: 62642}, [[[], {}, 53]]] - ) - } - -var expected = [] - , stringify = JSONStream.stringify() - , es = require('event-stream') - , stringified = '' - , called = 0 - , count = 10 - , ended = false - -while (count --) - expected.push(randomObj()) - - es.connect( - es.readArray(expected), - stringify, - JSONStream.parse([true]), - es.writeArray(function (err, lines) { - - it(lines).has(expected) - console.error('PASSED') - }) - ) diff --git a/node_modules/browserify-incremental/node_modules/JSONStream/test/browser.js b/node_modules/browserify-incremental/node_modules/JSONStream/test/browser.js deleted file mode 100644 index 3c28d491..00000000 --- a/node_modules/browserify-incremental/node_modules/JSONStream/test/browser.js +++ /dev/null @@ -1,18 +0,0 @@ -var test = require('tape') -var JSONStream = require('../') -var testData = '{"rows":[{"hello":"world"}, {"foo": "bar"}]}' - -test('basic parsing', function (t) { - t.plan(2) - var parsed = JSONStream.parse("rows.*") - var parsedKeys = {} - parsed.on('data', function(match) { - parsedKeys[Object.keys(match)[0]] = true - }) - parsed.on('end', function() { - t.equal(!!parsedKeys['hello'], true) - t.equal(!!parsedKeys['foo'], true) - }) - parsed.write(testData) - parsed.end() -}) \ No newline at end of file diff --git a/node_modules/browserify-incremental/node_modules/JSONStream/test/destroy_missing.js b/node_modules/browserify-incremental/node_modules/JSONStream/test/destroy_missing.js deleted file mode 100644 index 315fdc83..00000000 --- a/node_modules/browserify-incremental/node_modules/JSONStream/test/destroy_missing.js +++ /dev/null @@ -1,27 +0,0 @@ -var fs = require ('fs'); -var net = require('net'); -var join = require('path').join; -var file = join(__dirname, 'fixtures','all_npm.json'); -var JSONStream = require('../'); - - -var server = net.createServer(function(client) { - var parser = JSONStream.parse([]); - parser.on('end', function() { - console.log('close') - console.error('PASSED'); - server.close(); - }); - client.pipe(parser); - var n = 4 - client.on('data', function () { - if(--n) return - client.end(); - }) -}); -server.listen(9999); - - -var client = net.connect({ port : 9999 }, function() { - fs.createReadStream(file).pipe(client).on('data', console.log) //.resume(); -}); diff --git a/node_modules/browserify-incremental/node_modules/JSONStream/test/doubledot1.js b/node_modules/browserify-incremental/node_modules/JSONStream/test/doubledot1.js deleted file mode 100644 index 78149b93..00000000 --- a/node_modules/browserify-incremental/node_modules/JSONStream/test/doubledot1.js +++ /dev/null @@ -1,29 +0,0 @@ -var fs = require ('fs') - , join = require('path').join - , file = join(__dirname, 'fixtures','all_npm.json') - , JSONStream = require('../') - , it = require('it-is') - -var expected = JSON.parse(fs.readFileSync(file)) - , parser = JSONStream.parse('rows..rev') - , called = 0 - , ended = false - , parsed = [] - -fs.createReadStream(file).pipe(parser) - -parser.on('data', function (data) { - called ++ - parsed.push(data) -}) - -parser.on('end', function () { - ended = true -}) - -process.on('exit', function () { - it(called).equal(expected.rows.length) - for (var i = 0 ; i < expected.rows.length ; i++) - it(parsed[i]).deepEqual(expected.rows[i].value.rev) - console.error('PASSED') -}) diff --git a/node_modules/browserify-incremental/node_modules/JSONStream/test/doubledot2.js b/node_modules/browserify-incremental/node_modules/JSONStream/test/doubledot2.js deleted file mode 100644 index f99d8819..00000000 --- a/node_modules/browserify-incremental/node_modules/JSONStream/test/doubledot2.js +++ /dev/null @@ -1,29 +0,0 @@ - var fs = require ('fs') - , join = require('path').join - , file = join(__dirname, 'fixtures','depth.json') - , JSONStream = require('../') - , it = require('it-is') - - var expected = JSON.parse(fs.readFileSync(file)) - , parser = JSONStream.parse(['docs', {recurse: true}, 'value']) - , called = 0 - , ended = false - , parsed = [] - - fs.createReadStream(file).pipe(parser) - - parser.on('data', function (data) { - called ++ - parsed.push(data) - }) - - parser.on('end', function () { - ended = true - }) - - process.on('exit', function () { - it(called).equal(5) - for (var i = 0 ; i < 5 ; i++) - it(parsed[i]).deepEqual(i) - console.error('PASSED') - }) diff --git a/node_modules/browserify-incremental/node_modules/JSONStream/test/empty.js b/node_modules/browserify-incremental/node_modules/JSONStream/test/empty.js deleted file mode 100644 index 19e888c1..00000000 --- a/node_modules/browserify-incremental/node_modules/JSONStream/test/empty.js +++ /dev/null @@ -1,44 +0,0 @@ -var JSONStream = require('../') - , stream = require('stream') - , it = require('it-is') - -var output = [ [], [] ] - -var parser1 = JSONStream.parse(['docs', /./]) -parser1.on('data', function(data) { - output[0].push(data) -}) - -var parser2 = JSONStream.parse(['docs', /./]) -parser2.on('data', function(data) { - output[1].push(data) -}) - -var pending = 2 -function onend () { - if (--pending > 0) return - it(output).deepEqual([ - [], [{hello: 'world'}] - ]) - console.error('PASSED') -} -parser1.on('end', onend) -parser2.on('end', onend) - -function makeReadableStream() { - var readStream = new stream.Stream() - readStream.readable = true - readStream.write = function (data) { this.emit('data', data) } - readStream.end = function (data) { this.emit('end') } - return readStream -} - -var emptyArray = makeReadableStream() -emptyArray.pipe(parser1) -emptyArray.write('{"docs":[]}') -emptyArray.end() - -var objectArray = makeReadableStream() -objectArray.pipe(parser2) -objectArray.write('{"docs":[{"hello":"world"}]}') -objectArray.end() diff --git a/node_modules/browserify-incremental/node_modules/JSONStream/test/fixtures/all_npm.json b/node_modules/browserify-incremental/node_modules/JSONStream/test/fixtures/all_npm.json deleted file mode 100644 index 6303ea2f..00000000 --- a/node_modules/browserify-incremental/node_modules/JSONStream/test/fixtures/all_npm.json +++ /dev/null @@ -1,4030 +0,0 @@ -{"total_rows":4028,"offset":0,"rows":[ -{"id":"","key":"","value":{"rev":"1-2f11e026763c10730d8b19ba5dce7565"}}, -{"id":"3scale","key":"3scale","value":{"rev":"3-db3d574bf0ecdfdf627afeaa21b4bdaa"}}, -{"id":"7digital-api","key":"7digital-api","value":{"rev":"20-21d11832780e2368aabc946598a41dd5"}}, -{"id":"AMD","key":"AMD","value":{"rev":"7-3b4305a9c786ab4c5ce611e7f0de0aca"}}, -{"id":"AriesNode","key":"AriesNode","value":{"rev":"3-9d88392bca6582c5c54784927dbfdee6"}}, -{"id":"Array.prototype.forEachAsync","key":"Array.prototype.forEachAsync","value":{"rev":"3-85696441ba6bef77cc1e7de7b073110e"}}, -{"id":"Babel","key":"Babel","value":{"rev":"5-9d8370c6ac6fd9cd3d530f26a9379814"}}, -{"id":"Blaggie-System","key":"Blaggie-System","value":{"rev":"3-47782b1e5cbfa425170192799510e148"}}, -{"id":"Blob","key":"Blob","value":{"rev":"3-cf5fb5d69da4dd00bc4f2be8870ca698"}}, -{"id":"BlobBuilder","key":"BlobBuilder","value":{"rev":"3-eb977ff1713a915384fac994f9d8fa7c"}}, -{"id":"Buffer","key":"Buffer","value":{"rev":"3-549594b58e83d6d07bb219e73de558e5"}}, -{"id":"CLI-UI","key":"CLI-UI","value":{"rev":"5-5912625f27b4bdfb4d3eed16726c48a8"}}, -{"id":"CLoader","key":"CLoader","value":{"rev":"1-ad3c317ddf3497e73ab41cb1ddbc6ba8"}}, -{"id":"CM1","key":"CM1","value":{"rev":"15-a325a2dc28bc6967a1a14beed86f3b80"}}, -{"id":"CONFIGURATOR","key":"CONFIGURATOR","value":{"rev":"3-c76bf9282a75cc4d3fb349e831ccb8a5"}}, -{"id":"Cashew","key":"Cashew","value":{"rev":"7-6a74dc51dbecc47d2c15bfb7d056a20f"}}, -{"id":"Class","key":"Class","value":{"rev":"5-958c6365f76a60a8b3dafbbd9730ac7e"}}, -{"id":"ClassLoader","key":"ClassLoader","value":{"rev":"3-27fe8faa8a1d60d639f87af52826ed47"}}, -{"id":"ClearSilver","key":"ClearSilver","value":{"rev":"3-f3e54eb9ce64fc6a090186e61f15ed0b"}}, -{"id":"Couch-cleaner","key":"Couch-cleaner","value":{"rev":"3-fc77270917d967a4e2e8637cfa9f0fe0"}}, -{"id":"CouchCover","key":"CouchCover","value":{"rev":"15-3b2d87d314f57272a5c27c42bbb3eaf9"}}, -{"id":"DOM-js","key":"DOM-js","value":{"rev":"8-748cdc96566a7b65bbd0b12be2eeb386"}}, -{"id":"DOMBuilder","key":"DOMBuilder","value":{"rev":"19-41a518f2ce16fabc0241535ccd967300"}}, -{"id":"DateZ","key":"DateZ","value":{"rev":"15-69d8115a9bd521e614eaad3cf2611264"}}, -{"id":"Dateselect","key":"Dateselect","value":{"rev":"3-6511567a876d8fe15724bbc7f247214c"}}, -{"id":"Deferred","key":"Deferred","value":{"rev":"3-c61dfc4a0d1bd3e9f35c7182f161f1f2"}}, -{"id":"DeskSet","key":"DeskSet","value":{"rev":"5-359bf760718898ff3591eb366e336cf9"}}, -{"id":"Estro","key":"Estro","value":{"rev":"11-97192e2d0327469bb30f814963db6dff"}}, -{"id":"EventProxy.js","key":"EventProxy.js","value":{"rev":"5-106696b56c6959cec4bfd37f406ee60a"}}, -{"id":"EventServer","key":"EventServer","value":{"rev":"3-59d174119435e99e2affe0c4ba7caae0"}}, -{"id":"Expressive","key":"Expressive","value":{"rev":"3-7eae0ea010eb9014b28108e814918eac"}}, -{"id":"F","key":"F","value":{"rev":"12-91a3db69527b46cf43e36b7ec64a4336"}}, -{"id":"Faker","key":"Faker","value":{"rev":"9-77951c352cb6f9a0b824be620a8fa40d"}}, -{"id":"FastLegS","key":"FastLegS","value":{"rev":"27-4399791981235021a36c94bb9e9b52b5"}}, -{"id":"Fayer","key":"Fayer","value":{"rev":"7-7e4974ff2716329375f9711bcabef701"}}, -{"id":"File","key":"File","value":{"rev":"3-45e353a984038bc48248dfc32b18f9a8"}}, -{"id":"FileError","key":"FileError","value":{"rev":"3-bb4b03a2548e3c229e2c7e92242946c3"}}, -{"id":"FileList","key":"FileList","value":{"rev":"3-ec4a3fc91794ef7fdd3fe88b19cec7b0"}}, -{"id":"FileReader","key":"FileReader","value":{"rev":"7-e81b58a2d8a765ae4781b41bbfadb4cb"}}, -{"id":"FileSaver","key":"FileSaver","value":{"rev":"3-476dcb3f63f4d10feee08d41a8128cb8"}}, -{"id":"FileWriter","key":"FileWriter","value":{"rev":"3-f2fcdbc4938de480cce2e8e8416a93dd"}}, -{"id":"FileWriterSync","key":"FileWriterSync","value":{"rev":"3-9494c3fe7a1230238f37a724ec10895b"}}, -{"id":"FormData","key":"FormData","value":{"rev":"3-8872d717575f7090107a96d81583f6fe"}}, -{"id":"Frenchpress","key":"Frenchpress","value":{"rev":"3-6d916fc15b9e77535771578f96c47c52"}}, -{"id":"FreshDocs","key":"FreshDocs","value":{"rev":"5-f1f3e76c85267faf21d06d911cc6c203"}}, -{"id":"Google_Plus_API","key":"Google_Plus_API","value":{"rev":"3-3302bc9846726d996a45daee3dc5922c"}}, -{"id":"Gord","key":"Gord","value":{"rev":"11-32fddef1453773ac7270ba0e7c83f727"}}, -{"id":"Graph","key":"Graph","value":{"rev":"7-c346edea4f90e3e18d50a62473868cf4"}}, -{"id":"GridFS","key":"GridFS","value":{"rev":"27-4fc649aaa007fddec4947bdb7111560f"}}, -{"id":"Haraka","key":"Haraka","value":{"rev":"39-ee8f890521c1579b3cc779c8ebe03480"}}, -{"id":"Index","key":"Index","value":{"rev":"29-d8f4881c1544bf51dea1927e87ebb3f3"}}, -{"id":"JS-Entities","key":"JS-Entities","value":{"rev":"7-905636d8b46f273210233b60063d079b"}}, -{"id":"JSLint-commonJS","key":"JSLint-commonJS","value":{"rev":"3-759a81f82af7055e85ee89c9707c9609"}}, -{"id":"JSON","key":"JSON","value":{"rev":"3-7966a79067c34fb5de2e62c796f67341"}}, -{"id":"JSONPath","key":"JSONPath","value":{"rev":"7-58789d57ae366a5b0ae4b36837f15d59"}}, -{"id":"JSONSelect","key":"JSONSelect","value":{"rev":"9-5b0730da91eeb52e8f54da516367dc0f"}}, -{"id":"JSONloops","key":"JSONloops","value":{"rev":"3-3d4a1f8bfcfd778ab7def54155324331"}}, -{"id":"JSPP","key":"JSPP","value":{"rev":"7-af09a2bb193b3ff44775e8fbb7d4f522"}}, -{"id":"JSV","key":"JSV","value":{"rev":"3-41a7af86909046111be8ee9b56b077c8"}}, -{"id":"Jody","key":"Jody","value":{"rev":"43-70c1cf40e93cd8ce53249e5295d6b159"}}, -{"id":"Journaling-Hash","key":"Journaling-Hash","value":{"rev":"3-ac676eecb40a4dff301c671fa4bb6be9"}}, -{"id":"Kahana","key":"Kahana","value":{"rev":"33-1cb7e291ae02cee4e8105509571223f5"}}, -{"id":"LazyBoy","key":"LazyBoy","value":{"rev":"13-20a8894e3a957f184f5ae2a3e709551c"}}, -{"id":"Lingo","key":"Lingo","value":{"rev":"9-1af9a6df616e601f09c8cec07ccad1ae"}}, -{"id":"Loggy","key":"Loggy","value":{"rev":"33-e115c25163ab468314eedbe497d1c51e"}}, -{"id":"MeCab","key":"MeCab","value":{"rev":"4-2687176c7b878930e812a534976a6988"}}, -{"id":"Mercury","key":"Mercury","value":{"rev":"3-09a6bff1332ed829bd2c37bfec244a41"}}, -{"id":"Mu","key":"Mu","value":{"rev":"7-28e6ab82c402c3a75fe0f79dea846b97"}}, -{"id":"N","key":"N","value":{"rev":"7-e265046b5bdd299b2cad1584083ce2d5"}}, -{"id":"NORRIS","key":"NORRIS","value":{"rev":"3-4b5b23b09118582c44414f8d480619e6"}}, -{"id":"NetOS","key":"NetOS","value":{"rev":"3-3f943f87a24c11e6dd8c265469914e80"}}, -{"id":"NewBase60","key":"NewBase60","value":{"rev":"3-fd84758db79870e82917d358c6673f32"}}, -{"id":"NoCR","key":"NoCR","value":{"rev":"3-8f6cddd528f2d6045e3dda6006fb6948"}}, -{"id":"NodObjC","key":"NodObjC","value":{"rev":"15-ea6ab2df532c90fcefe5a428950bfdbb"}}, -{"id":"Node-JavaScript-Preprocessor","key":"Node-JavaScript-Preprocessor","value":{"rev":"13-4662b5ad742caaa467ec5d6c8e77b1e5"}}, -{"id":"NodeInterval","key":"NodeInterval","value":{"rev":"3-dc3446db2e0cd5be29a3c07942dba66d"}}, -{"id":"NodeSSH","key":"NodeSSH","value":{"rev":"3-45530fae5a69c44a6dd92357910f4212"}}, -{"id":"Nonsense","key":"Nonsense","value":{"rev":"3-9d86191475bc76dc3dd496d4dfe5d94e"}}, -{"id":"NormAndVal","key":"NormAndVal","value":{"rev":"9-d3b3d6ffd046292f4733aa5f3eb7be61"}}, -{"id":"Olive","key":"Olive","value":{"rev":"5-67f3057f09cae5104f09472db1d215aa"}}, -{"id":"OnCollect","key":"OnCollect","value":{"rev":"16-6dbe3afd04f123dda87bb1e21cdfd776"}}, -{"id":"PJsonCouch","key":"PJsonCouch","value":{"rev":"3-be9588f49d85094c36288eb63f8236b3"}}, -{"id":"PMInject","key":"PMInject","value":{"rev":"5-da518047d8273dbf3b3c05ea25e77836"}}, -{"id":"PanPG","key":"PanPG","value":{"rev":"13-beb54225a6b1be4c157434c28adca016"}}, -{"id":"PerfDriver","key":"PerfDriver","value":{"rev":"2-b448fb2f407f341b8df7032f29e4920f"}}, -{"id":"PostgresClient","key":"PostgresClient","value":{"rev":"8-2baec6847f8ad7dcf24b7d61a4034163"}}, -{"id":"QuickWeb","key":"QuickWeb","value":{"rev":"13-d388df9c484021ecd75bc9650d659a67"}}, -{"id":"R.js","key":"R.js","value":{"rev":"3-3f154b95ec6fc744f95a29750f16667e"}}, -{"id":"R2","key":"R2","value":{"rev":"11-f5ccff6f108f6b928caafb62b80d1056"}}, -{"id":"Reston","key":"Reston","value":{"rev":"5-9d234010f32f593edafc04620f3cf2bd"}}, -{"id":"Sardines","key":"Sardines","value":{"rev":"5-d7d3d2269420e21c2c62b86ff5a0021e"}}, -{"id":"SessionWebSocket","key":"SessionWebSocket","value":{"rev":"8-d9fc9beaf90057aefeb701addd7fc845"}}, -{"id":"Sheet","key":"Sheet","value":{"rev":"8-c827c713564e4ae5a17988ffea520d0d"}}, -{"id":"Spec_My_Node","key":"Spec_My_Node","value":{"rev":"8-fa58408e9d9736d9c6fa8daf5d632106"}}, -{"id":"Spot","key":"Spot","value":{"rev":"3-6b6c2131451fed28fb57c924c4fa44cc"}}, -{"id":"Sslac","key":"Sslac","value":{"rev":"3-70a2215cc7505729254aa6fa1d9a25d9"}}, -{"id":"StaticServer","key":"StaticServer","value":{"rev":"3-6f5433177ef4d76a52f01c093117a532"}}, -{"id":"StringScanner","key":"StringScanner","value":{"rev":"3-e85d0646c25ec477c1c45538712d3a38"}}, -{"id":"Structr","key":"Structr","value":{"rev":"3-449720001801cff5831c2cc0e0f1fcf8"}}, -{"id":"Templ8","key":"Templ8","value":{"rev":"11-4e6edb250bc250df20b2d557ca7f6589"}}, -{"id":"Template","key":"Template","value":{"rev":"6-1f055c73524d2b7e82eb6c225bd4b8e0"}}, -{"id":"Thimble","key":"Thimble","value":{"rev":"3-8499b261206f2f2e9acf92d8a4e54afb"}}, -{"id":"Toji","key":"Toji","value":{"rev":"96-511e171ad9f32a9264c2cdf01accacfb"}}, -{"id":"TwigJS","key":"TwigJS","value":{"rev":"3-1aaefc6d6895d7d4824174d410a747b9"}}, -{"id":"UkGeoTool","key":"UkGeoTool","value":{"rev":"5-e84291128e12f66cebb972a60c1d710f"}}, -{"id":"Vector","key":"Vector","value":{"rev":"3-bf5dc97abe7cf1057260b70638175a96"}}, -{"id":"_design/app","key":"_design/app","value":{"rev":"421-b1661d854599a58d0904d68aa44d8b63"}}, -{"id":"_design/ui","key":"_design/ui","value":{"rev":"78-db00aeb91a59a326e38e2bef7f1126cf"}}, -{"id":"aaronblohowiak-plugify-js","key":"aaronblohowiak-plugify-js","value":{"rev":"3-0272c269eacd0c86bfc1711566922577"}}, -{"id":"aaronblohowiak-uglify-js","key":"aaronblohowiak-uglify-js","value":{"rev":"3-77844a6def6ec428d75caa0846c95502"}}, -{"id":"aasm-js","key":"aasm-js","value":{"rev":"3-01a48108d55909575440d9e0ef114f37"}}, -{"id":"abbrev","key":"abbrev","value":{"rev":"16-e17a2b6c7360955b950edf2cb2ef1602"}}, -{"id":"abhispeak","key":"abhispeak","value":{"rev":"5-9889431f68ec10212db3be91796608e2"}}, -{"id":"ace","key":"ace","value":{"rev":"3-e8d267de6c17ebaa82c2869aff983c74"}}, -{"id":"acl","key":"acl","value":{"rev":"13-87c131a1801dc50840a177be73ce1c37"}}, -{"id":"active-client","key":"active-client","value":{"rev":"5-0ca16ae2e48a3ba9de2f6830a8c2d3a0"}}, -{"id":"activenode-monitor","key":"activenode-monitor","value":{"rev":"9-2634fa446379c39475d0ce4183fb92f2"}}, -{"id":"activeobject","key":"activeobject","value":{"rev":"43-6d73e28412612aaee37771e3ab292c3d"}}, -{"id":"actor","key":"actor","value":{"rev":"3-f6b84acd7d2e689b860e3142a18cd460"}}, -{"id":"actors","key":"actors","value":{"rev":"3-6df913bbe5b99968a2e71ae4ef07b2d2"}}, -{"id":"addTimeout","key":"addTimeout","value":{"rev":"15-e5170f0597fe8cf5ed0b54b7e6f2cde1"}}, -{"id":"addressable","key":"addressable","value":{"rev":"27-0c74fde458d92e4b93a29317da15bb3c"}}, -{"id":"aejs","key":"aejs","value":{"rev":"7-4928e2ce6151067cd6c585c0ba3e0bc3"}}, -{"id":"aenoa-supervisor","key":"aenoa-supervisor","value":{"rev":"7-6d399675981e76cfdfb9144bc2f7fb6d"}}, -{"id":"after","key":"after","value":{"rev":"9-baee7683ff54182cf7544cc05b0a4ad7"}}, -{"id":"ahr","key":"ahr","value":{"rev":"27-4ed272c516f3f2f9310e4f0ef28254e9"}}, -{"id":"ahr.browser","key":"ahr.browser","value":{"rev":"3-f7226aab4a1a3ab5f77379f92aae87f9"}}, -{"id":"ahr.browser.jsonp","key":"ahr.browser.jsonp","value":{"rev":"3-abed17143cf5e3c451c3d7da457e6f5b"}}, -{"id":"ahr.browser.request","key":"ahr.browser.request","value":{"rev":"7-fafd7b079d0415f388b64a20509a270b"}}, -{"id":"ahr.node","key":"ahr.node","value":{"rev":"17-f487a4a9896bd3876a11f9dfa1c639a7"}}, -{"id":"ahr.options","key":"ahr.options","value":{"rev":"13-904a4cea763a4455f7b2ae0abba18b8d"}}, -{"id":"ahr.utils","key":"ahr.utils","value":{"rev":"3-5f7b4104ea280d1fd36370c8f3356ead"}}, -{"id":"ahr2","key":"ahr2","value":{"rev":"87-ddf57f3ee158dcd23b2df330e2883a1d"}}, -{"id":"ain","key":"ain","value":{"rev":"7-d840736668fb36e9be3c26a68c5cd411"}}, -{"id":"ain-tcp","key":"ain-tcp","value":{"rev":"11-d18a1780bced8981d1d9dbd262ac4045"}}, -{"id":"ain2","key":"ain2","value":{"rev":"5-0b67879174f5f0a06448c7c737d98b5e"}}, -{"id":"airbrake","key":"airbrake","value":{"rev":"33-4bb9f822162e0c930c31b7f961938dc9"}}, -{"id":"ajaxrunner","key":"ajaxrunner","value":{"rev":"2-17e6a5de4f0339f4e6ce0b7681d0ba0c"}}, -{"id":"ajs","key":"ajs","value":{"rev":"13-063a29dec829fdaf4ca63d622137d1c6"}}, -{"id":"ajs-xgettext","key":"ajs-xgettext","value":{"rev":"3-cd4bbcc1c9d87fa7119d3bbbca99b793"}}, -{"id":"akismet","key":"akismet","value":{"rev":"13-a144e15dd6c2b13177572e80a526edd1"}}, -{"id":"alfred","key":"alfred","value":{"rev":"45-9a69041b18d2587c016b1b1deccdb2ce"}}, -{"id":"alfred-bcrypt","key":"alfred-bcrypt","value":{"rev":"11-7ed10ef318e5515d1ef7c040818ddb22"}}, -{"id":"algorithm","key":"algorithm","value":{"rev":"3-9ec0b38298cc15b0f295152de8763358"}}, -{"id":"algorithm-js","key":"algorithm-js","value":{"rev":"9-dd7496b7ec2e3b23cc7bb182ae3aac6d"}}, -{"id":"alists","key":"alists","value":{"rev":"5-22cc13c86d84081a826ac79a0ae5cda3"}}, -{"id":"altshift","key":"altshift","value":{"rev":"53-1c51d8657f271f390503a6fe988d09db"}}, -{"id":"amazon-ses","key":"amazon-ses","value":{"rev":"5-c175d60de2232a5664666a80832269e5"}}, -{"id":"ambrosia","key":"ambrosia","value":{"rev":"3-8c648ec7393cf842838c20e2c5d9bce4"}}, -{"id":"amd","key":"amd","value":{"rev":"3-d78c4df97a577af598a7def2a38379fa"}}, -{"id":"amionline","key":"amionline","value":{"rev":"3-a62887a632523700402b0f4ebb896812"}}, -{"id":"amo-version-reduce","key":"amo-version-reduce","value":{"rev":"3-05f6956269e5e921ca3486d3d6ea74b0"}}, -{"id":"amqp","key":"amqp","value":{"rev":"17-ee62d2b8248f8eb13f3369422d66df26"}}, -{"id":"amqpsnoop","key":"amqpsnoop","value":{"rev":"3-36a1c45647bcfb2f56cf68dbc24b0426"}}, -{"id":"ams","key":"ams","value":{"rev":"40-1c0cc53ad942d2fd23c89618263befc8"}}, -{"id":"amulet","key":"amulet","value":{"rev":"7-d1ed71811e45652799982e4f2e9ffb36"}}, -{"id":"anachronism","key":"anachronism","value":{"rev":"11-468bdb40f9a5aa146bae3c1c6253d0e1"}}, -{"id":"analytics","key":"analytics","value":{"rev":"3-a143ccdd863b5f7dbee4d2f7732390b3"}}, -{"id":"ann","key":"ann","value":{"rev":"9-41f00594d6216c439f05f7116a697cac"}}, -{"id":"ansi-color","key":"ansi-color","value":{"rev":"6-d6f02b32525c1909d5134afa20f470de"}}, -{"id":"ansi-font","key":"ansi-font","value":{"rev":"3-b039661ad9b6aa7baf34741b449c4420"}}, -{"id":"ant","key":"ant","value":{"rev":"3-35a64e0b7f6eb63a90c32971694b0d93"}}, -{"id":"anvil.js","key":"anvil.js","value":{"rev":"19-290c82075f0a9ad764cdf6dc5c558e0f"}}, -{"id":"aop","key":"aop","value":{"rev":"7-5963506c9e7912aa56fda065c56fd472"}}, -{"id":"ap","key":"ap","value":{"rev":"3-f525b5b490a1ada4452f46307bf92d08"}}, -{"id":"apac","key":"apac","value":{"rev":"12-945d0313a84797b4c3df19da4bec14d4"}}, -{"id":"aparser","key":"aparser","value":{"rev":"5-cb35cfc9184ace6642413dad97e49dca"}}, -{"id":"api-easy","key":"api-easy","value":{"rev":"15-2ab5eefef1377ff217cb020e80343d65"}}, -{"id":"api.js","key":"api.js","value":{"rev":"5-a14b8112fbda17022c80356a010de59a"}}, -{"id":"api_request","key":"api_request","value":{"rev":"3-8531e71f5cf2f3f811684269132d72d4"}}, -{"id":"apimaker","key":"apimaker","value":{"rev":"3-bdbd4a2ebf5b67276d89ea73eaa20025"}}, -{"id":"apn","key":"apn","value":{"rev":"30-0513d27341f587b39db54300c380921f"}}, -{"id":"app","key":"app","value":{"rev":"3-d349ddb47167f60c03d259649569e002"}}, -{"id":"app.js","key":"app.js","value":{"rev":"3-bff3646634daccfd964b4bbe510acb25"}}, -{"id":"append","key":"append","value":{"rev":"7-53e2f4ab2a69dc0c5e92f10a154998b6"}}, -{"id":"applescript","key":"applescript","value":{"rev":"10-ef5ab30ccd660dc71fb89e173f30994a"}}, -{"id":"appzone","key":"appzone","value":{"rev":"21-fb27e24d460677fe9c7eda0d9fb1fead"}}, -{"id":"apricot","key":"apricot","value":{"rev":"14-b55361574a0715f78afc76ddf6125845"}}, -{"id":"arcane","key":"arcane","value":{"rev":"3-f846c96e890ed6150d4271c93cc05a24"}}, -{"id":"archetype","key":"archetype","value":{"rev":"3-441336def3b7aade89c8c1c19a84f56d"}}, -{"id":"ardrone","key":"ardrone","value":{"rev":"8-540e95b796da734366a89bb06dc430c5"}}, -{"id":"ardrone-web","key":"ardrone-web","value":{"rev":"3-8a53cc85a95be20cd44921347e82bbe4"}}, -{"id":"arduino","key":"arduino","value":{"rev":"3-22f6359c47412d086d50dc7f1a994139"}}, -{"id":"argon","key":"argon","value":{"rev":"3-ba12426ce67fac01273310cb3909b855"}}, -{"id":"argparse","key":"argparse","value":{"rev":"8-5e841e38cca6cfc3fe1d1f507a7f47ee"}}, -{"id":"argparser","key":"argparser","value":{"rev":"19-b8793bfc005dd84e1213ee53ae56206d"}}, -{"id":"argsparser","key":"argsparser","value":{"rev":"26-d31eca2f41546172763af629fc50631f"}}, -{"id":"argtype","key":"argtype","value":{"rev":"10-96a7d23e571d56cf598472115bcac571"}}, -{"id":"arguments","key":"arguments","value":{"rev":"7-767de2797f41702690bef5928ec7c6e9"}}, -{"id":"armory","key":"armory","value":{"rev":"41-ea0f7bd0868c11fc9986fa708e11e071"}}, -{"id":"armrest","key":"armrest","value":{"rev":"3-bbe40b6320b6328211be33425bed20c8"}}, -{"id":"arnold","key":"arnold","value":{"rev":"3-4896fc8d02b8623f47a024f0dbfa44bf"}}, -{"id":"arouter","key":"arouter","value":{"rev":"7-55cab1f7128df54f27be94039a8d8dc5"}}, -{"id":"array-promise","key":"array-promise","value":{"rev":"3-e2184561ee65de64c2dfeb57955c758f"}}, -{"id":"arrayemitter","key":"arrayemitter","value":{"rev":"3-d64c917ac1095bfcbf173dac88d3d148"}}, -{"id":"asEvented","key":"asEvented","value":{"rev":"3-2ad3693b49d4d9dc9a11c669033a356e"}}, -{"id":"asciimo","key":"asciimo","value":{"rev":"12-50130f5ac2ef4d95df190be2c8ede893"}}, -{"id":"asereje","key":"asereje","value":{"rev":"15-84853499f89a87109ddf47ba692323ba"}}, -{"id":"ash","key":"ash","value":{"rev":"6-3697a3aee708bece8a08c7e0d1010476"}}, -{"id":"ask","key":"ask","value":{"rev":"3-321bbc3837d749b5d97bff251693a825"}}, -{"id":"asn1","key":"asn1","value":{"rev":"13-e681a814a4a1439a22b19e141b45006f"}}, -{"id":"aspsms","key":"aspsms","value":{"rev":"9-7b82d722bdac29a4da8c88b642ad64f2"}}, -{"id":"assert","key":"assert","value":{"rev":"3-85480762f5cb0be2cb85f80918257189"}}, -{"id":"assertions","key":"assertions","value":{"rev":"9-d797d4c09aa994556c7d5fdb4e86fe1b"}}, -{"id":"assertn","key":"assertn","value":{"rev":"6-080a4fb5d2700a6850d56b58c6f6ee9e"}}, -{"id":"assertvanish","key":"assertvanish","value":{"rev":"13-3b0b555ff77c1bfc2fe2642d50879648"}}, -{"id":"asset","key":"asset","value":{"rev":"33-cb70b68e0e05e9c9a18b3d89f1bb43fc"}}, -{"id":"assetgraph","key":"assetgraph","value":{"rev":"82-7853d644e64741b46fdd29a997ec4852"}}, -{"id":"assetgraph-builder","key":"assetgraph-builder","value":{"rev":"61-1ed98d95f3589050037851edde760a01"}}, -{"id":"assetgraph-sprite","key":"assetgraph-sprite","value":{"rev":"15-351b5fd9e50a3dda8580d014383423e0"}}, -{"id":"assets-expander","key":"assets-expander","value":{"rev":"11-f9e1197b773d0031dd015f1d871b87c6"}}, -{"id":"assets-packager","key":"assets-packager","value":{"rev":"13-51f7d2d57ed35be6aff2cc2aa2fa74db"}}, -{"id":"assoc","key":"assoc","value":{"rev":"9-07098388f501da16bf6afe6c9babefd5"}}, -{"id":"ast-inlining","key":"ast-inlining","value":{"rev":"5-02e7e2c3a06ed81ddc61980f778ac413"}}, -{"id":"ast-transformer","key":"ast-transformer","value":{"rev":"5-b4020bb763b8839afa8d3ac0d54a6f26"}}, -{"id":"astar","key":"astar","value":{"rev":"3-3df8c56c64c3863ef0650c0c74e2801b"}}, -{"id":"aster","key":"aster","value":{"rev":"7-b187c1270d3924f5ee04044e579d2df9"}}, -{"id":"asterisk-manager","key":"asterisk-manager","value":{"rev":"3-7fbf4294dafee04cc17cca4692c09c33"}}, -{"id":"astrolin","key":"astrolin","value":{"rev":"3-30ac515a2388e7dc22b25c15346f6d7e"}}, -{"id":"asyn","key":"asyn","value":{"rev":"3-51996b0197c21e85858559045c1481b7"}}, -{"id":"async","key":"async","value":{"rev":"26-73aea795f46345a7e65d89ec75dff2f1"}}, -{"id":"async-array","key":"async-array","value":{"rev":"17-3ef5faff03333aa5b2a733ef36118066"}}, -{"id":"async-chain","key":"async-chain","value":{"rev":"9-10ec3e50b01567390d55973494e36d43"}}, -{"id":"async-ejs","key":"async-ejs","value":{"rev":"19-6f0e6e0eeb3cdb4c816ea427d8288d7d"}}, -{"id":"async-fs","key":"async-fs","value":{"rev":"3-b96906283d345604f784dfcdbeb21a63"}}, -{"id":"async-it","key":"async-it","value":{"rev":"7-6aed4439df25989cfa040fa4b5dd4ff2"}}, -{"id":"async-json","key":"async-json","value":{"rev":"5-589d5b6665d00c5bffb99bb142cac5d0"}}, -{"id":"async-memoizer","key":"async-memoizer","value":{"rev":"9-01d56f4dff95e61a39dab5ebee49d5dc"}}, -{"id":"async-object","key":"async-object","value":{"rev":"21-1bf28b0f8a7d875b54126437f3539f9b"}}, -{"id":"asyncEJS","key":"asyncEJS","value":{"rev":"3-28b1c94255381f23a4d4f52366255937"}}, -{"id":"async_testing","key":"async_testing","value":{"rev":"14-0275d8b608d8644dfe8d68a81fa07e98"}}, -{"id":"asyncevents","key":"asyncevents","value":{"rev":"3-de104847994365dcab5042db2b46fb84"}}, -{"id":"asyncify","key":"asyncify","value":{"rev":"3-3f6deb82ee1c6cb25e83a48fe6379b75"}}, -{"id":"asyncjs","key":"asyncjs","value":{"rev":"27-15903d7351f80ed37cb069aedbfc26cc"}}, -{"id":"asynct","key":"asynct","value":{"rev":"5-6be002b3e005d2d53b80fff32ccbd2ac"}}, -{"id":"at_scheduler","key":"at_scheduler","value":{"rev":"3-5587061c90218d2e99b6e22d5b488b0b"}}, -{"id":"atbar","key":"atbar","value":{"rev":"19-e9e906d4874afd4d8bf2d8349ed46dff"}}, -{"id":"atob","key":"atob","value":{"rev":"3-bc907d10dd2cfc940de586dc090451da"}}, -{"id":"audiolib","key":"audiolib","value":{"rev":"17-cb2f55ff50061081b440f0605cf0450c"}}, -{"id":"audit_couchdb","key":"audit_couchdb","value":{"rev":"24-6e620895b454b345b2aed13db847c237"}}, -{"id":"auditor","key":"auditor","value":{"rev":"11-c4df509d40650c015943dd90315a12c0"}}, -{"id":"authnet_cim","key":"authnet_cim","value":{"rev":"7-f02bbd206ac2b8c05255bcd8171ac1eb"}}, -{"id":"autocomplete","key":"autocomplete","value":{"rev":"3-f2773bca040d5abcd0536dbebe5847bf"}}, -{"id":"autodafe","key":"autodafe","value":{"rev":"7-a75262b53a9dd1a25693adecde7206d7"}}, -{"id":"autolint","key":"autolint","value":{"rev":"7-07f885902d72b52678fcc57aa4b9c592"}}, -{"id":"autoload","key":"autoload","value":{"rev":"5-9247704d9a992a175e3ae49f4af757d0"}}, -{"id":"autoloader","key":"autoloader","value":{"rev":"11-293c20c34d0c81fac5c06b699576b1fe"}}, -{"id":"auton","key":"auton","value":{"rev":"25-4fcb7a62b607b7929b62a9b792afef55"}}, -{"id":"autoreleasepool","key":"autoreleasepool","value":{"rev":"5-5d2798bf74bbec583cc6f19127e3c89e"}}, -{"id":"autorequire","key":"autorequire","value":{"rev":"9-564a46b355532fcec24db0afc99daed5"}}, -{"id":"autotest","key":"autotest","value":{"rev":"7-e319995dd0e1fbd935c14c46b1234f77"}}, -{"id":"awesome","key":"awesome","value":{"rev":"15-4458b746e4722214bd26ea15e453288e"}}, -{"id":"aws","key":"aws","value":{"rev":"14-9a8f0989be29034d3fa5c66c594b649b"}}, -{"id":"aws-js","key":"aws-js","value":{"rev":"6-c61d87b8ad948cd065d2ca222808c209"}}, -{"id":"aws-lib","key":"aws-lib","value":{"rev":"36-9733e215c03d185a860574600a8feb14"}}, -{"id":"aws2js","key":"aws2js","value":{"rev":"35-42498f44a5ae7d4f3c84096b435d0e0b"}}, -{"id":"azure","key":"azure","value":{"rev":"5-2c4e05bd842d3dcfa419f4d2b67121e2"}}, -{"id":"b64","key":"b64","value":{"rev":"3-e5e727a46df4c8aad38acd117d717140"}}, -{"id":"b64url","key":"b64url","value":{"rev":"9-ab3b017f00a53b0078261254704c30ba"}}, -{"id":"ba","key":"ba","value":{"rev":"11-3cec7ec9a566fe95fbeb34271538d60a"}}, -{"id":"babelweb","key":"babelweb","value":{"rev":"11-8e6a2fe00822cec15573cdda48b6d0a0"}}, -{"id":"backbone","key":"backbone","value":{"rev":"37-79b95355f8af59bf9131e14d52b68edc"}}, -{"id":"backbone-browserify","key":"backbone-browserify","value":{"rev":"3-f25dac0b05a7f7aa5dbc0f4a1ad97969"}}, -{"id":"backbone-celtra","key":"backbone-celtra","value":{"rev":"3-775a5ebb25c1cd84723add52774ece84"}}, -{"id":"backbone-couch","key":"backbone-couch","value":{"rev":"8-548327b3cd7ee7a4144c9070377be5f6"}}, -{"id":"backbone-cradle","key":"backbone-cradle","value":{"rev":"3-b9bc220ec48b05eed1d4d77a746b10db"}}, -{"id":"backbone-dirty","key":"backbone-dirty","value":{"rev":"21-fa0f688cc95a85c0fc440733f09243b5"}}, -{"id":"backbone-dnode","key":"backbone-dnode","value":{"rev":"65-3212d3aa3284efb3bc0732bac71b5a2e"}}, -{"id":"backbone-proxy","key":"backbone-proxy","value":{"rev":"3-3602cb984bdd266516a3145663f9a5c6"}}, -{"id":"backbone-redis","key":"backbone-redis","value":{"rev":"9-2e3f6a9e095b00ccec9aa19b3fbc65eb"}}, -{"id":"backbone-rel","key":"backbone-rel","value":{"rev":"5-f9773dc85f1c502e61c163a22d2f74aa"}}, -{"id":"backbone-simpledb","key":"backbone-simpledb","value":{"rev":"5-a815128e1e3593696f666f8b3da36d78"}}, -{"id":"backbone-stash","key":"backbone-stash","value":{"rev":"19-8d3cc5f9ed28f9a56856154e2b4e7f78"}}, -{"id":"backplane","key":"backplane","value":{"rev":"7-f69188dac21e007b09efe1b5b3575087"}}, -{"id":"backport-0.4","key":"backport-0.4","value":{"rev":"11-25e15f01f1ef9e626433a82284bc00d6"}}, -{"id":"backuptweets","key":"backuptweets","value":{"rev":"3-68712682aada41082d3ae36c03c8f899"}}, -{"id":"bake","key":"bake","value":{"rev":"113-ce13508ba2b4f15aa4df06d796aa4573"}}, -{"id":"bal-util","key":"bal-util","value":{"rev":"31-b818725a5af131c89ec66b9fdebf2122"}}, -{"id":"balancer","key":"balancer","value":{"rev":"7-63dcb4327081a8ec4d6c51a21253cb4b"}}, -{"id":"bancroft","key":"bancroft","value":{"rev":"11-8fa3370a4615a0ed4ba411b05c0285f4"}}, -{"id":"bandcamp","key":"bandcamp","value":{"rev":"41-f2fee472d63257fdba9e5fa8ad570ee8"}}, -{"id":"banner","key":"banner","value":{"rev":"19-89a447e2136b2fabddbad84abcd63a27"}}, -{"id":"banzai-docstore-couchdb","key":"banzai-docstore-couchdb","value":{"rev":"5-950c115737d634e2f48ee1c772788321"}}, -{"id":"banzai-redis","key":"banzai-redis","value":{"rev":"3-446f29e0819fd79c810fdfa8ce05bdcf"}}, -{"id":"banzai-statestore-couchdb","key":"banzai-statestore-couchdb","value":{"rev":"5-c965442821741ce6f20e266fe43aea4a"}}, -{"id":"banzai-statestore-mem","key":"banzai-statestore-mem","value":{"rev":"3-a0891a1a2344922d91781c332ed26528"}}, -{"id":"bar","key":"bar","value":{"rev":"7-fbb44a76cb023e6a8941f15576cf190b"}}, -{"id":"barc","key":"barc","value":{"rev":"7-dfe352b410782543d6b1aea292f123eb"}}, -{"id":"barista","key":"barista","value":{"rev":"9-d3f3c776453ba69a81947f34d7cc3cbf"}}, -{"id":"bark","key":"bark","value":{"rev":"20-fc1a94f80cfa199c16aa075e940e06dc"}}, -{"id":"barricane-db","key":"barricane-db","value":{"rev":"3-450947b9a05047fe195f76a69a3144e8"}}, -{"id":"base-converter","key":"base-converter","value":{"rev":"7-1b49b01df111176b89343ad56ac68d5c"}}, -{"id":"base32","key":"base32","value":{"rev":"11-d686c54c9de557681356e74b83d916e8"}}, -{"id":"base64","key":"base64","value":{"rev":"24-bd713c3d7e96fad180263ed7563c595e"}}, -{"id":"bash","key":"bash","value":{"rev":"3-86a1c61babfa47da0ebc14c2f4e59a6a"}}, -{"id":"basic-auth","key":"basic-auth","value":{"rev":"3-472a87af27264ae81bd4394d70792e55"}}, -{"id":"basicFFmpeg","key":"basicFFmpeg","value":{"rev":"15-3e87a41c543bde1e6f7c49d021fda62f"}}, -{"id":"basicauth","key":"basicauth","value":{"rev":"3-15d95a05b6f5e7b6d7261f87c4eb73de"}}, -{"id":"basil-cookie","key":"basil-cookie","value":{"rev":"11-fff96b263f31b9d017e3cf59bf6fb23f"}}, -{"id":"batik","key":"batik","value":{"rev":"7-a19ce28cbbf54649fa225ed5474eff02"}}, -{"id":"batman","key":"batman","value":{"rev":"15-6af5469bf143790cbb4af196824c9e95"}}, -{"id":"batteries","key":"batteries","value":{"rev":"13-656c68fe887f4af3ef1e720e64275f4e"}}, -{"id":"bbcode","key":"bbcode","value":{"rev":"5-e79a8b62125f8a3a1751bf7bd8875f33"}}, -{"id":"bcrypt","key":"bcrypt","value":{"rev":"31-db8496d1239362a97a26f1e5eeb8a733"}}, -{"id":"beaconpush","key":"beaconpush","value":{"rev":"3-956fcd87a6d3f9d5b9775d47e36aa3e5"}}, -{"id":"bean","key":"bean","value":{"rev":"56-151c1558e15016205e65bd515eab9ee0"}}, -{"id":"bean.database.mongo","key":"bean.database.mongo","value":{"rev":"3-ede73166710137cbf570385b7e8f17fe"}}, -{"id":"beandocs","key":"beandocs","value":{"rev":"3-9f7492984c95b69ca1ad30d40223f117"}}, -{"id":"beanpole","key":"beanpole","value":{"rev":"53-565a78a2304405cdc9f4a6b6101160fa"}}, -{"id":"beanprep","key":"beanprep","value":{"rev":"3-bd387f0072514b8e44131671f9aad1b0"}}, -{"id":"beans","key":"beans","value":{"rev":"54-7f6d40a2a5bf228fe3547cce43edaa63"}}, -{"id":"beanstalk_client","key":"beanstalk_client","value":{"rev":"6-13c8c80aa6469b5dcf20d65909289383"}}, -{"id":"beanstalk_worker","key":"beanstalk_worker","value":{"rev":"6-45500991db97ed5a18ea96f3621bf99f"}}, -{"id":"beantest","key":"beantest","value":{"rev":"7-52d8160a0c0420c7d659b2ee10f26644"}}, -{"id":"beatit","key":"beatit","value":{"rev":"7-c0ba5f95b0601dcb628e4820555cc252"}}, -{"id":"beatport","key":"beatport","value":{"rev":"5-3b186b633ceea7f047e1df91e7b683a5"}}, -{"id":"beautifyjs","key":"beautifyjs","value":{"rev":"3-89ce050152aca0727c099060229ddc73"}}, -{"id":"beaver","key":"beaver","value":{"rev":"17-3b56116e8e40205e8efcedefee0319e3"}}, -{"id":"beeline","key":"beeline","value":{"rev":"11-92a4bd9524cc7aec3106efcacff6faed"}}, -{"id":"beet","key":"beet","value":{"rev":"95-3c9d9de63c363319b2201ac83bc0ee7d"}}, -{"id":"begin","key":"begin","value":{"rev":"3-b32a5eb1b9475353b37f90813ed89dce"}}, -{"id":"begin.js","key":"begin.js","value":{"rev":"7-9156869392a448595bf3e5723fcb7b57"}}, -{"id":"bejesus-api","key":"bejesus-api","value":{"rev":"11-6b42f8ffc370c494d01481b64536e91e"}}, -{"id":"bejesus-cli","key":"bejesus-cli","value":{"rev":"31-5fbbfe5ec1f6a0a7a3fafdf69230434a"}}, -{"id":"bem","key":"bem","value":{"rev":"22-c0e0f8d9e92b355246fd15058199b73c"}}, -{"id":"ben","key":"ben","value":{"rev":"3-debe52552a86f1e71895dd5d32add585"}}, -{"id":"bench","key":"bench","value":{"rev":"14-20987e1becf3acd1bd1833b04712c87c"}}, -{"id":"bencher","key":"bencher","value":{"rev":"3-08866a8fdcf180582b43690bbbf21087"}}, -{"id":"benchmark","key":"benchmark","value":{"rev":"219-0669bc24f3f2918d93369bb0d801abf3"}}, -{"id":"bencode","key":"bencode","value":{"rev":"8-7b9eff4c1658fb3a054ebc6f50e6edcd"}}, -{"id":"beseda","key":"beseda","value":{"rev":"49-5cc8c4e9bb3e836de7db58c3adf9a5bb"}}, -{"id":"bf","key":"bf","value":{"rev":"14-d81312e1bf4f7202b801b4343199aa55"}}, -{"id":"biggie-router","key":"biggie-router","value":{"rev":"42-56a546a78d5abd4402183b3d300d563e"}}, -{"id":"bigint","key":"bigint","value":{"rev":"58-02f368567849596219d6a0e87d9bc6b9"}}, -{"id":"bignumber","key":"bignumber","value":{"rev":"3-6e372428992a767e0a991ec3f39b8343"}}, -{"id":"binary","key":"binary","value":{"rev":"47-947aa2f5238a68e34b164ef7e50ece28"}}, -{"id":"binarySearch","key":"binarySearch","value":{"rev":"15-93a3d2f9c2690457023b5ae5f3d00446"}}, -{"id":"bind","key":"bind","value":{"rev":"9-b74d0af83e90a2655e564ab64bf1d27d"}}, -{"id":"binpack","key":"binpack","value":{"rev":"7-3dc67a64e0ef01f3aa59441c5150e04f"}}, -{"id":"bintrees","key":"bintrees","value":{"rev":"12-507fcd92f447f81842cba08cacb425cf"}}, -{"id":"bisection","key":"bisection","value":{"rev":"5-f785ea3bbd8fcc7cd9381d20417b87bb"}}, -{"id":"bison","key":"bison","value":{"rev":"12-e663b2ef96650b3b5a0cc36524e1b94a"}}, -{"id":"bitcoder","key":"bitcoder","value":{"rev":"8-19c957d6b845f4d7ad531951c971e03d"}}, -{"id":"bitcoin","key":"bitcoin","value":{"rev":"13-af88a28c02ab146622743c4c1c32e87b"}}, -{"id":"bitcoin-impl","key":"bitcoin-impl","value":{"rev":"8-99068f1d259e3c75209a6bd08e3e06a2"}}, -{"id":"bitcoin-p2p","key":"bitcoin-p2p","value":{"rev":"25-6df0283eb6e419bc3a1571f17721b100"}}, -{"id":"bitcoinjs-mongoose","key":"bitcoinjs-mongoose","value":{"rev":"3-57e239b31e218693f8cf3cf1cf098437"}}, -{"id":"bitly","key":"bitly","value":{"rev":"8-d6bfac8338e223fe62538954d2e9246a"}}, -{"id":"bitly.node","key":"bitly.node","value":{"rev":"3-15329b7a77633e0dae2c720e592420fb"}}, -{"id":"biwascheme","key":"biwascheme","value":{"rev":"3-37a85eed1bd2d4ee85ef1e100e7ebe8f"}}, -{"id":"black","key":"black","value":{"rev":"3-e07ae2273357da5894f4b7cdf1b20560"}}, -{"id":"black_coffee","key":"black_coffee","value":{"rev":"3-c5c764cf550ad3c831a085509f64cdfb"}}, -{"id":"bleach","key":"bleach","value":{"rev":"5-ef3ab7e761a6903eb70da1550a07e53d"}}, -{"id":"blend","key":"blend","value":{"rev":"16-c5dd075b3ede45f91056b4b768b2bfe8"}}, -{"id":"bless","key":"bless","value":{"rev":"29-1b9bc6f17acd144f51a297e4bdccfe0e"}}, -{"id":"blitz","key":"blitz","value":{"rev":"5-8bf6786f6fd7dbc0570ba21f803f35e6"}}, -{"id":"blo","key":"blo","value":{"rev":"5-9e752ea37438ea026e88a7aa7e7a91ba"}}, -{"id":"blog","key":"blog","value":{"rev":"13-80fc7b11d73e23ca7e518d271d1836ee"}}, -{"id":"blogmate","key":"blogmate","value":{"rev":"11-e503081be9290647c841aa8c04eb6e70"}}, -{"id":"bloodmoney","key":"bloodmoney","value":{"rev":"3-859b0235de3a29bf241323a31f9aa730"}}, -{"id":"bloom","key":"bloom","value":{"rev":"15-c609882b29d61a771d7dbf17f43016ad"}}, -{"id":"blue","key":"blue","value":{"rev":"6-e84221f7286dffbfda6f8abc6306064c"}}, -{"id":"bluemold","key":"bluemold","value":{"rev":"11-f48528b642b5d38d7c02b03622117fa7"}}, -{"id":"bn-lang","key":"bn-lang","value":{"rev":"3-266f186334f69448a940081589e82b04"}}, -{"id":"bn-lang-util","key":"bn-lang-util","value":{"rev":"3-0bc44f1d7d3746120dd835bfb685e229"}}, -{"id":"bn-log","key":"bn-log","value":{"rev":"5-db81a8a978071efd24b45e350e8b8954"}}, -{"id":"bn-template","key":"bn-template","value":{"rev":"3-604e77465ab1dc7e17f3b325089651ec"}}, -{"id":"bn-time","key":"bn-time","value":{"rev":"3-9c33587e783a98e1ccea409cacd5bbfb"}}, -{"id":"bn-unit","key":"bn-unit","value":{"rev":"3-5f35e3fd446241f682231bedcf846c0a"}}, -{"id":"bncode","key":"bncode","value":{"rev":"7-915a1759135a9837954c0ead58bf8e5a"}}, -{"id":"bnf","key":"bnf","value":{"rev":"5-4fe80fcafcc7a263f28b8dc62093bd8d"}}, -{"id":"bob","key":"bob","value":{"rev":"9-9ceeb581263c04793a2231b3726ab22b"}}, -{"id":"bogart","key":"bogart","value":{"rev":"30-70aed6f0827d2bd09963afddcad7a34a"}}, -{"id":"boil","key":"boil","value":{"rev":"3-7ab0fc3b831c591fd15711c27a6f5de0"}}, -{"id":"bolt","key":"bolt","value":{"rev":"3-138dfbdea2ab53ca714ca51494d32610"}}, -{"id":"bones","key":"bones","value":{"rev":"70-c74f0845c167cd755250fc7b4b9b40c2"}}, -{"id":"bones-admin","key":"bones-admin","value":{"rev":"11-2cdfe738d66aacff8569712a279c041d"}}, -{"id":"bones-auth","key":"bones-auth","value":{"rev":"35-2224f95bf3521809ce805ff215d2856c"}}, -{"id":"bones-document","key":"bones-document","value":{"rev":"13-95971fed1f47005c282e0fa60498e31c"}}, -{"id":"bonsai","key":"bonsai","value":{"rev":"3-67eb8935492d4ae9182a7ec74c1f36a6"}}, -{"id":"bonzo","key":"bonzo","value":{"rev":"142-7c5680b0f841c2263f06e96eb5237825"}}, -{"id":"bookbu","key":"bookbu","value":{"rev":"3-d9a104bccc67eae8a5dc6f0f4c3ba5fc"}}, -{"id":"bootstrap","key":"bootstrap","value":{"rev":"17-7a62dbe5e3323beb47165f13265f1a96"}}, -{"id":"borschik","key":"borschik","value":{"rev":"7-2570b5d6555a031394a55ff054797cb9"}}, -{"id":"bots","key":"bots","value":{"rev":"9-df43539c13d2996d9e32dff848615e8a"}}, -{"id":"bounce","key":"bounce","value":{"rev":"8-a3e424b2be1379743e9628c726facaa8"}}, -{"id":"bowser","key":"bowser","value":{"rev":"11-23ecc98edf5fde63fda626bb03da597f"}}, -{"id":"box2d","key":"box2d","value":{"rev":"6-5c920e9829764cbf904b9a59474c1672"}}, -{"id":"box2dnode","key":"box2dnode","value":{"rev":"3-12ffe24dcc1478ea0008c60c4ef7118f"}}, -{"id":"boxcar","key":"boxcar","value":{"rev":"5-a9ba953c547585285559d0e05c16e29e"}}, -{"id":"boxer","key":"boxer","value":{"rev":"8-60c49ff8574d5a47616796ad991463ad"}}, -{"id":"bracket-matcher","key":"bracket-matcher","value":{"rev":"27-a01c946c69665629e212a0f702be1b38"}}, -{"id":"brain","key":"brain","value":{"rev":"24-3aba33914e0f823505c69ef01361681b"}}, -{"id":"brainfuck","key":"brainfuck","value":{"rev":"7-adf33477ffe8640c9fdd6a0f8b349953"}}, -{"id":"brains","key":"brains","value":{"rev":"3-d7e7a95ea742f9b42fefb594c67c726a"}}, -{"id":"braintree","key":"braintree","value":{"rev":"14-eabe1c3e4e7cfd1f521f4bfd337611f7"}}, -{"id":"brazilnut","key":"brazilnut","value":{"rev":"3-4163b5a5598a8905c1283db9d260e5cc"}}, -{"id":"brazln","key":"brazln","value":{"rev":"29-15895bb5b193552826c196efe084caf2"}}, -{"id":"bread","key":"bread","value":{"rev":"9-093c9dd71fffb9a5b1c9eb8ac3e2a9b0"}}, -{"id":"breakfast","key":"breakfast","value":{"rev":"3-231e3046ede5e35e272dfab4a379015d"}}, -{"id":"brequire","key":"brequire","value":{"rev":"18-58b386e08541b222238aa12a13119fd9"}}, -{"id":"bricks","key":"bricks","value":{"rev":"15-f72e6c858c5bceb00cc34a16d52a7b59"}}, -{"id":"bricks-analytics","key":"bricks-analytics","value":{"rev":"3-dc2b6d2157c5039a4c36ceda46761b37"}}, -{"id":"bricks-compress","key":"bricks-compress","value":{"rev":"5-580eeecaa30c210502f42c5e184344a3"}}, -{"id":"bricks-rewrite","key":"bricks-rewrite","value":{"rev":"5-7a141aacaa3fd706b97847c6e8f9830a"}}, -{"id":"brokenbin","key":"brokenbin","value":{"rev":"5-bbc7a1c9628ed9f49b6d23e80c242852"}}, -{"id":"broker","key":"broker","value":{"rev":"9-756a097b948756e4bd7609b6f83a0847"}}, -{"id":"browscap","key":"browscap","value":{"rev":"12-c6fed16796d1ad84913f2617c66f0c7b"}}, -{"id":"browser-require","key":"browser-require","value":{"rev":"27-99f61fb3036ebc643282625649cc674f"}}, -{"id":"browserify","key":"browserify","value":{"rev":"163-c307ee153caf2160e5c32abd58898139"}}, -{"id":"browserjet","key":"browserjet","value":{"rev":"3-a386ab8911c410362eb8fceab5a998fe"}}, -{"id":"brt","key":"brt","value":{"rev":"3-b8452659a92039571ff1f877c8f874c7"}}, -{"id":"brunch","key":"brunch","value":{"rev":"113-64ae44857425c5d860d36f38ab3cf797"}}, -{"id":"brushes.js","key":"brushes.js","value":{"rev":"3-e28bd6597b949d84965a788928738f53"}}, -{"id":"bson","key":"bson","value":{"rev":"50-9d9db515dd9d2a4d873d186f324767a5"}}, -{"id":"btc-ex-api","key":"btc-ex-api","value":{"rev":"3-cabbf284cb01af79ee183d8023106762"}}, -{"id":"btoa","key":"btoa","value":{"rev":"3-b4a124b3650a746b8da9c9f93f386bac"}}, -{"id":"btoa-atob","key":"btoa-atob","value":{"rev":"3-baac60a3f04487333cc0364301220a53"}}, -{"id":"bucket","key":"bucket","value":{"rev":"3-5c2da8f67e29de1c29adbf51ad7d7299"}}, -{"id":"buffalo","key":"buffalo","value":{"rev":"9-6c763d939d775a255c65ba8dcf0d5372"}}, -{"id":"bufferjs","key":"bufferjs","value":{"rev":"13-b6e09e35ec822714d3ec485ac2010272"}}, -{"id":"bufferlib","key":"bufferlib","value":{"rev":"16-d48d96815fc7709d6b7d0a8bfc67f053"}}, -{"id":"bufferlist","key":"bufferlist","value":{"rev":"18-6fcedc10ffbca1afdc866e208d2f906a"}}, -{"id":"buffers","key":"buffers","value":{"rev":"11-3a70ec2da112befdc65b8c02772b8c44"}}, -{"id":"bufferstream","key":"bufferstream","value":{"rev":"82-6f82c5affb3906ebbaa0b116baf73c54"}}, -{"id":"buffertools","key":"buffertools","value":{"rev":"20-68f90e224f81fab81295f9079dc3c0fc"}}, -{"id":"buffoon","key":"buffoon","value":{"rev":"9-1cdc1cbced94691e836d4266eed7c143"}}, -{"id":"builder","key":"builder","value":{"rev":"25-b9679e2aaffec1ac6d59fdd259d9590c"}}, -{"id":"buildr","key":"buildr","value":{"rev":"69-cb3a756903a6322c6f9f4dd1c384a607"}}, -{"id":"bumper","key":"bumper","value":{"rev":"3-1e8d17aa3b29815e4069294cc9ce572c"}}, -{"id":"bundle","key":"bundle","value":{"rev":"39-46fde9cd841bce1fbdd92f6a1235c308"}}, -{"id":"bunker","key":"bunker","value":{"rev":"7-ed993a296fa0b8d3c3a7cd759d6f371e"}}, -{"id":"burari","key":"burari","value":{"rev":"11-08b61073d6ad0ef0c7449a574dc8f54b"}}, -{"id":"burrito","key":"burrito","value":{"rev":"38-3f3b109972720647f5412f3a2478859b"}}, -{"id":"busbuddy","key":"busbuddy","value":{"rev":"5-298ec29f6307351cf7a19bceebe957c7"}}, -{"id":"buster","key":"buster","value":{"rev":"9-870a6e9638806adde2f40105900cd4b3"}}, -{"id":"buster-args","key":"buster-args","value":{"rev":"7-9b189c602e437a505625dbf7fef5dead"}}, -{"id":"buster-assertions","key":"buster-assertions","value":{"rev":"5-fa34a8a5e7cf4dd08c2d02c39de3b563"}}, -{"id":"buster-cli","key":"buster-cli","value":{"rev":"5-b1a85006e41dbf74313253c571e63874"}}, -{"id":"buster-client","key":"buster-client","value":{"rev":"5-340637ec63b54bb01c1313a78db01945"}}, -{"id":"buster-configuration","key":"buster-configuration","value":{"rev":"3-a12e7ff172562b513534fc26be00aaed"}}, -{"id":"buster-core","key":"buster-core","value":{"rev":"5-871df160645e6684111a8fd02ff0eee9"}}, -{"id":"buster-evented-logger","key":"buster-evented-logger","value":{"rev":"5-c46681e6275a76723e3bc834555dbe32"}}, -{"id":"buster-format","key":"buster-format","value":{"rev":"5-e193e90436c7f941739b82adad86bdd8"}}, -{"id":"buster-module-loader","key":"buster-module-loader","value":{"rev":"5-4148b61f8b718e6181aa6054664a7c44"}}, -{"id":"buster-multicast","key":"buster-multicast","value":{"rev":"3-79480b5be761d243b274cb1e77375afc"}}, -{"id":"buster-promise","key":"buster-promise","value":{"rev":"5-b50030957fbd70e65576faa9c541b739"}}, -{"id":"buster-script-loader","key":"buster-script-loader","value":{"rev":"3-85af28b5bc4e647f27514fede19a144e"}}, -{"id":"buster-server","key":"buster-server","value":{"rev":"7-57b8b43047504818322018d2bbfee1f1"}}, -{"id":"buster-static","key":"buster-static","value":{"rev":"3-018c89d1524f7823934087f18dab9047"}}, -{"id":"buster-terminal","key":"buster-terminal","value":{"rev":"5-2c54c30ffa4a2d4b061e4c38e6b9b0e7"}}, -{"id":"buster-test","key":"buster-test","value":{"rev":"5-f7ee9c9f3b379e0ad5aa03d07581ad6f"}}, -{"id":"buster-test-cli","key":"buster-test-cli","value":{"rev":"9-c207974d20e95029cad5fa4c9435d152"}}, -{"id":"buster-user-agent-parser","key":"buster-user-agent-parser","value":{"rev":"5-7883085a203b3047b28ad08361219d1d"}}, -{"id":"buster-util","key":"buster-util","value":{"rev":"3-81977275a9c467ad79bb7e3f2b1caaa8"}}, -{"id":"butler","key":"butler","value":{"rev":"7-c964c4d213da6b0de2492ee57514d0f8"}}, -{"id":"byline","key":"byline","value":{"rev":"9-0b236ed5986c20136c0d581a244d52ac"}}, -{"id":"bz","key":"bz","value":{"rev":"7-d2a463b259c4e09dc9a79ddee9575ca0"}}, -{"id":"c2dm","key":"c2dm","value":{"rev":"11-a1e6a6643506bed3e1443155706aa5fe"}}, -{"id":"cabin","key":"cabin","value":{"rev":"7-df81ef56f0bb085d381c36600496dc57"}}, -{"id":"caboose","key":"caboose","value":{"rev":"49-7226441f91b63fb5c3ac240bd99d142a"}}, -{"id":"caboose-authentication","key":"caboose-authentication","value":{"rev":"3-9c71a9d7315fdea7d5f52fe52ecef118"}}, -{"id":"caboose-model","key":"caboose-model","value":{"rev":"3-967426d5acb8bb70e133f0052075dc1b"}}, -{"id":"cache2file","key":"cache2file","value":{"rev":"17-ac9caec611a38e1752d91f8cc80cfb04"}}, -{"id":"caching","key":"caching","value":{"rev":"11-06041aaaa46b63ed36843685cac63245"}}, -{"id":"calais","key":"calais","value":{"rev":"11-f8ac2064ca45dd5b7db7ea099cd61dfb"}}, -{"id":"calc","key":"calc","value":{"rev":"3-bead9c5b0bee34e44e7c04aa2bf9cd68"}}, -{"id":"calipso","key":"calipso","value":{"rev":"87-b562676045a66a3ec702591c67a9635e"}}, -{"id":"caman","key":"caman","value":{"rev":"15-4b97c73f0ac101c68335de2937483893"}}, -{"id":"camanjs","key":"camanjs","value":{"rev":"3-2856bbdf7a1d454929b4a80b119e3da0"}}, -{"id":"camelot","key":"camelot","value":{"rev":"7-8e257c5213861ecbd229ee737a3a8bb4"}}, -{"id":"campusbooks","key":"campusbooks","value":{"rev":"18-489be33c6ac2d6cbcf93355f2b129389"}}, -{"id":"canvas","key":"canvas","value":{"rev":"78-27dbf5b6e0a25ba5886d485fd897d701"}}, -{"id":"canvasutil","key":"canvasutil","value":{"rev":"7-0b87a370d673886efb7763aaf500b744"}}, -{"id":"capoo","key":"capoo","value":{"rev":"9-136a3ddf489228d5f4b504b1da619447"}}, -{"id":"capsule","key":"capsule","value":{"rev":"19-ad3c9ba0af71a84228e6dd360017f379"}}, -{"id":"capt","key":"capt","value":{"rev":"13-0805d789000fb2e361103a5e62379196"}}, -{"id":"carena","key":"carena","value":{"rev":"10-d38e8c336a0dbb8091514f638b22b96b"}}, -{"id":"carrier","key":"carrier","value":{"rev":"20-b2b4a0560d40eeac617000e9e22a9e9d"}}, -{"id":"cart","key":"cart","value":{"rev":"12-493e79c6fa0b099626e90da79a69f1e5"}}, -{"id":"carto","key":"carto","value":{"rev":"45-8eab07e2fac57396dd62af5805062387"}}, -{"id":"caruso","key":"caruso","value":{"rev":"5-d58e22212b0bcebbab4b42adc68799aa"}}, -{"id":"cas","key":"cas","value":{"rev":"3-82a93160eb9add99bde1599e55d18fd8"}}, -{"id":"cas-auth","key":"cas-auth","value":{"rev":"3-b02f77c198050b99f1df18f637e77c10"}}, -{"id":"cas-client","key":"cas-client","value":{"rev":"3-ca69e32a3053bc680d1dddc57271483b"}}, -{"id":"cashew","key":"cashew","value":{"rev":"7-9e81cde34263adad6949875c4b33ee99"}}, -{"id":"cassandra","key":"cassandra","value":{"rev":"3-8617ef73fdc73d02ecec74d31f98e463"}}, -{"id":"cassandra-client","key":"cassandra-client","value":{"rev":"19-aa1aef5d203be5b0eac678284f1a979f"}}, -{"id":"casset","key":"casset","value":{"rev":"3-2052c7feb5b89c77aaa279c8b50126ce"}}, -{"id":"castaneum","key":"castaneum","value":{"rev":"26-4dc55ba2482cca4230b4bc77ecb5b70d"}}, -{"id":"cat","key":"cat","value":{"rev":"3-75f20119b363b85c1a8433e26b86c943"}}, -{"id":"catchjs","key":"catchjs","value":{"rev":"3-ffda7eff7613de37f629dc7a831ffda1"}}, -{"id":"caterpillar","key":"caterpillar","value":{"rev":"5-bc003e3af33240e67b4c3042f308b7da"}}, -{"id":"causeeffect","key":"causeeffect","value":{"rev":"9-7e4e25bff656170c97cb0cce1b2ab6ca"}}, -{"id":"cayenne","key":"cayenne","value":{"rev":"5-2797f561467b41cc45804e5498917800"}}, -{"id":"ccn4bnode","key":"ccn4bnode","value":{"rev":"17-96f55189e5c98f0fa8200e403a04eb39"}}, -{"id":"ccnq3_config","key":"ccnq3_config","value":{"rev":"21-40345771769a9cadff4af9113b8124c2"}}, -{"id":"ccnq3_logger","key":"ccnq3_logger","value":{"rev":"5-4aa168dc24425938a29cf9ac456158d7"}}, -{"id":"ccnq3_portal","key":"ccnq3_portal","value":{"rev":"17-84e629ec1eaba1722327ccb9dddb05cf"}}, -{"id":"ccnq3_roles","key":"ccnq3_roles","value":{"rev":"43-97de74b08b1af103da8905533a84b749"}}, -{"id":"ccss","key":"ccss","value":{"rev":"11-b9beb506410ea81581ba4c7dfe9b2a7d"}}, -{"id":"cdb","key":"cdb","value":{"rev":"13-d7b6f609f069dc738912b405aac558ab"}}, -{"id":"cdb_changes","key":"cdb_changes","value":{"rev":"13-1dc99b096cb91c276332b651396789e8"}}, -{"id":"celeri","key":"celeri","value":{"rev":"17-b19294619ef6c2056f3bf6641e8945c2"}}, -{"id":"celery","key":"celery","value":{"rev":"5-bdfccd483cf30c4c10c5ec0963de1248"}}, -{"id":"cempl8","key":"cempl8","value":{"rev":"21-bb9547b78a1548fe11dc1d5b816b6da1"}}, -{"id":"cfg","key":"cfg","value":{"rev":"3-85c7651bb8f16b057e60a46946eb95af"}}, -{"id":"cgi","key":"cgi","value":{"rev":"17-7ceac458c7f141d4fbbf05d267a72aa8"}}, -{"id":"chain","key":"chain","value":{"rev":"9-b0f175c5ad0173bcb7e11e58b02a7394"}}, -{"id":"chain-gang","key":"chain-gang","value":{"rev":"22-b0e6841a344b65530ea2a83a038e5aa6"}}, -{"id":"chainer","key":"chainer","value":{"rev":"15-8c6a565035225a1dcca0177e92ccf42d"}}, -{"id":"chainify","key":"chainify","value":{"rev":"3-0926790f18a0016a9943cfb4830e0187"}}, -{"id":"chains","key":"chains","value":{"rev":"5-d9e1ac38056e2638e38d9a7c415929c6"}}, -{"id":"chainsaw","key":"chainsaw","value":{"rev":"24-82e078efbbc59f798d29a0259481012e"}}, -{"id":"changelog","key":"changelog","value":{"rev":"27-317e473de0bf596b273a9dadecea126d"}}, -{"id":"channel-server","key":"channel-server","value":{"rev":"3-3c882f7e61686e8a124b5198c638a18e"}}, -{"id":"channels","key":"channels","value":{"rev":"5-0b532f054886d9094cb98493ee0a7a16"}}, -{"id":"chaos","key":"chaos","value":{"rev":"40-7caa4459d398f5ec30fea91d087f0d71"}}, -{"id":"chard","key":"chard","value":{"rev":"3-f2de35f7a390ea86ac0eb78bf720d0de"}}, -{"id":"charenc","key":"charenc","value":{"rev":"3-092036302311a8f5779b800c98170b5b"}}, -{"id":"chargify","key":"chargify","value":{"rev":"5-e3f29f2816b04c26ca047d345928e2c1"}}, -{"id":"charm","key":"charm","value":{"rev":"13-3e7e7b5babc1efc472e3ce62eec2c0c7"}}, -{"id":"chat-server","key":"chat-server","value":{"rev":"7-c73b785372474e083fb8f3e9690761da"}}, -{"id":"chatroom","key":"chatroom","value":{"rev":"3-f4fa8330b7eb277d11407f968bffb6a2"}}, -{"id":"chatspire","key":"chatspire","value":{"rev":"3-081e167e3f7c1982ab1b7fc3679cb87c"}}, -{"id":"checkip","key":"checkip","value":{"rev":"3-b31d58a160a4a3fe2f14cfbf2217949e"}}, -{"id":"cheddar-getter","key":"cheddar-getter","value":{"rev":"3-d675ec138ea704df127fabab6a52a8dc"}}, -{"id":"chess","key":"chess","value":{"rev":"3-8b15268c8b0fb500dcbc83b259e7fb88"}}, -{"id":"chessathome-worker","key":"chessathome-worker","value":{"rev":"7-cdfd411554c35ba7a52e54f7744bed35"}}, -{"id":"chirkut.js","key":"chirkut.js","value":{"rev":"3-c0e515eee0f719c5261a43e692a3585c"}}, -{"id":"chiron","key":"chiron","value":{"rev":"6-ccb575e432c1c1981fc34b4e27329c85"}}, -{"id":"chopper","key":"chopper","value":{"rev":"5-168681c58c2a50796676dea73dc5398b"}}, -{"id":"choreographer","key":"choreographer","value":{"rev":"14-b0159823becdf0b4552967293968b2a8"}}, -{"id":"chromic","key":"chromic","value":{"rev":"3-c4ca0bb1f951db96c727241092afa9cd"}}, -{"id":"chrono","key":"chrono","value":{"rev":"9-6399d715df1a2f4696f89f2ab5d4d83a"}}, -{"id":"chuck","key":"chuck","value":{"rev":"3-71f2ee071d4b6fb2af3b8b828c51d8ab"}}, -{"id":"chunkedstream","key":"chunkedstream","value":{"rev":"3-b145ed7d1abd94ac44343413e4f823e7"}}, -{"id":"cider","key":"cider","value":{"rev":"10-dc20cd3eac9470e96911dcf75ac6492b"}}, -{"id":"cinch","key":"cinch","value":{"rev":"5-086af7f72caefb57284e4101cbe3c905"}}, -{"id":"cipherpipe","key":"cipherpipe","value":{"rev":"5-0b5590f808415a7297de6d45947d911f"}}, -{"id":"cjson","key":"cjson","value":{"rev":"25-02e3d327b48e77dc0f9e070ce9454ac2"}}, -{"id":"ck","key":"ck","value":{"rev":"3-f482385f5392a49353d8ba5eb9c7afef"}}, -{"id":"ckup","key":"ckup","value":{"rev":"26-90a76ec0cdf951dc2ea6058098407ee2"}}, -{"id":"class","key":"class","value":{"rev":"6-e2805f7d87586a66fb5fd170cf74b3b0"}}, -{"id":"class-42","key":"class-42","value":{"rev":"3-14c988567a2c78a857f15c9661bd6430"}}, -{"id":"class-js","key":"class-js","value":{"rev":"5-792fd04288a651dad87bc47eb91c2042"}}, -{"id":"classify","key":"classify","value":{"rev":"23-35eb336c350446f5ed49069df151dbb7"}}, -{"id":"clean-css","key":"clean-css","value":{"rev":"13-e30ea1007f6c5bb49e07276228b8a960"}}, -{"id":"clearInterval","key":"clearInterval","value":{"rev":"3-a49fa235d3dc14d28a3d15f8db291986"}}, -{"id":"clearTimeout","key":"clearTimeout","value":{"rev":"3-e838bd25adc825112922913c1a35b934"}}, -{"id":"cli","key":"cli","value":{"rev":"65-9e79c37c12d21b9b9114093de0773c54"}}, -{"id":"cli-color","key":"cli-color","value":{"rev":"9-0a8e775e713b1351f6a6648748dd16ec"}}, -{"id":"cli-table","key":"cli-table","value":{"rev":"3-9e447a8bb392fb7d9c534445a650e328"}}, -{"id":"clickatell","key":"clickatell","value":{"rev":"3-31f1a66d08a789976919df0c9280de88"}}, -{"id":"clicktime","key":"clicktime","value":{"rev":"9-697a99f5f704bfebbb454df47c9c472a"}}, -{"id":"clientexpress","key":"clientexpress","value":{"rev":"3-9b07041cd7b0c3967c4625ac74c9b50c"}}, -{"id":"cliff","key":"cliff","value":{"rev":"15-ef9ef25dbad08c0e346388522d94c5c3"}}, -{"id":"clip","key":"clip","value":{"rev":"21-c3936e566feebfe0beddb0bbb686c00d"}}, -{"id":"clock","key":"clock","value":{"rev":"5-19bc51841d41408b4446c0862487dc5e"}}, -{"id":"clog","key":"clog","value":{"rev":"5-1610fe2c0f435d2694a1707ee15cd11e"}}, -{"id":"clone","key":"clone","value":{"rev":"11-099d07f38381b54902c4cf5b93671ed4"}}, -{"id":"closure","key":"closure","value":{"rev":"7-9c2ac6b6ec9f14d12d10bfbfad58ec14"}}, -{"id":"closure-compiler","key":"closure-compiler","value":{"rev":"8-b3d2f9e3287dd33094a35d797d6beaf2"}}, -{"id":"cloud","key":"cloud","value":{"rev":"27-407c7aa77d3d4a6cc903d18b383de8b8"}}, -{"id":"cloud9","key":"cloud9","value":{"rev":"71-4af631e3fa2eb28058cb0d18ef3a6a3e"}}, -{"id":"cloudcontrol","key":"cloudcontrol","value":{"rev":"15-2df57385aa9bd92f7ed81e6892e23696"}}, -{"id":"cloudfiles","key":"cloudfiles","value":{"rev":"30-01f84ebda1d8f151b3e467590329960c"}}, -{"id":"cloudfoundry","key":"cloudfoundry","value":{"rev":"3-66fafd3d6b1353b1699d35e634686ab6"}}, -{"id":"cloudmailin","key":"cloudmailin","value":{"rev":"3-a4e3e4d457f5a18261bb8df145cfb418"}}, -{"id":"cloudnode-cli","key":"cloudnode-cli","value":{"rev":"17-3a80f7855ce618f7aee68bd693ed485b"}}, -{"id":"cloudservers","key":"cloudservers","value":{"rev":"42-6bc34f7e34f84a24078b43a609e96c59"}}, -{"id":"clucene","key":"clucene","value":{"rev":"37-3d613f12a857b8fe22fbf420bcca0dc3"}}, -{"id":"cluster","key":"cluster","value":{"rev":"83-63fb7a468d95502f94ea45208ba0a890"}}, -{"id":"cluster-isolatable","key":"cluster-isolatable","value":{"rev":"5-6af883cea9ab1c90bb126d8b3be2d156"}}, -{"id":"cluster-live","key":"cluster-live","value":{"rev":"7-549d19e9727f460c7de48f93b92e9bb3"}}, -{"id":"cluster-log","key":"cluster-log","value":{"rev":"7-9c47854df8ec911e679743185668a5f7"}}, -{"id":"cluster-loggly","key":"cluster-loggly","value":{"rev":"3-e1f7e331282d7b8317ce55e0fce7f934"}}, -{"id":"cluster-mail","key":"cluster-mail","value":{"rev":"9-dc18c5c1b2b265f3d531b92467b6cc35"}}, -{"id":"cluster-responsetimes","key":"cluster-responsetimes","value":{"rev":"3-c9e16daee15eb84910493264e973275c"}}, -{"id":"cluster-socket.io","key":"cluster-socket.io","value":{"rev":"7-29032f0b42575e9fe183a0af92191132"}}, -{"id":"cluster.exception","key":"cluster.exception","value":{"rev":"3-10856526e2f61e3000d62b12abd750e3"}}, -{"id":"clutch","key":"clutch","value":{"rev":"8-50283f7263c430cdd1d293c033571012"}}, -{"id":"cm1-route","key":"cm1-route","value":{"rev":"13-40e72b5a4277b500c98c966bcd2a8a86"}}, -{"id":"cmd","key":"cmd","value":{"rev":"9-9168fcd96fb1ba9449050162023f3570"}}, -{"id":"cmdopt","key":"cmdopt","value":{"rev":"3-85677533e299bf195e78942929cf9839"}}, -{"id":"cmp","key":"cmp","value":{"rev":"5-b10f873b78eb64e406fe55bd001ae0fa"}}, -{"id":"cmudict","key":"cmudict","value":{"rev":"3-cd028380bba917d5ed2be7a8d3b3b0b7"}}, -{"id":"cnlogger","key":"cnlogger","value":{"rev":"9-dbe7e0e50d25ca5ae939fe999c3c562b"}}, -{"id":"coa","key":"coa","value":{"rev":"11-ff4e634fbebd3f80b9461ebe58b3f64e"}}, -{"id":"cobra","key":"cobra","value":{"rev":"5-a3e0963830d350f4a7e91b438caf9117"}}, -{"id":"cockpit","key":"cockpit","value":{"rev":"3-1757b37245ee990999e4456b9a6b963e"}}, -{"id":"coco","key":"coco","value":{"rev":"104-eabc4d7096295c2156144a7581d89b35"}}, -{"id":"cocos2d","key":"cocos2d","value":{"rev":"19-88a5c75ceb6e7667665c056d174f5f1a"}}, -{"id":"codem-transcode","key":"codem-transcode","value":{"rev":"9-1faa2657d53271ccc44cce27de723e99"}}, -{"id":"codepad","key":"codepad","value":{"rev":"5-094ddce74dc057dc0a4d423d6d2fbc3a"}}, -{"id":"codetube","key":"codetube","value":{"rev":"3-819794145f199330e724864db70da53b"}}, -{"id":"coerce","key":"coerce","value":{"rev":"3-e7d392d497c0b8491b89fcbbd1a5a89f"}}, -{"id":"coffee-conf","key":"coffee-conf","value":{"rev":"3-883bc4767d70810ece2fdf1ccae883de"}}, -{"id":"coffee-css","key":"coffee-css","value":{"rev":"11-66ca197173751389b24945f020f198f9"}}, -{"id":"coffee-echonest","key":"coffee-echonest","value":{"rev":"3-3cd0e2b77103e334eccf6cf4168f39b2"}}, -{"id":"coffee-machine","key":"coffee-machine","value":{"rev":"9-02deb4d27fd5d56002ead122e9bb213e"}}, -{"id":"coffee-new","key":"coffee-new","value":{"rev":"67-0664b0f289030c38d113070fd26f4f71"}}, -{"id":"coffee-resque","key":"coffee-resque","value":{"rev":"22-5b022809317d3a873be900f1a697c5eb"}}, -{"id":"coffee-resque-retry","key":"coffee-resque-retry","value":{"rev":"29-1fb64819a4a21ebb4d774d9d4108e419"}}, -{"id":"coffee-revup","key":"coffee-revup","value":{"rev":"3-23aafa258bcdcf2bb68d143d61383551"}}, -{"id":"coffee-script","key":"coffee-script","value":{"rev":"60-a6c3739655f43953bd86283776586b95"}}, -{"id":"coffee-son","key":"coffee-son","value":{"rev":"3-84a81e7e24c8cb23293940fc1b87adfe"}}, -{"id":"coffee-toaster","key":"coffee-toaster","value":{"rev":"17-d43d7276c08b526c229c78b7d5acd6cc"}}, -{"id":"coffee-watcher","key":"coffee-watcher","value":{"rev":"3-3d861a748f0928c789cbdb8ff62b6091"}}, -{"id":"coffee-world","key":"coffee-world","value":{"rev":"15-46dc320f94fa64c39e183224ec59f47a"}}, -{"id":"coffee4clients","key":"coffee4clients","value":{"rev":"15-58fba7dd10bced0411cfe546b9336145"}}, -{"id":"coffeeapp","key":"coffeeapp","value":{"rev":"48-bece0a26b78afc18cd37d577f90369d9"}}, -{"id":"coffeebot","key":"coffeebot","value":{"rev":"3-a9007053f25a4c13b324f0ac7066803e"}}, -{"id":"coffeedoc","key":"coffeedoc","value":{"rev":"21-a955faafafd10375baf3101ad2c142d0"}}, -{"id":"coffeegrinder","key":"coffeegrinder","value":{"rev":"9-6e725aad7fd39cd38f41c743ef8a7563"}}, -{"id":"coffeekup","key":"coffeekup","value":{"rev":"35-9b1eecdb7b13d3e75cdc7b1045cf910a"}}, -{"id":"coffeemaker","key":"coffeemaker","value":{"rev":"9-4c5e665aa2a5b4efa2b7d077d0a4f9c1"}}, -{"id":"coffeemate","key":"coffeemate","value":{"rev":"71-03d0221fb495f2dc6732009884027b47"}}, -{"id":"coffeepack","key":"coffeepack","value":{"rev":"3-bbf0e27cb4865392164e7ab33f131d58"}}, -{"id":"coffeeq","key":"coffeeq","value":{"rev":"9-4e38e9742a0b9d7b308565729fbfd123"}}, -{"id":"coffeescript-growl","key":"coffeescript-growl","value":{"rev":"7-2bc1f93c4aad5fa8fb4bcfd1b3ecc279"}}, -{"id":"coffeescript-notify","key":"coffeescript-notify","value":{"rev":"3-8aeb31f8e892d3fefa421ff28a1b3de9"}}, -{"id":"collectd","key":"collectd","value":{"rev":"5-3d4c84b0363aa9c078157d82695557a1"}}, -{"id":"collection","key":"collection","value":{"rev":"3-a47e1fe91b9eebb3e75954e350ec2ca3"}}, -{"id":"collection_functions","key":"collection_functions","value":{"rev":"3-7366c721008062373ec924a409415189"}}, -{"id":"collections","key":"collections","value":{"rev":"3-0237a40d08a0da36c2dd01ce73a89bb2"}}, -{"id":"color","key":"color","value":{"rev":"15-4898b2cd9744feb3249ba10828c186f8"}}, -{"id":"color-convert","key":"color-convert","value":{"rev":"7-2ccb47c7f07a47286d9a2f39383d28f0"}}, -{"id":"color-string","key":"color-string","value":{"rev":"5-9a6336f420e001e301a15b88b0103696"}}, -{"id":"colorize","key":"colorize","value":{"rev":"3-ff380385edacc0c46e4c7b5c05302576"}}, -{"id":"colors","key":"colors","value":{"rev":"8-7c7fb9c5af038c978f0868c7706fe145"}}, -{"id":"colour-extractor","key":"colour-extractor","value":{"rev":"3-62e96a84c6adf23f438b5aac76c7b257"}}, -{"id":"coloured","key":"coloured","value":{"rev":"8-c5295f2d5a8fc08e93d180a4e64f8d38"}}, -{"id":"coloured-log","key":"coloured-log","value":{"rev":"14-8627a3625959443acad71e2c23dfc582"}}, -{"id":"comb","key":"comb","value":{"rev":"5-7f201b621ae9a890c7f5a31867eba3e9"}}, -{"id":"combine","key":"combine","value":{"rev":"14-bed33cd4389a2e4bb826a0516c6ae307"}}, -{"id":"combined-stream","key":"combined-stream","value":{"rev":"13-678f560200ac2835b9026e9e2b955cb0"}}, -{"id":"combiner","key":"combiner","value":{"rev":"3-5e7f133c8c14958eaf9e92bd79ae8ee1"}}, -{"id":"combohandler","key":"combohandler","value":{"rev":"7-d7e1a402f0066caa6756a8866de81dd9"}}, -{"id":"combyne","key":"combyne","value":{"rev":"23-05ebee9666a769e32600bc5548d10ce9"}}, -{"id":"comfy","key":"comfy","value":{"rev":"5-8bfe55bc16611dfe51a184b8f3eb31c1"}}, -{"id":"command-parser","key":"command-parser","value":{"rev":"5-8a5c3ed6dfa0fa55cc71b32cf52332fc"}}, -{"id":"commander","key":"commander","value":{"rev":"11-9dd16c00844d464bf66c101a57075401"}}, -{"id":"commando","key":"commando","value":{"rev":"3-e159f1890f3771dfd6e04f4d984f26f3"}}, -{"id":"common","key":"common","value":{"rev":"16-94eafcf104c0c7d1090e668ddcc12a5f"}}, -{"id":"common-exception","key":"common-exception","value":{"rev":"7-bd46358014299da814691c835548ef21"}}, -{"id":"common-node","key":"common-node","value":{"rev":"5-b2c4bef0e7022d5d453661a9c43497a8"}}, -{"id":"common-pool","key":"common-pool","value":{"rev":"5-c495fa945361ba4fdfb2ee8733d791b4"}}, -{"id":"common-utils","key":"common-utils","value":{"rev":"3-e5a047f118fc304281d2bc5e9ab18e62"}}, -{"id":"commondir","key":"commondir","value":{"rev":"3-ea49874d12eeb9adf28ca28989dfb5a9"}}, -{"id":"commonjs","key":"commonjs","value":{"rev":"6-39fcd0de1ec265890cf063effd0672e3"}}, -{"id":"commonjs-utils","key":"commonjs-utils","value":{"rev":"6-c0266a91dbd0a43effb7d30da5d9f35c"}}, -{"id":"commonkv","key":"commonkv","value":{"rev":"3-90b2fe4c79e263b044303706c4d5485a"}}, -{"id":"commons","key":"commons","value":{"rev":"6-0ecb654aa2bd17cf9519f86d354f8a50"}}, -{"id":"complete","key":"complete","value":{"rev":"7-acde8cba7677747d09c3d53ff165754e"}}, -{"id":"complex-search","key":"complex-search","value":{"rev":"5-c80b2c7f049f333bde89435f3de497ca"}}, -{"id":"compose","key":"compose","value":{"rev":"1-cf8a97d6ead3bef056d85daec5d36c70"}}, -{"id":"composer","key":"composer","value":{"rev":"6-1deb43725051f845efd4a7c8e68aa6d6"}}, -{"id":"compress","key":"compress","value":{"rev":"17-f0aacce1356f807b51e083490fb353bd"}}, -{"id":"compress-buffer","key":"compress-buffer","value":{"rev":"12-2886014c7f2541f4ddff9f0f55f4c171"}}, -{"id":"compress-ds","key":"compress-ds","value":{"rev":"5-9e4c6931edf104443353594ef50aa127"}}, -{"id":"compressor","key":"compressor","value":{"rev":"3-ee8ad155a98e1483d899ebcf82d5fb63"}}, -{"id":"concrete","key":"concrete","value":{"rev":"5-bc70bbffb7c6fe9e8c399db578fb3bae"}}, -{"id":"condo","key":"condo","value":{"rev":"9-5f03d58ee7dc29465defa3758f3b138a"}}, -{"id":"conductor","key":"conductor","value":{"rev":"8-1878afadcda7398063de6286c2d2c5c1"}}, -{"id":"conf","key":"conf","value":{"rev":"11-dcf0f6a93827d1b143cb1d0858f2be4a"}}, -{"id":"config","key":"config","value":{"rev":"37-2b741a1e6951a74b7f1de0d0547418a0"}}, -{"id":"config-loader","key":"config-loader","value":{"rev":"3-708cc96d1206de46fb450eb57ca07b0d"}}, -{"id":"configurator","key":"configurator","value":{"rev":"5-b31ad9731741d19f28241f6af5b41fee"}}, -{"id":"confu","key":"confu","value":{"rev":"7-c46f82c4aa9a17db6530b00669461eaf"}}, -{"id":"confy","key":"confy","value":{"rev":"3-893b33743830a0318dc99b1788aa92ee"}}, -{"id":"connect","key":"connect","value":{"rev":"151-8b5617fc6ece6c125b5f628936159bd6"}}, -{"id":"connect-access-control","key":"connect-access-control","value":{"rev":"3-ccf5fb09533d41eb0b564eb1caecf910"}}, -{"id":"connect-airbrake","key":"connect-airbrake","value":{"rev":"5-19db5e5828977540814d09f9eb7f028f"}}, -{"id":"connect-analytics","key":"connect-analytics","value":{"rev":"3-6f71c8b08ed9f5762c1a4425c196fb2a"}}, -{"id":"connect-app-cache","key":"connect-app-cache","value":{"rev":"27-3e69452dfe51cc907f8b188aede1bda8"}}, -{"id":"connect-assetmanager","key":"connect-assetmanager","value":{"rev":"46-f2a8834d2749e0c069cee06244e7501c"}}, -{"id":"connect-assetmanager-handlers","key":"connect-assetmanager-handlers","value":{"rev":"38-8b93821fcf46f20bbad4319fb39302c1"}}, -{"id":"connect-assets","key":"connect-assets","value":{"rev":"33-7ec2940217e29a9514d20cfd49af10f5"}}, -{"id":"connect-auth","key":"connect-auth","value":{"rev":"36-5640e82f3e2773e44ce47b0687436305"}}, -{"id":"connect-cache","key":"connect-cache","value":{"rev":"11-efe1f0ab00c181b1a4dece446ef13a90"}}, -{"id":"connect-coffee","key":"connect-coffee","value":{"rev":"3-3d4ebcfe083c9e5a5d587090f1bb4d65"}}, -{"id":"connect-conneg","key":"connect-conneg","value":{"rev":"3-bc3e04e65cf1f5233a38cc846e9a4a75"}}, -{"id":"connect-cookie-session","key":"connect-cookie-session","value":{"rev":"3-f48ca73aa1ce1111a2c962d219b59c1a"}}, -{"id":"connect-cors","key":"connect-cors","value":{"rev":"10-5bc9e3759671a0157fdc307872d38844"}}, -{"id":"connect-couchdb","key":"connect-couchdb","value":{"rev":"9-9adb6d24c7fb6de58bafe6d06fb4a230"}}, -{"id":"connect-cradle","key":"connect-cradle","value":{"rev":"5-0e5e32e00a9b98eff1ab010173d26ffb"}}, -{"id":"connect-docco","key":"connect-docco","value":{"rev":"9-c8e379f9a89db53f8921895ac4e87ed6"}}, -{"id":"connect-dojo","key":"connect-dojo","value":{"rev":"17-f323c634536b9b948ad9607f4ca0847f"}}, -{"id":"connect-esi","key":"connect-esi","value":{"rev":"45-01de7506d405856586ea77cb14022192"}}, -{"id":"connect-facebook","key":"connect-facebook","value":{"rev":"3-bf77eb01c0476e607b25bc9d93416b7e"}}, -{"id":"connect-force-domain","key":"connect-force-domain","value":{"rev":"5-a65755f93aaea8a21c7ce7dd4734dca0"}}, -{"id":"connect-form","key":"connect-form","value":{"rev":"16-fa786af79f062a05ecdf3e7cf48317e2"}}, -{"id":"connect-geoip","key":"connect-geoip","value":{"rev":"3-d87f93bcac58aa7904886a8fb6c45899"}}, -{"id":"connect-googleapps","key":"connect-googleapps","value":{"rev":"13-49c5c6c6724b21eea9a8eaae2165978d"}}, -{"id":"connect-gzip","key":"connect-gzip","value":{"rev":"7-2e1d4bb887c1ddda278fc8465ee5645b"}}, -{"id":"connect-heroku-redis","key":"connect-heroku-redis","value":{"rev":"13-92da2be67451e5f55f6fbe3672c86dc4"}}, -{"id":"connect-i18n","key":"connect-i18n","value":{"rev":"8-09d47d7c220770fc80d1b6fd87ffcd07"}}, -{"id":"connect-identity","key":"connect-identity","value":{"rev":"8-8eb9e21bbf80045e0243720955d6070f"}}, -{"id":"connect-image-resizer","key":"connect-image-resizer","value":{"rev":"7-5f82563f87145f3cc06086afe3a14a62"}}, -{"id":"connect-index","key":"connect-index","value":{"rev":"3-8b8373334079eb26c8735b39483889a0"}}, -{"id":"connect-jsonp","key":"connect-jsonp","value":{"rev":"16-9e80af455e490710f06039d3c0025840"}}, -{"id":"connect-jsonrpc","key":"connect-jsonrpc","value":{"rev":"6-6556800f0bef6ae5eb10496d751048e7"}}, -{"id":"connect-kyoto","key":"connect-kyoto","value":{"rev":"5-8f6a9e9b24d1a71c786645402f509645"}}, -{"id":"connect-less","key":"connect-less","value":{"rev":"3-461ed9a80b462b978a81d5bcee6f3665"}}, -{"id":"connect-load-balance","key":"connect-load-balance","value":{"rev":"3-e74bff5fb47d1490c05a9cc4339af347"}}, -{"id":"connect-memcached","key":"connect-memcached","value":{"rev":"3-5fc92b7f9fb5bcfb364a27e6f052bcc7"}}, -{"id":"connect-mongo","key":"connect-mongo","value":{"rev":"13-c3869bc7337b2f1ee6b9b3364993f321"}}, -{"id":"connect-mongodb","key":"connect-mongodb","value":{"rev":"30-30cb932839ce16e4e496f5a33fdd720a"}}, -{"id":"connect-mongoose","key":"connect-mongoose","value":{"rev":"3-48a5b329e4cfa885442d43bbd1d0db46"}}, -{"id":"connect-mongoose-session","key":"connect-mongoose-session","value":{"rev":"3-6692b8e1225d5cd6a2daabd61cecb1cd"}}, -{"id":"connect-mysql-session","key":"connect-mysql-session","value":{"rev":"9-930abd0279ef7f447e75c95b3e71be12"}}, -{"id":"connect-no-www","key":"connect-no-www","value":{"rev":"3-33bed7417bc8a5e8efc74ce132c33158"}}, -{"id":"connect-notifo","key":"connect-notifo","value":{"rev":"3-4681f8c5a7dfd35aee9634e809c41804"}}, -{"id":"connect-parameter-router","key":"connect-parameter-router","value":{"rev":"3-f435f06d556c208d43ef05c64bcddceb"}}, -{"id":"connect-pg","key":"connect-pg","value":{"rev":"11-d84c53d8f1c24adfc266e7a031dddf0d"}}, -{"id":"connect-proxy","key":"connect-proxy","value":{"rev":"7-a691ff57a9affeab47c54d17dbe613cb"}}, -{"id":"connect-queryparser","key":"connect-queryparser","value":{"rev":"3-bb35a7f3f75297a63bf942a63b842698"}}, -{"id":"connect-redis","key":"connect-redis","value":{"rev":"40-4faa12962b14da49380de2bb183176f9"}}, -{"id":"connect-restreamer","key":"connect-restreamer","value":{"rev":"3-08e637ca685cc63b2b4f9722c763c105"}}, -{"id":"connect-riak","key":"connect-riak","value":{"rev":"5-3268c29a54e430a3f8adb33570afafdb"}}, -{"id":"connect-rpx","key":"connect-rpx","value":{"rev":"28-acc7bb4200c1d30f359151f0a715162c"}}, -{"id":"connect-security","key":"connect-security","value":{"rev":"16-fecd20f486a8ea4d557119af5b5a2960"}}, -{"id":"connect-select","key":"connect-select","value":{"rev":"5-5ca28ec800419e4cb3e97395a6b96153"}}, -{"id":"connect-session-mongo","key":"connect-session-mongo","value":{"rev":"9-9e6a26dfbb9c13a9d6f4060a1895730a"}}, -{"id":"connect-session-redis-store","key":"connect-session-redis-store","value":{"rev":"8-fecfed6e17476eaada5cfe7740d43893"}}, -{"id":"connect-sessionvoc","key":"connect-sessionvoc","value":{"rev":"13-57b6e6ea2158e3b7136054839662ea3d"}}, -{"id":"connect-spdy","key":"connect-spdy","value":{"rev":"11-f9eefd7303295d77d317cba78d299130"}}, -{"id":"connect-sts","key":"connect-sts","value":{"rev":"9-8e3fd563c04ce14b824fc4da42efb70e"}}, -{"id":"connect-timeout","key":"connect-timeout","value":{"rev":"4-6f5f8d97480c16c7acb05fe82400bbc7"}}, -{"id":"connect-unstable","key":"connect-unstable","value":{"rev":"3-1d3a4edc52f005d8cb4d557485095314"}}, -{"id":"connect-wormhole","key":"connect-wormhole","value":{"rev":"3-f33b15acc686bd9ad0c6df716529009f"}}, -{"id":"connect-xcors","key":"connect-xcors","value":{"rev":"7-f8e1cd6805a8779bbd6bb2c1000649fb"}}, -{"id":"connect_facebook","key":"connect_facebook","value":{"rev":"3-b3001d71f619836a009c53c816ce36ed"}}, -{"id":"connect_json","key":"connect_json","value":{"rev":"3-dd0df74291f80f45b4314d56192c19c5"}}, -{"id":"connectables","key":"connectables","value":{"rev":"3-f6e9f8f13883a523b4ea6035281f541b"}}, -{"id":"conseq","key":"conseq","value":{"rev":"3-890d340704322630e7a724333f394c70"}}, -{"id":"consistent-hashing","key":"consistent-hashing","value":{"rev":"3-fcef5d4479d926560cf1bc900f746f2a"}}, -{"id":"console","key":"console","value":{"rev":"3-1e0449b07c840eeac6b536e2552844f4"}}, -{"id":"console.log","key":"console.log","value":{"rev":"9-d608afe50e732ca453365befcb87bad5"}}, -{"id":"consolemark","key":"consolemark","value":{"rev":"13-320f003fc2c3cec909ab3e9c3bce9743"}}, -{"id":"construct","key":"construct","value":{"rev":"3-75bdc809ee0572172e6acff537af7d9b"}}, -{"id":"context","key":"context","value":{"rev":"3-86b1a6a0f77ef86d4d9ccfff47ceaf6a"}}, -{"id":"contextify","key":"contextify","value":{"rev":"9-547b8019ef66e0d1c84fe00be832e750"}}, -{"id":"contract","key":"contract","value":{"rev":"3-d09e775c2c1e297b6cbbfcd5efbae3c7"}}, -{"id":"contracts","key":"contracts","value":{"rev":"13-3fd75c77e688937734f51cf97f10dd7d"}}, -{"id":"control","key":"control","value":{"rev":"31-7abf0cb81d19761f3ff59917e56ecedf"}}, -{"id":"controljs","key":"controljs","value":{"rev":"3-a8e80f93e389ca07509fa7addd6cb805"}}, -{"id":"convert","key":"convert","value":{"rev":"3-6c962b92274bcbe82b82a30806559d47"}}, -{"id":"conway","key":"conway","value":{"rev":"5-93ce24976e7dd5ba02fe4addb2b44267"}}, -{"id":"cookie","key":"cookie","value":{"rev":"14-946d98bf46e940d13ca485148b1bd609"}}, -{"id":"cookie-sessions","key":"cookie-sessions","value":{"rev":"8-4b399ac8cc4baea15f6c5e7ac94399f0"}}, -{"id":"cookiejar","key":"cookiejar","value":{"rev":"20-220b41a4c2a8f2b7b14aafece7dcc1b5"}}, -{"id":"cookies","key":"cookies","value":{"rev":"15-b3b35c32a99ed79accc724685d131d18"}}, -{"id":"cool","key":"cool","value":{"rev":"3-007d1123eb2dc52cf845d625f7ccf198"}}, -{"id":"coolmonitor","key":"coolmonitor","value":{"rev":"3-69c3779c596527f63e49c5e507dff1e1"}}, -{"id":"coop","key":"coop","value":{"rev":"9-39dee3260858cf8c079f31bdf02cea1d"}}, -{"id":"coordinator","key":"coordinator","value":{"rev":"32-9d92f2033a041d5c40f8e1018d512755"}}, -{"id":"core-utils","key":"core-utils","value":{"rev":"9-98f2412938a67d83e53e76a26b5601e0"}}, -{"id":"cornify","key":"cornify","value":{"rev":"6-6913172d09c52f9e8dc0ea19ec49972c"}}, -{"id":"corpus","key":"corpus","value":{"rev":"3-a357e7779f8d4ec020b755c71dd1e57b"}}, -{"id":"corrector","key":"corrector","value":{"rev":"3-ef3cf99fc59a581aee3590bdb8615269"}}, -{"id":"cosmos","key":"cosmos","value":{"rev":"3-3eb292c59758fb5215f22739fa9531ce"}}, -{"id":"couch-ar","key":"couch-ar","value":{"rev":"25-f106d2965ab74b25b18328ca44ca4a02"}}, -{"id":"couch-cleaner","key":"couch-cleaner","value":{"rev":"15-74e61ef98a770d76be4c7e7571d18381"}}, -{"id":"couch-client","key":"couch-client","value":{"rev":"10-94945ebd3e17f509fcc71fb6c6ef5d35"}}, -{"id":"couch-session","key":"couch-session","value":{"rev":"4-c73dea41ceed26a2a0bde9a9c8ffffc4"}}, -{"id":"couch-sqlite","key":"couch-sqlite","value":{"rev":"3-3e420fe6623542475595aa7e55a4e4bd"}}, -{"id":"couch-stream","key":"couch-stream","value":{"rev":"5-911704fc984bc49acce1e10adefff7ff"}}, -{"id":"couchapp","key":"couchapp","value":{"rev":"16-ded0f4742bb3f5fd42ec8f9c6b21ae8e"}}, -{"id":"couchcmd","key":"couchcmd","value":{"rev":"3-651ea2b435e031481b5d3d968bd3d1eb"}}, -{"id":"couchdb","key":"couchdb","value":{"rev":"12-8abcfd649751226c10edf7cf0508a09f"}}, -{"id":"couchdb-api","key":"couchdb-api","value":{"rev":"23-f2c82f08f52f266df7ac2aa709615244"}}, -{"id":"couchdb-tmp","key":"couchdb-tmp","value":{"rev":"3-9a695fb4ba352f3be2d57c5995718520"}}, -{"id":"couchdev","key":"couchdev","value":{"rev":"3-50a0ca3ed0395dd72de62a1b96619e66"}}, -{"id":"couchlegs","key":"couchlegs","value":{"rev":"5-be78e7922ad4ff86dbe5c17a87fdf4f1"}}, -{"id":"couchtato","key":"couchtato","value":{"rev":"11-15a1ce8de9a8cf1e81d96de6afbb4f45"}}, -{"id":"couchy","key":"couchy","value":{"rev":"13-0a52b2712fb8447f213866612e3ccbf7"}}, -{"id":"courier","key":"courier","value":{"rev":"17-eb94fe01aeaad43805f4bce21d23bcba"}}, -{"id":"coverage","key":"coverage","value":{"rev":"10-a333448996d0b0d420168d1b5748db32"}}, -{"id":"coverage_testing","key":"coverage_testing","value":{"rev":"3-62834678206fae7911401aa86ec1a85e"}}, -{"id":"cqs","key":"cqs","value":{"rev":"6-0dad8b969c70abccc27a146a99399533"}}, -{"id":"crab","key":"crab","value":{"rev":"9-599fc7757f0c9efbe3889f30981ebe93"}}, -{"id":"cradle","key":"cradle","value":{"rev":"60-8fb414b66cb07b4bae59c0316d5c45b4"}}, -{"id":"cradle-fixed","key":"cradle-fixed","value":{"rev":"4-589afffa26fca22244ad2038abb77dc5"}}, -{"id":"cradle-init","key":"cradle-init","value":{"rev":"13-499d63592141f1e200616952bbdea015"}}, -{"id":"crawler","key":"crawler","value":{"rev":"5-ec4a8d77f90d86d17d6d14d631360188"}}, -{"id":"crc","key":"crc","value":{"rev":"3-25ab83f8b1333e6d4e4e5fb286682422"}}, -{"id":"creatary","key":"creatary","value":{"rev":"3-770ad84ecb2e2a3994637d419384740d"}}, -{"id":"createsend","key":"createsend","value":{"rev":"7-19885346e4d7a01ac2e9ad70ea0e822a"}}, -{"id":"creationix","key":"creationix","value":{"rev":"61-7ede1759afbd41e8b4dedc348b72202e"}}, -{"id":"creek","key":"creek","value":{"rev":"33-4f511aa4dd379e04bba7ac333744325e"}}, -{"id":"cron","key":"cron","value":{"rev":"12-8d794edb5f9b7cb6322acaef1c848043"}}, -{"id":"cron2","key":"cron2","value":{"rev":"13-bae2f1b02ffcbb0e77bde6c33b566f80"}}, -{"id":"crontab","key":"crontab","value":{"rev":"36-14d26bf316289fb4841940eee2932f37"}}, -{"id":"crossroads","key":"crossroads","value":{"rev":"7-d73d51cde30f24caad91e6a3c5b420f2"}}, -{"id":"crowdflower","key":"crowdflower","value":{"rev":"3-16c2dfc9fd505f75068f75bd19e3d227"}}, -{"id":"cruvee","key":"cruvee","value":{"rev":"3-979ccf0286b1701e9e7483a10451d975"}}, -{"id":"crypt","key":"crypt","value":{"rev":"3-031b338129bebc3749b42fb3d442fc4b"}}, -{"id":"crypto","key":"crypto","value":{"rev":"3-66a444b64481c85987dd3f22c32e0630"}}, -{"id":"csj","key":"csj","value":{"rev":"3-bc3133c7a0a8827e89aa03897b81d177"}}, -{"id":"cson","key":"cson","value":{"rev":"7-3ac3e1e10572e74e58874cfe3200eb87"}}, -{"id":"csrf-express","key":"csrf-express","value":{"rev":"3-4cc36d88e8ad10b9c2cc8a7318f0abd3"}}, -{"id":"css-crawler","key":"css-crawler","value":{"rev":"13-4739c7bf1decc72d7682b53303f93ec6"}}, -{"id":"css-smasher","key":"css-smasher","value":{"rev":"3-631128f966135c97d648efa3eadf7bfb"}}, -{"id":"css-sourcery","key":"css-sourcery","value":{"rev":"3-571343da3a09af7de473d29ed7dd788b"}}, -{"id":"css2json","key":"css2json","value":{"rev":"5-fb6d84c1da4a9391fa05d782860fe7c4"}}, -{"id":"csskeeper","key":"csskeeper","value":{"rev":"5-ea667a572832ea515b044d4b87ea7d98"}}, -{"id":"csslike","key":"csslike","value":{"rev":"3-6e957cce81f6e790f8562526d907ad94"}}, -{"id":"csslint","key":"csslint","value":{"rev":"19-b1e973274a0a6b8eb81b4d715a249612"}}, -{"id":"cssmin","key":"cssmin","value":{"rev":"10-4bb4280ec56f110c43abe01189f95818"}}, -{"id":"csso","key":"csso","value":{"rev":"17-ccfe2a72d377919b07973bbb1d19b8f2"}}, -{"id":"cssom","key":"cssom","value":{"rev":"3-f96b884b63b4c04bac18b8d9c0a4c4cb"}}, -{"id":"cssp","key":"cssp","value":{"rev":"5-abf69f9ff99b7d0bf2731a5b5da0897c"}}, -{"id":"cssunminifier","key":"cssunminifier","value":{"rev":"3-7bb0c27006af682af92d1969fcb4fa73"}}, -{"id":"cssutils","key":"cssutils","value":{"rev":"3-4759f9db3b8eac0964e36f5229260526"}}, -{"id":"csv","key":"csv","value":{"rev":"21-0420554e9c08e001063cfb0a69a48255"}}, -{"id":"csv2mongo","key":"csv2mongo","value":{"rev":"9-373f11c05e5d1744c3187d9aaeaae0ab"}}, -{"id":"csvutils","key":"csvutils","value":{"rev":"15-84aa82e56b49cd425a059c8f0735a23c"}}, -{"id":"ctrlflow","key":"ctrlflow","value":{"rev":"33-0b817baf6c744dc17b83d5d8ab1ba74e"}}, -{"id":"ctrlflow_tests","key":"ctrlflow_tests","value":{"rev":"3-d9ed35503d27b0736c59669eecb4c4fe"}}, -{"id":"ctype","key":"ctype","value":{"rev":"9-c5cc231475f23a01682d0b1a3b6e49c2"}}, -{"id":"cube","key":"cube","value":{"rev":"5-40320a20d260e082f5c4ca508659b4d1"}}, -{"id":"cucumber","key":"cucumber","value":{"rev":"11-8489af0361b6981cf9001a0403815936"}}, -{"id":"cucumis","key":"cucumis","value":{"rev":"33-6dc38f1161fae3efa2a89c8288b6e040"}}, -{"id":"cucumis-rm","key":"cucumis-rm","value":{"rev":"3-6179249ad15166f8d77eb136b3fa87ca"}}, -{"id":"cupcake","key":"cupcake","value":{"rev":"15-1dd13a85415a366942e7f0a3de06aa2a"}}, -{"id":"curator","key":"curator","value":{"rev":"19-d798ab7fbca11ba0e9c6c40c0a2f9440"}}, -{"id":"curl","key":"curl","value":{"rev":"11-ac7143ac07c64ea169ba7d4e58be232a"}}, -{"id":"curly","key":"curly","value":{"rev":"30-0248a5563b6e96457315ad0cc2fe22c1"}}, -{"id":"curry","key":"curry","value":{"rev":"11-ce13fa80e84eb25d9cf76cf4162a634e"}}, -{"id":"cursory","key":"cursory","value":{"rev":"3-ea2f4b1b47caf38460402d1a565c18b8"}}, -{"id":"d-utils","key":"d-utils","value":{"rev":"37-699ad471caa28183d75c06f0f2aab41c"}}, -{"id":"d3","key":"d3","value":{"rev":"5-4d867844bd7dce21b34cd7283bb9cad4"}}, -{"id":"d3bench","key":"d3bench","value":{"rev":"3-617cc625bfd91c175d037bfcace9c4e9"}}, -{"id":"daemon","key":"daemon","value":{"rev":"11-8654f90bc609ca2c3ec260c7d6b7793e"}}, -{"id":"daemon-tools","key":"daemon-tools","value":{"rev":"18-8197fce2054de67925e6f2c3fa3cd90a"}}, -{"id":"daimyo","key":"daimyo","value":{"rev":"25-531b0b0afdc5ae3d41b4131da40af6cf"}}, -{"id":"daleth","key":"daleth","value":{"rev":"7-4824619205289ba237ef2a4dc1fba1ec"}}, -{"id":"dali","key":"dali","value":{"rev":"9-037c4c76f739ecb537a064c07d3c63e3"}}, -{"id":"damncomma","key":"damncomma","value":{"rev":"3-b1472eada01efb8a12d521e5a248834b"}}, -{"id":"dana","key":"dana","value":{"rev":"3-2a3c0ff58a6d13fedd17e1d192080e59"}}, -{"id":"dandy","key":"dandy","value":{"rev":"9-f4ae43659dd812a010b0333bf8e5a282"}}, -{"id":"dash","key":"dash","value":{"rev":"5-698513f86165f429a5f55320d5a700f0"}}, -{"id":"dash-fu","key":"dash-fu","value":{"rev":"3-848e99a544f9f78f311c7ebfc5a172c4"}}, -{"id":"dashboard","key":"dashboard","value":{"rev":"3-71844d1fc1140b7533f9e57740d2b666"}}, -{"id":"data","key":"data","value":{"rev":"23-b594e2bd1ffef1cda8b7e94dbf15ad5b"}}, -{"id":"data-layer","key":"data-layer","value":{"rev":"9-9205d35cc6eaf1067ee0cec1b421d749"}}, -{"id":"data-page","key":"data-page","value":{"rev":"3-d7a3346a788a0c07132e50585db11c99"}}, -{"id":"data-section","key":"data-section","value":{"rev":"9-d3fff313977667c53cbadb134d993412"}}, -{"id":"data-uuid","key":"data-uuid","value":{"rev":"8-24001fe9f37c4cc7ac01079ee4767363"}}, -{"id":"data-visitor","key":"data-visitor","value":{"rev":"6-7fe5da9d118fab27157dba97050c6487"}}, -{"id":"database-cleaner","key":"database-cleaner","value":{"rev":"19-4bdfc8b324e95e6da9f72e7b7b708b98"}}, -{"id":"datapool","key":"datapool","value":{"rev":"3-f99c93ca812d2f4725bbaea99122832c"}}, -{"id":"datasift","key":"datasift","value":{"rev":"3-6de3ae25c9a99f651101e191595bcf64"}}, -{"id":"date","key":"date","value":{"rev":"9-b334fc6450d093de40a664a4a835cfc4"}}, -{"id":"date-utils","key":"date-utils","value":{"rev":"31-7be8fcf1919564a8fb7223a86a5954ac"}}, -{"id":"dateformat","key":"dateformat","value":{"rev":"11-5b924e1d29056a0ef9b89b9d7984d5c4"}}, -{"id":"dateformatjs","key":"dateformatjs","value":{"rev":"3-4c50a38ecc493535ee2570a838673937"}}, -{"id":"datejs","key":"datejs","value":{"rev":"5-f47e3e6532817f822aa910b59a45717c"}}, -{"id":"dateselect","key":"dateselect","value":{"rev":"3-ce58def02fd8c8feda8c6f2004726f97"}}, -{"id":"datetime","key":"datetime","value":{"rev":"7-14227b0677eb93b8eb519db47f46bf36"}}, -{"id":"db","key":"db","value":{"rev":"3-636e9ea922a85c92bc11aa9691a2e67f"}}, -{"id":"db-drizzle","key":"db-drizzle","value":{"rev":"157-955f74f49ac4236df317e227c08afaa3"}}, -{"id":"db-mysql","key":"db-mysql","value":{"rev":"224-e596a18d9af33ff1fbcf085a9f4f56fd"}}, -{"id":"db-oracle","key":"db-oracle","value":{"rev":"13-a1e2924d87b4badfddeccf6581525b08"}}, -{"id":"dcrypt","key":"dcrypt","value":{"rev":"29-a144a609bef5004781df901440d67b2d"}}, -{"id":"decafscript","key":"decafscript","value":{"rev":"3-f3a239dc7d503c900fc9854603d716e6"}}, -{"id":"decimal","key":"decimal","value":{"rev":"3-614ed56d4d6c5eb7883d8fd215705a12"}}, -{"id":"decimaljson","key":"decimaljson","value":{"rev":"9-7cb23f4b2b1168b1a213f1eefc85fa51"}}, -{"id":"deck","key":"deck","value":{"rev":"7-da422df97f13c7d84e8f3690c1e1ca32"}}, -{"id":"deckard","key":"deckard","value":{"rev":"3-85e0cd76cdd88ff60a617239060d6f46"}}, -{"id":"deckem","key":"deckem","value":{"rev":"9-03ca75ea35960ccd5779b4cfa8cfb9f9"}}, -{"id":"defensio","key":"defensio","value":{"rev":"5-0ad0ae70b4e184626d914cc4005ee34c"}}, -{"id":"defer","key":"defer","value":{"rev":"3-8d003c96f4263a26b7955e251cddbd95"}}, -{"id":"deferrable","key":"deferrable","value":{"rev":"8-3ae57ce4391105962d09ad619d4c4670"}}, -{"id":"deferred","key":"deferred","value":{"rev":"17-9cee7948dbdf7b6dcc00bbdc60041dd0"}}, -{"id":"define","key":"define","value":{"rev":"45-9d422f2ac5ab693f881df85898d68e3a"}}, -{"id":"deflate","key":"deflate","value":{"rev":"10-3ebe2b87e09f4ae51857cae02e1af788"}}, -{"id":"degrees","key":"degrees","value":{"rev":"5-707c57cfa3e589e8059fe9860cc0c10b"}}, -{"id":"deimos","key":"deimos","value":{"rev":"11-6481696be774d14254fe7c427107dc2a"}}, -{"id":"deja","key":"deja","value":{"rev":"47-bde4457402db895aad46198433842668"}}, -{"id":"delayed-stream","key":"delayed-stream","value":{"rev":"13-f6ca393b08582350f78c5c66f183489b"}}, -{"id":"delegator","key":"delegator","value":{"rev":"3-650651749c1df44ef544c919fae74f82"}}, -{"id":"dep-graph","key":"dep-graph","value":{"rev":"3-e404af87822756da52754e2cc5c576b1"}}, -{"id":"dependency-promise","key":"dependency-promise","value":{"rev":"11-1cc2be8465d736ec8f3cc8940ab22823"}}, -{"id":"depends","key":"depends","value":{"rev":"30-adc9604bbd8117592f82eee923d8703e"}}, -{"id":"deploy","key":"deploy","value":{"rev":"3-82020957528bd0bdd675bed9ac4e4cc5"}}, -{"id":"deployjs","key":"deployjs","value":{"rev":"5-a3e99a5ed81d4b1ad44b6477e6a5a985"}}, -{"id":"deputy-client","key":"deputy-client","value":{"rev":"3-31fd224b301ec0f073df7afa790050ec"}}, -{"id":"deputy-server","key":"deputy-server","value":{"rev":"3-0d790cce82aadfd2b8f39a6b056f2792"}}, -{"id":"derby","key":"derby","value":{"rev":"40-b642048a1a639d77ab139160a4da0fd2"}}, -{"id":"des","key":"des","value":{"rev":"24-fcbdc086e657aef356b75433b3e65ab6"}}, -{"id":"descent","key":"descent","value":{"rev":"7-9cc259b25fc688597fc7efaa516d03c6"}}, -{"id":"describe","key":"describe","value":{"rev":"6-788c7f2feaf2e88f4b1179976b273744"}}, -{"id":"deserver","key":"deserver","value":{"rev":"5-da8083694e89b8434123fe7482a3cc7e"}}, -{"id":"detect","key":"detect","value":{"rev":"3-c27f258d39d7905c2b92383809bb5988"}}, -{"id":"detective","key":"detective","value":{"rev":"9-d6cfa0c6389783cdc9c9ffa9e4082c64"}}, -{"id":"dev","key":"dev","value":{"rev":"23-5c2ce4a4f6a4f24d3cff3b7db997d8bc"}}, -{"id":"dev-warnings","key":"dev-warnings","value":{"rev":"5-5a7d7f36d09893df96441be8b09e41d6"}}, -{"id":"dhcpjs","key":"dhcpjs","value":{"rev":"3-1bc01bd612f3ab1fce178c979aa34e43"}}, -{"id":"dht","key":"dht","value":{"rev":"3-40c0b909b6c0e2305e19d10cea1881b0"}}, -{"id":"dht-bencode","key":"dht-bencode","value":{"rev":"5-88a1da8de312a54097507d72a049f0f3"}}, -{"id":"dialect","key":"dialect","value":{"rev":"18-db7928ce4756eea35db1732d4f2ebc88"}}, -{"id":"dialect-http","key":"dialect-http","value":{"rev":"19-23a927d28cb43733dbd05294134a5b8c"}}, -{"id":"dicks","key":"dicks","value":{"rev":"11-ba64897899e336d366ffd4b68cac99f5"}}, -{"id":"diff","key":"diff","value":{"rev":"13-1a88acb0369ab8ae096a2323d65a2811"}}, -{"id":"diff_match_patch","key":"diff_match_patch","value":{"rev":"8-2f6f467e483b23b217a2047e4aded850"}}, -{"id":"diffbot","key":"diffbot","value":{"rev":"3-8cb8e34af89cb477a5da52e3fd9a13f7"}}, -{"id":"digest","key":"digest","value":{"rev":"7-bc6fb9e68c83197381b0d9ac7db16c1c"}}, -{"id":"dir","key":"dir","value":{"rev":"7-574462bb241a39eeffe6c5184d40c57a"}}, -{"id":"dir-watcher","key":"dir-watcher","value":{"rev":"31-1a3ca4d6aa8aa32c619efad5fbfce494"}}, -{"id":"dir2html","key":"dir2html","value":{"rev":"5-b4bfb2916c2d94c85aa75ffa29ad1af4"}}, -{"id":"directive","key":"directive","value":{"rev":"3-3373f02b8762cb1505c8f8cbcc50d3d4"}}, -{"id":"dirsum","key":"dirsum","value":{"rev":"5-8545445faaa41d2225ec7ff226a10750"}}, -{"id":"dirty","key":"dirty","value":{"rev":"13-d636ea0d1ed35560c0bc7272965c1a6f"}}, -{"id":"dirty-uuid","key":"dirty-uuid","value":{"rev":"5-65acdfda886afca65ae52f0ac21ce1b2"}}, -{"id":"discogs","key":"discogs","value":{"rev":"21-839410e6bf3bee1435ff837daaeaf9f8"}}, -{"id":"discount","key":"discount","value":{"rev":"13-a8fb2a8f668ac0a55fffada1ea94a4b7"}}, -{"id":"discovery","key":"discovery","value":{"rev":"3-46f4496224d132e56cbc702df403219d"}}, -{"id":"diskcache","key":"diskcache","value":{"rev":"23-7b14ad41fc199184fb939828e9122099"}}, -{"id":"dispatch","key":"dispatch","value":{"rev":"6-e72cc7b2bcc97faf897ae4e4fa3ec681"}}, -{"id":"distribute.it","key":"distribute.it","value":{"rev":"12-0978757eb25d22117af675806cf6eef2"}}, -{"id":"dive","key":"dive","value":{"rev":"21-9cbd1281c5a3c2dae0cc0407863f3336"}}, -{"id":"diveSync","key":"diveSync","value":{"rev":"3-015ec4803903106bf24cb4f17cedee68"}}, -{"id":"dk-assets","key":"dk-assets","value":{"rev":"3-25d9b6ac727caf1e227e6436af835d03"}}, -{"id":"dk-core","key":"dk-core","value":{"rev":"3-0b6a2f4dfc0484a3908159a897920bae"}}, -{"id":"dk-couchdb","key":"dk-couchdb","value":{"rev":"3-cc9ef511f9ed46be9d7099f10b1ee776"}}, -{"id":"dk-model","key":"dk-model","value":{"rev":"3-3a61006be57d304724c049e4dcf2fc9b"}}, -{"id":"dk-model-couchdb","key":"dk-model-couchdb","value":{"rev":"3-5163def21660db8428e623909bbfcb4d"}}, -{"id":"dk-routes","key":"dk-routes","value":{"rev":"3-4563357f850248d7d0fb37f9bdcb893b"}}, -{"id":"dk-server","key":"dk-server","value":{"rev":"3-9aef13fc5814785c9805b26828e8d114"}}, -{"id":"dk-template","key":"dk-template","value":{"rev":"3-809c94776252441129705fbe1d93e752"}}, -{"id":"dk-transport","key":"dk-transport","value":{"rev":"3-9271da6f86079027535179b743d0d4c3"}}, -{"id":"dk-websockets","key":"dk-websockets","value":{"rev":"3-426b44c04180d6caf7cf765f03fc52c2"}}, -{"id":"dnet-index-proxy","key":"dnet-index-proxy","value":{"rev":"51-1f3cf4f534c154369d5e774a8f599106"}}, -{"id":"dnode","key":"dnode","value":{"rev":"129-68db10c25c23d635dc828aa698d1279e"}}, -{"id":"dnode-ez","key":"dnode-ez","value":{"rev":"17-75877eab5cf3976b8876c49afd2f7e38"}}, -{"id":"dnode-protocol","key":"dnode-protocol","value":{"rev":"23-fb28f8e1180e6aa44fa564e0d55b3d1e"}}, -{"id":"dnode-smoothiecharts","key":"dnode-smoothiecharts","value":{"rev":"3-d1483028e5768527c2786b9ed5d76463"}}, -{"id":"dnode-stack","key":"dnode-stack","value":{"rev":"9-c1ad8ce01282ce4fa72b5993c580e58e"}}, -{"id":"dnode-worker","key":"dnode-worker","value":{"rev":"3-4c73c0d7ed225197fd8fb0555eaf1152"}}, -{"id":"dns-server","key":"dns-server","value":{"rev":"3-4858a1773da514fea68eac6d9d39f69e"}}, -{"id":"dns-srv","key":"dns-srv","value":{"rev":"12-867c769437fa0ad8a83306aa9e2a158e"}}, -{"id":"doc","key":"doc","value":{"rev":"5-2c077b3fd3b6efa4e927b66f1390e4ea"}}, -{"id":"doc.md","key":"doc.md","value":{"rev":"7-8e8e51be4956550388699222b2e039e7"}}, -{"id":"docco","key":"docco","value":{"rev":"18-891bde1584809c3b1f40fef9961b4f28"}}, -{"id":"docdown","key":"docdown","value":{"rev":"5-fcf5be2ab6ceaed76c1980b462359057"}}, -{"id":"docket","key":"docket","value":{"rev":"13-a4969e0fb17af8dba7df178e364161c2"}}, -{"id":"docpad","key":"docpad","value":{"rev":"77-a478ac8c7ac86e304f9213380ea4b550"}}, -{"id":"docs","key":"docs","value":{"rev":"3-6b1fae9738a3327a3a3be826c0981c3a"}}, -{"id":"dojo-node","key":"dojo-node","value":{"rev":"13-e0dc12e9ce8ab3f40b228c2af8c41064"}}, -{"id":"dom","key":"dom","value":{"rev":"3-cecd9285d0d5b1cab0f18350aac1b2b0"}}, -{"id":"dom-js","key":"dom-js","value":{"rev":"8-dd20e8b23028f4541668501650b52a71"}}, -{"id":"dom-js-ns","key":"dom-js-ns","value":{"rev":"3-787567fc1d6f4ca7e853215a4307b593"}}, -{"id":"domjs","key":"domjs","value":{"rev":"3-d2d05a20dccb57fb6db7da08916c6c0f"}}, -{"id":"doml","key":"doml","value":{"rev":"11-c3b49c50906d9875b546413e4acd1b38"}}, -{"id":"domo","key":"domo","value":{"rev":"3-a4321e6c0c688f773068365b44b08b6b"}}, -{"id":"domready","key":"domready","value":{"rev":"46-21c6b137bbed79ddbff31fdf0ef7d61f"}}, -{"id":"donkey","key":"donkey","value":{"rev":"3-1454aa878654886e8495ebb060aa10f7"}}, -{"id":"dot","key":"dot","value":{"rev":"19-b6d2d53cb9ae1a608a0956aeb8092578"}}, -{"id":"dotaccess","key":"dotaccess","value":{"rev":"13-63ddef6740e84f4517f7dd1bb0d68c56"}}, -{"id":"douche","key":"douche","value":{"rev":"3-6a200f908ccfc9ae549e80209e117cbf"}}, -{"id":"dox","key":"dox","value":{"rev":"10-856cc6bf3dc7c44e028173fea8323c24"}}, -{"id":"drag","key":"drag","value":{"rev":"9-00f27e241269c3df1d71e45b698e9b3b"}}, -{"id":"drain","key":"drain","value":{"rev":"3-8827a0ee7ed74b948bf56d5a33455fc8"}}, -{"id":"drawback","key":"drawback","value":{"rev":"74-dd356b3e55175525317e53c24979a431"}}, -{"id":"drev","key":"drev","value":{"rev":"9-43529419a69529dd7af9a83985aab1f2"}}, -{"id":"drews-mixins","key":"drews-mixins","value":{"rev":"17-63373bae6525859bddfc8d6ad19bdb06"}}, -{"id":"drnu","key":"drnu","value":{"rev":"3-b9b14b2241ded1e52a92fc4225b4ddc5"}}, -{"id":"dropbox","key":"dropbox","value":{"rev":"19-2cb7a40d253621fdfa96f23b96e42ecb"}}, -{"id":"drtoms-nodehelpers","key":"drtoms-nodehelpers","value":{"rev":"3-be0a75cdd7c2d49b1ec4ad1d2c3bc911"}}, -{"id":"drty","key":"drty","value":{"rev":"3-56eabd39b9badfa0af601c5cc64cee2c"}}, -{"id":"drty-facebook","key":"drty-facebook","value":{"rev":"3-fd07af7fb87d7f1d35e13f458a02c127"}}, -{"id":"drumkit","key":"drumkit","value":{"rev":"3-f3cdacef51453d3ac630759aff2a8b58"}}, -{"id":"drupal","key":"drupal","value":{"rev":"13-13835b1e1c8a0e8f0b0e8479640a8d7e"}}, -{"id":"dryice","key":"dryice","value":{"rev":"15-9990fdbde5475a8dbdcc055cb08d654d"}}, -{"id":"dryml","key":"dryml","value":{"rev":"33-483ff8cc3ab1431790cc2587c0bce989"}}, -{"id":"ds","key":"ds","value":{"rev":"9-743274a1d0143927851af07ff0f86d8d"}}, -{"id":"dt","key":"dt","value":{"rev":"3-ab59016f28e182c763b78ba49a59191c"}}, -{"id":"dtl","key":"dtl","value":{"rev":"11-415b4aeec93f096523569615e80f1be1"}}, -{"id":"dtrace-provider","key":"dtrace-provider","value":{"rev":"12-7f01510bd2b1d543f11e3dc02d98ab69"}}, -{"id":"dtrejo","key":"dtrejo","value":{"rev":"3-85f5bb2b9faec499e6aa77fe22e6e3ec"}}, -{"id":"dude","key":"dude","value":{"rev":"3-006528c1efd98312991273ba6ee45f7b"}}, -{"id":"dunce","key":"dunce","value":{"rev":"3-fa4fa5cafdfd1d86c650746f60b7bc0e"}}, -{"id":"duostack","key":"duostack","value":{"rev":"15-47824bdf6e32f49f64014e75421dc42e"}}, -{"id":"duplex-stream","key":"duplex-stream","value":{"rev":"3-2d0e12876e7ad4e5d3ea5520dcbad861"}}, -{"id":"durilka","key":"durilka","value":{"rev":"15-54400496515c8625e8bedf19f8a41cad"}}, -{"id":"dust","key":"dust","value":{"rev":"18-9bc9cae2e48c54f4389e9fce5dfc021e"}}, -{"id":"dustfs","key":"dustfs","value":{"rev":"5-944770c24f06989f3fc62427f2ddebc4"}}, -{"id":"dx","key":"dx","value":{"rev":"3-6000afd60be07d9ff91e7231a388f22f"}}, -{"id":"dynamic","key":"dynamic","value":{"rev":"3-33b83464ed56eb33c052a13dfb709c9c"}}, -{"id":"dynobj","key":"dynobj","value":{"rev":"5-3eb168dae1f9c20369fa1d5ae45f9021"}}, -{"id":"each","key":"each","value":{"rev":"3-5063799b0afcbb61378b1d605660a864"}}, -{"id":"ears","key":"ears","value":{"rev":"11-e77cd2b865409be7ba2e072e98b1c8a1"}}, -{"id":"easey","key":"easey","value":{"rev":"3-a380d8d945e03f55732ae8769cd6dbbf"}}, -{"id":"easy","key":"easy","value":{"rev":"3-73b836a34beafa31cdd8129fe158bf6e"}}, -{"id":"easy-oauth","key":"easy-oauth","value":{"rev":"5-2c1db698e61d77f99633042113099528"}}, -{"id":"easyfs","key":"easyfs","value":{"rev":"3-b807671a77c2a8cc27a9f1aa20ff74c0"}}, -{"id":"easyhash","key":"easyhash","value":{"rev":"3-2eeb24098bc4d201766dcc92dc7325f7"}}, -{"id":"easyrss","key":"easyrss","value":{"rev":"9-1687a54348670ef9ca387ea7ec87f0be"}}, -{"id":"ebnf-diagram","key":"ebnf-diagram","value":{"rev":"3-704e4605bf933b281a6821259a531055"}}, -{"id":"ec2","key":"ec2","value":{"rev":"22-25e562ae8898807c7b4c696c809cf387"}}, -{"id":"echo","key":"echo","value":{"rev":"19-75c2421f623ecc9fe2771f3658589ce8"}}, -{"id":"eco","key":"eco","value":{"rev":"14-b4db836928c91cbf22628cc65ca94f56"}}, -{"id":"ed","key":"ed","value":{"rev":"3-bed9b8225e83a02241d48254077a7df4"}}, -{"id":"edate","key":"edate","value":{"rev":"3-5ec1441ffe3b56d5d01561003b9844f2"}}, -{"id":"eden","key":"eden","value":{"rev":"35-9aa2ff880c2d4f45e3da881b15e58d0a"}}, -{"id":"eio","key":"eio","value":{"rev":"5-e6dd895635596d826ccdf4439761d5fa"}}, -{"id":"ejs","key":"ejs","value":{"rev":"30-c7b020b6cb8ee2626f47db21fc5fedb4"}}, -{"id":"ejs-ext","key":"ejs-ext","value":{"rev":"15-820393685191bbed37938acb7af5885e"}}, -{"id":"elastical","key":"elastical","value":{"rev":"3-c652af043bc4256a29a87e3de9b78093"}}, -{"id":"elasticsearchclient","key":"elasticsearchclient","value":{"rev":"33-bcb59deb7d9d56737a6946c56830ae6b"}}, -{"id":"elastiseahclient","key":"elastiseahclient","value":{"rev":"3-c4e525605859e249f04fb07d31739002"}}, -{"id":"elementtree","key":"elementtree","value":{"rev":"3-ef2017fe67ae425253de911c2f219d31"}}, -{"id":"elf-logger","key":"elf-logger","value":{"rev":"6-98d61588cfc171611568cf86004aa2e1"}}, -{"id":"elk","key":"elk","value":{"rev":"25-8b92241d0218c6593a7dc8a8cc69b7ce"}}, -{"id":"elucidata-build-tools","key":"elucidata-build-tools","value":{"rev":"7-0ad3de708aaac2eebfcfce273bfe6edf"}}, -{"id":"email","key":"email","value":{"rev":"16-110ae6a99ab3e37f4edd9357c03d78c2"}}, -{"id":"email-verificationtoken","key":"email-verificationtoken","value":{"rev":"7-ef37672bc6e9ee806ecc22fd5257ae03"}}, -{"id":"emailjs","key":"emailjs","value":{"rev":"31-0dd24f9aba8d96e9493e55e8345f3d21"}}, -{"id":"embedly","key":"embedly","value":{"rev":"21-47838d8015e9b927c56a7bd52c52e4fc"}}, -{"id":"emile","key":"emile","value":{"rev":"11-05d4715964b5bf2e1fd98096cb7ccc83"}}, -{"id":"emit.io","key":"emit.io","value":{"rev":"3-faacb1c30bb92c06a55a44bb027a9475"}}, -{"id":"emre","key":"emre","value":{"rev":"3-5686f4782f1f5171fff83b662ce68802"}}, -{"id":"encrypt","key":"encrypt","value":{"rev":"3-77e2e2007b452f7fcdfa9e8696a188f5"}}, -{"id":"ender","key":"ender","value":{"rev":"95-89b8c6ccfcaf3eb56f5dbe48bf3c2e24"}}, -{"id":"ender-dragdealer","key":"ender-dragdealer","value":{"rev":"9-e12bb3492614f20fe5781f20e3bb17dc"}}, -{"id":"ender-fermata","key":"ender-fermata","value":{"rev":"3-e52d772042852408ae070b361c247068"}}, -{"id":"ender-fittext","key":"ender-fittext","value":{"rev":"5-e46f5a384d790ea6f65a5f8b9e43bac6"}}, -{"id":"ender-flowplayer","key":"ender-flowplayer","value":{"rev":"3-87267072fb566112315254fdf6547500"}}, -{"id":"ender-js","key":"ender-js","value":{"rev":"80-aa18576f782e3aa14c2ba7ba05658a30"}}, -{"id":"ender-json","key":"ender-json","value":{"rev":"3-5606608389aef832e4d4ecaa6c088a94"}}, -{"id":"ender-lettering","key":"ender-lettering","value":{"rev":"3-6fc6ad3869fad6374a1de69ba4e9301d"}}, -{"id":"ender-modules","key":"ender-modules","value":{"rev":"5-2bbb354d6219b5e13e6c897c562b8c83"}}, -{"id":"ender-poke","key":"ender-poke","value":{"rev":"5-3afa2fd690ebc4f2d75125b2c57e2a43"}}, -{"id":"ender-test","key":"ender-test","value":{"rev":"5-f8e90a951e5ad58199e53645067fad0c"}}, -{"id":"ender-tipsy","key":"ender-tipsy","value":{"rev":"5-cefd04c5d89707dfe31023702328d417"}}, -{"id":"ender-tween","key":"ender-tween","value":{"rev":"13-035312bb47bb3d29e7157932d4d29dcb"}}, -{"id":"ender-vows","key":"ender-vows","value":{"rev":"5-d48e088816d71779a80a74c43cd61b80"}}, -{"id":"ender-wallet","key":"ender-wallet","value":{"rev":"21-93723cd24fbf14d0f58f2ee41df9910d"}}, -{"id":"endtable","key":"endtable","value":{"rev":"36-8febf1be0120d867f9ff90e5c5058ef9"}}, -{"id":"enhance-css","key":"enhance-css","value":{"rev":"7-ae1cf6dee7d3116103781edaa7d47ba4"}}, -{"id":"ensure","key":"ensure","value":{"rev":"27-47e0874d1823188965a02a41abb61739"}}, -{"id":"ent","key":"ent","value":{"rev":"9-51924cd76fabcc4a244db66d65d48eff"}}, -{"id":"entropy","key":"entropy","value":{"rev":"17-84bfbbc0689b3b55e4fa3881888f0c12"}}, -{"id":"enumerable","key":"enumerable","value":{"rev":"3-d31bfcaca3b53eacc9ce09983efffe35"}}, -{"id":"envious","key":"envious","value":{"rev":"3-08d1e6d9c25c4e2350a0dd6759a27426"}}, -{"id":"environ","key":"environ","value":{"rev":"5-6f78def4743dfbeb77c1cb62d41eb671"}}, -{"id":"epub","key":"epub","value":{"rev":"3-5c3604eab851bce0a6ac66db6a6ce77a"}}, -{"id":"erlang","key":"erlang","value":{"rev":"3-3bd8e8e8ed416a32567475d984028b65"}}, -{"id":"err","key":"err","value":{"rev":"11-61d11f26b47d29ef819136214830f24c"}}, -{"id":"errbacker","key":"errbacker","value":{"rev":"5-0ad6d62207abb9822118ae69d0b9181d"}}, -{"id":"es5","key":"es5","value":{"rev":"3-5497cb0c821f3e17234c09ab0e67e1de"}}, -{"id":"es5-basic","key":"es5-basic","value":{"rev":"9-2ff708ae54ae223923cb810f799bfb2d"}}, -{"id":"es5-ext","key":"es5-ext","value":{"rev":"21-04537d704412a631596beeba4d534b33"}}, -{"id":"es5-shim","key":"es5-shim","value":{"rev":"34-3c4c40a6dab9ff137d1a7d4349d72c5b"}}, -{"id":"es5-shimify","key":"es5-shimify","value":{"rev":"3-f85700407e9c129d22b45c15700c82f1"}}, -{"id":"esc","key":"esc","value":{"rev":"5-42911775f391330f361105b8a0cefe47"}}, -{"id":"escaperoute","key":"escaperoute","value":{"rev":"18-e1372f35e6dcdb353b8c11e3c7e2f3b4"}}, -{"id":"escort","key":"escort","value":{"rev":"27-bf43341e15d565c9f67dd3300dc57734"}}, -{"id":"escrito","key":"escrito","value":{"rev":"5-c39d5b373486327b2e13670f921a2c7b"}}, -{"id":"esl","key":"esl","value":{"rev":"9-562ff6239a3b9910989bdf04746fa9d1"}}, -{"id":"espresso","key":"espresso","value":{"rev":"75-4c3692f1e92ea841e2d04338f4f2432e"}}, -{"id":"esproxy","key":"esproxy","value":{"rev":"7-be629dc6e1428f0fdb22fdbe7ab2ee99"}}, -{"id":"etch-a-sketch","key":"etch-a-sketch","value":{"rev":"3-a4e23b8e9f298d4844d6bff0a9688e53"}}, -{"id":"etherpad-lite-client","key":"etherpad-lite-client","value":{"rev":"55-58ca439a697db64ee66652da2d327fcb"}}, -{"id":"etsy","key":"etsy","value":{"rev":"5-1b795b360c28261f11c07d849637047c"}}, -{"id":"eve","key":"eve","value":{"rev":"3-16e72b336a1f354f4dfc8fa783fa2e72"}}, -{"id":"event-emitter","key":"event-emitter","value":{"rev":"5-15fe3e2e19b206929b815909737b15ac"}}, -{"id":"event-queue","key":"event-queue","value":{"rev":"12-200cd3bcd8e0b35bc4b15c1d8b6161e2"}}, -{"id":"event-stream","key":"event-stream","value":{"rev":"15-811a6329b5820d998731a604accf83db"}}, -{"id":"eventable","key":"eventable","value":{"rev":"3-08e9cd94a9aae280f406d043039e545e"}}, -{"id":"eventbrite","key":"eventbrite","value":{"rev":"13-cac3c9bda2da1c7b115de04264bb440f"}}, -{"id":"evented","key":"evented","value":{"rev":"6-ade6271c40a19aab6c4e3bb18b0987b6"}}, -{"id":"evented-twitter","key":"evented-twitter","value":{"rev":"6-3ebb7327022d6d6a8c49d684febb236b"}}, -{"id":"eventedsocket","key":"eventedsocket","value":{"rev":"59-cd2158c47b676a58ca3064a42c5274f7"}}, -{"id":"eventemitter","key":"eventemitter","value":{"rev":"5-7766fd7ebc44d52efbd0e7088e2321ec"}}, -{"id":"eventemitter2","key":"eventemitter2","value":{"rev":"41-927ce7996d4056a21f543e1f928f9699"}}, -{"id":"eventful","key":"eventful","value":{"rev":"7-9505f3c621f50addf02a457cfcc8ae78"}}, -{"id":"eventhub","key":"eventhub","value":{"rev":"15-5390d210a4d3ba079dd6e26bda652caa"}}, -{"id":"eventpipe","key":"eventpipe","value":{"rev":"7-41f0f93a9dcea477f08782af28e5b0f1"}}, -{"id":"events","key":"events","value":{"rev":"12-e3ead8eac62799cb299c139687135289"}}, -{"id":"events.io","key":"events.io","value":{"rev":"3-56c6955024cbb1765a1f9f37d8a739a4"}}, -{"id":"events.node","key":"events.node","value":{"rev":"3-e072f9c457fd8a3882ccd41ce52c5d00"}}, -{"id":"eventstream","key":"eventstream","value":{"rev":"5-a578a3a2a62d50631b3fb4d44a058bd1"}}, -{"id":"eventvat","key":"eventvat","value":{"rev":"3-e26d7fe8a226c7bc7f9e55abf1630e9c"}}, -{"id":"everyauth","key":"everyauth","value":{"rev":"107-a621f3028a230f9f3ade6a4e729a9a38"}}, -{"id":"ewdDOM","key":"ewdDOM","value":{"rev":"7-28188ec27fe011bf7fcb330a5fc90b55"}}, -{"id":"ewdGateway","key":"ewdGateway","value":{"rev":"7-81fe5ec1a3e920894b560fbf96160258"}}, -{"id":"exceptional","key":"exceptional","value":{"rev":"5-5842d306b2cf084c4e7c2ecb1d715280"}}, -{"id":"exceptional-node","key":"exceptional-node","value":{"rev":"5-3385b42af0a6ea8a943cb686d5789b0c"}}, -{"id":"executor","key":"executor","value":{"rev":"3-aee4f949a4d140a439965e137200c4fb"}}, -{"id":"exif","key":"exif","value":{"rev":"3-da6fd2bd837633f673b325231c164a0f"}}, -{"id":"expanda","key":"expanda","value":{"rev":"3-dcbc59c5db0017d25748ec8094aeeb0a"}}, -{"id":"express","key":"express","value":{"rev":"157-24ef0cdd4ba6c6697c66f3e78bc777bb"}}, -{"id":"express-aid","key":"express-aid","value":{"rev":"21-6d3831e93b823f800e6a22eb08aa41d6"}}, -{"id":"express-app-bootstrap","key":"express-app-bootstrap","value":{"rev":"3-4b5a256bef5ca3bd41b0958f594907b9"}}, -{"id":"express-asset","key":"express-asset","value":{"rev":"3-7d5e23bc753851c576e429e7901301d9"}}, -{"id":"express-blocks","key":"express-blocks","value":{"rev":"7-305b6e046355c8e7a4bb0f1f225092ef"}}, -{"id":"express-cache","key":"express-cache","value":{"rev":"5-eebbea6c0e5db5fd4c12847933c853e1"}}, -{"id":"express-chromeframe","key":"express-chromeframe","value":{"rev":"5-1bb72d30b7a1f00d3eaf248285942d5e"}}, -{"id":"express-coffee","key":"express-coffee","value":{"rev":"39-14eff195c9352c6c3898befb3d613807"}}, -{"id":"express-config","key":"express-config","value":{"rev":"3-27ea0d27e20afa9ece375878aab846ed"}}, -{"id":"express-configure","key":"express-configure","value":{"rev":"7-46bd636c0b56dfcfa4f1ee46b43d6ca0"}}, -{"id":"express-contrib","key":"express-contrib","value":{"rev":"20-472c93fefe0a9a6440a76b2c843b2e0e"}}, -{"id":"express-controllers","key":"express-controllers","value":{"rev":"3-296d54f3b5bf26bfa057cd8c5f0a11ea"}}, -{"id":"express-controllers-new","key":"express-controllers-new","value":{"rev":"15-11f73e4a8ab935987a3b8f132d80afa5"}}, -{"id":"express-cross-site","key":"express-cross-site","value":{"rev":"11-b76814fdd58a616b3cafe6e97f3c7c98"}}, -{"id":"express-csrf","key":"express-csrf","value":{"rev":"20-2a79f0fdc65ed91120e7417a5cf8ce6c"}}, -{"id":"express-custom-errors","key":"express-custom-errors","value":{"rev":"6-bd131169ccac73fa3766195147e34404"}}, -{"id":"express-dialect","key":"express-dialect","value":{"rev":"34-1fbc5baf7ea464abbadcfaf3c1971660"}}, -{"id":"express-dust","key":"express-dust","value":{"rev":"5-33a1d8dd9c113d6fb8f1818c8a749c1b"}}, -{"id":"express-expose","key":"express-expose","value":{"rev":"7-f8757d8bf8d3fac8395ee8ce5117a895"}}, -{"id":"express-extras","key":"express-extras","value":{"rev":"6-53c7bfc68a41043eb5e11321673a2c48"}}, -{"id":"express-form","key":"express-form","value":{"rev":"27-533598a1bd5a0e9b8d694f5b38228c6c"}}, -{"id":"express-helpers","key":"express-helpers","value":{"rev":"3-7b9123b0ea6b840bb5a6e4da9c28308c"}}, -{"id":"express-livejade","key":"express-livejade","value":{"rev":"9-1320996d4ed3db352a2c853226880a17"}}, -{"id":"express-logger","key":"express-logger","value":{"rev":"5-c485b1020742310a313cac87abdde67b"}}, -{"id":"express-messages","key":"express-messages","value":{"rev":"5-f6225b906d0ac33ba1bfc5409b227edb"}}, -{"id":"express-messages-bootstrap","key":"express-messages-bootstrap","value":{"rev":"5-fb8fc70c1cbd6df0e07b2e0148bdf8bf"}}, -{"id":"express-mongoose","key":"express-mongoose","value":{"rev":"29-2d6907a23c8c3bbfdf9b6f9b6b3c00e3"}}, -{"id":"express-mvc-bootstrap","key":"express-mvc-bootstrap","value":{"rev":"15-c53ecb696af1d34ff94efe5ab5d89287"}}, -{"id":"express-namespace","key":"express-namespace","value":{"rev":"7-d209feb707821b06426aed233295df75"}}, -{"id":"express-on-railway","key":"express-on-railway","value":{"rev":"7-784b533cbf29930d04039bafb2c03cc0"}}, -{"id":"express-params","key":"express-params","value":{"rev":"3-13f0ed9c17d10fd01d1ff869e625c91f"}}, -{"id":"express-resource","key":"express-resource","value":{"rev":"13-cca556327152588a87112c6bf2613bc9"}}, -{"id":"express-rewrite","key":"express-rewrite","value":{"rev":"7-c76ca2616eb6e70209ace6499f5b961a"}}, -{"id":"express-route-util","key":"express-route-util","value":{"rev":"9-4b7bad7e8ab3bf71daf85362b47ec8be"}}, -{"id":"express-rpx","key":"express-rpx","value":{"rev":"9-54d48f5e24174500c73f07d97a7d3f9f"}}, -{"id":"express-session-mongo","key":"express-session-mongo","value":{"rev":"3-850cf5b42f65a6f27af6edf1ad1aa966"}}, -{"id":"express-session-mongo-russp","key":"express-session-mongo-russp","value":{"rev":"7-441e8afcd466a4cbb5e65a1949190f97"}}, -{"id":"express-session-redis","key":"express-session-redis","value":{"rev":"6-5f4f16092a0706d2daef89470d6971e6"}}, -{"id":"express-share","key":"express-share","value":{"rev":"5-f5327a97738e9c8e6e05a51cb7153f82"}}, -{"id":"express-spdy","key":"express-spdy","value":{"rev":"11-2634f388338c45b2d6f020d2a6739ba1"}}, -{"id":"express-template-override","key":"express-template-override","value":{"rev":"5-758cf2eb0c9cbc32f205c4ba2ece24f9"}}, -{"id":"express-trace","key":"express-trace","value":{"rev":"5-ba59571f8881e02e2b297ed9ffb4e48c"}}, -{"id":"express-unstable","key":"express-unstable","value":{"rev":"3-06467336e1610ba9915401df26c936c1"}}, -{"id":"express-validate","key":"express-validate","value":{"rev":"15-b63bd9b18fadfc2345d0a10a7a2fb2e7"}}, -{"id":"express-view-helpers","key":"express-view-helpers","value":{"rev":"7-4d07ba11f81788783c6f9fd48fdf8834"}}, -{"id":"express-with-ease","key":"express-with-ease","value":{"rev":"3-604d9176a4a03f9f7c74679604c7bbf9"}}, -{"id":"express-wormhole","key":"express-wormhole","value":{"rev":"3-7e06cf63b070e0f54b2aa71b48db9a40"}}, -{"id":"expresso","key":"expresso","value":{"rev":"79-a27b6ef2f9e7bb9f85da34f728d124a8"}}, -{"id":"expressobdd","key":"expressobdd","value":{"rev":"5-e8cae7a17a9e8c1779c08abedc674e03"}}, -{"id":"ext","key":"ext","value":{"rev":"6-8790c06324c5f057b1713ba420e8bf27"}}, -{"id":"extend","key":"extend","value":{"rev":"3-934d0de77bbaefb1b52ec18a17f46d7d"}}, -{"id":"extendables","key":"extendables","value":{"rev":"11-e4db9b62a4047e95fb4d7f88e351a14e"}}, -{"id":"extjs-node","key":"extjs-node","value":{"rev":"3-2b2033dbbf0b99d41e876498886b0995"}}, -{"id":"extractcontent","key":"extractcontent","value":{"rev":"6-ad70764c834ecd3414cbc15dbda317c3"}}, -{"id":"extractor","key":"extractor","value":{"rev":"9-f95bde04bb8db37350c9cc95c5578c03"}}, -{"id":"extx-layout","key":"extx-layout","value":{"rev":"3-f6bbc3a923ebce17f62cbf382b096ac7"}}, -{"id":"extx-reference-slot","key":"extx-reference-slot","value":{"rev":"14-b1b92573492f7239144693ee9e1d1aac"}}, -{"id":"extx-shotenjin","key":"extx-shotenjin","value":{"rev":"5-c641121ba57fb960d8db766511ecf6cd"}}, -{"id":"eyes","key":"eyes","value":{"rev":"16-fab6b201646fb12986e396c33a7cd428"}}, -{"id":"f","key":"f","value":{"rev":"3-23b73ffafbe5b56b6a0736db6a7256a6"}}, -{"id":"f-core","key":"f-core","value":{"rev":"3-9a6898e007acf48d956f0a70ff07a273"}}, -{"id":"f7u12rl","key":"f7u12rl","value":{"rev":"3-7b5e15d106db8b7f8784b27f7d2c9bdc"}}, -{"id":"fab","key":"fab","value":{"rev":"10-149dec0b653ce481af013c63fec125e8"}}, -{"id":"fab.accept","key":"fab.accept","value":{"rev":"6-d6b08e7054d823906c6c64c92b008d3a"}}, -{"id":"fab.static","key":"fab.static","value":{"rev":"6-5bdb6db53223bb5203ba91a5b2b87566"}}, -{"id":"fabric","key":"fabric","value":{"rev":"15-30e99e486c58962c049bea54e00b7cb9"}}, -{"id":"face-detect","key":"face-detect","value":{"rev":"3-d4d3f1a894c807f79ba541d2f2ed630d"}}, -{"id":"facebook","key":"facebook","value":{"rev":"17-e241999000e34aed62ee0f9f358bfd06"}}, -{"id":"facebook-api","key":"facebook-api","value":{"rev":"5-cb9d07b2eba18d8fb960768d69f80326"}}, -{"id":"facebook-client","key":"facebook-client","value":{"rev":"17-84c106420b183ca791b0c80fd8c3fe00"}}, -{"id":"facebook-connect","key":"facebook-connect","value":{"rev":"6-471f28bb12928e32610d02c0b03aa972"}}, -{"id":"facebook-express","key":"facebook-express","value":{"rev":"11-6e6d98b8252907b05c41aac7e0418f4e"}}, -{"id":"facebook-graph","key":"facebook-graph","value":{"rev":"9-c92149825fef42ad76bcffdd232cc9a5"}}, -{"id":"facebook-graph-client","key":"facebook-graph-client","value":{"rev":"10-c3136a2b2e5c5d80b78404a4102af7b5"}}, -{"id":"facebook-js","key":"facebook-js","value":{"rev":"22-dd9d916550ebccb71e451acbd7a4b315"}}, -{"id":"facebook-realtime-graph","key":"facebook-realtime-graph","value":{"rev":"6-c4fe01ac036585394cd59f01c6fc7df1"}}, -{"id":"facebook-sdk","key":"facebook-sdk","value":{"rev":"21-77daf7eba51bb913e54381995718e13d"}}, -{"id":"facebook-session-cookie","key":"facebook-session-cookie","value":{"rev":"9-70e14cac759dacadacb0af17387ab230"}}, -{"id":"facebook-signed-request","key":"facebook-signed-request","value":{"rev":"5-11cb36123a94e37fff6a7efd6f7d88b9"}}, -{"id":"facebook.node","key":"facebook.node","value":{"rev":"3-f6760795e71c1d5734ae34f9288d02be"}}, -{"id":"factory-worker","key":"factory-worker","value":{"rev":"7-1c365b3dd92b12573d00c08b090e01ae"}}, -{"id":"fake","key":"fake","value":{"rev":"25-2d1ae2299168d95edb8d115fb7961c8e"}}, -{"id":"fake-queue","key":"fake-queue","value":{"rev":"7-d6970de6141c1345c6ad3cd1586cfe7b"}}, -{"id":"fakedb","key":"fakedb","value":{"rev":"34-889fb5c9fa328b536f9deb138ff125b1"}}, -{"id":"fakeweb","key":"fakeweb","value":{"rev":"3-7fb1394b4bac70f9ab26e60b1864b41f"}}, -{"id":"fanfeedr","key":"fanfeedr","value":{"rev":"22-de3d485ad60c8642eda260afe5620973"}}, -{"id":"fantomex","key":"fantomex","value":{"rev":"3-79b26bcf9aa365485ed8131c474bf6f8"}}, -{"id":"far","key":"far","value":{"rev":"19-c8d9f1e8bc12a31cb27bef3ed44759ce"}}, -{"id":"farm","key":"farm","value":{"rev":"31-ab77f7f48b24bf6f0388b926d2ac370b"}}, -{"id":"fast-detective","key":"fast-detective","value":{"rev":"5-b0b6c8901458f3f07044d4266db0aa52"}}, -{"id":"fast-msgpack-rpc","key":"fast-msgpack-rpc","value":{"rev":"7-b2dfd3d331459382fe1e8166288ffef6"}}, -{"id":"fast-or-slow","key":"fast-or-slow","value":{"rev":"13-4118190cd6a0185af8ea9b381ee2bc98"}}, -{"id":"fast-stats","key":"fast-stats","value":{"rev":"3-15cdd56d9efa38f08ff20ca731867d4d"}}, -{"id":"fastcgi-stream","key":"fastcgi-stream","value":{"rev":"5-99c0c4dfc7a874e1af71e5ef3ac95ba4"}}, -{"id":"faye","key":"faye","value":{"rev":"30-49b7d05534c35527972a4d5e07ac8895"}}, -{"id":"faye-service","key":"faye-service","value":{"rev":"3-bad8bf6722461627eac7d0141e09b3f7"}}, -{"id":"fe-fu","key":"fe-fu","value":{"rev":"21-f3cb04870621ce40da8ffa009686bdeb"}}, -{"id":"feed-tables","key":"feed-tables","value":{"rev":"9-4410bad138f4df570e7be37bb17209b3"}}, -{"id":"feedBum","key":"feedBum","value":{"rev":"3-b4ff9edffb0c5c33c4ed40f60a12611a"}}, -{"id":"feedparser","key":"feedparser","value":{"rev":"5-eb2c32e00832ed7036eb1b87d2eea33e"}}, -{"id":"feral","key":"feral","value":{"rev":"19-0b512b6301a26ca5502710254bd5a9ba"}}, -{"id":"fermata","key":"fermata","value":{"rev":"25-eeafa3e5b769a38b8a1065c0a66e0653"}}, -{"id":"ferret","key":"ferret","value":{"rev":"9-7ab6b29cb0cad9855d927855c2a27bff"}}, -{"id":"ffmpeg-node","key":"ffmpeg-node","value":{"rev":"3-e55011ecb147f599475a12b10724a583"}}, -{"id":"ffmpeg2theora","key":"ffmpeg2theora","value":{"rev":"13-05d2f83dbbb90e832176ebb7fdc2ae2e"}}, -{"id":"fiberize","key":"fiberize","value":{"rev":"5-dfb978d6b88db702f68a13e363fb21af"}}, -{"id":"fibers","key":"fibers","value":{"rev":"71-4b22dbb449839723ed9b0d533339c764"}}, -{"id":"fibers-promise","key":"fibers-promise","value":{"rev":"9-3a9977528f8df079969d4ae48db7a0a7"}}, -{"id":"fidel","key":"fidel","value":{"rev":"37-370838ed9984cfe6807114b5fef789e6"}}, -{"id":"fig","key":"fig","value":{"rev":"7-24acf90e7d06dc8b83adb02b5776de3c"}}, -{"id":"file","key":"file","value":{"rev":"6-1131008db6855f20969413be7cc2e968"}}, -{"id":"file-api","key":"file-api","value":{"rev":"9-a9cc8f3de14eef5bba86a80f6705651c"}}, -{"id":"fileify","key":"fileify","value":{"rev":"17-50603c037d5e3a0a405ff4af3e71211f"}}, -{"id":"filepad","key":"filepad","value":{"rev":"23-8c4b2c04151723033523369c42144cc9"}}, -{"id":"filerepl","key":"filerepl","value":{"rev":"5-94999cc91621e08f96ded7423ed6d6f0"}}, -{"id":"fileset","key":"fileset","value":{"rev":"3-ea6a9f45aaa5e65279463041ee629dbe"}}, -{"id":"filestore","key":"filestore","value":{"rev":"9-6cce7c9cd2b2b11d12905885933ad25a"}}, -{"id":"filesystem-composer","key":"filesystem-composer","value":{"rev":"34-f1d04d711909f3683c1d00cd4ab7ca47"}}, -{"id":"fileutils","key":"fileutils","value":{"rev":"3-88876b61c9d0a915f95ce0f258e5ce51"}}, -{"id":"filter","key":"filter","value":{"rev":"3-4032087a5cf2de3dd164c95454a2ab05"}}, -{"id":"filter-chain","key":"filter-chain","value":{"rev":"5-c522429dc83ccc7dde4eaf5409070332"}}, -{"id":"fin","key":"fin","value":{"rev":"23-77cf12e84eb62958b40aa08fdcbb259d"}}, -{"id":"fin-id","key":"fin-id","value":{"rev":"3-9f85ee1e426d4bdad5904002a6d9342c"}}, -{"id":"finance","key":"finance","value":{"rev":"3-cf97ddb6af3f6601bfb1e49a600f56af"}}, -{"id":"finder","key":"finder","value":{"rev":"13-65767fe51799a397ddd9b348ead12ed2"}}, -{"id":"findit","key":"findit","value":{"rev":"15-435e4168208548a2853f6efcd4529de3"}}, -{"id":"fingerprint","key":"fingerprint","value":{"rev":"3-c40e2169260010cac472e688c392ea3d"}}, -{"id":"finjector","key":"finjector","value":{"rev":"5-646da199b0b336d20e421ef6ad613e90"}}, -{"id":"firebird","key":"firebird","value":{"rev":"5-7e7ec03bc00e562f5f7afc7cad76da77"}}, -{"id":"firmata","key":"firmata","value":{"rev":"20-f3cbde43ce2677a208bcf3599af5b670"}}, -{"id":"first","key":"first","value":{"rev":"3-c647f6fc1353a1c7b49f5e6cd1905b1e"}}, -{"id":"fishback","key":"fishback","value":{"rev":"19-27a0fdc8c3abe4d61fff9c7a098f3fd9"}}, -{"id":"fitbit-js","key":"fitbit-js","value":{"rev":"3-62fe0869ddefd2949d8c1e568f994c93"}}, -{"id":"fix","key":"fix","value":{"rev":"17-4a79db9924922da010df71e5194bcac6"}}, -{"id":"flagpoll","key":"flagpoll","value":{"rev":"3-0eb7b98e2a0061233aa5228eb7348dff"}}, -{"id":"flags","key":"flags","value":{"rev":"3-594f0ec2e903ac74556d1c1f7c6cca3b"}}, -{"id":"flexcache","key":"flexcache","value":{"rev":"11-e1e4eeaa0793d95056a857bec04282ae"}}, -{"id":"flickr-conduit","key":"flickr-conduit","value":{"rev":"7-d3b2b610171589db68809c3ec3bf2bcb"}}, -{"id":"flickr-js","key":"flickr-js","value":{"rev":"5-66c8e8a00ad0a906f632ff99cf490163"}}, -{"id":"flickr-reflection","key":"flickr-reflection","value":{"rev":"6-3c34c3ac904b6d6f26182807fbb95c5e"}}, -{"id":"flo","key":"flo","value":{"rev":"3-ce440035f0ec9a10575b1c8fab0c77da"}}, -{"id":"flow","key":"flow","value":{"rev":"6-95841a07c96f664d49d1af35373b3dbc"}}, -{"id":"flowcontrol","key":"flowcontrol","value":{"rev":"3-093bbbc7496072d9ecb136a826680366"}}, -{"id":"flowjs","key":"flowjs","value":{"rev":"3-403fc9e107ec70fe06236c27e70451c7"}}, -{"id":"fluent-ffmpeg","key":"fluent-ffmpeg","value":{"rev":"33-5982779d5f55a5915f0f8b0353f1fe2a"}}, -{"id":"flume-rpc","key":"flume-rpc","value":{"rev":"7-4214a2db407a3e64f036facbdd34df91"}}, -{"id":"flux","key":"flux","value":{"rev":"3-1ad83106af7ee83547c797246bd2c8b1"}}, -{"id":"fly","key":"fly","value":{"rev":"9-0a45b1b97f56ba0faf4af4777b473fad"}}, -{"id":"fn","key":"fn","value":{"rev":"5-110bab5d623b3628e413d972e040ed26"}}, -{"id":"fnProxy","key":"fnProxy","value":{"rev":"3-db1c90e5a06992ed290c679ac6dbff6a"}}, -{"id":"follow","key":"follow","value":{"rev":"3-44256c802b4576fcbae1264e9b824e6a"}}, -{"id":"fomatto","key":"fomatto","value":{"rev":"7-31ce5c9eba7f084ccab2dc5994796f2d"}}, -{"id":"foounit","key":"foounit","value":{"rev":"20-caf9cd90d6c94d19be0b3a9c9cb33ee0"}}, -{"id":"forEachAsync","key":"forEachAsync","value":{"rev":"3-d9cd8021ea9d5014583327752a9d01c4"}}, -{"id":"forever","key":"forever","value":{"rev":"99-90060d5d1754b1bf749e5278a2a4516b"}}, -{"id":"forge","key":"forge","value":{"rev":"9-0d9d59fd2d47a804e600aaef538ebbbf"}}, -{"id":"fork","key":"fork","value":{"rev":"13-f355105e07608de5ae2f3e7c0817af52"}}, -{"id":"forker","key":"forker","value":{"rev":"11-9717e2e3fa60b46df08261d936d9e5d7"}}, -{"id":"form-data","key":"form-data","value":{"rev":"3-5750e73f7a0902ec2fafee1db6d2e6f6"}}, -{"id":"form-validator","key":"form-validator","value":{"rev":"25-7d016b35895dc58ffd0bbe54fd9be241"}}, -{"id":"form2json","key":"form2json","value":{"rev":"8-7501dd9b43b9fbb7194b94e647816e5e"}}, -{"id":"formaline","key":"formaline","value":{"rev":"3-2d45fbb3e83b7e77bde0456607e6f1e3"}}, -{"id":"format","key":"format","value":{"rev":"7-5dddc67c10de521ef06a7a07bb3f7e2e"}}, -{"id":"formatdate","key":"formatdate","value":{"rev":"3-6d522e3196fe3b438fcc4aed0f7cf690"}}, -{"id":"formidable","key":"formidable","value":{"rev":"87-d27408b00793fee36f6632a895372590"}}, -{"id":"forms","key":"forms","value":{"rev":"6-253e032f07979b79c2e7dfa01be085dc"}}, -{"id":"forrst","key":"forrst","value":{"rev":"3-ef553ff1b6383bab0f81f062cdebac53"}}, -{"id":"fortumo","key":"fortumo","value":{"rev":"6-def3d146b29b6104019c513ce20bb61f"}}, -{"id":"foss-credits","key":"foss-credits","value":{"rev":"3-c824326e289e093406b2de4efef70cb7"}}, -{"id":"foss-credits-collection","key":"foss-credits-collection","value":{"rev":"17-de4ffca51768a36c8fb1b9c2bc66c80f"}}, -{"id":"foursquareonnode","key":"foursquareonnode","value":{"rev":"5-a4f0a1ed5d3be3056f10f0e9517efa83"}}, -{"id":"fraggle","key":"fraggle","value":{"rev":"7-b9383baf96bcdbd4022b4b887e4a3729"}}, -{"id":"framework","key":"framework","value":{"rev":"3-afb19a9598a0d50320b4f1faab1ae2c6"}}, -{"id":"frameworkjs","key":"frameworkjs","value":{"rev":"7-cd418da3272c1e8349126e442ed15dbd"}}, -{"id":"frank","key":"frank","value":{"rev":"12-98031fb56f1c89dfc7888f5d8ca7f0a9"}}, -{"id":"freakset","key":"freakset","value":{"rev":"21-ba60d0840bfa3da2c8713c3c2e6856a0"}}, -{"id":"freckle","key":"freckle","value":{"rev":"3-8e2e9a07b2650fbbd0a598b948ef993b"}}, -{"id":"freebase","key":"freebase","value":{"rev":"7-a1daf1cc2259b886f574f5c902eebcf4"}}, -{"id":"freecontrol","key":"freecontrol","value":{"rev":"6-7a51776b8764f406573d5192bab36adf"}}, -{"id":"freestyle","key":"freestyle","value":{"rev":"9-100f9e9d3504d6e1c6a2d47651c70f51"}}, -{"id":"frenchpress","key":"frenchpress","value":{"rev":"9-306d6ac21837879b8040d7f9aa69fc20"}}, -{"id":"fs-boot","key":"fs-boot","value":{"rev":"20-72b44b403767aa486bf1dc987c750733"}}, -{"id":"fs-ext","key":"fs-ext","value":{"rev":"10-3360831c3852590a762f8f82525c025e"}}, -{"id":"fsevents","key":"fsevents","value":{"rev":"6-bb994f41842e144cf43249fdf6bf51e1"}}, -{"id":"fsext","key":"fsext","value":{"rev":"9-a1507d84e91ddf26ffaa76016253b4fe"}}, -{"id":"fsh","key":"fsh","value":{"rev":"5-1e3784b2df1c1a28b81f27907945f48b"}}, -{"id":"fsm","key":"fsm","value":{"rev":"5-b113be7b30b2a2c9089edcb6fa4c15d3"}}, -{"id":"fswatch","key":"fswatch","value":{"rev":"11-287eea565c9562161eb8969d765bb191"}}, -{"id":"ftp","key":"ftp","value":{"rev":"5-751e312520c29e76f7d79c648248c56c"}}, -{"id":"ftp-get","key":"ftp-get","value":{"rev":"27-1e908bd075a0743dbb1d30eff06485e2"}}, -{"id":"fugue","key":"fugue","value":{"rev":"81-0c08e67e8deb4b5b677fe19f8362dbd8"}}, -{"id":"fullauto","key":"fullauto","value":{"rev":"9-ef915156026dabded5a4a76c5a751916"}}, -{"id":"fun","key":"fun","value":{"rev":"12-8396e3583e206dbf90bbea4316976f66"}}, -{"id":"functional","key":"functional","value":{"rev":"5-955979028270f5d3749bdf86b4d2c925"}}, -{"id":"functools","key":"functools","value":{"rev":"5-42ba84ce365bf8c0aaf3e5e6c369920b"}}, -{"id":"funk","key":"funk","value":{"rev":"14-67440a9b2118d8f44358bf3b17590243"}}, -{"id":"fusion","key":"fusion","value":{"rev":"19-64983fc6e5496c836be26e5fbc8527d1"}}, -{"id":"fusker","key":"fusker","value":{"rev":"48-58f05561c65ad288a78fa7210f146ba1"}}, -{"id":"future","key":"future","value":{"rev":"3-0ca60d8ae330e40ef6cf8c17a421d668"}}, -{"id":"futures","key":"futures","value":{"rev":"44-8a2aaf0f40cf84c9475824d9cec006ad"}}, -{"id":"fuzzy_file_finder","key":"fuzzy_file_finder","value":{"rev":"8-ee555aae1d433e60166d2af1d72ac6b9"}}, -{"id":"fuzzylogic","key":"fuzzylogic","value":{"rev":"8-596a8f4744d1dabcb8eb6466d9980fca"}}, -{"id":"fxs","key":"fxs","value":{"rev":"3-d3cb81151b0ddd9a4a5934fb63ffff75"}}, -{"id":"g","key":"g","value":{"rev":"3-55742a045425a9b4c9fe0e8925fad048"}}, -{"id":"g.raphael","key":"g.raphael","value":{"rev":"4-190d0235dc08f783dda77b3ecb60b11a"}}, -{"id":"ga","key":"ga","value":{"rev":"3-c47d516ac5e6de8ef7ef9d16fabcf6c7"}}, -{"id":"galletita","key":"galletita","value":{"rev":"3-aa7a01c3362a01794f36e7aa9664b850"}}, -{"id":"game","key":"game","value":{"rev":"3-0f1539e4717a2780205d98ef6ec0886d"}}, -{"id":"gamina","key":"gamina","value":{"rev":"15-871f4970f1e87b7c8ad361456001c76f"}}, -{"id":"gang-bang","key":"gang-bang","value":{"rev":"6-f565cb7027a8ca109481df49a6d41114"}}, -{"id":"gapserver","key":"gapserver","value":{"rev":"9-b25eb0eefc21e407cba596a0946cb3a0"}}, -{"id":"garbage","key":"garbage","value":{"rev":"3-80f4097d5f1f2c75f509430a11c8a15e"}}, -{"id":"gaseous","key":"gaseous","value":{"rev":"3-8021582ab9dde42d235193e6067be72d"}}, -{"id":"gaudium","key":"gaudium","value":{"rev":"11-7d612f1c5d921180ccf1c162fe2c7446"}}, -{"id":"gauss","key":"gauss","value":{"rev":"3-8fd18b2d7a223372f190797e4270a535"}}, -{"id":"gcli","key":"gcli","value":{"rev":"3-210404347cc643e924cec678d0195099"}}, -{"id":"gcw2html","key":"gcw2html","value":{"rev":"3-2aff7bff7981f2f9800c5f65812aa0a6"}}, -{"id":"gd","key":"gd","value":{"rev":"4-ac5a662e709a2993ed1fd1cbf7c4d7b4"}}, -{"id":"gdata","key":"gdata","value":{"rev":"3-c6b3a95064a1e1e0bb74f248ab4e73c4"}}, -{"id":"gdata-js","key":"gdata-js","value":{"rev":"17-0959500a4000d7058d8116af1e01b0d9"}}, -{"id":"gearman","key":"gearman","value":{"rev":"8-ac9fb7af75421ca2988d6098dbfd4c7c"}}, -{"id":"gearnode","key":"gearnode","value":{"rev":"7-8e40ec257984e887e2ff5948a6dde04e"}}, -{"id":"geck","key":"geck","value":{"rev":"161-c8117106ef58a6d7d21920df80159eab"}}, -{"id":"geddy","key":"geddy","value":{"rev":"13-da16f903aca1ec1f47086fa250b58abb"}}, -{"id":"gen","key":"gen","value":{"rev":"3-849005c8b8294c2a811ff4eccdedf436"}}, -{"id":"generic-function","key":"generic-function","value":{"rev":"5-dc046f58f96119225efb17ea5334a60f"}}, -{"id":"generic-pool","key":"generic-pool","value":{"rev":"18-65ff988620293fe7ffbd0891745c3ded"}}, -{"id":"genji","key":"genji","value":{"rev":"49-4c72bcaa57572ad0d43a1b7e9e5a963a"}}, -{"id":"genstatic","key":"genstatic","value":{"rev":"19-4278d0766226af4db924bb0f6b127699"}}, -{"id":"gently","key":"gently","value":{"rev":"24-c9a3ba6b6fd183ee1b5dda569122e978"}}, -{"id":"genx","key":"genx","value":{"rev":"7-f0c0ff65e08e045e8dd1bfcb25ca48d4"}}, -{"id":"geo","key":"geo","value":{"rev":"7-fa2a79f7260b849c277735503a8622e9"}}, -{"id":"geo-distance","key":"geo-distance","value":{"rev":"7-819a30e9b4776e4416fe9510ca79cd93"}}, -{"id":"geocoder","key":"geocoder","value":{"rev":"15-736e627571ad8dba3a9d0da1ae019c35"}}, -{"id":"geohash","key":"geohash","value":{"rev":"6-b9e62c804abe565425a8e6a01354407a"}}, -{"id":"geoip","key":"geoip","value":{"rev":"231-e5aa7acd5fb44833a67f96476b4fac49"}}, -{"id":"geoip-lite","key":"geoip-lite","value":{"rev":"9-efd916135c056406ede1ad0fe15534fa"}}, -{"id":"geojs","key":"geojs","value":{"rev":"35-b0f97b7c72397d6eb714602dc1121183"}}, -{"id":"geolib","key":"geolib","value":{"rev":"3-923a8622d1bd97c22f71ed6537ba5062"}}, -{"id":"geonode","key":"geonode","value":{"rev":"35-c2060653af72123f2f9994fca1c86d70"}}, -{"id":"geoutils","key":"geoutils","value":{"rev":"6-2df101fcbb01849533b2fbc80dc0eb7a"}}, -{"id":"gerbil","key":"gerbil","value":{"rev":"3-b5961044bda490a34085ca826aeb3022"}}, -{"id":"gerenuk","key":"gerenuk","value":{"rev":"13-4e45a640bcbadc3112e105ec5b60b907"}}, -{"id":"get","key":"get","value":{"rev":"18-dd215d673f19bbd8b321a7dd63e004e8"}}, -{"id":"getopt","key":"getopt","value":{"rev":"3-454354e4557d5e7205410acc95c9baae"}}, -{"id":"getrusage","key":"getrusage","value":{"rev":"8-d6ef24793b8e4c46f3cdd14937cbabe1"}}, -{"id":"gettext","key":"gettext","value":{"rev":"3-4c12268a4cab64ec4ef3ac8c9ec7912b"}}, -{"id":"getz","key":"getz","value":{"rev":"9-f3f43934139c9af6ddfb8b91e9a121ba"}}, -{"id":"gevorg.me","key":"gevorg.me","value":{"rev":"33-700502b8ca7041bf8d29368069cac365"}}, -{"id":"gex","key":"gex","value":{"rev":"3-105824d7a3f9c2ac7313f284c3f81d22"}}, -{"id":"gexode","key":"gexode","value":{"rev":"3-4a3552eae4ff3ba4443f9371a1ab4b2e"}}, -{"id":"gfx","key":"gfx","value":{"rev":"8-1f6c90bc3819c3b237e8d1f28ad1b136"}}, -{"id":"gherkin","key":"gherkin","value":{"rev":"77-6e835c8107bb4c7c8ad1fa072ac12c20"}}, -{"id":"ghm","key":"ghm","value":{"rev":"3-c440ae39832a575087ff1920b33c275b"}}, -{"id":"gif","key":"gif","value":{"rev":"14-e65638621d05b99ffe71b18097f29134"}}, -{"id":"gimme","key":"gimme","value":{"rev":"7-caab8354fe257fc307f8597e34ede547"}}, -{"id":"gist","key":"gist","value":{"rev":"11-eea7ea1adf3cde3a0804d2e1b0d6f7d6"}}, -{"id":"gista","key":"gista","value":{"rev":"23-48b8c374cfb8fc4e8310f3469cead6d5"}}, -{"id":"gisty","key":"gisty","value":{"rev":"5-1a898d0816f4129ab9a0d3f03ff9feb4"}}, -{"id":"git","key":"git","value":{"rev":"39-1f77df3ebeec9aae47ae8df56de6757f"}}, -{"id":"git-fs","key":"git-fs","value":{"rev":"14-7d365cddff5029a9d11fa8778a7296d2"}}, -{"id":"gitProvider","key":"gitProvider","value":{"rev":"9-c704ae702ef27bb57c0efd279a464e28"}}, -{"id":"github","key":"github","value":{"rev":"16-9345138ca7507c12be4a817b1abfeef6"}}, -{"id":"github-flavored-markdown","key":"github-flavored-markdown","value":{"rev":"3-f12043eb2969aff51db742b13d329446"}}, -{"id":"gitteh","key":"gitteh","value":{"rev":"39-88b00491fd4ce3294b8cdf61b9708383"}}, -{"id":"gitter","key":"gitter","value":{"rev":"16-88d7ef1ab6a7e751ca2cf6b50894deb4"}}, -{"id":"gittyup","key":"gittyup","value":{"rev":"37-ed6030c1acdd8b989ac34cd10d6dfd1e"}}, -{"id":"gitweb","key":"gitweb","value":{"rev":"9-5331e94c6df9ee7724cde3738a0c6230"}}, -{"id":"gitwiki","key":"gitwiki","value":{"rev":"9-0f167a3a87bce7f3e941136a06e91810"}}, -{"id":"gizmo","key":"gizmo","value":{"rev":"5-1da4da8d66690457c0bf743473b755f6"}}, -{"id":"gleak","key":"gleak","value":{"rev":"17-d44a968b32e4fdc7d27bacb146391422"}}, -{"id":"glob","key":"glob","value":{"rev":"203-4a79e232cf6684a48ccb9134a6ce938c"}}, -{"id":"glob-trie.js","key":"glob-trie.js","value":{"rev":"7-bff534e3aba8f6333fa5ea871b070de2"}}, -{"id":"global","key":"global","value":{"rev":"3-f15b0c9ae0ea9508890bff25c8e0f795"}}, -{"id":"globalize","key":"globalize","value":{"rev":"5-33d10c33fb24af273104f66098e246c4"}}, -{"id":"glossary","key":"glossary","value":{"rev":"3-5e143d09d22a01eb2ee742ceb3e18f6e"}}, -{"id":"glossy","key":"glossy","value":{"rev":"9-f31e00844e8be49e5812fe64a6f1e1cc"}}, -{"id":"gm","key":"gm","value":{"rev":"28-669722d34a3dc29c8c0b27abd73493a1"}}, -{"id":"gnarly","key":"gnarly","value":{"rev":"3-796f5df3483f304cb404cc7ac7702512"}}, -{"id":"gnomenotify","key":"gnomenotify","value":{"rev":"9-bc066c0556ad4a20e7a7ae58cdc4cf91"}}, -{"id":"gofer","key":"gofer","value":{"rev":"15-3fc77ce34e95ffecd12d3854a1bb2da9"}}, -{"id":"goo.gl","key":"goo.gl","value":{"rev":"37-eac7c44d33cc42c618372f0bdd4365c2"}}, -{"id":"goodreads","key":"goodreads","value":{"rev":"5-acd9fe24139aa8b81b26431dce9954aa"}}, -{"id":"goog","key":"goog","value":{"rev":"13-c964ecfcef4d20c8c7d7526323257c04"}}, -{"id":"googl","key":"googl","value":{"rev":"8-2d4d80ef0c5f93400ec2ec8ef80de433"}}, -{"id":"google-openid","key":"google-openid","value":{"rev":"19-380884ba97e3d6fc48c8c7db3dc0e91b"}}, -{"id":"google-spreadsheets","key":"google-spreadsheets","value":{"rev":"3-f640ef136c4b5e90210c2d5d43102b38"}}, -{"id":"google-voice","key":"google-voice","value":{"rev":"37-2e1c3cba3455852f26b0ccaf1fed7125"}}, -{"id":"googleanalytics","key":"googleanalytics","value":{"rev":"8-1d3e470ce4aacadb0418dd125887813d"}}, -{"id":"googleclientlogin","key":"googleclientlogin","value":{"rev":"23-5de8ee62c0ddbc63a001a36a6afe730e"}}, -{"id":"googlediff","key":"googlediff","value":{"rev":"3-438a2f0758e9770a157ae4cce9b6f49e"}}, -{"id":"googlemaps","key":"googlemaps","value":{"rev":"18-bc939560c587711f3d96f3caadd65a7f"}}, -{"id":"googleplus-scraper","key":"googleplus-scraper","value":{"rev":"7-598ea99bd64f4ad69cccb74095abae59"}}, -{"id":"googlereaderauth","key":"googlereaderauth","value":{"rev":"5-cd0eb8ca36ea78620af0fce270339a7b"}}, -{"id":"googlesets","key":"googlesets","value":{"rev":"5-1b2e597e903c080182b3306d63278fd9"}}, -{"id":"googleweather","key":"googleweather","value":{"rev":"3-6bfdaaeedb8a712ee3e89a8ed27508eb"}}, -{"id":"gopostal.node","key":"gopostal.node","value":{"rev":"3-14ff3a655dc3680c9e8e2751ebe294bc"}}, -{"id":"gowallan","key":"gowallan","value":{"rev":"3-23adc9c01a6b309eada47602fdc8ed90"}}, -{"id":"gowiththeflow","key":"gowiththeflow","value":{"rev":"3-52bb6cf6294f67ba5a892db4666d3790"}}, -{"id":"gpg","key":"gpg","value":{"rev":"5-0ca2b5af23e108a4f44f367992a75fed"}}, -{"id":"graceful-fs","key":"graceful-fs","value":{"rev":"3-01e9f7d1c0f6e6a611a60ee84de1f5cc"}}, -{"id":"gracie","key":"gracie","value":{"rev":"3-aa0f7c01a33c7c1e9a49b86886ef5255"}}, -{"id":"graff","key":"graff","value":{"rev":"7-5ab558cb24e30abd67f2a1dbf47cd639"}}, -{"id":"graft","key":"graft","value":{"rev":"3-7419de38b249b891bf7998bcdd2bf557"}}, -{"id":"grain","key":"grain","value":{"rev":"3-e57cbf02121970da230964ddbfd31432"}}, -{"id":"grainstore","key":"grainstore","value":{"rev":"19-5f9c5bb13b2c9ac4e6a05aec33aeb7c5"}}, -{"id":"graph","key":"graph","value":{"rev":"7-909d2fefcc84b5dd1512b60d631ea4e5"}}, -{"id":"graphquire","key":"graphquire","value":{"rev":"27-246e798f80b3310419644302405d68ad"}}, -{"id":"graphviz","key":"graphviz","value":{"rev":"8-3b79341eaf3f67f91bce7c88c08b9f0d"}}, -{"id":"grasshopper","key":"grasshopper","value":{"rev":"45-4002406990476b74dac5108bd19c4274"}}, -{"id":"gravatar","key":"gravatar","value":{"rev":"11-0164b7ac97e8a477b4e8791eae2e7fea"}}, -{"id":"grave","key":"grave","value":{"rev":"3-136f6378b956bc5dd9773250f8813038"}}, -{"id":"gravity","key":"gravity","value":{"rev":"5-dd40fcee1a769ce786337e9536d24244"}}, -{"id":"graylog","key":"graylog","value":{"rev":"5-abcff9cd91ff20e36f8a70a3f2de658b"}}, -{"id":"greg","key":"greg","value":{"rev":"5-ececb0a3bb552b6da4f66b8bf6f75cf0"}}, -{"id":"gridcentric","key":"gridcentric","value":{"rev":"4-4378e1c280e18b5aaabd23038b80d76c"}}, -{"id":"gridly","key":"gridly","value":{"rev":"3-86e878756b493da8f66cbd633a15f821"}}, -{"id":"grinder","key":"grinder","value":{"rev":"9-0aaeecf0c81b1c9c93a924c5eb0bff45"}}, -{"id":"grir.am","key":"grir.am","value":{"rev":"3-3ec153c764af1c26b50fefa437318c5a"}}, -{"id":"groundcrew","key":"groundcrew","value":{"rev":"3-9e9ed9b1c70c00c432f36bb853fa21a0"}}, -{"id":"groupie","key":"groupie","value":{"rev":"6-b5e3f0891a7e8811d6112b24bd5a46b4"}}, -{"id":"groupon","key":"groupon","value":{"rev":"21-8b74723c153695f4ed4917575abcca8f"}}, -{"id":"growing-file","key":"growing-file","value":{"rev":"7-995b233a1add5b9ea80aec7ac3f60dc5"}}, -{"id":"growl","key":"growl","value":{"rev":"10-4be41ae10ec96e1334dccdcdced12fe3"}}, -{"id":"gsl","key":"gsl","value":{"rev":"49-3367acfb521b30d3ddb9b80305009553"}}, -{"id":"gss","key":"gss","value":{"rev":"3-e4cffbbbc4536d952d13d46376d899b7"}}, -{"id":"guards","key":"guards","value":{"rev":"8-d7318d3d9dc842ab41e6ef5b88f9d37f"}}, -{"id":"guardtime","key":"guardtime","value":{"rev":"3-5a2942efabab100ffb3dc0fa3b581b7a"}}, -{"id":"guava","key":"guava","value":{"rev":"11-d9390d298b503f0ffb8e3ba92eeb9759"}}, -{"id":"guid","key":"guid","value":{"rev":"16-d99e725bbbf97a326833858767b7ed08"}}, -{"id":"gumbo","key":"gumbo","value":{"rev":"31-727cf5a3b7d8590fff871f27da114d9d"}}, -{"id":"gunther","key":"gunther","value":{"rev":"9-f95c89128412208d16acd3e615844115"}}, -{"id":"gzbz2","key":"gzbz2","value":{"rev":"3-e1844b1b3a7881a0c8dc0dd4edcc11ca"}}, -{"id":"gzip","key":"gzip","value":{"rev":"17-37afa05944f055d6f43ddc87c1b163c2"}}, -{"id":"gzip-stack","key":"gzip-stack","value":{"rev":"8-cf455d60277832c60ee622d198c0c51a"}}, -{"id":"gzippo","key":"gzippo","value":{"rev":"15-6416c13ecbbe1c5cd3e30adf4112ead7"}}, -{"id":"h5eb","key":"h5eb","value":{"rev":"3-11ed2566fa4b8a01ff63a720c94574cd"}}, -{"id":"hack","key":"hack","value":{"rev":"3-70f536dd46719e8201a6ac5cc96231f6"}}, -{"id":"hack.io","key":"hack.io","value":{"rev":"18-128305614e7fd6b461248bf3bfdd7ab7"}}, -{"id":"hacktor","key":"hacktor","value":{"rev":"3-51b438df35ba8a955d434ab25a4dad67"}}, -{"id":"haibu","key":"haibu","value":{"rev":"99-b29b8c37be42f90985c6d433d53c8679"}}, -{"id":"haibu-carapace","key":"haibu-carapace","value":{"rev":"22-9a89b2f495e533d0f93e4ee34121e48c"}}, -{"id":"haibu-nginx","key":"haibu-nginx","value":{"rev":"7-e176128dc6dbb0d7f5f33369edf1f7ee"}}, -{"id":"halfstreamxml","key":"halfstreamxml","value":{"rev":"7-5c0f3defa6ba921f8edb564584553df4"}}, -{"id":"ham","key":"ham","value":{"rev":"3-1500dc495cade7334f6a051f2758f748"}}, -{"id":"haml","key":"haml","value":{"rev":"15-a93e7762c7d43469a06519472497fd93"}}, -{"id":"haml-edge","key":"haml-edge","value":{"rev":"5-c4e44a73263ac9b7e632375de7e43d7c"}}, -{"id":"hamljs","key":"hamljs","value":{"rev":"10-a01c7214b69992352bde44938418ebf4"}}, -{"id":"hamljs-coffee","key":"hamljs-coffee","value":{"rev":"3-c2733c8ff38f5676075b84cd7f3d8684"}}, -{"id":"handlebars","key":"handlebars","value":{"rev":"4-0e21906b78605f7a1d5ec7cb4c7d35d7"}}, -{"id":"hanging-gardens","key":"hanging-gardens","value":{"rev":"27-3244e37f08bea0e31759e9f38983f59a"}}, -{"id":"hanging_gardens_registry","key":"hanging_gardens_registry","value":{"rev":"17-d87aa3a26f91dc314f02c686672a5ec6"}}, -{"id":"hapi","key":"hapi","value":{"rev":"3-ed721fe9aae4a459fe0945dabd7d680a"}}, -{"id":"harmony","key":"harmony","value":{"rev":"3-d6c9d6acc29d29c97c75c77f7c8e1390"}}, -{"id":"hascan","key":"hascan","value":{"rev":"13-a7ab15c72f464b013cbc55dc426543ca"}}, -{"id":"hash_ring","key":"hash_ring","value":{"rev":"12-0f072b1dd1fd93ae2f2b79f5ea72074d"}}, -{"id":"hashbangify","key":"hashbangify","value":{"rev":"5-738e0cf99649d41c19d3449c0e9a1cbf"}}, -{"id":"hashish","key":"hashish","value":{"rev":"9-62c5e74355458e1ead819d87151b7d38"}}, -{"id":"hashkeys","key":"hashkeys","value":{"rev":"3-490809bdb61f930f0d9f370eaadf36ea"}}, -{"id":"hashlib","key":"hashlib","value":{"rev":"7-1f19c9d6062ff22ed2e963204a1bd405"}}, -{"id":"hashring","key":"hashring","value":{"rev":"11-4c9f2b1ba7931c8bab310f4ecaf91419"}}, -{"id":"hashtable","key":"hashtable","value":{"rev":"7-2aaf2667cbdb74eb8da61e2e138059ca"}}, -{"id":"hat","key":"hat","value":{"rev":"9-6f37874d9703eab62dc875e2373837a8"}}, -{"id":"hbase","key":"hbase","value":{"rev":"20-7ca92712de26ffb18d275a21696aa263"}}, -{"id":"hbase-thrift","key":"hbase-thrift","value":{"rev":"7-39afb33a4e61cc2b3dc94f0c7fd32c65"}}, -{"id":"hbs","key":"hbs","value":{"rev":"29-aa2676e6790c5716f84f128dcd03e797"}}, -{"id":"header-stack","key":"header-stack","value":{"rev":"13-7ad1ccf3c454d77029c000ceb18ce5ab"}}, -{"id":"headers","key":"headers","value":{"rev":"13-04f8f5f25e2dd9890f6b2f120adf297a"}}, -{"id":"healthety","key":"healthety","value":{"rev":"60-07c67c22ee2a13d0ad675739d1814a6d"}}, -{"id":"heatmap","key":"heatmap","value":{"rev":"9-c53f4656d9517f184df7aea9226c1765"}}, -{"id":"heavy-flow","key":"heavy-flow","value":{"rev":"5-0b9188334339e7372b364a7fc730c639"}}, -{"id":"heckle","key":"heckle","value":{"rev":"13-b462abef7b9d1471ed8fb8f23af463e0"}}, -{"id":"helium","key":"helium","value":{"rev":"3-4d6ce9618c1be522268944240873f53e"}}, -{"id":"hello-world","key":"hello-world","value":{"rev":"3-e87f287308a209491c011064a87100b7"}}, -{"id":"hello.io","key":"hello.io","value":{"rev":"3-39b78278fa638495522edc7a84f6a52e"}}, -{"id":"helloworld","key":"helloworld","value":{"rev":"3-8f163aebdcf7d8761709bdbb634c3689"}}, -{"id":"helpers","key":"helpers","value":{"rev":"3-67d75b1c8e5ad2a268dd4ea191d4754b"}}, -{"id":"helpful","key":"helpful","value":{"rev":"41-e11bed25d5a0ca7e7ad116d5a339ec2a"}}, -{"id":"hem","key":"hem","value":{"rev":"27-042fc9d4b96f20112cd943e019e54d20"}}, -{"id":"hempwick","key":"hempwick","value":{"rev":"11-de1f6f0f23937d9f33286e12ee877540"}}, -{"id":"heritable","key":"heritable","value":{"rev":"13-1468ff92063251a037bbe80ee987a9c3"}}, -{"id":"hermes-raw-client","key":"hermes-raw-client","value":{"rev":"11-5d143c371cb8353612badc72be1917ff"}}, -{"id":"heru","key":"heru","value":{"rev":"3-d124a20939e30e2a3c08f7104b2a1a5c"}}, -{"id":"hexdump","key":"hexdump","value":{"rev":"3-c455710ca80662969ccbca3acc081cb8"}}, -{"id":"hexy","key":"hexy","value":{"rev":"16-5142b0461622436daa2e476d252770f2"}}, -{"id":"highlight","key":"highlight","value":{"rev":"9-4b172b7aef6f40d768f022b2ba4e6748"}}, -{"id":"highlight.js","key":"highlight.js","value":{"rev":"5-16c1ebd28d5f2e781e666c6ee013c30c"}}, -{"id":"hiker","key":"hiker","value":{"rev":"9-89d1ce978b349f1f0df262655299d83c"}}, -{"id":"hipchat","key":"hipchat","value":{"rev":"3-73118782367d474af0f6410290df5f7f"}}, -{"id":"hipchat-js","key":"hipchat-js","value":{"rev":"3-253b83875d3e18e9c89333bc377183c3"}}, -{"id":"hiredis","key":"hiredis","value":{"rev":"46-29ceb03860efbd4b3b995247f27f78b9"}}, -{"id":"hive","key":"hive","value":{"rev":"15-40a4c6fcfa3b80007a18ef4ede80075b"}}, -{"id":"hive-cache","key":"hive-cache","value":{"rev":"3-36b10607b68586fccbfeb856412bd6bf"}}, -{"id":"hoard","key":"hoard","value":{"rev":"13-75d4c484095e2e38ac63a65bd9fd7f4b"}}, -{"id":"hook","key":"hook","value":{"rev":"7-2f1e375058e2b1fa61d3651f6d57a6f8"}}, -{"id":"hook.io","key":"hook.io","value":{"rev":"63-9fac4fb8337d1953963d47144f806f72"}}, -{"id":"hook.io-browser","key":"hook.io-browser","value":{"rev":"3-7e04347d80adc03eb5637b7e4b8ca58b"}}, -{"id":"hook.io-couch","key":"hook.io-couch","value":{"rev":"3-ce0eb281d1ba21aa1caca3a52553a07b"}}, -{"id":"hook.io-cron","key":"hook.io-cron","value":{"rev":"15-50deedc2051ce65bca8a42048154139c"}}, -{"id":"hook.io-helloworld","key":"hook.io-helloworld","value":{"rev":"23-ef5cf0cec9045d28d846a7b0872874e4"}}, -{"id":"hook.io-irc","key":"hook.io-irc","value":{"rev":"5-39c7ac5e192aef34b87af791fa77ee04"}}, -{"id":"hook.io-logger","key":"hook.io-logger","value":{"rev":"13-9e3208ea8eacfe5378cd791f2377d06d"}}, -{"id":"hook.io-mailer","key":"hook.io-mailer","value":{"rev":"9-d9415d53dc086102024cf7400fdfb7a2"}}, -{"id":"hook.io-pinger","key":"hook.io-pinger","value":{"rev":"17-860ab3a892284b91999f86c3882e2ff5"}}, -{"id":"hook.io-repl","key":"hook.io-repl","value":{"rev":"13-c0d430ccdfd197e4746c46d2814b6d92"}}, -{"id":"hook.io-request","key":"hook.io-request","value":{"rev":"13-f0e8d167d59917d90266f921e3ef7c64"}}, -{"id":"hook.io-sitemonitor","key":"hook.io-sitemonitor","value":{"rev":"8-725ea7deb9cb1031eabdc4fd798308ff"}}, -{"id":"hook.io-twilio","key":"hook.io-twilio","value":{"rev":"11-6b2e231307f6174861aa5dcddad264b3"}}, -{"id":"hook.io-twitter","key":"hook.io-twitter","value":{"rev":"3-59296395b22e661e7e5c141c4c7be46d"}}, -{"id":"hook.io-webhook","key":"hook.io-webhook","value":{"rev":"15-b27e51b63c8ec70616c66061d949f388"}}, -{"id":"hook.io-webserver","key":"hook.io-webserver","value":{"rev":"29-eb6bff70736648427329eba08b5f55c3"}}, -{"id":"hook.io-ws","key":"hook.io-ws","value":{"rev":"4-a85578068b54560ef663a7ecfea2731f"}}, -{"id":"hooks","key":"hooks","value":{"rev":"33-6640fb0c27903af6b6ae7b7c41d79e01"}}, -{"id":"hoptoad-notifier","key":"hoptoad-notifier","value":{"rev":"16-8249cb753a3626f2bf2664024ae7a5ee"}}, -{"id":"horaa","key":"horaa","value":{"rev":"5-099e5d6486d10944e10b584eb3f6e924"}}, -{"id":"hornet","key":"hornet","value":{"rev":"22-8c40d7ba4ca832b951e6d5db165f3305"}}, -{"id":"horseman","key":"horseman","value":{"rev":"11-7228e0f84c2036669a218710c22f72c0"}}, -{"id":"hostify","key":"hostify","value":{"rev":"11-8c1a2e73f8b9474a6c26121688c28dc7"}}, -{"id":"hostinfo","key":"hostinfo","value":{"rev":"5-c8d638f40ccf94f4083430966d25e787"}}, -{"id":"hostip","key":"hostip","value":{"rev":"3-d4fd628b94e1f913d97ec1746d96f2a0"}}, -{"id":"hostname","key":"hostname","value":{"rev":"7-55fefb3c37990bbcad3d98684d17f38f"}}, -{"id":"hotnode","key":"hotnode","value":{"rev":"16-d7dad5de3ffc2ca6a04f74686aeb0e4b"}}, -{"id":"howmuchtime","key":"howmuchtime","value":{"rev":"3-351ce870ae6e2c21a798169d074e2a3f"}}, -{"id":"hstore","key":"hstore","value":{"rev":"3-55ab4d359c2fc8725829038e3adb7571"}}, -{"id":"hsume2-socket.io","key":"hsume2-socket.io","value":{"rev":"5-4b537247ae9999c285c802cc36457598"}}, -{"id":"htdoc","key":"htdoc","value":{"rev":"3-80ef9e3202b0d96b79435a2bc90bc899"}}, -{"id":"html","key":"html","value":{"rev":"3-92c4af7de329c92ff2e0be5c13020e78"}}, -{"id":"html-minifier","key":"html-minifier","value":{"rev":"7-2441ed004e2a6e7f1c42003ec03277ec"}}, -{"id":"html-sourcery","key":"html-sourcery","value":{"rev":"11-7ce1d4aa2e1d319fa108b02fb294d4ce"}}, -{"id":"html2coffeekup","key":"html2coffeekup","value":{"rev":"13-bae4a70411f6f549c281c69835fe3276"}}, -{"id":"html2coffeekup-bal","key":"html2coffeekup-bal","value":{"rev":"5-0663ac1339d72932004130b668c949f0"}}, -{"id":"html2jade","key":"html2jade","value":{"rev":"11-e50f504c5c847d7ffcde7328c2ade4fb"}}, -{"id":"html5","key":"html5","value":{"rev":"46-ca85ea99accaf1dc9ded4e2e3aa429c6"}}, -{"id":"html5edit","key":"html5edit","value":{"rev":"10-0383296c33ada4d356740f29121eeb9f"}}, -{"id":"htmlKompressor","key":"htmlKompressor","value":{"rev":"13-95a3afe7f7cfe02e089e41588b937fb1"}}, -{"id":"htmlkup","key":"htmlkup","value":{"rev":"27-5b0115636f38886ae0a40e5f52e2bfdd"}}, -{"id":"htmlparser","key":"htmlparser","value":{"rev":"14-52b2196c1456d821d47bb1d2779b2433"}}, -{"id":"htmlparser2","key":"htmlparser2","value":{"rev":"3-9bc0b807acd913999dfc949b3160a3db"}}, -{"id":"htracr","key":"htracr","value":{"rev":"27-384d0522328e625978b97d8eae8d942d"}}, -{"id":"http","key":"http","value":{"rev":"3-f197d1b599cb9da720d3dd58d9813ace"}}, -{"id":"http-agent","key":"http-agent","value":{"rev":"10-1715dd3a7adccf55bd6637d78bd345d1"}}, -{"id":"http-auth","key":"http-auth","value":{"rev":"3-21636d4430be18a5c6c42e5cb622c2e0"}}, -{"id":"http-basic-auth","key":"http-basic-auth","value":{"rev":"6-0a77e99ce8e31558d5917bd684fa2c9a"}}, -{"id":"http-browserify","key":"http-browserify","value":{"rev":"3-4f720b4af628ed8b5fb22839c1f91f4d"}}, -{"id":"http-console","key":"http-console","value":{"rev":"43-a20cbefed77bcae7de461922286a1f04"}}, -{"id":"http-digest","key":"http-digest","value":{"rev":"6-e0164885dcad21ab6150d537af0edd92"}}, -{"id":"http-digest-auth","key":"http-digest-auth","value":{"rev":"7-613ac841b808fd04e272e050fd5a45ac"}}, -{"id":"http-get","key":"http-get","value":{"rev":"39-b7cfeb2b572d4ecf695493e0886869f4"}}, -{"id":"http-load","key":"http-load","value":{"rev":"3-8c64f4972ff59e89fee041adde99b8ba"}}, -{"id":"http-proxy","key":"http-proxy","value":{"rev":"97-5b8af88886c8c047a9862bf62f6b9294"}}, -{"id":"http-proxy-backward","key":"http-proxy-backward","value":{"rev":"2-4433b04a41e8adade3f6b6b2b939df4b"}}, -{"id":"http-proxy-glimpse","key":"http-proxy-glimpse","value":{"rev":"3-a3e9791d4d9bfef5929ca55d874df18b"}}, -{"id":"http-proxy-no-line-184-error","key":"http-proxy-no-line-184-error","value":{"rev":"3-7e20a990820976d8c6d27c312cc5a67c"}}, -{"id":"http-proxy-selective","key":"http-proxy-selective","value":{"rev":"12-6e273fcd008afeceb6737345c46e1024"}}, -{"id":"http-recorder","key":"http-recorder","value":{"rev":"3-26dd0bc4f5c0bf922db1875e995d025f"}}, -{"id":"http-request-provider","key":"http-request-provider","value":{"rev":"6-436b69971dd1735ac3e41571375f2d15"}}, -{"id":"http-server","key":"http-server","value":{"rev":"21-1b80b6558692afd08c36629b0ecdc18c"}}, -{"id":"http-signature","key":"http-signature","value":{"rev":"9-49ca63427b535f2d18182d92427bc5b6"}}, -{"id":"http-stack","key":"http-stack","value":{"rev":"9-51614060741d6c85a7fd4c714ed1a9b2"}}, -{"id":"http-status","key":"http-status","value":{"rev":"5-1ec72fecc62a41d6f180d15c95e81270"}}, -{"id":"http_compat","key":"http_compat","value":{"rev":"3-88244d4b0fd08a3140fa1b2e8b1b152c"}}, -{"id":"http_router","key":"http_router","value":{"rev":"23-ad52b58b6bfc96d6d4e8215e0c31b294"}}, -{"id":"http_trace","key":"http_trace","value":{"rev":"7-d8024b5e41540e4240120ffefae523e4"}}, -{"id":"httpd","key":"httpd","value":{"rev":"3-9e2a19f007a6a487cdb752f4b8249657"}}, -{"id":"httpmock","key":"httpmock","value":{"rev":"3-b6966ba8ee2c31b0e7729fc59bb00ccf"}}, -{"id":"https-proxied","key":"https-proxied","value":{"rev":"5-f63a4c663d372502b0dcd4997e759e66"}}, -{"id":"httpu","key":"httpu","value":{"rev":"5-88a5b2bac8391d91673fc83d4cfd32df"}}, -{"id":"hungarian-magic","key":"hungarian-magic","value":{"rev":"4-9eae750ac6f30b6687d9a031353f5217"}}, -{"id":"huntergatherer","key":"huntergatherer","value":{"rev":"9-5c9d833a134cfaa901d89dce93f5b013"}}, -{"id":"hxp","key":"hxp","value":{"rev":"8-1f52ba766491826bdc6517c6cc508b2c"}}, -{"id":"hyde","key":"hyde","value":{"rev":"3-5763db65cab423404752b1a6354a7a6c"}}, -{"id":"hydra","key":"hydra","value":{"rev":"8-8bb4ed249fe0f9cdb8b11e492b646b88"}}, -{"id":"hyperpublic","key":"hyperpublic","value":{"rev":"11-5738162f3dbf95803dcb3fb28efd8740"}}, -{"id":"i18n","key":"i18n","value":{"rev":"7-f0d6b3c72ecd34dde02d805041eca996"}}, -{"id":"ical","key":"ical","value":{"rev":"13-baf448be48ab83ec9b3fb8bf83fbb9a1"}}, -{"id":"icalendar","key":"icalendar","value":{"rev":"5-78dd8fd8ed2c219ec56ad26a0727cf76"}}, -{"id":"icecap","key":"icecap","value":{"rev":"9-88d6865078a5e6e1ff998e2e73e593f3"}}, -{"id":"icecapdjs","key":"icecapdjs","value":{"rev":"11-d8e3c718a230d49caa3b5f76cfff7ce9"}}, -{"id":"icecast-stack","key":"icecast-stack","value":{"rev":"9-13b8da6ae373152ab0c8560e2f442af0"}}, -{"id":"ichabod","key":"ichabod","value":{"rev":"19-d0f02ffba80661398ceb80a7e0cbbfe6"}}, -{"id":"icing","key":"icing","value":{"rev":"11-84815e78828190fbaa52d6b93c75cb4f"}}, -{"id":"ico","key":"ico","value":{"rev":"3-5727a35c1df453bfdfa6a03e49725adf"}}, -{"id":"iconv","key":"iconv","value":{"rev":"18-5f5b3193268f1fa099e0112b3e033ffc"}}, -{"id":"iconv-jp","key":"iconv-jp","value":{"rev":"3-660b8f2def930263d2931cae2dcc401d"}}, -{"id":"id3","key":"id3","value":{"rev":"8-afe68aede872cae7b404aaa01c0108a5"}}, -{"id":"idea","key":"idea","value":{"rev":"9-a126c0e52206c51dcf972cf53af0bc32"}}, -{"id":"idiomatic-console","key":"idiomatic-console","value":{"rev":"25-67696c16bf79d1cc8caf4df62677c3ec"}}, -{"id":"idiomatic-stdio","key":"idiomatic-stdio","value":{"rev":"15-9d74c9a8872b1f7c41d6c671d7a14b7d"}}, -{"id":"iglob","key":"iglob","value":{"rev":"6-b8a3518cb67cad20c89f37892a2346a5"}}, -{"id":"ignite","key":"ignite","value":{"rev":"19-06daa730a70f69dc3a0d6d4984905c61"}}, -{"id":"iles-forked-irc-js","key":"iles-forked-irc-js","value":{"rev":"7-eb446f4e0db856e00351a5da2fa20616"}}, -{"id":"image","key":"image","value":{"rev":"8-5f7811db33c210eb38e1880f7cc433f2"}}, -{"id":"imageable","key":"imageable","value":{"rev":"61-9f7e03d3d990d34802f1e9c8019dbbfa"}}, -{"id":"imageinfo","key":"imageinfo","value":{"rev":"11-9bde1a1f0801d94539a4b70b61614849"}}, -{"id":"imagemagick","key":"imagemagick","value":{"rev":"10-b1a1ea405940fecf487da94b733e8c29"}}, -{"id":"imagick","key":"imagick","value":{"rev":"3-21d51d8a265a705881dadbc0c9f7c016"}}, -{"id":"imap","key":"imap","value":{"rev":"13-6a59045496c80b474652d2584edd4acb"}}, -{"id":"imbot","key":"imbot","value":{"rev":"11-0d8075eff5e5ec354683f396378fd101"}}, -{"id":"imdb","key":"imdb","value":{"rev":"7-2bba884d0e8804f4a7e0883abd47b0a7"}}, -{"id":"imgur","key":"imgur","value":{"rev":"3-30c0e5fddc1be3398ba5f7eee1a251d7"}}, -{"id":"impact","key":"impact","value":{"rev":"7-d3390690f11c6f9dcca9f240a7bedfef"}}, -{"id":"imsi","key":"imsi","value":{"rev":"3-0aa9a01c9c79b17afae3684b7b920ced"}}, -{"id":"index","key":"index","value":{"rev":"13-ad5d8d7dfad64512a12db4d820229c07"}}, -{"id":"indexer","key":"indexer","value":{"rev":"9-b0173ce9ad9fa1b80037fa8e33a8ce12"}}, -{"id":"inflect","key":"inflect","value":{"rev":"17-9e5ea2826fe08bd950cf7e22d73371bd"}}, -{"id":"inflectjs","key":"inflectjs","value":{"rev":"3-c59db027b72be720899b4a280ac2518f"}}, -{"id":"inflector","key":"inflector","value":{"rev":"3-191ff29d3b5ed8ef6877032a1d01d864"}}, -{"id":"inheritance","key":"inheritance","value":{"rev":"3-450a1e68bd2d8f16abe7001491abb6a8"}}, -{"id":"inherits","key":"inherits","value":{"rev":"3-284f97a7ae4f777bfabe721b66de07fa"}}, -{"id":"ini","key":"ini","value":{"rev":"5-142c8f9125fbace57689e2837deb1883"}}, -{"id":"iniparser","key":"iniparser","value":{"rev":"14-1053c59ef3d50a46356be45576885c49"}}, -{"id":"inireader","key":"inireader","value":{"rev":"15-9cdc485b18bff6397f5fec45befda402"}}, -{"id":"init","key":"init","value":{"rev":"5-b81610ad72864417dab49f7a3f29cc9f"}}, -{"id":"inject","key":"inject","value":{"rev":"5-82bddb6b4f21ddaa0137fedc8913d60e"}}, -{"id":"inliner","key":"inliner","value":{"rev":"45-8a1c3e8f78438f06865b3237d6c5339a"}}, -{"id":"inode","key":"inode","value":{"rev":"7-118ffafc62dcef5bbeb14e4328c68ab3"}}, -{"id":"inotify","key":"inotify","value":{"rev":"18-03d7b1a318bd283e0185b414b48dd602"}}, -{"id":"inotify-plusplus","key":"inotify-plusplus","value":{"rev":"10-0e0ce9065a62e5e21ee5bb53fac61a6d"}}, -{"id":"inspect","key":"inspect","value":{"rev":"5-b5f18717e29caec3399abe5e4ce7a269"}}, -{"id":"instagram","key":"instagram","value":{"rev":"5-decddf3737a1764518b6a7ce600d720d"}}, -{"id":"instagram-node-lib","key":"instagram-node-lib","value":{"rev":"13-8be77f1180b6afd9066834b3f5ee8de5"}}, -{"id":"instant-styleguide","key":"instant-styleguide","value":{"rev":"9-66c02118993621376ad0b7396db435b3"}}, -{"id":"intercept","key":"intercept","value":{"rev":"9-f5622744c576405516a427b4636ee864"}}, -{"id":"interface","key":"interface","value":{"rev":"10-13806252722402bd18d88533056a863b"}}, -{"id":"interleave","key":"interleave","value":{"rev":"25-69bc136937604863748a029fb88e3605"}}, -{"id":"interstate","key":"interstate","value":{"rev":"3-3bb4a6c35ca765f88a10b9fab6307c59"}}, -{"id":"intervals","key":"intervals","value":{"rev":"21-89b71bd55b8d5f6b670d69fc5b9f847f"}}, -{"id":"intestine","key":"intestine","value":{"rev":"3-66a5531e06865ed9c966d95437ba1371"}}, -{"id":"ios7crypt","key":"ios7crypt","value":{"rev":"7-a2d309a2c074e5c1c456e2b56cbcfd17"}}, -{"id":"iostat","key":"iostat","value":{"rev":"11-f0849c0072e76701b435aa769a614e82"}}, -{"id":"ip2cc","key":"ip2cc","value":{"rev":"9-2c282606fd08d469184a272a2108639c"}}, -{"id":"ipaddr.js","key":"ipaddr.js","value":{"rev":"5-1017fd5342840745614701476ed7e6c4"}}, -{"id":"iptables","key":"iptables","value":{"rev":"7-23e56ef5d7bf0ee8f5bd0e38bde8aae3"}}, -{"id":"iptrie","key":"iptrie","value":{"rev":"4-10317b0e073befe9601e9dc308dc361a"}}, -{"id":"ipv6","key":"ipv6","value":{"rev":"6-85e937f3d79e44dbb76264c7aaaa140f"}}, -{"id":"iqengines","key":"iqengines","value":{"rev":"3-8bdbd32e9dc35b77d80a31edae235178"}}, -{"id":"irc","key":"irc","value":{"rev":"8-ed30964f57b99b1b2f2104cc5e269618"}}, -{"id":"irc-colors","key":"irc-colors","value":{"rev":"9-7ddb19db9a553567aae86bd97f1dcdfc"}}, -{"id":"irc-js","key":"irc-js","value":{"rev":"58-1c898cea420aee60283edb4fadceb90e"}}, -{"id":"ircat.js","key":"ircat.js","value":{"rev":"6-f25f20953ce96697c033315d250615d0"}}, -{"id":"ircbot","key":"ircbot","value":{"rev":"9-85a4a6f88836fc031855736676b10dec"}}, -{"id":"irccd","key":"irccd","value":{"rev":"3-bf598ae8b6af63be41852ae8199416f4"}}, -{"id":"ircd","key":"ircd","value":{"rev":"7-3ba7fc2183d32ee1e58e63092d7e82bb"}}, -{"id":"ircdjs","key":"ircdjs","value":{"rev":"15-8fcdff2bf29cf24c3bbc4b461e6cbe9f"}}, -{"id":"irclog","key":"irclog","value":{"rev":"3-79a99bd8048dd98a93c747a1426aabde"}}, -{"id":"ircrpc","key":"ircrpc","value":{"rev":"5-278bec6fc5519fdbd152ea4fa35dc58c"}}, -{"id":"irrklang","key":"irrklang","value":{"rev":"3-65936dfabf7777027069343c2e72b32e"}}, -{"id":"isaacs","key":"isaacs","value":{"rev":"7-c55a41054056f502bc580bc6819d9d1f"}}, -{"id":"isbn","key":"isbn","value":{"rev":"3-51e784ded2e3ec9ef9b382fecd1c26a1"}}, -{"id":"iscroll","key":"iscroll","value":{"rev":"4-4f6635793806507665503605e7c180f0"}}, -{"id":"isodate","key":"isodate","value":{"rev":"7-ea4b1f77e9557b153264f68fd18a9f23"}}, -{"id":"it-is","key":"it-is","value":{"rev":"14-7617f5831c308d1c4ef914bc5dc30fa7"}}, -{"id":"iterator","key":"iterator","value":{"rev":"3-e6f70367a55cabbb89589f2a88be9ab0"}}, -{"id":"itunes","key":"itunes","value":{"rev":"7-47d151c372d70d0bc311141749c84d5a"}}, -{"id":"iws","key":"iws","value":{"rev":"3-dc7b4d18565b79d3e14aa691e5e632f4"}}, -{"id":"jQuery","key":"jQuery","value":{"rev":"29-f913933259b4ec5f4c5ea63466a4bb08"}}, -{"id":"jWorkflow","key":"jWorkflow","value":{"rev":"7-582cd7aa62085ec807117138b6439550"}}, -{"id":"jaCodeMap","key":"jaCodeMap","value":{"rev":"7-28efcbf4146977bdf1e594e0982ec097"}}, -{"id":"jaaulde-cookies","key":"jaaulde-cookies","value":{"rev":"3-d5b5a75f9cabbebb2804f0b4ae93d0c5"}}, -{"id":"jacker","key":"jacker","value":{"rev":"3-888174c7e3e2a5d241f2844257cf1b10"}}, -{"id":"jade","key":"jade","value":{"rev":"144-318a9d9f63906dc3da1ef7c1ee6420b5"}}, -{"id":"jade-browser","key":"jade-browser","value":{"rev":"9-0ae6b9e321cf04e3ca8fbfe0e38f4d9e"}}, -{"id":"jade-client-connect","key":"jade-client-connect","value":{"rev":"5-96dbafafa31187dd7f829af54432de8e"}}, -{"id":"jade-ext","key":"jade-ext","value":{"rev":"9-aac9a58a4e07d82bc496bcc4241d1be0"}}, -{"id":"jade-i18n","key":"jade-i18n","value":{"rev":"23-76a21a41b5376e10c083672dccf7fc62"}}, -{"id":"jade-serial","key":"jade-serial","value":{"rev":"3-5ec712e1d8cd8d5af20ae3e62ee92854"}}, -{"id":"jadedown","key":"jadedown","value":{"rev":"11-0d16ce847d6afac2939eebcb24a7216c"}}, -{"id":"jadeify","key":"jadeify","value":{"rev":"17-4322b68bb5a7e81e839edabbc8c405a4"}}, -{"id":"jadevu","key":"jadevu","value":{"rev":"15-1fd8557a6db3c23f267de76835f9ee65"}}, -{"id":"jah","key":"jah","value":{"rev":"3-f29704037a1cffe2b08abb4283bee4a4"}}, -{"id":"jake","key":"jake","value":{"rev":"36-5cb64b1c5a89ac53eb4d09d66a5b10e1"}}, -{"id":"jammit-express","key":"jammit-express","value":{"rev":"6-e3dfa928114a2721fe9b8882d284f759"}}, -{"id":"janrain","key":"janrain","value":{"rev":"5-9554501be76fb3a472076858d1abbcd5"}}, -{"id":"janrain-api","key":"janrain-api","value":{"rev":"3-f45a65c695f4c72fdd1bf3593d8aa796"}}, -{"id":"jaque","key":"jaque","value":{"rev":"32-7f269a70c67beefc53ba1684bff5a57b"}}, -{"id":"jar","key":"jar","value":{"rev":"3-7fe0ab4aa3a2ccc5d50853f118e7aeb5"}}, -{"id":"jarvis","key":"jarvis","value":{"rev":"3-fb203b29b397a0b12c1ae56240624e3d"}}, -{"id":"jarvis-test","key":"jarvis-test","value":{"rev":"5-9537ddae8291e6dad03bc0e6acc9ac80"}}, -{"id":"jasbin","key":"jasbin","value":{"rev":"25-ae22f276406ac8bb4293d78595ce02ad"}}, -{"id":"jasmine-dom","key":"jasmine-dom","value":{"rev":"17-686de4c573f507c30ff72c6671dc3d93"}}, -{"id":"jasmine-jquery","key":"jasmine-jquery","value":{"rev":"7-86c077497a367bcd9ea96d5ab8137394"}}, -{"id":"jasmine-node","key":"jasmine-node","value":{"rev":"27-4c544c41c69d2b3cb60b9953d1c46d54"}}, -{"id":"jasmine-reporters","key":"jasmine-reporters","value":{"rev":"3-21ba522ae38402848d5a66d3d4d9a2b3"}}, -{"id":"jasmine-runner","key":"jasmine-runner","value":{"rev":"23-7458777b7a6785efc878cfd40ccb99d8"}}, -{"id":"jasminy","key":"jasminy","value":{"rev":"3-ce76023bac40c5f690cba59d430fd083"}}, -{"id":"jason","key":"jason","value":{"rev":"15-394a59963c579ed5db37fada4d082b5c"}}, -{"id":"javiary","key":"javiary","value":{"rev":"5-661be61fd0f47c9609b7d148e298e2fc"}}, -{"id":"jazz","key":"jazz","value":{"rev":"12-d11d602c1240b134b0593425911242fc"}}, -{"id":"jdoc","key":"jdoc","value":{"rev":"3-0c61fdd6b367a9acac710e553927b290"}}, -{"id":"jeesh","key":"jeesh","value":{"rev":"13-23b4e1ecf9ca76685bf7f1bfc6c076f1"}}, -{"id":"jellyfish","key":"jellyfish","value":{"rev":"25-7fef81f9b5ef5d4abbcecb030a433a72"}}, -{"id":"jen","key":"jen","value":{"rev":"3-ab1b07453318b7e0254e1dadbee7868f"}}, -{"id":"jerk","key":"jerk","value":{"rev":"34-e31f26d5e3b700d0a3e5f5a5acf0d381"}}, -{"id":"jessie","key":"jessie","value":{"rev":"19-829b932e57204f3b7833b34f75d6bf2a"}}, -{"id":"jezebel","key":"jezebel","value":{"rev":"15-b67c259e160390064da69a512382e06f"}}, -{"id":"jimi","key":"jimi","value":{"rev":"10-cc4a8325d6b847362a422304a0057231"}}, -{"id":"jinjs","key":"jinjs","value":{"rev":"37-38fcf1989f1b251a35e4ff725118f55e"}}, -{"id":"jinkies","key":"jinkies","value":{"rev":"30-73fec0e854aa31bcbf3ae1ca04462b22"}}, -{"id":"jison","key":"jison","value":{"rev":"52-d03c6f5e2bdd7624d39d93ec5e88c383"}}, -{"id":"jitsu","key":"jitsu","value":{"rev":"164-95083f8275f0bf2834f62027569b4da2"}}, -{"id":"jitter","key":"jitter","value":{"rev":"16-3f7b183aa7922615f4b5b2fb46653477"}}, -{"id":"jj","key":"jj","value":{"rev":"21-1b3f97e9725e1241c96a884c85dc4e30"}}, -{"id":"jjw","key":"jjw","value":{"rev":"13-835c632dfc5df7dd37860bd0b2c1cb38"}}, -{"id":"jkwery","key":"jkwery","value":{"rev":"11-212429c9c9e1872d4e278da055b5ae0a"}}, -{"id":"jmen","key":"jmen","value":{"rev":"3-a0b67d5b84a077061d3fed2ddbf2c6a8"}}, -{"id":"jobmanager","key":"jobmanager","value":{"rev":"15-1a589ede5f10d1ea2f33f1bb91f9b3aa"}}, -{"id":"jobs","key":"jobs","value":{"rev":"12-3072b6164c5dca8fa9d24021719048ff"}}, -{"id":"jobvite","key":"jobvite","value":{"rev":"56-3d69b0e6d91722ef4908b4fe26bb5432"}}, -{"id":"jodoc","key":"jodoc","value":{"rev":"3-7b05c6d7b4c9a9fa85d3348948d2d52d"}}, -{"id":"johnny-mnemonic","key":"johnny-mnemonic","value":{"rev":"3-e8749d4be597f002aae720011b7c9273"}}, -{"id":"join","key":"join","value":{"rev":"5-ab92491dc83b5e8ed5f0cc49e306d5d5"}}, -{"id":"jolokia-client","key":"jolokia-client","value":{"rev":"26-1f93cb53f4a870b94540cdbf7627b1c4"}}, -{"id":"joo","key":"joo","value":{"rev":"11-e0d4a97eceacdd13769bc5f56e059aa7"}}, -{"id":"jools","key":"jools","value":{"rev":"3-9da332d524a117c4d72a58bb45fa34fd"}}, -{"id":"joose","key":"joose","value":{"rev":"22-ef8a1895680ad2f9c1cd73cd1afbb58e"}}, -{"id":"joosex-attribute","key":"joosex-attribute","value":{"rev":"18-119df97dba1ba2631c94d49e3142bbd7"}}, -{"id":"joosex-bridge-ext","key":"joosex-bridge-ext","value":{"rev":"20-5ad2168291aad2cf021df0a3eb103538"}}, -{"id":"joosex-class-simpleconstructor","key":"joosex-class-simpleconstructor","value":{"rev":"6-f71e02e44f611550374ad9f5d0c37fdf"}}, -{"id":"joosex-class-singleton","key":"joosex-class-singleton","value":{"rev":"6-3ba6b8644722b29febe384a368c18aab"}}, -{"id":"joosex-cps","key":"joosex-cps","value":{"rev":"20-493c65faf1ec59416bae475529c51cd4"}}, -{"id":"joosex-meta-lazy","key":"joosex-meta-lazy","value":{"rev":"13-ef8bc4e57006cfcecd72a344d8dc9da6"}}, -{"id":"joosex-namespace-depended","key":"joosex-namespace-depended","value":{"rev":"22-8a38a21f8564470b96082177e81f3db6"}}, -{"id":"joosex-observable","key":"joosex-observable","value":{"rev":"7-52e7018931e5465920bb6feab88aa468"}}, -{"id":"joosex-role-parameterized","key":"joosex-role-parameterized","value":{"rev":"6-65aa4fa4967c4fbe06357ccda5e6f810"}}, -{"id":"joosex-simplerequest","key":"joosex-simplerequest","value":{"rev":"10-12d105b60b8b3ca3a3626ca0ec53892d"}}, -{"id":"josp","key":"josp","value":{"rev":"3-c4fa8445a0d96037e00fe96d007bcf0c"}}, -{"id":"jot","key":"jot","value":{"rev":"3-8fab571ce3ad993f3594f3c2e0fc6915"}}, -{"id":"journey","key":"journey","value":{"rev":"40-efe1fa6c8d735592077c9a24b3b56a03"}}, -{"id":"jpeg","key":"jpeg","value":{"rev":"8-ab437fbaf88f32a7fb625a0b27521292"}}, -{"id":"jq","key":"jq","value":{"rev":"3-9d83287aa9e6aab25590fac9adbab968"}}, -{"id":"jqNode","key":"jqNode","value":{"rev":"3-fcaf2c47aba5637a4a23c64b6fc778cf"}}, -{"id":"jqbuild","key":"jqbuild","value":{"rev":"3-960edcea36784aa9ca135cd922e0cb9b"}}, -{"id":"jqserve","key":"jqserve","value":{"rev":"3-39272c5479aabaafe66ffa26a6eb3bb5"}}, -{"id":"jqtpl","key":"jqtpl","value":{"rev":"54-ce2b62ced4644d5fe24c3a8ebcb4d528"}}, -{"id":"jquajax","key":"jquajax","value":{"rev":"3-a079cb8f3a686faaafe420760e77a330"}}, -{"id":"jquery","key":"jquery","value":{"rev":"27-60fd58bba99d044ffe6e140bafd72595"}}, -{"id":"jquery-browserify","key":"jquery-browserify","value":{"rev":"9-a4e9afd657f3c632229afa356382f6a4"}}, -{"id":"jquery-deferred","key":"jquery-deferred","value":{"rev":"5-0fd0cec51f7424a50f0dba3cbe74fd58"}}, -{"id":"jquery-drive","key":"jquery-drive","value":{"rev":"3-8474f192fed5c5094e56bc91f5e8a0f8"}}, -{"id":"jquery-mousewheel","key":"jquery-mousewheel","value":{"rev":"3-cff81086cf651e52377a8d5052b09d64"}}, -{"id":"jquery-placeholdize","key":"jquery-placeholdize","value":{"rev":"3-7acc3fbda1b8daabce18876d2b4675e3"}}, -{"id":"jquery-tmpl-jst","key":"jquery-tmpl-jst","value":{"rev":"13-575031eb2f2b1e4c5562e195fce0bc93"}}, -{"id":"jquery.effects.blind","key":"jquery.effects.blind","value":{"rev":"3-5f3bec5913edf1bfcee267891f6204e2"}}, -{"id":"jquery.effects.bounce","key":"jquery.effects.bounce","value":{"rev":"3-245b2e7d9a1295dd0f7d568b8087190d"}}, -{"id":"jquery.effects.clip","key":"jquery.effects.clip","value":{"rev":"3-7aa63a590b6d90d5ea20e21c8dda675d"}}, -{"id":"jquery.effects.core","key":"jquery.effects.core","value":{"rev":"3-dd2fa270d8aea21104c2c92d6b06500d"}}, -{"id":"jquery.effects.drop","key":"jquery.effects.drop","value":{"rev":"3-8d0e30016e99460063a9a9000ce7b032"}}, -{"id":"jquery.effects.explode","key":"jquery.effects.explode","value":{"rev":"3-3d5e3bb2fb451f7eeaeb72b6743b6e6c"}}, -{"id":"jquery.effects.fade","key":"jquery.effects.fade","value":{"rev":"3-f362c762053eb278b5db5f92e248c3a5"}}, -{"id":"jquery.effects.fold","key":"jquery.effects.fold","value":{"rev":"3-c7d823c2b25c4f1e6a1801f4b1bc7a2c"}}, -{"id":"jquery.effects.highlight","key":"jquery.effects.highlight","value":{"rev":"3-44ef3c62a6b829382bffa6393cd31ed9"}}, -{"id":"jquery.effects.pulsate","key":"jquery.effects.pulsate","value":{"rev":"3-3cad87635cecc2602d40682cf669d2fe"}}, -{"id":"jquery.effects.scale","key":"jquery.effects.scale","value":{"rev":"3-2c8df02eeed343088e2253d84064a219"}}, -{"id":"jquery.effects.shake","key":"jquery.effects.shake","value":{"rev":"3-d63ab567d484311744d848b520a720c7"}}, -{"id":"jquery.effects.slide","key":"jquery.effects.slide","value":{"rev":"3-9eb5d1075d67045a8fa305e596981934"}}, -{"id":"jquery.effects.transfer","key":"jquery.effects.transfer","value":{"rev":"3-371bc87350ede6da53a40468b63200a9"}}, -{"id":"jquery.tmpl","key":"jquery.tmpl","value":{"rev":"5-75efd6c8c0ce030f2da12b984f9dfe6c"}}, -{"id":"jquery.ui.accordion","key":"jquery.ui.accordion","value":{"rev":"3-964ee7d6c50f31e7db6631da28e2261a"}}, -{"id":"jquery.ui.autocomplete","key":"jquery.ui.autocomplete","value":{"rev":"3-950d240629d142eab5e07c2776e39bcc"}}, -{"id":"jquery.ui.button","key":"jquery.ui.button","value":{"rev":"3-a1c7f3eeb9298ac0c116d75a176a6d17"}}, -{"id":"jquery.ui.core","key":"jquery.ui.core","value":{"rev":"3-b7ba340b7304a304f85c4d13438d1195"}}, -{"id":"jquery.ui.datepicker","key":"jquery.ui.datepicker","value":{"rev":"3-5b76579057f1b870959a06ab833f1972"}}, -{"id":"jquery.ui.dialog","key":"jquery.ui.dialog","value":{"rev":"3-0c314cee86bf67298759efcfd47246f6"}}, -{"id":"jquery.ui.draggable","key":"jquery.ui.draggable","value":{"rev":"3-b7a15d2bdbcdc6f0f3cd6e4522f9f1f3"}}, -{"id":"jquery.ui.droppable","key":"jquery.ui.droppable","value":{"rev":"3-86d8a1558f5e9383b271b4d968ba081d"}}, -{"id":"jquery.ui.mouse","key":"jquery.ui.mouse","value":{"rev":"3-ccb88d773c452c778c694f9f551cb816"}}, -{"id":"jquery.ui.position","key":"jquery.ui.position","value":{"rev":"3-c49c13b38592a363585600b7af54d977"}}, -{"id":"jquery.ui.progressbar","key":"jquery.ui.progressbar","value":{"rev":"3-b28dfadab64f9548b828c42bf870fcc9"}}, -{"id":"jquery.ui.resizable","key":"jquery.ui.resizable","value":{"rev":"3-aa356230544cbe8ab8dc5fab08cc0fa7"}}, -{"id":"jquery.ui.selectable","key":"jquery.ui.selectable","value":{"rev":"3-6b11846c104d580556e40eb5194c45f2"}}, -{"id":"jquery.ui.slider","key":"jquery.ui.slider","value":{"rev":"3-e8550b76bf58a9cbeca9ea91eb763257"}}, -{"id":"jquery.ui.sortable","key":"jquery.ui.sortable","value":{"rev":"3-1ddd981bd720f055fbd5bb1d06df55ad"}}, -{"id":"jquery.ui.tabs","key":"jquery.ui.tabs","value":{"rev":"3-e0514383f4d920b9dc23ef7a7ea4d8af"}}, -{"id":"jquery.ui.widget","key":"jquery.ui.widget","value":{"rev":"3-3a0800fa067c12d013168f74acf21e6d"}}, -{"id":"jqueryify","key":"jqueryify","value":{"rev":"3-2655cf6a45795a8bd138a464e6c18f04"}}, -{"id":"jrep","key":"jrep","value":{"rev":"3-edbcf6931b8a2b3f550727d8b839acc3"}}, -{"id":"js-beautify-node","key":"js-beautify-node","value":{"rev":"3-401cd1c130aaec2c090b578fe8db6290"}}, -{"id":"js-class","key":"js-class","value":{"rev":"5-a63fbb0136dcd602feee72e70674d5db"}}, -{"id":"js-jango","key":"js-jango","value":{"rev":"3-af4e4a7844791617e66a40a1c403bb98"}}, -{"id":"js-loader","key":"js-loader","value":{"rev":"13-8d9729495c1692e47d2cd923e839b4c8"}}, -{"id":"js-manager","key":"js-manager","value":{"rev":"5-6d384a2ce4737f13d417f85689c3c372"}}, -{"id":"js-nts","key":"js-nts","value":{"rev":"3-7d921611b567d2d890bc983c343558ef"}}, -{"id":"js-openstack","key":"js-openstack","value":{"rev":"11-d56996be276fbe6162573575932b1cba"}}, -{"id":"js-select","key":"js-select","value":{"rev":"9-9d20f6d86d9e6f8a84191346288b76ed"}}, -{"id":"js.io","key":"js.io","value":{"rev":"3-c5e16e13372ba592ccf2ac86ee007a1f"}}, -{"id":"js2","key":"js2","value":{"rev":"35-2dc694e48b67252d8787f5e889a07430"}}, -{"id":"js2coffee","key":"js2coffee","value":{"rev":"19-8eeafa894dcc0dc306b02e728543511e"}}, -{"id":"jsDAV","key":"jsDAV","value":{"rev":"11-4ab1935d98372503439b054daef2e78e"}}, -{"id":"jsDump","key":"jsDump","value":{"rev":"5-32d6e4032bd114245356970f0b76a58a"}}, -{"id":"jsSourceCodeParser","key":"jsSourceCodeParser","value":{"rev":"3-78c5e8624ab25fca99a7bb6cd9be402b"}}, -{"id":"jsapp","key":"jsapp","value":{"rev":"3-6758eb2743cc22f723a6612b34c8d943"}}, -{"id":"jscc-node","key":"jscc-node","value":{"rev":"3-5f52dc20dc2a188bc32e7219c9d2f225"}}, -{"id":"jscheckstyle","key":"jscheckstyle","value":{"rev":"5-82021f06a1bd824ac195e0ab8a3b598c"}}, -{"id":"jsclass","key":"jsclass","value":{"rev":"9-2a0656b9497c5a8208a0fefa5aae3350"}}, -{"id":"jsconfig","key":"jsconfig","value":{"rev":"3-b1afef99468f81eff319453623135a56"}}, -{"id":"jscssp","key":"jscssp","value":{"rev":"6-413ad0701e6dbb412e8a01aadb6672c4"}}, -{"id":"jsdata","key":"jsdata","value":{"rev":"5-53f8b26f28291dccfdff8f14e7f4c44c"}}, -{"id":"jsdeferred","key":"jsdeferred","value":{"rev":"8-bc238b921a1fa465503722756a98e9b7"}}, -{"id":"jsdoc","key":"jsdoc","value":{"rev":"3-386eb47a2761a1ad025996232751fba9"}}, -{"id":"jsdog","key":"jsdog","value":{"rev":"11-d4a523898a7c474b5c7b8cb8b24bafe8"}}, -{"id":"jsdom","key":"jsdom","value":{"rev":"63-86bc6b9d8bfdb99b793ac959e126f7ff"}}, -{"id":"jsftp","key":"jsftp","value":{"rev":"35-89cd772521d7ac3cead71c602ddeb819"}}, -{"id":"jsgi","key":"jsgi","value":{"rev":"20-dbef9d8dfb5c9bf1a3b6014159bb305a"}}, -{"id":"jsgi-node","key":"jsgi-node","value":{"rev":"1-8ec0892e521754aaf88684714d306af9"}}, -{"id":"jsgrep","key":"jsgrep","value":{"rev":"7-be19445481acdbbb684fdc2425d88d08"}}, -{"id":"jshelpers","key":"jshelpers","value":{"rev":"11-9509dcdd48bc494de76cae66217ebedb"}}, -{"id":"jshint","key":"jshint","value":{"rev":"34-ed2e7ea0e849126bd9821b86f23b7314"}}, -{"id":"jshint-autofix","key":"jshint-autofix","value":{"rev":"9-abbb3622aa8a47a8890dbbaab0009b6d"}}, -{"id":"jshint-mode","key":"jshint-mode","value":{"rev":"5-06ec066819b93c7ae6782c755a0e2125"}}, -{"id":"jshint-runner","key":"jshint-runner","value":{"rev":"7-6fc8a15e387a4e81e300a54a86a3a240"}}, -{"id":"jshtml","key":"jshtml","value":{"rev":"5-d3e96c31cf1cd2fcf7743defc1631c3a"}}, -{"id":"jsinc","key":"jsinc","value":{"rev":"9-0e4dc3ba04b440085a79d6001232abfc"}}, -{"id":"jslint","key":"jslint","value":{"rev":"10-ab451352333b5f3d29c6cdbab49187dd"}}, -{"id":"jslint-core","key":"jslint-core","value":{"rev":"3-1f874d8cca07b6f007bc80c23ba15e2e"}}, -{"id":"jslint-strict","key":"jslint-strict","value":{"rev":"8-3d694a0f3079691da1866de16f290ea2"}}, -{"id":"jslinux","key":"jslinux","value":{"rev":"13-033cb60c7867aae599863323a97f45c0"}}, -{"id":"jslitmus","key":"jslitmus","value":{"rev":"6-d3f3f82ea1a376acc2b24c69da003409"}}, -{"id":"jsmeter","key":"jsmeter","value":{"rev":"5-7838bb9b970cbaa29a48802c508fd091"}}, -{"id":"jsmin","key":"jsmin","value":{"rev":"6-002ad1b385915e60f895b5e52492fb94"}}, -{"id":"json","key":"json","value":{"rev":"39-1d24fb8c3bdf0ac533bfc52e74420adc"}}, -{"id":"json-browser","key":"json-browser","value":{"rev":"6-883f051c1297cf631adba1c855ff2e13"}}, -{"id":"json-builder","key":"json-builder","value":{"rev":"5-e7a996ff1ef89114ce2ab6de9b653af8"}}, -{"id":"json-command","key":"json-command","value":{"rev":"16-8239cb65563720c42da5562d3a031b09"}}, -{"id":"json-fu","key":"json-fu","value":{"rev":"5-7933c35711cb9d7673d7514fe495c56d"}}, -{"id":"json-line-protocol","key":"json-line-protocol","value":{"rev":"7-98de63467d154b40a029391af8a26042"}}, -{"id":"json-object","key":"json-object","value":{"rev":"7-534cd9680c386c5b9800848755698f2b"}}, -{"id":"json-ref","key":"json-ref","value":{"rev":"3-cd09776d166c3f77013e429737c7e1e9"}}, -{"id":"json-san","key":"json-san","value":{"rev":"7-8683abde23232c1d84266e7a2d5c4527"}}, -{"id":"json-schema","key":"json-schema","value":{"rev":"1-2f323062e7ec80d2ff765da43c7aaa7d"}}, -{"id":"json-sockets","key":"json-sockets","value":{"rev":"26-bfef71c0d9fb4d56010b05f47f142748"}}, -{"id":"json-storage","key":"json-storage","value":{"rev":"3-46139e3a54c0a27e67820df2c7e87dbf"}}, -{"id":"json-storage-model","key":"json-storage-model","value":{"rev":"3-8b77044e192791613cf92b2f3317357f"}}, -{"id":"json-streamify","key":"json-streamify","value":{"rev":"5-d98cd72265fba652481eef6baa980f46"}}, -{"id":"json-streams","key":"json-streams","value":{"rev":"3-e07fc5ca24b33145c8aacf9995d46723"}}, -{"id":"json-tables","key":"json-tables","value":{"rev":"3-37a652b54880487e66ffeee6822b945b"}}, -{"id":"json-template","key":"json-template","value":{"rev":"3-9ee3a101c60ea682fb88759b2df837e4"}}, -{"id":"json2","key":"json2","value":{"rev":"12-bc3d411db772e0947ca58a54c2084073"}}, -{"id":"json2ify","key":"json2ify","value":{"rev":"3-c2d6677cc35e4668c97cf6800a4728d8"}}, -{"id":"json2xml","key":"json2xml","value":{"rev":"3-e955b994479362685e2197b39909dea2"}}, -{"id":"json_req","key":"json_req","value":{"rev":"15-14520bc890cbb0ab4c142b59bf21c9f1"}}, -{"id":"jsonapi","key":"jsonapi","value":{"rev":"11-2b27aaca5643d6a5b3ab38721cf6342f"}}, -{"id":"jsonconfig","key":"jsonconfig","value":{"rev":"5-0072bb54cb0ae5b13eee4f1657ba6a29"}}, -{"id":"jsond","key":"jsond","value":{"rev":"13-7c3622aeb147dae4698608ee32d81b45"}}, -{"id":"jsondate","key":"jsondate","value":{"rev":"3-1da5d30ee1cf7c6d9605a446efd91478"}}, -{"id":"jsonds","key":"jsonds","value":{"rev":"9-af2867869a46787e58c337e700dbf0dd"}}, -{"id":"jsonds2","key":"jsonds2","value":{"rev":"3-e7ed9647cc1ba72e59b625840358c7ca"}}, -{"id":"jsonfiles","key":"jsonfiles","value":{"rev":"3-5e643ba75c401f653f505e7938540d83"}}, -{"id":"jsonify","key":"jsonify","value":{"rev":"3-91207fd1bc11668be7906f74992de6bb"}}, -{"id":"jsonize","key":"jsonize","value":{"rev":"3-4881031480a5326d9f5966189170db25"}}, -{"id":"jsonlint","key":"jsonlint","value":{"rev":"11-88d3c1c395846e7687f410e0dc405469"}}, -{"id":"jsonml","key":"jsonml","value":{"rev":"3-9990d9515fa554b5c7ff8bf8c7bb3308"}}, -{"id":"jsonparse","key":"jsonparse","value":{"rev":"3-569962847a5fd9d65fdf91af9e3e87a5"}}, -{"id":"jsonpointer","key":"jsonpointer","value":{"rev":"5-0310a11e82e9e22a4e5239dee2bc2213"}}, -{"id":"jsonprettify","key":"jsonprettify","value":{"rev":"3-173ae677f2110dfff8cb17dd2b4c68de"}}, -{"id":"jsonreq","key":"jsonreq","value":{"rev":"5-84b47d8c528ea7efa9aae113e5ff53cf"}}, -{"id":"jsonrpc","key":"jsonrpc","value":{"rev":"10-e40ff49715537320cbbbde67378f099e"}}, -{"id":"jsonrpc-ws","key":"jsonrpc-ws","value":{"rev":"7-73c385f3d35dadbdc87927f6a751e3ca"}}, -{"id":"jsonrpc2","key":"jsonrpc2","value":{"rev":"13-71efdea4f551d3a2550fcf5355ea8c8c"}}, -{"id":"jsontool","key":"jsontool","value":{"rev":"14-44bc979d3a8dc9295c825def01e533b4"}}, -{"id":"jsontoxml","key":"jsontoxml","value":{"rev":"8-2640fd26237ab4a45450748d392dd2d2"}}, -{"id":"jsontry","key":"jsontry","value":{"rev":"3-adb3f32f86419ac4b589ce41ab253952"}}, -{"id":"jsorm-i18n","key":"jsorm-i18n","value":{"rev":"3-54347174039512616ed76cc9a37605ea"}}, -{"id":"jsorm-utilities","key":"jsorm-utilities","value":{"rev":"3-187fc9f86ed8d32ebcb6c451fa7cc3c4"}}, -{"id":"jspack","key":"jspack","value":{"rev":"3-84955792d8b57fc301968daf674bace7"}}, -{"id":"jspkg","key":"jspkg","value":{"rev":"5-f5471c37554dad3492021490a70a1190"}}, -{"id":"jspp","key":"jspp","value":{"rev":"8-7607018fa48586f685dda17d77d0999b"}}, -{"id":"jss","key":"jss","value":{"rev":"20-4517b1daeda4f878debddc9f23347f00"}}, -{"id":"jst","key":"jst","value":{"rev":"27-8372bf5c052b6bd6e28f5d2c89b47e49"}}, -{"id":"jstestdriver","key":"jstestdriver","value":{"rev":"3-d26b172af33d6c45fc3dc96b96865714"}}, -{"id":"jstoxml","key":"jstoxml","value":{"rev":"15-c26b77ed5228500238c7b21a3dbdbbb7"}}, -{"id":"jsup","key":"jsup","value":{"rev":"3-54eb8598ae1a49bd1540e482a44a6abc"}}, -{"id":"jthon","key":"jthon","value":{"rev":"5-d578940ac32497839ff48d3f6205e9e2"}}, -{"id":"juggernaut","key":"juggernaut","value":{"rev":"20-15d33218943b9ec64b642e2a4a05e4b8"}}, -{"id":"juggernaut-yoomee","key":"juggernaut-yoomee","value":{"rev":"7-a58d429e46aac76260e236c64d20ff02"}}, -{"id":"jump","key":"jump","value":{"rev":"19-d47e23c31dc623b54e60004b08f6f624"}}, -{"id":"jumprope","key":"jumprope","value":{"rev":"5-98d4e2452f14d3b0996f04882b07d674"}}, -{"id":"junction","key":"junction","value":{"rev":"3-2b73ea17d862b1e95039141e98e53268"}}, -{"id":"jus-config","key":"jus-config","value":{"rev":"5-d2da00317dceb712d82dbfc776122dbe"}}, -{"id":"jus-i18n","key":"jus-i18n","value":{"rev":"3-d146cfc5f3c9aee769390ed921836b6e"}}, -{"id":"jus-task","key":"jus-task","value":{"rev":"13-d127de2a102eef2eb0d1b67810ecd558"}}, -{"id":"justtest","key":"justtest","value":{"rev":"17-467ee4ca606f0447a0c458550552fd0a"}}, -{"id":"jute","key":"jute","value":{"rev":"99-158d262e9126de5026bbfeb3168d9277"}}, -{"id":"jwt","key":"jwt","value":{"rev":"3-4cb8a706d1bc3c300bdadeba781c7bc4"}}, -{"id":"kaffeine","key":"kaffeine","value":{"rev":"47-261825b8d8cdf168387c6a275682dd0b"}}, -{"id":"kafka","key":"kafka","value":{"rev":"9-7465d4092e6322d0b744f017be8ffcea"}}, -{"id":"kahan","key":"kahan","value":{"rev":"5-107bb2dcdb51faaa00aef1e37eff91eb"}}, -{"id":"kahve-ansi","key":"kahve-ansi","value":{"rev":"5-a86d9a3ea56362fa81c8ee9f1ef8f2ef"}}, -{"id":"kahve-cake","key":"kahve-cake","value":{"rev":"3-873b4e553c4ba417c888aadce3b800f6"}}, -{"id":"kahve-classmethod","key":"kahve-classmethod","value":{"rev":"3-08e0a5786edc15539cc6746fe6c65bec"}}, -{"id":"kahve-exception","key":"kahve-exception","value":{"rev":"3-fb9d839cfdc069271cbc10fa27a87f3c"}}, -{"id":"kahve-progress","key":"kahve-progress","value":{"rev":"3-d2fcdd99793a0c3c3a314afb067a3701"}}, -{"id":"kanso","key":"kanso","value":{"rev":"41-2b18ab56cc86313daa840b7b3f63b318"}}, -{"id":"kaph","key":"kaph","value":{"rev":"7-c24622e38cf23bac67459bfe5a0edd63"}}, -{"id":"karait","key":"karait","value":{"rev":"9-a4abc4bc11c747448c4884cb714737c9"}}, -{"id":"kasabi","key":"kasabi","value":{"rev":"3-36cb65aef11d181c532f4549d58944e6"}}, -{"id":"kassit","key":"kassit","value":{"rev":"27-6fafe5122a4dda542a34ba18dddfc9ea"}}, -{"id":"kdtree","key":"kdtree","value":{"rev":"9-177bf5018be1f177d302af1d746b0462"}}, -{"id":"keeper","key":"keeper","value":{"rev":"13-43ce24b6e1fb8ac23c58a78e3e92d137"}}, -{"id":"kestrel","key":"kestrel","value":{"rev":"3-1303ae0617ed1076eed022176c78b0c4"}}, -{"id":"kettle","key":"kettle","value":{"rev":"3-385c10c43df484666148e796840e72c7"}}, -{"id":"keyed_list","key":"keyed_list","value":{"rev":"5-c98d8bc8619300da1a09098bb298bf16"}}, -{"id":"keyframely","key":"keyframely","value":{"rev":"5-586380d2258a099d8fa4748f2688b571"}}, -{"id":"keygrip","key":"keygrip","value":{"rev":"18-4178954fb4f0e26407851104876f1a03"}}, -{"id":"keyjson","key":"keyjson","value":{"rev":"5-96ab1d8b6fa77864883b657360070af4"}}, -{"id":"keymaster","key":"keymaster","value":{"rev":"8-e7eb722489b02991943e9934b8155162"}}, -{"id":"keys","key":"keys","value":{"rev":"12-8b34b8f593667f0c23f1841edb5b6fa3"}}, -{"id":"keysym","key":"keysym","value":{"rev":"13-ec57906511f8f2f896a9e81dc206ea77"}}, -{"id":"keyx","key":"keyx","value":{"rev":"3-80dc49b56e3ba1d280298c36afa2a82c"}}, -{"id":"khronos","key":"khronos","value":{"rev":"3-1a3772db2725c4c3098d5cf4ca2189a4"}}, -{"id":"kindred","key":"kindred","value":{"rev":"5-99c7f4f06e4a47e476f9d75737f719d7"}}, -{"id":"kiokujs","key":"kiokujs","value":{"rev":"8-4b96a9bc1866f58bb263b310e64df403"}}, -{"id":"kiokujs-backend-batch","key":"kiokujs-backend-batch","value":{"rev":"3-4739de0f2e0c01581ce0b02638d3df02"}}, -{"id":"kiokujs-backend-couchdb","key":"kiokujs-backend-couchdb","value":{"rev":"8-53e830e0a7e8ea810883c00ce79bfeef"}}, -{"id":"kiss.js","key":"kiss.js","value":{"rev":"11-7c9b1d7e2faee25ade6f1cad1bb261d9"}}, -{"id":"kissy","key":"kissy","value":{"rev":"8-3f8f7c169a3e84df6a7f68315f13b3ba"}}, -{"id":"kitkat","key":"kitkat","value":{"rev":"41-5f2600e4e1c503f63702c74195ff3361"}}, -{"id":"kitkat-express","key":"kitkat-express","value":{"rev":"3-91ef779ed9acdad1ca6f776e10a70246"}}, -{"id":"kizzy","key":"kizzy","value":{"rev":"5-f281b9e4037eda414f918ec9021e28c9"}}, -{"id":"kjs","key":"kjs","value":{"rev":"3-2ee03262f843e497161f1aef500dd229"}}, -{"id":"kju","key":"kju","value":{"rev":"5-0a7de1cd26864c85a22c7727c660d441"}}, -{"id":"klass","key":"klass","value":{"rev":"39-61491ef3824772d5ef33f7ea04219461"}}, -{"id":"klout-js","key":"klout-js","value":{"rev":"8-8d99f6dad9c21cb5da0d64fefef8c6d6"}}, -{"id":"knid","key":"knid","value":{"rev":"7-2cbfae088155da1044b568584cd296df"}}, -{"id":"knox","key":"knox","value":{"rev":"19-3c42553bd201b23a6bc15fdd073dad17"}}, -{"id":"knox-stream","key":"knox-stream","value":{"rev":"17-e40275f926b6ed645e4ef04caf8e5df4"}}, -{"id":"kns","key":"kns","value":{"rev":"9-5da1a89ad8c08f4b10cd715036200da3"}}, -{"id":"ko","key":"ko","value":{"rev":"9-9df2853d0e9ed9f7740f53291d0035dd"}}, -{"id":"koala","key":"koala","value":{"rev":"8-9e3fea91917f6d8cfb5aae22115e132f"}}, -{"id":"kohai","key":"kohai","value":{"rev":"3-1721a193589459fa077fea809fd7c9a9"}}, -{"id":"koku","key":"koku","value":{"rev":"5-414736980e0e70d90cd7f29b175fb18c"}}, -{"id":"komainu","key":"komainu","value":{"rev":"5-0f1a8f132fe58385e989dd4f93aefa26"}}, -{"id":"komodo-scheme","key":"komodo-scheme","value":{"rev":"3-97d1bd27f069684c491012e079fd82c4"}}, -{"id":"konphyg","key":"konphyg","value":{"rev":"7-e5fc03d6ddf39f2e0723291800bf0d43"}}, -{"id":"kranium","key":"kranium","value":{"rev":"3-4a78d2eb28e949a55b0dbd2ab00cecaf"}}, -{"id":"kue","key":"kue","value":{"rev":"21-053b32204d89a3067c5a90ca62ede08c"}}, -{"id":"kyatchi","key":"kyatchi","value":{"rev":"21-8dfbbe498f3740a2869c82e4ab4522d1"}}, -{"id":"kyoto","key":"kyoto","value":{"rev":"15-b9acdad89d56c71b6f427a443c16f85f"}}, -{"id":"kyoto-client","key":"kyoto-client","value":{"rev":"11-7fb392ee23ce64a48ae5638d713f4fbd"}}, -{"id":"kyoto-tycoon","key":"kyoto-tycoon","value":{"rev":"18-81ece8df26dbd9986efe1d97d935bec2"}}, -{"id":"kyuri","key":"kyuri","value":{"rev":"9-bedd4c087bd7bf612bde5e862d8b91bb"}}, -{"id":"labBuilder","key":"labBuilder","value":{"rev":"11-37f85b5325f1ccf25193c8b737823185"}}, -{"id":"laconic","key":"laconic","value":{"rev":"3-f5b7b9ac113fe7d32cbf4cb0d01c3052"}}, -{"id":"languagedetect","key":"languagedetect","value":{"rev":"3-ac487c034a3470ebd47b54614ea848f9"}}, -{"id":"lastfm","key":"lastfm","value":{"rev":"52-5af213489ca6ecdf2afc851c4642b082"}}, -{"id":"layers","key":"layers","value":{"rev":"7-62cd47d9645faa588c635dab2fbd2ef0"}}, -{"id":"lazy","key":"lazy","value":{"rev":"18-9b5ccdc9c3a970ec4c2b63b6f882da6a"}}, -{"id":"lazy-image","key":"lazy-image","value":{"rev":"5-34a6bc95017c50b3cb69981c7343e5da"}}, -{"id":"lazyBum","key":"lazyBum","value":{"rev":"15-03da6d744ba8cce7efca88ccb7e18c4d"}}, -{"id":"lazyprop","key":"lazyprop","value":{"rev":"14-82b4bcf318094a7950390f03e2fec252"}}, -{"id":"ldapjs","key":"ldapjs","value":{"rev":"11-e2b28e11a0aebe37b758d8f1ed61dd57"}}, -{"id":"ldapjs-riak","key":"ldapjs-riak","value":{"rev":"7-005413a1d4e371663626a3cca200c7e0"}}, -{"id":"ldifgrep","key":"ldifgrep","value":{"rev":"3-e4f06821a3444abbcd3c0c26300dcdda"}}, -{"id":"leaf","key":"leaf","value":{"rev":"8-0ccf5cdd1b59717b53375fe4bf044ec3"}}, -{"id":"lean","key":"lean","value":{"rev":"3-32dbbc771a3f1f6697c21c5d6c516967"}}, -{"id":"leche","key":"leche","value":{"rev":"7-0f5e19052ae1e3cb25ff2aa73271ae4f"}}, -{"id":"leche.spice.io","key":"leche.spice.io","value":{"rev":"3-07db415fdb746873f211e8155ecdf232"}}, -{"id":"less","key":"less","value":{"rev":"37-160fe5ea5dba44f02defdb8ec8c647d5"}}, -{"id":"less-bal","key":"less-bal","value":{"rev":"3-d50532c7c46013a62d06a0e54f8846ce"}}, -{"id":"less4clients","key":"less4clients","value":{"rev":"5-343d2973a166801681c856558d975ddf"}}, -{"id":"lessup","key":"lessup","value":{"rev":"9-a2e7627ef1b493fe82308d019ae481ac"}}, -{"id":"lessweb","key":"lessweb","value":{"rev":"9-e21794e578884c228dbed7c5d6128a41"}}, -{"id":"leveldb","key":"leveldb","value":{"rev":"11-3809e846a7a5ff883d17263288664195"}}, -{"id":"levenshtein","key":"levenshtein","value":{"rev":"6-44d27b6a6bc407772cafc29af485854f"}}, -{"id":"lib","key":"lib","value":{"rev":"5-a95272f11e927888c8b711503fce670b"}}, -{"id":"libdtrace","key":"libdtrace","value":{"rev":"8-4d4f72b2349154da514700f576e34564"}}, -{"id":"liberator","key":"liberator","value":{"rev":"15-b702710ccb3b45e41e9e2f3ebb6375ae"}}, -{"id":"libirc","key":"libirc","value":{"rev":"3-05b125de0c179dd311129aac2e1c8047"}}, -{"id":"liblzg","key":"liblzg","value":{"rev":"5-445ed45dc3cd166a299f85f6149aa098"}}, -{"id":"libnotify","key":"libnotify","value":{"rev":"10-c6723206898865e4828e963f5acc005e"}}, -{"id":"libxml-to-js","key":"libxml-to-js","value":{"rev":"33-64d3152875d33d6feffd618152bc41df"}}, -{"id":"libxmlext","key":"libxmlext","value":{"rev":"3-6a896dacba6f25fbca9b79d4143aaa9a"}}, -{"id":"libxmljs","key":"libxmljs","value":{"rev":"17-4b2949b53d9ecde79a99361774c1144b"}}, -{"id":"libxpm","key":"libxpm","value":{"rev":"3-c03efe75832c4416ceee5d72be12a8ef"}}, -{"id":"libyaml","key":"libyaml","value":{"rev":"5-f279bde715345a4e81d43c1d798ee608"}}, -{"id":"lift","key":"lift","value":{"rev":"21-61dcb771e5e0dc03fa327120d440ccda"}}, -{"id":"light-traits","key":"light-traits","value":{"rev":"26-b35c49550f9380fd462d57c64d51540f"}}, -{"id":"lightnode","key":"lightnode","value":{"rev":"3-ce37ccbf6a6546d4fa500e0eff84e882"}}, -{"id":"limestone","key":"limestone","value":{"rev":"3-d6f76ae98e4189db4ddfa8e15b4cdea9"}}, -{"id":"limited-file","key":"limited-file","value":{"rev":"3-c1d78250965b541836a70d3e867c694f"}}, -{"id":"lin","key":"lin","value":{"rev":"17-0a26ea2a603df0d14a9c40aad96bfb5e"}}, -{"id":"line-parser","key":"line-parser","value":{"rev":"7-84047425699f5a8a8836f4f2e63777bc"}}, -{"id":"line-reader","key":"line-reader","value":{"rev":"9-d2a7cb3a9793149e643490dc16a1eb50"}}, -{"id":"linebuffer","key":"linebuffer","value":{"rev":"12-8e79075aa213ceb49b28e0af7b3f3861"}}, -{"id":"lines","key":"lines","value":{"rev":"9-01a0565f47c3816919ca75bf77539df5"}}, -{"id":"lines-adapter","key":"lines-adapter","value":{"rev":"23-f287561e42a841c00bbf94bc8741bebc"}}, -{"id":"linestream","key":"linestream","value":{"rev":"5-18c2be87653ecf20407ed70eeb601ae7"}}, -{"id":"lingo","key":"lingo","value":{"rev":"10-b3d62b203c4af108feeaf0e32b2a4186"}}, -{"id":"link","key":"link","value":{"rev":"15-7570cea23333dbe3df11fd71171e6226"}}, -{"id":"linkedin-js","key":"linkedin-js","value":{"rev":"22-1bb1f392a9838684076b422840cf98eb"}}, -{"id":"linkscape","key":"linkscape","value":{"rev":"5-7272f50a54b1db015ce6d1e79eeedad7"}}, -{"id":"linkshare","key":"linkshare","value":{"rev":"3-634c4a18a217f77ccd6b89a9a2473d2a"}}, -{"id":"linode-api","key":"linode-api","value":{"rev":"13-2b43281ec86206312a2c387c9fc2c49f"}}, -{"id":"lint","key":"lint","value":{"rev":"49-fb76fddeb3ca609e5cac75fb0b0ec216"}}, -{"id":"linter","key":"linter","value":{"rev":"18-0fc884c96350f860cf2695f615572dba"}}, -{"id":"lintnode","key":"lintnode","value":{"rev":"8-b70bca986d7bde759521d0693dbc28b8"}}, -{"id":"linux-util","key":"linux-util","value":{"rev":"9-d049e8375e9c50b7f2b6268172d79734"}}, -{"id":"liquid","key":"liquid","value":{"rev":"3-353fa3c93ddf1951e3a75d60e6e8757b"}}, -{"id":"liquor","key":"liquor","value":{"rev":"3-4ee78e69a4a400a4de3491b0954947e7"}}, -{"id":"listener","key":"listener","value":{"rev":"5-02b5858d36aa99dcc5fc03c9274c94ee"}}, -{"id":"litmus","key":"litmus","value":{"rev":"9-7e403d052483301d025e9d09b4e7a9dd"}}, -{"id":"littering","key":"littering","value":{"rev":"5-9026438311ffc18d369bfa886c120bcd"}}, -{"id":"live-twitter-map","key":"live-twitter-map","value":{"rev":"3-45a40054bbab23374a4f1743c8bd711d"}}, -{"id":"livereload","key":"livereload","value":{"rev":"5-11ff486b4014ec1998705dbd396e96f2"}}, -{"id":"load","key":"load","value":{"rev":"7-2fff87aeb91d74bc57c134ee2cf0d65b"}}, -{"id":"loadbuilder","key":"loadbuilder","value":{"rev":"9-fa9c5cb13b3af03f9d9fbf5064fa0e0f"}}, -{"id":"loadit","key":"loadit","value":{"rev":"3-51bee062ed0d985757c6ae24929fa74e"}}, -{"id":"local-cdn","key":"local-cdn","value":{"rev":"9-9c2931766a559cf036318583455456e6"}}, -{"id":"localStorage","key":"localStorage","value":{"rev":"3-455fbe195db27131789b5d59db4504b0"}}, -{"id":"locales","key":"locales","value":{"rev":"5-bee452772e2070ec07af0dd86d6dbc41"}}, -{"id":"localhose","key":"localhose","value":{"rev":"9-3a2f63ecbed2e31400ca7515fd020a77"}}, -{"id":"localhost","key":"localhost","value":{"rev":"3-c6c4f6b5688cbe62865010099c9f461f"}}, -{"id":"localhostapp","key":"localhostapp","value":{"rev":"3-17884c4847c549e07e0c881fdf60d01f"}}, -{"id":"localize","key":"localize","value":{"rev":"7-1f83adb6d1eefcf7222a05f489b5db10"}}, -{"id":"location","key":"location","value":{"rev":"3-cc6fbf77b4ade80312bd95fde4e00015"}}, -{"id":"lockfile","key":"lockfile","value":{"rev":"3-4b4b79c2b0f09cc516db1a9d581c5038"}}, -{"id":"lode","key":"lode","value":{"rev":"15-5062a9a0863770d172097c5074a2bdae"}}, -{"id":"log","key":"log","value":{"rev":"12-0aa7922459ff8397764956c56a106930"}}, -{"id":"log-buddy","key":"log-buddy","value":{"rev":"3-64c6d4927d1d235d927f09c16c874e06"}}, -{"id":"log-watcher","key":"log-watcher","value":{"rev":"3-70f8727054c8e4104f835930578f4ee1"}}, -{"id":"log4js","key":"log4js","value":{"rev":"38-137b28e6e96515da7a6399cae86795dc"}}, -{"id":"log4js-amqp","key":"log4js-amqp","value":{"rev":"3-90530c28ef63d4598c12dfcf450929c0"}}, -{"id":"log5","key":"log5","value":{"rev":"17-920e3765dcfdc31bddf13de6895122b3"}}, -{"id":"logbot","key":"logbot","value":{"rev":"3-234eedc70b5474c713832e642f4dc3b4"}}, -{"id":"logger","key":"logger","value":{"rev":"3-5eef338fb5e845a81452fbb22e582aa7"}}, -{"id":"logging","key":"logging","value":{"rev":"22-99d320792c5445bd04699c4cf19edd89"}}, -{"id":"logging-system","key":"logging-system","value":{"rev":"5-5eda9d0b1d04256f5f44abe51cd14626"}}, -{"id":"loggly","key":"loggly","value":{"rev":"49-944a404e188327431a404e5713691a8c"}}, -{"id":"login","key":"login","value":{"rev":"44-7c450fe861230a5121ff294bcd6f97c9"}}, -{"id":"logly","key":"logly","value":{"rev":"7-832fe9af1cd8bfed84a065822cec398a"}}, -{"id":"logmagic","key":"logmagic","value":{"rev":"11-5d2c7dd32ba55e5ab85127be09723ef8"}}, -{"id":"logmonger","key":"logmonger","value":{"rev":"3-07a101d795f43f7af668210660274a7b"}}, -{"id":"lokki","key":"lokki","value":{"rev":"3-f6efcce38029ea0b4889707764088540"}}, -{"id":"long-stack-traces","key":"long-stack-traces","value":{"rev":"7-4b2fe23359b29e188cb2b8936b63891a"}}, -{"id":"loom","key":"loom","value":{"rev":"3-6348ab890611154da4881a0b351b0cb5"}}, -{"id":"loop","key":"loop","value":{"rev":"3-a56e9a6144f573092bb441106b370e0c"}}, -{"id":"looseleaf","key":"looseleaf","value":{"rev":"57-46ef6f055a40c34c714e3e9b9fe5d4cd"}}, -{"id":"lovely","key":"lovely","value":{"rev":"21-f577923512458f02f48ef59eebe55176"}}, -{"id":"lpd","key":"lpd","value":{"rev":"3-433711ae25002f67aa339380668fd491"}}, -{"id":"lpd-printers","key":"lpd-printers","value":{"rev":"3-47060e6c05fb4aad227d36f6e7941227"}}, -{"id":"lru-cache","key":"lru-cache","value":{"rev":"10-23c5e7423fe315745ef924f58c36e119"}}, -{"id":"ls-r","key":"ls-r","value":{"rev":"7-a769b11a06fae8ff439fe7eeb0806b5e"}}, -{"id":"lsof","key":"lsof","value":{"rev":"5-82aa3bcf23b8026a95e469b6188938f9"}}, -{"id":"ltx","key":"ltx","value":{"rev":"21-89ca85a9ce0c9fc13b20c0f1131168b0"}}, -{"id":"lucky-server","key":"lucky-server","value":{"rev":"3-a50d87239166f0ffc374368463f96b07"}}, -{"id":"lunapark","key":"lunapark","value":{"rev":"3-841d197f404da2e63d69b0c2132d87db"}}, -{"id":"lunchbot","key":"lunchbot","value":{"rev":"3-5d8984bef249e3d9e271560b5753f4cf"}}, -{"id":"lw-nun","key":"lw-nun","value":{"rev":"3-b686f89361b7b405e4581db6c60145ed"}}, -{"id":"lw-sass","key":"lw-sass","value":{"rev":"3-e46f90e0c8eab0c8c5d5eb8cf2a9a6da"}}, -{"id":"lwes","key":"lwes","value":{"rev":"3-939bb87efcbede1c1a70de881686fbce"}}, -{"id":"lwink","key":"lwink","value":{"rev":"3-1c432fafe4809e8d4a7e6214123ae452"}}, -{"id":"lzma","key":"lzma","value":{"rev":"3-31dc39414531e329b42b3a4ea0292c43"}}, -{"id":"m1node","key":"m1node","value":{"rev":"11-b34d55bdbc6f65b1814e77fab4a7e823"}}, -{"id":"m1test","key":"m1test","value":{"rev":"3-815ce56949e41e120082632629439eac"}}, -{"id":"m2node","key":"m2node","value":{"rev":"7-f50ec5578d995dd6a0a38e1049604bfc"}}, -{"id":"m2pdb","key":"m2pdb","value":{"rev":"3-ee798ac17c8c554484aceae2f77a826b"}}, -{"id":"m3u","key":"m3u","value":{"rev":"5-7ca6d768e0aed5b88dd45c943ca9ffa0"}}, -{"id":"mac","key":"mac","value":{"rev":"21-db5883c390108ff9ba46660c78b18b6c"}}, -{"id":"macchiato","key":"macchiato","value":{"rev":"5-0df1c87029e6005577fd8fd5cdb25947"}}, -{"id":"macgyver","key":"macgyver","value":{"rev":"3-f517699102b7bd696d8197d7ce57afb9"}}, -{"id":"macros","key":"macros","value":{"rev":"3-8356bcc0d1b1bd3879eeb880b2f3330b"}}, -{"id":"macrotest","key":"macrotest","value":{"rev":"10-2c6ceffb38f8ce5b0f382dbb02720d70"}}, -{"id":"maddy","key":"maddy","value":{"rev":"9-93d59c65c3f44aa6ed43dc986dd73ca5"}}, -{"id":"madmimi-node","key":"madmimi-node","value":{"rev":"11-257e1b1bd5ee5194a7052542952b8b7a"}}, -{"id":"maga","key":"maga","value":{"rev":"24-c69734f9fc138788db741b862f889583"}}, -{"id":"magic","key":"magic","value":{"rev":"34-aed787cc30ab86c95f547b9555d6a381"}}, -{"id":"magic-templates","key":"magic-templates","value":{"rev":"3-89546e9a038150cf419b4b15a84fd2aa"}}, -{"id":"magickal","key":"magickal","value":{"rev":"3-e9ed74bb90df0a52564d47aed0451ce7"}}, -{"id":"mai","key":"mai","value":{"rev":"5-f3561fe6de2bd25201250ddb6dcf9f01"}}, -{"id":"mail","key":"mail","value":{"rev":"14-9ae558552e6a7c11017f118a71c072e9"}}, -{"id":"mail-stack","key":"mail-stack","value":{"rev":"5-c82567203540076cf4878ea1ab197b52"}}, -{"id":"mailbox","key":"mailbox","value":{"rev":"12-0b582e127dd7cf669de16ec36f8056a4"}}, -{"id":"mailchimp","key":"mailchimp","value":{"rev":"23-3d9328ee938b7940322351254ea54877"}}, -{"id":"mailer","key":"mailer","value":{"rev":"40-7b251b758f9dba4667a3127195ea0380"}}, -{"id":"mailer-bal","key":"mailer-bal","value":{"rev":"3-fc8265b1905ea37638309d7c10852050"}}, -{"id":"mailer-fixed","key":"mailer-fixed","value":{"rev":"13-3004df43c62eb64ed5fb0306b019fe66"}}, -{"id":"mailgun","key":"mailgun","value":{"rev":"25-29de1adb355636822dc21fef51f37aed"}}, -{"id":"mailparser","key":"mailparser","value":{"rev":"14-7142e4168046418afc4a76d1b330f302"}}, -{"id":"mailto-parser","key":"mailto-parser","value":{"rev":"3-f8dea7b60c0e993211f81a86dcf5b18d"}}, -{"id":"makeerror","key":"makeerror","value":{"rev":"17-ceb9789357d80467c9ae75caa64ca8ac"}}, -{"id":"malt","key":"malt","value":{"rev":"7-e5e76a842eb0764a5ebe57290b629097"}}, -{"id":"mango","key":"mango","value":{"rev":"7-6224e74a3132e54f294f62998ed9127f"}}, -{"id":"map-reduce","key":"map-reduce","value":{"rev":"11-a81d8bdc6dae7e7b76d5df74fff40ae1"}}, -{"id":"mapnik","key":"mapnik","value":{"rev":"64-693f5b957b7faf361c2cc2a22747ebf7"}}, -{"id":"maptail","key":"maptail","value":{"rev":"14-8334618ddc20006a5f77ff35b172c152"}}, -{"id":"marak","key":"marak","value":{"rev":"3-27be187af00fc97501035dfb97a11ecf"}}, -{"id":"markdoc","key":"markdoc","value":{"rev":"13-23becdeda44b26ee54c9aaa31457e4ba"}}, -{"id":"markdom","key":"markdom","value":{"rev":"10-3c0df12e4f4a2e675d0f0fde48aa425f"}}, -{"id":"markdown","key":"markdown","value":{"rev":"19-88e02c28ce0179be900bf9e6aadc070f"}}, -{"id":"markdown-js","key":"markdown-js","value":{"rev":"6-964647c2509850358f70f4e23670fbeb"}}, -{"id":"markdown-wiki","key":"markdown-wiki","value":{"rev":"6-ce35fb0612a463db5852c5d3dcc7fdd3"}}, -{"id":"markdown2html","key":"markdown2html","value":{"rev":"3-549babe5d9497785fa8b9305c81d7214"}}, -{"id":"marked","key":"marked","value":{"rev":"21-9371df65f63131c9f24e8805db99a7d9"}}, -{"id":"markov","key":"markov","value":{"rev":"13-9ab795448c54ef87851f1392d6f3671a"}}, -{"id":"maryjane","key":"maryjane","value":{"rev":"3-e2e6cce443850b5df1554bf851d16760"}}, -{"id":"massagist","key":"massagist","value":{"rev":"11-cac3a103aecb4ff3f0f607aca2b1d3fb"}}, -{"id":"masson","key":"masson","value":{"rev":"10-87a5e6fd05bd4b8697fa3fa636238c20"}}, -{"id":"masstransit","key":"masstransit","value":{"rev":"11-74898c746e541ff1a00438017ee66d4a"}}, -{"id":"matchmaker","key":"matchmaker","value":{"rev":"3-192db6fb162bdf84fa3e858092fd3e20"}}, -{"id":"math","key":"math","value":{"rev":"5-16a74d8639e44a5ccb265ab1a3b7703b"}}, -{"id":"math-lexer","key":"math-lexer","value":{"rev":"19-54b42374b0090eeee50f39cb35f2eb40"}}, -{"id":"matrices","key":"matrices","value":{"rev":"43-06d64271a5148f89d649645712f8971f"}}, -{"id":"matrix","key":"matrix","value":{"rev":"3-77cff57242445cf3d76313b72bbc38f4"}}, -{"id":"matrixlib","key":"matrixlib","value":{"rev":"11-b3c105a5e5be1835183e7965d04825d9"}}, -{"id":"matterhorn","key":"matterhorn","value":{"rev":"9-a310dba2ea054bdce65e6df2f6ae85e5"}}, -{"id":"matterhorn-dust","key":"matterhorn-dust","value":{"rev":"3-2fb311986d62cf9f180aa76038ebf7b3"}}, -{"id":"matterhorn-gui","key":"matterhorn-gui","value":{"rev":"3-7921b46c9bff3ee82e4b32bc0a0a977d"}}, -{"id":"matterhorn-prng","key":"matterhorn-prng","value":{"rev":"3-c33fd59c1f1d24fb423553ec242e444b"}}, -{"id":"matterhorn-standard","key":"matterhorn-standard","value":{"rev":"13-0aaab6ecf55cdad6f773736da968afba"}}, -{"id":"matterhorn-state","key":"matterhorn-state","value":{"rev":"3-0ba8fd8a4c644b18aff34f1aef95db33"}}, -{"id":"matterhorn-user","key":"matterhorn-user","value":{"rev":"17-e42dc37a5cb24710803b3bd8dee7484d"}}, -{"id":"matterhorn-view","key":"matterhorn-view","value":{"rev":"3-b39042d665f5912d02e724d33d129a97"}}, -{"id":"mbtiles","key":"mbtiles","value":{"rev":"41-b92035d0ec8f47850734c4bb995baf7d"}}, -{"id":"mcast","key":"mcast","value":{"rev":"8-559b2b09cfa34cb88c16ae72ec90d28a"}}, -{"id":"md5","key":"md5","value":{"rev":"3-43d600c70f6442d3878c447585bf43bf"}}, -{"id":"mdgram","key":"mdgram","value":{"rev":"15-4d65cf0d5edef976de9a612c0cde0907"}}, -{"id":"mdns","key":"mdns","value":{"rev":"11-8b6789c3779fce7f019f9f10c625147a"}}, -{"id":"mecab-binding","key":"mecab-binding","value":{"rev":"3-3395763d23a3f8e3e00ba75cb988f9b4"}}, -{"id":"mechanize","key":"mechanize","value":{"rev":"5-94b72f43e270aa24c00e283fa52ba398"}}, -{"id":"mediatags","key":"mediatags","value":{"rev":"3-d5ea41e140fbbc821590cfefdbd016a5"}}, -{"id":"mediator","key":"mediator","value":{"rev":"3-42aac2225b47f72f97001107a3d242f5"}}, -{"id":"memcache","key":"memcache","value":{"rev":"5-aebcc4babe11b654afd3cede51e945ec"}}, -{"id":"memcached","key":"memcached","value":{"rev":"9-7c46464425c78681a8e6767ef9993c4c"}}, -{"id":"memcouchd","key":"memcouchd","value":{"rev":"3-b57b9fb4f6c60604f616c2f70456b4d6"}}, -{"id":"meme","key":"meme","value":{"rev":"11-53fcb51e1d8f8908b95f0fa12788e9aa"}}, -{"id":"memo","key":"memo","value":{"rev":"9-3a9ca97227ed19cacdacf10ed193ee8b"}}, -{"id":"memoize","key":"memoize","value":{"rev":"15-44bdd127c49035c8bd781a9299c103c2"}}, -{"id":"memoizer","key":"memoizer","value":{"rev":"9-d9a147e8c8a58fd7e8f139dc902592a6"}}, -{"id":"memorystream","key":"memorystream","value":{"rev":"9-6d0656067790e158f3c4628968ed70d3"}}, -{"id":"memstore","key":"memstore","value":{"rev":"5-03dcac59882c8a434e4c2fe2ac354941"}}, -{"id":"mercury","key":"mercury","value":{"rev":"3-147af865af6f7924f44f14f4b5c14dac"}}, -{"id":"mersenne","key":"mersenne","value":{"rev":"7-d8ae550eb8d0deaa1fd60f86351cb548"}}, -{"id":"meryl","key":"meryl","value":{"rev":"23-2c0e3fad99005109c584530e303bc5bf"}}, -{"id":"mesh","key":"mesh","value":{"rev":"5-f3ea4aef5b3f169eab8b518e5044c950"}}, -{"id":"meta-promise","key":"meta-promise","value":{"rev":"5-0badf85ab432341e6256252463468b89"}}, -{"id":"meta-test","key":"meta-test","value":{"rev":"49-92df2922499960ac750ce96d861ddd7e"}}, -{"id":"meta_code","key":"meta_code","value":{"rev":"7-9b4313c0c52a09c788464f1fea05baf7"}}, -{"id":"metamanager","key":"metamanager","value":{"rev":"5-dbb0312dad15416d540eb3d860fbf205"}}, -{"id":"metaweblog","key":"metaweblog","value":{"rev":"3-d3ab090ec27242e220412d6413e388ee"}}, -{"id":"metric","key":"metric","value":{"rev":"3-8a706db5b518421ad640a75e65cb4be9"}}, -{"id":"metrics","key":"metrics","value":{"rev":"13-62e5627c1ca5e6d3b3bde8d17e675298"}}, -{"id":"metrics-broker","key":"metrics-broker","value":{"rev":"15-0fdf57ea4ec84aa1f905f53b4975e72d"}}, -{"id":"mhash","key":"mhash","value":{"rev":"3-f00d65dc939474a5c508d37a327e5074"}}, -{"id":"micro","key":"micro","value":{"rev":"17-882c0ecf34ddaef5c673c547ae80b80b"}}, -{"id":"microcache","key":"microcache","value":{"rev":"3-ef75e04bc6e86d14f93ad9c429503bd9"}}, -{"id":"microevent","key":"microevent","value":{"rev":"3-9c0369289b62873ef6e8624eef724d15"}}, -{"id":"microtest","key":"microtest","value":{"rev":"11-11afdadfb15c1db030768ce52f34de1a"}}, -{"id":"microtime","key":"microtime","value":{"rev":"20-5f75e87316cbb5f7a4be09142cd755e5"}}, -{"id":"middlefiddle","key":"middlefiddle","value":{"rev":"13-bb94c05d75c24bdeb23a4637c7ecf55e"}}, -{"id":"middleware","key":"middleware","value":{"rev":"5-80937a4c620fcc2a5532bf064ec0837b"}}, -{"id":"midi","key":"midi","value":{"rev":"9-96da6599a84a761430adfd41deb3969a"}}, -{"id":"midi-js","key":"midi-js","value":{"rev":"11-1d174af1352e3d37f6ec0df32d56ce1a"}}, -{"id":"migrate","key":"migrate","value":{"rev":"13-7493879fb60a31b9e2a9ad19e94bfef6"}}, -{"id":"mikronode","key":"mikronode","value":{"rev":"31-1edae4ffbdb74c43ea584a7757dacc9b"}}, -{"id":"milk","key":"milk","value":{"rev":"21-81fb117817ed2e4c19e16dc310c09735"}}, -{"id":"millstone","key":"millstone","value":{"rev":"29-73d54de4b4de313b0fec4edfaec741a4"}}, -{"id":"mime","key":"mime","value":{"rev":"33-de72b641474458cb21006dea6a524ceb"}}, -{"id":"mime-magic","key":"mime-magic","value":{"rev":"13-2df6b966d7f29d5ee2dd2e1028d825b1"}}, -{"id":"mimelib","key":"mimelib","value":{"rev":"9-7994cf0fe3007329b9397f4e08481487"}}, -{"id":"mimelib-noiconv","key":"mimelib-noiconv","value":{"rev":"5-c84995d4b2bbe786080c9b54227b5bb4"}}, -{"id":"mimeograph","key":"mimeograph","value":{"rev":"37-bead083230f48f354f3ccac35e11afc0"}}, -{"id":"mimeparse","key":"mimeparse","value":{"rev":"8-5ca7e6702fe7f1f37ed31b05e82f4a87"}}, -{"id":"mingy","key":"mingy","value":{"rev":"19-09b19690c55abc1e940374e25e9a0d26"}}, -{"id":"mini-lzo-wrapper","key":"mini-lzo-wrapper","value":{"rev":"4-d751d61f481363a2786ac0312893dfca"}}, -{"id":"miniee","key":"miniee","value":{"rev":"5-be0833a9f15382695f861a990f3d6108"}}, -{"id":"minifyjs","key":"minifyjs","value":{"rev":"13-f255df8c7567440bc4c0f8eaf04a18c6"}}, -{"id":"minimal","key":"minimal","value":{"rev":"5-6be6b3454d30c59a30f9ee8af0ee606c"}}, -{"id":"minimal-test","key":"minimal-test","value":{"rev":"15-65dca2c1ee27090264577cc8b93983cb"}}, -{"id":"minimatch","key":"minimatch","value":{"rev":"11-449e570c76f4e6015c3dc90f080f8c47"}}, -{"id":"minirpc","key":"minirpc","value":{"rev":"10-e85b92273a97fa86e20faef7a3b50518"}}, -{"id":"ministore","key":"ministore","value":{"rev":"11-f131868141ccd0851bb91800c86dfff1"}}, -{"id":"minitest","key":"minitest","value":{"rev":"13-c92e32499a25ff2d7e484fbbcabe1081"}}, -{"id":"miniweb","key":"miniweb","value":{"rev":"3-e8c413a77e24891138eaa9e73cb08715"}}, -{"id":"minj","key":"minj","value":{"rev":"9-ccf50caf8e38b0fc2508f01a63f80510"}}, -{"id":"minotaur","key":"minotaur","value":{"rev":"29-6d048956b26e8a213f6ccc96027bacde"}}, -{"id":"mirror","key":"mirror","value":{"rev":"21-01bdd78ff03ca3f8f99fce104baab9f9"}}, -{"id":"misao-chan","key":"misao-chan","value":{"rev":"13-f032690f0897fc4a1dc12f1e03926627"}}, -{"id":"mite.node","key":"mite.node","value":{"rev":"13-0bfb15c4a6f172991756660b29869dd4"}}, -{"id":"mixable","key":"mixable","value":{"rev":"3-bc518ab862a6ceacc48952b9bec7d61a"}}, -{"id":"mixin","key":"mixin","value":{"rev":"3-3a7ae89345d21ceaf545d93b20caf2f2"}}, -{"id":"mixinjs","key":"mixinjs","value":{"rev":"3-064173d86b243316ef1b6c5743a60bf9"}}, -{"id":"mixpanel","key":"mixpanel","value":{"rev":"7-f742248bfbfc480658c4c46f7ab7a74a"}}, -{"id":"mixpanel-api","key":"mixpanel-api","value":{"rev":"5-61a3fa28921887344d1af339917e147a"}}, -{"id":"mixpanel_api","key":"mixpanel_api","value":{"rev":"3-11939b6fd20b80bf9537380875bf3996"}}, -{"id":"mjoe","key":"mjoe","value":{"rev":"3-8b3549cd6edcc03112217370b071b076"}}, -{"id":"mjsunit.runner","key":"mjsunit.runner","value":{"rev":"12-94c779b555069ca5fb0bc9688515673e"}}, -{"id":"mkdir","key":"mkdir","value":{"rev":"3-e8fd61b35638f1f3a65d36f09344ff28"}}, -{"id":"mkdirp","key":"mkdirp","value":{"rev":"15-c8eacf17b336ea98d1d9960f02362cbf"}}, -{"id":"mmap","key":"mmap","value":{"rev":"16-df335eb3257dfbd2fb0de341970d2656"}}, -{"id":"mmikulicic-thrift","key":"mmikulicic-thrift","value":{"rev":"3-f4a9f7a97bf50e966d1184fba423a07f"}}, -{"id":"mmmodel","key":"mmmodel","value":{"rev":"7-00d61723742a325aaaa6955ba52cef60"}}, -{"id":"mmodel","key":"mmodel","value":{"rev":"3-717309af27d6c5d98ed188c9c9438a37"}}, -{"id":"mmseg","key":"mmseg","value":{"rev":"17-794d553e67d6023ca3d58dd99fe1da15"}}, -{"id":"mobilize","key":"mobilize","value":{"rev":"25-8a657ec0accf8db2e8d7b935931ab77b"}}, -{"id":"mock","key":"mock","value":{"rev":"3-d8805bff4796462750071cddd3f75ea7"}}, -{"id":"mock-request","key":"mock-request","value":{"rev":"7-4ac4814c23f0899b1100d5f0617e40f4"}}, -{"id":"mock-request-response","key":"mock-request-response","value":{"rev":"5-fe1566c9881039a92a80e0e82a95f096"}}, -{"id":"mocket","key":"mocket","value":{"rev":"13-9001879cd3cb6f52f3b2d85fb14b8f9b"}}, -{"id":"modbus-stack","key":"modbus-stack","value":{"rev":"7-50c56e74d9cb02c5d936b0b44c54f621"}}, -{"id":"model","key":"model","value":{"rev":"3-174181c2f314f35fc289b7a921ba4d39"}}, -{"id":"models","key":"models","value":{"rev":"8-6cc2748edfd96679f9bb3596864874a9"}}, -{"id":"modestmaps","key":"modestmaps","value":{"rev":"8-79265968137a2327f98bfc6943a84da9"}}, -{"id":"modjewel","key":"modjewel","value":{"rev":"3-73efc7b9dc24d82cab1de249896193fd"}}, -{"id":"modlr","key":"modlr","value":{"rev":"17-ccf16db98ab6ccb95e005b3bb76dba64"}}, -{"id":"module-grapher","key":"module-grapher","value":{"rev":"19-b6ba30b41e29fc01d4b679a643f030e5"}}, -{"id":"modulr","key":"modulr","value":{"rev":"15-8e8ffd75c6c6149206de4ce0c2aefad7"}}, -{"id":"mogile","key":"mogile","value":{"rev":"5-79a8af20dbe6bff166ac2197a3998b0c"}}, -{"id":"mojo","key":"mojo","value":{"rev":"25-1d9c26d6afd6ea77253f220d86d60307"}}, -{"id":"monad","key":"monad","value":{"rev":"10-cf20354900b7e67d94c342feb06a1eb9"}}, -{"id":"mongeese","key":"mongeese","value":{"rev":"3-f4b319d98f9f73fb17cd3ebc7fc86412"}}, -{"id":"mongo-pool","key":"mongo-pool","value":{"rev":"3-215481828e69fd874b5938a79a7e0934"}}, -{"id":"mongodb","key":"mongodb","value":{"rev":"147-3dc09965e762787f34131a8739297383"}}, -{"id":"mongodb-async","key":"mongodb-async","value":{"rev":"7-ba9097bdc86b72885fa5a9ebb49a64d0"}}, -{"id":"mongodb-provider","key":"mongodb-provider","value":{"rev":"5-5523643b403e969e0b80c57db08cb9d3"}}, -{"id":"mongodb-rest","key":"mongodb-rest","value":{"rev":"36-60b4abc4a22f31de09407cc7cdd0834f"}}, -{"id":"mongodb-wrapper","key":"mongodb-wrapper","value":{"rev":"13-7a6c5eaff36ede45211aa80f3a506cfe"}}, -{"id":"mongodb_heroku","key":"mongodb_heroku","value":{"rev":"3-05947c1e06e1f8860c7809b063a8d1a0"}}, -{"id":"mongode","key":"mongode","value":{"rev":"11-faa14f050da4a165e2568d413a6b8bc0"}}, -{"id":"mongojs","key":"mongojs","value":{"rev":"26-a628eb51534ffcdd97c1a940d460a52c"}}, -{"id":"mongolia","key":"mongolia","value":{"rev":"76-711c39de0e152e224d4118c9b0de834f"}}, -{"id":"mongolian","key":"mongolian","value":{"rev":"44-3773671b31c406a18cb9f5a1764ebee4"}}, -{"id":"mongoose","key":"mongoose","value":{"rev":"181-03a8aa7f691cbd987995bf6e3354e0f5"}}, -{"id":"mongoose-admin","key":"mongoose-admin","value":{"rev":"7-59078ad5a345e9e66574346d3e70f9ad"}}, -{"id":"mongoose-auth","key":"mongoose-auth","value":{"rev":"49-87c79f3a6164c438a53b7629be87ae5d"}}, -{"id":"mongoose-autoincr","key":"mongoose-autoincr","value":{"rev":"3-9c4dd7c3fdcd8621166665a68fccb602"}}, -{"id":"mongoose-closures","key":"mongoose-closures","value":{"rev":"3-2ff9cff790f387f2236a2c7382ebb55b"}}, -{"id":"mongoose-crypt","key":"mongoose-crypt","value":{"rev":"3-d77ffbf250e39fcc290ad37824fe2236"}}, -{"id":"mongoose-dbref","key":"mongoose-dbref","value":{"rev":"29-02090b9904fd6f5ce72afcfa729f7c96"}}, -{"id":"mongoose-flatmatcher","key":"mongoose-flatmatcher","value":{"rev":"5-4f0565901e8b588cc562ae457ad975a6"}}, -{"id":"mongoose-helpers","key":"mongoose-helpers","value":{"rev":"3-3a57e9819e24c9b0f5b5eabe41037092"}}, -{"id":"mongoose-joins","key":"mongoose-joins","value":{"rev":"3-9bae444730a329473421f50cba1c86a7"}}, -{"id":"mongoose-misc","key":"mongoose-misc","value":{"rev":"3-bcd7f3f450cf6ed233d042ac574409ce"}}, -{"id":"mongoose-relationships","key":"mongoose-relationships","value":{"rev":"9-6155a276b162ec6593b8542f0f769024"}}, -{"id":"mongoose-rest","key":"mongoose-rest","value":{"rev":"29-054330c035adf842ab34423215995113"}}, -{"id":"mongoose-spatial","key":"mongoose-spatial","value":{"rev":"3-88660dabd485edcaa29a2ea01afb90bd"}}, -{"id":"mongoose-temporal","key":"mongoose-temporal","value":{"rev":"3-1dd736395fe9be95498e588df502b7bb"}}, -{"id":"mongoose-types","key":"mongoose-types","value":{"rev":"13-8126458b91ef1bf46e582042f5dbd015"}}, -{"id":"mongoose-units","key":"mongoose-units","value":{"rev":"3-5fcdb7aedb1d5cff6e18ee1352c3d0f7"}}, -{"id":"mongoq","key":"mongoq","value":{"rev":"11-2060d674d5f8a964e800ed4470b92587"}}, -{"id":"mongoskin","key":"mongoskin","value":{"rev":"13-5a7bfacd9e9b95ec469f389751e7e435"}}, -{"id":"mongous","key":"mongous","value":{"rev":"3-4d98b4a4bfdd6d9f46342002a69d8d3a"}}, -{"id":"mongrel2","key":"mongrel2","value":{"rev":"3-93156356e478f30fc32455054e384b80"}}, -{"id":"monguava","key":"monguava","value":{"rev":"9-69ec50128220aba3e16128a4be2799c0"}}, -{"id":"mongueue","key":"mongueue","value":{"rev":"9-fc8d9df5bf15f5a25f68cf58866f11fe"}}, -{"id":"moniker","key":"moniker","value":{"rev":"5-a139616b725ddfdd1db6a376fb6584f7"}}, -{"id":"monitor","key":"monitor","value":{"rev":"56-44d2b8b7dec04b3f320f7dc4a1704c53"}}, -{"id":"monome","key":"monome","value":{"rev":"3-2776736715cbfc045bf7b42e70ccda9c"}}, -{"id":"monomi","key":"monomi","value":{"rev":"6-b6b745441f157cc40c846d23cd14297a"}}, -{"id":"moof","key":"moof","value":{"rev":"13-822b4ebf873b720bd4c7e16fcbbbbb3d"}}, -{"id":"moonshado","key":"moonshado","value":{"rev":"3-b54de1aef733c8fa118fa7cf6af2fb9b"}}, -{"id":"moose","key":"moose","value":{"rev":"5-e11c8b7c09826e3431ed3408ee874779"}}, -{"id":"mootools","key":"mootools","value":{"rev":"9-39f5535072748ccd3cf0212ef4c3d4fa"}}, -{"id":"mootools-array","key":"mootools-array","value":{"rev":"3-d1354704a9fe922d969c2bf718e0dc53"}}, -{"id":"mootools-browser","key":"mootools-browser","value":{"rev":"3-ce0946b357b6ddecc128febef2c5d720"}}, -{"id":"mootools-class","key":"mootools-class","value":{"rev":"3-0ea815d28b61f3880087e3f4b8668354"}}, -{"id":"mootools-class-extras","key":"mootools-class-extras","value":{"rev":"3-575796745bd169c35f4fc0019bb36b76"}}, -{"id":"mootools-client","key":"mootools-client","value":{"rev":"3-b658c331f629f80bfe17c3e6ed44c525"}}, -{"id":"mootools-cookie","key":"mootools-cookie","value":{"rev":"3-af93588531e5a52c76a8e7a4eac3612a"}}, -{"id":"mootools-core","key":"mootools-core","value":{"rev":"3-01b1678fc56d94d29566b7853ad56059"}}, -{"id":"mootools-domready","key":"mootools-domready","value":{"rev":"3-0fc6620e2c8f7d107816cace9c099633"}}, -{"id":"mootools-element","key":"mootools-element","value":{"rev":"3-bac857c1701c91207d1ec6d1eb002d07"}}, -{"id":"mootools-element-dimensions","key":"mootools-element-dimensions","value":{"rev":"3-d82df62b3e97122ad0a7668efb7ba776"}}, -{"id":"mootools-element-event","key":"mootools-element-event","value":{"rev":"3-a30380151989ca31851cf751fcd55e9a"}}, -{"id":"mootools-element-style","key":"mootools-element-style","value":{"rev":"3-6103fa8551a21dc592e410dc7df647f8"}}, -{"id":"mootools-event","key":"mootools-event","value":{"rev":"3-7327279ec157de8c47f3ee24615ead95"}}, -{"id":"mootools-function","key":"mootools-function","value":{"rev":"3-eb3ee17acf40d6cc05463cb88edc6f5e"}}, -{"id":"mootools-fx","key":"mootools-fx","value":{"rev":"3-757ab6c8423e8c434d1ee783ea28cdb5"}}, -{"id":"mootools-fx-css","key":"mootools-fx-css","value":{"rev":"3-8eb0cf468c826b9c485835fab94837e7"}}, -{"id":"mootools-fx-morph","key":"mootools-fx-morph","value":{"rev":"3-b91310f8a81221592970fe7632bd9f7a"}}, -{"id":"mootools-fx-transitions","key":"mootools-fx-transitions","value":{"rev":"3-a1ecde35dfbb80f3a6062005758bb934"}}, -{"id":"mootools-fx-tween","key":"mootools-fx-tween","value":{"rev":"3-39497defbffdf463932cc9f00cde8d5d"}}, -{"id":"mootools-json","key":"mootools-json","value":{"rev":"3-69deb6679a5d1d49f22e19834ae07c32"}}, -{"id":"mootools-more","key":"mootools-more","value":{"rev":"3-d8f46ce319ca0e3deb5fc04ad5f73cb9"}}, -{"id":"mootools-number","key":"mootools-number","value":{"rev":"3-9f4494883ac39f93734fea9af6ef2fc5"}}, -{"id":"mootools-object","key":"mootools-object","value":{"rev":"3-c9632dfa793ab4d9ad4b68a2e27f09fc"}}, -{"id":"mootools-request","key":"mootools-request","value":{"rev":"3-663e5472f351eea3b7488ee441bc6a61"}}, -{"id":"mootools-request-html","key":"mootools-request-html","value":{"rev":"3-0ab9576c11a564d44b3c3ca3ef3dc240"}}, -{"id":"mootools-request-json","key":"mootools-request-json","value":{"rev":"3-c0359201c94ba1684ea6336e35cd70c2"}}, -{"id":"mootools-server","key":"mootools-server","value":{"rev":"3-98e89499f6eab137bbab053a3932a526"}}, -{"id":"mootools-slick-finder","key":"mootools-slick-finder","value":{"rev":"3-9a5820e90d6ea2d797268f3c60a9f177"}}, -{"id":"mootools-slick-parser","key":"mootools-slick-parser","value":{"rev":"3-d4e6b1673e6e2a6bcc66bf4988b2994d"}}, -{"id":"mootools-string","key":"mootools-string","value":{"rev":"3-2fda1c7915295df62e547018a7f05916"}}, -{"id":"mootools-swiff","key":"mootools-swiff","value":{"rev":"3-f0edeead85f3d48cf2af2ca35a4e67a5"}}, -{"id":"mootools.js","key":"mootools.js","value":{"rev":"3-085e50e3529d19e1d6ad630027ba51dc"}}, -{"id":"morestreams","key":"morestreams","value":{"rev":"7-3d0145c2cfb9429dfdcfa872998c9fe8"}}, -{"id":"morpheus","key":"morpheus","value":{"rev":"45-04335640f709335d1828523425a87909"}}, -{"id":"morton","key":"morton","value":{"rev":"11-abd787350e21bef65c1c6776e40a0753"}}, -{"id":"mothermayi","key":"mothermayi","value":{"rev":"5-2c46f9873efd19f543def5eeda0a05f1"}}, -{"id":"mountable-proxy","key":"mountable-proxy","value":{"rev":"7-3b91bd0707447885676727ad183bb051"}}, -{"id":"move","key":"move","value":{"rev":"69-ce11c235c78de6d6184a86aaa93769eb"}}, -{"id":"moviesearch","key":"moviesearch","value":{"rev":"3-72e77965a44264dfdd5af23e4a36d2ce"}}, -{"id":"mp","key":"mp","value":{"rev":"3-47899fb2bdaf21dda16abd037b325c3b"}}, -{"id":"mpdsocket","key":"mpdsocket","value":{"rev":"3-2dd4c9bb019f3f491c55364be7a56229"}}, -{"id":"mrcolor","key":"mrcolor","value":{"rev":"3-4695b11798a65c61714b8f236a40936c"}}, -{"id":"msgbus","key":"msgbus","value":{"rev":"27-a5d861b55c933842226d4e536820ec99"}}, -{"id":"msgme","key":"msgme","value":{"rev":"3-d1968af1234a2059eb3d84eb76cdaa4e"}}, -{"id":"msgpack","key":"msgpack","value":{"rev":"9-ecf7469392d87460ddebef2dd369b0e5"}}, -{"id":"msgpack-0.4","key":"msgpack-0.4","value":{"rev":"3-5d509ddba6c53ed6b8dfe4afb1d1661d"}}, -{"id":"msgpack2","key":"msgpack2","value":{"rev":"4-63b8f3ccf35498eb5c8bd9b8d683179b"}}, -{"id":"mu","key":"mu","value":{"rev":"7-7a8ce1cba5d6d98e696c4e633aa081fa"}}, -{"id":"mu2","key":"mu2","value":{"rev":"3-4ade1c5b1496c720312beae1822da9de"}}, -{"id":"mud","key":"mud","value":{"rev":"66-56e1b1a1e5af14c3df0520c58358e7cd"}}, -{"id":"muffin","key":"muffin","value":{"rev":"22-210c45a888fe1f095becdcf11876a2bc"}}, -{"id":"multi-node","key":"multi-node","value":{"rev":"1-224161d875f0e1cbf4b1e249603c670a"}}, -{"id":"multicast-eventemitter","key":"multicast-eventemitter","value":{"rev":"13-ede3e677d6e21bbfe42aad1b549a137c"}}, -{"id":"multimeter","key":"multimeter","value":{"rev":"7-847f45a6f592a8410a77d3e5efb5cbf3"}}, -{"id":"multipart-stack","key":"multipart-stack","value":{"rev":"9-85aaa2ed2180d3124d1dcd346955b672"}}, -{"id":"muse","key":"muse","value":{"rev":"3-d6bbc06df2e359d6ef285f9da2bd0efd"}}, -{"id":"musicmetadata","key":"musicmetadata","value":{"rev":"21-957bf986aa9d0db02175ea1d79293909"}}, -{"id":"mustache","key":"mustache","value":{"rev":"6-7f8458f2b52de5b37004b105c0f39e62"}}, -{"id":"mustachio","key":"mustachio","value":{"rev":"9-6ed3f41613f886128acd18b73b55439f"}}, -{"id":"mutex","key":"mutex","value":{"rev":"3-de95bdff3dd00271361067b5d70ea03b"}}, -{"id":"muzak","key":"muzak","value":{"rev":"9-5ff968ffadebe957b72a8b77b538b71c"}}, -{"id":"mvc","key":"mvc","value":{"rev":"52-7c954b6c3b90b1b734d8e8c3d2d34f5e"}}, -{"id":"mvc.coffee","key":"mvc.coffee","value":{"rev":"3-f203564ed70c0284455e7f96ea61fdb7"}}, -{"id":"mypackage","key":"mypackage","value":{"rev":"3-49cc95fb2e5ac8ee3dbbab1de451c0d1"}}, -{"id":"mypakege","key":"mypakege","value":{"rev":"3-e74d7dc2c2518304ff1700cf295eb823"}}, -{"id":"myrtle-parser","key":"myrtle-parser","value":{"rev":"3-9089c1a2f3c3a24f0bce3941bc1d534d"}}, -{"id":"mysql","key":"mysql","value":{"rev":"30-a8dc68eb056cb6f69fae2423c1337474"}}, -{"id":"mysql-activerecord","key":"mysql-activerecord","value":{"rev":"17-9d21d0b10a5c84f6cacfd8d2236f9887"}}, -{"id":"mysql-client","key":"mysql-client","value":{"rev":"5-cc877218864c319d17f179e49bf58c99"}}, -{"id":"mysql-helper","key":"mysql-helper","value":{"rev":"3-c6f3b9f00cd9fee675aa2a9942cc336a"}}, -{"id":"mysql-libmysqlclient","key":"mysql-libmysqlclient","value":{"rev":"38-51c08e24257b99bf5591232016ada8ab"}}, -{"id":"mysql-native","key":"mysql-native","value":{"rev":"12-0592fbf66c55e6e9db6a75c97be088c3"}}, -{"id":"mysql-native-prerelease","key":"mysql-native-prerelease","value":{"rev":"7-b1a6f3fc41f6c152f3b178e13f91b5c4"}}, -{"id":"mysql-oil","key":"mysql-oil","value":{"rev":"9-70c07b9c552ff592be8ca89ea6efa408"}}, -{"id":"mysql-pool","key":"mysql-pool","value":{"rev":"15-41f510c45174b6c887856120ce3d5a3b"}}, -{"id":"mysql-simple","key":"mysql-simple","value":{"rev":"13-7ee13f035e8ebcbc27f6fe910058aee9"}}, -{"id":"n","key":"n","value":{"rev":"31-bfaed5022beae2177a090c4c8fce82a4"}}, -{"id":"n-ext","key":"n-ext","value":{"rev":"3-5ad67a300f8e88ef1dd58983c9061bc1"}}, -{"id":"n-pubsub","key":"n-pubsub","value":{"rev":"3-af990bcbf9f94554365788b81715d3b4"}}, -{"id":"n-rest","key":"n-rest","value":{"rev":"7-42f1d92f9229f126a1b063ca27bfc85b"}}, -{"id":"n-util","key":"n-util","value":{"rev":"6-d0c59c7412408bc94e20de4d22396d79"}}, -{"id":"nMemcached","key":"nMemcached","value":{"rev":"3-be350fd46624a1cac0052231101e0594"}}, -{"id":"nStoreSession","key":"nStoreSession","value":{"rev":"3-a3452cddd2b9ff8edb6d46999fa5b0eb"}}, -{"id":"nTPL","key":"nTPL","value":{"rev":"41-16a54848286364d894906333b0c1bb2c"}}, -{"id":"nTunes","key":"nTunes","value":{"rev":"18-76bc566a504100507056316fe8d3cc35"}}, -{"id":"nabe","key":"nabe","value":{"rev":"13-dc93f35018e84a23ace4d5114fa1bb28"}}, -{"id":"nack","key":"nack","value":{"rev":"118-f629c8c208c76fa0c2ce66d21f927ee4"}}, -{"id":"nagari","key":"nagari","value":{"rev":"11-cb200690c6d606d8597178e492b54cde"}}, -{"id":"nailplate","key":"nailplate","value":{"rev":"11-e1532c42d9d83fc32942dec0b87df587"}}, -{"id":"nails","key":"nails","value":{"rev":"12-f472bf005c4a4c2b49fb0118b109bef1"}}, -{"id":"nake","key":"nake","value":{"rev":"11-250933df55fbe7bb19e34a84ed23ca3e"}}, -{"id":"named-routes","key":"named-routes","value":{"rev":"6-ffbdd4caa74a30e87aa6dbb36f2b967c"}}, -{"id":"namespace","key":"namespace","value":{"rev":"7-89e2850e14206af13f26441e75289878"}}, -{"id":"namespaces","key":"namespaces","value":{"rev":"11-7a9b3d2537438211021a472035109f3c"}}, -{"id":"nami","key":"nami","value":{"rev":"29-3d44b1338222a4d994d4030868a94ea8"}}, -{"id":"nano","key":"nano","value":{"rev":"105-50efc49a8f6424706af554872002c014"}}, -{"id":"nanostate","key":"nanostate","value":{"rev":"9-1664d985e8cdbf16e150ba6ba4d79ae5"}}, -{"id":"narcissus","key":"narcissus","value":{"rev":"3-46581eeceff566bd191a14dec7b337f6"}}, -{"id":"nariya","key":"nariya","value":{"rev":"13-d83b8b6162397b154a4b59553be225e9"}}, -{"id":"narrativ","key":"narrativ","value":{"rev":"9-ef215eff6bf222425f73d23e507f7ff3"}}, -{"id":"narrow","key":"narrow","value":{"rev":"5-c6963048ba02adaf819dc51815fa0015"}}, -{"id":"narwhal","key":"narwhal","value":{"rev":"6-13bf3f87e6cfb1e57662cc3e3be450fc"}}, -{"id":"narwhal-lib","key":"narwhal-lib","value":{"rev":"6-4722d9b35fed59a2e8f7345a1eb6769d"}}, -{"id":"nat","key":"nat","value":{"rev":"3-da0906c08792043546f98ace8ce59a78"}}, -{"id":"native2ascii","key":"native2ascii","value":{"rev":"3-9afd51209d67303a8ee807ff862e31fc"}}, -{"id":"nativeUtil","key":"nativeUtil","value":{"rev":"7-6e3e9757b436ebcee35a20e633c08d60"}}, -{"id":"natives","key":"natives","value":{"rev":"24-6c4269c9c7cfb52571bd2c94fa26efc6"}}, -{"id":"natural","key":"natural","value":{"rev":"110-fc92701ad8525f45fbdb5863959ca03c"}}, -{"id":"naturalsort","key":"naturalsort","value":{"rev":"3-4321f5e432aee224af0fee9e4fb901ff"}}, -{"id":"nave","key":"nave","value":{"rev":"29-79baa66065fa9075764cc3e5da2edaef"}}, -{"id":"navigator","key":"navigator","value":{"rev":"3-f2f4f5376afb10753006f40bd49689c3"}}, -{"id":"nbs-api","key":"nbs-api","value":{"rev":"3-94949b1f0797369abc0752482268ef08"}}, -{"id":"nbt","key":"nbt","value":{"rev":"3-b711b9db76f64449df7f43c659ad8e7f"}}, -{"id":"nclosure","key":"nclosure","value":{"rev":"9-042b39740a39f0556d0dc2c0990b7fa8"}}, -{"id":"nclosureultimate","key":"nclosureultimate","value":{"rev":"3-61ff4bc480239304c459374c9a5f5754"}}, -{"id":"nconf","key":"nconf","value":{"rev":"65-8d8c0d2c6d5d9d526b8a3f325f68eca1"}}, -{"id":"nconf-redis","key":"nconf-redis","value":{"rev":"5-21ae138633b20cb29ed49b9fcd425e10"}}, -{"id":"ncp","key":"ncp","value":{"rev":"23-6441091c6c27ecb5b99f5781299a2192"}}, -{"id":"ncss","key":"ncss","value":{"rev":"9-1d2330e0fdbc40f0810747c2b156ecf2"}}, -{"id":"ncurses","key":"ncurses","value":{"rev":"12-bb059ea6fee12ca77f1fbb7bb6dd9447"}}, -{"id":"ndb","key":"ndb","value":{"rev":"15-b3e826f68a57095413666e9fe74589da"}}, -{"id":"ndistro","key":"ndistro","value":{"rev":"3-fcda3c018d11000b2903ad7104b60b35"}}, -{"id":"ndns","key":"ndns","value":{"rev":"5-1aeaaca119be44af7a83207d76f263fc"}}, -{"id":"nebulog","key":"nebulog","value":{"rev":"3-1863b0ce17cc0f07a50532a830194254"}}, -{"id":"neco","key":"neco","value":{"rev":"43-e830913302b52012ab63177ecf292822"}}, -{"id":"ned","key":"ned","value":{"rev":"15-4230c69fb52dfddfd65526dcfe5c4ec6"}}, -{"id":"nedis","key":"nedis","value":{"rev":"7-d49e329dca586d1a3569266f0595c9ad"}}, -{"id":"neko","key":"neko","value":{"rev":"60-13aa87d2278c3a734733cff2a34a7970"}}, -{"id":"neo4j","key":"neo4j","value":{"rev":"7-dde7066eac32a405df95ccf9c50c8ae7"}}, -{"id":"nerve","key":"nerve","value":{"rev":"3-2c47b79586d7930aabf9325ca88ad7e8"}}, -{"id":"nest","key":"nest","value":{"rev":"23-560d67971e9acddacf087608306def24"}}, -{"id":"nestableflow","key":"nestableflow","value":{"rev":"5-ee8af667a84d333fcc8092c89f4189c3"}}, -{"id":"nestor","key":"nestor","value":{"rev":"3-f1affbc37be3bf4e337365bd172578dc"}}, -{"id":"net","key":"net","value":{"rev":"3-895103ee532ef31396d9c06764df1ed8"}}, -{"id":"netiface","key":"netiface","value":{"rev":"3-885c94284fd3a9601afe291ab68aca84"}}, -{"id":"netpool","key":"netpool","value":{"rev":"3-dadfd09b9eb7ef73e2bff34a381de207"}}, -{"id":"netstring","key":"netstring","value":{"rev":"9-d26e7bf4a3ce5eb91bb1889d362f71e6"}}, -{"id":"neuron","key":"neuron","value":{"rev":"11-edaed50492368ff39eaf7d2004d7f4d8"}}, -{"id":"new","key":"new","value":{"rev":"3-7789b37104d8161b7ccf898a9cda1fc6"}}, -{"id":"newforms","key":"newforms","value":{"rev":"9-2a87cb74477d210fcb1d0c3e3e236f03"}}, -{"id":"nexpect","key":"nexpect","value":{"rev":"15-e7127f41b9f3ec45185ede7bab7b4acd"}}, -{"id":"next","key":"next","value":{"rev":"13-de5e62125b72e48ea142a55a3817589c"}}, -{"id":"nextrip","key":"nextrip","value":{"rev":"5-1ac8103552967af98d3de452ef81a94f"}}, -{"id":"nexttick","key":"nexttick","value":{"rev":"9-c7ec279e713ea8483d33c31871aea0db"}}, -{"id":"ngen","key":"ngen","value":{"rev":"9-972980a439c34851d67e4f61a96c2632"}}, -{"id":"ngen-basicexample","key":"ngen-basicexample","value":{"rev":"3-897763c230081d320586bcadfa84499f"}}, -{"id":"ngeohash","key":"ngeohash","value":{"rev":"5-9ca0c06066bc798e934db35cad99453e"}}, -{"id":"ngist","key":"ngist","value":{"rev":"7-592c24e72708219ed1eb078ddff95ab6"}}, -{"id":"ngram","key":"ngram","value":{"rev":"5-00e6b24dc178bdeb49b1ac8cb09f6e77"}}, -{"id":"ngrep","key":"ngrep","value":{"rev":"3-49c1a3839b12083280475177c1a16e38"}}, -{"id":"nhp-body-restreamer","key":"nhp-body-restreamer","value":{"rev":"1-8a4e5e23ae681a3f8be9afb613648230"}}, -{"id":"nhttpd","key":"nhttpd","value":{"rev":"3-cdc73384e1a1a4666e813ff52f2f5e4f"}}, -{"id":"nib","key":"nib","value":{"rev":"25-d67d5a294ba5b8953472cf936b97e13d"}}, -{"id":"nicetime","key":"nicetime","value":{"rev":"3-39fdba269d712064dc1e02a7ab846821"}}, -{"id":"nicknack","key":"nicknack","value":{"rev":"5-7b5477b63f782d0a510b0c15d2824f20"}}, -{"id":"nide","key":"nide","value":{"rev":"9-74f642fced47c934f9bae29f04d17a46"}}, -{"id":"nih-op","key":"nih-op","value":{"rev":"3-6e649b45964f84cb04340ab7f0a36a1c"}}, -{"id":"nimble","key":"nimble","value":{"rev":"5-867b808dd80eab33e5f22f55bb5a7376"}}, -{"id":"ninjs","key":"ninjs","value":{"rev":"3-f59997cc4bacb2d9d9852f955d15199e"}}, -{"id":"ninotify","key":"ninotify","value":{"rev":"3-a0f3c7cbbe7ccf5d547551aa062cc8b5"}}, -{"id":"nirc","key":"nirc","value":{"rev":"3-28197984656939a5a93a77c0a1605406"}}, -{"id":"nithub","key":"nithub","value":{"rev":"3-eaa85e6ac6668a304e4e4a565c54f57d"}}, -{"id":"nix","key":"nix","value":{"rev":"12-7b338b03c0e110aeb348551b14796ff1"}}, -{"id":"nko","key":"nko","value":{"rev":"39-2bf94b2bc279b8cf847bfc7668029d37"}}, -{"id":"nlog","key":"nlog","value":{"rev":"3-ae469820484ca33f346001dcb7b63a2d"}}, -{"id":"nlog4js","key":"nlog4js","value":{"rev":"3-bc17a61a9023d64e192d249144e69f02"}}, -{"id":"nlogger","key":"nlogger","value":{"rev":"11-1e48fc9a5a4214d9e56db6c6b63f1eeb"}}, -{"id":"nmd","key":"nmd","value":{"rev":"27-2dcb60d0258a9cea838f7cc4e0922f90"}}, -{"id":"nntp","key":"nntp","value":{"rev":"5-c86b189e366b9a6a428f9a2ee88dccf1"}}, -{"id":"no.de","key":"no.de","value":{"rev":"10-0dc855fd6b0b36a710b473b2720b22c0"}}, -{"id":"nobj","key":"nobj","value":{"rev":"3-0b4a46b91b70117306a9888202117223"}}, -{"id":"noblemachine","key":"noblemachine","value":{"rev":"3-06fec410fe0c7328e06eec50b4fa5d9a"}}, -{"id":"noblerecord","key":"noblerecord","value":{"rev":"5-22f24c4285bd405785588480bb2bc324"}}, -{"id":"nock","key":"nock","value":{"rev":"5-f94423d37dbdf41001ec097f20635271"}}, -{"id":"nocr-mongo","key":"nocr-mongo","value":{"rev":"5-ce6335ed276187cc38c30cb5872d3d83"}}, -{"id":"nodast","key":"nodast","value":{"rev":"3-1c563107f2d77b79a8f0d0b8ba7041f5"}}, -{"id":"node-api","key":"node-api","value":{"rev":"3-b69cefec93d9f73256acf9fb9edeebd6"}}, -{"id":"node-apidoc","key":"node-apidoc","value":{"rev":"6-cd26945e959403fcbee8ba542e14e667"}}, -{"id":"node-app-reloader","key":"node-app-reloader","value":{"rev":"5-e08cac7656afd6c124f8e2a9b9d6fdd3"}}, -{"id":"node-arse","key":"node-arse","value":{"rev":"9-b643c828541739a5fa972c801f81b212"}}, -{"id":"node-assert-extras","key":"node-assert-extras","value":{"rev":"3-3498e17b996ffc42a29d46c9699a3b52"}}, -{"id":"node-assert-lint-free","key":"node-assert-lint-free","value":{"rev":"5-852130ba6bafc703657b833343bc5646"}}, -{"id":"node-asset","key":"node-asset","value":{"rev":"18-f7cf59be8e0d015a43d05807a1ed9c0c"}}, -{"id":"node-awesm","key":"node-awesm","value":{"rev":"3-539c10145541ac5efc4dd295767b2abc"}}, -{"id":"node-backbone-couch","key":"node-backbone-couch","value":{"rev":"19-c4d8e93436b60e098c81cc0fe50f960c"}}, -{"id":"node-base64","key":"node-base64","value":{"rev":"11-da10a7157fd9e139b48bc8d9e44a98fa"}}, -{"id":"node-bj","key":"node-bj","value":{"rev":"3-5cd21fa259199870d1917574cd167396"}}, -{"id":"node-bosh-stress-tool","key":"node-bosh-stress-tool","value":{"rev":"3-36afc4b47e570964b7f8d705e1d47732"}}, -{"id":"node-brainfuck","key":"node-brainfuck","value":{"rev":"5-c7a6f703a97a409670005cab52664629"}}, -{"id":"node-build","key":"node-build","value":{"rev":"10-4f2f137fb4ef032f9dca3e3c64c15270"}}, -{"id":"node-casa","key":"node-casa","value":{"rev":"3-3f80a478aa47620bfc0c64cc6f140d98"}}, -{"id":"node-ccl","key":"node-ccl","value":{"rev":"13-00498b820cc4cadce8cc5b7b76e30b0f"}}, -{"id":"node-chain","key":"node-chain","value":{"rev":"6-b543f421ac63eeedc667b3395e7b8971"}}, -{"id":"node-child-process-manager","key":"node-child-process-manager","value":{"rev":"36-befb1a0eeac02ad400e2aaa8a076a053"}}, -{"id":"node-chirpstream","key":"node-chirpstream","value":{"rev":"10-f20e404f9ae5d43dfb6bcee15bd9affe"}}, -{"id":"node-clone","key":"node-clone","value":{"rev":"5-5ace5d51179d0e642bf9085b3bbf999b"}}, -{"id":"node-cloudwatch","key":"node-cloudwatch","value":{"rev":"3-7f9d1e075fcc3bd3e7849acd893371d5"}}, -{"id":"node-combine","key":"node-combine","value":{"rev":"3-51891c3c7769ff11a243c89c7e537907"}}, -{"id":"node-compat","key":"node-compat","value":{"rev":"9-24fce8e15eed3e193832b1c93a482d15"}}, -{"id":"node-config","key":"node-config","value":{"rev":"6-8821f6b46347e57258e62e1be841c186"}}, -{"id":"node-crocodoc","key":"node-crocodoc","value":{"rev":"5-ad4436f633f37fe3248dce93777fc26e"}}, -{"id":"node-csv","key":"node-csv","value":{"rev":"10-cd15d347b595f1d9d1fd30b483c52724"}}, -{"id":"node-date","key":"node-date","value":{"rev":"3-a5b41cab3247e12f2beaf1e0b1ffadfa"}}, -{"id":"node-dbi","key":"node-dbi","value":{"rev":"27-96e1df6fdefbae77bfa02eda64c3e3b9"}}, -{"id":"node-debug-proxy","key":"node-debug-proxy","value":{"rev":"9-c00a14832cdd5ee4d489eb41a3d0d621"}}, -{"id":"node-dep","key":"node-dep","value":{"rev":"15-378dedd3f0b3e54329c00c675b19401c"}}, -{"id":"node-dev","key":"node-dev","value":{"rev":"48-6a98f38078fe5678d6c2fb48aec3c1c3"}}, -{"id":"node-downloader","key":"node-downloader","value":{"rev":"3-a541126c56c48681571e5e998c481343"}}, -{"id":"node-evented","key":"node-evented","value":{"rev":"6-a6ce8ab39e01cc0262c80d4bf08fc333"}}, -{"id":"node-exception-notifier","key":"node-exception-notifier","value":{"rev":"3-cebc02c45dace4852f8032adaa4e3c9c"}}, -{"id":"node-expat","key":"node-expat","value":{"rev":"33-261d85273a0a551e7815f835a933d5eb"}}, -{"id":"node-expect","key":"node-expect","value":{"rev":"7-5ba4539adfd3ba95dab21bb5bc0a5193"}}, -{"id":"node-express-boilerplate","key":"node-express-boilerplate","value":{"rev":"3-972f51d1ff9493e48d7cf508461f1114"}}, -{"id":"node-extjs","key":"node-extjs","value":{"rev":"7-33143616b4590523b4e1549dd8ffa991"}}, -{"id":"node-extjs4","key":"node-extjs4","value":{"rev":"3-8e5033aed477629a6fb9812466a90cfd"}}, -{"id":"node-fakeweb","key":"node-fakeweb","value":{"rev":"5-f01377fa6d03461cbe77f41b73577cf4"}}, -{"id":"node-fb","key":"node-fb","value":{"rev":"3-bc5f301a60e475de7c614837d3f9f35a"}}, -{"id":"node-fb-signed-request","key":"node-fb-signed-request","value":{"rev":"3-33c8f043bb947b63a84089d633d68f8e"}}, -{"id":"node-fects","key":"node-fects","value":{"rev":"3-151b7b895b74b24a87792fac34735814"}}, -{"id":"node-ffi","key":"node-ffi","value":{"rev":"22-25cf229f0ad4102333b2b13e03054ac5"}}, -{"id":"node-filter","key":"node-filter","value":{"rev":"3-0e6a86b4abb65df3594e5c93ab04bd31"}}, -{"id":"node-foursquare","key":"node-foursquare","value":{"rev":"25-549bbb0c2b4f96b2c5e6a5f642e8481d"}}, -{"id":"node-fs","key":"node-fs","value":{"rev":"5-14050cbc3887141f6b0e1e7d62736a63"}}, -{"id":"node-fs-synchronize","key":"node-fs-synchronize","value":{"rev":"11-6341e79f3391a9e1daa651a5932c8795"}}, -{"id":"node-gd","key":"node-gd","value":{"rev":"11-2ede7f4af38f062b86cc32bb0125e1bf"}}, -{"id":"node-geocode","key":"node-geocode","value":{"rev":"6-505af45c7ce679ac6738b495cc6b03c2"}}, -{"id":"node-get","key":"node-get","value":{"rev":"9-906945005a594ea1f05d4ad23170a83f"}}, -{"id":"node-gettext","key":"node-gettext","value":{"rev":"5-532ea4b528108b4c8387ddfc8fa690b2"}}, -{"id":"node-gist","key":"node-gist","value":{"rev":"11-3495a499c9496d01235676f429660424"}}, -{"id":"node-glbse","key":"node-glbse","value":{"rev":"5-69a537189610c69cc549f415431b181a"}}, -{"id":"node-google-sql","key":"node-google-sql","value":{"rev":"7-bfe20d25a4423651ecdff3f5054a6946"}}, -{"id":"node-gravatar","key":"node-gravatar","value":{"rev":"6-8265fc1ad003fd8a7383244c92abb346"}}, -{"id":"node-handlersocket","key":"node-handlersocket","value":{"rev":"16-f1dc0246559748a842dd0e1919c569ae"}}, -{"id":"node-hdfs","key":"node-hdfs","value":{"rev":"3-d460fba8ff515660de34cb216223c569"}}, -{"id":"node-hipchat","key":"node-hipchat","value":{"rev":"3-9d16738bf70f9e37565727e671ffe551"}}, -{"id":"node-hive","key":"node-hive","value":{"rev":"31-5eef1fa77a39e4bdacd8fa85ec2ce698"}}, -{"id":"node-html-encoder","key":"node-html-encoder","value":{"rev":"3-75f92e741a3b15eb56e3c4513feaca6d"}}, -{"id":"node-i3","key":"node-i3","value":{"rev":"3-5c489f43aeb06054b02ad3706183599c"}}, -{"id":"node-indextank","key":"node-indextank","value":{"rev":"5-235a17fce46c73c8b5abc4cf5f964385"}}, -{"id":"node-inherit","key":"node-inherit","value":{"rev":"3-099c0acf9c889eea94faaf64067bfc52"}}, -{"id":"node-inspector","key":"node-inspector","value":{"rev":"34-ca9fa856cf32a737d1ecccb759aaf5e1"}}, -{"id":"node-int64","key":"node-int64","value":{"rev":"11-50b92b5b65adf17e673b4d15df643ed4"}}, -{"id":"node-ip-lib","key":"node-ip-lib","value":{"rev":"3-2fe72f7b78cbc1739c71c7cfaec9fbcd"}}, -{"id":"node-iplookup","key":"node-iplookup","value":{"rev":"10-ba8474624dd852a46303d32ff0556883"}}, -{"id":"node-jdownloader","key":"node-jdownloader","value":{"rev":"3-b015035cfb8540568da5deb55b35248c"}}, -{"id":"node-jslint-all","key":"node-jslint-all","value":{"rev":"5-582f4a31160d3700731fa39771702896"}}, -{"id":"node-jsonengine","key":"node-jsonengine","value":{"rev":"3-6e429c32e42b205f3ed1ea1f48d67cbc"}}, -{"id":"node-khtml","key":"node-khtml","value":{"rev":"39-db8e8eea569657fc7de6300172a6a8a7"}}, -{"id":"node-linkshare","key":"node-linkshare","value":{"rev":"35-acc18a5d584b828bb2bd4f32bbcde98c"}}, -{"id":"node-log","key":"node-log","value":{"rev":"17-79cecc66227b4fb3a2ae04b7dac17cc2"}}, -{"id":"node-logentries","key":"node-logentries","value":{"rev":"3-0f640d5ff489a6904f4a8c18fb5f7e9c"}}, -{"id":"node-logger","key":"node-logger","value":{"rev":"3-75084f98359586bdd254e57ea5915d37"}}, -{"id":"node-logging","key":"node-logging","value":{"rev":"15-af01bc2b6128150787c85c8df1dae642"}}, -{"id":"node-mailer","key":"node-mailer","value":{"rev":"5-5b88675f05efe2836126336c880bd841"}}, -{"id":"node-mailgun","key":"node-mailgun","value":{"rev":"5-4bcfb7bf5163748b87c1b9ed429ed178"}}, -{"id":"node-markdown","key":"node-markdown","value":{"rev":"6-67137da4014f22f656aaefd9dfa2801b"}}, -{"id":"node-mdbm","key":"node-mdbm","value":{"rev":"22-3006800b042cf7d4b0b391c278405143"}}, -{"id":"node-minify","key":"node-minify","value":{"rev":"13-e853813d4b6519b168965979b8ccccdd"}}, -{"id":"node-mug","key":"node-mug","value":{"rev":"3-f7567ffac536bfa7eb5a7e3da7a0efa0"}}, -{"id":"node-mvc","key":"node-mvc","value":{"rev":"3-74f7c07b2991fcddb27afd2889b6db4e"}}, -{"id":"node-mwire","key":"node-mwire","value":{"rev":"26-79d7982748f42b9e07ab293447b167ec"}}, -{"id":"node-mynix-feed","key":"node-mynix-feed","value":{"rev":"3-59d4a624b3831bbab6ee99be2f84e568"}}, -{"id":"node-nether","key":"node-nether","value":{"rev":"3-0fbefe710fe0d74262bfa25f6b4e1baf"}}, -{"id":"node-nude","key":"node-nude","value":{"rev":"3-600abb219646299ac602fa51fa260f37"}}, -{"id":"node-nxt","key":"node-nxt","value":{"rev":"3-8ce48601c2b0164e2b125259a0c97d45"}}, -{"id":"node-oauth","key":"node-oauth","value":{"rev":"3-aa6cd61f44d74118bafa5408900c4984"}}, -{"id":"node-opencalais","key":"node-opencalais","value":{"rev":"13-a3c0b882aca7207ce36f107e40a0ce50"}}, -{"id":"node-props","key":"node-props","value":{"rev":"7-e400cee08cc9abdc1f1ce4f262a04b05"}}, -{"id":"node-proxy","key":"node-proxy","value":{"rev":"20-ce722bf45c84a7d925b8b7433e786ed6"}}, -{"id":"node-pusher","key":"node-pusher","value":{"rev":"3-7cc7cd5bffaf3b11c44438611beeba98"}}, -{"id":"node-putio","key":"node-putio","value":{"rev":"3-8a1fc6362fdcf16217cdb6846e419b4c"}}, -{"id":"node-raphael","key":"node-raphael","value":{"rev":"25-e419d98a12ace18a40d94a9e8e32cdd4"}}, -{"id":"node-rapleaf","key":"node-rapleaf","value":{"rev":"11-c849c8c8635e4eb2f81bd7810b7693fd"}}, -{"id":"node-rats","key":"node-rats","value":{"rev":"3-dca544587f3121148fe02410032cf726"}}, -{"id":"node-rdf2json","key":"node-rdf2json","value":{"rev":"3-bde382dc2fcb40986c5ac41643d44543"}}, -{"id":"node-recurly","key":"node-recurly","value":{"rev":"11-79cab9ccee7c1ddb83791e8de41c72f5"}}, -{"id":"node-redis","key":"node-redis","value":{"rev":"13-12adf3a3e986675637fa47b176f527e3"}}, -{"id":"node-redis-mapper","key":"node-redis-mapper","value":{"rev":"5-53ba8f67cc82dbf1d127fc7359353f32"}}, -{"id":"node-redis-monitor","key":"node-redis-monitor","value":{"rev":"3-79bcba76241d7c7dbc4b18d90a9d59e3"}}, -{"id":"node-restclient","key":"node-restclient","value":{"rev":"6-5844eba19bc465a8f75b6e94c061350f"}}, -{"id":"node-restclient2","key":"node-restclient2","value":{"rev":"5-950de911f7bde7900dfe5b324f49818c"}}, -{"id":"node-runner","key":"node-runner","value":{"rev":"3-e9a9e6bd10d2ab1aed8b401b04fadc7b"}}, -{"id":"node-sc-setup","key":"node-sc-setup","value":{"rev":"3-e89c496e03c48d8574ccaf61c9ed4fca"}}, -{"id":"node-schedule","key":"node-schedule","value":{"rev":"9-ae12fa59226f1c9b7257b8a2d71373b4"}}, -{"id":"node-sdlmixer","key":"node-sdlmixer","value":{"rev":"8-489d85278d6564b6a4e94990edcb0527"}}, -{"id":"node-secure","key":"node-secure","value":{"rev":"3-73673522a4bb5f853d55e535f0934803"}}, -{"id":"node-sendgrid","key":"node-sendgrid","value":{"rev":"9-4662c31304ca4ee4e702bd3a54ea7824"}}, -{"id":"node-sizzle","key":"node-sizzle","value":{"rev":"6-c08c24d9d769d3716e5c4e3441740eb2"}}, -{"id":"node-soap-client","key":"node-soap-client","value":{"rev":"9-35ff34a4a5af569de6a2e89d1b35b69a"}}, -{"id":"node-spec","key":"node-spec","value":{"rev":"9-92e99ca74b9a09a8ae2eb7382ef511ef"}}, -{"id":"node-static","key":"node-static","value":{"rev":"10-11b0480fcd416db3d3d4041f43a55290"}}, -{"id":"node-static-maccman","key":"node-static-maccman","value":{"rev":"3-49e256728b14c85776b74f2bd912eb42"}}, -{"id":"node-statsd","key":"node-statsd","value":{"rev":"5-08d3e6b4b2ed1d0b7916e9952f55573c"}}, -{"id":"node-statsd-instrument","key":"node-statsd-instrument","value":{"rev":"3-c3cd3315e1edcc91096830392f439305"}}, -{"id":"node-std","key":"node-std","value":{"rev":"3-f99be0f03be4175d546823799bb590d3"}}, -{"id":"node-store","key":"node-store","value":{"rev":"3-7cb6bf13de9550b869c768f464fd0f65"}}, -{"id":"node-stringprep","key":"node-stringprep","value":{"rev":"13-9b08baa97042f71c5c8e9e2fdcc2c300"}}, -{"id":"node-synapse","key":"node-synapse","value":{"rev":"3-c46c47099eb2792f4a57fdfd789520ca"}}, -{"id":"node-syslog","key":"node-syslog","value":{"rev":"23-34f7df06ba88d9f897b7e00404db7187"}}, -{"id":"node-t","key":"node-t","value":{"rev":"3-042225eff3208ba9add61a9f79d90871"}}, -{"id":"node-taobao","key":"node-taobao","value":{"rev":"7-c988ace74806b2e2f55e162f54ba1a2c"}}, -{"id":"node-term-ui","key":"node-term-ui","value":{"rev":"5-210310014b19ce26c5e3e840a8a0549e"}}, -{"id":"node-tiny","key":"node-tiny","value":{"rev":"7-df05ab471f25ca4532d80c83106944d7"}}, -{"id":"node-tmpl","key":"node-tmpl","value":{"rev":"3-6fcfa960da8eb72a5e3087559d3fe206"}}, -{"id":"node-twilio","key":"node-twilio","value":{"rev":"11-af69e600109d38c77eadbcec4bee4782"}}, -{"id":"node-twitter-mailer","key":"node-twitter-mailer","value":{"rev":"7-f915b76d834cb162c91816abc30cee5f"}}, -{"id":"node-usb","key":"node-usb","value":{"rev":"3-0c3837307f86a80427800f1b45aa5862"}}, -{"id":"node-uuid","key":"node-uuid","value":{"rev":"6-642efa619ad8a6476a44a5c6158e7a36"}}, -{"id":"node-vapor.js","key":"node-vapor.js","value":{"rev":"3-d293284cc415b2906533e91db13ee748"}}, -{"id":"node-version","key":"node-version","value":{"rev":"3-433b1529a6aa3d619314e461e978d2b6"}}, -{"id":"node-webapp","key":"node-webapp","value":{"rev":"11-65411bfd8eaf19d3539238360d904d43"}}, -{"id":"node-wiki","key":"node-wiki","value":{"rev":"5-22b0177c9a5e4dc1f72d36bb83c746d0"}}, -{"id":"node-wkhtml","key":"node-wkhtml","value":{"rev":"5-a8fa203720442b443d558670c9750548"}}, -{"id":"node-xerces","key":"node-xerces","value":{"rev":"3-de6d82ec712af997b7aae451277667f0"}}, -{"id":"node-xml","key":"node-xml","value":{"rev":"3-e14a52dcd04302aea7dd6943cf6dd886"}}, -{"id":"node-xmpp","key":"node-xmpp","value":{"rev":"36-031eb5e830ed2e2027ee4ee7f861cf81"}}, -{"id":"node-xmpp-bosh","key":"node-xmpp-bosh","value":{"rev":"85-f7f8b699b6fda74fc27c621466915bd1"}}, -{"id":"node-xmpp-via-bosh","key":"node-xmpp-via-bosh","value":{"rev":"3-5f5fee9e42ae8ce8f42d55c31808c969"}}, -{"id":"node.io","key":"node.io","value":{"rev":"224-e99561d454a7676d10875e1b06ba44c7"}}, -{"id":"node.io-min","key":"node.io-min","value":{"rev":"3-e8389bdcfa55c68ae9698794d9089ce4"}}, -{"id":"node.isbn","key":"node.isbn","value":{"rev":"3-76aa84f3c49a54b6c901f440af35192d"}}, -{"id":"node.uptime","key":"node.uptime","value":{"rev":"5-cfc2c1c1460d000eab4e1a28506e6d29"}}, -{"id":"node3p","key":"node3p","value":{"rev":"14-b1931b8aa96227854d78965cc4301168"}}, -{"id":"node3p-web","key":"node3p-web","value":{"rev":"12-bc783ee1e493e80b7e7a3c2fce39f55e"}}, -{"id":"nodeBase","key":"nodeBase","value":{"rev":"39-4d9ae0f18e0bca7192901422d85e85c7"}}, -{"id":"nodeCgi","key":"nodeCgi","value":{"rev":"9-bb65e71ee63551e519f49434f2ae1cd7"}}, -{"id":"nodeDocs","key":"nodeDocs","value":{"rev":"3-0c6e714d3e6d5c2cc9482444680fb3ca"}}, -{"id":"nodePhpSessions","key":"nodePhpSessions","value":{"rev":"3-5063b38582deaca9cacdc029db97c2b1"}}, -{"id":"node_bsdiff","key":"node_bsdiff","value":{"rev":"5-e244ef36755a2b6534ce50fa1ee5ee6e"}}, -{"id":"node_hash","key":"node_hash","value":{"rev":"3-cdce2fcc2c18fcd25e16be8e52add891"}}, -{"id":"node_util","key":"node_util","value":{"rev":"3-cde723ee2311cf48f7cf0a3bc3484f9a"}}, -{"id":"node_xslt","key":"node_xslt","value":{"rev":"3-f12035155aee31d1749204fdca2aee10"}}, -{"id":"nodec","key":"nodec","value":{"rev":"3-dba2af2d5b98a71964abb4328512b9e1"}}, -{"id":"nodefm","key":"nodefm","value":{"rev":"3-c652a95d30318a371736515feab649f9"}}, -{"id":"nodegit","key":"nodegit","value":{"rev":"31-92a2cea0d1c92086c920bc007f5a3f16"}}, -{"id":"nodeib","key":"nodeib","value":{"rev":"3-e67d779007817597ca36e8b821f38e6a"}}, -{"id":"nodeinfo","key":"nodeinfo","value":{"rev":"53-61bf0f48662dc2e04cde38a2b897c211"}}, -{"id":"nodejitsu-client","key":"nodejitsu-client","value":{"rev":"3-4fa613f888ebe249aff7b03aa9b8d7ef"}}, -{"id":"nodejs-intro","key":"nodejs-intro","value":{"rev":"4-c75f03e80b597f734f4466e62ecebfeb"}}, -{"id":"nodejs-tvrage","key":"nodejs-tvrage","value":{"rev":"9-88bb3b5d23652ebdb7186a30bc3be43f"}}, -{"id":"nodejs.be-cli","key":"nodejs.be-cli","value":{"rev":"3-d8f23777f9b18101f2d2dc5aa618a703"}}, -{"id":"nodeler","key":"nodeler","value":{"rev":"9-00760d261ea75164a5709109011afb25"}}, -{"id":"nodelint","key":"nodelint","value":{"rev":"8-31502553d4bb099ba519fb331cccdd63"}}, -{"id":"nodeload","key":"nodeload","value":{"rev":"12-f02626475b59ebe67a864a114c99ff9b"}}, -{"id":"nodemachine","key":"nodemachine","value":{"rev":"8-5342324502e677e35aefef17dc08c8db"}}, -{"id":"nodemailer","key":"nodemailer","value":{"rev":"63-d39a5143b06fa79edcb81252d6329861"}}, -{"id":"nodemock","key":"nodemock","value":{"rev":"33-7095334209b39c8e1482374bee1b712a"}}, -{"id":"nodemon","key":"nodemon","value":{"rev":"42-4f40ba2299ef4ae613a384a48e4045fa"}}, -{"id":"nodepad","key":"nodepad","value":{"rev":"5-93718cc67e97c89f45b753c1caef07e4"}}, -{"id":"nodepal","key":"nodepal","value":{"rev":"5-e53372a5081b3753993ee98299ecd550"}}, -{"id":"nodepie","key":"nodepie","value":{"rev":"21-a44a6d3575758ed591e13831a5420758"}}, -{"id":"nodepress","key":"nodepress","value":{"rev":"3-f17616b9ae61e15d1d219cb87ac5a63a"}}, -{"id":"noderelict","key":"noderelict","value":{"rev":"23-0ca0997e3ef112e9393ae8ccef63f1ee"}}, -{"id":"noderpc","key":"noderpc","value":{"rev":"27-7efb6365916b403c3aa4e1c766de75a2"}}, -{"id":"nodespec","key":"nodespec","value":{"rev":"3-69f357577e52e9fd096ac88a1e7e3445"}}, -{"id":"nodespy","key":"nodespy","value":{"rev":"3-ad33e14db2bcaf61bf99d3e8915da5ee"}}, -{"id":"nodestalker","key":"nodestalker","value":{"rev":"5-080eba88a3625ecf7935ec5e9d2db6e9"}}, -{"id":"nodester-api","key":"nodester-api","value":{"rev":"39-52046dbcdf4447bbb85aecc92086ae1d"}}, -{"id":"nodester-cli","key":"nodester-cli","value":{"rev":"89-6de3d724a974c1dd3b632417f8b01267"}}, -{"id":"nodetk","key":"nodetk","value":{"rev":"11-265d267335e7603249e1af9441700f2f"}}, -{"id":"nodeunit","key":"nodeunit","value":{"rev":"40-d1cc6c06f878fb0b86779186314bc193"}}, -{"id":"nodeunit-coverage","key":"nodeunit-coverage","value":{"rev":"3-29853918351e75e3f6f93acd97e2942f"}}, -{"id":"nodeunit-dsl","key":"nodeunit-dsl","value":{"rev":"6-91be44077bc80c942f86f0ac28a69c5e"}}, -{"id":"nodevlc","key":"nodevlc","value":{"rev":"3-e151577d3e1ba2f58db465d94ebcb1c1"}}, -{"id":"nodevore","key":"nodevore","value":{"rev":"3-ac73b3bc33e2f934776dda359869ddcf"}}, -{"id":"nodewatch","key":"nodewatch","value":{"rev":"9-267bfe1324c51993865dc41b09aee6dc"}}, -{"id":"nodewii","key":"nodewii","value":{"rev":"9-716b3faa8957c1aea337540402ae7f43"}}, -{"id":"nodie","key":"nodie","value":{"rev":"3-cc29702a2e7e295cfe583a05fb77b530"}}, -{"id":"nodify","key":"nodify","value":{"rev":"10-87fadf6bf262882bd71ab7e759b29949"}}, -{"id":"nodrrr","key":"nodrrr","value":{"rev":"3-75937f4ffb722a67d6c5a67663366854"}}, -{"id":"nodules","key":"nodules","value":{"rev":"8-2c6ec430f26ff7ef171e80b7b5e990c2"}}, -{"id":"nodysentary","key":"nodysentary","value":{"rev":"3-7574fc8e12b1271c2eb1c66026f702cb"}}, -{"id":"nohm","key":"nohm","value":{"rev":"45-09dcf4df92734b3c51c8df3c3b374b0b"}}, -{"id":"noid","key":"noid","value":{"rev":"5-ac31e001806789e80a7ffc64f2914eb4"}}, -{"id":"nolife","key":"nolife","value":{"rev":"7-cfd4fe84b1062303cefb83167ea48bba"}}, -{"id":"nolog","key":"nolog","value":{"rev":"9-6e82819b801f5d7ec6773596d5d2efb2"}}, -{"id":"nomnom","key":"nomnom","value":{"rev":"34-bf66753d1d155820cfacfc7fa7a830c9"}}, -{"id":"nomplate","key":"nomplate","value":{"rev":"9-6ea21ee9568421a60cb80637c4c6cb48"}}, -{"id":"nonogo","key":"nonogo","value":{"rev":"5-8307413f9a3da913f9818c4f2d951519"}}, -{"id":"noode","key":"noode","value":{"rev":"7-454df50a7cbd03c46a9951cb1ddbe1c6"}}, -{"id":"noodle","key":"noodle","value":{"rev":"7-163745527770de0de8e7e9d59fc3888c"}}, -{"id":"noop","key":"noop","value":{"rev":"5-ed9fd66573ed1186e66b4c2bc16192cb"}}, -{"id":"nope","key":"nope","value":{"rev":"3-7088ffb62b8e06261527cbfa69cb94c5"}}, -{"id":"nopro","key":"nopro","value":{"rev":"11-6c4aeafe6329821b2259ef11414481dd"}}, -{"id":"nopt","key":"nopt","value":{"rev":"23-cce441940b6f129cab94a359ddb8b3e4"}}, -{"id":"norm","key":"norm","value":{"rev":"9-2bf26c3803fdc3bb6319e490cae3b625"}}, -{"id":"norq","key":"norq","value":{"rev":"3-b1a80ad1aa4ccc493ac25da22b0f0697"}}, -{"id":"norris","key":"norris","value":{"rev":"3-a341286d9e83fa392c1ce6b764d0aace"}}, -{"id":"norris-ioc","key":"norris-ioc","value":{"rev":"15-d022f159229d89ce60fc2a15d71eac59"}}, -{"id":"norris-tester","key":"norris-tester","value":{"rev":"3-fc2f34c9373bbdf5a1cd9cfbaff21f83"}}, -{"id":"northwatcher","key":"northwatcher","value":{"rev":"13-edab28a123f0100e12f96c9828428a8a"}}, -{"id":"nosey","key":"nosey","value":{"rev":"4-10a22f27dd9f2a40acf035a7d250c661"}}, -{"id":"nosql-thin","key":"nosql-thin","value":{"rev":"6-604169cacf303b5278064f68b884090b"}}, -{"id":"notch","key":"notch","value":{"rev":"3-5b720089f0f9cfdbbbea8677216eeee5"}}, -{"id":"notes","key":"notes","value":{"rev":"3-5dfbd6ec33c69c0f1b619dd65d9e7a56"}}, -{"id":"nothing","key":"nothing","value":{"rev":"3-8b44e10efd7d6504755c0c4bd1043814"}}, -{"id":"notifications","key":"notifications","value":{"rev":"3-a68448bca7ea2d3d3ce43e4d03cd76c6"}}, -{"id":"notifo","key":"notifo","value":{"rev":"8-0bc13ea6135adfa80c5fac497a2ddeda"}}, -{"id":"notify","key":"notify","value":{"rev":"3-da00942576bcb5fab594186f80d4575a"}}, -{"id":"notify-send","key":"notify-send","value":{"rev":"7-89f5c6bc656d51577e3997b9f90d0454"}}, -{"id":"nova","key":"nova","value":{"rev":"3-4e136f35b7d5b85816c17496c6c0e382"}}, -{"id":"now","key":"now","value":{"rev":"84-dbfde18b3f6fe79dd3637b6da34b78cf"}}, -{"id":"now-bal","key":"now-bal","value":{"rev":"3-c769bcdd45a93095f68c2de54f35543f"}}, -{"id":"nowpad","key":"nowpad","value":{"rev":"51-8d90c49031f79a9d31eb4ed6f39609b6"}}, -{"id":"nowww","key":"nowww","value":{"rev":"3-541994af2e579b376d2037f4e34f31d8"}}, -{"id":"noxmox","key":"noxmox","value":{"rev":"9-4ac8b1529dced329cac0976b9ca9eed0"}}, -{"id":"nozzle","key":"nozzle","value":{"rev":"23-e60444326d11a5b57c208de548c325e8"}}, -{"id":"npm","key":"npm","value":{"rev":"665-71d13d024c846b2ee85ed054fcfcb242"}}, -{"id":"npm-deploy","key":"npm-deploy","value":{"rev":"23-751e9d3c2edac0fd9916b0e886414ef2"}}, -{"id":"npm-dev-install","key":"npm-dev-install","value":{"rev":"3-7a08e11a59758329ba8dc4e781ea9993"}}, -{"id":"npm-docsite","key":"npm-docsite","value":{"rev":"3-5ed4f1ffea02487ab9ea24cfa0196f76"}}, -{"id":"npm-github-service","key":"npm-github-service","value":{"rev":"8-6891bc055b499e088fc79a7f94b6a4ec"}}, -{"id":"npm-intro-slides","key":"npm-intro-slides","value":{"rev":"8-e95f28475662cb8f70f4cb48baaa9d27"}}, -{"id":"npm-monitor","key":"npm-monitor","value":{"rev":"7-4e3209ea893fe37c0e516fe21de2d8ad"}}, -{"id":"npm-remapper","key":"npm-remapper","value":{"rev":"3-69163475ee93f32faac3f934e772b6c7"}}, -{"id":"npm-tweets","key":"npm-tweets","value":{"rev":"9-86064412a8aa02d813b20d2e49d78d84"}}, -{"id":"npm-wrapper","key":"npm-wrapper","value":{"rev":"3-59c4d372b84f6e91dbe48a220511dfd5"}}, -{"id":"npm2debian","key":"npm2debian","value":{"rev":"3-3cf2f471f3bfbc613176c7c780a6aad6"}}, -{"id":"npmcount","key":"npmcount","value":{"rev":"5-59c55b09d9c2cc7da217cab3b0ea642c"}}, -{"id":"npmdep","key":"npmdep","value":{"rev":"9-78184ad3b841e5c91bbfa29ff722778a"}}, -{"id":"npmtop","key":"npmtop","value":{"rev":"19-2754af894829f22d6edb3a17a64cdf1e"}}, -{"id":"nquery","key":"nquery","value":{"rev":"9-461fb0c9bcc3c15e0696dc2e99807c98"}}, -{"id":"nrecipe","key":"nrecipe","value":{"rev":"15-a96b6b0134a7625eb4eb236b4bf3fbf3"}}, -{"id":"nserver","key":"nserver","value":{"rev":"5-ea895373c340dd8d9119f3f549990048"}}, -{"id":"nserver-util","key":"nserver-util","value":{"rev":"5-5e14eb0bc9f7ab0eac04c5699c6bb328"}}, -{"id":"nssocket","key":"nssocket","value":{"rev":"51-6aac1d5dd0aa7629b3619b3085d63c04"}}, -{"id":"nstore","key":"nstore","value":{"rev":"28-6e2639829539b7315040487dfa5c79af"}}, -{"id":"nstore-cache","key":"nstore-cache","value":{"rev":"3-453ed78dcbe68b31ff675f4d94b47c4a"}}, -{"id":"nstore-query","key":"nstore-query","value":{"rev":"3-39f46992dd278824db641a37ec5546f5"}}, -{"id":"ntodo","key":"ntodo","value":{"rev":"7-e214da8bbed2d3e40bdaec77d7a49831"}}, -{"id":"ntp","key":"ntp","value":{"rev":"5-5ee2b25e8f3bca06d1cc4ce3b25cac42"}}, -{"id":"nts","key":"nts","value":{"rev":"7-ecaf47f8af1f77de791d1d1fa9bab88e"}}, -{"id":"nttpd","key":"nttpd","value":{"rev":"21-cda7aa0f1db126428f6ca01d44b4d209"}}, -{"id":"ntwitter","key":"ntwitter","value":{"rev":"11-732c6f34137c942bc98967170b2f83fc"}}, -{"id":"nub","key":"nub","value":{"rev":"3-932ecf56889fa43584687dbb2cf4aa91"}}, -{"id":"nubnub","key":"nubnub","value":{"rev":"6-93a5267209e1aa869521a5952cbb1828"}}, -{"id":"null","key":"null","value":{"rev":"3-ae8247cfa9553d23a229993cfc8436c5"}}, -{"id":"numb","key":"numb","value":{"rev":"5-594cd9e8e8e4262ddb3ddd80e8084b62"}}, -{"id":"nun","key":"nun","value":{"rev":"8-3bd8b37ed85c1a5da211bd0d5766848e"}}, -{"id":"nunz","key":"nunz","value":{"rev":"3-040f033943158be495f6b0da1a0c0344"}}, -{"id":"nurl","key":"nurl","value":{"rev":"11-6c4ee6fc5c5119c56f2fd8ad8a0cb928"}}, -{"id":"nutil","key":"nutil","value":{"rev":"3-7785a1d4651dcfe78c874848f41d1348"}}, -{"id":"nutils","key":"nutils","value":{"rev":"13-889624db0c155fc2f0b501bba47e55ec"}}, -{"id":"nuvem","key":"nuvem","value":{"rev":"23-054b9b1240f4741f561ef0bb3197bdf8"}}, -{"id":"nvm","key":"nvm","value":{"rev":"28-251b7eb3429a00099b37810d05accd47"}}, -{"id":"nwm","key":"nwm","value":{"rev":"3-fe9274106aac9e67eea734159477acaf"}}, -{"id":"nx","key":"nx","value":{"rev":"55-7ad32fcb34ec25f841ddd0e5857375c7"}}, -{"id":"nx-core","key":"nx-core","value":{"rev":"33-a7bc62348591bae89fff82057bede1ab"}}, -{"id":"nx-daemon","key":"nx-daemon","value":{"rev":"3-7b86a87654c9e32746a4d36d7c527182"}}, -{"id":"nyaatorrents","key":"nyaatorrents","value":{"rev":"5-8600707a1e84f617bd5468b5c9179202"}}, -{"id":"nyala","key":"nyala","value":{"rev":"17-23c908297a37c47f9f09977f4cf101ff"}}, -{"id":"nyam","key":"nyam","value":{"rev":"17-697b5f17fe67630bc9494184146c12f1"}}, -{"id":"nyancat","key":"nyancat","value":{"rev":"13-84c18d007db41b40e9145bdc049b0a00"}}, -{"id":"nymph","key":"nymph","value":{"rev":"5-3a5d7a75d32f7a71bf4ec131f71484d8"}}, -{"id":"o3-xml","key":"o3-xml","value":{"rev":"3-cc4df881333805600467563f80b5216c"}}, -{"id":"oahu","key":"oahu","value":{"rev":"3-e789fc2098292518cb33606c73bfeca4"}}, -{"id":"oauth","key":"oauth","value":{"rev":"38-36b99063db7dc302b70d932e9bbafc24"}}, -{"id":"oauth-client","key":"oauth-client","value":{"rev":"12-ae097c9580ddcd5ca938b169486a63c6"}}, -{"id":"oauth-server","key":"oauth-server","value":{"rev":"7-ea931e31eaffaa843be61ffc89f29da7"}}, -{"id":"oauth2","key":"oauth2","value":{"rev":"3-4fce73fdc95580f397afeaf1bbd596bb"}}, -{"id":"oauth2-client","key":"oauth2-client","value":{"rev":"7-b5bd019159112384abc2087b2f8cb4f7"}}, -{"id":"oauth2-provider","key":"oauth2-provider","value":{"rev":"3-acd8f23b8c1c47b19838424b64618c70"}}, -{"id":"oauth2-server","key":"oauth2-server","value":{"rev":"11-316baa7e754053d0153086d0748b07c5"}}, -{"id":"obj_diff","key":"obj_diff","value":{"rev":"3-9289e14caaec4bb6aa64aa1be547db3b"}}, -{"id":"object-additions","key":"object-additions","value":{"rev":"3-11f03ae5afe00ad2be034fb313ce71a9"}}, -{"id":"object-proxy","key":"object-proxy","value":{"rev":"3-4d531308fc97bac6f6f9acd1e8f5b53a"}}, -{"id":"object-sync","key":"object-sync","value":{"rev":"5-6628fff49d65c96edc9d7a2e13db8d6d"}}, -{"id":"observer","key":"observer","value":{"rev":"3-a48052671a59b1c7874b4462e375664d"}}, -{"id":"octo.io","key":"octo.io","value":{"rev":"7-5692104396299695416ecb8548e53541"}}, -{"id":"octopus","key":"octopus","value":{"rev":"3-0a286abf59ba7232210e24a371902e7b"}}, -{"id":"odbc","key":"odbc","value":{"rev":"3-8550f0b183b229e41f3cb947bad9b059"}}, -{"id":"odot","key":"odot","value":{"rev":"13-3954b69c1a560a71fe58ab0c5c1072ba"}}, -{"id":"offliner","key":"offliner","value":{"rev":"3-9b58041cbd7b0365e04fec61c192c9b2"}}, -{"id":"ofxer","key":"ofxer","value":{"rev":"11-f8a79e1f27c92368ca1198ad37fbe83e"}}, -{"id":"ogre","key":"ogre","value":{"rev":"35-ea9c78c1d5b1761f059bb97ea568b23d"}}, -{"id":"oi.tekcos","key":"oi.tekcos","value":{"rev":"5-fdca9adb54acea3f91567082b107dde9"}}, -{"id":"oktest","key":"oktest","value":{"rev":"3-3b40312743a3eb1d8541ceee3ecfeace"}}, -{"id":"omcc","key":"omcc","value":{"rev":"3-19718e77bf82945c3ca7a3cdfb91188c"}}, -{"id":"omegle","key":"omegle","value":{"rev":"3-507ba8a51afbe2ff078e3e96712b7286"}}, -{"id":"ometa","key":"ometa","value":{"rev":"10-457fa17de89e1012ce812af3a53f4035"}}, -{"id":"ometa-highlighter","key":"ometa-highlighter","value":{"rev":"21-d18470d6d9a93bc7383c7d8ace22ad1d"}}, -{"id":"ometajs","key":"ometajs","value":{"rev":"20-c7e8c32926f2523e40e4a7ba2297192c"}}, -{"id":"onion","key":"onion","value":{"rev":"3-b46c000c8ff0b06f5f0028d268bc5c94"}}, -{"id":"onvalid","key":"onvalid","value":{"rev":"3-090bc1cf1418545b84db0fceb0846293"}}, -{"id":"oo","key":"oo","value":{"rev":"7-2297a18cdbcf29ad4867a2159912c04e"}}, -{"id":"oop","key":"oop","value":{"rev":"7-45fab8bae343e805d0c1863149dc20df"}}, -{"id":"op","key":"op","value":{"rev":"13-4efb059757caaecc18d5110b44266b35"}}, -{"id":"open-uri","key":"open-uri","value":{"rev":"21-023a00f26ecd89e278136fbb417ae9c3"}}, -{"id":"open.core","key":"open.core","value":{"rev":"35-f578db4e41dd4ae9128e3be574cf7b14"}}, -{"id":"open311","key":"open311","value":{"rev":"13-bb023a45d3c3988022d2fef809de8d98"}}, -{"id":"openid","key":"openid","value":{"rev":"29-b3c8a0e76d99ddb80c98d2aad5586771"}}, -{"id":"openlayers","key":"openlayers","value":{"rev":"3-602c34468c9be326e95be327b58d599b"}}, -{"id":"opentok","key":"opentok","value":{"rev":"5-5f4749f1763d45141d0272c1dbe6249a"}}, -{"id":"opentsdb-dashboard","key":"opentsdb-dashboard","value":{"rev":"3-2e0c5ccf3c9cfce17c20370c93283707"}}, -{"id":"opower-jobs","key":"opower-jobs","value":{"rev":"16-1602139f92e58d88178f21f1b3e0939f"}}, -{"id":"optimist","key":"optimist","value":{"rev":"64-ca3e5085acf135169d79949c25d84690"}}, -{"id":"optparse","key":"optparse","value":{"rev":"6-0200c34395f982ae3b80f4d18cb14483"}}, -{"id":"opts","key":"opts","value":{"rev":"8-ce2a0e31de55a1e02d5bbff66c4e8794"}}, -{"id":"orchestra","key":"orchestra","value":{"rev":"9-52ca98cddb51a2a43ec02338192c44fc"}}, -{"id":"orchid","key":"orchid","value":{"rev":"49-af9635443671ed769e4efa691b8ca84a"}}, -{"id":"orderly","key":"orderly","value":{"rev":"3-9ccc42d45b64278c9ffb1e64fc4f0d62"}}, -{"id":"orgsync.live","key":"orgsync.live","value":{"rev":"3-4dffc8ac43931364f59b9cb534acbaef"}}, -{"id":"orm","key":"orm","value":{"rev":"21-f3e7d89239364559d306110580bbb08f"}}, -{"id":"ormnomnom","key":"ormnomnom","value":{"rev":"15-0aacfbb5b7b580d76e9ecf5214a1d5ed"}}, -{"id":"orona","key":"orona","value":{"rev":"8-62d4ba1bf49098a140a2b85f80ebb103"}}, -{"id":"osc4node","key":"osc4node","value":{"rev":"3-0910613e78065f78b61142b35986e8b3"}}, -{"id":"oscar","key":"oscar","value":{"rev":"3-f5d2d39a67c67441bc2135cdaf2b47f8"}}, -{"id":"osrandom","key":"osrandom","value":{"rev":"3-026016691a5ad068543503e5e7ce6a84"}}, -{"id":"ossp-uuid","key":"ossp-uuid","value":{"rev":"10-8b7e1fba847d7cc9aa4f4c8813ebe6aa"}}, -{"id":"ostatus","key":"ostatus","value":{"rev":"3-76e0ec8c61c6df15c964197b722e24e7"}}, -{"id":"ostrich","key":"ostrich","value":{"rev":"3-637e0821e5ccfd0f6b1261b22c168c8d"}}, -{"id":"otk","key":"otk","value":{"rev":"5-2dc24e159cc618f43e573561286c4dcd"}}, -{"id":"ourl","key":"ourl","value":{"rev":"5-a3945e59e33faac96c75b508ef7fa1fb"}}, -{"id":"oursql","key":"oursql","value":{"rev":"21-bc53ab462155fa0aedbe605255fb9988"}}, -{"id":"out","key":"out","value":{"rev":"5-eb261f940b6382e2689210a58bc1b440"}}, -{"id":"overload","key":"overload","value":{"rev":"10-b88919e5654bef4922029afad4f1d519"}}, -{"id":"ox","key":"ox","value":{"rev":"3-0ca445370b4f76a93f2181ad113956d9"}}, -{"id":"pachube","key":"pachube","value":{"rev":"10-386ac6be925bab307b5d545516fb18ef"}}, -{"id":"pachube-stream","key":"pachube-stream","value":{"rev":"13-176dadcc5c516420fb3feb1f964739e0"}}, -{"id":"pack","key":"pack","value":{"rev":"29-8f8c511d95d1fb322c1a6d7965ef8f29"}}, -{"id":"packagebohrer","key":"packagebohrer","value":{"rev":"3-507358253a945a74c49cc169ad0bf5a2"}}, -{"id":"packer","key":"packer","value":{"rev":"9-23410d893d47418731e236cfcfcfbf03"}}, -{"id":"packet","key":"packet","value":{"rev":"8-1b366f97d599c455dcbbe4339da7cf9e"}}, -{"id":"pacote-sam-egenial","key":"pacote-sam-egenial","value":{"rev":"3-b967db1b9fceb9a937f3520efd89f479"}}, -{"id":"pacoteegenial","key":"pacoteegenial","value":{"rev":"3-9cfe8518b885bfd9a44ed38814f7d623"}}, -{"id":"pact","key":"pact","value":{"rev":"7-82996c1a0c8e9a5e9df959d4ad37085e"}}, -{"id":"pad","key":"pad","value":{"rev":"3-eef6147f09b662cff95c946f2b065da5"}}, -{"id":"paddle","key":"paddle","value":{"rev":"3-fedd0156b9a0dadb5e9b0f1cfab508fd"}}, -{"id":"padlock","key":"padlock","value":{"rev":"9-3a9e378fbe8e3817da7999f675af227e"}}, -{"id":"pagen","key":"pagen","value":{"rev":"9-9aac56724039c38dcdf7f6d5cbb4911c"}}, -{"id":"paginate-js","key":"paginate-js","value":{"rev":"5-995269155152db396662c59b67e9e93d"}}, -{"id":"pairtree","key":"pairtree","value":{"rev":"3-0361529e6c91271e2a61f3d7fd44366e"}}, -{"id":"palsu-app","key":"palsu-app","value":{"rev":"3-73f1fd9ae35e3769efc9c1aa25ec6da7"}}, -{"id":"pam","key":"pam","value":{"rev":"3-77b5bd15962e1c8be1980b33fd3b9737"}}, -{"id":"panache","key":"panache","value":{"rev":"25-749d2034f7f9179c2266cf896bb4abb0"}}, -{"id":"panic","key":"panic","value":{"rev":"7-068b22be54ca8ae7b03eb153c2ea849a"}}, -{"id":"pantry","key":"pantry","value":{"rev":"33-3896f0fc165092f6cabb2949be3952c4"}}, -{"id":"paper-keys","key":"paper-keys","value":{"rev":"3-729378943040ae01d59f07bb536309b7"}}, -{"id":"paperboy","key":"paperboy","value":{"rev":"8-db2d51c2793b4ffc82a1ae928c813aae"}}, -{"id":"paperserve","key":"paperserve","value":{"rev":"6-8509fb68217199a3eb74f223b1e2bee5"}}, -{"id":"parall","key":"parall","value":{"rev":"5-279d7105a425e136f6101250e8f81a14"}}, -{"id":"parallel","key":"parallel","value":{"rev":"14-f1294b3b840cfb26095107110b6720ec"}}, -{"id":"paramon","key":"paramon","value":{"rev":"3-37e599e924beb509c894c992cf72791b"}}, -{"id":"parannus","key":"parannus","value":{"rev":"7-7541f1ed13553261330b9e1c4706f112"}}, -{"id":"parasite","key":"parasite","value":{"rev":"13-83c26181bb92cddb8ff76bc154a50210"}}, -{"id":"parrot","key":"parrot","value":{"rev":"3-527d1cb4b5be0e252dc92a087d380f17"}}, -{"id":"parseUri","key":"parseUri","value":{"rev":"3-3b60b1fd6d8109279b5d0cfbdb89b343"}}, -{"id":"parseopt","key":"parseopt","value":{"rev":"10-065f1acaf02c94f0684f75fefc2fd1ec"}}, -{"id":"parser","key":"parser","value":{"rev":"5-f661f0b7ede9b6d3e0de259ed20759b1"}}, -{"id":"parser_email","key":"parser_email","value":{"rev":"12-63333860c62f2a9c9d6b0b7549bf1cdc"}}, -{"id":"parstream","key":"parstream","value":{"rev":"3-ef7e8ffc8ce1e7d951e37f85bfd445ab"}}, -{"id":"parted","key":"parted","value":{"rev":"9-250e4524994036bc92915b6760d62d8a"}}, -{"id":"partial","key":"partial","value":{"rev":"7-208411e6191275a4193755ee86834716"}}, -{"id":"party","key":"party","value":{"rev":"5-9337d8dc5e163f0300394f533ab1ecdf"}}, -{"id":"pashua","key":"pashua","value":{"rev":"3-b752778010f4e20f662a3d8f0f57b18b"}}, -{"id":"pass","key":"pass","value":{"rev":"3-66a2d55d93eae8535451f12965578db8"}}, -{"id":"passthru","key":"passthru","value":{"rev":"9-3c8f0b20f1a16976f3645a6f7411b56a"}}, -{"id":"passwd","key":"passwd","value":{"rev":"19-44ac384382a042faaa1f3b111786c831"}}, -{"id":"password","key":"password","value":{"rev":"9-0793f6a8d09076f25cde7c9e528eddec"}}, -{"id":"password-hash","key":"password-hash","value":{"rev":"9-590c62e275ad577c6f8ddbf5ba4579cc"}}, -{"id":"path","key":"path","value":{"rev":"3-3ec064cf3f3a85cb59528654c5bd938f"}}, -{"id":"pathjs","key":"pathjs","value":{"rev":"5-d5e1b1a63e711cae3ac79a3b1033b609"}}, -{"id":"pathname","key":"pathname","value":{"rev":"9-16f2c1473454900ce18a217b2ea52c57"}}, -{"id":"paths","key":"paths","value":{"rev":"3-fa47b7c1d533a7d9f4bbaffc5fb89905"}}, -{"id":"patr","key":"patr","value":{"rev":"7-7bcd37586389178b9f23d33c1d7a0292"}}, -{"id":"pattern","key":"pattern","value":{"rev":"36-3ded826185c384af535dcd428af3f626"}}, -{"id":"payment-paypal-payflowpro","key":"payment-paypal-payflowpro","value":{"rev":"14-d8814a1d8bba57a6ecf8027064adc7ad"}}, -{"id":"paynode","key":"paynode","value":{"rev":"16-16084e61db66ac18fdbf95a51d31c09a"}}, -{"id":"payos","key":"payos","value":{"rev":"3-373695bd80c454b32b83a5eba6044261"}}, -{"id":"paypal-ipn","key":"paypal-ipn","value":{"rev":"5-ef32291f9f8371b20509db3acee722f6"}}, -{"id":"pcap","key":"pcap","value":{"rev":"46-8ae9e919221102581d6bb848dc67b84b"}}, -{"id":"pd","key":"pd","value":{"rev":"7-82146739c4c0eb4e49e40aa80a29cc0a"}}, -{"id":"pdf","key":"pdf","value":{"rev":"6-5c6b6a133e1b3ce894ebb1a49090216c"}}, -{"id":"pdfcrowd","key":"pdfcrowd","value":{"rev":"5-026b4611b50374487bfd64fd3e0d562c"}}, -{"id":"pdfkit","key":"pdfkit","value":{"rev":"13-2fd34c03225a87dfd8057c85a83f3c50"}}, -{"id":"pdflatex","key":"pdflatex","value":{"rev":"3-bbbf61f09ebe4c49ca0aff8019611660"}}, -{"id":"pdl","key":"pdl","value":{"rev":"3-4c41bf12e901ee15bdca468db8c89102"}}, -{"id":"peanut","key":"peanut","value":{"rev":"55-b797121dbbcba1219934284ef56abb8a"}}, -{"id":"pebble","key":"pebble","value":{"rev":"21-3cd08362123260a2e96d96d80e723805"}}, -{"id":"pecode","key":"pecode","value":{"rev":"3-611f5e8c61bbf4467b84da954ebdd521"}}, -{"id":"pegjs","key":"pegjs","value":{"rev":"11-091040d16433014d1da895e32ac0f6a9"}}, -{"id":"per-second","key":"per-second","value":{"rev":"5-e1593b3f7008ab5e1c3cae86f39ba3f3"}}, -{"id":"permafrost","key":"permafrost","value":{"rev":"9-494cbc9a2f43a60b57f23c5f5b12270d"}}, -{"id":"perry","key":"perry","value":{"rev":"41-15aed7a778fc729ad62fdfb231c50774"}}, -{"id":"persistencejs","key":"persistencejs","value":{"rev":"20-2585af3f15f0a4a7395e937237124596"}}, -{"id":"pg","key":"pg","value":{"rev":"142-48de452fb8a84022ed7cae8ec2ebdaf6"}}, -{"id":"phonetap","key":"phonetap","value":{"rev":"7-2cc7d3c2a09518ad9b0fe816c6a99125"}}, -{"id":"php-autotest","key":"php-autotest","value":{"rev":"3-04470b38b259187729af574dd3dc1f97"}}, -{"id":"phpass","key":"phpass","value":{"rev":"3-66f4bec659bf45b312022bb047b18696"}}, -{"id":"piano","key":"piano","value":{"rev":"3-0bab6b5409e4305c87a775e96a2b7ad3"}}, -{"id":"picard","key":"picard","value":{"rev":"5-7676e6ad6d5154fdc016b001465891f3"}}, -{"id":"picardForTynt","key":"picardForTynt","value":{"rev":"3-09d205b790bd5022b69ec4ad54bad770"}}, -{"id":"pid","key":"pid","value":{"rev":"3-0ba7439d599b9d613461794c3892d479"}}, -{"id":"pieshop","key":"pieshop","value":{"rev":"12-7851afe1bbc20de5d054fe93b071f849"}}, -{"id":"pig","key":"pig","value":{"rev":"3-8e6968a7b64635fed1bad12c39d7a46a"}}, -{"id":"pigeons","key":"pigeons","value":{"rev":"53-8df70420d3c845cf0159b3f25d0aab90"}}, -{"id":"piles","key":"piles","value":{"rev":"3-140cb1e83b5a939ecd429b09886132ef"}}, -{"id":"pillar","key":"pillar","value":{"rev":"6-83c81550187f6d00e11dd9955c1c94b7"}}, -{"id":"pilot","key":"pilot","value":{"rev":"3-073ed1a083cbd4c2aa2561f19e5935ea"}}, -{"id":"pinboard","key":"pinboard","value":{"rev":"3-1020cab02a1183acdf82e1f7620dc1e0"}}, -{"id":"pinf-loader-js","key":"pinf-loader-js","value":{"rev":"5-709ba9c86fb4de906bd7bbca53771f0f"}}, -{"id":"pinf-loader-js-demos-npmpackage","key":"pinf-loader-js-demos-npmpackage","value":{"rev":"3-860569d98c83e59185cff356e56b10a6"}}, -{"id":"pingback","key":"pingback","value":{"rev":"5-5d0a05d65a14f6837b0deae16c550bec"}}, -{"id":"pingdom","key":"pingdom","value":{"rev":"11-f299d6e99122a9fa1497bfd166dadd02"}}, -{"id":"pintpay","key":"pintpay","value":{"rev":"3-eba9c4059283adec6b1ab017284c1f17"}}, -{"id":"pipe","key":"pipe","value":{"rev":"5-d202bf317c10a52ac817b5c1a4ce4c88"}}, -{"id":"pipe_utils","key":"pipe_utils","value":{"rev":"13-521857c99eb76bba849a22240308e584"}}, -{"id":"pipegram","key":"pipegram","value":{"rev":"3-1449333c81dd658d5de9eebf36c07709"}}, -{"id":"pipeline-surveyor","key":"pipeline-surveyor","value":{"rev":"11-464db89b17e7b44800088ec4a263d92e"}}, -{"id":"pipes","key":"pipes","value":{"rev":"99-8320636ff840a61d82d9c257a2e0ed48"}}, -{"id":"pipes-cellar","key":"pipes-cellar","value":{"rev":"27-e035e58a3d82e50842d766bb97ea3ed9"}}, -{"id":"pipes-cohort","key":"pipes-cohort","value":{"rev":"9-88fc0971e01516873396e44974874903"}}, -{"id":"piton-entity","key":"piton-entity","value":{"rev":"31-86254212066019f09d67dfd58524bd75"}}, -{"id":"piton-http-utils","key":"piton-http-utils","value":{"rev":"3-6cf6aa0c655ff6118d53e62e3b970745"}}, -{"id":"piton-mixin","key":"piton-mixin","value":{"rev":"3-7b7737004e53e04f7f95ba5850eb5e70"}}, -{"id":"piton-pipe","key":"piton-pipe","value":{"rev":"3-8d7df4e53f620ef2f24e9fc8b24f0238"}}, -{"id":"piton-simplate","key":"piton-simplate","value":{"rev":"3-9ac00835d3de59d535cdd2347011cdc9"}}, -{"id":"piton-string-utils","key":"piton-string-utils","value":{"rev":"3-ecab73993d764dfb378161ea730dbbd5"}}, -{"id":"piton-validity","key":"piton-validity","value":{"rev":"13-1766651d69e3e075bf2c66b174b66026"}}, -{"id":"pixel-ping","key":"pixel-ping","value":{"rev":"11-38d717c927e13306e8ff9032785b50f2"}}, -{"id":"pixelcloud","key":"pixelcloud","value":{"rev":"7-0897d734157b52dece8f86cde7be19d4"}}, -{"id":"pixiedust","key":"pixiedust","value":{"rev":"3-6b932dee4b6feeed2f797de5d0066f8a"}}, -{"id":"pkginfo","key":"pkginfo","value":{"rev":"13-3ee42503d6672812960a965d4f3a1bc2"}}, -{"id":"pksqlite","key":"pksqlite","value":{"rev":"13-095e7d7d0258b71491c39d0e8c4f19be"}}, -{"id":"plants.js","key":"plants.js","value":{"rev":"3-e3ef3a16f637787e84c100a9b9ec3b08"}}, -{"id":"plate","key":"plate","value":{"rev":"20-92ba0729b2edc931f28870fe7f2ca95a"}}, -{"id":"platform","key":"platform","value":{"rev":"4-be465a1d21be066c96e30a42b8602177"}}, -{"id":"platformjs","key":"platformjs","value":{"rev":"35-5c510fa0c90492fd1d0f0fc078460018"}}, -{"id":"platoon","key":"platoon","value":{"rev":"28-e0e0c5f852eadacac5a652860167aa11"}}, -{"id":"play","key":"play","value":{"rev":"5-17f7cf7cf5d1c21c7392f3c43473098d"}}, -{"id":"plist","key":"plist","value":{"rev":"10-2a23864923aeed93fb8e25c4b5b2e97e"}}, -{"id":"png","key":"png","value":{"rev":"14-9cc7aeaf0c036c9a880bcee5cd46229a"}}, -{"id":"png-guts","key":"png-guts","value":{"rev":"5-a29c7c686f9d08990ce29632bf59ef90"}}, -{"id":"policyfile","key":"policyfile","value":{"rev":"21-4a9229cca4bcac10f730f296f7118548"}}, -{"id":"polla","key":"polla","value":{"rev":"27-9af5a575961a4dddb6bef482c168c756"}}, -{"id":"poly","key":"poly","value":{"rev":"3-7f7fe29d9f0ec4fcbf8481c797b20455"}}, -{"id":"polyglot","key":"polyglot","value":{"rev":"3-9306e246d1f8b954b41bef76e3e81291"}}, -{"id":"pool","key":"pool","value":{"rev":"10-f364b59aa8a9076a17cd94251dd013ab"}}, -{"id":"poolr","key":"poolr","value":{"rev":"5-cacfbeaa7aaca40c1a41218e8ac8b732"}}, -{"id":"pop","key":"pop","value":{"rev":"41-8edd9ef2f34a90bf0ec5e8eb0e51e644"}}, -{"id":"pop-disqus","key":"pop-disqus","value":{"rev":"3-4a8272e6a8453ed2d754397dc8b349bb"}}, -{"id":"pop-ga","key":"pop-ga","value":{"rev":"3-5beaf7b355d46b3872043b97696ee693"}}, -{"id":"pop-gallery","key":"pop-gallery","value":{"rev":"3-1a88920ff930b8ce51cd50fcfe62675e"}}, -{"id":"pop3-client","key":"pop3-client","value":{"rev":"3-be8c314b0479d9d98384e2ff36d7f207"}}, -{"id":"poplib","key":"poplib","value":{"rev":"7-ab64c5c35269aee897b0904b4548096b"}}, -{"id":"porter-stemmer","key":"porter-stemmer","value":{"rev":"5-724a7b1d635b95a14c9ecd9d2f32487d"}}, -{"id":"portfinder","key":"portfinder","value":{"rev":"5-cdf36d1c666bbdae500817fa39b9c2bd"}}, -{"id":"portscanner","key":"portscanner","value":{"rev":"3-773c1923b6f3b914bd801476efcfdf64"}}, -{"id":"pos","key":"pos","value":{"rev":"3-1c1a27020560341ecd1b54d0e3cfaf2a"}}, -{"id":"posix-getopt","key":"posix-getopt","value":{"rev":"3-819b69724575b65fe25cf1c768e1b1c6"}}, -{"id":"postageapp","key":"postageapp","value":{"rev":"9-f5735237f7e6f0b467770e28e84c56db"}}, -{"id":"postal","key":"postal","value":{"rev":"19-dd70aeab4ae98ccf3d9f203dff9ccf37"}}, -{"id":"posterous","key":"posterous","value":{"rev":"3-6f8a9e7cae8a26f021653f2c27b0c67f"}}, -{"id":"postgres","key":"postgres","value":{"rev":"6-e8844a47c83ff3ef0a1ee7038b2046b2"}}, -{"id":"postgres-js","key":"postgres-js","value":{"rev":"3-bbe27a49ee9f8ae8789660e178d6459d"}}, -{"id":"postman","key":"postman","value":{"rev":"5-548538583f2e7ad448adae27f9a801e5"}}, -{"id":"postmark","key":"postmark","value":{"rev":"24-a6c61b346329e499d4a4a37dbfa446a2"}}, -{"id":"postmark-api","key":"postmark-api","value":{"rev":"3-79973af301aa820fc18c2c9d418adcd7"}}, -{"id":"postmessage","key":"postmessage","value":{"rev":"5-854bdb27c2a1af5b629b01f7d69691fe"}}, -{"id":"postpie","key":"postpie","value":{"rev":"10-88527e2731cd07a3b8ddec2608682700"}}, -{"id":"postprocess","key":"postprocess","value":{"rev":"5-513ecd54bf8df0ae73d2a50c717fd939"}}, -{"id":"potato","key":"potato","value":{"rev":"3-0f4cab343859692bf619e79cd9cc5be1"}}, -{"id":"pour","key":"pour","value":{"rev":"7-272bee63c5f19d12102198a23a4af902"}}, -{"id":"pow","key":"pow","value":{"rev":"22-58b557cd71ec0e95eef51dfd900e4736"}}, -{"id":"precious","key":"precious","value":{"rev":"19-b370292b258bcbca02c5d8861ebee0bb"}}, -{"id":"predicate","key":"predicate","value":{"rev":"3-1c6d1871fe71bc61457483793eecf7f9"}}, -{"id":"prefer","key":"prefer","value":{"rev":"11-236b9d16cd019e1d9af41e745bfed754"}}, -{"id":"prenup","key":"prenup","value":{"rev":"3-4c56ddf1ee22cd90c85963209736bc75"}}, -{"id":"pretty-json","key":"pretty-json","value":{"rev":"5-2dbb22fc9573c19e64725ac331a8d59c"}}, -{"id":"prettyfy","key":"prettyfy","value":{"rev":"3-fc7e39aad63a42533d4ac6d6bfa32325"}}, -{"id":"prick","key":"prick","value":{"rev":"10-71a02e1be02df2af0e6a958099be565a"}}, -{"id":"printf","key":"printf","value":{"rev":"5-2896b8bf90df19d4a432153211ca3a7e"}}, -{"id":"pro","key":"pro","value":{"rev":"5-e98adaf2f741e00953bbb942bbeb14d2"}}, -{"id":"probe_couchdb","key":"probe_couchdb","value":{"rev":"28-86f8918a3e64608f8009280fb28a983d"}}, -{"id":"process","key":"process","value":{"rev":"3-6865fc075d8083afd8e2aa266512447c"}}, -{"id":"procfile","key":"procfile","value":{"rev":"3-22dbb2289f5fb3060a8f7833b50116a4"}}, -{"id":"profile","key":"profile","value":{"rev":"29-5afee07fe4c334d9836fda1df51e1f2d"}}, -{"id":"profilejs","key":"profilejs","value":{"rev":"9-128c2b0e09624ee69a915cff20cdf359"}}, -{"id":"profiler","key":"profiler","value":{"rev":"13-4f1582fad93cac11daad5d5a67565e4f"}}, -{"id":"progress","key":"progress","value":{"rev":"7-bba60bc39153fa0fbf5e909b6df213b0"}}, -{"id":"progress-bar","key":"progress-bar","value":{"rev":"5-616721d3856b8e5a374f247404d6ab29"}}, -{"id":"progressify","key":"progressify","value":{"rev":"5-0379cbed5adc2c3f3ac6adf0307ec11d"}}, -{"id":"proj4js","key":"proj4js","value":{"rev":"5-7d209ce230f6a2d5931800acef436a06"}}, -{"id":"projectwatch","key":"projectwatch","value":{"rev":"15-d0eca46ffc3d9e18a51db2d772fa2778"}}, -{"id":"promise","key":"promise","value":{"rev":"3-1409350eb10aa9055ed13a5b59f0abc3"}}, -{"id":"promised-fs","key":"promised-fs","value":{"rev":"28-1d3e0dd1884e1c39a5d5e2d35bb1f911"}}, -{"id":"promised-http","key":"promised-http","value":{"rev":"8-3f8d560c800ddd44a617bf7d7c688392"}}, -{"id":"promised-io","key":"promised-io","value":{"rev":"11-e9a280e85c021cd8b77e524aac50fafb"}}, -{"id":"promised-traits","key":"promised-traits","value":{"rev":"14-62d0ac59d4ac1c6db99c0273020565ea"}}, -{"id":"promised-utils","key":"promised-utils","value":{"rev":"20-0c2488685eb8999c40ee5e7cfa4fd75d"}}, -{"id":"prompt","key":"prompt","value":{"rev":"32-d52a524c147e34c1258facab69660cc2"}}, -{"id":"props","key":"props","value":{"rev":"17-8c4c0bf1b69087510612c8d5ccbfbfeb"}}, -{"id":"proserver","key":"proserver","value":{"rev":"3-4b0a001404171eb0f6f3e5d73a35fcb1"}}, -{"id":"protege","key":"protege","value":{"rev":"150-9790c23d7b7eb5fb94cd5b8048bdbf10"}}, -{"id":"proto","key":"proto","value":{"rev":"6-29fe2869f34e2737b0cc2a0dbba8e397"}}, -{"id":"proto-list","key":"proto-list","value":{"rev":"3-0f64ff29a4a410d5e03a57125374b87b"}}, -{"id":"protobuf-stream","key":"protobuf-stream","value":{"rev":"3-950e621ce7eef306eff5f932a9c4cbae"}}, -{"id":"protodiv","key":"protodiv","value":{"rev":"9-ed8d84033943934eadf5d95dfd4d8eca"}}, -{"id":"proton","key":"proton","value":{"rev":"19-8ad32d57a3e71df786ff41ef8c7281f2"}}, -{"id":"protoparse","key":"protoparse","value":{"rev":"3-9fbcc3b26220f974d4b9c9c883a0260b"}}, -{"id":"prototype","key":"prototype","value":{"rev":"5-2a672703595e65f5d731a967b43655a7"}}, -{"id":"prowl","key":"prowl","value":{"rev":"5-ec480caa5a7db4f1ec2ce22d5eb1dad8"}}, -{"id":"prowler","key":"prowler","value":{"rev":"3-09747704f78c7c123fb1c719c4996924"}}, -{"id":"prox","key":"prox","value":{"rev":"5-0ac5f893b270a819d91f0c6581aca2a8"}}, -{"id":"proxify","key":"proxify","value":{"rev":"3-d24a979b708645328476bd42bd5aaba8"}}, -{"id":"proxino","key":"proxino","value":{"rev":"7-894cc6d453af00e5e39ebc8f0b0abe3a"}}, -{"id":"proxio","key":"proxio","value":{"rev":"55-a1b2744054b3dc3adc2f7f67d2c026a4"}}, -{"id":"proxy","key":"proxy","value":{"rev":"3-c6dd1a8b58e0ed7ac983c89c05ee987d"}}, -{"id":"proxy-by-url","key":"proxy-by-url","value":{"rev":"5-acfcf47f3575cea6594513ff459c5f2c"}}, -{"id":"pseudo","key":"pseudo","value":{"rev":"11-4d894a335036d96cdb9bb19f7b857293"}}, -{"id":"psk","key":"psk","value":{"rev":"17-375055bf6315476a37b5fadcdcb6b149"}}, -{"id":"pty","key":"pty","value":{"rev":"8-0b3ea0287fd23f882da27dabce4e3230"}}, -{"id":"pub-mix","key":"pub-mix","value":{"rev":"3-2c455b249167cbf6b1a6ea761bf119f4"}}, -{"id":"pubjs","key":"pubjs","value":{"rev":"3-a0ceab8bc6ec019dfcf9a8e16756bea0"}}, -{"id":"publicsuffix","key":"publicsuffix","value":{"rev":"8-1592f0714595c0ca0433272c60afc733"}}, -{"id":"publisher","key":"publisher","value":{"rev":"13-f2c8722f14732245d3ca8842fe5b7661"}}, -{"id":"pubnub-client","key":"pubnub-client","value":{"rev":"8-6e511a6dd2b7feb6cefe410facd61f53"}}, -{"id":"pubsub","key":"pubsub","value":{"rev":"11-6c6270bf95af417fb766c05f66b2cc9e"}}, -{"id":"pubsub.io","key":"pubsub.io","value":{"rev":"24-9686fe9ae3356966dffee99f53eaad2c"}}, -{"id":"pubsubd","key":"pubsubd","value":{"rev":"3-b1ff2fa958bd450933735162e9615449"}}, -{"id":"pulley","key":"pulley","value":{"rev":"13-f81ed698175ffd0b5b19357a623b8f15"}}, -{"id":"pulse","key":"pulse","value":{"rev":"9-da4bdabb6d7c189d05c8d6c64713e4ac"}}, -{"id":"pulverizr","key":"pulverizr","value":{"rev":"16-ffd4db4d2b1bfbd0b6ac794dca9e728e"}}, -{"id":"pulverizr-bal","key":"pulverizr-bal","value":{"rev":"5-dba279d07f3ed72990d10f11c5d10792"}}, -{"id":"punycode","key":"punycode","value":{"rev":"3-c0df35bb32d1490a4816161974610682"}}, -{"id":"puppy","key":"puppy","value":{"rev":"3-355fb490dba55efdf8840e2769cb7f41"}}, -{"id":"pure","key":"pure","value":{"rev":"7-b2da0d64ea12cea63bed940222bb36df"}}, -{"id":"purpose","key":"purpose","value":{"rev":"3-ef30ac479535bd603954c27ecb5d564a"}}, -{"id":"push-it","key":"push-it","value":{"rev":"35-2640be8ca8938768836520ce5fc7fff2"}}, -{"id":"pusher","key":"pusher","value":{"rev":"5-eb363d1e0ea2c59fd92a07ea642c5d03"}}, -{"id":"pusher-pipe","key":"pusher-pipe","value":{"rev":"11-11ab87d1288a8c7d11545fdab56616f6"}}, -{"id":"pushinator","key":"pushinator","value":{"rev":"15-6b2c37931bc9438e029a6af0cf97091c"}}, -{"id":"put","key":"put","value":{"rev":"12-4b05a7cdfdb24a980597b38781457cf5"}}, -{"id":"put-selector","key":"put-selector","value":{"rev":"1-1a9b3b8b5a44485b93966503370978aa"}}, -{"id":"putio","key":"putio","value":{"rev":"3-973b65e855e1cd0d3cc685542263cc55"}}, -{"id":"pwilang","key":"pwilang","value":{"rev":"43-49ad04f5abbdd9c5b16ec0271ab17520"}}, -{"id":"py","key":"py","value":{"rev":"3-aade832559d0fab88116aa794e3a9f35"}}, -{"id":"pygments","key":"pygments","value":{"rev":"3-2b2c96f39bdcb9ff38eb7d4bac7c90ba"}}, -{"id":"python","key":"python","value":{"rev":"15-706af811b5544a4aacc6ad1e9863e369"}}, -{"id":"q","key":"q","value":{"rev":"80-fd2397ad465750240d0f22a0abc53de5"}}, -{"id":"q-comm","key":"q-comm","value":{"rev":"17-972994947f097fdcffcfcb2277c966ce"}}, -{"id":"q-fs","key":"q-fs","value":{"rev":"68-958b01dd5bdc4da5ba3c1cd02c85fc0e"}}, -{"id":"q-http","key":"q-http","value":{"rev":"26-42a7db91b650386d920f52afe3e9161f"}}, -{"id":"q-io","key":"q-io","value":{"rev":"20-79f7b3d43bcbd53cc57b6531426738e2"}}, -{"id":"q-io-buffer","key":"q-io-buffer","value":{"rev":"5-05528d9a527da73357991bec449a1b76"}}, -{"id":"q-require","key":"q-require","value":{"rev":"12-e3fc0388e4d3e6d8a15274c3cc239712"}}, -{"id":"q-util","key":"q-util","value":{"rev":"10-94e0c392e70fec942aee0f024e5c090f"}}, -{"id":"qbox","key":"qbox","value":{"rev":"17-88f9148881ede94ae9dcbf4e1980aa69"}}, -{"id":"qfi","key":"qfi","value":{"rev":"3-a6052f02aec10f17085b09e4f9da1ce0"}}, -{"id":"qjscl","key":"qjscl","value":{"rev":"11-def1631b117a53cab5fd38ffec28d727"}}, -{"id":"qooxdoo","key":"qooxdoo","value":{"rev":"5-720d33ec2de3623d6535b3bdc8041d81"}}, -{"id":"qoper8","key":"qoper8","value":{"rev":"11-48fa2ec116bec46d64161e35b0f0cd86"}}, -{"id":"qq","key":"qq","value":{"rev":"23-6f7a5f158364bbf2e90a0c6eb1fbf8a9"}}, -{"id":"qqwry","key":"qqwry","value":{"rev":"10-bf0d6cc2420bdad92a1104c184e7e045"}}, -{"id":"qr","key":"qr","value":{"rev":"11-0a0120b7ec22bbcf76ff1d78fd4a7689"}}, -{"id":"qrcode","key":"qrcode","value":{"rev":"11-b578b6a76bffe996a0390e3d886b79bb"}}, -{"id":"qs","key":"qs","value":{"rev":"23-3da45c8c8a5eb33d45360d92b6072d37"}}, -{"id":"quack-array","key":"quack-array","value":{"rev":"5-6b676aa6273e4515ab5e7bfee1c331e0"}}, -{"id":"quadprog","key":"quadprog","value":{"rev":"7-c0ceeeb12735f334e8c7940ac1f0a896"}}, -{"id":"quadraticon","key":"quadraticon","value":{"rev":"66-1da88ea871e6f90967b9f65c0204309d"}}, -{"id":"quasi","key":"quasi","value":{"rev":"3-6fe0faa91d849938d8c92f91b0828395"}}, -{"id":"query","key":"query","value":{"rev":"13-635ff8d88c6a3f9d92f9ef465b14fb82"}}, -{"id":"query-engine","key":"query-engine","value":{"rev":"21-66feaee07df9fa1f625ac797e8f6b90b"}}, -{"id":"querystring","key":"querystring","value":{"rev":"5-2b509239fafba56319137bfbe1e9eeb7"}}, -{"id":"queue","key":"queue","value":{"rev":"3-5c4af574e5056f7e6ceb9bfefc1c632d"}}, -{"id":"queuelib","key":"queuelib","value":{"rev":"61-87c2abc94a5ad40af8193fac9a1d9f7e"}}, -{"id":"quickcheck","key":"quickcheck","value":{"rev":"7-64e6c1e9efc08a89abe3d01c414d1411"}}, -{"id":"quickserve","key":"quickserve","value":{"rev":"3-9c19f8ad7daf06182f42b8c7063b531f"}}, -{"id":"quip","key":"quip","value":{"rev":"8-0624055f5056f72bc719340c95e5111a"}}, -{"id":"qunit","key":"qunit","value":{"rev":"37-6e7fefdaffab8fc5fb92a391da227c38"}}, -{"id":"qunit-tap","key":"qunit-tap","value":{"rev":"22-0266cd1b5bb7cbab89fa52642f0e8277"}}, -{"id":"qwery","key":"qwery","value":{"rev":"66-29f9b44da544a3a9b4537a85ceace7c8"}}, -{"id":"qwery-mobile","key":"qwery-mobile","value":{"rev":"5-182264ca68c30519bf0d29cf1e15854b"}}, -{"id":"raZerdummy","key":"raZerdummy","value":{"rev":"7-1fa549e0cff60795b49cbd3732f32175"}}, -{"id":"rabbit.js","key":"rabbit.js","value":{"rev":"3-dbcd5cd590576673c65b34c44ff06bec"}}, -{"id":"rabblescay","key":"rabblescay","value":{"rev":"5-3fea196ffd581a842a24ab7bb2118fe2"}}, -{"id":"racer","key":"racer","value":{"rev":"51-41c65689a335d70fa6b55b9706b9c0fe"}}, -{"id":"radcouchdb","key":"radcouchdb","value":{"rev":"3-64ccb4d0acb2b11cbb1d3fcef5f9a68e"}}, -{"id":"radio-stream","key":"radio-stream","value":{"rev":"6-c5f80a0bef7bbaacdd22d92da3d09244"}}, -{"id":"railway","key":"railway","value":{"rev":"74-5ce92a45c7d11540b0e2b5a8455361ce"}}, -{"id":"railway-mailer","key":"railway-mailer","value":{"rev":"3-8df2fbe4af4d3b1f12557d8397bf0548"}}, -{"id":"railway-twitter","key":"railway-twitter","value":{"rev":"3-df984f182bb323052e36876e8e3a066c"}}, -{"id":"rand","key":"rand","value":{"rev":"11-abb69107c390e2a6dcec64cb72f36096"}}, -{"id":"random","key":"random","value":{"rev":"7-32550b221f3549b67f379c1c2dbc5c57"}}, -{"id":"random-data","key":"random-data","value":{"rev":"5-ae651ea36724105b8677ae489082ab4d"}}, -{"id":"range","key":"range","value":{"rev":"3-1d3925f30ffa6b5f3494d507fcef3aa1"}}, -{"id":"ranger","key":"ranger","value":{"rev":"17-6135a9a9d83cbd3945f1ce991f276cb8"}}, -{"id":"rap-battle","key":"rap-battle","value":{"rev":"3-6960516c0d27906bb9343805a5eb0e45"}}, -{"id":"raphael","key":"raphael","value":{"rev":"7-012f159593a82e4587ea024a5d4fbe41"}}, -{"id":"raphael-zoom","key":"raphael-zoom","value":{"rev":"3-aaab74bebbeb4241cade4f4d3c9b130e"}}, -{"id":"rapid","key":"rapid","value":{"rev":"8-ae0b05388c7904fc88c743e3dcde1d9d"}}, -{"id":"rasputin","key":"rasputin","value":{"rev":"3-87cdd9bd591606f4b8439e7a76681c7b"}}, -{"id":"rate-limiter","key":"rate-limiter","value":{"rev":"3-24cd20fef83ce02f17dd383b72f5f125"}}, -{"id":"rats","key":"rats","value":{"rev":"3-1ff1efb311451a17789da910eaf59fb6"}}, -{"id":"raydash","key":"raydash","value":{"rev":"7-96c345beb3564d2789d209d1fe695857"}}, -{"id":"rbytes","key":"rbytes","value":{"rev":"13-cf09d91347a646f590070e516f0c9bc9"}}, -{"id":"rdf","key":"rdf","value":{"rev":"3-9a5012d1fc10da762dbe285d0b317499"}}, -{"id":"rdf-raptor-parser","key":"rdf-raptor-parser","value":{"rev":"11-25c61e4d57cf67ee8a5afb6dfcf193e3"}}, -{"id":"rdfstore","key":"rdfstore","value":{"rev":"41-4499a73efc48ad07234e56fd4e27e4e0"}}, -{"id":"rdio","key":"rdio","value":{"rev":"5-fa20a8ab818a6150e38e9bb7744968f9"}}, -{"id":"rdx","key":"rdx","value":{"rev":"3-e1db5ee3aad06edd9eadcdaa8aaba149"}}, -{"id":"rea","key":"rea","value":{"rev":"3-f17ceeb35337bc9ccf9cb440d5c4dfaf"}}, -{"id":"read-files","key":"read-files","value":{"rev":"3-e08fac4abcdbc7312beb0362ff4427b4"}}, -{"id":"readability","key":"readability","value":{"rev":"3-475601a3d99d696763872c52bce6a155"}}, -{"id":"readabilitySAX","key":"readabilitySAX","value":{"rev":"19-83277777f3f721be26aca28c66227b01"}}, -{"id":"ready.js","key":"ready.js","value":{"rev":"39-8e309b8b274722c051c67f90885571e8"}}, -{"id":"readyjslint","key":"readyjslint","value":{"rev":"3-0a3742129bfbe07d47fcfb9ff67d39b2"}}, -{"id":"recaptcha","key":"recaptcha","value":{"rev":"8-8895926476be014fbe08b301294bf37b"}}, -{"id":"recaptcha-async","key":"recaptcha-async","value":{"rev":"9-3033260389f8afdb5351974119b78ca2"}}, -{"id":"recline","key":"recline","value":{"rev":"189-b56ab8c7791201dccf4aea2532189f1d"}}, -{"id":"recon","key":"recon","value":{"rev":"13-79cbddefb00fec6895342d18609cadb1"}}, -{"id":"reconf","key":"reconf","value":{"rev":"5-0596988db2cf9bf5921502a2aab24ade"}}, -{"id":"redback","key":"redback","value":{"rev":"37-03b390f69cacf42a46e393b7cf297d09"}}, -{"id":"rede","key":"rede","value":{"rev":"3-ee74c2fd990c7780dc823e22a9c3bef2"}}, -{"id":"redecard","key":"redecard","value":{"rev":"13-7dec5a50c34132a2f20f0f143d6b5215"}}, -{"id":"redim","key":"redim","value":{"rev":"15-91c9fd560d1ce87d210b461c52a6d258"}}, -{"id":"redis","key":"redis","value":{"rev":"98-ec237259e8ef5c42a76ff260be50f8fd"}}, -{"id":"redis-channels","key":"redis-channels","value":{"rev":"3-8efc40a25fd18c1c9c41bbaeedb0b22f"}}, -{"id":"redis-client","key":"redis-client","value":{"rev":"3-3376054236e651e7dfcf91be8632fd0e"}}, -{"id":"redis-completer","key":"redis-completer","value":{"rev":"11-9e5bf1f8d37df681e7896252809188d3"}}, -{"id":"redis-keyspace","key":"redis-keyspace","value":{"rev":"25-245f2375741eb3e574dfce9f2da2b687"}}, -{"id":"redis-lua","key":"redis-lua","value":{"rev":"7-81f3dd3a4601271818f15278f495717a"}}, -{"id":"redis-namespace","key":"redis-namespace","value":{"rev":"3-ddf52a172db190fe788aad4116b1cb29"}}, -{"id":"redis-node","key":"redis-node","value":{"rev":"24-7a1e9098d8b5a42a99ca71a01b0d7672"}}, -{"id":"redis-queue","key":"redis-queue","value":{"rev":"3-9896587800c4b98ff291b74210c16b6e"}}, -{"id":"redis-session-store","key":"redis-session-store","value":{"rev":"3-2229501ecf817f9ca60ff2c7721ddd73"}}, -{"id":"redis-tag","key":"redis-tag","value":{"rev":"9-6713e8e91a38613cfef09d7b40f4df71"}}, -{"id":"redis-url","key":"redis-url","value":{"rev":"5-f53545a0039b512a2f7afd4ba2e08773"}}, -{"id":"redis-user","key":"redis-user","value":{"rev":"11-a8c0f6d40cbfbb6183a46e121f31ec06"}}, -{"id":"redis2json","key":"redis2json","value":{"rev":"5-dd96f78f8db0bf695346c95c2ead1307"}}, -{"id":"redis_objects","key":"redis_objects","value":{"rev":"3-499fe6dd07e7a3839111b1892b97f54c"}}, -{"id":"redisev","key":"redisev","value":{"rev":"3-8e857dbe2341292c6e170a7bfe3fa81b"}}, -{"id":"redisfs","key":"redisfs","value":{"rev":"69-d9c90256d32348fdca7a4e646ab4d551"}}, -{"id":"redisify","key":"redisify","value":{"rev":"3-03fce3095b4129e71280d278f11121ba"}}, -{"id":"rediskit","key":"rediskit","value":{"rev":"5-6a0324708f45d884a492cbc408137059"}}, -{"id":"redisql","key":"redisql","value":{"rev":"6-b31802eb37910cb74bd3c9f7b477c025"}}, -{"id":"redmark","key":"redmark","value":{"rev":"5-8724ab00513b6bd7ddfdcd3cc2e0a4e8"}}, -{"id":"redmess","key":"redmess","value":{"rev":"13-14f58666444993ce899cd2260cdc9140"}}, -{"id":"redobj","key":"redobj","value":{"rev":"7-7ebbeffc306f4f7ff9b53ee57e1a250e"}}, -{"id":"redpack","key":"redpack","value":{"rev":"73-58b3fb3bcadf7d80fbe97d9e82d4928b"}}, -{"id":"reds","key":"reds","value":{"rev":"9-baebb36b92887d93fd79785a8c1e6355"}}, -{"id":"reed","key":"reed","value":{"rev":"45-5580f319dc3b5bfb66612ed5c7e17337"}}, -{"id":"reflect","key":"reflect","value":{"rev":"18-b590003cd55332160a5e5327e806e851"}}, -{"id":"reflect-builder","key":"reflect-builder","value":{"rev":"3-453d618b263f9452c0b6bbab0a701f49"}}, -{"id":"reflect-next","key":"reflect-next","value":{"rev":"9-4f2b27a38985d81e906e824321af7713"}}, -{"id":"reflect-tree-builder","key":"reflect-tree-builder","value":{"rev":"5-5f801f53e126dc8a72e13b1417904ce6"}}, -{"id":"reflect-unbuilder","key":"reflect-unbuilder","value":{"rev":"5-f36fd4182fd465a743198b5188697db9"}}, -{"id":"reflectjs","key":"reflectjs","value":{"rev":"3-e03bdb411ffcdd901b896a1cf43eea69"}}, -{"id":"reflex","key":"reflex","value":{"rev":"3-e8bb6b6de906265114b22036832ef650"}}, -{"id":"refmate","key":"refmate","value":{"rev":"3-7d44c45a2eb39236ad2071c84dc0fbba"}}, -{"id":"regext","key":"regext","value":{"rev":"4-97ca5c25fd2f3dc4bd1f3aa821d06f0f"}}, -{"id":"reid-yui3","key":"reid-yui3","value":{"rev":"5-cab8f6e22dfa9b9c508a5dd312bf56b0"}}, -{"id":"rel","key":"rel","value":{"rev":"7-f447870ac7a078f742e4295896646241"}}, -{"id":"relative-date","key":"relative-date","value":{"rev":"5-d0fa11f8100da888cbcce6e96d76b2e4"}}, -{"id":"reloadOnUpdate","key":"reloadOnUpdate","value":{"rev":"9-e7d4c215578b779b2f888381d398bd79"}}, -{"id":"reloaded","key":"reloaded","value":{"rev":"3-dba828b9ab73fc7ce8e47f98068bce8c"}}, -{"id":"remap","key":"remap","value":{"rev":"5-825ac1783df84aba3255c1d39f32ac00"}}, -{"id":"remedial","key":"remedial","value":{"rev":"17-9bb17db015e96db3c833f84d9dbd972a"}}, -{"id":"remote-console","key":"remote-console","value":{"rev":"6-104bae3ba9e4b0a8f772d0b8dc37007e"}}, -{"id":"remote_js","key":"remote_js","value":{"rev":"3-6c0e3058c33113346c037c59206ac0ec"}}, -{"id":"render","key":"render","value":{"rev":"27-fc8be4e9c50e49fb42df83e9446a1f58"}}, -{"id":"renode","key":"renode","value":{"rev":"11-107a3e15a987393157b47125487af296"}}, -{"id":"reparse","key":"reparse","value":{"rev":"10-210ec92e82f5a8515f45d20c7fa2f164"}}, -{"id":"repl","key":"repl","value":{"rev":"3-295279fe20b9ac54b2a235a6bc7013aa"}}, -{"id":"repl-edit","key":"repl-edit","value":{"rev":"18-eb2e604ab8bb65685376459beb417a31"}}, -{"id":"repl-utils","key":"repl-utils","value":{"rev":"7-fc31547ecb53e7e36610cdb68bcec582"}}, -{"id":"replace","key":"replace","value":{"rev":"17-a8976fcdbeb08e27ee2f0fc69ccd7c9d"}}, -{"id":"replica","key":"replica","value":{"rev":"3-f9dae960f91e8dc594f43b004f516d5f"}}, -{"id":"replicate","key":"replicate","value":{"rev":"3-3d6e52af6ff36c02139f619c7e5599c6"}}, -{"id":"replique","key":"replique","value":{"rev":"5-72d990b7d9ce9ff107d96be17490226a"}}, -{"id":"req2","key":"req2","value":{"rev":"3-712151f335b25b5bdef428982d77d0e0"}}, -{"id":"reqhooks","key":"reqhooks","value":{"rev":"17-2f0f0b73545bb1936f449a1ec4a28011"}}, -{"id":"request","key":"request","value":{"rev":"55-0d0b00eecde877ca5cd4ad9e0badc4d1"}}, -{"id":"require","key":"require","value":{"rev":"15-59e9fa05a9de52ee2a818c045736452b"}}, -{"id":"require-analyzer","key":"require-analyzer","value":{"rev":"72-f759f0cdc352df317df29791bfe451f1"}}, -{"id":"require-kiss","key":"require-kiss","value":{"rev":"5-f7ef9d7beda584e9c95635a281a01587"}}, -{"id":"require-like","key":"require-like","value":{"rev":"7-29d5de79e7ff14bb02da954bd9a2ee33"}}, -{"id":"requireincontext","key":"requireincontext","value":{"rev":"5-988ff7c27a21e527ceeb50cbedc8d1b0"}}, -{"id":"requirejs","key":"requirejs","value":{"rev":"3-e609bc91d12d698a17aa51bb50a50509"}}, -{"id":"requirejson","key":"requirejson","value":{"rev":"3-2b8173e58d08034a53a3226c464b1dc8"}}, -{"id":"reqwest","key":"reqwest","value":{"rev":"57-5aa2c1ed17b1e3630859bcad85559e6a"}}, -{"id":"resig-class","key":"resig-class","value":{"rev":"3-16b1a2cdb3224f2043708436dbac4395"}}, -{"id":"resistance","key":"resistance","value":{"rev":"9-9cacbf5fa8318419b4751034a511b8c1"}}, -{"id":"resmin","key":"resmin","value":{"rev":"17-a9c8ded5073118748d765784ca4ea069"}}, -{"id":"resolve","key":"resolve","value":{"rev":"11-bba3470bc93a617ccf9fb6c12097c793"}}, -{"id":"resource-router","key":"resource-router","value":{"rev":"13-7b2991958da4d7701c51537192ca756c"}}, -{"id":"resourcer","key":"resourcer","value":{"rev":"3-4e8b5493d6fcdf147f53d3aaa731a509"}}, -{"id":"response","key":"response","value":{"rev":"3-c5cadf4e5dd90dc1022b92a67853b0f8"}}, -{"id":"resque","key":"resque","value":{"rev":"12-e2f5e1bc3e53ac0a992d1a7da7da0d14"}}, -{"id":"rest-in-node","key":"rest-in-node","value":{"rev":"3-41d1ba925857302211bd0bf9d19975f9"}}, -{"id":"rest-mongo","key":"rest-mongo","value":{"rev":"3-583d2a4b672d6d7e7ad26d0b6df20b45"}}, -{"id":"rest.node","key":"rest.node","value":{"rev":"3-2ed59ba9dcc97123632dfdfaea2559ed"}}, -{"id":"restalytics","key":"restalytics","value":{"rev":"11-5fb3cd8e95b37f1725922fa6fbb146e0"}}, -{"id":"restarter","key":"restarter","value":{"rev":"52-ab0a4fe59128b8848ffd88f9756d0049"}}, -{"id":"restartr","key":"restartr","value":{"rev":"12-d3b86e43e7df7697293db65bb1a1ae65"}}, -{"id":"restify","key":"restify","value":{"rev":"132-054bdc85bebc6221a07dda186238b4c3"}}, -{"id":"restler","key":"restler","value":{"rev":"13-f5392d9dd22e34ce3bcc307c51c889b3"}}, -{"id":"restler-aaronblohowiak","key":"restler-aaronblohowiak","value":{"rev":"8-28b231eceb667153e10effcb1ebeb989"}}, -{"id":"restmvc.js","key":"restmvc.js","value":{"rev":"25-d57b550754437580c447adf612c87d9a"}}, -{"id":"resware","key":"resware","value":{"rev":"9-a5ecbc53fefb280c5d1e3efd822704ff"}}, -{"id":"retrie","key":"retrie","value":{"rev":"7-28ea803ad6b119928ac792cbc8f475c9"}}, -{"id":"retro","key":"retro","value":{"rev":"3-94c3aec940e28869554cbb8449d9369e"}}, -{"id":"retry","key":"retry","value":{"rev":"19-89f3ef664c6fa48ff33a0b9f7e798f15"}}, -{"id":"reut","key":"reut","value":{"rev":"23-d745dd7f8606275848a299ad7c38ceb7"}}, -{"id":"rewrite","key":"rewrite","value":{"rev":"3-5cb91fd831d0913e89354f53b875137d"}}, -{"id":"rex","key":"rex","value":{"rev":"39-59025e6947e5f197f124d24a5393865f"}}, -{"id":"rfb","key":"rfb","value":{"rev":"34-db6e684ac9366a0e3658a508a2187ae1"}}, -{"id":"rhyme","key":"rhyme","value":{"rev":"7-27347762f3f5bfa07307da4e476c2d52"}}, -{"id":"riak-js","key":"riak-js","value":{"rev":"55-11d4ee4beb566946f3968abdf1c4b0ef"}}, -{"id":"riakqp","key":"riakqp","value":{"rev":"7-83f562e6907431fcee56a9408ac6d2c1"}}, -{"id":"rightjs","key":"rightjs","value":{"rev":"9-d53ae4c4f5af3bbbe18d7c879e5bdd1b"}}, -{"id":"rimraf","key":"rimraf","value":{"rev":"17-3ddc3f3f36618712e5f4f27511836e7a"}}, -{"id":"rio","key":"rio","value":{"rev":"11-7c6249c241392b51b9142ca1b228dd4e"}}, -{"id":"ristretto","key":"ristretto","value":{"rev":"3-beb22d7a575e066781f1fd702c4572d7"}}, -{"id":"roast","key":"roast","value":{"rev":"32-17cb066823afab1656196a2fe81246cb"}}, -{"id":"robb","key":"robb","value":{"rev":"5-472ed7ba7928131d86a05fcae89b9f93"}}, -{"id":"robots","key":"robots","value":{"rev":"9-afac82b944045c82acb710cc98c7311d"}}, -{"id":"robotskirt","key":"robotskirt","value":{"rev":"63-29a66420951812d421bf6728f67e710c"}}, -{"id":"robotstxt","key":"robotstxt","value":{"rev":"25-1e01cac90f4570d35ab20232feaeebfa"}}, -{"id":"rocket","key":"rocket","value":{"rev":"27-b0f1ff02e70b237bcf6a5b46aa9b74df"}}, -{"id":"roil","key":"roil","value":{"rev":"48-6b00c09b576fe195546bd031763c0d79"}}, -{"id":"roll","key":"roll","value":{"rev":"5-d3fed9271132eb6c954b3ac6c7ffccf0"}}, -{"id":"rollin","key":"rollin","value":{"rev":"3-bd461bc810c12cfcea94109ba9a2ab39"}}, -{"id":"ron","key":"ron","value":{"rev":"5-913645180d29f377506bcd5292d3cb49"}}, -{"id":"rondo","key":"rondo","value":{"rev":"3-9bed539bbaa0cb978f5c1b711d70cd50"}}, -{"id":"ronn","key":"ronn","value":{"rev":"12-b1b1a1d47376fd11053e2b81fe772c4c"}}, -{"id":"rot13","key":"rot13","value":{"rev":"10-a41e8b581812f02ca1a593f6da0c52dc"}}, -{"id":"router","key":"router","value":{"rev":"26-a7883048759715134710d68f179da18b"}}, -{"id":"routes","key":"routes","value":{"rev":"3-d841826cfd365d8f383a9c4f4288933c"}}, -{"id":"rpc","key":"rpc","value":{"rev":"5-5896f380115a7a606cd7cbbc6d113f05"}}, -{"id":"rpc-socket","key":"rpc-socket","value":{"rev":"17-8743dc1a1f5ba391fc5c7d432cc6eeba"}}, -{"id":"rq","key":"rq","value":{"rev":"7-ba263671c3a3b52851dc7d5e6bd4ef8c"}}, -{"id":"rql","key":"rql","value":{"rev":"1-ac5ec10ed5e41a10a289f26aff4def5a"}}, -{"id":"rqueue","key":"rqueue","value":{"rev":"12-042898704386874c70d0ffaeea6ebc78"}}, -{"id":"rrd","key":"rrd","value":{"rev":"9-488adf135cf29cd4725865a8f25a57ba"}}, -{"id":"rsa","key":"rsa","value":{"rev":"8-7d6f981d72322028c3bebb7141252e98"}}, -{"id":"rss","key":"rss","value":{"rev":"3-0a97b20a0a9051876d779af7663880bd"}}, -{"id":"rssee","key":"rssee","value":{"rev":"9-da2599eae68e50c1695fd7f8fcba2b30"}}, -{"id":"rumba","key":"rumba","value":{"rev":"3-7a3827fa6eca2d02d3189cbad38dd6ca"}}, -{"id":"run","key":"run","value":{"rev":"9-0145abb61e6107a3507624928db461da"}}, -{"id":"runforcover","key":"runforcover","value":{"rev":"3-a36b00ea747c98c7cd7afebf1e1b203c"}}, -{"id":"runlol","key":"runlol","value":{"rev":"3-3c97684baaa3d5b31ca404e8a616fe41"}}, -{"id":"runner","key":"runner","value":{"rev":"11-b7ceeedf7b0dde19c809642f1537723a"}}, -{"id":"runways","key":"runways","value":{"rev":"5-f216f5fa6af7ccc7566cdd06cf424980"}}, -{"id":"rw-translate","key":"rw-translate","value":{"rev":"3-16d2beb17a27713e10459ce368c5d087"}}, -{"id":"rx","key":"rx","value":{"rev":"5-ea2a04ecf38963f8a99b7a408b45af31"}}, -{"id":"rzr","key":"rzr","value":{"rev":"4-6a137fa752709531f2715de5a213b326"}}, -{"id":"s-tpl","key":"s-tpl","value":{"rev":"3-1533cf9657cfe669a25da96b6a655f5c"}}, -{"id":"s3-post","key":"s3-post","value":{"rev":"9-ad3b268bc6754852086b50c2f465c02c"}}, -{"id":"safis","key":"safis","value":{"rev":"3-f1494d0dae2b7dfd60beba5a72412ad2"}}, -{"id":"saiga","key":"saiga","value":{"rev":"22-0c67e8cf8f4b6e8ea30552ffc57d222a"}}, -{"id":"sailthru-client","key":"sailthru-client","value":{"rev":"7-1c9c236050868fb8dec4a34ded2436d3"}}, -{"id":"saimonmoore-cradle","key":"saimonmoore-cradle","value":{"rev":"3-5059616ab0f0f10e1c2d164f686e127e"}}, -{"id":"salesforce","key":"salesforce","value":{"rev":"7-f88cbf517b1fb900358c97b2c049960f"}}, -{"id":"sam","key":"sam","value":{"rev":"7-d7e24d2e94411a17cbedfbd8083fd878"}}, -{"id":"sandbox","key":"sandbox","value":{"rev":"10-0b51bed24e0842f99744dcf5d79346a6"}}, -{"id":"sandboxed-module","key":"sandboxed-module","value":{"rev":"15-bf8fa69d15ae8416d534e3025a16d87d"}}, -{"id":"sanitizer","key":"sanitizer","value":{"rev":"32-6ea8f4c77cd17253c27d0d87e0790678"}}, -{"id":"sapnwrfc","key":"sapnwrfc","value":{"rev":"3-0bc717109ffcd5265ae24f00416a0281"}}, -{"id":"sardines","key":"sardines","value":{"rev":"7-82712731b5af112ca43b9e3fe9975bb0"}}, -{"id":"sargam","key":"sargam","value":{"rev":"3-6b4c70f4b2bcd2add43704bf40c44507"}}, -{"id":"sasl","key":"sasl","value":{"rev":"4-44a6e12b561b112a574ec9e0c4a8843f"}}, -{"id":"sass","key":"sass","value":{"rev":"14-46bcee5423a1efe22f039e116bb7a77c"}}, -{"id":"satisfic","key":"satisfic","value":{"rev":"3-c6e9a2e65a0e55868cea708bcf7b11cf"}}, -{"id":"sax","key":"sax","value":{"rev":"30-58c5dd2c3367522974406bbf29204a40"}}, -{"id":"say","key":"say","value":{"rev":"10-95f31672af6166ea9099d92706c49ed1"}}, -{"id":"sayndo","key":"sayndo","value":{"rev":"51-fd93715c5ff0fcaa68e4e13c2b51ba61"}}, -{"id":"sc-handlebars","key":"sc-handlebars","value":{"rev":"3-b424c3a66fd0e538b068c6046f404084"}}, -{"id":"scgi-server","key":"scgi-server","value":{"rev":"9-3364b5c39985ea8f3468b6abb53d5ea6"}}, -{"id":"scheduler","key":"scheduler","value":{"rev":"25-72bc526bb49b0dd42ad5917d38ea3b18"}}, -{"id":"schema","key":"schema","value":{"rev":"21-166410ae972449965dfa1ce615971168"}}, -{"id":"schema-builder","key":"schema-builder","value":{"rev":"3-bce4612e1e5e6a8a85f16326d3810145"}}, -{"id":"schema-org","key":"schema-org","value":{"rev":"15-59b3b654de0380669d0dcd7573c3b7a1"}}, -{"id":"scone","key":"scone","value":{"rev":"15-85ed2dd4894e896ca1c942322753b76b"}}, -{"id":"scooj","key":"scooj","value":{"rev":"3-1be2074aeba4df60594c03f3e59c7734"}}, -{"id":"scope","key":"scope","value":{"rev":"65-9d7eb8c5fc6c54d8e2c49f4b4b4f5166"}}, -{"id":"scope-provider","key":"scope-provider","value":{"rev":"22-2c25a0b260fd18236d5245c8250d990e"}}, -{"id":"scoped-http-client","key":"scoped-http-client","value":{"rev":"3-afa954fe6d1c8b64a1240b77292d99b5"}}, -{"id":"scottbot","key":"scottbot","value":{"rev":"3-d812ddb4af49976c391f14aeecf93180"}}, -{"id":"scraper","key":"scraper","value":{"rev":"19-e2166b3de2b33d7e6baa04c704887fa6"}}, -{"id":"scrapinode","key":"scrapinode","value":{"rev":"15-ae5bf5085d8c4d5390f7c313b0ad13d2"}}, -{"id":"scrappy-do","key":"scrappy-do","value":{"rev":"3-868f5d299da401112e3ed9976194f1ee"}}, -{"id":"scrapr","key":"scrapr","value":{"rev":"3-d700714a56e8f8b8e9b3bc94274f4a24"}}, -{"id":"scrawl","key":"scrawl","value":{"rev":"3-a70a2905b9a1d2f28eb379c14363955f"}}, -{"id":"scribe","key":"scribe","value":{"rev":"5-4cefaaf869ba8e6ae0257e5705532fbe"}}, -{"id":"scriptTools","key":"scriptTools","value":{"rev":"7-1b66b7f02f2f659ae224057afac60bcf"}}, -{"id":"scriptbroadcast","key":"scriptbroadcast","value":{"rev":"10-3cdc4dae471445b7e08e6fc37c2481e6"}}, -{"id":"scriptjs","key":"scriptjs","value":{"rev":"38-9a522df4f0707d47c904f6781fd97ff6"}}, -{"id":"scrowser","key":"scrowser","value":{"rev":"3-a76938b1f84db0793941dba1f84f4c2f"}}, -{"id":"scss","key":"scss","value":{"rev":"10-49a4ad40eca3c797add57986c74e100b"}}, -{"id":"scylla","key":"scylla","value":{"rev":"10-2c5a1efed63c0ac3a3e75861ee323af4"}}, -{"id":"sdl","key":"sdl","value":{"rev":"40-3df0824da620098c0253b5330c6b0c5c"}}, -{"id":"sdlmixer","key":"sdlmixer","value":{"rev":"4-91455739802a98a5549f6c2b8118758d"}}, -{"id":"search","key":"search","value":{"rev":"9-8f696da412a6ccd07c3b8f22cec315cb"}}, -{"id":"searchjs","key":"searchjs","value":{"rev":"3-59418ce307d41de5649dfc158be51adf"}}, -{"id":"searchparser","key":"searchparser","value":{"rev":"3-a84719692ee33c88f3419f033b839f7a"}}, -{"id":"sechash","key":"sechash","value":{"rev":"11-20db8651628dcf6e8cbbc9bf9b2c4f12"}}, -{"id":"secret","key":"secret","value":{"rev":"7-ac44b38fa32b3f5ebc8fd03b02ec69ec"}}, -{"id":"seedrandom","key":"seedrandom","value":{"rev":"3-becb92de803208672887fc22a1a33694"}}, -{"id":"seek","key":"seek","value":{"rev":"3-d778b8d56582e15d409e2346b86caa53"}}, -{"id":"sel","key":"sel","value":{"rev":"19-94c8bc0872d2da7eab2b35daff7a3b5d"}}, -{"id":"select","key":"select","value":{"rev":"5-43593bfec39caaf1a0bc1fedc96d0dce"}}, -{"id":"selenium","key":"selenium","value":{"rev":"3-8ae8ac7a491b813fd011671e0d494f20"}}, -{"id":"selfish","key":"selfish","value":{"rev":"17-827856c3f3b9a3fdd1758477a24bf706"}}, -{"id":"selleck","key":"selleck","value":{"rev":"13-b8325fcdb383397041e4a408b40d708c"}}, -{"id":"semver","key":"semver","value":{"rev":"25-b2aea0cc920a9981cd429442a3fd62f6"}}, -{"id":"sendgrid","key":"sendgrid","value":{"rev":"3-047e2ad730390bac7cf72b7fc3856c1c"}}, -{"id":"sendgrid-api","key":"sendgrid-api","value":{"rev":"5-6e951b0d60a1b7c778fbf548d4e3aed8"}}, -{"id":"sendgrid-web","key":"sendgrid-web","value":{"rev":"3-dc77d2dbcedfcbe4e497958a2a070cfd"}}, -{"id":"sentry","key":"sentry","value":{"rev":"7-57af332354cbd37ce1c743b424b27dd0"}}, -{"id":"seq","key":"seq","value":{"rev":"77-33a8f54017402835c8542945a5c0a443"}}, -{"id":"sequelize","key":"sequelize","value":{"rev":"63-4c28ad13b73549aad7edc57378b21854"}}, -{"id":"sequence","key":"sequence","value":{"rev":"3-914f8010dc12aec0749ddb719f5ac82d"}}, -{"id":"sequencer","key":"sequencer","value":{"rev":"7-d83e687509678c0f5bcf15e5297677c0"}}, -{"id":"sequent","key":"sequent","value":{"rev":"3-cc6f26ab708c7681fa7d9e3bc15d19c0"}}, -{"id":"serializer","key":"serializer","value":{"rev":"7-a0d13120e2d5cfaa6e453b085280fa08"}}, -{"id":"serialport","key":"serialport","value":{"rev":"32-dc365d057a4f46e9f140dc36d6cc825a"}}, -{"id":"serialportify","key":"serialportify","value":{"rev":"3-1bf4ad9c5ebb5d96ca91fc03a10b5443"}}, -{"id":"serialq","key":"serialq","value":{"rev":"3-5897fcd0fca7d8312e61dbcb93790a71"}}, -{"id":"series","key":"series","value":{"rev":"11-0374191f646c277c51602ebe73033b6a"}}, -{"id":"serve","key":"serve","value":{"rev":"11-560c0c1bdeb3348c7a7d18265d27988e"}}, -{"id":"servedir","key":"servedir","value":{"rev":"18-17cffd8d8326b26e7d9319c79d601dda"}}, -{"id":"server-backbone-redis","key":"server-backbone-redis","value":{"rev":"13-c56419457002aa4fa23b142634882594"}}, -{"id":"server-tracker","key":"server-tracker","value":{"rev":"21-f620e295079a8b0acd29fa1a1469100c"}}, -{"id":"service","key":"service","value":{"rev":"11-07533f9e5e854248c0a1d99e911fa419"}}, -{"id":"sesame","key":"sesame","value":{"rev":"19-1e7ad5d030566f4c67027cc5925a2bdb"}}, -{"id":"sesh","key":"sesh","value":{"rev":"4-1682b3ced38e95f2a11a2f545a820bd5"}}, -{"id":"session","key":"session","value":{"rev":"6-a798bf4cd7d127d0111da7cdc3e058a4"}}, -{"id":"session-mongoose","key":"session-mongoose","value":{"rev":"3-b089c8d365d7de3e659cfa7080697dba"}}, -{"id":"sessionvoc-client","key":"sessionvoc-client","value":{"rev":"23-0f9ed8cd4af55f2aae17cb841247b818"}}, -{"id":"set","key":"set","value":{"rev":"3-a285b30a9c1545b427ebd882bc53d8b2"}}, -{"id":"setInterval","key":"setInterval","value":{"rev":"3-0557f666d05223391466547f52cfff42"}}, -{"id":"setTimeout","key":"setTimeout","value":{"rev":"3-e3c059c93763967ddff5974471f227f8"}}, -{"id":"setochka","key":"setochka","value":{"rev":"3-d559e24618b4fc2d5fc4ef44bccb68be"}}, -{"id":"settings","key":"settings","value":{"rev":"5-4af85bb564a330886c79682d2f1d927c"}}, -{"id":"sexy","key":"sexy","value":{"rev":"7-e57fa6bca5d89be86467786fb9f9b997"}}, -{"id":"sexy-args","key":"sexy-args","value":{"rev":"3-715d7d57234220bd79c78772d2566355"}}, -{"id":"sfaClient","key":"sfaClient","value":{"rev":"3-5d9ddd6ea05d7ef366dbf4f66dd4f642"}}, -{"id":"sfml","key":"sfml","value":{"rev":"10-766c876cd1cc220f776e2fa3c1d9efbb"}}, -{"id":"sh","key":"sh","value":{"rev":"5-3ce779be28550e831cf3c0140477376c"}}, -{"id":"sha1","key":"sha1","value":{"rev":"3-66d4b67ace9c65ae8f03d6dd0647ff6b"}}, -{"id":"sha1_file","key":"sha1_file","value":{"rev":"7-eb25e9c5f470a1b80c1697a952a1c5ed"}}, -{"id":"shadows","key":"shadows","value":{"rev":"5-d6a1a21871c733f34495592307ab7961"}}, -{"id":"share","key":"share","value":{"rev":"15-ef81a004f0e115040dcc1510f6302fa9"}}, -{"id":"shared-views","key":"shared-views","value":{"rev":"11-2c83145e6deb3493e44805c92b58929e"}}, -{"id":"sharedjs","key":"sharedjs","value":{"rev":"9-d43a861b02aa88ae22810f9771d774ec"}}, -{"id":"shell","key":"shell","value":{"rev":"39-7e2042bd6f485b827d53f5f727164d6f"}}, -{"id":"shelld","key":"shelld","value":{"rev":"3-118a62ff31d85e61b78bbd97333a7330"}}, -{"id":"shimify","key":"shimify","value":{"rev":"3-dde4d45bcbd2f6f7faaeb7f8c31d5e8b"}}, -{"id":"ship","key":"ship","value":{"rev":"3-5f294fc3841c901d6cea7f3862625d95"}}, -{"id":"shmakowiki","key":"shmakowiki","value":{"rev":"15-079ae4595d1ddf019d22d3d0ac49a188"}}, -{"id":"shorten","key":"shorten","value":{"rev":"3-ed1395b35faf4639e25dacbb038cf237"}}, -{"id":"shorttag","key":"shorttag","value":{"rev":"5-21d15e4cb8b62aeefe23edc99ff768ec"}}, -{"id":"shorturl","key":"shorturl","value":{"rev":"5-58f78b2a5318ec7da8a5f88739f2796b"}}, -{"id":"shorty","key":"shorty","value":{"rev":"9-17f804ff6e94295549cca6fd534b89de"}}, -{"id":"shotenjin","key":"shotenjin","value":{"rev":"3-91a7864d216a931095e9999133d3c41f"}}, -{"id":"should","key":"should","value":{"rev":"19-ed561071d434f319080fa5d0f647dd93"}}, -{"id":"shovel","key":"shovel","value":{"rev":"5-0168a02a8fa8d7856a5f4a5c18706724"}}, -{"id":"showdown","key":"showdown","value":{"rev":"3-7be5479804451db3faed968fa428af56"}}, -{"id":"shredder","key":"shredder","value":{"rev":"3-93e12ab8822ba5fe86d662f124a8ad1a"}}, -{"id":"shrtn","key":"shrtn","value":{"rev":"19-5883692283903e3166b478b98bcad999"}}, -{"id":"shuffle","key":"shuffle","value":{"rev":"3-71c96da1843abb468649ab0806e6b9d3"}}, -{"id":"sibilant","key":"sibilant","value":{"rev":"18-4dcb400eb9ed9cb1c7826d155807f6d0"}}, -{"id":"sideline","key":"sideline","value":{"rev":"15-84f284a9277718bf90f68dc9351500ae"}}, -{"id":"siesta","key":"siesta","value":{"rev":"5-ff99a009e6e5897c6322237c51d0a142"}}, -{"id":"sign","key":"sign","value":{"rev":"3-2cf70313707c6a046a6ceca61431ea5e"}}, -{"id":"signals","key":"signals","value":{"rev":"7-c756190260cd3ea43e6d44e4722164cb"}}, -{"id":"signature","key":"signature","value":{"rev":"3-fb7552c27ace0f9321ec7438057a37bf"}}, -{"id":"signed-request","key":"signed-request","value":{"rev":"13-9f1563535dcc1a83338a7375d8240f35"}}, -{"id":"signer","key":"signer","value":{"rev":"5-32c9909da2c4dfb284b858164c03cfe0"}}, -{"id":"simple-class","key":"simple-class","value":{"rev":"3-92c6eea4b3a6169db9d62b12f66268cb"}}, -{"id":"simple-ffmpeg","key":"simple-ffmpeg","value":{"rev":"9-b6dd4fe162803e6db434d71035637993"}}, -{"id":"simple-logger","key":"simple-logger","value":{"rev":"5-52b4c957b3671375547d623c6a9444be"}}, -{"id":"simple-mime","key":"simple-mime","value":{"rev":"9-34e4b1dcc26047b64459d924abab65cc"}}, -{"id":"simple-proxy","key":"simple-proxy","value":{"rev":"9-ad6cd76215717527dc6b226e1219e98e"}}, -{"id":"simple-rest-client","key":"simple-rest-client","value":{"rev":"3-8331b3ae49b52720adf2b72d5da0353d"}}, -{"id":"simple-schedule","key":"simple-schedule","value":{"rev":"7-432d3803e1cf9ab5830923a30fd312e0"}}, -{"id":"simple-server","key":"simple-server","value":{"rev":"25-d4d8ba53d3829f4ca51545a3c23a1244"}}, -{"id":"simple-settings","key":"simple-settings","value":{"rev":"3-497d7c5422f764f3738b3ef303ff9737"}}, -{"id":"simple-static","key":"simple-static","value":{"rev":"3-64c9cf84e5140d4285e451357ac83df5"}}, -{"id":"simple-xml-writer","key":"simple-xml-writer","value":{"rev":"3-d1ca18252c341b4430ab6e1240b5f571"}}, -{"id":"simple-xmpp","key":"simple-xmpp","value":{"rev":"11-b4c10de5e4e12a81c4486206d7fb6b40"}}, -{"id":"simple_pubsub","key":"simple_pubsub","value":{"rev":"9-22ae79856ca25b152f104e5d8bc93f12"}}, -{"id":"simpledb","key":"simpledb","value":{"rev":"13-6bf111aa18bffd86e65fd996525a6113"}}, -{"id":"simplegeo","key":"simplegeo","value":{"rev":"8-eb684eea019ae7e5fa0c087a9747367e"}}, -{"id":"simplegeo-client","key":"simplegeo-client","value":{"rev":"7-b2c976bbf8c145c6b0e1744630548084"}}, -{"id":"simplegeo-thrift","key":"simplegeo-thrift","value":{"rev":"3-bf6ddf40c020889fe28630217f38a442"}}, -{"id":"simplelogger","key":"simplelogger","value":{"rev":"3-36634d2543faecdeccc962422d149ffc"}}, -{"id":"simplesets","key":"simplesets","value":{"rev":"26-48fc18f94744c9b288945844b7cc9196"}}, -{"id":"simplesmtp","key":"simplesmtp","value":{"rev":"6-0952f0c5f43a8e94b11355774bbbe9e8"}}, -{"id":"simplydb","key":"simplydb","value":{"rev":"5-34659bf97bbb40f0ec4a3af14107dc31"}}, -{"id":"sin","key":"sin","value":{"rev":"6-0e8bd66b3e2c8c91efef14a3ddc79c53"}}, -{"id":"sink","key":"sink","value":{"rev":"8-4c49709009dfb5719935dba568a3398e"}}, -{"id":"sink-test","key":"sink-test","value":{"rev":"18-411afcb398102f245e92f2ce91897d3e"}}, -{"id":"sinon","key":"sinon","value":{"rev":"19-fa38010bb1bbed437273e1296660d598"}}, -{"id":"sinon-buster","key":"sinon-buster","value":{"rev":"5-a456f0e21b3edb647ad11179cd02354b"}}, -{"id":"sinon-nodeunit","key":"sinon-nodeunit","value":{"rev":"7-d60aa76cc41a6c9d9db4e8ae268b7b3c"}}, -{"id":"sip","key":"sip","value":{"rev":"17-02be6fb014d41fe66ab22ff2ae60a5b8"}}, -{"id":"sitemap","key":"sitemap","value":{"rev":"13-a6d1c830fdc8942c317c1ebe00efbb6d"}}, -{"id":"sizlate","key":"sizlate","value":{"rev":"3-a86c680c681299045f9aabecb99dc161"}}, -{"id":"sizzle","key":"sizzle","value":{"rev":"5-f00e18a80fb8a4f6bdbf11735e265720"}}, -{"id":"sk","key":"sk","value":{"rev":"33-b0b894d02b0211dae08baadfd84b46c2"}}, -{"id":"skeleton","key":"skeleton","value":{"rev":"5-3559721c222b99cd3f56acaaf706992f"}}, -{"id":"skillet","key":"skillet","value":{"rev":"3-0d6bbe21952f85967a5e12425691ee50"}}, -{"id":"skull.io","key":"skull.io","value":{"rev":"3-082e9d58f24ac59144fc130f6b54927e"}}, -{"id":"slang","key":"slang","value":{"rev":"7-3cd6390e3421f677e4e1b00fdf2d3ee1"}}, -{"id":"sleepless","key":"sleepless","value":{"rev":"5-1482568719534caf17f12daf0130ae0d"}}, -{"id":"sleepylib","key":"sleepylib","value":{"rev":"3-60e851f120e34b0726eb50a38b1e27e2"}}, -{"id":"sleight","key":"sleight","value":{"rev":"3-a0f16b17befee698b172074f84daf44c"}}, -{"id":"slick","key":"slick","value":{"rev":"3-596b7b7cf7b8881c55327e8bcf373700"}}, -{"id":"slickback","key":"slickback","value":{"rev":"9-c036e7393d0f9a463a263f287f3bcefd"}}, -{"id":"slide","key":"slide","value":{"rev":"14-83ade7490da699cf0ed99cec818ce3cd"}}, -{"id":"slippers","key":"slippers","value":{"rev":"5-0d657ed5fca4c0ed8b51c6d7f6eac08a"}}, -{"id":"slug","key":"slug","value":{"rev":"3-046a5bd74cc1edce30faa3b6ab239652"}}, -{"id":"slugr","key":"slugr","value":{"rev":"39-ac346964f547433fe34e637de682f81a"}}, -{"id":"smartdc","key":"smartdc","value":{"rev":"31-8c9db85e4548007a0ef87b7286229952"}}, -{"id":"smoosh","key":"smoosh","value":{"rev":"34-ba1c140a173ff8d1f9cdbe5e5addcc43"}}, -{"id":"smores","key":"smores","value":{"rev":"17-1aef1fa2e1675093c5aaf33436d83f5a"}}, -{"id":"smpp","key":"smpp","value":{"rev":"5-9be31b75aee4db09cfe5a2ceef4bea13"}}, -{"id":"smsified","key":"smsified","value":{"rev":"13-bb97eae0bbb6f4d5c4f2f391cd20e891"}}, -{"id":"smtp","key":"smtp","value":{"rev":"20-c3de67c5d0b3c4493293d9f55adb21ad"}}, -{"id":"smtpc","key":"smtpc","value":{"rev":"11-7c4e1207be6eb06350221af0134e8bd7"}}, -{"id":"smtpclient","key":"smtpclient","value":{"rev":"3-ba61ad5f0fd3fdd382e505abcde8c24e"}}, -{"id":"snake","key":"snake","value":{"rev":"15-384892bf8a5ebf222f6fe0ae321aaaa4"}}, -{"id":"snappy","key":"snappy","value":{"rev":"11-94f2d59347c10cc41b6f4a2dd2b0f15e"}}, -{"id":"sng","key":"sng","value":{"rev":"41-a1d3c6253dec5da8b3134ba3505924f5"}}, -{"id":"snip","key":"snip","value":{"rev":"3-cc51d232fff6a7d7b24588bd98e5613b"}}, -{"id":"snipes","key":"snipes","value":{"rev":"3-12af12ca83e15d056969ec76a3cc2ef0"}}, -{"id":"snippets","key":"snippets","value":{"rev":"13-d19c8a99287ec721d56ef9efdf3ce729"}}, -{"id":"snorkel","key":"snorkel","value":{"rev":"11-bc7ba5d1465c7d1ba71479087292615e"}}, -{"id":"snowball","key":"snowball","value":{"rev":"3-76cfbdb9f379ac635874b76d7ee2fd3b"}}, -{"id":"snpp","key":"snpp","value":{"rev":"8-4f10a9f2bff48e348303d8a143afaa6c"}}, -{"id":"snsclient","key":"snsclient","value":{"rev":"3-302ce1c7132a36ef909ce534a509e27f"}}, -{"id":"soap","key":"soap","value":{"rev":"7-10f361a406dfee3074adac0cea127d87"}}, -{"id":"socket-push","key":"socket-push","value":{"rev":"22-196553953d58d92c288678b1dcd49ba7"}}, -{"id":"socket-twitchat","key":"socket-twitchat","value":{"rev":"11-9b159a4610ea444eaae39baa3bf05280"}}, -{"id":"socket.io","key":"socket.io","value":{"rev":"95-c29c929613dd95aa5aea8a5e14f2573f"}}, -{"id":"socket.io-client","key":"socket.io-client","value":{"rev":"33-a3c79d917bb038f0ca72f9cb27180a66"}}, -{"id":"socket.io-cluster","key":"socket.io-cluster","value":{"rev":"5-83bdaf79d2243eaf3a59b45fc604dc1a"}}, -{"id":"socket.io-connect","key":"socket.io-connect","value":{"rev":"17-62f00efc3bff3a1b549cc5e346da996f"}}, -{"id":"socket.io-context","key":"socket.io-context","value":{"rev":"42-a029996765557776d72690db1f14c1fa"}}, -{"id":"socket.io-ender","key":"socket.io-ender","value":{"rev":"9-c4523af5f5cc815ee69c325c1e29ede4"}}, -{"id":"socket.io-juggernaut","key":"socket.io-juggernaut","value":{"rev":"6-b8b97b2df2c186f24487e027278ec975"}}, -{"id":"socket.io-sessions","key":"socket.io-sessions","value":{"rev":"11-2151ee14eb29543811a9e567bcf6811a"}}, -{"id":"socketstream","key":"socketstream","value":{"rev":"29-b198d27ad6a3c4f9b63bc467e85a54a3"}}, -{"id":"sockjs","key":"sockjs","value":{"rev":"21-a8d6534c55e8b3e33cf06516b59aa408"}}, -{"id":"socksified","key":"socksified","value":{"rev":"3-92350ec9889b8db9c3d34bdbc41b1f7b"}}, -{"id":"soda","key":"soda","value":{"rev":"24-04987191e2c4241fbfaf78263c83d121"}}, -{"id":"soda-runner","key":"soda-runner","value":{"rev":"5-da4e8078a7666404d2a5ab3267a5ef75"}}, -{"id":"sodn","key":"sodn","value":{"rev":"3-3ee6350723c54aad792c769947c6b05e"}}, -{"id":"sofa","key":"sofa","value":{"rev":"7-2f8ffd47ce19e6fb7e1ea2e02076955d"}}, -{"id":"solder","key":"solder","value":{"rev":"10-8f7ad0a60c2716ce65658047c4ae5361"}}, -{"id":"solr","key":"solr","value":{"rev":"11-56a295dff56d9f2a4a7293257ca793a4"}}, -{"id":"solr-client","key":"solr-client","value":{"rev":"7-a296273d32224eb241343cb98ded7b82"}}, -{"id":"sones","key":"sones","value":{"rev":"3-9ddbbdc44f3501917e701d3304eb91a5"}}, -{"id":"song","key":"song","value":{"rev":"7-967aa3a58702b3470996cd8e63b1b18d"}}, -{"id":"sorted","key":"sorted","value":{"rev":"3-47b6ec0f744aa04929d48a7d3d10f581"}}, -{"id":"sosumi","key":"sosumi","value":{"rev":"10-8c3980beb3d7c48d4cccf44a8d1d5ff7"}}, -{"id":"soundcloud","key":"soundcloud","value":{"rev":"7-9ee76aecd3d1946731a1173185796864"}}, -{"id":"soupselect","key":"soupselect","value":{"rev":"12-5fea60f4e52117a8212aa7add6c34278"}}, -{"id":"source","key":"source","value":{"rev":"7-57d6cae0530c7cba4a3932f0df129f20"}}, -{"id":"source-map","key":"source-map","value":{"rev":"6-7da8d2ccc104fa30a93ee165975f28e8"}}, -{"id":"spacesocket","key":"spacesocket","value":{"rev":"6-d1679084b0917f86d6c4e3ac89a89809"}}, -{"id":"spark","key":"spark","value":{"rev":"12-64d44ebde2a4b48aed3bc7814c63e773"}}, -{"id":"spark2","key":"spark2","value":{"rev":"28-918548a309f0d18eebd5c64966376959"}}, -{"id":"sparql","key":"sparql","value":{"rev":"3-8eec87fe9fcb4d07aef214858eada777"}}, -{"id":"sparql-orm","key":"sparql-orm","value":{"rev":"3-b2a7efa5622b0b478fdca3f9050800cc"}}, -{"id":"spatial","key":"spatial","value":{"rev":"3-d09d40af02a9c9e5150500cc66d75f8d"}}, -{"id":"spawn","key":"spawn","value":{"rev":"3-f882c01cf1bb538f5f4be78769e1b097"}}, -{"id":"spdy","key":"spdy","value":{"rev":"13-1fbf077bbb8bc87d5058648c0c66288b"}}, -{"id":"spec","key":"spec","value":{"rev":"15-1074d3a8b8332fcc1059fbb5c4f69a7a"}}, -{"id":"speck","key":"speck","value":{"rev":"21-652b0670953ba79e548f4e5d9ce3d923"}}, -{"id":"spectrum","key":"spectrum","value":{"rev":"28-21fb9eeffe2e63a5383371a44a58a1ad"}}, -{"id":"speller","key":"speller","value":{"rev":"6-91e03f89b09338cf8f38d2e64c1778ce"}}, -{"id":"sphericalmercator","key":"sphericalmercator","value":{"rev":"9-3affc61ae0d64854d77829da5414bbc5"}}, -{"id":"spider","key":"spider","value":{"rev":"3-cd04679891875dfb2bf67613514238eb"}}, -{"id":"spider-tdd","key":"spider-tdd","value":{"rev":"3-d95b6d680d053a063e6fab3fdae16261"}}, -{"id":"spine","key":"spine","value":{"rev":"9-2a5cd4733be1d78376814e78966d885a"}}, -{"id":"spine.app","key":"spine.app","value":{"rev":"43-1044b31d4c53ff5c741a16d49291b321"}}, -{"id":"spine.mobile","key":"spine.mobile","value":{"rev":"19-220f64c212a5f22b27d597e299263490"}}, -{"id":"split_er","key":"split_er","value":{"rev":"3-3419662807bf16f7b5b53998a4759246"}}, -{"id":"spludo","key":"spludo","value":{"rev":"14-d41915fcd1b50553f5b9e706b41d2894"}}, -{"id":"spm","key":"spm","value":{"rev":"9-28d6699288d580807091aafdf78dd479"}}, -{"id":"spore","key":"spore","value":{"rev":"44-1c50fb0e6f7c3447f34b1927c976201f"}}, -{"id":"spork","key":"spork","value":{"rev":"3-e90976749b649b88ab83b59785dba101"}}, -{"id":"spotify","key":"spotify","value":{"rev":"3-90c74506a69e08a41feeb23541ac0b4f"}}, -{"id":"spotify-metadata","key":"spotify-metadata","value":{"rev":"3-a546d3e59e40ec0be5d8524f3a1e7a60"}}, -{"id":"spotlight","key":"spotlight","value":{"rev":"3-bead50ac8f53311d539a420c74ea23e2"}}, -{"id":"spread","key":"spread","value":{"rev":"3-ad7bf6d948043fc6dd47a6fcec7da294"}}, -{"id":"spreadsheet","key":"spreadsheet","value":{"rev":"11-94030e23cc9c8e515c1f340656aea031"}}, -{"id":"spreadsheets","key":"spreadsheets","value":{"rev":"3-6563c479735b1b6599bf9602fa65ff38"}}, -{"id":"sprintf","key":"sprintf","value":{"rev":"10-56c5bc7a19ecf8dd92e24d4dca081059"}}, -{"id":"spruce","key":"spruce","value":{"rev":"7-1ea45ef3c5412dd2a6c1fe7b2a083d68"}}, -{"id":"spy","key":"spy","value":{"rev":"3-f5546fdbbec80ba97756d0d1fefa7923"}}, -{"id":"sql","key":"sql","value":{"rev":"5-6c41452f684418ba521666e977f46e54"}}, -{"id":"sqlite","key":"sqlite","value":{"rev":"9-18761259920b497360f581ff8051dcbb"}}, -{"id":"sqlite3","key":"sqlite3","value":{"rev":"51-f9c99537afd9826819c5f40105e50987"}}, -{"id":"sqlmw","key":"sqlmw","value":{"rev":"17-b05b0b089c0f3b1185f96dc19bf61cf5"}}, -{"id":"squeeze","key":"squeeze","value":{"rev":"6-5e517be339d9aa409cedfcc11d1883b1"}}, -{"id":"squish","key":"squish","value":{"rev":"15-2334d8412df59ddd2fce60c1f77954c7"}}, -{"id":"sqwish","key":"sqwish","value":{"rev":"28-cc159dd5fd420432a7724c46456f4958"}}, -{"id":"srand","key":"srand","value":{"rev":"16-22f98b1b1a208c22dfbe95aa889cd08e"}}, -{"id":"srcds","key":"srcds","value":{"rev":"3-bd79da47d36662609c0c75c713874fd1"}}, -{"id":"srs","key":"srs","value":{"rev":"32-c8c961ea10fc60fc428bddff133a8aba"}}, -{"id":"sserve","key":"sserve","value":{"rev":"3-957457395e2c61c20bcb727fc19fc4d4"}}, -{"id":"ssh","key":"ssh","value":{"rev":"3-c7dda694daa7ca1e264b494400edfa18"}}, -{"id":"ssh-agent","key":"ssh-agent","value":{"rev":"3-dbc87102ed1f17b7253a1901976dfa9d"}}, -{"id":"sshmq","key":"sshmq","value":{"rev":"3-052f36ca47cddf069a1700fc79a08930"}}, -{"id":"stache","key":"stache","value":{"rev":"11-9bb0239153147939a25fd20184f20fc6"}}, -{"id":"stack","key":"stack","value":{"rev":"7-e18abdce80008ac9e2feb66f3407fe67"}}, -{"id":"stack-trace","key":"stack-trace","value":{"rev":"13-9fe20c5a3e34a5e4472c6f4fdea86efc"}}, -{"id":"stack.static","key":"stack.static","value":{"rev":"7-ad064faf6255a632cefa71a6ff3c47f3"}}, -{"id":"stack2","key":"stack2","value":{"rev":"3-e5f8ea94c0dd2b4c7f5d3941d689622b"}}, -{"id":"stackedy","key":"stackedy","value":{"rev":"25-f988787b9b5720dece8ae3cb83a2bc12"}}, -{"id":"stage","key":"stage","value":{"rev":"7-d2931fcb473f63320067c3e75638924e"}}, -{"id":"stalker","key":"stalker","value":{"rev":"19-ece35be8695846fc766a71c0022d4ff7"}}, -{"id":"startupify","key":"startupify","value":{"rev":"11-3c87ef5e9ee33122cf3515a63b22c52a"}}, -{"id":"stash","key":"stash","value":{"rev":"10-41239a1df74b69fe7bb3e360f9a35ad1"}}, -{"id":"statechart","key":"statechart","value":{"rev":"6-97e6947b5bbaf14bdb55efa6dfa5e19c"}}, -{"id":"stately","key":"stately","value":{"rev":"6-f8a257cd9fdd84947ff2cf7357afc88b"}}, -{"id":"stathat","key":"stathat","value":{"rev":"3-b79b7bd50bb1e4dcc1301424104a5b36"}}, -{"id":"station","key":"station","value":{"rev":"5-92e6387138b1ee10976bd92dd48ea818"}}, -{"id":"statistics","key":"statistics","value":{"rev":"3-a1c3a03d833c6f02fde403950790e9b4"}}, -{"id":"stats","key":"stats","value":{"rev":"13-fe513ea6b3b5b6b31935fd3464ec5d3b"}}, -{"id":"std","key":"std","value":{"rev":"55-58a4f182c3f51996a0d60a6f575cfefd"}}, -{"id":"steam","key":"steam","value":{"rev":"5-bffdf677d2d1ae3e8236892e68a3dd66"}}, -{"id":"stem","key":"stem","value":{"rev":"36-4f1c38eff671ede0241038017a810132"}}, -{"id":"step","key":"step","value":{"rev":"8-048d7707a45af3a7824a478d296cc467"}}, -{"id":"stepc","key":"stepc","value":{"rev":"3-be85de2c02f4889fdf77fda791feefea"}}, -{"id":"stepper","key":"stepper","value":{"rev":"9-cc54000dc973835c38e139b30cbb10cc"}}, -{"id":"steps","key":"steps","value":{"rev":"5-3561591b425e1fff52dc397f9688feae"}}, -{"id":"stextile","key":"stextile","value":{"rev":"29-9a8b6de917df01d322847f112dcadadf"}}, -{"id":"stitch","key":"stitch","value":{"rev":"13-8a50e4a4f015d1afe346aa6b6c8646bd"}}, -{"id":"stitchup","key":"stitchup","value":{"rev":"7-fe14604e3a8b82f62c38d0cb3ccce61e"}}, -{"id":"stomp","key":"stomp","value":{"rev":"15-e0430c0be74cd20c5204b571999922f7"}}, -{"id":"stopwords","key":"stopwords","value":{"rev":"3-2dd9fade030cfcce85848c5b3b4116fc"}}, -{"id":"store","key":"store","value":{"rev":"9-5537cc0f4827044504e8dae9617c9347"}}, -{"id":"store.js","key":"store.js","value":{"rev":"22-116c9a6194703ea98512d89ec5865e3d"}}, -{"id":"stories","key":"stories","value":{"rev":"11-244ca52d0a41f70bc4dfa0aca0f82a40"}}, -{"id":"storify","key":"storify","value":{"rev":"5-605b197219e916df561dd7722af97e2e"}}, -{"id":"storify-templates","key":"storify-templates","value":{"rev":"3-0960756aa963cee21b679a59cef114a1"}}, -{"id":"storm","key":"storm","value":{"rev":"3-9052e6af8528d1bc0d96021dfa21dd3e"}}, -{"id":"stove","key":"stove","value":{"rev":"17-01c9f0e87398e6bfa03a764e89295e00"}}, -{"id":"str.js","key":"str.js","value":{"rev":"9-301f54edeebde3c5084c3a8071e2aa09"}}, -{"id":"strack","key":"strack","value":{"rev":"10-5acf78ae6a417a82b49c221d606b8fed"}}, -{"id":"strappy","key":"strappy","value":{"rev":"3-fb63a899ff82c0f1142518cc263dd632"}}, -{"id":"strata","key":"strata","value":{"rev":"31-de615eccbda796e2bea405c2806ec792"}}, -{"id":"stream-buffers","key":"stream-buffers","value":{"rev":"7-d8fae628da43d377dd4e982f5bf7b09b"}}, -{"id":"stream-handler","key":"stream-handler","value":{"rev":"7-333eb7dcf2aeb550f948ee2162b21be2"}}, -{"id":"stream-stack","key":"stream-stack","value":{"rev":"22-a70979df042e2ff760b2d900259c84a1"}}, -{"id":"streamer","key":"streamer","value":{"rev":"17-dd16e62ada55311a793fbf7963a920f3"}}, -{"id":"streamlib","key":"streamlib","value":{"rev":"3-5125b1e6a92290f8d7f5fdad71e13fc2"}}, -{"id":"streamline","key":"streamline","value":{"rev":"152-0931f5697340c62e05dcd1a741afd38f"}}, -{"id":"streamline-streams","key":"streamline-streams","value":{"rev":"3-3224030ecfbf5a8ac5d218ab56dee545"}}, -{"id":"streamline-util","key":"streamline-util","value":{"rev":"3-a8047ecf37b985ec836c552fd2bcbf78"}}, -{"id":"streamlogger","key":"streamlogger","value":{"rev":"3-43f93a109774591f1409b0b86c363623"}}, -{"id":"streamlogger-fixed","key":"streamlogger-fixed","value":{"rev":"3-6e48de9e269b4f5bf979c560190b0680"}}, -{"id":"strftime","key":"strftime","value":{"rev":"25-74130d5c9cbf91025ce91f0463a9b1b5"}}, -{"id":"string-color","key":"string-color","value":{"rev":"3-9f336bf06bd80b2d2338c216099421c7"}}, -{"id":"strscan","key":"strscan","value":{"rev":"8-3e0d182a8d0c786754c555c0ac12e9d9"}}, -{"id":"strtok","key":"strtok","value":{"rev":"8-a1a1da7946d62fabb6cca56fc218654b"}}, -{"id":"struct","key":"struct","value":{"rev":"3-ff0f9cb336df73a5a19a38e17633583c"}}, -{"id":"structr","key":"structr","value":{"rev":"21-69b3672dab234d0effec5a72a2b1791c"}}, -{"id":"sty","key":"sty","value":{"rev":"9-ce5691388abc3ccaff23030bff190914"}}, -{"id":"style","key":"style","value":{"rev":"7-342569887fb53caddc60d745706cd66e"}}, -{"id":"style-compile","key":"style-compile","value":{"rev":"5-6f8b86c94c5344ec280a28f025691996"}}, -{"id":"styleless","key":"styleless","value":{"rev":"5-c236b81c38193ad71d7ed7c5b571995d"}}, -{"id":"stylewriter","key":"stylewriter","value":{"rev":"3-25a3f83252b220d8db0aa70c8fc1da4f"}}, -{"id":"stylus","key":"stylus","value":{"rev":"135-8b69084f50a95c297d1044e48b39a6c9"}}, -{"id":"stylus-blueprint","key":"stylus-blueprint","value":{"rev":"5-50ec59a9fa161ca68dac765f2281c13e"}}, -{"id":"stylus-sprite","key":"stylus-sprite","value":{"rev":"27-db597a75467baaad94de287494e9c21e"}}, -{"id":"styout","key":"styout","value":{"rev":"9-9d9460bb9bfa253ed0b5fbeb27f7710a"}}, -{"id":"sugar","key":"sugar","value":{"rev":"5-2722426edc51a7703f5c37306b03a8c4"}}, -{"id":"sugardoll","key":"sugardoll","value":{"rev":"16-cfadf4e7108357297be180a3868130db"}}, -{"id":"suger-pod","key":"suger-pod","value":{"rev":"5-c812b763cf6cdd218c6a18e1a4e2a4ac"}}, -{"id":"sunny","key":"sunny","value":{"rev":"3-c26b62eef1eeeeef58a7ea9373df3b39"}}, -{"id":"superagent","key":"superagent","value":{"rev":"3-1b32cc8372b7713f973bb1e044e6a86f"}}, -{"id":"supermarket","key":"supermarket","value":{"rev":"20-afa8a26ecec3069717c8ca7e5811cc31"}}, -{"id":"supershabam-websocket","key":"supershabam-websocket","value":{"rev":"7-513117fb37b3ab7cdaeeae31589e212e"}}, -{"id":"supervisor","key":"supervisor","value":{"rev":"16-2c6c141d018ef8927acee79f31d466ff"}}, -{"id":"supervisord","key":"supervisord","value":{"rev":"7-359ba115e5e10b5c95ef1a7562ad7a45"}}, -{"id":"svg2jadepartial","key":"svg2jadepartial","value":{"rev":"9-4a6260dd5d7c14801e8012e3ba7510f5"}}, -{"id":"swake","key":"swake","value":{"rev":"5-6f780362f0317427752d87cc5c640021"}}, -{"id":"swarm","key":"swarm","value":{"rev":"43-f1a963a0aeb043bf69529a82798b3afc"}}, -{"id":"sweet","key":"sweet","value":{"rev":"5-333f4d3529f65ce53b037cc282e3671d"}}, -{"id":"swig","key":"swig","value":{"rev":"29-53294b9d4f350192cf65817692092bfa"}}, -{"id":"switchback","key":"switchback","value":{"rev":"3-e117371d415f4a3d4ad30e78f5ec28bf"}}, -{"id":"switchboard","key":"switchboard","value":{"rev":"3-504d6c1e45165c54fbb1d3025d5120d7"}}, -{"id":"swiz","key":"swiz","value":{"rev":"82-cfb7840376b57896fba469e5c6ff3786"}}, -{"id":"swizec-bitly","key":"swizec-bitly","value":{"rev":"3-a705807238b8ef3ff2d008910bc350c3"}}, -{"id":"sws","key":"sws","value":{"rev":"5-bc5e8558bde6c2ae971abdd448a006d2"}}, -{"id":"symbie","key":"symbie","value":{"rev":"5-3184f869ed386341a4cdc35d85efb62a"}}, -{"id":"symbox","key":"symbox","value":{"rev":"5-eed33350cbb763726335ef1df74a6591"}}, -{"id":"synapse","key":"synapse","value":{"rev":"3-a9672d5159c0268babbfb94d7554d4bb"}}, -{"id":"sync","key":"sync","value":{"rev":"65-89fa6b8ab2df135d57e0bba4e921ad3b"}}, -{"id":"synchro","key":"synchro","value":{"rev":"21-6a881704308298f1894509a5b59287ae"}}, -{"id":"synchronous","key":"synchronous","value":{"rev":"7-bf89d61f001d994429e0fd12c26c2676"}}, -{"id":"syncler","key":"syncler","value":{"rev":"2-12870522e069945fc12f7d0f612700ee"}}, -{"id":"syncrepl","key":"syncrepl","value":{"rev":"5-e9234a1d8a529bc0d1b01c3b77c69c30"}}, -{"id":"synct","key":"synct","value":{"rev":"3-3664581b69e6f40dabc90525217f46cd"}}, -{"id":"syndicate","key":"syndicate","value":{"rev":"7-1db2b05d6b3e55fa622c3c26df7f9cad"}}, -{"id":"syslog","key":"syslog","value":{"rev":"5-d52fbc739505a2a194faf9a32da39d23"}}, -{"id":"syslog-node","key":"syslog-node","value":{"rev":"15-039177b9c516fd8d0b31faf92aa73f6f"}}, -{"id":"system","key":"system","value":{"rev":"18-33152371e0696a853ddb8b2234a6dfea"}}, -{"id":"taazr-uglify","key":"taazr-uglify","value":{"rev":"7-5c63dc75aa7c973df102c298291be8a5"}}, -{"id":"table","key":"table","value":{"rev":"9-a8a46ddf3a7cab63a0228303305cc32e"}}, -{"id":"tache.io","key":"tache.io","value":{"rev":"7-5639c70dc56b0a6333b568af377bb216"}}, -{"id":"taco","key":"taco","value":{"rev":"3-97cfbd54b4053c9e01e18af7c3902d1a"}}, -{"id":"tad","key":"tad","value":{"rev":"3-529ebda7291e24ae020d5c2931ba22cd"}}, -{"id":"tafa-misc-util","key":"tafa-misc-util","value":{"rev":"19-52984b66029c7d5cc78d3e2ae88c98d6"}}, -{"id":"tag","key":"tag","value":{"rev":"3-80b0d526b10a26f41fe73978843a07b9"}}, -{"id":"taglib","key":"taglib","value":{"rev":"3-efd2e6bc818bf3b385df40dfae506fa5"}}, -{"id":"tail","key":"tail","value":{"rev":"21-09bce80ad6aa4b01c6a70825fd141fd4"}}, -{"id":"tails","key":"tails","value":{"rev":"14-3ba6976831b1388e14235622ab001681"}}, -{"id":"tamejs","key":"tamejs","value":{"rev":"39-9a3657941df3bd24c43b5473e9f3b4c8"}}, -{"id":"taobao-js-api","key":"taobao-js-api","value":{"rev":"7-d46c8b48364b823dabf808f2b30e1eb8"}}, -{"id":"tap","key":"tap","value":{"rev":"35-1b8e553cf848f5ab27711efa0e74a033"}}, -{"id":"tap-assert","key":"tap-assert","value":{"rev":"19-f2960c64bcfa6ce4ed73e870d8d9e3fa"}}, -{"id":"tap-consumer","key":"tap-consumer","value":{"rev":"3-3e38aafb6d2d840bdb20818efbc75df4"}}, -{"id":"tap-global-harness","key":"tap-global-harness","value":{"rev":"3-f32589814daf8c1816c1f5a24de4ad12"}}, -{"id":"tap-harness","key":"tap-harness","value":{"rev":"7-a5af01384152c452abc11d4e641e6157"}}, -{"id":"tap-producer","key":"tap-producer","value":{"rev":"3-2db67a9541c37c912d4de2576bb3caa0"}}, -{"id":"tap-results","key":"tap-results","value":{"rev":"5-b8800525438965e38dc586e6b5cb142d"}}, -{"id":"tap-runner","key":"tap-runner","value":{"rev":"11-3975c0f5044530b61158a029899f4c03"}}, -{"id":"tap-test","key":"tap-test","value":{"rev":"5-0a3bba26b6b94dae8b7f59712335ee98"}}, -{"id":"tar","key":"tar","value":{"rev":"6-94226dd7add6ae6a1e68088360a466e4"}}, -{"id":"tar-async","key":"tar-async","value":{"rev":"37-d6579d43c1ee2f41205f28b0cde5da23"}}, -{"id":"tar-js","key":"tar-js","value":{"rev":"5-6826f2aad965fb532c7403964ce80d85"}}, -{"id":"task","key":"task","value":{"rev":"3-81f72759a5b64dff88a01a4838cc4a23"}}, -{"id":"task-extjs","key":"task-extjs","value":{"rev":"14-c9ba76374805425c332e0c66725e885c"}}, -{"id":"task-joose-nodejs","key":"task-joose-nodejs","value":{"rev":"20-6b8e4d24323d3240d5ee790d00c0d96a"}}, -{"id":"task-joose-stable","key":"task-joose-stable","value":{"rev":"32-026eada52cd5dd17a680359daec4917a"}}, -{"id":"tasks","key":"tasks","value":{"rev":"5-84e8f83d0c6ec27b4f05057c48063d62"}}, -{"id":"tav","key":"tav","value":{"rev":"3-da9899817edd20f0c73ad09bdf540cc6"}}, -{"id":"taxman","key":"taxman","value":{"rev":"5-9b9c68db8a1c8efedad800026cb23ae4"}}, -{"id":"tbone","key":"tbone","value":{"rev":"3-5789b010d0b1f1c663750c894fb5c570"}}, -{"id":"tcp-proxy","key":"tcp-proxy","value":{"rev":"3-118c6dc26d11537cf157fe2f28b05af5"}}, -{"id":"teamgrowl","key":"teamgrowl","value":{"rev":"8-3d13200b3bfeeace0787f9f9f027216d"}}, -{"id":"teamgrowl-server","key":"teamgrowl-server","value":{"rev":"8-a14dc4a26c2c06a4d9509eaff6e24735"}}, -{"id":"telehash","key":"telehash","value":{"rev":"6-4fae3629c1e7e111ba3e486b39a29913"}}, -{"id":"telemail","key":"telemail","value":{"rev":"3-60928460428265fc8002ca61c7f23abe"}}, -{"id":"telemetry","key":"telemetry","value":{"rev":"5-1be1d37ef62dc786b0a0f0d2d7984eb1"}}, -{"id":"teleport","key":"teleport","value":{"rev":"36-5b55a43ba83f4fe1a547c04e29139c3d"}}, -{"id":"teleport-dashboard","key":"teleport-dashboard","value":{"rev":"7-4cbc728d7a3052848a721fcdd92dda30"}}, -{"id":"teleport-site","key":"teleport-site","value":{"rev":"3-aeb8c0a93b7b0bcd7a30fe33bf23808c"}}, -{"id":"telnet","key":"telnet","value":{"rev":"11-7a587104b94ce135315c7540eb3493f6"}}, -{"id":"telnet-protocol","key":"telnet-protocol","value":{"rev":"3-8fcee2ed02c2e603c48e51e90ae78a00"}}, -{"id":"temp","key":"temp","value":{"rev":"6-91ef505da0a0860a13c0eb1a5d2531e6"}}, -{"id":"tempPath","key":"tempPath","value":{"rev":"3-34f2c1937d97207245986c344136547c"}}, -{"id":"tempis","key":"tempis","value":{"rev":"3-b2c0989068cc8125a519d19b9c79ffb6"}}, -{"id":"template","key":"template","value":{"rev":"6-d0088c6a5a7610570920db0f5c950bf9"}}, -{"id":"template-engine","key":"template-engine","value":{"rev":"3-3746216e1e2e456dbb0fd2f9070c1619"}}, -{"id":"tengwar","key":"tengwar","value":{"rev":"3-645a00f03e1e9546631ac22c37e1f3b4"}}, -{"id":"tenjin","key":"tenjin","value":{"rev":"5-0925c7535455266125b7730296c66356"}}, -{"id":"teriaki","key":"teriaki","value":{"rev":"3-d3c17f70d8697c03f43a7eae75f8c089"}}, -{"id":"terminal","key":"terminal","value":{"rev":"11-0e024d173ee3c28432877c0c5f633f19"}}, -{"id":"termspeak","key":"termspeak","value":{"rev":"7-fdfc93dd7d0d65fe502cabca191d8496"}}, -{"id":"termutil","key":"termutil","value":{"rev":"5-bccf8377ff28bc1f07f8b4b44d1e2335"}}, -{"id":"test","key":"test","value":{"rev":"38-129620013bbd3ec13617c403b02b52f1"}}, -{"id":"test-cmd","key":"test-cmd","value":{"rev":"35-7dd417a80390c2c124c66273ae33bd07"}}, -{"id":"test-helper","key":"test-helper","value":{"rev":"3-7b29af65825fc46d0603a39cdc6c95b4"}}, -{"id":"test-report","key":"test-report","value":{"rev":"5-e51cd1069b6cc442707f0861b35851be"}}, -{"id":"test-report-view","key":"test-report-view","value":{"rev":"3-9ba670940a8235eaef9b957dde6379af"}}, -{"id":"test-run","key":"test-run","value":{"rev":"20-6de89383602e6843d9376a78778bec19"}}, -{"id":"test_it","key":"test_it","value":{"rev":"5-be5cd436b9145398fa88c15c1269b102"}}, -{"id":"testbed","key":"testbed","value":{"rev":"2-db233788f7e516f227fac439d9450ef4"}}, -{"id":"testharness","key":"testharness","value":{"rev":"46-787468cb68ec31b442327639dcc0a4e5"}}, -{"id":"testingey","key":"testingey","value":{"rev":"17-a7ad6a9ff5721ae449876f6448d6f22f"}}, -{"id":"testnode","key":"testnode","value":{"rev":"9-cb63c450b241806e2271cd56fe502395"}}, -{"id":"testosterone","key":"testosterone","value":{"rev":"35-278e8af2b59bb6caf56728c67f720c37"}}, -{"id":"testqueue","key":"testqueue","value":{"rev":"3-59c574aeb345ef2d6e207a342be3f497"}}, -{"id":"testrunner","key":"testrunner","value":{"rev":"7-152e7d4a97f6cf6f00e22140e1969664"}}, -{"id":"testy","key":"testy","value":{"rev":"5-e8f4c9f4a799b6f8ab4effc21c3073a0"}}, -{"id":"text","key":"text","value":{"rev":"6-58a79b0db4968d6ad233898744a75351"}}, -{"id":"textareaserver","key":"textareaserver","value":{"rev":"3-f032b1397eb5e6369e1ac0ad1e78f466"}}, -{"id":"textile","key":"textile","value":{"rev":"6-2a8db66876f0119883449012c9c54c47"}}, -{"id":"textual","key":"textual","value":{"rev":"3-0ad9d5d3403b239185bad403625fed19"}}, -{"id":"tf2logparser","key":"tf2logparser","value":{"rev":"5-ffbc427b95ffeeb013dc13fa2b9621e3"}}, -{"id":"tfe-express","key":"tfe-express","value":{"rev":"3-b68ac01185885bcd22fa430ddb97e757"}}, -{"id":"tfidf","key":"tfidf","value":{"rev":"13-988808af905397dc103a0edf8c7c8a9f"}}, -{"id":"theBasics","key":"theBasics","value":{"rev":"7-9ebef2e59e1bd2fb3544ed16e1dc627b"}}, -{"id":"thefunlanguage.com","key":"thefunlanguage.com","value":{"rev":"3-25d56a3a4f639af23bb058db541bffe0"}}, -{"id":"thelinuxlich-docco","key":"thelinuxlich-docco","value":{"rev":"7-2ac0969da67ead2fa8bc0b21880b1d6b"}}, -{"id":"thelinuxlich-vogue","key":"thelinuxlich-vogue","value":{"rev":"5-ebc0a28cf0ae447b7ebdafc51c460bc0"}}, -{"id":"thepusher","key":"thepusher","value":{"rev":"5-b80cce6f81b1cae7373cd802df34c05c"}}, -{"id":"thetvdb","key":"thetvdb","value":{"rev":"3-a3a017a90b752d8158bf6dfcbcfdf250"}}, -{"id":"thirty-two","key":"thirty-two","value":{"rev":"3-1d4761ba7c4fa475e0c69e9c96d6ac04"}}, -{"id":"thoonk","key":"thoonk","value":{"rev":"15-c62c90d7e9072d96302d3a534ce943bb"}}, -{"id":"thrift","key":"thrift","value":{"rev":"14-447a41c9b655ec06e8e4854d5a55523a"}}, -{"id":"throttle","key":"throttle","value":{"rev":"3-8a3b3c657c49ede67c883806fbfb4df6"}}, -{"id":"thyme","key":"thyme","value":{"rev":"5-f06104f10d43a2b4cbcc7621ed45eacf"}}, -{"id":"tiamat","key":"tiamat","value":{"rev":"44-810633d6cd5edaa0510fe0f38c02ad58"}}, -{"id":"tictoc","key":"tictoc","value":{"rev":"3-0be6cf95d4466595376dadd0fc08bd95"}}, -{"id":"tidy","key":"tidy","value":{"rev":"3-25116d4dcf6765ef2a09711ecc1e03c9"}}, -{"id":"tiers","key":"tiers","value":{"rev":"3-ffaa8ffe472fe703de8f0bbeb8af5621"}}, -{"id":"tilejson","key":"tilejson","value":{"rev":"5-76b990dd945fb412ed00a96edc86b59d"}}, -{"id":"tilelive","key":"tilelive","value":{"rev":"57-9283e846e77263ed6e7299680d6b4b06"}}, -{"id":"tilelive-mapnik","key":"tilelive-mapnik","value":{"rev":"31-30f871ede46789fc6a36f427a1a99fff"}}, -{"id":"tilemill","key":"tilemill","value":{"rev":"19-7b884c9d707dd34f21cb71e88b45fc73"}}, -{"id":"tilestream","key":"tilestream","value":{"rev":"76-3a29ba96ecdb6c860c211ae8f2d909a9"}}, -{"id":"timbits","key":"timbits","value":{"rev":"59-b48dde4a210ec9fb4c33c07a52bce61e"}}, -{"id":"time","key":"time","value":{"rev":"51-907f587206e6a27803a3570e42650adc"}}, -{"id":"timeTraveller","key":"timeTraveller","value":{"rev":"7-389de8c8e86daea495d14aeb2b77df38"}}, -{"id":"timeout","key":"timeout","value":{"rev":"11-8e53dedecfaf6c4f1086eb0f43c71325"}}, -{"id":"timer","key":"timer","value":{"rev":"5-a8bcbb898a807e6662b54ac988fb967b"}}, -{"id":"timerjs","key":"timerjs","value":{"rev":"3-7d24eb268746fdb6b5e9be93bec93f1b"}}, -{"id":"timespan","key":"timespan","value":{"rev":"12-315b2793cbf28a18cea36e97a3c8a55f"}}, -{"id":"timezone","key":"timezone","value":{"rev":"35-2741d5d3b68a953d4cb3a596bc2bc15e"}}, -{"id":"tiny","key":"tiny","value":{"rev":"9-a61d26d02ce39381f7e865ad82494692"}}, -{"id":"tld","key":"tld","value":{"rev":"3-5ce4b4e48a11413ad8a1f3bfd0d0b778"}}, -{"id":"tldextract","key":"tldextract","value":{"rev":"7-620962e27145bd9fc17dc406c38b0c32"}}, -{"id":"tmp","key":"tmp","value":{"rev":"23-20f5c14244d58f35bd3e970f5f65cc32"}}, -{"id":"tmpl","key":"tmpl","value":{"rev":"5-5894c206e15fa58ab9415706b9d53f1f"}}, -{"id":"tmpl-precompile","key":"tmpl-precompile","value":{"rev":"15-3db34b681596b258cae1dae8cc24119d"}}, -{"id":"tmppckg","key":"tmppckg","value":{"rev":"11-b3a13e1280eb9cbef182c1f3f24bd570"}}, -{"id":"tnetstrings","key":"tnetstrings","value":{"rev":"3-d6b8ed2390a3e38138cb01b82d820079"}}, -{"id":"toDataURL","key":"toDataURL","value":{"rev":"3-1ea3cb62666b37343089bb9ef48fbace"}}, -{"id":"toYaml","key":"toYaml","value":{"rev":"11-3c629e3859c70d57b1ae51b2ac459011"}}, -{"id":"tob","key":"tob","value":{"rev":"7-376c174d06a675855406cfcdcacf61f5"}}, -{"id":"tobi","key":"tobi","value":{"rev":"50-d8749ac3739b042afe82657802bc3ba8"}}, -{"id":"toddick","key":"toddick","value":{"rev":"13-db528ef519f57b8c1d752ad7270b4d05"}}, -{"id":"tokenizer","key":"tokenizer","value":{"rev":"5-f6524fafb16059b66074cd04bf248a03"}}, -{"id":"tokyotosho","key":"tokyotosho","value":{"rev":"5-7432e0207165d9c165fd73d2a23410d6"}}, -{"id":"tolang","key":"tolang","value":{"rev":"7-65dbdf56b039f680e61a1e1d7feb9fb1"}}, -{"id":"toolkit","key":"toolkit","value":{"rev":"13-58075a57a6069dc39f98e72d473a0c30"}}, -{"id":"tools","key":"tools","value":{"rev":"3-ba301d25cfc6ad71dd68c811ea97fa01"}}, -{"id":"topcube","key":"topcube","value":{"rev":"29-736b3816d410f626dbc4da663acb05aa"}}, -{"id":"torrent-search","key":"torrent-search","value":{"rev":"7-7dd48fac0c1f99f34fad7da365085b6c"}}, -{"id":"tosource","key":"tosource","value":{"rev":"5-13483e2c11b07611c26b37f2e76a0bf3"}}, -{"id":"tplcpl","key":"tplcpl","value":{"rev":"15-8ba1e6d14ad6b8eb71b703e22054ac0a"}}, -{"id":"tracejs","key":"tracejs","value":{"rev":"23-1ffec83afc19855bcbed8049a009a910"}}, -{"id":"traceur","key":"traceur","value":{"rev":"9-a48f7e4cb1fb452125d81c62c8ab628b"}}, -{"id":"traceurl","key":"traceurl","value":{"rev":"21-e016db44a86b124ea00411f155d884d4"}}, -{"id":"tracey","key":"tracey","value":{"rev":"5-76699aab64e89271cbb7df80a00d3583"}}, -{"id":"tracy","key":"tracy","value":{"rev":"5-412f78082ba6f4c3c7d5328cf66d2e10"}}, -{"id":"traits","key":"traits","value":{"rev":"10-3a37dbec4b78518c00c577f5e286a9b9"}}, -{"id":"tramp","key":"tramp","value":{"rev":"5-3b6d27b8b432b925b7c9fc088e84d8e4"}}, -{"id":"transcode","key":"transcode","value":{"rev":"6-a6494707bd94b5e6d1aa9df3dbcf8d7c"}}, -{"id":"transformer","key":"transformer","value":{"rev":"15-7738ac7c02f03d64f73610fbf7ed92a6"}}, -{"id":"transformjs","key":"transformjs","value":{"rev":"5-f1ab667c430838e1d3238e1f878998e2"}}, -{"id":"transitive","key":"transitive","value":{"rev":"43-841de40a5e3434bd51a1c8f19891f982"}}, -{"id":"translate","key":"translate","value":{"rev":"12-f3ddbbada2f109843c5422d83dd7a203"}}, -{"id":"transliteration.ua","key":"transliteration.ua","value":{"rev":"3-f847c62d8749904fc7de6abe075e619a"}}, -{"id":"transmission","key":"transmission","value":{"rev":"9-587eaa395430036f17b175bc439eabb6"}}, -{"id":"transmogrify","key":"transmogrify","value":{"rev":"5-3e415cd9420c66551cccc0aa91b11d98"}}, -{"id":"transporter","key":"transporter","value":{"rev":"6-698b696890bf01d751e9962bd86cfe7e"}}, -{"id":"traverse","key":"traverse","value":{"rev":"60-9432066ab44fbb0e913227dc62c953d9"}}, -{"id":"traverser","key":"traverser","value":{"rev":"11-1d50662f13134868a1df5019d99bf038"}}, -{"id":"treeeater","key":"treeeater","value":{"rev":"56-2c8a9fd3e842b221ab8da59c6d847327"}}, -{"id":"treelib","key":"treelib","value":{"rev":"13-212ccc836a943c8b2a5342b65ab9edf3"}}, -{"id":"trees","key":"trees","value":{"rev":"3-3ee9e9cf3fd8aa985e32b3d9586a7c0e"}}, -{"id":"trentm-datetime","key":"trentm-datetime","value":{"rev":"3-740a291379ddf97bda2aaf2ff0e1654d"}}, -{"id":"trentm-git","key":"trentm-git","value":{"rev":"3-b81ce3764a45e5d0862488fab9fac486"}}, -{"id":"trentm-hashlib","key":"trentm-hashlib","value":{"rev":"3-4b4175b6a8702bdb9c1fe5ac4786761b"}}, -{"id":"trial","key":"trial","value":{"rev":"3-cf77f189409517495dd8259f86e0620e"}}, -{"id":"trie","key":"trie","value":{"rev":"3-6cc3c209cf4aae5a4f92e1ca38c4c54c"}}, -{"id":"trollop","key":"trollop","value":{"rev":"6-75076593614c9cd51d61a76f73d2c5b5"}}, -{"id":"trollscript","key":"trollscript","value":{"rev":"5-fcf646075c5be575b9174f84d08fbb37"}}, -{"id":"trollscriptjs","key":"trollscriptjs","value":{"rev":"3-1dfd1acd3d15c0bd18ea407e3933b621"}}, -{"id":"tropo-webapi","key":"tropo-webapi","value":{"rev":"11-5106730dbd79167df38812ffaa912ded"}}, -{"id":"tropo-webapi-node","key":"tropo-webapi-node","value":{"rev":"15-483c64bcbf1dcadaea30e78d7bc3ebbc"}}, -{"id":"trundle","key":"trundle","value":{"rev":"3-2af32ed348fdedebd1077891bb22a756"}}, -{"id":"trust-reverse-proxy","key":"trust-reverse-proxy","value":{"rev":"6-ba5bed0849617e0390f0e24750bf5747"}}, -{"id":"trying","key":"trying","value":{"rev":"3-43b417160b178c710e0d85af6b3d56e7"}}, -{"id":"ttapi","key":"ttapi","value":{"rev":"51-727e47d8b383b387a498711c07ce4de6"}}, -{"id":"tubbs","key":"tubbs","value":{"rev":"7-b386e59f2205b22615a376f5ddee3eb0"}}, -{"id":"tuild","key":"tuild","value":{"rev":"13-4a2b92f95a0ee342c060974ce7a0021d"}}, -{"id":"tumbler","key":"tumbler","value":{"rev":"5-ff16653ab92d0af5e70d9caa88f3b7ed"}}, -{"id":"tumbler-sprite","key":"tumbler-sprite","value":{"rev":"3-604d25b7bb9e32b92cadd75aeb23997c"}}, -{"id":"tumblr","key":"tumblr","value":{"rev":"9-14d160f1f2854330fba300b3ea233893"}}, -{"id":"tumblr2","key":"tumblr2","value":{"rev":"7-29bb5d86501cdbcef889289fe7f4b51e"}}, -{"id":"tumblrrr","key":"tumblrrr","value":{"rev":"10-0c50379fbab7b39766e1a61379c39964"}}, -{"id":"tunguska","key":"tunguska","value":{"rev":"1-a6b24d2c2a5a9f091a9b6f13bac66927"}}, -{"id":"tupalocomapi","key":"tupalocomapi","value":{"rev":"3-a1cdf85a08784f62c2ec440a1ed90ad4"}}, -{"id":"turing","key":"turing","value":{"rev":"5-4ba083c8343718acb9450d96551b65c0"}}, -{"id":"tutti","key":"tutti","value":{"rev":"21-929cc205b3d8bc68f86aa63578e0af95"}}, -{"id":"tuttiserver","key":"tuttiserver","value":{"rev":"39-b3fe7cbaf2d43458dae061f37aa5ae18"}}, -{"id":"tuttiterm","key":"tuttiterm","value":{"rev":"7-6c0e9e7f6f137de0ee7c886351fdf373"}}, -{"id":"tvister","key":"tvister","value":{"rev":"7-963eab682ab09922a44fbca50c0ec019"}}, -{"id":"twbot","key":"twbot","value":{"rev":"15-923625f516566c977975b3da3d4bc46b"}}, -{"id":"tweasy","key":"tweasy","value":{"rev":"10-7215063e5729b1c114ef73f07a1368d3"}}, -{"id":"tweeter.js","key":"tweeter.js","value":{"rev":"3-bc8437157c11cf32eec168d7c71037bb"}}, -{"id":"tweetstream","key":"tweetstream","value":{"rev":"6-81a6bf2a3e29208e1c4c65a3958ee5d8"}}, -{"id":"twerk","key":"twerk","value":{"rev":"5-01cbfddf9ad25a67ff1e45ec39acb780"}}, -{"id":"twerp","key":"twerp","value":{"rev":"23-1b4726d1fef030a3dde6fae2cdfbb687"}}, -{"id":"twigjs","key":"twigjs","value":{"rev":"7-07b90e2c35c5c81d394b29086507de04"}}, -{"id":"twilio","key":"twilio","value":{"rev":"20-68d5439ecb1774226025e6f9125bbb86"}}, -{"id":"twilio-node","key":"twilio-node","value":{"rev":"13-84d31c2dc202df3924ed399289cbc1fc"}}, -{"id":"twiliode","key":"twiliode","value":{"rev":"3-6cbe432dd6c6d94d8a4faa6e0ea47dd3"}}, -{"id":"twill","key":"twill","value":{"rev":"5-3a0caf9c0e83ab732ae8ae61f4f17830"}}, -{"id":"twisted-deferred","key":"twisted-deferred","value":{"rev":"9-f35acecb8736d96582e1f9b62dd4ae47"}}, -{"id":"twitpic","key":"twitpic","value":{"rev":"11-55b11432a09edeec1189024f26a48153"}}, -{"id":"twitter","key":"twitter","value":{"rev":"60-9ad6368932c8a74ea5bd10dda993d74d"}}, -{"id":"twitter-client","key":"twitter-client","value":{"rev":"11-dc3da9e1724cf00aa86c1e7823cfd919"}}, -{"id":"twitter-connect","key":"twitter-connect","value":{"rev":"12-969292347a4251d121566169236a3091"}}, -{"id":"twitter-js","key":"twitter-js","value":{"rev":"24-251d0c54749e86bd544a15290e311370"}}, -{"id":"twitter-node","key":"twitter-node","value":{"rev":"12-a7ed6c69f05204de2e258f46230a05b6"}}, -{"id":"twitter-text","key":"twitter-text","value":{"rev":"16-978bda8ec4eaf68213d0ee54242feefa"}}, -{"id":"type","key":"type","value":{"rev":"3-c5b8b87cde9e27277302cb5cb6d00f85"}}, -{"id":"typecheck","key":"typecheck","value":{"rev":"5-79723661620bb0fb254bc7f888d6e937"}}, -{"id":"typed-array","key":"typed-array","value":{"rev":"3-89ac91e2a51a9e5872515d5a83691e83"}}, -{"id":"typhoon","key":"typhoon","value":{"rev":"23-2027c96b8fd971332848594f3b0526cb"}}, -{"id":"typogr","key":"typogr","value":{"rev":"13-2dfe00f08ee13e6b00a99df0a8f96718"}}, -{"id":"ua-parser","key":"ua-parser","value":{"rev":"14-d1a018354a583dba4506bdc0c04a416b"}}, -{"id":"uberblic","key":"uberblic","value":{"rev":"5-500704ed73f255eb5b86ad0a5e158bc9"}}, -{"id":"ucengine","key":"ucengine","value":{"rev":"5-1e8a91c813e39b6f1b9f988431bb65c8"}}, -{"id":"udon","key":"udon","value":{"rev":"3-9a819e835f88fc91272b6366c70d83c0"}}, -{"id":"ueberDB","key":"ueberDB","value":{"rev":"85-fa700e5a64efaf2e71de843d7175606c"}}, -{"id":"uglify-js","key":"uglify-js","value":{"rev":"30-9ac97132a90f94b0a3aadcd96ed51890"}}, -{"id":"uglify-js-middleware","key":"uglify-js-middleware","value":{"rev":"5-47bd98d7f1118f5cab617310d4022eb4"}}, -{"id":"uglifycss","key":"uglifycss","value":{"rev":"3-4eefc4632e6e61ec999e93a1e26e0c83"}}, -{"id":"ui","key":"ui","value":{"rev":"27-b6439c8fcb5feb1d8f722ac5a91727c0"}}, -{"id":"ukijs","key":"ukijs","value":{"rev":"13-a0d7b143104e6cc0760cbe7e61c4f293"}}, -{"id":"umecob","key":"umecob","value":{"rev":"19-960fef8b8b8468ee69096173baa63232"}}, -{"id":"underscore","key":"underscore","value":{"rev":"29-419857a1b0dc08311717d1f6066218b8"}}, -{"id":"underscore-data","key":"underscore-data","value":{"rev":"17-e763dd42ea6e4ab71bc442e9966e50e4"}}, -{"id":"underscore.date","key":"underscore.date","value":{"rev":"11-a1b5870b855d49a3bd37823a736e9f93"}}, -{"id":"underscore.inspector","key":"underscore.inspector","value":{"rev":"7-04d67b5bfe387391d461b11c6ddda231"}}, -{"id":"underscore.string","key":"underscore.string","value":{"rev":"31-4100a9e1f1d7e8dde007cc6736073e88"}}, -{"id":"underscorem","key":"underscorem","value":{"rev":"5-181dd113e62482020122e6a68f80cdc1"}}, -{"id":"underscorex","key":"underscorex","value":{"rev":"8-76b82cffecd4304822fbc346e6cebc1b"}}, -{"id":"underscorify","key":"underscorify","value":{"rev":"3-7bb03dccba21d30c50328e7d4878704e"}}, -{"id":"unicode","key":"unicode","value":{"rev":"45-2fc73b36aad2661e5bb2e703e62a6f71"}}, -{"id":"unicoder","key":"unicoder","value":{"rev":"3-6f6571d361217af7fea7c224ca8a1149"}}, -{"id":"unit","key":"unit","value":{"rev":"5-68847eeb11474765cf73f1e21ca4b839"}}, -{"id":"unite","key":"unite","value":{"rev":"3-a8812f4e77d1d1a9dc67c327d8e75b47"}}, -{"id":"unittest-jslint","key":"unittest-jslint","value":{"rev":"3-c371c63c7b68a32357becb7b6a02d048"}}, -{"id":"unixlib","key":"unixlib","value":{"rev":"3-41f4c2859ca92951cf40556faa4eacdb"}}, -{"id":"unlimit","key":"unlimit","value":{"rev":"3-f42d98066e6ebbc23ef67499845ac020"}}, -{"id":"unrequire","key":"unrequire","value":{"rev":"17-bc75241891ae005eb52844222daf8f97"}}, -{"id":"unshortener","key":"unshortener","value":{"rev":"15-0851cb8bc3c378c37a3df9760067a109"}}, -{"id":"unused","key":"unused","value":{"rev":"3-362e713349c4a5541564fa2de33d01ba"}}, -{"id":"upload","key":"upload","value":{"rev":"3-63aedcfb335754c3bca1675c4add51c4"}}, -{"id":"ups_node","key":"ups_node","value":{"rev":"15-fa6d0be3831ee09420fb703c4d508534"}}, -{"id":"upy","key":"upy","value":{"rev":"5-dab63054d02be71f9c2709659974a5e1"}}, -{"id":"uri","key":"uri","value":{"rev":"3-5baaa12433cff7539b1d39c0c7f62853"}}, -{"id":"uri-parser","key":"uri-parser","value":{"rev":"3-d7e81b08e8b3f6f5ac8c6b4220228529"}}, -{"id":"url","key":"url","value":{"rev":"3-0dfd5ec2904cb1f645fa7449dbb0ce52"}}, -{"id":"url-expander","key":"url-expander","value":{"rev":"21-73bf9fa3c98b15d5ef0ed9815d862953"}}, -{"id":"urllib","key":"urllib","value":{"rev":"5-b015944526c15589a1504d398dcb598a"}}, -{"id":"urn-parser","key":"urn-parser","value":{"rev":"3-08a35a166790ecf88729befd4ebc7bf1"}}, -{"id":"useless","key":"useless","value":{"rev":"3-9d7b7ab9d4811847ed6e99ce2226d687"}}, -{"id":"user-agent","key":"user-agent","value":{"rev":"16-ac00f085795346421242e3d4d75523ad"}}, -{"id":"useragent","key":"useragent","value":{"rev":"7-3184d8aba5540e6596da9e3635ee3c24"}}, -{"id":"useragent_parser","key":"useragent_parser","value":{"rev":"3-730427aba3f0825fd28850e96b1613d4"}}, -{"id":"utf7","key":"utf7","value":{"rev":"3-ad56e4c9ac5a509ff568a3cdf0ed074f"}}, -{"id":"utf8","key":"utf8","value":{"rev":"3-c530cad759dd6e4e471338a71a307434"}}, -{"id":"util","key":"util","value":{"rev":"3-0e55e3466bc3ea6aeda6384639e842c3"}}, -{"id":"utility-belt","key":"utility-belt","value":{"rev":"3-8de401b41ef742b3c0a144b99099771f"}}, -{"id":"utml","key":"utml","value":{"rev":"5-5f0f3de6f787056bd124ca98716fbc19"}}, -{"id":"uubench","key":"uubench","value":{"rev":"6-b6cb0756e35ce998b61bb9a6ea0f5732"}}, -{"id":"uuid","key":"uuid","value":{"rev":"13-3f014b236668ec5eb49d0a17ad54d397"}}, -{"id":"uuid-lib","key":"uuid-lib","value":{"rev":"3-3de40495439e240b5a41875c19c65b1a"}}, -{"id":"uuid-pure","key":"uuid-pure","value":{"rev":"19-b94e9f434901fe0a0bbfdfa06f785874"}}, -{"id":"uuid.js","key":"uuid.js","value":{"rev":"8-3232a97c9f4a2b601d207488350df01b"}}, -{"id":"v8-profiler","key":"v8-profiler","value":{"rev":"12-790c90391bcbec136e316e57b30a845c"}}, -{"id":"valentine","key":"valentine","value":{"rev":"35-dd4b0642aacaf833e1119fc42bb6e9df"}}, -{"id":"validate-json","key":"validate-json","value":{"rev":"5-6a71fb36b102b3a4c5f6cc35012518b3"}}, -{"id":"validations","key":"validations","value":{"rev":"5-7272c97d35e3269813d91f1ea06e7217"}}, -{"id":"validator","key":"validator","value":{"rev":"45-9983ff692c291143ba670b613e07ddab"}}, -{"id":"vanilla","key":"vanilla","value":{"rev":"3-2e1d05af0873386b7cd6d432f1e76217"}}, -{"id":"vapor","key":"vapor","value":{"rev":"1-e1f86f03c94a4b90bca347408dbc56ff"}}, -{"id":"vargs","key":"vargs","value":{"rev":"6-9e389cfd648034dd469348112eedb23b"}}, -{"id":"vash","key":"vash","value":{"rev":"9-85ade8b7249a0e8230e8f0aaf1c34e2a"}}, -{"id":"vbench","key":"vbench","value":{"rev":"3-059528251a566c6ac363e236212448ce"}}, -{"id":"vendor.js","key":"vendor.js","value":{"rev":"5-264b0f8a771cad113be6919b6004ff95"}}, -{"id":"ventstatus","key":"ventstatus","value":{"rev":"3-16aa39e22b149b23b64317991415f92c"}}, -{"id":"version-compare","key":"version-compare","value":{"rev":"3-a8d6eea31572fe973ddd98c0a8097bc6"}}, -{"id":"vertica","key":"vertica","value":{"rev":"37-035d50183c3ad3056db0d7a13c20005d"}}, -{"id":"vhost","key":"vhost","value":{"rev":"9-53bbdba14dae631a49e782d169e4fc5a"}}, -{"id":"vice","key":"vice","value":{"rev":"5-0f74600349f4540b1b104d4ebfec1309"}}, -{"id":"video","key":"video","value":{"rev":"10-65c0b603047188fe2b07cbd2e1c93fe7"}}, -{"id":"vie","key":"vie","value":{"rev":"5-94e23770c5a0510480a0bae07d846ebc"}}, -{"id":"view","key":"view","value":{"rev":"21-a2abdfc54ab732a906347090c68564a5"}}, -{"id":"vigilante","key":"vigilante","value":{"rev":"30-951541a8b2fc2364bb1ccd7cfae56482"}}, -{"id":"villain","key":"villain","value":{"rev":"10-8dbfc5db42230d8813e6cc61af14d575"}}, -{"id":"vine","key":"vine","value":{"rev":"17-e7ac5d190cacf0f2d17d27e37b2b9f5f"}}, -{"id":"vipe","key":"vipe","value":{"rev":"3-78996531221e08292b9ca3de6e19d578"}}, -{"id":"viralheat","key":"viralheat","value":{"rev":"3-b928ce797fd5955c766b6b7e9e9c8f54"}}, -{"id":"viralheat-sentiment","key":"viralheat-sentiment","value":{"rev":"3-5d083e0d141ecf36e06c7c2885b01b5c"}}, -{"id":"virustotal.js","key":"virustotal.js","value":{"rev":"3-074be49f7e877b154a2144ef844f78e9"}}, -{"id":"vk","key":"vk","value":{"rev":"9-48f53ea9ebe68c9d3af45eb601c71006"}}, -{"id":"vmcjs","key":"vmcjs","value":{"rev":"5-44d8dd906fa3530d2bfc2dfee7f498d4"}}, -{"id":"vogue","key":"vogue","value":{"rev":"38-891354d18638a26d5b5ba95933faae0e"}}, -{"id":"vogue-dtrejo","key":"vogue-dtrejo","value":{"rev":"3-3ef8d57d3b5c0aca297fe38c9040954f"}}, -{"id":"votizen-logger","key":"votizen-logger","value":{"rev":"4-ba0837a28693aba346fab885a3a8f315"}}, -{"id":"vows","key":"vows","value":{"rev":"80-43d6a81c184c06d73e692358e913821e"}}, -{"id":"vows-bdd","key":"vows-bdd","value":{"rev":"3-dc2a7013dd94b0b65a3ed3a8b69b680e"}}, -{"id":"vows-ext","key":"vows-ext","value":{"rev":"49-079067a01a681ca7df4dfaae74adb3fb"}}, -{"id":"vows-fluent","key":"vows-fluent","value":{"rev":"23-67625a035cedf90c8fed73722465ecea"}}, -{"id":"vows-is","key":"vows-is","value":{"rev":"68-45a13df422d08ab00cc8f785b6411741"}}, -{"id":"voyeur","key":"voyeur","value":{"rev":"5-56fe23f95df6ff648b67f1a9baf10d41"}}, -{"id":"vws.pubsub","key":"vws.pubsub","value":{"rev":"5-609497d66ab6a76c5201904e41b95715"}}, -{"id":"wabtools","key":"wabtools","value":{"rev":"7-b24cd7262720a29f59da103b7110325d"}}, -{"id":"wadey-ranger","key":"wadey-ranger","value":{"rev":"17-a0541bad0880ffc199e8b2ef4c80ddb8"}}, -{"id":"wagner","key":"wagner","value":{"rev":"3-4b76219928f409b7124e02c0518d6cb6"}}, -{"id":"wait","key":"wait","value":{"rev":"3-7f8a5f9c8e86da4f219353ae778868a9"}}, -{"id":"waiter","key":"waiter","value":{"rev":"5-680176b06719c9a8499725b0a617cdc9"}}, -{"id":"waitlist","key":"waitlist","value":{"rev":"17-f3b2a4cf58b940c3839debda23c12b8e"}}, -{"id":"wake_on_lan","key":"wake_on_lan","value":{"rev":"6-1295bb5c618495b74626aaaa1c644d32"}}, -{"id":"walk","key":"walk","value":{"rev":"22-c05e1e1252a59b1048a0b6464631d08b"}}, -{"id":"walker","key":"walker","value":{"rev":"18-e8a20efc286234fb20789dc68cd04cd1"}}, -{"id":"warp","key":"warp","value":{"rev":"19-c7f17d40291984cd27f1d57fe764a5d2"}}, -{"id":"watch","key":"watch","value":{"rev":"18-3bc43d36ea1dbf69b93d4ea3d9534d44"}}, -{"id":"watch-less","key":"watch-less","value":{"rev":"5-f69a778ee58c681ad3b24a766576c016"}}, -{"id":"watch-tree","key":"watch-tree","value":{"rev":"5-316b60e474c3ae6e97f7cdb06b65af78"}}, -{"id":"watch.js","key":"watch.js","value":{"rev":"11-8c02c7429f90ca5e756a131d85bd5a32"}}, -{"id":"watch_dir","key":"watch_dir","value":{"rev":"5-df0a592508e1e13f5d24c2863733a8b9"}}, -{"id":"watchable","key":"watchable","value":{"rev":"3-f8694ff0c3add9a1310f0980e24ea23b"}}, -{"id":"watchersto","key":"watchersto","value":{"rev":"5-06665e682f58f61831d41d08b4ea12e7"}}, -{"id":"watchman","key":"watchman","value":{"rev":"11-956ad2175d0c5b52e82988a697474244"}}, -{"id":"watchn","key":"watchn","value":{"rev":"15-9685afa8b501f8cd7e068beed1264cfe"}}, -{"id":"wave","key":"wave","value":{"rev":"7-d13054ac592b3b4f81147b6bc7a91ea1"}}, -{"id":"wax","key":"wax","value":{"rev":"71-2e8877b0b6df27c1375dcd7f6bbdb4b7"}}, -{"id":"waz-storage-js","key":"waz-storage-js","value":{"rev":"15-1aaa07353c3d25f5794fa004a23c4dfa"}}, -{"id":"wd","key":"wd","value":{"rev":"19-20c4ee8b83057ece691f9669e288059e"}}, -{"id":"weak","key":"weak","value":{"rev":"3-b774b8be74f33c843df631aa07854104"}}, -{"id":"web","key":"web","value":{"rev":"3-c571dee306020f6f92c7a3150e8023b1"}}, -{"id":"webapp","key":"webapp","value":{"rev":"5-60525be5734cf1d02a77508e5f46bafa"}}, -{"id":"webfonts","key":"webfonts","value":{"rev":"5-d7be242801702fd1eb728385b8982107"}}, -{"id":"webgenjs","key":"webgenjs","value":{"rev":"3-ac6be47eedcbb2561babdb9495d60f29"}}, -{"id":"webgl","key":"webgl","value":{"rev":"18-21cd40f6c7e4943a2d858ed813d3c45d"}}, -{"id":"webhookit-comment","key":"webhookit-comment","value":{"rev":"5-1fbed3d75bf485433bdcac4fac625eab"}}, -{"id":"webhookit-ejs","key":"webhookit-ejs","value":{"rev":"5-9b76f543e9c0941d0245cb3bfd2cc64e"}}, -{"id":"webhookit-email","key":"webhookit-email","value":{"rev":"5-d472fde4f101d55d029a29777bbdb952"}}, -{"id":"webhookit-http","key":"webhookit-http","value":{"rev":"13-9f6f05cdb03f45a2227b9cd820565e63"}}, -{"id":"webhookit-jsonparse","key":"webhookit-jsonparse","value":{"rev":"3-6d49bf8a9849130d9bbc5b0d6fb0bf67"}}, -{"id":"webhookit-jsonpath","key":"webhookit-jsonpath","value":{"rev":"5-7acaf50267274584dca1cc5c1e77ce2e"}}, -{"id":"webhookit-objectbuilder","key":"webhookit-objectbuilder","value":{"rev":"5-e63fb26621929f3ab8d8519556116b30"}}, -{"id":"webhookit-soupselect","key":"webhookit-soupselect","value":{"rev":"9-726f2f4794437632032058bc81e6ee5d"}}, -{"id":"webhookit-xml2js","key":"webhookit-xml2js","value":{"rev":"3-ec959e474ecb3a163f2991767594a60e"}}, -{"id":"webhookit-yql","key":"webhookit-yql","value":{"rev":"9-c6ae87a8cc55d33901485ee7c3895ef8"}}, -{"id":"webify","key":"webify","value":{"rev":"3-86810874abf2274d1387ee748987b627"}}, -{"id":"webjs","key":"webjs","value":{"rev":"103-593a1e4e69d8db6284ecf4fce01b4668"}}, -{"id":"webmake","key":"webmake","value":{"rev":"13-f6588093a487212a151d1c00c26de7b4"}}, -{"id":"webmetrics","key":"webmetrics","value":{"rev":"3-44a428fd2ecb1b1bf50c33157750dd16"}}, -{"id":"webrepl","key":"webrepl","value":{"rev":"21-d6dcdbb59186092d9a0f1977c69394a5"}}, -{"id":"webservice","key":"webservice","value":{"rev":"18-05038f1cf997cff1ed81e783485680aa"}}, -{"id":"webshell","key":"webshell","value":{"rev":"3-05c431cf961a9dbaee1dfd95237e189a"}}, -{"id":"websocket","key":"websocket","value":{"rev":"33-7c20d55a88f187d7b398525824159f67"}}, -{"id":"websocket-client","key":"websocket-client","value":{"rev":"12-26a3530b9e6d465f472c791db01c9fc3"}}, -{"id":"websocket-protocol","key":"websocket-protocol","value":{"rev":"3-e52a8496f70686c289087149aee8b359"}}, -{"id":"websocket-server","key":"websocket-server","value":{"rev":"46-9f69e2f9408eb196b3a1aa990e5b5ac2"}}, -{"id":"websockets","key":"websockets","value":{"rev":"3-5535fcb4ae144909f021ee067eec7b2a"}}, -{"id":"webworker","key":"webworker","value":{"rev":"16-f7a4c758b176c6e464c93b6a9f79283b"}}, -{"id":"weibo","key":"weibo","value":{"rev":"21-8a50310389b2f43d8a7cb14e138eb122"}}, -{"id":"weld","key":"weld","value":{"rev":"7-16601ac41d79b3a01e4d2615035376ed"}}, -{"id":"whatlang","key":"whatlang","value":{"rev":"5-f7b10a0f8c3b6579c81d1d1222aeccd7"}}, -{"id":"wheat","key":"wheat","value":{"rev":"16-f6a97282f521edb7f2b0e5edc9577ce0"}}, -{"id":"which","key":"which","value":{"rev":"7-e5fdcb208715f2201d3911caf8a67042"}}, -{"id":"whiskers","key":"whiskers","value":{"rev":"9-2cfd73cebeaf8ce3cb1591e825380621"}}, -{"id":"whiskey","key":"whiskey","value":{"rev":"49-55367718b9067ff2bcb7fbb89327587b"}}, -{"id":"whisperjs","key":"whisperjs","value":{"rev":"19-e2182c72ea24b8c40e12b0c1027eb60d"}}, -{"id":"wikimapia","key":"wikimapia","value":{"rev":"11-8d1a314e8c827236e21e0aabc6e5efd9"}}, -{"id":"wikiminute","key":"wikiminute","value":{"rev":"11-d031a2c7d41bcecb52ac9c7bb5e75e8e"}}, -{"id":"wikiwym","key":"wikiwym","value":{"rev":"3-c0fd4c9b6b93b3a8b14021c2ebae5b0c"}}, -{"id":"wiky","key":"wiky","value":{"rev":"6-be49acce152652e9219a32da1dfd01ea"}}, -{"id":"wildfile","key":"wildfile","value":{"rev":"9-16a05032f890f07c72a5f48c3a6ffbc0"}}, -{"id":"willful.js","key":"willful.js","value":{"rev":"3-3bb957b0a5fc1b4b6c15bace7e8f5902"}}, -{"id":"wilson","key":"wilson","value":{"rev":"14-d4bf88484f1b1cf86b07f4b74f26991d"}}, -{"id":"window","key":"window","value":{"rev":"3-ea84e74fd5556ff662ff47f40522cfa2"}}, -{"id":"windshaft","key":"windshaft","value":{"rev":"21-1d31e4eb7482d15b97c919a4b051ea9c"}}, -{"id":"windtunnel","key":"windtunnel","value":{"rev":"5-0d2ef7faed1b221a3eaa581480adad64"}}, -{"id":"wingrr","key":"wingrr","value":{"rev":"9-a599fad3e0c74895aa266c61805b76cb"}}, -{"id":"wings","key":"wings","value":{"rev":"3-cfcfd262d905cd3be1d1bae82fafd9f0"}}, -{"id":"winston","key":"winston","value":{"rev":"111-13acba5a9ba6d4f19469acb4122d72ea"}}, -{"id":"winston-amqp","key":"winston-amqp","value":{"rev":"5-61408e1dde45f974a995dd27905b8831"}}, -{"id":"winston-mongodb","key":"winston-mongodb","value":{"rev":"9-ae755237a8faa8f5a0b92029c236691a"}}, -{"id":"winston-redis","key":"winston-redis","value":{"rev":"3-1fb861edc109ed5cbd735320124ba103"}}, -{"id":"winston-riak","key":"winston-riak","value":{"rev":"15-3f2923a73386524d851244ace1bece98"}}, -{"id":"winston-syslog","key":"winston-syslog","value":{"rev":"9-7f256bd63aebec19edea47f80de21dfd"}}, -{"id":"winstoon","key":"winstoon","value":{"rev":"9-d719ca7abfeeaa468d1b431c24836089"}}, -{"id":"wirez","key":"wirez","value":{"rev":"5-5c5d0768485ed11c2b80a8a6a3699c39"}}, -{"id":"wobot","key":"wobot","value":{"rev":"9-176ed86fd9d94a7e94efb782c7512533"}}, -{"id":"word-generator","key":"word-generator","value":{"rev":"5-a2c67f11474a8925eb67f04369ac068a"}}, -{"id":"wordnik","key":"wordnik","value":{"rev":"3-4e371fbf7063ced50bbe726079fda1ec"}}, -{"id":"wordpress-auth","key":"wordpress-auth","value":{"rev":"5-05eef01542e00a88418d2885efb4c9ad"}}, -{"id":"wordwrap","key":"wordwrap","value":{"rev":"5-a728ce2cdeab69b71d40fe7c1c41d7c1"}}, -{"id":"wordy","key":"wordy","value":{"rev":"3-bc220ca3dbd008aee932c551cfbdcc6b"}}, -{"id":"worker","key":"worker","value":{"rev":"6-3b03aa764c9fac66ec5c1773e9abc43b"}}, -{"id":"worker-pool","key":"worker-pool","value":{"rev":"3-e3550e704b48f5799a4cc02af7d27355"}}, -{"id":"workflow","key":"workflow","value":{"rev":"3-817c6c77cbb2f332ea9bdddf3b565c00"}}, -{"id":"workhorse","key":"workhorse","value":{"rev":"30-c39ae2ddd867a137073a289c1709f229"}}, -{"id":"world-db","key":"world-db","value":{"rev":"6-eaef1beb6abbebd3e903a28a7f46aa81"}}, -{"id":"worm","key":"worm","value":{"rev":"7-00db15dc9cfd48777cce32fb93e1df6b"}}, -{"id":"wormhole","key":"wormhole","value":{"rev":"37-21e2db062666040c477a7042fc2ffc9d"}}, -{"id":"wrap","key":"wrap","value":{"rev":"3-aded14c091b730813bd24d92cae45cd6"}}, -{"id":"wrench","key":"wrench","value":{"rev":"12-57d3da63e34e59e1f5d1b3bde471e31f"}}, -{"id":"wsclient","key":"wsclient","value":{"rev":"17-f962faf4f6c9d4eda9111e90b2d0735d"}}, -{"id":"wscomm","key":"wscomm","value":{"rev":"47-80affda45da523e57c87b8d43ef73ec9"}}, -{"id":"wsscraper","key":"wsscraper","value":{"rev":"3-94a84fe9b3df46b8d6ad4851e389dae1"}}, -{"id":"wu","key":"wu","value":{"rev":"4-f307d3a00e7a1212b7949bcb96161088"}}, -{"id":"wunderapi","key":"wunderapi","value":{"rev":"17-31e3b991e97931022992b97f9441b9af"}}, -{"id":"wurfl-client","key":"wurfl-client","value":{"rev":"3-a8c3e454d6d9c9b23b7290eb64866e80"}}, -{"id":"wwwdude","key":"wwwdude","value":{"rev":"19-eb8192461b8864af59740f9b44e168ca"}}, -{"id":"x","key":"x","value":{"rev":"9-10403358980aba239b7a9af78175589d"}}, -{"id":"x-core","key":"x-core","value":{"rev":"13-f04b063855da231539d1945a35802d9e"}}, -{"id":"x11","key":"x11","value":{"rev":"5-e5b1435c0aa29207c90fdeaa87570bb7"}}, -{"id":"xappy-async_testing","key":"xappy-async_testing","value":{"rev":"3-747c934540267492b0e6d3bb6d65964c"}}, -{"id":"xappy-pg","key":"xappy-pg","value":{"rev":"4-119e8f93af1e4976900441ec5e3bb0b9"}}, -{"id":"xcbjs","key":"xcbjs","value":{"rev":"3-095a693f9ac7b4e2c319f79d95eb3e95"}}, -{"id":"xemplar","key":"xemplar","value":{"rev":"9-2ccde68ffac8e66aa8013b98d82ff20c"}}, -{"id":"xfer","key":"xfer","value":{"rev":"3-c1875506ed132c6a2b5e7d7eaff9df14"}}, -{"id":"xjs","key":"xjs","value":{"rev":"11-05d5cd002298894ed582a9f5bff5a762"}}, -{"id":"xjst","key":"xjst","value":{"rev":"11-68774970fc7f413ff620fb0d50d8a1d9"}}, -{"id":"xkcdbot","key":"xkcdbot","value":{"rev":"3-7cc9affb442c9ae4c7a109a0b72c2600"}}, -{"id":"xml","key":"xml","value":{"rev":"12-0d1a69f11767de47bfc4a0fce566e36e"}}, -{"id":"xml-markup","key":"xml-markup","value":{"rev":"6-100a92d1f7fe9444e285365dce8203de"}}, -{"id":"xml-simple","key":"xml-simple","value":{"rev":"3-d60e388df5b65128a5e000381643dd31"}}, -{"id":"xml-stream","key":"xml-stream","value":{"rev":"13-44d6ee47e00c91735e908e69c5dffc6b"}}, -{"id":"xml2js","key":"xml2js","value":{"rev":"27-434297bcd9db7628c57fcc9bbbe2671e"}}, -{"id":"xml2js-expat","key":"xml2js-expat","value":{"rev":"15-a8c5c0ba64584d07ed94c0a14dc55fe8"}}, -{"id":"xml2json","key":"xml2json","value":{"rev":"17-fa740417285834be1aa4d95e1ed6d9b9"}}, -{"id":"xmlbuilder","key":"xmlbuilder","value":{"rev":"32-63e3be32dda07c6e998866cddd8a879e"}}, -{"id":"xmlhttprequest","key":"xmlhttprequest","value":{"rev":"9-570fba8bfd5b0958c258cee7309c4b54"}}, -{"id":"xmlrpc","key":"xmlrpc","value":{"rev":"15-ae062e34a965e7543d4fd7b6c3f29cb7"}}, -{"id":"xmpp-client","key":"xmpp-client","value":{"rev":"6-2d123b4666b5deda71f071295cfca793"}}, -{"id":"xmpp-muc","key":"xmpp-muc","value":{"rev":"6-d95b8bca67f406a281a27aa4d89f6f46"}}, -{"id":"xmpp-server","key":"xmpp-server","value":{"rev":"9-44374bc3398cc74f2a36ff973fa0d35f"}}, -{"id":"xp","key":"xp","value":{"rev":"7-781a5e1da74332f25c441f627cd0b4ea"}}, -{"id":"xregexp","key":"xregexp","value":{"rev":"3-c34025fdeb13c18389e737a4b3d4ddf7"}}, -{"id":"xsd","key":"xsd","value":{"rev":"5-566590ccb8923453175a3f1f3b6cbf24"}}, -{"id":"ya-csv","key":"ya-csv","value":{"rev":"28-d485b812914b3c3f5d7e9c4bcee0c3ea"}}, -{"id":"yabble","key":"yabble","value":{"rev":"5-5370a53003a122fe40a16ed2b0e5cead"}}, -{"id":"yaconfig","key":"yaconfig","value":{"rev":"3-f82a452260b010cc5128818741c46017"}}, -{"id":"yah","key":"yah","value":{"rev":"3-cfc0c10f85a9e3076247ca350077e90f"}}, -{"id":"yajet","key":"yajet","value":{"rev":"5-6f7f24335436c84081adf0bbb020b151"}}, -{"id":"yajl","key":"yajl","value":{"rev":"3-8ac011e5a00368aad8d58d95a64c7254"}}, -{"id":"yaml","key":"yaml","value":{"rev":"16-732e5cb6dc10eefeb7dae959e677fb5b"}}, -{"id":"yaml-config","key":"yaml-config","value":{"rev":"3-fb817000005d48526a106ecda5ac5435"}}, -{"id":"yamlish","key":"yamlish","value":{"rev":"3-604fb4f1de9d5aa5ed48432c7db4a8a1"}}, -{"id":"yamlparser","key":"yamlparser","value":{"rev":"13-130a82262c7f742c2a1e26fc58983503"}}, -{"id":"yammer-js","key":"yammer-js","value":{"rev":"3-16ec240ab0b26fa9f0513ada8c769c1f"}}, -{"id":"yanc","key":"yanc","value":{"rev":"15-33d713f0dee42efe8306e6b2a43fe336"}}, -{"id":"yanlibs","key":"yanlibs","value":{"rev":"3-e481217d43b9f79b80e22538eabadabc"}}, -{"id":"yanop","key":"yanop","value":{"rev":"5-6c407ce6f1c18b6bac37ad5945ff8fed"}}, -{"id":"yanx","key":"yanx","value":{"rev":"6-f4c4d255526eaa922baa498f37d38fe0"}}, -{"id":"yasession","key":"yasession","value":{"rev":"7-6e2598123d41b33535b88e99eb87828f"}}, -{"id":"yelp","key":"yelp","value":{"rev":"3-5c769f488a65addba313ff3b6256c365"}}, -{"id":"yeti","key":"yeti","value":{"rev":"50-65338f573ed8f799ec9b1c9bd2643e34"}}, -{"id":"youtube","key":"youtube","value":{"rev":"7-5020698499af8946e9578864a21f6ac5"}}, -{"id":"youtube-dl","key":"youtube-dl","value":{"rev":"76-a42f09b7bf87e7e6157d5d9835cca8a7"}}, -{"id":"youtube-js","key":"youtube-js","value":{"rev":"5-e2d798a185490ad98cb57c2641c4658e"}}, -{"id":"yproject","key":"yproject","value":{"rev":"7-70cb1624de9e8321c67f1f348dc80ff4"}}, -{"id":"yql","key":"yql","value":{"rev":"18-d19123b254abfb097648c4a242513fd3"}}, -{"id":"yubico","key":"yubico","value":{"rev":"9-0e2bd84479a68e1f12c89800a4049053"}}, -{"id":"yui-cli","key":"yui-cli","value":{"rev":"7-0186f7278da8734861109799b9123197"}}, -{"id":"yui-compressor","key":"yui-compressor","value":{"rev":"12-5804d78bb24bb2d3555ca2e28ecc6b70"}}, -{"id":"yui-repl","key":"yui-repl","value":{"rev":"25-9b202e835a46a07be931e6529a4ccb61"}}, -{"id":"yui3","key":"yui3","value":{"rev":"93-4decc441f19acf0ab5abd1a81e3cbb40"}}, -{"id":"yui3-2in3","key":"yui3-2in3","value":{"rev":"10-dc0429fe818aceeca80d075613c9547a"}}, -{"id":"yui3-bare","key":"yui3-bare","value":{"rev":"33-60779e2088efe782b437ecc053c01e2f"}}, -{"id":"yui3-base","key":"yui3-base","value":{"rev":"33-89017bb5dfde621fc7d179f2939e3d1b"}}, -{"id":"yui3-core","key":"yui3-core","value":{"rev":"17-3759fa0072e24f4bb29e22144cb3dda3"}}, -{"id":"yui3-gallery","key":"yui3-gallery","value":{"rev":"38-9ce6f7a60b2f815337767249d1827951"}}, -{"id":"yui3-mocha","key":"yui3-mocha","value":{"rev":"3-83ff9c42a37f63de0c132ce6cb1ad282"}}, -{"id":"yuitest","key":"yuitest","value":{"rev":"17-b5dd4ad4e82b6b310d7a6e9103570779"}}, -{"id":"zap","key":"zap","value":{"rev":"15-9b9b7c6badb0a9fd9d469934e9be12c0"}}, -{"id":"zappa","key":"zappa","value":{"rev":"26-d193767b488e778db41455924001b1fb"}}, -{"id":"zen","key":"zen","value":{"rev":"7-23a260d4379816a5c931c2e823bda1ae"}}, -{"id":"zeppelin","key":"zeppelin","value":{"rev":"7-9db2e313fe323749e259be91edcdee8e"}}, -{"id":"zeromq","key":"zeromq","value":{"rev":"24-7cb4cec19fb3a03871900ac3558fcbef"}}, -{"id":"zest","key":"zest","value":{"rev":"5-080a2a69a93d66fcaae0da7ddaa9ceab"}}, -{"id":"zest-js","key":"zest-js","value":{"rev":"5-541454063618fa3a9d6f44e0147ea622"}}, -{"id":"zip","key":"zip","value":{"rev":"11-443da314322b6a1a93b40a38124610f2"}}, -{"id":"zipfile","key":"zipfile","value":{"rev":"32-e846d29fc615e8fbc610f44653a1e085"}}, -{"id":"zipper","key":"zipper","value":{"rev":"5-cde0a4a7f03c139dcd779f3ede55bd0e"}}, -{"id":"zippy","key":"zippy","value":{"rev":"7-3906ca62dd8020e9673a7c229944bd3f"}}, -{"id":"zipwith","key":"zipwith","value":{"rev":"3-58c50c6220d6493047f8333c5db22cc9"}}, -{"id":"zlib","key":"zlib","value":{"rev":"27-e0443f2d9a0c9db31f86a6c5b9ba78ba"}}, -{"id":"zlib-sync","key":"zlib-sync","value":{"rev":"3-b17a39dd23b3455d35ffd862004ed677"}}, -{"id":"zlibcontext","key":"zlibcontext","value":{"rev":"11-1c0c6b34e87adab1b6d5ee60be6a608c"}}, -{"id":"zlibstream","key":"zlibstream","value":{"rev":"5-44e30d87de9aaaa975c64d8dcdcd1a94"}}, -{"id":"zmq","key":"zmq","value":{"rev":"7-eae5d939fcdb7be5edfb328aefeaba4e"}}, -{"id":"zo","key":"zo","value":{"rev":"5-956f084373731805e5871f4716049529"}}, -{"id":"zombie","key":"zombie","value":{"rev":"109-9eec325353a47bfcc32a94719bf147da"}}, -{"id":"zombie-https","key":"zombie-https","value":{"rev":"3-6aff25d319be319343882575acef4890"}}, -{"id":"zoneinfo","key":"zoneinfo","value":{"rev":"15-d95d2041324d961fe26a0217cf485511"}}, -{"id":"zookeeper","key":"zookeeper","value":{"rev":"11-5a5ed278a01e4b508ffa6e9a02059898"}}, -{"id":"zoom","key":"zoom","value":{"rev":"3-9d0277ad580d64c9a4d48a40d22976f0"}}, -{"id":"zsock","key":"zsock","value":{"rev":"16-4f975b91f0f9c2d2a2501e362401c368"}}, -{"id":"zutil","key":"zutil","value":{"rev":"9-3e7bc6520008b4fcd5ee6eb9e8e5adf5"}} -]} diff --git a/node_modules/browserify-incremental/node_modules/JSONStream/test/fixtures/depth.json b/node_modules/browserify-incremental/node_modules/JSONStream/test/fixtures/depth.json deleted file mode 100644 index 868062f3..00000000 --- a/node_modules/browserify-incremental/node_modules/JSONStream/test/fixtures/depth.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "total": 5, - "docs": [ - { - "key": { - "value": 0, - "some": "property" - } - }, - {"value": 1}, - {"value": 2}, - {"blbl": [{}, {"a":0, "b":1, "value":3}, 10]}, - {"value": 4} - ] -} \ No newline at end of file diff --git a/node_modules/browserify-incremental/node_modules/JSONStream/test/fn.js b/node_modules/browserify-incremental/node_modules/JSONStream/test/fn.js deleted file mode 100644 index 4acc6726..00000000 --- a/node_modules/browserify-incremental/node_modules/JSONStream/test/fn.js +++ /dev/null @@ -1,39 +0,0 @@ - - -var fs = require ('fs') - , join = require('path').join - , file = join(__dirname, 'fixtures','all_npm.json') - , JSONStream = require('../') - , it = require('it-is') - -function fn (s) { - return !isNaN(parseInt(s, 10)) -} - -var expected = JSON.parse(fs.readFileSync(file)) - , parser = JSONStream.parse(['rows', fn]) - , called = 0 - , ended = false - , parsed = [] - -fs.createReadStream(file).pipe(parser) - -parser.on('data', function (data) { - called ++ - it.has({ - id: it.typeof('string'), - value: {rev: it.typeof('string')}, - key:it.typeof('string') - }) - parsed.push(data) -}) - -parser.on('end', function () { - ended = true -}) - -process.on('exit', function () { - it(called).equal(expected.rows.length) - it(parsed).deepEqual(expected.rows) - console.error('PASSED') -}) diff --git a/node_modules/browserify-incremental/node_modules/JSONStream/test/gen.js b/node_modules/browserify-incremental/node_modules/JSONStream/test/gen.js deleted file mode 100644 index c233722a..00000000 --- a/node_modules/browserify-incremental/node_modules/JSONStream/test/gen.js +++ /dev/null @@ -1,135 +0,0 @@ -return // dont run this test for now since tape is weird and broken on 0.10 - -var fs = require('fs') -var JSONStream = require('../') -var file = process.argv[2] || '/tmp/JSONStream-test-large.json' -var size = Number(process.argv[3] || 100000) -var tape = require('tape') -// if (process.title !== 'browser') { - tape('out of mem', function (t) { - t.plan(1) - ////////////////////////////////////////////////////// - // Produces a random number between arg1 and arg2 - ////////////////////////////////////////////////////// - var randomNumber = function (min, max) { - var number = Math.floor(Math.random() * (max - min + 1) + min); - return number; - }; - - ////////////////////////////////////////////////////// - // Produces a random string of a length between arg1 and arg2 - ////////////////////////////////////////////////////// - var randomString = function (min, max) { - - // add several spaces to increase chanses of creating 'words' - var chars = ' 0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'; - var result = ''; - - var randomLength = randomNumber(min, max); - - for (var i = randomLength; i > 0; --i) { - result += chars[Math.round(Math.random() * (chars.length - 1))]; - } - return result; - }; - - ////////////////////////////////////////////////////// - // Produces a random JSON document, as a string - ////////////////////////////////////////////////////// - var randomJsonDoc = function () { - - var doc = { - "CrashOccurenceID": randomNumber(10000, 50000), - "CrashID": randomNumber(1000, 10000), - "SiteName": randomString(10, 25), - "MachineName": randomString(10, 25), - "Date": randomString(26, 26), - "ProcessDuration": randomString(18, 18), - "ThreadIdentityName": null, - "WindowsIdentityName": randomString(15, 40), - "OperatingSystemName": randomString(35, 65), - "DetailedExceptionInformation": randomString(100, 800) - }; - - doc = JSON.stringify(doc); - doc = doc.replace(/\,/g, ',\n'); // add new lines after each attribute - return doc; - }; - - ////////////////////////////////////////////////////// - // generates test data - ////////////////////////////////////////////////////// - var generateTestData = function (cb) { - - console.log('generating large data file...'); - - var stream = fs.createWriteStream(file, { - encoding: 'utf8' - }); - - var i = 0; - var max = size; - var writing = false - var split = ',\n'; - var doc = randomJsonDoc(); - stream.write('['); - - function write () { - if(writing) return - writing = true - while(++i < max) { - if(Math.random() < 0.001) - console.log('generate..', i + ' / ' + size) - if(!stream.write(doc + split)) { - writing = false - return stream.once('drain', write) - } - } - stream.write(doc + ']') - stream.end(); - console.log('END') - } - write() - stream.on('close', cb) - }; - - ////////////////////////////////////////////////////// - // Shows that parsing 100000 instances using JSONStream fails - // - // After several seconds, you will get this crash - // FATAL ERROR: JS Allocation failed - process out of memory - ////////////////////////////////////////////////////// - var testJSONStreamParse_causesOutOfMem = function (done) { - var items = 0 - console.log('parsing data files using JSONStream...'); - - var parser = JSONStream.parse([true]); - var stream = fs.createReadStream(file); - stream.pipe(parser); - - parser.on('data', function (data) { - items++ - if(Math.random() < 0.01) console.log(items, '...') - }); - - parser.on('end', function () { - t.equal(items, size) - }); - - }; - - ////////////////////////////////////////////////////// - // main - ////////////////////////////////////////////////////// - - fs.stat(file, function (err, stat) { - console.log(stat) - if(err) - generateTestData(testJSONStreamParse_causesOutOfMem); - else - testJSONStreamParse_causesOutOfMem() - }) - - }) - -// } diff --git a/node_modules/browserify-incremental/node_modules/JSONStream/test/map.js b/node_modules/browserify-incremental/node_modules/JSONStream/test/map.js deleted file mode 100644 index 29b9d896..00000000 --- a/node_modules/browserify-incremental/node_modules/JSONStream/test/map.js +++ /dev/null @@ -1,40 +0,0 @@ - -var test = require('tape') - -var JSONStream = require('../') - -test('map function', function (t) { - - var actual = [] - - stream = JSONStream.parse([true], function (e) { return e*10 }) - stream.on('data', function (v) { actual.push(v)}) - stream.on('end', function () { - t.deepEqual(actual, [10,20,30,40,50,60]) - t.end() - - }) - - stream.write(JSON.stringify([1,2,3,4,5,6], null, 2)) - stream.end() - -}) - -test('filter function', function (t) { - - var actual = [] - - stream = JSONStream - .parse([true], function (e) { return e%2 ? e : null}) - .on('data', function (v) { actual.push(v)}) - .on('end', function () { - t.deepEqual(actual, [1,3,5]) - t.end() - - }) - - stream.write(JSON.stringify([1,2,3,4,5,6], null, 2)) - stream.end() - -}) - diff --git a/node_modules/browserify-incremental/node_modules/JSONStream/test/multiple_objects.js b/node_modules/browserify-incremental/node_modules/JSONStream/test/multiple_objects.js deleted file mode 100644 index b1c8f91b..00000000 --- a/node_modules/browserify-incremental/node_modules/JSONStream/test/multiple_objects.js +++ /dev/null @@ -1,42 +0,0 @@ -var fs = require ('fs'); -var net = require('net'); -var join = require('path').join; -var file = join(__dirname, 'fixtures','all_npm.json'); -var it = require('it-is'); -var JSONStream = require('../'); - -var str = fs.readFileSync(file); - -var datas = {} - -var server = net.createServer(function(client) { - var root_calls = 0; - var data_calls = 0; - var parser = JSONStream.parse(['rows', true, 'key']); - parser.on('root', function(root, count) { - ++ root_calls; - }); - - parser.on('data', function(data) { - ++ data_calls; - datas[data] = (datas[data] || 0) + 1 - it(data).typeof('string') - }); - - parser.on('end', function() { - console.log('END') - var min = Infinity - for (var d in datas) - min = min > datas[d] ? datas[d] : min - it(root_calls).equal(3); - it(min).equal(3); - server.close(); - }); - client.pipe(parser); -}); -server.listen(9999); - -var client = net.connect({ port : 9999 }, function() { - var msgs = str + ' ' + str + '\n\n' + str - client.end(msgs); -}); diff --git a/node_modules/browserify-incremental/node_modules/JSONStream/test/multiple_objects_error.js b/node_modules/browserify-incremental/node_modules/JSONStream/test/multiple_objects_error.js deleted file mode 100644 index 980423b6..00000000 --- a/node_modules/browserify-incremental/node_modules/JSONStream/test/multiple_objects_error.js +++ /dev/null @@ -1,35 +0,0 @@ -var fs = require ('fs'); -var net = require('net'); -var join = require('path').join; -var file = join(__dirname, 'fixtures','all_npm.json'); -var it = require('it-is'); -var JSONStream = require('../'); - -var str = fs.readFileSync(file); - -var server = net.createServer(function(client) { - var root_calls = 0; - var data_calls = 0; - var parser = JSONStream.parse(); - parser.on('root', function(root, count) { - ++ root_calls; - it(root_calls).notEqual(2); - }); - - parser.on('error', function(err) { - console.log(err); - server.close(); - }); - - parser.on('end', function() { - console.log('END'); - server.close(); - }); - client.pipe(parser); -}); -server.listen(9999); - -var client = net.connect({ port : 9999 }, function() { - var msgs = str + '}'; - client.end(msgs); -}); diff --git a/node_modules/browserify-incremental/node_modules/JSONStream/test/non_object_roots.js b/node_modules/browserify-incremental/node_modules/JSONStream/test/non_object_roots.js deleted file mode 100644 index 8055ad66..00000000 --- a/node_modules/browserify-incremental/node_modules/JSONStream/test/non_object_roots.js +++ /dev/null @@ -1,16 +0,0 @@ -var JSONStream = require('../'); -var it = require('it-is'); -var parser = JSONStream.parse(); - -var succeeded = false; - -parser.on('root', function (value) { - it(value).equal(true); - succeeded = true; -}); - -parser.on('end', function() { - it(succeeded).equal(true); -}); - -parser.end('true'); diff --git a/node_modules/browserify-incremental/node_modules/JSONStream/test/null.js b/node_modules/browserify-incremental/node_modules/JSONStream/test/null.js deleted file mode 100644 index 95dd60c0..00000000 --- a/node_modules/browserify-incremental/node_modules/JSONStream/test/null.js +++ /dev/null @@ -1,28 +0,0 @@ -var JSONStream = require('../') - -var data = [ - {ID: 1, optional: null}, - {ID: 2, optional: null}, - {ID: 3, optional: 20}, - {ID: 4, optional: null}, - {ID: 5, optional: 'hello'}, - {ID: 6, optional: null} -] - - -var test = require('tape') - -test ('null properties', function (t) { - var actual = [] - var stream = - - JSONStream.parse('*.optional') - .on('data', function (v) { actual.push(v) }) - .on('end', function () { - t.deepEqual(actual, [20, 'hello']) - t.end() - }) - - stream.write(JSON.stringify(data, null, 2)) - stream.end() -}) diff --git a/node_modules/browserify-incremental/node_modules/JSONStream/test/parsejson.js b/node_modules/browserify-incremental/node_modules/JSONStream/test/parsejson.js deleted file mode 100644 index 02798871..00000000 --- a/node_modules/browserify-incremental/node_modules/JSONStream/test/parsejson.js +++ /dev/null @@ -1,28 +0,0 @@ - - -/* - sometimes jsonparse changes numbers slightly. -*/ - -var r = Math.random() - , Parser = require('jsonparse') - , p = new Parser() - , assert = require('assert') - , times = 20 -while (times --) { - - assert.equal(JSON.parse(JSON.stringify(r)), r, 'core JSON') - - p.onValue = function (v) { - console.error('parsed', v) - assert.equal( - String(v).slice(0,12), - String(r).slice(0,12) - ) - } - console.error('correct', r) - p.write (new Buffer(JSON.stringify([r]))) - - - -} diff --git a/node_modules/browserify-incremental/node_modules/JSONStream/test/stringify.js b/node_modules/browserify-incremental/node_modules/JSONStream/test/stringify.js deleted file mode 100644 index b6de85ed..00000000 --- a/node_modules/browserify-incremental/node_modules/JSONStream/test/stringify.js +++ /dev/null @@ -1,41 +0,0 @@ - -var fs = require ('fs') - , join = require('path').join - , file = join(__dirname, 'fixtures','all_npm.json') - , JSONStream = require('../') - , it = require('it-is').style('colour') - - function randomObj () { - return ( - Math.random () < 0.4 - ? {hello: 'eonuhckmqjk', - whatever: 236515, - lies: true, - nothing: [null], - stuff: [Math.random(),Math.random(),Math.random()] - } - : ['AOREC', 'reoubaor', {ouec: 62642}, [[[], {}, 53]]] - ) - } - -var expected = [] - , stringify = JSONStream.stringify() - , es = require('event-stream') - , stringified = '' - , called = 0 - , count = 10 - , ended = false - -while (count --) - expected.push(randomObj()) - - es.connect( - es.readArray(expected), - stringify, - //JSONStream.parse([/./]), - es.writeArray(function (err, lines) { - - it(JSON.parse(lines.join(''))).deepEqual(expected) - console.error('PASSED') - }) - ) diff --git a/node_modules/browserify-incremental/node_modules/JSONStream/test/stringify_object.js b/node_modules/browserify-incremental/node_modules/JSONStream/test/stringify_object.js deleted file mode 100644 index 9490115a..00000000 --- a/node_modules/browserify-incremental/node_modules/JSONStream/test/stringify_object.js +++ /dev/null @@ -1,47 +0,0 @@ - -var fs = require ('fs') - , join = require('path').join - , file = join(__dirname, 'fixtures','all_npm.json') - , JSONStream = require('../') - , it = require('it-is').style('colour') - , es = require('event-stream') - , pending = 10 - , passed = true - - function randomObj () { - return ( - Math.random () < 0.4 - ? {hello: 'eonuhckmqjk', - whatever: 236515, - lies: true, - nothing: [null], - stuff: [Math.random(),Math.random(),Math.random()] - } - : ['AOREC', 'reoubaor', {ouec: 62642}, [[[], {}, 53]]] - ) - } - -for (var ix = 0; ix < pending; ix++) (function (count) { - var expected = {} - , stringify = JSONStream.stringifyObject() - - es.connect( - stringify, - es.writeArray(function (err, lines) { - it(JSON.parse(lines.join(''))).deepEqual(expected) - if (--pending === 0) { - console.error('PASSED') - } - }) - ) - - while (count --) { - var key = Math.random().toString(16).slice(2) - expected[key] = randomObj() - stringify.write([ key, expected[key] ]) - } - - process.nextTick(function () { - stringify.end() - }) -})(ix) diff --git a/node_modules/browserify-incremental/node_modules/JSONStream/test/test.js b/node_modules/browserify-incremental/node_modules/JSONStream/test/test.js deleted file mode 100644 index 8ea7c2e1..00000000 --- a/node_modules/browserify-incremental/node_modules/JSONStream/test/test.js +++ /dev/null @@ -1,35 +0,0 @@ - - -var fs = require ('fs') - , join = require('path').join - , file = join(__dirname, 'fixtures','all_npm.json') - , JSONStream = require('../') - , it = require('it-is') - -var expected = JSON.parse(fs.readFileSync(file)) - , parser = JSONStream.parse(['rows', /\d+/ /*, 'value'*/]) - , called = 0 - , ended = false - , parsed = [] - -fs.createReadStream(file).pipe(parser) - -parser.on('data', function (data) { - called ++ - it.has({ - id: it.typeof('string'), - value: {rev: it.typeof('string')}, - key:it.typeof('string') - }) - parsed.push(data) -}) - -parser.on('end', function () { - ended = true -}) - -process.on('exit', function () { - it(called).equal(expected.rows.length) - it(parsed).deepEqual(expected.rows) - console.error('PASSED') -}) diff --git a/node_modules/browserify-incremental/node_modules/JSONStream/test/test2.js b/node_modules/browserify-incremental/node_modules/JSONStream/test/test2.js deleted file mode 100644 index d09df7be..00000000 --- a/node_modules/browserify-incremental/node_modules/JSONStream/test/test2.js +++ /dev/null @@ -1,29 +0,0 @@ - - -var fs = require ('fs') - , join = require('path').join - , file = join(__dirname, '..','package.json') - , JSONStream = require('../') - , it = require('it-is') - -var expected = JSON.parse(fs.readFileSync(file)) - , parser = JSONStream.parse([]) - , called = 0 - , ended = false - , parsed = [] - -fs.createReadStream(file).pipe(parser) - -parser.on('data', function (data) { - called ++ - it(data).deepEqual(expected) -}) - -parser.on('end', function () { - ended = true -}) - -process.on('exit', function () { - it(called).equal(1) - console.error('PASSED') -}) \ No newline at end of file diff --git a/node_modules/browserify-incremental/node_modules/JSONStream/test/two-ways.js b/node_modules/browserify-incremental/node_modules/JSONStream/test/two-ways.js deleted file mode 100644 index 8f3b89c8..00000000 --- a/node_modules/browserify-incremental/node_modules/JSONStream/test/two-ways.js +++ /dev/null @@ -1,41 +0,0 @@ - -var fs = require ('fs') - , join = require('path').join - , file = join(__dirname, 'fixtures','all_npm.json') - , JSONStream = require('../') - , it = require('it-is').style('colour') - - function randomObj () { - return ( - Math.random () < 0.4 - ? {hello: 'eonuhckmqjk', - whatever: 236515, - lies: true, - nothing: [null], -// stuff: [Math.random(),Math.random(),Math.random()] - } - : ['AOREC', 'reoubaor', {ouec: 62642}, [[[], {}, 53]]] - ) - } - -var expected = [] - , stringify = JSONStream.stringify() - , es = require('event-stream') - , stringified = '' - , called = 0 - , count = 10 - , ended = false - -while (count --) - expected.push(randomObj()) - - es.connect( - es.readArray(expected), - stringify, - JSONStream.parse([/./]), - es.writeArray(function (err, lines) { - - it(lines).has(expected) - console.error('PASSED') - }) - ) diff --git a/node_modules/browserify-incremental/node_modules/browserify-cache-api/.eslintignore b/node_modules/browserify-incremental/node_modules/browserify-cache-api/.eslintignore deleted file mode 100644 index d36310f2..00000000 --- a/node_modules/browserify-incremental/node_modules/browserify-cache-api/.eslintignore +++ /dev/null @@ -1,2 +0,0 @@ -example/output/ -example/test-module/ \ No newline at end of file diff --git a/node_modules/browserify-incremental/node_modules/browserify-cache-api/.eslintrc.js b/node_modules/browserify-incremental/node_modules/browserify-cache-api/.eslintrc.js deleted file mode 100644 index 8a415150..00000000 --- a/node_modules/browserify-incremental/node_modules/browserify-cache-api/.eslintrc.js +++ /dev/null @@ -1,41 +0,0 @@ -module.exports = { - extends: "eslint:recommended", - parserOptions: { - ecmaVersion: 6, - sourceType: "module", - }, - env: { - node: true, - }, - rules: { - "no-console": 0, - // style - "semi": 2, - "no-extra-semi": 2, - "no-multi-spaces": 2, - "array-bracket-spacing": 2, - "block-spacing": 2, - "comma-spacing": 2, - "comma-dangle": [2, "always-multiline"], - "computed-property-spacing": 2, - "eol-last": 2, - "indent": [2, 2], - "keyword-spacing": 2, - "linebreak-style": 2, - "no-spaced-func": 2, - "no-trailing-spaces": 2, - "object-curly-spacing": 2, - "quotes": [2, "single", "avoid-escape"], - "semi": 2, - "semi-spacing": 2, - "space-before-blocks": 2, - "space-before-function-paren": [2, "never"], - "space-in-parens": 2, - "space-infix-ops": 2, - "space-unary-ops": 2, - "arrow-spacing": 2, - "generator-star-spacing": 2, - "template-curly-spacing": 2, - "yield-star-spacing": 2, - } -}; diff --git a/node_modules/browserify-incremental/node_modules/browserify-cache-api/.npmignore b/node_modules/browserify-incremental/node_modules/browserify-cache-api/.npmignore deleted file mode 100644 index 161a07e9..00000000 --- a/node_modules/browserify-incremental/node_modules/browserify-cache-api/.npmignore +++ /dev/null @@ -1,3 +0,0 @@ -example -support -test diff --git a/node_modules/browserify-incremental/node_modules/browserify-cache-api/.travis.yml b/node_modules/browserify-incremental/node_modules/browserify-cache-api/.travis.yml deleted file mode 100644 index 36b3e92f..00000000 --- a/node_modules/browserify-incremental/node_modules/browserify-cache-api/.travis.yml +++ /dev/null @@ -1,3 +0,0 @@ -language: node_js -node_js: - - "4.2" \ No newline at end of file diff --git a/node_modules/browserify-incremental/node_modules/browserify-cache-api/CONTRIBUTING.md b/node_modules/browserify-incremental/node_modules/browserify-cache-api/CONTRIBUTING.md deleted file mode 100644 index ea1590ff..00000000 --- a/node_modules/browserify-incremental/node_modules/browserify-cache-api/CONTRIBUTING.md +++ /dev/null @@ -1,9 +0,0 @@ -# Contributor Guidelines - -This project has automated tests which can be run with `npm test`. This will be -run in Travis CI when you make a Pull Request so please try to ensure that they -are passing when submitting one. - -The source code of this project is also checked for coding errors and code style -consistency using ESLint. You can run it with `npm run lint` to see any errors, -and you can automatically fix some coding style errors using `npm run lint-fix`. diff --git a/node_modules/browserify-incremental/node_modules/browserify-cache-api/README.md b/node_modules/browserify-incremental/node_modules/browserify-cache-api/README.md deleted file mode 100644 index dfe67a0d..00000000 --- a/node_modules/browserify-incremental/node_modules/browserify-cache-api/README.md +++ /dev/null @@ -1,26 +0,0 @@ -# browserify-cache-api - -Attaches per-module caching of module resolution and transformation to a browserify instance. - -Caches to a file on disk, invalidated by source file modification time. - -Used by [browserify-incremental](https://github.com/jsdf/browserify-incremental) - -```js - // create a browserify instance - var b = browserify({ - // cache and packageCache opts are required - cache: {}, - packageCache: {}, - // and then your opts... - }); - - // attach caching, specifying a location to store the cache file - browserifyCache(b, {cacheFile: './tmp/browserify-cache.json'}); - - // browserify module resolution + transformation is now cached -``` - -## Contributing - -Please see the [Contributor Guidelines](CONTRIBUTING.md). diff --git a/node_modules/browserify-incremental/node_modules/browserify-cache-api/index.js b/node_modules/browserify-incremental/node_modules/browserify-cache-api/index.js deleted file mode 100644 index 79b5e9b0..00000000 --- a/node_modules/browserify-incremental/node_modules/browserify-cache-api/index.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('./lib/BrowserifyCache'); diff --git a/node_modules/browserify-incremental/node_modules/browserify-cache-api/lib/BrowserifyCache.js b/node_modules/browserify-incremental/node_modules/browserify-cache-api/lib/BrowserifyCache.js deleted file mode 100644 index 3ce6fdcc..00000000 --- a/node_modules/browserify-incremental/node_modules/browserify-cache-api/lib/BrowserifyCache.js +++ /dev/null @@ -1,222 +0,0 @@ -var fs = require('fs'); -var assert = require('assert'); -var through = require('through2'); -var assign = require('xtend/mutable'); - -var assertExists = require('./assertExists'); -var proxyEvent = require('./proxyEvent'); -var Cache = require('./Cache'); -var invalidateCache = require('./invalidateCache'); -var invalidateDependentFiles = require('./invalidateDependentFiles'); - -function BrowserifyCache(b, opts) { - assertExists(b); - opts = opts || {}; - - if (BrowserifyCache.getCache(b)) return b; // already attached - - // certain opts must have been set when browserify instance was created - assert(b._options.cache, "required browserify 'cache' opt not set"); - - // load cache from file specified by cacheFile opt - var cacheFile = opts.cacheFile || opts.cachefile || b._options && b._options.cacheFile || null; - var cacheData = loadCacheData(b, cacheFile); - - // b._options.cache is a shared object into which loaded module cache is merged. - // it will be reused for each build, and mutated when the cache is invalidated. - assign(b._options.cache, cacheData.modules); - cacheData.modules = b._options.cache; - - var cache = Cache(cacheData); - BrowserifyCache.setCache(b, cache); - - attachCacheHooksToPipeline(b); - attachCacheDiscoveryHandlers(b); - attachCachePersistHandler(b, cacheFile); - - return b; -} - -BrowserifyCache.args = { - cache: {}, - packageCache: {}, -}; - -BrowserifyCache.getCache = function(b) { - return b.__cacheObjects; -}; - -BrowserifyCache.setCache = function(b, cache) { - b.__cacheObjects = cache; -}; - -// keep track of deps which are pending for the purpose of writing cache file -// (eg. being transformed) -function addCacheBlocker(b) { - if (b.__cacheBlockerCount == null) { - b.__cacheBlockerCount = 0; - } - - b.__cacheBlockerCount++; -} - -function removeCacheBlocker(b) { - assert(b.__cacheBlockerCount >= 1); - - b.__cacheBlockerCount--; - - if (b.__cacheBlockerCount === 0) { - b.emit('_cacheReadyToWrite'); - } -} - -function attachCacheHooksToPipeline(b) { - var prevBundle = b.bundle; - b.bundle = function(cb) { - var outputStream = through.obj(); - - invalidateCacheBeforeBundling(b, function(err) { - if (err) return outputStream.emit('error', err); - - var bundleStream = prevBundle.call(b, cb); - proxyEvent(bundleStream, outputStream, 'file'); - proxyEvent(bundleStream, outputStream, 'package'); - proxyEvent(bundleStream, outputStream, 'transform'); - proxyEvent(bundleStream, outputStream, 'error'); - bundleStream.pipe(outputStream); - }); - - return outputStream; - }; -} - -function invalidateCacheBeforeBundling(b, done) { - var cache = BrowserifyCache.getCache(b); - - invalidateCache(cache.mtimes, cache.modules, function(err, invalidated, deleted) { - invalidateDependentFiles(cache, [].concat(invalidated, deleted), function(err) { - b.emit('changedDeps', invalidated, deleted); - done(err, invalidated); - }); - }); -} - -function attachCacheDiscoveryHandlers(b) { - // based on how watchify adds deps to cache - function insertDepCollector() { - b.pipeline.get('deps').push(through.obj(function(row, enc, next) { - var file = row.expose ? b._expose[row.id] : row.file; - - var dep = { - file: file, - source: row.source, - deps: assign({}, row.deps), - }; - - addCacheBlocker(b); - updateCacheOnDep(b, dep, function(err) { - if (err) b.emit('error', err); - removeCacheBlocker(b); - }); - - this.push(row); - next(); - })); - } - - b.on('reset', insertDepCollector); - insertDepCollector(); - - b.on('transform', function(transformStream, moduleFile) { - transformStream.on('file', function(dependentFile) { - addCacheBlocker(b); - updateCacheOnTransformFile(b, moduleFile, dependentFile, function(err) { - if (err) b.emit('error', err); - removeCacheBlocker(b); - }); - }); - }); -} - -function updateCacheOnDep(b, dep, done) { - var cache = BrowserifyCache.getCache(b); - - var file = dep.file || dep.id; - if (typeof file === 'string') { - if (dep.source != null) { - cache.modules[file] = dep; - if (!cache.mtimes[file]) - return updateMtime(cache.mtimes, file, done); - } else { - console.warn('missing source for dep', file); - } - } else { - console.warn('got dep missing file or string id', file); - } - done(); -} - -function updateCacheOnTransformFile(b, moduleFile, dependentFile, done) { - var cache = BrowserifyCache.getCache(b); - if (cache.dependentFiles[dependentFile] == null) { - cache.dependentFiles[dependentFile] = {}; - } - cache.dependentFiles[dependentFile][moduleFile] = true; - if (!cache.mtimes[dependentFile]) - return updateMtime(cache.mtimes, dependentFile, done); - done(); -} - -function attachCachePersistHandler(b, cacheFile) { - if (!cacheFile) return; - - b.on('bundle', function(bundleStream) { - addCacheBlocker(b); - bundleStream.on('end', function() { - removeCacheBlocker(b); - }); - // We need to wait until the cache is done being populated. - // Use .once because the `b` browserify object can be re-used for multiple - // bundles. We only want to save the cache once per bundle call. - b.once('_cacheReadyToWrite', function() { - storeCache(b, cacheFile); - }); - }); -} - -function storeCache(b, cacheFile) { - assertExists(cacheFile); - - var cache = BrowserifyCache.getCache(b); - fs.writeFile(cacheFile, JSON.stringify(cache), {encoding: 'utf8'}, function(err) { - if (err) b.emit('_cacheFileWriteError', err); - else b.emit('_cacheFileWritten', cacheFile); - }); -} - -function loadCacheData(b, cacheFile) { - var cacheData = {}; - - if (cacheFile) { - try { - cacheData = JSON.parse(fs.readFileSync(cacheFile, {encoding: 'utf8'})); - } catch (err) { - // no existing cache file - b.emit('_cacheFileReadError', err); - } - } - - return cacheData; -} - -function updateMtime(mtimes, file, done) { - assertExists(mtimes); - assertExists(file); - - fs.stat(file, function(err, stat) { - if (!err) mtimes[file] = stat.mtime.getTime(); - done(); - }); -} - -module.exports = BrowserifyCache; diff --git a/node_modules/browserify-incremental/node_modules/browserify-cache-api/lib/Cache.js b/node_modules/browserify-incremental/node_modules/browserify-cache-api/lib/Cache.js deleted file mode 100644 index 0c700dd3..00000000 --- a/node_modules/browserify-incremental/node_modules/browserify-cache-api/lib/Cache.js +++ /dev/null @@ -1,11 +0,0 @@ -function Cache(cacheData) { - var cache = cacheData || {}; - - cache.modules = cache.modules || {}; // module-deps opt 'cache' - cache.mtimes = cache.mtimes || {}; // maps cached file filepath to mtime when cached - cache.dependentFiles = cache.dependentFiles || {}; - - return cache; -} - -module.exports = Cache; diff --git a/node_modules/browserify-incremental/node_modules/browserify-cache-api/lib/assertExists.js b/node_modules/browserify-incremental/node_modules/browserify-cache-api/lib/assertExists.js deleted file mode 100644 index 1d90797b..00000000 --- a/node_modules/browserify-incremental/node_modules/browserify-cache-api/lib/assertExists.js +++ /dev/null @@ -1,7 +0,0 @@ -var assert = require('assert'); - -function assertExists(value, name) { - assert(value != null, 'missing ' + (name || 'argument')); -} - -module.exports = assertExists; diff --git a/node_modules/browserify-incremental/node_modules/browserify-cache-api/lib/invalidateCache.js b/node_modules/browserify-incremental/node_modules/browserify-cache-api/lib/invalidateCache.js deleted file mode 100644 index ef657c68..00000000 --- a/node_modules/browserify-incremental/node_modules/browserify-cache-api/lib/invalidateCache.js +++ /dev/null @@ -1,12 +0,0 @@ -var assertExists = require('./assertExists'); -var invalidateModifiedFiles = require('./invalidateModifiedFiles'); - -function invalidateCache(mtimes, cache, done) { - assertExists(mtimes); - - invalidateModifiedFiles(mtimes, Object.keys(cache), function(file) { - delete cache[file]; - }, done); -} - -module.exports = invalidateCache; diff --git a/node_modules/browserify-incremental/node_modules/browserify-cache-api/lib/invalidateDependentFiles.js b/node_modules/browserify-incremental/node_modules/browserify-cache-api/lib/invalidateDependentFiles.js deleted file mode 100644 index 73b9112b..00000000 --- a/node_modules/browserify-incremental/node_modules/browserify-cache-api/lib/invalidateDependentFiles.js +++ /dev/null @@ -1,28 +0,0 @@ -var invalidateModifiedFiles = require('./invalidateModifiedFiles'); - -function invalidateDependentFiles(cache, invalidatedModules, done) { - var dependentFiles = cache.dependentFiles; - - // clean up maybe-no-longer-dependent modules - var maybeNoLongerDependentModules = {}; - invalidatedModules.forEach(function(module) { - maybeNoLongerDependentModules[module] = true; - }); - Object.keys(dependentFiles).forEach(function(dependentFile) { - if (dependentFiles[dependentFile]) { - Object.keys(dependentFiles[dependentFile]).forEach(function(module) { - if (maybeNoLongerDependentModules[module]) { - delete dependentFiles[dependentFile][module]; - } - }); - } - }); - - invalidateModifiedFiles(cache.mtimes, Object.keys(dependentFiles), function(dependentFile) { - Object.keys(dependentFiles[dependentFile]).forEach(function(module) { - delete cache.modules[module]; - }); - }, function(err) { done(err); }); -} - -module.exports = invalidateDependentFiles; diff --git a/node_modules/browserify-incremental/node_modules/browserify-cache-api/lib/invalidateModifiedFiles.js b/node_modules/browserify-incremental/node_modules/browserify-cache-api/lib/invalidateModifiedFiles.js deleted file mode 100644 index eb93819b..00000000 --- a/node_modules/browserify-incremental/node_modules/browserify-cache-api/lib/invalidateModifiedFiles.js +++ /dev/null @@ -1,28 +0,0 @@ -var fs = require('fs'); -var async = require('async'); - -var CONCURRENCY_LIMIT = 40; - -function invalidateModifiedFiles(mtimes, files, invalidate, done) { - var invalidated = []; - var deleted = []; - async.eachLimit(files, CONCURRENCY_LIMIT, function(file, fileDone) { - fs.stat(file, function(err, stat) { - if (err) { - deleted.push(file); - return fileDone(); - } - var mtimeNew = stat.mtime.getTime(); - if (!(mtimes[file] && mtimeNew && mtimeNew == mtimes[file])) { - invalidate(file); - invalidated.push(file); - } - mtimes[file] = mtimeNew; - fileDone(); - }); - }, function() { - done(null, invalidated, deleted); - }); -} - -module.exports = invalidateModifiedFiles; diff --git a/node_modules/browserify-incremental/node_modules/browserify-cache-api/lib/proxyEvent.js b/node_modules/browserify-incremental/node_modules/browserify-cache-api/lib/proxyEvent.js deleted file mode 100644 index 94f317d4..00000000 --- a/node_modules/browserify-incremental/node_modules/browserify-cache-api/lib/proxyEvent.js +++ /dev/null @@ -1,7 +0,0 @@ -function proxyEvent(source, target, name) { - source.on(name, function() { - target.emit.apply(target, [name].concat([].slice.call(arguments))); - }); -} - -module.exports = proxyEvent; diff --git a/node_modules/browserify-incremental/node_modules/browserify-cache-api/node_modules/async/CHANGELOG.md b/node_modules/browserify-incremental/node_modules/browserify-cache-api/node_modules/async/CHANGELOG.md deleted file mode 100644 index f15e0812..00000000 --- a/node_modules/browserify-incremental/node_modules/browserify-cache-api/node_modules/async/CHANGELOG.md +++ /dev/null @@ -1,125 +0,0 @@ -# v1.5.2 -- Allow using `"consructor"` as an argument in `memoize` (#998) -- Give a better error messsage when `auto` dependency checking fails (#994) -- Various doc updates (#936, #956, #979, #1002) - -# v1.5.1 -- Fix issue with `pause` in `queue` with concurrency enabled (#946) -- `while` and `until` now pass the final result to callback (#963) -- `auto` will properly handle concurrency when there is no callback (#966) -- `auto` will now properly stop execution when an error occurs (#988, #993) -- Various doc fixes (#971, #980) - -# v1.5.0 - -- Added `transform`, analogous to [`_.transform`](http://lodash.com/docs#transform) (#892) -- `map` now returns an object when an object is passed in, rather than array with non-numeric keys. `map` will begin always returning an array with numeric indexes in the next major release. (#873) -- `auto` now accepts an optional `concurrency` argument to limit the number of running tasks (#637) -- Added `queue#workersList()`, to retrieve the list of currently running tasks. (#891) -- Various code simplifications (#896, #904) -- Various doc fixes :scroll: (#890, #894, #903, #905, #912) - -# v1.4.2 - -- Ensure coverage files don't get published on npm (#879) - -# v1.4.1 - -- Add in overlooked `detectLimit` method (#866) -- Removed unnecessary files from npm releases (#861) -- Removed usage of a reserved word to prevent :boom: in older environments (#870) - -# v1.4.0 - -- `asyncify` now supports promises (#840) -- Added `Limit` versions of `filter` and `reject` (#836) -- Add `Limit` versions of `detect`, `some` and `every` (#828, #829) -- `some`, `every` and `detect` now short circuit early (#828, #829) -- Improve detection of the global object (#804), enabling use in WebWorkers -- `whilst` now called with arguments from iterator (#823) -- `during` now gets called with arguments from iterator (#824) -- Code simplifications and optimizations aplenty ([diff](https://github.com/caolan/async/compare/v1.3.0...v1.4.0)) - - -# v1.3.0 - -New Features: -- Added `constant` -- Added `asyncify`/`wrapSync` for making sync functions work with callbacks. (#671, #806) -- Added `during` and `doDuring`, which are like `whilst` with an async truth test. (#800) -- `retry` now accepts an `interval` parameter to specify a delay between retries. (#793) -- `async` should work better in Web Workers due to better `root` detection (#804) -- Callbacks are now optional in `whilst`, `doWhilst`, `until`, and `doUntil` (#642) -- Various internal updates (#786, #801, #802, #803) -- Various doc fixes (#790, #794) - -Bug Fixes: -- `cargo` now exposes the `payload` size, and `cargo.payload` can be changed on the fly after the `cargo` is created. (#740, #744, #783) - - -# v1.2.1 - -Bug Fix: - -- Small regression with synchronous iterator behavior in `eachSeries` with a 1-element array. Before 1.1.0, `eachSeries`'s callback was called on the same tick, which this patch restores. In 2.0.0, it will be called on the next tick. (#782) - - -# v1.2.0 - -New Features: - -- Added `timesLimit` (#743) -- `concurrency` can be changed after initialization in `queue` by setting `q.concurrency`. The new concurrency will be reflected the next time a task is processed. (#747, #772) - -Bug Fixes: - -- Fixed a regression in `each` and family with empty arrays that have additional properties. (#775, #777) - - -# v1.1.1 - -Bug Fix: - -- Small regression with synchronous iterator behavior in `eachSeries` with a 1-element array. Before 1.1.0, `eachSeries`'s callback was called on the same tick, which this patch restores. In 2.0.0, it will be called on the next tick. (#782) - - -# v1.1.0 - -New Features: - -- `cargo` now supports all of the same methods and event callbacks as `queue`. -- Added `ensureAsync` - A wrapper that ensures an async function calls its callback on a later tick. (#769) -- Optimized `map`, `eachOf`, and `waterfall` families of functions -- Passing a `null` or `undefined` array to `map`, `each`, `parallel` and families will be treated as an empty array (#667). -- The callback is now optional for the composed results of `compose` and `seq`. (#618) -- Reduced file size by 4kb, (minified version by 1kb) -- Added code coverage through `nyc` and `coveralls` (#768) - -Bug Fixes: - -- `forever` will no longer stack overflow with a synchronous iterator (#622) -- `eachLimit` and other limit functions will stop iterating once an error occurs (#754) -- Always pass `null` in callbacks when there is no error (#439) -- Ensure proper conditions when calling `drain()` after pushing an empty data set to a queue (#668) -- `each` and family will properly handle an empty array (#578) -- `eachSeries` and family will finish if the underlying array is modified during execution (#557) -- `queue` will throw if a non-function is passed to `q.push()` (#593) -- Doc fixes (#629, #766) - - -# v1.0.0 - -No known breaking changes, we are simply complying with semver from here on out. - -Changes: - -- Start using a changelog! -- Add `forEachOf` for iterating over Objects (or to iterate Arrays with indexes available) (#168 #704 #321) -- Detect deadlocks in `auto` (#663) -- Better support for require.js (#527) -- Throw if queue created with concurrency `0` (#714) -- Fix unneeded iteration in `queue.resume()` (#758) -- Guard against timer mocking overriding `setImmediate` (#609 #611) -- Miscellaneous doc fixes (#542 #596 #615 #628 #631 #690 #729) -- Use single noop function internally (#546) -- Optimize internal `_each`, `_map` and `_keys` functions. diff --git a/node_modules/browserify-incremental/node_modules/browserify-cache-api/node_modules/async/LICENSE b/node_modules/browserify-incremental/node_modules/browserify-cache-api/node_modules/async/LICENSE deleted file mode 100644 index 8f296985..00000000 --- a/node_modules/browserify-incremental/node_modules/browserify-cache-api/node_modules/async/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (c) 2010-2014 Caolan McMahon - -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/node_modules/browserify-incremental/node_modules/browserify-cache-api/node_modules/async/README.md b/node_modules/browserify-incremental/node_modules/browserify-cache-api/node_modules/async/README.md deleted file mode 100644 index 316c4050..00000000 --- a/node_modules/browserify-incremental/node_modules/browserify-cache-api/node_modules/async/README.md +++ /dev/null @@ -1,1877 +0,0 @@ -# Async.js - -[![Build Status via Travis CI](https://travis-ci.org/caolan/async.svg?branch=master)](https://travis-ci.org/caolan/async) -[![NPM version](http://img.shields.io/npm/v/async.svg)](https://www.npmjs.org/package/async) -[![Coverage Status](https://coveralls.io/repos/caolan/async/badge.svg?branch=master)](https://coveralls.io/r/caolan/async?branch=master) -[![Join the chat at https://gitter.im/caolan/async](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/caolan/async?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) - - -Async is a utility module which provides straight-forward, powerful functions -for working with asynchronous JavaScript. Although originally designed for -use with [Node.js](http://nodejs.org) and installable via `npm install async`, -it can also be used directly in the browser. - -Async is also installable via: - -- [bower](http://bower.io/): `bower install async` -- [component](https://github.com/component/component): `component install - caolan/async` -- [jam](http://jamjs.org/): `jam install async` -- [spm](http://spmjs.io/): `spm install async` - -Async provides around 20 functions that include the usual 'functional' -suspects (`map`, `reduce`, `filter`, `each`…) as well as some common patterns -for asynchronous control flow (`parallel`, `series`, `waterfall`…). All these -functions assume you follow the Node.js convention of providing a single -callback as the last argument of your `async` function. - - -## Quick Examples - -```javascript -async.map(['file1','file2','file3'], fs.stat, function(err, results){ - // results is now an array of stats for each file -}); - -async.filter(['file1','file2','file3'], fs.exists, function(results){ - // results now equals an array of the existing files -}); - -async.parallel([ - function(){ ... }, - function(){ ... } -], callback); - -async.series([ - function(){ ... }, - function(){ ... } -]); -``` - -There are many more functions available so take a look at the docs below for a -full list. This module aims to be comprehensive, so if you feel anything is -missing please create a GitHub issue for it. - -## Common Pitfalls [(StackOverflow)](http://stackoverflow.com/questions/tagged/async.js) -### Synchronous iteration functions - -If you get an error like `RangeError: Maximum call stack size exceeded.` or other stack overflow issues when using async, you are likely using a synchronous iterator. By *synchronous* we mean a function that calls its callback on the same tick in the javascript event loop, without doing any I/O or using any timers. Calling many callbacks iteratively will quickly overflow the stack. If you run into this issue, just defer your callback with `async.setImmediate` to start a new call stack on the next tick of the event loop. - -This can also arise by accident if you callback early in certain cases: - -```js -async.eachSeries(hugeArray, function iterator(item, callback) { - if (inCache(item)) { - callback(null, cache[item]); // if many items are cached, you'll overflow - } else { - doSomeIO(item, callback); - } -}, function done() { - //... -}); -``` - -Just change it to: - -```js -async.eachSeries(hugeArray, function iterator(item, callback) { - if (inCache(item)) { - async.setImmediate(function () { - callback(null, cache[item]); - }); - } else { - doSomeIO(item, callback); - //... -``` - -Async guards against synchronous functions in some, but not all, cases. If you are still running into stack overflows, you can defer as suggested above, or wrap functions with [`async.ensureAsync`](#ensureAsync) Functions that are asynchronous by their nature do not have this problem and don't need the extra callback deferral. - -If JavaScript's event loop is still a bit nebulous, check out [this article](http://blog.carbonfive.com/2013/10/27/the-javascript-event-loop-explained/) or [this talk](http://2014.jsconf.eu/speakers/philip-roberts-what-the-heck-is-the-event-loop-anyway.html) for more detailed information about how it works. - - -### Multiple callbacks - -Make sure to always `return` when calling a callback early, otherwise you will cause multiple callbacks and unpredictable behavior in many cases. - -```js -async.waterfall([ - function (callback) { - getSomething(options, function (err, result) { - if (err) { - callback(new Error("failed getting something:" + err.message)); - // we should return here - } - // since we did not return, this callback still will be called and - // `processData` will be called twice - callback(null, result); - }); - }, - processData -], done) -``` - -It is always good practice to `return callback(err, result)` whenever a callback call is not the last statement of a function. - - -### Binding a context to an iterator - -This section is really about `bind`, not about `async`. If you are wondering how to -make `async` execute your iterators in a given context, or are confused as to why -a method of another library isn't working as an iterator, study this example: - -```js -// Here is a simple object with an (unnecessarily roundabout) squaring method -var AsyncSquaringLibrary = { - squareExponent: 2, - square: function(number, callback){ - var result = Math.pow(number, this.squareExponent); - setTimeout(function(){ - callback(null, result); - }, 200); - } -}; - -async.map([1, 2, 3], AsyncSquaringLibrary.square, function(err, result){ - // result is [NaN, NaN, NaN] - // This fails because the `this.squareExponent` expression in the square - // function is not evaluated in the context of AsyncSquaringLibrary, and is - // therefore undefined. -}); - -async.map([1, 2, 3], AsyncSquaringLibrary.square.bind(AsyncSquaringLibrary), function(err, result){ - // result is [1, 4, 9] - // With the help of bind we can attach a context to the iterator before - // passing it to async. Now the square function will be executed in its - // 'home' AsyncSquaringLibrary context and the value of `this.squareExponent` - // will be as expected. -}); -``` - -## Download - -The source is available for download from -[GitHub](https://github.com/caolan/async/blob/master/lib/async.js). -Alternatively, you can install using Node Package Manager (`npm`): - - npm install async - -As well as using Bower: - - bower install async - -__Development:__ [async.js](https://github.com/caolan/async/raw/master/lib/async.js) - 29.6kb Uncompressed - -## In the Browser - -So far it's been tested in IE6, IE7, IE8, FF3.6 and Chrome 5. - -Usage: - -```html - - -``` - -## Documentation - -Some functions are also available in the following forms: -* `Series` - the same as `` but runs only a single async operation at a time -* `Limit` - the same as `` but runs a maximum of `limit` async operations at a time - -### Collections - -* [`each`](#each), `eachSeries`, `eachLimit` -* [`forEachOf`](#forEachOf), `forEachOfSeries`, `forEachOfLimit` -* [`map`](#map), `mapSeries`, `mapLimit` -* [`filter`](#filter), `filterSeries`, `filterLimit` -* [`reject`](#reject), `rejectSeries`, `rejectLimit` -* [`reduce`](#reduce), [`reduceRight`](#reduceRight) -* [`detect`](#detect), `detectSeries`, `detectLimit` -* [`sortBy`](#sortBy) -* [`some`](#some), `someLimit` -* [`every`](#every), `everyLimit` -* [`concat`](#concat), `concatSeries` - -### Control Flow - -* [`series`](#seriestasks-callback) -* [`parallel`](#parallel), `parallelLimit` -* [`whilst`](#whilst), [`doWhilst`](#doWhilst) -* [`until`](#until), [`doUntil`](#doUntil) -* [`during`](#during), [`doDuring`](#doDuring) -* [`forever`](#forever) -* [`waterfall`](#waterfall) -* [`compose`](#compose) -* [`seq`](#seq) -* [`applyEach`](#applyEach), `applyEachSeries` -* [`queue`](#queue), [`priorityQueue`](#priorityQueue) -* [`cargo`](#cargo) -* [`auto`](#auto) -* [`retry`](#retry) -* [`iterator`](#iterator) -* [`times`](#times), `timesSeries`, `timesLimit` - -### Utils - -* [`apply`](#apply) -* [`nextTick`](#nextTick) -* [`memoize`](#memoize) -* [`unmemoize`](#unmemoize) -* [`ensureAsync`](#ensureAsync) -* [`constant`](#constant) -* [`asyncify`](#asyncify) -* [`wrapSync`](#wrapSync) -* [`log`](#log) -* [`dir`](#dir) -* [`noConflict`](#noConflict) - -## Collections - - - -### each(arr, iterator, [callback]) - -Applies the function `iterator` to each item in `arr`, in parallel. -The `iterator` is called with an item from the list, and a callback for when it -has finished. If the `iterator` passes an error to its `callback`, the main -`callback` (for the `each` function) is immediately called with the error. - -Note, that since this function applies `iterator` to each item in parallel, -there is no guarantee that the iterator functions will complete in order. - -__Arguments__ - -* `arr` - An array to iterate over. -* `iterator(item, callback)` - A function to apply to each item in `arr`. - The iterator is passed a `callback(err)` which must be called once it has - completed. If no error has occurred, the `callback` should be run without - arguments or with an explicit `null` argument. The array index is not passed - to the iterator. If you need the index, use [`forEachOf`](#forEachOf). -* `callback(err)` - *Optional* A callback which is called when all `iterator` functions - have finished, or an error occurs. - -__Examples__ - - -```js -// assuming openFiles is an array of file names and saveFile is a function -// to save the modified contents of that file: - -async.each(openFiles, saveFile, function(err){ - // if any of the saves produced an error, err would equal that error -}); -``` - -```js -// assuming openFiles is an array of file names - -async.each(openFiles, function(file, callback) { - - // Perform operation on file here. - console.log('Processing file ' + file); - - if( file.length > 32 ) { - console.log('This file name is too long'); - callback('File name too long'); - } else { - // Do work to process file here - console.log('File processed'); - callback(); - } -}, function(err){ - // if any of the file processing produced an error, err would equal that error - if( err ) { - // One of the iterations produced an error. - // All processing will now stop. - console.log('A file failed to process'); - } else { - console.log('All files have been processed successfully'); - } -}); -``` - -__Related__ - -* eachSeries(arr, iterator, [callback]) -* eachLimit(arr, limit, iterator, [callback]) - ---------------------------------------- - - - - -### forEachOf(obj, iterator, [callback]) - -Like `each`, except that it iterates over objects, and passes the key as the second argument to the iterator. - -__Arguments__ - -* `obj` - An object or array to iterate over. -* `iterator(item, key, callback)` - A function to apply to each item in `obj`. -The `key` is the item's key, or index in the case of an array. The iterator is -passed a `callback(err)` which must be called once it has completed. If no -error has occurred, the callback should be run without arguments or with an -explicit `null` argument. -* `callback(err)` - *Optional* A callback which is called when all `iterator` functions have finished, or an error occurs. - -__Example__ - -```js -var obj = {dev: "/dev.json", test: "/test.json", prod: "/prod.json"}; -var configs = {}; - -async.forEachOf(obj, function (value, key, callback) { - fs.readFile(__dirname + value, "utf8", function (err, data) { - if (err) return callback(err); - try { - configs[key] = JSON.parse(data); - } catch (e) { - return callback(e); - } - callback(); - }) -}, function (err) { - if (err) console.error(err.message); - // configs is now a map of JSON data - doSomethingWith(configs); -}) -``` - -__Related__ - -* forEachOfSeries(obj, iterator, [callback]) -* forEachOfLimit(obj, limit, iterator, [callback]) - ---------------------------------------- - - -### map(arr, iterator, [callback]) - -Produces a new array of values by mapping each value in `arr` through -the `iterator` function. The `iterator` is called with an item from `arr` and a -callback for when it has finished processing. Each of these callback takes 2 arguments: -an `error`, and the transformed item from `arr`. If `iterator` passes an error to its -callback, the main `callback` (for the `map` function) is immediately called with the error. - -Note, that since this function applies the `iterator` to each item in parallel, -there is no guarantee that the `iterator` functions will complete in order. -However, the results array will be in the same order as the original `arr`. - -__Arguments__ - -* `arr` - An array to iterate over. -* `iterator(item, callback)` - A function to apply to each item in `arr`. - The iterator is passed a `callback(err, transformed)` which must be called once - it has completed with an error (which can be `null`) and a transformed item. -* `callback(err, results)` - *Optional* A callback which is called when all `iterator` - functions have finished, or an error occurs. Results is an array of the - transformed items from the `arr`. - -__Example__ - -```js -async.map(['file1','file2','file3'], fs.stat, function(err, results){ - // results is now an array of stats for each file -}); -``` - -__Related__ -* mapSeries(arr, iterator, [callback]) -* mapLimit(arr, limit, iterator, [callback]) - ---------------------------------------- - - - -### filter(arr, iterator, [callback]) - -__Alias:__ `select` - -Returns a new array of all the values in `arr` which pass an async truth test. -_The callback for each `iterator` call only accepts a single argument of `true` or -`false`; it does not accept an error argument first!_ This is in-line with the -way node libraries work with truth tests like `fs.exists`. This operation is -performed in parallel, but the results array will be in the same order as the -original. - -__Arguments__ - -* `arr` - An array to iterate over. -* `iterator(item, callback)` - A truth test to apply to each item in `arr`. - The `iterator` is passed a `callback(truthValue)`, which must be called with a - boolean argument once it has completed. -* `callback(results)` - *Optional* A callback which is called after all the `iterator` - functions have finished. - -__Example__ - -```js -async.filter(['file1','file2','file3'], fs.exists, function(results){ - // results now equals an array of the existing files -}); -``` - -__Related__ - -* filterSeries(arr, iterator, [callback]) -* filterLimit(arr, limit, iterator, [callback]) - ---------------------------------------- - - -### reject(arr, iterator, [callback]) - -The opposite of [`filter`](#filter). Removes values that pass an `async` truth test. - -__Related__ - -* rejectSeries(arr, iterator, [callback]) -* rejectLimit(arr, limit, iterator, [callback]) - ---------------------------------------- - - -### reduce(arr, memo, iterator, [callback]) - -__Aliases:__ `inject`, `foldl` - -Reduces `arr` into a single value using an async `iterator` to return -each successive step. `memo` is the initial state of the reduction. -This function only operates in series. - -For performance reasons, it may make sense to split a call to this function into -a parallel map, and then use the normal `Array.prototype.reduce` on the results. -This function is for situations where each step in the reduction needs to be async; -if you can get the data before reducing it, then it's probably a good idea to do so. - -__Arguments__ - -* `arr` - An array to iterate over. -* `memo` - The initial state of the reduction. -* `iterator(memo, item, callback)` - A function applied to each item in the - array to produce the next step in the reduction. The `iterator` is passed a - `callback(err, reduction)` which accepts an optional error as its first - argument, and the state of the reduction as the second. If an error is - passed to the callback, the reduction is stopped and the main `callback` is - immediately called with the error. -* `callback(err, result)` - *Optional* A callback which is called after all the `iterator` - functions have finished. Result is the reduced value. - -__Example__ - -```js -async.reduce([1,2,3], 0, function(memo, item, callback){ - // pointless async: - process.nextTick(function(){ - callback(null, memo + item) - }); -}, function(err, result){ - // result is now equal to the last value of memo, which is 6 -}); -``` - ---------------------------------------- - - -### reduceRight(arr, memo, iterator, [callback]) - -__Alias:__ `foldr` - -Same as [`reduce`](#reduce), only operates on `arr` in reverse order. - - ---------------------------------------- - - -### detect(arr, iterator, [callback]) - -Returns the first value in `arr` that passes an async truth test. The -`iterator` is applied in parallel, meaning the first iterator to return `true` will -fire the detect `callback` with that result. That means the result might not be -the first item in the original `arr` (in terms of order) that passes the test. - -If order within the original `arr` is important, then look at [`detectSeries`](#detectSeries). - -__Arguments__ - -* `arr` - An array to iterate over. -* `iterator(item, callback)` - A truth test to apply to each item in `arr`. - The iterator is passed a `callback(truthValue)` which must be called with a - boolean argument once it has completed. **Note: this callback does not take an error as its first argument.** -* `callback(result)` - *Optional* A callback which is called as soon as any iterator returns - `true`, or after all the `iterator` functions have finished. Result will be - the first item in the array that passes the truth test (iterator) or the - value `undefined` if none passed. **Note: this callback does not take an error as its first argument.** - -__Example__ - -```js -async.detect(['file1','file2','file3'], fs.exists, function(result){ - // result now equals the first file in the list that exists -}); -``` - -__Related__ - -* detectSeries(arr, iterator, [callback]) -* detectLimit(arr, limit, iterator, [callback]) - ---------------------------------------- - - -### sortBy(arr, iterator, [callback]) - -Sorts a list by the results of running each `arr` value through an async `iterator`. - -__Arguments__ - -* `arr` - An array to iterate over. -* `iterator(item, callback)` - A function to apply to each item in `arr`. - The iterator is passed a `callback(err, sortValue)` which must be called once it - has completed with an error (which can be `null`) and a value to use as the sort - criteria. -* `callback(err, results)` - *Optional* A callback which is called after all the `iterator` - functions have finished, or an error occurs. Results is the items from - the original `arr` sorted by the values returned by the `iterator` calls. - -__Example__ - -```js -async.sortBy(['file1','file2','file3'], function(file, callback){ - fs.stat(file, function(err, stats){ - callback(err, stats.mtime); - }); -}, function(err, results){ - // results is now the original array of files sorted by - // modified date -}); -``` - -__Sort Order__ - -By modifying the callback parameter the sorting order can be influenced: - -```js -//ascending order -async.sortBy([1,9,3,5], function(x, callback){ - callback(null, x); -}, function(err,result){ - //result callback -} ); - -//descending order -async.sortBy([1,9,3,5], function(x, callback){ - callback(null, x*-1); //<- x*-1 instead of x, turns the order around -}, function(err,result){ - //result callback -} ); -``` - ---------------------------------------- - - -### some(arr, iterator, [callback]) - -__Alias:__ `any` - -Returns `true` if at least one element in the `arr` satisfies an async test. -_The callback for each iterator call only accepts a single argument of `true` or -`false`; it does not accept an error argument first!_ This is in-line with the -way node libraries work with truth tests like `fs.exists`. Once any iterator -call returns `true`, the main `callback` is immediately called. - -__Arguments__ - -* `arr` - An array to iterate over. -* `iterator(item, callback)` - A truth test to apply to each item in the array - in parallel. The iterator is passed a `callback(truthValue)`` which must be - called with a boolean argument once it has completed. -* `callback(result)` - *Optional* A callback which is called as soon as any iterator returns - `true`, or after all the iterator functions have finished. Result will be - either `true` or `false` depending on the values of the async tests. - - **Note: the callbacks do not take an error as their first argument.** -__Example__ - -```js -async.some(['file1','file2','file3'], fs.exists, function(result){ - // if result is true then at least one of the files exists -}); -``` - -__Related__ - -* someLimit(arr, limit, iterator, callback) - ---------------------------------------- - - -### every(arr, iterator, [callback]) - -__Alias:__ `all` - -Returns `true` if every element in `arr` satisfies an async test. -_The callback for each `iterator` call only accepts a single argument of `true` or -`false`; it does not accept an error argument first!_ This is in-line with the -way node libraries work with truth tests like `fs.exists`. - -__Arguments__ - -* `arr` - An array to iterate over. -* `iterator(item, callback)` - A truth test to apply to each item in the array - in parallel. The iterator is passed a `callback(truthValue)` which must be - called with a boolean argument once it has completed. -* `callback(result)` - *Optional* A callback which is called as soon as any iterator returns - `false`, or after all the iterator functions have finished. Result will be - either `true` or `false` depending on the values of the async tests. - - **Note: the callbacks do not take an error as their first argument.** - -__Example__ - -```js -async.every(['file1','file2','file3'], fs.exists, function(result){ - // if result is true then every file exists -}); -``` - -__Related__ - -* everyLimit(arr, limit, iterator, callback) - ---------------------------------------- - - -### concat(arr, iterator, [callback]) - -Applies `iterator` to each item in `arr`, concatenating the results. Returns the -concatenated list. The `iterator`s are called in parallel, and the results are -concatenated as they return. There is no guarantee that the results array will -be returned in the original order of `arr` passed to the `iterator` function. - -__Arguments__ - -* `arr` - An array to iterate over. -* `iterator(item, callback)` - A function to apply to each item in `arr`. - The iterator is passed a `callback(err, results)` which must be called once it - has completed with an error (which can be `null`) and an array of results. -* `callback(err, results)` - *Optional* A callback which is called after all the `iterator` - functions have finished, or an error occurs. Results is an array containing - the concatenated results of the `iterator` function. - -__Example__ - -```js -async.concat(['dir1','dir2','dir3'], fs.readdir, function(err, files){ - // files is now a list of filenames that exist in the 3 directories -}); -``` - -__Related__ - -* concatSeries(arr, iterator, [callback]) - - -## Control Flow - - -### series(tasks, [callback]) - -Run the functions in the `tasks` array in series, each one running once the previous -function has completed. If any functions in the series pass an error to its -callback, no more functions are run, and `callback` is immediately called with the value of the error. -Otherwise, `callback` receives an array of results when `tasks` have completed. - -It is also possible to use an object instead of an array. Each property will be -run as a function, and the results will be passed to the final `callback` as an object -instead of an array. This can be a more readable way of handling results from -[`series`](#series). - -**Note** that while many implementations preserve the order of object properties, the -[ECMAScript Language Specification](http://www.ecma-international.org/ecma-262/5.1/#sec-8.6) -explicitly states that - -> The mechanics and order of enumerating the properties is not specified. - -So if you rely on the order in which your series of functions are executed, and want -this to work on all platforms, consider using an array. - -__Arguments__ - -* `tasks` - An array or object containing functions to run, each function is passed - a `callback(err, result)` it must call on completion with an error `err` (which can - be `null`) and an optional `result` value. -* `callback(err, results)` - An optional callback to run once all the functions - have completed. This function gets a results array (or object) containing all - the result arguments passed to the `task` callbacks. - -__Example__ - -```js -async.series([ - function(callback){ - // do some stuff ... - callback(null, 'one'); - }, - function(callback){ - // do some more stuff ... - callback(null, 'two'); - } -], -// optional callback -function(err, results){ - // results is now equal to ['one', 'two'] -}); - - -// an example using an object instead of an array -async.series({ - one: function(callback){ - setTimeout(function(){ - callback(null, 1); - }, 200); - }, - two: function(callback){ - setTimeout(function(){ - callback(null, 2); - }, 100); - } -}, -function(err, results) { - // results is now equal to: {one: 1, two: 2} -}); -``` - ---------------------------------------- - - -### parallel(tasks, [callback]) - -Run the `tasks` array of functions in parallel, without waiting until the previous -function has completed. If any of the functions pass an error to its -callback, the main `callback` is immediately called with the value of the error. -Once the `tasks` have completed, the results are passed to the final `callback` as an -array. - -**Note:** `parallel` is about kicking-off I/O tasks in parallel, not about parallel execution of code. If your tasks do not use any timers or perform any I/O, they will actually be executed in series. Any synchronous setup sections for each task will happen one after the other. JavaScript remains single-threaded. - -It is also possible to use an object instead of an array. Each property will be -run as a function and the results will be passed to the final `callback` as an object -instead of an array. This can be a more readable way of handling results from -[`parallel`](#parallel). - - -__Arguments__ - -* `tasks` - An array or object containing functions to run. Each function is passed - a `callback(err, result)` which it must call on completion with an error `err` - (which can be `null`) and an optional `result` value. -* `callback(err, results)` - An optional callback to run once all the functions - have completed successfully. This function gets a results array (or object) containing all - the result arguments passed to the task callbacks. - -__Example__ - -```js -async.parallel([ - function(callback){ - setTimeout(function(){ - callback(null, 'one'); - }, 200); - }, - function(callback){ - setTimeout(function(){ - callback(null, 'two'); - }, 100); - } -], -// optional callback -function(err, results){ - // the results array will equal ['one','two'] even though - // the second function had a shorter timeout. -}); - - -// an example using an object instead of an array -async.parallel({ - one: function(callback){ - setTimeout(function(){ - callback(null, 1); - }, 200); - }, - two: function(callback){ - setTimeout(function(){ - callback(null, 2); - }, 100); - } -}, -function(err, results) { - // results is now equals to: {one: 1, two: 2} -}); -``` - -__Related__ - -* parallelLimit(tasks, limit, [callback]) - ---------------------------------------- - - -### whilst(test, fn, callback) - -Repeatedly call `fn`, while `test` returns `true`. Calls `callback` when stopped, -or an error occurs. - -__Arguments__ - -* `test()` - synchronous truth test to perform before each execution of `fn`. -* `fn(callback)` - A function which is called each time `test` passes. The function is - passed a `callback(err)`, which must be called once it has completed with an - optional `err` argument. -* `callback(err, [results])` - A callback which is called after the test - function has failed and repeated execution of `fn` has stopped. `callback` - will be passed an error and any arguments passed to the final `fn`'s callback. - -__Example__ - -```js -var count = 0; - -async.whilst( - function () { return count < 5; }, - function (callback) { - count++; - setTimeout(function () { - callback(null, count); - }, 1000); - }, - function (err, n) { - // 5 seconds have passed, n = 5 - } -); -``` - ---------------------------------------- - - -### doWhilst(fn, test, callback) - -The post-check version of [`whilst`](#whilst). To reflect the difference in -the order of operations, the arguments `test` and `fn` are switched. - -`doWhilst` is to `whilst` as `do while` is to `while` in plain JavaScript. - ---------------------------------------- - - -### until(test, fn, callback) - -Repeatedly call `fn` until `test` returns `true`. Calls `callback` when stopped, -or an error occurs. `callback` will be passed an error and any arguments passed -to the final `fn`'s callback. - -The inverse of [`whilst`](#whilst). - ---------------------------------------- - - -### doUntil(fn, test, callback) - -Like [`doWhilst`](#doWhilst), except the `test` is inverted. Note the argument ordering differs from `until`. - ---------------------------------------- - - -### during(test, fn, callback) - -Like [`whilst`](#whilst), except the `test` is an asynchronous function that is passed a callback in the form of `function (err, truth)`. If error is passed to `test` or `fn`, the main callback is immediately called with the value of the error. - -__Example__ - -```js -var count = 0; - -async.during( - function (callback) { - return callback(null, count < 5); - }, - function (callback) { - count++; - setTimeout(callback, 1000); - }, - function (err) { - // 5 seconds have passed - } -); -``` - ---------------------------------------- - - -### doDuring(fn, test, callback) - -The post-check version of [`during`](#during). To reflect the difference in -the order of operations, the arguments `test` and `fn` are switched. - -Also a version of [`doWhilst`](#doWhilst) with asynchronous `test` function. - ---------------------------------------- - - -### forever(fn, [errback]) - -Calls the asynchronous function `fn` with a callback parameter that allows it to -call itself again, in series, indefinitely. - -If an error is passed to the callback then `errback` is called with the -error, and execution stops, otherwise it will never be called. - -```js -async.forever( - function(next) { - // next is suitable for passing to things that need a callback(err [, whatever]); - // it will result in this function being called again. - }, - function(err) { - // if next is called with a value in its first parameter, it will appear - // in here as 'err', and execution will stop. - } -); -``` - ---------------------------------------- - - -### waterfall(tasks, [callback]) - -Runs the `tasks` array of functions in series, each passing their results to the next in -the array. However, if any of the `tasks` pass an error to their own callback, the -next function is not executed, and the main `callback` is immediately called with -the error. - -__Arguments__ - -* `tasks` - An array of functions to run, each function is passed a - `callback(err, result1, result2, ...)` it must call on completion. The first - argument is an error (which can be `null`) and any further arguments will be - passed as arguments in order to the next task. -* `callback(err, [results])` - An optional callback to run once all the functions - have completed. This will be passed the results of the last task's callback. - - - -__Example__ - -```js -async.waterfall([ - function(callback) { - callback(null, 'one', 'two'); - }, - function(arg1, arg2, callback) { - // arg1 now equals 'one' and arg2 now equals 'two' - callback(null, 'three'); - }, - function(arg1, callback) { - // arg1 now equals 'three' - callback(null, 'done'); - } -], function (err, result) { - // result now equals 'done' -}); -``` -Or, with named functions: - -```js -async.waterfall([ - myFirstFunction, - mySecondFunction, - myLastFunction, -], function (err, result) { - // result now equals 'done' -}); -function myFirstFunction(callback) { - callback(null, 'one', 'two'); -} -function mySecondFunction(arg1, arg2, callback) { - // arg1 now equals 'one' and arg2 now equals 'two' - callback(null, 'three'); -} -function myLastFunction(arg1, callback) { - // arg1 now equals 'three' - callback(null, 'done'); -} -``` - -Or, if you need to pass any argument to the first function: - -```js -async.waterfall([ - async.apply(myFirstFunction, 'zero'), - mySecondFunction, - myLastFunction, -], function (err, result) { - // result now equals 'done' -}); -function myFirstFunction(arg1, callback) { - // arg1 now equals 'zero' - callback(null, 'one', 'two'); -} -function mySecondFunction(arg1, arg2, callback) { - // arg1 now equals 'one' and arg2 now equals 'two' - callback(null, 'three'); -} -function myLastFunction(arg1, callback) { - // arg1 now equals 'three' - callback(null, 'done'); -} -``` - ---------------------------------------- - -### compose(fn1, fn2...) - -Creates a function which is a composition of the passed asynchronous -functions. Each function consumes the return value of the function that -follows. Composing functions `f()`, `g()`, and `h()` would produce the result of -`f(g(h()))`, only this version uses callbacks to obtain the return values. - -Each function is executed with the `this` binding of the composed function. - -__Arguments__ - -* `functions...` - the asynchronous functions to compose - - -__Example__ - -```js -function add1(n, callback) { - setTimeout(function () { - callback(null, n + 1); - }, 10); -} - -function mul3(n, callback) { - setTimeout(function () { - callback(null, n * 3); - }, 10); -} - -var add1mul3 = async.compose(mul3, add1); - -add1mul3(4, function (err, result) { - // result now equals 15 -}); -``` - ---------------------------------------- - -### seq(fn1, fn2...) - -Version of the compose function that is more natural to read. -Each function consumes the return value of the previous function. -It is the equivalent of [`compose`](#compose) with the arguments reversed. - -Each function is executed with the `this` binding of the composed function. - -__Arguments__ - -* `functions...` - the asynchronous functions to compose - - -__Example__ - -```js -// Requires lodash (or underscore), express3 and dresende's orm2. -// Part of an app, that fetches cats of the logged user. -// This example uses `seq` function to avoid overnesting and error -// handling clutter. -app.get('/cats', function(request, response) { - var User = request.models.User; - async.seq( - _.bind(User.get, User), // 'User.get' has signature (id, callback(err, data)) - function(user, fn) { - user.getCats(fn); // 'getCats' has signature (callback(err, data)) - } - )(req.session.user_id, function (err, cats) { - if (err) { - console.error(err); - response.json({ status: 'error', message: err.message }); - } else { - response.json({ status: 'ok', message: 'Cats found', data: cats }); - } - }); -}); -``` - ---------------------------------------- - -### applyEach(fns, args..., callback) - -Applies the provided arguments to each function in the array, calling -`callback` after all functions have completed. If you only provide the first -argument, then it will return a function which lets you pass in the -arguments as if it were a single function call. - -__Arguments__ - -* `fns` - the asynchronous functions to all call with the same arguments -* `args...` - any number of separate arguments to pass to the function -* `callback` - the final argument should be the callback, called when all - functions have completed processing - - -__Example__ - -```js -async.applyEach([enableSearch, updateSchema], 'bucket', callback); - -// partial application example: -async.each( - buckets, - async.applyEach([enableSearch, updateSchema]), - callback -); -``` - -__Related__ - -* applyEachSeries(tasks, args..., [callback]) - ---------------------------------------- - - -### queue(worker, [concurrency]) - -Creates a `queue` object with the specified `concurrency`. Tasks added to the -`queue` are processed in parallel (up to the `concurrency` limit). If all -`worker`s are in progress, the task is queued until one becomes available. -Once a `worker` completes a `task`, that `task`'s callback is called. - -__Arguments__ - -* `worker(task, callback)` - An asynchronous function for processing a queued - task, which must call its `callback(err)` argument when finished, with an - optional `error` as an argument. If you want to handle errors from an individual task, pass a callback to `q.push()`. -* `concurrency` - An `integer` for determining how many `worker` functions should be - run in parallel. If omitted, the concurrency defaults to `1`. If the concurrency is `0`, an error is thrown. - -__Queue objects__ - -The `queue` object returned by this function has the following properties and -methods: - -* `length()` - a function returning the number of items waiting to be processed. -* `started` - a function returning whether or not any items have been pushed and processed by the queue -* `running()` - a function returning the number of items currently being processed. -* `workersList()` - a function returning the array of items currently being processed. -* `idle()` - a function returning false if there are items waiting or being processed, or true if not. -* `concurrency` - an integer for determining how many `worker` functions should be - run in parallel. This property can be changed after a `queue` is created to - alter the concurrency on-the-fly. -* `push(task, [callback])` - add a new task to the `queue`. Calls `callback` once - the `worker` has finished processing the task. Instead of a single task, a `tasks` array - can be submitted. The respective callback is used for every task in the list. -* `unshift(task, [callback])` - add a new task to the front of the `queue`. -* `saturated` - a callback that is called when the `queue` length hits the `concurrency` limit, - and further tasks will be queued. -* `empty` - a callback that is called when the last item from the `queue` is given to a `worker`. -* `drain` - a callback that is called when the last item from the `queue` has returned from the `worker`. -* `paused` - a boolean for determining whether the queue is in a paused state -* `pause()` - a function that pauses the processing of tasks until `resume()` is called. -* `resume()` - a function that resumes the processing of queued tasks when the queue is paused. -* `kill()` - a function that removes the `drain` callback and empties remaining tasks from the queue forcing it to go idle. - -__Example__ - -```js -// create a queue object with concurrency 2 - -var q = async.queue(function (task, callback) { - console.log('hello ' + task.name); - callback(); -}, 2); - - -// assign a callback -q.drain = function() { - console.log('all items have been processed'); -} - -// add some items to the queue - -q.push({name: 'foo'}, function (err) { - console.log('finished processing foo'); -}); -q.push({name: 'bar'}, function (err) { - console.log('finished processing bar'); -}); - -// add some items to the queue (batch-wise) - -q.push([{name: 'baz'},{name: 'bay'},{name: 'bax'}], function (err) { - console.log('finished processing item'); -}); - -// add some items to the front of the queue - -q.unshift({name: 'bar'}, function (err) { - console.log('finished processing bar'); -}); -``` - - ---------------------------------------- - - -### priorityQueue(worker, concurrency) - -The same as [`queue`](#queue) only tasks are assigned a priority and completed in ascending priority order. There are two differences between `queue` and `priorityQueue` objects: - -* `push(task, priority, [callback])` - `priority` should be a number. If an array of - `tasks` is given, all tasks will be assigned the same priority. -* The `unshift` method was removed. - ---------------------------------------- - - -### cargo(worker, [payload]) - -Creates a `cargo` object with the specified payload. Tasks added to the -cargo will be processed altogether (up to the `payload` limit). If the -`worker` is in progress, the task is queued until it becomes available. Once -the `worker` has completed some tasks, each callback of those tasks is called. -Check out [these](https://camo.githubusercontent.com/6bbd36f4cf5b35a0f11a96dcd2e97711ffc2fb37/68747470733a2f2f662e636c6f75642e6769746875622e636f6d2f6173736574732f313637363837312f36383130382f62626330636662302d356632392d313165322d393734662d3333393763363464633835382e676966) [animations](https://camo.githubusercontent.com/f4810e00e1c5f5f8addbe3e9f49064fd5d102699/68747470733a2f2f662e636c6f75642e6769746875622e636f6d2f6173736574732f313637363837312f36383130312f38346339323036362d356632392d313165322d383134662d3964336430323431336266642e676966) for how `cargo` and `queue` work. - -While [queue](#queue) passes only one task to one of a group of workers -at a time, cargo passes an array of tasks to a single worker, repeating -when the worker is finished. - -__Arguments__ - -* `worker(tasks, callback)` - An asynchronous function for processing an array of - queued tasks, which must call its `callback(err)` argument when finished, with - an optional `err` argument. -* `payload` - An optional `integer` for determining how many tasks should be - processed per round; if omitted, the default is unlimited. - -__Cargo objects__ - -The `cargo` object returned by this function has the following properties and -methods: - -* `length()` - A function returning the number of items waiting to be processed. -* `payload` - An `integer` for determining how many tasks should be - process per round. This property can be changed after a `cargo` is created to - alter the payload on-the-fly. -* `push(task, [callback])` - Adds `task` to the `queue`. The callback is called - once the `worker` has finished processing the task. Instead of a single task, an array of `tasks` - can be submitted. The respective callback is used for every task in the list. -* `saturated` - A callback that is called when the `queue.length()` hits the concurrency and further tasks will be queued. -* `empty` - A callback that is called when the last item from the `queue` is given to a `worker`. -* `drain` - A callback that is called when the last item from the `queue` has returned from the `worker`. -* `idle()`, `pause()`, `resume()`, `kill()` - cargo inherits all of the same methods and event calbacks as [`queue`](#queue) - -__Example__ - -```js -// create a cargo object with payload 2 - -var cargo = async.cargo(function (tasks, callback) { - for(var i=0; i -### auto(tasks, [concurrency], [callback]) - -Determines the best order for running the functions in `tasks`, based on their requirements. Each function can optionally depend on other functions being completed first, and each function is run as soon as its requirements are satisfied. - -If any of the functions pass an error to their callback, the `auto` sequence will stop. Further tasks will not execute (so any other functions depending on it will not run), and the main `callback` is immediately called with the error. Functions also receive an object containing the results of functions which have completed so far. - -Note, all functions are called with a `results` object as a second argument, -so it is unsafe to pass functions in the `tasks` object which cannot handle the -extra argument. - -For example, this snippet of code: - -```js -async.auto({ - readData: async.apply(fs.readFile, 'data.txt', 'utf-8') -}, callback); -``` - -will have the effect of calling `readFile` with the results object as the last -argument, which will fail: - -```js -fs.readFile('data.txt', 'utf-8', cb, {}); -``` - -Instead, wrap the call to `readFile` in a function which does not forward the -`results` object: - -```js -async.auto({ - readData: function(cb, results){ - fs.readFile('data.txt', 'utf-8', cb); - } -}, callback); -``` - -__Arguments__ - -* `tasks` - An object. Each of its properties is either a function or an array of - requirements, with the function itself the last item in the array. The object's key - of a property serves as the name of the task defined by that property, - i.e. can be used when specifying requirements for other tasks. - The function receives two arguments: (1) a `callback(err, result)` which must be - called when finished, passing an `error` (which can be `null`) and the result of - the function's execution, and (2) a `results` object, containing the results of - the previously executed functions. -* `concurrency` - An optional `integer` for determining the maximum number of tasks that can be run in parallel. By default, as many as possible. -* `callback(err, results)` - An optional callback which is called when all the - tasks have been completed. It receives the `err` argument if any `tasks` - pass an error to their callback. Results are always returned; however, if - an error occurs, no further `tasks` will be performed, and the results - object will only contain partial results. - - -__Example__ - -```js -async.auto({ - get_data: function(callback){ - console.log('in get_data'); - // async code to get some data - callback(null, 'data', 'converted to array'); - }, - make_folder: function(callback){ - console.log('in make_folder'); - // async code to create a directory to store a file in - // this is run at the same time as getting the data - callback(null, 'folder'); - }, - write_file: ['get_data', 'make_folder', function(callback, results){ - console.log('in write_file', JSON.stringify(results)); - // once there is some data and the directory exists, - // write the data to a file in the directory - callback(null, 'filename'); - }], - email_link: ['write_file', function(callback, results){ - console.log('in email_link', JSON.stringify(results)); - // once the file is written let's email a link to it... - // results.write_file contains the filename returned by write_file. - callback(null, {'file':results.write_file, 'email':'user@example.com'}); - }] -}, function(err, results) { - console.log('err = ', err); - console.log('results = ', results); -}); -``` - -This is a fairly trivial example, but to do this using the basic parallel and -series functions would look like this: - -```js -async.parallel([ - function(callback){ - console.log('in get_data'); - // async code to get some data - callback(null, 'data', 'converted to array'); - }, - function(callback){ - console.log('in make_folder'); - // async code to create a directory to store a file in - // this is run at the same time as getting the data - callback(null, 'folder'); - } -], -function(err, results){ - async.series([ - function(callback){ - console.log('in write_file', JSON.stringify(results)); - // once there is some data and the directory exists, - // write the data to a file in the directory - results.push('filename'); - callback(null); - }, - function(callback){ - console.log('in email_link', JSON.stringify(results)); - // once the file is written let's email a link to it... - callback(null, {'file':results.pop(), 'email':'user@example.com'}); - } - ]); -}); -``` - -For a complicated series of `async` tasks, using the [`auto`](#auto) function makes adding -new tasks much easier (and the code more readable). - - ---------------------------------------- - - -### retry([opts = {times: 5, interval: 0}| 5], task, [callback]) - -Attempts to get a successful response from `task` no more than `times` times before -returning an error. If the task is successful, the `callback` will be passed the result -of the successful task. If all attempts fail, the callback will be passed the error and -result (if any) of the final attempt. - -__Arguments__ - -* `opts` - Can be either an object with `times` and `interval` or a number. - * `times` - The number of attempts to make before giving up. The default is `5`. - * `interval` - The time to wait between retries, in milliseconds. The default is `0`. - * If `opts` is a number, the number specifies the number of times to retry, with the default interval of `0`. -* `task(callback, results)` - A function which receives two arguments: (1) a `callback(err, result)` - which must be called when finished, passing `err` (which can be `null`) and the `result` of - the function's execution, and (2) a `results` object, containing the results of - the previously executed functions (if nested inside another control flow). -* `callback(err, results)` - An optional callback which is called when the - task has succeeded, or after the final failed attempt. It receives the `err` and `result` arguments of the last attempt at completing the `task`. - -The [`retry`](#retry) function can be used as a stand-alone control flow by passing a callback, as shown below: - -```js -// try calling apiMethod 3 times -async.retry(3, apiMethod, function(err, result) { - // do something with the result -}); -``` - -```js -// try calling apiMethod 3 times, waiting 200 ms between each retry -async.retry({times: 3, interval: 200}, apiMethod, function(err, result) { - // do something with the result -}); -``` - -```js -// try calling apiMethod the default 5 times no delay between each retry -async.retry(apiMethod, function(err, result) { - // do something with the result -}); -``` - -It can also be embedded within other control flow functions to retry individual methods -that are not as reliable, like this: - -```js -async.auto({ - users: api.getUsers.bind(api), - payments: async.retry(3, api.getPayments.bind(api)) -}, function(err, results) { - // do something with the results -}); -``` - - ---------------------------------------- - - -### iterator(tasks) - -Creates an iterator function which calls the next function in the `tasks` array, -returning a continuation to call the next one after that. It's also possible to -“peek” at the next iterator with `iterator.next()`. - -This function is used internally by the `async` module, but can be useful when -you want to manually control the flow of functions in series. - -__Arguments__ - -* `tasks` - An array of functions to run. - -__Example__ - -```js -var iterator = async.iterator([ - function(){ sys.p('one'); }, - function(){ sys.p('two'); }, - function(){ sys.p('three'); } -]); - -node> var iterator2 = iterator(); -'one' -node> var iterator3 = iterator2(); -'two' -node> iterator3(); -'three' -node> var nextfn = iterator2.next(); -node> nextfn(); -'three' -``` - ---------------------------------------- - - -### apply(function, arguments..) - -Creates a continuation function with some arguments already applied. - -Useful as a shorthand when combined with other control flow functions. Any arguments -passed to the returned function are added to the arguments originally passed -to apply. - -__Arguments__ - -* `function` - The function you want to eventually apply all arguments to. -* `arguments...` - Any number of arguments to automatically apply when the - continuation is called. - -__Example__ - -```js -// using apply - -async.parallel([ - async.apply(fs.writeFile, 'testfile1', 'test1'), - async.apply(fs.writeFile, 'testfile2', 'test2'), -]); - - -// the same process without using apply - -async.parallel([ - function(callback){ - fs.writeFile('testfile1', 'test1', callback); - }, - function(callback){ - fs.writeFile('testfile2', 'test2', callback); - } -]); -``` - -It's possible to pass any number of additional arguments when calling the -continuation: - -```js -node> var fn = async.apply(sys.puts, 'one'); -node> fn('two', 'three'); -one -two -three -``` - ---------------------------------------- - - -### nextTick(callback), setImmediate(callback) - -Calls `callback` on a later loop around the event loop. In Node.js this just -calls `process.nextTick`; in the browser it falls back to `setImmediate(callback)` -if available, otherwise `setTimeout(callback, 0)`, which means other higher priority -events may precede the execution of `callback`. - -This is used internally for browser-compatibility purposes. - -__Arguments__ - -* `callback` - The function to call on a later loop around the event loop. - -__Example__ - -```js -var call_order = []; -async.nextTick(function(){ - call_order.push('two'); - // call_order now equals ['one','two'] -}); -call_order.push('one') -``` - - -### times(n, iterator, [callback]) - -Calls the `iterator` function `n` times, and accumulates results in the same manner -you would use with [`map`](#map). - -__Arguments__ - -* `n` - The number of times to run the function. -* `iterator` - The function to call `n` times. -* `callback` - see [`map`](#map) - -__Example__ - -```js -// Pretend this is some complicated async factory -var createUser = function(id, callback) { - callback(null, { - id: 'user' + id - }) -} -// generate 5 users -async.times(5, function(n, next){ - createUser(n, function(err, user) { - next(err, user) - }) -}, function(err, users) { - // we should now have 5 users -}); -``` - -__Related__ - -* timesSeries(n, iterator, [callback]) -* timesLimit(n, limit, iterator, [callback]) - - -## Utils - - -### memoize(fn, [hasher]) - -Caches the results of an `async` function. When creating a hash to store function -results against, the callback is omitted from the hash and an optional hash -function can be used. - -If no hash function is specified, the first argument is used as a hash key, which may work reasonably if it is a string or a data type that converts to a distinct string. Note that objects and arrays will not behave reasonably. Neither will cases where the other arguments are significant. In such cases, specify your own hash function. - -The cache of results is exposed as the `memo` property of the function returned -by `memoize`. - -__Arguments__ - -* `fn` - The function to proxy and cache results from. -* `hasher` - An optional function for generating a custom hash for storing - results. It has all the arguments applied to it apart from the callback, and - must be synchronous. - -__Example__ - -```js -var slow_fn = function (name, callback) { - // do something - callback(null, result); -}; -var fn = async.memoize(slow_fn); - -// fn can now be used as if it were slow_fn -fn('some name', function () { - // callback -}); -``` - - -### unmemoize(fn) - -Undoes a [`memoize`](#memoize)d function, reverting it to the original, unmemoized -form. Handy for testing. - -__Arguments__ - -* `fn` - the memoized function - ---------------------------------------- - - -### ensureAsync(fn) - -Wrap an async function and ensure it calls its callback on a later tick of the event loop. If the function already calls its callback on a next tick, no extra deferral is added. This is useful for preventing stack overflows (`RangeError: Maximum call stack size exceeded`) and generally keeping [Zalgo](http://blog.izs.me/post/59142742143/designing-apis-for-asynchrony) contained. - -__Arguments__ - -* `fn` - an async function, one that expects a node-style callback as its last argument - -Returns a wrapped function with the exact same call signature as the function passed in. - -__Example__ - -```js -function sometimesAsync(arg, callback) { - if (cache[arg]) { - return callback(null, cache[arg]); // this would be synchronous!! - } else { - doSomeIO(arg, callback); // this IO would be asynchronous - } -} - -// this has a risk of stack overflows if many results are cached in a row -async.mapSeries(args, sometimesAsync, done); - -// this will defer sometimesAsync's callback if necessary, -// preventing stack overflows -async.mapSeries(args, async.ensureAsync(sometimesAsync), done); - -``` - ---------------------------------------- - - -### constant(values...) - -Returns a function that when called, calls-back with the values provided. Useful as the first function in a `waterfall`, or for plugging values in to `auto`. - -__Example__ - -```js -async.waterfall([ - async.constant(42), - function (value, next) { - // value === 42 - }, - //... -], callback); - -async.waterfall([ - async.constant(filename, "utf8"), - fs.readFile, - function (fileData, next) { - //... - } - //... -], callback); - -async.auto({ - hostname: async.constant("https://server.net/"), - port: findFreePort, - launchServer: ["hostname", "port", function (cb, options) { - startServer(options, cb); - }], - //... -}, callback); - -``` - ---------------------------------------- - - - -### asyncify(func) - -__Alias:__ `wrapSync` - -Take a sync function and make it async, passing its return value to a callback. This is useful for plugging sync functions into a waterfall, series, or other async functions. Any arguments passed to the generated function will be passed to the wrapped function (except for the final callback argument). Errors thrown will be passed to the callback. - -__Example__ - -```js -async.waterfall([ - async.apply(fs.readFile, filename, "utf8"), - async.asyncify(JSON.parse), - function (data, next) { - // data is the result of parsing the text. - // If there was a parsing error, it would have been caught. - } -], callback) -``` - -If the function passed to `asyncify` returns a Promise, that promises's resolved/rejected state will be used to call the callback, rather than simply the synchronous return value. Example: - -```js -async.waterfall([ - async.apply(fs.readFile, filename, "utf8"), - async.asyncify(function (contents) { - return db.model.create(contents); - }), - function (model, next) { - // `model` is the instantiated model object. - // If there was an error, this function would be skipped. - } -], callback) -``` - -This also means you can asyncify ES2016 `async` functions. - -```js -var q = async.queue(async.asyncify(async function (file) { - var intermediateStep = await processFile(file); - return await somePromise(intermediateStep) -})); - -q.push(files); -``` - ---------------------------------------- - - -### log(function, arguments) - -Logs the result of an `async` function to the `console`. Only works in Node.js or -in browsers that support `console.log` and `console.error` (such as FF and Chrome). -If multiple arguments are returned from the async function, `console.log` is -called on each argument in order. - -__Arguments__ - -* `function` - The function you want to eventually apply all arguments to. -* `arguments...` - Any number of arguments to apply to the function. - -__Example__ - -```js -var hello = function(name, callback){ - setTimeout(function(){ - callback(null, 'hello ' + name); - }, 1000); -}; -``` -```js -node> async.log(hello, 'world'); -'hello world' -``` - ---------------------------------------- - - -### dir(function, arguments) - -Logs the result of an `async` function to the `console` using `console.dir` to -display the properties of the resulting object. Only works in Node.js or -in browsers that support `console.dir` and `console.error` (such as FF and Chrome). -If multiple arguments are returned from the async function, `console.dir` is -called on each argument in order. - -__Arguments__ - -* `function` - The function you want to eventually apply all arguments to. -* `arguments...` - Any number of arguments to apply to the function. - -__Example__ - -```js -var hello = function(name, callback){ - setTimeout(function(){ - callback(null, {hello: name}); - }, 1000); -}; -``` -```js -node> async.dir(hello, 'world'); -{hello: 'world'} -``` - ---------------------------------------- - - -### noConflict() - -Changes the value of `async` back to its original value, returning a reference to the -`async` object. diff --git a/node_modules/browserify-incremental/node_modules/browserify-cache-api/node_modules/async/dist/async.js b/node_modules/browserify-incremental/node_modules/browserify-cache-api/node_modules/async/dist/async.js deleted file mode 100644 index 31e7620f..00000000 --- a/node_modules/browserify-incremental/node_modules/browserify-cache-api/node_modules/async/dist/async.js +++ /dev/null @@ -1,1265 +0,0 @@ -/*! - * async - * https://github.com/caolan/async - * - * Copyright 2010-2014 Caolan McMahon - * Released under the MIT license - */ -(function () { - - var async = {}; - function noop() {} - function identity(v) { - return v; - } - function toBool(v) { - return !!v; - } - function notId(v) { - return !v; - } - - // global on the server, window in the browser - var previous_async; - - // Establish the root object, `window` (`self`) in the browser, `global` - // on the server, or `this` in some virtual machines. We use `self` - // instead of `window` for `WebWorker` support. - var root = typeof self === 'object' && self.self === self && self || - typeof global === 'object' && global.global === global && global || - this; - - if (root != null) { - previous_async = root.async; - } - - async.noConflict = function () { - root.async = previous_async; - return async; - }; - - function only_once(fn) { - return function() { - if (fn === null) throw new Error("Callback was already called."); - fn.apply(this, arguments); - fn = null; - }; - } - - function _once(fn) { - return function() { - if (fn === null) return; - fn.apply(this, arguments); - fn = null; - }; - } - - //// cross-browser compatiblity functions //// - - var _toString = Object.prototype.toString; - - var _isArray = Array.isArray || function (obj) { - return _toString.call(obj) === '[object Array]'; - }; - - // Ported from underscore.js isObject - var _isObject = function(obj) { - var type = typeof obj; - return type === 'function' || type === 'object' && !!obj; - }; - - function _isArrayLike(arr) { - return _isArray(arr) || ( - // has a positive integer length property - typeof arr.length === "number" && - arr.length >= 0 && - arr.length % 1 === 0 - ); - } - - function _arrayEach(arr, iterator) { - var index = -1, - length = arr.length; - - while (++index < length) { - iterator(arr[index], index, arr); - } - } - - function _map(arr, iterator) { - var index = -1, - length = arr.length, - result = Array(length); - - while (++index < length) { - result[index] = iterator(arr[index], index, arr); - } - return result; - } - - function _range(count) { - return _map(Array(count), function (v, i) { return i; }); - } - - function _reduce(arr, iterator, memo) { - _arrayEach(arr, function (x, i, a) { - memo = iterator(memo, x, i, a); - }); - return memo; - } - - function _forEachOf(object, iterator) { - _arrayEach(_keys(object), function (key) { - iterator(object[key], key); - }); - } - - function _indexOf(arr, item) { - for (var i = 0; i < arr.length; i++) { - if (arr[i] === item) return i; - } - return -1; - } - - var _keys = Object.keys || function (obj) { - var keys = []; - for (var k in obj) { - if (obj.hasOwnProperty(k)) { - keys.push(k); - } - } - return keys; - }; - - function _keyIterator(coll) { - var i = -1; - var len; - var keys; - if (_isArrayLike(coll)) { - len = coll.length; - return function next() { - i++; - return i < len ? i : null; - }; - } else { - keys = _keys(coll); - len = keys.length; - return function next() { - i++; - return i < len ? keys[i] : null; - }; - } - } - - // Similar to ES6's rest param (http://ariya.ofilabs.com/2013/03/es6-and-rest-parameter.html) - // This accumulates the arguments passed into an array, after a given index. - // From underscore.js (https://github.com/jashkenas/underscore/pull/2140). - function _restParam(func, startIndex) { - startIndex = startIndex == null ? func.length - 1 : +startIndex; - return function() { - var length = Math.max(arguments.length - startIndex, 0); - var rest = Array(length); - for (var index = 0; index < length; index++) { - rest[index] = arguments[index + startIndex]; - } - switch (startIndex) { - case 0: return func.call(this, rest); - case 1: return func.call(this, arguments[0], rest); - } - // Currently unused but handle cases outside of the switch statement: - // var args = Array(startIndex + 1); - // for (index = 0; index < startIndex; index++) { - // args[index] = arguments[index]; - // } - // args[startIndex] = rest; - // return func.apply(this, args); - }; - } - - function _withoutIndex(iterator) { - return function (value, index, callback) { - return iterator(value, callback); - }; - } - - //// exported async module functions //// - - //// nextTick implementation with browser-compatible fallback //// - - // capture the global reference to guard against fakeTimer mocks - var _setImmediate = typeof setImmediate === 'function' && setImmediate; - - var _delay = _setImmediate ? function(fn) { - // not a direct alias for IE10 compatibility - _setImmediate(fn); - } : function(fn) { - setTimeout(fn, 0); - }; - - if (typeof process === 'object' && typeof process.nextTick === 'function') { - async.nextTick = process.nextTick; - } else { - async.nextTick = _delay; - } - async.setImmediate = _setImmediate ? _delay : async.nextTick; - - - async.forEach = - async.each = function (arr, iterator, callback) { - return async.eachOf(arr, _withoutIndex(iterator), callback); - }; - - async.forEachSeries = - async.eachSeries = function (arr, iterator, callback) { - return async.eachOfSeries(arr, _withoutIndex(iterator), callback); - }; - - - async.forEachLimit = - async.eachLimit = function (arr, limit, iterator, callback) { - return _eachOfLimit(limit)(arr, _withoutIndex(iterator), callback); - }; - - async.forEachOf = - async.eachOf = function (object, iterator, callback) { - callback = _once(callback || noop); - object = object || []; - - var iter = _keyIterator(object); - var key, completed = 0; - - while ((key = iter()) != null) { - completed += 1; - iterator(object[key], key, only_once(done)); - } - - if (completed === 0) callback(null); - - function done(err) { - completed--; - if (err) { - callback(err); - } - // Check key is null in case iterator isn't exhausted - // and done resolved synchronously. - else if (key === null && completed <= 0) { - callback(null); - } - } - }; - - async.forEachOfSeries = - async.eachOfSeries = function (obj, iterator, callback) { - callback = _once(callback || noop); - obj = obj || []; - var nextKey = _keyIterator(obj); - var key = nextKey(); - function iterate() { - var sync = true; - if (key === null) { - return callback(null); - } - iterator(obj[key], key, only_once(function (err) { - if (err) { - callback(err); - } - else { - key = nextKey(); - if (key === null) { - return callback(null); - } else { - if (sync) { - async.setImmediate(iterate); - } else { - iterate(); - } - } - } - })); - sync = false; - } - iterate(); - }; - - - - async.forEachOfLimit = - async.eachOfLimit = function (obj, limit, iterator, callback) { - _eachOfLimit(limit)(obj, iterator, callback); - }; - - function _eachOfLimit(limit) { - - return function (obj, iterator, callback) { - callback = _once(callback || noop); - obj = obj || []; - var nextKey = _keyIterator(obj); - if (limit <= 0) { - return callback(null); - } - var done = false; - var running = 0; - var errored = false; - - (function replenish () { - if (done && running <= 0) { - return callback(null); - } - - while (running < limit && !errored) { - var key = nextKey(); - if (key === null) { - done = true; - if (running <= 0) { - callback(null); - } - return; - } - running += 1; - iterator(obj[key], key, only_once(function (err) { - running -= 1; - if (err) { - callback(err); - errored = true; - } - else { - replenish(); - } - })); - } - })(); - }; - } - - - function doParallel(fn) { - return function (obj, iterator, callback) { - return fn(async.eachOf, obj, iterator, callback); - }; - } - function doParallelLimit(fn) { - return function (obj, limit, iterator, callback) { - return fn(_eachOfLimit(limit), obj, iterator, callback); - }; - } - function doSeries(fn) { - return function (obj, iterator, callback) { - return fn(async.eachOfSeries, obj, iterator, callback); - }; - } - - function _asyncMap(eachfn, arr, iterator, callback) { - callback = _once(callback || noop); - arr = arr || []; - var results = _isArrayLike(arr) ? [] : {}; - eachfn(arr, function (value, index, callback) { - iterator(value, function (err, v) { - results[index] = v; - callback(err); - }); - }, function (err) { - callback(err, results); - }); - } - - async.map = doParallel(_asyncMap); - async.mapSeries = doSeries(_asyncMap); - async.mapLimit = doParallelLimit(_asyncMap); - - // reduce only has a series version, as doing reduce in parallel won't - // work in many situations. - async.inject = - async.foldl = - async.reduce = function (arr, memo, iterator, callback) { - async.eachOfSeries(arr, function (x, i, callback) { - iterator(memo, x, function (err, v) { - memo = v; - callback(err); - }); - }, function (err) { - callback(err, memo); - }); - }; - - async.foldr = - async.reduceRight = function (arr, memo, iterator, callback) { - var reversed = _map(arr, identity).reverse(); - async.reduce(reversed, memo, iterator, callback); - }; - - async.transform = function (arr, memo, iterator, callback) { - if (arguments.length === 3) { - callback = iterator; - iterator = memo; - memo = _isArray(arr) ? [] : {}; - } - - async.eachOf(arr, function(v, k, cb) { - iterator(memo, v, k, cb); - }, function(err) { - callback(err, memo); - }); - }; - - function _filter(eachfn, arr, iterator, callback) { - var results = []; - eachfn(arr, function (x, index, callback) { - iterator(x, function (v) { - if (v) { - results.push({index: index, value: x}); - } - callback(); - }); - }, function () { - callback(_map(results.sort(function (a, b) { - return a.index - b.index; - }), function (x) { - return x.value; - })); - }); - } - - async.select = - async.filter = doParallel(_filter); - - async.selectLimit = - async.filterLimit = doParallelLimit(_filter); - - async.selectSeries = - async.filterSeries = doSeries(_filter); - - function _reject(eachfn, arr, iterator, callback) { - _filter(eachfn, arr, function(value, cb) { - iterator(value, function(v) { - cb(!v); - }); - }, callback); - } - async.reject = doParallel(_reject); - async.rejectLimit = doParallelLimit(_reject); - async.rejectSeries = doSeries(_reject); - - function _createTester(eachfn, check, getResult) { - return function(arr, limit, iterator, cb) { - function done() { - if (cb) cb(getResult(false, void 0)); - } - function iteratee(x, _, callback) { - if (!cb) return callback(); - iterator(x, function (v) { - if (cb && check(v)) { - cb(getResult(true, x)); - cb = iterator = false; - } - callback(); - }); - } - if (arguments.length > 3) { - eachfn(arr, limit, iteratee, done); - } else { - cb = iterator; - iterator = limit; - eachfn(arr, iteratee, done); - } - }; - } - - async.any = - async.some = _createTester(async.eachOf, toBool, identity); - - async.someLimit = _createTester(async.eachOfLimit, toBool, identity); - - async.all = - async.every = _createTester(async.eachOf, notId, notId); - - async.everyLimit = _createTester(async.eachOfLimit, notId, notId); - - function _findGetResult(v, x) { - return x; - } - async.detect = _createTester(async.eachOf, identity, _findGetResult); - async.detectSeries = _createTester(async.eachOfSeries, identity, _findGetResult); - async.detectLimit = _createTester(async.eachOfLimit, identity, _findGetResult); - - async.sortBy = function (arr, iterator, callback) { - async.map(arr, function (x, callback) { - iterator(x, function (err, criteria) { - if (err) { - callback(err); - } - else { - callback(null, {value: x, criteria: criteria}); - } - }); - }, function (err, results) { - if (err) { - return callback(err); - } - else { - callback(null, _map(results.sort(comparator), function (x) { - return x.value; - })); - } - - }); - - function comparator(left, right) { - var a = left.criteria, b = right.criteria; - return a < b ? -1 : a > b ? 1 : 0; - } - }; - - async.auto = function (tasks, concurrency, callback) { - if (typeof arguments[1] === 'function') { - // concurrency is optional, shift the args. - callback = concurrency; - concurrency = null; - } - callback = _once(callback || noop); - var keys = _keys(tasks); - var remainingTasks = keys.length; - if (!remainingTasks) { - return callback(null); - } - if (!concurrency) { - concurrency = remainingTasks; - } - - var results = {}; - var runningTasks = 0; - - var hasError = false; - - var listeners = []; - function addListener(fn) { - listeners.unshift(fn); - } - function removeListener(fn) { - var idx = _indexOf(listeners, fn); - if (idx >= 0) listeners.splice(idx, 1); - } - function taskComplete() { - remainingTasks--; - _arrayEach(listeners.slice(0), function (fn) { - fn(); - }); - } - - addListener(function () { - if (!remainingTasks) { - callback(null, results); - } - }); - - _arrayEach(keys, function (k) { - if (hasError) return; - var task = _isArray(tasks[k]) ? tasks[k]: [tasks[k]]; - var taskCallback = _restParam(function(err, args) { - runningTasks--; - if (args.length <= 1) { - args = args[0]; - } - if (err) { - var safeResults = {}; - _forEachOf(results, function(val, rkey) { - safeResults[rkey] = val; - }); - safeResults[k] = args; - hasError = true; - - callback(err, safeResults); - } - else { - results[k] = args; - async.setImmediate(taskComplete); - } - }); - var requires = task.slice(0, task.length - 1); - // prevent dead-locks - var len = requires.length; - var dep; - while (len--) { - if (!(dep = tasks[requires[len]])) { - throw new Error('Has nonexistent dependency in ' + requires.join(', ')); - } - if (_isArray(dep) && _indexOf(dep, k) >= 0) { - throw new Error('Has cyclic dependencies'); - } - } - function ready() { - return runningTasks < concurrency && _reduce(requires, function (a, x) { - return (a && results.hasOwnProperty(x)); - }, true) && !results.hasOwnProperty(k); - } - if (ready()) { - runningTasks++; - task[task.length - 1](taskCallback, results); - } - else { - addListener(listener); - } - function listener() { - if (ready()) { - runningTasks++; - removeListener(listener); - task[task.length - 1](taskCallback, results); - } - } - }); - }; - - - - async.retry = function(times, task, callback) { - var DEFAULT_TIMES = 5; - var DEFAULT_INTERVAL = 0; - - var attempts = []; - - var opts = { - times: DEFAULT_TIMES, - interval: DEFAULT_INTERVAL - }; - - function parseTimes(acc, t){ - if(typeof t === 'number'){ - acc.times = parseInt(t, 10) || DEFAULT_TIMES; - } else if(typeof t === 'object'){ - acc.times = parseInt(t.times, 10) || DEFAULT_TIMES; - acc.interval = parseInt(t.interval, 10) || DEFAULT_INTERVAL; - } else { - throw new Error('Unsupported argument type for \'times\': ' + typeof t); - } - } - - var length = arguments.length; - if (length < 1 || length > 3) { - throw new Error('Invalid arguments - must be either (task), (task, callback), (times, task) or (times, task, callback)'); - } else if (length <= 2 && typeof times === 'function') { - callback = task; - task = times; - } - if (typeof times !== 'function') { - parseTimes(opts, times); - } - opts.callback = callback; - opts.task = task; - - function wrappedTask(wrappedCallback, wrappedResults) { - function retryAttempt(task, finalAttempt) { - return function(seriesCallback) { - task(function(err, result){ - seriesCallback(!err || finalAttempt, {err: err, result: result}); - }, wrappedResults); - }; - } - - function retryInterval(interval){ - return function(seriesCallback){ - setTimeout(function(){ - seriesCallback(null); - }, interval); - }; - } - - while (opts.times) { - - var finalAttempt = !(opts.times-=1); - attempts.push(retryAttempt(opts.task, finalAttempt)); - if(!finalAttempt && opts.interval > 0){ - attempts.push(retryInterval(opts.interval)); - } - } - - async.series(attempts, function(done, data){ - data = data[data.length - 1]; - (wrappedCallback || opts.callback)(data.err, data.result); - }); - } - - // If a callback is passed, run this as a controll flow - return opts.callback ? wrappedTask() : wrappedTask; - }; - - async.waterfall = function (tasks, callback) { - callback = _once(callback || noop); - if (!_isArray(tasks)) { - var err = new Error('First argument to waterfall must be an array of functions'); - return callback(err); - } - if (!tasks.length) { - return callback(); - } - function wrapIterator(iterator) { - return _restParam(function (err, args) { - if (err) { - callback.apply(null, [err].concat(args)); - } - else { - var next = iterator.next(); - if (next) { - args.push(wrapIterator(next)); - } - else { - args.push(callback); - } - ensureAsync(iterator).apply(null, args); - } - }); - } - wrapIterator(async.iterator(tasks))(); - }; - - function _parallel(eachfn, tasks, callback) { - callback = callback || noop; - var results = _isArrayLike(tasks) ? [] : {}; - - eachfn(tasks, function (task, key, callback) { - task(_restParam(function (err, args) { - if (args.length <= 1) { - args = args[0]; - } - results[key] = args; - callback(err); - })); - }, function (err) { - callback(err, results); - }); - } - - async.parallel = function (tasks, callback) { - _parallel(async.eachOf, tasks, callback); - }; - - async.parallelLimit = function(tasks, limit, callback) { - _parallel(_eachOfLimit(limit), tasks, callback); - }; - - async.series = function(tasks, callback) { - _parallel(async.eachOfSeries, tasks, callback); - }; - - async.iterator = function (tasks) { - function makeCallback(index) { - function fn() { - if (tasks.length) { - tasks[index].apply(null, arguments); - } - return fn.next(); - } - fn.next = function () { - return (index < tasks.length - 1) ? makeCallback(index + 1): null; - }; - return fn; - } - return makeCallback(0); - }; - - async.apply = _restParam(function (fn, args) { - return _restParam(function (callArgs) { - return fn.apply( - null, args.concat(callArgs) - ); - }); - }); - - function _concat(eachfn, arr, fn, callback) { - var result = []; - eachfn(arr, function (x, index, cb) { - fn(x, function (err, y) { - result = result.concat(y || []); - cb(err); - }); - }, function (err) { - callback(err, result); - }); - } - async.concat = doParallel(_concat); - async.concatSeries = doSeries(_concat); - - async.whilst = function (test, iterator, callback) { - callback = callback || noop; - if (test()) { - var next = _restParam(function(err, args) { - if (err) { - callback(err); - } else if (test.apply(this, args)) { - iterator(next); - } else { - callback.apply(null, [null].concat(args)); - } - }); - iterator(next); - } else { - callback(null); - } - }; - - async.doWhilst = function (iterator, test, callback) { - var calls = 0; - return async.whilst(function() { - return ++calls <= 1 || test.apply(this, arguments); - }, iterator, callback); - }; - - async.until = function (test, iterator, callback) { - return async.whilst(function() { - return !test.apply(this, arguments); - }, iterator, callback); - }; - - async.doUntil = function (iterator, test, callback) { - return async.doWhilst(iterator, function() { - return !test.apply(this, arguments); - }, callback); - }; - - async.during = function (test, iterator, callback) { - callback = callback || noop; - - var next = _restParam(function(err, args) { - if (err) { - callback(err); - } else { - args.push(check); - test.apply(this, args); - } - }); - - var check = function(err, truth) { - if (err) { - callback(err); - } else if (truth) { - iterator(next); - } else { - callback(null); - } - }; - - test(check); - }; - - async.doDuring = function (iterator, test, callback) { - var calls = 0; - async.during(function(next) { - if (calls++ < 1) { - next(null, true); - } else { - test.apply(this, arguments); - } - }, iterator, callback); - }; - - function _queue(worker, concurrency, payload) { - if (concurrency == null) { - concurrency = 1; - } - else if(concurrency === 0) { - throw new Error('Concurrency must not be zero'); - } - function _insert(q, data, pos, callback) { - if (callback != null && typeof callback !== "function") { - throw new Error("task callback must be a function"); - } - q.started = true; - if (!_isArray(data)) { - data = [data]; - } - if(data.length === 0 && q.idle()) { - // call drain immediately if there are no tasks - return async.setImmediate(function() { - q.drain(); - }); - } - _arrayEach(data, function(task) { - var item = { - data: task, - callback: callback || noop - }; - - if (pos) { - q.tasks.unshift(item); - } else { - q.tasks.push(item); - } - - if (q.tasks.length === q.concurrency) { - q.saturated(); - } - }); - async.setImmediate(q.process); - } - function _next(q, tasks) { - return function(){ - workers -= 1; - - var removed = false; - var args = arguments; - _arrayEach(tasks, function (task) { - _arrayEach(workersList, function (worker, index) { - if (worker === task && !removed) { - workersList.splice(index, 1); - removed = true; - } - }); - - task.callback.apply(task, args); - }); - if (q.tasks.length + workers === 0) { - q.drain(); - } - q.process(); - }; - } - - var workers = 0; - var workersList = []; - var q = { - tasks: [], - concurrency: concurrency, - payload: payload, - saturated: noop, - empty: noop, - drain: noop, - started: false, - paused: false, - push: function (data, callback) { - _insert(q, data, false, callback); - }, - kill: function () { - q.drain = noop; - q.tasks = []; - }, - unshift: function (data, callback) { - _insert(q, data, true, callback); - }, - process: function () { - while(!q.paused && workers < q.concurrency && q.tasks.length){ - - var tasks = q.payload ? - q.tasks.splice(0, q.payload) : - q.tasks.splice(0, q.tasks.length); - - var data = _map(tasks, function (task) { - return task.data; - }); - - if (q.tasks.length === 0) { - q.empty(); - } - workers += 1; - workersList.push(tasks[0]); - var cb = only_once(_next(q, tasks)); - worker(data, cb); - } - }, - length: function () { - return q.tasks.length; - }, - running: function () { - return workers; - }, - workersList: function () { - return workersList; - }, - idle: function() { - return q.tasks.length + workers === 0; - }, - pause: function () { - q.paused = true; - }, - resume: function () { - if (q.paused === false) { return; } - q.paused = false; - var resumeCount = Math.min(q.concurrency, q.tasks.length); - // Need to call q.process once per concurrent - // worker to preserve full concurrency after pause - for (var w = 1; w <= resumeCount; w++) { - async.setImmediate(q.process); - } - } - }; - return q; - } - - async.queue = function (worker, concurrency) { - var q = _queue(function (items, cb) { - worker(items[0], cb); - }, concurrency, 1); - - return q; - }; - - async.priorityQueue = function (worker, concurrency) { - - function _compareTasks(a, b){ - return a.priority - b.priority; - } - - function _binarySearch(sequence, item, compare) { - var beg = -1, - end = sequence.length - 1; - while (beg < end) { - var mid = beg + ((end - beg + 1) >>> 1); - if (compare(item, sequence[mid]) >= 0) { - beg = mid; - } else { - end = mid - 1; - } - } - return beg; - } - - function _insert(q, data, priority, callback) { - if (callback != null && typeof callback !== "function") { - throw new Error("task callback must be a function"); - } - q.started = true; - if (!_isArray(data)) { - data = [data]; - } - if(data.length === 0) { - // call drain immediately if there are no tasks - return async.setImmediate(function() { - q.drain(); - }); - } - _arrayEach(data, function(task) { - var item = { - data: task, - priority: priority, - callback: typeof callback === 'function' ? callback : noop - }; - - q.tasks.splice(_binarySearch(q.tasks, item, _compareTasks) + 1, 0, item); - - if (q.tasks.length === q.concurrency) { - q.saturated(); - } - async.setImmediate(q.process); - }); - } - - // Start with a normal queue - var q = async.queue(worker, concurrency); - - // Override push to accept second parameter representing priority - q.push = function (data, priority, callback) { - _insert(q, data, priority, callback); - }; - - // Remove unshift function - delete q.unshift; - - return q; - }; - - async.cargo = function (worker, payload) { - return _queue(worker, 1, payload); - }; - - function _console_fn(name) { - return _restParam(function (fn, args) { - fn.apply(null, args.concat([_restParam(function (err, args) { - if (typeof console === 'object') { - if (err) { - if (console.error) { - console.error(err); - } - } - else if (console[name]) { - _arrayEach(args, function (x) { - console[name](x); - }); - } - } - })])); - }); - } - async.log = _console_fn('log'); - async.dir = _console_fn('dir'); - /*async.info = _console_fn('info'); - async.warn = _console_fn('warn'); - async.error = _console_fn('error');*/ - - async.memoize = function (fn, hasher) { - var memo = {}; - var queues = {}; - var has = Object.prototype.hasOwnProperty; - hasher = hasher || identity; - var memoized = _restParam(function memoized(args) { - var callback = args.pop(); - var key = hasher.apply(null, args); - if (has.call(memo, key)) { - async.setImmediate(function () { - callback.apply(null, memo[key]); - }); - } - else if (has.call(queues, key)) { - queues[key].push(callback); - } - else { - queues[key] = [callback]; - fn.apply(null, args.concat([_restParam(function (args) { - memo[key] = args; - var q = queues[key]; - delete queues[key]; - for (var i = 0, l = q.length; i < l; i++) { - q[i].apply(null, args); - } - })])); - } - }); - memoized.memo = memo; - memoized.unmemoized = fn; - return memoized; - }; - - async.unmemoize = function (fn) { - return function () { - return (fn.unmemoized || fn).apply(null, arguments); - }; - }; - - function _times(mapper) { - return function (count, iterator, callback) { - mapper(_range(count), iterator, callback); - }; - } - - async.times = _times(async.map); - async.timesSeries = _times(async.mapSeries); - async.timesLimit = function (count, limit, iterator, callback) { - return async.mapLimit(_range(count), limit, iterator, callback); - }; - - async.seq = function (/* functions... */) { - var fns = arguments; - return _restParam(function (args) { - var that = this; - - var callback = args[args.length - 1]; - if (typeof callback == 'function') { - args.pop(); - } else { - callback = noop; - } - - async.reduce(fns, args, function (newargs, fn, cb) { - fn.apply(that, newargs.concat([_restParam(function (err, nextargs) { - cb(err, nextargs); - })])); - }, - function (err, results) { - callback.apply(that, [err].concat(results)); - }); - }); - }; - - async.compose = function (/* functions... */) { - return async.seq.apply(null, Array.prototype.reverse.call(arguments)); - }; - - - function _applyEach(eachfn) { - return _restParam(function(fns, args) { - var go = _restParam(function(args) { - var that = this; - var callback = args.pop(); - return eachfn(fns, function (fn, _, cb) { - fn.apply(that, args.concat([cb])); - }, - callback); - }); - if (args.length) { - return go.apply(this, args); - } - else { - return go; - } - }); - } - - async.applyEach = _applyEach(async.eachOf); - async.applyEachSeries = _applyEach(async.eachOfSeries); - - - async.forever = function (fn, callback) { - var done = only_once(callback || noop); - var task = ensureAsync(fn); - function next(err) { - if (err) { - return done(err); - } - task(next); - } - next(); - }; - - function ensureAsync(fn) { - return _restParam(function (args) { - var callback = args.pop(); - args.push(function () { - var innerArgs = arguments; - if (sync) { - async.setImmediate(function () { - callback.apply(null, innerArgs); - }); - } else { - callback.apply(null, innerArgs); - } - }); - var sync = true; - fn.apply(this, args); - sync = false; - }); - } - - async.ensureAsync = ensureAsync; - - async.constant = _restParam(function(values) { - var args = [null].concat(values); - return function (callback) { - return callback.apply(this, args); - }; - }); - - async.wrapSync = - async.asyncify = function asyncify(func) { - return _restParam(function (args) { - var callback = args.pop(); - var result; - try { - result = func.apply(this, args); - } catch (e) { - return callback(e); - } - // if result is Promise object - if (_isObject(result) && typeof result.then === "function") { - result.then(function(value) { - callback(null, value); - })["catch"](function(err) { - callback(err.message ? err : new Error(err)); - }); - } else { - callback(null, result); - } - }); - }; - - // Node.js - if (typeof module === 'object' && module.exports) { - module.exports = async; - } - // AMD / RequireJS - else if (typeof define === 'function' && define.amd) { - define([], function () { - return async; - }); - } - // included directly via - diff --git a/node_modules/browserify/example/multiple_bundles/static/boop.html b/node_modules/browserify/example/multiple_bundles/static/boop.html deleted file mode 100644 index 13dab7e8..00000000 --- a/node_modules/browserify/example/multiple_bundles/static/boop.html +++ /dev/null @@ -1,2 +0,0 @@ - - diff --git a/node_modules/browserify/example/source_maps/build.js b/node_modules/browserify/example/source_maps/build.js deleted file mode 100644 index e65bc7e6..00000000 --- a/node_modules/browserify/example/source_maps/build.js +++ /dev/null @@ -1,13 +0,0 @@ -var browserify = require('../..'), - path = require('path'), - fs = require('fs'), - bundlePath = path.join(__dirname, 'js', 'build', 'bundle.js'); - -browserify() - .require(require.resolve('./js/main.js'), { - entry: true, - debug: true - }) - .bundle() - .on('error', function (err) { console.error(err); }) - .pipe(fs.createWriteStream(bundlePath)); diff --git a/node_modules/browserify/example/source_maps/build.sh b/node_modules/browserify/example/source_maps/build.sh deleted file mode 100755 index 6ae19fb0..00000000 --- a/node_modules/browserify/example/source_maps/build.sh +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/bash -../../bin/cmd.js --debug -e ./js/main.js > js/build/bundle.js - -echo bundle was generated with source maps, you can now open index.html diff --git a/node_modules/browserify/example/source_maps/index.html b/node_modules/browserify/example/source_maps/index.html deleted file mode 100644 index d06c889d..00000000 --- a/node_modules/browserify/example/source_maps/index.html +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - - - -

    Open your dev tools ;)

    - - diff --git a/node_modules/browserify/example/source_maps/js/build/.npmignore b/node_modules/browserify/example/source_maps/js/build/.npmignore deleted file mode 100644 index f935021a..00000000 --- a/node_modules/browserify/example/source_maps/js/build/.npmignore +++ /dev/null @@ -1 +0,0 @@ -!.gitignore diff --git a/node_modules/browserify/example/source_maps/js/build/bundle.js b/node_modules/browserify/example/source_maps/js/build/bundle.js deleted file mode 100644 index a807c46f..00000000 --- a/node_modules/browserify/example/source_maps/js/build/bundle.js +++ /dev/null @@ -1,28 +0,0 @@ -;(function(e,t,n,r){function i(r){if(!n[r]){if(!t[r]){if(e)return e(r);throw new Error("Cannot find module '"+r+"'")}var s=n[r]={exports:{}};t[r][0](function(e){var n=t[r][1][e];return i(n?n:e)},s,s.exports)}return n[r].exports}for(var s=0;s= 0) return next(); - if (self._external.indexOf(row.file) >= 0) return next(); - - if (isAbsolutePath(row.id)) { - row.id = '/' + path.relative(basedir, row.file); - } - Object.keys(row.deps || {}).forEach(function (key) { - row.deps[key] = '/' + path.relative(basedir, row.deps[key]); - }); - this.push(row); - next(); - })); - } - return pipeline; -}; - -Browserify.prototype._createDeps = function (opts) { - var self = this; - var mopts = xtend(opts); - var basedir = defined(opts.basedir, process.cwd()); - - // Let mdeps populate these values since it will be resolving file paths - // anyway. - mopts.expose = this._expose; - mopts.extensions = [ '.js', '.json' ].concat(mopts.extensions || []); - self._extensions = mopts.extensions; - - mopts.transform = []; - mopts.transformKey = [ 'browserify', 'transform' ]; - mopts.postFilter = function (id, file, pkg) { - if (opts.postFilter && !opts.postFilter(id, file, pkg)) return false; - if (self._external.indexOf(file) >= 0) return false; - if (self._exclude.indexOf(file) >= 0) return false; - - //filter transforms on module dependencies - if (pkg && pkg.browserify && pkg.browserify.transform) { - //In edge cases it may be a string - pkg.browserify.transform = [].concat(pkg.browserify.transform) - .filter(Boolean) - .filter(self._filterTransform); - } - return true; - }; - mopts.filter = function (id) { - if (opts.filter && !opts.filter(id)) return false; - if (self._external.indexOf(id) >= 0) return false; - if (self._exclude.indexOf(id) >= 0) return false; - if (opts.bundleExternal === false && isExternalModule(id)) { - return false; - } - return true; - }; - mopts.resolve = function (id, parent, cb) { - if (self._ignore.indexOf(id) >= 0) return cb(null, paths.empty, {}); - - self._bresolve(id, parent, function (err, file, pkg) { - if (file && self._ignore.indexOf(file) >= 0) { - return cb(null, paths.empty, {}); - } - if (file && self._ignore.length) { - var nm = file.split('/node_modules/')[1]; - if (nm) { - nm = nm.split('/')[0]; - if (self._ignore.indexOf(nm) >= 0) { - return cb(null, paths.empty, {}); - } - } - } - - if (file) { - var ex = '/' + path.relative(basedir, file); - if (self._external.indexOf(ex) >= 0) { - return cb(null, ex); - } - if (self._exclude.indexOf(ex) >= 0) { - return cb(null, ex); - } - if (self._ignore.indexOf(ex) >= 0) { - return cb(null, paths.empty, {}); - } - } - if (err) cb(err, file, pkg) - else if (file) fs.realpath(file, function (err, res) { - cb(err, res, pkg); - }); - else cb(err, null, pkg) - }); - }; - - if (opts.builtins === false) { - mopts.modules = {}; - self._exclude.push.apply(self._exclude, Object.keys(builtins)); - } - else if (opts.builtins && isarray(opts.builtins)) { - mopts.modules = {}; - opts.builtins.forEach(function (key) { - mopts.modules[key] = builtins[key]; - }); - } - else if (opts.builtins && typeof opts.builtins === 'object') { - mopts.modules = opts.builtins; - } - else mopts.modules = xtend(builtins); - - Object.keys(builtins).forEach(function (key) { - if (!has(mopts.modules, key)) self._exclude.push(key); - }); - - mopts.globalTransform = []; - if (!this._bundled) { - this.once('bundle', function () { - self.pipeline.write({ - transform: globalTr, - global: true, - options: {} - }); - }); - } - - var no = [].concat(opts.noParse).filter(Boolean); - var absno = no.filter(function(x) { - return typeof x === 'string'; - }).map(function (x) { - return path.resolve(basedir, x); - }); - - function globalTr (file) { - if (opts.detectGlobals === false) return through(); - - if (opts.noParse === true) return through(); - if (no.indexOf(file) >= 0) return through(); - if (absno.indexOf(file) >= 0) return through(); - - var parts = file.split('/node_modules/'); - for (var i = 0; i < no.length; i++) { - if (typeof no[i] === 'function' && no[i](file)) { - return through(); - } - else if (no[i] === parts[parts.length-1].split('/')[0]) { - return through(); - } - else if (no[i] === parts[parts.length-1]) { - return through(); - } - } - - var vars = xtend({ - process: function () { return "require('_process')" }, - }, opts.insertGlobalVars); - - if (opts.bundleExternal === false) { - delete vars.process; - delete vars.buffer; - } - - return insertGlobals(file, xtend(opts, { - debug: opts.debug, - always: opts.insertGlobals, - basedir: opts.commondir === false - ? '/' - : opts.basedir || process.cwd() - , - vars: vars - })); - } - return mdeps(mopts); -}; - -Browserify.prototype._recorder = function (opts) { - var self = this; - var ended = false; - this._recorded = []; - - if (!this._ticked) { - process.nextTick(function () { - self._ticked = true; - self._recorded.forEach(function (row) { - stream.push(row); - }); - if (ended) stream.push(null); - }); - } - - var stream = through.obj(write, end); - return stream; - - function write (row, enc, next) { - self._recorded.push(row); - if (self._ticked) this.push(row); - next(); - } - function end () { - ended = true; - if (self._ticked) this.push(null); - } -}; - -Browserify.prototype._json = function () { - return through.obj(function (row, enc, next) { - if (/\.json$/.test(row.file)) { - row.source = 'module.exports=' + sanitize(row.source); - } - this.push(row); - next(); - }); -}; - -Browserify.prototype._unbom = function () { - return through.obj(function (row, enc, next) { - if (/^\ufeff/.test(row.source)) { - row.source = row.source.replace(/^\ufeff/, ''); - } - this.push(row); - next(); - }); -}; - -Browserify.prototype._unshebang = function () { - return through.obj(function (row, enc, next) { - if (/^#!/.test(row.source)) { - row.source = row.source.replace(/^#![^\n]*\n/, ''); - } - this.push(row); - next(); - }); -}; - -Browserify.prototype._syntax = function () { - var self = this; - return through.obj(function (row, enc, next) { - var h = shasum(row.source); - if (typeof self._syntaxCache[h] === 'undefined') { - var err = syntaxError(row.source, row.file || row.id); - if (err) return this.emit('error', err); - self._syntaxCache[h] = true; - } - this.push(row); - next(); - }); -}; - -Browserify.prototype._dedupe = function () { - return through.obj(function (row, enc, next) { - if (!row.dedupeIndex && row.dedupe) { - row.source = 'arguments[4][' - + JSON.stringify(row.dedupe) - + '][0].apply(exports,arguments)' - ; - row.nomap = true; - } - else if (row.dedupeIndex) { - row.source = 'arguments[4][' - + JSON.stringify(row.dedupeIndex) - + '][0].apply(exports,arguments)' - ; - row.nomap = true; - } - if (row.dedupeIndex && row.indexDeps) { - row.indexDeps.dup = row.dedupeIndex; - } - this.push(row); - next(); - }); -}; - -Browserify.prototype._label = function (opts) { - var self = this; - var basedir = defined(opts.basedir, process.cwd()); - - return through.obj(function (row, enc, next) { - var prev = row.id; - - if (self._external.indexOf(row.id) >= 0) return next(); - if (self._external.indexOf('/' + path.relative(basedir, row.id)) >= 0) { - return next(); - } - if (self._external.indexOf(row.file) >= 0) return next(); - - if (row.index) row.id = row.index; - - self.emit('label', prev, row.id); - if (row.indexDeps) row.deps = row.indexDeps || {}; - - Object.keys(row.deps).forEach(function (key) { - if (self._expose[key]) { - row.deps[key] = key; - return; - } - - var afile = path.resolve(path.dirname(row.file), key); - var rfile = '/' + path.relative(basedir, afile); - if (self._external.indexOf(rfile) >= 0) { - row.deps[key] = rfile; - } - if (self._external.indexOf(afile) >= 0) { - row.deps[key] = rfile; - } - if (self._external.indexOf(key) >= 0) { - row.deps[key] = key; - return; - } - - for (var i = 0; i < self._extensions.length; i++) { - var ex = self._extensions[i]; - if (self._external.indexOf(rfile + ex) >= 0) { - row.deps[key] = rfile + ex; - break; - } - } - }); - - if (row.entry || row.expose) { - self._bpack.standaloneModule = row.id; - } - this.push(row); - next(); - }); -}; - -Browserify.prototype._emitDeps = function () { - var self = this; - return through.obj(function (row, enc, next) { - self.emit('dep', row); - this.push(row); - next(); - }) -}; - -Browserify.prototype._debug = function (opts) { - var basedir = defined(opts.basedir, process.cwd()); - return through.obj(function (row, enc, next) { - if (opts.debug) { - row.sourceRoot = 'file://localhost'; - row.sourceFile = path.relative(basedir, row.file) - .replace(/\\/g, '/'); - } - this.push(row); - next(); - }); -}; - -Browserify.prototype.reset = function (opts) { - if (!opts) opts = {}; - var hadExports = this._bpack.hasExports; - this.pipeline = this._createPipeline(xtend(opts, this._options)); - this._bpack.hasExports = hadExports; - this._entryOrder = 0; - this._bundled = false; - this.emit('reset'); -}; - -Browserify.prototype.bundle = function (cb) { - var self = this; - if (cb && typeof cb === 'object') { - throw new Error( - 'bundle() no longer accepts option arguments.\n' - + 'Move all option arguments to the browserify() constructor.' - ); - } - if (this._bundled) { - var recorded = this._recorded; - this.reset(); - recorded.forEach(function (x) { - self.pipeline.write(x); - }); - } - var output = readonly(this.pipeline); - if (cb) { - output.on('error', cb); - this.pipeline.pipe(concat(function (body) { - cb(null, body); - })); - } - - function ready () { - self.emit('bundle', output); - self.pipeline.end(); - } - - if (this._pending === 0) ready(); - else this.once('_ready', ready); - - this._bundled = true; - return output; -}; - -function isStream (s) { return s && typeof s.pipe === 'function' } -function isAbsolutePath (file) { - var regexp = process.platform === 'win32' ? - /^\w:/ : - /^\//; - return regexp.test(file); -} -function isExternalModule (file) { - var regexp = process.platform === 'win32' ? - /^(\.|\w:)/ : - /^[\/.]/; - return !regexp.test(file); -} diff --git a/node_modules/browserify/lib/_empty.js b/node_modules/browserify/lib/_empty.js deleted file mode 100644 index e69de29b..00000000 diff --git a/node_modules/browserify/lib/builtins.js b/node_modules/browserify/lib/builtins.js deleted file mode 100644 index 74326515..00000000 --- a/node_modules/browserify/lib/builtins.js +++ /dev/null @@ -1,38 +0,0 @@ -exports.assert = require.resolve('assert/'); -exports.buffer = require.resolve('buffer/'); -exports.child_process = require.resolve('./_empty.js'); -exports.cluster = require.resolve('./_empty.js'); -exports.console = require.resolve('console-browserify'); -exports.constants = require.resolve('constants-browserify'); -exports.crypto = require.resolve('crypto-browserify'); -exports.dgram = require.resolve('./_empty.js'); -exports.dns = require.resolve('./_empty.js'); -exports.domain = require.resolve('domain-browser'); -exports.events = require.resolve('events/'); -exports.fs = require.resolve('./_empty.js'); -exports.http = require.resolve('http-browserify'); -exports.https = require.resolve('https-browserify'); -exports.module = require.resolve('./_empty.js'); -exports.net = require.resolve('./_empty.js'); -exports.os = require.resolve('os-browserify/browser.js'); -exports.path = require.resolve('path-browserify'); -exports.punycode = require.resolve('punycode/'); -exports.querystring = require.resolve('querystring-es3/'); -exports.readline = require.resolve('./_empty.js'); -exports.repl = require.resolve('./_empty.js'); -exports.stream = require.resolve('stream-browserify'); -exports._stream_duplex = require.resolve('readable-stream/duplex.js'); -exports._stream_passthrough = require.resolve('readable-stream/passthrough.js'); -exports._stream_readable = require.resolve('readable-stream/readable.js'); -exports._stream_transform = require.resolve('readable-stream/transform.js'); -exports._stream_writable = require.resolve('readable-stream/writable.js'); -exports.string_decoder = require.resolve('string_decoder/'); -exports.sys = require.resolve('util/util.js'); -exports.timers = require.resolve('timers-browserify'); -exports.tls = require.resolve('./_empty.js'); -exports.tty = require.resolve('tty-browserify'); -exports.url = require.resolve('url/'); -exports.util = require.resolve('util/util.js'); -exports.vm = require.resolve('vm-browserify'); -exports.zlib = require.resolve('browserify-zlib'); -exports._process = require.resolve('process/browser'); diff --git a/node_modules/browserify/node_modules/.bin/JSONStream b/node_modules/browserify/node_modules/.bin/JSONStream deleted file mode 120000 index 44907374..00000000 --- a/node_modules/browserify/node_modules/.bin/JSONStream +++ /dev/null @@ -1 +0,0 @@ -../JSONStream/index.js \ No newline at end of file diff --git a/node_modules/browserify/node_modules/.bin/browser-pack b/node_modules/browserify/node_modules/.bin/browser-pack deleted file mode 120000 index 1d047b95..00000000 --- a/node_modules/browserify/node_modules/.bin/browser-pack +++ /dev/null @@ -1 +0,0 @@ -../browser-pack/bin/cmd.js \ No newline at end of file diff --git a/node_modules/browserify/node_modules/.bin/deps-sort b/node_modules/browserify/node_modules/.bin/deps-sort deleted file mode 120000 index b2dda9ef..00000000 --- a/node_modules/browserify/node_modules/.bin/deps-sort +++ /dev/null @@ -1 +0,0 @@ -../deps-sort/bin/cmd.js \ No newline at end of file diff --git a/node_modules/browserify/node_modules/.bin/insert-module-globals b/node_modules/browserify/node_modules/.bin/insert-module-globals deleted file mode 120000 index 68af3a91..00000000 --- a/node_modules/browserify/node_modules/.bin/insert-module-globals +++ /dev/null @@ -1 +0,0 @@ -../insert-module-globals/bin/cmd.js \ No newline at end of file diff --git a/node_modules/browserify/node_modules/.bin/module-deps b/node_modules/browserify/node_modules/.bin/module-deps deleted file mode 120000 index 66a1f246..00000000 --- a/node_modules/browserify/node_modules/.bin/module-deps +++ /dev/null @@ -1 +0,0 @@ -../module-deps/bin/cmd.js \ No newline at end of file diff --git a/node_modules/browserify/node_modules/JSONStream/.npmignore b/node_modules/browserify/node_modules/JSONStream/.npmignore deleted file mode 100644 index a9a9d586..00000000 --- a/node_modules/browserify/node_modules/JSONStream/.npmignore +++ /dev/null @@ -1,2 +0,0 @@ -node_modules/* -node_modules diff --git a/node_modules/browserify/node_modules/JSONStream/.travis.yml b/node_modules/browserify/node_modules/JSONStream/.travis.yml deleted file mode 100644 index 5743d707..00000000 --- a/node_modules/browserify/node_modules/JSONStream/.travis.yml +++ /dev/null @@ -1,7 +0,0 @@ -language: node_js -node_js: - - 4 - - 5 - - 6 - - diff --git a/node_modules/browserify/node_modules/JSONStream/LICENSE.APACHE2 b/node_modules/browserify/node_modules/JSONStream/LICENSE.APACHE2 deleted file mode 100644 index 6366c047..00000000 --- a/node_modules/browserify/node_modules/JSONStream/LICENSE.APACHE2 +++ /dev/null @@ -1,15 +0,0 @@ -Apache License, Version 2.0 - -Copyright (c) 2011 Dominic Tarr - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. diff --git a/node_modules/browserify/node_modules/JSONStream/LICENSE.MIT b/node_modules/browserify/node_modules/JSONStream/LICENSE.MIT deleted file mode 100644 index 6eafbd73..00000000 --- a/node_modules/browserify/node_modules/JSONStream/LICENSE.MIT +++ /dev/null @@ -1,24 +0,0 @@ -The MIT License - -Copyright (c) 2011 Dominic Tarr - -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/node_modules/browserify/node_modules/JSONStream/examples/all_docs.js b/node_modules/browserify/node_modules/JSONStream/examples/all_docs.js deleted file mode 100644 index fa87fe52..00000000 --- a/node_modules/browserify/node_modules/JSONStream/examples/all_docs.js +++ /dev/null @@ -1,13 +0,0 @@ -var request = require('request') - , JSONStream = require('JSONStream') - , es = require('event-stream') - -var parser = JSONStream.parse(['rows', true]) //emit parts that match this path (any element of the rows array) - , req = request({url: 'http://isaacs.couchone.com/registry/_all_docs'}) - , logger = es.mapSync(function (data) { //create a stream that logs to stderr, - console.error(data) - return data - }) - -req.pipe(parser) -parser.pipe(logger) diff --git a/node_modules/browserify/node_modules/JSONStream/index.js b/node_modules/browserify/node_modules/JSONStream/index.js deleted file mode 100755 index c164100d..00000000 --- a/node_modules/browserify/node_modules/JSONStream/index.js +++ /dev/null @@ -1,253 +0,0 @@ -#! /usr/bin/env node - -'use strict' - -var Parser = require('jsonparse') - , through = require('through') - -/* - - the value of this.stack that creationix's jsonparse has is weird. - - it makes this code ugly, but his problem is way harder that mine, - so i'll forgive him. - -*/ - -exports.parse = function (path, map) { - var header, footer - var parser = new Parser() - var stream = through(function (chunk) { - if('string' === typeof chunk) - chunk = new Buffer(chunk) - parser.write(chunk) - }, - function (data) { - if(data) - stream.write(data) - if (header) - stream.emit('header', header) - if (footer) - stream.emit('footer', footer) - stream.queue(null) - }) - - if('string' === typeof path) - path = path.split('.').map(function (e) { - if (e === '$*') - return {emitKey: true} - else if (e === '*') - return true - else if (e === '') // '..'.split('.') returns an empty string - return {recurse: true} - else - return e - }) - - - var count = 0, _key - if(!path || !path.length) - path = null - - parser.onValue = function (value) { - if (!this.root) - stream.root = value - - if(! path) return - - var i = 0 // iterates on path - var j = 0 // iterates on stack - var emitKey = false; - var emitPath = false; - while (i < path.length) { - var key = path[i] - var c - j++ - - if (key && !key.recurse) { - c = (j === this.stack.length) ? this : this.stack[j] - if (!c) return - if (! check(key, c.key)) { - setHeaderFooter(c.key, value) - return - } - emitKey = !!key.emitKey; - emitPath = !!key.emitPath; - i++ - } else { - i++ - var nextKey = path[i] - if (! nextKey) return - while (true) { - c = (j === this.stack.length) ? this : this.stack[j] - if (!c) return - if (check(nextKey, c.key)) { - i++; - if (!Object.isFrozen(this.stack[j])) - this.stack[j].value = null - break - } else { - setHeaderFooter(c.key, value) - } - j++ - } - } - - } - if (j !== this.stack.length) return - - count ++ - var actualPath = this.stack.slice(1).map(function(element) { return element.key }).concat([this.key]) - var data = this.value[this.key] - if(null != data) - if(null != (data = map ? map(data, actualPath) : data)) { - if (emitKey || emitPath) { - data = { value: data }; - if (emitKey) - data["key"] = this.key; - if (emitPath) - data["path"] = actualPath; - } - - stream.queue(data) - } - delete this.value[this.key] - for(var k in this.stack) - if (!Object.isFrozen(this.stack[k])) - this.stack[k].value = null - - // emit header - if (header) { - stream.emit('header', header); - header = false; - } - } - parser._onToken = parser.onToken; - - parser.onToken = function (token, value) { - parser._onToken(token, value); - if (this.stack.length === 0) { - if (stream.root) { - if(!path) - stream.queue(stream.root) - count = 0; - stream.root = null; - } - } - } - - parser.onError = function (err) { - if(err.message.indexOf("at position") > -1) - err.message = "Invalid JSON (" + err.message + ")"; - stream.emit('error', err) - } - - return stream - - function setHeaderFooter(key, value) { - // header has not been emitted yet - if (header !== false) { - header = header || {} - header[key] = value - } - - // footer has not been emitted yet but header has - if (footer !== false && header === false) { - footer = footer || {} - footer[key] = value - } - } -} - -function check (x, y) { - if ('string' === typeof x) - return y == x - else if (x && 'function' === typeof x.exec) - return x.exec(y) - else if ('boolean' === typeof x || 'object' === typeof x) - return x - else if ('function' === typeof x) - return x(y) - return false -} - -exports.stringify = function (op, sep, cl, indent) { - indent = indent || 0 - if (op === false){ - op = '' - sep = '\n' - cl = '' - } else if (op == null) { - - op = '[\n' - sep = '\n,\n' - cl = '\n]\n' - - } - - //else, what ever you like - - var stream - , first = true - , anyData = false - stream = through(function (data) { - anyData = true - try { - var json = JSON.stringify(data, null, indent) - } catch (err) { - return stream.emit('error', err) - } - if(first) { first = false ; stream.queue(op + json)} - else stream.queue(sep + json) - }, - function (data) { - if(!anyData) - stream.queue(op) - stream.queue(cl) - stream.queue(null) - }) - - return stream -} - -exports.stringifyObject = function (op, sep, cl, indent) { - indent = indent || 0 - if (op === false){ - op = '' - sep = '\n' - cl = '' - } else if (op == null) { - - op = '{\n' - sep = '\n,\n' - cl = '\n}\n' - - } - - //else, what ever you like - - var first = true - var anyData = false - var stream = through(function (data) { - anyData = true - var json = JSON.stringify(data[0]) + ':' + JSON.stringify(data[1], null, indent) - if(first) { first = false ; this.queue(op + json)} - else this.queue(sep + json) - }, - function (data) { - if(!anyData) this.queue(op) - this.queue(cl) - - this.queue(null) - }) - - return stream -} - -if(!module.parent && process.title !== 'browser') { - process.stdin - .pipe(exports.parse(process.argv[2])) - .pipe(exports.stringify('[', ',\n', ']\n', 2)) - .pipe(process.stdout) -} - diff --git a/node_modules/browserify/node_modules/JSONStream/node_modules/jsonparse/.npmignore b/node_modules/browserify/node_modules/JSONStream/node_modules/jsonparse/.npmignore deleted file mode 100644 index b512c09d..00000000 --- a/node_modules/browserify/node_modules/JSONStream/node_modules/jsonparse/.npmignore +++ /dev/null @@ -1 +0,0 @@ -node_modules \ No newline at end of file diff --git a/node_modules/browserify/node_modules/JSONStream/node_modules/jsonparse/LICENSE b/node_modules/browserify/node_modules/JSONStream/node_modules/jsonparse/LICENSE deleted file mode 100644 index 6dc24be5..00000000 --- a/node_modules/browserify/node_modules/JSONStream/node_modules/jsonparse/LICENSE +++ /dev/null @@ -1,24 +0,0 @@ -The MIT License - -Copyright (c) 2012 Tim Caswell - -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/node_modules/browserify/node_modules/JSONStream/node_modules/jsonparse/README.markdown b/node_modules/browserify/node_modules/JSONStream/node_modules/jsonparse/README.markdown deleted file mode 100644 index 0f405d35..00000000 --- a/node_modules/browserify/node_modules/JSONStream/node_modules/jsonparse/README.markdown +++ /dev/null @@ -1,11 +0,0 @@ -This is a streaming JSON parser. For a simpler, sax-based version see this gist: https://gist.github.com/1821394 - -The MIT License (MIT) -Copyright (c) 2011-2012 Tim Caswell - -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/node_modules/browserify/node_modules/JSONStream/node_modules/jsonparse/bench.js b/node_modules/browserify/node_modules/JSONStream/node_modules/jsonparse/bench.js deleted file mode 100644 index b36d92f7..00000000 --- a/node_modules/browserify/node_modules/JSONStream/node_modules/jsonparse/bench.js +++ /dev/null @@ -1,26 +0,0 @@ -var fs = require('fs'), - Parser = require('./jsonparse'); - - -var json = fs.readFileSync("samplejson/basic.json"); - - -while (true) { - var start = Date.now(); - for (var i = 0; i < 1000; i++) { - JSON.parse(json); - } - var first = Date.now() - start; - - start = Date.now(); - var p = new Parser(); - for (var i = 0; i < 1000; i++) { - p.write(json); - } - var second = Date.now() - start; - - - console.log("JSON.parse took %s", first); - console.log("streaming parser took %s", second); - console.log("streaming is %s times slower", second / first); -} diff --git a/node_modules/browserify/node_modules/JSONStream/node_modules/jsonparse/examples/twitterfeed.js b/node_modules/browserify/node_modules/JSONStream/node_modules/jsonparse/examples/twitterfeed.js deleted file mode 100644 index 10210d47..00000000 --- a/node_modules/browserify/node_modules/JSONStream/node_modules/jsonparse/examples/twitterfeed.js +++ /dev/null @@ -1,30 +0,0 @@ -var Parser = require('../jsonparse'); -var Http = require('http'); -require('./colors'); -var p = new Parser(); -var cred = require('./credentials'); -var client = Http.createClient(80, "stream.twitter.com"); -var request = client.request("GET", "/1/statuses/sample.json", { - "Host": "stream.twitter.com", - "Authorization": (new Buffer(cred.username + ":" + cred.password)).toString("base64") -}); -request.on('response', function (response) { - console.log(response.statusCode); - console.dir(response.headers); - response.on('data', function (chunk) { - p.write(chunk); - }); - response.on('end', function () { - console.log("END"); - }); -}); -request.end(); -var text = "", name = ""; -p.onValue = function (value) { - if (this.stack.length === 1 && this.key === 'text') { text = value; } - if (this.stack.length === 2 && this.key === 'name' && this.stack[1].key === 'user') { name = value; } - if (this.stack.length === 0) { - console.log(text.blue + " - " + name.yellow); - text = name = ""; - } -}; diff --git a/node_modules/browserify/node_modules/JSONStream/node_modules/jsonparse/jsonparse.js b/node_modules/browserify/node_modules/JSONStream/node_modules/jsonparse/jsonparse.js deleted file mode 100644 index 26752d4a..00000000 --- a/node_modules/browserify/node_modules/JSONStream/node_modules/jsonparse/jsonparse.js +++ /dev/null @@ -1,400 +0,0 @@ -/*global Buffer*/ -// Named constants with unique integer values -var C = {}; -// Tokens -var LEFT_BRACE = C.LEFT_BRACE = 0x1; -var RIGHT_BRACE = C.RIGHT_BRACE = 0x2; -var LEFT_BRACKET = C.LEFT_BRACKET = 0x3; -var RIGHT_BRACKET = C.RIGHT_BRACKET = 0x4; -var COLON = C.COLON = 0x5; -var COMMA = C.COMMA = 0x6; -var TRUE = C.TRUE = 0x7; -var FALSE = C.FALSE = 0x8; -var NULL = C.NULL = 0x9; -var STRING = C.STRING = 0xa; -var NUMBER = C.NUMBER = 0xb; -// Tokenizer States -var START = C.START = 0x11; -var STOP = C.STOP = 0x12; -var TRUE1 = C.TRUE1 = 0x21; -var TRUE2 = C.TRUE2 = 0x22; -var TRUE3 = C.TRUE3 = 0x23; -var FALSE1 = C.FALSE1 = 0x31; -var FALSE2 = C.FALSE2 = 0x32; -var FALSE3 = C.FALSE3 = 0x33; -var FALSE4 = C.FALSE4 = 0x34; -var NULL1 = C.NULL1 = 0x41; -var NULL2 = C.NULL2 = 0x42; -var NULL3 = C.NULL3 = 0x43; -var NUMBER1 = C.NUMBER1 = 0x51; -var NUMBER3 = C.NUMBER3 = 0x53; -var STRING1 = C.STRING1 = 0x61; -var STRING2 = C.STRING2 = 0x62; -var STRING3 = C.STRING3 = 0x63; -var STRING4 = C.STRING4 = 0x64; -var STRING5 = C.STRING5 = 0x65; -var STRING6 = C.STRING6 = 0x66; -// Parser States -var VALUE = C.VALUE = 0x71; -var KEY = C.KEY = 0x72; -// Parser Modes -var OBJECT = C.OBJECT = 0x81; -var ARRAY = C.ARRAY = 0x82; -// Character constants -var BACK_SLASH = "\\".charCodeAt(0); -var FORWARD_SLASH = "\/".charCodeAt(0); -var BACKSPACE = "\b".charCodeAt(0); -var FORM_FEED = "\f".charCodeAt(0); -var NEWLINE = "\n".charCodeAt(0); -var CARRIAGE_RETURN = "\r".charCodeAt(0); -var TAB = "\t".charCodeAt(0); - -var STRING_BUFFER_SIZE = 64 * 1024; - -function Parser() { - this.tState = START; - this.value = undefined; - - this.string = undefined; // string data - this.stringBuffer = Buffer.alloc ? Buffer.alloc(STRING_BUFFER_SIZE) : new Buffer(STRING_BUFFER_SIZE); - this.stringBufferOffset = 0; - this.unicode = undefined; // unicode escapes - - this.key = undefined; - this.mode = undefined; - this.stack = []; - this.state = VALUE; - this.bytes_remaining = 0; // number of bytes remaining in multi byte utf8 char to read after split boundary - this.bytes_in_sequence = 0; // bytes in multi byte utf8 char to read - this.temp_buffs = { "2": new Buffer(2), "3": new Buffer(3), "4": new Buffer(4) }; // for rebuilding chars split before boundary is reached - - // Stream offset - this.offset = -1; -} - -// Slow code to string converter (only used when throwing syntax errors) -Parser.toknam = function (code) { - var keys = Object.keys(C); - for (var i = 0, l = keys.length; i < l; i++) { - var key = keys[i]; - if (C[key] === code) { return key; } - } - return code && ("0x" + code.toString(16)); -}; - -var proto = Parser.prototype; -proto.onError = function (err) { throw err; }; -proto.charError = function (buffer, i) { - this.tState = STOP; - this.onError(new Error("Unexpected " + JSON.stringify(String.fromCharCode(buffer[i])) + " at position " + i + " in state " + Parser.toknam(this.tState))); -}; -proto.appendStringChar = function (char) { - if (this.stringBufferOffset >= STRING_BUFFER_SIZE) { - this.string += this.stringBuffer.toString('utf8'); - this.stringBufferOffset = 0; - } - - this.stringBuffer[this.stringBufferOffset++] = char; -}; -proto.appendStringBuf = function (buf, start, end) { - var size = buf.length; - if (typeof start === 'number') { - if (typeof end === 'number') { - if (end < 0) { - // adding a negative end decreeses the size - size = buf.length - start + end; - } else { - size = end - start; - } - } else { - size = buf.length - start; - } - } - - if (size < 0) { - size = 0; - } - - if (this.stringBufferOffset + size > STRING_BUFFER_SIZE) { - this.string += this.stringBuffer.toString('utf8', 0, this.stringBufferOffset); - this.stringBufferOffset = 0; - } - - buf.copy(this.stringBuffer, this.stringBufferOffset, start, end); - this.stringBufferOffset += size; -}; -proto.write = function (buffer) { - if (typeof buffer === "string") buffer = new Buffer(buffer); - var n; - for (var i = 0, l = buffer.length; i < l; i++) { - if (this.tState === START){ - n = buffer[i]; - this.offset++; - if(n === 0x7b){ this.onToken(LEFT_BRACE, "{"); // { - }else if(n === 0x7d){ this.onToken(RIGHT_BRACE, "}"); // } - }else if(n === 0x5b){ this.onToken(LEFT_BRACKET, "["); // [ - }else if(n === 0x5d){ this.onToken(RIGHT_BRACKET, "]"); // ] - }else if(n === 0x3a){ this.onToken(COLON, ":"); // : - }else if(n === 0x2c){ this.onToken(COMMA, ","); // , - }else if(n === 0x74){ this.tState = TRUE1; // t - }else if(n === 0x66){ this.tState = FALSE1; // f - }else if(n === 0x6e){ this.tState = NULL1; // n - }else if(n === 0x22){ // " - this.string = ""; - this.stringBufferOffset = 0; - this.tState = STRING1; - }else if(n === 0x2d){ this.string = "-"; this.tState = NUMBER1; // - - }else{ - if (n >= 0x30 && n < 0x40) { // 1-9 - this.string = String.fromCharCode(n); this.tState = NUMBER3; - } else if (n === 0x20 || n === 0x09 || n === 0x0a || n === 0x0d) { - // whitespace - } else { - return this.charError(buffer, i); - } - } - }else if (this.tState === STRING1){ // After open quote - n = buffer[i]; // get current byte from buffer - // check for carry over of a multi byte char split between data chunks - // & fill temp buffer it with start of this data chunk up to the boundary limit set in the last iteration - if (this.bytes_remaining > 0) { - for (var j = 0; j < this.bytes_remaining; j++) { - this.temp_buffs[this.bytes_in_sequence][this.bytes_in_sequence - this.bytes_remaining + j] = buffer[j]; - } - - this.appendStringBuf(this.temp_buffs[this.bytes_in_sequence]); - this.bytes_in_sequence = this.bytes_remaining = 0; - i = i + j - 1; - } else if (this.bytes_remaining === 0 && n >= 128) { // else if no remainder bytes carried over, parse multi byte (>=128) chars one at a time - if (n <= 193 || n > 244) { - return this.onError(new Error("Invalid UTF-8 character at position " + i + " in state " + Parser.toknam(this.tState))); - } - if ((n >= 194) && (n <= 223)) this.bytes_in_sequence = 2; - if ((n >= 224) && (n <= 239)) this.bytes_in_sequence = 3; - if ((n >= 240) && (n <= 244)) this.bytes_in_sequence = 4; - if ((this.bytes_in_sequence + i) > buffer.length) { // if bytes needed to complete char fall outside buffer length, we have a boundary split - for (var k = 0; k <= (buffer.length - 1 - i); k++) { - this.temp_buffs[this.bytes_in_sequence][k] = buffer[i + k]; // fill temp buffer of correct size with bytes available in this chunk - } - this.bytes_remaining = (i + this.bytes_in_sequence) - buffer.length; - i = buffer.length - 1; - } else { - this.appendStringBuf(buffer, i, i + this.bytes_in_sequence); - i = i + this.bytes_in_sequence - 1; - } - } else if (n === 0x22) { - this.tState = START; - this.string += this.stringBuffer.toString('utf8', 0, this.stringBufferOffset); - this.stringBufferOffset = 0; - this.onToken(STRING, this.string); - this.offset += Buffer.byteLength(this.string, 'utf8') + 1; - this.string = undefined; - } - else if (n === 0x5c) { - this.tState = STRING2; - } - else if (n >= 0x20) { this.appendStringChar(n); } - else { - return this.charError(buffer, i); - } - }else if (this.tState === STRING2){ // After backslash - n = buffer[i]; - if(n === 0x22){ this.appendStringChar(n); this.tState = STRING1; - }else if(n === 0x5c){ this.appendStringChar(BACK_SLASH); this.tState = STRING1; - }else if(n === 0x2f){ this.appendStringChar(FORWARD_SLASH); this.tState = STRING1; - }else if(n === 0x62){ this.appendStringChar(BACKSPACE); this.tState = STRING1; - }else if(n === 0x66){ this.appendStringChar(FORM_FEED); this.tState = STRING1; - }else if(n === 0x6e){ this.appendStringChar(NEWLINE); this.tState = STRING1; - }else if(n === 0x72){ this.appendStringChar(CARRIAGE_RETURN); this.tState = STRING1; - }else if(n === 0x74){ this.appendStringChar(TAB); this.tState = STRING1; - }else if(n === 0x75){ this.unicode = ""; this.tState = STRING3; - }else{ - return this.charError(buffer, i); - } - }else if (this.tState === STRING3 || this.tState === STRING4 || this.tState === STRING5 || this.tState === STRING6){ // unicode hex codes - n = buffer[i]; - // 0-9 A-F a-f - if ((n >= 0x30 && n < 0x40) || (n > 0x40 && n <= 0x46) || (n > 0x60 && n <= 0x66)) { - this.unicode += String.fromCharCode(n); - if (this.tState++ === STRING6) { - this.appendStringBuf(Buffer(String.fromCharCode(parseInt(this.unicode, 16)))); - this.unicode = undefined; - this.tState = STRING1; - } - } else { - return this.charError(buffer, i); - } - } else if (this.tState === NUMBER1 || this.tState === NUMBER3) { - n = buffer[i]; - - switch (n) { - case 0x30: // 0 - case 0x31: // 1 - case 0x32: // 2 - case 0x33: // 3 - case 0x34: // 4 - case 0x35: // 5 - case 0x36: // 6 - case 0x37: // 7 - case 0x38: // 8 - case 0x39: // 9 - case 0x2e: // . - case 0x65: // e - case 0x45: // E - case 0x2b: // + - case 0x2d: // - - this.string += String.fromCharCode(n); - this.tState = NUMBER3; - break; - default: - this.tState = START; - var result = Number(this.string); - - if (isNaN(result)){ - return this.charError(buffer, i); - } - - if ((this.string.match(/[0-9]+/) == this.string) && (result.toString() != this.string)) { - // Long string of digits which is an ID string and not valid and/or safe JavaScript integer Number - this.onToken(STRING, this.string); - } else { - this.onToken(NUMBER, result); - } - - this.offset += this.string.length - 1; - this.string = undefined; - i--; - break; - } - }else if (this.tState === TRUE1){ // r - if (buffer[i] === 0x72) { this.tState = TRUE2; } - else { return this.charError(buffer, i); } - }else if (this.tState === TRUE2){ // u - if (buffer[i] === 0x75) { this.tState = TRUE3; } - else { return this.charError(buffer, i); } - }else if (this.tState === TRUE3){ // e - if (buffer[i] === 0x65) { this.tState = START; this.onToken(TRUE, true); this.offset+= 3; } - else { return this.charError(buffer, i); } - }else if (this.tState === FALSE1){ // a - if (buffer[i] === 0x61) { this.tState = FALSE2; } - else { return this.charError(buffer, i); } - }else if (this.tState === FALSE2){ // l - if (buffer[i] === 0x6c) { this.tState = FALSE3; } - else { return this.charError(buffer, i); } - }else if (this.tState === FALSE3){ // s - if (buffer[i] === 0x73) { this.tState = FALSE4; } - else { return this.charError(buffer, i); } - }else if (this.tState === FALSE4){ // e - if (buffer[i] === 0x65) { this.tState = START; this.onToken(FALSE, false); this.offset+= 4; } - else { return this.charError(buffer, i); } - }else if (this.tState === NULL1){ // u - if (buffer[i] === 0x75) { this.tState = NULL2; } - else { return this.charError(buffer, i); } - }else if (this.tState === NULL2){ // l - if (buffer[i] === 0x6c) { this.tState = NULL3; } - else { return this.charError(buffer, i); } - }else if (this.tState === NULL3){ // l - if (buffer[i] === 0x6c) { this.tState = START; this.onToken(NULL, null); this.offset += 3; } - else { return this.charError(buffer, i); } - } - } -}; -proto.onToken = function (token, value) { - // Override this to get events -}; - -proto.parseError = function (token, value) { - this.tState = STOP; - this.onError(new Error("Unexpected " + Parser.toknam(token) + (value ? ("(" + JSON.stringify(value) + ")") : "") + " in state " + Parser.toknam(this.state))); -}; -proto.push = function () { - this.stack.push({value: this.value, key: this.key, mode: this.mode}); -}; -proto.pop = function () { - var value = this.value; - var parent = this.stack.pop(); - this.value = parent.value; - this.key = parent.key; - this.mode = parent.mode; - this.emit(value); - if (!this.mode) { this.state = VALUE; } -}; -proto.emit = function (value) { - if (this.mode) { this.state = COMMA; } - this.onValue(value); -}; -proto.onValue = function (value) { - // Override me -}; -proto.onToken = function (token, value) { - if(this.state === VALUE){ - if(token === STRING || token === NUMBER || token === TRUE || token === FALSE || token === NULL){ - if (this.value) { - this.value[this.key] = value; - } - this.emit(value); - }else if(token === LEFT_BRACE){ - this.push(); - if (this.value) { - this.value = this.value[this.key] = {}; - } else { - this.value = {}; - } - this.key = undefined; - this.state = KEY; - this.mode = OBJECT; - }else if(token === LEFT_BRACKET){ - this.push(); - if (this.value) { - this.value = this.value[this.key] = []; - } else { - this.value = []; - } - this.key = 0; - this.mode = ARRAY; - this.state = VALUE; - }else if(token === RIGHT_BRACE){ - if (this.mode === OBJECT) { - this.pop(); - } else { - return this.parseError(token, value); - } - }else if(token === RIGHT_BRACKET){ - if (this.mode === ARRAY) { - this.pop(); - } else { - return this.parseError(token, value); - } - }else{ - return this.parseError(token, value); - } - }else if(this.state === KEY){ - if (token === STRING) { - this.key = value; - this.state = COLON; - } else if (token === RIGHT_BRACE) { - this.pop(); - } else { - return this.parseError(token, value); - } - }else if(this.state === COLON){ - if (token === COLON) { this.state = VALUE; } - else { return this.parseError(token, value); } - }else if(this.state === COMMA){ - if (token === COMMA) { - if (this.mode === ARRAY) { this.key++; this.state = VALUE; } - else if (this.mode === OBJECT) { this.state = KEY; } - - } else if (token === RIGHT_BRACKET && this.mode === ARRAY || token === RIGHT_BRACE && this.mode === OBJECT) { - this.pop(); - } else { - return this.parseError(token, value); - } - }else{ - return this.parseError(token, value); - } -}; - -Parser.C = C; - -module.exports = Parser; diff --git a/node_modules/browserify/node_modules/JSONStream/node_modules/jsonparse/package.json b/node_modules/browserify/node_modules/JSONStream/node_modules/jsonparse/package.json deleted file mode 100644 index b874bcc4..00000000 --- a/node_modules/browserify/node_modules/JSONStream/node_modules/jsonparse/package.json +++ /dev/null @@ -1,64 +0,0 @@ -{ - "name": "jsonparse", - "description": "This is a pure-js JSON streaming parser for node.js", - "tags": [ - "json", - "stream" - ], - "version": "1.3.0", - "author": { - "name": "Tim Caswell", - "email": "tim@creationix.com" - }, - "repository": { - "type": "git", - "url": "git+ssh://git@github.com/creationix/jsonparse.git" - }, - "devDependencies": { - "tape": "~0.1.1", - "tap": "~0.3.3" - }, - "scripts": { - "test": "tap test/*.js" - }, - "bugs": { - "url": "http://github.com/creationix/jsonparse/issues" - }, - "engines": [ - "node >= 0.2.0" - ], - "license": "MIT", - "main": "jsonparse.js", - "gitHead": "69f02ca615aeeb4cbbe786ab42ce0592b44dc217", - "homepage": "https://github.com/creationix/jsonparse#readme", - "_id": "jsonparse@1.3.0", - "_shasum": "85fc245b1d9259acc6941960b905adf64e7de0e8", - "_from": "jsonparse@>=1.2.0 <2.0.0", - "_npmVersion": "2.14.4", - "_nodeVersion": "4.1.1", - "_npmUser": { - "name": "creationix", - "email": "tim@creationix.com" - }, - "dist": { - "shasum": "85fc245b1d9259acc6941960b905adf64e7de0e8", - "tarball": "https://registry.npmjs.org/jsonparse/-/jsonparse-1.3.0.tgz" - }, - "maintainers": [ - { - "name": "creationix", - "email": "tim@creationix.com" - }, - { - "name": "substack", - "email": "mail@substack.net" - } - ], - "_npmOperationalInternal": { - "host": "packages-12-west.internal.npmjs.com", - "tmp": "tmp/jsonparse-1.3.0.tgz_1484597944748_0.925271877553314" - }, - "directories": {}, - "_resolved": "https://registry.npmjs.org/jsonparse/-/jsonparse-1.3.0.tgz", - "readme": "ERROR: No README data found!" -} diff --git a/node_modules/browserify/node_modules/JSONStream/node_modules/jsonparse/samplejson/basic.json b/node_modules/browserify/node_modules/JSONStream/node_modules/jsonparse/samplejson/basic.json deleted file mode 100644 index 950dff9e..00000000 --- a/node_modules/browserify/node_modules/JSONStream/node_modules/jsonparse/samplejson/basic.json +++ /dev/null @@ -1,167 +0,0 @@ -[ - { - }, - { - "image": [ - {"shape": "rect", "fill": "#333", "stroke": "#999", "x": 0.5e+1, "y": 0.5, "z": 0.8e-0, "w": 0.5e5, "u": 2E10, "foo": 2E+1, "bar": 2E-0, "width": 47, "height": 47} - ], - "jumpable": 3, - "solid": { - "1": [2,4], - "2": [], - "3": [2,6], - "4": [], - "5": [2,8,1,3,7,9,4,6], - "6": [], - "7": [4,8], - "8": [], - "9": [6,8] - }, - "corners": {"1": true,"3": true,"7": true,"9": true} - }, - { - "image": [ - {"shape": "polygon", "fill": "#248", "stroke": "#48f", "points": [[0.5,47.5],[47.5,47.5],[47.5,0.5]]} - ], - "solid": { - "1": [2,4], - "2": [1], - "3": [2], - "4": [], - "5": [2,8,1,3,7,9,4,6], - "6": [], - "7": [4,8], - "8": [], - "9": [6,8] - }, - "corners": {"1": true,"3": true,"7": false,"9": true} - }, - { - "image": [ - {"shape": "polygon", "fill": "#248", "stroke": "#48f", "points": [[0.5,0.5],[47.5,47.5],[0.5,47.5]]} - ], - "solid": { - "1": [2], - "2": [3], - "3": [2,6], - "4": [], - "5": [2,8,1,3,7,9,4,6], - "6": [], - "7": [4,8], - "8": [], - "9": [6,8] - }, - "corners": {"1": true,"3": true,"7": true,"9": false} - }, - { - "image": [ - {"shape": "polygon", "fill": "#333", "stroke": "#999", "points": [[0.5,0.5],[47.5,47.5],[47.5,0.5]]} - ], - "jumpable": 3, - "solid": { - "1": [2,4], - "2": [], - "3": [2,6], - "4": [], - "5": [2,8,1,3,7,9,4,6], - "6": [3], - "7": [4,8], - "8": [7], - "9": [6,8] - }, - "corners": {"1": false,"3": true,"7": true,"9": true} - }, - { - "image": [ - {"shape": "polygon", "fill": "#333", "stroke": "#999", "points": [[0.5,0.5],[0.5,47.5],[47.5,0.5]]} - ], - "jumpable": 3, - "solid": { - "1": [2,4], - "2": [], - "3": [2,6], - "4": [1], - "5": [2,8,1,3,7,9,4,6], - "6": [], - "7": [4,8], - "8": [9], - "9": [6,8] - }, - "corners": {"1": true,"3": false,"7": true,"9": true} - }, - { - "image": [ - {"shape": "polygon", "fill": "#482", "stroke": "#8f4", "points": [[0.5,47.5],[0.5,23.5],[24.5,23.5],[24.5,0.5],[47.5,0.5],[47.5,47.5]]} - ], - "jumpable": 3, - "solid": { - "1": [2,4], - "2": [], - "3": [6,2], - "4": [], - "5": [2,8,1,3,7,9,4,6], - "6": [9], - "7": [4,8], - "8": [], - "9": [6,8] - }, - "corners": {"1": true,"3": true,"7": false,"9": true} - }, - { - "image": [ - {"shape": "polygon", "fill": "#482", "stroke": "#8f4", "points": [[0.5,0.5],[23.5,0.5],[23.5,24.5],[47.5,24.5],[47.5,47.5],[0.5,47.5]]} - ], - "jumpable": 3, - "solid": { - "1": [4,2], - "2": [], - "3": [2,6], - "4": [7], - "5": [2,8,1,3,7,9,4,6], - "6": [], - "7": [4,8], - "8": [], - "9": [6,8] - }, - "corners": {"1": true,"3": true,"7": true,"9": false} - }, - { - "image": [ - {"shape": "circle", "fill": "#ff0", "stroke": "#ff8", "cx": 24, "cy": 24, "r": 18} - ], - "item": true - }, - { - "image": [ - {"shape": "polygon", "fill": "#842", "stroke": "#f84", "points": [[4.5,0.5],[14.5,0.5],[14.5,17.5],[34,17.5],[33.5,0.5],[43.5,0.5],[43.5,47.5],[33.5,47.5],[33.5,30.5],[14.5,30.5],[14.5,47.5],[4.5,47.5]]} - ], - "jumpable": 3 - }, - { - "image": [ - {"shape": "polygon", "fill": "#333", "stroke": "#999", "points": [[0.5,0.5],[47.5,0.5],[24,47.5]]} - ], - "jumpable": 3, - "solid": { - "1": [2,4], - "2": [], - "3": [2,6], - "4": [1], - "5": [2,8,1,3,7,9,4,6], - "6": [3], - "7": [4,8], - "8": [], - "9": [6,8] - }, - "corners": {"1": false,"3": false,"7": true,"9": true} - }, - { - "image": [ - {"shape": "rect", "fill": "#114acb", "x": 0.5, "y": 0.5, "width": 47, "height": 47}, - {"shape": "polygon", "fill": "rgba(255,255,255,0.30)", "points": [[0.5,0.5],[47.5,0.5],[40,8],[8,8],[8,40],[0.5,47.5]]}, - {"shape": "polygon", "fill": "rgba(0,0,0,0.30)", "points": [[47.5,0.5],[48,48],[0.5,47.5],[8,40],[40,40],[40,8]]}, - {"shape": "polygon", "fill": "rgb(255,255,0)", "stroke": "rgba(255,255,0,0.5)", "points": [[24,9],[35,20],[26,29],[26,33],[22,33],[22,27],[29,20],[24,15],[16,23],[13,20]]}, - {"shape": "rect", "fill": "rgb(255,255,0)", "stroke": "rgba(255,255,0,0.5)", "x": 22, "y":35, "width": 4, "height": 4} - ] - } -] diff --git a/node_modules/browserify/node_modules/JSONStream/node_modules/jsonparse/samplejson/basic2.json b/node_modules/browserify/node_modules/JSONStream/node_modules/jsonparse/samplejson/basic2.json deleted file mode 100644 index 3a6919b2..00000000 --- a/node_modules/browserify/node_modules/JSONStream/node_modules/jsonparse/samplejson/basic2.json +++ /dev/null @@ -1,180 +0,0 @@ -[ - { - }, - { - "image": [ - {"shape": "rect", "fill": "#333", "stroke": "#999", "x": 0.5, "y": 0.5, "width": 47, "height": 47} - ], - "jumpable": 3, - "solid": { - "1": [2,4], - "2": [], - "3": [2,6], - "4": [], - "5": [2,8,1,3,7,9,4,6], - "6": [], - "7": [4,8], - "8": [], - "9": [6,8] - }, - "corners": {"1": true,"3": true,"7": true,"9": true} - }, - { - "image": [ - {"shape": "polygon", "fill": "#248", "stroke": "#48f", "points": [[0.5,47.5],[47.5,47.5],[47.5,0.5]]} - ], - "solid": { - "1": [2,4], - "2": [1], - "3": [2], - "4": [], - "5": [2,8,1,3,7,9,4,6], - "6": [], - "7": [4,8], - "8": [], - "9": [6,8] - }, - "corners": {"1": true,"3": true,"7": false,"9": true} - }, - { - "image": [ - {"shape": "polygon", "fill": "#248", "stroke": "#48f", "points": [[0.5,0.5],[47.5,47.5],[0.5,47.5]]} - ], - "solid": { - "1": [2], - "2": [3], - "3": [2,6], - "4": [], - "5": [2,8,1,3,7,9,4,6], - "6": [], - "7": [4,8], - "8": [], - "9": [6,8] - }, - "corners": {"1": true,"3": true,"7": true,"9": false} - }, - { - "image": [ - {"shape": "polygon", "fill": "#333", "stroke": "#999", "points": [[0.5,0.5],[47.5,47.5],[47.5,0.5]]} - ], - "jumpable": 3, - "solid": { - "1": [2,4], - "2": [], - "3": [2,6], - "4": [], - "5": [2,8,1,3,7,9,4,6], - "6": [3], - "7": [4,8], - "8": [7], - "9": [6,8] - }, - "corners": {"1": false,"3": true,"7": true,"9": true} - }, - { - "image": [ - {"shape": "polygon", "fill": "#333", "stroke": "#999", "points": [[0.5,0.5],[0.5,47.5],[47.5,0.5]]} - ], - "jumpable": 3, - "solid": { - "1": [2,4], - "2": [], - "3": [2,6], - "4": [1], - "5": [2,8,1,3,7,9,4,6], - "6": [], - "7": [4,8], - "8": [9], - "9": [6,8] - }, - "corners": {"1": true,"3": false,"7": true,"9": true} - }, - { - "image": [ - {"shape": "polygon", "fill": "#482", "stroke": "#8f4", "points": [[0.5,47.5],[0.5,23.5],[24.5,23.5],[24.5,0.5],[47.5,0.5],[47.5,47.5]]} - ], - "jumpable": 3, - "solid": { - "1": [2,4], - "2": [], - "3": [6,2], - "4": [], - "5": [2,8,1,3,7,9,4,6], - "6": [9], - "7": [4,8], - "8": [], - "9": [6,8] - }, - "corners": {"1": true,"3": true,"7": false,"9": true} - }, - { - "image": [ - {"shape": "polygon", "fill": "#482", "stroke": "#8f4", "points": [[0.5,0.5],[23.5,0.5],[23.5,24.5],[47.5,24.5],[47.5,47.5],[0.5,47.5]]} - ], - "jumpable": 3, - "solid": { - "1": [4,2], - "2": [], - "3": [2,6], - "4": [7], - "5": [2,8,1,3,7,9,4,6], - "6": [], - "7": [4,8], - "8": [], - "9": [6,8] - }, - "corners": {"1": true,"3": true,"7": true,"9": false} - }, - { - "image": [ - {"shape": "circle", "fill": "#ff0", "stroke": "#ff8", "cx": 24, "cy": 24, "r": 18} - ], - "item": true - }, - { - "image": [ - {"shape": "polygon", "fill": "#842", "stroke": "#f84", "points": [[4.5,0.5],[14.5,0.5],[14.5,17.5],[34,17.5],[33.5,0.5],[43.5,0.5],[43.5,47.5],[33.5,47.5],[33.5,30.5],[14.5,30.5],[14.5,47.5],[4.5,47.5]]} - ], - "jumpable": 3 - }, - { - "image": [ - {"shape": "polygon", "fill": "#333", "stroke": "#999", "points": [[0.5,0.5],[47.5,0.5],[24,47.5]]} - ], - "jumpable": 3, - "solid": { - "1": [2,4], - "2": [], - "3": [2,6], - "4": [1], - "5": [2,8,1,3,7,9,4,6], - "6": [3], - "7": [4,8], - "8": [], - "9": [6,8] - }, - "corners": {"1": false,"3": false,"7": true,"9": true} - }, - { - "image": [ - {"shape": "rect", "fill": "#114acb", "x": 0.5, "y": 0.5, "width": 47, "height": 47}, - {"shape": "polygon", "fill": "rgba(255,255,255,0.30)", "points": [[0.5,0.5],[47.5,0.5],[40,8],[8,8],[8,40],[0.5,47.5]]}, - {"shape": "polygon", "fill": "rgba(0,0,0,0.30)", "points": [[47.5,0.5],[48,48],[0.5,47.5],[8,40],[40,40],[40,8]]}, - {"shape": "polygon", "fill": "rgb(255,255,0)", "stroke": "rgba(255,255,0,0.5)", "points": [[24,9],[35,20],[26,29],[26,33],[22,33],[22,27],[29,20],[24,15],[16,23],[13,20]]}, - {"shape": "rect", "fill": "rgb(255,255,0)", "stroke": "rgba(255,255,0,0.5)", "x": 22, "y":35, "width": 4, "height": 4} - ], - "item": true - }, - { - "image": [ - {"shape": "circle", "fill": "#80f", "stroke": "#88f", "cx": 24, "cy": 24, "r": 18} - ], - "item": true - }, - { - "image": [ - {"shape": "circle", "fill": "#4f4", "stroke": "#8f8", "cx": 24, "cy": 24, "r": 18} - ], - "item": true - } -] diff --git a/node_modules/browserify/node_modules/JSONStream/node_modules/jsonparse/test/big-token.js b/node_modules/browserify/node_modules/JSONStream/node_modules/jsonparse/test/big-token.js deleted file mode 100644 index 36046317..00000000 --- a/node_modules/browserify/node_modules/JSONStream/node_modules/jsonparse/test/big-token.js +++ /dev/null @@ -1,24 +0,0 @@ -var stream = require('stream'); -var JsonParse = require('../jsonparse'); -var test = require('tape'); - -test('can handle large tokens without running out of memory', function (t) { - var parser = new JsonParse(); - var chunkSize = 1024; - var chunks = 1024 * 200; // 200mb - var quote = Buffer.from ? Buffer.from('"') : new Buffer('"'); - t.plan(1); - - parser.onToken = function (type, value) { - t.equal(value.length, chunkSize * chunks, 'token should be size of input json'); - t.end(); - }; - - parser.write(quote); - for (var i = 0; i < chunks; ++i) { - var buf = Buffer.alloc ? Buffer.alloc(chunkSize) : new Buffer(chunkSize); - buf.fill('a'); - parser.write(buf); - } - parser.write(quote); -}); diff --git a/node_modules/browserify/node_modules/JSONStream/node_modules/jsonparse/test/boundary.js b/node_modules/browserify/node_modules/JSONStream/node_modules/jsonparse/test/boundary.js deleted file mode 100644 index 6671f5f9..00000000 --- a/node_modules/browserify/node_modules/JSONStream/node_modules/jsonparse/test/boundary.js +++ /dev/null @@ -1,110 +0,0 @@ -var test = require('tape'); -var Parser = require('../'); - -test('2 byte utf8 \'De\' character: д', function (t) { - t.plan(1); - - var p = new Parser(); - p.onValue = function (value) { - t.equal(value, 'д'); - }; - - var de_buffer = new Buffer([0xd0, 0xb4]); - - p.write('"'); - p.write(de_buffer); - p.write('"'); - -}); - -test('3 byte utf8 \'Han\' character: 我', function (t) { - t.plan(1); - - var p = new Parser(); - p.onValue = function (value) { - t.equal(value, '我'); - }; - - var han_buffer = new Buffer([0xe6, 0x88, 0x91]); - p.write('"'); - p.write(han_buffer); - p.write('"'); -}); - -test('4 byte utf8 character (unicode scalar U+2070E): 𠜎', function (t) { - t.plan(1); - - var p = new Parser(); - p.onValue = function (value) { - t.equal(value, '𠜎'); - }; - - var Ux2070E_buffer = new Buffer([0xf0, 0xa0, 0x9c, 0x8e]); - p.write('"'); - p.write(Ux2070E_buffer); - p.write('"'); -}); - -test('3 byte utf8 \'Han\' character chunked inbetween 2nd and 3rd byte: 我', function (t) { - t.plan(1); - - var p = new Parser(); - p.onValue = function (value) { - t.equal(value, '我'); - }; - - var han_buffer_first = new Buffer([0xe6, 0x88]); - var han_buffer_second = new Buffer([0x91]); - p.write('"'); - p.write(han_buffer_first); - p.write(han_buffer_second); - p.write('"'); -}); - -test('4 byte utf8 character (unicode scalar U+2070E) chunked inbetween 2nd and 3rd byte: 𠜎', function (t) { - t.plan(1); - - var p = new Parser(); - p.onValue = function (value) { - t.equal(value, '𠜎'); - }; - - var Ux2070E_buffer_first = new Buffer([0xf0, 0xa0]); - var Ux2070E_buffer_second = new Buffer([0x9c, 0x8e]); - p.write('"'); - p.write(Ux2070E_buffer_first); - p.write(Ux2070E_buffer_second); - p.write('"'); -}); - -test('1-4 byte utf8 character string chunked inbetween random bytes: Aж文𠜱B', function (t) { - t.plan(1); - -var p = new Parser(); - p.onValue = function (value) { - t.equal(value, 'Aж文𠜱B'); - }; - - var eclectic_buffer = new Buffer([0x41, // A - 0xd0, 0xb6, // ж - 0xe6, 0x96, 0x87, // 文 - 0xf0, 0xa0, 0x9c, 0xb1, // 𠜱 - 0x42]); // B - - var rand_chunk = Math.floor(Math.random() * (eclectic_buffer.length)); - var first_buffer = eclectic_buffer.slice(0, rand_chunk); - var second_buffer = eclectic_buffer.slice(rand_chunk); - - //console.log('eclectic_buffer: ' + eclectic_buffer) - //console.log('sliced from 0 to ' + rand_chunk); - //console.log(first_buffer); - //console.log('then sliced from ' + rand_chunk + ' to the end'); - //console.log(second_buffer); - - console.log('chunked after offset ' + rand_chunk); - p.write('"'); - p.write(first_buffer); - p.write(second_buffer); - p.write('"'); - -}); \ No newline at end of file diff --git a/node_modules/browserify/node_modules/JSONStream/node_modules/jsonparse/test/offset.js b/node_modules/browserify/node_modules/JSONStream/node_modules/jsonparse/test/offset.js deleted file mode 100644 index 9a552ab0..00000000 --- a/node_modules/browserify/node_modules/JSONStream/node_modules/jsonparse/test/offset.js +++ /dev/null @@ -1,67 +0,0 @@ -var test = require('tape'); -var Parser = require('../'); - -var input = '{\n "string": "value",\n "number": 3,\n "object"'; -var input2 = ': {\n "key": "vд"\n },\n "array": [\n -1,\n 12\n ]\n '; -var input3 = '"null": null, "true": true, "false": false, "frac": 3.14 }'; - -var offsets = [ - [ 0, Parser.C.LEFT_BRACE ], - [ 4, Parser.C.STRING ], - [ 12, Parser.C.COLON ], - [ 14, Parser.C.STRING ], - [ 21, Parser.C.COMMA ], - [ 25, Parser.C.STRING ], - [ 33, Parser.C.COLON ], - [ 35, Parser.C.NUMBER ], - [ 36, Parser.C.COMMA ], - [ 40, Parser.C.STRING ], - [ 48, Parser.C.COLON ], - [ 50, Parser.C.LEFT_BRACE ], - [ 54, Parser.C.STRING ], - [ 59, Parser.C.COLON ], - [ 61, Parser.C.STRING ], - [ 69, Parser.C.RIGHT_BRACE ], - [ 70, Parser.C.COMMA ], - [ 74, Parser.C.STRING ], - [ 81, Parser.C.COLON ], - [ 83, Parser.C.LEFT_BRACKET ], - [ 87, Parser.C.NUMBER ], - [ 89, Parser.C.COMMA ], - [ 93, Parser.C.NUMBER ], - [ 98, Parser.C.RIGHT_BRACKET ], - [ 102, Parser.C.STRING ], - [ 108, Parser.C.COLON ], - [ 110, Parser.C.NULL ], - [ 114, Parser.C.COMMA ], - [ 116, Parser.C.STRING ], - [ 122, Parser.C.COLON ], - [ 124, Parser.C.TRUE ], - [ 128, Parser.C.COMMA ], - [ 130, Parser.C.STRING ], - [ 137, Parser.C.COLON ], - [ 139, Parser.C.FALSE ], - [ 144, Parser.C.COMMA ], - [ 146, Parser.C.STRING ], - [ 152, Parser.C.COLON ], - [ 154, Parser.C.NUMBER ], - [ 159, Parser.C.RIGHT_BRACE ] -]; - -test('offset', function(t) { - t.plan(offsets.length * 2 + 1); - - var p = new Parser(); - var i = 0; - p.onToken = function (token) { - t.equal(p.offset, offsets[i][0]); - t.equal(token, offsets[i][1]); - i++; - }; - - p.write(input); - p.write(input2); - p.write(input3); - - t.equal(i, offsets.length); -}); diff --git a/node_modules/browserify/node_modules/JSONStream/node_modules/jsonparse/test/primitives.js b/node_modules/browserify/node_modules/JSONStream/node_modules/jsonparse/test/primitives.js deleted file mode 100644 index 33cae169..00000000 --- a/node_modules/browserify/node_modules/JSONStream/node_modules/jsonparse/test/primitives.js +++ /dev/null @@ -1,57 +0,0 @@ -var test = require('tape'); -var Parser = require('../'); - -var expected = [ - [ [], '' ], - [ [], 'Hello' ], - [ [], 'This"is' ], - [ [], '\r\n\f\t\\/"' ], - [ [], 'Λάμβδα' ], - [ [], '\\' ], - [ [], '/' ], - [ [], '"' ], - [ [ 0 ], 0 ], - [ [ 1 ], 1 ], - [ [ 2 ], -1 ], - [ [], [ 0, 1, -1 ] ], - [ [ 0 ], 1 ], - [ [ 1 ], 1.1 ], - [ [ 2 ], -1.1 ], - [ [ 3 ], -1 ], - [ [], [ 1, 1.1, -1.1, -1 ] ], - [ [ 0 ], -1 ], - [ [], [ -1 ] ], - [ [ 0 ], -0.1 ], - [ [], [ -0.1 ] ], - [ [ 0 ], 6.02e+23 ], - [ [], [ 6.02e+23 ] ], - [ [ 0 ], '7161093205057351174' ], - [ [], [ '7161093205057351174'] ] -]; - -test('primitives', function (t) { - t.plan(25); - - var p = new Parser(); - p.onValue = function (value) { - var keys = this.stack - .slice(1) - .map(function (item) { return item.key }) - .concat(this.key !== undefined ? this.key : []) - ; - t.deepEqual( - [ keys, value ], - expected.shift() - ); - }; - - p.write('"""Hello""This\\"is""\\r\\n\\f\\t\\\\\\/\\""'); - p.write('"\\u039b\\u03ac\\u03bc\\u03b2\\u03b4\\u03b1"'); - p.write('"\\\\"'); - p.write('"\\/"'); - p.write('"\\""'); - p.write('[0,1,-1]'); - p.write('[1.0,1.1,-1.1,-1.0][-1][-0.1]'); - p.write('[6.02e23]'); - p.write('[7161093205057351174]'); -}); diff --git a/node_modules/browserify/node_modules/JSONStream/node_modules/jsonparse/test/unvalid.js b/node_modules/browserify/node_modules/JSONStream/node_modules/jsonparse/test/unvalid.js deleted file mode 100644 index 7715cc0e..00000000 --- a/node_modules/browserify/node_modules/JSONStream/node_modules/jsonparse/test/unvalid.js +++ /dev/null @@ -1,15 +0,0 @@ -var test = require('tape'); -var Parser = require('../'); - -test('unvalid', function (t) { - var count = 0; - - var p = new Parser(); - p.onError = function (value) { - count++; - t.equal(1, count); - t.end(); - }; - - p.write('{"test": eer['); -}); diff --git a/node_modules/browserify/node_modules/JSONStream/node_modules/jsonparse/test/utf8.js b/node_modules/browserify/node_modules/JSONStream/node_modules/jsonparse/test/utf8.js deleted file mode 100644 index 6cb842f3..00000000 --- a/node_modules/browserify/node_modules/JSONStream/node_modules/jsonparse/test/utf8.js +++ /dev/null @@ -1,38 +0,0 @@ -var test = require('tape'); -var Parser = require('../'); - -test('3 bytes of utf8', function (t) { - t.plan(1); - - var p = new Parser(); - p.onValue = function (value) { - t.equal(value, '├──'); - }; - - p.write('"├──"'); -}); - -test('utf8 snowman', function (t) { - t.plan(1); - - var p = new Parser(); - p.onValue = function (value) { - t.equal(value, '☃'); - }; - - p.write('"☃"'); -}); - -test('utf8 with regular ascii', function (t) { - t.plan(4); - - var p = new Parser(); - var expected = [ "snow: ☃!", "xyz", "¡que!" ]; - expected.push(expected.slice()); - - p.onValue = function (value) { - t.deepEqual(value, expected.shift()); - }; - - p.write('["snow: ☃!","xyz","¡que!"]'); -}); diff --git a/node_modules/browserify/node_modules/JSONStream/node_modules/through/.travis.yml b/node_modules/browserify/node_modules/JSONStream/node_modules/through/.travis.yml deleted file mode 100644 index c693a939..00000000 --- a/node_modules/browserify/node_modules/JSONStream/node_modules/through/.travis.yml +++ /dev/null @@ -1,5 +0,0 @@ -language: node_js -node_js: - - 0.6 - - 0.8 - - "0.10" diff --git a/node_modules/browserify/node_modules/JSONStream/node_modules/through/LICENSE.APACHE2 b/node_modules/browserify/node_modules/JSONStream/node_modules/through/LICENSE.APACHE2 deleted file mode 100644 index 6366c047..00000000 --- a/node_modules/browserify/node_modules/JSONStream/node_modules/through/LICENSE.APACHE2 +++ /dev/null @@ -1,15 +0,0 @@ -Apache License, Version 2.0 - -Copyright (c) 2011 Dominic Tarr - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. diff --git a/node_modules/browserify/node_modules/JSONStream/node_modules/through/LICENSE.MIT b/node_modules/browserify/node_modules/JSONStream/node_modules/through/LICENSE.MIT deleted file mode 100644 index 6eafbd73..00000000 --- a/node_modules/browserify/node_modules/JSONStream/node_modules/through/LICENSE.MIT +++ /dev/null @@ -1,24 +0,0 @@ -The MIT License - -Copyright (c) 2011 Dominic Tarr - -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/node_modules/browserify/node_modules/JSONStream/node_modules/through/index.js b/node_modules/browserify/node_modules/JSONStream/node_modules/through/index.js deleted file mode 100644 index ca5fc590..00000000 --- a/node_modules/browserify/node_modules/JSONStream/node_modules/through/index.js +++ /dev/null @@ -1,108 +0,0 @@ -var Stream = require('stream') - -// through -// -// a stream that does nothing but re-emit the input. -// useful for aggregating a series of changing but not ending streams into one stream) - -exports = module.exports = through -through.through = through - -//create a readable writable stream. - -function through (write, end, opts) { - write = write || function (data) { this.queue(data) } - end = end || function () { this.queue(null) } - - var ended = false, destroyed = false, buffer = [], _ended = false - var stream = new Stream() - stream.readable = stream.writable = true - stream.paused = false - -// stream.autoPause = !(opts && opts.autoPause === false) - stream.autoDestroy = !(opts && opts.autoDestroy === false) - - stream.write = function (data) { - write.call(this, data) - return !stream.paused - } - - function drain() { - while(buffer.length && !stream.paused) { - var data = buffer.shift() - if(null === data) - return stream.emit('end') - else - stream.emit('data', data) - } - } - - stream.queue = stream.push = function (data) { -// console.error(ended) - if(_ended) return stream - if(data === null) _ended = true - buffer.push(data) - drain() - return stream - } - - //this will be registered as the first 'end' listener - //must call destroy next tick, to make sure we're after any - //stream piped from here. - //this is only a problem if end is not emitted synchronously. - //a nicer way to do this is to make sure this is the last listener for 'end' - - stream.on('end', function () { - stream.readable = false - if(!stream.writable && stream.autoDestroy) - process.nextTick(function () { - stream.destroy() - }) - }) - - function _end () { - stream.writable = false - end.call(stream) - if(!stream.readable && stream.autoDestroy) - stream.destroy() - } - - stream.end = function (data) { - if(ended) return - ended = true - if(arguments.length) stream.write(data) - _end() // will emit or queue - return stream - } - - stream.destroy = function () { - if(destroyed) return - destroyed = true - ended = true - buffer.length = 0 - stream.writable = stream.readable = false - stream.emit('close') - return stream - } - - stream.pause = function () { - if(stream.paused) return - stream.paused = true - return stream - } - - stream.resume = function () { - if(stream.paused) { - stream.paused = false - stream.emit('resume') - } - drain() - //may have become paused again, - //as drain emits 'data'. - if(!stream.paused) - stream.emit('drain') - return stream - } - return stream -} - diff --git a/node_modules/browserify/node_modules/JSONStream/node_modules/through/package.json b/node_modules/browserify/node_modules/JSONStream/node_modules/through/package.json deleted file mode 100644 index 85acfbf8..00000000 --- a/node_modules/browserify/node_modules/JSONStream/node_modules/through/package.json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "name": "through", - "version": "2.3.8", - "description": "simplified stream construction", - "main": "index.js", - "scripts": { - "test": "set -e; for t in test/*.js; do node $t; done" - }, - "devDependencies": { - "stream-spec": "~0.3.5", - "tape": "~2.3.2", - "from": "~0.1.3" - }, - "keywords": [ - "stream", - "streams", - "user-streams", - "pipe" - ], - "author": { - "name": "Dominic Tarr", - "email": "dominic.tarr@gmail.com", - "url": "dominictarr.com" - }, - "license": "MIT", - "repository": { - "type": "git", - "url": "git+https://github.com/dominictarr/through.git" - }, - "homepage": "https://github.com/dominictarr/through", - "testling": { - "browsers": [ - "ie/8..latest", - "ff/15..latest", - "chrome/20..latest", - "safari/5.1..latest" - ], - "files": "test/*.js" - }, - "gitHead": "2c5a6f9a0cc54da759b6e10964f2081c358e49dc", - "bugs": { - "url": "https://github.com/dominictarr/through/issues" - }, - "_id": "through@2.3.8", - "_shasum": "0dd4c9ffaabc357960b1b724115d7e0e86a2e1f5", - "_from": "through@>=2.2.7 <3.0.0", - "_npmVersion": "2.12.0", - "_nodeVersion": "2.3.1", - "_npmUser": { - "name": "dominictarr", - "email": "dominic.tarr@gmail.com" - }, - "maintainers": [ - { - "name": "dominictarr", - "email": "dominic.tarr@gmail.com" - } - ], - "dist": { - "shasum": "0dd4c9ffaabc357960b1b724115d7e0e86a2e1f5", - "tarball": "http://registry.npmjs.org/through/-/through-2.3.8.tgz" - }, - "directories": {}, - "_resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", - "readme": "ERROR: No README data found!" -} diff --git a/node_modules/browserify/node_modules/JSONStream/node_modules/through/readme.markdown b/node_modules/browserify/node_modules/JSONStream/node_modules/through/readme.markdown deleted file mode 100644 index cb34c813..00000000 --- a/node_modules/browserify/node_modules/JSONStream/node_modules/through/readme.markdown +++ /dev/null @@ -1,64 +0,0 @@ -#through - -[![build status](https://secure.travis-ci.org/dominictarr/through.png)](http://travis-ci.org/dominictarr/through) -[![testling badge](https://ci.testling.com/dominictarr/through.png)](https://ci.testling.com/dominictarr/through) - -Easy way to create a `Stream` that is both `readable` and `writable`. - -* Pass in optional `write` and `end` methods. -* `through` takes care of pause/resume logic if you use `this.queue(data)` instead of `this.emit('data', data)`. -* Use `this.pause()` and `this.resume()` to manage flow. -* Check `this.paused` to see current flow state. (`write` always returns `!this.paused`). - -This function is the basis for most of the synchronous streams in -[event-stream](http://github.com/dominictarr/event-stream). - -``` js -var through = require('through') - -through(function write(data) { - this.queue(data) //data *must* not be null - }, - function end () { //optional - this.queue(null) - }) -``` - -Or, can also be used _without_ buffering on pause, use `this.emit('data', data)`, -and this.emit('end') - -``` js -var through = require('through') - -through(function write(data) { - this.emit('data', data) - //this.pause() - }, - function end () { //optional - this.emit('end') - }) -``` - -## Extended Options - -You will probably not need these 99% of the time. - -### autoDestroy=false - -By default, `through` emits close when the writable -and readable side of the stream has ended. -If that is not desired, set `autoDestroy=false`. - -``` js -var through = require('through') - -//like this -var ts = through(write, end, {autoDestroy: false}) -//or like this -var ts = through(write, end) -ts.autoDestroy = false -``` - -## License - -MIT / Apache2 diff --git a/node_modules/browserify/node_modules/JSONStream/node_modules/through/test/async.js b/node_modules/browserify/node_modules/JSONStream/node_modules/through/test/async.js deleted file mode 100644 index 46bdbaeb..00000000 --- a/node_modules/browserify/node_modules/JSONStream/node_modules/through/test/async.js +++ /dev/null @@ -1,28 +0,0 @@ -var from = require('from') -var through = require('../') - -var tape = require('tape') - -tape('simple async example', function (t) { - - var n = 0, expected = [1,2,3,4,5], actual = [] - from(expected) - .pipe(through(function(data) { - this.pause() - n ++ - setTimeout(function(){ - console.log('pushing data', data) - this.push(data) - this.resume() - }.bind(this), 300) - })).pipe(through(function(data) { - console.log('pushing data second time', data); - this.push(data) - })).on('data', function (d) { - actual.push(d) - }).on('end', function() { - t.deepEqual(actual, expected) - t.end() - }) - -}) diff --git a/node_modules/browserify/node_modules/JSONStream/node_modules/through/test/auto-destroy.js b/node_modules/browserify/node_modules/JSONStream/node_modules/through/test/auto-destroy.js deleted file mode 100644 index 9a8fd000..00000000 --- a/node_modules/browserify/node_modules/JSONStream/node_modules/through/test/auto-destroy.js +++ /dev/null @@ -1,30 +0,0 @@ -var test = require('tape') -var through = require('../') - -// must emit end before close. - -test('end before close', function (assert) { - var ts = through() - ts.autoDestroy = false - var ended = false, closed = false - - ts.on('end', function () { - assert.ok(!closed) - ended = true - }) - ts.on('close', function () { - assert.ok(ended) - closed = true - }) - - ts.write(1) - ts.write(2) - ts.write(3) - ts.end() - assert.ok(ended) - assert.notOk(closed) - ts.destroy() - assert.ok(closed) - assert.end() -}) - diff --git a/node_modules/browserify/node_modules/JSONStream/node_modules/through/test/buffering.js b/node_modules/browserify/node_modules/JSONStream/node_modules/through/test/buffering.js deleted file mode 100644 index b0084bfc..00000000 --- a/node_modules/browserify/node_modules/JSONStream/node_modules/through/test/buffering.js +++ /dev/null @@ -1,71 +0,0 @@ -var test = require('tape') -var through = require('../') - -// must emit end before close. - -test('buffering', function(assert) { - var ts = through(function (data) { - this.queue(data) - }, function () { - this.queue(null) - }) - - var ended = false, actual = [] - - ts.on('data', actual.push.bind(actual)) - ts.on('end', function () { - ended = true - }) - - ts.write(1) - ts.write(2) - ts.write(3) - assert.deepEqual(actual, [1, 2, 3]) - ts.pause() - ts.write(4) - ts.write(5) - ts.write(6) - assert.deepEqual(actual, [1, 2, 3]) - ts.resume() - assert.deepEqual(actual, [1, 2, 3, 4, 5, 6]) - ts.pause() - ts.end() - assert.ok(!ended) - ts.resume() - assert.ok(ended) - assert.end() -}) - -test('buffering has data in queue, when ends', function (assert) { - - /* - * If stream ends while paused with data in the queue, - * stream should still emit end after all data is written - * on resume. - */ - - var ts = through(function (data) { - this.queue(data) - }, function () { - this.queue(null) - }) - - var ended = false, actual = [] - - ts.on('data', actual.push.bind(actual)) - ts.on('end', function () { - ended = true - }) - - ts.pause() - ts.write(1) - ts.write(2) - ts.write(3) - ts.end() - assert.deepEqual(actual, [], 'no data written yet, still paused') - assert.ok(!ended, 'end not emitted yet, still paused') - ts.resume() - assert.deepEqual(actual, [1, 2, 3], 'resumed, all data should be delivered') - assert.ok(ended, 'end should be emitted once all data was delivered') - assert.end(); -}) diff --git a/node_modules/browserify/node_modules/JSONStream/node_modules/through/test/end.js b/node_modules/browserify/node_modules/JSONStream/node_modules/through/test/end.js deleted file mode 100644 index fa113f58..00000000 --- a/node_modules/browserify/node_modules/JSONStream/node_modules/through/test/end.js +++ /dev/null @@ -1,45 +0,0 @@ -var test = require('tape') -var through = require('../') - -// must emit end before close. - -test('end before close', function (assert) { - var ts = through() - var ended = false, closed = false - - ts.on('end', function () { - assert.ok(!closed) - ended = true - }) - ts.on('close', function () { - assert.ok(ended) - closed = true - }) - - ts.write(1) - ts.write(2) - ts.write(3) - ts.end() - assert.ok(ended) - assert.ok(closed) - assert.end() -}) - -test('end only once', function (t) { - - var ts = through() - var ended = false, closed = false - - ts.on('end', function () { - t.equal(ended, false) - ended = true - }) - - ts.queue(null) - ts.queue(null) - ts.queue(null) - - ts.resume() - - t.end() -}) diff --git a/node_modules/browserify/node_modules/JSONStream/node_modules/through/test/index.js b/node_modules/browserify/node_modules/JSONStream/node_modules/through/test/index.js deleted file mode 100644 index 96da82f9..00000000 --- a/node_modules/browserify/node_modules/JSONStream/node_modules/through/test/index.js +++ /dev/null @@ -1,133 +0,0 @@ - -var test = require('tape') -var spec = require('stream-spec') -var through = require('../') - -/* - I'm using these two functions, and not streams and pipe - so there is less to break. if this test fails it must be - the implementation of _through_ -*/ - -function write(array, stream) { - array = array.slice() - function next() { - while(array.length) - if(stream.write(array.shift()) === false) - return stream.once('drain', next) - - stream.end() - } - - next() -} - -function read(stream, callback) { - var actual = [] - stream.on('data', function (data) { - actual.push(data) - }) - stream.once('end', function () { - callback(null, actual) - }) - stream.once('error', function (err) { - callback(err) - }) -} - -test('simple defaults', function(assert) { - - var l = 1000 - , expected = [] - - while(l--) expected.push(l * Math.random()) - - var t = through() - var s = spec(t).through().pausable() - - read(t, function (err, actual) { - assert.ifError(err) - assert.deepEqual(actual, expected) - assert.end() - }) - - t.on('close', s.validate) - - write(expected, t) -}); - -test('simple functions', function(assert) { - - var l = 1000 - , expected = [] - - while(l--) expected.push(l * Math.random()) - - var t = through(function (data) { - this.emit('data', data*2) - }) - var s = spec(t).through().pausable() - - - read(t, function (err, actual) { - assert.ifError(err) - assert.deepEqual(actual, expected.map(function (data) { - return data*2 - })) - assert.end() - }) - - t.on('close', s.validate) - - write(expected, t) -}) - -test('pauses', function(assert) { - - var l = 1000 - , expected = [] - - while(l--) expected.push(l) //Math.random()) - - var t = through() - - var s = spec(t) - .through() - .pausable() - - t.on('data', function () { - if(Math.random() > 0.1) return - t.pause() - process.nextTick(function () { - t.resume() - }) - }) - - read(t, function (err, actual) { - assert.ifError(err) - assert.deepEqual(actual, expected) - }) - - t.on('close', function () { - s.validate() - assert.end() - }) - - write(expected, t) -}) - -test('does not soft-end on `undefined`', function(assert) { - var stream = through() - , count = 0 - - stream.on('data', function (data) { - count++ - }) - - stream.write(undefined) - stream.write(undefined) - - assert.equal(count, 2) - - assert.end() -}) diff --git a/node_modules/browserify/node_modules/JSONStream/package.json b/node_modules/browserify/node_modules/JSONStream/package.json deleted file mode 100644 index a2202fd4..00000000 --- a/node_modules/browserify/node_modules/JSONStream/package.json +++ /dev/null @@ -1,80 +0,0 @@ -{ - "name": "JSONStream", - "version": "1.3.0", - "description": "rawStream.pipe(JSONStream.parse()).pipe(streamOfObjects)", - "homepage": "http://github.com/dominictarr/JSONStream", - "repository": { - "type": "git", - "url": "git://github.com/dominictarr/JSONStream.git" - }, - "license": "(MIT OR Apache-2.0)", - "keywords": [ - "json", - "stream", - "streaming", - "parser", - "async", - "parsing" - ], - "dependencies": { - "jsonparse": "^1.2.0", - "through": ">=2.2.7 <3" - }, - "devDependencies": { - "it-is": "~1", - "assertions": "~2.2.2", - "render": "~0.1.1", - "trees": "~0.0.3", - "event-stream": "~0.7.0", - "tape": "~2.12.3" - }, - "bin": { - "JSONStream": "./index.js" - }, - "author": { - "name": "Dominic Tarr", - "email": "dominic.tarr@gmail.com", - "url": "http://bit.ly/dominictarr" - }, - "scripts": { - "test": "set -e; for t in test/*.js; do echo '***' $t '***'; node $t; done" - }, - "optionalDependencies": {}, - "engines": { - "node": "*" - }, - "gitHead": "3d5d3283d79e23da81fa6fc4b76bc1f44ff0047d", - "bugs": { - "url": "https://github.com/dominictarr/JSONStream/issues" - }, - "_id": "JSONStream@1.3.0", - "_shasum": "680ab9ac6572a8a1a207e0b38721db1c77b215e5", - "_from": "JSONStream@>=1.0.3 <2.0.0", - "_npmVersion": "3.10.3", - "_nodeVersion": "6.5.0", - "_npmUser": { - "name": "dominictarr", - "email": "dominic.tarr@gmail.com" - }, - "dist": { - "shasum": "680ab9ac6572a8a1a207e0b38721db1c77b215e5", - "tarball": "https://registry.npmjs.org/JSONStream/-/JSONStream-1.3.0.tgz" - }, - "maintainers": [ - { - "name": "dominictarr", - "email": "dominic.tarr@gmail.com" - }, - { - "name": "doowb", - "email": "brian.woodward@gmail.com" - } - ], - "_npmOperationalInternal": { - "host": "packages-18-east.internal.npmjs.com", - "tmp": "tmp/JSONStream-1.3.0.tgz_1481845260408_0.7681232686154544" - }, - "directories": {}, - "_resolved": "https://registry.npmjs.org/JSONStream/-/JSONStream-1.3.0.tgz", - "readme": "ERROR: No README data found!" -} diff --git a/node_modules/browserify/node_modules/JSONStream/readme.markdown b/node_modules/browserify/node_modules/JSONStream/readme.markdown deleted file mode 100644 index 422c3df2..00000000 --- a/node_modules/browserify/node_modules/JSONStream/readme.markdown +++ /dev/null @@ -1,207 +0,0 @@ -# JSONStream - -streaming JSON.parse and stringify - -![](https://secure.travis-ci.org/dominictarr/JSONStream.png?branch=master) - -## install -```npm install JSONStream``` - -## example - -``` js - -var request = require('request') - , JSONStream = require('JSONStream') - , es = require('event-stream') - -request({url: 'http://isaacs.couchone.com/registry/_all_docs'}) - .pipe(JSONStream.parse('rows.*')) - .pipe(es.mapSync(function (data) { - console.error(data) - return data - })) -``` - -## JSONStream.parse(path) - -parse stream of values that match a path - -``` js - JSONStream.parse('rows.*.doc') -``` - -The `..` operator is the recursive descent operator from [JSONPath](http://goessner.net/articles/JsonPath/), which will match a child at any depth (see examples below). - -If your keys have keys that include `.` or `*` etc, use an array instead. -`['row', true, /^doc/]`. - -If you use an array, `RegExp`s, booleans, and/or functions. The `..` operator is also available in array representation, using `{recurse: true}`. -any object that matches the path will be emitted as 'data' (and `pipe`d down stream) - -If `path` is empty or null, no 'data' events are emitted. - -If you want to have keys emitted, you can prefix your `*` operator with `$`: `obj.$*` - in this case the data passed to the stream is an object with a `key` holding the key and a `value` property holding the data. - -### Examples - -query a couchdb view: - -``` bash -curl -sS localhost:5984/tests/_all_docs&include_docs=true -``` -you will get something like this: - -``` js -{"total_rows":129,"offset":0,"rows":[ - { "id":"change1_0.6995461115147918" - , "key":"change1_0.6995461115147918" - , "value":{"rev":"1-e240bae28c7bb3667f02760f6398d508"} - , "doc":{ - "_id": "change1_0.6995461115147918" - , "_rev": "1-e240bae28c7bb3667f02760f6398d508","hello":1} - }, - { "id":"change2_0.6995461115147918" - , "key":"change2_0.6995461115147918" - , "value":{"rev":"1-13677d36b98c0c075145bb8975105153"} - , "doc":{ - "_id":"change2_0.6995461115147918" - , "_rev":"1-13677d36b98c0c075145bb8975105153" - , "hello":2 - } - }, -]} - -``` - -we are probably most interested in the `rows.*.doc` - -create a `Stream` that parses the documents from the feed like this: - -``` js -var stream = JSONStream.parse(['rows', true, 'doc']) //rows, ANYTHING, doc - -stream.on('data', function(data) { - console.log('received:', data); -}); -//emits anything from _before_ the first match -stream.on('header', function (data) { - console.log('header:', data) // => {"total_rows":129,"offset":0} -}) - -``` -awesome! - -In case you wanted the contents the doc emitted: - -``` js -var stream = JSONStream.parse(['rows', true, 'doc', {emitKey: true}]) //rows, ANYTHING, doc, items in docs with keys - -stream.on('data', function(data) { - console.log('key:', data.key); - console.log('value:', data.value); -}); - -``` - -You can also emit the path: - -``` js -var stream = JSONStream.parse(['rows', true, 'doc', {emitPath: true}]) //rows, ANYTHING, doc, items in docs with keys - -stream.on('data', function(data) { - console.log('path:', data.path); - console.log('value:', data.value); -}); - -``` - -### recursive patterns (..) - -`JSONStream.parse('docs..value')` -(or `JSONStream.parse(['docs', {recurse: true}, 'value'])` using an array) -will emit every `value` object that is a child, grand-child, etc. of the -`docs` object. In this example, it will match exactly 5 times at various depth -levels, emitting 0, 1, 2, 3 and 4 as results. - -```js -{ - "total": 5, - "docs": [ - { - "key": { - "value": 0, - "some": "property" - } - }, - {"value": 1}, - {"value": 2}, - {"blbl": [{}, {"a":0, "b":1, "value":3}, 10]}, - {"value": 4} - ] -} -``` - -## JSONStream.parse(pattern, map) - -provide a function that can be used to map or filter -the json output. `map` is passed the value at that node of the pattern, -if `map` return non-nullish (anything but `null` or `undefined`) -that value will be emitted in the stream. If it returns a nullish value, -nothing will be emitted. - -`JSONStream` also emits `'header'` and `'footer'` events, -the `'header'` event contains anything in the output that was before -the first match, and the `'footer'`, is anything after the last match. - -## JSONStream.stringify(open, sep, close) - -Create a writable stream. - -you may pass in custom `open`, `close`, and `seperator` strings. -But, by default, `JSONStream.stringify()` will create an array, -(with default options `open='[\n', sep='\n,\n', close='\n]\n'`) - -If you call `JSONStream.stringify(false)` -the elements will only be seperated by a newline. - -If you only write one item this will be valid JSON. - -If you write many items, -you can use a `RegExp` to split it into valid chunks. - -## JSONStream.stringifyObject(open, sep, close) - -Very much like `JSONStream.stringify`, -but creates a writable stream for objects instead of arrays. - -Accordingly, `open='{\n', sep='\n,\n', close='\n}\n'`. - -When you `.write()` to the stream you must supply an array with `[ key, data ]` -as the first argument. - -## unix tool - -query npm to see all the modules that browserify has ever depended on. - -``` bash -curl https://registry.npmjs.org/browserify | JSONStream 'versions.*.dependencies' -``` - -## numbers - -numbers will be emitted as numbers. -huge numbers that cannot be represented in memory as javascript numbers will be emitted as strings. -cf https://github.com/creationix/jsonparse/commit/044b268f01c4b8f97fb936fc85d3bcfba179e5bb for details. - -## Acknowlegements - -this module depends on https://github.com/creationix/jsonparse -by Tim Caswell -and also thanks to Florent Jaby for teaching me about parsing with: -https://github.com/Floby/node-json-streams - -## license - -Dual-licensed under the MIT License or the Apache License, version 2.0 - diff --git a/node_modules/browserify/node_modules/JSONStream/t.js b/node_modules/browserify/node_modules/JSONStream/t.js deleted file mode 100644 index 1f2e9ac1..00000000 --- a/node_modules/browserify/node_modules/JSONStream/t.js +++ /dev/null @@ -1,18 +0,0 @@ -const JSONStream = require('./') -const stream = JSONStream.parse('data.*') - - -stream.on('data', (row) => { - console.log(row) // this never gets called, the stream closes immediately -}) - - -stream.write('{"data":') -stream.write('[') -stream.write('{"count": 1},') -stream.write('{"count": 2},') -stream.write('{"count": 3}') -stream.write(']}') -stream.end() - - diff --git a/node_modules/browserify/node_modules/JSONStream/test/bool.js b/node_modules/browserify/node_modules/JSONStream/test/bool.js deleted file mode 100644 index 6c386d60..00000000 --- a/node_modules/browserify/node_modules/JSONStream/test/bool.js +++ /dev/null @@ -1,41 +0,0 @@ - -var fs = require ('fs') - , join = require('path').join - , file = join(__dirname, 'fixtures','all_npm.json') - , JSONStream = require('../') - , it = require('it-is').style('colour') - - function randomObj () { - return ( - Math.random () < 0.4 - ? {hello: 'eonuhckmqjk', - whatever: 236515, - lies: true, - nothing: [null], -// stuff: [Math.random(),Math.random(),Math.random()] - } - : ['AOREC', 'reoubaor', {ouec: 62642}, [[[], {}, 53]]] - ) - } - -var expected = [] - , stringify = JSONStream.stringify() - , es = require('event-stream') - , stringified = '' - , called = 0 - , count = 10 - , ended = false - -while (count --) - expected.push(randomObj()) - - es.connect( - es.readArray(expected), - stringify, - JSONStream.parse([true]), - es.writeArray(function (err, lines) { - - it(lines).has(expected) - console.error('PASSED') - }) - ) diff --git a/node_modules/browserify/node_modules/JSONStream/test/browser.js b/node_modules/browserify/node_modules/JSONStream/test/browser.js deleted file mode 100644 index 3c28d491..00000000 --- a/node_modules/browserify/node_modules/JSONStream/test/browser.js +++ /dev/null @@ -1,18 +0,0 @@ -var test = require('tape') -var JSONStream = require('../') -var testData = '{"rows":[{"hello":"world"}, {"foo": "bar"}]}' - -test('basic parsing', function (t) { - t.plan(2) - var parsed = JSONStream.parse("rows.*") - var parsedKeys = {} - parsed.on('data', function(match) { - parsedKeys[Object.keys(match)[0]] = true - }) - parsed.on('end', function() { - t.equal(!!parsedKeys['hello'], true) - t.equal(!!parsedKeys['foo'], true) - }) - parsed.write(testData) - parsed.end() -}) \ No newline at end of file diff --git a/node_modules/browserify/node_modules/JSONStream/test/destroy_missing.js b/node_modules/browserify/node_modules/JSONStream/test/destroy_missing.js deleted file mode 100644 index 315fdc83..00000000 --- a/node_modules/browserify/node_modules/JSONStream/test/destroy_missing.js +++ /dev/null @@ -1,27 +0,0 @@ -var fs = require ('fs'); -var net = require('net'); -var join = require('path').join; -var file = join(__dirname, 'fixtures','all_npm.json'); -var JSONStream = require('../'); - - -var server = net.createServer(function(client) { - var parser = JSONStream.parse([]); - parser.on('end', function() { - console.log('close') - console.error('PASSED'); - server.close(); - }); - client.pipe(parser); - var n = 4 - client.on('data', function () { - if(--n) return - client.end(); - }) -}); -server.listen(9999); - - -var client = net.connect({ port : 9999 }, function() { - fs.createReadStream(file).pipe(client).on('data', console.log) //.resume(); -}); diff --git a/node_modules/browserify/node_modules/JSONStream/test/disabled/doubledot1.js b/node_modules/browserify/node_modules/JSONStream/test/disabled/doubledot1.js deleted file mode 100644 index 78149b93..00000000 --- a/node_modules/browserify/node_modules/JSONStream/test/disabled/doubledot1.js +++ /dev/null @@ -1,29 +0,0 @@ -var fs = require ('fs') - , join = require('path').join - , file = join(__dirname, 'fixtures','all_npm.json') - , JSONStream = require('../') - , it = require('it-is') - -var expected = JSON.parse(fs.readFileSync(file)) - , parser = JSONStream.parse('rows..rev') - , called = 0 - , ended = false - , parsed = [] - -fs.createReadStream(file).pipe(parser) - -parser.on('data', function (data) { - called ++ - parsed.push(data) -}) - -parser.on('end', function () { - ended = true -}) - -process.on('exit', function () { - it(called).equal(expected.rows.length) - for (var i = 0 ; i < expected.rows.length ; i++) - it(parsed[i]).deepEqual(expected.rows[i].value.rev) - console.error('PASSED') -}) diff --git a/node_modules/browserify/node_modules/JSONStream/test/disabled/doubledot2.js b/node_modules/browserify/node_modules/JSONStream/test/disabled/doubledot2.js deleted file mode 100644 index f99d8819..00000000 --- a/node_modules/browserify/node_modules/JSONStream/test/disabled/doubledot2.js +++ /dev/null @@ -1,29 +0,0 @@ - var fs = require ('fs') - , join = require('path').join - , file = join(__dirname, 'fixtures','depth.json') - , JSONStream = require('../') - , it = require('it-is') - - var expected = JSON.parse(fs.readFileSync(file)) - , parser = JSONStream.parse(['docs', {recurse: true}, 'value']) - , called = 0 - , ended = false - , parsed = [] - - fs.createReadStream(file).pipe(parser) - - parser.on('data', function (data) { - called ++ - parsed.push(data) - }) - - parser.on('end', function () { - ended = true - }) - - process.on('exit', function () { - it(called).equal(5) - for (var i = 0 ; i < 5 ; i++) - it(parsed[i]).deepEqual(i) - console.error('PASSED') - }) diff --git a/node_modules/browserify/node_modules/JSONStream/test/empty.js b/node_modules/browserify/node_modules/JSONStream/test/empty.js deleted file mode 100644 index 19e888c1..00000000 --- a/node_modules/browserify/node_modules/JSONStream/test/empty.js +++ /dev/null @@ -1,44 +0,0 @@ -var JSONStream = require('../') - , stream = require('stream') - , it = require('it-is') - -var output = [ [], [] ] - -var parser1 = JSONStream.parse(['docs', /./]) -parser1.on('data', function(data) { - output[0].push(data) -}) - -var parser2 = JSONStream.parse(['docs', /./]) -parser2.on('data', function(data) { - output[1].push(data) -}) - -var pending = 2 -function onend () { - if (--pending > 0) return - it(output).deepEqual([ - [], [{hello: 'world'}] - ]) - console.error('PASSED') -} -parser1.on('end', onend) -parser2.on('end', onend) - -function makeReadableStream() { - var readStream = new stream.Stream() - readStream.readable = true - readStream.write = function (data) { this.emit('data', data) } - readStream.end = function (data) { this.emit('end') } - return readStream -} - -var emptyArray = makeReadableStream() -emptyArray.pipe(parser1) -emptyArray.write('{"docs":[]}') -emptyArray.end() - -var objectArray = makeReadableStream() -objectArray.pipe(parser2) -objectArray.write('{"docs":[{"hello":"world"}]}') -objectArray.end() diff --git a/node_modules/browserify/node_modules/JSONStream/test/error_contents.js b/node_modules/browserify/node_modules/JSONStream/test/error_contents.js deleted file mode 100644 index 13c27aec..00000000 --- a/node_modules/browserify/node_modules/JSONStream/test/error_contents.js +++ /dev/null @@ -1,45 +0,0 @@ - - -var fs = require ('fs') - , join = require('path').join - , file = join(__dirname, 'fixtures','error.json') - , JSONStream = require('../') - , it = require('it-is') - -var expected = JSON.parse(fs.readFileSync(file)) - , parser = JSONStream.parse(['rows']) - , called = 0 - , headerCalled = 0 - , footerCalled = 0 - , ended = false - , parsed = [] - -fs.createReadStream(file).pipe(parser) - -parser.on('header', function (data) { - headerCalled ++ - it(data).deepEqual({ - error: 'error_code', - message: 'this is an error message' - }) -}) - -parser.on('footer', function (data) { - footerCalled ++ -}) - -parser.on('data', function (data) { - called ++ - parsed.push(data) -}) - -parser.on('end', function () { - ended = true -}) - -process.on('exit', function () { - it(called).equal(0) - it(headerCalled).equal(1) - it(footerCalled).equal(0) - console.error('PASSED') -}) diff --git a/node_modules/browserify/node_modules/JSONStream/test/fixtures/all_npm.json b/node_modules/browserify/node_modules/JSONStream/test/fixtures/all_npm.json deleted file mode 100644 index 6303ea2f..00000000 --- a/node_modules/browserify/node_modules/JSONStream/test/fixtures/all_npm.json +++ /dev/null @@ -1,4030 +0,0 @@ -{"total_rows":4028,"offset":0,"rows":[ -{"id":"","key":"","value":{"rev":"1-2f11e026763c10730d8b19ba5dce7565"}}, -{"id":"3scale","key":"3scale","value":{"rev":"3-db3d574bf0ecdfdf627afeaa21b4bdaa"}}, -{"id":"7digital-api","key":"7digital-api","value":{"rev":"20-21d11832780e2368aabc946598a41dd5"}}, -{"id":"AMD","key":"AMD","value":{"rev":"7-3b4305a9c786ab4c5ce611e7f0de0aca"}}, -{"id":"AriesNode","key":"AriesNode","value":{"rev":"3-9d88392bca6582c5c54784927dbfdee6"}}, -{"id":"Array.prototype.forEachAsync","key":"Array.prototype.forEachAsync","value":{"rev":"3-85696441ba6bef77cc1e7de7b073110e"}}, -{"id":"Babel","key":"Babel","value":{"rev":"5-9d8370c6ac6fd9cd3d530f26a9379814"}}, -{"id":"Blaggie-System","key":"Blaggie-System","value":{"rev":"3-47782b1e5cbfa425170192799510e148"}}, -{"id":"Blob","key":"Blob","value":{"rev":"3-cf5fb5d69da4dd00bc4f2be8870ca698"}}, -{"id":"BlobBuilder","key":"BlobBuilder","value":{"rev":"3-eb977ff1713a915384fac994f9d8fa7c"}}, -{"id":"Buffer","key":"Buffer","value":{"rev":"3-549594b58e83d6d07bb219e73de558e5"}}, -{"id":"CLI-UI","key":"CLI-UI","value":{"rev":"5-5912625f27b4bdfb4d3eed16726c48a8"}}, -{"id":"CLoader","key":"CLoader","value":{"rev":"1-ad3c317ddf3497e73ab41cb1ddbc6ba8"}}, -{"id":"CM1","key":"CM1","value":{"rev":"15-a325a2dc28bc6967a1a14beed86f3b80"}}, -{"id":"CONFIGURATOR","key":"CONFIGURATOR","value":{"rev":"3-c76bf9282a75cc4d3fb349e831ccb8a5"}}, -{"id":"Cashew","key":"Cashew","value":{"rev":"7-6a74dc51dbecc47d2c15bfb7d056a20f"}}, -{"id":"Class","key":"Class","value":{"rev":"5-958c6365f76a60a8b3dafbbd9730ac7e"}}, -{"id":"ClassLoader","key":"ClassLoader","value":{"rev":"3-27fe8faa8a1d60d639f87af52826ed47"}}, -{"id":"ClearSilver","key":"ClearSilver","value":{"rev":"3-f3e54eb9ce64fc6a090186e61f15ed0b"}}, -{"id":"Couch-cleaner","key":"Couch-cleaner","value":{"rev":"3-fc77270917d967a4e2e8637cfa9f0fe0"}}, -{"id":"CouchCover","key":"CouchCover","value":{"rev":"15-3b2d87d314f57272a5c27c42bbb3eaf9"}}, -{"id":"DOM-js","key":"DOM-js","value":{"rev":"8-748cdc96566a7b65bbd0b12be2eeb386"}}, -{"id":"DOMBuilder","key":"DOMBuilder","value":{"rev":"19-41a518f2ce16fabc0241535ccd967300"}}, -{"id":"DateZ","key":"DateZ","value":{"rev":"15-69d8115a9bd521e614eaad3cf2611264"}}, -{"id":"Dateselect","key":"Dateselect","value":{"rev":"3-6511567a876d8fe15724bbc7f247214c"}}, -{"id":"Deferred","key":"Deferred","value":{"rev":"3-c61dfc4a0d1bd3e9f35c7182f161f1f2"}}, -{"id":"DeskSet","key":"DeskSet","value":{"rev":"5-359bf760718898ff3591eb366e336cf9"}}, -{"id":"Estro","key":"Estro","value":{"rev":"11-97192e2d0327469bb30f814963db6dff"}}, -{"id":"EventProxy.js","key":"EventProxy.js","value":{"rev":"5-106696b56c6959cec4bfd37f406ee60a"}}, -{"id":"EventServer","key":"EventServer","value":{"rev":"3-59d174119435e99e2affe0c4ba7caae0"}}, -{"id":"Expressive","key":"Expressive","value":{"rev":"3-7eae0ea010eb9014b28108e814918eac"}}, -{"id":"F","key":"F","value":{"rev":"12-91a3db69527b46cf43e36b7ec64a4336"}}, -{"id":"Faker","key":"Faker","value":{"rev":"9-77951c352cb6f9a0b824be620a8fa40d"}}, -{"id":"FastLegS","key":"FastLegS","value":{"rev":"27-4399791981235021a36c94bb9e9b52b5"}}, -{"id":"Fayer","key":"Fayer","value":{"rev":"7-7e4974ff2716329375f9711bcabef701"}}, -{"id":"File","key":"File","value":{"rev":"3-45e353a984038bc48248dfc32b18f9a8"}}, -{"id":"FileError","key":"FileError","value":{"rev":"3-bb4b03a2548e3c229e2c7e92242946c3"}}, -{"id":"FileList","key":"FileList","value":{"rev":"3-ec4a3fc91794ef7fdd3fe88b19cec7b0"}}, -{"id":"FileReader","key":"FileReader","value":{"rev":"7-e81b58a2d8a765ae4781b41bbfadb4cb"}}, -{"id":"FileSaver","key":"FileSaver","value":{"rev":"3-476dcb3f63f4d10feee08d41a8128cb8"}}, -{"id":"FileWriter","key":"FileWriter","value":{"rev":"3-f2fcdbc4938de480cce2e8e8416a93dd"}}, -{"id":"FileWriterSync","key":"FileWriterSync","value":{"rev":"3-9494c3fe7a1230238f37a724ec10895b"}}, -{"id":"FormData","key":"FormData","value":{"rev":"3-8872d717575f7090107a96d81583f6fe"}}, -{"id":"Frenchpress","key":"Frenchpress","value":{"rev":"3-6d916fc15b9e77535771578f96c47c52"}}, -{"id":"FreshDocs","key":"FreshDocs","value":{"rev":"5-f1f3e76c85267faf21d06d911cc6c203"}}, -{"id":"Google_Plus_API","key":"Google_Plus_API","value":{"rev":"3-3302bc9846726d996a45daee3dc5922c"}}, -{"id":"Gord","key":"Gord","value":{"rev":"11-32fddef1453773ac7270ba0e7c83f727"}}, -{"id":"Graph","key":"Graph","value":{"rev":"7-c346edea4f90e3e18d50a62473868cf4"}}, -{"id":"GridFS","key":"GridFS","value":{"rev":"27-4fc649aaa007fddec4947bdb7111560f"}}, -{"id":"Haraka","key":"Haraka","value":{"rev":"39-ee8f890521c1579b3cc779c8ebe03480"}}, -{"id":"Index","key":"Index","value":{"rev":"29-d8f4881c1544bf51dea1927e87ebb3f3"}}, -{"id":"JS-Entities","key":"JS-Entities","value":{"rev":"7-905636d8b46f273210233b60063d079b"}}, -{"id":"JSLint-commonJS","key":"JSLint-commonJS","value":{"rev":"3-759a81f82af7055e85ee89c9707c9609"}}, -{"id":"JSON","key":"JSON","value":{"rev":"3-7966a79067c34fb5de2e62c796f67341"}}, -{"id":"JSONPath","key":"JSONPath","value":{"rev":"7-58789d57ae366a5b0ae4b36837f15d59"}}, -{"id":"JSONSelect","key":"JSONSelect","value":{"rev":"9-5b0730da91eeb52e8f54da516367dc0f"}}, -{"id":"JSONloops","key":"JSONloops","value":{"rev":"3-3d4a1f8bfcfd778ab7def54155324331"}}, -{"id":"JSPP","key":"JSPP","value":{"rev":"7-af09a2bb193b3ff44775e8fbb7d4f522"}}, -{"id":"JSV","key":"JSV","value":{"rev":"3-41a7af86909046111be8ee9b56b077c8"}}, -{"id":"Jody","key":"Jody","value":{"rev":"43-70c1cf40e93cd8ce53249e5295d6b159"}}, -{"id":"Journaling-Hash","key":"Journaling-Hash","value":{"rev":"3-ac676eecb40a4dff301c671fa4bb6be9"}}, -{"id":"Kahana","key":"Kahana","value":{"rev":"33-1cb7e291ae02cee4e8105509571223f5"}}, -{"id":"LazyBoy","key":"LazyBoy","value":{"rev":"13-20a8894e3a957f184f5ae2a3e709551c"}}, -{"id":"Lingo","key":"Lingo","value":{"rev":"9-1af9a6df616e601f09c8cec07ccad1ae"}}, -{"id":"Loggy","key":"Loggy","value":{"rev":"33-e115c25163ab468314eedbe497d1c51e"}}, -{"id":"MeCab","key":"MeCab","value":{"rev":"4-2687176c7b878930e812a534976a6988"}}, -{"id":"Mercury","key":"Mercury","value":{"rev":"3-09a6bff1332ed829bd2c37bfec244a41"}}, -{"id":"Mu","key":"Mu","value":{"rev":"7-28e6ab82c402c3a75fe0f79dea846b97"}}, -{"id":"N","key":"N","value":{"rev":"7-e265046b5bdd299b2cad1584083ce2d5"}}, -{"id":"NORRIS","key":"NORRIS","value":{"rev":"3-4b5b23b09118582c44414f8d480619e6"}}, -{"id":"NetOS","key":"NetOS","value":{"rev":"3-3f943f87a24c11e6dd8c265469914e80"}}, -{"id":"NewBase60","key":"NewBase60","value":{"rev":"3-fd84758db79870e82917d358c6673f32"}}, -{"id":"NoCR","key":"NoCR","value":{"rev":"3-8f6cddd528f2d6045e3dda6006fb6948"}}, -{"id":"NodObjC","key":"NodObjC","value":{"rev":"15-ea6ab2df532c90fcefe5a428950bfdbb"}}, -{"id":"Node-JavaScript-Preprocessor","key":"Node-JavaScript-Preprocessor","value":{"rev":"13-4662b5ad742caaa467ec5d6c8e77b1e5"}}, -{"id":"NodeInterval","key":"NodeInterval","value":{"rev":"3-dc3446db2e0cd5be29a3c07942dba66d"}}, -{"id":"NodeSSH","key":"NodeSSH","value":{"rev":"3-45530fae5a69c44a6dd92357910f4212"}}, -{"id":"Nonsense","key":"Nonsense","value":{"rev":"3-9d86191475bc76dc3dd496d4dfe5d94e"}}, -{"id":"NormAndVal","key":"NormAndVal","value":{"rev":"9-d3b3d6ffd046292f4733aa5f3eb7be61"}}, -{"id":"Olive","key":"Olive","value":{"rev":"5-67f3057f09cae5104f09472db1d215aa"}}, -{"id":"OnCollect","key":"OnCollect","value":{"rev":"16-6dbe3afd04f123dda87bb1e21cdfd776"}}, -{"id":"PJsonCouch","key":"PJsonCouch","value":{"rev":"3-be9588f49d85094c36288eb63f8236b3"}}, -{"id":"PMInject","key":"PMInject","value":{"rev":"5-da518047d8273dbf3b3c05ea25e77836"}}, -{"id":"PanPG","key":"PanPG","value":{"rev":"13-beb54225a6b1be4c157434c28adca016"}}, -{"id":"PerfDriver","key":"PerfDriver","value":{"rev":"2-b448fb2f407f341b8df7032f29e4920f"}}, -{"id":"PostgresClient","key":"PostgresClient","value":{"rev":"8-2baec6847f8ad7dcf24b7d61a4034163"}}, -{"id":"QuickWeb","key":"QuickWeb","value":{"rev":"13-d388df9c484021ecd75bc9650d659a67"}}, -{"id":"R.js","key":"R.js","value":{"rev":"3-3f154b95ec6fc744f95a29750f16667e"}}, -{"id":"R2","key":"R2","value":{"rev":"11-f5ccff6f108f6b928caafb62b80d1056"}}, -{"id":"Reston","key":"Reston","value":{"rev":"5-9d234010f32f593edafc04620f3cf2bd"}}, -{"id":"Sardines","key":"Sardines","value":{"rev":"5-d7d3d2269420e21c2c62b86ff5a0021e"}}, -{"id":"SessionWebSocket","key":"SessionWebSocket","value":{"rev":"8-d9fc9beaf90057aefeb701addd7fc845"}}, -{"id":"Sheet","key":"Sheet","value":{"rev":"8-c827c713564e4ae5a17988ffea520d0d"}}, -{"id":"Spec_My_Node","key":"Spec_My_Node","value":{"rev":"8-fa58408e9d9736d9c6fa8daf5d632106"}}, -{"id":"Spot","key":"Spot","value":{"rev":"3-6b6c2131451fed28fb57c924c4fa44cc"}}, -{"id":"Sslac","key":"Sslac","value":{"rev":"3-70a2215cc7505729254aa6fa1d9a25d9"}}, -{"id":"StaticServer","key":"StaticServer","value":{"rev":"3-6f5433177ef4d76a52f01c093117a532"}}, -{"id":"StringScanner","key":"StringScanner","value":{"rev":"3-e85d0646c25ec477c1c45538712d3a38"}}, -{"id":"Structr","key":"Structr","value":{"rev":"3-449720001801cff5831c2cc0e0f1fcf8"}}, -{"id":"Templ8","key":"Templ8","value":{"rev":"11-4e6edb250bc250df20b2d557ca7f6589"}}, -{"id":"Template","key":"Template","value":{"rev":"6-1f055c73524d2b7e82eb6c225bd4b8e0"}}, -{"id":"Thimble","key":"Thimble","value":{"rev":"3-8499b261206f2f2e9acf92d8a4e54afb"}}, -{"id":"Toji","key":"Toji","value":{"rev":"96-511e171ad9f32a9264c2cdf01accacfb"}}, -{"id":"TwigJS","key":"TwigJS","value":{"rev":"3-1aaefc6d6895d7d4824174d410a747b9"}}, -{"id":"UkGeoTool","key":"UkGeoTool","value":{"rev":"5-e84291128e12f66cebb972a60c1d710f"}}, -{"id":"Vector","key":"Vector","value":{"rev":"3-bf5dc97abe7cf1057260b70638175a96"}}, -{"id":"_design/app","key":"_design/app","value":{"rev":"421-b1661d854599a58d0904d68aa44d8b63"}}, -{"id":"_design/ui","key":"_design/ui","value":{"rev":"78-db00aeb91a59a326e38e2bef7f1126cf"}}, -{"id":"aaronblohowiak-plugify-js","key":"aaronblohowiak-plugify-js","value":{"rev":"3-0272c269eacd0c86bfc1711566922577"}}, -{"id":"aaronblohowiak-uglify-js","key":"aaronblohowiak-uglify-js","value":{"rev":"3-77844a6def6ec428d75caa0846c95502"}}, -{"id":"aasm-js","key":"aasm-js","value":{"rev":"3-01a48108d55909575440d9e0ef114f37"}}, -{"id":"abbrev","key":"abbrev","value":{"rev":"16-e17a2b6c7360955b950edf2cb2ef1602"}}, -{"id":"abhispeak","key":"abhispeak","value":{"rev":"5-9889431f68ec10212db3be91796608e2"}}, -{"id":"ace","key":"ace","value":{"rev":"3-e8d267de6c17ebaa82c2869aff983c74"}}, -{"id":"acl","key":"acl","value":{"rev":"13-87c131a1801dc50840a177be73ce1c37"}}, -{"id":"active-client","key":"active-client","value":{"rev":"5-0ca16ae2e48a3ba9de2f6830a8c2d3a0"}}, -{"id":"activenode-monitor","key":"activenode-monitor","value":{"rev":"9-2634fa446379c39475d0ce4183fb92f2"}}, -{"id":"activeobject","key":"activeobject","value":{"rev":"43-6d73e28412612aaee37771e3ab292c3d"}}, -{"id":"actor","key":"actor","value":{"rev":"3-f6b84acd7d2e689b860e3142a18cd460"}}, -{"id":"actors","key":"actors","value":{"rev":"3-6df913bbe5b99968a2e71ae4ef07b2d2"}}, -{"id":"addTimeout","key":"addTimeout","value":{"rev":"15-e5170f0597fe8cf5ed0b54b7e6f2cde1"}}, -{"id":"addressable","key":"addressable","value":{"rev":"27-0c74fde458d92e4b93a29317da15bb3c"}}, -{"id":"aejs","key":"aejs","value":{"rev":"7-4928e2ce6151067cd6c585c0ba3e0bc3"}}, -{"id":"aenoa-supervisor","key":"aenoa-supervisor","value":{"rev":"7-6d399675981e76cfdfb9144bc2f7fb6d"}}, -{"id":"after","key":"after","value":{"rev":"9-baee7683ff54182cf7544cc05b0a4ad7"}}, -{"id":"ahr","key":"ahr","value":{"rev":"27-4ed272c516f3f2f9310e4f0ef28254e9"}}, -{"id":"ahr.browser","key":"ahr.browser","value":{"rev":"3-f7226aab4a1a3ab5f77379f92aae87f9"}}, -{"id":"ahr.browser.jsonp","key":"ahr.browser.jsonp","value":{"rev":"3-abed17143cf5e3c451c3d7da457e6f5b"}}, -{"id":"ahr.browser.request","key":"ahr.browser.request","value":{"rev":"7-fafd7b079d0415f388b64a20509a270b"}}, -{"id":"ahr.node","key":"ahr.node","value":{"rev":"17-f487a4a9896bd3876a11f9dfa1c639a7"}}, -{"id":"ahr.options","key":"ahr.options","value":{"rev":"13-904a4cea763a4455f7b2ae0abba18b8d"}}, -{"id":"ahr.utils","key":"ahr.utils","value":{"rev":"3-5f7b4104ea280d1fd36370c8f3356ead"}}, -{"id":"ahr2","key":"ahr2","value":{"rev":"87-ddf57f3ee158dcd23b2df330e2883a1d"}}, -{"id":"ain","key":"ain","value":{"rev":"7-d840736668fb36e9be3c26a68c5cd411"}}, -{"id":"ain-tcp","key":"ain-tcp","value":{"rev":"11-d18a1780bced8981d1d9dbd262ac4045"}}, -{"id":"ain2","key":"ain2","value":{"rev":"5-0b67879174f5f0a06448c7c737d98b5e"}}, -{"id":"airbrake","key":"airbrake","value":{"rev":"33-4bb9f822162e0c930c31b7f961938dc9"}}, -{"id":"ajaxrunner","key":"ajaxrunner","value":{"rev":"2-17e6a5de4f0339f4e6ce0b7681d0ba0c"}}, -{"id":"ajs","key":"ajs","value":{"rev":"13-063a29dec829fdaf4ca63d622137d1c6"}}, -{"id":"ajs-xgettext","key":"ajs-xgettext","value":{"rev":"3-cd4bbcc1c9d87fa7119d3bbbca99b793"}}, -{"id":"akismet","key":"akismet","value":{"rev":"13-a144e15dd6c2b13177572e80a526edd1"}}, -{"id":"alfred","key":"alfred","value":{"rev":"45-9a69041b18d2587c016b1b1deccdb2ce"}}, -{"id":"alfred-bcrypt","key":"alfred-bcrypt","value":{"rev":"11-7ed10ef318e5515d1ef7c040818ddb22"}}, -{"id":"algorithm","key":"algorithm","value":{"rev":"3-9ec0b38298cc15b0f295152de8763358"}}, -{"id":"algorithm-js","key":"algorithm-js","value":{"rev":"9-dd7496b7ec2e3b23cc7bb182ae3aac6d"}}, -{"id":"alists","key":"alists","value":{"rev":"5-22cc13c86d84081a826ac79a0ae5cda3"}}, -{"id":"altshift","key":"altshift","value":{"rev":"53-1c51d8657f271f390503a6fe988d09db"}}, -{"id":"amazon-ses","key":"amazon-ses","value":{"rev":"5-c175d60de2232a5664666a80832269e5"}}, -{"id":"ambrosia","key":"ambrosia","value":{"rev":"3-8c648ec7393cf842838c20e2c5d9bce4"}}, -{"id":"amd","key":"amd","value":{"rev":"3-d78c4df97a577af598a7def2a38379fa"}}, -{"id":"amionline","key":"amionline","value":{"rev":"3-a62887a632523700402b0f4ebb896812"}}, -{"id":"amo-version-reduce","key":"amo-version-reduce","value":{"rev":"3-05f6956269e5e921ca3486d3d6ea74b0"}}, -{"id":"amqp","key":"amqp","value":{"rev":"17-ee62d2b8248f8eb13f3369422d66df26"}}, -{"id":"amqpsnoop","key":"amqpsnoop","value":{"rev":"3-36a1c45647bcfb2f56cf68dbc24b0426"}}, -{"id":"ams","key":"ams","value":{"rev":"40-1c0cc53ad942d2fd23c89618263befc8"}}, -{"id":"amulet","key":"amulet","value":{"rev":"7-d1ed71811e45652799982e4f2e9ffb36"}}, -{"id":"anachronism","key":"anachronism","value":{"rev":"11-468bdb40f9a5aa146bae3c1c6253d0e1"}}, -{"id":"analytics","key":"analytics","value":{"rev":"3-a143ccdd863b5f7dbee4d2f7732390b3"}}, -{"id":"ann","key":"ann","value":{"rev":"9-41f00594d6216c439f05f7116a697cac"}}, -{"id":"ansi-color","key":"ansi-color","value":{"rev":"6-d6f02b32525c1909d5134afa20f470de"}}, -{"id":"ansi-font","key":"ansi-font","value":{"rev":"3-b039661ad9b6aa7baf34741b449c4420"}}, -{"id":"ant","key":"ant","value":{"rev":"3-35a64e0b7f6eb63a90c32971694b0d93"}}, -{"id":"anvil.js","key":"anvil.js","value":{"rev":"19-290c82075f0a9ad764cdf6dc5c558e0f"}}, -{"id":"aop","key":"aop","value":{"rev":"7-5963506c9e7912aa56fda065c56fd472"}}, -{"id":"ap","key":"ap","value":{"rev":"3-f525b5b490a1ada4452f46307bf92d08"}}, -{"id":"apac","key":"apac","value":{"rev":"12-945d0313a84797b4c3df19da4bec14d4"}}, -{"id":"aparser","key":"aparser","value":{"rev":"5-cb35cfc9184ace6642413dad97e49dca"}}, -{"id":"api-easy","key":"api-easy","value":{"rev":"15-2ab5eefef1377ff217cb020e80343d65"}}, -{"id":"api.js","key":"api.js","value":{"rev":"5-a14b8112fbda17022c80356a010de59a"}}, -{"id":"api_request","key":"api_request","value":{"rev":"3-8531e71f5cf2f3f811684269132d72d4"}}, -{"id":"apimaker","key":"apimaker","value":{"rev":"3-bdbd4a2ebf5b67276d89ea73eaa20025"}}, -{"id":"apn","key":"apn","value":{"rev":"30-0513d27341f587b39db54300c380921f"}}, -{"id":"app","key":"app","value":{"rev":"3-d349ddb47167f60c03d259649569e002"}}, -{"id":"app.js","key":"app.js","value":{"rev":"3-bff3646634daccfd964b4bbe510acb25"}}, -{"id":"append","key":"append","value":{"rev":"7-53e2f4ab2a69dc0c5e92f10a154998b6"}}, -{"id":"applescript","key":"applescript","value":{"rev":"10-ef5ab30ccd660dc71fb89e173f30994a"}}, -{"id":"appzone","key":"appzone","value":{"rev":"21-fb27e24d460677fe9c7eda0d9fb1fead"}}, -{"id":"apricot","key":"apricot","value":{"rev":"14-b55361574a0715f78afc76ddf6125845"}}, -{"id":"arcane","key":"arcane","value":{"rev":"3-f846c96e890ed6150d4271c93cc05a24"}}, -{"id":"archetype","key":"archetype","value":{"rev":"3-441336def3b7aade89c8c1c19a84f56d"}}, -{"id":"ardrone","key":"ardrone","value":{"rev":"8-540e95b796da734366a89bb06dc430c5"}}, -{"id":"ardrone-web","key":"ardrone-web","value":{"rev":"3-8a53cc85a95be20cd44921347e82bbe4"}}, -{"id":"arduino","key":"arduino","value":{"rev":"3-22f6359c47412d086d50dc7f1a994139"}}, -{"id":"argon","key":"argon","value":{"rev":"3-ba12426ce67fac01273310cb3909b855"}}, -{"id":"argparse","key":"argparse","value":{"rev":"8-5e841e38cca6cfc3fe1d1f507a7f47ee"}}, -{"id":"argparser","key":"argparser","value":{"rev":"19-b8793bfc005dd84e1213ee53ae56206d"}}, -{"id":"argsparser","key":"argsparser","value":{"rev":"26-d31eca2f41546172763af629fc50631f"}}, -{"id":"argtype","key":"argtype","value":{"rev":"10-96a7d23e571d56cf598472115bcac571"}}, -{"id":"arguments","key":"arguments","value":{"rev":"7-767de2797f41702690bef5928ec7c6e9"}}, -{"id":"armory","key":"armory","value":{"rev":"41-ea0f7bd0868c11fc9986fa708e11e071"}}, -{"id":"armrest","key":"armrest","value":{"rev":"3-bbe40b6320b6328211be33425bed20c8"}}, -{"id":"arnold","key":"arnold","value":{"rev":"3-4896fc8d02b8623f47a024f0dbfa44bf"}}, -{"id":"arouter","key":"arouter","value":{"rev":"7-55cab1f7128df54f27be94039a8d8dc5"}}, -{"id":"array-promise","key":"array-promise","value":{"rev":"3-e2184561ee65de64c2dfeb57955c758f"}}, -{"id":"arrayemitter","key":"arrayemitter","value":{"rev":"3-d64c917ac1095bfcbf173dac88d3d148"}}, -{"id":"asEvented","key":"asEvented","value":{"rev":"3-2ad3693b49d4d9dc9a11c669033a356e"}}, -{"id":"asciimo","key":"asciimo","value":{"rev":"12-50130f5ac2ef4d95df190be2c8ede893"}}, -{"id":"asereje","key":"asereje","value":{"rev":"15-84853499f89a87109ddf47ba692323ba"}}, -{"id":"ash","key":"ash","value":{"rev":"6-3697a3aee708bece8a08c7e0d1010476"}}, -{"id":"ask","key":"ask","value":{"rev":"3-321bbc3837d749b5d97bff251693a825"}}, -{"id":"asn1","key":"asn1","value":{"rev":"13-e681a814a4a1439a22b19e141b45006f"}}, -{"id":"aspsms","key":"aspsms","value":{"rev":"9-7b82d722bdac29a4da8c88b642ad64f2"}}, -{"id":"assert","key":"assert","value":{"rev":"3-85480762f5cb0be2cb85f80918257189"}}, -{"id":"assertions","key":"assertions","value":{"rev":"9-d797d4c09aa994556c7d5fdb4e86fe1b"}}, -{"id":"assertn","key":"assertn","value":{"rev":"6-080a4fb5d2700a6850d56b58c6f6ee9e"}}, -{"id":"assertvanish","key":"assertvanish","value":{"rev":"13-3b0b555ff77c1bfc2fe2642d50879648"}}, -{"id":"asset","key":"asset","value":{"rev":"33-cb70b68e0e05e9c9a18b3d89f1bb43fc"}}, -{"id":"assetgraph","key":"assetgraph","value":{"rev":"82-7853d644e64741b46fdd29a997ec4852"}}, -{"id":"assetgraph-builder","key":"assetgraph-builder","value":{"rev":"61-1ed98d95f3589050037851edde760a01"}}, -{"id":"assetgraph-sprite","key":"assetgraph-sprite","value":{"rev":"15-351b5fd9e50a3dda8580d014383423e0"}}, -{"id":"assets-expander","key":"assets-expander","value":{"rev":"11-f9e1197b773d0031dd015f1d871b87c6"}}, -{"id":"assets-packager","key":"assets-packager","value":{"rev":"13-51f7d2d57ed35be6aff2cc2aa2fa74db"}}, -{"id":"assoc","key":"assoc","value":{"rev":"9-07098388f501da16bf6afe6c9babefd5"}}, -{"id":"ast-inlining","key":"ast-inlining","value":{"rev":"5-02e7e2c3a06ed81ddc61980f778ac413"}}, -{"id":"ast-transformer","key":"ast-transformer","value":{"rev":"5-b4020bb763b8839afa8d3ac0d54a6f26"}}, -{"id":"astar","key":"astar","value":{"rev":"3-3df8c56c64c3863ef0650c0c74e2801b"}}, -{"id":"aster","key":"aster","value":{"rev":"7-b187c1270d3924f5ee04044e579d2df9"}}, -{"id":"asterisk-manager","key":"asterisk-manager","value":{"rev":"3-7fbf4294dafee04cc17cca4692c09c33"}}, -{"id":"astrolin","key":"astrolin","value":{"rev":"3-30ac515a2388e7dc22b25c15346f6d7e"}}, -{"id":"asyn","key":"asyn","value":{"rev":"3-51996b0197c21e85858559045c1481b7"}}, -{"id":"async","key":"async","value":{"rev":"26-73aea795f46345a7e65d89ec75dff2f1"}}, -{"id":"async-array","key":"async-array","value":{"rev":"17-3ef5faff03333aa5b2a733ef36118066"}}, -{"id":"async-chain","key":"async-chain","value":{"rev":"9-10ec3e50b01567390d55973494e36d43"}}, -{"id":"async-ejs","key":"async-ejs","value":{"rev":"19-6f0e6e0eeb3cdb4c816ea427d8288d7d"}}, -{"id":"async-fs","key":"async-fs","value":{"rev":"3-b96906283d345604f784dfcdbeb21a63"}}, -{"id":"async-it","key":"async-it","value":{"rev":"7-6aed4439df25989cfa040fa4b5dd4ff2"}}, -{"id":"async-json","key":"async-json","value":{"rev":"5-589d5b6665d00c5bffb99bb142cac5d0"}}, -{"id":"async-memoizer","key":"async-memoizer","value":{"rev":"9-01d56f4dff95e61a39dab5ebee49d5dc"}}, -{"id":"async-object","key":"async-object","value":{"rev":"21-1bf28b0f8a7d875b54126437f3539f9b"}}, -{"id":"asyncEJS","key":"asyncEJS","value":{"rev":"3-28b1c94255381f23a4d4f52366255937"}}, -{"id":"async_testing","key":"async_testing","value":{"rev":"14-0275d8b608d8644dfe8d68a81fa07e98"}}, -{"id":"asyncevents","key":"asyncevents","value":{"rev":"3-de104847994365dcab5042db2b46fb84"}}, -{"id":"asyncify","key":"asyncify","value":{"rev":"3-3f6deb82ee1c6cb25e83a48fe6379b75"}}, -{"id":"asyncjs","key":"asyncjs","value":{"rev":"27-15903d7351f80ed37cb069aedbfc26cc"}}, -{"id":"asynct","key":"asynct","value":{"rev":"5-6be002b3e005d2d53b80fff32ccbd2ac"}}, -{"id":"at_scheduler","key":"at_scheduler","value":{"rev":"3-5587061c90218d2e99b6e22d5b488b0b"}}, -{"id":"atbar","key":"atbar","value":{"rev":"19-e9e906d4874afd4d8bf2d8349ed46dff"}}, -{"id":"atob","key":"atob","value":{"rev":"3-bc907d10dd2cfc940de586dc090451da"}}, -{"id":"audiolib","key":"audiolib","value":{"rev":"17-cb2f55ff50061081b440f0605cf0450c"}}, -{"id":"audit_couchdb","key":"audit_couchdb","value":{"rev":"24-6e620895b454b345b2aed13db847c237"}}, -{"id":"auditor","key":"auditor","value":{"rev":"11-c4df509d40650c015943dd90315a12c0"}}, -{"id":"authnet_cim","key":"authnet_cim","value":{"rev":"7-f02bbd206ac2b8c05255bcd8171ac1eb"}}, -{"id":"autocomplete","key":"autocomplete","value":{"rev":"3-f2773bca040d5abcd0536dbebe5847bf"}}, -{"id":"autodafe","key":"autodafe","value":{"rev":"7-a75262b53a9dd1a25693adecde7206d7"}}, -{"id":"autolint","key":"autolint","value":{"rev":"7-07f885902d72b52678fcc57aa4b9c592"}}, -{"id":"autoload","key":"autoload","value":{"rev":"5-9247704d9a992a175e3ae49f4af757d0"}}, -{"id":"autoloader","key":"autoloader","value":{"rev":"11-293c20c34d0c81fac5c06b699576b1fe"}}, -{"id":"auton","key":"auton","value":{"rev":"25-4fcb7a62b607b7929b62a9b792afef55"}}, -{"id":"autoreleasepool","key":"autoreleasepool","value":{"rev":"5-5d2798bf74bbec583cc6f19127e3c89e"}}, -{"id":"autorequire","key":"autorequire","value":{"rev":"9-564a46b355532fcec24db0afc99daed5"}}, -{"id":"autotest","key":"autotest","value":{"rev":"7-e319995dd0e1fbd935c14c46b1234f77"}}, -{"id":"awesome","key":"awesome","value":{"rev":"15-4458b746e4722214bd26ea15e453288e"}}, -{"id":"aws","key":"aws","value":{"rev":"14-9a8f0989be29034d3fa5c66c594b649b"}}, -{"id":"aws-js","key":"aws-js","value":{"rev":"6-c61d87b8ad948cd065d2ca222808c209"}}, -{"id":"aws-lib","key":"aws-lib","value":{"rev":"36-9733e215c03d185a860574600a8feb14"}}, -{"id":"aws2js","key":"aws2js","value":{"rev":"35-42498f44a5ae7d4f3c84096b435d0e0b"}}, -{"id":"azure","key":"azure","value":{"rev":"5-2c4e05bd842d3dcfa419f4d2b67121e2"}}, -{"id":"b64","key":"b64","value":{"rev":"3-e5e727a46df4c8aad38acd117d717140"}}, -{"id":"b64url","key":"b64url","value":{"rev":"9-ab3b017f00a53b0078261254704c30ba"}}, -{"id":"ba","key":"ba","value":{"rev":"11-3cec7ec9a566fe95fbeb34271538d60a"}}, -{"id":"babelweb","key":"babelweb","value":{"rev":"11-8e6a2fe00822cec15573cdda48b6d0a0"}}, -{"id":"backbone","key":"backbone","value":{"rev":"37-79b95355f8af59bf9131e14d52b68edc"}}, -{"id":"backbone-browserify","key":"backbone-browserify","value":{"rev":"3-f25dac0b05a7f7aa5dbc0f4a1ad97969"}}, -{"id":"backbone-celtra","key":"backbone-celtra","value":{"rev":"3-775a5ebb25c1cd84723add52774ece84"}}, -{"id":"backbone-couch","key":"backbone-couch","value":{"rev":"8-548327b3cd7ee7a4144c9070377be5f6"}}, -{"id":"backbone-cradle","key":"backbone-cradle","value":{"rev":"3-b9bc220ec48b05eed1d4d77a746b10db"}}, -{"id":"backbone-dirty","key":"backbone-dirty","value":{"rev":"21-fa0f688cc95a85c0fc440733f09243b5"}}, -{"id":"backbone-dnode","key":"backbone-dnode","value":{"rev":"65-3212d3aa3284efb3bc0732bac71b5a2e"}}, -{"id":"backbone-proxy","key":"backbone-proxy","value":{"rev":"3-3602cb984bdd266516a3145663f9a5c6"}}, -{"id":"backbone-redis","key":"backbone-redis","value":{"rev":"9-2e3f6a9e095b00ccec9aa19b3fbc65eb"}}, -{"id":"backbone-rel","key":"backbone-rel","value":{"rev":"5-f9773dc85f1c502e61c163a22d2f74aa"}}, -{"id":"backbone-simpledb","key":"backbone-simpledb","value":{"rev":"5-a815128e1e3593696f666f8b3da36d78"}}, -{"id":"backbone-stash","key":"backbone-stash","value":{"rev":"19-8d3cc5f9ed28f9a56856154e2b4e7f78"}}, -{"id":"backplane","key":"backplane","value":{"rev":"7-f69188dac21e007b09efe1b5b3575087"}}, -{"id":"backport-0.4","key":"backport-0.4","value":{"rev":"11-25e15f01f1ef9e626433a82284bc00d6"}}, -{"id":"backuptweets","key":"backuptweets","value":{"rev":"3-68712682aada41082d3ae36c03c8f899"}}, -{"id":"bake","key":"bake","value":{"rev":"113-ce13508ba2b4f15aa4df06d796aa4573"}}, -{"id":"bal-util","key":"bal-util","value":{"rev":"31-b818725a5af131c89ec66b9fdebf2122"}}, -{"id":"balancer","key":"balancer","value":{"rev":"7-63dcb4327081a8ec4d6c51a21253cb4b"}}, -{"id":"bancroft","key":"bancroft","value":{"rev":"11-8fa3370a4615a0ed4ba411b05c0285f4"}}, -{"id":"bandcamp","key":"bandcamp","value":{"rev":"41-f2fee472d63257fdba9e5fa8ad570ee8"}}, -{"id":"banner","key":"banner","value":{"rev":"19-89a447e2136b2fabddbad84abcd63a27"}}, -{"id":"banzai-docstore-couchdb","key":"banzai-docstore-couchdb","value":{"rev":"5-950c115737d634e2f48ee1c772788321"}}, -{"id":"banzai-redis","key":"banzai-redis","value":{"rev":"3-446f29e0819fd79c810fdfa8ce05bdcf"}}, -{"id":"banzai-statestore-couchdb","key":"banzai-statestore-couchdb","value":{"rev":"5-c965442821741ce6f20e266fe43aea4a"}}, -{"id":"banzai-statestore-mem","key":"banzai-statestore-mem","value":{"rev":"3-a0891a1a2344922d91781c332ed26528"}}, -{"id":"bar","key":"bar","value":{"rev":"7-fbb44a76cb023e6a8941f15576cf190b"}}, -{"id":"barc","key":"barc","value":{"rev":"7-dfe352b410782543d6b1aea292f123eb"}}, -{"id":"barista","key":"barista","value":{"rev":"9-d3f3c776453ba69a81947f34d7cc3cbf"}}, -{"id":"bark","key":"bark","value":{"rev":"20-fc1a94f80cfa199c16aa075e940e06dc"}}, -{"id":"barricane-db","key":"barricane-db","value":{"rev":"3-450947b9a05047fe195f76a69a3144e8"}}, -{"id":"base-converter","key":"base-converter","value":{"rev":"7-1b49b01df111176b89343ad56ac68d5c"}}, -{"id":"base32","key":"base32","value":{"rev":"11-d686c54c9de557681356e74b83d916e8"}}, -{"id":"base64","key":"base64","value":{"rev":"24-bd713c3d7e96fad180263ed7563c595e"}}, -{"id":"bash","key":"bash","value":{"rev":"3-86a1c61babfa47da0ebc14c2f4e59a6a"}}, -{"id":"basic-auth","key":"basic-auth","value":{"rev":"3-472a87af27264ae81bd4394d70792e55"}}, -{"id":"basicFFmpeg","key":"basicFFmpeg","value":{"rev":"15-3e87a41c543bde1e6f7c49d021fda62f"}}, -{"id":"basicauth","key":"basicauth","value":{"rev":"3-15d95a05b6f5e7b6d7261f87c4eb73de"}}, -{"id":"basil-cookie","key":"basil-cookie","value":{"rev":"11-fff96b263f31b9d017e3cf59bf6fb23f"}}, -{"id":"batik","key":"batik","value":{"rev":"7-a19ce28cbbf54649fa225ed5474eff02"}}, -{"id":"batman","key":"batman","value":{"rev":"15-6af5469bf143790cbb4af196824c9e95"}}, -{"id":"batteries","key":"batteries","value":{"rev":"13-656c68fe887f4af3ef1e720e64275f4e"}}, -{"id":"bbcode","key":"bbcode","value":{"rev":"5-e79a8b62125f8a3a1751bf7bd8875f33"}}, -{"id":"bcrypt","key":"bcrypt","value":{"rev":"31-db8496d1239362a97a26f1e5eeb8a733"}}, -{"id":"beaconpush","key":"beaconpush","value":{"rev":"3-956fcd87a6d3f9d5b9775d47e36aa3e5"}}, -{"id":"bean","key":"bean","value":{"rev":"56-151c1558e15016205e65bd515eab9ee0"}}, -{"id":"bean.database.mongo","key":"bean.database.mongo","value":{"rev":"3-ede73166710137cbf570385b7e8f17fe"}}, -{"id":"beandocs","key":"beandocs","value":{"rev":"3-9f7492984c95b69ca1ad30d40223f117"}}, -{"id":"beanpole","key":"beanpole","value":{"rev":"53-565a78a2304405cdc9f4a6b6101160fa"}}, -{"id":"beanprep","key":"beanprep","value":{"rev":"3-bd387f0072514b8e44131671f9aad1b0"}}, -{"id":"beans","key":"beans","value":{"rev":"54-7f6d40a2a5bf228fe3547cce43edaa63"}}, -{"id":"beanstalk_client","key":"beanstalk_client","value":{"rev":"6-13c8c80aa6469b5dcf20d65909289383"}}, -{"id":"beanstalk_worker","key":"beanstalk_worker","value":{"rev":"6-45500991db97ed5a18ea96f3621bf99f"}}, -{"id":"beantest","key":"beantest","value":{"rev":"7-52d8160a0c0420c7d659b2ee10f26644"}}, -{"id":"beatit","key":"beatit","value":{"rev":"7-c0ba5f95b0601dcb628e4820555cc252"}}, -{"id":"beatport","key":"beatport","value":{"rev":"5-3b186b633ceea7f047e1df91e7b683a5"}}, -{"id":"beautifyjs","key":"beautifyjs","value":{"rev":"3-89ce050152aca0727c099060229ddc73"}}, -{"id":"beaver","key":"beaver","value":{"rev":"17-3b56116e8e40205e8efcedefee0319e3"}}, -{"id":"beeline","key":"beeline","value":{"rev":"11-92a4bd9524cc7aec3106efcacff6faed"}}, -{"id":"beet","key":"beet","value":{"rev":"95-3c9d9de63c363319b2201ac83bc0ee7d"}}, -{"id":"begin","key":"begin","value":{"rev":"3-b32a5eb1b9475353b37f90813ed89dce"}}, -{"id":"begin.js","key":"begin.js","value":{"rev":"7-9156869392a448595bf3e5723fcb7b57"}}, -{"id":"bejesus-api","key":"bejesus-api","value":{"rev":"11-6b42f8ffc370c494d01481b64536e91e"}}, -{"id":"bejesus-cli","key":"bejesus-cli","value":{"rev":"31-5fbbfe5ec1f6a0a7a3fafdf69230434a"}}, -{"id":"bem","key":"bem","value":{"rev":"22-c0e0f8d9e92b355246fd15058199b73c"}}, -{"id":"ben","key":"ben","value":{"rev":"3-debe52552a86f1e71895dd5d32add585"}}, -{"id":"bench","key":"bench","value":{"rev":"14-20987e1becf3acd1bd1833b04712c87c"}}, -{"id":"bencher","key":"bencher","value":{"rev":"3-08866a8fdcf180582b43690bbbf21087"}}, -{"id":"benchmark","key":"benchmark","value":{"rev":"219-0669bc24f3f2918d93369bb0d801abf3"}}, -{"id":"bencode","key":"bencode","value":{"rev":"8-7b9eff4c1658fb3a054ebc6f50e6edcd"}}, -{"id":"beseda","key":"beseda","value":{"rev":"49-5cc8c4e9bb3e836de7db58c3adf9a5bb"}}, -{"id":"bf","key":"bf","value":{"rev":"14-d81312e1bf4f7202b801b4343199aa55"}}, -{"id":"biggie-router","key":"biggie-router","value":{"rev":"42-56a546a78d5abd4402183b3d300d563e"}}, -{"id":"bigint","key":"bigint","value":{"rev":"58-02f368567849596219d6a0e87d9bc6b9"}}, -{"id":"bignumber","key":"bignumber","value":{"rev":"3-6e372428992a767e0a991ec3f39b8343"}}, -{"id":"binary","key":"binary","value":{"rev":"47-947aa2f5238a68e34b164ef7e50ece28"}}, -{"id":"binarySearch","key":"binarySearch","value":{"rev":"15-93a3d2f9c2690457023b5ae5f3d00446"}}, -{"id":"bind","key":"bind","value":{"rev":"9-b74d0af83e90a2655e564ab64bf1d27d"}}, -{"id":"binpack","key":"binpack","value":{"rev":"7-3dc67a64e0ef01f3aa59441c5150e04f"}}, -{"id":"bintrees","key":"bintrees","value":{"rev":"12-507fcd92f447f81842cba08cacb425cf"}}, -{"id":"bisection","key":"bisection","value":{"rev":"5-f785ea3bbd8fcc7cd9381d20417b87bb"}}, -{"id":"bison","key":"bison","value":{"rev":"12-e663b2ef96650b3b5a0cc36524e1b94a"}}, -{"id":"bitcoder","key":"bitcoder","value":{"rev":"8-19c957d6b845f4d7ad531951c971e03d"}}, -{"id":"bitcoin","key":"bitcoin","value":{"rev":"13-af88a28c02ab146622743c4c1c32e87b"}}, -{"id":"bitcoin-impl","key":"bitcoin-impl","value":{"rev":"8-99068f1d259e3c75209a6bd08e3e06a2"}}, -{"id":"bitcoin-p2p","key":"bitcoin-p2p","value":{"rev":"25-6df0283eb6e419bc3a1571f17721b100"}}, -{"id":"bitcoinjs-mongoose","key":"bitcoinjs-mongoose","value":{"rev":"3-57e239b31e218693f8cf3cf1cf098437"}}, -{"id":"bitly","key":"bitly","value":{"rev":"8-d6bfac8338e223fe62538954d2e9246a"}}, -{"id":"bitly.node","key":"bitly.node","value":{"rev":"3-15329b7a77633e0dae2c720e592420fb"}}, -{"id":"biwascheme","key":"biwascheme","value":{"rev":"3-37a85eed1bd2d4ee85ef1e100e7ebe8f"}}, -{"id":"black","key":"black","value":{"rev":"3-e07ae2273357da5894f4b7cdf1b20560"}}, -{"id":"black_coffee","key":"black_coffee","value":{"rev":"3-c5c764cf550ad3c831a085509f64cdfb"}}, -{"id":"bleach","key":"bleach","value":{"rev":"5-ef3ab7e761a6903eb70da1550a07e53d"}}, -{"id":"blend","key":"blend","value":{"rev":"16-c5dd075b3ede45f91056b4b768b2bfe8"}}, -{"id":"bless","key":"bless","value":{"rev":"29-1b9bc6f17acd144f51a297e4bdccfe0e"}}, -{"id":"blitz","key":"blitz","value":{"rev":"5-8bf6786f6fd7dbc0570ba21f803f35e6"}}, -{"id":"blo","key":"blo","value":{"rev":"5-9e752ea37438ea026e88a7aa7e7a91ba"}}, -{"id":"blog","key":"blog","value":{"rev":"13-80fc7b11d73e23ca7e518d271d1836ee"}}, -{"id":"blogmate","key":"blogmate","value":{"rev":"11-e503081be9290647c841aa8c04eb6e70"}}, -{"id":"bloodmoney","key":"bloodmoney","value":{"rev":"3-859b0235de3a29bf241323a31f9aa730"}}, -{"id":"bloom","key":"bloom","value":{"rev":"15-c609882b29d61a771d7dbf17f43016ad"}}, -{"id":"blue","key":"blue","value":{"rev":"6-e84221f7286dffbfda6f8abc6306064c"}}, -{"id":"bluemold","key":"bluemold","value":{"rev":"11-f48528b642b5d38d7c02b03622117fa7"}}, -{"id":"bn-lang","key":"bn-lang","value":{"rev":"3-266f186334f69448a940081589e82b04"}}, -{"id":"bn-lang-util","key":"bn-lang-util","value":{"rev":"3-0bc44f1d7d3746120dd835bfb685e229"}}, -{"id":"bn-log","key":"bn-log","value":{"rev":"5-db81a8a978071efd24b45e350e8b8954"}}, -{"id":"bn-template","key":"bn-template","value":{"rev":"3-604e77465ab1dc7e17f3b325089651ec"}}, -{"id":"bn-time","key":"bn-time","value":{"rev":"3-9c33587e783a98e1ccea409cacd5bbfb"}}, -{"id":"bn-unit","key":"bn-unit","value":{"rev":"3-5f35e3fd446241f682231bedcf846c0a"}}, -{"id":"bncode","key":"bncode","value":{"rev":"7-915a1759135a9837954c0ead58bf8e5a"}}, -{"id":"bnf","key":"bnf","value":{"rev":"5-4fe80fcafcc7a263f28b8dc62093bd8d"}}, -{"id":"bob","key":"bob","value":{"rev":"9-9ceeb581263c04793a2231b3726ab22b"}}, -{"id":"bogart","key":"bogart","value":{"rev":"30-70aed6f0827d2bd09963afddcad7a34a"}}, -{"id":"boil","key":"boil","value":{"rev":"3-7ab0fc3b831c591fd15711c27a6f5de0"}}, -{"id":"bolt","key":"bolt","value":{"rev":"3-138dfbdea2ab53ca714ca51494d32610"}}, -{"id":"bones","key":"bones","value":{"rev":"70-c74f0845c167cd755250fc7b4b9b40c2"}}, -{"id":"bones-admin","key":"bones-admin","value":{"rev":"11-2cdfe738d66aacff8569712a279c041d"}}, -{"id":"bones-auth","key":"bones-auth","value":{"rev":"35-2224f95bf3521809ce805ff215d2856c"}}, -{"id":"bones-document","key":"bones-document","value":{"rev":"13-95971fed1f47005c282e0fa60498e31c"}}, -{"id":"bonsai","key":"bonsai","value":{"rev":"3-67eb8935492d4ae9182a7ec74c1f36a6"}}, -{"id":"bonzo","key":"bonzo","value":{"rev":"142-7c5680b0f841c2263f06e96eb5237825"}}, -{"id":"bookbu","key":"bookbu","value":{"rev":"3-d9a104bccc67eae8a5dc6f0f4c3ba5fc"}}, -{"id":"bootstrap","key":"bootstrap","value":{"rev":"17-7a62dbe5e3323beb47165f13265f1a96"}}, -{"id":"borschik","key":"borschik","value":{"rev":"7-2570b5d6555a031394a55ff054797cb9"}}, -{"id":"bots","key":"bots","value":{"rev":"9-df43539c13d2996d9e32dff848615e8a"}}, -{"id":"bounce","key":"bounce","value":{"rev":"8-a3e424b2be1379743e9628c726facaa8"}}, -{"id":"bowser","key":"bowser","value":{"rev":"11-23ecc98edf5fde63fda626bb03da597f"}}, -{"id":"box2d","key":"box2d","value":{"rev":"6-5c920e9829764cbf904b9a59474c1672"}}, -{"id":"box2dnode","key":"box2dnode","value":{"rev":"3-12ffe24dcc1478ea0008c60c4ef7118f"}}, -{"id":"boxcar","key":"boxcar","value":{"rev":"5-a9ba953c547585285559d0e05c16e29e"}}, -{"id":"boxer","key":"boxer","value":{"rev":"8-60c49ff8574d5a47616796ad991463ad"}}, -{"id":"bracket-matcher","key":"bracket-matcher","value":{"rev":"27-a01c946c69665629e212a0f702be1b38"}}, -{"id":"brain","key":"brain","value":{"rev":"24-3aba33914e0f823505c69ef01361681b"}}, -{"id":"brainfuck","key":"brainfuck","value":{"rev":"7-adf33477ffe8640c9fdd6a0f8b349953"}}, -{"id":"brains","key":"brains","value":{"rev":"3-d7e7a95ea742f9b42fefb594c67c726a"}}, -{"id":"braintree","key":"braintree","value":{"rev":"14-eabe1c3e4e7cfd1f521f4bfd337611f7"}}, -{"id":"brazilnut","key":"brazilnut","value":{"rev":"3-4163b5a5598a8905c1283db9d260e5cc"}}, -{"id":"brazln","key":"brazln","value":{"rev":"29-15895bb5b193552826c196efe084caf2"}}, -{"id":"bread","key":"bread","value":{"rev":"9-093c9dd71fffb9a5b1c9eb8ac3e2a9b0"}}, -{"id":"breakfast","key":"breakfast","value":{"rev":"3-231e3046ede5e35e272dfab4a379015d"}}, -{"id":"brequire","key":"brequire","value":{"rev":"18-58b386e08541b222238aa12a13119fd9"}}, -{"id":"bricks","key":"bricks","value":{"rev":"15-f72e6c858c5bceb00cc34a16d52a7b59"}}, -{"id":"bricks-analytics","key":"bricks-analytics","value":{"rev":"3-dc2b6d2157c5039a4c36ceda46761b37"}}, -{"id":"bricks-compress","key":"bricks-compress","value":{"rev":"5-580eeecaa30c210502f42c5e184344a3"}}, -{"id":"bricks-rewrite","key":"bricks-rewrite","value":{"rev":"5-7a141aacaa3fd706b97847c6e8f9830a"}}, -{"id":"brokenbin","key":"brokenbin","value":{"rev":"5-bbc7a1c9628ed9f49b6d23e80c242852"}}, -{"id":"broker","key":"broker","value":{"rev":"9-756a097b948756e4bd7609b6f83a0847"}}, -{"id":"browscap","key":"browscap","value":{"rev":"12-c6fed16796d1ad84913f2617c66f0c7b"}}, -{"id":"browser-require","key":"browser-require","value":{"rev":"27-99f61fb3036ebc643282625649cc674f"}}, -{"id":"browserify","key":"browserify","value":{"rev":"163-c307ee153caf2160e5c32abd58898139"}}, -{"id":"browserjet","key":"browserjet","value":{"rev":"3-a386ab8911c410362eb8fceab5a998fe"}}, -{"id":"brt","key":"brt","value":{"rev":"3-b8452659a92039571ff1f877c8f874c7"}}, -{"id":"brunch","key":"brunch","value":{"rev":"113-64ae44857425c5d860d36f38ab3cf797"}}, -{"id":"brushes.js","key":"brushes.js","value":{"rev":"3-e28bd6597b949d84965a788928738f53"}}, -{"id":"bson","key":"bson","value":{"rev":"50-9d9db515dd9d2a4d873d186f324767a5"}}, -{"id":"btc-ex-api","key":"btc-ex-api","value":{"rev":"3-cabbf284cb01af79ee183d8023106762"}}, -{"id":"btoa","key":"btoa","value":{"rev":"3-b4a124b3650a746b8da9c9f93f386bac"}}, -{"id":"btoa-atob","key":"btoa-atob","value":{"rev":"3-baac60a3f04487333cc0364301220a53"}}, -{"id":"bucket","key":"bucket","value":{"rev":"3-5c2da8f67e29de1c29adbf51ad7d7299"}}, -{"id":"buffalo","key":"buffalo","value":{"rev":"9-6c763d939d775a255c65ba8dcf0d5372"}}, -{"id":"bufferjs","key":"bufferjs","value":{"rev":"13-b6e09e35ec822714d3ec485ac2010272"}}, -{"id":"bufferlib","key":"bufferlib","value":{"rev":"16-d48d96815fc7709d6b7d0a8bfc67f053"}}, -{"id":"bufferlist","key":"bufferlist","value":{"rev":"18-6fcedc10ffbca1afdc866e208d2f906a"}}, -{"id":"buffers","key":"buffers","value":{"rev":"11-3a70ec2da112befdc65b8c02772b8c44"}}, -{"id":"bufferstream","key":"bufferstream","value":{"rev":"82-6f82c5affb3906ebbaa0b116baf73c54"}}, -{"id":"buffertools","key":"buffertools","value":{"rev":"20-68f90e224f81fab81295f9079dc3c0fc"}}, -{"id":"buffoon","key":"buffoon","value":{"rev":"9-1cdc1cbced94691e836d4266eed7c143"}}, -{"id":"builder","key":"builder","value":{"rev":"25-b9679e2aaffec1ac6d59fdd259d9590c"}}, -{"id":"buildr","key":"buildr","value":{"rev":"69-cb3a756903a6322c6f9f4dd1c384a607"}}, -{"id":"bumper","key":"bumper","value":{"rev":"3-1e8d17aa3b29815e4069294cc9ce572c"}}, -{"id":"bundle","key":"bundle","value":{"rev":"39-46fde9cd841bce1fbdd92f6a1235c308"}}, -{"id":"bunker","key":"bunker","value":{"rev":"7-ed993a296fa0b8d3c3a7cd759d6f371e"}}, -{"id":"burari","key":"burari","value":{"rev":"11-08b61073d6ad0ef0c7449a574dc8f54b"}}, -{"id":"burrito","key":"burrito","value":{"rev":"38-3f3b109972720647f5412f3a2478859b"}}, -{"id":"busbuddy","key":"busbuddy","value":{"rev":"5-298ec29f6307351cf7a19bceebe957c7"}}, -{"id":"buster","key":"buster","value":{"rev":"9-870a6e9638806adde2f40105900cd4b3"}}, -{"id":"buster-args","key":"buster-args","value":{"rev":"7-9b189c602e437a505625dbf7fef5dead"}}, -{"id":"buster-assertions","key":"buster-assertions","value":{"rev":"5-fa34a8a5e7cf4dd08c2d02c39de3b563"}}, -{"id":"buster-cli","key":"buster-cli","value":{"rev":"5-b1a85006e41dbf74313253c571e63874"}}, -{"id":"buster-client","key":"buster-client","value":{"rev":"5-340637ec63b54bb01c1313a78db01945"}}, -{"id":"buster-configuration","key":"buster-configuration","value":{"rev":"3-a12e7ff172562b513534fc26be00aaed"}}, -{"id":"buster-core","key":"buster-core","value":{"rev":"5-871df160645e6684111a8fd02ff0eee9"}}, -{"id":"buster-evented-logger","key":"buster-evented-logger","value":{"rev":"5-c46681e6275a76723e3bc834555dbe32"}}, -{"id":"buster-format","key":"buster-format","value":{"rev":"5-e193e90436c7f941739b82adad86bdd8"}}, -{"id":"buster-module-loader","key":"buster-module-loader","value":{"rev":"5-4148b61f8b718e6181aa6054664a7c44"}}, -{"id":"buster-multicast","key":"buster-multicast","value":{"rev":"3-79480b5be761d243b274cb1e77375afc"}}, -{"id":"buster-promise","key":"buster-promise","value":{"rev":"5-b50030957fbd70e65576faa9c541b739"}}, -{"id":"buster-script-loader","key":"buster-script-loader","value":{"rev":"3-85af28b5bc4e647f27514fede19a144e"}}, -{"id":"buster-server","key":"buster-server","value":{"rev":"7-57b8b43047504818322018d2bbfee1f1"}}, -{"id":"buster-static","key":"buster-static","value":{"rev":"3-018c89d1524f7823934087f18dab9047"}}, -{"id":"buster-terminal","key":"buster-terminal","value":{"rev":"5-2c54c30ffa4a2d4b061e4c38e6b9b0e7"}}, -{"id":"buster-test","key":"buster-test","value":{"rev":"5-f7ee9c9f3b379e0ad5aa03d07581ad6f"}}, -{"id":"buster-test-cli","key":"buster-test-cli","value":{"rev":"9-c207974d20e95029cad5fa4c9435d152"}}, -{"id":"buster-user-agent-parser","key":"buster-user-agent-parser","value":{"rev":"5-7883085a203b3047b28ad08361219d1d"}}, -{"id":"buster-util","key":"buster-util","value":{"rev":"3-81977275a9c467ad79bb7e3f2b1caaa8"}}, -{"id":"butler","key":"butler","value":{"rev":"7-c964c4d213da6b0de2492ee57514d0f8"}}, -{"id":"byline","key":"byline","value":{"rev":"9-0b236ed5986c20136c0d581a244d52ac"}}, -{"id":"bz","key":"bz","value":{"rev":"7-d2a463b259c4e09dc9a79ddee9575ca0"}}, -{"id":"c2dm","key":"c2dm","value":{"rev":"11-a1e6a6643506bed3e1443155706aa5fe"}}, -{"id":"cabin","key":"cabin","value":{"rev":"7-df81ef56f0bb085d381c36600496dc57"}}, -{"id":"caboose","key":"caboose","value":{"rev":"49-7226441f91b63fb5c3ac240bd99d142a"}}, -{"id":"caboose-authentication","key":"caboose-authentication","value":{"rev":"3-9c71a9d7315fdea7d5f52fe52ecef118"}}, -{"id":"caboose-model","key":"caboose-model","value":{"rev":"3-967426d5acb8bb70e133f0052075dc1b"}}, -{"id":"cache2file","key":"cache2file","value":{"rev":"17-ac9caec611a38e1752d91f8cc80cfb04"}}, -{"id":"caching","key":"caching","value":{"rev":"11-06041aaaa46b63ed36843685cac63245"}}, -{"id":"calais","key":"calais","value":{"rev":"11-f8ac2064ca45dd5b7db7ea099cd61dfb"}}, -{"id":"calc","key":"calc","value":{"rev":"3-bead9c5b0bee34e44e7c04aa2bf9cd68"}}, -{"id":"calipso","key":"calipso","value":{"rev":"87-b562676045a66a3ec702591c67a9635e"}}, -{"id":"caman","key":"caman","value":{"rev":"15-4b97c73f0ac101c68335de2937483893"}}, -{"id":"camanjs","key":"camanjs","value":{"rev":"3-2856bbdf7a1d454929b4a80b119e3da0"}}, -{"id":"camelot","key":"camelot","value":{"rev":"7-8e257c5213861ecbd229ee737a3a8bb4"}}, -{"id":"campusbooks","key":"campusbooks","value":{"rev":"18-489be33c6ac2d6cbcf93355f2b129389"}}, -{"id":"canvas","key":"canvas","value":{"rev":"78-27dbf5b6e0a25ba5886d485fd897d701"}}, -{"id":"canvasutil","key":"canvasutil","value":{"rev":"7-0b87a370d673886efb7763aaf500b744"}}, -{"id":"capoo","key":"capoo","value":{"rev":"9-136a3ddf489228d5f4b504b1da619447"}}, -{"id":"capsule","key":"capsule","value":{"rev":"19-ad3c9ba0af71a84228e6dd360017f379"}}, -{"id":"capt","key":"capt","value":{"rev":"13-0805d789000fb2e361103a5e62379196"}}, -{"id":"carena","key":"carena","value":{"rev":"10-d38e8c336a0dbb8091514f638b22b96b"}}, -{"id":"carrier","key":"carrier","value":{"rev":"20-b2b4a0560d40eeac617000e9e22a9e9d"}}, -{"id":"cart","key":"cart","value":{"rev":"12-493e79c6fa0b099626e90da79a69f1e5"}}, -{"id":"carto","key":"carto","value":{"rev":"45-8eab07e2fac57396dd62af5805062387"}}, -{"id":"caruso","key":"caruso","value":{"rev":"5-d58e22212b0bcebbab4b42adc68799aa"}}, -{"id":"cas","key":"cas","value":{"rev":"3-82a93160eb9add99bde1599e55d18fd8"}}, -{"id":"cas-auth","key":"cas-auth","value":{"rev":"3-b02f77c198050b99f1df18f637e77c10"}}, -{"id":"cas-client","key":"cas-client","value":{"rev":"3-ca69e32a3053bc680d1dddc57271483b"}}, -{"id":"cashew","key":"cashew","value":{"rev":"7-9e81cde34263adad6949875c4b33ee99"}}, -{"id":"cassandra","key":"cassandra","value":{"rev":"3-8617ef73fdc73d02ecec74d31f98e463"}}, -{"id":"cassandra-client","key":"cassandra-client","value":{"rev":"19-aa1aef5d203be5b0eac678284f1a979f"}}, -{"id":"casset","key":"casset","value":{"rev":"3-2052c7feb5b89c77aaa279c8b50126ce"}}, -{"id":"castaneum","key":"castaneum","value":{"rev":"26-4dc55ba2482cca4230b4bc77ecb5b70d"}}, -{"id":"cat","key":"cat","value":{"rev":"3-75f20119b363b85c1a8433e26b86c943"}}, -{"id":"catchjs","key":"catchjs","value":{"rev":"3-ffda7eff7613de37f629dc7a831ffda1"}}, -{"id":"caterpillar","key":"caterpillar","value":{"rev":"5-bc003e3af33240e67b4c3042f308b7da"}}, -{"id":"causeeffect","key":"causeeffect","value":{"rev":"9-7e4e25bff656170c97cb0cce1b2ab6ca"}}, -{"id":"cayenne","key":"cayenne","value":{"rev":"5-2797f561467b41cc45804e5498917800"}}, -{"id":"ccn4bnode","key":"ccn4bnode","value":{"rev":"17-96f55189e5c98f0fa8200e403a04eb39"}}, -{"id":"ccnq3_config","key":"ccnq3_config","value":{"rev":"21-40345771769a9cadff4af9113b8124c2"}}, -{"id":"ccnq3_logger","key":"ccnq3_logger","value":{"rev":"5-4aa168dc24425938a29cf9ac456158d7"}}, -{"id":"ccnq3_portal","key":"ccnq3_portal","value":{"rev":"17-84e629ec1eaba1722327ccb9dddb05cf"}}, -{"id":"ccnq3_roles","key":"ccnq3_roles","value":{"rev":"43-97de74b08b1af103da8905533a84b749"}}, -{"id":"ccss","key":"ccss","value":{"rev":"11-b9beb506410ea81581ba4c7dfe9b2a7d"}}, -{"id":"cdb","key":"cdb","value":{"rev":"13-d7b6f609f069dc738912b405aac558ab"}}, -{"id":"cdb_changes","key":"cdb_changes","value":{"rev":"13-1dc99b096cb91c276332b651396789e8"}}, -{"id":"celeri","key":"celeri","value":{"rev":"17-b19294619ef6c2056f3bf6641e8945c2"}}, -{"id":"celery","key":"celery","value":{"rev":"5-bdfccd483cf30c4c10c5ec0963de1248"}}, -{"id":"cempl8","key":"cempl8","value":{"rev":"21-bb9547b78a1548fe11dc1d5b816b6da1"}}, -{"id":"cfg","key":"cfg","value":{"rev":"3-85c7651bb8f16b057e60a46946eb95af"}}, -{"id":"cgi","key":"cgi","value":{"rev":"17-7ceac458c7f141d4fbbf05d267a72aa8"}}, -{"id":"chain","key":"chain","value":{"rev":"9-b0f175c5ad0173bcb7e11e58b02a7394"}}, -{"id":"chain-gang","key":"chain-gang","value":{"rev":"22-b0e6841a344b65530ea2a83a038e5aa6"}}, -{"id":"chainer","key":"chainer","value":{"rev":"15-8c6a565035225a1dcca0177e92ccf42d"}}, -{"id":"chainify","key":"chainify","value":{"rev":"3-0926790f18a0016a9943cfb4830e0187"}}, -{"id":"chains","key":"chains","value":{"rev":"5-d9e1ac38056e2638e38d9a7c415929c6"}}, -{"id":"chainsaw","key":"chainsaw","value":{"rev":"24-82e078efbbc59f798d29a0259481012e"}}, -{"id":"changelog","key":"changelog","value":{"rev":"27-317e473de0bf596b273a9dadecea126d"}}, -{"id":"channel-server","key":"channel-server","value":{"rev":"3-3c882f7e61686e8a124b5198c638a18e"}}, -{"id":"channels","key":"channels","value":{"rev":"5-0b532f054886d9094cb98493ee0a7a16"}}, -{"id":"chaos","key":"chaos","value":{"rev":"40-7caa4459d398f5ec30fea91d087f0d71"}}, -{"id":"chard","key":"chard","value":{"rev":"3-f2de35f7a390ea86ac0eb78bf720d0de"}}, -{"id":"charenc","key":"charenc","value":{"rev":"3-092036302311a8f5779b800c98170b5b"}}, -{"id":"chargify","key":"chargify","value":{"rev":"5-e3f29f2816b04c26ca047d345928e2c1"}}, -{"id":"charm","key":"charm","value":{"rev":"13-3e7e7b5babc1efc472e3ce62eec2c0c7"}}, -{"id":"chat-server","key":"chat-server","value":{"rev":"7-c73b785372474e083fb8f3e9690761da"}}, -{"id":"chatroom","key":"chatroom","value":{"rev":"3-f4fa8330b7eb277d11407f968bffb6a2"}}, -{"id":"chatspire","key":"chatspire","value":{"rev":"3-081e167e3f7c1982ab1b7fc3679cb87c"}}, -{"id":"checkip","key":"checkip","value":{"rev":"3-b31d58a160a4a3fe2f14cfbf2217949e"}}, -{"id":"cheddar-getter","key":"cheddar-getter","value":{"rev":"3-d675ec138ea704df127fabab6a52a8dc"}}, -{"id":"chess","key":"chess","value":{"rev":"3-8b15268c8b0fb500dcbc83b259e7fb88"}}, -{"id":"chessathome-worker","key":"chessathome-worker","value":{"rev":"7-cdfd411554c35ba7a52e54f7744bed35"}}, -{"id":"chirkut.js","key":"chirkut.js","value":{"rev":"3-c0e515eee0f719c5261a43e692a3585c"}}, -{"id":"chiron","key":"chiron","value":{"rev":"6-ccb575e432c1c1981fc34b4e27329c85"}}, -{"id":"chopper","key":"chopper","value":{"rev":"5-168681c58c2a50796676dea73dc5398b"}}, -{"id":"choreographer","key":"choreographer","value":{"rev":"14-b0159823becdf0b4552967293968b2a8"}}, -{"id":"chromic","key":"chromic","value":{"rev":"3-c4ca0bb1f951db96c727241092afa9cd"}}, -{"id":"chrono","key":"chrono","value":{"rev":"9-6399d715df1a2f4696f89f2ab5d4d83a"}}, -{"id":"chuck","key":"chuck","value":{"rev":"3-71f2ee071d4b6fb2af3b8b828c51d8ab"}}, -{"id":"chunkedstream","key":"chunkedstream","value":{"rev":"3-b145ed7d1abd94ac44343413e4f823e7"}}, -{"id":"cider","key":"cider","value":{"rev":"10-dc20cd3eac9470e96911dcf75ac6492b"}}, -{"id":"cinch","key":"cinch","value":{"rev":"5-086af7f72caefb57284e4101cbe3c905"}}, -{"id":"cipherpipe","key":"cipherpipe","value":{"rev":"5-0b5590f808415a7297de6d45947d911f"}}, -{"id":"cjson","key":"cjson","value":{"rev":"25-02e3d327b48e77dc0f9e070ce9454ac2"}}, -{"id":"ck","key":"ck","value":{"rev":"3-f482385f5392a49353d8ba5eb9c7afef"}}, -{"id":"ckup","key":"ckup","value":{"rev":"26-90a76ec0cdf951dc2ea6058098407ee2"}}, -{"id":"class","key":"class","value":{"rev":"6-e2805f7d87586a66fb5fd170cf74b3b0"}}, -{"id":"class-42","key":"class-42","value":{"rev":"3-14c988567a2c78a857f15c9661bd6430"}}, -{"id":"class-js","key":"class-js","value":{"rev":"5-792fd04288a651dad87bc47eb91c2042"}}, -{"id":"classify","key":"classify","value":{"rev":"23-35eb336c350446f5ed49069df151dbb7"}}, -{"id":"clean-css","key":"clean-css","value":{"rev":"13-e30ea1007f6c5bb49e07276228b8a960"}}, -{"id":"clearInterval","key":"clearInterval","value":{"rev":"3-a49fa235d3dc14d28a3d15f8db291986"}}, -{"id":"clearTimeout","key":"clearTimeout","value":{"rev":"3-e838bd25adc825112922913c1a35b934"}}, -{"id":"cli","key":"cli","value":{"rev":"65-9e79c37c12d21b9b9114093de0773c54"}}, -{"id":"cli-color","key":"cli-color","value":{"rev":"9-0a8e775e713b1351f6a6648748dd16ec"}}, -{"id":"cli-table","key":"cli-table","value":{"rev":"3-9e447a8bb392fb7d9c534445a650e328"}}, -{"id":"clickatell","key":"clickatell","value":{"rev":"3-31f1a66d08a789976919df0c9280de88"}}, -{"id":"clicktime","key":"clicktime","value":{"rev":"9-697a99f5f704bfebbb454df47c9c472a"}}, -{"id":"clientexpress","key":"clientexpress","value":{"rev":"3-9b07041cd7b0c3967c4625ac74c9b50c"}}, -{"id":"cliff","key":"cliff","value":{"rev":"15-ef9ef25dbad08c0e346388522d94c5c3"}}, -{"id":"clip","key":"clip","value":{"rev":"21-c3936e566feebfe0beddb0bbb686c00d"}}, -{"id":"clock","key":"clock","value":{"rev":"5-19bc51841d41408b4446c0862487dc5e"}}, -{"id":"clog","key":"clog","value":{"rev":"5-1610fe2c0f435d2694a1707ee15cd11e"}}, -{"id":"clone","key":"clone","value":{"rev":"11-099d07f38381b54902c4cf5b93671ed4"}}, -{"id":"closure","key":"closure","value":{"rev":"7-9c2ac6b6ec9f14d12d10bfbfad58ec14"}}, -{"id":"closure-compiler","key":"closure-compiler","value":{"rev":"8-b3d2f9e3287dd33094a35d797d6beaf2"}}, -{"id":"cloud","key":"cloud","value":{"rev":"27-407c7aa77d3d4a6cc903d18b383de8b8"}}, -{"id":"cloud9","key":"cloud9","value":{"rev":"71-4af631e3fa2eb28058cb0d18ef3a6a3e"}}, -{"id":"cloudcontrol","key":"cloudcontrol","value":{"rev":"15-2df57385aa9bd92f7ed81e6892e23696"}}, -{"id":"cloudfiles","key":"cloudfiles","value":{"rev":"30-01f84ebda1d8f151b3e467590329960c"}}, -{"id":"cloudfoundry","key":"cloudfoundry","value":{"rev":"3-66fafd3d6b1353b1699d35e634686ab6"}}, -{"id":"cloudmailin","key":"cloudmailin","value":{"rev":"3-a4e3e4d457f5a18261bb8df145cfb418"}}, -{"id":"cloudnode-cli","key":"cloudnode-cli","value":{"rev":"17-3a80f7855ce618f7aee68bd693ed485b"}}, -{"id":"cloudservers","key":"cloudservers","value":{"rev":"42-6bc34f7e34f84a24078b43a609e96c59"}}, -{"id":"clucene","key":"clucene","value":{"rev":"37-3d613f12a857b8fe22fbf420bcca0dc3"}}, -{"id":"cluster","key":"cluster","value":{"rev":"83-63fb7a468d95502f94ea45208ba0a890"}}, -{"id":"cluster-isolatable","key":"cluster-isolatable","value":{"rev":"5-6af883cea9ab1c90bb126d8b3be2d156"}}, -{"id":"cluster-live","key":"cluster-live","value":{"rev":"7-549d19e9727f460c7de48f93b92e9bb3"}}, -{"id":"cluster-log","key":"cluster-log","value":{"rev":"7-9c47854df8ec911e679743185668a5f7"}}, -{"id":"cluster-loggly","key":"cluster-loggly","value":{"rev":"3-e1f7e331282d7b8317ce55e0fce7f934"}}, -{"id":"cluster-mail","key":"cluster-mail","value":{"rev":"9-dc18c5c1b2b265f3d531b92467b6cc35"}}, -{"id":"cluster-responsetimes","key":"cluster-responsetimes","value":{"rev":"3-c9e16daee15eb84910493264e973275c"}}, -{"id":"cluster-socket.io","key":"cluster-socket.io","value":{"rev":"7-29032f0b42575e9fe183a0af92191132"}}, -{"id":"cluster.exception","key":"cluster.exception","value":{"rev":"3-10856526e2f61e3000d62b12abd750e3"}}, -{"id":"clutch","key":"clutch","value":{"rev":"8-50283f7263c430cdd1d293c033571012"}}, -{"id":"cm1-route","key":"cm1-route","value":{"rev":"13-40e72b5a4277b500c98c966bcd2a8a86"}}, -{"id":"cmd","key":"cmd","value":{"rev":"9-9168fcd96fb1ba9449050162023f3570"}}, -{"id":"cmdopt","key":"cmdopt","value":{"rev":"3-85677533e299bf195e78942929cf9839"}}, -{"id":"cmp","key":"cmp","value":{"rev":"5-b10f873b78eb64e406fe55bd001ae0fa"}}, -{"id":"cmudict","key":"cmudict","value":{"rev":"3-cd028380bba917d5ed2be7a8d3b3b0b7"}}, -{"id":"cnlogger","key":"cnlogger","value":{"rev":"9-dbe7e0e50d25ca5ae939fe999c3c562b"}}, -{"id":"coa","key":"coa","value":{"rev":"11-ff4e634fbebd3f80b9461ebe58b3f64e"}}, -{"id":"cobra","key":"cobra","value":{"rev":"5-a3e0963830d350f4a7e91b438caf9117"}}, -{"id":"cockpit","key":"cockpit","value":{"rev":"3-1757b37245ee990999e4456b9a6b963e"}}, -{"id":"coco","key":"coco","value":{"rev":"104-eabc4d7096295c2156144a7581d89b35"}}, -{"id":"cocos2d","key":"cocos2d","value":{"rev":"19-88a5c75ceb6e7667665c056d174f5f1a"}}, -{"id":"codem-transcode","key":"codem-transcode","value":{"rev":"9-1faa2657d53271ccc44cce27de723e99"}}, -{"id":"codepad","key":"codepad","value":{"rev":"5-094ddce74dc057dc0a4d423d6d2fbc3a"}}, -{"id":"codetube","key":"codetube","value":{"rev":"3-819794145f199330e724864db70da53b"}}, -{"id":"coerce","key":"coerce","value":{"rev":"3-e7d392d497c0b8491b89fcbbd1a5a89f"}}, -{"id":"coffee-conf","key":"coffee-conf","value":{"rev":"3-883bc4767d70810ece2fdf1ccae883de"}}, -{"id":"coffee-css","key":"coffee-css","value":{"rev":"11-66ca197173751389b24945f020f198f9"}}, -{"id":"coffee-echonest","key":"coffee-echonest","value":{"rev":"3-3cd0e2b77103e334eccf6cf4168f39b2"}}, -{"id":"coffee-machine","key":"coffee-machine","value":{"rev":"9-02deb4d27fd5d56002ead122e9bb213e"}}, -{"id":"coffee-new","key":"coffee-new","value":{"rev":"67-0664b0f289030c38d113070fd26f4f71"}}, -{"id":"coffee-resque","key":"coffee-resque","value":{"rev":"22-5b022809317d3a873be900f1a697c5eb"}}, -{"id":"coffee-resque-retry","key":"coffee-resque-retry","value":{"rev":"29-1fb64819a4a21ebb4d774d9d4108e419"}}, -{"id":"coffee-revup","key":"coffee-revup","value":{"rev":"3-23aafa258bcdcf2bb68d143d61383551"}}, -{"id":"coffee-script","key":"coffee-script","value":{"rev":"60-a6c3739655f43953bd86283776586b95"}}, -{"id":"coffee-son","key":"coffee-son","value":{"rev":"3-84a81e7e24c8cb23293940fc1b87adfe"}}, -{"id":"coffee-toaster","key":"coffee-toaster","value":{"rev":"17-d43d7276c08b526c229c78b7d5acd6cc"}}, -{"id":"coffee-watcher","key":"coffee-watcher","value":{"rev":"3-3d861a748f0928c789cbdb8ff62b6091"}}, -{"id":"coffee-world","key":"coffee-world","value":{"rev":"15-46dc320f94fa64c39e183224ec59f47a"}}, -{"id":"coffee4clients","key":"coffee4clients","value":{"rev":"15-58fba7dd10bced0411cfe546b9336145"}}, -{"id":"coffeeapp","key":"coffeeapp","value":{"rev":"48-bece0a26b78afc18cd37d577f90369d9"}}, -{"id":"coffeebot","key":"coffeebot","value":{"rev":"3-a9007053f25a4c13b324f0ac7066803e"}}, -{"id":"coffeedoc","key":"coffeedoc","value":{"rev":"21-a955faafafd10375baf3101ad2c142d0"}}, -{"id":"coffeegrinder","key":"coffeegrinder","value":{"rev":"9-6e725aad7fd39cd38f41c743ef8a7563"}}, -{"id":"coffeekup","key":"coffeekup","value":{"rev":"35-9b1eecdb7b13d3e75cdc7b1045cf910a"}}, -{"id":"coffeemaker","key":"coffeemaker","value":{"rev":"9-4c5e665aa2a5b4efa2b7d077d0a4f9c1"}}, -{"id":"coffeemate","key":"coffeemate","value":{"rev":"71-03d0221fb495f2dc6732009884027b47"}}, -{"id":"coffeepack","key":"coffeepack","value":{"rev":"3-bbf0e27cb4865392164e7ab33f131d58"}}, -{"id":"coffeeq","key":"coffeeq","value":{"rev":"9-4e38e9742a0b9d7b308565729fbfd123"}}, -{"id":"coffeescript-growl","key":"coffeescript-growl","value":{"rev":"7-2bc1f93c4aad5fa8fb4bcfd1b3ecc279"}}, -{"id":"coffeescript-notify","key":"coffeescript-notify","value":{"rev":"3-8aeb31f8e892d3fefa421ff28a1b3de9"}}, -{"id":"collectd","key":"collectd","value":{"rev":"5-3d4c84b0363aa9c078157d82695557a1"}}, -{"id":"collection","key":"collection","value":{"rev":"3-a47e1fe91b9eebb3e75954e350ec2ca3"}}, -{"id":"collection_functions","key":"collection_functions","value":{"rev":"3-7366c721008062373ec924a409415189"}}, -{"id":"collections","key":"collections","value":{"rev":"3-0237a40d08a0da36c2dd01ce73a89bb2"}}, -{"id":"color","key":"color","value":{"rev":"15-4898b2cd9744feb3249ba10828c186f8"}}, -{"id":"color-convert","key":"color-convert","value":{"rev":"7-2ccb47c7f07a47286d9a2f39383d28f0"}}, -{"id":"color-string","key":"color-string","value":{"rev":"5-9a6336f420e001e301a15b88b0103696"}}, -{"id":"colorize","key":"colorize","value":{"rev":"3-ff380385edacc0c46e4c7b5c05302576"}}, -{"id":"colors","key":"colors","value":{"rev":"8-7c7fb9c5af038c978f0868c7706fe145"}}, -{"id":"colour-extractor","key":"colour-extractor","value":{"rev":"3-62e96a84c6adf23f438b5aac76c7b257"}}, -{"id":"coloured","key":"coloured","value":{"rev":"8-c5295f2d5a8fc08e93d180a4e64f8d38"}}, -{"id":"coloured-log","key":"coloured-log","value":{"rev":"14-8627a3625959443acad71e2c23dfc582"}}, -{"id":"comb","key":"comb","value":{"rev":"5-7f201b621ae9a890c7f5a31867eba3e9"}}, -{"id":"combine","key":"combine","value":{"rev":"14-bed33cd4389a2e4bb826a0516c6ae307"}}, -{"id":"combined-stream","key":"combined-stream","value":{"rev":"13-678f560200ac2835b9026e9e2b955cb0"}}, -{"id":"combiner","key":"combiner","value":{"rev":"3-5e7f133c8c14958eaf9e92bd79ae8ee1"}}, -{"id":"combohandler","key":"combohandler","value":{"rev":"7-d7e1a402f0066caa6756a8866de81dd9"}}, -{"id":"combyne","key":"combyne","value":{"rev":"23-05ebee9666a769e32600bc5548d10ce9"}}, -{"id":"comfy","key":"comfy","value":{"rev":"5-8bfe55bc16611dfe51a184b8f3eb31c1"}}, -{"id":"command-parser","key":"command-parser","value":{"rev":"5-8a5c3ed6dfa0fa55cc71b32cf52332fc"}}, -{"id":"commander","key":"commander","value":{"rev":"11-9dd16c00844d464bf66c101a57075401"}}, -{"id":"commando","key":"commando","value":{"rev":"3-e159f1890f3771dfd6e04f4d984f26f3"}}, -{"id":"common","key":"common","value":{"rev":"16-94eafcf104c0c7d1090e668ddcc12a5f"}}, -{"id":"common-exception","key":"common-exception","value":{"rev":"7-bd46358014299da814691c835548ef21"}}, -{"id":"common-node","key":"common-node","value":{"rev":"5-b2c4bef0e7022d5d453661a9c43497a8"}}, -{"id":"common-pool","key":"common-pool","value":{"rev":"5-c495fa945361ba4fdfb2ee8733d791b4"}}, -{"id":"common-utils","key":"common-utils","value":{"rev":"3-e5a047f118fc304281d2bc5e9ab18e62"}}, -{"id":"commondir","key":"commondir","value":{"rev":"3-ea49874d12eeb9adf28ca28989dfb5a9"}}, -{"id":"commonjs","key":"commonjs","value":{"rev":"6-39fcd0de1ec265890cf063effd0672e3"}}, -{"id":"commonjs-utils","key":"commonjs-utils","value":{"rev":"6-c0266a91dbd0a43effb7d30da5d9f35c"}}, -{"id":"commonkv","key":"commonkv","value":{"rev":"3-90b2fe4c79e263b044303706c4d5485a"}}, -{"id":"commons","key":"commons","value":{"rev":"6-0ecb654aa2bd17cf9519f86d354f8a50"}}, -{"id":"complete","key":"complete","value":{"rev":"7-acde8cba7677747d09c3d53ff165754e"}}, -{"id":"complex-search","key":"complex-search","value":{"rev":"5-c80b2c7f049f333bde89435f3de497ca"}}, -{"id":"compose","key":"compose","value":{"rev":"1-cf8a97d6ead3bef056d85daec5d36c70"}}, -{"id":"composer","key":"composer","value":{"rev":"6-1deb43725051f845efd4a7c8e68aa6d6"}}, -{"id":"compress","key":"compress","value":{"rev":"17-f0aacce1356f807b51e083490fb353bd"}}, -{"id":"compress-buffer","key":"compress-buffer","value":{"rev":"12-2886014c7f2541f4ddff9f0f55f4c171"}}, -{"id":"compress-ds","key":"compress-ds","value":{"rev":"5-9e4c6931edf104443353594ef50aa127"}}, -{"id":"compressor","key":"compressor","value":{"rev":"3-ee8ad155a98e1483d899ebcf82d5fb63"}}, -{"id":"concrete","key":"concrete","value":{"rev":"5-bc70bbffb7c6fe9e8c399db578fb3bae"}}, -{"id":"condo","key":"condo","value":{"rev":"9-5f03d58ee7dc29465defa3758f3b138a"}}, -{"id":"conductor","key":"conductor","value":{"rev":"8-1878afadcda7398063de6286c2d2c5c1"}}, -{"id":"conf","key":"conf","value":{"rev":"11-dcf0f6a93827d1b143cb1d0858f2be4a"}}, -{"id":"config","key":"config","value":{"rev":"37-2b741a1e6951a74b7f1de0d0547418a0"}}, -{"id":"config-loader","key":"config-loader","value":{"rev":"3-708cc96d1206de46fb450eb57ca07b0d"}}, -{"id":"configurator","key":"configurator","value":{"rev":"5-b31ad9731741d19f28241f6af5b41fee"}}, -{"id":"confu","key":"confu","value":{"rev":"7-c46f82c4aa9a17db6530b00669461eaf"}}, -{"id":"confy","key":"confy","value":{"rev":"3-893b33743830a0318dc99b1788aa92ee"}}, -{"id":"connect","key":"connect","value":{"rev":"151-8b5617fc6ece6c125b5f628936159bd6"}}, -{"id":"connect-access-control","key":"connect-access-control","value":{"rev":"3-ccf5fb09533d41eb0b564eb1caecf910"}}, -{"id":"connect-airbrake","key":"connect-airbrake","value":{"rev":"5-19db5e5828977540814d09f9eb7f028f"}}, -{"id":"connect-analytics","key":"connect-analytics","value":{"rev":"3-6f71c8b08ed9f5762c1a4425c196fb2a"}}, -{"id":"connect-app-cache","key":"connect-app-cache","value":{"rev":"27-3e69452dfe51cc907f8b188aede1bda8"}}, -{"id":"connect-assetmanager","key":"connect-assetmanager","value":{"rev":"46-f2a8834d2749e0c069cee06244e7501c"}}, -{"id":"connect-assetmanager-handlers","key":"connect-assetmanager-handlers","value":{"rev":"38-8b93821fcf46f20bbad4319fb39302c1"}}, -{"id":"connect-assets","key":"connect-assets","value":{"rev":"33-7ec2940217e29a9514d20cfd49af10f5"}}, -{"id":"connect-auth","key":"connect-auth","value":{"rev":"36-5640e82f3e2773e44ce47b0687436305"}}, -{"id":"connect-cache","key":"connect-cache","value":{"rev":"11-efe1f0ab00c181b1a4dece446ef13a90"}}, -{"id":"connect-coffee","key":"connect-coffee","value":{"rev":"3-3d4ebcfe083c9e5a5d587090f1bb4d65"}}, -{"id":"connect-conneg","key":"connect-conneg","value":{"rev":"3-bc3e04e65cf1f5233a38cc846e9a4a75"}}, -{"id":"connect-cookie-session","key":"connect-cookie-session","value":{"rev":"3-f48ca73aa1ce1111a2c962d219b59c1a"}}, -{"id":"connect-cors","key":"connect-cors","value":{"rev":"10-5bc9e3759671a0157fdc307872d38844"}}, -{"id":"connect-couchdb","key":"connect-couchdb","value":{"rev":"9-9adb6d24c7fb6de58bafe6d06fb4a230"}}, -{"id":"connect-cradle","key":"connect-cradle","value":{"rev":"5-0e5e32e00a9b98eff1ab010173d26ffb"}}, -{"id":"connect-docco","key":"connect-docco","value":{"rev":"9-c8e379f9a89db53f8921895ac4e87ed6"}}, -{"id":"connect-dojo","key":"connect-dojo","value":{"rev":"17-f323c634536b9b948ad9607f4ca0847f"}}, -{"id":"connect-esi","key":"connect-esi","value":{"rev":"45-01de7506d405856586ea77cb14022192"}}, -{"id":"connect-facebook","key":"connect-facebook","value":{"rev":"3-bf77eb01c0476e607b25bc9d93416b7e"}}, -{"id":"connect-force-domain","key":"connect-force-domain","value":{"rev":"5-a65755f93aaea8a21c7ce7dd4734dca0"}}, -{"id":"connect-form","key":"connect-form","value":{"rev":"16-fa786af79f062a05ecdf3e7cf48317e2"}}, -{"id":"connect-geoip","key":"connect-geoip","value":{"rev":"3-d87f93bcac58aa7904886a8fb6c45899"}}, -{"id":"connect-googleapps","key":"connect-googleapps","value":{"rev":"13-49c5c6c6724b21eea9a8eaae2165978d"}}, -{"id":"connect-gzip","key":"connect-gzip","value":{"rev":"7-2e1d4bb887c1ddda278fc8465ee5645b"}}, -{"id":"connect-heroku-redis","key":"connect-heroku-redis","value":{"rev":"13-92da2be67451e5f55f6fbe3672c86dc4"}}, -{"id":"connect-i18n","key":"connect-i18n","value":{"rev":"8-09d47d7c220770fc80d1b6fd87ffcd07"}}, -{"id":"connect-identity","key":"connect-identity","value":{"rev":"8-8eb9e21bbf80045e0243720955d6070f"}}, -{"id":"connect-image-resizer","key":"connect-image-resizer","value":{"rev":"7-5f82563f87145f3cc06086afe3a14a62"}}, -{"id":"connect-index","key":"connect-index","value":{"rev":"3-8b8373334079eb26c8735b39483889a0"}}, -{"id":"connect-jsonp","key":"connect-jsonp","value":{"rev":"16-9e80af455e490710f06039d3c0025840"}}, -{"id":"connect-jsonrpc","key":"connect-jsonrpc","value":{"rev":"6-6556800f0bef6ae5eb10496d751048e7"}}, -{"id":"connect-kyoto","key":"connect-kyoto","value":{"rev":"5-8f6a9e9b24d1a71c786645402f509645"}}, -{"id":"connect-less","key":"connect-less","value":{"rev":"3-461ed9a80b462b978a81d5bcee6f3665"}}, -{"id":"connect-load-balance","key":"connect-load-balance","value":{"rev":"3-e74bff5fb47d1490c05a9cc4339af347"}}, -{"id":"connect-memcached","key":"connect-memcached","value":{"rev":"3-5fc92b7f9fb5bcfb364a27e6f052bcc7"}}, -{"id":"connect-mongo","key":"connect-mongo","value":{"rev":"13-c3869bc7337b2f1ee6b9b3364993f321"}}, -{"id":"connect-mongodb","key":"connect-mongodb","value":{"rev":"30-30cb932839ce16e4e496f5a33fdd720a"}}, -{"id":"connect-mongoose","key":"connect-mongoose","value":{"rev":"3-48a5b329e4cfa885442d43bbd1d0db46"}}, -{"id":"connect-mongoose-session","key":"connect-mongoose-session","value":{"rev":"3-6692b8e1225d5cd6a2daabd61cecb1cd"}}, -{"id":"connect-mysql-session","key":"connect-mysql-session","value":{"rev":"9-930abd0279ef7f447e75c95b3e71be12"}}, -{"id":"connect-no-www","key":"connect-no-www","value":{"rev":"3-33bed7417bc8a5e8efc74ce132c33158"}}, -{"id":"connect-notifo","key":"connect-notifo","value":{"rev":"3-4681f8c5a7dfd35aee9634e809c41804"}}, -{"id":"connect-parameter-router","key":"connect-parameter-router","value":{"rev":"3-f435f06d556c208d43ef05c64bcddceb"}}, -{"id":"connect-pg","key":"connect-pg","value":{"rev":"11-d84c53d8f1c24adfc266e7a031dddf0d"}}, -{"id":"connect-proxy","key":"connect-proxy","value":{"rev":"7-a691ff57a9affeab47c54d17dbe613cb"}}, -{"id":"connect-queryparser","key":"connect-queryparser","value":{"rev":"3-bb35a7f3f75297a63bf942a63b842698"}}, -{"id":"connect-redis","key":"connect-redis","value":{"rev":"40-4faa12962b14da49380de2bb183176f9"}}, -{"id":"connect-restreamer","key":"connect-restreamer","value":{"rev":"3-08e637ca685cc63b2b4f9722c763c105"}}, -{"id":"connect-riak","key":"connect-riak","value":{"rev":"5-3268c29a54e430a3f8adb33570afafdb"}}, -{"id":"connect-rpx","key":"connect-rpx","value":{"rev":"28-acc7bb4200c1d30f359151f0a715162c"}}, -{"id":"connect-security","key":"connect-security","value":{"rev":"16-fecd20f486a8ea4d557119af5b5a2960"}}, -{"id":"connect-select","key":"connect-select","value":{"rev":"5-5ca28ec800419e4cb3e97395a6b96153"}}, -{"id":"connect-session-mongo","key":"connect-session-mongo","value":{"rev":"9-9e6a26dfbb9c13a9d6f4060a1895730a"}}, -{"id":"connect-session-redis-store","key":"connect-session-redis-store","value":{"rev":"8-fecfed6e17476eaada5cfe7740d43893"}}, -{"id":"connect-sessionvoc","key":"connect-sessionvoc","value":{"rev":"13-57b6e6ea2158e3b7136054839662ea3d"}}, -{"id":"connect-spdy","key":"connect-spdy","value":{"rev":"11-f9eefd7303295d77d317cba78d299130"}}, -{"id":"connect-sts","key":"connect-sts","value":{"rev":"9-8e3fd563c04ce14b824fc4da42efb70e"}}, -{"id":"connect-timeout","key":"connect-timeout","value":{"rev":"4-6f5f8d97480c16c7acb05fe82400bbc7"}}, -{"id":"connect-unstable","key":"connect-unstable","value":{"rev":"3-1d3a4edc52f005d8cb4d557485095314"}}, -{"id":"connect-wormhole","key":"connect-wormhole","value":{"rev":"3-f33b15acc686bd9ad0c6df716529009f"}}, -{"id":"connect-xcors","key":"connect-xcors","value":{"rev":"7-f8e1cd6805a8779bbd6bb2c1000649fb"}}, -{"id":"connect_facebook","key":"connect_facebook","value":{"rev":"3-b3001d71f619836a009c53c816ce36ed"}}, -{"id":"connect_json","key":"connect_json","value":{"rev":"3-dd0df74291f80f45b4314d56192c19c5"}}, -{"id":"connectables","key":"connectables","value":{"rev":"3-f6e9f8f13883a523b4ea6035281f541b"}}, -{"id":"conseq","key":"conseq","value":{"rev":"3-890d340704322630e7a724333f394c70"}}, -{"id":"consistent-hashing","key":"consistent-hashing","value":{"rev":"3-fcef5d4479d926560cf1bc900f746f2a"}}, -{"id":"console","key":"console","value":{"rev":"3-1e0449b07c840eeac6b536e2552844f4"}}, -{"id":"console.log","key":"console.log","value":{"rev":"9-d608afe50e732ca453365befcb87bad5"}}, -{"id":"consolemark","key":"consolemark","value":{"rev":"13-320f003fc2c3cec909ab3e9c3bce9743"}}, -{"id":"construct","key":"construct","value":{"rev":"3-75bdc809ee0572172e6acff537af7d9b"}}, -{"id":"context","key":"context","value":{"rev":"3-86b1a6a0f77ef86d4d9ccfff47ceaf6a"}}, -{"id":"contextify","key":"contextify","value":{"rev":"9-547b8019ef66e0d1c84fe00be832e750"}}, -{"id":"contract","key":"contract","value":{"rev":"3-d09e775c2c1e297b6cbbfcd5efbae3c7"}}, -{"id":"contracts","key":"contracts","value":{"rev":"13-3fd75c77e688937734f51cf97f10dd7d"}}, -{"id":"control","key":"control","value":{"rev":"31-7abf0cb81d19761f3ff59917e56ecedf"}}, -{"id":"controljs","key":"controljs","value":{"rev":"3-a8e80f93e389ca07509fa7addd6cb805"}}, -{"id":"convert","key":"convert","value":{"rev":"3-6c962b92274bcbe82b82a30806559d47"}}, -{"id":"conway","key":"conway","value":{"rev":"5-93ce24976e7dd5ba02fe4addb2b44267"}}, -{"id":"cookie","key":"cookie","value":{"rev":"14-946d98bf46e940d13ca485148b1bd609"}}, -{"id":"cookie-sessions","key":"cookie-sessions","value":{"rev":"8-4b399ac8cc4baea15f6c5e7ac94399f0"}}, -{"id":"cookiejar","key":"cookiejar","value":{"rev":"20-220b41a4c2a8f2b7b14aafece7dcc1b5"}}, -{"id":"cookies","key":"cookies","value":{"rev":"15-b3b35c32a99ed79accc724685d131d18"}}, -{"id":"cool","key":"cool","value":{"rev":"3-007d1123eb2dc52cf845d625f7ccf198"}}, -{"id":"coolmonitor","key":"coolmonitor","value":{"rev":"3-69c3779c596527f63e49c5e507dff1e1"}}, -{"id":"coop","key":"coop","value":{"rev":"9-39dee3260858cf8c079f31bdf02cea1d"}}, -{"id":"coordinator","key":"coordinator","value":{"rev":"32-9d92f2033a041d5c40f8e1018d512755"}}, -{"id":"core-utils","key":"core-utils","value":{"rev":"9-98f2412938a67d83e53e76a26b5601e0"}}, -{"id":"cornify","key":"cornify","value":{"rev":"6-6913172d09c52f9e8dc0ea19ec49972c"}}, -{"id":"corpus","key":"corpus","value":{"rev":"3-a357e7779f8d4ec020b755c71dd1e57b"}}, -{"id":"corrector","key":"corrector","value":{"rev":"3-ef3cf99fc59a581aee3590bdb8615269"}}, -{"id":"cosmos","key":"cosmos","value":{"rev":"3-3eb292c59758fb5215f22739fa9531ce"}}, -{"id":"couch-ar","key":"couch-ar","value":{"rev":"25-f106d2965ab74b25b18328ca44ca4a02"}}, -{"id":"couch-cleaner","key":"couch-cleaner","value":{"rev":"15-74e61ef98a770d76be4c7e7571d18381"}}, -{"id":"couch-client","key":"couch-client","value":{"rev":"10-94945ebd3e17f509fcc71fb6c6ef5d35"}}, -{"id":"couch-session","key":"couch-session","value":{"rev":"4-c73dea41ceed26a2a0bde9a9c8ffffc4"}}, -{"id":"couch-sqlite","key":"couch-sqlite","value":{"rev":"3-3e420fe6623542475595aa7e55a4e4bd"}}, -{"id":"couch-stream","key":"couch-stream","value":{"rev":"5-911704fc984bc49acce1e10adefff7ff"}}, -{"id":"couchapp","key":"couchapp","value":{"rev":"16-ded0f4742bb3f5fd42ec8f9c6b21ae8e"}}, -{"id":"couchcmd","key":"couchcmd","value":{"rev":"3-651ea2b435e031481b5d3d968bd3d1eb"}}, -{"id":"couchdb","key":"couchdb","value":{"rev":"12-8abcfd649751226c10edf7cf0508a09f"}}, -{"id":"couchdb-api","key":"couchdb-api","value":{"rev":"23-f2c82f08f52f266df7ac2aa709615244"}}, -{"id":"couchdb-tmp","key":"couchdb-tmp","value":{"rev":"3-9a695fb4ba352f3be2d57c5995718520"}}, -{"id":"couchdev","key":"couchdev","value":{"rev":"3-50a0ca3ed0395dd72de62a1b96619e66"}}, -{"id":"couchlegs","key":"couchlegs","value":{"rev":"5-be78e7922ad4ff86dbe5c17a87fdf4f1"}}, -{"id":"couchtato","key":"couchtato","value":{"rev":"11-15a1ce8de9a8cf1e81d96de6afbb4f45"}}, -{"id":"couchy","key":"couchy","value":{"rev":"13-0a52b2712fb8447f213866612e3ccbf7"}}, -{"id":"courier","key":"courier","value":{"rev":"17-eb94fe01aeaad43805f4bce21d23bcba"}}, -{"id":"coverage","key":"coverage","value":{"rev":"10-a333448996d0b0d420168d1b5748db32"}}, -{"id":"coverage_testing","key":"coverage_testing","value":{"rev":"3-62834678206fae7911401aa86ec1a85e"}}, -{"id":"cqs","key":"cqs","value":{"rev":"6-0dad8b969c70abccc27a146a99399533"}}, -{"id":"crab","key":"crab","value":{"rev":"9-599fc7757f0c9efbe3889f30981ebe93"}}, -{"id":"cradle","key":"cradle","value":{"rev":"60-8fb414b66cb07b4bae59c0316d5c45b4"}}, -{"id":"cradle-fixed","key":"cradle-fixed","value":{"rev":"4-589afffa26fca22244ad2038abb77dc5"}}, -{"id":"cradle-init","key":"cradle-init","value":{"rev":"13-499d63592141f1e200616952bbdea015"}}, -{"id":"crawler","key":"crawler","value":{"rev":"5-ec4a8d77f90d86d17d6d14d631360188"}}, -{"id":"crc","key":"crc","value":{"rev":"3-25ab83f8b1333e6d4e4e5fb286682422"}}, -{"id":"creatary","key":"creatary","value":{"rev":"3-770ad84ecb2e2a3994637d419384740d"}}, -{"id":"createsend","key":"createsend","value":{"rev":"7-19885346e4d7a01ac2e9ad70ea0e822a"}}, -{"id":"creationix","key":"creationix","value":{"rev":"61-7ede1759afbd41e8b4dedc348b72202e"}}, -{"id":"creek","key":"creek","value":{"rev":"33-4f511aa4dd379e04bba7ac333744325e"}}, -{"id":"cron","key":"cron","value":{"rev":"12-8d794edb5f9b7cb6322acaef1c848043"}}, -{"id":"cron2","key":"cron2","value":{"rev":"13-bae2f1b02ffcbb0e77bde6c33b566f80"}}, -{"id":"crontab","key":"crontab","value":{"rev":"36-14d26bf316289fb4841940eee2932f37"}}, -{"id":"crossroads","key":"crossroads","value":{"rev":"7-d73d51cde30f24caad91e6a3c5b420f2"}}, -{"id":"crowdflower","key":"crowdflower","value":{"rev":"3-16c2dfc9fd505f75068f75bd19e3d227"}}, -{"id":"cruvee","key":"cruvee","value":{"rev":"3-979ccf0286b1701e9e7483a10451d975"}}, -{"id":"crypt","key":"crypt","value":{"rev":"3-031b338129bebc3749b42fb3d442fc4b"}}, -{"id":"crypto","key":"crypto","value":{"rev":"3-66a444b64481c85987dd3f22c32e0630"}}, -{"id":"csj","key":"csj","value":{"rev":"3-bc3133c7a0a8827e89aa03897b81d177"}}, -{"id":"cson","key":"cson","value":{"rev":"7-3ac3e1e10572e74e58874cfe3200eb87"}}, -{"id":"csrf-express","key":"csrf-express","value":{"rev":"3-4cc36d88e8ad10b9c2cc8a7318f0abd3"}}, -{"id":"css-crawler","key":"css-crawler","value":{"rev":"13-4739c7bf1decc72d7682b53303f93ec6"}}, -{"id":"css-smasher","key":"css-smasher","value":{"rev":"3-631128f966135c97d648efa3eadf7bfb"}}, -{"id":"css-sourcery","key":"css-sourcery","value":{"rev":"3-571343da3a09af7de473d29ed7dd788b"}}, -{"id":"css2json","key":"css2json","value":{"rev":"5-fb6d84c1da4a9391fa05d782860fe7c4"}}, -{"id":"csskeeper","key":"csskeeper","value":{"rev":"5-ea667a572832ea515b044d4b87ea7d98"}}, -{"id":"csslike","key":"csslike","value":{"rev":"3-6e957cce81f6e790f8562526d907ad94"}}, -{"id":"csslint","key":"csslint","value":{"rev":"19-b1e973274a0a6b8eb81b4d715a249612"}}, -{"id":"cssmin","key":"cssmin","value":{"rev":"10-4bb4280ec56f110c43abe01189f95818"}}, -{"id":"csso","key":"csso","value":{"rev":"17-ccfe2a72d377919b07973bbb1d19b8f2"}}, -{"id":"cssom","key":"cssom","value":{"rev":"3-f96b884b63b4c04bac18b8d9c0a4c4cb"}}, -{"id":"cssp","key":"cssp","value":{"rev":"5-abf69f9ff99b7d0bf2731a5b5da0897c"}}, -{"id":"cssunminifier","key":"cssunminifier","value":{"rev":"3-7bb0c27006af682af92d1969fcb4fa73"}}, -{"id":"cssutils","key":"cssutils","value":{"rev":"3-4759f9db3b8eac0964e36f5229260526"}}, -{"id":"csv","key":"csv","value":{"rev":"21-0420554e9c08e001063cfb0a69a48255"}}, -{"id":"csv2mongo","key":"csv2mongo","value":{"rev":"9-373f11c05e5d1744c3187d9aaeaae0ab"}}, -{"id":"csvutils","key":"csvutils","value":{"rev":"15-84aa82e56b49cd425a059c8f0735a23c"}}, -{"id":"ctrlflow","key":"ctrlflow","value":{"rev":"33-0b817baf6c744dc17b83d5d8ab1ba74e"}}, -{"id":"ctrlflow_tests","key":"ctrlflow_tests","value":{"rev":"3-d9ed35503d27b0736c59669eecb4c4fe"}}, -{"id":"ctype","key":"ctype","value":{"rev":"9-c5cc231475f23a01682d0b1a3b6e49c2"}}, -{"id":"cube","key":"cube","value":{"rev":"5-40320a20d260e082f5c4ca508659b4d1"}}, -{"id":"cucumber","key":"cucumber","value":{"rev":"11-8489af0361b6981cf9001a0403815936"}}, -{"id":"cucumis","key":"cucumis","value":{"rev":"33-6dc38f1161fae3efa2a89c8288b6e040"}}, -{"id":"cucumis-rm","key":"cucumis-rm","value":{"rev":"3-6179249ad15166f8d77eb136b3fa87ca"}}, -{"id":"cupcake","key":"cupcake","value":{"rev":"15-1dd13a85415a366942e7f0a3de06aa2a"}}, -{"id":"curator","key":"curator","value":{"rev":"19-d798ab7fbca11ba0e9c6c40c0a2f9440"}}, -{"id":"curl","key":"curl","value":{"rev":"11-ac7143ac07c64ea169ba7d4e58be232a"}}, -{"id":"curly","key":"curly","value":{"rev":"30-0248a5563b6e96457315ad0cc2fe22c1"}}, -{"id":"curry","key":"curry","value":{"rev":"11-ce13fa80e84eb25d9cf76cf4162a634e"}}, -{"id":"cursory","key":"cursory","value":{"rev":"3-ea2f4b1b47caf38460402d1a565c18b8"}}, -{"id":"d-utils","key":"d-utils","value":{"rev":"37-699ad471caa28183d75c06f0f2aab41c"}}, -{"id":"d3","key":"d3","value":{"rev":"5-4d867844bd7dce21b34cd7283bb9cad4"}}, -{"id":"d3bench","key":"d3bench","value":{"rev":"3-617cc625bfd91c175d037bfcace9c4e9"}}, -{"id":"daemon","key":"daemon","value":{"rev":"11-8654f90bc609ca2c3ec260c7d6b7793e"}}, -{"id":"daemon-tools","key":"daemon-tools","value":{"rev":"18-8197fce2054de67925e6f2c3fa3cd90a"}}, -{"id":"daimyo","key":"daimyo","value":{"rev":"25-531b0b0afdc5ae3d41b4131da40af6cf"}}, -{"id":"daleth","key":"daleth","value":{"rev":"7-4824619205289ba237ef2a4dc1fba1ec"}}, -{"id":"dali","key":"dali","value":{"rev":"9-037c4c76f739ecb537a064c07d3c63e3"}}, -{"id":"damncomma","key":"damncomma","value":{"rev":"3-b1472eada01efb8a12d521e5a248834b"}}, -{"id":"dana","key":"dana","value":{"rev":"3-2a3c0ff58a6d13fedd17e1d192080e59"}}, -{"id":"dandy","key":"dandy","value":{"rev":"9-f4ae43659dd812a010b0333bf8e5a282"}}, -{"id":"dash","key":"dash","value":{"rev":"5-698513f86165f429a5f55320d5a700f0"}}, -{"id":"dash-fu","key":"dash-fu","value":{"rev":"3-848e99a544f9f78f311c7ebfc5a172c4"}}, -{"id":"dashboard","key":"dashboard","value":{"rev":"3-71844d1fc1140b7533f9e57740d2b666"}}, -{"id":"data","key":"data","value":{"rev":"23-b594e2bd1ffef1cda8b7e94dbf15ad5b"}}, -{"id":"data-layer","key":"data-layer","value":{"rev":"9-9205d35cc6eaf1067ee0cec1b421d749"}}, -{"id":"data-page","key":"data-page","value":{"rev":"3-d7a3346a788a0c07132e50585db11c99"}}, -{"id":"data-section","key":"data-section","value":{"rev":"9-d3fff313977667c53cbadb134d993412"}}, -{"id":"data-uuid","key":"data-uuid","value":{"rev":"8-24001fe9f37c4cc7ac01079ee4767363"}}, -{"id":"data-visitor","key":"data-visitor","value":{"rev":"6-7fe5da9d118fab27157dba97050c6487"}}, -{"id":"database-cleaner","key":"database-cleaner","value":{"rev":"19-4bdfc8b324e95e6da9f72e7b7b708b98"}}, -{"id":"datapool","key":"datapool","value":{"rev":"3-f99c93ca812d2f4725bbaea99122832c"}}, -{"id":"datasift","key":"datasift","value":{"rev":"3-6de3ae25c9a99f651101e191595bcf64"}}, -{"id":"date","key":"date","value":{"rev":"9-b334fc6450d093de40a664a4a835cfc4"}}, -{"id":"date-utils","key":"date-utils","value":{"rev":"31-7be8fcf1919564a8fb7223a86a5954ac"}}, -{"id":"dateformat","key":"dateformat","value":{"rev":"11-5b924e1d29056a0ef9b89b9d7984d5c4"}}, -{"id":"dateformatjs","key":"dateformatjs","value":{"rev":"3-4c50a38ecc493535ee2570a838673937"}}, -{"id":"datejs","key":"datejs","value":{"rev":"5-f47e3e6532817f822aa910b59a45717c"}}, -{"id":"dateselect","key":"dateselect","value":{"rev":"3-ce58def02fd8c8feda8c6f2004726f97"}}, -{"id":"datetime","key":"datetime","value":{"rev":"7-14227b0677eb93b8eb519db47f46bf36"}}, -{"id":"db","key":"db","value":{"rev":"3-636e9ea922a85c92bc11aa9691a2e67f"}}, -{"id":"db-drizzle","key":"db-drizzle","value":{"rev":"157-955f74f49ac4236df317e227c08afaa3"}}, -{"id":"db-mysql","key":"db-mysql","value":{"rev":"224-e596a18d9af33ff1fbcf085a9f4f56fd"}}, -{"id":"db-oracle","key":"db-oracle","value":{"rev":"13-a1e2924d87b4badfddeccf6581525b08"}}, -{"id":"dcrypt","key":"dcrypt","value":{"rev":"29-a144a609bef5004781df901440d67b2d"}}, -{"id":"decafscript","key":"decafscript","value":{"rev":"3-f3a239dc7d503c900fc9854603d716e6"}}, -{"id":"decimal","key":"decimal","value":{"rev":"3-614ed56d4d6c5eb7883d8fd215705a12"}}, -{"id":"decimaljson","key":"decimaljson","value":{"rev":"9-7cb23f4b2b1168b1a213f1eefc85fa51"}}, -{"id":"deck","key":"deck","value":{"rev":"7-da422df97f13c7d84e8f3690c1e1ca32"}}, -{"id":"deckard","key":"deckard","value":{"rev":"3-85e0cd76cdd88ff60a617239060d6f46"}}, -{"id":"deckem","key":"deckem","value":{"rev":"9-03ca75ea35960ccd5779b4cfa8cfb9f9"}}, -{"id":"defensio","key":"defensio","value":{"rev":"5-0ad0ae70b4e184626d914cc4005ee34c"}}, -{"id":"defer","key":"defer","value":{"rev":"3-8d003c96f4263a26b7955e251cddbd95"}}, -{"id":"deferrable","key":"deferrable","value":{"rev":"8-3ae57ce4391105962d09ad619d4c4670"}}, -{"id":"deferred","key":"deferred","value":{"rev":"17-9cee7948dbdf7b6dcc00bbdc60041dd0"}}, -{"id":"define","key":"define","value":{"rev":"45-9d422f2ac5ab693f881df85898d68e3a"}}, -{"id":"deflate","key":"deflate","value":{"rev":"10-3ebe2b87e09f4ae51857cae02e1af788"}}, -{"id":"degrees","key":"degrees","value":{"rev":"5-707c57cfa3e589e8059fe9860cc0c10b"}}, -{"id":"deimos","key":"deimos","value":{"rev":"11-6481696be774d14254fe7c427107dc2a"}}, -{"id":"deja","key":"deja","value":{"rev":"47-bde4457402db895aad46198433842668"}}, -{"id":"delayed-stream","key":"delayed-stream","value":{"rev":"13-f6ca393b08582350f78c5c66f183489b"}}, -{"id":"delegator","key":"delegator","value":{"rev":"3-650651749c1df44ef544c919fae74f82"}}, -{"id":"dep-graph","key":"dep-graph","value":{"rev":"3-e404af87822756da52754e2cc5c576b1"}}, -{"id":"dependency-promise","key":"dependency-promise","value":{"rev":"11-1cc2be8465d736ec8f3cc8940ab22823"}}, -{"id":"depends","key":"depends","value":{"rev":"30-adc9604bbd8117592f82eee923d8703e"}}, -{"id":"deploy","key":"deploy","value":{"rev":"3-82020957528bd0bdd675bed9ac4e4cc5"}}, -{"id":"deployjs","key":"deployjs","value":{"rev":"5-a3e99a5ed81d4b1ad44b6477e6a5a985"}}, -{"id":"deputy-client","key":"deputy-client","value":{"rev":"3-31fd224b301ec0f073df7afa790050ec"}}, -{"id":"deputy-server","key":"deputy-server","value":{"rev":"3-0d790cce82aadfd2b8f39a6b056f2792"}}, -{"id":"derby","key":"derby","value":{"rev":"40-b642048a1a639d77ab139160a4da0fd2"}}, -{"id":"des","key":"des","value":{"rev":"24-fcbdc086e657aef356b75433b3e65ab6"}}, -{"id":"descent","key":"descent","value":{"rev":"7-9cc259b25fc688597fc7efaa516d03c6"}}, -{"id":"describe","key":"describe","value":{"rev":"6-788c7f2feaf2e88f4b1179976b273744"}}, -{"id":"deserver","key":"deserver","value":{"rev":"5-da8083694e89b8434123fe7482a3cc7e"}}, -{"id":"detect","key":"detect","value":{"rev":"3-c27f258d39d7905c2b92383809bb5988"}}, -{"id":"detective","key":"detective","value":{"rev":"9-d6cfa0c6389783cdc9c9ffa9e4082c64"}}, -{"id":"dev","key":"dev","value":{"rev":"23-5c2ce4a4f6a4f24d3cff3b7db997d8bc"}}, -{"id":"dev-warnings","key":"dev-warnings","value":{"rev":"5-5a7d7f36d09893df96441be8b09e41d6"}}, -{"id":"dhcpjs","key":"dhcpjs","value":{"rev":"3-1bc01bd612f3ab1fce178c979aa34e43"}}, -{"id":"dht","key":"dht","value":{"rev":"3-40c0b909b6c0e2305e19d10cea1881b0"}}, -{"id":"dht-bencode","key":"dht-bencode","value":{"rev":"5-88a1da8de312a54097507d72a049f0f3"}}, -{"id":"dialect","key":"dialect","value":{"rev":"18-db7928ce4756eea35db1732d4f2ebc88"}}, -{"id":"dialect-http","key":"dialect-http","value":{"rev":"19-23a927d28cb43733dbd05294134a5b8c"}}, -{"id":"dicks","key":"dicks","value":{"rev":"11-ba64897899e336d366ffd4b68cac99f5"}}, -{"id":"diff","key":"diff","value":{"rev":"13-1a88acb0369ab8ae096a2323d65a2811"}}, -{"id":"diff_match_patch","key":"diff_match_patch","value":{"rev":"8-2f6f467e483b23b217a2047e4aded850"}}, -{"id":"diffbot","key":"diffbot","value":{"rev":"3-8cb8e34af89cb477a5da52e3fd9a13f7"}}, -{"id":"digest","key":"digest","value":{"rev":"7-bc6fb9e68c83197381b0d9ac7db16c1c"}}, -{"id":"dir","key":"dir","value":{"rev":"7-574462bb241a39eeffe6c5184d40c57a"}}, -{"id":"dir-watcher","key":"dir-watcher","value":{"rev":"31-1a3ca4d6aa8aa32c619efad5fbfce494"}}, -{"id":"dir2html","key":"dir2html","value":{"rev":"5-b4bfb2916c2d94c85aa75ffa29ad1af4"}}, -{"id":"directive","key":"directive","value":{"rev":"3-3373f02b8762cb1505c8f8cbcc50d3d4"}}, -{"id":"dirsum","key":"dirsum","value":{"rev":"5-8545445faaa41d2225ec7ff226a10750"}}, -{"id":"dirty","key":"dirty","value":{"rev":"13-d636ea0d1ed35560c0bc7272965c1a6f"}}, -{"id":"dirty-uuid","key":"dirty-uuid","value":{"rev":"5-65acdfda886afca65ae52f0ac21ce1b2"}}, -{"id":"discogs","key":"discogs","value":{"rev":"21-839410e6bf3bee1435ff837daaeaf9f8"}}, -{"id":"discount","key":"discount","value":{"rev":"13-a8fb2a8f668ac0a55fffada1ea94a4b7"}}, -{"id":"discovery","key":"discovery","value":{"rev":"3-46f4496224d132e56cbc702df403219d"}}, -{"id":"diskcache","key":"diskcache","value":{"rev":"23-7b14ad41fc199184fb939828e9122099"}}, -{"id":"dispatch","key":"dispatch","value":{"rev":"6-e72cc7b2bcc97faf897ae4e4fa3ec681"}}, -{"id":"distribute.it","key":"distribute.it","value":{"rev":"12-0978757eb25d22117af675806cf6eef2"}}, -{"id":"dive","key":"dive","value":{"rev":"21-9cbd1281c5a3c2dae0cc0407863f3336"}}, -{"id":"diveSync","key":"diveSync","value":{"rev":"3-015ec4803903106bf24cb4f17cedee68"}}, -{"id":"dk-assets","key":"dk-assets","value":{"rev":"3-25d9b6ac727caf1e227e6436af835d03"}}, -{"id":"dk-core","key":"dk-core","value":{"rev":"3-0b6a2f4dfc0484a3908159a897920bae"}}, -{"id":"dk-couchdb","key":"dk-couchdb","value":{"rev":"3-cc9ef511f9ed46be9d7099f10b1ee776"}}, -{"id":"dk-model","key":"dk-model","value":{"rev":"3-3a61006be57d304724c049e4dcf2fc9b"}}, -{"id":"dk-model-couchdb","key":"dk-model-couchdb","value":{"rev":"3-5163def21660db8428e623909bbfcb4d"}}, -{"id":"dk-routes","key":"dk-routes","value":{"rev":"3-4563357f850248d7d0fb37f9bdcb893b"}}, -{"id":"dk-server","key":"dk-server","value":{"rev":"3-9aef13fc5814785c9805b26828e8d114"}}, -{"id":"dk-template","key":"dk-template","value":{"rev":"3-809c94776252441129705fbe1d93e752"}}, -{"id":"dk-transport","key":"dk-transport","value":{"rev":"3-9271da6f86079027535179b743d0d4c3"}}, -{"id":"dk-websockets","key":"dk-websockets","value":{"rev":"3-426b44c04180d6caf7cf765f03fc52c2"}}, -{"id":"dnet-index-proxy","key":"dnet-index-proxy","value":{"rev":"51-1f3cf4f534c154369d5e774a8f599106"}}, -{"id":"dnode","key":"dnode","value":{"rev":"129-68db10c25c23d635dc828aa698d1279e"}}, -{"id":"dnode-ez","key":"dnode-ez","value":{"rev":"17-75877eab5cf3976b8876c49afd2f7e38"}}, -{"id":"dnode-protocol","key":"dnode-protocol","value":{"rev":"23-fb28f8e1180e6aa44fa564e0d55b3d1e"}}, -{"id":"dnode-smoothiecharts","key":"dnode-smoothiecharts","value":{"rev":"3-d1483028e5768527c2786b9ed5d76463"}}, -{"id":"dnode-stack","key":"dnode-stack","value":{"rev":"9-c1ad8ce01282ce4fa72b5993c580e58e"}}, -{"id":"dnode-worker","key":"dnode-worker","value":{"rev":"3-4c73c0d7ed225197fd8fb0555eaf1152"}}, -{"id":"dns-server","key":"dns-server","value":{"rev":"3-4858a1773da514fea68eac6d9d39f69e"}}, -{"id":"dns-srv","key":"dns-srv","value":{"rev":"12-867c769437fa0ad8a83306aa9e2a158e"}}, -{"id":"doc","key":"doc","value":{"rev":"5-2c077b3fd3b6efa4e927b66f1390e4ea"}}, -{"id":"doc.md","key":"doc.md","value":{"rev":"7-8e8e51be4956550388699222b2e039e7"}}, -{"id":"docco","key":"docco","value":{"rev":"18-891bde1584809c3b1f40fef9961b4f28"}}, -{"id":"docdown","key":"docdown","value":{"rev":"5-fcf5be2ab6ceaed76c1980b462359057"}}, -{"id":"docket","key":"docket","value":{"rev":"13-a4969e0fb17af8dba7df178e364161c2"}}, -{"id":"docpad","key":"docpad","value":{"rev":"77-a478ac8c7ac86e304f9213380ea4b550"}}, -{"id":"docs","key":"docs","value":{"rev":"3-6b1fae9738a3327a3a3be826c0981c3a"}}, -{"id":"dojo-node","key":"dojo-node","value":{"rev":"13-e0dc12e9ce8ab3f40b228c2af8c41064"}}, -{"id":"dom","key":"dom","value":{"rev":"3-cecd9285d0d5b1cab0f18350aac1b2b0"}}, -{"id":"dom-js","key":"dom-js","value":{"rev":"8-dd20e8b23028f4541668501650b52a71"}}, -{"id":"dom-js-ns","key":"dom-js-ns","value":{"rev":"3-787567fc1d6f4ca7e853215a4307b593"}}, -{"id":"domjs","key":"domjs","value":{"rev":"3-d2d05a20dccb57fb6db7da08916c6c0f"}}, -{"id":"doml","key":"doml","value":{"rev":"11-c3b49c50906d9875b546413e4acd1b38"}}, -{"id":"domo","key":"domo","value":{"rev":"3-a4321e6c0c688f773068365b44b08b6b"}}, -{"id":"domready","key":"domready","value":{"rev":"46-21c6b137bbed79ddbff31fdf0ef7d61f"}}, -{"id":"donkey","key":"donkey","value":{"rev":"3-1454aa878654886e8495ebb060aa10f7"}}, -{"id":"dot","key":"dot","value":{"rev":"19-b6d2d53cb9ae1a608a0956aeb8092578"}}, -{"id":"dotaccess","key":"dotaccess","value":{"rev":"13-63ddef6740e84f4517f7dd1bb0d68c56"}}, -{"id":"douche","key":"douche","value":{"rev":"3-6a200f908ccfc9ae549e80209e117cbf"}}, -{"id":"dox","key":"dox","value":{"rev":"10-856cc6bf3dc7c44e028173fea8323c24"}}, -{"id":"drag","key":"drag","value":{"rev":"9-00f27e241269c3df1d71e45b698e9b3b"}}, -{"id":"drain","key":"drain","value":{"rev":"3-8827a0ee7ed74b948bf56d5a33455fc8"}}, -{"id":"drawback","key":"drawback","value":{"rev":"74-dd356b3e55175525317e53c24979a431"}}, -{"id":"drev","key":"drev","value":{"rev":"9-43529419a69529dd7af9a83985aab1f2"}}, -{"id":"drews-mixins","key":"drews-mixins","value":{"rev":"17-63373bae6525859bddfc8d6ad19bdb06"}}, -{"id":"drnu","key":"drnu","value":{"rev":"3-b9b14b2241ded1e52a92fc4225b4ddc5"}}, -{"id":"dropbox","key":"dropbox","value":{"rev":"19-2cb7a40d253621fdfa96f23b96e42ecb"}}, -{"id":"drtoms-nodehelpers","key":"drtoms-nodehelpers","value":{"rev":"3-be0a75cdd7c2d49b1ec4ad1d2c3bc911"}}, -{"id":"drty","key":"drty","value":{"rev":"3-56eabd39b9badfa0af601c5cc64cee2c"}}, -{"id":"drty-facebook","key":"drty-facebook","value":{"rev":"3-fd07af7fb87d7f1d35e13f458a02c127"}}, -{"id":"drumkit","key":"drumkit","value":{"rev":"3-f3cdacef51453d3ac630759aff2a8b58"}}, -{"id":"drupal","key":"drupal","value":{"rev":"13-13835b1e1c8a0e8f0b0e8479640a8d7e"}}, -{"id":"dryice","key":"dryice","value":{"rev":"15-9990fdbde5475a8dbdcc055cb08d654d"}}, -{"id":"dryml","key":"dryml","value":{"rev":"33-483ff8cc3ab1431790cc2587c0bce989"}}, -{"id":"ds","key":"ds","value":{"rev":"9-743274a1d0143927851af07ff0f86d8d"}}, -{"id":"dt","key":"dt","value":{"rev":"3-ab59016f28e182c763b78ba49a59191c"}}, -{"id":"dtl","key":"dtl","value":{"rev":"11-415b4aeec93f096523569615e80f1be1"}}, -{"id":"dtrace-provider","key":"dtrace-provider","value":{"rev":"12-7f01510bd2b1d543f11e3dc02d98ab69"}}, -{"id":"dtrejo","key":"dtrejo","value":{"rev":"3-85f5bb2b9faec499e6aa77fe22e6e3ec"}}, -{"id":"dude","key":"dude","value":{"rev":"3-006528c1efd98312991273ba6ee45f7b"}}, -{"id":"dunce","key":"dunce","value":{"rev":"3-fa4fa5cafdfd1d86c650746f60b7bc0e"}}, -{"id":"duostack","key":"duostack","value":{"rev":"15-47824bdf6e32f49f64014e75421dc42e"}}, -{"id":"duplex-stream","key":"duplex-stream","value":{"rev":"3-2d0e12876e7ad4e5d3ea5520dcbad861"}}, -{"id":"durilka","key":"durilka","value":{"rev":"15-54400496515c8625e8bedf19f8a41cad"}}, -{"id":"dust","key":"dust","value":{"rev":"18-9bc9cae2e48c54f4389e9fce5dfc021e"}}, -{"id":"dustfs","key":"dustfs","value":{"rev":"5-944770c24f06989f3fc62427f2ddebc4"}}, -{"id":"dx","key":"dx","value":{"rev":"3-6000afd60be07d9ff91e7231a388f22f"}}, -{"id":"dynamic","key":"dynamic","value":{"rev":"3-33b83464ed56eb33c052a13dfb709c9c"}}, -{"id":"dynobj","key":"dynobj","value":{"rev":"5-3eb168dae1f9c20369fa1d5ae45f9021"}}, -{"id":"each","key":"each","value":{"rev":"3-5063799b0afcbb61378b1d605660a864"}}, -{"id":"ears","key":"ears","value":{"rev":"11-e77cd2b865409be7ba2e072e98b1c8a1"}}, -{"id":"easey","key":"easey","value":{"rev":"3-a380d8d945e03f55732ae8769cd6dbbf"}}, -{"id":"easy","key":"easy","value":{"rev":"3-73b836a34beafa31cdd8129fe158bf6e"}}, -{"id":"easy-oauth","key":"easy-oauth","value":{"rev":"5-2c1db698e61d77f99633042113099528"}}, -{"id":"easyfs","key":"easyfs","value":{"rev":"3-b807671a77c2a8cc27a9f1aa20ff74c0"}}, -{"id":"easyhash","key":"easyhash","value":{"rev":"3-2eeb24098bc4d201766dcc92dc7325f7"}}, -{"id":"easyrss","key":"easyrss","value":{"rev":"9-1687a54348670ef9ca387ea7ec87f0be"}}, -{"id":"ebnf-diagram","key":"ebnf-diagram","value":{"rev":"3-704e4605bf933b281a6821259a531055"}}, -{"id":"ec2","key":"ec2","value":{"rev":"22-25e562ae8898807c7b4c696c809cf387"}}, -{"id":"echo","key":"echo","value":{"rev":"19-75c2421f623ecc9fe2771f3658589ce8"}}, -{"id":"eco","key":"eco","value":{"rev":"14-b4db836928c91cbf22628cc65ca94f56"}}, -{"id":"ed","key":"ed","value":{"rev":"3-bed9b8225e83a02241d48254077a7df4"}}, -{"id":"edate","key":"edate","value":{"rev":"3-5ec1441ffe3b56d5d01561003b9844f2"}}, -{"id":"eden","key":"eden","value":{"rev":"35-9aa2ff880c2d4f45e3da881b15e58d0a"}}, -{"id":"eio","key":"eio","value":{"rev":"5-e6dd895635596d826ccdf4439761d5fa"}}, -{"id":"ejs","key":"ejs","value":{"rev":"30-c7b020b6cb8ee2626f47db21fc5fedb4"}}, -{"id":"ejs-ext","key":"ejs-ext","value":{"rev":"15-820393685191bbed37938acb7af5885e"}}, -{"id":"elastical","key":"elastical","value":{"rev":"3-c652af043bc4256a29a87e3de9b78093"}}, -{"id":"elasticsearchclient","key":"elasticsearchclient","value":{"rev":"33-bcb59deb7d9d56737a6946c56830ae6b"}}, -{"id":"elastiseahclient","key":"elastiseahclient","value":{"rev":"3-c4e525605859e249f04fb07d31739002"}}, -{"id":"elementtree","key":"elementtree","value":{"rev":"3-ef2017fe67ae425253de911c2f219d31"}}, -{"id":"elf-logger","key":"elf-logger","value":{"rev":"6-98d61588cfc171611568cf86004aa2e1"}}, -{"id":"elk","key":"elk","value":{"rev":"25-8b92241d0218c6593a7dc8a8cc69b7ce"}}, -{"id":"elucidata-build-tools","key":"elucidata-build-tools","value":{"rev":"7-0ad3de708aaac2eebfcfce273bfe6edf"}}, -{"id":"email","key":"email","value":{"rev":"16-110ae6a99ab3e37f4edd9357c03d78c2"}}, -{"id":"email-verificationtoken","key":"email-verificationtoken","value":{"rev":"7-ef37672bc6e9ee806ecc22fd5257ae03"}}, -{"id":"emailjs","key":"emailjs","value":{"rev":"31-0dd24f9aba8d96e9493e55e8345f3d21"}}, -{"id":"embedly","key":"embedly","value":{"rev":"21-47838d8015e9b927c56a7bd52c52e4fc"}}, -{"id":"emile","key":"emile","value":{"rev":"11-05d4715964b5bf2e1fd98096cb7ccc83"}}, -{"id":"emit.io","key":"emit.io","value":{"rev":"3-faacb1c30bb92c06a55a44bb027a9475"}}, -{"id":"emre","key":"emre","value":{"rev":"3-5686f4782f1f5171fff83b662ce68802"}}, -{"id":"encrypt","key":"encrypt","value":{"rev":"3-77e2e2007b452f7fcdfa9e8696a188f5"}}, -{"id":"ender","key":"ender","value":{"rev":"95-89b8c6ccfcaf3eb56f5dbe48bf3c2e24"}}, -{"id":"ender-dragdealer","key":"ender-dragdealer","value":{"rev":"9-e12bb3492614f20fe5781f20e3bb17dc"}}, -{"id":"ender-fermata","key":"ender-fermata","value":{"rev":"3-e52d772042852408ae070b361c247068"}}, -{"id":"ender-fittext","key":"ender-fittext","value":{"rev":"5-e46f5a384d790ea6f65a5f8b9e43bac6"}}, -{"id":"ender-flowplayer","key":"ender-flowplayer","value":{"rev":"3-87267072fb566112315254fdf6547500"}}, -{"id":"ender-js","key":"ender-js","value":{"rev":"80-aa18576f782e3aa14c2ba7ba05658a30"}}, -{"id":"ender-json","key":"ender-json","value":{"rev":"3-5606608389aef832e4d4ecaa6c088a94"}}, -{"id":"ender-lettering","key":"ender-lettering","value":{"rev":"3-6fc6ad3869fad6374a1de69ba4e9301d"}}, -{"id":"ender-modules","key":"ender-modules","value":{"rev":"5-2bbb354d6219b5e13e6c897c562b8c83"}}, -{"id":"ender-poke","key":"ender-poke","value":{"rev":"5-3afa2fd690ebc4f2d75125b2c57e2a43"}}, -{"id":"ender-test","key":"ender-test","value":{"rev":"5-f8e90a951e5ad58199e53645067fad0c"}}, -{"id":"ender-tipsy","key":"ender-tipsy","value":{"rev":"5-cefd04c5d89707dfe31023702328d417"}}, -{"id":"ender-tween","key":"ender-tween","value":{"rev":"13-035312bb47bb3d29e7157932d4d29dcb"}}, -{"id":"ender-vows","key":"ender-vows","value":{"rev":"5-d48e088816d71779a80a74c43cd61b80"}}, -{"id":"ender-wallet","key":"ender-wallet","value":{"rev":"21-93723cd24fbf14d0f58f2ee41df9910d"}}, -{"id":"endtable","key":"endtable","value":{"rev":"36-8febf1be0120d867f9ff90e5c5058ef9"}}, -{"id":"enhance-css","key":"enhance-css","value":{"rev":"7-ae1cf6dee7d3116103781edaa7d47ba4"}}, -{"id":"ensure","key":"ensure","value":{"rev":"27-47e0874d1823188965a02a41abb61739"}}, -{"id":"ent","key":"ent","value":{"rev":"9-51924cd76fabcc4a244db66d65d48eff"}}, -{"id":"entropy","key":"entropy","value":{"rev":"17-84bfbbc0689b3b55e4fa3881888f0c12"}}, -{"id":"enumerable","key":"enumerable","value":{"rev":"3-d31bfcaca3b53eacc9ce09983efffe35"}}, -{"id":"envious","key":"envious","value":{"rev":"3-08d1e6d9c25c4e2350a0dd6759a27426"}}, -{"id":"environ","key":"environ","value":{"rev":"5-6f78def4743dfbeb77c1cb62d41eb671"}}, -{"id":"epub","key":"epub","value":{"rev":"3-5c3604eab851bce0a6ac66db6a6ce77a"}}, -{"id":"erlang","key":"erlang","value":{"rev":"3-3bd8e8e8ed416a32567475d984028b65"}}, -{"id":"err","key":"err","value":{"rev":"11-61d11f26b47d29ef819136214830f24c"}}, -{"id":"errbacker","key":"errbacker","value":{"rev":"5-0ad6d62207abb9822118ae69d0b9181d"}}, -{"id":"es5","key":"es5","value":{"rev":"3-5497cb0c821f3e17234c09ab0e67e1de"}}, -{"id":"es5-basic","key":"es5-basic","value":{"rev":"9-2ff708ae54ae223923cb810f799bfb2d"}}, -{"id":"es5-ext","key":"es5-ext","value":{"rev":"21-04537d704412a631596beeba4d534b33"}}, -{"id":"es5-shim","key":"es5-shim","value":{"rev":"34-3c4c40a6dab9ff137d1a7d4349d72c5b"}}, -{"id":"es5-shimify","key":"es5-shimify","value":{"rev":"3-f85700407e9c129d22b45c15700c82f1"}}, -{"id":"esc","key":"esc","value":{"rev":"5-42911775f391330f361105b8a0cefe47"}}, -{"id":"escaperoute","key":"escaperoute","value":{"rev":"18-e1372f35e6dcdb353b8c11e3c7e2f3b4"}}, -{"id":"escort","key":"escort","value":{"rev":"27-bf43341e15d565c9f67dd3300dc57734"}}, -{"id":"escrito","key":"escrito","value":{"rev":"5-c39d5b373486327b2e13670f921a2c7b"}}, -{"id":"esl","key":"esl","value":{"rev":"9-562ff6239a3b9910989bdf04746fa9d1"}}, -{"id":"espresso","key":"espresso","value":{"rev":"75-4c3692f1e92ea841e2d04338f4f2432e"}}, -{"id":"esproxy","key":"esproxy","value":{"rev":"7-be629dc6e1428f0fdb22fdbe7ab2ee99"}}, -{"id":"etch-a-sketch","key":"etch-a-sketch","value":{"rev":"3-a4e23b8e9f298d4844d6bff0a9688e53"}}, -{"id":"etherpad-lite-client","key":"etherpad-lite-client","value":{"rev":"55-58ca439a697db64ee66652da2d327fcb"}}, -{"id":"etsy","key":"etsy","value":{"rev":"5-1b795b360c28261f11c07d849637047c"}}, -{"id":"eve","key":"eve","value":{"rev":"3-16e72b336a1f354f4dfc8fa783fa2e72"}}, -{"id":"event-emitter","key":"event-emitter","value":{"rev":"5-15fe3e2e19b206929b815909737b15ac"}}, -{"id":"event-queue","key":"event-queue","value":{"rev":"12-200cd3bcd8e0b35bc4b15c1d8b6161e2"}}, -{"id":"event-stream","key":"event-stream","value":{"rev":"15-811a6329b5820d998731a604accf83db"}}, -{"id":"eventable","key":"eventable","value":{"rev":"3-08e9cd94a9aae280f406d043039e545e"}}, -{"id":"eventbrite","key":"eventbrite","value":{"rev":"13-cac3c9bda2da1c7b115de04264bb440f"}}, -{"id":"evented","key":"evented","value":{"rev":"6-ade6271c40a19aab6c4e3bb18b0987b6"}}, -{"id":"evented-twitter","key":"evented-twitter","value":{"rev":"6-3ebb7327022d6d6a8c49d684febb236b"}}, -{"id":"eventedsocket","key":"eventedsocket","value":{"rev":"59-cd2158c47b676a58ca3064a42c5274f7"}}, -{"id":"eventemitter","key":"eventemitter","value":{"rev":"5-7766fd7ebc44d52efbd0e7088e2321ec"}}, -{"id":"eventemitter2","key":"eventemitter2","value":{"rev":"41-927ce7996d4056a21f543e1f928f9699"}}, -{"id":"eventful","key":"eventful","value":{"rev":"7-9505f3c621f50addf02a457cfcc8ae78"}}, -{"id":"eventhub","key":"eventhub","value":{"rev":"15-5390d210a4d3ba079dd6e26bda652caa"}}, -{"id":"eventpipe","key":"eventpipe","value":{"rev":"7-41f0f93a9dcea477f08782af28e5b0f1"}}, -{"id":"events","key":"events","value":{"rev":"12-e3ead8eac62799cb299c139687135289"}}, -{"id":"events.io","key":"events.io","value":{"rev":"3-56c6955024cbb1765a1f9f37d8a739a4"}}, -{"id":"events.node","key":"events.node","value":{"rev":"3-e072f9c457fd8a3882ccd41ce52c5d00"}}, -{"id":"eventstream","key":"eventstream","value":{"rev":"5-a578a3a2a62d50631b3fb4d44a058bd1"}}, -{"id":"eventvat","key":"eventvat","value":{"rev":"3-e26d7fe8a226c7bc7f9e55abf1630e9c"}}, -{"id":"everyauth","key":"everyauth","value":{"rev":"107-a621f3028a230f9f3ade6a4e729a9a38"}}, -{"id":"ewdDOM","key":"ewdDOM","value":{"rev":"7-28188ec27fe011bf7fcb330a5fc90b55"}}, -{"id":"ewdGateway","key":"ewdGateway","value":{"rev":"7-81fe5ec1a3e920894b560fbf96160258"}}, -{"id":"exceptional","key":"exceptional","value":{"rev":"5-5842d306b2cf084c4e7c2ecb1d715280"}}, -{"id":"exceptional-node","key":"exceptional-node","value":{"rev":"5-3385b42af0a6ea8a943cb686d5789b0c"}}, -{"id":"executor","key":"executor","value":{"rev":"3-aee4f949a4d140a439965e137200c4fb"}}, -{"id":"exif","key":"exif","value":{"rev":"3-da6fd2bd837633f673b325231c164a0f"}}, -{"id":"expanda","key":"expanda","value":{"rev":"3-dcbc59c5db0017d25748ec8094aeeb0a"}}, -{"id":"express","key":"express","value":{"rev":"157-24ef0cdd4ba6c6697c66f3e78bc777bb"}}, -{"id":"express-aid","key":"express-aid","value":{"rev":"21-6d3831e93b823f800e6a22eb08aa41d6"}}, -{"id":"express-app-bootstrap","key":"express-app-bootstrap","value":{"rev":"3-4b5a256bef5ca3bd41b0958f594907b9"}}, -{"id":"express-asset","key":"express-asset","value":{"rev":"3-7d5e23bc753851c576e429e7901301d9"}}, -{"id":"express-blocks","key":"express-blocks","value":{"rev":"7-305b6e046355c8e7a4bb0f1f225092ef"}}, -{"id":"express-cache","key":"express-cache","value":{"rev":"5-eebbea6c0e5db5fd4c12847933c853e1"}}, -{"id":"express-chromeframe","key":"express-chromeframe","value":{"rev":"5-1bb72d30b7a1f00d3eaf248285942d5e"}}, -{"id":"express-coffee","key":"express-coffee","value":{"rev":"39-14eff195c9352c6c3898befb3d613807"}}, -{"id":"express-config","key":"express-config","value":{"rev":"3-27ea0d27e20afa9ece375878aab846ed"}}, -{"id":"express-configure","key":"express-configure","value":{"rev":"7-46bd636c0b56dfcfa4f1ee46b43d6ca0"}}, -{"id":"express-contrib","key":"express-contrib","value":{"rev":"20-472c93fefe0a9a6440a76b2c843b2e0e"}}, -{"id":"express-controllers","key":"express-controllers","value":{"rev":"3-296d54f3b5bf26bfa057cd8c5f0a11ea"}}, -{"id":"express-controllers-new","key":"express-controllers-new","value":{"rev":"15-11f73e4a8ab935987a3b8f132d80afa5"}}, -{"id":"express-cross-site","key":"express-cross-site","value":{"rev":"11-b76814fdd58a616b3cafe6e97f3c7c98"}}, -{"id":"express-csrf","key":"express-csrf","value":{"rev":"20-2a79f0fdc65ed91120e7417a5cf8ce6c"}}, -{"id":"express-custom-errors","key":"express-custom-errors","value":{"rev":"6-bd131169ccac73fa3766195147e34404"}}, -{"id":"express-dialect","key":"express-dialect","value":{"rev":"34-1fbc5baf7ea464abbadcfaf3c1971660"}}, -{"id":"express-dust","key":"express-dust","value":{"rev":"5-33a1d8dd9c113d6fb8f1818c8a749c1b"}}, -{"id":"express-expose","key":"express-expose","value":{"rev":"7-f8757d8bf8d3fac8395ee8ce5117a895"}}, -{"id":"express-extras","key":"express-extras","value":{"rev":"6-53c7bfc68a41043eb5e11321673a2c48"}}, -{"id":"express-form","key":"express-form","value":{"rev":"27-533598a1bd5a0e9b8d694f5b38228c6c"}}, -{"id":"express-helpers","key":"express-helpers","value":{"rev":"3-7b9123b0ea6b840bb5a6e4da9c28308c"}}, -{"id":"express-livejade","key":"express-livejade","value":{"rev":"9-1320996d4ed3db352a2c853226880a17"}}, -{"id":"express-logger","key":"express-logger","value":{"rev":"5-c485b1020742310a313cac87abdde67b"}}, -{"id":"express-messages","key":"express-messages","value":{"rev":"5-f6225b906d0ac33ba1bfc5409b227edb"}}, -{"id":"express-messages-bootstrap","key":"express-messages-bootstrap","value":{"rev":"5-fb8fc70c1cbd6df0e07b2e0148bdf8bf"}}, -{"id":"express-mongoose","key":"express-mongoose","value":{"rev":"29-2d6907a23c8c3bbfdf9b6f9b6b3c00e3"}}, -{"id":"express-mvc-bootstrap","key":"express-mvc-bootstrap","value":{"rev":"15-c53ecb696af1d34ff94efe5ab5d89287"}}, -{"id":"express-namespace","key":"express-namespace","value":{"rev":"7-d209feb707821b06426aed233295df75"}}, -{"id":"express-on-railway","key":"express-on-railway","value":{"rev":"7-784b533cbf29930d04039bafb2c03cc0"}}, -{"id":"express-params","key":"express-params","value":{"rev":"3-13f0ed9c17d10fd01d1ff869e625c91f"}}, -{"id":"express-resource","key":"express-resource","value":{"rev":"13-cca556327152588a87112c6bf2613bc9"}}, -{"id":"express-rewrite","key":"express-rewrite","value":{"rev":"7-c76ca2616eb6e70209ace6499f5b961a"}}, -{"id":"express-route-util","key":"express-route-util","value":{"rev":"9-4b7bad7e8ab3bf71daf85362b47ec8be"}}, -{"id":"express-rpx","key":"express-rpx","value":{"rev":"9-54d48f5e24174500c73f07d97a7d3f9f"}}, -{"id":"express-session-mongo","key":"express-session-mongo","value":{"rev":"3-850cf5b42f65a6f27af6edf1ad1aa966"}}, -{"id":"express-session-mongo-russp","key":"express-session-mongo-russp","value":{"rev":"7-441e8afcd466a4cbb5e65a1949190f97"}}, -{"id":"express-session-redis","key":"express-session-redis","value":{"rev":"6-5f4f16092a0706d2daef89470d6971e6"}}, -{"id":"express-share","key":"express-share","value":{"rev":"5-f5327a97738e9c8e6e05a51cb7153f82"}}, -{"id":"express-spdy","key":"express-spdy","value":{"rev":"11-2634f388338c45b2d6f020d2a6739ba1"}}, -{"id":"express-template-override","key":"express-template-override","value":{"rev":"5-758cf2eb0c9cbc32f205c4ba2ece24f9"}}, -{"id":"express-trace","key":"express-trace","value":{"rev":"5-ba59571f8881e02e2b297ed9ffb4e48c"}}, -{"id":"express-unstable","key":"express-unstable","value":{"rev":"3-06467336e1610ba9915401df26c936c1"}}, -{"id":"express-validate","key":"express-validate","value":{"rev":"15-b63bd9b18fadfc2345d0a10a7a2fb2e7"}}, -{"id":"express-view-helpers","key":"express-view-helpers","value":{"rev":"7-4d07ba11f81788783c6f9fd48fdf8834"}}, -{"id":"express-with-ease","key":"express-with-ease","value":{"rev":"3-604d9176a4a03f9f7c74679604c7bbf9"}}, -{"id":"express-wormhole","key":"express-wormhole","value":{"rev":"3-7e06cf63b070e0f54b2aa71b48db9a40"}}, -{"id":"expresso","key":"expresso","value":{"rev":"79-a27b6ef2f9e7bb9f85da34f728d124a8"}}, -{"id":"expressobdd","key":"expressobdd","value":{"rev":"5-e8cae7a17a9e8c1779c08abedc674e03"}}, -{"id":"ext","key":"ext","value":{"rev":"6-8790c06324c5f057b1713ba420e8bf27"}}, -{"id":"extend","key":"extend","value":{"rev":"3-934d0de77bbaefb1b52ec18a17f46d7d"}}, -{"id":"extendables","key":"extendables","value":{"rev":"11-e4db9b62a4047e95fb4d7f88e351a14e"}}, -{"id":"extjs-node","key":"extjs-node","value":{"rev":"3-2b2033dbbf0b99d41e876498886b0995"}}, -{"id":"extractcontent","key":"extractcontent","value":{"rev":"6-ad70764c834ecd3414cbc15dbda317c3"}}, -{"id":"extractor","key":"extractor","value":{"rev":"9-f95bde04bb8db37350c9cc95c5578c03"}}, -{"id":"extx-layout","key":"extx-layout","value":{"rev":"3-f6bbc3a923ebce17f62cbf382b096ac7"}}, -{"id":"extx-reference-slot","key":"extx-reference-slot","value":{"rev":"14-b1b92573492f7239144693ee9e1d1aac"}}, -{"id":"extx-shotenjin","key":"extx-shotenjin","value":{"rev":"5-c641121ba57fb960d8db766511ecf6cd"}}, -{"id":"eyes","key":"eyes","value":{"rev":"16-fab6b201646fb12986e396c33a7cd428"}}, -{"id":"f","key":"f","value":{"rev":"3-23b73ffafbe5b56b6a0736db6a7256a6"}}, -{"id":"f-core","key":"f-core","value":{"rev":"3-9a6898e007acf48d956f0a70ff07a273"}}, -{"id":"f7u12rl","key":"f7u12rl","value":{"rev":"3-7b5e15d106db8b7f8784b27f7d2c9bdc"}}, -{"id":"fab","key":"fab","value":{"rev":"10-149dec0b653ce481af013c63fec125e8"}}, -{"id":"fab.accept","key":"fab.accept","value":{"rev":"6-d6b08e7054d823906c6c64c92b008d3a"}}, -{"id":"fab.static","key":"fab.static","value":{"rev":"6-5bdb6db53223bb5203ba91a5b2b87566"}}, -{"id":"fabric","key":"fabric","value":{"rev":"15-30e99e486c58962c049bea54e00b7cb9"}}, -{"id":"face-detect","key":"face-detect","value":{"rev":"3-d4d3f1a894c807f79ba541d2f2ed630d"}}, -{"id":"facebook","key":"facebook","value":{"rev":"17-e241999000e34aed62ee0f9f358bfd06"}}, -{"id":"facebook-api","key":"facebook-api","value":{"rev":"5-cb9d07b2eba18d8fb960768d69f80326"}}, -{"id":"facebook-client","key":"facebook-client","value":{"rev":"17-84c106420b183ca791b0c80fd8c3fe00"}}, -{"id":"facebook-connect","key":"facebook-connect","value":{"rev":"6-471f28bb12928e32610d02c0b03aa972"}}, -{"id":"facebook-express","key":"facebook-express","value":{"rev":"11-6e6d98b8252907b05c41aac7e0418f4e"}}, -{"id":"facebook-graph","key":"facebook-graph","value":{"rev":"9-c92149825fef42ad76bcffdd232cc9a5"}}, -{"id":"facebook-graph-client","key":"facebook-graph-client","value":{"rev":"10-c3136a2b2e5c5d80b78404a4102af7b5"}}, -{"id":"facebook-js","key":"facebook-js","value":{"rev":"22-dd9d916550ebccb71e451acbd7a4b315"}}, -{"id":"facebook-realtime-graph","key":"facebook-realtime-graph","value":{"rev":"6-c4fe01ac036585394cd59f01c6fc7df1"}}, -{"id":"facebook-sdk","key":"facebook-sdk","value":{"rev":"21-77daf7eba51bb913e54381995718e13d"}}, -{"id":"facebook-session-cookie","key":"facebook-session-cookie","value":{"rev":"9-70e14cac759dacadacb0af17387ab230"}}, -{"id":"facebook-signed-request","key":"facebook-signed-request","value":{"rev":"5-11cb36123a94e37fff6a7efd6f7d88b9"}}, -{"id":"facebook.node","key":"facebook.node","value":{"rev":"3-f6760795e71c1d5734ae34f9288d02be"}}, -{"id":"factory-worker","key":"factory-worker","value":{"rev":"7-1c365b3dd92b12573d00c08b090e01ae"}}, -{"id":"fake","key":"fake","value":{"rev":"25-2d1ae2299168d95edb8d115fb7961c8e"}}, -{"id":"fake-queue","key":"fake-queue","value":{"rev":"7-d6970de6141c1345c6ad3cd1586cfe7b"}}, -{"id":"fakedb","key":"fakedb","value":{"rev":"34-889fb5c9fa328b536f9deb138ff125b1"}}, -{"id":"fakeweb","key":"fakeweb","value":{"rev":"3-7fb1394b4bac70f9ab26e60b1864b41f"}}, -{"id":"fanfeedr","key":"fanfeedr","value":{"rev":"22-de3d485ad60c8642eda260afe5620973"}}, -{"id":"fantomex","key":"fantomex","value":{"rev":"3-79b26bcf9aa365485ed8131c474bf6f8"}}, -{"id":"far","key":"far","value":{"rev":"19-c8d9f1e8bc12a31cb27bef3ed44759ce"}}, -{"id":"farm","key":"farm","value":{"rev":"31-ab77f7f48b24bf6f0388b926d2ac370b"}}, -{"id":"fast-detective","key":"fast-detective","value":{"rev":"5-b0b6c8901458f3f07044d4266db0aa52"}}, -{"id":"fast-msgpack-rpc","key":"fast-msgpack-rpc","value":{"rev":"7-b2dfd3d331459382fe1e8166288ffef6"}}, -{"id":"fast-or-slow","key":"fast-or-slow","value":{"rev":"13-4118190cd6a0185af8ea9b381ee2bc98"}}, -{"id":"fast-stats","key":"fast-stats","value":{"rev":"3-15cdd56d9efa38f08ff20ca731867d4d"}}, -{"id":"fastcgi-stream","key":"fastcgi-stream","value":{"rev":"5-99c0c4dfc7a874e1af71e5ef3ac95ba4"}}, -{"id":"faye","key":"faye","value":{"rev":"30-49b7d05534c35527972a4d5e07ac8895"}}, -{"id":"faye-service","key":"faye-service","value":{"rev":"3-bad8bf6722461627eac7d0141e09b3f7"}}, -{"id":"fe-fu","key":"fe-fu","value":{"rev":"21-f3cb04870621ce40da8ffa009686bdeb"}}, -{"id":"feed-tables","key":"feed-tables","value":{"rev":"9-4410bad138f4df570e7be37bb17209b3"}}, -{"id":"feedBum","key":"feedBum","value":{"rev":"3-b4ff9edffb0c5c33c4ed40f60a12611a"}}, -{"id":"feedparser","key":"feedparser","value":{"rev":"5-eb2c32e00832ed7036eb1b87d2eea33e"}}, -{"id":"feral","key":"feral","value":{"rev":"19-0b512b6301a26ca5502710254bd5a9ba"}}, -{"id":"fermata","key":"fermata","value":{"rev":"25-eeafa3e5b769a38b8a1065c0a66e0653"}}, -{"id":"ferret","key":"ferret","value":{"rev":"9-7ab6b29cb0cad9855d927855c2a27bff"}}, -{"id":"ffmpeg-node","key":"ffmpeg-node","value":{"rev":"3-e55011ecb147f599475a12b10724a583"}}, -{"id":"ffmpeg2theora","key":"ffmpeg2theora","value":{"rev":"13-05d2f83dbbb90e832176ebb7fdc2ae2e"}}, -{"id":"fiberize","key":"fiberize","value":{"rev":"5-dfb978d6b88db702f68a13e363fb21af"}}, -{"id":"fibers","key":"fibers","value":{"rev":"71-4b22dbb449839723ed9b0d533339c764"}}, -{"id":"fibers-promise","key":"fibers-promise","value":{"rev":"9-3a9977528f8df079969d4ae48db7a0a7"}}, -{"id":"fidel","key":"fidel","value":{"rev":"37-370838ed9984cfe6807114b5fef789e6"}}, -{"id":"fig","key":"fig","value":{"rev":"7-24acf90e7d06dc8b83adb02b5776de3c"}}, -{"id":"file","key":"file","value":{"rev":"6-1131008db6855f20969413be7cc2e968"}}, -{"id":"file-api","key":"file-api","value":{"rev":"9-a9cc8f3de14eef5bba86a80f6705651c"}}, -{"id":"fileify","key":"fileify","value":{"rev":"17-50603c037d5e3a0a405ff4af3e71211f"}}, -{"id":"filepad","key":"filepad","value":{"rev":"23-8c4b2c04151723033523369c42144cc9"}}, -{"id":"filerepl","key":"filerepl","value":{"rev":"5-94999cc91621e08f96ded7423ed6d6f0"}}, -{"id":"fileset","key":"fileset","value":{"rev":"3-ea6a9f45aaa5e65279463041ee629dbe"}}, -{"id":"filestore","key":"filestore","value":{"rev":"9-6cce7c9cd2b2b11d12905885933ad25a"}}, -{"id":"filesystem-composer","key":"filesystem-composer","value":{"rev":"34-f1d04d711909f3683c1d00cd4ab7ca47"}}, -{"id":"fileutils","key":"fileutils","value":{"rev":"3-88876b61c9d0a915f95ce0f258e5ce51"}}, -{"id":"filter","key":"filter","value":{"rev":"3-4032087a5cf2de3dd164c95454a2ab05"}}, -{"id":"filter-chain","key":"filter-chain","value":{"rev":"5-c522429dc83ccc7dde4eaf5409070332"}}, -{"id":"fin","key":"fin","value":{"rev":"23-77cf12e84eb62958b40aa08fdcbb259d"}}, -{"id":"fin-id","key":"fin-id","value":{"rev":"3-9f85ee1e426d4bdad5904002a6d9342c"}}, -{"id":"finance","key":"finance","value":{"rev":"3-cf97ddb6af3f6601bfb1e49a600f56af"}}, -{"id":"finder","key":"finder","value":{"rev":"13-65767fe51799a397ddd9b348ead12ed2"}}, -{"id":"findit","key":"findit","value":{"rev":"15-435e4168208548a2853f6efcd4529de3"}}, -{"id":"fingerprint","key":"fingerprint","value":{"rev":"3-c40e2169260010cac472e688c392ea3d"}}, -{"id":"finjector","key":"finjector","value":{"rev":"5-646da199b0b336d20e421ef6ad613e90"}}, -{"id":"firebird","key":"firebird","value":{"rev":"5-7e7ec03bc00e562f5f7afc7cad76da77"}}, -{"id":"firmata","key":"firmata","value":{"rev":"20-f3cbde43ce2677a208bcf3599af5b670"}}, -{"id":"first","key":"first","value":{"rev":"3-c647f6fc1353a1c7b49f5e6cd1905b1e"}}, -{"id":"fishback","key":"fishback","value":{"rev":"19-27a0fdc8c3abe4d61fff9c7a098f3fd9"}}, -{"id":"fitbit-js","key":"fitbit-js","value":{"rev":"3-62fe0869ddefd2949d8c1e568f994c93"}}, -{"id":"fix","key":"fix","value":{"rev":"17-4a79db9924922da010df71e5194bcac6"}}, -{"id":"flagpoll","key":"flagpoll","value":{"rev":"3-0eb7b98e2a0061233aa5228eb7348dff"}}, -{"id":"flags","key":"flags","value":{"rev":"3-594f0ec2e903ac74556d1c1f7c6cca3b"}}, -{"id":"flexcache","key":"flexcache","value":{"rev":"11-e1e4eeaa0793d95056a857bec04282ae"}}, -{"id":"flickr-conduit","key":"flickr-conduit","value":{"rev":"7-d3b2b610171589db68809c3ec3bf2bcb"}}, -{"id":"flickr-js","key":"flickr-js","value":{"rev":"5-66c8e8a00ad0a906f632ff99cf490163"}}, -{"id":"flickr-reflection","key":"flickr-reflection","value":{"rev":"6-3c34c3ac904b6d6f26182807fbb95c5e"}}, -{"id":"flo","key":"flo","value":{"rev":"3-ce440035f0ec9a10575b1c8fab0c77da"}}, -{"id":"flow","key":"flow","value":{"rev":"6-95841a07c96f664d49d1af35373b3dbc"}}, -{"id":"flowcontrol","key":"flowcontrol","value":{"rev":"3-093bbbc7496072d9ecb136a826680366"}}, -{"id":"flowjs","key":"flowjs","value":{"rev":"3-403fc9e107ec70fe06236c27e70451c7"}}, -{"id":"fluent-ffmpeg","key":"fluent-ffmpeg","value":{"rev":"33-5982779d5f55a5915f0f8b0353f1fe2a"}}, -{"id":"flume-rpc","key":"flume-rpc","value":{"rev":"7-4214a2db407a3e64f036facbdd34df91"}}, -{"id":"flux","key":"flux","value":{"rev":"3-1ad83106af7ee83547c797246bd2c8b1"}}, -{"id":"fly","key":"fly","value":{"rev":"9-0a45b1b97f56ba0faf4af4777b473fad"}}, -{"id":"fn","key":"fn","value":{"rev":"5-110bab5d623b3628e413d972e040ed26"}}, -{"id":"fnProxy","key":"fnProxy","value":{"rev":"3-db1c90e5a06992ed290c679ac6dbff6a"}}, -{"id":"follow","key":"follow","value":{"rev":"3-44256c802b4576fcbae1264e9b824e6a"}}, -{"id":"fomatto","key":"fomatto","value":{"rev":"7-31ce5c9eba7f084ccab2dc5994796f2d"}}, -{"id":"foounit","key":"foounit","value":{"rev":"20-caf9cd90d6c94d19be0b3a9c9cb33ee0"}}, -{"id":"forEachAsync","key":"forEachAsync","value":{"rev":"3-d9cd8021ea9d5014583327752a9d01c4"}}, -{"id":"forever","key":"forever","value":{"rev":"99-90060d5d1754b1bf749e5278a2a4516b"}}, -{"id":"forge","key":"forge","value":{"rev":"9-0d9d59fd2d47a804e600aaef538ebbbf"}}, -{"id":"fork","key":"fork","value":{"rev":"13-f355105e07608de5ae2f3e7c0817af52"}}, -{"id":"forker","key":"forker","value":{"rev":"11-9717e2e3fa60b46df08261d936d9e5d7"}}, -{"id":"form-data","key":"form-data","value":{"rev":"3-5750e73f7a0902ec2fafee1db6d2e6f6"}}, -{"id":"form-validator","key":"form-validator","value":{"rev":"25-7d016b35895dc58ffd0bbe54fd9be241"}}, -{"id":"form2json","key":"form2json","value":{"rev":"8-7501dd9b43b9fbb7194b94e647816e5e"}}, -{"id":"formaline","key":"formaline","value":{"rev":"3-2d45fbb3e83b7e77bde0456607e6f1e3"}}, -{"id":"format","key":"format","value":{"rev":"7-5dddc67c10de521ef06a7a07bb3f7e2e"}}, -{"id":"formatdate","key":"formatdate","value":{"rev":"3-6d522e3196fe3b438fcc4aed0f7cf690"}}, -{"id":"formidable","key":"formidable","value":{"rev":"87-d27408b00793fee36f6632a895372590"}}, -{"id":"forms","key":"forms","value":{"rev":"6-253e032f07979b79c2e7dfa01be085dc"}}, -{"id":"forrst","key":"forrst","value":{"rev":"3-ef553ff1b6383bab0f81f062cdebac53"}}, -{"id":"fortumo","key":"fortumo","value":{"rev":"6-def3d146b29b6104019c513ce20bb61f"}}, -{"id":"foss-credits","key":"foss-credits","value":{"rev":"3-c824326e289e093406b2de4efef70cb7"}}, -{"id":"foss-credits-collection","key":"foss-credits-collection","value":{"rev":"17-de4ffca51768a36c8fb1b9c2bc66c80f"}}, -{"id":"foursquareonnode","key":"foursquareonnode","value":{"rev":"5-a4f0a1ed5d3be3056f10f0e9517efa83"}}, -{"id":"fraggle","key":"fraggle","value":{"rev":"7-b9383baf96bcdbd4022b4b887e4a3729"}}, -{"id":"framework","key":"framework","value":{"rev":"3-afb19a9598a0d50320b4f1faab1ae2c6"}}, -{"id":"frameworkjs","key":"frameworkjs","value":{"rev":"7-cd418da3272c1e8349126e442ed15dbd"}}, -{"id":"frank","key":"frank","value":{"rev":"12-98031fb56f1c89dfc7888f5d8ca7f0a9"}}, -{"id":"freakset","key":"freakset","value":{"rev":"21-ba60d0840bfa3da2c8713c3c2e6856a0"}}, -{"id":"freckle","key":"freckle","value":{"rev":"3-8e2e9a07b2650fbbd0a598b948ef993b"}}, -{"id":"freebase","key":"freebase","value":{"rev":"7-a1daf1cc2259b886f574f5c902eebcf4"}}, -{"id":"freecontrol","key":"freecontrol","value":{"rev":"6-7a51776b8764f406573d5192bab36adf"}}, -{"id":"freestyle","key":"freestyle","value":{"rev":"9-100f9e9d3504d6e1c6a2d47651c70f51"}}, -{"id":"frenchpress","key":"frenchpress","value":{"rev":"9-306d6ac21837879b8040d7f9aa69fc20"}}, -{"id":"fs-boot","key":"fs-boot","value":{"rev":"20-72b44b403767aa486bf1dc987c750733"}}, -{"id":"fs-ext","key":"fs-ext","value":{"rev":"10-3360831c3852590a762f8f82525c025e"}}, -{"id":"fsevents","key":"fsevents","value":{"rev":"6-bb994f41842e144cf43249fdf6bf51e1"}}, -{"id":"fsext","key":"fsext","value":{"rev":"9-a1507d84e91ddf26ffaa76016253b4fe"}}, -{"id":"fsh","key":"fsh","value":{"rev":"5-1e3784b2df1c1a28b81f27907945f48b"}}, -{"id":"fsm","key":"fsm","value":{"rev":"5-b113be7b30b2a2c9089edcb6fa4c15d3"}}, -{"id":"fswatch","key":"fswatch","value":{"rev":"11-287eea565c9562161eb8969d765bb191"}}, -{"id":"ftp","key":"ftp","value":{"rev":"5-751e312520c29e76f7d79c648248c56c"}}, -{"id":"ftp-get","key":"ftp-get","value":{"rev":"27-1e908bd075a0743dbb1d30eff06485e2"}}, -{"id":"fugue","key":"fugue","value":{"rev":"81-0c08e67e8deb4b5b677fe19f8362dbd8"}}, -{"id":"fullauto","key":"fullauto","value":{"rev":"9-ef915156026dabded5a4a76c5a751916"}}, -{"id":"fun","key":"fun","value":{"rev":"12-8396e3583e206dbf90bbea4316976f66"}}, -{"id":"functional","key":"functional","value":{"rev":"5-955979028270f5d3749bdf86b4d2c925"}}, -{"id":"functools","key":"functools","value":{"rev":"5-42ba84ce365bf8c0aaf3e5e6c369920b"}}, -{"id":"funk","key":"funk","value":{"rev":"14-67440a9b2118d8f44358bf3b17590243"}}, -{"id":"fusion","key":"fusion","value":{"rev":"19-64983fc6e5496c836be26e5fbc8527d1"}}, -{"id":"fusker","key":"fusker","value":{"rev":"48-58f05561c65ad288a78fa7210f146ba1"}}, -{"id":"future","key":"future","value":{"rev":"3-0ca60d8ae330e40ef6cf8c17a421d668"}}, -{"id":"futures","key":"futures","value":{"rev":"44-8a2aaf0f40cf84c9475824d9cec006ad"}}, -{"id":"fuzzy_file_finder","key":"fuzzy_file_finder","value":{"rev":"8-ee555aae1d433e60166d2af1d72ac6b9"}}, -{"id":"fuzzylogic","key":"fuzzylogic","value":{"rev":"8-596a8f4744d1dabcb8eb6466d9980fca"}}, -{"id":"fxs","key":"fxs","value":{"rev":"3-d3cb81151b0ddd9a4a5934fb63ffff75"}}, -{"id":"g","key":"g","value":{"rev":"3-55742a045425a9b4c9fe0e8925fad048"}}, -{"id":"g.raphael","key":"g.raphael","value":{"rev":"4-190d0235dc08f783dda77b3ecb60b11a"}}, -{"id":"ga","key":"ga","value":{"rev":"3-c47d516ac5e6de8ef7ef9d16fabcf6c7"}}, -{"id":"galletita","key":"galletita","value":{"rev":"3-aa7a01c3362a01794f36e7aa9664b850"}}, -{"id":"game","key":"game","value":{"rev":"3-0f1539e4717a2780205d98ef6ec0886d"}}, -{"id":"gamina","key":"gamina","value":{"rev":"15-871f4970f1e87b7c8ad361456001c76f"}}, -{"id":"gang-bang","key":"gang-bang","value":{"rev":"6-f565cb7027a8ca109481df49a6d41114"}}, -{"id":"gapserver","key":"gapserver","value":{"rev":"9-b25eb0eefc21e407cba596a0946cb3a0"}}, -{"id":"garbage","key":"garbage","value":{"rev":"3-80f4097d5f1f2c75f509430a11c8a15e"}}, -{"id":"gaseous","key":"gaseous","value":{"rev":"3-8021582ab9dde42d235193e6067be72d"}}, -{"id":"gaudium","key":"gaudium","value":{"rev":"11-7d612f1c5d921180ccf1c162fe2c7446"}}, -{"id":"gauss","key":"gauss","value":{"rev":"3-8fd18b2d7a223372f190797e4270a535"}}, -{"id":"gcli","key":"gcli","value":{"rev":"3-210404347cc643e924cec678d0195099"}}, -{"id":"gcw2html","key":"gcw2html","value":{"rev":"3-2aff7bff7981f2f9800c5f65812aa0a6"}}, -{"id":"gd","key":"gd","value":{"rev":"4-ac5a662e709a2993ed1fd1cbf7c4d7b4"}}, -{"id":"gdata","key":"gdata","value":{"rev":"3-c6b3a95064a1e1e0bb74f248ab4e73c4"}}, -{"id":"gdata-js","key":"gdata-js","value":{"rev":"17-0959500a4000d7058d8116af1e01b0d9"}}, -{"id":"gearman","key":"gearman","value":{"rev":"8-ac9fb7af75421ca2988d6098dbfd4c7c"}}, -{"id":"gearnode","key":"gearnode","value":{"rev":"7-8e40ec257984e887e2ff5948a6dde04e"}}, -{"id":"geck","key":"geck","value":{"rev":"161-c8117106ef58a6d7d21920df80159eab"}}, -{"id":"geddy","key":"geddy","value":{"rev":"13-da16f903aca1ec1f47086fa250b58abb"}}, -{"id":"gen","key":"gen","value":{"rev":"3-849005c8b8294c2a811ff4eccdedf436"}}, -{"id":"generic-function","key":"generic-function","value":{"rev":"5-dc046f58f96119225efb17ea5334a60f"}}, -{"id":"generic-pool","key":"generic-pool","value":{"rev":"18-65ff988620293fe7ffbd0891745c3ded"}}, -{"id":"genji","key":"genji","value":{"rev":"49-4c72bcaa57572ad0d43a1b7e9e5a963a"}}, -{"id":"genstatic","key":"genstatic","value":{"rev":"19-4278d0766226af4db924bb0f6b127699"}}, -{"id":"gently","key":"gently","value":{"rev":"24-c9a3ba6b6fd183ee1b5dda569122e978"}}, -{"id":"genx","key":"genx","value":{"rev":"7-f0c0ff65e08e045e8dd1bfcb25ca48d4"}}, -{"id":"geo","key":"geo","value":{"rev":"7-fa2a79f7260b849c277735503a8622e9"}}, -{"id":"geo-distance","key":"geo-distance","value":{"rev":"7-819a30e9b4776e4416fe9510ca79cd93"}}, -{"id":"geocoder","key":"geocoder","value":{"rev":"15-736e627571ad8dba3a9d0da1ae019c35"}}, -{"id":"geohash","key":"geohash","value":{"rev":"6-b9e62c804abe565425a8e6a01354407a"}}, -{"id":"geoip","key":"geoip","value":{"rev":"231-e5aa7acd5fb44833a67f96476b4fac49"}}, -{"id":"geoip-lite","key":"geoip-lite","value":{"rev":"9-efd916135c056406ede1ad0fe15534fa"}}, -{"id":"geojs","key":"geojs","value":{"rev":"35-b0f97b7c72397d6eb714602dc1121183"}}, -{"id":"geolib","key":"geolib","value":{"rev":"3-923a8622d1bd97c22f71ed6537ba5062"}}, -{"id":"geonode","key":"geonode","value":{"rev":"35-c2060653af72123f2f9994fca1c86d70"}}, -{"id":"geoutils","key":"geoutils","value":{"rev":"6-2df101fcbb01849533b2fbc80dc0eb7a"}}, -{"id":"gerbil","key":"gerbil","value":{"rev":"3-b5961044bda490a34085ca826aeb3022"}}, -{"id":"gerenuk","key":"gerenuk","value":{"rev":"13-4e45a640bcbadc3112e105ec5b60b907"}}, -{"id":"get","key":"get","value":{"rev":"18-dd215d673f19bbd8b321a7dd63e004e8"}}, -{"id":"getopt","key":"getopt","value":{"rev":"3-454354e4557d5e7205410acc95c9baae"}}, -{"id":"getrusage","key":"getrusage","value":{"rev":"8-d6ef24793b8e4c46f3cdd14937cbabe1"}}, -{"id":"gettext","key":"gettext","value":{"rev":"3-4c12268a4cab64ec4ef3ac8c9ec7912b"}}, -{"id":"getz","key":"getz","value":{"rev":"9-f3f43934139c9af6ddfb8b91e9a121ba"}}, -{"id":"gevorg.me","key":"gevorg.me","value":{"rev":"33-700502b8ca7041bf8d29368069cac365"}}, -{"id":"gex","key":"gex","value":{"rev":"3-105824d7a3f9c2ac7313f284c3f81d22"}}, -{"id":"gexode","key":"gexode","value":{"rev":"3-4a3552eae4ff3ba4443f9371a1ab4b2e"}}, -{"id":"gfx","key":"gfx","value":{"rev":"8-1f6c90bc3819c3b237e8d1f28ad1b136"}}, -{"id":"gherkin","key":"gherkin","value":{"rev":"77-6e835c8107bb4c7c8ad1fa072ac12c20"}}, -{"id":"ghm","key":"ghm","value":{"rev":"3-c440ae39832a575087ff1920b33c275b"}}, -{"id":"gif","key":"gif","value":{"rev":"14-e65638621d05b99ffe71b18097f29134"}}, -{"id":"gimme","key":"gimme","value":{"rev":"7-caab8354fe257fc307f8597e34ede547"}}, -{"id":"gist","key":"gist","value":{"rev":"11-eea7ea1adf3cde3a0804d2e1b0d6f7d6"}}, -{"id":"gista","key":"gista","value":{"rev":"23-48b8c374cfb8fc4e8310f3469cead6d5"}}, -{"id":"gisty","key":"gisty","value":{"rev":"5-1a898d0816f4129ab9a0d3f03ff9feb4"}}, -{"id":"git","key":"git","value":{"rev":"39-1f77df3ebeec9aae47ae8df56de6757f"}}, -{"id":"git-fs","key":"git-fs","value":{"rev":"14-7d365cddff5029a9d11fa8778a7296d2"}}, -{"id":"gitProvider","key":"gitProvider","value":{"rev":"9-c704ae702ef27bb57c0efd279a464e28"}}, -{"id":"github","key":"github","value":{"rev":"16-9345138ca7507c12be4a817b1abfeef6"}}, -{"id":"github-flavored-markdown","key":"github-flavored-markdown","value":{"rev":"3-f12043eb2969aff51db742b13d329446"}}, -{"id":"gitteh","key":"gitteh","value":{"rev":"39-88b00491fd4ce3294b8cdf61b9708383"}}, -{"id":"gitter","key":"gitter","value":{"rev":"16-88d7ef1ab6a7e751ca2cf6b50894deb4"}}, -{"id":"gittyup","key":"gittyup","value":{"rev":"37-ed6030c1acdd8b989ac34cd10d6dfd1e"}}, -{"id":"gitweb","key":"gitweb","value":{"rev":"9-5331e94c6df9ee7724cde3738a0c6230"}}, -{"id":"gitwiki","key":"gitwiki","value":{"rev":"9-0f167a3a87bce7f3e941136a06e91810"}}, -{"id":"gizmo","key":"gizmo","value":{"rev":"5-1da4da8d66690457c0bf743473b755f6"}}, -{"id":"gleak","key":"gleak","value":{"rev":"17-d44a968b32e4fdc7d27bacb146391422"}}, -{"id":"glob","key":"glob","value":{"rev":"203-4a79e232cf6684a48ccb9134a6ce938c"}}, -{"id":"glob-trie.js","key":"glob-trie.js","value":{"rev":"7-bff534e3aba8f6333fa5ea871b070de2"}}, -{"id":"global","key":"global","value":{"rev":"3-f15b0c9ae0ea9508890bff25c8e0f795"}}, -{"id":"globalize","key":"globalize","value":{"rev":"5-33d10c33fb24af273104f66098e246c4"}}, -{"id":"glossary","key":"glossary","value":{"rev":"3-5e143d09d22a01eb2ee742ceb3e18f6e"}}, -{"id":"glossy","key":"glossy","value":{"rev":"9-f31e00844e8be49e5812fe64a6f1e1cc"}}, -{"id":"gm","key":"gm","value":{"rev":"28-669722d34a3dc29c8c0b27abd73493a1"}}, -{"id":"gnarly","key":"gnarly","value":{"rev":"3-796f5df3483f304cb404cc7ac7702512"}}, -{"id":"gnomenotify","key":"gnomenotify","value":{"rev":"9-bc066c0556ad4a20e7a7ae58cdc4cf91"}}, -{"id":"gofer","key":"gofer","value":{"rev":"15-3fc77ce34e95ffecd12d3854a1bb2da9"}}, -{"id":"goo.gl","key":"goo.gl","value":{"rev":"37-eac7c44d33cc42c618372f0bdd4365c2"}}, -{"id":"goodreads","key":"goodreads","value":{"rev":"5-acd9fe24139aa8b81b26431dce9954aa"}}, -{"id":"goog","key":"goog","value":{"rev":"13-c964ecfcef4d20c8c7d7526323257c04"}}, -{"id":"googl","key":"googl","value":{"rev":"8-2d4d80ef0c5f93400ec2ec8ef80de433"}}, -{"id":"google-openid","key":"google-openid","value":{"rev":"19-380884ba97e3d6fc48c8c7db3dc0e91b"}}, -{"id":"google-spreadsheets","key":"google-spreadsheets","value":{"rev":"3-f640ef136c4b5e90210c2d5d43102b38"}}, -{"id":"google-voice","key":"google-voice","value":{"rev":"37-2e1c3cba3455852f26b0ccaf1fed7125"}}, -{"id":"googleanalytics","key":"googleanalytics","value":{"rev":"8-1d3e470ce4aacadb0418dd125887813d"}}, -{"id":"googleclientlogin","key":"googleclientlogin","value":{"rev":"23-5de8ee62c0ddbc63a001a36a6afe730e"}}, -{"id":"googlediff","key":"googlediff","value":{"rev":"3-438a2f0758e9770a157ae4cce9b6f49e"}}, -{"id":"googlemaps","key":"googlemaps","value":{"rev":"18-bc939560c587711f3d96f3caadd65a7f"}}, -{"id":"googleplus-scraper","key":"googleplus-scraper","value":{"rev":"7-598ea99bd64f4ad69cccb74095abae59"}}, -{"id":"googlereaderauth","key":"googlereaderauth","value":{"rev":"5-cd0eb8ca36ea78620af0fce270339a7b"}}, -{"id":"googlesets","key":"googlesets","value":{"rev":"5-1b2e597e903c080182b3306d63278fd9"}}, -{"id":"googleweather","key":"googleweather","value":{"rev":"3-6bfdaaeedb8a712ee3e89a8ed27508eb"}}, -{"id":"gopostal.node","key":"gopostal.node","value":{"rev":"3-14ff3a655dc3680c9e8e2751ebe294bc"}}, -{"id":"gowallan","key":"gowallan","value":{"rev":"3-23adc9c01a6b309eada47602fdc8ed90"}}, -{"id":"gowiththeflow","key":"gowiththeflow","value":{"rev":"3-52bb6cf6294f67ba5a892db4666d3790"}}, -{"id":"gpg","key":"gpg","value":{"rev":"5-0ca2b5af23e108a4f44f367992a75fed"}}, -{"id":"graceful-fs","key":"graceful-fs","value":{"rev":"3-01e9f7d1c0f6e6a611a60ee84de1f5cc"}}, -{"id":"gracie","key":"gracie","value":{"rev":"3-aa0f7c01a33c7c1e9a49b86886ef5255"}}, -{"id":"graff","key":"graff","value":{"rev":"7-5ab558cb24e30abd67f2a1dbf47cd639"}}, -{"id":"graft","key":"graft","value":{"rev":"3-7419de38b249b891bf7998bcdd2bf557"}}, -{"id":"grain","key":"grain","value":{"rev":"3-e57cbf02121970da230964ddbfd31432"}}, -{"id":"grainstore","key":"grainstore","value":{"rev":"19-5f9c5bb13b2c9ac4e6a05aec33aeb7c5"}}, -{"id":"graph","key":"graph","value":{"rev":"7-909d2fefcc84b5dd1512b60d631ea4e5"}}, -{"id":"graphquire","key":"graphquire","value":{"rev":"27-246e798f80b3310419644302405d68ad"}}, -{"id":"graphviz","key":"graphviz","value":{"rev":"8-3b79341eaf3f67f91bce7c88c08b9f0d"}}, -{"id":"grasshopper","key":"grasshopper","value":{"rev":"45-4002406990476b74dac5108bd19c4274"}}, -{"id":"gravatar","key":"gravatar","value":{"rev":"11-0164b7ac97e8a477b4e8791eae2e7fea"}}, -{"id":"grave","key":"grave","value":{"rev":"3-136f6378b956bc5dd9773250f8813038"}}, -{"id":"gravity","key":"gravity","value":{"rev":"5-dd40fcee1a769ce786337e9536d24244"}}, -{"id":"graylog","key":"graylog","value":{"rev":"5-abcff9cd91ff20e36f8a70a3f2de658b"}}, -{"id":"greg","key":"greg","value":{"rev":"5-ececb0a3bb552b6da4f66b8bf6f75cf0"}}, -{"id":"gridcentric","key":"gridcentric","value":{"rev":"4-4378e1c280e18b5aaabd23038b80d76c"}}, -{"id":"gridly","key":"gridly","value":{"rev":"3-86e878756b493da8f66cbd633a15f821"}}, -{"id":"grinder","key":"grinder","value":{"rev":"9-0aaeecf0c81b1c9c93a924c5eb0bff45"}}, -{"id":"grir.am","key":"grir.am","value":{"rev":"3-3ec153c764af1c26b50fefa437318c5a"}}, -{"id":"groundcrew","key":"groundcrew","value":{"rev":"3-9e9ed9b1c70c00c432f36bb853fa21a0"}}, -{"id":"groupie","key":"groupie","value":{"rev":"6-b5e3f0891a7e8811d6112b24bd5a46b4"}}, -{"id":"groupon","key":"groupon","value":{"rev":"21-8b74723c153695f4ed4917575abcca8f"}}, -{"id":"growing-file","key":"growing-file","value":{"rev":"7-995b233a1add5b9ea80aec7ac3f60dc5"}}, -{"id":"growl","key":"growl","value":{"rev":"10-4be41ae10ec96e1334dccdcdced12fe3"}}, -{"id":"gsl","key":"gsl","value":{"rev":"49-3367acfb521b30d3ddb9b80305009553"}}, -{"id":"gss","key":"gss","value":{"rev":"3-e4cffbbbc4536d952d13d46376d899b7"}}, -{"id":"guards","key":"guards","value":{"rev":"8-d7318d3d9dc842ab41e6ef5b88f9d37f"}}, -{"id":"guardtime","key":"guardtime","value":{"rev":"3-5a2942efabab100ffb3dc0fa3b581b7a"}}, -{"id":"guava","key":"guava","value":{"rev":"11-d9390d298b503f0ffb8e3ba92eeb9759"}}, -{"id":"guid","key":"guid","value":{"rev":"16-d99e725bbbf97a326833858767b7ed08"}}, -{"id":"gumbo","key":"gumbo","value":{"rev":"31-727cf5a3b7d8590fff871f27da114d9d"}}, -{"id":"gunther","key":"gunther","value":{"rev":"9-f95c89128412208d16acd3e615844115"}}, -{"id":"gzbz2","key":"gzbz2","value":{"rev":"3-e1844b1b3a7881a0c8dc0dd4edcc11ca"}}, -{"id":"gzip","key":"gzip","value":{"rev":"17-37afa05944f055d6f43ddc87c1b163c2"}}, -{"id":"gzip-stack","key":"gzip-stack","value":{"rev":"8-cf455d60277832c60ee622d198c0c51a"}}, -{"id":"gzippo","key":"gzippo","value":{"rev":"15-6416c13ecbbe1c5cd3e30adf4112ead7"}}, -{"id":"h5eb","key":"h5eb","value":{"rev":"3-11ed2566fa4b8a01ff63a720c94574cd"}}, -{"id":"hack","key":"hack","value":{"rev":"3-70f536dd46719e8201a6ac5cc96231f6"}}, -{"id":"hack.io","key":"hack.io","value":{"rev":"18-128305614e7fd6b461248bf3bfdd7ab7"}}, -{"id":"hacktor","key":"hacktor","value":{"rev":"3-51b438df35ba8a955d434ab25a4dad67"}}, -{"id":"haibu","key":"haibu","value":{"rev":"99-b29b8c37be42f90985c6d433d53c8679"}}, -{"id":"haibu-carapace","key":"haibu-carapace","value":{"rev":"22-9a89b2f495e533d0f93e4ee34121e48c"}}, -{"id":"haibu-nginx","key":"haibu-nginx","value":{"rev":"7-e176128dc6dbb0d7f5f33369edf1f7ee"}}, -{"id":"halfstreamxml","key":"halfstreamxml","value":{"rev":"7-5c0f3defa6ba921f8edb564584553df4"}}, -{"id":"ham","key":"ham","value":{"rev":"3-1500dc495cade7334f6a051f2758f748"}}, -{"id":"haml","key":"haml","value":{"rev":"15-a93e7762c7d43469a06519472497fd93"}}, -{"id":"haml-edge","key":"haml-edge","value":{"rev":"5-c4e44a73263ac9b7e632375de7e43d7c"}}, -{"id":"hamljs","key":"hamljs","value":{"rev":"10-a01c7214b69992352bde44938418ebf4"}}, -{"id":"hamljs-coffee","key":"hamljs-coffee","value":{"rev":"3-c2733c8ff38f5676075b84cd7f3d8684"}}, -{"id":"handlebars","key":"handlebars","value":{"rev":"4-0e21906b78605f7a1d5ec7cb4c7d35d7"}}, -{"id":"hanging-gardens","key":"hanging-gardens","value":{"rev":"27-3244e37f08bea0e31759e9f38983f59a"}}, -{"id":"hanging_gardens_registry","key":"hanging_gardens_registry","value":{"rev":"17-d87aa3a26f91dc314f02c686672a5ec6"}}, -{"id":"hapi","key":"hapi","value":{"rev":"3-ed721fe9aae4a459fe0945dabd7d680a"}}, -{"id":"harmony","key":"harmony","value":{"rev":"3-d6c9d6acc29d29c97c75c77f7c8e1390"}}, -{"id":"hascan","key":"hascan","value":{"rev":"13-a7ab15c72f464b013cbc55dc426543ca"}}, -{"id":"hash_ring","key":"hash_ring","value":{"rev":"12-0f072b1dd1fd93ae2f2b79f5ea72074d"}}, -{"id":"hashbangify","key":"hashbangify","value":{"rev":"5-738e0cf99649d41c19d3449c0e9a1cbf"}}, -{"id":"hashish","key":"hashish","value":{"rev":"9-62c5e74355458e1ead819d87151b7d38"}}, -{"id":"hashkeys","key":"hashkeys","value":{"rev":"3-490809bdb61f930f0d9f370eaadf36ea"}}, -{"id":"hashlib","key":"hashlib","value":{"rev":"7-1f19c9d6062ff22ed2e963204a1bd405"}}, -{"id":"hashring","key":"hashring","value":{"rev":"11-4c9f2b1ba7931c8bab310f4ecaf91419"}}, -{"id":"hashtable","key":"hashtable","value":{"rev":"7-2aaf2667cbdb74eb8da61e2e138059ca"}}, -{"id":"hat","key":"hat","value":{"rev":"9-6f37874d9703eab62dc875e2373837a8"}}, -{"id":"hbase","key":"hbase","value":{"rev":"20-7ca92712de26ffb18d275a21696aa263"}}, -{"id":"hbase-thrift","key":"hbase-thrift","value":{"rev":"7-39afb33a4e61cc2b3dc94f0c7fd32c65"}}, -{"id":"hbs","key":"hbs","value":{"rev":"29-aa2676e6790c5716f84f128dcd03e797"}}, -{"id":"header-stack","key":"header-stack","value":{"rev":"13-7ad1ccf3c454d77029c000ceb18ce5ab"}}, -{"id":"headers","key":"headers","value":{"rev":"13-04f8f5f25e2dd9890f6b2f120adf297a"}}, -{"id":"healthety","key":"healthety","value":{"rev":"60-07c67c22ee2a13d0ad675739d1814a6d"}}, -{"id":"heatmap","key":"heatmap","value":{"rev":"9-c53f4656d9517f184df7aea9226c1765"}}, -{"id":"heavy-flow","key":"heavy-flow","value":{"rev":"5-0b9188334339e7372b364a7fc730c639"}}, -{"id":"heckle","key":"heckle","value":{"rev":"13-b462abef7b9d1471ed8fb8f23af463e0"}}, -{"id":"helium","key":"helium","value":{"rev":"3-4d6ce9618c1be522268944240873f53e"}}, -{"id":"hello-world","key":"hello-world","value":{"rev":"3-e87f287308a209491c011064a87100b7"}}, -{"id":"hello.io","key":"hello.io","value":{"rev":"3-39b78278fa638495522edc7a84f6a52e"}}, -{"id":"helloworld","key":"helloworld","value":{"rev":"3-8f163aebdcf7d8761709bdbb634c3689"}}, -{"id":"helpers","key":"helpers","value":{"rev":"3-67d75b1c8e5ad2a268dd4ea191d4754b"}}, -{"id":"helpful","key":"helpful","value":{"rev":"41-e11bed25d5a0ca7e7ad116d5a339ec2a"}}, -{"id":"hem","key":"hem","value":{"rev":"27-042fc9d4b96f20112cd943e019e54d20"}}, -{"id":"hempwick","key":"hempwick","value":{"rev":"11-de1f6f0f23937d9f33286e12ee877540"}}, -{"id":"heritable","key":"heritable","value":{"rev":"13-1468ff92063251a037bbe80ee987a9c3"}}, -{"id":"hermes-raw-client","key":"hermes-raw-client","value":{"rev":"11-5d143c371cb8353612badc72be1917ff"}}, -{"id":"heru","key":"heru","value":{"rev":"3-d124a20939e30e2a3c08f7104b2a1a5c"}}, -{"id":"hexdump","key":"hexdump","value":{"rev":"3-c455710ca80662969ccbca3acc081cb8"}}, -{"id":"hexy","key":"hexy","value":{"rev":"16-5142b0461622436daa2e476d252770f2"}}, -{"id":"highlight","key":"highlight","value":{"rev":"9-4b172b7aef6f40d768f022b2ba4e6748"}}, -{"id":"highlight.js","key":"highlight.js","value":{"rev":"5-16c1ebd28d5f2e781e666c6ee013c30c"}}, -{"id":"hiker","key":"hiker","value":{"rev":"9-89d1ce978b349f1f0df262655299d83c"}}, -{"id":"hipchat","key":"hipchat","value":{"rev":"3-73118782367d474af0f6410290df5f7f"}}, -{"id":"hipchat-js","key":"hipchat-js","value":{"rev":"3-253b83875d3e18e9c89333bc377183c3"}}, -{"id":"hiredis","key":"hiredis","value":{"rev":"46-29ceb03860efbd4b3b995247f27f78b9"}}, -{"id":"hive","key":"hive","value":{"rev":"15-40a4c6fcfa3b80007a18ef4ede80075b"}}, -{"id":"hive-cache","key":"hive-cache","value":{"rev":"3-36b10607b68586fccbfeb856412bd6bf"}}, -{"id":"hoard","key":"hoard","value":{"rev":"13-75d4c484095e2e38ac63a65bd9fd7f4b"}}, -{"id":"hook","key":"hook","value":{"rev":"7-2f1e375058e2b1fa61d3651f6d57a6f8"}}, -{"id":"hook.io","key":"hook.io","value":{"rev":"63-9fac4fb8337d1953963d47144f806f72"}}, -{"id":"hook.io-browser","key":"hook.io-browser","value":{"rev":"3-7e04347d80adc03eb5637b7e4b8ca58b"}}, -{"id":"hook.io-couch","key":"hook.io-couch","value":{"rev":"3-ce0eb281d1ba21aa1caca3a52553a07b"}}, -{"id":"hook.io-cron","key":"hook.io-cron","value":{"rev":"15-50deedc2051ce65bca8a42048154139c"}}, -{"id":"hook.io-helloworld","key":"hook.io-helloworld","value":{"rev":"23-ef5cf0cec9045d28d846a7b0872874e4"}}, -{"id":"hook.io-irc","key":"hook.io-irc","value":{"rev":"5-39c7ac5e192aef34b87af791fa77ee04"}}, -{"id":"hook.io-logger","key":"hook.io-logger","value":{"rev":"13-9e3208ea8eacfe5378cd791f2377d06d"}}, -{"id":"hook.io-mailer","key":"hook.io-mailer","value":{"rev":"9-d9415d53dc086102024cf7400fdfb7a2"}}, -{"id":"hook.io-pinger","key":"hook.io-pinger","value":{"rev":"17-860ab3a892284b91999f86c3882e2ff5"}}, -{"id":"hook.io-repl","key":"hook.io-repl","value":{"rev":"13-c0d430ccdfd197e4746c46d2814b6d92"}}, -{"id":"hook.io-request","key":"hook.io-request","value":{"rev":"13-f0e8d167d59917d90266f921e3ef7c64"}}, -{"id":"hook.io-sitemonitor","key":"hook.io-sitemonitor","value":{"rev":"8-725ea7deb9cb1031eabdc4fd798308ff"}}, -{"id":"hook.io-twilio","key":"hook.io-twilio","value":{"rev":"11-6b2e231307f6174861aa5dcddad264b3"}}, -{"id":"hook.io-twitter","key":"hook.io-twitter","value":{"rev":"3-59296395b22e661e7e5c141c4c7be46d"}}, -{"id":"hook.io-webhook","key":"hook.io-webhook","value":{"rev":"15-b27e51b63c8ec70616c66061d949f388"}}, -{"id":"hook.io-webserver","key":"hook.io-webserver","value":{"rev":"29-eb6bff70736648427329eba08b5f55c3"}}, -{"id":"hook.io-ws","key":"hook.io-ws","value":{"rev":"4-a85578068b54560ef663a7ecfea2731f"}}, -{"id":"hooks","key":"hooks","value":{"rev":"33-6640fb0c27903af6b6ae7b7c41d79e01"}}, -{"id":"hoptoad-notifier","key":"hoptoad-notifier","value":{"rev":"16-8249cb753a3626f2bf2664024ae7a5ee"}}, -{"id":"horaa","key":"horaa","value":{"rev":"5-099e5d6486d10944e10b584eb3f6e924"}}, -{"id":"hornet","key":"hornet","value":{"rev":"22-8c40d7ba4ca832b951e6d5db165f3305"}}, -{"id":"horseman","key":"horseman","value":{"rev":"11-7228e0f84c2036669a218710c22f72c0"}}, -{"id":"hostify","key":"hostify","value":{"rev":"11-8c1a2e73f8b9474a6c26121688c28dc7"}}, -{"id":"hostinfo","key":"hostinfo","value":{"rev":"5-c8d638f40ccf94f4083430966d25e787"}}, -{"id":"hostip","key":"hostip","value":{"rev":"3-d4fd628b94e1f913d97ec1746d96f2a0"}}, -{"id":"hostname","key":"hostname","value":{"rev":"7-55fefb3c37990bbcad3d98684d17f38f"}}, -{"id":"hotnode","key":"hotnode","value":{"rev":"16-d7dad5de3ffc2ca6a04f74686aeb0e4b"}}, -{"id":"howmuchtime","key":"howmuchtime","value":{"rev":"3-351ce870ae6e2c21a798169d074e2a3f"}}, -{"id":"hstore","key":"hstore","value":{"rev":"3-55ab4d359c2fc8725829038e3adb7571"}}, -{"id":"hsume2-socket.io","key":"hsume2-socket.io","value":{"rev":"5-4b537247ae9999c285c802cc36457598"}}, -{"id":"htdoc","key":"htdoc","value":{"rev":"3-80ef9e3202b0d96b79435a2bc90bc899"}}, -{"id":"html","key":"html","value":{"rev":"3-92c4af7de329c92ff2e0be5c13020e78"}}, -{"id":"html-minifier","key":"html-minifier","value":{"rev":"7-2441ed004e2a6e7f1c42003ec03277ec"}}, -{"id":"html-sourcery","key":"html-sourcery","value":{"rev":"11-7ce1d4aa2e1d319fa108b02fb294d4ce"}}, -{"id":"html2coffeekup","key":"html2coffeekup","value":{"rev":"13-bae4a70411f6f549c281c69835fe3276"}}, -{"id":"html2coffeekup-bal","key":"html2coffeekup-bal","value":{"rev":"5-0663ac1339d72932004130b668c949f0"}}, -{"id":"html2jade","key":"html2jade","value":{"rev":"11-e50f504c5c847d7ffcde7328c2ade4fb"}}, -{"id":"html5","key":"html5","value":{"rev":"46-ca85ea99accaf1dc9ded4e2e3aa429c6"}}, -{"id":"html5edit","key":"html5edit","value":{"rev":"10-0383296c33ada4d356740f29121eeb9f"}}, -{"id":"htmlKompressor","key":"htmlKompressor","value":{"rev":"13-95a3afe7f7cfe02e089e41588b937fb1"}}, -{"id":"htmlkup","key":"htmlkup","value":{"rev":"27-5b0115636f38886ae0a40e5f52e2bfdd"}}, -{"id":"htmlparser","key":"htmlparser","value":{"rev":"14-52b2196c1456d821d47bb1d2779b2433"}}, -{"id":"htmlparser2","key":"htmlparser2","value":{"rev":"3-9bc0b807acd913999dfc949b3160a3db"}}, -{"id":"htracr","key":"htracr","value":{"rev":"27-384d0522328e625978b97d8eae8d942d"}}, -{"id":"http","key":"http","value":{"rev":"3-f197d1b599cb9da720d3dd58d9813ace"}}, -{"id":"http-agent","key":"http-agent","value":{"rev":"10-1715dd3a7adccf55bd6637d78bd345d1"}}, -{"id":"http-auth","key":"http-auth","value":{"rev":"3-21636d4430be18a5c6c42e5cb622c2e0"}}, -{"id":"http-basic-auth","key":"http-basic-auth","value":{"rev":"6-0a77e99ce8e31558d5917bd684fa2c9a"}}, -{"id":"http-browserify","key":"http-browserify","value":{"rev":"3-4f720b4af628ed8b5fb22839c1f91f4d"}}, -{"id":"http-console","key":"http-console","value":{"rev":"43-a20cbefed77bcae7de461922286a1f04"}}, -{"id":"http-digest","key":"http-digest","value":{"rev":"6-e0164885dcad21ab6150d537af0edd92"}}, -{"id":"http-digest-auth","key":"http-digest-auth","value":{"rev":"7-613ac841b808fd04e272e050fd5a45ac"}}, -{"id":"http-get","key":"http-get","value":{"rev":"39-b7cfeb2b572d4ecf695493e0886869f4"}}, -{"id":"http-load","key":"http-load","value":{"rev":"3-8c64f4972ff59e89fee041adde99b8ba"}}, -{"id":"http-proxy","key":"http-proxy","value":{"rev":"97-5b8af88886c8c047a9862bf62f6b9294"}}, -{"id":"http-proxy-backward","key":"http-proxy-backward","value":{"rev":"2-4433b04a41e8adade3f6b6b2b939df4b"}}, -{"id":"http-proxy-glimpse","key":"http-proxy-glimpse","value":{"rev":"3-a3e9791d4d9bfef5929ca55d874df18b"}}, -{"id":"http-proxy-no-line-184-error","key":"http-proxy-no-line-184-error","value":{"rev":"3-7e20a990820976d8c6d27c312cc5a67c"}}, -{"id":"http-proxy-selective","key":"http-proxy-selective","value":{"rev":"12-6e273fcd008afeceb6737345c46e1024"}}, -{"id":"http-recorder","key":"http-recorder","value":{"rev":"3-26dd0bc4f5c0bf922db1875e995d025f"}}, -{"id":"http-request-provider","key":"http-request-provider","value":{"rev":"6-436b69971dd1735ac3e41571375f2d15"}}, -{"id":"http-server","key":"http-server","value":{"rev":"21-1b80b6558692afd08c36629b0ecdc18c"}}, -{"id":"http-signature","key":"http-signature","value":{"rev":"9-49ca63427b535f2d18182d92427bc5b6"}}, -{"id":"http-stack","key":"http-stack","value":{"rev":"9-51614060741d6c85a7fd4c714ed1a9b2"}}, -{"id":"http-status","key":"http-status","value":{"rev":"5-1ec72fecc62a41d6f180d15c95e81270"}}, -{"id":"http_compat","key":"http_compat","value":{"rev":"3-88244d4b0fd08a3140fa1b2e8b1b152c"}}, -{"id":"http_router","key":"http_router","value":{"rev":"23-ad52b58b6bfc96d6d4e8215e0c31b294"}}, -{"id":"http_trace","key":"http_trace","value":{"rev":"7-d8024b5e41540e4240120ffefae523e4"}}, -{"id":"httpd","key":"httpd","value":{"rev":"3-9e2a19f007a6a487cdb752f4b8249657"}}, -{"id":"httpmock","key":"httpmock","value":{"rev":"3-b6966ba8ee2c31b0e7729fc59bb00ccf"}}, -{"id":"https-proxied","key":"https-proxied","value":{"rev":"5-f63a4c663d372502b0dcd4997e759e66"}}, -{"id":"httpu","key":"httpu","value":{"rev":"5-88a5b2bac8391d91673fc83d4cfd32df"}}, -{"id":"hungarian-magic","key":"hungarian-magic","value":{"rev":"4-9eae750ac6f30b6687d9a031353f5217"}}, -{"id":"huntergatherer","key":"huntergatherer","value":{"rev":"9-5c9d833a134cfaa901d89dce93f5b013"}}, -{"id":"hxp","key":"hxp","value":{"rev":"8-1f52ba766491826bdc6517c6cc508b2c"}}, -{"id":"hyde","key":"hyde","value":{"rev":"3-5763db65cab423404752b1a6354a7a6c"}}, -{"id":"hydra","key":"hydra","value":{"rev":"8-8bb4ed249fe0f9cdb8b11e492b646b88"}}, -{"id":"hyperpublic","key":"hyperpublic","value":{"rev":"11-5738162f3dbf95803dcb3fb28efd8740"}}, -{"id":"i18n","key":"i18n","value":{"rev":"7-f0d6b3c72ecd34dde02d805041eca996"}}, -{"id":"ical","key":"ical","value":{"rev":"13-baf448be48ab83ec9b3fb8bf83fbb9a1"}}, -{"id":"icalendar","key":"icalendar","value":{"rev":"5-78dd8fd8ed2c219ec56ad26a0727cf76"}}, -{"id":"icecap","key":"icecap","value":{"rev":"9-88d6865078a5e6e1ff998e2e73e593f3"}}, -{"id":"icecapdjs","key":"icecapdjs","value":{"rev":"11-d8e3c718a230d49caa3b5f76cfff7ce9"}}, -{"id":"icecast-stack","key":"icecast-stack","value":{"rev":"9-13b8da6ae373152ab0c8560e2f442af0"}}, -{"id":"ichabod","key":"ichabod","value":{"rev":"19-d0f02ffba80661398ceb80a7e0cbbfe6"}}, -{"id":"icing","key":"icing","value":{"rev":"11-84815e78828190fbaa52d6b93c75cb4f"}}, -{"id":"ico","key":"ico","value":{"rev":"3-5727a35c1df453bfdfa6a03e49725adf"}}, -{"id":"iconv","key":"iconv","value":{"rev":"18-5f5b3193268f1fa099e0112b3e033ffc"}}, -{"id":"iconv-jp","key":"iconv-jp","value":{"rev":"3-660b8f2def930263d2931cae2dcc401d"}}, -{"id":"id3","key":"id3","value":{"rev":"8-afe68aede872cae7b404aaa01c0108a5"}}, -{"id":"idea","key":"idea","value":{"rev":"9-a126c0e52206c51dcf972cf53af0bc32"}}, -{"id":"idiomatic-console","key":"idiomatic-console","value":{"rev":"25-67696c16bf79d1cc8caf4df62677c3ec"}}, -{"id":"idiomatic-stdio","key":"idiomatic-stdio","value":{"rev":"15-9d74c9a8872b1f7c41d6c671d7a14b7d"}}, -{"id":"iglob","key":"iglob","value":{"rev":"6-b8a3518cb67cad20c89f37892a2346a5"}}, -{"id":"ignite","key":"ignite","value":{"rev":"19-06daa730a70f69dc3a0d6d4984905c61"}}, -{"id":"iles-forked-irc-js","key":"iles-forked-irc-js","value":{"rev":"7-eb446f4e0db856e00351a5da2fa20616"}}, -{"id":"image","key":"image","value":{"rev":"8-5f7811db33c210eb38e1880f7cc433f2"}}, -{"id":"imageable","key":"imageable","value":{"rev":"61-9f7e03d3d990d34802f1e9c8019dbbfa"}}, -{"id":"imageinfo","key":"imageinfo","value":{"rev":"11-9bde1a1f0801d94539a4b70b61614849"}}, -{"id":"imagemagick","key":"imagemagick","value":{"rev":"10-b1a1ea405940fecf487da94b733e8c29"}}, -{"id":"imagick","key":"imagick","value":{"rev":"3-21d51d8a265a705881dadbc0c9f7c016"}}, -{"id":"imap","key":"imap","value":{"rev":"13-6a59045496c80b474652d2584edd4acb"}}, -{"id":"imbot","key":"imbot","value":{"rev":"11-0d8075eff5e5ec354683f396378fd101"}}, -{"id":"imdb","key":"imdb","value":{"rev":"7-2bba884d0e8804f4a7e0883abd47b0a7"}}, -{"id":"imgur","key":"imgur","value":{"rev":"3-30c0e5fddc1be3398ba5f7eee1a251d7"}}, -{"id":"impact","key":"impact","value":{"rev":"7-d3390690f11c6f9dcca9f240a7bedfef"}}, -{"id":"imsi","key":"imsi","value":{"rev":"3-0aa9a01c9c79b17afae3684b7b920ced"}}, -{"id":"index","key":"index","value":{"rev":"13-ad5d8d7dfad64512a12db4d820229c07"}}, -{"id":"indexer","key":"indexer","value":{"rev":"9-b0173ce9ad9fa1b80037fa8e33a8ce12"}}, -{"id":"inflect","key":"inflect","value":{"rev":"17-9e5ea2826fe08bd950cf7e22d73371bd"}}, -{"id":"inflectjs","key":"inflectjs","value":{"rev":"3-c59db027b72be720899b4a280ac2518f"}}, -{"id":"inflector","key":"inflector","value":{"rev":"3-191ff29d3b5ed8ef6877032a1d01d864"}}, -{"id":"inheritance","key":"inheritance","value":{"rev":"3-450a1e68bd2d8f16abe7001491abb6a8"}}, -{"id":"inherits","key":"inherits","value":{"rev":"3-284f97a7ae4f777bfabe721b66de07fa"}}, -{"id":"ini","key":"ini","value":{"rev":"5-142c8f9125fbace57689e2837deb1883"}}, -{"id":"iniparser","key":"iniparser","value":{"rev":"14-1053c59ef3d50a46356be45576885c49"}}, -{"id":"inireader","key":"inireader","value":{"rev":"15-9cdc485b18bff6397f5fec45befda402"}}, -{"id":"init","key":"init","value":{"rev":"5-b81610ad72864417dab49f7a3f29cc9f"}}, -{"id":"inject","key":"inject","value":{"rev":"5-82bddb6b4f21ddaa0137fedc8913d60e"}}, -{"id":"inliner","key":"inliner","value":{"rev":"45-8a1c3e8f78438f06865b3237d6c5339a"}}, -{"id":"inode","key":"inode","value":{"rev":"7-118ffafc62dcef5bbeb14e4328c68ab3"}}, -{"id":"inotify","key":"inotify","value":{"rev":"18-03d7b1a318bd283e0185b414b48dd602"}}, -{"id":"inotify-plusplus","key":"inotify-plusplus","value":{"rev":"10-0e0ce9065a62e5e21ee5bb53fac61a6d"}}, -{"id":"inspect","key":"inspect","value":{"rev":"5-b5f18717e29caec3399abe5e4ce7a269"}}, -{"id":"instagram","key":"instagram","value":{"rev":"5-decddf3737a1764518b6a7ce600d720d"}}, -{"id":"instagram-node-lib","key":"instagram-node-lib","value":{"rev":"13-8be77f1180b6afd9066834b3f5ee8de5"}}, -{"id":"instant-styleguide","key":"instant-styleguide","value":{"rev":"9-66c02118993621376ad0b7396db435b3"}}, -{"id":"intercept","key":"intercept","value":{"rev":"9-f5622744c576405516a427b4636ee864"}}, -{"id":"interface","key":"interface","value":{"rev":"10-13806252722402bd18d88533056a863b"}}, -{"id":"interleave","key":"interleave","value":{"rev":"25-69bc136937604863748a029fb88e3605"}}, -{"id":"interstate","key":"interstate","value":{"rev":"3-3bb4a6c35ca765f88a10b9fab6307c59"}}, -{"id":"intervals","key":"intervals","value":{"rev":"21-89b71bd55b8d5f6b670d69fc5b9f847f"}}, -{"id":"intestine","key":"intestine","value":{"rev":"3-66a5531e06865ed9c966d95437ba1371"}}, -{"id":"ios7crypt","key":"ios7crypt","value":{"rev":"7-a2d309a2c074e5c1c456e2b56cbcfd17"}}, -{"id":"iostat","key":"iostat","value":{"rev":"11-f0849c0072e76701b435aa769a614e82"}}, -{"id":"ip2cc","key":"ip2cc","value":{"rev":"9-2c282606fd08d469184a272a2108639c"}}, -{"id":"ipaddr.js","key":"ipaddr.js","value":{"rev":"5-1017fd5342840745614701476ed7e6c4"}}, -{"id":"iptables","key":"iptables","value":{"rev":"7-23e56ef5d7bf0ee8f5bd0e38bde8aae3"}}, -{"id":"iptrie","key":"iptrie","value":{"rev":"4-10317b0e073befe9601e9dc308dc361a"}}, -{"id":"ipv6","key":"ipv6","value":{"rev":"6-85e937f3d79e44dbb76264c7aaaa140f"}}, -{"id":"iqengines","key":"iqengines","value":{"rev":"3-8bdbd32e9dc35b77d80a31edae235178"}}, -{"id":"irc","key":"irc","value":{"rev":"8-ed30964f57b99b1b2f2104cc5e269618"}}, -{"id":"irc-colors","key":"irc-colors","value":{"rev":"9-7ddb19db9a553567aae86bd97f1dcdfc"}}, -{"id":"irc-js","key":"irc-js","value":{"rev":"58-1c898cea420aee60283edb4fadceb90e"}}, -{"id":"ircat.js","key":"ircat.js","value":{"rev":"6-f25f20953ce96697c033315d250615d0"}}, -{"id":"ircbot","key":"ircbot","value":{"rev":"9-85a4a6f88836fc031855736676b10dec"}}, -{"id":"irccd","key":"irccd","value":{"rev":"3-bf598ae8b6af63be41852ae8199416f4"}}, -{"id":"ircd","key":"ircd","value":{"rev":"7-3ba7fc2183d32ee1e58e63092d7e82bb"}}, -{"id":"ircdjs","key":"ircdjs","value":{"rev":"15-8fcdff2bf29cf24c3bbc4b461e6cbe9f"}}, -{"id":"irclog","key":"irclog","value":{"rev":"3-79a99bd8048dd98a93c747a1426aabde"}}, -{"id":"ircrpc","key":"ircrpc","value":{"rev":"5-278bec6fc5519fdbd152ea4fa35dc58c"}}, -{"id":"irrklang","key":"irrklang","value":{"rev":"3-65936dfabf7777027069343c2e72b32e"}}, -{"id":"isaacs","key":"isaacs","value":{"rev":"7-c55a41054056f502bc580bc6819d9d1f"}}, -{"id":"isbn","key":"isbn","value":{"rev":"3-51e784ded2e3ec9ef9b382fecd1c26a1"}}, -{"id":"iscroll","key":"iscroll","value":{"rev":"4-4f6635793806507665503605e7c180f0"}}, -{"id":"isodate","key":"isodate","value":{"rev":"7-ea4b1f77e9557b153264f68fd18a9f23"}}, -{"id":"it-is","key":"it-is","value":{"rev":"14-7617f5831c308d1c4ef914bc5dc30fa7"}}, -{"id":"iterator","key":"iterator","value":{"rev":"3-e6f70367a55cabbb89589f2a88be9ab0"}}, -{"id":"itunes","key":"itunes","value":{"rev":"7-47d151c372d70d0bc311141749c84d5a"}}, -{"id":"iws","key":"iws","value":{"rev":"3-dc7b4d18565b79d3e14aa691e5e632f4"}}, -{"id":"jQuery","key":"jQuery","value":{"rev":"29-f913933259b4ec5f4c5ea63466a4bb08"}}, -{"id":"jWorkflow","key":"jWorkflow","value":{"rev":"7-582cd7aa62085ec807117138b6439550"}}, -{"id":"jaCodeMap","key":"jaCodeMap","value":{"rev":"7-28efcbf4146977bdf1e594e0982ec097"}}, -{"id":"jaaulde-cookies","key":"jaaulde-cookies","value":{"rev":"3-d5b5a75f9cabbebb2804f0b4ae93d0c5"}}, -{"id":"jacker","key":"jacker","value":{"rev":"3-888174c7e3e2a5d241f2844257cf1b10"}}, -{"id":"jade","key":"jade","value":{"rev":"144-318a9d9f63906dc3da1ef7c1ee6420b5"}}, -{"id":"jade-browser","key":"jade-browser","value":{"rev":"9-0ae6b9e321cf04e3ca8fbfe0e38f4d9e"}}, -{"id":"jade-client-connect","key":"jade-client-connect","value":{"rev":"5-96dbafafa31187dd7f829af54432de8e"}}, -{"id":"jade-ext","key":"jade-ext","value":{"rev":"9-aac9a58a4e07d82bc496bcc4241d1be0"}}, -{"id":"jade-i18n","key":"jade-i18n","value":{"rev":"23-76a21a41b5376e10c083672dccf7fc62"}}, -{"id":"jade-serial","key":"jade-serial","value":{"rev":"3-5ec712e1d8cd8d5af20ae3e62ee92854"}}, -{"id":"jadedown","key":"jadedown","value":{"rev":"11-0d16ce847d6afac2939eebcb24a7216c"}}, -{"id":"jadeify","key":"jadeify","value":{"rev":"17-4322b68bb5a7e81e839edabbc8c405a4"}}, -{"id":"jadevu","key":"jadevu","value":{"rev":"15-1fd8557a6db3c23f267de76835f9ee65"}}, -{"id":"jah","key":"jah","value":{"rev":"3-f29704037a1cffe2b08abb4283bee4a4"}}, -{"id":"jake","key":"jake","value":{"rev":"36-5cb64b1c5a89ac53eb4d09d66a5b10e1"}}, -{"id":"jammit-express","key":"jammit-express","value":{"rev":"6-e3dfa928114a2721fe9b8882d284f759"}}, -{"id":"janrain","key":"janrain","value":{"rev":"5-9554501be76fb3a472076858d1abbcd5"}}, -{"id":"janrain-api","key":"janrain-api","value":{"rev":"3-f45a65c695f4c72fdd1bf3593d8aa796"}}, -{"id":"jaque","key":"jaque","value":{"rev":"32-7f269a70c67beefc53ba1684bff5a57b"}}, -{"id":"jar","key":"jar","value":{"rev":"3-7fe0ab4aa3a2ccc5d50853f118e7aeb5"}}, -{"id":"jarvis","key":"jarvis","value":{"rev":"3-fb203b29b397a0b12c1ae56240624e3d"}}, -{"id":"jarvis-test","key":"jarvis-test","value":{"rev":"5-9537ddae8291e6dad03bc0e6acc9ac80"}}, -{"id":"jasbin","key":"jasbin","value":{"rev":"25-ae22f276406ac8bb4293d78595ce02ad"}}, -{"id":"jasmine-dom","key":"jasmine-dom","value":{"rev":"17-686de4c573f507c30ff72c6671dc3d93"}}, -{"id":"jasmine-jquery","key":"jasmine-jquery","value":{"rev":"7-86c077497a367bcd9ea96d5ab8137394"}}, -{"id":"jasmine-node","key":"jasmine-node","value":{"rev":"27-4c544c41c69d2b3cb60b9953d1c46d54"}}, -{"id":"jasmine-reporters","key":"jasmine-reporters","value":{"rev":"3-21ba522ae38402848d5a66d3d4d9a2b3"}}, -{"id":"jasmine-runner","key":"jasmine-runner","value":{"rev":"23-7458777b7a6785efc878cfd40ccb99d8"}}, -{"id":"jasminy","key":"jasminy","value":{"rev":"3-ce76023bac40c5f690cba59d430fd083"}}, -{"id":"jason","key":"jason","value":{"rev":"15-394a59963c579ed5db37fada4d082b5c"}}, -{"id":"javiary","key":"javiary","value":{"rev":"5-661be61fd0f47c9609b7d148e298e2fc"}}, -{"id":"jazz","key":"jazz","value":{"rev":"12-d11d602c1240b134b0593425911242fc"}}, -{"id":"jdoc","key":"jdoc","value":{"rev":"3-0c61fdd6b367a9acac710e553927b290"}}, -{"id":"jeesh","key":"jeesh","value":{"rev":"13-23b4e1ecf9ca76685bf7f1bfc6c076f1"}}, -{"id":"jellyfish","key":"jellyfish","value":{"rev":"25-7fef81f9b5ef5d4abbcecb030a433a72"}}, -{"id":"jen","key":"jen","value":{"rev":"3-ab1b07453318b7e0254e1dadbee7868f"}}, -{"id":"jerk","key":"jerk","value":{"rev":"34-e31f26d5e3b700d0a3e5f5a5acf0d381"}}, -{"id":"jessie","key":"jessie","value":{"rev":"19-829b932e57204f3b7833b34f75d6bf2a"}}, -{"id":"jezebel","key":"jezebel","value":{"rev":"15-b67c259e160390064da69a512382e06f"}}, -{"id":"jimi","key":"jimi","value":{"rev":"10-cc4a8325d6b847362a422304a0057231"}}, -{"id":"jinjs","key":"jinjs","value":{"rev":"37-38fcf1989f1b251a35e4ff725118f55e"}}, -{"id":"jinkies","key":"jinkies","value":{"rev":"30-73fec0e854aa31bcbf3ae1ca04462b22"}}, -{"id":"jison","key":"jison","value":{"rev":"52-d03c6f5e2bdd7624d39d93ec5e88c383"}}, -{"id":"jitsu","key":"jitsu","value":{"rev":"164-95083f8275f0bf2834f62027569b4da2"}}, -{"id":"jitter","key":"jitter","value":{"rev":"16-3f7b183aa7922615f4b5b2fb46653477"}}, -{"id":"jj","key":"jj","value":{"rev":"21-1b3f97e9725e1241c96a884c85dc4e30"}}, -{"id":"jjw","key":"jjw","value":{"rev":"13-835c632dfc5df7dd37860bd0b2c1cb38"}}, -{"id":"jkwery","key":"jkwery","value":{"rev":"11-212429c9c9e1872d4e278da055b5ae0a"}}, -{"id":"jmen","key":"jmen","value":{"rev":"3-a0b67d5b84a077061d3fed2ddbf2c6a8"}}, -{"id":"jobmanager","key":"jobmanager","value":{"rev":"15-1a589ede5f10d1ea2f33f1bb91f9b3aa"}}, -{"id":"jobs","key":"jobs","value":{"rev":"12-3072b6164c5dca8fa9d24021719048ff"}}, -{"id":"jobvite","key":"jobvite","value":{"rev":"56-3d69b0e6d91722ef4908b4fe26bb5432"}}, -{"id":"jodoc","key":"jodoc","value":{"rev":"3-7b05c6d7b4c9a9fa85d3348948d2d52d"}}, -{"id":"johnny-mnemonic","key":"johnny-mnemonic","value":{"rev":"3-e8749d4be597f002aae720011b7c9273"}}, -{"id":"join","key":"join","value":{"rev":"5-ab92491dc83b5e8ed5f0cc49e306d5d5"}}, -{"id":"jolokia-client","key":"jolokia-client","value":{"rev":"26-1f93cb53f4a870b94540cdbf7627b1c4"}}, -{"id":"joo","key":"joo","value":{"rev":"11-e0d4a97eceacdd13769bc5f56e059aa7"}}, -{"id":"jools","key":"jools","value":{"rev":"3-9da332d524a117c4d72a58bb45fa34fd"}}, -{"id":"joose","key":"joose","value":{"rev":"22-ef8a1895680ad2f9c1cd73cd1afbb58e"}}, -{"id":"joosex-attribute","key":"joosex-attribute","value":{"rev":"18-119df97dba1ba2631c94d49e3142bbd7"}}, -{"id":"joosex-bridge-ext","key":"joosex-bridge-ext","value":{"rev":"20-5ad2168291aad2cf021df0a3eb103538"}}, -{"id":"joosex-class-simpleconstructor","key":"joosex-class-simpleconstructor","value":{"rev":"6-f71e02e44f611550374ad9f5d0c37fdf"}}, -{"id":"joosex-class-singleton","key":"joosex-class-singleton","value":{"rev":"6-3ba6b8644722b29febe384a368c18aab"}}, -{"id":"joosex-cps","key":"joosex-cps","value":{"rev":"20-493c65faf1ec59416bae475529c51cd4"}}, -{"id":"joosex-meta-lazy","key":"joosex-meta-lazy","value":{"rev":"13-ef8bc4e57006cfcecd72a344d8dc9da6"}}, -{"id":"joosex-namespace-depended","key":"joosex-namespace-depended","value":{"rev":"22-8a38a21f8564470b96082177e81f3db6"}}, -{"id":"joosex-observable","key":"joosex-observable","value":{"rev":"7-52e7018931e5465920bb6feab88aa468"}}, -{"id":"joosex-role-parameterized","key":"joosex-role-parameterized","value":{"rev":"6-65aa4fa4967c4fbe06357ccda5e6f810"}}, -{"id":"joosex-simplerequest","key":"joosex-simplerequest","value":{"rev":"10-12d105b60b8b3ca3a3626ca0ec53892d"}}, -{"id":"josp","key":"josp","value":{"rev":"3-c4fa8445a0d96037e00fe96d007bcf0c"}}, -{"id":"jot","key":"jot","value":{"rev":"3-8fab571ce3ad993f3594f3c2e0fc6915"}}, -{"id":"journey","key":"journey","value":{"rev":"40-efe1fa6c8d735592077c9a24b3b56a03"}}, -{"id":"jpeg","key":"jpeg","value":{"rev":"8-ab437fbaf88f32a7fb625a0b27521292"}}, -{"id":"jq","key":"jq","value":{"rev":"3-9d83287aa9e6aab25590fac9adbab968"}}, -{"id":"jqNode","key":"jqNode","value":{"rev":"3-fcaf2c47aba5637a4a23c64b6fc778cf"}}, -{"id":"jqbuild","key":"jqbuild","value":{"rev":"3-960edcea36784aa9ca135cd922e0cb9b"}}, -{"id":"jqserve","key":"jqserve","value":{"rev":"3-39272c5479aabaafe66ffa26a6eb3bb5"}}, -{"id":"jqtpl","key":"jqtpl","value":{"rev":"54-ce2b62ced4644d5fe24c3a8ebcb4d528"}}, -{"id":"jquajax","key":"jquajax","value":{"rev":"3-a079cb8f3a686faaafe420760e77a330"}}, -{"id":"jquery","key":"jquery","value":{"rev":"27-60fd58bba99d044ffe6e140bafd72595"}}, -{"id":"jquery-browserify","key":"jquery-browserify","value":{"rev":"9-a4e9afd657f3c632229afa356382f6a4"}}, -{"id":"jquery-deferred","key":"jquery-deferred","value":{"rev":"5-0fd0cec51f7424a50f0dba3cbe74fd58"}}, -{"id":"jquery-drive","key":"jquery-drive","value":{"rev":"3-8474f192fed5c5094e56bc91f5e8a0f8"}}, -{"id":"jquery-mousewheel","key":"jquery-mousewheel","value":{"rev":"3-cff81086cf651e52377a8d5052b09d64"}}, -{"id":"jquery-placeholdize","key":"jquery-placeholdize","value":{"rev":"3-7acc3fbda1b8daabce18876d2b4675e3"}}, -{"id":"jquery-tmpl-jst","key":"jquery-tmpl-jst","value":{"rev":"13-575031eb2f2b1e4c5562e195fce0bc93"}}, -{"id":"jquery.effects.blind","key":"jquery.effects.blind","value":{"rev":"3-5f3bec5913edf1bfcee267891f6204e2"}}, -{"id":"jquery.effects.bounce","key":"jquery.effects.bounce","value":{"rev":"3-245b2e7d9a1295dd0f7d568b8087190d"}}, -{"id":"jquery.effects.clip","key":"jquery.effects.clip","value":{"rev":"3-7aa63a590b6d90d5ea20e21c8dda675d"}}, -{"id":"jquery.effects.core","key":"jquery.effects.core","value":{"rev":"3-dd2fa270d8aea21104c2c92d6b06500d"}}, -{"id":"jquery.effects.drop","key":"jquery.effects.drop","value":{"rev":"3-8d0e30016e99460063a9a9000ce7b032"}}, -{"id":"jquery.effects.explode","key":"jquery.effects.explode","value":{"rev":"3-3d5e3bb2fb451f7eeaeb72b6743b6e6c"}}, -{"id":"jquery.effects.fade","key":"jquery.effects.fade","value":{"rev":"3-f362c762053eb278b5db5f92e248c3a5"}}, -{"id":"jquery.effects.fold","key":"jquery.effects.fold","value":{"rev":"3-c7d823c2b25c4f1e6a1801f4b1bc7a2c"}}, -{"id":"jquery.effects.highlight","key":"jquery.effects.highlight","value":{"rev":"3-44ef3c62a6b829382bffa6393cd31ed9"}}, -{"id":"jquery.effects.pulsate","key":"jquery.effects.pulsate","value":{"rev":"3-3cad87635cecc2602d40682cf669d2fe"}}, -{"id":"jquery.effects.scale","key":"jquery.effects.scale","value":{"rev":"3-2c8df02eeed343088e2253d84064a219"}}, -{"id":"jquery.effects.shake","key":"jquery.effects.shake","value":{"rev":"3-d63ab567d484311744d848b520a720c7"}}, -{"id":"jquery.effects.slide","key":"jquery.effects.slide","value":{"rev":"3-9eb5d1075d67045a8fa305e596981934"}}, -{"id":"jquery.effects.transfer","key":"jquery.effects.transfer","value":{"rev":"3-371bc87350ede6da53a40468b63200a9"}}, -{"id":"jquery.tmpl","key":"jquery.tmpl","value":{"rev":"5-75efd6c8c0ce030f2da12b984f9dfe6c"}}, -{"id":"jquery.ui.accordion","key":"jquery.ui.accordion","value":{"rev":"3-964ee7d6c50f31e7db6631da28e2261a"}}, -{"id":"jquery.ui.autocomplete","key":"jquery.ui.autocomplete","value":{"rev":"3-950d240629d142eab5e07c2776e39bcc"}}, -{"id":"jquery.ui.button","key":"jquery.ui.button","value":{"rev":"3-a1c7f3eeb9298ac0c116d75a176a6d17"}}, -{"id":"jquery.ui.core","key":"jquery.ui.core","value":{"rev":"3-b7ba340b7304a304f85c4d13438d1195"}}, -{"id":"jquery.ui.datepicker","key":"jquery.ui.datepicker","value":{"rev":"3-5b76579057f1b870959a06ab833f1972"}}, -{"id":"jquery.ui.dialog","key":"jquery.ui.dialog","value":{"rev":"3-0c314cee86bf67298759efcfd47246f6"}}, -{"id":"jquery.ui.draggable","key":"jquery.ui.draggable","value":{"rev":"3-b7a15d2bdbcdc6f0f3cd6e4522f9f1f3"}}, -{"id":"jquery.ui.droppable","key":"jquery.ui.droppable","value":{"rev":"3-86d8a1558f5e9383b271b4d968ba081d"}}, -{"id":"jquery.ui.mouse","key":"jquery.ui.mouse","value":{"rev":"3-ccb88d773c452c778c694f9f551cb816"}}, -{"id":"jquery.ui.position","key":"jquery.ui.position","value":{"rev":"3-c49c13b38592a363585600b7af54d977"}}, -{"id":"jquery.ui.progressbar","key":"jquery.ui.progressbar","value":{"rev":"3-b28dfadab64f9548b828c42bf870fcc9"}}, -{"id":"jquery.ui.resizable","key":"jquery.ui.resizable","value":{"rev":"3-aa356230544cbe8ab8dc5fab08cc0fa7"}}, -{"id":"jquery.ui.selectable","key":"jquery.ui.selectable","value":{"rev":"3-6b11846c104d580556e40eb5194c45f2"}}, -{"id":"jquery.ui.slider","key":"jquery.ui.slider","value":{"rev":"3-e8550b76bf58a9cbeca9ea91eb763257"}}, -{"id":"jquery.ui.sortable","key":"jquery.ui.sortable","value":{"rev":"3-1ddd981bd720f055fbd5bb1d06df55ad"}}, -{"id":"jquery.ui.tabs","key":"jquery.ui.tabs","value":{"rev":"3-e0514383f4d920b9dc23ef7a7ea4d8af"}}, -{"id":"jquery.ui.widget","key":"jquery.ui.widget","value":{"rev":"3-3a0800fa067c12d013168f74acf21e6d"}}, -{"id":"jqueryify","key":"jqueryify","value":{"rev":"3-2655cf6a45795a8bd138a464e6c18f04"}}, -{"id":"jrep","key":"jrep","value":{"rev":"3-edbcf6931b8a2b3f550727d8b839acc3"}}, -{"id":"js-beautify-node","key":"js-beautify-node","value":{"rev":"3-401cd1c130aaec2c090b578fe8db6290"}}, -{"id":"js-class","key":"js-class","value":{"rev":"5-a63fbb0136dcd602feee72e70674d5db"}}, -{"id":"js-jango","key":"js-jango","value":{"rev":"3-af4e4a7844791617e66a40a1c403bb98"}}, -{"id":"js-loader","key":"js-loader","value":{"rev":"13-8d9729495c1692e47d2cd923e839b4c8"}}, -{"id":"js-manager","key":"js-manager","value":{"rev":"5-6d384a2ce4737f13d417f85689c3c372"}}, -{"id":"js-nts","key":"js-nts","value":{"rev":"3-7d921611b567d2d890bc983c343558ef"}}, -{"id":"js-openstack","key":"js-openstack","value":{"rev":"11-d56996be276fbe6162573575932b1cba"}}, -{"id":"js-select","key":"js-select","value":{"rev":"9-9d20f6d86d9e6f8a84191346288b76ed"}}, -{"id":"js.io","key":"js.io","value":{"rev":"3-c5e16e13372ba592ccf2ac86ee007a1f"}}, -{"id":"js2","key":"js2","value":{"rev":"35-2dc694e48b67252d8787f5e889a07430"}}, -{"id":"js2coffee","key":"js2coffee","value":{"rev":"19-8eeafa894dcc0dc306b02e728543511e"}}, -{"id":"jsDAV","key":"jsDAV","value":{"rev":"11-4ab1935d98372503439b054daef2e78e"}}, -{"id":"jsDump","key":"jsDump","value":{"rev":"5-32d6e4032bd114245356970f0b76a58a"}}, -{"id":"jsSourceCodeParser","key":"jsSourceCodeParser","value":{"rev":"3-78c5e8624ab25fca99a7bb6cd9be402b"}}, -{"id":"jsapp","key":"jsapp","value":{"rev":"3-6758eb2743cc22f723a6612b34c8d943"}}, -{"id":"jscc-node","key":"jscc-node","value":{"rev":"3-5f52dc20dc2a188bc32e7219c9d2f225"}}, -{"id":"jscheckstyle","key":"jscheckstyle","value":{"rev":"5-82021f06a1bd824ac195e0ab8a3b598c"}}, -{"id":"jsclass","key":"jsclass","value":{"rev":"9-2a0656b9497c5a8208a0fefa5aae3350"}}, -{"id":"jsconfig","key":"jsconfig","value":{"rev":"3-b1afef99468f81eff319453623135a56"}}, -{"id":"jscssp","key":"jscssp","value":{"rev":"6-413ad0701e6dbb412e8a01aadb6672c4"}}, -{"id":"jsdata","key":"jsdata","value":{"rev":"5-53f8b26f28291dccfdff8f14e7f4c44c"}}, -{"id":"jsdeferred","key":"jsdeferred","value":{"rev":"8-bc238b921a1fa465503722756a98e9b7"}}, -{"id":"jsdoc","key":"jsdoc","value":{"rev":"3-386eb47a2761a1ad025996232751fba9"}}, -{"id":"jsdog","key":"jsdog","value":{"rev":"11-d4a523898a7c474b5c7b8cb8b24bafe8"}}, -{"id":"jsdom","key":"jsdom","value":{"rev":"63-86bc6b9d8bfdb99b793ac959e126f7ff"}}, -{"id":"jsftp","key":"jsftp","value":{"rev":"35-89cd772521d7ac3cead71c602ddeb819"}}, -{"id":"jsgi","key":"jsgi","value":{"rev":"20-dbef9d8dfb5c9bf1a3b6014159bb305a"}}, -{"id":"jsgi-node","key":"jsgi-node","value":{"rev":"1-8ec0892e521754aaf88684714d306af9"}}, -{"id":"jsgrep","key":"jsgrep","value":{"rev":"7-be19445481acdbbb684fdc2425d88d08"}}, -{"id":"jshelpers","key":"jshelpers","value":{"rev":"11-9509dcdd48bc494de76cae66217ebedb"}}, -{"id":"jshint","key":"jshint","value":{"rev":"34-ed2e7ea0e849126bd9821b86f23b7314"}}, -{"id":"jshint-autofix","key":"jshint-autofix","value":{"rev":"9-abbb3622aa8a47a8890dbbaab0009b6d"}}, -{"id":"jshint-mode","key":"jshint-mode","value":{"rev":"5-06ec066819b93c7ae6782c755a0e2125"}}, -{"id":"jshint-runner","key":"jshint-runner","value":{"rev":"7-6fc8a15e387a4e81e300a54a86a3a240"}}, -{"id":"jshtml","key":"jshtml","value":{"rev":"5-d3e96c31cf1cd2fcf7743defc1631c3a"}}, -{"id":"jsinc","key":"jsinc","value":{"rev":"9-0e4dc3ba04b440085a79d6001232abfc"}}, -{"id":"jslint","key":"jslint","value":{"rev":"10-ab451352333b5f3d29c6cdbab49187dd"}}, -{"id":"jslint-core","key":"jslint-core","value":{"rev":"3-1f874d8cca07b6f007bc80c23ba15e2e"}}, -{"id":"jslint-strict","key":"jslint-strict","value":{"rev":"8-3d694a0f3079691da1866de16f290ea2"}}, -{"id":"jslinux","key":"jslinux","value":{"rev":"13-033cb60c7867aae599863323a97f45c0"}}, -{"id":"jslitmus","key":"jslitmus","value":{"rev":"6-d3f3f82ea1a376acc2b24c69da003409"}}, -{"id":"jsmeter","key":"jsmeter","value":{"rev":"5-7838bb9b970cbaa29a48802c508fd091"}}, -{"id":"jsmin","key":"jsmin","value":{"rev":"6-002ad1b385915e60f895b5e52492fb94"}}, -{"id":"json","key":"json","value":{"rev":"39-1d24fb8c3bdf0ac533bfc52e74420adc"}}, -{"id":"json-browser","key":"json-browser","value":{"rev":"6-883f051c1297cf631adba1c855ff2e13"}}, -{"id":"json-builder","key":"json-builder","value":{"rev":"5-e7a996ff1ef89114ce2ab6de9b653af8"}}, -{"id":"json-command","key":"json-command","value":{"rev":"16-8239cb65563720c42da5562d3a031b09"}}, -{"id":"json-fu","key":"json-fu","value":{"rev":"5-7933c35711cb9d7673d7514fe495c56d"}}, -{"id":"json-line-protocol","key":"json-line-protocol","value":{"rev":"7-98de63467d154b40a029391af8a26042"}}, -{"id":"json-object","key":"json-object","value":{"rev":"7-534cd9680c386c5b9800848755698f2b"}}, -{"id":"json-ref","key":"json-ref","value":{"rev":"3-cd09776d166c3f77013e429737c7e1e9"}}, -{"id":"json-san","key":"json-san","value":{"rev":"7-8683abde23232c1d84266e7a2d5c4527"}}, -{"id":"json-schema","key":"json-schema","value":{"rev":"1-2f323062e7ec80d2ff765da43c7aaa7d"}}, -{"id":"json-sockets","key":"json-sockets","value":{"rev":"26-bfef71c0d9fb4d56010b05f47f142748"}}, -{"id":"json-storage","key":"json-storage","value":{"rev":"3-46139e3a54c0a27e67820df2c7e87dbf"}}, -{"id":"json-storage-model","key":"json-storage-model","value":{"rev":"3-8b77044e192791613cf92b2f3317357f"}}, -{"id":"json-streamify","key":"json-streamify","value":{"rev":"5-d98cd72265fba652481eef6baa980f46"}}, -{"id":"json-streams","key":"json-streams","value":{"rev":"3-e07fc5ca24b33145c8aacf9995d46723"}}, -{"id":"json-tables","key":"json-tables","value":{"rev":"3-37a652b54880487e66ffeee6822b945b"}}, -{"id":"json-template","key":"json-template","value":{"rev":"3-9ee3a101c60ea682fb88759b2df837e4"}}, -{"id":"json2","key":"json2","value":{"rev":"12-bc3d411db772e0947ca58a54c2084073"}}, -{"id":"json2ify","key":"json2ify","value":{"rev":"3-c2d6677cc35e4668c97cf6800a4728d8"}}, -{"id":"json2xml","key":"json2xml","value":{"rev":"3-e955b994479362685e2197b39909dea2"}}, -{"id":"json_req","key":"json_req","value":{"rev":"15-14520bc890cbb0ab4c142b59bf21c9f1"}}, -{"id":"jsonapi","key":"jsonapi","value":{"rev":"11-2b27aaca5643d6a5b3ab38721cf6342f"}}, -{"id":"jsonconfig","key":"jsonconfig","value":{"rev":"5-0072bb54cb0ae5b13eee4f1657ba6a29"}}, -{"id":"jsond","key":"jsond","value":{"rev":"13-7c3622aeb147dae4698608ee32d81b45"}}, -{"id":"jsondate","key":"jsondate","value":{"rev":"3-1da5d30ee1cf7c6d9605a446efd91478"}}, -{"id":"jsonds","key":"jsonds","value":{"rev":"9-af2867869a46787e58c337e700dbf0dd"}}, -{"id":"jsonds2","key":"jsonds2","value":{"rev":"3-e7ed9647cc1ba72e59b625840358c7ca"}}, -{"id":"jsonfiles","key":"jsonfiles","value":{"rev":"3-5e643ba75c401f653f505e7938540d83"}}, -{"id":"jsonify","key":"jsonify","value":{"rev":"3-91207fd1bc11668be7906f74992de6bb"}}, -{"id":"jsonize","key":"jsonize","value":{"rev":"3-4881031480a5326d9f5966189170db25"}}, -{"id":"jsonlint","key":"jsonlint","value":{"rev":"11-88d3c1c395846e7687f410e0dc405469"}}, -{"id":"jsonml","key":"jsonml","value":{"rev":"3-9990d9515fa554b5c7ff8bf8c7bb3308"}}, -{"id":"jsonparse","key":"jsonparse","value":{"rev":"3-569962847a5fd9d65fdf91af9e3e87a5"}}, -{"id":"jsonpointer","key":"jsonpointer","value":{"rev":"5-0310a11e82e9e22a4e5239dee2bc2213"}}, -{"id":"jsonprettify","key":"jsonprettify","value":{"rev":"3-173ae677f2110dfff8cb17dd2b4c68de"}}, -{"id":"jsonreq","key":"jsonreq","value":{"rev":"5-84b47d8c528ea7efa9aae113e5ff53cf"}}, -{"id":"jsonrpc","key":"jsonrpc","value":{"rev":"10-e40ff49715537320cbbbde67378f099e"}}, -{"id":"jsonrpc-ws","key":"jsonrpc-ws","value":{"rev":"7-73c385f3d35dadbdc87927f6a751e3ca"}}, -{"id":"jsonrpc2","key":"jsonrpc2","value":{"rev":"13-71efdea4f551d3a2550fcf5355ea8c8c"}}, -{"id":"jsontool","key":"jsontool","value":{"rev":"14-44bc979d3a8dc9295c825def01e533b4"}}, -{"id":"jsontoxml","key":"jsontoxml","value":{"rev":"8-2640fd26237ab4a45450748d392dd2d2"}}, -{"id":"jsontry","key":"jsontry","value":{"rev":"3-adb3f32f86419ac4b589ce41ab253952"}}, -{"id":"jsorm-i18n","key":"jsorm-i18n","value":{"rev":"3-54347174039512616ed76cc9a37605ea"}}, -{"id":"jsorm-utilities","key":"jsorm-utilities","value":{"rev":"3-187fc9f86ed8d32ebcb6c451fa7cc3c4"}}, -{"id":"jspack","key":"jspack","value":{"rev":"3-84955792d8b57fc301968daf674bace7"}}, -{"id":"jspkg","key":"jspkg","value":{"rev":"5-f5471c37554dad3492021490a70a1190"}}, -{"id":"jspp","key":"jspp","value":{"rev":"8-7607018fa48586f685dda17d77d0999b"}}, -{"id":"jss","key":"jss","value":{"rev":"20-4517b1daeda4f878debddc9f23347f00"}}, -{"id":"jst","key":"jst","value":{"rev":"27-8372bf5c052b6bd6e28f5d2c89b47e49"}}, -{"id":"jstestdriver","key":"jstestdriver","value":{"rev":"3-d26b172af33d6c45fc3dc96b96865714"}}, -{"id":"jstoxml","key":"jstoxml","value":{"rev":"15-c26b77ed5228500238c7b21a3dbdbbb7"}}, -{"id":"jsup","key":"jsup","value":{"rev":"3-54eb8598ae1a49bd1540e482a44a6abc"}}, -{"id":"jthon","key":"jthon","value":{"rev":"5-d578940ac32497839ff48d3f6205e9e2"}}, -{"id":"juggernaut","key":"juggernaut","value":{"rev":"20-15d33218943b9ec64b642e2a4a05e4b8"}}, -{"id":"juggernaut-yoomee","key":"juggernaut-yoomee","value":{"rev":"7-a58d429e46aac76260e236c64d20ff02"}}, -{"id":"jump","key":"jump","value":{"rev":"19-d47e23c31dc623b54e60004b08f6f624"}}, -{"id":"jumprope","key":"jumprope","value":{"rev":"5-98d4e2452f14d3b0996f04882b07d674"}}, -{"id":"junction","key":"junction","value":{"rev":"3-2b73ea17d862b1e95039141e98e53268"}}, -{"id":"jus-config","key":"jus-config","value":{"rev":"5-d2da00317dceb712d82dbfc776122dbe"}}, -{"id":"jus-i18n","key":"jus-i18n","value":{"rev":"3-d146cfc5f3c9aee769390ed921836b6e"}}, -{"id":"jus-task","key":"jus-task","value":{"rev":"13-d127de2a102eef2eb0d1b67810ecd558"}}, -{"id":"justtest","key":"justtest","value":{"rev":"17-467ee4ca606f0447a0c458550552fd0a"}}, -{"id":"jute","key":"jute","value":{"rev":"99-158d262e9126de5026bbfeb3168d9277"}}, -{"id":"jwt","key":"jwt","value":{"rev":"3-4cb8a706d1bc3c300bdadeba781c7bc4"}}, -{"id":"kaffeine","key":"kaffeine","value":{"rev":"47-261825b8d8cdf168387c6a275682dd0b"}}, -{"id":"kafka","key":"kafka","value":{"rev":"9-7465d4092e6322d0b744f017be8ffcea"}}, -{"id":"kahan","key":"kahan","value":{"rev":"5-107bb2dcdb51faaa00aef1e37eff91eb"}}, -{"id":"kahve-ansi","key":"kahve-ansi","value":{"rev":"5-a86d9a3ea56362fa81c8ee9f1ef8f2ef"}}, -{"id":"kahve-cake","key":"kahve-cake","value":{"rev":"3-873b4e553c4ba417c888aadce3b800f6"}}, -{"id":"kahve-classmethod","key":"kahve-classmethod","value":{"rev":"3-08e0a5786edc15539cc6746fe6c65bec"}}, -{"id":"kahve-exception","key":"kahve-exception","value":{"rev":"3-fb9d839cfdc069271cbc10fa27a87f3c"}}, -{"id":"kahve-progress","key":"kahve-progress","value":{"rev":"3-d2fcdd99793a0c3c3a314afb067a3701"}}, -{"id":"kanso","key":"kanso","value":{"rev":"41-2b18ab56cc86313daa840b7b3f63b318"}}, -{"id":"kaph","key":"kaph","value":{"rev":"7-c24622e38cf23bac67459bfe5a0edd63"}}, -{"id":"karait","key":"karait","value":{"rev":"9-a4abc4bc11c747448c4884cb714737c9"}}, -{"id":"kasabi","key":"kasabi","value":{"rev":"3-36cb65aef11d181c532f4549d58944e6"}}, -{"id":"kassit","key":"kassit","value":{"rev":"27-6fafe5122a4dda542a34ba18dddfc9ea"}}, -{"id":"kdtree","key":"kdtree","value":{"rev":"9-177bf5018be1f177d302af1d746b0462"}}, -{"id":"keeper","key":"keeper","value":{"rev":"13-43ce24b6e1fb8ac23c58a78e3e92d137"}}, -{"id":"kestrel","key":"kestrel","value":{"rev":"3-1303ae0617ed1076eed022176c78b0c4"}}, -{"id":"kettle","key":"kettle","value":{"rev":"3-385c10c43df484666148e796840e72c7"}}, -{"id":"keyed_list","key":"keyed_list","value":{"rev":"5-c98d8bc8619300da1a09098bb298bf16"}}, -{"id":"keyframely","key":"keyframely","value":{"rev":"5-586380d2258a099d8fa4748f2688b571"}}, -{"id":"keygrip","key":"keygrip","value":{"rev":"18-4178954fb4f0e26407851104876f1a03"}}, -{"id":"keyjson","key":"keyjson","value":{"rev":"5-96ab1d8b6fa77864883b657360070af4"}}, -{"id":"keymaster","key":"keymaster","value":{"rev":"8-e7eb722489b02991943e9934b8155162"}}, -{"id":"keys","key":"keys","value":{"rev":"12-8b34b8f593667f0c23f1841edb5b6fa3"}}, -{"id":"keysym","key":"keysym","value":{"rev":"13-ec57906511f8f2f896a9e81dc206ea77"}}, -{"id":"keyx","key":"keyx","value":{"rev":"3-80dc49b56e3ba1d280298c36afa2a82c"}}, -{"id":"khronos","key":"khronos","value":{"rev":"3-1a3772db2725c4c3098d5cf4ca2189a4"}}, -{"id":"kindred","key":"kindred","value":{"rev":"5-99c7f4f06e4a47e476f9d75737f719d7"}}, -{"id":"kiokujs","key":"kiokujs","value":{"rev":"8-4b96a9bc1866f58bb263b310e64df403"}}, -{"id":"kiokujs-backend-batch","key":"kiokujs-backend-batch","value":{"rev":"3-4739de0f2e0c01581ce0b02638d3df02"}}, -{"id":"kiokujs-backend-couchdb","key":"kiokujs-backend-couchdb","value":{"rev":"8-53e830e0a7e8ea810883c00ce79bfeef"}}, -{"id":"kiss.js","key":"kiss.js","value":{"rev":"11-7c9b1d7e2faee25ade6f1cad1bb261d9"}}, -{"id":"kissy","key":"kissy","value":{"rev":"8-3f8f7c169a3e84df6a7f68315f13b3ba"}}, -{"id":"kitkat","key":"kitkat","value":{"rev":"41-5f2600e4e1c503f63702c74195ff3361"}}, -{"id":"kitkat-express","key":"kitkat-express","value":{"rev":"3-91ef779ed9acdad1ca6f776e10a70246"}}, -{"id":"kizzy","key":"kizzy","value":{"rev":"5-f281b9e4037eda414f918ec9021e28c9"}}, -{"id":"kjs","key":"kjs","value":{"rev":"3-2ee03262f843e497161f1aef500dd229"}}, -{"id":"kju","key":"kju","value":{"rev":"5-0a7de1cd26864c85a22c7727c660d441"}}, -{"id":"klass","key":"klass","value":{"rev":"39-61491ef3824772d5ef33f7ea04219461"}}, -{"id":"klout-js","key":"klout-js","value":{"rev":"8-8d99f6dad9c21cb5da0d64fefef8c6d6"}}, -{"id":"knid","key":"knid","value":{"rev":"7-2cbfae088155da1044b568584cd296df"}}, -{"id":"knox","key":"knox","value":{"rev":"19-3c42553bd201b23a6bc15fdd073dad17"}}, -{"id":"knox-stream","key":"knox-stream","value":{"rev":"17-e40275f926b6ed645e4ef04caf8e5df4"}}, -{"id":"kns","key":"kns","value":{"rev":"9-5da1a89ad8c08f4b10cd715036200da3"}}, -{"id":"ko","key":"ko","value":{"rev":"9-9df2853d0e9ed9f7740f53291d0035dd"}}, -{"id":"koala","key":"koala","value":{"rev":"8-9e3fea91917f6d8cfb5aae22115e132f"}}, -{"id":"kohai","key":"kohai","value":{"rev":"3-1721a193589459fa077fea809fd7c9a9"}}, -{"id":"koku","key":"koku","value":{"rev":"5-414736980e0e70d90cd7f29b175fb18c"}}, -{"id":"komainu","key":"komainu","value":{"rev":"5-0f1a8f132fe58385e989dd4f93aefa26"}}, -{"id":"komodo-scheme","key":"komodo-scheme","value":{"rev":"3-97d1bd27f069684c491012e079fd82c4"}}, -{"id":"konphyg","key":"konphyg","value":{"rev":"7-e5fc03d6ddf39f2e0723291800bf0d43"}}, -{"id":"kranium","key":"kranium","value":{"rev":"3-4a78d2eb28e949a55b0dbd2ab00cecaf"}}, -{"id":"kue","key":"kue","value":{"rev":"21-053b32204d89a3067c5a90ca62ede08c"}}, -{"id":"kyatchi","key":"kyatchi","value":{"rev":"21-8dfbbe498f3740a2869c82e4ab4522d1"}}, -{"id":"kyoto","key":"kyoto","value":{"rev":"15-b9acdad89d56c71b6f427a443c16f85f"}}, -{"id":"kyoto-client","key":"kyoto-client","value":{"rev":"11-7fb392ee23ce64a48ae5638d713f4fbd"}}, -{"id":"kyoto-tycoon","key":"kyoto-tycoon","value":{"rev":"18-81ece8df26dbd9986efe1d97d935bec2"}}, -{"id":"kyuri","key":"kyuri","value":{"rev":"9-bedd4c087bd7bf612bde5e862d8b91bb"}}, -{"id":"labBuilder","key":"labBuilder","value":{"rev":"11-37f85b5325f1ccf25193c8b737823185"}}, -{"id":"laconic","key":"laconic","value":{"rev":"3-f5b7b9ac113fe7d32cbf4cb0d01c3052"}}, -{"id":"languagedetect","key":"languagedetect","value":{"rev":"3-ac487c034a3470ebd47b54614ea848f9"}}, -{"id":"lastfm","key":"lastfm","value":{"rev":"52-5af213489ca6ecdf2afc851c4642b082"}}, -{"id":"layers","key":"layers","value":{"rev":"7-62cd47d9645faa588c635dab2fbd2ef0"}}, -{"id":"lazy","key":"lazy","value":{"rev":"18-9b5ccdc9c3a970ec4c2b63b6f882da6a"}}, -{"id":"lazy-image","key":"lazy-image","value":{"rev":"5-34a6bc95017c50b3cb69981c7343e5da"}}, -{"id":"lazyBum","key":"lazyBum","value":{"rev":"15-03da6d744ba8cce7efca88ccb7e18c4d"}}, -{"id":"lazyprop","key":"lazyprop","value":{"rev":"14-82b4bcf318094a7950390f03e2fec252"}}, -{"id":"ldapjs","key":"ldapjs","value":{"rev":"11-e2b28e11a0aebe37b758d8f1ed61dd57"}}, -{"id":"ldapjs-riak","key":"ldapjs-riak","value":{"rev":"7-005413a1d4e371663626a3cca200c7e0"}}, -{"id":"ldifgrep","key":"ldifgrep","value":{"rev":"3-e4f06821a3444abbcd3c0c26300dcdda"}}, -{"id":"leaf","key":"leaf","value":{"rev":"8-0ccf5cdd1b59717b53375fe4bf044ec3"}}, -{"id":"lean","key":"lean","value":{"rev":"3-32dbbc771a3f1f6697c21c5d6c516967"}}, -{"id":"leche","key":"leche","value":{"rev":"7-0f5e19052ae1e3cb25ff2aa73271ae4f"}}, -{"id":"leche.spice.io","key":"leche.spice.io","value":{"rev":"3-07db415fdb746873f211e8155ecdf232"}}, -{"id":"less","key":"less","value":{"rev":"37-160fe5ea5dba44f02defdb8ec8c647d5"}}, -{"id":"less-bal","key":"less-bal","value":{"rev":"3-d50532c7c46013a62d06a0e54f8846ce"}}, -{"id":"less4clients","key":"less4clients","value":{"rev":"5-343d2973a166801681c856558d975ddf"}}, -{"id":"lessup","key":"lessup","value":{"rev":"9-a2e7627ef1b493fe82308d019ae481ac"}}, -{"id":"lessweb","key":"lessweb","value":{"rev":"9-e21794e578884c228dbed7c5d6128a41"}}, -{"id":"leveldb","key":"leveldb","value":{"rev":"11-3809e846a7a5ff883d17263288664195"}}, -{"id":"levenshtein","key":"levenshtein","value":{"rev":"6-44d27b6a6bc407772cafc29af485854f"}}, -{"id":"lib","key":"lib","value":{"rev":"5-a95272f11e927888c8b711503fce670b"}}, -{"id":"libdtrace","key":"libdtrace","value":{"rev":"8-4d4f72b2349154da514700f576e34564"}}, -{"id":"liberator","key":"liberator","value":{"rev":"15-b702710ccb3b45e41e9e2f3ebb6375ae"}}, -{"id":"libirc","key":"libirc","value":{"rev":"3-05b125de0c179dd311129aac2e1c8047"}}, -{"id":"liblzg","key":"liblzg","value":{"rev":"5-445ed45dc3cd166a299f85f6149aa098"}}, -{"id":"libnotify","key":"libnotify","value":{"rev":"10-c6723206898865e4828e963f5acc005e"}}, -{"id":"libxml-to-js","key":"libxml-to-js","value":{"rev":"33-64d3152875d33d6feffd618152bc41df"}}, -{"id":"libxmlext","key":"libxmlext","value":{"rev":"3-6a896dacba6f25fbca9b79d4143aaa9a"}}, -{"id":"libxmljs","key":"libxmljs","value":{"rev":"17-4b2949b53d9ecde79a99361774c1144b"}}, -{"id":"libxpm","key":"libxpm","value":{"rev":"3-c03efe75832c4416ceee5d72be12a8ef"}}, -{"id":"libyaml","key":"libyaml","value":{"rev":"5-f279bde715345a4e81d43c1d798ee608"}}, -{"id":"lift","key":"lift","value":{"rev":"21-61dcb771e5e0dc03fa327120d440ccda"}}, -{"id":"light-traits","key":"light-traits","value":{"rev":"26-b35c49550f9380fd462d57c64d51540f"}}, -{"id":"lightnode","key":"lightnode","value":{"rev":"3-ce37ccbf6a6546d4fa500e0eff84e882"}}, -{"id":"limestone","key":"limestone","value":{"rev":"3-d6f76ae98e4189db4ddfa8e15b4cdea9"}}, -{"id":"limited-file","key":"limited-file","value":{"rev":"3-c1d78250965b541836a70d3e867c694f"}}, -{"id":"lin","key":"lin","value":{"rev":"17-0a26ea2a603df0d14a9c40aad96bfb5e"}}, -{"id":"line-parser","key":"line-parser","value":{"rev":"7-84047425699f5a8a8836f4f2e63777bc"}}, -{"id":"line-reader","key":"line-reader","value":{"rev":"9-d2a7cb3a9793149e643490dc16a1eb50"}}, -{"id":"linebuffer","key":"linebuffer","value":{"rev":"12-8e79075aa213ceb49b28e0af7b3f3861"}}, -{"id":"lines","key":"lines","value":{"rev":"9-01a0565f47c3816919ca75bf77539df5"}}, -{"id":"lines-adapter","key":"lines-adapter","value":{"rev":"23-f287561e42a841c00bbf94bc8741bebc"}}, -{"id":"linestream","key":"linestream","value":{"rev":"5-18c2be87653ecf20407ed70eeb601ae7"}}, -{"id":"lingo","key":"lingo","value":{"rev":"10-b3d62b203c4af108feeaf0e32b2a4186"}}, -{"id":"link","key":"link","value":{"rev":"15-7570cea23333dbe3df11fd71171e6226"}}, -{"id":"linkedin-js","key":"linkedin-js","value":{"rev":"22-1bb1f392a9838684076b422840cf98eb"}}, -{"id":"linkscape","key":"linkscape","value":{"rev":"5-7272f50a54b1db015ce6d1e79eeedad7"}}, -{"id":"linkshare","key":"linkshare","value":{"rev":"3-634c4a18a217f77ccd6b89a9a2473d2a"}}, -{"id":"linode-api","key":"linode-api","value":{"rev":"13-2b43281ec86206312a2c387c9fc2c49f"}}, -{"id":"lint","key":"lint","value":{"rev":"49-fb76fddeb3ca609e5cac75fb0b0ec216"}}, -{"id":"linter","key":"linter","value":{"rev":"18-0fc884c96350f860cf2695f615572dba"}}, -{"id":"lintnode","key":"lintnode","value":{"rev":"8-b70bca986d7bde759521d0693dbc28b8"}}, -{"id":"linux-util","key":"linux-util","value":{"rev":"9-d049e8375e9c50b7f2b6268172d79734"}}, -{"id":"liquid","key":"liquid","value":{"rev":"3-353fa3c93ddf1951e3a75d60e6e8757b"}}, -{"id":"liquor","key":"liquor","value":{"rev":"3-4ee78e69a4a400a4de3491b0954947e7"}}, -{"id":"listener","key":"listener","value":{"rev":"5-02b5858d36aa99dcc5fc03c9274c94ee"}}, -{"id":"litmus","key":"litmus","value":{"rev":"9-7e403d052483301d025e9d09b4e7a9dd"}}, -{"id":"littering","key":"littering","value":{"rev":"5-9026438311ffc18d369bfa886c120bcd"}}, -{"id":"live-twitter-map","key":"live-twitter-map","value":{"rev":"3-45a40054bbab23374a4f1743c8bd711d"}}, -{"id":"livereload","key":"livereload","value":{"rev":"5-11ff486b4014ec1998705dbd396e96f2"}}, -{"id":"load","key":"load","value":{"rev":"7-2fff87aeb91d74bc57c134ee2cf0d65b"}}, -{"id":"loadbuilder","key":"loadbuilder","value":{"rev":"9-fa9c5cb13b3af03f9d9fbf5064fa0e0f"}}, -{"id":"loadit","key":"loadit","value":{"rev":"3-51bee062ed0d985757c6ae24929fa74e"}}, -{"id":"local-cdn","key":"local-cdn","value":{"rev":"9-9c2931766a559cf036318583455456e6"}}, -{"id":"localStorage","key":"localStorage","value":{"rev":"3-455fbe195db27131789b5d59db4504b0"}}, -{"id":"locales","key":"locales","value":{"rev":"5-bee452772e2070ec07af0dd86d6dbc41"}}, -{"id":"localhose","key":"localhose","value":{"rev":"9-3a2f63ecbed2e31400ca7515fd020a77"}}, -{"id":"localhost","key":"localhost","value":{"rev":"3-c6c4f6b5688cbe62865010099c9f461f"}}, -{"id":"localhostapp","key":"localhostapp","value":{"rev":"3-17884c4847c549e07e0c881fdf60d01f"}}, -{"id":"localize","key":"localize","value":{"rev":"7-1f83adb6d1eefcf7222a05f489b5db10"}}, -{"id":"location","key":"location","value":{"rev":"3-cc6fbf77b4ade80312bd95fde4e00015"}}, -{"id":"lockfile","key":"lockfile","value":{"rev":"3-4b4b79c2b0f09cc516db1a9d581c5038"}}, -{"id":"lode","key":"lode","value":{"rev":"15-5062a9a0863770d172097c5074a2bdae"}}, -{"id":"log","key":"log","value":{"rev":"12-0aa7922459ff8397764956c56a106930"}}, -{"id":"log-buddy","key":"log-buddy","value":{"rev":"3-64c6d4927d1d235d927f09c16c874e06"}}, -{"id":"log-watcher","key":"log-watcher","value":{"rev":"3-70f8727054c8e4104f835930578f4ee1"}}, -{"id":"log4js","key":"log4js","value":{"rev":"38-137b28e6e96515da7a6399cae86795dc"}}, -{"id":"log4js-amqp","key":"log4js-amqp","value":{"rev":"3-90530c28ef63d4598c12dfcf450929c0"}}, -{"id":"log5","key":"log5","value":{"rev":"17-920e3765dcfdc31bddf13de6895122b3"}}, -{"id":"logbot","key":"logbot","value":{"rev":"3-234eedc70b5474c713832e642f4dc3b4"}}, -{"id":"logger","key":"logger","value":{"rev":"3-5eef338fb5e845a81452fbb22e582aa7"}}, -{"id":"logging","key":"logging","value":{"rev":"22-99d320792c5445bd04699c4cf19edd89"}}, -{"id":"logging-system","key":"logging-system","value":{"rev":"5-5eda9d0b1d04256f5f44abe51cd14626"}}, -{"id":"loggly","key":"loggly","value":{"rev":"49-944a404e188327431a404e5713691a8c"}}, -{"id":"login","key":"login","value":{"rev":"44-7c450fe861230a5121ff294bcd6f97c9"}}, -{"id":"logly","key":"logly","value":{"rev":"7-832fe9af1cd8bfed84a065822cec398a"}}, -{"id":"logmagic","key":"logmagic","value":{"rev":"11-5d2c7dd32ba55e5ab85127be09723ef8"}}, -{"id":"logmonger","key":"logmonger","value":{"rev":"3-07a101d795f43f7af668210660274a7b"}}, -{"id":"lokki","key":"lokki","value":{"rev":"3-f6efcce38029ea0b4889707764088540"}}, -{"id":"long-stack-traces","key":"long-stack-traces","value":{"rev":"7-4b2fe23359b29e188cb2b8936b63891a"}}, -{"id":"loom","key":"loom","value":{"rev":"3-6348ab890611154da4881a0b351b0cb5"}}, -{"id":"loop","key":"loop","value":{"rev":"3-a56e9a6144f573092bb441106b370e0c"}}, -{"id":"looseleaf","key":"looseleaf","value":{"rev":"57-46ef6f055a40c34c714e3e9b9fe5d4cd"}}, -{"id":"lovely","key":"lovely","value":{"rev":"21-f577923512458f02f48ef59eebe55176"}}, -{"id":"lpd","key":"lpd","value":{"rev":"3-433711ae25002f67aa339380668fd491"}}, -{"id":"lpd-printers","key":"lpd-printers","value":{"rev":"3-47060e6c05fb4aad227d36f6e7941227"}}, -{"id":"lru-cache","key":"lru-cache","value":{"rev":"10-23c5e7423fe315745ef924f58c36e119"}}, -{"id":"ls-r","key":"ls-r","value":{"rev":"7-a769b11a06fae8ff439fe7eeb0806b5e"}}, -{"id":"lsof","key":"lsof","value":{"rev":"5-82aa3bcf23b8026a95e469b6188938f9"}}, -{"id":"ltx","key":"ltx","value":{"rev":"21-89ca85a9ce0c9fc13b20c0f1131168b0"}}, -{"id":"lucky-server","key":"lucky-server","value":{"rev":"3-a50d87239166f0ffc374368463f96b07"}}, -{"id":"lunapark","key":"lunapark","value":{"rev":"3-841d197f404da2e63d69b0c2132d87db"}}, -{"id":"lunchbot","key":"lunchbot","value":{"rev":"3-5d8984bef249e3d9e271560b5753f4cf"}}, -{"id":"lw-nun","key":"lw-nun","value":{"rev":"3-b686f89361b7b405e4581db6c60145ed"}}, -{"id":"lw-sass","key":"lw-sass","value":{"rev":"3-e46f90e0c8eab0c8c5d5eb8cf2a9a6da"}}, -{"id":"lwes","key":"lwes","value":{"rev":"3-939bb87efcbede1c1a70de881686fbce"}}, -{"id":"lwink","key":"lwink","value":{"rev":"3-1c432fafe4809e8d4a7e6214123ae452"}}, -{"id":"lzma","key":"lzma","value":{"rev":"3-31dc39414531e329b42b3a4ea0292c43"}}, -{"id":"m1node","key":"m1node","value":{"rev":"11-b34d55bdbc6f65b1814e77fab4a7e823"}}, -{"id":"m1test","key":"m1test","value":{"rev":"3-815ce56949e41e120082632629439eac"}}, -{"id":"m2node","key":"m2node","value":{"rev":"7-f50ec5578d995dd6a0a38e1049604bfc"}}, -{"id":"m2pdb","key":"m2pdb","value":{"rev":"3-ee798ac17c8c554484aceae2f77a826b"}}, -{"id":"m3u","key":"m3u","value":{"rev":"5-7ca6d768e0aed5b88dd45c943ca9ffa0"}}, -{"id":"mac","key":"mac","value":{"rev":"21-db5883c390108ff9ba46660c78b18b6c"}}, -{"id":"macchiato","key":"macchiato","value":{"rev":"5-0df1c87029e6005577fd8fd5cdb25947"}}, -{"id":"macgyver","key":"macgyver","value":{"rev":"3-f517699102b7bd696d8197d7ce57afb9"}}, -{"id":"macros","key":"macros","value":{"rev":"3-8356bcc0d1b1bd3879eeb880b2f3330b"}}, -{"id":"macrotest","key":"macrotest","value":{"rev":"10-2c6ceffb38f8ce5b0f382dbb02720d70"}}, -{"id":"maddy","key":"maddy","value":{"rev":"9-93d59c65c3f44aa6ed43dc986dd73ca5"}}, -{"id":"madmimi-node","key":"madmimi-node","value":{"rev":"11-257e1b1bd5ee5194a7052542952b8b7a"}}, -{"id":"maga","key":"maga","value":{"rev":"24-c69734f9fc138788db741b862f889583"}}, -{"id":"magic","key":"magic","value":{"rev":"34-aed787cc30ab86c95f547b9555d6a381"}}, -{"id":"magic-templates","key":"magic-templates","value":{"rev":"3-89546e9a038150cf419b4b15a84fd2aa"}}, -{"id":"magickal","key":"magickal","value":{"rev":"3-e9ed74bb90df0a52564d47aed0451ce7"}}, -{"id":"mai","key":"mai","value":{"rev":"5-f3561fe6de2bd25201250ddb6dcf9f01"}}, -{"id":"mail","key":"mail","value":{"rev":"14-9ae558552e6a7c11017f118a71c072e9"}}, -{"id":"mail-stack","key":"mail-stack","value":{"rev":"5-c82567203540076cf4878ea1ab197b52"}}, -{"id":"mailbox","key":"mailbox","value":{"rev":"12-0b582e127dd7cf669de16ec36f8056a4"}}, -{"id":"mailchimp","key":"mailchimp","value":{"rev":"23-3d9328ee938b7940322351254ea54877"}}, -{"id":"mailer","key":"mailer","value":{"rev":"40-7b251b758f9dba4667a3127195ea0380"}}, -{"id":"mailer-bal","key":"mailer-bal","value":{"rev":"3-fc8265b1905ea37638309d7c10852050"}}, -{"id":"mailer-fixed","key":"mailer-fixed","value":{"rev":"13-3004df43c62eb64ed5fb0306b019fe66"}}, -{"id":"mailgun","key":"mailgun","value":{"rev":"25-29de1adb355636822dc21fef51f37aed"}}, -{"id":"mailparser","key":"mailparser","value":{"rev":"14-7142e4168046418afc4a76d1b330f302"}}, -{"id":"mailto-parser","key":"mailto-parser","value":{"rev":"3-f8dea7b60c0e993211f81a86dcf5b18d"}}, -{"id":"makeerror","key":"makeerror","value":{"rev":"17-ceb9789357d80467c9ae75caa64ca8ac"}}, -{"id":"malt","key":"malt","value":{"rev":"7-e5e76a842eb0764a5ebe57290b629097"}}, -{"id":"mango","key":"mango","value":{"rev":"7-6224e74a3132e54f294f62998ed9127f"}}, -{"id":"map-reduce","key":"map-reduce","value":{"rev":"11-a81d8bdc6dae7e7b76d5df74fff40ae1"}}, -{"id":"mapnik","key":"mapnik","value":{"rev":"64-693f5b957b7faf361c2cc2a22747ebf7"}}, -{"id":"maptail","key":"maptail","value":{"rev":"14-8334618ddc20006a5f77ff35b172c152"}}, -{"id":"marak","key":"marak","value":{"rev":"3-27be187af00fc97501035dfb97a11ecf"}}, -{"id":"markdoc","key":"markdoc","value":{"rev":"13-23becdeda44b26ee54c9aaa31457e4ba"}}, -{"id":"markdom","key":"markdom","value":{"rev":"10-3c0df12e4f4a2e675d0f0fde48aa425f"}}, -{"id":"markdown","key":"markdown","value":{"rev":"19-88e02c28ce0179be900bf9e6aadc070f"}}, -{"id":"markdown-js","key":"markdown-js","value":{"rev":"6-964647c2509850358f70f4e23670fbeb"}}, -{"id":"markdown-wiki","key":"markdown-wiki","value":{"rev":"6-ce35fb0612a463db5852c5d3dcc7fdd3"}}, -{"id":"markdown2html","key":"markdown2html","value":{"rev":"3-549babe5d9497785fa8b9305c81d7214"}}, -{"id":"marked","key":"marked","value":{"rev":"21-9371df65f63131c9f24e8805db99a7d9"}}, -{"id":"markov","key":"markov","value":{"rev":"13-9ab795448c54ef87851f1392d6f3671a"}}, -{"id":"maryjane","key":"maryjane","value":{"rev":"3-e2e6cce443850b5df1554bf851d16760"}}, -{"id":"massagist","key":"massagist","value":{"rev":"11-cac3a103aecb4ff3f0f607aca2b1d3fb"}}, -{"id":"masson","key":"masson","value":{"rev":"10-87a5e6fd05bd4b8697fa3fa636238c20"}}, -{"id":"masstransit","key":"masstransit","value":{"rev":"11-74898c746e541ff1a00438017ee66d4a"}}, -{"id":"matchmaker","key":"matchmaker","value":{"rev":"3-192db6fb162bdf84fa3e858092fd3e20"}}, -{"id":"math","key":"math","value":{"rev":"5-16a74d8639e44a5ccb265ab1a3b7703b"}}, -{"id":"math-lexer","key":"math-lexer","value":{"rev":"19-54b42374b0090eeee50f39cb35f2eb40"}}, -{"id":"matrices","key":"matrices","value":{"rev":"43-06d64271a5148f89d649645712f8971f"}}, -{"id":"matrix","key":"matrix","value":{"rev":"3-77cff57242445cf3d76313b72bbc38f4"}}, -{"id":"matrixlib","key":"matrixlib","value":{"rev":"11-b3c105a5e5be1835183e7965d04825d9"}}, -{"id":"matterhorn","key":"matterhorn","value":{"rev":"9-a310dba2ea054bdce65e6df2f6ae85e5"}}, -{"id":"matterhorn-dust","key":"matterhorn-dust","value":{"rev":"3-2fb311986d62cf9f180aa76038ebf7b3"}}, -{"id":"matterhorn-gui","key":"matterhorn-gui","value":{"rev":"3-7921b46c9bff3ee82e4b32bc0a0a977d"}}, -{"id":"matterhorn-prng","key":"matterhorn-prng","value":{"rev":"3-c33fd59c1f1d24fb423553ec242e444b"}}, -{"id":"matterhorn-standard","key":"matterhorn-standard","value":{"rev":"13-0aaab6ecf55cdad6f773736da968afba"}}, -{"id":"matterhorn-state","key":"matterhorn-state","value":{"rev":"3-0ba8fd8a4c644b18aff34f1aef95db33"}}, -{"id":"matterhorn-user","key":"matterhorn-user","value":{"rev":"17-e42dc37a5cb24710803b3bd8dee7484d"}}, -{"id":"matterhorn-view","key":"matterhorn-view","value":{"rev":"3-b39042d665f5912d02e724d33d129a97"}}, -{"id":"mbtiles","key":"mbtiles","value":{"rev":"41-b92035d0ec8f47850734c4bb995baf7d"}}, -{"id":"mcast","key":"mcast","value":{"rev":"8-559b2b09cfa34cb88c16ae72ec90d28a"}}, -{"id":"md5","key":"md5","value":{"rev":"3-43d600c70f6442d3878c447585bf43bf"}}, -{"id":"mdgram","key":"mdgram","value":{"rev":"15-4d65cf0d5edef976de9a612c0cde0907"}}, -{"id":"mdns","key":"mdns","value":{"rev":"11-8b6789c3779fce7f019f9f10c625147a"}}, -{"id":"mecab-binding","key":"mecab-binding","value":{"rev":"3-3395763d23a3f8e3e00ba75cb988f9b4"}}, -{"id":"mechanize","key":"mechanize","value":{"rev":"5-94b72f43e270aa24c00e283fa52ba398"}}, -{"id":"mediatags","key":"mediatags","value":{"rev":"3-d5ea41e140fbbc821590cfefdbd016a5"}}, -{"id":"mediator","key":"mediator","value":{"rev":"3-42aac2225b47f72f97001107a3d242f5"}}, -{"id":"memcache","key":"memcache","value":{"rev":"5-aebcc4babe11b654afd3cede51e945ec"}}, -{"id":"memcached","key":"memcached","value":{"rev":"9-7c46464425c78681a8e6767ef9993c4c"}}, -{"id":"memcouchd","key":"memcouchd","value":{"rev":"3-b57b9fb4f6c60604f616c2f70456b4d6"}}, -{"id":"meme","key":"meme","value":{"rev":"11-53fcb51e1d8f8908b95f0fa12788e9aa"}}, -{"id":"memo","key":"memo","value":{"rev":"9-3a9ca97227ed19cacdacf10ed193ee8b"}}, -{"id":"memoize","key":"memoize","value":{"rev":"15-44bdd127c49035c8bd781a9299c103c2"}}, -{"id":"memoizer","key":"memoizer","value":{"rev":"9-d9a147e8c8a58fd7e8f139dc902592a6"}}, -{"id":"memorystream","key":"memorystream","value":{"rev":"9-6d0656067790e158f3c4628968ed70d3"}}, -{"id":"memstore","key":"memstore","value":{"rev":"5-03dcac59882c8a434e4c2fe2ac354941"}}, -{"id":"mercury","key":"mercury","value":{"rev":"3-147af865af6f7924f44f14f4b5c14dac"}}, -{"id":"mersenne","key":"mersenne","value":{"rev":"7-d8ae550eb8d0deaa1fd60f86351cb548"}}, -{"id":"meryl","key":"meryl","value":{"rev":"23-2c0e3fad99005109c584530e303bc5bf"}}, -{"id":"mesh","key":"mesh","value":{"rev":"5-f3ea4aef5b3f169eab8b518e5044c950"}}, -{"id":"meta-promise","key":"meta-promise","value":{"rev":"5-0badf85ab432341e6256252463468b89"}}, -{"id":"meta-test","key":"meta-test","value":{"rev":"49-92df2922499960ac750ce96d861ddd7e"}}, -{"id":"meta_code","key":"meta_code","value":{"rev":"7-9b4313c0c52a09c788464f1fea05baf7"}}, -{"id":"metamanager","key":"metamanager","value":{"rev":"5-dbb0312dad15416d540eb3d860fbf205"}}, -{"id":"metaweblog","key":"metaweblog","value":{"rev":"3-d3ab090ec27242e220412d6413e388ee"}}, -{"id":"metric","key":"metric","value":{"rev":"3-8a706db5b518421ad640a75e65cb4be9"}}, -{"id":"metrics","key":"metrics","value":{"rev":"13-62e5627c1ca5e6d3b3bde8d17e675298"}}, -{"id":"metrics-broker","key":"metrics-broker","value":{"rev":"15-0fdf57ea4ec84aa1f905f53b4975e72d"}}, -{"id":"mhash","key":"mhash","value":{"rev":"3-f00d65dc939474a5c508d37a327e5074"}}, -{"id":"micro","key":"micro","value":{"rev":"17-882c0ecf34ddaef5c673c547ae80b80b"}}, -{"id":"microcache","key":"microcache","value":{"rev":"3-ef75e04bc6e86d14f93ad9c429503bd9"}}, -{"id":"microevent","key":"microevent","value":{"rev":"3-9c0369289b62873ef6e8624eef724d15"}}, -{"id":"microtest","key":"microtest","value":{"rev":"11-11afdadfb15c1db030768ce52f34de1a"}}, -{"id":"microtime","key":"microtime","value":{"rev":"20-5f75e87316cbb5f7a4be09142cd755e5"}}, -{"id":"middlefiddle","key":"middlefiddle","value":{"rev":"13-bb94c05d75c24bdeb23a4637c7ecf55e"}}, -{"id":"middleware","key":"middleware","value":{"rev":"5-80937a4c620fcc2a5532bf064ec0837b"}}, -{"id":"midi","key":"midi","value":{"rev":"9-96da6599a84a761430adfd41deb3969a"}}, -{"id":"midi-js","key":"midi-js","value":{"rev":"11-1d174af1352e3d37f6ec0df32d56ce1a"}}, -{"id":"migrate","key":"migrate","value":{"rev":"13-7493879fb60a31b9e2a9ad19e94bfef6"}}, -{"id":"mikronode","key":"mikronode","value":{"rev":"31-1edae4ffbdb74c43ea584a7757dacc9b"}}, -{"id":"milk","key":"milk","value":{"rev":"21-81fb117817ed2e4c19e16dc310c09735"}}, -{"id":"millstone","key":"millstone","value":{"rev":"29-73d54de4b4de313b0fec4edfaec741a4"}}, -{"id":"mime","key":"mime","value":{"rev":"33-de72b641474458cb21006dea6a524ceb"}}, -{"id":"mime-magic","key":"mime-magic","value":{"rev":"13-2df6b966d7f29d5ee2dd2e1028d825b1"}}, -{"id":"mimelib","key":"mimelib","value":{"rev":"9-7994cf0fe3007329b9397f4e08481487"}}, -{"id":"mimelib-noiconv","key":"mimelib-noiconv","value":{"rev":"5-c84995d4b2bbe786080c9b54227b5bb4"}}, -{"id":"mimeograph","key":"mimeograph","value":{"rev":"37-bead083230f48f354f3ccac35e11afc0"}}, -{"id":"mimeparse","key":"mimeparse","value":{"rev":"8-5ca7e6702fe7f1f37ed31b05e82f4a87"}}, -{"id":"mingy","key":"mingy","value":{"rev":"19-09b19690c55abc1e940374e25e9a0d26"}}, -{"id":"mini-lzo-wrapper","key":"mini-lzo-wrapper","value":{"rev":"4-d751d61f481363a2786ac0312893dfca"}}, -{"id":"miniee","key":"miniee","value":{"rev":"5-be0833a9f15382695f861a990f3d6108"}}, -{"id":"minifyjs","key":"minifyjs","value":{"rev":"13-f255df8c7567440bc4c0f8eaf04a18c6"}}, -{"id":"minimal","key":"minimal","value":{"rev":"5-6be6b3454d30c59a30f9ee8af0ee606c"}}, -{"id":"minimal-test","key":"minimal-test","value":{"rev":"15-65dca2c1ee27090264577cc8b93983cb"}}, -{"id":"minimatch","key":"minimatch","value":{"rev":"11-449e570c76f4e6015c3dc90f080f8c47"}}, -{"id":"minirpc","key":"minirpc","value":{"rev":"10-e85b92273a97fa86e20faef7a3b50518"}}, -{"id":"ministore","key":"ministore","value":{"rev":"11-f131868141ccd0851bb91800c86dfff1"}}, -{"id":"minitest","key":"minitest","value":{"rev":"13-c92e32499a25ff2d7e484fbbcabe1081"}}, -{"id":"miniweb","key":"miniweb","value":{"rev":"3-e8c413a77e24891138eaa9e73cb08715"}}, -{"id":"minj","key":"minj","value":{"rev":"9-ccf50caf8e38b0fc2508f01a63f80510"}}, -{"id":"minotaur","key":"minotaur","value":{"rev":"29-6d048956b26e8a213f6ccc96027bacde"}}, -{"id":"mirror","key":"mirror","value":{"rev":"21-01bdd78ff03ca3f8f99fce104baab9f9"}}, -{"id":"misao-chan","key":"misao-chan","value":{"rev":"13-f032690f0897fc4a1dc12f1e03926627"}}, -{"id":"mite.node","key":"mite.node","value":{"rev":"13-0bfb15c4a6f172991756660b29869dd4"}}, -{"id":"mixable","key":"mixable","value":{"rev":"3-bc518ab862a6ceacc48952b9bec7d61a"}}, -{"id":"mixin","key":"mixin","value":{"rev":"3-3a7ae89345d21ceaf545d93b20caf2f2"}}, -{"id":"mixinjs","key":"mixinjs","value":{"rev":"3-064173d86b243316ef1b6c5743a60bf9"}}, -{"id":"mixpanel","key":"mixpanel","value":{"rev":"7-f742248bfbfc480658c4c46f7ab7a74a"}}, -{"id":"mixpanel-api","key":"mixpanel-api","value":{"rev":"5-61a3fa28921887344d1af339917e147a"}}, -{"id":"mixpanel_api","key":"mixpanel_api","value":{"rev":"3-11939b6fd20b80bf9537380875bf3996"}}, -{"id":"mjoe","key":"mjoe","value":{"rev":"3-8b3549cd6edcc03112217370b071b076"}}, -{"id":"mjsunit.runner","key":"mjsunit.runner","value":{"rev":"12-94c779b555069ca5fb0bc9688515673e"}}, -{"id":"mkdir","key":"mkdir","value":{"rev":"3-e8fd61b35638f1f3a65d36f09344ff28"}}, -{"id":"mkdirp","key":"mkdirp","value":{"rev":"15-c8eacf17b336ea98d1d9960f02362cbf"}}, -{"id":"mmap","key":"mmap","value":{"rev":"16-df335eb3257dfbd2fb0de341970d2656"}}, -{"id":"mmikulicic-thrift","key":"mmikulicic-thrift","value":{"rev":"3-f4a9f7a97bf50e966d1184fba423a07f"}}, -{"id":"mmmodel","key":"mmmodel","value":{"rev":"7-00d61723742a325aaaa6955ba52cef60"}}, -{"id":"mmodel","key":"mmodel","value":{"rev":"3-717309af27d6c5d98ed188c9c9438a37"}}, -{"id":"mmseg","key":"mmseg","value":{"rev":"17-794d553e67d6023ca3d58dd99fe1da15"}}, -{"id":"mobilize","key":"mobilize","value":{"rev":"25-8a657ec0accf8db2e8d7b935931ab77b"}}, -{"id":"mock","key":"mock","value":{"rev":"3-d8805bff4796462750071cddd3f75ea7"}}, -{"id":"mock-request","key":"mock-request","value":{"rev":"7-4ac4814c23f0899b1100d5f0617e40f4"}}, -{"id":"mock-request-response","key":"mock-request-response","value":{"rev":"5-fe1566c9881039a92a80e0e82a95f096"}}, -{"id":"mocket","key":"mocket","value":{"rev":"13-9001879cd3cb6f52f3b2d85fb14b8f9b"}}, -{"id":"modbus-stack","key":"modbus-stack","value":{"rev":"7-50c56e74d9cb02c5d936b0b44c54f621"}}, -{"id":"model","key":"model","value":{"rev":"3-174181c2f314f35fc289b7a921ba4d39"}}, -{"id":"models","key":"models","value":{"rev":"8-6cc2748edfd96679f9bb3596864874a9"}}, -{"id":"modestmaps","key":"modestmaps","value":{"rev":"8-79265968137a2327f98bfc6943a84da9"}}, -{"id":"modjewel","key":"modjewel","value":{"rev":"3-73efc7b9dc24d82cab1de249896193fd"}}, -{"id":"modlr","key":"modlr","value":{"rev":"17-ccf16db98ab6ccb95e005b3bb76dba64"}}, -{"id":"module-grapher","key":"module-grapher","value":{"rev":"19-b6ba30b41e29fc01d4b679a643f030e5"}}, -{"id":"modulr","key":"modulr","value":{"rev":"15-8e8ffd75c6c6149206de4ce0c2aefad7"}}, -{"id":"mogile","key":"mogile","value":{"rev":"5-79a8af20dbe6bff166ac2197a3998b0c"}}, -{"id":"mojo","key":"mojo","value":{"rev":"25-1d9c26d6afd6ea77253f220d86d60307"}}, -{"id":"monad","key":"monad","value":{"rev":"10-cf20354900b7e67d94c342feb06a1eb9"}}, -{"id":"mongeese","key":"mongeese","value":{"rev":"3-f4b319d98f9f73fb17cd3ebc7fc86412"}}, -{"id":"mongo-pool","key":"mongo-pool","value":{"rev":"3-215481828e69fd874b5938a79a7e0934"}}, -{"id":"mongodb","key":"mongodb","value":{"rev":"147-3dc09965e762787f34131a8739297383"}}, -{"id":"mongodb-async","key":"mongodb-async","value":{"rev":"7-ba9097bdc86b72885fa5a9ebb49a64d0"}}, -{"id":"mongodb-provider","key":"mongodb-provider","value":{"rev":"5-5523643b403e969e0b80c57db08cb9d3"}}, -{"id":"mongodb-rest","key":"mongodb-rest","value":{"rev":"36-60b4abc4a22f31de09407cc7cdd0834f"}}, -{"id":"mongodb-wrapper","key":"mongodb-wrapper","value":{"rev":"13-7a6c5eaff36ede45211aa80f3a506cfe"}}, -{"id":"mongodb_heroku","key":"mongodb_heroku","value":{"rev":"3-05947c1e06e1f8860c7809b063a8d1a0"}}, -{"id":"mongode","key":"mongode","value":{"rev":"11-faa14f050da4a165e2568d413a6b8bc0"}}, -{"id":"mongojs","key":"mongojs","value":{"rev":"26-a628eb51534ffcdd97c1a940d460a52c"}}, -{"id":"mongolia","key":"mongolia","value":{"rev":"76-711c39de0e152e224d4118c9b0de834f"}}, -{"id":"mongolian","key":"mongolian","value":{"rev":"44-3773671b31c406a18cb9f5a1764ebee4"}}, -{"id":"mongoose","key":"mongoose","value":{"rev":"181-03a8aa7f691cbd987995bf6e3354e0f5"}}, -{"id":"mongoose-admin","key":"mongoose-admin","value":{"rev":"7-59078ad5a345e9e66574346d3e70f9ad"}}, -{"id":"mongoose-auth","key":"mongoose-auth","value":{"rev":"49-87c79f3a6164c438a53b7629be87ae5d"}}, -{"id":"mongoose-autoincr","key":"mongoose-autoincr","value":{"rev":"3-9c4dd7c3fdcd8621166665a68fccb602"}}, -{"id":"mongoose-closures","key":"mongoose-closures","value":{"rev":"3-2ff9cff790f387f2236a2c7382ebb55b"}}, -{"id":"mongoose-crypt","key":"mongoose-crypt","value":{"rev":"3-d77ffbf250e39fcc290ad37824fe2236"}}, -{"id":"mongoose-dbref","key":"mongoose-dbref","value":{"rev":"29-02090b9904fd6f5ce72afcfa729f7c96"}}, -{"id":"mongoose-flatmatcher","key":"mongoose-flatmatcher","value":{"rev":"5-4f0565901e8b588cc562ae457ad975a6"}}, -{"id":"mongoose-helpers","key":"mongoose-helpers","value":{"rev":"3-3a57e9819e24c9b0f5b5eabe41037092"}}, -{"id":"mongoose-joins","key":"mongoose-joins","value":{"rev":"3-9bae444730a329473421f50cba1c86a7"}}, -{"id":"mongoose-misc","key":"mongoose-misc","value":{"rev":"3-bcd7f3f450cf6ed233d042ac574409ce"}}, -{"id":"mongoose-relationships","key":"mongoose-relationships","value":{"rev":"9-6155a276b162ec6593b8542f0f769024"}}, -{"id":"mongoose-rest","key":"mongoose-rest","value":{"rev":"29-054330c035adf842ab34423215995113"}}, -{"id":"mongoose-spatial","key":"mongoose-spatial","value":{"rev":"3-88660dabd485edcaa29a2ea01afb90bd"}}, -{"id":"mongoose-temporal","key":"mongoose-temporal","value":{"rev":"3-1dd736395fe9be95498e588df502b7bb"}}, -{"id":"mongoose-types","key":"mongoose-types","value":{"rev":"13-8126458b91ef1bf46e582042f5dbd015"}}, -{"id":"mongoose-units","key":"mongoose-units","value":{"rev":"3-5fcdb7aedb1d5cff6e18ee1352c3d0f7"}}, -{"id":"mongoq","key":"mongoq","value":{"rev":"11-2060d674d5f8a964e800ed4470b92587"}}, -{"id":"mongoskin","key":"mongoskin","value":{"rev":"13-5a7bfacd9e9b95ec469f389751e7e435"}}, -{"id":"mongous","key":"mongous","value":{"rev":"3-4d98b4a4bfdd6d9f46342002a69d8d3a"}}, -{"id":"mongrel2","key":"mongrel2","value":{"rev":"3-93156356e478f30fc32455054e384b80"}}, -{"id":"monguava","key":"monguava","value":{"rev":"9-69ec50128220aba3e16128a4be2799c0"}}, -{"id":"mongueue","key":"mongueue","value":{"rev":"9-fc8d9df5bf15f5a25f68cf58866f11fe"}}, -{"id":"moniker","key":"moniker","value":{"rev":"5-a139616b725ddfdd1db6a376fb6584f7"}}, -{"id":"monitor","key":"monitor","value":{"rev":"56-44d2b8b7dec04b3f320f7dc4a1704c53"}}, -{"id":"monome","key":"monome","value":{"rev":"3-2776736715cbfc045bf7b42e70ccda9c"}}, -{"id":"monomi","key":"monomi","value":{"rev":"6-b6b745441f157cc40c846d23cd14297a"}}, -{"id":"moof","key":"moof","value":{"rev":"13-822b4ebf873b720bd4c7e16fcbbbbb3d"}}, -{"id":"moonshado","key":"moonshado","value":{"rev":"3-b54de1aef733c8fa118fa7cf6af2fb9b"}}, -{"id":"moose","key":"moose","value":{"rev":"5-e11c8b7c09826e3431ed3408ee874779"}}, -{"id":"mootools","key":"mootools","value":{"rev":"9-39f5535072748ccd3cf0212ef4c3d4fa"}}, -{"id":"mootools-array","key":"mootools-array","value":{"rev":"3-d1354704a9fe922d969c2bf718e0dc53"}}, -{"id":"mootools-browser","key":"mootools-browser","value":{"rev":"3-ce0946b357b6ddecc128febef2c5d720"}}, -{"id":"mootools-class","key":"mootools-class","value":{"rev":"3-0ea815d28b61f3880087e3f4b8668354"}}, -{"id":"mootools-class-extras","key":"mootools-class-extras","value":{"rev":"3-575796745bd169c35f4fc0019bb36b76"}}, -{"id":"mootools-client","key":"mootools-client","value":{"rev":"3-b658c331f629f80bfe17c3e6ed44c525"}}, -{"id":"mootools-cookie","key":"mootools-cookie","value":{"rev":"3-af93588531e5a52c76a8e7a4eac3612a"}}, -{"id":"mootools-core","key":"mootools-core","value":{"rev":"3-01b1678fc56d94d29566b7853ad56059"}}, -{"id":"mootools-domready","key":"mootools-domready","value":{"rev":"3-0fc6620e2c8f7d107816cace9c099633"}}, -{"id":"mootools-element","key":"mootools-element","value":{"rev":"3-bac857c1701c91207d1ec6d1eb002d07"}}, -{"id":"mootools-element-dimensions","key":"mootools-element-dimensions","value":{"rev":"3-d82df62b3e97122ad0a7668efb7ba776"}}, -{"id":"mootools-element-event","key":"mootools-element-event","value":{"rev":"3-a30380151989ca31851cf751fcd55e9a"}}, -{"id":"mootools-element-style","key":"mootools-element-style","value":{"rev":"3-6103fa8551a21dc592e410dc7df647f8"}}, -{"id":"mootools-event","key":"mootools-event","value":{"rev":"3-7327279ec157de8c47f3ee24615ead95"}}, -{"id":"mootools-function","key":"mootools-function","value":{"rev":"3-eb3ee17acf40d6cc05463cb88edc6f5e"}}, -{"id":"mootools-fx","key":"mootools-fx","value":{"rev":"3-757ab6c8423e8c434d1ee783ea28cdb5"}}, -{"id":"mootools-fx-css","key":"mootools-fx-css","value":{"rev":"3-8eb0cf468c826b9c485835fab94837e7"}}, -{"id":"mootools-fx-morph","key":"mootools-fx-morph","value":{"rev":"3-b91310f8a81221592970fe7632bd9f7a"}}, -{"id":"mootools-fx-transitions","key":"mootools-fx-transitions","value":{"rev":"3-a1ecde35dfbb80f3a6062005758bb934"}}, -{"id":"mootools-fx-tween","key":"mootools-fx-tween","value":{"rev":"3-39497defbffdf463932cc9f00cde8d5d"}}, -{"id":"mootools-json","key":"mootools-json","value":{"rev":"3-69deb6679a5d1d49f22e19834ae07c32"}}, -{"id":"mootools-more","key":"mootools-more","value":{"rev":"3-d8f46ce319ca0e3deb5fc04ad5f73cb9"}}, -{"id":"mootools-number","key":"mootools-number","value":{"rev":"3-9f4494883ac39f93734fea9af6ef2fc5"}}, -{"id":"mootools-object","key":"mootools-object","value":{"rev":"3-c9632dfa793ab4d9ad4b68a2e27f09fc"}}, -{"id":"mootools-request","key":"mootools-request","value":{"rev":"3-663e5472f351eea3b7488ee441bc6a61"}}, -{"id":"mootools-request-html","key":"mootools-request-html","value":{"rev":"3-0ab9576c11a564d44b3c3ca3ef3dc240"}}, -{"id":"mootools-request-json","key":"mootools-request-json","value":{"rev":"3-c0359201c94ba1684ea6336e35cd70c2"}}, -{"id":"mootools-server","key":"mootools-server","value":{"rev":"3-98e89499f6eab137bbab053a3932a526"}}, -{"id":"mootools-slick-finder","key":"mootools-slick-finder","value":{"rev":"3-9a5820e90d6ea2d797268f3c60a9f177"}}, -{"id":"mootools-slick-parser","key":"mootools-slick-parser","value":{"rev":"3-d4e6b1673e6e2a6bcc66bf4988b2994d"}}, -{"id":"mootools-string","key":"mootools-string","value":{"rev":"3-2fda1c7915295df62e547018a7f05916"}}, -{"id":"mootools-swiff","key":"mootools-swiff","value":{"rev":"3-f0edeead85f3d48cf2af2ca35a4e67a5"}}, -{"id":"mootools.js","key":"mootools.js","value":{"rev":"3-085e50e3529d19e1d6ad630027ba51dc"}}, -{"id":"morestreams","key":"morestreams","value":{"rev":"7-3d0145c2cfb9429dfdcfa872998c9fe8"}}, -{"id":"morpheus","key":"morpheus","value":{"rev":"45-04335640f709335d1828523425a87909"}}, -{"id":"morton","key":"morton","value":{"rev":"11-abd787350e21bef65c1c6776e40a0753"}}, -{"id":"mothermayi","key":"mothermayi","value":{"rev":"5-2c46f9873efd19f543def5eeda0a05f1"}}, -{"id":"mountable-proxy","key":"mountable-proxy","value":{"rev":"7-3b91bd0707447885676727ad183bb051"}}, -{"id":"move","key":"move","value":{"rev":"69-ce11c235c78de6d6184a86aaa93769eb"}}, -{"id":"moviesearch","key":"moviesearch","value":{"rev":"3-72e77965a44264dfdd5af23e4a36d2ce"}}, -{"id":"mp","key":"mp","value":{"rev":"3-47899fb2bdaf21dda16abd037b325c3b"}}, -{"id":"mpdsocket","key":"mpdsocket","value":{"rev":"3-2dd4c9bb019f3f491c55364be7a56229"}}, -{"id":"mrcolor","key":"mrcolor","value":{"rev":"3-4695b11798a65c61714b8f236a40936c"}}, -{"id":"msgbus","key":"msgbus","value":{"rev":"27-a5d861b55c933842226d4e536820ec99"}}, -{"id":"msgme","key":"msgme","value":{"rev":"3-d1968af1234a2059eb3d84eb76cdaa4e"}}, -{"id":"msgpack","key":"msgpack","value":{"rev":"9-ecf7469392d87460ddebef2dd369b0e5"}}, -{"id":"msgpack-0.4","key":"msgpack-0.4","value":{"rev":"3-5d509ddba6c53ed6b8dfe4afb1d1661d"}}, -{"id":"msgpack2","key":"msgpack2","value":{"rev":"4-63b8f3ccf35498eb5c8bd9b8d683179b"}}, -{"id":"mu","key":"mu","value":{"rev":"7-7a8ce1cba5d6d98e696c4e633aa081fa"}}, -{"id":"mu2","key":"mu2","value":{"rev":"3-4ade1c5b1496c720312beae1822da9de"}}, -{"id":"mud","key":"mud","value":{"rev":"66-56e1b1a1e5af14c3df0520c58358e7cd"}}, -{"id":"muffin","key":"muffin","value":{"rev":"22-210c45a888fe1f095becdcf11876a2bc"}}, -{"id":"multi-node","key":"multi-node","value":{"rev":"1-224161d875f0e1cbf4b1e249603c670a"}}, -{"id":"multicast-eventemitter","key":"multicast-eventemitter","value":{"rev":"13-ede3e677d6e21bbfe42aad1b549a137c"}}, -{"id":"multimeter","key":"multimeter","value":{"rev":"7-847f45a6f592a8410a77d3e5efb5cbf3"}}, -{"id":"multipart-stack","key":"multipart-stack","value":{"rev":"9-85aaa2ed2180d3124d1dcd346955b672"}}, -{"id":"muse","key":"muse","value":{"rev":"3-d6bbc06df2e359d6ef285f9da2bd0efd"}}, -{"id":"musicmetadata","key":"musicmetadata","value":{"rev":"21-957bf986aa9d0db02175ea1d79293909"}}, -{"id":"mustache","key":"mustache","value":{"rev":"6-7f8458f2b52de5b37004b105c0f39e62"}}, -{"id":"mustachio","key":"mustachio","value":{"rev":"9-6ed3f41613f886128acd18b73b55439f"}}, -{"id":"mutex","key":"mutex","value":{"rev":"3-de95bdff3dd00271361067b5d70ea03b"}}, -{"id":"muzak","key":"muzak","value":{"rev":"9-5ff968ffadebe957b72a8b77b538b71c"}}, -{"id":"mvc","key":"mvc","value":{"rev":"52-7c954b6c3b90b1b734d8e8c3d2d34f5e"}}, -{"id":"mvc.coffee","key":"mvc.coffee","value":{"rev":"3-f203564ed70c0284455e7f96ea61fdb7"}}, -{"id":"mypackage","key":"mypackage","value":{"rev":"3-49cc95fb2e5ac8ee3dbbab1de451c0d1"}}, -{"id":"mypakege","key":"mypakege","value":{"rev":"3-e74d7dc2c2518304ff1700cf295eb823"}}, -{"id":"myrtle-parser","key":"myrtle-parser","value":{"rev":"3-9089c1a2f3c3a24f0bce3941bc1d534d"}}, -{"id":"mysql","key":"mysql","value":{"rev":"30-a8dc68eb056cb6f69fae2423c1337474"}}, -{"id":"mysql-activerecord","key":"mysql-activerecord","value":{"rev":"17-9d21d0b10a5c84f6cacfd8d2236f9887"}}, -{"id":"mysql-client","key":"mysql-client","value":{"rev":"5-cc877218864c319d17f179e49bf58c99"}}, -{"id":"mysql-helper","key":"mysql-helper","value":{"rev":"3-c6f3b9f00cd9fee675aa2a9942cc336a"}}, -{"id":"mysql-libmysqlclient","key":"mysql-libmysqlclient","value":{"rev":"38-51c08e24257b99bf5591232016ada8ab"}}, -{"id":"mysql-native","key":"mysql-native","value":{"rev":"12-0592fbf66c55e6e9db6a75c97be088c3"}}, -{"id":"mysql-native-prerelease","key":"mysql-native-prerelease","value":{"rev":"7-b1a6f3fc41f6c152f3b178e13f91b5c4"}}, -{"id":"mysql-oil","key":"mysql-oil","value":{"rev":"9-70c07b9c552ff592be8ca89ea6efa408"}}, -{"id":"mysql-pool","key":"mysql-pool","value":{"rev":"15-41f510c45174b6c887856120ce3d5a3b"}}, -{"id":"mysql-simple","key":"mysql-simple","value":{"rev":"13-7ee13f035e8ebcbc27f6fe910058aee9"}}, -{"id":"n","key":"n","value":{"rev":"31-bfaed5022beae2177a090c4c8fce82a4"}}, -{"id":"n-ext","key":"n-ext","value":{"rev":"3-5ad67a300f8e88ef1dd58983c9061bc1"}}, -{"id":"n-pubsub","key":"n-pubsub","value":{"rev":"3-af990bcbf9f94554365788b81715d3b4"}}, -{"id":"n-rest","key":"n-rest","value":{"rev":"7-42f1d92f9229f126a1b063ca27bfc85b"}}, -{"id":"n-util","key":"n-util","value":{"rev":"6-d0c59c7412408bc94e20de4d22396d79"}}, -{"id":"nMemcached","key":"nMemcached","value":{"rev":"3-be350fd46624a1cac0052231101e0594"}}, -{"id":"nStoreSession","key":"nStoreSession","value":{"rev":"3-a3452cddd2b9ff8edb6d46999fa5b0eb"}}, -{"id":"nTPL","key":"nTPL","value":{"rev":"41-16a54848286364d894906333b0c1bb2c"}}, -{"id":"nTunes","key":"nTunes","value":{"rev":"18-76bc566a504100507056316fe8d3cc35"}}, -{"id":"nabe","key":"nabe","value":{"rev":"13-dc93f35018e84a23ace4d5114fa1bb28"}}, -{"id":"nack","key":"nack","value":{"rev":"118-f629c8c208c76fa0c2ce66d21f927ee4"}}, -{"id":"nagari","key":"nagari","value":{"rev":"11-cb200690c6d606d8597178e492b54cde"}}, -{"id":"nailplate","key":"nailplate","value":{"rev":"11-e1532c42d9d83fc32942dec0b87df587"}}, -{"id":"nails","key":"nails","value":{"rev":"12-f472bf005c4a4c2b49fb0118b109bef1"}}, -{"id":"nake","key":"nake","value":{"rev":"11-250933df55fbe7bb19e34a84ed23ca3e"}}, -{"id":"named-routes","key":"named-routes","value":{"rev":"6-ffbdd4caa74a30e87aa6dbb36f2b967c"}}, -{"id":"namespace","key":"namespace","value":{"rev":"7-89e2850e14206af13f26441e75289878"}}, -{"id":"namespaces","key":"namespaces","value":{"rev":"11-7a9b3d2537438211021a472035109f3c"}}, -{"id":"nami","key":"nami","value":{"rev":"29-3d44b1338222a4d994d4030868a94ea8"}}, -{"id":"nano","key":"nano","value":{"rev":"105-50efc49a8f6424706af554872002c014"}}, -{"id":"nanostate","key":"nanostate","value":{"rev":"9-1664d985e8cdbf16e150ba6ba4d79ae5"}}, -{"id":"narcissus","key":"narcissus","value":{"rev":"3-46581eeceff566bd191a14dec7b337f6"}}, -{"id":"nariya","key":"nariya","value":{"rev":"13-d83b8b6162397b154a4b59553be225e9"}}, -{"id":"narrativ","key":"narrativ","value":{"rev":"9-ef215eff6bf222425f73d23e507f7ff3"}}, -{"id":"narrow","key":"narrow","value":{"rev":"5-c6963048ba02adaf819dc51815fa0015"}}, -{"id":"narwhal","key":"narwhal","value":{"rev":"6-13bf3f87e6cfb1e57662cc3e3be450fc"}}, -{"id":"narwhal-lib","key":"narwhal-lib","value":{"rev":"6-4722d9b35fed59a2e8f7345a1eb6769d"}}, -{"id":"nat","key":"nat","value":{"rev":"3-da0906c08792043546f98ace8ce59a78"}}, -{"id":"native2ascii","key":"native2ascii","value":{"rev":"3-9afd51209d67303a8ee807ff862e31fc"}}, -{"id":"nativeUtil","key":"nativeUtil","value":{"rev":"7-6e3e9757b436ebcee35a20e633c08d60"}}, -{"id":"natives","key":"natives","value":{"rev":"24-6c4269c9c7cfb52571bd2c94fa26efc6"}}, -{"id":"natural","key":"natural","value":{"rev":"110-fc92701ad8525f45fbdb5863959ca03c"}}, -{"id":"naturalsort","key":"naturalsort","value":{"rev":"3-4321f5e432aee224af0fee9e4fb901ff"}}, -{"id":"nave","key":"nave","value":{"rev":"29-79baa66065fa9075764cc3e5da2edaef"}}, -{"id":"navigator","key":"navigator","value":{"rev":"3-f2f4f5376afb10753006f40bd49689c3"}}, -{"id":"nbs-api","key":"nbs-api","value":{"rev":"3-94949b1f0797369abc0752482268ef08"}}, -{"id":"nbt","key":"nbt","value":{"rev":"3-b711b9db76f64449df7f43c659ad8e7f"}}, -{"id":"nclosure","key":"nclosure","value":{"rev":"9-042b39740a39f0556d0dc2c0990b7fa8"}}, -{"id":"nclosureultimate","key":"nclosureultimate","value":{"rev":"3-61ff4bc480239304c459374c9a5f5754"}}, -{"id":"nconf","key":"nconf","value":{"rev":"65-8d8c0d2c6d5d9d526b8a3f325f68eca1"}}, -{"id":"nconf-redis","key":"nconf-redis","value":{"rev":"5-21ae138633b20cb29ed49b9fcd425e10"}}, -{"id":"ncp","key":"ncp","value":{"rev":"23-6441091c6c27ecb5b99f5781299a2192"}}, -{"id":"ncss","key":"ncss","value":{"rev":"9-1d2330e0fdbc40f0810747c2b156ecf2"}}, -{"id":"ncurses","key":"ncurses","value":{"rev":"12-bb059ea6fee12ca77f1fbb7bb6dd9447"}}, -{"id":"ndb","key":"ndb","value":{"rev":"15-b3e826f68a57095413666e9fe74589da"}}, -{"id":"ndistro","key":"ndistro","value":{"rev":"3-fcda3c018d11000b2903ad7104b60b35"}}, -{"id":"ndns","key":"ndns","value":{"rev":"5-1aeaaca119be44af7a83207d76f263fc"}}, -{"id":"nebulog","key":"nebulog","value":{"rev":"3-1863b0ce17cc0f07a50532a830194254"}}, -{"id":"neco","key":"neco","value":{"rev":"43-e830913302b52012ab63177ecf292822"}}, -{"id":"ned","key":"ned","value":{"rev":"15-4230c69fb52dfddfd65526dcfe5c4ec6"}}, -{"id":"nedis","key":"nedis","value":{"rev":"7-d49e329dca586d1a3569266f0595c9ad"}}, -{"id":"neko","key":"neko","value":{"rev":"60-13aa87d2278c3a734733cff2a34a7970"}}, -{"id":"neo4j","key":"neo4j","value":{"rev":"7-dde7066eac32a405df95ccf9c50c8ae7"}}, -{"id":"nerve","key":"nerve","value":{"rev":"3-2c47b79586d7930aabf9325ca88ad7e8"}}, -{"id":"nest","key":"nest","value":{"rev":"23-560d67971e9acddacf087608306def24"}}, -{"id":"nestableflow","key":"nestableflow","value":{"rev":"5-ee8af667a84d333fcc8092c89f4189c3"}}, -{"id":"nestor","key":"nestor","value":{"rev":"3-f1affbc37be3bf4e337365bd172578dc"}}, -{"id":"net","key":"net","value":{"rev":"3-895103ee532ef31396d9c06764df1ed8"}}, -{"id":"netiface","key":"netiface","value":{"rev":"3-885c94284fd3a9601afe291ab68aca84"}}, -{"id":"netpool","key":"netpool","value":{"rev":"3-dadfd09b9eb7ef73e2bff34a381de207"}}, -{"id":"netstring","key":"netstring","value":{"rev":"9-d26e7bf4a3ce5eb91bb1889d362f71e6"}}, -{"id":"neuron","key":"neuron","value":{"rev":"11-edaed50492368ff39eaf7d2004d7f4d8"}}, -{"id":"new","key":"new","value":{"rev":"3-7789b37104d8161b7ccf898a9cda1fc6"}}, -{"id":"newforms","key":"newforms","value":{"rev":"9-2a87cb74477d210fcb1d0c3e3e236f03"}}, -{"id":"nexpect","key":"nexpect","value":{"rev":"15-e7127f41b9f3ec45185ede7bab7b4acd"}}, -{"id":"next","key":"next","value":{"rev":"13-de5e62125b72e48ea142a55a3817589c"}}, -{"id":"nextrip","key":"nextrip","value":{"rev":"5-1ac8103552967af98d3de452ef81a94f"}}, -{"id":"nexttick","key":"nexttick","value":{"rev":"9-c7ec279e713ea8483d33c31871aea0db"}}, -{"id":"ngen","key":"ngen","value":{"rev":"9-972980a439c34851d67e4f61a96c2632"}}, -{"id":"ngen-basicexample","key":"ngen-basicexample","value":{"rev":"3-897763c230081d320586bcadfa84499f"}}, -{"id":"ngeohash","key":"ngeohash","value":{"rev":"5-9ca0c06066bc798e934db35cad99453e"}}, -{"id":"ngist","key":"ngist","value":{"rev":"7-592c24e72708219ed1eb078ddff95ab6"}}, -{"id":"ngram","key":"ngram","value":{"rev":"5-00e6b24dc178bdeb49b1ac8cb09f6e77"}}, -{"id":"ngrep","key":"ngrep","value":{"rev":"3-49c1a3839b12083280475177c1a16e38"}}, -{"id":"nhp-body-restreamer","key":"nhp-body-restreamer","value":{"rev":"1-8a4e5e23ae681a3f8be9afb613648230"}}, -{"id":"nhttpd","key":"nhttpd","value":{"rev":"3-cdc73384e1a1a4666e813ff52f2f5e4f"}}, -{"id":"nib","key":"nib","value":{"rev":"25-d67d5a294ba5b8953472cf936b97e13d"}}, -{"id":"nicetime","key":"nicetime","value":{"rev":"3-39fdba269d712064dc1e02a7ab846821"}}, -{"id":"nicknack","key":"nicknack","value":{"rev":"5-7b5477b63f782d0a510b0c15d2824f20"}}, -{"id":"nide","key":"nide","value":{"rev":"9-74f642fced47c934f9bae29f04d17a46"}}, -{"id":"nih-op","key":"nih-op","value":{"rev":"3-6e649b45964f84cb04340ab7f0a36a1c"}}, -{"id":"nimble","key":"nimble","value":{"rev":"5-867b808dd80eab33e5f22f55bb5a7376"}}, -{"id":"ninjs","key":"ninjs","value":{"rev":"3-f59997cc4bacb2d9d9852f955d15199e"}}, -{"id":"ninotify","key":"ninotify","value":{"rev":"3-a0f3c7cbbe7ccf5d547551aa062cc8b5"}}, -{"id":"nirc","key":"nirc","value":{"rev":"3-28197984656939a5a93a77c0a1605406"}}, -{"id":"nithub","key":"nithub","value":{"rev":"3-eaa85e6ac6668a304e4e4a565c54f57d"}}, -{"id":"nix","key":"nix","value":{"rev":"12-7b338b03c0e110aeb348551b14796ff1"}}, -{"id":"nko","key":"nko","value":{"rev":"39-2bf94b2bc279b8cf847bfc7668029d37"}}, -{"id":"nlog","key":"nlog","value":{"rev":"3-ae469820484ca33f346001dcb7b63a2d"}}, -{"id":"nlog4js","key":"nlog4js","value":{"rev":"3-bc17a61a9023d64e192d249144e69f02"}}, -{"id":"nlogger","key":"nlogger","value":{"rev":"11-1e48fc9a5a4214d9e56db6c6b63f1eeb"}}, -{"id":"nmd","key":"nmd","value":{"rev":"27-2dcb60d0258a9cea838f7cc4e0922f90"}}, -{"id":"nntp","key":"nntp","value":{"rev":"5-c86b189e366b9a6a428f9a2ee88dccf1"}}, -{"id":"no.de","key":"no.de","value":{"rev":"10-0dc855fd6b0b36a710b473b2720b22c0"}}, -{"id":"nobj","key":"nobj","value":{"rev":"3-0b4a46b91b70117306a9888202117223"}}, -{"id":"noblemachine","key":"noblemachine","value":{"rev":"3-06fec410fe0c7328e06eec50b4fa5d9a"}}, -{"id":"noblerecord","key":"noblerecord","value":{"rev":"5-22f24c4285bd405785588480bb2bc324"}}, -{"id":"nock","key":"nock","value":{"rev":"5-f94423d37dbdf41001ec097f20635271"}}, -{"id":"nocr-mongo","key":"nocr-mongo","value":{"rev":"5-ce6335ed276187cc38c30cb5872d3d83"}}, -{"id":"nodast","key":"nodast","value":{"rev":"3-1c563107f2d77b79a8f0d0b8ba7041f5"}}, -{"id":"node-api","key":"node-api","value":{"rev":"3-b69cefec93d9f73256acf9fb9edeebd6"}}, -{"id":"node-apidoc","key":"node-apidoc","value":{"rev":"6-cd26945e959403fcbee8ba542e14e667"}}, -{"id":"node-app-reloader","key":"node-app-reloader","value":{"rev":"5-e08cac7656afd6c124f8e2a9b9d6fdd3"}}, -{"id":"node-arse","key":"node-arse","value":{"rev":"9-b643c828541739a5fa972c801f81b212"}}, -{"id":"node-assert-extras","key":"node-assert-extras","value":{"rev":"3-3498e17b996ffc42a29d46c9699a3b52"}}, -{"id":"node-assert-lint-free","key":"node-assert-lint-free","value":{"rev":"5-852130ba6bafc703657b833343bc5646"}}, -{"id":"node-asset","key":"node-asset","value":{"rev":"18-f7cf59be8e0d015a43d05807a1ed9c0c"}}, -{"id":"node-awesm","key":"node-awesm","value":{"rev":"3-539c10145541ac5efc4dd295767b2abc"}}, -{"id":"node-backbone-couch","key":"node-backbone-couch","value":{"rev":"19-c4d8e93436b60e098c81cc0fe50f960c"}}, -{"id":"node-base64","key":"node-base64","value":{"rev":"11-da10a7157fd9e139b48bc8d9e44a98fa"}}, -{"id":"node-bj","key":"node-bj","value":{"rev":"3-5cd21fa259199870d1917574cd167396"}}, -{"id":"node-bosh-stress-tool","key":"node-bosh-stress-tool","value":{"rev":"3-36afc4b47e570964b7f8d705e1d47732"}}, -{"id":"node-brainfuck","key":"node-brainfuck","value":{"rev":"5-c7a6f703a97a409670005cab52664629"}}, -{"id":"node-build","key":"node-build","value":{"rev":"10-4f2f137fb4ef032f9dca3e3c64c15270"}}, -{"id":"node-casa","key":"node-casa","value":{"rev":"3-3f80a478aa47620bfc0c64cc6f140d98"}}, -{"id":"node-ccl","key":"node-ccl","value":{"rev":"13-00498b820cc4cadce8cc5b7b76e30b0f"}}, -{"id":"node-chain","key":"node-chain","value":{"rev":"6-b543f421ac63eeedc667b3395e7b8971"}}, -{"id":"node-child-process-manager","key":"node-child-process-manager","value":{"rev":"36-befb1a0eeac02ad400e2aaa8a076a053"}}, -{"id":"node-chirpstream","key":"node-chirpstream","value":{"rev":"10-f20e404f9ae5d43dfb6bcee15bd9affe"}}, -{"id":"node-clone","key":"node-clone","value":{"rev":"5-5ace5d51179d0e642bf9085b3bbf999b"}}, -{"id":"node-cloudwatch","key":"node-cloudwatch","value":{"rev":"3-7f9d1e075fcc3bd3e7849acd893371d5"}}, -{"id":"node-combine","key":"node-combine","value":{"rev":"3-51891c3c7769ff11a243c89c7e537907"}}, -{"id":"node-compat","key":"node-compat","value":{"rev":"9-24fce8e15eed3e193832b1c93a482d15"}}, -{"id":"node-config","key":"node-config","value":{"rev":"6-8821f6b46347e57258e62e1be841c186"}}, -{"id":"node-crocodoc","key":"node-crocodoc","value":{"rev":"5-ad4436f633f37fe3248dce93777fc26e"}}, -{"id":"node-csv","key":"node-csv","value":{"rev":"10-cd15d347b595f1d9d1fd30b483c52724"}}, -{"id":"node-date","key":"node-date","value":{"rev":"3-a5b41cab3247e12f2beaf1e0b1ffadfa"}}, -{"id":"node-dbi","key":"node-dbi","value":{"rev":"27-96e1df6fdefbae77bfa02eda64c3e3b9"}}, -{"id":"node-debug-proxy","key":"node-debug-proxy","value":{"rev":"9-c00a14832cdd5ee4d489eb41a3d0d621"}}, -{"id":"node-dep","key":"node-dep","value":{"rev":"15-378dedd3f0b3e54329c00c675b19401c"}}, -{"id":"node-dev","key":"node-dev","value":{"rev":"48-6a98f38078fe5678d6c2fb48aec3c1c3"}}, -{"id":"node-downloader","key":"node-downloader","value":{"rev":"3-a541126c56c48681571e5e998c481343"}}, -{"id":"node-evented","key":"node-evented","value":{"rev":"6-a6ce8ab39e01cc0262c80d4bf08fc333"}}, -{"id":"node-exception-notifier","key":"node-exception-notifier","value":{"rev":"3-cebc02c45dace4852f8032adaa4e3c9c"}}, -{"id":"node-expat","key":"node-expat","value":{"rev":"33-261d85273a0a551e7815f835a933d5eb"}}, -{"id":"node-expect","key":"node-expect","value":{"rev":"7-5ba4539adfd3ba95dab21bb5bc0a5193"}}, -{"id":"node-express-boilerplate","key":"node-express-boilerplate","value":{"rev":"3-972f51d1ff9493e48d7cf508461f1114"}}, -{"id":"node-extjs","key":"node-extjs","value":{"rev":"7-33143616b4590523b4e1549dd8ffa991"}}, -{"id":"node-extjs4","key":"node-extjs4","value":{"rev":"3-8e5033aed477629a6fb9812466a90cfd"}}, -{"id":"node-fakeweb","key":"node-fakeweb","value":{"rev":"5-f01377fa6d03461cbe77f41b73577cf4"}}, -{"id":"node-fb","key":"node-fb","value":{"rev":"3-bc5f301a60e475de7c614837d3f9f35a"}}, -{"id":"node-fb-signed-request","key":"node-fb-signed-request","value":{"rev":"3-33c8f043bb947b63a84089d633d68f8e"}}, -{"id":"node-fects","key":"node-fects","value":{"rev":"3-151b7b895b74b24a87792fac34735814"}}, -{"id":"node-ffi","key":"node-ffi","value":{"rev":"22-25cf229f0ad4102333b2b13e03054ac5"}}, -{"id":"node-filter","key":"node-filter","value":{"rev":"3-0e6a86b4abb65df3594e5c93ab04bd31"}}, -{"id":"node-foursquare","key":"node-foursquare","value":{"rev":"25-549bbb0c2b4f96b2c5e6a5f642e8481d"}}, -{"id":"node-fs","key":"node-fs","value":{"rev":"5-14050cbc3887141f6b0e1e7d62736a63"}}, -{"id":"node-fs-synchronize","key":"node-fs-synchronize","value":{"rev":"11-6341e79f3391a9e1daa651a5932c8795"}}, -{"id":"node-gd","key":"node-gd","value":{"rev":"11-2ede7f4af38f062b86cc32bb0125e1bf"}}, -{"id":"node-geocode","key":"node-geocode","value":{"rev":"6-505af45c7ce679ac6738b495cc6b03c2"}}, -{"id":"node-get","key":"node-get","value":{"rev":"9-906945005a594ea1f05d4ad23170a83f"}}, -{"id":"node-gettext","key":"node-gettext","value":{"rev":"5-532ea4b528108b4c8387ddfc8fa690b2"}}, -{"id":"node-gist","key":"node-gist","value":{"rev":"11-3495a499c9496d01235676f429660424"}}, -{"id":"node-glbse","key":"node-glbse","value":{"rev":"5-69a537189610c69cc549f415431b181a"}}, -{"id":"node-google-sql","key":"node-google-sql","value":{"rev":"7-bfe20d25a4423651ecdff3f5054a6946"}}, -{"id":"node-gravatar","key":"node-gravatar","value":{"rev":"6-8265fc1ad003fd8a7383244c92abb346"}}, -{"id":"node-handlersocket","key":"node-handlersocket","value":{"rev":"16-f1dc0246559748a842dd0e1919c569ae"}}, -{"id":"node-hdfs","key":"node-hdfs","value":{"rev":"3-d460fba8ff515660de34cb216223c569"}}, -{"id":"node-hipchat","key":"node-hipchat","value":{"rev":"3-9d16738bf70f9e37565727e671ffe551"}}, -{"id":"node-hive","key":"node-hive","value":{"rev":"31-5eef1fa77a39e4bdacd8fa85ec2ce698"}}, -{"id":"node-html-encoder","key":"node-html-encoder","value":{"rev":"3-75f92e741a3b15eb56e3c4513feaca6d"}}, -{"id":"node-i3","key":"node-i3","value":{"rev":"3-5c489f43aeb06054b02ad3706183599c"}}, -{"id":"node-indextank","key":"node-indextank","value":{"rev":"5-235a17fce46c73c8b5abc4cf5f964385"}}, -{"id":"node-inherit","key":"node-inherit","value":{"rev":"3-099c0acf9c889eea94faaf64067bfc52"}}, -{"id":"node-inspector","key":"node-inspector","value":{"rev":"34-ca9fa856cf32a737d1ecccb759aaf5e1"}}, -{"id":"node-int64","key":"node-int64","value":{"rev":"11-50b92b5b65adf17e673b4d15df643ed4"}}, -{"id":"node-ip-lib","key":"node-ip-lib","value":{"rev":"3-2fe72f7b78cbc1739c71c7cfaec9fbcd"}}, -{"id":"node-iplookup","key":"node-iplookup","value":{"rev":"10-ba8474624dd852a46303d32ff0556883"}}, -{"id":"node-jdownloader","key":"node-jdownloader","value":{"rev":"3-b015035cfb8540568da5deb55b35248c"}}, -{"id":"node-jslint-all","key":"node-jslint-all","value":{"rev":"5-582f4a31160d3700731fa39771702896"}}, -{"id":"node-jsonengine","key":"node-jsonengine","value":{"rev":"3-6e429c32e42b205f3ed1ea1f48d67cbc"}}, -{"id":"node-khtml","key":"node-khtml","value":{"rev":"39-db8e8eea569657fc7de6300172a6a8a7"}}, -{"id":"node-linkshare","key":"node-linkshare","value":{"rev":"35-acc18a5d584b828bb2bd4f32bbcde98c"}}, -{"id":"node-log","key":"node-log","value":{"rev":"17-79cecc66227b4fb3a2ae04b7dac17cc2"}}, -{"id":"node-logentries","key":"node-logentries","value":{"rev":"3-0f640d5ff489a6904f4a8c18fb5f7e9c"}}, -{"id":"node-logger","key":"node-logger","value":{"rev":"3-75084f98359586bdd254e57ea5915d37"}}, -{"id":"node-logging","key":"node-logging","value":{"rev":"15-af01bc2b6128150787c85c8df1dae642"}}, -{"id":"node-mailer","key":"node-mailer","value":{"rev":"5-5b88675f05efe2836126336c880bd841"}}, -{"id":"node-mailgun","key":"node-mailgun","value":{"rev":"5-4bcfb7bf5163748b87c1b9ed429ed178"}}, -{"id":"node-markdown","key":"node-markdown","value":{"rev":"6-67137da4014f22f656aaefd9dfa2801b"}}, -{"id":"node-mdbm","key":"node-mdbm","value":{"rev":"22-3006800b042cf7d4b0b391c278405143"}}, -{"id":"node-minify","key":"node-minify","value":{"rev":"13-e853813d4b6519b168965979b8ccccdd"}}, -{"id":"node-mug","key":"node-mug","value":{"rev":"3-f7567ffac536bfa7eb5a7e3da7a0efa0"}}, -{"id":"node-mvc","key":"node-mvc","value":{"rev":"3-74f7c07b2991fcddb27afd2889b6db4e"}}, -{"id":"node-mwire","key":"node-mwire","value":{"rev":"26-79d7982748f42b9e07ab293447b167ec"}}, -{"id":"node-mynix-feed","key":"node-mynix-feed","value":{"rev":"3-59d4a624b3831bbab6ee99be2f84e568"}}, -{"id":"node-nether","key":"node-nether","value":{"rev":"3-0fbefe710fe0d74262bfa25f6b4e1baf"}}, -{"id":"node-nude","key":"node-nude","value":{"rev":"3-600abb219646299ac602fa51fa260f37"}}, -{"id":"node-nxt","key":"node-nxt","value":{"rev":"3-8ce48601c2b0164e2b125259a0c97d45"}}, -{"id":"node-oauth","key":"node-oauth","value":{"rev":"3-aa6cd61f44d74118bafa5408900c4984"}}, -{"id":"node-opencalais","key":"node-opencalais","value":{"rev":"13-a3c0b882aca7207ce36f107e40a0ce50"}}, -{"id":"node-props","key":"node-props","value":{"rev":"7-e400cee08cc9abdc1f1ce4f262a04b05"}}, -{"id":"node-proxy","key":"node-proxy","value":{"rev":"20-ce722bf45c84a7d925b8b7433e786ed6"}}, -{"id":"node-pusher","key":"node-pusher","value":{"rev":"3-7cc7cd5bffaf3b11c44438611beeba98"}}, -{"id":"node-putio","key":"node-putio","value":{"rev":"3-8a1fc6362fdcf16217cdb6846e419b4c"}}, -{"id":"node-raphael","key":"node-raphael","value":{"rev":"25-e419d98a12ace18a40d94a9e8e32cdd4"}}, -{"id":"node-rapleaf","key":"node-rapleaf","value":{"rev":"11-c849c8c8635e4eb2f81bd7810b7693fd"}}, -{"id":"node-rats","key":"node-rats","value":{"rev":"3-dca544587f3121148fe02410032cf726"}}, -{"id":"node-rdf2json","key":"node-rdf2json","value":{"rev":"3-bde382dc2fcb40986c5ac41643d44543"}}, -{"id":"node-recurly","key":"node-recurly","value":{"rev":"11-79cab9ccee7c1ddb83791e8de41c72f5"}}, -{"id":"node-redis","key":"node-redis","value":{"rev":"13-12adf3a3e986675637fa47b176f527e3"}}, -{"id":"node-redis-mapper","key":"node-redis-mapper","value":{"rev":"5-53ba8f67cc82dbf1d127fc7359353f32"}}, -{"id":"node-redis-monitor","key":"node-redis-monitor","value":{"rev":"3-79bcba76241d7c7dbc4b18d90a9d59e3"}}, -{"id":"node-restclient","key":"node-restclient","value":{"rev":"6-5844eba19bc465a8f75b6e94c061350f"}}, -{"id":"node-restclient2","key":"node-restclient2","value":{"rev":"5-950de911f7bde7900dfe5b324f49818c"}}, -{"id":"node-runner","key":"node-runner","value":{"rev":"3-e9a9e6bd10d2ab1aed8b401b04fadc7b"}}, -{"id":"node-sc-setup","key":"node-sc-setup","value":{"rev":"3-e89c496e03c48d8574ccaf61c9ed4fca"}}, -{"id":"node-schedule","key":"node-schedule","value":{"rev":"9-ae12fa59226f1c9b7257b8a2d71373b4"}}, -{"id":"node-sdlmixer","key":"node-sdlmixer","value":{"rev":"8-489d85278d6564b6a4e94990edcb0527"}}, -{"id":"node-secure","key":"node-secure","value":{"rev":"3-73673522a4bb5f853d55e535f0934803"}}, -{"id":"node-sendgrid","key":"node-sendgrid","value":{"rev":"9-4662c31304ca4ee4e702bd3a54ea7824"}}, -{"id":"node-sizzle","key":"node-sizzle","value":{"rev":"6-c08c24d9d769d3716e5c4e3441740eb2"}}, -{"id":"node-soap-client","key":"node-soap-client","value":{"rev":"9-35ff34a4a5af569de6a2e89d1b35b69a"}}, -{"id":"node-spec","key":"node-spec","value":{"rev":"9-92e99ca74b9a09a8ae2eb7382ef511ef"}}, -{"id":"node-static","key":"node-static","value":{"rev":"10-11b0480fcd416db3d3d4041f43a55290"}}, -{"id":"node-static-maccman","key":"node-static-maccman","value":{"rev":"3-49e256728b14c85776b74f2bd912eb42"}}, -{"id":"node-statsd","key":"node-statsd","value":{"rev":"5-08d3e6b4b2ed1d0b7916e9952f55573c"}}, -{"id":"node-statsd-instrument","key":"node-statsd-instrument","value":{"rev":"3-c3cd3315e1edcc91096830392f439305"}}, -{"id":"node-std","key":"node-std","value":{"rev":"3-f99be0f03be4175d546823799bb590d3"}}, -{"id":"node-store","key":"node-store","value":{"rev":"3-7cb6bf13de9550b869c768f464fd0f65"}}, -{"id":"node-stringprep","key":"node-stringprep","value":{"rev":"13-9b08baa97042f71c5c8e9e2fdcc2c300"}}, -{"id":"node-synapse","key":"node-synapse","value":{"rev":"3-c46c47099eb2792f4a57fdfd789520ca"}}, -{"id":"node-syslog","key":"node-syslog","value":{"rev":"23-34f7df06ba88d9f897b7e00404db7187"}}, -{"id":"node-t","key":"node-t","value":{"rev":"3-042225eff3208ba9add61a9f79d90871"}}, -{"id":"node-taobao","key":"node-taobao","value":{"rev":"7-c988ace74806b2e2f55e162f54ba1a2c"}}, -{"id":"node-term-ui","key":"node-term-ui","value":{"rev":"5-210310014b19ce26c5e3e840a8a0549e"}}, -{"id":"node-tiny","key":"node-tiny","value":{"rev":"7-df05ab471f25ca4532d80c83106944d7"}}, -{"id":"node-tmpl","key":"node-tmpl","value":{"rev":"3-6fcfa960da8eb72a5e3087559d3fe206"}}, -{"id":"node-twilio","key":"node-twilio","value":{"rev":"11-af69e600109d38c77eadbcec4bee4782"}}, -{"id":"node-twitter-mailer","key":"node-twitter-mailer","value":{"rev":"7-f915b76d834cb162c91816abc30cee5f"}}, -{"id":"node-usb","key":"node-usb","value":{"rev":"3-0c3837307f86a80427800f1b45aa5862"}}, -{"id":"node-uuid","key":"node-uuid","value":{"rev":"6-642efa619ad8a6476a44a5c6158e7a36"}}, -{"id":"node-vapor.js","key":"node-vapor.js","value":{"rev":"3-d293284cc415b2906533e91db13ee748"}}, -{"id":"node-version","key":"node-version","value":{"rev":"3-433b1529a6aa3d619314e461e978d2b6"}}, -{"id":"node-webapp","key":"node-webapp","value":{"rev":"11-65411bfd8eaf19d3539238360d904d43"}}, -{"id":"node-wiki","key":"node-wiki","value":{"rev":"5-22b0177c9a5e4dc1f72d36bb83c746d0"}}, -{"id":"node-wkhtml","key":"node-wkhtml","value":{"rev":"5-a8fa203720442b443d558670c9750548"}}, -{"id":"node-xerces","key":"node-xerces","value":{"rev":"3-de6d82ec712af997b7aae451277667f0"}}, -{"id":"node-xml","key":"node-xml","value":{"rev":"3-e14a52dcd04302aea7dd6943cf6dd886"}}, -{"id":"node-xmpp","key":"node-xmpp","value":{"rev":"36-031eb5e830ed2e2027ee4ee7f861cf81"}}, -{"id":"node-xmpp-bosh","key":"node-xmpp-bosh","value":{"rev":"85-f7f8b699b6fda74fc27c621466915bd1"}}, -{"id":"node-xmpp-via-bosh","key":"node-xmpp-via-bosh","value":{"rev":"3-5f5fee9e42ae8ce8f42d55c31808c969"}}, -{"id":"node.io","key":"node.io","value":{"rev":"224-e99561d454a7676d10875e1b06ba44c7"}}, -{"id":"node.io-min","key":"node.io-min","value":{"rev":"3-e8389bdcfa55c68ae9698794d9089ce4"}}, -{"id":"node.isbn","key":"node.isbn","value":{"rev":"3-76aa84f3c49a54b6c901f440af35192d"}}, -{"id":"node.uptime","key":"node.uptime","value":{"rev":"5-cfc2c1c1460d000eab4e1a28506e6d29"}}, -{"id":"node3p","key":"node3p","value":{"rev":"14-b1931b8aa96227854d78965cc4301168"}}, -{"id":"node3p-web","key":"node3p-web","value":{"rev":"12-bc783ee1e493e80b7e7a3c2fce39f55e"}}, -{"id":"nodeBase","key":"nodeBase","value":{"rev":"39-4d9ae0f18e0bca7192901422d85e85c7"}}, -{"id":"nodeCgi","key":"nodeCgi","value":{"rev":"9-bb65e71ee63551e519f49434f2ae1cd7"}}, -{"id":"nodeDocs","key":"nodeDocs","value":{"rev":"3-0c6e714d3e6d5c2cc9482444680fb3ca"}}, -{"id":"nodePhpSessions","key":"nodePhpSessions","value":{"rev":"3-5063b38582deaca9cacdc029db97c2b1"}}, -{"id":"node_bsdiff","key":"node_bsdiff","value":{"rev":"5-e244ef36755a2b6534ce50fa1ee5ee6e"}}, -{"id":"node_hash","key":"node_hash","value":{"rev":"3-cdce2fcc2c18fcd25e16be8e52add891"}}, -{"id":"node_util","key":"node_util","value":{"rev":"3-cde723ee2311cf48f7cf0a3bc3484f9a"}}, -{"id":"node_xslt","key":"node_xslt","value":{"rev":"3-f12035155aee31d1749204fdca2aee10"}}, -{"id":"nodec","key":"nodec","value":{"rev":"3-dba2af2d5b98a71964abb4328512b9e1"}}, -{"id":"nodefm","key":"nodefm","value":{"rev":"3-c652a95d30318a371736515feab649f9"}}, -{"id":"nodegit","key":"nodegit","value":{"rev":"31-92a2cea0d1c92086c920bc007f5a3f16"}}, -{"id":"nodeib","key":"nodeib","value":{"rev":"3-e67d779007817597ca36e8b821f38e6a"}}, -{"id":"nodeinfo","key":"nodeinfo","value":{"rev":"53-61bf0f48662dc2e04cde38a2b897c211"}}, -{"id":"nodejitsu-client","key":"nodejitsu-client","value":{"rev":"3-4fa613f888ebe249aff7b03aa9b8d7ef"}}, -{"id":"nodejs-intro","key":"nodejs-intro","value":{"rev":"4-c75f03e80b597f734f4466e62ecebfeb"}}, -{"id":"nodejs-tvrage","key":"nodejs-tvrage","value":{"rev":"9-88bb3b5d23652ebdb7186a30bc3be43f"}}, -{"id":"nodejs.be-cli","key":"nodejs.be-cli","value":{"rev":"3-d8f23777f9b18101f2d2dc5aa618a703"}}, -{"id":"nodeler","key":"nodeler","value":{"rev":"9-00760d261ea75164a5709109011afb25"}}, -{"id":"nodelint","key":"nodelint","value":{"rev":"8-31502553d4bb099ba519fb331cccdd63"}}, -{"id":"nodeload","key":"nodeload","value":{"rev":"12-f02626475b59ebe67a864a114c99ff9b"}}, -{"id":"nodemachine","key":"nodemachine","value":{"rev":"8-5342324502e677e35aefef17dc08c8db"}}, -{"id":"nodemailer","key":"nodemailer","value":{"rev":"63-d39a5143b06fa79edcb81252d6329861"}}, -{"id":"nodemock","key":"nodemock","value":{"rev":"33-7095334209b39c8e1482374bee1b712a"}}, -{"id":"nodemon","key":"nodemon","value":{"rev":"42-4f40ba2299ef4ae613a384a48e4045fa"}}, -{"id":"nodepad","key":"nodepad","value":{"rev":"5-93718cc67e97c89f45b753c1caef07e4"}}, -{"id":"nodepal","key":"nodepal","value":{"rev":"5-e53372a5081b3753993ee98299ecd550"}}, -{"id":"nodepie","key":"nodepie","value":{"rev":"21-a44a6d3575758ed591e13831a5420758"}}, -{"id":"nodepress","key":"nodepress","value":{"rev":"3-f17616b9ae61e15d1d219cb87ac5a63a"}}, -{"id":"noderelict","key":"noderelict","value":{"rev":"23-0ca0997e3ef112e9393ae8ccef63f1ee"}}, -{"id":"noderpc","key":"noderpc","value":{"rev":"27-7efb6365916b403c3aa4e1c766de75a2"}}, -{"id":"nodespec","key":"nodespec","value":{"rev":"3-69f357577e52e9fd096ac88a1e7e3445"}}, -{"id":"nodespy","key":"nodespy","value":{"rev":"3-ad33e14db2bcaf61bf99d3e8915da5ee"}}, -{"id":"nodestalker","key":"nodestalker","value":{"rev":"5-080eba88a3625ecf7935ec5e9d2db6e9"}}, -{"id":"nodester-api","key":"nodester-api","value":{"rev":"39-52046dbcdf4447bbb85aecc92086ae1d"}}, -{"id":"nodester-cli","key":"nodester-cli","value":{"rev":"89-6de3d724a974c1dd3b632417f8b01267"}}, -{"id":"nodetk","key":"nodetk","value":{"rev":"11-265d267335e7603249e1af9441700f2f"}}, -{"id":"nodeunit","key":"nodeunit","value":{"rev":"40-d1cc6c06f878fb0b86779186314bc193"}}, -{"id":"nodeunit-coverage","key":"nodeunit-coverage","value":{"rev":"3-29853918351e75e3f6f93acd97e2942f"}}, -{"id":"nodeunit-dsl","key":"nodeunit-dsl","value":{"rev":"6-91be44077bc80c942f86f0ac28a69c5e"}}, -{"id":"nodevlc","key":"nodevlc","value":{"rev":"3-e151577d3e1ba2f58db465d94ebcb1c1"}}, -{"id":"nodevore","key":"nodevore","value":{"rev":"3-ac73b3bc33e2f934776dda359869ddcf"}}, -{"id":"nodewatch","key":"nodewatch","value":{"rev":"9-267bfe1324c51993865dc41b09aee6dc"}}, -{"id":"nodewii","key":"nodewii","value":{"rev":"9-716b3faa8957c1aea337540402ae7f43"}}, -{"id":"nodie","key":"nodie","value":{"rev":"3-cc29702a2e7e295cfe583a05fb77b530"}}, -{"id":"nodify","key":"nodify","value":{"rev":"10-87fadf6bf262882bd71ab7e759b29949"}}, -{"id":"nodrrr","key":"nodrrr","value":{"rev":"3-75937f4ffb722a67d6c5a67663366854"}}, -{"id":"nodules","key":"nodules","value":{"rev":"8-2c6ec430f26ff7ef171e80b7b5e990c2"}}, -{"id":"nodysentary","key":"nodysentary","value":{"rev":"3-7574fc8e12b1271c2eb1c66026f702cb"}}, -{"id":"nohm","key":"nohm","value":{"rev":"45-09dcf4df92734b3c51c8df3c3b374b0b"}}, -{"id":"noid","key":"noid","value":{"rev":"5-ac31e001806789e80a7ffc64f2914eb4"}}, -{"id":"nolife","key":"nolife","value":{"rev":"7-cfd4fe84b1062303cefb83167ea48bba"}}, -{"id":"nolog","key":"nolog","value":{"rev":"9-6e82819b801f5d7ec6773596d5d2efb2"}}, -{"id":"nomnom","key":"nomnom","value":{"rev":"34-bf66753d1d155820cfacfc7fa7a830c9"}}, -{"id":"nomplate","key":"nomplate","value":{"rev":"9-6ea21ee9568421a60cb80637c4c6cb48"}}, -{"id":"nonogo","key":"nonogo","value":{"rev":"5-8307413f9a3da913f9818c4f2d951519"}}, -{"id":"noode","key":"noode","value":{"rev":"7-454df50a7cbd03c46a9951cb1ddbe1c6"}}, -{"id":"noodle","key":"noodle","value":{"rev":"7-163745527770de0de8e7e9d59fc3888c"}}, -{"id":"noop","key":"noop","value":{"rev":"5-ed9fd66573ed1186e66b4c2bc16192cb"}}, -{"id":"nope","key":"nope","value":{"rev":"3-7088ffb62b8e06261527cbfa69cb94c5"}}, -{"id":"nopro","key":"nopro","value":{"rev":"11-6c4aeafe6329821b2259ef11414481dd"}}, -{"id":"nopt","key":"nopt","value":{"rev":"23-cce441940b6f129cab94a359ddb8b3e4"}}, -{"id":"norm","key":"norm","value":{"rev":"9-2bf26c3803fdc3bb6319e490cae3b625"}}, -{"id":"norq","key":"norq","value":{"rev":"3-b1a80ad1aa4ccc493ac25da22b0f0697"}}, -{"id":"norris","key":"norris","value":{"rev":"3-a341286d9e83fa392c1ce6b764d0aace"}}, -{"id":"norris-ioc","key":"norris-ioc","value":{"rev":"15-d022f159229d89ce60fc2a15d71eac59"}}, -{"id":"norris-tester","key":"norris-tester","value":{"rev":"3-fc2f34c9373bbdf5a1cd9cfbaff21f83"}}, -{"id":"northwatcher","key":"northwatcher","value":{"rev":"13-edab28a123f0100e12f96c9828428a8a"}}, -{"id":"nosey","key":"nosey","value":{"rev":"4-10a22f27dd9f2a40acf035a7d250c661"}}, -{"id":"nosql-thin","key":"nosql-thin","value":{"rev":"6-604169cacf303b5278064f68b884090b"}}, -{"id":"notch","key":"notch","value":{"rev":"3-5b720089f0f9cfdbbbea8677216eeee5"}}, -{"id":"notes","key":"notes","value":{"rev":"3-5dfbd6ec33c69c0f1b619dd65d9e7a56"}}, -{"id":"nothing","key":"nothing","value":{"rev":"3-8b44e10efd7d6504755c0c4bd1043814"}}, -{"id":"notifications","key":"notifications","value":{"rev":"3-a68448bca7ea2d3d3ce43e4d03cd76c6"}}, -{"id":"notifo","key":"notifo","value":{"rev":"8-0bc13ea6135adfa80c5fac497a2ddeda"}}, -{"id":"notify","key":"notify","value":{"rev":"3-da00942576bcb5fab594186f80d4575a"}}, -{"id":"notify-send","key":"notify-send","value":{"rev":"7-89f5c6bc656d51577e3997b9f90d0454"}}, -{"id":"nova","key":"nova","value":{"rev":"3-4e136f35b7d5b85816c17496c6c0e382"}}, -{"id":"now","key":"now","value":{"rev":"84-dbfde18b3f6fe79dd3637b6da34b78cf"}}, -{"id":"now-bal","key":"now-bal","value":{"rev":"3-c769bcdd45a93095f68c2de54f35543f"}}, -{"id":"nowpad","key":"nowpad","value":{"rev":"51-8d90c49031f79a9d31eb4ed6f39609b6"}}, -{"id":"nowww","key":"nowww","value":{"rev":"3-541994af2e579b376d2037f4e34f31d8"}}, -{"id":"noxmox","key":"noxmox","value":{"rev":"9-4ac8b1529dced329cac0976b9ca9eed0"}}, -{"id":"nozzle","key":"nozzle","value":{"rev":"23-e60444326d11a5b57c208de548c325e8"}}, -{"id":"npm","key":"npm","value":{"rev":"665-71d13d024c846b2ee85ed054fcfcb242"}}, -{"id":"npm-deploy","key":"npm-deploy","value":{"rev":"23-751e9d3c2edac0fd9916b0e886414ef2"}}, -{"id":"npm-dev-install","key":"npm-dev-install","value":{"rev":"3-7a08e11a59758329ba8dc4e781ea9993"}}, -{"id":"npm-docsite","key":"npm-docsite","value":{"rev":"3-5ed4f1ffea02487ab9ea24cfa0196f76"}}, -{"id":"npm-github-service","key":"npm-github-service","value":{"rev":"8-6891bc055b499e088fc79a7f94b6a4ec"}}, -{"id":"npm-intro-slides","key":"npm-intro-slides","value":{"rev":"8-e95f28475662cb8f70f4cb48baaa9d27"}}, -{"id":"npm-monitor","key":"npm-monitor","value":{"rev":"7-4e3209ea893fe37c0e516fe21de2d8ad"}}, -{"id":"npm-remapper","key":"npm-remapper","value":{"rev":"3-69163475ee93f32faac3f934e772b6c7"}}, -{"id":"npm-tweets","key":"npm-tweets","value":{"rev":"9-86064412a8aa02d813b20d2e49d78d84"}}, -{"id":"npm-wrapper","key":"npm-wrapper","value":{"rev":"3-59c4d372b84f6e91dbe48a220511dfd5"}}, -{"id":"npm2debian","key":"npm2debian","value":{"rev":"3-3cf2f471f3bfbc613176c7c780a6aad6"}}, -{"id":"npmcount","key":"npmcount","value":{"rev":"5-59c55b09d9c2cc7da217cab3b0ea642c"}}, -{"id":"npmdep","key":"npmdep","value":{"rev":"9-78184ad3b841e5c91bbfa29ff722778a"}}, -{"id":"npmtop","key":"npmtop","value":{"rev":"19-2754af894829f22d6edb3a17a64cdf1e"}}, -{"id":"nquery","key":"nquery","value":{"rev":"9-461fb0c9bcc3c15e0696dc2e99807c98"}}, -{"id":"nrecipe","key":"nrecipe","value":{"rev":"15-a96b6b0134a7625eb4eb236b4bf3fbf3"}}, -{"id":"nserver","key":"nserver","value":{"rev":"5-ea895373c340dd8d9119f3f549990048"}}, -{"id":"nserver-util","key":"nserver-util","value":{"rev":"5-5e14eb0bc9f7ab0eac04c5699c6bb328"}}, -{"id":"nssocket","key":"nssocket","value":{"rev":"51-6aac1d5dd0aa7629b3619b3085d63c04"}}, -{"id":"nstore","key":"nstore","value":{"rev":"28-6e2639829539b7315040487dfa5c79af"}}, -{"id":"nstore-cache","key":"nstore-cache","value":{"rev":"3-453ed78dcbe68b31ff675f4d94b47c4a"}}, -{"id":"nstore-query","key":"nstore-query","value":{"rev":"3-39f46992dd278824db641a37ec5546f5"}}, -{"id":"ntodo","key":"ntodo","value":{"rev":"7-e214da8bbed2d3e40bdaec77d7a49831"}}, -{"id":"ntp","key":"ntp","value":{"rev":"5-5ee2b25e8f3bca06d1cc4ce3b25cac42"}}, -{"id":"nts","key":"nts","value":{"rev":"7-ecaf47f8af1f77de791d1d1fa9bab88e"}}, -{"id":"nttpd","key":"nttpd","value":{"rev":"21-cda7aa0f1db126428f6ca01d44b4d209"}}, -{"id":"ntwitter","key":"ntwitter","value":{"rev":"11-732c6f34137c942bc98967170b2f83fc"}}, -{"id":"nub","key":"nub","value":{"rev":"3-932ecf56889fa43584687dbb2cf4aa91"}}, -{"id":"nubnub","key":"nubnub","value":{"rev":"6-93a5267209e1aa869521a5952cbb1828"}}, -{"id":"null","key":"null","value":{"rev":"3-ae8247cfa9553d23a229993cfc8436c5"}}, -{"id":"numb","key":"numb","value":{"rev":"5-594cd9e8e8e4262ddb3ddd80e8084b62"}}, -{"id":"nun","key":"nun","value":{"rev":"8-3bd8b37ed85c1a5da211bd0d5766848e"}}, -{"id":"nunz","key":"nunz","value":{"rev":"3-040f033943158be495f6b0da1a0c0344"}}, -{"id":"nurl","key":"nurl","value":{"rev":"11-6c4ee6fc5c5119c56f2fd8ad8a0cb928"}}, -{"id":"nutil","key":"nutil","value":{"rev":"3-7785a1d4651dcfe78c874848f41d1348"}}, -{"id":"nutils","key":"nutils","value":{"rev":"13-889624db0c155fc2f0b501bba47e55ec"}}, -{"id":"nuvem","key":"nuvem","value":{"rev":"23-054b9b1240f4741f561ef0bb3197bdf8"}}, -{"id":"nvm","key":"nvm","value":{"rev":"28-251b7eb3429a00099b37810d05accd47"}}, -{"id":"nwm","key":"nwm","value":{"rev":"3-fe9274106aac9e67eea734159477acaf"}}, -{"id":"nx","key":"nx","value":{"rev":"55-7ad32fcb34ec25f841ddd0e5857375c7"}}, -{"id":"nx-core","key":"nx-core","value":{"rev":"33-a7bc62348591bae89fff82057bede1ab"}}, -{"id":"nx-daemon","key":"nx-daemon","value":{"rev":"3-7b86a87654c9e32746a4d36d7c527182"}}, -{"id":"nyaatorrents","key":"nyaatorrents","value":{"rev":"5-8600707a1e84f617bd5468b5c9179202"}}, -{"id":"nyala","key":"nyala","value":{"rev":"17-23c908297a37c47f9f09977f4cf101ff"}}, -{"id":"nyam","key":"nyam","value":{"rev":"17-697b5f17fe67630bc9494184146c12f1"}}, -{"id":"nyancat","key":"nyancat","value":{"rev":"13-84c18d007db41b40e9145bdc049b0a00"}}, -{"id":"nymph","key":"nymph","value":{"rev":"5-3a5d7a75d32f7a71bf4ec131f71484d8"}}, -{"id":"o3-xml","key":"o3-xml","value":{"rev":"3-cc4df881333805600467563f80b5216c"}}, -{"id":"oahu","key":"oahu","value":{"rev":"3-e789fc2098292518cb33606c73bfeca4"}}, -{"id":"oauth","key":"oauth","value":{"rev":"38-36b99063db7dc302b70d932e9bbafc24"}}, -{"id":"oauth-client","key":"oauth-client","value":{"rev":"12-ae097c9580ddcd5ca938b169486a63c6"}}, -{"id":"oauth-server","key":"oauth-server","value":{"rev":"7-ea931e31eaffaa843be61ffc89f29da7"}}, -{"id":"oauth2","key":"oauth2","value":{"rev":"3-4fce73fdc95580f397afeaf1bbd596bb"}}, -{"id":"oauth2-client","key":"oauth2-client","value":{"rev":"7-b5bd019159112384abc2087b2f8cb4f7"}}, -{"id":"oauth2-provider","key":"oauth2-provider","value":{"rev":"3-acd8f23b8c1c47b19838424b64618c70"}}, -{"id":"oauth2-server","key":"oauth2-server","value":{"rev":"11-316baa7e754053d0153086d0748b07c5"}}, -{"id":"obj_diff","key":"obj_diff","value":{"rev":"3-9289e14caaec4bb6aa64aa1be547db3b"}}, -{"id":"object-additions","key":"object-additions","value":{"rev":"3-11f03ae5afe00ad2be034fb313ce71a9"}}, -{"id":"object-proxy","key":"object-proxy","value":{"rev":"3-4d531308fc97bac6f6f9acd1e8f5b53a"}}, -{"id":"object-sync","key":"object-sync","value":{"rev":"5-6628fff49d65c96edc9d7a2e13db8d6d"}}, -{"id":"observer","key":"observer","value":{"rev":"3-a48052671a59b1c7874b4462e375664d"}}, -{"id":"octo.io","key":"octo.io","value":{"rev":"7-5692104396299695416ecb8548e53541"}}, -{"id":"octopus","key":"octopus","value":{"rev":"3-0a286abf59ba7232210e24a371902e7b"}}, -{"id":"odbc","key":"odbc","value":{"rev":"3-8550f0b183b229e41f3cb947bad9b059"}}, -{"id":"odot","key":"odot","value":{"rev":"13-3954b69c1a560a71fe58ab0c5c1072ba"}}, -{"id":"offliner","key":"offliner","value":{"rev":"3-9b58041cbd7b0365e04fec61c192c9b2"}}, -{"id":"ofxer","key":"ofxer","value":{"rev":"11-f8a79e1f27c92368ca1198ad37fbe83e"}}, -{"id":"ogre","key":"ogre","value":{"rev":"35-ea9c78c1d5b1761f059bb97ea568b23d"}}, -{"id":"oi.tekcos","key":"oi.tekcos","value":{"rev":"5-fdca9adb54acea3f91567082b107dde9"}}, -{"id":"oktest","key":"oktest","value":{"rev":"3-3b40312743a3eb1d8541ceee3ecfeace"}}, -{"id":"omcc","key":"omcc","value":{"rev":"3-19718e77bf82945c3ca7a3cdfb91188c"}}, -{"id":"omegle","key":"omegle","value":{"rev":"3-507ba8a51afbe2ff078e3e96712b7286"}}, -{"id":"ometa","key":"ometa","value":{"rev":"10-457fa17de89e1012ce812af3a53f4035"}}, -{"id":"ometa-highlighter","key":"ometa-highlighter","value":{"rev":"21-d18470d6d9a93bc7383c7d8ace22ad1d"}}, -{"id":"ometajs","key":"ometajs","value":{"rev":"20-c7e8c32926f2523e40e4a7ba2297192c"}}, -{"id":"onion","key":"onion","value":{"rev":"3-b46c000c8ff0b06f5f0028d268bc5c94"}}, -{"id":"onvalid","key":"onvalid","value":{"rev":"3-090bc1cf1418545b84db0fceb0846293"}}, -{"id":"oo","key":"oo","value":{"rev":"7-2297a18cdbcf29ad4867a2159912c04e"}}, -{"id":"oop","key":"oop","value":{"rev":"7-45fab8bae343e805d0c1863149dc20df"}}, -{"id":"op","key":"op","value":{"rev":"13-4efb059757caaecc18d5110b44266b35"}}, -{"id":"open-uri","key":"open-uri","value":{"rev":"21-023a00f26ecd89e278136fbb417ae9c3"}}, -{"id":"open.core","key":"open.core","value":{"rev":"35-f578db4e41dd4ae9128e3be574cf7b14"}}, -{"id":"open311","key":"open311","value":{"rev":"13-bb023a45d3c3988022d2fef809de8d98"}}, -{"id":"openid","key":"openid","value":{"rev":"29-b3c8a0e76d99ddb80c98d2aad5586771"}}, -{"id":"openlayers","key":"openlayers","value":{"rev":"3-602c34468c9be326e95be327b58d599b"}}, -{"id":"opentok","key":"opentok","value":{"rev":"5-5f4749f1763d45141d0272c1dbe6249a"}}, -{"id":"opentsdb-dashboard","key":"opentsdb-dashboard","value":{"rev":"3-2e0c5ccf3c9cfce17c20370c93283707"}}, -{"id":"opower-jobs","key":"opower-jobs","value":{"rev":"16-1602139f92e58d88178f21f1b3e0939f"}}, -{"id":"optimist","key":"optimist","value":{"rev":"64-ca3e5085acf135169d79949c25d84690"}}, -{"id":"optparse","key":"optparse","value":{"rev":"6-0200c34395f982ae3b80f4d18cb14483"}}, -{"id":"opts","key":"opts","value":{"rev":"8-ce2a0e31de55a1e02d5bbff66c4e8794"}}, -{"id":"orchestra","key":"orchestra","value":{"rev":"9-52ca98cddb51a2a43ec02338192c44fc"}}, -{"id":"orchid","key":"orchid","value":{"rev":"49-af9635443671ed769e4efa691b8ca84a"}}, -{"id":"orderly","key":"orderly","value":{"rev":"3-9ccc42d45b64278c9ffb1e64fc4f0d62"}}, -{"id":"orgsync.live","key":"orgsync.live","value":{"rev":"3-4dffc8ac43931364f59b9cb534acbaef"}}, -{"id":"orm","key":"orm","value":{"rev":"21-f3e7d89239364559d306110580bbb08f"}}, -{"id":"ormnomnom","key":"ormnomnom","value":{"rev":"15-0aacfbb5b7b580d76e9ecf5214a1d5ed"}}, -{"id":"orona","key":"orona","value":{"rev":"8-62d4ba1bf49098a140a2b85f80ebb103"}}, -{"id":"osc4node","key":"osc4node","value":{"rev":"3-0910613e78065f78b61142b35986e8b3"}}, -{"id":"oscar","key":"oscar","value":{"rev":"3-f5d2d39a67c67441bc2135cdaf2b47f8"}}, -{"id":"osrandom","key":"osrandom","value":{"rev":"3-026016691a5ad068543503e5e7ce6a84"}}, -{"id":"ossp-uuid","key":"ossp-uuid","value":{"rev":"10-8b7e1fba847d7cc9aa4f4c8813ebe6aa"}}, -{"id":"ostatus","key":"ostatus","value":{"rev":"3-76e0ec8c61c6df15c964197b722e24e7"}}, -{"id":"ostrich","key":"ostrich","value":{"rev":"3-637e0821e5ccfd0f6b1261b22c168c8d"}}, -{"id":"otk","key":"otk","value":{"rev":"5-2dc24e159cc618f43e573561286c4dcd"}}, -{"id":"ourl","key":"ourl","value":{"rev":"5-a3945e59e33faac96c75b508ef7fa1fb"}}, -{"id":"oursql","key":"oursql","value":{"rev":"21-bc53ab462155fa0aedbe605255fb9988"}}, -{"id":"out","key":"out","value":{"rev":"5-eb261f940b6382e2689210a58bc1b440"}}, -{"id":"overload","key":"overload","value":{"rev":"10-b88919e5654bef4922029afad4f1d519"}}, -{"id":"ox","key":"ox","value":{"rev":"3-0ca445370b4f76a93f2181ad113956d9"}}, -{"id":"pachube","key":"pachube","value":{"rev":"10-386ac6be925bab307b5d545516fb18ef"}}, -{"id":"pachube-stream","key":"pachube-stream","value":{"rev":"13-176dadcc5c516420fb3feb1f964739e0"}}, -{"id":"pack","key":"pack","value":{"rev":"29-8f8c511d95d1fb322c1a6d7965ef8f29"}}, -{"id":"packagebohrer","key":"packagebohrer","value":{"rev":"3-507358253a945a74c49cc169ad0bf5a2"}}, -{"id":"packer","key":"packer","value":{"rev":"9-23410d893d47418731e236cfcfcfbf03"}}, -{"id":"packet","key":"packet","value":{"rev":"8-1b366f97d599c455dcbbe4339da7cf9e"}}, -{"id":"pacote-sam-egenial","key":"pacote-sam-egenial","value":{"rev":"3-b967db1b9fceb9a937f3520efd89f479"}}, -{"id":"pacoteegenial","key":"pacoteegenial","value":{"rev":"3-9cfe8518b885bfd9a44ed38814f7d623"}}, -{"id":"pact","key":"pact","value":{"rev":"7-82996c1a0c8e9a5e9df959d4ad37085e"}}, -{"id":"pad","key":"pad","value":{"rev":"3-eef6147f09b662cff95c946f2b065da5"}}, -{"id":"paddle","key":"paddle","value":{"rev":"3-fedd0156b9a0dadb5e9b0f1cfab508fd"}}, -{"id":"padlock","key":"padlock","value":{"rev":"9-3a9e378fbe8e3817da7999f675af227e"}}, -{"id":"pagen","key":"pagen","value":{"rev":"9-9aac56724039c38dcdf7f6d5cbb4911c"}}, -{"id":"paginate-js","key":"paginate-js","value":{"rev":"5-995269155152db396662c59b67e9e93d"}}, -{"id":"pairtree","key":"pairtree","value":{"rev":"3-0361529e6c91271e2a61f3d7fd44366e"}}, -{"id":"palsu-app","key":"palsu-app","value":{"rev":"3-73f1fd9ae35e3769efc9c1aa25ec6da7"}}, -{"id":"pam","key":"pam","value":{"rev":"3-77b5bd15962e1c8be1980b33fd3b9737"}}, -{"id":"panache","key":"panache","value":{"rev":"25-749d2034f7f9179c2266cf896bb4abb0"}}, -{"id":"panic","key":"panic","value":{"rev":"7-068b22be54ca8ae7b03eb153c2ea849a"}}, -{"id":"pantry","key":"pantry","value":{"rev":"33-3896f0fc165092f6cabb2949be3952c4"}}, -{"id":"paper-keys","key":"paper-keys","value":{"rev":"3-729378943040ae01d59f07bb536309b7"}}, -{"id":"paperboy","key":"paperboy","value":{"rev":"8-db2d51c2793b4ffc82a1ae928c813aae"}}, -{"id":"paperserve","key":"paperserve","value":{"rev":"6-8509fb68217199a3eb74f223b1e2bee5"}}, -{"id":"parall","key":"parall","value":{"rev":"5-279d7105a425e136f6101250e8f81a14"}}, -{"id":"parallel","key":"parallel","value":{"rev":"14-f1294b3b840cfb26095107110b6720ec"}}, -{"id":"paramon","key":"paramon","value":{"rev":"3-37e599e924beb509c894c992cf72791b"}}, -{"id":"parannus","key":"parannus","value":{"rev":"7-7541f1ed13553261330b9e1c4706f112"}}, -{"id":"parasite","key":"parasite","value":{"rev":"13-83c26181bb92cddb8ff76bc154a50210"}}, -{"id":"parrot","key":"parrot","value":{"rev":"3-527d1cb4b5be0e252dc92a087d380f17"}}, -{"id":"parseUri","key":"parseUri","value":{"rev":"3-3b60b1fd6d8109279b5d0cfbdb89b343"}}, -{"id":"parseopt","key":"parseopt","value":{"rev":"10-065f1acaf02c94f0684f75fefc2fd1ec"}}, -{"id":"parser","key":"parser","value":{"rev":"5-f661f0b7ede9b6d3e0de259ed20759b1"}}, -{"id":"parser_email","key":"parser_email","value":{"rev":"12-63333860c62f2a9c9d6b0b7549bf1cdc"}}, -{"id":"parstream","key":"parstream","value":{"rev":"3-ef7e8ffc8ce1e7d951e37f85bfd445ab"}}, -{"id":"parted","key":"parted","value":{"rev":"9-250e4524994036bc92915b6760d62d8a"}}, -{"id":"partial","key":"partial","value":{"rev":"7-208411e6191275a4193755ee86834716"}}, -{"id":"party","key":"party","value":{"rev":"5-9337d8dc5e163f0300394f533ab1ecdf"}}, -{"id":"pashua","key":"pashua","value":{"rev":"3-b752778010f4e20f662a3d8f0f57b18b"}}, -{"id":"pass","key":"pass","value":{"rev":"3-66a2d55d93eae8535451f12965578db8"}}, -{"id":"passthru","key":"passthru","value":{"rev":"9-3c8f0b20f1a16976f3645a6f7411b56a"}}, -{"id":"passwd","key":"passwd","value":{"rev":"19-44ac384382a042faaa1f3b111786c831"}}, -{"id":"password","key":"password","value":{"rev":"9-0793f6a8d09076f25cde7c9e528eddec"}}, -{"id":"password-hash","key":"password-hash","value":{"rev":"9-590c62e275ad577c6f8ddbf5ba4579cc"}}, -{"id":"path","key":"path","value":{"rev":"3-3ec064cf3f3a85cb59528654c5bd938f"}}, -{"id":"pathjs","key":"pathjs","value":{"rev":"5-d5e1b1a63e711cae3ac79a3b1033b609"}}, -{"id":"pathname","key":"pathname","value":{"rev":"9-16f2c1473454900ce18a217b2ea52c57"}}, -{"id":"paths","key":"paths","value":{"rev":"3-fa47b7c1d533a7d9f4bbaffc5fb89905"}}, -{"id":"patr","key":"patr","value":{"rev":"7-7bcd37586389178b9f23d33c1d7a0292"}}, -{"id":"pattern","key":"pattern","value":{"rev":"36-3ded826185c384af535dcd428af3f626"}}, -{"id":"payment-paypal-payflowpro","key":"payment-paypal-payflowpro","value":{"rev":"14-d8814a1d8bba57a6ecf8027064adc7ad"}}, -{"id":"paynode","key":"paynode","value":{"rev":"16-16084e61db66ac18fdbf95a51d31c09a"}}, -{"id":"payos","key":"payos","value":{"rev":"3-373695bd80c454b32b83a5eba6044261"}}, -{"id":"paypal-ipn","key":"paypal-ipn","value":{"rev":"5-ef32291f9f8371b20509db3acee722f6"}}, -{"id":"pcap","key":"pcap","value":{"rev":"46-8ae9e919221102581d6bb848dc67b84b"}}, -{"id":"pd","key":"pd","value":{"rev":"7-82146739c4c0eb4e49e40aa80a29cc0a"}}, -{"id":"pdf","key":"pdf","value":{"rev":"6-5c6b6a133e1b3ce894ebb1a49090216c"}}, -{"id":"pdfcrowd","key":"pdfcrowd","value":{"rev":"5-026b4611b50374487bfd64fd3e0d562c"}}, -{"id":"pdfkit","key":"pdfkit","value":{"rev":"13-2fd34c03225a87dfd8057c85a83f3c50"}}, -{"id":"pdflatex","key":"pdflatex","value":{"rev":"3-bbbf61f09ebe4c49ca0aff8019611660"}}, -{"id":"pdl","key":"pdl","value":{"rev":"3-4c41bf12e901ee15bdca468db8c89102"}}, -{"id":"peanut","key":"peanut","value":{"rev":"55-b797121dbbcba1219934284ef56abb8a"}}, -{"id":"pebble","key":"pebble","value":{"rev":"21-3cd08362123260a2e96d96d80e723805"}}, -{"id":"pecode","key":"pecode","value":{"rev":"3-611f5e8c61bbf4467b84da954ebdd521"}}, -{"id":"pegjs","key":"pegjs","value":{"rev":"11-091040d16433014d1da895e32ac0f6a9"}}, -{"id":"per-second","key":"per-second","value":{"rev":"5-e1593b3f7008ab5e1c3cae86f39ba3f3"}}, -{"id":"permafrost","key":"permafrost","value":{"rev":"9-494cbc9a2f43a60b57f23c5f5b12270d"}}, -{"id":"perry","key":"perry","value":{"rev":"41-15aed7a778fc729ad62fdfb231c50774"}}, -{"id":"persistencejs","key":"persistencejs","value":{"rev":"20-2585af3f15f0a4a7395e937237124596"}}, -{"id":"pg","key":"pg","value":{"rev":"142-48de452fb8a84022ed7cae8ec2ebdaf6"}}, -{"id":"phonetap","key":"phonetap","value":{"rev":"7-2cc7d3c2a09518ad9b0fe816c6a99125"}}, -{"id":"php-autotest","key":"php-autotest","value":{"rev":"3-04470b38b259187729af574dd3dc1f97"}}, -{"id":"phpass","key":"phpass","value":{"rev":"3-66f4bec659bf45b312022bb047b18696"}}, -{"id":"piano","key":"piano","value":{"rev":"3-0bab6b5409e4305c87a775e96a2b7ad3"}}, -{"id":"picard","key":"picard","value":{"rev":"5-7676e6ad6d5154fdc016b001465891f3"}}, -{"id":"picardForTynt","key":"picardForTynt","value":{"rev":"3-09d205b790bd5022b69ec4ad54bad770"}}, -{"id":"pid","key":"pid","value":{"rev":"3-0ba7439d599b9d613461794c3892d479"}}, -{"id":"pieshop","key":"pieshop","value":{"rev":"12-7851afe1bbc20de5d054fe93b071f849"}}, -{"id":"pig","key":"pig","value":{"rev":"3-8e6968a7b64635fed1bad12c39d7a46a"}}, -{"id":"pigeons","key":"pigeons","value":{"rev":"53-8df70420d3c845cf0159b3f25d0aab90"}}, -{"id":"piles","key":"piles","value":{"rev":"3-140cb1e83b5a939ecd429b09886132ef"}}, -{"id":"pillar","key":"pillar","value":{"rev":"6-83c81550187f6d00e11dd9955c1c94b7"}}, -{"id":"pilot","key":"pilot","value":{"rev":"3-073ed1a083cbd4c2aa2561f19e5935ea"}}, -{"id":"pinboard","key":"pinboard","value":{"rev":"3-1020cab02a1183acdf82e1f7620dc1e0"}}, -{"id":"pinf-loader-js","key":"pinf-loader-js","value":{"rev":"5-709ba9c86fb4de906bd7bbca53771f0f"}}, -{"id":"pinf-loader-js-demos-npmpackage","key":"pinf-loader-js-demos-npmpackage","value":{"rev":"3-860569d98c83e59185cff356e56b10a6"}}, -{"id":"pingback","key":"pingback","value":{"rev":"5-5d0a05d65a14f6837b0deae16c550bec"}}, -{"id":"pingdom","key":"pingdom","value":{"rev":"11-f299d6e99122a9fa1497bfd166dadd02"}}, -{"id":"pintpay","key":"pintpay","value":{"rev":"3-eba9c4059283adec6b1ab017284c1f17"}}, -{"id":"pipe","key":"pipe","value":{"rev":"5-d202bf317c10a52ac817b5c1a4ce4c88"}}, -{"id":"pipe_utils","key":"pipe_utils","value":{"rev":"13-521857c99eb76bba849a22240308e584"}}, -{"id":"pipegram","key":"pipegram","value":{"rev":"3-1449333c81dd658d5de9eebf36c07709"}}, -{"id":"pipeline-surveyor","key":"pipeline-surveyor","value":{"rev":"11-464db89b17e7b44800088ec4a263d92e"}}, -{"id":"pipes","key":"pipes","value":{"rev":"99-8320636ff840a61d82d9c257a2e0ed48"}}, -{"id":"pipes-cellar","key":"pipes-cellar","value":{"rev":"27-e035e58a3d82e50842d766bb97ea3ed9"}}, -{"id":"pipes-cohort","key":"pipes-cohort","value":{"rev":"9-88fc0971e01516873396e44974874903"}}, -{"id":"piton-entity","key":"piton-entity","value":{"rev":"31-86254212066019f09d67dfd58524bd75"}}, -{"id":"piton-http-utils","key":"piton-http-utils","value":{"rev":"3-6cf6aa0c655ff6118d53e62e3b970745"}}, -{"id":"piton-mixin","key":"piton-mixin","value":{"rev":"3-7b7737004e53e04f7f95ba5850eb5e70"}}, -{"id":"piton-pipe","key":"piton-pipe","value":{"rev":"3-8d7df4e53f620ef2f24e9fc8b24f0238"}}, -{"id":"piton-simplate","key":"piton-simplate","value":{"rev":"3-9ac00835d3de59d535cdd2347011cdc9"}}, -{"id":"piton-string-utils","key":"piton-string-utils","value":{"rev":"3-ecab73993d764dfb378161ea730dbbd5"}}, -{"id":"piton-validity","key":"piton-validity","value":{"rev":"13-1766651d69e3e075bf2c66b174b66026"}}, -{"id":"pixel-ping","key":"pixel-ping","value":{"rev":"11-38d717c927e13306e8ff9032785b50f2"}}, -{"id":"pixelcloud","key":"pixelcloud","value":{"rev":"7-0897d734157b52dece8f86cde7be19d4"}}, -{"id":"pixiedust","key":"pixiedust","value":{"rev":"3-6b932dee4b6feeed2f797de5d0066f8a"}}, -{"id":"pkginfo","key":"pkginfo","value":{"rev":"13-3ee42503d6672812960a965d4f3a1bc2"}}, -{"id":"pksqlite","key":"pksqlite","value":{"rev":"13-095e7d7d0258b71491c39d0e8c4f19be"}}, -{"id":"plants.js","key":"plants.js","value":{"rev":"3-e3ef3a16f637787e84c100a9b9ec3b08"}}, -{"id":"plate","key":"plate","value":{"rev":"20-92ba0729b2edc931f28870fe7f2ca95a"}}, -{"id":"platform","key":"platform","value":{"rev":"4-be465a1d21be066c96e30a42b8602177"}}, -{"id":"platformjs","key":"platformjs","value":{"rev":"35-5c510fa0c90492fd1d0f0fc078460018"}}, -{"id":"platoon","key":"platoon","value":{"rev":"28-e0e0c5f852eadacac5a652860167aa11"}}, -{"id":"play","key":"play","value":{"rev":"5-17f7cf7cf5d1c21c7392f3c43473098d"}}, -{"id":"plist","key":"plist","value":{"rev":"10-2a23864923aeed93fb8e25c4b5b2e97e"}}, -{"id":"png","key":"png","value":{"rev":"14-9cc7aeaf0c036c9a880bcee5cd46229a"}}, -{"id":"png-guts","key":"png-guts","value":{"rev":"5-a29c7c686f9d08990ce29632bf59ef90"}}, -{"id":"policyfile","key":"policyfile","value":{"rev":"21-4a9229cca4bcac10f730f296f7118548"}}, -{"id":"polla","key":"polla","value":{"rev":"27-9af5a575961a4dddb6bef482c168c756"}}, -{"id":"poly","key":"poly","value":{"rev":"3-7f7fe29d9f0ec4fcbf8481c797b20455"}}, -{"id":"polyglot","key":"polyglot","value":{"rev":"3-9306e246d1f8b954b41bef76e3e81291"}}, -{"id":"pool","key":"pool","value":{"rev":"10-f364b59aa8a9076a17cd94251dd013ab"}}, -{"id":"poolr","key":"poolr","value":{"rev":"5-cacfbeaa7aaca40c1a41218e8ac8b732"}}, -{"id":"pop","key":"pop","value":{"rev":"41-8edd9ef2f34a90bf0ec5e8eb0e51e644"}}, -{"id":"pop-disqus","key":"pop-disqus","value":{"rev":"3-4a8272e6a8453ed2d754397dc8b349bb"}}, -{"id":"pop-ga","key":"pop-ga","value":{"rev":"3-5beaf7b355d46b3872043b97696ee693"}}, -{"id":"pop-gallery","key":"pop-gallery","value":{"rev":"3-1a88920ff930b8ce51cd50fcfe62675e"}}, -{"id":"pop3-client","key":"pop3-client","value":{"rev":"3-be8c314b0479d9d98384e2ff36d7f207"}}, -{"id":"poplib","key":"poplib","value":{"rev":"7-ab64c5c35269aee897b0904b4548096b"}}, -{"id":"porter-stemmer","key":"porter-stemmer","value":{"rev":"5-724a7b1d635b95a14c9ecd9d2f32487d"}}, -{"id":"portfinder","key":"portfinder","value":{"rev":"5-cdf36d1c666bbdae500817fa39b9c2bd"}}, -{"id":"portscanner","key":"portscanner","value":{"rev":"3-773c1923b6f3b914bd801476efcfdf64"}}, -{"id":"pos","key":"pos","value":{"rev":"3-1c1a27020560341ecd1b54d0e3cfaf2a"}}, -{"id":"posix-getopt","key":"posix-getopt","value":{"rev":"3-819b69724575b65fe25cf1c768e1b1c6"}}, -{"id":"postageapp","key":"postageapp","value":{"rev":"9-f5735237f7e6f0b467770e28e84c56db"}}, -{"id":"postal","key":"postal","value":{"rev":"19-dd70aeab4ae98ccf3d9f203dff9ccf37"}}, -{"id":"posterous","key":"posterous","value":{"rev":"3-6f8a9e7cae8a26f021653f2c27b0c67f"}}, -{"id":"postgres","key":"postgres","value":{"rev":"6-e8844a47c83ff3ef0a1ee7038b2046b2"}}, -{"id":"postgres-js","key":"postgres-js","value":{"rev":"3-bbe27a49ee9f8ae8789660e178d6459d"}}, -{"id":"postman","key":"postman","value":{"rev":"5-548538583f2e7ad448adae27f9a801e5"}}, -{"id":"postmark","key":"postmark","value":{"rev":"24-a6c61b346329e499d4a4a37dbfa446a2"}}, -{"id":"postmark-api","key":"postmark-api","value":{"rev":"3-79973af301aa820fc18c2c9d418adcd7"}}, -{"id":"postmessage","key":"postmessage","value":{"rev":"5-854bdb27c2a1af5b629b01f7d69691fe"}}, -{"id":"postpie","key":"postpie","value":{"rev":"10-88527e2731cd07a3b8ddec2608682700"}}, -{"id":"postprocess","key":"postprocess","value":{"rev":"5-513ecd54bf8df0ae73d2a50c717fd939"}}, -{"id":"potato","key":"potato","value":{"rev":"3-0f4cab343859692bf619e79cd9cc5be1"}}, -{"id":"pour","key":"pour","value":{"rev":"7-272bee63c5f19d12102198a23a4af902"}}, -{"id":"pow","key":"pow","value":{"rev":"22-58b557cd71ec0e95eef51dfd900e4736"}}, -{"id":"precious","key":"precious","value":{"rev":"19-b370292b258bcbca02c5d8861ebee0bb"}}, -{"id":"predicate","key":"predicate","value":{"rev":"3-1c6d1871fe71bc61457483793eecf7f9"}}, -{"id":"prefer","key":"prefer","value":{"rev":"11-236b9d16cd019e1d9af41e745bfed754"}}, -{"id":"prenup","key":"prenup","value":{"rev":"3-4c56ddf1ee22cd90c85963209736bc75"}}, -{"id":"pretty-json","key":"pretty-json","value":{"rev":"5-2dbb22fc9573c19e64725ac331a8d59c"}}, -{"id":"prettyfy","key":"prettyfy","value":{"rev":"3-fc7e39aad63a42533d4ac6d6bfa32325"}}, -{"id":"prick","key":"prick","value":{"rev":"10-71a02e1be02df2af0e6a958099be565a"}}, -{"id":"printf","key":"printf","value":{"rev":"5-2896b8bf90df19d4a432153211ca3a7e"}}, -{"id":"pro","key":"pro","value":{"rev":"5-e98adaf2f741e00953bbb942bbeb14d2"}}, -{"id":"probe_couchdb","key":"probe_couchdb","value":{"rev":"28-86f8918a3e64608f8009280fb28a983d"}}, -{"id":"process","key":"process","value":{"rev":"3-6865fc075d8083afd8e2aa266512447c"}}, -{"id":"procfile","key":"procfile","value":{"rev":"3-22dbb2289f5fb3060a8f7833b50116a4"}}, -{"id":"profile","key":"profile","value":{"rev":"29-5afee07fe4c334d9836fda1df51e1f2d"}}, -{"id":"profilejs","key":"profilejs","value":{"rev":"9-128c2b0e09624ee69a915cff20cdf359"}}, -{"id":"profiler","key":"profiler","value":{"rev":"13-4f1582fad93cac11daad5d5a67565e4f"}}, -{"id":"progress","key":"progress","value":{"rev":"7-bba60bc39153fa0fbf5e909b6df213b0"}}, -{"id":"progress-bar","key":"progress-bar","value":{"rev":"5-616721d3856b8e5a374f247404d6ab29"}}, -{"id":"progressify","key":"progressify","value":{"rev":"5-0379cbed5adc2c3f3ac6adf0307ec11d"}}, -{"id":"proj4js","key":"proj4js","value":{"rev":"5-7d209ce230f6a2d5931800acef436a06"}}, -{"id":"projectwatch","key":"projectwatch","value":{"rev":"15-d0eca46ffc3d9e18a51db2d772fa2778"}}, -{"id":"promise","key":"promise","value":{"rev":"3-1409350eb10aa9055ed13a5b59f0abc3"}}, -{"id":"promised-fs","key":"promised-fs","value":{"rev":"28-1d3e0dd1884e1c39a5d5e2d35bb1f911"}}, -{"id":"promised-http","key":"promised-http","value":{"rev":"8-3f8d560c800ddd44a617bf7d7c688392"}}, -{"id":"promised-io","key":"promised-io","value":{"rev":"11-e9a280e85c021cd8b77e524aac50fafb"}}, -{"id":"promised-traits","key":"promised-traits","value":{"rev":"14-62d0ac59d4ac1c6db99c0273020565ea"}}, -{"id":"promised-utils","key":"promised-utils","value":{"rev":"20-0c2488685eb8999c40ee5e7cfa4fd75d"}}, -{"id":"prompt","key":"prompt","value":{"rev":"32-d52a524c147e34c1258facab69660cc2"}}, -{"id":"props","key":"props","value":{"rev":"17-8c4c0bf1b69087510612c8d5ccbfbfeb"}}, -{"id":"proserver","key":"proserver","value":{"rev":"3-4b0a001404171eb0f6f3e5d73a35fcb1"}}, -{"id":"protege","key":"protege","value":{"rev":"150-9790c23d7b7eb5fb94cd5b8048bdbf10"}}, -{"id":"proto","key":"proto","value":{"rev":"6-29fe2869f34e2737b0cc2a0dbba8e397"}}, -{"id":"proto-list","key":"proto-list","value":{"rev":"3-0f64ff29a4a410d5e03a57125374b87b"}}, -{"id":"protobuf-stream","key":"protobuf-stream","value":{"rev":"3-950e621ce7eef306eff5f932a9c4cbae"}}, -{"id":"protodiv","key":"protodiv","value":{"rev":"9-ed8d84033943934eadf5d95dfd4d8eca"}}, -{"id":"proton","key":"proton","value":{"rev":"19-8ad32d57a3e71df786ff41ef8c7281f2"}}, -{"id":"protoparse","key":"protoparse","value":{"rev":"3-9fbcc3b26220f974d4b9c9c883a0260b"}}, -{"id":"prototype","key":"prototype","value":{"rev":"5-2a672703595e65f5d731a967b43655a7"}}, -{"id":"prowl","key":"prowl","value":{"rev":"5-ec480caa5a7db4f1ec2ce22d5eb1dad8"}}, -{"id":"prowler","key":"prowler","value":{"rev":"3-09747704f78c7c123fb1c719c4996924"}}, -{"id":"prox","key":"prox","value":{"rev":"5-0ac5f893b270a819d91f0c6581aca2a8"}}, -{"id":"proxify","key":"proxify","value":{"rev":"3-d24a979b708645328476bd42bd5aaba8"}}, -{"id":"proxino","key":"proxino","value":{"rev":"7-894cc6d453af00e5e39ebc8f0b0abe3a"}}, -{"id":"proxio","key":"proxio","value":{"rev":"55-a1b2744054b3dc3adc2f7f67d2c026a4"}}, -{"id":"proxy","key":"proxy","value":{"rev":"3-c6dd1a8b58e0ed7ac983c89c05ee987d"}}, -{"id":"proxy-by-url","key":"proxy-by-url","value":{"rev":"5-acfcf47f3575cea6594513ff459c5f2c"}}, -{"id":"pseudo","key":"pseudo","value":{"rev":"11-4d894a335036d96cdb9bb19f7b857293"}}, -{"id":"psk","key":"psk","value":{"rev":"17-375055bf6315476a37b5fadcdcb6b149"}}, -{"id":"pty","key":"pty","value":{"rev":"8-0b3ea0287fd23f882da27dabce4e3230"}}, -{"id":"pub-mix","key":"pub-mix","value":{"rev":"3-2c455b249167cbf6b1a6ea761bf119f4"}}, -{"id":"pubjs","key":"pubjs","value":{"rev":"3-a0ceab8bc6ec019dfcf9a8e16756bea0"}}, -{"id":"publicsuffix","key":"publicsuffix","value":{"rev":"8-1592f0714595c0ca0433272c60afc733"}}, -{"id":"publisher","key":"publisher","value":{"rev":"13-f2c8722f14732245d3ca8842fe5b7661"}}, -{"id":"pubnub-client","key":"pubnub-client","value":{"rev":"8-6e511a6dd2b7feb6cefe410facd61f53"}}, -{"id":"pubsub","key":"pubsub","value":{"rev":"11-6c6270bf95af417fb766c05f66b2cc9e"}}, -{"id":"pubsub.io","key":"pubsub.io","value":{"rev":"24-9686fe9ae3356966dffee99f53eaad2c"}}, -{"id":"pubsubd","key":"pubsubd","value":{"rev":"3-b1ff2fa958bd450933735162e9615449"}}, -{"id":"pulley","key":"pulley","value":{"rev":"13-f81ed698175ffd0b5b19357a623b8f15"}}, -{"id":"pulse","key":"pulse","value":{"rev":"9-da4bdabb6d7c189d05c8d6c64713e4ac"}}, -{"id":"pulverizr","key":"pulverizr","value":{"rev":"16-ffd4db4d2b1bfbd0b6ac794dca9e728e"}}, -{"id":"pulverizr-bal","key":"pulverizr-bal","value":{"rev":"5-dba279d07f3ed72990d10f11c5d10792"}}, -{"id":"punycode","key":"punycode","value":{"rev":"3-c0df35bb32d1490a4816161974610682"}}, -{"id":"puppy","key":"puppy","value":{"rev":"3-355fb490dba55efdf8840e2769cb7f41"}}, -{"id":"pure","key":"pure","value":{"rev":"7-b2da0d64ea12cea63bed940222bb36df"}}, -{"id":"purpose","key":"purpose","value":{"rev":"3-ef30ac479535bd603954c27ecb5d564a"}}, -{"id":"push-it","key":"push-it","value":{"rev":"35-2640be8ca8938768836520ce5fc7fff2"}}, -{"id":"pusher","key":"pusher","value":{"rev":"5-eb363d1e0ea2c59fd92a07ea642c5d03"}}, -{"id":"pusher-pipe","key":"pusher-pipe","value":{"rev":"11-11ab87d1288a8c7d11545fdab56616f6"}}, -{"id":"pushinator","key":"pushinator","value":{"rev":"15-6b2c37931bc9438e029a6af0cf97091c"}}, -{"id":"put","key":"put","value":{"rev":"12-4b05a7cdfdb24a980597b38781457cf5"}}, -{"id":"put-selector","key":"put-selector","value":{"rev":"1-1a9b3b8b5a44485b93966503370978aa"}}, -{"id":"putio","key":"putio","value":{"rev":"3-973b65e855e1cd0d3cc685542263cc55"}}, -{"id":"pwilang","key":"pwilang","value":{"rev":"43-49ad04f5abbdd9c5b16ec0271ab17520"}}, -{"id":"py","key":"py","value":{"rev":"3-aade832559d0fab88116aa794e3a9f35"}}, -{"id":"pygments","key":"pygments","value":{"rev":"3-2b2c96f39bdcb9ff38eb7d4bac7c90ba"}}, -{"id":"python","key":"python","value":{"rev":"15-706af811b5544a4aacc6ad1e9863e369"}}, -{"id":"q","key":"q","value":{"rev":"80-fd2397ad465750240d0f22a0abc53de5"}}, -{"id":"q-comm","key":"q-comm","value":{"rev":"17-972994947f097fdcffcfcb2277c966ce"}}, -{"id":"q-fs","key":"q-fs","value":{"rev":"68-958b01dd5bdc4da5ba3c1cd02c85fc0e"}}, -{"id":"q-http","key":"q-http","value":{"rev":"26-42a7db91b650386d920f52afe3e9161f"}}, -{"id":"q-io","key":"q-io","value":{"rev":"20-79f7b3d43bcbd53cc57b6531426738e2"}}, -{"id":"q-io-buffer","key":"q-io-buffer","value":{"rev":"5-05528d9a527da73357991bec449a1b76"}}, -{"id":"q-require","key":"q-require","value":{"rev":"12-e3fc0388e4d3e6d8a15274c3cc239712"}}, -{"id":"q-util","key":"q-util","value":{"rev":"10-94e0c392e70fec942aee0f024e5c090f"}}, -{"id":"qbox","key":"qbox","value":{"rev":"17-88f9148881ede94ae9dcbf4e1980aa69"}}, -{"id":"qfi","key":"qfi","value":{"rev":"3-a6052f02aec10f17085b09e4f9da1ce0"}}, -{"id":"qjscl","key":"qjscl","value":{"rev":"11-def1631b117a53cab5fd38ffec28d727"}}, -{"id":"qooxdoo","key":"qooxdoo","value":{"rev":"5-720d33ec2de3623d6535b3bdc8041d81"}}, -{"id":"qoper8","key":"qoper8","value":{"rev":"11-48fa2ec116bec46d64161e35b0f0cd86"}}, -{"id":"qq","key":"qq","value":{"rev":"23-6f7a5f158364bbf2e90a0c6eb1fbf8a9"}}, -{"id":"qqwry","key":"qqwry","value":{"rev":"10-bf0d6cc2420bdad92a1104c184e7e045"}}, -{"id":"qr","key":"qr","value":{"rev":"11-0a0120b7ec22bbcf76ff1d78fd4a7689"}}, -{"id":"qrcode","key":"qrcode","value":{"rev":"11-b578b6a76bffe996a0390e3d886b79bb"}}, -{"id":"qs","key":"qs","value":{"rev":"23-3da45c8c8a5eb33d45360d92b6072d37"}}, -{"id":"quack-array","key":"quack-array","value":{"rev":"5-6b676aa6273e4515ab5e7bfee1c331e0"}}, -{"id":"quadprog","key":"quadprog","value":{"rev":"7-c0ceeeb12735f334e8c7940ac1f0a896"}}, -{"id":"quadraticon","key":"quadraticon","value":{"rev":"66-1da88ea871e6f90967b9f65c0204309d"}}, -{"id":"quasi","key":"quasi","value":{"rev":"3-6fe0faa91d849938d8c92f91b0828395"}}, -{"id":"query","key":"query","value":{"rev":"13-635ff8d88c6a3f9d92f9ef465b14fb82"}}, -{"id":"query-engine","key":"query-engine","value":{"rev":"21-66feaee07df9fa1f625ac797e8f6b90b"}}, -{"id":"querystring","key":"querystring","value":{"rev":"5-2b509239fafba56319137bfbe1e9eeb7"}}, -{"id":"queue","key":"queue","value":{"rev":"3-5c4af574e5056f7e6ceb9bfefc1c632d"}}, -{"id":"queuelib","key":"queuelib","value":{"rev":"61-87c2abc94a5ad40af8193fac9a1d9f7e"}}, -{"id":"quickcheck","key":"quickcheck","value":{"rev":"7-64e6c1e9efc08a89abe3d01c414d1411"}}, -{"id":"quickserve","key":"quickserve","value":{"rev":"3-9c19f8ad7daf06182f42b8c7063b531f"}}, -{"id":"quip","key":"quip","value":{"rev":"8-0624055f5056f72bc719340c95e5111a"}}, -{"id":"qunit","key":"qunit","value":{"rev":"37-6e7fefdaffab8fc5fb92a391da227c38"}}, -{"id":"qunit-tap","key":"qunit-tap","value":{"rev":"22-0266cd1b5bb7cbab89fa52642f0e8277"}}, -{"id":"qwery","key":"qwery","value":{"rev":"66-29f9b44da544a3a9b4537a85ceace7c8"}}, -{"id":"qwery-mobile","key":"qwery-mobile","value":{"rev":"5-182264ca68c30519bf0d29cf1e15854b"}}, -{"id":"raZerdummy","key":"raZerdummy","value":{"rev":"7-1fa549e0cff60795b49cbd3732f32175"}}, -{"id":"rabbit.js","key":"rabbit.js","value":{"rev":"3-dbcd5cd590576673c65b34c44ff06bec"}}, -{"id":"rabblescay","key":"rabblescay","value":{"rev":"5-3fea196ffd581a842a24ab7bb2118fe2"}}, -{"id":"racer","key":"racer","value":{"rev":"51-41c65689a335d70fa6b55b9706b9c0fe"}}, -{"id":"radcouchdb","key":"radcouchdb","value":{"rev":"3-64ccb4d0acb2b11cbb1d3fcef5f9a68e"}}, -{"id":"radio-stream","key":"radio-stream","value":{"rev":"6-c5f80a0bef7bbaacdd22d92da3d09244"}}, -{"id":"railway","key":"railway","value":{"rev":"74-5ce92a45c7d11540b0e2b5a8455361ce"}}, -{"id":"railway-mailer","key":"railway-mailer","value":{"rev":"3-8df2fbe4af4d3b1f12557d8397bf0548"}}, -{"id":"railway-twitter","key":"railway-twitter","value":{"rev":"3-df984f182bb323052e36876e8e3a066c"}}, -{"id":"rand","key":"rand","value":{"rev":"11-abb69107c390e2a6dcec64cb72f36096"}}, -{"id":"random","key":"random","value":{"rev":"7-32550b221f3549b67f379c1c2dbc5c57"}}, -{"id":"random-data","key":"random-data","value":{"rev":"5-ae651ea36724105b8677ae489082ab4d"}}, -{"id":"range","key":"range","value":{"rev":"3-1d3925f30ffa6b5f3494d507fcef3aa1"}}, -{"id":"ranger","key":"ranger","value":{"rev":"17-6135a9a9d83cbd3945f1ce991f276cb8"}}, -{"id":"rap-battle","key":"rap-battle","value":{"rev":"3-6960516c0d27906bb9343805a5eb0e45"}}, -{"id":"raphael","key":"raphael","value":{"rev":"7-012f159593a82e4587ea024a5d4fbe41"}}, -{"id":"raphael-zoom","key":"raphael-zoom","value":{"rev":"3-aaab74bebbeb4241cade4f4d3c9b130e"}}, -{"id":"rapid","key":"rapid","value":{"rev":"8-ae0b05388c7904fc88c743e3dcde1d9d"}}, -{"id":"rasputin","key":"rasputin","value":{"rev":"3-87cdd9bd591606f4b8439e7a76681c7b"}}, -{"id":"rate-limiter","key":"rate-limiter","value":{"rev":"3-24cd20fef83ce02f17dd383b72f5f125"}}, -{"id":"rats","key":"rats","value":{"rev":"3-1ff1efb311451a17789da910eaf59fb6"}}, -{"id":"raydash","key":"raydash","value":{"rev":"7-96c345beb3564d2789d209d1fe695857"}}, -{"id":"rbytes","key":"rbytes","value":{"rev":"13-cf09d91347a646f590070e516f0c9bc9"}}, -{"id":"rdf","key":"rdf","value":{"rev":"3-9a5012d1fc10da762dbe285d0b317499"}}, -{"id":"rdf-raptor-parser","key":"rdf-raptor-parser","value":{"rev":"11-25c61e4d57cf67ee8a5afb6dfcf193e3"}}, -{"id":"rdfstore","key":"rdfstore","value":{"rev":"41-4499a73efc48ad07234e56fd4e27e4e0"}}, -{"id":"rdio","key":"rdio","value":{"rev":"5-fa20a8ab818a6150e38e9bb7744968f9"}}, -{"id":"rdx","key":"rdx","value":{"rev":"3-e1db5ee3aad06edd9eadcdaa8aaba149"}}, -{"id":"rea","key":"rea","value":{"rev":"3-f17ceeb35337bc9ccf9cb440d5c4dfaf"}}, -{"id":"read-files","key":"read-files","value":{"rev":"3-e08fac4abcdbc7312beb0362ff4427b4"}}, -{"id":"readability","key":"readability","value":{"rev":"3-475601a3d99d696763872c52bce6a155"}}, -{"id":"readabilitySAX","key":"readabilitySAX","value":{"rev":"19-83277777f3f721be26aca28c66227b01"}}, -{"id":"ready.js","key":"ready.js","value":{"rev":"39-8e309b8b274722c051c67f90885571e8"}}, -{"id":"readyjslint","key":"readyjslint","value":{"rev":"3-0a3742129bfbe07d47fcfb9ff67d39b2"}}, -{"id":"recaptcha","key":"recaptcha","value":{"rev":"8-8895926476be014fbe08b301294bf37b"}}, -{"id":"recaptcha-async","key":"recaptcha-async","value":{"rev":"9-3033260389f8afdb5351974119b78ca2"}}, -{"id":"recline","key":"recline","value":{"rev":"189-b56ab8c7791201dccf4aea2532189f1d"}}, -{"id":"recon","key":"recon","value":{"rev":"13-79cbddefb00fec6895342d18609cadb1"}}, -{"id":"reconf","key":"reconf","value":{"rev":"5-0596988db2cf9bf5921502a2aab24ade"}}, -{"id":"redback","key":"redback","value":{"rev":"37-03b390f69cacf42a46e393b7cf297d09"}}, -{"id":"rede","key":"rede","value":{"rev":"3-ee74c2fd990c7780dc823e22a9c3bef2"}}, -{"id":"redecard","key":"redecard","value":{"rev":"13-7dec5a50c34132a2f20f0f143d6b5215"}}, -{"id":"redim","key":"redim","value":{"rev":"15-91c9fd560d1ce87d210b461c52a6d258"}}, -{"id":"redis","key":"redis","value":{"rev":"98-ec237259e8ef5c42a76ff260be50f8fd"}}, -{"id":"redis-channels","key":"redis-channels","value":{"rev":"3-8efc40a25fd18c1c9c41bbaeedb0b22f"}}, -{"id":"redis-client","key":"redis-client","value":{"rev":"3-3376054236e651e7dfcf91be8632fd0e"}}, -{"id":"redis-completer","key":"redis-completer","value":{"rev":"11-9e5bf1f8d37df681e7896252809188d3"}}, -{"id":"redis-keyspace","key":"redis-keyspace","value":{"rev":"25-245f2375741eb3e574dfce9f2da2b687"}}, -{"id":"redis-lua","key":"redis-lua","value":{"rev":"7-81f3dd3a4601271818f15278f495717a"}}, -{"id":"redis-namespace","key":"redis-namespace","value":{"rev":"3-ddf52a172db190fe788aad4116b1cb29"}}, -{"id":"redis-node","key":"redis-node","value":{"rev":"24-7a1e9098d8b5a42a99ca71a01b0d7672"}}, -{"id":"redis-queue","key":"redis-queue","value":{"rev":"3-9896587800c4b98ff291b74210c16b6e"}}, -{"id":"redis-session-store","key":"redis-session-store","value":{"rev":"3-2229501ecf817f9ca60ff2c7721ddd73"}}, -{"id":"redis-tag","key":"redis-tag","value":{"rev":"9-6713e8e91a38613cfef09d7b40f4df71"}}, -{"id":"redis-url","key":"redis-url","value":{"rev":"5-f53545a0039b512a2f7afd4ba2e08773"}}, -{"id":"redis-user","key":"redis-user","value":{"rev":"11-a8c0f6d40cbfbb6183a46e121f31ec06"}}, -{"id":"redis2json","key":"redis2json","value":{"rev":"5-dd96f78f8db0bf695346c95c2ead1307"}}, -{"id":"redis_objects","key":"redis_objects","value":{"rev":"3-499fe6dd07e7a3839111b1892b97f54c"}}, -{"id":"redisev","key":"redisev","value":{"rev":"3-8e857dbe2341292c6e170a7bfe3fa81b"}}, -{"id":"redisfs","key":"redisfs","value":{"rev":"69-d9c90256d32348fdca7a4e646ab4d551"}}, -{"id":"redisify","key":"redisify","value":{"rev":"3-03fce3095b4129e71280d278f11121ba"}}, -{"id":"rediskit","key":"rediskit","value":{"rev":"5-6a0324708f45d884a492cbc408137059"}}, -{"id":"redisql","key":"redisql","value":{"rev":"6-b31802eb37910cb74bd3c9f7b477c025"}}, -{"id":"redmark","key":"redmark","value":{"rev":"5-8724ab00513b6bd7ddfdcd3cc2e0a4e8"}}, -{"id":"redmess","key":"redmess","value":{"rev":"13-14f58666444993ce899cd2260cdc9140"}}, -{"id":"redobj","key":"redobj","value":{"rev":"7-7ebbeffc306f4f7ff9b53ee57e1a250e"}}, -{"id":"redpack","key":"redpack","value":{"rev":"73-58b3fb3bcadf7d80fbe97d9e82d4928b"}}, -{"id":"reds","key":"reds","value":{"rev":"9-baebb36b92887d93fd79785a8c1e6355"}}, -{"id":"reed","key":"reed","value":{"rev":"45-5580f319dc3b5bfb66612ed5c7e17337"}}, -{"id":"reflect","key":"reflect","value":{"rev":"18-b590003cd55332160a5e5327e806e851"}}, -{"id":"reflect-builder","key":"reflect-builder","value":{"rev":"3-453d618b263f9452c0b6bbab0a701f49"}}, -{"id":"reflect-next","key":"reflect-next","value":{"rev":"9-4f2b27a38985d81e906e824321af7713"}}, -{"id":"reflect-tree-builder","key":"reflect-tree-builder","value":{"rev":"5-5f801f53e126dc8a72e13b1417904ce6"}}, -{"id":"reflect-unbuilder","key":"reflect-unbuilder","value":{"rev":"5-f36fd4182fd465a743198b5188697db9"}}, -{"id":"reflectjs","key":"reflectjs","value":{"rev":"3-e03bdb411ffcdd901b896a1cf43eea69"}}, -{"id":"reflex","key":"reflex","value":{"rev":"3-e8bb6b6de906265114b22036832ef650"}}, -{"id":"refmate","key":"refmate","value":{"rev":"3-7d44c45a2eb39236ad2071c84dc0fbba"}}, -{"id":"regext","key":"regext","value":{"rev":"4-97ca5c25fd2f3dc4bd1f3aa821d06f0f"}}, -{"id":"reid-yui3","key":"reid-yui3","value":{"rev":"5-cab8f6e22dfa9b9c508a5dd312bf56b0"}}, -{"id":"rel","key":"rel","value":{"rev":"7-f447870ac7a078f742e4295896646241"}}, -{"id":"relative-date","key":"relative-date","value":{"rev":"5-d0fa11f8100da888cbcce6e96d76b2e4"}}, -{"id":"reloadOnUpdate","key":"reloadOnUpdate","value":{"rev":"9-e7d4c215578b779b2f888381d398bd79"}}, -{"id":"reloaded","key":"reloaded","value":{"rev":"3-dba828b9ab73fc7ce8e47f98068bce8c"}}, -{"id":"remap","key":"remap","value":{"rev":"5-825ac1783df84aba3255c1d39f32ac00"}}, -{"id":"remedial","key":"remedial","value":{"rev":"17-9bb17db015e96db3c833f84d9dbd972a"}}, -{"id":"remote-console","key":"remote-console","value":{"rev":"6-104bae3ba9e4b0a8f772d0b8dc37007e"}}, -{"id":"remote_js","key":"remote_js","value":{"rev":"3-6c0e3058c33113346c037c59206ac0ec"}}, -{"id":"render","key":"render","value":{"rev":"27-fc8be4e9c50e49fb42df83e9446a1f58"}}, -{"id":"renode","key":"renode","value":{"rev":"11-107a3e15a987393157b47125487af296"}}, -{"id":"reparse","key":"reparse","value":{"rev":"10-210ec92e82f5a8515f45d20c7fa2f164"}}, -{"id":"repl","key":"repl","value":{"rev":"3-295279fe20b9ac54b2a235a6bc7013aa"}}, -{"id":"repl-edit","key":"repl-edit","value":{"rev":"18-eb2e604ab8bb65685376459beb417a31"}}, -{"id":"repl-utils","key":"repl-utils","value":{"rev":"7-fc31547ecb53e7e36610cdb68bcec582"}}, -{"id":"replace","key":"replace","value":{"rev":"17-a8976fcdbeb08e27ee2f0fc69ccd7c9d"}}, -{"id":"replica","key":"replica","value":{"rev":"3-f9dae960f91e8dc594f43b004f516d5f"}}, -{"id":"replicate","key":"replicate","value":{"rev":"3-3d6e52af6ff36c02139f619c7e5599c6"}}, -{"id":"replique","key":"replique","value":{"rev":"5-72d990b7d9ce9ff107d96be17490226a"}}, -{"id":"req2","key":"req2","value":{"rev":"3-712151f335b25b5bdef428982d77d0e0"}}, -{"id":"reqhooks","key":"reqhooks","value":{"rev":"17-2f0f0b73545bb1936f449a1ec4a28011"}}, -{"id":"request","key":"request","value":{"rev":"55-0d0b00eecde877ca5cd4ad9e0badc4d1"}}, -{"id":"require","key":"require","value":{"rev":"15-59e9fa05a9de52ee2a818c045736452b"}}, -{"id":"require-analyzer","key":"require-analyzer","value":{"rev":"72-f759f0cdc352df317df29791bfe451f1"}}, -{"id":"require-kiss","key":"require-kiss","value":{"rev":"5-f7ef9d7beda584e9c95635a281a01587"}}, -{"id":"require-like","key":"require-like","value":{"rev":"7-29d5de79e7ff14bb02da954bd9a2ee33"}}, -{"id":"requireincontext","key":"requireincontext","value":{"rev":"5-988ff7c27a21e527ceeb50cbedc8d1b0"}}, -{"id":"requirejs","key":"requirejs","value":{"rev":"3-e609bc91d12d698a17aa51bb50a50509"}}, -{"id":"requirejson","key":"requirejson","value":{"rev":"3-2b8173e58d08034a53a3226c464b1dc8"}}, -{"id":"reqwest","key":"reqwest","value":{"rev":"57-5aa2c1ed17b1e3630859bcad85559e6a"}}, -{"id":"resig-class","key":"resig-class","value":{"rev":"3-16b1a2cdb3224f2043708436dbac4395"}}, -{"id":"resistance","key":"resistance","value":{"rev":"9-9cacbf5fa8318419b4751034a511b8c1"}}, -{"id":"resmin","key":"resmin","value":{"rev":"17-a9c8ded5073118748d765784ca4ea069"}}, -{"id":"resolve","key":"resolve","value":{"rev":"11-bba3470bc93a617ccf9fb6c12097c793"}}, -{"id":"resource-router","key":"resource-router","value":{"rev":"13-7b2991958da4d7701c51537192ca756c"}}, -{"id":"resourcer","key":"resourcer","value":{"rev":"3-4e8b5493d6fcdf147f53d3aaa731a509"}}, -{"id":"response","key":"response","value":{"rev":"3-c5cadf4e5dd90dc1022b92a67853b0f8"}}, -{"id":"resque","key":"resque","value":{"rev":"12-e2f5e1bc3e53ac0a992d1a7da7da0d14"}}, -{"id":"rest-in-node","key":"rest-in-node","value":{"rev":"3-41d1ba925857302211bd0bf9d19975f9"}}, -{"id":"rest-mongo","key":"rest-mongo","value":{"rev":"3-583d2a4b672d6d7e7ad26d0b6df20b45"}}, -{"id":"rest.node","key":"rest.node","value":{"rev":"3-2ed59ba9dcc97123632dfdfaea2559ed"}}, -{"id":"restalytics","key":"restalytics","value":{"rev":"11-5fb3cd8e95b37f1725922fa6fbb146e0"}}, -{"id":"restarter","key":"restarter","value":{"rev":"52-ab0a4fe59128b8848ffd88f9756d0049"}}, -{"id":"restartr","key":"restartr","value":{"rev":"12-d3b86e43e7df7697293db65bb1a1ae65"}}, -{"id":"restify","key":"restify","value":{"rev":"132-054bdc85bebc6221a07dda186238b4c3"}}, -{"id":"restler","key":"restler","value":{"rev":"13-f5392d9dd22e34ce3bcc307c51c889b3"}}, -{"id":"restler-aaronblohowiak","key":"restler-aaronblohowiak","value":{"rev":"8-28b231eceb667153e10effcb1ebeb989"}}, -{"id":"restmvc.js","key":"restmvc.js","value":{"rev":"25-d57b550754437580c447adf612c87d9a"}}, -{"id":"resware","key":"resware","value":{"rev":"9-a5ecbc53fefb280c5d1e3efd822704ff"}}, -{"id":"retrie","key":"retrie","value":{"rev":"7-28ea803ad6b119928ac792cbc8f475c9"}}, -{"id":"retro","key":"retro","value":{"rev":"3-94c3aec940e28869554cbb8449d9369e"}}, -{"id":"retry","key":"retry","value":{"rev":"19-89f3ef664c6fa48ff33a0b9f7e798f15"}}, -{"id":"reut","key":"reut","value":{"rev":"23-d745dd7f8606275848a299ad7c38ceb7"}}, -{"id":"rewrite","key":"rewrite","value":{"rev":"3-5cb91fd831d0913e89354f53b875137d"}}, -{"id":"rex","key":"rex","value":{"rev":"39-59025e6947e5f197f124d24a5393865f"}}, -{"id":"rfb","key":"rfb","value":{"rev":"34-db6e684ac9366a0e3658a508a2187ae1"}}, -{"id":"rhyme","key":"rhyme","value":{"rev":"7-27347762f3f5bfa07307da4e476c2d52"}}, -{"id":"riak-js","key":"riak-js","value":{"rev":"55-11d4ee4beb566946f3968abdf1c4b0ef"}}, -{"id":"riakqp","key":"riakqp","value":{"rev":"7-83f562e6907431fcee56a9408ac6d2c1"}}, -{"id":"rightjs","key":"rightjs","value":{"rev":"9-d53ae4c4f5af3bbbe18d7c879e5bdd1b"}}, -{"id":"rimraf","key":"rimraf","value":{"rev":"17-3ddc3f3f36618712e5f4f27511836e7a"}}, -{"id":"rio","key":"rio","value":{"rev":"11-7c6249c241392b51b9142ca1b228dd4e"}}, -{"id":"ristretto","key":"ristretto","value":{"rev":"3-beb22d7a575e066781f1fd702c4572d7"}}, -{"id":"roast","key":"roast","value":{"rev":"32-17cb066823afab1656196a2fe81246cb"}}, -{"id":"robb","key":"robb","value":{"rev":"5-472ed7ba7928131d86a05fcae89b9f93"}}, -{"id":"robots","key":"robots","value":{"rev":"9-afac82b944045c82acb710cc98c7311d"}}, -{"id":"robotskirt","key":"robotskirt","value":{"rev":"63-29a66420951812d421bf6728f67e710c"}}, -{"id":"robotstxt","key":"robotstxt","value":{"rev":"25-1e01cac90f4570d35ab20232feaeebfa"}}, -{"id":"rocket","key":"rocket","value":{"rev":"27-b0f1ff02e70b237bcf6a5b46aa9b74df"}}, -{"id":"roil","key":"roil","value":{"rev":"48-6b00c09b576fe195546bd031763c0d79"}}, -{"id":"roll","key":"roll","value":{"rev":"5-d3fed9271132eb6c954b3ac6c7ffccf0"}}, -{"id":"rollin","key":"rollin","value":{"rev":"3-bd461bc810c12cfcea94109ba9a2ab39"}}, -{"id":"ron","key":"ron","value":{"rev":"5-913645180d29f377506bcd5292d3cb49"}}, -{"id":"rondo","key":"rondo","value":{"rev":"3-9bed539bbaa0cb978f5c1b711d70cd50"}}, -{"id":"ronn","key":"ronn","value":{"rev":"12-b1b1a1d47376fd11053e2b81fe772c4c"}}, -{"id":"rot13","key":"rot13","value":{"rev":"10-a41e8b581812f02ca1a593f6da0c52dc"}}, -{"id":"router","key":"router","value":{"rev":"26-a7883048759715134710d68f179da18b"}}, -{"id":"routes","key":"routes","value":{"rev":"3-d841826cfd365d8f383a9c4f4288933c"}}, -{"id":"rpc","key":"rpc","value":{"rev":"5-5896f380115a7a606cd7cbbc6d113f05"}}, -{"id":"rpc-socket","key":"rpc-socket","value":{"rev":"17-8743dc1a1f5ba391fc5c7d432cc6eeba"}}, -{"id":"rq","key":"rq","value":{"rev":"7-ba263671c3a3b52851dc7d5e6bd4ef8c"}}, -{"id":"rql","key":"rql","value":{"rev":"1-ac5ec10ed5e41a10a289f26aff4def5a"}}, -{"id":"rqueue","key":"rqueue","value":{"rev":"12-042898704386874c70d0ffaeea6ebc78"}}, -{"id":"rrd","key":"rrd","value":{"rev":"9-488adf135cf29cd4725865a8f25a57ba"}}, -{"id":"rsa","key":"rsa","value":{"rev":"8-7d6f981d72322028c3bebb7141252e98"}}, -{"id":"rss","key":"rss","value":{"rev":"3-0a97b20a0a9051876d779af7663880bd"}}, -{"id":"rssee","key":"rssee","value":{"rev":"9-da2599eae68e50c1695fd7f8fcba2b30"}}, -{"id":"rumba","key":"rumba","value":{"rev":"3-7a3827fa6eca2d02d3189cbad38dd6ca"}}, -{"id":"run","key":"run","value":{"rev":"9-0145abb61e6107a3507624928db461da"}}, -{"id":"runforcover","key":"runforcover","value":{"rev":"3-a36b00ea747c98c7cd7afebf1e1b203c"}}, -{"id":"runlol","key":"runlol","value":{"rev":"3-3c97684baaa3d5b31ca404e8a616fe41"}}, -{"id":"runner","key":"runner","value":{"rev":"11-b7ceeedf7b0dde19c809642f1537723a"}}, -{"id":"runways","key":"runways","value":{"rev":"5-f216f5fa6af7ccc7566cdd06cf424980"}}, -{"id":"rw-translate","key":"rw-translate","value":{"rev":"3-16d2beb17a27713e10459ce368c5d087"}}, -{"id":"rx","key":"rx","value":{"rev":"5-ea2a04ecf38963f8a99b7a408b45af31"}}, -{"id":"rzr","key":"rzr","value":{"rev":"4-6a137fa752709531f2715de5a213b326"}}, -{"id":"s-tpl","key":"s-tpl","value":{"rev":"3-1533cf9657cfe669a25da96b6a655f5c"}}, -{"id":"s3-post","key":"s3-post","value":{"rev":"9-ad3b268bc6754852086b50c2f465c02c"}}, -{"id":"safis","key":"safis","value":{"rev":"3-f1494d0dae2b7dfd60beba5a72412ad2"}}, -{"id":"saiga","key":"saiga","value":{"rev":"22-0c67e8cf8f4b6e8ea30552ffc57d222a"}}, -{"id":"sailthru-client","key":"sailthru-client","value":{"rev":"7-1c9c236050868fb8dec4a34ded2436d3"}}, -{"id":"saimonmoore-cradle","key":"saimonmoore-cradle","value":{"rev":"3-5059616ab0f0f10e1c2d164f686e127e"}}, -{"id":"salesforce","key":"salesforce","value":{"rev":"7-f88cbf517b1fb900358c97b2c049960f"}}, -{"id":"sam","key":"sam","value":{"rev":"7-d7e24d2e94411a17cbedfbd8083fd878"}}, -{"id":"sandbox","key":"sandbox","value":{"rev":"10-0b51bed24e0842f99744dcf5d79346a6"}}, -{"id":"sandboxed-module","key":"sandboxed-module","value":{"rev":"15-bf8fa69d15ae8416d534e3025a16d87d"}}, -{"id":"sanitizer","key":"sanitizer","value":{"rev":"32-6ea8f4c77cd17253c27d0d87e0790678"}}, -{"id":"sapnwrfc","key":"sapnwrfc","value":{"rev":"3-0bc717109ffcd5265ae24f00416a0281"}}, -{"id":"sardines","key":"sardines","value":{"rev":"7-82712731b5af112ca43b9e3fe9975bb0"}}, -{"id":"sargam","key":"sargam","value":{"rev":"3-6b4c70f4b2bcd2add43704bf40c44507"}}, -{"id":"sasl","key":"sasl","value":{"rev":"4-44a6e12b561b112a574ec9e0c4a8843f"}}, -{"id":"sass","key":"sass","value":{"rev":"14-46bcee5423a1efe22f039e116bb7a77c"}}, -{"id":"satisfic","key":"satisfic","value":{"rev":"3-c6e9a2e65a0e55868cea708bcf7b11cf"}}, -{"id":"sax","key":"sax","value":{"rev":"30-58c5dd2c3367522974406bbf29204a40"}}, -{"id":"say","key":"say","value":{"rev":"10-95f31672af6166ea9099d92706c49ed1"}}, -{"id":"sayndo","key":"sayndo","value":{"rev":"51-fd93715c5ff0fcaa68e4e13c2b51ba61"}}, -{"id":"sc-handlebars","key":"sc-handlebars","value":{"rev":"3-b424c3a66fd0e538b068c6046f404084"}}, -{"id":"scgi-server","key":"scgi-server","value":{"rev":"9-3364b5c39985ea8f3468b6abb53d5ea6"}}, -{"id":"scheduler","key":"scheduler","value":{"rev":"25-72bc526bb49b0dd42ad5917d38ea3b18"}}, -{"id":"schema","key":"schema","value":{"rev":"21-166410ae972449965dfa1ce615971168"}}, -{"id":"schema-builder","key":"schema-builder","value":{"rev":"3-bce4612e1e5e6a8a85f16326d3810145"}}, -{"id":"schema-org","key":"schema-org","value":{"rev":"15-59b3b654de0380669d0dcd7573c3b7a1"}}, -{"id":"scone","key":"scone","value":{"rev":"15-85ed2dd4894e896ca1c942322753b76b"}}, -{"id":"scooj","key":"scooj","value":{"rev":"3-1be2074aeba4df60594c03f3e59c7734"}}, -{"id":"scope","key":"scope","value":{"rev":"65-9d7eb8c5fc6c54d8e2c49f4b4b4f5166"}}, -{"id":"scope-provider","key":"scope-provider","value":{"rev":"22-2c25a0b260fd18236d5245c8250d990e"}}, -{"id":"scoped-http-client","key":"scoped-http-client","value":{"rev":"3-afa954fe6d1c8b64a1240b77292d99b5"}}, -{"id":"scottbot","key":"scottbot","value":{"rev":"3-d812ddb4af49976c391f14aeecf93180"}}, -{"id":"scraper","key":"scraper","value":{"rev":"19-e2166b3de2b33d7e6baa04c704887fa6"}}, -{"id":"scrapinode","key":"scrapinode","value":{"rev":"15-ae5bf5085d8c4d5390f7c313b0ad13d2"}}, -{"id":"scrappy-do","key":"scrappy-do","value":{"rev":"3-868f5d299da401112e3ed9976194f1ee"}}, -{"id":"scrapr","key":"scrapr","value":{"rev":"3-d700714a56e8f8b8e9b3bc94274f4a24"}}, -{"id":"scrawl","key":"scrawl","value":{"rev":"3-a70a2905b9a1d2f28eb379c14363955f"}}, -{"id":"scribe","key":"scribe","value":{"rev":"5-4cefaaf869ba8e6ae0257e5705532fbe"}}, -{"id":"scriptTools","key":"scriptTools","value":{"rev":"7-1b66b7f02f2f659ae224057afac60bcf"}}, -{"id":"scriptbroadcast","key":"scriptbroadcast","value":{"rev":"10-3cdc4dae471445b7e08e6fc37c2481e6"}}, -{"id":"scriptjs","key":"scriptjs","value":{"rev":"38-9a522df4f0707d47c904f6781fd97ff6"}}, -{"id":"scrowser","key":"scrowser","value":{"rev":"3-a76938b1f84db0793941dba1f84f4c2f"}}, -{"id":"scss","key":"scss","value":{"rev":"10-49a4ad40eca3c797add57986c74e100b"}}, -{"id":"scylla","key":"scylla","value":{"rev":"10-2c5a1efed63c0ac3a3e75861ee323af4"}}, -{"id":"sdl","key":"sdl","value":{"rev":"40-3df0824da620098c0253b5330c6b0c5c"}}, -{"id":"sdlmixer","key":"sdlmixer","value":{"rev":"4-91455739802a98a5549f6c2b8118758d"}}, -{"id":"search","key":"search","value":{"rev":"9-8f696da412a6ccd07c3b8f22cec315cb"}}, -{"id":"searchjs","key":"searchjs","value":{"rev":"3-59418ce307d41de5649dfc158be51adf"}}, -{"id":"searchparser","key":"searchparser","value":{"rev":"3-a84719692ee33c88f3419f033b839f7a"}}, -{"id":"sechash","key":"sechash","value":{"rev":"11-20db8651628dcf6e8cbbc9bf9b2c4f12"}}, -{"id":"secret","key":"secret","value":{"rev":"7-ac44b38fa32b3f5ebc8fd03b02ec69ec"}}, -{"id":"seedrandom","key":"seedrandom","value":{"rev":"3-becb92de803208672887fc22a1a33694"}}, -{"id":"seek","key":"seek","value":{"rev":"3-d778b8d56582e15d409e2346b86caa53"}}, -{"id":"sel","key":"sel","value":{"rev":"19-94c8bc0872d2da7eab2b35daff7a3b5d"}}, -{"id":"select","key":"select","value":{"rev":"5-43593bfec39caaf1a0bc1fedc96d0dce"}}, -{"id":"selenium","key":"selenium","value":{"rev":"3-8ae8ac7a491b813fd011671e0d494f20"}}, -{"id":"selfish","key":"selfish","value":{"rev":"17-827856c3f3b9a3fdd1758477a24bf706"}}, -{"id":"selleck","key":"selleck","value":{"rev":"13-b8325fcdb383397041e4a408b40d708c"}}, -{"id":"semver","key":"semver","value":{"rev":"25-b2aea0cc920a9981cd429442a3fd62f6"}}, -{"id":"sendgrid","key":"sendgrid","value":{"rev":"3-047e2ad730390bac7cf72b7fc3856c1c"}}, -{"id":"sendgrid-api","key":"sendgrid-api","value":{"rev":"5-6e951b0d60a1b7c778fbf548d4e3aed8"}}, -{"id":"sendgrid-web","key":"sendgrid-web","value":{"rev":"3-dc77d2dbcedfcbe4e497958a2a070cfd"}}, -{"id":"sentry","key":"sentry","value":{"rev":"7-57af332354cbd37ce1c743b424b27dd0"}}, -{"id":"seq","key":"seq","value":{"rev":"77-33a8f54017402835c8542945a5c0a443"}}, -{"id":"sequelize","key":"sequelize","value":{"rev":"63-4c28ad13b73549aad7edc57378b21854"}}, -{"id":"sequence","key":"sequence","value":{"rev":"3-914f8010dc12aec0749ddb719f5ac82d"}}, -{"id":"sequencer","key":"sequencer","value":{"rev":"7-d83e687509678c0f5bcf15e5297677c0"}}, -{"id":"sequent","key":"sequent","value":{"rev":"3-cc6f26ab708c7681fa7d9e3bc15d19c0"}}, -{"id":"serializer","key":"serializer","value":{"rev":"7-a0d13120e2d5cfaa6e453b085280fa08"}}, -{"id":"serialport","key":"serialport","value":{"rev":"32-dc365d057a4f46e9f140dc36d6cc825a"}}, -{"id":"serialportify","key":"serialportify","value":{"rev":"3-1bf4ad9c5ebb5d96ca91fc03a10b5443"}}, -{"id":"serialq","key":"serialq","value":{"rev":"3-5897fcd0fca7d8312e61dbcb93790a71"}}, -{"id":"series","key":"series","value":{"rev":"11-0374191f646c277c51602ebe73033b6a"}}, -{"id":"serve","key":"serve","value":{"rev":"11-560c0c1bdeb3348c7a7d18265d27988e"}}, -{"id":"servedir","key":"servedir","value":{"rev":"18-17cffd8d8326b26e7d9319c79d601dda"}}, -{"id":"server-backbone-redis","key":"server-backbone-redis","value":{"rev":"13-c56419457002aa4fa23b142634882594"}}, -{"id":"server-tracker","key":"server-tracker","value":{"rev":"21-f620e295079a8b0acd29fa1a1469100c"}}, -{"id":"service","key":"service","value":{"rev":"11-07533f9e5e854248c0a1d99e911fa419"}}, -{"id":"sesame","key":"sesame","value":{"rev":"19-1e7ad5d030566f4c67027cc5925a2bdb"}}, -{"id":"sesh","key":"sesh","value":{"rev":"4-1682b3ced38e95f2a11a2f545a820bd5"}}, -{"id":"session","key":"session","value":{"rev":"6-a798bf4cd7d127d0111da7cdc3e058a4"}}, -{"id":"session-mongoose","key":"session-mongoose","value":{"rev":"3-b089c8d365d7de3e659cfa7080697dba"}}, -{"id":"sessionvoc-client","key":"sessionvoc-client","value":{"rev":"23-0f9ed8cd4af55f2aae17cb841247b818"}}, -{"id":"set","key":"set","value":{"rev":"3-a285b30a9c1545b427ebd882bc53d8b2"}}, -{"id":"setInterval","key":"setInterval","value":{"rev":"3-0557f666d05223391466547f52cfff42"}}, -{"id":"setTimeout","key":"setTimeout","value":{"rev":"3-e3c059c93763967ddff5974471f227f8"}}, -{"id":"setochka","key":"setochka","value":{"rev":"3-d559e24618b4fc2d5fc4ef44bccb68be"}}, -{"id":"settings","key":"settings","value":{"rev":"5-4af85bb564a330886c79682d2f1d927c"}}, -{"id":"sexy","key":"sexy","value":{"rev":"7-e57fa6bca5d89be86467786fb9f9b997"}}, -{"id":"sexy-args","key":"sexy-args","value":{"rev":"3-715d7d57234220bd79c78772d2566355"}}, -{"id":"sfaClient","key":"sfaClient","value":{"rev":"3-5d9ddd6ea05d7ef366dbf4f66dd4f642"}}, -{"id":"sfml","key":"sfml","value":{"rev":"10-766c876cd1cc220f776e2fa3c1d9efbb"}}, -{"id":"sh","key":"sh","value":{"rev":"5-3ce779be28550e831cf3c0140477376c"}}, -{"id":"sha1","key":"sha1","value":{"rev":"3-66d4b67ace9c65ae8f03d6dd0647ff6b"}}, -{"id":"sha1_file","key":"sha1_file","value":{"rev":"7-eb25e9c5f470a1b80c1697a952a1c5ed"}}, -{"id":"shadows","key":"shadows","value":{"rev":"5-d6a1a21871c733f34495592307ab7961"}}, -{"id":"share","key":"share","value":{"rev":"15-ef81a004f0e115040dcc1510f6302fa9"}}, -{"id":"shared-views","key":"shared-views","value":{"rev":"11-2c83145e6deb3493e44805c92b58929e"}}, -{"id":"sharedjs","key":"sharedjs","value":{"rev":"9-d43a861b02aa88ae22810f9771d774ec"}}, -{"id":"shell","key":"shell","value":{"rev":"39-7e2042bd6f485b827d53f5f727164d6f"}}, -{"id":"shelld","key":"shelld","value":{"rev":"3-118a62ff31d85e61b78bbd97333a7330"}}, -{"id":"shimify","key":"shimify","value":{"rev":"3-dde4d45bcbd2f6f7faaeb7f8c31d5e8b"}}, -{"id":"ship","key":"ship","value":{"rev":"3-5f294fc3841c901d6cea7f3862625d95"}}, -{"id":"shmakowiki","key":"shmakowiki","value":{"rev":"15-079ae4595d1ddf019d22d3d0ac49a188"}}, -{"id":"shorten","key":"shorten","value":{"rev":"3-ed1395b35faf4639e25dacbb038cf237"}}, -{"id":"shorttag","key":"shorttag","value":{"rev":"5-21d15e4cb8b62aeefe23edc99ff768ec"}}, -{"id":"shorturl","key":"shorturl","value":{"rev":"5-58f78b2a5318ec7da8a5f88739f2796b"}}, -{"id":"shorty","key":"shorty","value":{"rev":"9-17f804ff6e94295549cca6fd534b89de"}}, -{"id":"shotenjin","key":"shotenjin","value":{"rev":"3-91a7864d216a931095e9999133d3c41f"}}, -{"id":"should","key":"should","value":{"rev":"19-ed561071d434f319080fa5d0f647dd93"}}, -{"id":"shovel","key":"shovel","value":{"rev":"5-0168a02a8fa8d7856a5f4a5c18706724"}}, -{"id":"showdown","key":"showdown","value":{"rev":"3-7be5479804451db3faed968fa428af56"}}, -{"id":"shredder","key":"shredder","value":{"rev":"3-93e12ab8822ba5fe86d662f124a8ad1a"}}, -{"id":"shrtn","key":"shrtn","value":{"rev":"19-5883692283903e3166b478b98bcad999"}}, -{"id":"shuffle","key":"shuffle","value":{"rev":"3-71c96da1843abb468649ab0806e6b9d3"}}, -{"id":"sibilant","key":"sibilant","value":{"rev":"18-4dcb400eb9ed9cb1c7826d155807f6d0"}}, -{"id":"sideline","key":"sideline","value":{"rev":"15-84f284a9277718bf90f68dc9351500ae"}}, -{"id":"siesta","key":"siesta","value":{"rev":"5-ff99a009e6e5897c6322237c51d0a142"}}, -{"id":"sign","key":"sign","value":{"rev":"3-2cf70313707c6a046a6ceca61431ea5e"}}, -{"id":"signals","key":"signals","value":{"rev":"7-c756190260cd3ea43e6d44e4722164cb"}}, -{"id":"signature","key":"signature","value":{"rev":"3-fb7552c27ace0f9321ec7438057a37bf"}}, -{"id":"signed-request","key":"signed-request","value":{"rev":"13-9f1563535dcc1a83338a7375d8240f35"}}, -{"id":"signer","key":"signer","value":{"rev":"5-32c9909da2c4dfb284b858164c03cfe0"}}, -{"id":"simple-class","key":"simple-class","value":{"rev":"3-92c6eea4b3a6169db9d62b12f66268cb"}}, -{"id":"simple-ffmpeg","key":"simple-ffmpeg","value":{"rev":"9-b6dd4fe162803e6db434d71035637993"}}, -{"id":"simple-logger","key":"simple-logger","value":{"rev":"5-52b4c957b3671375547d623c6a9444be"}}, -{"id":"simple-mime","key":"simple-mime","value":{"rev":"9-34e4b1dcc26047b64459d924abab65cc"}}, -{"id":"simple-proxy","key":"simple-proxy","value":{"rev":"9-ad6cd76215717527dc6b226e1219e98e"}}, -{"id":"simple-rest-client","key":"simple-rest-client","value":{"rev":"3-8331b3ae49b52720adf2b72d5da0353d"}}, -{"id":"simple-schedule","key":"simple-schedule","value":{"rev":"7-432d3803e1cf9ab5830923a30fd312e0"}}, -{"id":"simple-server","key":"simple-server","value":{"rev":"25-d4d8ba53d3829f4ca51545a3c23a1244"}}, -{"id":"simple-settings","key":"simple-settings","value":{"rev":"3-497d7c5422f764f3738b3ef303ff9737"}}, -{"id":"simple-static","key":"simple-static","value":{"rev":"3-64c9cf84e5140d4285e451357ac83df5"}}, -{"id":"simple-xml-writer","key":"simple-xml-writer","value":{"rev":"3-d1ca18252c341b4430ab6e1240b5f571"}}, -{"id":"simple-xmpp","key":"simple-xmpp","value":{"rev":"11-b4c10de5e4e12a81c4486206d7fb6b40"}}, -{"id":"simple_pubsub","key":"simple_pubsub","value":{"rev":"9-22ae79856ca25b152f104e5d8bc93f12"}}, -{"id":"simpledb","key":"simpledb","value":{"rev":"13-6bf111aa18bffd86e65fd996525a6113"}}, -{"id":"simplegeo","key":"simplegeo","value":{"rev":"8-eb684eea019ae7e5fa0c087a9747367e"}}, -{"id":"simplegeo-client","key":"simplegeo-client","value":{"rev":"7-b2c976bbf8c145c6b0e1744630548084"}}, -{"id":"simplegeo-thrift","key":"simplegeo-thrift","value":{"rev":"3-bf6ddf40c020889fe28630217f38a442"}}, -{"id":"simplelogger","key":"simplelogger","value":{"rev":"3-36634d2543faecdeccc962422d149ffc"}}, -{"id":"simplesets","key":"simplesets","value":{"rev":"26-48fc18f94744c9b288945844b7cc9196"}}, -{"id":"simplesmtp","key":"simplesmtp","value":{"rev":"6-0952f0c5f43a8e94b11355774bbbe9e8"}}, -{"id":"simplydb","key":"simplydb","value":{"rev":"5-34659bf97bbb40f0ec4a3af14107dc31"}}, -{"id":"sin","key":"sin","value":{"rev":"6-0e8bd66b3e2c8c91efef14a3ddc79c53"}}, -{"id":"sink","key":"sink","value":{"rev":"8-4c49709009dfb5719935dba568a3398e"}}, -{"id":"sink-test","key":"sink-test","value":{"rev":"18-411afcb398102f245e92f2ce91897d3e"}}, -{"id":"sinon","key":"sinon","value":{"rev":"19-fa38010bb1bbed437273e1296660d598"}}, -{"id":"sinon-buster","key":"sinon-buster","value":{"rev":"5-a456f0e21b3edb647ad11179cd02354b"}}, -{"id":"sinon-nodeunit","key":"sinon-nodeunit","value":{"rev":"7-d60aa76cc41a6c9d9db4e8ae268b7b3c"}}, -{"id":"sip","key":"sip","value":{"rev":"17-02be6fb014d41fe66ab22ff2ae60a5b8"}}, -{"id":"sitemap","key":"sitemap","value":{"rev":"13-a6d1c830fdc8942c317c1ebe00efbb6d"}}, -{"id":"sizlate","key":"sizlate","value":{"rev":"3-a86c680c681299045f9aabecb99dc161"}}, -{"id":"sizzle","key":"sizzle","value":{"rev":"5-f00e18a80fb8a4f6bdbf11735e265720"}}, -{"id":"sk","key":"sk","value":{"rev":"33-b0b894d02b0211dae08baadfd84b46c2"}}, -{"id":"skeleton","key":"skeleton","value":{"rev":"5-3559721c222b99cd3f56acaaf706992f"}}, -{"id":"skillet","key":"skillet","value":{"rev":"3-0d6bbe21952f85967a5e12425691ee50"}}, -{"id":"skull.io","key":"skull.io","value":{"rev":"3-082e9d58f24ac59144fc130f6b54927e"}}, -{"id":"slang","key":"slang","value":{"rev":"7-3cd6390e3421f677e4e1b00fdf2d3ee1"}}, -{"id":"sleepless","key":"sleepless","value":{"rev":"5-1482568719534caf17f12daf0130ae0d"}}, -{"id":"sleepylib","key":"sleepylib","value":{"rev":"3-60e851f120e34b0726eb50a38b1e27e2"}}, -{"id":"sleight","key":"sleight","value":{"rev":"3-a0f16b17befee698b172074f84daf44c"}}, -{"id":"slick","key":"slick","value":{"rev":"3-596b7b7cf7b8881c55327e8bcf373700"}}, -{"id":"slickback","key":"slickback","value":{"rev":"9-c036e7393d0f9a463a263f287f3bcefd"}}, -{"id":"slide","key":"slide","value":{"rev":"14-83ade7490da699cf0ed99cec818ce3cd"}}, -{"id":"slippers","key":"slippers","value":{"rev":"5-0d657ed5fca4c0ed8b51c6d7f6eac08a"}}, -{"id":"slug","key":"slug","value":{"rev":"3-046a5bd74cc1edce30faa3b6ab239652"}}, -{"id":"slugr","key":"slugr","value":{"rev":"39-ac346964f547433fe34e637de682f81a"}}, -{"id":"smartdc","key":"smartdc","value":{"rev":"31-8c9db85e4548007a0ef87b7286229952"}}, -{"id":"smoosh","key":"smoosh","value":{"rev":"34-ba1c140a173ff8d1f9cdbe5e5addcc43"}}, -{"id":"smores","key":"smores","value":{"rev":"17-1aef1fa2e1675093c5aaf33436d83f5a"}}, -{"id":"smpp","key":"smpp","value":{"rev":"5-9be31b75aee4db09cfe5a2ceef4bea13"}}, -{"id":"smsified","key":"smsified","value":{"rev":"13-bb97eae0bbb6f4d5c4f2f391cd20e891"}}, -{"id":"smtp","key":"smtp","value":{"rev":"20-c3de67c5d0b3c4493293d9f55adb21ad"}}, -{"id":"smtpc","key":"smtpc","value":{"rev":"11-7c4e1207be6eb06350221af0134e8bd7"}}, -{"id":"smtpclient","key":"smtpclient","value":{"rev":"3-ba61ad5f0fd3fdd382e505abcde8c24e"}}, -{"id":"snake","key":"snake","value":{"rev":"15-384892bf8a5ebf222f6fe0ae321aaaa4"}}, -{"id":"snappy","key":"snappy","value":{"rev":"11-94f2d59347c10cc41b6f4a2dd2b0f15e"}}, -{"id":"sng","key":"sng","value":{"rev":"41-a1d3c6253dec5da8b3134ba3505924f5"}}, -{"id":"snip","key":"snip","value":{"rev":"3-cc51d232fff6a7d7b24588bd98e5613b"}}, -{"id":"snipes","key":"snipes","value":{"rev":"3-12af12ca83e15d056969ec76a3cc2ef0"}}, -{"id":"snippets","key":"snippets","value":{"rev":"13-d19c8a99287ec721d56ef9efdf3ce729"}}, -{"id":"snorkel","key":"snorkel","value":{"rev":"11-bc7ba5d1465c7d1ba71479087292615e"}}, -{"id":"snowball","key":"snowball","value":{"rev":"3-76cfbdb9f379ac635874b76d7ee2fd3b"}}, -{"id":"snpp","key":"snpp","value":{"rev":"8-4f10a9f2bff48e348303d8a143afaa6c"}}, -{"id":"snsclient","key":"snsclient","value":{"rev":"3-302ce1c7132a36ef909ce534a509e27f"}}, -{"id":"soap","key":"soap","value":{"rev":"7-10f361a406dfee3074adac0cea127d87"}}, -{"id":"socket-push","key":"socket-push","value":{"rev":"22-196553953d58d92c288678b1dcd49ba7"}}, -{"id":"socket-twitchat","key":"socket-twitchat","value":{"rev":"11-9b159a4610ea444eaae39baa3bf05280"}}, -{"id":"socket.io","key":"socket.io","value":{"rev":"95-c29c929613dd95aa5aea8a5e14f2573f"}}, -{"id":"socket.io-client","key":"socket.io-client","value":{"rev":"33-a3c79d917bb038f0ca72f9cb27180a66"}}, -{"id":"socket.io-cluster","key":"socket.io-cluster","value":{"rev":"5-83bdaf79d2243eaf3a59b45fc604dc1a"}}, -{"id":"socket.io-connect","key":"socket.io-connect","value":{"rev":"17-62f00efc3bff3a1b549cc5e346da996f"}}, -{"id":"socket.io-context","key":"socket.io-context","value":{"rev":"42-a029996765557776d72690db1f14c1fa"}}, -{"id":"socket.io-ender","key":"socket.io-ender","value":{"rev":"9-c4523af5f5cc815ee69c325c1e29ede4"}}, -{"id":"socket.io-juggernaut","key":"socket.io-juggernaut","value":{"rev":"6-b8b97b2df2c186f24487e027278ec975"}}, -{"id":"socket.io-sessions","key":"socket.io-sessions","value":{"rev":"11-2151ee14eb29543811a9e567bcf6811a"}}, -{"id":"socketstream","key":"socketstream","value":{"rev":"29-b198d27ad6a3c4f9b63bc467e85a54a3"}}, -{"id":"sockjs","key":"sockjs","value":{"rev":"21-a8d6534c55e8b3e33cf06516b59aa408"}}, -{"id":"socksified","key":"socksified","value":{"rev":"3-92350ec9889b8db9c3d34bdbc41b1f7b"}}, -{"id":"soda","key":"soda","value":{"rev":"24-04987191e2c4241fbfaf78263c83d121"}}, -{"id":"soda-runner","key":"soda-runner","value":{"rev":"5-da4e8078a7666404d2a5ab3267a5ef75"}}, -{"id":"sodn","key":"sodn","value":{"rev":"3-3ee6350723c54aad792c769947c6b05e"}}, -{"id":"sofa","key":"sofa","value":{"rev":"7-2f8ffd47ce19e6fb7e1ea2e02076955d"}}, -{"id":"solder","key":"solder","value":{"rev":"10-8f7ad0a60c2716ce65658047c4ae5361"}}, -{"id":"solr","key":"solr","value":{"rev":"11-56a295dff56d9f2a4a7293257ca793a4"}}, -{"id":"solr-client","key":"solr-client","value":{"rev":"7-a296273d32224eb241343cb98ded7b82"}}, -{"id":"sones","key":"sones","value":{"rev":"3-9ddbbdc44f3501917e701d3304eb91a5"}}, -{"id":"song","key":"song","value":{"rev":"7-967aa3a58702b3470996cd8e63b1b18d"}}, -{"id":"sorted","key":"sorted","value":{"rev":"3-47b6ec0f744aa04929d48a7d3d10f581"}}, -{"id":"sosumi","key":"sosumi","value":{"rev":"10-8c3980beb3d7c48d4cccf44a8d1d5ff7"}}, -{"id":"soundcloud","key":"soundcloud","value":{"rev":"7-9ee76aecd3d1946731a1173185796864"}}, -{"id":"soupselect","key":"soupselect","value":{"rev":"12-5fea60f4e52117a8212aa7add6c34278"}}, -{"id":"source","key":"source","value":{"rev":"7-57d6cae0530c7cba4a3932f0df129f20"}}, -{"id":"source-map","key":"source-map","value":{"rev":"6-7da8d2ccc104fa30a93ee165975f28e8"}}, -{"id":"spacesocket","key":"spacesocket","value":{"rev":"6-d1679084b0917f86d6c4e3ac89a89809"}}, -{"id":"spark","key":"spark","value":{"rev":"12-64d44ebde2a4b48aed3bc7814c63e773"}}, -{"id":"spark2","key":"spark2","value":{"rev":"28-918548a309f0d18eebd5c64966376959"}}, -{"id":"sparql","key":"sparql","value":{"rev":"3-8eec87fe9fcb4d07aef214858eada777"}}, -{"id":"sparql-orm","key":"sparql-orm","value":{"rev":"3-b2a7efa5622b0b478fdca3f9050800cc"}}, -{"id":"spatial","key":"spatial","value":{"rev":"3-d09d40af02a9c9e5150500cc66d75f8d"}}, -{"id":"spawn","key":"spawn","value":{"rev":"3-f882c01cf1bb538f5f4be78769e1b097"}}, -{"id":"spdy","key":"spdy","value":{"rev":"13-1fbf077bbb8bc87d5058648c0c66288b"}}, -{"id":"spec","key":"spec","value":{"rev":"15-1074d3a8b8332fcc1059fbb5c4f69a7a"}}, -{"id":"speck","key":"speck","value":{"rev":"21-652b0670953ba79e548f4e5d9ce3d923"}}, -{"id":"spectrum","key":"spectrum","value":{"rev":"28-21fb9eeffe2e63a5383371a44a58a1ad"}}, -{"id":"speller","key":"speller","value":{"rev":"6-91e03f89b09338cf8f38d2e64c1778ce"}}, -{"id":"sphericalmercator","key":"sphericalmercator","value":{"rev":"9-3affc61ae0d64854d77829da5414bbc5"}}, -{"id":"spider","key":"spider","value":{"rev":"3-cd04679891875dfb2bf67613514238eb"}}, -{"id":"spider-tdd","key":"spider-tdd","value":{"rev":"3-d95b6d680d053a063e6fab3fdae16261"}}, -{"id":"spine","key":"spine","value":{"rev":"9-2a5cd4733be1d78376814e78966d885a"}}, -{"id":"spine.app","key":"spine.app","value":{"rev":"43-1044b31d4c53ff5c741a16d49291b321"}}, -{"id":"spine.mobile","key":"spine.mobile","value":{"rev":"19-220f64c212a5f22b27d597e299263490"}}, -{"id":"split_er","key":"split_er","value":{"rev":"3-3419662807bf16f7b5b53998a4759246"}}, -{"id":"spludo","key":"spludo","value":{"rev":"14-d41915fcd1b50553f5b9e706b41d2894"}}, -{"id":"spm","key":"spm","value":{"rev":"9-28d6699288d580807091aafdf78dd479"}}, -{"id":"spore","key":"spore","value":{"rev":"44-1c50fb0e6f7c3447f34b1927c976201f"}}, -{"id":"spork","key":"spork","value":{"rev":"3-e90976749b649b88ab83b59785dba101"}}, -{"id":"spotify","key":"spotify","value":{"rev":"3-90c74506a69e08a41feeb23541ac0b4f"}}, -{"id":"spotify-metadata","key":"spotify-metadata","value":{"rev":"3-a546d3e59e40ec0be5d8524f3a1e7a60"}}, -{"id":"spotlight","key":"spotlight","value":{"rev":"3-bead50ac8f53311d539a420c74ea23e2"}}, -{"id":"spread","key":"spread","value":{"rev":"3-ad7bf6d948043fc6dd47a6fcec7da294"}}, -{"id":"spreadsheet","key":"spreadsheet","value":{"rev":"11-94030e23cc9c8e515c1f340656aea031"}}, -{"id":"spreadsheets","key":"spreadsheets","value":{"rev":"3-6563c479735b1b6599bf9602fa65ff38"}}, -{"id":"sprintf","key":"sprintf","value":{"rev":"10-56c5bc7a19ecf8dd92e24d4dca081059"}}, -{"id":"spruce","key":"spruce","value":{"rev":"7-1ea45ef3c5412dd2a6c1fe7b2a083d68"}}, -{"id":"spy","key":"spy","value":{"rev":"3-f5546fdbbec80ba97756d0d1fefa7923"}}, -{"id":"sql","key":"sql","value":{"rev":"5-6c41452f684418ba521666e977f46e54"}}, -{"id":"sqlite","key":"sqlite","value":{"rev":"9-18761259920b497360f581ff8051dcbb"}}, -{"id":"sqlite3","key":"sqlite3","value":{"rev":"51-f9c99537afd9826819c5f40105e50987"}}, -{"id":"sqlmw","key":"sqlmw","value":{"rev":"17-b05b0b089c0f3b1185f96dc19bf61cf5"}}, -{"id":"squeeze","key":"squeeze","value":{"rev":"6-5e517be339d9aa409cedfcc11d1883b1"}}, -{"id":"squish","key":"squish","value":{"rev":"15-2334d8412df59ddd2fce60c1f77954c7"}}, -{"id":"sqwish","key":"sqwish","value":{"rev":"28-cc159dd5fd420432a7724c46456f4958"}}, -{"id":"srand","key":"srand","value":{"rev":"16-22f98b1b1a208c22dfbe95aa889cd08e"}}, -{"id":"srcds","key":"srcds","value":{"rev":"3-bd79da47d36662609c0c75c713874fd1"}}, -{"id":"srs","key":"srs","value":{"rev":"32-c8c961ea10fc60fc428bddff133a8aba"}}, -{"id":"sserve","key":"sserve","value":{"rev":"3-957457395e2c61c20bcb727fc19fc4d4"}}, -{"id":"ssh","key":"ssh","value":{"rev":"3-c7dda694daa7ca1e264b494400edfa18"}}, -{"id":"ssh-agent","key":"ssh-agent","value":{"rev":"3-dbc87102ed1f17b7253a1901976dfa9d"}}, -{"id":"sshmq","key":"sshmq","value":{"rev":"3-052f36ca47cddf069a1700fc79a08930"}}, -{"id":"stache","key":"stache","value":{"rev":"11-9bb0239153147939a25fd20184f20fc6"}}, -{"id":"stack","key":"stack","value":{"rev":"7-e18abdce80008ac9e2feb66f3407fe67"}}, -{"id":"stack-trace","key":"stack-trace","value":{"rev":"13-9fe20c5a3e34a5e4472c6f4fdea86efc"}}, -{"id":"stack.static","key":"stack.static","value":{"rev":"7-ad064faf6255a632cefa71a6ff3c47f3"}}, -{"id":"stack2","key":"stack2","value":{"rev":"3-e5f8ea94c0dd2b4c7f5d3941d689622b"}}, -{"id":"stackedy","key":"stackedy","value":{"rev":"25-f988787b9b5720dece8ae3cb83a2bc12"}}, -{"id":"stage","key":"stage","value":{"rev":"7-d2931fcb473f63320067c3e75638924e"}}, -{"id":"stalker","key":"stalker","value":{"rev":"19-ece35be8695846fc766a71c0022d4ff7"}}, -{"id":"startupify","key":"startupify","value":{"rev":"11-3c87ef5e9ee33122cf3515a63b22c52a"}}, -{"id":"stash","key":"stash","value":{"rev":"10-41239a1df74b69fe7bb3e360f9a35ad1"}}, -{"id":"statechart","key":"statechart","value":{"rev":"6-97e6947b5bbaf14bdb55efa6dfa5e19c"}}, -{"id":"stately","key":"stately","value":{"rev":"6-f8a257cd9fdd84947ff2cf7357afc88b"}}, -{"id":"stathat","key":"stathat","value":{"rev":"3-b79b7bd50bb1e4dcc1301424104a5b36"}}, -{"id":"station","key":"station","value":{"rev":"5-92e6387138b1ee10976bd92dd48ea818"}}, -{"id":"statistics","key":"statistics","value":{"rev":"3-a1c3a03d833c6f02fde403950790e9b4"}}, -{"id":"stats","key":"stats","value":{"rev":"13-fe513ea6b3b5b6b31935fd3464ec5d3b"}}, -{"id":"std","key":"std","value":{"rev":"55-58a4f182c3f51996a0d60a6f575cfefd"}}, -{"id":"steam","key":"steam","value":{"rev":"5-bffdf677d2d1ae3e8236892e68a3dd66"}}, -{"id":"stem","key":"stem","value":{"rev":"36-4f1c38eff671ede0241038017a810132"}}, -{"id":"step","key":"step","value":{"rev":"8-048d7707a45af3a7824a478d296cc467"}}, -{"id":"stepc","key":"stepc","value":{"rev":"3-be85de2c02f4889fdf77fda791feefea"}}, -{"id":"stepper","key":"stepper","value":{"rev":"9-cc54000dc973835c38e139b30cbb10cc"}}, -{"id":"steps","key":"steps","value":{"rev":"5-3561591b425e1fff52dc397f9688feae"}}, -{"id":"stextile","key":"stextile","value":{"rev":"29-9a8b6de917df01d322847f112dcadadf"}}, -{"id":"stitch","key":"stitch","value":{"rev":"13-8a50e4a4f015d1afe346aa6b6c8646bd"}}, -{"id":"stitchup","key":"stitchup","value":{"rev":"7-fe14604e3a8b82f62c38d0cb3ccce61e"}}, -{"id":"stomp","key":"stomp","value":{"rev":"15-e0430c0be74cd20c5204b571999922f7"}}, -{"id":"stopwords","key":"stopwords","value":{"rev":"3-2dd9fade030cfcce85848c5b3b4116fc"}}, -{"id":"store","key":"store","value":{"rev":"9-5537cc0f4827044504e8dae9617c9347"}}, -{"id":"store.js","key":"store.js","value":{"rev":"22-116c9a6194703ea98512d89ec5865e3d"}}, -{"id":"stories","key":"stories","value":{"rev":"11-244ca52d0a41f70bc4dfa0aca0f82a40"}}, -{"id":"storify","key":"storify","value":{"rev":"5-605b197219e916df561dd7722af97e2e"}}, -{"id":"storify-templates","key":"storify-templates","value":{"rev":"3-0960756aa963cee21b679a59cef114a1"}}, -{"id":"storm","key":"storm","value":{"rev":"3-9052e6af8528d1bc0d96021dfa21dd3e"}}, -{"id":"stove","key":"stove","value":{"rev":"17-01c9f0e87398e6bfa03a764e89295e00"}}, -{"id":"str.js","key":"str.js","value":{"rev":"9-301f54edeebde3c5084c3a8071e2aa09"}}, -{"id":"strack","key":"strack","value":{"rev":"10-5acf78ae6a417a82b49c221d606b8fed"}}, -{"id":"strappy","key":"strappy","value":{"rev":"3-fb63a899ff82c0f1142518cc263dd632"}}, -{"id":"strata","key":"strata","value":{"rev":"31-de615eccbda796e2bea405c2806ec792"}}, -{"id":"stream-buffers","key":"stream-buffers","value":{"rev":"7-d8fae628da43d377dd4e982f5bf7b09b"}}, -{"id":"stream-handler","key":"stream-handler","value":{"rev":"7-333eb7dcf2aeb550f948ee2162b21be2"}}, -{"id":"stream-stack","key":"stream-stack","value":{"rev":"22-a70979df042e2ff760b2d900259c84a1"}}, -{"id":"streamer","key":"streamer","value":{"rev":"17-dd16e62ada55311a793fbf7963a920f3"}}, -{"id":"streamlib","key":"streamlib","value":{"rev":"3-5125b1e6a92290f8d7f5fdad71e13fc2"}}, -{"id":"streamline","key":"streamline","value":{"rev":"152-0931f5697340c62e05dcd1a741afd38f"}}, -{"id":"streamline-streams","key":"streamline-streams","value":{"rev":"3-3224030ecfbf5a8ac5d218ab56dee545"}}, -{"id":"streamline-util","key":"streamline-util","value":{"rev":"3-a8047ecf37b985ec836c552fd2bcbf78"}}, -{"id":"streamlogger","key":"streamlogger","value":{"rev":"3-43f93a109774591f1409b0b86c363623"}}, -{"id":"streamlogger-fixed","key":"streamlogger-fixed","value":{"rev":"3-6e48de9e269b4f5bf979c560190b0680"}}, -{"id":"strftime","key":"strftime","value":{"rev":"25-74130d5c9cbf91025ce91f0463a9b1b5"}}, -{"id":"string-color","key":"string-color","value":{"rev":"3-9f336bf06bd80b2d2338c216099421c7"}}, -{"id":"strscan","key":"strscan","value":{"rev":"8-3e0d182a8d0c786754c555c0ac12e9d9"}}, -{"id":"strtok","key":"strtok","value":{"rev":"8-a1a1da7946d62fabb6cca56fc218654b"}}, -{"id":"struct","key":"struct","value":{"rev":"3-ff0f9cb336df73a5a19a38e17633583c"}}, -{"id":"structr","key":"structr","value":{"rev":"21-69b3672dab234d0effec5a72a2b1791c"}}, -{"id":"sty","key":"sty","value":{"rev":"9-ce5691388abc3ccaff23030bff190914"}}, -{"id":"style","key":"style","value":{"rev":"7-342569887fb53caddc60d745706cd66e"}}, -{"id":"style-compile","key":"style-compile","value":{"rev":"5-6f8b86c94c5344ec280a28f025691996"}}, -{"id":"styleless","key":"styleless","value":{"rev":"5-c236b81c38193ad71d7ed7c5b571995d"}}, -{"id":"stylewriter","key":"stylewriter","value":{"rev":"3-25a3f83252b220d8db0aa70c8fc1da4f"}}, -{"id":"stylus","key":"stylus","value":{"rev":"135-8b69084f50a95c297d1044e48b39a6c9"}}, -{"id":"stylus-blueprint","key":"stylus-blueprint","value":{"rev":"5-50ec59a9fa161ca68dac765f2281c13e"}}, -{"id":"stylus-sprite","key":"stylus-sprite","value":{"rev":"27-db597a75467baaad94de287494e9c21e"}}, -{"id":"styout","key":"styout","value":{"rev":"9-9d9460bb9bfa253ed0b5fbeb27f7710a"}}, -{"id":"sugar","key":"sugar","value":{"rev":"5-2722426edc51a7703f5c37306b03a8c4"}}, -{"id":"sugardoll","key":"sugardoll","value":{"rev":"16-cfadf4e7108357297be180a3868130db"}}, -{"id":"suger-pod","key":"suger-pod","value":{"rev":"5-c812b763cf6cdd218c6a18e1a4e2a4ac"}}, -{"id":"sunny","key":"sunny","value":{"rev":"3-c26b62eef1eeeeef58a7ea9373df3b39"}}, -{"id":"superagent","key":"superagent","value":{"rev":"3-1b32cc8372b7713f973bb1e044e6a86f"}}, -{"id":"supermarket","key":"supermarket","value":{"rev":"20-afa8a26ecec3069717c8ca7e5811cc31"}}, -{"id":"supershabam-websocket","key":"supershabam-websocket","value":{"rev":"7-513117fb37b3ab7cdaeeae31589e212e"}}, -{"id":"supervisor","key":"supervisor","value":{"rev":"16-2c6c141d018ef8927acee79f31d466ff"}}, -{"id":"supervisord","key":"supervisord","value":{"rev":"7-359ba115e5e10b5c95ef1a7562ad7a45"}}, -{"id":"svg2jadepartial","key":"svg2jadepartial","value":{"rev":"9-4a6260dd5d7c14801e8012e3ba7510f5"}}, -{"id":"swake","key":"swake","value":{"rev":"5-6f780362f0317427752d87cc5c640021"}}, -{"id":"swarm","key":"swarm","value":{"rev":"43-f1a963a0aeb043bf69529a82798b3afc"}}, -{"id":"sweet","key":"sweet","value":{"rev":"5-333f4d3529f65ce53b037cc282e3671d"}}, -{"id":"swig","key":"swig","value":{"rev":"29-53294b9d4f350192cf65817692092bfa"}}, -{"id":"switchback","key":"switchback","value":{"rev":"3-e117371d415f4a3d4ad30e78f5ec28bf"}}, -{"id":"switchboard","key":"switchboard","value":{"rev":"3-504d6c1e45165c54fbb1d3025d5120d7"}}, -{"id":"swiz","key":"swiz","value":{"rev":"82-cfb7840376b57896fba469e5c6ff3786"}}, -{"id":"swizec-bitly","key":"swizec-bitly","value":{"rev":"3-a705807238b8ef3ff2d008910bc350c3"}}, -{"id":"sws","key":"sws","value":{"rev":"5-bc5e8558bde6c2ae971abdd448a006d2"}}, -{"id":"symbie","key":"symbie","value":{"rev":"5-3184f869ed386341a4cdc35d85efb62a"}}, -{"id":"symbox","key":"symbox","value":{"rev":"5-eed33350cbb763726335ef1df74a6591"}}, -{"id":"synapse","key":"synapse","value":{"rev":"3-a9672d5159c0268babbfb94d7554d4bb"}}, -{"id":"sync","key":"sync","value":{"rev":"65-89fa6b8ab2df135d57e0bba4e921ad3b"}}, -{"id":"synchro","key":"synchro","value":{"rev":"21-6a881704308298f1894509a5b59287ae"}}, -{"id":"synchronous","key":"synchronous","value":{"rev":"7-bf89d61f001d994429e0fd12c26c2676"}}, -{"id":"syncler","key":"syncler","value":{"rev":"2-12870522e069945fc12f7d0f612700ee"}}, -{"id":"syncrepl","key":"syncrepl","value":{"rev":"5-e9234a1d8a529bc0d1b01c3b77c69c30"}}, -{"id":"synct","key":"synct","value":{"rev":"3-3664581b69e6f40dabc90525217f46cd"}}, -{"id":"syndicate","key":"syndicate","value":{"rev":"7-1db2b05d6b3e55fa622c3c26df7f9cad"}}, -{"id":"syslog","key":"syslog","value":{"rev":"5-d52fbc739505a2a194faf9a32da39d23"}}, -{"id":"syslog-node","key":"syslog-node","value":{"rev":"15-039177b9c516fd8d0b31faf92aa73f6f"}}, -{"id":"system","key":"system","value":{"rev":"18-33152371e0696a853ddb8b2234a6dfea"}}, -{"id":"taazr-uglify","key":"taazr-uglify","value":{"rev":"7-5c63dc75aa7c973df102c298291be8a5"}}, -{"id":"table","key":"table","value":{"rev":"9-a8a46ddf3a7cab63a0228303305cc32e"}}, -{"id":"tache.io","key":"tache.io","value":{"rev":"7-5639c70dc56b0a6333b568af377bb216"}}, -{"id":"taco","key":"taco","value":{"rev":"3-97cfbd54b4053c9e01e18af7c3902d1a"}}, -{"id":"tad","key":"tad","value":{"rev":"3-529ebda7291e24ae020d5c2931ba22cd"}}, -{"id":"tafa-misc-util","key":"tafa-misc-util","value":{"rev":"19-52984b66029c7d5cc78d3e2ae88c98d6"}}, -{"id":"tag","key":"tag","value":{"rev":"3-80b0d526b10a26f41fe73978843a07b9"}}, -{"id":"taglib","key":"taglib","value":{"rev":"3-efd2e6bc818bf3b385df40dfae506fa5"}}, -{"id":"tail","key":"tail","value":{"rev":"21-09bce80ad6aa4b01c6a70825fd141fd4"}}, -{"id":"tails","key":"tails","value":{"rev":"14-3ba6976831b1388e14235622ab001681"}}, -{"id":"tamejs","key":"tamejs","value":{"rev":"39-9a3657941df3bd24c43b5473e9f3b4c8"}}, -{"id":"taobao-js-api","key":"taobao-js-api","value":{"rev":"7-d46c8b48364b823dabf808f2b30e1eb8"}}, -{"id":"tap","key":"tap","value":{"rev":"35-1b8e553cf848f5ab27711efa0e74a033"}}, -{"id":"tap-assert","key":"tap-assert","value":{"rev":"19-f2960c64bcfa6ce4ed73e870d8d9e3fa"}}, -{"id":"tap-consumer","key":"tap-consumer","value":{"rev":"3-3e38aafb6d2d840bdb20818efbc75df4"}}, -{"id":"tap-global-harness","key":"tap-global-harness","value":{"rev":"3-f32589814daf8c1816c1f5a24de4ad12"}}, -{"id":"tap-harness","key":"tap-harness","value":{"rev":"7-a5af01384152c452abc11d4e641e6157"}}, -{"id":"tap-producer","key":"tap-producer","value":{"rev":"3-2db67a9541c37c912d4de2576bb3caa0"}}, -{"id":"tap-results","key":"tap-results","value":{"rev":"5-b8800525438965e38dc586e6b5cb142d"}}, -{"id":"tap-runner","key":"tap-runner","value":{"rev":"11-3975c0f5044530b61158a029899f4c03"}}, -{"id":"tap-test","key":"tap-test","value":{"rev":"5-0a3bba26b6b94dae8b7f59712335ee98"}}, -{"id":"tar","key":"tar","value":{"rev":"6-94226dd7add6ae6a1e68088360a466e4"}}, -{"id":"tar-async","key":"tar-async","value":{"rev":"37-d6579d43c1ee2f41205f28b0cde5da23"}}, -{"id":"tar-js","key":"tar-js","value":{"rev":"5-6826f2aad965fb532c7403964ce80d85"}}, -{"id":"task","key":"task","value":{"rev":"3-81f72759a5b64dff88a01a4838cc4a23"}}, -{"id":"task-extjs","key":"task-extjs","value":{"rev":"14-c9ba76374805425c332e0c66725e885c"}}, -{"id":"task-joose-nodejs","key":"task-joose-nodejs","value":{"rev":"20-6b8e4d24323d3240d5ee790d00c0d96a"}}, -{"id":"task-joose-stable","key":"task-joose-stable","value":{"rev":"32-026eada52cd5dd17a680359daec4917a"}}, -{"id":"tasks","key":"tasks","value":{"rev":"5-84e8f83d0c6ec27b4f05057c48063d62"}}, -{"id":"tav","key":"tav","value":{"rev":"3-da9899817edd20f0c73ad09bdf540cc6"}}, -{"id":"taxman","key":"taxman","value":{"rev":"5-9b9c68db8a1c8efedad800026cb23ae4"}}, -{"id":"tbone","key":"tbone","value":{"rev":"3-5789b010d0b1f1c663750c894fb5c570"}}, -{"id":"tcp-proxy","key":"tcp-proxy","value":{"rev":"3-118c6dc26d11537cf157fe2f28b05af5"}}, -{"id":"teamgrowl","key":"teamgrowl","value":{"rev":"8-3d13200b3bfeeace0787f9f9f027216d"}}, -{"id":"teamgrowl-server","key":"teamgrowl-server","value":{"rev":"8-a14dc4a26c2c06a4d9509eaff6e24735"}}, -{"id":"telehash","key":"telehash","value":{"rev":"6-4fae3629c1e7e111ba3e486b39a29913"}}, -{"id":"telemail","key":"telemail","value":{"rev":"3-60928460428265fc8002ca61c7f23abe"}}, -{"id":"telemetry","key":"telemetry","value":{"rev":"5-1be1d37ef62dc786b0a0f0d2d7984eb1"}}, -{"id":"teleport","key":"teleport","value":{"rev":"36-5b55a43ba83f4fe1a547c04e29139c3d"}}, -{"id":"teleport-dashboard","key":"teleport-dashboard","value":{"rev":"7-4cbc728d7a3052848a721fcdd92dda30"}}, -{"id":"teleport-site","key":"teleport-site","value":{"rev":"3-aeb8c0a93b7b0bcd7a30fe33bf23808c"}}, -{"id":"telnet","key":"telnet","value":{"rev":"11-7a587104b94ce135315c7540eb3493f6"}}, -{"id":"telnet-protocol","key":"telnet-protocol","value":{"rev":"3-8fcee2ed02c2e603c48e51e90ae78a00"}}, -{"id":"temp","key":"temp","value":{"rev":"6-91ef505da0a0860a13c0eb1a5d2531e6"}}, -{"id":"tempPath","key":"tempPath","value":{"rev":"3-34f2c1937d97207245986c344136547c"}}, -{"id":"tempis","key":"tempis","value":{"rev":"3-b2c0989068cc8125a519d19b9c79ffb6"}}, -{"id":"template","key":"template","value":{"rev":"6-d0088c6a5a7610570920db0f5c950bf9"}}, -{"id":"template-engine","key":"template-engine","value":{"rev":"3-3746216e1e2e456dbb0fd2f9070c1619"}}, -{"id":"tengwar","key":"tengwar","value":{"rev":"3-645a00f03e1e9546631ac22c37e1f3b4"}}, -{"id":"tenjin","key":"tenjin","value":{"rev":"5-0925c7535455266125b7730296c66356"}}, -{"id":"teriaki","key":"teriaki","value":{"rev":"3-d3c17f70d8697c03f43a7eae75f8c089"}}, -{"id":"terminal","key":"terminal","value":{"rev":"11-0e024d173ee3c28432877c0c5f633f19"}}, -{"id":"termspeak","key":"termspeak","value":{"rev":"7-fdfc93dd7d0d65fe502cabca191d8496"}}, -{"id":"termutil","key":"termutil","value":{"rev":"5-bccf8377ff28bc1f07f8b4b44d1e2335"}}, -{"id":"test","key":"test","value":{"rev":"38-129620013bbd3ec13617c403b02b52f1"}}, -{"id":"test-cmd","key":"test-cmd","value":{"rev":"35-7dd417a80390c2c124c66273ae33bd07"}}, -{"id":"test-helper","key":"test-helper","value":{"rev":"3-7b29af65825fc46d0603a39cdc6c95b4"}}, -{"id":"test-report","key":"test-report","value":{"rev":"5-e51cd1069b6cc442707f0861b35851be"}}, -{"id":"test-report-view","key":"test-report-view","value":{"rev":"3-9ba670940a8235eaef9b957dde6379af"}}, -{"id":"test-run","key":"test-run","value":{"rev":"20-6de89383602e6843d9376a78778bec19"}}, -{"id":"test_it","key":"test_it","value":{"rev":"5-be5cd436b9145398fa88c15c1269b102"}}, -{"id":"testbed","key":"testbed","value":{"rev":"2-db233788f7e516f227fac439d9450ef4"}}, -{"id":"testharness","key":"testharness","value":{"rev":"46-787468cb68ec31b442327639dcc0a4e5"}}, -{"id":"testingey","key":"testingey","value":{"rev":"17-a7ad6a9ff5721ae449876f6448d6f22f"}}, -{"id":"testnode","key":"testnode","value":{"rev":"9-cb63c450b241806e2271cd56fe502395"}}, -{"id":"testosterone","key":"testosterone","value":{"rev":"35-278e8af2b59bb6caf56728c67f720c37"}}, -{"id":"testqueue","key":"testqueue","value":{"rev":"3-59c574aeb345ef2d6e207a342be3f497"}}, -{"id":"testrunner","key":"testrunner","value":{"rev":"7-152e7d4a97f6cf6f00e22140e1969664"}}, -{"id":"testy","key":"testy","value":{"rev":"5-e8f4c9f4a799b6f8ab4effc21c3073a0"}}, -{"id":"text","key":"text","value":{"rev":"6-58a79b0db4968d6ad233898744a75351"}}, -{"id":"textareaserver","key":"textareaserver","value":{"rev":"3-f032b1397eb5e6369e1ac0ad1e78f466"}}, -{"id":"textile","key":"textile","value":{"rev":"6-2a8db66876f0119883449012c9c54c47"}}, -{"id":"textual","key":"textual","value":{"rev":"3-0ad9d5d3403b239185bad403625fed19"}}, -{"id":"tf2logparser","key":"tf2logparser","value":{"rev":"5-ffbc427b95ffeeb013dc13fa2b9621e3"}}, -{"id":"tfe-express","key":"tfe-express","value":{"rev":"3-b68ac01185885bcd22fa430ddb97e757"}}, -{"id":"tfidf","key":"tfidf","value":{"rev":"13-988808af905397dc103a0edf8c7c8a9f"}}, -{"id":"theBasics","key":"theBasics","value":{"rev":"7-9ebef2e59e1bd2fb3544ed16e1dc627b"}}, -{"id":"thefunlanguage.com","key":"thefunlanguage.com","value":{"rev":"3-25d56a3a4f639af23bb058db541bffe0"}}, -{"id":"thelinuxlich-docco","key":"thelinuxlich-docco","value":{"rev":"7-2ac0969da67ead2fa8bc0b21880b1d6b"}}, -{"id":"thelinuxlich-vogue","key":"thelinuxlich-vogue","value":{"rev":"5-ebc0a28cf0ae447b7ebdafc51c460bc0"}}, -{"id":"thepusher","key":"thepusher","value":{"rev":"5-b80cce6f81b1cae7373cd802df34c05c"}}, -{"id":"thetvdb","key":"thetvdb","value":{"rev":"3-a3a017a90b752d8158bf6dfcbcfdf250"}}, -{"id":"thirty-two","key":"thirty-two","value":{"rev":"3-1d4761ba7c4fa475e0c69e9c96d6ac04"}}, -{"id":"thoonk","key":"thoonk","value":{"rev":"15-c62c90d7e9072d96302d3a534ce943bb"}}, -{"id":"thrift","key":"thrift","value":{"rev":"14-447a41c9b655ec06e8e4854d5a55523a"}}, -{"id":"throttle","key":"throttle","value":{"rev":"3-8a3b3c657c49ede67c883806fbfb4df6"}}, -{"id":"thyme","key":"thyme","value":{"rev":"5-f06104f10d43a2b4cbcc7621ed45eacf"}}, -{"id":"tiamat","key":"tiamat","value":{"rev":"44-810633d6cd5edaa0510fe0f38c02ad58"}}, -{"id":"tictoc","key":"tictoc","value":{"rev":"3-0be6cf95d4466595376dadd0fc08bd95"}}, -{"id":"tidy","key":"tidy","value":{"rev":"3-25116d4dcf6765ef2a09711ecc1e03c9"}}, -{"id":"tiers","key":"tiers","value":{"rev":"3-ffaa8ffe472fe703de8f0bbeb8af5621"}}, -{"id":"tilejson","key":"tilejson","value":{"rev":"5-76b990dd945fb412ed00a96edc86b59d"}}, -{"id":"tilelive","key":"tilelive","value":{"rev":"57-9283e846e77263ed6e7299680d6b4b06"}}, -{"id":"tilelive-mapnik","key":"tilelive-mapnik","value":{"rev":"31-30f871ede46789fc6a36f427a1a99fff"}}, -{"id":"tilemill","key":"tilemill","value":{"rev":"19-7b884c9d707dd34f21cb71e88b45fc73"}}, -{"id":"tilestream","key":"tilestream","value":{"rev":"76-3a29ba96ecdb6c860c211ae8f2d909a9"}}, -{"id":"timbits","key":"timbits","value":{"rev":"59-b48dde4a210ec9fb4c33c07a52bce61e"}}, -{"id":"time","key":"time","value":{"rev":"51-907f587206e6a27803a3570e42650adc"}}, -{"id":"timeTraveller","key":"timeTraveller","value":{"rev":"7-389de8c8e86daea495d14aeb2b77df38"}}, -{"id":"timeout","key":"timeout","value":{"rev":"11-8e53dedecfaf6c4f1086eb0f43c71325"}}, -{"id":"timer","key":"timer","value":{"rev":"5-a8bcbb898a807e6662b54ac988fb967b"}}, -{"id":"timerjs","key":"timerjs","value":{"rev":"3-7d24eb268746fdb6b5e9be93bec93f1b"}}, -{"id":"timespan","key":"timespan","value":{"rev":"12-315b2793cbf28a18cea36e97a3c8a55f"}}, -{"id":"timezone","key":"timezone","value":{"rev":"35-2741d5d3b68a953d4cb3a596bc2bc15e"}}, -{"id":"tiny","key":"tiny","value":{"rev":"9-a61d26d02ce39381f7e865ad82494692"}}, -{"id":"tld","key":"tld","value":{"rev":"3-5ce4b4e48a11413ad8a1f3bfd0d0b778"}}, -{"id":"tldextract","key":"tldextract","value":{"rev":"7-620962e27145bd9fc17dc406c38b0c32"}}, -{"id":"tmp","key":"tmp","value":{"rev":"23-20f5c14244d58f35bd3e970f5f65cc32"}}, -{"id":"tmpl","key":"tmpl","value":{"rev":"5-5894c206e15fa58ab9415706b9d53f1f"}}, -{"id":"tmpl-precompile","key":"tmpl-precompile","value":{"rev":"15-3db34b681596b258cae1dae8cc24119d"}}, -{"id":"tmppckg","key":"tmppckg","value":{"rev":"11-b3a13e1280eb9cbef182c1f3f24bd570"}}, -{"id":"tnetstrings","key":"tnetstrings","value":{"rev":"3-d6b8ed2390a3e38138cb01b82d820079"}}, -{"id":"toDataURL","key":"toDataURL","value":{"rev":"3-1ea3cb62666b37343089bb9ef48fbace"}}, -{"id":"toYaml","key":"toYaml","value":{"rev":"11-3c629e3859c70d57b1ae51b2ac459011"}}, -{"id":"tob","key":"tob","value":{"rev":"7-376c174d06a675855406cfcdcacf61f5"}}, -{"id":"tobi","key":"tobi","value":{"rev":"50-d8749ac3739b042afe82657802bc3ba8"}}, -{"id":"toddick","key":"toddick","value":{"rev":"13-db528ef519f57b8c1d752ad7270b4d05"}}, -{"id":"tokenizer","key":"tokenizer","value":{"rev":"5-f6524fafb16059b66074cd04bf248a03"}}, -{"id":"tokyotosho","key":"tokyotosho","value":{"rev":"5-7432e0207165d9c165fd73d2a23410d6"}}, -{"id":"tolang","key":"tolang","value":{"rev":"7-65dbdf56b039f680e61a1e1d7feb9fb1"}}, -{"id":"toolkit","key":"toolkit","value":{"rev":"13-58075a57a6069dc39f98e72d473a0c30"}}, -{"id":"tools","key":"tools","value":{"rev":"3-ba301d25cfc6ad71dd68c811ea97fa01"}}, -{"id":"topcube","key":"topcube","value":{"rev":"29-736b3816d410f626dbc4da663acb05aa"}}, -{"id":"torrent-search","key":"torrent-search","value":{"rev":"7-7dd48fac0c1f99f34fad7da365085b6c"}}, -{"id":"tosource","key":"tosource","value":{"rev":"5-13483e2c11b07611c26b37f2e76a0bf3"}}, -{"id":"tplcpl","key":"tplcpl","value":{"rev":"15-8ba1e6d14ad6b8eb71b703e22054ac0a"}}, -{"id":"tracejs","key":"tracejs","value":{"rev":"23-1ffec83afc19855bcbed8049a009a910"}}, -{"id":"traceur","key":"traceur","value":{"rev":"9-a48f7e4cb1fb452125d81c62c8ab628b"}}, -{"id":"traceurl","key":"traceurl","value":{"rev":"21-e016db44a86b124ea00411f155d884d4"}}, -{"id":"tracey","key":"tracey","value":{"rev":"5-76699aab64e89271cbb7df80a00d3583"}}, -{"id":"tracy","key":"tracy","value":{"rev":"5-412f78082ba6f4c3c7d5328cf66d2e10"}}, -{"id":"traits","key":"traits","value":{"rev":"10-3a37dbec4b78518c00c577f5e286a9b9"}}, -{"id":"tramp","key":"tramp","value":{"rev":"5-3b6d27b8b432b925b7c9fc088e84d8e4"}}, -{"id":"transcode","key":"transcode","value":{"rev":"6-a6494707bd94b5e6d1aa9df3dbcf8d7c"}}, -{"id":"transformer","key":"transformer","value":{"rev":"15-7738ac7c02f03d64f73610fbf7ed92a6"}}, -{"id":"transformjs","key":"transformjs","value":{"rev":"5-f1ab667c430838e1d3238e1f878998e2"}}, -{"id":"transitive","key":"transitive","value":{"rev":"43-841de40a5e3434bd51a1c8f19891f982"}}, -{"id":"translate","key":"translate","value":{"rev":"12-f3ddbbada2f109843c5422d83dd7a203"}}, -{"id":"transliteration.ua","key":"transliteration.ua","value":{"rev":"3-f847c62d8749904fc7de6abe075e619a"}}, -{"id":"transmission","key":"transmission","value":{"rev":"9-587eaa395430036f17b175bc439eabb6"}}, -{"id":"transmogrify","key":"transmogrify","value":{"rev":"5-3e415cd9420c66551cccc0aa91b11d98"}}, -{"id":"transporter","key":"transporter","value":{"rev":"6-698b696890bf01d751e9962bd86cfe7e"}}, -{"id":"traverse","key":"traverse","value":{"rev":"60-9432066ab44fbb0e913227dc62c953d9"}}, -{"id":"traverser","key":"traverser","value":{"rev":"11-1d50662f13134868a1df5019d99bf038"}}, -{"id":"treeeater","key":"treeeater","value":{"rev":"56-2c8a9fd3e842b221ab8da59c6d847327"}}, -{"id":"treelib","key":"treelib","value":{"rev":"13-212ccc836a943c8b2a5342b65ab9edf3"}}, -{"id":"trees","key":"trees","value":{"rev":"3-3ee9e9cf3fd8aa985e32b3d9586a7c0e"}}, -{"id":"trentm-datetime","key":"trentm-datetime","value":{"rev":"3-740a291379ddf97bda2aaf2ff0e1654d"}}, -{"id":"trentm-git","key":"trentm-git","value":{"rev":"3-b81ce3764a45e5d0862488fab9fac486"}}, -{"id":"trentm-hashlib","key":"trentm-hashlib","value":{"rev":"3-4b4175b6a8702bdb9c1fe5ac4786761b"}}, -{"id":"trial","key":"trial","value":{"rev":"3-cf77f189409517495dd8259f86e0620e"}}, -{"id":"trie","key":"trie","value":{"rev":"3-6cc3c209cf4aae5a4f92e1ca38c4c54c"}}, -{"id":"trollop","key":"trollop","value":{"rev":"6-75076593614c9cd51d61a76f73d2c5b5"}}, -{"id":"trollscript","key":"trollscript","value":{"rev":"5-fcf646075c5be575b9174f84d08fbb37"}}, -{"id":"trollscriptjs","key":"trollscriptjs","value":{"rev":"3-1dfd1acd3d15c0bd18ea407e3933b621"}}, -{"id":"tropo-webapi","key":"tropo-webapi","value":{"rev":"11-5106730dbd79167df38812ffaa912ded"}}, -{"id":"tropo-webapi-node","key":"tropo-webapi-node","value":{"rev":"15-483c64bcbf1dcadaea30e78d7bc3ebbc"}}, -{"id":"trundle","key":"trundle","value":{"rev":"3-2af32ed348fdedebd1077891bb22a756"}}, -{"id":"trust-reverse-proxy","key":"trust-reverse-proxy","value":{"rev":"6-ba5bed0849617e0390f0e24750bf5747"}}, -{"id":"trying","key":"trying","value":{"rev":"3-43b417160b178c710e0d85af6b3d56e7"}}, -{"id":"ttapi","key":"ttapi","value":{"rev":"51-727e47d8b383b387a498711c07ce4de6"}}, -{"id":"tubbs","key":"tubbs","value":{"rev":"7-b386e59f2205b22615a376f5ddee3eb0"}}, -{"id":"tuild","key":"tuild","value":{"rev":"13-4a2b92f95a0ee342c060974ce7a0021d"}}, -{"id":"tumbler","key":"tumbler","value":{"rev":"5-ff16653ab92d0af5e70d9caa88f3b7ed"}}, -{"id":"tumbler-sprite","key":"tumbler-sprite","value":{"rev":"3-604d25b7bb9e32b92cadd75aeb23997c"}}, -{"id":"tumblr","key":"tumblr","value":{"rev":"9-14d160f1f2854330fba300b3ea233893"}}, -{"id":"tumblr2","key":"tumblr2","value":{"rev":"7-29bb5d86501cdbcef889289fe7f4b51e"}}, -{"id":"tumblrrr","key":"tumblrrr","value":{"rev":"10-0c50379fbab7b39766e1a61379c39964"}}, -{"id":"tunguska","key":"tunguska","value":{"rev":"1-a6b24d2c2a5a9f091a9b6f13bac66927"}}, -{"id":"tupalocomapi","key":"tupalocomapi","value":{"rev":"3-a1cdf85a08784f62c2ec440a1ed90ad4"}}, -{"id":"turing","key":"turing","value":{"rev":"5-4ba083c8343718acb9450d96551b65c0"}}, -{"id":"tutti","key":"tutti","value":{"rev":"21-929cc205b3d8bc68f86aa63578e0af95"}}, -{"id":"tuttiserver","key":"tuttiserver","value":{"rev":"39-b3fe7cbaf2d43458dae061f37aa5ae18"}}, -{"id":"tuttiterm","key":"tuttiterm","value":{"rev":"7-6c0e9e7f6f137de0ee7c886351fdf373"}}, -{"id":"tvister","key":"tvister","value":{"rev":"7-963eab682ab09922a44fbca50c0ec019"}}, -{"id":"twbot","key":"twbot","value":{"rev":"15-923625f516566c977975b3da3d4bc46b"}}, -{"id":"tweasy","key":"tweasy","value":{"rev":"10-7215063e5729b1c114ef73f07a1368d3"}}, -{"id":"tweeter.js","key":"tweeter.js","value":{"rev":"3-bc8437157c11cf32eec168d7c71037bb"}}, -{"id":"tweetstream","key":"tweetstream","value":{"rev":"6-81a6bf2a3e29208e1c4c65a3958ee5d8"}}, -{"id":"twerk","key":"twerk","value":{"rev":"5-01cbfddf9ad25a67ff1e45ec39acb780"}}, -{"id":"twerp","key":"twerp","value":{"rev":"23-1b4726d1fef030a3dde6fae2cdfbb687"}}, -{"id":"twigjs","key":"twigjs","value":{"rev":"7-07b90e2c35c5c81d394b29086507de04"}}, -{"id":"twilio","key":"twilio","value":{"rev":"20-68d5439ecb1774226025e6f9125bbb86"}}, -{"id":"twilio-node","key":"twilio-node","value":{"rev":"13-84d31c2dc202df3924ed399289cbc1fc"}}, -{"id":"twiliode","key":"twiliode","value":{"rev":"3-6cbe432dd6c6d94d8a4faa6e0ea47dd3"}}, -{"id":"twill","key":"twill","value":{"rev":"5-3a0caf9c0e83ab732ae8ae61f4f17830"}}, -{"id":"twisted-deferred","key":"twisted-deferred","value":{"rev":"9-f35acecb8736d96582e1f9b62dd4ae47"}}, -{"id":"twitpic","key":"twitpic","value":{"rev":"11-55b11432a09edeec1189024f26a48153"}}, -{"id":"twitter","key":"twitter","value":{"rev":"60-9ad6368932c8a74ea5bd10dda993d74d"}}, -{"id":"twitter-client","key":"twitter-client","value":{"rev":"11-dc3da9e1724cf00aa86c1e7823cfd919"}}, -{"id":"twitter-connect","key":"twitter-connect","value":{"rev":"12-969292347a4251d121566169236a3091"}}, -{"id":"twitter-js","key":"twitter-js","value":{"rev":"24-251d0c54749e86bd544a15290e311370"}}, -{"id":"twitter-node","key":"twitter-node","value":{"rev":"12-a7ed6c69f05204de2e258f46230a05b6"}}, -{"id":"twitter-text","key":"twitter-text","value":{"rev":"16-978bda8ec4eaf68213d0ee54242feefa"}}, -{"id":"type","key":"type","value":{"rev":"3-c5b8b87cde9e27277302cb5cb6d00f85"}}, -{"id":"typecheck","key":"typecheck","value":{"rev":"5-79723661620bb0fb254bc7f888d6e937"}}, -{"id":"typed-array","key":"typed-array","value":{"rev":"3-89ac91e2a51a9e5872515d5a83691e83"}}, -{"id":"typhoon","key":"typhoon","value":{"rev":"23-2027c96b8fd971332848594f3b0526cb"}}, -{"id":"typogr","key":"typogr","value":{"rev":"13-2dfe00f08ee13e6b00a99df0a8f96718"}}, -{"id":"ua-parser","key":"ua-parser","value":{"rev":"14-d1a018354a583dba4506bdc0c04a416b"}}, -{"id":"uberblic","key":"uberblic","value":{"rev":"5-500704ed73f255eb5b86ad0a5e158bc9"}}, -{"id":"ucengine","key":"ucengine","value":{"rev":"5-1e8a91c813e39b6f1b9f988431bb65c8"}}, -{"id":"udon","key":"udon","value":{"rev":"3-9a819e835f88fc91272b6366c70d83c0"}}, -{"id":"ueberDB","key":"ueberDB","value":{"rev":"85-fa700e5a64efaf2e71de843d7175606c"}}, -{"id":"uglify-js","key":"uglify-js","value":{"rev":"30-9ac97132a90f94b0a3aadcd96ed51890"}}, -{"id":"uglify-js-middleware","key":"uglify-js-middleware","value":{"rev":"5-47bd98d7f1118f5cab617310d4022eb4"}}, -{"id":"uglifycss","key":"uglifycss","value":{"rev":"3-4eefc4632e6e61ec999e93a1e26e0c83"}}, -{"id":"ui","key":"ui","value":{"rev":"27-b6439c8fcb5feb1d8f722ac5a91727c0"}}, -{"id":"ukijs","key":"ukijs","value":{"rev":"13-a0d7b143104e6cc0760cbe7e61c4f293"}}, -{"id":"umecob","key":"umecob","value":{"rev":"19-960fef8b8b8468ee69096173baa63232"}}, -{"id":"underscore","key":"underscore","value":{"rev":"29-419857a1b0dc08311717d1f6066218b8"}}, -{"id":"underscore-data","key":"underscore-data","value":{"rev":"17-e763dd42ea6e4ab71bc442e9966e50e4"}}, -{"id":"underscore.date","key":"underscore.date","value":{"rev":"11-a1b5870b855d49a3bd37823a736e9f93"}}, -{"id":"underscore.inspector","key":"underscore.inspector","value":{"rev":"7-04d67b5bfe387391d461b11c6ddda231"}}, -{"id":"underscore.string","key":"underscore.string","value":{"rev":"31-4100a9e1f1d7e8dde007cc6736073e88"}}, -{"id":"underscorem","key":"underscorem","value":{"rev":"5-181dd113e62482020122e6a68f80cdc1"}}, -{"id":"underscorex","key":"underscorex","value":{"rev":"8-76b82cffecd4304822fbc346e6cebc1b"}}, -{"id":"underscorify","key":"underscorify","value":{"rev":"3-7bb03dccba21d30c50328e7d4878704e"}}, -{"id":"unicode","key":"unicode","value":{"rev":"45-2fc73b36aad2661e5bb2e703e62a6f71"}}, -{"id":"unicoder","key":"unicoder","value":{"rev":"3-6f6571d361217af7fea7c224ca8a1149"}}, -{"id":"unit","key":"unit","value":{"rev":"5-68847eeb11474765cf73f1e21ca4b839"}}, -{"id":"unite","key":"unite","value":{"rev":"3-a8812f4e77d1d1a9dc67c327d8e75b47"}}, -{"id":"unittest-jslint","key":"unittest-jslint","value":{"rev":"3-c371c63c7b68a32357becb7b6a02d048"}}, -{"id":"unixlib","key":"unixlib","value":{"rev":"3-41f4c2859ca92951cf40556faa4eacdb"}}, -{"id":"unlimit","key":"unlimit","value":{"rev":"3-f42d98066e6ebbc23ef67499845ac020"}}, -{"id":"unrequire","key":"unrequire","value":{"rev":"17-bc75241891ae005eb52844222daf8f97"}}, -{"id":"unshortener","key":"unshortener","value":{"rev":"15-0851cb8bc3c378c37a3df9760067a109"}}, -{"id":"unused","key":"unused","value":{"rev":"3-362e713349c4a5541564fa2de33d01ba"}}, -{"id":"upload","key":"upload","value":{"rev":"3-63aedcfb335754c3bca1675c4add51c4"}}, -{"id":"ups_node","key":"ups_node","value":{"rev":"15-fa6d0be3831ee09420fb703c4d508534"}}, -{"id":"upy","key":"upy","value":{"rev":"5-dab63054d02be71f9c2709659974a5e1"}}, -{"id":"uri","key":"uri","value":{"rev":"3-5baaa12433cff7539b1d39c0c7f62853"}}, -{"id":"uri-parser","key":"uri-parser","value":{"rev":"3-d7e81b08e8b3f6f5ac8c6b4220228529"}}, -{"id":"url","key":"url","value":{"rev":"3-0dfd5ec2904cb1f645fa7449dbb0ce52"}}, -{"id":"url-expander","key":"url-expander","value":{"rev":"21-73bf9fa3c98b15d5ef0ed9815d862953"}}, -{"id":"urllib","key":"urllib","value":{"rev":"5-b015944526c15589a1504d398dcb598a"}}, -{"id":"urn-parser","key":"urn-parser","value":{"rev":"3-08a35a166790ecf88729befd4ebc7bf1"}}, -{"id":"useless","key":"useless","value":{"rev":"3-9d7b7ab9d4811847ed6e99ce2226d687"}}, -{"id":"user-agent","key":"user-agent","value":{"rev":"16-ac00f085795346421242e3d4d75523ad"}}, -{"id":"useragent","key":"useragent","value":{"rev":"7-3184d8aba5540e6596da9e3635ee3c24"}}, -{"id":"useragent_parser","key":"useragent_parser","value":{"rev":"3-730427aba3f0825fd28850e96b1613d4"}}, -{"id":"utf7","key":"utf7","value":{"rev":"3-ad56e4c9ac5a509ff568a3cdf0ed074f"}}, -{"id":"utf8","key":"utf8","value":{"rev":"3-c530cad759dd6e4e471338a71a307434"}}, -{"id":"util","key":"util","value":{"rev":"3-0e55e3466bc3ea6aeda6384639e842c3"}}, -{"id":"utility-belt","key":"utility-belt","value":{"rev":"3-8de401b41ef742b3c0a144b99099771f"}}, -{"id":"utml","key":"utml","value":{"rev":"5-5f0f3de6f787056bd124ca98716fbc19"}}, -{"id":"uubench","key":"uubench","value":{"rev":"6-b6cb0756e35ce998b61bb9a6ea0f5732"}}, -{"id":"uuid","key":"uuid","value":{"rev":"13-3f014b236668ec5eb49d0a17ad54d397"}}, -{"id":"uuid-lib","key":"uuid-lib","value":{"rev":"3-3de40495439e240b5a41875c19c65b1a"}}, -{"id":"uuid-pure","key":"uuid-pure","value":{"rev":"19-b94e9f434901fe0a0bbfdfa06f785874"}}, -{"id":"uuid.js","key":"uuid.js","value":{"rev":"8-3232a97c9f4a2b601d207488350df01b"}}, -{"id":"v8-profiler","key":"v8-profiler","value":{"rev":"12-790c90391bcbec136e316e57b30a845c"}}, -{"id":"valentine","key":"valentine","value":{"rev":"35-dd4b0642aacaf833e1119fc42bb6e9df"}}, -{"id":"validate-json","key":"validate-json","value":{"rev":"5-6a71fb36b102b3a4c5f6cc35012518b3"}}, -{"id":"validations","key":"validations","value":{"rev":"5-7272c97d35e3269813d91f1ea06e7217"}}, -{"id":"validator","key":"validator","value":{"rev":"45-9983ff692c291143ba670b613e07ddab"}}, -{"id":"vanilla","key":"vanilla","value":{"rev":"3-2e1d05af0873386b7cd6d432f1e76217"}}, -{"id":"vapor","key":"vapor","value":{"rev":"1-e1f86f03c94a4b90bca347408dbc56ff"}}, -{"id":"vargs","key":"vargs","value":{"rev":"6-9e389cfd648034dd469348112eedb23b"}}, -{"id":"vash","key":"vash","value":{"rev":"9-85ade8b7249a0e8230e8f0aaf1c34e2a"}}, -{"id":"vbench","key":"vbench","value":{"rev":"3-059528251a566c6ac363e236212448ce"}}, -{"id":"vendor.js","key":"vendor.js","value":{"rev":"5-264b0f8a771cad113be6919b6004ff95"}}, -{"id":"ventstatus","key":"ventstatus","value":{"rev":"3-16aa39e22b149b23b64317991415f92c"}}, -{"id":"version-compare","key":"version-compare","value":{"rev":"3-a8d6eea31572fe973ddd98c0a8097bc6"}}, -{"id":"vertica","key":"vertica","value":{"rev":"37-035d50183c3ad3056db0d7a13c20005d"}}, -{"id":"vhost","key":"vhost","value":{"rev":"9-53bbdba14dae631a49e782d169e4fc5a"}}, -{"id":"vice","key":"vice","value":{"rev":"5-0f74600349f4540b1b104d4ebfec1309"}}, -{"id":"video","key":"video","value":{"rev":"10-65c0b603047188fe2b07cbd2e1c93fe7"}}, -{"id":"vie","key":"vie","value":{"rev":"5-94e23770c5a0510480a0bae07d846ebc"}}, -{"id":"view","key":"view","value":{"rev":"21-a2abdfc54ab732a906347090c68564a5"}}, -{"id":"vigilante","key":"vigilante","value":{"rev":"30-951541a8b2fc2364bb1ccd7cfae56482"}}, -{"id":"villain","key":"villain","value":{"rev":"10-8dbfc5db42230d8813e6cc61af14d575"}}, -{"id":"vine","key":"vine","value":{"rev":"17-e7ac5d190cacf0f2d17d27e37b2b9f5f"}}, -{"id":"vipe","key":"vipe","value":{"rev":"3-78996531221e08292b9ca3de6e19d578"}}, -{"id":"viralheat","key":"viralheat","value":{"rev":"3-b928ce797fd5955c766b6b7e9e9c8f54"}}, -{"id":"viralheat-sentiment","key":"viralheat-sentiment","value":{"rev":"3-5d083e0d141ecf36e06c7c2885b01b5c"}}, -{"id":"virustotal.js","key":"virustotal.js","value":{"rev":"3-074be49f7e877b154a2144ef844f78e9"}}, -{"id":"vk","key":"vk","value":{"rev":"9-48f53ea9ebe68c9d3af45eb601c71006"}}, -{"id":"vmcjs","key":"vmcjs","value":{"rev":"5-44d8dd906fa3530d2bfc2dfee7f498d4"}}, -{"id":"vogue","key":"vogue","value":{"rev":"38-891354d18638a26d5b5ba95933faae0e"}}, -{"id":"vogue-dtrejo","key":"vogue-dtrejo","value":{"rev":"3-3ef8d57d3b5c0aca297fe38c9040954f"}}, -{"id":"votizen-logger","key":"votizen-logger","value":{"rev":"4-ba0837a28693aba346fab885a3a8f315"}}, -{"id":"vows","key":"vows","value":{"rev":"80-43d6a81c184c06d73e692358e913821e"}}, -{"id":"vows-bdd","key":"vows-bdd","value":{"rev":"3-dc2a7013dd94b0b65a3ed3a8b69b680e"}}, -{"id":"vows-ext","key":"vows-ext","value":{"rev":"49-079067a01a681ca7df4dfaae74adb3fb"}}, -{"id":"vows-fluent","key":"vows-fluent","value":{"rev":"23-67625a035cedf90c8fed73722465ecea"}}, -{"id":"vows-is","key":"vows-is","value":{"rev":"68-45a13df422d08ab00cc8f785b6411741"}}, -{"id":"voyeur","key":"voyeur","value":{"rev":"5-56fe23f95df6ff648b67f1a9baf10d41"}}, -{"id":"vws.pubsub","key":"vws.pubsub","value":{"rev":"5-609497d66ab6a76c5201904e41b95715"}}, -{"id":"wabtools","key":"wabtools","value":{"rev":"7-b24cd7262720a29f59da103b7110325d"}}, -{"id":"wadey-ranger","key":"wadey-ranger","value":{"rev":"17-a0541bad0880ffc199e8b2ef4c80ddb8"}}, -{"id":"wagner","key":"wagner","value":{"rev":"3-4b76219928f409b7124e02c0518d6cb6"}}, -{"id":"wait","key":"wait","value":{"rev":"3-7f8a5f9c8e86da4f219353ae778868a9"}}, -{"id":"waiter","key":"waiter","value":{"rev":"5-680176b06719c9a8499725b0a617cdc9"}}, -{"id":"waitlist","key":"waitlist","value":{"rev":"17-f3b2a4cf58b940c3839debda23c12b8e"}}, -{"id":"wake_on_lan","key":"wake_on_lan","value":{"rev":"6-1295bb5c618495b74626aaaa1c644d32"}}, -{"id":"walk","key":"walk","value":{"rev":"22-c05e1e1252a59b1048a0b6464631d08b"}}, -{"id":"walker","key":"walker","value":{"rev":"18-e8a20efc286234fb20789dc68cd04cd1"}}, -{"id":"warp","key":"warp","value":{"rev":"19-c7f17d40291984cd27f1d57fe764a5d2"}}, -{"id":"watch","key":"watch","value":{"rev":"18-3bc43d36ea1dbf69b93d4ea3d9534d44"}}, -{"id":"watch-less","key":"watch-less","value":{"rev":"5-f69a778ee58c681ad3b24a766576c016"}}, -{"id":"watch-tree","key":"watch-tree","value":{"rev":"5-316b60e474c3ae6e97f7cdb06b65af78"}}, -{"id":"watch.js","key":"watch.js","value":{"rev":"11-8c02c7429f90ca5e756a131d85bd5a32"}}, -{"id":"watch_dir","key":"watch_dir","value":{"rev":"5-df0a592508e1e13f5d24c2863733a8b9"}}, -{"id":"watchable","key":"watchable","value":{"rev":"3-f8694ff0c3add9a1310f0980e24ea23b"}}, -{"id":"watchersto","key":"watchersto","value":{"rev":"5-06665e682f58f61831d41d08b4ea12e7"}}, -{"id":"watchman","key":"watchman","value":{"rev":"11-956ad2175d0c5b52e82988a697474244"}}, -{"id":"watchn","key":"watchn","value":{"rev":"15-9685afa8b501f8cd7e068beed1264cfe"}}, -{"id":"wave","key":"wave","value":{"rev":"7-d13054ac592b3b4f81147b6bc7a91ea1"}}, -{"id":"wax","key":"wax","value":{"rev":"71-2e8877b0b6df27c1375dcd7f6bbdb4b7"}}, -{"id":"waz-storage-js","key":"waz-storage-js","value":{"rev":"15-1aaa07353c3d25f5794fa004a23c4dfa"}}, -{"id":"wd","key":"wd","value":{"rev":"19-20c4ee8b83057ece691f9669e288059e"}}, -{"id":"weak","key":"weak","value":{"rev":"3-b774b8be74f33c843df631aa07854104"}}, -{"id":"web","key":"web","value":{"rev":"3-c571dee306020f6f92c7a3150e8023b1"}}, -{"id":"webapp","key":"webapp","value":{"rev":"5-60525be5734cf1d02a77508e5f46bafa"}}, -{"id":"webfonts","key":"webfonts","value":{"rev":"5-d7be242801702fd1eb728385b8982107"}}, -{"id":"webgenjs","key":"webgenjs","value":{"rev":"3-ac6be47eedcbb2561babdb9495d60f29"}}, -{"id":"webgl","key":"webgl","value":{"rev":"18-21cd40f6c7e4943a2d858ed813d3c45d"}}, -{"id":"webhookit-comment","key":"webhookit-comment","value":{"rev":"5-1fbed3d75bf485433bdcac4fac625eab"}}, -{"id":"webhookit-ejs","key":"webhookit-ejs","value":{"rev":"5-9b76f543e9c0941d0245cb3bfd2cc64e"}}, -{"id":"webhookit-email","key":"webhookit-email","value":{"rev":"5-d472fde4f101d55d029a29777bbdb952"}}, -{"id":"webhookit-http","key":"webhookit-http","value":{"rev":"13-9f6f05cdb03f45a2227b9cd820565e63"}}, -{"id":"webhookit-jsonparse","key":"webhookit-jsonparse","value":{"rev":"3-6d49bf8a9849130d9bbc5b0d6fb0bf67"}}, -{"id":"webhookit-jsonpath","key":"webhookit-jsonpath","value":{"rev":"5-7acaf50267274584dca1cc5c1e77ce2e"}}, -{"id":"webhookit-objectbuilder","key":"webhookit-objectbuilder","value":{"rev":"5-e63fb26621929f3ab8d8519556116b30"}}, -{"id":"webhookit-soupselect","key":"webhookit-soupselect","value":{"rev":"9-726f2f4794437632032058bc81e6ee5d"}}, -{"id":"webhookit-xml2js","key":"webhookit-xml2js","value":{"rev":"3-ec959e474ecb3a163f2991767594a60e"}}, -{"id":"webhookit-yql","key":"webhookit-yql","value":{"rev":"9-c6ae87a8cc55d33901485ee7c3895ef8"}}, -{"id":"webify","key":"webify","value":{"rev":"3-86810874abf2274d1387ee748987b627"}}, -{"id":"webjs","key":"webjs","value":{"rev":"103-593a1e4e69d8db6284ecf4fce01b4668"}}, -{"id":"webmake","key":"webmake","value":{"rev":"13-f6588093a487212a151d1c00c26de7b4"}}, -{"id":"webmetrics","key":"webmetrics","value":{"rev":"3-44a428fd2ecb1b1bf50c33157750dd16"}}, -{"id":"webrepl","key":"webrepl","value":{"rev":"21-d6dcdbb59186092d9a0f1977c69394a5"}}, -{"id":"webservice","key":"webservice","value":{"rev":"18-05038f1cf997cff1ed81e783485680aa"}}, -{"id":"webshell","key":"webshell","value":{"rev":"3-05c431cf961a9dbaee1dfd95237e189a"}}, -{"id":"websocket","key":"websocket","value":{"rev":"33-7c20d55a88f187d7b398525824159f67"}}, -{"id":"websocket-client","key":"websocket-client","value":{"rev":"12-26a3530b9e6d465f472c791db01c9fc3"}}, -{"id":"websocket-protocol","key":"websocket-protocol","value":{"rev":"3-e52a8496f70686c289087149aee8b359"}}, -{"id":"websocket-server","key":"websocket-server","value":{"rev":"46-9f69e2f9408eb196b3a1aa990e5b5ac2"}}, -{"id":"websockets","key":"websockets","value":{"rev":"3-5535fcb4ae144909f021ee067eec7b2a"}}, -{"id":"webworker","key":"webworker","value":{"rev":"16-f7a4c758b176c6e464c93b6a9f79283b"}}, -{"id":"weibo","key":"weibo","value":{"rev":"21-8a50310389b2f43d8a7cb14e138eb122"}}, -{"id":"weld","key":"weld","value":{"rev":"7-16601ac41d79b3a01e4d2615035376ed"}}, -{"id":"whatlang","key":"whatlang","value":{"rev":"5-f7b10a0f8c3b6579c81d1d1222aeccd7"}}, -{"id":"wheat","key":"wheat","value":{"rev":"16-f6a97282f521edb7f2b0e5edc9577ce0"}}, -{"id":"which","key":"which","value":{"rev":"7-e5fdcb208715f2201d3911caf8a67042"}}, -{"id":"whiskers","key":"whiskers","value":{"rev":"9-2cfd73cebeaf8ce3cb1591e825380621"}}, -{"id":"whiskey","key":"whiskey","value":{"rev":"49-55367718b9067ff2bcb7fbb89327587b"}}, -{"id":"whisperjs","key":"whisperjs","value":{"rev":"19-e2182c72ea24b8c40e12b0c1027eb60d"}}, -{"id":"wikimapia","key":"wikimapia","value":{"rev":"11-8d1a314e8c827236e21e0aabc6e5efd9"}}, -{"id":"wikiminute","key":"wikiminute","value":{"rev":"11-d031a2c7d41bcecb52ac9c7bb5e75e8e"}}, -{"id":"wikiwym","key":"wikiwym","value":{"rev":"3-c0fd4c9b6b93b3a8b14021c2ebae5b0c"}}, -{"id":"wiky","key":"wiky","value":{"rev":"6-be49acce152652e9219a32da1dfd01ea"}}, -{"id":"wildfile","key":"wildfile","value":{"rev":"9-16a05032f890f07c72a5f48c3a6ffbc0"}}, -{"id":"willful.js","key":"willful.js","value":{"rev":"3-3bb957b0a5fc1b4b6c15bace7e8f5902"}}, -{"id":"wilson","key":"wilson","value":{"rev":"14-d4bf88484f1b1cf86b07f4b74f26991d"}}, -{"id":"window","key":"window","value":{"rev":"3-ea84e74fd5556ff662ff47f40522cfa2"}}, -{"id":"windshaft","key":"windshaft","value":{"rev":"21-1d31e4eb7482d15b97c919a4b051ea9c"}}, -{"id":"windtunnel","key":"windtunnel","value":{"rev":"5-0d2ef7faed1b221a3eaa581480adad64"}}, -{"id":"wingrr","key":"wingrr","value":{"rev":"9-a599fad3e0c74895aa266c61805b76cb"}}, -{"id":"wings","key":"wings","value":{"rev":"3-cfcfd262d905cd3be1d1bae82fafd9f0"}}, -{"id":"winston","key":"winston","value":{"rev":"111-13acba5a9ba6d4f19469acb4122d72ea"}}, -{"id":"winston-amqp","key":"winston-amqp","value":{"rev":"5-61408e1dde45f974a995dd27905b8831"}}, -{"id":"winston-mongodb","key":"winston-mongodb","value":{"rev":"9-ae755237a8faa8f5a0b92029c236691a"}}, -{"id":"winston-redis","key":"winston-redis","value":{"rev":"3-1fb861edc109ed5cbd735320124ba103"}}, -{"id":"winston-riak","key":"winston-riak","value":{"rev":"15-3f2923a73386524d851244ace1bece98"}}, -{"id":"winston-syslog","key":"winston-syslog","value":{"rev":"9-7f256bd63aebec19edea47f80de21dfd"}}, -{"id":"winstoon","key":"winstoon","value":{"rev":"9-d719ca7abfeeaa468d1b431c24836089"}}, -{"id":"wirez","key":"wirez","value":{"rev":"5-5c5d0768485ed11c2b80a8a6a3699c39"}}, -{"id":"wobot","key":"wobot","value":{"rev":"9-176ed86fd9d94a7e94efb782c7512533"}}, -{"id":"word-generator","key":"word-generator","value":{"rev":"5-a2c67f11474a8925eb67f04369ac068a"}}, -{"id":"wordnik","key":"wordnik","value":{"rev":"3-4e371fbf7063ced50bbe726079fda1ec"}}, -{"id":"wordpress-auth","key":"wordpress-auth","value":{"rev":"5-05eef01542e00a88418d2885efb4c9ad"}}, -{"id":"wordwrap","key":"wordwrap","value":{"rev":"5-a728ce2cdeab69b71d40fe7c1c41d7c1"}}, -{"id":"wordy","key":"wordy","value":{"rev":"3-bc220ca3dbd008aee932c551cfbdcc6b"}}, -{"id":"worker","key":"worker","value":{"rev":"6-3b03aa764c9fac66ec5c1773e9abc43b"}}, -{"id":"worker-pool","key":"worker-pool","value":{"rev":"3-e3550e704b48f5799a4cc02af7d27355"}}, -{"id":"workflow","key":"workflow","value":{"rev":"3-817c6c77cbb2f332ea9bdddf3b565c00"}}, -{"id":"workhorse","key":"workhorse","value":{"rev":"30-c39ae2ddd867a137073a289c1709f229"}}, -{"id":"world-db","key":"world-db","value":{"rev":"6-eaef1beb6abbebd3e903a28a7f46aa81"}}, -{"id":"worm","key":"worm","value":{"rev":"7-00db15dc9cfd48777cce32fb93e1df6b"}}, -{"id":"wormhole","key":"wormhole","value":{"rev":"37-21e2db062666040c477a7042fc2ffc9d"}}, -{"id":"wrap","key":"wrap","value":{"rev":"3-aded14c091b730813bd24d92cae45cd6"}}, -{"id":"wrench","key":"wrench","value":{"rev":"12-57d3da63e34e59e1f5d1b3bde471e31f"}}, -{"id":"wsclient","key":"wsclient","value":{"rev":"17-f962faf4f6c9d4eda9111e90b2d0735d"}}, -{"id":"wscomm","key":"wscomm","value":{"rev":"47-80affda45da523e57c87b8d43ef73ec9"}}, -{"id":"wsscraper","key":"wsscraper","value":{"rev":"3-94a84fe9b3df46b8d6ad4851e389dae1"}}, -{"id":"wu","key":"wu","value":{"rev":"4-f307d3a00e7a1212b7949bcb96161088"}}, -{"id":"wunderapi","key":"wunderapi","value":{"rev":"17-31e3b991e97931022992b97f9441b9af"}}, -{"id":"wurfl-client","key":"wurfl-client","value":{"rev":"3-a8c3e454d6d9c9b23b7290eb64866e80"}}, -{"id":"wwwdude","key":"wwwdude","value":{"rev":"19-eb8192461b8864af59740f9b44e168ca"}}, -{"id":"x","key":"x","value":{"rev":"9-10403358980aba239b7a9af78175589d"}}, -{"id":"x-core","key":"x-core","value":{"rev":"13-f04b063855da231539d1945a35802d9e"}}, -{"id":"x11","key":"x11","value":{"rev":"5-e5b1435c0aa29207c90fdeaa87570bb7"}}, -{"id":"xappy-async_testing","key":"xappy-async_testing","value":{"rev":"3-747c934540267492b0e6d3bb6d65964c"}}, -{"id":"xappy-pg","key":"xappy-pg","value":{"rev":"4-119e8f93af1e4976900441ec5e3bb0b9"}}, -{"id":"xcbjs","key":"xcbjs","value":{"rev":"3-095a693f9ac7b4e2c319f79d95eb3e95"}}, -{"id":"xemplar","key":"xemplar","value":{"rev":"9-2ccde68ffac8e66aa8013b98d82ff20c"}}, -{"id":"xfer","key":"xfer","value":{"rev":"3-c1875506ed132c6a2b5e7d7eaff9df14"}}, -{"id":"xjs","key":"xjs","value":{"rev":"11-05d5cd002298894ed582a9f5bff5a762"}}, -{"id":"xjst","key":"xjst","value":{"rev":"11-68774970fc7f413ff620fb0d50d8a1d9"}}, -{"id":"xkcdbot","key":"xkcdbot","value":{"rev":"3-7cc9affb442c9ae4c7a109a0b72c2600"}}, -{"id":"xml","key":"xml","value":{"rev":"12-0d1a69f11767de47bfc4a0fce566e36e"}}, -{"id":"xml-markup","key":"xml-markup","value":{"rev":"6-100a92d1f7fe9444e285365dce8203de"}}, -{"id":"xml-simple","key":"xml-simple","value":{"rev":"3-d60e388df5b65128a5e000381643dd31"}}, -{"id":"xml-stream","key":"xml-stream","value":{"rev":"13-44d6ee47e00c91735e908e69c5dffc6b"}}, -{"id":"xml2js","key":"xml2js","value":{"rev":"27-434297bcd9db7628c57fcc9bbbe2671e"}}, -{"id":"xml2js-expat","key":"xml2js-expat","value":{"rev":"15-a8c5c0ba64584d07ed94c0a14dc55fe8"}}, -{"id":"xml2json","key":"xml2json","value":{"rev":"17-fa740417285834be1aa4d95e1ed6d9b9"}}, -{"id":"xmlbuilder","key":"xmlbuilder","value":{"rev":"32-63e3be32dda07c6e998866cddd8a879e"}}, -{"id":"xmlhttprequest","key":"xmlhttprequest","value":{"rev":"9-570fba8bfd5b0958c258cee7309c4b54"}}, -{"id":"xmlrpc","key":"xmlrpc","value":{"rev":"15-ae062e34a965e7543d4fd7b6c3f29cb7"}}, -{"id":"xmpp-client","key":"xmpp-client","value":{"rev":"6-2d123b4666b5deda71f071295cfca793"}}, -{"id":"xmpp-muc","key":"xmpp-muc","value":{"rev":"6-d95b8bca67f406a281a27aa4d89f6f46"}}, -{"id":"xmpp-server","key":"xmpp-server","value":{"rev":"9-44374bc3398cc74f2a36ff973fa0d35f"}}, -{"id":"xp","key":"xp","value":{"rev":"7-781a5e1da74332f25c441f627cd0b4ea"}}, -{"id":"xregexp","key":"xregexp","value":{"rev":"3-c34025fdeb13c18389e737a4b3d4ddf7"}}, -{"id":"xsd","key":"xsd","value":{"rev":"5-566590ccb8923453175a3f1f3b6cbf24"}}, -{"id":"ya-csv","key":"ya-csv","value":{"rev":"28-d485b812914b3c3f5d7e9c4bcee0c3ea"}}, -{"id":"yabble","key":"yabble","value":{"rev":"5-5370a53003a122fe40a16ed2b0e5cead"}}, -{"id":"yaconfig","key":"yaconfig","value":{"rev":"3-f82a452260b010cc5128818741c46017"}}, -{"id":"yah","key":"yah","value":{"rev":"3-cfc0c10f85a9e3076247ca350077e90f"}}, -{"id":"yajet","key":"yajet","value":{"rev":"5-6f7f24335436c84081adf0bbb020b151"}}, -{"id":"yajl","key":"yajl","value":{"rev":"3-8ac011e5a00368aad8d58d95a64c7254"}}, -{"id":"yaml","key":"yaml","value":{"rev":"16-732e5cb6dc10eefeb7dae959e677fb5b"}}, -{"id":"yaml-config","key":"yaml-config","value":{"rev":"3-fb817000005d48526a106ecda5ac5435"}}, -{"id":"yamlish","key":"yamlish","value":{"rev":"3-604fb4f1de9d5aa5ed48432c7db4a8a1"}}, -{"id":"yamlparser","key":"yamlparser","value":{"rev":"13-130a82262c7f742c2a1e26fc58983503"}}, -{"id":"yammer-js","key":"yammer-js","value":{"rev":"3-16ec240ab0b26fa9f0513ada8c769c1f"}}, -{"id":"yanc","key":"yanc","value":{"rev":"15-33d713f0dee42efe8306e6b2a43fe336"}}, -{"id":"yanlibs","key":"yanlibs","value":{"rev":"3-e481217d43b9f79b80e22538eabadabc"}}, -{"id":"yanop","key":"yanop","value":{"rev":"5-6c407ce6f1c18b6bac37ad5945ff8fed"}}, -{"id":"yanx","key":"yanx","value":{"rev":"6-f4c4d255526eaa922baa498f37d38fe0"}}, -{"id":"yasession","key":"yasession","value":{"rev":"7-6e2598123d41b33535b88e99eb87828f"}}, -{"id":"yelp","key":"yelp","value":{"rev":"3-5c769f488a65addba313ff3b6256c365"}}, -{"id":"yeti","key":"yeti","value":{"rev":"50-65338f573ed8f799ec9b1c9bd2643e34"}}, -{"id":"youtube","key":"youtube","value":{"rev":"7-5020698499af8946e9578864a21f6ac5"}}, -{"id":"youtube-dl","key":"youtube-dl","value":{"rev":"76-a42f09b7bf87e7e6157d5d9835cca8a7"}}, -{"id":"youtube-js","key":"youtube-js","value":{"rev":"5-e2d798a185490ad98cb57c2641c4658e"}}, -{"id":"yproject","key":"yproject","value":{"rev":"7-70cb1624de9e8321c67f1f348dc80ff4"}}, -{"id":"yql","key":"yql","value":{"rev":"18-d19123b254abfb097648c4a242513fd3"}}, -{"id":"yubico","key":"yubico","value":{"rev":"9-0e2bd84479a68e1f12c89800a4049053"}}, -{"id":"yui-cli","key":"yui-cli","value":{"rev":"7-0186f7278da8734861109799b9123197"}}, -{"id":"yui-compressor","key":"yui-compressor","value":{"rev":"12-5804d78bb24bb2d3555ca2e28ecc6b70"}}, -{"id":"yui-repl","key":"yui-repl","value":{"rev":"25-9b202e835a46a07be931e6529a4ccb61"}}, -{"id":"yui3","key":"yui3","value":{"rev":"93-4decc441f19acf0ab5abd1a81e3cbb40"}}, -{"id":"yui3-2in3","key":"yui3-2in3","value":{"rev":"10-dc0429fe818aceeca80d075613c9547a"}}, -{"id":"yui3-bare","key":"yui3-bare","value":{"rev":"33-60779e2088efe782b437ecc053c01e2f"}}, -{"id":"yui3-base","key":"yui3-base","value":{"rev":"33-89017bb5dfde621fc7d179f2939e3d1b"}}, -{"id":"yui3-core","key":"yui3-core","value":{"rev":"17-3759fa0072e24f4bb29e22144cb3dda3"}}, -{"id":"yui3-gallery","key":"yui3-gallery","value":{"rev":"38-9ce6f7a60b2f815337767249d1827951"}}, -{"id":"yui3-mocha","key":"yui3-mocha","value":{"rev":"3-83ff9c42a37f63de0c132ce6cb1ad282"}}, -{"id":"yuitest","key":"yuitest","value":{"rev":"17-b5dd4ad4e82b6b310d7a6e9103570779"}}, -{"id":"zap","key":"zap","value":{"rev":"15-9b9b7c6badb0a9fd9d469934e9be12c0"}}, -{"id":"zappa","key":"zappa","value":{"rev":"26-d193767b488e778db41455924001b1fb"}}, -{"id":"zen","key":"zen","value":{"rev":"7-23a260d4379816a5c931c2e823bda1ae"}}, -{"id":"zeppelin","key":"zeppelin","value":{"rev":"7-9db2e313fe323749e259be91edcdee8e"}}, -{"id":"zeromq","key":"zeromq","value":{"rev":"24-7cb4cec19fb3a03871900ac3558fcbef"}}, -{"id":"zest","key":"zest","value":{"rev":"5-080a2a69a93d66fcaae0da7ddaa9ceab"}}, -{"id":"zest-js","key":"zest-js","value":{"rev":"5-541454063618fa3a9d6f44e0147ea622"}}, -{"id":"zip","key":"zip","value":{"rev":"11-443da314322b6a1a93b40a38124610f2"}}, -{"id":"zipfile","key":"zipfile","value":{"rev":"32-e846d29fc615e8fbc610f44653a1e085"}}, -{"id":"zipper","key":"zipper","value":{"rev":"5-cde0a4a7f03c139dcd779f3ede55bd0e"}}, -{"id":"zippy","key":"zippy","value":{"rev":"7-3906ca62dd8020e9673a7c229944bd3f"}}, -{"id":"zipwith","key":"zipwith","value":{"rev":"3-58c50c6220d6493047f8333c5db22cc9"}}, -{"id":"zlib","key":"zlib","value":{"rev":"27-e0443f2d9a0c9db31f86a6c5b9ba78ba"}}, -{"id":"zlib-sync","key":"zlib-sync","value":{"rev":"3-b17a39dd23b3455d35ffd862004ed677"}}, -{"id":"zlibcontext","key":"zlibcontext","value":{"rev":"11-1c0c6b34e87adab1b6d5ee60be6a608c"}}, -{"id":"zlibstream","key":"zlibstream","value":{"rev":"5-44e30d87de9aaaa975c64d8dcdcd1a94"}}, -{"id":"zmq","key":"zmq","value":{"rev":"7-eae5d939fcdb7be5edfb328aefeaba4e"}}, -{"id":"zo","key":"zo","value":{"rev":"5-956f084373731805e5871f4716049529"}}, -{"id":"zombie","key":"zombie","value":{"rev":"109-9eec325353a47bfcc32a94719bf147da"}}, -{"id":"zombie-https","key":"zombie-https","value":{"rev":"3-6aff25d319be319343882575acef4890"}}, -{"id":"zoneinfo","key":"zoneinfo","value":{"rev":"15-d95d2041324d961fe26a0217cf485511"}}, -{"id":"zookeeper","key":"zookeeper","value":{"rev":"11-5a5ed278a01e4b508ffa6e9a02059898"}}, -{"id":"zoom","key":"zoom","value":{"rev":"3-9d0277ad580d64c9a4d48a40d22976f0"}}, -{"id":"zsock","key":"zsock","value":{"rev":"16-4f975b91f0f9c2d2a2501e362401c368"}}, -{"id":"zutil","key":"zutil","value":{"rev":"9-3e7bc6520008b4fcd5ee6eb9e8e5adf5"}} -]} diff --git a/node_modules/browserify/node_modules/JSONStream/test/fixtures/couch_sample.json b/node_modules/browserify/node_modules/JSONStream/test/fixtures/couch_sample.json deleted file mode 100644 index b154c861..00000000 --- a/node_modules/browserify/node_modules/JSONStream/test/fixtures/couch_sample.json +++ /dev/null @@ -1,18 +0,0 @@ -{"total_rows":129,"offset":0,"rows":[ - { "id":"change1_0.6995461115147918" - , "key":"change1_0.6995461115147918" - , "value":{"rev":"1-e240bae28c7bb3667f02760f6398d508"} - , "doc":{ - "_id": "change1_0.6995461115147918" - , "_rev": "1-e240bae28c7bb3667f02760f6398d508","hello":1} - }, - { "id":"change2_0.6995461115147918" - , "key":"change2_0.6995461115147918" - , "value":{"rev":"1-13677d36b98c0c075145bb8975105153"} - , "doc":{ - "_id":"change2_0.6995461115147918" - , "_rev":"1-13677d36b98c0c075145bb8975105153" - , "hello":2 - } - }, -]} diff --git a/node_modules/browserify/node_modules/JSONStream/test/fixtures/depth.json b/node_modules/browserify/node_modules/JSONStream/test/fixtures/depth.json deleted file mode 100644 index 868062f3..00000000 --- a/node_modules/browserify/node_modules/JSONStream/test/fixtures/depth.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "total": 5, - "docs": [ - { - "key": { - "value": 0, - "some": "property" - } - }, - {"value": 1}, - {"value": 2}, - {"blbl": [{}, {"a":0, "b":1, "value":3}, 10]}, - {"value": 4} - ] -} \ No newline at end of file diff --git a/node_modules/browserify/node_modules/JSONStream/test/fixtures/error.json b/node_modules/browserify/node_modules/JSONStream/test/fixtures/error.json deleted file mode 100644 index 9736f3ec..00000000 --- a/node_modules/browserify/node_modules/JSONStream/test/fixtures/error.json +++ /dev/null @@ -1 +0,0 @@ -{"error": "error_code", "message": "this is an error message"} diff --git a/node_modules/browserify/node_modules/JSONStream/test/fixtures/header_footer.json b/node_modules/browserify/node_modules/JSONStream/test/fixtures/header_footer.json deleted file mode 100644 index 6e4694d2..00000000 --- a/node_modules/browserify/node_modules/JSONStream/test/fixtures/header_footer.json +++ /dev/null @@ -1,19 +0,0 @@ -{"total_rows":129,"offset":0,"rows":[ - { "id":"change1_0.6995461115147918" - , "key":"change1_0.6995461115147918" - , "value":{"rev":"1-e240bae28c7bb3667f02760f6398d508"} - , "doc":{ - "_id": "change1_0.6995461115147918" - , "_rev": "1-e240bae28c7bb3667f02760f6398d508","hello":1} - }, - { "id":"change2_0.6995461115147918" - , "key":"change2_0.6995461115147918" - , "value":{"rev":"1-13677d36b98c0c075145bb8975105153"} - , "doc":{ - "_id":"change2_0.6995461115147918" - , "_rev":"1-13677d36b98c0c075145bb8975105153" - , "hello":2 - } - } -], -"foo": {"bar": "baz"}} diff --git a/node_modules/browserify/node_modules/JSONStream/test/fn.js b/node_modules/browserify/node_modules/JSONStream/test/fn.js deleted file mode 100644 index 4acc6726..00000000 --- a/node_modules/browserify/node_modules/JSONStream/test/fn.js +++ /dev/null @@ -1,39 +0,0 @@ - - -var fs = require ('fs') - , join = require('path').join - , file = join(__dirname, 'fixtures','all_npm.json') - , JSONStream = require('../') - , it = require('it-is') - -function fn (s) { - return !isNaN(parseInt(s, 10)) -} - -var expected = JSON.parse(fs.readFileSync(file)) - , parser = JSONStream.parse(['rows', fn]) - , called = 0 - , ended = false - , parsed = [] - -fs.createReadStream(file).pipe(parser) - -parser.on('data', function (data) { - called ++ - it.has({ - id: it.typeof('string'), - value: {rev: it.typeof('string')}, - key:it.typeof('string') - }) - parsed.push(data) -}) - -parser.on('end', function () { - ended = true -}) - -process.on('exit', function () { - it(called).equal(expected.rows.length) - it(parsed).deepEqual(expected.rows) - console.error('PASSED') -}) diff --git a/node_modules/browserify/node_modules/JSONStream/test/gen.js b/node_modules/browserify/node_modules/JSONStream/test/gen.js deleted file mode 100644 index c233722a..00000000 --- a/node_modules/browserify/node_modules/JSONStream/test/gen.js +++ /dev/null @@ -1,135 +0,0 @@ -return // dont run this test for now since tape is weird and broken on 0.10 - -var fs = require('fs') -var JSONStream = require('../') -var file = process.argv[2] || '/tmp/JSONStream-test-large.json' -var size = Number(process.argv[3] || 100000) -var tape = require('tape') -// if (process.title !== 'browser') { - tape('out of mem', function (t) { - t.plan(1) - ////////////////////////////////////////////////////// - // Produces a random number between arg1 and arg2 - ////////////////////////////////////////////////////// - var randomNumber = function (min, max) { - var number = Math.floor(Math.random() * (max - min + 1) + min); - return number; - }; - - ////////////////////////////////////////////////////// - // Produces a random string of a length between arg1 and arg2 - ////////////////////////////////////////////////////// - var randomString = function (min, max) { - - // add several spaces to increase chanses of creating 'words' - var chars = ' 0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'; - var result = ''; - - var randomLength = randomNumber(min, max); - - for (var i = randomLength; i > 0; --i) { - result += chars[Math.round(Math.random() * (chars.length - 1))]; - } - return result; - }; - - ////////////////////////////////////////////////////// - // Produces a random JSON document, as a string - ////////////////////////////////////////////////////// - var randomJsonDoc = function () { - - var doc = { - "CrashOccurenceID": randomNumber(10000, 50000), - "CrashID": randomNumber(1000, 10000), - "SiteName": randomString(10, 25), - "MachineName": randomString(10, 25), - "Date": randomString(26, 26), - "ProcessDuration": randomString(18, 18), - "ThreadIdentityName": null, - "WindowsIdentityName": randomString(15, 40), - "OperatingSystemName": randomString(35, 65), - "DetailedExceptionInformation": randomString(100, 800) - }; - - doc = JSON.stringify(doc); - doc = doc.replace(/\,/g, ',\n'); // add new lines after each attribute - return doc; - }; - - ////////////////////////////////////////////////////// - // generates test data - ////////////////////////////////////////////////////// - var generateTestData = function (cb) { - - console.log('generating large data file...'); - - var stream = fs.createWriteStream(file, { - encoding: 'utf8' - }); - - var i = 0; - var max = size; - var writing = false - var split = ',\n'; - var doc = randomJsonDoc(); - stream.write('['); - - function write () { - if(writing) return - writing = true - while(++i < max) { - if(Math.random() < 0.001) - console.log('generate..', i + ' / ' + size) - if(!stream.write(doc + split)) { - writing = false - return stream.once('drain', write) - } - } - stream.write(doc + ']') - stream.end(); - console.log('END') - } - write() - stream.on('close', cb) - }; - - ////////////////////////////////////////////////////// - // Shows that parsing 100000 instances using JSONStream fails - // - // After several seconds, you will get this crash - // FATAL ERROR: JS Allocation failed - process out of memory - ////////////////////////////////////////////////////// - var testJSONStreamParse_causesOutOfMem = function (done) { - var items = 0 - console.log('parsing data files using JSONStream...'); - - var parser = JSONStream.parse([true]); - var stream = fs.createReadStream(file); - stream.pipe(parser); - - parser.on('data', function (data) { - items++ - if(Math.random() < 0.01) console.log(items, '...') - }); - - parser.on('end', function () { - t.equal(items, size) - }); - - }; - - ////////////////////////////////////////////////////// - // main - ////////////////////////////////////////////////////// - - fs.stat(file, function (err, stat) { - console.log(stat) - if(err) - generateTestData(testJSONStreamParse_causesOutOfMem); - else - testJSONStreamParse_causesOutOfMem() - }) - - }) - -// } diff --git a/node_modules/browserify/node_modules/JSONStream/test/header_footer.js b/node_modules/browserify/node_modules/JSONStream/test/header_footer.js deleted file mode 100644 index ef018794..00000000 --- a/node_modules/browserify/node_modules/JSONStream/test/header_footer.js +++ /dev/null @@ -1,54 +0,0 @@ - - -var fs = require ('fs') - , join = require('path').join - , file = join(__dirname, 'fixtures','header_footer.json') - , JSONStream = require('../') - , it = require('it-is') - -var expected = JSON.parse(fs.readFileSync(file)) - , parser = JSONStream.parse(['rows', /\d+/ /*, 'value'*/]) - , called = 0 - , headerCalled = 0 - , footerCalled = 0 - , ended = false - , parsed = [] - -fs.createReadStream(file).pipe(parser) - -parser.on('header', function (data) { - headerCalled ++ - it(data).deepEqual({ - total_rows: 129, - offset: 0 - }) -}) - -parser.on('footer', function (data) { - footerCalled ++ - it(data).deepEqual({ - foo: { bar: 'baz' } - }) -}) - -parser.on('data', function (data) { - called ++ - it.has({ - id: it.typeof('string'), - value: {rev: it.typeof('string')}, - key:it.typeof('string') - }) - parsed.push(data) -}) - -parser.on('end', function () { - ended = true -}) - -process.on('exit', function () { - it(called).equal(expected.rows.length) - it(headerCalled).equal(1) - it(footerCalled).equal(1) - it(parsed).deepEqual(expected.rows) - console.error('PASSED') -}) diff --git a/node_modules/browserify/node_modules/JSONStream/test/issues.js b/node_modules/browserify/node_modules/JSONStream/test/issues.js deleted file mode 100644 index ea4c7433..00000000 --- a/node_modules/browserify/node_modules/JSONStream/test/issues.js +++ /dev/null @@ -1,34 +0,0 @@ -var JSONStream = require('../'); -var test = require('tape') - -test('#66', function (t) { - var error = 0; - var stream = JSONStream - .parse() - .on('error', function (err) { - t.ok(err); - error++; - }) - .on('end', function () { - t.ok(error === 1); - t.end(); - }); - - stream.write('["foo":bar['); - stream.end(); - -}); - -test('#81 - failure to parse nested objects', function (t) { - var stream = JSONStream - .parse('.bar.foo') - .on('error', function (err) { - t.error(err); - }) - .on('end', function () { - t.end(); - }); - - stream.write('{"bar":{"foo":"baz"}}'); - stream.end(); -}); diff --git a/node_modules/browserify/node_modules/JSONStream/test/keys.js b/node_modules/browserify/node_modules/JSONStream/test/keys.js deleted file mode 100644 index 747723d1..00000000 --- a/node_modules/browserify/node_modules/JSONStream/test/keys.js +++ /dev/null @@ -1,105 +0,0 @@ -var test = require('tape'); -var fs = require ('fs'); -var join = require('path').join; -var couch_sample_file = join(__dirname, 'fixtures','couch_sample.json'); -var JSONStream = require('../'); - -var fixture = { - obj: { - one: 1, - two: 2, - three: 3 - } -}; - -function assertFixtureKeys(stream, t) { - var keys = []; - var values = []; - stream.on('data', function(data) { - keys.push(data.key); - values.push(data.value); - }); - - stream.on('end', function() { - t.deepEqual(keys, ['one', 'two', 'three']); - t.deepEqual(values, [1,2,3]); - t.end(); - }); - stream.write(JSON.stringify(fixture)); - stream.end(); -} - -test('keys via string', function(t) { - var stream = JSONStream.parse('obj.$*'); - assertFixtureKeys(stream, t); -}); - -test('keys via array', function(t) { - var stream = JSONStream.parse(['obj',{emitKey: true}]); - assertFixtureKeys(stream, t); -}); - -test('path via array', function(t) { - var stream = JSONStream.parse(['obj',{emitPath: true}]); - - var paths = []; - var values = []; - stream.on('data', function(data) { - console.log(JSON.stringify(data)); - paths.push(data.path); - values.push(data.value); - }); - - stream.on('end', function() { - t.deepEqual(paths, [['obj', 'one'], ['obj', 'two'], ['obj', 'three']]); - t.deepEqual(values, [1,2,3]); - t.end(); - }); - stream.write(JSON.stringify(fixture)); - stream.end(); -}); - -test('advanced keys', function(t) { - var advanced = fs.readFileSync(couch_sample_file); - var stream = JSONStream.parse(['rows', true, 'doc', {emitKey: true}]); - - var keys = []; - var values = []; - stream.on('data', function(data) { - keys.push(data.key); - values.push(data.value); - }); - - stream.on('end', function() { - t.deepEqual(keys, [ - '_id', '_rev', 'hello', - '_id', '_rev', 'hello' - ]); - t.deepEqual(values, [ - "change1_0.6995461115147918", "1-e240bae28c7bb3667f02760f6398d508", 1, - "change2_0.6995461115147918", "1-13677d36b98c0c075145bb8975105153", 2 - ]); - t.end(); - }); - stream.write(advanced); - stream.end(); -}); - -test('parent keys', function(t) { - var stream = JSONStream.parse('$*'); - var d = null; - stream.on('data', function(data) { - if(d) t.fail('should only be called once'); - d = data; - }); - - stream.on('end', function() { - t.deepEqual(d,{ - key: 'obj', - value: fixture.obj - }); - t.end(); - }); - stream.write(JSON.stringify(fixture)); - stream.end(); -}) diff --git a/node_modules/browserify/node_modules/JSONStream/test/map.js b/node_modules/browserify/node_modules/JSONStream/test/map.js deleted file mode 100644 index 29b9d896..00000000 --- a/node_modules/browserify/node_modules/JSONStream/test/map.js +++ /dev/null @@ -1,40 +0,0 @@ - -var test = require('tape') - -var JSONStream = require('../') - -test('map function', function (t) { - - var actual = [] - - stream = JSONStream.parse([true], function (e) { return e*10 }) - stream.on('data', function (v) { actual.push(v)}) - stream.on('end', function () { - t.deepEqual(actual, [10,20,30,40,50,60]) - t.end() - - }) - - stream.write(JSON.stringify([1,2,3,4,5,6], null, 2)) - stream.end() - -}) - -test('filter function', function (t) { - - var actual = [] - - stream = JSONStream - .parse([true], function (e) { return e%2 ? e : null}) - .on('data', function (v) { actual.push(v)}) - .on('end', function () { - t.deepEqual(actual, [1,3,5]) - t.end() - - }) - - stream.write(JSON.stringify([1,2,3,4,5,6], null, 2)) - stream.end() - -}) - diff --git a/node_modules/browserify/node_modules/JSONStream/test/multiple_objects.js b/node_modules/browserify/node_modules/JSONStream/test/multiple_objects.js deleted file mode 100644 index 22f63242..00000000 --- a/node_modules/browserify/node_modules/JSONStream/test/multiple_objects.js +++ /dev/null @@ -1,36 +0,0 @@ -var fs = require ('fs'); -var net = require('net'); -var join = require('path').join; -var file = join(__dirname, 'fixtures','all_npm.json'); -var it = require('it-is'); -var JSONStream = require('../'); - -var str = fs.readFileSync(file); - -var datas = {} - -var server = net.createServer(function(client) { - var data_calls = 0; - var parser = JSONStream.parse(['rows', true, 'key']); - parser.on('data', function(data) { - ++ data_calls; - datas[data] = (datas[data] || 0) + 1 - it(data).typeof('string') - }); - - parser.on('end', function() { - console.log('END') - var min = Infinity - for (var d in datas) - min = min > datas[d] ? datas[d] : min - it(min).equal(3); - server.close(); - }); - client.pipe(parser); -}); -server.listen(9999); - -var client = net.connect({ port : 9999 }, function() { - var msgs = str + ' ' + str + '\n\n' + str - client.end(msgs); -}); diff --git a/node_modules/browserify/node_modules/JSONStream/test/multiple_objects_error.js b/node_modules/browserify/node_modules/JSONStream/test/multiple_objects_error.js deleted file mode 100644 index 83d113b7..00000000 --- a/node_modules/browserify/node_modules/JSONStream/test/multiple_objects_error.js +++ /dev/null @@ -1,29 +0,0 @@ -var fs = require ('fs'); -var net = require('net'); -var join = require('path').join; -var file = join(__dirname, 'fixtures','all_npm.json'); -var it = require('it-is'); -var JSONStream = require('../'); - -var str = fs.readFileSync(file); - -var server = net.createServer(function(client) { - var data_calls = 0; - var parser = JSONStream.parse(); - parser.on('error', function(err) { - console.log(err); - server.close(); - }); - - parser.on('end', function() { - console.log('END'); - server.close(); - }); - client.pipe(parser); -}); -server.listen(9999); - -var client = net.connect({ port : 9999 }, function() { - var msgs = str + '}'; - client.end(msgs); -}); diff --git a/node_modules/browserify/node_modules/JSONStream/test/null.js b/node_modules/browserify/node_modules/JSONStream/test/null.js deleted file mode 100644 index 95dd60c0..00000000 --- a/node_modules/browserify/node_modules/JSONStream/test/null.js +++ /dev/null @@ -1,28 +0,0 @@ -var JSONStream = require('../') - -var data = [ - {ID: 1, optional: null}, - {ID: 2, optional: null}, - {ID: 3, optional: 20}, - {ID: 4, optional: null}, - {ID: 5, optional: 'hello'}, - {ID: 6, optional: null} -] - - -var test = require('tape') - -test ('null properties', function (t) { - var actual = [] - var stream = - - JSONStream.parse('*.optional') - .on('data', function (v) { actual.push(v) }) - .on('end', function () { - t.deepEqual(actual, [20, 'hello']) - t.end() - }) - - stream.write(JSON.stringify(data, null, 2)) - stream.end() -}) diff --git a/node_modules/browserify/node_modules/JSONStream/test/parsejson.js b/node_modules/browserify/node_modules/JSONStream/test/parsejson.js deleted file mode 100644 index a9433344..00000000 --- a/node_modules/browserify/node_modules/JSONStream/test/parsejson.js +++ /dev/null @@ -1,25 +0,0 @@ - - -/* - sometimes jsonparse changes numbers slightly. -*/ - -var r = Math.random() - , Parser = require('jsonparse') - , p = new Parser() - , assert = require('assert') - , times = 20 -while (times --) { - - assert.equal(JSON.parse(JSON.stringify(r)), r, 'core JSON') - - p.onValue = function (v) { - console.error('parsed', v) - assert.equal(v,r) - } - console.error('correct', r) - p.write (new Buffer(JSON.stringify([r]))) - - - -} diff --git a/node_modules/browserify/node_modules/JSONStream/test/stringify.js b/node_modules/browserify/node_modules/JSONStream/test/stringify.js deleted file mode 100644 index b6de85ed..00000000 --- a/node_modules/browserify/node_modules/JSONStream/test/stringify.js +++ /dev/null @@ -1,41 +0,0 @@ - -var fs = require ('fs') - , join = require('path').join - , file = join(__dirname, 'fixtures','all_npm.json') - , JSONStream = require('../') - , it = require('it-is').style('colour') - - function randomObj () { - return ( - Math.random () < 0.4 - ? {hello: 'eonuhckmqjk', - whatever: 236515, - lies: true, - nothing: [null], - stuff: [Math.random(),Math.random(),Math.random()] - } - : ['AOREC', 'reoubaor', {ouec: 62642}, [[[], {}, 53]]] - ) - } - -var expected = [] - , stringify = JSONStream.stringify() - , es = require('event-stream') - , stringified = '' - , called = 0 - , count = 10 - , ended = false - -while (count --) - expected.push(randomObj()) - - es.connect( - es.readArray(expected), - stringify, - //JSONStream.parse([/./]), - es.writeArray(function (err, lines) { - - it(JSON.parse(lines.join(''))).deepEqual(expected) - console.error('PASSED') - }) - ) diff --git a/node_modules/browserify/node_modules/JSONStream/test/stringify_object.js b/node_modules/browserify/node_modules/JSONStream/test/stringify_object.js deleted file mode 100644 index 9490115a..00000000 --- a/node_modules/browserify/node_modules/JSONStream/test/stringify_object.js +++ /dev/null @@ -1,47 +0,0 @@ - -var fs = require ('fs') - , join = require('path').join - , file = join(__dirname, 'fixtures','all_npm.json') - , JSONStream = require('../') - , it = require('it-is').style('colour') - , es = require('event-stream') - , pending = 10 - , passed = true - - function randomObj () { - return ( - Math.random () < 0.4 - ? {hello: 'eonuhckmqjk', - whatever: 236515, - lies: true, - nothing: [null], - stuff: [Math.random(),Math.random(),Math.random()] - } - : ['AOREC', 'reoubaor', {ouec: 62642}, [[[], {}, 53]]] - ) - } - -for (var ix = 0; ix < pending; ix++) (function (count) { - var expected = {} - , stringify = JSONStream.stringifyObject() - - es.connect( - stringify, - es.writeArray(function (err, lines) { - it(JSON.parse(lines.join(''))).deepEqual(expected) - if (--pending === 0) { - console.error('PASSED') - } - }) - ) - - while (count --) { - var key = Math.random().toString(16).slice(2) - expected[key] = randomObj() - stringify.write([ key, expected[key] ]) - } - - process.nextTick(function () { - stringify.end() - }) -})(ix) diff --git a/node_modules/browserify/node_modules/JSONStream/test/test.js b/node_modules/browserify/node_modules/JSONStream/test/test.js deleted file mode 100644 index 8ea7c2e1..00000000 --- a/node_modules/browserify/node_modules/JSONStream/test/test.js +++ /dev/null @@ -1,35 +0,0 @@ - - -var fs = require ('fs') - , join = require('path').join - , file = join(__dirname, 'fixtures','all_npm.json') - , JSONStream = require('../') - , it = require('it-is') - -var expected = JSON.parse(fs.readFileSync(file)) - , parser = JSONStream.parse(['rows', /\d+/ /*, 'value'*/]) - , called = 0 - , ended = false - , parsed = [] - -fs.createReadStream(file).pipe(parser) - -parser.on('data', function (data) { - called ++ - it.has({ - id: it.typeof('string'), - value: {rev: it.typeof('string')}, - key:it.typeof('string') - }) - parsed.push(data) -}) - -parser.on('end', function () { - ended = true -}) - -process.on('exit', function () { - it(called).equal(expected.rows.length) - it(parsed).deepEqual(expected.rows) - console.error('PASSED') -}) diff --git a/node_modules/browserify/node_modules/JSONStream/test/test2.js b/node_modules/browserify/node_modules/JSONStream/test/test2.js deleted file mode 100644 index d09df7be..00000000 --- a/node_modules/browserify/node_modules/JSONStream/test/test2.js +++ /dev/null @@ -1,29 +0,0 @@ - - -var fs = require ('fs') - , join = require('path').join - , file = join(__dirname, '..','package.json') - , JSONStream = require('../') - , it = require('it-is') - -var expected = JSON.parse(fs.readFileSync(file)) - , parser = JSONStream.parse([]) - , called = 0 - , ended = false - , parsed = [] - -fs.createReadStream(file).pipe(parser) - -parser.on('data', function (data) { - called ++ - it(data).deepEqual(expected) -}) - -parser.on('end', function () { - ended = true -}) - -process.on('exit', function () { - it(called).equal(1) - console.error('PASSED') -}) \ No newline at end of file diff --git a/node_modules/browserify/node_modules/JSONStream/test/two-ways.js b/node_modules/browserify/node_modules/JSONStream/test/two-ways.js deleted file mode 100644 index 8f3b89c8..00000000 --- a/node_modules/browserify/node_modules/JSONStream/test/two-ways.js +++ /dev/null @@ -1,41 +0,0 @@ - -var fs = require ('fs') - , join = require('path').join - , file = join(__dirname, 'fixtures','all_npm.json') - , JSONStream = require('../') - , it = require('it-is').style('colour') - - function randomObj () { - return ( - Math.random () < 0.4 - ? {hello: 'eonuhckmqjk', - whatever: 236515, - lies: true, - nothing: [null], -// stuff: [Math.random(),Math.random(),Math.random()] - } - : ['AOREC', 'reoubaor', {ouec: 62642}, [[[], {}, 53]]] - ) - } - -var expected = [] - , stringify = JSONStream.stringify() - , es = require('event-stream') - , stringified = '' - , called = 0 - , count = 10 - , ended = false - -while (count --) - expected.push(randomObj()) - - es.connect( - es.readArray(expected), - stringify, - JSONStream.parse([/./]), - es.writeArray(function (err, lines) { - - it(lines).has(expected) - console.error('PASSED') - }) - ) diff --git a/node_modules/browserify/node_modules/assert/.npmignore b/node_modules/browserify/node_modules/assert/.npmignore deleted file mode 100644 index 3c3629e6..00000000 --- a/node_modules/browserify/node_modules/assert/.npmignore +++ /dev/null @@ -1 +0,0 @@ -node_modules diff --git a/node_modules/browserify/node_modules/assert/.travis.yml b/node_modules/browserify/node_modules/assert/.travis.yml deleted file mode 100644 index b5f7f833..00000000 --- a/node_modules/browserify/node_modules/assert/.travis.yml +++ /dev/null @@ -1,7 +0,0 @@ -language: node_js -node_js: -- '0.10' -env: - global: - - secure: qThuKBZQtkooAvzaYldECGNqvKGPRTnXx62IVyhSbFlsCY1VCmjhLldhyPDiZQ3JqL1XvSkK8OMDupiHqZnNE0nGijoO4M/kaEdjBB+jpjg3f8I6te2SNU935SbkfY9KHAaFXMZwdcq7Fk932AxWEu+FMSDM+080wNKpEATXDe4= - - secure: O/scKjHLRcPN5ILV5qsSkksQ7qcZQdHWEUUPItmj/4+vmCc28bHpicoUxXG5A96iHvkBbdmky/nGCg464ZaNLk68m6hfEMDAR3J6mhM2Pf5C4QI/LlFlR1fob9sQ8lztwSGOItwdK8Rfrgb30RRVV71f6FxnaJ6PKMuMNT5S1AQ= diff --git a/node_modules/browserify/node_modules/assert/.zuul.yml b/node_modules/browserify/node_modules/assert/.zuul.yml deleted file mode 100644 index eeb13867..00000000 --- a/node_modules/browserify/node_modules/assert/.zuul.yml +++ /dev/null @@ -1,10 +0,0 @@ -ui: mocha-qunit -browsers: - - name: chrome - version: latest - - name: firefox - version: latest - - name: safari - version: latest - - name: ie - version: 9..latest diff --git a/node_modules/browserify/node_modules/assert/LICENSE b/node_modules/browserify/node_modules/assert/LICENSE deleted file mode 100644 index e3d4e695..00000000 --- a/node_modules/browserify/node_modules/assert/LICENSE +++ /dev/null @@ -1,18 +0,0 @@ -Copyright Joyent, Inc. and other Node contributors. All rights reserved. -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to -deal in the Software without restriction, including without limitation the -rights to use, copy, modify, merge, publish, distribute, sublicense, and/or -sell copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS -IN THE SOFTWARE. diff --git a/node_modules/browserify/node_modules/assert/README.md b/node_modules/browserify/node_modules/assert/README.md deleted file mode 100644 index 6d252ab5..00000000 --- a/node_modules/browserify/node_modules/assert/README.md +++ /dev/null @@ -1,64 +0,0 @@ -# assert - -[![Build Status](https://travis-ci.org/defunctzombie/commonjs-assert.svg?branch=master)](https://travis-ci.org/defunctzombie/commonjs-assert) - -This module is used for writing unit tests for your applications, you can access it with require('assert'). - -The API is derived from the [commonjs 1.0 unit testing](http://wiki.commonjs.org/wiki/Unit_Testing/1.0) spec and the [node.js assert module](http://nodejs.org/api/assert.html) - -## assert.fail(actual, expected, message, operator) -Throws an exception that displays the values for actual and expected separated by the provided operator. - -## assert(value, message), assert.ok(value, [message]) -Tests if value is truthy, it is equivalent to assert.equal(true, !!value, message); - -## assert.equal(actual, expected, [message]) -Tests shallow, coercive equality with the equal comparison operator ( == ). - -## assert.notEqual(actual, expected, [message]) -Tests shallow, coercive non-equality with the not equal comparison operator ( != ). - -## assert.deepEqual(actual, expected, [message]) -Tests for deep equality. - -## assert.notDeepEqual(actual, expected, [message]) -Tests for any deep inequality. - -## assert.strictEqual(actual, expected, [message]) -Tests strict equality, as determined by the strict equality operator ( === ) - -## assert.notStrictEqual(actual, expected, [message]) -Tests strict non-equality, as determined by the strict not equal operator ( !== ) - -## assert.throws(block, [error], [message]) -Expects block to throw an error. error can be constructor, regexp or validation function. - -Validate instanceof using constructor: - -```javascript -assert.throws(function() { throw new Error("Wrong value"); }, Error); -``` - -Validate error message using RegExp: - -```javascript -assert.throws(function() { throw new Error("Wrong value"); }, /value/); -``` - -Custom error validation: - -```javascript -assert.throws(function() { - throw new Error("Wrong value"); -}, function(err) { - if ( (err instanceof Error) && /value/.test(err) ) { - return true; - } -}, "unexpected error"); -``` - -## assert.doesNotThrow(block, [message]) -Expects block not to throw an error, see assert.throws for details. - -## assert.ifError(value) -Tests if value is not a false value, throws if it is a true value. Useful when testing the first argument, error in callbacks. diff --git a/node_modules/browserify/node_modules/assert/assert.js b/node_modules/browserify/node_modules/assert/assert.js deleted file mode 100644 index 59d89852..00000000 --- a/node_modules/browserify/node_modules/assert/assert.js +++ /dev/null @@ -1,359 +0,0 @@ -// http://wiki.commonjs.org/wiki/Unit_Testing/1.0 -// -// THIS IS NOT TESTED NOR LIKELY TO WORK OUTSIDE V8! -// -// Originally from narwhal.js (http://narwhaljs.org) -// Copyright (c) 2009 Thomas Robinson <280north.com> -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the 'Software'), to -// deal in the Software without restriction, including without limitation the -// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or -// sell copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS 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. - -// when used in node, this will actually load the util module we depend on -// versus loading the builtin util module as happens otherwise -// this is a bug in node module loading as far as I am concerned -var util = require('util/'); - -var pSlice = Array.prototype.slice; -var hasOwn = Object.prototype.hasOwnProperty; - -// 1. The assert module provides functions that throw -// AssertionError's when particular conditions are not met. The -// assert module must conform to the following interface. - -var assert = module.exports = ok; - -// 2. The AssertionError is defined in assert. -// new assert.AssertionError({ message: message, -// actual: actual, -// expected: expected }) - -assert.AssertionError = function AssertionError(options) { - this.name = 'AssertionError'; - this.actual = options.actual; - this.expected = options.expected; - this.operator = options.operator; - if (options.message) { - this.message = options.message; - this.generatedMessage = false; - } else { - this.message = getMessage(this); - this.generatedMessage = true; - } - var stackStartFunction = options.stackStartFunction || fail; - - if (Error.captureStackTrace) { - Error.captureStackTrace(this, stackStartFunction); - } - else { - // non v8 browsers so we can have a stacktrace - var err = new Error(); - if (err.stack) { - var out = err.stack; - - // try to strip useless frames - var fn_name = stackStartFunction.name; - var idx = out.indexOf('\n' + fn_name); - if (idx >= 0) { - // once we have located the function frame - // we need to strip out everything before it (and its line) - var next_line = out.indexOf('\n', idx + 1); - out = out.substring(next_line + 1); - } - - this.stack = out; - } - } -}; - -// assert.AssertionError instanceof Error -util.inherits(assert.AssertionError, Error); - -function replacer(key, value) { - if (util.isUndefined(value)) { - return '' + value; - } - if (util.isNumber(value) && !isFinite(value)) { - return value.toString(); - } - if (util.isFunction(value) || util.isRegExp(value)) { - return value.toString(); - } - return value; -} - -function truncate(s, n) { - if (util.isString(s)) { - return s.length < n ? s : s.slice(0, n); - } else { - return s; - } -} - -function getMessage(self) { - return truncate(JSON.stringify(self.actual, replacer), 128) + ' ' + - self.operator + ' ' + - truncate(JSON.stringify(self.expected, replacer), 128); -} - -// At present only the three keys mentioned above are used and -// understood by the spec. Implementations or sub modules can pass -// other keys to the AssertionError's constructor - they will be -// ignored. - -// 3. All of the following functions must throw an AssertionError -// when a corresponding condition is not met, with a message that -// may be undefined if not provided. All assertion methods provide -// both the actual and expected values to the assertion error for -// display purposes. - -function fail(actual, expected, message, operator, stackStartFunction) { - throw new assert.AssertionError({ - message: message, - actual: actual, - expected: expected, - operator: operator, - stackStartFunction: stackStartFunction - }); -} - -// EXTENSION! allows for well behaved errors defined elsewhere. -assert.fail = fail; - -// 4. Pure assertion tests whether a value is truthy, as determined -// by !!guard. -// assert.ok(guard, message_opt); -// This statement is equivalent to assert.equal(true, !!guard, -// message_opt);. To test strictly for the value true, use -// assert.strictEqual(true, guard, message_opt);. - -function ok(value, message) { - if (!value) fail(value, true, message, '==', assert.ok); -} -assert.ok = ok; - -// 5. The equality assertion tests shallow, coercive equality with -// ==. -// assert.equal(actual, expected, message_opt); - -assert.equal = function equal(actual, expected, message) { - if (actual != expected) fail(actual, expected, message, '==', assert.equal); -}; - -// 6. The non-equality assertion tests for whether two objects are not equal -// with != assert.notEqual(actual, expected, message_opt); - -assert.notEqual = function notEqual(actual, expected, message) { - if (actual == expected) { - fail(actual, expected, message, '!=', assert.notEqual); - } -}; - -// 7. The equivalence assertion tests a deep equality relation. -// assert.deepEqual(actual, expected, message_opt); - -assert.deepEqual = function deepEqual(actual, expected, message) { - if (!_deepEqual(actual, expected)) { - fail(actual, expected, message, 'deepEqual', assert.deepEqual); - } -}; - -function _deepEqual(actual, expected) { - // 7.1. All identical values are equivalent, as determined by ===. - if (actual === expected) { - return true; - - } else if (util.isBuffer(actual) && util.isBuffer(expected)) { - if (actual.length != expected.length) return false; - - for (var i = 0; i < actual.length; i++) { - if (actual[i] !== expected[i]) return false; - } - - return true; - - // 7.2. If the expected value is a Date object, the actual value is - // equivalent if it is also a Date object that refers to the same time. - } else if (util.isDate(actual) && util.isDate(expected)) { - return actual.getTime() === expected.getTime(); - - // 7.3 If the expected value is a RegExp object, the actual value is - // equivalent if it is also a RegExp object with the same source and - // properties (`global`, `multiline`, `lastIndex`, `ignoreCase`). - } else if (util.isRegExp(actual) && util.isRegExp(expected)) { - return actual.source === expected.source && - actual.global === expected.global && - actual.multiline === expected.multiline && - actual.lastIndex === expected.lastIndex && - actual.ignoreCase === expected.ignoreCase; - - // 7.4. Other pairs that do not both pass typeof value == 'object', - // equivalence is determined by ==. - } else if (!util.isObject(actual) && !util.isObject(expected)) { - return actual == expected; - - // 7.5 For all other Object pairs, including Array objects, equivalence is - // determined by having the same number of owned properties (as verified - // with Object.prototype.hasOwnProperty.call), the same set of keys - // (although not necessarily the same order), equivalent values for every - // corresponding key, and an identical 'prototype' property. Note: this - // accounts for both named and indexed properties on Arrays. - } else { - return objEquiv(actual, expected); - } -} - -function isArguments(object) { - return Object.prototype.toString.call(object) == '[object Arguments]'; -} - -function objEquiv(a, b) { - if (util.isNullOrUndefined(a) || util.isNullOrUndefined(b)) - return false; - // an identical 'prototype' property. - if (a.prototype !== b.prototype) return false; - // if one is a primitive, the other must be same - if (util.isPrimitive(a) || util.isPrimitive(b)) { - return a === b; - } - var aIsArgs = isArguments(a), - bIsArgs = isArguments(b); - if ((aIsArgs && !bIsArgs) || (!aIsArgs && bIsArgs)) - return false; - if (aIsArgs) { - a = pSlice.call(a); - b = pSlice.call(b); - return _deepEqual(a, b); - } - var ka = objectKeys(a), - kb = objectKeys(b), - key, i; - // having the same number of owned properties (keys incorporates - // hasOwnProperty) - if (ka.length != kb.length) - return false; - //the same set of keys (although not necessarily the same order), - ka.sort(); - kb.sort(); - //~~~cheap key test - for (i = ka.length - 1; i >= 0; i--) { - if (ka[i] != kb[i]) - return false; - } - //equivalent values for every corresponding key, and - //~~~possibly expensive deep test - for (i = ka.length - 1; i >= 0; i--) { - key = ka[i]; - if (!_deepEqual(a[key], b[key])) return false; - } - return true; -} - -// 8. The non-equivalence assertion tests for any deep inequality. -// assert.notDeepEqual(actual, expected, message_opt); - -assert.notDeepEqual = function notDeepEqual(actual, expected, message) { - if (_deepEqual(actual, expected)) { - fail(actual, expected, message, 'notDeepEqual', assert.notDeepEqual); - } -}; - -// 9. The strict equality assertion tests strict equality, as determined by ===. -// assert.strictEqual(actual, expected, message_opt); - -assert.strictEqual = function strictEqual(actual, expected, message) { - if (actual !== expected) { - fail(actual, expected, message, '===', assert.strictEqual); - } -}; - -// 10. The strict non-equality assertion tests for strict inequality, as -// determined by !==. assert.notStrictEqual(actual, expected, message_opt); - -assert.notStrictEqual = function notStrictEqual(actual, expected, message) { - if (actual === expected) { - fail(actual, expected, message, '!==', assert.notStrictEqual); - } -}; - -function expectedException(actual, expected) { - if (!actual || !expected) { - return false; - } - - if (Object.prototype.toString.call(expected) == '[object RegExp]') { - return expected.test(actual); - } else if (actual instanceof expected) { - return true; - } else if (expected.call({}, actual) === true) { - return true; - } - - return false; -} - -function _throws(shouldThrow, block, expected, message) { - var actual; - - if (util.isString(expected)) { - message = expected; - expected = null; - } - - try { - block(); - } catch (e) { - actual = e; - } - - message = (expected && expected.name ? ' (' + expected.name + ').' : '.') + - (message ? ' ' + message : '.'); - - if (shouldThrow && !actual) { - fail(actual, expected, 'Missing expected exception' + message); - } - - if (!shouldThrow && expectedException(actual, expected)) { - fail(actual, expected, 'Got unwanted exception' + message); - } - - if ((shouldThrow && actual && expected && - !expectedException(actual, expected)) || (!shouldThrow && actual)) { - throw actual; - } -} - -// 11. Expected to throw an error: -// assert.throws(block, Error_opt, message_opt); - -assert.throws = function(block, /*optional*/error, /*optional*/message) { - _throws.apply(this, [true].concat(pSlice.call(arguments))); -}; - -// EXTENSION! This is annoying to write outside this module. -assert.doesNotThrow = function(block, /*optional*/message) { - _throws.apply(this, [false].concat(pSlice.call(arguments))); -}; - -assert.ifError = function(err) { if (err) {throw err;}}; - -var objectKeys = Object.keys || function (obj) { - var keys = []; - for (var key in obj) { - if (hasOwn.call(obj, key)) keys.push(key); - } - return keys; -}; diff --git a/node_modules/browserify/node_modules/assert/package.json b/node_modules/browserify/node_modules/assert/package.json deleted file mode 100644 index f5d5ff98..00000000 --- a/node_modules/browserify/node_modules/assert/package.json +++ /dev/null @@ -1,55 +0,0 @@ -{ - "name": "assert", - "description": "commonjs assert - node.js api compatible", - "keywords": [ - "assert" - ], - "version": "1.3.0", - "homepage": "https://github.com/defunctzombie/commonjs-assert", - "repository": { - "type": "git", - "url": "git://github.com/defunctzombie/commonjs-assert.git" - }, - "main": "./assert.js", - "dependencies": { - "util": "0.10.3" - }, - "devDependencies": { - "zuul": "~1.10.2", - "mocha": "~1.21.4" - }, - "license": "MIT", - "scripts": { - "test": "mocha --ui qunit test.js && zuul -- test.js" - }, - "gitHead": "cc3c9020e9ca440bdc431f92570d676dd8a89a3c", - "bugs": { - "url": "https://github.com/defunctzombie/commonjs-assert/issues" - }, - "_id": "assert@1.3.0", - "_shasum": "03939a622582a812cc202320a0b9a56c9b815849", - "_from": "assert@>=1.3.0 <1.4.0", - "_npmVersion": "2.1.12", - "_nodeVersion": "0.10.33", - "_npmUser": { - "name": "shtylman", - "email": "shtylman@gmail.com" - }, - "maintainers": [ - { - "name": "coolaj86", - "email": "coolaj86@gmail.com" - }, - { - "name": "shtylman", - "email": "shtylman@gmail.com" - } - ], - "dist": { - "shasum": "03939a622582a812cc202320a0b9a56c9b815849", - "tarball": "https://registry.npmjs.org/assert/-/assert-1.3.0.tgz" - }, - "directories": {}, - "_resolved": "https://registry.npmjs.org/assert/-/assert-1.3.0.tgz", - "readme": "ERROR: No README data found!" -} diff --git a/node_modules/browserify/node_modules/assert/test.js b/node_modules/browserify/node_modules/assert/test.js deleted file mode 100644 index 981e7a88..00000000 --- a/node_modules/browserify/node_modules/assert/test.js +++ /dev/null @@ -1,343 +0,0 @@ -// Copyright Joyent, Inc. and other Node contributors. -// -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to permit -// persons to whom the Software is furnished to do so, subject to the -// following conditions: -// -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -// USE OR OTHER DEALINGS IN THE SOFTWARE. - -var assert = require('./'); - -var keys = Object.keys; - -function makeBlock(f) { - var args = Array.prototype.slice.call(arguments, 1); - return function() { - return f.apply(this, args); - }; -} - -test('assert.ok', function () { - assert.throws(makeBlock(assert, false), assert.AssertionError, 'ok(false)'); - - assert.doesNotThrow(makeBlock(assert, true), assert.AssertionError, 'ok(true)'); - - assert.doesNotThrow(makeBlock(assert, 'test', 'ok(\'test\')')); - - assert.throws(makeBlock(assert.ok, false), - assert.AssertionError, 'ok(false)'); - - assert.doesNotThrow(makeBlock(assert.ok, true), - assert.AssertionError, 'ok(true)'); - - assert.doesNotThrow(makeBlock(assert.ok, 'test'), 'ok(\'test\')'); -}); - -test('assert.equal', function () { - assert.throws(makeBlock(assert.equal, true, false), assert.AssertionError, 'equal'); - - assert.doesNotThrow(makeBlock(assert.equal, null, null), 'equal'); - - assert.doesNotThrow(makeBlock(assert.equal, undefined, undefined), 'equal'); - - assert.doesNotThrow(makeBlock(assert.equal, null, undefined), 'equal'); - - assert.doesNotThrow(makeBlock(assert.equal, true, true), 'equal'); - - assert.doesNotThrow(makeBlock(assert.equal, 2, '2'), 'equal'); - - assert.doesNotThrow(makeBlock(assert.notEqual, true, false), 'notEqual'); - - assert.throws(makeBlock(assert.notEqual, true, true), - assert.AssertionError, 'notEqual'); -}); - -test('assert.strictEqual', function () { - assert.throws(makeBlock(assert.strictEqual, 2, '2'), - assert.AssertionError, 'strictEqual'); - - assert.throws(makeBlock(assert.strictEqual, null, undefined), - assert.AssertionError, 'strictEqual'); - - assert.doesNotThrow(makeBlock(assert.notStrictEqual, 2, '2'), 'notStrictEqual'); -}); - -test('assert.deepEqual - 7.2', function () { - assert.doesNotThrow(makeBlock(assert.deepEqual, new Date(2000, 3, 14), - new Date(2000, 3, 14)), 'deepEqual date'); - - assert.throws(makeBlock(assert.deepEqual, new Date(), new Date(2000, 3, 14)), - assert.AssertionError, - 'deepEqual date'); -}); - -test('assert.deepEqual - 7.3', function () { - assert.doesNotThrow(makeBlock(assert.deepEqual, /a/, /a/)); - assert.doesNotThrow(makeBlock(assert.deepEqual, /a/g, /a/g)); - assert.doesNotThrow(makeBlock(assert.deepEqual, /a/i, /a/i)); - assert.doesNotThrow(makeBlock(assert.deepEqual, /a/m, /a/m)); - assert.doesNotThrow(makeBlock(assert.deepEqual, /a/igm, /a/igm)); - assert.throws(makeBlock(assert.deepEqual, /ab/, /a/)); - assert.throws(makeBlock(assert.deepEqual, /a/g, /a/)); - assert.throws(makeBlock(assert.deepEqual, /a/i, /a/)); - assert.throws(makeBlock(assert.deepEqual, /a/m, /a/)); - assert.throws(makeBlock(assert.deepEqual, /a/igm, /a/im)); - - var re1 = /a/; - re1.lastIndex = 3; - assert.throws(makeBlock(assert.deepEqual, re1, /a/)); -}); - -test('assert.deepEqual - 7.4', function () { - assert.doesNotThrow(makeBlock(assert.deepEqual, 4, '4'), 'deepEqual == check'); - assert.doesNotThrow(makeBlock(assert.deepEqual, true, 1), 'deepEqual == check'); - assert.throws(makeBlock(assert.deepEqual, 4, '5'), - assert.AssertionError, - 'deepEqual == check'); -}); - -test('assert.deepEqual - 7.5', function () { - // having the same number of owned properties && the same set of keys - assert.doesNotThrow(makeBlock(assert.deepEqual, {a: 4}, {a: 4})); - assert.doesNotThrow(makeBlock(assert.deepEqual, {a: 4, b: '2'}, {a: 4, b: '2'})); - assert.doesNotThrow(makeBlock(assert.deepEqual, [4], ['4'])); - assert.throws(makeBlock(assert.deepEqual, {a: 4}, {a: 4, b: true}), - assert.AssertionError); - assert.doesNotThrow(makeBlock(assert.deepEqual, ['a'], {0: 'a'})); - //(although not necessarily the same order), - assert.doesNotThrow(makeBlock(assert.deepEqual, {a: 4, b: '1'}, {b: '1', a: 4})); - var a1 = [1, 2, 3]; - var a2 = [1, 2, 3]; - a1.a = 'test'; - a1.b = true; - a2.b = true; - a2.a = 'test'; - assert.throws(makeBlock(assert.deepEqual, keys(a1), keys(a2)), - assert.AssertionError); - assert.doesNotThrow(makeBlock(assert.deepEqual, a1, a2)); -}); - -test('assert.deepEqual - instances', function () { - // having an identical prototype property - var nbRoot = { - toString: function() { return this.first + ' ' + this.last; } - }; - - function nameBuilder(first, last) { - this.first = first; - this.last = last; - return this; - } - nameBuilder.prototype = nbRoot; - - function nameBuilder2(first, last) { - this.first = first; - this.last = last; - return this; - } - nameBuilder2.prototype = nbRoot; - - var nb1 = new nameBuilder('Ryan', 'Dahl'); - var nb2 = new nameBuilder2('Ryan', 'Dahl'); - - assert.doesNotThrow(makeBlock(assert.deepEqual, nb1, nb2)); - - nameBuilder2.prototype = Object; - nb2 = new nameBuilder2('Ryan', 'Dahl'); - assert.throws(makeBlock(assert.deepEqual, nb1, nb2), assert.AssertionError); -}); - -test('assert.deepEqual - ES6 primitives', function () { - assert.throws(makeBlock(assert.deepEqual, null, {}), assert.AssertionError); - assert.throws(makeBlock(assert.deepEqual, undefined, {}), assert.AssertionError); - assert.throws(makeBlock(assert.deepEqual, 'a', ['a']), assert.AssertionError); - assert.throws(makeBlock(assert.deepEqual, 'a', {0: 'a'}), assert.AssertionError); - assert.throws(makeBlock(assert.deepEqual, 1, {}), assert.AssertionError); - assert.throws(makeBlock(assert.deepEqual, true, {}), assert.AssertionError); - if (typeof Symbol === 'symbol') { - assert.throws(makeBlock(assert.deepEqual, Symbol(), {}), assert.AssertionError); - } -}); - -test('assert.deepEqual - object wrappers', function () { - assert.doesNotThrow(makeBlock(assert.deepEqual, new String('a'), ['a'])); - assert.doesNotThrow(makeBlock(assert.deepEqual, new String('a'), {0: 'a'})); - assert.doesNotThrow(makeBlock(assert.deepEqual, new Number(1), {})); - assert.doesNotThrow(makeBlock(assert.deepEqual, new Boolean(true), {})); -}); - -function thrower(errorConstructor) { - throw new errorConstructor('test'); -} - -test('assert - Testing the throwing', function () { - var aethrow = makeBlock(thrower, assert.AssertionError); - aethrow = makeBlock(thrower, assert.AssertionError); - - // the basic calls work - assert.throws(makeBlock(thrower, assert.AssertionError), - assert.AssertionError, 'message'); - assert.throws(makeBlock(thrower, assert.AssertionError), assert.AssertionError); - assert.throws(makeBlock(thrower, assert.AssertionError)); - - // if not passing an error, catch all. - assert.throws(makeBlock(thrower, TypeError)); - - // when passing a type, only catch errors of the appropriate type - var threw = false; - try { - assert.throws(makeBlock(thrower, TypeError), assert.AssertionError); - } catch (e) { - threw = true; - assert.ok(e instanceof TypeError, 'type'); - } - assert.equal(true, threw, - 'a.throws with an explicit error is eating extra errors', - assert.AssertionError); - threw = false; - - // doesNotThrow should pass through all errors - try { - assert.doesNotThrow(makeBlock(thrower, TypeError), assert.AssertionError); - } catch (e) { - threw = true; - assert.ok(e instanceof TypeError); - } - assert.equal(true, threw, - 'a.doesNotThrow with an explicit error is eating extra errors'); - - // key difference is that throwing our correct error makes an assertion error - try { - assert.doesNotThrow(makeBlock(thrower, TypeError), TypeError); - } catch (e) { - threw = true; - assert.ok(e instanceof assert.AssertionError); - } - assert.equal(true, threw, - 'a.doesNotThrow is not catching type matching errors'); -}); - -test('assert.ifError', function () { - assert.throws(function() {assert.ifError(new Error('test error'))}); - assert.doesNotThrow(function() {assert.ifError(null)}); - assert.doesNotThrow(function() {assert.ifError()}); -}); - -test('assert - make sure that validating using constructor really works', function () { - var threw = false; - try { - assert.throws( - function() { - throw ({}); - }, - Array - ); - } catch (e) { - threw = true; - } - assert.ok(threw, 'wrong constructor validation'); -}); - -test('assert - use a RegExp to validate error message', function () { - assert.throws(makeBlock(thrower, TypeError), /test/); -}); - -test('assert - se a fn to validate error object', function () { - assert.throws(makeBlock(thrower, TypeError), function(err) { - if ((err instanceof TypeError) && /test/.test(err)) { - return true; - } - }); -}); - -test('assert - Make sure deepEqual doesn\'t loop forever on circular refs', function () { - var b = {}; - b.b = b; - - var c = {}; - c.b = c; - - var gotError = false; - try { - assert.deepEqual(b, c); - } catch (e) { - gotError = true; - } - - assert.ok(gotError); -}); - -test('assert - Ensure reflexivity of deepEqual with `arguments` objects', function() { - var args = (function() { return arguments; })(); - assert.throws(makeBlock(assert.deepEqual, [], args), assert.AssertionError); - assert.throws(makeBlock(assert.deepEqual, args, []), assert.AssertionError); -}); - -test('assert - test assertion message', function () { - function testAssertionMessage(actual, expected) { - try { - assert.equal(actual, ''); - } catch (e) { - assert.equal(e.toString(), - ['AssertionError:', expected, '==', '""'].join(' ')); - } - } - testAssertionMessage(undefined, '"undefined"'); - testAssertionMessage(null, 'null'); - testAssertionMessage(true, 'true'); - testAssertionMessage(false, 'false'); - testAssertionMessage(0, '0'); - testAssertionMessage(100, '100'); - testAssertionMessage(NaN, '"NaN"'); - testAssertionMessage(Infinity, '"Infinity"'); - testAssertionMessage(-Infinity, '"-Infinity"'); - testAssertionMessage('', '""'); - testAssertionMessage('foo', '"foo"'); - testAssertionMessage([], '[]'); - testAssertionMessage([1, 2, 3], '[1,2,3]'); - testAssertionMessage(/a/, '"/a/"'); - testAssertionMessage(function f() {}, '"function f() {}"'); - testAssertionMessage({}, '{}'); - testAssertionMessage({a: undefined, b: null}, '{"a":"undefined","b":null}'); - testAssertionMessage({a: NaN, b: Infinity, c: -Infinity}, - '{"a":"NaN","b":"Infinity","c":"-Infinity"}'); -}); - -test('assert - regressions from node.js testcase', function () { - var threw = false; - - try { - assert.throws(function () { - assert.ifError(null); - }); - } catch (e) { - threw = true; - assert.equal(e.message, 'Missing expected exception..'); - } - assert.ok(threw); - - try { - assert.equal(1, 2); - } catch (e) { - assert.equal(e.toString().split('\n')[0], 'AssertionError: 1 == 2'); - } - - try { - assert.equal(1, 2, 'oh no'); - } catch (e) { - assert.equal(e.toString().split('\n')[0], 'AssertionError: oh no'); - } -}); diff --git a/node_modules/browserify/node_modules/browser-pack/.npmignore b/node_modules/browserify/node_modules/browser-pack/.npmignore deleted file mode 100644 index 3c3629e6..00000000 --- a/node_modules/browserify/node_modules/browser-pack/.npmignore +++ /dev/null @@ -1 +0,0 @@ -node_modules diff --git a/node_modules/browserify/node_modules/browser-pack/.travis.yml b/node_modules/browserify/node_modules/browser-pack/.travis.yml deleted file mode 100644 index bc21ef61..00000000 --- a/node_modules/browserify/node_modules/browser-pack/.travis.yml +++ /dev/null @@ -1,8 +0,0 @@ -language: node_js -node_js: - - "0.8" - - "0.10" - - "0.12" - - "iojs" -before_install: - - npm install -g npm@~1.4.6 \ No newline at end of file diff --git a/node_modules/browserify/node_modules/browser-pack/LICENSE b/node_modules/browserify/node_modules/browser-pack/LICENSE deleted file mode 100644 index ee27ba4b..00000000 --- a/node_modules/browserify/node_modules/browser-pack/LICENSE +++ /dev/null @@ -1,18 +0,0 @@ -This software is released under the MIT license: - -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/node_modules/browserify/node_modules/browser-pack/_prelude.js b/node_modules/browserify/node_modules/browser-pack/_prelude.js deleted file mode 100644 index 4ab156fe..00000000 --- a/node_modules/browserify/node_modules/browser-pack/_prelude.js +++ /dev/null @@ -1 +0,0 @@ -(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o (sindresorhus.com) - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. \ No newline at end of file diff --git a/node_modules/browserify/node_modules/browser-pack/node_modules/combine-source-map/node_modules/convert-source-map/.npmignore b/node_modules/browserify/node_modules/browser-pack/node_modules/combine-source-map/node_modules/convert-source-map/.npmignore deleted file mode 100644 index de78e273..00000000 --- a/node_modules/browserify/node_modules/browser-pack/node_modules/combine-source-map/node_modules/convert-source-map/.npmignore +++ /dev/null @@ -1,16 +0,0 @@ -lib-cov -*.seed -*.log -*.csv -*.dat -*.out -*.pid -*.gz - -pids -logs -results - -node_modules -npm-debug.log -tmp diff --git a/node_modules/browserify/node_modules/browser-pack/node_modules/combine-source-map/node_modules/convert-source-map/.travis.yml b/node_modules/browserify/node_modules/browser-pack/node_modules/combine-source-map/node_modules/convert-source-map/.travis.yml deleted file mode 100644 index a55b235f..00000000 --- a/node_modules/browserify/node_modules/browser-pack/node_modules/combine-source-map/node_modules/convert-source-map/.travis.yml +++ /dev/null @@ -1,5 +0,0 @@ -language: node_js -node_js: - - 0.8 - - 0.10 - - 0.11 \ No newline at end of file diff --git a/node_modules/browserify/node_modules/browser-pack/node_modules/combine-source-map/node_modules/convert-source-map/LICENSE b/node_modules/browserify/node_modules/browser-pack/node_modules/combine-source-map/node_modules/convert-source-map/LICENSE deleted file mode 100644 index 41702c50..00000000 --- a/node_modules/browserify/node_modules/browser-pack/node_modules/combine-source-map/node_modules/convert-source-map/LICENSE +++ /dev/null @@ -1,23 +0,0 @@ -Copyright 2013 Thorsten Lorenz. -All rights reserved. - -Permission is hereby granted, free of charge, to any person -obtaining a copy of this software and associated documentation -files (the "Software"), to deal in the Software without -restriction, including without limitation the rights to use, -copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the -Software is furnished to do so, subject to the following -conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES -OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT -HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, -WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR -OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/browserify/node_modules/browser-pack/node_modules/combine-source-map/node_modules/convert-source-map/README.md b/node_modules/browserify/node_modules/browser-pack/node_modules/combine-source-map/node_modules/convert-source-map/README.md deleted file mode 100644 index e415fecc..00000000 --- a/node_modules/browserify/node_modules/browser-pack/node_modules/combine-source-map/node_modules/convert-source-map/README.md +++ /dev/null @@ -1,121 +0,0 @@ -# convert-source-map [![build status](https://secure.travis-ci.org/thlorenz/convert-source-map.png)](http://travis-ci.org/thlorenz/convert-source-map) - -[![NPM](https://nodei.co/npm/convert-source-map.png?downloads=true&stars=true)](https://nodei.co/npm/convert-source-map/) - -Converts a source-map from/to different formats and allows adding/changing properties. - -```js -var convert = require('convert-source-map'); - -var json = convert - .fromComment('//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZm9vLmpzIiwic291cmNlcyI6WyJjb25zb2xlLmxvZyhcImhpXCIpOyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSIsInNvdXJjZVJvb3QiOiIvIn0=') - .toJSON(); - -var modified = convert - .fromComment('//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZm9vLmpzIiwic291cmNlcyI6WyJjb25zb2xlLmxvZyhcImhpXCIpOyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSIsInNvdXJjZVJvb3QiOiIvIn0=') - .setProperty('sources', [ 'CONSOLE.LOG("HI");' ]) - .toJSON(); - -console.log(json); -console.log(modified); -``` - -```json -{"version":3,"file":"foo.js","sources":["console.log(\"hi\");"],"names":[],"mappings":"AAAA","sourceRoot":"/"} -{"version":3,"file":"foo.js","sources":["CONSOLE.LOG(\"HI\");"],"names":[],"mappings":"AAAA","sourceRoot":"/"} -``` - -## API - -### fromObject(obj) - -Returns source map converter from given object. - -### fromJSON(json) - -Returns source map converter from given json string. - -### fromBase64(base64) - -Returns source map converter from given base64 encoded json string. - -### fromComment(comment) - -Returns source map converter from given base64 encoded json string prefixed with `//# sourceMappingURL=...`. - -### fromMapFileComment(comment, mapFileDir) - -Returns source map converter from given `filename` by parsing `//# sourceMappingURL=filename`. - -`filename` must point to a file that is found inside the `mapFileDir`. Most tools store this file right next to the -generated file, i.e. the one containing the source map. - -### fromSource(source[, largeSource]) - -Finds last sourcemap comment in file and returns source map converter or returns null if no source map comment was found. - -If `largeSource` is set to `true`, an algorithm that does not use regex is applied to find the source map. This is faster and especially useful if you're running into "call stack size exceeded" errors with the default algorithm. - -However, it is less accurate and may match content that isn't a source map comment. - -### fromMapFileSource(source, mapFileDir) - -Finds last sourcemap comment in file and returns source map converter or returns null if no source map comment was -found. - -The sourcemap will be read from the map file found by parsing `# sourceMappingURL=file` comment. For more info see -fromMapFileComment. - -### toObject() - -Returns a copy of the underlying source map. - -### toJSON([space]) - -Converts source map to json string. If `space` is given (optional), this will be passed to -[JSON.stringify](https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/JSON/stringify) when the -JSON string is generated. - -### toBase64() - -Converts source map to base64 encoded json string. - -### toComment([options]) - -Converts source map to an inline comment that can be appended to the source-file. - -By default, the comment is formatted like: `//# sourceMappingURL=...`, which you would -normally see in a JS source file. - -When `options.multiline == true`, the comment is formatted like: `/*# sourceMappingURL=... */`, which you would find in a CSS source file. - -### addProperty(key, value) - -Adds given property to the source map. Throws an error if property already exists. - -### setProperty(key, value) - -Sets given property to the source map. If property doesn't exist it is added, otherwise its value is updated. - -### getProperty(key) - -Gets given property of the source map. - -### removeComments(src) - -Returns `src` with all source map comments removed - -### removeMapFileComments(src) - -Returns `src` with all source map comments pointing to map files removed. - -### commentRegex - -Returns the regex used to find source map comments. - -### mapFileCommentRegex - -Returns the regex used to find source map comments pointing to map files. - - -[![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/thlorenz/convert-source-map/trend.png)](https://bitdeli.com/free "Bitdeli Badge") diff --git a/node_modules/browserify/node_modules/browser-pack/node_modules/combine-source-map/node_modules/convert-source-map/example/comment-to-json.js b/node_modules/browserify/node_modules/browser-pack/node_modules/combine-source-map/node_modules/convert-source-map/example/comment-to-json.js deleted file mode 100644 index dfab1861..00000000 --- a/node_modules/browserify/node_modules/browser-pack/node_modules/combine-source-map/node_modules/convert-source-map/example/comment-to-json.js +++ /dev/null @@ -1,15 +0,0 @@ -'use strict'; - -var convert = require('..'); - -var json = convert - .fromComment('//@ sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZm9vLmpzIiwic291cmNlcyI6WyJjb25zb2xlLmxvZyhcImhpXCIpOyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSIsInNvdXJjZVJvb3QiOiIvIn0=') - .toJSON(); - -var modified = convert - .fromComment('//@ sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZm9vLmpzIiwic291cmNlcyI6WyJjb25zb2xlLmxvZyhcImhpXCIpOyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSIsInNvdXJjZVJvb3QiOiIvIn0=') - .setProperty('sources', [ 'CONSOLE.LOG("HI");' ]) - .toJSON(); - -console.log(json); -console.log(modified); diff --git a/node_modules/browserify/node_modules/browser-pack/node_modules/combine-source-map/node_modules/convert-source-map/index.js b/node_modules/browserify/node_modules/browser-pack/node_modules/combine-source-map/node_modules/convert-source-map/index.js deleted file mode 100644 index bfe92d1e..00000000 --- a/node_modules/browserify/node_modules/browser-pack/node_modules/combine-source-map/node_modules/convert-source-map/index.js +++ /dev/null @@ -1,156 +0,0 @@ -'use strict'; -var fs = require('fs'); -var path = require('path'); - -var commentRx = /^\s*\/(?:\/|\*)[@#]\s+sourceMappingURL=data:(?:application|text)\/json;(?:charset[:=]\S+;)?base64,(.*)$/mg; -var mapFileCommentRx = - //Example (Extra space between slashes added to solve Safari bug. Exclude space in production): - // / /# sourceMappingURL=foo.js.map /*# sourceMappingURL=foo.js.map */ - /(?:\/\/[@#][ \t]+sourceMappingURL=([^\s'"]+?)[ \t]*$)|(?:\/\*[@#][ \t]+sourceMappingURL=([^\*]+?)[ \t]*(?:\*\/){1}[ \t]*$)/mg - -function decodeBase64(base64) { - return new Buffer(base64, 'base64').toString(); -} - -function stripComment(sm) { - return sm.split(',').pop(); -} - -function readFromFileMap(sm, dir) { - // NOTE: this will only work on the server since it attempts to read the map file - - var r = mapFileCommentRx.exec(sm); - mapFileCommentRx.lastIndex = 0; - - // for some odd reason //# .. captures in 1 and /* .. */ in 2 - var filename = r[1] || r[2]; - var filepath = path.join(dir, filename); - - try { - return fs.readFileSync(filepath, 'utf8'); - } catch (e) { - throw new Error('An error occurred while trying to read the map file at ' + filepath + '\n' + e); - } -} - -function Converter (sm, opts) { - opts = opts || {}; - - if (opts.isFileComment) sm = readFromFileMap(sm, opts.commentFileDir); - if (opts.hasComment) sm = stripComment(sm); - if (opts.isEncoded) sm = decodeBase64(sm); - if (opts.isJSON || opts.isEncoded) sm = JSON.parse(sm); - - this.sourcemap = sm; -} - -function convertFromLargeSource(content){ - var lines = content.split('\n'); - var line; - // find first line which contains a source map starting at end of content - for (var i = lines.length - 1; i > 0; i--) { - line = lines[i] - if (~line.indexOf('sourceMappingURL=data:')) return exports.fromComment(line); - } -} - -Converter.prototype.toJSON = function (space) { - return JSON.stringify(this.sourcemap, null, space); -}; - -Converter.prototype.toBase64 = function () { - var json = this.toJSON(); - return new Buffer(json).toString('base64'); -}; - -Converter.prototype.toComment = function (options) { - var base64 = this.toBase64(); - var data = 'sourceMappingURL=data:application/json;base64,' + base64; - return options && options.multiline ? '/*# ' + data + ' */' : '//# ' + data; -}; - -// returns copy instead of original -Converter.prototype.toObject = function () { - return JSON.parse(this.toJSON()); -}; - -Converter.prototype.addProperty = function (key, value) { - if (this.sourcemap.hasOwnProperty(key)) throw new Error('property %s already exists on the sourcemap, use set property instead'); - return this.setProperty(key, value); -}; - -Converter.prototype.setProperty = function (key, value) { - this.sourcemap[key] = value; - return this; -}; - -Converter.prototype.getProperty = function (key) { - return this.sourcemap[key]; -}; - -exports.fromObject = function (obj) { - return new Converter(obj); -}; - -exports.fromJSON = function (json) { - return new Converter(json, { isJSON: true }); -}; - -exports.fromBase64 = function (base64) { - return new Converter(base64, { isEncoded: true }); -}; - -exports.fromComment = function (comment) { - comment = comment - .replace(/^\/\*/g, '//') - .replace(/\*\/$/g, ''); - - return new Converter(comment, { isEncoded: true, hasComment: true }); -}; - -exports.fromMapFileComment = function (comment, dir) { - return new Converter(comment, { commentFileDir: dir, isFileComment: true, isJSON: true }); -}; - -// Finds last sourcemap comment in file or returns null if none was found -exports.fromSource = function (content, largeSource) { - if (largeSource) { - var res = convertFromLargeSource(content); - return res ? res : null; - } - - var m = content.match(commentRx); - commentRx.lastIndex = 0; - return m ? exports.fromComment(m.pop()) : null; -}; - -// Finds last sourcemap comment in file or returns null if none was found -exports.fromMapFileSource = function (content, dir) { - var m = content.match(mapFileCommentRx); - mapFileCommentRx.lastIndex = 0; - return m ? exports.fromMapFileComment(m.pop(), dir) : null; -}; - -exports.removeComments = function (src) { - commentRx.lastIndex = 0; - return src.replace(commentRx, ''); -}; - -exports.removeMapFileComments = function (src) { - mapFileCommentRx.lastIndex = 0; - return src.replace(mapFileCommentRx, ''); -}; - -Object.defineProperty(exports, 'commentRegex', { - get: function getCommentRegex () { - commentRx.lastIndex = 0; - return commentRx; - } -}); - -Object.defineProperty(exports, 'mapFileCommentRegex', { - get: function getMapFileCommentRegex () { - mapFileCommentRx.lastIndex = 0; - return mapFileCommentRx; - } -}); diff --git a/node_modules/browserify/node_modules/browser-pack/node_modules/combine-source-map/node_modules/convert-source-map/package.json b/node_modules/browserify/node_modules/browser-pack/node_modules/combine-source-map/node_modules/convert-source-map/package.json deleted file mode 100644 index 9782648b..00000000 --- a/node_modules/browserify/node_modules/browser-pack/node_modules/combine-source-map/node_modules/convert-source-map/package.json +++ /dev/null @@ -1,62 +0,0 @@ -{ - "name": "convert-source-map", - "version": "1.1.3", - "description": "Converts a source-map from/to different formats and allows adding/changing properties.", - "main": "index.js", - "scripts": { - "test": "tap test/*.js" - }, - "repository": { - "type": "git", - "url": "git://github.com/thlorenz/convert-source-map.git" - }, - "homepage": "https://github.com/thlorenz/convert-source-map", - "dependencies": {}, - "devDependencies": { - "inline-source-map": "~0.3.1", - "tap": "~0.4.13" - }, - "keywords": [ - "convert", - "sourcemap", - "source", - "map", - "browser", - "debug" - ], - "author": { - "name": "Thorsten Lorenz", - "email": "thlorenz@gmx.de", - "url": "http://thlorenz.com" - }, - "license": "MIT", - "engine": { - "node": ">=0.6" - }, - "gitHead": "5b208c76f8fd0aaa6dcaeeb07abc83187cf513f5", - "bugs": { - "url": "https://github.com/thlorenz/convert-source-map/issues" - }, - "_id": "convert-source-map@1.1.3", - "_shasum": "4829c877e9fe49b3161f3bf3673888e204699860", - "_from": "convert-source-map@>=1.1.0 <1.2.0", - "_npmVersion": "2.14.15", - "_nodeVersion": "4.2.4", - "_npmUser": { - "name": "thlorenz", - "email": "thlorenz@gmx.de" - }, - "dist": { - "shasum": "4829c877e9fe49b3161f3bf3673888e204699860", - "tarball": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.1.3.tgz" - }, - "maintainers": [ - { - "name": "thlorenz", - "email": "thlorenz@gmx.de" - } - ], - "directories": {}, - "_resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.1.3.tgz", - "readme": "ERROR: No README data found!" -} diff --git a/node_modules/browserify/node_modules/browser-pack/node_modules/combine-source-map/node_modules/convert-source-map/test/comment-regex.js b/node_modules/browserify/node_modules/browser-pack/node_modules/combine-source-map/node_modules/convert-source-map/test/comment-regex.js deleted file mode 100644 index 16331ccb..00000000 --- a/node_modules/browserify/node_modules/browser-pack/node_modules/combine-source-map/node_modules/convert-source-map/test/comment-regex.js +++ /dev/null @@ -1,138 +0,0 @@ -'use strict'; -/*jshint asi: true */ - -var test = require('tap').test - , generator = require('inline-source-map') - , rx = require('..').commentRegex - , mapFileRx = require('..').mapFileCommentRegex - -function comment(prefix, suffix) { - rx.lastIndex = 0; - return rx.test(prefix + 'sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiIiwic291cmNlcyI6WyJmdW5jdGlvbiBmb28oKSB7XG4gY29uc29sZS5sb2coXCJoZWxsbyBJIGFtIGZvb1wiKTtcbiBjb25zb2xlLmxvZyhcIndobyBhcmUgeW91XCIpO1xufVxuXG5mb28oKTtcbiJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSJ9' + suffix) -} - -function commentWithCharSet(prefix, suffix, sep) { - sep = sep || ':'; - rx.lastIndex = 0; - return rx.test(prefix + 'sourceMappingURL=data:application/json;charset' + sep +'utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiIiwic291cmNlcyI6WyJmdW5jdGlvbiBmb28oKSB7XG4gY29uc29sZS5sb2coXCJoZWxsbyBJIGFtIGZvb1wiKTtcbiBjb25zb2xlLmxvZyhcIndobyBhcmUgeW91XCIpO1xufVxuXG5mb28oKTtcbiJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSJ9' + suffix) -} - -// Source Map v2 Tests -test('comment regex old spec - @', function (t) { - [ - '//@ ', - ' //@ ', // with leading space - '\t//@ ', // with leading tab - '//@ ', // with leading text - '/*@ ', // multi line style - ' /*@ ', // multi line style with leading spaces - '\t/*@ ', // multi line style with leading tab - '/*@ ', // multi line style with leading text - ].forEach(function (x) { - t.ok(comment(x, ''), 'matches ' + x) - t.ok(commentWithCharSet(x, ''), 'matches ' + x + ' with charset') - t.ok(commentWithCharSet(x, '', '='), 'matches ' + x + ' with charset') - }); - - [ - ' @// @', - ' @/* @', - ].forEach(function (x) { t.ok(!comment(x, ''), 'should not match ' + x) }) - - t.end() -}) - -test('comment regex new spec - #', function (t) { - [ - ' //# ', // with leading spaces - '\t//# ', // with leading tab - '//# ', // with leading text - '/*# ', // multi line style - ' /*# ', // multi line style with leading spaces - '\t/*# ', // multi line style with leading tab - '/*# ', // multi line style with leading text - ].forEach(function (x) { - t.ok(comment(x, ''), 'matches ' + x) - t.ok(commentWithCharSet(x, ''), 'matches ' + x + ' with charset') - t.ok(commentWithCharSet(x, '', '='), 'matches ' + x + ' with charset') - }); - - [ - ' #// #', - ' #/* #', - ].forEach(function (x) { t.ok(!comment(x, ''), 'should not match ' + x) }) - - t.end() -}) - -function mapFileCommentWrap(s1, s2) { - mapFileRx.lastIndex = 0; - return mapFileRx.test(s1 + 'sourceMappingURL=foo.js.map' + s2) -} - -test('mapFileComment regex old spec - @', function (t) { - - [ - ['//@ ', ''], - [' //@ ', ''], // with leading spaces - ['\t//@ ', ''], // with a leading tab - ['///@ ', ''], // with a leading text - [';//@ ', ''], // with a leading text - ['return//@ ', ''], // with a leading text - ].forEach(function (x) { t.ok(mapFileCommentWrap(x[0], x[1]), 'matches ' + x.join(' :: ')) }); - - [ - [' @// @', ''], - ['var sm = "//@ ', '"'], // not inside a string - ['var sm = \'//@ ', '\''], // not inside a string - ['var sm = \' //@ ', '\''], // not inside a string - ].forEach(function (x) { t.ok(!mapFileCommentWrap(x[0], x[1]), 'does not match ' + x.join(' :: ')) }) - t.end() -}) - -test('mapFileComment regex new spec - #', function (t) { - [ - ['//# ', ''], - [' //# ', ''], // with leading space - ['\t//# ', ''], // with leading tab - ['///# ', ''], // with leading text - [';//# ', ''], // with leading text - ['return//# ', ''], // with leading text - ].forEach(function (x) { t.ok(mapFileCommentWrap(x[0], x[1]), 'matches ' + x.join(' :: ')) }); - - [ - [' #// #', ''], - ['var sm = "//# ', '"'], // not inside a string - ['var sm = \'//# ', '\''], // not inside a string - ['var sm = \' //# ', '\''], // not inside a string - ].forEach(function (x) { t.ok(!mapFileCommentWrap(x[0], x[1]), 'does not match ' + x.join(' :: ')) }) - t.end() -}) - -test('mapFileComment regex /* */ old spec - @', function (t) { - [ [ '/*@ ', '*/' ] - , [' /*@ ', ' */ ' ] // with leading spaces - , [ '\t/*@ ', ' \t*/\t '] // with a leading tab - , [ 'leading string/*@ ', '*/' ] // with a leading string - , [ '/*@ ', ' \t*/\t '] // with trailing whitespace - ].forEach(function (x) { t.ok(mapFileCommentWrap(x[0], x[1]), 'matches ' + x.join(' :: ')) }); - - [ ['/*@ ', ' */ */ ' ], // not the last thing on its line - ['/*@ ', ' */ more text ' ] // not the last thing on its line - ].forEach(function (x) { t.ok(!mapFileCommentWrap(x[0], x[1]), 'does not match ' + x.join(' :: ')) }); - t.end() -}) - -test('mapFileComment regex /* */ new spec - #', function (t) { - [ [ '/*# ', '*/' ] - , [' /*# ', ' */ ' ] // with leading spaces - , [ '\t/*# ', ' \t*/\t '] // with a leading tab - , [ 'leading string/*# ', '*/' ] // with a leading string - , [ '/*# ', ' \t*/\t '] // with trailing whitespace - ].forEach(function (x) { t.ok(mapFileCommentWrap(x[0], x[1]), 'matches ' + x.join(' :: ')) }); - - [ ['/*# ', ' */ */ ' ], // not the last thing on its line - ['/*# ', ' */ more text ' ] // not the last thing on its line - ].forEach(function (x) { t.ok(!mapFileCommentWrap(x[0], x[1]), 'does not match ' + x.join(' :: ')) }); - t.end() -}) diff --git a/node_modules/browserify/node_modules/browser-pack/node_modules/combine-source-map/node_modules/convert-source-map/test/convert-source-map.js b/node_modules/browserify/node_modules/browser-pack/node_modules/combine-source-map/node_modules/convert-source-map/test/convert-source-map.js deleted file mode 100644 index 9bd3ba91..00000000 --- a/node_modules/browserify/node_modules/browser-pack/node_modules/combine-source-map/node_modules/convert-source-map/test/convert-source-map.js +++ /dev/null @@ -1,207 +0,0 @@ -'use strict'; -/*jshint asi: true */ - -var test = require('tap').test - , generator = require('inline-source-map') - , convert = require('..') - -var gen = generator() - .addMappings('foo.js', [{ original: { line: 2, column: 3 } , generated: { line: 5, column: 10 } }], { line: 5 }) - .addGeneratedMappings('bar.js', 'var a = 2;\nconsole.log(a)', { line: 23, column: 22 }) - - , base64 = gen.base64Encode() - , comment = gen.inlineMappingUrl() - , json = gen.toString() - , obj = JSON.parse(json) - -test('different formats', function (t) { - - t.equal(convert.fromComment(comment).toComment(), comment, 'comment -> comment') - t.equal(convert.fromComment(comment).toBase64(), base64, 'comment -> base64') - t.equal(convert.fromComment(comment).toJSON(), json, 'comment -> json') - t.deepEqual(convert.fromComment(comment).toObject(), obj, 'comment -> object') - - t.equal(convert.fromBase64(base64).toBase64(), base64, 'base64 -> base64') - t.equal(convert.fromBase64(base64).toComment(), comment, 'base64 -> comment') - t.equal(convert.fromBase64(base64).toJSON(), json, 'base64 -> json') - t.deepEqual(convert.fromBase64(base64).toObject(), obj, 'base64 -> object') - - t.equal(convert.fromJSON(json).toJSON(), json, 'json -> json') - t.equal(convert.fromJSON(json).toBase64(), base64, 'json -> base64') - t.equal(convert.fromJSON(json).toComment(), comment, 'json -> comment') - t.deepEqual(convert.fromJSON(json).toObject(), obj, 'json -> object') - t.end() -}) - -test('to object returns a copy', function (t) { - var c = convert.fromJSON(json) - var o = c.toObject() - o.version = '99'; - t.equal(c.toObject().version, 3, 'setting property on returned object does not affect original') - t.end() -}) - -test('to multi-line map', function (t) { - var c = convert.fromObject(obj); - var s = c.toComment({ multiline: true }); - t.similar(s, /^\/\*# sourceMappingURL=.+ \*\/$/); - t.end(); -}) - -test('from source', function (t) { - var foo = [ - 'function foo() {' - , ' console.log("hello I am foo");' - , ' console.log("who are you");' - , '}' - , '' - , 'foo();' - , '' - ].join('\n') - , map = '//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiIiwic291cmNlcyI6WyJmdW5jdGlvbiBmb28oKSB7XG4gY29uc29sZS5sb2coXCJoZWxsbyBJIGFtIGZvb1wiKTtcbiBjb25zb2xlLmxvZyhcIndobyBhcmUgeW91XCIpO1xufVxuXG5mb28oKTtcbiJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSJ9' - , otherMap = '//# sourceMappingURL=data:application/json;base64,otherZXJzaW9uIjozLCJmaWxlIjoiIiwic291cmNlcyI6WyJmdW5jdGlvbiBmb28oKSB7XG4gY29uc29sZS5sb2coXCJoZWxsbyBJIGFtIGZvb1wiKTtcbiBjb25zb2xlLmxvZyhcIndobyBhcmUgeW91XCIpO1xufVxuXG5mb28oKTtcbiJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSJ9' - - function getComment(src) { - var map = convert.fromSource(src); - return map ? map.toComment() : null; - } - - t.equal(getComment(foo), null, 'no comment returns null') - t.equal(getComment(foo + map), map, 'beginning of last line') - t.equal(getComment(foo + ' ' + map), map, 'indented of last line') - t.equal(getComment(foo + ' ' + map + '\n\n'), map, 'indented on last non empty line') - t.equal(getComment(foo + map + '\nconsole.log("more code");\nfoo()\n'), map, 'in the middle of code') - t.equal(getComment(foo + otherMap + '\n' + map), map, 'finds last map in source') - t.end() -}) - -test('from source with a large source', function (t) { - var foo = [ - 'function foo() {' - , ' console.log("hello I am foo");' - , ' console.log("who are you");' - , '}' - , '' - , 'foo();' - , '' - ].join('\n') - , map = '//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiIiwic291cmNlcyI6WyJmdW5jdGlvbiBmb28oKSB7XG4gY29uc29sZS5sb2coXCJoZWxsbyBJIGFtIGZvb1wiKTtcbiBjb25zb2xlLmxvZyhcIndobyBhcmUgeW91XCIpO1xufVxuXG5mb28oKTtcbiJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSJ9' - , otherMap = '//# sourceMappingURL=data:application/json;base64,otherZXJzaW9uIjozLCJmaWxlIjoiIiwic291cmNlcyI6WyJmdW5jdGlvbiBmb28oKSB7XG4gY29uc29sZS5sb2coXCJoZWxsbyBJIGFtIGZvb1wiKTtcbiBjb25zb2xlLmxvZyhcIndobyBhcmUgeW91XCIpO1xufVxuXG5mb28oKTtcbiJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSJ9' - - function getComment(src) { - var map = convert.fromSource(src, true); - return map ? map.toComment() : null; - } - - t.equal(getComment(foo), null, 'no comment returns null') - t.equal(getComment(foo + map), map, 'beginning of last line') - t.equal(getComment(foo + ' ' + map), map, 'indented of last line') - t.equal(getComment(foo + ' ' + map + '\n\n'), map, 'indented on last non empty line') - t.equal(getComment(foo + map + '\nconsole.log("more code");\nfoo()\n'), map, 'in the middle of code') - t.equal(getComment(foo + otherMap + '\n' + map), map, 'finds last map in source') - t.end() -}) - -test('remove comments', function (t) { - var foo = [ - 'function foo() {' - , ' console.log("hello I am foo");' - , ' console.log("who are you");' - , '}' - , '' - , 'foo();' - , '' - ].join('\n') - // this one is old spec on purpose - , map = '//@ sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiIiwic291cmNlcyI6WyJmdW5jdGlvbiBmb28oKSB7XG4gY29uc29sZS5sb2coXCJoZWxsbyBJIGFtIGZvb1wiKTtcbiBjb25zb2xlLmxvZyhcIndobyBhcmUgeW91XCIpO1xufVxuXG5mb28oKTtcbiJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSJ9' - , otherMap = '//# sourceMappingURL=data:application/json;base64,ZXJzaW9uIjozLCJmaWxlIjoiIiwic291cmNlcyI6WyJmdW5jdGlvbiBmb28oKSB7XG4gY29uc29sZS5sb2coXCJoZWxsbyBJIGFtIGZvb1wiKTtcbiBjb25zb2xlLmxvZyhcIndobyBhcmUgeW91XCIpO1xufVxuXG5mb28oKTtcbiJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSJ9' - , extraCode = '\nconsole.log("more code");\nfoo()\n' - - t.equal(convert.removeComments(foo + map), foo, 'from last line') - t.equal(convert.removeComments(foo + map + extraCode), foo + extraCode, 'from the middle of code') - t.equal(convert.removeComments(foo + otherMap + extraCode + map), foo + extraCode, 'multiple comments from the middle of code') - t.end() -}) - -test('remove map file comments', function (t) { - var foo = [ - 'function foo() {' - , ' console.log("hello I am foo");' - , ' console.log("who are you");' - , '}' - , '' - , 'foo();' - , '' - ].join('\n') - , fileMap1 = '//# sourceMappingURL=foo.js.map' - , fileMap2 = '/*# sourceMappingURL=foo.js.map */'; - - t.equal(convert.removeMapFileComments(foo + fileMap1), foo, '// style filemap comment') - t.equal(convert.removeMapFileComments(foo + fileMap2), foo, '/* */ style filemap comment') - t.end() -}) - -test('pretty json', function (t) { - var mod = convert.fromJSON(json).toJSON(2) - , expected = JSON.stringify(obj, null, 2); - - t.equal( - mod - , expected - , 'pretty prints json when space is given') - t.end() -}) - -test('adding properties', function (t) { - var mod = convert - .fromJSON(json) - .addProperty('foo', 'bar') - .toJSON() - , expected = JSON.parse(json); - expected.foo = 'bar'; - t.equal( - mod - , JSON.stringify(expected) - , 'includes added property' - ) - t.end() -}) - -test('setting properties', function (t) { - var mod = convert - .fromJSON(json) - .setProperty('version', '2') - .setProperty('mappings', ';;;UACG') - .setProperty('should add', 'this') - .toJSON() - , expected = JSON.parse(json); - expected.version = '2'; - expected.mappings = ';;;UACG'; - expected['should add'] = 'this'; - t.equal( - mod - , JSON.stringify(expected) - , 'includes new property and changes existing properties' - ) - t.end() -}) - -test('getting properties', function (t) { - var sm = convert.fromJSON(json) - - t.equal(sm.getProperty('version'), 3, 'gets version') - t.deepEqual(sm.getProperty('sources'), ['foo.js', 'bar.js'], 'gets sources') - t.end() -}) - -test('return null fromSource when largeSource is true', function(t) { - var mod = convert.fromSource('', true) - , expected = null; - - t.equal( - mod - , expected - , 'return value should be null' - ) - t.end() -}) diff --git a/node_modules/browserify/node_modules/browser-pack/node_modules/combine-source-map/node_modules/convert-source-map/test/fixtures/map-file-comment-double-slash.css b/node_modules/browserify/node_modules/browser-pack/node_modules/combine-source-map/node_modules/convert-source-map/test/fixtures/map-file-comment-double-slash.css deleted file mode 100644 index e7779916..00000000 --- a/node_modules/browserify/node_modules/browser-pack/node_modules/combine-source-map/node_modules/convert-source-map/test/fixtures/map-file-comment-double-slash.css +++ /dev/null @@ -1,14 +0,0 @@ -.header { - background: #444; - border: solid; - padding: 10px; - border-radius: 10px 5px 10px 5px; - color: #b4b472; } - -#main li { - color: green; - margin: 10px; - padding: 10px; - font-size: 18px; } - -//# sourceMappingURL=map-file-comment.css.map diff --git a/node_modules/browserify/node_modules/browser-pack/node_modules/combine-source-map/node_modules/convert-source-map/test/fixtures/map-file-comment-inline.css b/node_modules/browserify/node_modules/browser-pack/node_modules/combine-source-map/node_modules/convert-source-map/test/fixtures/map-file-comment-inline.css deleted file mode 100644 index 1e61b241..00000000 --- a/node_modules/browserify/node_modules/browser-pack/node_modules/combine-source-map/node_modules/convert-source-map/test/fixtures/map-file-comment-inline.css +++ /dev/null @@ -1,14 +0,0 @@ -.header { - background: #444; - border: solid; - padding: 10px; - border-radius: 10px 5px 10px 5px; - color: #b4b472; } - -#main li { - color: green; - margin: 10px; - padding: 10px; - font-size: 18px; } - -/*# sourceMappingURL=data:application/json;base64,ewoidmVyc2lvbiI6ICIzIiwKIm1hcHBpbmdzIjogIkFBQUEsd0JBQXlCO0VBQ3ZCLFVBQVUsRUFBRSxJQUFJO0VBQ2hCLE1BQU0sRUFBRSxLQUFLO0VBQ2IsT0FBTyxFQUFFLElBQUk7RUFDYixhQUFhLEVBQUUsaUJBQWlCO0VBQ2hDLEtBQUssRUFBRSxPQUFrQjs7QUFHM0Isd0JBQXlCO0VBQ3ZCLE9BQU8sRUFBRSxJQUFJOztBQ1RmLGdCQUFpQjtFQUNmLFVBQVUsRUFBRSxJQUFJO0VBQ2hCLEtBQUssRUFBRSxNQUFNOztBQUdmLGtCQUFtQjtFQUNqQixNQUFNLEVBQUUsSUFBSTtFQUNaLE9BQU8sRUFBRSxJQUFJO0VBQ2IsVUFBVSxFQUFFLEtBQUs7RUFDakIsYUFBYSxFQUFFLEdBQUc7RUFDbEIsS0FBSyxFQUFFLEtBQUs7O0FBRWQsa0JBQW1CO0VBQ2pCLEtBQUssRUFBRSxLQUFLOztBQUdkLG1CQUFvQjtFQUNsQixLQUFLLEVBQUUsS0FBSztFQUNaLE1BQU0sRUFBRSxJQUFJO0VBQ1osT0FBTyxFQUFFLElBQUk7RUFDYixTQUFTLEVBQUUsSUFBSSIsCiJzb3VyY2VzIjogWyIuL2NsaWVudC9zYXNzL2NvcmUuc2NzcyIsIi4vY2xpZW50L3Nhc3MvbWFpbi5zY3NzIl0sCiJmaWxlIjogIm1hcC1maWxlLWNvbW1lbnQuY3NzIgp9 */ diff --git a/node_modules/browserify/node_modules/browser-pack/node_modules/combine-source-map/node_modules/convert-source-map/test/fixtures/map-file-comment.css b/node_modules/browserify/node_modules/browser-pack/node_modules/combine-source-map/node_modules/convert-source-map/test/fixtures/map-file-comment.css deleted file mode 100644 index 8b282680..00000000 --- a/node_modules/browserify/node_modules/browser-pack/node_modules/combine-source-map/node_modules/convert-source-map/test/fixtures/map-file-comment.css +++ /dev/null @@ -1,14 +0,0 @@ -.header { - background: #444; - border: solid; - padding: 10px; - border-radius: 10px 5px 10px 5px; - color: #b4b472; } - -#main li { - color: green; - margin: 10px; - padding: 10px; - font-size: 18px; } - -/*# sourceMappingURL=map-file-comment.css.map */ diff --git a/node_modules/browserify/node_modules/browser-pack/node_modules/combine-source-map/node_modules/convert-source-map/test/fixtures/map-file-comment.css.map b/node_modules/browserify/node_modules/browser-pack/node_modules/combine-source-map/node_modules/convert-source-map/test/fixtures/map-file-comment.css.map deleted file mode 100644 index 25950ea2..00000000 --- a/node_modules/browserify/node_modules/browser-pack/node_modules/combine-source-map/node_modules/convert-source-map/test/fixtures/map-file-comment.css.map +++ /dev/null @@ -1,6 +0,0 @@ -{ -"version": "3", -"mappings": "AAAA,wBAAyB;EACvB,UAAU,EAAE,IAAI;EAChB,MAAM,EAAE,KAAK;EACb,OAAO,EAAE,IAAI;EACb,aAAa,EAAE,iBAAiB;EAChC,KAAK,EAAE,OAAkB;;AAG3B,wBAAyB;EACvB,OAAO,EAAE,IAAI;;ACTf,gBAAiB;EACf,UAAU,EAAE,IAAI;EAChB,KAAK,EAAE,MAAM;;AAGf,kBAAmB;EACjB,MAAM,EAAE,IAAI;EACZ,OAAO,EAAE,IAAI;EACb,UAAU,EAAE,KAAK;EACjB,aAAa,EAAE,GAAG;EAClB,KAAK,EAAE,KAAK;;AAEd,kBAAmB;EACjB,KAAK,EAAE,KAAK;;AAGd,mBAAoB;EAClB,KAAK,EAAE,KAAK;EACZ,MAAM,EAAE,IAAI;EACZ,OAAO,EAAE,IAAI;EACb,SAAS,EAAE,IAAI", -"sources": ["./client/sass/core.scss","./client/sass/main.scss"], -"file": "map-file-comment.css" -} diff --git a/node_modules/browserify/node_modules/browser-pack/node_modules/combine-source-map/node_modules/convert-source-map/test/map-file-comment.js b/node_modules/browserify/node_modules/browser-pack/node_modules/combine-source-map/node_modules/convert-source-map/test/map-file-comment.js deleted file mode 100644 index b4167877..00000000 --- a/node_modules/browserify/node_modules/browser-pack/node_modules/combine-source-map/node_modules/convert-source-map/test/map-file-comment.js +++ /dev/null @@ -1,70 +0,0 @@ -'use strict'; -/*jshint asi: true */ - -var test = require('tap').test - , rx = require('..') - , fs = require('fs') - , convert = require('..') - -test('\nresolving a "/*# sourceMappingURL=map-file-comment.css.map*/" style comment inside a given css content', function (t) { - var css = fs.readFileSync(__dirname + '/fixtures/map-file-comment.css', 'utf8') - var conv = convert.fromMapFileSource(css, __dirname + '/fixtures'); - var sm = conv.toObject(); - - t.deepEqual( - sm.sources - , [ './client/sass/core.scss', - './client/sass/main.scss' ] - , 'resolves paths of original sources' - ) - - t.equal(sm.file, 'map-file-comment.css', 'includes filename of generated file') - t.equal( - sm.mappings - , 'AAAA,wBAAyB;EACvB,UAAU,EAAE,IAAI;EAChB,MAAM,EAAE,KAAK;EACb,OAAO,EAAE,IAAI;EACb,aAAa,EAAE,iBAAiB;EAChC,KAAK,EAAE,OAAkB;;AAG3B,wBAAyB;EACvB,OAAO,EAAE,IAAI;;ACTf,gBAAiB;EACf,UAAU,EAAE,IAAI;EAChB,KAAK,EAAE,MAAM;;AAGf,kBAAmB;EACjB,MAAM,EAAE,IAAI;EACZ,OAAO,EAAE,IAAI;EACb,UAAU,EAAE,KAAK;EACjB,aAAa,EAAE,GAAG;EAClB,KAAK,EAAE,KAAK;;AAEd,kBAAmB;EACjB,KAAK,EAAE,KAAK;;AAGd,mBAAoB;EAClB,KAAK,EAAE,KAAK;EACZ,MAAM,EAAE,IAAI;EACZ,OAAO,EAAE,IAAI;EACb,SAAS,EAAE,IAAI' - , 'includes mappings' - ) - t.end() -}) - -test('\nresolving a "//# sourceMappingURL=map-file-comment.css.map" style comment inside a given css content', function (t) { - var css = fs.readFileSync(__dirname + '/fixtures/map-file-comment-double-slash.css', 'utf8') - var conv = convert.fromMapFileSource(css, __dirname + '/fixtures'); - var sm = conv.toObject(); - - t.deepEqual( - sm.sources - , [ './client/sass/core.scss', - './client/sass/main.scss' ] - , 'resolves paths of original sources' - ) - - t.equal(sm.file, 'map-file-comment.css', 'includes filename of generated file') - t.equal( - sm.mappings - , 'AAAA,wBAAyB;EACvB,UAAU,EAAE,IAAI;EAChB,MAAM,EAAE,KAAK;EACb,OAAO,EAAE,IAAI;EACb,aAAa,EAAE,iBAAiB;EAChC,KAAK,EAAE,OAAkB;;AAG3B,wBAAyB;EACvB,OAAO,EAAE,IAAI;;ACTf,gBAAiB;EACf,UAAU,EAAE,IAAI;EAChB,KAAK,EAAE,MAAM;;AAGf,kBAAmB;EACjB,MAAM,EAAE,IAAI;EACZ,OAAO,EAAE,IAAI;EACb,UAAU,EAAE,KAAK;EACjB,aAAa,EAAE,GAAG;EAClB,KAAK,EAAE,KAAK;;AAEd,kBAAmB;EACjB,KAAK,EAAE,KAAK;;AAGd,mBAAoB;EAClB,KAAK,EAAE,KAAK;EACZ,MAAM,EAAE,IAAI;EACZ,OAAO,EAAE,IAAI;EACb,SAAS,EAAE,IAAI' - , 'includes mappings' - ) - t.end() -}) - -test('\nresolving a /*# sourceMappingURL=data:application/json;base64,... */ style comment inside a given css content', function(t) { - var css = fs.readFileSync(__dirname + '/fixtures/map-file-comment-inline.css', 'utf8') - var conv = convert.fromSource(css, __dirname + '/fixtures') - var sm = conv.toObject() - - t.deepEqual( - sm.sources - , [ './client/sass/core.scss', - './client/sass/main.scss' ] - , 'resolves paths of original sources' - ) - - t.equal(sm.file, 'map-file-comment.css', 'includes filename of generated file') - t.equal( - sm.mappings - , 'AAAA,wBAAyB;EACvB,UAAU,EAAE,IAAI;EAChB,MAAM,EAAE,KAAK;EACb,OAAO,EAAE,IAAI;EACb,aAAa,EAAE,iBAAiB;EAChC,KAAK,EAAE,OAAkB;;AAG3B,wBAAyB;EACvB,OAAO,EAAE,IAAI;;ACTf,gBAAiB;EACf,UAAU,EAAE,IAAI;EAChB,KAAK,EAAE,MAAM;;AAGf,kBAAmB;EACjB,MAAM,EAAE,IAAI;EACZ,OAAO,EAAE,IAAI;EACb,UAAU,EAAE,KAAK;EACjB,aAAa,EAAE,GAAG;EAClB,KAAK,EAAE,KAAK;;AAEd,kBAAmB;EACjB,KAAK,EAAE,KAAK;;AAGd,mBAAoB;EAClB,KAAK,EAAE,KAAK;EACZ,MAAM,EAAE,IAAI;EACZ,OAAO,EAAE,IAAI;EACb,SAAS,EAAE,IAAI' - , 'includes mappings' - ) - t.end() -}) diff --git a/node_modules/browserify/node_modules/browser-pack/node_modules/combine-source-map/node_modules/inline-source-map/.npmignore b/node_modules/browserify/node_modules/browser-pack/node_modules/combine-source-map/node_modules/inline-source-map/.npmignore deleted file mode 100644 index de78e273..00000000 --- a/node_modules/browserify/node_modules/browser-pack/node_modules/combine-source-map/node_modules/inline-source-map/.npmignore +++ /dev/null @@ -1,16 +0,0 @@ -lib-cov -*.seed -*.log -*.csv -*.dat -*.out -*.pid -*.gz - -pids -logs -results - -node_modules -npm-debug.log -tmp diff --git a/node_modules/browserify/node_modules/browser-pack/node_modules/combine-source-map/node_modules/inline-source-map/.travis.yml b/node_modules/browserify/node_modules/browser-pack/node_modules/combine-source-map/node_modules/inline-source-map/.travis.yml deleted file mode 100644 index b7684aa9..00000000 --- a/node_modules/browserify/node_modules/browser-pack/node_modules/combine-source-map/node_modules/inline-source-map/.travis.yml +++ /dev/null @@ -1,7 +0,0 @@ -sudo: false -language: node_js -node_js: - - 0.8 - - 0.10 - - 0.12 - - io.js diff --git a/node_modules/browserify/node_modules/browser-pack/node_modules/combine-source-map/node_modules/inline-source-map/LICENSE b/node_modules/browserify/node_modules/browser-pack/node_modules/combine-source-map/node_modules/inline-source-map/LICENSE deleted file mode 100644 index 41702c50..00000000 --- a/node_modules/browserify/node_modules/browser-pack/node_modules/combine-source-map/node_modules/inline-source-map/LICENSE +++ /dev/null @@ -1,23 +0,0 @@ -Copyright 2013 Thorsten Lorenz. -All rights reserved. - -Permission is hereby granted, free of charge, to any person -obtaining a copy of this software and associated documentation -files (the "Software"), to deal in the Software without -restriction, including without limitation the rights to use, -copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the -Software is furnished to do so, subject to the following -conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES -OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT -HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, -WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR -OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/browserify/node_modules/browser-pack/node_modules/combine-source-map/node_modules/inline-source-map/README.md b/node_modules/browserify/node_modules/browser-pack/node_modules/combine-source-map/node_modules/inline-source-map/README.md deleted file mode 100644 index 4271a6be..00000000 --- a/node_modules/browserify/node_modules/browser-pack/node_modules/combine-source-map/node_modules/inline-source-map/README.md +++ /dev/null @@ -1,89 +0,0 @@ -# inline-source-map [![build status](https://secure.travis-ci.org/thlorenz/inline-source-map.png)](http://travis-ci.org/thlorenz/inline-source-map) - -Adds source mappings and base64 encodes them, so they can be inlined in your generated file. - -```js -var generator = require('inline-source-map'); - -// default charset 'utf-8' is configurable -var gen = generator({ charset: 'utf-8' }) - .addMappings('foo.js', [{ original: { line: 2, column: 3 } , generated: { line: 5, column: 10 } }], { line: 5 }) - .addGeneratedMappings('bar.js', 'var a = 2;\nconsole.log(a)', { line: 23, column: 22 }); - -console.log('base64 mapping:', gen.base64Encode()); -console.log('inline mapping url:', gen.inlineMappingUrl()); -``` - -``` -base64 mapping: eyJ2ZXJzaW9uIjozLCJmaWxlIjoiIiwic291cmNlcyI6WyJmb28uanMiLCJiYXIuanMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7O1VBQ0c7Ozs7Ozs7Ozs7Ozs7O3NCQ0RIO3NCQUNBIn0= -inline mapping url: //@ sourceMappingURL=data:application/json;charset:utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiIiwic291cmNlcyI6WyJmb28uanMiLCJiYXIuanMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7O1VBQ0c7Ozs7Ozs7Ozs7Ozs7O3NCQ0RIO3NCQUNBIn0= -``` - -## API - -### addMappings(sourceFile, mappings, offset) - -``` -/** - * Adds the given mappings to the generator and offsets them if offset is given - * - * @name addMappings - * @function - * @param sourceFile {String} name of the source file - * @param mappings {Array{{Object}} each object has the form { original: { line: _, column: _ }, generated: { line: _, column: _ } } - * @param offset {Object} offset to apply to each mapping. Has the form { line: _, column: _ } - * @return {Object} the generator to allow chaining - */ -``` - -### addGeneratedMappings(sourceFile, source, offset) - -``` -/** - * Generates mappings for the given source and adds them, assuming that no translation from original to generated is necessary. - * - * @name addGeneratedMappings - * @function - * @param sourceFile {String} name of the source file - * @param source {String} source of the file - * @param offset {Object} offset to apply to each mapping. Has the form { line: _, column: _ } - * @return {Object} the generator to allow chaining - */ -``` - -### addSourceContent(sourceFile, sourceContent) - -``` -/** - * Adds source content for the given source file. - * - * @name addSourceContent - * @function - * @param sourceFile {String} The source file for which a mapping is included - * @param sourceContent {String} The content of the source file - * @return {Object} The generator to allow chaining - */ -``` - - -### base64Encode() - -``` -/** - * @name base64Encode - * @function - * @return {String} bas64 encoded representation of the added mappings - */ -``` - -If source contents were added, this will be included in the encoded mappings. - -### inlineMappingUrl() - -``` -/** - * @name inlineMappingUrl - * @function - * @return {String} comment with base64 encoded representation of the added mappings. Can be inlined at the end of the generated file. - */ -``` diff --git a/node_modules/browserify/node_modules/browser-pack/node_modules/combine-source-map/node_modules/inline-source-map/example/foo-bar.js b/node_modules/browserify/node_modules/browser-pack/node_modules/combine-source-map/node_modules/inline-source-map/example/foo-bar.js deleted file mode 100644 index 247ee308..00000000 --- a/node_modules/browserify/node_modules/browser-pack/node_modules/combine-source-map/node_modules/inline-source-map/example/foo-bar.js +++ /dev/null @@ -1,8 +0,0 @@ -var generator = require('..'); - -var gen = generator() - .addMappings('foo.js', [{ original: { line: 2, column: 3 } , generated: { line: 5, column: 10 } }], { line: 5 }) - .addGeneratedMappings('bar.js', 'var a = 2;\nconsole.log(a)', { line: 23, column: 22 }); - -console.log('base64 mapping', gen.base64Encode()); -console.log('inline mapping url', gen.inlineMappingUrl()); diff --git a/node_modules/browserify/node_modules/browser-pack/node_modules/combine-source-map/node_modules/inline-source-map/index.js b/node_modules/browserify/node_modules/browser-pack/node_modules/combine-source-map/node_modules/inline-source-map/index.js deleted file mode 100644 index 97419f42..00000000 --- a/node_modules/browserify/node_modules/browser-pack/node_modules/combine-source-map/node_modules/inline-source-map/index.js +++ /dev/null @@ -1,129 +0,0 @@ -'use strict'; -var SourceMapGenerator = require('source-map').SourceMapGenerator; - -function offsetMapping(mapping, offset) { - return { line: offset.line + mapping.line, column: offset.column + mapping.column }; -} - -function newlinesIn(src) { - if (!src) return 0; - var newlines = src.match(/\n/g); - - return newlines ? newlines.length : 0; -} - -function Generator(opts) { - opts = opts || {}; - this.generator = new SourceMapGenerator({ file: opts.file || '', sourceRoot: opts.sourceRoot || '' }); - this.sourcesContent = undefined; - this.opts = opts; -} - -/** - * Adds the given mappings to the generator and offsets them if offset is given - * - * @name addMappings - * @function - * @param sourceFile {String} name of the source file - * @param mappings {Array{{Object}} each object has the form { original: { line: _, column: _ }, generated: { line: _, column: _ } } - * @param offset {Object} offset to apply to each mapping. Has the form { line: _, column: _ } - * @return {Object} the generator to allow chaining - */ -Generator.prototype.addMappings = function (sourceFile, mappings, offset) { - var generator = this.generator; - - offset = offset || {}; - offset.line = offset.hasOwnProperty('line') ? offset.line : 0; - offset.column = offset.hasOwnProperty('column') ? offset.column : 0; - - mappings.forEach(function (m) { - // only set source if we have original position to handle edgecase (see inline-source-map tests) - generator.addMapping({ - source : m.original ? sourceFile : undefined - , original : m.original - , generated : offsetMapping(m.generated, offset) - }); - }); - return this; -}; - -/** - * Generates mappings for the given source, assuming that no translation from original to generated is necessary. - * - * @name addGeneratedMappings - * @function - * @param sourceFile {String} name of the source file - * @param source {String} source of the file - * @param offset {Object} offset to apply to each mapping. Has the form { line: _, column: _ } - * @return {Object} the generator to allow chaining - */ -Generator.prototype.addGeneratedMappings = function (sourceFile, source, offset) { - var mappings = [] - , linesToGenerate = newlinesIn(source) + 1; - - for (var line = 1; line <= linesToGenerate; line++) { - var location = { line: line, column: 0 }; - mappings.push({ original: location, generated: location }); - } - - return this.addMappings(sourceFile, mappings, offset); -}; - -/** - * Adds source content for the given source file. - * - * @name addSourceContent - * @function - * @param sourceFile {String} The source file for which a mapping is included - * @param sourcesContent {String} The content of the source file - * @return {Object} The generator to allow chaining - */ -Generator.prototype.addSourceContent = function (sourceFile, sourcesContent) { - this.sourcesContent = this.sourcesContent || {}; - this.sourcesContent[sourceFile] = sourcesContent; - return this; -}; - -/** - * @name base64Encode - * @function - * @return {String} bas64 encoded representation of the added mappings - */ -Generator.prototype.base64Encode = function () { - var map = this.toString(); - return new Buffer(map).toString('base64'); -}; - -/** - * @name inlineMappingUrl - * @function - * @return {String} comment with base64 encoded representation of the added mappings. Can be inlined at the end of the generated file. - */ -Generator.prototype.inlineMappingUrl = function () { - var charset = this.opts.charset || 'utf-8'; - return '//# sourceMappingURL=data:application/json;charset:' + charset + ';base64,' + this.base64Encode(); -}; - -Generator.prototype.toJSON = function () { - var map = this.generator.toJSON(); - if (!this.sourcesContent) return map; - - var toSourcesContent = (function (s) { return this.sourcesContent[s] || null; }).bind(this); - map.sourcesContent = map.sources.map(toSourcesContent); - return map; -}; - -Generator.prototype.toString = function () { - return JSON.stringify(this); -}; - -Generator.prototype._mappings = function () { - return this.generator._mappings._array; -}; - -Generator.prototype.gen = function () { - return this.generator; -}; - -module.exports = function (opts) { return new Generator(opts); }; -module.exports.Generator = Generator; diff --git a/node_modules/browserify/node_modules/browser-pack/node_modules/combine-source-map/node_modules/inline-source-map/package.json b/node_modules/browserify/node_modules/browser-pack/node_modules/combine-source-map/node_modules/inline-source-map/package.json deleted file mode 100644 index 3cd8533d..00000000 --- a/node_modules/browserify/node_modules/browser-pack/node_modules/combine-source-map/node_modules/inline-source-map/package.json +++ /dev/null @@ -1,70 +0,0 @@ -{ - "name": "inline-source-map", - "version": "0.5.0", - "description": "Adds source mappings and base64 encodes them, so they can be inlined in your generated file.", - "main": "index.js", - "scripts": { - "test-main": "tap test/*.js", - "test-0.8": "nave use 0.8 npm run test-main", - "test-0.10": "nave use 0.10 npm run test-main", - "test-0.12": "nave use 0.12 npm run test-main", - "test-all": "npm run test-main && npm run test-0.8 && npm run test-0.10 && npm run test-0.12", - "test": "if [ -e $TRAVIS ]; then npm run test-all; else npm run test-main; fi" - }, - "repository": { - "type": "git", - "url": "git://github.com/thlorenz/inline-source-map.git" - }, - "homepage": "https://github.com/thlorenz/inline-source-map", - "dependencies": { - "source-map": "~0.4.0" - }, - "devDependencies": { - "tap": "~0.7.0", - "nave": "~0.5.0" - }, - "keywords": [ - "source", - "map", - "inline", - "base64", - "bundle", - "generate", - "transpile" - ], - "author": { - "name": "Thorsten Lorenz", - "email": "thlorenz@gmx.de", - "url": "http://thlorenz.com" - }, - "license": "MIT", - "engine": { - "node": ">=0.6" - }, - "gitHead": "38625bdbb684712db90833373640f4bec7671784", - "bugs": { - "url": "https://github.com/thlorenz/inline-source-map/issues" - }, - "_id": "inline-source-map@0.5.0", - "_shasum": "4a4c5dd8e4fb5e9b3cda60c822dfadcaee66e0af", - "_from": "inline-source-map@>=0.5.0 <0.6.0", - "_npmVersion": "2.5.1", - "_nodeVersion": "1.2.0", - "_npmUser": { - "name": "thlorenz", - "email": "thlorenz@gmx.de" - }, - "maintainers": [ - { - "name": "thlorenz", - "email": "thlorenz@gmx.de" - } - ], - "dist": { - "shasum": "4a4c5dd8e4fb5e9b3cda60c822dfadcaee66e0af", - "tarball": "https://registry.npmjs.org/inline-source-map/-/inline-source-map-0.5.0.tgz" - }, - "directories": {}, - "_resolved": "https://registry.npmjs.org/inline-source-map/-/inline-source-map-0.5.0.tgz", - "readme": "ERROR: No README data found!" -} diff --git a/node_modules/browserify/node_modules/browser-pack/node_modules/combine-source-map/node_modules/inline-source-map/test/inline-source-map.js b/node_modules/browserify/node_modules/browser-pack/node_modules/combine-source-map/node_modules/inline-source-map/test/inline-source-map.js deleted file mode 100644 index 7b8be84c..00000000 --- a/node_modules/browserify/node_modules/browser-pack/node_modules/combine-source-map/node_modules/inline-source-map/test/inline-source-map.js +++ /dev/null @@ -1,342 +0,0 @@ -'use strict'; -/*jshint asi: true*/ - -var test = require('tap').test -var generator = require('..'); - -var foo = '' + function foo () { - var hello = 'hello'; - var world = 'world'; - console.log('%s %s', hello, world); -} - -var bar = '' + function bar () { - console.log('yes?'); -} - -function decode(base64) { - return new Buffer(base64, 'base64').toString(); -} - -function inspect(obj, depth) { - console.error(require('util').inspect(obj, false, depth || 5, true)); -} - -test('generated mappings', function (t) { - - t.test('one file no offset', function (t) { - var gen = generator() - .addGeneratedMappings('foo.js', foo) - - t.deepEqual( - gen._mappings() - , [ { generatedLine: 1, - generatedColumn: 0, - originalLine: 1, - originalColumn: 0, - source: 'foo.js', - name: null }, - { generatedLine: 2, - generatedColumn: 0, - originalLine: 2, - originalColumn: 0, - source: 'foo.js', - name: null }, - { generatedLine: 3, - generatedColumn: 0, - originalLine: 3, - originalColumn: 0, - source: 'foo.js', - name: null }, - { generatedLine: 4, - generatedColumn: 0, - originalLine: 4, - originalColumn: 0, - source: 'foo.js', - name: null }, - { generatedLine: 5, - generatedColumn: 0, - originalLine: 5, - originalColumn: 0, - source: 'foo.js', - name: null } ] - , 'generates correct mappings' - ) - - t.deepEqual( - JSON.parse(decode(gen.base64Encode())) - , {"version":3,"file":"","sources":["foo.js"],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA","sourceRoot":""} - , 'encodes generated mappings' - ) - t.equal( - gen.inlineMappingUrl() - , '//# sourceMappingURL=data:application/json;charset:utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImZvby5qcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBIiwiZmlsZSI6IiIsInNvdXJjZVJvb3QiOiIifQ==' - , 'returns correct inline mapping url' - ) - t.end() - }) - - t.test('two files no offset', function (t) { - var gen = generator() - .addGeneratedMappings('foo.js', foo) - .addGeneratedMappings('bar.js', bar) - - t.deepEqual( - gen._mappings() - , [ { generatedLine: 1, - generatedColumn: 0, - originalLine: 1, - originalColumn: 0, - source: 'foo.js', - name: null }, - { generatedLine: 2, - generatedColumn: 0, - originalLine: 2, - originalColumn: 0, - source: 'foo.js', - name: null }, - { generatedLine: 3, - generatedColumn: 0, - originalLine: 3, - originalColumn: 0, - source: 'foo.js', - name: null }, - { generatedLine: 4, - generatedColumn: 0, - originalLine: 4, - originalColumn: 0, - source: 'foo.js', - name: null }, - { generatedLine: 5, - generatedColumn: 0, - originalLine: 5, - originalColumn: 0, - source: 'foo.js', - name: null }, - { generatedLine: 1, - generatedColumn: 0, - originalLine: 1, - originalColumn: 0, - source: 'bar.js', - name: null }, - { generatedLine: 2, - generatedColumn: 0, - originalLine: 2, - originalColumn: 0, - source: 'bar.js', - name: null }, - { generatedLine: 3, - generatedColumn: 0, - originalLine: 3, - originalColumn: 0, - source: 'bar.js', - name: null } ] - , 'generates correct mappings' - ) - t.deepEqual( - JSON.parse(decode(gen.base64Encode())) - , {"version":3,"file":"","sources":["foo.js","bar.js"],"names":[],"mappings":"ACAA,ADAA;ACCA,ADAA;ACCA,ADAA;AACA;AACA","sourceRoot": ""} - , 'encodes generated mappings' - ) - t.equal( - gen.inlineMappingUrl() - , '//# sourceMappingURL=data:application/json;charset:utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImZvby5qcyIsImJhci5qcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUNBQSxBREFBO0FDQ0EsQURBQTtBQ0NBLEFEQUE7QUFDQTtBQUNBIiwiZmlsZSI6IiIsInNvdXJjZVJvb3QiOiIifQ==' - , 'returns correct inline mapping url' - ) - t.end() - }) - - t.test('one line source', function (t) { - var gen = generator().addGeneratedMappings('one-liner.js', 'console.log("line one");') - t.deepEqual( - gen._mappings() - , [ { generatedLine: 1, - generatedColumn: 0, - originalLine: 1, - originalColumn: 0, - source: 'one-liner.js', - name: null } ] - , 'generates correct mappings' - ) - t.end() - }) - - t.test('with offset', function (t) { - var gen = generator() - .addGeneratedMappings('foo.js', foo, { line: 20 }) - .addGeneratedMappings('bar.js', bar, { line: 23, column: 22 }) - - t.deepEqual( - gen._mappings() - , [ { generatedLine: 21, - generatedColumn: 0, - originalLine: 1, - originalColumn: 0, - source: 'foo.js', - name: null }, - { generatedLine: 22, - generatedColumn: 0, - originalLine: 2, - originalColumn: 0, - source: 'foo.js', - name: null }, - { generatedLine: 23, - generatedColumn: 0, - originalLine: 3, - originalColumn: 0, - source: 'foo.js', - name: null }, - { generatedLine: 24, - generatedColumn: 0, - originalLine: 4, - originalColumn: 0, - source: 'foo.js', - name: null }, - { generatedLine: 25, - generatedColumn: 0, - originalLine: 5, - originalColumn: 0, - source: 'foo.js', - name: null }, - { generatedLine: 24, - generatedColumn: 22, - originalLine: 1, - originalColumn: 0, - source: 'bar.js', - name: null }, - { generatedLine: 25, - generatedColumn: 22, - originalLine: 2, - originalColumn: 0, - source: 'bar.js', - name: null }, - { generatedLine: 26, - generatedColumn: 22, - originalLine: 3, - originalColumn: 0, - source: 'bar.js', - name: null } ] - , 'generates correct mappings' - ) - - t.deepEqual( - JSON.parse(decode(gen.base64Encode())) - , {"version":3,"file":"","sources":["foo.js","bar.js"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AACA;AACA;AACA,sBCHA;ADIA,sBCHA;sBACA", "sourceRoot": ""} - , 'encodes generated mappings with offset' - ) - t.end() - }) -}) - -test('given mappings, with one having no original', function (t) { - t.test('no offset', function (t) { - var gen = generator() - .addMappings('foo.js', [{ original: { line: 2, column: 3 } , generated: { line: 5, column: 10 } }]) - - // This addresses an edgecase in which a transpiler generates mappings but doesn't include the original position. - // If we set source to sourceFile (as usual) in that case, the mappings are considered invalid by the source-map module's - // SourceMapGenerator. Keeping source undefined fixes this problem. - // Raised issue: https://github.com/thlorenz/inline-source-map/issues/2 - // Validate function: https://github.com/mozilla/source-map/blob/a3372ea78e662582087dd25ebda999c06424e047/lib/source-map/source-map-generator.js#L232 - .addMappings('bar.js', [ - { original: { line: 6, column: 0 } , generated: { line: 7, column: 20 } } - , { generated: { line: 8, column: 30 } } - ]) - - t.deepEqual( - gen._mappings() - , [ { generatedLine: 5, - generatedColumn: 10, - originalLine: 2, - originalColumn: 3, - source: 'foo.js', - name: null }, - { generatedLine: 7, - generatedColumn: 20, - originalLine: 6, - originalColumn: 0, - source: 'bar.js', - name: null }, - { generatedLine: 8, - generatedColumn: 30, - originalLine: false, - originalColumn: false, - source: undefined, - name: null } ] - , 'adds correct mappings' - ) - t.deepEqual( - JSON.parse(decode(gen.base64Encode())) - , {"version":3,"file":"","sources":["foo.js","bar.js"],"names":[],"mappings":";;;;UACG;;oBCIH;8B", sourceRoot: ""} - , 'encodes generated mappings' - ) - t.equal( - gen.inlineMappingUrl() - , '//# sourceMappingURL=data:application/json;charset:utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImZvby5qcyIsImJhci5qcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7O1VBQ0c7O29CQ0lIOzhCIiwiZmlsZSI6IiIsInNvdXJjZVJvb3QiOiIifQ==' - , 'returns correct inline mapping url' - ) - t.end() - }) - - t.test('with offset', function (t) { - var gen = generator() - .addMappings('foo.js', [{ original: { line: 2, column: 3 } , generated: { line: 5, column: 10 } }], { line: 5 }) - .addMappings('bar.js', [{ original: { line: 6, column: 0 } , generated: { line: 7, column: 20 } }, { generated: { line: 8, column: 30 } }], { line: 9, column: 3 }) - - t.deepEqual( - gen._mappings() - , [ { generatedLine: 10, - generatedColumn: 10, - originalLine: 2, - originalColumn: 3, - source: 'foo.js', - name: null }, - { generatedLine: 16, - generatedColumn: 23, - originalLine: 6, - originalColumn: 0, - source: 'bar.js', - name: null }, - { generatedLine: 17, - generatedColumn: 33, - originalLine: false, - originalColumn: false, - source: undefined, - name: null } ] - , 'adds correct mappings' - ) - t.deepEqual( - JSON.parse(decode(gen.base64Encode())) - , {"version":3,"file":"","sources":["foo.js","bar.js"],"names":[],"mappings":";;;;;;;;;UACG;;;;;;uBCIH;iC", sourceRoot: ""} - , 'encodes mappings with offset' - ) - t.end() - }) -}); - -test('inline mapping url with charset opt', function(t){ - t.test('set inline mapping url charset to gbk', function(t){ - var gen = generator({charset: 'gbk'}) - .addGeneratedMappings('foo.js', foo); - t.equal( - gen.inlineMappingUrl(), - '//# sourceMappingURL=data:application/json;charset:gbk;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImZvby5qcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBIiwiZmlsZSI6IiIsInNvdXJjZVJvb3QiOiIifQ==', - 'charset set to gbk' - ); - - t.end(); - }); - - t.test('default charset should be utf-8', function(t){ - var gen = generator() - .addGeneratedMappings('foo.js', foo); - - t.equal( - gen.inlineMappingUrl(), - '//# sourceMappingURL=data:application/json;charset:utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImZvby5qcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBIiwiZmlsZSI6IiIsInNvdXJjZVJvb3QiOiIifQ==', - 'charset default to utf-8' - ); - - t.end(); - }); -}); diff --git a/node_modules/browserify/node_modules/browser-pack/node_modules/combine-source-map/node_modules/inline-source-map/test/source-content.js b/node_modules/browserify/node_modules/browser-pack/node_modules/combine-source-map/node_modules/inline-source-map/test/source-content.js deleted file mode 100644 index 051d058f..00000000 --- a/node_modules/browserify/node_modules/browser-pack/node_modules/combine-source-map/node_modules/inline-source-map/test/source-content.js +++ /dev/null @@ -1,135 +0,0 @@ -'use strict'; -/*jshint asi: true*/ - -var test = require('tap').test -var generator = require('..'); - -var foo = '' + function foo () { - var hello = 'hello'; - var world = 'world'; - console.log('%s %s', hello, world); -} - -var bar = '' + function bar () { - console.log('yes?'); -} - -function decode(base64) { - return new Buffer(base64, 'base64').toString(); -} - -function inspect(obj, depth) { - console.log(require('util').inspect(obj, false, depth || 5, true)); -} - -test('generated mappings', function (t) { - - t.test('one file with source content', function (t) { - var gen = generator() - .addGeneratedMappings('foo.js', foo) - .addSourceContent('foo.js', foo) - - t.deepEqual( - gen.toJSON() - , { "version": 3, - "file": "", - "sources": [ - "foo.js" - ], - "names": [], - "mappings": "AAAA;AACA;AACA;AACA;AACA", - "sourceRoot": "", - "sourcesContent": [ - "function foo() {\n var hello = 'hello';\n var world = 'world';\n console.log('%s %s', hello, world);\n}" - ], - } - , 'includes source content' - ) - - t.equal( - decode(gen.base64Encode()) - , '{"version":3,"sources":["foo.js"],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA","file":"","sourceRoot":"","sourcesContent":["function foo() {\\n var hello = \'hello\';\\n var world = \'world\';\\n console.log(\'%s %s\', hello, world);\\n}"]}' - , 'encodes generated mappings including source content' - ) - t.equal( - gen.inlineMappingUrl() - , '//# sourceMappingURL=data:application/json;charset:utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImZvby5qcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBIiwiZmlsZSI6IiIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzQ29udGVudCI6WyJmdW5jdGlvbiBmb28oKSB7XG4gIHZhciBoZWxsbyA9ICdoZWxsbyc7XG4gIHZhciB3b3JsZCA9ICd3b3JsZCc7XG4gIGNvbnNvbGUubG9nKCclcyAlcycsIGhlbGxvLCB3b3JsZCk7XG59Il19' - , 'returns correct inline mapping url including source content' - ) - t.end() - }) - - t.test('two files with source content', function (t) { - var gen = generator() - .addGeneratedMappings('foo.js', foo) - .addSourceContent('foo.js', foo) - .addGeneratedMappings('bar.js', bar) - .addSourceContent('bar.js', bar) - - t.deepEqual( - gen.toJSON() - , { "version": 3, - "file": "", - "sources": [ - "foo.js", - "bar.js" - ], - "names": [], - "mappings": "ACAA,ADAA;ACCA,ADAA;ACCA,ADAA;AACA;AACA", - "sourceRoot": "", - "sourcesContent": [ - "function foo() {\n var hello = 'hello';\n var world = 'world';\n console.log('%s %s', hello, world);\n}", - "function bar() {\n console.log('yes?');\n}" - ], - } - , 'includes source content for both files' - ) - - t.deepEqual( - decode(gen.base64Encode()) - , '{"version":3,"sources":["foo.js","bar.js"],"names":[],"mappings":"ACAA,ADAA;ACCA,ADAA;ACCA,ADAA;AACA;AACA","file":"","sourceRoot":"","sourcesContent":["function foo() {\\n var hello = \'hello\';\\n var world = \'world\';\\n console.log(\'%s %s\', hello, world);\\n}","function bar() {\\n console.log(\'yes?\');\\n}"]}' - , 'encodes generated mappings including source content' - ) - t.equal( - gen.inlineMappingUrl() - , '//# sourceMappingURL=data:application/json;charset:utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImZvby5qcyIsImJhci5qcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUNBQSxBREFBO0FDQ0EsQURBQTtBQ0NBLEFEQUE7QUFDQTtBQUNBIiwiZmlsZSI6IiIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzQ29udGVudCI6WyJmdW5jdGlvbiBmb28oKSB7XG4gIHZhciBoZWxsbyA9ICdoZWxsbyc7XG4gIHZhciB3b3JsZCA9ICd3b3JsZCc7XG4gIGNvbnNvbGUubG9nKCclcyAlcycsIGhlbGxvLCB3b3JsZCk7XG59IiwiZnVuY3Rpb24gYmFyKCkge1xuICBjb25zb2xlLmxvZygneWVzPycpO1xufSJdfQ==' - , 'returns correct inline mapping url including source content' - ) - t.end() - }) - - t.test('two files, only one with source content', function (t) { - var gen = generator() - .addGeneratedMappings('foo.js', foo) - .addGeneratedMappings('bar.js', bar) - .addSourceContent('bar.js', bar) - - t.deepEqual( - gen.toJSON() - , { "version": 3, - "file": "", - "sources": [ - "foo.js", - "bar.js" - ], - "names": [], - "mappings": "ACAA,ADAA;ACCA,ADAA;ACCA,ADAA;AACA;AACA", - "sourcesContent": [ null, "function bar() {\n console.log('yes?');\n}" ], - "sourceRoot": "" - } - , 'includes source content for the file with source content and [null] for the other file' - ) - - t.deepEqual( - decode(gen.base64Encode()) - , '{"version":3,"sources":["foo.js","bar.js"],"names":[],"mappings":"ACAA,ADAA;ACCA,ADAA;ACCA,ADAA;AACA;AACA","file":"","sourceRoot":"","sourcesContent":[null,"function bar() {\\n console.log(\'yes?\');\\n}"]}' - , 'encodes generated mappings including source content' - ) - t.equal( - gen.inlineMappingUrl() - , '//# sourceMappingURL=data:application/json;charset:utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImZvby5qcyIsImJhci5qcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUNBQSxBREFBO0FDQ0EsQURBQTtBQ0NBLEFEQUE7QUFDQTtBQUNBIiwiZmlsZSI6IiIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzQ29udGVudCI6W251bGwsImZ1bmN0aW9uIGJhcigpIHtcbiAgY29uc29sZS5sb2coJ3llcz8nKTtcbn0iXX0=' - , 'returns correct inline mapping url including source content' - ) - t.end() - }) -}) diff --git a/node_modules/browserify/node_modules/browser-pack/node_modules/combine-source-map/node_modules/lodash.memoize/LICENSE.txt b/node_modules/browserify/node_modules/browser-pack/node_modules/combine-source-map/node_modules/lodash.memoize/LICENSE.txt deleted file mode 100644 index 9cd87e5d..00000000 --- a/node_modules/browserify/node_modules/browser-pack/node_modules/combine-source-map/node_modules/lodash.memoize/LICENSE.txt +++ /dev/null @@ -1,22 +0,0 @@ -Copyright 2012-2015 The Dojo Foundation -Based on Underscore.js, copyright 2009-2015 Jeremy Ashkenas, -DocumentCloud and Investigative Reporters & Editors - -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/node_modules/browserify/node_modules/browser-pack/node_modules/combine-source-map/node_modules/lodash.memoize/README.md b/node_modules/browserify/node_modules/browser-pack/node_modules/combine-source-map/node_modules/lodash.memoize/README.md deleted file mode 100644 index a417e274..00000000 --- a/node_modules/browserify/node_modules/browser-pack/node_modules/combine-source-map/node_modules/lodash.memoize/README.md +++ /dev/null @@ -1,20 +0,0 @@ -# lodash.memoize v3.0.4 - -The [modern build](https://github.com/lodash/lodash/wiki/Build-Differences) of [lodash’s](https://lodash.com/) `_.memoize` exported as a [Node.js](http://nodejs.org/)/[io.js](https://iojs.org/) module. - -## Installation - -Using npm: - -```bash -$ {sudo -H} npm i -g npm -$ npm i --save lodash.memoize -``` - -In Node.js/io.js: - -```js -var memoize = require('lodash.memoize'); -``` - -See the [documentation](https://lodash.com/docs#memoize) or [package source](https://github.com/lodash/lodash/blob/3.0.4-npm-packages/lodash.memoize) for more details. diff --git a/node_modules/browserify/node_modules/browser-pack/node_modules/combine-source-map/node_modules/lodash.memoize/index.js b/node_modules/browserify/node_modules/browser-pack/node_modules/combine-source-map/node_modules/lodash.memoize/index.js deleted file mode 100644 index 8cb054a4..00000000 --- a/node_modules/browserify/node_modules/browser-pack/node_modules/combine-source-map/node_modules/lodash.memoize/index.js +++ /dev/null @@ -1,167 +0,0 @@ -/** - * lodash 3.0.4 (Custom Build) - * Build: `lodash modern modularize exports="npm" -o ./` - * Copyright 2012-2015 The Dojo Foundation - * Based on Underscore.js 1.8.3 - * Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - * Available under MIT license - */ - -/** Used as the `TypeError` message for "Functions" methods. */ -var FUNC_ERROR_TEXT = 'Expected a function'; - -/** Used for native method references. */ -var objectProto = Object.prototype; - -/** Used to check objects for own properties. */ -var hasOwnProperty = objectProto.hasOwnProperty; - -/** - * Creates a cache object to store key/value pairs. - * - * @private - * @static - * @name Cache - * @memberOf _.memoize - */ -function MapCache() { - this.__data__ = {}; -} - -/** - * Removes `key` and its value from the cache. - * - * @private - * @name delete - * @memberOf _.memoize.Cache - * @param {string} key The key of the value to remove. - * @returns {boolean} Returns `true` if the entry was removed successfully, else `false`. - */ -function mapDelete(key) { - return this.has(key) && delete this.__data__[key]; -} - -/** - * Gets the cached value for `key`. - * - * @private - * @name get - * @memberOf _.memoize.Cache - * @param {string} key The key of the value to get. - * @returns {*} Returns the cached value. - */ -function mapGet(key) { - return key == '__proto__' ? undefined : this.__data__[key]; -} - -/** - * Checks if a cached value for `key` exists. - * - * @private - * @name has - * @memberOf _.memoize.Cache - * @param {string} key The key of the entry to check. - * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. - */ -function mapHas(key) { - return key != '__proto__' && hasOwnProperty.call(this.__data__, key); -} - -/** - * Sets `value` to `key` of the cache. - * - * @private - * @name set - * @memberOf _.memoize.Cache - * @param {string} key The key of the value to cache. - * @param {*} value The value to cache. - * @returns {Object} Returns the cache object. - */ -function mapSet(key, value) { - if (key != '__proto__') { - this.__data__[key] = value; - } - return this; -} - -/** - * Creates a function that memoizes the result of `func`. If `resolver` is - * provided it determines the cache key for storing the result based on the - * arguments provided to the memoized function. By default, the first argument - * provided to the memoized function is coerced to a string and used as the - * cache key. The `func` is invoked with the `this` binding of the memoized - * function. - * - * **Note:** The cache is exposed as the `cache` property on the memoized - * function. Its creation may be customized by replacing the `_.memoize.Cache` - * constructor with one whose instances implement the [`Map`](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-properties-of-the-map-prototype-object) - * method interface of `get`, `has`, and `set`. - * - * @static - * @memberOf _ - * @category Function - * @param {Function} func The function to have its output memoized. - * @param {Function} [resolver] The function to resolve the cache key. - * @returns {Function} Returns the new memoizing function. - * @example - * - * var upperCase = _.memoize(function(string) { - * return string.toUpperCase(); - * }); - * - * upperCase('fred'); - * // => 'FRED' - * - * // modifying the result cache - * upperCase.cache.set('fred', 'BARNEY'); - * upperCase('fred'); - * // => 'BARNEY' - * - * // replacing `_.memoize.Cache` - * var object = { 'user': 'fred' }; - * var other = { 'user': 'barney' }; - * var identity = _.memoize(_.identity); - * - * identity(object); - * // => { 'user': 'fred' } - * identity(other); - * // => { 'user': 'fred' } - * - * _.memoize.Cache = WeakMap; - * var identity = _.memoize(_.identity); - * - * identity(object); - * // => { 'user': 'fred' } - * identity(other); - * // => { 'user': 'barney' } - */ -function memoize(func, resolver) { - if (typeof func != 'function' || (resolver && typeof resolver != 'function')) { - throw new TypeError(FUNC_ERROR_TEXT); - } - var memoized = function() { - var args = arguments, - key = resolver ? resolver.apply(this, args) : args[0], - cache = memoized.cache; - - if (cache.has(key)) { - return cache.get(key); - } - var result = func.apply(this, args); - memoized.cache = cache.set(key, result); - return result; - }; - memoized.cache = new memoize.Cache; - return memoized; -} - -// Add functions to the `Map` cache. -MapCache.prototype['delete'] = mapDelete; -MapCache.prototype.get = mapGet; -MapCache.prototype.has = mapHas; -MapCache.prototype.set = mapSet; - -// Assign cache to `_.memoize`. -memoize.Cache = MapCache; - -module.exports = memoize; diff --git a/node_modules/browserify/node_modules/browser-pack/node_modules/combine-source-map/node_modules/lodash.memoize/package.json b/node_modules/browserify/node_modules/browser-pack/node_modules/combine-source-map/node_modules/lodash.memoize/package.json deleted file mode 100644 index a068b61b..00000000 --- a/node_modules/browserify/node_modules/browser-pack/node_modules/combine-source-map/node_modules/lodash.memoize/package.json +++ /dev/null @@ -1,94 +0,0 @@ -{ - "name": "lodash.memoize", - "version": "3.0.4", - "description": "The modern build of lodash’s `_.memoize` as a module.", - "homepage": "https://lodash.com/", - "icon": "https://lodash.com/icon.svg", - "license": "MIT", - "keywords": [ - "lodash", - "lodash-modularized", - "stdlib", - "util" - ], - "author": { - "name": "John-David Dalton", - "email": "john.david.dalton@gmail.com", - "url": "http://allyoucanleet.com/" - }, - "contributors": [ - { - "name": "John-David Dalton", - "email": "john.david.dalton@gmail.com", - "url": "http://allyoucanleet.com/" - }, - { - "name": "Benjamin Tan", - "email": "demoneaux@gmail.com", - "url": "https://d10.github.io/" - }, - { - "name": "Blaine Bublitz", - "email": "blaine@iceddev.com", - "url": "http://www.iceddev.com/" - }, - { - "name": "Kit Cambridge", - "email": "github@kitcambridge.be", - "url": "http://kitcambridge.be/" - }, - { - "name": "Mathias Bynens", - "email": "mathias@qiwi.be", - "url": "https://mathiasbynens.be/" - } - ], - "repository": { - "type": "git", - "url": "git+https://github.com/lodash/lodash.git" - }, - "scripts": { - "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" - }, - "bugs": { - "url": "https://github.com/lodash/lodash/issues" - }, - "_id": "lodash.memoize@3.0.4", - "_shasum": "2dcbd2c287cbc0a55cc42328bd0c736150d53e3f", - "_from": "lodash.memoize@>=3.0.3 <3.1.0", - "_npmVersion": "2.10.0", - "_nodeVersion": "0.12.3", - "_npmUser": { - "name": "jdalton", - "email": "john.david.dalton@gmail.com" - }, - "maintainers": [ - { - "name": "jdalton", - "email": "john.david.dalton@gmail.com" - }, - { - "name": "kitcambridge", - "email": "github@kitcambridge.be" - }, - { - "name": "mathias", - "email": "mathias@qiwi.be" - }, - { - "name": "phated", - "email": "blaine@iceddev.com" - }, - { - "name": "d10", - "email": "demoneaux@gmail.com" - } - ], - "dist": { - "shasum": "2dcbd2c287cbc0a55cc42328bd0c736150d53e3f", - "tarball": "https://registry.npmjs.org/lodash.memoize/-/lodash.memoize-3.0.4.tgz" - }, - "directories": {}, - "_resolved": "https://registry.npmjs.org/lodash.memoize/-/lodash.memoize-3.0.4.tgz", - "readme": "ERROR: No README data found!" -} diff --git a/node_modules/browserify/node_modules/browser-pack/node_modules/combine-source-map/node_modules/source-map/README.md b/node_modules/browserify/node_modules/browser-pack/node_modules/combine-source-map/node_modules/source-map/README.md deleted file mode 100644 index b7c6786c..00000000 --- a/node_modules/browserify/node_modules/browser-pack/node_modules/combine-source-map/node_modules/source-map/README.md +++ /dev/null @@ -1,510 +0,0 @@ -# Source Map - -This is a library to generate and consume the source map format -[described here][format]. - -This library is written in the Asynchronous Module Definition format, and works -in the following environments: - -* Modern Browsers supporting ECMAScript 5 (either after the build, or with an - AMD loader such as RequireJS) - -* Inside Firefox (as a JSM file, after the build) - -* With NodeJS versions 0.8.X and higher - -## Node - - $ npm install source-map - -## Building from Source (for everywhere else) - -Install Node and then run - - $ git clone https://fitzgen@github.com/mozilla/source-map.git - $ cd source-map - $ npm link . - -Next, run - - $ node Makefile.dryice.js - -This should spew a bunch of stuff to stdout, and create the following files: - -* `dist/source-map.js` - The unminified browser version. - -* `dist/source-map.min.js` - The minified browser version. - -* `dist/SourceMap.jsm` - The JavaScript Module for inclusion in Firefox source. - -## Examples - -### Consuming a source map - -```js -var rawSourceMap = { - version: 3, - file: 'min.js', - names: ['bar', 'baz', 'n'], - sources: ['one.js', 'two.js'], - sourceRoot: 'http://example.com/www/js/', - mappings: 'CAAC,IAAI,IAAM,SAAUA,GAClB,OAAOC,IAAID;CCDb,IAAI,IAAM,SAAUE,GAClB,OAAOA' -}; - -var smc = new SourceMapConsumer(rawSourceMap); - -console.log(smc.sources); -// [ 'http://example.com/www/js/one.js', -// 'http://example.com/www/js/two.js' ] - -console.log(smc.originalPositionFor({ - line: 2, - column: 28 -})); -// { source: 'http://example.com/www/js/two.js', -// line: 2, -// column: 10, -// name: 'n' } - -console.log(smc.generatedPositionFor({ - source: 'http://example.com/www/js/two.js', - line: 2, - column: 10 -})); -// { line: 2, column: 28 } - -smc.eachMapping(function (m) { - // ... -}); -``` - -### Generating a source map - -In depth guide: -[**Compiling to JavaScript, and Debugging with Source Maps**](https://hacks.mozilla.org/2013/05/compiling-to-javascript-and-debugging-with-source-maps/) - -#### With SourceNode (high level API) - -```js -function compile(ast) { - switch (ast.type) { - case 'BinaryExpression': - return new SourceNode( - ast.location.line, - ast.location.column, - ast.location.source, - [compile(ast.left), " + ", compile(ast.right)] - ); - case 'Literal': - return new SourceNode( - ast.location.line, - ast.location.column, - ast.location.source, - String(ast.value) - ); - // ... - default: - throw new Error("Bad AST"); - } -} - -var ast = parse("40 + 2", "add.js"); -console.log(compile(ast).toStringWithSourceMap({ - file: 'add.js' -})); -// { code: '40 + 2', -// map: [object SourceMapGenerator] } -``` - -#### With SourceMapGenerator (low level API) - -```js -var map = new SourceMapGenerator({ - file: "source-mapped.js" -}); - -map.addMapping({ - generated: { - line: 10, - column: 35 - }, - source: "foo.js", - original: { - line: 33, - column: 2 - }, - name: "christopher" -}); - -console.log(map.toString()); -// '{"version":3,"file":"source-mapped.js","sources":["foo.js"],"names":["christopher"],"mappings":";;;;;;;;;mCAgCEA"}' -``` - -## API - -Get a reference to the module: - -```js -// NodeJS -var sourceMap = require('source-map'); - -// Browser builds -var sourceMap = window.sourceMap; - -// Inside Firefox -let sourceMap = {}; -Components.utils.import('resource:///modules/devtools/SourceMap.jsm', sourceMap); -``` - -### SourceMapConsumer - -A SourceMapConsumer instance represents a parsed source map which we can query -for information about the original file positions by giving it a file position -in the generated source. - -#### new SourceMapConsumer(rawSourceMap) - -The only parameter is the raw source map (either as a string which can be -`JSON.parse`'d, or an object). According to the spec, source maps have the -following attributes: - -* `version`: Which version of the source map spec this map is following. - -* `sources`: An array of URLs to the original source files. - -* `names`: An array of identifiers which can be referrenced by individual - mappings. - -* `sourceRoot`: Optional. The URL root from which all sources are relative. - -* `sourcesContent`: Optional. An array of contents of the original source files. - -* `mappings`: A string of base64 VLQs which contain the actual mappings. - -* `file`: Optional. The generated filename this source map is associated with. - -#### SourceMapConsumer.prototype.computeColumnSpans() - -Compute the last column for each generated mapping. The last column is -inclusive. - -#### SourceMapConsumer.prototype.originalPositionFor(generatedPosition) - -Returns the original source, line, and column information for the generated -source's line and column positions provided. The only argument is an object with -the following properties: - -* `line`: The line number in the generated source. - -* `column`: The column number in the generated source. - -* `bias`: Either `SourceMapConsumer.GREATEST_LOWER_BOUND` or - `SourceMapConsumer.LEAST_UPPER_BOUND`. Specifies whether to return the closest - element that is smaller than or greater than the one we are searching for, - respectively, if the exact element cannot be found. Defaults to - `SourceMapConsumer.GREATEST_LOWER_BOUND`. - -and an object is returned with the following properties: - -* `source`: The original source file, or null if this information is not - available. - -* `line`: The line number in the original source, or null if this information is - not available. - -* `column`: The column number in the original source, or null or null if this - information is not available. - -* `name`: The original identifier, or null if this information is not available. - -#### SourceMapConsumer.prototype.generatedPositionFor(originalPosition) - -Returns the generated line and column information for the original source, -line, and column positions provided. The only argument is an object with -the following properties: - -* `source`: The filename of the original source. - -* `line`: The line number in the original source. - -* `column`: The column number in the original source. - -and an object is returned with the following properties: - -* `line`: The line number in the generated source, or null. - -* `column`: The column number in the generated source, or null. - -#### SourceMapConsumer.prototype.allGeneratedPositionsFor(originalPosition) - -Returns all generated line and column information for the original source, line, -and column provided. If no column is provided, returns all mappings -corresponding to a either the line we are searching for or the next closest line -that has any mappings. Otherwise, returns all mappings corresponding to the -given line and either the column we are searching for or the next closest column -that has any offsets. - -The only argument is an object with the following properties: - -* `source`: The filename of the original source. - -* `line`: The line number in the original source. - -* `column`: Optional. The column number in the original source. - -and an array of objects is returned, each with the following properties: - -* `line`: The line number in the generated source, or null. - -* `column`: The column number in the generated source, or null. - -#### SourceMapConsumer.prototype.hasContentsOfAllSources() - -Return true if we have the embedded source content for every source listed in -the source map, false otherwise. - -In other words, if this method returns `true`, then `smc.sourceContentFor(s)` -will succeed for every source `s` in `smc.sources`. - -#### SourceMapConsumer.prototype.sourceContentFor(source[, returnNullOnMissing]) - -Returns the original source content for the source provided. The only -argument is the URL of the original source file. - -If the source content for the given source is not found, then an error is -thrown. Optionally, pass `true` as the second param to have `null` returned -instead. - -#### SourceMapConsumer.prototype.eachMapping(callback, context, order) - -Iterate over each mapping between an original source/line/column and a -generated line/column in this source map. - -* `callback`: The function that is called with each mapping. Mappings have the - form `{ source, generatedLine, generatedColumn, originalLine, originalColumn, - name }` - -* `context`: Optional. If specified, this object will be the value of `this` - every time that `callback` is called. - -* `order`: Either `SourceMapConsumer.GENERATED_ORDER` or - `SourceMapConsumer.ORIGINAL_ORDER`. Specifies whether you want to iterate over - the mappings sorted by the generated file's line/column order or the - original's source/line/column order, respectively. Defaults to - `SourceMapConsumer.GENERATED_ORDER`. - -### SourceMapGenerator - -An instance of the SourceMapGenerator represents a source map which is being -built incrementally. - -#### new SourceMapGenerator([startOfSourceMap]) - -You may pass an object with the following properties: - -* `file`: The filename of the generated source that this source map is - associated with. - -* `sourceRoot`: A root for all relative URLs in this source map. - -* `skipValidation`: Optional. When `true`, disables validation of mappings as - they are added. This can improve performance but should be used with - discretion, as a last resort. Even then, one should avoid using this flag when - running tests, if possible. - -#### SourceMapGenerator.fromSourceMap(sourceMapConsumer) - -Creates a new SourceMapGenerator based on a SourceMapConsumer - -* `sourceMapConsumer` The SourceMap. - -#### SourceMapGenerator.prototype.addMapping(mapping) - -Add a single mapping from original source line and column to the generated -source's line and column for this source map being created. The mapping object -should have the following properties: - -* `generated`: An object with the generated line and column positions. - -* `original`: An object with the original line and column positions. - -* `source`: The original source file (relative to the sourceRoot). - -* `name`: An optional original token name for this mapping. - -#### SourceMapGenerator.prototype.setSourceContent(sourceFile, sourceContent) - -Set the source content for an original source file. - -* `sourceFile` the URL of the original source file. - -* `sourceContent` the content of the source file. - -#### SourceMapGenerator.prototype.applySourceMap(sourceMapConsumer[, sourceFile[, sourceMapPath]]) - -Applies a SourceMap for a source file to the SourceMap. -Each mapping to the supplied source file is rewritten using the -supplied SourceMap. Note: The resolution for the resulting mappings -is the minimium of this map and the supplied map. - -* `sourceMapConsumer`: The SourceMap to be applied. - -* `sourceFile`: Optional. The filename of the source file. - If omitted, sourceMapConsumer.file will be used, if it exists. - Otherwise an error will be thrown. - -* `sourceMapPath`: Optional. The dirname of the path to the SourceMap - to be applied. If relative, it is relative to the SourceMap. - - This parameter is needed when the two SourceMaps aren't in the same - directory, and the SourceMap to be applied contains relative source - paths. If so, those relative source paths need to be rewritten - relative to the SourceMap. - - If omitted, it is assumed that both SourceMaps are in the same directory, - thus not needing any rewriting. (Supplying `'.'` has the same effect.) - -#### SourceMapGenerator.prototype.toString() - -Renders the source map being generated to a string. - -### SourceNode - -SourceNodes provide a way to abstract over interpolating and/or concatenating -snippets of generated JavaScript source code, while maintaining the line and -column information associated between those snippets and the original source -code. This is useful as the final intermediate representation a compiler might -use before outputting the generated JS and source map. - -#### new SourceNode([line, column, source[, chunk[, name]]]) - -* `line`: The original line number associated with this source node, or null if - it isn't associated with an original line. - -* `column`: The original column number associated with this source node, or null - if it isn't associated with an original column. - -* `source`: The original source's filename; null if no filename is provided. - -* `chunk`: Optional. Is immediately passed to `SourceNode.prototype.add`, see - below. - -* `name`: Optional. The original identifier. - -#### SourceNode.fromStringWithSourceMap(code, sourceMapConsumer[, relativePath]) - -Creates a SourceNode from generated code and a SourceMapConsumer. - -* `code`: The generated code - -* `sourceMapConsumer` The SourceMap for the generated code - -* `relativePath` The optional path that relative sources in `sourceMapConsumer` - should be relative to. - -#### SourceNode.prototype.add(chunk) - -Add a chunk of generated JS to this source node. - -* `chunk`: A string snippet of generated JS code, another instance of - `SourceNode`, or an array where each member is one of those things. - -#### SourceNode.prototype.prepend(chunk) - -Prepend a chunk of generated JS to this source node. - -* `chunk`: A string snippet of generated JS code, another instance of - `SourceNode`, or an array where each member is one of those things. - -#### SourceNode.prototype.setSourceContent(sourceFile, sourceContent) - -Set the source content for a source file. This will be added to the -`SourceMap` in the `sourcesContent` field. - -* `sourceFile`: The filename of the source file - -* `sourceContent`: The content of the source file - -#### SourceNode.prototype.walk(fn) - -Walk over the tree of JS snippets in this node and its children. The walking -function is called once for each snippet of JS and is passed that snippet and -the its original associated source's line/column location. - -* `fn`: The traversal function. - -#### SourceNode.prototype.walkSourceContents(fn) - -Walk over the tree of SourceNodes. The walking function is called for each -source file content and is passed the filename and source content. - -* `fn`: The traversal function. - -#### SourceNode.prototype.join(sep) - -Like `Array.prototype.join` except for SourceNodes. Inserts the separator -between each of this source node's children. - -* `sep`: The separator. - -#### SourceNode.prototype.replaceRight(pattern, replacement) - -Call `String.prototype.replace` on the very right-most source snippet. Useful -for trimming whitespace from the end of a source node, etc. - -* `pattern`: The pattern to replace. - -* `replacement`: The thing to replace the pattern with. - -#### SourceNode.prototype.toString() - -Return the string representation of this source node. Walks over the tree and -concatenates all the various snippets together to one string. - -#### SourceNode.prototype.toStringWithSourceMap([startOfSourceMap]) - -Returns the string representation of this tree of source nodes, plus a -SourceMapGenerator which contains all the mappings between the generated and -original sources. - -The arguments are the same as those to `new SourceMapGenerator`. - -## Tests - -[![Build Status](https://travis-ci.org/mozilla/source-map.png?branch=master)](https://travis-ci.org/mozilla/source-map) - -Install NodeJS version 0.8.0 or greater, then run `node test/run-tests.js`. - -To add new tests, create a new file named `test/test-.js` -and export your test functions with names that start with "test", for example - -```js -exports["test doing the foo bar"] = function (assert, util) { - ... -}; -``` - -The new test will be located automatically when you run the suite. - -The `util` argument is the test utility module located at `test/source-map/util`. - -The `assert` argument is a cut down version of node's assert module. You have -access to the following assertion functions: - -* `doesNotThrow` - -* `equal` - -* `ok` - -* `strictEqual` - -* `throws` - -(The reason for the restricted set of test functions is because we need the -tests to run inside Firefox's test suite as well and so the assert module is -shimmed in that environment. See `build/assert-shim.js`.) - -[format]: https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit -[feature]: https://wiki.mozilla.org/DevTools/Features/SourceMap -[Dryice]: https://github.com/mozilla/dryice diff --git a/node_modules/browserify/node_modules/browser-pack/node_modules/combine-source-map/node_modules/source-map/build/assert-shim.js b/node_modules/browserify/node_modules/browser-pack/node_modules/combine-source-map/node_modules/source-map/build/assert-shim.js deleted file mode 100644 index daa1a623..00000000 --- a/node_modules/browserify/node_modules/browser-pack/node_modules/combine-source-map/node_modules/source-map/build/assert-shim.js +++ /dev/null @@ -1,56 +0,0 @@ -/* -*- Mode: js; js-indent-level: 2; -*- */ -/* - * Copyright 2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - */ -define('test/source-map/assert', ['exports'], function (exports) { - - let do_throw = function (msg) { - throw new Error(msg); - }; - - exports.init = function (throw_fn) { - do_throw = throw_fn; - }; - - exports.doesNotThrow = function (fn) { - try { - fn(); - } - catch (e) { - do_throw(e.message); - } - }; - - exports.equal = function (actual, expected, msg) { - msg = msg || String(actual) + ' != ' + String(expected); - if (actual != expected) { - do_throw(msg); - } - }; - - exports.ok = function (val, msg) { - msg = msg || String(val) + ' is falsey'; - if (!Boolean(val)) { - do_throw(msg); - } - }; - - exports.strictEqual = function (actual, expected, msg) { - msg = msg || String(actual) + ' !== ' + String(expected); - if (actual !== expected) { - do_throw(msg); - } - }; - - exports.throws = function (fn) { - try { - fn(); - do_throw('Expected an error to be thrown, but it wasn\'t.'); - } - catch (e) { - } - }; - -}); diff --git a/node_modules/browserify/node_modules/browser-pack/node_modules/combine-source-map/node_modules/source-map/build/mini-require.js b/node_modules/browserify/node_modules/browser-pack/node_modules/combine-source-map/node_modules/source-map/build/mini-require.js deleted file mode 100644 index 0daf4537..00000000 --- a/node_modules/browserify/node_modules/browser-pack/node_modules/combine-source-map/node_modules/source-map/build/mini-require.js +++ /dev/null @@ -1,152 +0,0 @@ -/* -*- Mode: js; js-indent-level: 2; -*- */ -/* - * Copyright 2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - */ - -/** - * Define a module along with a payload. - * @param {string} moduleName Name for the payload - * @param {ignored} deps Ignored. For compatibility with CommonJS AMD Spec - * @param {function} payload Function with (require, exports, module) params - */ -function define(moduleName, deps, payload) { - if (typeof moduleName != "string") { - throw new TypeError('Expected string, got: ' + moduleName); - } - - if (arguments.length == 2) { - payload = deps; - } - - if (moduleName in define.modules) { - throw new Error("Module already defined: " + moduleName); - } - define.modules[moduleName] = payload; -}; - -/** - * The global store of un-instantiated modules - */ -define.modules = {}; - - -/** - * We invoke require() in the context of a Domain so we can have multiple - * sets of modules running separate from each other. - * This contrasts with JSMs which are singletons, Domains allows us to - * optionally load a CommonJS module twice with separate data each time. - * Perhaps you want 2 command lines with a different set of commands in each, - * for example. - */ -function Domain() { - this.modules = {}; - this._currentModule = null; -} - -(function () { - - /** - * Lookup module names and resolve them by calling the definition function if - * needed. - * There are 2 ways to call this, either with an array of dependencies and a - * callback to call when the dependencies are found (which can happen - * asynchronously in an in-page context) or with a single string an no callback - * where the dependency is resolved synchronously and returned. - * The API is designed to be compatible with the CommonJS AMD spec and - * RequireJS. - * @param {string[]|string} deps A name, or names for the payload - * @param {function|undefined} callback Function to call when the dependencies - * are resolved - * @return {undefined|object} The module required or undefined for - * array/callback method - */ - Domain.prototype.require = function(deps, callback) { - if (Array.isArray(deps)) { - var params = deps.map(function(dep) { - return this.lookup(dep); - }, this); - if (callback) { - callback.apply(null, params); - } - return undefined; - } - else { - return this.lookup(deps); - } - }; - - function normalize(path) { - var bits = path.split('/'); - var i = 1; - while (i < bits.length) { - if (bits[i] === '..') { - bits.splice(i-1, 1); - } else if (bits[i] === '.') { - bits.splice(i, 1); - } else { - i++; - } - } - return bits.join('/'); - } - - function join(a, b) { - a = a.trim(); - b = b.trim(); - if (/^\//.test(b)) { - return b; - } else { - return a.replace(/\/*$/, '/') + b; - } - } - - function dirname(path) { - var bits = path.split('/'); - bits.pop(); - return bits.join('/'); - } - - /** - * Lookup module names and resolve them by calling the definition function if - * needed. - * @param {string} moduleName A name for the payload to lookup - * @return {object} The module specified by aModuleName or null if not found. - */ - Domain.prototype.lookup = function(moduleName) { - if (/^\./.test(moduleName)) { - moduleName = normalize(join(dirname(this._currentModule), moduleName)); - } - - if (moduleName in this.modules) { - var module = this.modules[moduleName]; - return module; - } - - if (!(moduleName in define.modules)) { - throw new Error("Module not defined: " + moduleName); - } - - var module = define.modules[moduleName]; - - if (typeof module == "function") { - var exports = {}; - var previousModule = this._currentModule; - this._currentModule = moduleName; - module(this.require.bind(this), exports, { id: moduleName, uri: "" }); - this._currentModule = previousModule; - module = exports; - } - - // cache the resulting module object for next time - this.modules[moduleName] = module; - - return module; - }; - -}()); - -define.Domain = Domain; -define.globalDomain = new Domain(); -var require = define.globalDomain.require.bind(define.globalDomain); diff --git a/node_modules/browserify/node_modules/browser-pack/node_modules/combine-source-map/node_modules/source-map/build/prefix-source-map.jsm b/node_modules/browserify/node_modules/browser-pack/node_modules/combine-source-map/node_modules/source-map/build/prefix-source-map.jsm deleted file mode 100644 index 209dbd7d..00000000 --- a/node_modules/browserify/node_modules/browser-pack/node_modules/combine-source-map/node_modules/source-map/build/prefix-source-map.jsm +++ /dev/null @@ -1,21 +0,0 @@ -/* -*- Mode: js; js-indent-level: 2; -*- */ -/* - * Copyright 2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - */ - -/* - * WARNING! - * - * Do not edit this file directly, it is built from the sources at - * https://github.com/mozilla/source-map/ - */ - -/////////////////////////////////////////////////////////////////////////////// - - -this.EXPORTED_SYMBOLS = [ "SourceMapConsumer", "SourceMapGenerator", "SourceNode" ]; - -Components.utils.import("resource://gre/modules/devtools/Console.jsm"); -Components.utils.import('resource://gre/modules/devtools/Require.jsm'); diff --git a/node_modules/browserify/node_modules/browser-pack/node_modules/combine-source-map/node_modules/source-map/build/prefix-utils.jsm b/node_modules/browserify/node_modules/browser-pack/node_modules/combine-source-map/node_modules/source-map/build/prefix-utils.jsm deleted file mode 100644 index 80341d45..00000000 --- a/node_modules/browserify/node_modules/browser-pack/node_modules/combine-source-map/node_modules/source-map/build/prefix-utils.jsm +++ /dev/null @@ -1,18 +0,0 @@ -/* -*- Mode: js; js-indent-level: 2; -*- */ -/* - * Copyright 2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - */ - -/* - * WARNING! - * - * Do not edit this file directly, it is built from the sources at - * https://github.com/mozilla/source-map/ - */ - -Components.utils.import('resource://gre/modules/devtools/Require.jsm'); -Components.utils.import('resource://gre/modules/devtools/SourceMap.jsm'); - -this.EXPORTED_SYMBOLS = [ "define", "runSourceMapTests" ]; diff --git a/node_modules/browserify/node_modules/browser-pack/node_modules/combine-source-map/node_modules/source-map/build/suffix-browser.js b/node_modules/browserify/node_modules/browser-pack/node_modules/combine-source-map/node_modules/source-map/build/suffix-browser.js deleted file mode 100644 index fb29ff5f..00000000 --- a/node_modules/browserify/node_modules/browser-pack/node_modules/combine-source-map/node_modules/source-map/build/suffix-browser.js +++ /dev/null @@ -1,8 +0,0 @@ -/* -*- Mode: js; js-indent-level: 2; -*- */ -/////////////////////////////////////////////////////////////////////////////// - -this.sourceMap = { - SourceMapConsumer: require('source-map/source-map-consumer').SourceMapConsumer, - SourceMapGenerator: require('source-map/source-map-generator').SourceMapGenerator, - SourceNode: require('source-map/source-node').SourceNode -}; diff --git a/node_modules/browserify/node_modules/browser-pack/node_modules/combine-source-map/node_modules/source-map/build/suffix-source-map.jsm b/node_modules/browserify/node_modules/browser-pack/node_modules/combine-source-map/node_modules/source-map/build/suffix-source-map.jsm deleted file mode 100644 index cf3c2d8d..00000000 --- a/node_modules/browserify/node_modules/browser-pack/node_modules/combine-source-map/node_modules/source-map/build/suffix-source-map.jsm +++ /dev/null @@ -1,6 +0,0 @@ -/* -*- Mode: js; js-indent-level: 2; -*- */ -/////////////////////////////////////////////////////////////////////////////// - -this.SourceMapConsumer = require('source-map/source-map-consumer').SourceMapConsumer; -this.SourceMapGenerator = require('source-map/source-map-generator').SourceMapGenerator; -this.SourceNode = require('source-map/source-node').SourceNode; diff --git a/node_modules/browserify/node_modules/browser-pack/node_modules/combine-source-map/node_modules/source-map/build/suffix-utils.jsm b/node_modules/browserify/node_modules/browser-pack/node_modules/combine-source-map/node_modules/source-map/build/suffix-utils.jsm deleted file mode 100644 index b31b84cb..00000000 --- a/node_modules/browserify/node_modules/browser-pack/node_modules/combine-source-map/node_modules/source-map/build/suffix-utils.jsm +++ /dev/null @@ -1,21 +0,0 @@ -/* -*- Mode: js; js-indent-level: 2; -*- */ -/* - * Copyright 2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - */ -function runSourceMapTests(modName, do_throw) { - let mod = require(modName); - let assert = require('test/source-map/assert'); - let util = require('test/source-map/util'); - - assert.init(do_throw); - - for (let k in mod) { - if (/^test/.test(k)) { - mod[k](assert, util); - } - } - -} -this.runSourceMapTests = runSourceMapTests; diff --git a/node_modules/browserify/node_modules/browser-pack/node_modules/combine-source-map/node_modules/source-map/build/test-prefix.js b/node_modules/browserify/node_modules/browser-pack/node_modules/combine-source-map/node_modules/source-map/build/test-prefix.js deleted file mode 100644 index 1b13f300..00000000 --- a/node_modules/browserify/node_modules/browser-pack/node_modules/combine-source-map/node_modules/source-map/build/test-prefix.js +++ /dev/null @@ -1,8 +0,0 @@ -/* - * WARNING! - * - * Do not edit this file directly, it is built from the sources at - * https://github.com/mozilla/source-map/ - */ - -Components.utils.import('resource://test/Utils.jsm'); diff --git a/node_modules/browserify/node_modules/browser-pack/node_modules/combine-source-map/node_modules/source-map/build/test-suffix.js b/node_modules/browserify/node_modules/browser-pack/node_modules/combine-source-map/node_modules/source-map/build/test-suffix.js deleted file mode 100644 index bec2de3f..00000000 --- a/node_modules/browserify/node_modules/browser-pack/node_modules/combine-source-map/node_modules/source-map/build/test-suffix.js +++ /dev/null @@ -1,3 +0,0 @@ -function run_test() { - runSourceMapTests('{THIS_MODULE}', do_throw); -} diff --git a/node_modules/browserify/node_modules/browser-pack/node_modules/combine-source-map/node_modules/source-map/lib/source-map.js b/node_modules/browserify/node_modules/browser-pack/node_modules/combine-source-map/node_modules/source-map/lib/source-map.js deleted file mode 100644 index 121ad241..00000000 --- a/node_modules/browserify/node_modules/browser-pack/node_modules/combine-source-map/node_modules/source-map/lib/source-map.js +++ /dev/null @@ -1,8 +0,0 @@ -/* - * Copyright 2009-2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE.txt or: - * http://opensource.org/licenses/BSD-3-Clause - */ -exports.SourceMapGenerator = require('./source-map/source-map-generator').SourceMapGenerator; -exports.SourceMapConsumer = require('./source-map/source-map-consumer').SourceMapConsumer; -exports.SourceNode = require('./source-map/source-node').SourceNode; diff --git a/node_modules/browserify/node_modules/browser-pack/node_modules/combine-source-map/node_modules/source-map/lib/source-map/array-set.js b/node_modules/browserify/node_modules/browser-pack/node_modules/combine-source-map/node_modules/source-map/lib/source-map/array-set.js deleted file mode 100644 index 19cb841c..00000000 --- a/node_modules/browserify/node_modules/browser-pack/node_modules/combine-source-map/node_modules/source-map/lib/source-map/array-set.js +++ /dev/null @@ -1,107 +0,0 @@ -/* -*- Mode: js; js-indent-level: 2; -*- */ -/* - * Copyright 2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - */ -if (typeof define !== 'function') { - var define = require('amdefine')(module, require); -} -define(function (require, exports, module) { - - var util = require('./util'); - - /** - * A data structure which is a combination of an array and a set. Adding a new - * member is O(1), testing for membership is O(1), and finding the index of an - * element is O(1). Removing elements from the set is not supported. Only - * strings are supported for membership. - */ - function ArraySet() { - this._array = []; - this._set = {}; - } - - /** - * Static method for creating ArraySet instances from an existing array. - */ - ArraySet.fromArray = function ArraySet_fromArray(aArray, aAllowDuplicates) { - var set = new ArraySet(); - for (var i = 0, len = aArray.length; i < len; i++) { - set.add(aArray[i], aAllowDuplicates); - } - return set; - }; - - /** - * Return how many unique items are in this ArraySet. If duplicates have been - * added, than those do not count towards the size. - * - * @returns Number - */ - ArraySet.prototype.size = function ArraySet_size() { - return Object.getOwnPropertyNames(this._set).length; - }; - - /** - * Add the given string to this set. - * - * @param String aStr - */ - ArraySet.prototype.add = function ArraySet_add(aStr, aAllowDuplicates) { - var isDuplicate = this.has(aStr); - var idx = this._array.length; - if (!isDuplicate || aAllowDuplicates) { - this._array.push(aStr); - } - if (!isDuplicate) { - this._set[util.toSetString(aStr)] = idx; - } - }; - - /** - * Is the given string a member of this set? - * - * @param String aStr - */ - ArraySet.prototype.has = function ArraySet_has(aStr) { - return Object.prototype.hasOwnProperty.call(this._set, - util.toSetString(aStr)); - }; - - /** - * What is the index of the given string in the array? - * - * @param String aStr - */ - ArraySet.prototype.indexOf = function ArraySet_indexOf(aStr) { - if (this.has(aStr)) { - return this._set[util.toSetString(aStr)]; - } - throw new Error('"' + aStr + '" is not in the set.'); - }; - - /** - * What is the element at the given index? - * - * @param Number aIdx - */ - ArraySet.prototype.at = function ArraySet_at(aIdx) { - if (aIdx >= 0 && aIdx < this._array.length) { - return this._array[aIdx]; - } - throw new Error('No element indexed by ' + aIdx); - }; - - /** - * Returns the array representation of this set (which has the proper indices - * indicated by indexOf). Note that this is a copy of the internal array used - * for storing the members so that no one can mess with internal state. - */ - ArraySet.prototype.toArray = function ArraySet_toArray() { - return this._array.slice(); - }; - - exports.ArraySet = ArraySet; - -}); diff --git a/node_modules/browserify/node_modules/browser-pack/node_modules/combine-source-map/node_modules/source-map/lib/source-map/base64-vlq.js b/node_modules/browserify/node_modules/browser-pack/node_modules/combine-source-map/node_modules/source-map/lib/source-map/base64-vlq.js deleted file mode 100644 index bbe9a58e..00000000 --- a/node_modules/browserify/node_modules/browser-pack/node_modules/combine-source-map/node_modules/source-map/lib/source-map/base64-vlq.js +++ /dev/null @@ -1,146 +0,0 @@ -/* -*- Mode: js; js-indent-level: 2; -*- */ -/* - * Copyright 2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - * - * Based on the Base 64 VLQ implementation in Closure Compiler: - * https://code.google.com/p/closure-compiler/source/browse/trunk/src/com/google/debugging/sourcemap/Base64VLQ.java - * - * Copyright 2011 The Closure Compiler Authors. All rights reserved. - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following - * disclaimer in the documentation and/or other materials provided - * with the distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ -if (typeof define !== 'function') { - var define = require('amdefine')(module, require); -} -define(function (require, exports, module) { - - var base64 = require('./base64'); - - // A single base 64 digit can contain 6 bits of data. For the base 64 variable - // length quantities we use in the source map spec, the first bit is the sign, - // the next four bits are the actual value, and the 6th bit is the - // continuation bit. The continuation bit tells us whether there are more - // digits in this value following this digit. - // - // Continuation - // | Sign - // | | - // V V - // 101011 - - var VLQ_BASE_SHIFT = 5; - - // binary: 100000 - var VLQ_BASE = 1 << VLQ_BASE_SHIFT; - - // binary: 011111 - var VLQ_BASE_MASK = VLQ_BASE - 1; - - // binary: 100000 - var VLQ_CONTINUATION_BIT = VLQ_BASE; - - /** - * Converts from a two-complement value to a value where the sign bit is - * placed in the least significant bit. For example, as decimals: - * 1 becomes 2 (10 binary), -1 becomes 3 (11 binary) - * 2 becomes 4 (100 binary), -2 becomes 5 (101 binary) - */ - function toVLQSigned(aValue) { - return aValue < 0 - ? ((-aValue) << 1) + 1 - : (aValue << 1) + 0; - } - - /** - * Converts to a two-complement value from a value where the sign bit is - * placed in the least significant bit. For example, as decimals: - * 2 (10 binary) becomes 1, 3 (11 binary) becomes -1 - * 4 (100 binary) becomes 2, 5 (101 binary) becomes -2 - */ - function fromVLQSigned(aValue) { - var isNegative = (aValue & 1) === 1; - var shifted = aValue >> 1; - return isNegative - ? -shifted - : shifted; - } - - /** - * Returns the base 64 VLQ encoded value. - */ - exports.encode = function base64VLQ_encode(aValue) { - var encoded = ""; - var digit; - - var vlq = toVLQSigned(aValue); - - do { - digit = vlq & VLQ_BASE_MASK; - vlq >>>= VLQ_BASE_SHIFT; - if (vlq > 0) { - // There are still more digits in this value, so we must make sure the - // continuation bit is marked. - digit |= VLQ_CONTINUATION_BIT; - } - encoded += base64.encode(digit); - } while (vlq > 0); - - return encoded; - }; - - /** - * Decodes the next base 64 VLQ value from the given string and returns the - * value and the rest of the string via the out parameter. - */ - exports.decode = function base64VLQ_decode(aStr, aIndex, aOutParam) { - var strLen = aStr.length; - var result = 0; - var shift = 0; - var continuation, digit; - - do { - if (aIndex >= strLen) { - throw new Error("Expected more digits in base 64 VLQ value."); - } - - digit = base64.decode(aStr.charCodeAt(aIndex++)); - if (digit === -1) { - throw new Error("Invalid base64 digit: " + aStr.charAt(aIndex - 1)); - } - - continuation = !!(digit & VLQ_CONTINUATION_BIT); - digit &= VLQ_BASE_MASK; - result = result + (digit << shift); - shift += VLQ_BASE_SHIFT; - } while (continuation); - - aOutParam.value = fromVLQSigned(result); - aOutParam.rest = aIndex; - }; - -}); diff --git a/node_modules/browserify/node_modules/browser-pack/node_modules/combine-source-map/node_modules/source-map/lib/source-map/base64.js b/node_modules/browserify/node_modules/browser-pack/node_modules/combine-source-map/node_modules/source-map/lib/source-map/base64.js deleted file mode 100644 index 35adbc1a..00000000 --- a/node_modules/browserify/node_modules/browser-pack/node_modules/combine-source-map/node_modules/source-map/lib/source-map/base64.js +++ /dev/null @@ -1,73 +0,0 @@ -/* -*- Mode: js; js-indent-level: 2; -*- */ -/* - * Copyright 2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - */ -if (typeof define !== 'function') { - var define = require('amdefine')(module, require); -} -define(function (require, exports, module) { - - var intToCharMap = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'.split(''); - - /** - * Encode an integer in the range of 0 to 63 to a single base 64 digit. - */ - exports.encode = function (number) { - if (0 <= number && number < intToCharMap.length) { - return intToCharMap[number]; - } - throw new TypeError("Must be between 0 and 63: " + aNumber); - }; - - /** - * Decode a single base 64 character code digit to an integer. Returns -1 on - * failure. - */ - exports.decode = function (charCode) { - var bigA = 65; // 'A' - var bigZ = 90; // 'Z' - - var littleA = 97; // 'a' - var littleZ = 122; // 'z' - - var zero = 48; // '0' - var nine = 57; // '9' - - var plus = 43; // '+' - var slash = 47; // '/' - - var littleOffset = 26; - var numberOffset = 52; - - // 0 - 25: ABCDEFGHIJKLMNOPQRSTUVWXYZ - if (bigA <= charCode && charCode <= bigZ) { - return (charCode - bigA); - } - - // 26 - 51: abcdefghijklmnopqrstuvwxyz - if (littleA <= charCode && charCode <= littleZ) { - return (charCode - littleA + littleOffset); - } - - // 52 - 61: 0123456789 - if (zero <= charCode && charCode <= nine) { - return (charCode - zero + numberOffset); - } - - // 62: + - if (charCode == plus) { - return 62; - } - - // 63: / - if (charCode == slash) { - return 63; - } - - // Invalid base64 digit. - return -1; - }; - -}); diff --git a/node_modules/browserify/node_modules/browser-pack/node_modules/combine-source-map/node_modules/source-map/lib/source-map/binary-search.js b/node_modules/browserify/node_modules/browser-pack/node_modules/combine-source-map/node_modules/source-map/lib/source-map/binary-search.js deleted file mode 100644 index 7936f7e7..00000000 --- a/node_modules/browserify/node_modules/browser-pack/node_modules/combine-source-map/node_modules/source-map/lib/source-map/binary-search.js +++ /dev/null @@ -1,117 +0,0 @@ -/* -*- Mode: js; js-indent-level: 2; -*- */ -/* - * Copyright 2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - */ -if (typeof define !== 'function') { - var define = require('amdefine')(module, require); -} -define(function (require, exports, module) { - - exports.GREATEST_LOWER_BOUND = 1; - exports.LEAST_UPPER_BOUND = 2; - - /** - * Recursive implementation of binary search. - * - * @param aLow Indices here and lower do not contain the needle. - * @param aHigh Indices here and higher do not contain the needle. - * @param aNeedle The element being searched for. - * @param aHaystack The non-empty array being searched. - * @param aCompare Function which takes two elements and returns -1, 0, or 1. - * @param aBias Either 'binarySearch.GREATEST_LOWER_BOUND' or - * 'binarySearch.LEAST_UPPER_BOUND'. Specifies whether to return the - * closest element that is smaller than or greater than the one we are - * searching for, respectively, if the exact element cannot be found. - */ - function recursiveSearch(aLow, aHigh, aNeedle, aHaystack, aCompare, aBias) { - // This function terminates when one of the following is true: - // - // 1. We find the exact element we are looking for. - // - // 2. We did not find the exact element, but we can return the index of - // the next-closest element. - // - // 3. We did not find the exact element, and there is no next-closest - // element than the one we are searching for, so we return -1. - var mid = Math.floor((aHigh - aLow) / 2) + aLow; - var cmp = aCompare(aNeedle, aHaystack[mid], true); - if (cmp === 0) { - // Found the element we are looking for. - return mid; - } - else if (cmp > 0) { - // Our needle is greater than aHaystack[mid]. - if (aHigh - mid > 1) { - // The element is in the upper half. - return recursiveSearch(mid, aHigh, aNeedle, aHaystack, aCompare, aBias); - } - - // The exact needle element was not found in this haystack. Determine if - // we are in termination case (3) or (2) and return the appropriate thing. - if (aBias == exports.LEAST_UPPER_BOUND) { - return aHigh < aHaystack.length ? aHigh : -1; - } else { - return mid; - } - } - else { - // Our needle is less than aHaystack[mid]. - if (mid - aLow > 1) { - // The element is in the lower half. - return recursiveSearch(aLow, mid, aNeedle, aHaystack, aCompare, aBias); - } - - // we are in termination case (3) or (2) and return the appropriate thing. - if (aBias == exports.LEAST_UPPER_BOUND) { - return mid; - } else { - return aLow < 0 ? -1 : aLow; - } - } - } - - /** - * This is an implementation of binary search which will always try and return - * the index of the closest element if there is no exact hit. This is because - * mappings between original and generated line/col pairs are single points, - * and there is an implicit region between each of them, so a miss just means - * that you aren't on the very start of a region. - * - * @param aNeedle The element you are looking for. - * @param aHaystack The array that is being searched. - * @param aCompare A function which takes the needle and an element in the - * array and returns -1, 0, or 1 depending on whether the needle is less - * than, equal to, or greater than the element, respectively. - * @param aBias Either 'binarySearch.GREATEST_LOWER_BOUND' or - * 'binarySearch.LEAST_UPPER_BOUND'. Specifies whether to return the - * closest element that is smaller than or greater than the one we are - * searching for, respectively, if the exact element cannot be found. - * Defaults to 'binarySearch.GREATEST_LOWER_BOUND'. - */ - exports.search = function search(aNeedle, aHaystack, aCompare, aBias) { - if (aHaystack.length === 0) { - return -1; - } - - var index = recursiveSearch(-1, aHaystack.length, aNeedle, aHaystack, - aCompare, aBias || exports.GREATEST_LOWER_BOUND); - if (index < 0) { - return -1; - } - - // We have found either the exact element, or the next-closest element than - // the one we are searching for. However, there may be more than one such - // element. Make sure we always return the smallest of these. - while (index - 1 >= 0) { - if (aCompare(aHaystack[index], aHaystack[index - 1], true) !== 0) { - break; - } - --index; - } - - return index; - }; - -}); diff --git a/node_modules/browserify/node_modules/browser-pack/node_modules/combine-source-map/node_modules/source-map/lib/source-map/mapping-list.js b/node_modules/browserify/node_modules/browser-pack/node_modules/combine-source-map/node_modules/source-map/lib/source-map/mapping-list.js deleted file mode 100644 index 01aff224..00000000 --- a/node_modules/browserify/node_modules/browser-pack/node_modules/combine-source-map/node_modules/source-map/lib/source-map/mapping-list.js +++ /dev/null @@ -1,86 +0,0 @@ -/* -*- Mode: js; js-indent-level: 2; -*- */ -/* - * Copyright 2014 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - */ -if (typeof define !== 'function') { - var define = require('amdefine')(module, require); -} -define(function (require, exports, module) { - - var util = require('./util'); - - /** - * Determine whether mappingB is after mappingA with respect to generated - * position. - */ - function generatedPositionAfter(mappingA, mappingB) { - // Optimized for most common case - var lineA = mappingA.generatedLine; - var lineB = mappingB.generatedLine; - var columnA = mappingA.generatedColumn; - var columnB = mappingB.generatedColumn; - return lineB > lineA || lineB == lineA && columnB >= columnA || - util.compareByGeneratedPositionsInflated(mappingA, mappingB) <= 0; - } - - /** - * A data structure to provide a sorted view of accumulated mappings in a - * performance conscious manner. It trades a neglibable overhead in general - * case for a large speedup in case of mappings being added in order. - */ - function MappingList() { - this._array = []; - this._sorted = true; - // Serves as infimum - this._last = {generatedLine: -1, generatedColumn: 0}; - } - - /** - * Iterate through internal items. This method takes the same arguments that - * `Array.prototype.forEach` takes. - * - * NOTE: The order of the mappings is NOT guaranteed. - */ - MappingList.prototype.unsortedForEach = - function MappingList_forEach(aCallback, aThisArg) { - this._array.forEach(aCallback, aThisArg); - }; - - /** - * Add the given source mapping. - * - * @param Object aMapping - */ - MappingList.prototype.add = function MappingList_add(aMapping) { - var mapping; - if (generatedPositionAfter(this._last, aMapping)) { - this._last = aMapping; - this._array.push(aMapping); - } else { - this._sorted = false; - this._array.push(aMapping); - } - }; - - /** - * Returns the flat, sorted array of mappings. The mappings are sorted by - * generated position. - * - * WARNING: This method returns internal data without copying, for - * performance. The return value must NOT be mutated, and should be treated as - * an immutable borrow. If you want to take ownership, you must make your own - * copy. - */ - MappingList.prototype.toArray = function MappingList_toArray() { - if (!this._sorted) { - this._array.sort(util.compareByGeneratedPositionsInflated); - this._sorted = true; - } - return this._array; - }; - - exports.MappingList = MappingList; - -}); diff --git a/node_modules/browserify/node_modules/browser-pack/node_modules/combine-source-map/node_modules/source-map/lib/source-map/quick-sort.js b/node_modules/browserify/node_modules/browser-pack/node_modules/combine-source-map/node_modules/source-map/lib/source-map/quick-sort.js deleted file mode 100644 index e0551eda..00000000 --- a/node_modules/browserify/node_modules/browser-pack/node_modules/combine-source-map/node_modules/source-map/lib/source-map/quick-sort.js +++ /dev/null @@ -1,120 +0,0 @@ -/* -*- Mode: js; js-indent-level: 2; -*- */ -/* - * Copyright 2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - */ -if (typeof define !== 'function') { - var define = require('amdefine')(module, require); -} -define(function (require, exports, module) { - - // It turns out that some (most?) JavaScript engines don't self-host - // `Array.prototype.sort`. This makes sense because C++ will likely remain - // faster than JS when doing raw CPU-intensive sorting. However, when using a - // custom comparator function, calling back and forth between the VM's C++ and - // JIT'd JS is rather slow *and* loses JIT type information, resulting in - // worse generated code for the comparator function than would be optimal. In - // fact, when sorting with a comparator, these costs outweigh the benefits of - // sorting in C++. By using our own JS-implemented Quick Sort (below), we get - // a ~3500ms mean speed-up in `bench/bench.html`. - - /** - * Swap the elements indexed by `x` and `y` in the array `ary`. - * - * @param {Array} ary - * The array. - * @param {Number} x - * The index of the first item. - * @param {Number} y - * The index of the second item. - */ - function swap(ary, x, y) { - var temp = ary[x]; - ary[x] = ary[y]; - ary[y] = temp; - } - - /** - * Returns a random integer within the range `low .. high` inclusive. - * - * @param {Number} low - * The lower bound on the range. - * @param {Number} high - * The upper bound on the range. - */ - function randomIntInRange(low, high) { - return Math.round(low + (Math.random() * (high - low))); - } - - /** - * The Quick Sort algorithm. - * - * @param {Array} ary - * An array to sort. - * @param {function} comparator - * Function to use to compare two items. - * @param {Number} p - * Start index of the array - * @param {Number} r - * End index of the array - */ - function doQuickSort(ary, comparator, p, r) { - // If our lower bound is less than our upper bound, we (1) partition the - // array into two pieces and (2) recurse on each half. If it is not, this is - // the empty array and our base case. - - if (p < r) { - // (1) Partitioning. - // - // The partitioning chooses a pivot between `p` and `r` and moves all - // elements that are less than or equal to the pivot to the before it, and - // all the elements that are greater than it after it. The effect is that - // once partition is done, the pivot is in the exact place it will be when - // the array is put in sorted order, and it will not need to be moved - // again. This runs in O(n) time. - - // Always choose a random pivot so that an input array which is reverse - // sorted does not cause O(n^2) running time. - var pivotIndex = randomIntInRange(p, r); - var i = p - 1; - - swap(ary, pivotIndex, r); - var pivot = ary[r]; - - // Immediately after `j` is incremented in this loop, the following hold - // true: - // - // * Every element in `ary[p .. i]` is less than or equal to the pivot. - // - // * Every element in `ary[i+1 .. j-1]` is greater than the pivot. - for (var j = p; j < r; j++) { - if (comparator(ary[j], pivot) <= 0) { - i += 1; - swap(ary, i, j); - } - } - - swap(ary, i + 1, j); - var q = i + 1; - - // (2) Recurse on each half. - - doQuickSort(ary, comparator, p, q - 1); - doQuickSort(ary, comparator, q + 1, r); - } - } - - /** - * Sort the given array in-place with the given comparator function. - * - * @param {Array} ary - * An array to sort. - * @param {function} comparator - * Function to use to compare two items. - */ - exports.quickSort = function (ary, comparator) { - doQuickSort(ary, comparator, 0, ary.length - 1); - }; - -}); diff --git a/node_modules/browserify/node_modules/browser-pack/node_modules/combine-source-map/node_modules/source-map/lib/source-map/source-map-consumer.js b/node_modules/browserify/node_modules/browser-pack/node_modules/combine-source-map/node_modules/source-map/lib/source-map/source-map-consumer.js deleted file mode 100644 index cbdc467c..00000000 --- a/node_modules/browserify/node_modules/browser-pack/node_modules/combine-source-map/node_modules/source-map/lib/source-map/source-map-consumer.js +++ /dev/null @@ -1,1077 +0,0 @@ -/* -*- Mode: js; js-indent-level: 2; -*- */ -/* - * Copyright 2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - */ -if (typeof define !== 'function') { - var define = require('amdefine')(module, require); -} -define(function (require, exports, module) { - - var util = require('./util'); - var binarySearch = require('./binary-search'); - var ArraySet = require('./array-set').ArraySet; - var base64VLQ = require('./base64-vlq'); - var quickSort = require('./quick-sort').quickSort; - - function SourceMapConsumer(aSourceMap) { - var sourceMap = aSourceMap; - if (typeof aSourceMap === 'string') { - sourceMap = JSON.parse(aSourceMap.replace(/^\)\]\}'/, '')); - } - - return sourceMap.sections != null - ? new IndexedSourceMapConsumer(sourceMap) - : new BasicSourceMapConsumer(sourceMap); - } - - SourceMapConsumer.fromSourceMap = function(aSourceMap) { - return BasicSourceMapConsumer.fromSourceMap(aSourceMap); - } - - /** - * The version of the source mapping spec that we are consuming. - */ - SourceMapConsumer.prototype._version = 3; - - // `__generatedMappings` and `__originalMappings` are arrays that hold the - // parsed mapping coordinates from the source map's "mappings" attribute. They - // are lazily instantiated, accessed via the `_generatedMappings` and - // `_originalMappings` getters respectively, and we only parse the mappings - // and create these arrays once queried for a source location. We jump through - // these hoops because there can be many thousands of mappings, and parsing - // them is expensive, so we only want to do it if we must. - // - // Each object in the arrays is of the form: - // - // { - // generatedLine: The line number in the generated code, - // generatedColumn: The column number in the generated code, - // source: The path to the original source file that generated this - // chunk of code, - // originalLine: The line number in the original source that - // corresponds to this chunk of generated code, - // originalColumn: The column number in the original source that - // corresponds to this chunk of generated code, - // name: The name of the original symbol which generated this chunk of - // code. - // } - // - // All properties except for `generatedLine` and `generatedColumn` can be - // `null`. - // - // `_generatedMappings` is ordered by the generated positions. - // - // `_originalMappings` is ordered by the original positions. - - SourceMapConsumer.prototype.__generatedMappings = null; - Object.defineProperty(SourceMapConsumer.prototype, '_generatedMappings', { - get: function () { - if (!this.__generatedMappings) { - this._parseMappings(this._mappings, this.sourceRoot); - } - - return this.__generatedMappings; - } - }); - - SourceMapConsumer.prototype.__originalMappings = null; - Object.defineProperty(SourceMapConsumer.prototype, '_originalMappings', { - get: function () { - if (!this.__originalMappings) { - this._parseMappings(this._mappings, this.sourceRoot); - } - - return this.__originalMappings; - } - }); - - SourceMapConsumer.prototype._charIsMappingSeparator = - function SourceMapConsumer_charIsMappingSeparator(aStr, index) { - var c = aStr.charAt(index); - return c === ";" || c === ","; - }; - - /** - * Parse the mappings in a string in to a data structure which we can easily - * query (the ordered arrays in the `this.__generatedMappings` and - * `this.__originalMappings` properties). - */ - SourceMapConsumer.prototype._parseMappings = - function SourceMapConsumer_parseMappings(aStr, aSourceRoot) { - throw new Error("Subclasses must implement _parseMappings"); - }; - - SourceMapConsumer.GENERATED_ORDER = 1; - SourceMapConsumer.ORIGINAL_ORDER = 2; - - SourceMapConsumer.GREATEST_LOWER_BOUND = 1; - SourceMapConsumer.LEAST_UPPER_BOUND = 2; - - /** - * Iterate over each mapping between an original source/line/column and a - * generated line/column in this source map. - * - * @param Function aCallback - * The function that is called with each mapping. - * @param Object aContext - * Optional. If specified, this object will be the value of `this` every - * time that `aCallback` is called. - * @param aOrder - * Either `SourceMapConsumer.GENERATED_ORDER` or - * `SourceMapConsumer.ORIGINAL_ORDER`. Specifies whether you want to - * iterate over the mappings sorted by the generated file's line/column - * order or the original's source/line/column order, respectively. Defaults to - * `SourceMapConsumer.GENERATED_ORDER`. - */ - SourceMapConsumer.prototype.eachMapping = - function SourceMapConsumer_eachMapping(aCallback, aContext, aOrder) { - var context = aContext || null; - var order = aOrder || SourceMapConsumer.GENERATED_ORDER; - - var mappings; - switch (order) { - case SourceMapConsumer.GENERATED_ORDER: - mappings = this._generatedMappings; - break; - case SourceMapConsumer.ORIGINAL_ORDER: - mappings = this._originalMappings; - break; - default: - throw new Error("Unknown order of iteration."); - } - - var sourceRoot = this.sourceRoot; - mappings.map(function (mapping) { - var source = mapping.source === null ? null : this._sources.at(mapping.source); - if (source != null && sourceRoot != null) { - source = util.join(sourceRoot, source); - } - return { - source: source, - generatedLine: mapping.generatedLine, - generatedColumn: mapping.generatedColumn, - originalLine: mapping.originalLine, - originalColumn: mapping.originalColumn, - name: mapping.name === null ? null : this._names.at(mapping.name) - }; - }, this).forEach(aCallback, context); - }; - - /** - * Returns all generated line and column information for the original source, - * line, and column provided. If no column is provided, returns all mappings - * corresponding to a either the line we are searching for or the next - * closest line that has any mappings. Otherwise, returns all mappings - * corresponding to the given line and either the column we are searching for - * or the next closest column that has any offsets. - * - * The only argument is an object with the following properties: - * - * - source: The filename of the original source. - * - line: The line number in the original source. - * - column: Optional. the column number in the original source. - * - * and an array of objects is returned, each with the following properties: - * - * - line: The line number in the generated source, or null. - * - column: The column number in the generated source, or null. - */ - SourceMapConsumer.prototype.allGeneratedPositionsFor = - function SourceMapConsumer_allGeneratedPositionsFor(aArgs) { - var line = util.getArg(aArgs, 'line'); - - // When there is no exact match, BasicSourceMapConsumer.prototype._findMapping - // returns the index of the closest mapping less than the needle. By - // setting needle.originalColumn to 0, we thus find the last mapping for - // the given line, provided such a mapping exists. - var needle = { - source: util.getArg(aArgs, 'source'), - originalLine: line, - originalColumn: util.getArg(aArgs, 'column', 0) - }; - - if (this.sourceRoot != null) { - needle.source = util.relative(this.sourceRoot, needle.source); - } - if (!this._sources.has(needle.source)) { - return []; - } - needle.source = this._sources.indexOf(needle.source); - - var mappings = []; - - var index = this._findMapping(needle, - this._originalMappings, - "originalLine", - "originalColumn", - util.compareByOriginalPositions, - binarySearch.LEAST_UPPER_BOUND); - if (index >= 0) { - var mapping = this._originalMappings[index]; - - if (aArgs.column === undefined) { - var originalLine = mapping.originalLine; - - // Iterate until either we run out of mappings, or we run into - // a mapping for a different line than the one we found. Since - // mappings are sorted, this is guaranteed to find all mappings for - // the line we found. - while (mapping && mapping.originalLine === originalLine) { - mappings.push({ - line: util.getArg(mapping, 'generatedLine', null), - column: util.getArg(mapping, 'generatedColumn', null), - lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null) - }); - - mapping = this._originalMappings[++index]; - } - } else { - var originalColumn = mapping.originalColumn; - - // Iterate until either we run out of mappings, or we run into - // a mapping for a different line than the one we were searching for. - // Since mappings are sorted, this is guaranteed to find all mappings for - // the line we are searching for. - while (mapping && - mapping.originalLine === line && - mapping.originalColumn == originalColumn) { - mappings.push({ - line: util.getArg(mapping, 'generatedLine', null), - column: util.getArg(mapping, 'generatedColumn', null), - lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null) - }); - - mapping = this._originalMappings[++index]; - } - } - } - - return mappings; - }; - - exports.SourceMapConsumer = SourceMapConsumer; - - /** - * A BasicSourceMapConsumer instance represents a parsed source map which we can - * query for information about the original file positions by giving it a file - * position in the generated source. - * - * The only parameter is the raw source map (either as a JSON string, or - * already parsed to an object). According to the spec, source maps have the - * following attributes: - * - * - version: Which version of the source map spec this map is following. - * - sources: An array of URLs to the original source files. - * - names: An array of identifiers which can be referrenced by individual mappings. - * - sourceRoot: Optional. The URL root from which all sources are relative. - * - sourcesContent: Optional. An array of contents of the original source files. - * - mappings: A string of base64 VLQs which contain the actual mappings. - * - file: Optional. The generated file this source map is associated with. - * - * Here is an example source map, taken from the source map spec[0]: - * - * { - * version : 3, - * file: "out.js", - * sourceRoot : "", - * sources: ["foo.js", "bar.js"], - * names: ["src", "maps", "are", "fun"], - * mappings: "AA,AB;;ABCDE;" - * } - * - * [0]: https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit?pli=1# - */ - function BasicSourceMapConsumer(aSourceMap) { - var sourceMap = aSourceMap; - if (typeof aSourceMap === 'string') { - sourceMap = JSON.parse(aSourceMap.replace(/^\)\]\}'/, '')); - } - - var version = util.getArg(sourceMap, 'version'); - var sources = util.getArg(sourceMap, 'sources'); - // Sass 3.3 leaves out the 'names' array, so we deviate from the spec (which - // requires the array) to play nice here. - var names = util.getArg(sourceMap, 'names', []); - var sourceRoot = util.getArg(sourceMap, 'sourceRoot', null); - var sourcesContent = util.getArg(sourceMap, 'sourcesContent', null); - var mappings = util.getArg(sourceMap, 'mappings'); - var file = util.getArg(sourceMap, 'file', null); - - // Once again, Sass deviates from the spec and supplies the version as a - // string rather than a number, so we use loose equality checking here. - if (version != this._version) { - throw new Error('Unsupported version: ' + version); - } - - // Some source maps produce relative source paths like "./foo.js" instead of - // "foo.js". Normalize these first so that future comparisons will succeed. - // See bugzil.la/1090768. - sources = sources.map(util.normalize); - - // Pass `true` below to allow duplicate names and sources. While source maps - // are intended to be compressed and deduplicated, the TypeScript compiler - // sometimes generates source maps with duplicates in them. See Github issue - // #72 and bugzil.la/889492. - this._names = ArraySet.fromArray(names, true); - this._sources = ArraySet.fromArray(sources, true); - - this.sourceRoot = sourceRoot; - this.sourcesContent = sourcesContent; - this._mappings = mappings; - this.file = file; - } - - BasicSourceMapConsumer.prototype = Object.create(SourceMapConsumer.prototype); - BasicSourceMapConsumer.prototype.consumer = SourceMapConsumer; - - /** - * Create a BasicSourceMapConsumer from a SourceMapGenerator. - * - * @param SourceMapGenerator aSourceMap - * The source map that will be consumed. - * @returns BasicSourceMapConsumer - */ - BasicSourceMapConsumer.fromSourceMap = - function SourceMapConsumer_fromSourceMap(aSourceMap) { - var smc = Object.create(BasicSourceMapConsumer.prototype); - - var names = smc._names = ArraySet.fromArray(aSourceMap._names.toArray(), true); - var sources = smc._sources = ArraySet.fromArray(aSourceMap._sources.toArray(), true); - smc.sourceRoot = aSourceMap._sourceRoot; - smc.sourcesContent = aSourceMap._generateSourcesContent(smc._sources.toArray(), - smc.sourceRoot); - smc.file = aSourceMap._file; - - // Because we are modifying the entries (by converting string sources and - // names to indices into the sources and names ArraySets), we have to make - // a copy of the entry or else bad things happen. Shared mutable state - // strikes again! See github issue #191. - - var generatedMappings = aSourceMap._mappings.toArray().slice(); - var destGeneratedMappings = smc.__generatedMappings = []; - var destOriginalMappings = smc.__originalMappings = []; - - for (var i = 0, length = generatedMappings.length; i < length; i++) { - var srcMapping = generatedMappings[i]; - var destMapping = new Mapping; - destMapping.generatedLine = srcMapping.generatedLine; - destMapping.generatedColumn = srcMapping.generatedColumn; - - if (srcMapping.source) { - destMapping.source = sources.indexOf(srcMapping.source); - destMapping.originalLine = srcMapping.originalLine; - destMapping.originalColumn = srcMapping.originalColumn; - - if (srcMapping.name) { - destMapping.name = names.indexOf(srcMapping.name); - } - - destOriginalMappings.push(destMapping); - } - - destGeneratedMappings.push(destMapping); - } - - quickSort(smc.__originalMappings, util.compareByOriginalPositions); - - return smc; - }; - - /** - * The version of the source mapping spec that we are consuming. - */ - BasicSourceMapConsumer.prototype._version = 3; - - /** - * The list of original sources. - */ - Object.defineProperty(BasicSourceMapConsumer.prototype, 'sources', { - get: function () { - return this._sources.toArray().map(function (s) { - return this.sourceRoot != null ? util.join(this.sourceRoot, s) : s; - }, this); - } - }); - - /** - * Provide the JIT with a nice shape / hidden class. - */ - function Mapping() { - this.generatedLine = 0; - this.generatedColumn = 0; - this.source = null; - this.originalLine = null; - this.originalColumn = null; - this.name = null; - } - - /** - * Parse the mappings in a string in to a data structure which we can easily - * query (the ordered arrays in the `this.__generatedMappings` and - * `this.__originalMappings` properties). - */ - BasicSourceMapConsumer.prototype._parseMappings = - function SourceMapConsumer_parseMappings(aStr, aSourceRoot) { - var generatedLine = 1; - var previousGeneratedColumn = 0; - var previousOriginalLine = 0; - var previousOriginalColumn = 0; - var previousSource = 0; - var previousName = 0; - var length = aStr.length; - var index = 0; - var cachedSegments = {}; - var temp = {}; - var originalMappings = []; - var generatedMappings = []; - var mapping, str, segment, end, value; - - while (index < length) { - if (aStr.charAt(index) === ';') { - generatedLine++; - index++; - previousGeneratedColumn = 0; - } - else if (aStr.charAt(index) === ',') { - index++; - } - else { - mapping = new Mapping(); - mapping.generatedLine = generatedLine; - - // Because each offset is encoded relative to the previous one, - // many segments often have the same encoding. We can exploit this - // fact by caching the parsed variable length fields of each segment, - // allowing us to avoid a second parse if we encounter the same - // segment again. - for (end = index; end < length; end++) { - if (this._charIsMappingSeparator(aStr, end)) { - break; - } - } - str = aStr.slice(index, end); - - segment = cachedSegments[str]; - if (segment) { - index += str.length; - } else { - segment = []; - while (index < end) { - base64VLQ.decode(aStr, index, temp); - value = temp.value; - index = temp.rest; - segment.push(value); - } - - if (segment.length === 2) { - throw new Error('Found a source, but no line and column'); - } - - if (segment.length === 3) { - throw new Error('Found a source and line, but no column'); - } - - cachedSegments[str] = segment; - } - - // Generated column. - mapping.generatedColumn = previousGeneratedColumn + segment[0]; - previousGeneratedColumn = mapping.generatedColumn; - - if (segment.length > 1) { - // Original source. - mapping.source = previousSource + segment[1]; - previousSource += segment[1]; - - // Original line. - mapping.originalLine = previousOriginalLine + segment[2]; - previousOriginalLine = mapping.originalLine; - // Lines are stored 0-based - mapping.originalLine += 1; - - // Original column. - mapping.originalColumn = previousOriginalColumn + segment[3]; - previousOriginalColumn = mapping.originalColumn; - - if (segment.length > 4) { - // Original name. - mapping.name = previousName + segment[4]; - previousName += segment[4]; - } - } - - generatedMappings.push(mapping); - if (typeof mapping.originalLine === 'number') { - originalMappings.push(mapping); - } - } - } - - quickSort(generatedMappings, util.compareByGeneratedPositionsDeflated); - this.__generatedMappings = generatedMappings; - - quickSort(originalMappings, util.compareByOriginalPositions); - this.__originalMappings = originalMappings; - }; - - /** - * Find the mapping that best matches the hypothetical "needle" mapping that - * we are searching for in the given "haystack" of mappings. - */ - BasicSourceMapConsumer.prototype._findMapping = - function SourceMapConsumer_findMapping(aNeedle, aMappings, aLineName, - aColumnName, aComparator, aBias) { - // To return the position we are searching for, we must first find the - // mapping for the given position and then return the opposite position it - // points to. Because the mappings are sorted, we can use binary search to - // find the best mapping. - - if (aNeedle[aLineName] <= 0) { - throw new TypeError('Line must be greater than or equal to 1, got ' - + aNeedle[aLineName]); - } - if (aNeedle[aColumnName] < 0) { - throw new TypeError('Column must be greater than or equal to 0, got ' - + aNeedle[aColumnName]); - } - - return binarySearch.search(aNeedle, aMappings, aComparator, aBias); - }; - - /** - * Compute the last column for each generated mapping. The last column is - * inclusive. - */ - BasicSourceMapConsumer.prototype.computeColumnSpans = - function SourceMapConsumer_computeColumnSpans() { - for (var index = 0; index < this._generatedMappings.length; ++index) { - var mapping = this._generatedMappings[index]; - - // Mappings do not contain a field for the last generated columnt. We - // can come up with an optimistic estimate, however, by assuming that - // mappings are contiguous (i.e. given two consecutive mappings, the - // first mapping ends where the second one starts). - if (index + 1 < this._generatedMappings.length) { - var nextMapping = this._generatedMappings[index + 1]; - - if (mapping.generatedLine === nextMapping.generatedLine) { - mapping.lastGeneratedColumn = nextMapping.generatedColumn - 1; - continue; - } - } - - // The last mapping for each line spans the entire line. - mapping.lastGeneratedColumn = Infinity; - } - }; - - /** - * Returns the original source, line, and column information for the generated - * source's line and column positions provided. The only argument is an object - * with the following properties: - * - * - line: The line number in the generated source. - * - column: The column number in the generated source. - * - bias: Either 'SourceMapConsumer.GREATEST_LOWER_BOUND' or - * 'SourceMapConsumer.LEAST_UPPER_BOUND'. Specifies whether to return the - * closest element that is smaller than or greater than the one we are - * searching for, respectively, if the exact element cannot be found. - * Defaults to 'SourceMapConsumer.GREATEST_LOWER_BOUND'. - * - * and an object is returned with the following properties: - * - * - source: The original source file, or null. - * - line: The line number in the original source, or null. - * - column: The column number in the original source, or null. - * - name: The original identifier, or null. - */ - BasicSourceMapConsumer.prototype.originalPositionFor = - function SourceMapConsumer_originalPositionFor(aArgs) { - var needle = { - generatedLine: util.getArg(aArgs, 'line'), - generatedColumn: util.getArg(aArgs, 'column') - }; - - var index = this._findMapping( - needle, - this._generatedMappings, - "generatedLine", - "generatedColumn", - util.compareByGeneratedPositionsDeflated, - util.getArg(aArgs, 'bias', SourceMapConsumer.GREATEST_LOWER_BOUND) - ); - - if (index >= 0) { - var mapping = this._generatedMappings[index]; - - if (mapping.generatedLine === needle.generatedLine) { - var source = util.getArg(mapping, 'source', null); - if (source !== null) { - source = this._sources.at(source); - if (this.sourceRoot != null) { - source = util.join(this.sourceRoot, source); - } - } - var name = util.getArg(mapping, 'name', null); - if (name !== null) { - name = this._names.at(name); - } - return { - source: source, - line: util.getArg(mapping, 'originalLine', null), - column: util.getArg(mapping, 'originalColumn', null), - name: name - }; - } - } - - return { - source: null, - line: null, - column: null, - name: null - }; - }; - - /** - * Return true if we have the source content for every source in the source - * map, false otherwise. - */ - BasicSourceMapConsumer.prototype.hasContentsOfAllSources = - function BasicSourceMapConsumer_hasContentsOfAllSources() { - if (!this.sourcesContent) { - return false; - } - return this.sourcesContent.length >= this._sources.size() && - !this.sourcesContent.some(function (sc) { return sc == null; }); - }; - - /** - * Returns the original source content. The only argument is the url of the - * original source file. Returns null if no original source content is - * availible. - */ - BasicSourceMapConsumer.prototype.sourceContentFor = - function SourceMapConsumer_sourceContentFor(aSource, nullOnMissing) { - if (!this.sourcesContent) { - return null; - } - - if (this.sourceRoot != null) { - aSource = util.relative(this.sourceRoot, aSource); - } - - if (this._sources.has(aSource)) { - return this.sourcesContent[this._sources.indexOf(aSource)]; - } - - var url; - if (this.sourceRoot != null - && (url = util.urlParse(this.sourceRoot))) { - // XXX: file:// URIs and absolute paths lead to unexpected behavior for - // many users. We can help them out when they expect file:// URIs to - // behave like it would if they were running a local HTTP server. See - // https://bugzilla.mozilla.org/show_bug.cgi?id=885597. - var fileUriAbsPath = aSource.replace(/^file:\/\//, ""); - if (url.scheme == "file" - && this._sources.has(fileUriAbsPath)) { - return this.sourcesContent[this._sources.indexOf(fileUriAbsPath)] - } - - if ((!url.path || url.path == "/") - && this._sources.has("/" + aSource)) { - return this.sourcesContent[this._sources.indexOf("/" + aSource)]; - } - } - - // This function is used recursively from - // IndexedSourceMapConsumer.prototype.sourceContentFor. In that case, we - // don't want to throw if we can't find the source - we just want to - // return null, so we provide a flag to exit gracefully. - if (nullOnMissing) { - return null; - } - else { - throw new Error('"' + aSource + '" is not in the SourceMap.'); - } - }; - - /** - * Returns the generated line and column information for the original source, - * line, and column positions provided. The only argument is an object with - * the following properties: - * - * - source: The filename of the original source. - * - line: The line number in the original source. - * - column: The column number in the original source. - * - bias: Either 'SourceMapConsumer.GREATEST_LOWER_BOUND' or - * 'SourceMapConsumer.LEAST_UPPER_BOUND'. Specifies whether to return the - * closest element that is smaller than or greater than the one we are - * searching for, respectively, if the exact element cannot be found. - * Defaults to 'SourceMapConsumer.GREATEST_LOWER_BOUND'. - * - * and an object is returned with the following properties: - * - * - line: The line number in the generated source, or null. - * - column: The column number in the generated source, or null. - */ - BasicSourceMapConsumer.prototype.generatedPositionFor = - function SourceMapConsumer_generatedPositionFor(aArgs) { - var source = util.getArg(aArgs, 'source'); - if (this.sourceRoot != null) { - source = util.relative(this.sourceRoot, source); - } - if (!this._sources.has(source)) { - return { - line: null, - column: null, - lastColumn: null - }; - } - source = this._sources.indexOf(source); - - var needle = { - source: source, - originalLine: util.getArg(aArgs, 'line'), - originalColumn: util.getArg(aArgs, 'column') - }; - - var index = this._findMapping( - needle, - this._originalMappings, - "originalLine", - "originalColumn", - util.compareByOriginalPositions, - util.getArg(aArgs, 'bias', SourceMapConsumer.GREATEST_LOWER_BOUND) - ); - - if (index >= 0) { - var mapping = this._originalMappings[index]; - - if (mapping.source === needle.source) { - return { - line: util.getArg(mapping, 'generatedLine', null), - column: util.getArg(mapping, 'generatedColumn', null), - lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null) - }; - } - } - - return { - line: null, - column: null, - lastColumn: null - }; - }; - - exports.BasicSourceMapConsumer = BasicSourceMapConsumer; - - /** - * An IndexedSourceMapConsumer instance represents a parsed source map which - * we can query for information. It differs from BasicSourceMapConsumer in - * that it takes "indexed" source maps (i.e. ones with a "sections" field) as - * input. - * - * The only parameter is a raw source map (either as a JSON string, or already - * parsed to an object). According to the spec for indexed source maps, they - * have the following attributes: - * - * - version: Which version of the source map spec this map is following. - * - file: Optional. The generated file this source map is associated with. - * - sections: A list of section definitions. - * - * Each value under the "sections" field has two fields: - * - offset: The offset into the original specified at which this section - * begins to apply, defined as an object with a "line" and "column" - * field. - * - map: A source map definition. This source map could also be indexed, - * but doesn't have to be. - * - * Instead of the "map" field, it's also possible to have a "url" field - * specifying a URL to retrieve a source map from, but that's currently - * unsupported. - * - * Here's an example source map, taken from the source map spec[0], but - * modified to omit a section which uses the "url" field. - * - * { - * version : 3, - * file: "app.js", - * sections: [{ - * offset: {line:100, column:10}, - * map: { - * version : 3, - * file: "section.js", - * sources: ["foo.js", "bar.js"], - * names: ["src", "maps", "are", "fun"], - * mappings: "AAAA,E;;ABCDE;" - * } - * }], - * } - * - * [0]: https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit#heading=h.535es3xeprgt - */ - function IndexedSourceMapConsumer(aSourceMap) { - var sourceMap = aSourceMap; - if (typeof aSourceMap === 'string') { - sourceMap = JSON.parse(aSourceMap.replace(/^\)\]\}'/, '')); - } - - var version = util.getArg(sourceMap, 'version'); - var sections = util.getArg(sourceMap, 'sections'); - - if (version != this._version) { - throw new Error('Unsupported version: ' + version); - } - - this._sources = new ArraySet(); - this._names = new ArraySet(); - - var lastOffset = { - line: -1, - column: 0 - }; - this._sections = sections.map(function (s) { - if (s.url) { - // The url field will require support for asynchronicity. - // See https://github.com/mozilla/source-map/issues/16 - throw new Error('Support for url field in sections not implemented.'); - } - var offset = util.getArg(s, 'offset'); - var offsetLine = util.getArg(offset, 'line'); - var offsetColumn = util.getArg(offset, 'column'); - - if (offsetLine < lastOffset.line || - (offsetLine === lastOffset.line && offsetColumn < lastOffset.column)) { - throw new Error('Section offsets must be ordered and non-overlapping.'); - } - lastOffset = offset; - - return { - generatedOffset: { - // The offset fields are 0-based, but we use 1-based indices when - // encoding/decoding from VLQ. - generatedLine: offsetLine + 1, - generatedColumn: offsetColumn + 1 - }, - consumer: new SourceMapConsumer(util.getArg(s, 'map')) - } - }); - } - - IndexedSourceMapConsumer.prototype = Object.create(SourceMapConsumer.prototype); - IndexedSourceMapConsumer.prototype.constructor = SourceMapConsumer; - - /** - * The version of the source mapping spec that we are consuming. - */ - IndexedSourceMapConsumer.prototype._version = 3; - - /** - * The list of original sources. - */ - Object.defineProperty(IndexedSourceMapConsumer.prototype, 'sources', { - get: function () { - var sources = []; - for (var i = 0; i < this._sections.length; i++) { - for (var j = 0; j < this._sections[i].consumer.sources.length; j++) { - sources.push(this._sections[i].consumer.sources[j]); - } - }; - return sources; - } - }); - - /** - * Returns the original source, line, and column information for the generated - * source's line and column positions provided. The only argument is an object - * with the following properties: - * - * - line: The line number in the generated source. - * - column: The column number in the generated source. - * - * and an object is returned with the following properties: - * - * - source: The original source file, or null. - * - line: The line number in the original source, or null. - * - column: The column number in the original source, or null. - * - name: The original identifier, or null. - */ - IndexedSourceMapConsumer.prototype.originalPositionFor = - function IndexedSourceMapConsumer_originalPositionFor(aArgs) { - var needle = { - generatedLine: util.getArg(aArgs, 'line'), - generatedColumn: util.getArg(aArgs, 'column') - }; - - // Find the section containing the generated position we're trying to map - // to an original position. - var sectionIndex = binarySearch.search(needle, this._sections, - function(needle, section) { - var cmp = needle.generatedLine - section.generatedOffset.generatedLine; - if (cmp) { - return cmp; - } - - return (needle.generatedColumn - - section.generatedOffset.generatedColumn); - }); - var section = this._sections[sectionIndex]; - - if (!section) { - return { - source: null, - line: null, - column: null, - name: null - }; - } - - return section.consumer.originalPositionFor({ - line: needle.generatedLine - - (section.generatedOffset.generatedLine - 1), - column: needle.generatedColumn - - (section.generatedOffset.generatedLine === needle.generatedLine - ? section.generatedOffset.generatedColumn - 1 - : 0), - bias: aArgs.bias - }); - }; - - /** - * Return true if we have the source content for every source in the source - * map, false otherwise. - */ - IndexedSourceMapConsumer.prototype.hasContentsOfAllSources = - function IndexedSourceMapConsumer_hasContentsOfAllSources() { - return this._sections.every(function (s) { - return s.consumer.hasContentsOfAllSources(); - }); - }; - - /** - * Returns the original source content. The only argument is the url of the - * original source file. Returns null if no original source content is - * available. - */ - IndexedSourceMapConsumer.prototype.sourceContentFor = - function IndexedSourceMapConsumer_sourceContentFor(aSource, nullOnMissing) { - for (var i = 0; i < this._sections.length; i++) { - var section = this._sections[i]; - - var content = section.consumer.sourceContentFor(aSource, true); - if (content) { - return content; - } - } - if (nullOnMissing) { - return null; - } - else { - throw new Error('"' + aSource + '" is not in the SourceMap.'); - } - }; - - /** - * Returns the generated line and column information for the original source, - * line, and column positions provided. The only argument is an object with - * the following properties: - * - * - source: The filename of the original source. - * - line: The line number in the original source. - * - column: The column number in the original source. - * - * and an object is returned with the following properties: - * - * - line: The line number in the generated source, or null. - * - column: The column number in the generated source, or null. - */ - IndexedSourceMapConsumer.prototype.generatedPositionFor = - function IndexedSourceMapConsumer_generatedPositionFor(aArgs) { - for (var i = 0; i < this._sections.length; i++) { - var section = this._sections[i]; - - // Only consider this section if the requested source is in the list of - // sources of the consumer. - if (section.consumer.sources.indexOf(util.getArg(aArgs, 'source')) === -1) { - continue; - } - var generatedPosition = section.consumer.generatedPositionFor(aArgs); - if (generatedPosition) { - var ret = { - line: generatedPosition.line + - (section.generatedOffset.generatedLine - 1), - column: generatedPosition.column + - (section.generatedOffset.generatedLine === generatedPosition.line - ? section.generatedOffset.generatedColumn - 1 - : 0) - }; - return ret; - } - } - - return { - line: null, - column: null - }; - }; - - /** - * Parse the mappings in a string in to a data structure which we can easily - * query (the ordered arrays in the `this.__generatedMappings` and - * `this.__originalMappings` properties). - */ - IndexedSourceMapConsumer.prototype._parseMappings = - function IndexedSourceMapConsumer_parseMappings(aStr, aSourceRoot) { - this.__generatedMappings = []; - this.__originalMappings = []; - for (var i = 0; i < this._sections.length; i++) { - var section = this._sections[i]; - var sectionMappings = section.consumer._generatedMappings; - for (var j = 0; j < sectionMappings.length; j++) { - var mapping = sectionMappings[i]; - - var source = section.consumer._sources.at(mapping.source); - if (section.consumer.sourceRoot !== null) { - source = util.join(section.consumer.sourceRoot, source); - } - this._sources.add(source); - source = this._sources.indexOf(source); - - var name = section.consumer._names.at(mapping.name); - this._names.add(name); - name = this._names.indexOf(name); - - // The mappings coming from the consumer for the section have - // generated positions relative to the start of the section, so we - // need to offset them to be relative to the start of the concatenated - // generated file. - var adjustedMapping = { - source: source, - generatedLine: mapping.generatedLine + - (section.generatedOffset.generatedLine - 1), - generatedColumn: mapping.column + - (section.generatedOffset.generatedLine === mapping.generatedLine) - ? section.generatedOffset.generatedColumn - 1 - : 0, - originalLine: mapping.originalLine, - originalColumn: mapping.originalColumn, - name: name - }; - - this.__generatedMappings.push(adjustedMapping); - if (typeof adjustedMapping.originalLine === 'number') { - this.__originalMappings.push(adjustedMapping); - } - }; - }; - - quickSort(this.__generatedMappings, util.compareByGeneratedPositionsDeflated); - quickSort(this.__originalMappings, util.compareByOriginalPositions); - }; - - exports.IndexedSourceMapConsumer = IndexedSourceMapConsumer; - -}); diff --git a/node_modules/browserify/node_modules/browser-pack/node_modules/combine-source-map/node_modules/source-map/lib/source-map/source-map-generator.js b/node_modules/browserify/node_modules/browser-pack/node_modules/combine-source-map/node_modules/source-map/lib/source-map/source-map-generator.js deleted file mode 100644 index d8a9025b..00000000 --- a/node_modules/browserify/node_modules/browser-pack/node_modules/combine-source-map/node_modules/source-map/lib/source-map/source-map-generator.js +++ /dev/null @@ -1,399 +0,0 @@ -/* -*- Mode: js; js-indent-level: 2; -*- */ -/* - * Copyright 2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - */ -if (typeof define !== 'function') { - var define = require('amdefine')(module, require); -} -define(function (require, exports, module) { - - var base64VLQ = require('./base64-vlq'); - var util = require('./util'); - var ArraySet = require('./array-set').ArraySet; - var MappingList = require('./mapping-list').MappingList; - - /** - * An instance of the SourceMapGenerator represents a source map which is - * being built incrementally. You may pass an object with the following - * properties: - * - * - file: The filename of the generated source. - * - sourceRoot: A root for all relative URLs in this source map. - */ - function SourceMapGenerator(aArgs) { - if (!aArgs) { - aArgs = {}; - } - this._file = util.getArg(aArgs, 'file', null); - this._sourceRoot = util.getArg(aArgs, 'sourceRoot', null); - this._skipValidation = util.getArg(aArgs, 'skipValidation', false); - this._sources = new ArraySet(); - this._names = new ArraySet(); - this._mappings = new MappingList(); - this._sourcesContents = null; - } - - SourceMapGenerator.prototype._version = 3; - - /** - * Creates a new SourceMapGenerator based on a SourceMapConsumer - * - * @param aSourceMapConsumer The SourceMap. - */ - SourceMapGenerator.fromSourceMap = - function SourceMapGenerator_fromSourceMap(aSourceMapConsumer) { - var sourceRoot = aSourceMapConsumer.sourceRoot; - var generator = new SourceMapGenerator({ - file: aSourceMapConsumer.file, - sourceRoot: sourceRoot - }); - aSourceMapConsumer.eachMapping(function (mapping) { - var newMapping = { - generated: { - line: mapping.generatedLine, - column: mapping.generatedColumn - } - }; - - if (mapping.source != null) { - newMapping.source = mapping.source; - if (sourceRoot != null) { - newMapping.source = util.relative(sourceRoot, newMapping.source); - } - - newMapping.original = { - line: mapping.originalLine, - column: mapping.originalColumn - }; - - if (mapping.name != null) { - newMapping.name = mapping.name; - } - } - - generator.addMapping(newMapping); - }); - aSourceMapConsumer.sources.forEach(function (sourceFile) { - var content = aSourceMapConsumer.sourceContentFor(sourceFile); - if (content != null) { - generator.setSourceContent(sourceFile, content); - } - }); - return generator; - }; - - /** - * Add a single mapping from original source line and column to the generated - * source's line and column for this source map being created. The mapping - * object should have the following properties: - * - * - generated: An object with the generated line and column positions. - * - original: An object with the original line and column positions. - * - source: The original source file (relative to the sourceRoot). - * - name: An optional original token name for this mapping. - */ - SourceMapGenerator.prototype.addMapping = - function SourceMapGenerator_addMapping(aArgs) { - var generated = util.getArg(aArgs, 'generated'); - var original = util.getArg(aArgs, 'original', null); - var source = util.getArg(aArgs, 'source', null); - var name = util.getArg(aArgs, 'name', null); - - if (!this._skipValidation) { - this._validateMapping(generated, original, source, name); - } - - if (source != null && !this._sources.has(source)) { - this._sources.add(source); - } - - if (name != null && !this._names.has(name)) { - this._names.add(name); - } - - this._mappings.add({ - generatedLine: generated.line, - generatedColumn: generated.column, - originalLine: original != null && original.line, - originalColumn: original != null && original.column, - source: source, - name: name - }); - }; - - /** - * Set the source content for a source file. - */ - SourceMapGenerator.prototype.setSourceContent = - function SourceMapGenerator_setSourceContent(aSourceFile, aSourceContent) { - var source = aSourceFile; - if (this._sourceRoot != null) { - source = util.relative(this._sourceRoot, source); - } - - if (aSourceContent != null) { - // Add the source content to the _sourcesContents map. - // Create a new _sourcesContents map if the property is null. - if (!this._sourcesContents) { - this._sourcesContents = {}; - } - this._sourcesContents[util.toSetString(source)] = aSourceContent; - } else if (this._sourcesContents) { - // Remove the source file from the _sourcesContents map. - // If the _sourcesContents map is empty, set the property to null. - delete this._sourcesContents[util.toSetString(source)]; - if (Object.keys(this._sourcesContents).length === 0) { - this._sourcesContents = null; - } - } - }; - - /** - * Applies the mappings of a sub-source-map for a specific source file to the - * source map being generated. Each mapping to the supplied source file is - * rewritten using the supplied source map. Note: The resolution for the - * resulting mappings is the minimium of this map and the supplied map. - * - * @param aSourceMapConsumer The source map to be applied. - * @param aSourceFile Optional. The filename of the source file. - * If omitted, SourceMapConsumer's file property will be used. - * @param aSourceMapPath Optional. The dirname of the path to the source map - * to be applied. If relative, it is relative to the SourceMapConsumer. - * This parameter is needed when the two source maps aren't in the same - * directory, and the source map to be applied contains relative source - * paths. If so, those relative source paths need to be rewritten - * relative to the SourceMapGenerator. - */ - SourceMapGenerator.prototype.applySourceMap = - function SourceMapGenerator_applySourceMap(aSourceMapConsumer, aSourceFile, aSourceMapPath) { - var sourceFile = aSourceFile; - // If aSourceFile is omitted, we will use the file property of the SourceMap - if (aSourceFile == null) { - if (aSourceMapConsumer.file == null) { - throw new Error( - 'SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, ' + - 'or the source map\'s "file" property. Both were omitted.' - ); - } - sourceFile = aSourceMapConsumer.file; - } - var sourceRoot = this._sourceRoot; - // Make "sourceFile" relative if an absolute Url is passed. - if (sourceRoot != null) { - sourceFile = util.relative(sourceRoot, sourceFile); - } - // Applying the SourceMap can add and remove items from the sources and - // the names array. - var newSources = new ArraySet(); - var newNames = new ArraySet(); - - // Find mappings for the "sourceFile" - this._mappings.unsortedForEach(function (mapping) { - if (mapping.source === sourceFile && mapping.originalLine != null) { - // Check if it can be mapped by the source map, then update the mapping. - var original = aSourceMapConsumer.originalPositionFor({ - line: mapping.originalLine, - column: mapping.originalColumn - }); - if (original.source != null) { - // Copy mapping - mapping.source = original.source; - if (aSourceMapPath != null) { - mapping.source = util.join(aSourceMapPath, mapping.source) - } - if (sourceRoot != null) { - mapping.source = util.relative(sourceRoot, mapping.source); - } - mapping.originalLine = original.line; - mapping.originalColumn = original.column; - if (original.name != null) { - mapping.name = original.name; - } - } - } - - var source = mapping.source; - if (source != null && !newSources.has(source)) { - newSources.add(source); - } - - var name = mapping.name; - if (name != null && !newNames.has(name)) { - newNames.add(name); - } - - }, this); - this._sources = newSources; - this._names = newNames; - - // Copy sourcesContents of applied map. - aSourceMapConsumer.sources.forEach(function (sourceFile) { - var content = aSourceMapConsumer.sourceContentFor(sourceFile); - if (content != null) { - if (aSourceMapPath != null) { - sourceFile = util.join(aSourceMapPath, sourceFile); - } - if (sourceRoot != null) { - sourceFile = util.relative(sourceRoot, sourceFile); - } - this.setSourceContent(sourceFile, content); - } - }, this); - }; - - /** - * A mapping can have one of the three levels of data: - * - * 1. Just the generated position. - * 2. The Generated position, original position, and original source. - * 3. Generated and original position, original source, as well as a name - * token. - * - * To maintain consistency, we validate that any new mapping being added falls - * in to one of these categories. - */ - SourceMapGenerator.prototype._validateMapping = - function SourceMapGenerator_validateMapping(aGenerated, aOriginal, aSource, - aName) { - if (aGenerated && 'line' in aGenerated && 'column' in aGenerated - && aGenerated.line > 0 && aGenerated.column >= 0 - && !aOriginal && !aSource && !aName) { - // Case 1. - return; - } - else if (aGenerated && 'line' in aGenerated && 'column' in aGenerated - && aOriginal && 'line' in aOriginal && 'column' in aOriginal - && aGenerated.line > 0 && aGenerated.column >= 0 - && aOriginal.line > 0 && aOriginal.column >= 0 - && aSource) { - // Cases 2 and 3. - return; - } - else { - throw new Error('Invalid mapping: ' + JSON.stringify({ - generated: aGenerated, - source: aSource, - original: aOriginal, - name: aName - })); - } - }; - - /** - * Serialize the accumulated mappings in to the stream of base 64 VLQs - * specified by the source map format. - */ - SourceMapGenerator.prototype._serializeMappings = - function SourceMapGenerator_serializeMappings() { - var previousGeneratedColumn = 0; - var previousGeneratedLine = 1; - var previousOriginalColumn = 0; - var previousOriginalLine = 0; - var previousName = 0; - var previousSource = 0; - var result = ''; - var mapping; - - var mappings = this._mappings.toArray(); - for (var i = 0, len = mappings.length; i < len; i++) { - mapping = mappings[i]; - - if (mapping.generatedLine !== previousGeneratedLine) { - previousGeneratedColumn = 0; - while (mapping.generatedLine !== previousGeneratedLine) { - result += ';'; - previousGeneratedLine++; - } - } - else { - if (i > 0) { - if (!util.compareByGeneratedPositionsInflated(mapping, mappings[i - 1])) { - continue; - } - result += ','; - } - } - - result += base64VLQ.encode(mapping.generatedColumn - - previousGeneratedColumn); - previousGeneratedColumn = mapping.generatedColumn; - - if (mapping.source != null) { - result += base64VLQ.encode(this._sources.indexOf(mapping.source) - - previousSource); - previousSource = this._sources.indexOf(mapping.source); - - // lines are stored 0-based in SourceMap spec version 3 - result += base64VLQ.encode(mapping.originalLine - 1 - - previousOriginalLine); - previousOriginalLine = mapping.originalLine - 1; - - result += base64VLQ.encode(mapping.originalColumn - - previousOriginalColumn); - previousOriginalColumn = mapping.originalColumn; - - if (mapping.name != null) { - result += base64VLQ.encode(this._names.indexOf(mapping.name) - - previousName); - previousName = this._names.indexOf(mapping.name); - } - } - } - - return result; - }; - - SourceMapGenerator.prototype._generateSourcesContent = - function SourceMapGenerator_generateSourcesContent(aSources, aSourceRoot) { - return aSources.map(function (source) { - if (!this._sourcesContents) { - return null; - } - if (aSourceRoot != null) { - source = util.relative(aSourceRoot, source); - } - var key = util.toSetString(source); - return Object.prototype.hasOwnProperty.call(this._sourcesContents, - key) - ? this._sourcesContents[key] - : null; - }, this); - }; - - /** - * Externalize the source map. - */ - SourceMapGenerator.prototype.toJSON = - function SourceMapGenerator_toJSON() { - var map = { - version: this._version, - sources: this._sources.toArray(), - names: this._names.toArray(), - mappings: this._serializeMappings() - }; - if (this._file != null) { - map.file = this._file; - } - if (this._sourceRoot != null) { - map.sourceRoot = this._sourceRoot; - } - if (this._sourcesContents) { - map.sourcesContent = this._generateSourcesContent(map.sources, map.sourceRoot); - } - - return map; - }; - - /** - * Render the source map being generated to a string. - */ - SourceMapGenerator.prototype.toString = - function SourceMapGenerator_toString() { - return JSON.stringify(this.toJSON()); - }; - - exports.SourceMapGenerator = SourceMapGenerator; - -}); diff --git a/node_modules/browserify/node_modules/browser-pack/node_modules/combine-source-map/node_modules/source-map/lib/source-map/source-node.js b/node_modules/browserify/node_modules/browser-pack/node_modules/combine-source-map/node_modules/source-map/lib/source-map/source-node.js deleted file mode 100644 index 9ee90bd5..00000000 --- a/node_modules/browserify/node_modules/browser-pack/node_modules/combine-source-map/node_modules/source-map/lib/source-map/source-node.js +++ /dev/null @@ -1,414 +0,0 @@ -/* -*- Mode: js; js-indent-level: 2; -*- */ -/* - * Copyright 2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - */ -if (typeof define !== 'function') { - var define = require('amdefine')(module, require); -} -define(function (require, exports, module) { - - var SourceMapGenerator = require('./source-map-generator').SourceMapGenerator; - var util = require('./util'); - - // Matches a Windows-style `\r\n` newline or a `\n` newline used by all other - // operating systems these days (capturing the result). - var REGEX_NEWLINE = /(\r?\n)/; - - // Newline character code for charCodeAt() comparisons - var NEWLINE_CODE = 10; - - // Private symbol for identifying `SourceNode`s when multiple versions of - // the source-map library are loaded. This MUST NOT CHANGE across - // versions! - var isSourceNode = "$$$isSourceNode$$$"; - - /** - * SourceNodes provide a way to abstract over interpolating/concatenating - * snippets of generated JavaScript source code while maintaining the line and - * column information associated with the original source code. - * - * @param aLine The original line number. - * @param aColumn The original column number. - * @param aSource The original source's filename. - * @param aChunks Optional. An array of strings which are snippets of - * generated JS, or other SourceNodes. - * @param aName The original identifier. - */ - function SourceNode(aLine, aColumn, aSource, aChunks, aName) { - this.children = []; - this.sourceContents = {}; - this.line = aLine == null ? null : aLine; - this.column = aColumn == null ? null : aColumn; - this.source = aSource == null ? null : aSource; - this.name = aName == null ? null : aName; - this[isSourceNode] = true; - if (aChunks != null) this.add(aChunks); - } - - /** - * Creates a SourceNode from generated code and a SourceMapConsumer. - * - * @param aGeneratedCode The generated code - * @param aSourceMapConsumer The SourceMap for the generated code - * @param aRelativePath Optional. The path that relative sources in the - * SourceMapConsumer should be relative to. - */ - SourceNode.fromStringWithSourceMap = - function SourceNode_fromStringWithSourceMap(aGeneratedCode, aSourceMapConsumer, aRelativePath) { - // The SourceNode we want to fill with the generated code - // and the SourceMap - var node = new SourceNode(); - - // All even indices of this array are one line of the generated code, - // while all odd indices are the newlines between two adjacent lines - // (since `REGEX_NEWLINE` captures its match). - // Processed fragments are removed from this array, by calling `shiftNextLine`. - var remainingLines = aGeneratedCode.split(REGEX_NEWLINE); - var shiftNextLine = function() { - var lineContents = remainingLines.shift(); - // The last line of a file might not have a newline. - var newLine = remainingLines.shift() || ""; - return lineContents + newLine; - }; - - // We need to remember the position of "remainingLines" - var lastGeneratedLine = 1, lastGeneratedColumn = 0; - - // The generate SourceNodes we need a code range. - // To extract it current and last mapping is used. - // Here we store the last mapping. - var lastMapping = null; - - aSourceMapConsumer.eachMapping(function (mapping) { - if (lastMapping !== null) { - // We add the code from "lastMapping" to "mapping": - // First check if there is a new line in between. - if (lastGeneratedLine < mapping.generatedLine) { - var code = ""; - // Associate first line with "lastMapping" - addMappingWithCode(lastMapping, shiftNextLine()); - lastGeneratedLine++; - lastGeneratedColumn = 0; - // The remaining code is added without mapping - } else { - // There is no new line in between. - // Associate the code between "lastGeneratedColumn" and - // "mapping.generatedColumn" with "lastMapping" - var nextLine = remainingLines[0]; - var code = nextLine.substr(0, mapping.generatedColumn - - lastGeneratedColumn); - remainingLines[0] = nextLine.substr(mapping.generatedColumn - - lastGeneratedColumn); - lastGeneratedColumn = mapping.generatedColumn; - addMappingWithCode(lastMapping, code); - // No more remaining code, continue - lastMapping = mapping; - return; - } - } - // We add the generated code until the first mapping - // to the SourceNode without any mapping. - // Each line is added as separate string. - while (lastGeneratedLine < mapping.generatedLine) { - node.add(shiftNextLine()); - lastGeneratedLine++; - } - if (lastGeneratedColumn < mapping.generatedColumn) { - var nextLine = remainingLines[0]; - node.add(nextLine.substr(0, mapping.generatedColumn)); - remainingLines[0] = nextLine.substr(mapping.generatedColumn); - lastGeneratedColumn = mapping.generatedColumn; - } - lastMapping = mapping; - }, this); - // We have processed all mappings. - if (remainingLines.length > 0) { - if (lastMapping) { - // Associate the remaining code in the current line with "lastMapping" - addMappingWithCode(lastMapping, shiftNextLine()); - } - // and add the remaining lines without any mapping - node.add(remainingLines.join("")); - } - - // Copy sourcesContent into SourceNode - aSourceMapConsumer.sources.forEach(function (sourceFile) { - var content = aSourceMapConsumer.sourceContentFor(sourceFile); - if (content != null) { - if (aRelativePath != null) { - sourceFile = util.join(aRelativePath, sourceFile); - } - node.setSourceContent(sourceFile, content); - } - }); - - return node; - - function addMappingWithCode(mapping, code) { - if (mapping === null || mapping.source === undefined) { - node.add(code); - } else { - var source = aRelativePath - ? util.join(aRelativePath, mapping.source) - : mapping.source; - node.add(new SourceNode(mapping.originalLine, - mapping.originalColumn, - source, - code, - mapping.name)); - } - } - }; - - /** - * Add a chunk of generated JS to this source node. - * - * @param aChunk A string snippet of generated JS code, another instance of - * SourceNode, or an array where each member is one of those things. - */ - SourceNode.prototype.add = function SourceNode_add(aChunk) { - if (Array.isArray(aChunk)) { - aChunk.forEach(function (chunk) { - this.add(chunk); - }, this); - } - else if (aChunk[isSourceNode] || typeof aChunk === "string") { - if (aChunk) { - this.children.push(aChunk); - } - } - else { - throw new TypeError( - "Expected a SourceNode, string, or an array of SourceNodes and strings. Got " + aChunk - ); - } - return this; - }; - - /** - * Add a chunk of generated JS to the beginning of this source node. - * - * @param aChunk A string snippet of generated JS code, another instance of - * SourceNode, or an array where each member is one of those things. - */ - SourceNode.prototype.prepend = function SourceNode_prepend(aChunk) { - if (Array.isArray(aChunk)) { - for (var i = aChunk.length-1; i >= 0; i--) { - this.prepend(aChunk[i]); - } - } - else if (aChunk[isSourceNode] || typeof aChunk === "string") { - this.children.unshift(aChunk); - } - else { - throw new TypeError( - "Expected a SourceNode, string, or an array of SourceNodes and strings. Got " + aChunk - ); - } - return this; - }; - - /** - * Walk over the tree of JS snippets in this node and its children. The - * walking function is called once for each snippet of JS and is passed that - * snippet and the its original associated source's line/column location. - * - * @param aFn The traversal function. - */ - SourceNode.prototype.walk = function SourceNode_walk(aFn) { - var chunk; - for (var i = 0, len = this.children.length; i < len; i++) { - chunk = this.children[i]; - if (chunk[isSourceNode]) { - chunk.walk(aFn); - } - else { - if (chunk !== '') { - aFn(chunk, { source: this.source, - line: this.line, - column: this.column, - name: this.name }); - } - } - } - }; - - /** - * Like `String.prototype.join` except for SourceNodes. Inserts `aStr` between - * each of `this.children`. - * - * @param aSep The separator. - */ - SourceNode.prototype.join = function SourceNode_join(aSep) { - var newChildren; - var i; - var len = this.children.length; - if (len > 0) { - newChildren = []; - for (i = 0; i < len-1; i++) { - newChildren.push(this.children[i]); - newChildren.push(aSep); - } - newChildren.push(this.children[i]); - this.children = newChildren; - } - return this; - }; - - /** - * Call String.prototype.replace on the very right-most source snippet. Useful - * for trimming whitespace from the end of a source node, etc. - * - * @param aPattern The pattern to replace. - * @param aReplacement The thing to replace the pattern with. - */ - SourceNode.prototype.replaceRight = function SourceNode_replaceRight(aPattern, aReplacement) { - var lastChild = this.children[this.children.length - 1]; - if (lastChild[isSourceNode]) { - lastChild.replaceRight(aPattern, aReplacement); - } - else if (typeof lastChild === 'string') { - this.children[this.children.length - 1] = lastChild.replace(aPattern, aReplacement); - } - else { - this.children.push(''.replace(aPattern, aReplacement)); - } - return this; - }; - - /** - * Set the source content for a source file. This will be added to the SourceMapGenerator - * in the sourcesContent field. - * - * @param aSourceFile The filename of the source file - * @param aSourceContent The content of the source file - */ - SourceNode.prototype.setSourceContent = - function SourceNode_setSourceContent(aSourceFile, aSourceContent) { - this.sourceContents[util.toSetString(aSourceFile)] = aSourceContent; - }; - - /** - * Walk over the tree of SourceNodes. The walking function is called for each - * source file content and is passed the filename and source content. - * - * @param aFn The traversal function. - */ - SourceNode.prototype.walkSourceContents = - function SourceNode_walkSourceContents(aFn) { - for (var i = 0, len = this.children.length; i < len; i++) { - if (this.children[i][isSourceNode]) { - this.children[i].walkSourceContents(aFn); - } - } - - var sources = Object.keys(this.sourceContents); - for (var i = 0, len = sources.length; i < len; i++) { - aFn(util.fromSetString(sources[i]), this.sourceContents[sources[i]]); - } - }; - - /** - * Return the string representation of this source node. Walks over the tree - * and concatenates all the various snippets together to one string. - */ - SourceNode.prototype.toString = function SourceNode_toString() { - var str = ""; - this.walk(function (chunk) { - str += chunk; - }); - return str; - }; - - /** - * Returns the string representation of this source node along with a source - * map. - */ - SourceNode.prototype.toStringWithSourceMap = function SourceNode_toStringWithSourceMap(aArgs) { - var generated = { - code: "", - line: 1, - column: 0 - }; - var map = new SourceMapGenerator(aArgs); - var sourceMappingActive = false; - var lastOriginalSource = null; - var lastOriginalLine = null; - var lastOriginalColumn = null; - var lastOriginalName = null; - this.walk(function (chunk, original) { - generated.code += chunk; - if (original.source !== null - && original.line !== null - && original.column !== null) { - if(lastOriginalSource !== original.source - || lastOriginalLine !== original.line - || lastOriginalColumn !== original.column - || lastOriginalName !== original.name) { - map.addMapping({ - source: original.source, - original: { - line: original.line, - column: original.column - }, - generated: { - line: generated.line, - column: generated.column - }, - name: original.name - }); - } - lastOriginalSource = original.source; - lastOriginalLine = original.line; - lastOriginalColumn = original.column; - lastOriginalName = original.name; - sourceMappingActive = true; - } else if (sourceMappingActive) { - map.addMapping({ - generated: { - line: generated.line, - column: generated.column - } - }); - lastOriginalSource = null; - sourceMappingActive = false; - } - for (var idx = 0, length = chunk.length; idx < length; idx++) { - if (chunk.charCodeAt(idx) === NEWLINE_CODE) { - generated.line++; - generated.column = 0; - // Mappings end at eol - if (idx + 1 === length) { - lastOriginalSource = null; - sourceMappingActive = false; - } else if (sourceMappingActive) { - map.addMapping({ - source: original.source, - original: { - line: original.line, - column: original.column - }, - generated: { - line: generated.line, - column: generated.column - }, - name: original.name - }); - } - } else { - generated.column++; - } - } - }); - this.walkSourceContents(function (sourceFile, sourceContent) { - map.setSourceContent(sourceFile, sourceContent); - }); - - return { code: generated.code, map: map }; - }; - - exports.SourceNode = SourceNode; - -}); diff --git a/node_modules/browserify/node_modules/browser-pack/node_modules/combine-source-map/node_modules/source-map/lib/source-map/util.js b/node_modules/browserify/node_modules/browser-pack/node_modules/combine-source-map/node_modules/source-map/lib/source-map/util.js deleted file mode 100644 index 0b9d75dd..00000000 --- a/node_modules/browserify/node_modules/browser-pack/node_modules/combine-source-map/node_modules/source-map/lib/source-map/util.js +++ /dev/null @@ -1,370 +0,0 @@ -/* -*- Mode: js; js-indent-level: 2; -*- */ -/* - * Copyright 2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - */ -if (typeof define !== 'function') { - var define = require('amdefine')(module, require); -} -define(function (require, exports, module) { - - /** - * This is a helper function for getting values from parameter/options - * objects. - * - * @param args The object we are extracting values from - * @param name The name of the property we are getting. - * @param defaultValue An optional value to return if the property is missing - * from the object. If this is not specified and the property is missing, an - * error will be thrown. - */ - function getArg(aArgs, aName, aDefaultValue) { - if (aName in aArgs) { - return aArgs[aName]; - } else if (arguments.length === 3) { - return aDefaultValue; - } else { - throw new Error('"' + aName + '" is a required argument.'); - } - } - exports.getArg = getArg; - - var urlRegexp = /^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.]*)(?::(\d+))?(\S*)$/; - var dataUrlRegexp = /^data:.+\,.+$/; - - function urlParse(aUrl) { - var match = aUrl.match(urlRegexp); - if (!match) { - return null; - } - return { - scheme: match[1], - auth: match[2], - host: match[3], - port: match[4], - path: match[5] - }; - } - exports.urlParse = urlParse; - - function urlGenerate(aParsedUrl) { - var url = ''; - if (aParsedUrl.scheme) { - url += aParsedUrl.scheme + ':'; - } - url += '//'; - if (aParsedUrl.auth) { - url += aParsedUrl.auth + '@'; - } - if (aParsedUrl.host) { - url += aParsedUrl.host; - } - if (aParsedUrl.port) { - url += ":" + aParsedUrl.port - } - if (aParsedUrl.path) { - url += aParsedUrl.path; - } - return url; - } - exports.urlGenerate = urlGenerate; - - /** - * Normalizes a path, or the path portion of a URL: - * - * - Replaces consequtive slashes with one slash. - * - Removes unnecessary '.' parts. - * - Removes unnecessary '
    /..' parts. - * - * Based on code in the Node.js 'path' core module. - * - * @param aPath The path or url to normalize. - */ - function normalize(aPath) { - var path = aPath; - var url = urlParse(aPath); - if (url) { - if (!url.path) { - return aPath; - } - path = url.path; - } - var isAbsolute = (path.charAt(0) === '/'); - - var parts = path.split(/\/+/); - for (var part, up = 0, i = parts.length - 1; i >= 0; i--) { - part = parts[i]; - if (part === '.') { - parts.splice(i, 1); - } else if (part === '..') { - up++; - } else if (up > 0) { - if (part === '') { - // The first part is blank if the path is absolute. Trying to go - // above the root is a no-op. Therefore we can remove all '..' parts - // directly after the root. - parts.splice(i + 1, up); - up = 0; - } else { - parts.splice(i, 2); - up--; - } - } - } - path = parts.join('/'); - - if (path === '') { - path = isAbsolute ? '/' : '.'; - } - - if (url) { - url.path = path; - return urlGenerate(url); - } - return path; - } - exports.normalize = normalize; - - /** - * Joins two paths/URLs. - * - * @param aRoot The root path or URL. - * @param aPath The path or URL to be joined with the root. - * - * - If aPath is a URL or a data URI, aPath is returned, unless aPath is a - * scheme-relative URL: Then the scheme of aRoot, if any, is prepended - * first. - * - Otherwise aPath is a path. If aRoot is a URL, then its path portion - * is updated with the result and aRoot is returned. Otherwise the result - * is returned. - * - If aPath is absolute, the result is aPath. - * - Otherwise the two paths are joined with a slash. - * - Joining for example 'http://' and 'www.example.com' is also supported. - */ - function join(aRoot, aPath) { - if (aRoot === "") { - aRoot = "."; - } - if (aPath === "") { - aPath = "."; - } - var aPathUrl = urlParse(aPath); - var aRootUrl = urlParse(aRoot); - if (aRootUrl) { - aRoot = aRootUrl.path || '/'; - } - - // `join(foo, '//www.example.org')` - if (aPathUrl && !aPathUrl.scheme) { - if (aRootUrl) { - aPathUrl.scheme = aRootUrl.scheme; - } - return urlGenerate(aPathUrl); - } - - if (aPathUrl || aPath.match(dataUrlRegexp)) { - return aPath; - } - - // `join('http://', 'www.example.com')` - if (aRootUrl && !aRootUrl.host && !aRootUrl.path) { - aRootUrl.host = aPath; - return urlGenerate(aRootUrl); - } - - var joined = aPath.charAt(0) === '/' - ? aPath - : normalize(aRoot.replace(/\/+$/, '') + '/' + aPath); - - if (aRootUrl) { - aRootUrl.path = joined; - return urlGenerate(aRootUrl); - } - return joined; - } - exports.join = join; - - /** - * Make a path relative to a URL or another path. - * - * @param aRoot The root path or URL. - * @param aPath The path or URL to be made relative to aRoot. - */ - function relative(aRoot, aPath) { - if (aRoot === "") { - aRoot = "."; - } - - aRoot = aRoot.replace(/\/$/, ''); - - // It is possible for the path to be above the root. In this case, simply - // checking whether the root is a prefix of the path won't work. Instead, we - // need to remove components from the root one by one, until either we find - // a prefix that fits, or we run out of components to remove. - var level = 0; - while (aPath.indexOf(aRoot + '/') !== 0) { - var index = aRoot.lastIndexOf("/"); - if (index < 0) { - return aPath; - } - - // If the only part of the root that is left is the scheme (i.e. http://, - // file:///, etc.), one or more slashes (/), or simply nothing at all, we - // have exhausted all components, so the path is not relative to the root. - aRoot = aRoot.slice(0, index); - if (aRoot.match(/^([^\/]+:\/)?\/*$/)) { - return aPath; - } - - ++level; - } - - // Make sure we add a "../" for each component we removed from the root. - return Array(level + 1).join("../") + aPath.substr(aRoot.length + 1); - } - exports.relative = relative; - - /** - * Because behavior goes wacky when you set `__proto__` on objects, we - * have to prefix all the strings in our set with an arbitrary character. - * - * See https://github.com/mozilla/source-map/pull/31 and - * https://github.com/mozilla/source-map/issues/30 - * - * @param String aStr - */ - function toSetString(aStr) { - return '$' + aStr; - } - exports.toSetString = toSetString; - - function fromSetString(aStr) { - return aStr.substr(1); - } - exports.fromSetString = fromSetString; - - /** - * Comparator between two mappings where the original positions are compared. - * - * Optionally pass in `true` as `onlyCompareGenerated` to consider two - * mappings with the same original source/line/column, but different generated - * line and column the same. Useful when searching for a mapping with a - * stubbed out mapping. - */ - function compareByOriginalPositions(mappingA, mappingB, onlyCompareOriginal) { - var cmp = mappingA.source - mappingB.source; - if (cmp !== 0) { - return cmp; - } - - cmp = mappingA.originalLine - mappingB.originalLine; - if (cmp !== 0) { - return cmp; - } - - cmp = mappingA.originalColumn - mappingB.originalColumn; - if (cmp !== 0 || onlyCompareOriginal) { - return cmp; - } - - cmp = mappingA.generatedColumn - mappingB.generatedColumn; - if (cmp !== 0) { - return cmp; - } - - cmp = mappingA.generatedLine - mappingB.generatedLine; - if (cmp !== 0) { - return cmp; - } - - return mappingA.name - mappingB.name; - }; - exports.compareByOriginalPositions = compareByOriginalPositions; - - /** - * Comparator between two mappings with deflated source and name indices where - * the generated positions are compared. - * - * Optionally pass in `true` as `onlyCompareGenerated` to consider two - * mappings with the same generated line and column, but different - * source/name/original line and column the same. Useful when searching for a - * mapping with a stubbed out mapping. - */ - function compareByGeneratedPositionsDeflated(mappingA, mappingB, onlyCompareGenerated) { - var cmp = mappingA.generatedLine - mappingB.generatedLine; - if (cmp !== 0) { - return cmp; - } - - cmp = mappingA.generatedColumn - mappingB.generatedColumn; - if (cmp !== 0 || onlyCompareGenerated) { - return cmp; - } - - cmp = mappingA.source - mappingB.source; - if (cmp !== 0) { - return cmp; - } - - cmp = mappingA.originalLine - mappingB.originalLine; - if (cmp !== 0) { - return cmp; - } - - cmp = mappingA.originalColumn - mappingB.originalColumn; - if (cmp !== 0) { - return cmp; - } - - return mappingA.name - mappingB.name; - }; - exports.compareByGeneratedPositionsDeflated = compareByGeneratedPositionsDeflated; - - function strcmp(aStr1, aStr2) { - if (aStr1 === aStr2) { - return 0; - } - - if (aStr1 > aStr2) { - return 1; - } - - return -1; - } - - /** - * Comparator between two mappings with inflated source and name strings where - * the generated positions are compared. - */ - function compareByGeneratedPositionsInflated(mappingA, mappingB) { - var cmp = mappingA.generatedLine - mappingB.generatedLine; - if (cmp !== 0) { - return cmp; - } - - cmp = mappingA.generatedColumn - mappingB.generatedColumn; - if (cmp !== 0) { - return cmp; - } - - cmp = strcmp(mappingA.source, mappingB.source); - if (cmp !== 0) { - return cmp; - } - - cmp = mappingA.originalLine - mappingB.originalLine; - if (cmp !== 0) { - return cmp; - } - - cmp = mappingA.originalColumn - mappingB.originalColumn; - if (cmp !== 0) { - return cmp; - } - - return strcmp(mappingA.name, mappingB.name); - }; - exports.compareByGeneratedPositionsInflated = compareByGeneratedPositionsInflated; - -}); diff --git a/node_modules/browserify/node_modules/browser-pack/node_modules/combine-source-map/node_modules/source-map/node_modules/amdefine/LICENSE b/node_modules/browserify/node_modules/browser-pack/node_modules/combine-source-map/node_modules/source-map/node_modules/amdefine/LICENSE deleted file mode 100644 index 9b25ee00..00000000 --- a/node_modules/browserify/node_modules/browser-pack/node_modules/combine-source-map/node_modules/source-map/node_modules/amdefine/LICENSE +++ /dev/null @@ -1,58 +0,0 @@ -amdefine is released under two licenses: new BSD, and MIT. You may pick the -license that best suits your development needs. The text of both licenses are -provided below. - - -The "New" BSD License: ----------------------- - -Copyright (c) 2011-2016, The Dojo Foundation -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - * Neither the name of the Dojo Foundation nor the names of its contributors - may be used to endorse or promote products derived from this software - without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, -OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - - -MIT License ------------ - -Copyright (c) 2011-2016, The Dojo Foundation - -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/node_modules/browserify/node_modules/browser-pack/node_modules/combine-source-map/node_modules/source-map/node_modules/amdefine/README.md b/node_modules/browserify/node_modules/browser-pack/node_modules/combine-source-map/node_modules/source-map/node_modules/amdefine/README.md deleted file mode 100644 index 037a6e81..00000000 --- a/node_modules/browserify/node_modules/browser-pack/node_modules/combine-source-map/node_modules/source-map/node_modules/amdefine/README.md +++ /dev/null @@ -1,171 +0,0 @@ -# amdefine - -A module that can be used to implement AMD's define() in Node. This allows you -to code to the AMD API and have the module work in node programs without -requiring those other programs to use AMD. - -## Usage - -**1)** Update your package.json to indicate amdefine as a dependency: - -```javascript - "dependencies": { - "amdefine": ">=0.1.0" - } -``` - -Then run `npm install` to get amdefine into your project. - -**2)** At the top of each module that uses define(), place this code: - -```javascript -if (typeof define !== 'function') { var define = require('amdefine')(module) } -``` - -**Only use these snippets** when loading amdefine. If you preserve the basic structure, -with the braces, it will be stripped out when using the [RequireJS optimizer](#optimizer). - -You can add spaces, line breaks and even require amdefine with a local path, but -keep the rest of the structure to get the stripping behavior. - -As you may know, because `if` statements in JavaScript don't have their own scope, the var -declaration in the above snippet is made whether the `if` expression is truthy or not. If -RequireJS is loaded then the declaration is superfluous because `define` is already already -declared in the same scope in RequireJS. Fortunately JavaScript handles multiple `var` -declarations of the same variable in the same scope gracefully. - -If you want to deliver amdefine.js with your code rather than specifying it as a dependency -with npm, then just download the latest release and refer to it using a relative path: - -[Latest Version](https://github.com/jrburke/amdefine/raw/latest/amdefine.js) - -### amdefine/intercept - -Consider this very experimental. - -Instead of pasting the piece of text for the amdefine setup of a `define` -variable in each module you create or consume, you can use `amdefine/intercept` -instead. It will automatically insert the above snippet in each .js file loaded -by Node. - -**Warning**: you should only use this if you are creating an application that -is consuming AMD style defined()'d modules that are distributed via npm and want -to run that code in Node. - -For library code where you are not sure if it will be used by others in Node or -in the browser, then explicitly depending on amdefine and placing the code -snippet above is suggested path, instead of using `amdefine/intercept`. The -intercept module affects all .js files loaded in the Node app, and it is -inconsiderate to modify global state like that unless you are also controlling -the top level app. - -#### Why distribute AMD-style modules via npm? - -npm has a lot of weaknesses for front-end use (installed layout is not great, -should have better support for the `baseUrl + moduleID + '.js' style of loading, -single file JS installs), but some people want a JS package manager and are -willing to live with those constraints. If that is you, but still want to author -in AMD style modules to get dynamic require([]), better direct source usage and -powerful loader plugin support in the browser, then this tool can help. - -#### amdefine/intercept usage - -Just require it in your top level app module (for example index.js, server.js): - -```javascript -require('amdefine/intercept'); -``` - -The module does not return a value, so no need to assign the result to a local -variable. - -Then just require() code as you normally would with Node's require(). Any .js -loaded after the intercept require will have the amdefine check injected in -the .js source as it is loaded. It does not modify the source on disk, just -prepends some content to the text of the module as it is loaded by Node. - -#### How amdefine/intercept works - -It overrides the `Module._extensions['.js']` in Node to automatically prepend -the amdefine snippet above. So, it will affect any .js file loaded by your -app. - -## define() usage - -It is best if you use the anonymous forms of define() in your module: - -```javascript -define(function (require) { - var dependency = require('dependency'); -}); -``` - -or - -```javascript -define(['dependency'], function (dependency) { - -}); -``` - -## RequireJS optimizer integration. - -Version 1.0.3 of the [RequireJS optimizer](http://requirejs.org/docs/optimization.html) -will have support for stripping the `if (typeof define !== 'function')` check -mentioned above, so you can include this snippet for code that runs in the -browser, but avoid taking the cost of the if() statement once the code is -optimized for deployment. - -## Node 0.4 Support - -If you want to support Node 0.4, then add `require` as the second parameter to amdefine: - -```javascript -//Only if you want Node 0.4. If using 0.5 or later, use the above snippet. -if (typeof define !== 'function') { var define = require('amdefine')(module, require) } -``` - -## Limitations - -### Synchronous vs Asynchronous - -amdefine creates a define() function that is callable by your code. It will -execute and trace dependencies and call the factory function *synchronously*, -to keep the behavior in line with Node's synchronous dependency tracing. - -The exception: calling AMD's callback-style require() from inside a factory -function. The require callback is called on process.nextTick(): - -```javascript -define(function (require) { - require(['a'], function(a) { - //'a' is loaded synchronously, but - //this callback is called on process.nextTick(). - }); -}); -``` - -### Loader Plugins - -Loader plugins are supported as long as they call their load() callbacks -synchronously. So ones that do network requests will not work. However plugins -like [text](http://requirejs.org/docs/api.html#text) can load text files locally. - -The plugin API's `load.fromText()` is **not supported** in amdefine, so this means -transpiler plugins like the [CoffeeScript loader plugin](https://github.com/jrburke/require-cs) -will not work. This may be fixable, but it is a bit complex, and I do not have -enough node-fu to figure it out yet. See the source for amdefine.js if you want -to get an idea of the issues involved. - -## Tests - -To run the tests, cd to **tests** and run: - -``` -node all.js -node all-intercept.js -``` - -## License - -New BSD and MIT. Check the LICENSE file for all the details. diff --git a/node_modules/browserify/node_modules/browser-pack/node_modules/combine-source-map/node_modules/source-map/node_modules/amdefine/amdefine.js b/node_modules/browserify/node_modules/browser-pack/node_modules/combine-source-map/node_modules/source-map/node_modules/amdefine/amdefine.js deleted file mode 100644 index ca830ba4..00000000 --- a/node_modules/browserify/node_modules/browser-pack/node_modules/combine-source-map/node_modules/source-map/node_modules/amdefine/amdefine.js +++ /dev/null @@ -1,301 +0,0 @@ -/** vim: et:ts=4:sw=4:sts=4 - * @license amdefine 1.0.1 Copyright (c) 2011-2016, The Dojo Foundation All Rights Reserved. - * Available via the MIT or new BSD license. - * see: http://github.com/jrburke/amdefine for details - */ - -/*jslint node: true */ -/*global module, process */ -'use strict'; - -/** - * Creates a define for node. - * @param {Object} module the "module" object that is defined by Node for the - * current module. - * @param {Function} [requireFn]. Node's require function for the current module. - * It only needs to be passed in Node versions before 0.5, when module.require - * did not exist. - * @returns {Function} a define function that is usable for the current node - * module. - */ -function amdefine(module, requireFn) { - 'use strict'; - var defineCache = {}, - loaderCache = {}, - alreadyCalled = false, - path = require('path'), - makeRequire, stringRequire; - - /** - * Trims the . and .. from an array of path segments. - * It will keep a leading path segment if a .. will become - * the first path segment, to help with module name lookups, - * which act like paths, but can be remapped. But the end result, - * all paths that use this function should look normalized. - * NOTE: this method MODIFIES the input array. - * @param {Array} ary the array of path segments. - */ - function trimDots(ary) { - var i, part; - for (i = 0; ary[i]; i+= 1) { - part = ary[i]; - if (part === '.') { - ary.splice(i, 1); - i -= 1; - } else if (part === '..') { - if (i === 1 && (ary[2] === '..' || ary[0] === '..')) { - //End of the line. Keep at least one non-dot - //path segment at the front so it can be mapped - //correctly to disk. Otherwise, there is likely - //no path mapping for a path starting with '..'. - //This can still fail, but catches the most reasonable - //uses of .. - break; - } else if (i > 0) { - ary.splice(i - 1, 2); - i -= 2; - } - } - } - } - - function normalize(name, baseName) { - var baseParts; - - //Adjust any relative paths. - if (name && name.charAt(0) === '.') { - //If have a base name, try to normalize against it, - //otherwise, assume it is a top-level require that will - //be relative to baseUrl in the end. - if (baseName) { - baseParts = baseName.split('/'); - baseParts = baseParts.slice(0, baseParts.length - 1); - baseParts = baseParts.concat(name.split('/')); - trimDots(baseParts); - name = baseParts.join('/'); - } - } - - return name; - } - - /** - * Create the normalize() function passed to a loader plugin's - * normalize method. - */ - function makeNormalize(relName) { - return function (name) { - return normalize(name, relName); - }; - } - - function makeLoad(id) { - function load(value) { - loaderCache[id] = value; - } - - load.fromText = function (id, text) { - //This one is difficult because the text can/probably uses - //define, and any relative paths and requires should be relative - //to that id was it would be found on disk. But this would require - //bootstrapping a module/require fairly deeply from node core. - //Not sure how best to go about that yet. - throw new Error('amdefine does not implement load.fromText'); - }; - - return load; - } - - makeRequire = function (systemRequire, exports, module, relId) { - function amdRequire(deps, callback) { - if (typeof deps === 'string') { - //Synchronous, single module require('') - return stringRequire(systemRequire, exports, module, deps, relId); - } else { - //Array of dependencies with a callback. - - //Convert the dependencies to modules. - deps = deps.map(function (depName) { - return stringRequire(systemRequire, exports, module, depName, relId); - }); - - //Wait for next tick to call back the require call. - if (callback) { - process.nextTick(function () { - callback.apply(null, deps); - }); - } - } - } - - amdRequire.toUrl = function (filePath) { - if (filePath.indexOf('.') === 0) { - return normalize(filePath, path.dirname(module.filename)); - } else { - return filePath; - } - }; - - return amdRequire; - }; - - //Favor explicit value, passed in if the module wants to support Node 0.4. - requireFn = requireFn || function req() { - return module.require.apply(module, arguments); - }; - - function runFactory(id, deps, factory) { - var r, e, m, result; - - if (id) { - e = loaderCache[id] = {}; - m = { - id: id, - uri: __filename, - exports: e - }; - r = makeRequire(requireFn, e, m, id); - } else { - //Only support one define call per file - if (alreadyCalled) { - throw new Error('amdefine with no module ID cannot be called more than once per file.'); - } - alreadyCalled = true; - - //Use the real variables from node - //Use module.exports for exports, since - //the exports in here is amdefine exports. - e = module.exports; - m = module; - r = makeRequire(requireFn, e, m, module.id); - } - - //If there are dependencies, they are strings, so need - //to convert them to dependency values. - if (deps) { - deps = deps.map(function (depName) { - return r(depName); - }); - } - - //Call the factory with the right dependencies. - if (typeof factory === 'function') { - result = factory.apply(m.exports, deps); - } else { - result = factory; - } - - if (result !== undefined) { - m.exports = result; - if (id) { - loaderCache[id] = m.exports; - } - } - } - - stringRequire = function (systemRequire, exports, module, id, relId) { - //Split the ID by a ! so that - var index = id.indexOf('!'), - originalId = id, - prefix, plugin; - - if (index === -1) { - id = normalize(id, relId); - - //Straight module lookup. If it is one of the special dependencies, - //deal with it, otherwise, delegate to node. - if (id === 'require') { - return makeRequire(systemRequire, exports, module, relId); - } else if (id === 'exports') { - return exports; - } else if (id === 'module') { - return module; - } else if (loaderCache.hasOwnProperty(id)) { - return loaderCache[id]; - } else if (defineCache[id]) { - runFactory.apply(null, defineCache[id]); - return loaderCache[id]; - } else { - if(systemRequire) { - return systemRequire(originalId); - } else { - throw new Error('No module with ID: ' + id); - } - } - } else { - //There is a plugin in play. - prefix = id.substring(0, index); - id = id.substring(index + 1, id.length); - - plugin = stringRequire(systemRequire, exports, module, prefix, relId); - - if (plugin.normalize) { - id = plugin.normalize(id, makeNormalize(relId)); - } else { - //Normalize the ID normally. - id = normalize(id, relId); - } - - if (loaderCache[id]) { - return loaderCache[id]; - } else { - plugin.load(id, makeRequire(systemRequire, exports, module, relId), makeLoad(id), {}); - - return loaderCache[id]; - } - } - }; - - //Create a define function specific to the module asking for amdefine. - function define(id, deps, factory) { - if (Array.isArray(id)) { - factory = deps; - deps = id; - id = undefined; - } else if (typeof id !== 'string') { - factory = id; - id = deps = undefined; - } - - if (deps && !Array.isArray(deps)) { - factory = deps; - deps = undefined; - } - - if (!deps) { - deps = ['require', 'exports', 'module']; - } - - //Set up properties for this module. If an ID, then use - //internal cache. If no ID, then use the external variables - //for this node module. - if (id) { - //Put the module in deep freeze until there is a - //require call for it. - defineCache[id] = [id, deps, factory]; - } else { - runFactory(id, deps, factory); - } - } - - //define.require, which has access to all the values in the - //cache. Useful for AMD modules that all have IDs in the file, - //but need to finally export a value to node based on one of those - //IDs. - define.require = function (id) { - if (loaderCache[id]) { - return loaderCache[id]; - } - - if (defineCache[id]) { - runFactory.apply(null, defineCache[id]); - return loaderCache[id]; - } - }; - - define.amd = {}; - - return define; -} - -module.exports = amdefine; diff --git a/node_modules/browserify/node_modules/browser-pack/node_modules/combine-source-map/node_modules/source-map/node_modules/amdefine/intercept.js b/node_modules/browserify/node_modules/browser-pack/node_modules/combine-source-map/node_modules/source-map/node_modules/amdefine/intercept.js deleted file mode 100644 index 771a9830..00000000 --- a/node_modules/browserify/node_modules/browser-pack/node_modules/combine-source-map/node_modules/source-map/node_modules/amdefine/intercept.js +++ /dev/null @@ -1,36 +0,0 @@ -/*jshint node: true */ -var inserted, - Module = require('module'), - fs = require('fs'), - existingExtFn = Module._extensions['.js'], - amdefineRegExp = /amdefine\.js/; - -inserted = "if (typeof define !== 'function') {var define = require('amdefine')(module)}"; - -//From the node/lib/module.js source: -function stripBOM(content) { - // Remove byte order marker. This catches EF BB BF (the UTF-8 BOM) - // because the buffer-to-string conversion in `fs.readFileSync()` - // translates it to FEFF, the UTF-16 BOM. - if (content.charCodeAt(0) === 0xFEFF) { - content = content.slice(1); - } - return content; -} - -//Also adapted from the node/lib/module.js source: -function intercept(module, filename) { - var content = stripBOM(fs.readFileSync(filename, 'utf8')); - - if (!amdefineRegExp.test(module.id)) { - content = inserted + content; - } - - module._compile(content, filename); -} - -intercept._id = 'amdefine/intercept'; - -if (!existingExtFn._id || existingExtFn._id !== intercept._id) { - Module._extensions['.js'] = intercept; -} diff --git a/node_modules/browserify/node_modules/browser-pack/node_modules/combine-source-map/node_modules/source-map/node_modules/amdefine/package.json b/node_modules/browserify/node_modules/browser-pack/node_modules/combine-source-map/node_modules/source-map/node_modules/amdefine/package.json deleted file mode 100644 index 4e89580f..00000000 --- a/node_modules/browserify/node_modules/browser-pack/node_modules/combine-source-map/node_modules/source-map/node_modules/amdefine/package.json +++ /dev/null @@ -1,51 +0,0 @@ -{ - "name": "amdefine", - "description": "Provide AMD's define() API for declaring modules in the AMD format", - "version": "1.0.1", - "homepage": "http://github.com/jrburke/amdefine", - "author": { - "name": "James Burke", - "email": "jrburke@gmail.com", - "url": "http://github.com/jrburke" - }, - "license": "BSD-3-Clause OR MIT", - "repository": { - "type": "git", - "url": "git+https://github.com/jrburke/amdefine.git" - }, - "main": "./amdefine.js", - "engines": { - "node": ">=0.4.2" - }, - "gitHead": "e59edc9da24404ec7937098e3992f8fb0e260be7", - "bugs": { - "url": "https://github.com/jrburke/amdefine/issues" - }, - "_id": "amdefine@1.0.1", - "scripts": {}, - "_shasum": "4a5282ac164729e93619bcfd3ad151f817ce91f5", - "_from": "amdefine@>=0.0.4", - "_npmVersion": "3.10.3", - "_nodeVersion": "6.7.0", - "_npmUser": { - "name": "jrburke", - "email": "jrburke@gmail.com" - }, - "dist": { - "shasum": "4a5282ac164729e93619bcfd3ad151f817ce91f5", - "tarball": "https://registry.npmjs.org/amdefine/-/amdefine-1.0.1.tgz" - }, - "maintainers": [ - { - "name": "jrburke", - "email": "jrburke@gmail.com" - } - ], - "_npmOperationalInternal": { - "host": "packages-18-east.internal.npmjs.com", - "tmp": "tmp/amdefine-1.0.1.tgz_1478062849665_0.19916908955201507" - }, - "directories": {}, - "_resolved": "https://registry.npmjs.org/amdefine/-/amdefine-1.0.1.tgz", - "readme": "ERROR: No README data found!" -} diff --git a/node_modules/browserify/node_modules/browser-pack/node_modules/combine-source-map/node_modules/source-map/package.json b/node_modules/browserify/node_modules/browser-pack/node_modules/combine-source-map/node_modules/source-map/package.json deleted file mode 100644 index 7898259d..00000000 --- a/node_modules/browserify/node_modules/browser-pack/node_modules/combine-source-map/node_modules/source-map/package.json +++ /dev/null @@ -1,201 +0,0 @@ -{ - "name": "source-map", - "description": "Generates and consumes source maps", - "version": "0.4.4", - "homepage": "https://github.com/mozilla/source-map", - "author": { - "name": "Nick Fitzgerald", - "email": "nfitzgerald@mozilla.com" - }, - "contributors": [ - { - "name": "Tobias Koppers", - "email": "tobias.koppers@googlemail.com" - }, - { - "name": "Duncan Beevers", - "email": "duncan@dweebd.com" - }, - { - "name": "Stephen Crane", - "email": "scrane@mozilla.com" - }, - { - "name": "Ryan Seddon", - "email": "seddon.ryan@gmail.com" - }, - { - "name": "Miles Elam", - "email": "miles.elam@deem.com" - }, - { - "name": "Mihai Bazon", - "email": "mihai.bazon@gmail.com" - }, - { - "name": "Michael Ficarra", - "email": "github.public.email@michael.ficarra.me" - }, - { - "name": "Todd Wolfson", - "email": "todd@twolfson.com" - }, - { - "name": "Alexander Solovyov", - "email": "alexander@solovyov.net" - }, - { - "name": "Felix Gnass", - "email": "fgnass@gmail.com" - }, - { - "name": "Conrad Irwin", - "email": "conrad.irwin@gmail.com" - }, - { - "name": "usrbincc", - "email": "usrbincc@yahoo.com" - }, - { - "name": "David Glasser", - "email": "glasser@davidglasser.net" - }, - { - "name": "Chase Douglas", - "email": "chase@newrelic.com" - }, - { - "name": "Evan Wallace", - "email": "evan.exe@gmail.com" - }, - { - "name": "Heather Arthur", - "email": "fayearthur@gmail.com" - }, - { - "name": "Hugh Kennedy", - "email": "hughskennedy@gmail.com" - }, - { - "name": "David Glasser", - "email": "glasser@davidglasser.net" - }, - { - "name": "Simon Lydell", - "email": "simon.lydell@gmail.com" - }, - { - "name": "Jmeas Smith", - "email": "jellyes2@gmail.com" - }, - { - "name": "Michael Z Goddard", - "email": "mzgoddard@gmail.com" - }, - { - "name": "azu", - "email": "azu@users.noreply.github.com" - }, - { - "name": "John Gozde", - "email": "john@gozde.ca" - }, - { - "name": "Adam Kirkton", - "email": "akirkton@truefitinnovation.com" - }, - { - "name": "Chris Montgomery", - "email": "christopher.montgomery@dowjones.com" - }, - { - "name": "J. Ryan Stinnett", - "email": "jryans@gmail.com" - }, - { - "name": "Jack Herrington", - "email": "jherrington@walmartlabs.com" - }, - { - "name": "Chris Truter", - "email": "jeffpalentine@gmail.com" - }, - { - "name": "Daniel Espeset", - "email": "daniel@danielespeset.com" - }, - { - "name": "Jamie Wong", - "email": "jamie.lf.wong@gmail.com" - }, - { - "name": "Eddy Bruël", - "email": "ejpbruel@mozilla.com" - }, - { - "name": "Hawken Rives", - "email": "hawkrives@gmail.com" - }, - { - "name": "Gilad Peleg", - "email": "giladp007@gmail.com" - } - ], - "repository": { - "type": "git", - "url": "http://github.com/mozilla/source-map.git" - }, - "directories": { - "lib": "./lib" - }, - "main": "./lib/source-map.js", - "files": [ - "lib/", - "build/" - ], - "engines": { - "node": ">=0.8.0" - }, - "license": "BSD-3-Clause", - "dependencies": { - "amdefine": ">=0.0.4" - }, - "devDependencies": { - "dryice": ">=0.4.8" - }, - "scripts": { - "test": "node test/run-tests.js", - "build": "node Makefile.dryice.js" - }, - "bugs": { - "url": "https://github.com/mozilla/source-map/issues" - }, - "_id": "source-map@0.4.4", - "_shasum": "eba4f5da9c0dc999de68032d8b4f76173652036b", - "_from": "source-map@>=0.4.2 <0.5.0", - "_npmVersion": "1.4.9", - "_npmUser": { - "name": "nickfitzgerald", - "email": "fitzgen@gmail.com" - }, - "maintainers": [ - { - "name": "mozilla-devtools", - "email": "mozilla-developer-tools@googlegroups.com" - }, - { - "name": "mozilla", - "email": "dherman@mozilla.com" - }, - { - "name": "nickfitzgerald", - "email": "fitzgen@gmail.com" - } - ], - "dist": { - "shasum": "eba4f5da9c0dc999de68032d8b4f76173652036b", - "tarball": "http://registry.npmjs.org/source-map/-/source-map-0.4.4.tgz" - }, - "_resolved": "https://registry.npmjs.org/source-map/-/source-map-0.4.4.tgz", - "readme": "ERROR: No README data found!" -} diff --git a/node_modules/browserify/node_modules/browser-pack/node_modules/combine-source-map/package.json b/node_modules/browserify/node_modules/browser-pack/node_modules/combine-source-map/package.json deleted file mode 100644 index 24e07b96..00000000 --- a/node_modules/browserify/node_modules/browser-pack/node_modules/combine-source-map/package.json +++ /dev/null @@ -1,68 +0,0 @@ -{ - "name": "combine-source-map", - "version": "0.6.1", - "description": "Add source maps of multiple files, offset them and then combine them into one source map", - "main": "index.js", - "scripts": { - "test": "tap test/*.js" - }, - "repository": { - "type": "git", - "url": "git://github.com/thlorenz/combine-source-map.git" - }, - "homepage": "https://github.com/thlorenz/combine-source-map", - "dependencies": { - "convert-source-map": "~1.1.0", - "inline-source-map": "~0.5.0", - "lodash.memoize": "~3.0.3", - "source-map": "~0.4.2" - }, - "devDependencies": { - "tap": "~0.4.3" - }, - "keywords": [ - "source", - "map", - "sourcemap", - "bundle", - "combine", - "cat", - "sourceMappingUrl", - "browserify" - ], - "author": { - "name": "Thorsten Lorenz", - "email": "thlorenz@gmx.de", - "url": "http://thlorenz.com" - }, - "license": "MIT", - "engine": { - "node": ">=0.6" - }, - "gitHead": "8f2c6f23df9689d0b27af328bdc575bb44375829", - "bugs": { - "url": "https://github.com/thlorenz/combine-source-map/issues" - }, - "_id": "combine-source-map@0.6.1", - "_shasum": "9b4a09c316033d768e0f11e029fa2730e079ad96", - "_from": "combine-source-map@>=0.6.1 <0.7.0", - "_npmVersion": "2.8.3", - "_nodeVersion": "1.8.1", - "_npmUser": { - "name": "thlorenz", - "email": "thlorenz@gmx.de" - }, - "maintainers": [ - { - "name": "thlorenz", - "email": "thlorenz@gmx.de" - } - ], - "dist": { - "shasum": "9b4a09c316033d768e0f11e029fa2730e079ad96", - "tarball": "https://registry.npmjs.org/combine-source-map/-/combine-source-map-0.6.1.tgz" - }, - "directories": {}, - "_resolved": "https://registry.npmjs.org/combine-source-map/-/combine-source-map-0.6.1.tgz", - "readme": "ERROR: No README data found!" -} diff --git a/node_modules/browserify/node_modules/browser-pack/node_modules/combine-source-map/test/combine-source-map.js b/node_modules/browserify/node_modules/browser-pack/node_modules/combine-source-map/test/combine-source-map.js deleted file mode 100644 index 77c5bcad..00000000 --- a/node_modules/browserify/node_modules/browser-pack/node_modules/combine-source-map/test/combine-source-map.js +++ /dev/null @@ -1,347 +0,0 @@ -'use strict'; -/*jshint asi: true */ - -var test = require('tap').test; -var convert = require('convert-source-map'); -var commentRegex = require('convert-source-map').commentRegex; -var combine = require('..'); -var mappingsFromMap = require('../lib/mappings-from-map'); - -function checkMappings(foo, sm, lineOffset) { - function inspect(obj, depth) { - return require('util').inspect(obj, false, depth || 5, true); - } - - var fooMappings = mappingsFromMap(foo); - var mappings = mappingsFromMap(sm); - - var genLinesOffset = true; - var origLinesSame = true; - for (var i = 0; i < mappings.length; i++) { - var fooGen = fooMappings[i].generated; - var fooOrig = fooMappings[i].original; - var gen = mappings[i].generated - var orig = mappings[i].original; - - if (gen.column !== fooGen.column || gen.line !== (fooGen.line + lineOffset)) { - console.error( - 'generated mapping at %s not offset properly:\ninput: [%s]\noutput:[%s]\n\n', - i , - inspect(fooGen), - inspect(gen) - ); - genLinesOffset = false; - } - - if (orig.column !== fooOrig.column || orig.line !== fooOrig.line) { - console.error( - 'original mapping at %s is not the same as the genrated mapping:\ninput: [%s]\noutput:[%s]\n\n', - i , - inspect(fooOrig), - inspect(orig) - ); - origLinesSame = false; - } - } - return { genLinesOffset: genLinesOffset, origLinesSame: origLinesSame }; -} - -var foo = { - version : 3, - file : 'foo.js', - sourceRoot : '', - sources : [ 'foo.coffee' ], - names : [], - mappings : ';AAAA;CAAA;CAAA,CAAA,CAAA,IAAO,GAAK;CAAZ', - sourcesContent : [ 'console.log(require \'./bar.js\')\n' ] }; - -test('add one file with inlined source', function (t) { - - var mapComment = convert.fromObject(foo).toComment(); - var file = { - id: 'xyz' - , source: '(function() {\n\n console.log(require(\'./bar.js\'));\n\n}).call(this);\n' + '\n' + mapComment - , sourceFile: 'foo.js' - }; - - var lineOffset = 3 - var base64 = combine.create() - .addFile(file, { line: lineOffset }) - .base64() - - var sm = convert.fromBase64(base64).toObject(); - var res = checkMappings(foo, sm, lineOffset); - - t.ok(res.genLinesOffset, 'all generated lines are offset properly and columns unchanged') - t.ok(res.origLinesSame, 'all original lines and columns are unchanged') - t.deepEqual(sm.sourcesContent, foo.sourcesContent, 'includes the original source') - t.deepEqual(sm.sources, ['foo.coffee'], 'includes original filename') - t.end() -}); - - -test('add one file without inlined source', function (t) { - - var mapComment = convert - .fromObject(foo) - .setProperty('sourcesContent', []) - .toComment(); - - var file = { - id: 'xyz' - , source: '(function() {\n\n console.log(require(\'./bar.js\'));\n\n}).call(this);\n' + '\n' + mapComment - , sourceFile: 'foo.js' - }; - - var lineOffset = 3 - var base64 = combine.create() - .addFile(file, { line: lineOffset }) - .base64() - - var sm = convert.fromBase64(base64).toObject(); - var mappings = mappingsFromMap(sm); - - t.deepEqual(sm.sourcesContent, [file.source], 'includes the generated source') - t.deepEqual(sm.sources, ['foo.js'], 'includes generated filename') - - t.deepEqual( - mappings - , [ { generated: { line: 4, column: 0 }, - original: { line: 1, column: 0 }, - source: 'foo.js', name: undefined }, - { generated: { line: 5, column: 0 }, - original: { line: 2, column: 0 }, - source: 'foo.js', name: undefined }, - { generated: { line: 6, column: 0 }, - original: { line: 3, column: 0 }, - source: 'foo.js', name: undefined }, - { generated: { line: 7, column: 0 }, - original: { line: 4, column: 0 }, - source: 'foo.js', name: undefined }, - { generated: { line: 8, column: 0 }, - original: { line: 5, column: 0 }, - source: 'foo.js', name: undefined }, - { generated: { line: 9, column: 0 }, - original: { line: 6, column: 0 }, - source: 'foo.js', name: undefined }, - { generated: { line: 10, column: 0 }, - original: { line: 7, column: 0 }, - source: 'foo.js', name: undefined } ] - , 'generates mappings offset by the given line' - ) - t.end() -}) - -test('add one file with inlined sources from multiple files', function(t) { - var gen1Map = { - version: 3, - sources: [ 'one.js', 'two.js' ], - names: [], - mappings: 'AAAA;ACAA', - sourcesContent: [ 'console.log(1);', 'console.log(2);' ] - }; - - var gen2Map = { - version: 3, - sources: [ 'three.js', 'four.js' ], - names: [], - mappings: 'AAAA;ACAA', - sourcesContent: [ 'console.log(3);', 'console.log(4);' ] - }; - - var base64 = combine.create() - .addFile({ - source: 'console.log(1);\nconsole.log(2);\n' + convert.fromObject(gen1Map).toComment(), - sourceFile: 'gen1.js' - }) - .addFile({ - source: 'console.log(3);\nconsole.log(4);\n' + convert.fromObject(gen2Map).toComment(), - sourceFile: 'gen2.js' - }, {line: 2}) - .base64() - - var sm = convert.fromBase64(base64).toObject(); - - - t.deepEqual(sm.sources, ['one.js', 'two.js', 'three.js', 'four.js'], 'include the correct source'); - - t.deepEqual(sm.sourcesContent, [ - 'console.log(1);', - 'console.log(2);', - 'console.log(3);', - 'console.log(4);' - ], 'include the correct source file content'); - - t.deepEqual( - mappingsFromMap(sm) - , [ { original: { column: 0, line: 1 }, - generated: { column: 0, line: 1 }, - source: 'one.js', - name: undefined }, - { original: { column: 0, line: 1 }, - generated: { column: 0, line: 2 }, - source: 'two.js', - name: undefined }, - { original: { column: 0, line: 1 }, - generated: { column: 0, line: 3 }, - source: 'three.js', - name: undefined }, - { original: { column: 0, line: 1 }, - generated: { column: 0, line: 4 }, - source: 'four.js', - name: undefined } ], 'should properly map multiple files'); - t.end() -}); - -test('relative path from multiple files', function(t) { - // Folder structure as follows: - // - // project - // +- src - // +- package1 - // +- sub - // -- one.js - // -- two.js - // +- package2 - // +- sub - // -- three.js - // -- four.js - // +- gen - // +- gen1.js - // +- gen2.js - // -- combined.js - // - // Where 'one.js', 'two.js' were combined to 'gen1.js' - // and 'three.js', 'four.js' were combined to 'gen2.js'. - // Now 'gen1.js' and 'gen2.js' are being combined from - // the project root folder. - var gen1Map = { - version: 3, - sources: [ 'sub/one.js', 'sub/two.js' ], - names: [], - mappings: 'AAAA;ACAA', - sourcesContent: [ 'console.log(1);', 'console.log(2);' ], - sourceRoot: '../src/package1' - }; - - var gen2Map = { - version: 3, - sources: [ 'sub/three.js', 'sub/four.js' ], - names: [], - mappings: 'AAAA;ACAA', - sourcesContent: [ 'console.log(3);', 'console.log(4);' ], - sourceRoot: '../src/package2' - }; - - var base64 = combine.create() - .addFile({ - source: 'console.log(1);\nconsole.log(2);\n' + convert.fromObject(gen1Map).toComment(), - sourceFile: 'gen/gen1.js' - }) - .addFile({ - source: 'console.log(3);\nconsole.log(4);\n' + convert.fromObject(gen2Map).toComment(), - sourceFile: 'gen/gen2.js' - }, {line: 2}) - .base64() - - var sm = convert.fromBase64(base64).toObject(); - - t.deepEqual(sm.sources, ['src/package1/sub/one.js', 'src/package1/sub/two.js', - 'src/package2/sub/three.js', 'src/package2/sub/four.js'], - 'include the correct source'); - - t.deepEqual(sm.sourcesContent, [ - 'console.log(1);', - 'console.log(2);', - 'console.log(3);', - 'console.log(4);' - ], 'include the correct source file content'); - - t.deepEqual( - mappingsFromMap(sm) - , [ { original: { column: 0, line: 1 }, - generated: { column: 0, line: 1 }, - source: 'src/package1/sub/one.js', - name: undefined }, - { original: { column: 0, line: 1 }, - generated: { column: 0, line: 2 }, - source: 'src/package1/sub/two.js', - name: undefined }, - { original: { column: 0, line: 1 }, - generated: { column: 0, line: 3 }, - source: 'src/package2/sub/three.js', - name: undefined }, - { original: { column: 0, line: 1 }, - generated: { column: 0, line: 4 }, - source: 'src/package2/sub/four.js', - name: undefined } ], 'should properly map multiple files'); - t.end() -}); - -test('relative path when source and file name are the same', function(t) { - var gen1Map = { - version: 3, - sources: [ 'a/b/one.js' ], - names: [], - mappings: 'AAAA', - file: 'a/b/one.js', - sourcesContent: [ 'console.log(1);\n' ] - }; - - var gen2Map = { - version: 3, - sources: [ 'a/b/two.js' ], - names: [], - mappings: 'AAAA', - file: 'a/b/two.js', - sourcesContent: [ 'console.log(2);\n' ] - }; - - var base64 = combine.create() - .addFile({ - source: 'console.log(1);\n' + convert.fromObject(gen1Map).toComment(), - sourceFile: 'a/b/one.js' - }) - .addFile({ - source: 'console.log(2);\n' + convert.fromObject(gen2Map).toComment(), - sourceFile: 'a/b/two.js' - }, {line: 1}) - .base64() - - var sm = convert.fromBase64(base64).toObject(); - - t.deepEqual(sm.sources, ['a/b/one.js', 'a/b/two.js'], - 'include the correct source'); - - t.deepEqual( - mappingsFromMap(sm) - , [ { original: { column: 0, line: 1 }, - generated: { column: 0, line: 1 }, - source: 'a/b/one.js', - name: undefined }, - { original: { column: 0, line: 1 }, - generated: { column: 0, line: 2 }, - source: 'a/b/two.js', - name: undefined } ], 'should properly map multiple files'); - t.end() -}); - -test('remove comments', function (t) { - var mapComment = convert.fromObject(foo).toComment(); - - function sourcemapComments(src) { - var matches = src.match(commentRegex); - return matches ? matches.length : 0; - } - - t.equal(sourcemapComments('var a = 1;\n' + mapComment), 1); - - [ '' - , 'var a = 1;\n' + mapComment - , 'var a = 1;\n' + mapComment + '\nvar b = 5;\n' + mapComment - ] .forEach(function (x) { - var removed = combine.removeComments(x) - t.equal(sourcemapComments(removed), 0) - }) - t.end() -}) diff --git a/node_modules/browserify/node_modules/browser-pack/node_modules/umd/README.md b/node_modules/browserify/node_modules/browser-pack/node_modules/umd/README.md deleted file mode 100644 index 3b9b8f76..00000000 --- a/node_modules/browserify/node_modules/browser-pack/node_modules/umd/README.md +++ /dev/null @@ -1,82 +0,0 @@ -# umd - - -Universal Module Definition for use in automated build systems - - - simple synchronous wrapping of a string - - `return` style module support - - CommonJS support - - prevents internal UMDs from conflicting - -[![Build Status](https://img.shields.io/travis/ForbesLindesay/umd/master.svg)](https://travis-ci.org/ForbesLindesay/umd) -[![Dependency Status](https://img.shields.io/gemnasium/ForbesLindesay/umd.svg)](https://gemnasium.com/ForbesLindesay/umd) -[![NPM version](https://img.shields.io/npm/v/umd.svg)](http://badge.fury.io/js/umd) - -## Source Format - -In order for the UMD wrapper to work the source code for your module should `return` the export, e.g. - -```javascript -function method() { - //code -} -method.helper = function () { - //code -} -return method; -``` - -For examples, see the examples directory. The CommonJS module format is also supported by passing true as the second argument to methods. - -## API - -options: - - - `commonJS` (default: `false`) - If commonJS is `true` then it will accept CommonJS source instead of source code which `return`s the module. - -### umd(name, source, [options]) - - The `name` should the the name of the module. Use a string like name, all lower case with hyphens instead of spaces. - - If `source` should be a string, that is wrapped in umd and returned as a string. - -### umd.prelude(module, [options]) - - return the text which will be inserted before a module. - -### umd.postlude(module, [options]) - - return the text which will be inserted after a module. - -## Command Line - -``` -Usage: umd [options] - -Pipe Usage: umd [options] < source > destination - -Options: - - -h --help Display usage information - -c --commonJS Use CommonJS module format - ``` - - You can easilly pipe unix commands together like: - - ```js - cat my-module.js | umd my-module | uglify-js > my-module.umd.min.js - ``` - -## Name Casing and Characters - -The `name` passed to `umd` will be converted to camel case (`my-library` becomes `myLibrary`) and may only contain: - -* alphanumeric characters -* $ -* _ - -The name may not begin with a number. Invalid characters will be stripped. - -## License - - MIT diff --git a/node_modules/browserify/node_modules/browser-pack/node_modules/umd/bin/cli.js b/node_modules/browserify/node_modules/browser-pack/node_modules/umd/bin/cli.js deleted file mode 100755 index 3a2287a6..00000000 --- a/node_modules/browserify/node_modules/browser-pack/node_modules/umd/bin/cli.js +++ /dev/null @@ -1,43 +0,0 @@ -#!/usr/bin/env node - -var read = require('fs').createReadStream -var write = require('fs').createWriteStream - -var umd = require('../') - -var args = process.argv.slice(2) - -var help = false -var commonJS = false -args = args.filter(function (arg) { - if (arg === '-h' || arg === '--help') { - help = true - return false - } else if (arg === '-c' || arg === '--commonJS') { - commonJS = true - return false - } - return true -}) - -if (help || !args[0]) { - console.log('Usage: umd [options]') - console.log('') - console.log('Pipe Usage: umd [options] < source > destination') - console.log('') - console.log('Options:') - console.log('') - console.log(' -h --help Display usage information') - console.log(' -c --commonJS Use CommonJS module format') - console.log('') - if (!help) process.exit(1) -} else { - var source = args[1] ? read(args[1]) : process.stdin - var dest = args[2] ? write(args[2]) : process.stdout - var prelude = umd.prelude(args[0], {commonJS: commonJS}) - var postlude = umd.postlude(args[0], {commonJS: commonJS}) - dest.write(prelude) - source.on('end', function () { - dest.write(postlude + '\n') - }).pipe(dest, {end: false}) -} diff --git a/node_modules/browserify/node_modules/browser-pack/node_modules/umd/index.js b/node_modules/browserify/node_modules/browser-pack/node_modules/umd/index.js deleted file mode 100644 index 30e59c87..00000000 --- a/node_modules/browserify/node_modules/browser-pack/node_modules/umd/index.js +++ /dev/null @@ -1,78 +0,0 @@ -'use strict'; - - -var templateSTR = "(function(f){if(typeof exports===\"object\"&&typeof module!==\"undefined\"){module.exports=f()}else if(typeof define===\"function\"&&define.amd){define([],f)}else{var g;if(typeof window!==\"undefined\"){g=window}else if(typeof global!==\"undefined\"){g=global}else if(typeof self!==\"undefined\"){g=self}else{g=this}defineNamespace()}})(function(){source()});"; - -function template(moduleName, options) { - if (typeof options === 'boolean') { - options = {commonJS: options}; - } else if (!options) { - options = {}; - } - var str = templateSTR.replace(/defineNamespace\(\)/g, compileNamespace(moduleName)) - .split('source()') - str[0] = str[0].trim(); - //make sure these are undefined so as to not get confused if modules have inner UMD systems - str[0] += 'var define,module,exports;'; - if (options.commonJS) str[0] += 'module={exports:(exports={})};'; - str[0] += '\n'; - if (options.commonJS) str[1] = 'return module.exports;' + str[1]; - str[1] = '\n' + str[1]; - return str; -} - -exports = module.exports = function (name, src, options) { - if (typeof options === 'string' && typeof src === 'object') { - var tmp = options; - options = src; - src = tmp; - } - return exports.prelude(name, options) + src + exports.postlude(name, options); -}; - -exports.prelude = function (moduleName, options) { - return template(moduleName, options)[0]; -}; -exports.postlude = function (moduleName, options) { - return template(moduleName, options)[1]; -}; - - -function camelCase(name) { - name = name.replace(/\-([a-z])/g, function (_, char) { return char.toUpperCase(); }); - if (!/^[a-zA-Z_$]$/.test(name[0])) { - name = name.substr(1); - } - var result = name.replace(/[^\w$]+/g, '') - if (!result) { - throw new Error('Invalid JavaScript identifier resulted from camel-casing'); - } - return result -} - - -function compileNamespace(name) { - var names = name.split('.') - - // No namespaces, yield the best case 'global.NAME = VALUE' - if (names.length === 1) { - return 'g.' + camelCase(name) + ' = f()'; - - // Acceptable case, with reasonable compilation - } else if (names.length === 2) { - names = names.map(camelCase); - return '(g.' + names[0] + ' || (g.' + names[0] + ' = {})).' + names[1] + ' = f()'; - - // Worst case, too many namespaces to care about - } else { - var valueContainer = names.pop() - return names.map(compileNamespaceStep) - .concat(['g.' + camelCase(valueContainer) + ' = f()']) - .join(';'); - } -} - -function compileNamespaceStep(name) { - name = camelCase(name); - return 'g=(g.' + name + '||(g.' + name + ' = {}))'; -} diff --git a/node_modules/browserify/node_modules/browser-pack/node_modules/umd/package.json b/node_modules/browserify/node_modules/browser-pack/node_modules/umd/package.json deleted file mode 100644 index e716ef82..00000000 --- a/node_modules/browserify/node_modules/browser-pack/node_modules/umd/package.json +++ /dev/null @@ -1,70 +0,0 @@ -{ - "name": "umd", - "version": "3.0.1", - "description": "Universal Module Definition for use in automated build systems", - "bin": { - "umd": "./bin/cli.js" - }, - "dependencies": {}, - "devDependencies": { - "brfs": "^1.3.0", - "linify": "~1.0.1", - "mocha": "*", - "uglify-js": "~2.4.0" - }, - "scripts": { - "build": "uglifyjs template.js > template.min.js && brfs source.js > index.js", - "test": "npm run build && mocha -R spec", - "prepublish": "npm run build && linify transform bin" - }, - "files": [ - "index.js", - "bin/cli.js" - ], - "repository": { - "type": "git", - "url": "https://github.com/ForbesLindesay/umd.git" - }, - "author": { - "name": "ForbesLindesay" - }, - "license": "MIT", - "gitHead": "8fc39397901723d695136ee1fdceefb8e0392f5f", - "bugs": { - "url": "https://github.com/ForbesLindesay/umd/issues" - }, - "homepage": "https://github.com/ForbesLindesay/umd", - "_id": "umd@3.0.1", - "_shasum": "8ae556e11011f63c2596708a8837259f01b3d60e", - "_from": "umd@>=3.0.0 <4.0.0", - "_npmVersion": "1.4.28", - "_npmUser": { - "name": "zertosh", - "email": "zertosh@gmail.com" - }, - "maintainers": [ - { - "name": "forbeslindesay", - "email": "forbes@lindesay.co.uk" - }, - { - "name": "zertosh", - "email": "zertosh@gmail.com" - }, - { - "name": "jazz", - "email": "jazzzz@gmail.com" - }, - { - "name": "ralphtheninja", - "email": "ralphtheninja@riseup.net" - } - ], - "dist": { - "shasum": "8ae556e11011f63c2596708a8837259f01b3d60e", - "tarball": "https://registry.npmjs.org/umd/-/umd-3.0.1.tgz" - }, - "directories": {}, - "_resolved": "https://registry.npmjs.org/umd/-/umd-3.0.1.tgz", - "readme": "ERROR: No README data found!" -} diff --git a/node_modules/browserify/node_modules/browser-pack/package.json b/node_modules/browserify/node_modules/browser-pack/package.json deleted file mode 100644 index 852c5ae3..00000000 --- a/node_modules/browserify/node_modules/browser-pack/package.json +++ /dev/null @@ -1,95 +0,0 @@ -{ - "name": "browser-pack", - "version": "5.0.1", - "description": "pack node-style source files from a json stream into a browser bundle", - "main": "index.js", - "bin": { - "browser-pack": "bin/cmd.js" - }, - "dependencies": { - "JSONStream": "^1.0.3", - "combine-source-map": "~0.6.1", - "defined": "^1.0.0", - "through2": "^1.0.0", - "umd": "^3.0.0" - }, - "devDependencies": { - "tap": "^1.1.0", - "uglify-js": "1.3.5", - "concat-stream": "~1.4.1", - "convert-source-map": "~1.1.0", - "parse-base64vlq-mappings": "~0.1.1" - }, - "scripts": { - "test": "tap test/*.js", - "prepublish": "node bin/prepublish.js" - }, - "testling": { - "files": "test/*.js", - "browsers": [ - "ie/8", - "ie/9", - "ie/10", - "chrome/15", - "chrome/latest", - "firefox/10", - "firefox/latest", - "safari/latest", - "opera/latest" - ] - }, - "repository": { - "type": "git", - "url": "git://github.com/substack/browser-pack.git" - }, - "homepage": "https://github.com/substack/browser-pack", - "keywords": [ - "browser", - "bundle", - "commonjs", - "commonj-esque", - "exports", - "module.exports", - "require" - ], - "author": { - "name": "James Halliday", - "email": "mail@substack.net", - "url": "http://substack.net" - }, - "license": "MIT", - "gitHead": "aadeabea66feac48193d27d233daf1c85209357e", - "bugs": { - "url": "https://github.com/substack/browser-pack/issues" - }, - "_id": "browser-pack@5.0.1", - "_shasum": "4197719b20c6e0aaa09451c5111e53efb6fbc18d", - "_from": "browser-pack@>=5.0.0 <6.0.0", - "_npmVersion": "2.10.1", - "_nodeVersion": "0.10.38", - "_npmUser": { - "name": "zertosh", - "email": "zertosh@gmail.com" - }, - "maintainers": [ - { - "name": "substack", - "email": "substack@gmail.com" - }, - { - "name": "forbeslindesay", - "email": "forbes@lindesay.co.uk" - }, - { - "name": "zertosh", - "email": "zertosh@gmail.com" - } - ], - "dist": { - "shasum": "4197719b20c6e0aaa09451c5111e53efb6fbc18d", - "tarball": "https://registry.npmjs.org/browser-pack/-/browser-pack-5.0.1.tgz" - }, - "directories": {}, - "_resolved": "https://registry.npmjs.org/browser-pack/-/browser-pack-5.0.1.tgz", - "readme": "ERROR: No README data found!" -} diff --git a/node_modules/browserify/node_modules/browser-pack/prelude.js b/node_modules/browserify/node_modules/browser-pack/prelude.js deleted file mode 100644 index d291c694..00000000 --- a/node_modules/browserify/node_modules/browser-pack/prelude.js +++ /dev/null @@ -1,44 +0,0 @@ - -// modules are defined as an array -// [ module function, map of requireuires ] -// -// map of requireuires is short require name -> numeric require -// -// anything defined in a previous bundle is accessed via the -// orig method which is the requireuire for previous bundles - -(function outer (modules, cache, entry) { - // Save the require from previous bundle to this closure if any - var previousRequire = typeof require == "function" && require; - - function newRequire(name, jumped){ - if(!cache[name]) { - if(!modules[name]) { - // if we cannot find the module within our internal map or - // cache jump to the current global require ie. the last bundle - // that was added to the page. - var currentRequire = typeof require == "function" && require; - if (!jumped && currentRequire) return currentRequire(name, true); - - // If there are other bundles on this page the require from the - // previous one is saved to 'previousRequire'. Repeat this as - // many times as there are bundles until the module is found or - // we exhaust the require chain. - if (previousRequire) return previousRequire(name, true); - var err = new Error('Cannot find module \'' + name + '\''); - err.code = 'MODULE_NOT_FOUND'; - throw err; - } - var m = cache[name] = {exports:{}}; - modules[name][0].call(m.exports, function(x){ - var id = modules[name][1][x]; - return newRequire(id ? id : x); - },m,m.exports,outer,modules,cache,entry); - } - return cache[name].exports; - } - for(var i=0;i - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/node_modules/browserify/node_modules/browser-resolve/empty.js b/node_modules/browserify/node_modules/browser-resolve/empty.js deleted file mode 100644 index e69de29b..00000000 diff --git a/node_modules/browserify/node_modules/browser-resolve/index.js b/node_modules/browserify/node_modules/browser-resolve/index.js deleted file mode 100644 index 97d89357..00000000 --- a/node_modules/browserify/node_modules/browser-resolve/index.js +++ /dev/null @@ -1,343 +0,0 @@ -// builtin -var fs = require('fs'); -var path = require('path'); - -// vendor -var resv = require('resolve'); - -// given a path, create an array of node_module paths for it -// borrowed from substack/resolve -function nodeModulesPaths (start, cb) { - var splitRe = process.platform === 'win32' ? /[\/\\]/ : /\/+/; - var parts = start.split(splitRe); - - var dirs = []; - for (var i = parts.length - 1; i >= 0; i--) { - if (parts[i] === 'node_modules') continue; - var dir = path.join.apply( - path, parts.slice(0, i + 1).concat(['node_modules']) - ); - if (!parts[0].match(/([A-Za-z]:)/)) { - dir = '/' + dir; - } - dirs.push(dir); - } - return dirs; -} - -function find_shims_in_package(pkgJson, cur_path, shims, browser) { - try { - var info = JSON.parse(pkgJson); - } - catch (err) { - err.message = pkgJson + ' : ' + err.message - throw err; - } - - var replacements = getReplacements(info, browser); - - // no replacements, skip shims - if (!replacements) { - return; - } - - // if browser mapping is a string - // then it just replaces the main entry point - if (typeof replacements === 'string') { - var key = path.resolve(cur_path, info.main || 'index.js'); - shims[key] = path.resolve(cur_path, replacements); - return; - } - - // http://nodejs.org/api/modules.html#modules_loading_from_node_modules_folders - Object.keys(replacements).forEach(function(key) { - var val; - if (replacements[key] === false) { - val = __dirname + '/empty.js'; - } - else { - val = replacements[key]; - // if target is a relative path, then resolve - // otherwise we assume target is a module - if (val[0] === '.') { - val = path.resolve(cur_path, val); - } - } - - if (key[0] === '/' || key[0] === '.') { - // if begins with / ../ or ./ then we must resolve to a full path - key = path.resolve(cur_path, key); - } - shims[key] = val; - }); - - [ '.js', '.json' ].forEach(function (ext) { - Object.keys(shims).forEach(function (key) { - if (!shims[key + ext]) { - shims[key + ext] = shims[key]; - } - }); - }); -} - -// paths is mutated -// load shims from first package.json file found -function load_shims(paths, browser, cb) { - // identify if our file should be replaced per the browser field - // original filename|id -> replacement - var shims = Object.create(null); - - (function next() { - var cur_path = paths.shift(); - if (!cur_path) { - return cb(null, shims); - } - - var pkg_path = path.join(cur_path, 'package.json'); - - fs.readFile(pkg_path, 'utf8', function(err, data) { - if (err) { - // ignore paths we can't open - // avoids an exists check - if (err.code === 'ENOENT') { - return next(); - } - - return cb(err); - } - try { - find_shims_in_package(data, cur_path, shims, browser); - return cb(null, shims); - } - catch (err) { - return cb(err); - } - }); - })(); -}; - -// paths is mutated -// synchronously load shims from first package.json file found -function load_shims_sync(paths, browser) { - // identify if our file should be replaced per the browser field - // original filename|id -> replacement - var shims = Object.create(null); - var cur_path; - - while (cur_path = paths.shift()) { - var pkg_path = path.join(cur_path, 'package.json'); - - try { - var data = fs.readFileSync(pkg_path, 'utf8'); - find_shims_in_package(data, cur_path, shims, browser); - return shims; - } - catch (err) { - // ignore paths we can't open - // avoids an exists check - if (err.code === 'ENOENT') { - continue; - } - - throw err; - } - } - return shims; -} - -function build_resolve_opts(opts, base) { - var packageFilter = opts.packageFilter; - var browser = normalizeBrowserFieldName(opts.browser) - - opts.basedir = base; - opts.packageFilter = function (info, pkgdir) { - if (packageFilter) info = packageFilter(info, pkgdir); - - var replacements = getReplacements(info, browser); - - // no browser field, keep info unchanged - if (!replacements) { - return info; - } - - info[browser] = replacements; - - // replace main - if (typeof replacements === 'string') { - info.main = replacements; - return info; - } - - var replace_main = replacements[info.main || './index.js'] || - replacements['./' + info.main || './index.js']; - - info.main = replace_main || info.main; - return info; - }; - - var pathFilter = opts.pathFilter; - opts.pathFilter = function(info, resvPath, relativePath) { - if (relativePath[0] != '.') { - relativePath = './' + relativePath; - } - var mappedPath; - if (pathFilter) { - mappedPath = pathFilter.apply(this, arguments); - } - if (mappedPath) { - return mappedPath; - } - - var replacements = info[browser]; - if (!replacements) { - return; - } - - mappedPath = replacements[relativePath]; - if (!mappedPath && path.extname(relativePath) === '') { - mappedPath = replacements[relativePath + '.js']; - if (!mappedPath) { - mappedPath = replacements[relativePath + '.json']; - } - } - return mappedPath; - }; - - return opts; -} - -function resolve(id, opts, cb) { - - // opts.filename - // opts.paths - // opts.modules - // opts.packageFilter - - opts = opts || {}; - opts.filename = opts.filename || ''; - - var base = path.dirname(opts.filename); - - if (opts.basedir) { - base = opts.basedir; - } - - var paths = nodeModulesPaths(base); - - if (opts.paths) { - paths.push.apply(paths, opts.paths); - } - - paths = paths.map(function(p) { - return path.dirname(p); - }); - - // we must always load shims because the browser field could shim out a module - load_shims(paths, opts.browser, function(err, shims) { - if (err) { - return cb(err); - } - - var resid = path.resolve(opts.basedir || path.dirname(opts.filename), id); - if (shims[id] || shims[resid]) { - var xid = shims[id] ? id : resid; - // if the shim was is an absolute path, it was fully resolved - if (shims[xid][0] === '/') { - return resv(shims[xid], build_resolve_opts(opts, base), function(err, full, pkg) { - cb(null, full, pkg); - }); - } - - // module -> alt-module shims - id = shims[xid]; - } - - var modules = opts.modules || Object.create(null); - var shim_path = modules[id]; - if (shim_path) { - return cb(null, shim_path); - } - - // our browser field resolver - // if browser field is an object tho? - var full = resv(id, build_resolve_opts(opts, base), function(err, full, pkg) { - if (err) { - return cb(err); - } - - var resolved = (shims) ? shims[full] || full : full; - cb(null, resolved, pkg); - }); - }); -}; - -resolve.sync = function (id, opts) { - - // opts.filename - // opts.paths - // opts.modules - // opts.packageFilter - - opts = opts || {}; - opts.filename = opts.filename || ''; - - var base = path.dirname(opts.filename); - - if (opts.basedir) { - base = opts.basedir; - } - - var paths = nodeModulesPaths(base); - - if (opts.paths) { - paths.push.apply(paths, opts.paths); - } - - paths = paths.map(function(p) { - return path.dirname(p); - }); - - // we must always load shims because the browser field could shim out a module - var shims = load_shims_sync(paths, opts.browser); - - if (shims[id]) { - // if the shim was is an absolute path, it was fully resolved - if (shims[id][0] === '/') { - return shims[id]; - } - - // module -> alt-module shims - id = shims[id]; - } - - var modules = opts.modules || Object.create(null); - var shim_path = modules[id]; - if (shim_path) { - return shim_path; - } - - // our browser field resolver - // if browser field is an object tho? - var full = resv.sync(id, build_resolve_opts(opts, base)); - - return (shims) ? shims[full] || full : full; -}; - -function normalizeBrowserFieldName(browser) { - return browser || 'browser'; -} - -function getReplacements(info, browser) { - browser = normalizeBrowserFieldName(browser); - var replacements = info[browser] || info.browser; - - // support legacy browserify field for easier migration from legacy - // many packages used this field historically - if (typeof info.browserify === 'string' && !replacements) { - replacements = info.browserify; - } - - return replacements; -} - -module.exports = resolve; diff --git a/node_modules/browserify/node_modules/browser-resolve/node_modules/resolve/.travis.yml b/node_modules/browserify/node_modules/browser-resolve/node_modules/resolve/.travis.yml deleted file mode 100644 index 895dbd36..00000000 --- a/node_modules/browserify/node_modules/browser-resolve/node_modules/resolve/.travis.yml +++ /dev/null @@ -1,4 +0,0 @@ -language: node_js -node_js: - - 0.6 - - 0.8 diff --git a/node_modules/browserify/node_modules/browser-resolve/node_modules/resolve/LICENSE b/node_modules/browserify/node_modules/browser-resolve/node_modules/resolve/LICENSE deleted file mode 100644 index ee27ba4b..00000000 --- a/node_modules/browserify/node_modules/browser-resolve/node_modules/resolve/LICENSE +++ /dev/null @@ -1,18 +0,0 @@ -This software is released under the MIT license: - -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/node_modules/browserify/node_modules/browser-resolve/node_modules/resolve/example/async.js b/node_modules/browserify/node_modules/browser-resolve/node_modules/resolve/example/async.js deleted file mode 100644 index 6624ff72..00000000 --- a/node_modules/browserify/node_modules/browser-resolve/node_modules/resolve/example/async.js +++ /dev/null @@ -1,5 +0,0 @@ -var resolve = require('../'); -resolve('tap', { basedir: __dirname }, function (err, res) { - if (err) console.error(err) - else console.log(res) -}); diff --git a/node_modules/browserify/node_modules/browser-resolve/node_modules/resolve/example/sync.js b/node_modules/browserify/node_modules/browser-resolve/node_modules/resolve/example/sync.js deleted file mode 100644 index 54b2cc10..00000000 --- a/node_modules/browserify/node_modules/browser-resolve/node_modules/resolve/example/sync.js +++ /dev/null @@ -1,3 +0,0 @@ -var resolve = require('../'); -var res = resolve.sync('tap', { basedir: __dirname }); -console.log(res); diff --git a/node_modules/browserify/node_modules/browser-resolve/node_modules/resolve/index.js b/node_modules/browserify/node_modules/browser-resolve/node_modules/resolve/index.js deleted file mode 100644 index 51f194b4..00000000 --- a/node_modules/browserify/node_modules/browser-resolve/node_modules/resolve/index.js +++ /dev/null @@ -1,5 +0,0 @@ -var core = require('./lib/core'); -exports = module.exports = require('./lib/async'); -exports.core = core; -exports.isCore = function (x) { return core[x] }; -exports.sync = require('./lib/sync'); diff --git a/node_modules/browserify/node_modules/browser-resolve/node_modules/resolve/lib/async.js b/node_modules/browserify/node_modules/browser-resolve/node_modules/resolve/lib/async.js deleted file mode 100644 index 0f0eeca5..00000000 --- a/node_modules/browserify/node_modules/browser-resolve/node_modules/resolve/lib/async.js +++ /dev/null @@ -1,192 +0,0 @@ -var core = require('./core'); -var fs = require('fs'); -var path = require('path'); -var caller = require('./caller.js'); -var nodeModulesPaths = require('./node-modules-paths.js'); -var splitRe = process.platform === 'win32' ? /[\/\\]/ : /\//; - -module.exports = function resolve (x, opts, cb) { - if (typeof opts === 'function') { - cb = opts; - opts = {}; - } - if (!opts) opts = {}; - if (typeof x !== 'string') { - return process.nextTick(function () { - cb(new Error('path must be a string')); - }); - } - - var isFile = opts.isFile || function (file, cb) { - fs.stat(file, function (err, stat) { - if (err && err.code === 'ENOENT') cb(null, false) - else if (err) cb(err) - else cb(null, stat.isFile() || stat.isFIFO()) - }); - }; - var readFile = opts.readFile || fs.readFile; - - var extensions = opts.extensions || [ '.js' ]; - var y = opts.basedir || path.dirname(caller()); - - opts.paths = opts.paths || []; - - if (/^(?:\.\.?(?:\/|$)|\/|([A-Za-z]:)?[\\\/])/.test(x)) { - var res = path.resolve(y, x); - if (x === '..') res += '/'; - if (/\/$/.test(x) && res === y) { - loadAsDirectory(res, opts.package, onfile); - } - else loadAsFile(res, opts.package, onfile); - } - else loadNodeModules(x, y, function (err, n, pkg) { - if (err) cb(err) - else if (n) cb(null, n, pkg) - else if (core[x]) return cb(null, x); - else cb(new Error("Cannot find module '" + x + "' from '" + y + "'")) - }); - - function onfile (err, m, pkg) { - if (err) cb(err) - else if (m) cb(null, m, pkg) - else loadAsDirectory(res, function (err, d, pkg) { - if (err) cb(err) - else if (d) cb(null, d, pkg) - else cb(new Error("Cannot find module '" + x + "' from '" + y + "'")) - }) - } - - function loadAsFile (x, pkg, cb) { - if (typeof pkg === 'function') { - cb = pkg; - pkg = undefined; - } - - var exts = [''].concat(extensions); - load(exts, x, pkg) - - function load (exts, x, pkg) { - if (exts.length === 0) return cb(null, undefined, pkg); - var file = x + exts[0]; - - if (pkg) onpkg(null, pkg) - else loadpkg(path.dirname(file), onpkg); - - function onpkg (err, pkg_, dir) { - pkg = pkg_; - if (err) return cb(err) - if (dir && pkg && opts.pathFilter) { - var rfile = path.relative(dir, file); - var rel = rfile.slice(0, rfile.length - exts[0].length); - var r = opts.pathFilter(pkg, x, rel); - if (r) return load( - [''].concat(extensions.slice()), - path.resolve(dir, r), - pkg - ); - } - isFile(file, onex); - } - function onex (err, ex) { - if (err) cb(err) - else if (!ex) load(exts.slice(1), x, pkg) - else cb(null, file, pkg) - } - } - } - - function loadpkg (dir, cb) { - if (dir === '' || dir === '/') return cb(null); - if (process.platform === 'win32' && /^\w:[\\\/]*$/.test(dir)) { - return cb(null); - } - if (/[\\\/]node_modules[\\\/]*$/.test(dir)) return cb(null); - - var pkgfile = path.join(dir, 'package.json'); - isFile(pkgfile, function (err, ex) { - // on err, ex is false - if (!ex) return loadpkg( - path.dirname(dir), cb - ); - - readFile(pkgfile, function (err, body) { - if (err) cb(err); - try { var pkg = JSON.parse(body) } - catch (err) {} - - if (pkg && opts.packageFilter) { - pkg = opts.packageFilter(pkg, pkgfile); - } - cb(null, pkg, dir); - }); - }); - } - - function loadAsDirectory (x, fpkg, cb) { - if (typeof fpkg === 'function') { - cb = fpkg; - fpkg = opts.package; - } - - var pkgfile = path.join(x, '/package.json'); - isFile(pkgfile, function (err, ex) { - if (err) return cb(err); - if (!ex) return loadAsFile(path.join(x, '/index'), fpkg, cb); - - readFile(pkgfile, function (err, body) { - if (err) return cb(err); - try { - var pkg = JSON.parse(body); - } - catch (err) {} - - if (opts.packageFilter) { - pkg = opts.packageFilter(pkg, pkgfile); - } - - if (pkg.main) { - if (pkg.main === '.' || pkg.main === './'){ - pkg.main = 'index' - } - loadAsFile(path.resolve(x, pkg.main), pkg, function (err, m, pkg) { - if (err) return cb(err); - if (m) return cb(null, m, pkg); - if (!pkg) return loadAsFile(path.join(x, '/index'), pkg, cb); - - var dir = path.resolve(x, pkg.main); - loadAsDirectory(dir, pkg, function (err, n, pkg) { - if (err) return cb(err); - if (n) return cb(null, n, pkg); - loadAsFile(path.join(x, '/index'), pkg, cb); - }); - }); - return; - } - - loadAsFile(path.join(x, '/index'), pkg, cb); - }); - }); - } - - function loadNodeModules (x, start, cb) { - (function process (dirs) { - if (dirs.length === 0) return cb(null, undefined); - var dir = dirs[0]; - - var file = path.join(dir, '/', x); - loadAsFile(file, undefined, onfile); - - function onfile (err, m, pkg) { - if (err) return cb(err); - if (m) return cb(null, m, pkg); - loadAsDirectory(path.join(dir, '/', x), undefined, ondir); - } - - function ondir (err, n, pkg) { - if (err) return cb(err); - if (n) return cb(null, n, pkg); - process(dirs.slice(1)); - } - })(nodeModulesPaths(start, opts)); - } -}; diff --git a/node_modules/browserify/node_modules/browser-resolve/node_modules/resolve/lib/caller.js b/node_modules/browserify/node_modules/browser-resolve/node_modules/resolve/lib/caller.js deleted file mode 100644 index 5536549b..00000000 --- a/node_modules/browserify/node_modules/browser-resolve/node_modules/resolve/lib/caller.js +++ /dev/null @@ -1,8 +0,0 @@ -module.exports = function () { - // see https://code.google.com/p/v8/wiki/JavaScriptStackTraceApi - var origPrepareStackTrace = Error.prepareStackTrace; - Error.prepareStackTrace = function (_, stack) { return stack }; - var stack = (new Error()).stack; - Error.prepareStackTrace = origPrepareStackTrace; - return stack[2].getFileName(); -}; diff --git a/node_modules/browserify/node_modules/browser-resolve/node_modules/resolve/lib/core.js b/node_modules/browserify/node_modules/browser-resolve/node_modules/resolve/lib/core.js deleted file mode 100644 index ea4a6c87..00000000 --- a/node_modules/browserify/node_modules/browser-resolve/node_modules/resolve/lib/core.js +++ /dev/null @@ -1,4 +0,0 @@ -module.exports = require('./core.json').reduce(function (acc, x) { - acc[x] = true; - return acc; -}, {}); diff --git a/node_modules/browserify/node_modules/browser-resolve/node_modules/resolve/lib/core.json b/node_modules/browserify/node_modules/browser-resolve/node_modules/resolve/lib/core.json deleted file mode 100644 index 28560f7e..00000000 --- a/node_modules/browserify/node_modules/browser-resolve/node_modules/resolve/lib/core.json +++ /dev/null @@ -1,38 +0,0 @@ -[ - "assert", - "buffer_ieee754", - "buffer", - "child_process", - "cluster", - "console", - "constants", - "crypto", - "_debugger", - "dgram", - "dns", - "domain", - "events", - "freelist", - "fs", - "http", - "https", - "_linklist", - "module", - "net", - "os", - "path", - "punycode", - "querystring", - "readline", - "repl", - "stream", - "string_decoder", - "sys", - "timers", - "tls", - "tty", - "url", - "util", - "vm", - "zlib" -] diff --git a/node_modules/browserify/node_modules/browser-resolve/node_modules/resolve/lib/node-modules-paths.js b/node_modules/browserify/node_modules/browser-resolve/node_modules/resolve/lib/node-modules-paths.js deleted file mode 100644 index ce0a0d9f..00000000 --- a/node_modules/browserify/node_modules/browser-resolve/node_modules/resolve/lib/node-modules-paths.js +++ /dev/null @@ -1,38 +0,0 @@ -var path = require('path'); - -module.exports = function (start, opts) { - var modules = opts.moduleDirectory - ? [].concat(opts.moduleDirectory) - : ['node_modules'] - ; - - // ensure that `start` is an absolute path at this point, - // resolving against the process' current working directory - start = path.resolve(start); - - var prefix = '/'; - if (/^([A-Za-z]:)/.test(start)) { - prefix = ''; - } else if (/^\\\\/.test(start)) { - prefix = '\\\\'; - } - - var splitRe = process.platform === 'win32' ? /[\/\\]/ : /\/+/; - - var parts = start.split(splitRe); - - var dirs = []; - for (var i = parts.length - 1; i >= 0; i--) { - if (modules.indexOf(parts[i]) !== -1) continue; - dirs = dirs.concat(modules.map(function(module_dir) { - return prefix + path.join( - path.join.apply(path, parts.slice(0, i + 1)), - module_dir - ); - })); - } - if (process.platform === 'win32'){ - dirs[dirs.length-1] = dirs[dirs.length-1].replace(":", ":\\"); - } - return dirs.concat(opts.paths); -} diff --git a/node_modules/browserify/node_modules/browser-resolve/node_modules/resolve/lib/sync.js b/node_modules/browserify/node_modules/browser-resolve/node_modules/resolve/lib/sync.js deleted file mode 100644 index ef91eddb..00000000 --- a/node_modules/browserify/node_modules/browser-resolve/node_modules/resolve/lib/sync.js +++ /dev/null @@ -1,81 +0,0 @@ -var core = require('./core'); -var fs = require('fs'); -var path = require('path'); -var caller = require('./caller.js'); -var nodeModulesPaths = require('./node-modules-paths.js'); - -module.exports = function (x, opts) { - if (!opts) opts = {}; - var isFile = opts.isFile || function (file) { - try { var stat = fs.statSync(file) } - catch (err) { if (err && err.code === 'ENOENT') return false } - return stat.isFile() || stat.isFIFO(); - }; - var readFileSync = opts.readFileSync || fs.readFileSync; - - var extensions = opts.extensions || [ '.js' ]; - var y = opts.basedir || path.dirname(caller()); - - opts.paths = opts.paths || []; - - if (/^(?:\.\.?(?:\/|$)|\/|([A-Za-z]:)?[\\\/])/.test(x)) { - var res = path.resolve(y, x); - if (x === '..') res += '/'; - var m = loadAsFileSync(res) || loadAsDirectorySync(res); - if (m) return m; - } else { - var n = loadNodeModulesSync(x, y); - if (n) return n; - } - - if (core[x]) return x; - - throw new Error("Cannot find module '" + x + "' from '" + y + "'"); - - function loadAsFileSync (x) { - if (isFile(x)) { - return x; - } - - for (var i = 0; i < extensions.length; i++) { - var file = x + extensions[i]; - if (isFile(file)) { - return file; - } - } - } - - function loadAsDirectorySync (x) { - var pkgfile = path.join(x, '/package.json'); - if (isFile(pkgfile)) { - var body = readFileSync(pkgfile, 'utf8'); - try { - var pkg = JSON.parse(body); - if (opts.packageFilter) { - pkg = opts.packageFilter(pkg, x); - } - - if (pkg.main) { - var m = loadAsFileSync(path.resolve(x, pkg.main)); - if (m) return m; - var n = loadAsDirectorySync(path.resolve(x, pkg.main)); - if (n) return n; - } - } - catch (err) {} - } - - return loadAsFileSync(path.join( x, '/index')); - } - - function loadNodeModulesSync (x, start) { - var dirs = nodeModulesPaths(start, opts); - for (var i = 0; i < dirs.length; i++) { - var dir = dirs[i]; - var m = loadAsFileSync(path.join( dir, '/', x)); - if (m) return m; - var n = loadAsDirectorySync(path.join( dir, '/', x )); - if (n) return n; - } - } -}; diff --git a/node_modules/browserify/node_modules/browser-resolve/node_modules/resolve/package.json b/node_modules/browserify/node_modules/browser-resolve/node_modules/resolve/package.json deleted file mode 100644 index 32839efe..00000000 --- a/node_modules/browserify/node_modules/browser-resolve/node_modules/resolve/package.json +++ /dev/null @@ -1,56 +0,0 @@ -{ - "name": "resolve", - "description": "resolve like require.resolve() on behalf of files asynchronously and synchronously", - "version": "1.1.7", - "repository": { - "type": "git", - "url": "git://github.com/substack/node-resolve.git" - }, - "main": "index.js", - "keywords": [ - "resolve", - "require", - "node", - "module" - ], - "scripts": { - "test": "tape test/*.js" - }, - "devDependencies": { - "tape": "^3.5.0", - "tap": "0.4.13" - }, - "license": "MIT", - "author": { - "name": "James Halliday", - "email": "mail@substack.net", - "url": "http://substack.net" - }, - "gitHead": "bb37f0d4400e4d7835375be4bd3ad1264bac3689", - "bugs": { - "url": "https://github.com/substack/node-resolve/issues" - }, - "homepage": "https://github.com/substack/node-resolve#readme", - "_id": "resolve@1.1.7", - "_shasum": "203114d82ad2c5ed9e8e0411b3932875e889e97b", - "_from": "resolve@1.1.7", - "_npmVersion": "3.4.1", - "_nodeVersion": "4.2.1", - "_npmUser": { - "name": "substack", - "email": "substack@gmail.com" - }, - "dist": { - "shasum": "203114d82ad2c5ed9e8e0411b3932875e889e97b", - "tarball": "https://registry.npmjs.org/resolve/-/resolve-1.1.7.tgz" - }, - "maintainers": [ - { - "name": "substack", - "email": "mail@substack.net" - } - ], - "directories": {}, - "_resolved": "https://registry.npmjs.org/resolve/-/resolve-1.1.7.tgz", - "readme": "ERROR: No README data found!" -} diff --git a/node_modules/browserify/node_modules/browser-resolve/node_modules/resolve/readme.markdown b/node_modules/browserify/node_modules/browser-resolve/node_modules/resolve/readme.markdown deleted file mode 100644 index 4fab9b04..00000000 --- a/node_modules/browserify/node_modules/browser-resolve/node_modules/resolve/readme.markdown +++ /dev/null @@ -1,148 +0,0 @@ -# resolve - -implements the [node `require.resolve()` -algorithm](http://nodejs.org/docs/v0.4.8/api/all.html#all_Together...) -such that you can `require.resolve()` on behalf of a file asynchronously and -synchronously - -[![build status](https://secure.travis-ci.org/substack/node-resolve.png)](http://travis-ci.org/substack/node-resolve) - -# example - -asynchronously resolve: - -``` js -var resolve = require('resolve'); -resolve('tap', { basedir: __dirname }, function (err, res) { - if (err) console.error(err) - else console.log(res) -}); -``` - -``` -$ node example/async.js -/home/substack/projects/node-resolve/node_modules/tap/lib/main.js -``` - -synchronously resolve: - -``` js -var resolve = require('resolve'); -var res = resolve.sync('tap', { basedir: __dirname }); -console.log(res); -``` - -``` -$ node example/sync.js -/home/substack/projects/node-resolve/node_modules/tap/lib/main.js -``` - -# methods - -``` js -var resolve = require('resolve') -``` - -## resolve(id, opts={}, cb) - -Asynchronously resolve the module path string `id` into `cb(err, res [, pkg])`, where `pkg` (if defined) is the data from `package.json`. - -options are: - -* opts.basedir - directory to begin resolving from - -* opts.package - `package.json` data applicable to the module being loaded - -* opts.extensions - array of file extensions to search in order - -* opts.readFile - how to read files asynchronously - -* opts.isFile - function to asynchronously test whether a file exists - -* opts.packageFilter - transform the parsed package.json contents before looking -at the "main" field - -* opts.pathFilter(pkg, path, relativePath) - transform a path within a package - * pkg - package data - * path - the path being resolved - * relativePath - the path relative from the package.json location - * returns - a relative path that will be joined from the package.json location - -* opts.paths - require.paths array to use if nothing is found on the normal -node_modules recursive walk (probably don't use this) - -* opts.moduleDirectory - directory (or directories) in which to recursively look for modules. default: `"node_modules"` - -default `opts` values: - -``` javascript -{ - paths: [], - basedir: __dirname, - extensions: [ '.js' ], - readFile: fs.readFile, - isFile: function (file, cb) { - fs.stat(file, function (err, stat) { - if (err && err.code === 'ENOENT') cb(null, false) - else if (err) cb(err) - else cb(null, stat.isFile()) - }); - }, - moduleDirectory: 'node_modules' -} -``` - -## resolve.sync(id, opts) - -Synchronously resolve the module path string `id`, returning the result and -throwing an error when `id` can't be resolved. - -options are: - -* opts.basedir - directory to begin resolving from - -* opts.extensions - array of file extensions to search in order - -* opts.readFile - how to read files synchronously - -* opts.isFile - function to synchronously test whether a file exists - -* `opts.packageFilter(pkg, pkgfile)` - transform the parsed package.json -* contents before looking at the "main" field - -* opts.paths - require.paths array to use if nothing is found on the normal -node_modules recursive walk (probably don't use this) - -* opts.moduleDirectory - directory (or directories) in which to recursively look for modules. default: `"node_modules"` - -default `opts` values: - -``` javascript -{ - paths: [], - basedir: __dirname, - extensions: [ '.js' ], - readFileSync: fs.readFileSync, - isFile: function (file) { - try { return fs.statSync(file).isFile() } - catch (e) { return false } - }, - moduleDirectory: 'node_modules' -} -```` - -## resolve.isCore(pkg) - -Return whether a package is in core. - -# install - -With [npm](https://npmjs.org) do: - -``` -npm install resolve -``` - -# license - -MIT diff --git a/node_modules/browserify/node_modules/browser-resolve/node_modules/resolve/test/core.js b/node_modules/browserify/node_modules/browser-resolve/node_modules/resolve/test/core.js deleted file mode 100644 index 4a566820..00000000 --- a/node_modules/browserify/node_modules/browser-resolve/node_modules/resolve/test/core.js +++ /dev/null @@ -1,12 +0,0 @@ -var test = require('tape'); -var resolve = require('../'); - -test('core modules', function (t) { - t.ok(resolve.isCore('fs')); - t.ok(resolve.isCore('net')); - t.ok(resolve.isCore('http')); - - t.ok(!resolve.isCore('seq')); - t.ok(!resolve.isCore('../')); - t.end(); -}); diff --git a/node_modules/browserify/node_modules/browser-resolve/node_modules/resolve/test/dotdot.js b/node_modules/browserify/node_modules/browser-resolve/node_modules/resolve/test/dotdot.js deleted file mode 100644 index b8767727..00000000 --- a/node_modules/browserify/node_modules/browser-resolve/node_modules/resolve/test/dotdot.js +++ /dev/null @@ -1,29 +0,0 @@ -var path = require('path'); -var test = require('tape'); -var resolve = require('../'); - -test('dotdot', function (t) { - t.plan(4); - var dir = __dirname + '/dotdot/abc'; - - resolve('..', { basedir : dir }, function (err, res, pkg) { - t.ifError(err); - t.equal(res, __dirname + '/dotdot/index.js'); - }); - - resolve('.', { basedir : dir }, function (err, res, pkg) { - t.ifError(err); - t.equal(res, dir + '/index.js'); - }); -}); - -test('dotdot sync', function (t) { - t.plan(2); - var dir = __dirname + '/dotdot/abc'; - - var a = resolve.sync('..', { basedir : dir }); - t.equal(a, __dirname + '/dotdot/index.js'); - - var b = resolve.sync('.', { basedir : dir }); - t.equal(b, dir + '/index.js'); -}); diff --git a/node_modules/browserify/node_modules/browser-resolve/node_modules/resolve/test/dotdot/abc/index.js b/node_modules/browserify/node_modules/browser-resolve/node_modules/resolve/test/dotdot/abc/index.js deleted file mode 100644 index 67f2534e..00000000 --- a/node_modules/browserify/node_modules/browser-resolve/node_modules/resolve/test/dotdot/abc/index.js +++ /dev/null @@ -1,2 +0,0 @@ -var x = require('..'); -console.log(x); diff --git a/node_modules/browserify/node_modules/browser-resolve/node_modules/resolve/test/dotdot/index.js b/node_modules/browserify/node_modules/browser-resolve/node_modules/resolve/test/dotdot/index.js deleted file mode 100644 index afec7360..00000000 --- a/node_modules/browserify/node_modules/browser-resolve/node_modules/resolve/test/dotdot/index.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = 'whatever' diff --git a/node_modules/browserify/node_modules/browser-resolve/node_modules/resolve/test/faulty_basedir.js b/node_modules/browserify/node_modules/browser-resolve/node_modules/resolve/test/faulty_basedir.js deleted file mode 100644 index 24408188..00000000 --- a/node_modules/browserify/node_modules/browser-resolve/node_modules/resolve/test/faulty_basedir.js +++ /dev/null @@ -1,17 +0,0 @@ -var path = require('path'); -var test = require('tape'); -var resolve = require('../'); - -// not sure what's up with this test anymore -if (process.platform !== 'win32') return; - -test('faulty basedir must produce error in windows', function (t) { - t.plan(1); - - var resolverDir = 'C:\\a\\b\\c\\d'; - - resolve('tape/lib/test.js', { basedir : resolverDir }, function (err, res, pkg) { - t.equal(true, !!err); - }); - -}); diff --git a/node_modules/browserify/node_modules/browser-resolve/node_modules/resolve/test/filter.js b/node_modules/browserify/node_modules/browser-resolve/node_modules/resolve/test/filter.js deleted file mode 100644 index 07c38f34..00000000 --- a/node_modules/browserify/node_modules/browser-resolve/node_modules/resolve/test/filter.js +++ /dev/null @@ -1,18 +0,0 @@ -var test = require('tape'); -var resolve = require('../'); - -test('filter', function (t) { - t.plan(2); - var dir = __dirname + '/resolver'; - resolve('./baz', { - basedir : dir, - packageFilter : function (pkg) { - pkg.main = 'doom'; - return pkg; - } - }, function (err, res, pkg) { - if (err) t.fail(err); - t.equal(res, dir + '/baz/doom.js'); - t.equal(pkg.main, 'doom'); - }); -}); diff --git a/node_modules/browserify/node_modules/browser-resolve/node_modules/resolve/test/filter_sync.js b/node_modules/browserify/node_modules/browser-resolve/node_modules/resolve/test/filter_sync.js deleted file mode 100644 index 3f89b794..00000000 --- a/node_modules/browserify/node_modules/browser-resolve/node_modules/resolve/test/filter_sync.js +++ /dev/null @@ -1,15 +0,0 @@ -var test = require('tape'); -var resolve = require('../'); - -test('filter', function (t) { - var dir = __dirname + '/resolver'; - var res = resolve.sync('./baz', { - basedir : dir, - packageFilter : function (pkg) { - pkg.main = 'doom' - return pkg; - } - }); - t.equal(res, dir + '/baz/doom.js'); - t.end(); -}); diff --git a/node_modules/browserify/node_modules/browser-resolve/node_modules/resolve/test/mock.js b/node_modules/browserify/node_modules/browser-resolve/node_modules/resolve/test/mock.js deleted file mode 100644 index 1cf3b124..00000000 --- a/node_modules/browserify/node_modules/browser-resolve/node_modules/resolve/test/mock.js +++ /dev/null @@ -1,142 +0,0 @@ -var test = require('tape'); -var resolve = require('../'); - -test('mock', function (t) { - t.plan(6); - - var files = { - '/foo/bar/baz.js' : 'beep' - }; - - function opts (basedir) { - return { - basedir : basedir, - isFile : function (file, cb) { - cb(null, files.hasOwnProperty(file)); - }, - readFile : function (file, cb) { - cb(null, files[file]); - } - } - } - - resolve('./baz', opts('/foo/bar'), function (err, res, pkg) { - if (err) t.fail(err); - t.equal(res, '/foo/bar/baz.js'); - t.equal(pkg, undefined); - }); - - resolve('./baz.js', opts('/foo/bar'), function (err, res, pkg) { - if (err) t.fail(err); - t.equal(res, '/foo/bar/baz.js'); - t.equal(pkg, undefined); - }); - - resolve('baz', opts('/foo/bar'), function (err, res) { - t.equal(err.message, "Cannot find module 'baz' from '/foo/bar'"); - }); - - resolve('../baz', opts('/foo/bar'), function (err, res) { - t.equal(err.message, "Cannot find module '../baz' from '/foo/bar'"); - }); -}); - -test('mock from package', function (t) { - t.plan(6); - - var files = { - '/foo/bar/baz.js' : 'beep' - }; - - function opts (basedir) { - return { - basedir : basedir, - package : { main: 'bar' }, - isFile : function (file, cb) { - cb(null, files.hasOwnProperty(file)); - }, - readFile : function (file, cb) { - cb(null, files[file]); - } - } - } - - resolve('./baz', opts('/foo/bar'), function (err, res, pkg) { - if (err) t.fail(err); - t.equal(res, '/foo/bar/baz.js'); - t.equal(pkg.main, 'bar'); - }); - - resolve('./baz.js', opts('/foo/bar'), function (err, res, pkg) { - if (err) t.fail(err); - t.equal(res, '/foo/bar/baz.js'); - t.equal(pkg.main, 'bar'); - }); - - resolve('baz', opts('/foo/bar'), function (err, res) { - t.equal(err.message, "Cannot find module 'baz' from '/foo/bar'"); - }); - - resolve('../baz', opts('/foo/bar'), function (err, res) { - t.equal(err.message, "Cannot find module '../baz' from '/foo/bar'"); - }); -}); - -test('mock package', function (t) { - t.plan(2); - - var files = { - '/foo/node_modules/bar/baz.js' : 'beep', - '/foo/node_modules/bar/package.json' : JSON.stringify({ - main : './baz.js' - }) - }; - - function opts (basedir) { - return { - basedir : basedir, - isFile : function (file, cb) { - cb(null, files.hasOwnProperty(file)); - }, - readFile : function (file, cb) { - cb(null, files[file]); - } - } - } - - resolve('bar', opts('/foo'), function (err, res, pkg) { - if (err) t.fail(err); - t.equal(res, '/foo/node_modules/bar/baz.js'); - t.equal(pkg.main, './baz.js'); - }); -}); - -test('mock package from package', function (t) { - t.plan(2); - - var files = { - '/foo/node_modules/bar/baz.js' : 'beep', - '/foo/node_modules/bar/package.json' : JSON.stringify({ - main : './baz.js' - }) - }; - - function opts (basedir) { - return { - basedir : basedir, - package : { main: 'bar' }, - isFile : function (file, cb) { - cb(null, files.hasOwnProperty(file)); - }, - readFile : function (file, cb) { - cb(null, files[file]); - } - } - } - - resolve('bar', opts('/foo'), function (err, res, pkg) { - if (err) t.fail(err); - t.equal(res, '/foo/node_modules/bar/baz.js'); - t.equal(pkg.main, './baz.js'); - }); -}); diff --git a/node_modules/browserify/node_modules/browser-resolve/node_modules/resolve/test/mock_sync.js b/node_modules/browserify/node_modules/browser-resolve/node_modules/resolve/test/mock_sync.js deleted file mode 100644 index abfd2893..00000000 --- a/node_modules/browserify/node_modules/browser-resolve/node_modules/resolve/test/mock_sync.js +++ /dev/null @@ -1,68 +0,0 @@ -var test = require('tape'); -var resolve = require('../'); - -test('mock', function (t) { - t.plan(4); - - var files = { - '/foo/bar/baz.js' : 'beep' - }; - - function opts (basedir) { - return { - basedir : basedir, - isFile : function (file) { - return files.hasOwnProperty(file) - }, - readFileSync : function (file) { - return files[file] - } - } - } - - t.equal( - resolve.sync('./baz', opts('/foo/bar')), - '/foo/bar/baz.js' - ); - - t.equal( - resolve.sync('./baz.js', opts('/foo/bar')), - '/foo/bar/baz.js' - ); - - t.throws(function () { - resolve.sync('baz', opts('/foo/bar')); - }); - - t.throws(function () { - resolve.sync('../baz', opts('/foo/bar')); - }); -}); - -test('mock package', function (t) { - t.plan(1); - - var files = { - '/foo/node_modules/bar/baz.js' : 'beep', - '/foo/node_modules/bar/package.json' : JSON.stringify({ - main : './baz.js' - }) - }; - - function opts (basedir) { - return { - basedir : basedir, - isFile : function (file) { - return files.hasOwnProperty(file) - }, - readFileSync : function (file) { - return files[file] - } - } - } - - t.equal( - resolve.sync('bar', opts('/foo')), - '/foo/node_modules/bar/baz.js' - ); -}); diff --git a/node_modules/browserify/node_modules/browser-resolve/node_modules/resolve/test/module_dir.js b/node_modules/browserify/node_modules/browser-resolve/node_modules/resolve/test/module_dir.js deleted file mode 100644 index 06395d8c..00000000 --- a/node_modules/browserify/node_modules/browser-resolve/node_modules/resolve/test/module_dir.js +++ /dev/null @@ -1,56 +0,0 @@ -var path = require('path'); -var test = require('tape'); -var resolve = require('../'); - -test('moduleDirectory strings', function (t) { - t.plan(4); - var dir = __dirname + '/module_dir'; - var xopts = { - basedir : dir, - moduleDirectory: 'xmodules' - }; - resolve('aaa', xopts, function (err, res, pkg) { - t.ifError(err); - t.equal(res, dir + '/xmodules/aaa/index.js'); - }); - - var yopts = { - basedir : dir, - moduleDirectory: 'ymodules' - }; - resolve('aaa', yopts, function (err, res, pkg) { - t.ifError(err); - t.equal(res, dir + '/ymodules/aaa/index.js'); - }); -}); - -test('moduleDirectory array', function (t) { - t.plan(6); - var dir = __dirname + '/module_dir'; - var aopts = { - basedir : dir, - moduleDirectory: [ 'xmodules', 'ymodules', 'zmodules' ] - }; - resolve('aaa', aopts, function (err, res, pkg) { - t.ifError(err); - t.equal(res, dir + '/xmodules/aaa/index.js'); - }); - - var bopts = { - basedir : dir, - moduleDirectory: [ 'zmodules', 'ymodules', 'xmodules' ] - }; - resolve('aaa', bopts, function (err, res, pkg) { - t.ifError(err); - t.equal(res, dir + '/ymodules/aaa/index.js'); - }); - - var copts = { - basedir : dir, - moduleDirectory: [ 'xmodules', 'ymodules', 'zmodules' ] - }; - resolve('bbb', copts, function (err, res, pkg) { - t.ifError(err); - t.equal(res, dir + '/zmodules/bbb/main.js'); - }); -}); diff --git a/node_modules/browserify/node_modules/browser-resolve/node_modules/resolve/test/module_dir/xmodules/aaa/index.js b/node_modules/browserify/node_modules/browser-resolve/node_modules/resolve/test/module_dir/xmodules/aaa/index.js deleted file mode 100644 index 55cd18ca..00000000 --- a/node_modules/browserify/node_modules/browser-resolve/node_modules/resolve/test/module_dir/xmodules/aaa/index.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = function (x) { return x * 100 } diff --git a/node_modules/browserify/node_modules/browser-resolve/node_modules/resolve/test/module_dir/ymodules/aaa/index.js b/node_modules/browserify/node_modules/browser-resolve/node_modules/resolve/test/module_dir/ymodules/aaa/index.js deleted file mode 100644 index 651aca86..00000000 --- a/node_modules/browserify/node_modules/browser-resolve/node_modules/resolve/test/module_dir/ymodules/aaa/index.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = function (x) { return x + 100 } diff --git a/node_modules/browserify/node_modules/browser-resolve/node_modules/resolve/test/module_dir/zmodules/bbb/main.js b/node_modules/browserify/node_modules/browser-resolve/node_modules/resolve/test/module_dir/zmodules/bbb/main.js deleted file mode 100644 index 4325a0bd..00000000 --- a/node_modules/browserify/node_modules/browser-resolve/node_modules/resolve/test/module_dir/zmodules/bbb/main.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = function (n) { return n * 111 } diff --git a/node_modules/browserify/node_modules/browser-resolve/node_modules/resolve/test/module_dir/zmodules/bbb/package.json b/node_modules/browserify/node_modules/browser-resolve/node_modules/resolve/test/module_dir/zmodules/bbb/package.json deleted file mode 100644 index c13b8cf6..00000000 --- a/node_modules/browserify/node_modules/browser-resolve/node_modules/resolve/test/module_dir/zmodules/bbb/package.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "main": "main.js" -} diff --git a/node_modules/browserify/node_modules/browser-resolve/node_modules/resolve/test/node_path.js b/node_modules/browserify/node_modules/browser-resolve/node_modules/resolve/test/node_path.js deleted file mode 100644 index 2407189b..00000000 --- a/node_modules/browserify/node_modules/browser-resolve/node_modules/resolve/test/node_path.js +++ /dev/null @@ -1,48 +0,0 @@ -var path = require('path'); -var test = require('tape'); -var resolve = require('../'); - -test('$NODE_PATH', function (t) { - t.plan(4); - - resolve('aaa', { - paths: [ - __dirname + '/node_path/x', - __dirname + '/node_path/y' - ], - basedir: __dirname, - }, function (err, res) { - t.equal(res, __dirname + '/node_path/x/aaa/index.js'); - }); - - resolve('bbb', { - paths: [ - __dirname + '/node_path/x', - __dirname + '/node_path/y' - ], - basedir: __dirname, - }, function (err, res) { - t.equal(res, __dirname + '/node_path/y/bbb/index.js'); - }); - - resolve('ccc', { - paths: [ - __dirname + '/node_path/x', - __dirname + '/node_path/y' - ], - basedir: __dirname, - }, function (err, res) { - t.equal(res, __dirname + '/node_path/x/ccc/index.js'); - }); - - // ensure that relative paths still resolve against the - // regular `node_modules` correctly - resolve('tap', { - paths: [ - 'node_path', - ], - basedir: 'node_path/x', - }, function (err, res) { - t.equal(res, path.resolve(__dirname, '..', 'node_modules/tap/lib/main.js')); - }); -}); diff --git a/node_modules/browserify/node_modules/browser-resolve/node_modules/resolve/test/node_path/x/aaa/index.js b/node_modules/browserify/node_modules/browser-resolve/node_modules/resolve/test/node_path/x/aaa/index.js deleted file mode 100644 index 1ea59138..00000000 --- a/node_modules/browserify/node_modules/browser-resolve/node_modules/resolve/test/node_path/x/aaa/index.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = 'A' diff --git a/node_modules/browserify/node_modules/browser-resolve/node_modules/resolve/test/node_path/x/ccc/index.js b/node_modules/browserify/node_modules/browser-resolve/node_modules/resolve/test/node_path/x/ccc/index.js deleted file mode 100644 index f186fa75..00000000 --- a/node_modules/browserify/node_modules/browser-resolve/node_modules/resolve/test/node_path/x/ccc/index.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = 'C' diff --git a/node_modules/browserify/node_modules/browser-resolve/node_modules/resolve/test/node_path/y/bbb/index.js b/node_modules/browserify/node_modules/browser-resolve/node_modules/resolve/test/node_path/y/bbb/index.js deleted file mode 100644 index e22dd83c..00000000 --- a/node_modules/browserify/node_modules/browser-resolve/node_modules/resolve/test/node_path/y/bbb/index.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = 'B' diff --git a/node_modules/browserify/node_modules/browser-resolve/node_modules/resolve/test/node_path/y/ccc/index.js b/node_modules/browserify/node_modules/browser-resolve/node_modules/resolve/test/node_path/y/ccc/index.js deleted file mode 100644 index d0043d1e..00000000 --- a/node_modules/browserify/node_modules/browser-resolve/node_modules/resolve/test/node_path/y/ccc/index.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = 'CY' diff --git a/node_modules/browserify/node_modules/browser-resolve/node_modules/resolve/test/nonstring.js b/node_modules/browserify/node_modules/browser-resolve/node_modules/resolve/test/nonstring.js deleted file mode 100644 index ef63c40f..00000000 --- a/node_modules/browserify/node_modules/browser-resolve/node_modules/resolve/test/nonstring.js +++ /dev/null @@ -1,9 +0,0 @@ -var test = require('tape'); -var resolve = require('../'); - -test('nonstring', function (t) { - t.plan(1); - resolve(555, function (err, res, pkg) { - t.ok(err); - }); -}); diff --git a/node_modules/browserify/node_modules/browser-resolve/node_modules/resolve/test/pathfilter.js b/node_modules/browserify/node_modules/browser-resolve/node_modules/resolve/test/pathfilter.js deleted file mode 100644 index 142f94d6..00000000 --- a/node_modules/browserify/node_modules/browser-resolve/node_modules/resolve/test/pathfilter.js +++ /dev/null @@ -1,35 +0,0 @@ -var test = require('tape'); -var resolve = require('../'); - -test('#62: deep module references and the pathFilter', function(t){ - t.plan(9); - - var resolverDir = __dirname + '/pathfilter/deep_ref'; - var pathFilter = function(pkg, x, remainder){ - t.equal(pkg.version, "1.2.3"); - t.equal(x, resolverDir + '/node_modules/deep/ref'); - t.equal(remainder, "ref"); - return "alt"; - }; - - resolve('deep/ref', { basedir : resolverDir }, function (err, res, pkg) { - if (err) t.fail(err); - - t.equal(pkg.version, "1.2.3"); - t.equal(res, resolverDir + '/node_modules/deep/ref.js'); - }); - - resolve('deep/deeper/ref', { basedir: resolverDir }, - function(err, res, pkg) { - if(err) t.fail(err); - t.notEqual(pkg, undefined); - t.equal(pkg.version, "1.2.3"); - t.equal(res, resolverDir + '/node_modules/deep/deeper/ref.js'); - }); - - resolve('deep/ref', { basedir : resolverDir, pathFilter : pathFilter }, - function (err, res, pkg) { - if (err) t.fail(err); - t.equal(res, resolverDir + '/node_modules/deep/alt.js'); - }); -}); diff --git a/node_modules/browserify/node_modules/browser-resolve/node_modules/resolve/test/pathfilter/deep_ref/main.js b/node_modules/browserify/node_modules/browser-resolve/node_modules/resolve/test/pathfilter/deep_ref/main.js deleted file mode 100644 index e69de29b..00000000 diff --git a/node_modules/browserify/node_modules/browser-resolve/node_modules/resolve/test/pathfilter/deep_ref/node_modules/deep/alt.js b/node_modules/browserify/node_modules/browser-resolve/node_modules/resolve/test/pathfilter/deep_ref/node_modules/deep/alt.js deleted file mode 100644 index e69de29b..00000000 diff --git a/node_modules/browserify/node_modules/browser-resolve/node_modules/resolve/test/pathfilter/deep_ref/node_modules/deep/deeper/ref.js b/node_modules/browserify/node_modules/browser-resolve/node_modules/resolve/test/pathfilter/deep_ref/node_modules/deep/deeper/ref.js deleted file mode 100644 index e69de29b..00000000 diff --git a/node_modules/browserify/node_modules/browser-resolve/node_modules/resolve/test/pathfilter/deep_ref/node_modules/deep/package.json b/node_modules/browserify/node_modules/browser-resolve/node_modules/resolve/test/pathfilter/deep_ref/node_modules/deep/package.json deleted file mode 100644 index fe4b408a..00000000 --- a/node_modules/browserify/node_modules/browser-resolve/node_modules/resolve/test/pathfilter/deep_ref/node_modules/deep/package.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "name": "deep", - "version": "1.2.3" -} diff --git a/node_modules/browserify/node_modules/browser-resolve/node_modules/resolve/test/pathfilter/deep_ref/node_modules/deep/ref.js b/node_modules/browserify/node_modules/browser-resolve/node_modules/resolve/test/pathfilter/deep_ref/node_modules/deep/ref.js deleted file mode 100644 index e69de29b..00000000 diff --git a/node_modules/browserify/node_modules/browser-resolve/node_modules/resolve/test/precedence.js b/node_modules/browserify/node_modules/browser-resolve/node_modules/resolve/test/precedence.js deleted file mode 100644 index c716f0e9..00000000 --- a/node_modules/browserify/node_modules/browser-resolve/node_modules/resolve/test/precedence.js +++ /dev/null @@ -1,23 +0,0 @@ -var path = require('path'); -var test = require('tape'); -var resolve = require('../'); - -test('precedence', function (t) { - t.plan(3); - var dir = path.join(__dirname, 'precedence/aaa'); - - resolve('./', { basedir : dir }, function (err, res, pkg) { - t.ifError(err); - t.equal(res, path.join(dir, 'index.js')); - t.equal(pkg.name, 'resolve'); - }); -}); - -test('./ should not load ${dir}.js', function (t) { - t.plan(1); - var dir = path.join(__dirname, 'precedence/bbb'); - - resolve('./', { basedir : dir }, function (err, res, pkg) { - t.ok(err); - }); -}); diff --git a/node_modules/browserify/node_modules/browser-resolve/node_modules/resolve/test/precedence/aaa.js b/node_modules/browserify/node_modules/browser-resolve/node_modules/resolve/test/precedence/aaa.js deleted file mode 100644 index a182397c..00000000 --- a/node_modules/browserify/node_modules/browser-resolve/node_modules/resolve/test/precedence/aaa.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = 'wtf' diff --git a/node_modules/browserify/node_modules/browser-resolve/node_modules/resolve/test/precedence/aaa/index.js b/node_modules/browserify/node_modules/browser-resolve/node_modules/resolve/test/precedence/aaa/index.js deleted file mode 100644 index 993b03c2..00000000 --- a/node_modules/browserify/node_modules/browser-resolve/node_modules/resolve/test/precedence/aaa/index.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = 'okok' diff --git a/node_modules/browserify/node_modules/browser-resolve/node_modules/resolve/test/precedence/aaa/main.js b/node_modules/browserify/node_modules/browser-resolve/node_modules/resolve/test/precedence/aaa/main.js deleted file mode 100644 index db38959d..00000000 --- a/node_modules/browserify/node_modules/browser-resolve/node_modules/resolve/test/precedence/aaa/main.js +++ /dev/null @@ -1 +0,0 @@ -console.log(require('./')) diff --git a/node_modules/browserify/node_modules/browser-resolve/node_modules/resolve/test/precedence/bbb.js b/node_modules/browserify/node_modules/browser-resolve/node_modules/resolve/test/precedence/bbb.js deleted file mode 100644 index c8a9996b..00000000 --- a/node_modules/browserify/node_modules/browser-resolve/node_modules/resolve/test/precedence/bbb.js +++ /dev/null @@ -1 +0,0 @@ -module.exports '>_<' diff --git a/node_modules/browserify/node_modules/browser-resolve/node_modules/resolve/test/precedence/bbb/main.js b/node_modules/browserify/node_modules/browser-resolve/node_modules/resolve/test/precedence/bbb/main.js deleted file mode 100644 index 716b81d4..00000000 --- a/node_modules/browserify/node_modules/browser-resolve/node_modules/resolve/test/precedence/bbb/main.js +++ /dev/null @@ -1 +0,0 @@ -console.log(require('./')); // should throw diff --git a/node_modules/browserify/node_modules/browser-resolve/node_modules/resolve/test/resolver.js b/node_modules/browserify/node_modules/browser-resolve/node_modules/resolve/test/resolver.js deleted file mode 100644 index 5bbb05f9..00000000 --- a/node_modules/browserify/node_modules/browser-resolve/node_modules/resolve/test/resolver.js +++ /dev/null @@ -1,281 +0,0 @@ -var path = require('path'); -var test = require('tape'); -var resolve = require('../'); - -test('async foo', function (t) { - t.plan(9); - var dir = __dirname + '/resolver'; - - resolve('./foo', { basedir : dir }, function (err, res, pkg) { - if (err) t.fail(err); - t.equal(res, dir + '/foo.js'); - t.equal(pkg.name, 'resolve'); - }); - - resolve('./foo.js', { basedir : dir }, function (err, res, pkg) { - if (err) t.fail(err); - t.equal(res, dir + '/foo.js'); - t.equal(pkg.name, 'resolve'); - }); - - resolve('./foo', { basedir : dir, package: { main: 'resolver' } }, function (err, res, pkg) { - if (err) t.fail(err); - t.equal(res, dir + '/foo.js'); - t.equal(pkg.main, 'resolver'); - }); - - resolve('./foo.js', { basedir : dir, package: { main: 'resolver' } }, function (err, res, pkg) { - if (err) t.fail(err); - t.equal(res, dir + '/foo.js'); - t.equal(pkg.main, 'resolver'); - }); - - resolve('foo', { basedir : dir }, function (err) { - t.equal(err.message, "Cannot find module 'foo' from '" + path.resolve(dir) + "'"); - }); -}); - -test('bar', function (t) { - t.plan(6); - var dir = __dirname + '/resolver'; - - resolve('foo', { basedir : dir + '/bar' }, function (err, res, pkg) { - if (err) t.fail(err); - t.equal(res, dir + '/bar/node_modules/foo/index.js'); - t.equal(pkg, undefined); - }); - - resolve('foo', { basedir : dir + '/bar' }, function (err, res, pkg) { - if (err) t.fail(err); - t.equal(res, dir + '/bar/node_modules/foo/index.js'); - t.equal(pkg, undefined); - }); - - resolve('foo', { basedir : dir + '/bar', package: { main: 'bar' } }, function (err, res, pkg) { - if (err) t.fail(err); - t.equal(res, dir + '/bar/node_modules/foo/index.js'); - t.equal(pkg, undefined); - }); -}); - -test('baz', function (t) { - t.plan(4); - var dir = __dirname + '/resolver'; - - resolve('./baz', { basedir : dir }, function (err, res, pkg) { - if (err) t.fail(err); - t.equal(res, dir + '/baz/quux.js'); - t.equal(pkg.main, 'quux.js'); - }); - - resolve('./baz', { basedir : dir, package: { main: 'resolver' } }, function (err, res, pkg) { - if (err) t.fail(err); - t.equal(res, dir + '/baz/quux.js'); - t.equal(pkg.main, 'quux.js'); - }); -}); - -test('biz', function (t) { - t.plan(24); - var dir = __dirname + '/resolver/biz/node_modules'; - - resolve('./grux', { basedir : dir }, function (err, res, pkg) { - if (err) t.fail(err); - t.equal(res, dir + '/grux/index.js'); - t.equal(pkg, undefined); - }); - - resolve('./grux', { basedir : dir, package: { main: 'biz' } }, function (err, res, pkg) { - if (err) t.fail(err); - t.equal(res, dir + '/grux/index.js'); - t.equal(pkg.main, 'biz'); - }); - - resolve('./garply', { basedir : dir }, function (err, res, pkg) { - if (err) t.fail(err); - t.equal(res, dir + '/garply/lib/index.js'); - t.equal(pkg.main, './lib'); - }); - - resolve('./garply', { basedir : dir, package: { main: 'biz' } }, function (err, res, pkg) { - if (err) t.fail(err); - t.equal(res, dir + '/garply/lib/index.js'); - t.equal(pkg.main, './lib'); - }); - - resolve('tiv', { basedir : dir + '/grux' }, function (err, res, pkg) { - if (err) t.fail(err); - t.equal(res, dir + '/tiv/index.js'); - t.equal(pkg, undefined); - }); - - resolve('tiv', { basedir : dir + '/grux', package: { main: 'grux' } }, function (err, res, pkg) { - if (err) t.fail(err); - t.equal(res, dir + '/tiv/index.js'); - t.equal(pkg, undefined); - }); - - resolve('tiv', { basedir : dir + '/garply' }, function (err, res, pkg) { - if (err) t.fail(err); - t.equal(res, dir + '/tiv/index.js'); - t.equal(pkg, undefined); - }); - - resolve('tiv', { basedir : dir + '/garply', package: { main: './lib' } }, function (err, res, pkg) { - if (err) t.fail(err); - t.equal(res, dir + '/tiv/index.js'); - t.equal(pkg, undefined); - }); - - resolve('grux', { basedir : dir + '/tiv' }, function (err, res, pkg) { - if (err) t.fail(err); - t.equal(res, dir + '/grux/index.js'); - t.equal(pkg, undefined); - }); - - resolve('grux', { basedir : dir + '/tiv', package: { main: 'tiv' } }, function (err, res, pkg) { - if (err) t.fail(err); - t.equal(res, dir + '/grux/index.js'); - t.equal(pkg, undefined); - }); - - resolve('garply', { basedir : dir + '/tiv' }, function (err, res, pkg) { - if (err) t.fail(err); - t.equal(res, dir + '/garply/lib/index.js'); - t.equal(pkg.main, './lib'); - }); - - resolve('garply', { basedir : dir + '/tiv', package: { main: 'tiv' } }, function (err, res, pkg) { - if (err) t.fail(err); - t.equal(res, dir + '/garply/lib/index.js'); - t.equal(pkg.main, './lib'); - }); -}); - -test('quux', function (t) { - t.plan(2); - var dir = __dirname + '/resolver/quux'; - - resolve('./foo', { basedir : dir, package: { main: 'quux' } }, function (err, res, pkg) { - if (err) t.fail(err); - t.equal(res, dir + '/foo/index.js'); - t.equal(pkg.main, 'quux'); - }); -}); - -test('normalize', function (t) { - t.plan(2); - var dir = __dirname + '/resolver/biz/node_modules/grux'; - - resolve('../grux', { basedir : dir }, function (err, res, pkg) { - if (err) t.fail(err); - t.equal(res, dir + '/index.js'); - t.equal(pkg, undefined); - }); -}); - -test('cup', function (t) { - t.plan(3); - var dir = __dirname + '/resolver'; - - resolve('./cup', { basedir : dir, extensions : [ '.js', '.coffee' ] }, - function (err, res) { - if (err) t.fail(err); - t.equal(res, dir + '/cup.coffee'); - }); - - resolve('./cup.coffee', { basedir : dir }, function (err, res) { - if (err) t.fail(err); - t.equal(res, dir + '/cup.coffee'); - }); - - resolve('./cup', { basedir : dir, extensions : [ '.js' ] }, - function (err, res) { - t.equal(err.message, "Cannot find module './cup' from '" + path.resolve(dir) + "'"); - }); -}); - -test('mug', function (t) { - t.plan(3); - var dir = __dirname + '/resolver'; - - resolve('./mug', { basedir : dir }, function (err, res) { - if (err) t.fail(err); - t.equal(res, dir + '/mug.js'); - }); - - resolve('./mug', { basedir : dir, extensions : [ '.coffee', '.js' ] }, - function (err, res) { - if (err) t.fail(err); - t.equal(res, dir + '/mug.coffee'); - }); - - resolve('./mug', { basedir : dir, extensions : [ '.js', '.coffee' ] }, - function (err, res) { - t.equal(res, dir + '/mug.js'); - }); -}); - -test('other path', function (t) { - t.plan(4); - var resolverDir = __dirname + '/resolver'; - var dir = resolverDir + '/bar'; - var otherDir = resolverDir + '/other_path'; - - resolve('root', { basedir : dir, paths: [otherDir] }, function (err, res) { - if (err) t.fail(err); - t.equal(res, resolverDir + '/other_path/root.js'); - }); - - resolve('lib/other-lib', { basedir : dir, paths: [otherDir] }, - function (err, res) { - if (err) t.fail(err); - t.equal(res, resolverDir + '/other_path/lib/other-lib.js'); - }); - - resolve('root', { basedir : dir, }, function (err, res) { - t.equal(err.message, "Cannot find module 'root' from '" + path.resolve(dir) + "'"); - }); - - resolve('zzz', { basedir : dir, paths: [otherDir] }, function (err, res) { - t.equal(err.message, "Cannot find module 'zzz' from '" + path.resolve(dir) + "'"); - }); -}); - -test('incorrect main', function (t) { - t.plan(1) - - var resolverDir = __dirname + '/resolver'; - var dir = resolverDir + '/incorrect_main'; - - resolve('./incorrect_main', { basedir : resolverDir }, function (err, res, pkg) { - if (err) t.fail(err); - t.equal(res, dir + '/index.js'); - }); -}); - -test('without basedir', function (t) { - t.plan(1); - - var dir = __dirname + '/resolver/without_basedir'; - var tester = require(dir + '/main.js'); - - tester(t, function (err, res, pkg){ - if (err) { - t.fail(err); - } else { - t.equal(res, dir + '/node_modules/mymodule.js'); - } - }); -}); - -test('#25: node modules with the same name as node stdlib modules', function (t) { - t.plan(1); - - var resolverDir = __dirname + '/resolver/punycode'; - - resolve('punycode', { basedir : resolverDir }, function (err, res, pkg) { - if (err) t.fail(err); - t.equal(res, resolverDir + '/node_modules/punycode/index.js'); - }); -}); diff --git a/node_modules/browserify/node_modules/browser-resolve/node_modules/resolve/test/resolver/bar/node_modules/foo/index.js b/node_modules/browserify/node_modules/browser-resolve/node_modules/resolve/test/resolver/bar/node_modules/foo/index.js deleted file mode 100644 index bd816eab..00000000 --- a/node_modules/browserify/node_modules/browser-resolve/node_modules/resolve/test/resolver/bar/node_modules/foo/index.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = 1; diff --git a/node_modules/browserify/node_modules/browser-resolve/node_modules/resolve/test/resolver/baz/doom.js b/node_modules/browserify/node_modules/browser-resolve/node_modules/resolve/test/resolver/baz/doom.js deleted file mode 100644 index e69de29b..00000000 diff --git a/node_modules/browserify/node_modules/browser-resolve/node_modules/resolve/test/resolver/baz/package.json b/node_modules/browserify/node_modules/browser-resolve/node_modules/resolve/test/resolver/baz/package.json deleted file mode 100644 index 6b81dcdd..00000000 --- a/node_modules/browserify/node_modules/browser-resolve/node_modules/resolve/test/resolver/baz/package.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "main" : "quux.js" -} diff --git a/node_modules/browserify/node_modules/browser-resolve/node_modules/resolve/test/resolver/baz/quux.js b/node_modules/browserify/node_modules/browser-resolve/node_modules/resolve/test/resolver/baz/quux.js deleted file mode 100644 index bd816eab..00000000 --- a/node_modules/browserify/node_modules/browser-resolve/node_modules/resolve/test/resolver/baz/quux.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = 1; diff --git a/node_modules/browserify/node_modules/browser-resolve/node_modules/resolve/test/resolver/biz/node_modules/garply/lib/index.js b/node_modules/browserify/node_modules/browser-resolve/node_modules/resolve/test/resolver/biz/node_modules/garply/lib/index.js deleted file mode 100644 index 0379e29f..00000000 --- a/node_modules/browserify/node_modules/browser-resolve/node_modules/resolve/test/resolver/biz/node_modules/garply/lib/index.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = 'hello garply'; diff --git a/node_modules/browserify/node_modules/browser-resolve/node_modules/resolve/test/resolver/biz/node_modules/garply/package.json b/node_modules/browserify/node_modules/browser-resolve/node_modules/resolve/test/resolver/biz/node_modules/garply/package.json deleted file mode 100644 index babaac58..00000000 --- a/node_modules/browserify/node_modules/browser-resolve/node_modules/resolve/test/resolver/biz/node_modules/garply/package.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "main" : "./lib" -} diff --git a/node_modules/browserify/node_modules/browser-resolve/node_modules/resolve/test/resolver/biz/node_modules/grux/index.js b/node_modules/browserify/node_modules/browser-resolve/node_modules/resolve/test/resolver/biz/node_modules/grux/index.js deleted file mode 100644 index 49960555..00000000 --- a/node_modules/browserify/node_modules/browser-resolve/node_modules/resolve/test/resolver/biz/node_modules/grux/index.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('tiv') * 100; diff --git a/node_modules/browserify/node_modules/browser-resolve/node_modules/resolve/test/resolver/biz/node_modules/tiv/index.js b/node_modules/browserify/node_modules/browser-resolve/node_modules/resolve/test/resolver/biz/node_modules/tiv/index.js deleted file mode 100644 index 690aad34..00000000 --- a/node_modules/browserify/node_modules/browser-resolve/node_modules/resolve/test/resolver/biz/node_modules/tiv/index.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = 3; diff --git a/node_modules/browserify/node_modules/browser-resolve/node_modules/resolve/test/resolver/cup.coffee b/node_modules/browserify/node_modules/browser-resolve/node_modules/resolve/test/resolver/cup.coffee deleted file mode 100644 index 8b137891..00000000 --- a/node_modules/browserify/node_modules/browser-resolve/node_modules/resolve/test/resolver/cup.coffee +++ /dev/null @@ -1 +0,0 @@ - diff --git a/node_modules/browserify/node_modules/browser-resolve/node_modules/resolve/test/resolver/foo.js b/node_modules/browserify/node_modules/browser-resolve/node_modules/resolve/test/resolver/foo.js deleted file mode 100644 index bd816eab..00000000 --- a/node_modules/browserify/node_modules/browser-resolve/node_modules/resolve/test/resolver/foo.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = 1; diff --git a/node_modules/browserify/node_modules/browser-resolve/node_modules/resolve/test/resolver/incorrect_main/index.js b/node_modules/browserify/node_modules/browser-resolve/node_modules/resolve/test/resolver/incorrect_main/index.js deleted file mode 100644 index bc1fb0a6..00000000 --- a/node_modules/browserify/node_modules/browser-resolve/node_modules/resolve/test/resolver/incorrect_main/index.js +++ /dev/null @@ -1,2 +0,0 @@ -// this is the actual main file 'index.js', not 'wrong.js' like the package.json would indicate -module.exports = 1; diff --git a/node_modules/browserify/node_modules/browser-resolve/node_modules/resolve/test/resolver/incorrect_main/package.json b/node_modules/browserify/node_modules/browser-resolve/node_modules/resolve/test/resolver/incorrect_main/package.json deleted file mode 100644 index 1592ed39..00000000 --- a/node_modules/browserify/node_modules/browser-resolve/node_modules/resolve/test/resolver/incorrect_main/package.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "main" : "wrong.js" -} diff --git a/node_modules/browserify/node_modules/browser-resolve/node_modules/resolve/test/resolver/mug.coffee b/node_modules/browserify/node_modules/browser-resolve/node_modules/resolve/test/resolver/mug.coffee deleted file mode 100644 index e69de29b..00000000 diff --git a/node_modules/browserify/node_modules/browser-resolve/node_modules/resolve/test/resolver/mug.js b/node_modules/browserify/node_modules/browser-resolve/node_modules/resolve/test/resolver/mug.js deleted file mode 100644 index e69de29b..00000000 diff --git a/node_modules/browserify/node_modules/browser-resolve/node_modules/resolve/test/resolver/other_path/lib/other-lib.js b/node_modules/browserify/node_modules/browser-resolve/node_modules/resolve/test/resolver/other_path/lib/other-lib.js deleted file mode 100644 index e69de29b..00000000 diff --git a/node_modules/browserify/node_modules/browser-resolve/node_modules/resolve/test/resolver/other_path/root.js b/node_modules/browserify/node_modules/browser-resolve/node_modules/resolve/test/resolver/other_path/root.js deleted file mode 100644 index e69de29b..00000000 diff --git a/node_modules/browserify/node_modules/browser-resolve/node_modules/resolve/test/resolver/punycode/node_modules/punycode/index.js b/node_modules/browserify/node_modules/browser-resolve/node_modules/resolve/test/resolver/punycode/node_modules/punycode/index.js deleted file mode 100644 index e69de29b..00000000 diff --git a/node_modules/browserify/node_modules/browser-resolve/node_modules/resolve/test/resolver/quux/foo/index.js b/node_modules/browserify/node_modules/browser-resolve/node_modules/resolve/test/resolver/quux/foo/index.js deleted file mode 100644 index bd816eab..00000000 --- a/node_modules/browserify/node_modules/browser-resolve/node_modules/resolve/test/resolver/quux/foo/index.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = 1; diff --git a/node_modules/browserify/node_modules/browser-resolve/node_modules/resolve/test/resolver/without_basedir/main.js b/node_modules/browserify/node_modules/browser-resolve/node_modules/resolve/test/resolver/without_basedir/main.js deleted file mode 100644 index 5f211e9c..00000000 --- a/node_modules/browserify/node_modules/browser-resolve/node_modules/resolve/test/resolver/without_basedir/main.js +++ /dev/null @@ -1,6 +0,0 @@ -resolve = require('../../../'); - -module.exports = function(t, cb) { - resolve('mymodule', null, cb); -} - diff --git a/node_modules/browserify/node_modules/browser-resolve/node_modules/resolve/test/resolver/without_basedir/node_modules/mymodule.js b/node_modules/browserify/node_modules/browser-resolve/node_modules/resolve/test/resolver/without_basedir/node_modules/mymodule.js deleted file mode 100644 index 2b58aa40..00000000 --- a/node_modules/browserify/node_modules/browser-resolve/node_modules/resolve/test/resolver/without_basedir/node_modules/mymodule.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = "The tools we use have a profound (and devious!) influence on our thinking habits, and, therefore, on our thinking abilities.- E. Dijkstra" diff --git a/node_modules/browserify/node_modules/browser-resolve/node_modules/resolve/test/resolver_sync.js b/node_modules/browserify/node_modules/browser-resolve/node_modules/resolve/test/resolver_sync.js deleted file mode 100644 index 59825317..00000000 --- a/node_modules/browserify/node_modules/browser-resolve/node_modules/resolve/test/resolver_sync.js +++ /dev/null @@ -1,180 +0,0 @@ -var test = require('tape'); -var resolve = require('../'); - -test('foo', function (t) { - var dir = __dirname + '/resolver'; - - t.equal( - resolve.sync('./foo', { basedir : dir }), - dir + '/foo.js' - ); - - t.equal( - resolve.sync('./foo.js', { basedir : dir }), - dir + '/foo.js' - ); - - t.throws(function () { - resolve.sync('foo', { basedir : dir }); - }); - - t.end(); -}); - -test('bar', function (t) { - var dir = __dirname + '/resolver'; - - t.equal( - resolve.sync('foo', { basedir : dir + '/bar' }), - dir + '/bar/node_modules/foo/index.js' - ); - t.end(); -}); - -test('baz', function (t) { - var dir = __dirname + '/resolver'; - - t.equal( - resolve.sync('./baz', { basedir : dir }), - dir + '/baz/quux.js' - ); - t.end(); -}); - -test('biz', function (t) { - var dir = __dirname + '/resolver/biz/node_modules'; - t.equal( - resolve.sync('./grux', { basedir : dir }), - dir + '/grux/index.js' - ); - - t.equal( - resolve.sync('tiv', { basedir : dir + '/grux' }), - dir + '/tiv/index.js' - ); - - t.equal( - resolve.sync('grux', { basedir : dir + '/tiv' }), - dir + '/grux/index.js' - ); - t.end(); -}); - -test('normalize', function (t) { - var dir = __dirname + '/resolver/biz/node_modules/grux'; - t.equal( - resolve.sync('../grux', { basedir : dir }), - dir + '/index.js' - ); - t.end(); -}); - -test('cup', function (t) { - var dir = __dirname + '/resolver'; - t.equal( - resolve.sync('./cup', { - basedir : dir, - extensions : [ '.js', '.coffee' ] - }), - dir + '/cup.coffee' - ); - - t.equal( - resolve.sync('./cup.coffee', { - basedir : dir - }), - dir + '/cup.coffee' - ); - - t.throws(function () { - resolve.sync('./cup', { - basedir : dir, - extensions : [ '.js' ] - }) - }); - - t.end(); -}); - -test('mug', function (t) { - var dir = __dirname + '/resolver'; - t.equal( - resolve.sync('./mug', { basedir : dir }), - dir + '/mug.js' - ); - - t.equal( - resolve.sync('./mug', { - basedir : dir, - extensions : [ '.coffee', '.js' ] - }), - dir + '/mug.coffee' - ); - - t.equal( - resolve.sync('./mug', { - basedir : dir, - extensions : [ '.js', '.coffee' ] - }), - dir + '/mug.js' - ); - - t.end(); -}); - -test('other path', function (t) { - var resolverDir = __dirname + '/resolver'; - var dir = resolverDir + '/bar'; - var otherDir = resolverDir + '/other_path'; - - var path = require('path'); - - t.equal( - resolve.sync('root', { - basedir : dir, - paths: [otherDir] }), - resolverDir + '/other_path/root.js' - ); - - t.equal( - resolve.sync('lib/other-lib', { - basedir : dir, - paths: [otherDir] }), - resolverDir + '/other_path/lib/other-lib.js' - ); - - t.throws(function () { - resolve.sync('root', { basedir : dir, }); - }); - - t.throws(function () { - resolve.sync('zzz', { - basedir : dir, - paths: [otherDir] }); - }); - - t.end(); -}); - -test('incorrect main', function (t) { - var resolverDir = __dirname + '/resolver'; - var dir = resolverDir + '/incorrect_main'; - - t.equal( - resolve.sync('./incorrect_main', { basedir : resolverDir }), - dir + '/index.js' - ) - - t.end() -}); - -test('#25: node modules with the same name as node stdlib modules', function (t) { - var resolverDir = __dirname + '/resolver/punycode'; - - t.equal( - resolve.sync('punycode', { basedir : resolverDir }), - resolverDir + '/node_modules/punycode/index.js' - ) - - t.end() -}); diff --git a/node_modules/browserify/node_modules/browser-resolve/node_modules/resolve/test/subdirs.js b/node_modules/browserify/node_modules/browser-resolve/node_modules/resolve/test/subdirs.js deleted file mode 100644 index 957abfe0..00000000 --- a/node_modules/browserify/node_modules/browser-resolve/node_modules/resolve/test/subdirs.js +++ /dev/null @@ -1,13 +0,0 @@ -var test = require('tape'); -var resolve = require('../'); -var path = require('path'); - -test('subdirs', function (t) { - t.plan(2); - - var dir = path.join(__dirname, '/subdirs'); - resolve('a/b/c/x.json', { basedir: dir }, function (err, res) { - t.ifError(err); - t.equal(res, path.join(dir, 'node_modules/a/b/c/x.json')); - }); -}); diff --git a/node_modules/browserify/node_modules/browser-resolve/node_modules/resolve/test/subdirs/node_modules/a/b/c/x.json b/node_modules/browserify/node_modules/browser-resolve/node_modules/resolve/test/subdirs/node_modules/a/b/c/x.json deleted file mode 100644 index 3cc0ecbe..00000000 --- a/node_modules/browserify/node_modules/browser-resolve/node_modules/resolve/test/subdirs/node_modules/a/b/c/x.json +++ /dev/null @@ -1 +0,0 @@ -[1,2,3] diff --git a/node_modules/browserify/node_modules/browser-resolve/node_modules/resolve/test/subdirs/node_modules/a/package.json b/node_modules/browserify/node_modules/browser-resolve/node_modules/resolve/test/subdirs/node_modules/a/package.json deleted file mode 100644 index 0967ef42..00000000 --- a/node_modules/browserify/node_modules/browser-resolve/node_modules/resolve/test/subdirs/node_modules/a/package.json +++ /dev/null @@ -1 +0,0 @@ -{} diff --git a/node_modules/browserify/node_modules/browser-resolve/package.json b/node_modules/browserify/node_modules/browser-resolve/package.json deleted file mode 100644 index c852561f..00000000 --- a/node_modules/browserify/node_modules/browser-resolve/package.json +++ /dev/null @@ -1,67 +0,0 @@ -{ - "name": "browser-resolve", - "version": "1.11.2", - "description": "resolve which handles browser field support in package.json", - "main": "index.js", - "files": [ - "index.js", - "empty.js" - ], - "scripts": { - "test": "mocha --reporter list test/*.js" - }, - "repository": { - "type": "git", - "url": "git://github.com/shtylman/node-browser-resolve.git" - }, - "keywords": [ - "resolve", - "browser" - ], - "author": { - "name": "Roman Shtylman", - "email": "shtylman@gmail.com" - }, - "license": "MIT", - "dependencies": { - "resolve": "1.1.7" - }, - "devDependencies": { - "mocha": "1.14.0" - }, - "gitHead": "0955bafbb275d2ec1e425b2d776d4d619bd72282", - "bugs": { - "url": "https://github.com/shtylman/node-browser-resolve/issues" - }, - "homepage": "https://github.com/shtylman/node-browser-resolve#readme", - "_id": "browser-resolve@1.11.2", - "_shasum": "8ff09b0a2c421718a1051c260b32e48f442938ce", - "_from": "browser-resolve@>=1.7.1 <2.0.0", - "_npmVersion": "3.8.9", - "_nodeVersion": "6.2.0", - "_npmUser": { - "name": "defunctzombie", - "email": "shtylman@gmail.com" - }, - "dist": { - "shasum": "8ff09b0a2c421718a1051c260b32e48f442938ce", - "tarball": "https://registry.npmjs.org/browser-resolve/-/browser-resolve-1.11.2.tgz" - }, - "maintainers": [ - { - "name": "substack", - "email": "substack@gmail.com" - }, - { - "name": "defunctzombie", - "email": "shtylman@gmail.com" - } - ], - "_npmOperationalInternal": { - "host": "packages-12-west.internal.npmjs.com", - "tmp": "tmp/browser-resolve-1.11.2.tgz_1464190222040_0.7355328067205846" - }, - "directories": {}, - "_resolved": "https://registry.npmjs.org/browser-resolve/-/browser-resolve-1.11.2.tgz", - "readme": "ERROR: No README data found!" -} diff --git a/node_modules/browserify/node_modules/browserify-zlib/.npmignore b/node_modules/browserify/node_modules/browserify-zlib/.npmignore deleted file mode 100644 index 2752eb92..00000000 --- a/node_modules/browserify/node_modules/browserify-zlib/.npmignore +++ /dev/null @@ -1,2 +0,0 @@ -node_modules/ -.DS_Store diff --git a/node_modules/browserify/node_modules/browserify-zlib/.travis.yml b/node_modules/browserify/node_modules/browserify-zlib/.travis.yml deleted file mode 100644 index 87f8cd91..00000000 --- a/node_modules/browserify/node_modules/browserify-zlib/.travis.yml +++ /dev/null @@ -1,3 +0,0 @@ -language: node_js -node_js: - - "0.10" \ No newline at end of file diff --git a/node_modules/browserify/node_modules/browserify-zlib/README.md b/node_modules/browserify/node_modules/browserify-zlib/README.md deleted file mode 100644 index 61f323a3..00000000 --- a/node_modules/browserify/node_modules/browserify-zlib/README.md +++ /dev/null @@ -1,22 +0,0 @@ -# browserify-zlib - -Emulates Node's [zlib](http://nodejs.org/api/zlib.html) module for [Browserify](http://browserify.org) -using [pako](https://github.com/nodeca/pako). It uses the actual Node source code and passes the Node zlib tests -by emulating the C++ binding that actually calls zlib. - -[![browser support](https://ci.testling.com/devongovett/browserify-zlib.png) -](https://ci.testling.com/devongovett/browserify-zlib) - -[![node tests](https://travis-ci.org/devongovett/browserify-zlib.svg) -](https://travis-ci.org/devongovett/browserify-zlib) - -## Not implemented - -The following options/methods are not supported because pako does not support them yet. - -* The `params` method -* The `dictionary` option - -## License - -MIT diff --git a/node_modules/browserify/node_modules/browserify-zlib/node_modules/pako/CHANGELOG.md b/node_modules/browserify/node_modules/browserify-zlib/node_modules/pako/CHANGELOG.md deleted file mode 100644 index f9859227..00000000 --- a/node_modules/browserify/node_modules/browserify-zlib/node_modules/pako/CHANGELOG.md +++ /dev/null @@ -1,90 +0,0 @@ -1.0.2 / 2016-07-21 ------------------- - -- Fixed nasty bug in deflate (wrong `d_buf` offset), which could cause - broken data in some rare cases. -- Also released as 0.2.9 to give chance to old dependents, not updated to 1.x - version. - - -1.0.1 / 2016-04-01 ------------------- - -- Added dictionary support. Thanks to @dignifiedquire. - - -1.0.0 / 2016-02-17 ------------------- - -- Maintenance release (semver, coding style). - - -0.2.8 / 2015-09-14 ------------------- - -- Fixed regression after 0.2.4 for edge conditions in inflate wrapper (#65). - Added more tests to cover possible cases. - - -0.2.7 / 2015-06-09 ------------------- - -- Added Z_SYNC_FLUSH support. Thanks to @TinoLange. - - -0.2.6 / 2015-03-24 ------------------- - -- Allow ArrayBuffer input. - - -0.2.5 / 2014-07-19 ------------------- - -- Workaround for Chrome 38.0.2096.0 script parser bug, #30. - - -0.2.4 / 2014-07-07 ------------------- - -- Fixed bug in inflate wrapper, #29 - - -0.2.3 / 2014-06-09 ------------------- - -- Maintenance release, dependencies update. - - -0.2.2 / 2014-06-04 ------------------- - -- Fixed iOS 5.1 Safary issue with `apply(typed_array)`, #26. - - -0.2.1 / 2014-05-01 ------------------- - -- Fixed collision on switch dynamic/fixed tables. - - -0.2.0 / 2014-04-18 ------------------- - -- Added custom gzip headers support. -- Added strings support. -- Improved memory allocations for small chunks. -- ZStream properties rename/cleanup. -- More coverage tests. - - -0.1.1 / 2014-03-20 ------------------- - -- Bugfixes for inflate/deflate. - - -0.1.0 / 2014-03-15 ------------------- - -- First release. diff --git a/node_modules/browserify/node_modules/browserify-zlib/node_modules/pako/LICENSE b/node_modules/browserify/node_modules/browserify-zlib/node_modules/pako/LICENSE deleted file mode 100644 index d082ae32..00000000 --- a/node_modules/browserify/node_modules/browserify-zlib/node_modules/pako/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -(The MIT License) - -Copyright (C) 2014-2016 by Vitaly Puzrin - -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/node_modules/browserify/node_modules/browserify-zlib/node_modules/pako/README.md b/node_modules/browserify/node_modules/browserify-zlib/node_modules/pako/README.md deleted file mode 100644 index ef121e78..00000000 --- a/node_modules/browserify/node_modules/browserify-zlib/node_modules/pako/README.md +++ /dev/null @@ -1,176 +0,0 @@ -pako - zlib port to javascript, very fast! -========================================== - -[![Build Status](https://travis-ci.org/nodeca/pako.svg?branch=master)](https://travis-ci.org/nodeca/pako) -[![NPM version](https://img.shields.io/npm/v/pako.svg)](https://www.npmjs.org/package/pako) - -__Why pako is cool:__ - -- Almost as fast in modern JS engines as C implementation (see benchmarks). -- Works in browsers, you can browserify any separate component. -- Chunking support for big blobs. -- Results are binary equal to well known [zlib](http://www.zlib.net/) (now v1.2.8 ported). - -This project was done to understand how fast JS can be and is it necessary to -develop native C modules for CPU-intensive tasks. Enjoy the result! - - -__Famous projects, using pako:__ - -- [browserify](http://browserify.org/) (via [browserify-zlib](https://github.com/devongovett/browserify-zlib)) -- [JSZip](http://stuk.github.io/jszip/) -- [mincer](https://github.com/nodeca/mincer) -- [JS-Git](https://github.com/creationix/js-git) and - [Tedit](https://chrome.google.com/webstore/detail/tedit-development-environ/ooekdijbnbbjdfjocaiflnjgoohnblgf) - by [@creatronix](https://github.com/creationix) - - -__Benchmarks:__ - -``` -node v0.10.26, 1mb sample: - - deflate-dankogai x 4.73 ops/sec ±0.82% (15 runs sampled) - deflate-gildas x 4.58 ops/sec ±2.33% (15 runs sampled) - deflate-imaya x 3.22 ops/sec ±3.95% (12 runs sampled) - ! deflate-pako x 6.99 ops/sec ±0.51% (21 runs sampled) - deflate-pako-string x 5.89 ops/sec ±0.77% (18 runs sampled) - deflate-pako-untyped x 4.39 ops/sec ±1.58% (14 runs sampled) - * deflate-zlib x 14.71 ops/sec ±4.23% (59 runs sampled) - inflate-dankogai x 32.16 ops/sec ±0.13% (56 runs sampled) - inflate-imaya x 30.35 ops/sec ±0.92% (53 runs sampled) - ! inflate-pako x 69.89 ops/sec ±1.46% (71 runs sampled) - inflate-pako-string x 19.22 ops/sec ±1.86% (49 runs sampled) - inflate-pako-untyped x 17.19 ops/sec ±0.85% (32 runs sampled) - * inflate-zlib x 70.03 ops/sec ±1.64% (81 runs sampled) - -node v0.11.12, 1mb sample: - - deflate-dankogai x 5.60 ops/sec ±0.49% (17 runs sampled) - deflate-gildas x 5.06 ops/sec ±6.00% (16 runs sampled) - deflate-imaya x 3.52 ops/sec ±3.71% (13 runs sampled) - ! deflate-pako x 11.52 ops/sec ±0.22% (32 runs sampled) - deflate-pako-string x 9.53 ops/sec ±1.12% (27 runs sampled) - deflate-pako-untyped x 5.44 ops/sec ±0.72% (17 runs sampled) - * deflate-zlib x 14.05 ops/sec ±3.34% (63 runs sampled) - inflate-dankogai x 42.19 ops/sec ±0.09% (56 runs sampled) - inflate-imaya x 79.68 ops/sec ±1.07% (68 runs sampled) - ! inflate-pako x 97.52 ops/sec ±0.83% (80 runs sampled) - inflate-pako-string x 45.19 ops/sec ±1.69% (57 runs sampled) - inflate-pako-untyped x 24.35 ops/sec ±2.59% (40 runs sampled) - * inflate-zlib x 60.32 ops/sec ±1.36% (69 runs sampled) -``` - -zlib's test is partialy afferted by marshling (that make sense for inflate only). -You can change deflate level to 0 in benchmark source, to investigate details. -For deflate level 6 results can be considered as correct. - -__Install:__ - -node.js: - -``` -npm install pako -``` - -browser: - -``` -bower install pako -``` - - -Example & API -------------- - -Full docs - http://nodeca.github.io/pako/ - -```javascript -var pako = require('pako'); - -// Deflate -// -var input = new Uint8Array(); -//... fill input data here -var output = pako.deflate(input); - -// Inflate (simple wrapper can throw exception on broken stream) -// -var compressed = new Uint8Array(); -//... fill data to uncompress here -try { - var result = pako.inflate(compressed); -} catch (err) { - console.log(err); -} - -// -// Alternate interface for chunking & without exceptions -// - -var inflator = new pako.Inflate(); - -inflator.push(chunk1, false); -inflator.push(chunk2, false); -... -inflator.push(chunkN, true); // true -> last chunk - -if (inflator.err) { - console.log(inflator.msg); -} - -var output = inflator.result; - -``` - -Sometime you can wish to work with strings. For example, to send -big objects as json to server. Pako detects input data type. You can -force output to be string with option `{ to: 'string' }`. - -```javascript -var pako = require('pako'); - -var test = { my: 'super', puper: [456, 567], awesome: 'pako' }; - -var binaryString = pako.deflate(JSON.stringify(test), { to: 'string' }); - -// -// Here you can do base64 encode, make xhr requests and so on. -// - -var restored = JSON.parse(pako.inflate(binaryString, { to: 'string' })); -``` - - -Notes ------ - -Pako does not contain some specific zlib functions: - -- __deflate__ - methods `deflateCopy`, `deflateBound`, `deflateParams`, - `deflatePending`, `deflatePrime`, `deflateTune`. -- __inflate__ - methods `inflateCopy`, `inflateMark`, - `inflatePrime`, `inflateGetDictionary`, `inflateSync`, `inflateSyncPoint`, `inflateUndermine`. -- High level inflate/deflate wrappers (classes) may not support some flush - modes. Those should work: Z_NO_FLUSH, Z_FINISH, Z_SYNC_FLUSH. - - -Authors -------- - -- Andrey Tupitsin [@anrd83](https://github.com/andr83) -- Vitaly Puzrin [@puzrin](https://github.com/puzrin) - -Personal thanks to: - -- Vyacheslav Egorov ([@mraleph](https://github.com/mraleph)) for his awesome - tutorials about optimising JS code for v8, [IRHydra](http://mrale.ph/irhydra/) - tool and his advices. -- David Duponchel ([@dduponchel](https://github.com/dduponchel)) for help with - testing. - - -License -------- - -MIT diff --git a/node_modules/browserify/node_modules/browserify-zlib/node_modules/pako/dist/pako.js b/node_modules/browserify/node_modules/browserify-zlib/node_modules/pako/dist/pako.js deleted file mode 100644 index 6d6db944..00000000 --- a/node_modules/browserify/node_modules/browserify-zlib/node_modules/pako/dist/pako.js +++ /dev/null @@ -1,6606 +0,0 @@ -/* pako 0.2.9 nodeca/pako */(function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.pako = f()}})(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o Array - * - * Chunks of output data, if [[Deflate#onData]] not overriden. - **/ - -/** - * Deflate.result -> Uint8Array|Array - * - * Compressed result, generated by default [[Deflate#onData]] - * and [[Deflate#onEnd]] handlers. Filled after you push last chunk - * (call [[Deflate#push]] with `Z_FINISH` / `true` param) or if you - * push a chunk with explicit flush (call [[Deflate#push]] with - * `Z_SYNC_FLUSH` param). - **/ - -/** - * Deflate.err -> Number - * - * Error code after deflate finished. 0 (Z_OK) on success. - * You will not need it in real life, because deflate errors - * are possible only on wrong options or bad `onData` / `onEnd` - * custom handlers. - **/ - -/** - * Deflate.msg -> String - * - * Error message, if [[Deflate.err]] != 0 - **/ - - -/** - * new Deflate(options) - * - options (Object): zlib deflate options. - * - * Creates new deflator instance with specified params. Throws exception - * on bad params. Supported options: - * - * - `level` - * - `windowBits` - * - `memLevel` - * - `strategy` - * - `dictionary` - * - * [http://zlib.net/manual.html#Advanced](http://zlib.net/manual.html#Advanced) - * for more information on these. - * - * Additional options, for internal needs: - * - * - `chunkSize` - size of generated data chunks (16K by default) - * - `raw` (Boolean) - do raw deflate - * - `gzip` (Boolean) - create gzip wrapper - * - `to` (String) - if equal to 'string', then result will be "binary string" - * (each char code [0..255]) - * - `header` (Object) - custom header for gzip - * - `text` (Boolean) - true if compressed data believed to be text - * - `time` (Number) - modification time, unix timestamp - * - `os` (Number) - operation system code - * - `extra` (Array) - array of bytes with extra data (max 65536) - * - `name` (String) - file name (binary string) - * - `comment` (String) - comment (binary string) - * - `hcrc` (Boolean) - true if header crc should be added - * - * ##### Example: - * - * ```javascript - * var pako = require('pako') - * , chunk1 = Uint8Array([1,2,3,4,5,6,7,8,9]) - * , chunk2 = Uint8Array([10,11,12,13,14,15,16,17,18,19]); - * - * var deflate = new pako.Deflate({ level: 3}); - * - * deflate.push(chunk1, false); - * deflate.push(chunk2, true); // true -> last chunk - * - * if (deflate.err) { throw new Error(deflate.err); } - * - * console.log(deflate.result); - * ``` - **/ -function Deflate(options) { - if (!(this instanceof Deflate)) return new Deflate(options); - - this.options = utils.assign({ - level: Z_DEFAULT_COMPRESSION, - method: Z_DEFLATED, - chunkSize: 16384, - windowBits: 15, - memLevel: 8, - strategy: Z_DEFAULT_STRATEGY, - to: '' - }, options || {}); - - var opt = this.options; - - if (opt.raw && (opt.windowBits > 0)) { - opt.windowBits = -opt.windowBits; - } - - else if (opt.gzip && (opt.windowBits > 0) && (opt.windowBits < 16)) { - opt.windowBits += 16; - } - - this.err = 0; // error code, if happens (0 = Z_OK) - this.msg = ''; // error message - this.ended = false; // used to avoid multiple onEnd() calls - this.chunks = []; // chunks of compressed data - - this.strm = new ZStream(); - this.strm.avail_out = 0; - - var status = zlib_deflate.deflateInit2( - this.strm, - opt.level, - opt.method, - opt.windowBits, - opt.memLevel, - opt.strategy - ); - - if (status !== Z_OK) { - throw new Error(msg[status]); - } - - if (opt.header) { - zlib_deflate.deflateSetHeader(this.strm, opt.header); - } - - if (opt.dictionary) { - var dict; - // Convert data if needed - if (typeof opt.dictionary === 'string') { - // If we need to compress text, change encoding to utf8. - dict = strings.string2buf(opt.dictionary); - } else if (toString.call(opt.dictionary) === '[object ArrayBuffer]') { - dict = new Uint8Array(opt.dictionary); - } else { - dict = opt.dictionary; - } - - status = zlib_deflate.deflateSetDictionary(this.strm, dict); - - if (status !== Z_OK) { - throw new Error(msg[status]); - } - - this._dict_set = true; - } -} - -/** - * Deflate#push(data[, mode]) -> Boolean - * - data (Uint8Array|Array|ArrayBuffer|String): input data. Strings will be - * converted to utf8 byte sequence. - * - mode (Number|Boolean): 0..6 for corresponding Z_NO_FLUSH..Z_TREE modes. - * See constants. Skipped or `false` means Z_NO_FLUSH, `true` meansh Z_FINISH. - * - * Sends input data to deflate pipe, generating [[Deflate#onData]] calls with - * new compressed chunks. Returns `true` on success. The last data block must have - * mode Z_FINISH (or `true`). That will flush internal pending buffers and call - * [[Deflate#onEnd]]. For interim explicit flushes (without ending the stream) you - * can use mode Z_SYNC_FLUSH, keeping the compression context. - * - * On fail call [[Deflate#onEnd]] with error code and return false. - * - * We strongly recommend to use `Uint8Array` on input for best speed (output - * array format is detected automatically). Also, don't skip last param and always - * use the same type in your code (boolean or number). That will improve JS speed. - * - * For regular `Array`-s make sure all elements are [0..255]. - * - * ##### Example - * - * ```javascript - * push(chunk, false); // push one of data chunks - * ... - * push(chunk, true); // push last chunk - * ``` - **/ -Deflate.prototype.push = function (data, mode) { - var strm = this.strm; - var chunkSize = this.options.chunkSize; - var status, _mode; - - if (this.ended) { return false; } - - _mode = (mode === ~~mode) ? mode : ((mode === true) ? Z_FINISH : Z_NO_FLUSH); - - // Convert data if needed - if (typeof data === 'string') { - // If we need to compress text, change encoding to utf8. - strm.input = strings.string2buf(data); - } else if (toString.call(data) === '[object ArrayBuffer]') { - strm.input = new Uint8Array(data); - } else { - strm.input = data; - } - - strm.next_in = 0; - strm.avail_in = strm.input.length; - - do { - if (strm.avail_out === 0) { - strm.output = new utils.Buf8(chunkSize); - strm.next_out = 0; - strm.avail_out = chunkSize; - } - status = zlib_deflate.deflate(strm, _mode); /* no bad return value */ - - if (status !== Z_STREAM_END && status !== Z_OK) { - this.onEnd(status); - this.ended = true; - return false; - } - if (strm.avail_out === 0 || (strm.avail_in === 0 && (_mode === Z_FINISH || _mode === Z_SYNC_FLUSH))) { - if (this.options.to === 'string') { - this.onData(strings.buf2binstring(utils.shrinkBuf(strm.output, strm.next_out))); - } else { - this.onData(utils.shrinkBuf(strm.output, strm.next_out)); - } - } - } while ((strm.avail_in > 0 || strm.avail_out === 0) && status !== Z_STREAM_END); - - // Finalize on the last chunk. - if (_mode === Z_FINISH) { - status = zlib_deflate.deflateEnd(this.strm); - this.onEnd(status); - this.ended = true; - return status === Z_OK; - } - - // callback interim results if Z_SYNC_FLUSH. - if (_mode === Z_SYNC_FLUSH) { - this.onEnd(Z_OK); - strm.avail_out = 0; - return true; - } - - return true; -}; - - -/** - * Deflate#onData(chunk) -> Void - * - chunk (Uint8Array|Array|String): ouput data. Type of array depends - * on js engine support. When string output requested, each chunk - * will be string. - * - * By default, stores data blocks in `chunks[]` property and glue - * those in `onEnd`. Override this handler, if you need another behaviour. - **/ -Deflate.prototype.onData = function (chunk) { - this.chunks.push(chunk); -}; - - -/** - * Deflate#onEnd(status) -> Void - * - status (Number): deflate status. 0 (Z_OK) on success, - * other if not. - * - * Called once after you tell deflate that the input stream is - * complete (Z_FINISH) or should be flushed (Z_SYNC_FLUSH) - * or if an error happened. By default - join collected chunks, - * free memory and fill `results` / `err` properties. - **/ -Deflate.prototype.onEnd = function (status) { - // On success - join - if (status === Z_OK) { - if (this.options.to === 'string') { - this.result = this.chunks.join(''); - } else { - this.result = utils.flattenChunks(this.chunks); - } - } - this.chunks = []; - this.err = status; - this.msg = this.strm.msg; -}; - - -/** - * deflate(data[, options]) -> Uint8Array|Array|String - * - data (Uint8Array|Array|String): input data to compress. - * - options (Object): zlib deflate options. - * - * Compress `data` with deflate algorithm and `options`. - * - * Supported options are: - * - * - level - * - windowBits - * - memLevel - * - strategy - * - dictionary - * - * [http://zlib.net/manual.html#Advanced](http://zlib.net/manual.html#Advanced) - * for more information on these. - * - * Sugar (options): - * - * - `raw` (Boolean) - say that we work with raw stream, if you don't wish to specify - * negative windowBits implicitly. - * - `to` (String) - if equal to 'string', then result will be "binary string" - * (each char code [0..255]) - * - * ##### Example: - * - * ```javascript - * var pako = require('pako') - * , data = Uint8Array([1,2,3,4,5,6,7,8,9]); - * - * console.log(pako.deflate(data)); - * ``` - **/ -function deflate(input, options) { - var deflator = new Deflate(options); - - deflator.push(input, true); - - // That will never happens, if you don't cheat with options :) - if (deflator.err) { throw deflator.msg; } - - return deflator.result; -} - - -/** - * deflateRaw(data[, options]) -> Uint8Array|Array|String - * - data (Uint8Array|Array|String): input data to compress. - * - options (Object): zlib deflate options. - * - * The same as [[deflate]], but creates raw data, without wrapper - * (header and adler32 crc). - **/ -function deflateRaw(input, options) { - options = options || {}; - options.raw = true; - return deflate(input, options); -} - - -/** - * gzip(data[, options]) -> Uint8Array|Array|String - * - data (Uint8Array|Array|String): input data to compress. - * - options (Object): zlib deflate options. - * - * The same as [[deflate]], but create gzip wrapper instead of - * deflate one. - **/ -function gzip(input, options) { - options = options || {}; - options.gzip = true; - return deflate(input, options); -} - - -exports.Deflate = Deflate; -exports.deflate = deflate; -exports.deflateRaw = deflateRaw; -exports.gzip = gzip; - -},{"./utils/common":3,"./utils/strings":4,"./zlib/deflate":8,"./zlib/messages":13,"./zlib/zstream":15}],2:[function(require,module,exports){ -'use strict'; - - -var zlib_inflate = require('./zlib/inflate'); -var utils = require('./utils/common'); -var strings = require('./utils/strings'); -var c = require('./zlib/constants'); -var msg = require('./zlib/messages'); -var ZStream = require('./zlib/zstream'); -var GZheader = require('./zlib/gzheader'); - -var toString = Object.prototype.toString; - -/** - * class Inflate - * - * Generic JS-style wrapper for zlib calls. If you don't need - * streaming behaviour - use more simple functions: [[inflate]] - * and [[inflateRaw]]. - **/ - -/* internal - * inflate.chunks -> Array - * - * Chunks of output data, if [[Inflate#onData]] not overriden. - **/ - -/** - * Inflate.result -> Uint8Array|Array|String - * - * Uncompressed result, generated by default [[Inflate#onData]] - * and [[Inflate#onEnd]] handlers. Filled after you push last chunk - * (call [[Inflate#push]] with `Z_FINISH` / `true` param) or if you - * push a chunk with explicit flush (call [[Inflate#push]] with - * `Z_SYNC_FLUSH` param). - **/ - -/** - * Inflate.err -> Number - * - * Error code after inflate finished. 0 (Z_OK) on success. - * Should be checked if broken data possible. - **/ - -/** - * Inflate.msg -> String - * - * Error message, if [[Inflate.err]] != 0 - **/ - - -/** - * new Inflate(options) - * - options (Object): zlib inflate options. - * - * Creates new inflator instance with specified params. Throws exception - * on bad params. Supported options: - * - * - `windowBits` - * - `dictionary` - * - * [http://zlib.net/manual.html#Advanced](http://zlib.net/manual.html#Advanced) - * for more information on these. - * - * Additional options, for internal needs: - * - * - `chunkSize` - size of generated data chunks (16K by default) - * - `raw` (Boolean) - do raw inflate - * - `to` (String) - if equal to 'string', then result will be converted - * from utf8 to utf16 (javascript) string. When string output requested, - * chunk length can differ from `chunkSize`, depending on content. - * - * By default, when no options set, autodetect deflate/gzip data format via - * wrapper header. - * - * ##### Example: - * - * ```javascript - * var pako = require('pako') - * , chunk1 = Uint8Array([1,2,3,4,5,6,7,8,9]) - * , chunk2 = Uint8Array([10,11,12,13,14,15,16,17,18,19]); - * - * var inflate = new pako.Inflate({ level: 3}); - * - * inflate.push(chunk1, false); - * inflate.push(chunk2, true); // true -> last chunk - * - * if (inflate.err) { throw new Error(inflate.err); } - * - * console.log(inflate.result); - * ``` - **/ -function Inflate(options) { - if (!(this instanceof Inflate)) return new Inflate(options); - - this.options = utils.assign({ - chunkSize: 16384, - windowBits: 0, - to: '' - }, options || {}); - - var opt = this.options; - - // Force window size for `raw` data, if not set directly, - // because we have no header for autodetect. - if (opt.raw && (opt.windowBits >= 0) && (opt.windowBits < 16)) { - opt.windowBits = -opt.windowBits; - if (opt.windowBits === 0) { opt.windowBits = -15; } - } - - // If `windowBits` not defined (and mode not raw) - set autodetect flag for gzip/deflate - if ((opt.windowBits >= 0) && (opt.windowBits < 16) && - !(options && options.windowBits)) { - opt.windowBits += 32; - } - - // Gzip header has no info about windows size, we can do autodetect only - // for deflate. So, if window size not set, force it to max when gzip possible - if ((opt.windowBits > 15) && (opt.windowBits < 48)) { - // bit 3 (16) -> gzipped data - // bit 4 (32) -> autodetect gzip/deflate - if ((opt.windowBits & 15) === 0) { - opt.windowBits |= 15; - } - } - - this.err = 0; // error code, if happens (0 = Z_OK) - this.msg = ''; // error message - this.ended = false; // used to avoid multiple onEnd() calls - this.chunks = []; // chunks of compressed data - - this.strm = new ZStream(); - this.strm.avail_out = 0; - - var status = zlib_inflate.inflateInit2( - this.strm, - opt.windowBits - ); - - if (status !== c.Z_OK) { - throw new Error(msg[status]); - } - - this.header = new GZheader(); - - zlib_inflate.inflateGetHeader(this.strm, this.header); -} - -/** - * Inflate#push(data[, mode]) -> Boolean - * - data (Uint8Array|Array|ArrayBuffer|String): input data - * - mode (Number|Boolean): 0..6 for corresponding Z_NO_FLUSH..Z_TREE modes. - * See constants. Skipped or `false` means Z_NO_FLUSH, `true` meansh Z_FINISH. - * - * Sends input data to inflate pipe, generating [[Inflate#onData]] calls with - * new output chunks. Returns `true` on success. The last data block must have - * mode Z_FINISH (or `true`). That will flush internal pending buffers and call - * [[Inflate#onEnd]]. For interim explicit flushes (without ending the stream) you - * can use mode Z_SYNC_FLUSH, keeping the decompression context. - * - * On fail call [[Inflate#onEnd]] with error code and return false. - * - * We strongly recommend to use `Uint8Array` on input for best speed (output - * format is detected automatically). Also, don't skip last param and always - * use the same type in your code (boolean or number). That will improve JS speed. - * - * For regular `Array`-s make sure all elements are [0..255]. - * - * ##### Example - * - * ```javascript - * push(chunk, false); // push one of data chunks - * ... - * push(chunk, true); // push last chunk - * ``` - **/ -Inflate.prototype.push = function (data, mode) { - var strm = this.strm; - var chunkSize = this.options.chunkSize; - var dictionary = this.options.dictionary; - var status, _mode; - var next_out_utf8, tail, utf8str; - var dict; - - // Flag to properly process Z_BUF_ERROR on testing inflate call - // when we check that all output data was flushed. - var allowBufError = false; - - if (this.ended) { return false; } - _mode = (mode === ~~mode) ? mode : ((mode === true) ? c.Z_FINISH : c.Z_NO_FLUSH); - - // Convert data if needed - if (typeof data === 'string') { - // Only binary strings can be decompressed on practice - strm.input = strings.binstring2buf(data); - } else if (toString.call(data) === '[object ArrayBuffer]') { - strm.input = new Uint8Array(data); - } else { - strm.input = data; - } - - strm.next_in = 0; - strm.avail_in = strm.input.length; - - do { - if (strm.avail_out === 0) { - strm.output = new utils.Buf8(chunkSize); - strm.next_out = 0; - strm.avail_out = chunkSize; - } - - status = zlib_inflate.inflate(strm, c.Z_NO_FLUSH); /* no bad return value */ - - if (status === c.Z_NEED_DICT && dictionary) { - // Convert data if needed - if (typeof dictionary === 'string') { - dict = strings.string2buf(dictionary); - } else if (toString.call(dictionary) === '[object ArrayBuffer]') { - dict = new Uint8Array(dictionary); - } else { - dict = dictionary; - } - - status = zlib_inflate.inflateSetDictionary(this.strm, dict); - - } - - if (status === c.Z_BUF_ERROR && allowBufError === true) { - status = c.Z_OK; - allowBufError = false; - } - - if (status !== c.Z_STREAM_END && status !== c.Z_OK) { - this.onEnd(status); - this.ended = true; - return false; - } - - if (strm.next_out) { - if (strm.avail_out === 0 || status === c.Z_STREAM_END || (strm.avail_in === 0 && (_mode === c.Z_FINISH || _mode === c.Z_SYNC_FLUSH))) { - - if (this.options.to === 'string') { - - next_out_utf8 = strings.utf8border(strm.output, strm.next_out); - - tail = strm.next_out - next_out_utf8; - utf8str = strings.buf2string(strm.output, next_out_utf8); - - // move tail - strm.next_out = tail; - strm.avail_out = chunkSize - tail; - if (tail) { utils.arraySet(strm.output, strm.output, next_out_utf8, tail, 0); } - - this.onData(utf8str); - - } else { - this.onData(utils.shrinkBuf(strm.output, strm.next_out)); - } - } - } - - // When no more input data, we should check that internal inflate buffers - // are flushed. The only way to do it when avail_out = 0 - run one more - // inflate pass. But if output data not exists, inflate return Z_BUF_ERROR. - // Here we set flag to process this error properly. - // - // NOTE. Deflate does not return error in this case and does not needs such - // logic. - if (strm.avail_in === 0 && strm.avail_out === 0) { - allowBufError = true; - } - - } while ((strm.avail_in > 0 || strm.avail_out === 0) && status !== c.Z_STREAM_END); - - if (status === c.Z_STREAM_END) { - _mode = c.Z_FINISH; - } - - // Finalize on the last chunk. - if (_mode === c.Z_FINISH) { - status = zlib_inflate.inflateEnd(this.strm); - this.onEnd(status); - this.ended = true; - return status === c.Z_OK; - } - - // callback interim results if Z_SYNC_FLUSH. - if (_mode === c.Z_SYNC_FLUSH) { - this.onEnd(c.Z_OK); - strm.avail_out = 0; - return true; - } - - return true; -}; - - -/** - * Inflate#onData(chunk) -> Void - * - chunk (Uint8Array|Array|String): ouput data. Type of array depends - * on js engine support. When string output requested, each chunk - * will be string. - * - * By default, stores data blocks in `chunks[]` property and glue - * those in `onEnd`. Override this handler, if you need another behaviour. - **/ -Inflate.prototype.onData = function (chunk) { - this.chunks.push(chunk); -}; - - -/** - * Inflate#onEnd(status) -> Void - * - status (Number): inflate status. 0 (Z_OK) on success, - * other if not. - * - * Called either after you tell inflate that the input stream is - * complete (Z_FINISH) or should be flushed (Z_SYNC_FLUSH) - * or if an error happened. By default - join collected chunks, - * free memory and fill `results` / `err` properties. - **/ -Inflate.prototype.onEnd = function (status) { - // On success - join - if (status === c.Z_OK) { - if (this.options.to === 'string') { - // Glue & convert here, until we teach pako to send - // utf8 alligned strings to onData - this.result = this.chunks.join(''); - } else { - this.result = utils.flattenChunks(this.chunks); - } - } - this.chunks = []; - this.err = status; - this.msg = this.strm.msg; -}; - - -/** - * inflate(data[, options]) -> Uint8Array|Array|String - * - data (Uint8Array|Array|String): input data to decompress. - * - options (Object): zlib inflate options. - * - * Decompress `data` with inflate/ungzip and `options`. Autodetect - * format via wrapper header by default. That's why we don't provide - * separate `ungzip` method. - * - * Supported options are: - * - * - windowBits - * - * [http://zlib.net/manual.html#Advanced](http://zlib.net/manual.html#Advanced) - * for more information. - * - * Sugar (options): - * - * - `raw` (Boolean) - say that we work with raw stream, if you don't wish to specify - * negative windowBits implicitly. - * - `to` (String) - if equal to 'string', then result will be converted - * from utf8 to utf16 (javascript) string. When string output requested, - * chunk length can differ from `chunkSize`, depending on content. - * - * - * ##### Example: - * - * ```javascript - * var pako = require('pako') - * , input = pako.deflate([1,2,3,4,5,6,7,8,9]) - * , output; - * - * try { - * output = pako.inflate(input); - * } catch (err) - * console.log(err); - * } - * ``` - **/ -function inflate(input, options) { - var inflator = new Inflate(options); - - inflator.push(input, true); - - // That will never happens, if you don't cheat with options :) - if (inflator.err) { throw inflator.msg; } - - return inflator.result; -} - - -/** - * inflateRaw(data[, options]) -> Uint8Array|Array|String - * - data (Uint8Array|Array|String): input data to decompress. - * - options (Object): zlib inflate options. - * - * The same as [[inflate]], but creates raw data, without wrapper - * (header and adler32 crc). - **/ -function inflateRaw(input, options) { - options = options || {}; - options.raw = true; - return inflate(input, options); -} - - -/** - * ungzip(data[, options]) -> Uint8Array|Array|String - * - data (Uint8Array|Array|String): input data to decompress. - * - options (Object): zlib inflate options. - * - * Just shortcut to [[inflate]], because it autodetects format - * by header.content. Done for convenience. - **/ - - -exports.Inflate = Inflate; -exports.inflate = inflate; -exports.inflateRaw = inflateRaw; -exports.ungzip = inflate; - -},{"./utils/common":3,"./utils/strings":4,"./zlib/constants":6,"./zlib/gzheader":9,"./zlib/inflate":11,"./zlib/messages":13,"./zlib/zstream":15}],3:[function(require,module,exports){ -'use strict'; - - -var TYPED_OK = (typeof Uint8Array !== 'undefined') && - (typeof Uint16Array !== 'undefined') && - (typeof Int32Array !== 'undefined'); - - -exports.assign = function (obj /*from1, from2, from3, ...*/) { - var sources = Array.prototype.slice.call(arguments, 1); - while (sources.length) { - var source = sources.shift(); - if (!source) { continue; } - - if (typeof source !== 'object') { - throw new TypeError(source + 'must be non-object'); - } - - for (var p in source) { - if (source.hasOwnProperty(p)) { - obj[p] = source[p]; - } - } - } - - return obj; -}; - - -// reduce buffer size, avoiding mem copy -exports.shrinkBuf = function (buf, size) { - if (buf.length === size) { return buf; } - if (buf.subarray) { return buf.subarray(0, size); } - buf.length = size; - return buf; -}; - - -var fnTyped = { - arraySet: function (dest, src, src_offs, len, dest_offs) { - if (src.subarray && dest.subarray) { - dest.set(src.subarray(src_offs, src_offs + len), dest_offs); - return; - } - // Fallback to ordinary array - for (var i = 0; i < len; i++) { - dest[dest_offs + i] = src[src_offs + i]; - } - }, - // Join array of chunks to single array. - flattenChunks: function (chunks) { - var i, l, len, pos, chunk, result; - - // calculate data length - len = 0; - for (i = 0, l = chunks.length; i < l; i++) { - len += chunks[i].length; - } - - // join chunks - result = new Uint8Array(len); - pos = 0; - for (i = 0, l = chunks.length; i < l; i++) { - chunk = chunks[i]; - result.set(chunk, pos); - pos += chunk.length; - } - - return result; - } -}; - -var fnUntyped = { - arraySet: function (dest, src, src_offs, len, dest_offs) { - for (var i = 0; i < len; i++) { - dest[dest_offs + i] = src[src_offs + i]; - } - }, - // Join array of chunks to single array. - flattenChunks: function (chunks) { - return [].concat.apply([], chunks); - } -}; - - -// Enable/Disable typed arrays use, for testing -// -exports.setTyped = function (on) { - if (on) { - exports.Buf8 = Uint8Array; - exports.Buf16 = Uint16Array; - exports.Buf32 = Int32Array; - exports.assign(exports, fnTyped); - } else { - exports.Buf8 = Array; - exports.Buf16 = Array; - exports.Buf32 = Array; - exports.assign(exports, fnUntyped); - } -}; - -exports.setTyped(TYPED_OK); - -},{}],4:[function(require,module,exports){ -// String encode/decode helpers -'use strict'; - - -var utils = require('./common'); - - -// Quick check if we can use fast array to bin string conversion -// -// - apply(Array) can fail on Android 2.2 -// - apply(Uint8Array) can fail on iOS 5.1 Safary -// -var STR_APPLY_OK = true; -var STR_APPLY_UIA_OK = true; - -try { String.fromCharCode.apply(null, [ 0 ]); } catch (__) { STR_APPLY_OK = false; } -try { String.fromCharCode.apply(null, new Uint8Array(1)); } catch (__) { STR_APPLY_UIA_OK = false; } - - -// Table with utf8 lengths (calculated by first byte of sequence) -// Note, that 5 & 6-byte values and some 4-byte values can not be represented in JS, -// because max possible codepoint is 0x10ffff -var _utf8len = new utils.Buf8(256); -for (var q = 0; q < 256; q++) { - _utf8len[q] = (q >= 252 ? 6 : q >= 248 ? 5 : q >= 240 ? 4 : q >= 224 ? 3 : q >= 192 ? 2 : 1); -} -_utf8len[254] = _utf8len[254] = 1; // Invalid sequence start - - -// convert string to array (typed, when possible) -exports.string2buf = function (str) { - var buf, c, c2, m_pos, i, str_len = str.length, buf_len = 0; - - // count binary size - for (m_pos = 0; m_pos < str_len; m_pos++) { - c = str.charCodeAt(m_pos); - if ((c & 0xfc00) === 0xd800 && (m_pos + 1 < str_len)) { - c2 = str.charCodeAt(m_pos + 1); - if ((c2 & 0xfc00) === 0xdc00) { - c = 0x10000 + ((c - 0xd800) << 10) + (c2 - 0xdc00); - m_pos++; - } - } - buf_len += c < 0x80 ? 1 : c < 0x800 ? 2 : c < 0x10000 ? 3 : 4; - } - - // allocate buffer - buf = new utils.Buf8(buf_len); - - // convert - for (i = 0, m_pos = 0; i < buf_len; m_pos++) { - c = str.charCodeAt(m_pos); - if ((c & 0xfc00) === 0xd800 && (m_pos + 1 < str_len)) { - c2 = str.charCodeAt(m_pos + 1); - if ((c2 & 0xfc00) === 0xdc00) { - c = 0x10000 + ((c - 0xd800) << 10) + (c2 - 0xdc00); - m_pos++; - } - } - if (c < 0x80) { - /* one byte */ - buf[i++] = c; - } else if (c < 0x800) { - /* two bytes */ - buf[i++] = 0xC0 | (c >>> 6); - buf[i++] = 0x80 | (c & 0x3f); - } else if (c < 0x10000) { - /* three bytes */ - buf[i++] = 0xE0 | (c >>> 12); - buf[i++] = 0x80 | (c >>> 6 & 0x3f); - buf[i++] = 0x80 | (c & 0x3f); - } else { - /* four bytes */ - buf[i++] = 0xf0 | (c >>> 18); - buf[i++] = 0x80 | (c >>> 12 & 0x3f); - buf[i++] = 0x80 | (c >>> 6 & 0x3f); - buf[i++] = 0x80 | (c & 0x3f); - } - } - - return buf; -}; - -// Helper (used in 2 places) -function buf2binstring(buf, len) { - // use fallback for big arrays to avoid stack overflow - if (len < 65537) { - if ((buf.subarray && STR_APPLY_UIA_OK) || (!buf.subarray && STR_APPLY_OK)) { - return String.fromCharCode.apply(null, utils.shrinkBuf(buf, len)); - } - } - - var result = ''; - for (var i = 0; i < len; i++) { - result += String.fromCharCode(buf[i]); - } - return result; -} - - -// Convert byte array to binary string -exports.buf2binstring = function (buf) { - return buf2binstring(buf, buf.length); -}; - - -// Convert binary string (typed, when possible) -exports.binstring2buf = function (str) { - var buf = new utils.Buf8(str.length); - for (var i = 0, len = buf.length; i < len; i++) { - buf[i] = str.charCodeAt(i); - } - return buf; -}; - - -// convert array to string -exports.buf2string = function (buf, max) { - var i, out, c, c_len; - var len = max || buf.length; - - // Reserve max possible length (2 words per char) - // NB: by unknown reasons, Array is significantly faster for - // String.fromCharCode.apply than Uint16Array. - var utf16buf = new Array(len * 2); - - for (out = 0, i = 0; i < len;) { - c = buf[i++]; - // quick process ascii - if (c < 0x80) { utf16buf[out++] = c; continue; } - - c_len = _utf8len[c]; - // skip 5 & 6 byte codes - if (c_len > 4) { utf16buf[out++] = 0xfffd; i += c_len - 1; continue; } - - // apply mask on first byte - c &= c_len === 2 ? 0x1f : c_len === 3 ? 0x0f : 0x07; - // join the rest - while (c_len > 1 && i < len) { - c = (c << 6) | (buf[i++] & 0x3f); - c_len--; - } - - // terminated by end of string? - if (c_len > 1) { utf16buf[out++] = 0xfffd; continue; } - - if (c < 0x10000) { - utf16buf[out++] = c; - } else { - c -= 0x10000; - utf16buf[out++] = 0xd800 | ((c >> 10) & 0x3ff); - utf16buf[out++] = 0xdc00 | (c & 0x3ff); - } - } - - return buf2binstring(utf16buf, out); -}; - - -// Calculate max possible position in utf8 buffer, -// that will not break sequence. If that's not possible -// - (very small limits) return max size as is. -// -// buf[] - utf8 bytes array -// max - length limit (mandatory); -exports.utf8border = function (buf, max) { - var pos; - - max = max || buf.length; - if (max > buf.length) { max = buf.length; } - - // go back from last position, until start of sequence found - pos = max - 1; - while (pos >= 0 && (buf[pos] & 0xC0) === 0x80) { pos--; } - - // Fuckup - very small and broken sequence, - // return max, because we should return something anyway. - if (pos < 0) { return max; } - - // If we came to start of buffer - that means vuffer is too small, - // return max too. - if (pos === 0) { return max; } - - return (pos + _utf8len[buf[pos]] > max) ? pos : max; -}; - -},{"./common":3}],5:[function(require,module,exports){ -'use strict'; - -// Note: adler32 takes 12% for level 0 and 2% for level 6. -// It doesn't worth to make additional optimizationa as in original. -// Small size is preferable. - -function adler32(adler, buf, len, pos) { - var s1 = (adler & 0xffff) |0, - s2 = ((adler >>> 16) & 0xffff) |0, - n = 0; - - while (len !== 0) { - // Set limit ~ twice less than 5552, to keep - // s2 in 31-bits, because we force signed ints. - // in other case %= will fail. - n = len > 2000 ? 2000 : len; - len -= n; - - do { - s1 = (s1 + buf[pos++]) |0; - s2 = (s2 + s1) |0; - } while (--n); - - s1 %= 65521; - s2 %= 65521; - } - - return (s1 | (s2 << 16)) |0; -} - - -module.exports = adler32; - -},{}],6:[function(require,module,exports){ -'use strict'; - - -module.exports = { - - /* Allowed flush values; see deflate() and inflate() below for details */ - Z_NO_FLUSH: 0, - Z_PARTIAL_FLUSH: 1, - Z_SYNC_FLUSH: 2, - Z_FULL_FLUSH: 3, - Z_FINISH: 4, - Z_BLOCK: 5, - Z_TREES: 6, - - /* Return codes for the compression/decompression functions. Negative values - * are errors, positive values are used for special but normal events. - */ - Z_OK: 0, - Z_STREAM_END: 1, - Z_NEED_DICT: 2, - Z_ERRNO: -1, - Z_STREAM_ERROR: -2, - Z_DATA_ERROR: -3, - //Z_MEM_ERROR: -4, - Z_BUF_ERROR: -5, - //Z_VERSION_ERROR: -6, - - /* compression levels */ - Z_NO_COMPRESSION: 0, - Z_BEST_SPEED: 1, - Z_BEST_COMPRESSION: 9, - Z_DEFAULT_COMPRESSION: -1, - - - Z_FILTERED: 1, - Z_HUFFMAN_ONLY: 2, - Z_RLE: 3, - Z_FIXED: 4, - Z_DEFAULT_STRATEGY: 0, - - /* Possible values of the data_type field (though see inflate()) */ - Z_BINARY: 0, - Z_TEXT: 1, - //Z_ASCII: 1, // = Z_TEXT (deprecated) - Z_UNKNOWN: 2, - - /* The deflate compression method */ - Z_DEFLATED: 8 - //Z_NULL: null // Use -1 or null inline, depending on var type -}; - -},{}],7:[function(require,module,exports){ -'use strict'; - -// Note: we can't get significant speed boost here. -// So write code to minimize size - no pregenerated tables -// and array tools dependencies. - - -// Use ordinary array, since untyped makes no boost here -function makeTable() { - var c, table = []; - - for (var n = 0; n < 256; n++) { - c = n; - for (var k = 0; k < 8; k++) { - c = ((c & 1) ? (0xEDB88320 ^ (c >>> 1)) : (c >>> 1)); - } - table[n] = c; - } - - return table; -} - -// Create table on load. Just 255 signed longs. Not a problem. -var crcTable = makeTable(); - - -function crc32(crc, buf, len, pos) { - var t = crcTable, - end = pos + len; - - crc ^= -1; - - for (var i = pos; i < end; i++) { - crc = (crc >>> 8) ^ t[(crc ^ buf[i]) & 0xFF]; - } - - return (crc ^ (-1)); // >>> 0; -} - - -module.exports = crc32; - -},{}],8:[function(require,module,exports){ -'use strict'; - -var utils = require('../utils/common'); -var trees = require('./trees'); -var adler32 = require('./adler32'); -var crc32 = require('./crc32'); -var msg = require('./messages'); - -/* Public constants ==========================================================*/ -/* ===========================================================================*/ - - -/* Allowed flush values; see deflate() and inflate() below for details */ -var Z_NO_FLUSH = 0; -var Z_PARTIAL_FLUSH = 1; -//var Z_SYNC_FLUSH = 2; -var Z_FULL_FLUSH = 3; -var Z_FINISH = 4; -var Z_BLOCK = 5; -//var Z_TREES = 6; - - -/* Return codes for the compression/decompression functions. Negative values - * are errors, positive values are used for special but normal events. - */ -var Z_OK = 0; -var Z_STREAM_END = 1; -//var Z_NEED_DICT = 2; -//var Z_ERRNO = -1; -var Z_STREAM_ERROR = -2; -var Z_DATA_ERROR = -3; -//var Z_MEM_ERROR = -4; -var Z_BUF_ERROR = -5; -//var Z_VERSION_ERROR = -6; - - -/* compression levels */ -//var Z_NO_COMPRESSION = 0; -//var Z_BEST_SPEED = 1; -//var Z_BEST_COMPRESSION = 9; -var Z_DEFAULT_COMPRESSION = -1; - - -var Z_FILTERED = 1; -var Z_HUFFMAN_ONLY = 2; -var Z_RLE = 3; -var Z_FIXED = 4; -var Z_DEFAULT_STRATEGY = 0; - -/* Possible values of the data_type field (though see inflate()) */ -//var Z_BINARY = 0; -//var Z_TEXT = 1; -//var Z_ASCII = 1; // = Z_TEXT -var Z_UNKNOWN = 2; - - -/* The deflate compression method */ -var Z_DEFLATED = 8; - -/*============================================================================*/ - - -var MAX_MEM_LEVEL = 9; -/* Maximum value for memLevel in deflateInit2 */ -var MAX_WBITS = 15; -/* 32K LZ77 window */ -var DEF_MEM_LEVEL = 8; - - -var LENGTH_CODES = 29; -/* number of length codes, not counting the special END_BLOCK code */ -var LITERALS = 256; -/* number of literal bytes 0..255 */ -var L_CODES = LITERALS + 1 + LENGTH_CODES; -/* number of Literal or Length codes, including the END_BLOCK code */ -var D_CODES = 30; -/* number of distance codes */ -var BL_CODES = 19; -/* number of codes used to transfer the bit lengths */ -var HEAP_SIZE = 2 * L_CODES + 1; -/* maximum heap size */ -var MAX_BITS = 15; -/* All codes must not exceed MAX_BITS bits */ - -var MIN_MATCH = 3; -var MAX_MATCH = 258; -var MIN_LOOKAHEAD = (MAX_MATCH + MIN_MATCH + 1); - -var PRESET_DICT = 0x20; - -var INIT_STATE = 42; -var EXTRA_STATE = 69; -var NAME_STATE = 73; -var COMMENT_STATE = 91; -var HCRC_STATE = 103; -var BUSY_STATE = 113; -var FINISH_STATE = 666; - -var BS_NEED_MORE = 1; /* block not completed, need more input or more output */ -var BS_BLOCK_DONE = 2; /* block flush performed */ -var BS_FINISH_STARTED = 3; /* finish started, need only more output at next deflate */ -var BS_FINISH_DONE = 4; /* finish done, accept no more input or output */ - -var OS_CODE = 0x03; // Unix :) . Don't detect, use this default. - -function err(strm, errorCode) { - strm.msg = msg[errorCode]; - return errorCode; -} - -function rank(f) { - return ((f) << 1) - ((f) > 4 ? 9 : 0); -} - -function zero(buf) { var len = buf.length; while (--len >= 0) { buf[len] = 0; } } - - -/* ========================================================================= - * Flush as much pending output as possible. All deflate() output goes - * through this function so some applications may wish to modify it - * to avoid allocating a large strm->output buffer and copying into it. - * (See also read_buf()). - */ -function flush_pending(strm) { - var s = strm.state; - - //_tr_flush_bits(s); - var len = s.pending; - if (len > strm.avail_out) { - len = strm.avail_out; - } - if (len === 0) { return; } - - utils.arraySet(strm.output, s.pending_buf, s.pending_out, len, strm.next_out); - strm.next_out += len; - s.pending_out += len; - strm.total_out += len; - strm.avail_out -= len; - s.pending -= len; - if (s.pending === 0) { - s.pending_out = 0; - } -} - - -function flush_block_only(s, last) { - trees._tr_flush_block(s, (s.block_start >= 0 ? s.block_start : -1), s.strstart - s.block_start, last); - s.block_start = s.strstart; - flush_pending(s.strm); -} - - -function put_byte(s, b) { - s.pending_buf[s.pending++] = b; -} - - -/* ========================================================================= - * Put a short in the pending buffer. The 16-bit value is put in MSB order. - * IN assertion: the stream state is correct and there is enough room in - * pending_buf. - */ -function putShortMSB(s, b) { -// put_byte(s, (Byte)(b >> 8)); -// put_byte(s, (Byte)(b & 0xff)); - s.pending_buf[s.pending++] = (b >>> 8) & 0xff; - s.pending_buf[s.pending++] = b & 0xff; -} - - -/* =========================================================================== - * Read a new buffer from the current input stream, update the adler32 - * and total number of bytes read. All deflate() input goes through - * this function so some applications may wish to modify it to avoid - * allocating a large strm->input buffer and copying from it. - * (See also flush_pending()). - */ -function read_buf(strm, buf, start, size) { - var len = strm.avail_in; - - if (len > size) { len = size; } - if (len === 0) { return 0; } - - strm.avail_in -= len; - - // zmemcpy(buf, strm->next_in, len); - utils.arraySet(buf, strm.input, strm.next_in, len, start); - if (strm.state.wrap === 1) { - strm.adler = adler32(strm.adler, buf, len, start); - } - - else if (strm.state.wrap === 2) { - strm.adler = crc32(strm.adler, buf, len, start); - } - - strm.next_in += len; - strm.total_in += len; - - return len; -} - - -/* =========================================================================== - * Set match_start to the longest match starting at the given string and - * return its length. Matches shorter or equal to prev_length are discarded, - * in which case the result is equal to prev_length and match_start is - * garbage. - * IN assertions: cur_match is the head of the hash chain for the current - * string (strstart) and its distance is <= MAX_DIST, and prev_length >= 1 - * OUT assertion: the match length is not greater than s->lookahead. - */ -function longest_match(s, cur_match) { - var chain_length = s.max_chain_length; /* max hash chain length */ - var scan = s.strstart; /* current string */ - var match; /* matched string */ - var len; /* length of current match */ - var best_len = s.prev_length; /* best match length so far */ - var nice_match = s.nice_match; /* stop if match long enough */ - var limit = (s.strstart > (s.w_size - MIN_LOOKAHEAD)) ? - s.strstart - (s.w_size - MIN_LOOKAHEAD) : 0/*NIL*/; - - var _win = s.window; // shortcut - - var wmask = s.w_mask; - var prev = s.prev; - - /* Stop when cur_match becomes <= limit. To simplify the code, - * we prevent matches with the string of window index 0. - */ - - var strend = s.strstart + MAX_MATCH; - var scan_end1 = _win[scan + best_len - 1]; - var scan_end = _win[scan + best_len]; - - /* The code is optimized for HASH_BITS >= 8 and MAX_MATCH-2 multiple of 16. - * It is easy to get rid of this optimization if necessary. - */ - // Assert(s->hash_bits >= 8 && MAX_MATCH == 258, "Code too clever"); - - /* Do not waste too much time if we already have a good match: */ - if (s.prev_length >= s.good_match) { - chain_length >>= 2; - } - /* Do not look for matches beyond the end of the input. This is necessary - * to make deflate deterministic. - */ - if (nice_match > s.lookahead) { nice_match = s.lookahead; } - - // Assert((ulg)s->strstart <= s->window_size-MIN_LOOKAHEAD, "need lookahead"); - - do { - // Assert(cur_match < s->strstart, "no future"); - match = cur_match; - - /* Skip to next match if the match length cannot increase - * or if the match length is less than 2. Note that the checks below - * for insufficient lookahead only occur occasionally for performance - * reasons. Therefore uninitialized memory will be accessed, and - * conditional jumps will be made that depend on those values. - * However the length of the match is limited to the lookahead, so - * the output of deflate is not affected by the uninitialized values. - */ - - if (_win[match + best_len] !== scan_end || - _win[match + best_len - 1] !== scan_end1 || - _win[match] !== _win[scan] || - _win[++match] !== _win[scan + 1]) { - continue; - } - - /* The check at best_len-1 can be removed because it will be made - * again later. (This heuristic is not always a win.) - * It is not necessary to compare scan[2] and match[2] since they - * are always equal when the other bytes match, given that - * the hash keys are equal and that HASH_BITS >= 8. - */ - scan += 2; - match++; - // Assert(*scan == *match, "match[2]?"); - - /* We check for insufficient lookahead only every 8th comparison; - * the 256th check will be made at strstart+258. - */ - do { - /*jshint noempty:false*/ - } while (_win[++scan] === _win[++match] && _win[++scan] === _win[++match] && - _win[++scan] === _win[++match] && _win[++scan] === _win[++match] && - _win[++scan] === _win[++match] && _win[++scan] === _win[++match] && - _win[++scan] === _win[++match] && _win[++scan] === _win[++match] && - scan < strend); - - // Assert(scan <= s->window+(unsigned)(s->window_size-1), "wild scan"); - - len = MAX_MATCH - (strend - scan); - scan = strend - MAX_MATCH; - - if (len > best_len) { - s.match_start = cur_match; - best_len = len; - if (len >= nice_match) { - break; - } - scan_end1 = _win[scan + best_len - 1]; - scan_end = _win[scan + best_len]; - } - } while ((cur_match = prev[cur_match & wmask]) > limit && --chain_length !== 0); - - if (best_len <= s.lookahead) { - return best_len; - } - return s.lookahead; -} - - -/* =========================================================================== - * Fill the window when the lookahead becomes insufficient. - * Updates strstart and lookahead. - * - * IN assertion: lookahead < MIN_LOOKAHEAD - * OUT assertions: strstart <= window_size-MIN_LOOKAHEAD - * At least one byte has been read, or avail_in == 0; reads are - * performed for at least two bytes (required for the zip translate_eol - * option -- not supported here). - */ -function fill_window(s) { - var _w_size = s.w_size; - var p, n, m, more, str; - - //Assert(s->lookahead < MIN_LOOKAHEAD, "already enough lookahead"); - - do { - more = s.window_size - s.lookahead - s.strstart; - - // JS ints have 32 bit, block below not needed - /* Deal with !@#$% 64K limit: */ - //if (sizeof(int) <= 2) { - // if (more == 0 && s->strstart == 0 && s->lookahead == 0) { - // more = wsize; - // - // } else if (more == (unsigned)(-1)) { - // /* Very unlikely, but possible on 16 bit machine if - // * strstart == 0 && lookahead == 1 (input done a byte at time) - // */ - // more--; - // } - //} - - - /* If the window is almost full and there is insufficient lookahead, - * move the upper half to the lower one to make room in the upper half. - */ - if (s.strstart >= _w_size + (_w_size - MIN_LOOKAHEAD)) { - - utils.arraySet(s.window, s.window, _w_size, _w_size, 0); - s.match_start -= _w_size; - s.strstart -= _w_size; - /* we now have strstart >= MAX_DIST */ - s.block_start -= _w_size; - - /* Slide the hash table (could be avoided with 32 bit values - at the expense of memory usage). We slide even when level == 0 - to keep the hash table consistent if we switch back to level > 0 - later. (Using level 0 permanently is not an optimal usage of - zlib, so we don't care about this pathological case.) - */ - - n = s.hash_size; - p = n; - do { - m = s.head[--p]; - s.head[p] = (m >= _w_size ? m - _w_size : 0); - } while (--n); - - n = _w_size; - p = n; - do { - m = s.prev[--p]; - s.prev[p] = (m >= _w_size ? m - _w_size : 0); - /* If n is not on any hash chain, prev[n] is garbage but - * its value will never be used. - */ - } while (--n); - - more += _w_size; - } - if (s.strm.avail_in === 0) { - break; - } - - /* If there was no sliding: - * strstart <= WSIZE+MAX_DIST-1 && lookahead <= MIN_LOOKAHEAD - 1 && - * more == window_size - lookahead - strstart - * => more >= window_size - (MIN_LOOKAHEAD-1 + WSIZE + MAX_DIST-1) - * => more >= window_size - 2*WSIZE + 2 - * In the BIG_MEM or MMAP case (not yet supported), - * window_size == input_size + MIN_LOOKAHEAD && - * strstart + s->lookahead <= input_size => more >= MIN_LOOKAHEAD. - * Otherwise, window_size == 2*WSIZE so more >= 2. - * If there was sliding, more >= WSIZE. So in all cases, more >= 2. - */ - //Assert(more >= 2, "more < 2"); - n = read_buf(s.strm, s.window, s.strstart + s.lookahead, more); - s.lookahead += n; - - /* Initialize the hash value now that we have some input: */ - if (s.lookahead + s.insert >= MIN_MATCH) { - str = s.strstart - s.insert; - s.ins_h = s.window[str]; - - /* UPDATE_HASH(s, s->ins_h, s->window[str + 1]); */ - s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[str + 1]) & s.hash_mask; -//#if MIN_MATCH != 3 -// Call update_hash() MIN_MATCH-3 more times -//#endif - while (s.insert) { - /* UPDATE_HASH(s, s->ins_h, s->window[str + MIN_MATCH-1]); */ - s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[str + MIN_MATCH - 1]) & s.hash_mask; - - s.prev[str & s.w_mask] = s.head[s.ins_h]; - s.head[s.ins_h] = str; - str++; - s.insert--; - if (s.lookahead + s.insert < MIN_MATCH) { - break; - } - } - } - /* If the whole input has less than MIN_MATCH bytes, ins_h is garbage, - * but this is not important since only literal bytes will be emitted. - */ - - } while (s.lookahead < MIN_LOOKAHEAD && s.strm.avail_in !== 0); - - /* If the WIN_INIT bytes after the end of the current data have never been - * written, then zero those bytes in order to avoid memory check reports of - * the use of uninitialized (or uninitialised as Julian writes) bytes by - * the longest match routines. Update the high water mark for the next - * time through here. WIN_INIT is set to MAX_MATCH since the longest match - * routines allow scanning to strstart + MAX_MATCH, ignoring lookahead. - */ -// if (s.high_water < s.window_size) { -// var curr = s.strstart + s.lookahead; -// var init = 0; -// -// if (s.high_water < curr) { -// /* Previous high water mark below current data -- zero WIN_INIT -// * bytes or up to end of window, whichever is less. -// */ -// init = s.window_size - curr; -// if (init > WIN_INIT) -// init = WIN_INIT; -// zmemzero(s->window + curr, (unsigned)init); -// s->high_water = curr + init; -// } -// else if (s->high_water < (ulg)curr + WIN_INIT) { -// /* High water mark at or above current data, but below current data -// * plus WIN_INIT -- zero out to current data plus WIN_INIT, or up -// * to end of window, whichever is less. -// */ -// init = (ulg)curr + WIN_INIT - s->high_water; -// if (init > s->window_size - s->high_water) -// init = s->window_size - s->high_water; -// zmemzero(s->window + s->high_water, (unsigned)init); -// s->high_water += init; -// } -// } -// -// Assert((ulg)s->strstart <= s->window_size - MIN_LOOKAHEAD, -// "not enough room for search"); -} - -/* =========================================================================== - * Copy without compression as much as possible from the input stream, return - * the current block state. - * This function does not insert new strings in the dictionary since - * uncompressible data is probably not useful. This function is used - * only for the level=0 compression option. - * NOTE: this function should be optimized to avoid extra copying from - * window to pending_buf. - */ -function deflate_stored(s, flush) { - /* Stored blocks are limited to 0xffff bytes, pending_buf is limited - * to pending_buf_size, and each stored block has a 5 byte header: - */ - var max_block_size = 0xffff; - - if (max_block_size > s.pending_buf_size - 5) { - max_block_size = s.pending_buf_size - 5; - } - - /* Copy as much as possible from input to output: */ - for (;;) { - /* Fill the window as much as possible: */ - if (s.lookahead <= 1) { - - //Assert(s->strstart < s->w_size+MAX_DIST(s) || - // s->block_start >= (long)s->w_size, "slide too late"); -// if (!(s.strstart < s.w_size + (s.w_size - MIN_LOOKAHEAD) || -// s.block_start >= s.w_size)) { -// throw new Error("slide too late"); -// } - - fill_window(s); - if (s.lookahead === 0 && flush === Z_NO_FLUSH) { - return BS_NEED_MORE; - } - - if (s.lookahead === 0) { - break; - } - /* flush the current block */ - } - //Assert(s->block_start >= 0L, "block gone"); -// if (s.block_start < 0) throw new Error("block gone"); - - s.strstart += s.lookahead; - s.lookahead = 0; - - /* Emit a stored block if pending_buf will be full: */ - var max_start = s.block_start + max_block_size; - - if (s.strstart === 0 || s.strstart >= max_start) { - /* strstart == 0 is possible when wraparound on 16-bit machine */ - s.lookahead = s.strstart - max_start; - s.strstart = max_start; - /*** FLUSH_BLOCK(s, 0); ***/ - flush_block_only(s, false); - if (s.strm.avail_out === 0) { - return BS_NEED_MORE; - } - /***/ - - - } - /* Flush if we may have to slide, otherwise block_start may become - * negative and the data will be gone: - */ - if (s.strstart - s.block_start >= (s.w_size - MIN_LOOKAHEAD)) { - /*** FLUSH_BLOCK(s, 0); ***/ - flush_block_only(s, false); - if (s.strm.avail_out === 0) { - return BS_NEED_MORE; - } - /***/ - } - } - - s.insert = 0; - - if (flush === Z_FINISH) { - /*** FLUSH_BLOCK(s, 1); ***/ - flush_block_only(s, true); - if (s.strm.avail_out === 0) { - return BS_FINISH_STARTED; - } - /***/ - return BS_FINISH_DONE; - } - - if (s.strstart > s.block_start) { - /*** FLUSH_BLOCK(s, 0); ***/ - flush_block_only(s, false); - if (s.strm.avail_out === 0) { - return BS_NEED_MORE; - } - /***/ - } - - return BS_NEED_MORE; -} - -/* =========================================================================== - * Compress as much as possible from the input stream, return the current - * block state. - * This function does not perform lazy evaluation of matches and inserts - * new strings in the dictionary only for unmatched strings or for short - * matches. It is used only for the fast compression options. - */ -function deflate_fast(s, flush) { - var hash_head; /* head of the hash chain */ - var bflush; /* set if current block must be flushed */ - - for (;;) { - /* Make sure that we always have enough lookahead, except - * at the end of the input file. We need MAX_MATCH bytes - * for the next match, plus MIN_MATCH bytes to insert the - * string following the next match. - */ - if (s.lookahead < MIN_LOOKAHEAD) { - fill_window(s); - if (s.lookahead < MIN_LOOKAHEAD && flush === Z_NO_FLUSH) { - return BS_NEED_MORE; - } - if (s.lookahead === 0) { - break; /* flush the current block */ - } - } - - /* Insert the string window[strstart .. strstart+2] in the - * dictionary, and set hash_head to the head of the hash chain: - */ - hash_head = 0/*NIL*/; - if (s.lookahead >= MIN_MATCH) { - /*** INSERT_STRING(s, s.strstart, hash_head); ***/ - s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[s.strstart + MIN_MATCH - 1]) & s.hash_mask; - hash_head = s.prev[s.strstart & s.w_mask] = s.head[s.ins_h]; - s.head[s.ins_h] = s.strstart; - /***/ - } - - /* Find the longest match, discarding those <= prev_length. - * At this point we have always match_length < MIN_MATCH - */ - if (hash_head !== 0/*NIL*/ && ((s.strstart - hash_head) <= (s.w_size - MIN_LOOKAHEAD))) { - /* To simplify the code, we prevent matches with the string - * of window index 0 (in particular we have to avoid a match - * of the string with itself at the start of the input file). - */ - s.match_length = longest_match(s, hash_head); - /* longest_match() sets match_start */ - } - if (s.match_length >= MIN_MATCH) { - // check_match(s, s.strstart, s.match_start, s.match_length); // for debug only - - /*** _tr_tally_dist(s, s.strstart - s.match_start, - s.match_length - MIN_MATCH, bflush); ***/ - bflush = trees._tr_tally(s, s.strstart - s.match_start, s.match_length - MIN_MATCH); - - s.lookahead -= s.match_length; - - /* Insert new strings in the hash table only if the match length - * is not too large. This saves time but degrades compression. - */ - if (s.match_length <= s.max_lazy_match/*max_insert_length*/ && s.lookahead >= MIN_MATCH) { - s.match_length--; /* string at strstart already in table */ - do { - s.strstart++; - /*** INSERT_STRING(s, s.strstart, hash_head); ***/ - s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[s.strstart + MIN_MATCH - 1]) & s.hash_mask; - hash_head = s.prev[s.strstart & s.w_mask] = s.head[s.ins_h]; - s.head[s.ins_h] = s.strstart; - /***/ - /* strstart never exceeds WSIZE-MAX_MATCH, so there are - * always MIN_MATCH bytes ahead. - */ - } while (--s.match_length !== 0); - s.strstart++; - } else - { - s.strstart += s.match_length; - s.match_length = 0; - s.ins_h = s.window[s.strstart]; - /* UPDATE_HASH(s, s.ins_h, s.window[s.strstart+1]); */ - s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[s.strstart + 1]) & s.hash_mask; - -//#if MIN_MATCH != 3 -// Call UPDATE_HASH() MIN_MATCH-3 more times -//#endif - /* If lookahead < MIN_MATCH, ins_h is garbage, but it does not - * matter since it will be recomputed at next deflate call. - */ - } - } else { - /* No match, output a literal byte */ - //Tracevv((stderr,"%c", s.window[s.strstart])); - /*** _tr_tally_lit(s, s.window[s.strstart], bflush); ***/ - bflush = trees._tr_tally(s, 0, s.window[s.strstart]); - - s.lookahead--; - s.strstart++; - } - if (bflush) { - /*** FLUSH_BLOCK(s, 0); ***/ - flush_block_only(s, false); - if (s.strm.avail_out === 0) { - return BS_NEED_MORE; - } - /***/ - } - } - s.insert = ((s.strstart < (MIN_MATCH - 1)) ? s.strstart : MIN_MATCH - 1); - if (flush === Z_FINISH) { - /*** FLUSH_BLOCK(s, 1); ***/ - flush_block_only(s, true); - if (s.strm.avail_out === 0) { - return BS_FINISH_STARTED; - } - /***/ - return BS_FINISH_DONE; - } - if (s.last_lit) { - /*** FLUSH_BLOCK(s, 0); ***/ - flush_block_only(s, false); - if (s.strm.avail_out === 0) { - return BS_NEED_MORE; - } - /***/ - } - return BS_BLOCK_DONE; -} - -/* =========================================================================== - * Same as above, but achieves better compression. We use a lazy - * evaluation for matches: a match is finally adopted only if there is - * no better match at the next window position. - */ -function deflate_slow(s, flush) { - var hash_head; /* head of hash chain */ - var bflush; /* set if current block must be flushed */ - - var max_insert; - - /* Process the input block. */ - for (;;) { - /* Make sure that we always have enough lookahead, except - * at the end of the input file. We need MAX_MATCH bytes - * for the next match, plus MIN_MATCH bytes to insert the - * string following the next match. - */ - if (s.lookahead < MIN_LOOKAHEAD) { - fill_window(s); - if (s.lookahead < MIN_LOOKAHEAD && flush === Z_NO_FLUSH) { - return BS_NEED_MORE; - } - if (s.lookahead === 0) { break; } /* flush the current block */ - } - - /* Insert the string window[strstart .. strstart+2] in the - * dictionary, and set hash_head to the head of the hash chain: - */ - hash_head = 0/*NIL*/; - if (s.lookahead >= MIN_MATCH) { - /*** INSERT_STRING(s, s.strstart, hash_head); ***/ - s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[s.strstart + MIN_MATCH - 1]) & s.hash_mask; - hash_head = s.prev[s.strstart & s.w_mask] = s.head[s.ins_h]; - s.head[s.ins_h] = s.strstart; - /***/ - } - - /* Find the longest match, discarding those <= prev_length. - */ - s.prev_length = s.match_length; - s.prev_match = s.match_start; - s.match_length = MIN_MATCH - 1; - - if (hash_head !== 0/*NIL*/ && s.prev_length < s.max_lazy_match && - s.strstart - hash_head <= (s.w_size - MIN_LOOKAHEAD)/*MAX_DIST(s)*/) { - /* To simplify the code, we prevent matches with the string - * of window index 0 (in particular we have to avoid a match - * of the string with itself at the start of the input file). - */ - s.match_length = longest_match(s, hash_head); - /* longest_match() sets match_start */ - - if (s.match_length <= 5 && - (s.strategy === Z_FILTERED || (s.match_length === MIN_MATCH && s.strstart - s.match_start > 4096/*TOO_FAR*/))) { - - /* If prev_match is also MIN_MATCH, match_start is garbage - * but we will ignore the current match anyway. - */ - s.match_length = MIN_MATCH - 1; - } - } - /* If there was a match at the previous step and the current - * match is not better, output the previous match: - */ - if (s.prev_length >= MIN_MATCH && s.match_length <= s.prev_length) { - max_insert = s.strstart + s.lookahead - MIN_MATCH; - /* Do not insert strings in hash table beyond this. */ - - //check_match(s, s.strstart-1, s.prev_match, s.prev_length); - - /***_tr_tally_dist(s, s.strstart - 1 - s.prev_match, - s.prev_length - MIN_MATCH, bflush);***/ - bflush = trees._tr_tally(s, s.strstart - 1 - s.prev_match, s.prev_length - MIN_MATCH); - /* Insert in hash table all strings up to the end of the match. - * strstart-1 and strstart are already inserted. If there is not - * enough lookahead, the last two strings are not inserted in - * the hash table. - */ - s.lookahead -= s.prev_length - 1; - s.prev_length -= 2; - do { - if (++s.strstart <= max_insert) { - /*** INSERT_STRING(s, s.strstart, hash_head); ***/ - s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[s.strstart + MIN_MATCH - 1]) & s.hash_mask; - hash_head = s.prev[s.strstart & s.w_mask] = s.head[s.ins_h]; - s.head[s.ins_h] = s.strstart; - /***/ - } - } while (--s.prev_length !== 0); - s.match_available = 0; - s.match_length = MIN_MATCH - 1; - s.strstart++; - - if (bflush) { - /*** FLUSH_BLOCK(s, 0); ***/ - flush_block_only(s, false); - if (s.strm.avail_out === 0) { - return BS_NEED_MORE; - } - /***/ - } - - } else if (s.match_available) { - /* If there was no match at the previous position, output a - * single literal. If there was a match but the current match - * is longer, truncate the previous match to a single literal. - */ - //Tracevv((stderr,"%c", s->window[s->strstart-1])); - /*** _tr_tally_lit(s, s.window[s.strstart-1], bflush); ***/ - bflush = trees._tr_tally(s, 0, s.window[s.strstart - 1]); - - if (bflush) { - /*** FLUSH_BLOCK_ONLY(s, 0) ***/ - flush_block_only(s, false); - /***/ - } - s.strstart++; - s.lookahead--; - if (s.strm.avail_out === 0) { - return BS_NEED_MORE; - } - } else { - /* There is no previous match to compare with, wait for - * the next step to decide. - */ - s.match_available = 1; - s.strstart++; - s.lookahead--; - } - } - //Assert (flush != Z_NO_FLUSH, "no flush?"); - if (s.match_available) { - //Tracevv((stderr,"%c", s->window[s->strstart-1])); - /*** _tr_tally_lit(s, s.window[s.strstart-1], bflush); ***/ - bflush = trees._tr_tally(s, 0, s.window[s.strstart - 1]); - - s.match_available = 0; - } - s.insert = s.strstart < MIN_MATCH - 1 ? s.strstart : MIN_MATCH - 1; - if (flush === Z_FINISH) { - /*** FLUSH_BLOCK(s, 1); ***/ - flush_block_only(s, true); - if (s.strm.avail_out === 0) { - return BS_FINISH_STARTED; - } - /***/ - return BS_FINISH_DONE; - } - if (s.last_lit) { - /*** FLUSH_BLOCK(s, 0); ***/ - flush_block_only(s, false); - if (s.strm.avail_out === 0) { - return BS_NEED_MORE; - } - /***/ - } - - return BS_BLOCK_DONE; -} - - -/* =========================================================================== - * For Z_RLE, simply look for runs of bytes, generate matches only of distance - * one. Do not maintain a hash table. (It will be regenerated if this run of - * deflate switches away from Z_RLE.) - */ -function deflate_rle(s, flush) { - var bflush; /* set if current block must be flushed */ - var prev; /* byte at distance one to match */ - var scan, strend; /* scan goes up to strend for length of run */ - - var _win = s.window; - - for (;;) { - /* Make sure that we always have enough lookahead, except - * at the end of the input file. We need MAX_MATCH bytes - * for the longest run, plus one for the unrolled loop. - */ - if (s.lookahead <= MAX_MATCH) { - fill_window(s); - if (s.lookahead <= MAX_MATCH && flush === Z_NO_FLUSH) { - return BS_NEED_MORE; - } - if (s.lookahead === 0) { break; } /* flush the current block */ - } - - /* See how many times the previous byte repeats */ - s.match_length = 0; - if (s.lookahead >= MIN_MATCH && s.strstart > 0) { - scan = s.strstart - 1; - prev = _win[scan]; - if (prev === _win[++scan] && prev === _win[++scan] && prev === _win[++scan]) { - strend = s.strstart + MAX_MATCH; - do { - /*jshint noempty:false*/ - } while (prev === _win[++scan] && prev === _win[++scan] && - prev === _win[++scan] && prev === _win[++scan] && - prev === _win[++scan] && prev === _win[++scan] && - prev === _win[++scan] && prev === _win[++scan] && - scan < strend); - s.match_length = MAX_MATCH - (strend - scan); - if (s.match_length > s.lookahead) { - s.match_length = s.lookahead; - } - } - //Assert(scan <= s->window+(uInt)(s->window_size-1), "wild scan"); - } - - /* Emit match if have run of MIN_MATCH or longer, else emit literal */ - if (s.match_length >= MIN_MATCH) { - //check_match(s, s.strstart, s.strstart - 1, s.match_length); - - /*** _tr_tally_dist(s, 1, s.match_length - MIN_MATCH, bflush); ***/ - bflush = trees._tr_tally(s, 1, s.match_length - MIN_MATCH); - - s.lookahead -= s.match_length; - s.strstart += s.match_length; - s.match_length = 0; - } else { - /* No match, output a literal byte */ - //Tracevv((stderr,"%c", s->window[s->strstart])); - /*** _tr_tally_lit(s, s.window[s.strstart], bflush); ***/ - bflush = trees._tr_tally(s, 0, s.window[s.strstart]); - - s.lookahead--; - s.strstart++; - } - if (bflush) { - /*** FLUSH_BLOCK(s, 0); ***/ - flush_block_only(s, false); - if (s.strm.avail_out === 0) { - return BS_NEED_MORE; - } - /***/ - } - } - s.insert = 0; - if (flush === Z_FINISH) { - /*** FLUSH_BLOCK(s, 1); ***/ - flush_block_only(s, true); - if (s.strm.avail_out === 0) { - return BS_FINISH_STARTED; - } - /***/ - return BS_FINISH_DONE; - } - if (s.last_lit) { - /*** FLUSH_BLOCK(s, 0); ***/ - flush_block_only(s, false); - if (s.strm.avail_out === 0) { - return BS_NEED_MORE; - } - /***/ - } - return BS_BLOCK_DONE; -} - -/* =========================================================================== - * For Z_HUFFMAN_ONLY, do not look for matches. Do not maintain a hash table. - * (It will be regenerated if this run of deflate switches away from Huffman.) - */ -function deflate_huff(s, flush) { - var bflush; /* set if current block must be flushed */ - - for (;;) { - /* Make sure that we have a literal to write. */ - if (s.lookahead === 0) { - fill_window(s); - if (s.lookahead === 0) { - if (flush === Z_NO_FLUSH) { - return BS_NEED_MORE; - } - break; /* flush the current block */ - } - } - - /* Output a literal byte */ - s.match_length = 0; - //Tracevv((stderr,"%c", s->window[s->strstart])); - /*** _tr_tally_lit(s, s.window[s.strstart], bflush); ***/ - bflush = trees._tr_tally(s, 0, s.window[s.strstart]); - s.lookahead--; - s.strstart++; - if (bflush) { - /*** FLUSH_BLOCK(s, 0); ***/ - flush_block_only(s, false); - if (s.strm.avail_out === 0) { - return BS_NEED_MORE; - } - /***/ - } - } - s.insert = 0; - if (flush === Z_FINISH) { - /*** FLUSH_BLOCK(s, 1); ***/ - flush_block_only(s, true); - if (s.strm.avail_out === 0) { - return BS_FINISH_STARTED; - } - /***/ - return BS_FINISH_DONE; - } - if (s.last_lit) { - /*** FLUSH_BLOCK(s, 0); ***/ - flush_block_only(s, false); - if (s.strm.avail_out === 0) { - return BS_NEED_MORE; - } - /***/ - } - return BS_BLOCK_DONE; -} - -/* Values for max_lazy_match, good_match and max_chain_length, depending on - * the desired pack level (0..9). The values given below have been tuned to - * exclude worst case performance for pathological files. Better values may be - * found for specific files. - */ -function Config(good_length, max_lazy, nice_length, max_chain, func) { - this.good_length = good_length; - this.max_lazy = max_lazy; - this.nice_length = nice_length; - this.max_chain = max_chain; - this.func = func; -} - -var configuration_table; - -configuration_table = [ - /* good lazy nice chain */ - new Config(0, 0, 0, 0, deflate_stored), /* 0 store only */ - new Config(4, 4, 8, 4, deflate_fast), /* 1 max speed, no lazy matches */ - new Config(4, 5, 16, 8, deflate_fast), /* 2 */ - new Config(4, 6, 32, 32, deflate_fast), /* 3 */ - - new Config(4, 4, 16, 16, deflate_slow), /* 4 lazy matches */ - new Config(8, 16, 32, 32, deflate_slow), /* 5 */ - new Config(8, 16, 128, 128, deflate_slow), /* 6 */ - new Config(8, 32, 128, 256, deflate_slow), /* 7 */ - new Config(32, 128, 258, 1024, deflate_slow), /* 8 */ - new Config(32, 258, 258, 4096, deflate_slow) /* 9 max compression */ -]; - - -/* =========================================================================== - * Initialize the "longest match" routines for a new zlib stream - */ -function lm_init(s) { - s.window_size = 2 * s.w_size; - - /*** CLEAR_HASH(s); ***/ - zero(s.head); // Fill with NIL (= 0); - - /* Set the default configuration parameters: - */ - s.max_lazy_match = configuration_table[s.level].max_lazy; - s.good_match = configuration_table[s.level].good_length; - s.nice_match = configuration_table[s.level].nice_length; - s.max_chain_length = configuration_table[s.level].max_chain; - - s.strstart = 0; - s.block_start = 0; - s.lookahead = 0; - s.insert = 0; - s.match_length = s.prev_length = MIN_MATCH - 1; - s.match_available = 0; - s.ins_h = 0; -} - - -function DeflateState() { - this.strm = null; /* pointer back to this zlib stream */ - this.status = 0; /* as the name implies */ - this.pending_buf = null; /* output still pending */ - this.pending_buf_size = 0; /* size of pending_buf */ - this.pending_out = 0; /* next pending byte to output to the stream */ - this.pending = 0; /* nb of bytes in the pending buffer */ - this.wrap = 0; /* bit 0 true for zlib, bit 1 true for gzip */ - this.gzhead = null; /* gzip header information to write */ - this.gzindex = 0; /* where in extra, name, or comment */ - this.method = Z_DEFLATED; /* can only be DEFLATED */ - this.last_flush = -1; /* value of flush param for previous deflate call */ - - this.w_size = 0; /* LZ77 window size (32K by default) */ - this.w_bits = 0; /* log2(w_size) (8..16) */ - this.w_mask = 0; /* w_size - 1 */ - - this.window = null; - /* Sliding window. Input bytes are read into the second half of the window, - * and move to the first half later to keep a dictionary of at least wSize - * bytes. With this organization, matches are limited to a distance of - * wSize-MAX_MATCH bytes, but this ensures that IO is always - * performed with a length multiple of the block size. - */ - - this.window_size = 0; - /* Actual size of window: 2*wSize, except when the user input buffer - * is directly used as sliding window. - */ - - this.prev = null; - /* Link to older string with same hash index. To limit the size of this - * array to 64K, this link is maintained only for the last 32K strings. - * An index in this array is thus a window index modulo 32K. - */ - - this.head = null; /* Heads of the hash chains or NIL. */ - - this.ins_h = 0; /* hash index of string to be inserted */ - this.hash_size = 0; /* number of elements in hash table */ - this.hash_bits = 0; /* log2(hash_size) */ - this.hash_mask = 0; /* hash_size-1 */ - - this.hash_shift = 0; - /* Number of bits by which ins_h must be shifted at each input - * step. It must be such that after MIN_MATCH steps, the oldest - * byte no longer takes part in the hash key, that is: - * hash_shift * MIN_MATCH >= hash_bits - */ - - this.block_start = 0; - /* Window position at the beginning of the current output block. Gets - * negative when the window is moved backwards. - */ - - this.match_length = 0; /* length of best match */ - this.prev_match = 0; /* previous match */ - this.match_available = 0; /* set if previous match exists */ - this.strstart = 0; /* start of string to insert */ - this.match_start = 0; /* start of matching string */ - this.lookahead = 0; /* number of valid bytes ahead in window */ - - this.prev_length = 0; - /* Length of the best match at previous step. Matches not greater than this - * are discarded. This is used in the lazy match evaluation. - */ - - this.max_chain_length = 0; - /* To speed up deflation, hash chains are never searched beyond this - * length. A higher limit improves compression ratio but degrades the - * speed. - */ - - this.max_lazy_match = 0; - /* Attempt to find a better match only when the current match is strictly - * smaller than this value. This mechanism is used only for compression - * levels >= 4. - */ - // That's alias to max_lazy_match, don't use directly - //this.max_insert_length = 0; - /* Insert new strings in the hash table only if the match length is not - * greater than this length. This saves time but degrades compression. - * max_insert_length is used only for compression levels <= 3. - */ - - this.level = 0; /* compression level (1..9) */ - this.strategy = 0; /* favor or force Huffman coding*/ - - this.good_match = 0; - /* Use a faster search when the previous match is longer than this */ - - this.nice_match = 0; /* Stop searching when current match exceeds this */ - - /* used by trees.c: */ - - /* Didn't use ct_data typedef below to suppress compiler warning */ - - // struct ct_data_s dyn_ltree[HEAP_SIZE]; /* literal and length tree */ - // struct ct_data_s dyn_dtree[2*D_CODES+1]; /* distance tree */ - // struct ct_data_s bl_tree[2*BL_CODES+1]; /* Huffman tree for bit lengths */ - - // Use flat array of DOUBLE size, with interleaved fata, - // because JS does not support effective - this.dyn_ltree = new utils.Buf16(HEAP_SIZE * 2); - this.dyn_dtree = new utils.Buf16((2 * D_CODES + 1) * 2); - this.bl_tree = new utils.Buf16((2 * BL_CODES + 1) * 2); - zero(this.dyn_ltree); - zero(this.dyn_dtree); - zero(this.bl_tree); - - this.l_desc = null; /* desc. for literal tree */ - this.d_desc = null; /* desc. for distance tree */ - this.bl_desc = null; /* desc. for bit length tree */ - - //ush bl_count[MAX_BITS+1]; - this.bl_count = new utils.Buf16(MAX_BITS + 1); - /* number of codes at each bit length for an optimal tree */ - - //int heap[2*L_CODES+1]; /* heap used to build the Huffman trees */ - this.heap = new utils.Buf16(2 * L_CODES + 1); /* heap used to build the Huffman trees */ - zero(this.heap); - - this.heap_len = 0; /* number of elements in the heap */ - this.heap_max = 0; /* element of largest frequency */ - /* The sons of heap[n] are heap[2*n] and heap[2*n+1]. heap[0] is not used. - * The same heap array is used to build all trees. - */ - - this.depth = new utils.Buf16(2 * L_CODES + 1); //uch depth[2*L_CODES+1]; - zero(this.depth); - /* Depth of each subtree used as tie breaker for trees of equal frequency - */ - - this.l_buf = 0; /* buffer index for literals or lengths */ - - this.lit_bufsize = 0; - /* Size of match buffer for literals/lengths. There are 4 reasons for - * limiting lit_bufsize to 64K: - * - frequencies can be kept in 16 bit counters - * - if compression is not successful for the first block, all input - * data is still in the window so we can still emit a stored block even - * when input comes from standard input. (This can also be done for - * all blocks if lit_bufsize is not greater than 32K.) - * - if compression is not successful for a file smaller than 64K, we can - * even emit a stored file instead of a stored block (saving 5 bytes). - * This is applicable only for zip (not gzip or zlib). - * - creating new Huffman trees less frequently may not provide fast - * adaptation to changes in the input data statistics. (Take for - * example a binary file with poorly compressible code followed by - * a highly compressible string table.) Smaller buffer sizes give - * fast adaptation but have of course the overhead of transmitting - * trees more frequently. - * - I can't count above 4 - */ - - this.last_lit = 0; /* running index in l_buf */ - - this.d_buf = 0; - /* Buffer index for distances. To simplify the code, d_buf and l_buf have - * the same number of elements. To use different lengths, an extra flag - * array would be necessary. - */ - - this.opt_len = 0; /* bit length of current block with optimal trees */ - this.static_len = 0; /* bit length of current block with static trees */ - this.matches = 0; /* number of string matches in current block */ - this.insert = 0; /* bytes at end of window left to insert */ - - - this.bi_buf = 0; - /* Output buffer. bits are inserted starting at the bottom (least - * significant bits). - */ - this.bi_valid = 0; - /* Number of valid bits in bi_buf. All bits above the last valid bit - * are always zero. - */ - - // Used for window memory init. We safely ignore it for JS. That makes - // sense only for pointers and memory check tools. - //this.high_water = 0; - /* High water mark offset in window for initialized bytes -- bytes above - * this are set to zero in order to avoid memory check warnings when - * longest match routines access bytes past the input. This is then - * updated to the new high water mark. - */ -} - - -function deflateResetKeep(strm) { - var s; - - if (!strm || !strm.state) { - return err(strm, Z_STREAM_ERROR); - } - - strm.total_in = strm.total_out = 0; - strm.data_type = Z_UNKNOWN; - - s = strm.state; - s.pending = 0; - s.pending_out = 0; - - if (s.wrap < 0) { - s.wrap = -s.wrap; - /* was made negative by deflate(..., Z_FINISH); */ - } - s.status = (s.wrap ? INIT_STATE : BUSY_STATE); - strm.adler = (s.wrap === 2) ? - 0 // crc32(0, Z_NULL, 0) - : - 1; // adler32(0, Z_NULL, 0) - s.last_flush = Z_NO_FLUSH; - trees._tr_init(s); - return Z_OK; -} - - -function deflateReset(strm) { - var ret = deflateResetKeep(strm); - if (ret === Z_OK) { - lm_init(strm.state); - } - return ret; -} - - -function deflateSetHeader(strm, head) { - if (!strm || !strm.state) { return Z_STREAM_ERROR; } - if (strm.state.wrap !== 2) { return Z_STREAM_ERROR; } - strm.state.gzhead = head; - return Z_OK; -} - - -function deflateInit2(strm, level, method, windowBits, memLevel, strategy) { - if (!strm) { // === Z_NULL - return Z_STREAM_ERROR; - } - var wrap = 1; - - if (level === Z_DEFAULT_COMPRESSION) { - level = 6; - } - - if (windowBits < 0) { /* suppress zlib wrapper */ - wrap = 0; - windowBits = -windowBits; - } - - else if (windowBits > 15) { - wrap = 2; /* write gzip wrapper instead */ - windowBits -= 16; - } - - - if (memLevel < 1 || memLevel > MAX_MEM_LEVEL || method !== Z_DEFLATED || - windowBits < 8 || windowBits > 15 || level < 0 || level > 9 || - strategy < 0 || strategy > Z_FIXED) { - return err(strm, Z_STREAM_ERROR); - } - - - if (windowBits === 8) { - windowBits = 9; - } - /* until 256-byte window bug fixed */ - - var s = new DeflateState(); - - strm.state = s; - s.strm = strm; - - s.wrap = wrap; - s.gzhead = null; - s.w_bits = windowBits; - s.w_size = 1 << s.w_bits; - s.w_mask = s.w_size - 1; - - s.hash_bits = memLevel + 7; - s.hash_size = 1 << s.hash_bits; - s.hash_mask = s.hash_size - 1; - s.hash_shift = ~~((s.hash_bits + MIN_MATCH - 1) / MIN_MATCH); - - s.window = new utils.Buf8(s.w_size * 2); - s.head = new utils.Buf16(s.hash_size); - s.prev = new utils.Buf16(s.w_size); - - // Don't need mem init magic for JS. - //s.high_water = 0; /* nothing written to s->window yet */ - - s.lit_bufsize = 1 << (memLevel + 6); /* 16K elements by default */ - - s.pending_buf_size = s.lit_bufsize * 4; - - //overlay = (ushf *) ZALLOC(strm, s->lit_bufsize, sizeof(ush)+2); - //s->pending_buf = (uchf *) overlay; - s.pending_buf = new utils.Buf8(s.pending_buf_size); - - // It is offset from `s.pending_buf` (size is `s.lit_bufsize * 2`) - //s->d_buf = overlay + s->lit_bufsize/sizeof(ush); - s.d_buf = 1 * s.lit_bufsize; - - //s->l_buf = s->pending_buf + (1+sizeof(ush))*s->lit_bufsize; - s.l_buf = (1 + 2) * s.lit_bufsize; - - s.level = level; - s.strategy = strategy; - s.method = method; - - return deflateReset(strm); -} - -function deflateInit(strm, level) { - return deflateInit2(strm, level, Z_DEFLATED, MAX_WBITS, DEF_MEM_LEVEL, Z_DEFAULT_STRATEGY); -} - - -function deflate(strm, flush) { - var old_flush, s; - var beg, val; // for gzip header write only - - if (!strm || !strm.state || - flush > Z_BLOCK || flush < 0) { - return strm ? err(strm, Z_STREAM_ERROR) : Z_STREAM_ERROR; - } - - s = strm.state; - - if (!strm.output || - (!strm.input && strm.avail_in !== 0) || - (s.status === FINISH_STATE && flush !== Z_FINISH)) { - return err(strm, (strm.avail_out === 0) ? Z_BUF_ERROR : Z_STREAM_ERROR); - } - - s.strm = strm; /* just in case */ - old_flush = s.last_flush; - s.last_flush = flush; - - /* Write the header */ - if (s.status === INIT_STATE) { - - if (s.wrap === 2) { // GZIP header - strm.adler = 0; //crc32(0L, Z_NULL, 0); - put_byte(s, 31); - put_byte(s, 139); - put_byte(s, 8); - if (!s.gzhead) { // s->gzhead == Z_NULL - put_byte(s, 0); - put_byte(s, 0); - put_byte(s, 0); - put_byte(s, 0); - put_byte(s, 0); - put_byte(s, s.level === 9 ? 2 : - (s.strategy >= Z_HUFFMAN_ONLY || s.level < 2 ? - 4 : 0)); - put_byte(s, OS_CODE); - s.status = BUSY_STATE; - } - else { - put_byte(s, (s.gzhead.text ? 1 : 0) + - (s.gzhead.hcrc ? 2 : 0) + - (!s.gzhead.extra ? 0 : 4) + - (!s.gzhead.name ? 0 : 8) + - (!s.gzhead.comment ? 0 : 16) - ); - put_byte(s, s.gzhead.time & 0xff); - put_byte(s, (s.gzhead.time >> 8) & 0xff); - put_byte(s, (s.gzhead.time >> 16) & 0xff); - put_byte(s, (s.gzhead.time >> 24) & 0xff); - put_byte(s, s.level === 9 ? 2 : - (s.strategy >= Z_HUFFMAN_ONLY || s.level < 2 ? - 4 : 0)); - put_byte(s, s.gzhead.os & 0xff); - if (s.gzhead.extra && s.gzhead.extra.length) { - put_byte(s, s.gzhead.extra.length & 0xff); - put_byte(s, (s.gzhead.extra.length >> 8) & 0xff); - } - if (s.gzhead.hcrc) { - strm.adler = crc32(strm.adler, s.pending_buf, s.pending, 0); - } - s.gzindex = 0; - s.status = EXTRA_STATE; - } - } - else // DEFLATE header - { - var header = (Z_DEFLATED + ((s.w_bits - 8) << 4)) << 8; - var level_flags = -1; - - if (s.strategy >= Z_HUFFMAN_ONLY || s.level < 2) { - level_flags = 0; - } else if (s.level < 6) { - level_flags = 1; - } else if (s.level === 6) { - level_flags = 2; - } else { - level_flags = 3; - } - header |= (level_flags << 6); - if (s.strstart !== 0) { header |= PRESET_DICT; } - header += 31 - (header % 31); - - s.status = BUSY_STATE; - putShortMSB(s, header); - - /* Save the adler32 of the preset dictionary: */ - if (s.strstart !== 0) { - putShortMSB(s, strm.adler >>> 16); - putShortMSB(s, strm.adler & 0xffff); - } - strm.adler = 1; // adler32(0L, Z_NULL, 0); - } - } - -//#ifdef GZIP - if (s.status === EXTRA_STATE) { - if (s.gzhead.extra/* != Z_NULL*/) { - beg = s.pending; /* start of bytes to update crc */ - - while (s.gzindex < (s.gzhead.extra.length & 0xffff)) { - if (s.pending === s.pending_buf_size) { - if (s.gzhead.hcrc && s.pending > beg) { - strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg); - } - flush_pending(strm); - beg = s.pending; - if (s.pending === s.pending_buf_size) { - break; - } - } - put_byte(s, s.gzhead.extra[s.gzindex] & 0xff); - s.gzindex++; - } - if (s.gzhead.hcrc && s.pending > beg) { - strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg); - } - if (s.gzindex === s.gzhead.extra.length) { - s.gzindex = 0; - s.status = NAME_STATE; - } - } - else { - s.status = NAME_STATE; - } - } - if (s.status === NAME_STATE) { - if (s.gzhead.name/* != Z_NULL*/) { - beg = s.pending; /* start of bytes to update crc */ - //int val; - - do { - if (s.pending === s.pending_buf_size) { - if (s.gzhead.hcrc && s.pending > beg) { - strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg); - } - flush_pending(strm); - beg = s.pending; - if (s.pending === s.pending_buf_size) { - val = 1; - break; - } - } - // JS specific: little magic to add zero terminator to end of string - if (s.gzindex < s.gzhead.name.length) { - val = s.gzhead.name.charCodeAt(s.gzindex++) & 0xff; - } else { - val = 0; - } - put_byte(s, val); - } while (val !== 0); - - if (s.gzhead.hcrc && s.pending > beg) { - strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg); - } - if (val === 0) { - s.gzindex = 0; - s.status = COMMENT_STATE; - } - } - else { - s.status = COMMENT_STATE; - } - } - if (s.status === COMMENT_STATE) { - if (s.gzhead.comment/* != Z_NULL*/) { - beg = s.pending; /* start of bytes to update crc */ - //int val; - - do { - if (s.pending === s.pending_buf_size) { - if (s.gzhead.hcrc && s.pending > beg) { - strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg); - } - flush_pending(strm); - beg = s.pending; - if (s.pending === s.pending_buf_size) { - val = 1; - break; - } - } - // JS specific: little magic to add zero terminator to end of string - if (s.gzindex < s.gzhead.comment.length) { - val = s.gzhead.comment.charCodeAt(s.gzindex++) & 0xff; - } else { - val = 0; - } - put_byte(s, val); - } while (val !== 0); - - if (s.gzhead.hcrc && s.pending > beg) { - strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg); - } - if (val === 0) { - s.status = HCRC_STATE; - } - } - else { - s.status = HCRC_STATE; - } - } - if (s.status === HCRC_STATE) { - if (s.gzhead.hcrc) { - if (s.pending + 2 > s.pending_buf_size) { - flush_pending(strm); - } - if (s.pending + 2 <= s.pending_buf_size) { - put_byte(s, strm.adler & 0xff); - put_byte(s, (strm.adler >> 8) & 0xff); - strm.adler = 0; //crc32(0L, Z_NULL, 0); - s.status = BUSY_STATE; - } - } - else { - s.status = BUSY_STATE; - } - } -//#endif - - /* Flush as much pending output as possible */ - if (s.pending !== 0) { - flush_pending(strm); - if (strm.avail_out === 0) { - /* Since avail_out is 0, deflate will be called again with - * more output space, but possibly with both pending and - * avail_in equal to zero. There won't be anything to do, - * but this is not an error situation so make sure we - * return OK instead of BUF_ERROR at next call of deflate: - */ - s.last_flush = -1; - return Z_OK; - } - - /* Make sure there is something to do and avoid duplicate consecutive - * flushes. For repeated and useless calls with Z_FINISH, we keep - * returning Z_STREAM_END instead of Z_BUF_ERROR. - */ - } else if (strm.avail_in === 0 && rank(flush) <= rank(old_flush) && - flush !== Z_FINISH) { - return err(strm, Z_BUF_ERROR); - } - - /* User must not provide more input after the first FINISH: */ - if (s.status === FINISH_STATE && strm.avail_in !== 0) { - return err(strm, Z_BUF_ERROR); - } - - /* Start a new block or continue the current one. - */ - if (strm.avail_in !== 0 || s.lookahead !== 0 || - (flush !== Z_NO_FLUSH && s.status !== FINISH_STATE)) { - var bstate = (s.strategy === Z_HUFFMAN_ONLY) ? deflate_huff(s, flush) : - (s.strategy === Z_RLE ? deflate_rle(s, flush) : - configuration_table[s.level].func(s, flush)); - - if (bstate === BS_FINISH_STARTED || bstate === BS_FINISH_DONE) { - s.status = FINISH_STATE; - } - if (bstate === BS_NEED_MORE || bstate === BS_FINISH_STARTED) { - if (strm.avail_out === 0) { - s.last_flush = -1; - /* avoid BUF_ERROR next call, see above */ - } - return Z_OK; - /* If flush != Z_NO_FLUSH && avail_out == 0, the next call - * of deflate should use the same flush parameter to make sure - * that the flush is complete. So we don't have to output an - * empty block here, this will be done at next call. This also - * ensures that for a very small output buffer, we emit at most - * one empty block. - */ - } - if (bstate === BS_BLOCK_DONE) { - if (flush === Z_PARTIAL_FLUSH) { - trees._tr_align(s); - } - else if (flush !== Z_BLOCK) { /* FULL_FLUSH or SYNC_FLUSH */ - - trees._tr_stored_block(s, 0, 0, false); - /* For a full flush, this empty block will be recognized - * as a special marker by inflate_sync(). - */ - if (flush === Z_FULL_FLUSH) { - /*** CLEAR_HASH(s); ***/ /* forget history */ - zero(s.head); // Fill with NIL (= 0); - - if (s.lookahead === 0) { - s.strstart = 0; - s.block_start = 0; - s.insert = 0; - } - } - } - flush_pending(strm); - if (strm.avail_out === 0) { - s.last_flush = -1; /* avoid BUF_ERROR at next call, see above */ - return Z_OK; - } - } - } - //Assert(strm->avail_out > 0, "bug2"); - //if (strm.avail_out <= 0) { throw new Error("bug2");} - - if (flush !== Z_FINISH) { return Z_OK; } - if (s.wrap <= 0) { return Z_STREAM_END; } - - /* Write the trailer */ - if (s.wrap === 2) { - put_byte(s, strm.adler & 0xff); - put_byte(s, (strm.adler >> 8) & 0xff); - put_byte(s, (strm.adler >> 16) & 0xff); - put_byte(s, (strm.adler >> 24) & 0xff); - put_byte(s, strm.total_in & 0xff); - put_byte(s, (strm.total_in >> 8) & 0xff); - put_byte(s, (strm.total_in >> 16) & 0xff); - put_byte(s, (strm.total_in >> 24) & 0xff); - } - else - { - putShortMSB(s, strm.adler >>> 16); - putShortMSB(s, strm.adler & 0xffff); - } - - flush_pending(strm); - /* If avail_out is zero, the application will call deflate again - * to flush the rest. - */ - if (s.wrap > 0) { s.wrap = -s.wrap; } - /* write the trailer only once! */ - return s.pending !== 0 ? Z_OK : Z_STREAM_END; -} - -function deflateEnd(strm) { - var status; - - if (!strm/*== Z_NULL*/ || !strm.state/*== Z_NULL*/) { - return Z_STREAM_ERROR; - } - - status = strm.state.status; - if (status !== INIT_STATE && - status !== EXTRA_STATE && - status !== NAME_STATE && - status !== COMMENT_STATE && - status !== HCRC_STATE && - status !== BUSY_STATE && - status !== FINISH_STATE - ) { - return err(strm, Z_STREAM_ERROR); - } - - strm.state = null; - - return status === BUSY_STATE ? err(strm, Z_DATA_ERROR) : Z_OK; -} - - -/* ========================================================================= - * Initializes the compression dictionary from the given byte - * sequence without producing any compressed output. - */ -function deflateSetDictionary(strm, dictionary) { - var dictLength = dictionary.length; - - var s; - var str, n; - var wrap; - var avail; - var next; - var input; - var tmpDict; - - if (!strm/*== Z_NULL*/ || !strm.state/*== Z_NULL*/) { - return Z_STREAM_ERROR; - } - - s = strm.state; - wrap = s.wrap; - - if (wrap === 2 || (wrap === 1 && s.status !== INIT_STATE) || s.lookahead) { - return Z_STREAM_ERROR; - } - - /* when using zlib wrappers, compute Adler-32 for provided dictionary */ - if (wrap === 1) { - /* adler32(strm->adler, dictionary, dictLength); */ - strm.adler = adler32(strm.adler, dictionary, dictLength, 0); - } - - s.wrap = 0; /* avoid computing Adler-32 in read_buf */ - - /* if dictionary would fill window, just replace the history */ - if (dictLength >= s.w_size) { - if (wrap === 0) { /* already empty otherwise */ - /*** CLEAR_HASH(s); ***/ - zero(s.head); // Fill with NIL (= 0); - s.strstart = 0; - s.block_start = 0; - s.insert = 0; - } - /* use the tail */ - // dictionary = dictionary.slice(dictLength - s.w_size); - tmpDict = new utils.Buf8(s.w_size); - utils.arraySet(tmpDict, dictionary, dictLength - s.w_size, s.w_size, 0); - dictionary = tmpDict; - dictLength = s.w_size; - } - /* insert dictionary into window and hash */ - avail = strm.avail_in; - next = strm.next_in; - input = strm.input; - strm.avail_in = dictLength; - strm.next_in = 0; - strm.input = dictionary; - fill_window(s); - while (s.lookahead >= MIN_MATCH) { - str = s.strstart; - n = s.lookahead - (MIN_MATCH - 1); - do { - /* UPDATE_HASH(s, s->ins_h, s->window[str + MIN_MATCH-1]); */ - s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[str + MIN_MATCH - 1]) & s.hash_mask; - - s.prev[str & s.w_mask] = s.head[s.ins_h]; - - s.head[s.ins_h] = str; - str++; - } while (--n); - s.strstart = str; - s.lookahead = MIN_MATCH - 1; - fill_window(s); - } - s.strstart += s.lookahead; - s.block_start = s.strstart; - s.insert = s.lookahead; - s.lookahead = 0; - s.match_length = s.prev_length = MIN_MATCH - 1; - s.match_available = 0; - strm.next_in = next; - strm.input = input; - strm.avail_in = avail; - s.wrap = wrap; - return Z_OK; -} - - -exports.deflateInit = deflateInit; -exports.deflateInit2 = deflateInit2; -exports.deflateReset = deflateReset; -exports.deflateResetKeep = deflateResetKeep; -exports.deflateSetHeader = deflateSetHeader; -exports.deflate = deflate; -exports.deflateEnd = deflateEnd; -exports.deflateSetDictionary = deflateSetDictionary; -exports.deflateInfo = 'pako deflate (from Nodeca project)'; - -/* Not implemented -exports.deflateBound = deflateBound; -exports.deflateCopy = deflateCopy; -exports.deflateParams = deflateParams; -exports.deflatePending = deflatePending; -exports.deflatePrime = deflatePrime; -exports.deflateTune = deflateTune; -*/ - -},{"../utils/common":3,"./adler32":5,"./crc32":7,"./messages":13,"./trees":14}],9:[function(require,module,exports){ -'use strict'; - - -function GZheader() { - /* true if compressed data believed to be text */ - this.text = 0; - /* modification time */ - this.time = 0; - /* extra flags (not used when writing a gzip file) */ - this.xflags = 0; - /* operating system */ - this.os = 0; - /* pointer to extra field or Z_NULL if none */ - this.extra = null; - /* extra field length (valid if extra != Z_NULL) */ - this.extra_len = 0; // Actually, we don't need it in JS, - // but leave for few code modifications - - // - // Setup limits is not necessary because in js we should not preallocate memory - // for inflate use constant limit in 65536 bytes - // - - /* space at extra (only when reading header) */ - // this.extra_max = 0; - /* pointer to zero-terminated file name or Z_NULL */ - this.name = ''; - /* space at name (only when reading header) */ - // this.name_max = 0; - /* pointer to zero-terminated comment or Z_NULL */ - this.comment = ''; - /* space at comment (only when reading header) */ - // this.comm_max = 0; - /* true if there was or will be a header crc */ - this.hcrc = 0; - /* true when done reading gzip header (not used when writing a gzip file) */ - this.done = false; -} - -module.exports = GZheader; - -},{}],10:[function(require,module,exports){ -'use strict'; - -// See state defs from inflate.js -var BAD = 30; /* got a data error -- remain here until reset */ -var TYPE = 12; /* i: waiting for type bits, including last-flag bit */ - -/* - Decode literal, length, and distance codes and write out the resulting - literal and match bytes until either not enough input or output is - available, an end-of-block is encountered, or a data error is encountered. - When large enough input and output buffers are supplied to inflate(), for - example, a 16K input buffer and a 64K output buffer, more than 95% of the - inflate execution time is spent in this routine. - - Entry assumptions: - - state.mode === LEN - strm.avail_in >= 6 - strm.avail_out >= 258 - start >= strm.avail_out - state.bits < 8 - - On return, state.mode is one of: - - LEN -- ran out of enough output space or enough available input - TYPE -- reached end of block code, inflate() to interpret next block - BAD -- error in block data - - Notes: - - - The maximum input bits used by a length/distance pair is 15 bits for the - length code, 5 bits for the length extra, 15 bits for the distance code, - and 13 bits for the distance extra. This totals 48 bits, or six bytes. - Therefore if strm.avail_in >= 6, then there is enough input to avoid - checking for available input while decoding. - - - The maximum bytes that a single length/distance pair can output is 258 - bytes, which is the maximum length that can be coded. inflate_fast() - requires strm.avail_out >= 258 for each loop to avoid checking for - output space. - */ -module.exports = function inflate_fast(strm, start) { - var state; - var _in; /* local strm.input */ - var last; /* have enough input while in < last */ - var _out; /* local strm.output */ - var beg; /* inflate()'s initial strm.output */ - var end; /* while out < end, enough space available */ -//#ifdef INFLATE_STRICT - var dmax; /* maximum distance from zlib header */ -//#endif - var wsize; /* window size or zero if not using window */ - var whave; /* valid bytes in the window */ - var wnext; /* window write index */ - // Use `s_window` instead `window`, avoid conflict with instrumentation tools - var s_window; /* allocated sliding window, if wsize != 0 */ - var hold; /* local strm.hold */ - var bits; /* local strm.bits */ - var lcode; /* local strm.lencode */ - var dcode; /* local strm.distcode */ - var lmask; /* mask for first level of length codes */ - var dmask; /* mask for first level of distance codes */ - var here; /* retrieved table entry */ - var op; /* code bits, operation, extra bits, or */ - /* window position, window bytes to copy */ - var len; /* match length, unused bytes */ - var dist; /* match distance */ - var from; /* where to copy match from */ - var from_source; - - - var input, output; // JS specific, because we have no pointers - - /* copy state to local variables */ - state = strm.state; - //here = state.here; - _in = strm.next_in; - input = strm.input; - last = _in + (strm.avail_in - 5); - _out = strm.next_out; - output = strm.output; - beg = _out - (start - strm.avail_out); - end = _out + (strm.avail_out - 257); -//#ifdef INFLATE_STRICT - dmax = state.dmax; -//#endif - wsize = state.wsize; - whave = state.whave; - wnext = state.wnext; - s_window = state.window; - hold = state.hold; - bits = state.bits; - lcode = state.lencode; - dcode = state.distcode; - lmask = (1 << state.lenbits) - 1; - dmask = (1 << state.distbits) - 1; - - - /* decode literals and length/distances until end-of-block or not enough - input data or output space */ - - top: - do { - if (bits < 15) { - hold += input[_in++] << bits; - bits += 8; - hold += input[_in++] << bits; - bits += 8; - } - - here = lcode[hold & lmask]; - - dolen: - for (;;) { // Goto emulation - op = here >>> 24/*here.bits*/; - hold >>>= op; - bits -= op; - op = (here >>> 16) & 0xff/*here.op*/; - if (op === 0) { /* literal */ - //Tracevv((stderr, here.val >= 0x20 && here.val < 0x7f ? - // "inflate: literal '%c'\n" : - // "inflate: literal 0x%02x\n", here.val)); - output[_out++] = here & 0xffff/*here.val*/; - } - else if (op & 16) { /* length base */ - len = here & 0xffff/*here.val*/; - op &= 15; /* number of extra bits */ - if (op) { - if (bits < op) { - hold += input[_in++] << bits; - bits += 8; - } - len += hold & ((1 << op) - 1); - hold >>>= op; - bits -= op; - } - //Tracevv((stderr, "inflate: length %u\n", len)); - if (bits < 15) { - hold += input[_in++] << bits; - bits += 8; - hold += input[_in++] << bits; - bits += 8; - } - here = dcode[hold & dmask]; - - dodist: - for (;;) { // goto emulation - op = here >>> 24/*here.bits*/; - hold >>>= op; - bits -= op; - op = (here >>> 16) & 0xff/*here.op*/; - - if (op & 16) { /* distance base */ - dist = here & 0xffff/*here.val*/; - op &= 15; /* number of extra bits */ - if (bits < op) { - hold += input[_in++] << bits; - bits += 8; - if (bits < op) { - hold += input[_in++] << bits; - bits += 8; - } - } - dist += hold & ((1 << op) - 1); -//#ifdef INFLATE_STRICT - if (dist > dmax) { - strm.msg = 'invalid distance too far back'; - state.mode = BAD; - break top; - } -//#endif - hold >>>= op; - bits -= op; - //Tracevv((stderr, "inflate: distance %u\n", dist)); - op = _out - beg; /* max distance in output */ - if (dist > op) { /* see if copy from window */ - op = dist - op; /* distance back in window */ - if (op > whave) { - if (state.sane) { - strm.msg = 'invalid distance too far back'; - state.mode = BAD; - break top; - } - -// (!) This block is disabled in zlib defailts, -// don't enable it for binary compatibility -//#ifdef INFLATE_ALLOW_INVALID_DISTANCE_TOOFAR_ARRR -// if (len <= op - whave) { -// do { -// output[_out++] = 0; -// } while (--len); -// continue top; -// } -// len -= op - whave; -// do { -// output[_out++] = 0; -// } while (--op > whave); -// if (op === 0) { -// from = _out - dist; -// do { -// output[_out++] = output[from++]; -// } while (--len); -// continue top; -// } -//#endif - } - from = 0; // window index - from_source = s_window; - if (wnext === 0) { /* very common case */ - from += wsize - op; - if (op < len) { /* some from window */ - len -= op; - do { - output[_out++] = s_window[from++]; - } while (--op); - from = _out - dist; /* rest from output */ - from_source = output; - } - } - else if (wnext < op) { /* wrap around window */ - from += wsize + wnext - op; - op -= wnext; - if (op < len) { /* some from end of window */ - len -= op; - do { - output[_out++] = s_window[from++]; - } while (--op); - from = 0; - if (wnext < len) { /* some from start of window */ - op = wnext; - len -= op; - do { - output[_out++] = s_window[from++]; - } while (--op); - from = _out - dist; /* rest from output */ - from_source = output; - } - } - } - else { /* contiguous in window */ - from += wnext - op; - if (op < len) { /* some from window */ - len -= op; - do { - output[_out++] = s_window[from++]; - } while (--op); - from = _out - dist; /* rest from output */ - from_source = output; - } - } - while (len > 2) { - output[_out++] = from_source[from++]; - output[_out++] = from_source[from++]; - output[_out++] = from_source[from++]; - len -= 3; - } - if (len) { - output[_out++] = from_source[from++]; - if (len > 1) { - output[_out++] = from_source[from++]; - } - } - } - else { - from = _out - dist; /* copy direct from output */ - do { /* minimum length is three */ - output[_out++] = output[from++]; - output[_out++] = output[from++]; - output[_out++] = output[from++]; - len -= 3; - } while (len > 2); - if (len) { - output[_out++] = output[from++]; - if (len > 1) { - output[_out++] = output[from++]; - } - } - } - } - else if ((op & 64) === 0) { /* 2nd level distance code */ - here = dcode[(here & 0xffff)/*here.val*/ + (hold & ((1 << op) - 1))]; - continue dodist; - } - else { - strm.msg = 'invalid distance code'; - state.mode = BAD; - break top; - } - - break; // need to emulate goto via "continue" - } - } - else if ((op & 64) === 0) { /* 2nd level length code */ - here = lcode[(here & 0xffff)/*here.val*/ + (hold & ((1 << op) - 1))]; - continue dolen; - } - else if (op & 32) { /* end-of-block */ - //Tracevv((stderr, "inflate: end of block\n")); - state.mode = TYPE; - break top; - } - else { - strm.msg = 'invalid literal/length code'; - state.mode = BAD; - break top; - } - - break; // need to emulate goto via "continue" - } - } while (_in < last && _out < end); - - /* return unused bytes (on entry, bits < 8, so in won't go too far back) */ - len = bits >> 3; - _in -= len; - bits -= len << 3; - hold &= (1 << bits) - 1; - - /* update state and return */ - strm.next_in = _in; - strm.next_out = _out; - strm.avail_in = (_in < last ? 5 + (last - _in) : 5 - (_in - last)); - strm.avail_out = (_out < end ? 257 + (end - _out) : 257 - (_out - end)); - state.hold = hold; - state.bits = bits; - return; -}; - -},{}],11:[function(require,module,exports){ -'use strict'; - - -var utils = require('../utils/common'); -var adler32 = require('./adler32'); -var crc32 = require('./crc32'); -var inflate_fast = require('./inffast'); -var inflate_table = require('./inftrees'); - -var CODES = 0; -var LENS = 1; -var DISTS = 2; - -/* Public constants ==========================================================*/ -/* ===========================================================================*/ - - -/* Allowed flush values; see deflate() and inflate() below for details */ -//var Z_NO_FLUSH = 0; -//var Z_PARTIAL_FLUSH = 1; -//var Z_SYNC_FLUSH = 2; -//var Z_FULL_FLUSH = 3; -var Z_FINISH = 4; -var Z_BLOCK = 5; -var Z_TREES = 6; - - -/* Return codes for the compression/decompression functions. Negative values - * are errors, positive values are used for special but normal events. - */ -var Z_OK = 0; -var Z_STREAM_END = 1; -var Z_NEED_DICT = 2; -//var Z_ERRNO = -1; -var Z_STREAM_ERROR = -2; -var Z_DATA_ERROR = -3; -var Z_MEM_ERROR = -4; -var Z_BUF_ERROR = -5; -//var Z_VERSION_ERROR = -6; - -/* The deflate compression method */ -var Z_DEFLATED = 8; - - -/* STATES ====================================================================*/ -/* ===========================================================================*/ - - -var HEAD = 1; /* i: waiting for magic header */ -var FLAGS = 2; /* i: waiting for method and flags (gzip) */ -var TIME = 3; /* i: waiting for modification time (gzip) */ -var OS = 4; /* i: waiting for extra flags and operating system (gzip) */ -var EXLEN = 5; /* i: waiting for extra length (gzip) */ -var EXTRA = 6; /* i: waiting for extra bytes (gzip) */ -var NAME = 7; /* i: waiting for end of file name (gzip) */ -var COMMENT = 8; /* i: waiting for end of comment (gzip) */ -var HCRC = 9; /* i: waiting for header crc (gzip) */ -var DICTID = 10; /* i: waiting for dictionary check value */ -var DICT = 11; /* waiting for inflateSetDictionary() call */ -var TYPE = 12; /* i: waiting for type bits, including last-flag bit */ -var TYPEDO = 13; /* i: same, but skip check to exit inflate on new block */ -var STORED = 14; /* i: waiting for stored size (length and complement) */ -var COPY_ = 15; /* i/o: same as COPY below, but only first time in */ -var COPY = 16; /* i/o: waiting for input or output to copy stored block */ -var TABLE = 17; /* i: waiting for dynamic block table lengths */ -var LENLENS = 18; /* i: waiting for code length code lengths */ -var CODELENS = 19; /* i: waiting for length/lit and distance code lengths */ -var LEN_ = 20; /* i: same as LEN below, but only first time in */ -var LEN = 21; /* i: waiting for length/lit/eob code */ -var LENEXT = 22; /* i: waiting for length extra bits */ -var DIST = 23; /* i: waiting for distance code */ -var DISTEXT = 24; /* i: waiting for distance extra bits */ -var MATCH = 25; /* o: waiting for output space to copy string */ -var LIT = 26; /* o: waiting for output space to write literal */ -var CHECK = 27; /* i: waiting for 32-bit check value */ -var LENGTH = 28; /* i: waiting for 32-bit length (gzip) */ -var DONE = 29; /* finished check, done -- remain here until reset */ -var BAD = 30; /* got a data error -- remain here until reset */ -var MEM = 31; /* got an inflate() memory error -- remain here until reset */ -var SYNC = 32; /* looking for synchronization bytes to restart inflate() */ - -/* ===========================================================================*/ - - - -var ENOUGH_LENS = 852; -var ENOUGH_DISTS = 592; -//var ENOUGH = (ENOUGH_LENS+ENOUGH_DISTS); - -var MAX_WBITS = 15; -/* 32K LZ77 window */ -var DEF_WBITS = MAX_WBITS; - - -function zswap32(q) { - return (((q >>> 24) & 0xff) + - ((q >>> 8) & 0xff00) + - ((q & 0xff00) << 8) + - ((q & 0xff) << 24)); -} - - -function InflateState() { - this.mode = 0; /* current inflate mode */ - this.last = false; /* true if processing last block */ - this.wrap = 0; /* bit 0 true for zlib, bit 1 true for gzip */ - this.havedict = false; /* true if dictionary provided */ - this.flags = 0; /* gzip header method and flags (0 if zlib) */ - this.dmax = 0; /* zlib header max distance (INFLATE_STRICT) */ - this.check = 0; /* protected copy of check value */ - this.total = 0; /* protected copy of output count */ - // TODO: may be {} - this.head = null; /* where to save gzip header information */ - - /* sliding window */ - this.wbits = 0; /* log base 2 of requested window size */ - this.wsize = 0; /* window size or zero if not using window */ - this.whave = 0; /* valid bytes in the window */ - this.wnext = 0; /* window write index */ - this.window = null; /* allocated sliding window, if needed */ - - /* bit accumulator */ - this.hold = 0; /* input bit accumulator */ - this.bits = 0; /* number of bits in "in" */ - - /* for string and stored block copying */ - this.length = 0; /* literal or length of data to copy */ - this.offset = 0; /* distance back to copy string from */ - - /* for table and code decoding */ - this.extra = 0; /* extra bits needed */ - - /* fixed and dynamic code tables */ - this.lencode = null; /* starting table for length/literal codes */ - this.distcode = null; /* starting table for distance codes */ - this.lenbits = 0; /* index bits for lencode */ - this.distbits = 0; /* index bits for distcode */ - - /* dynamic table building */ - this.ncode = 0; /* number of code length code lengths */ - this.nlen = 0; /* number of length code lengths */ - this.ndist = 0; /* number of distance code lengths */ - this.have = 0; /* number of code lengths in lens[] */ - this.next = null; /* next available space in codes[] */ - - this.lens = new utils.Buf16(320); /* temporary storage for code lengths */ - this.work = new utils.Buf16(288); /* work area for code table building */ - - /* - because we don't have pointers in js, we use lencode and distcode directly - as buffers so we don't need codes - */ - //this.codes = new utils.Buf32(ENOUGH); /* space for code tables */ - this.lendyn = null; /* dynamic table for length/literal codes (JS specific) */ - this.distdyn = null; /* dynamic table for distance codes (JS specific) */ - this.sane = 0; /* if false, allow invalid distance too far */ - this.back = 0; /* bits back of last unprocessed length/lit */ - this.was = 0; /* initial length of match */ -} - -function inflateResetKeep(strm) { - var state; - - if (!strm || !strm.state) { return Z_STREAM_ERROR; } - state = strm.state; - strm.total_in = strm.total_out = state.total = 0; - strm.msg = ''; /*Z_NULL*/ - if (state.wrap) { /* to support ill-conceived Java test suite */ - strm.adler = state.wrap & 1; - } - state.mode = HEAD; - state.last = 0; - state.havedict = 0; - state.dmax = 32768; - state.head = null/*Z_NULL*/; - state.hold = 0; - state.bits = 0; - //state.lencode = state.distcode = state.next = state.codes; - state.lencode = state.lendyn = new utils.Buf32(ENOUGH_LENS); - state.distcode = state.distdyn = new utils.Buf32(ENOUGH_DISTS); - - state.sane = 1; - state.back = -1; - //Tracev((stderr, "inflate: reset\n")); - return Z_OK; -} - -function inflateReset(strm) { - var state; - - if (!strm || !strm.state) { return Z_STREAM_ERROR; } - state = strm.state; - state.wsize = 0; - state.whave = 0; - state.wnext = 0; - return inflateResetKeep(strm); - -} - -function inflateReset2(strm, windowBits) { - var wrap; - var state; - - /* get the state */ - if (!strm || !strm.state) { return Z_STREAM_ERROR; } - state = strm.state; - - /* extract wrap request from windowBits parameter */ - if (windowBits < 0) { - wrap = 0; - windowBits = -windowBits; - } - else { - wrap = (windowBits >> 4) + 1; - if (windowBits < 48) { - windowBits &= 15; - } - } - - /* set number of window bits, free window if different */ - if (windowBits && (windowBits < 8 || windowBits > 15)) { - return Z_STREAM_ERROR; - } - if (state.window !== null && state.wbits !== windowBits) { - state.window = null; - } - - /* update state and reset the rest of it */ - state.wrap = wrap; - state.wbits = windowBits; - return inflateReset(strm); -} - -function inflateInit2(strm, windowBits) { - var ret; - var state; - - if (!strm) { return Z_STREAM_ERROR; } - //strm.msg = Z_NULL; /* in case we return an error */ - - state = new InflateState(); - - //if (state === Z_NULL) return Z_MEM_ERROR; - //Tracev((stderr, "inflate: allocated\n")); - strm.state = state; - state.window = null/*Z_NULL*/; - ret = inflateReset2(strm, windowBits); - if (ret !== Z_OK) { - strm.state = null/*Z_NULL*/; - } - return ret; -} - -function inflateInit(strm) { - return inflateInit2(strm, DEF_WBITS); -} - - -/* - Return state with length and distance decoding tables and index sizes set to - fixed code decoding. Normally this returns fixed tables from inffixed.h. - If BUILDFIXED is defined, then instead this routine builds the tables the - first time it's called, and returns those tables the first time and - thereafter. This reduces the size of the code by about 2K bytes, in - exchange for a little execution time. However, BUILDFIXED should not be - used for threaded applications, since the rewriting of the tables and virgin - may not be thread-safe. - */ -var virgin = true; - -var lenfix, distfix; // We have no pointers in JS, so keep tables separate - -function fixedtables(state) { - /* build fixed huffman tables if first call (may not be thread safe) */ - if (virgin) { - var sym; - - lenfix = new utils.Buf32(512); - distfix = new utils.Buf32(32); - - /* literal/length table */ - sym = 0; - while (sym < 144) { state.lens[sym++] = 8; } - while (sym < 256) { state.lens[sym++] = 9; } - while (sym < 280) { state.lens[sym++] = 7; } - while (sym < 288) { state.lens[sym++] = 8; } - - inflate_table(LENS, state.lens, 0, 288, lenfix, 0, state.work, { bits: 9 }); - - /* distance table */ - sym = 0; - while (sym < 32) { state.lens[sym++] = 5; } - - inflate_table(DISTS, state.lens, 0, 32, distfix, 0, state.work, { bits: 5 }); - - /* do this just once */ - virgin = false; - } - - state.lencode = lenfix; - state.lenbits = 9; - state.distcode = distfix; - state.distbits = 5; -} - - -/* - Update the window with the last wsize (normally 32K) bytes written before - returning. If window does not exist yet, create it. This is only called - when a window is already in use, or when output has been written during this - inflate call, but the end of the deflate stream has not been reached yet. - It is also called to create a window for dictionary data when a dictionary - is loaded. - - Providing output buffers larger than 32K to inflate() should provide a speed - advantage, since only the last 32K of output is copied to the sliding window - upon return from inflate(), and since all distances after the first 32K of - output will fall in the output data, making match copies simpler and faster. - The advantage may be dependent on the size of the processor's data caches. - */ -function updatewindow(strm, src, end, copy) { - var dist; - var state = strm.state; - - /* if it hasn't been done already, allocate space for the window */ - if (state.window === null) { - state.wsize = 1 << state.wbits; - state.wnext = 0; - state.whave = 0; - - state.window = new utils.Buf8(state.wsize); - } - - /* copy state->wsize or less output bytes into the circular window */ - if (copy >= state.wsize) { - utils.arraySet(state.window, src, end - state.wsize, state.wsize, 0); - state.wnext = 0; - state.whave = state.wsize; - } - else { - dist = state.wsize - state.wnext; - if (dist > copy) { - dist = copy; - } - //zmemcpy(state->window + state->wnext, end - copy, dist); - utils.arraySet(state.window, src, end - copy, dist, state.wnext); - copy -= dist; - if (copy) { - //zmemcpy(state->window, end - copy, copy); - utils.arraySet(state.window, src, end - copy, copy, 0); - state.wnext = copy; - state.whave = state.wsize; - } - else { - state.wnext += dist; - if (state.wnext === state.wsize) { state.wnext = 0; } - if (state.whave < state.wsize) { state.whave += dist; } - } - } - return 0; -} - -function inflate(strm, flush) { - var state; - var input, output; // input/output buffers - var next; /* next input INDEX */ - var put; /* next output INDEX */ - var have, left; /* available input and output */ - var hold; /* bit buffer */ - var bits; /* bits in bit buffer */ - var _in, _out; /* save starting available input and output */ - var copy; /* number of stored or match bytes to copy */ - var from; /* where to copy match bytes from */ - var from_source; - var here = 0; /* current decoding table entry */ - var here_bits, here_op, here_val; // paked "here" denormalized (JS specific) - //var last; /* parent table entry */ - var last_bits, last_op, last_val; // paked "last" denormalized (JS specific) - var len; /* length to copy for repeats, bits to drop */ - var ret; /* return code */ - var hbuf = new utils.Buf8(4); /* buffer for gzip header crc calculation */ - var opts; - - var n; // temporary var for NEED_BITS - - var order = /* permutation of code lengths */ - [ 16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15 ]; - - - if (!strm || !strm.state || !strm.output || - (!strm.input && strm.avail_in !== 0)) { - return Z_STREAM_ERROR; - } - - state = strm.state; - if (state.mode === TYPE) { state.mode = TYPEDO; } /* skip check */ - - - //--- LOAD() --- - put = strm.next_out; - output = strm.output; - left = strm.avail_out; - next = strm.next_in; - input = strm.input; - have = strm.avail_in; - hold = state.hold; - bits = state.bits; - //--- - - _in = have; - _out = left; - ret = Z_OK; - - inf_leave: // goto emulation - for (;;) { - switch (state.mode) { - case HEAD: - if (state.wrap === 0) { - state.mode = TYPEDO; - break; - } - //=== NEEDBITS(16); - while (bits < 16) { - if (have === 0) { break inf_leave; } - have--; - hold += input[next++] << bits; - bits += 8; - } - //===// - if ((state.wrap & 2) && hold === 0x8b1f) { /* gzip header */ - state.check = 0/*crc32(0L, Z_NULL, 0)*/; - //=== CRC2(state.check, hold); - hbuf[0] = hold & 0xff; - hbuf[1] = (hold >>> 8) & 0xff; - state.check = crc32(state.check, hbuf, 2, 0); - //===// - - //=== INITBITS(); - hold = 0; - bits = 0; - //===// - state.mode = FLAGS; - break; - } - state.flags = 0; /* expect zlib header */ - if (state.head) { - state.head.done = false; - } - if (!(state.wrap & 1) || /* check if zlib header allowed */ - (((hold & 0xff)/*BITS(8)*/ << 8) + (hold >> 8)) % 31) { - strm.msg = 'incorrect header check'; - state.mode = BAD; - break; - } - if ((hold & 0x0f)/*BITS(4)*/ !== Z_DEFLATED) { - strm.msg = 'unknown compression method'; - state.mode = BAD; - break; - } - //--- DROPBITS(4) ---// - hold >>>= 4; - bits -= 4; - //---// - len = (hold & 0x0f)/*BITS(4)*/ + 8; - if (state.wbits === 0) { - state.wbits = len; - } - else if (len > state.wbits) { - strm.msg = 'invalid window size'; - state.mode = BAD; - break; - } - state.dmax = 1 << len; - //Tracev((stderr, "inflate: zlib header ok\n")); - strm.adler = state.check = 1/*adler32(0L, Z_NULL, 0)*/; - state.mode = hold & 0x200 ? DICTID : TYPE; - //=== INITBITS(); - hold = 0; - bits = 0; - //===// - break; - case FLAGS: - //=== NEEDBITS(16); */ - while (bits < 16) { - if (have === 0) { break inf_leave; } - have--; - hold += input[next++] << bits; - bits += 8; - } - //===// - state.flags = hold; - if ((state.flags & 0xff) !== Z_DEFLATED) { - strm.msg = 'unknown compression method'; - state.mode = BAD; - break; - } - if (state.flags & 0xe000) { - strm.msg = 'unknown header flags set'; - state.mode = BAD; - break; - } - if (state.head) { - state.head.text = ((hold >> 8) & 1); - } - if (state.flags & 0x0200) { - //=== CRC2(state.check, hold); - hbuf[0] = hold & 0xff; - hbuf[1] = (hold >>> 8) & 0xff; - state.check = crc32(state.check, hbuf, 2, 0); - //===// - } - //=== INITBITS(); - hold = 0; - bits = 0; - //===// - state.mode = TIME; - /* falls through */ - case TIME: - //=== NEEDBITS(32); */ - while (bits < 32) { - if (have === 0) { break inf_leave; } - have--; - hold += input[next++] << bits; - bits += 8; - } - //===// - if (state.head) { - state.head.time = hold; - } - if (state.flags & 0x0200) { - //=== CRC4(state.check, hold) - hbuf[0] = hold & 0xff; - hbuf[1] = (hold >>> 8) & 0xff; - hbuf[2] = (hold >>> 16) & 0xff; - hbuf[3] = (hold >>> 24) & 0xff; - state.check = crc32(state.check, hbuf, 4, 0); - //=== - } - //=== INITBITS(); - hold = 0; - bits = 0; - //===// - state.mode = OS; - /* falls through */ - case OS: - //=== NEEDBITS(16); */ - while (bits < 16) { - if (have === 0) { break inf_leave; } - have--; - hold += input[next++] << bits; - bits += 8; - } - //===// - if (state.head) { - state.head.xflags = (hold & 0xff); - state.head.os = (hold >> 8); - } - if (state.flags & 0x0200) { - //=== CRC2(state.check, hold); - hbuf[0] = hold & 0xff; - hbuf[1] = (hold >>> 8) & 0xff; - state.check = crc32(state.check, hbuf, 2, 0); - //===// - } - //=== INITBITS(); - hold = 0; - bits = 0; - //===// - state.mode = EXLEN; - /* falls through */ - case EXLEN: - if (state.flags & 0x0400) { - //=== NEEDBITS(16); */ - while (bits < 16) { - if (have === 0) { break inf_leave; } - have--; - hold += input[next++] << bits; - bits += 8; - } - //===// - state.length = hold; - if (state.head) { - state.head.extra_len = hold; - } - if (state.flags & 0x0200) { - //=== CRC2(state.check, hold); - hbuf[0] = hold & 0xff; - hbuf[1] = (hold >>> 8) & 0xff; - state.check = crc32(state.check, hbuf, 2, 0); - //===// - } - //=== INITBITS(); - hold = 0; - bits = 0; - //===// - } - else if (state.head) { - state.head.extra = null/*Z_NULL*/; - } - state.mode = EXTRA; - /* falls through */ - case EXTRA: - if (state.flags & 0x0400) { - copy = state.length; - if (copy > have) { copy = have; } - if (copy) { - if (state.head) { - len = state.head.extra_len - state.length; - if (!state.head.extra) { - // Use untyped array for more conveniend processing later - state.head.extra = new Array(state.head.extra_len); - } - utils.arraySet( - state.head.extra, - input, - next, - // extra field is limited to 65536 bytes - // - no need for additional size check - copy, - /*len + copy > state.head.extra_max - len ? state.head.extra_max : copy,*/ - len - ); - //zmemcpy(state.head.extra + len, next, - // len + copy > state.head.extra_max ? - // state.head.extra_max - len : copy); - } - if (state.flags & 0x0200) { - state.check = crc32(state.check, input, copy, next); - } - have -= copy; - next += copy; - state.length -= copy; - } - if (state.length) { break inf_leave; } - } - state.length = 0; - state.mode = NAME; - /* falls through */ - case NAME: - if (state.flags & 0x0800) { - if (have === 0) { break inf_leave; } - copy = 0; - do { - // TODO: 2 or 1 bytes? - len = input[next + copy++]; - /* use constant limit because in js we should not preallocate memory */ - if (state.head && len && - (state.length < 65536 /*state.head.name_max*/)) { - state.head.name += String.fromCharCode(len); - } - } while (len && copy < have); - - if (state.flags & 0x0200) { - state.check = crc32(state.check, input, copy, next); - } - have -= copy; - next += copy; - if (len) { break inf_leave; } - } - else if (state.head) { - state.head.name = null; - } - state.length = 0; - state.mode = COMMENT; - /* falls through */ - case COMMENT: - if (state.flags & 0x1000) { - if (have === 0) { break inf_leave; } - copy = 0; - do { - len = input[next + copy++]; - /* use constant limit because in js we should not preallocate memory */ - if (state.head && len && - (state.length < 65536 /*state.head.comm_max*/)) { - state.head.comment += String.fromCharCode(len); - } - } while (len && copy < have); - if (state.flags & 0x0200) { - state.check = crc32(state.check, input, copy, next); - } - have -= copy; - next += copy; - if (len) { break inf_leave; } - } - else if (state.head) { - state.head.comment = null; - } - state.mode = HCRC; - /* falls through */ - case HCRC: - if (state.flags & 0x0200) { - //=== NEEDBITS(16); */ - while (bits < 16) { - if (have === 0) { break inf_leave; } - have--; - hold += input[next++] << bits; - bits += 8; - } - //===// - if (hold !== (state.check & 0xffff)) { - strm.msg = 'header crc mismatch'; - state.mode = BAD; - break; - } - //=== INITBITS(); - hold = 0; - bits = 0; - //===// - } - if (state.head) { - state.head.hcrc = ((state.flags >> 9) & 1); - state.head.done = true; - } - strm.adler = state.check = 0; - state.mode = TYPE; - break; - case DICTID: - //=== NEEDBITS(32); */ - while (bits < 32) { - if (have === 0) { break inf_leave; } - have--; - hold += input[next++] << bits; - bits += 8; - } - //===// - strm.adler = state.check = zswap32(hold); - //=== INITBITS(); - hold = 0; - bits = 0; - //===// - state.mode = DICT; - /* falls through */ - case DICT: - if (state.havedict === 0) { - //--- RESTORE() --- - strm.next_out = put; - strm.avail_out = left; - strm.next_in = next; - strm.avail_in = have; - state.hold = hold; - state.bits = bits; - //--- - return Z_NEED_DICT; - } - strm.adler = state.check = 1/*adler32(0L, Z_NULL, 0)*/; - state.mode = TYPE; - /* falls through */ - case TYPE: - if (flush === Z_BLOCK || flush === Z_TREES) { break inf_leave; } - /* falls through */ - case TYPEDO: - if (state.last) { - //--- BYTEBITS() ---// - hold >>>= bits & 7; - bits -= bits & 7; - //---// - state.mode = CHECK; - break; - } - //=== NEEDBITS(3); */ - while (bits < 3) { - if (have === 0) { break inf_leave; } - have--; - hold += input[next++] << bits; - bits += 8; - } - //===// - state.last = (hold & 0x01)/*BITS(1)*/; - //--- DROPBITS(1) ---// - hold >>>= 1; - bits -= 1; - //---// - - switch ((hold & 0x03)/*BITS(2)*/) { - case 0: /* stored block */ - //Tracev((stderr, "inflate: stored block%s\n", - // state.last ? " (last)" : "")); - state.mode = STORED; - break; - case 1: /* fixed block */ - fixedtables(state); - //Tracev((stderr, "inflate: fixed codes block%s\n", - // state.last ? " (last)" : "")); - state.mode = LEN_; /* decode codes */ - if (flush === Z_TREES) { - //--- DROPBITS(2) ---// - hold >>>= 2; - bits -= 2; - //---// - break inf_leave; - } - break; - case 2: /* dynamic block */ - //Tracev((stderr, "inflate: dynamic codes block%s\n", - // state.last ? " (last)" : "")); - state.mode = TABLE; - break; - case 3: - strm.msg = 'invalid block type'; - state.mode = BAD; - } - //--- DROPBITS(2) ---// - hold >>>= 2; - bits -= 2; - //---// - break; - case STORED: - //--- BYTEBITS() ---// /* go to byte boundary */ - hold >>>= bits & 7; - bits -= bits & 7; - //---// - //=== NEEDBITS(32); */ - while (bits < 32) { - if (have === 0) { break inf_leave; } - have--; - hold += input[next++] << bits; - bits += 8; - } - //===// - if ((hold & 0xffff) !== ((hold >>> 16) ^ 0xffff)) { - strm.msg = 'invalid stored block lengths'; - state.mode = BAD; - break; - } - state.length = hold & 0xffff; - //Tracev((stderr, "inflate: stored length %u\n", - // state.length)); - //=== INITBITS(); - hold = 0; - bits = 0; - //===// - state.mode = COPY_; - if (flush === Z_TREES) { break inf_leave; } - /* falls through */ - case COPY_: - state.mode = COPY; - /* falls through */ - case COPY: - copy = state.length; - if (copy) { - if (copy > have) { copy = have; } - if (copy > left) { copy = left; } - if (copy === 0) { break inf_leave; } - //--- zmemcpy(put, next, copy); --- - utils.arraySet(output, input, next, copy, put); - //---// - have -= copy; - next += copy; - left -= copy; - put += copy; - state.length -= copy; - break; - } - //Tracev((stderr, "inflate: stored end\n")); - state.mode = TYPE; - break; - case TABLE: - //=== NEEDBITS(14); */ - while (bits < 14) { - if (have === 0) { break inf_leave; } - have--; - hold += input[next++] << bits; - bits += 8; - } - //===// - state.nlen = (hold & 0x1f)/*BITS(5)*/ + 257; - //--- DROPBITS(5) ---// - hold >>>= 5; - bits -= 5; - //---// - state.ndist = (hold & 0x1f)/*BITS(5)*/ + 1; - //--- DROPBITS(5) ---// - hold >>>= 5; - bits -= 5; - //---// - state.ncode = (hold & 0x0f)/*BITS(4)*/ + 4; - //--- DROPBITS(4) ---// - hold >>>= 4; - bits -= 4; - //---// -//#ifndef PKZIP_BUG_WORKAROUND - if (state.nlen > 286 || state.ndist > 30) { - strm.msg = 'too many length or distance symbols'; - state.mode = BAD; - break; - } -//#endif - //Tracev((stderr, "inflate: table sizes ok\n")); - state.have = 0; - state.mode = LENLENS; - /* falls through */ - case LENLENS: - while (state.have < state.ncode) { - //=== NEEDBITS(3); - while (bits < 3) { - if (have === 0) { break inf_leave; } - have--; - hold += input[next++] << bits; - bits += 8; - } - //===// - state.lens[order[state.have++]] = (hold & 0x07);//BITS(3); - //--- DROPBITS(3) ---// - hold >>>= 3; - bits -= 3; - //---// - } - while (state.have < 19) { - state.lens[order[state.have++]] = 0; - } - // We have separate tables & no pointers. 2 commented lines below not needed. - //state.next = state.codes; - //state.lencode = state.next; - // Switch to use dynamic table - state.lencode = state.lendyn; - state.lenbits = 7; - - opts = { bits: state.lenbits }; - ret = inflate_table(CODES, state.lens, 0, 19, state.lencode, 0, state.work, opts); - state.lenbits = opts.bits; - - if (ret) { - strm.msg = 'invalid code lengths set'; - state.mode = BAD; - break; - } - //Tracev((stderr, "inflate: code lengths ok\n")); - state.have = 0; - state.mode = CODELENS; - /* falls through */ - case CODELENS: - while (state.have < state.nlen + state.ndist) { - for (;;) { - here = state.lencode[hold & ((1 << state.lenbits) - 1)];/*BITS(state.lenbits)*/ - here_bits = here >>> 24; - here_op = (here >>> 16) & 0xff; - here_val = here & 0xffff; - - if ((here_bits) <= bits) { break; } - //--- PULLBYTE() ---// - if (have === 0) { break inf_leave; } - have--; - hold += input[next++] << bits; - bits += 8; - //---// - } - if (here_val < 16) { - //--- DROPBITS(here.bits) ---// - hold >>>= here_bits; - bits -= here_bits; - //---// - state.lens[state.have++] = here_val; - } - else { - if (here_val === 16) { - //=== NEEDBITS(here.bits + 2); - n = here_bits + 2; - while (bits < n) { - if (have === 0) { break inf_leave; } - have--; - hold += input[next++] << bits; - bits += 8; - } - //===// - //--- DROPBITS(here.bits) ---// - hold >>>= here_bits; - bits -= here_bits; - //---// - if (state.have === 0) { - strm.msg = 'invalid bit length repeat'; - state.mode = BAD; - break; - } - len = state.lens[state.have - 1]; - copy = 3 + (hold & 0x03);//BITS(2); - //--- DROPBITS(2) ---// - hold >>>= 2; - bits -= 2; - //---// - } - else if (here_val === 17) { - //=== NEEDBITS(here.bits + 3); - n = here_bits + 3; - while (bits < n) { - if (have === 0) { break inf_leave; } - have--; - hold += input[next++] << bits; - bits += 8; - } - //===// - //--- DROPBITS(here.bits) ---// - hold >>>= here_bits; - bits -= here_bits; - //---// - len = 0; - copy = 3 + (hold & 0x07);//BITS(3); - //--- DROPBITS(3) ---// - hold >>>= 3; - bits -= 3; - //---// - } - else { - //=== NEEDBITS(here.bits + 7); - n = here_bits + 7; - while (bits < n) { - if (have === 0) { break inf_leave; } - have--; - hold += input[next++] << bits; - bits += 8; - } - //===// - //--- DROPBITS(here.bits) ---// - hold >>>= here_bits; - bits -= here_bits; - //---// - len = 0; - copy = 11 + (hold & 0x7f);//BITS(7); - //--- DROPBITS(7) ---// - hold >>>= 7; - bits -= 7; - //---// - } - if (state.have + copy > state.nlen + state.ndist) { - strm.msg = 'invalid bit length repeat'; - state.mode = BAD; - break; - } - while (copy--) { - state.lens[state.have++] = len; - } - } - } - - /* handle error breaks in while */ - if (state.mode === BAD) { break; } - - /* check for end-of-block code (better have one) */ - if (state.lens[256] === 0) { - strm.msg = 'invalid code -- missing end-of-block'; - state.mode = BAD; - break; - } - - /* build code tables -- note: do not change the lenbits or distbits - values here (9 and 6) without reading the comments in inftrees.h - concerning the ENOUGH constants, which depend on those values */ - state.lenbits = 9; - - opts = { bits: state.lenbits }; - ret = inflate_table(LENS, state.lens, 0, state.nlen, state.lencode, 0, state.work, opts); - // We have separate tables & no pointers. 2 commented lines below not needed. - // state.next_index = opts.table_index; - state.lenbits = opts.bits; - // state.lencode = state.next; - - if (ret) { - strm.msg = 'invalid literal/lengths set'; - state.mode = BAD; - break; - } - - state.distbits = 6; - //state.distcode.copy(state.codes); - // Switch to use dynamic table - state.distcode = state.distdyn; - opts = { bits: state.distbits }; - ret = inflate_table(DISTS, state.lens, state.nlen, state.ndist, state.distcode, 0, state.work, opts); - // We have separate tables & no pointers. 2 commented lines below not needed. - // state.next_index = opts.table_index; - state.distbits = opts.bits; - // state.distcode = state.next; - - if (ret) { - strm.msg = 'invalid distances set'; - state.mode = BAD; - break; - } - //Tracev((stderr, 'inflate: codes ok\n')); - state.mode = LEN_; - if (flush === Z_TREES) { break inf_leave; } - /* falls through */ - case LEN_: - state.mode = LEN; - /* falls through */ - case LEN: - if (have >= 6 && left >= 258) { - //--- RESTORE() --- - strm.next_out = put; - strm.avail_out = left; - strm.next_in = next; - strm.avail_in = have; - state.hold = hold; - state.bits = bits; - //--- - inflate_fast(strm, _out); - //--- LOAD() --- - put = strm.next_out; - output = strm.output; - left = strm.avail_out; - next = strm.next_in; - input = strm.input; - have = strm.avail_in; - hold = state.hold; - bits = state.bits; - //--- - - if (state.mode === TYPE) { - state.back = -1; - } - break; - } - state.back = 0; - for (;;) { - here = state.lencode[hold & ((1 << state.lenbits) - 1)]; /*BITS(state.lenbits)*/ - here_bits = here >>> 24; - here_op = (here >>> 16) & 0xff; - here_val = here & 0xffff; - - if (here_bits <= bits) { break; } - //--- PULLBYTE() ---// - if (have === 0) { break inf_leave; } - have--; - hold += input[next++] << bits; - bits += 8; - //---// - } - if (here_op && (here_op & 0xf0) === 0) { - last_bits = here_bits; - last_op = here_op; - last_val = here_val; - for (;;) { - here = state.lencode[last_val + - ((hold & ((1 << (last_bits + last_op)) - 1))/*BITS(last.bits + last.op)*/ >> last_bits)]; - here_bits = here >>> 24; - here_op = (here >>> 16) & 0xff; - here_val = here & 0xffff; - - if ((last_bits + here_bits) <= bits) { break; } - //--- PULLBYTE() ---// - if (have === 0) { break inf_leave; } - have--; - hold += input[next++] << bits; - bits += 8; - //---// - } - //--- DROPBITS(last.bits) ---// - hold >>>= last_bits; - bits -= last_bits; - //---// - state.back += last_bits; - } - //--- DROPBITS(here.bits) ---// - hold >>>= here_bits; - bits -= here_bits; - //---// - state.back += here_bits; - state.length = here_val; - if (here_op === 0) { - //Tracevv((stderr, here.val >= 0x20 && here.val < 0x7f ? - // "inflate: literal '%c'\n" : - // "inflate: literal 0x%02x\n", here.val)); - state.mode = LIT; - break; - } - if (here_op & 32) { - //Tracevv((stderr, "inflate: end of block\n")); - state.back = -1; - state.mode = TYPE; - break; - } - if (here_op & 64) { - strm.msg = 'invalid literal/length code'; - state.mode = BAD; - break; - } - state.extra = here_op & 15; - state.mode = LENEXT; - /* falls through */ - case LENEXT: - if (state.extra) { - //=== NEEDBITS(state.extra); - n = state.extra; - while (bits < n) { - if (have === 0) { break inf_leave; } - have--; - hold += input[next++] << bits; - bits += 8; - } - //===// - state.length += hold & ((1 << state.extra) - 1)/*BITS(state.extra)*/; - //--- DROPBITS(state.extra) ---// - hold >>>= state.extra; - bits -= state.extra; - //---// - state.back += state.extra; - } - //Tracevv((stderr, "inflate: length %u\n", state.length)); - state.was = state.length; - state.mode = DIST; - /* falls through */ - case DIST: - for (;;) { - here = state.distcode[hold & ((1 << state.distbits) - 1)];/*BITS(state.distbits)*/ - here_bits = here >>> 24; - here_op = (here >>> 16) & 0xff; - here_val = here & 0xffff; - - if ((here_bits) <= bits) { break; } - //--- PULLBYTE() ---// - if (have === 0) { break inf_leave; } - have--; - hold += input[next++] << bits; - bits += 8; - //---// - } - if ((here_op & 0xf0) === 0) { - last_bits = here_bits; - last_op = here_op; - last_val = here_val; - for (;;) { - here = state.distcode[last_val + - ((hold & ((1 << (last_bits + last_op)) - 1))/*BITS(last.bits + last.op)*/ >> last_bits)]; - here_bits = here >>> 24; - here_op = (here >>> 16) & 0xff; - here_val = here & 0xffff; - - if ((last_bits + here_bits) <= bits) { break; } - //--- PULLBYTE() ---// - if (have === 0) { break inf_leave; } - have--; - hold += input[next++] << bits; - bits += 8; - //---// - } - //--- DROPBITS(last.bits) ---// - hold >>>= last_bits; - bits -= last_bits; - //---// - state.back += last_bits; - } - //--- DROPBITS(here.bits) ---// - hold >>>= here_bits; - bits -= here_bits; - //---// - state.back += here_bits; - if (here_op & 64) { - strm.msg = 'invalid distance code'; - state.mode = BAD; - break; - } - state.offset = here_val; - state.extra = (here_op) & 15; - state.mode = DISTEXT; - /* falls through */ - case DISTEXT: - if (state.extra) { - //=== NEEDBITS(state.extra); - n = state.extra; - while (bits < n) { - if (have === 0) { break inf_leave; } - have--; - hold += input[next++] << bits; - bits += 8; - } - //===// - state.offset += hold & ((1 << state.extra) - 1)/*BITS(state.extra)*/; - //--- DROPBITS(state.extra) ---// - hold >>>= state.extra; - bits -= state.extra; - //---// - state.back += state.extra; - } -//#ifdef INFLATE_STRICT - if (state.offset > state.dmax) { - strm.msg = 'invalid distance too far back'; - state.mode = BAD; - break; - } -//#endif - //Tracevv((stderr, "inflate: distance %u\n", state.offset)); - state.mode = MATCH; - /* falls through */ - case MATCH: - if (left === 0) { break inf_leave; } - copy = _out - left; - if (state.offset > copy) { /* copy from window */ - copy = state.offset - copy; - if (copy > state.whave) { - if (state.sane) { - strm.msg = 'invalid distance too far back'; - state.mode = BAD; - break; - } -// (!) This block is disabled in zlib defailts, -// don't enable it for binary compatibility -//#ifdef INFLATE_ALLOW_INVALID_DISTANCE_TOOFAR_ARRR -// Trace((stderr, "inflate.c too far\n")); -// copy -= state.whave; -// if (copy > state.length) { copy = state.length; } -// if (copy > left) { copy = left; } -// left -= copy; -// state.length -= copy; -// do { -// output[put++] = 0; -// } while (--copy); -// if (state.length === 0) { state.mode = LEN; } -// break; -//#endif - } - if (copy > state.wnext) { - copy -= state.wnext; - from = state.wsize - copy; - } - else { - from = state.wnext - copy; - } - if (copy > state.length) { copy = state.length; } - from_source = state.window; - } - else { /* copy from output */ - from_source = output; - from = put - state.offset; - copy = state.length; - } - if (copy > left) { copy = left; } - left -= copy; - state.length -= copy; - do { - output[put++] = from_source[from++]; - } while (--copy); - if (state.length === 0) { state.mode = LEN; } - break; - case LIT: - if (left === 0) { break inf_leave; } - output[put++] = state.length; - left--; - state.mode = LEN; - break; - case CHECK: - if (state.wrap) { - //=== NEEDBITS(32); - while (bits < 32) { - if (have === 0) { break inf_leave; } - have--; - // Use '|' insdead of '+' to make sure that result is signed - hold |= input[next++] << bits; - bits += 8; - } - //===// - _out -= left; - strm.total_out += _out; - state.total += _out; - if (_out) { - strm.adler = state.check = - /*UPDATE(state.check, put - _out, _out);*/ - (state.flags ? crc32(state.check, output, _out, put - _out) : adler32(state.check, output, _out, put - _out)); - - } - _out = left; - // NB: crc32 stored as signed 32-bit int, zswap32 returns signed too - if ((state.flags ? hold : zswap32(hold)) !== state.check) { - strm.msg = 'incorrect data check'; - state.mode = BAD; - break; - } - //=== INITBITS(); - hold = 0; - bits = 0; - //===// - //Tracev((stderr, "inflate: check matches trailer\n")); - } - state.mode = LENGTH; - /* falls through */ - case LENGTH: - if (state.wrap && state.flags) { - //=== NEEDBITS(32); - while (bits < 32) { - if (have === 0) { break inf_leave; } - have--; - hold += input[next++] << bits; - bits += 8; - } - //===// - if (hold !== (state.total & 0xffffffff)) { - strm.msg = 'incorrect length check'; - state.mode = BAD; - break; - } - //=== INITBITS(); - hold = 0; - bits = 0; - //===// - //Tracev((stderr, "inflate: length matches trailer\n")); - } - state.mode = DONE; - /* falls through */ - case DONE: - ret = Z_STREAM_END; - break inf_leave; - case BAD: - ret = Z_DATA_ERROR; - break inf_leave; - case MEM: - return Z_MEM_ERROR; - case SYNC: - /* falls through */ - default: - return Z_STREAM_ERROR; - } - } - - // inf_leave <- here is real place for "goto inf_leave", emulated via "break inf_leave" - - /* - Return from inflate(), updating the total counts and the check value. - If there was no progress during the inflate() call, return a buffer - error. Call updatewindow() to create and/or update the window state. - Note: a memory error from inflate() is non-recoverable. - */ - - //--- RESTORE() --- - strm.next_out = put; - strm.avail_out = left; - strm.next_in = next; - strm.avail_in = have; - state.hold = hold; - state.bits = bits; - //--- - - if (state.wsize || (_out !== strm.avail_out && state.mode < BAD && - (state.mode < CHECK || flush !== Z_FINISH))) { - if (updatewindow(strm, strm.output, strm.next_out, _out - strm.avail_out)) { - state.mode = MEM; - return Z_MEM_ERROR; - } - } - _in -= strm.avail_in; - _out -= strm.avail_out; - strm.total_in += _in; - strm.total_out += _out; - state.total += _out; - if (state.wrap && _out) { - strm.adler = state.check = /*UPDATE(state.check, strm.next_out - _out, _out);*/ - (state.flags ? crc32(state.check, output, _out, strm.next_out - _out) : adler32(state.check, output, _out, strm.next_out - _out)); - } - strm.data_type = state.bits + (state.last ? 64 : 0) + - (state.mode === TYPE ? 128 : 0) + - (state.mode === LEN_ || state.mode === COPY_ ? 256 : 0); - if (((_in === 0 && _out === 0) || flush === Z_FINISH) && ret === Z_OK) { - ret = Z_BUF_ERROR; - } - return ret; -} - -function inflateEnd(strm) { - - if (!strm || !strm.state /*|| strm->zfree == (free_func)0*/) { - return Z_STREAM_ERROR; - } - - var state = strm.state; - if (state.window) { - state.window = null; - } - strm.state = null; - return Z_OK; -} - -function inflateGetHeader(strm, head) { - var state; - - /* check state */ - if (!strm || !strm.state) { return Z_STREAM_ERROR; } - state = strm.state; - if ((state.wrap & 2) === 0) { return Z_STREAM_ERROR; } - - /* save header structure */ - state.head = head; - head.done = false; - return Z_OK; -} - -function inflateSetDictionary(strm, dictionary) { - var dictLength = dictionary.length; - - var state; - var dictid; - var ret; - - /* check state */ - if (!strm /* == Z_NULL */ || !strm.state /* == Z_NULL */) { return Z_STREAM_ERROR; } - state = strm.state; - - if (state.wrap !== 0 && state.mode !== DICT) { - return Z_STREAM_ERROR; - } - - /* check for correct dictionary identifier */ - if (state.mode === DICT) { - dictid = 1; /* adler32(0, null, 0)*/ - /* dictid = adler32(dictid, dictionary, dictLength); */ - dictid = adler32(dictid, dictionary, dictLength, 0); - if (dictid !== state.check) { - return Z_DATA_ERROR; - } - } - /* copy dictionary to window using updatewindow(), which will amend the - existing dictionary if appropriate */ - ret = updatewindow(strm, dictionary, dictLength, dictLength); - if (ret) { - state.mode = MEM; - return Z_MEM_ERROR; - } - state.havedict = 1; - // Tracev((stderr, "inflate: dictionary set\n")); - return Z_OK; -} - -exports.inflateReset = inflateReset; -exports.inflateReset2 = inflateReset2; -exports.inflateResetKeep = inflateResetKeep; -exports.inflateInit = inflateInit; -exports.inflateInit2 = inflateInit2; -exports.inflate = inflate; -exports.inflateEnd = inflateEnd; -exports.inflateGetHeader = inflateGetHeader; -exports.inflateSetDictionary = inflateSetDictionary; -exports.inflateInfo = 'pako inflate (from Nodeca project)'; - -/* Not implemented -exports.inflateCopy = inflateCopy; -exports.inflateGetDictionary = inflateGetDictionary; -exports.inflateMark = inflateMark; -exports.inflatePrime = inflatePrime; -exports.inflateSync = inflateSync; -exports.inflateSyncPoint = inflateSyncPoint; -exports.inflateUndermine = inflateUndermine; -*/ - -},{"../utils/common":3,"./adler32":5,"./crc32":7,"./inffast":10,"./inftrees":12}],12:[function(require,module,exports){ -'use strict'; - - -var utils = require('../utils/common'); - -var MAXBITS = 15; -var ENOUGH_LENS = 852; -var ENOUGH_DISTS = 592; -//var ENOUGH = (ENOUGH_LENS+ENOUGH_DISTS); - -var CODES = 0; -var LENS = 1; -var DISTS = 2; - -var lbase = [ /* Length codes 257..285 base */ - 3, 4, 5, 6, 7, 8, 9, 10, 11, 13, 15, 17, 19, 23, 27, 31, - 35, 43, 51, 59, 67, 83, 99, 115, 131, 163, 195, 227, 258, 0, 0 -]; - -var lext = [ /* Length codes 257..285 extra */ - 16, 16, 16, 16, 16, 16, 16, 16, 17, 17, 17, 17, 18, 18, 18, 18, - 19, 19, 19, 19, 20, 20, 20, 20, 21, 21, 21, 21, 16, 72, 78 -]; - -var dbase = [ /* Distance codes 0..29 base */ - 1, 2, 3, 4, 5, 7, 9, 13, 17, 25, 33, 49, 65, 97, 129, 193, - 257, 385, 513, 769, 1025, 1537, 2049, 3073, 4097, 6145, - 8193, 12289, 16385, 24577, 0, 0 -]; - -var dext = [ /* Distance codes 0..29 extra */ - 16, 16, 16, 16, 17, 17, 18, 18, 19, 19, 20, 20, 21, 21, 22, 22, - 23, 23, 24, 24, 25, 25, 26, 26, 27, 27, - 28, 28, 29, 29, 64, 64 -]; - -module.exports = function inflate_table(type, lens, lens_index, codes, table, table_index, work, opts) -{ - var bits = opts.bits; - //here = opts.here; /* table entry for duplication */ - - var len = 0; /* a code's length in bits */ - var sym = 0; /* index of code symbols */ - var min = 0, max = 0; /* minimum and maximum code lengths */ - var root = 0; /* number of index bits for root table */ - var curr = 0; /* number of index bits for current table */ - var drop = 0; /* code bits to drop for sub-table */ - var left = 0; /* number of prefix codes available */ - var used = 0; /* code entries in table used */ - var huff = 0; /* Huffman code */ - var incr; /* for incrementing code, index */ - var fill; /* index for replicating entries */ - var low; /* low bits for current root entry */ - var mask; /* mask for low root bits */ - var next; /* next available space in table */ - var base = null; /* base value table to use */ - var base_index = 0; -// var shoextra; /* extra bits table to use */ - var end; /* use base and extra for symbol > end */ - var count = new utils.Buf16(MAXBITS + 1); //[MAXBITS+1]; /* number of codes of each length */ - var offs = new utils.Buf16(MAXBITS + 1); //[MAXBITS+1]; /* offsets in table for each length */ - var extra = null; - var extra_index = 0; - - var here_bits, here_op, here_val; - - /* - Process a set of code lengths to create a canonical Huffman code. The - code lengths are lens[0..codes-1]. Each length corresponds to the - symbols 0..codes-1. The Huffman code is generated by first sorting the - symbols by length from short to long, and retaining the symbol order - for codes with equal lengths. Then the code starts with all zero bits - for the first code of the shortest length, and the codes are integer - increments for the same length, and zeros are appended as the length - increases. For the deflate format, these bits are stored backwards - from their more natural integer increment ordering, and so when the - decoding tables are built in the large loop below, the integer codes - are incremented backwards. - - This routine assumes, but does not check, that all of the entries in - lens[] are in the range 0..MAXBITS. The caller must assure this. - 1..MAXBITS is interpreted as that code length. zero means that that - symbol does not occur in this code. - - The codes are sorted by computing a count of codes for each length, - creating from that a table of starting indices for each length in the - sorted table, and then entering the symbols in order in the sorted - table. The sorted table is work[], with that space being provided by - the caller. - - The length counts are used for other purposes as well, i.e. finding - the minimum and maximum length codes, determining if there are any - codes at all, checking for a valid set of lengths, and looking ahead - at length counts to determine sub-table sizes when building the - decoding tables. - */ - - /* accumulate lengths for codes (assumes lens[] all in 0..MAXBITS) */ - for (len = 0; len <= MAXBITS; len++) { - count[len] = 0; - } - for (sym = 0; sym < codes; sym++) { - count[lens[lens_index + sym]]++; - } - - /* bound code lengths, force root to be within code lengths */ - root = bits; - for (max = MAXBITS; max >= 1; max--) { - if (count[max] !== 0) { break; } - } - if (root > max) { - root = max; - } - if (max === 0) { /* no symbols to code at all */ - //table.op[opts.table_index] = 64; //here.op = (var char)64; /* invalid code marker */ - //table.bits[opts.table_index] = 1; //here.bits = (var char)1; - //table.val[opts.table_index++] = 0; //here.val = (var short)0; - table[table_index++] = (1 << 24) | (64 << 16) | 0; - - - //table.op[opts.table_index] = 64; - //table.bits[opts.table_index] = 1; - //table.val[opts.table_index++] = 0; - table[table_index++] = (1 << 24) | (64 << 16) | 0; - - opts.bits = 1; - return 0; /* no symbols, but wait for decoding to report error */ - } - for (min = 1; min < max; min++) { - if (count[min] !== 0) { break; } - } - if (root < min) { - root = min; - } - - /* check for an over-subscribed or incomplete set of lengths */ - left = 1; - for (len = 1; len <= MAXBITS; len++) { - left <<= 1; - left -= count[len]; - if (left < 0) { - return -1; - } /* over-subscribed */ - } - if (left > 0 && (type === CODES || max !== 1)) { - return -1; /* incomplete set */ - } - - /* generate offsets into symbol table for each length for sorting */ - offs[1] = 0; - for (len = 1; len < MAXBITS; len++) { - offs[len + 1] = offs[len] + count[len]; - } - - /* sort symbols by length, by symbol order within each length */ - for (sym = 0; sym < codes; sym++) { - if (lens[lens_index + sym] !== 0) { - work[offs[lens[lens_index + sym]]++] = sym; - } - } - - /* - Create and fill in decoding tables. In this loop, the table being - filled is at next and has curr index bits. The code being used is huff - with length len. That code is converted to an index by dropping drop - bits off of the bottom. For codes where len is less than drop + curr, - those top drop + curr - len bits are incremented through all values to - fill the table with replicated entries. - - root is the number of index bits for the root table. When len exceeds - root, sub-tables are created pointed to by the root entry with an index - of the low root bits of huff. This is saved in low to check for when a - new sub-table should be started. drop is zero when the root table is - being filled, and drop is root when sub-tables are being filled. - - When a new sub-table is needed, it is necessary to look ahead in the - code lengths to determine what size sub-table is needed. The length - counts are used for this, and so count[] is decremented as codes are - entered in the tables. - - used keeps track of how many table entries have been allocated from the - provided *table space. It is checked for LENS and DIST tables against - the constants ENOUGH_LENS and ENOUGH_DISTS to guard against changes in - the initial root table size constants. See the comments in inftrees.h - for more information. - - sym increments through all symbols, and the loop terminates when - all codes of length max, i.e. all codes, have been processed. This - routine permits incomplete codes, so another loop after this one fills - in the rest of the decoding tables with invalid code markers. - */ - - /* set up for code type */ - // poor man optimization - use if-else instead of switch, - // to avoid deopts in old v8 - if (type === CODES) { - base = extra = work; /* dummy value--not used */ - end = 19; - - } else if (type === LENS) { - base = lbase; - base_index -= 257; - extra = lext; - extra_index -= 257; - end = 256; - - } else { /* DISTS */ - base = dbase; - extra = dext; - end = -1; - } - - /* initialize opts for loop */ - huff = 0; /* starting code */ - sym = 0; /* starting code symbol */ - len = min; /* starting code length */ - next = table_index; /* current table to fill in */ - curr = root; /* current table index bits */ - drop = 0; /* current bits to drop from code for index */ - low = -1; /* trigger new sub-table when len > root */ - used = 1 << root; /* use root table entries */ - mask = used - 1; /* mask for comparing low */ - - /* check available table space */ - if ((type === LENS && used > ENOUGH_LENS) || - (type === DISTS && used > ENOUGH_DISTS)) { - return 1; - } - - var i = 0; - /* process all codes and make table entries */ - for (;;) { - i++; - /* create table entry */ - here_bits = len - drop; - if (work[sym] < end) { - here_op = 0; - here_val = work[sym]; - } - else if (work[sym] > end) { - here_op = extra[extra_index + work[sym]]; - here_val = base[base_index + work[sym]]; - } - else { - here_op = 32 + 64; /* end of block */ - here_val = 0; - } - - /* replicate for those indices with low len bits equal to huff */ - incr = 1 << (len - drop); - fill = 1 << curr; - min = fill; /* save offset to next table */ - do { - fill -= incr; - table[next + (huff >> drop) + fill] = (here_bits << 24) | (here_op << 16) | here_val |0; - } while (fill !== 0); - - /* backwards increment the len-bit code huff */ - incr = 1 << (len - 1); - while (huff & incr) { - incr >>= 1; - } - if (incr !== 0) { - huff &= incr - 1; - huff += incr; - } else { - huff = 0; - } - - /* go to next symbol, update count, len */ - sym++; - if (--count[len] === 0) { - if (len === max) { break; } - len = lens[lens_index + work[sym]]; - } - - /* create new sub-table if needed */ - if (len > root && (huff & mask) !== low) { - /* if first time, transition to sub-tables */ - if (drop === 0) { - drop = root; - } - - /* increment past last table */ - next += min; /* here min is 1 << curr */ - - /* determine length of next table */ - curr = len - drop; - left = 1 << curr; - while (curr + drop < max) { - left -= count[curr + drop]; - if (left <= 0) { break; } - curr++; - left <<= 1; - } - - /* check for enough space */ - used += 1 << curr; - if ((type === LENS && used > ENOUGH_LENS) || - (type === DISTS && used > ENOUGH_DISTS)) { - return 1; - } - - /* point entry in root table to sub-table */ - low = huff & mask; - /*table.op[low] = curr; - table.bits[low] = root; - table.val[low] = next - opts.table_index;*/ - table[low] = (root << 24) | (curr << 16) | (next - table_index) |0; - } - } - - /* fill in remaining table entry if code is incomplete (guaranteed to have - at most one remaining entry, since if the code is incomplete, the - maximum code length that was allowed to get this far is one bit) */ - if (huff !== 0) { - //table.op[next + huff] = 64; /* invalid code marker */ - //table.bits[next + huff] = len - drop; - //table.val[next + huff] = 0; - table[next + huff] = ((len - drop) << 24) | (64 << 16) |0; - } - - /* set return parameters */ - //opts.table_index += used; - opts.bits = root; - return 0; -}; - -},{"../utils/common":3}],13:[function(require,module,exports){ -'use strict'; - -module.exports = { - 2: 'need dictionary', /* Z_NEED_DICT 2 */ - 1: 'stream end', /* Z_STREAM_END 1 */ - 0: '', /* Z_OK 0 */ - '-1': 'file error', /* Z_ERRNO (-1) */ - '-2': 'stream error', /* Z_STREAM_ERROR (-2) */ - '-3': 'data error', /* Z_DATA_ERROR (-3) */ - '-4': 'insufficient memory', /* Z_MEM_ERROR (-4) */ - '-5': 'buffer error', /* Z_BUF_ERROR (-5) */ - '-6': 'incompatible version' /* Z_VERSION_ERROR (-6) */ -}; - -},{}],14:[function(require,module,exports){ -'use strict'; - - -var utils = require('../utils/common'); - -/* Public constants ==========================================================*/ -/* ===========================================================================*/ - - -//var Z_FILTERED = 1; -//var Z_HUFFMAN_ONLY = 2; -//var Z_RLE = 3; -var Z_FIXED = 4; -//var Z_DEFAULT_STRATEGY = 0; - -/* Possible values of the data_type field (though see inflate()) */ -var Z_BINARY = 0; -var Z_TEXT = 1; -//var Z_ASCII = 1; // = Z_TEXT -var Z_UNKNOWN = 2; - -/*============================================================================*/ - - -function zero(buf) { var len = buf.length; while (--len >= 0) { buf[len] = 0; } } - -// From zutil.h - -var STORED_BLOCK = 0; -var STATIC_TREES = 1; -var DYN_TREES = 2; -/* The three kinds of block type */ - -var MIN_MATCH = 3; -var MAX_MATCH = 258; -/* The minimum and maximum match lengths */ - -// From deflate.h -/* =========================================================================== - * Internal compression state. - */ - -var LENGTH_CODES = 29; -/* number of length codes, not counting the special END_BLOCK code */ - -var LITERALS = 256; -/* number of literal bytes 0..255 */ - -var L_CODES = LITERALS + 1 + LENGTH_CODES; -/* number of Literal or Length codes, including the END_BLOCK code */ - -var D_CODES = 30; -/* number of distance codes */ - -var BL_CODES = 19; -/* number of codes used to transfer the bit lengths */ - -var HEAP_SIZE = 2 * L_CODES + 1; -/* maximum heap size */ - -var MAX_BITS = 15; -/* All codes must not exceed MAX_BITS bits */ - -var Buf_size = 16; -/* size of bit buffer in bi_buf */ - - -/* =========================================================================== - * Constants - */ - -var MAX_BL_BITS = 7; -/* Bit length codes must not exceed MAX_BL_BITS bits */ - -var END_BLOCK = 256; -/* end of block literal code */ - -var REP_3_6 = 16; -/* repeat previous bit length 3-6 times (2 bits of repeat count) */ - -var REPZ_3_10 = 17; -/* repeat a zero length 3-10 times (3 bits of repeat count) */ - -var REPZ_11_138 = 18; -/* repeat a zero length 11-138 times (7 bits of repeat count) */ - -/* eslint-disable comma-spacing,array-bracket-spacing */ -var extra_lbits = /* extra bits for each length code */ - [0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0]; - -var extra_dbits = /* extra bits for each distance code */ - [0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13]; - -var extra_blbits = /* extra bits for each bit length code */ - [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7]; - -var bl_order = - [16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]; -/* eslint-enable comma-spacing,array-bracket-spacing */ - -/* The lengths of the bit length codes are sent in order of decreasing - * probability, to avoid transmitting the lengths for unused bit length codes. - */ - -/* =========================================================================== - * Local data. These are initialized only once. - */ - -// We pre-fill arrays with 0 to avoid uninitialized gaps - -var DIST_CODE_LEN = 512; /* see definition of array dist_code below */ - -// !!!! Use flat array insdead of structure, Freq = i*2, Len = i*2+1 -var static_ltree = new Array((L_CODES + 2) * 2); -zero(static_ltree); -/* The static literal tree. Since the bit lengths are imposed, there is no - * need for the L_CODES extra codes used during heap construction. However - * The codes 286 and 287 are needed to build a canonical tree (see _tr_init - * below). - */ - -var static_dtree = new Array(D_CODES * 2); -zero(static_dtree); -/* The static distance tree. (Actually a trivial tree since all codes use - * 5 bits.) - */ - -var _dist_code = new Array(DIST_CODE_LEN); -zero(_dist_code); -/* Distance codes. The first 256 values correspond to the distances - * 3 .. 258, the last 256 values correspond to the top 8 bits of - * the 15 bit distances. - */ - -var _length_code = new Array(MAX_MATCH - MIN_MATCH + 1); -zero(_length_code); -/* length code for each normalized match length (0 == MIN_MATCH) */ - -var base_length = new Array(LENGTH_CODES); -zero(base_length); -/* First normalized length for each code (0 = MIN_MATCH) */ - -var base_dist = new Array(D_CODES); -zero(base_dist); -/* First normalized distance for each code (0 = distance of 1) */ - - -function StaticTreeDesc(static_tree, extra_bits, extra_base, elems, max_length) { - - this.static_tree = static_tree; /* static tree or NULL */ - this.extra_bits = extra_bits; /* extra bits for each code or NULL */ - this.extra_base = extra_base; /* base index for extra_bits */ - this.elems = elems; /* max number of elements in the tree */ - this.max_length = max_length; /* max bit length for the codes */ - - // show if `static_tree` has data or dummy - needed for monomorphic objects - this.has_stree = static_tree && static_tree.length; -} - - -var static_l_desc; -var static_d_desc; -var static_bl_desc; - - -function TreeDesc(dyn_tree, stat_desc) { - this.dyn_tree = dyn_tree; /* the dynamic tree */ - this.max_code = 0; /* largest code with non zero frequency */ - this.stat_desc = stat_desc; /* the corresponding static tree */ -} - - - -function d_code(dist) { - return dist < 256 ? _dist_code[dist] : _dist_code[256 + (dist >>> 7)]; -} - - -/* =========================================================================== - * Output a short LSB first on the stream. - * IN assertion: there is enough room in pendingBuf. - */ -function put_short(s, w) { -// put_byte(s, (uch)((w) & 0xff)); -// put_byte(s, (uch)((ush)(w) >> 8)); - s.pending_buf[s.pending++] = (w) & 0xff; - s.pending_buf[s.pending++] = (w >>> 8) & 0xff; -} - - -/* =========================================================================== - * Send a value on a given number of bits. - * IN assertion: length <= 16 and value fits in length bits. - */ -function send_bits(s, value, length) { - if (s.bi_valid > (Buf_size - length)) { - s.bi_buf |= (value << s.bi_valid) & 0xffff; - put_short(s, s.bi_buf); - s.bi_buf = value >> (Buf_size - s.bi_valid); - s.bi_valid += length - Buf_size; - } else { - s.bi_buf |= (value << s.bi_valid) & 0xffff; - s.bi_valid += length; - } -} - - -function send_code(s, c, tree) { - send_bits(s, tree[c * 2]/*.Code*/, tree[c * 2 + 1]/*.Len*/); -} - - -/* =========================================================================== - * Reverse the first len bits of a code, using straightforward code (a faster - * method would use a table) - * IN assertion: 1 <= len <= 15 - */ -function bi_reverse(code, len) { - var res = 0; - do { - res |= code & 1; - code >>>= 1; - res <<= 1; - } while (--len > 0); - return res >>> 1; -} - - -/* =========================================================================== - * Flush the bit buffer, keeping at most 7 bits in it. - */ -function bi_flush(s) { - if (s.bi_valid === 16) { - put_short(s, s.bi_buf); - s.bi_buf = 0; - s.bi_valid = 0; - - } else if (s.bi_valid >= 8) { - s.pending_buf[s.pending++] = s.bi_buf & 0xff; - s.bi_buf >>= 8; - s.bi_valid -= 8; - } -} - - -/* =========================================================================== - * Compute the optimal bit lengths for a tree and update the total bit length - * for the current block. - * IN assertion: the fields freq and dad are set, heap[heap_max] and - * above are the tree nodes sorted by increasing frequency. - * OUT assertions: the field len is set to the optimal bit length, the - * array bl_count contains the frequencies for each bit length. - * The length opt_len is updated; static_len is also updated if stree is - * not null. - */ -function gen_bitlen(s, desc) -// deflate_state *s; -// tree_desc *desc; /* the tree descriptor */ -{ - var tree = desc.dyn_tree; - var max_code = desc.max_code; - var stree = desc.stat_desc.static_tree; - var has_stree = desc.stat_desc.has_stree; - var extra = desc.stat_desc.extra_bits; - var base = desc.stat_desc.extra_base; - var max_length = desc.stat_desc.max_length; - var h; /* heap index */ - var n, m; /* iterate over the tree elements */ - var bits; /* bit length */ - var xbits; /* extra bits */ - var f; /* frequency */ - var overflow = 0; /* number of elements with bit length too large */ - - for (bits = 0; bits <= MAX_BITS; bits++) { - s.bl_count[bits] = 0; - } - - /* In a first pass, compute the optimal bit lengths (which may - * overflow in the case of the bit length tree). - */ - tree[s.heap[s.heap_max] * 2 + 1]/*.Len*/ = 0; /* root of the heap */ - - for (h = s.heap_max + 1; h < HEAP_SIZE; h++) { - n = s.heap[h]; - bits = tree[tree[n * 2 + 1]/*.Dad*/ * 2 + 1]/*.Len*/ + 1; - if (bits > max_length) { - bits = max_length; - overflow++; - } - tree[n * 2 + 1]/*.Len*/ = bits; - /* We overwrite tree[n].Dad which is no longer needed */ - - if (n > max_code) { continue; } /* not a leaf node */ - - s.bl_count[bits]++; - xbits = 0; - if (n >= base) { - xbits = extra[n - base]; - } - f = tree[n * 2]/*.Freq*/; - s.opt_len += f * (bits + xbits); - if (has_stree) { - s.static_len += f * (stree[n * 2 + 1]/*.Len*/ + xbits); - } - } - if (overflow === 0) { return; } - - // Trace((stderr,"\nbit length overflow\n")); - /* This happens for example on obj2 and pic of the Calgary corpus */ - - /* Find the first bit length which could increase: */ - do { - bits = max_length - 1; - while (s.bl_count[bits] === 0) { bits--; } - s.bl_count[bits]--; /* move one leaf down the tree */ - s.bl_count[bits + 1] += 2; /* move one overflow item as its brother */ - s.bl_count[max_length]--; - /* The brother of the overflow item also moves one step up, - * but this does not affect bl_count[max_length] - */ - overflow -= 2; - } while (overflow > 0); - - /* Now recompute all bit lengths, scanning in increasing frequency. - * h is still equal to HEAP_SIZE. (It is simpler to reconstruct all - * lengths instead of fixing only the wrong ones. This idea is taken - * from 'ar' written by Haruhiko Okumura.) - */ - for (bits = max_length; bits !== 0; bits--) { - n = s.bl_count[bits]; - while (n !== 0) { - m = s.heap[--h]; - if (m > max_code) { continue; } - if (tree[m * 2 + 1]/*.Len*/ !== bits) { - // Trace((stderr,"code %d bits %d->%d\n", m, tree[m].Len, bits)); - s.opt_len += (bits - tree[m * 2 + 1]/*.Len*/) * tree[m * 2]/*.Freq*/; - tree[m * 2 + 1]/*.Len*/ = bits; - } - n--; - } - } -} - - -/* =========================================================================== - * Generate the codes for a given tree and bit counts (which need not be - * optimal). - * IN assertion: the array bl_count contains the bit length statistics for - * the given tree and the field len is set for all tree elements. - * OUT assertion: the field code is set for all tree elements of non - * zero code length. - */ -function gen_codes(tree, max_code, bl_count) -// ct_data *tree; /* the tree to decorate */ -// int max_code; /* largest code with non zero frequency */ -// ushf *bl_count; /* number of codes at each bit length */ -{ - var next_code = new Array(MAX_BITS + 1); /* next code value for each bit length */ - var code = 0; /* running code value */ - var bits; /* bit index */ - var n; /* code index */ - - /* The distribution counts are first used to generate the code values - * without bit reversal. - */ - for (bits = 1; bits <= MAX_BITS; bits++) { - next_code[bits] = code = (code + bl_count[bits - 1]) << 1; - } - /* Check that the bit counts in bl_count are consistent. The last code - * must be all ones. - */ - //Assert (code + bl_count[MAX_BITS]-1 == (1< length code (0..28) */ - length = 0; - for (code = 0; code < LENGTH_CODES - 1; code++) { - base_length[code] = length; - for (n = 0; n < (1 << extra_lbits[code]); n++) { - _length_code[length++] = code; - } - } - //Assert (length == 256, "tr_static_init: length != 256"); - /* Note that the length 255 (match length 258) can be represented - * in two different ways: code 284 + 5 bits or code 285, so we - * overwrite length_code[255] to use the best encoding: - */ - _length_code[length - 1] = code; - - /* Initialize the mapping dist (0..32K) -> dist code (0..29) */ - dist = 0; - for (code = 0; code < 16; code++) { - base_dist[code] = dist; - for (n = 0; n < (1 << extra_dbits[code]); n++) { - _dist_code[dist++] = code; - } - } - //Assert (dist == 256, "tr_static_init: dist != 256"); - dist >>= 7; /* from now on, all distances are divided by 128 */ - for (; code < D_CODES; code++) { - base_dist[code] = dist << 7; - for (n = 0; n < (1 << (extra_dbits[code] - 7)); n++) { - _dist_code[256 + dist++] = code; - } - } - //Assert (dist == 256, "tr_static_init: 256+dist != 512"); - - /* Construct the codes of the static literal tree */ - for (bits = 0; bits <= MAX_BITS; bits++) { - bl_count[bits] = 0; - } - - n = 0; - while (n <= 143) { - static_ltree[n * 2 + 1]/*.Len*/ = 8; - n++; - bl_count[8]++; - } - while (n <= 255) { - static_ltree[n * 2 + 1]/*.Len*/ = 9; - n++; - bl_count[9]++; - } - while (n <= 279) { - static_ltree[n * 2 + 1]/*.Len*/ = 7; - n++; - bl_count[7]++; - } - while (n <= 287) { - static_ltree[n * 2 + 1]/*.Len*/ = 8; - n++; - bl_count[8]++; - } - /* Codes 286 and 287 do not exist, but we must include them in the - * tree construction to get a canonical Huffman tree (longest code - * all ones) - */ - gen_codes(static_ltree, L_CODES + 1, bl_count); - - /* The static distance tree is trivial: */ - for (n = 0; n < D_CODES; n++) { - static_dtree[n * 2 + 1]/*.Len*/ = 5; - static_dtree[n * 2]/*.Code*/ = bi_reverse(n, 5); - } - - // Now data ready and we can init static trees - static_l_desc = new StaticTreeDesc(static_ltree, extra_lbits, LITERALS + 1, L_CODES, MAX_BITS); - static_d_desc = new StaticTreeDesc(static_dtree, extra_dbits, 0, D_CODES, MAX_BITS); - static_bl_desc = new StaticTreeDesc(new Array(0), extra_blbits, 0, BL_CODES, MAX_BL_BITS); - - //static_init_done = true; -} - - -/* =========================================================================== - * Initialize a new block. - */ -function init_block(s) { - var n; /* iterates over tree elements */ - - /* Initialize the trees. */ - for (n = 0; n < L_CODES; n++) { s.dyn_ltree[n * 2]/*.Freq*/ = 0; } - for (n = 0; n < D_CODES; n++) { s.dyn_dtree[n * 2]/*.Freq*/ = 0; } - for (n = 0; n < BL_CODES; n++) { s.bl_tree[n * 2]/*.Freq*/ = 0; } - - s.dyn_ltree[END_BLOCK * 2]/*.Freq*/ = 1; - s.opt_len = s.static_len = 0; - s.last_lit = s.matches = 0; -} - - -/* =========================================================================== - * Flush the bit buffer and align the output on a byte boundary - */ -function bi_windup(s) -{ - if (s.bi_valid > 8) { - put_short(s, s.bi_buf); - } else if (s.bi_valid > 0) { - //put_byte(s, (Byte)s->bi_buf); - s.pending_buf[s.pending++] = s.bi_buf; - } - s.bi_buf = 0; - s.bi_valid = 0; -} - -/* =========================================================================== - * Copy a stored block, storing first the length and its - * one's complement if requested. - */ -function copy_block(s, buf, len, header) -//DeflateState *s; -//charf *buf; /* the input data */ -//unsigned len; /* its length */ -//int header; /* true if block header must be written */ -{ - bi_windup(s); /* align on byte boundary */ - - if (header) { - put_short(s, len); - put_short(s, ~len); - } -// while (len--) { -// put_byte(s, *buf++); -// } - utils.arraySet(s.pending_buf, s.window, buf, len, s.pending); - s.pending += len; -} - -/* =========================================================================== - * Compares to subtrees, using the tree depth as tie breaker when - * the subtrees have equal frequency. This minimizes the worst case length. - */ -function smaller(tree, n, m, depth) { - var _n2 = n * 2; - var _m2 = m * 2; - return (tree[_n2]/*.Freq*/ < tree[_m2]/*.Freq*/ || - (tree[_n2]/*.Freq*/ === tree[_m2]/*.Freq*/ && depth[n] <= depth[m])); -} - -/* =========================================================================== - * Restore the heap property by moving down the tree starting at node k, - * exchanging a node with the smallest of its two sons if necessary, stopping - * when the heap property is re-established (each father smaller than its - * two sons). - */ -function pqdownheap(s, tree, k) -// deflate_state *s; -// ct_data *tree; /* the tree to restore */ -// int k; /* node to move down */ -{ - var v = s.heap[k]; - var j = k << 1; /* left son of k */ - while (j <= s.heap_len) { - /* Set j to the smallest of the two sons: */ - if (j < s.heap_len && - smaller(tree, s.heap[j + 1], s.heap[j], s.depth)) { - j++; - } - /* Exit if v is smaller than both sons */ - if (smaller(tree, v, s.heap[j], s.depth)) { break; } - - /* Exchange v with the smallest son */ - s.heap[k] = s.heap[j]; - k = j; - - /* And continue down the tree, setting j to the left son of k */ - j <<= 1; - } - s.heap[k] = v; -} - - -// inlined manually -// var SMALLEST = 1; - -/* =========================================================================== - * Send the block data compressed using the given Huffman trees - */ -function compress_block(s, ltree, dtree) -// deflate_state *s; -// const ct_data *ltree; /* literal tree */ -// const ct_data *dtree; /* distance tree */ -{ - var dist; /* distance of matched string */ - var lc; /* match length or unmatched char (if dist == 0) */ - var lx = 0; /* running index in l_buf */ - var code; /* the code to send */ - var extra; /* number of extra bits to send */ - - if (s.last_lit !== 0) { - do { - dist = (s.pending_buf[s.d_buf + lx * 2] << 8) | (s.pending_buf[s.d_buf + lx * 2 + 1]); - lc = s.pending_buf[s.l_buf + lx]; - lx++; - - if (dist === 0) { - send_code(s, lc, ltree); /* send a literal byte */ - //Tracecv(isgraph(lc), (stderr," '%c' ", lc)); - } else { - /* Here, lc is the match length - MIN_MATCH */ - code = _length_code[lc]; - send_code(s, code + LITERALS + 1, ltree); /* send the length code */ - extra = extra_lbits[code]; - if (extra !== 0) { - lc -= base_length[code]; - send_bits(s, lc, extra); /* send the extra length bits */ - } - dist--; /* dist is now the match distance - 1 */ - code = d_code(dist); - //Assert (code < D_CODES, "bad d_code"); - - send_code(s, code, dtree); /* send the distance code */ - extra = extra_dbits[code]; - if (extra !== 0) { - dist -= base_dist[code]; - send_bits(s, dist, extra); /* send the extra distance bits */ - } - } /* literal or match pair ? */ - - /* Check that the overlay between pending_buf and d_buf+l_buf is ok: */ - //Assert((uInt)(s->pending) < s->lit_bufsize + 2*lx, - // "pendingBuf overflow"); - - } while (lx < s.last_lit); - } - - send_code(s, END_BLOCK, ltree); -} - - -/* =========================================================================== - * Construct one Huffman tree and assigns the code bit strings and lengths. - * Update the total bit length for the current block. - * IN assertion: the field freq is set for all tree elements. - * OUT assertions: the fields len and code are set to the optimal bit length - * and corresponding code. The length opt_len is updated; static_len is - * also updated if stree is not null. The field max_code is set. - */ -function build_tree(s, desc) -// deflate_state *s; -// tree_desc *desc; /* the tree descriptor */ -{ - var tree = desc.dyn_tree; - var stree = desc.stat_desc.static_tree; - var has_stree = desc.stat_desc.has_stree; - var elems = desc.stat_desc.elems; - var n, m; /* iterate over heap elements */ - var max_code = -1; /* largest code with non zero frequency */ - var node; /* new node being created */ - - /* Construct the initial heap, with least frequent element in - * heap[SMALLEST]. The sons of heap[n] are heap[2*n] and heap[2*n+1]. - * heap[0] is not used. - */ - s.heap_len = 0; - s.heap_max = HEAP_SIZE; - - for (n = 0; n < elems; n++) { - if (tree[n * 2]/*.Freq*/ !== 0) { - s.heap[++s.heap_len] = max_code = n; - s.depth[n] = 0; - - } else { - tree[n * 2 + 1]/*.Len*/ = 0; - } - } - - /* The pkzip format requires that at least one distance code exists, - * and that at least one bit should be sent even if there is only one - * possible code. So to avoid special checks later on we force at least - * two codes of non zero frequency. - */ - while (s.heap_len < 2) { - node = s.heap[++s.heap_len] = (max_code < 2 ? ++max_code : 0); - tree[node * 2]/*.Freq*/ = 1; - s.depth[node] = 0; - s.opt_len--; - - if (has_stree) { - s.static_len -= stree[node * 2 + 1]/*.Len*/; - } - /* node is 0 or 1 so it does not have extra bits */ - } - desc.max_code = max_code; - - /* The elements heap[heap_len/2+1 .. heap_len] are leaves of the tree, - * establish sub-heaps of increasing lengths: - */ - for (n = (s.heap_len >> 1/*int /2*/); n >= 1; n--) { pqdownheap(s, tree, n); } - - /* Construct the Huffman tree by repeatedly combining the least two - * frequent nodes. - */ - node = elems; /* next internal node of the tree */ - do { - //pqremove(s, tree, n); /* n = node of least frequency */ - /*** pqremove ***/ - n = s.heap[1/*SMALLEST*/]; - s.heap[1/*SMALLEST*/] = s.heap[s.heap_len--]; - pqdownheap(s, tree, 1/*SMALLEST*/); - /***/ - - m = s.heap[1/*SMALLEST*/]; /* m = node of next least frequency */ - - s.heap[--s.heap_max] = n; /* keep the nodes sorted by frequency */ - s.heap[--s.heap_max] = m; - - /* Create a new node father of n and m */ - tree[node * 2]/*.Freq*/ = tree[n * 2]/*.Freq*/ + tree[m * 2]/*.Freq*/; - s.depth[node] = (s.depth[n] >= s.depth[m] ? s.depth[n] : s.depth[m]) + 1; - tree[n * 2 + 1]/*.Dad*/ = tree[m * 2 + 1]/*.Dad*/ = node; - - /* and insert the new node in the heap */ - s.heap[1/*SMALLEST*/] = node++; - pqdownheap(s, tree, 1/*SMALLEST*/); - - } while (s.heap_len >= 2); - - s.heap[--s.heap_max] = s.heap[1/*SMALLEST*/]; - - /* At this point, the fields freq and dad are set. We can now - * generate the bit lengths. - */ - gen_bitlen(s, desc); - - /* The field len is now set, we can generate the bit codes */ - gen_codes(tree, max_code, s.bl_count); -} - - -/* =========================================================================== - * Scan a literal or distance tree to determine the frequencies of the codes - * in the bit length tree. - */ -function scan_tree(s, tree, max_code) -// deflate_state *s; -// ct_data *tree; /* the tree to be scanned */ -// int max_code; /* and its largest code of non zero frequency */ -{ - var n; /* iterates over all tree elements */ - var prevlen = -1; /* last emitted length */ - var curlen; /* length of current code */ - - var nextlen = tree[0 * 2 + 1]/*.Len*/; /* length of next code */ - - var count = 0; /* repeat count of the current code */ - var max_count = 7; /* max repeat count */ - var min_count = 4; /* min repeat count */ - - if (nextlen === 0) { - max_count = 138; - min_count = 3; - } - tree[(max_code + 1) * 2 + 1]/*.Len*/ = 0xffff; /* guard */ - - for (n = 0; n <= max_code; n++) { - curlen = nextlen; - nextlen = tree[(n + 1) * 2 + 1]/*.Len*/; - - if (++count < max_count && curlen === nextlen) { - continue; - - } else if (count < min_count) { - s.bl_tree[curlen * 2]/*.Freq*/ += count; - - } else if (curlen !== 0) { - - if (curlen !== prevlen) { s.bl_tree[curlen * 2]/*.Freq*/++; } - s.bl_tree[REP_3_6 * 2]/*.Freq*/++; - - } else if (count <= 10) { - s.bl_tree[REPZ_3_10 * 2]/*.Freq*/++; - - } else { - s.bl_tree[REPZ_11_138 * 2]/*.Freq*/++; - } - - count = 0; - prevlen = curlen; - - if (nextlen === 0) { - max_count = 138; - min_count = 3; - - } else if (curlen === nextlen) { - max_count = 6; - min_count = 3; - - } else { - max_count = 7; - min_count = 4; - } - } -} - - -/* =========================================================================== - * Send a literal or distance tree in compressed form, using the codes in - * bl_tree. - */ -function send_tree(s, tree, max_code) -// deflate_state *s; -// ct_data *tree; /* the tree to be scanned */ -// int max_code; /* and its largest code of non zero frequency */ -{ - var n; /* iterates over all tree elements */ - var prevlen = -1; /* last emitted length */ - var curlen; /* length of current code */ - - var nextlen = tree[0 * 2 + 1]/*.Len*/; /* length of next code */ - - var count = 0; /* repeat count of the current code */ - var max_count = 7; /* max repeat count */ - var min_count = 4; /* min repeat count */ - - /* tree[max_code+1].Len = -1; */ /* guard already set */ - if (nextlen === 0) { - max_count = 138; - min_count = 3; - } - - for (n = 0; n <= max_code; n++) { - curlen = nextlen; - nextlen = tree[(n + 1) * 2 + 1]/*.Len*/; - - if (++count < max_count && curlen === nextlen) { - continue; - - } else if (count < min_count) { - do { send_code(s, curlen, s.bl_tree); } while (--count !== 0); - - } else if (curlen !== 0) { - if (curlen !== prevlen) { - send_code(s, curlen, s.bl_tree); - count--; - } - //Assert(count >= 3 && count <= 6, " 3_6?"); - send_code(s, REP_3_6, s.bl_tree); - send_bits(s, count - 3, 2); - - } else if (count <= 10) { - send_code(s, REPZ_3_10, s.bl_tree); - send_bits(s, count - 3, 3); - - } else { - send_code(s, REPZ_11_138, s.bl_tree); - send_bits(s, count - 11, 7); - } - - count = 0; - prevlen = curlen; - if (nextlen === 0) { - max_count = 138; - min_count = 3; - - } else if (curlen === nextlen) { - max_count = 6; - min_count = 3; - - } else { - max_count = 7; - min_count = 4; - } - } -} - - -/* =========================================================================== - * Construct the Huffman tree for the bit lengths and return the index in - * bl_order of the last bit length code to send. - */ -function build_bl_tree(s) { - var max_blindex; /* index of last bit length code of non zero freq */ - - /* Determine the bit length frequencies for literal and distance trees */ - scan_tree(s, s.dyn_ltree, s.l_desc.max_code); - scan_tree(s, s.dyn_dtree, s.d_desc.max_code); - - /* Build the bit length tree: */ - build_tree(s, s.bl_desc); - /* opt_len now includes the length of the tree representations, except - * the lengths of the bit lengths codes and the 5+5+4 bits for the counts. - */ - - /* Determine the number of bit length codes to send. The pkzip format - * requires that at least 4 bit length codes be sent. (appnote.txt says - * 3 but the actual value used is 4.) - */ - for (max_blindex = BL_CODES - 1; max_blindex >= 3; max_blindex--) { - if (s.bl_tree[bl_order[max_blindex] * 2 + 1]/*.Len*/ !== 0) { - break; - } - } - /* Update opt_len to include the bit length tree and counts */ - s.opt_len += 3 * (max_blindex + 1) + 5 + 5 + 4; - //Tracev((stderr, "\ndyn trees: dyn %ld, stat %ld", - // s->opt_len, s->static_len)); - - return max_blindex; -} - - -/* =========================================================================== - * Send the header for a block using dynamic Huffman trees: the counts, the - * lengths of the bit length codes, the literal tree and the distance tree. - * IN assertion: lcodes >= 257, dcodes >= 1, blcodes >= 4. - */ -function send_all_trees(s, lcodes, dcodes, blcodes) -// deflate_state *s; -// int lcodes, dcodes, blcodes; /* number of codes for each tree */ -{ - var rank; /* index in bl_order */ - - //Assert (lcodes >= 257 && dcodes >= 1 && blcodes >= 4, "not enough codes"); - //Assert (lcodes <= L_CODES && dcodes <= D_CODES && blcodes <= BL_CODES, - // "too many codes"); - //Tracev((stderr, "\nbl counts: ")); - send_bits(s, lcodes - 257, 5); /* not +255 as stated in appnote.txt */ - send_bits(s, dcodes - 1, 5); - send_bits(s, blcodes - 4, 4); /* not -3 as stated in appnote.txt */ - for (rank = 0; rank < blcodes; rank++) { - //Tracev((stderr, "\nbl code %2d ", bl_order[rank])); - send_bits(s, s.bl_tree[bl_order[rank] * 2 + 1]/*.Len*/, 3); - } - //Tracev((stderr, "\nbl tree: sent %ld", s->bits_sent)); - - send_tree(s, s.dyn_ltree, lcodes - 1); /* literal tree */ - //Tracev((stderr, "\nlit tree: sent %ld", s->bits_sent)); - - send_tree(s, s.dyn_dtree, dcodes - 1); /* distance tree */ - //Tracev((stderr, "\ndist tree: sent %ld", s->bits_sent)); -} - - -/* =========================================================================== - * Check if the data type is TEXT or BINARY, using the following algorithm: - * - TEXT if the two conditions below are satisfied: - * a) There are no non-portable control characters belonging to the - * "black list" (0..6, 14..25, 28..31). - * b) There is at least one printable character belonging to the - * "white list" (9 {TAB}, 10 {LF}, 13 {CR}, 32..255). - * - BINARY otherwise. - * - The following partially-portable control characters form a - * "gray list" that is ignored in this detection algorithm: - * (7 {BEL}, 8 {BS}, 11 {VT}, 12 {FF}, 26 {SUB}, 27 {ESC}). - * IN assertion: the fields Freq of dyn_ltree are set. - */ -function detect_data_type(s) { - /* black_mask is the bit mask of black-listed bytes - * set bits 0..6, 14..25, and 28..31 - * 0xf3ffc07f = binary 11110011111111111100000001111111 - */ - var black_mask = 0xf3ffc07f; - var n; - - /* Check for non-textual ("black-listed") bytes. */ - for (n = 0; n <= 31; n++, black_mask >>>= 1) { - if ((black_mask & 1) && (s.dyn_ltree[n * 2]/*.Freq*/ !== 0)) { - return Z_BINARY; - } - } - - /* Check for textual ("white-listed") bytes. */ - if (s.dyn_ltree[9 * 2]/*.Freq*/ !== 0 || s.dyn_ltree[10 * 2]/*.Freq*/ !== 0 || - s.dyn_ltree[13 * 2]/*.Freq*/ !== 0) { - return Z_TEXT; - } - for (n = 32; n < LITERALS; n++) { - if (s.dyn_ltree[n * 2]/*.Freq*/ !== 0) { - return Z_TEXT; - } - } - - /* There are no "black-listed" or "white-listed" bytes: - * this stream either is empty or has tolerated ("gray-listed") bytes only. - */ - return Z_BINARY; -} - - -var static_init_done = false; - -/* =========================================================================== - * Initialize the tree data structures for a new zlib stream. - */ -function _tr_init(s) -{ - - if (!static_init_done) { - tr_static_init(); - static_init_done = true; - } - - s.l_desc = new TreeDesc(s.dyn_ltree, static_l_desc); - s.d_desc = new TreeDesc(s.dyn_dtree, static_d_desc); - s.bl_desc = new TreeDesc(s.bl_tree, static_bl_desc); - - s.bi_buf = 0; - s.bi_valid = 0; - - /* Initialize the first block of the first file: */ - init_block(s); -} - - -/* =========================================================================== - * Send a stored block - */ -function _tr_stored_block(s, buf, stored_len, last) -//DeflateState *s; -//charf *buf; /* input block */ -//ulg stored_len; /* length of input block */ -//int last; /* one if this is the last block for a file */ -{ - send_bits(s, (STORED_BLOCK << 1) + (last ? 1 : 0), 3); /* send block type */ - copy_block(s, buf, stored_len, true); /* with header */ -} - - -/* =========================================================================== - * Send one empty static block to give enough lookahead for inflate. - * This takes 10 bits, of which 7 may remain in the bit buffer. - */ -function _tr_align(s) { - send_bits(s, STATIC_TREES << 1, 3); - send_code(s, END_BLOCK, static_ltree); - bi_flush(s); -} - - -/* =========================================================================== - * Determine the best encoding for the current block: dynamic trees, static - * trees or store, and output the encoded block to the zip file. - */ -function _tr_flush_block(s, buf, stored_len, last) -//DeflateState *s; -//charf *buf; /* input block, or NULL if too old */ -//ulg stored_len; /* length of input block */ -//int last; /* one if this is the last block for a file */ -{ - var opt_lenb, static_lenb; /* opt_len and static_len in bytes */ - var max_blindex = 0; /* index of last bit length code of non zero freq */ - - /* Build the Huffman trees unless a stored block is forced */ - if (s.level > 0) { - - /* Check if the file is binary or text */ - if (s.strm.data_type === Z_UNKNOWN) { - s.strm.data_type = detect_data_type(s); - } - - /* Construct the literal and distance trees */ - build_tree(s, s.l_desc); - // Tracev((stderr, "\nlit data: dyn %ld, stat %ld", s->opt_len, - // s->static_len)); - - build_tree(s, s.d_desc); - // Tracev((stderr, "\ndist data: dyn %ld, stat %ld", s->opt_len, - // s->static_len)); - /* At this point, opt_len and static_len are the total bit lengths of - * the compressed block data, excluding the tree representations. - */ - - /* Build the bit length tree for the above two trees, and get the index - * in bl_order of the last bit length code to send. - */ - max_blindex = build_bl_tree(s); - - /* Determine the best encoding. Compute the block lengths in bytes. */ - opt_lenb = (s.opt_len + 3 + 7) >>> 3; - static_lenb = (s.static_len + 3 + 7) >>> 3; - - // Tracev((stderr, "\nopt %lu(%lu) stat %lu(%lu) stored %lu lit %u ", - // opt_lenb, s->opt_len, static_lenb, s->static_len, stored_len, - // s->last_lit)); - - if (static_lenb <= opt_lenb) { opt_lenb = static_lenb; } - - } else { - // Assert(buf != (char*)0, "lost buf"); - opt_lenb = static_lenb = stored_len + 5; /* force a stored block */ - } - - if ((stored_len + 4 <= opt_lenb) && (buf !== -1)) { - /* 4: two words for the lengths */ - - /* The test buf != NULL is only necessary if LIT_BUFSIZE > WSIZE. - * Otherwise we can't have processed more than WSIZE input bytes since - * the last block flush, because compression would have been - * successful. If LIT_BUFSIZE <= WSIZE, it is never too late to - * transform a block into a stored block. - */ - _tr_stored_block(s, buf, stored_len, last); - - } else if (s.strategy === Z_FIXED || static_lenb === opt_lenb) { - - send_bits(s, (STATIC_TREES << 1) + (last ? 1 : 0), 3); - compress_block(s, static_ltree, static_dtree); - - } else { - send_bits(s, (DYN_TREES << 1) + (last ? 1 : 0), 3); - send_all_trees(s, s.l_desc.max_code + 1, s.d_desc.max_code + 1, max_blindex + 1); - compress_block(s, s.dyn_ltree, s.dyn_dtree); - } - // Assert (s->compressed_len == s->bits_sent, "bad compressed size"); - /* The above check is made mod 2^32, for files larger than 512 MB - * and uLong implemented on 32 bits. - */ - init_block(s); - - if (last) { - bi_windup(s); - } - // Tracev((stderr,"\ncomprlen %lu(%lu) ", s->compressed_len>>3, - // s->compressed_len-7*last)); -} - -/* =========================================================================== - * Save the match info and tally the frequency counts. Return true if - * the current block must be flushed. - */ -function _tr_tally(s, dist, lc) -// deflate_state *s; -// unsigned dist; /* distance of matched string */ -// unsigned lc; /* match length-MIN_MATCH or unmatched char (if dist==0) */ -{ - //var out_length, in_length, dcode; - - s.pending_buf[s.d_buf + s.last_lit * 2] = (dist >>> 8) & 0xff; - s.pending_buf[s.d_buf + s.last_lit * 2 + 1] = dist & 0xff; - - s.pending_buf[s.l_buf + s.last_lit] = lc & 0xff; - s.last_lit++; - - if (dist === 0) { - /* lc is the unmatched char */ - s.dyn_ltree[lc * 2]/*.Freq*/++; - } else { - s.matches++; - /* Here, lc is the match length - MIN_MATCH */ - dist--; /* dist = match distance - 1 */ - //Assert((ush)dist < (ush)MAX_DIST(s) && - // (ush)lc <= (ush)(MAX_MATCH-MIN_MATCH) && - // (ush)d_code(dist) < (ush)D_CODES, "_tr_tally: bad match"); - - s.dyn_ltree[(_length_code[lc] + LITERALS + 1) * 2]/*.Freq*/++; - s.dyn_dtree[d_code(dist) * 2]/*.Freq*/++; - } - -// (!) This block is disabled in zlib defailts, -// don't enable it for binary compatibility - -//#ifdef TRUNCATE_BLOCK -// /* Try to guess if it is profitable to stop the current block here */ -// if ((s.last_lit & 0x1fff) === 0 && s.level > 2) { -// /* Compute an upper bound for the compressed length */ -// out_length = s.last_lit*8; -// in_length = s.strstart - s.block_start; -// -// for (dcode = 0; dcode < D_CODES; dcode++) { -// out_length += s.dyn_dtree[dcode*2]/*.Freq*/ * (5 + extra_dbits[dcode]); -// } -// out_length >>>= 3; -// //Tracev((stderr,"\nlast_lit %u, in %ld, out ~%ld(%ld%%) ", -// // s->last_lit, in_length, out_length, -// // 100L - out_length*100L/in_length)); -// if (s.matches < (s.last_lit>>1)/*int /2*/ && out_length < (in_length>>1)/*int /2*/) { -// return true; -// } -// } -//#endif - - return (s.last_lit === s.lit_bufsize - 1); - /* We avoid equality with lit_bufsize because of wraparound at 64K - * on 16 bit machines and because stored blocks are restricted to - * 64K-1 bytes. - */ -} - -exports._tr_init = _tr_init; -exports._tr_stored_block = _tr_stored_block; -exports._tr_flush_block = _tr_flush_block; -exports._tr_tally = _tr_tally; -exports._tr_align = _tr_align; - -},{"../utils/common":3}],15:[function(require,module,exports){ -'use strict'; - - -function ZStream() { - /* next input byte */ - this.input = null; // JS specific, because we have no pointers - this.next_in = 0; - /* number of bytes available at input */ - this.avail_in = 0; - /* total number of input bytes read so far */ - this.total_in = 0; - /* next output byte should be put there */ - this.output = null; // JS specific, because we have no pointers - this.next_out = 0; - /* remaining free space at output */ - this.avail_out = 0; - /* total number of bytes output so far */ - this.total_out = 0; - /* last error message, NULL if no error */ - this.msg = ''/*Z_NULL*/; - /* not visible by applications */ - this.state = null; - /* best guess about the data type: binary or text */ - this.data_type = 2/*Z_UNKNOWN*/; - /* adler32 value of the uncompressed data */ - this.adler = 0; -} - -module.exports = ZStream; - -},{}],"/":[function(require,module,exports){ -// Top level file is just a mixin of submodules & constants -'use strict'; - -var assign = require('./lib/utils/common').assign; - -var deflate = require('./lib/deflate'); -var inflate = require('./lib/inflate'); -var constants = require('./lib/zlib/constants'); - -var pako = {}; - -assign(pako, deflate, inflate, constants); - -module.exports = pako; - -},{"./lib/deflate":1,"./lib/inflate":2,"./lib/utils/common":3,"./lib/zlib/constants":6}]},{},[])("/") -}); \ No newline at end of file diff --git a/node_modules/browserify/node_modules/browserify-zlib/node_modules/pako/dist/pako.min.js b/node_modules/browserify/node_modules/browserify-zlib/node_modules/pako/dist/pako.min.js deleted file mode 100644 index c2b86b63..00000000 --- a/node_modules/browserify/node_modules/browserify-zlib/node_modules/pako/dist/pako.min.js +++ /dev/null @@ -1,3 +0,0 @@ -/* pako 0.2.9 nodeca/pako */ -!function(t){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var e;e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,e.pako=t()}}(function(){return function t(e,a,i){function n(s,o){if(!a[s]){if(!e[s]){var l="function"==typeof require&&require;if(!o&&l)return l(s,!0);if(r)return r(s,!0);var h=new Error("Cannot find module '"+s+"'");throw h.code="MODULE_NOT_FOUND",h}var d=a[s]={exports:{}};e[s][0].call(d.exports,function(t){var a=e[s][1][t];return n(a?a:t)},d,d.exports,t,e,a,i)}return a[s].exports}for(var r="function"==typeof require&&require,s=0;s0?e.windowBits=-e.windowBits:e.gzip&&e.windowBits>0&&e.windowBits<16&&(e.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new f,this.strm.avail_out=0;var a=o.deflateInit2(this.strm,e.level,e.method,e.windowBits,e.memLevel,e.strategy);if(a!==b)throw new Error(d[a]);if(e.header&&o.deflateSetHeader(this.strm,e.header),e.dictionary){var n;if(n="string"==typeof e.dictionary?h.string2buf(e.dictionary):"[object ArrayBuffer]"===_.call(e.dictionary)?new Uint8Array(e.dictionary):e.dictionary,a=o.deflateSetDictionary(this.strm,n),a!==b)throw new Error(d[a]);this._dict_set=!0}}function n(t,e){var a=new i(e);if(a.push(t,!0),a.err)throw a.msg;return a.result}function r(t,e){return e=e||{},e.raw=!0,n(t,e)}function s(t,e){return e=e||{},e.gzip=!0,n(t,e)}var o=t("./zlib/deflate"),l=t("./utils/common"),h=t("./utils/strings"),d=t("./zlib/messages"),f=t("./zlib/zstream"),_=Object.prototype.toString,u=0,c=4,b=0,g=1,m=2,w=-1,p=0,v=8;i.prototype.push=function(t,e){var a,i,n=this.strm,r=this.options.chunkSize;if(this.ended)return!1;i=e===~~e?e:e===!0?c:u,"string"==typeof t?n.input=h.string2buf(t):"[object ArrayBuffer]"===_.call(t)?n.input=new Uint8Array(t):n.input=t,n.next_in=0,n.avail_in=n.input.length;do{if(0===n.avail_out&&(n.output=new l.Buf8(r),n.next_out=0,n.avail_out=r),a=o.deflate(n,i),a!==g&&a!==b)return this.onEnd(a),this.ended=!0,!1;0!==n.avail_out&&(0!==n.avail_in||i!==c&&i!==m)||("string"===this.options.to?this.onData(h.buf2binstring(l.shrinkBuf(n.output,n.next_out))):this.onData(l.shrinkBuf(n.output,n.next_out)))}while((n.avail_in>0||0===n.avail_out)&&a!==g);return i===c?(a=o.deflateEnd(this.strm),this.onEnd(a),this.ended=!0,a===b):i!==m||(this.onEnd(b),n.avail_out=0,!0)},i.prototype.onData=function(t){this.chunks.push(t)},i.prototype.onEnd=function(t){t===b&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=l.flattenChunks(this.chunks)),this.chunks=[],this.err=t,this.msg=this.strm.msg},a.Deflate=i,a.deflate=n,a.deflateRaw=r,a.gzip=s},{"./utils/common":3,"./utils/strings":4,"./zlib/deflate":8,"./zlib/messages":13,"./zlib/zstream":15}],2:[function(t,e,a){"use strict";function i(t){if(!(this instanceof i))return new i(t);this.options=o.assign({chunkSize:16384,windowBits:0,to:""},t||{});var e=this.options;e.raw&&e.windowBits>=0&&e.windowBits<16&&(e.windowBits=-e.windowBits,0===e.windowBits&&(e.windowBits=-15)),!(e.windowBits>=0&&e.windowBits<16)||t&&t.windowBits||(e.windowBits+=32),e.windowBits>15&&e.windowBits<48&&0===(15&e.windowBits)&&(e.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new f,this.strm.avail_out=0;var a=s.inflateInit2(this.strm,e.windowBits);if(a!==h.Z_OK)throw new Error(d[a]);this.header=new _,s.inflateGetHeader(this.strm,this.header)}function n(t,e){var a=new i(e);if(a.push(t,!0),a.err)throw a.msg;return a.result}function r(t,e){return e=e||{},e.raw=!0,n(t,e)}var s=t("./zlib/inflate"),o=t("./utils/common"),l=t("./utils/strings"),h=t("./zlib/constants"),d=t("./zlib/messages"),f=t("./zlib/zstream"),_=t("./zlib/gzheader"),u=Object.prototype.toString;i.prototype.push=function(t,e){var a,i,n,r,d,f,_=this.strm,c=this.options.chunkSize,b=this.options.dictionary,g=!1;if(this.ended)return!1;i=e===~~e?e:e===!0?h.Z_FINISH:h.Z_NO_FLUSH,"string"==typeof t?_.input=l.binstring2buf(t):"[object ArrayBuffer]"===u.call(t)?_.input=new Uint8Array(t):_.input=t,_.next_in=0,_.avail_in=_.input.length;do{if(0===_.avail_out&&(_.output=new o.Buf8(c),_.next_out=0,_.avail_out=c),a=s.inflate(_,h.Z_NO_FLUSH),a===h.Z_NEED_DICT&&b&&(f="string"==typeof b?l.string2buf(b):"[object ArrayBuffer]"===u.call(b)?new Uint8Array(b):b,a=s.inflateSetDictionary(this.strm,f)),a===h.Z_BUF_ERROR&&g===!0&&(a=h.Z_OK,g=!1),a!==h.Z_STREAM_END&&a!==h.Z_OK)return this.onEnd(a),this.ended=!0,!1;_.next_out&&(0!==_.avail_out&&a!==h.Z_STREAM_END&&(0!==_.avail_in||i!==h.Z_FINISH&&i!==h.Z_SYNC_FLUSH)||("string"===this.options.to?(n=l.utf8border(_.output,_.next_out),r=_.next_out-n,d=l.buf2string(_.output,n),_.next_out=r,_.avail_out=c-r,r&&o.arraySet(_.output,_.output,n,r,0),this.onData(d)):this.onData(o.shrinkBuf(_.output,_.next_out)))),0===_.avail_in&&0===_.avail_out&&(g=!0)}while((_.avail_in>0||0===_.avail_out)&&a!==h.Z_STREAM_END);return a===h.Z_STREAM_END&&(i=h.Z_FINISH),i===h.Z_FINISH?(a=s.inflateEnd(this.strm),this.onEnd(a),this.ended=!0,a===h.Z_OK):i!==h.Z_SYNC_FLUSH||(this.onEnd(h.Z_OK),_.avail_out=0,!0)},i.prototype.onData=function(t){this.chunks.push(t)},i.prototype.onEnd=function(t){t===h.Z_OK&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=o.flattenChunks(this.chunks)),this.chunks=[],this.err=t,this.msg=this.strm.msg},a.Inflate=i,a.inflate=n,a.inflateRaw=r,a.ungzip=n},{"./utils/common":3,"./utils/strings":4,"./zlib/constants":6,"./zlib/gzheader":9,"./zlib/inflate":11,"./zlib/messages":13,"./zlib/zstream":15}],3:[function(t,e,a){"use strict";var i="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Int32Array;a.assign=function(t){for(var e=Array.prototype.slice.call(arguments,1);e.length;){var a=e.shift();if(a){if("object"!=typeof a)throw new TypeError(a+"must be non-object");for(var i in a)a.hasOwnProperty(i)&&(t[i]=a[i])}}return t},a.shrinkBuf=function(t,e){return t.length===e?t:t.subarray?t.subarray(0,e):(t.length=e,t)};var n={arraySet:function(t,e,a,i,n){if(e.subarray&&t.subarray)return void t.set(e.subarray(a,a+i),n);for(var r=0;r=252?6:l>=248?5:l>=240?4:l>=224?3:l>=192?2:1;o[254]=o[254]=1,a.string2buf=function(t){var e,a,i,r,s,o=t.length,l=0;for(r=0;r>>6,e[s++]=128|63&a):a<65536?(e[s++]=224|a>>>12,e[s++]=128|a>>>6&63,e[s++]=128|63&a):(e[s++]=240|a>>>18,e[s++]=128|a>>>12&63,e[s++]=128|a>>>6&63,e[s++]=128|63&a);return e},a.buf2binstring=function(t){return i(t,t.length)},a.binstring2buf=function(t){for(var e=new n.Buf8(t.length),a=0,i=e.length;a4)h[n++]=65533,a+=s-1;else{for(r&=2===s?31:3===s?15:7;s>1&&a1?h[n++]=65533:r<65536?h[n++]=r:(r-=65536,h[n++]=55296|r>>10&1023,h[n++]=56320|1023&r)}return i(h,n)},a.utf8border=function(t,e){var a;for(e=e||t.length,e>t.length&&(e=t.length),a=e-1;a>=0&&128===(192&t[a]);)a--;return a<0?e:0===a?e:a+o[t[a]]>e?a:e}},{"./common":3}],5:[function(t,e,a){"use strict";function i(t,e,a,i){for(var n=65535&t|0,r=t>>>16&65535|0,s=0;0!==a;){s=a>2e3?2e3:a,a-=s;do n=n+e[i++]|0,r=r+n|0;while(--s);n%=65521,r%=65521}return n|r<<16|0}e.exports=i},{}],6:[function(t,e,a){"use strict";e.exports={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8}},{}],7:[function(t,e,a){"use strict";function i(){for(var t,e=[],a=0;a<256;a++){t=a;for(var i=0;i<8;i++)t=1&t?3988292384^t>>>1:t>>>1;e[a]=t}return e}function n(t,e,a,i){var n=r,s=i+a;t^=-1;for(var o=i;o>>8^n[255&(t^e[o])];return t^-1}var r=i();e.exports=n},{}],8:[function(t,e,a){"use strict";function i(t,e){return t.msg=D[e],e}function n(t){return(t<<1)-(t>4?9:0)}function r(t){for(var e=t.length;--e>=0;)t[e]=0}function s(t){var e=t.state,a=e.pending;a>t.avail_out&&(a=t.avail_out),0!==a&&(R.arraySet(t.output,e.pending_buf,e.pending_out,a,t.next_out),t.next_out+=a,e.pending_out+=a,t.total_out+=a,t.avail_out-=a,e.pending-=a,0===e.pending&&(e.pending_out=0))}function o(t,e){C._tr_flush_block(t,t.block_start>=0?t.block_start:-1,t.strstart-t.block_start,e),t.block_start=t.strstart,s(t.strm)}function l(t,e){t.pending_buf[t.pending++]=e}function h(t,e){t.pending_buf[t.pending++]=e>>>8&255,t.pending_buf[t.pending++]=255&e}function d(t,e,a,i){var n=t.avail_in;return n>i&&(n=i),0===n?0:(t.avail_in-=n,R.arraySet(e,t.input,t.next_in,n,a),1===t.state.wrap?t.adler=N(t.adler,e,n,a):2===t.state.wrap&&(t.adler=O(t.adler,e,n,a)),t.next_in+=n,t.total_in+=n,n)}function f(t,e){var a,i,n=t.max_chain_length,r=t.strstart,s=t.prev_length,o=t.nice_match,l=t.strstart>t.w_size-ft?t.strstart-(t.w_size-ft):0,h=t.window,d=t.w_mask,f=t.prev,_=t.strstart+dt,u=h[r+s-1],c=h[r+s];t.prev_length>=t.good_match&&(n>>=2),o>t.lookahead&&(o=t.lookahead);do if(a=e,h[a+s]===c&&h[a+s-1]===u&&h[a]===h[r]&&h[++a]===h[r+1]){r+=2,a++;do;while(h[++r]===h[++a]&&h[++r]===h[++a]&&h[++r]===h[++a]&&h[++r]===h[++a]&&h[++r]===h[++a]&&h[++r]===h[++a]&&h[++r]===h[++a]&&h[++r]===h[++a]&&r<_);if(i=dt-(_-r),r=_-dt,i>s){if(t.match_start=e,s=i,i>=o)break;u=h[r+s-1],c=h[r+s]}}while((e=f[e&d])>l&&0!==--n);return s<=t.lookahead?s:t.lookahead}function _(t){var e,a,i,n,r,s=t.w_size;do{if(n=t.window_size-t.lookahead-t.strstart,t.strstart>=s+(s-ft)){R.arraySet(t.window,t.window,s,s,0),t.match_start-=s,t.strstart-=s,t.block_start-=s,a=t.hash_size,e=a;do i=t.head[--e],t.head[e]=i>=s?i-s:0;while(--a);a=s,e=a;do i=t.prev[--e],t.prev[e]=i>=s?i-s:0;while(--a);n+=s}if(0===t.strm.avail_in)break;if(a=d(t.strm,t.window,t.strstart+t.lookahead,n),t.lookahead+=a,t.lookahead+t.insert>=ht)for(r=t.strstart-t.insert,t.ins_h=t.window[r],t.ins_h=(t.ins_h<t.pending_buf_size-5&&(a=t.pending_buf_size-5);;){if(t.lookahead<=1){if(_(t),0===t.lookahead&&e===I)return vt;if(0===t.lookahead)break}t.strstart+=t.lookahead,t.lookahead=0;var i=t.block_start+a;if((0===t.strstart||t.strstart>=i)&&(t.lookahead=t.strstart-i,t.strstart=i,o(t,!1),0===t.strm.avail_out))return vt;if(t.strstart-t.block_start>=t.w_size-ft&&(o(t,!1),0===t.strm.avail_out))return vt}return t.insert=0,e===F?(o(t,!0),0===t.strm.avail_out?yt:xt):t.strstart>t.block_start&&(o(t,!1),0===t.strm.avail_out)?vt:vt}function c(t,e){for(var a,i;;){if(t.lookahead=ht&&(t.ins_h=(t.ins_h<=ht)if(i=C._tr_tally(t,t.strstart-t.match_start,t.match_length-ht),t.lookahead-=t.match_length,t.match_length<=t.max_lazy_match&&t.lookahead>=ht){t.match_length--;do t.strstart++,t.ins_h=(t.ins_h<=ht&&(t.ins_h=(t.ins_h<4096)&&(t.match_length=ht-1)),t.prev_length>=ht&&t.match_length<=t.prev_length){n=t.strstart+t.lookahead-ht,i=C._tr_tally(t,t.strstart-1-t.prev_match,t.prev_length-ht),t.lookahead-=t.prev_length-1,t.prev_length-=2;do++t.strstart<=n&&(t.ins_h=(t.ins_h<=ht&&t.strstart>0&&(n=t.strstart-1,i=s[n],i===s[++n]&&i===s[++n]&&i===s[++n])){r=t.strstart+dt;do;while(i===s[++n]&&i===s[++n]&&i===s[++n]&&i===s[++n]&&i===s[++n]&&i===s[++n]&&i===s[++n]&&i===s[++n]&&nt.lookahead&&(t.match_length=t.lookahead)}if(t.match_length>=ht?(a=C._tr_tally(t,1,t.match_length-ht),t.lookahead-=t.match_length,t.strstart+=t.match_length,t.match_length=0):(a=C._tr_tally(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++),a&&(o(t,!1),0===t.strm.avail_out))return vt}return t.insert=0,e===F?(o(t,!0),0===t.strm.avail_out?yt:xt):t.last_lit&&(o(t,!1),0===t.strm.avail_out)?vt:kt}function m(t,e){for(var a;;){if(0===t.lookahead&&(_(t),0===t.lookahead)){if(e===I)return vt;break}if(t.match_length=0,a=C._tr_tally(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++,a&&(o(t,!1),0===t.strm.avail_out))return vt}return t.insert=0,e===F?(o(t,!0),0===t.strm.avail_out?yt:xt):t.last_lit&&(o(t,!1),0===t.strm.avail_out)?vt:kt}function w(t,e,a,i,n){this.good_length=t,this.max_lazy=e,this.nice_length=a,this.max_chain=i,this.func=n}function p(t){t.window_size=2*t.w_size,r(t.head),t.max_lazy_match=Z[t.level].max_lazy,t.good_match=Z[t.level].good_length,t.nice_match=Z[t.level].nice_length,t.max_chain_length=Z[t.level].max_chain,t.strstart=0,t.block_start=0,t.lookahead=0,t.insert=0,t.match_length=t.prev_length=ht-1,t.match_available=0,t.ins_h=0}function v(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=V,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new R.Buf16(2*ot),this.dyn_dtree=new R.Buf16(2*(2*rt+1)),this.bl_tree=new R.Buf16(2*(2*st+1)),r(this.dyn_ltree),r(this.dyn_dtree),r(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new R.Buf16(lt+1),this.heap=new R.Buf16(2*nt+1),r(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new R.Buf16(2*nt+1),r(this.depth),this.l_buf=0,this.lit_bufsize=0,this.last_lit=0,this.d_buf=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}function k(t){var e;return t&&t.state?(t.total_in=t.total_out=0,t.data_type=Q,e=t.state,e.pending=0,e.pending_out=0,e.wrap<0&&(e.wrap=-e.wrap),e.status=e.wrap?ut:wt,t.adler=2===e.wrap?0:1,e.last_flush=I,C._tr_init(e),H):i(t,K)}function y(t){var e=k(t);return e===H&&p(t.state),e}function x(t,e){return t&&t.state?2!==t.state.wrap?K:(t.state.gzhead=e,H):K}function z(t,e,a,n,r,s){if(!t)return K;var o=1;if(e===Y&&(e=6),n<0?(o=0,n=-n):n>15&&(o=2,n-=16),r<1||r>$||a!==V||n<8||n>15||e<0||e>9||s<0||s>W)return i(t,K);8===n&&(n=9);var l=new v;return t.state=l,l.strm=t,l.wrap=o,l.gzhead=null,l.w_bits=n,l.w_size=1<L||e<0)return t?i(t,K):K;if(o=t.state,!t.output||!t.input&&0!==t.avail_in||o.status===pt&&e!==F)return i(t,0===t.avail_out?P:K);if(o.strm=t,a=o.last_flush,o.last_flush=e,o.status===ut)if(2===o.wrap)t.adler=0,l(o,31),l(o,139),l(o,8),o.gzhead?(l(o,(o.gzhead.text?1:0)+(o.gzhead.hcrc?2:0)+(o.gzhead.extra?4:0)+(o.gzhead.name?8:0)+(o.gzhead.comment?16:0)),l(o,255&o.gzhead.time),l(o,o.gzhead.time>>8&255),l(o,o.gzhead.time>>16&255),l(o,o.gzhead.time>>24&255),l(o,9===o.level?2:o.strategy>=G||o.level<2?4:0),l(o,255&o.gzhead.os),o.gzhead.extra&&o.gzhead.extra.length&&(l(o,255&o.gzhead.extra.length),l(o,o.gzhead.extra.length>>8&255)),o.gzhead.hcrc&&(t.adler=O(t.adler,o.pending_buf,o.pending,0)),o.gzindex=0,o.status=ct):(l(o,0),l(o,0),l(o,0),l(o,0),l(o,0),l(o,9===o.level?2:o.strategy>=G||o.level<2?4:0),l(o,zt),o.status=wt);else{var _=V+(o.w_bits-8<<4)<<8,u=-1;u=o.strategy>=G||o.level<2?0:o.level<6?1:6===o.level?2:3,_|=u<<6,0!==o.strstart&&(_|=_t),_+=31-_%31,o.status=wt,h(o,_),0!==o.strstart&&(h(o,t.adler>>>16),h(o,65535&t.adler)),t.adler=1}if(o.status===ct)if(o.gzhead.extra){for(d=o.pending;o.gzindex<(65535&o.gzhead.extra.length)&&(o.pending!==o.pending_buf_size||(o.gzhead.hcrc&&o.pending>d&&(t.adler=O(t.adler,o.pending_buf,o.pending-d,d)),s(t),d=o.pending,o.pending!==o.pending_buf_size));)l(o,255&o.gzhead.extra[o.gzindex]),o.gzindex++;o.gzhead.hcrc&&o.pending>d&&(t.adler=O(t.adler,o.pending_buf,o.pending-d,d)),o.gzindex===o.gzhead.extra.length&&(o.gzindex=0,o.status=bt)}else o.status=bt;if(o.status===bt)if(o.gzhead.name){d=o.pending;do{if(o.pending===o.pending_buf_size&&(o.gzhead.hcrc&&o.pending>d&&(t.adler=O(t.adler,o.pending_buf,o.pending-d,d)),s(t),d=o.pending,o.pending===o.pending_buf_size)){f=1;break}f=o.gzindexd&&(t.adler=O(t.adler,o.pending_buf,o.pending-d,d)),0===f&&(o.gzindex=0,o.status=gt)}else o.status=gt;if(o.status===gt)if(o.gzhead.comment){d=o.pending;do{if(o.pending===o.pending_buf_size&&(o.gzhead.hcrc&&o.pending>d&&(t.adler=O(t.adler,o.pending_buf,o.pending-d,d)),s(t),d=o.pending,o.pending===o.pending_buf_size)){f=1;break}f=o.gzindexd&&(t.adler=O(t.adler,o.pending_buf,o.pending-d,d)),0===f&&(o.status=mt)}else o.status=mt;if(o.status===mt&&(o.gzhead.hcrc?(o.pending+2>o.pending_buf_size&&s(t),o.pending+2<=o.pending_buf_size&&(l(o,255&t.adler),l(o,t.adler>>8&255),t.adler=0,o.status=wt)):o.status=wt),0!==o.pending){if(s(t),0===t.avail_out)return o.last_flush=-1,H}else if(0===t.avail_in&&n(e)<=n(a)&&e!==F)return i(t,P);if(o.status===pt&&0!==t.avail_in)return i(t,P);if(0!==t.avail_in||0!==o.lookahead||e!==I&&o.status!==pt){var c=o.strategy===G?m(o,e):o.strategy===X?g(o,e):Z[o.level].func(o,e);if(c!==yt&&c!==xt||(o.status=pt),c===vt||c===yt)return 0===t.avail_out&&(o.last_flush=-1),H;if(c===kt&&(e===U?C._tr_align(o):e!==L&&(C._tr_stored_block(o,0,0,!1),e===T&&(r(o.head),0===o.lookahead&&(o.strstart=0,o.block_start=0,o.insert=0))),s(t),0===t.avail_out))return o.last_flush=-1,H}return e!==F?H:o.wrap<=0?j:(2===o.wrap?(l(o,255&t.adler),l(o,t.adler>>8&255),l(o,t.adler>>16&255),l(o,t.adler>>24&255),l(o,255&t.total_in),l(o,t.total_in>>8&255),l(o,t.total_in>>16&255),l(o,t.total_in>>24&255)):(h(o,t.adler>>>16),h(o,65535&t.adler)),s(t),o.wrap>0&&(o.wrap=-o.wrap),0!==o.pending?H:j)}function E(t){var e;return t&&t.state?(e=t.state.status,e!==ut&&e!==ct&&e!==bt&&e!==gt&&e!==mt&&e!==wt&&e!==pt?i(t,K):(t.state=null,e===wt?i(t,M):H)):K}function A(t,e){var a,i,n,s,o,l,h,d,f=e.length;if(!t||!t.state)return K;if(a=t.state,s=a.wrap,2===s||1===s&&a.status!==ut||a.lookahead)return K;for(1===s&&(t.adler=N(t.adler,e,f,0)),a.wrap=0,f>=a.w_size&&(0===s&&(r(a.head),a.strstart=0,a.block_start=0,a.insert=0),d=new R.Buf8(a.w_size),R.arraySet(d,e,f-a.w_size,a.w_size,0),e=d,f=a.w_size),o=t.avail_in,l=t.next_in,h=t.input,t.avail_in=f,t.next_in=0,t.input=e,_(a);a.lookahead>=ht;){i=a.strstart,n=a.lookahead-(ht-1);do a.ins_h=(a.ins_h<>>24,b>>>=y,g-=y,y=k>>>16&255,0===y)A[o++]=65535&k;else{if(!(16&y)){if(0===(64&y)){k=m[(65535&k)+(b&(1<>>=y,g-=y),g<15&&(b+=E[r++]<>>24,b>>>=y,g-=y,y=k>>>16&255,!(16&y)){if(0===(64&y)){k=w[(65535&k)+(b&(1<d){t.msg="invalid distance too far back",a.mode=i;break t}if(b>>>=y,g-=y,y=o-l,z>y){if(y=z-y,y>_&&a.sane){t.msg="invalid distance too far back",a.mode=i;break t}if(B=0,S=c,0===u){if(B+=f-y,y2;)A[o++]=S[B++],A[o++]=S[B++],A[o++]=S[B++],x-=3;x&&(A[o++]=S[B++],x>1&&(A[o++]=S[B++]))}else{B=o-z;do A[o++]=A[B++],A[o++]=A[B++],A[o++]=A[B++],x-=3;while(x>2);x&&(A[o++]=A[B++],x>1&&(A[o++]=A[B++]))}break}}break}}while(r>3,r-=x,g-=x<<3,b&=(1<>>24&255)+(t>>>8&65280)+((65280&t)<<8)+((255&t)<<24)}function n(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new w.Buf16(320),this.work=new w.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function r(t){var e;return t&&t.state?(e=t.state,t.total_in=t.total_out=e.total=0,t.msg="",e.wrap&&(t.adler=1&e.wrap),e.mode=T,e.last=0,e.havedict=0,e.dmax=32768,e.head=null,e.hold=0,e.bits=0,e.lencode=e.lendyn=new w.Buf32(bt),e.distcode=e.distdyn=new w.Buf32(gt),e.sane=1,e.back=-1,Z):N}function s(t){var e;return t&&t.state?(e=t.state,e.wsize=0,e.whave=0,e.wnext=0,r(t)):N}function o(t,e){var a,i;return t&&t.state?(i=t.state,e<0?(a=0,e=-e):(a=(e>>4)+1,e<48&&(e&=15)),e&&(e<8||e>15)?N:(null!==i.window&&i.wbits!==e&&(i.window=null),i.wrap=a,i.wbits=e,s(t))):N}function l(t,e){var a,i;return t?(i=new n,t.state=i,i.window=null,a=o(t,e),a!==Z&&(t.state=null),a):N}function h(t){return l(t,wt)}function d(t){if(pt){var e;for(g=new w.Buf32(512),m=new w.Buf32(32),e=0;e<144;)t.lens[e++]=8;for(;e<256;)t.lens[e++]=9;for(;e<280;)t.lens[e++]=7;for(;e<288;)t.lens[e++]=8;for(y(z,t.lens,0,288,g,0,t.work,{bits:9}),e=0;e<32;)t.lens[e++]=5;y(B,t.lens,0,32,m,0,t.work,{bits:5}),pt=!1}t.lencode=g,t.lenbits=9,t.distcode=m,t.distbits=5}function f(t,e,a,i){var n,r=t.state;return null===r.window&&(r.wsize=1<=r.wsize?(w.arraySet(r.window,e,a-r.wsize,r.wsize,0),r.wnext=0,r.whave=r.wsize):(n=r.wsize-r.wnext,n>i&&(n=i),w.arraySet(r.window,e,a-i,n,r.wnext),i-=n,i?(w.arraySet(r.window,e,a-i,i,0),r.wnext=i,r.whave=r.wsize):(r.wnext+=n,r.wnext===r.wsize&&(r.wnext=0),r.whave>>8&255,a.check=v(a.check,Et,2,0),_=0,u=0,a.mode=F;break}if(a.flags=0,a.head&&(a.head.done=!1),!(1&a.wrap)||(((255&_)<<8)+(_>>8))%31){t.msg="incorrect header check",a.mode=_t;break}if((15&_)!==U){t.msg="unknown compression method",a.mode=_t;break}if(_>>>=4,u-=4,yt=(15&_)+8,0===a.wbits)a.wbits=yt;else if(yt>a.wbits){t.msg="invalid window size",a.mode=_t;break}a.dmax=1<>8&1),512&a.flags&&(Et[0]=255&_,Et[1]=_>>>8&255,a.check=v(a.check,Et,2,0)),_=0,u=0,a.mode=L;case L:for(;u<32;){if(0===l)break t;l--,_+=n[s++]<>>8&255,Et[2]=_>>>16&255,Et[3]=_>>>24&255,a.check=v(a.check,Et,4,0)),_=0,u=0,a.mode=H;case H:for(;u<16;){if(0===l)break t;l--,_+=n[s++]<>8),512&a.flags&&(Et[0]=255&_,Et[1]=_>>>8&255,a.check=v(a.check,Et,2,0)),_=0,u=0,a.mode=j;case j:if(1024&a.flags){for(;u<16;){if(0===l)break t;l--,_+=n[s++]<>>8&255,a.check=v(a.check,Et,2,0)),_=0,u=0}else a.head&&(a.head.extra=null);a.mode=K;case K:if(1024&a.flags&&(g=a.length,g>l&&(g=l),g&&(a.head&&(yt=a.head.extra_len-a.length,a.head.extra||(a.head.extra=new Array(a.head.extra_len)),w.arraySet(a.head.extra,n,s,g,yt)),512&a.flags&&(a.check=v(a.check,n,g,s)),l-=g,s+=g,a.length-=g),a.length))break t;a.length=0,a.mode=M;case M:if(2048&a.flags){if(0===l)break t;g=0;do yt=n[s+g++],a.head&&yt&&a.length<65536&&(a.head.name+=String.fromCharCode(yt));while(yt&&g>9&1,a.head.done=!0),t.adler=a.check=0,a.mode=X;break;case q:for(;u<32;){if(0===l)break t;l--,_+=n[s++]<>>=7&u,u-=7&u,a.mode=ht;break}for(;u<3;){if(0===l)break t;l--,_+=n[s++]<>>=1,u-=1,3&_){case 0:a.mode=J;break;case 1:if(d(a),a.mode=at,e===A){_>>>=2,u-=2;break t}break;case 2:a.mode=$;break;case 3:t.msg="invalid block type",a.mode=_t}_>>>=2,u-=2;break;case J:for(_>>>=7&u,u-=7&u;u<32;){if(0===l)break t;l--,_+=n[s++]<>>16^65535)){t.msg="invalid stored block lengths",a.mode=_t;break}if(a.length=65535&_,_=0,u=0,a.mode=Q,e===A)break t;case Q:a.mode=V;case V:if(g=a.length){if(g>l&&(g=l),g>h&&(g=h),0===g)break t;w.arraySet(r,n,s,g,o),l-=g,s+=g,h-=g,o+=g,a.length-=g;break}a.mode=X;break;case $:for(;u<14;){if(0===l)break t; -l--,_+=n[s++]<>>=5,u-=5,a.ndist=(31&_)+1,_>>>=5,u-=5,a.ncode=(15&_)+4,_>>>=4,u-=4,a.nlen>286||a.ndist>30){t.msg="too many length or distance symbols",a.mode=_t;break}a.have=0,a.mode=tt;case tt:for(;a.have>>=3,u-=3}for(;a.have<19;)a.lens[At[a.have++]]=0;if(a.lencode=a.lendyn,a.lenbits=7,zt={bits:a.lenbits},xt=y(x,a.lens,0,19,a.lencode,0,a.work,zt),a.lenbits=zt.bits,xt){t.msg="invalid code lengths set",a.mode=_t;break}a.have=0,a.mode=et;case et:for(;a.have>>24,mt=St>>>16&255,wt=65535&St,!(gt<=u);){if(0===l)break t;l--,_+=n[s++]<>>=gt,u-=gt,a.lens[a.have++]=wt;else{if(16===wt){for(Bt=gt+2;u>>=gt,u-=gt,0===a.have){t.msg="invalid bit length repeat",a.mode=_t;break}yt=a.lens[a.have-1],g=3+(3&_),_>>>=2,u-=2}else if(17===wt){for(Bt=gt+3;u>>=gt,u-=gt,yt=0,g=3+(7&_),_>>>=3,u-=3}else{for(Bt=gt+7;u>>=gt,u-=gt,yt=0,g=11+(127&_),_>>>=7,u-=7}if(a.have+g>a.nlen+a.ndist){t.msg="invalid bit length repeat",a.mode=_t;break}for(;g--;)a.lens[a.have++]=yt}}if(a.mode===_t)break;if(0===a.lens[256]){t.msg="invalid code -- missing end-of-block",a.mode=_t;break}if(a.lenbits=9,zt={bits:a.lenbits},xt=y(z,a.lens,0,a.nlen,a.lencode,0,a.work,zt),a.lenbits=zt.bits,xt){t.msg="invalid literal/lengths set",a.mode=_t;break}if(a.distbits=6,a.distcode=a.distdyn,zt={bits:a.distbits},xt=y(B,a.lens,a.nlen,a.ndist,a.distcode,0,a.work,zt),a.distbits=zt.bits,xt){t.msg="invalid distances set",a.mode=_t;break}if(a.mode=at,e===A)break t;case at:a.mode=it;case it:if(l>=6&&h>=258){t.next_out=o,t.avail_out=h,t.next_in=s,t.avail_in=l,a.hold=_,a.bits=u,k(t,b),o=t.next_out,r=t.output,h=t.avail_out,s=t.next_in,n=t.input,l=t.avail_in,_=a.hold,u=a.bits,a.mode===X&&(a.back=-1);break}for(a.back=0;St=a.lencode[_&(1<>>24,mt=St>>>16&255,wt=65535&St,!(gt<=u);){if(0===l)break t;l--,_+=n[s++]<>pt)],gt=St>>>24,mt=St>>>16&255,wt=65535&St,!(pt+gt<=u);){if(0===l)break t;l--,_+=n[s++]<>>=pt,u-=pt,a.back+=pt}if(_>>>=gt,u-=gt,a.back+=gt,a.length=wt,0===mt){a.mode=lt;break}if(32&mt){a.back=-1,a.mode=X;break}if(64&mt){t.msg="invalid literal/length code",a.mode=_t;break}a.extra=15&mt,a.mode=nt;case nt:if(a.extra){for(Bt=a.extra;u>>=a.extra,u-=a.extra,a.back+=a.extra}a.was=a.length,a.mode=rt;case rt:for(;St=a.distcode[_&(1<>>24,mt=St>>>16&255,wt=65535&St,!(gt<=u);){if(0===l)break t;l--,_+=n[s++]<>pt)],gt=St>>>24,mt=St>>>16&255,wt=65535&St,!(pt+gt<=u);){if(0===l)break t;l--,_+=n[s++]<>>=pt,u-=pt,a.back+=pt}if(_>>>=gt,u-=gt,a.back+=gt,64&mt){t.msg="invalid distance code",a.mode=_t;break}a.offset=wt,a.extra=15&mt,a.mode=st;case st:if(a.extra){for(Bt=a.extra;u>>=a.extra,u-=a.extra,a.back+=a.extra}if(a.offset>a.dmax){t.msg="invalid distance too far back",a.mode=_t;break}a.mode=ot;case ot:if(0===h)break t;if(g=b-h,a.offset>g){if(g=a.offset-g,g>a.whave&&a.sane){t.msg="invalid distance too far back",a.mode=_t;break}g>a.wnext?(g-=a.wnext,m=a.wsize-g):m=a.wnext-g,g>a.length&&(g=a.length),bt=a.window}else bt=r,m=o-a.offset,g=a.length;g>h&&(g=h),h-=g,a.length-=g;do r[o++]=bt[m++];while(--g);0===a.length&&(a.mode=it);break;case lt:if(0===h)break t;r[o++]=a.length,h--,a.mode=it;break;case ht:if(a.wrap){for(;u<32;){if(0===l)break t;l--,_|=n[s++]<=1&&0===j[N];N--);if(O>N&&(O=N),0===N)return b[g++]=20971520,b[g++]=20971520,w.bits=1,0;for(C=1;C0&&(t===o||1!==N))return-1;for(K[1]=0,Z=1;Zr||t===h&&T>s)return 1;for(var Y=0;;){Y++,B=Z-I,m[R]z?(S=M[P+m[R]],E=L[H+m[R]]):(S=96,E=0),p=1<>I)+v]=B<<24|S<<16|E|0;while(0!==v);for(p=1<>=1;if(0!==p?(F&=p-1,F+=p):F=0,R++,0===--j[Z]){if(Z===N)break;Z=e[a+m[R]]}if(Z>O&&(F&y)!==k){for(0===I&&(I=O),x+=C,D=Z-I,U=1<r||t===h&&T>s)return 1;k=F&y,b[k]=O<<24|D<<16|x-g|0}}return 0!==F&&(b[x+F]=Z-I<<24|64<<16|0),w.bits=O,0}},{"../utils/common":3}],13:[function(t,e,a){"use strict";e.exports={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"}},{}],14:[function(t,e,a){"use strict";function i(t){for(var e=t.length;--e>=0;)t[e]=0}function n(t,e,a,i,n){this.static_tree=t,this.extra_bits=e,this.extra_base=a,this.elems=i,this.max_length=n,this.has_stree=t&&t.length}function r(t,e){this.dyn_tree=t,this.max_code=0,this.stat_desc=e}function s(t){return t<256?lt[t]:lt[256+(t>>>7)]}function o(t,e){t.pending_buf[t.pending++]=255&e,t.pending_buf[t.pending++]=e>>>8&255}function l(t,e,a){t.bi_valid>W-a?(t.bi_buf|=e<>W-t.bi_valid,t.bi_valid+=a-W):(t.bi_buf|=e<>>=1,a<<=1;while(--e>0);return a>>>1}function f(t){16===t.bi_valid?(o(t,t.bi_buf),t.bi_buf=0,t.bi_valid=0):t.bi_valid>=8&&(t.pending_buf[t.pending++]=255&t.bi_buf,t.bi_buf>>=8,t.bi_valid-=8)}function _(t,e){var a,i,n,r,s,o,l=e.dyn_tree,h=e.max_code,d=e.stat_desc.static_tree,f=e.stat_desc.has_stree,_=e.stat_desc.extra_bits,u=e.stat_desc.extra_base,c=e.stat_desc.max_length,b=0;for(r=0;r<=X;r++)t.bl_count[r]=0;for(l[2*t.heap[t.heap_max]+1]=0,a=t.heap_max+1;ac&&(r=c,b++),l[2*i+1]=r,i>h||(t.bl_count[r]++,s=0,i>=u&&(s=_[i-u]),o=l[2*i],t.opt_len+=o*(r+s),f&&(t.static_len+=o*(d[2*i+1]+s)));if(0!==b){do{for(r=c-1;0===t.bl_count[r];)r--;t.bl_count[r]--,t.bl_count[r+1]+=2,t.bl_count[c]--,b-=2}while(b>0);for(r=c;0!==r;r--)for(i=t.bl_count[r];0!==i;)n=t.heap[--a],n>h||(l[2*n+1]!==r&&(t.opt_len+=(r-l[2*n+1])*l[2*n],l[2*n+1]=r),i--)}}function u(t,e,a){var i,n,r=new Array(X+1),s=0;for(i=1;i<=X;i++)r[i]=s=s+a[i-1]<<1;for(n=0;n<=e;n++){var o=t[2*n+1];0!==o&&(t[2*n]=d(r[o]++,o))}}function c(){var t,e,a,i,r,s=new Array(X+1);for(a=0,i=0;i>=7;i8?o(t,t.bi_buf):t.bi_valid>0&&(t.pending_buf[t.pending++]=t.bi_buf),t.bi_buf=0,t.bi_valid=0}function m(t,e,a,i){g(t),i&&(o(t,a),o(t,~a)),N.arraySet(t.pending_buf,t.window,e,a,t.pending),t.pending+=a}function w(t,e,a,i){var n=2*e,r=2*a;return t[n]>1;a>=1;a--)p(t,r,a);n=l;do a=t.heap[1],t.heap[1]=t.heap[t.heap_len--],p(t,r,1),i=t.heap[1],t.heap[--t.heap_max]=a,t.heap[--t.heap_max]=i,r[2*n]=r[2*a]+r[2*i],t.depth[n]=(t.depth[a]>=t.depth[i]?t.depth[a]:t.depth[i])+1,r[2*a+1]=r[2*i+1]=n,t.heap[1]=n++,p(t,r,1);while(t.heap_len>=2);t.heap[--t.heap_max]=t.heap[1],_(t,e),u(r,h,t.bl_count)}function y(t,e,a){var i,n,r=-1,s=e[1],o=0,l=7,h=4;for(0===s&&(l=138,h=3),e[2*(a+1)+1]=65535,i=0;i<=a;i++)n=s,s=e[2*(i+1)+1],++o=3&&0===t.bl_tree[2*nt[e]+1];e--);return t.opt_len+=3*(e+1)+5+5+4,e}function B(t,e,a,i){var n;for(l(t,e-257,5),l(t,a-1,5),l(t,i-4,4),n=0;n>>=1)if(1&a&&0!==t.dyn_ltree[2*e])return D;if(0!==t.dyn_ltree[18]||0!==t.dyn_ltree[20]||0!==t.dyn_ltree[26])return I;for(e=32;e0?(t.strm.data_type===U&&(t.strm.data_type=S(t)),k(t,t.l_desc),k(t,t.d_desc),s=z(t),n=t.opt_len+3+7>>>3,r=t.static_len+3+7>>>3,r<=n&&(n=r)):n=r=a+5,a+4<=n&&e!==-1?A(t,e,a,i):t.strategy===O||r===n?(l(t,(F<<1)+(i?1:0),3),v(t,st,ot)):(l(t,(L<<1)+(i?1:0),3),B(t,t.l_desc.max_code+1,t.d_desc.max_code+1,s+1),v(t,t.dyn_ltree,t.dyn_dtree)),b(t),i&&g(t)}function C(t,e,a){return t.pending_buf[t.d_buf+2*t.last_lit]=e>>>8&255,t.pending_buf[t.d_buf+2*t.last_lit+1]=255&e,t.pending_buf[t.l_buf+t.last_lit]=255&a,t.last_lit++,0===e?t.dyn_ltree[2*a]++:(t.matches++,e--,t.dyn_ltree[2*(ht[a]+M+1)]++,t.dyn_dtree[2*s(e)]++),t.last_lit===t.lit_bufsize-1}var N=t("../utils/common"),O=4,D=0,I=1,U=2,T=0,F=1,L=2,H=3,j=258,K=29,M=256,P=M+1+K,Y=30,q=19,G=2*P+1,X=15,W=16,J=7,Q=256,V=16,$=17,tt=18,et=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],at=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],it=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],nt=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],rt=512,st=new Array(2*(P+2));i(st);var ot=new Array(2*Y);i(ot);var lt=new Array(rt);i(lt);var ht=new Array(j-H+1);i(ht);var dt=new Array(K);i(dt);var ft=new Array(Y);i(ft);var _t,ut,ct,bt=!1;a._tr_init=E,a._tr_stored_block=A,a._tr_flush_block=R,a._tr_tally=C,a._tr_align=Z},{"../utils/common":3}],15:[function(t,e,a){"use strict";function i(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}e.exports=i},{}],"/":[function(t,e,a){"use strict";var i=t("./lib/utils/common").assign,n=t("./lib/deflate"),r=t("./lib/inflate"),s=t("./lib/zlib/constants"),o={};i(o,n,r,s),e.exports=o},{"./lib/deflate":1,"./lib/inflate":2,"./lib/utils/common":3,"./lib/zlib/constants":6}]},{},[])("/")}); diff --git a/node_modules/browserify/node_modules/browserify-zlib/node_modules/pako/dist/pako_deflate.js b/node_modules/browserify/node_modules/browserify-zlib/node_modules/pako/dist/pako_deflate.js deleted file mode 100644 index a5f95720..00000000 --- a/node_modules/browserify/node_modules/browserify-zlib/node_modules/pako/dist/pako_deflate.js +++ /dev/null @@ -1,3879 +0,0 @@ -/* pako 0.2.9 nodeca/pako */(function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.pako = f()}})(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o= 252 ? 6 : q >= 248 ? 5 : q >= 240 ? 4 : q >= 224 ? 3 : q >= 192 ? 2 : 1); -} -_utf8len[254] = _utf8len[254] = 1; // Invalid sequence start - - -// convert string to array (typed, when possible) -exports.string2buf = function (str) { - var buf, c, c2, m_pos, i, str_len = str.length, buf_len = 0; - - // count binary size - for (m_pos = 0; m_pos < str_len; m_pos++) { - c = str.charCodeAt(m_pos); - if ((c & 0xfc00) === 0xd800 && (m_pos + 1 < str_len)) { - c2 = str.charCodeAt(m_pos + 1); - if ((c2 & 0xfc00) === 0xdc00) { - c = 0x10000 + ((c - 0xd800) << 10) + (c2 - 0xdc00); - m_pos++; - } - } - buf_len += c < 0x80 ? 1 : c < 0x800 ? 2 : c < 0x10000 ? 3 : 4; - } - - // allocate buffer - buf = new utils.Buf8(buf_len); - - // convert - for (i = 0, m_pos = 0; i < buf_len; m_pos++) { - c = str.charCodeAt(m_pos); - if ((c & 0xfc00) === 0xd800 && (m_pos + 1 < str_len)) { - c2 = str.charCodeAt(m_pos + 1); - if ((c2 & 0xfc00) === 0xdc00) { - c = 0x10000 + ((c - 0xd800) << 10) + (c2 - 0xdc00); - m_pos++; - } - } - if (c < 0x80) { - /* one byte */ - buf[i++] = c; - } else if (c < 0x800) { - /* two bytes */ - buf[i++] = 0xC0 | (c >>> 6); - buf[i++] = 0x80 | (c & 0x3f); - } else if (c < 0x10000) { - /* three bytes */ - buf[i++] = 0xE0 | (c >>> 12); - buf[i++] = 0x80 | (c >>> 6 & 0x3f); - buf[i++] = 0x80 | (c & 0x3f); - } else { - /* four bytes */ - buf[i++] = 0xf0 | (c >>> 18); - buf[i++] = 0x80 | (c >>> 12 & 0x3f); - buf[i++] = 0x80 | (c >>> 6 & 0x3f); - buf[i++] = 0x80 | (c & 0x3f); - } - } - - return buf; -}; - -// Helper (used in 2 places) -function buf2binstring(buf, len) { - // use fallback for big arrays to avoid stack overflow - if (len < 65537) { - if ((buf.subarray && STR_APPLY_UIA_OK) || (!buf.subarray && STR_APPLY_OK)) { - return String.fromCharCode.apply(null, utils.shrinkBuf(buf, len)); - } - } - - var result = ''; - for (var i = 0; i < len; i++) { - result += String.fromCharCode(buf[i]); - } - return result; -} - - -// Convert byte array to binary string -exports.buf2binstring = function (buf) { - return buf2binstring(buf, buf.length); -}; - - -// Convert binary string (typed, when possible) -exports.binstring2buf = function (str) { - var buf = new utils.Buf8(str.length); - for (var i = 0, len = buf.length; i < len; i++) { - buf[i] = str.charCodeAt(i); - } - return buf; -}; - - -// convert array to string -exports.buf2string = function (buf, max) { - var i, out, c, c_len; - var len = max || buf.length; - - // Reserve max possible length (2 words per char) - // NB: by unknown reasons, Array is significantly faster for - // String.fromCharCode.apply than Uint16Array. - var utf16buf = new Array(len * 2); - - for (out = 0, i = 0; i < len;) { - c = buf[i++]; - // quick process ascii - if (c < 0x80) { utf16buf[out++] = c; continue; } - - c_len = _utf8len[c]; - // skip 5 & 6 byte codes - if (c_len > 4) { utf16buf[out++] = 0xfffd; i += c_len - 1; continue; } - - // apply mask on first byte - c &= c_len === 2 ? 0x1f : c_len === 3 ? 0x0f : 0x07; - // join the rest - while (c_len > 1 && i < len) { - c = (c << 6) | (buf[i++] & 0x3f); - c_len--; - } - - // terminated by end of string? - if (c_len > 1) { utf16buf[out++] = 0xfffd; continue; } - - if (c < 0x10000) { - utf16buf[out++] = c; - } else { - c -= 0x10000; - utf16buf[out++] = 0xd800 | ((c >> 10) & 0x3ff); - utf16buf[out++] = 0xdc00 | (c & 0x3ff); - } - } - - return buf2binstring(utf16buf, out); -}; - - -// Calculate max possible position in utf8 buffer, -// that will not break sequence. If that's not possible -// - (very small limits) return max size as is. -// -// buf[] - utf8 bytes array -// max - length limit (mandatory); -exports.utf8border = function (buf, max) { - var pos; - - max = max || buf.length; - if (max > buf.length) { max = buf.length; } - - // go back from last position, until start of sequence found - pos = max - 1; - while (pos >= 0 && (buf[pos] & 0xC0) === 0x80) { pos--; } - - // Fuckup - very small and broken sequence, - // return max, because we should return something anyway. - if (pos < 0) { return max; } - - // If we came to start of buffer - that means vuffer is too small, - // return max too. - if (pos === 0) { return max; } - - return (pos + _utf8len[buf[pos]] > max) ? pos : max; -}; - -},{"./common":1}],3:[function(require,module,exports){ -'use strict'; - -// Note: adler32 takes 12% for level 0 and 2% for level 6. -// It doesn't worth to make additional optimizationa as in original. -// Small size is preferable. - -function adler32(adler, buf, len, pos) { - var s1 = (adler & 0xffff) |0, - s2 = ((adler >>> 16) & 0xffff) |0, - n = 0; - - while (len !== 0) { - // Set limit ~ twice less than 5552, to keep - // s2 in 31-bits, because we force signed ints. - // in other case %= will fail. - n = len > 2000 ? 2000 : len; - len -= n; - - do { - s1 = (s1 + buf[pos++]) |0; - s2 = (s2 + s1) |0; - } while (--n); - - s1 %= 65521; - s2 %= 65521; - } - - return (s1 | (s2 << 16)) |0; -} - - -module.exports = adler32; - -},{}],4:[function(require,module,exports){ -'use strict'; - -// Note: we can't get significant speed boost here. -// So write code to minimize size - no pregenerated tables -// and array tools dependencies. - - -// Use ordinary array, since untyped makes no boost here -function makeTable() { - var c, table = []; - - for (var n = 0; n < 256; n++) { - c = n; - for (var k = 0; k < 8; k++) { - c = ((c & 1) ? (0xEDB88320 ^ (c >>> 1)) : (c >>> 1)); - } - table[n] = c; - } - - return table; -} - -// Create table on load. Just 255 signed longs. Not a problem. -var crcTable = makeTable(); - - -function crc32(crc, buf, len, pos) { - var t = crcTable, - end = pos + len; - - crc ^= -1; - - for (var i = pos; i < end; i++) { - crc = (crc >>> 8) ^ t[(crc ^ buf[i]) & 0xFF]; - } - - return (crc ^ (-1)); // >>> 0; -} - - -module.exports = crc32; - -},{}],5:[function(require,module,exports){ -'use strict'; - -var utils = require('../utils/common'); -var trees = require('./trees'); -var adler32 = require('./adler32'); -var crc32 = require('./crc32'); -var msg = require('./messages'); - -/* Public constants ==========================================================*/ -/* ===========================================================================*/ - - -/* Allowed flush values; see deflate() and inflate() below for details */ -var Z_NO_FLUSH = 0; -var Z_PARTIAL_FLUSH = 1; -//var Z_SYNC_FLUSH = 2; -var Z_FULL_FLUSH = 3; -var Z_FINISH = 4; -var Z_BLOCK = 5; -//var Z_TREES = 6; - - -/* Return codes for the compression/decompression functions. Negative values - * are errors, positive values are used for special but normal events. - */ -var Z_OK = 0; -var Z_STREAM_END = 1; -//var Z_NEED_DICT = 2; -//var Z_ERRNO = -1; -var Z_STREAM_ERROR = -2; -var Z_DATA_ERROR = -3; -//var Z_MEM_ERROR = -4; -var Z_BUF_ERROR = -5; -//var Z_VERSION_ERROR = -6; - - -/* compression levels */ -//var Z_NO_COMPRESSION = 0; -//var Z_BEST_SPEED = 1; -//var Z_BEST_COMPRESSION = 9; -var Z_DEFAULT_COMPRESSION = -1; - - -var Z_FILTERED = 1; -var Z_HUFFMAN_ONLY = 2; -var Z_RLE = 3; -var Z_FIXED = 4; -var Z_DEFAULT_STRATEGY = 0; - -/* Possible values of the data_type field (though see inflate()) */ -//var Z_BINARY = 0; -//var Z_TEXT = 1; -//var Z_ASCII = 1; // = Z_TEXT -var Z_UNKNOWN = 2; - - -/* The deflate compression method */ -var Z_DEFLATED = 8; - -/*============================================================================*/ - - -var MAX_MEM_LEVEL = 9; -/* Maximum value for memLevel in deflateInit2 */ -var MAX_WBITS = 15; -/* 32K LZ77 window */ -var DEF_MEM_LEVEL = 8; - - -var LENGTH_CODES = 29; -/* number of length codes, not counting the special END_BLOCK code */ -var LITERALS = 256; -/* number of literal bytes 0..255 */ -var L_CODES = LITERALS + 1 + LENGTH_CODES; -/* number of Literal or Length codes, including the END_BLOCK code */ -var D_CODES = 30; -/* number of distance codes */ -var BL_CODES = 19; -/* number of codes used to transfer the bit lengths */ -var HEAP_SIZE = 2 * L_CODES + 1; -/* maximum heap size */ -var MAX_BITS = 15; -/* All codes must not exceed MAX_BITS bits */ - -var MIN_MATCH = 3; -var MAX_MATCH = 258; -var MIN_LOOKAHEAD = (MAX_MATCH + MIN_MATCH + 1); - -var PRESET_DICT = 0x20; - -var INIT_STATE = 42; -var EXTRA_STATE = 69; -var NAME_STATE = 73; -var COMMENT_STATE = 91; -var HCRC_STATE = 103; -var BUSY_STATE = 113; -var FINISH_STATE = 666; - -var BS_NEED_MORE = 1; /* block not completed, need more input or more output */ -var BS_BLOCK_DONE = 2; /* block flush performed */ -var BS_FINISH_STARTED = 3; /* finish started, need only more output at next deflate */ -var BS_FINISH_DONE = 4; /* finish done, accept no more input or output */ - -var OS_CODE = 0x03; // Unix :) . Don't detect, use this default. - -function err(strm, errorCode) { - strm.msg = msg[errorCode]; - return errorCode; -} - -function rank(f) { - return ((f) << 1) - ((f) > 4 ? 9 : 0); -} - -function zero(buf) { var len = buf.length; while (--len >= 0) { buf[len] = 0; } } - - -/* ========================================================================= - * Flush as much pending output as possible. All deflate() output goes - * through this function so some applications may wish to modify it - * to avoid allocating a large strm->output buffer and copying into it. - * (See also read_buf()). - */ -function flush_pending(strm) { - var s = strm.state; - - //_tr_flush_bits(s); - var len = s.pending; - if (len > strm.avail_out) { - len = strm.avail_out; - } - if (len === 0) { return; } - - utils.arraySet(strm.output, s.pending_buf, s.pending_out, len, strm.next_out); - strm.next_out += len; - s.pending_out += len; - strm.total_out += len; - strm.avail_out -= len; - s.pending -= len; - if (s.pending === 0) { - s.pending_out = 0; - } -} - - -function flush_block_only(s, last) { - trees._tr_flush_block(s, (s.block_start >= 0 ? s.block_start : -1), s.strstart - s.block_start, last); - s.block_start = s.strstart; - flush_pending(s.strm); -} - - -function put_byte(s, b) { - s.pending_buf[s.pending++] = b; -} - - -/* ========================================================================= - * Put a short in the pending buffer. The 16-bit value is put in MSB order. - * IN assertion: the stream state is correct and there is enough room in - * pending_buf. - */ -function putShortMSB(s, b) { -// put_byte(s, (Byte)(b >> 8)); -// put_byte(s, (Byte)(b & 0xff)); - s.pending_buf[s.pending++] = (b >>> 8) & 0xff; - s.pending_buf[s.pending++] = b & 0xff; -} - - -/* =========================================================================== - * Read a new buffer from the current input stream, update the adler32 - * and total number of bytes read. All deflate() input goes through - * this function so some applications may wish to modify it to avoid - * allocating a large strm->input buffer and copying from it. - * (See also flush_pending()). - */ -function read_buf(strm, buf, start, size) { - var len = strm.avail_in; - - if (len > size) { len = size; } - if (len === 0) { return 0; } - - strm.avail_in -= len; - - // zmemcpy(buf, strm->next_in, len); - utils.arraySet(buf, strm.input, strm.next_in, len, start); - if (strm.state.wrap === 1) { - strm.adler = adler32(strm.adler, buf, len, start); - } - - else if (strm.state.wrap === 2) { - strm.adler = crc32(strm.adler, buf, len, start); - } - - strm.next_in += len; - strm.total_in += len; - - return len; -} - - -/* =========================================================================== - * Set match_start to the longest match starting at the given string and - * return its length. Matches shorter or equal to prev_length are discarded, - * in which case the result is equal to prev_length and match_start is - * garbage. - * IN assertions: cur_match is the head of the hash chain for the current - * string (strstart) and its distance is <= MAX_DIST, and prev_length >= 1 - * OUT assertion: the match length is not greater than s->lookahead. - */ -function longest_match(s, cur_match) { - var chain_length = s.max_chain_length; /* max hash chain length */ - var scan = s.strstart; /* current string */ - var match; /* matched string */ - var len; /* length of current match */ - var best_len = s.prev_length; /* best match length so far */ - var nice_match = s.nice_match; /* stop if match long enough */ - var limit = (s.strstart > (s.w_size - MIN_LOOKAHEAD)) ? - s.strstart - (s.w_size - MIN_LOOKAHEAD) : 0/*NIL*/; - - var _win = s.window; // shortcut - - var wmask = s.w_mask; - var prev = s.prev; - - /* Stop when cur_match becomes <= limit. To simplify the code, - * we prevent matches with the string of window index 0. - */ - - var strend = s.strstart + MAX_MATCH; - var scan_end1 = _win[scan + best_len - 1]; - var scan_end = _win[scan + best_len]; - - /* The code is optimized for HASH_BITS >= 8 and MAX_MATCH-2 multiple of 16. - * It is easy to get rid of this optimization if necessary. - */ - // Assert(s->hash_bits >= 8 && MAX_MATCH == 258, "Code too clever"); - - /* Do not waste too much time if we already have a good match: */ - if (s.prev_length >= s.good_match) { - chain_length >>= 2; - } - /* Do not look for matches beyond the end of the input. This is necessary - * to make deflate deterministic. - */ - if (nice_match > s.lookahead) { nice_match = s.lookahead; } - - // Assert((ulg)s->strstart <= s->window_size-MIN_LOOKAHEAD, "need lookahead"); - - do { - // Assert(cur_match < s->strstart, "no future"); - match = cur_match; - - /* Skip to next match if the match length cannot increase - * or if the match length is less than 2. Note that the checks below - * for insufficient lookahead only occur occasionally for performance - * reasons. Therefore uninitialized memory will be accessed, and - * conditional jumps will be made that depend on those values. - * However the length of the match is limited to the lookahead, so - * the output of deflate is not affected by the uninitialized values. - */ - - if (_win[match + best_len] !== scan_end || - _win[match + best_len - 1] !== scan_end1 || - _win[match] !== _win[scan] || - _win[++match] !== _win[scan + 1]) { - continue; - } - - /* The check at best_len-1 can be removed because it will be made - * again later. (This heuristic is not always a win.) - * It is not necessary to compare scan[2] and match[2] since they - * are always equal when the other bytes match, given that - * the hash keys are equal and that HASH_BITS >= 8. - */ - scan += 2; - match++; - // Assert(*scan == *match, "match[2]?"); - - /* We check for insufficient lookahead only every 8th comparison; - * the 256th check will be made at strstart+258. - */ - do { - /*jshint noempty:false*/ - } while (_win[++scan] === _win[++match] && _win[++scan] === _win[++match] && - _win[++scan] === _win[++match] && _win[++scan] === _win[++match] && - _win[++scan] === _win[++match] && _win[++scan] === _win[++match] && - _win[++scan] === _win[++match] && _win[++scan] === _win[++match] && - scan < strend); - - // Assert(scan <= s->window+(unsigned)(s->window_size-1), "wild scan"); - - len = MAX_MATCH - (strend - scan); - scan = strend - MAX_MATCH; - - if (len > best_len) { - s.match_start = cur_match; - best_len = len; - if (len >= nice_match) { - break; - } - scan_end1 = _win[scan + best_len - 1]; - scan_end = _win[scan + best_len]; - } - } while ((cur_match = prev[cur_match & wmask]) > limit && --chain_length !== 0); - - if (best_len <= s.lookahead) { - return best_len; - } - return s.lookahead; -} - - -/* =========================================================================== - * Fill the window when the lookahead becomes insufficient. - * Updates strstart and lookahead. - * - * IN assertion: lookahead < MIN_LOOKAHEAD - * OUT assertions: strstart <= window_size-MIN_LOOKAHEAD - * At least one byte has been read, or avail_in == 0; reads are - * performed for at least two bytes (required for the zip translate_eol - * option -- not supported here). - */ -function fill_window(s) { - var _w_size = s.w_size; - var p, n, m, more, str; - - //Assert(s->lookahead < MIN_LOOKAHEAD, "already enough lookahead"); - - do { - more = s.window_size - s.lookahead - s.strstart; - - // JS ints have 32 bit, block below not needed - /* Deal with !@#$% 64K limit: */ - //if (sizeof(int) <= 2) { - // if (more == 0 && s->strstart == 0 && s->lookahead == 0) { - // more = wsize; - // - // } else if (more == (unsigned)(-1)) { - // /* Very unlikely, but possible on 16 bit machine if - // * strstart == 0 && lookahead == 1 (input done a byte at time) - // */ - // more--; - // } - //} - - - /* If the window is almost full and there is insufficient lookahead, - * move the upper half to the lower one to make room in the upper half. - */ - if (s.strstart >= _w_size + (_w_size - MIN_LOOKAHEAD)) { - - utils.arraySet(s.window, s.window, _w_size, _w_size, 0); - s.match_start -= _w_size; - s.strstart -= _w_size; - /* we now have strstart >= MAX_DIST */ - s.block_start -= _w_size; - - /* Slide the hash table (could be avoided with 32 bit values - at the expense of memory usage). We slide even when level == 0 - to keep the hash table consistent if we switch back to level > 0 - later. (Using level 0 permanently is not an optimal usage of - zlib, so we don't care about this pathological case.) - */ - - n = s.hash_size; - p = n; - do { - m = s.head[--p]; - s.head[p] = (m >= _w_size ? m - _w_size : 0); - } while (--n); - - n = _w_size; - p = n; - do { - m = s.prev[--p]; - s.prev[p] = (m >= _w_size ? m - _w_size : 0); - /* If n is not on any hash chain, prev[n] is garbage but - * its value will never be used. - */ - } while (--n); - - more += _w_size; - } - if (s.strm.avail_in === 0) { - break; - } - - /* If there was no sliding: - * strstart <= WSIZE+MAX_DIST-1 && lookahead <= MIN_LOOKAHEAD - 1 && - * more == window_size - lookahead - strstart - * => more >= window_size - (MIN_LOOKAHEAD-1 + WSIZE + MAX_DIST-1) - * => more >= window_size - 2*WSIZE + 2 - * In the BIG_MEM or MMAP case (not yet supported), - * window_size == input_size + MIN_LOOKAHEAD && - * strstart + s->lookahead <= input_size => more >= MIN_LOOKAHEAD. - * Otherwise, window_size == 2*WSIZE so more >= 2. - * If there was sliding, more >= WSIZE. So in all cases, more >= 2. - */ - //Assert(more >= 2, "more < 2"); - n = read_buf(s.strm, s.window, s.strstart + s.lookahead, more); - s.lookahead += n; - - /* Initialize the hash value now that we have some input: */ - if (s.lookahead + s.insert >= MIN_MATCH) { - str = s.strstart - s.insert; - s.ins_h = s.window[str]; - - /* UPDATE_HASH(s, s->ins_h, s->window[str + 1]); */ - s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[str + 1]) & s.hash_mask; -//#if MIN_MATCH != 3 -// Call update_hash() MIN_MATCH-3 more times -//#endif - while (s.insert) { - /* UPDATE_HASH(s, s->ins_h, s->window[str + MIN_MATCH-1]); */ - s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[str + MIN_MATCH - 1]) & s.hash_mask; - - s.prev[str & s.w_mask] = s.head[s.ins_h]; - s.head[s.ins_h] = str; - str++; - s.insert--; - if (s.lookahead + s.insert < MIN_MATCH) { - break; - } - } - } - /* If the whole input has less than MIN_MATCH bytes, ins_h is garbage, - * but this is not important since only literal bytes will be emitted. - */ - - } while (s.lookahead < MIN_LOOKAHEAD && s.strm.avail_in !== 0); - - /* If the WIN_INIT bytes after the end of the current data have never been - * written, then zero those bytes in order to avoid memory check reports of - * the use of uninitialized (or uninitialised as Julian writes) bytes by - * the longest match routines. Update the high water mark for the next - * time through here. WIN_INIT is set to MAX_MATCH since the longest match - * routines allow scanning to strstart + MAX_MATCH, ignoring lookahead. - */ -// if (s.high_water < s.window_size) { -// var curr = s.strstart + s.lookahead; -// var init = 0; -// -// if (s.high_water < curr) { -// /* Previous high water mark below current data -- zero WIN_INIT -// * bytes or up to end of window, whichever is less. -// */ -// init = s.window_size - curr; -// if (init > WIN_INIT) -// init = WIN_INIT; -// zmemzero(s->window + curr, (unsigned)init); -// s->high_water = curr + init; -// } -// else if (s->high_water < (ulg)curr + WIN_INIT) { -// /* High water mark at or above current data, but below current data -// * plus WIN_INIT -- zero out to current data plus WIN_INIT, or up -// * to end of window, whichever is less. -// */ -// init = (ulg)curr + WIN_INIT - s->high_water; -// if (init > s->window_size - s->high_water) -// init = s->window_size - s->high_water; -// zmemzero(s->window + s->high_water, (unsigned)init); -// s->high_water += init; -// } -// } -// -// Assert((ulg)s->strstart <= s->window_size - MIN_LOOKAHEAD, -// "not enough room for search"); -} - -/* =========================================================================== - * Copy without compression as much as possible from the input stream, return - * the current block state. - * This function does not insert new strings in the dictionary since - * uncompressible data is probably not useful. This function is used - * only for the level=0 compression option. - * NOTE: this function should be optimized to avoid extra copying from - * window to pending_buf. - */ -function deflate_stored(s, flush) { - /* Stored blocks are limited to 0xffff bytes, pending_buf is limited - * to pending_buf_size, and each stored block has a 5 byte header: - */ - var max_block_size = 0xffff; - - if (max_block_size > s.pending_buf_size - 5) { - max_block_size = s.pending_buf_size - 5; - } - - /* Copy as much as possible from input to output: */ - for (;;) { - /* Fill the window as much as possible: */ - if (s.lookahead <= 1) { - - //Assert(s->strstart < s->w_size+MAX_DIST(s) || - // s->block_start >= (long)s->w_size, "slide too late"); -// if (!(s.strstart < s.w_size + (s.w_size - MIN_LOOKAHEAD) || -// s.block_start >= s.w_size)) { -// throw new Error("slide too late"); -// } - - fill_window(s); - if (s.lookahead === 0 && flush === Z_NO_FLUSH) { - return BS_NEED_MORE; - } - - if (s.lookahead === 0) { - break; - } - /* flush the current block */ - } - //Assert(s->block_start >= 0L, "block gone"); -// if (s.block_start < 0) throw new Error("block gone"); - - s.strstart += s.lookahead; - s.lookahead = 0; - - /* Emit a stored block if pending_buf will be full: */ - var max_start = s.block_start + max_block_size; - - if (s.strstart === 0 || s.strstart >= max_start) { - /* strstart == 0 is possible when wraparound on 16-bit machine */ - s.lookahead = s.strstart - max_start; - s.strstart = max_start; - /*** FLUSH_BLOCK(s, 0); ***/ - flush_block_only(s, false); - if (s.strm.avail_out === 0) { - return BS_NEED_MORE; - } - /***/ - - - } - /* Flush if we may have to slide, otherwise block_start may become - * negative and the data will be gone: - */ - if (s.strstart - s.block_start >= (s.w_size - MIN_LOOKAHEAD)) { - /*** FLUSH_BLOCK(s, 0); ***/ - flush_block_only(s, false); - if (s.strm.avail_out === 0) { - return BS_NEED_MORE; - } - /***/ - } - } - - s.insert = 0; - - if (flush === Z_FINISH) { - /*** FLUSH_BLOCK(s, 1); ***/ - flush_block_only(s, true); - if (s.strm.avail_out === 0) { - return BS_FINISH_STARTED; - } - /***/ - return BS_FINISH_DONE; - } - - if (s.strstart > s.block_start) { - /*** FLUSH_BLOCK(s, 0); ***/ - flush_block_only(s, false); - if (s.strm.avail_out === 0) { - return BS_NEED_MORE; - } - /***/ - } - - return BS_NEED_MORE; -} - -/* =========================================================================== - * Compress as much as possible from the input stream, return the current - * block state. - * This function does not perform lazy evaluation of matches and inserts - * new strings in the dictionary only for unmatched strings or for short - * matches. It is used only for the fast compression options. - */ -function deflate_fast(s, flush) { - var hash_head; /* head of the hash chain */ - var bflush; /* set if current block must be flushed */ - - for (;;) { - /* Make sure that we always have enough lookahead, except - * at the end of the input file. We need MAX_MATCH bytes - * for the next match, plus MIN_MATCH bytes to insert the - * string following the next match. - */ - if (s.lookahead < MIN_LOOKAHEAD) { - fill_window(s); - if (s.lookahead < MIN_LOOKAHEAD && flush === Z_NO_FLUSH) { - return BS_NEED_MORE; - } - if (s.lookahead === 0) { - break; /* flush the current block */ - } - } - - /* Insert the string window[strstart .. strstart+2] in the - * dictionary, and set hash_head to the head of the hash chain: - */ - hash_head = 0/*NIL*/; - if (s.lookahead >= MIN_MATCH) { - /*** INSERT_STRING(s, s.strstart, hash_head); ***/ - s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[s.strstart + MIN_MATCH - 1]) & s.hash_mask; - hash_head = s.prev[s.strstart & s.w_mask] = s.head[s.ins_h]; - s.head[s.ins_h] = s.strstart; - /***/ - } - - /* Find the longest match, discarding those <= prev_length. - * At this point we have always match_length < MIN_MATCH - */ - if (hash_head !== 0/*NIL*/ && ((s.strstart - hash_head) <= (s.w_size - MIN_LOOKAHEAD))) { - /* To simplify the code, we prevent matches with the string - * of window index 0 (in particular we have to avoid a match - * of the string with itself at the start of the input file). - */ - s.match_length = longest_match(s, hash_head); - /* longest_match() sets match_start */ - } - if (s.match_length >= MIN_MATCH) { - // check_match(s, s.strstart, s.match_start, s.match_length); // for debug only - - /*** _tr_tally_dist(s, s.strstart - s.match_start, - s.match_length - MIN_MATCH, bflush); ***/ - bflush = trees._tr_tally(s, s.strstart - s.match_start, s.match_length - MIN_MATCH); - - s.lookahead -= s.match_length; - - /* Insert new strings in the hash table only if the match length - * is not too large. This saves time but degrades compression. - */ - if (s.match_length <= s.max_lazy_match/*max_insert_length*/ && s.lookahead >= MIN_MATCH) { - s.match_length--; /* string at strstart already in table */ - do { - s.strstart++; - /*** INSERT_STRING(s, s.strstart, hash_head); ***/ - s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[s.strstart + MIN_MATCH - 1]) & s.hash_mask; - hash_head = s.prev[s.strstart & s.w_mask] = s.head[s.ins_h]; - s.head[s.ins_h] = s.strstart; - /***/ - /* strstart never exceeds WSIZE-MAX_MATCH, so there are - * always MIN_MATCH bytes ahead. - */ - } while (--s.match_length !== 0); - s.strstart++; - } else - { - s.strstart += s.match_length; - s.match_length = 0; - s.ins_h = s.window[s.strstart]; - /* UPDATE_HASH(s, s.ins_h, s.window[s.strstart+1]); */ - s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[s.strstart + 1]) & s.hash_mask; - -//#if MIN_MATCH != 3 -// Call UPDATE_HASH() MIN_MATCH-3 more times -//#endif - /* If lookahead < MIN_MATCH, ins_h is garbage, but it does not - * matter since it will be recomputed at next deflate call. - */ - } - } else { - /* No match, output a literal byte */ - //Tracevv((stderr,"%c", s.window[s.strstart])); - /*** _tr_tally_lit(s, s.window[s.strstart], bflush); ***/ - bflush = trees._tr_tally(s, 0, s.window[s.strstart]); - - s.lookahead--; - s.strstart++; - } - if (bflush) { - /*** FLUSH_BLOCK(s, 0); ***/ - flush_block_only(s, false); - if (s.strm.avail_out === 0) { - return BS_NEED_MORE; - } - /***/ - } - } - s.insert = ((s.strstart < (MIN_MATCH - 1)) ? s.strstart : MIN_MATCH - 1); - if (flush === Z_FINISH) { - /*** FLUSH_BLOCK(s, 1); ***/ - flush_block_only(s, true); - if (s.strm.avail_out === 0) { - return BS_FINISH_STARTED; - } - /***/ - return BS_FINISH_DONE; - } - if (s.last_lit) { - /*** FLUSH_BLOCK(s, 0); ***/ - flush_block_only(s, false); - if (s.strm.avail_out === 0) { - return BS_NEED_MORE; - } - /***/ - } - return BS_BLOCK_DONE; -} - -/* =========================================================================== - * Same as above, but achieves better compression. We use a lazy - * evaluation for matches: a match is finally adopted only if there is - * no better match at the next window position. - */ -function deflate_slow(s, flush) { - var hash_head; /* head of hash chain */ - var bflush; /* set if current block must be flushed */ - - var max_insert; - - /* Process the input block. */ - for (;;) { - /* Make sure that we always have enough lookahead, except - * at the end of the input file. We need MAX_MATCH bytes - * for the next match, plus MIN_MATCH bytes to insert the - * string following the next match. - */ - if (s.lookahead < MIN_LOOKAHEAD) { - fill_window(s); - if (s.lookahead < MIN_LOOKAHEAD && flush === Z_NO_FLUSH) { - return BS_NEED_MORE; - } - if (s.lookahead === 0) { break; } /* flush the current block */ - } - - /* Insert the string window[strstart .. strstart+2] in the - * dictionary, and set hash_head to the head of the hash chain: - */ - hash_head = 0/*NIL*/; - if (s.lookahead >= MIN_MATCH) { - /*** INSERT_STRING(s, s.strstart, hash_head); ***/ - s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[s.strstart + MIN_MATCH - 1]) & s.hash_mask; - hash_head = s.prev[s.strstart & s.w_mask] = s.head[s.ins_h]; - s.head[s.ins_h] = s.strstart; - /***/ - } - - /* Find the longest match, discarding those <= prev_length. - */ - s.prev_length = s.match_length; - s.prev_match = s.match_start; - s.match_length = MIN_MATCH - 1; - - if (hash_head !== 0/*NIL*/ && s.prev_length < s.max_lazy_match && - s.strstart - hash_head <= (s.w_size - MIN_LOOKAHEAD)/*MAX_DIST(s)*/) { - /* To simplify the code, we prevent matches with the string - * of window index 0 (in particular we have to avoid a match - * of the string with itself at the start of the input file). - */ - s.match_length = longest_match(s, hash_head); - /* longest_match() sets match_start */ - - if (s.match_length <= 5 && - (s.strategy === Z_FILTERED || (s.match_length === MIN_MATCH && s.strstart - s.match_start > 4096/*TOO_FAR*/))) { - - /* If prev_match is also MIN_MATCH, match_start is garbage - * but we will ignore the current match anyway. - */ - s.match_length = MIN_MATCH - 1; - } - } - /* If there was a match at the previous step and the current - * match is not better, output the previous match: - */ - if (s.prev_length >= MIN_MATCH && s.match_length <= s.prev_length) { - max_insert = s.strstart + s.lookahead - MIN_MATCH; - /* Do not insert strings in hash table beyond this. */ - - //check_match(s, s.strstart-1, s.prev_match, s.prev_length); - - /***_tr_tally_dist(s, s.strstart - 1 - s.prev_match, - s.prev_length - MIN_MATCH, bflush);***/ - bflush = trees._tr_tally(s, s.strstart - 1 - s.prev_match, s.prev_length - MIN_MATCH); - /* Insert in hash table all strings up to the end of the match. - * strstart-1 and strstart are already inserted. If there is not - * enough lookahead, the last two strings are not inserted in - * the hash table. - */ - s.lookahead -= s.prev_length - 1; - s.prev_length -= 2; - do { - if (++s.strstart <= max_insert) { - /*** INSERT_STRING(s, s.strstart, hash_head); ***/ - s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[s.strstart + MIN_MATCH - 1]) & s.hash_mask; - hash_head = s.prev[s.strstart & s.w_mask] = s.head[s.ins_h]; - s.head[s.ins_h] = s.strstart; - /***/ - } - } while (--s.prev_length !== 0); - s.match_available = 0; - s.match_length = MIN_MATCH - 1; - s.strstart++; - - if (bflush) { - /*** FLUSH_BLOCK(s, 0); ***/ - flush_block_only(s, false); - if (s.strm.avail_out === 0) { - return BS_NEED_MORE; - } - /***/ - } - - } else if (s.match_available) { - /* If there was no match at the previous position, output a - * single literal. If there was a match but the current match - * is longer, truncate the previous match to a single literal. - */ - //Tracevv((stderr,"%c", s->window[s->strstart-1])); - /*** _tr_tally_lit(s, s.window[s.strstart-1], bflush); ***/ - bflush = trees._tr_tally(s, 0, s.window[s.strstart - 1]); - - if (bflush) { - /*** FLUSH_BLOCK_ONLY(s, 0) ***/ - flush_block_only(s, false); - /***/ - } - s.strstart++; - s.lookahead--; - if (s.strm.avail_out === 0) { - return BS_NEED_MORE; - } - } else { - /* There is no previous match to compare with, wait for - * the next step to decide. - */ - s.match_available = 1; - s.strstart++; - s.lookahead--; - } - } - //Assert (flush != Z_NO_FLUSH, "no flush?"); - if (s.match_available) { - //Tracevv((stderr,"%c", s->window[s->strstart-1])); - /*** _tr_tally_lit(s, s.window[s.strstart-1], bflush); ***/ - bflush = trees._tr_tally(s, 0, s.window[s.strstart - 1]); - - s.match_available = 0; - } - s.insert = s.strstart < MIN_MATCH - 1 ? s.strstart : MIN_MATCH - 1; - if (flush === Z_FINISH) { - /*** FLUSH_BLOCK(s, 1); ***/ - flush_block_only(s, true); - if (s.strm.avail_out === 0) { - return BS_FINISH_STARTED; - } - /***/ - return BS_FINISH_DONE; - } - if (s.last_lit) { - /*** FLUSH_BLOCK(s, 0); ***/ - flush_block_only(s, false); - if (s.strm.avail_out === 0) { - return BS_NEED_MORE; - } - /***/ - } - - return BS_BLOCK_DONE; -} - - -/* =========================================================================== - * For Z_RLE, simply look for runs of bytes, generate matches only of distance - * one. Do not maintain a hash table. (It will be regenerated if this run of - * deflate switches away from Z_RLE.) - */ -function deflate_rle(s, flush) { - var bflush; /* set if current block must be flushed */ - var prev; /* byte at distance one to match */ - var scan, strend; /* scan goes up to strend for length of run */ - - var _win = s.window; - - for (;;) { - /* Make sure that we always have enough lookahead, except - * at the end of the input file. We need MAX_MATCH bytes - * for the longest run, plus one for the unrolled loop. - */ - if (s.lookahead <= MAX_MATCH) { - fill_window(s); - if (s.lookahead <= MAX_MATCH && flush === Z_NO_FLUSH) { - return BS_NEED_MORE; - } - if (s.lookahead === 0) { break; } /* flush the current block */ - } - - /* See how many times the previous byte repeats */ - s.match_length = 0; - if (s.lookahead >= MIN_MATCH && s.strstart > 0) { - scan = s.strstart - 1; - prev = _win[scan]; - if (prev === _win[++scan] && prev === _win[++scan] && prev === _win[++scan]) { - strend = s.strstart + MAX_MATCH; - do { - /*jshint noempty:false*/ - } while (prev === _win[++scan] && prev === _win[++scan] && - prev === _win[++scan] && prev === _win[++scan] && - prev === _win[++scan] && prev === _win[++scan] && - prev === _win[++scan] && prev === _win[++scan] && - scan < strend); - s.match_length = MAX_MATCH - (strend - scan); - if (s.match_length > s.lookahead) { - s.match_length = s.lookahead; - } - } - //Assert(scan <= s->window+(uInt)(s->window_size-1), "wild scan"); - } - - /* Emit match if have run of MIN_MATCH or longer, else emit literal */ - if (s.match_length >= MIN_MATCH) { - //check_match(s, s.strstart, s.strstart - 1, s.match_length); - - /*** _tr_tally_dist(s, 1, s.match_length - MIN_MATCH, bflush); ***/ - bflush = trees._tr_tally(s, 1, s.match_length - MIN_MATCH); - - s.lookahead -= s.match_length; - s.strstart += s.match_length; - s.match_length = 0; - } else { - /* No match, output a literal byte */ - //Tracevv((stderr,"%c", s->window[s->strstart])); - /*** _tr_tally_lit(s, s.window[s.strstart], bflush); ***/ - bflush = trees._tr_tally(s, 0, s.window[s.strstart]); - - s.lookahead--; - s.strstart++; - } - if (bflush) { - /*** FLUSH_BLOCK(s, 0); ***/ - flush_block_only(s, false); - if (s.strm.avail_out === 0) { - return BS_NEED_MORE; - } - /***/ - } - } - s.insert = 0; - if (flush === Z_FINISH) { - /*** FLUSH_BLOCK(s, 1); ***/ - flush_block_only(s, true); - if (s.strm.avail_out === 0) { - return BS_FINISH_STARTED; - } - /***/ - return BS_FINISH_DONE; - } - if (s.last_lit) { - /*** FLUSH_BLOCK(s, 0); ***/ - flush_block_only(s, false); - if (s.strm.avail_out === 0) { - return BS_NEED_MORE; - } - /***/ - } - return BS_BLOCK_DONE; -} - -/* =========================================================================== - * For Z_HUFFMAN_ONLY, do not look for matches. Do not maintain a hash table. - * (It will be regenerated if this run of deflate switches away from Huffman.) - */ -function deflate_huff(s, flush) { - var bflush; /* set if current block must be flushed */ - - for (;;) { - /* Make sure that we have a literal to write. */ - if (s.lookahead === 0) { - fill_window(s); - if (s.lookahead === 0) { - if (flush === Z_NO_FLUSH) { - return BS_NEED_MORE; - } - break; /* flush the current block */ - } - } - - /* Output a literal byte */ - s.match_length = 0; - //Tracevv((stderr,"%c", s->window[s->strstart])); - /*** _tr_tally_lit(s, s.window[s.strstart], bflush); ***/ - bflush = trees._tr_tally(s, 0, s.window[s.strstart]); - s.lookahead--; - s.strstart++; - if (bflush) { - /*** FLUSH_BLOCK(s, 0); ***/ - flush_block_only(s, false); - if (s.strm.avail_out === 0) { - return BS_NEED_MORE; - } - /***/ - } - } - s.insert = 0; - if (flush === Z_FINISH) { - /*** FLUSH_BLOCK(s, 1); ***/ - flush_block_only(s, true); - if (s.strm.avail_out === 0) { - return BS_FINISH_STARTED; - } - /***/ - return BS_FINISH_DONE; - } - if (s.last_lit) { - /*** FLUSH_BLOCK(s, 0); ***/ - flush_block_only(s, false); - if (s.strm.avail_out === 0) { - return BS_NEED_MORE; - } - /***/ - } - return BS_BLOCK_DONE; -} - -/* Values for max_lazy_match, good_match and max_chain_length, depending on - * the desired pack level (0..9). The values given below have been tuned to - * exclude worst case performance for pathological files. Better values may be - * found for specific files. - */ -function Config(good_length, max_lazy, nice_length, max_chain, func) { - this.good_length = good_length; - this.max_lazy = max_lazy; - this.nice_length = nice_length; - this.max_chain = max_chain; - this.func = func; -} - -var configuration_table; - -configuration_table = [ - /* good lazy nice chain */ - new Config(0, 0, 0, 0, deflate_stored), /* 0 store only */ - new Config(4, 4, 8, 4, deflate_fast), /* 1 max speed, no lazy matches */ - new Config(4, 5, 16, 8, deflate_fast), /* 2 */ - new Config(4, 6, 32, 32, deflate_fast), /* 3 */ - - new Config(4, 4, 16, 16, deflate_slow), /* 4 lazy matches */ - new Config(8, 16, 32, 32, deflate_slow), /* 5 */ - new Config(8, 16, 128, 128, deflate_slow), /* 6 */ - new Config(8, 32, 128, 256, deflate_slow), /* 7 */ - new Config(32, 128, 258, 1024, deflate_slow), /* 8 */ - new Config(32, 258, 258, 4096, deflate_slow) /* 9 max compression */ -]; - - -/* =========================================================================== - * Initialize the "longest match" routines for a new zlib stream - */ -function lm_init(s) { - s.window_size = 2 * s.w_size; - - /*** CLEAR_HASH(s); ***/ - zero(s.head); // Fill with NIL (= 0); - - /* Set the default configuration parameters: - */ - s.max_lazy_match = configuration_table[s.level].max_lazy; - s.good_match = configuration_table[s.level].good_length; - s.nice_match = configuration_table[s.level].nice_length; - s.max_chain_length = configuration_table[s.level].max_chain; - - s.strstart = 0; - s.block_start = 0; - s.lookahead = 0; - s.insert = 0; - s.match_length = s.prev_length = MIN_MATCH - 1; - s.match_available = 0; - s.ins_h = 0; -} - - -function DeflateState() { - this.strm = null; /* pointer back to this zlib stream */ - this.status = 0; /* as the name implies */ - this.pending_buf = null; /* output still pending */ - this.pending_buf_size = 0; /* size of pending_buf */ - this.pending_out = 0; /* next pending byte to output to the stream */ - this.pending = 0; /* nb of bytes in the pending buffer */ - this.wrap = 0; /* bit 0 true for zlib, bit 1 true for gzip */ - this.gzhead = null; /* gzip header information to write */ - this.gzindex = 0; /* where in extra, name, or comment */ - this.method = Z_DEFLATED; /* can only be DEFLATED */ - this.last_flush = -1; /* value of flush param for previous deflate call */ - - this.w_size = 0; /* LZ77 window size (32K by default) */ - this.w_bits = 0; /* log2(w_size) (8..16) */ - this.w_mask = 0; /* w_size - 1 */ - - this.window = null; - /* Sliding window. Input bytes are read into the second half of the window, - * and move to the first half later to keep a dictionary of at least wSize - * bytes. With this organization, matches are limited to a distance of - * wSize-MAX_MATCH bytes, but this ensures that IO is always - * performed with a length multiple of the block size. - */ - - this.window_size = 0; - /* Actual size of window: 2*wSize, except when the user input buffer - * is directly used as sliding window. - */ - - this.prev = null; - /* Link to older string with same hash index. To limit the size of this - * array to 64K, this link is maintained only for the last 32K strings. - * An index in this array is thus a window index modulo 32K. - */ - - this.head = null; /* Heads of the hash chains or NIL. */ - - this.ins_h = 0; /* hash index of string to be inserted */ - this.hash_size = 0; /* number of elements in hash table */ - this.hash_bits = 0; /* log2(hash_size) */ - this.hash_mask = 0; /* hash_size-1 */ - - this.hash_shift = 0; - /* Number of bits by which ins_h must be shifted at each input - * step. It must be such that after MIN_MATCH steps, the oldest - * byte no longer takes part in the hash key, that is: - * hash_shift * MIN_MATCH >= hash_bits - */ - - this.block_start = 0; - /* Window position at the beginning of the current output block. Gets - * negative when the window is moved backwards. - */ - - this.match_length = 0; /* length of best match */ - this.prev_match = 0; /* previous match */ - this.match_available = 0; /* set if previous match exists */ - this.strstart = 0; /* start of string to insert */ - this.match_start = 0; /* start of matching string */ - this.lookahead = 0; /* number of valid bytes ahead in window */ - - this.prev_length = 0; - /* Length of the best match at previous step. Matches not greater than this - * are discarded. This is used in the lazy match evaluation. - */ - - this.max_chain_length = 0; - /* To speed up deflation, hash chains are never searched beyond this - * length. A higher limit improves compression ratio but degrades the - * speed. - */ - - this.max_lazy_match = 0; - /* Attempt to find a better match only when the current match is strictly - * smaller than this value. This mechanism is used only for compression - * levels >= 4. - */ - // That's alias to max_lazy_match, don't use directly - //this.max_insert_length = 0; - /* Insert new strings in the hash table only if the match length is not - * greater than this length. This saves time but degrades compression. - * max_insert_length is used only for compression levels <= 3. - */ - - this.level = 0; /* compression level (1..9) */ - this.strategy = 0; /* favor or force Huffman coding*/ - - this.good_match = 0; - /* Use a faster search when the previous match is longer than this */ - - this.nice_match = 0; /* Stop searching when current match exceeds this */ - - /* used by trees.c: */ - - /* Didn't use ct_data typedef below to suppress compiler warning */ - - // struct ct_data_s dyn_ltree[HEAP_SIZE]; /* literal and length tree */ - // struct ct_data_s dyn_dtree[2*D_CODES+1]; /* distance tree */ - // struct ct_data_s bl_tree[2*BL_CODES+1]; /* Huffman tree for bit lengths */ - - // Use flat array of DOUBLE size, with interleaved fata, - // because JS does not support effective - this.dyn_ltree = new utils.Buf16(HEAP_SIZE * 2); - this.dyn_dtree = new utils.Buf16((2 * D_CODES + 1) * 2); - this.bl_tree = new utils.Buf16((2 * BL_CODES + 1) * 2); - zero(this.dyn_ltree); - zero(this.dyn_dtree); - zero(this.bl_tree); - - this.l_desc = null; /* desc. for literal tree */ - this.d_desc = null; /* desc. for distance tree */ - this.bl_desc = null; /* desc. for bit length tree */ - - //ush bl_count[MAX_BITS+1]; - this.bl_count = new utils.Buf16(MAX_BITS + 1); - /* number of codes at each bit length for an optimal tree */ - - //int heap[2*L_CODES+1]; /* heap used to build the Huffman trees */ - this.heap = new utils.Buf16(2 * L_CODES + 1); /* heap used to build the Huffman trees */ - zero(this.heap); - - this.heap_len = 0; /* number of elements in the heap */ - this.heap_max = 0; /* element of largest frequency */ - /* The sons of heap[n] are heap[2*n] and heap[2*n+1]. heap[0] is not used. - * The same heap array is used to build all trees. - */ - - this.depth = new utils.Buf16(2 * L_CODES + 1); //uch depth[2*L_CODES+1]; - zero(this.depth); - /* Depth of each subtree used as tie breaker for trees of equal frequency - */ - - this.l_buf = 0; /* buffer index for literals or lengths */ - - this.lit_bufsize = 0; - /* Size of match buffer for literals/lengths. There are 4 reasons for - * limiting lit_bufsize to 64K: - * - frequencies can be kept in 16 bit counters - * - if compression is not successful for the first block, all input - * data is still in the window so we can still emit a stored block even - * when input comes from standard input. (This can also be done for - * all blocks if lit_bufsize is not greater than 32K.) - * - if compression is not successful for a file smaller than 64K, we can - * even emit a stored file instead of a stored block (saving 5 bytes). - * This is applicable only for zip (not gzip or zlib). - * - creating new Huffman trees less frequently may not provide fast - * adaptation to changes in the input data statistics. (Take for - * example a binary file with poorly compressible code followed by - * a highly compressible string table.) Smaller buffer sizes give - * fast adaptation but have of course the overhead of transmitting - * trees more frequently. - * - I can't count above 4 - */ - - this.last_lit = 0; /* running index in l_buf */ - - this.d_buf = 0; - /* Buffer index for distances. To simplify the code, d_buf and l_buf have - * the same number of elements. To use different lengths, an extra flag - * array would be necessary. - */ - - this.opt_len = 0; /* bit length of current block with optimal trees */ - this.static_len = 0; /* bit length of current block with static trees */ - this.matches = 0; /* number of string matches in current block */ - this.insert = 0; /* bytes at end of window left to insert */ - - - this.bi_buf = 0; - /* Output buffer. bits are inserted starting at the bottom (least - * significant bits). - */ - this.bi_valid = 0; - /* Number of valid bits in bi_buf. All bits above the last valid bit - * are always zero. - */ - - // Used for window memory init. We safely ignore it for JS. That makes - // sense only for pointers and memory check tools. - //this.high_water = 0; - /* High water mark offset in window for initialized bytes -- bytes above - * this are set to zero in order to avoid memory check warnings when - * longest match routines access bytes past the input. This is then - * updated to the new high water mark. - */ -} - - -function deflateResetKeep(strm) { - var s; - - if (!strm || !strm.state) { - return err(strm, Z_STREAM_ERROR); - } - - strm.total_in = strm.total_out = 0; - strm.data_type = Z_UNKNOWN; - - s = strm.state; - s.pending = 0; - s.pending_out = 0; - - if (s.wrap < 0) { - s.wrap = -s.wrap; - /* was made negative by deflate(..., Z_FINISH); */ - } - s.status = (s.wrap ? INIT_STATE : BUSY_STATE); - strm.adler = (s.wrap === 2) ? - 0 // crc32(0, Z_NULL, 0) - : - 1; // adler32(0, Z_NULL, 0) - s.last_flush = Z_NO_FLUSH; - trees._tr_init(s); - return Z_OK; -} - - -function deflateReset(strm) { - var ret = deflateResetKeep(strm); - if (ret === Z_OK) { - lm_init(strm.state); - } - return ret; -} - - -function deflateSetHeader(strm, head) { - if (!strm || !strm.state) { return Z_STREAM_ERROR; } - if (strm.state.wrap !== 2) { return Z_STREAM_ERROR; } - strm.state.gzhead = head; - return Z_OK; -} - - -function deflateInit2(strm, level, method, windowBits, memLevel, strategy) { - if (!strm) { // === Z_NULL - return Z_STREAM_ERROR; - } - var wrap = 1; - - if (level === Z_DEFAULT_COMPRESSION) { - level = 6; - } - - if (windowBits < 0) { /* suppress zlib wrapper */ - wrap = 0; - windowBits = -windowBits; - } - - else if (windowBits > 15) { - wrap = 2; /* write gzip wrapper instead */ - windowBits -= 16; - } - - - if (memLevel < 1 || memLevel > MAX_MEM_LEVEL || method !== Z_DEFLATED || - windowBits < 8 || windowBits > 15 || level < 0 || level > 9 || - strategy < 0 || strategy > Z_FIXED) { - return err(strm, Z_STREAM_ERROR); - } - - - if (windowBits === 8) { - windowBits = 9; - } - /* until 256-byte window bug fixed */ - - var s = new DeflateState(); - - strm.state = s; - s.strm = strm; - - s.wrap = wrap; - s.gzhead = null; - s.w_bits = windowBits; - s.w_size = 1 << s.w_bits; - s.w_mask = s.w_size - 1; - - s.hash_bits = memLevel + 7; - s.hash_size = 1 << s.hash_bits; - s.hash_mask = s.hash_size - 1; - s.hash_shift = ~~((s.hash_bits + MIN_MATCH - 1) / MIN_MATCH); - - s.window = new utils.Buf8(s.w_size * 2); - s.head = new utils.Buf16(s.hash_size); - s.prev = new utils.Buf16(s.w_size); - - // Don't need mem init magic for JS. - //s.high_water = 0; /* nothing written to s->window yet */ - - s.lit_bufsize = 1 << (memLevel + 6); /* 16K elements by default */ - - s.pending_buf_size = s.lit_bufsize * 4; - - //overlay = (ushf *) ZALLOC(strm, s->lit_bufsize, sizeof(ush)+2); - //s->pending_buf = (uchf *) overlay; - s.pending_buf = new utils.Buf8(s.pending_buf_size); - - // It is offset from `s.pending_buf` (size is `s.lit_bufsize * 2`) - //s->d_buf = overlay + s->lit_bufsize/sizeof(ush); - s.d_buf = 1 * s.lit_bufsize; - - //s->l_buf = s->pending_buf + (1+sizeof(ush))*s->lit_bufsize; - s.l_buf = (1 + 2) * s.lit_bufsize; - - s.level = level; - s.strategy = strategy; - s.method = method; - - return deflateReset(strm); -} - -function deflateInit(strm, level) { - return deflateInit2(strm, level, Z_DEFLATED, MAX_WBITS, DEF_MEM_LEVEL, Z_DEFAULT_STRATEGY); -} - - -function deflate(strm, flush) { - var old_flush, s; - var beg, val; // for gzip header write only - - if (!strm || !strm.state || - flush > Z_BLOCK || flush < 0) { - return strm ? err(strm, Z_STREAM_ERROR) : Z_STREAM_ERROR; - } - - s = strm.state; - - if (!strm.output || - (!strm.input && strm.avail_in !== 0) || - (s.status === FINISH_STATE && flush !== Z_FINISH)) { - return err(strm, (strm.avail_out === 0) ? Z_BUF_ERROR : Z_STREAM_ERROR); - } - - s.strm = strm; /* just in case */ - old_flush = s.last_flush; - s.last_flush = flush; - - /* Write the header */ - if (s.status === INIT_STATE) { - - if (s.wrap === 2) { // GZIP header - strm.adler = 0; //crc32(0L, Z_NULL, 0); - put_byte(s, 31); - put_byte(s, 139); - put_byte(s, 8); - if (!s.gzhead) { // s->gzhead == Z_NULL - put_byte(s, 0); - put_byte(s, 0); - put_byte(s, 0); - put_byte(s, 0); - put_byte(s, 0); - put_byte(s, s.level === 9 ? 2 : - (s.strategy >= Z_HUFFMAN_ONLY || s.level < 2 ? - 4 : 0)); - put_byte(s, OS_CODE); - s.status = BUSY_STATE; - } - else { - put_byte(s, (s.gzhead.text ? 1 : 0) + - (s.gzhead.hcrc ? 2 : 0) + - (!s.gzhead.extra ? 0 : 4) + - (!s.gzhead.name ? 0 : 8) + - (!s.gzhead.comment ? 0 : 16) - ); - put_byte(s, s.gzhead.time & 0xff); - put_byte(s, (s.gzhead.time >> 8) & 0xff); - put_byte(s, (s.gzhead.time >> 16) & 0xff); - put_byte(s, (s.gzhead.time >> 24) & 0xff); - put_byte(s, s.level === 9 ? 2 : - (s.strategy >= Z_HUFFMAN_ONLY || s.level < 2 ? - 4 : 0)); - put_byte(s, s.gzhead.os & 0xff); - if (s.gzhead.extra && s.gzhead.extra.length) { - put_byte(s, s.gzhead.extra.length & 0xff); - put_byte(s, (s.gzhead.extra.length >> 8) & 0xff); - } - if (s.gzhead.hcrc) { - strm.adler = crc32(strm.adler, s.pending_buf, s.pending, 0); - } - s.gzindex = 0; - s.status = EXTRA_STATE; - } - } - else // DEFLATE header - { - var header = (Z_DEFLATED + ((s.w_bits - 8) << 4)) << 8; - var level_flags = -1; - - if (s.strategy >= Z_HUFFMAN_ONLY || s.level < 2) { - level_flags = 0; - } else if (s.level < 6) { - level_flags = 1; - } else if (s.level === 6) { - level_flags = 2; - } else { - level_flags = 3; - } - header |= (level_flags << 6); - if (s.strstart !== 0) { header |= PRESET_DICT; } - header += 31 - (header % 31); - - s.status = BUSY_STATE; - putShortMSB(s, header); - - /* Save the adler32 of the preset dictionary: */ - if (s.strstart !== 0) { - putShortMSB(s, strm.adler >>> 16); - putShortMSB(s, strm.adler & 0xffff); - } - strm.adler = 1; // adler32(0L, Z_NULL, 0); - } - } - -//#ifdef GZIP - if (s.status === EXTRA_STATE) { - if (s.gzhead.extra/* != Z_NULL*/) { - beg = s.pending; /* start of bytes to update crc */ - - while (s.gzindex < (s.gzhead.extra.length & 0xffff)) { - if (s.pending === s.pending_buf_size) { - if (s.gzhead.hcrc && s.pending > beg) { - strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg); - } - flush_pending(strm); - beg = s.pending; - if (s.pending === s.pending_buf_size) { - break; - } - } - put_byte(s, s.gzhead.extra[s.gzindex] & 0xff); - s.gzindex++; - } - if (s.gzhead.hcrc && s.pending > beg) { - strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg); - } - if (s.gzindex === s.gzhead.extra.length) { - s.gzindex = 0; - s.status = NAME_STATE; - } - } - else { - s.status = NAME_STATE; - } - } - if (s.status === NAME_STATE) { - if (s.gzhead.name/* != Z_NULL*/) { - beg = s.pending; /* start of bytes to update crc */ - //int val; - - do { - if (s.pending === s.pending_buf_size) { - if (s.gzhead.hcrc && s.pending > beg) { - strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg); - } - flush_pending(strm); - beg = s.pending; - if (s.pending === s.pending_buf_size) { - val = 1; - break; - } - } - // JS specific: little magic to add zero terminator to end of string - if (s.gzindex < s.gzhead.name.length) { - val = s.gzhead.name.charCodeAt(s.gzindex++) & 0xff; - } else { - val = 0; - } - put_byte(s, val); - } while (val !== 0); - - if (s.gzhead.hcrc && s.pending > beg) { - strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg); - } - if (val === 0) { - s.gzindex = 0; - s.status = COMMENT_STATE; - } - } - else { - s.status = COMMENT_STATE; - } - } - if (s.status === COMMENT_STATE) { - if (s.gzhead.comment/* != Z_NULL*/) { - beg = s.pending; /* start of bytes to update crc */ - //int val; - - do { - if (s.pending === s.pending_buf_size) { - if (s.gzhead.hcrc && s.pending > beg) { - strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg); - } - flush_pending(strm); - beg = s.pending; - if (s.pending === s.pending_buf_size) { - val = 1; - break; - } - } - // JS specific: little magic to add zero terminator to end of string - if (s.gzindex < s.gzhead.comment.length) { - val = s.gzhead.comment.charCodeAt(s.gzindex++) & 0xff; - } else { - val = 0; - } - put_byte(s, val); - } while (val !== 0); - - if (s.gzhead.hcrc && s.pending > beg) { - strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg); - } - if (val === 0) { - s.status = HCRC_STATE; - } - } - else { - s.status = HCRC_STATE; - } - } - if (s.status === HCRC_STATE) { - if (s.gzhead.hcrc) { - if (s.pending + 2 > s.pending_buf_size) { - flush_pending(strm); - } - if (s.pending + 2 <= s.pending_buf_size) { - put_byte(s, strm.adler & 0xff); - put_byte(s, (strm.adler >> 8) & 0xff); - strm.adler = 0; //crc32(0L, Z_NULL, 0); - s.status = BUSY_STATE; - } - } - else { - s.status = BUSY_STATE; - } - } -//#endif - - /* Flush as much pending output as possible */ - if (s.pending !== 0) { - flush_pending(strm); - if (strm.avail_out === 0) { - /* Since avail_out is 0, deflate will be called again with - * more output space, but possibly with both pending and - * avail_in equal to zero. There won't be anything to do, - * but this is not an error situation so make sure we - * return OK instead of BUF_ERROR at next call of deflate: - */ - s.last_flush = -1; - return Z_OK; - } - - /* Make sure there is something to do and avoid duplicate consecutive - * flushes. For repeated and useless calls with Z_FINISH, we keep - * returning Z_STREAM_END instead of Z_BUF_ERROR. - */ - } else if (strm.avail_in === 0 && rank(flush) <= rank(old_flush) && - flush !== Z_FINISH) { - return err(strm, Z_BUF_ERROR); - } - - /* User must not provide more input after the first FINISH: */ - if (s.status === FINISH_STATE && strm.avail_in !== 0) { - return err(strm, Z_BUF_ERROR); - } - - /* Start a new block or continue the current one. - */ - if (strm.avail_in !== 0 || s.lookahead !== 0 || - (flush !== Z_NO_FLUSH && s.status !== FINISH_STATE)) { - var bstate = (s.strategy === Z_HUFFMAN_ONLY) ? deflate_huff(s, flush) : - (s.strategy === Z_RLE ? deflate_rle(s, flush) : - configuration_table[s.level].func(s, flush)); - - if (bstate === BS_FINISH_STARTED || bstate === BS_FINISH_DONE) { - s.status = FINISH_STATE; - } - if (bstate === BS_NEED_MORE || bstate === BS_FINISH_STARTED) { - if (strm.avail_out === 0) { - s.last_flush = -1; - /* avoid BUF_ERROR next call, see above */ - } - return Z_OK; - /* If flush != Z_NO_FLUSH && avail_out == 0, the next call - * of deflate should use the same flush parameter to make sure - * that the flush is complete. So we don't have to output an - * empty block here, this will be done at next call. This also - * ensures that for a very small output buffer, we emit at most - * one empty block. - */ - } - if (bstate === BS_BLOCK_DONE) { - if (flush === Z_PARTIAL_FLUSH) { - trees._tr_align(s); - } - else if (flush !== Z_BLOCK) { /* FULL_FLUSH or SYNC_FLUSH */ - - trees._tr_stored_block(s, 0, 0, false); - /* For a full flush, this empty block will be recognized - * as a special marker by inflate_sync(). - */ - if (flush === Z_FULL_FLUSH) { - /*** CLEAR_HASH(s); ***/ /* forget history */ - zero(s.head); // Fill with NIL (= 0); - - if (s.lookahead === 0) { - s.strstart = 0; - s.block_start = 0; - s.insert = 0; - } - } - } - flush_pending(strm); - if (strm.avail_out === 0) { - s.last_flush = -1; /* avoid BUF_ERROR at next call, see above */ - return Z_OK; - } - } - } - //Assert(strm->avail_out > 0, "bug2"); - //if (strm.avail_out <= 0) { throw new Error("bug2");} - - if (flush !== Z_FINISH) { return Z_OK; } - if (s.wrap <= 0) { return Z_STREAM_END; } - - /* Write the trailer */ - if (s.wrap === 2) { - put_byte(s, strm.adler & 0xff); - put_byte(s, (strm.adler >> 8) & 0xff); - put_byte(s, (strm.adler >> 16) & 0xff); - put_byte(s, (strm.adler >> 24) & 0xff); - put_byte(s, strm.total_in & 0xff); - put_byte(s, (strm.total_in >> 8) & 0xff); - put_byte(s, (strm.total_in >> 16) & 0xff); - put_byte(s, (strm.total_in >> 24) & 0xff); - } - else - { - putShortMSB(s, strm.adler >>> 16); - putShortMSB(s, strm.adler & 0xffff); - } - - flush_pending(strm); - /* If avail_out is zero, the application will call deflate again - * to flush the rest. - */ - if (s.wrap > 0) { s.wrap = -s.wrap; } - /* write the trailer only once! */ - return s.pending !== 0 ? Z_OK : Z_STREAM_END; -} - -function deflateEnd(strm) { - var status; - - if (!strm/*== Z_NULL*/ || !strm.state/*== Z_NULL*/) { - return Z_STREAM_ERROR; - } - - status = strm.state.status; - if (status !== INIT_STATE && - status !== EXTRA_STATE && - status !== NAME_STATE && - status !== COMMENT_STATE && - status !== HCRC_STATE && - status !== BUSY_STATE && - status !== FINISH_STATE - ) { - return err(strm, Z_STREAM_ERROR); - } - - strm.state = null; - - return status === BUSY_STATE ? err(strm, Z_DATA_ERROR) : Z_OK; -} - - -/* ========================================================================= - * Initializes the compression dictionary from the given byte - * sequence without producing any compressed output. - */ -function deflateSetDictionary(strm, dictionary) { - var dictLength = dictionary.length; - - var s; - var str, n; - var wrap; - var avail; - var next; - var input; - var tmpDict; - - if (!strm/*== Z_NULL*/ || !strm.state/*== Z_NULL*/) { - return Z_STREAM_ERROR; - } - - s = strm.state; - wrap = s.wrap; - - if (wrap === 2 || (wrap === 1 && s.status !== INIT_STATE) || s.lookahead) { - return Z_STREAM_ERROR; - } - - /* when using zlib wrappers, compute Adler-32 for provided dictionary */ - if (wrap === 1) { - /* adler32(strm->adler, dictionary, dictLength); */ - strm.adler = adler32(strm.adler, dictionary, dictLength, 0); - } - - s.wrap = 0; /* avoid computing Adler-32 in read_buf */ - - /* if dictionary would fill window, just replace the history */ - if (dictLength >= s.w_size) { - if (wrap === 0) { /* already empty otherwise */ - /*** CLEAR_HASH(s); ***/ - zero(s.head); // Fill with NIL (= 0); - s.strstart = 0; - s.block_start = 0; - s.insert = 0; - } - /* use the tail */ - // dictionary = dictionary.slice(dictLength - s.w_size); - tmpDict = new utils.Buf8(s.w_size); - utils.arraySet(tmpDict, dictionary, dictLength - s.w_size, s.w_size, 0); - dictionary = tmpDict; - dictLength = s.w_size; - } - /* insert dictionary into window and hash */ - avail = strm.avail_in; - next = strm.next_in; - input = strm.input; - strm.avail_in = dictLength; - strm.next_in = 0; - strm.input = dictionary; - fill_window(s); - while (s.lookahead >= MIN_MATCH) { - str = s.strstart; - n = s.lookahead - (MIN_MATCH - 1); - do { - /* UPDATE_HASH(s, s->ins_h, s->window[str + MIN_MATCH-1]); */ - s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[str + MIN_MATCH - 1]) & s.hash_mask; - - s.prev[str & s.w_mask] = s.head[s.ins_h]; - - s.head[s.ins_h] = str; - str++; - } while (--n); - s.strstart = str; - s.lookahead = MIN_MATCH - 1; - fill_window(s); - } - s.strstart += s.lookahead; - s.block_start = s.strstart; - s.insert = s.lookahead; - s.lookahead = 0; - s.match_length = s.prev_length = MIN_MATCH - 1; - s.match_available = 0; - strm.next_in = next; - strm.input = input; - strm.avail_in = avail; - s.wrap = wrap; - return Z_OK; -} - - -exports.deflateInit = deflateInit; -exports.deflateInit2 = deflateInit2; -exports.deflateReset = deflateReset; -exports.deflateResetKeep = deflateResetKeep; -exports.deflateSetHeader = deflateSetHeader; -exports.deflate = deflate; -exports.deflateEnd = deflateEnd; -exports.deflateSetDictionary = deflateSetDictionary; -exports.deflateInfo = 'pako deflate (from Nodeca project)'; - -/* Not implemented -exports.deflateBound = deflateBound; -exports.deflateCopy = deflateCopy; -exports.deflateParams = deflateParams; -exports.deflatePending = deflatePending; -exports.deflatePrime = deflatePrime; -exports.deflateTune = deflateTune; -*/ - -},{"../utils/common":1,"./adler32":3,"./crc32":4,"./messages":6,"./trees":7}],6:[function(require,module,exports){ -'use strict'; - -module.exports = { - 2: 'need dictionary', /* Z_NEED_DICT 2 */ - 1: 'stream end', /* Z_STREAM_END 1 */ - 0: '', /* Z_OK 0 */ - '-1': 'file error', /* Z_ERRNO (-1) */ - '-2': 'stream error', /* Z_STREAM_ERROR (-2) */ - '-3': 'data error', /* Z_DATA_ERROR (-3) */ - '-4': 'insufficient memory', /* Z_MEM_ERROR (-4) */ - '-5': 'buffer error', /* Z_BUF_ERROR (-5) */ - '-6': 'incompatible version' /* Z_VERSION_ERROR (-6) */ -}; - -},{}],7:[function(require,module,exports){ -'use strict'; - - -var utils = require('../utils/common'); - -/* Public constants ==========================================================*/ -/* ===========================================================================*/ - - -//var Z_FILTERED = 1; -//var Z_HUFFMAN_ONLY = 2; -//var Z_RLE = 3; -var Z_FIXED = 4; -//var Z_DEFAULT_STRATEGY = 0; - -/* Possible values of the data_type field (though see inflate()) */ -var Z_BINARY = 0; -var Z_TEXT = 1; -//var Z_ASCII = 1; // = Z_TEXT -var Z_UNKNOWN = 2; - -/*============================================================================*/ - - -function zero(buf) { var len = buf.length; while (--len >= 0) { buf[len] = 0; } } - -// From zutil.h - -var STORED_BLOCK = 0; -var STATIC_TREES = 1; -var DYN_TREES = 2; -/* The three kinds of block type */ - -var MIN_MATCH = 3; -var MAX_MATCH = 258; -/* The minimum and maximum match lengths */ - -// From deflate.h -/* =========================================================================== - * Internal compression state. - */ - -var LENGTH_CODES = 29; -/* number of length codes, not counting the special END_BLOCK code */ - -var LITERALS = 256; -/* number of literal bytes 0..255 */ - -var L_CODES = LITERALS + 1 + LENGTH_CODES; -/* number of Literal or Length codes, including the END_BLOCK code */ - -var D_CODES = 30; -/* number of distance codes */ - -var BL_CODES = 19; -/* number of codes used to transfer the bit lengths */ - -var HEAP_SIZE = 2 * L_CODES + 1; -/* maximum heap size */ - -var MAX_BITS = 15; -/* All codes must not exceed MAX_BITS bits */ - -var Buf_size = 16; -/* size of bit buffer in bi_buf */ - - -/* =========================================================================== - * Constants - */ - -var MAX_BL_BITS = 7; -/* Bit length codes must not exceed MAX_BL_BITS bits */ - -var END_BLOCK = 256; -/* end of block literal code */ - -var REP_3_6 = 16; -/* repeat previous bit length 3-6 times (2 bits of repeat count) */ - -var REPZ_3_10 = 17; -/* repeat a zero length 3-10 times (3 bits of repeat count) */ - -var REPZ_11_138 = 18; -/* repeat a zero length 11-138 times (7 bits of repeat count) */ - -/* eslint-disable comma-spacing,array-bracket-spacing */ -var extra_lbits = /* extra bits for each length code */ - [0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0]; - -var extra_dbits = /* extra bits for each distance code */ - [0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13]; - -var extra_blbits = /* extra bits for each bit length code */ - [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7]; - -var bl_order = - [16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]; -/* eslint-enable comma-spacing,array-bracket-spacing */ - -/* The lengths of the bit length codes are sent in order of decreasing - * probability, to avoid transmitting the lengths for unused bit length codes. - */ - -/* =========================================================================== - * Local data. These are initialized only once. - */ - -// We pre-fill arrays with 0 to avoid uninitialized gaps - -var DIST_CODE_LEN = 512; /* see definition of array dist_code below */ - -// !!!! Use flat array insdead of structure, Freq = i*2, Len = i*2+1 -var static_ltree = new Array((L_CODES + 2) * 2); -zero(static_ltree); -/* The static literal tree. Since the bit lengths are imposed, there is no - * need for the L_CODES extra codes used during heap construction. However - * The codes 286 and 287 are needed to build a canonical tree (see _tr_init - * below). - */ - -var static_dtree = new Array(D_CODES * 2); -zero(static_dtree); -/* The static distance tree. (Actually a trivial tree since all codes use - * 5 bits.) - */ - -var _dist_code = new Array(DIST_CODE_LEN); -zero(_dist_code); -/* Distance codes. The first 256 values correspond to the distances - * 3 .. 258, the last 256 values correspond to the top 8 bits of - * the 15 bit distances. - */ - -var _length_code = new Array(MAX_MATCH - MIN_MATCH + 1); -zero(_length_code); -/* length code for each normalized match length (0 == MIN_MATCH) */ - -var base_length = new Array(LENGTH_CODES); -zero(base_length); -/* First normalized length for each code (0 = MIN_MATCH) */ - -var base_dist = new Array(D_CODES); -zero(base_dist); -/* First normalized distance for each code (0 = distance of 1) */ - - -function StaticTreeDesc(static_tree, extra_bits, extra_base, elems, max_length) { - - this.static_tree = static_tree; /* static tree or NULL */ - this.extra_bits = extra_bits; /* extra bits for each code or NULL */ - this.extra_base = extra_base; /* base index for extra_bits */ - this.elems = elems; /* max number of elements in the tree */ - this.max_length = max_length; /* max bit length for the codes */ - - // show if `static_tree` has data or dummy - needed for monomorphic objects - this.has_stree = static_tree && static_tree.length; -} - - -var static_l_desc; -var static_d_desc; -var static_bl_desc; - - -function TreeDesc(dyn_tree, stat_desc) { - this.dyn_tree = dyn_tree; /* the dynamic tree */ - this.max_code = 0; /* largest code with non zero frequency */ - this.stat_desc = stat_desc; /* the corresponding static tree */ -} - - - -function d_code(dist) { - return dist < 256 ? _dist_code[dist] : _dist_code[256 + (dist >>> 7)]; -} - - -/* =========================================================================== - * Output a short LSB first on the stream. - * IN assertion: there is enough room in pendingBuf. - */ -function put_short(s, w) { -// put_byte(s, (uch)((w) & 0xff)); -// put_byte(s, (uch)((ush)(w) >> 8)); - s.pending_buf[s.pending++] = (w) & 0xff; - s.pending_buf[s.pending++] = (w >>> 8) & 0xff; -} - - -/* =========================================================================== - * Send a value on a given number of bits. - * IN assertion: length <= 16 and value fits in length bits. - */ -function send_bits(s, value, length) { - if (s.bi_valid > (Buf_size - length)) { - s.bi_buf |= (value << s.bi_valid) & 0xffff; - put_short(s, s.bi_buf); - s.bi_buf = value >> (Buf_size - s.bi_valid); - s.bi_valid += length - Buf_size; - } else { - s.bi_buf |= (value << s.bi_valid) & 0xffff; - s.bi_valid += length; - } -} - - -function send_code(s, c, tree) { - send_bits(s, tree[c * 2]/*.Code*/, tree[c * 2 + 1]/*.Len*/); -} - - -/* =========================================================================== - * Reverse the first len bits of a code, using straightforward code (a faster - * method would use a table) - * IN assertion: 1 <= len <= 15 - */ -function bi_reverse(code, len) { - var res = 0; - do { - res |= code & 1; - code >>>= 1; - res <<= 1; - } while (--len > 0); - return res >>> 1; -} - - -/* =========================================================================== - * Flush the bit buffer, keeping at most 7 bits in it. - */ -function bi_flush(s) { - if (s.bi_valid === 16) { - put_short(s, s.bi_buf); - s.bi_buf = 0; - s.bi_valid = 0; - - } else if (s.bi_valid >= 8) { - s.pending_buf[s.pending++] = s.bi_buf & 0xff; - s.bi_buf >>= 8; - s.bi_valid -= 8; - } -} - - -/* =========================================================================== - * Compute the optimal bit lengths for a tree and update the total bit length - * for the current block. - * IN assertion: the fields freq and dad are set, heap[heap_max] and - * above are the tree nodes sorted by increasing frequency. - * OUT assertions: the field len is set to the optimal bit length, the - * array bl_count contains the frequencies for each bit length. - * The length opt_len is updated; static_len is also updated if stree is - * not null. - */ -function gen_bitlen(s, desc) -// deflate_state *s; -// tree_desc *desc; /* the tree descriptor */ -{ - var tree = desc.dyn_tree; - var max_code = desc.max_code; - var stree = desc.stat_desc.static_tree; - var has_stree = desc.stat_desc.has_stree; - var extra = desc.stat_desc.extra_bits; - var base = desc.stat_desc.extra_base; - var max_length = desc.stat_desc.max_length; - var h; /* heap index */ - var n, m; /* iterate over the tree elements */ - var bits; /* bit length */ - var xbits; /* extra bits */ - var f; /* frequency */ - var overflow = 0; /* number of elements with bit length too large */ - - for (bits = 0; bits <= MAX_BITS; bits++) { - s.bl_count[bits] = 0; - } - - /* In a first pass, compute the optimal bit lengths (which may - * overflow in the case of the bit length tree). - */ - tree[s.heap[s.heap_max] * 2 + 1]/*.Len*/ = 0; /* root of the heap */ - - for (h = s.heap_max + 1; h < HEAP_SIZE; h++) { - n = s.heap[h]; - bits = tree[tree[n * 2 + 1]/*.Dad*/ * 2 + 1]/*.Len*/ + 1; - if (bits > max_length) { - bits = max_length; - overflow++; - } - tree[n * 2 + 1]/*.Len*/ = bits; - /* We overwrite tree[n].Dad which is no longer needed */ - - if (n > max_code) { continue; } /* not a leaf node */ - - s.bl_count[bits]++; - xbits = 0; - if (n >= base) { - xbits = extra[n - base]; - } - f = tree[n * 2]/*.Freq*/; - s.opt_len += f * (bits + xbits); - if (has_stree) { - s.static_len += f * (stree[n * 2 + 1]/*.Len*/ + xbits); - } - } - if (overflow === 0) { return; } - - // Trace((stderr,"\nbit length overflow\n")); - /* This happens for example on obj2 and pic of the Calgary corpus */ - - /* Find the first bit length which could increase: */ - do { - bits = max_length - 1; - while (s.bl_count[bits] === 0) { bits--; } - s.bl_count[bits]--; /* move one leaf down the tree */ - s.bl_count[bits + 1] += 2; /* move one overflow item as its brother */ - s.bl_count[max_length]--; - /* The brother of the overflow item also moves one step up, - * but this does not affect bl_count[max_length] - */ - overflow -= 2; - } while (overflow > 0); - - /* Now recompute all bit lengths, scanning in increasing frequency. - * h is still equal to HEAP_SIZE. (It is simpler to reconstruct all - * lengths instead of fixing only the wrong ones. This idea is taken - * from 'ar' written by Haruhiko Okumura.) - */ - for (bits = max_length; bits !== 0; bits--) { - n = s.bl_count[bits]; - while (n !== 0) { - m = s.heap[--h]; - if (m > max_code) { continue; } - if (tree[m * 2 + 1]/*.Len*/ !== bits) { - // Trace((stderr,"code %d bits %d->%d\n", m, tree[m].Len, bits)); - s.opt_len += (bits - tree[m * 2 + 1]/*.Len*/) * tree[m * 2]/*.Freq*/; - tree[m * 2 + 1]/*.Len*/ = bits; - } - n--; - } - } -} - - -/* =========================================================================== - * Generate the codes for a given tree and bit counts (which need not be - * optimal). - * IN assertion: the array bl_count contains the bit length statistics for - * the given tree and the field len is set for all tree elements. - * OUT assertion: the field code is set for all tree elements of non - * zero code length. - */ -function gen_codes(tree, max_code, bl_count) -// ct_data *tree; /* the tree to decorate */ -// int max_code; /* largest code with non zero frequency */ -// ushf *bl_count; /* number of codes at each bit length */ -{ - var next_code = new Array(MAX_BITS + 1); /* next code value for each bit length */ - var code = 0; /* running code value */ - var bits; /* bit index */ - var n; /* code index */ - - /* The distribution counts are first used to generate the code values - * without bit reversal. - */ - for (bits = 1; bits <= MAX_BITS; bits++) { - next_code[bits] = code = (code + bl_count[bits - 1]) << 1; - } - /* Check that the bit counts in bl_count are consistent. The last code - * must be all ones. - */ - //Assert (code + bl_count[MAX_BITS]-1 == (1< length code (0..28) */ - length = 0; - for (code = 0; code < LENGTH_CODES - 1; code++) { - base_length[code] = length; - for (n = 0; n < (1 << extra_lbits[code]); n++) { - _length_code[length++] = code; - } - } - //Assert (length == 256, "tr_static_init: length != 256"); - /* Note that the length 255 (match length 258) can be represented - * in two different ways: code 284 + 5 bits or code 285, so we - * overwrite length_code[255] to use the best encoding: - */ - _length_code[length - 1] = code; - - /* Initialize the mapping dist (0..32K) -> dist code (0..29) */ - dist = 0; - for (code = 0; code < 16; code++) { - base_dist[code] = dist; - for (n = 0; n < (1 << extra_dbits[code]); n++) { - _dist_code[dist++] = code; - } - } - //Assert (dist == 256, "tr_static_init: dist != 256"); - dist >>= 7; /* from now on, all distances are divided by 128 */ - for (; code < D_CODES; code++) { - base_dist[code] = dist << 7; - for (n = 0; n < (1 << (extra_dbits[code] - 7)); n++) { - _dist_code[256 + dist++] = code; - } - } - //Assert (dist == 256, "tr_static_init: 256+dist != 512"); - - /* Construct the codes of the static literal tree */ - for (bits = 0; bits <= MAX_BITS; bits++) { - bl_count[bits] = 0; - } - - n = 0; - while (n <= 143) { - static_ltree[n * 2 + 1]/*.Len*/ = 8; - n++; - bl_count[8]++; - } - while (n <= 255) { - static_ltree[n * 2 + 1]/*.Len*/ = 9; - n++; - bl_count[9]++; - } - while (n <= 279) { - static_ltree[n * 2 + 1]/*.Len*/ = 7; - n++; - bl_count[7]++; - } - while (n <= 287) { - static_ltree[n * 2 + 1]/*.Len*/ = 8; - n++; - bl_count[8]++; - } - /* Codes 286 and 287 do not exist, but we must include them in the - * tree construction to get a canonical Huffman tree (longest code - * all ones) - */ - gen_codes(static_ltree, L_CODES + 1, bl_count); - - /* The static distance tree is trivial: */ - for (n = 0; n < D_CODES; n++) { - static_dtree[n * 2 + 1]/*.Len*/ = 5; - static_dtree[n * 2]/*.Code*/ = bi_reverse(n, 5); - } - - // Now data ready and we can init static trees - static_l_desc = new StaticTreeDesc(static_ltree, extra_lbits, LITERALS + 1, L_CODES, MAX_BITS); - static_d_desc = new StaticTreeDesc(static_dtree, extra_dbits, 0, D_CODES, MAX_BITS); - static_bl_desc = new StaticTreeDesc(new Array(0), extra_blbits, 0, BL_CODES, MAX_BL_BITS); - - //static_init_done = true; -} - - -/* =========================================================================== - * Initialize a new block. - */ -function init_block(s) { - var n; /* iterates over tree elements */ - - /* Initialize the trees. */ - for (n = 0; n < L_CODES; n++) { s.dyn_ltree[n * 2]/*.Freq*/ = 0; } - for (n = 0; n < D_CODES; n++) { s.dyn_dtree[n * 2]/*.Freq*/ = 0; } - for (n = 0; n < BL_CODES; n++) { s.bl_tree[n * 2]/*.Freq*/ = 0; } - - s.dyn_ltree[END_BLOCK * 2]/*.Freq*/ = 1; - s.opt_len = s.static_len = 0; - s.last_lit = s.matches = 0; -} - - -/* =========================================================================== - * Flush the bit buffer and align the output on a byte boundary - */ -function bi_windup(s) -{ - if (s.bi_valid > 8) { - put_short(s, s.bi_buf); - } else if (s.bi_valid > 0) { - //put_byte(s, (Byte)s->bi_buf); - s.pending_buf[s.pending++] = s.bi_buf; - } - s.bi_buf = 0; - s.bi_valid = 0; -} - -/* =========================================================================== - * Copy a stored block, storing first the length and its - * one's complement if requested. - */ -function copy_block(s, buf, len, header) -//DeflateState *s; -//charf *buf; /* the input data */ -//unsigned len; /* its length */ -//int header; /* true if block header must be written */ -{ - bi_windup(s); /* align on byte boundary */ - - if (header) { - put_short(s, len); - put_short(s, ~len); - } -// while (len--) { -// put_byte(s, *buf++); -// } - utils.arraySet(s.pending_buf, s.window, buf, len, s.pending); - s.pending += len; -} - -/* =========================================================================== - * Compares to subtrees, using the tree depth as tie breaker when - * the subtrees have equal frequency. This minimizes the worst case length. - */ -function smaller(tree, n, m, depth) { - var _n2 = n * 2; - var _m2 = m * 2; - return (tree[_n2]/*.Freq*/ < tree[_m2]/*.Freq*/ || - (tree[_n2]/*.Freq*/ === tree[_m2]/*.Freq*/ && depth[n] <= depth[m])); -} - -/* =========================================================================== - * Restore the heap property by moving down the tree starting at node k, - * exchanging a node with the smallest of its two sons if necessary, stopping - * when the heap property is re-established (each father smaller than its - * two sons). - */ -function pqdownheap(s, tree, k) -// deflate_state *s; -// ct_data *tree; /* the tree to restore */ -// int k; /* node to move down */ -{ - var v = s.heap[k]; - var j = k << 1; /* left son of k */ - while (j <= s.heap_len) { - /* Set j to the smallest of the two sons: */ - if (j < s.heap_len && - smaller(tree, s.heap[j + 1], s.heap[j], s.depth)) { - j++; - } - /* Exit if v is smaller than both sons */ - if (smaller(tree, v, s.heap[j], s.depth)) { break; } - - /* Exchange v with the smallest son */ - s.heap[k] = s.heap[j]; - k = j; - - /* And continue down the tree, setting j to the left son of k */ - j <<= 1; - } - s.heap[k] = v; -} - - -// inlined manually -// var SMALLEST = 1; - -/* =========================================================================== - * Send the block data compressed using the given Huffman trees - */ -function compress_block(s, ltree, dtree) -// deflate_state *s; -// const ct_data *ltree; /* literal tree */ -// const ct_data *dtree; /* distance tree */ -{ - var dist; /* distance of matched string */ - var lc; /* match length or unmatched char (if dist == 0) */ - var lx = 0; /* running index in l_buf */ - var code; /* the code to send */ - var extra; /* number of extra bits to send */ - - if (s.last_lit !== 0) { - do { - dist = (s.pending_buf[s.d_buf + lx * 2] << 8) | (s.pending_buf[s.d_buf + lx * 2 + 1]); - lc = s.pending_buf[s.l_buf + lx]; - lx++; - - if (dist === 0) { - send_code(s, lc, ltree); /* send a literal byte */ - //Tracecv(isgraph(lc), (stderr," '%c' ", lc)); - } else { - /* Here, lc is the match length - MIN_MATCH */ - code = _length_code[lc]; - send_code(s, code + LITERALS + 1, ltree); /* send the length code */ - extra = extra_lbits[code]; - if (extra !== 0) { - lc -= base_length[code]; - send_bits(s, lc, extra); /* send the extra length bits */ - } - dist--; /* dist is now the match distance - 1 */ - code = d_code(dist); - //Assert (code < D_CODES, "bad d_code"); - - send_code(s, code, dtree); /* send the distance code */ - extra = extra_dbits[code]; - if (extra !== 0) { - dist -= base_dist[code]; - send_bits(s, dist, extra); /* send the extra distance bits */ - } - } /* literal or match pair ? */ - - /* Check that the overlay between pending_buf and d_buf+l_buf is ok: */ - //Assert((uInt)(s->pending) < s->lit_bufsize + 2*lx, - // "pendingBuf overflow"); - - } while (lx < s.last_lit); - } - - send_code(s, END_BLOCK, ltree); -} - - -/* =========================================================================== - * Construct one Huffman tree and assigns the code bit strings and lengths. - * Update the total bit length for the current block. - * IN assertion: the field freq is set for all tree elements. - * OUT assertions: the fields len and code are set to the optimal bit length - * and corresponding code. The length opt_len is updated; static_len is - * also updated if stree is not null. The field max_code is set. - */ -function build_tree(s, desc) -// deflate_state *s; -// tree_desc *desc; /* the tree descriptor */ -{ - var tree = desc.dyn_tree; - var stree = desc.stat_desc.static_tree; - var has_stree = desc.stat_desc.has_stree; - var elems = desc.stat_desc.elems; - var n, m; /* iterate over heap elements */ - var max_code = -1; /* largest code with non zero frequency */ - var node; /* new node being created */ - - /* Construct the initial heap, with least frequent element in - * heap[SMALLEST]. The sons of heap[n] are heap[2*n] and heap[2*n+1]. - * heap[0] is not used. - */ - s.heap_len = 0; - s.heap_max = HEAP_SIZE; - - for (n = 0; n < elems; n++) { - if (tree[n * 2]/*.Freq*/ !== 0) { - s.heap[++s.heap_len] = max_code = n; - s.depth[n] = 0; - - } else { - tree[n * 2 + 1]/*.Len*/ = 0; - } - } - - /* The pkzip format requires that at least one distance code exists, - * and that at least one bit should be sent even if there is only one - * possible code. So to avoid special checks later on we force at least - * two codes of non zero frequency. - */ - while (s.heap_len < 2) { - node = s.heap[++s.heap_len] = (max_code < 2 ? ++max_code : 0); - tree[node * 2]/*.Freq*/ = 1; - s.depth[node] = 0; - s.opt_len--; - - if (has_stree) { - s.static_len -= stree[node * 2 + 1]/*.Len*/; - } - /* node is 0 or 1 so it does not have extra bits */ - } - desc.max_code = max_code; - - /* The elements heap[heap_len/2+1 .. heap_len] are leaves of the tree, - * establish sub-heaps of increasing lengths: - */ - for (n = (s.heap_len >> 1/*int /2*/); n >= 1; n--) { pqdownheap(s, tree, n); } - - /* Construct the Huffman tree by repeatedly combining the least two - * frequent nodes. - */ - node = elems; /* next internal node of the tree */ - do { - //pqremove(s, tree, n); /* n = node of least frequency */ - /*** pqremove ***/ - n = s.heap[1/*SMALLEST*/]; - s.heap[1/*SMALLEST*/] = s.heap[s.heap_len--]; - pqdownheap(s, tree, 1/*SMALLEST*/); - /***/ - - m = s.heap[1/*SMALLEST*/]; /* m = node of next least frequency */ - - s.heap[--s.heap_max] = n; /* keep the nodes sorted by frequency */ - s.heap[--s.heap_max] = m; - - /* Create a new node father of n and m */ - tree[node * 2]/*.Freq*/ = tree[n * 2]/*.Freq*/ + tree[m * 2]/*.Freq*/; - s.depth[node] = (s.depth[n] >= s.depth[m] ? s.depth[n] : s.depth[m]) + 1; - tree[n * 2 + 1]/*.Dad*/ = tree[m * 2 + 1]/*.Dad*/ = node; - - /* and insert the new node in the heap */ - s.heap[1/*SMALLEST*/] = node++; - pqdownheap(s, tree, 1/*SMALLEST*/); - - } while (s.heap_len >= 2); - - s.heap[--s.heap_max] = s.heap[1/*SMALLEST*/]; - - /* At this point, the fields freq and dad are set. We can now - * generate the bit lengths. - */ - gen_bitlen(s, desc); - - /* The field len is now set, we can generate the bit codes */ - gen_codes(tree, max_code, s.bl_count); -} - - -/* =========================================================================== - * Scan a literal or distance tree to determine the frequencies of the codes - * in the bit length tree. - */ -function scan_tree(s, tree, max_code) -// deflate_state *s; -// ct_data *tree; /* the tree to be scanned */ -// int max_code; /* and its largest code of non zero frequency */ -{ - var n; /* iterates over all tree elements */ - var prevlen = -1; /* last emitted length */ - var curlen; /* length of current code */ - - var nextlen = tree[0 * 2 + 1]/*.Len*/; /* length of next code */ - - var count = 0; /* repeat count of the current code */ - var max_count = 7; /* max repeat count */ - var min_count = 4; /* min repeat count */ - - if (nextlen === 0) { - max_count = 138; - min_count = 3; - } - tree[(max_code + 1) * 2 + 1]/*.Len*/ = 0xffff; /* guard */ - - for (n = 0; n <= max_code; n++) { - curlen = nextlen; - nextlen = tree[(n + 1) * 2 + 1]/*.Len*/; - - if (++count < max_count && curlen === nextlen) { - continue; - - } else if (count < min_count) { - s.bl_tree[curlen * 2]/*.Freq*/ += count; - - } else if (curlen !== 0) { - - if (curlen !== prevlen) { s.bl_tree[curlen * 2]/*.Freq*/++; } - s.bl_tree[REP_3_6 * 2]/*.Freq*/++; - - } else if (count <= 10) { - s.bl_tree[REPZ_3_10 * 2]/*.Freq*/++; - - } else { - s.bl_tree[REPZ_11_138 * 2]/*.Freq*/++; - } - - count = 0; - prevlen = curlen; - - if (nextlen === 0) { - max_count = 138; - min_count = 3; - - } else if (curlen === nextlen) { - max_count = 6; - min_count = 3; - - } else { - max_count = 7; - min_count = 4; - } - } -} - - -/* =========================================================================== - * Send a literal or distance tree in compressed form, using the codes in - * bl_tree. - */ -function send_tree(s, tree, max_code) -// deflate_state *s; -// ct_data *tree; /* the tree to be scanned */ -// int max_code; /* and its largest code of non zero frequency */ -{ - var n; /* iterates over all tree elements */ - var prevlen = -1; /* last emitted length */ - var curlen; /* length of current code */ - - var nextlen = tree[0 * 2 + 1]/*.Len*/; /* length of next code */ - - var count = 0; /* repeat count of the current code */ - var max_count = 7; /* max repeat count */ - var min_count = 4; /* min repeat count */ - - /* tree[max_code+1].Len = -1; */ /* guard already set */ - if (nextlen === 0) { - max_count = 138; - min_count = 3; - } - - for (n = 0; n <= max_code; n++) { - curlen = nextlen; - nextlen = tree[(n + 1) * 2 + 1]/*.Len*/; - - if (++count < max_count && curlen === nextlen) { - continue; - - } else if (count < min_count) { - do { send_code(s, curlen, s.bl_tree); } while (--count !== 0); - - } else if (curlen !== 0) { - if (curlen !== prevlen) { - send_code(s, curlen, s.bl_tree); - count--; - } - //Assert(count >= 3 && count <= 6, " 3_6?"); - send_code(s, REP_3_6, s.bl_tree); - send_bits(s, count - 3, 2); - - } else if (count <= 10) { - send_code(s, REPZ_3_10, s.bl_tree); - send_bits(s, count - 3, 3); - - } else { - send_code(s, REPZ_11_138, s.bl_tree); - send_bits(s, count - 11, 7); - } - - count = 0; - prevlen = curlen; - if (nextlen === 0) { - max_count = 138; - min_count = 3; - - } else if (curlen === nextlen) { - max_count = 6; - min_count = 3; - - } else { - max_count = 7; - min_count = 4; - } - } -} - - -/* =========================================================================== - * Construct the Huffman tree for the bit lengths and return the index in - * bl_order of the last bit length code to send. - */ -function build_bl_tree(s) { - var max_blindex; /* index of last bit length code of non zero freq */ - - /* Determine the bit length frequencies for literal and distance trees */ - scan_tree(s, s.dyn_ltree, s.l_desc.max_code); - scan_tree(s, s.dyn_dtree, s.d_desc.max_code); - - /* Build the bit length tree: */ - build_tree(s, s.bl_desc); - /* opt_len now includes the length of the tree representations, except - * the lengths of the bit lengths codes and the 5+5+4 bits for the counts. - */ - - /* Determine the number of bit length codes to send. The pkzip format - * requires that at least 4 bit length codes be sent. (appnote.txt says - * 3 but the actual value used is 4.) - */ - for (max_blindex = BL_CODES - 1; max_blindex >= 3; max_blindex--) { - if (s.bl_tree[bl_order[max_blindex] * 2 + 1]/*.Len*/ !== 0) { - break; - } - } - /* Update opt_len to include the bit length tree and counts */ - s.opt_len += 3 * (max_blindex + 1) + 5 + 5 + 4; - //Tracev((stderr, "\ndyn trees: dyn %ld, stat %ld", - // s->opt_len, s->static_len)); - - return max_blindex; -} - - -/* =========================================================================== - * Send the header for a block using dynamic Huffman trees: the counts, the - * lengths of the bit length codes, the literal tree and the distance tree. - * IN assertion: lcodes >= 257, dcodes >= 1, blcodes >= 4. - */ -function send_all_trees(s, lcodes, dcodes, blcodes) -// deflate_state *s; -// int lcodes, dcodes, blcodes; /* number of codes for each tree */ -{ - var rank; /* index in bl_order */ - - //Assert (lcodes >= 257 && dcodes >= 1 && blcodes >= 4, "not enough codes"); - //Assert (lcodes <= L_CODES && dcodes <= D_CODES && blcodes <= BL_CODES, - // "too many codes"); - //Tracev((stderr, "\nbl counts: ")); - send_bits(s, lcodes - 257, 5); /* not +255 as stated in appnote.txt */ - send_bits(s, dcodes - 1, 5); - send_bits(s, blcodes - 4, 4); /* not -3 as stated in appnote.txt */ - for (rank = 0; rank < blcodes; rank++) { - //Tracev((stderr, "\nbl code %2d ", bl_order[rank])); - send_bits(s, s.bl_tree[bl_order[rank] * 2 + 1]/*.Len*/, 3); - } - //Tracev((stderr, "\nbl tree: sent %ld", s->bits_sent)); - - send_tree(s, s.dyn_ltree, lcodes - 1); /* literal tree */ - //Tracev((stderr, "\nlit tree: sent %ld", s->bits_sent)); - - send_tree(s, s.dyn_dtree, dcodes - 1); /* distance tree */ - //Tracev((stderr, "\ndist tree: sent %ld", s->bits_sent)); -} - - -/* =========================================================================== - * Check if the data type is TEXT or BINARY, using the following algorithm: - * - TEXT if the two conditions below are satisfied: - * a) There are no non-portable control characters belonging to the - * "black list" (0..6, 14..25, 28..31). - * b) There is at least one printable character belonging to the - * "white list" (9 {TAB}, 10 {LF}, 13 {CR}, 32..255). - * - BINARY otherwise. - * - The following partially-portable control characters form a - * "gray list" that is ignored in this detection algorithm: - * (7 {BEL}, 8 {BS}, 11 {VT}, 12 {FF}, 26 {SUB}, 27 {ESC}). - * IN assertion: the fields Freq of dyn_ltree are set. - */ -function detect_data_type(s) { - /* black_mask is the bit mask of black-listed bytes - * set bits 0..6, 14..25, and 28..31 - * 0xf3ffc07f = binary 11110011111111111100000001111111 - */ - var black_mask = 0xf3ffc07f; - var n; - - /* Check for non-textual ("black-listed") bytes. */ - for (n = 0; n <= 31; n++, black_mask >>>= 1) { - if ((black_mask & 1) && (s.dyn_ltree[n * 2]/*.Freq*/ !== 0)) { - return Z_BINARY; - } - } - - /* Check for textual ("white-listed") bytes. */ - if (s.dyn_ltree[9 * 2]/*.Freq*/ !== 0 || s.dyn_ltree[10 * 2]/*.Freq*/ !== 0 || - s.dyn_ltree[13 * 2]/*.Freq*/ !== 0) { - return Z_TEXT; - } - for (n = 32; n < LITERALS; n++) { - if (s.dyn_ltree[n * 2]/*.Freq*/ !== 0) { - return Z_TEXT; - } - } - - /* There are no "black-listed" or "white-listed" bytes: - * this stream either is empty or has tolerated ("gray-listed") bytes only. - */ - return Z_BINARY; -} - - -var static_init_done = false; - -/* =========================================================================== - * Initialize the tree data structures for a new zlib stream. - */ -function _tr_init(s) -{ - - if (!static_init_done) { - tr_static_init(); - static_init_done = true; - } - - s.l_desc = new TreeDesc(s.dyn_ltree, static_l_desc); - s.d_desc = new TreeDesc(s.dyn_dtree, static_d_desc); - s.bl_desc = new TreeDesc(s.bl_tree, static_bl_desc); - - s.bi_buf = 0; - s.bi_valid = 0; - - /* Initialize the first block of the first file: */ - init_block(s); -} - - -/* =========================================================================== - * Send a stored block - */ -function _tr_stored_block(s, buf, stored_len, last) -//DeflateState *s; -//charf *buf; /* input block */ -//ulg stored_len; /* length of input block */ -//int last; /* one if this is the last block for a file */ -{ - send_bits(s, (STORED_BLOCK << 1) + (last ? 1 : 0), 3); /* send block type */ - copy_block(s, buf, stored_len, true); /* with header */ -} - - -/* =========================================================================== - * Send one empty static block to give enough lookahead for inflate. - * This takes 10 bits, of which 7 may remain in the bit buffer. - */ -function _tr_align(s) { - send_bits(s, STATIC_TREES << 1, 3); - send_code(s, END_BLOCK, static_ltree); - bi_flush(s); -} - - -/* =========================================================================== - * Determine the best encoding for the current block: dynamic trees, static - * trees or store, and output the encoded block to the zip file. - */ -function _tr_flush_block(s, buf, stored_len, last) -//DeflateState *s; -//charf *buf; /* input block, or NULL if too old */ -//ulg stored_len; /* length of input block */ -//int last; /* one if this is the last block for a file */ -{ - var opt_lenb, static_lenb; /* opt_len and static_len in bytes */ - var max_blindex = 0; /* index of last bit length code of non zero freq */ - - /* Build the Huffman trees unless a stored block is forced */ - if (s.level > 0) { - - /* Check if the file is binary or text */ - if (s.strm.data_type === Z_UNKNOWN) { - s.strm.data_type = detect_data_type(s); - } - - /* Construct the literal and distance trees */ - build_tree(s, s.l_desc); - // Tracev((stderr, "\nlit data: dyn %ld, stat %ld", s->opt_len, - // s->static_len)); - - build_tree(s, s.d_desc); - // Tracev((stderr, "\ndist data: dyn %ld, stat %ld", s->opt_len, - // s->static_len)); - /* At this point, opt_len and static_len are the total bit lengths of - * the compressed block data, excluding the tree representations. - */ - - /* Build the bit length tree for the above two trees, and get the index - * in bl_order of the last bit length code to send. - */ - max_blindex = build_bl_tree(s); - - /* Determine the best encoding. Compute the block lengths in bytes. */ - opt_lenb = (s.opt_len + 3 + 7) >>> 3; - static_lenb = (s.static_len + 3 + 7) >>> 3; - - // Tracev((stderr, "\nopt %lu(%lu) stat %lu(%lu) stored %lu lit %u ", - // opt_lenb, s->opt_len, static_lenb, s->static_len, stored_len, - // s->last_lit)); - - if (static_lenb <= opt_lenb) { opt_lenb = static_lenb; } - - } else { - // Assert(buf != (char*)0, "lost buf"); - opt_lenb = static_lenb = stored_len + 5; /* force a stored block */ - } - - if ((stored_len + 4 <= opt_lenb) && (buf !== -1)) { - /* 4: two words for the lengths */ - - /* The test buf != NULL is only necessary if LIT_BUFSIZE > WSIZE. - * Otherwise we can't have processed more than WSIZE input bytes since - * the last block flush, because compression would have been - * successful. If LIT_BUFSIZE <= WSIZE, it is never too late to - * transform a block into a stored block. - */ - _tr_stored_block(s, buf, stored_len, last); - - } else if (s.strategy === Z_FIXED || static_lenb === opt_lenb) { - - send_bits(s, (STATIC_TREES << 1) + (last ? 1 : 0), 3); - compress_block(s, static_ltree, static_dtree); - - } else { - send_bits(s, (DYN_TREES << 1) + (last ? 1 : 0), 3); - send_all_trees(s, s.l_desc.max_code + 1, s.d_desc.max_code + 1, max_blindex + 1); - compress_block(s, s.dyn_ltree, s.dyn_dtree); - } - // Assert (s->compressed_len == s->bits_sent, "bad compressed size"); - /* The above check is made mod 2^32, for files larger than 512 MB - * and uLong implemented on 32 bits. - */ - init_block(s); - - if (last) { - bi_windup(s); - } - // Tracev((stderr,"\ncomprlen %lu(%lu) ", s->compressed_len>>3, - // s->compressed_len-7*last)); -} - -/* =========================================================================== - * Save the match info and tally the frequency counts. Return true if - * the current block must be flushed. - */ -function _tr_tally(s, dist, lc) -// deflate_state *s; -// unsigned dist; /* distance of matched string */ -// unsigned lc; /* match length-MIN_MATCH or unmatched char (if dist==0) */ -{ - //var out_length, in_length, dcode; - - s.pending_buf[s.d_buf + s.last_lit * 2] = (dist >>> 8) & 0xff; - s.pending_buf[s.d_buf + s.last_lit * 2 + 1] = dist & 0xff; - - s.pending_buf[s.l_buf + s.last_lit] = lc & 0xff; - s.last_lit++; - - if (dist === 0) { - /* lc is the unmatched char */ - s.dyn_ltree[lc * 2]/*.Freq*/++; - } else { - s.matches++; - /* Here, lc is the match length - MIN_MATCH */ - dist--; /* dist = match distance - 1 */ - //Assert((ush)dist < (ush)MAX_DIST(s) && - // (ush)lc <= (ush)(MAX_MATCH-MIN_MATCH) && - // (ush)d_code(dist) < (ush)D_CODES, "_tr_tally: bad match"); - - s.dyn_ltree[(_length_code[lc] + LITERALS + 1) * 2]/*.Freq*/++; - s.dyn_dtree[d_code(dist) * 2]/*.Freq*/++; - } - -// (!) This block is disabled in zlib defailts, -// don't enable it for binary compatibility - -//#ifdef TRUNCATE_BLOCK -// /* Try to guess if it is profitable to stop the current block here */ -// if ((s.last_lit & 0x1fff) === 0 && s.level > 2) { -// /* Compute an upper bound for the compressed length */ -// out_length = s.last_lit*8; -// in_length = s.strstart - s.block_start; -// -// for (dcode = 0; dcode < D_CODES; dcode++) { -// out_length += s.dyn_dtree[dcode*2]/*.Freq*/ * (5 + extra_dbits[dcode]); -// } -// out_length >>>= 3; -// //Tracev((stderr,"\nlast_lit %u, in %ld, out ~%ld(%ld%%) ", -// // s->last_lit, in_length, out_length, -// // 100L - out_length*100L/in_length)); -// if (s.matches < (s.last_lit>>1)/*int /2*/ && out_length < (in_length>>1)/*int /2*/) { -// return true; -// } -// } -//#endif - - return (s.last_lit === s.lit_bufsize - 1); - /* We avoid equality with lit_bufsize because of wraparound at 64K - * on 16 bit machines and because stored blocks are restricted to - * 64K-1 bytes. - */ -} - -exports._tr_init = _tr_init; -exports._tr_stored_block = _tr_stored_block; -exports._tr_flush_block = _tr_flush_block; -exports._tr_tally = _tr_tally; -exports._tr_align = _tr_align; - -},{"../utils/common":1}],8:[function(require,module,exports){ -'use strict'; - - -function ZStream() { - /* next input byte */ - this.input = null; // JS specific, because we have no pointers - this.next_in = 0; - /* number of bytes available at input */ - this.avail_in = 0; - /* total number of input bytes read so far */ - this.total_in = 0; - /* next output byte should be put there */ - this.output = null; // JS specific, because we have no pointers - this.next_out = 0; - /* remaining free space at output */ - this.avail_out = 0; - /* total number of bytes output so far */ - this.total_out = 0; - /* last error message, NULL if no error */ - this.msg = ''/*Z_NULL*/; - /* not visible by applications */ - this.state = null; - /* best guess about the data type: binary or text */ - this.data_type = 2/*Z_UNKNOWN*/; - /* adler32 value of the uncompressed data */ - this.adler = 0; -} - -module.exports = ZStream; - -},{}],"/lib/deflate.js":[function(require,module,exports){ -'use strict'; - - -var zlib_deflate = require('./zlib/deflate'); -var utils = require('./utils/common'); -var strings = require('./utils/strings'); -var msg = require('./zlib/messages'); -var ZStream = require('./zlib/zstream'); - -var toString = Object.prototype.toString; - -/* Public constants ==========================================================*/ -/* ===========================================================================*/ - -var Z_NO_FLUSH = 0; -var Z_FINISH = 4; - -var Z_OK = 0; -var Z_STREAM_END = 1; -var Z_SYNC_FLUSH = 2; - -var Z_DEFAULT_COMPRESSION = -1; - -var Z_DEFAULT_STRATEGY = 0; - -var Z_DEFLATED = 8; - -/* ===========================================================================*/ - - -/** - * class Deflate - * - * Generic JS-style wrapper for zlib calls. If you don't need - * streaming behaviour - use more simple functions: [[deflate]], - * [[deflateRaw]] and [[gzip]]. - **/ - -/* internal - * Deflate.chunks -> Array - * - * Chunks of output data, if [[Deflate#onData]] not overriden. - **/ - -/** - * Deflate.result -> Uint8Array|Array - * - * Compressed result, generated by default [[Deflate#onData]] - * and [[Deflate#onEnd]] handlers. Filled after you push last chunk - * (call [[Deflate#push]] with `Z_FINISH` / `true` param) or if you - * push a chunk with explicit flush (call [[Deflate#push]] with - * `Z_SYNC_FLUSH` param). - **/ - -/** - * Deflate.err -> Number - * - * Error code after deflate finished. 0 (Z_OK) on success. - * You will not need it in real life, because deflate errors - * are possible only on wrong options or bad `onData` / `onEnd` - * custom handlers. - **/ - -/** - * Deflate.msg -> String - * - * Error message, if [[Deflate.err]] != 0 - **/ - - -/** - * new Deflate(options) - * - options (Object): zlib deflate options. - * - * Creates new deflator instance with specified params. Throws exception - * on bad params. Supported options: - * - * - `level` - * - `windowBits` - * - `memLevel` - * - `strategy` - * - `dictionary` - * - * [http://zlib.net/manual.html#Advanced](http://zlib.net/manual.html#Advanced) - * for more information on these. - * - * Additional options, for internal needs: - * - * - `chunkSize` - size of generated data chunks (16K by default) - * - `raw` (Boolean) - do raw deflate - * - `gzip` (Boolean) - create gzip wrapper - * - `to` (String) - if equal to 'string', then result will be "binary string" - * (each char code [0..255]) - * - `header` (Object) - custom header for gzip - * - `text` (Boolean) - true if compressed data believed to be text - * - `time` (Number) - modification time, unix timestamp - * - `os` (Number) - operation system code - * - `extra` (Array) - array of bytes with extra data (max 65536) - * - `name` (String) - file name (binary string) - * - `comment` (String) - comment (binary string) - * - `hcrc` (Boolean) - true if header crc should be added - * - * ##### Example: - * - * ```javascript - * var pako = require('pako') - * , chunk1 = Uint8Array([1,2,3,4,5,6,7,8,9]) - * , chunk2 = Uint8Array([10,11,12,13,14,15,16,17,18,19]); - * - * var deflate = new pako.Deflate({ level: 3}); - * - * deflate.push(chunk1, false); - * deflate.push(chunk2, true); // true -> last chunk - * - * if (deflate.err) { throw new Error(deflate.err); } - * - * console.log(deflate.result); - * ``` - **/ -function Deflate(options) { - if (!(this instanceof Deflate)) return new Deflate(options); - - this.options = utils.assign({ - level: Z_DEFAULT_COMPRESSION, - method: Z_DEFLATED, - chunkSize: 16384, - windowBits: 15, - memLevel: 8, - strategy: Z_DEFAULT_STRATEGY, - to: '' - }, options || {}); - - var opt = this.options; - - if (opt.raw && (opt.windowBits > 0)) { - opt.windowBits = -opt.windowBits; - } - - else if (opt.gzip && (opt.windowBits > 0) && (opt.windowBits < 16)) { - opt.windowBits += 16; - } - - this.err = 0; // error code, if happens (0 = Z_OK) - this.msg = ''; // error message - this.ended = false; // used to avoid multiple onEnd() calls - this.chunks = []; // chunks of compressed data - - this.strm = new ZStream(); - this.strm.avail_out = 0; - - var status = zlib_deflate.deflateInit2( - this.strm, - opt.level, - opt.method, - opt.windowBits, - opt.memLevel, - opt.strategy - ); - - if (status !== Z_OK) { - throw new Error(msg[status]); - } - - if (opt.header) { - zlib_deflate.deflateSetHeader(this.strm, opt.header); - } - - if (opt.dictionary) { - var dict; - // Convert data if needed - if (typeof opt.dictionary === 'string') { - // If we need to compress text, change encoding to utf8. - dict = strings.string2buf(opt.dictionary); - } else if (toString.call(opt.dictionary) === '[object ArrayBuffer]') { - dict = new Uint8Array(opt.dictionary); - } else { - dict = opt.dictionary; - } - - status = zlib_deflate.deflateSetDictionary(this.strm, dict); - - if (status !== Z_OK) { - throw new Error(msg[status]); - } - - this._dict_set = true; - } -} - -/** - * Deflate#push(data[, mode]) -> Boolean - * - data (Uint8Array|Array|ArrayBuffer|String): input data. Strings will be - * converted to utf8 byte sequence. - * - mode (Number|Boolean): 0..6 for corresponding Z_NO_FLUSH..Z_TREE modes. - * See constants. Skipped or `false` means Z_NO_FLUSH, `true` meansh Z_FINISH. - * - * Sends input data to deflate pipe, generating [[Deflate#onData]] calls with - * new compressed chunks. Returns `true` on success. The last data block must have - * mode Z_FINISH (or `true`). That will flush internal pending buffers and call - * [[Deflate#onEnd]]. For interim explicit flushes (without ending the stream) you - * can use mode Z_SYNC_FLUSH, keeping the compression context. - * - * On fail call [[Deflate#onEnd]] with error code and return false. - * - * We strongly recommend to use `Uint8Array` on input for best speed (output - * array format is detected automatically). Also, don't skip last param and always - * use the same type in your code (boolean or number). That will improve JS speed. - * - * For regular `Array`-s make sure all elements are [0..255]. - * - * ##### Example - * - * ```javascript - * push(chunk, false); // push one of data chunks - * ... - * push(chunk, true); // push last chunk - * ``` - **/ -Deflate.prototype.push = function (data, mode) { - var strm = this.strm; - var chunkSize = this.options.chunkSize; - var status, _mode; - - if (this.ended) { return false; } - - _mode = (mode === ~~mode) ? mode : ((mode === true) ? Z_FINISH : Z_NO_FLUSH); - - // Convert data if needed - if (typeof data === 'string') { - // If we need to compress text, change encoding to utf8. - strm.input = strings.string2buf(data); - } else if (toString.call(data) === '[object ArrayBuffer]') { - strm.input = new Uint8Array(data); - } else { - strm.input = data; - } - - strm.next_in = 0; - strm.avail_in = strm.input.length; - - do { - if (strm.avail_out === 0) { - strm.output = new utils.Buf8(chunkSize); - strm.next_out = 0; - strm.avail_out = chunkSize; - } - status = zlib_deflate.deflate(strm, _mode); /* no bad return value */ - - if (status !== Z_STREAM_END && status !== Z_OK) { - this.onEnd(status); - this.ended = true; - return false; - } - if (strm.avail_out === 0 || (strm.avail_in === 0 && (_mode === Z_FINISH || _mode === Z_SYNC_FLUSH))) { - if (this.options.to === 'string') { - this.onData(strings.buf2binstring(utils.shrinkBuf(strm.output, strm.next_out))); - } else { - this.onData(utils.shrinkBuf(strm.output, strm.next_out)); - } - } - } while ((strm.avail_in > 0 || strm.avail_out === 0) && status !== Z_STREAM_END); - - // Finalize on the last chunk. - if (_mode === Z_FINISH) { - status = zlib_deflate.deflateEnd(this.strm); - this.onEnd(status); - this.ended = true; - return status === Z_OK; - } - - // callback interim results if Z_SYNC_FLUSH. - if (_mode === Z_SYNC_FLUSH) { - this.onEnd(Z_OK); - strm.avail_out = 0; - return true; - } - - return true; -}; - - -/** - * Deflate#onData(chunk) -> Void - * - chunk (Uint8Array|Array|String): ouput data. Type of array depends - * on js engine support. When string output requested, each chunk - * will be string. - * - * By default, stores data blocks in `chunks[]` property and glue - * those in `onEnd`. Override this handler, if you need another behaviour. - **/ -Deflate.prototype.onData = function (chunk) { - this.chunks.push(chunk); -}; - - -/** - * Deflate#onEnd(status) -> Void - * - status (Number): deflate status. 0 (Z_OK) on success, - * other if not. - * - * Called once after you tell deflate that the input stream is - * complete (Z_FINISH) or should be flushed (Z_SYNC_FLUSH) - * or if an error happened. By default - join collected chunks, - * free memory and fill `results` / `err` properties. - **/ -Deflate.prototype.onEnd = function (status) { - // On success - join - if (status === Z_OK) { - if (this.options.to === 'string') { - this.result = this.chunks.join(''); - } else { - this.result = utils.flattenChunks(this.chunks); - } - } - this.chunks = []; - this.err = status; - this.msg = this.strm.msg; -}; - - -/** - * deflate(data[, options]) -> Uint8Array|Array|String - * - data (Uint8Array|Array|String): input data to compress. - * - options (Object): zlib deflate options. - * - * Compress `data` with deflate algorithm and `options`. - * - * Supported options are: - * - * - level - * - windowBits - * - memLevel - * - strategy - * - dictionary - * - * [http://zlib.net/manual.html#Advanced](http://zlib.net/manual.html#Advanced) - * for more information on these. - * - * Sugar (options): - * - * - `raw` (Boolean) - say that we work with raw stream, if you don't wish to specify - * negative windowBits implicitly. - * - `to` (String) - if equal to 'string', then result will be "binary string" - * (each char code [0..255]) - * - * ##### Example: - * - * ```javascript - * var pako = require('pako') - * , data = Uint8Array([1,2,3,4,5,6,7,8,9]); - * - * console.log(pako.deflate(data)); - * ``` - **/ -function deflate(input, options) { - var deflator = new Deflate(options); - - deflator.push(input, true); - - // That will never happens, if you don't cheat with options :) - if (deflator.err) { throw deflator.msg; } - - return deflator.result; -} - - -/** - * deflateRaw(data[, options]) -> Uint8Array|Array|String - * - data (Uint8Array|Array|String): input data to compress. - * - options (Object): zlib deflate options. - * - * The same as [[deflate]], but creates raw data, without wrapper - * (header and adler32 crc). - **/ -function deflateRaw(input, options) { - options = options || {}; - options.raw = true; - return deflate(input, options); -} - - -/** - * gzip(data[, options]) -> Uint8Array|Array|String - * - data (Uint8Array|Array|String): input data to compress. - * - options (Object): zlib deflate options. - * - * The same as [[deflate]], but create gzip wrapper instead of - * deflate one. - **/ -function gzip(input, options) { - options = options || {}; - options.gzip = true; - return deflate(input, options); -} - - -exports.Deflate = Deflate; -exports.deflate = deflate; -exports.deflateRaw = deflateRaw; -exports.gzip = gzip; - -},{"./utils/common":1,"./utils/strings":2,"./zlib/deflate":5,"./zlib/messages":6,"./zlib/zstream":8}]},{},[])("/lib/deflate.js") -}); \ No newline at end of file diff --git a/node_modules/browserify/node_modules/browserify-zlib/node_modules/pako/dist/pako_deflate.min.js b/node_modules/browserify/node_modules/browserify-zlib/node_modules/pako/dist/pako_deflate.min.js deleted file mode 100644 index b307f853..00000000 --- a/node_modules/browserify/node_modules/browserify-zlib/node_modules/pako/dist/pako_deflate.min.js +++ /dev/null @@ -1,2 +0,0 @@ -/* pako 0.2.9 nodeca/pako */ -!function(t){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var e;e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,e.pako=t()}}(function(){return function t(e,a,n){function r(s,h){if(!a[s]){if(!e[s]){var l="function"==typeof require&&require;if(!h&&l)return l(s,!0);if(i)return i(s,!0);var o=new Error("Cannot find module '"+s+"'");throw o.code="MODULE_NOT_FOUND",o}var _=a[s]={exports:{}};e[s][0].call(_.exports,function(t){var a=e[s][1][t];return r(a?a:t)},_,_.exports,t,e,a,n)}return a[s].exports}for(var i="function"==typeof require&&require,s=0;s=252?6:l>=248?5:l>=240?4:l>=224?3:l>=192?2:1;h[254]=h[254]=1,a.string2buf=function(t){var e,a,n,i,s,h=t.length,l=0;for(i=0;i>>6,e[s++]=128|63&a):a<65536?(e[s++]=224|a>>>12,e[s++]=128|a>>>6&63,e[s++]=128|63&a):(e[s++]=240|a>>>18,e[s++]=128|a>>>12&63,e[s++]=128|a>>>6&63,e[s++]=128|63&a);return e},a.buf2binstring=function(t){return n(t,t.length)},a.binstring2buf=function(t){for(var e=new r.Buf8(t.length),a=0,n=e.length;a4)o[r++]=65533,a+=s-1;else{for(i&=2===s?31:3===s?15:7;s>1&&a1?o[r++]=65533:i<65536?o[r++]=i:(i-=65536,o[r++]=55296|i>>10&1023,o[r++]=56320|1023&i)}return n(o,r)},a.utf8border=function(t,e){var a;for(e=e||t.length,e>t.length&&(e=t.length),a=e-1;a>=0&&128===(192&t[a]);)a--;return a<0?e:0===a?e:a+h[t[a]]>e?a:e}},{"./common":1}],3:[function(t,e,a){"use strict";function n(t,e,a,n){for(var r=65535&t|0,i=t>>>16&65535|0,s=0;0!==a;){s=a>2e3?2e3:a,a-=s;do r=r+e[n++]|0,i=i+r|0;while(--s);r%=65521,i%=65521}return r|i<<16|0}e.exports=n},{}],4:[function(t,e,a){"use strict";function n(){for(var t,e=[],a=0;a<256;a++){t=a;for(var n=0;n<8;n++)t=1&t?3988292384^t>>>1:t>>>1;e[a]=t}return e}function r(t,e,a,n){var r=i,s=n+a;t^=-1;for(var h=n;h>>8^r[255&(t^e[h])];return t^-1}var i=n();e.exports=r},{}],5:[function(t,e,a){"use strict";function n(t,e){return t.msg=O[e],e}function r(t){return(t<<1)-(t>4?9:0)}function i(t){for(var e=t.length;--e>=0;)t[e]=0}function s(t){var e=t.state,a=e.pending;a>t.avail_out&&(a=t.avail_out),0!==a&&(j.arraySet(t.output,e.pending_buf,e.pending_out,a,t.next_out),t.next_out+=a,e.pending_out+=a,t.total_out+=a,t.avail_out-=a,e.pending-=a,0===e.pending&&(e.pending_out=0))}function h(t,e){U._tr_flush_block(t,t.block_start>=0?t.block_start:-1,t.strstart-t.block_start,e),t.block_start=t.strstart,s(t.strm)}function l(t,e){t.pending_buf[t.pending++]=e}function o(t,e){t.pending_buf[t.pending++]=e>>>8&255,t.pending_buf[t.pending++]=255&e}function _(t,e,a,n){var r=t.avail_in;return r>n&&(r=n),0===r?0:(t.avail_in-=r,j.arraySet(e,t.input,t.next_in,r,a),1===t.state.wrap?t.adler=D(t.adler,e,r,a):2===t.state.wrap&&(t.adler=I(t.adler,e,r,a)),t.next_in+=r,t.total_in+=r,r)}function d(t,e){var a,n,r=t.max_chain_length,i=t.strstart,s=t.prev_length,h=t.nice_match,l=t.strstart>t.w_size-dt?t.strstart-(t.w_size-dt):0,o=t.window,_=t.w_mask,d=t.prev,u=t.strstart+_t,f=o[i+s-1],c=o[i+s];t.prev_length>=t.good_match&&(r>>=2),h>t.lookahead&&(h=t.lookahead);do if(a=e,o[a+s]===c&&o[a+s-1]===f&&o[a]===o[i]&&o[++a]===o[i+1]){i+=2,a++;do;while(o[++i]===o[++a]&&o[++i]===o[++a]&&o[++i]===o[++a]&&o[++i]===o[++a]&&o[++i]===o[++a]&&o[++i]===o[++a]&&o[++i]===o[++a]&&o[++i]===o[++a]&&is){if(t.match_start=e,s=n,n>=h)break;f=o[i+s-1],c=o[i+s]}}while((e=d[e&_])>l&&0!==--r);return s<=t.lookahead?s:t.lookahead}function u(t){var e,a,n,r,i,s=t.w_size;do{if(r=t.window_size-t.lookahead-t.strstart,t.strstart>=s+(s-dt)){j.arraySet(t.window,t.window,s,s,0),t.match_start-=s,t.strstart-=s,t.block_start-=s,a=t.hash_size,e=a;do n=t.head[--e],t.head[e]=n>=s?n-s:0;while(--a);a=s,e=a;do n=t.prev[--e],t.prev[e]=n>=s?n-s:0;while(--a);r+=s}if(0===t.strm.avail_in)break;if(a=_(t.strm,t.window,t.strstart+t.lookahead,r),t.lookahead+=a,t.lookahead+t.insert>=ot)for(i=t.strstart-t.insert,t.ins_h=t.window[i],t.ins_h=(t.ins_h<t.pending_buf_size-5&&(a=t.pending_buf_size-5);;){if(t.lookahead<=1){if(u(t),0===t.lookahead&&e===q)return vt;if(0===t.lookahead)break}t.strstart+=t.lookahead,t.lookahead=0;var n=t.block_start+a;if((0===t.strstart||t.strstart>=n)&&(t.lookahead=t.strstart-n,t.strstart=n,h(t,!1),0===t.strm.avail_out))return vt;if(t.strstart-t.block_start>=t.w_size-dt&&(h(t,!1),0===t.strm.avail_out))return vt}return t.insert=0,e===N?(h(t,!0),0===t.strm.avail_out?kt:zt):t.strstart>t.block_start&&(h(t,!1),0===t.strm.avail_out)?vt:vt}function c(t,e){for(var a,n;;){if(t.lookahead=ot&&(t.ins_h=(t.ins_h<=ot)if(n=U._tr_tally(t,t.strstart-t.match_start,t.match_length-ot),t.lookahead-=t.match_length,t.match_length<=t.max_lazy_match&&t.lookahead>=ot){t.match_length--;do t.strstart++,t.ins_h=(t.ins_h<=ot&&(t.ins_h=(t.ins_h<4096)&&(t.match_length=ot-1)),t.prev_length>=ot&&t.match_length<=t.prev_length){r=t.strstart+t.lookahead-ot,n=U._tr_tally(t,t.strstart-1-t.prev_match,t.prev_length-ot),t.lookahead-=t.prev_length-1,t.prev_length-=2;do++t.strstart<=r&&(t.ins_h=(t.ins_h<=ot&&t.strstart>0&&(r=t.strstart-1,n=s[r],n===s[++r]&&n===s[++r]&&n===s[++r])){i=t.strstart+_t;do;while(n===s[++r]&&n===s[++r]&&n===s[++r]&&n===s[++r]&&n===s[++r]&&n===s[++r]&&n===s[++r]&&n===s[++r]&&rt.lookahead&&(t.match_length=t.lookahead)}if(t.match_length>=ot?(a=U._tr_tally(t,1,t.match_length-ot),t.lookahead-=t.match_length,t.strstart+=t.match_length,t.match_length=0):(a=U._tr_tally(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++),a&&(h(t,!1),0===t.strm.avail_out))return vt}return t.insert=0,e===N?(h(t,!0),0===t.strm.avail_out?kt:zt):t.last_lit&&(h(t,!1),0===t.strm.avail_out)?vt:yt}function m(t,e){for(var a;;){if(0===t.lookahead&&(u(t),0===t.lookahead)){if(e===q)return vt;break}if(t.match_length=0,a=U._tr_tally(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++,a&&(h(t,!1),0===t.strm.avail_out))return vt}return t.insert=0,e===N?(h(t,!0),0===t.strm.avail_out?kt:zt):t.last_lit&&(h(t,!1),0===t.strm.avail_out)?vt:yt}function b(t,e,a,n,r){this.good_length=t,this.max_lazy=e,this.nice_length=a,this.max_chain=n,this.func=r}function w(t){t.window_size=2*t.w_size,i(t.head),t.max_lazy_match=E[t.level].max_lazy,t.good_match=E[t.level].good_length,t.nice_match=E[t.level].nice_length,t.max_chain_length=E[t.level].max_chain,t.strstart=0,t.block_start=0,t.lookahead=0,t.insert=0,t.match_length=t.prev_length=ot-1,t.match_available=0,t.ins_h=0}function v(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=Z,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new j.Buf16(2*ht),this.dyn_dtree=new j.Buf16(2*(2*it+1)),this.bl_tree=new j.Buf16(2*(2*st+1)),i(this.dyn_ltree),i(this.dyn_dtree),i(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new j.Buf16(lt+1),this.heap=new j.Buf16(2*rt+1),i(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new j.Buf16(2*rt+1),i(this.depth),this.l_buf=0,this.lit_bufsize=0,this.last_lit=0,this.d_buf=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}function y(t){var e;return t&&t.state?(t.total_in=t.total_out=0,t.data_type=Y,e=t.state,e.pending=0,e.pending_out=0,e.wrap<0&&(e.wrap=-e.wrap),e.status=e.wrap?ft:bt,t.adler=2===e.wrap?0:1,e.last_flush=q,U._tr_init(e),H):n(t,K)}function k(t){var e=y(t);return e===H&&w(t.state),e}function z(t,e){return t&&t.state?2!==t.state.wrap?K:(t.state.gzhead=e,H):K}function x(t,e,a,r,i,s){if(!t)return K;var h=1;if(e===G&&(e=6),r<0?(h=0,r=-r):r>15&&(h=2,r-=16),i<1||i>$||a!==Z||r<8||r>15||e<0||e>9||s<0||s>W)return n(t,K);8===r&&(r=9);var l=new v;return t.state=l,l.strm=t,l.wrap=h,l.gzhead=null,l.w_bits=r,l.w_size=1<R||e<0)return t?n(t,K):K;if(h=t.state,!t.output||!t.input&&0!==t.avail_in||h.status===wt&&e!==N)return n(t,0===t.avail_out?P:K);if(h.strm=t,a=h.last_flush,h.last_flush=e,h.status===ft)if(2===h.wrap)t.adler=0,l(h,31),l(h,139),l(h,8),h.gzhead?(l(h,(h.gzhead.text?1:0)+(h.gzhead.hcrc?2:0)+(h.gzhead.extra?4:0)+(h.gzhead.name?8:0)+(h.gzhead.comment?16:0)),l(h,255&h.gzhead.time),l(h,h.gzhead.time>>8&255),l(h,h.gzhead.time>>16&255),l(h,h.gzhead.time>>24&255),l(h,9===h.level?2:h.strategy>=Q||h.level<2?4:0),l(h,255&h.gzhead.os),h.gzhead.extra&&h.gzhead.extra.length&&(l(h,255&h.gzhead.extra.length),l(h,h.gzhead.extra.length>>8&255)),h.gzhead.hcrc&&(t.adler=I(t.adler,h.pending_buf,h.pending,0)),h.gzindex=0,h.status=ct):(l(h,0),l(h,0),l(h,0),l(h,0),l(h,0),l(h,9===h.level?2:h.strategy>=Q||h.level<2?4:0),l(h,xt),h.status=bt);else{var u=Z+(h.w_bits-8<<4)<<8,f=-1;f=h.strategy>=Q||h.level<2?0:h.level<6?1:6===h.level?2:3,u|=f<<6,0!==h.strstart&&(u|=ut),u+=31-u%31,h.status=bt,o(h,u),0!==h.strstart&&(o(h,t.adler>>>16),o(h,65535&t.adler)),t.adler=1}if(h.status===ct)if(h.gzhead.extra){for(_=h.pending;h.gzindex<(65535&h.gzhead.extra.length)&&(h.pending!==h.pending_buf_size||(h.gzhead.hcrc&&h.pending>_&&(t.adler=I(t.adler,h.pending_buf,h.pending-_,_)),s(t),_=h.pending,h.pending!==h.pending_buf_size));)l(h,255&h.gzhead.extra[h.gzindex]),h.gzindex++;h.gzhead.hcrc&&h.pending>_&&(t.adler=I(t.adler,h.pending_buf,h.pending-_,_)),h.gzindex===h.gzhead.extra.length&&(h.gzindex=0,h.status=pt)}else h.status=pt;if(h.status===pt)if(h.gzhead.name){_=h.pending;do{if(h.pending===h.pending_buf_size&&(h.gzhead.hcrc&&h.pending>_&&(t.adler=I(t.adler,h.pending_buf,h.pending-_,_)),s(t),_=h.pending,h.pending===h.pending_buf_size)){d=1;break}d=h.gzindex_&&(t.adler=I(t.adler,h.pending_buf,h.pending-_,_)),0===d&&(h.gzindex=0,h.status=gt)}else h.status=gt;if(h.status===gt)if(h.gzhead.comment){_=h.pending;do{if(h.pending===h.pending_buf_size&&(h.gzhead.hcrc&&h.pending>_&&(t.adler=I(t.adler,h.pending_buf,h.pending-_,_)),s(t),_=h.pending,h.pending===h.pending_buf_size)){d=1;break}d=h.gzindex_&&(t.adler=I(t.adler,h.pending_buf,h.pending-_,_)),0===d&&(h.status=mt)}else h.status=mt;if(h.status===mt&&(h.gzhead.hcrc?(h.pending+2>h.pending_buf_size&&s(t),h.pending+2<=h.pending_buf_size&&(l(h,255&t.adler),l(h,t.adler>>8&255),t.adler=0,h.status=bt)):h.status=bt),0!==h.pending){if(s(t),0===t.avail_out)return h.last_flush=-1,H}else if(0===t.avail_in&&r(e)<=r(a)&&e!==N)return n(t,P);if(h.status===wt&&0!==t.avail_in)return n(t,P);if(0!==t.avail_in||0!==h.lookahead||e!==q&&h.status!==wt){var c=h.strategy===Q?m(h,e):h.strategy===V?g(h,e):E[h.level].func(h,e);if(c!==kt&&c!==zt||(h.status=wt),c===vt||c===kt)return 0===t.avail_out&&(h.last_flush=-1),H;if(c===yt&&(e===T?U._tr_align(h):e!==R&&(U._tr_stored_block(h,0,0,!1),e===L&&(i(h.head),0===h.lookahead&&(h.strstart=0,h.block_start=0,h.insert=0))),s(t),0===t.avail_out))return h.last_flush=-1,H}return e!==N?H:h.wrap<=0?F:(2===h.wrap?(l(h,255&t.adler),l(h,t.adler>>8&255),l(h,t.adler>>16&255),l(h,t.adler>>24&255),l(h,255&t.total_in),l(h,t.total_in>>8&255),l(h,t.total_in>>16&255),l(h,t.total_in>>24&255)):(o(h,t.adler>>>16),o(h,65535&t.adler)),s(t),h.wrap>0&&(h.wrap=-h.wrap),0!==h.pending?H:F)}function C(t){var e;return t&&t.state?(e=t.state.status,e!==ft&&e!==ct&&e!==pt&&e!==gt&&e!==mt&&e!==bt&&e!==wt?n(t,K):(t.state=null,e===bt?n(t,M):H)):K}function S(t,e){var a,n,r,s,h,l,o,_,d=e.length;if(!t||!t.state)return K;if(a=t.state,s=a.wrap,2===s||1===s&&a.status!==ft||a.lookahead)return K;for(1===s&&(t.adler=D(t.adler,e,d,0)),a.wrap=0,d>=a.w_size&&(0===s&&(i(a.head),a.strstart=0,a.block_start=0,a.insert=0),_=new j.Buf8(a.w_size),j.arraySet(_,e,d-a.w_size,a.w_size,0),e=_,d=a.w_size),h=t.avail_in,l=t.next_in,o=t.input,t.avail_in=d,t.next_in=0,t.input=e,u(a);a.lookahead>=ot;){n=a.strstart,r=a.lookahead-(ot-1);do a.ins_h=(a.ins_h<=0;)t[e]=0}function r(t,e,a,n,r){this.static_tree=t,this.extra_bits=e,this.extra_base=a,this.elems=n,this.max_length=r,this.has_stree=t&&t.length}function i(t,e){this.dyn_tree=t,this.max_code=0,this.stat_desc=e}function s(t){return t<256?lt[t]:lt[256+(t>>>7)]}function h(t,e){t.pending_buf[t.pending++]=255&e,t.pending_buf[t.pending++]=e>>>8&255}function l(t,e,a){t.bi_valid>W-a?(t.bi_buf|=e<>W-t.bi_valid,t.bi_valid+=a-W):(t.bi_buf|=e<>>=1,a<<=1;while(--e>0);return a>>>1}function d(t){16===t.bi_valid?(h(t,t.bi_buf),t.bi_buf=0,t.bi_valid=0):t.bi_valid>=8&&(t.pending_buf[t.pending++]=255&t.bi_buf,t.bi_buf>>=8,t.bi_valid-=8)}function u(t,e){var a,n,r,i,s,h,l=e.dyn_tree,o=e.max_code,_=e.stat_desc.static_tree,d=e.stat_desc.has_stree,u=e.stat_desc.extra_bits,f=e.stat_desc.extra_base,c=e.stat_desc.max_length,p=0;for(i=0;i<=V;i++)t.bl_count[i]=0;for(l[2*t.heap[t.heap_max]+1]=0,a=t.heap_max+1;ac&&(i=c,p++),l[2*n+1]=i,n>o||(t.bl_count[i]++,s=0,n>=f&&(s=u[n-f]),h=l[2*n],t.opt_len+=h*(i+s),d&&(t.static_len+=h*(_[2*n+1]+s)));if(0!==p){do{for(i=c-1;0===t.bl_count[i];)i--;t.bl_count[i]--,t.bl_count[i+1]+=2,t.bl_count[c]--,p-=2}while(p>0);for(i=c;0!==i;i--)for(n=t.bl_count[i];0!==n;)r=t.heap[--a],r>o||(l[2*r+1]!==i&&(t.opt_len+=(i-l[2*r+1])*l[2*r],l[2*r+1]=i),n--)}}function f(t,e,a){var n,r,i=new Array(V+1),s=0;for(n=1;n<=V;n++)i[n]=s=s+a[n-1]<<1;for(r=0;r<=e;r++){var h=t[2*r+1];0!==h&&(t[2*r]=_(i[h]++,h))}}function c(){var t,e,a,n,i,s=new Array(V+1);for(a=0,n=0;n>=7;n8?h(t,t.bi_buf):t.bi_valid>0&&(t.pending_buf[t.pending++]=t.bi_buf),t.bi_buf=0,t.bi_valid=0}function m(t,e,a,n){g(t),n&&(h(t,a),h(t,~a)),D.arraySet(t.pending_buf,t.window,e,a,t.pending),t.pending+=a}function b(t,e,a,n){var r=2*e,i=2*a;return t[r]>1;a>=1;a--)w(t,i,a);r=l;do a=t.heap[1],t.heap[1]=t.heap[t.heap_len--],w(t,i,1),n=t.heap[1],t.heap[--t.heap_max]=a,t.heap[--t.heap_max]=n,i[2*r]=i[2*a]+i[2*n],t.depth[r]=(t.depth[a]>=t.depth[n]?t.depth[a]:t.depth[n])+1,i[2*a+1]=i[2*n+1]=r,t.heap[1]=r++,w(t,i,1);while(t.heap_len>=2);t.heap[--t.heap_max]=t.heap[1],u(t,e),f(i,o,t.bl_count)}function k(t,e,a){var n,r,i=-1,s=e[1],h=0,l=7,o=4;for(0===s&&(l=138,o=3),e[2*(a+1)+1]=65535,n=0;n<=a;n++)r=s,s=e[2*(n+1)+1],++h=3&&0===t.bl_tree[2*rt[e]+1];e--);return t.opt_len+=3*(e+1)+5+5+4,e}function B(t,e,a,n){var r;for(l(t,e-257,5),l(t,a-1,5),l(t,n-4,4),r=0;r>>=1)if(1&a&&0!==t.dyn_ltree[2*e])return O;if(0!==t.dyn_ltree[18]||0!==t.dyn_ltree[20]||0!==t.dyn_ltree[26])return q;for(e=32;e0?(t.strm.data_type===T&&(t.strm.data_type=A(t)),y(t,t.l_desc),y(t,t.d_desc),s=x(t),r=t.opt_len+3+7>>>3,i=t.static_len+3+7>>>3,i<=r&&(r=i)):r=i=a+5,a+4<=r&&e!==-1?S(t,e,a,n):t.strategy===I||i===r?(l(t,(N<<1)+(n?1:0),3),v(t,st,ht)):(l(t,(R<<1)+(n?1:0),3),B(t,t.l_desc.max_code+1,t.d_desc.max_code+1,s+1),v(t,t.dyn_ltree,t.dyn_dtree)),p(t),n&&g(t)}function U(t,e,a){return t.pending_buf[t.d_buf+2*t.last_lit]=e>>>8&255,t.pending_buf[t.d_buf+2*t.last_lit+1]=255&e,t.pending_buf[t.l_buf+t.last_lit]=255&a,t.last_lit++,0===e?t.dyn_ltree[2*a]++:(t.matches++,e--,t.dyn_ltree[2*(ot[a]+M+1)]++,t.dyn_dtree[2*s(e)]++),t.last_lit===t.lit_bufsize-1}var D=t("../utils/common"),I=4,O=0,q=1,T=2,L=0,N=1,R=2,H=3,F=258,K=29,M=256,P=M+1+K,G=30,J=19,Q=2*P+1,V=15,W=16,X=7,Y=256,Z=16,$=17,tt=18,et=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],at=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],nt=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],rt=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],it=512,st=new Array(2*(P+2));n(st);var ht=new Array(2*G);n(ht);var lt=new Array(it);n(lt);var ot=new Array(F-H+1);n(ot);var _t=new Array(K);n(_t);var dt=new Array(G);n(dt);var ut,ft,ct,pt=!1;a._tr_init=C,a._tr_stored_block=S,a._tr_flush_block=j,a._tr_tally=U,a._tr_align=E},{"../utils/common":1}],8:[function(t,e,a){"use strict";function n(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}e.exports=n},{}],"/lib/deflate.js":[function(t,e,a){"use strict";function n(t){if(!(this instanceof n))return new n(t);this.options=l.assign({level:b,method:v,chunkSize:16384,windowBits:15,memLevel:8,strategy:w,to:""},t||{});var e=this.options;e.raw&&e.windowBits>0?e.windowBits=-e.windowBits:e.gzip&&e.windowBits>0&&e.windowBits<16&&(e.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new d,this.strm.avail_out=0;var a=h.deflateInit2(this.strm,e.level,e.method,e.windowBits,e.memLevel,e.strategy);if(a!==p)throw new Error(_[a]);if(e.header&&h.deflateSetHeader(this.strm,e.header),e.dictionary){var r;if(r="string"==typeof e.dictionary?o.string2buf(e.dictionary):"[object ArrayBuffer]"===u.call(e.dictionary)?new Uint8Array(e.dictionary):e.dictionary,a=h.deflateSetDictionary(this.strm,r),a!==p)throw new Error(_[a]);this._dict_set=!0}}function r(t,e){var a=new n(e);if(a.push(t,!0),a.err)throw a.msg;return a.result}function i(t,e){return e=e||{},e.raw=!0,r(t,e)}function s(t,e){return e=e||{},e.gzip=!0,r(t,e)}var h=t("./zlib/deflate"),l=t("./utils/common"),o=t("./utils/strings"),_=t("./zlib/messages"),d=t("./zlib/zstream"),u=Object.prototype.toString,f=0,c=4,p=0,g=1,m=2,b=-1,w=0,v=8;n.prototype.push=function(t,e){var a,n,r=this.strm,i=this.options.chunkSize;if(this.ended)return!1;n=e===~~e?e:e===!0?c:f,"string"==typeof t?r.input=o.string2buf(t):"[object ArrayBuffer]"===u.call(t)?r.input=new Uint8Array(t):r.input=t,r.next_in=0,r.avail_in=r.input.length;do{if(0===r.avail_out&&(r.output=new l.Buf8(i),r.next_out=0,r.avail_out=i),a=h.deflate(r,n),a!==g&&a!==p)return this.onEnd(a),this.ended=!0,!1;0!==r.avail_out&&(0!==r.avail_in||n!==c&&n!==m)||("string"===this.options.to?this.onData(o.buf2binstring(l.shrinkBuf(r.output,r.next_out))):this.onData(l.shrinkBuf(r.output,r.next_out)))}while((r.avail_in>0||0===r.avail_out)&&a!==g);return n===c?(a=h.deflateEnd(this.strm),this.onEnd(a),this.ended=!0,a===p):n!==m||(this.onEnd(p),r.avail_out=0,!0)},n.prototype.onData=function(t){this.chunks.push(t)},n.prototype.onEnd=function(t){t===p&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=l.flattenChunks(this.chunks)),this.chunks=[],this.err=t,this.msg=this.strm.msg},a.Deflate=n,a.deflate=r,a.deflateRaw=i,a.gzip=s},{"./utils/common":1,"./utils/strings":2,"./zlib/deflate":5,"./zlib/messages":6,"./zlib/zstream":8}]},{},[])("/lib/deflate.js")}); diff --git a/node_modules/browserify/node_modules/browserify-zlib/node_modules/pako/dist/pako_inflate.js b/node_modules/browserify/node_modules/browserify-zlib/node_modules/pako/dist/pako_inflate.js deleted file mode 100644 index c3e2e0e7..00000000 --- a/node_modules/browserify/node_modules/browserify-zlib/node_modules/pako/dist/pako_inflate.js +++ /dev/null @@ -1,3127 +0,0 @@ -/* pako 0.2.9 nodeca/pako */(function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.pako = f()}})(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o= 252 ? 6 : q >= 248 ? 5 : q >= 240 ? 4 : q >= 224 ? 3 : q >= 192 ? 2 : 1); -} -_utf8len[254] = _utf8len[254] = 1; // Invalid sequence start - - -// convert string to array (typed, when possible) -exports.string2buf = function (str) { - var buf, c, c2, m_pos, i, str_len = str.length, buf_len = 0; - - // count binary size - for (m_pos = 0; m_pos < str_len; m_pos++) { - c = str.charCodeAt(m_pos); - if ((c & 0xfc00) === 0xd800 && (m_pos + 1 < str_len)) { - c2 = str.charCodeAt(m_pos + 1); - if ((c2 & 0xfc00) === 0xdc00) { - c = 0x10000 + ((c - 0xd800) << 10) + (c2 - 0xdc00); - m_pos++; - } - } - buf_len += c < 0x80 ? 1 : c < 0x800 ? 2 : c < 0x10000 ? 3 : 4; - } - - // allocate buffer - buf = new utils.Buf8(buf_len); - - // convert - for (i = 0, m_pos = 0; i < buf_len; m_pos++) { - c = str.charCodeAt(m_pos); - if ((c & 0xfc00) === 0xd800 && (m_pos + 1 < str_len)) { - c2 = str.charCodeAt(m_pos + 1); - if ((c2 & 0xfc00) === 0xdc00) { - c = 0x10000 + ((c - 0xd800) << 10) + (c2 - 0xdc00); - m_pos++; - } - } - if (c < 0x80) { - /* one byte */ - buf[i++] = c; - } else if (c < 0x800) { - /* two bytes */ - buf[i++] = 0xC0 | (c >>> 6); - buf[i++] = 0x80 | (c & 0x3f); - } else if (c < 0x10000) { - /* three bytes */ - buf[i++] = 0xE0 | (c >>> 12); - buf[i++] = 0x80 | (c >>> 6 & 0x3f); - buf[i++] = 0x80 | (c & 0x3f); - } else { - /* four bytes */ - buf[i++] = 0xf0 | (c >>> 18); - buf[i++] = 0x80 | (c >>> 12 & 0x3f); - buf[i++] = 0x80 | (c >>> 6 & 0x3f); - buf[i++] = 0x80 | (c & 0x3f); - } - } - - return buf; -}; - -// Helper (used in 2 places) -function buf2binstring(buf, len) { - // use fallback for big arrays to avoid stack overflow - if (len < 65537) { - if ((buf.subarray && STR_APPLY_UIA_OK) || (!buf.subarray && STR_APPLY_OK)) { - return String.fromCharCode.apply(null, utils.shrinkBuf(buf, len)); - } - } - - var result = ''; - for (var i = 0; i < len; i++) { - result += String.fromCharCode(buf[i]); - } - return result; -} - - -// Convert byte array to binary string -exports.buf2binstring = function (buf) { - return buf2binstring(buf, buf.length); -}; - - -// Convert binary string (typed, when possible) -exports.binstring2buf = function (str) { - var buf = new utils.Buf8(str.length); - for (var i = 0, len = buf.length; i < len; i++) { - buf[i] = str.charCodeAt(i); - } - return buf; -}; - - -// convert array to string -exports.buf2string = function (buf, max) { - var i, out, c, c_len; - var len = max || buf.length; - - // Reserve max possible length (2 words per char) - // NB: by unknown reasons, Array is significantly faster for - // String.fromCharCode.apply than Uint16Array. - var utf16buf = new Array(len * 2); - - for (out = 0, i = 0; i < len;) { - c = buf[i++]; - // quick process ascii - if (c < 0x80) { utf16buf[out++] = c; continue; } - - c_len = _utf8len[c]; - // skip 5 & 6 byte codes - if (c_len > 4) { utf16buf[out++] = 0xfffd; i += c_len - 1; continue; } - - // apply mask on first byte - c &= c_len === 2 ? 0x1f : c_len === 3 ? 0x0f : 0x07; - // join the rest - while (c_len > 1 && i < len) { - c = (c << 6) | (buf[i++] & 0x3f); - c_len--; - } - - // terminated by end of string? - if (c_len > 1) { utf16buf[out++] = 0xfffd; continue; } - - if (c < 0x10000) { - utf16buf[out++] = c; - } else { - c -= 0x10000; - utf16buf[out++] = 0xd800 | ((c >> 10) & 0x3ff); - utf16buf[out++] = 0xdc00 | (c & 0x3ff); - } - } - - return buf2binstring(utf16buf, out); -}; - - -// Calculate max possible position in utf8 buffer, -// that will not break sequence. If that's not possible -// - (very small limits) return max size as is. -// -// buf[] - utf8 bytes array -// max - length limit (mandatory); -exports.utf8border = function (buf, max) { - var pos; - - max = max || buf.length; - if (max > buf.length) { max = buf.length; } - - // go back from last position, until start of sequence found - pos = max - 1; - while (pos >= 0 && (buf[pos] & 0xC0) === 0x80) { pos--; } - - // Fuckup - very small and broken sequence, - // return max, because we should return something anyway. - if (pos < 0) { return max; } - - // If we came to start of buffer - that means vuffer is too small, - // return max too. - if (pos === 0) { return max; } - - return (pos + _utf8len[buf[pos]] > max) ? pos : max; -}; - -},{"./common":1}],3:[function(require,module,exports){ -'use strict'; - -// Note: adler32 takes 12% for level 0 and 2% for level 6. -// It doesn't worth to make additional optimizationa as in original. -// Small size is preferable. - -function adler32(adler, buf, len, pos) { - var s1 = (adler & 0xffff) |0, - s2 = ((adler >>> 16) & 0xffff) |0, - n = 0; - - while (len !== 0) { - // Set limit ~ twice less than 5552, to keep - // s2 in 31-bits, because we force signed ints. - // in other case %= will fail. - n = len > 2000 ? 2000 : len; - len -= n; - - do { - s1 = (s1 + buf[pos++]) |0; - s2 = (s2 + s1) |0; - } while (--n); - - s1 %= 65521; - s2 %= 65521; - } - - return (s1 | (s2 << 16)) |0; -} - - -module.exports = adler32; - -},{}],4:[function(require,module,exports){ -'use strict'; - - -module.exports = { - - /* Allowed flush values; see deflate() and inflate() below for details */ - Z_NO_FLUSH: 0, - Z_PARTIAL_FLUSH: 1, - Z_SYNC_FLUSH: 2, - Z_FULL_FLUSH: 3, - Z_FINISH: 4, - Z_BLOCK: 5, - Z_TREES: 6, - - /* Return codes for the compression/decompression functions. Negative values - * are errors, positive values are used for special but normal events. - */ - Z_OK: 0, - Z_STREAM_END: 1, - Z_NEED_DICT: 2, - Z_ERRNO: -1, - Z_STREAM_ERROR: -2, - Z_DATA_ERROR: -3, - //Z_MEM_ERROR: -4, - Z_BUF_ERROR: -5, - //Z_VERSION_ERROR: -6, - - /* compression levels */ - Z_NO_COMPRESSION: 0, - Z_BEST_SPEED: 1, - Z_BEST_COMPRESSION: 9, - Z_DEFAULT_COMPRESSION: -1, - - - Z_FILTERED: 1, - Z_HUFFMAN_ONLY: 2, - Z_RLE: 3, - Z_FIXED: 4, - Z_DEFAULT_STRATEGY: 0, - - /* Possible values of the data_type field (though see inflate()) */ - Z_BINARY: 0, - Z_TEXT: 1, - //Z_ASCII: 1, // = Z_TEXT (deprecated) - Z_UNKNOWN: 2, - - /* The deflate compression method */ - Z_DEFLATED: 8 - //Z_NULL: null // Use -1 or null inline, depending on var type -}; - -},{}],5:[function(require,module,exports){ -'use strict'; - -// Note: we can't get significant speed boost here. -// So write code to minimize size - no pregenerated tables -// and array tools dependencies. - - -// Use ordinary array, since untyped makes no boost here -function makeTable() { - var c, table = []; - - for (var n = 0; n < 256; n++) { - c = n; - for (var k = 0; k < 8; k++) { - c = ((c & 1) ? (0xEDB88320 ^ (c >>> 1)) : (c >>> 1)); - } - table[n] = c; - } - - return table; -} - -// Create table on load. Just 255 signed longs. Not a problem. -var crcTable = makeTable(); - - -function crc32(crc, buf, len, pos) { - var t = crcTable, - end = pos + len; - - crc ^= -1; - - for (var i = pos; i < end; i++) { - crc = (crc >>> 8) ^ t[(crc ^ buf[i]) & 0xFF]; - } - - return (crc ^ (-1)); // >>> 0; -} - - -module.exports = crc32; - -},{}],6:[function(require,module,exports){ -'use strict'; - - -function GZheader() { - /* true if compressed data believed to be text */ - this.text = 0; - /* modification time */ - this.time = 0; - /* extra flags (not used when writing a gzip file) */ - this.xflags = 0; - /* operating system */ - this.os = 0; - /* pointer to extra field or Z_NULL if none */ - this.extra = null; - /* extra field length (valid if extra != Z_NULL) */ - this.extra_len = 0; // Actually, we don't need it in JS, - // but leave for few code modifications - - // - // Setup limits is not necessary because in js we should not preallocate memory - // for inflate use constant limit in 65536 bytes - // - - /* space at extra (only when reading header) */ - // this.extra_max = 0; - /* pointer to zero-terminated file name or Z_NULL */ - this.name = ''; - /* space at name (only when reading header) */ - // this.name_max = 0; - /* pointer to zero-terminated comment or Z_NULL */ - this.comment = ''; - /* space at comment (only when reading header) */ - // this.comm_max = 0; - /* true if there was or will be a header crc */ - this.hcrc = 0; - /* true when done reading gzip header (not used when writing a gzip file) */ - this.done = false; -} - -module.exports = GZheader; - -},{}],7:[function(require,module,exports){ -'use strict'; - -// See state defs from inflate.js -var BAD = 30; /* got a data error -- remain here until reset */ -var TYPE = 12; /* i: waiting for type bits, including last-flag bit */ - -/* - Decode literal, length, and distance codes and write out the resulting - literal and match bytes until either not enough input or output is - available, an end-of-block is encountered, or a data error is encountered. - When large enough input and output buffers are supplied to inflate(), for - example, a 16K input buffer and a 64K output buffer, more than 95% of the - inflate execution time is spent in this routine. - - Entry assumptions: - - state.mode === LEN - strm.avail_in >= 6 - strm.avail_out >= 258 - start >= strm.avail_out - state.bits < 8 - - On return, state.mode is one of: - - LEN -- ran out of enough output space or enough available input - TYPE -- reached end of block code, inflate() to interpret next block - BAD -- error in block data - - Notes: - - - The maximum input bits used by a length/distance pair is 15 bits for the - length code, 5 bits for the length extra, 15 bits for the distance code, - and 13 bits for the distance extra. This totals 48 bits, or six bytes. - Therefore if strm.avail_in >= 6, then there is enough input to avoid - checking for available input while decoding. - - - The maximum bytes that a single length/distance pair can output is 258 - bytes, which is the maximum length that can be coded. inflate_fast() - requires strm.avail_out >= 258 for each loop to avoid checking for - output space. - */ -module.exports = function inflate_fast(strm, start) { - var state; - var _in; /* local strm.input */ - var last; /* have enough input while in < last */ - var _out; /* local strm.output */ - var beg; /* inflate()'s initial strm.output */ - var end; /* while out < end, enough space available */ -//#ifdef INFLATE_STRICT - var dmax; /* maximum distance from zlib header */ -//#endif - var wsize; /* window size or zero if not using window */ - var whave; /* valid bytes in the window */ - var wnext; /* window write index */ - // Use `s_window` instead `window`, avoid conflict with instrumentation tools - var s_window; /* allocated sliding window, if wsize != 0 */ - var hold; /* local strm.hold */ - var bits; /* local strm.bits */ - var lcode; /* local strm.lencode */ - var dcode; /* local strm.distcode */ - var lmask; /* mask for first level of length codes */ - var dmask; /* mask for first level of distance codes */ - var here; /* retrieved table entry */ - var op; /* code bits, operation, extra bits, or */ - /* window position, window bytes to copy */ - var len; /* match length, unused bytes */ - var dist; /* match distance */ - var from; /* where to copy match from */ - var from_source; - - - var input, output; // JS specific, because we have no pointers - - /* copy state to local variables */ - state = strm.state; - //here = state.here; - _in = strm.next_in; - input = strm.input; - last = _in + (strm.avail_in - 5); - _out = strm.next_out; - output = strm.output; - beg = _out - (start - strm.avail_out); - end = _out + (strm.avail_out - 257); -//#ifdef INFLATE_STRICT - dmax = state.dmax; -//#endif - wsize = state.wsize; - whave = state.whave; - wnext = state.wnext; - s_window = state.window; - hold = state.hold; - bits = state.bits; - lcode = state.lencode; - dcode = state.distcode; - lmask = (1 << state.lenbits) - 1; - dmask = (1 << state.distbits) - 1; - - - /* decode literals and length/distances until end-of-block or not enough - input data or output space */ - - top: - do { - if (bits < 15) { - hold += input[_in++] << bits; - bits += 8; - hold += input[_in++] << bits; - bits += 8; - } - - here = lcode[hold & lmask]; - - dolen: - for (;;) { // Goto emulation - op = here >>> 24/*here.bits*/; - hold >>>= op; - bits -= op; - op = (here >>> 16) & 0xff/*here.op*/; - if (op === 0) { /* literal */ - //Tracevv((stderr, here.val >= 0x20 && here.val < 0x7f ? - // "inflate: literal '%c'\n" : - // "inflate: literal 0x%02x\n", here.val)); - output[_out++] = here & 0xffff/*here.val*/; - } - else if (op & 16) { /* length base */ - len = here & 0xffff/*here.val*/; - op &= 15; /* number of extra bits */ - if (op) { - if (bits < op) { - hold += input[_in++] << bits; - bits += 8; - } - len += hold & ((1 << op) - 1); - hold >>>= op; - bits -= op; - } - //Tracevv((stderr, "inflate: length %u\n", len)); - if (bits < 15) { - hold += input[_in++] << bits; - bits += 8; - hold += input[_in++] << bits; - bits += 8; - } - here = dcode[hold & dmask]; - - dodist: - for (;;) { // goto emulation - op = here >>> 24/*here.bits*/; - hold >>>= op; - bits -= op; - op = (here >>> 16) & 0xff/*here.op*/; - - if (op & 16) { /* distance base */ - dist = here & 0xffff/*here.val*/; - op &= 15; /* number of extra bits */ - if (bits < op) { - hold += input[_in++] << bits; - bits += 8; - if (bits < op) { - hold += input[_in++] << bits; - bits += 8; - } - } - dist += hold & ((1 << op) - 1); -//#ifdef INFLATE_STRICT - if (dist > dmax) { - strm.msg = 'invalid distance too far back'; - state.mode = BAD; - break top; - } -//#endif - hold >>>= op; - bits -= op; - //Tracevv((stderr, "inflate: distance %u\n", dist)); - op = _out - beg; /* max distance in output */ - if (dist > op) { /* see if copy from window */ - op = dist - op; /* distance back in window */ - if (op > whave) { - if (state.sane) { - strm.msg = 'invalid distance too far back'; - state.mode = BAD; - break top; - } - -// (!) This block is disabled in zlib defailts, -// don't enable it for binary compatibility -//#ifdef INFLATE_ALLOW_INVALID_DISTANCE_TOOFAR_ARRR -// if (len <= op - whave) { -// do { -// output[_out++] = 0; -// } while (--len); -// continue top; -// } -// len -= op - whave; -// do { -// output[_out++] = 0; -// } while (--op > whave); -// if (op === 0) { -// from = _out - dist; -// do { -// output[_out++] = output[from++]; -// } while (--len); -// continue top; -// } -//#endif - } - from = 0; // window index - from_source = s_window; - if (wnext === 0) { /* very common case */ - from += wsize - op; - if (op < len) { /* some from window */ - len -= op; - do { - output[_out++] = s_window[from++]; - } while (--op); - from = _out - dist; /* rest from output */ - from_source = output; - } - } - else if (wnext < op) { /* wrap around window */ - from += wsize + wnext - op; - op -= wnext; - if (op < len) { /* some from end of window */ - len -= op; - do { - output[_out++] = s_window[from++]; - } while (--op); - from = 0; - if (wnext < len) { /* some from start of window */ - op = wnext; - len -= op; - do { - output[_out++] = s_window[from++]; - } while (--op); - from = _out - dist; /* rest from output */ - from_source = output; - } - } - } - else { /* contiguous in window */ - from += wnext - op; - if (op < len) { /* some from window */ - len -= op; - do { - output[_out++] = s_window[from++]; - } while (--op); - from = _out - dist; /* rest from output */ - from_source = output; - } - } - while (len > 2) { - output[_out++] = from_source[from++]; - output[_out++] = from_source[from++]; - output[_out++] = from_source[from++]; - len -= 3; - } - if (len) { - output[_out++] = from_source[from++]; - if (len > 1) { - output[_out++] = from_source[from++]; - } - } - } - else { - from = _out - dist; /* copy direct from output */ - do { /* minimum length is three */ - output[_out++] = output[from++]; - output[_out++] = output[from++]; - output[_out++] = output[from++]; - len -= 3; - } while (len > 2); - if (len) { - output[_out++] = output[from++]; - if (len > 1) { - output[_out++] = output[from++]; - } - } - } - } - else if ((op & 64) === 0) { /* 2nd level distance code */ - here = dcode[(here & 0xffff)/*here.val*/ + (hold & ((1 << op) - 1))]; - continue dodist; - } - else { - strm.msg = 'invalid distance code'; - state.mode = BAD; - break top; - } - - break; // need to emulate goto via "continue" - } - } - else if ((op & 64) === 0) { /* 2nd level length code */ - here = lcode[(here & 0xffff)/*here.val*/ + (hold & ((1 << op) - 1))]; - continue dolen; - } - else if (op & 32) { /* end-of-block */ - //Tracevv((stderr, "inflate: end of block\n")); - state.mode = TYPE; - break top; - } - else { - strm.msg = 'invalid literal/length code'; - state.mode = BAD; - break top; - } - - break; // need to emulate goto via "continue" - } - } while (_in < last && _out < end); - - /* return unused bytes (on entry, bits < 8, so in won't go too far back) */ - len = bits >> 3; - _in -= len; - bits -= len << 3; - hold &= (1 << bits) - 1; - - /* update state and return */ - strm.next_in = _in; - strm.next_out = _out; - strm.avail_in = (_in < last ? 5 + (last - _in) : 5 - (_in - last)); - strm.avail_out = (_out < end ? 257 + (end - _out) : 257 - (_out - end)); - state.hold = hold; - state.bits = bits; - return; -}; - -},{}],8:[function(require,module,exports){ -'use strict'; - - -var utils = require('../utils/common'); -var adler32 = require('./adler32'); -var crc32 = require('./crc32'); -var inflate_fast = require('./inffast'); -var inflate_table = require('./inftrees'); - -var CODES = 0; -var LENS = 1; -var DISTS = 2; - -/* Public constants ==========================================================*/ -/* ===========================================================================*/ - - -/* Allowed flush values; see deflate() and inflate() below for details */ -//var Z_NO_FLUSH = 0; -//var Z_PARTIAL_FLUSH = 1; -//var Z_SYNC_FLUSH = 2; -//var Z_FULL_FLUSH = 3; -var Z_FINISH = 4; -var Z_BLOCK = 5; -var Z_TREES = 6; - - -/* Return codes for the compression/decompression functions. Negative values - * are errors, positive values are used for special but normal events. - */ -var Z_OK = 0; -var Z_STREAM_END = 1; -var Z_NEED_DICT = 2; -//var Z_ERRNO = -1; -var Z_STREAM_ERROR = -2; -var Z_DATA_ERROR = -3; -var Z_MEM_ERROR = -4; -var Z_BUF_ERROR = -5; -//var Z_VERSION_ERROR = -6; - -/* The deflate compression method */ -var Z_DEFLATED = 8; - - -/* STATES ====================================================================*/ -/* ===========================================================================*/ - - -var HEAD = 1; /* i: waiting for magic header */ -var FLAGS = 2; /* i: waiting for method and flags (gzip) */ -var TIME = 3; /* i: waiting for modification time (gzip) */ -var OS = 4; /* i: waiting for extra flags and operating system (gzip) */ -var EXLEN = 5; /* i: waiting for extra length (gzip) */ -var EXTRA = 6; /* i: waiting for extra bytes (gzip) */ -var NAME = 7; /* i: waiting for end of file name (gzip) */ -var COMMENT = 8; /* i: waiting for end of comment (gzip) */ -var HCRC = 9; /* i: waiting for header crc (gzip) */ -var DICTID = 10; /* i: waiting for dictionary check value */ -var DICT = 11; /* waiting for inflateSetDictionary() call */ -var TYPE = 12; /* i: waiting for type bits, including last-flag bit */ -var TYPEDO = 13; /* i: same, but skip check to exit inflate on new block */ -var STORED = 14; /* i: waiting for stored size (length and complement) */ -var COPY_ = 15; /* i/o: same as COPY below, but only first time in */ -var COPY = 16; /* i/o: waiting for input or output to copy stored block */ -var TABLE = 17; /* i: waiting for dynamic block table lengths */ -var LENLENS = 18; /* i: waiting for code length code lengths */ -var CODELENS = 19; /* i: waiting for length/lit and distance code lengths */ -var LEN_ = 20; /* i: same as LEN below, but only first time in */ -var LEN = 21; /* i: waiting for length/lit/eob code */ -var LENEXT = 22; /* i: waiting for length extra bits */ -var DIST = 23; /* i: waiting for distance code */ -var DISTEXT = 24; /* i: waiting for distance extra bits */ -var MATCH = 25; /* o: waiting for output space to copy string */ -var LIT = 26; /* o: waiting for output space to write literal */ -var CHECK = 27; /* i: waiting for 32-bit check value */ -var LENGTH = 28; /* i: waiting for 32-bit length (gzip) */ -var DONE = 29; /* finished check, done -- remain here until reset */ -var BAD = 30; /* got a data error -- remain here until reset */ -var MEM = 31; /* got an inflate() memory error -- remain here until reset */ -var SYNC = 32; /* looking for synchronization bytes to restart inflate() */ - -/* ===========================================================================*/ - - - -var ENOUGH_LENS = 852; -var ENOUGH_DISTS = 592; -//var ENOUGH = (ENOUGH_LENS+ENOUGH_DISTS); - -var MAX_WBITS = 15; -/* 32K LZ77 window */ -var DEF_WBITS = MAX_WBITS; - - -function zswap32(q) { - return (((q >>> 24) & 0xff) + - ((q >>> 8) & 0xff00) + - ((q & 0xff00) << 8) + - ((q & 0xff) << 24)); -} - - -function InflateState() { - this.mode = 0; /* current inflate mode */ - this.last = false; /* true if processing last block */ - this.wrap = 0; /* bit 0 true for zlib, bit 1 true for gzip */ - this.havedict = false; /* true if dictionary provided */ - this.flags = 0; /* gzip header method and flags (0 if zlib) */ - this.dmax = 0; /* zlib header max distance (INFLATE_STRICT) */ - this.check = 0; /* protected copy of check value */ - this.total = 0; /* protected copy of output count */ - // TODO: may be {} - this.head = null; /* where to save gzip header information */ - - /* sliding window */ - this.wbits = 0; /* log base 2 of requested window size */ - this.wsize = 0; /* window size or zero if not using window */ - this.whave = 0; /* valid bytes in the window */ - this.wnext = 0; /* window write index */ - this.window = null; /* allocated sliding window, if needed */ - - /* bit accumulator */ - this.hold = 0; /* input bit accumulator */ - this.bits = 0; /* number of bits in "in" */ - - /* for string and stored block copying */ - this.length = 0; /* literal or length of data to copy */ - this.offset = 0; /* distance back to copy string from */ - - /* for table and code decoding */ - this.extra = 0; /* extra bits needed */ - - /* fixed and dynamic code tables */ - this.lencode = null; /* starting table for length/literal codes */ - this.distcode = null; /* starting table for distance codes */ - this.lenbits = 0; /* index bits for lencode */ - this.distbits = 0; /* index bits for distcode */ - - /* dynamic table building */ - this.ncode = 0; /* number of code length code lengths */ - this.nlen = 0; /* number of length code lengths */ - this.ndist = 0; /* number of distance code lengths */ - this.have = 0; /* number of code lengths in lens[] */ - this.next = null; /* next available space in codes[] */ - - this.lens = new utils.Buf16(320); /* temporary storage for code lengths */ - this.work = new utils.Buf16(288); /* work area for code table building */ - - /* - because we don't have pointers in js, we use lencode and distcode directly - as buffers so we don't need codes - */ - //this.codes = new utils.Buf32(ENOUGH); /* space for code tables */ - this.lendyn = null; /* dynamic table for length/literal codes (JS specific) */ - this.distdyn = null; /* dynamic table for distance codes (JS specific) */ - this.sane = 0; /* if false, allow invalid distance too far */ - this.back = 0; /* bits back of last unprocessed length/lit */ - this.was = 0; /* initial length of match */ -} - -function inflateResetKeep(strm) { - var state; - - if (!strm || !strm.state) { return Z_STREAM_ERROR; } - state = strm.state; - strm.total_in = strm.total_out = state.total = 0; - strm.msg = ''; /*Z_NULL*/ - if (state.wrap) { /* to support ill-conceived Java test suite */ - strm.adler = state.wrap & 1; - } - state.mode = HEAD; - state.last = 0; - state.havedict = 0; - state.dmax = 32768; - state.head = null/*Z_NULL*/; - state.hold = 0; - state.bits = 0; - //state.lencode = state.distcode = state.next = state.codes; - state.lencode = state.lendyn = new utils.Buf32(ENOUGH_LENS); - state.distcode = state.distdyn = new utils.Buf32(ENOUGH_DISTS); - - state.sane = 1; - state.back = -1; - //Tracev((stderr, "inflate: reset\n")); - return Z_OK; -} - -function inflateReset(strm) { - var state; - - if (!strm || !strm.state) { return Z_STREAM_ERROR; } - state = strm.state; - state.wsize = 0; - state.whave = 0; - state.wnext = 0; - return inflateResetKeep(strm); - -} - -function inflateReset2(strm, windowBits) { - var wrap; - var state; - - /* get the state */ - if (!strm || !strm.state) { return Z_STREAM_ERROR; } - state = strm.state; - - /* extract wrap request from windowBits parameter */ - if (windowBits < 0) { - wrap = 0; - windowBits = -windowBits; - } - else { - wrap = (windowBits >> 4) + 1; - if (windowBits < 48) { - windowBits &= 15; - } - } - - /* set number of window bits, free window if different */ - if (windowBits && (windowBits < 8 || windowBits > 15)) { - return Z_STREAM_ERROR; - } - if (state.window !== null && state.wbits !== windowBits) { - state.window = null; - } - - /* update state and reset the rest of it */ - state.wrap = wrap; - state.wbits = windowBits; - return inflateReset(strm); -} - -function inflateInit2(strm, windowBits) { - var ret; - var state; - - if (!strm) { return Z_STREAM_ERROR; } - //strm.msg = Z_NULL; /* in case we return an error */ - - state = new InflateState(); - - //if (state === Z_NULL) return Z_MEM_ERROR; - //Tracev((stderr, "inflate: allocated\n")); - strm.state = state; - state.window = null/*Z_NULL*/; - ret = inflateReset2(strm, windowBits); - if (ret !== Z_OK) { - strm.state = null/*Z_NULL*/; - } - return ret; -} - -function inflateInit(strm) { - return inflateInit2(strm, DEF_WBITS); -} - - -/* - Return state with length and distance decoding tables and index sizes set to - fixed code decoding. Normally this returns fixed tables from inffixed.h. - If BUILDFIXED is defined, then instead this routine builds the tables the - first time it's called, and returns those tables the first time and - thereafter. This reduces the size of the code by about 2K bytes, in - exchange for a little execution time. However, BUILDFIXED should not be - used for threaded applications, since the rewriting of the tables and virgin - may not be thread-safe. - */ -var virgin = true; - -var lenfix, distfix; // We have no pointers in JS, so keep tables separate - -function fixedtables(state) { - /* build fixed huffman tables if first call (may not be thread safe) */ - if (virgin) { - var sym; - - lenfix = new utils.Buf32(512); - distfix = new utils.Buf32(32); - - /* literal/length table */ - sym = 0; - while (sym < 144) { state.lens[sym++] = 8; } - while (sym < 256) { state.lens[sym++] = 9; } - while (sym < 280) { state.lens[sym++] = 7; } - while (sym < 288) { state.lens[sym++] = 8; } - - inflate_table(LENS, state.lens, 0, 288, lenfix, 0, state.work, { bits: 9 }); - - /* distance table */ - sym = 0; - while (sym < 32) { state.lens[sym++] = 5; } - - inflate_table(DISTS, state.lens, 0, 32, distfix, 0, state.work, { bits: 5 }); - - /* do this just once */ - virgin = false; - } - - state.lencode = lenfix; - state.lenbits = 9; - state.distcode = distfix; - state.distbits = 5; -} - - -/* - Update the window with the last wsize (normally 32K) bytes written before - returning. If window does not exist yet, create it. This is only called - when a window is already in use, or when output has been written during this - inflate call, but the end of the deflate stream has not been reached yet. - It is also called to create a window for dictionary data when a dictionary - is loaded. - - Providing output buffers larger than 32K to inflate() should provide a speed - advantage, since only the last 32K of output is copied to the sliding window - upon return from inflate(), and since all distances after the first 32K of - output will fall in the output data, making match copies simpler and faster. - The advantage may be dependent on the size of the processor's data caches. - */ -function updatewindow(strm, src, end, copy) { - var dist; - var state = strm.state; - - /* if it hasn't been done already, allocate space for the window */ - if (state.window === null) { - state.wsize = 1 << state.wbits; - state.wnext = 0; - state.whave = 0; - - state.window = new utils.Buf8(state.wsize); - } - - /* copy state->wsize or less output bytes into the circular window */ - if (copy >= state.wsize) { - utils.arraySet(state.window, src, end - state.wsize, state.wsize, 0); - state.wnext = 0; - state.whave = state.wsize; - } - else { - dist = state.wsize - state.wnext; - if (dist > copy) { - dist = copy; - } - //zmemcpy(state->window + state->wnext, end - copy, dist); - utils.arraySet(state.window, src, end - copy, dist, state.wnext); - copy -= dist; - if (copy) { - //zmemcpy(state->window, end - copy, copy); - utils.arraySet(state.window, src, end - copy, copy, 0); - state.wnext = copy; - state.whave = state.wsize; - } - else { - state.wnext += dist; - if (state.wnext === state.wsize) { state.wnext = 0; } - if (state.whave < state.wsize) { state.whave += dist; } - } - } - return 0; -} - -function inflate(strm, flush) { - var state; - var input, output; // input/output buffers - var next; /* next input INDEX */ - var put; /* next output INDEX */ - var have, left; /* available input and output */ - var hold; /* bit buffer */ - var bits; /* bits in bit buffer */ - var _in, _out; /* save starting available input and output */ - var copy; /* number of stored or match bytes to copy */ - var from; /* where to copy match bytes from */ - var from_source; - var here = 0; /* current decoding table entry */ - var here_bits, here_op, here_val; // paked "here" denormalized (JS specific) - //var last; /* parent table entry */ - var last_bits, last_op, last_val; // paked "last" denormalized (JS specific) - var len; /* length to copy for repeats, bits to drop */ - var ret; /* return code */ - var hbuf = new utils.Buf8(4); /* buffer for gzip header crc calculation */ - var opts; - - var n; // temporary var for NEED_BITS - - var order = /* permutation of code lengths */ - [ 16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15 ]; - - - if (!strm || !strm.state || !strm.output || - (!strm.input && strm.avail_in !== 0)) { - return Z_STREAM_ERROR; - } - - state = strm.state; - if (state.mode === TYPE) { state.mode = TYPEDO; } /* skip check */ - - - //--- LOAD() --- - put = strm.next_out; - output = strm.output; - left = strm.avail_out; - next = strm.next_in; - input = strm.input; - have = strm.avail_in; - hold = state.hold; - bits = state.bits; - //--- - - _in = have; - _out = left; - ret = Z_OK; - - inf_leave: // goto emulation - for (;;) { - switch (state.mode) { - case HEAD: - if (state.wrap === 0) { - state.mode = TYPEDO; - break; - } - //=== NEEDBITS(16); - while (bits < 16) { - if (have === 0) { break inf_leave; } - have--; - hold += input[next++] << bits; - bits += 8; - } - //===// - if ((state.wrap & 2) && hold === 0x8b1f) { /* gzip header */ - state.check = 0/*crc32(0L, Z_NULL, 0)*/; - //=== CRC2(state.check, hold); - hbuf[0] = hold & 0xff; - hbuf[1] = (hold >>> 8) & 0xff; - state.check = crc32(state.check, hbuf, 2, 0); - //===// - - //=== INITBITS(); - hold = 0; - bits = 0; - //===// - state.mode = FLAGS; - break; - } - state.flags = 0; /* expect zlib header */ - if (state.head) { - state.head.done = false; - } - if (!(state.wrap & 1) || /* check if zlib header allowed */ - (((hold & 0xff)/*BITS(8)*/ << 8) + (hold >> 8)) % 31) { - strm.msg = 'incorrect header check'; - state.mode = BAD; - break; - } - if ((hold & 0x0f)/*BITS(4)*/ !== Z_DEFLATED) { - strm.msg = 'unknown compression method'; - state.mode = BAD; - break; - } - //--- DROPBITS(4) ---// - hold >>>= 4; - bits -= 4; - //---// - len = (hold & 0x0f)/*BITS(4)*/ + 8; - if (state.wbits === 0) { - state.wbits = len; - } - else if (len > state.wbits) { - strm.msg = 'invalid window size'; - state.mode = BAD; - break; - } - state.dmax = 1 << len; - //Tracev((stderr, "inflate: zlib header ok\n")); - strm.adler = state.check = 1/*adler32(0L, Z_NULL, 0)*/; - state.mode = hold & 0x200 ? DICTID : TYPE; - //=== INITBITS(); - hold = 0; - bits = 0; - //===// - break; - case FLAGS: - //=== NEEDBITS(16); */ - while (bits < 16) { - if (have === 0) { break inf_leave; } - have--; - hold += input[next++] << bits; - bits += 8; - } - //===// - state.flags = hold; - if ((state.flags & 0xff) !== Z_DEFLATED) { - strm.msg = 'unknown compression method'; - state.mode = BAD; - break; - } - if (state.flags & 0xe000) { - strm.msg = 'unknown header flags set'; - state.mode = BAD; - break; - } - if (state.head) { - state.head.text = ((hold >> 8) & 1); - } - if (state.flags & 0x0200) { - //=== CRC2(state.check, hold); - hbuf[0] = hold & 0xff; - hbuf[1] = (hold >>> 8) & 0xff; - state.check = crc32(state.check, hbuf, 2, 0); - //===// - } - //=== INITBITS(); - hold = 0; - bits = 0; - //===// - state.mode = TIME; - /* falls through */ - case TIME: - //=== NEEDBITS(32); */ - while (bits < 32) { - if (have === 0) { break inf_leave; } - have--; - hold += input[next++] << bits; - bits += 8; - } - //===// - if (state.head) { - state.head.time = hold; - } - if (state.flags & 0x0200) { - //=== CRC4(state.check, hold) - hbuf[0] = hold & 0xff; - hbuf[1] = (hold >>> 8) & 0xff; - hbuf[2] = (hold >>> 16) & 0xff; - hbuf[3] = (hold >>> 24) & 0xff; - state.check = crc32(state.check, hbuf, 4, 0); - //=== - } - //=== INITBITS(); - hold = 0; - bits = 0; - //===// - state.mode = OS; - /* falls through */ - case OS: - //=== NEEDBITS(16); */ - while (bits < 16) { - if (have === 0) { break inf_leave; } - have--; - hold += input[next++] << bits; - bits += 8; - } - //===// - if (state.head) { - state.head.xflags = (hold & 0xff); - state.head.os = (hold >> 8); - } - if (state.flags & 0x0200) { - //=== CRC2(state.check, hold); - hbuf[0] = hold & 0xff; - hbuf[1] = (hold >>> 8) & 0xff; - state.check = crc32(state.check, hbuf, 2, 0); - //===// - } - //=== INITBITS(); - hold = 0; - bits = 0; - //===// - state.mode = EXLEN; - /* falls through */ - case EXLEN: - if (state.flags & 0x0400) { - //=== NEEDBITS(16); */ - while (bits < 16) { - if (have === 0) { break inf_leave; } - have--; - hold += input[next++] << bits; - bits += 8; - } - //===// - state.length = hold; - if (state.head) { - state.head.extra_len = hold; - } - if (state.flags & 0x0200) { - //=== CRC2(state.check, hold); - hbuf[0] = hold & 0xff; - hbuf[1] = (hold >>> 8) & 0xff; - state.check = crc32(state.check, hbuf, 2, 0); - //===// - } - //=== INITBITS(); - hold = 0; - bits = 0; - //===// - } - else if (state.head) { - state.head.extra = null/*Z_NULL*/; - } - state.mode = EXTRA; - /* falls through */ - case EXTRA: - if (state.flags & 0x0400) { - copy = state.length; - if (copy > have) { copy = have; } - if (copy) { - if (state.head) { - len = state.head.extra_len - state.length; - if (!state.head.extra) { - // Use untyped array for more conveniend processing later - state.head.extra = new Array(state.head.extra_len); - } - utils.arraySet( - state.head.extra, - input, - next, - // extra field is limited to 65536 bytes - // - no need for additional size check - copy, - /*len + copy > state.head.extra_max - len ? state.head.extra_max : copy,*/ - len - ); - //zmemcpy(state.head.extra + len, next, - // len + copy > state.head.extra_max ? - // state.head.extra_max - len : copy); - } - if (state.flags & 0x0200) { - state.check = crc32(state.check, input, copy, next); - } - have -= copy; - next += copy; - state.length -= copy; - } - if (state.length) { break inf_leave; } - } - state.length = 0; - state.mode = NAME; - /* falls through */ - case NAME: - if (state.flags & 0x0800) { - if (have === 0) { break inf_leave; } - copy = 0; - do { - // TODO: 2 or 1 bytes? - len = input[next + copy++]; - /* use constant limit because in js we should not preallocate memory */ - if (state.head && len && - (state.length < 65536 /*state.head.name_max*/)) { - state.head.name += String.fromCharCode(len); - } - } while (len && copy < have); - - if (state.flags & 0x0200) { - state.check = crc32(state.check, input, copy, next); - } - have -= copy; - next += copy; - if (len) { break inf_leave; } - } - else if (state.head) { - state.head.name = null; - } - state.length = 0; - state.mode = COMMENT; - /* falls through */ - case COMMENT: - if (state.flags & 0x1000) { - if (have === 0) { break inf_leave; } - copy = 0; - do { - len = input[next + copy++]; - /* use constant limit because in js we should not preallocate memory */ - if (state.head && len && - (state.length < 65536 /*state.head.comm_max*/)) { - state.head.comment += String.fromCharCode(len); - } - } while (len && copy < have); - if (state.flags & 0x0200) { - state.check = crc32(state.check, input, copy, next); - } - have -= copy; - next += copy; - if (len) { break inf_leave; } - } - else if (state.head) { - state.head.comment = null; - } - state.mode = HCRC; - /* falls through */ - case HCRC: - if (state.flags & 0x0200) { - //=== NEEDBITS(16); */ - while (bits < 16) { - if (have === 0) { break inf_leave; } - have--; - hold += input[next++] << bits; - bits += 8; - } - //===// - if (hold !== (state.check & 0xffff)) { - strm.msg = 'header crc mismatch'; - state.mode = BAD; - break; - } - //=== INITBITS(); - hold = 0; - bits = 0; - //===// - } - if (state.head) { - state.head.hcrc = ((state.flags >> 9) & 1); - state.head.done = true; - } - strm.adler = state.check = 0; - state.mode = TYPE; - break; - case DICTID: - //=== NEEDBITS(32); */ - while (bits < 32) { - if (have === 0) { break inf_leave; } - have--; - hold += input[next++] << bits; - bits += 8; - } - //===// - strm.adler = state.check = zswap32(hold); - //=== INITBITS(); - hold = 0; - bits = 0; - //===// - state.mode = DICT; - /* falls through */ - case DICT: - if (state.havedict === 0) { - //--- RESTORE() --- - strm.next_out = put; - strm.avail_out = left; - strm.next_in = next; - strm.avail_in = have; - state.hold = hold; - state.bits = bits; - //--- - return Z_NEED_DICT; - } - strm.adler = state.check = 1/*adler32(0L, Z_NULL, 0)*/; - state.mode = TYPE; - /* falls through */ - case TYPE: - if (flush === Z_BLOCK || flush === Z_TREES) { break inf_leave; } - /* falls through */ - case TYPEDO: - if (state.last) { - //--- BYTEBITS() ---// - hold >>>= bits & 7; - bits -= bits & 7; - //---// - state.mode = CHECK; - break; - } - //=== NEEDBITS(3); */ - while (bits < 3) { - if (have === 0) { break inf_leave; } - have--; - hold += input[next++] << bits; - bits += 8; - } - //===// - state.last = (hold & 0x01)/*BITS(1)*/; - //--- DROPBITS(1) ---// - hold >>>= 1; - bits -= 1; - //---// - - switch ((hold & 0x03)/*BITS(2)*/) { - case 0: /* stored block */ - //Tracev((stderr, "inflate: stored block%s\n", - // state.last ? " (last)" : "")); - state.mode = STORED; - break; - case 1: /* fixed block */ - fixedtables(state); - //Tracev((stderr, "inflate: fixed codes block%s\n", - // state.last ? " (last)" : "")); - state.mode = LEN_; /* decode codes */ - if (flush === Z_TREES) { - //--- DROPBITS(2) ---// - hold >>>= 2; - bits -= 2; - //---// - break inf_leave; - } - break; - case 2: /* dynamic block */ - //Tracev((stderr, "inflate: dynamic codes block%s\n", - // state.last ? " (last)" : "")); - state.mode = TABLE; - break; - case 3: - strm.msg = 'invalid block type'; - state.mode = BAD; - } - //--- DROPBITS(2) ---// - hold >>>= 2; - bits -= 2; - //---// - break; - case STORED: - //--- BYTEBITS() ---// /* go to byte boundary */ - hold >>>= bits & 7; - bits -= bits & 7; - //---// - //=== NEEDBITS(32); */ - while (bits < 32) { - if (have === 0) { break inf_leave; } - have--; - hold += input[next++] << bits; - bits += 8; - } - //===// - if ((hold & 0xffff) !== ((hold >>> 16) ^ 0xffff)) { - strm.msg = 'invalid stored block lengths'; - state.mode = BAD; - break; - } - state.length = hold & 0xffff; - //Tracev((stderr, "inflate: stored length %u\n", - // state.length)); - //=== INITBITS(); - hold = 0; - bits = 0; - //===// - state.mode = COPY_; - if (flush === Z_TREES) { break inf_leave; } - /* falls through */ - case COPY_: - state.mode = COPY; - /* falls through */ - case COPY: - copy = state.length; - if (copy) { - if (copy > have) { copy = have; } - if (copy > left) { copy = left; } - if (copy === 0) { break inf_leave; } - //--- zmemcpy(put, next, copy); --- - utils.arraySet(output, input, next, copy, put); - //---// - have -= copy; - next += copy; - left -= copy; - put += copy; - state.length -= copy; - break; - } - //Tracev((stderr, "inflate: stored end\n")); - state.mode = TYPE; - break; - case TABLE: - //=== NEEDBITS(14); */ - while (bits < 14) { - if (have === 0) { break inf_leave; } - have--; - hold += input[next++] << bits; - bits += 8; - } - //===// - state.nlen = (hold & 0x1f)/*BITS(5)*/ + 257; - //--- DROPBITS(5) ---// - hold >>>= 5; - bits -= 5; - //---// - state.ndist = (hold & 0x1f)/*BITS(5)*/ + 1; - //--- DROPBITS(5) ---// - hold >>>= 5; - bits -= 5; - //---// - state.ncode = (hold & 0x0f)/*BITS(4)*/ + 4; - //--- DROPBITS(4) ---// - hold >>>= 4; - bits -= 4; - //---// -//#ifndef PKZIP_BUG_WORKAROUND - if (state.nlen > 286 || state.ndist > 30) { - strm.msg = 'too many length or distance symbols'; - state.mode = BAD; - break; - } -//#endif - //Tracev((stderr, "inflate: table sizes ok\n")); - state.have = 0; - state.mode = LENLENS; - /* falls through */ - case LENLENS: - while (state.have < state.ncode) { - //=== NEEDBITS(3); - while (bits < 3) { - if (have === 0) { break inf_leave; } - have--; - hold += input[next++] << bits; - bits += 8; - } - //===// - state.lens[order[state.have++]] = (hold & 0x07);//BITS(3); - //--- DROPBITS(3) ---// - hold >>>= 3; - bits -= 3; - //---// - } - while (state.have < 19) { - state.lens[order[state.have++]] = 0; - } - // We have separate tables & no pointers. 2 commented lines below not needed. - //state.next = state.codes; - //state.lencode = state.next; - // Switch to use dynamic table - state.lencode = state.lendyn; - state.lenbits = 7; - - opts = { bits: state.lenbits }; - ret = inflate_table(CODES, state.lens, 0, 19, state.lencode, 0, state.work, opts); - state.lenbits = opts.bits; - - if (ret) { - strm.msg = 'invalid code lengths set'; - state.mode = BAD; - break; - } - //Tracev((stderr, "inflate: code lengths ok\n")); - state.have = 0; - state.mode = CODELENS; - /* falls through */ - case CODELENS: - while (state.have < state.nlen + state.ndist) { - for (;;) { - here = state.lencode[hold & ((1 << state.lenbits) - 1)];/*BITS(state.lenbits)*/ - here_bits = here >>> 24; - here_op = (here >>> 16) & 0xff; - here_val = here & 0xffff; - - if ((here_bits) <= bits) { break; } - //--- PULLBYTE() ---// - if (have === 0) { break inf_leave; } - have--; - hold += input[next++] << bits; - bits += 8; - //---// - } - if (here_val < 16) { - //--- DROPBITS(here.bits) ---// - hold >>>= here_bits; - bits -= here_bits; - //---// - state.lens[state.have++] = here_val; - } - else { - if (here_val === 16) { - //=== NEEDBITS(here.bits + 2); - n = here_bits + 2; - while (bits < n) { - if (have === 0) { break inf_leave; } - have--; - hold += input[next++] << bits; - bits += 8; - } - //===// - //--- DROPBITS(here.bits) ---// - hold >>>= here_bits; - bits -= here_bits; - //---// - if (state.have === 0) { - strm.msg = 'invalid bit length repeat'; - state.mode = BAD; - break; - } - len = state.lens[state.have - 1]; - copy = 3 + (hold & 0x03);//BITS(2); - //--- DROPBITS(2) ---// - hold >>>= 2; - bits -= 2; - //---// - } - else if (here_val === 17) { - //=== NEEDBITS(here.bits + 3); - n = here_bits + 3; - while (bits < n) { - if (have === 0) { break inf_leave; } - have--; - hold += input[next++] << bits; - bits += 8; - } - //===// - //--- DROPBITS(here.bits) ---// - hold >>>= here_bits; - bits -= here_bits; - //---// - len = 0; - copy = 3 + (hold & 0x07);//BITS(3); - //--- DROPBITS(3) ---// - hold >>>= 3; - bits -= 3; - //---// - } - else { - //=== NEEDBITS(here.bits + 7); - n = here_bits + 7; - while (bits < n) { - if (have === 0) { break inf_leave; } - have--; - hold += input[next++] << bits; - bits += 8; - } - //===// - //--- DROPBITS(here.bits) ---// - hold >>>= here_bits; - bits -= here_bits; - //---// - len = 0; - copy = 11 + (hold & 0x7f);//BITS(7); - //--- DROPBITS(7) ---// - hold >>>= 7; - bits -= 7; - //---// - } - if (state.have + copy > state.nlen + state.ndist) { - strm.msg = 'invalid bit length repeat'; - state.mode = BAD; - break; - } - while (copy--) { - state.lens[state.have++] = len; - } - } - } - - /* handle error breaks in while */ - if (state.mode === BAD) { break; } - - /* check for end-of-block code (better have one) */ - if (state.lens[256] === 0) { - strm.msg = 'invalid code -- missing end-of-block'; - state.mode = BAD; - break; - } - - /* build code tables -- note: do not change the lenbits or distbits - values here (9 and 6) without reading the comments in inftrees.h - concerning the ENOUGH constants, which depend on those values */ - state.lenbits = 9; - - opts = { bits: state.lenbits }; - ret = inflate_table(LENS, state.lens, 0, state.nlen, state.lencode, 0, state.work, opts); - // We have separate tables & no pointers. 2 commented lines below not needed. - // state.next_index = opts.table_index; - state.lenbits = opts.bits; - // state.lencode = state.next; - - if (ret) { - strm.msg = 'invalid literal/lengths set'; - state.mode = BAD; - break; - } - - state.distbits = 6; - //state.distcode.copy(state.codes); - // Switch to use dynamic table - state.distcode = state.distdyn; - opts = { bits: state.distbits }; - ret = inflate_table(DISTS, state.lens, state.nlen, state.ndist, state.distcode, 0, state.work, opts); - // We have separate tables & no pointers. 2 commented lines below not needed. - // state.next_index = opts.table_index; - state.distbits = opts.bits; - // state.distcode = state.next; - - if (ret) { - strm.msg = 'invalid distances set'; - state.mode = BAD; - break; - } - //Tracev((stderr, 'inflate: codes ok\n')); - state.mode = LEN_; - if (flush === Z_TREES) { break inf_leave; } - /* falls through */ - case LEN_: - state.mode = LEN; - /* falls through */ - case LEN: - if (have >= 6 && left >= 258) { - //--- RESTORE() --- - strm.next_out = put; - strm.avail_out = left; - strm.next_in = next; - strm.avail_in = have; - state.hold = hold; - state.bits = bits; - //--- - inflate_fast(strm, _out); - //--- LOAD() --- - put = strm.next_out; - output = strm.output; - left = strm.avail_out; - next = strm.next_in; - input = strm.input; - have = strm.avail_in; - hold = state.hold; - bits = state.bits; - //--- - - if (state.mode === TYPE) { - state.back = -1; - } - break; - } - state.back = 0; - for (;;) { - here = state.lencode[hold & ((1 << state.lenbits) - 1)]; /*BITS(state.lenbits)*/ - here_bits = here >>> 24; - here_op = (here >>> 16) & 0xff; - here_val = here & 0xffff; - - if (here_bits <= bits) { break; } - //--- PULLBYTE() ---// - if (have === 0) { break inf_leave; } - have--; - hold += input[next++] << bits; - bits += 8; - //---// - } - if (here_op && (here_op & 0xf0) === 0) { - last_bits = here_bits; - last_op = here_op; - last_val = here_val; - for (;;) { - here = state.lencode[last_val + - ((hold & ((1 << (last_bits + last_op)) - 1))/*BITS(last.bits + last.op)*/ >> last_bits)]; - here_bits = here >>> 24; - here_op = (here >>> 16) & 0xff; - here_val = here & 0xffff; - - if ((last_bits + here_bits) <= bits) { break; } - //--- PULLBYTE() ---// - if (have === 0) { break inf_leave; } - have--; - hold += input[next++] << bits; - bits += 8; - //---// - } - //--- DROPBITS(last.bits) ---// - hold >>>= last_bits; - bits -= last_bits; - //---// - state.back += last_bits; - } - //--- DROPBITS(here.bits) ---// - hold >>>= here_bits; - bits -= here_bits; - //---// - state.back += here_bits; - state.length = here_val; - if (here_op === 0) { - //Tracevv((stderr, here.val >= 0x20 && here.val < 0x7f ? - // "inflate: literal '%c'\n" : - // "inflate: literal 0x%02x\n", here.val)); - state.mode = LIT; - break; - } - if (here_op & 32) { - //Tracevv((stderr, "inflate: end of block\n")); - state.back = -1; - state.mode = TYPE; - break; - } - if (here_op & 64) { - strm.msg = 'invalid literal/length code'; - state.mode = BAD; - break; - } - state.extra = here_op & 15; - state.mode = LENEXT; - /* falls through */ - case LENEXT: - if (state.extra) { - //=== NEEDBITS(state.extra); - n = state.extra; - while (bits < n) { - if (have === 0) { break inf_leave; } - have--; - hold += input[next++] << bits; - bits += 8; - } - //===// - state.length += hold & ((1 << state.extra) - 1)/*BITS(state.extra)*/; - //--- DROPBITS(state.extra) ---// - hold >>>= state.extra; - bits -= state.extra; - //---// - state.back += state.extra; - } - //Tracevv((stderr, "inflate: length %u\n", state.length)); - state.was = state.length; - state.mode = DIST; - /* falls through */ - case DIST: - for (;;) { - here = state.distcode[hold & ((1 << state.distbits) - 1)];/*BITS(state.distbits)*/ - here_bits = here >>> 24; - here_op = (here >>> 16) & 0xff; - here_val = here & 0xffff; - - if ((here_bits) <= bits) { break; } - //--- PULLBYTE() ---// - if (have === 0) { break inf_leave; } - have--; - hold += input[next++] << bits; - bits += 8; - //---// - } - if ((here_op & 0xf0) === 0) { - last_bits = here_bits; - last_op = here_op; - last_val = here_val; - for (;;) { - here = state.distcode[last_val + - ((hold & ((1 << (last_bits + last_op)) - 1))/*BITS(last.bits + last.op)*/ >> last_bits)]; - here_bits = here >>> 24; - here_op = (here >>> 16) & 0xff; - here_val = here & 0xffff; - - if ((last_bits + here_bits) <= bits) { break; } - //--- PULLBYTE() ---// - if (have === 0) { break inf_leave; } - have--; - hold += input[next++] << bits; - bits += 8; - //---// - } - //--- DROPBITS(last.bits) ---// - hold >>>= last_bits; - bits -= last_bits; - //---// - state.back += last_bits; - } - //--- DROPBITS(here.bits) ---// - hold >>>= here_bits; - bits -= here_bits; - //---// - state.back += here_bits; - if (here_op & 64) { - strm.msg = 'invalid distance code'; - state.mode = BAD; - break; - } - state.offset = here_val; - state.extra = (here_op) & 15; - state.mode = DISTEXT; - /* falls through */ - case DISTEXT: - if (state.extra) { - //=== NEEDBITS(state.extra); - n = state.extra; - while (bits < n) { - if (have === 0) { break inf_leave; } - have--; - hold += input[next++] << bits; - bits += 8; - } - //===// - state.offset += hold & ((1 << state.extra) - 1)/*BITS(state.extra)*/; - //--- DROPBITS(state.extra) ---// - hold >>>= state.extra; - bits -= state.extra; - //---// - state.back += state.extra; - } -//#ifdef INFLATE_STRICT - if (state.offset > state.dmax) { - strm.msg = 'invalid distance too far back'; - state.mode = BAD; - break; - } -//#endif - //Tracevv((stderr, "inflate: distance %u\n", state.offset)); - state.mode = MATCH; - /* falls through */ - case MATCH: - if (left === 0) { break inf_leave; } - copy = _out - left; - if (state.offset > copy) { /* copy from window */ - copy = state.offset - copy; - if (copy > state.whave) { - if (state.sane) { - strm.msg = 'invalid distance too far back'; - state.mode = BAD; - break; - } -// (!) This block is disabled in zlib defailts, -// don't enable it for binary compatibility -//#ifdef INFLATE_ALLOW_INVALID_DISTANCE_TOOFAR_ARRR -// Trace((stderr, "inflate.c too far\n")); -// copy -= state.whave; -// if (copy > state.length) { copy = state.length; } -// if (copy > left) { copy = left; } -// left -= copy; -// state.length -= copy; -// do { -// output[put++] = 0; -// } while (--copy); -// if (state.length === 0) { state.mode = LEN; } -// break; -//#endif - } - if (copy > state.wnext) { - copy -= state.wnext; - from = state.wsize - copy; - } - else { - from = state.wnext - copy; - } - if (copy > state.length) { copy = state.length; } - from_source = state.window; - } - else { /* copy from output */ - from_source = output; - from = put - state.offset; - copy = state.length; - } - if (copy > left) { copy = left; } - left -= copy; - state.length -= copy; - do { - output[put++] = from_source[from++]; - } while (--copy); - if (state.length === 0) { state.mode = LEN; } - break; - case LIT: - if (left === 0) { break inf_leave; } - output[put++] = state.length; - left--; - state.mode = LEN; - break; - case CHECK: - if (state.wrap) { - //=== NEEDBITS(32); - while (bits < 32) { - if (have === 0) { break inf_leave; } - have--; - // Use '|' insdead of '+' to make sure that result is signed - hold |= input[next++] << bits; - bits += 8; - } - //===// - _out -= left; - strm.total_out += _out; - state.total += _out; - if (_out) { - strm.adler = state.check = - /*UPDATE(state.check, put - _out, _out);*/ - (state.flags ? crc32(state.check, output, _out, put - _out) : adler32(state.check, output, _out, put - _out)); - - } - _out = left; - // NB: crc32 stored as signed 32-bit int, zswap32 returns signed too - if ((state.flags ? hold : zswap32(hold)) !== state.check) { - strm.msg = 'incorrect data check'; - state.mode = BAD; - break; - } - //=== INITBITS(); - hold = 0; - bits = 0; - //===// - //Tracev((stderr, "inflate: check matches trailer\n")); - } - state.mode = LENGTH; - /* falls through */ - case LENGTH: - if (state.wrap && state.flags) { - //=== NEEDBITS(32); - while (bits < 32) { - if (have === 0) { break inf_leave; } - have--; - hold += input[next++] << bits; - bits += 8; - } - //===// - if (hold !== (state.total & 0xffffffff)) { - strm.msg = 'incorrect length check'; - state.mode = BAD; - break; - } - //=== INITBITS(); - hold = 0; - bits = 0; - //===// - //Tracev((stderr, "inflate: length matches trailer\n")); - } - state.mode = DONE; - /* falls through */ - case DONE: - ret = Z_STREAM_END; - break inf_leave; - case BAD: - ret = Z_DATA_ERROR; - break inf_leave; - case MEM: - return Z_MEM_ERROR; - case SYNC: - /* falls through */ - default: - return Z_STREAM_ERROR; - } - } - - // inf_leave <- here is real place for "goto inf_leave", emulated via "break inf_leave" - - /* - Return from inflate(), updating the total counts and the check value. - If there was no progress during the inflate() call, return a buffer - error. Call updatewindow() to create and/or update the window state. - Note: a memory error from inflate() is non-recoverable. - */ - - //--- RESTORE() --- - strm.next_out = put; - strm.avail_out = left; - strm.next_in = next; - strm.avail_in = have; - state.hold = hold; - state.bits = bits; - //--- - - if (state.wsize || (_out !== strm.avail_out && state.mode < BAD && - (state.mode < CHECK || flush !== Z_FINISH))) { - if (updatewindow(strm, strm.output, strm.next_out, _out - strm.avail_out)) { - state.mode = MEM; - return Z_MEM_ERROR; - } - } - _in -= strm.avail_in; - _out -= strm.avail_out; - strm.total_in += _in; - strm.total_out += _out; - state.total += _out; - if (state.wrap && _out) { - strm.adler = state.check = /*UPDATE(state.check, strm.next_out - _out, _out);*/ - (state.flags ? crc32(state.check, output, _out, strm.next_out - _out) : adler32(state.check, output, _out, strm.next_out - _out)); - } - strm.data_type = state.bits + (state.last ? 64 : 0) + - (state.mode === TYPE ? 128 : 0) + - (state.mode === LEN_ || state.mode === COPY_ ? 256 : 0); - if (((_in === 0 && _out === 0) || flush === Z_FINISH) && ret === Z_OK) { - ret = Z_BUF_ERROR; - } - return ret; -} - -function inflateEnd(strm) { - - if (!strm || !strm.state /*|| strm->zfree == (free_func)0*/) { - return Z_STREAM_ERROR; - } - - var state = strm.state; - if (state.window) { - state.window = null; - } - strm.state = null; - return Z_OK; -} - -function inflateGetHeader(strm, head) { - var state; - - /* check state */ - if (!strm || !strm.state) { return Z_STREAM_ERROR; } - state = strm.state; - if ((state.wrap & 2) === 0) { return Z_STREAM_ERROR; } - - /* save header structure */ - state.head = head; - head.done = false; - return Z_OK; -} - -function inflateSetDictionary(strm, dictionary) { - var dictLength = dictionary.length; - - var state; - var dictid; - var ret; - - /* check state */ - if (!strm /* == Z_NULL */ || !strm.state /* == Z_NULL */) { return Z_STREAM_ERROR; } - state = strm.state; - - if (state.wrap !== 0 && state.mode !== DICT) { - return Z_STREAM_ERROR; - } - - /* check for correct dictionary identifier */ - if (state.mode === DICT) { - dictid = 1; /* adler32(0, null, 0)*/ - /* dictid = adler32(dictid, dictionary, dictLength); */ - dictid = adler32(dictid, dictionary, dictLength, 0); - if (dictid !== state.check) { - return Z_DATA_ERROR; - } - } - /* copy dictionary to window using updatewindow(), which will amend the - existing dictionary if appropriate */ - ret = updatewindow(strm, dictionary, dictLength, dictLength); - if (ret) { - state.mode = MEM; - return Z_MEM_ERROR; - } - state.havedict = 1; - // Tracev((stderr, "inflate: dictionary set\n")); - return Z_OK; -} - -exports.inflateReset = inflateReset; -exports.inflateReset2 = inflateReset2; -exports.inflateResetKeep = inflateResetKeep; -exports.inflateInit = inflateInit; -exports.inflateInit2 = inflateInit2; -exports.inflate = inflate; -exports.inflateEnd = inflateEnd; -exports.inflateGetHeader = inflateGetHeader; -exports.inflateSetDictionary = inflateSetDictionary; -exports.inflateInfo = 'pako inflate (from Nodeca project)'; - -/* Not implemented -exports.inflateCopy = inflateCopy; -exports.inflateGetDictionary = inflateGetDictionary; -exports.inflateMark = inflateMark; -exports.inflatePrime = inflatePrime; -exports.inflateSync = inflateSync; -exports.inflateSyncPoint = inflateSyncPoint; -exports.inflateUndermine = inflateUndermine; -*/ - -},{"../utils/common":1,"./adler32":3,"./crc32":5,"./inffast":7,"./inftrees":9}],9:[function(require,module,exports){ -'use strict'; - - -var utils = require('../utils/common'); - -var MAXBITS = 15; -var ENOUGH_LENS = 852; -var ENOUGH_DISTS = 592; -//var ENOUGH = (ENOUGH_LENS+ENOUGH_DISTS); - -var CODES = 0; -var LENS = 1; -var DISTS = 2; - -var lbase = [ /* Length codes 257..285 base */ - 3, 4, 5, 6, 7, 8, 9, 10, 11, 13, 15, 17, 19, 23, 27, 31, - 35, 43, 51, 59, 67, 83, 99, 115, 131, 163, 195, 227, 258, 0, 0 -]; - -var lext = [ /* Length codes 257..285 extra */ - 16, 16, 16, 16, 16, 16, 16, 16, 17, 17, 17, 17, 18, 18, 18, 18, - 19, 19, 19, 19, 20, 20, 20, 20, 21, 21, 21, 21, 16, 72, 78 -]; - -var dbase = [ /* Distance codes 0..29 base */ - 1, 2, 3, 4, 5, 7, 9, 13, 17, 25, 33, 49, 65, 97, 129, 193, - 257, 385, 513, 769, 1025, 1537, 2049, 3073, 4097, 6145, - 8193, 12289, 16385, 24577, 0, 0 -]; - -var dext = [ /* Distance codes 0..29 extra */ - 16, 16, 16, 16, 17, 17, 18, 18, 19, 19, 20, 20, 21, 21, 22, 22, - 23, 23, 24, 24, 25, 25, 26, 26, 27, 27, - 28, 28, 29, 29, 64, 64 -]; - -module.exports = function inflate_table(type, lens, lens_index, codes, table, table_index, work, opts) -{ - var bits = opts.bits; - //here = opts.here; /* table entry for duplication */ - - var len = 0; /* a code's length in bits */ - var sym = 0; /* index of code symbols */ - var min = 0, max = 0; /* minimum and maximum code lengths */ - var root = 0; /* number of index bits for root table */ - var curr = 0; /* number of index bits for current table */ - var drop = 0; /* code bits to drop for sub-table */ - var left = 0; /* number of prefix codes available */ - var used = 0; /* code entries in table used */ - var huff = 0; /* Huffman code */ - var incr; /* for incrementing code, index */ - var fill; /* index for replicating entries */ - var low; /* low bits for current root entry */ - var mask; /* mask for low root bits */ - var next; /* next available space in table */ - var base = null; /* base value table to use */ - var base_index = 0; -// var shoextra; /* extra bits table to use */ - var end; /* use base and extra for symbol > end */ - var count = new utils.Buf16(MAXBITS + 1); //[MAXBITS+1]; /* number of codes of each length */ - var offs = new utils.Buf16(MAXBITS + 1); //[MAXBITS+1]; /* offsets in table for each length */ - var extra = null; - var extra_index = 0; - - var here_bits, here_op, here_val; - - /* - Process a set of code lengths to create a canonical Huffman code. The - code lengths are lens[0..codes-1]. Each length corresponds to the - symbols 0..codes-1. The Huffman code is generated by first sorting the - symbols by length from short to long, and retaining the symbol order - for codes with equal lengths. Then the code starts with all zero bits - for the first code of the shortest length, and the codes are integer - increments for the same length, and zeros are appended as the length - increases. For the deflate format, these bits are stored backwards - from their more natural integer increment ordering, and so when the - decoding tables are built in the large loop below, the integer codes - are incremented backwards. - - This routine assumes, but does not check, that all of the entries in - lens[] are in the range 0..MAXBITS. The caller must assure this. - 1..MAXBITS is interpreted as that code length. zero means that that - symbol does not occur in this code. - - The codes are sorted by computing a count of codes for each length, - creating from that a table of starting indices for each length in the - sorted table, and then entering the symbols in order in the sorted - table. The sorted table is work[], with that space being provided by - the caller. - - The length counts are used for other purposes as well, i.e. finding - the minimum and maximum length codes, determining if there are any - codes at all, checking for a valid set of lengths, and looking ahead - at length counts to determine sub-table sizes when building the - decoding tables. - */ - - /* accumulate lengths for codes (assumes lens[] all in 0..MAXBITS) */ - for (len = 0; len <= MAXBITS; len++) { - count[len] = 0; - } - for (sym = 0; sym < codes; sym++) { - count[lens[lens_index + sym]]++; - } - - /* bound code lengths, force root to be within code lengths */ - root = bits; - for (max = MAXBITS; max >= 1; max--) { - if (count[max] !== 0) { break; } - } - if (root > max) { - root = max; - } - if (max === 0) { /* no symbols to code at all */ - //table.op[opts.table_index] = 64; //here.op = (var char)64; /* invalid code marker */ - //table.bits[opts.table_index] = 1; //here.bits = (var char)1; - //table.val[opts.table_index++] = 0; //here.val = (var short)0; - table[table_index++] = (1 << 24) | (64 << 16) | 0; - - - //table.op[opts.table_index] = 64; - //table.bits[opts.table_index] = 1; - //table.val[opts.table_index++] = 0; - table[table_index++] = (1 << 24) | (64 << 16) | 0; - - opts.bits = 1; - return 0; /* no symbols, but wait for decoding to report error */ - } - for (min = 1; min < max; min++) { - if (count[min] !== 0) { break; } - } - if (root < min) { - root = min; - } - - /* check for an over-subscribed or incomplete set of lengths */ - left = 1; - for (len = 1; len <= MAXBITS; len++) { - left <<= 1; - left -= count[len]; - if (left < 0) { - return -1; - } /* over-subscribed */ - } - if (left > 0 && (type === CODES || max !== 1)) { - return -1; /* incomplete set */ - } - - /* generate offsets into symbol table for each length for sorting */ - offs[1] = 0; - for (len = 1; len < MAXBITS; len++) { - offs[len + 1] = offs[len] + count[len]; - } - - /* sort symbols by length, by symbol order within each length */ - for (sym = 0; sym < codes; sym++) { - if (lens[lens_index + sym] !== 0) { - work[offs[lens[lens_index + sym]]++] = sym; - } - } - - /* - Create and fill in decoding tables. In this loop, the table being - filled is at next and has curr index bits. The code being used is huff - with length len. That code is converted to an index by dropping drop - bits off of the bottom. For codes where len is less than drop + curr, - those top drop + curr - len bits are incremented through all values to - fill the table with replicated entries. - - root is the number of index bits for the root table. When len exceeds - root, sub-tables are created pointed to by the root entry with an index - of the low root bits of huff. This is saved in low to check for when a - new sub-table should be started. drop is zero when the root table is - being filled, and drop is root when sub-tables are being filled. - - When a new sub-table is needed, it is necessary to look ahead in the - code lengths to determine what size sub-table is needed. The length - counts are used for this, and so count[] is decremented as codes are - entered in the tables. - - used keeps track of how many table entries have been allocated from the - provided *table space. It is checked for LENS and DIST tables against - the constants ENOUGH_LENS and ENOUGH_DISTS to guard against changes in - the initial root table size constants. See the comments in inftrees.h - for more information. - - sym increments through all symbols, and the loop terminates when - all codes of length max, i.e. all codes, have been processed. This - routine permits incomplete codes, so another loop after this one fills - in the rest of the decoding tables with invalid code markers. - */ - - /* set up for code type */ - // poor man optimization - use if-else instead of switch, - // to avoid deopts in old v8 - if (type === CODES) { - base = extra = work; /* dummy value--not used */ - end = 19; - - } else if (type === LENS) { - base = lbase; - base_index -= 257; - extra = lext; - extra_index -= 257; - end = 256; - - } else { /* DISTS */ - base = dbase; - extra = dext; - end = -1; - } - - /* initialize opts for loop */ - huff = 0; /* starting code */ - sym = 0; /* starting code symbol */ - len = min; /* starting code length */ - next = table_index; /* current table to fill in */ - curr = root; /* current table index bits */ - drop = 0; /* current bits to drop from code for index */ - low = -1; /* trigger new sub-table when len > root */ - used = 1 << root; /* use root table entries */ - mask = used - 1; /* mask for comparing low */ - - /* check available table space */ - if ((type === LENS && used > ENOUGH_LENS) || - (type === DISTS && used > ENOUGH_DISTS)) { - return 1; - } - - var i = 0; - /* process all codes and make table entries */ - for (;;) { - i++; - /* create table entry */ - here_bits = len - drop; - if (work[sym] < end) { - here_op = 0; - here_val = work[sym]; - } - else if (work[sym] > end) { - here_op = extra[extra_index + work[sym]]; - here_val = base[base_index + work[sym]]; - } - else { - here_op = 32 + 64; /* end of block */ - here_val = 0; - } - - /* replicate for those indices with low len bits equal to huff */ - incr = 1 << (len - drop); - fill = 1 << curr; - min = fill; /* save offset to next table */ - do { - fill -= incr; - table[next + (huff >> drop) + fill] = (here_bits << 24) | (here_op << 16) | here_val |0; - } while (fill !== 0); - - /* backwards increment the len-bit code huff */ - incr = 1 << (len - 1); - while (huff & incr) { - incr >>= 1; - } - if (incr !== 0) { - huff &= incr - 1; - huff += incr; - } else { - huff = 0; - } - - /* go to next symbol, update count, len */ - sym++; - if (--count[len] === 0) { - if (len === max) { break; } - len = lens[lens_index + work[sym]]; - } - - /* create new sub-table if needed */ - if (len > root && (huff & mask) !== low) { - /* if first time, transition to sub-tables */ - if (drop === 0) { - drop = root; - } - - /* increment past last table */ - next += min; /* here min is 1 << curr */ - - /* determine length of next table */ - curr = len - drop; - left = 1 << curr; - while (curr + drop < max) { - left -= count[curr + drop]; - if (left <= 0) { break; } - curr++; - left <<= 1; - } - - /* check for enough space */ - used += 1 << curr; - if ((type === LENS && used > ENOUGH_LENS) || - (type === DISTS && used > ENOUGH_DISTS)) { - return 1; - } - - /* point entry in root table to sub-table */ - low = huff & mask; - /*table.op[low] = curr; - table.bits[low] = root; - table.val[low] = next - opts.table_index;*/ - table[low] = (root << 24) | (curr << 16) | (next - table_index) |0; - } - } - - /* fill in remaining table entry if code is incomplete (guaranteed to have - at most one remaining entry, since if the code is incomplete, the - maximum code length that was allowed to get this far is one bit) */ - if (huff !== 0) { - //table.op[next + huff] = 64; /* invalid code marker */ - //table.bits[next + huff] = len - drop; - //table.val[next + huff] = 0; - table[next + huff] = ((len - drop) << 24) | (64 << 16) |0; - } - - /* set return parameters */ - //opts.table_index += used; - opts.bits = root; - return 0; -}; - -},{"../utils/common":1}],10:[function(require,module,exports){ -'use strict'; - -module.exports = { - 2: 'need dictionary', /* Z_NEED_DICT 2 */ - 1: 'stream end', /* Z_STREAM_END 1 */ - 0: '', /* Z_OK 0 */ - '-1': 'file error', /* Z_ERRNO (-1) */ - '-2': 'stream error', /* Z_STREAM_ERROR (-2) */ - '-3': 'data error', /* Z_DATA_ERROR (-3) */ - '-4': 'insufficient memory', /* Z_MEM_ERROR (-4) */ - '-5': 'buffer error', /* Z_BUF_ERROR (-5) */ - '-6': 'incompatible version' /* Z_VERSION_ERROR (-6) */ -}; - -},{}],11:[function(require,module,exports){ -'use strict'; - - -function ZStream() { - /* next input byte */ - this.input = null; // JS specific, because we have no pointers - this.next_in = 0; - /* number of bytes available at input */ - this.avail_in = 0; - /* total number of input bytes read so far */ - this.total_in = 0; - /* next output byte should be put there */ - this.output = null; // JS specific, because we have no pointers - this.next_out = 0; - /* remaining free space at output */ - this.avail_out = 0; - /* total number of bytes output so far */ - this.total_out = 0; - /* last error message, NULL if no error */ - this.msg = ''/*Z_NULL*/; - /* not visible by applications */ - this.state = null; - /* best guess about the data type: binary or text */ - this.data_type = 2/*Z_UNKNOWN*/; - /* adler32 value of the uncompressed data */ - this.adler = 0; -} - -module.exports = ZStream; - -},{}],"/lib/inflate.js":[function(require,module,exports){ -'use strict'; - - -var zlib_inflate = require('./zlib/inflate'); -var utils = require('./utils/common'); -var strings = require('./utils/strings'); -var c = require('./zlib/constants'); -var msg = require('./zlib/messages'); -var ZStream = require('./zlib/zstream'); -var GZheader = require('./zlib/gzheader'); - -var toString = Object.prototype.toString; - -/** - * class Inflate - * - * Generic JS-style wrapper for zlib calls. If you don't need - * streaming behaviour - use more simple functions: [[inflate]] - * and [[inflateRaw]]. - **/ - -/* internal - * inflate.chunks -> Array - * - * Chunks of output data, if [[Inflate#onData]] not overriden. - **/ - -/** - * Inflate.result -> Uint8Array|Array|String - * - * Uncompressed result, generated by default [[Inflate#onData]] - * and [[Inflate#onEnd]] handlers. Filled after you push last chunk - * (call [[Inflate#push]] with `Z_FINISH` / `true` param) or if you - * push a chunk with explicit flush (call [[Inflate#push]] with - * `Z_SYNC_FLUSH` param). - **/ - -/** - * Inflate.err -> Number - * - * Error code after inflate finished. 0 (Z_OK) on success. - * Should be checked if broken data possible. - **/ - -/** - * Inflate.msg -> String - * - * Error message, if [[Inflate.err]] != 0 - **/ - - -/** - * new Inflate(options) - * - options (Object): zlib inflate options. - * - * Creates new inflator instance with specified params. Throws exception - * on bad params. Supported options: - * - * - `windowBits` - * - `dictionary` - * - * [http://zlib.net/manual.html#Advanced](http://zlib.net/manual.html#Advanced) - * for more information on these. - * - * Additional options, for internal needs: - * - * - `chunkSize` - size of generated data chunks (16K by default) - * - `raw` (Boolean) - do raw inflate - * - `to` (String) - if equal to 'string', then result will be converted - * from utf8 to utf16 (javascript) string. When string output requested, - * chunk length can differ from `chunkSize`, depending on content. - * - * By default, when no options set, autodetect deflate/gzip data format via - * wrapper header. - * - * ##### Example: - * - * ```javascript - * var pako = require('pako') - * , chunk1 = Uint8Array([1,2,3,4,5,6,7,8,9]) - * , chunk2 = Uint8Array([10,11,12,13,14,15,16,17,18,19]); - * - * var inflate = new pako.Inflate({ level: 3}); - * - * inflate.push(chunk1, false); - * inflate.push(chunk2, true); // true -> last chunk - * - * if (inflate.err) { throw new Error(inflate.err); } - * - * console.log(inflate.result); - * ``` - **/ -function Inflate(options) { - if (!(this instanceof Inflate)) return new Inflate(options); - - this.options = utils.assign({ - chunkSize: 16384, - windowBits: 0, - to: '' - }, options || {}); - - var opt = this.options; - - // Force window size for `raw` data, if not set directly, - // because we have no header for autodetect. - if (opt.raw && (opt.windowBits >= 0) && (opt.windowBits < 16)) { - opt.windowBits = -opt.windowBits; - if (opt.windowBits === 0) { opt.windowBits = -15; } - } - - // If `windowBits` not defined (and mode not raw) - set autodetect flag for gzip/deflate - if ((opt.windowBits >= 0) && (opt.windowBits < 16) && - !(options && options.windowBits)) { - opt.windowBits += 32; - } - - // Gzip header has no info about windows size, we can do autodetect only - // for deflate. So, if window size not set, force it to max when gzip possible - if ((opt.windowBits > 15) && (opt.windowBits < 48)) { - // bit 3 (16) -> gzipped data - // bit 4 (32) -> autodetect gzip/deflate - if ((opt.windowBits & 15) === 0) { - opt.windowBits |= 15; - } - } - - this.err = 0; // error code, if happens (0 = Z_OK) - this.msg = ''; // error message - this.ended = false; // used to avoid multiple onEnd() calls - this.chunks = []; // chunks of compressed data - - this.strm = new ZStream(); - this.strm.avail_out = 0; - - var status = zlib_inflate.inflateInit2( - this.strm, - opt.windowBits - ); - - if (status !== c.Z_OK) { - throw new Error(msg[status]); - } - - this.header = new GZheader(); - - zlib_inflate.inflateGetHeader(this.strm, this.header); -} - -/** - * Inflate#push(data[, mode]) -> Boolean - * - data (Uint8Array|Array|ArrayBuffer|String): input data - * - mode (Number|Boolean): 0..6 for corresponding Z_NO_FLUSH..Z_TREE modes. - * See constants. Skipped or `false` means Z_NO_FLUSH, `true` meansh Z_FINISH. - * - * Sends input data to inflate pipe, generating [[Inflate#onData]] calls with - * new output chunks. Returns `true` on success. The last data block must have - * mode Z_FINISH (or `true`). That will flush internal pending buffers and call - * [[Inflate#onEnd]]. For interim explicit flushes (without ending the stream) you - * can use mode Z_SYNC_FLUSH, keeping the decompression context. - * - * On fail call [[Inflate#onEnd]] with error code and return false. - * - * We strongly recommend to use `Uint8Array` on input for best speed (output - * format is detected automatically). Also, don't skip last param and always - * use the same type in your code (boolean or number). That will improve JS speed. - * - * For regular `Array`-s make sure all elements are [0..255]. - * - * ##### Example - * - * ```javascript - * push(chunk, false); // push one of data chunks - * ... - * push(chunk, true); // push last chunk - * ``` - **/ -Inflate.prototype.push = function (data, mode) { - var strm = this.strm; - var chunkSize = this.options.chunkSize; - var dictionary = this.options.dictionary; - var status, _mode; - var next_out_utf8, tail, utf8str; - var dict; - - // Flag to properly process Z_BUF_ERROR on testing inflate call - // when we check that all output data was flushed. - var allowBufError = false; - - if (this.ended) { return false; } - _mode = (mode === ~~mode) ? mode : ((mode === true) ? c.Z_FINISH : c.Z_NO_FLUSH); - - // Convert data if needed - if (typeof data === 'string') { - // Only binary strings can be decompressed on practice - strm.input = strings.binstring2buf(data); - } else if (toString.call(data) === '[object ArrayBuffer]') { - strm.input = new Uint8Array(data); - } else { - strm.input = data; - } - - strm.next_in = 0; - strm.avail_in = strm.input.length; - - do { - if (strm.avail_out === 0) { - strm.output = new utils.Buf8(chunkSize); - strm.next_out = 0; - strm.avail_out = chunkSize; - } - - status = zlib_inflate.inflate(strm, c.Z_NO_FLUSH); /* no bad return value */ - - if (status === c.Z_NEED_DICT && dictionary) { - // Convert data if needed - if (typeof dictionary === 'string') { - dict = strings.string2buf(dictionary); - } else if (toString.call(dictionary) === '[object ArrayBuffer]') { - dict = new Uint8Array(dictionary); - } else { - dict = dictionary; - } - - status = zlib_inflate.inflateSetDictionary(this.strm, dict); - - } - - if (status === c.Z_BUF_ERROR && allowBufError === true) { - status = c.Z_OK; - allowBufError = false; - } - - if (status !== c.Z_STREAM_END && status !== c.Z_OK) { - this.onEnd(status); - this.ended = true; - return false; - } - - if (strm.next_out) { - if (strm.avail_out === 0 || status === c.Z_STREAM_END || (strm.avail_in === 0 && (_mode === c.Z_FINISH || _mode === c.Z_SYNC_FLUSH))) { - - if (this.options.to === 'string') { - - next_out_utf8 = strings.utf8border(strm.output, strm.next_out); - - tail = strm.next_out - next_out_utf8; - utf8str = strings.buf2string(strm.output, next_out_utf8); - - // move tail - strm.next_out = tail; - strm.avail_out = chunkSize - tail; - if (tail) { utils.arraySet(strm.output, strm.output, next_out_utf8, tail, 0); } - - this.onData(utf8str); - - } else { - this.onData(utils.shrinkBuf(strm.output, strm.next_out)); - } - } - } - - // When no more input data, we should check that internal inflate buffers - // are flushed. The only way to do it when avail_out = 0 - run one more - // inflate pass. But if output data not exists, inflate return Z_BUF_ERROR. - // Here we set flag to process this error properly. - // - // NOTE. Deflate does not return error in this case and does not needs such - // logic. - if (strm.avail_in === 0 && strm.avail_out === 0) { - allowBufError = true; - } - - } while ((strm.avail_in > 0 || strm.avail_out === 0) && status !== c.Z_STREAM_END); - - if (status === c.Z_STREAM_END) { - _mode = c.Z_FINISH; - } - - // Finalize on the last chunk. - if (_mode === c.Z_FINISH) { - status = zlib_inflate.inflateEnd(this.strm); - this.onEnd(status); - this.ended = true; - return status === c.Z_OK; - } - - // callback interim results if Z_SYNC_FLUSH. - if (_mode === c.Z_SYNC_FLUSH) { - this.onEnd(c.Z_OK); - strm.avail_out = 0; - return true; - } - - return true; -}; - - -/** - * Inflate#onData(chunk) -> Void - * - chunk (Uint8Array|Array|String): ouput data. Type of array depends - * on js engine support. When string output requested, each chunk - * will be string. - * - * By default, stores data blocks in `chunks[]` property and glue - * those in `onEnd`. Override this handler, if you need another behaviour. - **/ -Inflate.prototype.onData = function (chunk) { - this.chunks.push(chunk); -}; - - -/** - * Inflate#onEnd(status) -> Void - * - status (Number): inflate status. 0 (Z_OK) on success, - * other if not. - * - * Called either after you tell inflate that the input stream is - * complete (Z_FINISH) or should be flushed (Z_SYNC_FLUSH) - * or if an error happened. By default - join collected chunks, - * free memory and fill `results` / `err` properties. - **/ -Inflate.prototype.onEnd = function (status) { - // On success - join - if (status === c.Z_OK) { - if (this.options.to === 'string') { - // Glue & convert here, until we teach pako to send - // utf8 alligned strings to onData - this.result = this.chunks.join(''); - } else { - this.result = utils.flattenChunks(this.chunks); - } - } - this.chunks = []; - this.err = status; - this.msg = this.strm.msg; -}; - - -/** - * inflate(data[, options]) -> Uint8Array|Array|String - * - data (Uint8Array|Array|String): input data to decompress. - * - options (Object): zlib inflate options. - * - * Decompress `data` with inflate/ungzip and `options`. Autodetect - * format via wrapper header by default. That's why we don't provide - * separate `ungzip` method. - * - * Supported options are: - * - * - windowBits - * - * [http://zlib.net/manual.html#Advanced](http://zlib.net/manual.html#Advanced) - * for more information. - * - * Sugar (options): - * - * - `raw` (Boolean) - say that we work with raw stream, if you don't wish to specify - * negative windowBits implicitly. - * - `to` (String) - if equal to 'string', then result will be converted - * from utf8 to utf16 (javascript) string. When string output requested, - * chunk length can differ from `chunkSize`, depending on content. - * - * - * ##### Example: - * - * ```javascript - * var pako = require('pako') - * , input = pako.deflate([1,2,3,4,5,6,7,8,9]) - * , output; - * - * try { - * output = pako.inflate(input); - * } catch (err) - * console.log(err); - * } - * ``` - **/ -function inflate(input, options) { - var inflator = new Inflate(options); - - inflator.push(input, true); - - // That will never happens, if you don't cheat with options :) - if (inflator.err) { throw inflator.msg; } - - return inflator.result; -} - - -/** - * inflateRaw(data[, options]) -> Uint8Array|Array|String - * - data (Uint8Array|Array|String): input data to decompress. - * - options (Object): zlib inflate options. - * - * The same as [[inflate]], but creates raw data, without wrapper - * (header and adler32 crc). - **/ -function inflateRaw(input, options) { - options = options || {}; - options.raw = true; - return inflate(input, options); -} - - -/** - * ungzip(data[, options]) -> Uint8Array|Array|String - * - data (Uint8Array|Array|String): input data to decompress. - * - options (Object): zlib inflate options. - * - * Just shortcut to [[inflate]], because it autodetects format - * by header.content. Done for convenience. - **/ - - -exports.Inflate = Inflate; -exports.inflate = inflate; -exports.inflateRaw = inflateRaw; -exports.ungzip = inflate; - -},{"./utils/common":1,"./utils/strings":2,"./zlib/constants":4,"./zlib/gzheader":6,"./zlib/inflate":8,"./zlib/messages":10,"./zlib/zstream":11}]},{},[])("/lib/inflate.js") -}); \ No newline at end of file diff --git a/node_modules/browserify/node_modules/browserify-zlib/node_modules/pako/dist/pako_inflate.min.js b/node_modules/browserify/node_modules/browserify-zlib/node_modules/pako/dist/pako_inflate.min.js deleted file mode 100644 index d423de90..00000000 --- a/node_modules/browserify/node_modules/browserify-zlib/node_modules/pako/dist/pako_inflate.min.js +++ /dev/null @@ -1,2 +0,0 @@ -/* pako 0.2.9 nodeca/pako */ -!function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var t;t="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,t.pako=e()}}(function(){return function e(t,i,n){function a(o,s){if(!i[o]){if(!t[o]){var f="function"==typeof require&&require;if(!s&&f)return f(o,!0);if(r)return r(o,!0);var l=new Error("Cannot find module '"+o+"'");throw l.code="MODULE_NOT_FOUND",l}var d=i[o]={exports:{}};t[o][0].call(d.exports,function(e){var i=t[o][1][e];return a(i?i:e)},d,d.exports,e,t,i,n)}return i[o].exports}for(var r="function"==typeof require&&require,o=0;o=252?6:f>=248?5:f>=240?4:f>=224?3:f>=192?2:1;s[254]=s[254]=1,i.string2buf=function(e){var t,i,n,r,o,s=e.length,f=0;for(r=0;r>>6,t[o++]=128|63&i):i<65536?(t[o++]=224|i>>>12,t[o++]=128|i>>>6&63,t[o++]=128|63&i):(t[o++]=240|i>>>18,t[o++]=128|i>>>12&63,t[o++]=128|i>>>6&63,t[o++]=128|63&i);return t},i.buf2binstring=function(e){return n(e,e.length)},i.binstring2buf=function(e){for(var t=new a.Buf8(e.length),i=0,n=t.length;i4)l[a++]=65533,i+=o-1;else{for(r&=2===o?31:3===o?15:7;o>1&&i1?l[a++]=65533:r<65536?l[a++]=r:(r-=65536,l[a++]=55296|r>>10&1023,l[a++]=56320|1023&r)}return n(l,a)},i.utf8border=function(e,t){var i;for(t=t||e.length,t>e.length&&(t=e.length),i=t-1;i>=0&&128===(192&e[i]);)i--;return i<0?t:0===i?t:i+s[e[i]]>t?i:t}},{"./common":1}],3:[function(e,t,i){"use strict";function n(e,t,i,n){for(var a=65535&e|0,r=e>>>16&65535|0,o=0;0!==i;){o=i>2e3?2e3:i,i-=o;do a=a+t[n++]|0,r=r+a|0;while(--o);a%=65521,r%=65521}return a|r<<16|0}t.exports=n},{}],4:[function(e,t,i){"use strict";t.exports={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8}},{}],5:[function(e,t,i){"use strict";function n(){for(var e,t=[],i=0;i<256;i++){e=i;for(var n=0;n<8;n++)e=1&e?3988292384^e>>>1:e>>>1;t[i]=e}return t}function a(e,t,i,n){var a=r,o=n+i;e^=-1;for(var s=n;s>>8^a[255&(e^t[s])];return e^-1}var r=n();t.exports=a},{}],6:[function(e,t,i){"use strict";function n(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1}t.exports=n},{}],7:[function(e,t,i){"use strict";var n=30,a=12;t.exports=function(e,t){var i,r,o,s,f,l,d,u,c,h,b,w,m,k,_,g,v,p,x,y,S,E,B,Z,A;i=e.state,r=e.next_in,Z=e.input,o=r+(e.avail_in-5),s=e.next_out,A=e.output,f=s-(t-e.avail_out),l=s+(e.avail_out-257),d=i.dmax,u=i.wsize,c=i.whave,h=i.wnext,b=i.window,w=i.hold,m=i.bits,k=i.lencode,_=i.distcode,g=(1<>>24,w>>>=x,m-=x,x=p>>>16&255,0===x)A[s++]=65535&p;else{if(!(16&x)){if(0===(64&x)){p=k[(65535&p)+(w&(1<>>=x,m-=x),m<15&&(w+=Z[r++]<>>24,w>>>=x,m-=x,x=p>>>16&255,!(16&x)){if(0===(64&x)){p=_[(65535&p)+(w&(1<d){e.msg="invalid distance too far back",i.mode=n;break e}if(w>>>=x,m-=x,x=s-f,S>x){if(x=S-x,x>c&&i.sane){e.msg="invalid distance too far back",i.mode=n;break e}if(E=0,B=b,0===h){if(E+=u-x,x2;)A[s++]=B[E++],A[s++]=B[E++],A[s++]=B[E++],y-=3;y&&(A[s++]=B[E++],y>1&&(A[s++]=B[E++]))}else{E=s-S;do A[s++]=A[E++],A[s++]=A[E++],A[s++]=A[E++],y-=3;while(y>2);y&&(A[s++]=A[E++],y>1&&(A[s++]=A[E++]))}break}}break}}while(r>3,r-=y,m-=y<<3,w&=(1<>>24&255)+(e>>>8&65280)+((65280&e)<<8)+((255&e)<<24)}function a(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new _.Buf16(320),this.work=new _.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function r(e){var t;return e&&e.state?(t=e.state,e.total_in=e.total_out=t.total=0,e.msg="",t.wrap&&(e.adler=1&t.wrap),t.mode=D,t.last=0,t.havedict=0,t.dmax=32768,t.head=null,t.hold=0,t.bits=0,t.lencode=t.lendyn=new _.Buf32(we),t.distcode=t.distdyn=new _.Buf32(me),t.sane=1,t.back=-1,z):C}function o(e){var t;return e&&e.state?(t=e.state,t.wsize=0,t.whave=0,t.wnext=0,r(e)):C}function s(e,t){var i,n;return e&&e.state?(n=e.state,t<0?(i=0,t=-t):(i=(t>>4)+1,t<48&&(t&=15)),t&&(t<8||t>15)?C:(null!==n.window&&n.wbits!==t&&(n.window=null),n.wrap=i,n.wbits=t,o(e))):C}function f(e,t){var i,n;return e?(n=new a,e.state=n,n.window=null,i=s(e,t),i!==z&&(e.state=null),i):C}function l(e){return f(e,_e)}function d(e){if(ge){var t;for(m=new _.Buf32(512),k=new _.Buf32(32),t=0;t<144;)e.lens[t++]=8;for(;t<256;)e.lens[t++]=9;for(;t<280;)e.lens[t++]=7;for(;t<288;)e.lens[t++]=8;for(x(S,e.lens,0,288,m,0,e.work,{bits:9}),t=0;t<32;)e.lens[t++]=5;x(E,e.lens,0,32,k,0,e.work,{bits:5}),ge=!1}e.lencode=m,e.lenbits=9,e.distcode=k,e.distbits=5}function u(e,t,i,n){var a,r=e.state;return null===r.window&&(r.wsize=1<=r.wsize?(_.arraySet(r.window,t,i-r.wsize,r.wsize,0),r.wnext=0,r.whave=r.wsize):(a=r.wsize-r.wnext,a>n&&(a=n),_.arraySet(r.window,t,i-n,a,r.wnext),n-=a,n?(_.arraySet(r.window,t,i-n,n,0),r.wnext=n,r.whave=r.wsize):(r.wnext+=a,r.wnext===r.wsize&&(r.wnext=0),r.whave>>8&255,i.check=v(i.check,Ze,2,0),c=0,h=0,i.mode=F;break}if(i.flags=0,i.head&&(i.head.done=!1),!(1&i.wrap)||(((255&c)<<8)+(c>>8))%31){e.msg="incorrect header check",i.mode=ce;break}if((15&c)!==U){e.msg="unknown compression method",i.mode=ce;break}if(c>>>=4,h-=4,xe=(15&c)+8,0===i.wbits)i.wbits=xe;else if(xe>i.wbits){e.msg="invalid window size",i.mode=ce;break}i.dmax=1<>8&1),512&i.flags&&(Ze[0]=255&c,Ze[1]=c>>>8&255,i.check=v(i.check,Ze,2,0)),c=0,h=0,i.mode=L;case L:for(;h<32;){if(0===f)break e;f--,c+=a[o++]<>>8&255,Ze[2]=c>>>16&255,Ze[3]=c>>>24&255,i.check=v(i.check,Ze,4,0)),c=0,h=0,i.mode=H;case H:for(;h<16;){if(0===f)break e;f--,c+=a[o++]<>8),512&i.flags&&(Ze[0]=255&c,Ze[1]=c>>>8&255,i.check=v(i.check,Ze,2,0)),c=0,h=0,i.mode=M;case M:if(1024&i.flags){for(;h<16;){if(0===f)break e;f--,c+=a[o++]<>>8&255,i.check=v(i.check,Ze,2,0)),c=0,h=0}else i.head&&(i.head.extra=null);i.mode=j;case j:if(1024&i.flags&&(m=i.length,m>f&&(m=f),m&&(i.head&&(xe=i.head.extra_len-i.length,i.head.extra||(i.head.extra=new Array(i.head.extra_len)),_.arraySet(i.head.extra,a,o,m,xe)),512&i.flags&&(i.check=v(i.check,a,m,o)),f-=m,o+=m,i.length-=m),i.length))break e;i.length=0,i.mode=K;case K:if(2048&i.flags){if(0===f)break e;m=0;do xe=a[o+m++],i.head&&xe&&i.length<65536&&(i.head.name+=String.fromCharCode(xe));while(xe&&m>9&1,i.head.done=!0),e.adler=i.check=0,i.mode=X;break;case q:for(;h<32;){if(0===f)break e;f--,c+=a[o++]<>>=7&h,h-=7&h,i.mode=le;break}for(;h<3;){if(0===f)break e;f--,c+=a[o++]<>>=1,h-=1,3&c){case 0:i.mode=J;break;case 1:if(d(i),i.mode=ie,t===A){c>>>=2,h-=2;break e}break;case 2:i.mode=$;break;case 3:e.msg="invalid block type",i.mode=ce}c>>>=2,h-=2;break;case J:for(c>>>=7&h,h-=7&h;h<32;){if(0===f)break e;f--,c+=a[o++]<>>16^65535)){e.msg="invalid stored block lengths",i.mode=ce;break}if(i.length=65535&c,c=0,h=0,i.mode=Q,t===A)break e;case Q:i.mode=V;case V:if(m=i.length){if(m>f&&(m=f),m>l&&(m=l),0===m)break e;_.arraySet(r,a,o,m,s),f-=m,o+=m,l-=m,s+=m,i.length-=m;break}i.mode=X;break;case $:for(;h<14;){if(0===f)break e;f--,c+=a[o++]<>>=5,h-=5,i.ndist=(31&c)+1,c>>>=5,h-=5,i.ncode=(15&c)+4,c>>>=4,h-=4,i.nlen>286||i.ndist>30){e.msg="too many length or distance symbols",i.mode=ce;break}i.have=0,i.mode=ee;case ee:for(;i.have>>=3,h-=3}for(;i.have<19;)i.lens[Ae[i.have++]]=0;if(i.lencode=i.lendyn,i.lenbits=7,Se={bits:i.lenbits},ye=x(y,i.lens,0,19,i.lencode,0,i.work,Se),i.lenbits=Se.bits,ye){e.msg="invalid code lengths set",i.mode=ce;break}i.have=0,i.mode=te;case te:for(;i.have>>24,ke=Be>>>16&255,_e=65535&Be,!(me<=h);){if(0===f)break e;f--,c+=a[o++]<>>=me,h-=me,i.lens[i.have++]=_e;else{if(16===_e){for(Ee=me+2;h>>=me,h-=me,0===i.have){e.msg="invalid bit length repeat",i.mode=ce;break}xe=i.lens[i.have-1],m=3+(3&c),c>>>=2,h-=2}else if(17===_e){for(Ee=me+3;h>>=me,h-=me,xe=0,m=3+(7&c),c>>>=3,h-=3}else{for(Ee=me+7;h>>=me,h-=me,xe=0,m=11+(127&c),c>>>=7,h-=7}if(i.have+m>i.nlen+i.ndist){e.msg="invalid bit length repeat",i.mode=ce;break}for(;m--;)i.lens[i.have++]=xe}}if(i.mode===ce)break;if(0===i.lens[256]){e.msg="invalid code -- missing end-of-block",i.mode=ce;break}if(i.lenbits=9,Se={bits:i.lenbits},ye=x(S,i.lens,0,i.nlen,i.lencode,0,i.work,Se),i.lenbits=Se.bits,ye){e.msg="invalid literal/lengths set",i.mode=ce;break}if(i.distbits=6,i.distcode=i.distdyn,Se={bits:i.distbits},ye=x(E,i.lens,i.nlen,i.ndist,i.distcode,0,i.work,Se),i.distbits=Se.bits,ye){e.msg="invalid distances set",i.mode=ce;break}if(i.mode=ie,t===A)break e;case ie:i.mode=ne;case ne:if(f>=6&&l>=258){e.next_out=s,e.avail_out=l,e.next_in=o,e.avail_in=f,i.hold=c,i.bits=h,p(e,w),s=e.next_out,r=e.output,l=e.avail_out,o=e.next_in,a=e.input,f=e.avail_in,c=i.hold,h=i.bits,i.mode===X&&(i.back=-1);break}for(i.back=0;Be=i.lencode[c&(1<>>24,ke=Be>>>16&255,_e=65535&Be,!(me<=h);){if(0===f)break e;f--,c+=a[o++]<>ge)],me=Be>>>24,ke=Be>>>16&255,_e=65535&Be,!(ge+me<=h);){if(0===f)break e;f--,c+=a[o++]<>>=ge,h-=ge,i.back+=ge}if(c>>>=me,h-=me,i.back+=me,i.length=_e,0===ke){i.mode=fe;break}if(32&ke){i.back=-1,i.mode=X;break}if(64&ke){e.msg="invalid literal/length code",i.mode=ce;break}i.extra=15&ke,i.mode=ae;case ae:if(i.extra){for(Ee=i.extra;h>>=i.extra,h-=i.extra,i.back+=i.extra}i.was=i.length,i.mode=re;case re:for(;Be=i.distcode[c&(1<>>24,ke=Be>>>16&255,_e=65535&Be,!(me<=h);){if(0===f)break e;f--,c+=a[o++]<>ge)],me=Be>>>24,ke=Be>>>16&255,_e=65535&Be,!(ge+me<=h);){if(0===f)break e;f--,c+=a[o++]<>>=ge,h-=ge,i.back+=ge}if(c>>>=me,h-=me,i.back+=me,64&ke){e.msg="invalid distance code",i.mode=ce;break}i.offset=_e,i.extra=15&ke,i.mode=oe;case oe:if(i.extra){for(Ee=i.extra;h>>=i.extra,h-=i.extra,i.back+=i.extra}if(i.offset>i.dmax){e.msg="invalid distance too far back",i.mode=ce;break}i.mode=se;case se:if(0===l)break e;if(m=w-l,i.offset>m){if(m=i.offset-m,m>i.whave&&i.sane){e.msg="invalid distance too far back",i.mode=ce;break}m>i.wnext?(m-=i.wnext,k=i.wsize-m):k=i.wnext-m,m>i.length&&(m=i.length),we=i.window}else we=r,k=s-i.offset,m=i.length;m>l&&(m=l),l-=m,i.length-=m;do r[s++]=we[k++];while(--m);0===i.length&&(i.mode=ne);break;case fe:if(0===l)break e;r[s++]=i.length,l--,i.mode=ne;break;case le:if(i.wrap){for(;h<32;){if(0===f)break e;f--,c|=a[o++]<=1&&0===M[C];C--);if(O>C&&(O=C),0===C)return w[m++]=20971520,w[m++]=20971520,_.bits=1,0;for(N=1;N0&&(e===s||1!==C))return-1;for(j[1]=0,z=1;zr||e===l&&D>o)return 1;for(var Y=0;;){Y++,E=z-T,k[R]S?(B=K[P+k[R]],Z=L[H+k[R]]):(B=96,Z=0),g=1<>T)+v]=E<<24|B<<16|Z|0;while(0!==v);for(g=1<>=1;if(0!==g?(F&=g-1,F+=g):F=0,R++,0===--M[z]){if(z===C)break;z=t[i+k[R]]}if(z>O&&(F&x)!==p){for(0===T&&(T=O),y+=N,I=z-T,U=1<r||e===l&&D>o)return 1;p=F&x,w[p]=O<<24|I<<16|y-m|0}}return 0!==F&&(w[y+F]=z-T<<24|64<<16|0),_.bits=O,0}},{"../utils/common":1}],10:[function(e,t,i){"use strict";t.exports={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"}},{}],11:[function(e,t,i){"use strict";function n(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}t.exports=n},{}],"/lib/inflate.js":[function(e,t,i){"use strict";function n(e){if(!(this instanceof n))return new n(e);this.options=s.assign({chunkSize:16384,windowBits:0,to:""},e||{});var t=this.options;t.raw&&t.windowBits>=0&&t.windowBits<16&&(t.windowBits=-t.windowBits,0===t.windowBits&&(t.windowBits=-15)),!(t.windowBits>=0&&t.windowBits<16)||e&&e.windowBits||(t.windowBits+=32),t.windowBits>15&&t.windowBits<48&&0===(15&t.windowBits)&&(t.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new u,this.strm.avail_out=0;var i=o.inflateInit2(this.strm,t.windowBits);if(i!==l.Z_OK)throw new Error(d[i]);this.header=new c,o.inflateGetHeader(this.strm,this.header)}function a(e,t){var i=new n(t);if(i.push(e,!0),i.err)throw i.msg;return i.result}function r(e,t){return t=t||{},t.raw=!0,a(e,t)}var o=e("./zlib/inflate"),s=e("./utils/common"),f=e("./utils/strings"),l=e("./zlib/constants"),d=e("./zlib/messages"),u=e("./zlib/zstream"),c=e("./zlib/gzheader"),h=Object.prototype.toString;n.prototype.push=function(e,t){var i,n,a,r,d,u,c=this.strm,b=this.options.chunkSize,w=this.options.dictionary,m=!1;if(this.ended)return!1;n=t===~~t?t:t===!0?l.Z_FINISH:l.Z_NO_FLUSH,"string"==typeof e?c.input=f.binstring2buf(e):"[object ArrayBuffer]"===h.call(e)?c.input=new Uint8Array(e):c.input=e,c.next_in=0,c.avail_in=c.input.length;do{if(0===c.avail_out&&(c.output=new s.Buf8(b),c.next_out=0,c.avail_out=b),i=o.inflate(c,l.Z_NO_FLUSH),i===l.Z_NEED_DICT&&w&&(u="string"==typeof w?f.string2buf(w):"[object ArrayBuffer]"===h.call(w)?new Uint8Array(w):w,i=o.inflateSetDictionary(this.strm,u)),i===l.Z_BUF_ERROR&&m===!0&&(i=l.Z_OK,m=!1),i!==l.Z_STREAM_END&&i!==l.Z_OK)return this.onEnd(i),this.ended=!0,!1;c.next_out&&(0!==c.avail_out&&i!==l.Z_STREAM_END&&(0!==c.avail_in||n!==l.Z_FINISH&&n!==l.Z_SYNC_FLUSH)||("string"===this.options.to?(a=f.utf8border(c.output,c.next_out),r=c.next_out-a,d=f.buf2string(c.output,a),c.next_out=r,c.avail_out=b-r,r&&s.arraySet(c.output,c.output,a,r,0),this.onData(d)):this.onData(s.shrinkBuf(c.output,c.next_out)))),0===c.avail_in&&0===c.avail_out&&(m=!0)}while((c.avail_in>0||0===c.avail_out)&&i!==l.Z_STREAM_END);return i===l.Z_STREAM_END&&(n=l.Z_FINISH),n===l.Z_FINISH?(i=o.inflateEnd(this.strm),this.onEnd(i),this.ended=!0,i===l.Z_OK):n!==l.Z_SYNC_FLUSH||(this.onEnd(l.Z_OK),c.avail_out=0,!0)},n.prototype.onData=function(e){this.chunks.push(e)},n.prototype.onEnd=function(e){e===l.Z_OK&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=s.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg},i.Inflate=n,i.inflate=a,i.inflateRaw=r,i.ungzip=a},{"./utils/common":1,"./utils/strings":2,"./zlib/constants":4,"./zlib/gzheader":6,"./zlib/inflate":8,"./zlib/messages":10,"./zlib/zstream":11}]},{},[])("/lib/inflate.js")}); diff --git a/node_modules/browserify/node_modules/browserify-zlib/node_modules/pako/index.js b/node_modules/browserify/node_modules/browserify-zlib/node_modules/pako/index.js deleted file mode 100644 index cd072515..00000000 --- a/node_modules/browserify/node_modules/browserify-zlib/node_modules/pako/index.js +++ /dev/null @@ -1,14 +0,0 @@ -// Top level file is just a mixin of submodules & constants -'use strict'; - -var assign = require('./lib/utils/common').assign; - -var deflate = require('./lib/deflate'); -var inflate = require('./lib/inflate'); -var constants = require('./lib/zlib/constants'); - -var pako = {}; - -assign(pako, deflate, inflate, constants); - -module.exports = pako; diff --git a/node_modules/browserify/node_modules/browserify-zlib/node_modules/pako/lib/deflate.js b/node_modules/browserify/node_modules/browserify-zlib/node_modules/pako/lib/deflate.js deleted file mode 100644 index 11040d4e..00000000 --- a/node_modules/browserify/node_modules/browserify-zlib/node_modules/pako/lib/deflate.js +++ /dev/null @@ -1,400 +0,0 @@ -'use strict'; - - -var zlib_deflate = require('./zlib/deflate'); -var utils = require('./utils/common'); -var strings = require('./utils/strings'); -var msg = require('./zlib/messages'); -var ZStream = require('./zlib/zstream'); - -var toString = Object.prototype.toString; - -/* Public constants ==========================================================*/ -/* ===========================================================================*/ - -var Z_NO_FLUSH = 0; -var Z_FINISH = 4; - -var Z_OK = 0; -var Z_STREAM_END = 1; -var Z_SYNC_FLUSH = 2; - -var Z_DEFAULT_COMPRESSION = -1; - -var Z_DEFAULT_STRATEGY = 0; - -var Z_DEFLATED = 8; - -/* ===========================================================================*/ - - -/** - * class Deflate - * - * Generic JS-style wrapper for zlib calls. If you don't need - * streaming behaviour - use more simple functions: [[deflate]], - * [[deflateRaw]] and [[gzip]]. - **/ - -/* internal - * Deflate.chunks -> Array - * - * Chunks of output data, if [[Deflate#onData]] not overriden. - **/ - -/** - * Deflate.result -> Uint8Array|Array - * - * Compressed result, generated by default [[Deflate#onData]] - * and [[Deflate#onEnd]] handlers. Filled after you push last chunk - * (call [[Deflate#push]] with `Z_FINISH` / `true` param) or if you - * push a chunk with explicit flush (call [[Deflate#push]] with - * `Z_SYNC_FLUSH` param). - **/ - -/** - * Deflate.err -> Number - * - * Error code after deflate finished. 0 (Z_OK) on success. - * You will not need it in real life, because deflate errors - * are possible only on wrong options or bad `onData` / `onEnd` - * custom handlers. - **/ - -/** - * Deflate.msg -> String - * - * Error message, if [[Deflate.err]] != 0 - **/ - - -/** - * new Deflate(options) - * - options (Object): zlib deflate options. - * - * Creates new deflator instance with specified params. Throws exception - * on bad params. Supported options: - * - * - `level` - * - `windowBits` - * - `memLevel` - * - `strategy` - * - `dictionary` - * - * [http://zlib.net/manual.html#Advanced](http://zlib.net/manual.html#Advanced) - * for more information on these. - * - * Additional options, for internal needs: - * - * - `chunkSize` - size of generated data chunks (16K by default) - * - `raw` (Boolean) - do raw deflate - * - `gzip` (Boolean) - create gzip wrapper - * - `to` (String) - if equal to 'string', then result will be "binary string" - * (each char code [0..255]) - * - `header` (Object) - custom header for gzip - * - `text` (Boolean) - true if compressed data believed to be text - * - `time` (Number) - modification time, unix timestamp - * - `os` (Number) - operation system code - * - `extra` (Array) - array of bytes with extra data (max 65536) - * - `name` (String) - file name (binary string) - * - `comment` (String) - comment (binary string) - * - `hcrc` (Boolean) - true if header crc should be added - * - * ##### Example: - * - * ```javascript - * var pako = require('pako') - * , chunk1 = Uint8Array([1,2,3,4,5,6,7,8,9]) - * , chunk2 = Uint8Array([10,11,12,13,14,15,16,17,18,19]); - * - * var deflate = new pako.Deflate({ level: 3}); - * - * deflate.push(chunk1, false); - * deflate.push(chunk2, true); // true -> last chunk - * - * if (deflate.err) { throw new Error(deflate.err); } - * - * console.log(deflate.result); - * ``` - **/ -function Deflate(options) { - if (!(this instanceof Deflate)) return new Deflate(options); - - this.options = utils.assign({ - level: Z_DEFAULT_COMPRESSION, - method: Z_DEFLATED, - chunkSize: 16384, - windowBits: 15, - memLevel: 8, - strategy: Z_DEFAULT_STRATEGY, - to: '' - }, options || {}); - - var opt = this.options; - - if (opt.raw && (opt.windowBits > 0)) { - opt.windowBits = -opt.windowBits; - } - - else if (opt.gzip && (opt.windowBits > 0) && (opt.windowBits < 16)) { - opt.windowBits += 16; - } - - this.err = 0; // error code, if happens (0 = Z_OK) - this.msg = ''; // error message - this.ended = false; // used to avoid multiple onEnd() calls - this.chunks = []; // chunks of compressed data - - this.strm = new ZStream(); - this.strm.avail_out = 0; - - var status = zlib_deflate.deflateInit2( - this.strm, - opt.level, - opt.method, - opt.windowBits, - opt.memLevel, - opt.strategy - ); - - if (status !== Z_OK) { - throw new Error(msg[status]); - } - - if (opt.header) { - zlib_deflate.deflateSetHeader(this.strm, opt.header); - } - - if (opt.dictionary) { - var dict; - // Convert data if needed - if (typeof opt.dictionary === 'string') { - // If we need to compress text, change encoding to utf8. - dict = strings.string2buf(opt.dictionary); - } else if (toString.call(opt.dictionary) === '[object ArrayBuffer]') { - dict = new Uint8Array(opt.dictionary); - } else { - dict = opt.dictionary; - } - - status = zlib_deflate.deflateSetDictionary(this.strm, dict); - - if (status !== Z_OK) { - throw new Error(msg[status]); - } - - this._dict_set = true; - } -} - -/** - * Deflate#push(data[, mode]) -> Boolean - * - data (Uint8Array|Array|ArrayBuffer|String): input data. Strings will be - * converted to utf8 byte sequence. - * - mode (Number|Boolean): 0..6 for corresponding Z_NO_FLUSH..Z_TREE modes. - * See constants. Skipped or `false` means Z_NO_FLUSH, `true` meansh Z_FINISH. - * - * Sends input data to deflate pipe, generating [[Deflate#onData]] calls with - * new compressed chunks. Returns `true` on success. The last data block must have - * mode Z_FINISH (or `true`). That will flush internal pending buffers and call - * [[Deflate#onEnd]]. For interim explicit flushes (without ending the stream) you - * can use mode Z_SYNC_FLUSH, keeping the compression context. - * - * On fail call [[Deflate#onEnd]] with error code and return false. - * - * We strongly recommend to use `Uint8Array` on input for best speed (output - * array format is detected automatically). Also, don't skip last param and always - * use the same type in your code (boolean or number). That will improve JS speed. - * - * For regular `Array`-s make sure all elements are [0..255]. - * - * ##### Example - * - * ```javascript - * push(chunk, false); // push one of data chunks - * ... - * push(chunk, true); // push last chunk - * ``` - **/ -Deflate.prototype.push = function (data, mode) { - var strm = this.strm; - var chunkSize = this.options.chunkSize; - var status, _mode; - - if (this.ended) { return false; } - - _mode = (mode === ~~mode) ? mode : ((mode === true) ? Z_FINISH : Z_NO_FLUSH); - - // Convert data if needed - if (typeof data === 'string') { - // If we need to compress text, change encoding to utf8. - strm.input = strings.string2buf(data); - } else if (toString.call(data) === '[object ArrayBuffer]') { - strm.input = new Uint8Array(data); - } else { - strm.input = data; - } - - strm.next_in = 0; - strm.avail_in = strm.input.length; - - do { - if (strm.avail_out === 0) { - strm.output = new utils.Buf8(chunkSize); - strm.next_out = 0; - strm.avail_out = chunkSize; - } - status = zlib_deflate.deflate(strm, _mode); /* no bad return value */ - - if (status !== Z_STREAM_END && status !== Z_OK) { - this.onEnd(status); - this.ended = true; - return false; - } - if (strm.avail_out === 0 || (strm.avail_in === 0 && (_mode === Z_FINISH || _mode === Z_SYNC_FLUSH))) { - if (this.options.to === 'string') { - this.onData(strings.buf2binstring(utils.shrinkBuf(strm.output, strm.next_out))); - } else { - this.onData(utils.shrinkBuf(strm.output, strm.next_out)); - } - } - } while ((strm.avail_in > 0 || strm.avail_out === 0) && status !== Z_STREAM_END); - - // Finalize on the last chunk. - if (_mode === Z_FINISH) { - status = zlib_deflate.deflateEnd(this.strm); - this.onEnd(status); - this.ended = true; - return status === Z_OK; - } - - // callback interim results if Z_SYNC_FLUSH. - if (_mode === Z_SYNC_FLUSH) { - this.onEnd(Z_OK); - strm.avail_out = 0; - return true; - } - - return true; -}; - - -/** - * Deflate#onData(chunk) -> Void - * - chunk (Uint8Array|Array|String): ouput data. Type of array depends - * on js engine support. When string output requested, each chunk - * will be string. - * - * By default, stores data blocks in `chunks[]` property and glue - * those in `onEnd`. Override this handler, if you need another behaviour. - **/ -Deflate.prototype.onData = function (chunk) { - this.chunks.push(chunk); -}; - - -/** - * Deflate#onEnd(status) -> Void - * - status (Number): deflate status. 0 (Z_OK) on success, - * other if not. - * - * Called once after you tell deflate that the input stream is - * complete (Z_FINISH) or should be flushed (Z_SYNC_FLUSH) - * or if an error happened. By default - join collected chunks, - * free memory and fill `results` / `err` properties. - **/ -Deflate.prototype.onEnd = function (status) { - // On success - join - if (status === Z_OK) { - if (this.options.to === 'string') { - this.result = this.chunks.join(''); - } else { - this.result = utils.flattenChunks(this.chunks); - } - } - this.chunks = []; - this.err = status; - this.msg = this.strm.msg; -}; - - -/** - * deflate(data[, options]) -> Uint8Array|Array|String - * - data (Uint8Array|Array|String): input data to compress. - * - options (Object): zlib deflate options. - * - * Compress `data` with deflate algorithm and `options`. - * - * Supported options are: - * - * - level - * - windowBits - * - memLevel - * - strategy - * - dictionary - * - * [http://zlib.net/manual.html#Advanced](http://zlib.net/manual.html#Advanced) - * for more information on these. - * - * Sugar (options): - * - * - `raw` (Boolean) - say that we work with raw stream, if you don't wish to specify - * negative windowBits implicitly. - * - `to` (String) - if equal to 'string', then result will be "binary string" - * (each char code [0..255]) - * - * ##### Example: - * - * ```javascript - * var pako = require('pako') - * , data = Uint8Array([1,2,3,4,5,6,7,8,9]); - * - * console.log(pako.deflate(data)); - * ``` - **/ -function deflate(input, options) { - var deflator = new Deflate(options); - - deflator.push(input, true); - - // That will never happens, if you don't cheat with options :) - if (deflator.err) { throw deflator.msg; } - - return deflator.result; -} - - -/** - * deflateRaw(data[, options]) -> Uint8Array|Array|String - * - data (Uint8Array|Array|String): input data to compress. - * - options (Object): zlib deflate options. - * - * The same as [[deflate]], but creates raw data, without wrapper - * (header and adler32 crc). - **/ -function deflateRaw(input, options) { - options = options || {}; - options.raw = true; - return deflate(input, options); -} - - -/** - * gzip(data[, options]) -> Uint8Array|Array|String - * - data (Uint8Array|Array|String): input data to compress. - * - options (Object): zlib deflate options. - * - * The same as [[deflate]], but create gzip wrapper instead of - * deflate one. - **/ -function gzip(input, options) { - options = options || {}; - options.gzip = true; - return deflate(input, options); -} - - -exports.Deflate = Deflate; -exports.deflate = deflate; -exports.deflateRaw = deflateRaw; -exports.gzip = gzip; diff --git a/node_modules/browserify/node_modules/browserify-zlib/node_modules/pako/lib/inflate.js b/node_modules/browserify/node_modules/browserify-zlib/node_modules/pako/lib/inflate.js deleted file mode 100644 index 0ed4999d..00000000 --- a/node_modules/browserify/node_modules/browserify-zlib/node_modules/pako/lib/inflate.js +++ /dev/null @@ -1,418 +0,0 @@ -'use strict'; - - -var zlib_inflate = require('./zlib/inflate'); -var utils = require('./utils/common'); -var strings = require('./utils/strings'); -var c = require('./zlib/constants'); -var msg = require('./zlib/messages'); -var ZStream = require('./zlib/zstream'); -var GZheader = require('./zlib/gzheader'); - -var toString = Object.prototype.toString; - -/** - * class Inflate - * - * Generic JS-style wrapper for zlib calls. If you don't need - * streaming behaviour - use more simple functions: [[inflate]] - * and [[inflateRaw]]. - **/ - -/* internal - * inflate.chunks -> Array - * - * Chunks of output data, if [[Inflate#onData]] not overriden. - **/ - -/** - * Inflate.result -> Uint8Array|Array|String - * - * Uncompressed result, generated by default [[Inflate#onData]] - * and [[Inflate#onEnd]] handlers. Filled after you push last chunk - * (call [[Inflate#push]] with `Z_FINISH` / `true` param) or if you - * push a chunk with explicit flush (call [[Inflate#push]] with - * `Z_SYNC_FLUSH` param). - **/ - -/** - * Inflate.err -> Number - * - * Error code after inflate finished. 0 (Z_OK) on success. - * Should be checked if broken data possible. - **/ - -/** - * Inflate.msg -> String - * - * Error message, if [[Inflate.err]] != 0 - **/ - - -/** - * new Inflate(options) - * - options (Object): zlib inflate options. - * - * Creates new inflator instance with specified params. Throws exception - * on bad params. Supported options: - * - * - `windowBits` - * - `dictionary` - * - * [http://zlib.net/manual.html#Advanced](http://zlib.net/manual.html#Advanced) - * for more information on these. - * - * Additional options, for internal needs: - * - * - `chunkSize` - size of generated data chunks (16K by default) - * - `raw` (Boolean) - do raw inflate - * - `to` (String) - if equal to 'string', then result will be converted - * from utf8 to utf16 (javascript) string. When string output requested, - * chunk length can differ from `chunkSize`, depending on content. - * - * By default, when no options set, autodetect deflate/gzip data format via - * wrapper header. - * - * ##### Example: - * - * ```javascript - * var pako = require('pako') - * , chunk1 = Uint8Array([1,2,3,4,5,6,7,8,9]) - * , chunk2 = Uint8Array([10,11,12,13,14,15,16,17,18,19]); - * - * var inflate = new pako.Inflate({ level: 3}); - * - * inflate.push(chunk1, false); - * inflate.push(chunk2, true); // true -> last chunk - * - * if (inflate.err) { throw new Error(inflate.err); } - * - * console.log(inflate.result); - * ``` - **/ -function Inflate(options) { - if (!(this instanceof Inflate)) return new Inflate(options); - - this.options = utils.assign({ - chunkSize: 16384, - windowBits: 0, - to: '' - }, options || {}); - - var opt = this.options; - - // Force window size for `raw` data, if not set directly, - // because we have no header for autodetect. - if (opt.raw && (opt.windowBits >= 0) && (opt.windowBits < 16)) { - opt.windowBits = -opt.windowBits; - if (opt.windowBits === 0) { opt.windowBits = -15; } - } - - // If `windowBits` not defined (and mode not raw) - set autodetect flag for gzip/deflate - if ((opt.windowBits >= 0) && (opt.windowBits < 16) && - !(options && options.windowBits)) { - opt.windowBits += 32; - } - - // Gzip header has no info about windows size, we can do autodetect only - // for deflate. So, if window size not set, force it to max when gzip possible - if ((opt.windowBits > 15) && (opt.windowBits < 48)) { - // bit 3 (16) -> gzipped data - // bit 4 (32) -> autodetect gzip/deflate - if ((opt.windowBits & 15) === 0) { - opt.windowBits |= 15; - } - } - - this.err = 0; // error code, if happens (0 = Z_OK) - this.msg = ''; // error message - this.ended = false; // used to avoid multiple onEnd() calls - this.chunks = []; // chunks of compressed data - - this.strm = new ZStream(); - this.strm.avail_out = 0; - - var status = zlib_inflate.inflateInit2( - this.strm, - opt.windowBits - ); - - if (status !== c.Z_OK) { - throw new Error(msg[status]); - } - - this.header = new GZheader(); - - zlib_inflate.inflateGetHeader(this.strm, this.header); -} - -/** - * Inflate#push(data[, mode]) -> Boolean - * - data (Uint8Array|Array|ArrayBuffer|String): input data - * - mode (Number|Boolean): 0..6 for corresponding Z_NO_FLUSH..Z_TREE modes. - * See constants. Skipped or `false` means Z_NO_FLUSH, `true` meansh Z_FINISH. - * - * Sends input data to inflate pipe, generating [[Inflate#onData]] calls with - * new output chunks. Returns `true` on success. The last data block must have - * mode Z_FINISH (or `true`). That will flush internal pending buffers and call - * [[Inflate#onEnd]]. For interim explicit flushes (without ending the stream) you - * can use mode Z_SYNC_FLUSH, keeping the decompression context. - * - * On fail call [[Inflate#onEnd]] with error code and return false. - * - * We strongly recommend to use `Uint8Array` on input for best speed (output - * format is detected automatically). Also, don't skip last param and always - * use the same type in your code (boolean or number). That will improve JS speed. - * - * For regular `Array`-s make sure all elements are [0..255]. - * - * ##### Example - * - * ```javascript - * push(chunk, false); // push one of data chunks - * ... - * push(chunk, true); // push last chunk - * ``` - **/ -Inflate.prototype.push = function (data, mode) { - var strm = this.strm; - var chunkSize = this.options.chunkSize; - var dictionary = this.options.dictionary; - var status, _mode; - var next_out_utf8, tail, utf8str; - var dict; - - // Flag to properly process Z_BUF_ERROR on testing inflate call - // when we check that all output data was flushed. - var allowBufError = false; - - if (this.ended) { return false; } - _mode = (mode === ~~mode) ? mode : ((mode === true) ? c.Z_FINISH : c.Z_NO_FLUSH); - - // Convert data if needed - if (typeof data === 'string') { - // Only binary strings can be decompressed on practice - strm.input = strings.binstring2buf(data); - } else if (toString.call(data) === '[object ArrayBuffer]') { - strm.input = new Uint8Array(data); - } else { - strm.input = data; - } - - strm.next_in = 0; - strm.avail_in = strm.input.length; - - do { - if (strm.avail_out === 0) { - strm.output = new utils.Buf8(chunkSize); - strm.next_out = 0; - strm.avail_out = chunkSize; - } - - status = zlib_inflate.inflate(strm, c.Z_NO_FLUSH); /* no bad return value */ - - if (status === c.Z_NEED_DICT && dictionary) { - // Convert data if needed - if (typeof dictionary === 'string') { - dict = strings.string2buf(dictionary); - } else if (toString.call(dictionary) === '[object ArrayBuffer]') { - dict = new Uint8Array(dictionary); - } else { - dict = dictionary; - } - - status = zlib_inflate.inflateSetDictionary(this.strm, dict); - - } - - if (status === c.Z_BUF_ERROR && allowBufError === true) { - status = c.Z_OK; - allowBufError = false; - } - - if (status !== c.Z_STREAM_END && status !== c.Z_OK) { - this.onEnd(status); - this.ended = true; - return false; - } - - if (strm.next_out) { - if (strm.avail_out === 0 || status === c.Z_STREAM_END || (strm.avail_in === 0 && (_mode === c.Z_FINISH || _mode === c.Z_SYNC_FLUSH))) { - - if (this.options.to === 'string') { - - next_out_utf8 = strings.utf8border(strm.output, strm.next_out); - - tail = strm.next_out - next_out_utf8; - utf8str = strings.buf2string(strm.output, next_out_utf8); - - // move tail - strm.next_out = tail; - strm.avail_out = chunkSize - tail; - if (tail) { utils.arraySet(strm.output, strm.output, next_out_utf8, tail, 0); } - - this.onData(utf8str); - - } else { - this.onData(utils.shrinkBuf(strm.output, strm.next_out)); - } - } - } - - // When no more input data, we should check that internal inflate buffers - // are flushed. The only way to do it when avail_out = 0 - run one more - // inflate pass. But if output data not exists, inflate return Z_BUF_ERROR. - // Here we set flag to process this error properly. - // - // NOTE. Deflate does not return error in this case and does not needs such - // logic. - if (strm.avail_in === 0 && strm.avail_out === 0) { - allowBufError = true; - } - - } while ((strm.avail_in > 0 || strm.avail_out === 0) && status !== c.Z_STREAM_END); - - if (status === c.Z_STREAM_END) { - _mode = c.Z_FINISH; - } - - // Finalize on the last chunk. - if (_mode === c.Z_FINISH) { - status = zlib_inflate.inflateEnd(this.strm); - this.onEnd(status); - this.ended = true; - return status === c.Z_OK; - } - - // callback interim results if Z_SYNC_FLUSH. - if (_mode === c.Z_SYNC_FLUSH) { - this.onEnd(c.Z_OK); - strm.avail_out = 0; - return true; - } - - return true; -}; - - -/** - * Inflate#onData(chunk) -> Void - * - chunk (Uint8Array|Array|String): ouput data. Type of array depends - * on js engine support. When string output requested, each chunk - * will be string. - * - * By default, stores data blocks in `chunks[]` property and glue - * those in `onEnd`. Override this handler, if you need another behaviour. - **/ -Inflate.prototype.onData = function (chunk) { - this.chunks.push(chunk); -}; - - -/** - * Inflate#onEnd(status) -> Void - * - status (Number): inflate status. 0 (Z_OK) on success, - * other if not. - * - * Called either after you tell inflate that the input stream is - * complete (Z_FINISH) or should be flushed (Z_SYNC_FLUSH) - * or if an error happened. By default - join collected chunks, - * free memory and fill `results` / `err` properties. - **/ -Inflate.prototype.onEnd = function (status) { - // On success - join - if (status === c.Z_OK) { - if (this.options.to === 'string') { - // Glue & convert here, until we teach pako to send - // utf8 alligned strings to onData - this.result = this.chunks.join(''); - } else { - this.result = utils.flattenChunks(this.chunks); - } - } - this.chunks = []; - this.err = status; - this.msg = this.strm.msg; -}; - - -/** - * inflate(data[, options]) -> Uint8Array|Array|String - * - data (Uint8Array|Array|String): input data to decompress. - * - options (Object): zlib inflate options. - * - * Decompress `data` with inflate/ungzip and `options`. Autodetect - * format via wrapper header by default. That's why we don't provide - * separate `ungzip` method. - * - * Supported options are: - * - * - windowBits - * - * [http://zlib.net/manual.html#Advanced](http://zlib.net/manual.html#Advanced) - * for more information. - * - * Sugar (options): - * - * - `raw` (Boolean) - say that we work with raw stream, if you don't wish to specify - * negative windowBits implicitly. - * - `to` (String) - if equal to 'string', then result will be converted - * from utf8 to utf16 (javascript) string. When string output requested, - * chunk length can differ from `chunkSize`, depending on content. - * - * - * ##### Example: - * - * ```javascript - * var pako = require('pako') - * , input = pako.deflate([1,2,3,4,5,6,7,8,9]) - * , output; - * - * try { - * output = pako.inflate(input); - * } catch (err) - * console.log(err); - * } - * ``` - **/ -function inflate(input, options) { - var inflator = new Inflate(options); - - inflator.push(input, true); - - // That will never happens, if you don't cheat with options :) - if (inflator.err) { throw inflator.msg; } - - return inflator.result; -} - - -/** - * inflateRaw(data[, options]) -> Uint8Array|Array|String - * - data (Uint8Array|Array|String): input data to decompress. - * - options (Object): zlib inflate options. - * - * The same as [[inflate]], but creates raw data, without wrapper - * (header and adler32 crc). - **/ -function inflateRaw(input, options) { - options = options || {}; - options.raw = true; - return inflate(input, options); -} - - -/** - * ungzip(data[, options]) -> Uint8Array|Array|String - * - data (Uint8Array|Array|String): input data to decompress. - * - options (Object): zlib inflate options. - * - * Just shortcut to [[inflate]], because it autodetects format - * by header.content. Done for convenience. - **/ - - -exports.Inflate = Inflate; -exports.inflate = inflate; -exports.inflateRaw = inflateRaw; -exports.ungzip = inflate; diff --git a/node_modules/browserify/node_modules/browserify-zlib/node_modules/pako/lib/utils/common.js b/node_modules/browserify/node_modules/browserify-zlib/node_modules/pako/lib/utils/common.js deleted file mode 100644 index 1e159fec..00000000 --- a/node_modules/browserify/node_modules/browserify-zlib/node_modules/pako/lib/utils/common.js +++ /dev/null @@ -1,102 +0,0 @@ -'use strict'; - - -var TYPED_OK = (typeof Uint8Array !== 'undefined') && - (typeof Uint16Array !== 'undefined') && - (typeof Int32Array !== 'undefined'); - - -exports.assign = function (obj /*from1, from2, from3, ...*/) { - var sources = Array.prototype.slice.call(arguments, 1); - while (sources.length) { - var source = sources.shift(); - if (!source) { continue; } - - if (typeof source !== 'object') { - throw new TypeError(source + 'must be non-object'); - } - - for (var p in source) { - if (source.hasOwnProperty(p)) { - obj[p] = source[p]; - } - } - } - - return obj; -}; - - -// reduce buffer size, avoiding mem copy -exports.shrinkBuf = function (buf, size) { - if (buf.length === size) { return buf; } - if (buf.subarray) { return buf.subarray(0, size); } - buf.length = size; - return buf; -}; - - -var fnTyped = { - arraySet: function (dest, src, src_offs, len, dest_offs) { - if (src.subarray && dest.subarray) { - dest.set(src.subarray(src_offs, src_offs + len), dest_offs); - return; - } - // Fallback to ordinary array - for (var i = 0; i < len; i++) { - dest[dest_offs + i] = src[src_offs + i]; - } - }, - // Join array of chunks to single array. - flattenChunks: function (chunks) { - var i, l, len, pos, chunk, result; - - // calculate data length - len = 0; - for (i = 0, l = chunks.length; i < l; i++) { - len += chunks[i].length; - } - - // join chunks - result = new Uint8Array(len); - pos = 0; - for (i = 0, l = chunks.length; i < l; i++) { - chunk = chunks[i]; - result.set(chunk, pos); - pos += chunk.length; - } - - return result; - } -}; - -var fnUntyped = { - arraySet: function (dest, src, src_offs, len, dest_offs) { - for (var i = 0; i < len; i++) { - dest[dest_offs + i] = src[src_offs + i]; - } - }, - // Join array of chunks to single array. - flattenChunks: function (chunks) { - return [].concat.apply([], chunks); - } -}; - - -// Enable/Disable typed arrays use, for testing -// -exports.setTyped = function (on) { - if (on) { - exports.Buf8 = Uint8Array; - exports.Buf16 = Uint16Array; - exports.Buf32 = Int32Array; - exports.assign(exports, fnTyped); - } else { - exports.Buf8 = Array; - exports.Buf16 = Array; - exports.Buf32 = Array; - exports.assign(exports, fnUntyped); - } -}; - -exports.setTyped(TYPED_OK); diff --git a/node_modules/browserify/node_modules/browserify-zlib/node_modules/pako/lib/utils/strings.js b/node_modules/browserify/node_modules/browserify-zlib/node_modules/pako/lib/utils/strings.js deleted file mode 100644 index 1a0499c3..00000000 --- a/node_modules/browserify/node_modules/browserify-zlib/node_modules/pako/lib/utils/strings.js +++ /dev/null @@ -1,185 +0,0 @@ -// String encode/decode helpers -'use strict'; - - -var utils = require('./common'); - - -// Quick check if we can use fast array to bin string conversion -// -// - apply(Array) can fail on Android 2.2 -// - apply(Uint8Array) can fail on iOS 5.1 Safary -// -var STR_APPLY_OK = true; -var STR_APPLY_UIA_OK = true; - -try { String.fromCharCode.apply(null, [ 0 ]); } catch (__) { STR_APPLY_OK = false; } -try { String.fromCharCode.apply(null, new Uint8Array(1)); } catch (__) { STR_APPLY_UIA_OK = false; } - - -// Table with utf8 lengths (calculated by first byte of sequence) -// Note, that 5 & 6-byte values and some 4-byte values can not be represented in JS, -// because max possible codepoint is 0x10ffff -var _utf8len = new utils.Buf8(256); -for (var q = 0; q < 256; q++) { - _utf8len[q] = (q >= 252 ? 6 : q >= 248 ? 5 : q >= 240 ? 4 : q >= 224 ? 3 : q >= 192 ? 2 : 1); -} -_utf8len[254] = _utf8len[254] = 1; // Invalid sequence start - - -// convert string to array (typed, when possible) -exports.string2buf = function (str) { - var buf, c, c2, m_pos, i, str_len = str.length, buf_len = 0; - - // count binary size - for (m_pos = 0; m_pos < str_len; m_pos++) { - c = str.charCodeAt(m_pos); - if ((c & 0xfc00) === 0xd800 && (m_pos + 1 < str_len)) { - c2 = str.charCodeAt(m_pos + 1); - if ((c2 & 0xfc00) === 0xdc00) { - c = 0x10000 + ((c - 0xd800) << 10) + (c2 - 0xdc00); - m_pos++; - } - } - buf_len += c < 0x80 ? 1 : c < 0x800 ? 2 : c < 0x10000 ? 3 : 4; - } - - // allocate buffer - buf = new utils.Buf8(buf_len); - - // convert - for (i = 0, m_pos = 0; i < buf_len; m_pos++) { - c = str.charCodeAt(m_pos); - if ((c & 0xfc00) === 0xd800 && (m_pos + 1 < str_len)) { - c2 = str.charCodeAt(m_pos + 1); - if ((c2 & 0xfc00) === 0xdc00) { - c = 0x10000 + ((c - 0xd800) << 10) + (c2 - 0xdc00); - m_pos++; - } - } - if (c < 0x80) { - /* one byte */ - buf[i++] = c; - } else if (c < 0x800) { - /* two bytes */ - buf[i++] = 0xC0 | (c >>> 6); - buf[i++] = 0x80 | (c & 0x3f); - } else if (c < 0x10000) { - /* three bytes */ - buf[i++] = 0xE0 | (c >>> 12); - buf[i++] = 0x80 | (c >>> 6 & 0x3f); - buf[i++] = 0x80 | (c & 0x3f); - } else { - /* four bytes */ - buf[i++] = 0xf0 | (c >>> 18); - buf[i++] = 0x80 | (c >>> 12 & 0x3f); - buf[i++] = 0x80 | (c >>> 6 & 0x3f); - buf[i++] = 0x80 | (c & 0x3f); - } - } - - return buf; -}; - -// Helper (used in 2 places) -function buf2binstring(buf, len) { - // use fallback for big arrays to avoid stack overflow - if (len < 65537) { - if ((buf.subarray && STR_APPLY_UIA_OK) || (!buf.subarray && STR_APPLY_OK)) { - return String.fromCharCode.apply(null, utils.shrinkBuf(buf, len)); - } - } - - var result = ''; - for (var i = 0; i < len; i++) { - result += String.fromCharCode(buf[i]); - } - return result; -} - - -// Convert byte array to binary string -exports.buf2binstring = function (buf) { - return buf2binstring(buf, buf.length); -}; - - -// Convert binary string (typed, when possible) -exports.binstring2buf = function (str) { - var buf = new utils.Buf8(str.length); - for (var i = 0, len = buf.length; i < len; i++) { - buf[i] = str.charCodeAt(i); - } - return buf; -}; - - -// convert array to string -exports.buf2string = function (buf, max) { - var i, out, c, c_len; - var len = max || buf.length; - - // Reserve max possible length (2 words per char) - // NB: by unknown reasons, Array is significantly faster for - // String.fromCharCode.apply than Uint16Array. - var utf16buf = new Array(len * 2); - - for (out = 0, i = 0; i < len;) { - c = buf[i++]; - // quick process ascii - if (c < 0x80) { utf16buf[out++] = c; continue; } - - c_len = _utf8len[c]; - // skip 5 & 6 byte codes - if (c_len > 4) { utf16buf[out++] = 0xfffd; i += c_len - 1; continue; } - - // apply mask on first byte - c &= c_len === 2 ? 0x1f : c_len === 3 ? 0x0f : 0x07; - // join the rest - while (c_len > 1 && i < len) { - c = (c << 6) | (buf[i++] & 0x3f); - c_len--; - } - - // terminated by end of string? - if (c_len > 1) { utf16buf[out++] = 0xfffd; continue; } - - if (c < 0x10000) { - utf16buf[out++] = c; - } else { - c -= 0x10000; - utf16buf[out++] = 0xd800 | ((c >> 10) & 0x3ff); - utf16buf[out++] = 0xdc00 | (c & 0x3ff); - } - } - - return buf2binstring(utf16buf, out); -}; - - -// Calculate max possible position in utf8 buffer, -// that will not break sequence. If that's not possible -// - (very small limits) return max size as is. -// -// buf[] - utf8 bytes array -// max - length limit (mandatory); -exports.utf8border = function (buf, max) { - var pos; - - max = max || buf.length; - if (max > buf.length) { max = buf.length; } - - // go back from last position, until start of sequence found - pos = max - 1; - while (pos >= 0 && (buf[pos] & 0xC0) === 0x80) { pos--; } - - // Fuckup - very small and broken sequence, - // return max, because we should return something anyway. - if (pos < 0) { return max; } - - // If we came to start of buffer - that means vuffer is too small, - // return max too. - if (pos === 0) { return max; } - - return (pos + _utf8len[buf[pos]] > max) ? pos : max; -}; diff --git a/node_modules/browserify/node_modules/browserify-zlib/node_modules/pako/lib/zlib/adler32.js b/node_modules/browserify/node_modules/browserify-zlib/node_modules/pako/lib/zlib/adler32.js deleted file mode 100644 index dcefe937..00000000 --- a/node_modules/browserify/node_modules/browserify-zlib/node_modules/pako/lib/zlib/adler32.js +++ /dev/null @@ -1,32 +0,0 @@ -'use strict'; - -// Note: adler32 takes 12% for level 0 and 2% for level 6. -// It doesn't worth to make additional optimizationa as in original. -// Small size is preferable. - -function adler32(adler, buf, len, pos) { - var s1 = (adler & 0xffff) |0, - s2 = ((adler >>> 16) & 0xffff) |0, - n = 0; - - while (len !== 0) { - // Set limit ~ twice less than 5552, to keep - // s2 in 31-bits, because we force signed ints. - // in other case %= will fail. - n = len > 2000 ? 2000 : len; - len -= n; - - do { - s1 = (s1 + buf[pos++]) |0; - s2 = (s2 + s1) |0; - } while (--n); - - s1 %= 65521; - s2 %= 65521; - } - - return (s1 | (s2 << 16)) |0; -} - - -module.exports = adler32; diff --git a/node_modules/browserify/node_modules/browserify-zlib/node_modules/pako/lib/zlib/constants.js b/node_modules/browserify/node_modules/browserify-zlib/node_modules/pako/lib/zlib/constants.js deleted file mode 100644 index ece67001..00000000 --- a/node_modules/browserify/node_modules/browserify-zlib/node_modules/pako/lib/zlib/constants.js +++ /dev/null @@ -1,50 +0,0 @@ -'use strict'; - - -module.exports = { - - /* Allowed flush values; see deflate() and inflate() below for details */ - Z_NO_FLUSH: 0, - Z_PARTIAL_FLUSH: 1, - Z_SYNC_FLUSH: 2, - Z_FULL_FLUSH: 3, - Z_FINISH: 4, - Z_BLOCK: 5, - Z_TREES: 6, - - /* Return codes for the compression/decompression functions. Negative values - * are errors, positive values are used for special but normal events. - */ - Z_OK: 0, - Z_STREAM_END: 1, - Z_NEED_DICT: 2, - Z_ERRNO: -1, - Z_STREAM_ERROR: -2, - Z_DATA_ERROR: -3, - //Z_MEM_ERROR: -4, - Z_BUF_ERROR: -5, - //Z_VERSION_ERROR: -6, - - /* compression levels */ - Z_NO_COMPRESSION: 0, - Z_BEST_SPEED: 1, - Z_BEST_COMPRESSION: 9, - Z_DEFAULT_COMPRESSION: -1, - - - Z_FILTERED: 1, - Z_HUFFMAN_ONLY: 2, - Z_RLE: 3, - Z_FIXED: 4, - Z_DEFAULT_STRATEGY: 0, - - /* Possible values of the data_type field (though see inflate()) */ - Z_BINARY: 0, - Z_TEXT: 1, - //Z_ASCII: 1, // = Z_TEXT (deprecated) - Z_UNKNOWN: 2, - - /* The deflate compression method */ - Z_DEFLATED: 8 - //Z_NULL: null // Use -1 or null inline, depending on var type -}; diff --git a/node_modules/browserify/node_modules/browserify-zlib/node_modules/pako/lib/zlib/crc32.js b/node_modules/browserify/node_modules/browserify-zlib/node_modules/pako/lib/zlib/crc32.js deleted file mode 100644 index 0768b1c3..00000000 --- a/node_modules/browserify/node_modules/browserify-zlib/node_modules/pako/lib/zlib/crc32.js +++ /dev/null @@ -1,41 +0,0 @@ -'use strict'; - -// Note: we can't get significant speed boost here. -// So write code to minimize size - no pregenerated tables -// and array tools dependencies. - - -// Use ordinary array, since untyped makes no boost here -function makeTable() { - var c, table = []; - - for (var n = 0; n < 256; n++) { - c = n; - for (var k = 0; k < 8; k++) { - c = ((c & 1) ? (0xEDB88320 ^ (c >>> 1)) : (c >>> 1)); - } - table[n] = c; - } - - return table; -} - -// Create table on load. Just 255 signed longs. Not a problem. -var crcTable = makeTable(); - - -function crc32(crc, buf, len, pos) { - var t = crcTable, - end = pos + len; - - crc ^= -1; - - for (var i = pos; i < end; i++) { - crc = (crc >>> 8) ^ t[(crc ^ buf[i]) & 0xFF]; - } - - return (crc ^ (-1)); // >>> 0; -} - - -module.exports = crc32; diff --git a/node_modules/browserify/node_modules/browserify-zlib/node_modules/pako/lib/zlib/deflate.js b/node_modules/browserify/node_modules/browserify-zlib/node_modules/pako/lib/zlib/deflate.js deleted file mode 100644 index e461fb8b..00000000 --- a/node_modules/browserify/node_modules/browserify-zlib/node_modules/pako/lib/zlib/deflate.js +++ /dev/null @@ -1,1855 +0,0 @@ -'use strict'; - -var utils = require('../utils/common'); -var trees = require('./trees'); -var adler32 = require('./adler32'); -var crc32 = require('./crc32'); -var msg = require('./messages'); - -/* Public constants ==========================================================*/ -/* ===========================================================================*/ - - -/* Allowed flush values; see deflate() and inflate() below for details */ -var Z_NO_FLUSH = 0; -var Z_PARTIAL_FLUSH = 1; -//var Z_SYNC_FLUSH = 2; -var Z_FULL_FLUSH = 3; -var Z_FINISH = 4; -var Z_BLOCK = 5; -//var Z_TREES = 6; - - -/* Return codes for the compression/decompression functions. Negative values - * are errors, positive values are used for special but normal events. - */ -var Z_OK = 0; -var Z_STREAM_END = 1; -//var Z_NEED_DICT = 2; -//var Z_ERRNO = -1; -var Z_STREAM_ERROR = -2; -var Z_DATA_ERROR = -3; -//var Z_MEM_ERROR = -4; -var Z_BUF_ERROR = -5; -//var Z_VERSION_ERROR = -6; - - -/* compression levels */ -//var Z_NO_COMPRESSION = 0; -//var Z_BEST_SPEED = 1; -//var Z_BEST_COMPRESSION = 9; -var Z_DEFAULT_COMPRESSION = -1; - - -var Z_FILTERED = 1; -var Z_HUFFMAN_ONLY = 2; -var Z_RLE = 3; -var Z_FIXED = 4; -var Z_DEFAULT_STRATEGY = 0; - -/* Possible values of the data_type field (though see inflate()) */ -//var Z_BINARY = 0; -//var Z_TEXT = 1; -//var Z_ASCII = 1; // = Z_TEXT -var Z_UNKNOWN = 2; - - -/* The deflate compression method */ -var Z_DEFLATED = 8; - -/*============================================================================*/ - - -var MAX_MEM_LEVEL = 9; -/* Maximum value for memLevel in deflateInit2 */ -var MAX_WBITS = 15; -/* 32K LZ77 window */ -var DEF_MEM_LEVEL = 8; - - -var LENGTH_CODES = 29; -/* number of length codes, not counting the special END_BLOCK code */ -var LITERALS = 256; -/* number of literal bytes 0..255 */ -var L_CODES = LITERALS + 1 + LENGTH_CODES; -/* number of Literal or Length codes, including the END_BLOCK code */ -var D_CODES = 30; -/* number of distance codes */ -var BL_CODES = 19; -/* number of codes used to transfer the bit lengths */ -var HEAP_SIZE = 2 * L_CODES + 1; -/* maximum heap size */ -var MAX_BITS = 15; -/* All codes must not exceed MAX_BITS bits */ - -var MIN_MATCH = 3; -var MAX_MATCH = 258; -var MIN_LOOKAHEAD = (MAX_MATCH + MIN_MATCH + 1); - -var PRESET_DICT = 0x20; - -var INIT_STATE = 42; -var EXTRA_STATE = 69; -var NAME_STATE = 73; -var COMMENT_STATE = 91; -var HCRC_STATE = 103; -var BUSY_STATE = 113; -var FINISH_STATE = 666; - -var BS_NEED_MORE = 1; /* block not completed, need more input or more output */ -var BS_BLOCK_DONE = 2; /* block flush performed */ -var BS_FINISH_STARTED = 3; /* finish started, need only more output at next deflate */ -var BS_FINISH_DONE = 4; /* finish done, accept no more input or output */ - -var OS_CODE = 0x03; // Unix :) . Don't detect, use this default. - -function err(strm, errorCode) { - strm.msg = msg[errorCode]; - return errorCode; -} - -function rank(f) { - return ((f) << 1) - ((f) > 4 ? 9 : 0); -} - -function zero(buf) { var len = buf.length; while (--len >= 0) { buf[len] = 0; } } - - -/* ========================================================================= - * Flush as much pending output as possible. All deflate() output goes - * through this function so some applications may wish to modify it - * to avoid allocating a large strm->output buffer and copying into it. - * (See also read_buf()). - */ -function flush_pending(strm) { - var s = strm.state; - - //_tr_flush_bits(s); - var len = s.pending; - if (len > strm.avail_out) { - len = strm.avail_out; - } - if (len === 0) { return; } - - utils.arraySet(strm.output, s.pending_buf, s.pending_out, len, strm.next_out); - strm.next_out += len; - s.pending_out += len; - strm.total_out += len; - strm.avail_out -= len; - s.pending -= len; - if (s.pending === 0) { - s.pending_out = 0; - } -} - - -function flush_block_only(s, last) { - trees._tr_flush_block(s, (s.block_start >= 0 ? s.block_start : -1), s.strstart - s.block_start, last); - s.block_start = s.strstart; - flush_pending(s.strm); -} - - -function put_byte(s, b) { - s.pending_buf[s.pending++] = b; -} - - -/* ========================================================================= - * Put a short in the pending buffer. The 16-bit value is put in MSB order. - * IN assertion: the stream state is correct and there is enough room in - * pending_buf. - */ -function putShortMSB(s, b) { -// put_byte(s, (Byte)(b >> 8)); -// put_byte(s, (Byte)(b & 0xff)); - s.pending_buf[s.pending++] = (b >>> 8) & 0xff; - s.pending_buf[s.pending++] = b & 0xff; -} - - -/* =========================================================================== - * Read a new buffer from the current input stream, update the adler32 - * and total number of bytes read. All deflate() input goes through - * this function so some applications may wish to modify it to avoid - * allocating a large strm->input buffer and copying from it. - * (See also flush_pending()). - */ -function read_buf(strm, buf, start, size) { - var len = strm.avail_in; - - if (len > size) { len = size; } - if (len === 0) { return 0; } - - strm.avail_in -= len; - - // zmemcpy(buf, strm->next_in, len); - utils.arraySet(buf, strm.input, strm.next_in, len, start); - if (strm.state.wrap === 1) { - strm.adler = adler32(strm.adler, buf, len, start); - } - - else if (strm.state.wrap === 2) { - strm.adler = crc32(strm.adler, buf, len, start); - } - - strm.next_in += len; - strm.total_in += len; - - return len; -} - - -/* =========================================================================== - * Set match_start to the longest match starting at the given string and - * return its length. Matches shorter or equal to prev_length are discarded, - * in which case the result is equal to prev_length and match_start is - * garbage. - * IN assertions: cur_match is the head of the hash chain for the current - * string (strstart) and its distance is <= MAX_DIST, and prev_length >= 1 - * OUT assertion: the match length is not greater than s->lookahead. - */ -function longest_match(s, cur_match) { - var chain_length = s.max_chain_length; /* max hash chain length */ - var scan = s.strstart; /* current string */ - var match; /* matched string */ - var len; /* length of current match */ - var best_len = s.prev_length; /* best match length so far */ - var nice_match = s.nice_match; /* stop if match long enough */ - var limit = (s.strstart > (s.w_size - MIN_LOOKAHEAD)) ? - s.strstart - (s.w_size - MIN_LOOKAHEAD) : 0/*NIL*/; - - var _win = s.window; // shortcut - - var wmask = s.w_mask; - var prev = s.prev; - - /* Stop when cur_match becomes <= limit. To simplify the code, - * we prevent matches with the string of window index 0. - */ - - var strend = s.strstart + MAX_MATCH; - var scan_end1 = _win[scan + best_len - 1]; - var scan_end = _win[scan + best_len]; - - /* The code is optimized for HASH_BITS >= 8 and MAX_MATCH-2 multiple of 16. - * It is easy to get rid of this optimization if necessary. - */ - // Assert(s->hash_bits >= 8 && MAX_MATCH == 258, "Code too clever"); - - /* Do not waste too much time if we already have a good match: */ - if (s.prev_length >= s.good_match) { - chain_length >>= 2; - } - /* Do not look for matches beyond the end of the input. This is necessary - * to make deflate deterministic. - */ - if (nice_match > s.lookahead) { nice_match = s.lookahead; } - - // Assert((ulg)s->strstart <= s->window_size-MIN_LOOKAHEAD, "need lookahead"); - - do { - // Assert(cur_match < s->strstart, "no future"); - match = cur_match; - - /* Skip to next match if the match length cannot increase - * or if the match length is less than 2. Note that the checks below - * for insufficient lookahead only occur occasionally for performance - * reasons. Therefore uninitialized memory will be accessed, and - * conditional jumps will be made that depend on those values. - * However the length of the match is limited to the lookahead, so - * the output of deflate is not affected by the uninitialized values. - */ - - if (_win[match + best_len] !== scan_end || - _win[match + best_len - 1] !== scan_end1 || - _win[match] !== _win[scan] || - _win[++match] !== _win[scan + 1]) { - continue; - } - - /* The check at best_len-1 can be removed because it will be made - * again later. (This heuristic is not always a win.) - * It is not necessary to compare scan[2] and match[2] since they - * are always equal when the other bytes match, given that - * the hash keys are equal and that HASH_BITS >= 8. - */ - scan += 2; - match++; - // Assert(*scan == *match, "match[2]?"); - - /* We check for insufficient lookahead only every 8th comparison; - * the 256th check will be made at strstart+258. - */ - do { - /*jshint noempty:false*/ - } while (_win[++scan] === _win[++match] && _win[++scan] === _win[++match] && - _win[++scan] === _win[++match] && _win[++scan] === _win[++match] && - _win[++scan] === _win[++match] && _win[++scan] === _win[++match] && - _win[++scan] === _win[++match] && _win[++scan] === _win[++match] && - scan < strend); - - // Assert(scan <= s->window+(unsigned)(s->window_size-1), "wild scan"); - - len = MAX_MATCH - (strend - scan); - scan = strend - MAX_MATCH; - - if (len > best_len) { - s.match_start = cur_match; - best_len = len; - if (len >= nice_match) { - break; - } - scan_end1 = _win[scan + best_len - 1]; - scan_end = _win[scan + best_len]; - } - } while ((cur_match = prev[cur_match & wmask]) > limit && --chain_length !== 0); - - if (best_len <= s.lookahead) { - return best_len; - } - return s.lookahead; -} - - -/* =========================================================================== - * Fill the window when the lookahead becomes insufficient. - * Updates strstart and lookahead. - * - * IN assertion: lookahead < MIN_LOOKAHEAD - * OUT assertions: strstart <= window_size-MIN_LOOKAHEAD - * At least one byte has been read, or avail_in == 0; reads are - * performed for at least two bytes (required for the zip translate_eol - * option -- not supported here). - */ -function fill_window(s) { - var _w_size = s.w_size; - var p, n, m, more, str; - - //Assert(s->lookahead < MIN_LOOKAHEAD, "already enough lookahead"); - - do { - more = s.window_size - s.lookahead - s.strstart; - - // JS ints have 32 bit, block below not needed - /* Deal with !@#$% 64K limit: */ - //if (sizeof(int) <= 2) { - // if (more == 0 && s->strstart == 0 && s->lookahead == 0) { - // more = wsize; - // - // } else if (more == (unsigned)(-1)) { - // /* Very unlikely, but possible on 16 bit machine if - // * strstart == 0 && lookahead == 1 (input done a byte at time) - // */ - // more--; - // } - //} - - - /* If the window is almost full and there is insufficient lookahead, - * move the upper half to the lower one to make room in the upper half. - */ - if (s.strstart >= _w_size + (_w_size - MIN_LOOKAHEAD)) { - - utils.arraySet(s.window, s.window, _w_size, _w_size, 0); - s.match_start -= _w_size; - s.strstart -= _w_size; - /* we now have strstart >= MAX_DIST */ - s.block_start -= _w_size; - - /* Slide the hash table (could be avoided with 32 bit values - at the expense of memory usage). We slide even when level == 0 - to keep the hash table consistent if we switch back to level > 0 - later. (Using level 0 permanently is not an optimal usage of - zlib, so we don't care about this pathological case.) - */ - - n = s.hash_size; - p = n; - do { - m = s.head[--p]; - s.head[p] = (m >= _w_size ? m - _w_size : 0); - } while (--n); - - n = _w_size; - p = n; - do { - m = s.prev[--p]; - s.prev[p] = (m >= _w_size ? m - _w_size : 0); - /* If n is not on any hash chain, prev[n] is garbage but - * its value will never be used. - */ - } while (--n); - - more += _w_size; - } - if (s.strm.avail_in === 0) { - break; - } - - /* If there was no sliding: - * strstart <= WSIZE+MAX_DIST-1 && lookahead <= MIN_LOOKAHEAD - 1 && - * more == window_size - lookahead - strstart - * => more >= window_size - (MIN_LOOKAHEAD-1 + WSIZE + MAX_DIST-1) - * => more >= window_size - 2*WSIZE + 2 - * In the BIG_MEM or MMAP case (not yet supported), - * window_size == input_size + MIN_LOOKAHEAD && - * strstart + s->lookahead <= input_size => more >= MIN_LOOKAHEAD. - * Otherwise, window_size == 2*WSIZE so more >= 2. - * If there was sliding, more >= WSIZE. So in all cases, more >= 2. - */ - //Assert(more >= 2, "more < 2"); - n = read_buf(s.strm, s.window, s.strstart + s.lookahead, more); - s.lookahead += n; - - /* Initialize the hash value now that we have some input: */ - if (s.lookahead + s.insert >= MIN_MATCH) { - str = s.strstart - s.insert; - s.ins_h = s.window[str]; - - /* UPDATE_HASH(s, s->ins_h, s->window[str + 1]); */ - s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[str + 1]) & s.hash_mask; -//#if MIN_MATCH != 3 -// Call update_hash() MIN_MATCH-3 more times -//#endif - while (s.insert) { - /* UPDATE_HASH(s, s->ins_h, s->window[str + MIN_MATCH-1]); */ - s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[str + MIN_MATCH - 1]) & s.hash_mask; - - s.prev[str & s.w_mask] = s.head[s.ins_h]; - s.head[s.ins_h] = str; - str++; - s.insert--; - if (s.lookahead + s.insert < MIN_MATCH) { - break; - } - } - } - /* If the whole input has less than MIN_MATCH bytes, ins_h is garbage, - * but this is not important since only literal bytes will be emitted. - */ - - } while (s.lookahead < MIN_LOOKAHEAD && s.strm.avail_in !== 0); - - /* If the WIN_INIT bytes after the end of the current data have never been - * written, then zero those bytes in order to avoid memory check reports of - * the use of uninitialized (or uninitialised as Julian writes) bytes by - * the longest match routines. Update the high water mark for the next - * time through here. WIN_INIT is set to MAX_MATCH since the longest match - * routines allow scanning to strstart + MAX_MATCH, ignoring lookahead. - */ -// if (s.high_water < s.window_size) { -// var curr = s.strstart + s.lookahead; -// var init = 0; -// -// if (s.high_water < curr) { -// /* Previous high water mark below current data -- zero WIN_INIT -// * bytes or up to end of window, whichever is less. -// */ -// init = s.window_size - curr; -// if (init > WIN_INIT) -// init = WIN_INIT; -// zmemzero(s->window + curr, (unsigned)init); -// s->high_water = curr + init; -// } -// else if (s->high_water < (ulg)curr + WIN_INIT) { -// /* High water mark at or above current data, but below current data -// * plus WIN_INIT -- zero out to current data plus WIN_INIT, or up -// * to end of window, whichever is less. -// */ -// init = (ulg)curr + WIN_INIT - s->high_water; -// if (init > s->window_size - s->high_water) -// init = s->window_size - s->high_water; -// zmemzero(s->window + s->high_water, (unsigned)init); -// s->high_water += init; -// } -// } -// -// Assert((ulg)s->strstart <= s->window_size - MIN_LOOKAHEAD, -// "not enough room for search"); -} - -/* =========================================================================== - * Copy without compression as much as possible from the input stream, return - * the current block state. - * This function does not insert new strings in the dictionary since - * uncompressible data is probably not useful. This function is used - * only for the level=0 compression option. - * NOTE: this function should be optimized to avoid extra copying from - * window to pending_buf. - */ -function deflate_stored(s, flush) { - /* Stored blocks are limited to 0xffff bytes, pending_buf is limited - * to pending_buf_size, and each stored block has a 5 byte header: - */ - var max_block_size = 0xffff; - - if (max_block_size > s.pending_buf_size - 5) { - max_block_size = s.pending_buf_size - 5; - } - - /* Copy as much as possible from input to output: */ - for (;;) { - /* Fill the window as much as possible: */ - if (s.lookahead <= 1) { - - //Assert(s->strstart < s->w_size+MAX_DIST(s) || - // s->block_start >= (long)s->w_size, "slide too late"); -// if (!(s.strstart < s.w_size + (s.w_size - MIN_LOOKAHEAD) || -// s.block_start >= s.w_size)) { -// throw new Error("slide too late"); -// } - - fill_window(s); - if (s.lookahead === 0 && flush === Z_NO_FLUSH) { - return BS_NEED_MORE; - } - - if (s.lookahead === 0) { - break; - } - /* flush the current block */ - } - //Assert(s->block_start >= 0L, "block gone"); -// if (s.block_start < 0) throw new Error("block gone"); - - s.strstart += s.lookahead; - s.lookahead = 0; - - /* Emit a stored block if pending_buf will be full: */ - var max_start = s.block_start + max_block_size; - - if (s.strstart === 0 || s.strstart >= max_start) { - /* strstart == 0 is possible when wraparound on 16-bit machine */ - s.lookahead = s.strstart - max_start; - s.strstart = max_start; - /*** FLUSH_BLOCK(s, 0); ***/ - flush_block_only(s, false); - if (s.strm.avail_out === 0) { - return BS_NEED_MORE; - } - /***/ - - - } - /* Flush if we may have to slide, otherwise block_start may become - * negative and the data will be gone: - */ - if (s.strstart - s.block_start >= (s.w_size - MIN_LOOKAHEAD)) { - /*** FLUSH_BLOCK(s, 0); ***/ - flush_block_only(s, false); - if (s.strm.avail_out === 0) { - return BS_NEED_MORE; - } - /***/ - } - } - - s.insert = 0; - - if (flush === Z_FINISH) { - /*** FLUSH_BLOCK(s, 1); ***/ - flush_block_only(s, true); - if (s.strm.avail_out === 0) { - return BS_FINISH_STARTED; - } - /***/ - return BS_FINISH_DONE; - } - - if (s.strstart > s.block_start) { - /*** FLUSH_BLOCK(s, 0); ***/ - flush_block_only(s, false); - if (s.strm.avail_out === 0) { - return BS_NEED_MORE; - } - /***/ - } - - return BS_NEED_MORE; -} - -/* =========================================================================== - * Compress as much as possible from the input stream, return the current - * block state. - * This function does not perform lazy evaluation of matches and inserts - * new strings in the dictionary only for unmatched strings or for short - * matches. It is used only for the fast compression options. - */ -function deflate_fast(s, flush) { - var hash_head; /* head of the hash chain */ - var bflush; /* set if current block must be flushed */ - - for (;;) { - /* Make sure that we always have enough lookahead, except - * at the end of the input file. We need MAX_MATCH bytes - * for the next match, plus MIN_MATCH bytes to insert the - * string following the next match. - */ - if (s.lookahead < MIN_LOOKAHEAD) { - fill_window(s); - if (s.lookahead < MIN_LOOKAHEAD && flush === Z_NO_FLUSH) { - return BS_NEED_MORE; - } - if (s.lookahead === 0) { - break; /* flush the current block */ - } - } - - /* Insert the string window[strstart .. strstart+2] in the - * dictionary, and set hash_head to the head of the hash chain: - */ - hash_head = 0/*NIL*/; - if (s.lookahead >= MIN_MATCH) { - /*** INSERT_STRING(s, s.strstart, hash_head); ***/ - s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[s.strstart + MIN_MATCH - 1]) & s.hash_mask; - hash_head = s.prev[s.strstart & s.w_mask] = s.head[s.ins_h]; - s.head[s.ins_h] = s.strstart; - /***/ - } - - /* Find the longest match, discarding those <= prev_length. - * At this point we have always match_length < MIN_MATCH - */ - if (hash_head !== 0/*NIL*/ && ((s.strstart - hash_head) <= (s.w_size - MIN_LOOKAHEAD))) { - /* To simplify the code, we prevent matches with the string - * of window index 0 (in particular we have to avoid a match - * of the string with itself at the start of the input file). - */ - s.match_length = longest_match(s, hash_head); - /* longest_match() sets match_start */ - } - if (s.match_length >= MIN_MATCH) { - // check_match(s, s.strstart, s.match_start, s.match_length); // for debug only - - /*** _tr_tally_dist(s, s.strstart - s.match_start, - s.match_length - MIN_MATCH, bflush); ***/ - bflush = trees._tr_tally(s, s.strstart - s.match_start, s.match_length - MIN_MATCH); - - s.lookahead -= s.match_length; - - /* Insert new strings in the hash table only if the match length - * is not too large. This saves time but degrades compression. - */ - if (s.match_length <= s.max_lazy_match/*max_insert_length*/ && s.lookahead >= MIN_MATCH) { - s.match_length--; /* string at strstart already in table */ - do { - s.strstart++; - /*** INSERT_STRING(s, s.strstart, hash_head); ***/ - s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[s.strstart + MIN_MATCH - 1]) & s.hash_mask; - hash_head = s.prev[s.strstart & s.w_mask] = s.head[s.ins_h]; - s.head[s.ins_h] = s.strstart; - /***/ - /* strstart never exceeds WSIZE-MAX_MATCH, so there are - * always MIN_MATCH bytes ahead. - */ - } while (--s.match_length !== 0); - s.strstart++; - } else - { - s.strstart += s.match_length; - s.match_length = 0; - s.ins_h = s.window[s.strstart]; - /* UPDATE_HASH(s, s.ins_h, s.window[s.strstart+1]); */ - s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[s.strstart + 1]) & s.hash_mask; - -//#if MIN_MATCH != 3 -// Call UPDATE_HASH() MIN_MATCH-3 more times -//#endif - /* If lookahead < MIN_MATCH, ins_h is garbage, but it does not - * matter since it will be recomputed at next deflate call. - */ - } - } else { - /* No match, output a literal byte */ - //Tracevv((stderr,"%c", s.window[s.strstart])); - /*** _tr_tally_lit(s, s.window[s.strstart], bflush); ***/ - bflush = trees._tr_tally(s, 0, s.window[s.strstart]); - - s.lookahead--; - s.strstart++; - } - if (bflush) { - /*** FLUSH_BLOCK(s, 0); ***/ - flush_block_only(s, false); - if (s.strm.avail_out === 0) { - return BS_NEED_MORE; - } - /***/ - } - } - s.insert = ((s.strstart < (MIN_MATCH - 1)) ? s.strstart : MIN_MATCH - 1); - if (flush === Z_FINISH) { - /*** FLUSH_BLOCK(s, 1); ***/ - flush_block_only(s, true); - if (s.strm.avail_out === 0) { - return BS_FINISH_STARTED; - } - /***/ - return BS_FINISH_DONE; - } - if (s.last_lit) { - /*** FLUSH_BLOCK(s, 0); ***/ - flush_block_only(s, false); - if (s.strm.avail_out === 0) { - return BS_NEED_MORE; - } - /***/ - } - return BS_BLOCK_DONE; -} - -/* =========================================================================== - * Same as above, but achieves better compression. We use a lazy - * evaluation for matches: a match is finally adopted only if there is - * no better match at the next window position. - */ -function deflate_slow(s, flush) { - var hash_head; /* head of hash chain */ - var bflush; /* set if current block must be flushed */ - - var max_insert; - - /* Process the input block. */ - for (;;) { - /* Make sure that we always have enough lookahead, except - * at the end of the input file. We need MAX_MATCH bytes - * for the next match, plus MIN_MATCH bytes to insert the - * string following the next match. - */ - if (s.lookahead < MIN_LOOKAHEAD) { - fill_window(s); - if (s.lookahead < MIN_LOOKAHEAD && flush === Z_NO_FLUSH) { - return BS_NEED_MORE; - } - if (s.lookahead === 0) { break; } /* flush the current block */ - } - - /* Insert the string window[strstart .. strstart+2] in the - * dictionary, and set hash_head to the head of the hash chain: - */ - hash_head = 0/*NIL*/; - if (s.lookahead >= MIN_MATCH) { - /*** INSERT_STRING(s, s.strstart, hash_head); ***/ - s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[s.strstart + MIN_MATCH - 1]) & s.hash_mask; - hash_head = s.prev[s.strstart & s.w_mask] = s.head[s.ins_h]; - s.head[s.ins_h] = s.strstart; - /***/ - } - - /* Find the longest match, discarding those <= prev_length. - */ - s.prev_length = s.match_length; - s.prev_match = s.match_start; - s.match_length = MIN_MATCH - 1; - - if (hash_head !== 0/*NIL*/ && s.prev_length < s.max_lazy_match && - s.strstart - hash_head <= (s.w_size - MIN_LOOKAHEAD)/*MAX_DIST(s)*/) { - /* To simplify the code, we prevent matches with the string - * of window index 0 (in particular we have to avoid a match - * of the string with itself at the start of the input file). - */ - s.match_length = longest_match(s, hash_head); - /* longest_match() sets match_start */ - - if (s.match_length <= 5 && - (s.strategy === Z_FILTERED || (s.match_length === MIN_MATCH && s.strstart - s.match_start > 4096/*TOO_FAR*/))) { - - /* If prev_match is also MIN_MATCH, match_start is garbage - * but we will ignore the current match anyway. - */ - s.match_length = MIN_MATCH - 1; - } - } - /* If there was a match at the previous step and the current - * match is not better, output the previous match: - */ - if (s.prev_length >= MIN_MATCH && s.match_length <= s.prev_length) { - max_insert = s.strstart + s.lookahead - MIN_MATCH; - /* Do not insert strings in hash table beyond this. */ - - //check_match(s, s.strstart-1, s.prev_match, s.prev_length); - - /***_tr_tally_dist(s, s.strstart - 1 - s.prev_match, - s.prev_length - MIN_MATCH, bflush);***/ - bflush = trees._tr_tally(s, s.strstart - 1 - s.prev_match, s.prev_length - MIN_MATCH); - /* Insert in hash table all strings up to the end of the match. - * strstart-1 and strstart are already inserted. If there is not - * enough lookahead, the last two strings are not inserted in - * the hash table. - */ - s.lookahead -= s.prev_length - 1; - s.prev_length -= 2; - do { - if (++s.strstart <= max_insert) { - /*** INSERT_STRING(s, s.strstart, hash_head); ***/ - s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[s.strstart + MIN_MATCH - 1]) & s.hash_mask; - hash_head = s.prev[s.strstart & s.w_mask] = s.head[s.ins_h]; - s.head[s.ins_h] = s.strstart; - /***/ - } - } while (--s.prev_length !== 0); - s.match_available = 0; - s.match_length = MIN_MATCH - 1; - s.strstart++; - - if (bflush) { - /*** FLUSH_BLOCK(s, 0); ***/ - flush_block_only(s, false); - if (s.strm.avail_out === 0) { - return BS_NEED_MORE; - } - /***/ - } - - } else if (s.match_available) { - /* If there was no match at the previous position, output a - * single literal. If there was a match but the current match - * is longer, truncate the previous match to a single literal. - */ - //Tracevv((stderr,"%c", s->window[s->strstart-1])); - /*** _tr_tally_lit(s, s.window[s.strstart-1], bflush); ***/ - bflush = trees._tr_tally(s, 0, s.window[s.strstart - 1]); - - if (bflush) { - /*** FLUSH_BLOCK_ONLY(s, 0) ***/ - flush_block_only(s, false); - /***/ - } - s.strstart++; - s.lookahead--; - if (s.strm.avail_out === 0) { - return BS_NEED_MORE; - } - } else { - /* There is no previous match to compare with, wait for - * the next step to decide. - */ - s.match_available = 1; - s.strstart++; - s.lookahead--; - } - } - //Assert (flush != Z_NO_FLUSH, "no flush?"); - if (s.match_available) { - //Tracevv((stderr,"%c", s->window[s->strstart-1])); - /*** _tr_tally_lit(s, s.window[s.strstart-1], bflush); ***/ - bflush = trees._tr_tally(s, 0, s.window[s.strstart - 1]); - - s.match_available = 0; - } - s.insert = s.strstart < MIN_MATCH - 1 ? s.strstart : MIN_MATCH - 1; - if (flush === Z_FINISH) { - /*** FLUSH_BLOCK(s, 1); ***/ - flush_block_only(s, true); - if (s.strm.avail_out === 0) { - return BS_FINISH_STARTED; - } - /***/ - return BS_FINISH_DONE; - } - if (s.last_lit) { - /*** FLUSH_BLOCK(s, 0); ***/ - flush_block_only(s, false); - if (s.strm.avail_out === 0) { - return BS_NEED_MORE; - } - /***/ - } - - return BS_BLOCK_DONE; -} - - -/* =========================================================================== - * For Z_RLE, simply look for runs of bytes, generate matches only of distance - * one. Do not maintain a hash table. (It will be regenerated if this run of - * deflate switches away from Z_RLE.) - */ -function deflate_rle(s, flush) { - var bflush; /* set if current block must be flushed */ - var prev; /* byte at distance one to match */ - var scan, strend; /* scan goes up to strend for length of run */ - - var _win = s.window; - - for (;;) { - /* Make sure that we always have enough lookahead, except - * at the end of the input file. We need MAX_MATCH bytes - * for the longest run, plus one for the unrolled loop. - */ - if (s.lookahead <= MAX_MATCH) { - fill_window(s); - if (s.lookahead <= MAX_MATCH && flush === Z_NO_FLUSH) { - return BS_NEED_MORE; - } - if (s.lookahead === 0) { break; } /* flush the current block */ - } - - /* See how many times the previous byte repeats */ - s.match_length = 0; - if (s.lookahead >= MIN_MATCH && s.strstart > 0) { - scan = s.strstart - 1; - prev = _win[scan]; - if (prev === _win[++scan] && prev === _win[++scan] && prev === _win[++scan]) { - strend = s.strstart + MAX_MATCH; - do { - /*jshint noempty:false*/ - } while (prev === _win[++scan] && prev === _win[++scan] && - prev === _win[++scan] && prev === _win[++scan] && - prev === _win[++scan] && prev === _win[++scan] && - prev === _win[++scan] && prev === _win[++scan] && - scan < strend); - s.match_length = MAX_MATCH - (strend - scan); - if (s.match_length > s.lookahead) { - s.match_length = s.lookahead; - } - } - //Assert(scan <= s->window+(uInt)(s->window_size-1), "wild scan"); - } - - /* Emit match if have run of MIN_MATCH or longer, else emit literal */ - if (s.match_length >= MIN_MATCH) { - //check_match(s, s.strstart, s.strstart - 1, s.match_length); - - /*** _tr_tally_dist(s, 1, s.match_length - MIN_MATCH, bflush); ***/ - bflush = trees._tr_tally(s, 1, s.match_length - MIN_MATCH); - - s.lookahead -= s.match_length; - s.strstart += s.match_length; - s.match_length = 0; - } else { - /* No match, output a literal byte */ - //Tracevv((stderr,"%c", s->window[s->strstart])); - /*** _tr_tally_lit(s, s.window[s.strstart], bflush); ***/ - bflush = trees._tr_tally(s, 0, s.window[s.strstart]); - - s.lookahead--; - s.strstart++; - } - if (bflush) { - /*** FLUSH_BLOCK(s, 0); ***/ - flush_block_only(s, false); - if (s.strm.avail_out === 0) { - return BS_NEED_MORE; - } - /***/ - } - } - s.insert = 0; - if (flush === Z_FINISH) { - /*** FLUSH_BLOCK(s, 1); ***/ - flush_block_only(s, true); - if (s.strm.avail_out === 0) { - return BS_FINISH_STARTED; - } - /***/ - return BS_FINISH_DONE; - } - if (s.last_lit) { - /*** FLUSH_BLOCK(s, 0); ***/ - flush_block_only(s, false); - if (s.strm.avail_out === 0) { - return BS_NEED_MORE; - } - /***/ - } - return BS_BLOCK_DONE; -} - -/* =========================================================================== - * For Z_HUFFMAN_ONLY, do not look for matches. Do not maintain a hash table. - * (It will be regenerated if this run of deflate switches away from Huffman.) - */ -function deflate_huff(s, flush) { - var bflush; /* set if current block must be flushed */ - - for (;;) { - /* Make sure that we have a literal to write. */ - if (s.lookahead === 0) { - fill_window(s); - if (s.lookahead === 0) { - if (flush === Z_NO_FLUSH) { - return BS_NEED_MORE; - } - break; /* flush the current block */ - } - } - - /* Output a literal byte */ - s.match_length = 0; - //Tracevv((stderr,"%c", s->window[s->strstart])); - /*** _tr_tally_lit(s, s.window[s.strstart], bflush); ***/ - bflush = trees._tr_tally(s, 0, s.window[s.strstart]); - s.lookahead--; - s.strstart++; - if (bflush) { - /*** FLUSH_BLOCK(s, 0); ***/ - flush_block_only(s, false); - if (s.strm.avail_out === 0) { - return BS_NEED_MORE; - } - /***/ - } - } - s.insert = 0; - if (flush === Z_FINISH) { - /*** FLUSH_BLOCK(s, 1); ***/ - flush_block_only(s, true); - if (s.strm.avail_out === 0) { - return BS_FINISH_STARTED; - } - /***/ - return BS_FINISH_DONE; - } - if (s.last_lit) { - /*** FLUSH_BLOCK(s, 0); ***/ - flush_block_only(s, false); - if (s.strm.avail_out === 0) { - return BS_NEED_MORE; - } - /***/ - } - return BS_BLOCK_DONE; -} - -/* Values for max_lazy_match, good_match and max_chain_length, depending on - * the desired pack level (0..9). The values given below have been tuned to - * exclude worst case performance for pathological files. Better values may be - * found for specific files. - */ -function Config(good_length, max_lazy, nice_length, max_chain, func) { - this.good_length = good_length; - this.max_lazy = max_lazy; - this.nice_length = nice_length; - this.max_chain = max_chain; - this.func = func; -} - -var configuration_table; - -configuration_table = [ - /* good lazy nice chain */ - new Config(0, 0, 0, 0, deflate_stored), /* 0 store only */ - new Config(4, 4, 8, 4, deflate_fast), /* 1 max speed, no lazy matches */ - new Config(4, 5, 16, 8, deflate_fast), /* 2 */ - new Config(4, 6, 32, 32, deflate_fast), /* 3 */ - - new Config(4, 4, 16, 16, deflate_slow), /* 4 lazy matches */ - new Config(8, 16, 32, 32, deflate_slow), /* 5 */ - new Config(8, 16, 128, 128, deflate_slow), /* 6 */ - new Config(8, 32, 128, 256, deflate_slow), /* 7 */ - new Config(32, 128, 258, 1024, deflate_slow), /* 8 */ - new Config(32, 258, 258, 4096, deflate_slow) /* 9 max compression */ -]; - - -/* =========================================================================== - * Initialize the "longest match" routines for a new zlib stream - */ -function lm_init(s) { - s.window_size = 2 * s.w_size; - - /*** CLEAR_HASH(s); ***/ - zero(s.head); // Fill with NIL (= 0); - - /* Set the default configuration parameters: - */ - s.max_lazy_match = configuration_table[s.level].max_lazy; - s.good_match = configuration_table[s.level].good_length; - s.nice_match = configuration_table[s.level].nice_length; - s.max_chain_length = configuration_table[s.level].max_chain; - - s.strstart = 0; - s.block_start = 0; - s.lookahead = 0; - s.insert = 0; - s.match_length = s.prev_length = MIN_MATCH - 1; - s.match_available = 0; - s.ins_h = 0; -} - - -function DeflateState() { - this.strm = null; /* pointer back to this zlib stream */ - this.status = 0; /* as the name implies */ - this.pending_buf = null; /* output still pending */ - this.pending_buf_size = 0; /* size of pending_buf */ - this.pending_out = 0; /* next pending byte to output to the stream */ - this.pending = 0; /* nb of bytes in the pending buffer */ - this.wrap = 0; /* bit 0 true for zlib, bit 1 true for gzip */ - this.gzhead = null; /* gzip header information to write */ - this.gzindex = 0; /* where in extra, name, or comment */ - this.method = Z_DEFLATED; /* can only be DEFLATED */ - this.last_flush = -1; /* value of flush param for previous deflate call */ - - this.w_size = 0; /* LZ77 window size (32K by default) */ - this.w_bits = 0; /* log2(w_size) (8..16) */ - this.w_mask = 0; /* w_size - 1 */ - - this.window = null; - /* Sliding window. Input bytes are read into the second half of the window, - * and move to the first half later to keep a dictionary of at least wSize - * bytes. With this organization, matches are limited to a distance of - * wSize-MAX_MATCH bytes, but this ensures that IO is always - * performed with a length multiple of the block size. - */ - - this.window_size = 0; - /* Actual size of window: 2*wSize, except when the user input buffer - * is directly used as sliding window. - */ - - this.prev = null; - /* Link to older string with same hash index. To limit the size of this - * array to 64K, this link is maintained only for the last 32K strings. - * An index in this array is thus a window index modulo 32K. - */ - - this.head = null; /* Heads of the hash chains or NIL. */ - - this.ins_h = 0; /* hash index of string to be inserted */ - this.hash_size = 0; /* number of elements in hash table */ - this.hash_bits = 0; /* log2(hash_size) */ - this.hash_mask = 0; /* hash_size-1 */ - - this.hash_shift = 0; - /* Number of bits by which ins_h must be shifted at each input - * step. It must be such that after MIN_MATCH steps, the oldest - * byte no longer takes part in the hash key, that is: - * hash_shift * MIN_MATCH >= hash_bits - */ - - this.block_start = 0; - /* Window position at the beginning of the current output block. Gets - * negative when the window is moved backwards. - */ - - this.match_length = 0; /* length of best match */ - this.prev_match = 0; /* previous match */ - this.match_available = 0; /* set if previous match exists */ - this.strstart = 0; /* start of string to insert */ - this.match_start = 0; /* start of matching string */ - this.lookahead = 0; /* number of valid bytes ahead in window */ - - this.prev_length = 0; - /* Length of the best match at previous step. Matches not greater than this - * are discarded. This is used in the lazy match evaluation. - */ - - this.max_chain_length = 0; - /* To speed up deflation, hash chains are never searched beyond this - * length. A higher limit improves compression ratio but degrades the - * speed. - */ - - this.max_lazy_match = 0; - /* Attempt to find a better match only when the current match is strictly - * smaller than this value. This mechanism is used only for compression - * levels >= 4. - */ - // That's alias to max_lazy_match, don't use directly - //this.max_insert_length = 0; - /* Insert new strings in the hash table only if the match length is not - * greater than this length. This saves time but degrades compression. - * max_insert_length is used only for compression levels <= 3. - */ - - this.level = 0; /* compression level (1..9) */ - this.strategy = 0; /* favor or force Huffman coding*/ - - this.good_match = 0; - /* Use a faster search when the previous match is longer than this */ - - this.nice_match = 0; /* Stop searching when current match exceeds this */ - - /* used by trees.c: */ - - /* Didn't use ct_data typedef below to suppress compiler warning */ - - // struct ct_data_s dyn_ltree[HEAP_SIZE]; /* literal and length tree */ - // struct ct_data_s dyn_dtree[2*D_CODES+1]; /* distance tree */ - // struct ct_data_s bl_tree[2*BL_CODES+1]; /* Huffman tree for bit lengths */ - - // Use flat array of DOUBLE size, with interleaved fata, - // because JS does not support effective - this.dyn_ltree = new utils.Buf16(HEAP_SIZE * 2); - this.dyn_dtree = new utils.Buf16((2 * D_CODES + 1) * 2); - this.bl_tree = new utils.Buf16((2 * BL_CODES + 1) * 2); - zero(this.dyn_ltree); - zero(this.dyn_dtree); - zero(this.bl_tree); - - this.l_desc = null; /* desc. for literal tree */ - this.d_desc = null; /* desc. for distance tree */ - this.bl_desc = null; /* desc. for bit length tree */ - - //ush bl_count[MAX_BITS+1]; - this.bl_count = new utils.Buf16(MAX_BITS + 1); - /* number of codes at each bit length for an optimal tree */ - - //int heap[2*L_CODES+1]; /* heap used to build the Huffman trees */ - this.heap = new utils.Buf16(2 * L_CODES + 1); /* heap used to build the Huffman trees */ - zero(this.heap); - - this.heap_len = 0; /* number of elements in the heap */ - this.heap_max = 0; /* element of largest frequency */ - /* The sons of heap[n] are heap[2*n] and heap[2*n+1]. heap[0] is not used. - * The same heap array is used to build all trees. - */ - - this.depth = new utils.Buf16(2 * L_CODES + 1); //uch depth[2*L_CODES+1]; - zero(this.depth); - /* Depth of each subtree used as tie breaker for trees of equal frequency - */ - - this.l_buf = 0; /* buffer index for literals or lengths */ - - this.lit_bufsize = 0; - /* Size of match buffer for literals/lengths. There are 4 reasons for - * limiting lit_bufsize to 64K: - * - frequencies can be kept in 16 bit counters - * - if compression is not successful for the first block, all input - * data is still in the window so we can still emit a stored block even - * when input comes from standard input. (This can also be done for - * all blocks if lit_bufsize is not greater than 32K.) - * - if compression is not successful for a file smaller than 64K, we can - * even emit a stored file instead of a stored block (saving 5 bytes). - * This is applicable only for zip (not gzip or zlib). - * - creating new Huffman trees less frequently may not provide fast - * adaptation to changes in the input data statistics. (Take for - * example a binary file with poorly compressible code followed by - * a highly compressible string table.) Smaller buffer sizes give - * fast adaptation but have of course the overhead of transmitting - * trees more frequently. - * - I can't count above 4 - */ - - this.last_lit = 0; /* running index in l_buf */ - - this.d_buf = 0; - /* Buffer index for distances. To simplify the code, d_buf and l_buf have - * the same number of elements. To use different lengths, an extra flag - * array would be necessary. - */ - - this.opt_len = 0; /* bit length of current block with optimal trees */ - this.static_len = 0; /* bit length of current block with static trees */ - this.matches = 0; /* number of string matches in current block */ - this.insert = 0; /* bytes at end of window left to insert */ - - - this.bi_buf = 0; - /* Output buffer. bits are inserted starting at the bottom (least - * significant bits). - */ - this.bi_valid = 0; - /* Number of valid bits in bi_buf. All bits above the last valid bit - * are always zero. - */ - - // Used for window memory init. We safely ignore it for JS. That makes - // sense only for pointers and memory check tools. - //this.high_water = 0; - /* High water mark offset in window for initialized bytes -- bytes above - * this are set to zero in order to avoid memory check warnings when - * longest match routines access bytes past the input. This is then - * updated to the new high water mark. - */ -} - - -function deflateResetKeep(strm) { - var s; - - if (!strm || !strm.state) { - return err(strm, Z_STREAM_ERROR); - } - - strm.total_in = strm.total_out = 0; - strm.data_type = Z_UNKNOWN; - - s = strm.state; - s.pending = 0; - s.pending_out = 0; - - if (s.wrap < 0) { - s.wrap = -s.wrap; - /* was made negative by deflate(..., Z_FINISH); */ - } - s.status = (s.wrap ? INIT_STATE : BUSY_STATE); - strm.adler = (s.wrap === 2) ? - 0 // crc32(0, Z_NULL, 0) - : - 1; // adler32(0, Z_NULL, 0) - s.last_flush = Z_NO_FLUSH; - trees._tr_init(s); - return Z_OK; -} - - -function deflateReset(strm) { - var ret = deflateResetKeep(strm); - if (ret === Z_OK) { - lm_init(strm.state); - } - return ret; -} - - -function deflateSetHeader(strm, head) { - if (!strm || !strm.state) { return Z_STREAM_ERROR; } - if (strm.state.wrap !== 2) { return Z_STREAM_ERROR; } - strm.state.gzhead = head; - return Z_OK; -} - - -function deflateInit2(strm, level, method, windowBits, memLevel, strategy) { - if (!strm) { // === Z_NULL - return Z_STREAM_ERROR; - } - var wrap = 1; - - if (level === Z_DEFAULT_COMPRESSION) { - level = 6; - } - - if (windowBits < 0) { /* suppress zlib wrapper */ - wrap = 0; - windowBits = -windowBits; - } - - else if (windowBits > 15) { - wrap = 2; /* write gzip wrapper instead */ - windowBits -= 16; - } - - - if (memLevel < 1 || memLevel > MAX_MEM_LEVEL || method !== Z_DEFLATED || - windowBits < 8 || windowBits > 15 || level < 0 || level > 9 || - strategy < 0 || strategy > Z_FIXED) { - return err(strm, Z_STREAM_ERROR); - } - - - if (windowBits === 8) { - windowBits = 9; - } - /* until 256-byte window bug fixed */ - - var s = new DeflateState(); - - strm.state = s; - s.strm = strm; - - s.wrap = wrap; - s.gzhead = null; - s.w_bits = windowBits; - s.w_size = 1 << s.w_bits; - s.w_mask = s.w_size - 1; - - s.hash_bits = memLevel + 7; - s.hash_size = 1 << s.hash_bits; - s.hash_mask = s.hash_size - 1; - s.hash_shift = ~~((s.hash_bits + MIN_MATCH - 1) / MIN_MATCH); - - s.window = new utils.Buf8(s.w_size * 2); - s.head = new utils.Buf16(s.hash_size); - s.prev = new utils.Buf16(s.w_size); - - // Don't need mem init magic for JS. - //s.high_water = 0; /* nothing written to s->window yet */ - - s.lit_bufsize = 1 << (memLevel + 6); /* 16K elements by default */ - - s.pending_buf_size = s.lit_bufsize * 4; - - //overlay = (ushf *) ZALLOC(strm, s->lit_bufsize, sizeof(ush)+2); - //s->pending_buf = (uchf *) overlay; - s.pending_buf = new utils.Buf8(s.pending_buf_size); - - // It is offset from `s.pending_buf` (size is `s.lit_bufsize * 2`) - //s->d_buf = overlay + s->lit_bufsize/sizeof(ush); - s.d_buf = 1 * s.lit_bufsize; - - //s->l_buf = s->pending_buf + (1+sizeof(ush))*s->lit_bufsize; - s.l_buf = (1 + 2) * s.lit_bufsize; - - s.level = level; - s.strategy = strategy; - s.method = method; - - return deflateReset(strm); -} - -function deflateInit(strm, level) { - return deflateInit2(strm, level, Z_DEFLATED, MAX_WBITS, DEF_MEM_LEVEL, Z_DEFAULT_STRATEGY); -} - - -function deflate(strm, flush) { - var old_flush, s; - var beg, val; // for gzip header write only - - if (!strm || !strm.state || - flush > Z_BLOCK || flush < 0) { - return strm ? err(strm, Z_STREAM_ERROR) : Z_STREAM_ERROR; - } - - s = strm.state; - - if (!strm.output || - (!strm.input && strm.avail_in !== 0) || - (s.status === FINISH_STATE && flush !== Z_FINISH)) { - return err(strm, (strm.avail_out === 0) ? Z_BUF_ERROR : Z_STREAM_ERROR); - } - - s.strm = strm; /* just in case */ - old_flush = s.last_flush; - s.last_flush = flush; - - /* Write the header */ - if (s.status === INIT_STATE) { - - if (s.wrap === 2) { // GZIP header - strm.adler = 0; //crc32(0L, Z_NULL, 0); - put_byte(s, 31); - put_byte(s, 139); - put_byte(s, 8); - if (!s.gzhead) { // s->gzhead == Z_NULL - put_byte(s, 0); - put_byte(s, 0); - put_byte(s, 0); - put_byte(s, 0); - put_byte(s, 0); - put_byte(s, s.level === 9 ? 2 : - (s.strategy >= Z_HUFFMAN_ONLY || s.level < 2 ? - 4 : 0)); - put_byte(s, OS_CODE); - s.status = BUSY_STATE; - } - else { - put_byte(s, (s.gzhead.text ? 1 : 0) + - (s.gzhead.hcrc ? 2 : 0) + - (!s.gzhead.extra ? 0 : 4) + - (!s.gzhead.name ? 0 : 8) + - (!s.gzhead.comment ? 0 : 16) - ); - put_byte(s, s.gzhead.time & 0xff); - put_byte(s, (s.gzhead.time >> 8) & 0xff); - put_byte(s, (s.gzhead.time >> 16) & 0xff); - put_byte(s, (s.gzhead.time >> 24) & 0xff); - put_byte(s, s.level === 9 ? 2 : - (s.strategy >= Z_HUFFMAN_ONLY || s.level < 2 ? - 4 : 0)); - put_byte(s, s.gzhead.os & 0xff); - if (s.gzhead.extra && s.gzhead.extra.length) { - put_byte(s, s.gzhead.extra.length & 0xff); - put_byte(s, (s.gzhead.extra.length >> 8) & 0xff); - } - if (s.gzhead.hcrc) { - strm.adler = crc32(strm.adler, s.pending_buf, s.pending, 0); - } - s.gzindex = 0; - s.status = EXTRA_STATE; - } - } - else // DEFLATE header - { - var header = (Z_DEFLATED + ((s.w_bits - 8) << 4)) << 8; - var level_flags = -1; - - if (s.strategy >= Z_HUFFMAN_ONLY || s.level < 2) { - level_flags = 0; - } else if (s.level < 6) { - level_flags = 1; - } else if (s.level === 6) { - level_flags = 2; - } else { - level_flags = 3; - } - header |= (level_flags << 6); - if (s.strstart !== 0) { header |= PRESET_DICT; } - header += 31 - (header % 31); - - s.status = BUSY_STATE; - putShortMSB(s, header); - - /* Save the adler32 of the preset dictionary: */ - if (s.strstart !== 0) { - putShortMSB(s, strm.adler >>> 16); - putShortMSB(s, strm.adler & 0xffff); - } - strm.adler = 1; // adler32(0L, Z_NULL, 0); - } - } - -//#ifdef GZIP - if (s.status === EXTRA_STATE) { - if (s.gzhead.extra/* != Z_NULL*/) { - beg = s.pending; /* start of bytes to update crc */ - - while (s.gzindex < (s.gzhead.extra.length & 0xffff)) { - if (s.pending === s.pending_buf_size) { - if (s.gzhead.hcrc && s.pending > beg) { - strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg); - } - flush_pending(strm); - beg = s.pending; - if (s.pending === s.pending_buf_size) { - break; - } - } - put_byte(s, s.gzhead.extra[s.gzindex] & 0xff); - s.gzindex++; - } - if (s.gzhead.hcrc && s.pending > beg) { - strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg); - } - if (s.gzindex === s.gzhead.extra.length) { - s.gzindex = 0; - s.status = NAME_STATE; - } - } - else { - s.status = NAME_STATE; - } - } - if (s.status === NAME_STATE) { - if (s.gzhead.name/* != Z_NULL*/) { - beg = s.pending; /* start of bytes to update crc */ - //int val; - - do { - if (s.pending === s.pending_buf_size) { - if (s.gzhead.hcrc && s.pending > beg) { - strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg); - } - flush_pending(strm); - beg = s.pending; - if (s.pending === s.pending_buf_size) { - val = 1; - break; - } - } - // JS specific: little magic to add zero terminator to end of string - if (s.gzindex < s.gzhead.name.length) { - val = s.gzhead.name.charCodeAt(s.gzindex++) & 0xff; - } else { - val = 0; - } - put_byte(s, val); - } while (val !== 0); - - if (s.gzhead.hcrc && s.pending > beg) { - strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg); - } - if (val === 0) { - s.gzindex = 0; - s.status = COMMENT_STATE; - } - } - else { - s.status = COMMENT_STATE; - } - } - if (s.status === COMMENT_STATE) { - if (s.gzhead.comment/* != Z_NULL*/) { - beg = s.pending; /* start of bytes to update crc */ - //int val; - - do { - if (s.pending === s.pending_buf_size) { - if (s.gzhead.hcrc && s.pending > beg) { - strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg); - } - flush_pending(strm); - beg = s.pending; - if (s.pending === s.pending_buf_size) { - val = 1; - break; - } - } - // JS specific: little magic to add zero terminator to end of string - if (s.gzindex < s.gzhead.comment.length) { - val = s.gzhead.comment.charCodeAt(s.gzindex++) & 0xff; - } else { - val = 0; - } - put_byte(s, val); - } while (val !== 0); - - if (s.gzhead.hcrc && s.pending > beg) { - strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg); - } - if (val === 0) { - s.status = HCRC_STATE; - } - } - else { - s.status = HCRC_STATE; - } - } - if (s.status === HCRC_STATE) { - if (s.gzhead.hcrc) { - if (s.pending + 2 > s.pending_buf_size) { - flush_pending(strm); - } - if (s.pending + 2 <= s.pending_buf_size) { - put_byte(s, strm.adler & 0xff); - put_byte(s, (strm.adler >> 8) & 0xff); - strm.adler = 0; //crc32(0L, Z_NULL, 0); - s.status = BUSY_STATE; - } - } - else { - s.status = BUSY_STATE; - } - } -//#endif - - /* Flush as much pending output as possible */ - if (s.pending !== 0) { - flush_pending(strm); - if (strm.avail_out === 0) { - /* Since avail_out is 0, deflate will be called again with - * more output space, but possibly with both pending and - * avail_in equal to zero. There won't be anything to do, - * but this is not an error situation so make sure we - * return OK instead of BUF_ERROR at next call of deflate: - */ - s.last_flush = -1; - return Z_OK; - } - - /* Make sure there is something to do and avoid duplicate consecutive - * flushes. For repeated and useless calls with Z_FINISH, we keep - * returning Z_STREAM_END instead of Z_BUF_ERROR. - */ - } else if (strm.avail_in === 0 && rank(flush) <= rank(old_flush) && - flush !== Z_FINISH) { - return err(strm, Z_BUF_ERROR); - } - - /* User must not provide more input after the first FINISH: */ - if (s.status === FINISH_STATE && strm.avail_in !== 0) { - return err(strm, Z_BUF_ERROR); - } - - /* Start a new block or continue the current one. - */ - if (strm.avail_in !== 0 || s.lookahead !== 0 || - (flush !== Z_NO_FLUSH && s.status !== FINISH_STATE)) { - var bstate = (s.strategy === Z_HUFFMAN_ONLY) ? deflate_huff(s, flush) : - (s.strategy === Z_RLE ? deflate_rle(s, flush) : - configuration_table[s.level].func(s, flush)); - - if (bstate === BS_FINISH_STARTED || bstate === BS_FINISH_DONE) { - s.status = FINISH_STATE; - } - if (bstate === BS_NEED_MORE || bstate === BS_FINISH_STARTED) { - if (strm.avail_out === 0) { - s.last_flush = -1; - /* avoid BUF_ERROR next call, see above */ - } - return Z_OK; - /* If flush != Z_NO_FLUSH && avail_out == 0, the next call - * of deflate should use the same flush parameter to make sure - * that the flush is complete. So we don't have to output an - * empty block here, this will be done at next call. This also - * ensures that for a very small output buffer, we emit at most - * one empty block. - */ - } - if (bstate === BS_BLOCK_DONE) { - if (flush === Z_PARTIAL_FLUSH) { - trees._tr_align(s); - } - else if (flush !== Z_BLOCK) { /* FULL_FLUSH or SYNC_FLUSH */ - - trees._tr_stored_block(s, 0, 0, false); - /* For a full flush, this empty block will be recognized - * as a special marker by inflate_sync(). - */ - if (flush === Z_FULL_FLUSH) { - /*** CLEAR_HASH(s); ***/ /* forget history */ - zero(s.head); // Fill with NIL (= 0); - - if (s.lookahead === 0) { - s.strstart = 0; - s.block_start = 0; - s.insert = 0; - } - } - } - flush_pending(strm); - if (strm.avail_out === 0) { - s.last_flush = -1; /* avoid BUF_ERROR at next call, see above */ - return Z_OK; - } - } - } - //Assert(strm->avail_out > 0, "bug2"); - //if (strm.avail_out <= 0) { throw new Error("bug2");} - - if (flush !== Z_FINISH) { return Z_OK; } - if (s.wrap <= 0) { return Z_STREAM_END; } - - /* Write the trailer */ - if (s.wrap === 2) { - put_byte(s, strm.adler & 0xff); - put_byte(s, (strm.adler >> 8) & 0xff); - put_byte(s, (strm.adler >> 16) & 0xff); - put_byte(s, (strm.adler >> 24) & 0xff); - put_byte(s, strm.total_in & 0xff); - put_byte(s, (strm.total_in >> 8) & 0xff); - put_byte(s, (strm.total_in >> 16) & 0xff); - put_byte(s, (strm.total_in >> 24) & 0xff); - } - else - { - putShortMSB(s, strm.adler >>> 16); - putShortMSB(s, strm.adler & 0xffff); - } - - flush_pending(strm); - /* If avail_out is zero, the application will call deflate again - * to flush the rest. - */ - if (s.wrap > 0) { s.wrap = -s.wrap; } - /* write the trailer only once! */ - return s.pending !== 0 ? Z_OK : Z_STREAM_END; -} - -function deflateEnd(strm) { - var status; - - if (!strm/*== Z_NULL*/ || !strm.state/*== Z_NULL*/) { - return Z_STREAM_ERROR; - } - - status = strm.state.status; - if (status !== INIT_STATE && - status !== EXTRA_STATE && - status !== NAME_STATE && - status !== COMMENT_STATE && - status !== HCRC_STATE && - status !== BUSY_STATE && - status !== FINISH_STATE - ) { - return err(strm, Z_STREAM_ERROR); - } - - strm.state = null; - - return status === BUSY_STATE ? err(strm, Z_DATA_ERROR) : Z_OK; -} - - -/* ========================================================================= - * Initializes the compression dictionary from the given byte - * sequence without producing any compressed output. - */ -function deflateSetDictionary(strm, dictionary) { - var dictLength = dictionary.length; - - var s; - var str, n; - var wrap; - var avail; - var next; - var input; - var tmpDict; - - if (!strm/*== Z_NULL*/ || !strm.state/*== Z_NULL*/) { - return Z_STREAM_ERROR; - } - - s = strm.state; - wrap = s.wrap; - - if (wrap === 2 || (wrap === 1 && s.status !== INIT_STATE) || s.lookahead) { - return Z_STREAM_ERROR; - } - - /* when using zlib wrappers, compute Adler-32 for provided dictionary */ - if (wrap === 1) { - /* adler32(strm->adler, dictionary, dictLength); */ - strm.adler = adler32(strm.adler, dictionary, dictLength, 0); - } - - s.wrap = 0; /* avoid computing Adler-32 in read_buf */ - - /* if dictionary would fill window, just replace the history */ - if (dictLength >= s.w_size) { - if (wrap === 0) { /* already empty otherwise */ - /*** CLEAR_HASH(s); ***/ - zero(s.head); // Fill with NIL (= 0); - s.strstart = 0; - s.block_start = 0; - s.insert = 0; - } - /* use the tail */ - // dictionary = dictionary.slice(dictLength - s.w_size); - tmpDict = new utils.Buf8(s.w_size); - utils.arraySet(tmpDict, dictionary, dictLength - s.w_size, s.w_size, 0); - dictionary = tmpDict; - dictLength = s.w_size; - } - /* insert dictionary into window and hash */ - avail = strm.avail_in; - next = strm.next_in; - input = strm.input; - strm.avail_in = dictLength; - strm.next_in = 0; - strm.input = dictionary; - fill_window(s); - while (s.lookahead >= MIN_MATCH) { - str = s.strstart; - n = s.lookahead - (MIN_MATCH - 1); - do { - /* UPDATE_HASH(s, s->ins_h, s->window[str + MIN_MATCH-1]); */ - s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[str + MIN_MATCH - 1]) & s.hash_mask; - - s.prev[str & s.w_mask] = s.head[s.ins_h]; - - s.head[s.ins_h] = str; - str++; - } while (--n); - s.strstart = str; - s.lookahead = MIN_MATCH - 1; - fill_window(s); - } - s.strstart += s.lookahead; - s.block_start = s.strstart; - s.insert = s.lookahead; - s.lookahead = 0; - s.match_length = s.prev_length = MIN_MATCH - 1; - s.match_available = 0; - strm.next_in = next; - strm.input = input; - strm.avail_in = avail; - s.wrap = wrap; - return Z_OK; -} - - -exports.deflateInit = deflateInit; -exports.deflateInit2 = deflateInit2; -exports.deflateReset = deflateReset; -exports.deflateResetKeep = deflateResetKeep; -exports.deflateSetHeader = deflateSetHeader; -exports.deflate = deflate; -exports.deflateEnd = deflateEnd; -exports.deflateSetDictionary = deflateSetDictionary; -exports.deflateInfo = 'pako deflate (from Nodeca project)'; - -/* Not implemented -exports.deflateBound = deflateBound; -exports.deflateCopy = deflateCopy; -exports.deflateParams = deflateParams; -exports.deflatePending = deflatePending; -exports.deflatePrime = deflatePrime; -exports.deflateTune = deflateTune; -*/ diff --git a/node_modules/browserify/node_modules/browserify-zlib/node_modules/pako/lib/zlib/gzheader.js b/node_modules/browserify/node_modules/browserify-zlib/node_modules/pako/lib/zlib/gzheader.js deleted file mode 100644 index 300bdee8..00000000 --- a/node_modules/browserify/node_modules/browserify-zlib/node_modules/pako/lib/zlib/gzheader.js +++ /dev/null @@ -1,40 +0,0 @@ -'use strict'; - - -function GZheader() { - /* true if compressed data believed to be text */ - this.text = 0; - /* modification time */ - this.time = 0; - /* extra flags (not used when writing a gzip file) */ - this.xflags = 0; - /* operating system */ - this.os = 0; - /* pointer to extra field or Z_NULL if none */ - this.extra = null; - /* extra field length (valid if extra != Z_NULL) */ - this.extra_len = 0; // Actually, we don't need it in JS, - // but leave for few code modifications - - // - // Setup limits is not necessary because in js we should not preallocate memory - // for inflate use constant limit in 65536 bytes - // - - /* space at extra (only when reading header) */ - // this.extra_max = 0; - /* pointer to zero-terminated file name or Z_NULL */ - this.name = ''; - /* space at name (only when reading header) */ - // this.name_max = 0; - /* pointer to zero-terminated comment or Z_NULL */ - this.comment = ''; - /* space at comment (only when reading header) */ - // this.comm_max = 0; - /* true if there was or will be a header crc */ - this.hcrc = 0; - /* true when done reading gzip header (not used when writing a gzip file) */ - this.done = false; -} - -module.exports = GZheader; diff --git a/node_modules/browserify/node_modules/browserify-zlib/node_modules/pako/lib/zlib/inffast.js b/node_modules/browserify/node_modules/browserify-zlib/node_modules/pako/lib/zlib/inffast.js deleted file mode 100644 index a419f65d..00000000 --- a/node_modules/browserify/node_modules/browserify-zlib/node_modules/pako/lib/zlib/inffast.js +++ /dev/null @@ -1,326 +0,0 @@ -'use strict'; - -// See state defs from inflate.js -var BAD = 30; /* got a data error -- remain here until reset */ -var TYPE = 12; /* i: waiting for type bits, including last-flag bit */ - -/* - Decode literal, length, and distance codes and write out the resulting - literal and match bytes until either not enough input or output is - available, an end-of-block is encountered, or a data error is encountered. - When large enough input and output buffers are supplied to inflate(), for - example, a 16K input buffer and a 64K output buffer, more than 95% of the - inflate execution time is spent in this routine. - - Entry assumptions: - - state.mode === LEN - strm.avail_in >= 6 - strm.avail_out >= 258 - start >= strm.avail_out - state.bits < 8 - - On return, state.mode is one of: - - LEN -- ran out of enough output space or enough available input - TYPE -- reached end of block code, inflate() to interpret next block - BAD -- error in block data - - Notes: - - - The maximum input bits used by a length/distance pair is 15 bits for the - length code, 5 bits for the length extra, 15 bits for the distance code, - and 13 bits for the distance extra. This totals 48 bits, or six bytes. - Therefore if strm.avail_in >= 6, then there is enough input to avoid - checking for available input while decoding. - - - The maximum bytes that a single length/distance pair can output is 258 - bytes, which is the maximum length that can be coded. inflate_fast() - requires strm.avail_out >= 258 for each loop to avoid checking for - output space. - */ -module.exports = function inflate_fast(strm, start) { - var state; - var _in; /* local strm.input */ - var last; /* have enough input while in < last */ - var _out; /* local strm.output */ - var beg; /* inflate()'s initial strm.output */ - var end; /* while out < end, enough space available */ -//#ifdef INFLATE_STRICT - var dmax; /* maximum distance from zlib header */ -//#endif - var wsize; /* window size or zero if not using window */ - var whave; /* valid bytes in the window */ - var wnext; /* window write index */ - // Use `s_window` instead `window`, avoid conflict with instrumentation tools - var s_window; /* allocated sliding window, if wsize != 0 */ - var hold; /* local strm.hold */ - var bits; /* local strm.bits */ - var lcode; /* local strm.lencode */ - var dcode; /* local strm.distcode */ - var lmask; /* mask for first level of length codes */ - var dmask; /* mask for first level of distance codes */ - var here; /* retrieved table entry */ - var op; /* code bits, operation, extra bits, or */ - /* window position, window bytes to copy */ - var len; /* match length, unused bytes */ - var dist; /* match distance */ - var from; /* where to copy match from */ - var from_source; - - - var input, output; // JS specific, because we have no pointers - - /* copy state to local variables */ - state = strm.state; - //here = state.here; - _in = strm.next_in; - input = strm.input; - last = _in + (strm.avail_in - 5); - _out = strm.next_out; - output = strm.output; - beg = _out - (start - strm.avail_out); - end = _out + (strm.avail_out - 257); -//#ifdef INFLATE_STRICT - dmax = state.dmax; -//#endif - wsize = state.wsize; - whave = state.whave; - wnext = state.wnext; - s_window = state.window; - hold = state.hold; - bits = state.bits; - lcode = state.lencode; - dcode = state.distcode; - lmask = (1 << state.lenbits) - 1; - dmask = (1 << state.distbits) - 1; - - - /* decode literals and length/distances until end-of-block or not enough - input data or output space */ - - top: - do { - if (bits < 15) { - hold += input[_in++] << bits; - bits += 8; - hold += input[_in++] << bits; - bits += 8; - } - - here = lcode[hold & lmask]; - - dolen: - for (;;) { // Goto emulation - op = here >>> 24/*here.bits*/; - hold >>>= op; - bits -= op; - op = (here >>> 16) & 0xff/*here.op*/; - if (op === 0) { /* literal */ - //Tracevv((stderr, here.val >= 0x20 && here.val < 0x7f ? - // "inflate: literal '%c'\n" : - // "inflate: literal 0x%02x\n", here.val)); - output[_out++] = here & 0xffff/*here.val*/; - } - else if (op & 16) { /* length base */ - len = here & 0xffff/*here.val*/; - op &= 15; /* number of extra bits */ - if (op) { - if (bits < op) { - hold += input[_in++] << bits; - bits += 8; - } - len += hold & ((1 << op) - 1); - hold >>>= op; - bits -= op; - } - //Tracevv((stderr, "inflate: length %u\n", len)); - if (bits < 15) { - hold += input[_in++] << bits; - bits += 8; - hold += input[_in++] << bits; - bits += 8; - } - here = dcode[hold & dmask]; - - dodist: - for (;;) { // goto emulation - op = here >>> 24/*here.bits*/; - hold >>>= op; - bits -= op; - op = (here >>> 16) & 0xff/*here.op*/; - - if (op & 16) { /* distance base */ - dist = here & 0xffff/*here.val*/; - op &= 15; /* number of extra bits */ - if (bits < op) { - hold += input[_in++] << bits; - bits += 8; - if (bits < op) { - hold += input[_in++] << bits; - bits += 8; - } - } - dist += hold & ((1 << op) - 1); -//#ifdef INFLATE_STRICT - if (dist > dmax) { - strm.msg = 'invalid distance too far back'; - state.mode = BAD; - break top; - } -//#endif - hold >>>= op; - bits -= op; - //Tracevv((stderr, "inflate: distance %u\n", dist)); - op = _out - beg; /* max distance in output */ - if (dist > op) { /* see if copy from window */ - op = dist - op; /* distance back in window */ - if (op > whave) { - if (state.sane) { - strm.msg = 'invalid distance too far back'; - state.mode = BAD; - break top; - } - -// (!) This block is disabled in zlib defailts, -// don't enable it for binary compatibility -//#ifdef INFLATE_ALLOW_INVALID_DISTANCE_TOOFAR_ARRR -// if (len <= op - whave) { -// do { -// output[_out++] = 0; -// } while (--len); -// continue top; -// } -// len -= op - whave; -// do { -// output[_out++] = 0; -// } while (--op > whave); -// if (op === 0) { -// from = _out - dist; -// do { -// output[_out++] = output[from++]; -// } while (--len); -// continue top; -// } -//#endif - } - from = 0; // window index - from_source = s_window; - if (wnext === 0) { /* very common case */ - from += wsize - op; - if (op < len) { /* some from window */ - len -= op; - do { - output[_out++] = s_window[from++]; - } while (--op); - from = _out - dist; /* rest from output */ - from_source = output; - } - } - else if (wnext < op) { /* wrap around window */ - from += wsize + wnext - op; - op -= wnext; - if (op < len) { /* some from end of window */ - len -= op; - do { - output[_out++] = s_window[from++]; - } while (--op); - from = 0; - if (wnext < len) { /* some from start of window */ - op = wnext; - len -= op; - do { - output[_out++] = s_window[from++]; - } while (--op); - from = _out - dist; /* rest from output */ - from_source = output; - } - } - } - else { /* contiguous in window */ - from += wnext - op; - if (op < len) { /* some from window */ - len -= op; - do { - output[_out++] = s_window[from++]; - } while (--op); - from = _out - dist; /* rest from output */ - from_source = output; - } - } - while (len > 2) { - output[_out++] = from_source[from++]; - output[_out++] = from_source[from++]; - output[_out++] = from_source[from++]; - len -= 3; - } - if (len) { - output[_out++] = from_source[from++]; - if (len > 1) { - output[_out++] = from_source[from++]; - } - } - } - else { - from = _out - dist; /* copy direct from output */ - do { /* minimum length is three */ - output[_out++] = output[from++]; - output[_out++] = output[from++]; - output[_out++] = output[from++]; - len -= 3; - } while (len > 2); - if (len) { - output[_out++] = output[from++]; - if (len > 1) { - output[_out++] = output[from++]; - } - } - } - } - else if ((op & 64) === 0) { /* 2nd level distance code */ - here = dcode[(here & 0xffff)/*here.val*/ + (hold & ((1 << op) - 1))]; - continue dodist; - } - else { - strm.msg = 'invalid distance code'; - state.mode = BAD; - break top; - } - - break; // need to emulate goto via "continue" - } - } - else if ((op & 64) === 0) { /* 2nd level length code */ - here = lcode[(here & 0xffff)/*here.val*/ + (hold & ((1 << op) - 1))]; - continue dolen; - } - else if (op & 32) { /* end-of-block */ - //Tracevv((stderr, "inflate: end of block\n")); - state.mode = TYPE; - break top; - } - else { - strm.msg = 'invalid literal/length code'; - state.mode = BAD; - break top; - } - - break; // need to emulate goto via "continue" - } - } while (_in < last && _out < end); - - /* return unused bytes (on entry, bits < 8, so in won't go too far back) */ - len = bits >> 3; - _in -= len; - bits -= len << 3; - hold &= (1 << bits) - 1; - - /* update state and return */ - strm.next_in = _in; - strm.next_out = _out; - strm.avail_in = (_in < last ? 5 + (last - _in) : 5 - (_in - last)); - strm.avail_out = (_out < end ? 257 + (end - _out) : 257 - (_out - end)); - state.hold = hold; - state.bits = bits; - return; -}; diff --git a/node_modules/browserify/node_modules/browserify-zlib/node_modules/pako/lib/zlib/inflate.js b/node_modules/browserify/node_modules/browserify-zlib/node_modules/pako/lib/zlib/inflate.js deleted file mode 100644 index 3be8b62e..00000000 --- a/node_modules/browserify/node_modules/browserify-zlib/node_modules/pako/lib/zlib/inflate.js +++ /dev/null @@ -1,1538 +0,0 @@ -'use strict'; - - -var utils = require('../utils/common'); -var adler32 = require('./adler32'); -var crc32 = require('./crc32'); -var inflate_fast = require('./inffast'); -var inflate_table = require('./inftrees'); - -var CODES = 0; -var LENS = 1; -var DISTS = 2; - -/* Public constants ==========================================================*/ -/* ===========================================================================*/ - - -/* Allowed flush values; see deflate() and inflate() below for details */ -//var Z_NO_FLUSH = 0; -//var Z_PARTIAL_FLUSH = 1; -//var Z_SYNC_FLUSH = 2; -//var Z_FULL_FLUSH = 3; -var Z_FINISH = 4; -var Z_BLOCK = 5; -var Z_TREES = 6; - - -/* Return codes for the compression/decompression functions. Negative values - * are errors, positive values are used for special but normal events. - */ -var Z_OK = 0; -var Z_STREAM_END = 1; -var Z_NEED_DICT = 2; -//var Z_ERRNO = -1; -var Z_STREAM_ERROR = -2; -var Z_DATA_ERROR = -3; -var Z_MEM_ERROR = -4; -var Z_BUF_ERROR = -5; -//var Z_VERSION_ERROR = -6; - -/* The deflate compression method */ -var Z_DEFLATED = 8; - - -/* STATES ====================================================================*/ -/* ===========================================================================*/ - - -var HEAD = 1; /* i: waiting for magic header */ -var FLAGS = 2; /* i: waiting for method and flags (gzip) */ -var TIME = 3; /* i: waiting for modification time (gzip) */ -var OS = 4; /* i: waiting for extra flags and operating system (gzip) */ -var EXLEN = 5; /* i: waiting for extra length (gzip) */ -var EXTRA = 6; /* i: waiting for extra bytes (gzip) */ -var NAME = 7; /* i: waiting for end of file name (gzip) */ -var COMMENT = 8; /* i: waiting for end of comment (gzip) */ -var HCRC = 9; /* i: waiting for header crc (gzip) */ -var DICTID = 10; /* i: waiting for dictionary check value */ -var DICT = 11; /* waiting for inflateSetDictionary() call */ -var TYPE = 12; /* i: waiting for type bits, including last-flag bit */ -var TYPEDO = 13; /* i: same, but skip check to exit inflate on new block */ -var STORED = 14; /* i: waiting for stored size (length and complement) */ -var COPY_ = 15; /* i/o: same as COPY below, but only first time in */ -var COPY = 16; /* i/o: waiting for input or output to copy stored block */ -var TABLE = 17; /* i: waiting for dynamic block table lengths */ -var LENLENS = 18; /* i: waiting for code length code lengths */ -var CODELENS = 19; /* i: waiting for length/lit and distance code lengths */ -var LEN_ = 20; /* i: same as LEN below, but only first time in */ -var LEN = 21; /* i: waiting for length/lit/eob code */ -var LENEXT = 22; /* i: waiting for length extra bits */ -var DIST = 23; /* i: waiting for distance code */ -var DISTEXT = 24; /* i: waiting for distance extra bits */ -var MATCH = 25; /* o: waiting for output space to copy string */ -var LIT = 26; /* o: waiting for output space to write literal */ -var CHECK = 27; /* i: waiting for 32-bit check value */ -var LENGTH = 28; /* i: waiting for 32-bit length (gzip) */ -var DONE = 29; /* finished check, done -- remain here until reset */ -var BAD = 30; /* got a data error -- remain here until reset */ -var MEM = 31; /* got an inflate() memory error -- remain here until reset */ -var SYNC = 32; /* looking for synchronization bytes to restart inflate() */ - -/* ===========================================================================*/ - - - -var ENOUGH_LENS = 852; -var ENOUGH_DISTS = 592; -//var ENOUGH = (ENOUGH_LENS+ENOUGH_DISTS); - -var MAX_WBITS = 15; -/* 32K LZ77 window */ -var DEF_WBITS = MAX_WBITS; - - -function zswap32(q) { - return (((q >>> 24) & 0xff) + - ((q >>> 8) & 0xff00) + - ((q & 0xff00) << 8) + - ((q & 0xff) << 24)); -} - - -function InflateState() { - this.mode = 0; /* current inflate mode */ - this.last = false; /* true if processing last block */ - this.wrap = 0; /* bit 0 true for zlib, bit 1 true for gzip */ - this.havedict = false; /* true if dictionary provided */ - this.flags = 0; /* gzip header method and flags (0 if zlib) */ - this.dmax = 0; /* zlib header max distance (INFLATE_STRICT) */ - this.check = 0; /* protected copy of check value */ - this.total = 0; /* protected copy of output count */ - // TODO: may be {} - this.head = null; /* where to save gzip header information */ - - /* sliding window */ - this.wbits = 0; /* log base 2 of requested window size */ - this.wsize = 0; /* window size or zero if not using window */ - this.whave = 0; /* valid bytes in the window */ - this.wnext = 0; /* window write index */ - this.window = null; /* allocated sliding window, if needed */ - - /* bit accumulator */ - this.hold = 0; /* input bit accumulator */ - this.bits = 0; /* number of bits in "in" */ - - /* for string and stored block copying */ - this.length = 0; /* literal or length of data to copy */ - this.offset = 0; /* distance back to copy string from */ - - /* for table and code decoding */ - this.extra = 0; /* extra bits needed */ - - /* fixed and dynamic code tables */ - this.lencode = null; /* starting table for length/literal codes */ - this.distcode = null; /* starting table for distance codes */ - this.lenbits = 0; /* index bits for lencode */ - this.distbits = 0; /* index bits for distcode */ - - /* dynamic table building */ - this.ncode = 0; /* number of code length code lengths */ - this.nlen = 0; /* number of length code lengths */ - this.ndist = 0; /* number of distance code lengths */ - this.have = 0; /* number of code lengths in lens[] */ - this.next = null; /* next available space in codes[] */ - - this.lens = new utils.Buf16(320); /* temporary storage for code lengths */ - this.work = new utils.Buf16(288); /* work area for code table building */ - - /* - because we don't have pointers in js, we use lencode and distcode directly - as buffers so we don't need codes - */ - //this.codes = new utils.Buf32(ENOUGH); /* space for code tables */ - this.lendyn = null; /* dynamic table for length/literal codes (JS specific) */ - this.distdyn = null; /* dynamic table for distance codes (JS specific) */ - this.sane = 0; /* if false, allow invalid distance too far */ - this.back = 0; /* bits back of last unprocessed length/lit */ - this.was = 0; /* initial length of match */ -} - -function inflateResetKeep(strm) { - var state; - - if (!strm || !strm.state) { return Z_STREAM_ERROR; } - state = strm.state; - strm.total_in = strm.total_out = state.total = 0; - strm.msg = ''; /*Z_NULL*/ - if (state.wrap) { /* to support ill-conceived Java test suite */ - strm.adler = state.wrap & 1; - } - state.mode = HEAD; - state.last = 0; - state.havedict = 0; - state.dmax = 32768; - state.head = null/*Z_NULL*/; - state.hold = 0; - state.bits = 0; - //state.lencode = state.distcode = state.next = state.codes; - state.lencode = state.lendyn = new utils.Buf32(ENOUGH_LENS); - state.distcode = state.distdyn = new utils.Buf32(ENOUGH_DISTS); - - state.sane = 1; - state.back = -1; - //Tracev((stderr, "inflate: reset\n")); - return Z_OK; -} - -function inflateReset(strm) { - var state; - - if (!strm || !strm.state) { return Z_STREAM_ERROR; } - state = strm.state; - state.wsize = 0; - state.whave = 0; - state.wnext = 0; - return inflateResetKeep(strm); - -} - -function inflateReset2(strm, windowBits) { - var wrap; - var state; - - /* get the state */ - if (!strm || !strm.state) { return Z_STREAM_ERROR; } - state = strm.state; - - /* extract wrap request from windowBits parameter */ - if (windowBits < 0) { - wrap = 0; - windowBits = -windowBits; - } - else { - wrap = (windowBits >> 4) + 1; - if (windowBits < 48) { - windowBits &= 15; - } - } - - /* set number of window bits, free window if different */ - if (windowBits && (windowBits < 8 || windowBits > 15)) { - return Z_STREAM_ERROR; - } - if (state.window !== null && state.wbits !== windowBits) { - state.window = null; - } - - /* update state and reset the rest of it */ - state.wrap = wrap; - state.wbits = windowBits; - return inflateReset(strm); -} - -function inflateInit2(strm, windowBits) { - var ret; - var state; - - if (!strm) { return Z_STREAM_ERROR; } - //strm.msg = Z_NULL; /* in case we return an error */ - - state = new InflateState(); - - //if (state === Z_NULL) return Z_MEM_ERROR; - //Tracev((stderr, "inflate: allocated\n")); - strm.state = state; - state.window = null/*Z_NULL*/; - ret = inflateReset2(strm, windowBits); - if (ret !== Z_OK) { - strm.state = null/*Z_NULL*/; - } - return ret; -} - -function inflateInit(strm) { - return inflateInit2(strm, DEF_WBITS); -} - - -/* - Return state with length and distance decoding tables and index sizes set to - fixed code decoding. Normally this returns fixed tables from inffixed.h. - If BUILDFIXED is defined, then instead this routine builds the tables the - first time it's called, and returns those tables the first time and - thereafter. This reduces the size of the code by about 2K bytes, in - exchange for a little execution time. However, BUILDFIXED should not be - used for threaded applications, since the rewriting of the tables and virgin - may not be thread-safe. - */ -var virgin = true; - -var lenfix, distfix; // We have no pointers in JS, so keep tables separate - -function fixedtables(state) { - /* build fixed huffman tables if first call (may not be thread safe) */ - if (virgin) { - var sym; - - lenfix = new utils.Buf32(512); - distfix = new utils.Buf32(32); - - /* literal/length table */ - sym = 0; - while (sym < 144) { state.lens[sym++] = 8; } - while (sym < 256) { state.lens[sym++] = 9; } - while (sym < 280) { state.lens[sym++] = 7; } - while (sym < 288) { state.lens[sym++] = 8; } - - inflate_table(LENS, state.lens, 0, 288, lenfix, 0, state.work, { bits: 9 }); - - /* distance table */ - sym = 0; - while (sym < 32) { state.lens[sym++] = 5; } - - inflate_table(DISTS, state.lens, 0, 32, distfix, 0, state.work, { bits: 5 }); - - /* do this just once */ - virgin = false; - } - - state.lencode = lenfix; - state.lenbits = 9; - state.distcode = distfix; - state.distbits = 5; -} - - -/* - Update the window with the last wsize (normally 32K) bytes written before - returning. If window does not exist yet, create it. This is only called - when a window is already in use, or when output has been written during this - inflate call, but the end of the deflate stream has not been reached yet. - It is also called to create a window for dictionary data when a dictionary - is loaded. - - Providing output buffers larger than 32K to inflate() should provide a speed - advantage, since only the last 32K of output is copied to the sliding window - upon return from inflate(), and since all distances after the first 32K of - output will fall in the output data, making match copies simpler and faster. - The advantage may be dependent on the size of the processor's data caches. - */ -function updatewindow(strm, src, end, copy) { - var dist; - var state = strm.state; - - /* if it hasn't been done already, allocate space for the window */ - if (state.window === null) { - state.wsize = 1 << state.wbits; - state.wnext = 0; - state.whave = 0; - - state.window = new utils.Buf8(state.wsize); - } - - /* copy state->wsize or less output bytes into the circular window */ - if (copy >= state.wsize) { - utils.arraySet(state.window, src, end - state.wsize, state.wsize, 0); - state.wnext = 0; - state.whave = state.wsize; - } - else { - dist = state.wsize - state.wnext; - if (dist > copy) { - dist = copy; - } - //zmemcpy(state->window + state->wnext, end - copy, dist); - utils.arraySet(state.window, src, end - copy, dist, state.wnext); - copy -= dist; - if (copy) { - //zmemcpy(state->window, end - copy, copy); - utils.arraySet(state.window, src, end - copy, copy, 0); - state.wnext = copy; - state.whave = state.wsize; - } - else { - state.wnext += dist; - if (state.wnext === state.wsize) { state.wnext = 0; } - if (state.whave < state.wsize) { state.whave += dist; } - } - } - return 0; -} - -function inflate(strm, flush) { - var state; - var input, output; // input/output buffers - var next; /* next input INDEX */ - var put; /* next output INDEX */ - var have, left; /* available input and output */ - var hold; /* bit buffer */ - var bits; /* bits in bit buffer */ - var _in, _out; /* save starting available input and output */ - var copy; /* number of stored or match bytes to copy */ - var from; /* where to copy match bytes from */ - var from_source; - var here = 0; /* current decoding table entry */ - var here_bits, here_op, here_val; // paked "here" denormalized (JS specific) - //var last; /* parent table entry */ - var last_bits, last_op, last_val; // paked "last" denormalized (JS specific) - var len; /* length to copy for repeats, bits to drop */ - var ret; /* return code */ - var hbuf = new utils.Buf8(4); /* buffer for gzip header crc calculation */ - var opts; - - var n; // temporary var for NEED_BITS - - var order = /* permutation of code lengths */ - [ 16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15 ]; - - - if (!strm || !strm.state || !strm.output || - (!strm.input && strm.avail_in !== 0)) { - return Z_STREAM_ERROR; - } - - state = strm.state; - if (state.mode === TYPE) { state.mode = TYPEDO; } /* skip check */ - - - //--- LOAD() --- - put = strm.next_out; - output = strm.output; - left = strm.avail_out; - next = strm.next_in; - input = strm.input; - have = strm.avail_in; - hold = state.hold; - bits = state.bits; - //--- - - _in = have; - _out = left; - ret = Z_OK; - - inf_leave: // goto emulation - for (;;) { - switch (state.mode) { - case HEAD: - if (state.wrap === 0) { - state.mode = TYPEDO; - break; - } - //=== NEEDBITS(16); - while (bits < 16) { - if (have === 0) { break inf_leave; } - have--; - hold += input[next++] << bits; - bits += 8; - } - //===// - if ((state.wrap & 2) && hold === 0x8b1f) { /* gzip header */ - state.check = 0/*crc32(0L, Z_NULL, 0)*/; - //=== CRC2(state.check, hold); - hbuf[0] = hold & 0xff; - hbuf[1] = (hold >>> 8) & 0xff; - state.check = crc32(state.check, hbuf, 2, 0); - //===// - - //=== INITBITS(); - hold = 0; - bits = 0; - //===// - state.mode = FLAGS; - break; - } - state.flags = 0; /* expect zlib header */ - if (state.head) { - state.head.done = false; - } - if (!(state.wrap & 1) || /* check if zlib header allowed */ - (((hold & 0xff)/*BITS(8)*/ << 8) + (hold >> 8)) % 31) { - strm.msg = 'incorrect header check'; - state.mode = BAD; - break; - } - if ((hold & 0x0f)/*BITS(4)*/ !== Z_DEFLATED) { - strm.msg = 'unknown compression method'; - state.mode = BAD; - break; - } - //--- DROPBITS(4) ---// - hold >>>= 4; - bits -= 4; - //---// - len = (hold & 0x0f)/*BITS(4)*/ + 8; - if (state.wbits === 0) { - state.wbits = len; - } - else if (len > state.wbits) { - strm.msg = 'invalid window size'; - state.mode = BAD; - break; - } - state.dmax = 1 << len; - //Tracev((stderr, "inflate: zlib header ok\n")); - strm.adler = state.check = 1/*adler32(0L, Z_NULL, 0)*/; - state.mode = hold & 0x200 ? DICTID : TYPE; - //=== INITBITS(); - hold = 0; - bits = 0; - //===// - break; - case FLAGS: - //=== NEEDBITS(16); */ - while (bits < 16) { - if (have === 0) { break inf_leave; } - have--; - hold += input[next++] << bits; - bits += 8; - } - //===// - state.flags = hold; - if ((state.flags & 0xff) !== Z_DEFLATED) { - strm.msg = 'unknown compression method'; - state.mode = BAD; - break; - } - if (state.flags & 0xe000) { - strm.msg = 'unknown header flags set'; - state.mode = BAD; - break; - } - if (state.head) { - state.head.text = ((hold >> 8) & 1); - } - if (state.flags & 0x0200) { - //=== CRC2(state.check, hold); - hbuf[0] = hold & 0xff; - hbuf[1] = (hold >>> 8) & 0xff; - state.check = crc32(state.check, hbuf, 2, 0); - //===// - } - //=== INITBITS(); - hold = 0; - bits = 0; - //===// - state.mode = TIME; - /* falls through */ - case TIME: - //=== NEEDBITS(32); */ - while (bits < 32) { - if (have === 0) { break inf_leave; } - have--; - hold += input[next++] << bits; - bits += 8; - } - //===// - if (state.head) { - state.head.time = hold; - } - if (state.flags & 0x0200) { - //=== CRC4(state.check, hold) - hbuf[0] = hold & 0xff; - hbuf[1] = (hold >>> 8) & 0xff; - hbuf[2] = (hold >>> 16) & 0xff; - hbuf[3] = (hold >>> 24) & 0xff; - state.check = crc32(state.check, hbuf, 4, 0); - //=== - } - //=== INITBITS(); - hold = 0; - bits = 0; - //===// - state.mode = OS; - /* falls through */ - case OS: - //=== NEEDBITS(16); */ - while (bits < 16) { - if (have === 0) { break inf_leave; } - have--; - hold += input[next++] << bits; - bits += 8; - } - //===// - if (state.head) { - state.head.xflags = (hold & 0xff); - state.head.os = (hold >> 8); - } - if (state.flags & 0x0200) { - //=== CRC2(state.check, hold); - hbuf[0] = hold & 0xff; - hbuf[1] = (hold >>> 8) & 0xff; - state.check = crc32(state.check, hbuf, 2, 0); - //===// - } - //=== INITBITS(); - hold = 0; - bits = 0; - //===// - state.mode = EXLEN; - /* falls through */ - case EXLEN: - if (state.flags & 0x0400) { - //=== NEEDBITS(16); */ - while (bits < 16) { - if (have === 0) { break inf_leave; } - have--; - hold += input[next++] << bits; - bits += 8; - } - //===// - state.length = hold; - if (state.head) { - state.head.extra_len = hold; - } - if (state.flags & 0x0200) { - //=== CRC2(state.check, hold); - hbuf[0] = hold & 0xff; - hbuf[1] = (hold >>> 8) & 0xff; - state.check = crc32(state.check, hbuf, 2, 0); - //===// - } - //=== INITBITS(); - hold = 0; - bits = 0; - //===// - } - else if (state.head) { - state.head.extra = null/*Z_NULL*/; - } - state.mode = EXTRA; - /* falls through */ - case EXTRA: - if (state.flags & 0x0400) { - copy = state.length; - if (copy > have) { copy = have; } - if (copy) { - if (state.head) { - len = state.head.extra_len - state.length; - if (!state.head.extra) { - // Use untyped array for more conveniend processing later - state.head.extra = new Array(state.head.extra_len); - } - utils.arraySet( - state.head.extra, - input, - next, - // extra field is limited to 65536 bytes - // - no need for additional size check - copy, - /*len + copy > state.head.extra_max - len ? state.head.extra_max : copy,*/ - len - ); - //zmemcpy(state.head.extra + len, next, - // len + copy > state.head.extra_max ? - // state.head.extra_max - len : copy); - } - if (state.flags & 0x0200) { - state.check = crc32(state.check, input, copy, next); - } - have -= copy; - next += copy; - state.length -= copy; - } - if (state.length) { break inf_leave; } - } - state.length = 0; - state.mode = NAME; - /* falls through */ - case NAME: - if (state.flags & 0x0800) { - if (have === 0) { break inf_leave; } - copy = 0; - do { - // TODO: 2 or 1 bytes? - len = input[next + copy++]; - /* use constant limit because in js we should not preallocate memory */ - if (state.head && len && - (state.length < 65536 /*state.head.name_max*/)) { - state.head.name += String.fromCharCode(len); - } - } while (len && copy < have); - - if (state.flags & 0x0200) { - state.check = crc32(state.check, input, copy, next); - } - have -= copy; - next += copy; - if (len) { break inf_leave; } - } - else if (state.head) { - state.head.name = null; - } - state.length = 0; - state.mode = COMMENT; - /* falls through */ - case COMMENT: - if (state.flags & 0x1000) { - if (have === 0) { break inf_leave; } - copy = 0; - do { - len = input[next + copy++]; - /* use constant limit because in js we should not preallocate memory */ - if (state.head && len && - (state.length < 65536 /*state.head.comm_max*/)) { - state.head.comment += String.fromCharCode(len); - } - } while (len && copy < have); - if (state.flags & 0x0200) { - state.check = crc32(state.check, input, copy, next); - } - have -= copy; - next += copy; - if (len) { break inf_leave; } - } - else if (state.head) { - state.head.comment = null; - } - state.mode = HCRC; - /* falls through */ - case HCRC: - if (state.flags & 0x0200) { - //=== NEEDBITS(16); */ - while (bits < 16) { - if (have === 0) { break inf_leave; } - have--; - hold += input[next++] << bits; - bits += 8; - } - //===// - if (hold !== (state.check & 0xffff)) { - strm.msg = 'header crc mismatch'; - state.mode = BAD; - break; - } - //=== INITBITS(); - hold = 0; - bits = 0; - //===// - } - if (state.head) { - state.head.hcrc = ((state.flags >> 9) & 1); - state.head.done = true; - } - strm.adler = state.check = 0; - state.mode = TYPE; - break; - case DICTID: - //=== NEEDBITS(32); */ - while (bits < 32) { - if (have === 0) { break inf_leave; } - have--; - hold += input[next++] << bits; - bits += 8; - } - //===// - strm.adler = state.check = zswap32(hold); - //=== INITBITS(); - hold = 0; - bits = 0; - //===// - state.mode = DICT; - /* falls through */ - case DICT: - if (state.havedict === 0) { - //--- RESTORE() --- - strm.next_out = put; - strm.avail_out = left; - strm.next_in = next; - strm.avail_in = have; - state.hold = hold; - state.bits = bits; - //--- - return Z_NEED_DICT; - } - strm.adler = state.check = 1/*adler32(0L, Z_NULL, 0)*/; - state.mode = TYPE; - /* falls through */ - case TYPE: - if (flush === Z_BLOCK || flush === Z_TREES) { break inf_leave; } - /* falls through */ - case TYPEDO: - if (state.last) { - //--- BYTEBITS() ---// - hold >>>= bits & 7; - bits -= bits & 7; - //---// - state.mode = CHECK; - break; - } - //=== NEEDBITS(3); */ - while (bits < 3) { - if (have === 0) { break inf_leave; } - have--; - hold += input[next++] << bits; - bits += 8; - } - //===// - state.last = (hold & 0x01)/*BITS(1)*/; - //--- DROPBITS(1) ---// - hold >>>= 1; - bits -= 1; - //---// - - switch ((hold & 0x03)/*BITS(2)*/) { - case 0: /* stored block */ - //Tracev((stderr, "inflate: stored block%s\n", - // state.last ? " (last)" : "")); - state.mode = STORED; - break; - case 1: /* fixed block */ - fixedtables(state); - //Tracev((stderr, "inflate: fixed codes block%s\n", - // state.last ? " (last)" : "")); - state.mode = LEN_; /* decode codes */ - if (flush === Z_TREES) { - //--- DROPBITS(2) ---// - hold >>>= 2; - bits -= 2; - //---// - break inf_leave; - } - break; - case 2: /* dynamic block */ - //Tracev((stderr, "inflate: dynamic codes block%s\n", - // state.last ? " (last)" : "")); - state.mode = TABLE; - break; - case 3: - strm.msg = 'invalid block type'; - state.mode = BAD; - } - //--- DROPBITS(2) ---// - hold >>>= 2; - bits -= 2; - //---// - break; - case STORED: - //--- BYTEBITS() ---// /* go to byte boundary */ - hold >>>= bits & 7; - bits -= bits & 7; - //---// - //=== NEEDBITS(32); */ - while (bits < 32) { - if (have === 0) { break inf_leave; } - have--; - hold += input[next++] << bits; - bits += 8; - } - //===// - if ((hold & 0xffff) !== ((hold >>> 16) ^ 0xffff)) { - strm.msg = 'invalid stored block lengths'; - state.mode = BAD; - break; - } - state.length = hold & 0xffff; - //Tracev((stderr, "inflate: stored length %u\n", - // state.length)); - //=== INITBITS(); - hold = 0; - bits = 0; - //===// - state.mode = COPY_; - if (flush === Z_TREES) { break inf_leave; } - /* falls through */ - case COPY_: - state.mode = COPY; - /* falls through */ - case COPY: - copy = state.length; - if (copy) { - if (copy > have) { copy = have; } - if (copy > left) { copy = left; } - if (copy === 0) { break inf_leave; } - //--- zmemcpy(put, next, copy); --- - utils.arraySet(output, input, next, copy, put); - //---// - have -= copy; - next += copy; - left -= copy; - put += copy; - state.length -= copy; - break; - } - //Tracev((stderr, "inflate: stored end\n")); - state.mode = TYPE; - break; - case TABLE: - //=== NEEDBITS(14); */ - while (bits < 14) { - if (have === 0) { break inf_leave; } - have--; - hold += input[next++] << bits; - bits += 8; - } - //===// - state.nlen = (hold & 0x1f)/*BITS(5)*/ + 257; - //--- DROPBITS(5) ---// - hold >>>= 5; - bits -= 5; - //---// - state.ndist = (hold & 0x1f)/*BITS(5)*/ + 1; - //--- DROPBITS(5) ---// - hold >>>= 5; - bits -= 5; - //---// - state.ncode = (hold & 0x0f)/*BITS(4)*/ + 4; - //--- DROPBITS(4) ---// - hold >>>= 4; - bits -= 4; - //---// -//#ifndef PKZIP_BUG_WORKAROUND - if (state.nlen > 286 || state.ndist > 30) { - strm.msg = 'too many length or distance symbols'; - state.mode = BAD; - break; - } -//#endif - //Tracev((stderr, "inflate: table sizes ok\n")); - state.have = 0; - state.mode = LENLENS; - /* falls through */ - case LENLENS: - while (state.have < state.ncode) { - //=== NEEDBITS(3); - while (bits < 3) { - if (have === 0) { break inf_leave; } - have--; - hold += input[next++] << bits; - bits += 8; - } - //===// - state.lens[order[state.have++]] = (hold & 0x07);//BITS(3); - //--- DROPBITS(3) ---// - hold >>>= 3; - bits -= 3; - //---// - } - while (state.have < 19) { - state.lens[order[state.have++]] = 0; - } - // We have separate tables & no pointers. 2 commented lines below not needed. - //state.next = state.codes; - //state.lencode = state.next; - // Switch to use dynamic table - state.lencode = state.lendyn; - state.lenbits = 7; - - opts = { bits: state.lenbits }; - ret = inflate_table(CODES, state.lens, 0, 19, state.lencode, 0, state.work, opts); - state.lenbits = opts.bits; - - if (ret) { - strm.msg = 'invalid code lengths set'; - state.mode = BAD; - break; - } - //Tracev((stderr, "inflate: code lengths ok\n")); - state.have = 0; - state.mode = CODELENS; - /* falls through */ - case CODELENS: - while (state.have < state.nlen + state.ndist) { - for (;;) { - here = state.lencode[hold & ((1 << state.lenbits) - 1)];/*BITS(state.lenbits)*/ - here_bits = here >>> 24; - here_op = (here >>> 16) & 0xff; - here_val = here & 0xffff; - - if ((here_bits) <= bits) { break; } - //--- PULLBYTE() ---// - if (have === 0) { break inf_leave; } - have--; - hold += input[next++] << bits; - bits += 8; - //---// - } - if (here_val < 16) { - //--- DROPBITS(here.bits) ---// - hold >>>= here_bits; - bits -= here_bits; - //---// - state.lens[state.have++] = here_val; - } - else { - if (here_val === 16) { - //=== NEEDBITS(here.bits + 2); - n = here_bits + 2; - while (bits < n) { - if (have === 0) { break inf_leave; } - have--; - hold += input[next++] << bits; - bits += 8; - } - //===// - //--- DROPBITS(here.bits) ---// - hold >>>= here_bits; - bits -= here_bits; - //---// - if (state.have === 0) { - strm.msg = 'invalid bit length repeat'; - state.mode = BAD; - break; - } - len = state.lens[state.have - 1]; - copy = 3 + (hold & 0x03);//BITS(2); - //--- DROPBITS(2) ---// - hold >>>= 2; - bits -= 2; - //---// - } - else if (here_val === 17) { - //=== NEEDBITS(here.bits + 3); - n = here_bits + 3; - while (bits < n) { - if (have === 0) { break inf_leave; } - have--; - hold += input[next++] << bits; - bits += 8; - } - //===// - //--- DROPBITS(here.bits) ---// - hold >>>= here_bits; - bits -= here_bits; - //---// - len = 0; - copy = 3 + (hold & 0x07);//BITS(3); - //--- DROPBITS(3) ---// - hold >>>= 3; - bits -= 3; - //---// - } - else { - //=== NEEDBITS(here.bits + 7); - n = here_bits + 7; - while (bits < n) { - if (have === 0) { break inf_leave; } - have--; - hold += input[next++] << bits; - bits += 8; - } - //===// - //--- DROPBITS(here.bits) ---// - hold >>>= here_bits; - bits -= here_bits; - //---// - len = 0; - copy = 11 + (hold & 0x7f);//BITS(7); - //--- DROPBITS(7) ---// - hold >>>= 7; - bits -= 7; - //---// - } - if (state.have + copy > state.nlen + state.ndist) { - strm.msg = 'invalid bit length repeat'; - state.mode = BAD; - break; - } - while (copy--) { - state.lens[state.have++] = len; - } - } - } - - /* handle error breaks in while */ - if (state.mode === BAD) { break; } - - /* check for end-of-block code (better have one) */ - if (state.lens[256] === 0) { - strm.msg = 'invalid code -- missing end-of-block'; - state.mode = BAD; - break; - } - - /* build code tables -- note: do not change the lenbits or distbits - values here (9 and 6) without reading the comments in inftrees.h - concerning the ENOUGH constants, which depend on those values */ - state.lenbits = 9; - - opts = { bits: state.lenbits }; - ret = inflate_table(LENS, state.lens, 0, state.nlen, state.lencode, 0, state.work, opts); - // We have separate tables & no pointers. 2 commented lines below not needed. - // state.next_index = opts.table_index; - state.lenbits = opts.bits; - // state.lencode = state.next; - - if (ret) { - strm.msg = 'invalid literal/lengths set'; - state.mode = BAD; - break; - } - - state.distbits = 6; - //state.distcode.copy(state.codes); - // Switch to use dynamic table - state.distcode = state.distdyn; - opts = { bits: state.distbits }; - ret = inflate_table(DISTS, state.lens, state.nlen, state.ndist, state.distcode, 0, state.work, opts); - // We have separate tables & no pointers. 2 commented lines below not needed. - // state.next_index = opts.table_index; - state.distbits = opts.bits; - // state.distcode = state.next; - - if (ret) { - strm.msg = 'invalid distances set'; - state.mode = BAD; - break; - } - //Tracev((stderr, 'inflate: codes ok\n')); - state.mode = LEN_; - if (flush === Z_TREES) { break inf_leave; } - /* falls through */ - case LEN_: - state.mode = LEN; - /* falls through */ - case LEN: - if (have >= 6 && left >= 258) { - //--- RESTORE() --- - strm.next_out = put; - strm.avail_out = left; - strm.next_in = next; - strm.avail_in = have; - state.hold = hold; - state.bits = bits; - //--- - inflate_fast(strm, _out); - //--- LOAD() --- - put = strm.next_out; - output = strm.output; - left = strm.avail_out; - next = strm.next_in; - input = strm.input; - have = strm.avail_in; - hold = state.hold; - bits = state.bits; - //--- - - if (state.mode === TYPE) { - state.back = -1; - } - break; - } - state.back = 0; - for (;;) { - here = state.lencode[hold & ((1 << state.lenbits) - 1)]; /*BITS(state.lenbits)*/ - here_bits = here >>> 24; - here_op = (here >>> 16) & 0xff; - here_val = here & 0xffff; - - if (here_bits <= bits) { break; } - //--- PULLBYTE() ---// - if (have === 0) { break inf_leave; } - have--; - hold += input[next++] << bits; - bits += 8; - //---// - } - if (here_op && (here_op & 0xf0) === 0) { - last_bits = here_bits; - last_op = here_op; - last_val = here_val; - for (;;) { - here = state.lencode[last_val + - ((hold & ((1 << (last_bits + last_op)) - 1))/*BITS(last.bits + last.op)*/ >> last_bits)]; - here_bits = here >>> 24; - here_op = (here >>> 16) & 0xff; - here_val = here & 0xffff; - - if ((last_bits + here_bits) <= bits) { break; } - //--- PULLBYTE() ---// - if (have === 0) { break inf_leave; } - have--; - hold += input[next++] << bits; - bits += 8; - //---// - } - //--- DROPBITS(last.bits) ---// - hold >>>= last_bits; - bits -= last_bits; - //---// - state.back += last_bits; - } - //--- DROPBITS(here.bits) ---// - hold >>>= here_bits; - bits -= here_bits; - //---// - state.back += here_bits; - state.length = here_val; - if (here_op === 0) { - //Tracevv((stderr, here.val >= 0x20 && here.val < 0x7f ? - // "inflate: literal '%c'\n" : - // "inflate: literal 0x%02x\n", here.val)); - state.mode = LIT; - break; - } - if (here_op & 32) { - //Tracevv((stderr, "inflate: end of block\n")); - state.back = -1; - state.mode = TYPE; - break; - } - if (here_op & 64) { - strm.msg = 'invalid literal/length code'; - state.mode = BAD; - break; - } - state.extra = here_op & 15; - state.mode = LENEXT; - /* falls through */ - case LENEXT: - if (state.extra) { - //=== NEEDBITS(state.extra); - n = state.extra; - while (bits < n) { - if (have === 0) { break inf_leave; } - have--; - hold += input[next++] << bits; - bits += 8; - } - //===// - state.length += hold & ((1 << state.extra) - 1)/*BITS(state.extra)*/; - //--- DROPBITS(state.extra) ---// - hold >>>= state.extra; - bits -= state.extra; - //---// - state.back += state.extra; - } - //Tracevv((stderr, "inflate: length %u\n", state.length)); - state.was = state.length; - state.mode = DIST; - /* falls through */ - case DIST: - for (;;) { - here = state.distcode[hold & ((1 << state.distbits) - 1)];/*BITS(state.distbits)*/ - here_bits = here >>> 24; - here_op = (here >>> 16) & 0xff; - here_val = here & 0xffff; - - if ((here_bits) <= bits) { break; } - //--- PULLBYTE() ---// - if (have === 0) { break inf_leave; } - have--; - hold += input[next++] << bits; - bits += 8; - //---// - } - if ((here_op & 0xf0) === 0) { - last_bits = here_bits; - last_op = here_op; - last_val = here_val; - for (;;) { - here = state.distcode[last_val + - ((hold & ((1 << (last_bits + last_op)) - 1))/*BITS(last.bits + last.op)*/ >> last_bits)]; - here_bits = here >>> 24; - here_op = (here >>> 16) & 0xff; - here_val = here & 0xffff; - - if ((last_bits + here_bits) <= bits) { break; } - //--- PULLBYTE() ---// - if (have === 0) { break inf_leave; } - have--; - hold += input[next++] << bits; - bits += 8; - //---// - } - //--- DROPBITS(last.bits) ---// - hold >>>= last_bits; - bits -= last_bits; - //---// - state.back += last_bits; - } - //--- DROPBITS(here.bits) ---// - hold >>>= here_bits; - bits -= here_bits; - //---// - state.back += here_bits; - if (here_op & 64) { - strm.msg = 'invalid distance code'; - state.mode = BAD; - break; - } - state.offset = here_val; - state.extra = (here_op) & 15; - state.mode = DISTEXT; - /* falls through */ - case DISTEXT: - if (state.extra) { - //=== NEEDBITS(state.extra); - n = state.extra; - while (bits < n) { - if (have === 0) { break inf_leave; } - have--; - hold += input[next++] << bits; - bits += 8; - } - //===// - state.offset += hold & ((1 << state.extra) - 1)/*BITS(state.extra)*/; - //--- DROPBITS(state.extra) ---// - hold >>>= state.extra; - bits -= state.extra; - //---// - state.back += state.extra; - } -//#ifdef INFLATE_STRICT - if (state.offset > state.dmax) { - strm.msg = 'invalid distance too far back'; - state.mode = BAD; - break; - } -//#endif - //Tracevv((stderr, "inflate: distance %u\n", state.offset)); - state.mode = MATCH; - /* falls through */ - case MATCH: - if (left === 0) { break inf_leave; } - copy = _out - left; - if (state.offset > copy) { /* copy from window */ - copy = state.offset - copy; - if (copy > state.whave) { - if (state.sane) { - strm.msg = 'invalid distance too far back'; - state.mode = BAD; - break; - } -// (!) This block is disabled in zlib defailts, -// don't enable it for binary compatibility -//#ifdef INFLATE_ALLOW_INVALID_DISTANCE_TOOFAR_ARRR -// Trace((stderr, "inflate.c too far\n")); -// copy -= state.whave; -// if (copy > state.length) { copy = state.length; } -// if (copy > left) { copy = left; } -// left -= copy; -// state.length -= copy; -// do { -// output[put++] = 0; -// } while (--copy); -// if (state.length === 0) { state.mode = LEN; } -// break; -//#endif - } - if (copy > state.wnext) { - copy -= state.wnext; - from = state.wsize - copy; - } - else { - from = state.wnext - copy; - } - if (copy > state.length) { copy = state.length; } - from_source = state.window; - } - else { /* copy from output */ - from_source = output; - from = put - state.offset; - copy = state.length; - } - if (copy > left) { copy = left; } - left -= copy; - state.length -= copy; - do { - output[put++] = from_source[from++]; - } while (--copy); - if (state.length === 0) { state.mode = LEN; } - break; - case LIT: - if (left === 0) { break inf_leave; } - output[put++] = state.length; - left--; - state.mode = LEN; - break; - case CHECK: - if (state.wrap) { - //=== NEEDBITS(32); - while (bits < 32) { - if (have === 0) { break inf_leave; } - have--; - // Use '|' insdead of '+' to make sure that result is signed - hold |= input[next++] << bits; - bits += 8; - } - //===// - _out -= left; - strm.total_out += _out; - state.total += _out; - if (_out) { - strm.adler = state.check = - /*UPDATE(state.check, put - _out, _out);*/ - (state.flags ? crc32(state.check, output, _out, put - _out) : adler32(state.check, output, _out, put - _out)); - - } - _out = left; - // NB: crc32 stored as signed 32-bit int, zswap32 returns signed too - if ((state.flags ? hold : zswap32(hold)) !== state.check) { - strm.msg = 'incorrect data check'; - state.mode = BAD; - break; - } - //=== INITBITS(); - hold = 0; - bits = 0; - //===// - //Tracev((stderr, "inflate: check matches trailer\n")); - } - state.mode = LENGTH; - /* falls through */ - case LENGTH: - if (state.wrap && state.flags) { - //=== NEEDBITS(32); - while (bits < 32) { - if (have === 0) { break inf_leave; } - have--; - hold += input[next++] << bits; - bits += 8; - } - //===// - if (hold !== (state.total & 0xffffffff)) { - strm.msg = 'incorrect length check'; - state.mode = BAD; - break; - } - //=== INITBITS(); - hold = 0; - bits = 0; - //===// - //Tracev((stderr, "inflate: length matches trailer\n")); - } - state.mode = DONE; - /* falls through */ - case DONE: - ret = Z_STREAM_END; - break inf_leave; - case BAD: - ret = Z_DATA_ERROR; - break inf_leave; - case MEM: - return Z_MEM_ERROR; - case SYNC: - /* falls through */ - default: - return Z_STREAM_ERROR; - } - } - - // inf_leave <- here is real place for "goto inf_leave", emulated via "break inf_leave" - - /* - Return from inflate(), updating the total counts and the check value. - If there was no progress during the inflate() call, return a buffer - error. Call updatewindow() to create and/or update the window state. - Note: a memory error from inflate() is non-recoverable. - */ - - //--- RESTORE() --- - strm.next_out = put; - strm.avail_out = left; - strm.next_in = next; - strm.avail_in = have; - state.hold = hold; - state.bits = bits; - //--- - - if (state.wsize || (_out !== strm.avail_out && state.mode < BAD && - (state.mode < CHECK || flush !== Z_FINISH))) { - if (updatewindow(strm, strm.output, strm.next_out, _out - strm.avail_out)) { - state.mode = MEM; - return Z_MEM_ERROR; - } - } - _in -= strm.avail_in; - _out -= strm.avail_out; - strm.total_in += _in; - strm.total_out += _out; - state.total += _out; - if (state.wrap && _out) { - strm.adler = state.check = /*UPDATE(state.check, strm.next_out - _out, _out);*/ - (state.flags ? crc32(state.check, output, _out, strm.next_out - _out) : adler32(state.check, output, _out, strm.next_out - _out)); - } - strm.data_type = state.bits + (state.last ? 64 : 0) + - (state.mode === TYPE ? 128 : 0) + - (state.mode === LEN_ || state.mode === COPY_ ? 256 : 0); - if (((_in === 0 && _out === 0) || flush === Z_FINISH) && ret === Z_OK) { - ret = Z_BUF_ERROR; - } - return ret; -} - -function inflateEnd(strm) { - - if (!strm || !strm.state /*|| strm->zfree == (free_func)0*/) { - return Z_STREAM_ERROR; - } - - var state = strm.state; - if (state.window) { - state.window = null; - } - strm.state = null; - return Z_OK; -} - -function inflateGetHeader(strm, head) { - var state; - - /* check state */ - if (!strm || !strm.state) { return Z_STREAM_ERROR; } - state = strm.state; - if ((state.wrap & 2) === 0) { return Z_STREAM_ERROR; } - - /* save header structure */ - state.head = head; - head.done = false; - return Z_OK; -} - -function inflateSetDictionary(strm, dictionary) { - var dictLength = dictionary.length; - - var state; - var dictid; - var ret; - - /* check state */ - if (!strm /* == Z_NULL */ || !strm.state /* == Z_NULL */) { return Z_STREAM_ERROR; } - state = strm.state; - - if (state.wrap !== 0 && state.mode !== DICT) { - return Z_STREAM_ERROR; - } - - /* check for correct dictionary identifier */ - if (state.mode === DICT) { - dictid = 1; /* adler32(0, null, 0)*/ - /* dictid = adler32(dictid, dictionary, dictLength); */ - dictid = adler32(dictid, dictionary, dictLength, 0); - if (dictid !== state.check) { - return Z_DATA_ERROR; - } - } - /* copy dictionary to window using updatewindow(), which will amend the - existing dictionary if appropriate */ - ret = updatewindow(strm, dictionary, dictLength, dictLength); - if (ret) { - state.mode = MEM; - return Z_MEM_ERROR; - } - state.havedict = 1; - // Tracev((stderr, "inflate: dictionary set\n")); - return Z_OK; -} - -exports.inflateReset = inflateReset; -exports.inflateReset2 = inflateReset2; -exports.inflateResetKeep = inflateResetKeep; -exports.inflateInit = inflateInit; -exports.inflateInit2 = inflateInit2; -exports.inflate = inflate; -exports.inflateEnd = inflateEnd; -exports.inflateGetHeader = inflateGetHeader; -exports.inflateSetDictionary = inflateSetDictionary; -exports.inflateInfo = 'pako inflate (from Nodeca project)'; - -/* Not implemented -exports.inflateCopy = inflateCopy; -exports.inflateGetDictionary = inflateGetDictionary; -exports.inflateMark = inflateMark; -exports.inflatePrime = inflatePrime; -exports.inflateSync = inflateSync; -exports.inflateSyncPoint = inflateSyncPoint; -exports.inflateUndermine = inflateUndermine; -*/ diff --git a/node_modules/browserify/node_modules/browserify-zlib/node_modules/pako/lib/zlib/inftrees.js b/node_modules/browserify/node_modules/browserify-zlib/node_modules/pako/lib/zlib/inftrees.js deleted file mode 100644 index 16e4d520..00000000 --- a/node_modules/browserify/node_modules/browserify-zlib/node_modules/pako/lib/zlib/inftrees.js +++ /dev/null @@ -1,327 +0,0 @@ -'use strict'; - - -var utils = require('../utils/common'); - -var MAXBITS = 15; -var ENOUGH_LENS = 852; -var ENOUGH_DISTS = 592; -//var ENOUGH = (ENOUGH_LENS+ENOUGH_DISTS); - -var CODES = 0; -var LENS = 1; -var DISTS = 2; - -var lbase = [ /* Length codes 257..285 base */ - 3, 4, 5, 6, 7, 8, 9, 10, 11, 13, 15, 17, 19, 23, 27, 31, - 35, 43, 51, 59, 67, 83, 99, 115, 131, 163, 195, 227, 258, 0, 0 -]; - -var lext = [ /* Length codes 257..285 extra */ - 16, 16, 16, 16, 16, 16, 16, 16, 17, 17, 17, 17, 18, 18, 18, 18, - 19, 19, 19, 19, 20, 20, 20, 20, 21, 21, 21, 21, 16, 72, 78 -]; - -var dbase = [ /* Distance codes 0..29 base */ - 1, 2, 3, 4, 5, 7, 9, 13, 17, 25, 33, 49, 65, 97, 129, 193, - 257, 385, 513, 769, 1025, 1537, 2049, 3073, 4097, 6145, - 8193, 12289, 16385, 24577, 0, 0 -]; - -var dext = [ /* Distance codes 0..29 extra */ - 16, 16, 16, 16, 17, 17, 18, 18, 19, 19, 20, 20, 21, 21, 22, 22, - 23, 23, 24, 24, 25, 25, 26, 26, 27, 27, - 28, 28, 29, 29, 64, 64 -]; - -module.exports = function inflate_table(type, lens, lens_index, codes, table, table_index, work, opts) -{ - var bits = opts.bits; - //here = opts.here; /* table entry for duplication */ - - var len = 0; /* a code's length in bits */ - var sym = 0; /* index of code symbols */ - var min = 0, max = 0; /* minimum and maximum code lengths */ - var root = 0; /* number of index bits for root table */ - var curr = 0; /* number of index bits for current table */ - var drop = 0; /* code bits to drop for sub-table */ - var left = 0; /* number of prefix codes available */ - var used = 0; /* code entries in table used */ - var huff = 0; /* Huffman code */ - var incr; /* for incrementing code, index */ - var fill; /* index for replicating entries */ - var low; /* low bits for current root entry */ - var mask; /* mask for low root bits */ - var next; /* next available space in table */ - var base = null; /* base value table to use */ - var base_index = 0; -// var shoextra; /* extra bits table to use */ - var end; /* use base and extra for symbol > end */ - var count = new utils.Buf16(MAXBITS + 1); //[MAXBITS+1]; /* number of codes of each length */ - var offs = new utils.Buf16(MAXBITS + 1); //[MAXBITS+1]; /* offsets in table for each length */ - var extra = null; - var extra_index = 0; - - var here_bits, here_op, here_val; - - /* - Process a set of code lengths to create a canonical Huffman code. The - code lengths are lens[0..codes-1]. Each length corresponds to the - symbols 0..codes-1. The Huffman code is generated by first sorting the - symbols by length from short to long, and retaining the symbol order - for codes with equal lengths. Then the code starts with all zero bits - for the first code of the shortest length, and the codes are integer - increments for the same length, and zeros are appended as the length - increases. For the deflate format, these bits are stored backwards - from their more natural integer increment ordering, and so when the - decoding tables are built in the large loop below, the integer codes - are incremented backwards. - - This routine assumes, but does not check, that all of the entries in - lens[] are in the range 0..MAXBITS. The caller must assure this. - 1..MAXBITS is interpreted as that code length. zero means that that - symbol does not occur in this code. - - The codes are sorted by computing a count of codes for each length, - creating from that a table of starting indices for each length in the - sorted table, and then entering the symbols in order in the sorted - table. The sorted table is work[], with that space being provided by - the caller. - - The length counts are used for other purposes as well, i.e. finding - the minimum and maximum length codes, determining if there are any - codes at all, checking for a valid set of lengths, and looking ahead - at length counts to determine sub-table sizes when building the - decoding tables. - */ - - /* accumulate lengths for codes (assumes lens[] all in 0..MAXBITS) */ - for (len = 0; len <= MAXBITS; len++) { - count[len] = 0; - } - for (sym = 0; sym < codes; sym++) { - count[lens[lens_index + sym]]++; - } - - /* bound code lengths, force root to be within code lengths */ - root = bits; - for (max = MAXBITS; max >= 1; max--) { - if (count[max] !== 0) { break; } - } - if (root > max) { - root = max; - } - if (max === 0) { /* no symbols to code at all */ - //table.op[opts.table_index] = 64; //here.op = (var char)64; /* invalid code marker */ - //table.bits[opts.table_index] = 1; //here.bits = (var char)1; - //table.val[opts.table_index++] = 0; //here.val = (var short)0; - table[table_index++] = (1 << 24) | (64 << 16) | 0; - - - //table.op[opts.table_index] = 64; - //table.bits[opts.table_index] = 1; - //table.val[opts.table_index++] = 0; - table[table_index++] = (1 << 24) | (64 << 16) | 0; - - opts.bits = 1; - return 0; /* no symbols, but wait for decoding to report error */ - } - for (min = 1; min < max; min++) { - if (count[min] !== 0) { break; } - } - if (root < min) { - root = min; - } - - /* check for an over-subscribed or incomplete set of lengths */ - left = 1; - for (len = 1; len <= MAXBITS; len++) { - left <<= 1; - left -= count[len]; - if (left < 0) { - return -1; - } /* over-subscribed */ - } - if (left > 0 && (type === CODES || max !== 1)) { - return -1; /* incomplete set */ - } - - /* generate offsets into symbol table for each length for sorting */ - offs[1] = 0; - for (len = 1; len < MAXBITS; len++) { - offs[len + 1] = offs[len] + count[len]; - } - - /* sort symbols by length, by symbol order within each length */ - for (sym = 0; sym < codes; sym++) { - if (lens[lens_index + sym] !== 0) { - work[offs[lens[lens_index + sym]]++] = sym; - } - } - - /* - Create and fill in decoding tables. In this loop, the table being - filled is at next and has curr index bits. The code being used is huff - with length len. That code is converted to an index by dropping drop - bits off of the bottom. For codes where len is less than drop + curr, - those top drop + curr - len bits are incremented through all values to - fill the table with replicated entries. - - root is the number of index bits for the root table. When len exceeds - root, sub-tables are created pointed to by the root entry with an index - of the low root bits of huff. This is saved in low to check for when a - new sub-table should be started. drop is zero when the root table is - being filled, and drop is root when sub-tables are being filled. - - When a new sub-table is needed, it is necessary to look ahead in the - code lengths to determine what size sub-table is needed. The length - counts are used for this, and so count[] is decremented as codes are - entered in the tables. - - used keeps track of how many table entries have been allocated from the - provided *table space. It is checked for LENS and DIST tables against - the constants ENOUGH_LENS and ENOUGH_DISTS to guard against changes in - the initial root table size constants. See the comments in inftrees.h - for more information. - - sym increments through all symbols, and the loop terminates when - all codes of length max, i.e. all codes, have been processed. This - routine permits incomplete codes, so another loop after this one fills - in the rest of the decoding tables with invalid code markers. - */ - - /* set up for code type */ - // poor man optimization - use if-else instead of switch, - // to avoid deopts in old v8 - if (type === CODES) { - base = extra = work; /* dummy value--not used */ - end = 19; - - } else if (type === LENS) { - base = lbase; - base_index -= 257; - extra = lext; - extra_index -= 257; - end = 256; - - } else { /* DISTS */ - base = dbase; - extra = dext; - end = -1; - } - - /* initialize opts for loop */ - huff = 0; /* starting code */ - sym = 0; /* starting code symbol */ - len = min; /* starting code length */ - next = table_index; /* current table to fill in */ - curr = root; /* current table index bits */ - drop = 0; /* current bits to drop from code for index */ - low = -1; /* trigger new sub-table when len > root */ - used = 1 << root; /* use root table entries */ - mask = used - 1; /* mask for comparing low */ - - /* check available table space */ - if ((type === LENS && used > ENOUGH_LENS) || - (type === DISTS && used > ENOUGH_DISTS)) { - return 1; - } - - var i = 0; - /* process all codes and make table entries */ - for (;;) { - i++; - /* create table entry */ - here_bits = len - drop; - if (work[sym] < end) { - here_op = 0; - here_val = work[sym]; - } - else if (work[sym] > end) { - here_op = extra[extra_index + work[sym]]; - here_val = base[base_index + work[sym]]; - } - else { - here_op = 32 + 64; /* end of block */ - here_val = 0; - } - - /* replicate for those indices with low len bits equal to huff */ - incr = 1 << (len - drop); - fill = 1 << curr; - min = fill; /* save offset to next table */ - do { - fill -= incr; - table[next + (huff >> drop) + fill] = (here_bits << 24) | (here_op << 16) | here_val |0; - } while (fill !== 0); - - /* backwards increment the len-bit code huff */ - incr = 1 << (len - 1); - while (huff & incr) { - incr >>= 1; - } - if (incr !== 0) { - huff &= incr - 1; - huff += incr; - } else { - huff = 0; - } - - /* go to next symbol, update count, len */ - sym++; - if (--count[len] === 0) { - if (len === max) { break; } - len = lens[lens_index + work[sym]]; - } - - /* create new sub-table if needed */ - if (len > root && (huff & mask) !== low) { - /* if first time, transition to sub-tables */ - if (drop === 0) { - drop = root; - } - - /* increment past last table */ - next += min; /* here min is 1 << curr */ - - /* determine length of next table */ - curr = len - drop; - left = 1 << curr; - while (curr + drop < max) { - left -= count[curr + drop]; - if (left <= 0) { break; } - curr++; - left <<= 1; - } - - /* check for enough space */ - used += 1 << curr; - if ((type === LENS && used > ENOUGH_LENS) || - (type === DISTS && used > ENOUGH_DISTS)) { - return 1; - } - - /* point entry in root table to sub-table */ - low = huff & mask; - /*table.op[low] = curr; - table.bits[low] = root; - table.val[low] = next - opts.table_index;*/ - table[low] = (root << 24) | (curr << 16) | (next - table_index) |0; - } - } - - /* fill in remaining table entry if code is incomplete (guaranteed to have - at most one remaining entry, since if the code is incomplete, the - maximum code length that was allowed to get this far is one bit) */ - if (huff !== 0) { - //table.op[next + huff] = 64; /* invalid code marker */ - //table.bits[next + huff] = len - drop; - //table.val[next + huff] = 0; - table[next + huff] = ((len - drop) << 24) | (64 << 16) |0; - } - - /* set return parameters */ - //opts.table_index += used; - opts.bits = root; - return 0; -}; diff --git a/node_modules/browserify/node_modules/browserify-zlib/node_modules/pako/lib/zlib/messages.js b/node_modules/browserify/node_modules/browserify-zlib/node_modules/pako/lib/zlib/messages.js deleted file mode 100644 index d022f0f0..00000000 --- a/node_modules/browserify/node_modules/browserify-zlib/node_modules/pako/lib/zlib/messages.js +++ /dev/null @@ -1,13 +0,0 @@ -'use strict'; - -module.exports = { - 2: 'need dictionary', /* Z_NEED_DICT 2 */ - 1: 'stream end', /* Z_STREAM_END 1 */ - 0: '', /* Z_OK 0 */ - '-1': 'file error', /* Z_ERRNO (-1) */ - '-2': 'stream error', /* Z_STREAM_ERROR (-2) */ - '-3': 'data error', /* Z_DATA_ERROR (-3) */ - '-4': 'insufficient memory', /* Z_MEM_ERROR (-4) */ - '-5': 'buffer error', /* Z_BUF_ERROR (-5) */ - '-6': 'incompatible version' /* Z_VERSION_ERROR (-6) */ -}; diff --git a/node_modules/browserify/node_modules/browserify-zlib/node_modules/pako/lib/zlib/trees.js b/node_modules/browserify/node_modules/browserify-zlib/node_modules/pako/lib/zlib/trees.js deleted file mode 100644 index cef5f156..00000000 --- a/node_modules/browserify/node_modules/browserify-zlib/node_modules/pako/lib/zlib/trees.js +++ /dev/null @@ -1,1202 +0,0 @@ -'use strict'; - - -var utils = require('../utils/common'); - -/* Public constants ==========================================================*/ -/* ===========================================================================*/ - - -//var Z_FILTERED = 1; -//var Z_HUFFMAN_ONLY = 2; -//var Z_RLE = 3; -var Z_FIXED = 4; -//var Z_DEFAULT_STRATEGY = 0; - -/* Possible values of the data_type field (though see inflate()) */ -var Z_BINARY = 0; -var Z_TEXT = 1; -//var Z_ASCII = 1; // = Z_TEXT -var Z_UNKNOWN = 2; - -/*============================================================================*/ - - -function zero(buf) { var len = buf.length; while (--len >= 0) { buf[len] = 0; } } - -// From zutil.h - -var STORED_BLOCK = 0; -var STATIC_TREES = 1; -var DYN_TREES = 2; -/* The three kinds of block type */ - -var MIN_MATCH = 3; -var MAX_MATCH = 258; -/* The minimum and maximum match lengths */ - -// From deflate.h -/* =========================================================================== - * Internal compression state. - */ - -var LENGTH_CODES = 29; -/* number of length codes, not counting the special END_BLOCK code */ - -var LITERALS = 256; -/* number of literal bytes 0..255 */ - -var L_CODES = LITERALS + 1 + LENGTH_CODES; -/* number of Literal or Length codes, including the END_BLOCK code */ - -var D_CODES = 30; -/* number of distance codes */ - -var BL_CODES = 19; -/* number of codes used to transfer the bit lengths */ - -var HEAP_SIZE = 2 * L_CODES + 1; -/* maximum heap size */ - -var MAX_BITS = 15; -/* All codes must not exceed MAX_BITS bits */ - -var Buf_size = 16; -/* size of bit buffer in bi_buf */ - - -/* =========================================================================== - * Constants - */ - -var MAX_BL_BITS = 7; -/* Bit length codes must not exceed MAX_BL_BITS bits */ - -var END_BLOCK = 256; -/* end of block literal code */ - -var REP_3_6 = 16; -/* repeat previous bit length 3-6 times (2 bits of repeat count) */ - -var REPZ_3_10 = 17; -/* repeat a zero length 3-10 times (3 bits of repeat count) */ - -var REPZ_11_138 = 18; -/* repeat a zero length 11-138 times (7 bits of repeat count) */ - -/* eslint-disable comma-spacing,array-bracket-spacing */ -var extra_lbits = /* extra bits for each length code */ - [0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0]; - -var extra_dbits = /* extra bits for each distance code */ - [0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13]; - -var extra_blbits = /* extra bits for each bit length code */ - [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7]; - -var bl_order = - [16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]; -/* eslint-enable comma-spacing,array-bracket-spacing */ - -/* The lengths of the bit length codes are sent in order of decreasing - * probability, to avoid transmitting the lengths for unused bit length codes. - */ - -/* =========================================================================== - * Local data. These are initialized only once. - */ - -// We pre-fill arrays with 0 to avoid uninitialized gaps - -var DIST_CODE_LEN = 512; /* see definition of array dist_code below */ - -// !!!! Use flat array insdead of structure, Freq = i*2, Len = i*2+1 -var static_ltree = new Array((L_CODES + 2) * 2); -zero(static_ltree); -/* The static literal tree. Since the bit lengths are imposed, there is no - * need for the L_CODES extra codes used during heap construction. However - * The codes 286 and 287 are needed to build a canonical tree (see _tr_init - * below). - */ - -var static_dtree = new Array(D_CODES * 2); -zero(static_dtree); -/* The static distance tree. (Actually a trivial tree since all codes use - * 5 bits.) - */ - -var _dist_code = new Array(DIST_CODE_LEN); -zero(_dist_code); -/* Distance codes. The first 256 values correspond to the distances - * 3 .. 258, the last 256 values correspond to the top 8 bits of - * the 15 bit distances. - */ - -var _length_code = new Array(MAX_MATCH - MIN_MATCH + 1); -zero(_length_code); -/* length code for each normalized match length (0 == MIN_MATCH) */ - -var base_length = new Array(LENGTH_CODES); -zero(base_length); -/* First normalized length for each code (0 = MIN_MATCH) */ - -var base_dist = new Array(D_CODES); -zero(base_dist); -/* First normalized distance for each code (0 = distance of 1) */ - - -function StaticTreeDesc(static_tree, extra_bits, extra_base, elems, max_length) { - - this.static_tree = static_tree; /* static tree or NULL */ - this.extra_bits = extra_bits; /* extra bits for each code or NULL */ - this.extra_base = extra_base; /* base index for extra_bits */ - this.elems = elems; /* max number of elements in the tree */ - this.max_length = max_length; /* max bit length for the codes */ - - // show if `static_tree` has data or dummy - needed for monomorphic objects - this.has_stree = static_tree && static_tree.length; -} - - -var static_l_desc; -var static_d_desc; -var static_bl_desc; - - -function TreeDesc(dyn_tree, stat_desc) { - this.dyn_tree = dyn_tree; /* the dynamic tree */ - this.max_code = 0; /* largest code with non zero frequency */ - this.stat_desc = stat_desc; /* the corresponding static tree */ -} - - - -function d_code(dist) { - return dist < 256 ? _dist_code[dist] : _dist_code[256 + (dist >>> 7)]; -} - - -/* =========================================================================== - * Output a short LSB first on the stream. - * IN assertion: there is enough room in pendingBuf. - */ -function put_short(s, w) { -// put_byte(s, (uch)((w) & 0xff)); -// put_byte(s, (uch)((ush)(w) >> 8)); - s.pending_buf[s.pending++] = (w) & 0xff; - s.pending_buf[s.pending++] = (w >>> 8) & 0xff; -} - - -/* =========================================================================== - * Send a value on a given number of bits. - * IN assertion: length <= 16 and value fits in length bits. - */ -function send_bits(s, value, length) { - if (s.bi_valid > (Buf_size - length)) { - s.bi_buf |= (value << s.bi_valid) & 0xffff; - put_short(s, s.bi_buf); - s.bi_buf = value >> (Buf_size - s.bi_valid); - s.bi_valid += length - Buf_size; - } else { - s.bi_buf |= (value << s.bi_valid) & 0xffff; - s.bi_valid += length; - } -} - - -function send_code(s, c, tree) { - send_bits(s, tree[c * 2]/*.Code*/, tree[c * 2 + 1]/*.Len*/); -} - - -/* =========================================================================== - * Reverse the first len bits of a code, using straightforward code (a faster - * method would use a table) - * IN assertion: 1 <= len <= 15 - */ -function bi_reverse(code, len) { - var res = 0; - do { - res |= code & 1; - code >>>= 1; - res <<= 1; - } while (--len > 0); - return res >>> 1; -} - - -/* =========================================================================== - * Flush the bit buffer, keeping at most 7 bits in it. - */ -function bi_flush(s) { - if (s.bi_valid === 16) { - put_short(s, s.bi_buf); - s.bi_buf = 0; - s.bi_valid = 0; - - } else if (s.bi_valid >= 8) { - s.pending_buf[s.pending++] = s.bi_buf & 0xff; - s.bi_buf >>= 8; - s.bi_valid -= 8; - } -} - - -/* =========================================================================== - * Compute the optimal bit lengths for a tree and update the total bit length - * for the current block. - * IN assertion: the fields freq and dad are set, heap[heap_max] and - * above are the tree nodes sorted by increasing frequency. - * OUT assertions: the field len is set to the optimal bit length, the - * array bl_count contains the frequencies for each bit length. - * The length opt_len is updated; static_len is also updated if stree is - * not null. - */ -function gen_bitlen(s, desc) -// deflate_state *s; -// tree_desc *desc; /* the tree descriptor */ -{ - var tree = desc.dyn_tree; - var max_code = desc.max_code; - var stree = desc.stat_desc.static_tree; - var has_stree = desc.stat_desc.has_stree; - var extra = desc.stat_desc.extra_bits; - var base = desc.stat_desc.extra_base; - var max_length = desc.stat_desc.max_length; - var h; /* heap index */ - var n, m; /* iterate over the tree elements */ - var bits; /* bit length */ - var xbits; /* extra bits */ - var f; /* frequency */ - var overflow = 0; /* number of elements with bit length too large */ - - for (bits = 0; bits <= MAX_BITS; bits++) { - s.bl_count[bits] = 0; - } - - /* In a first pass, compute the optimal bit lengths (which may - * overflow in the case of the bit length tree). - */ - tree[s.heap[s.heap_max] * 2 + 1]/*.Len*/ = 0; /* root of the heap */ - - for (h = s.heap_max + 1; h < HEAP_SIZE; h++) { - n = s.heap[h]; - bits = tree[tree[n * 2 + 1]/*.Dad*/ * 2 + 1]/*.Len*/ + 1; - if (bits > max_length) { - bits = max_length; - overflow++; - } - tree[n * 2 + 1]/*.Len*/ = bits; - /* We overwrite tree[n].Dad which is no longer needed */ - - if (n > max_code) { continue; } /* not a leaf node */ - - s.bl_count[bits]++; - xbits = 0; - if (n >= base) { - xbits = extra[n - base]; - } - f = tree[n * 2]/*.Freq*/; - s.opt_len += f * (bits + xbits); - if (has_stree) { - s.static_len += f * (stree[n * 2 + 1]/*.Len*/ + xbits); - } - } - if (overflow === 0) { return; } - - // Trace((stderr,"\nbit length overflow\n")); - /* This happens for example on obj2 and pic of the Calgary corpus */ - - /* Find the first bit length which could increase: */ - do { - bits = max_length - 1; - while (s.bl_count[bits] === 0) { bits--; } - s.bl_count[bits]--; /* move one leaf down the tree */ - s.bl_count[bits + 1] += 2; /* move one overflow item as its brother */ - s.bl_count[max_length]--; - /* The brother of the overflow item also moves one step up, - * but this does not affect bl_count[max_length] - */ - overflow -= 2; - } while (overflow > 0); - - /* Now recompute all bit lengths, scanning in increasing frequency. - * h is still equal to HEAP_SIZE. (It is simpler to reconstruct all - * lengths instead of fixing only the wrong ones. This idea is taken - * from 'ar' written by Haruhiko Okumura.) - */ - for (bits = max_length; bits !== 0; bits--) { - n = s.bl_count[bits]; - while (n !== 0) { - m = s.heap[--h]; - if (m > max_code) { continue; } - if (tree[m * 2 + 1]/*.Len*/ !== bits) { - // Trace((stderr,"code %d bits %d->%d\n", m, tree[m].Len, bits)); - s.opt_len += (bits - tree[m * 2 + 1]/*.Len*/) * tree[m * 2]/*.Freq*/; - tree[m * 2 + 1]/*.Len*/ = bits; - } - n--; - } - } -} - - -/* =========================================================================== - * Generate the codes for a given tree and bit counts (which need not be - * optimal). - * IN assertion: the array bl_count contains the bit length statistics for - * the given tree and the field len is set for all tree elements. - * OUT assertion: the field code is set for all tree elements of non - * zero code length. - */ -function gen_codes(tree, max_code, bl_count) -// ct_data *tree; /* the tree to decorate */ -// int max_code; /* largest code with non zero frequency */ -// ushf *bl_count; /* number of codes at each bit length */ -{ - var next_code = new Array(MAX_BITS + 1); /* next code value for each bit length */ - var code = 0; /* running code value */ - var bits; /* bit index */ - var n; /* code index */ - - /* The distribution counts are first used to generate the code values - * without bit reversal. - */ - for (bits = 1; bits <= MAX_BITS; bits++) { - next_code[bits] = code = (code + bl_count[bits - 1]) << 1; - } - /* Check that the bit counts in bl_count are consistent. The last code - * must be all ones. - */ - //Assert (code + bl_count[MAX_BITS]-1 == (1< length code (0..28) */ - length = 0; - for (code = 0; code < LENGTH_CODES - 1; code++) { - base_length[code] = length; - for (n = 0; n < (1 << extra_lbits[code]); n++) { - _length_code[length++] = code; - } - } - //Assert (length == 256, "tr_static_init: length != 256"); - /* Note that the length 255 (match length 258) can be represented - * in two different ways: code 284 + 5 bits or code 285, so we - * overwrite length_code[255] to use the best encoding: - */ - _length_code[length - 1] = code; - - /* Initialize the mapping dist (0..32K) -> dist code (0..29) */ - dist = 0; - for (code = 0; code < 16; code++) { - base_dist[code] = dist; - for (n = 0; n < (1 << extra_dbits[code]); n++) { - _dist_code[dist++] = code; - } - } - //Assert (dist == 256, "tr_static_init: dist != 256"); - dist >>= 7; /* from now on, all distances are divided by 128 */ - for (; code < D_CODES; code++) { - base_dist[code] = dist << 7; - for (n = 0; n < (1 << (extra_dbits[code] - 7)); n++) { - _dist_code[256 + dist++] = code; - } - } - //Assert (dist == 256, "tr_static_init: 256+dist != 512"); - - /* Construct the codes of the static literal tree */ - for (bits = 0; bits <= MAX_BITS; bits++) { - bl_count[bits] = 0; - } - - n = 0; - while (n <= 143) { - static_ltree[n * 2 + 1]/*.Len*/ = 8; - n++; - bl_count[8]++; - } - while (n <= 255) { - static_ltree[n * 2 + 1]/*.Len*/ = 9; - n++; - bl_count[9]++; - } - while (n <= 279) { - static_ltree[n * 2 + 1]/*.Len*/ = 7; - n++; - bl_count[7]++; - } - while (n <= 287) { - static_ltree[n * 2 + 1]/*.Len*/ = 8; - n++; - bl_count[8]++; - } - /* Codes 286 and 287 do not exist, but we must include them in the - * tree construction to get a canonical Huffman tree (longest code - * all ones) - */ - gen_codes(static_ltree, L_CODES + 1, bl_count); - - /* The static distance tree is trivial: */ - for (n = 0; n < D_CODES; n++) { - static_dtree[n * 2 + 1]/*.Len*/ = 5; - static_dtree[n * 2]/*.Code*/ = bi_reverse(n, 5); - } - - // Now data ready and we can init static trees - static_l_desc = new StaticTreeDesc(static_ltree, extra_lbits, LITERALS + 1, L_CODES, MAX_BITS); - static_d_desc = new StaticTreeDesc(static_dtree, extra_dbits, 0, D_CODES, MAX_BITS); - static_bl_desc = new StaticTreeDesc(new Array(0), extra_blbits, 0, BL_CODES, MAX_BL_BITS); - - //static_init_done = true; -} - - -/* =========================================================================== - * Initialize a new block. - */ -function init_block(s) { - var n; /* iterates over tree elements */ - - /* Initialize the trees. */ - for (n = 0; n < L_CODES; n++) { s.dyn_ltree[n * 2]/*.Freq*/ = 0; } - for (n = 0; n < D_CODES; n++) { s.dyn_dtree[n * 2]/*.Freq*/ = 0; } - for (n = 0; n < BL_CODES; n++) { s.bl_tree[n * 2]/*.Freq*/ = 0; } - - s.dyn_ltree[END_BLOCK * 2]/*.Freq*/ = 1; - s.opt_len = s.static_len = 0; - s.last_lit = s.matches = 0; -} - - -/* =========================================================================== - * Flush the bit buffer and align the output on a byte boundary - */ -function bi_windup(s) -{ - if (s.bi_valid > 8) { - put_short(s, s.bi_buf); - } else if (s.bi_valid > 0) { - //put_byte(s, (Byte)s->bi_buf); - s.pending_buf[s.pending++] = s.bi_buf; - } - s.bi_buf = 0; - s.bi_valid = 0; -} - -/* =========================================================================== - * Copy a stored block, storing first the length and its - * one's complement if requested. - */ -function copy_block(s, buf, len, header) -//DeflateState *s; -//charf *buf; /* the input data */ -//unsigned len; /* its length */ -//int header; /* true if block header must be written */ -{ - bi_windup(s); /* align on byte boundary */ - - if (header) { - put_short(s, len); - put_short(s, ~len); - } -// while (len--) { -// put_byte(s, *buf++); -// } - utils.arraySet(s.pending_buf, s.window, buf, len, s.pending); - s.pending += len; -} - -/* =========================================================================== - * Compares to subtrees, using the tree depth as tie breaker when - * the subtrees have equal frequency. This minimizes the worst case length. - */ -function smaller(tree, n, m, depth) { - var _n2 = n * 2; - var _m2 = m * 2; - return (tree[_n2]/*.Freq*/ < tree[_m2]/*.Freq*/ || - (tree[_n2]/*.Freq*/ === tree[_m2]/*.Freq*/ && depth[n] <= depth[m])); -} - -/* =========================================================================== - * Restore the heap property by moving down the tree starting at node k, - * exchanging a node with the smallest of its two sons if necessary, stopping - * when the heap property is re-established (each father smaller than its - * two sons). - */ -function pqdownheap(s, tree, k) -// deflate_state *s; -// ct_data *tree; /* the tree to restore */ -// int k; /* node to move down */ -{ - var v = s.heap[k]; - var j = k << 1; /* left son of k */ - while (j <= s.heap_len) { - /* Set j to the smallest of the two sons: */ - if (j < s.heap_len && - smaller(tree, s.heap[j + 1], s.heap[j], s.depth)) { - j++; - } - /* Exit if v is smaller than both sons */ - if (smaller(tree, v, s.heap[j], s.depth)) { break; } - - /* Exchange v with the smallest son */ - s.heap[k] = s.heap[j]; - k = j; - - /* And continue down the tree, setting j to the left son of k */ - j <<= 1; - } - s.heap[k] = v; -} - - -// inlined manually -// var SMALLEST = 1; - -/* =========================================================================== - * Send the block data compressed using the given Huffman trees - */ -function compress_block(s, ltree, dtree) -// deflate_state *s; -// const ct_data *ltree; /* literal tree */ -// const ct_data *dtree; /* distance tree */ -{ - var dist; /* distance of matched string */ - var lc; /* match length or unmatched char (if dist == 0) */ - var lx = 0; /* running index in l_buf */ - var code; /* the code to send */ - var extra; /* number of extra bits to send */ - - if (s.last_lit !== 0) { - do { - dist = (s.pending_buf[s.d_buf + lx * 2] << 8) | (s.pending_buf[s.d_buf + lx * 2 + 1]); - lc = s.pending_buf[s.l_buf + lx]; - lx++; - - if (dist === 0) { - send_code(s, lc, ltree); /* send a literal byte */ - //Tracecv(isgraph(lc), (stderr," '%c' ", lc)); - } else { - /* Here, lc is the match length - MIN_MATCH */ - code = _length_code[lc]; - send_code(s, code + LITERALS + 1, ltree); /* send the length code */ - extra = extra_lbits[code]; - if (extra !== 0) { - lc -= base_length[code]; - send_bits(s, lc, extra); /* send the extra length bits */ - } - dist--; /* dist is now the match distance - 1 */ - code = d_code(dist); - //Assert (code < D_CODES, "bad d_code"); - - send_code(s, code, dtree); /* send the distance code */ - extra = extra_dbits[code]; - if (extra !== 0) { - dist -= base_dist[code]; - send_bits(s, dist, extra); /* send the extra distance bits */ - } - } /* literal or match pair ? */ - - /* Check that the overlay between pending_buf and d_buf+l_buf is ok: */ - //Assert((uInt)(s->pending) < s->lit_bufsize + 2*lx, - // "pendingBuf overflow"); - - } while (lx < s.last_lit); - } - - send_code(s, END_BLOCK, ltree); -} - - -/* =========================================================================== - * Construct one Huffman tree and assigns the code bit strings and lengths. - * Update the total bit length for the current block. - * IN assertion: the field freq is set for all tree elements. - * OUT assertions: the fields len and code are set to the optimal bit length - * and corresponding code. The length opt_len is updated; static_len is - * also updated if stree is not null. The field max_code is set. - */ -function build_tree(s, desc) -// deflate_state *s; -// tree_desc *desc; /* the tree descriptor */ -{ - var tree = desc.dyn_tree; - var stree = desc.stat_desc.static_tree; - var has_stree = desc.stat_desc.has_stree; - var elems = desc.stat_desc.elems; - var n, m; /* iterate over heap elements */ - var max_code = -1; /* largest code with non zero frequency */ - var node; /* new node being created */ - - /* Construct the initial heap, with least frequent element in - * heap[SMALLEST]. The sons of heap[n] are heap[2*n] and heap[2*n+1]. - * heap[0] is not used. - */ - s.heap_len = 0; - s.heap_max = HEAP_SIZE; - - for (n = 0; n < elems; n++) { - if (tree[n * 2]/*.Freq*/ !== 0) { - s.heap[++s.heap_len] = max_code = n; - s.depth[n] = 0; - - } else { - tree[n * 2 + 1]/*.Len*/ = 0; - } - } - - /* The pkzip format requires that at least one distance code exists, - * and that at least one bit should be sent even if there is only one - * possible code. So to avoid special checks later on we force at least - * two codes of non zero frequency. - */ - while (s.heap_len < 2) { - node = s.heap[++s.heap_len] = (max_code < 2 ? ++max_code : 0); - tree[node * 2]/*.Freq*/ = 1; - s.depth[node] = 0; - s.opt_len--; - - if (has_stree) { - s.static_len -= stree[node * 2 + 1]/*.Len*/; - } - /* node is 0 or 1 so it does not have extra bits */ - } - desc.max_code = max_code; - - /* The elements heap[heap_len/2+1 .. heap_len] are leaves of the tree, - * establish sub-heaps of increasing lengths: - */ - for (n = (s.heap_len >> 1/*int /2*/); n >= 1; n--) { pqdownheap(s, tree, n); } - - /* Construct the Huffman tree by repeatedly combining the least two - * frequent nodes. - */ - node = elems; /* next internal node of the tree */ - do { - //pqremove(s, tree, n); /* n = node of least frequency */ - /*** pqremove ***/ - n = s.heap[1/*SMALLEST*/]; - s.heap[1/*SMALLEST*/] = s.heap[s.heap_len--]; - pqdownheap(s, tree, 1/*SMALLEST*/); - /***/ - - m = s.heap[1/*SMALLEST*/]; /* m = node of next least frequency */ - - s.heap[--s.heap_max] = n; /* keep the nodes sorted by frequency */ - s.heap[--s.heap_max] = m; - - /* Create a new node father of n and m */ - tree[node * 2]/*.Freq*/ = tree[n * 2]/*.Freq*/ + tree[m * 2]/*.Freq*/; - s.depth[node] = (s.depth[n] >= s.depth[m] ? s.depth[n] : s.depth[m]) + 1; - tree[n * 2 + 1]/*.Dad*/ = tree[m * 2 + 1]/*.Dad*/ = node; - - /* and insert the new node in the heap */ - s.heap[1/*SMALLEST*/] = node++; - pqdownheap(s, tree, 1/*SMALLEST*/); - - } while (s.heap_len >= 2); - - s.heap[--s.heap_max] = s.heap[1/*SMALLEST*/]; - - /* At this point, the fields freq and dad are set. We can now - * generate the bit lengths. - */ - gen_bitlen(s, desc); - - /* The field len is now set, we can generate the bit codes */ - gen_codes(tree, max_code, s.bl_count); -} - - -/* =========================================================================== - * Scan a literal or distance tree to determine the frequencies of the codes - * in the bit length tree. - */ -function scan_tree(s, tree, max_code) -// deflate_state *s; -// ct_data *tree; /* the tree to be scanned */ -// int max_code; /* and its largest code of non zero frequency */ -{ - var n; /* iterates over all tree elements */ - var prevlen = -1; /* last emitted length */ - var curlen; /* length of current code */ - - var nextlen = tree[0 * 2 + 1]/*.Len*/; /* length of next code */ - - var count = 0; /* repeat count of the current code */ - var max_count = 7; /* max repeat count */ - var min_count = 4; /* min repeat count */ - - if (nextlen === 0) { - max_count = 138; - min_count = 3; - } - tree[(max_code + 1) * 2 + 1]/*.Len*/ = 0xffff; /* guard */ - - for (n = 0; n <= max_code; n++) { - curlen = nextlen; - nextlen = tree[(n + 1) * 2 + 1]/*.Len*/; - - if (++count < max_count && curlen === nextlen) { - continue; - - } else if (count < min_count) { - s.bl_tree[curlen * 2]/*.Freq*/ += count; - - } else if (curlen !== 0) { - - if (curlen !== prevlen) { s.bl_tree[curlen * 2]/*.Freq*/++; } - s.bl_tree[REP_3_6 * 2]/*.Freq*/++; - - } else if (count <= 10) { - s.bl_tree[REPZ_3_10 * 2]/*.Freq*/++; - - } else { - s.bl_tree[REPZ_11_138 * 2]/*.Freq*/++; - } - - count = 0; - prevlen = curlen; - - if (nextlen === 0) { - max_count = 138; - min_count = 3; - - } else if (curlen === nextlen) { - max_count = 6; - min_count = 3; - - } else { - max_count = 7; - min_count = 4; - } - } -} - - -/* =========================================================================== - * Send a literal or distance tree in compressed form, using the codes in - * bl_tree. - */ -function send_tree(s, tree, max_code) -// deflate_state *s; -// ct_data *tree; /* the tree to be scanned */ -// int max_code; /* and its largest code of non zero frequency */ -{ - var n; /* iterates over all tree elements */ - var prevlen = -1; /* last emitted length */ - var curlen; /* length of current code */ - - var nextlen = tree[0 * 2 + 1]/*.Len*/; /* length of next code */ - - var count = 0; /* repeat count of the current code */ - var max_count = 7; /* max repeat count */ - var min_count = 4; /* min repeat count */ - - /* tree[max_code+1].Len = -1; */ /* guard already set */ - if (nextlen === 0) { - max_count = 138; - min_count = 3; - } - - for (n = 0; n <= max_code; n++) { - curlen = nextlen; - nextlen = tree[(n + 1) * 2 + 1]/*.Len*/; - - if (++count < max_count && curlen === nextlen) { - continue; - - } else if (count < min_count) { - do { send_code(s, curlen, s.bl_tree); } while (--count !== 0); - - } else if (curlen !== 0) { - if (curlen !== prevlen) { - send_code(s, curlen, s.bl_tree); - count--; - } - //Assert(count >= 3 && count <= 6, " 3_6?"); - send_code(s, REP_3_6, s.bl_tree); - send_bits(s, count - 3, 2); - - } else if (count <= 10) { - send_code(s, REPZ_3_10, s.bl_tree); - send_bits(s, count - 3, 3); - - } else { - send_code(s, REPZ_11_138, s.bl_tree); - send_bits(s, count - 11, 7); - } - - count = 0; - prevlen = curlen; - if (nextlen === 0) { - max_count = 138; - min_count = 3; - - } else if (curlen === nextlen) { - max_count = 6; - min_count = 3; - - } else { - max_count = 7; - min_count = 4; - } - } -} - - -/* =========================================================================== - * Construct the Huffman tree for the bit lengths and return the index in - * bl_order of the last bit length code to send. - */ -function build_bl_tree(s) { - var max_blindex; /* index of last bit length code of non zero freq */ - - /* Determine the bit length frequencies for literal and distance trees */ - scan_tree(s, s.dyn_ltree, s.l_desc.max_code); - scan_tree(s, s.dyn_dtree, s.d_desc.max_code); - - /* Build the bit length tree: */ - build_tree(s, s.bl_desc); - /* opt_len now includes the length of the tree representations, except - * the lengths of the bit lengths codes and the 5+5+4 bits for the counts. - */ - - /* Determine the number of bit length codes to send. The pkzip format - * requires that at least 4 bit length codes be sent. (appnote.txt says - * 3 but the actual value used is 4.) - */ - for (max_blindex = BL_CODES - 1; max_blindex >= 3; max_blindex--) { - if (s.bl_tree[bl_order[max_blindex] * 2 + 1]/*.Len*/ !== 0) { - break; - } - } - /* Update opt_len to include the bit length tree and counts */ - s.opt_len += 3 * (max_blindex + 1) + 5 + 5 + 4; - //Tracev((stderr, "\ndyn trees: dyn %ld, stat %ld", - // s->opt_len, s->static_len)); - - return max_blindex; -} - - -/* =========================================================================== - * Send the header for a block using dynamic Huffman trees: the counts, the - * lengths of the bit length codes, the literal tree and the distance tree. - * IN assertion: lcodes >= 257, dcodes >= 1, blcodes >= 4. - */ -function send_all_trees(s, lcodes, dcodes, blcodes) -// deflate_state *s; -// int lcodes, dcodes, blcodes; /* number of codes for each tree */ -{ - var rank; /* index in bl_order */ - - //Assert (lcodes >= 257 && dcodes >= 1 && blcodes >= 4, "not enough codes"); - //Assert (lcodes <= L_CODES && dcodes <= D_CODES && blcodes <= BL_CODES, - // "too many codes"); - //Tracev((stderr, "\nbl counts: ")); - send_bits(s, lcodes - 257, 5); /* not +255 as stated in appnote.txt */ - send_bits(s, dcodes - 1, 5); - send_bits(s, blcodes - 4, 4); /* not -3 as stated in appnote.txt */ - for (rank = 0; rank < blcodes; rank++) { - //Tracev((stderr, "\nbl code %2d ", bl_order[rank])); - send_bits(s, s.bl_tree[bl_order[rank] * 2 + 1]/*.Len*/, 3); - } - //Tracev((stderr, "\nbl tree: sent %ld", s->bits_sent)); - - send_tree(s, s.dyn_ltree, lcodes - 1); /* literal tree */ - //Tracev((stderr, "\nlit tree: sent %ld", s->bits_sent)); - - send_tree(s, s.dyn_dtree, dcodes - 1); /* distance tree */ - //Tracev((stderr, "\ndist tree: sent %ld", s->bits_sent)); -} - - -/* =========================================================================== - * Check if the data type is TEXT or BINARY, using the following algorithm: - * - TEXT if the two conditions below are satisfied: - * a) There are no non-portable control characters belonging to the - * "black list" (0..6, 14..25, 28..31). - * b) There is at least one printable character belonging to the - * "white list" (9 {TAB}, 10 {LF}, 13 {CR}, 32..255). - * - BINARY otherwise. - * - The following partially-portable control characters form a - * "gray list" that is ignored in this detection algorithm: - * (7 {BEL}, 8 {BS}, 11 {VT}, 12 {FF}, 26 {SUB}, 27 {ESC}). - * IN assertion: the fields Freq of dyn_ltree are set. - */ -function detect_data_type(s) { - /* black_mask is the bit mask of black-listed bytes - * set bits 0..6, 14..25, and 28..31 - * 0xf3ffc07f = binary 11110011111111111100000001111111 - */ - var black_mask = 0xf3ffc07f; - var n; - - /* Check for non-textual ("black-listed") bytes. */ - for (n = 0; n <= 31; n++, black_mask >>>= 1) { - if ((black_mask & 1) && (s.dyn_ltree[n * 2]/*.Freq*/ !== 0)) { - return Z_BINARY; - } - } - - /* Check for textual ("white-listed") bytes. */ - if (s.dyn_ltree[9 * 2]/*.Freq*/ !== 0 || s.dyn_ltree[10 * 2]/*.Freq*/ !== 0 || - s.dyn_ltree[13 * 2]/*.Freq*/ !== 0) { - return Z_TEXT; - } - for (n = 32; n < LITERALS; n++) { - if (s.dyn_ltree[n * 2]/*.Freq*/ !== 0) { - return Z_TEXT; - } - } - - /* There are no "black-listed" or "white-listed" bytes: - * this stream either is empty or has tolerated ("gray-listed") bytes only. - */ - return Z_BINARY; -} - - -var static_init_done = false; - -/* =========================================================================== - * Initialize the tree data structures for a new zlib stream. - */ -function _tr_init(s) -{ - - if (!static_init_done) { - tr_static_init(); - static_init_done = true; - } - - s.l_desc = new TreeDesc(s.dyn_ltree, static_l_desc); - s.d_desc = new TreeDesc(s.dyn_dtree, static_d_desc); - s.bl_desc = new TreeDesc(s.bl_tree, static_bl_desc); - - s.bi_buf = 0; - s.bi_valid = 0; - - /* Initialize the first block of the first file: */ - init_block(s); -} - - -/* =========================================================================== - * Send a stored block - */ -function _tr_stored_block(s, buf, stored_len, last) -//DeflateState *s; -//charf *buf; /* input block */ -//ulg stored_len; /* length of input block */ -//int last; /* one if this is the last block for a file */ -{ - send_bits(s, (STORED_BLOCK << 1) + (last ? 1 : 0), 3); /* send block type */ - copy_block(s, buf, stored_len, true); /* with header */ -} - - -/* =========================================================================== - * Send one empty static block to give enough lookahead for inflate. - * This takes 10 bits, of which 7 may remain in the bit buffer. - */ -function _tr_align(s) { - send_bits(s, STATIC_TREES << 1, 3); - send_code(s, END_BLOCK, static_ltree); - bi_flush(s); -} - - -/* =========================================================================== - * Determine the best encoding for the current block: dynamic trees, static - * trees or store, and output the encoded block to the zip file. - */ -function _tr_flush_block(s, buf, stored_len, last) -//DeflateState *s; -//charf *buf; /* input block, or NULL if too old */ -//ulg stored_len; /* length of input block */ -//int last; /* one if this is the last block for a file */ -{ - var opt_lenb, static_lenb; /* opt_len and static_len in bytes */ - var max_blindex = 0; /* index of last bit length code of non zero freq */ - - /* Build the Huffman trees unless a stored block is forced */ - if (s.level > 0) { - - /* Check if the file is binary or text */ - if (s.strm.data_type === Z_UNKNOWN) { - s.strm.data_type = detect_data_type(s); - } - - /* Construct the literal and distance trees */ - build_tree(s, s.l_desc); - // Tracev((stderr, "\nlit data: dyn %ld, stat %ld", s->opt_len, - // s->static_len)); - - build_tree(s, s.d_desc); - // Tracev((stderr, "\ndist data: dyn %ld, stat %ld", s->opt_len, - // s->static_len)); - /* At this point, opt_len and static_len are the total bit lengths of - * the compressed block data, excluding the tree representations. - */ - - /* Build the bit length tree for the above two trees, and get the index - * in bl_order of the last bit length code to send. - */ - max_blindex = build_bl_tree(s); - - /* Determine the best encoding. Compute the block lengths in bytes. */ - opt_lenb = (s.opt_len + 3 + 7) >>> 3; - static_lenb = (s.static_len + 3 + 7) >>> 3; - - // Tracev((stderr, "\nopt %lu(%lu) stat %lu(%lu) stored %lu lit %u ", - // opt_lenb, s->opt_len, static_lenb, s->static_len, stored_len, - // s->last_lit)); - - if (static_lenb <= opt_lenb) { opt_lenb = static_lenb; } - - } else { - // Assert(buf != (char*)0, "lost buf"); - opt_lenb = static_lenb = stored_len + 5; /* force a stored block */ - } - - if ((stored_len + 4 <= opt_lenb) && (buf !== -1)) { - /* 4: two words for the lengths */ - - /* The test buf != NULL is only necessary if LIT_BUFSIZE > WSIZE. - * Otherwise we can't have processed more than WSIZE input bytes since - * the last block flush, because compression would have been - * successful. If LIT_BUFSIZE <= WSIZE, it is never too late to - * transform a block into a stored block. - */ - _tr_stored_block(s, buf, stored_len, last); - - } else if (s.strategy === Z_FIXED || static_lenb === opt_lenb) { - - send_bits(s, (STATIC_TREES << 1) + (last ? 1 : 0), 3); - compress_block(s, static_ltree, static_dtree); - - } else { - send_bits(s, (DYN_TREES << 1) + (last ? 1 : 0), 3); - send_all_trees(s, s.l_desc.max_code + 1, s.d_desc.max_code + 1, max_blindex + 1); - compress_block(s, s.dyn_ltree, s.dyn_dtree); - } - // Assert (s->compressed_len == s->bits_sent, "bad compressed size"); - /* The above check is made mod 2^32, for files larger than 512 MB - * and uLong implemented on 32 bits. - */ - init_block(s); - - if (last) { - bi_windup(s); - } - // Tracev((stderr,"\ncomprlen %lu(%lu) ", s->compressed_len>>3, - // s->compressed_len-7*last)); -} - -/* =========================================================================== - * Save the match info and tally the frequency counts. Return true if - * the current block must be flushed. - */ -function _tr_tally(s, dist, lc) -// deflate_state *s; -// unsigned dist; /* distance of matched string */ -// unsigned lc; /* match length-MIN_MATCH or unmatched char (if dist==0) */ -{ - //var out_length, in_length, dcode; - - s.pending_buf[s.d_buf + s.last_lit * 2] = (dist >>> 8) & 0xff; - s.pending_buf[s.d_buf + s.last_lit * 2 + 1] = dist & 0xff; - - s.pending_buf[s.l_buf + s.last_lit] = lc & 0xff; - s.last_lit++; - - if (dist === 0) { - /* lc is the unmatched char */ - s.dyn_ltree[lc * 2]/*.Freq*/++; - } else { - s.matches++; - /* Here, lc is the match length - MIN_MATCH */ - dist--; /* dist = match distance - 1 */ - //Assert((ush)dist < (ush)MAX_DIST(s) && - // (ush)lc <= (ush)(MAX_MATCH-MIN_MATCH) && - // (ush)d_code(dist) < (ush)D_CODES, "_tr_tally: bad match"); - - s.dyn_ltree[(_length_code[lc] + LITERALS + 1) * 2]/*.Freq*/++; - s.dyn_dtree[d_code(dist) * 2]/*.Freq*/++; - } - -// (!) This block is disabled in zlib defailts, -// don't enable it for binary compatibility - -//#ifdef TRUNCATE_BLOCK -// /* Try to guess if it is profitable to stop the current block here */ -// if ((s.last_lit & 0x1fff) === 0 && s.level > 2) { -// /* Compute an upper bound for the compressed length */ -// out_length = s.last_lit*8; -// in_length = s.strstart - s.block_start; -// -// for (dcode = 0; dcode < D_CODES; dcode++) { -// out_length += s.dyn_dtree[dcode*2]/*.Freq*/ * (5 + extra_dbits[dcode]); -// } -// out_length >>>= 3; -// //Tracev((stderr,"\nlast_lit %u, in %ld, out ~%ld(%ld%%) ", -// // s->last_lit, in_length, out_length, -// // 100L - out_length*100L/in_length)); -// if (s.matches < (s.last_lit>>1)/*int /2*/ && out_length < (in_length>>1)/*int /2*/) { -// return true; -// } -// } -//#endif - - return (s.last_lit === s.lit_bufsize - 1); - /* We avoid equality with lit_bufsize because of wraparound at 64K - * on 16 bit machines and because stored blocks are restricted to - * 64K-1 bytes. - */ -} - -exports._tr_init = _tr_init; -exports._tr_stored_block = _tr_stored_block; -exports._tr_flush_block = _tr_flush_block; -exports._tr_tally = _tr_tally; -exports._tr_align = _tr_align; diff --git a/node_modules/browserify/node_modules/browserify-zlib/node_modules/pako/lib/zlib/zstream.js b/node_modules/browserify/node_modules/browserify-zlib/node_modules/pako/lib/zlib/zstream.js deleted file mode 100644 index 2d93a391..00000000 --- a/node_modules/browserify/node_modules/browserify-zlib/node_modules/pako/lib/zlib/zstream.js +++ /dev/null @@ -1,29 +0,0 @@ -'use strict'; - - -function ZStream() { - /* next input byte */ - this.input = null; // JS specific, because we have no pointers - this.next_in = 0; - /* number of bytes available at input */ - this.avail_in = 0; - /* total number of input bytes read so far */ - this.total_in = 0; - /* next output byte should be put there */ - this.output = null; // JS specific, because we have no pointers - this.next_out = 0; - /* remaining free space at output */ - this.avail_out = 0; - /* total number of bytes output so far */ - this.total_out = 0; - /* last error message, NULL if no error */ - this.msg = ''/*Z_NULL*/; - /* not visible by applications */ - this.state = null; - /* best guess about the data type: binary or text */ - this.data_type = 2/*Z_UNKNOWN*/; - /* adler32 value of the uncompressed data */ - this.adler = 0; -} - -module.exports = ZStream; diff --git a/node_modules/browserify/node_modules/browserify-zlib/node_modules/pako/package.json b/node_modules/browserify/node_modules/browserify-zlib/node_modules/pako/package.json deleted file mode 100644 index 18e62d98..00000000 --- a/node_modules/browserify/node_modules/browserify-zlib/node_modules/pako/package.json +++ /dev/null @@ -1,80 +0,0 @@ -{ - "name": "pako", - "description": "zlib port to javascript - fast, modularized, with browser support", - "version": "0.2.9", - "keywords": [ - "zlib", - "deflate", - "inflate", - "gzip" - ], - "homepage": "https://github.com/nodeca/pako", - "contributors": [ - { - "name": "Andrei Tuputcyn", - "url": "https://github.com/andr83" - }, - { - "name": "Vitaly Puzrin", - "url": "https://github.com/puzrin" - } - ], - "files": [ - "index.js", - "dist/", - "lib/" - ], - "license": "MIT", - "repository": { - "type": "git", - "url": "git+https://github.com/nodeca/pako.git" - }, - "devDependencies": { - "mocha": "1.21.5", - "benchmark": "*", - "ansi": "*", - "browserify": "*", - "eslint": "^2.1.0", - "eslint-plugin-nodeca": "~1.0.3", - "uglify-js": "*", - "istanbul": "*", - "ndoc": "*", - "lodash": "*", - "async": "*", - "grunt": "~0.4.4", - "grunt-cli": "~0.1.13", - "grunt-saucelabs": "~8.6.0", - "grunt-contrib-connect": "~0.9.0" - }, - "gitHead": "85d145e616967f3720382f416da530c23c02ad13", - "bugs": { - "url": "https://github.com/nodeca/pako/issues" - }, - "_id": "pako@0.2.9", - "scripts": {}, - "_shasum": "f3f7522f4ef782348da8161bad9ecfd51bf83a75", - "_from": "pako@>=0.2.0 <0.3.0", - "_npmVersion": "2.15.5", - "_nodeVersion": "4.4.5", - "_npmUser": { - "name": "vitaly", - "email": "vitaly@rcdesign.ru" - }, - "maintainers": [ - { - "name": "vitaly", - "email": "vitaly@rcdesign.ru" - } - ], - "dist": { - "shasum": "f3f7522f4ef782348da8161bad9ecfd51bf83a75", - "tarball": "https://registry.npmjs.org/pako/-/pako-0.2.9.tgz" - }, - "_npmOperationalInternal": { - "host": "packages-12-west.internal.npmjs.com", - "tmp": "tmp/pako-0.2.9.tgz_1469133699053_0.013920168625190854" - }, - "directories": {}, - "_resolved": "https://registry.npmjs.org/pako/-/pako-0.2.9.tgz", - "readme": "ERROR: No README data found!" -} diff --git a/node_modules/browserify/node_modules/browserify-zlib/package.json b/node_modules/browserify/node_modules/browserify-zlib/package.json deleted file mode 100644 index f76b8281..00000000 --- a/node_modules/browserify/node_modules/browserify-zlib/package.json +++ /dev/null @@ -1,69 +0,0 @@ -{ - "name": "browserify-zlib", - "version": "0.1.4", - "description": "Full zlib module for browserify", - "keywords": [ - "zlib", - "browserify" - ], - "main": "src/index.js", - "directories": { - "test": "test" - }, - "dependencies": { - "pako": "~0.2.0" - }, - "devDependencies": { - "tape": "^2.12.3", - "brfs": "^1.0.1" - }, - "testling": { - "files": "test/*.js", - "browsers": [ - "ie/6..latest", - "chrome/22..latest", - "firefox/16..latest", - "safari/latest", - "opera/11.0..latest", - "iphone/6", - "ipad/6", - "android-browser/latest" - ] - }, - "scripts": { - "test": "node_modules/tape/bin/tape test/*.js" - }, - "author": { - "name": "Devon Govett", - "email": "devongovett@gmail.com" - }, - "license": "MIT", - "repository": { - "type": "git", - "url": "git://github.com/devongovett/browserify-zlib.git" - }, - "bugs": { - "url": "https://github.com/devongovett/browserify-zlib/issues" - }, - "homepage": "https://github.com/devongovett/browserify-zlib", - "_id": "browserify-zlib@0.1.4", - "dist": { - "shasum": "bb35f8a519f600e0fa6b8485241c979d0141fb2d", - "tarball": "http://registry.npmjs.org/browserify-zlib/-/browserify-zlib-0.1.4.tgz" - }, - "_from": "browserify-zlib@>=0.1.2 <0.2.0", - "_npmVersion": "1.4.4", - "_npmUser": { - "name": "devongovett", - "email": "devongovett@gmail.com" - }, - "maintainers": [ - { - "name": "devongovett", - "email": "devongovett@gmail.com" - } - ], - "_shasum": "bb35f8a519f600e0fa6b8485241c979d0141fb2d", - "_resolved": "https://registry.npmjs.org/browserify-zlib/-/browserify-zlib-0.1.4.tgz", - "readme": "ERROR: No README data found!" -} diff --git a/node_modules/browserify/node_modules/browserify-zlib/src/binding.js b/node_modules/browserify/node_modules/browserify-zlib/src/binding.js deleted file mode 100644 index 7244b438..00000000 --- a/node_modules/browserify/node_modules/browserify-zlib/src/binding.js +++ /dev/null @@ -1,236 +0,0 @@ -var msg = require('pako/lib/zlib/messages'); -var zstream = require('pako/lib/zlib/zstream'); -var zlib_deflate = require('pako/lib/zlib/deflate.js'); -var zlib_inflate = require('pako/lib/zlib/inflate.js'); -var constants = require('pako/lib/zlib/constants'); - -for (var key in constants) { - exports[key] = constants[key]; -} - -// zlib modes -exports.NONE = 0; -exports.DEFLATE = 1; -exports.INFLATE = 2; -exports.GZIP = 3; -exports.GUNZIP = 4; -exports.DEFLATERAW = 5; -exports.INFLATERAW = 6; -exports.UNZIP = 7; - -/** - * Emulate Node's zlib C++ layer for use by the JS layer in index.js - */ -function Zlib(mode) { - if (mode < exports.DEFLATE || mode > exports.UNZIP) - throw new TypeError("Bad argument"); - - this.mode = mode; - this.init_done = false; - this.write_in_progress = false; - this.pending_close = false; - this.windowBits = 0; - this.level = 0; - this.memLevel = 0; - this.strategy = 0; - this.dictionary = null; -} - -Zlib.prototype.init = function(windowBits, level, memLevel, strategy, dictionary) { - this.windowBits = windowBits; - this.level = level; - this.memLevel = memLevel; - this.strategy = strategy; - // dictionary not supported. - - if (this.mode === exports.GZIP || this.mode === exports.GUNZIP) - this.windowBits += 16; - - if (this.mode === exports.UNZIP) - this.windowBits += 32; - - if (this.mode === exports.DEFLATERAW || this.mode === exports.INFLATERAW) - this.windowBits = -this.windowBits; - - this.strm = new zstream(); - - switch (this.mode) { - case exports.DEFLATE: - case exports.GZIP: - case exports.DEFLATERAW: - var status = zlib_deflate.deflateInit2( - this.strm, - this.level, - exports.Z_DEFLATED, - this.windowBits, - this.memLevel, - this.strategy - ); - break; - case exports.INFLATE: - case exports.GUNZIP: - case exports.INFLATERAW: - case exports.UNZIP: - var status = zlib_inflate.inflateInit2( - this.strm, - this.windowBits - ); - break; - default: - throw new Error("Unknown mode " + this.mode); - } - - if (status !== exports.Z_OK) { - this._error(status); - return; - } - - this.write_in_progress = false; - this.init_done = true; -}; - -Zlib.prototype.params = function() { - throw new Error("deflateParams Not supported"); -}; - -Zlib.prototype._writeCheck = function() { - if (!this.init_done) - throw new Error("write before init"); - - if (this.mode === exports.NONE) - throw new Error("already finalized"); - - if (this.write_in_progress) - throw new Error("write already in progress"); - - if (this.pending_close) - throw new Error("close is pending"); -}; - -Zlib.prototype.write = function(flush, input, in_off, in_len, out, out_off, out_len) { - this._writeCheck(); - this.write_in_progress = true; - - var self = this; - process.nextTick(function() { - self.write_in_progress = false; - var res = self._write(flush, input, in_off, in_len, out, out_off, out_len); - self.callback(res[0], res[1]); - - if (self.pending_close) - self.close(); - }); - - return this; -}; - -// set method for Node buffers, used by pako -function bufferSet(data, offset) { - for (var i = 0; i < data.length; i++) { - this[offset + i] = data[i]; - } -} - -Zlib.prototype.writeSync = function(flush, input, in_off, in_len, out, out_off, out_len) { - this._writeCheck(); - return this._write(flush, input, in_off, in_len, out, out_off, out_len); -}; - -Zlib.prototype._write = function(flush, input, in_off, in_len, out, out_off, out_len) { - this.write_in_progress = true; - - if (flush !== exports.Z_NO_FLUSH && - flush !== exports.Z_PARTIAL_FLUSH && - flush !== exports.Z_SYNC_FLUSH && - flush !== exports.Z_FULL_FLUSH && - flush !== exports.Z_FINISH && - flush !== exports.Z_BLOCK) { - throw new Error("Invalid flush value"); - } - - if (input == null) { - input = new Buffer(0); - in_len = 0; - in_off = 0; - } - - if (out._set) - out.set = out._set; - else - out.set = bufferSet; - - var strm = this.strm; - strm.avail_in = in_len; - strm.input = input; - strm.next_in = in_off; - strm.avail_out = out_len; - strm.output = out; - strm.next_out = out_off; - - switch (this.mode) { - case exports.DEFLATE: - case exports.GZIP: - case exports.DEFLATERAW: - var status = zlib_deflate.deflate(strm, flush); - break; - case exports.UNZIP: - case exports.INFLATE: - case exports.GUNZIP: - case exports.INFLATERAW: - var status = zlib_inflate.inflate(strm, flush); - break; - default: - throw new Error("Unknown mode " + this.mode); - } - - if (status !== exports.Z_STREAM_END && status !== exports.Z_OK) { - this._error(status); - } - - this.write_in_progress = false; - return [strm.avail_in, strm.avail_out]; -}; - -Zlib.prototype.close = function() { - if (this.write_in_progress) { - this.pending_close = true; - return; - } - - this.pending_close = false; - - if (this.mode === exports.DEFLATE || this.mode === exports.GZIP || this.mode === exports.DEFLATERAW) { - zlib_deflate.deflateEnd(this.strm); - } else { - zlib_inflate.inflateEnd(this.strm); - } - - this.mode = exports.NONE; -}; - -Zlib.prototype.reset = function() { - switch (this.mode) { - case exports.DEFLATE: - case exports.DEFLATERAW: - var status = zlib_deflate.deflateReset(this.strm); - break; - case exports.INFLATE: - case exports.INFLATERAW: - var status = zlib_inflate.inflateReset(this.strm); - break; - } - - if (status !== exports.Z_OK) { - this._error(status); - } -}; - -Zlib.prototype._error = function(status) { - this.onerror(msg[status] + ': ' + this.strm.msg, status); - - this.write_in_progress = false; - if (this.pending_close) - this.close(); -}; - -exports.Zlib = Zlib; diff --git a/node_modules/browserify/node_modules/browserify-zlib/src/index.js b/node_modules/browserify/node_modules/browserify-zlib/src/index.js deleted file mode 100644 index 032689c4..00000000 --- a/node_modules/browserify/node_modules/browserify-zlib/src/index.js +++ /dev/null @@ -1,610 +0,0 @@ -// Copyright Joyent, Inc. and other Node contributors. -// -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to permit -// persons to whom the Software is furnished to do so, subject to the -// following conditions: -// -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -// USE OR OTHER DEALINGS IN THE SOFTWARE. - -var Transform = require('_stream_transform'); - -var binding = require('./binding'); -var util = require('util'); -var assert = require('assert').ok; - -// zlib doesn't provide these, so kludge them in following the same -// const naming scheme zlib uses. -binding.Z_MIN_WINDOWBITS = 8; -binding.Z_MAX_WINDOWBITS = 15; -binding.Z_DEFAULT_WINDOWBITS = 15; - -// fewer than 64 bytes per chunk is stupid. -// technically it could work with as few as 8, but even 64 bytes -// is absurdly low. Usually a MB or more is best. -binding.Z_MIN_CHUNK = 64; -binding.Z_MAX_CHUNK = Infinity; -binding.Z_DEFAULT_CHUNK = (16 * 1024); - -binding.Z_MIN_MEMLEVEL = 1; -binding.Z_MAX_MEMLEVEL = 9; -binding.Z_DEFAULT_MEMLEVEL = 8; - -binding.Z_MIN_LEVEL = -1; -binding.Z_MAX_LEVEL = 9; -binding.Z_DEFAULT_LEVEL = binding.Z_DEFAULT_COMPRESSION; - -// expose all the zlib constants -Object.keys(binding).forEach(function(k) { - if (k.match(/^Z/)) exports[k] = binding[k]; -}); - -// translation table for return codes. -exports.codes = { - Z_OK: binding.Z_OK, - Z_STREAM_END: binding.Z_STREAM_END, - Z_NEED_DICT: binding.Z_NEED_DICT, - Z_ERRNO: binding.Z_ERRNO, - Z_STREAM_ERROR: binding.Z_STREAM_ERROR, - Z_DATA_ERROR: binding.Z_DATA_ERROR, - Z_MEM_ERROR: binding.Z_MEM_ERROR, - Z_BUF_ERROR: binding.Z_BUF_ERROR, - Z_VERSION_ERROR: binding.Z_VERSION_ERROR -}; - -Object.keys(exports.codes).forEach(function(k) { - exports.codes[exports.codes[k]] = k; -}); - -exports.Deflate = Deflate; -exports.Inflate = Inflate; -exports.Gzip = Gzip; -exports.Gunzip = Gunzip; -exports.DeflateRaw = DeflateRaw; -exports.InflateRaw = InflateRaw; -exports.Unzip = Unzip; - -exports.createDeflate = function(o) { - return new Deflate(o); -}; - -exports.createInflate = function(o) { - return new Inflate(o); -}; - -exports.createDeflateRaw = function(o) { - return new DeflateRaw(o); -}; - -exports.createInflateRaw = function(o) { - return new InflateRaw(o); -}; - -exports.createGzip = function(o) { - return new Gzip(o); -}; - -exports.createGunzip = function(o) { - return new Gunzip(o); -}; - -exports.createUnzip = function(o) { - return new Unzip(o); -}; - - -// Convenience methods. -// compress/decompress a string or buffer in one step. -exports.deflate = function(buffer, opts, callback) { - if (typeof opts === 'function') { - callback = opts; - opts = {}; - } - return zlibBuffer(new Deflate(opts), buffer, callback); -}; - -exports.deflateSync = function(buffer, opts) { - return zlibBufferSync(new Deflate(opts), buffer); -}; - -exports.gzip = function(buffer, opts, callback) { - if (typeof opts === 'function') { - callback = opts; - opts = {}; - } - return zlibBuffer(new Gzip(opts), buffer, callback); -}; - -exports.gzipSync = function(buffer, opts) { - return zlibBufferSync(new Gzip(opts), buffer); -}; - -exports.deflateRaw = function(buffer, opts, callback) { - if (typeof opts === 'function') { - callback = opts; - opts = {}; - } - return zlibBuffer(new DeflateRaw(opts), buffer, callback); -}; - -exports.deflateRawSync = function(buffer, opts) { - return zlibBufferSync(new DeflateRaw(opts), buffer); -}; - -exports.unzip = function(buffer, opts, callback) { - if (typeof opts === 'function') { - callback = opts; - opts = {}; - } - return zlibBuffer(new Unzip(opts), buffer, callback); -}; - -exports.unzipSync = function(buffer, opts) { - return zlibBufferSync(new Unzip(opts), buffer); -}; - -exports.inflate = function(buffer, opts, callback) { - if (typeof opts === 'function') { - callback = opts; - opts = {}; - } - return zlibBuffer(new Inflate(opts), buffer, callback); -}; - -exports.inflateSync = function(buffer, opts) { - return zlibBufferSync(new Inflate(opts), buffer); -}; - -exports.gunzip = function(buffer, opts, callback) { - if (typeof opts === 'function') { - callback = opts; - opts = {}; - } - return zlibBuffer(new Gunzip(opts), buffer, callback); -}; - -exports.gunzipSync = function(buffer, opts) { - return zlibBufferSync(new Gunzip(opts), buffer); -}; - -exports.inflateRaw = function(buffer, opts, callback) { - if (typeof opts === 'function') { - callback = opts; - opts = {}; - } - return zlibBuffer(new InflateRaw(opts), buffer, callback); -}; - -exports.inflateRawSync = function(buffer, opts) { - return zlibBufferSync(new InflateRaw(opts), buffer); -}; - -function zlibBuffer(engine, buffer, callback) { - var buffers = []; - var nread = 0; - - engine.on('error', onError); - engine.on('end', onEnd); - - engine.end(buffer); - flow(); - - function flow() { - var chunk; - while (null !== (chunk = engine.read())) { - buffers.push(chunk); - nread += chunk.length; - } - engine.once('readable', flow); - } - - function onError(err) { - engine.removeListener('end', onEnd); - engine.removeListener('readable', flow); - callback(err); - } - - function onEnd() { - var buf = Buffer.concat(buffers, nread); - buffers = []; - callback(null, buf); - engine.close(); - } -} - -function zlibBufferSync(engine, buffer) { - if (typeof buffer === 'string') - buffer = new Buffer(buffer); - if (!Buffer.isBuffer(buffer)) - throw new TypeError('Not a string or buffer'); - - var flushFlag = binding.Z_FINISH; - - return engine._processChunk(buffer, flushFlag); -} - -// generic zlib -// minimal 2-byte header -function Deflate(opts) { - if (!(this instanceof Deflate)) return new Deflate(opts); - Zlib.call(this, opts, binding.DEFLATE); -} - -function Inflate(opts) { - if (!(this instanceof Inflate)) return new Inflate(opts); - Zlib.call(this, opts, binding.INFLATE); -} - - - -// gzip - bigger header, same deflate compression -function Gzip(opts) { - if (!(this instanceof Gzip)) return new Gzip(opts); - Zlib.call(this, opts, binding.GZIP); -} - -function Gunzip(opts) { - if (!(this instanceof Gunzip)) return new Gunzip(opts); - Zlib.call(this, opts, binding.GUNZIP); -} - - - -// raw - no header -function DeflateRaw(opts) { - if (!(this instanceof DeflateRaw)) return new DeflateRaw(opts); - Zlib.call(this, opts, binding.DEFLATERAW); -} - -function InflateRaw(opts) { - if (!(this instanceof InflateRaw)) return new InflateRaw(opts); - Zlib.call(this, opts, binding.INFLATERAW); -} - - -// auto-detect header. -function Unzip(opts) { - if (!(this instanceof Unzip)) return new Unzip(opts); - Zlib.call(this, opts, binding.UNZIP); -} - - -// the Zlib class they all inherit from -// This thing manages the queue of requests, and returns -// true or false if there is anything in the queue when -// you call the .write() method. - -function Zlib(opts, mode) { - this._opts = opts = opts || {}; - this._chunkSize = opts.chunkSize || exports.Z_DEFAULT_CHUNK; - - Transform.call(this, opts); - - if (opts.flush) { - if (opts.flush !== binding.Z_NO_FLUSH && - opts.flush !== binding.Z_PARTIAL_FLUSH && - opts.flush !== binding.Z_SYNC_FLUSH && - opts.flush !== binding.Z_FULL_FLUSH && - opts.flush !== binding.Z_FINISH && - opts.flush !== binding.Z_BLOCK) { - throw new Error('Invalid flush flag: ' + opts.flush); - } - } - this._flushFlag = opts.flush || binding.Z_NO_FLUSH; - - if (opts.chunkSize) { - if (opts.chunkSize < exports.Z_MIN_CHUNK || - opts.chunkSize > exports.Z_MAX_CHUNK) { - throw new Error('Invalid chunk size: ' + opts.chunkSize); - } - } - - if (opts.windowBits) { - if (opts.windowBits < exports.Z_MIN_WINDOWBITS || - opts.windowBits > exports.Z_MAX_WINDOWBITS) { - throw new Error('Invalid windowBits: ' + opts.windowBits); - } - } - - if (opts.level) { - if (opts.level < exports.Z_MIN_LEVEL || - opts.level > exports.Z_MAX_LEVEL) { - throw new Error('Invalid compression level: ' + opts.level); - } - } - - if (opts.memLevel) { - if (opts.memLevel < exports.Z_MIN_MEMLEVEL || - opts.memLevel > exports.Z_MAX_MEMLEVEL) { - throw new Error('Invalid memLevel: ' + opts.memLevel); - } - } - - if (opts.strategy) { - if (opts.strategy != exports.Z_FILTERED && - opts.strategy != exports.Z_HUFFMAN_ONLY && - opts.strategy != exports.Z_RLE && - opts.strategy != exports.Z_FIXED && - opts.strategy != exports.Z_DEFAULT_STRATEGY) { - throw new Error('Invalid strategy: ' + opts.strategy); - } - } - - if (opts.dictionary) { - if (!Buffer.isBuffer(opts.dictionary)) { - throw new Error('Invalid dictionary: it should be a Buffer instance'); - } - } - - this._binding = new binding.Zlib(mode); - - var self = this; - this._hadError = false; - this._binding.onerror = function(message, errno) { - // there is no way to cleanly recover. - // continuing only obscures problems. - self._binding = null; - self._hadError = true; - - var error = new Error(message); - error.errno = errno; - error.code = exports.codes[errno]; - self.emit('error', error); - }; - - var level = exports.Z_DEFAULT_COMPRESSION; - if (typeof opts.level === 'number') level = opts.level; - - var strategy = exports.Z_DEFAULT_STRATEGY; - if (typeof opts.strategy === 'number') strategy = opts.strategy; - - this._binding.init(opts.windowBits || exports.Z_DEFAULT_WINDOWBITS, - level, - opts.memLevel || exports.Z_DEFAULT_MEMLEVEL, - strategy, - opts.dictionary); - - this._buffer = new Buffer(this._chunkSize); - this._offset = 0; - this._closed = false; - this._level = level; - this._strategy = strategy; - - this.once('end', this.close); -} - -util.inherits(Zlib, Transform); - -Zlib.prototype.params = function(level, strategy, callback) { - if (level < exports.Z_MIN_LEVEL || - level > exports.Z_MAX_LEVEL) { - throw new RangeError('Invalid compression level: ' + level); - } - if (strategy != exports.Z_FILTERED && - strategy != exports.Z_HUFFMAN_ONLY && - strategy != exports.Z_RLE && - strategy != exports.Z_FIXED && - strategy != exports.Z_DEFAULT_STRATEGY) { - throw new TypeError('Invalid strategy: ' + strategy); - } - - if (this._level !== level || this._strategy !== strategy) { - var self = this; - this.flush(binding.Z_SYNC_FLUSH, function() { - self._binding.params(level, strategy); - if (!self._hadError) { - self._level = level; - self._strategy = strategy; - if (callback) callback(); - } - }); - } else { - process.nextTick(callback); - } -}; - -Zlib.prototype.reset = function() { - return this._binding.reset(); -}; - -// This is the _flush function called by the transform class, -// internally, when the last chunk has been written. -Zlib.prototype._flush = function(callback) { - this._transform(new Buffer(0), '', callback); -}; - -Zlib.prototype.flush = function(kind, callback) { - var ws = this._writableState; - - if (typeof kind === 'function' || (kind === void 0 && !callback)) { - callback = kind; - kind = binding.Z_FULL_FLUSH; - } - - if (ws.ended) { - if (callback) - process.nextTick(callback); - } else if (ws.ending) { - if (callback) - this.once('end', callback); - } else if (ws.needDrain) { - var self = this; - this.once('drain', function() { - self.flush(callback); - }); - } else { - this._flushFlag = kind; - this.write(new Buffer(0), '', callback); - } -}; - -Zlib.prototype.close = function(callback) { - if (callback) - process.nextTick(callback); - - if (this._closed) - return; - - this._closed = true; - - this._binding.close(); - - var self = this; - process.nextTick(function() { - self.emit('close'); - }); -}; - -Zlib.prototype._transform = function(chunk, encoding, cb) { - var flushFlag; - var ws = this._writableState; - var ending = ws.ending || ws.ended; - var last = ending && (!chunk || ws.length === chunk.length); - - if (!chunk === null && !Buffer.isBuffer(chunk)) - return cb(new Error('invalid input')); - - // If it's the last chunk, or a final flush, we use the Z_FINISH flush flag. - // If it's explicitly flushing at some other time, then we use - // Z_FULL_FLUSH. Otherwise, use Z_NO_FLUSH for maximum compression - // goodness. - if (last) - flushFlag = binding.Z_FINISH; - else { - flushFlag = this._flushFlag; - // once we've flushed the last of the queue, stop flushing and - // go back to the normal behavior. - if (chunk.length >= ws.length) { - this._flushFlag = this._opts.flush || binding.Z_NO_FLUSH; - } - } - - var self = this; - this._processChunk(chunk, flushFlag, cb); -}; - -Zlib.prototype._processChunk = function(chunk, flushFlag, cb) { - var availInBefore = chunk && chunk.length; - var availOutBefore = this._chunkSize - this._offset; - var inOff = 0; - - var self = this; - - var async = typeof cb === 'function'; - - if (!async) { - var buffers = []; - var nread = 0; - - var error; - this.on('error', function(er) { - error = er; - }); - - do { - var res = this._binding.writeSync(flushFlag, - chunk, // in - inOff, // in_off - availInBefore, // in_len - this._buffer, // out - this._offset, //out_off - availOutBefore); // out_len - } while (!this._hadError && callback(res[0], res[1])); - - if (this._hadError) { - throw error; - } - - var buf = Buffer.concat(buffers, nread); - this.close(); - - return buf; - } - - var req = this._binding.write(flushFlag, - chunk, // in - inOff, // in_off - availInBefore, // in_len - this._buffer, // out - this._offset, //out_off - availOutBefore); // out_len - - req.buffer = chunk; - req.callback = callback; - - function callback(availInAfter, availOutAfter) { - if (self._hadError) - return; - - var have = availOutBefore - availOutAfter; - assert(have >= 0, 'have should not go down'); - - if (have > 0) { - var out = self._buffer.slice(self._offset, self._offset + have); - self._offset += have; - // serve some output to the consumer. - if (async) { - self.push(out); - } else { - buffers.push(out); - nread += out.length; - } - } - - // exhausted the output buffer, or used all the input create a new one. - if (availOutAfter === 0 || self._offset >= self._chunkSize) { - availOutBefore = self._chunkSize; - self._offset = 0; - self._buffer = new Buffer(self._chunkSize); - } - - if (availOutAfter === 0) { - // Not actually done. Need to reprocess. - // Also, update the availInBefore to the availInAfter value, - // so that if we have to hit it a third (fourth, etc.) time, - // it'll have the correct byte counts. - inOff += (availInBefore - availInAfter); - availInBefore = availInAfter; - - if (!async) - return true; - - var newReq = self._binding.write(flushFlag, - chunk, - inOff, - availInBefore, - self._buffer, - self._offset, - self._chunkSize); - newReq.callback = callback; // this same function - newReq.buffer = chunk; - return; - } - - if (!async) - return false; - - // finished with the chunk. - cb(); - } -}; - -util.inherits(Deflate, Zlib); -util.inherits(Inflate, Zlib); -util.inherits(Gzip, Zlib); -util.inherits(Gunzip, Zlib); -util.inherits(DeflateRaw, Zlib); -util.inherits(InflateRaw, Zlib); -util.inherits(Unzip, Zlib); diff --git a/node_modules/browserify/node_modules/browserify-zlib/test/fixtures/elipses.txt b/node_modules/browserify/node_modules/browserify-zlib/test/fixtures/elipses.txt deleted file mode 100644 index 61056005..00000000 --- a/node_modules/browserify/node_modules/browserify-zlib/test/fixtures/elipses.txt +++ /dev/null @@ -1 +0,0 @@ -………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………… \ No newline at end of file diff --git a/node_modules/browserify/node_modules/browserify-zlib/test/fixtures/empty.txt b/node_modules/browserify/node_modules/browserify-zlib/test/fixtures/empty.txt deleted file mode 100644 index 8b137891..00000000 --- a/node_modules/browserify/node_modules/browserify-zlib/test/fixtures/empty.txt +++ /dev/null @@ -1 +0,0 @@ - diff --git a/node_modules/browserify/node_modules/browserify-zlib/test/fixtures/person.jpg b/node_modules/browserify/node_modules/browserify-zlib/test/fixtures/person.jpg deleted file mode 100644 index 4f71881c..00000000 Binary files a/node_modules/browserify/node_modules/browserify-zlib/test/fixtures/person.jpg and /dev/null differ diff --git a/node_modules/browserify/node_modules/browserify-zlib/test/ignored/test-zlib-dictionary-fail.js b/node_modules/browserify/node_modules/browserify-zlib/test/ignored/test-zlib-dictionary-fail.js deleted file mode 100755 index fd35a019..00000000 --- a/node_modules/browserify/node_modules/browserify-zlib/test/ignored/test-zlib-dictionary-fail.js +++ /dev/null @@ -1,48 +0,0 @@ -// Copyright Joyent, Inc. and other Node contributors. -// -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to permit -// persons to whom the Software is furnished to do so, subject to the -// following conditions: -// -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -// USE OR OTHER DEALINGS IN THE SOFTWARE. - -var common = require('../common.js'); -var assert = require('assert'); -var zlib = require('zlib'); - -// Should raise an error, not trigger an assertion in src/node_zlib.cc -(function() { - var stream = zlib.createInflate(); - - stream.on('error', common.mustCall(function(err) { - assert(/Missing dictionary/.test(err.message)); - })); - - // String "test" encoded with dictionary "dict". - stream.write(Buffer([0x78,0xBB,0x04,0x09,0x01,0xA5])); -})(); - -// Should raise an error, not trigger an assertion in src/node_zlib.cc -(function() { - var stream = zlib.createInflate({ dictionary: Buffer('fail') }); - - stream.on('error', common.mustCall(function(err) { - assert(/Bad dictionary/.test(err.message)); - })); - - // String "test" encoded with dictionary "dict". - stream.write(Buffer([0x78,0xBB,0x04,0x09,0x01,0xA5])); -})(); diff --git a/node_modules/browserify/node_modules/browserify-zlib/test/ignored/test-zlib-dictionary.js b/node_modules/browserify/node_modules/browserify-zlib/test/ignored/test-zlib-dictionary.js deleted file mode 100755 index 58da810c..00000000 --- a/node_modules/browserify/node_modules/browserify-zlib/test/ignored/test-zlib-dictionary.js +++ /dev/null @@ -1,95 +0,0 @@ -// Copyright Joyent, Inc. and other Node contributors. -// -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to permit -// persons to whom the Software is furnished to do so, subject to the -// following conditions: -// -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -// USE OR OTHER DEALINGS IN THE SOFTWARE. - -// test compression/decompression with dictionary - -var common = require('../common.js'); -var assert = require('assert'); -var zlib = require('zlib'); -var path = require('path'); - -var spdyDict = new Buffer([ - 'optionsgetheadpostputdeletetraceacceptaccept-charsetaccept-encodingaccept-', - 'languageauthorizationexpectfromhostif-modified-sinceif-matchif-none-matchi', - 'f-rangeif-unmodifiedsincemax-forwardsproxy-authorizationrangerefererteuser', - '-agent10010120020120220320420520630030130230330430530630740040140240340440', - '5406407408409410411412413414415416417500501502503504505accept-rangesageeta', - 'glocationproxy-authenticatepublicretry-afterservervarywarningwww-authentic', - 'ateallowcontent-basecontent-encodingcache-controlconnectiondatetrailertran', - 'sfer-encodingupgradeviawarningcontent-languagecontent-lengthcontent-locati', - 'oncontent-md5content-rangecontent-typeetagexpireslast-modifiedset-cookieMo', - 'ndayTuesdayWednesdayThursdayFridaySaturdaySundayJanFebMarAprMayJunJulAugSe', - 'pOctNovDecchunkedtext/htmlimage/pngimage/jpgimage/gifapplication/xmlapplic', - 'ation/xhtmltext/plainpublicmax-agecharset=iso-8859-1utf-8gzipdeflateHTTP/1', - '.1statusversionurl\0' -].join('')); - -var deflate = zlib.createDeflate({ dictionary: spdyDict }); - -var input = [ - 'HTTP/1.1 200 Ok', - 'Server: node.js', - 'Content-Length: 0', - '' -].join('\r\n'); - -var called = 0; - -// -// We'll use clean-new inflate stream each time -// and .reset() old dirty deflate one -// -function run(num) { - var inflate = zlib.createInflate({ dictionary: spdyDict }); - - if (num === 2) { - deflate.reset(); - deflate.removeAllListeners('data'); - } - - // Put data into deflate stream - deflate.on('data', function(chunk) { - inflate.write(chunk); - }); - - // Get data from inflate stream - var output = []; - inflate.on('data', function(chunk) { - output.push(chunk); - }); - inflate.on('end', function() { - called++; - - assert.equal(output.join(''), input); - - if (num < 2) run(num + 1); - }); - - deflate.write(input); - deflate.flush(function() { - inflate.end(); - }); -} -run(1); - -process.on('exit', function() { - assert.equal(called, 2); -}); diff --git a/node_modules/browserify/node_modules/browserify-zlib/test/ignored/test-zlib-params.js b/node_modules/browserify/node_modules/browserify-zlib/test/ignored/test-zlib-params.js deleted file mode 100755 index 006f1ea8..00000000 --- a/node_modules/browserify/node_modules/browserify-zlib/test/ignored/test-zlib-params.js +++ /dev/null @@ -1,33 +0,0 @@ -var common = require('../common.js'); -var assert = require('assert'); -var zlib = require('zlib'); -var path = require('path'); -var fs = require('fs'); - -var file = fs.readFileSync(path.resolve(common.fixturesDir, 'person.jpg')), - chunkSize = 24 * 1024, - opts = { level: 9, strategy: zlib.Z_DEFAULT_STRATEGY }, - deflater = zlib.createDeflate(opts); - -var chunk1 = file.slice(0, chunkSize), - chunk2 = file.slice(chunkSize), - blkhdr = new Buffer([0x00, 0x48, 0x82, 0xb7, 0x7d]), - expected = Buffer.concat([blkhdr, chunk2]), - actual; - -deflater.write(chunk1, function() { - deflater.params(0, zlib.Z_DEFAULT_STRATEGY, function() { - while (deflater.read()); - deflater.end(chunk2, function() { - var bufs = [], buf; - while (buf = deflater.read()) - bufs.push(buf); - actual = Buffer.concat(bufs); - }); - }); - while (deflater.read()); -}); - -process.once('exit', function() { - assert.deepEqual(actual, expected); -}); diff --git a/node_modules/browserify/node_modules/browserify-zlib/test/package.json b/node_modules/browserify/node_modules/browserify-zlib/test/package.json deleted file mode 100644 index 189e1202..00000000 --- a/node_modules/browserify/node_modules/browserify-zlib/test/package.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "browserify": { - "transform": [ - "brfs" - ] - } -} \ No newline at end of file diff --git a/node_modules/browserify/node_modules/browserify-zlib/test/test-zlib-close-after-write.js b/node_modules/browserify/node_modules/browserify-zlib/test/test-zlib-close-after-write.js deleted file mode 100755 index 6d5a0836..00000000 --- a/node_modules/browserify/node_modules/browserify-zlib/test/test-zlib-close-after-write.js +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright Joyent, Inc. and other Node contributors. -// -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to permit -// persons to whom the Software is furnished to do so, subject to the -// following conditions: -// -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -// USE OR OTHER DEALINGS IN THE SOFTWARE. - -var tape = require('tape'); -var zlib = require('../'); - -tape(function(t) { - t.plan(1); - - zlib.gzip('hello', function(err, out) { - var unzip = zlib.createGunzip(); - unzip.write(out); - unzip.close(function() { - t.ok(true); - }); - }); -}); diff --git a/node_modules/browserify/node_modules/browserify-zlib/test/test-zlib-convenience-methods.js b/node_modules/browserify/node_modules/browserify-zlib/test/test-zlib-convenience-methods.js deleted file mode 100755 index 223160b8..00000000 --- a/node_modules/browserify/node_modules/browserify-zlib/test/test-zlib-convenience-methods.js +++ /dev/null @@ -1,70 +0,0 @@ -// Copyright Joyent, Inc. and other Node contributors. -// -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to permit -// persons to whom the Software is furnished to do so, subject to the -// following conditions: -// -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -// USE OR OTHER DEALINGS IN THE SOFTWARE. - -// test convenience methods with and without options supplied - -var tape = require('tape'); -var zlib = require('../'); - -var expect = 'blahblahblahblahblahblah'; -var opts = { - level: 9, - chunkSize: 1024, -}; - -[ - ['gzip', 'gunzip'], - ['gzip', 'unzip'], - ['deflate', 'inflate'], - ['deflateRaw', 'inflateRaw'], -].forEach(function(method) { - tape(method.join(' '), function(t) { - t.plan(4); - - zlib[method[0]](expect, opts, function(err, result) { - zlib[method[1]](result, opts, function(err, result) { - t.deepEqual(result, new Buffer(expect), - 'Should get original string after ' + - method[0] + '/' + method[1] + ' with options.'); - }); - }); - - zlib[method[0]](expect, function(err, result) { - zlib[method[1]](result, function(err, result) { - t.deepEqual(result, new Buffer(expect), - 'Should get original string after ' + - method[0] + '/' + method[1] + ' without options.'); - }); - }); - - var result = zlib[method[0] + 'Sync'](expect, opts); - result = zlib[method[1] + 'Sync'](result, opts); - t.deepEqual(result, new Buffer(expect), - 'Should get original string after ' + - method[0] + '/' + method[1] + ' with options.'); - - result = zlib[method[0] + 'Sync'](expect); - result = zlib[method[1] + 'Sync'](result); - t.deepEqual(result, new Buffer(expect), - 'Should get original string after ' + - method[0] + '/' + method[1] + ' without options.'); - }); -}); diff --git a/node_modules/browserify/node_modules/browserify-zlib/test/test-zlib-from-string.js b/node_modules/browserify/node_modules/browserify-zlib/test/test-zlib-from-string.js deleted file mode 100755 index 0376c557..00000000 --- a/node_modules/browserify/node_modules/browserify-zlib/test/test-zlib-from-string.js +++ /dev/null @@ -1,89 +0,0 @@ -// Copyright Joyent, Inc. and other Node contributors. -// -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to permit -// persons to whom the Software is furnished to do so, subject to the -// following conditions: -// -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -// USE OR OTHER DEALINGS IN THE SOFTWARE. - -// test compressing and uncompressing a string with zlib - -var tape = require('tape'); -var zlib = require('../'); - -var inputString = '\u03A9\u03A9Lorem ipsum dolor sit amet, consectetur adipiscing el' + - 'it. Morbi faucibus, purus at gravida dictum, libero arcu convallis la' + - 'cus, in commodo libero metus eu nisi. Nullam commodo, neque nec porta' + - ' placerat, nisi est fermentum augue, vitae gravida tellus sapien sit ' + - 'amet tellus. Aenean non diam orci. Proin quis elit turpis. Suspendiss' + - 'e non diam ipsum. Suspendisse nec ullamcorper odio. Vestibulum arcu m' + - 'i, sodales non suscipit id, ultrices ut massa. Sed ac sem sit amet ar' + - 'cu malesuada fermentum. Nunc sed. '; -var expectedBase64Deflate = 'eJxdUUtOQzEMvMoc4OndgT0gJCT2buJWlpI4jePeqZfpm' + - 'XAKLRKbLOzx/HK73q6vOrhCunlF1qIDJhNUeW5I2ozT5OkDlKWLJWkncJG5403HQXAkT3' + - 'Jw29B9uIEmToMukglZ0vS6ociBh4JG8sV4oVLEUCitK2kxq1WzPnChHDzsaGKy491Lofo' + - 'AbWh8do43oeuYhB5EPCjcLjzYJo48KrfQBvnJecNFJvHT1+RSQsGoC7dn2t/xjhduTA1N' + - 'WyQIZR0pbHwMDatnD+crPqKSqGPHp1vnlsWM/07ubf7bheF7kqSj84Bm0R1fYTfaK8vqq' + - 'qfKBtNMhe3OZh6N95CTvMX5HJJi4xOVzCgUOIMSLH7wmeOHaFE4RdpnGavKtrB5xzfO/Ll9'; -var expectedBase64Gzip = 'H4sIAAAAAAAAA11RS05DMQy8yhzg6d2BPSAkJPZu4laWkjiN' + - '496pl+mZcAotEpss7PH8crverq86uEK6eUXWogMmE1R5bkjajNPk6QOUpYslaSdwkbnjT' + - 'cdBcCRPcnDb0H24gSZOgy6SCVnS9LqhyIGHgkbyxXihUsRQKK0raTGrVbM+cKEcPOxoYr' + - 'Lj3Uuh+gBtaHx2jjeh65iEHkQ8KNwuPNgmjjwqt9AG+cl5w0Um8dPX5FJCwagLt2fa3/G' + - 'OF25MDU1bJAhlHSlsfAwNq2cP5ys+opKoY8enW+eWxYz/Tu5t/tuF4XuSpKPzgGbRHV9h' + - 'N9ory+qqp8oG00yF7c5mHo33kJO8xfkckmLjE5XMKBQ4gxIsfvCZ44doUThF2mcZq8q2s' + - 'HnHNzRtagj5AQAA'; - -tape('deflate', function(t) { - t.plan(1); - zlib.deflate(inputString, function(err, buffer) { - t.equal(buffer.toString('base64'), expectedBase64Deflate, - 'deflate encoded string should match'); - }); -}); - -tape('gzip', function(t) { - t.plan(1); - zlib.gzip(inputString, function(err, buffer) { - // Can't actually guarantee that we'll get exactly the same - // deflated bytes when we compress a string, since the header - // depends on stuff other than the input string itself. - // However, decrypting it should definitely yield the same - // result that we're expecting, and this should match what we get - // from inflating the known valid deflate data. - zlib.gunzip(buffer, function(err, gunzipped) { - t.equal(gunzipped.toString(), inputString, - 'Should get original string after gzip/gunzip'); - }); - }); -}); - -tape('unzip deflate', function(t) { - t.plan(1); - var buffer = new Buffer(expectedBase64Deflate, 'base64'); - zlib.unzip(buffer, function(err, buffer) { - t.equal(buffer.toString(), inputString, - 'decoded inflated string should match'); - }); -}); - -tape('unzip gzip', function(t) { - t.plan(1); - buffer = new Buffer(expectedBase64Gzip, 'base64'); - zlib.unzip(buffer, function(err, buffer) { - t.equal(buffer.toString(), inputString, - 'decoded gunzipped string should match'); - }); -}); diff --git a/node_modules/browserify/node_modules/browserify-zlib/test/test-zlib-invalid-input.js b/node_modules/browserify/node_modules/browserify-zlib/test/test-zlib-invalid-input.js deleted file mode 100755 index 5ac08c3e..00000000 --- a/node_modules/browserify/node_modules/browserify-zlib/test/test-zlib-invalid-input.js +++ /dev/null @@ -1,62 +0,0 @@ -// Copyright Joyent, Inc. and other Node contributors. -// -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to permit -// persons to whom the Software is furnished to do so, subject to the -// following conditions: -// -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -// USE OR OTHER DEALINGS IN THE SOFTWARE. - -// test uncompressing invalid input - -var tape = require('tape'), - zlib = require('../'); - -tape('non-strings', function(t) { - var nonStringInputs = [1, true, {a: 1}, ['a']]; - t.plan(12); - - nonStringInputs.forEach(function(input) { - // zlib.gunzip should not throw an error when called with bad input. - t.doesNotThrow(function() { - zlib.gunzip(input, function(err, buffer) { - // zlib.gunzip should pass the error to the callback. - t.ok(err); - }); - }); - }); -}); - -tape('unzips', function(t) { - // zlib.Unzip classes need to get valid data, or else they'll throw. - var unzips = [ zlib.Unzip(), - zlib.Gunzip(), - zlib.Inflate(), - zlib.InflateRaw() ]; - - t.plan(4); - unzips.forEach(function (uz, i) { - uz.on('error', function(er) { - t.ok(er); - }); - - uz.on('end', function(er) { - throw new Error('end event should not be emitted '+uz.constructor.name); - }); - - // this will trigger error event - uz.write('this is not valid compressed data.'); - }); -}); diff --git a/node_modules/browserify/node_modules/browserify-zlib/test/test-zlib-random-byte-pipes.js b/node_modules/browserify/node_modules/browserify-zlib/test/test-zlib-random-byte-pipes.js deleted file mode 100755 index 6dba4c2b..00000000 --- a/node_modules/browserify/node_modules/browserify-zlib/test/test-zlib-random-byte-pipes.js +++ /dev/null @@ -1,176 +0,0 @@ -// Copyright Joyent, Inc. and other Node contributors. -// -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to permit -// persons to whom the Software is furnished to do so, subject to the -// following conditions: -// -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -// USE OR OTHER DEALINGS IN THE SOFTWARE. - -var crypto = require('crypto'); -var stream = require('stream'); -var Stream = stream.Stream; -var util = require('util'); -var tape = require('tape'); -var zlib = require('../'); - - - -// emit random bytes, and keep a shasum -function RandomReadStream(opt) { - Stream.call(this); - - this.readable = true; - this._paused = false; - this._processing = false; - - this._hasher = crypto.createHash('sha1'); - opt = opt || {}; - - // base block size. - opt.block = opt.block || 256 * 1024; - - // total number of bytes to emit - opt.total = opt.total || 256 * 1024 * 1024; - this._remaining = opt.total; - - // how variable to make the block sizes - opt.jitter = opt.jitter || 1024; - - this._opt = opt; - - this._process = this._process.bind(this); - - process.nextTick(this._process); -} - -util.inherits(RandomReadStream, Stream); - -RandomReadStream.prototype.pause = function() { - this._paused = true; - this.emit('pause'); -}; - -RandomReadStream.prototype.resume = function() { - this._paused = false; - this.emit('resume'); - this._process(); -}; - -RandomReadStream.prototype._process = function() { - if (this._processing) return; - if (this._paused) return; - - this._processing = true; - - if (!this._remaining) { - this._hash = this._hasher.digest('hex').toLowerCase().trim(); - this._processing = false; - - this.emit('end'); - return; - } - - // figure out how many bytes to output - // if finished, then just emit end. - var block = this._opt.block; - var jitter = this._opt.jitter; - if (jitter) { - block += Math.ceil(Math.random() * jitter - (jitter / 2)); - } - block = Math.min(block, this._remaining); - var buf = new Buffer(block); - for (var i = 0; i < block; i++) { - buf[i] = Math.random() * 256; - } - - this._hasher.update(buf); - - this._remaining -= block; - - this._processing = false; - - this.emit('data', buf); - process.nextTick(this._process); -}; - - -// a filter that just verifies a shasum -function HashStream() { - Stream.call(this); - - this.readable = this.writable = true; - this._hasher = crypto.createHash('sha1'); -} - -util.inherits(HashStream, Stream); - -HashStream.prototype.write = function(c) { - // Simulate the way that an fs.ReadStream returns false - // on *every* write like a jerk, only to resume a - // moment later. - this._hasher.update(c); - process.nextTick(this.resume.bind(this)); - return false; -}; - -HashStream.prototype.resume = function() { - this.emit('resume'); - process.nextTick(this.emit.bind(this, 'drain')); -}; - -HashStream.prototype.end = function(c) { - if (c) { - this.write(c); - } - this._hash = this._hasher.digest('hex').toLowerCase().trim(); - this.emit('data', this._hash); - this.emit('end'); -}; - -tape('random byte pipes', function(t) { - var inp = new RandomReadStream({ total: 1024, block: 256, jitter: 16 }); - var out = new HashStream(); - var gzip = zlib.createGzip(); - var gunz = zlib.createGunzip(); - - inp.pipe(gzip).pipe(gunz).pipe(out); - - inp.on('data', function(c) { - t.ok(c.length); - }); - - gzip.on('data', function(c) { - t.ok(c.length); - }); - - gunz.on('data', function(c) { - t.ok(c.length); - }); - - out.on('data', function(c) { - t.ok(c.length); - }); - - out.on('data', function(c) { - t.ok(c.length); - t.equal(c, inp._hash, 'hashes should match'); - }); - - out.on('end', function() { - t.end(); - }) -}); - diff --git a/node_modules/browserify/node_modules/browserify-zlib/test/test-zlib-write-after-flush.js b/node_modules/browserify/node_modules/browserify-zlib/test/test-zlib-write-after-flush.js deleted file mode 100755 index 5841ef81..00000000 --- a/node_modules/browserify/node_modules/browserify-zlib/test/test-zlib-write-after-flush.js +++ /dev/null @@ -1,55 +0,0 @@ -// Copyright Joyent, Inc. and other Node contributors. -// -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to permit -// persons to whom the Software is furnished to do so, subject to the -// following conditions: -// -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -// USE OR OTHER DEALINGS IN THE SOFTWARE. - -var tape = require('tape'); -var zlib = require('../'); -var fs = require('fs'); - -tape('write after flush', function(t) { - t.plan(2); - - var gzip = zlib.createGzip(); - var gunz = zlib.createUnzip(); - - gzip.pipe(gunz); - - var output = ''; - var input = 'A line of data\n'; - gunz.setEncoding('utf8'); - gunz.on('data', function(c) { - output += c; - }); - - gunz.on('end', function() { - t.equal(output, input); - - // Make sure that the flush flag was set back to normal - t.equal(gzip._flushFlag, zlib.Z_NO_FLUSH); - }); - - // make sure that flush/write doesn't trigger an assert failure - gzip.flush(); write(); - function write() { - gzip.write(input); - gzip.end(); - gunz.read(0); - } -}); diff --git a/node_modules/browserify/node_modules/browserify-zlib/test/test-zlib-zero-byte.js b/node_modules/browserify/node_modules/browserify-zlib/test/test-zlib-zero-byte.js deleted file mode 100755 index 88bdd8cb..00000000 --- a/node_modules/browserify/node_modules/browserify-zlib/test/test-zlib-zero-byte.js +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright Joyent, Inc. and other Node contributors. -// -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to permit -// persons to whom the Software is furnished to do so, subject to the -// following conditions: -// -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -// USE OR OTHER DEALINGS IN THE SOFTWARE. - -var tape = require('tape'); -var zlib = require('../'); - -tape('zero byte', function(t) { - t.plan(2); - var gz = zlib.Gzip() - var emptyBuffer = new Buffer(0); - var received = 0; - gz.on('data', function(c) { - received += c.length; - }); - gz.on('end', function() { - t.equal(received, 20); - }); - gz.on('finish', function() { - t.ok(true); - }); - gz.write(emptyBuffer); - gz.end(); -}); diff --git a/node_modules/browserify/node_modules/browserify-zlib/test/test-zlib.js b/node_modules/browserify/node_modules/browserify-zlib/test/test-zlib.js deleted file mode 100644 index 64c02c5d..00000000 --- a/node_modules/browserify/node_modules/browserify-zlib/test/test-zlib.js +++ /dev/null @@ -1,206 +0,0 @@ -// Copyright Joyent, Inc. and other Node contributors. -// -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to permit -// persons to whom the Software is furnished to do so, subject to the -// following conditions: -// -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -// USE OR OTHER DEALINGS IN THE SOFTWARE. - -var assert = require('assert'); -var zlib = require('../'); -var path = require('path'); - -var zlibPairs = - [[zlib.Deflate, zlib.Inflate], - [zlib.Gzip, zlib.Gunzip], - [zlib.Deflate, zlib.Unzip], - [zlib.Gzip, zlib.Unzip], - [zlib.DeflateRaw, zlib.InflateRaw]]; - -// how fast to trickle through the slowstream -var trickle = [128, 1024, 1024 * 1024]; - -// tunable options for zlib classes. - -// several different chunk sizes -var chunkSize = [128, 1024, 1024 * 16, 1024 * 1024]; - -// this is every possible value. -var level = [-1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9]; -var windowBits = [8, 9, 10, 11, 12, 13, 14, 15]; -var memLevel = [1, 2, 3, 4, 5, 6, 7, 8, 9]; -var strategy = [0, 1, 2, 3, 4]; - -// it's nice in theory to test every combination, but it -// takes WAY too long. Maybe a pummel test could do this? -if (!process.env.PUMMEL) { - trickle = [1024]; - chunkSize = [1024 * 16]; - level = [6]; - memLevel = [8]; - windowBits = [15]; - strategy = [0]; -} - -var fs = require('fs'); - -if (process.env.FAST) { - zlibPairs = [[zlib.Gzip, zlib.Unzip]]; -} - -var tests = { - 'person.jpg': fs.readFileSync(__dirname + '/fixtures/person.jpg'), - 'elipses.txt': fs.readFileSync(__dirname + '/fixtures/elipses.txt'), - 'empty.txt': fs.readFileSync(__dirname + '/fixtures/empty.txt') -}; - -var util = require('util'); -var stream = require('stream'); - - -// stream that saves everything -function BufferStream() { - this.chunks = []; - this.length = 0; - this.writable = true; - this.readable = true; -} - -util.inherits(BufferStream, stream.Stream); - -BufferStream.prototype.write = function(c) { - this.chunks.push(c); - this.length += c.length; - return true; -}; - -BufferStream.prototype.end = function(c) { - if (c) this.write(c); - // flatten - var buf = new Buffer(this.length); - var i = 0; - this.chunks.forEach(function(c) { - c.copy(buf, i); - i += c.length; - }); - this.emit('data', buf); - this.emit('end'); - return true; -}; - - -function SlowStream(trickle) { - this.trickle = trickle; - this.offset = 0; - this.readable = this.writable = true; -} - -util.inherits(SlowStream, stream.Stream); - -SlowStream.prototype.write = function() { - throw new Error('not implemented, just call ss.end(chunk)'); -}; - -SlowStream.prototype.pause = function() { - this.paused = true; - this.emit('pause'); -}; - -SlowStream.prototype.resume = function() { - var self = this; - if (self.ended) return; - self.emit('resume'); - if (!self.chunk) return; - self.paused = false; - emit(); - function emit() { - if (self.paused) return; - if (self.offset >= self.length) { - self.ended = true; - return self.emit('end'); - } - var end = Math.min(self.offset + self.trickle, self.length); - var c = self.chunk.slice(self.offset, end); - self.offset += c.length; - self.emit('data', c); - process.nextTick(emit); - } -}; - -SlowStream.prototype.end = function(chunk) { - // walk over the chunk in blocks. - var self = this; - self.chunk = chunk; - self.length = chunk.length; - self.resume(); - return self.ended; -}; - - - -// for each of the files, make sure that compressing and -// decompressing results in the same data, for every combination -// of the options set above. -var tape = require('tape'); - -Object.keys(tests).forEach(function(file) { - var test = tests[file]; - chunkSize.forEach(function(chunkSize) { - trickle.forEach(function(trickle) { - windowBits.forEach(function(windowBits) { - level.forEach(function(level) { - memLevel.forEach(function(memLevel) { - strategy.forEach(function(strategy) { - zlibPairs.forEach(function(pair) { - var Def = pair[0]; - var Inf = pair[1]; - var opts = { - level: level, - windowBits: windowBits, - memLevel: memLevel, - strategy: strategy - }; - - var msg = file + ' ' + - chunkSize + ' ' + - JSON.stringify(opts) + ' ' + - Def.name + ' -> ' + Inf.name; - - tape('zlib ' + msg, function(t) { - t.plan(1); - - var def = new Def(opts); - var inf = new Inf(opts); - var ss = new SlowStream(trickle); - var buf = new BufferStream(); - - // verify that the same exact buffer comes out the other end. - buf.on('data', function(c) { - t.deepEqual(c, test); - }); - - // the magic happens here. - ss.pipe(def).pipe(inf).pipe(buf); - ss.end(test); - }); - }); - }); - }); - }); - }); - }); - }); -}); diff --git a/node_modules/browserify/node_modules/buffer/.npmignore b/node_modules/browserify/node_modules/buffer/.npmignore deleted file mode 100644 index 4cea1824..00000000 --- a/node_modules/browserify/node_modules/buffer/.npmignore +++ /dev/null @@ -1 +0,0 @@ -perf/ diff --git a/node_modules/browserify/node_modules/buffer/.travis.yml b/node_modules/browserify/node_modules/buffer/.travis.yml deleted file mode 100644 index abf846f5..00000000 --- a/node_modules/browserify/node_modules/buffer/.travis.yml +++ /dev/null @@ -1,8 +0,0 @@ -language: node_js -node_js: - - '4' -sudo: false -env: - global: - - secure: AUsK+8fYSpwIMHcVt8Mu9SpG9RPHp4XDAwCQfpU3d5U65q8OVVC6C+XjvnNmEd2PoEJRHem8ZXEyRVfGM1sttKZLZP70TEKZOpOiRQnZiTQCAJ92TfGsDj/F4LoWSjUZUpfeg9b3iSp8G5dVw3+q9QZPIu6eykASK6bfcg//Cyg= - - secure: eQBKJWu7XbhAN4ZvOOhMenC0IPpoYj+wZVVzzsLwUppfJqlrHV0CUW8rJdvZNiaGhYhoyHTnAcynpTE5kZfg3XjevOvF8PGY5wUYCki9BI+rp+pvVPZE/DNUAQpFR2gd2nxMJ4kYv7GVb6i/DfuqJa0h8IuY4zcMuKWwbQd3Az8= diff --git a/node_modules/browserify/node_modules/buffer/.zuul.yml b/node_modules/browserify/node_modules/buffer/.zuul.yml deleted file mode 100644 index a0b4b39a..00000000 --- a/node_modules/browserify/node_modules/buffer/.zuul.yml +++ /dev/null @@ -1,22 +0,0 @@ -ui: tape -scripts: - - "./test/_polyfill.js" -browsers: - - name: chrome - version: -2..latest - - name: firefox - version: -2..latest - - name: safari - version: [6, 7, 8, 9..latest] - - name: ie - version: 8..latest - - name: microsoftedge - version: 20..latest - - name: opera - version: 11..latest - - name: iphone - version: [5.1, 6.1, 7.1, 8.4, 9.1..latest] - - name: ipad - version: [5.1, 6.1, 7.1, 8.4, 9.1..latest] - - name: android - version: 4.0..latest diff --git a/node_modules/browserify/node_modules/buffer/LICENSE b/node_modules/browserify/node_modules/buffer/LICENSE deleted file mode 100644 index d6bf75dc..00000000 --- a/node_modules/browserify/node_modules/buffer/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) Feross Aboukhadijeh, and other contributors. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/node_modules/browserify/node_modules/buffer/README.md b/node_modules/browserify/node_modules/buffer/README.md deleted file mode 100644 index 671607f3..00000000 --- a/node_modules/browserify/node_modules/buffer/README.md +++ /dev/null @@ -1,364 +0,0 @@ -# buffer [![travis][travis-image]][travis-url] [![npm][npm-image]][npm-url] [![downloads][downloads-image]][npm-url] - -#### The buffer module from [node.js](http://nodejs.org/), for the browser. - -[![saucelabs][saucelabs-image]][saucelabs-url] - -[travis-image]: https://img.shields.io/travis/feross/buffer.svg?style=flat -[travis-url]: https://travis-ci.org/feross/buffer -[npm-image]: https://img.shields.io/npm/v/buffer.svg?style=flat -[npm-url]: https://npmjs.org/package/buffer -[downloads-image]: https://img.shields.io/npm/dm/buffer.svg?style=flat -[saucelabs-image]: https://saucelabs.com/browser-matrix/buffer.svg -[saucelabs-url]: https://saucelabs.com/u/buffer - -With [browserify](http://browserify.org), simply `require('buffer')` or use the `Buffer` global and you will get this module. - -The goal is to provide an API that is 100% identical to -[node's Buffer API](http://iojs.org/api/buffer.html). Read the -[official docs](http://iojs.org/api/buffer.html) for the full list of properties, -instance methods, and class methods that are supported. - -## features - -- Manipulate binary data like a boss, in all browsers -- even IE6! -- Super fast. Backed by Typed Arrays (`Uint8Array`/`ArrayBuffer`, not `Object`) -- Extremely small bundle size (**5.04KB minified + gzipped**, 35.5KB with comments) -- Excellent browser support (IE 6+, Chrome 4+, Firefox 3+, Safari 5.1+, Opera 11+, iOS, etc.) -- Preserves Node API exactly, with one important difference (see below) -- `.slice()` returns instances of the same type (Buffer) -- Square-bracket `buf[4]` notation works, even in old browsers like IE6! -- Does not modify any browser prototypes or put anything on `window` -- Comprehensive test suite (including all buffer tests from node.js core) - - -## install - -To use this module directly (without browserify), install it: - -```bash -npm install buffer -``` - -This module was previously called **native-buffer-browserify**, but please use **buffer** -from now on. - -A standalone bundle is available [here](https://wzrd.in/standalone/buffer), for non-browserify users. - - -## usage - -The module's API is identical to node's `Buffer` API. Read the -[official docs](http://iojs.org/api/buffer.html) for the full list of properties, -instance methods, and class methods that are supported. - -As mentioned above, `require('buffer')` or use the `Buffer` global with -[browserify](http://browserify.org) and this module will automatically be included -in your bundle. Almost any npm module will work in the browser, even if it assumes that -the node `Buffer` API will be available. - -To depend on this module explicitly (without browserify), require it like this: - -```js -var Buffer = require('buffer/').Buffer // note: the trailing slash is important! -``` - -To require this module explicitly, use `require('buffer/')` which tells the node.js module -lookup algorithm (also used by browserify) to use the **npm module** named `buffer` -instead of the **node.js core** module named `buffer`! - - -## how does it work? - -`Buffer` is a subclass of `Uint8Array` augmented with all the `Buffer` API methods. -The `Uint8Array` prototype is not modified. - - -## one minor difference - -#### In old browsers, `buf.slice()` does not modify parent buffer's memory - -If you only support modern browsers (specifically, those with typed array support), -then this issue does not affect you. If you support super old browsers, then read on. - -In node, the `slice()` method returns a new `Buffer` that shares underlying memory -with the original Buffer. When you modify one buffer, you modify the other. -[Read more.](http://iojs.org/api/buffer.html#buffer_buf_slice_start_end) - -In browsers with typed array support, this `Buffer` implementation supports this -behavior. In browsers without typed arrays, an alternate buffer implementation is -used that is based on `Object` which has no mechanism to point separate -`Buffer`s to the same underlying slab of memory. - -You can see which browser versions lack typed array support -[here](https://github.com/feross/buffer/blob/master/index.js#L20-L46). - - -## tracking the latest node api - -This module tracks the Buffer API in the latest (unstable) version of node.js. The Buffer -API is considered **stable** in the -[node stability index](http://nodejs.org/docs/latest/api/documentation.html#documentation_stability_index), -so it is unlikely that there will ever be breaking changes. -Nonetheless, when/if the Buffer API changes in node, this module's API will change -accordingly. - -## performance - -See perf tests in `/perf`. - -`BrowserBuffer` is the browser `buffer` module (this repo). `Uint8Array` is included as a -sanity check (since `BrowserBuffer` uses `Uint8Array` under the hood, `Uint8Array` will -always be at least a bit faster). Finally, `NodeBuffer` is the node.js buffer module, -which is included to compare against. - -### Chrome 38 - -| Method | Operations | Accuracy | Sampled | Fastest | -|:-------|:-----------|:---------|:--------|:-------:| -| BrowserBuffer#bracket-notation | 11,457,464 ops/sec | ±0.86% | 66 | ✓ | -| Uint8Array#bracket-notation | 10,824,332 ops/sec | ±0.74% | 65 | | -| | | | | -| BrowserBuffer#concat | 450,532 ops/sec | ±0.76% | 68 | | -| Uint8Array#concat | 1,368,911 ops/sec | ±1.50% | 62 | ✓ | -| | | | | -| BrowserBuffer#copy(16000) | 903,001 ops/sec | ±0.96% | 67 | | -| Uint8Array#copy(16000) | 1,422,441 ops/sec | ±1.04% | 66 | ✓ | -| | | | | -| BrowserBuffer#copy(16) | 11,431,358 ops/sec | ±0.46% | 69 | | -| Uint8Array#copy(16) | 13,944,163 ops/sec | ±1.12% | 68 | ✓ | -| | | | | -| BrowserBuffer#new(16000) | 106,329 ops/sec | ±6.70% | 44 | | -| Uint8Array#new(16000) | 131,001 ops/sec | ±2.85% | 31 | ✓ | -| | | | | -| BrowserBuffer#new(16) | 1,554,491 ops/sec | ±1.60% | 65 | | -| Uint8Array#new(16) | 6,623,930 ops/sec | ±1.66% | 65 | ✓ | -| | | | | -| BrowserBuffer#readDoubleBE | 112,830 ops/sec | ±0.51% | 69 | ✓ | -| DataView#getFloat64 | 93,500 ops/sec | ±0.57% | 68 | | -| | | | | -| BrowserBuffer#readFloatBE | 146,678 ops/sec | ±0.95% | 68 | ✓ | -| DataView#getFloat32 | 99,311 ops/sec | ±0.41% | 67 | | -| | | | | -| BrowserBuffer#readUInt32LE | 843,214 ops/sec | ±0.70% | 69 | ✓ | -| DataView#getUint32 | 103,024 ops/sec | ±0.64% | 67 | | -| | | | | -| BrowserBuffer#slice | 1,013,941 ops/sec | ±0.75% | 67 | | -| Uint8Array#subarray | 1,903,928 ops/sec | ±0.53% | 67 | ✓ | -| | | | | -| BrowserBuffer#writeFloatBE | 61,387 ops/sec | ±0.90% | 67 | | -| DataView#setFloat32 | 141,249 ops/sec | ±0.40% | 66 | ✓ | - - -### Firefox 33 - -| Method | Operations | Accuracy | Sampled | Fastest | -|:-------|:-----------|:---------|:--------|:-------:| -| BrowserBuffer#bracket-notation | 20,800,421 ops/sec | ±1.84% | 60 | | -| Uint8Array#bracket-notation | 20,826,235 ops/sec | ±2.02% | 61 | ✓ | -| | | | | -| BrowserBuffer#concat | 153,076 ops/sec | ±2.32% | 61 | | -| Uint8Array#concat | 1,255,674 ops/sec | ±8.65% | 52 | ✓ | -| | | | | -| BrowserBuffer#copy(16000) | 1,105,312 ops/sec | ±1.16% | 63 | | -| Uint8Array#copy(16000) | 1,615,911 ops/sec | ±0.55% | 66 | ✓ | -| | | | | -| BrowserBuffer#copy(16) | 16,357,599 ops/sec | ±0.73% | 68 | | -| Uint8Array#copy(16) | 31,436,281 ops/sec | ±1.05% | 68 | ✓ | -| | | | | -| BrowserBuffer#new(16000) | 52,995 ops/sec | ±6.01% | 35 | | -| Uint8Array#new(16000) | 87,686 ops/sec | ±5.68% | 45 | ✓ | -| | | | | -| BrowserBuffer#new(16) | 252,031 ops/sec | ±1.61% | 66 | | -| Uint8Array#new(16) | 8,477,026 ops/sec | ±0.49% | 68 | ✓ | -| | | | | -| BrowserBuffer#readDoubleBE | 99,871 ops/sec | ±0.41% | 69 | | -| DataView#getFloat64 | 285,663 ops/sec | ±0.70% | 68 | ✓ | -| | | | | -| BrowserBuffer#readFloatBE | 115,540 ops/sec | ±0.42% | 69 | | -| DataView#getFloat32 | 288,722 ops/sec | ±0.82% | 68 | ✓ | -| | | | | -| BrowserBuffer#readUInt32LE | 633,926 ops/sec | ±1.08% | 67 | ✓ | -| DataView#getUint32 | 294,808 ops/sec | ±0.79% | 64 | | -| | | | | -| BrowserBuffer#slice | 349,425 ops/sec | ±0.46% | 69 | | -| Uint8Array#subarray | 5,965,819 ops/sec | ±0.60% | 65 | ✓ | -| | | | | -| BrowserBuffer#writeFloatBE | 59,980 ops/sec | ±0.41% | 67 | | -| DataView#setFloat32 | 317,634 ops/sec | ±0.63% | 68 | ✓ | - -### Safari 8 - -| Method | Operations | Accuracy | Sampled | Fastest | -|:-------|:-----------|:---------|:--------|:-------:| -| BrowserBuffer#bracket-notation | 10,279,729 ops/sec | ±2.25% | 56 | ✓ | -| Uint8Array#bracket-notation | 10,030,767 ops/sec | ±2.23% | 59 | | -| | | | | -| BrowserBuffer#concat | 144,138 ops/sec | ±1.38% | 65 | | -| Uint8Array#concat | 4,950,764 ops/sec | ±1.70% | 63 | ✓ | -| | | | | -| BrowserBuffer#copy(16000) | 1,058,548 ops/sec | ±1.51% | 64 | | -| Uint8Array#copy(16000) | 1,409,666 ops/sec | ±1.17% | 65 | ✓ | -| | | | | -| BrowserBuffer#copy(16) | 6,282,529 ops/sec | ±1.88% | 58 | | -| Uint8Array#copy(16) | 11,907,128 ops/sec | ±2.87% | 58 | ✓ | -| | | | | -| BrowserBuffer#new(16000) | 101,663 ops/sec | ±3.89% | 57 | | -| Uint8Array#new(16000) | 22,050,818 ops/sec | ±6.51% | 46 | ✓ | -| | | | | -| BrowserBuffer#new(16) | 176,072 ops/sec | ±2.13% | 64 | | -| Uint8Array#new(16) | 24,385,731 ops/sec | ±5.01% | 51 | ✓ | -| | | | | -| BrowserBuffer#readDoubleBE | 41,341 ops/sec | ±1.06% | 67 | | -| DataView#getFloat64 | 322,280 ops/sec | ±0.84% | 68 | ✓ | -| | | | | -| BrowserBuffer#readFloatBE | 46,141 ops/sec | ±1.06% | 65 | | -| DataView#getFloat32 | 337,025 ops/sec | ±0.43% | 69 | ✓ | -| | | | | -| BrowserBuffer#readUInt32LE | 151,551 ops/sec | ±1.02% | 66 | | -| DataView#getUint32 | 308,278 ops/sec | ±0.94% | 67 | ✓ | -| | | | | -| BrowserBuffer#slice | 197,365 ops/sec | ±0.95% | 66 | | -| Uint8Array#subarray | 9,558,024 ops/sec | ±3.08% | 58 | ✓ | -| | | | | -| BrowserBuffer#writeFloatBE | 17,518 ops/sec | ±1.03% | 63 | | -| DataView#setFloat32 | 319,751 ops/sec | ±0.48% | 68 | ✓ | - - -### Node 0.11.14 - -| Method | Operations | Accuracy | Sampled | Fastest | -|:-------|:-----------|:---------|:--------|:-------:| -| BrowserBuffer#bracket-notation | 10,489,828 ops/sec | ±3.25% | 90 | | -| Uint8Array#bracket-notation | 10,534,884 ops/sec | ±0.81% | 92 | ✓ | -| NodeBuffer#bracket-notation | 10,389,910 ops/sec | ±0.97% | 87 | | -| | | | | -| BrowserBuffer#concat | 487,830 ops/sec | ±2.58% | 88 | | -| Uint8Array#concat | 1,814,327 ops/sec | ±1.28% | 88 | ✓ | -| NodeBuffer#concat | 1,636,523 ops/sec | ±1.88% | 73 | | -| | | | | -| BrowserBuffer#copy(16000) | 1,073,665 ops/sec | ±0.77% | 90 | | -| Uint8Array#copy(16000) | 1,348,517 ops/sec | ±0.84% | 89 | ✓ | -| NodeBuffer#copy(16000) | 1,289,533 ops/sec | ±0.82% | 93 | | -| | | | | -| BrowserBuffer#copy(16) | 12,782,706 ops/sec | ±0.74% | 85 | | -| Uint8Array#copy(16) | 14,180,427 ops/sec | ±0.93% | 92 | ✓ | -| NodeBuffer#copy(16) | 11,083,134 ops/sec | ±1.06% | 89 | | -| | | | | -| BrowserBuffer#new(16000) | 141,678 ops/sec | ±3.30% | 67 | | -| Uint8Array#new(16000) | 161,491 ops/sec | ±2.96% | 60 | | -| NodeBuffer#new(16000) | 292,699 ops/sec | ±3.20% | 55 | ✓ | -| | | | | -| BrowserBuffer#new(16) | 1,655,466 ops/sec | ±2.41% | 82 | | -| Uint8Array#new(16) | 14,399,926 ops/sec | ±0.91% | 94 | ✓ | -| NodeBuffer#new(16) | 3,894,696 ops/sec | ±0.88% | 92 | | -| | | | | -| BrowserBuffer#readDoubleBE | 109,582 ops/sec | ±0.75% | 93 | ✓ | -| DataView#getFloat64 | 91,235 ops/sec | ±0.81% | 90 | | -| NodeBuffer#readDoubleBE | 88,593 ops/sec | ±0.96% | 81 | | -| | | | | -| BrowserBuffer#readFloatBE | 139,854 ops/sec | ±1.03% | 85 | ✓ | -| DataView#getFloat32 | 98,744 ops/sec | ±0.80% | 89 | | -| NodeBuffer#readFloatBE | 92,769 ops/sec | ±0.94% | 93 | | -| | | | | -| BrowserBuffer#readUInt32LE | 710,861 ops/sec | ±0.82% | 92 | | -| DataView#getUint32 | 117,893 ops/sec | ±0.84% | 91 | | -| NodeBuffer#readUInt32LE | 851,412 ops/sec | ±0.72% | 93 | ✓ | -| | | | | -| BrowserBuffer#slice | 1,673,877 ops/sec | ±0.73% | 94 | | -| Uint8Array#subarray | 6,919,243 ops/sec | ±0.67% | 90 | ✓ | -| NodeBuffer#slice | 4,617,604 ops/sec | ±0.79% | 93 | | -| | | | | -| BrowserBuffer#writeFloatBE | 66,011 ops/sec | ±0.75% | 93 | | -| DataView#setFloat32 | 127,760 ops/sec | ±0.72% | 93 | ✓ | -| NodeBuffer#writeFloatBE | 103,352 ops/sec | ±0.83% | 93 | | - -### iojs 1.8.1 - -| Method | Operations | Accuracy | Sampled | Fastest | -|:-------|:-----------|:---------|:--------|:-------:| -| BrowserBuffer#bracket-notation | 10,990,488 ops/sec | ±1.11% | 91 | | -| Uint8Array#bracket-notation | 11,268,757 ops/sec | ±0.65% | 97 | | -| NodeBuffer#bracket-notation | 11,353,260 ops/sec | ±0.83% | 94 | ✓ | -| | | | | -| BrowserBuffer#concat | 378,954 ops/sec | ±0.74% | 94 | | -| Uint8Array#concat | 1,358,288 ops/sec | ±0.97% | 87 | | -| NodeBuffer#concat | 1,934,050 ops/sec | ±1.11% | 78 | ✓ | -| | | | | -| BrowserBuffer#copy(16000) | 894,538 ops/sec | ±0.56% | 84 | | -| Uint8Array#copy(16000) | 1,442,656 ops/sec | ±0.71% | 96 | | -| NodeBuffer#copy(16000) | 1,457,898 ops/sec | ±0.53% | 92 | ✓ | -| | | | | -| BrowserBuffer#copy(16) | 12,870,457 ops/sec | ±0.67% | 95 | | -| Uint8Array#copy(16) | 16,643,989 ops/sec | ±0.61% | 93 | ✓ | -| NodeBuffer#copy(16) | 14,885,848 ops/sec | ±0.74% | 94 | | -| | | | | -| BrowserBuffer#new(16000) | 109,264 ops/sec | ±4.21% | 63 | | -| Uint8Array#new(16000) | 138,916 ops/sec | ±1.87% | 61 | | -| NodeBuffer#new(16000) | 281,449 ops/sec | ±3.58% | 51 | ✓ | -| | | | | -| BrowserBuffer#new(16) | 1,362,935 ops/sec | ±0.56% | 99 | | -| Uint8Array#new(16) | 6,193,090 ops/sec | ±0.64% | 95 | ✓ | -| NodeBuffer#new(16) | 4,745,425 ops/sec | ±1.56% | 90 | | -| | | | | -| BrowserBuffer#readDoubleBE | 118,127 ops/sec | ±0.59% | 93 | ✓ | -| DataView#getFloat64 | 107,332 ops/sec | ±0.65% | 91 | | -| NodeBuffer#readDoubleBE | 116,274 ops/sec | ±0.94% | 95 | | -| | | | | -| BrowserBuffer#readFloatBE | 150,326 ops/sec | ±0.58% | 95 | ✓ | -| DataView#getFloat32 | 110,541 ops/sec | ±0.57% | 98 | | -| NodeBuffer#readFloatBE | 121,599 ops/sec | ±0.60% | 87 | | -| | | | | -| BrowserBuffer#readUInt32LE | 814,147 ops/sec | ±0.62% | 93 | | -| DataView#getUint32 | 137,592 ops/sec | ±0.64% | 90 | | -| NodeBuffer#readUInt32LE | 931,650 ops/sec | ±0.71% | 96 | ✓ | -| | | | | -| BrowserBuffer#slice | 878,590 ops/sec | ±0.68% | 93 | | -| Uint8Array#subarray | 2,843,308 ops/sec | ±1.02% | 90 | | -| NodeBuffer#slice | 4,998,316 ops/sec | ±0.68% | 90 | ✓ | -| | | | | -| BrowserBuffer#writeFloatBE | 65,927 ops/sec | ±0.74% | 93 | | -| DataView#setFloat32 | 139,823 ops/sec | ±0.97% | 89 | ✓ | -| NodeBuffer#writeFloatBE | 135,763 ops/sec | ±0.65% | 96 | | -| | | | | - -## Testing the project - -First, install the project: - - npm install - -Then, to run tests in Node.js, run: - - npm run test-node - -To test locally in a browser, you can run: - - npm run test-browser-local - -This will print out a URL that you can then open in a browser to run the tests, using [Zuul](https://github.com/defunctzombie/zuul). - -To run automated browser tests using Saucelabs, ensure that your `SAUCE_USERNAME` and `SAUCE_ACCESS_KEY` environment variables are set, then run: - - npm test - -This is what's run in Travis, to check against various browsers. The list of browsers is kept in the `.zuul.yml` file. - -## JavaScript Standard Style - -This module uses [JavaScript Standard Style](https://github.com/feross/standard). - -[![js-standard-style](https://raw.githubusercontent.com/feross/standard/master/badge.png)](https://github.com/feross/standard) - -To test that the code conforms to the style, `npm install` and run: - - ./node_modules/.bin/standard - -## credit - -This was originally forked from [buffer-browserify](https://github.com/toots/buffer-browserify). - - -## license - -MIT. Copyright (C) [Feross Aboukhadijeh](http://feross.org), and other contributors. Originally forked from an MIT-licensed module by Romain Beauxis. diff --git a/node_modules/browserify/node_modules/buffer/bin/download-node-tests.js b/node_modules/browserify/node_modules/buffer/bin/download-node-tests.js deleted file mode 100755 index c1a88467..00000000 --- a/node_modules/browserify/node_modules/buffer/bin/download-node-tests.js +++ /dev/null @@ -1,126 +0,0 @@ -#!/usr/bin/env node - -var concat = require('concat-stream') -var fs = require('fs') -var hyperquest = require('hyperquest') -var cp = require('child_process') -var split = require('split') -var through = require('through2') - -var url = 'https://api.github.com/repos/nodejs/io.js/contents' -var dirs = [ - '/test/parallel', - '/test/pummel' -] - -cp.execSync('rm -rf node/*.js', { cwd: __dirname + '/../test' }) -cp.execSync('rm -rf node-es6/*.js', { cwd: __dirname + '/../test' }) - -var httpOpts = { - headers: { - 'User-Agent': null - // auth if github rate-limits you... - // 'Authorization': 'Basic ' + Buffer('username:password').toString('base64'), - } -} - -dirs.forEach(function (dir) { - var req = hyperquest(url + dir, httpOpts) - req.pipe(concat(function (data) { - if (req.response.statusCode !== 200) { - throw new Error(url + dir + ': ' + data.toString()) - } - downloadBufferTests(dir, JSON.parse(data)) - })) -}) - -function downloadBufferTests (dir, files) { - files.forEach(function (file) { - if (!/test-buffer.*/.test(file.name)) return - - var path - if (file.name === 'test-buffer-iterator.js' || - file.name === 'test-buffer-arraybuffer.js') { - path = __dirname + '/../test/node-es6/' + file.name - } else if (file.name === 'test-buffer-fakes.js') { - // These teses only apply to node, where they're calling into C++ and need to - // ensure the prototype can't be faked, or else there will be a segfault. - return - } else { - path = __dirname + '/../test/node/' + file.name - } - - console.log(file.download_url) - hyperquest(file.download_url, httpOpts) - .pipe(split()) - .pipe(testfixer(file.name)) - .pipe(fs.createWriteStream(path)) - .on('finish', function () { - console.log('wrote ' + file.name) - }) - }) -} - -function testfixer (filename) { - var firstline = true - - return through(function (line, enc, cb) { - line = line.toString() - - if (firstline) { - // require buffer explicitly - var preamble = 'if (process.env.OBJECT_IMPL) global.TYPED_ARRAY_SUPPORT = false;\n' + - 'var Buffer = require(\'../../\').Buffer;' - if (/use strict/.test(line)) line += '\n' + preamble - else line + preamble + '\n' + line - firstline = false - } - - // use `var` instead of `const`/`let` - line = line.replace(/(const|let) /g, 'var ') - - // make `require('common')` work - line = line.replace(/(var common = require.*)/g, 'var common = {};') - - // use `Buffer.isBuffer` instead of `instanceof Buffer` - line = line.replace(/buf instanceof Buffer/g, 'Buffer.isBuffer(buf)') - - // require browser buffer - line = line.replace(/(.*)require\('buffer'\)(.*)/g, '$1require(\'../../\')$2') - - // smalloc is only used for kMaxLength - line = line.replace( - /require\('smalloc'\)/g, - '{ kMaxLength: process.env.OBJECT_IMPL ? 0x3fffffff : 0x7fffffff }' - ) - - // comment out console logs - line = line.replace(/(.*console\..*)/g, '// $1') - - // we can't reliably test typed array max-sizes in the browser - if (filename === 'test-buffer-big.js') { - line = line.replace(/(.*new Int8Array.*RangeError.*)/, '// $1') - line = line.replace(/(.*new ArrayBuffer.*RangeError.*)/, '// $1') - line = line.replace(/(.*new Float64Array.*RangeError.*)/, '// $1') - } - - // https://github.com/iojs/io.js/blob/v0.12/test/parallel/test-buffer.js#L38 - // we can't run this because we need to support - // browsers that don't have typed arrays - if (filename === 'test-buffer.js') { - line = line.replace(/b\[0\] = -1;/, 'b[0] = 255;') - } - - // https://github.com/iojs/io.js/blob/v0.12/test/parallel/test-buffer.js#L1138 - // unfortunately we can't run this as it touches - // node streams which do an instanceof check - // and crypto-browserify doesn't work in old - // versions of ie - if (filename === 'test-buffer.js') { - line = line.replace(/^(\s*)(var crypto = require.*)/, '$1// $2') - line = line.replace(/(crypto.createHash.*\))/, '1 /*$1*/') - } - - cb(null, line + '\n') - }) -} diff --git a/node_modules/browserify/node_modules/buffer/bin/test.js b/node_modules/browserify/node_modules/buffer/bin/test.js deleted file mode 100644 index 2fc368b9..00000000 --- a/node_modules/browserify/node_modules/buffer/bin/test.js +++ /dev/null @@ -1,18 +0,0 @@ -#!/usr/bin/env node - -var cp = require('child_process') - -var runBrowserTests = !process.env.TRAVIS_PULL_REQUEST || - process.env.TRAVIS_PULL_REQUEST === 'false' - -var node = cp.spawn('npm', ['run', 'test-node'], { stdio: 'inherit' }) -node.on('close', function (code) { - if (code === 0 && runBrowserTests) { - var browser = cp.spawn('npm', ['run', 'test-browser'], { stdio: 'inherit' }) - browser.on('close', function (code) { - process.exit(code) - }) - } else { - process.exit(code) - } -}) diff --git a/node_modules/browserify/node_modules/buffer/index.js b/node_modules/browserify/node_modules/buffer/index.js deleted file mode 100644 index 0dc9007d..00000000 --- a/node_modules/browserify/node_modules/buffer/index.js +++ /dev/null @@ -1,1548 +0,0 @@ -/*! - * The buffer module from node.js, for the browser. - * - * @author Feross Aboukhadijeh - * @license MIT - */ -/* eslint-disable no-proto */ - -'use strict' - -var base64 = require('base64-js') -var ieee754 = require('ieee754') -var isArray = require('isarray') - -exports.Buffer = Buffer -exports.SlowBuffer = SlowBuffer -exports.INSPECT_MAX_BYTES = 50 -Buffer.poolSize = 8192 // not used by this implementation - -var rootParent = {} - -/** - * If `Buffer.TYPED_ARRAY_SUPPORT`: - * === true Use Uint8Array implementation (fastest) - * === false Use Object implementation (most compatible, even IE6) - * - * Browsers that support typed arrays are IE 10+, Firefox 4+, Chrome 7+, Safari 5.1+, - * Opera 11.6+, iOS 4.2+. - * - * Due to various browser bugs, sometimes the Object implementation will be used even - * when the browser supports typed arrays. - * - * Note: - * - * - Firefox 4-29 lacks support for adding new properties to `Uint8Array` instances, - * See: https://bugzilla.mozilla.org/show_bug.cgi?id=695438. - * - * - Safari 5-7 lacks support for changing the `Object.prototype.constructor` property - * on objects. - * - * - Chrome 9-10 is missing the `TypedArray.prototype.subarray` function. - * - * - IE10 has a broken `TypedArray.prototype.subarray` function which returns arrays of - * incorrect length in some situations. - - * We detect these buggy browsers and set `Buffer.TYPED_ARRAY_SUPPORT` to `false` so they - * get the Object implementation, which is slower but behaves correctly. - */ -Buffer.TYPED_ARRAY_SUPPORT = global.TYPED_ARRAY_SUPPORT !== undefined - ? global.TYPED_ARRAY_SUPPORT - : typedArraySupport() - -function typedArraySupport () { - function Bar () {} - try { - var arr = new Uint8Array(1) - arr.foo = function () { return 42 } - arr.constructor = Bar - return arr.foo() === 42 && // typed array instances can be augmented - arr.constructor === Bar && // constructor can be set - typeof arr.subarray === 'function' && // chrome 9-10 lack `subarray` - arr.subarray(1, 1).byteLength === 0 // ie10 has broken `subarray` - } catch (e) { - return false - } -} - -function kMaxLength () { - return Buffer.TYPED_ARRAY_SUPPORT - ? 0x7fffffff - : 0x3fffffff -} - -/** - * Class: Buffer - * ============= - * - * The Buffer constructor returns instances of `Uint8Array` that are augmented - * with function properties for all the node `Buffer` API functions. We use - * `Uint8Array` so that square bracket notation works as expected -- it returns - * a single octet. - * - * By augmenting the instances, we can avoid modifying the `Uint8Array` - * prototype. - */ -function Buffer (arg) { - if (!(this instanceof Buffer)) { - // Avoid going through an ArgumentsAdaptorTrampoline in the common case. - if (arguments.length > 1) return new Buffer(arg, arguments[1]) - return new Buffer(arg) - } - - if (!Buffer.TYPED_ARRAY_SUPPORT) { - this.length = 0 - this.parent = undefined - } - - // Common case. - if (typeof arg === 'number') { - return fromNumber(this, arg) - } - - // Slightly less common case. - if (typeof arg === 'string') { - return fromString(this, arg, arguments.length > 1 ? arguments[1] : 'utf8') - } - - // Unusual. - return fromObject(this, arg) -} - -function fromNumber (that, length) { - that = allocate(that, length < 0 ? 0 : checked(length) | 0) - if (!Buffer.TYPED_ARRAY_SUPPORT) { - for (var i = 0; i < length; i++) { - that[i] = 0 - } - } - return that -} - -function fromString (that, string, encoding) { - if (typeof encoding !== 'string' || encoding === '') encoding = 'utf8' - - // Assumption: byteLength() return value is always < kMaxLength. - var length = byteLength(string, encoding) | 0 - that = allocate(that, length) - - that.write(string, encoding) - return that -} - -function fromObject (that, object) { - if (Buffer.isBuffer(object)) return fromBuffer(that, object) - - if (isArray(object)) return fromArray(that, object) - - if (object == null) { - throw new TypeError('must start with number, buffer, array or string') - } - - if (typeof ArrayBuffer !== 'undefined') { - if (object.buffer instanceof ArrayBuffer) { - return fromTypedArray(that, object) - } - if (object instanceof ArrayBuffer) { - return fromArrayBuffer(that, object) - } - } - - if (object.length) return fromArrayLike(that, object) - - return fromJsonObject(that, object) -} - -function fromBuffer (that, buffer) { - var length = checked(buffer.length) | 0 - that = allocate(that, length) - buffer.copy(that, 0, 0, length) - return that -} - -function fromArray (that, array) { - var length = checked(array.length) | 0 - that = allocate(that, length) - for (var i = 0; i < length; i += 1) { - that[i] = array[i] & 255 - } - return that -} - -// Duplicate of fromArray() to keep fromArray() monomorphic. -function fromTypedArray (that, array) { - var length = checked(array.length) | 0 - that = allocate(that, length) - // Truncating the elements is probably not what people expect from typed - // arrays with BYTES_PER_ELEMENT > 1 but it's compatible with the behavior - // of the old Buffer constructor. - for (var i = 0; i < length; i += 1) { - that[i] = array[i] & 255 - } - return that -} - -function fromArrayBuffer (that, array) { - if (Buffer.TYPED_ARRAY_SUPPORT) { - // Return an augmented `Uint8Array` instance, for best performance - array.byteLength - that = Buffer._augment(new Uint8Array(array)) - } else { - // Fallback: Return an object instance of the Buffer class - that = fromTypedArray(that, new Uint8Array(array)) - } - return that -} - -function fromArrayLike (that, array) { - var length = checked(array.length) | 0 - that = allocate(that, length) - for (var i = 0; i < length; i += 1) { - that[i] = array[i] & 255 - } - return that -} - -// Deserialize { type: 'Buffer', data: [1,2,3,...] } into a Buffer object. -// Returns a zero-length buffer for inputs that don't conform to the spec. -function fromJsonObject (that, object) { - var array - var length = 0 - - if (object.type === 'Buffer' && isArray(object.data)) { - array = object.data - length = checked(array.length) | 0 - } - that = allocate(that, length) - - for (var i = 0; i < length; i += 1) { - that[i] = array[i] & 255 - } - return that -} - -if (Buffer.TYPED_ARRAY_SUPPORT) { - Buffer.prototype.__proto__ = Uint8Array.prototype - Buffer.__proto__ = Uint8Array -} else { - // pre-set for values that may exist in the future - Buffer.prototype.length = undefined - Buffer.prototype.parent = undefined -} - -function allocate (that, length) { - if (Buffer.TYPED_ARRAY_SUPPORT) { - // Return an augmented `Uint8Array` instance, for best performance - that = Buffer._augment(new Uint8Array(length)) - that.__proto__ = Buffer.prototype - } else { - // Fallback: Return an object instance of the Buffer class - that.length = length - that._isBuffer = true - } - - var fromPool = length !== 0 && length <= Buffer.poolSize >>> 1 - if (fromPool) that.parent = rootParent - - return that -} - -function checked (length) { - // Note: cannot use `length < kMaxLength` here because that fails when - // length is NaN (which is otherwise coerced to zero.) - if (length >= kMaxLength()) { - throw new RangeError('Attempt to allocate Buffer larger than maximum ' + - 'size: 0x' + kMaxLength().toString(16) + ' bytes') - } - return length | 0 -} - -function SlowBuffer (subject, encoding) { - if (!(this instanceof SlowBuffer)) return new SlowBuffer(subject, encoding) - - var buf = new Buffer(subject, encoding) - delete buf.parent - return buf -} - -Buffer.isBuffer = function isBuffer (b) { - return !!(b != null && b._isBuffer) -} - -Buffer.compare = function compare (a, b) { - if (!Buffer.isBuffer(a) || !Buffer.isBuffer(b)) { - throw new TypeError('Arguments must be Buffers') - } - - if (a === b) return 0 - - var x = a.length - var y = b.length - - var i = 0 - var len = Math.min(x, y) - while (i < len) { - if (a[i] !== b[i]) break - - ++i - } - - if (i !== len) { - x = a[i] - y = b[i] - } - - if (x < y) return -1 - if (y < x) return 1 - return 0 -} - -Buffer.isEncoding = function isEncoding (encoding) { - switch (String(encoding).toLowerCase()) { - case 'hex': - case 'utf8': - case 'utf-8': - case 'ascii': - case 'binary': - case 'base64': - case 'raw': - case 'ucs2': - case 'ucs-2': - case 'utf16le': - case 'utf-16le': - return true - default: - return false - } -} - -Buffer.concat = function concat (list, length) { - if (!isArray(list)) throw new TypeError('list argument must be an Array of Buffers.') - - if (list.length === 0) { - return new Buffer(0) - } - - var i - if (length === undefined) { - length = 0 - for (i = 0; i < list.length; i++) { - length += list[i].length - } - } - - var buf = new Buffer(length) - var pos = 0 - for (i = 0; i < list.length; i++) { - var item = list[i] - item.copy(buf, pos) - pos += item.length - } - return buf -} - -function byteLength (string, encoding) { - if (typeof string !== 'string') string = '' + string - - var len = string.length - if (len === 0) return 0 - - // Use a for loop to avoid recursion - var loweredCase = false - for (;;) { - switch (encoding) { - case 'ascii': - case 'binary': - // Deprecated - case 'raw': - case 'raws': - return len - case 'utf8': - case 'utf-8': - return utf8ToBytes(string).length - case 'ucs2': - case 'ucs-2': - case 'utf16le': - case 'utf-16le': - return len * 2 - case 'hex': - return len >>> 1 - case 'base64': - return base64ToBytes(string).length - default: - if (loweredCase) return utf8ToBytes(string).length // assume utf8 - encoding = ('' + encoding).toLowerCase() - loweredCase = true - } - } -} -Buffer.byteLength = byteLength - -function slowToString (encoding, start, end) { - var loweredCase = false - - start = start | 0 - end = end === undefined || end === Infinity ? this.length : end | 0 - - if (!encoding) encoding = 'utf8' - if (start < 0) start = 0 - if (end > this.length) end = this.length - if (end <= start) return '' - - while (true) { - switch (encoding) { - case 'hex': - return hexSlice(this, start, end) - - case 'utf8': - case 'utf-8': - return utf8Slice(this, start, end) - - case 'ascii': - return asciiSlice(this, start, end) - - case 'binary': - return binarySlice(this, start, end) - - case 'base64': - return base64Slice(this, start, end) - - case 'ucs2': - case 'ucs-2': - case 'utf16le': - case 'utf-16le': - return utf16leSlice(this, start, end) - - default: - if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding) - encoding = (encoding + '').toLowerCase() - loweredCase = true - } - } -} - -Buffer.prototype.toString = function toString () { - var length = this.length | 0 - if (length === 0) return '' - if (arguments.length === 0) return utf8Slice(this, 0, length) - return slowToString.apply(this, arguments) -} - -Buffer.prototype.equals = function equals (b) { - if (!Buffer.isBuffer(b)) throw new TypeError('Argument must be a Buffer') - if (this === b) return true - return Buffer.compare(this, b) === 0 -} - -Buffer.prototype.inspect = function inspect () { - var str = '' - var max = exports.INSPECT_MAX_BYTES - if (this.length > 0) { - str = this.toString('hex', 0, max).match(/.{2}/g).join(' ') - if (this.length > max) str += ' ... ' - } - return '' -} - -Buffer.prototype.compare = function compare (b) { - if (!Buffer.isBuffer(b)) throw new TypeError('Argument must be a Buffer') - if (this === b) return 0 - return Buffer.compare(this, b) -} - -Buffer.prototype.indexOf = function indexOf (val, byteOffset) { - if (byteOffset > 0x7fffffff) byteOffset = 0x7fffffff - else if (byteOffset < -0x80000000) byteOffset = -0x80000000 - byteOffset >>= 0 - - if (this.length === 0) return -1 - if (byteOffset >= this.length) return -1 - - // Negative offsets start from the end of the buffer - if (byteOffset < 0) byteOffset = Math.max(this.length + byteOffset, 0) - - if (typeof val === 'string') { - if (val.length === 0) return -1 // special case: looking for empty string always fails - return String.prototype.indexOf.call(this, val, byteOffset) - } - if (Buffer.isBuffer(val)) { - return arrayIndexOf(this, val, byteOffset) - } - if (typeof val === 'number') { - if (Buffer.TYPED_ARRAY_SUPPORT && Uint8Array.prototype.indexOf === 'function') { - return Uint8Array.prototype.indexOf.call(this, val, byteOffset) - } - return arrayIndexOf(this, [ val ], byteOffset) - } - - function arrayIndexOf (arr, val, byteOffset) { - var foundIndex = -1 - for (var i = 0; byteOffset + i < arr.length; i++) { - if (arr[byteOffset + i] === val[foundIndex === -1 ? 0 : i - foundIndex]) { - if (foundIndex === -1) foundIndex = i - if (i - foundIndex + 1 === val.length) return byteOffset + foundIndex - } else { - foundIndex = -1 - } - } - return -1 - } - - throw new TypeError('val must be string, number or Buffer') -} - -// `get` is deprecated -Buffer.prototype.get = function get (offset) { - console.log('.get() is deprecated. Access using array indexes instead.') - return this.readUInt8(offset) -} - -// `set` is deprecated -Buffer.prototype.set = function set (v, offset) { - console.log('.set() is deprecated. Access using array indexes instead.') - return this.writeUInt8(v, offset) -} - -function hexWrite (buf, string, offset, length) { - offset = Number(offset) || 0 - var remaining = buf.length - offset - if (!length) { - length = remaining - } else { - length = Number(length) - if (length > remaining) { - length = remaining - } - } - - // must be an even number of digits - var strLen = string.length - if (strLen % 2 !== 0) throw new Error('Invalid hex string') - - if (length > strLen / 2) { - length = strLen / 2 - } - for (var i = 0; i < length; i++) { - var parsed = parseInt(string.substr(i * 2, 2), 16) - if (isNaN(parsed)) throw new Error('Invalid hex string') - buf[offset + i] = parsed - } - return i -} - -function utf8Write (buf, string, offset, length) { - return blitBuffer(utf8ToBytes(string, buf.length - offset), buf, offset, length) -} - -function asciiWrite (buf, string, offset, length) { - return blitBuffer(asciiToBytes(string), buf, offset, length) -} - -function binaryWrite (buf, string, offset, length) { - return asciiWrite(buf, string, offset, length) -} - -function base64Write (buf, string, offset, length) { - return blitBuffer(base64ToBytes(string), buf, offset, length) -} - -function ucs2Write (buf, string, offset, length) { - return blitBuffer(utf16leToBytes(string, buf.length - offset), buf, offset, length) -} - -Buffer.prototype.write = function write (string, offset, length, encoding) { - // Buffer#write(string) - if (offset === undefined) { - encoding = 'utf8' - length = this.length - offset = 0 - // Buffer#write(string, encoding) - } else if (length === undefined && typeof offset === 'string') { - encoding = offset - length = this.length - offset = 0 - // Buffer#write(string, offset[, length][, encoding]) - } else if (isFinite(offset)) { - offset = offset | 0 - if (isFinite(length)) { - length = length | 0 - if (encoding === undefined) encoding = 'utf8' - } else { - encoding = length - length = undefined - } - // legacy write(string, encoding, offset, length) - remove in v0.13 - } else { - var swap = encoding - encoding = offset - offset = length | 0 - length = swap - } - - var remaining = this.length - offset - if (length === undefined || length > remaining) length = remaining - - if ((string.length > 0 && (length < 0 || offset < 0)) || offset > this.length) { - throw new RangeError('attempt to write outside buffer bounds') - } - - if (!encoding) encoding = 'utf8' - - var loweredCase = false - for (;;) { - switch (encoding) { - case 'hex': - return hexWrite(this, string, offset, length) - - case 'utf8': - case 'utf-8': - return utf8Write(this, string, offset, length) - - case 'ascii': - return asciiWrite(this, string, offset, length) - - case 'binary': - return binaryWrite(this, string, offset, length) - - case 'base64': - // Warning: maxLength not taken into account in base64Write - return base64Write(this, string, offset, length) - - case 'ucs2': - case 'ucs-2': - case 'utf16le': - case 'utf-16le': - return ucs2Write(this, string, offset, length) - - default: - if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding) - encoding = ('' + encoding).toLowerCase() - loweredCase = true - } - } -} - -Buffer.prototype.toJSON = function toJSON () { - return { - type: 'Buffer', - data: Array.prototype.slice.call(this._arr || this, 0) - } -} - -function base64Slice (buf, start, end) { - if (start === 0 && end === buf.length) { - return base64.fromByteArray(buf) - } else { - return base64.fromByteArray(buf.slice(start, end)) - } -} - -function utf8Slice (buf, start, end) { - end = Math.min(buf.length, end) - var res = [] - - var i = start - while (i < end) { - var firstByte = buf[i] - var codePoint = null - var bytesPerSequence = (firstByte > 0xEF) ? 4 - : (firstByte > 0xDF) ? 3 - : (firstByte > 0xBF) ? 2 - : 1 - - if (i + bytesPerSequence <= end) { - var secondByte, thirdByte, fourthByte, tempCodePoint - - switch (bytesPerSequence) { - case 1: - if (firstByte < 0x80) { - codePoint = firstByte - } - break - case 2: - secondByte = buf[i + 1] - if ((secondByte & 0xC0) === 0x80) { - tempCodePoint = (firstByte & 0x1F) << 0x6 | (secondByte & 0x3F) - if (tempCodePoint > 0x7F) { - codePoint = tempCodePoint - } - } - break - case 3: - secondByte = buf[i + 1] - thirdByte = buf[i + 2] - if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80) { - tempCodePoint = (firstByte & 0xF) << 0xC | (secondByte & 0x3F) << 0x6 | (thirdByte & 0x3F) - if (tempCodePoint > 0x7FF && (tempCodePoint < 0xD800 || tempCodePoint > 0xDFFF)) { - codePoint = tempCodePoint - } - } - break - case 4: - secondByte = buf[i + 1] - thirdByte = buf[i + 2] - fourthByte = buf[i + 3] - if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80 && (fourthByte & 0xC0) === 0x80) { - tempCodePoint = (firstByte & 0xF) << 0x12 | (secondByte & 0x3F) << 0xC | (thirdByte & 0x3F) << 0x6 | (fourthByte & 0x3F) - if (tempCodePoint > 0xFFFF && tempCodePoint < 0x110000) { - codePoint = tempCodePoint - } - } - } - } - - if (codePoint === null) { - // we did not generate a valid codePoint so insert a - // replacement char (U+FFFD) and advance only 1 byte - codePoint = 0xFFFD - bytesPerSequence = 1 - } else if (codePoint > 0xFFFF) { - // encode to utf16 (surrogate pair dance) - codePoint -= 0x10000 - res.push(codePoint >>> 10 & 0x3FF | 0xD800) - codePoint = 0xDC00 | codePoint & 0x3FF - } - - res.push(codePoint) - i += bytesPerSequence - } - - return decodeCodePointsArray(res) -} - -// Based on http://stackoverflow.com/a/22747272/680742, the browser with -// the lowest limit is Chrome, with 0x10000 args. -// We go 1 magnitude less, for safety -var MAX_ARGUMENTS_LENGTH = 0x1000 - -function decodeCodePointsArray (codePoints) { - var len = codePoints.length - if (len <= MAX_ARGUMENTS_LENGTH) { - return String.fromCharCode.apply(String, codePoints) // avoid extra slice() - } - - // Decode in chunks to avoid "call stack size exceeded". - var res = '' - var i = 0 - while (i < len) { - res += String.fromCharCode.apply( - String, - codePoints.slice(i, i += MAX_ARGUMENTS_LENGTH) - ) - } - return res -} - -function asciiSlice (buf, start, end) { - var ret = '' - end = Math.min(buf.length, end) - - for (var i = start; i < end; i++) { - ret += String.fromCharCode(buf[i] & 0x7F) - } - return ret -} - -function binarySlice (buf, start, end) { - var ret = '' - end = Math.min(buf.length, end) - - for (var i = start; i < end; i++) { - ret += String.fromCharCode(buf[i]) - } - return ret -} - -function hexSlice (buf, start, end) { - var len = buf.length - - if (!start || start < 0) start = 0 - if (!end || end < 0 || end > len) end = len - - var out = '' - for (var i = start; i < end; i++) { - out += toHex(buf[i]) - } - return out -} - -function utf16leSlice (buf, start, end) { - var bytes = buf.slice(start, end) - var res = '' - for (var i = 0; i < bytes.length; i += 2) { - res += String.fromCharCode(bytes[i] + bytes[i + 1] * 256) - } - return res -} - -Buffer.prototype.slice = function slice (start, end) { - var len = this.length - start = ~~start - end = end === undefined ? len : ~~end - - if (start < 0) { - start += len - if (start < 0) start = 0 - } else if (start > len) { - start = len - } - - if (end < 0) { - end += len - if (end < 0) end = 0 - } else if (end > len) { - end = len - } - - if (end < start) end = start - - var newBuf - if (Buffer.TYPED_ARRAY_SUPPORT) { - newBuf = Buffer._augment(this.subarray(start, end)) - } else { - var sliceLen = end - start - newBuf = new Buffer(sliceLen, undefined) - for (var i = 0; i < sliceLen; i++) { - newBuf[i] = this[i + start] - } - } - - if (newBuf.length) newBuf.parent = this.parent || this - - return newBuf -} - -/* - * Need to make sure that buffer isn't trying to write out of bounds. - */ -function checkOffset (offset, ext, length) { - if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint') - if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length') -} - -Buffer.prototype.readUIntLE = function readUIntLE (offset, byteLength, noAssert) { - offset = offset | 0 - byteLength = byteLength | 0 - if (!noAssert) checkOffset(offset, byteLength, this.length) - - var val = this[offset] - var mul = 1 - var i = 0 - while (++i < byteLength && (mul *= 0x100)) { - val += this[offset + i] * mul - } - - return val -} - -Buffer.prototype.readUIntBE = function readUIntBE (offset, byteLength, noAssert) { - offset = offset | 0 - byteLength = byteLength | 0 - if (!noAssert) { - checkOffset(offset, byteLength, this.length) - } - - var val = this[offset + --byteLength] - var mul = 1 - while (byteLength > 0 && (mul *= 0x100)) { - val += this[offset + --byteLength] * mul - } - - return val -} - -Buffer.prototype.readUInt8 = function readUInt8 (offset, noAssert) { - if (!noAssert) checkOffset(offset, 1, this.length) - return this[offset] -} - -Buffer.prototype.readUInt16LE = function readUInt16LE (offset, noAssert) { - if (!noAssert) checkOffset(offset, 2, this.length) - return this[offset] | (this[offset + 1] << 8) -} - -Buffer.prototype.readUInt16BE = function readUInt16BE (offset, noAssert) { - if (!noAssert) checkOffset(offset, 2, this.length) - return (this[offset] << 8) | this[offset + 1] -} - -Buffer.prototype.readUInt32LE = function readUInt32LE (offset, noAssert) { - if (!noAssert) checkOffset(offset, 4, this.length) - - return ((this[offset]) | - (this[offset + 1] << 8) | - (this[offset + 2] << 16)) + - (this[offset + 3] * 0x1000000) -} - -Buffer.prototype.readUInt32BE = function readUInt32BE (offset, noAssert) { - if (!noAssert) checkOffset(offset, 4, this.length) - - return (this[offset] * 0x1000000) + - ((this[offset + 1] << 16) | - (this[offset + 2] << 8) | - this[offset + 3]) -} - -Buffer.prototype.readIntLE = function readIntLE (offset, byteLength, noAssert) { - offset = offset | 0 - byteLength = byteLength | 0 - if (!noAssert) checkOffset(offset, byteLength, this.length) - - var val = this[offset] - var mul = 1 - var i = 0 - while (++i < byteLength && (mul *= 0x100)) { - val += this[offset + i] * mul - } - mul *= 0x80 - - if (val >= mul) val -= Math.pow(2, 8 * byteLength) - - return val -} - -Buffer.prototype.readIntBE = function readIntBE (offset, byteLength, noAssert) { - offset = offset | 0 - byteLength = byteLength | 0 - if (!noAssert) checkOffset(offset, byteLength, this.length) - - var i = byteLength - var mul = 1 - var val = this[offset + --i] - while (i > 0 && (mul *= 0x100)) { - val += this[offset + --i] * mul - } - mul *= 0x80 - - if (val >= mul) val -= Math.pow(2, 8 * byteLength) - - return val -} - -Buffer.prototype.readInt8 = function readInt8 (offset, noAssert) { - if (!noAssert) checkOffset(offset, 1, this.length) - if (!(this[offset] & 0x80)) return (this[offset]) - return ((0xff - this[offset] + 1) * -1) -} - -Buffer.prototype.readInt16LE = function readInt16LE (offset, noAssert) { - if (!noAssert) checkOffset(offset, 2, this.length) - var val = this[offset] | (this[offset + 1] << 8) - return (val & 0x8000) ? val | 0xFFFF0000 : val -} - -Buffer.prototype.readInt16BE = function readInt16BE (offset, noAssert) { - if (!noAssert) checkOffset(offset, 2, this.length) - var val = this[offset + 1] | (this[offset] << 8) - return (val & 0x8000) ? val | 0xFFFF0000 : val -} - -Buffer.prototype.readInt32LE = function readInt32LE (offset, noAssert) { - if (!noAssert) checkOffset(offset, 4, this.length) - - return (this[offset]) | - (this[offset + 1] << 8) | - (this[offset + 2] << 16) | - (this[offset + 3] << 24) -} - -Buffer.prototype.readInt32BE = function readInt32BE (offset, noAssert) { - if (!noAssert) checkOffset(offset, 4, this.length) - - return (this[offset] << 24) | - (this[offset + 1] << 16) | - (this[offset + 2] << 8) | - (this[offset + 3]) -} - -Buffer.prototype.readFloatLE = function readFloatLE (offset, noAssert) { - if (!noAssert) checkOffset(offset, 4, this.length) - return ieee754.read(this, offset, true, 23, 4) -} - -Buffer.prototype.readFloatBE = function readFloatBE (offset, noAssert) { - if (!noAssert) checkOffset(offset, 4, this.length) - return ieee754.read(this, offset, false, 23, 4) -} - -Buffer.prototype.readDoubleLE = function readDoubleLE (offset, noAssert) { - if (!noAssert) checkOffset(offset, 8, this.length) - return ieee754.read(this, offset, true, 52, 8) -} - -Buffer.prototype.readDoubleBE = function readDoubleBE (offset, noAssert) { - if (!noAssert) checkOffset(offset, 8, this.length) - return ieee754.read(this, offset, false, 52, 8) -} - -function checkInt (buf, value, offset, ext, max, min) { - if (!Buffer.isBuffer(buf)) throw new TypeError('buffer must be a Buffer instance') - if (value > max || value < min) throw new RangeError('value is out of bounds') - if (offset + ext > buf.length) throw new RangeError('index out of range') -} - -Buffer.prototype.writeUIntLE = function writeUIntLE (value, offset, byteLength, noAssert) { - value = +value - offset = offset | 0 - byteLength = byteLength | 0 - if (!noAssert) checkInt(this, value, offset, byteLength, Math.pow(2, 8 * byteLength), 0) - - var mul = 1 - var i = 0 - this[offset] = value & 0xFF - while (++i < byteLength && (mul *= 0x100)) { - this[offset + i] = (value / mul) & 0xFF - } - - return offset + byteLength -} - -Buffer.prototype.writeUIntBE = function writeUIntBE (value, offset, byteLength, noAssert) { - value = +value - offset = offset | 0 - byteLength = byteLength | 0 - if (!noAssert) checkInt(this, value, offset, byteLength, Math.pow(2, 8 * byteLength), 0) - - var i = byteLength - 1 - var mul = 1 - this[offset + i] = value & 0xFF - while (--i >= 0 && (mul *= 0x100)) { - this[offset + i] = (value / mul) & 0xFF - } - - return offset + byteLength -} - -Buffer.prototype.writeUInt8 = function writeUInt8 (value, offset, noAssert) { - value = +value - offset = offset | 0 - if (!noAssert) checkInt(this, value, offset, 1, 0xff, 0) - if (!Buffer.TYPED_ARRAY_SUPPORT) value = Math.floor(value) - this[offset] = (value & 0xff) - return offset + 1 -} - -function objectWriteUInt16 (buf, value, offset, littleEndian) { - if (value < 0) value = 0xffff + value + 1 - for (var i = 0, j = Math.min(buf.length - offset, 2); i < j; i++) { - buf[offset + i] = (value & (0xff << (8 * (littleEndian ? i : 1 - i)))) >>> - (littleEndian ? i : 1 - i) * 8 - } -} - -Buffer.prototype.writeUInt16LE = function writeUInt16LE (value, offset, noAssert) { - value = +value - offset = offset | 0 - if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0) - if (Buffer.TYPED_ARRAY_SUPPORT) { - this[offset] = (value & 0xff) - this[offset + 1] = (value >>> 8) - } else { - objectWriteUInt16(this, value, offset, true) - } - return offset + 2 -} - -Buffer.prototype.writeUInt16BE = function writeUInt16BE (value, offset, noAssert) { - value = +value - offset = offset | 0 - if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0) - if (Buffer.TYPED_ARRAY_SUPPORT) { - this[offset] = (value >>> 8) - this[offset + 1] = (value & 0xff) - } else { - objectWriteUInt16(this, value, offset, false) - } - return offset + 2 -} - -function objectWriteUInt32 (buf, value, offset, littleEndian) { - if (value < 0) value = 0xffffffff + value + 1 - for (var i = 0, j = Math.min(buf.length - offset, 4); i < j; i++) { - buf[offset + i] = (value >>> (littleEndian ? i : 3 - i) * 8) & 0xff - } -} - -Buffer.prototype.writeUInt32LE = function writeUInt32LE (value, offset, noAssert) { - value = +value - offset = offset | 0 - if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0) - if (Buffer.TYPED_ARRAY_SUPPORT) { - this[offset + 3] = (value >>> 24) - this[offset + 2] = (value >>> 16) - this[offset + 1] = (value >>> 8) - this[offset] = (value & 0xff) - } else { - objectWriteUInt32(this, value, offset, true) - } - return offset + 4 -} - -Buffer.prototype.writeUInt32BE = function writeUInt32BE (value, offset, noAssert) { - value = +value - offset = offset | 0 - if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0) - if (Buffer.TYPED_ARRAY_SUPPORT) { - this[offset] = (value >>> 24) - this[offset + 1] = (value >>> 16) - this[offset + 2] = (value >>> 8) - this[offset + 3] = (value & 0xff) - } else { - objectWriteUInt32(this, value, offset, false) - } - return offset + 4 -} - -Buffer.prototype.writeIntLE = function writeIntLE (value, offset, byteLength, noAssert) { - value = +value - offset = offset | 0 - if (!noAssert) { - var limit = Math.pow(2, 8 * byteLength - 1) - - checkInt(this, value, offset, byteLength, limit - 1, -limit) - } - - var i = 0 - var mul = 1 - var sub = value < 0 ? 1 : 0 - this[offset] = value & 0xFF - while (++i < byteLength && (mul *= 0x100)) { - this[offset + i] = ((value / mul) >> 0) - sub & 0xFF - } - - return offset + byteLength -} - -Buffer.prototype.writeIntBE = function writeIntBE (value, offset, byteLength, noAssert) { - value = +value - offset = offset | 0 - if (!noAssert) { - var limit = Math.pow(2, 8 * byteLength - 1) - - checkInt(this, value, offset, byteLength, limit - 1, -limit) - } - - var i = byteLength - 1 - var mul = 1 - var sub = value < 0 ? 1 : 0 - this[offset + i] = value & 0xFF - while (--i >= 0 && (mul *= 0x100)) { - this[offset + i] = ((value / mul) >> 0) - sub & 0xFF - } - - return offset + byteLength -} - -Buffer.prototype.writeInt8 = function writeInt8 (value, offset, noAssert) { - value = +value - offset = offset | 0 - if (!noAssert) checkInt(this, value, offset, 1, 0x7f, -0x80) - if (!Buffer.TYPED_ARRAY_SUPPORT) value = Math.floor(value) - if (value < 0) value = 0xff + value + 1 - this[offset] = (value & 0xff) - return offset + 1 -} - -Buffer.prototype.writeInt16LE = function writeInt16LE (value, offset, noAssert) { - value = +value - offset = offset | 0 - if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000) - if (Buffer.TYPED_ARRAY_SUPPORT) { - this[offset] = (value & 0xff) - this[offset + 1] = (value >>> 8) - } else { - objectWriteUInt16(this, value, offset, true) - } - return offset + 2 -} - -Buffer.prototype.writeInt16BE = function writeInt16BE (value, offset, noAssert) { - value = +value - offset = offset | 0 - if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000) - if (Buffer.TYPED_ARRAY_SUPPORT) { - this[offset] = (value >>> 8) - this[offset + 1] = (value & 0xff) - } else { - objectWriteUInt16(this, value, offset, false) - } - return offset + 2 -} - -Buffer.prototype.writeInt32LE = function writeInt32LE (value, offset, noAssert) { - value = +value - offset = offset | 0 - if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000) - if (Buffer.TYPED_ARRAY_SUPPORT) { - this[offset] = (value & 0xff) - this[offset + 1] = (value >>> 8) - this[offset + 2] = (value >>> 16) - this[offset + 3] = (value >>> 24) - } else { - objectWriteUInt32(this, value, offset, true) - } - return offset + 4 -} - -Buffer.prototype.writeInt32BE = function writeInt32BE (value, offset, noAssert) { - value = +value - offset = offset | 0 - if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000) - if (value < 0) value = 0xffffffff + value + 1 - if (Buffer.TYPED_ARRAY_SUPPORT) { - this[offset] = (value >>> 24) - this[offset + 1] = (value >>> 16) - this[offset + 2] = (value >>> 8) - this[offset + 3] = (value & 0xff) - } else { - objectWriteUInt32(this, value, offset, false) - } - return offset + 4 -} - -function checkIEEE754 (buf, value, offset, ext, max, min) { - if (value > max || value < min) throw new RangeError('value is out of bounds') - if (offset + ext > buf.length) throw new RangeError('index out of range') - if (offset < 0) throw new RangeError('index out of range') -} - -function writeFloat (buf, value, offset, littleEndian, noAssert) { - if (!noAssert) { - checkIEEE754(buf, value, offset, 4, 3.4028234663852886e+38, -3.4028234663852886e+38) - } - ieee754.write(buf, value, offset, littleEndian, 23, 4) - return offset + 4 -} - -Buffer.prototype.writeFloatLE = function writeFloatLE (value, offset, noAssert) { - return writeFloat(this, value, offset, true, noAssert) -} - -Buffer.prototype.writeFloatBE = function writeFloatBE (value, offset, noAssert) { - return writeFloat(this, value, offset, false, noAssert) -} - -function writeDouble (buf, value, offset, littleEndian, noAssert) { - if (!noAssert) { - checkIEEE754(buf, value, offset, 8, 1.7976931348623157E+308, -1.7976931348623157E+308) - } - ieee754.write(buf, value, offset, littleEndian, 52, 8) - return offset + 8 -} - -Buffer.prototype.writeDoubleLE = function writeDoubleLE (value, offset, noAssert) { - return writeDouble(this, value, offset, true, noAssert) -} - -Buffer.prototype.writeDoubleBE = function writeDoubleBE (value, offset, noAssert) { - return writeDouble(this, value, offset, false, noAssert) -} - -// copy(targetBuffer, targetStart=0, sourceStart=0, sourceEnd=buffer.length) -Buffer.prototype.copy = function copy (target, targetStart, start, end) { - if (!start) start = 0 - if (!end && end !== 0) end = this.length - if (targetStart >= target.length) targetStart = target.length - if (!targetStart) targetStart = 0 - if (end > 0 && end < start) end = start - - // Copy 0 bytes; we're done - if (end === start) return 0 - if (target.length === 0 || this.length === 0) return 0 - - // Fatal error conditions - if (targetStart < 0) { - throw new RangeError('targetStart out of bounds') - } - if (start < 0 || start >= this.length) throw new RangeError('sourceStart out of bounds') - if (end < 0) throw new RangeError('sourceEnd out of bounds') - - // Are we oob? - if (end > this.length) end = this.length - if (target.length - targetStart < end - start) { - end = target.length - targetStart + start - } - - var len = end - start - var i - - if (this === target && start < targetStart && targetStart < end) { - // descending copy from end - for (i = len - 1; i >= 0; i--) { - target[i + targetStart] = this[i + start] - } - } else if (len < 1000 || !Buffer.TYPED_ARRAY_SUPPORT) { - // ascending copy from start - for (i = 0; i < len; i++) { - target[i + targetStart] = this[i + start] - } - } else { - target._set(this.subarray(start, start + len), targetStart) - } - - return len -} - -// fill(value, start=0, end=buffer.length) -Buffer.prototype.fill = function fill (value, start, end) { - if (!value) value = 0 - if (!start) start = 0 - if (!end) end = this.length - - if (end < start) throw new RangeError('end < start') - - // Fill 0 bytes; we're done - if (end === start) return - if (this.length === 0) return - - if (start < 0 || start >= this.length) throw new RangeError('start out of bounds') - if (end < 0 || end > this.length) throw new RangeError('end out of bounds') - - var i - if (typeof value === 'number') { - for (i = start; i < end; i++) { - this[i] = value - } - } else { - var bytes = utf8ToBytes(value.toString()) - var len = bytes.length - for (i = start; i < end; i++) { - this[i] = bytes[i % len] - } - } - - return this -} - -/** - * Creates a new `ArrayBuffer` with the *copied* memory of the buffer instance. - * Added in Node 0.12. Only available in browsers that support ArrayBuffer. - */ -Buffer.prototype.toArrayBuffer = function toArrayBuffer () { - if (typeof Uint8Array !== 'undefined') { - if (Buffer.TYPED_ARRAY_SUPPORT) { - return (new Buffer(this)).buffer - } else { - var buf = new Uint8Array(this.length) - for (var i = 0, len = buf.length; i < len; i += 1) { - buf[i] = this[i] - } - return buf.buffer - } - } else { - throw new TypeError('Buffer.toArrayBuffer not supported in this browser') - } -} - -// HELPER FUNCTIONS -// ================ - -var BP = Buffer.prototype - -/** - * Augment a Uint8Array *instance* (not the Uint8Array class!) with Buffer methods - */ -Buffer._augment = function _augment (arr) { - arr.constructor = Buffer - arr._isBuffer = true - - // save reference to original Uint8Array set method before overwriting - arr._set = arr.set - - // deprecated - arr.get = BP.get - arr.set = BP.set - - arr.write = BP.write - arr.toString = BP.toString - arr.toLocaleString = BP.toString - arr.toJSON = BP.toJSON - arr.equals = BP.equals - arr.compare = BP.compare - arr.indexOf = BP.indexOf - arr.copy = BP.copy - arr.slice = BP.slice - arr.readUIntLE = BP.readUIntLE - arr.readUIntBE = BP.readUIntBE - arr.readUInt8 = BP.readUInt8 - arr.readUInt16LE = BP.readUInt16LE - arr.readUInt16BE = BP.readUInt16BE - arr.readUInt32LE = BP.readUInt32LE - arr.readUInt32BE = BP.readUInt32BE - arr.readIntLE = BP.readIntLE - arr.readIntBE = BP.readIntBE - arr.readInt8 = BP.readInt8 - arr.readInt16LE = BP.readInt16LE - arr.readInt16BE = BP.readInt16BE - arr.readInt32LE = BP.readInt32LE - arr.readInt32BE = BP.readInt32BE - arr.readFloatLE = BP.readFloatLE - arr.readFloatBE = BP.readFloatBE - arr.readDoubleLE = BP.readDoubleLE - arr.readDoubleBE = BP.readDoubleBE - arr.writeUInt8 = BP.writeUInt8 - arr.writeUIntLE = BP.writeUIntLE - arr.writeUIntBE = BP.writeUIntBE - arr.writeUInt16LE = BP.writeUInt16LE - arr.writeUInt16BE = BP.writeUInt16BE - arr.writeUInt32LE = BP.writeUInt32LE - arr.writeUInt32BE = BP.writeUInt32BE - arr.writeIntLE = BP.writeIntLE - arr.writeIntBE = BP.writeIntBE - arr.writeInt8 = BP.writeInt8 - arr.writeInt16LE = BP.writeInt16LE - arr.writeInt16BE = BP.writeInt16BE - arr.writeInt32LE = BP.writeInt32LE - arr.writeInt32BE = BP.writeInt32BE - arr.writeFloatLE = BP.writeFloatLE - arr.writeFloatBE = BP.writeFloatBE - arr.writeDoubleLE = BP.writeDoubleLE - arr.writeDoubleBE = BP.writeDoubleBE - arr.fill = BP.fill - arr.inspect = BP.inspect - arr.toArrayBuffer = BP.toArrayBuffer - - return arr -} - -var INVALID_BASE64_RE = /[^+\/0-9A-Za-z-_]/g - -function base64clean (str) { - // Node strips out invalid characters like \n and \t from the string, base64-js does not - str = stringtrim(str).replace(INVALID_BASE64_RE, '') - // Node converts strings with length < 2 to '' - if (str.length < 2) return '' - // Node allows for non-padded base64 strings (missing trailing ===), base64-js does not - while (str.length % 4 !== 0) { - str = str + '=' - } - return str -} - -function stringtrim (str) { - if (str.trim) return str.trim() - return str.replace(/^\s+|\s+$/g, '') -} - -function toHex (n) { - if (n < 16) return '0' + n.toString(16) - return n.toString(16) -} - -function utf8ToBytes (string, units) { - units = units || Infinity - var codePoint - var length = string.length - var leadSurrogate = null - var bytes = [] - - for (var i = 0; i < length; i++) { - codePoint = string.charCodeAt(i) - - // is surrogate component - if (codePoint > 0xD7FF && codePoint < 0xE000) { - // last char was a lead - if (!leadSurrogate) { - // no lead yet - if (codePoint > 0xDBFF) { - // unexpected trail - if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD) - continue - } else if (i + 1 === length) { - // unpaired lead - if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD) - continue - } - - // valid lead - leadSurrogate = codePoint - - continue - } - - // 2 leads in a row - if (codePoint < 0xDC00) { - if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD) - leadSurrogate = codePoint - continue - } - - // valid surrogate pair - codePoint = (leadSurrogate - 0xD800 << 10 | codePoint - 0xDC00) + 0x10000 - } else if (leadSurrogate) { - // valid bmp char, but last char was a lead - if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD) - } - - leadSurrogate = null - - // encode utf8 - if (codePoint < 0x80) { - if ((units -= 1) < 0) break - bytes.push(codePoint) - } else if (codePoint < 0x800) { - if ((units -= 2) < 0) break - bytes.push( - codePoint >> 0x6 | 0xC0, - codePoint & 0x3F | 0x80 - ) - } else if (codePoint < 0x10000) { - if ((units -= 3) < 0) break - bytes.push( - codePoint >> 0xC | 0xE0, - codePoint >> 0x6 & 0x3F | 0x80, - codePoint & 0x3F | 0x80 - ) - } else if (codePoint < 0x110000) { - if ((units -= 4) < 0) break - bytes.push( - codePoint >> 0x12 | 0xF0, - codePoint >> 0xC & 0x3F | 0x80, - codePoint >> 0x6 & 0x3F | 0x80, - codePoint & 0x3F | 0x80 - ) - } else { - throw new Error('Invalid code point') - } - } - - return bytes -} - -function asciiToBytes (str) { - var byteArray = [] - for (var i = 0; i < str.length; i++) { - // Node's code seems to be doing this and not & 0x7F.. - byteArray.push(str.charCodeAt(i) & 0xFF) - } - return byteArray -} - -function utf16leToBytes (str, units) { - var c, hi, lo - var byteArray = [] - for (var i = 0; i < str.length; i++) { - if ((units -= 2) < 0) break - - c = str.charCodeAt(i) - hi = c >> 8 - lo = c % 256 - byteArray.push(lo) - byteArray.push(hi) - } - - return byteArray -} - -function base64ToBytes (str) { - return base64.toByteArray(base64clean(str)) -} - -function blitBuffer (src, dst, offset, length) { - for (var i = 0; i < length; i++) { - if ((i + offset >= dst.length) || (i >= src.length)) break - dst[i + offset] = src[i] - } - return i -} diff --git a/node_modules/browserify/node_modules/buffer/node_modules/base64-js/.travis.yml b/node_modules/browserify/node_modules/buffer/node_modules/base64-js/.travis.yml deleted file mode 100644 index 939cb517..00000000 --- a/node_modules/browserify/node_modules/buffer/node_modules/base64-js/.travis.yml +++ /dev/null @@ -1,5 +0,0 @@ -language: node_js -node_js: - - "0.8" - - "0.10" - - "0.11" \ No newline at end of file diff --git a/node_modules/browserify/node_modules/buffer/node_modules/base64-js/LICENSE.MIT b/node_modules/browserify/node_modules/buffer/node_modules/base64-js/LICENSE.MIT deleted file mode 100644 index 96d3f68a..00000000 --- a/node_modules/browserify/node_modules/buffer/node_modules/base64-js/LICENSE.MIT +++ /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/node_modules/browserify/node_modules/buffer/node_modules/base64-js/README.md b/node_modules/browserify/node_modules/buffer/node_modules/base64-js/README.md deleted file mode 100644 index ed31d1ab..00000000 --- a/node_modules/browserify/node_modules/buffer/node_modules/base64-js/README.md +++ /dev/null @@ -1,31 +0,0 @@ -base64-js -========= - -`base64-js` does basic base64 encoding/decoding in pure JS. - -[![build status](https://secure.travis-ci.org/beatgammit/base64-js.png)](http://travis-ci.org/beatgammit/base64-js) - -[![testling badge](https://ci.testling.com/beatgammit/base64-js.png)](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 two exposed functions, `toByteArray` and `fromByteArray`, which both take a single argument. - -* `toByteArray` - Takes a base64 string and returns a byte array -* `fromByteArray` - Takes a byte array and returns a base64 string - -## license - -MIT \ No newline at end of file diff --git a/node_modules/browserify/node_modules/buffer/node_modules/base64-js/bench/bench.js b/node_modules/browserify/node_modules/buffer/node_modules/base64-js/bench/bench.js deleted file mode 100644 index 0689e08a..00000000 --- a/node_modules/browserify/node_modules/buffer/node_modules/base64-js/bench/bench.js +++ /dev/null @@ -1,19 +0,0 @@ -var random = require('crypto').pseudoRandomBytes - -var b64 = require('../') -var fs = require('fs') -var path = require('path') -var data = random(1e6).toString('base64') -//fs.readFileSync(path.join(__dirname, 'example.b64'), 'ascii').split('\n').join('') -var start = Date.now() -var raw = b64.toByteArray(data) -var middle = Date.now() -var data = b64.fromByteArray(raw) -var end = Date.now() - -console.log('decode ms, decode ops/ms, encode ms, encode ops/ms') -console.log( - middle - start, data.length / (middle - start), - end - middle, data.length / (end - middle)) -//console.log(data) - diff --git a/node_modules/browserify/node_modules/buffer/node_modules/base64-js/lib/b64.js b/node_modules/browserify/node_modules/buffer/node_modules/base64-js/lib/b64.js deleted file mode 100644 index 46001d2f..00000000 --- a/node_modules/browserify/node_modules/buffer/node_modules/base64-js/lib/b64.js +++ /dev/null @@ -1,124 +0,0 @@ -var lookup = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'; - -;(function (exports) { - 'use strict'; - - var Arr = (typeof Uint8Array !== 'undefined') - ? Uint8Array - : Array - - var PLUS = '+'.charCodeAt(0) - var SLASH = '/'.charCodeAt(0) - var NUMBER = '0'.charCodeAt(0) - var LOWER = 'a'.charCodeAt(0) - var UPPER = 'A'.charCodeAt(0) - var PLUS_URL_SAFE = '-'.charCodeAt(0) - var SLASH_URL_SAFE = '_'.charCodeAt(0) - - function decode (elt) { - var code = elt.charCodeAt(0) - if (code === PLUS || - code === PLUS_URL_SAFE) - return 62 // '+' - if (code === SLASH || - code === SLASH_URL_SAFE) - return 63 // '/' - if (code < NUMBER) - return -1 //no match - if (code < NUMBER + 10) - return code - NUMBER + 26 + 26 - if (code < UPPER + 26) - return code - UPPER - if (code < LOWER + 26) - return code - LOWER + 26 - } - - function b64ToByteArray (b64) { - var i, j, l, tmp, placeHolders, arr - - if (b64.length % 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 - var len = b64.length - placeHolders = '=' === b64.charAt(len - 2) ? 2 : '=' === b64.charAt(len - 1) ? 1 : 0 - - // base64 is 4/3 + up to two characters of the original data - arr = new Arr(b64.length * 3 / 4 - placeHolders) - - // if there are placeholders, only get up to the last complete 4 chars - l = placeHolders > 0 ? b64.length - 4 : b64.length - - var L = 0 - - function push (v) { - arr[L++] = v - } - - for (i = 0, j = 0; i < l; i += 4, j += 3) { - tmp = (decode(b64.charAt(i)) << 18) | (decode(b64.charAt(i + 1)) << 12) | (decode(b64.charAt(i + 2)) << 6) | decode(b64.charAt(i + 3)) - push((tmp & 0xFF0000) >> 16) - push((tmp & 0xFF00) >> 8) - push(tmp & 0xFF) - } - - if (placeHolders === 2) { - tmp = (decode(b64.charAt(i)) << 2) | (decode(b64.charAt(i + 1)) >> 4) - push(tmp & 0xFF) - } else if (placeHolders === 1) { - tmp = (decode(b64.charAt(i)) << 10) | (decode(b64.charAt(i + 1)) << 4) | (decode(b64.charAt(i + 2)) >> 2) - push((tmp >> 8) & 0xFF) - push(tmp & 0xFF) - } - - return arr - } - - function uint8ToBase64 (uint8) { - var i, - extraBytes = uint8.length % 3, // if we have 1 byte left, pad 2 bytes - output = "", - temp, length - - function encode (num) { - return lookup.charAt(num) - } - - function tripletToBase64 (num) { - return encode(num >> 18 & 0x3F) + encode(num >> 12 & 0x3F) + encode(num >> 6 & 0x3F) + encode(num & 0x3F) - } - - // go through the array every three bytes, we'll deal with trailing stuff later - for (i = 0, length = uint8.length - extraBytes; i < length; i += 3) { - temp = (uint8[i] << 16) + (uint8[i + 1] << 8) + (uint8[i + 2]) - output += tripletToBase64(temp) - } - - // pad the end with zeros, but make sure to not forget the extra bytes - switch (extraBytes) { - case 1: - temp = uint8[uint8.length - 1] - output += encode(temp >> 2) - output += encode((temp << 4) & 0x3F) - output += '==' - break - case 2: - temp = (uint8[uint8.length - 2] << 8) + (uint8[uint8.length - 1]) - output += encode(temp >> 10) - output += encode((temp >> 4) & 0x3F) - output += encode((temp << 2) & 0x3F) - output += '=' - break - } - - return output - } - - exports.toByteArray = b64ToByteArray - exports.fromByteArray = uint8ToBase64 -}(typeof exports === 'undefined' ? (this.base64js = {}) : exports)) diff --git a/node_modules/browserify/node_modules/buffer/node_modules/base64-js/package.json b/node_modules/browserify/node_modules/buffer/node_modules/base64-js/package.json deleted file mode 100644 index e0d7a105..00000000 --- a/node_modules/browserify/node_modules/buffer/node_modules/base64-js/package.json +++ /dev/null @@ -1,68 +0,0 @@ -{ - "author": { - "name": "T. Jameson Little", - "email": "t.jameson.little@gmail.com" - }, - "name": "base64-js", - "description": "Base64 encoding/decoding in pure JS", - "version": "0.0.8", - "repository": { - "type": "git", - "url": "git://github.com/beatgammit/base64-js.git" - }, - "main": "lib/b64.js", - "scripts": { - "test": "tape test/*.js" - }, - "testling": { - "files": "test/*.js", - "browsers": [ - "ie/6..latest", - "chrome/4..latest", - "firefox/3..latest", - "safari/5.1..latest", - "opera/11.0..latest", - "iphone/6", - "ipad/6" - ] - }, - "engines": { - "node": ">= 0.4" - }, - "license": "MIT", - "dependencies": {}, - "devDependencies": { - "tape": "~2.3.2" - }, - "gitHead": "b4a8a5fa9b0caeddb5ad94dd1108253d8f2a315f", - "bugs": { - "url": "https://github.com/beatgammit/base64-js/issues" - }, - "homepage": "https://github.com/beatgammit/base64-js", - "_id": "base64-js@0.0.8", - "_shasum": "1101e9544f4a76b1bc3b26d452ca96d7a35e7978", - "_from": "base64-js@0.0.8", - "_npmVersion": "2.1.16", - "_nodeVersion": "0.10.35", - "_npmUser": { - "name": "feross", - "email": "feross@feross.org" - }, - "maintainers": [ - { - "name": "beatgammit", - "email": "t.jameson.little@gmail.com" - }, - { - "name": "feross", - "email": "feross@feross.org" - } - ], - "dist": { - "shasum": "1101e9544f4a76b1bc3b26d452ca96d7a35e7978", - "tarball": "https://registry.npmjs.org/base64-js/-/base64-js-0.0.8.tgz" - }, - "directories": {}, - "_resolved": "https://registry.npmjs.org/base64-js/-/base64-js-0.0.8.tgz", - "readme": "ERROR: No README data found!" -} diff --git a/node_modules/browserify/node_modules/buffer/node_modules/base64-js/test/convert.js b/node_modules/browserify/node_modules/buffer/node_modules/base64-js/test/convert.js deleted file mode 100644 index 60b09c01..00000000 --- a/node_modules/browserify/node_modules/buffer/node_modules/base64-js/test/convert.js +++ /dev/null @@ -1,51 +0,0 @@ -var test = require('tape'), - b64 = require('../lib/b64'), - checks = [ - 'a', - 'aa', - 'aaa', - 'hi', - 'hi!', - 'hi!!', - 'sup', - 'sup?', - 'sup?!' - ]; - -test('convert to base64 and back', function (t) { - t.plan(checks.length); - - for (var i = 0; i < checks.length; i++) { - var check = checks[i], - 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); - } - -}); - -function map (arr, callback) { - var res = [], - 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/node_modules/browserify/node_modules/buffer/node_modules/base64-js/test/url-safe.js b/node_modules/browserify/node_modules/buffer/node_modules/base64-js/test/url-safe.js deleted file mode 100644 index dc437e96..00000000 --- a/node_modules/browserify/node_modules/buffer/node_modules/base64-js/test/url-safe.js +++ /dev/null @@ -1,18 +0,0 @@ -var test = require('tape'), - b64 = require('../lib/b64'); - -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 (var i = 0; i < actual.length; i++) { - t.equal(actual[i], expected[i]) - } - - t.end(); -}); diff --git a/node_modules/browserify/node_modules/buffer/node_modules/ieee754/.travis.yml b/node_modules/browserify/node_modules/buffer/node_modules/ieee754/.travis.yml deleted file mode 100644 index 6c45b34d..00000000 --- a/node_modules/browserify/node_modules/buffer/node_modules/ieee754/.travis.yml +++ /dev/null @@ -1,7 +0,0 @@ -language: node_js -node_js: -- 'node' -env: - global: - - secure: f3NrmOV/A7oACn47J1mkIpH8Sn/LINtluZvo/9pGo3Ss4+D2lyt7UawpedHtnYgU9WEyjPSi7pDWopUrIzusQ2trLYRJr8WAOEyHlgaepDyy4BW3ghGMKHMsS05kilYLP8nu1sRd6y1AcUYKw+kUrrSPanI7kViWVQ5d5DuwXO8= - - secure: a6teILh33z5fbGQbh5/EkFfAyXfa2fPJG1upy9K+jLAbG4WZxXD+YmXG9Tz33/2NJm6UplGfTJ8IQEXgxEfAFk3ao3xfKxzm3i64XxtroSlXIFNSiQKogxDfLEtWDoNNCodPHaV3ATEqxGJ5rkkUeU1+ROWW0sjG5JR26k8/Hfg= diff --git a/node_modules/browserify/node_modules/buffer/node_modules/ieee754/.zuul.yml b/node_modules/browserify/node_modules/buffer/node_modules/ieee754/.zuul.yml deleted file mode 100644 index b5ba0c4a..00000000 --- a/node_modules/browserify/node_modules/buffer/node_modules/ieee754/.zuul.yml +++ /dev/null @@ -1,20 +0,0 @@ -ui: tape -scripts: - - "./test/_polyfill.js" -browsers: - - name: chrome - version: latest - - name: firefox - version: latest - - name: safari - version: latest - - name: ie - version: 11 - - name: microsoftedge - version: latest - - name: opera - version: latest - - name: android - version: latest - - name: iphone - version: latest diff --git a/node_modules/browserify/node_modules/buffer/node_modules/ieee754/LICENSE b/node_modules/browserify/node_modules/buffer/node_modules/ieee754/LICENSE deleted file mode 100644 index f37a2ebe..00000000 --- a/node_modules/browserify/node_modules/buffer/node_modules/ieee754/LICENSE +++ /dev/null @@ -1,28 +0,0 @@ -Copyright (c) 2008, Fair Oaks Labs, Inc. -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - * Neither the name of Fair Oaks Labs, Inc. nor the names of its contributors - may be used to endorse or promote products derived from this software - without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE -LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN -CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) -ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -POSSIBILITY OF SUCH DAMAGE. diff --git a/node_modules/browserify/node_modules/buffer/node_modules/ieee754/README.md b/node_modules/browserify/node_modules/buffer/node_modules/ieee754/README.md deleted file mode 100644 index 11f4d40c..00000000 --- a/node_modules/browserify/node_modules/buffer/node_modules/ieee754/README.md +++ /dev/null @@ -1,47 +0,0 @@ -# ieee754 [![travis][travis-image]][travis-url] [![npm][npm-image]][npm-url] [![downloads][downloads-image]][npm-url] - -[![saucelabs][saucelabs-image]][saucelabs-url] - -[travis-image]: https://img.shields.io/travis/feross/ieee754/master.svg -[travis-url]: https://travis-ci.org/feross/ieee754 -[npm-image]: https://img.shields.io/npm/v/ieee754.svg -[npm-url]: https://npmjs.org/package/ieee754 -[downloads-image]: https://img.shields.io/npm/dm/ieee754.svg -[saucelabs-image]: https://saucelabs.com/browser-matrix/ieee754.svg -[saucelabs-url]: https://saucelabs.com/u/ieee754 - -### Read/write IEEE754 floating point numbers from/to a Buffer or array-like object. - -## install - -``` -npm install ieee754 -``` - -## methods - -`var ieee754 = require('ieee754')` - -The `ieee754` object has the following functions: - -``` -ieee754.read = function (buffer, offset, isLE, mLen, nBytes) -ieee754.write = function (buffer, value, offset, isLE, mLen, nBytes) -``` - -The arguments mean the following: - -- buffer = the buffer -- offset = offset into the buffer -- value = value to set (only for `write`) -- isLe = is little endian? -- mLen = mantissa length -- nBytes = number of bytes - -## what is ieee754? - -The IEEE Standard for Floating-Point Arithmetic (IEEE 754) is a technical standard for floating-point computation. [Read more](http://en.wikipedia.org/wiki/IEEE_floating_point). - -## license - -BSD 3 Clause. Copyright (c) 2008, Fair Oaks Labs, Inc. diff --git a/node_modules/browserify/node_modules/buffer/node_modules/ieee754/index.js b/node_modules/browserify/node_modules/buffer/node_modules/ieee754/index.js deleted file mode 100644 index 95e190c4..00000000 --- a/node_modules/browserify/node_modules/buffer/node_modules/ieee754/index.js +++ /dev/null @@ -1,84 +0,0 @@ -exports.read = function (buffer, offset, isLE, mLen, nBytes) { - var e, m - var eLen = nBytes * 8 - mLen - 1 - var eMax = (1 << eLen) - 1 - var eBias = eMax >> 1 - var nBits = -7 - var i = isLE ? (nBytes - 1) : 0 - var d = isLE ? -1 : 1 - var s = buffer[offset + i] - - i += d - - e = s & ((1 << (-nBits)) - 1) - s >>= (-nBits) - nBits += eLen - for (; nBits > 0; e = e * 256 + buffer[offset + i], i += d, nBits -= 8) {} - - m = e & ((1 << (-nBits)) - 1) - e >>= (-nBits) - nBits += mLen - for (; nBits > 0; m = m * 256 + buffer[offset + i], i += d, nBits -= 8) {} - - if (e === 0) { - e = 1 - eBias - } else if (e === eMax) { - return m ? NaN : ((s ? -1 : 1) * Infinity) - } else { - m = m + Math.pow(2, mLen) - e = e - eBias - } - return (s ? -1 : 1) * m * Math.pow(2, e - mLen) -} - -exports.write = function (buffer, value, offset, isLE, mLen, nBytes) { - var e, m, c - var eLen = nBytes * 8 - mLen - 1 - var eMax = (1 << eLen) - 1 - var eBias = eMax >> 1 - var rt = (mLen === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0) - var i = isLE ? 0 : (nBytes - 1) - var d = isLE ? 1 : -1 - var s = value < 0 || (value === 0 && 1 / value < 0) ? 1 : 0 - - value = Math.abs(value) - - if (isNaN(value) || value === Infinity) { - m = isNaN(value) ? 1 : 0 - e = eMax - } else { - e = Math.floor(Math.log(value) / Math.LN2) - if (value * (c = Math.pow(2, -e)) < 1) { - e-- - c *= 2 - } - if (e + eBias >= 1) { - value += rt / c - } else { - value += rt * Math.pow(2, 1 - eBias) - } - if (value * c >= 2) { - e++ - c /= 2 - } - - if (e + eBias >= eMax) { - m = 0 - e = eMax - } else if (e + eBias >= 1) { - m = (value * c - 1) * Math.pow(2, mLen) - e = e + eBias - } else { - m = value * Math.pow(2, eBias - 1) * Math.pow(2, mLen) - e = 0 - } - } - - for (; mLen >= 8; buffer[offset + i] = m & 0xff, i += d, m /= 256, mLen -= 8) {} - - e = (e << mLen) | m - eLen += mLen - for (; eLen > 0; buffer[offset + i] = e & 0xff, i += d, e /= 256, eLen -= 8) {} - - buffer[offset + i - d] |= s * 128 -} diff --git a/node_modules/browserify/node_modules/buffer/node_modules/ieee754/package.json b/node_modules/browserify/node_modules/buffer/node_modules/ieee754/package.json deleted file mode 100644 index 7c35993e..00000000 --- a/node_modules/browserify/node_modules/buffer/node_modules/ieee754/package.json +++ /dev/null @@ -1,71 +0,0 @@ -{ - "name": "ieee754", - "description": "Read/write IEEE754 floating point numbers from/to a Buffer or array-like object", - "version": "1.1.8", - "author": { - "name": "Feross Aboukhadijeh", - "email": "feross@feross.org", - "url": "http://feross.org" - }, - "contributors": [ - { - "name": "Romain Beauxis", - "email": "toots@rastageeks.org" - } - ], - "devDependencies": { - "standard": "*", - "tape": "^4.0.0", - "zuul": "^3.0.0" - }, - "keywords": [ - "IEEE 754", - "buffer", - "convert", - "floating point", - "ieee754" - ], - "license": "BSD-3-Clause", - "main": "index.js", - "repository": { - "type": "git", - "url": "git://github.com/feross/ieee754.git" - }, - "scripts": { - "test": "standard && npm run test-node && npm run test-browser", - "test-browser": "zuul -- test/*.js", - "test-browser-local": "zuul --local -- test/*.js", - "test-node": "tape test/*.js" - }, - "gitHead": "53d3f869cc527852156b8307353c55addc3e03ae", - "bugs": { - "url": "https://github.com/feross/ieee754/issues" - }, - "homepage": "https://github.com/feross/ieee754#readme", - "_id": "ieee754@1.1.8", - "_shasum": "be33d40ac10ef1926701f6f08a2d86fbfd1ad3e4", - "_from": "ieee754@>=1.1.4 <2.0.0", - "_npmVersion": "3.10.3", - "_nodeVersion": "6.7.0", - "_npmUser": { - "name": "feross", - "email": "feross@feross.org" - }, - "dist": { - "shasum": "be33d40ac10ef1926701f6f08a2d86fbfd1ad3e4", - "tarball": "https://registry.npmjs.org/ieee754/-/ieee754-1.1.8.tgz" - }, - "maintainers": [ - { - "name": "feross", - "email": "feross@feross.org" - } - ], - "_npmOperationalInternal": { - "host": "packages-12-west.internal.npmjs.com", - "tmp": "tmp/ieee754-1.1.8.tgz_1475481601035_0.6688473029062152" - }, - "directories": {}, - "_resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.1.8.tgz", - "readme": "ERROR: No README data found!" -} diff --git a/node_modules/browserify/node_modules/buffer/node_modules/ieee754/test/basic.js b/node_modules/browserify/node_modules/buffer/node_modules/ieee754/test/basic.js deleted file mode 100644 index 58fae2bf..00000000 --- a/node_modules/browserify/node_modules/buffer/node_modules/ieee754/test/basic.js +++ /dev/null @@ -1,23 +0,0 @@ -var ieee754 = require('../') -var test = require('tape') - -var EPSILON = 0.00001 - -test('read float', function (t) { - var buf = new Buffer(4) - buf.writeFloatLE(42.42, 0) - var num = ieee754.read(buf, 0, true, 23, 4) - t.ok(Math.abs(num - 42.42) < EPSILON) - - t.end() -}) - -test('write float', function (t) { - var buf = new Buffer(4) - ieee754.write(buf, 42.42, 0, true, 23, 4) - - var num = buf.readFloatLE(0) - t.ok(Math.abs(num - 42.42) < EPSILON) - - t.end() -}) diff --git a/node_modules/browserify/node_modules/buffer/node_modules/isarray/.npmignore b/node_modules/browserify/node_modules/buffer/node_modules/isarray/.npmignore deleted file mode 100644 index 3c3629e6..00000000 --- a/node_modules/browserify/node_modules/buffer/node_modules/isarray/.npmignore +++ /dev/null @@ -1 +0,0 @@ -node_modules diff --git a/node_modules/browserify/node_modules/buffer/node_modules/isarray/.travis.yml b/node_modules/browserify/node_modules/buffer/node_modules/isarray/.travis.yml deleted file mode 100644 index cc4dba29..00000000 --- a/node_modules/browserify/node_modules/buffer/node_modules/isarray/.travis.yml +++ /dev/null @@ -1,4 +0,0 @@ -language: node_js -node_js: - - "0.8" - - "0.10" diff --git a/node_modules/browserify/node_modules/buffer/node_modules/isarray/Makefile b/node_modules/browserify/node_modules/buffer/node_modules/isarray/Makefile deleted file mode 100644 index 787d56e1..00000000 --- a/node_modules/browserify/node_modules/buffer/node_modules/isarray/Makefile +++ /dev/null @@ -1,6 +0,0 @@ - -test: - @node_modules/.bin/tape test.js - -.PHONY: test - diff --git a/node_modules/browserify/node_modules/buffer/node_modules/isarray/README.md b/node_modules/browserify/node_modules/buffer/node_modules/isarray/README.md deleted file mode 100644 index 16d2c59c..00000000 --- a/node_modules/browserify/node_modules/buffer/node_modules/isarray/README.md +++ /dev/null @@ -1,60 +0,0 @@ - -# isarray - -`Array#isArray` for older browsers. - -[![build status](https://secure.travis-ci.org/juliangruber/isarray.svg)](http://travis-ci.org/juliangruber/isarray) -[![downloads](https://img.shields.io/npm/dm/isarray.svg)](https://www.npmjs.org/package/isarray) - -[![browser support](https://ci.testling.com/juliangruber/isarray.png) -](https://ci.testling.com/juliangruber/isarray) - -## Usage - -```js -var isArray = require('isarray'); - -console.log(isArray([])); // => true -console.log(isArray({})); // => false -``` - -## Installation - -With [npm](http://npmjs.org) do - -```bash -$ npm install isarray -``` - -Then bundle for the browser with -[browserify](https://github.com/substack/browserify). - -With [component](http://component.io) do - -```bash -$ component install juliangruber/isarray -``` - -## License - -(MIT) - -Copyright (c) 2013 Julian Gruber <julian@juliangruber.com> - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies -of the Software, and to permit persons to whom the Software is furnished to do -so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/node_modules/browserify/node_modules/buffer/node_modules/isarray/component.json b/node_modules/browserify/node_modules/buffer/node_modules/isarray/component.json deleted file mode 100644 index 9e31b683..00000000 --- a/node_modules/browserify/node_modules/buffer/node_modules/isarray/component.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "name" : "isarray", - "description" : "Array#isArray for older browsers", - "version" : "0.0.1", - "repository" : "juliangruber/isarray", - "homepage": "https://github.com/juliangruber/isarray", - "main" : "index.js", - "scripts" : [ - "index.js" - ], - "dependencies" : {}, - "keywords": ["browser","isarray","array"], - "author": { - "name": "Julian Gruber", - "email": "mail@juliangruber.com", - "url": "http://juliangruber.com" - }, - "license": "MIT" -} diff --git a/node_modules/browserify/node_modules/buffer/node_modules/isarray/index.js b/node_modules/browserify/node_modules/buffer/node_modules/isarray/index.js deleted file mode 100644 index a57f6349..00000000 --- a/node_modules/browserify/node_modules/buffer/node_modules/isarray/index.js +++ /dev/null @@ -1,5 +0,0 @@ -var toString = {}.toString; - -module.exports = Array.isArray || function (arr) { - return toString.call(arr) == '[object Array]'; -}; diff --git a/node_modules/browserify/node_modules/buffer/node_modules/isarray/package.json b/node_modules/browserify/node_modules/buffer/node_modules/isarray/package.json deleted file mode 100644 index 95dda1bc..00000000 --- a/node_modules/browserify/node_modules/buffer/node_modules/isarray/package.json +++ /dev/null @@ -1,71 +0,0 @@ -{ - "name": "isarray", - "description": "Array#isArray for older browsers", - "version": "1.0.0", - "repository": { - "type": "git", - "url": "git://github.com/juliangruber/isarray.git" - }, - "homepage": "https://github.com/juliangruber/isarray", - "main": "index.js", - "dependencies": {}, - "devDependencies": { - "tape": "~2.13.4" - }, - "keywords": [ - "browser", - "isarray", - "array" - ], - "author": { - "name": "Julian Gruber", - "email": "mail@juliangruber.com", - "url": "http://juliangruber.com" - }, - "license": "MIT", - "testling": { - "files": "test.js", - "browsers": [ - "ie/8..latest", - "firefox/17..latest", - "firefox/nightly", - "chrome/22..latest", - "chrome/canary", - "opera/12..latest", - "opera/next", - "safari/5.1..latest", - "ipad/6.0..latest", - "iphone/6.0..latest", - "android-browser/4.2..latest" - ] - }, - "scripts": { - "test": "tape test.js" - }, - "gitHead": "2a23a281f369e9ae06394c0fb4d2381355a6ba33", - "bugs": { - "url": "https://github.com/juliangruber/isarray/issues" - }, - "_id": "isarray@1.0.0", - "_shasum": "bb935d48582cba168c06834957a54a3e07124f11", - "_from": "isarray@>=1.0.0 <2.0.0", - "_npmVersion": "3.3.12", - "_nodeVersion": "5.1.0", - "_npmUser": { - "name": "juliangruber", - "email": "julian@juliangruber.com" - }, - "dist": { - "shasum": "bb935d48582cba168c06834957a54a3e07124f11", - "tarball": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz" - }, - "maintainers": [ - { - "name": "juliangruber", - "email": "julian@juliangruber.com" - } - ], - "directories": {}, - "_resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", - "readme": "ERROR: No README data found!" -} diff --git a/node_modules/browserify/node_modules/buffer/node_modules/isarray/test.js b/node_modules/browserify/node_modules/buffer/node_modules/isarray/test.js deleted file mode 100644 index e0c3444d..00000000 --- a/node_modules/browserify/node_modules/buffer/node_modules/isarray/test.js +++ /dev/null @@ -1,20 +0,0 @@ -var isArray = require('./'); -var test = require('tape'); - -test('is array', function(t){ - t.ok(isArray([])); - t.notOk(isArray({})); - t.notOk(isArray(null)); - t.notOk(isArray(false)); - - var obj = {}; - obj[0] = true; - t.notOk(isArray(obj)); - - var arr = []; - arr.foo = 'bar'; - t.ok(isArray(arr)); - - t.end(); -}); - diff --git a/node_modules/browserify/node_modules/buffer/package.json b/node_modules/browserify/node_modules/buffer/package.json deleted file mode 100644 index 9f49d8e5..00000000 --- a/node_modules/browserify/node_modules/buffer/package.json +++ /dev/null @@ -1,103 +0,0 @@ -{ - "name": "buffer", - "description": "Node.js Buffer API, for the browser", - "version": "3.6.0", - "author": { - "name": "Feross Aboukhadijeh", - "email": "feross@feross.org", - "url": "http://feross.org" - }, - "bugs": { - "url": "https://github.com/feross/buffer/issues" - }, - "contributors": [ - { - "name": "Romain Beauxis", - "email": "toots@rastageeks.org" - }, - { - "name": "James Halliday", - "email": "mail@substack.net" - } - ], - "dependencies": { - "base64-js": "0.0.8", - "ieee754": "^1.1.4", - "isarray": "^1.0.0" - }, - "devDependencies": { - "benchmark": "^1.0.0", - "browserify": "^12.0.1", - "concat-stream": "^1.4.7", - "hyperquest": "^1.0.1", - "is-nan": "^1.0.1", - "split": "^1.0.0", - "standard": "^5.0.0", - "tape": "^4.0.0", - "through2": "^2.0.0", - "zuul": "^3.0.0" - }, - "homepage": "https://github.com/feross/buffer", - "keywords": [ - "buffer", - "browserify", - "compatible", - "browser", - "arraybuffer", - "uint8array", - "dataview" - ], - "license": "MIT", - "main": "index.js", - "repository": { - "type": "git", - "url": "git://github.com/feross/buffer.git" - }, - "scripts": { - "test": "standard && node ./bin/test.js", - "test-browser": "zuul -- test/*.js test/node/*.js", - "test-browser-local": "zuul --local -- test/*.js test/node/*.js", - "test-node": "tape test/*.js test/node/*.js test/node-es6/*.js && OBJECT_IMPL=true tape test/*.js test/node/*.js", - "perf": "browserify --debug perf/bracket-notation.js > perf/bundle.js && open perf/index.html", - "perf-node": "node perf/bracket-notation.js && node perf/concat.js && node perf/copy-big.js && node perf/copy.js && node perf/new-big.js && node perf/new.js && node perf/readDoubleBE.js && node perf/readFloatBE.js && node perf/readUInt32LE.js && node perf/slice.js && node perf/writeFloatBE.js", - "size": "browserify -r ./ | uglifyjs -c -m | gzip | wc -c" - }, - "standard": { - "ignore": [ - "test/node/*.js", - "test/node-es6/*.js", - "test/_polyfill.js", - "perf/*.js" - ] - }, - "jspm": { - "map": { - "./index.js": { - "node": "@node/buffer" - } - } - }, - "gitHead": "73e77e481f6ebc7a97be87468ddf9e8daf72a93c", - "_id": "buffer@3.6.0", - "_shasum": "a72c936f77b96bf52f5f7e7b467180628551defb", - "_from": "buffer@>=3.0.0 <4.0.0", - "_npmVersion": "2.14.7", - "_nodeVersion": "4.2.3", - "_npmUser": { - "name": "feross", - "email": "feross@feross.org" - }, - "dist": { - "shasum": "a72c936f77b96bf52f5f7e7b467180628551defb", - "tarball": "https://registry.npmjs.org/buffer/-/buffer-3.6.0.tgz" - }, - "maintainers": [ - { - "name": "feross", - "email": "feross@feross.org" - } - ], - "directories": {}, - "_resolved": "https://registry.npmjs.org/buffer/-/buffer-3.6.0.tgz", - "readme": "ERROR: No README data found!" -} diff --git a/node_modules/browserify/node_modules/buffer/test/_polyfill.js b/node_modules/browserify/node_modules/buffer/test/_polyfill.js deleted file mode 100644 index 61f9c180..00000000 --- a/node_modules/browserify/node_modules/buffer/test/_polyfill.js +++ /dev/null @@ -1,150 +0,0 @@ -if (!Array.prototype.forEach) { - - Array.prototype.forEach = function(callback, thisArg) { - - var T, k; - - if (this == null) { - throw new TypeError(' this is null or not defined'); - } - - // 1. Let O be the result of calling ToObject passing the |this| value as the argument. - var O = Object(this); - - // 2. Let lenValue be the result of calling the Get internal method of O with the argument "length". - // 3. Let len be ToUint32(lenValue). - var len = O.length >>> 0; - - // 4. If IsCallable(callback) is false, throw a TypeError exception. - // See: http://es5.github.com/#x9.11 - if (typeof callback !== "function") { - throw new TypeError(callback + ' is not a function'); - } - - // 5. If thisArg was supplied, let T be thisArg; else let T be undefined. - if (arguments.length > 1) { - T = thisArg; - } - - // 6. Let k be 0 - k = 0; - - // 7. Repeat, while k < len - while (k < len) { - - var kValue; - - // a. Let Pk be ToString(k). - // This is implicit for LHS operands of the in operator - // b. Let kPresent be the result of calling the HasProperty internal method of O with argument Pk. - // This step can be combined with c - // c. If kPresent is true, then - if (k in O) { - - // i. Let kValue be the result of calling the Get internal method of O with argument Pk. - kValue = O[k]; - - // ii. Call the Call internal method of callback with T as the this value and - // argument list containing kValue, k, and O. - callback.call(T, kValue, k, O); - } - // d. Increase k by 1. - k++; - } - // 8. return undefined - }; -} - -if (!Array.isArray) { - Array.isArray = function(arg) { - return Object.prototype.toString.call(arg) === '[object Array]'; - }; -} - -if (!Array.prototype.map) { - - Array.prototype.map = function(callback, thisArg) { - - var T, A, k; - - if (this == null) { - throw new TypeError(' this is null or not defined'); - } - - // 1. Let O be the result of calling ToObject passing the |this| - // value as the argument. - var O = Object(this); - - // 2. Let lenValue be the result of calling the Get internal - // method of O with the argument "length". - // 3. Let len be ToUint32(lenValue). - var len = O.length >>> 0; - - // 4. If IsCallable(callback) is false, throw a TypeError exception. - // See: http://es5.github.com/#x9.11 - if (typeof callback !== 'function') { - throw new TypeError(callback + ' is not a function'); - } - - // 5. If thisArg was supplied, let T be thisArg; else let T be undefined. - if (arguments.length > 1) { - T = thisArg; - } - - // 6. Let A be a new array created as if by the expression new Array(len) - // where Array is the standard built-in constructor with that name and - // len is the value of len. - A = new Array(len); - - // 7. Let k be 0 - k = 0; - - // 8. Repeat, while k < len - while (k < len) { - - var kValue, mappedValue; - - // a. Let Pk be ToString(k). - // This is implicit for LHS operands of the in operator - // b. Let kPresent be the result of calling the HasProperty internal - // method of O with argument Pk. - // This step can be combined with c - // c. If kPresent is true, then - if (k in O) { - - // i. Let kValue be the result of calling the Get internal - // method of O with argument Pk. - kValue = O[k]; - - // ii. Let mappedValue be the result of calling the Call internal - // method of callback with T as the this value and argument - // list containing kValue, k, and O. - mappedValue = callback.call(T, kValue, k, O); - - // iii. Call the DefineOwnProperty internal method of A with arguments - // Pk, Property Descriptor - // { Value: mappedValue, - // Writable: true, - // Enumerable: true, - // Configurable: true }, - // and false. - - // In browsers that support Object.defineProperty, use the following: - // Object.defineProperty(A, k, { - // value: mappedValue, - // writable: true, - // enumerable: true, - // configurable: true - // }); - - // For best browser support, use the following: - A[k] = mappedValue; - } - // d. Increase k by 1. - k++; - } - - // 9. return A - return A; - }; -} diff --git a/node_modules/browserify/node_modules/buffer/test/base64.js b/node_modules/browserify/node_modules/buffer/test/base64.js deleted file mode 100644 index e4ecc56a..00000000 --- a/node_modules/browserify/node_modules/buffer/test/base64.js +++ /dev/null @@ -1,47 +0,0 @@ -if (process.env.OBJECT_IMPL) global.TYPED_ARRAY_SUPPORT = false -var B = require('../').Buffer -var test = require('tape') - -test('base64: ignore whitespace', function (t) { - var text = '\n YW9ldQ== ' - var buf = new B(text, 'base64') - t.equal(buf.toString(), 'aoeu') - t.end() -}) - -test('base64: strings without padding', function (t) { - t.equal((new B('YW9ldQ', 'base64').toString()), 'aoeu') - t.end() -}) - -test('base64: newline in utf8 -- should not be an issue', function (t) { - t.equal( - new B('LS0tCnRpdGxlOiBUaHJlZSBkYXNoZXMgbWFya3MgdGhlIHNwb3QKdGFnczoK', 'base64').toString('utf8'), - '---\ntitle: Three dashes marks the spot\ntags:\n' - ) - t.end() -}) - -test('base64: newline in base64 -- should get stripped', function (t) { - t.equal( - new B('LS0tCnRpdGxlOiBUaHJlZSBkYXNoZXMgbWFya3MgdGhlIHNwb3QKdGFnczoK\nICAtIHlhbWwKICAtIGZyb250LW1hdHRlcgogIC0gZGFzaGVzCmV4cGFuZWQt', 'base64').toString('utf8'), - '---\ntitle: Three dashes marks the spot\ntags:\n - yaml\n - front-matter\n - dashes\nexpaned-' - ) - t.end() -}) - -test('base64: tab characters in base64 - should get stripped', function (t) { - t.equal( - new B('LS0tCnRpdGxlOiBUaHJlZSBkYXNoZXMgbWFya3MgdGhlIHNwb3QKdGFnczoK\t\t\t\tICAtIHlhbWwKICAtIGZyb250LW1hdHRlcgogIC0gZGFzaGVzCmV4cGFuZWQt', 'base64').toString('utf8'), - '---\ntitle: Three dashes marks the spot\ntags:\n - yaml\n - front-matter\n - dashes\nexpaned-' - ) - t.end() -}) - -test('base64: invalid non-alphanumeric characters -- should be stripped', function (t) { - t.equal( - new B('!"#$%&\'()*,.:;<=>?@[\\]^`{|}~', 'base64').toString('utf8'), - '' - ) - t.end() -}) diff --git a/node_modules/browserify/node_modules/buffer/test/basic.js b/node_modules/browserify/node_modules/buffer/test/basic.js deleted file mode 100644 index d2fac762..00000000 --- a/node_modules/browserify/node_modules/buffer/test/basic.js +++ /dev/null @@ -1,91 +0,0 @@ -if (process.env.OBJECT_IMPL) global.TYPED_ARRAY_SUPPORT = false -var B = require('../').Buffer -var test = require('tape') - -test('buf.constructor is Buffer', function (t) { - var buf = new B([1, 2]) - t.strictEqual(buf.constructor, B) - t.end() -}) - -test('instanceof Buffer', function (t) { - var buf = new B([1, 2]) - t.ok(buf instanceof B) - t.end() -}) - -test('convert to Uint8Array in modern browsers', function (t) { - if (B.TYPED_ARRAY_SUPPORT) { - var buf = new B([1, 2]) - var uint8array = new Uint8Array(buf.buffer) - t.ok(uint8array instanceof Uint8Array) - t.equal(uint8array[0], 1) - t.equal(uint8array[1], 2) - } else { - t.pass('object impl: skipping test') - } - t.end() -}) - -test('indexes from a string', function (t) { - var buf = new B('abc') - t.equal(buf[0], 97) - t.equal(buf[1], 98) - t.equal(buf[2], 99) - t.end() -}) - -test('indexes from an array', function (t) { - var buf = new B([ 97, 98, 99 ]) - t.equal(buf[0], 97) - t.equal(buf[1], 98) - t.equal(buf[2], 99) - t.end() -}) - -test('setting index value should modify buffer contents', function (t) { - var buf = new B([ 97, 98, 99 ]) - t.equal(buf[2], 99) - t.equal(buf.toString(), 'abc') - - buf[2] += 10 - t.equal(buf[2], 109) - t.equal(buf.toString(), 'abm') - t.end() -}) - -test('storing negative number should cast to unsigned', function (t) { - var buf = new B(1) - - if (B.TYPED_ARRAY_SUPPORT) { - // This does not work with the object implementation -- nothing we can do! - buf[0] = -3 - t.equal(buf[0], 253) - } - - buf = new B(1) - buf.writeInt8(-3, 0) - t.equal(buf[0], 253) - - t.end() -}) - -test('test that memory is copied from array-like', function (t) { - if (B.TYPED_ARRAY_SUPPORT) { - var u = new Uint8Array(4) - var b = new B(u) - b[0] = 1 - b[1] = 2 - b[2] = 3 - b[3] = 4 - - t.equal(u[0], 0) - t.equal(u[1], 0) - t.equal(u[2], 0) - t.equal(u[3], 0) - } else { - t.pass('object impl: skipping test') - } - - t.end() -}) diff --git a/node_modules/browserify/node_modules/buffer/test/compare.js b/node_modules/browserify/node_modules/buffer/test/compare.js deleted file mode 100644 index 62b478c7..00000000 --- a/node_modules/browserify/node_modules/buffer/test/compare.js +++ /dev/null @@ -1,59 +0,0 @@ -if (process.env.OBJECT_IMPL) global.TYPED_ARRAY_SUPPORT = false -var B = require('../').Buffer -var test = require('tape') - -test('buffer.compare', function (t) { - var b = new B(1).fill('a') - var c = new B(1).fill('c') - var d = new B(2).fill('aa') - - t.equal(b.compare(c), -1) - t.equal(c.compare(d), 1) - t.equal(d.compare(b), 1) - t.equal(b.compare(d), -1) - - // static method - t.equal(B.compare(b, c), -1) - t.equal(B.compare(c, d), 1) - t.equal(B.compare(d, b), 1) - t.equal(B.compare(b, d), -1) - t.end() -}) - -test('buffer.compare argument validation', function (t) { - t.throws(function () { - var b = new B(1) - B.compare(b, 'abc') - }) - - t.throws(function () { - var b = new B(1) - B.compare('abc', b) - }) - - t.throws(function () { - var b = new B(1) - b.compare('abc') - }) - t.end() -}) - -test('buffer.equals', function (t) { - var b = new B(5).fill('abcdf') - var c = new B(5).fill('abcdf') - var d = new B(5).fill('abcde') - var e = new B(6).fill('abcdef') - - t.ok(b.equals(c)) - t.ok(!c.equals(d)) - t.ok(!d.equals(e)) - t.end() -}) - -test('buffer.equals argument validation', function (t) { - t.throws(function () { - var b = new B(1) - b.equals('abc') - }) - t.end() -}) diff --git a/node_modules/browserify/node_modules/buffer/test/constructor.js b/node_modules/browserify/node_modules/buffer/test/constructor.js deleted file mode 100644 index 1661c25d..00000000 --- a/node_modules/browserify/node_modules/buffer/test/constructor.js +++ /dev/null @@ -1,154 +0,0 @@ -if (process.env.OBJECT_IMPL) global.TYPED_ARRAY_SUPPORT = false -var B = require('../').Buffer -var test = require('tape') - -test('new buffer from array', function (t) { - t.equal( - new B([1, 2, 3]).toString(), - '\u0001\u0002\u0003' - ) - t.end() -}) - -test('new buffer from array w/ negatives', function (t) { - t.equal( - new B([-1, -2, -3]).toString('hex'), - 'fffefd' - ) - t.end() -}) - -test('new buffer from array with mixed signed input', function (t) { - t.equal( - new B([-255, 255, -128, 128, 512, -512, 511, -511]).toString('hex'), - '01ff80800000ff01' - ) - t.end() -}) - -test('new buffer from string', function (t) { - t.equal( - new B('hey', 'utf8').toString(), - 'hey' - ) - t.end() -}) - -test('new buffer from buffer', function (t) { - var b1 = new B('asdf') - var b2 = new B(b1) - t.equal(b1.toString('hex'), b2.toString('hex')) - t.end() -}) - -test('new buffer from Uint8Array', function (t) { - if (typeof Uint8Array !== 'undefined') { - var b1 = new Uint8Array([0, 1, 2, 3]) - var b2 = new B(b1) - t.equal(b1.length, b2.length) - t.equal(b1[0], 0) - t.equal(b1[1], 1) - t.equal(b1[2], 2) - t.equal(b1[3], 3) - t.equal(b1[4], undefined) - } - t.end() -}) - -test('new buffer from Uint16Array', function (t) { - if (typeof Uint16Array !== 'undefined') { - var b1 = new Uint16Array([0, 1, 2, 3]) - var b2 = new B(b1) - t.equal(b1.length, b2.length) - t.equal(b1[0], 0) - t.equal(b1[1], 1) - t.equal(b1[2], 2) - t.equal(b1[3], 3) - t.equal(b1[4], undefined) - } - t.end() -}) - -test('new buffer from Uint32Array', function (t) { - if (typeof Uint32Array !== 'undefined') { - var b1 = new Uint32Array([0, 1, 2, 3]) - var b2 = new B(b1) - t.equal(b1.length, b2.length) - t.equal(b1[0], 0) - t.equal(b1[1], 1) - t.equal(b1[2], 2) - t.equal(b1[3], 3) - t.equal(b1[4], undefined) - } - t.end() -}) - -test('new buffer from Int16Array', function (t) { - if (typeof Int16Array !== 'undefined') { - var b1 = new Int16Array([0, 1, 2, 3]) - var b2 = new B(b1) - t.equal(b1.length, b2.length) - t.equal(b1[0], 0) - t.equal(b1[1], 1) - t.equal(b1[2], 2) - t.equal(b1[3], 3) - t.equal(b1[4], undefined) - } - t.end() -}) - -test('new buffer from Int32Array', function (t) { - if (typeof Int32Array !== 'undefined') { - var b1 = new Int32Array([0, 1, 2, 3]) - var b2 = new B(b1) - t.equal(b1.length, b2.length) - t.equal(b1[0], 0) - t.equal(b1[1], 1) - t.equal(b1[2], 2) - t.equal(b1[3], 3) - t.equal(b1[4], undefined) - } - t.end() -}) - -test('new buffer from Float32Array', function (t) { - if (typeof Float32Array !== 'undefined') { - var b1 = new Float32Array([0, 1, 2, 3]) - var b2 = new B(b1) - t.equal(b1.length, b2.length) - t.equal(b1[0], 0) - t.equal(b1[1], 1) - t.equal(b1[2], 2) - t.equal(b1[3], 3) - t.equal(b1[4], undefined) - } - t.end() -}) - -test('new buffer from Float64Array', function (t) { - if (typeof Float64Array !== 'undefined') { - var b1 = new Float64Array([0, 1, 2, 3]) - var b2 = new B(b1) - t.equal(b1.length, b2.length) - t.equal(b1[0], 0) - t.equal(b1[1], 1) - t.equal(b1[2], 2) - t.equal(b1[3], 3) - t.equal(b1[4], undefined) - } - t.end() -}) - -test('new buffer from buffer.toJSON() output', function (t) { - if (typeof JSON === 'undefined') { - // ie6, ie7 lack support - t.end() - return - } - var buf = new B('test') - var json = JSON.stringify(buf) - var obj = JSON.parse(json) - var copy = new B(obj) - t.ok(buf.equals(copy)) - t.end() -}) diff --git a/node_modules/browserify/node_modules/buffer/test/deprecated.js b/node_modules/browserify/node_modules/buffer/test/deprecated.js deleted file mode 100644 index 991d6142..00000000 --- a/node_modules/browserify/node_modules/buffer/test/deprecated.js +++ /dev/null @@ -1,19 +0,0 @@ -if (process.env.OBJECT_IMPL) global.TYPED_ARRAY_SUPPORT = false -var B = require('../').Buffer -var test = require('tape') - -test('.get (deprecated)', function (t) { - var b = new B([7, 42]) - t.equal(b.get(0), 7) - t.equal(b.get(1), 42) - t.end() -}) - -test('.set (deprecated)', function (t) { - var b = new B(2) - b.set(7, 0) - b.set(42, 1) - t.equal(b[0], 7) - t.equal(b[1], 42) - t.end() -}) diff --git a/node_modules/browserify/node_modules/buffer/test/from-string.js b/node_modules/browserify/node_modules/buffer/test/from-string.js deleted file mode 100644 index e25db269..00000000 --- a/node_modules/browserify/node_modules/buffer/test/from-string.js +++ /dev/null @@ -1,132 +0,0 @@ -if (process.env.OBJECT_IMPL) global.TYPED_ARRAY_SUPPORT = false -var B = require('../').Buffer -var test = require('tape') - -test('detect utf16 surrogate pairs', function (t) { - var text = '\uD83D\uDE38' + '\uD83D\uDCAD' + '\uD83D\uDC4D' - var buf = new B(text) - t.equal(text, buf.toString()) - t.end() -}) - -test('detect utf16 surrogate pairs over U+20000 until U+10FFFF', function (t) { - var text = '\uD842\uDFB7' + '\uD93D\uDCAD' + '\uDBFF\uDFFF' - var buf = new B(text) - t.equal(text, buf.toString()) - t.end() -}) - -test('replace orphaned utf16 surrogate lead code point', function (t) { - var text = '\uD83D\uDE38' + '\uD83D' + '\uD83D\uDC4D' - var buf = new B(text) - t.deepEqual(buf, new B([ 0xf0, 0x9f, 0x98, 0xb8, 0xef, 0xbf, 0xbd, 0xf0, 0x9f, 0x91, 0x8d ])) - t.end() -}) - -test('replace orphaned utf16 surrogate trail code point', function (t) { - var text = '\uD83D\uDE38' + '\uDCAD' + '\uD83D\uDC4D' - var buf = new B(text) - t.deepEqual(buf, new B([ 0xf0, 0x9f, 0x98, 0xb8, 0xef, 0xbf, 0xbd, 0xf0, 0x9f, 0x91, 0x8d ])) - t.end() -}) - -test('do not write partial utf16 code units', function (t) { - var f = new B([0, 0, 0, 0, 0]) - t.equal(f.length, 5) - var size = f.write('あいうえお', 'utf16le') - t.equal(size, 4) - t.deepEqual(f, new B([0x42, 0x30, 0x44, 0x30, 0x00])) - t.end() -}) - -test('handle partial utf16 code points when encoding to utf8 the way node does', function (t) { - var text = '\uD83D\uDE38' + '\uD83D\uDC4D' - - var buf = new B(8) - buf.fill(0) - buf.write(text) - t.deepEqual(buf, new B([ 0xf0, 0x9f, 0x98, 0xb8, 0xf0, 0x9f, 0x91, 0x8d ])) - - buf = new B(7) - buf.fill(0) - buf.write(text) - t.deepEqual(buf, new B([ 0xf0, 0x9f, 0x98, 0xb8, 0x00, 0x00, 0x00 ])) - - buf = new B(6) - buf.fill(0) - buf.write(text) - t.deepEqual(buf, new B([ 0xf0, 0x9f, 0x98, 0xb8, 0x00, 0x00 ])) - - buf = new B(5) - buf.fill(0) - buf.write(text) - t.deepEqual(buf, new B([ 0xf0, 0x9f, 0x98, 0xb8, 0x00 ])) - - buf = new B(4) - buf.fill(0) - buf.write(text) - t.deepEqual(buf, new B([ 0xf0, 0x9f, 0x98, 0xb8 ])) - - buf = new B(3) - buf.fill(0) - buf.write(text) - t.deepEqual(buf, new B([ 0x00, 0x00, 0x00 ])) - - buf = new B(2) - buf.fill(0) - buf.write(text) - t.deepEqual(buf, new B([ 0x00, 0x00 ])) - - buf = new B(1) - buf.fill(0) - buf.write(text) - t.deepEqual(buf, new B([ 0x00 ])) - - t.end() -}) - -test('handle invalid utf16 code points when encoding to utf8 the way node does', function (t) { - var text = 'a' + '\uDE38\uD83D' + 'b' - - var buf = new B(8) - buf.fill(0) - buf.write(text) - t.deepEqual(buf, new B([ 0x61, 0xef, 0xbf, 0xbd, 0xef, 0xbf, 0xbd, 0x62 ])) - - buf = new B(7) - buf.fill(0) - buf.write(text) - t.deepEqual(buf, new B([ 0x61, 0xef, 0xbf, 0xbd, 0xef, 0xbf, 0xbd ])) - - buf = new B(6) - buf.fill(0) - buf.write(text) - t.deepEqual(buf, new B([ 0x61, 0xef, 0xbf, 0xbd, 0x00, 0x00 ])) - - buf = new B(5) - buf.fill(0) - buf.write(text) - t.deepEqual(buf, new B([ 0x61, 0xef, 0xbf, 0xbd, 0x00 ])) - - buf = new B(4) - buf.fill(0) - buf.write(text) - t.deepEqual(buf, new B([ 0x61, 0xef, 0xbf, 0xbd ])) - - buf = new B(3) - buf.fill(0) - buf.write(text) - t.deepEqual(buf, new B([ 0x61, 0x00, 0x00 ])) - - buf = new B(2) - buf.fill(0) - buf.write(text) - t.deepEqual(buf, new B([ 0x61, 0x00 ])) - - buf = new B(1) - buf.fill(0) - buf.write(text) - t.deepEqual(buf, new B([ 0x61 ])) - - t.end() -}) diff --git a/node_modules/browserify/node_modules/buffer/test/methods.js b/node_modules/browserify/node_modules/buffer/test/methods.js deleted file mode 100644 index f4bd3f21..00000000 --- a/node_modules/browserify/node_modules/buffer/test/methods.js +++ /dev/null @@ -1,127 +0,0 @@ -if (process.env.OBJECT_IMPL) global.TYPED_ARRAY_SUPPORT = false -var B = require('../').Buffer -var test = require('tape') - -test('buffer.toJSON', function (t) { - var data = [1, 2, 3, 4] - t.deepEqual( - new B(data).toJSON(), - { type: 'Buffer', data: [ 1, 2, 3, 4 ] } - ) - t.end() -}) - -test('buffer.copy', function (t) { - // copied from nodejs.org example - var buf1 = new B(26) - var buf2 = new B(26) - - for (var i = 0; i < 26; i++) { - buf1[i] = i + 97 // 97 is ASCII a - buf2[i] = 33 // ASCII ! - } - - buf1.copy(buf2, 8, 16, 20) - - t.equal( - buf2.toString('ascii', 0, 25), - '!!!!!!!!qrst!!!!!!!!!!!!!' - ) - t.end() -}) - -test('test offset returns are correct', function (t) { - var b = new B(16) - t.equal(4, b.writeUInt32LE(0, 0)) - t.equal(6, b.writeUInt16LE(0, 4)) - t.equal(7, b.writeUInt8(0, 6)) - t.equal(8, b.writeInt8(0, 7)) - t.equal(16, b.writeDoubleLE(0, 8)) - t.end() -}) - -test('concat() a varying number of buffers', function (t) { - var zero = [] - var one = [ new B('asdf') ] - var long = [] - for (var i = 0; i < 10; i++) { - long.push(new B('asdf')) - } - - var flatZero = B.concat(zero) - var flatOne = B.concat(one) - var flatLong = B.concat(long) - var flatLongLen = B.concat(long, 40) - - t.equal(flatZero.length, 0) - t.equal(flatOne.toString(), 'asdf') - t.deepEqual(flatOne, one[0]) - t.equal(flatLong.toString(), (new Array(10 + 1).join('asdf'))) - t.equal(flatLongLen.toString(), (new Array(10 + 1).join('asdf'))) - t.end() -}) - -test('fill', function (t) { - var b = new B(10) - b.fill(2) - t.equal(b.toString('hex'), '02020202020202020202') - t.end() -}) - -test('fill (string)', function (t) { - var b = new B(10) - b.fill('abc') - t.equal(b.toString(), 'abcabcabca') - b.fill('է') - t.equal(b.toString(), 'էէէէէ') - t.end() -}) - -test('copy() empty buffer with sourceEnd=0', function (t) { - var source = new B([42]) - var destination = new B([43]) - source.copy(destination, 0, 0, 0) - t.equal(destination.readUInt8(0), 43) - t.end() -}) - -test('copy() after slice()', function (t) { - var source = new B(200) - var dest = new B(200) - var expected = new B(200) - for (var i = 0; i < 200; i++) { - source[i] = i - dest[i] = 0 - } - - source.slice(2).copy(dest) - source.copy(expected, 0, 2) - t.deepEqual(dest, expected) - t.end() -}) - -test('copy() ascending', function (t) { - var b = new B('abcdefghij') - b.copy(b, 0, 3, 10) - t.equal(b.toString(), 'defghijhij') - t.end() -}) - -test('copy() descending', function (t) { - var b = new B('abcdefghij') - b.copy(b, 3, 0, 7) - t.equal(b.toString(), 'abcabcdefg') - t.end() -}) - -test('buffer.slice sets indexes', function (t) { - t.equal((new B('hallo')).slice(0, 5).toString(), 'hallo') - t.end() -}) - -test('buffer.slice out of range', function (t) { - t.plan(2) - t.equal((new B('hallo')).slice(0, 10).toString(), 'hallo') - t.equal((new B('hallo')).slice(10, 2).toString(), '') - t.end() -}) diff --git a/node_modules/browserify/node_modules/buffer/test/node-es6/README.txt b/node_modules/browserify/node_modules/buffer/test/node-es6/README.txt deleted file mode 100644 index 94199ff3..00000000 --- a/node_modules/browserify/node_modules/buffer/test/node-es6/README.txt +++ /dev/null @@ -1 +0,0 @@ -node buffer tests that require ES6 (e.g. "for..of" construct) diff --git a/node_modules/browserify/node_modules/buffer/test/node-es6/test-buffer-arraybuffer.js b/node_modules/browserify/node_modules/buffer/test/node-es6/test-buffer-arraybuffer.js deleted file mode 100644 index f0eb57c7..00000000 --- a/node_modules/browserify/node_modules/buffer/test/node-es6/test-buffer-arraybuffer.js +++ /dev/null @@ -1,49 +0,0 @@ -'use strict'; -if (process.env.OBJECT_IMPL) global.TYPED_ARRAY_SUPPORT = false; -var Buffer = require('../../').Buffer; - -var common = {}; -var assert = require('assert'); - -var Buffer = require('../../').Buffer; -var LENGTH = 16; - -var ab = new ArrayBuffer(LENGTH); -var dv = new DataView(ab); -var ui = new Uint8Array(ab); -var buf = new Buffer(ab); - - -assert.ok(Buffer.isBuffer(buf)); -// For backwards compatibility of old .parent property test that if buf is not -// a slice then .parent should be undefined. -assert.equal(buf.parent, undefined); -assert.equal(buf.buffer, ab); -assert.equal(buf.length, ab.byteLength); - - -buf.fill(0xC); -for (var i = 0; i < LENGTH; i++) { - assert.equal(ui[i], 0xC); - ui[i] = 0xF; - assert.equal(buf[i], 0xF); -} - -buf.writeUInt32LE(0xF00, 0); -buf.writeUInt32BE(0xB47, 4); -buf.writeDoubleLE(3.1415, 8); - -assert.equal(dv.getUint32(0, true), 0xF00); -assert.equal(dv.getUint32(4), 0xB47); -assert.equal(dv.getFloat64(8, true), 3.1415); - - -// Now test protecting users from doing stupid things - -assert.throws(function() { - function AB() { } - AB.__proto__ = ArrayBuffer; - AB.prototype.__proto__ = ArrayBuffer.prototype; - new Buffer(new AB()); -}, TypeError); - diff --git a/node_modules/browserify/node_modules/buffer/test/node-es6/test-buffer-iterator.js b/node_modules/browserify/node_modules/buffer/test/node-es6/test-buffer-iterator.js deleted file mode 100644 index 3aa3fbf0..00000000 --- a/node_modules/browserify/node_modules/buffer/test/node-es6/test-buffer-iterator.js +++ /dev/null @@ -1,65 +0,0 @@ -'use strict'; -if (process.env.OBJECT_IMPL) global.TYPED_ARRAY_SUPPORT = false; -var Buffer = require('../../').Buffer; -var common = {}; -var assert = require('assert'); - -var buffer = new Buffer([1, 2, 3, 4, 5]); -var arr; -var b; - -// buffers should be iterable - -arr = []; - -for (b of buffer) - arr.push(b); - -assert.deepEqual(arr, [1, 2, 3, 4, 5]); - - -// buffer iterators should be iterable - -arr = []; - -for (b of buffer[Symbol.iterator]()) - arr.push(b); - -assert.deepEqual(arr, [1, 2, 3, 4, 5]); - - -// buffer#values() should return iterator for values - -arr = []; - -for (b of buffer.values()) - arr.push(b); - -assert.deepEqual(arr, [1, 2, 3, 4, 5]); - - -// buffer#keys() should return iterator for keys - -arr = []; - -for (b of buffer.keys()) - arr.push(b); - -assert.deepEqual(arr, [0, 1, 2, 3, 4]); - - -// buffer#entries() should return iterator for entries - -arr = []; - -for (var b of buffer.entries()) - arr.push(b); - -assert.deepEqual(arr, [ - [0, 1], - [1, 2], - [2, 3], - [3, 4], - [4, 5] -]); - diff --git a/node_modules/browserify/node_modules/buffer/test/node/README.txt b/node_modules/browserify/node_modules/buffer/test/node/README.txt deleted file mode 100644 index a0fd927f..00000000 --- a/node_modules/browserify/node_modules/buffer/test/node/README.txt +++ /dev/null @@ -1 +0,0 @@ -node core buffer tests diff --git a/node_modules/browserify/node_modules/buffer/test/node/test-buffer-ascii.js b/node_modules/browserify/node_modules/buffer/test/node/test-buffer-ascii.js deleted file mode 100644 index 633a6779..00000000 --- a/node_modules/browserify/node_modules/buffer/test/node/test-buffer-ascii.js +++ /dev/null @@ -1,28 +0,0 @@ -'use strict'; -if (process.env.OBJECT_IMPL) global.TYPED_ARRAY_SUPPORT = false; -var Buffer = require('../../').Buffer; -var common = {}; -var assert = require('assert'); - -// ASCII conversion in node.js simply masks off the high bits, -// it doesn't do transliteration. -assert.equal(Buffer('hérité').toString('ascii'), 'hC)ritC)'); - -// 71 characters, 78 bytes. The ’ character is a triple-byte sequence. -var input = 'C’est, graphiquement, la réunion d’un accent aigu ' + - 'et d’un accent grave.'; - -var expected = 'Cb\u0000\u0019est, graphiquement, la rC)union ' + - 'db\u0000\u0019un accent aigu et db\u0000\u0019un ' + - 'accent grave.'; - -var buf = Buffer(input); - -for (var i = 0; i < expected.length; ++i) { - assert.equal(buf.slice(i).toString('ascii'), expected.slice(i)); - - // Skip remainder of multi-byte sequence. - if (input.charCodeAt(i) > 65535) ++i; - if (input.charCodeAt(i) > 127) ++i; -} - diff --git a/node_modules/browserify/node_modules/buffer/test/node/test-buffer-bytelength.js b/node_modules/browserify/node_modules/buffer/test/node/test-buffer-bytelength.js deleted file mode 100644 index d63922e9..00000000 --- a/node_modules/browserify/node_modules/buffer/test/node/test-buffer-bytelength.js +++ /dev/null @@ -1,49 +0,0 @@ -'use strict'; -if (process.env.OBJECT_IMPL) global.TYPED_ARRAY_SUPPORT = false; -var Buffer = require('../../').Buffer; - -var common = {}; -var assert = require('assert'); -var Buffer = require('../../').Buffer; - -// coerce values to string -assert.equal(Buffer.byteLength(32, 'raw'), 2); -assert.equal(Buffer.byteLength(NaN, 'utf8'), 3); -assert.equal(Buffer.byteLength({}, 'raws'), 15); -assert.equal(Buffer.byteLength(), 9); - -// special case: zero length string -assert.equal(Buffer.byteLength('', 'ascii'), 0); -assert.equal(Buffer.byteLength('', 'HeX'), 0); - -// utf8 -assert.equal(Buffer.byteLength('∑éllö wørl∂!', 'utf-8'), 19); -assert.equal(Buffer.byteLength('κλμνξο', 'utf8'), 12); -assert.equal(Buffer.byteLength('挵挶挷挸挹', 'utf-8'), 15); -assert.equal(Buffer.byteLength('𠝹𠱓𠱸', 'UTF8'), 12); -// without an encoding, utf8 should be assumed -assert.equal(Buffer.byteLength('hey there'), 9); -assert.equal(Buffer.byteLength('𠱸挶νξ#xx :)'), 17); -assert.equal(Buffer.byteLength('hello world', ''), 11); -// it should also be assumed with unrecognized encoding -assert.equal(Buffer.byteLength('hello world', 'abc'), 11); -assert.equal(Buffer.byteLength('ßœ∑≈', 'unkn0wn enc0ding'), 10); - -// base64 -assert.equal(Buffer.byteLength('aGVsbG8gd29ybGQ=', 'base64'), 11); -assert.equal(Buffer.byteLength('bm9kZS5qcyByb2NrcyE=', 'base64'), 14); -assert.equal(Buffer.byteLength('aGkk', 'base64'), 3); -assert.equal(Buffer.byteLength('bHNrZGZsa3NqZmtsc2xrZmFqc2RsZmtqcw==', - 'base64'), 25); -// special padding -assert.equal(Buffer.byteLength('aaa=', 'base64'), 2); -assert.equal(Buffer.byteLength('aaaa==', 'base64'), 3); - -assert.equal(Buffer.byteLength('Il était tué'), 14); -assert.equal(Buffer.byteLength('Il était tué', 'utf8'), 14); -assert.equal(Buffer.byteLength('Il était tué', 'ascii'), 12); -assert.equal(Buffer.byteLength('Il était tué', 'binary'), 12); -['ucs2', 'ucs-2', 'utf16le', 'utf-16le'].forEach(function(encoding) { - assert.equal(24, Buffer.byteLength('Il était tué', encoding)); -}); - diff --git a/node_modules/browserify/node_modules/buffer/test/node/test-buffer-concat.js b/node_modules/browserify/node_modules/buffer/test/node/test-buffer-concat.js deleted file mode 100644 index f6b60ae8..00000000 --- a/node_modules/browserify/node_modules/buffer/test/node/test-buffer-concat.js +++ /dev/null @@ -1,30 +0,0 @@ -'use strict'; -if (process.env.OBJECT_IMPL) global.TYPED_ARRAY_SUPPORT = false; -var Buffer = require('../../').Buffer; -var common = {}; -var assert = require('assert'); - -var zero = []; -var one = [ new Buffer('asdf') ]; -var long = []; -for (var i = 0; i < 10; i++) long.push(new Buffer('asdf')); - -var flatZero = Buffer.concat(zero); -var flatOne = Buffer.concat(one); -var flatLong = Buffer.concat(long); -var flatLongLen = Buffer.concat(long, 40); - -assert(flatZero.length === 0); -assert(flatOne.toString() === 'asdf'); -// A special case where concat used to return the first item, -// if the length is one. This check is to make sure that we don't do that. -assert(flatOne !== one[0]); -assert(flatLong.toString() === (new Array(10 + 1).join('asdf'))); -assert(flatLongLen.toString() === (new Array(10 + 1).join('asdf'))); - -assert.throws(function() { - Buffer.concat([42]); -}, TypeError); - -// console.log('ok'); - diff --git a/node_modules/browserify/node_modules/buffer/test/node/test-buffer-indexof.js b/node_modules/browserify/node_modules/buffer/test/node/test-buffer-indexof.js deleted file mode 100644 index 283b9c8b..00000000 --- a/node_modules/browserify/node_modules/buffer/test/node/test-buffer-indexof.js +++ /dev/null @@ -1,79 +0,0 @@ -'use strict'; -if (process.env.OBJECT_IMPL) global.TYPED_ARRAY_SUPPORT = false; -var Buffer = require('../../').Buffer; -var common = {}; -var assert = require('assert'); - -var Buffer = require('../../').Buffer; - -var b = new Buffer('abcdef'); -var buf_a = new Buffer('a'); -var buf_bc = new Buffer('bc'); -var buf_f = new Buffer('f'); -var buf_z = new Buffer('z'); -var buf_empty = new Buffer(''); - -assert.equal(b.indexOf('a'), 0); -assert.equal(b.indexOf('a', 1), -1); -assert.equal(b.indexOf('a', -1), -1); -assert.equal(b.indexOf('a', -4), -1); -assert.equal(b.indexOf('a', -b.length), 0); -assert.equal(b.indexOf('a', NaN), 0); -assert.equal(b.indexOf('a', -Infinity), 0); -assert.equal(b.indexOf('a', Infinity), -1); -assert.equal(b.indexOf('bc'), 1); -assert.equal(b.indexOf('bc', 2), -1); -assert.equal(b.indexOf('bc', -1), -1); -assert.equal(b.indexOf('bc', -3), -1); -assert.equal(b.indexOf('bc', -5), 1); -assert.equal(b.indexOf('bc', NaN), 1); -assert.equal(b.indexOf('bc', -Infinity), 1); -assert.equal(b.indexOf('bc', Infinity), -1); -assert.equal(b.indexOf('f'), b.length - 1); -assert.equal(b.indexOf('z'), -1); -assert.equal(b.indexOf(''), -1); -assert.equal(b.indexOf('', 1), -1); -assert.equal(b.indexOf('', b.length + 1), -1); -assert.equal(b.indexOf('', Infinity), -1); -assert.equal(b.indexOf(buf_a), 0); -assert.equal(b.indexOf(buf_a, 1), -1); -assert.equal(b.indexOf(buf_a, -1), -1); -assert.equal(b.indexOf(buf_a, -4), -1); -assert.equal(b.indexOf(buf_a, -b.length), 0); -assert.equal(b.indexOf(buf_a, NaN), 0); -assert.equal(b.indexOf(buf_a, -Infinity), 0); -assert.equal(b.indexOf(buf_a, Infinity), -1); -assert.equal(b.indexOf(buf_bc), 1); -assert.equal(b.indexOf(buf_bc, 2), -1); -assert.equal(b.indexOf(buf_bc, -1), -1); -assert.equal(b.indexOf(buf_bc, -3), -1); -assert.equal(b.indexOf(buf_bc, -5), 1); -assert.equal(b.indexOf(buf_bc, NaN), 1); -assert.equal(b.indexOf(buf_bc, -Infinity), 1); -assert.equal(b.indexOf(buf_bc, Infinity), -1); -assert.equal(b.indexOf(buf_f), b.length - 1); -assert.equal(b.indexOf(buf_z), -1); -assert.equal(b.indexOf(buf_empty), -1); -assert.equal(b.indexOf(buf_empty, 1), -1); -assert.equal(b.indexOf(buf_empty, b.length + 1), -1); -assert.equal(b.indexOf(buf_empty, Infinity), -1); -assert.equal(b.indexOf(0x61), 0); -assert.equal(b.indexOf(0x61, 1), -1); -assert.equal(b.indexOf(0x61, -1), -1); -assert.equal(b.indexOf(0x61, -4), -1); -assert.equal(b.indexOf(0x61, -b.length), 0); -assert.equal(b.indexOf(0x61, NaN), 0); -assert.equal(b.indexOf(0x61, -Infinity), 0); -assert.equal(b.indexOf(0x61, Infinity), -1); -assert.equal(b.indexOf(0x0), -1); - -assert.throws(function() { - b.indexOf(function() { }); -}); -assert.throws(function() { - b.indexOf({}); -}); -assert.throws(function() { - b.indexOf([]); -}); - diff --git a/node_modules/browserify/node_modules/buffer/test/node/test-buffer-inspect.js b/node_modules/browserify/node_modules/buffer/test/node/test-buffer-inspect.js deleted file mode 100644 index 719444f3..00000000 --- a/node_modules/browserify/node_modules/buffer/test/node/test-buffer-inspect.js +++ /dev/null @@ -1,41 +0,0 @@ -'use strict'; -if (process.env.OBJECT_IMPL) global.TYPED_ARRAY_SUPPORT = false; -var Buffer = require('../../').Buffer; -var common = {}; -var assert = require('assert'); - -var util = require('util'); - -var buffer = require('../../'); - -buffer.INSPECT_MAX_BYTES = 2; - -var b = new Buffer(4); -b.fill('1234'); - -var s = new buffer.SlowBuffer(4); -s.fill('1234'); - -var expected = ''; - -assert.strictEqual(util.inspect(b), expected); -assert.strictEqual(util.inspect(s), expected); - -b = new Buffer(2); -b.fill('12'); - -s = new buffer.SlowBuffer(2); -s.fill('12'); - -expected = ''; - -assert.strictEqual(util.inspect(b), expected); -assert.strictEqual(util.inspect(s), expected); - -buffer.INSPECT_MAX_BYTES = Infinity; - -assert.doesNotThrow(function() { - assert.strictEqual(util.inspect(b), expected); - assert.strictEqual(util.inspect(s), expected); -}); - diff --git a/node_modules/browserify/node_modules/buffer/test/node/test-buffer.js b/node_modules/browserify/node_modules/buffer/test/node/test-buffer.js deleted file mode 100644 index d6468f6a..00000000 --- a/node_modules/browserify/node_modules/buffer/test/node/test-buffer.js +++ /dev/null @@ -1,1194 +0,0 @@ -'use strict'; -if (process.env.OBJECT_IMPL) global.TYPED_ARRAY_SUPPORT = false; -var Buffer = require('../../').Buffer; -var common = {}; -var assert = require('assert'); - -var Buffer = require('../../').Buffer; -var SlowBuffer = require('../../').SlowBuffer; - -// counter to ensure unique value is always copied -var cntr = 0; - -var b = Buffer(1024); // safe constructor - -// console.log('b.length == %d', b.length); -assert.strictEqual(1024, b.length); - -b[0] = 255; -assert.strictEqual(b[0], 255); - -for (var i = 0; i < 1024; i++) { - b[i] = i % 256; -} - -for (var i = 0; i < 1024; i++) { - assert.strictEqual(i % 256, b[i]); -} - -var c = new Buffer(512); -// console.log('c.length == %d', c.length); -assert.strictEqual(512, c.length); - -// First check Buffer#fill() works as expected. - -assert.throws(function() { - Buffer(8).fill('a', -1); -}); - -assert.throws(function() { - Buffer(8).fill('a', 0, 9); -}); - -// Make sure this doesn't hang indefinitely. -Buffer(8).fill(''); - -var buf = new Buffer(64); -buf.fill(10); -for (var i = 0; i < buf.length; i++) - assert.equal(buf[i], 10); - -buf.fill(11, 0, buf.length >> 1); -for (var i = 0; i < buf.length >> 1; i++) - assert.equal(buf[i], 11); -for (var i = (buf.length >> 1) + 1; i < buf.length; i++) - assert.equal(buf[i], 10); - -buf.fill('h'); -for (var i = 0; i < buf.length; i++) - assert.equal('h'.charCodeAt(0), buf[i]); - -buf.fill(0); -for (var i = 0; i < buf.length; i++) - assert.equal(0, buf[i]); - -buf.fill(null); -for (var i = 0; i < buf.length; i++) - assert.equal(0, buf[i]); - -buf.fill(1, 16, 32); -for (var i = 0; i < 16; i++) - assert.equal(0, buf[i]); -for (; i < 32; i++) - assert.equal(1, buf[i]); -for (; i < buf.length; i++) - assert.equal(0, buf[i]); - -var buf = new Buffer(10); -buf.fill('abc'); -assert.equal(buf.toString(), 'abcabcabca'); -buf.fill('է'); -assert.equal(buf.toString(), 'էէէէէ'); - -// copy 512 bytes, from 0 to 512. -b.fill(++cntr); -c.fill(++cntr); -var copied = b.copy(c, 0, 0, 512); -// console.log('copied %d bytes from b into c', copied); -assert.strictEqual(512, copied); -for (var i = 0; i < c.length; i++) { - assert.strictEqual(b[i], c[i]); -} - -// copy c into b, without specifying sourceEnd -b.fill(++cntr); -c.fill(++cntr); -var copied = c.copy(b, 0, 0); -// console.log('copied %d bytes from c into b w/o sourceEnd', copied); -assert.strictEqual(c.length, copied); -for (var i = 0; i < c.length; i++) { - assert.strictEqual(c[i], b[i]); -} - -// copy c into b, without specifying sourceStart -b.fill(++cntr); -c.fill(++cntr); -var copied = c.copy(b, 0); -// console.log('copied %d bytes from c into b w/o sourceStart', copied); -assert.strictEqual(c.length, copied); -for (var i = 0; i < c.length; i++) { - assert.strictEqual(c[i], b[i]); -} - -// copy longer buffer b to shorter c without targetStart -b.fill(++cntr); -c.fill(++cntr); -var copied = b.copy(c); -// console.log('copied %d bytes from b into c w/o targetStart', copied); -assert.strictEqual(c.length, copied); -for (var i = 0; i < c.length; i++) { - assert.strictEqual(b[i], c[i]); -} - -// copy starting near end of b to c -b.fill(++cntr); -c.fill(++cntr); -var copied = b.copy(c, 0, b.length - Math.floor(c.length / 2)); -// console.log('copied %d bytes from end of b into beginning of c', copied); -assert.strictEqual(Math.floor(c.length / 2), copied); -for (var i = 0; i < Math.floor(c.length / 2); i++) { - assert.strictEqual(b[b.length - Math.floor(c.length / 2) + i], c[i]); -} -for (var i = Math.floor(c.length / 2) + 1; i < c.length; i++) { - assert.strictEqual(c[c.length - 1], c[i]); -} - -// try to copy 513 bytes, and check we don't overrun c -b.fill(++cntr); -c.fill(++cntr); -var copied = b.copy(c, 0, 0, 513); -// console.log('copied %d bytes from b trying to overrun c', copied); -assert.strictEqual(c.length, copied); -for (var i = 0; i < c.length; i++) { - assert.strictEqual(b[i], c[i]); -} - -// copy 768 bytes from b into b -b.fill(++cntr); -b.fill(++cntr, 256); -var copied = b.copy(b, 0, 256, 1024); -// console.log('copied %d bytes from b into b', copied); -assert.strictEqual(768, copied); -for (var i = 0; i < b.length; i++) { - assert.strictEqual(cntr, b[i]); -} - -// copy string longer than buffer length (failure will segfault) -var bb = new Buffer(10); -bb.fill('hello crazy world'); - - -var caught_error = null; - -// try to copy from before the beginning of b -caught_error = null; -try { - var copied = b.copy(c, 0, 100, 10); -} catch (err) { - caught_error = err; -} - -// copy throws at negative sourceStart -assert.throws(function() { - Buffer(5).copy(Buffer(5), 0, -1); -}, RangeError); - -// check sourceEnd resets to targetEnd if former is greater than the latter -b.fill(++cntr); -c.fill(++cntr); -var copied = b.copy(c, 0, 0, 1025); -// console.log('copied %d bytes from b into c', copied); -for (var i = 0; i < c.length; i++) { - assert.strictEqual(b[i], c[i]); -} - -// throw with negative sourceEnd -// console.log('test copy at negative sourceEnd'); -assert.throws(function() { - b.copy(c, 0, 0, -1); -}, RangeError); - -// when sourceStart is greater than sourceEnd, zero copied -assert.equal(b.copy(c, 0, 100, 10), 0); - -// when targetStart > targetLength, zero copied -assert.equal(b.copy(c, 512, 0, 10), 0); - -var caught_error; - -// invalid encoding for Buffer.toString -caught_error = null; -try { - var copied = b.toString('invalid'); -} catch (err) { - caught_error = err; -} -assert.strictEqual('Unknown encoding: invalid', caught_error.message); - -// invalid encoding for Buffer.write -caught_error = null; -try { - var copied = b.write('test string', 0, 5, 'invalid'); -} catch (err) { - caught_error = err; -} -assert.strictEqual('Unknown encoding: invalid', caught_error.message); - -// try to create 0-length buffers -new Buffer(''); -new Buffer('', 'ascii'); -new Buffer('', 'binary'); -new Buffer(0); - -// try to write a 0-length string beyond the end of b -assert.throws(function() { - b.write('', 2048); -}, RangeError); - -// throw when writing to negative offset -assert.throws(function() { - b.write('a', -1); -}, RangeError); - -// throw when writing past bounds from the pool -assert.throws(function() { - b.write('a', 2048); -}, RangeError); - -// throw when writing to negative offset -assert.throws(function() { - b.write('a', -1); -}, RangeError); - -// try to copy 0 bytes worth of data into an empty buffer -b.copy(new Buffer(0), 0, 0, 0); - -// try to copy 0 bytes past the end of the target buffer -b.copy(new Buffer(0), 1, 1, 1); -b.copy(new Buffer(1), 1, 1, 1); - -// try to copy 0 bytes from past the end of the source buffer -b.copy(new Buffer(1), 0, 2048, 2048); - -// try to toString() a 0-length slice of a buffer, both within and without the -// valid buffer range -assert.equal(new Buffer('abc').toString('ascii', 0, 0), ''); -assert.equal(new Buffer('abc').toString('ascii', -100, -100), ''); -assert.equal(new Buffer('abc').toString('ascii', 100, 100), ''); - -// try toString() with a object as a encoding -assert.equal(new Buffer('abc').toString({toString: function() { - return 'ascii'; -}}), 'abc'); - -// testing for smart defaults and ability to pass string values as offset -var writeTest = new Buffer('abcdes'); -writeTest.write('n', 'ascii'); -writeTest.write('o', 'ascii', '1'); -writeTest.write('d', '2', 'ascii'); -writeTest.write('e', 3, 'ascii'); -writeTest.write('j', 'ascii', 4); -assert.equal(writeTest.toString(), 'nodejs'); - -// ASCII slice test - -var asciiString = 'hello world'; -var offset = 100; - -for (var i = 0; i < asciiString.length; i++) { - b[i] = asciiString.charCodeAt(i); -} -var asciiSlice = b.toString('ascii', 0, asciiString.length); -assert.equal(asciiString, asciiSlice); - -var written = b.write(asciiString, offset, 'ascii'); -assert.equal(asciiString.length, written); -var asciiSlice = b.toString('ascii', offset, offset + asciiString.length); -assert.equal(asciiString, asciiSlice); - -var sliceA = b.slice(offset, offset + asciiString.length); -var sliceB = b.slice(offset, offset + asciiString.length); -for (var i = 0; i < asciiString.length; i++) { - assert.equal(sliceA[i], sliceB[i]); -} - -// UTF-8 slice test - -var utf8String = '¡hέlló wôrld!'; -var offset = 100; - -b.write(utf8String, 0, Buffer.byteLength(utf8String), 'utf8'); -var utf8Slice = b.toString('utf8', 0, Buffer.byteLength(utf8String)); -assert.equal(utf8String, utf8Slice); - -var written = b.write(utf8String, offset, 'utf8'); -assert.equal(Buffer.byteLength(utf8String), written); -utf8Slice = b.toString('utf8', offset, offset + Buffer.byteLength(utf8String)); -assert.equal(utf8String, utf8Slice); - -var sliceA = b.slice(offset, offset + Buffer.byteLength(utf8String)); -var sliceB = b.slice(offset, offset + Buffer.byteLength(utf8String)); -for (var i = 0; i < Buffer.byteLength(utf8String); i++) { - assert.equal(sliceA[i], sliceB[i]); -} - -var slice = b.slice(100, 150); -assert.equal(50, slice.length); -for (var i = 0; i < 50; i++) { - assert.equal(b[100 + i], slice[i]); -} - - -// make sure only top level parent propagates from allocPool -var b = new Buffer(5); -var c = b.slice(0, 4); -var d = c.slice(0, 2); -assert.equal(b.parent, c.parent); -assert.equal(b.parent, d.parent); - -// also from a non-pooled instance -var b = new SlowBuffer(5); -var c = b.slice(0, 4); -var d = c.slice(0, 2); - - -// Bug regression test -var testValue = '\u00F6\u65E5\u672C\u8A9E'; // ö日本語 -var buffer = new Buffer(32); -var size = buffer.write(testValue, 0, 'utf8'); -// console.log('bytes written to buffer: ' + size); -var slice = buffer.toString('utf8', 0, size); -assert.equal(slice, testValue); - - -// Test triple slice -var a = new Buffer(8); -for (var i = 0; i < 8; i++) a[i] = i; -var b = a.slice(4, 8); -assert.equal(4, b[0]); -assert.equal(5, b[1]); -assert.equal(6, b[2]); -assert.equal(7, b[3]); -var c = b.slice(2, 4); -assert.equal(6, c[0]); -assert.equal(7, c[1]); - - -var d = new Buffer([23, 42, 255]); -assert.equal(d.length, 3); -assert.equal(d[0], 23); -assert.equal(d[1], 42); -assert.equal(d[2], 255); -assert.deepEqual(d, new Buffer(d)); - -var e = new Buffer('über'); -// console.error('uber: \'%s\'', e.toString()); -assert.deepEqual(e, new Buffer([195, 188, 98, 101, 114])); - -var f = new Buffer('über', 'ascii'); -// console.error('f.length: %d (should be 4)', f.length); -assert.deepEqual(f, new Buffer([252, 98, 101, 114])); - -['ucs2', 'ucs-2', 'utf16le', 'utf-16le'].forEach(function(encoding) { - var f = new Buffer('über', encoding); -// console.error('f.length: %d (should be 8)', f.length); - assert.deepEqual(f, new Buffer([252, 0, 98, 0, 101, 0, 114, 0])); - - var f = new Buffer('привет', encoding); -// console.error('f.length: %d (should be 12)', f.length); - assert.deepEqual(f, new Buffer([63, 4, 64, 4, 56, 4, 50, 4, 53, 4, 66, 4])); - assert.equal(f.toString(encoding), 'привет'); - - var f = new Buffer([0, 0, 0, 0, 0]); - assert.equal(f.length, 5); - var size = f.write('あいうえお', encoding); -// console.error('bytes written to buffer: %d (should be 4)', size); - assert.equal(size, 4); - assert.deepEqual(f, new Buffer([0x42, 0x30, 0x44, 0x30, 0x00])); -}); - -var f = new Buffer('\uD83D\uDC4D', 'utf-16le'); // THUMBS UP SIGN (U+1F44D) -assert.equal(f.length, 4); -assert.deepEqual(f, new Buffer('3DD84DDC', 'hex')); - - -var arrayIsh = {0: 0, 1: 1, 2: 2, 3: 3, length: 4}; -var g = new Buffer(arrayIsh); -assert.deepEqual(g, new Buffer([0, 1, 2, 3])); -var strArrayIsh = {0: '0', 1: '1', 2: '2', 3: '3', length: 4}; -g = new Buffer(strArrayIsh); -assert.deepEqual(g, new Buffer([0, 1, 2, 3])); - - -// -// Test toString('base64') -// -assert.equal('TWFu', (new Buffer('Man')).toString('base64')); - -// test that regular and URL-safe base64 both work -var expected = [0xff, 0xff, 0xbe, 0xff, 0xef, 0xbf, 0xfb, 0xef, 0xff]; -assert.deepEqual(Buffer('//++/++/++//', 'base64'), Buffer(expected)); -assert.deepEqual(Buffer('__--_--_--__', 'base64'), Buffer(expected)); - -// big example -var quote = 'Man is distinguished, not only by his reason, but by this ' + - 'singular passion from other animals, which is a lust ' + - 'of the mind, that by a perseverance of delight in the continued ' + - 'and indefatigable generation of knowledge, exceeds the short ' + - 'vehemence of any carnal pleasure.'; -var expected = 'TWFuIGlzIGRpc3Rpbmd1aXNoZWQsIG5vdCBvbmx5IGJ5IGhpcyByZWFzb24s' + - 'IGJ1dCBieSB0aGlzIHNpbmd1bGFyIHBhc3Npb24gZnJvbSBvdGhlciBhbmltY' + - 'WxzLCB3aGljaCBpcyBhIGx1c3Qgb2YgdGhlIG1pbmQsIHRoYXQgYnkgYSBwZX' + - 'JzZXZlcmFuY2Ugb2YgZGVsaWdodCBpbiB0aGUgY29udGludWVkIGFuZCBpbmR' + - 'lZmF0aWdhYmxlIGdlbmVyYXRpb24gb2Yga25vd2xlZGdlLCBleGNlZWRzIHRo' + - 'ZSBzaG9ydCB2ZWhlbWVuY2Ugb2YgYW55IGNhcm5hbCBwbGVhc3VyZS4='; -assert.equal(expected, (new Buffer(quote)).toString('base64')); - - -b = new Buffer(1024); -var bytesWritten = b.write(expected, 0, 'base64'); -assert.equal(quote.length, bytesWritten); -assert.equal(quote, b.toString('ascii', 0, quote.length)); - -// check that the base64 decoder ignores whitespace -var expectedWhite = expected.slice(0, 60) + ' \n' + - expected.slice(60, 120) + ' \n' + - expected.slice(120, 180) + ' \n' + - expected.slice(180, 240) + ' \n' + - expected.slice(240, 300) + '\n' + - expected.slice(300, 360) + '\n'; -b = new Buffer(1024); -bytesWritten = b.write(expectedWhite, 0, 'base64'); -assert.equal(quote.length, bytesWritten); -assert.equal(quote, b.toString('ascii', 0, quote.length)); - -// check that the base64 decoder on the constructor works -// even in the presence of whitespace. -b = new Buffer(expectedWhite, 'base64'); -assert.equal(quote.length, b.length); -assert.equal(quote, b.toString('ascii', 0, quote.length)); - -// check that the base64 decoder ignores illegal chars -var expectedIllegal = expected.slice(0, 60) + ' \x80' + - expected.slice(60, 120) + ' \xff' + - expected.slice(120, 180) + ' \x00' + - expected.slice(180, 240) + ' \x98' + - expected.slice(240, 300) + '\x03' + - expected.slice(300, 360); -b = new Buffer(expectedIllegal, 'base64'); -assert.equal(quote.length, b.length); -assert.equal(quote, b.toString('ascii', 0, quote.length)); - - -assert.equal(new Buffer('', 'base64').toString(), ''); -assert.equal(new Buffer('K', 'base64').toString(), ''); - -// multiple-of-4 with padding -assert.equal(new Buffer('Kg==', 'base64').toString(), '*'); -assert.equal(new Buffer('Kio=', 'base64').toString(), '**'); -assert.equal(new Buffer('Kioq', 'base64').toString(), '***'); -assert.equal(new Buffer('KioqKg==', 'base64').toString(), '****'); -assert.equal(new Buffer('KioqKio=', 'base64').toString(), '*****'); -assert.equal(new Buffer('KioqKioq', 'base64').toString(), '******'); -assert.equal(new Buffer('KioqKioqKg==', 'base64').toString(), '*******'); -assert.equal(new Buffer('KioqKioqKio=', 'base64').toString(), '********'); -assert.equal(new Buffer('KioqKioqKioq', 'base64').toString(), '*********'); -assert.equal(new Buffer('KioqKioqKioqKg==', 'base64').toString(), - '**********'); -assert.equal(new Buffer('KioqKioqKioqKio=', 'base64').toString(), - '***********'); -assert.equal(new Buffer('KioqKioqKioqKioq', 'base64').toString(), - '************'); -assert.equal(new Buffer('KioqKioqKioqKioqKg==', 'base64').toString(), - '*************'); -assert.equal(new Buffer('KioqKioqKioqKioqKio=', 'base64').toString(), - '**************'); -assert.equal(new Buffer('KioqKioqKioqKioqKioq', 'base64').toString(), - '***************'); -assert.equal(new Buffer('KioqKioqKioqKioqKioqKg==', 'base64').toString(), - '****************'); -assert.equal(new Buffer('KioqKioqKioqKioqKioqKio=', 'base64').toString(), - '*****************'); -assert.equal(new Buffer('KioqKioqKioqKioqKioqKioq', 'base64').toString(), - '******************'); -assert.equal(new Buffer('KioqKioqKioqKioqKioqKioqKg==', 'base64').toString(), - '*******************'); -assert.equal(new Buffer('KioqKioqKioqKioqKioqKioqKio=', 'base64').toString(), - '********************'); - -// no padding, not a multiple of 4 -assert.equal(new Buffer('Kg', 'base64').toString(), '*'); -assert.equal(new Buffer('Kio', 'base64').toString(), '**'); -assert.equal(new Buffer('KioqKg', 'base64').toString(), '****'); -assert.equal(new Buffer('KioqKio', 'base64').toString(), '*****'); -assert.equal(new Buffer('KioqKioqKg', 'base64').toString(), '*******'); -assert.equal(new Buffer('KioqKioqKio', 'base64').toString(), '********'); -assert.equal(new Buffer('KioqKioqKioqKg', 'base64').toString(), '**********'); -assert.equal(new Buffer('KioqKioqKioqKio', 'base64').toString(), '***********'); -assert.equal(new Buffer('KioqKioqKioqKioqKg', 'base64').toString(), - '*************'); -assert.equal(new Buffer('KioqKioqKioqKioqKio', 'base64').toString(), - '**************'); -assert.equal(new Buffer('KioqKioqKioqKioqKioqKg', 'base64').toString(), - '****************'); -assert.equal(new Buffer('KioqKioqKioqKioqKioqKio', 'base64').toString(), - '*****************'); -assert.equal(new Buffer('KioqKioqKioqKioqKioqKioqKg', 'base64').toString(), - '*******************'); -assert.equal(new Buffer('KioqKioqKioqKioqKioqKioqKio', 'base64').toString(), - '********************'); - -// handle padding graciously, multiple-of-4 or not -assert.equal(new Buffer('72INjkR5fchcxk9+VgdGPFJDxUBFR5/rMFsghgxADiw==', - 'base64').length, 32); -assert.equal(new Buffer('72INjkR5fchcxk9+VgdGPFJDxUBFR5/rMFsghgxADiw=', - 'base64').length, 32); -assert.equal(new Buffer('72INjkR5fchcxk9+VgdGPFJDxUBFR5/rMFsghgxADiw', - 'base64').length, 32); -assert.equal(new Buffer('w69jACy6BgZmaFvv96HG6MYksWytuZu3T1FvGnulPg==', - 'base64').length, 31); -assert.equal(new Buffer('w69jACy6BgZmaFvv96HG6MYksWytuZu3T1FvGnulPg=', - 'base64').length, 31); -assert.equal(new Buffer('w69jACy6BgZmaFvv96HG6MYksWytuZu3T1FvGnulPg', - 'base64').length, 31); - -// This string encodes single '.' character in UTF-16 -var dot = new Buffer('//4uAA==', 'base64'); -assert.equal(dot[0], 0xff); -assert.equal(dot[1], 0xfe); -assert.equal(dot[2], 0x2e); -assert.equal(dot[3], 0x00); -assert.equal(dot.toString('base64'), '//4uAA=='); - -// Writing base64 at a position > 0 should not mangle the result. -// -// https://github.com/joyent/node/issues/402 -var segments = ['TWFkbmVzcz8h', 'IFRoaXM=', 'IGlz', 'IG5vZGUuanMh']; -var buf = new Buffer(64); -var pos = 0; - -for (var i = 0; i < segments.length; ++i) { - pos += b.write(segments[i], pos, 'base64'); -} -assert.equal(b.toString('binary', 0, pos), 'Madness?! This is node.js!'); - -// Creating buffers larger than pool size. -var l = Buffer.poolSize + 5; -var s = ''; -for (i = 0; i < l; i++) { - s += 'h'; -} - -var b = new Buffer(s); - -for (i = 0; i < l; i++) { - assert.equal('h'.charCodeAt(0), b[i]); -} - -var sb = b.toString(); -assert.equal(sb.length, s.length); -assert.equal(sb, s); - - -// Single argument slice -b = new Buffer('abcde'); -assert.equal('bcde', b.slice(1).toString()); - -// slice(0,0).length === 0 -assert.equal(0, Buffer('hello').slice(0, 0).length); - -// test hex toString -// console.log('Create hex string from buffer'); -var hexb = new Buffer(256); -for (var i = 0; i < 256; i++) { - hexb[i] = i; -} -var hexStr = hexb.toString('hex'); -assert.equal(hexStr, - '000102030405060708090a0b0c0d0e0f' + - '101112131415161718191a1b1c1d1e1f' + - '202122232425262728292a2b2c2d2e2f' + - '303132333435363738393a3b3c3d3e3f' + - '404142434445464748494a4b4c4d4e4f' + - '505152535455565758595a5b5c5d5e5f' + - '606162636465666768696a6b6c6d6e6f' + - '707172737475767778797a7b7c7d7e7f' + - '808182838485868788898a8b8c8d8e8f' + - '909192939495969798999a9b9c9d9e9f' + - 'a0a1a2a3a4a5a6a7a8a9aaabacadaeaf' + - 'b0b1b2b3b4b5b6b7b8b9babbbcbdbebf' + - 'c0c1c2c3c4c5c6c7c8c9cacbcccdcecf' + - 'd0d1d2d3d4d5d6d7d8d9dadbdcdddedf' + - 'e0e1e2e3e4e5e6e7e8e9eaebecedeeef' + - 'f0f1f2f3f4f5f6f7f8f9fafbfcfdfeff'); - -// console.log('Create buffer from hex string'); -var hexb2 = new Buffer(hexStr, 'hex'); -for (var i = 0; i < 256; i++) { - assert.equal(hexb2[i], hexb[i]); -} - -// test an invalid slice end. -// console.log('Try to slice off the end of the buffer'); -var b = new Buffer([1, 2, 3, 4, 5]); -var b2 = b.toString('hex', 1, 10000); -var b3 = b.toString('hex', 1, 5); -var b4 = b.toString('hex', 1); -assert.equal(b2, b3); -assert.equal(b2, b4); - - -function buildBuffer(data) { - if (Array.isArray(data)) { - var buffer = new Buffer(data.length); - data.forEach(function(v, k) { - buffer[k] = v; - }); - return buffer; - } - return null; -} - -var x = buildBuffer([0x81, 0xa3, 0x66, 0x6f, 0x6f, 0xa3, 0x62, 0x61, 0x72]); - -// console.log(x.inspect()); -assert.equal('', x.inspect()); - -var z = x.slice(4); -// console.log(z.inspect()); -// console.log(z.length); -assert.equal(5, z.length); -assert.equal(0x6f, z[0]); -assert.equal(0xa3, z[1]); -assert.equal(0x62, z[2]); -assert.equal(0x61, z[3]); -assert.equal(0x72, z[4]); - -var z = x.slice(0); -// console.log(z.inspect()); -// console.log(z.length); -assert.equal(z.length, x.length); - -var z = x.slice(0, 4); -// console.log(z.inspect()); -// console.log(z.length); -assert.equal(4, z.length); -assert.equal(0x81, z[0]); -assert.equal(0xa3, z[1]); - -var z = x.slice(0, 9); -// console.log(z.inspect()); -// console.log(z.length); -assert.equal(9, z.length); - -var z = x.slice(1, 4); -// console.log(z.inspect()); -// console.log(z.length); -assert.equal(3, z.length); -assert.equal(0xa3, z[0]); - -var z = x.slice(2, 4); -// console.log(z.inspect()); -// console.log(z.length); -assert.equal(2, z.length); -assert.equal(0x66, z[0]); -assert.equal(0x6f, z[1]); - -assert.equal(0, Buffer('hello').slice(0, 0).length); - -['ucs2', 'ucs-2', 'utf16le', 'utf-16le'].forEach(function(encoding) { - var b = new Buffer(10); - b.write('あいうえお', encoding); - assert.equal(b.toString(encoding), 'あいうえお'); -}); - -// Binary encoding should write only one byte per character. -var b = Buffer([0xde, 0xad, 0xbe, 0xef]); -var s = String.fromCharCode(0xffff); -b.write(s, 0, 'binary'); -assert.equal(0xff, b[0]); -assert.equal(0xad, b[1]); -assert.equal(0xbe, b[2]); -assert.equal(0xef, b[3]); -s = String.fromCharCode(0xaaee); -b.write(s, 0, 'binary'); -assert.equal(0xee, b[0]); -assert.equal(0xad, b[1]); -assert.equal(0xbe, b[2]); -assert.equal(0xef, b[3]); - -// #1210 Test UTF-8 string includes null character -var buf = new Buffer('\0'); -assert.equal(buf.length, 1); -buf = new Buffer('\0\0'); -assert.equal(buf.length, 2); - -buf = new Buffer(2); -var written = buf.write(''); // 0byte -assert.equal(written, 0); -written = buf.write('\0'); // 1byte (v8 adds null terminator) -assert.equal(written, 1); -written = buf.write('a\0'); // 1byte * 2 -assert.equal(written, 2); -written = buf.write('あ'); // 3bytes -assert.equal(written, 0); -written = buf.write('\0あ'); // 1byte + 3bytes -assert.equal(written, 1); -written = buf.write('\0\0あ'); // 1byte * 2 + 3bytes -assert.equal(written, 2); - -buf = new Buffer(10); -written = buf.write('あいう'); // 3bytes * 3 (v8 adds null terminator) -assert.equal(written, 9); -written = buf.write('あいう\0'); // 3bytes * 3 + 1byte -assert.equal(written, 10); - -// #243 Test write() with maxLength -var buf = new Buffer(4); -buf.fill(0xFF); -var written = buf.write('abcd', 1, 2, 'utf8'); -// console.log(buf); -assert.equal(written, 2); -assert.equal(buf[0], 0xFF); -assert.equal(buf[1], 0x61); -assert.equal(buf[2], 0x62); -assert.equal(buf[3], 0xFF); - -buf.fill(0xFF); -written = buf.write('abcd', 1, 4); -// console.log(buf); -assert.equal(written, 3); -assert.equal(buf[0], 0xFF); -assert.equal(buf[1], 0x61); -assert.equal(buf[2], 0x62); -assert.equal(buf[3], 0x63); - -buf.fill(0xFF); -written = buf.write('abcd', 'utf8', 1, 2); // legacy style -// console.log(buf); -assert.equal(written, 2); -assert.equal(buf[0], 0xFF); -assert.equal(buf[1], 0x61); -assert.equal(buf[2], 0x62); -assert.equal(buf[3], 0xFF); - -buf.fill(0xFF); -written = buf.write('abcdef', 1, 2, 'hex'); -// console.log(buf); -assert.equal(written, 2); -assert.equal(buf[0], 0xFF); -assert.equal(buf[1], 0xAB); -assert.equal(buf[2], 0xCD); -assert.equal(buf[3], 0xFF); - -['ucs2', 'ucs-2', 'utf16le', 'utf-16le'].forEach(function(encoding) { - buf.fill(0xFF); - written = buf.write('abcd', 0, 2, encoding); -// console.log(buf); - assert.equal(written, 2); - assert.equal(buf[0], 0x61); - assert.equal(buf[1], 0x00); - assert.equal(buf[2], 0xFF); - assert.equal(buf[3], 0xFF); -}); - -// test offset returns are correct -var b = new Buffer(16); -assert.equal(4, b.writeUInt32LE(0, 0)); -assert.equal(6, b.writeUInt16LE(0, 4)); -assert.equal(7, b.writeUInt8(0, 6)); -assert.equal(8, b.writeInt8(0, 7)); -assert.equal(16, b.writeDoubleLE(0, 8)); - -// test unmatched surrogates not producing invalid utf8 output -// ef bf bd = utf-8 representation of unicode replacement character -// see https://codereview.chromium.org/121173009/ -buf = new Buffer('ab\ud800cd', 'utf8'); -assert.equal(buf[0], 0x61); -assert.equal(buf[1], 0x62); -assert.equal(buf[2], 0xef); -assert.equal(buf[3], 0xbf); -assert.equal(buf[4], 0xbd); -assert.equal(buf[5], 0x63); -assert.equal(buf[6], 0x64); - -// test for buffer overrun -buf = new Buffer([0, 0, 0, 0, 0]); // length: 5 -var sub = buf.slice(0, 4); // length: 4 -written = sub.write('12345', 'binary'); -assert.equal(written, 4); -assert.equal(buf[4], 0); - -// Check for fractional length args, junk length args, etc. -// https://github.com/joyent/node/issues/1758 - -// Call .fill() first, stops valgrind warning about uninitialized memory reads. -Buffer(3.3).fill().toString(); // throws bad argument error in commit 43cb4ec -assert.equal(Buffer(-1).length, 0); -assert.equal(Buffer(NaN).length, 0); -assert.equal(Buffer(3.3).length, 3); -assert.equal(Buffer({length: 3.3}).length, 3); -assert.equal(Buffer({length: 'BAM'}).length, 0); - -// Make sure that strings are not coerced to numbers. -assert.equal(Buffer('99').length, 2); -assert.equal(Buffer('13.37').length, 5); - -// Ensure that the length argument is respected. -'ascii utf8 hex base64 binary'.split(' ').forEach(function(enc) { - assert.equal(Buffer(1).write('aaaaaa', 0, 1, enc), 1); -}); - -// Regression test, guard against buffer overrun in the base64 decoder. -var a = Buffer(3); -var b = Buffer('xxx'); -a.write('aaaaaaaa', 'base64'); -assert.equal(b.toString(), 'xxx'); - -// issue GH-3416 -Buffer(Buffer(0), 0, 0); - -[ 'hex', - 'utf8', - 'utf-8', - 'ascii', - 'binary', - 'base64', - 'ucs2', - 'ucs-2', - 'utf16le', - 'utf-16le' ].forEach(function(enc) { - assert.equal(Buffer.isEncoding(enc), true); - }); - -[ 'utf9', - 'utf-7', - 'Unicode-FTW', - 'new gnu gun' ].forEach(function(enc) { - assert.equal(Buffer.isEncoding(enc), false); - }); - - -// GH-5110 -(function() { - var buffer = new Buffer('test'), - string = JSON.stringify(buffer); - - assert.equal(string, '{"type":"Buffer","data":[116,101,115,116]}'); - - assert.deepEqual(buffer, JSON.parse(string, function(key, value) { - return value && value.type === 'Buffer' - ? new Buffer(value.data) - : value; - })); -})(); - -// issue GH-7849 -(function() { - var buf = new Buffer('test'); - var json = JSON.stringify(buf); - var obj = JSON.parse(json); - var copy = new Buffer(obj); - - assert(buf.equals(copy)); -})(); - -// issue GH-4331 -assert.throws(function() { - new Buffer(0xFFFFFFFF); -}, RangeError); -assert.throws(function() { - new Buffer(0xFFFFFFFFF); -}, RangeError); - - -// attempt to overflow buffers, similar to previous bug in array buffers -assert.throws(function() { - var buf = new Buffer(8); - buf.readFloatLE(0xffffffff); -}, RangeError); - -assert.throws(function() { - var buf = new Buffer(8); - buf.writeFloatLE(0.0, 0xffffffff); -}, RangeError); - -assert.throws(function() { - var buf = new Buffer(8); - buf.readFloatLE(0xffffffff); -}, RangeError); - -assert.throws(function() { - var buf = new Buffer(8); - buf.writeFloatLE(0.0, 0xffffffff); -}, RangeError); - - -// ensure negative values can't get past offset -assert.throws(function() { - var buf = new Buffer(8); - buf.readFloatLE(-1); -}, RangeError); - -assert.throws(function() { - var buf = new Buffer(8); - buf.writeFloatLE(0.0, -1); -}, RangeError); - -assert.throws(function() { - var buf = new Buffer(8); - buf.readFloatLE(-1); -}, RangeError); - -assert.throws(function() { - var buf = new Buffer(8); - buf.writeFloatLE(0.0, -1); -}, RangeError); - -// offset checks -var buf = new Buffer(0); - -assert.throws(function() { buf.readUInt8(0); }, RangeError); -assert.throws(function() { buf.readInt8(0); }, RangeError); - -var buf = new Buffer([0xFF]); - -assert.equal(buf.readUInt8(0), 255); -assert.equal(buf.readInt8(0), -1); - -[16, 32].forEach(function(bits) { - var buf = new Buffer(bits / 8 - 1); - - assert.throws(function() { buf['readUInt' + bits + 'BE'](0); }, - RangeError, - 'readUInt' + bits + 'BE'); - - assert.throws(function() { buf['readUInt' + bits + 'LE'](0); }, - RangeError, - 'readUInt' + bits + 'LE'); - - assert.throws(function() { buf['readInt' + bits + 'BE'](0); }, - RangeError, - 'readInt' + bits + 'BE()'); - - assert.throws(function() { buf['readInt' + bits + 'LE'](0); }, - RangeError, - 'readInt' + bits + 'LE()'); -}); - -[16, 32].forEach(function(bits) { - var buf = new Buffer([0xFF, 0xFF, 0xFF, 0xFF]); - - assert.equal(buf['readUInt' + bits + 'BE'](0), - (0xFFFFFFFF >>> (32 - bits))); - - assert.equal(buf['readUInt' + bits + 'LE'](0), - (0xFFFFFFFF >>> (32 - bits))); - - assert.equal(buf['readInt' + bits + 'BE'](0), - (0xFFFFFFFF >> (32 - bits))); - - assert.equal(buf['readInt' + bits + 'LE'](0), - (0xFFFFFFFF >> (32 - bits))); -}); - -// test for common read(U)IntLE/BE -(function() { - var buf = new Buffer([0x01, 0x02, 0x03, 0x04, 0x05, 0x06]); - - assert.equal(buf.readUIntLE(0, 1), 0x01); - assert.equal(buf.readUIntBE(0, 1), 0x01); - assert.equal(buf.readUIntLE(0, 3), 0x030201); - assert.equal(buf.readUIntBE(0, 3), 0x010203); - assert.equal(buf.readUIntLE(0, 5), 0x0504030201); - assert.equal(buf.readUIntBE(0, 5), 0x0102030405); - assert.equal(buf.readUIntLE(0, 6), 0x060504030201); - assert.equal(buf.readUIntBE(0, 6), 0x010203040506); - assert.equal(buf.readIntLE(0, 1), 0x01); - assert.equal(buf.readIntBE(0, 1), 0x01); - assert.equal(buf.readIntLE(0, 3), 0x030201); - assert.equal(buf.readIntBE(0, 3), 0x010203); - assert.equal(buf.readIntLE(0, 5), 0x0504030201); - assert.equal(buf.readIntBE(0, 5), 0x0102030405); - assert.equal(buf.readIntLE(0, 6), 0x060504030201); - assert.equal(buf.readIntBE(0, 6), 0x010203040506); -})(); - -// test for common write(U)IntLE/BE -(function() { - var buf = new Buffer(3); - buf.writeUIntLE(0x123456, 0, 3); - assert.deepEqual(buf.toJSON().data, [0x56, 0x34, 0x12]); - assert.equal(buf.readUIntLE(0, 3), 0x123456); - - buf = new Buffer(3); - buf.writeUIntBE(0x123456, 0, 3); - assert.deepEqual(buf.toJSON().data, [0x12, 0x34, 0x56]); - assert.equal(buf.readUIntBE(0, 3), 0x123456); - - buf = new Buffer(3); - buf.writeIntLE(0x123456, 0, 3); - assert.deepEqual(buf.toJSON().data, [0x56, 0x34, 0x12]); - assert.equal(buf.readIntLE(0, 3), 0x123456); - - buf = new Buffer(3); - buf.writeIntBE(0x123456, 0, 3); - assert.deepEqual(buf.toJSON().data, [0x12, 0x34, 0x56]); - assert.equal(buf.readIntBE(0, 3), 0x123456); - - buf = new Buffer(3); - buf.writeIntLE(-0x123456, 0, 3); - assert.deepEqual(buf.toJSON().data, [0xaa, 0xcb, 0xed]); - assert.equal(buf.readIntLE(0, 3), -0x123456); - - buf = new Buffer(3); - buf.writeIntBE(-0x123456, 0, 3); - assert.deepEqual(buf.toJSON().data, [0xed, 0xcb, 0xaa]); - assert.equal(buf.readIntBE(0, 3), -0x123456); - - buf = new Buffer(5); - buf.writeUIntLE(0x1234567890, 0, 5); - assert.deepEqual(buf.toJSON().data, [0x90, 0x78, 0x56, 0x34, 0x12]); - assert.equal(buf.readUIntLE(0, 5), 0x1234567890); - - buf = new Buffer(5); - buf.writeUIntBE(0x1234567890, 0, 5); - assert.deepEqual(buf.toJSON().data, [0x12, 0x34, 0x56, 0x78, 0x90]); - assert.equal(buf.readUIntBE(0, 5), 0x1234567890); - - buf = new Buffer(5); - buf.writeIntLE(0x1234567890, 0, 5); - assert.deepEqual(buf.toJSON().data, [0x90, 0x78, 0x56, 0x34, 0x12]); - assert.equal(buf.readIntLE(0, 5), 0x1234567890); - - buf = new Buffer(5); - buf.writeIntBE(0x1234567890, 0, 5); - assert.deepEqual(buf.toJSON().data, [0x12, 0x34, 0x56, 0x78, 0x90]); - assert.equal(buf.readIntBE(0, 5), 0x1234567890); - - buf = new Buffer(5); - buf.writeIntLE(-0x1234567890, 0, 5); - assert.deepEqual(buf.toJSON().data, [0x70, 0x87, 0xa9, 0xcb, 0xed]); - assert.equal(buf.readIntLE(0, 5), -0x1234567890); - - buf = new Buffer(5); - buf.writeIntBE(-0x1234567890, 0, 5); - assert.deepEqual(buf.toJSON().data, [0xed, 0xcb, 0xa9, 0x87, 0x70]); - assert.equal(buf.readIntBE(0, 5), -0x1234567890); -})(); - -// test Buffer slice -(function() { - var buf = new Buffer('0123456789'); - assert.equal(buf.slice(-10, 10), '0123456789'); - assert.equal(buf.slice(-20, 10), '0123456789'); - assert.equal(buf.slice(-20, -10), ''); - assert.equal(buf.slice(0, -1), '012345678'); - assert.equal(buf.slice(2, -2), '234567'); - assert.equal(buf.slice(0, 65536), '0123456789'); - assert.equal(buf.slice(65536, 0), ''); - for (var i = 0, s = buf.toString(); i < buf.length; ++i) { - assert.equal(buf.slice(-i), s.slice(-i)); - assert.equal(buf.slice(0, -i), s.slice(0, -i)); - } - // try to slice a zero length Buffer - // see https://github.com/joyent/node/issues/5881 - SlowBuffer(0).slice(0, 1); -})(); - -// Regression test for #5482: should throw but not assert in C++ land. -assert.throws(function() { - Buffer('', 'buffer'); -}, TypeError); - -// Regression test for #6111. Constructing a buffer from another buffer -// should a) work, and b) not corrupt the source buffer. -(function() { - var a = [0]; - for (var i = 0; i < 7; ++i) a = a.concat(a); - a = a.map(function(_, i) { return i; }); - var b = Buffer(a); - var c = Buffer(b); - assert.equal(b.length, a.length); - assert.equal(c.length, a.length); - for (var i = 0, k = a.length; i < k; ++i) { - assert.equal(a[i], i); - assert.equal(b[i], i); - assert.equal(c[i], i); - } -})(); - - -assert.throws(function() { - new Buffer((-1 >>> 0) + 1); -}, RangeError); - -assert.throws(function() { - new SlowBuffer((-1 >>> 0) + 1); -}, RangeError); - -if (common.hasCrypto) { - // Test truncation after decode - // var crypto = require('crypto'); - - var b1 = new Buffer('YW55=======', 'base64'); - var b2 = new Buffer('YW55', 'base64'); - - assert.equal( - 1 /*crypto.createHash('sha1').update(b1).digest('hex')*/, - 1 /*crypto.createHash('sha1').update(b2).digest('hex')*/ - ); -} else { -// console.log('1..0 # Skipped: missing crypto'); -} - -// Test Compare -var b = new Buffer(1).fill('a'); -var c = new Buffer(1).fill('c'); -var d = new Buffer(2).fill('aa'); - -assert.equal(b.compare(c), -1); -assert.equal(c.compare(d), 1); -assert.equal(d.compare(b), 1); -assert.equal(b.compare(d), -1); -assert.equal(b.compare(b), 0); - -assert.equal(Buffer.compare(b, c), -1); -assert.equal(Buffer.compare(c, d), 1); -assert.equal(Buffer.compare(d, b), 1); -assert.equal(Buffer.compare(b, d), -1); -assert.equal(Buffer.compare(c, c), 0); - - -assert.throws(function() { - var b = new Buffer(1); - Buffer.compare(b, 'abc'); -}); - -assert.throws(function() { - var b = new Buffer(1); - Buffer.compare('abc', b); -}); - -assert.throws(function() { - var b = new Buffer(1); - b.compare('abc'); -}); - -// Test Equals -var b = new Buffer(5).fill('abcdf'); -var c = new Buffer(5).fill('abcdf'); -var d = new Buffer(5).fill('abcde'); -var e = new Buffer(6).fill('abcdef'); - -assert.ok(b.equals(c)); -assert.ok(!c.equals(d)); -assert.ok(!d.equals(e)); -assert.ok(d.equals(d)); - -assert.throws(function() { - var b = new Buffer(1); - b.equals('abc'); -}); - -// Regression test for https://github.com/nodejs/io.js/issues/649. -assert.throws(function() { Buffer(1422561062959).toString('utf8'); }); - -var ps = Buffer.poolSize; -Buffer.poolSize = 0; -assert.equal(Buffer(1).parent, undefined); -Buffer.poolSize = ps; - -// Test Buffer.copy() segfault -assert.throws(function() { - Buffer(10).copy(); -}); - -assert.throws(function() { - new Buffer(); -}, /must start with number, buffer, array or string/); - -assert.throws(function() { - new Buffer(null); -}, /must start with number, buffer, array or string/); - diff --git a/node_modules/browserify/node_modules/buffer/test/slice.js b/node_modules/browserify/node_modules/buffer/test/slice.js deleted file mode 100644 index 25c111c8..00000000 --- a/node_modules/browserify/node_modules/buffer/test/slice.js +++ /dev/null @@ -1,37 +0,0 @@ -if (process.env.OBJECT_IMPL) global.TYPED_ARRAY_SUPPORT = false -var B = require('../').Buffer -var test = require('tape') - -test('modifying buffer created by .slice() modifies original memory', function (t) { - if (!B.TYPED_ARRAY_SUPPORT) return t.end() - - var buf1 = new B(26) - for (var i = 0; i < 26; i++) { - buf1[i] = i + 97 // 97 is ASCII a - } - - var buf2 = buf1.slice(0, 3) - t.equal(buf2.toString('ascii', 0, buf2.length), 'abc') - - buf2[0] = '!'.charCodeAt(0) - t.equal(buf1.toString('ascii', 0, buf2.length), '!bc') - - t.end() -}) - -test('modifying parent buffer modifies .slice() buffer\'s memory', function (t) { - if (!B.TYPED_ARRAY_SUPPORT) return t.end() - - var buf1 = new B(26) - for (var i = 0; i < 26; i++) { - buf1[i] = i + 97 // 97 is ASCII a - } - - var buf2 = buf1.slice(0, 3) - t.equal(buf2.toString('ascii', 0, buf2.length), 'abc') - - buf1[0] = '!'.charCodeAt(0) - t.equal(buf2.toString('ascii', 0, buf2.length), '!bc') - - t.end() -}) diff --git a/node_modules/browserify/node_modules/buffer/test/static.js b/node_modules/browserify/node_modules/buffer/test/static.js deleted file mode 100644 index 68faa005..00000000 --- a/node_modules/browserify/node_modules/buffer/test/static.js +++ /dev/null @@ -1,31 +0,0 @@ -if (process.env.OBJECT_IMPL) global.TYPED_ARRAY_SUPPORT = false -var B = require('../').Buffer -var test = require('tape') - -test('Buffer.isEncoding', function (t) { - t.equal(B.isEncoding('HEX'), true) - t.equal(B.isEncoding('hex'), true) - t.equal(B.isEncoding('bad'), false) - t.end() -}) - -test('Buffer.isBuffer', function (t) { - t.equal(B.isBuffer(new B('hey', 'utf8')), true) - t.equal(B.isBuffer(new B([1, 2, 3], 'utf8')), true) - t.equal(B.isBuffer('hey'), false) - t.end() -}) - -test('Buffer.toArrayBuffer', function (t) { - var data = [1, 2, 3, 4, 5, 6, 7, 8] - if (typeof Uint8Array !== 'undefined') { - var result = new B(data).toArrayBuffer() - var expected = new Uint8Array(data).buffer - for (var i = 0; i < expected.byteLength; i++) { - t.equal(result[i], expected[i]) - } - } else { - t.pass('No toArrayBuffer() method provided in old browsers') - } - t.end() -}) diff --git a/node_modules/browserify/node_modules/buffer/test/to-string.js b/node_modules/browserify/node_modules/buffer/test/to-string.js deleted file mode 100644 index 2950d4d0..00000000 --- a/node_modules/browserify/node_modules/buffer/test/to-string.js +++ /dev/null @@ -1,233 +0,0 @@ -if (process.env.OBJECT_IMPL) global.TYPED_ARRAY_SUPPORT = false -var B = require('../').Buffer -var test = require('tape') - -test('utf8 buffer to base64', function (t) { - t.equal( - new B('Ձאab', 'utf8').toString('base64'), - '1YHXkGFi' - ) - t.end() -}) - -test('utf8 buffer to hex', function (t) { - t.equal( - new B('Ձאab', 'utf8').toString('hex'), - 'd581d7906162' - ) - t.end() -}) - -test('utf8 to utf8', function (t) { - t.equal( - new B('öäüõÖÄÜÕ', 'utf8').toString('utf8'), - 'öäüõÖÄÜÕ' - ) - t.end() -}) - -test('utf16le to utf16', function (t) { - t.equal( - new B(new B('abcd', 'utf8').toString('utf16le'), 'utf16le').toString('utf8'), - 'abcd' - ) - t.end() -}) - -test('utf16le to hex', function (t) { - t.equal( - new B('abcd', 'utf16le').toString('hex'), - '6100620063006400' - ) - t.end() -}) - -test('ascii buffer to base64', function (t) { - t.equal( - new B('123456!@#$%^', 'ascii').toString('base64'), - 'MTIzNDU2IUAjJCVe' - ) - t.end() -}) - -test('ascii buffer to hex', function (t) { - t.equal( - new B('123456!@#$%^', 'ascii').toString('hex'), - '31323334353621402324255e' - ) - t.end() -}) - -test('base64 buffer to utf8', function (t) { - t.equal( - new B('1YHXkGFi', 'base64').toString('utf8'), - 'Ձאab' - ) - t.end() -}) - -test('hex buffer to utf8', function (t) { - t.equal( - new B('d581d7906162', 'hex').toString('utf8'), - 'Ձאab' - ) - t.end() -}) - -test('base64 buffer to ascii', function (t) { - t.equal( - new B('MTIzNDU2IUAjJCVe', 'base64').toString('ascii'), - '123456!@#$%^' - ) - t.end() -}) - -test('hex buffer to ascii', function (t) { - t.equal( - new B('31323334353621402324255e', 'hex').toString('ascii'), - '123456!@#$%^' - ) - t.end() -}) - -test('base64 buffer to binary', function (t) { - t.equal( - new B('MTIzNDU2IUAjJCVe', 'base64').toString('binary'), - '123456!@#$%^' - ) - t.end() -}) - -test('hex buffer to binary', function (t) { - t.equal( - new B('31323334353621402324255e', 'hex').toString('binary'), - '123456!@#$%^' - ) - t.end() -}) - -test('utf8 to binary', function (t) { - /* jshint -W100 */ - t.equal( - new B('öäüõÖÄÜÕ', 'utf8').toString('binary'), - 'öäüõÖÄÜÕ' - ) - /* jshint +W100 */ - t.end() -}) - -test('utf8 replacement chars (1 byte sequence)', function (t) { - t.equal( - new B([ 0x80 ]).toString(), - '\uFFFD' - ) - t.equal( - new B([ 0x7F ]).toString(), - '\u007F' - ) - t.end() -}) - -test('utf8 replacement chars (2 byte sequences)', function (t) { - t.equal( - new B([ 0xC7 ]).toString(), - '\uFFFD' - ) - t.equal( - new B([ 0xC7, 0xB1 ]).toString(), - '\u01F1' - ) - t.equal( - new B([ 0xC0, 0xB1 ]).toString(), - '\uFFFD\uFFFD' - ) - t.equal( - new B([ 0xC1, 0xB1 ]).toString(), - '\uFFFD\uFFFD' - ) - t.end() -}) - -test('utf8 replacement chars (3 byte sequences)', function (t) { - t.equal( - new B([ 0xE0 ]).toString(), - '\uFFFD' - ) - t.equal( - new B([ 0xE0, 0xAC ]).toString(), - '\uFFFD\uFFFD' - ) - t.equal( - new B([ 0xE0, 0xAC, 0xB9 ]).toString(), - '\u0B39' - ) - t.end() -}) - -test('utf8 replacement chars (4 byte sequences)', function (t) { - t.equal( - new B([ 0xF4 ]).toString(), - '\uFFFD' - ) - t.equal( - new B([ 0xF4, 0x8F ]).toString(), - '\uFFFD\uFFFD' - ) - t.equal( - new B([ 0xF4, 0x8F, 0x80 ]).toString(), - '\uFFFD\uFFFD\uFFFD' - ) - t.equal( - new B([ 0xF4, 0x8F, 0x80, 0x84 ]).toString(), - '\uDBFC\uDC04' - ) - t.equal( - new B([ 0xFF ]).toString(), - '\uFFFD' - ) - t.equal( - new B([ 0xFF, 0x8F, 0x80, 0x84 ]).toString(), - '\uFFFD\uFFFD\uFFFD\uFFFD' - ) - t.end() -}) - -test('utf8 replacement chars on 256 random bytes', function (t) { - t.equal( - new B([ 152, 130, 206, 23, 243, 238, 197, 44, 27, 86, 208, 36, 163, 184, 164, 21, 94, 242, 178, 46, 25, 26, 253, 178, 72, 147, 207, 112, 236, 68, 179, 190, 29, 83, 239, 147, 125, 55, 143, 19, 157, 68, 157, 58, 212, 224, 150, 39, 128, 24, 94, 225, 120, 121, 75, 192, 112, 19, 184, 142, 203, 36, 43, 85, 26, 147, 227, 139, 242, 186, 57, 78, 11, 102, 136, 117, 180, 210, 241, 92, 3, 215, 54, 167, 249, 1, 44, 225, 146, 86, 2, 42, 68, 21, 47, 238, 204, 153, 216, 252, 183, 66, 222, 255, 15, 202, 16, 51, 134, 1, 17, 19, 209, 76, 238, 38, 76, 19, 7, 103, 249, 5, 107, 137, 64, 62, 170, 57, 16, 85, 179, 193, 97, 86, 166, 196, 36, 148, 138, 193, 210, 69, 187, 38, 242, 97, 195, 219, 252, 244, 38, 1, 197, 18, 31, 246, 53, 47, 134, 52, 105, 72, 43, 239, 128, 203, 73, 93, 199, 75, 222, 220, 166, 34, 63, 236, 11, 212, 76, 243, 171, 110, 78, 39, 205, 204, 6, 177, 233, 212, 243, 0, 33, 41, 122, 118, 92, 252, 0, 157, 108, 120, 70, 137, 100, 223, 243, 171, 232, 66, 126, 111, 142, 33, 3, 39, 117, 27, 107, 54, 1, 217, 227, 132, 13, 166, 3, 73, 53, 127, 225, 236, 134, 219, 98, 214, 125, 148, 24, 64, 142, 111, 231, 194, 42, 150, 185, 10, 182, 163, 244, 19, 4, 59, 135, 16 ]).toString(), - '\uFFFD\uFFFD\uFFFD\u0017\uFFFD\uFFFD\uFFFD\u002C\u001B\u0056\uFFFD\u0024\uFFFD\uFFFD\uFFFD\u0015\u005E\uFFFD\uFFFD\u002E\u0019\u001A\uFFFD\uFFFD\u0048\uFFFD\uFFFD\u0070\uFFFD\u0044\uFFFD\uFFFD\u001D\u0053\uFFFD\uFFFD\u007D\u0037\uFFFD\u0013\uFFFD\u0044\uFFFD\u003A\uFFFD\uFFFD\uFFFD\u0027\uFFFD\u0018\u005E\uFFFD\u0078\u0079\u004B\uFFFD\u0070\u0013\uFFFD\uFFFD\uFFFD\u0024\u002B\u0055\u001A\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\u0039\u004E\u000B\u0066\uFFFD\u0075\uFFFD\uFFFD\uFFFD\u005C\u0003\uFFFD\u0036\uFFFD\uFFFD\u0001\u002C\uFFFD\uFFFD\u0056\u0002\u002A\u0044\u0015\u002F\uFFFD\u0319\uFFFD\uFFFD\uFFFD\u0042\uFFFD\uFFFD\u000F\uFFFD\u0010\u0033\uFFFD\u0001\u0011\u0013\uFFFD\u004C\uFFFD\u0026\u004C\u0013\u0007\u0067\uFFFD\u0005\u006B\uFFFD\u0040\u003E\uFFFD\u0039\u0010\u0055\uFFFD\uFFFD\u0061\u0056\uFFFD\uFFFD\u0024\uFFFD\uFFFD\uFFFD\uFFFD\u0045\uFFFD\u0026\uFFFD\u0061\uFFFD\uFFFD\uFFFD\uFFFD\u0026\u0001\uFFFD\u0012\u001F\uFFFD\u0035\u002F\uFFFD\u0034\u0069\u0048\u002B\uFFFD\uFFFD\uFFFD\u0049\u005D\uFFFD\u004B\uFFFD\u0726\u0022\u003F\uFFFD\u000B\uFFFD\u004C\uFFFD\uFFFD\u006E\u004E\u0027\uFFFD\uFFFD\u0006\uFFFD\uFFFD\uFFFD\uFFFD\u0000\u0021\u0029\u007A\u0076\u005C\uFFFD\u0000\uFFFD\u006C\u0078\u0046\uFFFD\u0064\uFFFD\uFFFD\uFFFD\uFFFD\u0042\u007E\u006F\uFFFD\u0021\u0003\u0027\u0075\u001B\u006B\u0036\u0001\uFFFD\uFFFD\uFFFD\u000D\uFFFD\u0003\u0049\u0035\u007F\uFFFD\uFFFD\uFFFD\uFFFD\u0062\uFFFD\u007D\uFFFD\u0018\u0040\uFFFD\u006F\uFFFD\uFFFD\u002A\uFFFD\uFFFD\u000A\uFFFD\uFFFD\uFFFD\u0013\u0004\u003B\uFFFD\u0010' - ) - t.end() -}) - -test('utf8 replacement chars for anything in the surrogate pair range', function (t) { - t.equal( - new B([ 0xED, 0x9F, 0xBF ]).toString(), - '\uD7FF' - ) - t.equal( - new B([ 0xED, 0xA0, 0x80 ]).toString(), - '\uFFFD\uFFFD\uFFFD' - ) - t.equal( - new B([ 0xED, 0xBE, 0x8B ]).toString(), - '\uFFFD\uFFFD\uFFFD' - ) - t.equal( - new B([ 0xED, 0xBF, 0xBF ]).toString(), - '\uFFFD\uFFFD\uFFFD' - ) - t.equal( - new B([ 0xEE, 0x80, 0x80 ]).toString(), - '\uE000' - ) - t.end() -}) - -test('utf8 don\'t replace the replacement char', function (t) { - t.equal( - new B('\uFFFD').toString(), - '\uFFFD' - ) - t.end() -}) diff --git a/node_modules/browserify/node_modules/buffer/test/write.js b/node_modules/browserify/node_modules/buffer/test/write.js deleted file mode 100644 index 4039d192..00000000 --- a/node_modules/browserify/node_modules/buffer/test/write.js +++ /dev/null @@ -1,131 +0,0 @@ -if (process.env.OBJECT_IMPL) global.TYPED_ARRAY_SUPPORT = false -var B = require('../').Buffer -var test = require('tape') -var isnan = require('is-nan') - -test('buffer.write string should get parsed as number', function (t) { - var b = new B(64) - b.writeUInt16LE('1003', 0) - t.equal(b.readUInt16LE(0), 1003) - t.end() -}) - -test('buffer.writeUInt8 a fractional number will get Math.floored', function (t) { - // Some extra work is necessary to make this test pass with the Object implementation - - var b = new B(1) - b.writeInt8(5.5, 0) - t.equal(b[0], 5) - t.end() -}) - -test('writeUint8 with a negative number throws', function (t) { - var buf = new B(1) - - t.throws(function () { - buf.writeUInt8(-3, 0) - }) - - t.end() -}) - -test('hex of write{Uint,Int}{8,16,32}{LE,BE}', function (t) { - t.plan(2 * (2 * 2 * 2 + 2)) - var hex = [ - '03', '0300', '0003', '03000000', '00000003', - 'fd', 'fdff', 'fffd', 'fdffffff', 'fffffffd' - ] - var reads = [ 3, 3, 3, 3, 3, -3, -3, -3, -3, -3 ] - var xs = ['UInt', 'Int'] - var ys = [8, 16, 32] - for (var i = 0; i < xs.length; i++) { - var x = xs[i] - for (var j = 0; j < ys.length; j++) { - var y = ys[j] - var endianesses = (y === 8) ? [''] : ['LE', 'BE'] - for (var k = 0; k < endianesses.length; k++) { - var z = endianesses[k] - - var v1 = new B(y / 8) - var writefn = 'write' + x + y + z - var val = (x === 'Int') ? -3 : 3 - v1[writefn](val, 0) - t.equal( - v1.toString('hex'), - hex.shift() - ) - var readfn = 'read' + x + y + z - t.equal( - v1[readfn](0), - reads.shift() - ) - } - } - } - t.end() -}) - -test('hex of write{Uint,Int}{8,16,32}{LE,BE} with overflow', function (t) { - if (!B.TYPED_ARRAY_SUPPORT) { - t.pass('object impl: skipping overflow test') - t.end() - return - } - - t.plan(3 * (2 * 2 * 2 + 2)) - var hex = [ - '', '03', '00', '030000', '000000', - '', 'fd', 'ff', 'fdffff', 'ffffff' - ] - var reads = [ - undefined, 3, 0, NaN, 0, - undefined, 253, -256, 16777213, -256 - ] - var xs = ['UInt', 'Int'] - var ys = [8, 16, 32] - for (var i = 0; i < xs.length; i++) { - var x = xs[i] - for (var j = 0; j < ys.length; j++) { - var y = ys[j] - var endianesses = (y === 8) ? [''] : ['LE', 'BE'] - for (var k = 0; k < endianesses.length; k++) { - var z = endianesses[k] - - var v1 = new B(y / 8 - 1) - var next = new B(4) - next.writeUInt32BE(0, 0) - var writefn = 'write' + x + y + z - var val = (x === 'Int') ? -3 : 3 - v1[writefn](val, 0, true) - t.equal( - v1.toString('hex'), - hex.shift() - ) - // check that nothing leaked to next buffer. - t.equal(next.readUInt32BE(0), 0) - // check that no bytes are read from next buffer. - next.writeInt32BE(~0, 0) - var readfn = 'read' + x + y + z - var r = reads.shift() - if (isnan(r)) t.pass('equal') - else t.equal(v1[readfn](0, true), r) - } - } - } - t.end() -}) -test('large values do not imporoperly roll over (ref #80)', function (t) { - var nums = [-25589992, -633756690, -898146932] - var out = new B(12) - out.fill(0) - out.writeInt32BE(nums[0], 0) - var newNum = out.readInt32BE(0) - t.equal(nums[0], newNum) - out.writeInt32BE(nums[1], 4) - newNum = out.readInt32BE(4) - t.equal(nums[1], newNum) - out.writeInt32BE(nums[2], 8) - newNum = out.readInt32BE(8) - t.equal(nums[2], newNum) - t.end() -}) diff --git a/node_modules/browserify/node_modules/builtins/.travis.yml b/node_modules/browserify/node_modules/builtins/.travis.yml deleted file mode 100644 index cc4dba29..00000000 --- a/node_modules/browserify/node_modules/builtins/.travis.yml +++ /dev/null @@ -1,4 +0,0 @@ -language: node_js -node_js: - - "0.8" - - "0.10" diff --git a/node_modules/browserify/node_modules/builtins/History.md b/node_modules/browserify/node_modules/builtins/History.md deleted file mode 100644 index 0eb45c42..00000000 --- a/node_modules/browserify/node_modules/builtins/History.md +++ /dev/null @@ -1,39 +0,0 @@ - -0.0.7 / 2014-09-01 -================== - - * update .repository - -0.0.6 / 2014-09-01 -================== - - * add travis - * add test script - * add constants - -0.0.5 / 2014-06-27 -================== - - * add module - * publish to public npm - -0.0.4 / 2014-04-25 -================== - - * add timers - -0.0.3 / 2014-02-22 -================== - - * add buffer - -0.0.2 / 2014-02-11 -================== - - * add assert - -0.0.1 / 2014-02-11 -================== - - * add main - * initial commit diff --git a/node_modules/browserify/node_modules/builtins/Readme.md b/node_modules/browserify/node_modules/builtins/Readme.md deleted file mode 100644 index 96f4b1f6..00000000 --- a/node_modules/browserify/node_modules/builtins/Readme.md +++ /dev/null @@ -1,18 +0,0 @@ - -# builtins - - List of node.js [builtin modules](http://nodejs.org/api/). - - [![build status](https://secure.travis-ci.org/juliangruber/builtins.svg)](http://travis-ci.org/juliangruber/builtins) - -## Example - -```js -var builtins = require('builtins'); - -assert(builtins.indexOf('http') > -1); -``` - -## License - - MIT diff --git a/node_modules/browserify/node_modules/builtins/builtins.json b/node_modules/browserify/node_modules/builtins/builtins.json deleted file mode 100644 index c52221d7..00000000 --- a/node_modules/browserify/node_modules/builtins/builtins.json +++ /dev/null @@ -1,31 +0,0 @@ -[ - "assert", - "buffer", - "child_process", - "cluster", - "constants", - "crypto", - "dns", - "domain", - "events", - "fs", - "http", - "https", - "module", - "net", - "os", - "path", - "punycode", - "querystring", - "repl", - "stream", - "string_decoder", - "timers", - "tls", - "tty", - "dgram", - "url", - "util", - "vm", - "zlib" -] diff --git a/node_modules/browserify/node_modules/builtins/package.json b/node_modules/browserify/node_modules/builtins/package.json deleted file mode 100644 index aab86e30..00000000 --- a/node_modules/browserify/node_modules/builtins/package.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "name": "builtins", - "version": "0.0.7", - "description": "List of node.js builtin modules", - "repository": { - "type": "git", - "url": "git://github.com/juliangruber/builtins" - }, - "license": "MIT", - "main": "builtins.json", - "publishConfig": { - "registry": "https://registry.npmjs.org" - }, - "scripts": { - "test": "node -e \"require('./builtins.json')\"" - }, - "bugs": { - "url": "https://github.com/juliangruber/builtins/issues" - }, - "homepage": "https://github.com/juliangruber/builtins", - "_id": "builtins@0.0.7", - "dist": { - "shasum": "355219cd6cf18dbe7c01cc7fd2dce765cfdc549a", - "tarball": "https://registry.npmjs.org/builtins/-/builtins-0.0.7.tgz" - }, - "_from": "builtins@>=0.0.3 <0.1.0", - "_npmVersion": "1.3.22", - "_npmUser": { - "name": "juliangruber", - "email": "julian@juliangruber.com" - }, - "maintainers": [ - { - "name": "juliangruber", - "email": "julian@juliangruber.com" - }, - { - "name": "segment", - "email": "tj@segment.io" - } - ], - "directories": {}, - "_shasum": "355219cd6cf18dbe7c01cc7fd2dce765cfdc549a", - "_resolved": "https://registry.npmjs.org/builtins/-/builtins-0.0.7.tgz", - "readme": "ERROR: No README data found!" -} diff --git a/node_modules/browserify/node_modules/commondir/README.markdown b/node_modules/browserify/node_modules/commondir/README.markdown deleted file mode 100644 index 1326dc18..00000000 --- a/node_modules/browserify/node_modules/commondir/README.markdown +++ /dev/null @@ -1,45 +0,0 @@ -commondir -========= - -Compute the closest common parent directory among an array of directories. - -example -======= - -dir ---- - - > var commondir = require('commondir'); - > commondir([ '/x/y/z', '/x/y', '/x/y/w/q' ]) - '/x/y' - -base ----- - - > var commondir = require('commondir') - > commondir('/foo/bar', [ '../baz', '../../foo/quux', './bizzy' ]) - '/foo' - -methods -======= - -var commondir = require('commondir'); - -commondir(absolutePaths) ------------------------- - -Compute the closest common parent directory for an array `absolutePaths`. - -commondir(basedir, relativePaths) ---------------------------------- - -Compute the closest common parent directory for an array `relativePaths` which -will be resolved for each `dir` in `relativePaths` according to: -`path.resolve(basedir, dir)`. - -installation -============ - -Using [npm](http://npmjs.org), just do: - - npm install commondir diff --git a/node_modules/browserify/node_modules/commondir/example/base.js b/node_modules/browserify/node_modules/commondir/example/base.js deleted file mode 100644 index 715e280c..00000000 --- a/node_modules/browserify/node_modules/commondir/example/base.js +++ /dev/null @@ -1,3 +0,0 @@ -var commondir = require('commondir'); -var dir = commondir('/foo/bar', [ '../baz', '../../foo/quux', './bizzy' ]) -console.log(dir); diff --git a/node_modules/browserify/node_modules/commondir/example/dir.js b/node_modules/browserify/node_modules/commondir/example/dir.js deleted file mode 100644 index 0a5e9cca..00000000 --- a/node_modules/browserify/node_modules/commondir/example/dir.js +++ /dev/null @@ -1,3 +0,0 @@ -var commondir = require('commondir'); -var dir = commondir([ '/x/y/z', '/x/y', '/x/y/w/q' ]) -console.log(dir); diff --git a/node_modules/browserify/node_modules/commondir/index.js b/node_modules/browserify/node_modules/commondir/index.js deleted file mode 100644 index fa77d045..00000000 --- a/node_modules/browserify/node_modules/commondir/index.js +++ /dev/null @@ -1,29 +0,0 @@ -var path = require('path'); - -module.exports = function (basedir, relfiles) { - if (relfiles) { - var files = relfiles.map(function (r) { - return path.resolve(basedir, r); - }); - } - else { - var files = basedir; - } - - var res = files.slice(1).reduce(function (ps, file) { - if (!file.match(/^([A-Za-z]:)?\/|\\/)) { - throw new Error('relative path without a basedir'); - } - - var xs = file.split(/\/+|\\+/); - for ( - var i = 0; - ps[i] === xs[i] && i < Math.min(ps.length, xs.length); - i++ - ); - return ps.slice(0, i); - }, files[0].split(/\/+|\\+/)); - - // Windows correctly handles paths with forward-slashes - return res.length > 1 ? res.join('/') : '/' -}; diff --git a/node_modules/browserify/node_modules/commondir/package.json b/node_modules/browserify/node_modules/commondir/package.json deleted file mode 100644 index f3e0183f..00000000 --- a/node_modules/browserify/node_modules/commondir/package.json +++ /dev/null @@ -1,69 +0,0 @@ -{ - "name": "commondir", - "version": "0.0.1", - "description": "Compute the closest common parent for file paths", - "main": "index.js", - "directories": { - "lib": ".", - "example": "example", - "test": "test" - }, - "dependencies": {}, - "devDependencies": { - "expresso": "0.7.x" - }, - "scripts": { - "test": "expresso" - }, - "repository": { - "type": "git", - "url": "git://github.com/substack/node-commondir.git" - }, - "keywords": [ - "common", - "path", - "directory", - "file", - "parent", - "root" - ], - "author": { - "name": "James Halliday", - "email": "mail@substack.net", - "url": "http://substack.net" - }, - "license": "MIT/X11", - "engine": { - "node": ">=0.4" - }, - "_npmUser": { - "name": "substack", - "email": "mail@substack.net" - }, - "_id": "commondir@0.0.1", - "engines": { - "node": "*" - }, - "_engineSupported": true, - "_npmVersion": "1.0.101", - "_nodeVersion": "v0.4.12", - "_defaultsLoaded": true, - "dist": { - "shasum": "89f00fdcd51b519c578733fec563e6a6da7f5be2", - "tarball": "https://registry.npmjs.org/commondir/-/commondir-0.0.1.tgz" - }, - "maintainers": [ - { - "name": "substack", - "email": "mail@substack.net" - } - ], - "_shasum": "89f00fdcd51b519c578733fec563e6a6da7f5be2", - "_resolved": "https://registry.npmjs.org/commondir/-/commondir-0.0.1.tgz", - "_from": "commondir@0.0.1", - "bugs": { - "url": "https://github.com/substack/node-commondir/issues" - }, - "readme": "ERROR: No README data found!", - "homepage": "https://github.com/substack/node-commondir" -} diff --git a/node_modules/browserify/node_modules/commondir/test/dirs.js b/node_modules/browserify/node_modules/commondir/test/dirs.js deleted file mode 100644 index 946026d1..00000000 --- a/node_modules/browserify/node_modules/commondir/test/dirs.js +++ /dev/null @@ -1,66 +0,0 @@ -var assert = require('assert'); -var commondir = require('../'); - -exports.common = function () { - assert.equal( - commondir([ '/foo', '//foo/bar', '/foo//bar/baz' ]), - '/foo' - ); - - assert.equal( - commondir([ '/a/b/c', '/a/b', '/a/b/c/d/e' ]), - '/a/b' - ); - - assert.equal( - commondir([ '/x/y/z/w', '/xy/z', '/x/y/z' ]), - '/' - ); - - assert.equal( - commondir([ 'X:\\foo', 'X:\\\\foo\\bar', 'X://foo/bar/baz' ]), - 'X:/foo' - ); - - assert.equal( - commondir([ 'X:\\a\\b\\c', 'X:\\a\\b', 'X:\\a\\b\\c\\d\\e' ]), - 'X:/a/b' - ); - - assert.equal( - commondir([ 'X:\\x\\y\\z\\w', '\\\\xy\\z', '\\x\\y\\z' ]), - '/' - ); - - assert.throws(function () { - assert.equal( - commondir([ '/x/y/z/w', 'qrs', '/x/y/z' ]), - '/' - ); - }); -}; - -exports.base = function () { - assert.equal( - commondir('/foo/bar', [ 'baz', './quux', '../bar/bazzy' ]), - '/foo/bar' - ); - - assert.equal( - commondir('/a/b', [ 'c', '../b/.', '../../a/b/e' ]), - '/a/b' - ); - - assert.equal( - commondir('/a/b/c', [ '..', '../d', '../../a/z/e' ]), - '/a' - ); - - assert.equal( - commondir('/foo/bar', [ 'baz', '.\\quux', '..\\bar\\bazzy' ]), - '/foo/bar' - ); - - // Tests including X:\ basedirs must wait until path.resolve supports - // Windows-style paths, starting in Node.js v0.5.X -}; diff --git a/node_modules/browserify/node_modules/concat-stream/LICENSE b/node_modules/browserify/node_modules/concat-stream/LICENSE deleted file mode 100644 index 99c130e1..00000000 --- a/node_modules/browserify/node_modules/concat-stream/LICENSE +++ /dev/null @@ -1,24 +0,0 @@ -The MIT License - -Copyright (c) 2013 Max Ogden - -Permission is hereby granted, free of charge, -to any person obtaining a copy of this software and -associated documentation files (the "Software"), to -deal in the Software without restriction, including -without limitation the rights to use, copy, modify, -merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom -the Software is furnished to do so, -subject to the following conditions: - -The above copyright notice and this permission notice -shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES -OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR -ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/node_modules/browserify/node_modules/concat-stream/index.js b/node_modules/browserify/node_modules/concat-stream/index.js deleted file mode 100644 index b55ae7e0..00000000 --- a/node_modules/browserify/node_modules/concat-stream/index.js +++ /dev/null @@ -1,136 +0,0 @@ -var Writable = require('readable-stream').Writable -var inherits = require('inherits') - -if (typeof Uint8Array === 'undefined') { - var U8 = require('typedarray').Uint8Array -} else { - var U8 = Uint8Array -} - -function ConcatStream(opts, cb) { - if (!(this instanceof ConcatStream)) return new ConcatStream(opts, cb) - - if (typeof opts === 'function') { - cb = opts - opts = {} - } - if (!opts) opts = {} - - var encoding = opts.encoding - var shouldInferEncoding = false - - if (!encoding) { - shouldInferEncoding = true - } else { - encoding = String(encoding).toLowerCase() - if (encoding === 'u8' || encoding === 'uint8') { - encoding = 'uint8array' - } - } - - Writable.call(this, { objectMode: true }) - - this.encoding = encoding - this.shouldInferEncoding = shouldInferEncoding - - if (cb) this.on('finish', function () { cb(this.getBody()) }) - this.body = [] -} - -module.exports = ConcatStream -inherits(ConcatStream, Writable) - -ConcatStream.prototype._write = function(chunk, enc, next) { - this.body.push(chunk) - next() -} - -ConcatStream.prototype.inferEncoding = function (buff) { - var firstBuffer = buff === undefined ? this.body[0] : buff; - if (Buffer.isBuffer(firstBuffer)) return 'buffer' - if (typeof Uint8Array !== 'undefined' && firstBuffer instanceof Uint8Array) return 'uint8array' - if (Array.isArray(firstBuffer)) return 'array' - if (typeof firstBuffer === 'string') return 'string' - if (Object.prototype.toString.call(firstBuffer) === "[object Object]") return 'object' - return 'buffer' -} - -ConcatStream.prototype.getBody = function () { - if (!this.encoding && this.body.length === 0) return [] - if (this.shouldInferEncoding) this.encoding = this.inferEncoding() - if (this.encoding === 'array') return arrayConcat(this.body) - if (this.encoding === 'string') return stringConcat(this.body) - if (this.encoding === 'buffer') return bufferConcat(this.body) - if (this.encoding === 'uint8array') return u8Concat(this.body) - return this.body -} - -var isArray = Array.isArray || function (arr) { - return Object.prototype.toString.call(arr) == '[object Array]' -} - -function isArrayish (arr) { - return /Array\]$/.test(Object.prototype.toString.call(arr)) -} - -function stringConcat (parts) { - var strings = [] - var needsToString = false - for (var i = 0; i < parts.length; i++) { - var p = parts[i] - if (typeof p === 'string') { - strings.push(p) - } else if (Buffer.isBuffer(p)) { - strings.push(p) - } else { - strings.push(Buffer(p)) - } - } - if (Buffer.isBuffer(parts[0])) { - strings = Buffer.concat(strings) - strings = strings.toString('utf8') - } else { - strings = strings.join('') - } - return strings -} - -function bufferConcat (parts) { - var bufs = [] - for (var i = 0; i < parts.length; i++) { - var p = parts[i] - if (Buffer.isBuffer(p)) { - bufs.push(p) - } else if (typeof p === 'string' || isArrayish(p) - || (p && typeof p.subarray === 'function')) { - bufs.push(Buffer(p)) - } else bufs.push(Buffer(String(p))) - } - return Buffer.concat(bufs) -} - -function arrayConcat (parts) { - var res = [] - for (var i = 0; i < parts.length; i++) { - res.push.apply(res, parts[i]) - } - return res -} - -function u8Concat (parts) { - var len = 0 - for (var i = 0; i < parts.length; i++) { - if (typeof parts[i] === 'string') { - parts[i] = Buffer(parts[i]) - } - len += parts[i].length - } - var u8 = new U8(len) - for (var i = 0, offset = 0; i < parts.length; i++) { - var part = parts[i] - for (var j = 0; j < part.length; j++) { - u8[offset++] = part[j] - } - } - return u8 -} diff --git a/node_modules/browserify/node_modules/concat-stream/node_modules/typedarray/.travis.yml b/node_modules/browserify/node_modules/concat-stream/node_modules/typedarray/.travis.yml deleted file mode 100644 index cc4dba29..00000000 --- a/node_modules/browserify/node_modules/concat-stream/node_modules/typedarray/.travis.yml +++ /dev/null @@ -1,4 +0,0 @@ -language: node_js -node_js: - - "0.8" - - "0.10" diff --git a/node_modules/browserify/node_modules/concat-stream/node_modules/typedarray/LICENSE b/node_modules/browserify/node_modules/concat-stream/node_modules/typedarray/LICENSE deleted file mode 100644 index 11adfaec..00000000 --- a/node_modules/browserify/node_modules/concat-stream/node_modules/typedarray/LICENSE +++ /dev/null @@ -1,35 +0,0 @@ -/* - Copyright (c) 2010, Linden Research, Inc. - Copyright (c) 2012, Joshua Bell - - 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. - $/LicenseInfo$ - */ - -// Original can be found at: -// https://bitbucket.org/lindenlab/llsd -// Modifications by Joshua Bell inexorabletash@gmail.com -// https://github.com/inexorabletash/polyfill - -// ES3/ES5 implementation of the Krhonos Typed Array Specification -// Ref: http://www.khronos.org/registry/typedarray/specs/latest/ -// Date: 2011-02-01 -// -// Variations: -// * Allows typed_array.get/set() as alias for subscripts (typed_array[]) diff --git a/node_modules/browserify/node_modules/concat-stream/node_modules/typedarray/example/tarray.js b/node_modules/browserify/node_modules/concat-stream/node_modules/typedarray/example/tarray.js deleted file mode 100644 index 8423d7c9..00000000 --- a/node_modules/browserify/node_modules/concat-stream/node_modules/typedarray/example/tarray.js +++ /dev/null @@ -1,4 +0,0 @@ -var Uint8Array = require('../').Uint8Array; -var ua = new Uint8Array(5); -ua[1] = 256 + 55; -console.log(ua[1]); diff --git a/node_modules/browserify/node_modules/concat-stream/node_modules/typedarray/index.js b/node_modules/browserify/node_modules/concat-stream/node_modules/typedarray/index.js deleted file mode 100644 index 5e540841..00000000 --- a/node_modules/browserify/node_modules/concat-stream/node_modules/typedarray/index.js +++ /dev/null @@ -1,630 +0,0 @@ -var undefined = (void 0); // Paranoia - -// Beyond this value, index getters/setters (i.e. array[0], array[1]) are so slow to -// create, and consume so much memory, that the browser appears frozen. -var MAX_ARRAY_LENGTH = 1e5; - -// Approximations of internal ECMAScript conversion functions -var ECMAScript = (function() { - // Stash a copy in case other scripts modify these - var opts = Object.prototype.toString, - ophop = Object.prototype.hasOwnProperty; - - return { - // Class returns internal [[Class]] property, used to avoid cross-frame instanceof issues: - Class: function(v) { return opts.call(v).replace(/^\[object *|\]$/g, ''); }, - HasProperty: function(o, p) { return p in o; }, - HasOwnProperty: function(o, p) { return ophop.call(o, p); }, - IsCallable: function(o) { return typeof o === 'function'; }, - ToInt32: function(v) { return v >> 0; }, - ToUint32: function(v) { return v >>> 0; } - }; -}()); - -// Snapshot intrinsics -var LN2 = Math.LN2, - abs = Math.abs, - floor = Math.floor, - log = Math.log, - min = Math.min, - pow = Math.pow, - round = Math.round; - -// ES5: lock down object properties -function configureProperties(obj) { - if (getOwnPropNames && defineProp) { - var props = getOwnPropNames(obj), i; - for (i = 0; i < props.length; i += 1) { - defineProp(obj, props[i], { - value: obj[props[i]], - writable: false, - enumerable: false, - configurable: false - }); - } - } -} - -// emulate ES5 getter/setter API using legacy APIs -// http://blogs.msdn.com/b/ie/archive/2010/09/07/transitioning-existing-code-to-the-es5-getter-setter-apis.aspx -// (second clause tests for Object.defineProperty() in IE<9 that only supports extending DOM prototypes, but -// note that IE<9 does not support __defineGetter__ or __defineSetter__ so it just renders the method harmless) -var defineProp -if (Object.defineProperty && (function() { - try { - Object.defineProperty({}, 'x', {}); - return true; - } catch (e) { - return false; - } - })()) { - defineProp = Object.defineProperty; -} else { - defineProp = function(o, p, desc) { - if (!o === Object(o)) throw new TypeError("Object.defineProperty called on non-object"); - if (ECMAScript.HasProperty(desc, 'get') && Object.prototype.__defineGetter__) { Object.prototype.__defineGetter__.call(o, p, desc.get); } - if (ECMAScript.HasProperty(desc, 'set') && Object.prototype.__defineSetter__) { Object.prototype.__defineSetter__.call(o, p, desc.set); } - if (ECMAScript.HasProperty(desc, 'value')) { o[p] = desc.value; } - return o; - }; -} - -var getOwnPropNames = Object.getOwnPropertyNames || function (o) { - if (o !== Object(o)) throw new TypeError("Object.getOwnPropertyNames called on non-object"); - var props = [], p; - for (p in o) { - if (ECMAScript.HasOwnProperty(o, p)) { - props.push(p); - } - } - return props; -}; - -// ES5: Make obj[index] an alias for obj._getter(index)/obj._setter(index, value) -// for index in 0 ... obj.length -function makeArrayAccessors(obj) { - if (!defineProp) { return; } - - if (obj.length > MAX_ARRAY_LENGTH) throw new RangeError("Array too large for polyfill"); - - function makeArrayAccessor(index) { - defineProp(obj, index, { - 'get': function() { return obj._getter(index); }, - 'set': function(v) { obj._setter(index, v); }, - enumerable: true, - configurable: false - }); - } - - var i; - for (i = 0; i < obj.length; i += 1) { - makeArrayAccessor(i); - } -} - -// Internal conversion functions: -// pack() - take a number (interpreted as Type), output a byte array -// unpack() - take a byte array, output a Type-like number - -function as_signed(value, bits) { var s = 32 - bits; return (value << s) >> s; } -function as_unsigned(value, bits) { var s = 32 - bits; return (value << s) >>> s; } - -function packI8(n) { return [n & 0xff]; } -function unpackI8(bytes) { return as_signed(bytes[0], 8); } - -function packU8(n) { return [n & 0xff]; } -function unpackU8(bytes) { return as_unsigned(bytes[0], 8); } - -function packU8Clamped(n) { n = round(Number(n)); return [n < 0 ? 0 : n > 0xff ? 0xff : n & 0xff]; } - -function packI16(n) { return [(n >> 8) & 0xff, n & 0xff]; } -function unpackI16(bytes) { return as_signed(bytes[0] << 8 | bytes[1], 16); } - -function packU16(n) { return [(n >> 8) & 0xff, n & 0xff]; } -function unpackU16(bytes) { return as_unsigned(bytes[0] << 8 | bytes[1], 16); } - -function packI32(n) { return [(n >> 24) & 0xff, (n >> 16) & 0xff, (n >> 8) & 0xff, n & 0xff]; } -function unpackI32(bytes) { return as_signed(bytes[0] << 24 | bytes[1] << 16 | bytes[2] << 8 | bytes[3], 32); } - -function packU32(n) { return [(n >> 24) & 0xff, (n >> 16) & 0xff, (n >> 8) & 0xff, n & 0xff]; } -function unpackU32(bytes) { return as_unsigned(bytes[0] << 24 | bytes[1] << 16 | bytes[2] << 8 | bytes[3], 32); } - -function packIEEE754(v, ebits, fbits) { - - var bias = (1 << (ebits - 1)) - 1, - s, e, f, ln, - i, bits, str, bytes; - - function roundToEven(n) { - var w = floor(n), f = n - w; - if (f < 0.5) - return w; - if (f > 0.5) - return w + 1; - return w % 2 ? w + 1 : w; - } - - // Compute sign, exponent, fraction - if (v !== v) { - // NaN - // http://dev.w3.org/2006/webapi/WebIDL/#es-type-mapping - e = (1 << ebits) - 1; f = pow(2, fbits - 1); s = 0; - } else if (v === Infinity || v === -Infinity) { - e = (1 << ebits) - 1; f = 0; s = (v < 0) ? 1 : 0; - } else if (v === 0) { - e = 0; f = 0; s = (1 / v === -Infinity) ? 1 : 0; - } else { - s = v < 0; - v = abs(v); - - if (v >= pow(2, 1 - bias)) { - e = min(floor(log(v) / LN2), 1023); - f = roundToEven(v / pow(2, e) * pow(2, fbits)); - if (f / pow(2, fbits) >= 2) { - e = e + 1; - f = 1; - } - if (e > bias) { - // Overflow - e = (1 << ebits) - 1; - f = 0; - } else { - // Normalized - e = e + bias; - f = f - pow(2, fbits); - } - } else { - // Denormalized - e = 0; - f = roundToEven(v / pow(2, 1 - bias - fbits)); - } - } - - // Pack sign, exponent, fraction - bits = []; - for (i = fbits; i; i -= 1) { bits.push(f % 2 ? 1 : 0); f = floor(f / 2); } - for (i = ebits; i; i -= 1) { bits.push(e % 2 ? 1 : 0); e = floor(e / 2); } - bits.push(s ? 1 : 0); - bits.reverse(); - str = bits.join(''); - - // Bits to bytes - bytes = []; - while (str.length) { - bytes.push(parseInt(str.substring(0, 8), 2)); - str = str.substring(8); - } - return bytes; -} - -function unpackIEEE754(bytes, ebits, fbits) { - - // Bytes to bits - var bits = [], i, j, b, str, - bias, s, e, f; - - for (i = bytes.length; i; i -= 1) { - b = bytes[i - 1]; - for (j = 8; j; j -= 1) { - bits.push(b % 2 ? 1 : 0); b = b >> 1; - } - } - bits.reverse(); - str = bits.join(''); - - // Unpack sign, exponent, fraction - bias = (1 << (ebits - 1)) - 1; - s = parseInt(str.substring(0, 1), 2) ? -1 : 1; - e = parseInt(str.substring(1, 1 + ebits), 2); - f = parseInt(str.substring(1 + ebits), 2); - - // Produce number - if (e === (1 << ebits) - 1) { - return f !== 0 ? NaN : s * Infinity; - } else if (e > 0) { - // Normalized - return s * pow(2, e - bias) * (1 + f / pow(2, fbits)); - } else if (f !== 0) { - // Denormalized - return s * pow(2, -(bias - 1)) * (f / pow(2, fbits)); - } else { - return s < 0 ? -0 : 0; - } -} - -function unpackF64(b) { return unpackIEEE754(b, 11, 52); } -function packF64(v) { return packIEEE754(v, 11, 52); } -function unpackF32(b) { return unpackIEEE754(b, 8, 23); } -function packF32(v) { return packIEEE754(v, 8, 23); } - - -// -// 3 The ArrayBuffer Type -// - -(function() { - - /** @constructor */ - var ArrayBuffer = function ArrayBuffer(length) { - length = ECMAScript.ToInt32(length); - if (length < 0) throw new RangeError('ArrayBuffer size is not a small enough positive integer'); - - this.byteLength = length; - this._bytes = []; - this._bytes.length = length; - - var i; - for (i = 0; i < this.byteLength; i += 1) { - this._bytes[i] = 0; - } - - configureProperties(this); - }; - - exports.ArrayBuffer = exports.ArrayBuffer || ArrayBuffer; - - // - // 4 The ArrayBufferView Type - // - - // NOTE: this constructor is not exported - /** @constructor */ - var ArrayBufferView = function ArrayBufferView() { - //this.buffer = null; - //this.byteOffset = 0; - //this.byteLength = 0; - }; - - // - // 5 The Typed Array View Types - // - - function makeConstructor(bytesPerElement, pack, unpack) { - // Each TypedArray type requires a distinct constructor instance with - // identical logic, which this produces. - - var ctor; - ctor = function(buffer, byteOffset, length) { - var array, sequence, i, s; - - if (!arguments.length || typeof arguments[0] === 'number') { - // Constructor(unsigned long length) - this.length = ECMAScript.ToInt32(arguments[0]); - if (length < 0) throw new RangeError('ArrayBufferView size is not a small enough positive integer'); - - this.byteLength = this.length * this.BYTES_PER_ELEMENT; - this.buffer = new ArrayBuffer(this.byteLength); - this.byteOffset = 0; - } else if (typeof arguments[0] === 'object' && arguments[0].constructor === ctor) { - // Constructor(TypedArray array) - array = arguments[0]; - - this.length = array.length; - this.byteLength = this.length * this.BYTES_PER_ELEMENT; - this.buffer = new ArrayBuffer(this.byteLength); - this.byteOffset = 0; - - for (i = 0; i < this.length; i += 1) { - this._setter(i, array._getter(i)); - } - } else if (typeof arguments[0] === 'object' && - !(arguments[0] instanceof ArrayBuffer || ECMAScript.Class(arguments[0]) === 'ArrayBuffer')) { - // Constructor(sequence array) - sequence = arguments[0]; - - this.length = ECMAScript.ToUint32(sequence.length); - this.byteLength = this.length * this.BYTES_PER_ELEMENT; - this.buffer = new ArrayBuffer(this.byteLength); - this.byteOffset = 0; - - for (i = 0; i < this.length; i += 1) { - s = sequence[i]; - this._setter(i, Number(s)); - } - } else if (typeof arguments[0] === 'object' && - (arguments[0] instanceof ArrayBuffer || ECMAScript.Class(arguments[0]) === 'ArrayBuffer')) { - // Constructor(ArrayBuffer buffer, - // optional unsigned long byteOffset, optional unsigned long length) - this.buffer = buffer; - - this.byteOffset = ECMAScript.ToUint32(byteOffset); - if (this.byteOffset > this.buffer.byteLength) { - throw new RangeError("byteOffset out of range"); - } - - if (this.byteOffset % this.BYTES_PER_ELEMENT) { - // The given byteOffset must be a multiple of the element - // size of the specific type, otherwise an exception is raised. - throw new RangeError("ArrayBuffer length minus the byteOffset is not a multiple of the element size."); - } - - if (arguments.length < 3) { - this.byteLength = this.buffer.byteLength - this.byteOffset; - - if (this.byteLength % this.BYTES_PER_ELEMENT) { - throw new RangeError("length of buffer minus byteOffset not a multiple of the element size"); - } - this.length = this.byteLength / this.BYTES_PER_ELEMENT; - } else { - this.length = ECMAScript.ToUint32(length); - this.byteLength = this.length * this.BYTES_PER_ELEMENT; - } - - if ((this.byteOffset + this.byteLength) > this.buffer.byteLength) { - throw new RangeError("byteOffset and length reference an area beyond the end of the buffer"); - } - } else { - throw new TypeError("Unexpected argument type(s)"); - } - - this.constructor = ctor; - - configureProperties(this); - makeArrayAccessors(this); - }; - - ctor.prototype = new ArrayBufferView(); - ctor.prototype.BYTES_PER_ELEMENT = bytesPerElement; - ctor.prototype._pack = pack; - ctor.prototype._unpack = unpack; - ctor.BYTES_PER_ELEMENT = bytesPerElement; - - // getter type (unsigned long index); - ctor.prototype._getter = function(index) { - if (arguments.length < 1) throw new SyntaxError("Not enough arguments"); - - index = ECMAScript.ToUint32(index); - if (index >= this.length) { - return undefined; - } - - var bytes = [], i, o; - for (i = 0, o = this.byteOffset + index * this.BYTES_PER_ELEMENT; - i < this.BYTES_PER_ELEMENT; - i += 1, o += 1) { - bytes.push(this.buffer._bytes[o]); - } - return this._unpack(bytes); - }; - - // NONSTANDARD: convenience alias for getter: type get(unsigned long index); - ctor.prototype.get = ctor.prototype._getter; - - // setter void (unsigned long index, type value); - ctor.prototype._setter = function(index, value) { - if (arguments.length < 2) throw new SyntaxError("Not enough arguments"); - - index = ECMAScript.ToUint32(index); - if (index >= this.length) { - return undefined; - } - - var bytes = this._pack(value), i, o; - for (i = 0, o = this.byteOffset + index * this.BYTES_PER_ELEMENT; - i < this.BYTES_PER_ELEMENT; - i += 1, o += 1) { - this.buffer._bytes[o] = bytes[i]; - } - }; - - // void set(TypedArray array, optional unsigned long offset); - // void set(sequence array, optional unsigned long offset); - ctor.prototype.set = function(index, value) { - if (arguments.length < 1) throw new SyntaxError("Not enough arguments"); - var array, sequence, offset, len, - i, s, d, - byteOffset, byteLength, tmp; - - if (typeof arguments[0] === 'object' && arguments[0].constructor === this.constructor) { - // void set(TypedArray array, optional unsigned long offset); - array = arguments[0]; - offset = ECMAScript.ToUint32(arguments[1]); - - if (offset + array.length > this.length) { - throw new RangeError("Offset plus length of array is out of range"); - } - - byteOffset = this.byteOffset + offset * this.BYTES_PER_ELEMENT; - byteLength = array.length * this.BYTES_PER_ELEMENT; - - if (array.buffer === this.buffer) { - tmp = []; - for (i = 0, s = array.byteOffset; i < byteLength; i += 1, s += 1) { - tmp[i] = array.buffer._bytes[s]; - } - for (i = 0, d = byteOffset; i < byteLength; i += 1, d += 1) { - this.buffer._bytes[d] = tmp[i]; - } - } else { - for (i = 0, s = array.byteOffset, d = byteOffset; - i < byteLength; i += 1, s += 1, d += 1) { - this.buffer._bytes[d] = array.buffer._bytes[s]; - } - } - } else if (typeof arguments[0] === 'object' && typeof arguments[0].length !== 'undefined') { - // void set(sequence array, optional unsigned long offset); - sequence = arguments[0]; - len = ECMAScript.ToUint32(sequence.length); - offset = ECMAScript.ToUint32(arguments[1]); - - if (offset + len > this.length) { - throw new RangeError("Offset plus length of array is out of range"); - } - - for (i = 0; i < len; i += 1) { - s = sequence[i]; - this._setter(offset + i, Number(s)); - } - } else { - throw new TypeError("Unexpected argument type(s)"); - } - }; - - // TypedArray subarray(long begin, optional long end); - ctor.prototype.subarray = function(start, end) { - function clamp(v, min, max) { return v < min ? min : v > max ? max : v; } - - start = ECMAScript.ToInt32(start); - end = ECMAScript.ToInt32(end); - - if (arguments.length < 1) { start = 0; } - if (arguments.length < 2) { end = this.length; } - - if (start < 0) { start = this.length + start; } - if (end < 0) { end = this.length + end; } - - start = clamp(start, 0, this.length); - end = clamp(end, 0, this.length); - - var len = end - start; - if (len < 0) { - len = 0; - } - - return new this.constructor( - this.buffer, this.byteOffset + start * this.BYTES_PER_ELEMENT, len); - }; - - return ctor; - } - - var Int8Array = makeConstructor(1, packI8, unpackI8); - var Uint8Array = makeConstructor(1, packU8, unpackU8); - var Uint8ClampedArray = makeConstructor(1, packU8Clamped, unpackU8); - var Int16Array = makeConstructor(2, packI16, unpackI16); - var Uint16Array = makeConstructor(2, packU16, unpackU16); - var Int32Array = makeConstructor(4, packI32, unpackI32); - var Uint32Array = makeConstructor(4, packU32, unpackU32); - var Float32Array = makeConstructor(4, packF32, unpackF32); - var Float64Array = makeConstructor(8, packF64, unpackF64); - - exports.Int8Array = exports.Int8Array || Int8Array; - exports.Uint8Array = exports.Uint8Array || Uint8Array; - exports.Uint8ClampedArray = exports.Uint8ClampedArray || Uint8ClampedArray; - exports.Int16Array = exports.Int16Array || Int16Array; - exports.Uint16Array = exports.Uint16Array || Uint16Array; - exports.Int32Array = exports.Int32Array || Int32Array; - exports.Uint32Array = exports.Uint32Array || Uint32Array; - exports.Float32Array = exports.Float32Array || Float32Array; - exports.Float64Array = exports.Float64Array || Float64Array; -}()); - -// -// 6 The DataView View Type -// - -(function() { - function r(array, index) { - return ECMAScript.IsCallable(array.get) ? array.get(index) : array[index]; - } - - var IS_BIG_ENDIAN = (function() { - var u16array = new(exports.Uint16Array)([0x1234]), - u8array = new(exports.Uint8Array)(u16array.buffer); - return r(u8array, 0) === 0x12; - }()); - - // Constructor(ArrayBuffer buffer, - // optional unsigned long byteOffset, - // optional unsigned long byteLength) - /** @constructor */ - var DataView = function DataView(buffer, byteOffset, byteLength) { - if (arguments.length === 0) { - buffer = new exports.ArrayBuffer(0); - } else if (!(buffer instanceof exports.ArrayBuffer || ECMAScript.Class(buffer) === 'ArrayBuffer')) { - throw new TypeError("TypeError"); - } - - this.buffer = buffer || new exports.ArrayBuffer(0); - - this.byteOffset = ECMAScript.ToUint32(byteOffset); - if (this.byteOffset > this.buffer.byteLength) { - throw new RangeError("byteOffset out of range"); - } - - if (arguments.length < 3) { - this.byteLength = this.buffer.byteLength - this.byteOffset; - } else { - this.byteLength = ECMAScript.ToUint32(byteLength); - } - - if ((this.byteOffset + this.byteLength) > this.buffer.byteLength) { - throw new RangeError("byteOffset and length reference an area beyond the end of the buffer"); - } - - configureProperties(this); - }; - - function makeGetter(arrayType) { - return function(byteOffset, littleEndian) { - - byteOffset = ECMAScript.ToUint32(byteOffset); - - if (byteOffset + arrayType.BYTES_PER_ELEMENT > this.byteLength) { - throw new RangeError("Array index out of range"); - } - byteOffset += this.byteOffset; - - var uint8Array = new exports.Uint8Array(this.buffer, byteOffset, arrayType.BYTES_PER_ELEMENT), - bytes = [], i; - for (i = 0; i < arrayType.BYTES_PER_ELEMENT; i += 1) { - bytes.push(r(uint8Array, i)); - } - - if (Boolean(littleEndian) === Boolean(IS_BIG_ENDIAN)) { - bytes.reverse(); - } - - return r(new arrayType(new exports.Uint8Array(bytes).buffer), 0); - }; - } - - DataView.prototype.getUint8 = makeGetter(exports.Uint8Array); - DataView.prototype.getInt8 = makeGetter(exports.Int8Array); - DataView.prototype.getUint16 = makeGetter(exports.Uint16Array); - DataView.prototype.getInt16 = makeGetter(exports.Int16Array); - DataView.prototype.getUint32 = makeGetter(exports.Uint32Array); - DataView.prototype.getInt32 = makeGetter(exports.Int32Array); - DataView.prototype.getFloat32 = makeGetter(exports.Float32Array); - DataView.prototype.getFloat64 = makeGetter(exports.Float64Array); - - function makeSetter(arrayType) { - return function(byteOffset, value, littleEndian) { - - byteOffset = ECMAScript.ToUint32(byteOffset); - if (byteOffset + arrayType.BYTES_PER_ELEMENT > this.byteLength) { - throw new RangeError("Array index out of range"); - } - - // Get bytes - var typeArray = new arrayType([value]), - byteArray = new exports.Uint8Array(typeArray.buffer), - bytes = [], i, byteView; - - for (i = 0; i < arrayType.BYTES_PER_ELEMENT; i += 1) { - bytes.push(r(byteArray, i)); - } - - // Flip if necessary - if (Boolean(littleEndian) === Boolean(IS_BIG_ENDIAN)) { - bytes.reverse(); - } - - // Write them - byteView = new exports.Uint8Array(this.buffer, byteOffset, arrayType.BYTES_PER_ELEMENT); - byteView.set(bytes); - }; - } - - DataView.prototype.setUint8 = makeSetter(exports.Uint8Array); - DataView.prototype.setInt8 = makeSetter(exports.Int8Array); - DataView.prototype.setUint16 = makeSetter(exports.Uint16Array); - DataView.prototype.setInt16 = makeSetter(exports.Int16Array); - DataView.prototype.setUint32 = makeSetter(exports.Uint32Array); - DataView.prototype.setInt32 = makeSetter(exports.Int32Array); - DataView.prototype.setFloat32 = makeSetter(exports.Float32Array); - DataView.prototype.setFloat64 = makeSetter(exports.Float64Array); - - exports.DataView = exports.DataView || DataView; - -}()); diff --git a/node_modules/browserify/node_modules/concat-stream/node_modules/typedarray/package.json b/node_modules/browserify/node_modules/concat-stream/node_modules/typedarray/package.json deleted file mode 100644 index b8b59f5c..00000000 --- a/node_modules/browserify/node_modules/concat-stream/node_modules/typedarray/package.json +++ /dev/null @@ -1,79 +0,0 @@ -{ - "name": "typedarray", - "version": "0.0.6", - "description": "TypedArray polyfill for old browsers", - "main": "index.js", - "devDependencies": { - "tape": "~2.3.2" - }, - "scripts": { - "test": "tape test/*.js test/server/*.js" - }, - "repository": { - "type": "git", - "url": "git://github.com/substack/typedarray.git" - }, - "homepage": "https://github.com/substack/typedarray", - "keywords": [ - "ArrayBuffer", - "DataView", - "Float32Array", - "Float64Array", - "Int8Array", - "Int16Array", - "Int32Array", - "Uint8Array", - "Uint8ClampedArray", - "Uint16Array", - "Uint32Array", - "typed", - "array", - "polyfill" - ], - "author": { - "name": "James Halliday", - "email": "mail@substack.net", - "url": "http://substack.net" - }, - "license": "MIT", - "testling": { - "files": "test/*.js", - "browsers": [ - "ie/6..latest", - "firefox/16..latest", - "firefox/nightly", - "chrome/22..latest", - "chrome/canary", - "opera/12..latest", - "opera/next", - "safari/5.1..latest", - "ipad/6.0..latest", - "iphone/6.0..latest", - "android-browser/4.2..latest" - ] - }, - "bugs": { - "url": "https://github.com/substack/typedarray/issues" - }, - "_id": "typedarray@0.0.6", - "dist": { - "shasum": "867ac74e3864187b1d3d47d996a78ec5c8830777", - "tarball": "http://registry.npmjs.org/typedarray/-/typedarray-0.0.6.tgz" - }, - "_from": "typedarray@>=0.0.5 <0.1.0", - "_npmVersion": "1.4.3", - "_npmUser": { - "name": "substack", - "email": "mail@substack.net" - }, - "maintainers": [ - { - "name": "substack", - "email": "mail@substack.net" - } - ], - "directories": {}, - "_shasum": "867ac74e3864187b1d3d47d996a78ec5c8830777", - "_resolved": "https://registry.npmjs.org/typedarray/-/typedarray-0.0.6.tgz", - "readme": "ERROR: No README data found!" -} diff --git a/node_modules/browserify/node_modules/concat-stream/node_modules/typedarray/readme.markdown b/node_modules/browserify/node_modules/concat-stream/node_modules/typedarray/readme.markdown deleted file mode 100644 index d18f6f71..00000000 --- a/node_modules/browserify/node_modules/concat-stream/node_modules/typedarray/readme.markdown +++ /dev/null @@ -1,61 +0,0 @@ -# typedarray - -TypedArray polyfill ripped from [this -module](https://raw.github.com/inexorabletash/polyfill). - -[![build status](https://secure.travis-ci.org/substack/typedarray.png)](http://travis-ci.org/substack/typedarray) - -[![testling badge](https://ci.testling.com/substack/typedarray.png)](https://ci.testling.com/substack/typedarray) - -# example - -``` js -var Uint8Array = require('typedarray').Uint8Array; -var ua = new Uint8Array(5); -ua[1] = 256 + 55; -console.log(ua[1]); -``` - -output: - -``` -55 -``` - -# methods - -``` js -var TA = require('typedarray') -``` - -The `TA` object has the following constructors: - -* TA.ArrayBuffer -* TA.DataView -* TA.Float32Array -* TA.Float64Array -* TA.Int8Array -* TA.Int16Array -* TA.Int32Array -* TA.Uint8Array -* TA.Uint8ClampedArray -* TA.Uint16Array -* TA.Uint32Array - -# install - -With [npm](https://npmjs.org) do: - -``` -npm install typedarray -``` - -To use this module in the browser, compile with -[browserify](http://browserify.org) -or download a UMD build from browserify CDN: - -http://wzrd.in/standalone/typedarray@latest - -# license - -MIT diff --git a/node_modules/browserify/node_modules/concat-stream/node_modules/typedarray/test/server/undef_globals.js b/node_modules/browserify/node_modules/concat-stream/node_modules/typedarray/test/server/undef_globals.js deleted file mode 100644 index 425950f9..00000000 --- a/node_modules/browserify/node_modules/concat-stream/node_modules/typedarray/test/server/undef_globals.js +++ /dev/null @@ -1,19 +0,0 @@ -var test = require('tape'); -var vm = require('vm'); -var fs = require('fs'); -var src = fs.readFileSync(__dirname + '/../../index.js', 'utf8'); - -test('u8a without globals', function (t) { - var c = { - module: { exports: {} }, - }; - c.exports = c.module.exports; - vm.runInNewContext(src, c); - var TA = c.module.exports; - var ua = new(TA.Uint8Array)(5); - - t.equal(ua.length, 5); - ua[1] = 256 + 55; - t.equal(ua[1], 55); - t.end(); -}); diff --git a/node_modules/browserify/node_modules/concat-stream/node_modules/typedarray/test/tarray.js b/node_modules/browserify/node_modules/concat-stream/node_modules/typedarray/test/tarray.js deleted file mode 100644 index df596a34..00000000 --- a/node_modules/browserify/node_modules/concat-stream/node_modules/typedarray/test/tarray.js +++ /dev/null @@ -1,10 +0,0 @@ -var TA = require('../'); -var test = require('tape'); - -test('tiny u8a test', function (t) { - var ua = new(TA.Uint8Array)(5); - t.equal(ua.length, 5); - ua[1] = 256 + 55; - t.equal(ua[1], 55); - t.end(); -}); diff --git a/node_modules/browserify/node_modules/concat-stream/package.json b/node_modules/browserify/node_modules/concat-stream/package.json deleted file mode 100644 index 69b9ffcc..00000000 --- a/node_modules/browserify/node_modules/concat-stream/package.json +++ /dev/null @@ -1,81 +0,0 @@ -{ - "name": "concat-stream", - "version": "1.4.10", - "description": "writable stream that concatenates strings or binary data and calls a callback with the result", - "tags": [ - "stream", - "simple", - "util", - "utility" - ], - "author": { - "name": "Max Ogden", - "email": "max@maxogden.com" - }, - "repository": { - "type": "git", - "url": "git+ssh://git@github.com/maxogden/concat-stream.git" - }, - "bugs": { - "url": "http://github.com/maxogden/concat-stream/issues" - }, - "engines": [ - "node >= 0.8" - ], - "main": "index.js", - "files": [ - "index.js" - ], - "scripts": { - "test": "tape test/*.js test/server/*.js" - }, - "license": "MIT", - "dependencies": { - "inherits": "~2.0.1", - "typedarray": "~0.0.5", - "readable-stream": "~1.1.9" - }, - "devDependencies": { - "tape": "~2.3.2" - }, - "testling": { - "files": "test/*.js", - "browsers": [ - "ie/8..latest", - "firefox/17..latest", - "firefox/nightly", - "chrome/22..latest", - "chrome/canary", - "opera/12..latest", - "opera/next", - "safari/5.1..latest", - "ipad/6.0..latest", - "iphone/6.0..latest", - "android-browser/4.2..latest" - ] - }, - "gitHead": "71d37be263a0457b8afcbb27237e71ddca634373", - "homepage": "https://github.com/maxogden/concat-stream#readme", - "_id": "concat-stream@1.4.10", - "_shasum": "acc3bbf5602cb8cc980c6ac840fa7d8603e3ef36", - "_from": "concat-stream@>=1.4.1 <1.5.0", - "_npmVersion": "2.9.0", - "_nodeVersion": "1.8.2", - "_npmUser": { - "name": "maxogden", - "email": "max@maxogden.com" - }, - "maintainers": [ - { - "name": "maxogden", - "email": "max@maxogden.com" - } - ], - "dist": { - "shasum": "acc3bbf5602cb8cc980c6ac840fa7d8603e3ef36", - "tarball": "http://registry.npmjs.org/concat-stream/-/concat-stream-1.4.10.tgz" - }, - "directories": {}, - "_resolved": "https://registry.npmjs.org/concat-stream/-/concat-stream-1.4.10.tgz", - "readme": "ERROR: No README data found!" -} diff --git a/node_modules/browserify/node_modules/concat-stream/readme.md b/node_modules/browserify/node_modules/concat-stream/readme.md deleted file mode 100644 index 69234d52..00000000 --- a/node_modules/browserify/node_modules/concat-stream/readme.md +++ /dev/null @@ -1,94 +0,0 @@ -# concat-stream - -Writable stream that concatenates strings or binary data and calls a callback with the result. Not a transform stream -- more of a stream sink. - -[![Build Status](https://travis-ci.org/maxogden/concat-stream.svg?branch=master)](https://travis-ci.org/maxogden/concat-stream) - -[![NPM](https://nodei.co/npm/concat-stream.png)](https://nodei.co/npm/concat-stream/) - -### description - -Streams emit many buffers. If you want to collect all of the buffers, and when the stream ends concatenate all of the buffers together and receive a single buffer then this is the module for you. - -Only use this if you know you can fit all of the output of your stream into a single Buffer (e.g. in RAM). - -There are also `objectMode` streams that emit things other than Buffers, and you can concatenate these too. See below for details. - -### examples - -#### Buffers - -```js -var fs = require('fs') -var concat = require('concat-stream') - -var readStream = fs.createReadStream('cat.png') -var concatStream = concat(gotPicture) - -readStream.on('error', handleError) -readStream.pipe(concatStream) - -function gotPicture(imageBuffer) { - // imageBuffer is all of `cat.png` as a node.js Buffer -} - -function handleError(err) { - // handle your error appropriately here, e.g.: - console.error(err) // print the error to STDERR - process.exit(1) // exit program with non-zero exit code -} - -``` - -#### Arrays - -```js -var write = concat(function(data) {}) -write.write([1,2,3]) -write.write([4,5,6]) -write.end() -// data will be [1,2,3,4,5,6] in the above callback -``` - -#### Uint8Arrays - -```js -var write = concat(function(data) {}) -var a = new Uint8Array(3) -a[0] = 97; a[1] = 98; a[2] = 99 -write.write(a) -write.write('!') -write.end(Buffer('!!1')) -``` - -See `test/` for more examples - -# methods - -```js -var concat = require('concat-stream') -``` - -## var writable = concat(opts={}, cb) - -Return a `writable` stream that will fire `cb(data)` with all of the data that -was written to the stream. Data can be written to `writable` as strings, -Buffers, arrays of byte integers, and Uint8Arrays. - -By default `concat-stream` will give you back the same data type as the type of the first buffer written to the stream. Use `opts.encoding` to set what format `data` should be returned as, e.g. if you if you don't want to rely on the built-in type checking or for some other reason. - -* `string` - get a string -* `buffer` - get back a Buffer -* `array` - get an array of byte integers -* `uint8array`, `u8`, `uint8` - get back a Uint8Array -* `object`, get back an array of Objects - -If you don't specify an encoding, and the types can't be inferred (e.g. you write things that aren't in the list above), it will try to convert concat them into a `Buffer`. - -# error handling - -`concat-stream` does not handle errors for you, so you must handle errors on whatever streams you pipe into `concat-stream`. This is a general rule when programming with node.js streams: always handle errors on each and every stream. Since `concat-stream` is not itself a stream it does not emit errors. - -# license - -MIT LICENSE diff --git a/node_modules/browserify/node_modules/console-browserify/.npmignore b/node_modules/browserify/node_modules/console-browserify/.npmignore deleted file mode 100644 index aa3fd4b8..00000000 --- a/node_modules/browserify/node_modules/console-browserify/.npmignore +++ /dev/null @@ -1,14 +0,0 @@ -.DS_Store -.monitor -.*.swp -.nodemonignore -releases -*.log -*.err -fleet.json -public/browserify -bin/*.json -.bin -build -compile -.lock-wscript diff --git a/node_modules/browserify/node_modules/console-browserify/.testem.json b/node_modules/browserify/node_modules/console-browserify/.testem.json deleted file mode 100644 index 633c2ba8..00000000 --- a/node_modules/browserify/node_modules/console-browserify/.testem.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "launchers": { - "node": { - "command": "npm test" - } - }, - "src_files": [ - "./**/*.js" - ], - "before_tests": "npm run build", - "on_exit": "rm test/static/bundle.js", - "test_page": "test/static/index.html", - "launch_in_dev": ["node", "phantomjs"] -} diff --git a/node_modules/browserify/node_modules/console-browserify/.travis.yml b/node_modules/browserify/node_modules/console-browserify/.travis.yml deleted file mode 100644 index ed178f63..00000000 --- a/node_modules/browserify/node_modules/console-browserify/.travis.yml +++ /dev/null @@ -1,4 +0,0 @@ -language: node_js -node_js: - - 0.8 - - 0.9 diff --git a/node_modules/browserify/node_modules/console-browserify/LICENCE b/node_modules/browserify/node_modules/console-browserify/LICENCE deleted file mode 100644 index a23e08a8..00000000 --- a/node_modules/browserify/node_modules/console-browserify/LICENCE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (c) 2012 Raynos. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. \ No newline at end of file diff --git a/node_modules/browserify/node_modules/console-browserify/README.md b/node_modules/browserify/node_modules/console-browserify/README.md deleted file mode 100644 index 572615eb..00000000 --- a/node_modules/browserify/node_modules/console-browserify/README.md +++ /dev/null @@ -1,33 +0,0 @@ -# console-browserify - -[![build status][1]][2] - -[![browser support][3]][4] - - -Emulate console for all the browsers - -## Example - -```js -var console = require("console-browserify") - -console.log("hello world!") -``` - -## Installation - -`npm install console-browserify` - -## Contributors - - - Raynos - -## MIT Licenced - - - - [1]: https://secure.travis-ci.org/Raynos/console-browserify.png - [2]: http://travis-ci.org/Raynos/console-browserify - [3]: http://ci.testling.com/Raynos/console-browserify.png - [4]: http://ci.testling.com/Raynos/console-browserify diff --git a/node_modules/browserify/node_modules/console-browserify/index.js b/node_modules/browserify/node_modules/console-browserify/index.js deleted file mode 100644 index af433ce8..00000000 --- a/node_modules/browserify/node_modules/console-browserify/index.js +++ /dev/null @@ -1,86 +0,0 @@ -/*global window, global*/ -var util = require("util") -var assert = require("assert") -var now = require("date-now") - -var slice = Array.prototype.slice -var console -var times = {} - -if (typeof global !== "undefined" && global.console) { - console = global.console -} else if (typeof window !== "undefined" && window.console) { - console = window.console -} else { - console = {} -} - -var functions = [ - [log, "log"], - [info, "info"], - [warn, "warn"], - [error, "error"], - [time, "time"], - [timeEnd, "timeEnd"], - [trace, "trace"], - [dir, "dir"], - [consoleAssert, "assert"] -] - -for (var i = 0; i < functions.length; i++) { - var tuple = functions[i] - var f = tuple[0] - var name = tuple[1] - - if (!console[name]) { - console[name] = f - } -} - -module.exports = console - -function log() {} - -function info() { - console.log.apply(console, arguments) -} - -function warn() { - console.log.apply(console, arguments) -} - -function error() { - console.warn.apply(console, arguments) -} - -function time(label) { - times[label] = now() -} - -function timeEnd(label) { - var time = times[label] - if (!time) { - throw new Error("No such label: " + label) - } - - var duration = now() - time - console.log(label + ": " + duration + "ms") -} - -function trace() { - var err = new Error() - err.name = "Trace" - err.message = util.format.apply(null, arguments) - console.error(err.stack) -} - -function dir(object) { - console.log(util.inspect(object) + "\n") -} - -function consoleAssert(expression) { - if (!expression) { - var arr = slice.call(arguments, 1) - assert.ok(false, util.format.apply(null, arr)) - } -} diff --git a/node_modules/browserify/node_modules/console-browserify/node_modules/date-now/.npmignore b/node_modules/browserify/node_modules/console-browserify/node_modules/date-now/.npmignore deleted file mode 100644 index aa3fd4b8..00000000 --- a/node_modules/browserify/node_modules/console-browserify/node_modules/date-now/.npmignore +++ /dev/null @@ -1,14 +0,0 @@ -.DS_Store -.monitor -.*.swp -.nodemonignore -releases -*.log -*.err -fleet.json -public/browserify -bin/*.json -.bin -build -compile -.lock-wscript diff --git a/node_modules/browserify/node_modules/console-browserify/node_modules/date-now/.testem.json b/node_modules/browserify/node_modules/console-browserify/node_modules/date-now/.testem.json deleted file mode 100644 index 633c2ba8..00000000 --- a/node_modules/browserify/node_modules/console-browserify/node_modules/date-now/.testem.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "launchers": { - "node": { - "command": "npm test" - } - }, - "src_files": [ - "./**/*.js" - ], - "before_tests": "npm run build", - "on_exit": "rm test/static/bundle.js", - "test_page": "test/static/index.html", - "launch_in_dev": ["node", "phantomjs"] -} diff --git a/node_modules/browserify/node_modules/console-browserify/node_modules/date-now/.travis.yml b/node_modules/browserify/node_modules/console-browserify/node_modules/date-now/.travis.yml deleted file mode 100644 index ed178f63..00000000 --- a/node_modules/browserify/node_modules/console-browserify/node_modules/date-now/.travis.yml +++ /dev/null @@ -1,4 +0,0 @@ -language: node_js -node_js: - - 0.8 - - 0.9 diff --git a/node_modules/browserify/node_modules/console-browserify/node_modules/date-now/LICENCE b/node_modules/browserify/node_modules/console-browserify/node_modules/date-now/LICENCE deleted file mode 100644 index 822d880b..00000000 --- a/node_modules/browserify/node_modules/console-browserify/node_modules/date-now/LICENCE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (c) 2012 Colingo. - -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/node_modules/browserify/node_modules/console-browserify/node_modules/date-now/README.md b/node_modules/browserify/node_modules/console-browserify/node_modules/date-now/README.md deleted file mode 100644 index 22d26753..00000000 --- a/node_modules/browserify/node_modules/console-browserify/node_modules/date-now/README.md +++ /dev/null @@ -1,45 +0,0 @@ -# date-now - -[![build status][1]][2] - -[![browser support][3]][4] - -A requirable version of Date.now() - -Use-case is to be able to mock out Date.now() using require interception. - -## Example - -```js -var now = require("date-now") - -var ts = now() -var ts2 = Date.now() -assert.equal(ts, ts2) -``` - -## example of seed - -``` -var now = require("date-now/seed")(timeStampFromServer) - -// ts is in "sync" with the seed value from the server -// useful if your users have their local time being a few minutes -// out of your server time. -var ts = now() -``` - -## Installation - -`npm install date-now` - -## Contributors - - - Raynos - -## MIT Licenced - - [1]: https://secure.travis-ci.org/Colingo/date-now.png - [2]: http://travis-ci.org/Colingo/date-now - [3]: http://ci.testling.com/Colingo/date-now.png - [4]: http://ci.testling.com/Colingo/date-now diff --git a/node_modules/browserify/node_modules/console-browserify/node_modules/date-now/index.js b/node_modules/browserify/node_modules/console-browserify/node_modules/date-now/index.js deleted file mode 100644 index d5f143a8..00000000 --- a/node_modules/browserify/node_modules/console-browserify/node_modules/date-now/index.js +++ /dev/null @@ -1,5 +0,0 @@ -module.exports = now - -function now() { - return new Date().getTime() -} diff --git a/node_modules/browserify/node_modules/console-browserify/node_modules/date-now/package.json b/node_modules/browserify/node_modules/console-browserify/node_modules/date-now/package.json deleted file mode 100644 index de14e100..00000000 --- a/node_modules/browserify/node_modules/console-browserify/node_modules/date-now/package.json +++ /dev/null @@ -1,90 +0,0 @@ -{ - "name": "date-now", - "version": "0.1.4", - "description": "A requirable version of Date.now()", - "keywords": [], - "author": { - "name": "Raynos", - "email": "raynos2@gmail.com" - }, - "repository": { - "type": "git", - "url": "git://github.com/Colingo/date-now.git" - }, - "main": "index", - "homepage": "https://github.com/Colingo/date-now", - "contributors": [ - { - "name": "Artem Shoobovych" - } - ], - "bugs": { - "url": "https://github.com/Colingo/date-now/issues", - "email": "raynos2@gmail.com" - }, - "dependencies": {}, - "devDependencies": { - "tape": "~0.2.2", - "browserify": "https://github.com/raynos/node-browserify/tarball/master", - "testem": "~0.2.52" - }, - "licenses": [ - { - "type": "MIT", - "url": "http://github.com/Colingo/date-now/raw/master/LICENSE" - } - ], - "scripts": { - "test": "node ./test", - "build": "browserify test/index.js -o test/static/bundle.js", - "testem": "testem" - }, - "testling": { - "files": "test/*.js", - "browsers": { - "ie": [ - "8", - "9", - "10" - ], - "firefox": [ - "16", - "17", - "nightly" - ], - "chrome": [ - "22", - "23", - "canary" - ], - "opera": [ - "12", - "next" - ], - "safari": [ - "5.1" - ] - } - }, - "_id": "date-now@0.1.4", - "dist": { - "shasum": "eaf439fd4d4848ad74e5cc7dbef200672b9e345b", - "tarball": "http://registry.npmjs.org/date-now/-/date-now-0.1.4.tgz" - }, - "_from": "date-now@>=0.1.4 <0.2.0", - "_npmVersion": "1.2.3", - "_npmUser": { - "name": "raynos", - "email": "raynos2@gmail.com" - }, - "maintainers": [ - { - "name": "raynos", - "email": "raynos2@gmail.com" - } - ], - "directories": {}, - "_shasum": "eaf439fd4d4848ad74e5cc7dbef200672b9e345b", - "_resolved": "https://registry.npmjs.org/date-now/-/date-now-0.1.4.tgz", - "readme": "ERROR: No README data found!" -} diff --git a/node_modules/browserify/node_modules/console-browserify/node_modules/date-now/seed.js b/node_modules/browserify/node_modules/console-browserify/node_modules/date-now/seed.js deleted file mode 100644 index b9727c5a..00000000 --- a/node_modules/browserify/node_modules/console-browserify/node_modules/date-now/seed.js +++ /dev/null @@ -1,16 +0,0 @@ -var now = require("./index") - -module.exports = seeded - -/* Returns a Date.now() like function that's in sync with - the seed value -*/ -function seeded(seed) { - var current = now() - - return time - - function time() { - return seed + (now() - current) - } -} diff --git a/node_modules/browserify/node_modules/console-browserify/node_modules/date-now/test/index.js b/node_modules/browserify/node_modules/console-browserify/node_modules/date-now/test/index.js deleted file mode 100644 index 270584ca..00000000 --- a/node_modules/browserify/node_modules/console-browserify/node_modules/date-now/test/index.js +++ /dev/null @@ -1,28 +0,0 @@ -var test = require("tape") -var setTimeout = require("timers").setTimeout - -var now = require("../index") -var seeded = require("../seed") - -test("date", function (assert) { - var ts = now() - var ts2 = Date.now() - assert.equal(ts, ts2) - assert.end() -}) - -test("seeded", function (assert) { - var time = seeded(40) - var ts = time() - - within(assert, time(), 40, 5) - setTimeout(function () { - within(assert, time(), 90, 10) - assert.end() - }, 50) -}) - -function within(assert, a, b, offset) { - assert.ok(a + offset > b) - assert.ok(a - offset < b) -} diff --git a/node_modules/browserify/node_modules/console-browserify/node_modules/date-now/test/static/index.html b/node_modules/browserify/node_modules/console-browserify/node_modules/date-now/test/static/index.html deleted file mode 100644 index 3d5384da..00000000 --- a/node_modules/browserify/node_modules/console-browserify/node_modules/date-now/test/static/index.html +++ /dev/null @@ -1,10 +0,0 @@ - - - - TAPE Example - - - - - - diff --git a/node_modules/browserify/node_modules/console-browserify/package.json b/node_modules/browserify/node_modules/console-browserify/package.json deleted file mode 100644 index 61eb9770..00000000 --- a/node_modules/browserify/node_modules/console-browserify/package.json +++ /dev/null @@ -1,89 +0,0 @@ -{ - "name": "console-browserify", - "version": "1.1.0", - "description": "Emulate console for all the browsers", - "keywords": [], - "author": { - "name": "Raynos", - "email": "raynos2@gmail.com" - }, - "repository": { - "type": "git", - "url": "git://github.com/Raynos/console-browserify.git" - }, - "main": "index", - "homepage": "https://github.com/Raynos/console-browserify", - "contributors": [ - { - "name": "Raynos" - } - ], - "bugs": { - "url": "https://github.com/Raynos/console-browserify/issues", - "email": "raynos2@gmail.com" - }, - "dependencies": { - "date-now": "^0.1.4" - }, - "devDependencies": { - "tape": "^2.12.3", - "jsonify": "0.0.0", - "tap-spec": "^0.1.8", - "run-browser": "^1.3.0", - "tap-dot": "^0.2.1" - }, - "licenses": [ - { - "type": "MIT", - "url": "http://github.com/Raynos/console-browserify/raw/master/LICENSE" - } - ], - "scripts": { - "test": "node ./test/index.js | tap-spec", - "dot": "node ./test/index.js | tap-dot", - "start": "node ./index.js", - "cover": "istanbul cover --report none --print detail ./test/index.js", - "view-cover": "istanbul report html && google-chrome ./coverage/index.html", - "browser": "run-browser test/index.js", - "phantom": "run-browser test/index.js -b | tap-spec", - "build": "browserify test/index.js -o test/static/bundle.js", - "testem": "testem" - }, - "testling": { - "files": "test/index.js", - "browsers": [ - "ie/8..latest", - "firefox/16..latest", - "firefox/nightly", - "chrome/22..latest", - "chrome/canary", - "opera/12..latest", - "opera/next", - "safari/5.1..latest", - "ipad/6.0..latest", - "iphone/6.0..latest", - "android-browser/4.2..latest" - ] - }, - "_id": "console-browserify@1.1.0", - "dist": { - "shasum": "f0241c45730a9fc6323b206dbf38edc741d0bb10", - "tarball": "http://registry.npmjs.org/console-browserify/-/console-browserify-1.1.0.tgz" - }, - "_from": "console-browserify@>=1.1.0 <2.0.0", - "_npmVersion": "1.4.6", - "_npmUser": { - "name": "raynos", - "email": "raynos2@gmail.com" - }, - "maintainers": [ - { - "name": "raynos", - "email": "raynos2@gmail.com" - } - ], - "directories": {}, - "_shasum": "f0241c45730a9fc6323b206dbf38edc741d0bb10", - "_resolved": "https://registry.npmjs.org/console-browserify/-/console-browserify-1.1.0.tgz", - "readme": "ERROR: No README data found!" -} diff --git a/node_modules/browserify/node_modules/console-browserify/test/index.js b/node_modules/browserify/node_modules/console-browserify/test/index.js deleted file mode 100644 index 26dfaad6..00000000 --- a/node_modules/browserify/node_modules/console-browserify/test/index.js +++ /dev/null @@ -1,67 +0,0 @@ -var console = require("../index") -var test = require("tape") - -if (typeof window !== "undefined" && !window.JSON) { - window.JSON = require("jsonify") -} - -test("console has expected methods", function (assert) { - assert.ok(console.log) - assert.ok(console.info) - assert.ok(console.warn) - assert.ok(console.dir) - assert.ok(console.time, "time") - assert.ok(console.timeEnd, "timeEnd") - assert.ok(console.trace, "trace") - assert.ok(console.assert) - - assert.end() -}) - -test("invoke console.log", function (assert) { - console.log("test-log") - - assert.end() -}) - -test("invoke console.info", function (assert) { - console.info("test-info") - - assert.end() -}) - -test("invoke console.warn", function (assert) { - console.warn("test-warn") - - assert.end() -}) - -test("invoke console.time", function (assert) { - console.time("label") - - assert.end() -}) - -test("invoke console.trace", function (assert) { - console.trace("test-trace") - - assert.end() -}) - -test("invoke console.assert", function (assert) { - console.assert(true) - - assert.end() -}) - -test("invoke console.dir", function (assert) { - console.dir("test-dir") - - assert.end() -}) - -test("invoke console.timeEnd", function (assert) { - console.timeEnd("label") - - assert.end() -}) diff --git a/node_modules/browserify/node_modules/console-browserify/test/static/index.html b/node_modules/browserify/node_modules/console-browserify/test/static/index.html deleted file mode 100644 index dd55012f..00000000 --- a/node_modules/browserify/node_modules/console-browserify/test/static/index.html +++ /dev/null @@ -1,12 +0,0 @@ - - - - - TAPE Example - - - - - - - diff --git a/node_modules/browserify/node_modules/console-browserify/test/static/test-adapter.js b/node_modules/browserify/node_modules/console-browserify/test/static/test-adapter.js deleted file mode 100644 index 8b4c12dc..00000000 --- a/node_modules/browserify/node_modules/console-browserify/test/static/test-adapter.js +++ /dev/null @@ -1,53 +0,0 @@ -(function () { - var Testem = window.Testem - var regex = /^((?:not )?ok) (\d+) (.+)$/ - - Testem.useCustomAdapter(tapAdapter) - - function tapAdapter(socket){ - var results = { - failed: 0 - , passed: 0 - , total: 0 - , tests: [] - } - - socket.emit('tests-start') - - Testem.handleConsoleMessage = function(msg){ - var m = msg.match(regex) - if (m) { - var passed = m[1] === 'ok' - var test = { - passed: passed ? 1 : 0, - failed: passed ? 0 : 1, - total: 1, - id: m[2], - name: m[3], - items: [] - } - - if (passed) { - results.passed++ - } else { - console.error("failure", m) - - results.failed++ - } - - results.total++ - - // console.log("emitted test", test) - socket.emit('test-result', test) - results.tests.push(test) - } else if (msg === '# ok' || msg.match(/^# tests \d+/)){ - // console.log("emitted all test") - socket.emit('all-test-results', results) - } - - // return false if you want to prevent the console message from - // going to the console - // return false - } - } -}()) diff --git a/node_modules/browserify/node_modules/constants-browserify/README.md b/node_modules/browserify/node_modules/constants-browserify/README.md deleted file mode 100644 index bef2afe2..00000000 --- a/node_modules/browserify/node_modules/constants-browserify/README.md +++ /dev/null @@ -1,52 +0,0 @@ - -# constants-browserify - -Node's `constants` module for the browser. - -## Usage - -To use with browserify cli: - -```bash -$ browserify -r constants:constants-browserify script.js -``` - -To use with browserify api: - -```js -browserify() - .require('constants-browserify', { expose: 'constants' }) - .add(__dirname + '/script.js') - .bundle() - // ... -``` - -## Installation - -With [npm](http://npmjs.org) do - -```bash -$ npm install constants-browserify -``` - -## License - -Copyright (c) 2013 Julian Gruber <julian@juliangruber.com> - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/node_modules/browserify/node_modules/constants-browserify/build.sh b/node_modules/browserify/node_modules/constants-browserify/build.sh deleted file mode 100755 index 60012d66..00000000 --- a/node_modules/browserify/node_modules/constants-browserify/build.sh +++ /dev/null @@ -1 +0,0 @@ -node -pe 'JSON.stringify(require("constants"), null, " ")' > constants.json diff --git a/node_modules/browserify/node_modules/constants-browserify/constants.json b/node_modules/browserify/node_modules/constants-browserify/constants.json deleted file mode 100644 index 904c344b..00000000 --- a/node_modules/browserify/node_modules/constants-browserify/constants.json +++ /dev/null @@ -1,178 +0,0 @@ -{ - "O_RDONLY": 0, - "O_WRONLY": 1, - "O_RDWR": 2, - "S_IFMT": 61440, - "S_IFREG": 32768, - "S_IFDIR": 16384, - "S_IFCHR": 8192, - "S_IFBLK": 24576, - "S_IFIFO": 4096, - "S_IFLNK": 40960, - "S_IFSOCK": 49152, - "O_CREAT": 512, - "O_EXCL": 2048, - "O_NOCTTY": 131072, - "O_TRUNC": 1024, - "O_APPEND": 8, - "O_DIRECTORY": 1048576, - "O_NOFOLLOW": 256, - "O_SYNC": 128, - "O_SYMLINK": 2097152, - "S_IRWXU": 448, - "S_IRUSR": 256, - "S_IWUSR": 128, - "S_IXUSR": 64, - "S_IRWXG": 56, - "S_IRGRP": 32, - "S_IWGRP": 16, - "S_IXGRP": 8, - "S_IRWXO": 7, - "S_IROTH": 4, - "S_IWOTH": 2, - "S_IXOTH": 1, - "E2BIG": 7, - "EACCES": 13, - "EADDRINUSE": 48, - "EADDRNOTAVAIL": 49, - "EAFNOSUPPORT": 47, - "EAGAIN": 35, - "EALREADY": 37, - "EBADF": 9, - "EBADMSG": 94, - "EBUSY": 16, - "ECANCELED": 89, - "ECHILD": 10, - "ECONNABORTED": 53, - "ECONNREFUSED": 61, - "ECONNRESET": 54, - "EDEADLK": 11, - "EDESTADDRREQ": 39, - "EDOM": 33, - "EDQUOT": 69, - "EEXIST": 17, - "EFAULT": 14, - "EFBIG": 27, - "EHOSTUNREACH": 65, - "EIDRM": 90, - "EILSEQ": 92, - "EINPROGRESS": 36, - "EINTR": 4, - "EINVAL": 22, - "EIO": 5, - "EISCONN": 56, - "EISDIR": 21, - "ELOOP": 62, - "EMFILE": 24, - "EMLINK": 31, - "EMSGSIZE": 40, - "EMULTIHOP": 95, - "ENAMETOOLONG": 63, - "ENETDOWN": 50, - "ENETRESET": 52, - "ENETUNREACH": 51, - "ENFILE": 23, - "ENOBUFS": 55, - "ENODATA": 96, - "ENODEV": 19, - "ENOENT": 2, - "ENOEXEC": 8, - "ENOLCK": 77, - "ENOLINK": 97, - "ENOMEM": 12, - "ENOMSG": 91, - "ENOPROTOOPT": 42, - "ENOSPC": 28, - "ENOSR": 98, - "ENOSTR": 99, - "ENOSYS": 78, - "ENOTCONN": 57, - "ENOTDIR": 20, - "ENOTEMPTY": 66, - "ENOTSOCK": 38, - "ENOTSUP": 45, - "ENOTTY": 25, - "ENXIO": 6, - "EOPNOTSUPP": 102, - "EOVERFLOW": 84, - "EPERM": 1, - "EPIPE": 32, - "EPROTO": 100, - "EPROTONOSUPPORT": 43, - "EPROTOTYPE": 41, - "ERANGE": 34, - "EROFS": 30, - "ESPIPE": 29, - "ESRCH": 3, - "ESTALE": 70, - "ETIME": 101, - "ETIMEDOUT": 60, - "ETXTBSY": 26, - "EWOULDBLOCK": 35, - "EXDEV": 18, - "SIGHUP": 1, - "SIGINT": 2, - "SIGQUIT": 3, - "SIGILL": 4, - "SIGTRAP": 5, - "SIGABRT": 6, - "SIGIOT": 6, - "SIGBUS": 10, - "SIGFPE": 8, - "SIGKILL": 9, - "SIGUSR1": 30, - "SIGSEGV": 11, - "SIGUSR2": 31, - "SIGPIPE": 13, - "SIGALRM": 14, - "SIGTERM": 15, - "SIGCHLD": 20, - "SIGCONT": 19, - "SIGSTOP": 17, - "SIGTSTP": 18, - "SIGTTIN": 21, - "SIGTTOU": 22, - "SIGURG": 16, - "SIGXCPU": 24, - "SIGXFSZ": 25, - "SIGVTALRM": 26, - "SIGPROF": 27, - "SIGWINCH": 28, - "SIGIO": 23, - "SIGSYS": 12, - "SSL_OP_ALL": 2147486719, - "SSL_OP_ALLOW_UNSAFE_LEGACY_RENEGOTIATION": 262144, - "SSL_OP_CIPHER_SERVER_PREFERENCE": 4194304, - "SSL_OP_CISCO_ANYCONNECT": 32768, - "SSL_OP_COOKIE_EXCHANGE": 8192, - "SSL_OP_CRYPTOPRO_TLSEXT_BUG": 2147483648, - "SSL_OP_DONT_INSERT_EMPTY_FRAGMENTS": 2048, - "SSL_OP_EPHEMERAL_RSA": 2097152, - "SSL_OP_LEGACY_SERVER_CONNECT": 4, - "SSL_OP_MICROSOFT_BIG_SSLV3_BUFFER": 32, - "SSL_OP_MICROSOFT_SESS_ID_BUG": 1, - "SSL_OP_MSIE_SSLV2_RSA_PADDING": 64, - "SSL_OP_NETSCAPE_CA_DN_BUG": 536870912, - "SSL_OP_NETSCAPE_CHALLENGE_BUG": 2, - "SSL_OP_NETSCAPE_DEMO_CIPHER_CHANGE_BUG": 1073741824, - "SSL_OP_NETSCAPE_REUSE_CIPHER_CHANGE_BUG": 8, - "SSL_OP_NO_COMPRESSION": 131072, - "SSL_OP_NO_QUERY_MTU": 4096, - "SSL_OP_NO_SESSION_RESUMPTION_ON_RENEGOTIATION": 65536, - "SSL_OP_NO_SSLv2": 16777216, - "SSL_OP_NO_SSLv3": 33554432, - "SSL_OP_NO_TICKET": 16384, - "SSL_OP_NO_TLSv1": 67108864, - "SSL_OP_NO_TLSv1_1": 268435456, - "SSL_OP_NO_TLSv1_2": 134217728, - "SSL_OP_PKCS1_CHECK_1": 0, - "SSL_OP_PKCS1_CHECK_2": 0, - "SSL_OP_SINGLE_DH_USE": 1048576, - "SSL_OP_SINGLE_ECDH_USE": 524288, - "SSL_OP_SSLEAY_080_CLIENT_DH_BUG": 128, - "SSL_OP_SSLREF2_REUSE_CERT_TYPE_BUG": 16, - "SSL_OP_TLS_BLOCK_PADDING_BUG": 512, - "SSL_OP_TLS_D5_BUG": 256, - "SSL_OP_TLS_ROLLBACK_BUG": 8388608, - "NPN_ENABLED": 1 -} diff --git a/node_modules/browserify/node_modules/constants-browserify/package.json b/node_modules/browserify/node_modules/constants-browserify/package.json deleted file mode 100644 index f184d1a6..00000000 --- a/node_modules/browserify/node_modules/constants-browserify/package.json +++ /dev/null @@ -1,48 +0,0 @@ -{ - "name": "constants-browserify", - "description": "node's constants module for the browser", - "version": "0.0.1", - "repository": { - "type": "git", - "url": "git://github.com/juliangruber/constants-browserify.git" - }, - "homepage": "https://github.com/juliangruber/constants-browserify", - "main": "constants.json", - "dependencies": {}, - "keywords": [ - "constants", - "node", - "browser", - "browserify" - ], - "author": { - "name": "Julian Gruber", - "email": "julian@juliangruber.com", - "url": "http://juliangruber.com" - }, - "license": "MIT", - "bugs": { - "url": "https://github.com/juliangruber/constants-browserify/issues" - }, - "_id": "constants-browserify@0.0.1", - "dist": { - "shasum": "92577db527ba6c4cf0a4568d84bc031f441e21f2", - "tarball": "https://registry.npmjs.org/constants-browserify/-/constants-browserify-0.0.1.tgz" - }, - "_from": "constants-browserify@>=0.0.1 <0.1.0", - "_npmVersion": "1.3.2", - "_npmUser": { - "name": "juliangruber", - "email": "julian@juliangruber.com" - }, - "maintainers": [ - { - "name": "juliangruber", - "email": "julian@juliangruber.com" - } - ], - "directories": {}, - "_shasum": "92577db527ba6c4cf0a4568d84bc031f441e21f2", - "_resolved": "https://registry.npmjs.org/constants-browserify/-/constants-browserify-0.0.1.tgz", - "readme": "ERROR: No README data found!" -} diff --git a/node_modules/browserify/node_modules/crypto-browserify/.npmignore b/node_modules/browserify/node_modules/crypto-browserify/.npmignore deleted file mode 100644 index 3c3629e6..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/.npmignore +++ /dev/null @@ -1 +0,0 @@ -node_modules diff --git a/node_modules/browserify/node_modules/crypto-browserify/.travis.yml b/node_modules/browserify/node_modules/crypto-browserify/.travis.yml deleted file mode 100644 index 1fe31b80..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/.travis.yml +++ /dev/null @@ -1,31 +0,0 @@ -sudo: false -language: node_js -matrix: - include: - - node_js: '0.10' - env: TEST_SUITE=unit - - node_js: '0.11' - env: TEST_SUITE=unit - - node_js: '0.12' - env: TEST_SUITE=unit - - node_js: '4' - env: TEST_SUITE=unit - - node_js: '4' - env: TEST_SUITE=standard - - node_js: '4' - env: TEST_SUITE=browser BROWSER_NAME=ie BROWSER_VERSION="10..latest" - - node_js: '4' - env: TEST_SUITE=browser BROWSER_NAME=chrome BROWSER_VERSION="44..beta" - - node_js: '4' - env: TEST_SUITE=browser BROWSER_NAME=firefox BROWSER_VERSION="40..latest" - - node_js: '4' - env: TEST_SUITE=browser BROWSER_NAME=iphone BROWSER_VERSION="8.0..latest" - - node_js: '4' - env: TEST_SUITE=browser BROWSER_NAME=safari BROWSER_VERSION="5..latest" - - node_js: '4' - env: TEST_SUITE=browser BROWSER_NAME=android BROWSER_VERSION="4.0..latest" -script: "npm run-script $TEST_SUITE" -env: - global: - - secure: YHNUDQmx/WiW3gmDcRCfb6KLDeio7Mr5tqPY2kHPdZlBSytsQjNk75ytM4U6Cu8Uk8iEIoj/aFlxiVMpJNA8J4QSUyW/YkbVaIz0+1oywoV0Ht8aRBfZ1jvXfX6789+1Q9c4xaMkYYbJpXSh9JcirsiwmqWd4+IDd7hcESodsDQ= - - secure: Nhj5yejKZxUbtHGZta+GjYWqXGaOZB7ainTkOuGcpXM+OwwjeDpYlTBrwS90Q7hqens7KXVzQM09aDbadpsDCsOo1nyaEigMtomAorZ1UC1CpEoVz1ZuikF9bEhb+/7M9pzuL1fX+Ke9Dx4mPPeb8sf/2SrAu1RqXkSwZV/duAc= diff --git a/node_modules/browserify/node_modules/crypto-browserify/.zuul.yml b/node_modules/browserify/node_modules/crypto-browserify/.zuul.yml deleted file mode 100644 index 96d9cfbd..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/.zuul.yml +++ /dev/null @@ -1 +0,0 @@ -ui: tape diff --git a/node_modules/browserify/node_modules/crypto-browserify/LICENSE b/node_modules/browserify/node_modules/crypto-browserify/LICENSE deleted file mode 100644 index 8abb57d6..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/LICENSE +++ /dev/null @@ -1,24 +0,0 @@ -The MIT License - -Copyright (c) 2013 Dominic Tarr - -Permission is hereby granted, free of charge, -to any person obtaining a copy of this software and -associated documentation files (the "Software"), to -deal in the Software without restriction, including -without limitation the rights to use, copy, modify, -merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom -the Software is furnished to do so, -subject to the following conditions: - -The above copyright notice and this permission notice -shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES -OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR -ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/node_modules/browserify/node_modules/crypto-browserify/README.md b/node_modules/browserify/node_modules/crypto-browserify/README.md deleted file mode 100644 index 9b0c03be..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/README.md +++ /dev/null @@ -1,49 +0,0 @@ -# crypto-browserify - -A port of node's `crypto` module to the browser. - -[![Build Status](https://travis-ci.org/crypto-browserify/crypto-browserify.svg?branch=master)](https://travis-ci.org/crypto-browserify/crypto-browserify) -[![js-standard-style](https://cdn.rawgit.com/feross/standard/master/badge.svg)](https://github.com/feross/standard) -[![Sauce Test Status](https://saucelabs.com/browser-matrix/crypto-browserify.svg)](https://saucelabs.com/u/crypto-browserify) - -The goal of this module is to reimplement node's crypto module, -in pure javascript so that it can run in the browser. - -Here is the subset that is currently implemented: - -* createHash (sha1, sha224, sha256, sha384, sha512, md5, rmd160) -* createHmac (sha1, sha224, sha256, sha384, sha512, md5, rmd160) -* pbkdf2 -* pbkdf2Sync -* randomBytes -* pseudoRandomBytes -* createCipher (aes) -* createDecipher (aes) -* createDiffieHellman -* createSign (rsa, ecdsa) -* createVerify (rsa, ecdsa) -* createECDH (secp256k1) -* publicEncrypt/privateDecrypt (rsa) - -## todo - -these features from node's `crypto` are still unimplemented. - -* createCredentials - -## contributions - -If you are interested in writing a feature, please implement as a new module, -which will be incorporated into crypto-browserify as a dependency. - -All deps must be compatible with node's crypto -(generate example inputs and outputs with node, -and save base64 strings inside JSON, so that tests can run in the browser. -see [sha.js](https://github.com/dominictarr/sha.js) - -Crypto is _extra serious_ so please do not hesitate to review the code, -and post comments if you do. - -## License - -MIT diff --git a/node_modules/browserify/node_modules/crypto-browserify/example/bundle.js b/node_modules/browserify/node_modules/crypto-browserify/example/bundle.js deleted file mode 100644 index 02698cc7..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/example/bundle.js +++ /dev/null @@ -1,637 +0,0 @@ -var require = function (file, cwd) { - var resolved = require.resolve(file, cwd || '/'); - var mod = require.modules[resolved]; - if (!mod) throw new Error( - 'Failed to resolve module ' + file + ', tried ' + resolved - ); - var res = mod._cached ? mod._cached : mod(); - return res; -} - -require.paths = []; -require.modules = {}; -require.extensions = [".js",".coffee"]; - -require._core = { - 'assert': true, - 'events': true, - 'fs': true, - 'path': true, - 'vm': true -}; - -require.resolve = (function () { - return function (x, cwd) { - if (!cwd) cwd = '/'; - - if (require._core[x]) return x; - var path = require.modules.path(); - cwd = path.resolve('/', cwd); - var y = cwd || '/'; - - if (x.match(/^(?:\.\.?\/|\/)/)) { - var m = loadAsFileSync(path.resolve(y, x)) - || loadAsDirectorySync(path.resolve(y, x)); - if (m) return m; - } - - var n = loadNodeModulesSync(x, y); - if (n) return n; - - throw new Error("Cannot find module '" + x + "'"); - - function loadAsFileSync (x) { - if (require.modules[x]) { - return x; - } - - for (var i = 0; i < require.extensions.length; i++) { - var ext = require.extensions[i]; - if (require.modules[x + ext]) return x + ext; - } - } - - function loadAsDirectorySync (x) { - x = x.replace(/\/+$/, ''); - var pkgfile = x + '/package.json'; - if (require.modules[pkgfile]) { - var pkg = require.modules[pkgfile](); - var b = pkg.browserify; - if (typeof b === 'object' && b.main) { - var m = loadAsFileSync(path.resolve(x, b.main)); - if (m) return m; - } - else if (typeof b === 'string') { - var m = loadAsFileSync(path.resolve(x, b)); - if (m) return m; - } - else if (pkg.main) { - var m = loadAsFileSync(path.resolve(x, pkg.main)); - if (m) return m; - } - } - - return loadAsFileSync(x + '/index'); - } - - function loadNodeModulesSync (x, start) { - var dirs = nodeModulesPathsSync(start); - for (var i = 0; i < dirs.length; i++) { - var dir = dirs[i]; - var m = loadAsFileSync(dir + '/' + x); - if (m) return m; - var n = loadAsDirectorySync(dir + '/' + x); - if (n) return n; - } - - var m = loadAsFileSync(x); - if (m) return m; - } - - function nodeModulesPathsSync (start) { - var parts; - if (start === '/') parts = [ '' ]; - else parts = path.normalize(start).split('/'); - - var dirs = []; - for (var i = parts.length - 1; i >= 0; i--) { - if (parts[i] === 'node_modules') continue; - var dir = parts.slice(0, i + 1).join('/') + '/node_modules'; - dirs.push(dir); - } - - return dirs; - } - }; -})(); - -require.alias = function (from, to) { - var path = require.modules.path(); - var res = null; - try { - res = require.resolve(from + '/package.json', '/'); - } - catch (err) { - res = require.resolve(from, '/'); - } - var basedir = path.dirname(res); - - var keys = (Object.keys || function (obj) { - var res = []; - for (var key in obj) res.push(key) - return res; - })(require.modules); - - for (var i = 0; i < keys.length; i++) { - var key = keys[i]; - if (key.slice(0, basedir.length + 1) === basedir + '/') { - var f = key.slice(basedir.length); - require.modules[to + f] = require.modules[basedir + f]; - } - else if (key === basedir) { - require.modules[to] = require.modules[basedir]; - } - } -}; - -require.define = function (filename, fn) { - var dirname = require._core[filename] - ? '' - : require.modules.path().dirname(filename) - ; - - var require_ = function (file) { - return require(file, dirname) - }; - require_.resolve = function (name) { - return require.resolve(name, dirname); - }; - require_.modules = require.modules; - require_.define = require.define; - var module_ = { exports : {} }; - - require.modules[filename] = function () { - require.modules[filename]._cached = module_.exports; - fn.call( - module_.exports, - require_, - module_, - module_.exports, - dirname, - filename - ); - require.modules[filename]._cached = module_.exports; - return module_.exports; - }; -}; - -if (typeof process === 'undefined') process = {}; - -if (!process.nextTick) process.nextTick = (function () { - var queue = []; - var canPost = typeof window !== 'undefined' - && window.postMessage && window.addEventListener - ; - - if (canPost) { - window.addEventListener('message', function (ev) { - if (ev.source === window && ev.data === 'browserify-tick') { - ev.stopPropagation(); - if (queue.length > 0) { - var fn = queue.shift(); - fn(); - } - } - }, true); - } - - return function (fn) { - if (canPost) { - queue.push(fn); - window.postMessage('browserify-tick', '*'); - } - else setTimeout(fn, 0); - }; -})(); - -if (!process.title) process.title = 'browser'; - -if (!process.binding) process.binding = function (name) { - if (name === 'evals') return require('vm') - else throw new Error('No such module') -}; - -if (!process.cwd) process.cwd = function () { return '.' }; - -if (!process.env) process.env = {}; -if (!process.argv) process.argv = []; - -require.define("path", function (require, module, exports, __dirname, __filename) { -function filter (xs, fn) { - var res = []; - for (var i = 0; i < xs.length; i++) { - if (fn(xs[i], i, xs)) res.push(xs[i]); - } - return res; -} - -// resolves . and .. elements in a path array with directory names there -// must be no slashes, empty elements, or device names (c:\) in the array -// (so also no leading and trailing slashes - it does not distinguish -// relative and absolute paths) -function normalizeArray(parts, allowAboveRoot) { - // if the path tries to go above the root, `up` ends up > 0 - var up = 0; - for (var i = parts.length; i >= 0; i--) { - var last = parts[i]; - if (last == '.') { - parts.splice(i, 1); - } else if (last === '..') { - parts.splice(i, 1); - up++; - } else if (up) { - parts.splice(i, 1); - up--; - } - } - - // if the path is allowed to go above the root, restore leading ..s - if (allowAboveRoot) { - for (; up--; up) { - parts.unshift('..'); - } - } - - return parts; -} - -// Regex to split a filename into [*, dir, basename, ext] -// posix version -var splitPathRe = /^(.+\/(?!$)|\/)?((?:.+?)?(\.[^.]*)?)$/; - -// path.resolve([from ...], to) -// posix version -exports.resolve = function() { -var resolvedPath = '', - resolvedAbsolute = false; - -for (var i = arguments.length; i >= -1 && !resolvedAbsolute; i--) { - var path = (i >= 0) - ? arguments[i] - : process.cwd(); - - // Skip empty and invalid entries - if (typeof path !== 'string' || !path) { - continue; - } - - resolvedPath = path + '/' + resolvedPath; - resolvedAbsolute = path.charAt(0) === '/'; -} - -// At this point the path should be resolved to a full absolute path, but -// handle relative paths to be safe (might happen when process.cwd() fails) - -// Normalize the path -resolvedPath = normalizeArray(filter(resolvedPath.split('/'), function(p) { - return !!p; - }), !resolvedAbsolute).join('/'); - - return ((resolvedAbsolute ? '/' : '') + resolvedPath) || '.'; -}; - -// path.normalize(path) -// posix version -exports.normalize = function(path) { -var isAbsolute = path.charAt(0) === '/', - trailingSlash = path.slice(-1) === '/'; - -// Normalize the path -path = normalizeArray(filter(path.split('/'), function(p) { - return !!p; - }), !isAbsolute).join('/'); - - if (!path && !isAbsolute) { - path = '.'; - } - if (path && trailingSlash) { - path += '/'; - } - - return (isAbsolute ? '/' : '') + path; -}; - - -// posix version -exports.join = function() { - var paths = Array.prototype.slice.call(arguments, 0); - return exports.normalize(filter(paths, function(p, index) { - return p && typeof p === 'string'; - }).join('/')); -}; - - -exports.dirname = function(path) { - var dir = splitPathRe.exec(path)[1] || ''; - var isWindows = false; - if (!dir) { - // No dirname - return '.'; - } else if (dir.length === 1 || - (isWindows && dir.length <= 3 && dir.charAt(1) === ':')) { - // It is just a slash or a drive letter with a slash - return dir; - } else { - // It is a full dirname, strip trailing slash - return dir.substring(0, dir.length - 1); - } -}; - - -exports.basename = function(path, ext) { - var f = splitPathRe.exec(path)[2] || ''; - // TODO: make this comparison case-insensitive on windows? - if (ext && f.substr(-1 * ext.length) === ext) { - f = f.substr(0, f.length - ext.length); - } - return f; -}; - - -exports.extname = function(path) { - return splitPathRe.exec(path)[3] || ''; -}; - -}); - -require.define("crypto", function (require, module, exports, __dirname, __filename) { -module.exports = require("crypto-browserify") -}); - -require.define("/node_modules/crypto-browserify/package.json", function (require, module, exports, __dirname, __filename) { -module.exports = {} -}); - -require.define("/node_modules/crypto-browserify/index.js", function (require, module, exports, __dirname, __filename) { -var sha = require('./sha') - -var algorithms = { - sha1: { - hex: sha.hex_sha1, - binary: sha.b64_sha1, - ascii: sha.str_sha1 - } -} - -function error () { - var m = [].slice.call(arguments).join(' ') - throw new Error([ - m, - 'we accept pull requests', - 'http://github.com/dominictarr/crypto-browserify' - ].join('\n')) -} - -exports.createHash = function (alg) { - alg = alg || 'sha1' - if(!algorithms[alg]) - error('algorithm:', alg, 'is not yet supported') - var s = '' - _alg = algorithms[alg] - return { - update: function (data) { - s += data - return this - }, - digest: function (enc) { - enc = enc || 'binary' - var fn - if(!(fn = _alg[enc])) - error('encoding:', enc , 'is not yet supported for algorithm', alg) - var r = fn(s) - s = null //not meant to use the hash after you've called digest. - return r - } - } -} -// the least I can do is make error messages for the rest of the node.js/crypto api. -;['createCredentials' -, 'createHmac' -, 'createCypher' -, 'createCypheriv' -, 'createDecipher' -, 'createDecipheriv' -, 'createSign' -, 'createVerify' -, 'createDeffieHellman', -, 'pbkdf2', -, 'randomBytes' ].forEach(function (name) { - exports[name] = function () { - error('sorry,', name, 'is not implemented yet') - } -}) - -}); - -require.define("/node_modules/crypto-browserify/sha.js", function (require, module, exports, __dirname, __filename) { -/* - * A JavaScript implementation of the Secure Hash Algorithm, SHA-1, as defined - * in FIPS PUB 180-1 - * Version 2.1a Copyright Paul Johnston 2000 - 2002. - * Other contributors: Greg Holt, Andrew Kepert, Ydnar, Lostinet - * Distributed under the BSD License - * See http://pajhome.org.uk/crypt/md5 for details. - */ - -exports.hex_sha1 = hex_sha1; -exports.b64_sha1 = b64_sha1; -exports.str_sha1 = str_sha1; -exports.hex_hmac_sha1 = hex_hmac_sha1; -exports.b64_hmac_sha1 = b64_hmac_sha1; -exports.str_hmac_sha1 = str_hmac_sha1; - -/* - * Configurable variables. You may need to tweak these to be compatible with - * the server-side, but the defaults work in most cases. - */ -var hexcase = 0; /* hex output format. 0 - lowercase; 1 - uppercase */ -var b64pad = ""; /* base-64 pad character. "=" for strict RFC compliance */ -var chrsz = 8; /* bits per input character. 8 - ASCII; 16 - Unicode */ - -/* - * These are the functions you'll usually want to call - * They take string arguments and return either hex or base-64 encoded strings - */ -function hex_sha1(s){return binb2hex(core_sha1(str2binb(s),s.length * chrsz));} -function b64_sha1(s){return binb2b64(core_sha1(str2binb(s),s.length * chrsz));} -function str_sha1(s){return binb2str(core_sha1(str2binb(s),s.length * chrsz));} -function hex_hmac_sha1(key, data){ return binb2hex(core_hmac_sha1(key, data));} -function b64_hmac_sha1(key, data){ return binb2b64(core_hmac_sha1(key, data));} -function str_hmac_sha1(key, data){ return binb2str(core_hmac_sha1(key, data));} - -/* - * Perform a simple self-test to see if the VM is working - */ -function sha1_vm_test() -{ - return hex_sha1("abc") == "a9993e364706816aba3e25717850c26c9cd0d89d"; -} - -/* - * Calculate the SHA-1 of an array of big-endian words, and a bit length - */ -function core_sha1(x, len) -{ - /* append padding */ - x[len >> 5] |= 0x80 << (24 - len % 32); - x[((len + 64 >> 9) << 4) + 15] = len; - - var w = Array(80); - var a = 1732584193; - var b = -271733879; - var c = -1732584194; - var d = 271733878; - var e = -1009589776; - - for(var i = 0; i < x.length; i += 16) - { - var olda = a; - var oldb = b; - var oldc = c; - var oldd = d; - var olde = e; - - for(var j = 0; j < 80; j++) - { - if(j < 16) w[j] = x[i + j]; - else w[j] = rol(w[j-3] ^ w[j-8] ^ w[j-14] ^ w[j-16], 1); - var t = safe_add(safe_add(rol(a, 5), sha1_ft(j, b, c, d)), - safe_add(safe_add(e, w[j]), sha1_kt(j))); - e = d; - d = c; - c = rol(b, 30); - b = a; - a = t; - } - - a = safe_add(a, olda); - b = safe_add(b, oldb); - c = safe_add(c, oldc); - d = safe_add(d, oldd); - e = safe_add(e, olde); - } - return Array(a, b, c, d, e); - -} - -/* - * Perform the appropriate triplet combination function for the current - * iteration - */ -function sha1_ft(t, b, c, d) -{ - if(t < 20) return (b & c) | ((~b) & d); - if(t < 40) return b ^ c ^ d; - if(t < 60) return (b & c) | (b & d) | (c & d); - return b ^ c ^ d; -} - -/* - * Determine the appropriate additive constant for the current iteration - */ -function sha1_kt(t) -{ - return (t < 20) ? 1518500249 : (t < 40) ? 1859775393 : - (t < 60) ? -1894007588 : -899497514; -} - -/* - * Calculate the HMAC-SHA1 of a key and some data - */ -function core_hmac_sha1(key, data) -{ - var bkey = str2binb(key); - if(bkey.length > 16) bkey = core_sha1(bkey, key.length * chrsz); - - var ipad = Array(16), opad = Array(16); - for(var i = 0; i < 16; i++) - { - ipad[i] = bkey[i] ^ 0x36363636; - opad[i] = bkey[i] ^ 0x5C5C5C5C; - } - - var hash = core_sha1(ipad.concat(str2binb(data)), 512 + data.length * chrsz); - return core_sha1(opad.concat(hash), 512 + 160); -} - -/* - * Add integers, wrapping at 2^32. This uses 16-bit operations internally - * to work around bugs in some JS interpreters. - */ -function safe_add(x, y) -{ - var lsw = (x & 0xFFFF) + (y & 0xFFFF); - var msw = (x >> 16) + (y >> 16) + (lsw >> 16); - return (msw << 16) | (lsw & 0xFFFF); -} - -/* - * Bitwise rotate a 32-bit number to the left. - */ -function rol(num, cnt) -{ - return (num << cnt) | (num >>> (32 - cnt)); -} - -/* - * Convert an 8-bit or 16-bit string to an array of big-endian words - * In 8-bit function, characters >255 have their hi-byte silently ignored. - */ -function str2binb(str) -{ - var bin = Array(); - var mask = (1 << chrsz) - 1; - for(var i = 0; i < str.length * chrsz; i += chrsz) - bin[i>>5] |= (str.charCodeAt(i / chrsz) & mask) << (32 - chrsz - i%32); - return bin; -} - -/* - * Convert an array of big-endian words to a string - */ -function binb2str(bin) -{ - var str = ""; - var mask = (1 << chrsz) - 1; - for(var i = 0; i < bin.length * 32; i += chrsz) - str += String.fromCharCode((bin[i>>5] >>> (32 - chrsz - i%32)) & mask); - return str; -} - -/* - * Convert an array of big-endian words to a hex string. - */ -function binb2hex(binarray) -{ - var hex_tab = hexcase ? "0123456789ABCDEF" : "0123456789abcdef"; - var str = ""; - for(var i = 0; i < binarray.length * 4; i++) - { - str += hex_tab.charAt((binarray[i>>2] >> ((3 - i%4)*8+4)) & 0xF) + - hex_tab.charAt((binarray[i>>2] >> ((3 - i%4)*8 )) & 0xF); - } - return str; -} - -/* - * Convert an array of big-endian words to a base-64 string - */ -function binb2b64(binarray) -{ - var tab = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; - var str = ""; - for(var i = 0; i < binarray.length * 4; i += 3) - { - var triplet = (((binarray[i >> 2] >> 8 * (3 - i %4)) & 0xFF) << 16) - | (((binarray[i+1 >> 2] >> 8 * (3 - (i+1)%4)) & 0xFF) << 8 ) - | ((binarray[i+2 >> 2] >> 8 * (3 - (i+2)%4)) & 0xFF); - for(var j = 0; j < 4; j++) - { - if(i * 8 + j * 6 > binarray.length * 32) str += b64pad; - else str += tab.charAt((triplet >> 6*(3-j)) & 0x3F); - } - } - return str; -} - - -}); - -require.define("/test.js", function (require, module, exports, __dirname, __filename) { - var crypto = require('crypto') -var abc = crypto.createHash('sha1').update('abc').digest('hex') -console.log(abc) -//require('hello').inlineCall().call2() - -}); -require("/test.js"); diff --git a/node_modules/browserify/node_modules/crypto-browserify/example/index.html b/node_modules/browserify/node_modules/crypto-browserify/example/index.html deleted file mode 100644 index 9d55c6d7..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/example/index.html +++ /dev/null @@ -1,12 +0,0 @@ - - - - -
    -  require('crypto').createHash('sha1').update('abc').digest('hex') == ''
    -  
    - - - diff --git a/node_modules/browserify/node_modules/crypto-browserify/example/test.js b/node_modules/browserify/node_modules/crypto-browserify/example/test.js deleted file mode 100644 index 0b76c015..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/example/test.js +++ /dev/null @@ -1,4 +0,0 @@ -var crypto = require('crypto') -var abc = crypto.createHash('sha1').update('abc').digest('hex') -console.log(abc) -// require('hello').inlineCall().call2() diff --git a/node_modules/browserify/node_modules/crypto-browserify/index.js b/node_modules/browserify/node_modules/crypto-browserify/index.js deleted file mode 100644 index ea632aae..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/index.js +++ /dev/null @@ -1,77 +0,0 @@ -'use strict' - -exports.randomBytes = exports.rng = exports.pseudoRandomBytes = exports.prng = require('randombytes') -exports.createHash = exports.Hash = require('create-hash') -exports.createHmac = exports.Hmac = require('create-hmac') - -var hashes = ['sha1', 'sha224', 'sha256', 'sha384', 'sha512', 'md5', 'rmd160'].concat(Object.keys(require('browserify-sign/algos'))) -exports.getHashes = function () { - return hashes -} - -var p = require('pbkdf2') -exports.pbkdf2 = p.pbkdf2 -exports.pbkdf2Sync = p.pbkdf2Sync - -var aes = require('browserify-cipher') -;[ - 'Cipher', - 'createCipher', - 'Cipheriv', - 'createCipheriv', - 'Decipher', - 'createDecipher', - 'Decipheriv', - 'createDecipheriv', - 'getCiphers', - 'listCiphers' -].forEach(function (key) { - exports[key] = aes[key] -}) - -var dh = require('diffie-hellman') -;[ - 'DiffieHellmanGroup', - 'createDiffieHellmanGroup', - 'getDiffieHellman', - 'createDiffieHellman', - 'DiffieHellman' -].forEach(function (key) { - exports[key] = dh[key] -}) - -var sign = require('browserify-sign') -;[ - 'createSign', - 'Sign', - 'createVerify', - 'Verify' -].forEach(function (key) { - exports[key] = sign[key] -}) - -exports.createECDH = require('create-ecdh') - -var publicEncrypt = require('public-encrypt') - -;[ - 'publicEncrypt', - 'privateEncrypt', - 'publicDecrypt', - 'privateDecrypt' -].forEach(function (key) { - exports[key] = publicEncrypt[key] -}) - -// the least I can do is make error messages for the rest of the node.js/crypto api. -;[ - 'createCredentials' -].forEach(function (name) { - exports[name] = function () { - throw new Error([ - 'sorry, ' + name + ' is not implemented yet', - 'we accept pull requests', - 'https://github.com/crypto-browserify/crypto-browserify' - ].join('\n')) - } -}) diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-cipher/.travis.yml b/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-cipher/.travis.yml deleted file mode 100644 index eb83acd9..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-cipher/.travis.yml +++ /dev/null @@ -1,6 +0,0 @@ -language: node_js -node_js: - - "0.11" - - "0.10" - - "0.12" - - "iojs" diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-cipher/browser.js b/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-cipher/browser.js deleted file mode 100644 index e009f931..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-cipher/browser.js +++ /dev/null @@ -1,73 +0,0 @@ -var ebtk = require('evp_bytestokey') -var aes = require('browserify-aes/browser') -var DES = require('browserify-des') -var desModes = require('browserify-des/modes') -var aesModes = require('browserify-aes/modes') -function createCipher (suite, password) { - var keyLen, ivLen - suite = suite.toLowerCase() - if (aesModes[suite]) { - keyLen = aesModes[suite].key - ivLen = aesModes[suite].iv - } else if (desModes[suite]) { - keyLen = desModes[suite].key * 8 - ivLen = desModes[suite].iv - } else { - throw new TypeError('invalid suite type') - } - var keys = ebtk(password, false, keyLen, ivLen) - return createCipheriv(suite, keys.key, keys.iv) -} -function createDecipher (suite, password) { - var keyLen, ivLen - suite = suite.toLowerCase() - if (aesModes[suite]) { - keyLen = aesModes[suite].key - ivLen = aesModes[suite].iv - } else if (desModes[suite]) { - keyLen = desModes[suite].key * 8 - ivLen = desModes[suite].iv - } else { - throw new TypeError('invalid suite type') - } - var keys = ebtk(password, false, keyLen, ivLen) - return createDecipheriv(suite, keys.key, keys.iv) -} - -function createCipheriv (suite, key, iv) { - suite = suite.toLowerCase() - if (aesModes[suite]) { - return aes.createCipheriv(suite, key, iv) - } else if (desModes[suite]) { - return new DES({ - key: key, - iv: iv, - mode: suite - }) - } else { - throw new TypeError('invalid suite type') - } -} -function createDecipheriv (suite, key, iv) { - suite = suite.toLowerCase() - if (aesModes[suite]) { - return aes.createDecipheriv(suite, key, iv) - } else if (desModes[suite]) { - return new DES({ - key: key, - iv: iv, - mode: suite, - decrypt: true - }) - } else { - throw new TypeError('invalid suite type') - } -} -exports.createCipher = exports.Cipher = createCipher -exports.createCipheriv = exports.Cipheriv = createCipheriv -exports.createDecipher = exports.Decipher = createDecipher -exports.createDecipheriv = exports.Decipheriv = createDecipheriv -function getCiphers () { - return Object.keys(desModes).concat(aes.getCiphers()) -} -exports.listCiphers = exports.getCiphers = getCiphers diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-cipher/index.js b/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-cipher/index.js deleted file mode 100644 index 58fa883f..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-cipher/index.js +++ /dev/null @@ -1,7 +0,0 @@ -var crypto = require('crypto') - -exports.createCipher = exports.Cipher = crypto.createCipher -exports.createCipheriv = exports.Cipheriv = crypto.createCipheriv -exports.createDecipher = exports.Decipher = crypto.createDecipher -exports.createDecipheriv = exports.Decipheriv = crypto.createDecipheriv -exports.listCiphers = exports.getCiphers = crypto.getCiphers diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-cipher/node_modules/browserify-aes/.eslintrc b/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-cipher/node_modules/browserify-aes/.eslintrc deleted file mode 100644 index bed248a0..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-cipher/node_modules/browserify-aes/.eslintrc +++ /dev/null @@ -1,132 +0,0 @@ -{ - "ecmaFeatures": { - "modules": true, - "experimentalObjectRestSpread": true - }, - - "env": { - "browser": false, - "es6": true, - "node": true - }, - - "plugins": [ - "standard" - ], - - "globals": { - "document": false, - "navigator": false, - "window": false - }, - - "rules": { - "accessor-pairs": 2, - "arrow-spacing": [2, { "before": true, "after": true }], - "block-spacing": [2, "always"], - "brace-style": [2, "1tbs", { "allowSingleLine": true }], - "comma-dangle": [2, "never"], - "comma-spacing": [2, { "before": false, "after": true }], - "comma-style": [2, "last"], - "constructor-super": 2, - "curly": [2, "multi-line"], - "dot-location": [2, "property"], - "eol-last": 2, - "eqeqeq": [2, "allow-null"], - "generator-star-spacing": [2, { "before": true, "after": true }], - "handle-callback-err": [2, "^(err|error)$" ], - "indent": [2, 2, { "SwitchCase": 1 }], - "key-spacing": [2, { "beforeColon": false, "afterColon": true }], - "new-cap": [2, { "newIsCap": true, "capIsNew": false }], - "new-parens": 2, - "no-array-constructor": 2, - "no-caller": 2, - "no-class-assign": 2, - "no-cond-assign": 2, - "no-const-assign": 2, - "no-control-regex": 2, - "no-debugger": 2, - "no-delete-var": 2, - "no-dupe-args": 2, - "no-dupe-class-members": 2, - "no-dupe-keys": 2, - "no-duplicate-case": 2, - "no-empty-character-class": 2, - "no-empty-label": 2, - "no-eval": 2, - "no-ex-assign": 2, - "no-extend-native": 2, - "no-extra-bind": 2, - "no-extra-boolean-cast": 2, - "no-extra-parens": [2, "functions"], - "no-fallthrough": 2, - "no-floating-decimal": 2, - "no-func-assign": 2, - "no-implied-eval": 2, - "no-inner-declarations": [2, "functions"], - "no-invalid-regexp": 2, - "no-irregular-whitespace": 2, - "no-iterator": 2, - "no-label-var": 2, - "no-labels": 2, - "no-lone-blocks": 2, - "no-mixed-spaces-and-tabs": 2, - "no-multi-spaces": 2, - "no-multi-str": 2, - "no-multiple-empty-lines": [2, { "max": 1 }], - "no-native-reassign": 2, - "no-negated-in-lhs": 2, - "no-new": 2, - "no-new-func": 2, - "no-new-object": 2, - "no-new-require": 2, - "no-new-wrappers": 2, - "no-obj-calls": 2, - "no-octal": 2, - "no-octal-escape": 2, - "no-proto": 2, - "no-redeclare": 2, - "no-regex-spaces": 2, - "no-return-assign": 2, - "no-self-compare": 2, - "no-sequences": 2, - "no-shadow-restricted-names": 2, - "no-spaced-func": 2, - "no-sparse-arrays": 2, - "no-this-before-super": 2, - "no-throw-literal": 2, - "no-trailing-spaces": 2, - "no-undef": 2, - "no-undef-init": 2, - "no-unexpected-multiline": 2, - "no-unneeded-ternary": [2, { "defaultAssignment": false }], - "no-unreachable": 2, - "no-unused-vars": [2, { "vars": "all", "args": "none" }], - "no-useless-call": 2, - "no-with": 2, - "one-var": [2, { "initialized": "never" }], - "operator-linebreak": [2, "after", { "overrides": { "?": "before", ":": "before" } }], - "padded-blocks": [2, "never"], - "quotes": [2, "single", "avoid-escape"], - "radix": 2, - "semi": [2, "never"], - "semi-spacing": [2, { "before": false, "after": true }], - "space-after-keywords": [2, "always"], - "space-before-blocks": [2, "always"], - "space-before-function-paren": [2, "always"], - "space-before-keywords": [2, "always"], - "space-in-parens": [2, "never"], - "space-infix-ops": 2, - "space-return-throw-case": 2, - "space-unary-ops": [2, { "words": true, "nonwords": false }], - "spaced-comment": [2, "always", { "markers": ["global", "globals", "eslint", "eslint-disable", "*package", "!", ","] }], - "use-isnan": 2, - "valid-typeof": 2, - "wrap-iife": [2, "any"], - "yoda": [2, "never"], - - "standard/object-curly-even-spacing": [2, "either"], - "standard/array-bracket-even-spacing": [2, "either"], - "standard/computed-property-even-spacing": [2, "even"] - } -} diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-cipher/node_modules/browserify-aes/.npmignore b/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-cipher/node_modules/browserify-aes/.npmignore deleted file mode 100644 index 65e3ba2e..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-cipher/node_modules/browserify-aes/.npmignore +++ /dev/null @@ -1 +0,0 @@ -test/ diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-cipher/node_modules/browserify-aes/.travis.yml b/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-cipher/node_modules/browserify-aes/.travis.yml deleted file mode 100644 index eb83acd9..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-cipher/node_modules/browserify-aes/.travis.yml +++ /dev/null @@ -1,6 +0,0 @@ -language: node_js -node_js: - - "0.11" - - "0.10" - - "0.12" - - "iojs" diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-cipher/node_modules/browserify-aes/LICENSE b/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-cipher/node_modules/browserify-aes/LICENSE deleted file mode 100644 index 924b38b1..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-cipher/node_modules/browserify-aes/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2014-2015 browserify-aes contributors - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-cipher/node_modules/browserify-aes/aes.js b/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-cipher/node_modules/browserify-aes/aes.js deleted file mode 100644 index 4829057f..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-cipher/node_modules/browserify-aes/aes.js +++ /dev/null @@ -1,177 +0,0 @@ -// based on the aes implimentation in triple sec -// https://github.com/keybase/triplesec - -// which is in turn based on the one from crypto-js -// https://code.google.com/p/crypto-js/ - -var uint_max = Math.pow(2, 32) -function fixup_uint32 (x) { - var ret, x_pos - ret = x > uint_max || x < 0 ? (x_pos = Math.abs(x) % uint_max, x < 0 ? uint_max - x_pos : x_pos) : x - return ret -} -function scrub_vec (v) { - for (var i = 0; i < v.length; v++) { - v[i] = 0 - } - return false -} - -function Global () { - this.SBOX = [] - this.INV_SBOX = [] - this.SUB_MIX = [[], [], [], []] - this.INV_SUB_MIX = [[], [], [], []] - this.init() - this.RCON = [0x00, 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80, 0x1b, 0x36] -} - -Global.prototype.init = function () { - var d, i, sx, t, x, x2, x4, x8, xi, _i - d = (function () { - var _i, _results - _results = [] - for (i = _i = 0; _i < 256; i = ++_i) { - if (i < 128) { - _results.push(i << 1) - } else { - _results.push((i << 1) ^ 0x11b) - } - } - return _results - })() - x = 0 - xi = 0 - for (i = _i = 0; _i < 256; i = ++_i) { - sx = xi ^ (xi << 1) ^ (xi << 2) ^ (xi << 3) ^ (xi << 4) - sx = (sx >>> 8) ^ (sx & 0xff) ^ 0x63 - this.SBOX[x] = sx - this.INV_SBOX[sx] = x - x2 = d[x] - x4 = d[x2] - x8 = d[x4] - t = (d[sx] * 0x101) ^ (sx * 0x1010100) - this.SUB_MIX[0][x] = (t << 24) | (t >>> 8) - this.SUB_MIX[1][x] = (t << 16) | (t >>> 16) - this.SUB_MIX[2][x] = (t << 8) | (t >>> 24) - this.SUB_MIX[3][x] = t - t = (x8 * 0x1010101) ^ (x4 * 0x10001) ^ (x2 * 0x101) ^ (x * 0x1010100) - this.INV_SUB_MIX[0][sx] = (t << 24) | (t >>> 8) - this.INV_SUB_MIX[1][sx] = (t << 16) | (t >>> 16) - this.INV_SUB_MIX[2][sx] = (t << 8) | (t >>> 24) - this.INV_SUB_MIX[3][sx] = t - if (x === 0) { - x = xi = 1 - } else { - x = x2 ^ d[d[d[x8 ^ x2]]] - xi ^= d[d[xi]] - } - } - return true -} - -var G = new Global() - -AES.blockSize = 4 * 4 - -AES.prototype.blockSize = AES.blockSize - -AES.keySize = 256 / 8 - -AES.prototype.keySize = AES.keySize - -function bufferToArray (buf) { - var len = buf.length / 4 - var out = new Array(len) - var i = -1 - while (++i < len) { - out[i] = buf.readUInt32BE(i * 4) - } - return out -} -function AES (key) { - this._key = bufferToArray(key) - this._doReset() -} - -AES.prototype._doReset = function () { - var invKsRow, keySize, keyWords, ksRow, ksRows, t - keyWords = this._key - keySize = keyWords.length - this._nRounds = keySize + 6 - ksRows = (this._nRounds + 1) * 4 - this._keySchedule = [] - for (ksRow = 0; ksRow < ksRows; ksRow++) { - this._keySchedule[ksRow] = ksRow < keySize ? keyWords[ksRow] : (t = this._keySchedule[ksRow - 1], (ksRow % keySize) === 0 ? (t = (t << 8) | (t >>> 24), t = (G.SBOX[t >>> 24] << 24) | (G.SBOX[(t >>> 16) & 0xff] << 16) | (G.SBOX[(t >>> 8) & 0xff] << 8) | G.SBOX[t & 0xff], t ^= G.RCON[(ksRow / keySize) | 0] << 24) : keySize > 6 && ksRow % keySize === 4 ? t = (G.SBOX[t >>> 24] << 24) | (G.SBOX[(t >>> 16) & 0xff] << 16) | (G.SBOX[(t >>> 8) & 0xff] << 8) | G.SBOX[t & 0xff] : void 0, this._keySchedule[ksRow - keySize] ^ t) - } - this._invKeySchedule = [] - for (invKsRow = 0; invKsRow < ksRows; invKsRow++) { - ksRow = ksRows - invKsRow - t = this._keySchedule[ksRow - (invKsRow % 4 ? 0 : 4)] - this._invKeySchedule[invKsRow] = invKsRow < 4 || ksRow <= 4 ? t : G.INV_SUB_MIX[0][G.SBOX[t >>> 24]] ^ G.INV_SUB_MIX[1][G.SBOX[(t >>> 16) & 0xff]] ^ G.INV_SUB_MIX[2][G.SBOX[(t >>> 8) & 0xff]] ^ G.INV_SUB_MIX[3][G.SBOX[t & 0xff]] - } - return true -} - -AES.prototype.encryptBlock = function (M) { - M = bufferToArray(new Buffer(M)) - var out = this._doCryptBlock(M, this._keySchedule, G.SUB_MIX, G.SBOX) - var buf = new Buffer(16) - buf.writeUInt32BE(out[0], 0) - buf.writeUInt32BE(out[1], 4) - buf.writeUInt32BE(out[2], 8) - buf.writeUInt32BE(out[3], 12) - return buf -} - -AES.prototype.decryptBlock = function (M) { - M = bufferToArray(new Buffer(M)) - var temp = [M[3], M[1]] - M[1] = temp[0] - M[3] = temp[1] - var out = this._doCryptBlock(M, this._invKeySchedule, G.INV_SUB_MIX, G.INV_SBOX) - var buf = new Buffer(16) - buf.writeUInt32BE(out[0], 0) - buf.writeUInt32BE(out[3], 4) - buf.writeUInt32BE(out[2], 8) - buf.writeUInt32BE(out[1], 12) - return buf -} - -AES.prototype.scrub = function () { - scrub_vec(this._keySchedule) - scrub_vec(this._invKeySchedule) - scrub_vec(this._key) -} - -AES.prototype._doCryptBlock = function (M, keySchedule, SUB_MIX, SBOX) { - var ksRow, s0, s1, s2, s3, t0, t1, t2, t3 - - s0 = M[0] ^ keySchedule[0] - s1 = M[1] ^ keySchedule[1] - s2 = M[2] ^ keySchedule[2] - s3 = M[3] ^ keySchedule[3] - ksRow = 4 - for (var round = 1; round < this._nRounds; round++) { - t0 = SUB_MIX[0][s0 >>> 24] ^ SUB_MIX[1][(s1 >>> 16) & 0xff] ^ SUB_MIX[2][(s2 >>> 8) & 0xff] ^ SUB_MIX[3][s3 & 0xff] ^ keySchedule[ksRow++] - t1 = SUB_MIX[0][s1 >>> 24] ^ SUB_MIX[1][(s2 >>> 16) & 0xff] ^ SUB_MIX[2][(s3 >>> 8) & 0xff] ^ SUB_MIX[3][s0 & 0xff] ^ keySchedule[ksRow++] - t2 = SUB_MIX[0][s2 >>> 24] ^ SUB_MIX[1][(s3 >>> 16) & 0xff] ^ SUB_MIX[2][(s0 >>> 8) & 0xff] ^ SUB_MIX[3][s1 & 0xff] ^ keySchedule[ksRow++] - t3 = SUB_MIX[0][s3 >>> 24] ^ SUB_MIX[1][(s0 >>> 16) & 0xff] ^ SUB_MIX[2][(s1 >>> 8) & 0xff] ^ SUB_MIX[3][s2 & 0xff] ^ keySchedule[ksRow++] - s0 = t0 - s1 = t1 - s2 = t2 - s3 = t3 - } - t0 = ((SBOX[s0 >>> 24] << 24) | (SBOX[(s1 >>> 16) & 0xff] << 16) | (SBOX[(s2 >>> 8) & 0xff] << 8) | SBOX[s3 & 0xff]) ^ keySchedule[ksRow++] - t1 = ((SBOX[s1 >>> 24] << 24) | (SBOX[(s2 >>> 16) & 0xff] << 16) | (SBOX[(s3 >>> 8) & 0xff] << 8) | SBOX[s0 & 0xff]) ^ keySchedule[ksRow++] - t2 = ((SBOX[s2 >>> 24] << 24) | (SBOX[(s3 >>> 16) & 0xff] << 16) | (SBOX[(s0 >>> 8) & 0xff] << 8) | SBOX[s1 & 0xff]) ^ keySchedule[ksRow++] - t3 = ((SBOX[s3 >>> 24] << 24) | (SBOX[(s0 >>> 16) & 0xff] << 16) | (SBOX[(s1 >>> 8) & 0xff] << 8) | SBOX[s2 & 0xff]) ^ keySchedule[ksRow++] - return [ - fixup_uint32(t0), - fixup_uint32(t1), - fixup_uint32(t2), - fixup_uint32(t3) - ] -} - -exports.AES = AES diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-cipher/node_modules/browserify-aes/authCipher.js b/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-cipher/node_modules/browserify-aes/authCipher.js deleted file mode 100644 index 1107a01a..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-cipher/node_modules/browserify-aes/authCipher.js +++ /dev/null @@ -1,97 +0,0 @@ -var aes = require('./aes') -var Transform = require('cipher-base') -var inherits = require('inherits') -var GHASH = require('./ghash') -var xor = require('buffer-xor') -inherits(StreamCipher, Transform) -module.exports = StreamCipher - -function StreamCipher (mode, key, iv, decrypt) { - if (!(this instanceof StreamCipher)) { - return new StreamCipher(mode, key, iv) - } - Transform.call(this) - this._finID = Buffer.concat([iv, new Buffer([0, 0, 0, 1])]) - iv = Buffer.concat([iv, new Buffer([0, 0, 0, 2])]) - this._cipher = new aes.AES(key) - this._prev = new Buffer(iv.length) - this._cache = new Buffer('') - this._secCache = new Buffer('') - this._decrypt = decrypt - this._alen = 0 - this._len = 0 - iv.copy(this._prev) - this._mode = mode - var h = new Buffer(4) - h.fill(0) - this._ghash = new GHASH(this._cipher.encryptBlock(h)) - this._authTag = null - this._called = false -} -StreamCipher.prototype._update = function (chunk) { - if (!this._called && this._alen) { - var rump = 16 - (this._alen % 16) - if (rump < 16) { - rump = new Buffer(rump) - rump.fill(0) - this._ghash.update(rump) - } - } - this._called = true - var out = this._mode.encrypt(this, chunk) - if (this._decrypt) { - this._ghash.update(chunk) - } else { - this._ghash.update(out) - } - this._len += chunk.length - return out -} -StreamCipher.prototype._final = function () { - if (this._decrypt && !this._authTag) { - throw new Error('Unsupported state or unable to authenticate data') - } - var tag = xor(this._ghash.final(this._alen * 8, this._len * 8), this._cipher.encryptBlock(this._finID)) - if (this._decrypt) { - if (xorTest(tag, this._authTag)) { - throw new Error('Unsupported state or unable to authenticate data') - } - } else { - this._authTag = tag - } - this._cipher.scrub() -} -StreamCipher.prototype.getAuthTag = function getAuthTag () { - if (!this._decrypt && Buffer.isBuffer(this._authTag)) { - return this._authTag - } else { - throw new Error('Attempting to get auth tag in unsupported state') - } -} -StreamCipher.prototype.setAuthTag = function setAuthTag (tag) { - if (this._decrypt) { - this._authTag = tag - } else { - throw new Error('Attempting to set auth tag in unsupported state') - } -} -StreamCipher.prototype.setAAD = function setAAD (buf) { - if (!this._called) { - this._ghash.update(buf) - this._alen += buf.length - } else { - throw new Error('Attempting to set AAD in unsupported state') - } -} -function xorTest (a, b) { - var out = 0 - if (a.length !== b.length) { - out++ - } - var len = Math.min(a.length, b.length) - var i = -1 - while (++i < len) { - out += (a[i] ^ b[i]) - } - return out -} diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-cipher/node_modules/browserify-aes/browser.js b/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-cipher/node_modules/browserify-aes/browser.js deleted file mode 100644 index a058a84d..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-cipher/node_modules/browserify-aes/browser.js +++ /dev/null @@ -1,11 +0,0 @@ -var ciphers = require('./encrypter') -exports.createCipher = exports.Cipher = ciphers.createCipher -exports.createCipheriv = exports.Cipheriv = ciphers.createCipheriv -var deciphers = require('./decrypter') -exports.createDecipher = exports.Decipher = deciphers.createDecipher -exports.createDecipheriv = exports.Decipheriv = deciphers.createDecipheriv -var modes = require('./modes') -function getCiphers () { - return Object.keys(modes) -} -exports.listCiphers = exports.getCiphers = getCiphers diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-cipher/node_modules/browserify-aes/decrypter.js b/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-cipher/node_modules/browserify-aes/decrypter.js deleted file mode 100644 index b7b8bb02..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-cipher/node_modules/browserify-aes/decrypter.js +++ /dev/null @@ -1,137 +0,0 @@ -var aes = require('./aes') -var Transform = require('cipher-base') -var inherits = require('inherits') -var modes = require('./modes') -var StreamCipher = require('./streamCipher') -var AuthCipher = require('./authCipher') -var ebtk = require('evp_bytestokey') - -inherits(Decipher, Transform) -function Decipher (mode, key, iv) { - if (!(this instanceof Decipher)) { - return new Decipher(mode, key, iv) - } - Transform.call(this) - this._cache = new Splitter() - this._last = void 0 - this._cipher = new aes.AES(key) - this._prev = new Buffer(iv.length) - iv.copy(this._prev) - this._mode = mode - this._autopadding = true -} -Decipher.prototype._update = function (data) { - this._cache.add(data) - var chunk - var thing - var out = [] - while ((chunk = this._cache.get(this._autopadding))) { - thing = this._mode.decrypt(this, chunk) - out.push(thing) - } - return Buffer.concat(out) -} -Decipher.prototype._final = function () { - var chunk = this._cache.flush() - if (this._autopadding) { - return unpad(this._mode.decrypt(this, chunk)) - } else if (chunk) { - throw new Error('data not multiple of block length') - } -} -Decipher.prototype.setAutoPadding = function (setTo) { - this._autopadding = !!setTo - return this -} -function Splitter () { - if (!(this instanceof Splitter)) { - return new Splitter() - } - this.cache = new Buffer('') -} -Splitter.prototype.add = function (data) { - this.cache = Buffer.concat([this.cache, data]) -} - -Splitter.prototype.get = function (autoPadding) { - var out - if (autoPadding) { - if (this.cache.length > 16) { - out = this.cache.slice(0, 16) - this.cache = this.cache.slice(16) - return out - } - } else { - if (this.cache.length >= 16) { - out = this.cache.slice(0, 16) - this.cache = this.cache.slice(16) - return out - } - } - return null -} -Splitter.prototype.flush = function () { - if (this.cache.length) { - return this.cache - } -} -function unpad (last) { - var padded = last[15] - var i = -1 - while (++i < padded) { - if (last[(i + (16 - padded))] !== padded) { - throw new Error('unable to decrypt data') - } - } - if (padded === 16) { - return - } - return last.slice(0, 16 - padded) -} - -var modelist = { - ECB: require('./modes/ecb'), - CBC: require('./modes/cbc'), - CFB: require('./modes/cfb'), - CFB8: require('./modes/cfb8'), - CFB1: require('./modes/cfb1'), - OFB: require('./modes/ofb'), - CTR: require('./modes/ctr'), - GCM: require('./modes/ctr') -} - -function createDecipheriv (suite, password, iv) { - var config = modes[suite.toLowerCase()] - if (!config) { - throw new TypeError('invalid suite type') - } - if (typeof iv === 'string') { - iv = new Buffer(iv) - } - if (typeof password === 'string') { - password = new Buffer(password) - } - if (password.length !== config.key / 8) { - throw new TypeError('invalid key length ' + password.length) - } - if (iv.length !== config.iv) { - throw new TypeError('invalid iv length ' + iv.length) - } - if (config.type === 'stream') { - return new StreamCipher(modelist[config.mode], password, iv, true) - } else if (config.type === 'auth') { - return new AuthCipher(modelist[config.mode], password, iv, true) - } - return new Decipher(modelist[config.mode], password, iv) -} - -function createDecipher (suite, password) { - var config = modes[suite.toLowerCase()] - if (!config) { - throw new TypeError('invalid suite type') - } - var keys = ebtk(password, false, config.key, config.iv) - return createDecipheriv(suite, keys.key, keys.iv) -} -exports.createDecipher = createDecipher -exports.createDecipheriv = createDecipheriv diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-cipher/node_modules/browserify-aes/encrypter.js b/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-cipher/node_modules/browserify-aes/encrypter.js deleted file mode 100644 index 3d3f561e..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-cipher/node_modules/browserify-aes/encrypter.js +++ /dev/null @@ -1,122 +0,0 @@ -var aes = require('./aes') -var Transform = require('cipher-base') -var inherits = require('inherits') -var modes = require('./modes') -var ebtk = require('evp_bytestokey') -var StreamCipher = require('./streamCipher') -var AuthCipher = require('./authCipher') -inherits(Cipher, Transform) -function Cipher (mode, key, iv) { - if (!(this instanceof Cipher)) { - return new Cipher(mode, key, iv) - } - Transform.call(this) - this._cache = new Splitter() - this._cipher = new aes.AES(key) - this._prev = new Buffer(iv.length) - iv.copy(this._prev) - this._mode = mode - this._autopadding = true -} -Cipher.prototype._update = function (data) { - this._cache.add(data) - var chunk - var thing - var out = [] - while ((chunk = this._cache.get())) { - thing = this._mode.encrypt(this, chunk) - out.push(thing) - } - return Buffer.concat(out) -} -Cipher.prototype._final = function () { - var chunk = this._cache.flush() - if (this._autopadding) { - chunk = this._mode.encrypt(this, chunk) - this._cipher.scrub() - return chunk - } else if (chunk.toString('hex') !== '10101010101010101010101010101010') { - this._cipher.scrub() - throw new Error('data not multiple of block length') - } -} -Cipher.prototype.setAutoPadding = function (setTo) { - this._autopadding = !!setTo - return this -} - -function Splitter () { - if (!(this instanceof Splitter)) { - return new Splitter() - } - this.cache = new Buffer('') -} -Splitter.prototype.add = function (data) { - this.cache = Buffer.concat([this.cache, data]) -} - -Splitter.prototype.get = function () { - if (this.cache.length > 15) { - var out = this.cache.slice(0, 16) - this.cache = this.cache.slice(16) - return out - } - return null -} -Splitter.prototype.flush = function () { - var len = 16 - this.cache.length - var padBuff = new Buffer(len) - - var i = -1 - while (++i < len) { - padBuff.writeUInt8(len, i) - } - var out = Buffer.concat([this.cache, padBuff]) - return out -} -var modelist = { - ECB: require('./modes/ecb'), - CBC: require('./modes/cbc'), - CFB: require('./modes/cfb'), - CFB8: require('./modes/cfb8'), - CFB1: require('./modes/cfb1'), - OFB: require('./modes/ofb'), - CTR: require('./modes/ctr'), - GCM: require('./modes/ctr') -} - -function createCipheriv (suite, password, iv) { - var config = modes[suite.toLowerCase()] - if (!config) { - throw new TypeError('invalid suite type') - } - if (typeof iv === 'string') { - iv = new Buffer(iv) - } - if (typeof password === 'string') { - password = new Buffer(password) - } - if (password.length !== config.key / 8) { - throw new TypeError('invalid key length ' + password.length) - } - if (iv.length !== config.iv) { - throw new TypeError('invalid iv length ' + iv.length) - } - if (config.type === 'stream') { - return new StreamCipher(modelist[config.mode], password, iv) - } else if (config.type === 'auth') { - return new AuthCipher(modelist[config.mode], password, iv) - } - return new Cipher(modelist[config.mode], password, iv) -} -function createCipher (suite, password) { - var config = modes[suite.toLowerCase()] - if (!config) { - throw new TypeError('invalid suite type') - } - var keys = ebtk(password, false, config.key, config.iv) - return createCipheriv(suite, keys.key, keys.iv) -} - -exports.createCipheriv = createCipheriv -exports.createCipher = createCipher diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-cipher/node_modules/browserify-aes/ghash.js b/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-cipher/node_modules/browserify-aes/ghash.js deleted file mode 100644 index 0ca143cd..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-cipher/node_modules/browserify-aes/ghash.js +++ /dev/null @@ -1,98 +0,0 @@ -var zeros = new Buffer(16) -zeros.fill(0) -module.exports = GHASH -function GHASH (key) { - this.h = key - this.state = new Buffer(16) - this.state.fill(0) - this.cache = new Buffer('') -} -// from http://bitwiseshiftleft.github.io/sjcl/doc/symbols/src/core_gcm.js.html -// by Juho Vähä-Herttua -GHASH.prototype.ghash = function (block) { - var i = -1 - while (++i < block.length) { - this.state[i] ^= block[i] - } - this._multiply() -} - -GHASH.prototype._multiply = function () { - var Vi = toArray(this.h) - var Zi = [0, 0, 0, 0] - var j, xi, lsb_Vi - var i = -1 - while (++i < 128) { - xi = (this.state[~~(i / 8)] & (1 << (7 - i % 8))) !== 0 - if (xi) { - // Z_i+1 = Z_i ^ V_i - Zi = xor(Zi, Vi) - } - - // Store the value of LSB(V_i) - lsb_Vi = (Vi[3] & 1) !== 0 - - // V_i+1 = V_i >> 1 - for (j = 3; j > 0; j--) { - Vi[j] = (Vi[j] >>> 1) | ((Vi[j - 1] & 1) << 31) - } - Vi[0] = Vi[0] >>> 1 - - // If LSB(V_i) is 1, V_i+1 = (V_i >> 1) ^ R - if (lsb_Vi) { - Vi[0] = Vi[0] ^ (0xe1 << 24) - } - } - this.state = fromArray(Zi) -} -GHASH.prototype.update = function (buf) { - this.cache = Buffer.concat([this.cache, buf]) - var chunk - while (this.cache.length >= 16) { - chunk = this.cache.slice(0, 16) - this.cache = this.cache.slice(16) - this.ghash(chunk) - } -} -GHASH.prototype.final = function (abl, bl) { - if (this.cache.length) { - this.ghash(Buffer.concat([this.cache, zeros], 16)) - } - this.ghash(fromArray([ - 0, abl, - 0, bl - ])) - return this.state -} - -function toArray (buf) { - return [ - buf.readUInt32BE(0), - buf.readUInt32BE(4), - buf.readUInt32BE(8), - buf.readUInt32BE(12) - ] -} -function fromArray (out) { - out = out.map(fixup_uint32) - var buf = new Buffer(16) - buf.writeUInt32BE(out[0], 0) - buf.writeUInt32BE(out[1], 4) - buf.writeUInt32BE(out[2], 8) - buf.writeUInt32BE(out[3], 12) - return buf -} -var uint_max = Math.pow(2, 32) -function fixup_uint32 (x) { - var ret, x_pos - ret = x > uint_max || x < 0 ? (x_pos = Math.abs(x) % uint_max, x < 0 ? uint_max - x_pos : x_pos) : x - return ret -} -function xor (a, b) { - return [ - a[0] ^ b[0], - a[1] ^ b[1], - a[2] ^ b[2], - a[3] ^ b[3] - ] -} diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-cipher/node_modules/browserify-aes/index.js b/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-cipher/node_modules/browserify-aes/index.js deleted file mode 100644 index 58fa883f..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-cipher/node_modules/browserify-aes/index.js +++ /dev/null @@ -1,7 +0,0 @@ -var crypto = require('crypto') - -exports.createCipher = exports.Cipher = crypto.createCipher -exports.createCipheriv = exports.Cipheriv = crypto.createCipheriv -exports.createDecipher = exports.Decipher = crypto.createDecipher -exports.createDecipheriv = exports.Decipheriv = crypto.createDecipheriv -exports.listCiphers = exports.getCiphers = crypto.getCiphers diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-cipher/node_modules/browserify-aes/modes.js b/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-cipher/node_modules/browserify-aes/modes.js deleted file mode 100644 index c070086d..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-cipher/node_modules/browserify-aes/modes.js +++ /dev/null @@ -1,171 +0,0 @@ -exports['aes-128-ecb'] = { - cipher: 'AES', - key: 128, - iv: 0, - mode: 'ECB', - type: 'block' -} -exports['aes-192-ecb'] = { - cipher: 'AES', - key: 192, - iv: 0, - mode: 'ECB', - type: 'block' -} -exports['aes-256-ecb'] = { - cipher: 'AES', - key: 256, - iv: 0, - mode: 'ECB', - type: 'block' -} -exports['aes-128-cbc'] = { - cipher: 'AES', - key: 128, - iv: 16, - mode: 'CBC', - type: 'block' -} -exports['aes-192-cbc'] = { - cipher: 'AES', - key: 192, - iv: 16, - mode: 'CBC', - type: 'block' -} -exports['aes-256-cbc'] = { - cipher: 'AES', - key: 256, - iv: 16, - mode: 'CBC', - type: 'block' -} -exports['aes128'] = exports['aes-128-cbc'] -exports['aes192'] = exports['aes-192-cbc'] -exports['aes256'] = exports['aes-256-cbc'] -exports['aes-128-cfb'] = { - cipher: 'AES', - key: 128, - iv: 16, - mode: 'CFB', - type: 'stream' -} -exports['aes-192-cfb'] = { - cipher: 'AES', - key: 192, - iv: 16, - mode: 'CFB', - type: 'stream' -} -exports['aes-256-cfb'] = { - cipher: 'AES', - key: 256, - iv: 16, - mode: 'CFB', - type: 'stream' -} -exports['aes-128-cfb8'] = { - cipher: 'AES', - key: 128, - iv: 16, - mode: 'CFB8', - type: 'stream' -} -exports['aes-192-cfb8'] = { - cipher: 'AES', - key: 192, - iv: 16, - mode: 'CFB8', - type: 'stream' -} -exports['aes-256-cfb8'] = { - cipher: 'AES', - key: 256, - iv: 16, - mode: 'CFB8', - type: 'stream' -} -exports['aes-128-cfb1'] = { - cipher: 'AES', - key: 128, - iv: 16, - mode: 'CFB1', - type: 'stream' -} -exports['aes-192-cfb1'] = { - cipher: 'AES', - key: 192, - iv: 16, - mode: 'CFB1', - type: 'stream' -} -exports['aes-256-cfb1'] = { - cipher: 'AES', - key: 256, - iv: 16, - mode: 'CFB1', - type: 'stream' -} -exports['aes-128-ofb'] = { - cipher: 'AES', - key: 128, - iv: 16, - mode: 'OFB', - type: 'stream' -} -exports['aes-192-ofb'] = { - cipher: 'AES', - key: 192, - iv: 16, - mode: 'OFB', - type: 'stream' -} -exports['aes-256-ofb'] = { - cipher: 'AES', - key: 256, - iv: 16, - mode: 'OFB', - type: 'stream' -} -exports['aes-128-ctr'] = { - cipher: 'AES', - key: 128, - iv: 16, - mode: 'CTR', - type: 'stream' -} -exports['aes-192-ctr'] = { - cipher: 'AES', - key: 192, - iv: 16, - mode: 'CTR', - type: 'stream' -} -exports['aes-256-ctr'] = { - cipher: 'AES', - key: 256, - iv: 16, - mode: 'CTR', - type: 'stream' -} -exports['aes-128-gcm'] = { - cipher: 'AES', - key: 128, - iv: 12, - mode: 'GCM', - type: 'auth' -} -exports['aes-192-gcm'] = { - cipher: 'AES', - key: 192, - iv: 12, - mode: 'GCM', - type: 'auth' -} -exports['aes-256-gcm'] = { - cipher: 'AES', - key: 256, - iv: 12, - mode: 'GCM', - type: 'auth' -} diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-cipher/node_modules/browserify-aes/modes/cbc.js b/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-cipher/node_modules/browserify-aes/modes/cbc.js deleted file mode 100644 index b133e406..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-cipher/node_modules/browserify-aes/modes/cbc.js +++ /dev/null @@ -1,17 +0,0 @@ -var xor = require('buffer-xor') - -exports.encrypt = function (self, block) { - var data = xor(block, self._prev) - - self._prev = self._cipher.encryptBlock(data) - return self._prev -} - -exports.decrypt = function (self, block) { - var pad = self._prev - - self._prev = block - var out = self._cipher.decryptBlock(block) - - return xor(out, pad) -} diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-cipher/node_modules/browserify-aes/modes/cfb.js b/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-cipher/node_modules/browserify-aes/modes/cfb.js deleted file mode 100644 index 0bfe4fab..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-cipher/node_modules/browserify-aes/modes/cfb.js +++ /dev/null @@ -1,31 +0,0 @@ -var xor = require('buffer-xor') - -exports.encrypt = function (self, data, decrypt) { - var out = new Buffer('') - var len - - while (data.length) { - if (self._cache.length === 0) { - self._cache = self._cipher.encryptBlock(self._prev) - self._prev = new Buffer('') - } - - if (self._cache.length <= data.length) { - len = self._cache.length - out = Buffer.concat([out, encryptStart(self, data.slice(0, len), decrypt)]) - data = data.slice(len) - } else { - out = Buffer.concat([out, encryptStart(self, data, decrypt)]) - break - } - } - - return out -} -function encryptStart (self, data, decrypt) { - var len = data.length - var out = xor(data, self._cache) - self._cache = self._cache.slice(len) - self._prev = Buffer.concat([self._prev, decrypt ? data : out]) - return out -} diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-cipher/node_modules/browserify-aes/modes/cfb1.js b/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-cipher/node_modules/browserify-aes/modes/cfb1.js deleted file mode 100644 index 335542e2..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-cipher/node_modules/browserify-aes/modes/cfb1.js +++ /dev/null @@ -1,34 +0,0 @@ -function encryptByte (self, byteParam, decrypt) { - var pad - var i = -1 - var len = 8 - var out = 0 - var bit, value - while (++i < len) { - pad = self._cipher.encryptBlock(self._prev) - bit = (byteParam & (1 << (7 - i))) ? 0x80 : 0 - value = pad[0] ^ bit - out += ((value & 0x80) >> (i % 8)) - self._prev = shiftIn(self._prev, decrypt ? bit : value) - } - return out -} -exports.encrypt = function (self, chunk, decrypt) { - var len = chunk.length - var out = new Buffer(len) - var i = -1 - while (++i < len) { - out[i] = encryptByte(self, chunk[i], decrypt) - } - return out -} -function shiftIn (buffer, value) { - var len = buffer.length - var i = -1 - var out = new Buffer(buffer.length) - buffer = Buffer.concat([buffer, new Buffer([value])]) - while (++i < len) { - out[i] = buffer[i] << 1 | buffer[i + 1] >> (7) - } - return out -} diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-cipher/node_modules/browserify-aes/modes/cfb8.js b/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-cipher/node_modules/browserify-aes/modes/cfb8.js deleted file mode 100644 index c967a959..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-cipher/node_modules/browserify-aes/modes/cfb8.js +++ /dev/null @@ -1,15 +0,0 @@ -function encryptByte (self, byteParam, decrypt) { - var pad = self._cipher.encryptBlock(self._prev) - var out = pad[0] ^ byteParam - self._prev = Buffer.concat([self._prev.slice(1), new Buffer([decrypt ? byteParam : out])]) - return out -} -exports.encrypt = function (self, chunk, decrypt) { - var len = chunk.length - var out = new Buffer(len) - var i = -1 - while (++i < len) { - out[i] = encryptByte(self, chunk[i], decrypt) - } - return out -} diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-cipher/node_modules/browserify-aes/modes/ctr.js b/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-cipher/node_modules/browserify-aes/modes/ctr.js deleted file mode 100644 index 0ef2278b..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-cipher/node_modules/browserify-aes/modes/ctr.js +++ /dev/null @@ -1,31 +0,0 @@ -var xor = require('buffer-xor') - -function incr32 (iv) { - var len = iv.length - var item - while (len--) { - item = iv.readUInt8(len) - if (item === 255) { - iv.writeUInt8(0, len) - } else { - item++ - iv.writeUInt8(item, len) - break - } - } -} - -function getBlock (self) { - var out = self._cipher.encryptBlock(self._prev) - incr32(self._prev) - return out -} - -exports.encrypt = function (self, chunk) { - while (self._cache.length < chunk.length) { - self._cache = Buffer.concat([self._cache, getBlock(self)]) - } - var pad = self._cache.slice(0, chunk.length) - self._cache = self._cache.slice(chunk.length) - return xor(chunk, pad) -} diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-cipher/node_modules/browserify-aes/modes/ecb.js b/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-cipher/node_modules/browserify-aes/modes/ecb.js deleted file mode 100644 index 4dd97e7d..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-cipher/node_modules/browserify-aes/modes/ecb.js +++ /dev/null @@ -1,6 +0,0 @@ -exports.encrypt = function (self, block) { - return self._cipher.encryptBlock(block) -} -exports.decrypt = function (self, block) { - return self._cipher.decryptBlock(block) -} diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-cipher/node_modules/browserify-aes/modes/ofb.js b/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-cipher/node_modules/browserify-aes/modes/ofb.js deleted file mode 100644 index bd875589..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-cipher/node_modules/browserify-aes/modes/ofb.js +++ /dev/null @@ -1,16 +0,0 @@ -var xor = require('buffer-xor') - -function getBlock (self) { - self._prev = self._cipher.encryptBlock(self._prev) - return self._prev -} - -exports.encrypt = function (self, chunk) { - while (self._cache.length < chunk.length) { - self._cache = Buffer.concat([self._cache, getBlock(self)]) - } - - var pad = self._cache.slice(0, chunk.length) - self._cache = self._cache.slice(chunk.length) - return xor(chunk, pad) -} diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-cipher/node_modules/browserify-aes/node_modules/buffer-xor/.npmignore b/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-cipher/node_modules/browserify-aes/node_modules/buffer-xor/.npmignore deleted file mode 100644 index 3c3629e6..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-cipher/node_modules/browserify-aes/node_modules/buffer-xor/.npmignore +++ /dev/null @@ -1 +0,0 @@ -node_modules diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-cipher/node_modules/browserify-aes/node_modules/buffer-xor/.travis.yml b/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-cipher/node_modules/browserify-aes/node_modules/buffer-xor/.travis.yml deleted file mode 100644 index d9f695b7..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-cipher/node_modules/browserify-aes/node_modules/buffer-xor/.travis.yml +++ /dev/null @@ -1,9 +0,0 @@ -language: node_js -before_install: - - "npm install npm -g" -node_js: - - "0.12" -env: - - TEST_SUITE=standard - - TEST_SUITE=unit -script: "npm run-script $TEST_SUITE" diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-cipher/node_modules/browserify-aes/node_modules/buffer-xor/LICENSE b/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-cipher/node_modules/browserify-aes/node_modules/buffer-xor/LICENSE deleted file mode 100644 index bba52181..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-cipher/node_modules/browserify-aes/node_modules/buffer-xor/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2015 Daniel Cousens - -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/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-cipher/node_modules/browserify-aes/node_modules/buffer-xor/README.md b/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-cipher/node_modules/browserify-aes/node_modules/buffer-xor/README.md deleted file mode 100644 index 007f0582..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-cipher/node_modules/browserify-aes/node_modules/buffer-xor/README.md +++ /dev/null @@ -1,41 +0,0 @@ -# buffer-xor - -[![TRAVIS](https://secure.travis-ci.org/crypto-browserify/buffer-xor.png)](http://travis-ci.org/crypto-browserify/buffer-xor) -[![NPM](http://img.shields.io/npm/v/buffer-xor.svg)](https://www.npmjs.org/package/buffer-xor) - -[![js-standard-style](https://cdn.rawgit.com/feross/standard/master/badge.svg)](https://github.com/feross/standard) - -A simple module for bitwise-xor on buffers. - - -## Examples - -``` javascript -var xor = require("buffer-xor") -var a = new Buffer('00ff0f', 'hex') -var b = new Buffer('f0f0', 'hex') - -console.log(xor(a, b)) -// => -``` - - -Or for those seeking those few extra cycles, perform the operation in place: - -``` javascript -var xorInplace = require("buffer-xor/inplace") -var a = new Buffer('00ff0f', 'hex') -var b = new Buffer('f0f0', 'hex') - -console.log(xorInplace(a, b)) -// => -// NOTE: xorInplace will return the shorter slice of its parameters - -// See that a has been mutated -console.log(a) -// => -``` - - -## License [MIT](LICENSE) - diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-cipher/node_modules/browserify-aes/node_modules/buffer-xor/index.js b/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-cipher/node_modules/browserify-aes/node_modules/buffer-xor/index.js deleted file mode 100644 index 85ee6f63..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-cipher/node_modules/browserify-aes/node_modules/buffer-xor/index.js +++ /dev/null @@ -1,10 +0,0 @@ -module.exports = function xor (a, b) { - var length = Math.min(a.length, b.length) - var buffer = new Buffer(length) - - for (var i = 0; i < length; ++i) { - buffer[i] = a[i] ^ b[i] - } - - return buffer -} diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-cipher/node_modules/browserify-aes/node_modules/buffer-xor/inline.js b/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-cipher/node_modules/browserify-aes/node_modules/buffer-xor/inline.js deleted file mode 100644 index 87975703..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-cipher/node_modules/browserify-aes/node_modules/buffer-xor/inline.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('./inplace') diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-cipher/node_modules/browserify-aes/node_modules/buffer-xor/inplace.js b/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-cipher/node_modules/browserify-aes/node_modules/buffer-xor/inplace.js deleted file mode 100644 index d71c172c..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-cipher/node_modules/browserify-aes/node_modules/buffer-xor/inplace.js +++ /dev/null @@ -1,9 +0,0 @@ -module.exports = function xorInplace (a, b) { - var length = Math.min(a.length, b.length) - - for (var i = 0; i < length; ++i) { - a[i] = a[i] ^ b[i] - } - - return a.slice(0, length) -} diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-cipher/node_modules/browserify-aes/node_modules/buffer-xor/package.json b/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-cipher/node_modules/browserify-aes/node_modules/buffer-xor/package.json deleted file mode 100644 index 0a15d4fe..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-cipher/node_modules/browserify-aes/node_modules/buffer-xor/package.json +++ /dev/null @@ -1,62 +0,0 @@ -{ - "name": "buffer-xor", - "version": "1.0.3", - "description": "A simple module for bitwise-xor on buffers", - "main": "index.js", - "scripts": { - "standard": "standard", - "test": "npm run-script unit", - "unit": "mocha" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/crypto-browserify/buffer-xor.git" - }, - "bugs": { - "url": "https://github.com/crypto-browserify/buffer-xor/issues" - }, - "homepage": "https://github.com/crypto-browserify/buffer-xor", - "keywords": [ - "bits", - "bitwise", - "buffer", - "buffer-xor", - "crypto", - "inline", - "math", - "memory", - "performance", - "xor" - ], - "author": { - "name": "Daniel Cousens" - }, - "license": "MIT", - "devDependencies": { - "mocha": "*", - "standard": "*" - }, - "gitHead": "8f92b79a8b8133c26a7ae1af09b2c84ec6e3f426", - "_id": "buffer-xor@1.0.3", - "_shasum": "26e61ed1422fb70dd42e6e36729ed51d855fe8d9", - "_from": "buffer-xor@>=1.0.2 <2.0.0", - "_npmVersion": "3.3.3", - "_nodeVersion": "4.1.1", - "_npmUser": { - "name": "dcousens", - "email": "email@dcousens.com" - }, - "dist": { - "shasum": "26e61ed1422fb70dd42e6e36729ed51d855fe8d9", - "tarball": "https://registry.npmjs.org/buffer-xor/-/buffer-xor-1.0.3.tgz" - }, - "maintainers": [ - { - "name": "dcousens", - "email": "email@dcousens.com" - } - ], - "directories": {}, - "_resolved": "https://registry.npmjs.org/buffer-xor/-/buffer-xor-1.0.3.tgz", - "readme": "ERROR: No README data found!" -} diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-cipher/node_modules/browserify-aes/node_modules/buffer-xor/test/fixtures.json b/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-cipher/node_modules/browserify-aes/node_modules/buffer-xor/test/fixtures.json deleted file mode 100644 index 6f3431ef..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-cipher/node_modules/browserify-aes/node_modules/buffer-xor/test/fixtures.json +++ /dev/null @@ -1,23 +0,0 @@ -[ - { - "a": "000f", - "b": "f0ff", - "expected": "f0f0" - }, - { - "a": "000f0f", - "b": "f0ff", - "mutated": "f0f00f", - "expected": "f0f0" - }, - { - "a": "000f", - "b": "f0ffff", - "expected": "f0f0" - }, - { - "a": "000000", - "b": "000000", - "expected": "000000" - } -] diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-cipher/node_modules/browserify-aes/node_modules/buffer-xor/test/index.js b/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-cipher/node_modules/browserify-aes/node_modules/buffer-xor/test/index.js deleted file mode 100644 index 06eacab4..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-cipher/node_modules/browserify-aes/node_modules/buffer-xor/test/index.js +++ /dev/null @@ -1,38 +0,0 @@ -/* global describe, it */ - -var assert = require('assert') -var xor = require('../') -var xorInplace = require('../inplace') -var fixtures = require('./fixtures') - -describe('xor', function () { - fixtures.forEach(function (f) { - it('returns ' + f.expected + ' for ' + f.a + '/' + f.b, function () { - var a = new Buffer(f.a, 'hex') - var b = new Buffer(f.b, 'hex') - var actual = xor(a, b) - - assert.equal(actual.toString('hex'), f.expected) - - // a/b unchanged - assert.equal(a.toString('hex'), f.a) - assert.equal(b.toString('hex'), f.b) - }) - }) -}) - -describe('xor/inplace', function () { - fixtures.forEach(function (f) { - it('returns ' + f.expected + ' for ' + f.a + '/' + f.b, function () { - var a = new Buffer(f.a, 'hex') - var b = new Buffer(f.b, 'hex') - var actual = xorInplace(a, b) - - assert.equal(actual.toString('hex'), f.expected) - - // a mutated, b unchanged - assert.equal(a.toString('hex'), f.mutated || f.expected) - assert.equal(b.toString('hex'), f.b) - }) - }) -}) diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-cipher/node_modules/browserify-aes/node_modules/cipher-base/.eslintrc b/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-cipher/node_modules/browserify-aes/node_modules/cipher-base/.eslintrc deleted file mode 100644 index a755cdbf..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-cipher/node_modules/browserify-aes/node_modules/cipher-base/.eslintrc +++ /dev/null @@ -1,3 +0,0 @@ -{ - "extends": ["standard"] -} diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-cipher/node_modules/browserify-aes/node_modules/cipher-base/.travis.yml b/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-cipher/node_modules/browserify-aes/node_modules/cipher-base/.travis.yml deleted file mode 100644 index eb83acd9..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-cipher/node_modules/browserify-aes/node_modules/cipher-base/.travis.yml +++ /dev/null @@ -1,6 +0,0 @@ -language: node_js -node_js: - - "0.11" - - "0.10" - - "0.12" - - "iojs" diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-cipher/node_modules/browserify-aes/node_modules/cipher-base/index.js b/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-cipher/node_modules/browserify-aes/node_modules/cipher-base/index.js deleted file mode 100644 index 1a661d62..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-cipher/node_modules/browserify-aes/node_modules/cipher-base/index.js +++ /dev/null @@ -1,90 +0,0 @@ -var Transform = require('stream').Transform -var inherits = require('inherits') -var StringDecoder = require('string_decoder').StringDecoder -module.exports = CipherBase -inherits(CipherBase, Transform) -function CipherBase (hashMode) { - Transform.call(this) - this.hashMode = typeof hashMode === 'string' - if (this.hashMode) { - this[hashMode] = this._finalOrDigest - } else { - this.final = this._finalOrDigest - } - this._decoder = null - this._encoding = null -} -CipherBase.prototype.update = function (data, inputEnc, outputEnc) { - if (typeof data === 'string') { - data = new Buffer(data, inputEnc) - } - var outData = this._update(data) - if (this.hashMode) { - return this - } - if (outputEnc) { - outData = this._toString(outData, outputEnc) - } - return outData -} - -CipherBase.prototype.setAutoPadding = function () {} - -CipherBase.prototype.getAuthTag = function () { - throw new Error('trying to get auth tag in unsupported state') -} - -CipherBase.prototype.setAuthTag = function () { - throw new Error('trying to set auth tag in unsupported state') -} - -CipherBase.prototype.setAAD = function () { - throw new Error('trying to set aad in unsupported state') -} - -CipherBase.prototype._transform = function (data, _, next) { - var err - try { - if (this.hashMode) { - this._update(data) - } else { - this.push(this._update(data)) - } - } catch (e) { - err = e - } finally { - next(err) - } -} -CipherBase.prototype._flush = function (done) { - var err - try { - this.push(this._final()) - } catch (e) { - err = e - } finally { - done(err) - } -} -CipherBase.prototype._finalOrDigest = function (outputEnc) { - var outData = this._final() || new Buffer('') - if (outputEnc) { - outData = this._toString(outData, outputEnc, true) - } - return outData -} - -CipherBase.prototype._toString = function (value, enc, fin) { - if (!this._decoder) { - this._decoder = new StringDecoder(enc) - this._encoding = enc - } - if (this._encoding !== enc) { - throw new Error('can\'t switch encodings') - } - var out = this._decoder.write(value) - if (fin) { - out += this._decoder.end() - } - return out -} diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-cipher/node_modules/browserify-aes/node_modules/cipher-base/package.json b/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-cipher/node_modules/browserify-aes/node_modules/cipher-base/package.json deleted file mode 100644 index d1275bc2..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-cipher/node_modules/browserify-aes/node_modules/cipher-base/package.json +++ /dev/null @@ -1,60 +0,0 @@ -{ - "name": "cipher-base", - "version": "1.0.3", - "description": "abstract base class for crypto-streams", - "main": "index.js", - "scripts": { - "test": "node test.js | tspec" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/crypto-browserify/cipher-base.git" - }, - "keywords": [ - "cipher", - "stream" - ], - "author": { - "name": "Calvin Metcalf", - "email": "calvin.metcalf@gmail.com" - }, - "license": "MIT", - "bugs": { - "url": "https://github.com/crypto-browserify/cipher-base/issues" - }, - "homepage": "https://github.com/crypto-browserify/cipher-base#readme", - "dependencies": { - "inherits": "^2.0.1" - }, - "devDependencies": { - "tap-spec": "^4.1.0", - "tape": "^4.2.0" - }, - "gitHead": "de2af9758ce75ef5f9a9bdaf0ba5312609a7e59a", - "_id": "cipher-base@1.0.3", - "_shasum": "eeabf194419ce900da3018c207d212f2a6df0a07", - "_from": "cipher-base@>=1.0.0 <2.0.0", - "_npmVersion": "3.8.6", - "_nodeVersion": "5.12.0", - "_npmUser": { - "name": "cwmma", - "email": "calvin.metcalf@gmail.com" - }, - "dist": { - "shasum": "eeabf194419ce900da3018c207d212f2a6df0a07", - "tarball": "https://registry.npmjs.org/cipher-base/-/cipher-base-1.0.3.tgz" - }, - "maintainers": [ - { - "name": "cwmma", - "email": "calvin.metcalf@gmail.com" - } - ], - "_npmOperationalInternal": { - "host": "packages-16-east.internal.npmjs.com", - "tmp": "tmp/cipher-base-1.0.3.tgz_1473767078206_0.1380389309488237" - }, - "directories": {}, - "_resolved": "https://registry.npmjs.org/cipher-base/-/cipher-base-1.0.3.tgz", - "readme": "ERROR: No README data found!" -} diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-cipher/node_modules/browserify-aes/node_modules/cipher-base/readme.md b/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-cipher/node_modules/browserify-aes/node_modules/cipher-base/readme.md deleted file mode 100644 index db9a7814..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-cipher/node_modules/browserify-aes/node_modules/cipher-base/readme.md +++ /dev/null @@ -1,17 +0,0 @@ -cipher-base -=== - -[![Build Status](https://travis-ci.org/crypto-browserify/cipher-base.svg)](https://travis-ci.org/crypto-browserify/cipher-base) - -Abstract base class to inherit from if you want to create streams implementing -the same api as node crypto streams. - -Requires you to implement 2 methods `_final` and `_update`. `_update` takes a -buffer and should return a buffer, `_final` takes no arguments and should return -a buffer. - - -The constructor takes one argument and that is a string which if present switches -it into hash mode, i.e. the object you get from crypto.createHash or -crypto.createSign, this switches the name of the final method to be the string -you passed instead of `final` and returns `this` from update. diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-cipher/node_modules/browserify-aes/node_modules/cipher-base/test.js b/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-cipher/node_modules/browserify-aes/node_modules/cipher-base/test.js deleted file mode 100644 index 57d144a5..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-cipher/node_modules/browserify-aes/node_modules/cipher-base/test.js +++ /dev/null @@ -1,108 +0,0 @@ -var test = require('tape') -var CipherBase = require('./') -var inherits = require('inherits') - -test('basic version', function (t) { - inherits(Cipher, CipherBase) - function Cipher () { - CipherBase.call(this) - } - Cipher.prototype._update = function (input) { - t.ok(Buffer.isBuffer(input)) - return input - } - Cipher.prototype._final = function () { - // noop - } - var cipher = new Cipher() - var utf8 = 'abc123abcd' - var update = cipher.update(utf8, 'utf8', 'base64') + cipher.final('base64') - var string = (new Buffer(update, 'base64')).toString() - t.equals(utf8, string) - t.end() -}) -test('hash mode', function (t) { - inherits(Cipher, CipherBase) - function Cipher () { - CipherBase.call(this, 'finalName') - this._cache = [] - } - Cipher.prototype._update = function (input) { - t.ok(Buffer.isBuffer(input)) - this._cache.push(input) - } - Cipher.prototype._final = function () { - return Buffer.concat(this._cache) - } - var cipher = new Cipher() - var utf8 = 'abc123abcd' - var update = cipher.update(utf8, 'utf8').finalName('base64') - var string = (new Buffer(update, 'base64')).toString() - - t.equals(utf8, string) - t.end() -}) -test('hash mode as stream', function (t) { - inherits(Cipher, CipherBase) - function Cipher () { - CipherBase.call(this, 'finalName') - this._cache = [] - } - Cipher.prototype._update = function (input) { - t.ok(Buffer.isBuffer(input)) - this._cache.push(input) - } - Cipher.prototype._final = function () { - return Buffer.concat(this._cache) - } - var cipher = new Cipher() - cipher.on('error', function (e) { - t.notOk(e) - }) - var utf8 = 'abc123abcd' - cipher.end(utf8, 'utf8') - var update = cipher.read().toString('base64') - var string = (new Buffer(update, 'base64')).toString() - - t.equals(utf8, string) - t.end() -}) -test('encodings', function (t) { - inherits(Cipher, CipherBase) - function Cipher () { - CipherBase.call(this) - } - Cipher.prototype._update = function (input) { - return input - } - Cipher.prototype._final = function () { - // noop - } - t.test('mix and match encoding', function (t) { - t.plan(2) - - var cipher = new Cipher() - cipher.update('foo', 'utf8', 'utf8') - t.throws(function () { - cipher.update('foo', 'utf8', 'base64') - }) - cipher = new Cipher() - cipher.update('foo', 'utf8', 'base64') - t.doesNotThrow(function () { - cipher.update('foo', 'utf8') - cipher.final('base64') - }) - }) - t.test('handle long uft8 plaintexts', function (t) { - t.plan(1) - var txt = 'ふっかつ あきる すぶり はやい つける まゆげ たんさん みんぞく ねほりはほり せまい たいまつばな ひはん' - - var cipher = new Cipher() - var decipher = new Cipher() - var enc = decipher.update(cipher.update(txt, 'utf8', 'base64'), 'base64', 'utf8') - enc += decipher.update(cipher.final('base64'), 'base64', 'utf8') - enc += decipher.final('utf8') - - t.equals(txt, enc) - }) -}) diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-cipher/node_modules/browserify-aes/package.json b/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-cipher/node_modules/browserify-aes/package.json deleted file mode 100644 index 7dab4a20..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-cipher/node_modules/browserify-aes/package.json +++ /dev/null @@ -1,78 +0,0 @@ -{ - "name": "browserify-aes", - "version": "1.0.6", - "description": "aes, for browserify", - "browser": "browser.js", - "main": "index.js", - "directories": { - "test": "test" - }, - "scripts": { - "test": "standard && node test/index.js|tspec" - }, - "repository": { - "type": "git", - "url": "git://github.com/crypto-browserify/browserify-aes.git" - }, - "keywords": [ - "aes", - "crypto", - "browserify" - ], - "author": "", - "license": "MIT", - "bugs": { - "url": "https://github.com/crypto-browserify/browserify-aes/issues" - }, - "homepage": "https://github.com/crypto-browserify/browserify-aes", - "dependencies": { - "buffer-xor": "^1.0.2", - "cipher-base": "^1.0.0", - "create-hash": "^1.1.0", - "evp_bytestokey": "^1.0.0", - "inherits": "^2.0.1" - }, - "devDependencies": { - "standard": "^3.7.3", - "tap-spec": "^1.0.0", - "tape": "^3.0.0" - }, - "gitHead": "51f8b9055371c045af448fa07bacaae3df6c8e51", - "_id": "browserify-aes@1.0.6", - "_shasum": "5e7725dbdef1fd5930d4ebab48567ce451c48a0a", - "_from": "browserify-aes@>=1.0.4 <2.0.0", - "_npmVersion": "3.3.12", - "_nodeVersion": "5.4.0", - "_npmUser": { - "name": "cwmma", - "email": "calvin.metcalf@gmail.com" - }, - "dist": { - "shasum": "5e7725dbdef1fd5930d4ebab48567ce451c48a0a", - "tarball": "https://registry.npmjs.org/browserify-aes/-/browserify-aes-1.0.6.tgz" - }, - "maintainers": [ - { - "name": "cwmma", - "email": "calvin.metcalf@gmail.com" - }, - { - "name": "dcousens", - "email": "email@dcousens.com" - }, - { - "name": "dominictarr", - "email": "dominic.tarr@gmail.com" - }, - { - "name": "jprichardson", - "email": "jprichardson@gmail.com" - }, - { - "name": "indutny", - "email": "fedor@indutny.com" - } - ], - "_resolved": "https://registry.npmjs.org/browserify-aes/-/browserify-aes-1.0.6.tgz", - "readme": "ERROR: No README data found!" -} diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-cipher/node_modules/browserify-aes/populateFixtures.js b/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-cipher/node_modules/browserify-aes/populateFixtures.js deleted file mode 100644 index ac31eb33..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-cipher/node_modules/browserify-aes/populateFixtures.js +++ /dev/null @@ -1,25 +0,0 @@ -var modes = require('./modes') -var fixtures = require('./test/fixtures.json') -var crypto = require('crypto') -var types = ['aes-128-cfb1', 'aes-192-cfb1', 'aes-256-cfb1'] -var ebtk = require('./EVP_BytesToKey') -var fs = require('fs') - -fixtures.forEach(function (fixture) { - types.forEach(function (cipher) { - var suite = crypto.createCipher(cipher, new Buffer(fixture.password)) - var buf = new Buffer('') - buf = Buffer.concat([buf, suite.update(new Buffer(fixture.text))]) - buf = Buffer.concat([buf, suite.final()]) - fixture.results.ciphers[cipher] = buf.toString('hex') - if (modes[cipher].mode === 'ECB') { - return - } - var suite2 = crypto.createCipheriv(cipher, ebtk(crypto, fixture.password, modes[cipher].key).key, new Buffer(fixture.iv, 'hex')) - var buf2 = new Buffer('') - buf2 = Buffer.concat([buf2, suite2.update(new Buffer(fixture.text))]) - buf2 = Buffer.concat([buf2, suite2.final()]) - fixture.results.cipherivs[cipher] = buf2.toString('hex') - }) -}) -fs.writeFileSync('./test/fixturesNew.json', JSON.stringify(fixtures, false, 4)) diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-cipher/node_modules/browserify-aes/readme.md b/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-cipher/node_modules/browserify-aes/readme.md deleted file mode 100644 index 1d7b0855..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-cipher/node_modules/browserify-aes/readme.md +++ /dev/null @@ -1,18 +0,0 @@ -browserify-aes -==== - -[![Build Status](https://travis-ci.org/crypto-browserify/browserify-aes.svg)](https://travis-ci.org/crypto-browserify/browserify-aes) - -Node style aes for use in the browser. Implements: - - - createCipher - - createCipheriv - - createDecipher - - createDecipheriv - - getCiphers - -In node.js, the `crypto` implementation is used, in browsers it falls back to a pure JavaScript implementation. - -Much of this library has been taken from the aes implementation in [triplesec](https://github.com/keybase/triplesec), a partial derivation of [crypto-js](https://code.google.com/p/crypto-js/). - -`EVP_BytesToKey` is a straight up port of the same function from OpenSSL as there is literally no documenation on it beyond it using 'undocumented extensions' for longer keys. diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-cipher/node_modules/browserify-aes/streamCipher.js b/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-cipher/node_modules/browserify-aes/streamCipher.js deleted file mode 100644 index a55c762d..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-cipher/node_modules/browserify-aes/streamCipher.js +++ /dev/null @@ -1,25 +0,0 @@ -var aes = require('./aes') -var Transform = require('cipher-base') -var inherits = require('inherits') - -inherits(StreamCipher, Transform) -module.exports = StreamCipher -function StreamCipher (mode, key, iv, decrypt) { - if (!(this instanceof StreamCipher)) { - return new StreamCipher(mode, key, iv) - } - Transform.call(this) - this._cipher = new aes.AES(key) - this._prev = new Buffer(iv.length) - this._cache = new Buffer('') - this._secCache = new Buffer('') - this._decrypt = decrypt - iv.copy(this._prev) - this._mode = mode -} -StreamCipher.prototype._update = function (chunk) { - return this._mode.encrypt(this, chunk, this._decrypt) -} -StreamCipher.prototype._final = function () { - this._cipher.scrub() -} diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-cipher/node_modules/browserify-des/index.js b/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-cipher/node_modules/browserify-des/index.js deleted file mode 100644 index 2889bb77..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-cipher/node_modules/browserify-des/index.js +++ /dev/null @@ -1,43 +0,0 @@ -var CipherBase = require('cipher-base') -var des = require('des.js') -var inherits = require('inherits') - -var modes = { - 'des-ede3-cbc': des.CBC.instantiate(des.EDE), - 'des-ede3': des.EDE, - 'des-ede-cbc': des.CBC.instantiate(des.EDE), - 'des-ede': des.EDE, - 'des-cbc': des.CBC.instantiate(des.DES), - 'des-ecb': des.DES -} -modes.des = modes['des-cbc'] -modes.des3 = modes['des-ede3-cbc'] -module.exports = DES -inherits(DES, CipherBase) -function DES (opts) { - CipherBase.call(this) - var modeName = opts.mode.toLowerCase() - var mode = modes[modeName] - var type - if (opts.decrypt) { - type = 'decrypt' - } else { - type = 'encrypt' - } - var key = opts.key - if (modeName === 'des-ede' || modeName === 'des-ede-cbc') { - key = Buffer.concat([key, key.slice(0, 8)]) - } - var iv = opts.iv - this._des = mode.create({ - key: key, - iv: iv, - type: type - }) -} -DES.prototype._update = function (data) { - return new Buffer(this._des.update(data)) -} -DES.prototype._final = function () { - return new Buffer(this._des.final()) -} diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-cipher/node_modules/browserify-des/modes.js b/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-cipher/node_modules/browserify-des/modes.js deleted file mode 100644 index 72f308de..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-cipher/node_modules/browserify-des/modes.js +++ /dev/null @@ -1,24 +0,0 @@ -exports['des-ecb'] = { - key: 8, - iv: 0 -} -exports['des-cbc'] = exports.des = { - key: 8, - iv: 8 -} -exports['des-ede3-cbc'] = exports.des3 = { - key: 24, - iv: 8 -} -exports['des-ede3'] = { - key: 24, - iv: 0 -} -exports['des-ede-cbc'] = { - key: 16, - iv: 8 -} -exports['des-ede'] = { - key: 16, - iv: 0 -} diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-cipher/node_modules/browserify-des/node_modules/cipher-base/.eslintrc b/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-cipher/node_modules/browserify-des/node_modules/cipher-base/.eslintrc deleted file mode 100644 index a755cdbf..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-cipher/node_modules/browserify-des/node_modules/cipher-base/.eslintrc +++ /dev/null @@ -1,3 +0,0 @@ -{ - "extends": ["standard"] -} diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-cipher/node_modules/browserify-des/node_modules/cipher-base/.travis.yml b/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-cipher/node_modules/browserify-des/node_modules/cipher-base/.travis.yml deleted file mode 100644 index eb83acd9..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-cipher/node_modules/browserify-des/node_modules/cipher-base/.travis.yml +++ /dev/null @@ -1,6 +0,0 @@ -language: node_js -node_js: - - "0.11" - - "0.10" - - "0.12" - - "iojs" diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-cipher/node_modules/browserify-des/node_modules/cipher-base/index.js b/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-cipher/node_modules/browserify-des/node_modules/cipher-base/index.js deleted file mode 100644 index 1a661d62..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-cipher/node_modules/browserify-des/node_modules/cipher-base/index.js +++ /dev/null @@ -1,90 +0,0 @@ -var Transform = require('stream').Transform -var inherits = require('inherits') -var StringDecoder = require('string_decoder').StringDecoder -module.exports = CipherBase -inherits(CipherBase, Transform) -function CipherBase (hashMode) { - Transform.call(this) - this.hashMode = typeof hashMode === 'string' - if (this.hashMode) { - this[hashMode] = this._finalOrDigest - } else { - this.final = this._finalOrDigest - } - this._decoder = null - this._encoding = null -} -CipherBase.prototype.update = function (data, inputEnc, outputEnc) { - if (typeof data === 'string') { - data = new Buffer(data, inputEnc) - } - var outData = this._update(data) - if (this.hashMode) { - return this - } - if (outputEnc) { - outData = this._toString(outData, outputEnc) - } - return outData -} - -CipherBase.prototype.setAutoPadding = function () {} - -CipherBase.prototype.getAuthTag = function () { - throw new Error('trying to get auth tag in unsupported state') -} - -CipherBase.prototype.setAuthTag = function () { - throw new Error('trying to set auth tag in unsupported state') -} - -CipherBase.prototype.setAAD = function () { - throw new Error('trying to set aad in unsupported state') -} - -CipherBase.prototype._transform = function (data, _, next) { - var err - try { - if (this.hashMode) { - this._update(data) - } else { - this.push(this._update(data)) - } - } catch (e) { - err = e - } finally { - next(err) - } -} -CipherBase.prototype._flush = function (done) { - var err - try { - this.push(this._final()) - } catch (e) { - err = e - } finally { - done(err) - } -} -CipherBase.prototype._finalOrDigest = function (outputEnc) { - var outData = this._final() || new Buffer('') - if (outputEnc) { - outData = this._toString(outData, outputEnc, true) - } - return outData -} - -CipherBase.prototype._toString = function (value, enc, fin) { - if (!this._decoder) { - this._decoder = new StringDecoder(enc) - this._encoding = enc - } - if (this._encoding !== enc) { - throw new Error('can\'t switch encodings') - } - var out = this._decoder.write(value) - if (fin) { - out += this._decoder.end() - } - return out -} diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-cipher/node_modules/browserify-des/node_modules/cipher-base/package.json b/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-cipher/node_modules/browserify-des/node_modules/cipher-base/package.json deleted file mode 100644 index 654e5a65..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-cipher/node_modules/browserify-des/node_modules/cipher-base/package.json +++ /dev/null @@ -1,60 +0,0 @@ -{ - "name": "cipher-base", - "version": "1.0.3", - "description": "abstract base class for crypto-streams", - "main": "index.js", - "scripts": { - "test": "node test.js | tspec" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/crypto-browserify/cipher-base.git" - }, - "keywords": [ - "cipher", - "stream" - ], - "author": { - "name": "Calvin Metcalf", - "email": "calvin.metcalf@gmail.com" - }, - "license": "MIT", - "bugs": { - "url": "https://github.com/crypto-browserify/cipher-base/issues" - }, - "homepage": "https://github.com/crypto-browserify/cipher-base#readme", - "dependencies": { - "inherits": "^2.0.1" - }, - "devDependencies": { - "tap-spec": "^4.1.0", - "tape": "^4.2.0" - }, - "gitHead": "de2af9758ce75ef5f9a9bdaf0ba5312609a7e59a", - "_id": "cipher-base@1.0.3", - "_shasum": "eeabf194419ce900da3018c207d212f2a6df0a07", - "_from": "cipher-base@>=1.0.1 <2.0.0", - "_npmVersion": "3.8.6", - "_nodeVersion": "5.12.0", - "_npmUser": { - "name": "cwmma", - "email": "calvin.metcalf@gmail.com" - }, - "dist": { - "shasum": "eeabf194419ce900da3018c207d212f2a6df0a07", - "tarball": "https://registry.npmjs.org/cipher-base/-/cipher-base-1.0.3.tgz" - }, - "maintainers": [ - { - "name": "cwmma", - "email": "calvin.metcalf@gmail.com" - } - ], - "_npmOperationalInternal": { - "host": "packages-16-east.internal.npmjs.com", - "tmp": "tmp/cipher-base-1.0.3.tgz_1473767078206_0.1380389309488237" - }, - "directories": {}, - "_resolved": "https://registry.npmjs.org/cipher-base/-/cipher-base-1.0.3.tgz", - "readme": "ERROR: No README data found!" -} diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-cipher/node_modules/browserify-des/node_modules/cipher-base/readme.md b/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-cipher/node_modules/browserify-des/node_modules/cipher-base/readme.md deleted file mode 100644 index db9a7814..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-cipher/node_modules/browserify-des/node_modules/cipher-base/readme.md +++ /dev/null @@ -1,17 +0,0 @@ -cipher-base -=== - -[![Build Status](https://travis-ci.org/crypto-browserify/cipher-base.svg)](https://travis-ci.org/crypto-browserify/cipher-base) - -Abstract base class to inherit from if you want to create streams implementing -the same api as node crypto streams. - -Requires you to implement 2 methods `_final` and `_update`. `_update` takes a -buffer and should return a buffer, `_final` takes no arguments and should return -a buffer. - - -The constructor takes one argument and that is a string which if present switches -it into hash mode, i.e. the object you get from crypto.createHash or -crypto.createSign, this switches the name of the final method to be the string -you passed instead of `final` and returns `this` from update. diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-cipher/node_modules/browserify-des/node_modules/cipher-base/test.js b/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-cipher/node_modules/browserify-des/node_modules/cipher-base/test.js deleted file mode 100644 index 57d144a5..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-cipher/node_modules/browserify-des/node_modules/cipher-base/test.js +++ /dev/null @@ -1,108 +0,0 @@ -var test = require('tape') -var CipherBase = require('./') -var inherits = require('inherits') - -test('basic version', function (t) { - inherits(Cipher, CipherBase) - function Cipher () { - CipherBase.call(this) - } - Cipher.prototype._update = function (input) { - t.ok(Buffer.isBuffer(input)) - return input - } - Cipher.prototype._final = function () { - // noop - } - var cipher = new Cipher() - var utf8 = 'abc123abcd' - var update = cipher.update(utf8, 'utf8', 'base64') + cipher.final('base64') - var string = (new Buffer(update, 'base64')).toString() - t.equals(utf8, string) - t.end() -}) -test('hash mode', function (t) { - inherits(Cipher, CipherBase) - function Cipher () { - CipherBase.call(this, 'finalName') - this._cache = [] - } - Cipher.prototype._update = function (input) { - t.ok(Buffer.isBuffer(input)) - this._cache.push(input) - } - Cipher.prototype._final = function () { - return Buffer.concat(this._cache) - } - var cipher = new Cipher() - var utf8 = 'abc123abcd' - var update = cipher.update(utf8, 'utf8').finalName('base64') - var string = (new Buffer(update, 'base64')).toString() - - t.equals(utf8, string) - t.end() -}) -test('hash mode as stream', function (t) { - inherits(Cipher, CipherBase) - function Cipher () { - CipherBase.call(this, 'finalName') - this._cache = [] - } - Cipher.prototype._update = function (input) { - t.ok(Buffer.isBuffer(input)) - this._cache.push(input) - } - Cipher.prototype._final = function () { - return Buffer.concat(this._cache) - } - var cipher = new Cipher() - cipher.on('error', function (e) { - t.notOk(e) - }) - var utf8 = 'abc123abcd' - cipher.end(utf8, 'utf8') - var update = cipher.read().toString('base64') - var string = (new Buffer(update, 'base64')).toString() - - t.equals(utf8, string) - t.end() -}) -test('encodings', function (t) { - inherits(Cipher, CipherBase) - function Cipher () { - CipherBase.call(this) - } - Cipher.prototype._update = function (input) { - return input - } - Cipher.prototype._final = function () { - // noop - } - t.test('mix and match encoding', function (t) { - t.plan(2) - - var cipher = new Cipher() - cipher.update('foo', 'utf8', 'utf8') - t.throws(function () { - cipher.update('foo', 'utf8', 'base64') - }) - cipher = new Cipher() - cipher.update('foo', 'utf8', 'base64') - t.doesNotThrow(function () { - cipher.update('foo', 'utf8') - cipher.final('base64') - }) - }) - t.test('handle long uft8 plaintexts', function (t) { - t.plan(1) - var txt = 'ふっかつ あきる すぶり はやい つける まゆげ たんさん みんぞく ねほりはほり せまい たいまつばな ひはん' - - var cipher = new Cipher() - var decipher = new Cipher() - var enc = decipher.update(cipher.update(txt, 'utf8', 'base64'), 'base64', 'utf8') - enc += decipher.update(cipher.final('base64'), 'base64', 'utf8') - enc += decipher.final('utf8') - - t.equals(txt, enc) - }) -}) diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-cipher/node_modules/browserify-des/node_modules/des.js/.jscsrc b/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-cipher/node_modules/browserify-des/node_modules/des.js/.jscsrc deleted file mode 100644 index dbaae205..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-cipher/node_modules/browserify-des/node_modules/des.js/.jscsrc +++ /dev/null @@ -1,46 +0,0 @@ -{ - "disallowKeywordsOnNewLine": [ "else" ], - "disallowMixedSpacesAndTabs": true, - "disallowMultipleLineStrings": true, - "disallowMultipleVarDecl": true, - "disallowNewlineBeforeBlockStatements": true, - "disallowQuotedKeysInObjects": true, - "disallowSpaceAfterObjectKeys": true, - "disallowSpaceAfterPrefixUnaryOperators": true, - "disallowSpaceBeforePostfixUnaryOperators": true, - "disallowSpacesInCallExpression": true, - "disallowTrailingComma": true, - "disallowTrailingWhitespace": true, - "disallowYodaConditions": true, - - "requireCommaBeforeLineBreak": true, - "requireOperatorBeforeLineBreak": true, - "requireSpaceAfterBinaryOperators": true, - "requireSpaceAfterKeywords": [ "if", "for", "while", "else", "try", "catch" ], - "requireSpaceAfterLineComment": true, - "requireSpaceBeforeBinaryOperators": true, - "requireSpaceBeforeBlockStatements": true, - "requireSpaceBeforeKeywords": [ "else", "catch" ], - "requireSpaceBeforeObjectValues": true, - "requireSpaceBetweenArguments": true, - "requireSpacesInAnonymousFunctionExpression": { - "beforeOpeningCurlyBrace": true - }, - "requireSpacesInFunctionDeclaration": { - "beforeOpeningCurlyBrace": true - }, - "requireSpacesInFunctionExpression": { - "beforeOpeningCurlyBrace": true - }, - "requireSpacesInConditionalExpression": true, - "requireSpacesInForStatement": true, - "requireSpacesInsideArrayBrackets": "all", - "requireSpacesInsideObjectBrackets": "all", - "requireDotNotation": true, - - "maximumLineLength": 80, - "validateIndentation": 2, - "validateLineBreaks": "LF", - "validateParameterSeparator": ", ", - "validateQuoteMarks": "'" -} diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-cipher/node_modules/browserify-des/node_modules/des.js/.jshintrc b/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-cipher/node_modules/browserify-des/node_modules/des.js/.jshintrc deleted file mode 100644 index 7e973902..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-cipher/node_modules/browserify-des/node_modules/des.js/.jshintrc +++ /dev/null @@ -1,89 +0,0 @@ -{ - // JSHint Default Configuration File (as on JSHint website) - // See http://jshint.com/docs/ for more details - - "maxerr" : 50, // {int} Maximum error before stopping - - // Enforcing - "bitwise" : false, // true: Prohibit bitwise operators (&, |, ^, etc.) - "camelcase" : false, // true: Identifiers must be in camelCase - "curly" : false, // true: Require {} for every new block or scope - "eqeqeq" : true, // true: Require triple equals (===) for comparison - "forin" : true, // true: Require filtering for..in loops with obj.hasOwnProperty() - "freeze" : true, // true: prohibits overwriting prototypes of native objects such as Array, Date etc. - "immed" : false, // true: Require immediate invocations to be wrapped in parens e.g. `(function () { } ());` - "indent" : 2, // {int} Number of spaces to use for indentation - "latedef" : true, // true: Require variables/functions to be defined before being used - "newcap" : true, // true: Require capitalization of all constructor functions e.g. `new F()` - "noarg" : true, // true: Prohibit use of `arguments.caller` and `arguments.callee` - "noempty" : false, // true: Prohibit use of empty blocks - "nonbsp" : true, // true: Prohibit "non-breaking whitespace" characters. - "nonew" : false, // true: Prohibit use of constructors for side-effects (without assignment) - "plusplus" : false, // true: Prohibit use of `++` & `--` - "quotmark" : "single", // Quotation mark consistency: - // false : do nothing (default) - // true : ensure whatever is used is consistent - // "single" : require single quotes - // "double" : require double quotes - "undef" : true, // true: Require all non-global variables to be declared (prevents global leaks) - "unused" : true, // true: Require all defined variables be used - "strict" : true, // true: Requires all functions run in ES5 Strict Mode - "maxparams" : false, // {int} Max number of formal params allowed per function - "maxdepth" : 3, // {int} Max depth of nested blocks (within functions) - "maxstatements" : false, // {int} Max number statements per function - "maxcomplexity" : false, // {int} Max cyclomatic complexity per function - "maxlen" : false, // {int} Max number of characters per line - - // Relaxing - "asi" : false, // true: Tolerate Automatic Semicolon Insertion (no semicolons) - "boss" : false, // true: Tolerate assignments where comparisons would be expected - "debug" : false, // true: Allow debugger statements e.g. browser breakpoints. - "eqnull" : false, // true: Tolerate use of `== null` - "es5" : false, // true: Allow ES5 syntax (ex: getters and setters) - "esnext" : false, // true: Allow ES.next (ES6) syntax (ex: `const`) - "moz" : false, // true: Allow Mozilla specific syntax (extends and overrides esnext features) - // (ex: `for each`, multiple try/catch, function expression…) - "evil" : false, // true: Tolerate use of `eval` and `new Function()` - "expr" : false, // true: Tolerate `ExpressionStatement` as Programs - "funcscope" : false, // true: Tolerate defining variables inside control statements - "globalstrict" : false, // true: Allow global "use strict" (also enables 'strict') - "iterator" : false, // true: Tolerate using the `__iterator__` property - "lastsemic" : false, // true: Tolerate omitting a semicolon for the last statement of a 1-line block - "laxbreak" : false, // true: Tolerate possibly unsafe line breakings - "laxcomma" : false, // true: Tolerate comma-first style coding - "loopfunc" : false, // true: Tolerate functions being defined in loops - "multistr" : false, // true: Tolerate multi-line strings - "noyield" : false, // true: Tolerate generator functions with no yield statement in them. - "notypeof" : false, // true: Tolerate invalid typeof operator values - "proto" : false, // true: Tolerate using the `__proto__` property - "scripturl" : false, // true: Tolerate script-targeted URLs - "shadow" : true, // true: Allows re-define variables later in code e.g. `var x=1; x=2;` - "sub" : false, // true: Tolerate using `[]` notation when it can still be expressed in dot notation - "supernew" : false, // true: Tolerate `new function () { ... };` and `new Object;` - "validthis" : false, // true: Tolerate using this in a non-constructor function - - // Environments - "browser" : true, // Web Browser (window, document, etc) - "browserify" : true, // Browserify (node.js code in the browser) - "couch" : false, // CouchDB - "devel" : true, // Development/debugging (alert, confirm, etc) - "dojo" : false, // Dojo Toolkit - "jasmine" : false, // Jasmine - "jquery" : false, // jQuery - "mocha" : true, // Mocha - "mootools" : false, // MooTools - "node" : true, // Node.js - "nonstandard" : false, // Widely adopted globals (escape, unescape, etc) - "prototypejs" : false, // Prototype and Scriptaculous - "qunit" : false, // QUnit - "rhino" : false, // Rhino - "shelljs" : false, // ShellJS - "worker" : false, // Web Workers - "wsh" : false, // Windows Scripting Host - "yui" : false, // Yahoo User Interface - - // Custom Globals - "globals" : { - "module": true - } // additional predefined global variables -} diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-cipher/node_modules/browserify-des/node_modules/des.js/.npmignore b/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-cipher/node_modules/browserify-des/node_modules/des.js/.npmignore deleted file mode 100644 index 1ca95717..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-cipher/node_modules/browserify-des/node_modules/des.js/.npmignore +++ /dev/null @@ -1,2 +0,0 @@ -node_modules/ -npm-debug.log diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-cipher/node_modules/browserify-des/node_modules/des.js/README.md b/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-cipher/node_modules/browserify-des/node_modules/des.js/README.md deleted file mode 100644 index 976de33b..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-cipher/node_modules/browserify-des/node_modules/des.js/README.md +++ /dev/null @@ -1,26 +0,0 @@ -# DES.js - -## LICENSE - -This software is licensed under the MIT License. - -Copyright Fedor Indutny, 2015. - -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/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-cipher/node_modules/browserify-des/node_modules/des.js/lib/des.js b/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-cipher/node_modules/browserify-des/node_modules/des.js/lib/des.js deleted file mode 100644 index 2fd04a6d..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-cipher/node_modules/browserify-des/node_modules/des.js/lib/des.js +++ /dev/null @@ -1,7 +0,0 @@ -'use strict'; - -exports.utils = require('./des/utils'); -exports.Cipher = require('./des/cipher'); -exports.DES = require('./des/des'); -exports.CBC = require('./des/cbc'); -exports.EDE = require('./des/ede'); diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-cipher/node_modules/browserify-des/node_modules/des.js/lib/des/cbc.js b/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-cipher/node_modules/browserify-des/node_modules/des.js/lib/des/cbc.js deleted file mode 100644 index 208ea313..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-cipher/node_modules/browserify-des/node_modules/des.js/lib/des/cbc.js +++ /dev/null @@ -1,65 +0,0 @@ -'use strict'; - -var assert = require('minimalistic-assert'); -var inherits = require('inherits'); - -var proto = {}; - -function CBCState(iv) { - assert.equal(iv.length, 8, 'Invalid IV length'); - - this.iv = new Array(8); - for (var i = 0; i < this.iv.length; i++) - this.iv[i] = iv[i]; -} - -function instantiate(Base) { - function CBC(options) { - Base.call(this, options); - this._cbcInit(); - } - inherits(CBC, Base); - - var keys = Object.keys(proto); - for (var i = 0; i < keys.length; i++) { - var key = keys[i]; - CBC.prototype[key] = proto[key]; - } - - CBC.create = function create(options) { - return new CBC(options); - }; - - return CBC; -} - -exports.instantiate = instantiate; - -proto._cbcInit = function _cbcInit() { - var state = new CBCState(this.options.iv); - this._cbcState = state; -}; - -proto._update = function _update(inp, inOff, out, outOff) { - var state = this._cbcState; - var superProto = this.constructor.super_.prototype; - - var iv = state.iv; - if (this.type === 'encrypt') { - for (var i = 0; i < this.blockSize; i++) - iv[i] ^= inp[inOff + i]; - - superProto._update.call(this, iv, 0, out, outOff); - - for (var i = 0; i < this.blockSize; i++) - iv[i] = out[outOff + i]; - } else { - superProto._update.call(this, inp, inOff, out, outOff); - - for (var i = 0; i < this.blockSize; i++) - out[outOff + i] ^= iv[i]; - - for (var i = 0; i < this.blockSize; i++) - iv[i] = inp[inOff + i]; - } -}; diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-cipher/node_modules/browserify-des/node_modules/des.js/lib/des/cipher.js b/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-cipher/node_modules/browserify-des/node_modules/des.js/lib/des/cipher.js deleted file mode 100644 index d0090b4c..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-cipher/node_modules/browserify-des/node_modules/des.js/lib/des/cipher.js +++ /dev/null @@ -1,141 +0,0 @@ -'use strict'; - -var assert = require('minimalistic-assert'); - -function Cipher(options) { - this.options = options; - - this.type = this.options.type; - this.blockSize = 8; - this._init(); - - this.buffer = new Array(this.blockSize); - this.bufferOff = 0; -} -module.exports = Cipher; - -Cipher.prototype._init = function _init() { - // Might be overrided -}; - -Cipher.prototype.update = function update(data) { - if (data.length === 0) - return []; - - if (this.type === 'decrypt') - return this._updateDecrypt(data); - else - return this._updateEncrypt(data); -}; - -Cipher.prototype._buffer = function _buffer(data, off) { - // Append data to buffer - var min = Math.min(this.buffer.length - this.bufferOff, data.length - off); - for (var i = 0; i < min; i++) - this.buffer[this.bufferOff + i] = data[off + i]; - this.bufferOff += min; - - // Shift next - return min; -}; - -Cipher.prototype._flushBuffer = function _flushBuffer(out, off) { - this._update(this.buffer, 0, out, off); - this.bufferOff = 0; - return this.blockSize; -}; - -Cipher.prototype._updateEncrypt = function _updateEncrypt(data) { - var inputOff = 0; - var outputOff = 0; - - var count = ((this.bufferOff + data.length) / this.blockSize) | 0; - var out = new Array(count * this.blockSize); - - if (this.bufferOff !== 0) { - inputOff += this._buffer(data, inputOff); - - if (this.bufferOff === this.buffer.length) - outputOff += this._flushBuffer(out, outputOff); - } - - // Write blocks - var max = data.length - ((data.length - inputOff) % this.blockSize); - for (; inputOff < max; inputOff += this.blockSize) { - this._update(data, inputOff, out, outputOff); - outputOff += this.blockSize; - } - - // Queue rest - for (; inputOff < data.length; inputOff++, this.bufferOff++) - this.buffer[this.bufferOff] = data[inputOff]; - - return out; -}; - -Cipher.prototype._updateDecrypt = function _updateDecrypt(data) { - var inputOff = 0; - var outputOff = 0; - - var count = Math.ceil((this.bufferOff + data.length) / this.blockSize) - 1; - var out = new Array(count * this.blockSize); - - // TODO(indutny): optimize it, this is far from optimal - for (; count > 0; count--) { - inputOff += this._buffer(data, inputOff); - outputOff += this._flushBuffer(out, outputOff); - } - - // Buffer rest of the input - inputOff += this._buffer(data, inputOff); - - return out; -}; - -Cipher.prototype.final = function final(buffer) { - var first; - if (buffer) - first = this.update(buffer); - - var last; - if (this.type === 'encrypt') - last = this._finalEncrypt(); - else - last = this._finalDecrypt(); - - if (first) - return first.concat(last); - else - return last; -}; - -Cipher.prototype._pad = function _pad(buffer, off) { - if (off === 0) - return false; - - while (off < buffer.length) - buffer[off++] = 0; - - return true; -}; - -Cipher.prototype._finalEncrypt = function _finalEncrypt() { - if (!this._pad(this.buffer, this.bufferOff)) - return []; - - var out = new Array(this.blockSize); - this._update(this.buffer, 0, out, 0); - return out; -}; - -Cipher.prototype._unpad = function _unpad(buffer) { - return buffer; -}; - -Cipher.prototype._finalDecrypt = function _finalDecrypt() { - assert.equal(this.bufferOff, this.blockSize, 'Not enough data to decrypt'); - var out = new Array(this.blockSize); - this._flushBuffer(out, 0); - - return this._unpad(out); -}; diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-cipher/node_modules/browserify-des/node_modules/des.js/lib/des/des.js b/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-cipher/node_modules/browserify-des/node_modules/des.js/lib/des/des.js deleted file mode 100644 index b64a6d1b..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-cipher/node_modules/browserify-des/node_modules/des.js/lib/des/des.js +++ /dev/null @@ -1,143 +0,0 @@ -'use strict'; - -var assert = require('minimalistic-assert'); -var inherits = require('inherits'); - -var des = require('../des'); -var utils = des.utils; -var Cipher = des.Cipher; - -function DESState() { - this.tmp = new Array(2); - this.keys = null; -} - -function DES(options) { - Cipher.call(this, options); - - var state = new DESState(); - this._desState = state; - - this.deriveKeys(state, options.key); -} -inherits(DES, Cipher); -module.exports = DES; - -DES.create = function create(options) { - return new DES(options); -}; - -var shiftTable = [ - 1, 1, 2, 2, 2, 2, 2, 2, - 1, 2, 2, 2, 2, 2, 2, 1 -]; - -DES.prototype.deriveKeys = function deriveKeys(state, key) { - state.keys = new Array(16 * 2); - - assert.equal(key.length, this.blockSize, 'Invalid key length'); - - var kL = utils.readUInt32BE(key, 0); - var kR = utils.readUInt32BE(key, 4); - - utils.pc1(kL, kR, state.tmp, 0); - kL = state.tmp[0]; - kR = state.tmp[1]; - for (var i = 0; i < state.keys.length; i += 2) { - var shift = shiftTable[i >>> 1]; - kL = utils.r28shl(kL, shift); - kR = utils.r28shl(kR, shift); - utils.pc2(kL, kR, state.keys, i); - } -}; - -DES.prototype._update = function _update(inp, inOff, out, outOff) { - var state = this._desState; - - var l = utils.readUInt32BE(inp, inOff); - var r = utils.readUInt32BE(inp, inOff + 4); - - // Initial Permutation - utils.ip(l, r, state.tmp, 0); - l = state.tmp[0]; - r = state.tmp[1]; - - if (this.type === 'encrypt') - this._encrypt(state, l, r, state.tmp, 0); - else - this._decrypt(state, l, r, state.tmp, 0); - - l = state.tmp[0]; - r = state.tmp[1]; - - utils.writeUInt32BE(out, l, outOff); - utils.writeUInt32BE(out, r, outOff + 4); -}; - -DES.prototype._pad = function _pad(buffer, off) { - var value = buffer.length - off; - for (var i = off; i < buffer.length; i++) - buffer[i] = value; - - return true; -}; - -DES.prototype._unpad = function _unpad(buffer) { - var pad = buffer[buffer.length - 1]; - for (var i = buffer.length - pad; i < buffer.length; i++) - assert.equal(buffer[i], pad); - - return buffer.slice(0, buffer.length - pad); -}; - -DES.prototype._encrypt = function _encrypt(state, lStart, rStart, out, off) { - var l = lStart; - var r = rStart; - - // Apply f() x16 times - for (var i = 0; i < state.keys.length; i += 2) { - var keyL = state.keys[i]; - var keyR = state.keys[i + 1]; - - // f(r, k) - utils.expand(r, state.tmp, 0); - - keyL ^= state.tmp[0]; - keyR ^= state.tmp[1]; - var s = utils.substitute(keyL, keyR); - var f = utils.permute(s); - - var t = r; - r = (l ^ f) >>> 0; - l = t; - } - - // Reverse Initial Permutation - utils.rip(r, l, out, off); -}; - -DES.prototype._decrypt = function _decrypt(state, lStart, rStart, out, off) { - var l = rStart; - var r = lStart; - - // Apply f() x16 times - for (var i = state.keys.length - 2; i >= 0; i -= 2) { - var keyL = state.keys[i]; - var keyR = state.keys[i + 1]; - - // f(r, k) - utils.expand(l, state.tmp, 0); - - keyL ^= state.tmp[0]; - keyR ^= state.tmp[1]; - var s = utils.substitute(keyL, keyR); - var f = utils.permute(s); - - var t = l; - l = (r ^ f) >>> 0; - r = t; - } - - // Reverse Initial Permutation - utils.rip(l, r, out, off); -}; diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-cipher/node_modules/browserify-des/node_modules/des.js/lib/des/ede.js b/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-cipher/node_modules/browserify-des/node_modules/des.js/lib/des/ede.js deleted file mode 100644 index cefc4a5c..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-cipher/node_modules/browserify-des/node_modules/des.js/lib/des/ede.js +++ /dev/null @@ -1,55 +0,0 @@ -'use strict'; - -var assert = require('minimalistic-assert'); -var inherits = require('inherits'); - -var des = require('../des'); -var Cipher = des.Cipher; -var DES = des.DES; - -function EDEState(type, key) { - assert.equal(key.length, 24, 'Invalid key length'); - - var k1 = key.slice(0, 8); - var k2 = key.slice(8, 16); - var k3 = key.slice(16, 24); - - if (type === 'encrypt') { - this.ciphers = [ - DES.create({ type: 'encrypt', key: k1 }), - DES.create({ type: 'decrypt', key: k2 }), - DES.create({ type: 'encrypt', key: k3 }) - ]; - } else { - this.ciphers = [ - DES.create({ type: 'decrypt', key: k3 }), - DES.create({ type: 'encrypt', key: k2 }), - DES.create({ type: 'decrypt', key: k1 }) - ]; - } -} - -function EDE(options) { - Cipher.call(this, options); - - var state = new EDEState(this.type, this.options.key); - this._edeState = state; -} -inherits(EDE, Cipher); - -module.exports = EDE; - -EDE.create = function create(options) { - return new EDE(options); -}; - -EDE.prototype._update = function _update(inp, inOff, out, outOff) { - var state = this._edeState; - - state.ciphers[0]._update(inp, inOff, out, outOff); - state.ciphers[1]._update(out, outOff, out, outOff); - state.ciphers[2]._update(out, outOff, out, outOff); -}; - -EDE.prototype._pad = DES.prototype._pad; -EDE.prototype._unpad = DES.prototype._unpad; diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-cipher/node_modules/browserify-des/node_modules/des.js/lib/des/utils.js b/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-cipher/node_modules/browserify-des/node_modules/des.js/lib/des/utils.js deleted file mode 100644 index 08a5ccd9..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-cipher/node_modules/browserify-des/node_modules/des.js/lib/des/utils.js +++ /dev/null @@ -1,256 +0,0 @@ -'use strict'; - -exports.readUInt32BE = function readUInt32BE(bytes, off) { - var res = (bytes[0 + off] << 24) | - (bytes[1 + off] << 16) | - (bytes[2 + off] << 8) | - bytes[3 + off]; - return res >>> 0; -}; - -exports.writeUInt32BE = function writeUInt32BE(bytes, value, off) { - bytes[0 + off] = value >>> 24; - bytes[1 + off] = (value >>> 16) & 0xff; - bytes[2 + off] = (value >>> 8) & 0xff; - bytes[3 + off] = value & 0xff; -}; - -exports.ip = function ip(inL, inR, out, off) { - var outL = 0; - var outR = 0; - - for (var i = 6; i >= 0; i -= 2) { - for (var j = 0; j <= 24; j += 8) { - outL <<= 1; - outL |= (inR >>> (j + i)) & 1; - } - for (var j = 0; j <= 24; j += 8) { - outL <<= 1; - outL |= (inL >>> (j + i)) & 1; - } - } - - for (var i = 6; i >= 0; i -= 2) { - for (var j = 1; j <= 25; j += 8) { - outR <<= 1; - outR |= (inR >>> (j + i)) & 1; - } - for (var j = 1; j <= 25; j += 8) { - outR <<= 1; - outR |= (inL >>> (j + i)) & 1; - } - } - - out[off + 0] = outL >>> 0; - out[off + 1] = outR >>> 0; -}; - -exports.rip = function rip(inL, inR, out, off) { - var outL = 0; - var outR = 0; - - for (var i = 0; i < 4; i++) { - for (var j = 24; j >= 0; j -= 8) { - outL <<= 1; - outL |= (inR >>> (j + i)) & 1; - outL <<= 1; - outL |= (inL >>> (j + i)) & 1; - } - } - for (var i = 4; i < 8; i++) { - for (var j = 24; j >= 0; j -= 8) { - outR <<= 1; - outR |= (inR >>> (j + i)) & 1; - outR <<= 1; - outR |= (inL >>> (j + i)) & 1; - } - } - - out[off + 0] = outL >>> 0; - out[off + 1] = outR >>> 0; -}; - -exports.pc1 = function pc1(inL, inR, out, off) { - var outL = 0; - var outR = 0; - - // 7, 15, 23, 31, 39, 47, 55, 63 - // 6, 14, 22, 30, 39, 47, 55, 63 - // 5, 13, 21, 29, 39, 47, 55, 63 - // 4, 12, 20, 28 - for (var i = 7; i >= 5; i--) { - for (var j = 0; j <= 24; j += 8) { - outL <<= 1; - outL |= (inR >> (j + i)) & 1; - } - for (var j = 0; j <= 24; j += 8) { - outL <<= 1; - outL |= (inL >> (j + i)) & 1; - } - } - for (var j = 0; j <= 24; j += 8) { - outL <<= 1; - outL |= (inR >> (j + i)) & 1; - } - - // 1, 9, 17, 25, 33, 41, 49, 57 - // 2, 10, 18, 26, 34, 42, 50, 58 - // 3, 11, 19, 27, 35, 43, 51, 59 - // 36, 44, 52, 60 - for (var i = 1; i <= 3; i++) { - for (var j = 0; j <= 24; j += 8) { - outR <<= 1; - outR |= (inR >> (j + i)) & 1; - } - for (var j = 0; j <= 24; j += 8) { - outR <<= 1; - outR |= (inL >> (j + i)) & 1; - } - } - for (var j = 0; j <= 24; j += 8) { - outR <<= 1; - outR |= (inL >> (j + i)) & 1; - } - - out[off + 0] = outL >>> 0; - out[off + 1] = outR >>> 0; -}; - -exports.r28shl = function r28shl(num, shift) { - return ((num << shift) & 0xfffffff) | (num >>> (28 - shift)); -}; - -var pc2table = [ - // inL => outL - 14, 11, 17, 4, 27, 23, 25, 0, - 13, 22, 7, 18, 5, 9, 16, 24, - 2, 20, 12, 21, 1, 8, 15, 26, - - // inR => outR - 15, 4, 25, 19, 9, 1, 26, 16, - 5, 11, 23, 8, 12, 7, 17, 0, - 22, 3, 10, 14, 6, 20, 27, 24 -]; - -exports.pc2 = function pc2(inL, inR, out, off) { - var outL = 0; - var outR = 0; - - var len = pc2table.length >>> 1; - for (var i = 0; i < len; i++) { - outL <<= 1; - outL |= (inL >>> pc2table[i]) & 0x1; - } - for (var i = len; i < pc2table.length; i++) { - outR <<= 1; - outR |= (inR >>> pc2table[i]) & 0x1; - } - - out[off + 0] = outL >>> 0; - out[off + 1] = outR >>> 0; -}; - -exports.expand = function expand(r, out, off) { - var outL = 0; - var outR = 0; - - outL = ((r & 1) << 5) | (r >>> 27); - for (var i = 23; i >= 15; i -= 4) { - outL <<= 6; - outL |= (r >>> i) & 0x3f; - } - for (var i = 11; i >= 3; i -= 4) { - outR |= (r >>> i) & 0x3f; - outR <<= 6; - } - outR |= ((r & 0x1f) << 1) | (r >>> 31); - - out[off + 0] = outL >>> 0; - out[off + 1] = outR >>> 0; -}; - -var sTable = [ - 14, 0, 4, 15, 13, 7, 1, 4, 2, 14, 15, 2, 11, 13, 8, 1, - 3, 10, 10, 6, 6, 12, 12, 11, 5, 9, 9, 5, 0, 3, 7, 8, - 4, 15, 1, 12, 14, 8, 8, 2, 13, 4, 6, 9, 2, 1, 11, 7, - 15, 5, 12, 11, 9, 3, 7, 14, 3, 10, 10, 0, 5, 6, 0, 13, - - 15, 3, 1, 13, 8, 4, 14, 7, 6, 15, 11, 2, 3, 8, 4, 14, - 9, 12, 7, 0, 2, 1, 13, 10, 12, 6, 0, 9, 5, 11, 10, 5, - 0, 13, 14, 8, 7, 10, 11, 1, 10, 3, 4, 15, 13, 4, 1, 2, - 5, 11, 8, 6, 12, 7, 6, 12, 9, 0, 3, 5, 2, 14, 15, 9, - - 10, 13, 0, 7, 9, 0, 14, 9, 6, 3, 3, 4, 15, 6, 5, 10, - 1, 2, 13, 8, 12, 5, 7, 14, 11, 12, 4, 11, 2, 15, 8, 1, - 13, 1, 6, 10, 4, 13, 9, 0, 8, 6, 15, 9, 3, 8, 0, 7, - 11, 4, 1, 15, 2, 14, 12, 3, 5, 11, 10, 5, 14, 2, 7, 12, - - 7, 13, 13, 8, 14, 11, 3, 5, 0, 6, 6, 15, 9, 0, 10, 3, - 1, 4, 2, 7, 8, 2, 5, 12, 11, 1, 12, 10, 4, 14, 15, 9, - 10, 3, 6, 15, 9, 0, 0, 6, 12, 10, 11, 1, 7, 13, 13, 8, - 15, 9, 1, 4, 3, 5, 14, 11, 5, 12, 2, 7, 8, 2, 4, 14, - - 2, 14, 12, 11, 4, 2, 1, 12, 7, 4, 10, 7, 11, 13, 6, 1, - 8, 5, 5, 0, 3, 15, 15, 10, 13, 3, 0, 9, 14, 8, 9, 6, - 4, 11, 2, 8, 1, 12, 11, 7, 10, 1, 13, 14, 7, 2, 8, 13, - 15, 6, 9, 15, 12, 0, 5, 9, 6, 10, 3, 4, 0, 5, 14, 3, - - 12, 10, 1, 15, 10, 4, 15, 2, 9, 7, 2, 12, 6, 9, 8, 5, - 0, 6, 13, 1, 3, 13, 4, 14, 14, 0, 7, 11, 5, 3, 11, 8, - 9, 4, 14, 3, 15, 2, 5, 12, 2, 9, 8, 5, 12, 15, 3, 10, - 7, 11, 0, 14, 4, 1, 10, 7, 1, 6, 13, 0, 11, 8, 6, 13, - - 4, 13, 11, 0, 2, 11, 14, 7, 15, 4, 0, 9, 8, 1, 13, 10, - 3, 14, 12, 3, 9, 5, 7, 12, 5, 2, 10, 15, 6, 8, 1, 6, - 1, 6, 4, 11, 11, 13, 13, 8, 12, 1, 3, 4, 7, 10, 14, 7, - 10, 9, 15, 5, 6, 0, 8, 15, 0, 14, 5, 2, 9, 3, 2, 12, - - 13, 1, 2, 15, 8, 13, 4, 8, 6, 10, 15, 3, 11, 7, 1, 4, - 10, 12, 9, 5, 3, 6, 14, 11, 5, 0, 0, 14, 12, 9, 7, 2, - 7, 2, 11, 1, 4, 14, 1, 7, 9, 4, 12, 10, 14, 8, 2, 13, - 0, 15, 6, 12, 10, 9, 13, 0, 15, 3, 3, 5, 5, 6, 8, 11 -]; - -exports.substitute = function substitute(inL, inR) { - var out = 0; - for (var i = 0; i < 4; i++) { - var b = (inL >>> (18 - i * 6)) & 0x3f; - var sb = sTable[i * 0x40 + b]; - - out <<= 4; - out |= sb; - } - for (var i = 0; i < 4; i++) { - var b = (inR >>> (18 - i * 6)) & 0x3f; - var sb = sTable[4 * 0x40 + i * 0x40 + b]; - - out <<= 4; - out |= sb; - } - return out >>> 0; -}; - -var permuteTable = [ - 16, 25, 12, 11, 3, 20, 4, 15, 31, 17, 9, 6, 27, 14, 1, 22, - 30, 24, 8, 18, 0, 5, 29, 23, 13, 19, 2, 26, 10, 21, 28, 7 -]; - -exports.permute = function permute(num) { - var out = 0; - for (var i = 0; i < permuteTable.length; i++) { - out <<= 1; - out |= (num >>> permuteTable[i]) & 0x1; - } - return out >>> 0; -}; - -exports.padSplit = function padSplit(num, size, group) { - var str = num.toString(2); - while (str.length < size) - str = '0' + str; - - var out = []; - for (var i = 0; i < size; i += group) - out.push(str.slice(i, i + group)); - return out.join(' '); -}; diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-cipher/node_modules/browserify-des/node_modules/des.js/node_modules/minimalistic-assert/index.js b/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-cipher/node_modules/browserify-des/node_modules/des.js/node_modules/minimalistic-assert/index.js deleted file mode 100644 index 70b4ea5b..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-cipher/node_modules/browserify-des/node_modules/des.js/node_modules/minimalistic-assert/index.js +++ /dev/null @@ -1,11 +0,0 @@ -module.exports = assert; - -function assert(val, msg) { - if (!val) - throw new Error(msg || 'Assertion failed'); -} - -assert.equal = function assertEqual(l, r, msg) { - if (l != r) - throw new Error(msg || ('Assertion failed: ' + l + ' != ' + r)); -}; diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-cipher/node_modules/browserify-des/node_modules/des.js/node_modules/minimalistic-assert/package.json b/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-cipher/node_modules/browserify-des/node_modules/des.js/node_modules/minimalistic-assert/package.json deleted file mode 100644 index 15ca6b4a..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-cipher/node_modules/browserify-des/node_modules/des.js/node_modules/minimalistic-assert/package.json +++ /dev/null @@ -1,42 +0,0 @@ -{ - "name": "minimalistic-assert", - "version": "1.0.0", - "description": "minimalistic-assert ===", - "main": "index.js", - "scripts": { - "test": "echo \"Error: no test specified\" && exit 1" - }, - "repository": { - "type": "git", - "url": "https://github.com/calvinmetcalf/minimalistic-assert.git" - }, - "author": "", - "license": "ISC", - "bugs": { - "url": "https://github.com/calvinmetcalf/minimalistic-assert/issues" - }, - "homepage": "https://github.com/calvinmetcalf/minimalistic-assert", - "gitHead": "21471ae03175986a30cd3f567ba0bfde5ab10b01", - "_id": "minimalistic-assert@1.0.0", - "_shasum": "702be2dda6b37f4836bcb3f5db56641b64a1d3d3", - "_from": "minimalistic-assert@>=1.0.0 <2.0.0", - "_npmVersion": "2.1.10", - "_nodeVersion": "0.10.35", - "_npmUser": { - "name": "cwmma", - "email": "calvin.metcalf@gmail.com" - }, - "maintainers": [ - { - "name": "cwmma", - "email": "calvin.metcalf@gmail.com" - } - ], - "dist": { - "shasum": "702be2dda6b37f4836bcb3f5db56641b64a1d3d3", - "tarball": "https://registry.npmjs.org/minimalistic-assert/-/minimalistic-assert-1.0.0.tgz" - }, - "directories": {}, - "_resolved": "https://registry.npmjs.org/minimalistic-assert/-/minimalistic-assert-1.0.0.tgz", - "readme": "ERROR: No README data found!" -} diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-cipher/node_modules/browserify-des/node_modules/des.js/node_modules/minimalistic-assert/readme.md b/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-cipher/node_modules/browserify-des/node_modules/des.js/node_modules/minimalistic-assert/readme.md deleted file mode 100644 index 2ca0d256..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-cipher/node_modules/browserify-des/node_modules/des.js/node_modules/minimalistic-assert/readme.md +++ /dev/null @@ -1,4 +0,0 @@ -minimalistic-assert -=== - -very minimalistic assert module. diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-cipher/node_modules/browserify-des/node_modules/des.js/package.json b/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-cipher/node_modules/browserify-des/node_modules/des.js/package.json deleted file mode 100644 index 0cb105ee..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-cipher/node_modules/browserify-des/node_modules/des.js/package.json +++ /dev/null @@ -1,60 +0,0 @@ -{ - "name": "des.js", - "version": "1.0.0", - "description": "DES implementation", - "main": "lib/des.js", - "scripts": { - "test": "mocha --reporter=spec test/*-test.js && jscs lib/*.js lib/**/*.js test/*.js && jshint lib/*.js lib/**/*.js" - }, - "repository": { - "type": "git", - "url": "git+ssh://git@github.com/indutny/des.js.git" - }, - "keywords": [ - "DES", - "3DES", - "EDE", - "CBC" - ], - "author": { - "name": "Fedor Indutny", - "email": "fedor@indutny.com" - }, - "license": "MIT", - "bugs": { - "url": "https://github.com/indutny/des.js/issues" - }, - "homepage": "https://github.com/indutny/des.js#readme", - "devDependencies": { - "jscs": "^2.1.1", - "jshint": "^2.8.0", - "mocha": "^2.3.0" - }, - "dependencies": { - "inherits": "^2.0.1", - "minimalistic-assert": "^1.0.0" - }, - "gitHead": "6c47a16b5507a11942c293a0ded430708c206218", - "_id": "des.js@1.0.0", - "_shasum": "c074d2e2aa6a8a9a07dbd61f9a15c2cd83ec8ecc", - "_from": "des.js@>=1.0.0 <2.0.0", - "_npmVersion": "2.13.3", - "_nodeVersion": "3.2.0", - "_npmUser": { - "name": "indutny", - "email": "fedor@indutny.com" - }, - "maintainers": [ - { - "name": "indutny", - "email": "fedor@indutny.com" - } - ], - "dist": { - "shasum": "c074d2e2aa6a8a9a07dbd61f9a15c2cd83ec8ecc", - "tarball": "https://registry.npmjs.org/des.js/-/des.js-1.0.0.tgz" - }, - "directories": {}, - "_resolved": "https://registry.npmjs.org/des.js/-/des.js-1.0.0.tgz", - "readme": "ERROR: No README data found!" -} diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-cipher/node_modules/browserify-des/node_modules/des.js/test/cbc-test.js b/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-cipher/node_modules/browserify-des/node_modules/des.js/test/cbc-test.js deleted file mode 100644 index d07881c1..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-cipher/node_modules/browserify-des/node_modules/des.js/test/cbc-test.js +++ /dev/null @@ -1,73 +0,0 @@ -'use strict'; - -var assert = require('assert'); -var crypto = require('crypto'); -var Buffer = require('buffer').Buffer; - -var des = require('../'); - -var fixtures = require('./fixtures'); -var bin = fixtures.bin; - -describe('DES-CBC', function() { - var CBC = des.CBC.instantiate(des.DES); - - describe('encryption/decryption', function() { - var vectors = [ - { - key: '133457799bbcdff1', - iv: '0102030405060708', - input: '0123456789abcdef' - }, - { - key: '0000000000000000', - iv: 'ffffffffffffffff', - input: '0000000000000000' - }, - { - key: 'a3a3a3a3b3b3b3b3', - iv: 'cdcdcdcdcdcdcdcd', - input: 'cccccccccccccccc' - }, - { - key: 'deadbeefabbadead', - iv: 'a0da0da0da0da0da', - input: '0102030405060708090a' - }, - { - key: 'aabbccddeeff0011', - iv: 'fefefefefefefefe', - input: '0102030405060708090a0102030405060708090a0102030405060708090a' + - '0102030405060708090a0102030405060607080a0102030405060708090a' - } - ]; - - vectors.forEach(function(vec, i) { - it('should encrypt vector ' + i, function() { - var key = new Buffer(vec.key, 'hex'); - var iv = new Buffer(vec.iv, 'hex'); - var input = new Buffer(vec.input, 'hex'); - - var enc = CBC.create({ - type: 'encrypt', - key: key, - iv: iv - }); - var out = new Buffer(enc.update(input).concat(enc.final())); - - var cipher = crypto.createCipheriv('des-cbc', key, iv); - var expected = Buffer.concat([ cipher.update(input), cipher.final() ]); - - assert.deepEqual(out, expected); - - var dec = CBC.create({ - type: 'decrypt', - key: key, - iv: iv - }); - assert.deepEqual(new Buffer(dec.update(out).concat(dec.final())), - input); - }); - }); - }); -}); diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-cipher/node_modules/browserify-des/node_modules/des.js/test/des-test.js b/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-cipher/node_modules/browserify-des/node_modules/des.js/test/des-test.js deleted file mode 100644 index b6a5ee84..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-cipher/node_modules/browserify-des/node_modules/des.js/test/des-test.js +++ /dev/null @@ -1,139 +0,0 @@ -'use strict'; - -var assert = require('assert'); -var crypto = require('crypto'); -var Buffer = require('buffer').Buffer; - -var des = require('../'); - -var fixtures = require('./fixtures'); -var bin = fixtures.bin; - -describe('DES', function() { - describe('Key Derivation', function() { - it('should derive proper keys', function() { - var d = des.DES.create({ - type: 'encrypt', - key: [ 0x13, 0x34, 0x57, 0x79, 0x9B, 0xBC, 0xDF, 0xF1 ] - }); - - var expected = [ - '000110 110000 001011 101111', - '111111 000111 000001 110010', - '011110 011010 111011 011001', - '110110 111100 100111 100101', - '010101 011111 110010 001010', - '010000 101100 111110 011001', - '011100 101010 110111 010110', - '110110 110011 010100 011101', - '011111 001110 110000 000111', - '111010 110101 001110 101000', - '011000 111010 010100 111110', - '010100 000111 101100 101111', - '111011 001000 010010 110111', - '111101 100001 100010 111100', - '111101 111000 101000 111010', - '110000 010011 101111 111011', - '111000 001101 101111 101011', - '111011 011110 011110 000001', - '101100 011111 001101 000111', - '101110 100100 011001 001111', - '001000 010101 111111 010011', - '110111 101101 001110 000110', - '011101 010111 000111 110101', - '100101 000110 011111 101001', - '100101 111100 010111 010001', - '111110 101011 101001 000001', - '010111 110100 001110 110111', - '111100 101110 011100 111010', - '101111 111001 000110 001101', - '001111 010011 111100 001010', - '110010 110011 110110 001011', - '000011 100001 011111 110101' - ]; - - expected = expected.map(fixtures.bin); - assert.deepEqual(d._desState.keys, expected); - }); - }); - - describe('encryption/decryption', function() { - var vectors = [ - { - key: '133457799bbcdff1', - input: '0123456789abcdef' - }, - { - key: '0000000000000000', - input: '0000000000000000' - }, - { - key: 'a3a3a3a3b3b3b3b3', - input: 'cccccccccccccccc' - }, - { - key: 'deadbeefabbadead', - input: '0102030405060708090a' - }, - { - key: 'aabbccddeeff0011', - input: '0102030405060708090a0102030405060708090a0102030405060708090a' + - '0102030405060708090a0102030405060607080a0102030405060708090a' - } - ]; - - vectors.forEach(function(vec, i) { - it('should encrypt vector ' + i, function() { - var key = new Buffer(vec.key, 'hex'); - var input = new Buffer(vec.input, 'hex'); - - var enc = des.DES.create({ - type: 'encrypt', - key: key - }); - var dec = des.DES.create({ - type: 'decrypt', - key: key - }); - var out = new Buffer(enc.update(input).concat(enc.final())); - - var cipher = crypto.createCipheriv('des-ecb', key, new Buffer(0)); - var expected = Buffer.concat([ cipher.update(input), cipher.final() ]); - - assert.deepEqual(out, expected); - - assert.deepEqual(new Buffer(dec.update(out).concat(dec.final())), - input); - }); - }); - - it('should buffer during encryption/decryption', function() { - var key = new Buffer('0102030405060708', 'hex'); - var chunk = new Buffer('01020304050607', 'hex'); - var count = 257; - var expected = new Buffer( - new Array(count + 1).join('01020304050607'), 'hex'); - - var enc = des.DES.create({ - type: 'encrypt', - key: key - }); - var cipher = []; - for (var i = 0; i < count; i++) - cipher = cipher.concat(enc.update(chunk)); - cipher = cipher.concat(enc.final()); - - var dec = des.DES.create({ - type: 'decrypt', - key: key - }); - var out = []; - for (var i = 0; i < count; i++) - out = out.concat(dec.update(cipher.slice(i * 7, (i + 1) * 7))); - out = out.concat(dec.final(cipher.slice(i * 7))); - - out = new Buffer(out); - assert.deepEqual(out, expected); - }); - }); -}); diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-cipher/node_modules/browserify-des/node_modules/des.js/test/ede-test.js b/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-cipher/node_modules/browserify-des/node_modules/des.js/test/ede-test.js deleted file mode 100644 index 116a76a8..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-cipher/node_modules/browserify-des/node_modules/des.js/test/ede-test.js +++ /dev/null @@ -1,73 +0,0 @@ -'use strict'; - -var assert = require('assert'); -var crypto = require('crypto'); -var Buffer = require('buffer').Buffer; - -var des = require('../'); - -var fixtures = require('./fixtures'); -var bin = fixtures.bin; - -describe('DES-EDE-CBC', function() { - var CBC = des.CBC.instantiate(des.EDE); - - describe('encryption/decryption', function() { - var vectors = [ - { - key: new Array(4).join('133457799bbcdff1'), - iv: '0102030405060708', - input: '0123456789abcdef' - }, - { - key: new Array(4).join('0000000000000000'), - iv: 'ffffffffffffffff', - input: '0000000000000000' - }, - { - key: new Array(4).join('a3a3a3a3b3b3b3b3'), - iv: 'cdcdcdcdcdcdcdcd', - input: 'cccccccccccccccc' - }, - { - key: new Array(4).join('deadbeefabbadead'), - iv: 'a0da0da0da0da0da', - input: '0102030405060708090a' - }, - { - key: 'aabbccddeeff0011' + '1111222233334444' + 'ffffeeeeddddcccc', - iv: 'fefefefefefefefe', - input: '0102030405060708090a0102030405060708090a0102030405060708090a' + - '0102030405060708090a0102030405060607080a0102030405060708090a' - } - ]; - - vectors.forEach(function(vec, i) { - it('should encrypt vector ' + i, function() { - var key = new Buffer(vec.key, 'hex'); - var iv = new Buffer(vec.iv, 'hex'); - var input = new Buffer(vec.input, 'hex'); - - var enc = CBC.create({ - type: 'encrypt', - key: key, - iv: iv - }); - var out = new Buffer(enc.update(input).concat(enc.final())); - - var cipher = crypto.createCipheriv('des-ede3-cbc', key, iv); - var expected = Buffer.concat([ cipher.update(input), cipher.final() ]); - - assert.deepEqual(out, expected); - - var dec = CBC.create({ - type: 'decrypt', - key: key, - iv: iv - }); - assert.deepEqual(new Buffer(dec.update(out).concat(dec.final())), - input); - }); - }); - }); -}); diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-cipher/node_modules/browserify-des/node_modules/des.js/test/fixtures.js b/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-cipher/node_modules/browserify-des/node_modules/des.js/test/fixtures.js deleted file mode 100644 index fe8ccd8b..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-cipher/node_modules/browserify-des/node_modules/des.js/test/fixtures.js +++ /dev/null @@ -1,5 +0,0 @@ -'use strict'; - -exports.bin = function bin(str) { - return parseInt(str.replace(/[^01]/g, ''), 2); -} diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-cipher/node_modules/browserify-des/node_modules/des.js/test/utils-test.js b/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-cipher/node_modules/browserify-des/node_modules/des.js/test/utils-test.js deleted file mode 100644 index 4c576de0..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-cipher/node_modules/browserify-des/node_modules/des.js/test/utils-test.js +++ /dev/null @@ -1,169 +0,0 @@ -'use strict'; - -var assert = require('assert'); - -var des = require('../'); -var utils = des.utils; - -var fixtures = require('./fixtures'); -var bin = fixtures.bin; - -describe('utils', function() { - describe('IP', function() { - it('should permute properly', function() { - var out = new Array(2); - var inp = [ - bin('00000001 00100011 01000101 01100111'), - bin('10001001 10101011 11001101 11101111') - ]; - - utils.ip(inp[0], inp[1], out, 0); - - var expected = [ - bin('11001100 00000000 11001100 11111111'), - bin('11110000 10101010 11110000 10101010') - ]; - - assert.deepEqual(out, expected); - }); - - it('should rev-permute properly', function() { - var out = new Array(2); - var inp = [ - bin('11001100 00000000 11001100 11111111'), - bin('11110000 10101010 11110000 10101010') - ]; - - utils.rip(inp[0], inp[1], out, 0); - - var expected = [ - bin('00000001 00100011 01000101 01100111'), - bin('10001001 10101011 11001101 11101111') - ]; - - assert.deepEqual(out, expected); - }); - }); - - describe('PC1', function() { - it('should permute properly', function() { - var out = new Array(2); - var inp = [ - bin('00010011 00110100 01010111 01111001'), - bin('10011011 10111100 11011111 11110001') - ]; - - utils.pc1(inp[0], inp[1], out, 0); - - var expected = [ - bin('1111000 0110011 0010101 0101111'), - bin('0101010 1011001 1001111 0001111') - ]; - - assert.deepEqual(out, expected); - }); - }); - - describe('r28shl', function() { - it('should shl properly', function() { - assert.equal(utils.r28shl(bin('1111000011001100101010101111'), 1), - bin('1110000110011001010101011111')); - - assert.equal(utils.r28shl(bin('0101010101100110011110001111'), 1), - bin('1010101011001100111100011110')); - - assert.equal(utils.r28shl(bin('1111000011001100101010101111'), 4), - bin('0000110011001010101011111111')); - - assert.equal(utils.r28shl(bin('0101010101100110011110001111'), 4), - bin('0101011001100111100011110101')); - }); - }); - - describe('PC2', function() { - it('should permute properly', function() { - var out = new Array(2); - var inp = [ - bin('1110000 1100110 0101010 1011111'), - bin('1010101 0110011 0011110 0011110') - ]; - - utils.pc2(inp[0], inp[1], out, 0); - - var expected = [ - bin('000110 110000 001011 101111'), - bin('111111 000111 000001 110010') - ]; - - assert.deepEqual(out, expected); - }); - }); - - describe('readUInt32BE', function() { - it('should read number properly', function() { - var a = [ 0xde, 0xad, 0xbe, 0xef ]; - var o = utils.readUInt32BE(a, 0); - assert.equal(o, 0xdeadbeef); - }); - }); - - describe('writeUInt32BE', function() { - it('should read number properly', function() { - var a = [ 0, 0, 0, 0 ]; - utils.writeUInt32BE(a, 0xdeadbeef, 0); - var expected = [ 0xde, 0xad, 0xbe, 0xef ]; - assert.deepEqual(a, expected); - }); - }); - - describe('expand', function() { - it('should expand', function() { - var out = [ 0, 0 ]; - utils.expand(bin('1111 0000 1010 1010 1111 0000 1010 1010'), out, 0); - var expected = [ - bin('011110 100001 010101 010101'), - bin('011110 100001 010101 010101') - ]; - assert.deepEqual(out, expected); - }); - - it('should expand with low 1', function() { - var out = [ 0, 0 ]; - utils.expand(bin('1111 0000 1010 1010 1111 0000 1010 1011'), out, 0); - var expected = [ - bin('111110 100001 010101 010101'), - bin('011110 100001 010101 010111') - ]; - assert.deepEqual(out, expected); - }); - - it('should expand with low 1', function() { - var out = [ 0, 0 ]; - utils.expand(bin('10100010 01011100 00001011 11110100'), out, 0); - var expected = [ - bin('010100 000100 001011 111000'), - bin('000001 010111 111110 101001') - ]; - assert.deepEqual(out, expected); - }); - }); - - describe('substitute', function() { - it('should substitute', function() { - var input = [ - bin('011000 010001 011110 111010'), - bin('100001 100110 010100 100111') - ]; - var output = utils.substitute(input[0], input[1]); - assert.equal(output, bin('0101 1100 1000 0010 1011 0101 1001 0111')); - }); - }); - - describe('permute', function() { - it('should permute', function() { - var output = utils.permute( - bin('0101 1100 1000 0010 1011 0101 1001 0111')); - assert.equal(output, bin('0010 0011 0100 1010 1010 1001 1011 1011')); - }); - }); -}); diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-cipher/node_modules/browserify-des/package.json b/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-cipher/node_modules/browserify-des/package.json deleted file mode 100644 index 7f8aff45..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-cipher/node_modules/browserify-des/package.json +++ /dev/null @@ -1,55 +0,0 @@ -{ - "name": "browserify-des", - "version": "1.0.0", - "description": "browserify-des ===", - "main": "index.js", - "scripts": { - "test": "standard && node test.js | tspec" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/crypto-browserify/browserify-des.git" - }, - "author": { - "name": "Calvin Metcalf", - "email": "calvin.metcalf@gmail.com" - }, - "license": "MIT", - "bugs": { - "url": "https://github.com/crypto-browserify/browserify-des/issues" - }, - "homepage": "https://github.com/crypto-browserify/browserify-des#readme", - "dependencies": { - "cipher-base": "^1.0.1", - "des.js": "^1.0.0", - "inherits": "^2.0.1" - }, - "devDependencies": { - "standard": "^5.3.1", - "tap-spec": "^4.1.0", - "tape": "^4.2.0" - }, - "gitHead": "ec4fc6ad180ab43efe687bdb6e84100d048c9c53", - "_id": "browserify-des@1.0.0", - "_shasum": "daa277717470922ed2fe18594118a175439721dd", - "_from": "browserify-des@>=1.0.0 <2.0.0", - "_npmVersion": "2.14.4", - "_nodeVersion": "4.1.1", - "_npmUser": { - "name": "cwmma", - "email": "calvin.metcalf@gmail.com" - }, - "dist": { - "shasum": "daa277717470922ed2fe18594118a175439721dd", - "tarball": "https://registry.npmjs.org/browserify-des/-/browserify-des-1.0.0.tgz" - }, - "maintainers": [ - { - "name": "cwmma", - "email": "calvin.metcalf@gmail.com" - } - ], - "directories": {}, - "_resolved": "https://registry.npmjs.org/browserify-des/-/browserify-des-1.0.0.tgz", - "readme": "ERROR: No README data found!" -} diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-cipher/node_modules/browserify-des/readme.md b/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-cipher/node_modules/browserify-des/readme.md deleted file mode 100644 index c29c1b21..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-cipher/node_modules/browserify-des/readme.md +++ /dev/null @@ -1,4 +0,0 @@ -browserify-des -=== - -DES for browserify diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-cipher/node_modules/browserify-des/test.js b/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-cipher/node_modules/browserify-des/test.js deleted file mode 100644 index 6324f43b..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-cipher/node_modules/browserify-des/test.js +++ /dev/null @@ -1,48 +0,0 @@ -var test = require('tape') -var DES = require('./') -var modes = require('./modes') -var crypto = require('crypto') - -Object.keys(modes).forEach(function (mode) { - test(mode, function (t) { - var i = 0 - while (++i < 10) { - runOnce(i) - } - function runOnce (i) { - t.test('run: ' + i, function (t) { - t.plan(2) - var key = crypto.randomBytes(modes[mode].key) - var iv = crypto.randomBytes(modes[mode].iv) - var text = crypto.randomBytes(200) - var ourEncrypt - try { - ourEncrypt = new DES({ - mode: mode, - key: key, - iv: iv - }) - } catch (e) { - t.notOk(e, e.stack) - } - var nodeEncrypt - try { - nodeEncrypt = crypto.createCipheriv(mode, key, iv) - } catch (e) { - t.notOk(e, e.stack) - } - var ourCipherText = Buffer.concat([ourEncrypt.update(text), ourEncrypt.final()]) - var nodeCipherText = Buffer.concat([nodeEncrypt.update(text), nodeEncrypt.final()]) - t.equals(nodeCipherText.toString('hex'), ourCipherText.toString('hex')) - var ourDecrypt = new DES({ - mode: mode, - key: key, - iv: iv, - decrypt: true - }) - var plainText = Buffer.concat([ourDecrypt.update(ourCipherText), ourDecrypt.final()]) - t.equals(text.toString('hex'), plainText.toString('hex')) - }) - } - }) -}) diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-cipher/node_modules/evp_bytestokey/index.js b/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-cipher/node_modules/evp_bytestokey/index.js deleted file mode 100644 index 25fbc9c2..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-cipher/node_modules/evp_bytestokey/index.js +++ /dev/null @@ -1,68 +0,0 @@ -var md5 = require('create-hash/md5') -module.exports = EVP_BytesToKey -function EVP_BytesToKey (password, salt, keyLen, ivLen) { - if (!Buffer.isBuffer(password)) { - password = new Buffer(password, 'binary') - } - if (salt && !Buffer.isBuffer(salt)) { - salt = new Buffer(salt, 'binary') - } - keyLen = keyLen / 8 - ivLen = ivLen || 0 - var ki = 0 - var ii = 0 - var key = new Buffer(keyLen) - var iv = new Buffer(ivLen) - var addmd = 0 - var md_buf - var i - var bufs = [] - while (true) { - if (addmd++ > 0) { - bufs.push(md_buf) - } - bufs.push(password) - if (salt) { - bufs.push(salt) - } - md_buf = md5(Buffer.concat(bufs)) - bufs = [] - i = 0 - if (keyLen > 0) { - while (true) { - if (keyLen === 0) { - break - } - if (i === md_buf.length) { - break - } - key[ki++] = md_buf[i] - keyLen-- - i++ - } - } - if (ivLen > 0 && i !== md_buf.length) { - while (true) { - if (ivLen === 0) { - break - } - if (i === md_buf.length) { - break - } - iv[ii++] = md_buf[i] - ivLen-- - i++ - } - } - if (keyLen === 0 && ivLen === 0) { - break - } - } - for (i = 0; i < md_buf.length; i++) { - md_buf[i] = 0 - } - return { - key: key, - iv: iv - } -} diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-cipher/node_modules/evp_bytestokey/package.json b/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-cipher/node_modules/evp_bytestokey/package.json deleted file mode 100644 index 378c7dbb..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-cipher/node_modules/evp_bytestokey/package.json +++ /dev/null @@ -1,57 +0,0 @@ -{ - "name": "evp_bytestokey", - "version": "1.0.0", - "description": "he super secure key derivation algorithm from openssl", - "main": "index.js", - "scripts": { - "test": "standard && node test.js | tspec" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/crypto-browserify/EVP_BytesToKey.git" - }, - "keywords": [ - "crypto", - "openssl" - ], - "author": { - "name": "Calvin Metcalf", - "email": "calvin.metcalf@gmail.com" - }, - "license": "MIT", - "bugs": { - "url": "https://github.com/crypto-browserify/EVP_BytesToKey/issues" - }, - "homepage": "https://github.com/crypto-browserify/EVP_BytesToKey", - "dependencies": { - "create-hash": "^1.1.1" - }, - "devDependencies": { - "standard": "^5.3.1", - "tap-spec": "^4.1.0", - "tape": "^4.2.0" - }, - "gitHead": "563bd30d95a7771ff0a18afc82cf92ed18f008d3", - "_id": "evp_bytestokey@1.0.0", - "_shasum": "497b66ad9fef65cd7c08a6180824ba1476b66e53", - "_from": "evp_bytestokey@>=1.0.0 <2.0.0", - "_npmVersion": "2.14.4", - "_nodeVersion": "4.1.1", - "_npmUser": { - "name": "cwmma", - "email": "calvin.metcalf@gmail.com" - }, - "dist": { - "shasum": "497b66ad9fef65cd7c08a6180824ba1476b66e53", - "tarball": "https://registry.npmjs.org/evp_bytestokey/-/evp_bytestokey-1.0.0.tgz" - }, - "maintainers": [ - { - "name": "cwmma", - "email": "calvin.metcalf@gmail.com" - } - ], - "directories": {}, - "_resolved": "https://registry.npmjs.org/evp_bytestokey/-/evp_bytestokey-1.0.0.tgz", - "readme": "ERROR: No README data found!" -} diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-cipher/node_modules/evp_bytestokey/readme.md b/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-cipher/node_modules/evp_bytestokey/readme.md deleted file mode 100644 index 86234dbf..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-cipher/node_modules/evp_bytestokey/readme.md +++ /dev/null @@ -1,13 +0,0 @@ -EVP_BytesToKey -=== - -The super secure [key derivation algorithm from openssl](https://wiki.openssl.org/index.php/Manual:EVP_BytesToKey(3)) (spoiler alert not actually secure, only every use it for compatibility reasons). - -Api: -=== - -```js -var result = EVP_BytesToKey('password', 'salt', keyLen, ivLen); -Buffer.isBuffer(result.password); // true -Buffer.isBuffer(result.iv); // true -``` diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-cipher/node_modules/evp_bytestokey/test.js b/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-cipher/node_modules/evp_bytestokey/test.js deleted file mode 100644 index a638fa03..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-cipher/node_modules/evp_bytestokey/test.js +++ /dev/null @@ -1,19 +0,0 @@ -var test = require('tape') -var evp = require('./') -var crypto = require('crypto') - -function runTest (password) { - test('password: ' + password, function (t) { - t.plan(1) - var keys = evp(password, false, 256, 16) - var nodeCipher = crypto.createCipher('aes-256-ctr', password) - var ourCipher = crypto.createCipheriv('aes-256-ctr', keys.key, keys.iv) - var nodeOut = nodeCipher.update('foooooo') - var ourOut = ourCipher.update('foooooo') - t.equals(nodeOut.toString('hex'), ourOut.toString('hex')) - }) -} -runTest('password') -runTest('ふっかつ あきる すぶり はやい つける まゆげ たんさん みんぞく ねほりはほり せまい たいまつばな ひはん') -runTest('Z͑ͫ̓ͪ̂ͫ̽͏̴̙̤̞͉͚̯̞̠͍A̴̵̜̰͔ͫ͗͢L̠ͨͧͩ͘G̴̻͈͍͔̹̑͗̎̅͛́Ǫ̵̹̻̝̳͂̌̌͘!͖̬̰̙̗̿̋ͥͥ̂ͣ̐́́͜͞') -runTest('💩') diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-cipher/package.json b/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-cipher/package.json deleted file mode 100644 index 984932e0..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-cipher/package.json +++ /dev/null @@ -1,56 +0,0 @@ -{ - "name": "browserify-cipher", - "version": "1.0.0", - "description": "ciphers for the browser", - "main": "index.js", - "dependencies": { - "browserify-aes": "^1.0.4", - "browserify-des": "^1.0.0", - "evp_bytestokey": "^1.0.0" - }, - "browser": "browser.js", - "devDependencies": { - "standard": "^5.3.1", - "tap-spec": "^4.1.0", - "tape": "^4.2.0" - }, - "scripts": { - "test": "standard && node test.js | tspec" - }, - "author": { - "name": "Calvin Metcalf", - "email": "calvin.metcalf@gmail.com" - }, - "license": "MIT", - "repository": { - "type": "git", - "url": "git+ssh://git@github.com/crypto-browserify/browserify-cipher.git" - }, - "gitHead": "a293143d06e1aa03aee035521c3379e9402c3074", - "bugs": { - "url": "https://github.com/crypto-browserify/browserify-cipher/issues" - }, - "homepage": "https://github.com/crypto-browserify/browserify-cipher#readme", - "_id": "browserify-cipher@1.0.0", - "_shasum": "9988244874bf5ed4e28da95666dcd66ac8fc363a", - "_from": "browserify-cipher@>=1.0.0 <2.0.0", - "_npmVersion": "2.14.4", - "_nodeVersion": "4.1.1", - "_npmUser": { - "name": "cwmma", - "email": "calvin.metcalf@gmail.com" - }, - "dist": { - "shasum": "9988244874bf5ed4e28da95666dcd66ac8fc363a", - "tarball": "https://registry.npmjs.org/browserify-cipher/-/browserify-cipher-1.0.0.tgz" - }, - "maintainers": [ - { - "name": "cwmma", - "email": "calvin.metcalf@gmail.com" - } - ], - "directories": {}, - "_resolved": "https://registry.npmjs.org/browserify-cipher/-/browserify-cipher-1.0.0.tgz", - "readme": "ERROR: No README data found!" -} diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-cipher/readme.md b/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-cipher/readme.md deleted file mode 100644 index 3c0b1576..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-cipher/readme.md +++ /dev/null @@ -1,7 +0,0 @@ -browserify-cipher -=== - -[![Build Status](https://travis-ci.org/crypto-browserify/browserify-cipher.svg)](https://travis-ci.org/crypto-browserify/browserify-cipher) - -Provides createCipher, createDecipher, createCipheriv, createDecipheriv and -getCiphers for the browserify. Includes AES and DES ciphers. diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-cipher/test.js b/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-cipher/test.js deleted file mode 100644 index d4beaa0f..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-cipher/test.js +++ /dev/null @@ -1,55 +0,0 @@ -var test = require('tape') -var crypto = require('crypto') -var desModes = require('browserify-des/modes') -var aesModes = require('browserify-aes/modes') -var ourCrypto = require('./browser') - -function runIvTest (mode, keyLen, ivLen) { - test('mode: ' + mode, function (t) { - var i = 0 - while (++i < 10) { - run(i) - } - function run (i) { - t.test('run: ' + i, function (t) { - t.plan(2) - var key = crypto.randomBytes(keyLen) - var iv = crypto.randomBytes(ivLen) - var text = crypto.randomBytes(200) - var ourEncrypt - try { - ourEncrypt = ourCrypto.createCipheriv(mode, key, iv) - } catch (e) { - t.notOk(e, e.stack) - } - var nodeEncrypt - try { - nodeEncrypt = crypto.createCipheriv(mode, key, iv) - } catch (e) { - t.notOk(e, e.stack) - } - var ourCipherText = Buffer.concat([ourEncrypt.update(text), ourEncrypt.final()]) - var authTag - if (mode.slice(-3) === 'gcm') { - authTag = ourEncrypt.getAuthTag() - } - var nodeCipherText = Buffer.concat([nodeEncrypt.update(text), nodeEncrypt.final()]) - t.equals(nodeCipherText.toString('hex'), ourCipherText.toString('hex')) - var ourDecrypt = ourCrypto.createDecipheriv(mode, key, iv) - if (mode.slice(-3) === 'gcm') { - ourDecrypt.setAuthTag(authTag) - } - var plainText = Buffer.concat([ourDecrypt.update(ourCipherText), ourDecrypt.final()]) - t.equals(text.toString('hex'), plainText.toString('hex')) - }) - } - }) -} -Object.keys(aesModes).forEach(function (modeName) { - var mode = aesModes[modeName] - runIvTest(modeName, mode.key / 8, mode.iv) -}) -Object.keys(desModes).forEach(function (modeName) { - var mode = desModes[modeName] - runIvTest(modeName, mode.key, mode.iv) -}) diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/.jshintrc b/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/.jshintrc deleted file mode 100644 index 2c5a439c..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/.jshintrc +++ /dev/null @@ -1,27 +0,0 @@ -{ - "asi": true, - "browser": true, - "devel": true, - "eqeqeq": true, - "eqnull": true, - "esnext": true, - "expr": true, - "globals": { - "chrome": false, - "FileList": false - }, - "globalstrict": true, - "immed": true, - "latedef": "nofunc", - "laxbreak": true, - "loopfunc": true, - "newcap": true, - "noarg": true, - "node": true, - "predef": [ - "escape", - "unescape" - ], - "strict": false, - "undef": "nofunc" -} \ No newline at end of file diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/.npmignore b/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/.npmignore deleted file mode 100644 index 9daeafb9..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/.npmignore +++ /dev/null @@ -1 +0,0 @@ -test diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/.travis.yml b/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/.travis.yml deleted file mode 100644 index 1f1ec665..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/.travis.yml +++ /dev/null @@ -1,11 +0,0 @@ -sudo: false -language: node_js -node_js: - - "0.10" - - "0.11" - - "0.12" - - "iojs" -env: - - TEST_SUITE=standard - - TEST_SUITE=unit -script: "npm run-script $TEST_SUITE" diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/LICENSE b/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/LICENSE deleted file mode 100644 index 870bcf1f..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/LICENSE +++ /dev/null @@ -1,13 +0,0 @@ -Copyright (c) 2014-2015 Calvin Metcalf and browserify-sign contributors - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF -OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/README.md b/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/README.md deleted file mode 100644 index 0bcf124e..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/README.md +++ /dev/null @@ -1,4 +0,0 @@ -browserify-sign [![Build Status](https://travis-ci.org/crypto-browserify/browserify-sign.svg)](https://travis-ci.org/crypto-browserify/browserify-sign) -=== - -A package to duplicate the functionality of node's crypto public key functions, much of this is based on [Fedor Indutny's](https://github.com/indutny) work on [tls.js](https://github.com/indutny/tls.js). diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/algos.js b/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/algos.js deleted file mode 100644 index 1ee2db4f..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/algos.js +++ /dev/null @@ -1,72 +0,0 @@ -'use strict' -exports['RSA-SHA224'] = exports.sha224WithRSAEncryption = { - sign: 'rsa', - hash: 'sha224', - id: new Buffer('302d300d06096086480165030402040500041c', 'hex') -} -exports['RSA-SHA256'] = exports.sha256WithRSAEncryption = { - sign: 'rsa', - hash: 'sha256', - id: new Buffer('3031300d060960864801650304020105000420', 'hex') -} -exports['RSA-SHA384'] = exports.sha384WithRSAEncryption = { - sign: 'rsa', - hash: 'sha384', - id: new Buffer('3041300d060960864801650304020205000430', 'hex') -} -exports['RSA-SHA512'] = exports.sha512WithRSAEncryption = { - sign: 'rsa', - hash: 'sha512', - id: new Buffer('3051300d060960864801650304020305000440', 'hex') -} -exports['RSA-SHA1'] = { - sign: 'rsa', - hash: 'sha1', - id: new Buffer('3021300906052b0e03021a05000414', 'hex') -} -exports['ecdsa-with-SHA1'] = { - sign: 'ecdsa', - hash: 'sha1', - id: new Buffer('', 'hex') -} - -exports.DSA = exports['DSA-SHA1'] = exports['DSA-SHA'] = { - sign: 'dsa', - hash: 'sha1', - id: new Buffer('', 'hex') -} -exports['DSA-SHA224'] = exports['DSA-WITH-SHA224'] = { - sign: 'dsa', - hash: 'sha224', - id: new Buffer('', 'hex') -} -exports['DSA-SHA256'] = exports['DSA-WITH-SHA256'] = { - sign: 'dsa', - hash: 'sha256', - id: new Buffer('', 'hex') -} -exports['DSA-SHA384'] = exports['DSA-WITH-SHA384'] = { - sign: 'dsa', - hash: 'sha384', - id: new Buffer('', 'hex') -} -exports['DSA-SHA512'] = exports['DSA-WITH-SHA512'] = { - sign: 'dsa', - hash: 'sha512', - id: new Buffer('', 'hex') -} -exports['DSA-RIPEMD160'] = { - sign: 'dsa', - hash: 'rmd160', - id: new Buffer('', 'hex') -} -exports['RSA-RIPEMD160'] = exports.ripemd160WithRSA = { - sign: 'rsa', - hash: 'rmd160', - id: new Buffer('3021300906052b2403020105000414', 'hex') -} -exports['RSA-MD5'] = exports.md5WithRSAEncryption = { - sign: 'rsa', - hash: 'md5', - id: new Buffer('3020300c06082a864886f70d020505000410', 'hex') -} diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/algos.json b/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/algos.json deleted file mode 100644 index 88254555..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/algos.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "sha1":"da39a3ee 5e6b4b0d 3255bfef 95601890 afd80709", - - "sha224":"d14a028c 2a3a2bc9 476102bb 288234c4 15a2b01f 828ea62a c5b3e42f", - - "sha256": "e3b0c442 98fc1c14 9afbf4c8 996fb924 27ae41e4 649b934c a495991b 7852b855", - - "sha384": "38b060a7 51ac9638 4cd9327e b1b1e36a 21fdb711 14be0743 4c0cc7bf 63f6e1da 274edebf e76f65fb d51ad2f1 4898b95b", - - "sha512": "cf83e135 7eefb8bd f1542850 d66d8007 d620e405 0b5715dc 83f4a921 d36ce9ce 47d0d13c 5d85f2b0 ff8318d2 877eec2f 63b931bd 47417a81 a538327a f927da3e", - - "sha512/224": "6ed0dd02 806fa89e 25de060c 19d3ac86 cabb87d6 a0ddd05c 333b84f4", - - "sha512/256": "c672b8d1 ef56ed28 ab87c362 2c511406 9bdd3ad7 b8f97374 98d0c01e cef0967a" -} \ No newline at end of file diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/browser.js b/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/browser.js deleted file mode 100644 index 4ee02ea7..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/browser.js +++ /dev/null @@ -1,103 +0,0 @@ -var _algos = require('./algos') -var createHash = require('create-hash') -var inherits = require('inherits') -var sign = require('./sign') -var stream = require('stream') -var verify = require('./verify') - -var algos = {} -Object.keys(_algos).forEach(function (key) { - algos[key] = algos[key.toLowerCase()] = _algos[key] -}) - -function Sign (algorithm) { - stream.Writable.call(this) - - var data = algos[algorithm] - if (!data) { - throw new Error('Unknown message digest') - } - - this._hashType = data.hash - this._hash = createHash(data.hash) - this._tag = data.id - this._signType = data.sign -} -inherits(Sign, stream.Writable) - -Sign.prototype._write = function _write (data, _, done) { - this._hash.update(data) - done() -} - -Sign.prototype.update = function update (data, enc) { - if (typeof data === 'string') { - data = new Buffer(data, enc) - } - - this._hash.update(data) - return this -} - -Sign.prototype.sign = function signMethod (key, enc) { - this.end() - var hash = this._hash.digest() - var sig = sign(Buffer.concat([this._tag, hash]), key, this._hashType, this._signType) - - return enc ? sig.toString(enc) : sig -} - -function Verify (algorithm) { - stream.Writable.call(this) - - var data = algos[algorithm] - if (!data) { - throw new Error('Unknown message digest') - } - - this._hash = createHash(data.hash) - this._tag = data.id - this._signType = data.sign -} -inherits(Verify, stream.Writable) - -Verify.prototype._write = function _write (data, _, done) { - this._hash.update(data) - - done() -} - -Verify.prototype.update = function update (data, enc) { - if (typeof data === 'string') { - data = new Buffer(data, enc) - } - - this._hash.update(data) - return this -} - -Verify.prototype.verify = function verifyMethod (key, sig, enc) { - if (typeof sig === 'string') { - sig = new Buffer(sig, enc) - } - - this.end() - var hash = this._hash.digest() - - return verify(sig, Buffer.concat([this._tag, hash]), key, this._signType) -} - -function createSign (algorithm) { - return new Sign(algorithm) -} - -function createVerify (algorithm) { - return new Verify(algorithm) -} - -module.exports = { - Sign: createSign, - Verify: createVerify, - createSign: createSign, - createVerify: createVerify -} diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/curves.js b/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/curves.js deleted file mode 100644 index ea28991f..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/curves.js +++ /dev/null @@ -1,12 +0,0 @@ -'use strict' -exports['1.3.132.0.10'] = 'secp256k1' - -exports['1.3.132.0.33'] = 'p224' - -exports['1.2.840.10045.3.1.1'] = 'p192' - -exports['1.2.840.10045.3.1.7'] = 'p256' - -exports['1.3.132.0.34'] = 'p384' - -exports['1.3.132.0.35'] = 'p521' diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/ec.param b/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/ec.param deleted file mode 100644 index 9728ddda..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/ec.param +++ /dev/null @@ -1,3 +0,0 @@ ------BEGIN EC PARAMETERS----- -BgUrgQQAIQ== ------END EC PARAMETERS----- diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/index.js b/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/index.js deleted file mode 100644 index dafa0bc3..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/index.js +++ /dev/null @@ -1,7 +0,0 @@ -var crypto = require('crypto') - -exports.createSign = crypto.createSign -exports.Sign = crypto.Sign - -exports.createVerify = crypto.createVerify -exports.Verify = crypto.Verify diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/bn.js/.npmignore b/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/bn.js/.npmignore deleted file mode 100644 index 6d1eebbd..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/bn.js/.npmignore +++ /dev/null @@ -1,6 +0,0 @@ -benchmarks/ -coverage/ -node_modules/ -npm-debug.log -1.js -logo.png diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/bn.js/.travis.yml b/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/bn.js/.travis.yml deleted file mode 100644 index 936b7b78..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/bn.js/.travis.yml +++ /dev/null @@ -1,15 +0,0 @@ -sudo: false -language: node_js -node_js: - - "0.10" - - "0.12" - - "4" - - "5" -env: - matrix: - - TEST_SUITE=unit -matrix: - include: - - node_js: "4" - env: TEST_SUITE=lint -script: npm run $TEST_SUITE diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/bn.js/README.md b/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/bn.js/README.md deleted file mode 100644 index fee65baa..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/bn.js/README.md +++ /dev/null @@ -1,219 +0,0 @@ -# bn.js - -> BigNum in pure javascript - -[![Build Status](https://secure.travis-ci.org/indutny/bn.js.png)](http://travis-ci.org/indutny/bn.js) - -## Install -`npm install --save bn.js` - -## Usage - -```js -const BN = require('bn.js'); - -var a = new BN('dead', 16); -var b = new BN('101010', 2); - -var res = a.add(b); -console.log(res.toString(10)); // 57047 -``` - -**Note**: decimals are not supported in this library. - -## Notation - -### Prefixes - -There are several prefixes to instructions that affect the way the work. Here -is the list of them in the order of appearance in the function name: - -* `i` - perform operation in-place, storing the result in the host object (on - which the method was invoked). Might be used to avoid number allocation costs -* `u` - unsigned, ignore the sign of operands when performing operation, or - always return positive value. Second case applies to reduction operations - like `mod()`. In such cases if the result will be negative - modulo will be - added to the result to make it positive - -### Postfixes - -The only available postfix at the moment is: - -* `n` - which means that the argument of the function must be a plain JavaScript - number - -### Examples - -* `a.iadd(b)` - perform addition on `a` and `b`, storing the result in `a` -* `a.pmod(b)` - reduce `a` modulo `b`, returning positive value -* `a.iushln(13)` - shift bits of `a` left by 13 - -## Instructions - -Prefixes/postfixes are put in parens at the of the line. `endian` - could be -either `le` (little-endian) or `be` (big-endian). - -### Utilities - -* `a.clone()` - clone number -* `a.toString(base, length)` - convert to base-string and pad with zeroes -* `a.toNumber()` - convert to Javascript Number (limited to 53 bits) -* `a.toJSON()` - convert to JSON compatible hex string (alias of `toString(16)`) -* `a.toArray(endian, length)` - convert to byte `Array`, and optionally zero - pad to length, throwing if already exceeding -* `a.toArrayLike(type, endian, length)` - convert to an instance of `type`, - which must behave like an `Array` -* `a.toBuffer(endian, length)` - convert to Node.js Buffer (if available) -* `a.bitLength()` - get number of bits occupied -* `a.zeroBits()` - return number of less-significant consequent zero bits - (example: `1010000` has 4 zero bits) -* `a.byteLength()` - return number of bytes occupied -* `a.isNeg()` - true if the number is negative -* `a.isEven()` - no comments -* `a.isOdd()` - no comments -* `a.isZero()` - no comments -* `a.cmp(b)` - compare numbers and return `-1` (a `<` b), `0` (a `==` b), or `1` (a `>` b) - depending on the comparison result (`ucmp`, `cmpn`) -* `a.lt(b)` - `a` less than `b` (`n`) -* `a.lte(b)` - `a` less than or equals `b` (`n`) -* `a.gt(b)` - `a` greater than `b` (`n`) -* `a.gte(b)` - `a` greater than or equals `b` (`n`) -* `a.eq(b)` - `a` equals `b` (`n`) -* `a.toTwos(width)` - convert to two's complement representation, where `width` is bit width -* `a.fromTwos(width)` - convert from two's complement representation, where `width` is the bit width -* `a.isBN(object)` - returns true if the supplied `object` is a BN.js instance - -### Arithmetics - -* `a.neg()` - negate sign (`i`) -* `a.abs()` - absolute value (`i`) -* `a.add(b)` - addition (`i`, `n`, `in`) -* `a.sub(b)` - subtraction (`i`, `n`, `in`) -* `a.mul(b)` - multiply (`i`, `n`, `in`) -* `a.sqr()` - square (`i`) -* `a.pow(b)` - raise `a` to the power of `b` -* `a.div(b)` - divide (`divn`, `idivn`) -* `a.mod(b)` - reduct (`u`, `n`) (but no `umodn`) -* `a.divRound(b)` - rounded division - -### Bit operations - -* `a.or(b)` - or (`i`, `u`, `iu`) -* `a.and(b)` - and (`i`, `u`, `iu`, `andln`) (NOTE: `andln` is going to be replaced - with `andn` in future) -* `a.xor(b)` - xor (`i`, `u`, `iu`) -* `a.setn(b)` - set specified bit to `1` -* `a.shln(b)` - shift left (`i`, `u`, `iu`) -* `a.shrn(b)` - shift right (`i`, `u`, `iu`) -* `a.testn(b)` - test if specified bit is set -* `a.maskn(b)` - clear bits with indexes higher or equal to `b` (`i`) -* `a.bincn(b)` - add `1 << b` to the number -* `a.notn(w)` - not (for the width specified by `w`) (`i`) - -### Reduction - -* `a.gcd(b)` - GCD -* `a.egcd(b)` - Extended GCD results (`{ a: ..., b: ..., gcd: ... }`) -* `a.invm(b)` - inverse `a` modulo `b` - -## Fast reduction - -When doing lots of reductions using the same modulo, it might be beneficial to -use some tricks: like [Montgomery multiplication][0], or using special algorithm -for [Mersenne Prime][1]. - -### Reduction context - -To enable this tricks one should create a reduction context: - -```js -var red = BN.red(num); -``` -where `num` is just a BN instance. - -Or: - -```js -var red = BN.red(primeName); -``` - -Where `primeName` is either of these [Mersenne Primes][1]: - -* `'k256'` -* `'p224'` -* `'p192'` -* `'p25519'` - -Or: - -```js -var red = BN.mont(num); -``` - -To reduce numbers with [Montgomery trick][1]. `.mont()` is generally faster than -`.red(num)`, but slower than `BN.red(primeName)`. - -### Converting numbers - -Before performing anything in reduction context - numbers should be converted -to it. Usually, this means that one should: - -* Convert inputs to reducted ones -* Operate on them in reduction context -* Convert outputs back from the reduction context - -Here is how one may convert numbers to `red`: - -```js -var redA = a.toRed(red); -``` -Where `red` is a reduction context created using instructions above - -Here is how to convert them back: - -```js -var a = redA.fromRed(); -``` - -### Red instructions - -Most of the instructions from the very start of this readme have their -counterparts in red context: - -* `a.redAdd(b)`, `a.redIAdd(b)` -* `a.redSub(b)`, `a.redISub(b)` -* `a.redShl(num)` -* `a.redMul(b)`, `a.redIMul(b)` -* `a.redSqr()`, `a.redISqr()` -* `a.redSqrt()` - square root modulo reduction context's prime -* `a.redInvm()` - modular inverse of the number -* `a.redNeg()` -* `a.redPow(b)` - modular exponentiation - -## LICENSE - -This software is licensed under the MIT License. - -Copyright Fedor Indutny, 2015. - -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. - -[0]: https://en.wikipedia.org/wiki/Montgomery_modular_multiplication -[1]: https://en.wikipedia.org/wiki/Mersenne_prime diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/bn.js/lib/bn.js b/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/bn.js/lib/bn.js deleted file mode 100644 index 29a4c51a..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/bn.js/lib/bn.js +++ /dev/null @@ -1,3427 +0,0 @@ -(function (module, exports) { - 'use strict'; - - // Utils - function assert (val, msg) { - if (!val) throw new Error(msg || 'Assertion failed'); - } - - // Could use `inherits` module, but don't want to move from single file - // architecture yet. - function inherits (ctor, superCtor) { - ctor.super_ = superCtor; - var TempCtor = function () {}; - TempCtor.prototype = superCtor.prototype; - ctor.prototype = new TempCtor(); - ctor.prototype.constructor = ctor; - } - - // BN - - function BN (number, base, endian) { - if (BN.isBN(number)) { - return number; - } - - this.negative = 0; - this.words = null; - this.length = 0; - - // Reduction context - this.red = null; - - if (number !== null) { - if (base === 'le' || base === 'be') { - endian = base; - base = 10; - } - - this._init(number || 0, base || 10, endian || 'be'); - } - } - if (typeof module === 'object') { - module.exports = BN; - } else { - exports.BN = BN; - } - - BN.BN = BN; - BN.wordSize = 26; - - var Buffer; - try { - Buffer = require('buf' + 'fer').Buffer; - } catch (e) { - } - - BN.isBN = function isBN (num) { - if (num instanceof BN) { - return true; - } - - return num !== null && typeof num === 'object' && - num.constructor.wordSize === BN.wordSize && Array.isArray(num.words); - }; - - BN.max = function max (left, right) { - if (left.cmp(right) > 0) return left; - return right; - }; - - BN.min = function min (left, right) { - if (left.cmp(right) < 0) return left; - return right; - }; - - BN.prototype._init = function init (number, base, endian) { - if (typeof number === 'number') { - return this._initNumber(number, base, endian); - } - - if (typeof number === 'object') { - return this._initArray(number, base, endian); - } - - if (base === 'hex') { - base = 16; - } - assert(base === (base | 0) && base >= 2 && base <= 36); - - number = number.toString().replace(/\s+/g, ''); - var start = 0; - if (number[0] === '-') { - start++; - } - - if (base === 16) { - this._parseHex(number, start); - } else { - this._parseBase(number, base, start); - } - - if (number[0] === '-') { - this.negative = 1; - } - - this.strip(); - - if (endian !== 'le') return; - - this._initArray(this.toArray(), base, endian); - }; - - BN.prototype._initNumber = function _initNumber (number, base, endian) { - if (number < 0) { - this.negative = 1; - number = -number; - } - if (number < 0x4000000) { - this.words = [ number & 0x3ffffff ]; - this.length = 1; - } else if (number < 0x10000000000000) { - this.words = [ - number & 0x3ffffff, - (number / 0x4000000) & 0x3ffffff - ]; - this.length = 2; - } else { - assert(number < 0x20000000000000); // 2 ^ 53 (unsafe) - this.words = [ - number & 0x3ffffff, - (number / 0x4000000) & 0x3ffffff, - 1 - ]; - this.length = 3; - } - - if (endian !== 'le') return; - - // Reverse the bytes - this._initArray(this.toArray(), base, endian); - }; - - BN.prototype._initArray = function _initArray (number, base, endian) { - // Perhaps a Uint8Array - assert(typeof number.length === 'number'); - if (number.length <= 0) { - this.words = [ 0 ]; - this.length = 1; - return this; - } - - this.length = Math.ceil(number.length / 3); - this.words = new Array(this.length); - for (var i = 0; i < this.length; i++) { - this.words[i] = 0; - } - - var j, w; - var off = 0; - if (endian === 'be') { - for (i = number.length - 1, j = 0; i >= 0; i -= 3) { - w = number[i] | (number[i - 1] << 8) | (number[i - 2] << 16); - this.words[j] |= (w << off) & 0x3ffffff; - this.words[j + 1] = (w >>> (26 - off)) & 0x3ffffff; - off += 24; - if (off >= 26) { - off -= 26; - j++; - } - } - } else if (endian === 'le') { - for (i = 0, j = 0; i < number.length; i += 3) { - w = number[i] | (number[i + 1] << 8) | (number[i + 2] << 16); - this.words[j] |= (w << off) & 0x3ffffff; - this.words[j + 1] = (w >>> (26 - off)) & 0x3ffffff; - off += 24; - if (off >= 26) { - off -= 26; - j++; - } - } - } - return this.strip(); - }; - - function parseHex (str, start, end) { - var r = 0; - var len = Math.min(str.length, end); - for (var i = start; i < len; i++) { - var c = str.charCodeAt(i) - 48; - - r <<= 4; - - // 'a' - 'f' - if (c >= 49 && c <= 54) { - r |= c - 49 + 0xa; - - // 'A' - 'F' - } else if (c >= 17 && c <= 22) { - r |= c - 17 + 0xa; - - // '0' - '9' - } else { - r |= c & 0xf; - } - } - return r; - } - - BN.prototype._parseHex = function _parseHex (number, start) { - // Create possibly bigger array to ensure that it fits the number - this.length = Math.ceil((number.length - start) / 6); - this.words = new Array(this.length); - for (var i = 0; i < this.length; i++) { - this.words[i] = 0; - } - - var j, w; - // Scan 24-bit chunks and add them to the number - var off = 0; - for (i = number.length - 6, j = 0; i >= start; i -= 6) { - w = parseHex(number, i, i + 6); - this.words[j] |= (w << off) & 0x3ffffff; - // NOTE: `0x3fffff` is intentional here, 26bits max shift + 24bit hex limb - this.words[j + 1] |= w >>> (26 - off) & 0x3fffff; - off += 24; - if (off >= 26) { - off -= 26; - j++; - } - } - if (i + 6 !== start) { - w = parseHex(number, start, i + 6); - this.words[j] |= (w << off) & 0x3ffffff; - this.words[j + 1] |= w >>> (26 - off) & 0x3fffff; - } - this.strip(); - }; - - function parseBase (str, start, end, mul) { - var r = 0; - var len = Math.min(str.length, end); - for (var i = start; i < len; i++) { - var c = str.charCodeAt(i) - 48; - - r *= mul; - - // 'a' - if (c >= 49) { - r += c - 49 + 0xa; - - // 'A' - } else if (c >= 17) { - r += c - 17 + 0xa; - - // '0' - '9' - } else { - r += c; - } - } - return r; - } - - BN.prototype._parseBase = function _parseBase (number, base, start) { - // Initialize as zero - this.words = [ 0 ]; - this.length = 1; - - // Find length of limb in base - for (var limbLen = 0, limbPow = 1; limbPow <= 0x3ffffff; limbPow *= base) { - limbLen++; - } - limbLen--; - limbPow = (limbPow / base) | 0; - - var total = number.length - start; - var mod = total % limbLen; - var end = Math.min(total, total - mod) + start; - - var word = 0; - for (var i = start; i < end; i += limbLen) { - word = parseBase(number, i, i + limbLen, base); - - this.imuln(limbPow); - if (this.words[0] + word < 0x4000000) { - this.words[0] += word; - } else { - this._iaddn(word); - } - } - - if (mod !== 0) { - var pow = 1; - word = parseBase(number, i, number.length, base); - - for (i = 0; i < mod; i++) { - pow *= base; - } - - this.imuln(pow); - if (this.words[0] + word < 0x4000000) { - this.words[0] += word; - } else { - this._iaddn(word); - } - } - }; - - BN.prototype.copy = function copy (dest) { - dest.words = new Array(this.length); - for (var i = 0; i < this.length; i++) { - dest.words[i] = this.words[i]; - } - dest.length = this.length; - dest.negative = this.negative; - dest.red = this.red; - }; - - BN.prototype.clone = function clone () { - var r = new BN(null); - this.copy(r); - return r; - }; - - BN.prototype._expand = function _expand (size) { - while (this.length < size) { - this.words[this.length++] = 0; - } - return this; - }; - - // Remove leading `0` from `this` - BN.prototype.strip = function strip () { - while (this.length > 1 && this.words[this.length - 1] === 0) { - this.length--; - } - return this._normSign(); - }; - - BN.prototype._normSign = function _normSign () { - // -0 = 0 - if (this.length === 1 && this.words[0] === 0) { - this.negative = 0; - } - return this; - }; - - BN.prototype.inspect = function inspect () { - return (this.red ? ''; - }; - - /* - - var zeros = []; - var groupSizes = []; - var groupBases = []; - - var s = ''; - var i = -1; - while (++i < BN.wordSize) { - zeros[i] = s; - s += '0'; - } - groupSizes[0] = 0; - groupSizes[1] = 0; - groupBases[0] = 0; - groupBases[1] = 0; - var base = 2 - 1; - while (++base < 36 + 1) { - var groupSize = 0; - var groupBase = 1; - while (groupBase < (1 << BN.wordSize) / base) { - groupBase *= base; - groupSize += 1; - } - groupSizes[base] = groupSize; - groupBases[base] = groupBase; - } - - */ - - var zeros = [ - '', - '0', - '00', - '000', - '0000', - '00000', - '000000', - '0000000', - '00000000', - '000000000', - '0000000000', - '00000000000', - '000000000000', - '0000000000000', - '00000000000000', - '000000000000000', - '0000000000000000', - '00000000000000000', - '000000000000000000', - '0000000000000000000', - '00000000000000000000', - '000000000000000000000', - '0000000000000000000000', - '00000000000000000000000', - '000000000000000000000000', - '0000000000000000000000000' - ]; - - var groupSizes = [ - 0, 0, - 25, 16, 12, 11, 10, 9, 8, - 8, 7, 7, 7, 7, 6, 6, - 6, 6, 6, 6, 6, 5, 5, - 5, 5, 5, 5, 5, 5, 5, - 5, 5, 5, 5, 5, 5, 5 - ]; - - var groupBases = [ - 0, 0, - 33554432, 43046721, 16777216, 48828125, 60466176, 40353607, 16777216, - 43046721, 10000000, 19487171, 35831808, 62748517, 7529536, 11390625, - 16777216, 24137569, 34012224, 47045881, 64000000, 4084101, 5153632, - 6436343, 7962624, 9765625, 11881376, 14348907, 17210368, 20511149, - 24300000, 28629151, 33554432, 39135393, 45435424, 52521875, 60466176 - ]; - - BN.prototype.toString = function toString (base, padding) { - base = base || 10; - padding = padding | 0 || 1; - - var out; - if (base === 16 || base === 'hex') { - out = ''; - var off = 0; - var carry = 0; - for (var i = 0; i < this.length; i++) { - var w = this.words[i]; - var word = (((w << off) | carry) & 0xffffff).toString(16); - carry = (w >>> (24 - off)) & 0xffffff; - if (carry !== 0 || i !== this.length - 1) { - out = zeros[6 - word.length] + word + out; - } else { - out = word + out; - } - off += 2; - if (off >= 26) { - off -= 26; - i--; - } - } - if (carry !== 0) { - out = carry.toString(16) + out; - } - while (out.length % padding !== 0) { - out = '0' + out; - } - if (this.negative !== 0) { - out = '-' + out; - } - return out; - } - - if (base === (base | 0) && base >= 2 && base <= 36) { - // var groupSize = Math.floor(BN.wordSize * Math.LN2 / Math.log(base)); - var groupSize = groupSizes[base]; - // var groupBase = Math.pow(base, groupSize); - var groupBase = groupBases[base]; - out = ''; - var c = this.clone(); - c.negative = 0; - while (!c.isZero()) { - var r = c.modn(groupBase).toString(base); - c = c.idivn(groupBase); - - if (!c.isZero()) { - out = zeros[groupSize - r.length] + r + out; - } else { - out = r + out; - } - } - if (this.isZero()) { - out = '0' + out; - } - while (out.length % padding !== 0) { - out = '0' + out; - } - if (this.negative !== 0) { - out = '-' + out; - } - return out; - } - - assert(false, 'Base should be between 2 and 36'); - }; - - BN.prototype.toNumber = function toNumber () { - var ret = this.words[0]; - if (this.length === 2) { - ret += this.words[1] * 0x4000000; - } else if (this.length === 3 && this.words[2] === 0x01) { - // NOTE: at this stage it is known that the top bit is set - ret += 0x10000000000000 + (this.words[1] * 0x4000000); - } else if (this.length > 2) { - assert(false, 'Number can only safely store up to 53 bits'); - } - return (this.negative !== 0) ? -ret : ret; - }; - - BN.prototype.toJSON = function toJSON () { - return this.toString(16); - }; - - BN.prototype.toBuffer = function toBuffer (endian, length) { - assert(typeof Buffer !== 'undefined'); - return this.toArrayLike(Buffer, endian, length); - }; - - BN.prototype.toArray = function toArray (endian, length) { - return this.toArrayLike(Array, endian, length); - }; - - BN.prototype.toArrayLike = function toArrayLike (ArrayType, endian, length) { - var byteLength = this.byteLength(); - var reqLength = length || Math.max(1, byteLength); - assert(byteLength <= reqLength, 'byte array longer than desired length'); - assert(reqLength > 0, 'Requested array length <= 0'); - - this.strip(); - var littleEndian = endian === 'le'; - var res = new ArrayType(reqLength); - - var b, i; - var q = this.clone(); - if (!littleEndian) { - // Assume big-endian - for (i = 0; i < reqLength - byteLength; i++) { - res[i] = 0; - } - - for (i = 0; !q.isZero(); i++) { - b = q.andln(0xff); - q.iushrn(8); - - res[reqLength - i - 1] = b; - } - } else { - for (i = 0; !q.isZero(); i++) { - b = q.andln(0xff); - q.iushrn(8); - - res[i] = b; - } - - for (; i < reqLength; i++) { - res[i] = 0; - } - } - - return res; - }; - - if (Math.clz32) { - BN.prototype._countBits = function _countBits (w) { - return 32 - Math.clz32(w); - }; - } else { - BN.prototype._countBits = function _countBits (w) { - var t = w; - var r = 0; - if (t >= 0x1000) { - r += 13; - t >>>= 13; - } - if (t >= 0x40) { - r += 7; - t >>>= 7; - } - if (t >= 0x8) { - r += 4; - t >>>= 4; - } - if (t >= 0x02) { - r += 2; - t >>>= 2; - } - return r + t; - }; - } - - BN.prototype._zeroBits = function _zeroBits (w) { - // Short-cut - if (w === 0) return 26; - - var t = w; - var r = 0; - if ((t & 0x1fff) === 0) { - r += 13; - t >>>= 13; - } - if ((t & 0x7f) === 0) { - r += 7; - t >>>= 7; - } - if ((t & 0xf) === 0) { - r += 4; - t >>>= 4; - } - if ((t & 0x3) === 0) { - r += 2; - t >>>= 2; - } - if ((t & 0x1) === 0) { - r++; - } - return r; - }; - - // Return number of used bits in a BN - BN.prototype.bitLength = function bitLength () { - var w = this.words[this.length - 1]; - var hi = this._countBits(w); - return (this.length - 1) * 26 + hi; - }; - - function toBitArray (num) { - var w = new Array(num.bitLength()); - - for (var bit = 0; bit < w.length; bit++) { - var off = (bit / 26) | 0; - var wbit = bit % 26; - - w[bit] = (num.words[off] & (1 << wbit)) >>> wbit; - } - - return w; - } - - // Number of trailing zero bits - BN.prototype.zeroBits = function zeroBits () { - if (this.isZero()) return 0; - - var r = 0; - for (var i = 0; i < this.length; i++) { - var b = this._zeroBits(this.words[i]); - r += b; - if (b !== 26) break; - } - return r; - }; - - BN.prototype.byteLength = function byteLength () { - return Math.ceil(this.bitLength() / 8); - }; - - BN.prototype.toTwos = function toTwos (width) { - if (this.negative !== 0) { - return this.abs().inotn(width).iaddn(1); - } - return this.clone(); - }; - - BN.prototype.fromTwos = function fromTwos (width) { - if (this.testn(width - 1)) { - return this.notn(width).iaddn(1).ineg(); - } - return this.clone(); - }; - - BN.prototype.isNeg = function isNeg () { - return this.negative !== 0; - }; - - // Return negative clone of `this` - BN.prototype.neg = function neg () { - return this.clone().ineg(); - }; - - BN.prototype.ineg = function ineg () { - if (!this.isZero()) { - this.negative ^= 1; - } - - return this; - }; - - // Or `num` with `this` in-place - BN.prototype.iuor = function iuor (num) { - while (this.length < num.length) { - this.words[this.length++] = 0; - } - - for (var i = 0; i < num.length; i++) { - this.words[i] = this.words[i] | num.words[i]; - } - - return this.strip(); - }; - - BN.prototype.ior = function ior (num) { - assert((this.negative | num.negative) === 0); - return this.iuor(num); - }; - - // Or `num` with `this` - BN.prototype.or = function or (num) { - if (this.length > num.length) return this.clone().ior(num); - return num.clone().ior(this); - }; - - BN.prototype.uor = function uor (num) { - if (this.length > num.length) return this.clone().iuor(num); - return num.clone().iuor(this); - }; - - // And `num` with `this` in-place - BN.prototype.iuand = function iuand (num) { - // b = min-length(num, this) - var b; - if (this.length > num.length) { - b = num; - } else { - b = this; - } - - for (var i = 0; i < b.length; i++) { - this.words[i] = this.words[i] & num.words[i]; - } - - this.length = b.length; - - return this.strip(); - }; - - BN.prototype.iand = function iand (num) { - assert((this.negative | num.negative) === 0); - return this.iuand(num); - }; - - // And `num` with `this` - BN.prototype.and = function and (num) { - if (this.length > num.length) return this.clone().iand(num); - return num.clone().iand(this); - }; - - BN.prototype.uand = function uand (num) { - if (this.length > num.length) return this.clone().iuand(num); - return num.clone().iuand(this); - }; - - // Xor `num` with `this` in-place - BN.prototype.iuxor = function iuxor (num) { - // a.length > b.length - var a; - var b; - if (this.length > num.length) { - a = this; - b = num; - } else { - a = num; - b = this; - } - - for (var i = 0; i < b.length; i++) { - this.words[i] = a.words[i] ^ b.words[i]; - } - - if (this !== a) { - for (; i < a.length; i++) { - this.words[i] = a.words[i]; - } - } - - this.length = a.length; - - return this.strip(); - }; - - BN.prototype.ixor = function ixor (num) { - assert((this.negative | num.negative) === 0); - return this.iuxor(num); - }; - - // Xor `num` with `this` - BN.prototype.xor = function xor (num) { - if (this.length > num.length) return this.clone().ixor(num); - return num.clone().ixor(this); - }; - - BN.prototype.uxor = function uxor (num) { - if (this.length > num.length) return this.clone().iuxor(num); - return num.clone().iuxor(this); - }; - - // Not ``this`` with ``width`` bitwidth - BN.prototype.inotn = function inotn (width) { - assert(typeof width === 'number' && width >= 0); - - var bytesNeeded = Math.ceil(width / 26) | 0; - var bitsLeft = width % 26; - - // Extend the buffer with leading zeroes - this._expand(bytesNeeded); - - if (bitsLeft > 0) { - bytesNeeded--; - } - - // Handle complete words - for (var i = 0; i < bytesNeeded; i++) { - this.words[i] = ~this.words[i] & 0x3ffffff; - } - - // Handle the residue - if (bitsLeft > 0) { - this.words[i] = ~this.words[i] & (0x3ffffff >> (26 - bitsLeft)); - } - - // And remove leading zeroes - return this.strip(); - }; - - BN.prototype.notn = function notn (width) { - return this.clone().inotn(width); - }; - - // Set `bit` of `this` - BN.prototype.setn = function setn (bit, val) { - assert(typeof bit === 'number' && bit >= 0); - - var off = (bit / 26) | 0; - var wbit = bit % 26; - - this._expand(off + 1); - - if (val) { - this.words[off] = this.words[off] | (1 << wbit); - } else { - this.words[off] = this.words[off] & ~(1 << wbit); - } - - return this.strip(); - }; - - // Add `num` to `this` in-place - BN.prototype.iadd = function iadd (num) { - var r; - - // negative + positive - if (this.negative !== 0 && num.negative === 0) { - this.negative = 0; - r = this.isub(num); - this.negative ^= 1; - return this._normSign(); - - // positive + negative - } else if (this.negative === 0 && num.negative !== 0) { - num.negative = 0; - r = this.isub(num); - num.negative = 1; - return r._normSign(); - } - - // a.length > b.length - var a, b; - if (this.length > num.length) { - a = this; - b = num; - } else { - a = num; - b = this; - } - - var carry = 0; - for (var i = 0; i < b.length; i++) { - r = (a.words[i] | 0) + (b.words[i] | 0) + carry; - this.words[i] = r & 0x3ffffff; - carry = r >>> 26; - } - for (; carry !== 0 && i < a.length; i++) { - r = (a.words[i] | 0) + carry; - this.words[i] = r & 0x3ffffff; - carry = r >>> 26; - } - - this.length = a.length; - if (carry !== 0) { - this.words[this.length] = carry; - this.length++; - // Copy the rest of the words - } else if (a !== this) { - for (; i < a.length; i++) { - this.words[i] = a.words[i]; - } - } - - return this; - }; - - // Add `num` to `this` - BN.prototype.add = function add (num) { - var res; - if (num.negative !== 0 && this.negative === 0) { - num.negative = 0; - res = this.sub(num); - num.negative ^= 1; - return res; - } else if (num.negative === 0 && this.negative !== 0) { - this.negative = 0; - res = num.sub(this); - this.negative = 1; - return res; - } - - if (this.length > num.length) return this.clone().iadd(num); - - return num.clone().iadd(this); - }; - - // Subtract `num` from `this` in-place - BN.prototype.isub = function isub (num) { - // this - (-num) = this + num - if (num.negative !== 0) { - num.negative = 0; - var r = this.iadd(num); - num.negative = 1; - return r._normSign(); - - // -this - num = -(this + num) - } else if (this.negative !== 0) { - this.negative = 0; - this.iadd(num); - this.negative = 1; - return this._normSign(); - } - - // At this point both numbers are positive - var cmp = this.cmp(num); - - // Optimization - zeroify - if (cmp === 0) { - this.negative = 0; - this.length = 1; - this.words[0] = 0; - return this; - } - - // a > b - var a, b; - if (cmp > 0) { - a = this; - b = num; - } else { - a = num; - b = this; - } - - var carry = 0; - for (var i = 0; i < b.length; i++) { - r = (a.words[i] | 0) - (b.words[i] | 0) + carry; - carry = r >> 26; - this.words[i] = r & 0x3ffffff; - } - for (; carry !== 0 && i < a.length; i++) { - r = (a.words[i] | 0) + carry; - carry = r >> 26; - this.words[i] = r & 0x3ffffff; - } - - // Copy rest of the words - if (carry === 0 && i < a.length && a !== this) { - for (; i < a.length; i++) { - this.words[i] = a.words[i]; - } - } - - this.length = Math.max(this.length, i); - - if (a !== this) { - this.negative = 1; - } - - return this.strip(); - }; - - // Subtract `num` from `this` - BN.prototype.sub = function sub (num) { - return this.clone().isub(num); - }; - - function smallMulTo (self, num, out) { - out.negative = num.negative ^ self.negative; - var len = (self.length + num.length) | 0; - out.length = len; - len = (len - 1) | 0; - - // Peel one iteration (compiler can't do it, because of code complexity) - var a = self.words[0] | 0; - var b = num.words[0] | 0; - var r = a * b; - - var lo = r & 0x3ffffff; - var carry = (r / 0x4000000) | 0; - out.words[0] = lo; - - for (var k = 1; k < len; k++) { - // Sum all words with the same `i + j = k` and accumulate `ncarry`, - // note that ncarry could be >= 0x3ffffff - var ncarry = carry >>> 26; - var rword = carry & 0x3ffffff; - var maxJ = Math.min(k, num.length - 1); - for (var j = Math.max(0, k - self.length + 1); j <= maxJ; j++) { - var i = (k - j) | 0; - a = self.words[i] | 0; - b = num.words[j] | 0; - r = a * b + rword; - ncarry += (r / 0x4000000) | 0; - rword = r & 0x3ffffff; - } - out.words[k] = rword | 0; - carry = ncarry | 0; - } - if (carry !== 0) { - out.words[k] = carry | 0; - } else { - out.length--; - } - - return out.strip(); - } - - // TODO(indutny): it may be reasonable to omit it for users who don't need - // to work with 256-bit numbers, otherwise it gives 20% improvement for 256-bit - // multiplication (like elliptic secp256k1). - var comb10MulTo = function comb10MulTo (self, num, out) { - var a = self.words; - var b = num.words; - var o = out.words; - var c = 0; - var lo; - var mid; - var hi; - var a0 = a[0] | 0; - var al0 = a0 & 0x1fff; - var ah0 = a0 >>> 13; - var a1 = a[1] | 0; - var al1 = a1 & 0x1fff; - var ah1 = a1 >>> 13; - var a2 = a[2] | 0; - var al2 = a2 & 0x1fff; - var ah2 = a2 >>> 13; - var a3 = a[3] | 0; - var al3 = a3 & 0x1fff; - var ah3 = a3 >>> 13; - var a4 = a[4] | 0; - var al4 = a4 & 0x1fff; - var ah4 = a4 >>> 13; - var a5 = a[5] | 0; - var al5 = a5 & 0x1fff; - var ah5 = a5 >>> 13; - var a6 = a[6] | 0; - var al6 = a6 & 0x1fff; - var ah6 = a6 >>> 13; - var a7 = a[7] | 0; - var al7 = a7 & 0x1fff; - var ah7 = a7 >>> 13; - var a8 = a[8] | 0; - var al8 = a8 & 0x1fff; - var ah8 = a8 >>> 13; - var a9 = a[9] | 0; - var al9 = a9 & 0x1fff; - var ah9 = a9 >>> 13; - var b0 = b[0] | 0; - var bl0 = b0 & 0x1fff; - var bh0 = b0 >>> 13; - var b1 = b[1] | 0; - var bl1 = b1 & 0x1fff; - var bh1 = b1 >>> 13; - var b2 = b[2] | 0; - var bl2 = b2 & 0x1fff; - var bh2 = b2 >>> 13; - var b3 = b[3] | 0; - var bl3 = b3 & 0x1fff; - var bh3 = b3 >>> 13; - var b4 = b[4] | 0; - var bl4 = b4 & 0x1fff; - var bh4 = b4 >>> 13; - var b5 = b[5] | 0; - var bl5 = b5 & 0x1fff; - var bh5 = b5 >>> 13; - var b6 = b[6] | 0; - var bl6 = b6 & 0x1fff; - var bh6 = b6 >>> 13; - var b7 = b[7] | 0; - var bl7 = b7 & 0x1fff; - var bh7 = b7 >>> 13; - var b8 = b[8] | 0; - var bl8 = b8 & 0x1fff; - var bh8 = b8 >>> 13; - var b9 = b[9] | 0; - var bl9 = b9 & 0x1fff; - var bh9 = b9 >>> 13; - - out.negative = self.negative ^ num.negative; - out.length = 19; - /* k = 0 */ - lo = Math.imul(al0, bl0); - mid = Math.imul(al0, bh0); - mid = (mid + Math.imul(ah0, bl0)) | 0; - hi = Math.imul(ah0, bh0); - var w0 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0; - c = (((hi + (mid >>> 13)) | 0) + (w0 >>> 26)) | 0; - w0 &= 0x3ffffff; - /* k = 1 */ - lo = Math.imul(al1, bl0); - mid = Math.imul(al1, bh0); - mid = (mid + Math.imul(ah1, bl0)) | 0; - hi = Math.imul(ah1, bh0); - lo = (lo + Math.imul(al0, bl1)) | 0; - mid = (mid + Math.imul(al0, bh1)) | 0; - mid = (mid + Math.imul(ah0, bl1)) | 0; - hi = (hi + Math.imul(ah0, bh1)) | 0; - var w1 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0; - c = (((hi + (mid >>> 13)) | 0) + (w1 >>> 26)) | 0; - w1 &= 0x3ffffff; - /* k = 2 */ - lo = Math.imul(al2, bl0); - mid = Math.imul(al2, bh0); - mid = (mid + Math.imul(ah2, bl0)) | 0; - hi = Math.imul(ah2, bh0); - lo = (lo + Math.imul(al1, bl1)) | 0; - mid = (mid + Math.imul(al1, bh1)) | 0; - mid = (mid + Math.imul(ah1, bl1)) | 0; - hi = (hi + Math.imul(ah1, bh1)) | 0; - lo = (lo + Math.imul(al0, bl2)) | 0; - mid = (mid + Math.imul(al0, bh2)) | 0; - mid = (mid + Math.imul(ah0, bl2)) | 0; - hi = (hi + Math.imul(ah0, bh2)) | 0; - var w2 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0; - c = (((hi + (mid >>> 13)) | 0) + (w2 >>> 26)) | 0; - w2 &= 0x3ffffff; - /* k = 3 */ - lo = Math.imul(al3, bl0); - mid = Math.imul(al3, bh0); - mid = (mid + Math.imul(ah3, bl0)) | 0; - hi = Math.imul(ah3, bh0); - lo = (lo + Math.imul(al2, bl1)) | 0; - mid = (mid + Math.imul(al2, bh1)) | 0; - mid = (mid + Math.imul(ah2, bl1)) | 0; - hi = (hi + Math.imul(ah2, bh1)) | 0; - lo = (lo + Math.imul(al1, bl2)) | 0; - mid = (mid + Math.imul(al1, bh2)) | 0; - mid = (mid + Math.imul(ah1, bl2)) | 0; - hi = (hi + Math.imul(ah1, bh2)) | 0; - lo = (lo + Math.imul(al0, bl3)) | 0; - mid = (mid + Math.imul(al0, bh3)) | 0; - mid = (mid + Math.imul(ah0, bl3)) | 0; - hi = (hi + Math.imul(ah0, bh3)) | 0; - var w3 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0; - c = (((hi + (mid >>> 13)) | 0) + (w3 >>> 26)) | 0; - w3 &= 0x3ffffff; - /* k = 4 */ - lo = Math.imul(al4, bl0); - mid = Math.imul(al4, bh0); - mid = (mid + Math.imul(ah4, bl0)) | 0; - hi = Math.imul(ah4, bh0); - lo = (lo + Math.imul(al3, bl1)) | 0; - mid = (mid + Math.imul(al3, bh1)) | 0; - mid = (mid + Math.imul(ah3, bl1)) | 0; - hi = (hi + Math.imul(ah3, bh1)) | 0; - lo = (lo + Math.imul(al2, bl2)) | 0; - mid = (mid + Math.imul(al2, bh2)) | 0; - mid = (mid + Math.imul(ah2, bl2)) | 0; - hi = (hi + Math.imul(ah2, bh2)) | 0; - lo = (lo + Math.imul(al1, bl3)) | 0; - mid = (mid + Math.imul(al1, bh3)) | 0; - mid = (mid + Math.imul(ah1, bl3)) | 0; - hi = (hi + Math.imul(ah1, bh3)) | 0; - lo = (lo + Math.imul(al0, bl4)) | 0; - mid = (mid + Math.imul(al0, bh4)) | 0; - mid = (mid + Math.imul(ah0, bl4)) | 0; - hi = (hi + Math.imul(ah0, bh4)) | 0; - var w4 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0; - c = (((hi + (mid >>> 13)) | 0) + (w4 >>> 26)) | 0; - w4 &= 0x3ffffff; - /* k = 5 */ - lo = Math.imul(al5, bl0); - mid = Math.imul(al5, bh0); - mid = (mid + Math.imul(ah5, bl0)) | 0; - hi = Math.imul(ah5, bh0); - lo = (lo + Math.imul(al4, bl1)) | 0; - mid = (mid + Math.imul(al4, bh1)) | 0; - mid = (mid + Math.imul(ah4, bl1)) | 0; - hi = (hi + Math.imul(ah4, bh1)) | 0; - lo = (lo + Math.imul(al3, bl2)) | 0; - mid = (mid + Math.imul(al3, bh2)) | 0; - mid = (mid + Math.imul(ah3, bl2)) | 0; - hi = (hi + Math.imul(ah3, bh2)) | 0; - lo = (lo + Math.imul(al2, bl3)) | 0; - mid = (mid + Math.imul(al2, bh3)) | 0; - mid = (mid + Math.imul(ah2, bl3)) | 0; - hi = (hi + Math.imul(ah2, bh3)) | 0; - lo = (lo + Math.imul(al1, bl4)) | 0; - mid = (mid + Math.imul(al1, bh4)) | 0; - mid = (mid + Math.imul(ah1, bl4)) | 0; - hi = (hi + Math.imul(ah1, bh4)) | 0; - lo = (lo + Math.imul(al0, bl5)) | 0; - mid = (mid + Math.imul(al0, bh5)) | 0; - mid = (mid + Math.imul(ah0, bl5)) | 0; - hi = (hi + Math.imul(ah0, bh5)) | 0; - var w5 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0; - c = (((hi + (mid >>> 13)) | 0) + (w5 >>> 26)) | 0; - w5 &= 0x3ffffff; - /* k = 6 */ - lo = Math.imul(al6, bl0); - mid = Math.imul(al6, bh0); - mid = (mid + Math.imul(ah6, bl0)) | 0; - hi = Math.imul(ah6, bh0); - lo = (lo + Math.imul(al5, bl1)) | 0; - mid = (mid + Math.imul(al5, bh1)) | 0; - mid = (mid + Math.imul(ah5, bl1)) | 0; - hi = (hi + Math.imul(ah5, bh1)) | 0; - lo = (lo + Math.imul(al4, bl2)) | 0; - mid = (mid + Math.imul(al4, bh2)) | 0; - mid = (mid + Math.imul(ah4, bl2)) | 0; - hi = (hi + Math.imul(ah4, bh2)) | 0; - lo = (lo + Math.imul(al3, bl3)) | 0; - mid = (mid + Math.imul(al3, bh3)) | 0; - mid = (mid + Math.imul(ah3, bl3)) | 0; - hi = (hi + Math.imul(ah3, bh3)) | 0; - lo = (lo + Math.imul(al2, bl4)) | 0; - mid = (mid + Math.imul(al2, bh4)) | 0; - mid = (mid + Math.imul(ah2, bl4)) | 0; - hi = (hi + Math.imul(ah2, bh4)) | 0; - lo = (lo + Math.imul(al1, bl5)) | 0; - mid = (mid + Math.imul(al1, bh5)) | 0; - mid = (mid + Math.imul(ah1, bl5)) | 0; - hi = (hi + Math.imul(ah1, bh5)) | 0; - lo = (lo + Math.imul(al0, bl6)) | 0; - mid = (mid + Math.imul(al0, bh6)) | 0; - mid = (mid + Math.imul(ah0, bl6)) | 0; - hi = (hi + Math.imul(ah0, bh6)) | 0; - var w6 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0; - c = (((hi + (mid >>> 13)) | 0) + (w6 >>> 26)) | 0; - w6 &= 0x3ffffff; - /* k = 7 */ - lo = Math.imul(al7, bl0); - mid = Math.imul(al7, bh0); - mid = (mid + Math.imul(ah7, bl0)) | 0; - hi = Math.imul(ah7, bh0); - lo = (lo + Math.imul(al6, bl1)) | 0; - mid = (mid + Math.imul(al6, bh1)) | 0; - mid = (mid + Math.imul(ah6, bl1)) | 0; - hi = (hi + Math.imul(ah6, bh1)) | 0; - lo = (lo + Math.imul(al5, bl2)) | 0; - mid = (mid + Math.imul(al5, bh2)) | 0; - mid = (mid + Math.imul(ah5, bl2)) | 0; - hi = (hi + Math.imul(ah5, bh2)) | 0; - lo = (lo + Math.imul(al4, bl3)) | 0; - mid = (mid + Math.imul(al4, bh3)) | 0; - mid = (mid + Math.imul(ah4, bl3)) | 0; - hi = (hi + Math.imul(ah4, bh3)) | 0; - lo = (lo + Math.imul(al3, bl4)) | 0; - mid = (mid + Math.imul(al3, bh4)) | 0; - mid = (mid + Math.imul(ah3, bl4)) | 0; - hi = (hi + Math.imul(ah3, bh4)) | 0; - lo = (lo + Math.imul(al2, bl5)) | 0; - mid = (mid + Math.imul(al2, bh5)) | 0; - mid = (mid + Math.imul(ah2, bl5)) | 0; - hi = (hi + Math.imul(ah2, bh5)) | 0; - lo = (lo + Math.imul(al1, bl6)) | 0; - mid = (mid + Math.imul(al1, bh6)) | 0; - mid = (mid + Math.imul(ah1, bl6)) | 0; - hi = (hi + Math.imul(ah1, bh6)) | 0; - lo = (lo + Math.imul(al0, bl7)) | 0; - mid = (mid + Math.imul(al0, bh7)) | 0; - mid = (mid + Math.imul(ah0, bl7)) | 0; - hi = (hi + Math.imul(ah0, bh7)) | 0; - var w7 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0; - c = (((hi + (mid >>> 13)) | 0) + (w7 >>> 26)) | 0; - w7 &= 0x3ffffff; - /* k = 8 */ - lo = Math.imul(al8, bl0); - mid = Math.imul(al8, bh0); - mid = (mid + Math.imul(ah8, bl0)) | 0; - hi = Math.imul(ah8, bh0); - lo = (lo + Math.imul(al7, bl1)) | 0; - mid = (mid + Math.imul(al7, bh1)) | 0; - mid = (mid + Math.imul(ah7, bl1)) | 0; - hi = (hi + Math.imul(ah7, bh1)) | 0; - lo = (lo + Math.imul(al6, bl2)) | 0; - mid = (mid + Math.imul(al6, bh2)) | 0; - mid = (mid + Math.imul(ah6, bl2)) | 0; - hi = (hi + Math.imul(ah6, bh2)) | 0; - lo = (lo + Math.imul(al5, bl3)) | 0; - mid = (mid + Math.imul(al5, bh3)) | 0; - mid = (mid + Math.imul(ah5, bl3)) | 0; - hi = (hi + Math.imul(ah5, bh3)) | 0; - lo = (lo + Math.imul(al4, bl4)) | 0; - mid = (mid + Math.imul(al4, bh4)) | 0; - mid = (mid + Math.imul(ah4, bl4)) | 0; - hi = (hi + Math.imul(ah4, bh4)) | 0; - lo = (lo + Math.imul(al3, bl5)) | 0; - mid = (mid + Math.imul(al3, bh5)) | 0; - mid = (mid + Math.imul(ah3, bl5)) | 0; - hi = (hi + Math.imul(ah3, bh5)) | 0; - lo = (lo + Math.imul(al2, bl6)) | 0; - mid = (mid + Math.imul(al2, bh6)) | 0; - mid = (mid + Math.imul(ah2, bl6)) | 0; - hi = (hi + Math.imul(ah2, bh6)) | 0; - lo = (lo + Math.imul(al1, bl7)) | 0; - mid = (mid + Math.imul(al1, bh7)) | 0; - mid = (mid + Math.imul(ah1, bl7)) | 0; - hi = (hi + Math.imul(ah1, bh7)) | 0; - lo = (lo + Math.imul(al0, bl8)) | 0; - mid = (mid + Math.imul(al0, bh8)) | 0; - mid = (mid + Math.imul(ah0, bl8)) | 0; - hi = (hi + Math.imul(ah0, bh8)) | 0; - var w8 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0; - c = (((hi + (mid >>> 13)) | 0) + (w8 >>> 26)) | 0; - w8 &= 0x3ffffff; - /* k = 9 */ - lo = Math.imul(al9, bl0); - mid = Math.imul(al9, bh0); - mid = (mid + Math.imul(ah9, bl0)) | 0; - hi = Math.imul(ah9, bh0); - lo = (lo + Math.imul(al8, bl1)) | 0; - mid = (mid + Math.imul(al8, bh1)) | 0; - mid = (mid + Math.imul(ah8, bl1)) | 0; - hi = (hi + Math.imul(ah8, bh1)) | 0; - lo = (lo + Math.imul(al7, bl2)) | 0; - mid = (mid + Math.imul(al7, bh2)) | 0; - mid = (mid + Math.imul(ah7, bl2)) | 0; - hi = (hi + Math.imul(ah7, bh2)) | 0; - lo = (lo + Math.imul(al6, bl3)) | 0; - mid = (mid + Math.imul(al6, bh3)) | 0; - mid = (mid + Math.imul(ah6, bl3)) | 0; - hi = (hi + Math.imul(ah6, bh3)) | 0; - lo = (lo + Math.imul(al5, bl4)) | 0; - mid = (mid + Math.imul(al5, bh4)) | 0; - mid = (mid + Math.imul(ah5, bl4)) | 0; - hi = (hi + Math.imul(ah5, bh4)) | 0; - lo = (lo + Math.imul(al4, bl5)) | 0; - mid = (mid + Math.imul(al4, bh5)) | 0; - mid = (mid + Math.imul(ah4, bl5)) | 0; - hi = (hi + Math.imul(ah4, bh5)) | 0; - lo = (lo + Math.imul(al3, bl6)) | 0; - mid = (mid + Math.imul(al3, bh6)) | 0; - mid = (mid + Math.imul(ah3, bl6)) | 0; - hi = (hi + Math.imul(ah3, bh6)) | 0; - lo = (lo + Math.imul(al2, bl7)) | 0; - mid = (mid + Math.imul(al2, bh7)) | 0; - mid = (mid + Math.imul(ah2, bl7)) | 0; - hi = (hi + Math.imul(ah2, bh7)) | 0; - lo = (lo + Math.imul(al1, bl8)) | 0; - mid = (mid + Math.imul(al1, bh8)) | 0; - mid = (mid + Math.imul(ah1, bl8)) | 0; - hi = (hi + Math.imul(ah1, bh8)) | 0; - lo = (lo + Math.imul(al0, bl9)) | 0; - mid = (mid + Math.imul(al0, bh9)) | 0; - mid = (mid + Math.imul(ah0, bl9)) | 0; - hi = (hi + Math.imul(ah0, bh9)) | 0; - var w9 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0; - c = (((hi + (mid >>> 13)) | 0) + (w9 >>> 26)) | 0; - w9 &= 0x3ffffff; - /* k = 10 */ - lo = Math.imul(al9, bl1); - mid = Math.imul(al9, bh1); - mid = (mid + Math.imul(ah9, bl1)) | 0; - hi = Math.imul(ah9, bh1); - lo = (lo + Math.imul(al8, bl2)) | 0; - mid = (mid + Math.imul(al8, bh2)) | 0; - mid = (mid + Math.imul(ah8, bl2)) | 0; - hi = (hi + Math.imul(ah8, bh2)) | 0; - lo = (lo + Math.imul(al7, bl3)) | 0; - mid = (mid + Math.imul(al7, bh3)) | 0; - mid = (mid + Math.imul(ah7, bl3)) | 0; - hi = (hi + Math.imul(ah7, bh3)) | 0; - lo = (lo + Math.imul(al6, bl4)) | 0; - mid = (mid + Math.imul(al6, bh4)) | 0; - mid = (mid + Math.imul(ah6, bl4)) | 0; - hi = (hi + Math.imul(ah6, bh4)) | 0; - lo = (lo + Math.imul(al5, bl5)) | 0; - mid = (mid + Math.imul(al5, bh5)) | 0; - mid = (mid + Math.imul(ah5, bl5)) | 0; - hi = (hi + Math.imul(ah5, bh5)) | 0; - lo = (lo + Math.imul(al4, bl6)) | 0; - mid = (mid + Math.imul(al4, bh6)) | 0; - mid = (mid + Math.imul(ah4, bl6)) | 0; - hi = (hi + Math.imul(ah4, bh6)) | 0; - lo = (lo + Math.imul(al3, bl7)) | 0; - mid = (mid + Math.imul(al3, bh7)) | 0; - mid = (mid + Math.imul(ah3, bl7)) | 0; - hi = (hi + Math.imul(ah3, bh7)) | 0; - lo = (lo + Math.imul(al2, bl8)) | 0; - mid = (mid + Math.imul(al2, bh8)) | 0; - mid = (mid + Math.imul(ah2, bl8)) | 0; - hi = (hi + Math.imul(ah2, bh8)) | 0; - lo = (lo + Math.imul(al1, bl9)) | 0; - mid = (mid + Math.imul(al1, bh9)) | 0; - mid = (mid + Math.imul(ah1, bl9)) | 0; - hi = (hi + Math.imul(ah1, bh9)) | 0; - var w10 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0; - c = (((hi + (mid >>> 13)) | 0) + (w10 >>> 26)) | 0; - w10 &= 0x3ffffff; - /* k = 11 */ - lo = Math.imul(al9, bl2); - mid = Math.imul(al9, bh2); - mid = (mid + Math.imul(ah9, bl2)) | 0; - hi = Math.imul(ah9, bh2); - lo = (lo + Math.imul(al8, bl3)) | 0; - mid = (mid + Math.imul(al8, bh3)) | 0; - mid = (mid + Math.imul(ah8, bl3)) | 0; - hi = (hi + Math.imul(ah8, bh3)) | 0; - lo = (lo + Math.imul(al7, bl4)) | 0; - mid = (mid + Math.imul(al7, bh4)) | 0; - mid = (mid + Math.imul(ah7, bl4)) | 0; - hi = (hi + Math.imul(ah7, bh4)) | 0; - lo = (lo + Math.imul(al6, bl5)) | 0; - mid = (mid + Math.imul(al6, bh5)) | 0; - mid = (mid + Math.imul(ah6, bl5)) | 0; - hi = (hi + Math.imul(ah6, bh5)) | 0; - lo = (lo + Math.imul(al5, bl6)) | 0; - mid = (mid + Math.imul(al5, bh6)) | 0; - mid = (mid + Math.imul(ah5, bl6)) | 0; - hi = (hi + Math.imul(ah5, bh6)) | 0; - lo = (lo + Math.imul(al4, bl7)) | 0; - mid = (mid + Math.imul(al4, bh7)) | 0; - mid = (mid + Math.imul(ah4, bl7)) | 0; - hi = (hi + Math.imul(ah4, bh7)) | 0; - lo = (lo + Math.imul(al3, bl8)) | 0; - mid = (mid + Math.imul(al3, bh8)) | 0; - mid = (mid + Math.imul(ah3, bl8)) | 0; - hi = (hi + Math.imul(ah3, bh8)) | 0; - lo = (lo + Math.imul(al2, bl9)) | 0; - mid = (mid + Math.imul(al2, bh9)) | 0; - mid = (mid + Math.imul(ah2, bl9)) | 0; - hi = (hi + Math.imul(ah2, bh9)) | 0; - var w11 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0; - c = (((hi + (mid >>> 13)) | 0) + (w11 >>> 26)) | 0; - w11 &= 0x3ffffff; - /* k = 12 */ - lo = Math.imul(al9, bl3); - mid = Math.imul(al9, bh3); - mid = (mid + Math.imul(ah9, bl3)) | 0; - hi = Math.imul(ah9, bh3); - lo = (lo + Math.imul(al8, bl4)) | 0; - mid = (mid + Math.imul(al8, bh4)) | 0; - mid = (mid + Math.imul(ah8, bl4)) | 0; - hi = (hi + Math.imul(ah8, bh4)) | 0; - lo = (lo + Math.imul(al7, bl5)) | 0; - mid = (mid + Math.imul(al7, bh5)) | 0; - mid = (mid + Math.imul(ah7, bl5)) | 0; - hi = (hi + Math.imul(ah7, bh5)) | 0; - lo = (lo + Math.imul(al6, bl6)) | 0; - mid = (mid + Math.imul(al6, bh6)) | 0; - mid = (mid + Math.imul(ah6, bl6)) | 0; - hi = (hi + Math.imul(ah6, bh6)) | 0; - lo = (lo + Math.imul(al5, bl7)) | 0; - mid = (mid + Math.imul(al5, bh7)) | 0; - mid = (mid + Math.imul(ah5, bl7)) | 0; - hi = (hi + Math.imul(ah5, bh7)) | 0; - lo = (lo + Math.imul(al4, bl8)) | 0; - mid = (mid + Math.imul(al4, bh8)) | 0; - mid = (mid + Math.imul(ah4, bl8)) | 0; - hi = (hi + Math.imul(ah4, bh8)) | 0; - lo = (lo + Math.imul(al3, bl9)) | 0; - mid = (mid + Math.imul(al3, bh9)) | 0; - mid = (mid + Math.imul(ah3, bl9)) | 0; - hi = (hi + Math.imul(ah3, bh9)) | 0; - var w12 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0; - c = (((hi + (mid >>> 13)) | 0) + (w12 >>> 26)) | 0; - w12 &= 0x3ffffff; - /* k = 13 */ - lo = Math.imul(al9, bl4); - mid = Math.imul(al9, bh4); - mid = (mid + Math.imul(ah9, bl4)) | 0; - hi = Math.imul(ah9, bh4); - lo = (lo + Math.imul(al8, bl5)) | 0; - mid = (mid + Math.imul(al8, bh5)) | 0; - mid = (mid + Math.imul(ah8, bl5)) | 0; - hi = (hi + Math.imul(ah8, bh5)) | 0; - lo = (lo + Math.imul(al7, bl6)) | 0; - mid = (mid + Math.imul(al7, bh6)) | 0; - mid = (mid + Math.imul(ah7, bl6)) | 0; - hi = (hi + Math.imul(ah7, bh6)) | 0; - lo = (lo + Math.imul(al6, bl7)) | 0; - mid = (mid + Math.imul(al6, bh7)) | 0; - mid = (mid + Math.imul(ah6, bl7)) | 0; - hi = (hi + Math.imul(ah6, bh7)) | 0; - lo = (lo + Math.imul(al5, bl8)) | 0; - mid = (mid + Math.imul(al5, bh8)) | 0; - mid = (mid + Math.imul(ah5, bl8)) | 0; - hi = (hi + Math.imul(ah5, bh8)) | 0; - lo = (lo + Math.imul(al4, bl9)) | 0; - mid = (mid + Math.imul(al4, bh9)) | 0; - mid = (mid + Math.imul(ah4, bl9)) | 0; - hi = (hi + Math.imul(ah4, bh9)) | 0; - var w13 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0; - c = (((hi + (mid >>> 13)) | 0) + (w13 >>> 26)) | 0; - w13 &= 0x3ffffff; - /* k = 14 */ - lo = Math.imul(al9, bl5); - mid = Math.imul(al9, bh5); - mid = (mid + Math.imul(ah9, bl5)) | 0; - hi = Math.imul(ah9, bh5); - lo = (lo + Math.imul(al8, bl6)) | 0; - mid = (mid + Math.imul(al8, bh6)) | 0; - mid = (mid + Math.imul(ah8, bl6)) | 0; - hi = (hi + Math.imul(ah8, bh6)) | 0; - lo = (lo + Math.imul(al7, bl7)) | 0; - mid = (mid + Math.imul(al7, bh7)) | 0; - mid = (mid + Math.imul(ah7, bl7)) | 0; - hi = (hi + Math.imul(ah7, bh7)) | 0; - lo = (lo + Math.imul(al6, bl8)) | 0; - mid = (mid + Math.imul(al6, bh8)) | 0; - mid = (mid + Math.imul(ah6, bl8)) | 0; - hi = (hi + Math.imul(ah6, bh8)) | 0; - lo = (lo + Math.imul(al5, bl9)) | 0; - mid = (mid + Math.imul(al5, bh9)) | 0; - mid = (mid + Math.imul(ah5, bl9)) | 0; - hi = (hi + Math.imul(ah5, bh9)) | 0; - var w14 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0; - c = (((hi + (mid >>> 13)) | 0) + (w14 >>> 26)) | 0; - w14 &= 0x3ffffff; - /* k = 15 */ - lo = Math.imul(al9, bl6); - mid = Math.imul(al9, bh6); - mid = (mid + Math.imul(ah9, bl6)) | 0; - hi = Math.imul(ah9, bh6); - lo = (lo + Math.imul(al8, bl7)) | 0; - mid = (mid + Math.imul(al8, bh7)) | 0; - mid = (mid + Math.imul(ah8, bl7)) | 0; - hi = (hi + Math.imul(ah8, bh7)) | 0; - lo = (lo + Math.imul(al7, bl8)) | 0; - mid = (mid + Math.imul(al7, bh8)) | 0; - mid = (mid + Math.imul(ah7, bl8)) | 0; - hi = (hi + Math.imul(ah7, bh8)) | 0; - lo = (lo + Math.imul(al6, bl9)) | 0; - mid = (mid + Math.imul(al6, bh9)) | 0; - mid = (mid + Math.imul(ah6, bl9)) | 0; - hi = (hi + Math.imul(ah6, bh9)) | 0; - var w15 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0; - c = (((hi + (mid >>> 13)) | 0) + (w15 >>> 26)) | 0; - w15 &= 0x3ffffff; - /* k = 16 */ - lo = Math.imul(al9, bl7); - mid = Math.imul(al9, bh7); - mid = (mid + Math.imul(ah9, bl7)) | 0; - hi = Math.imul(ah9, bh7); - lo = (lo + Math.imul(al8, bl8)) | 0; - mid = (mid + Math.imul(al8, bh8)) | 0; - mid = (mid + Math.imul(ah8, bl8)) | 0; - hi = (hi + Math.imul(ah8, bh8)) | 0; - lo = (lo + Math.imul(al7, bl9)) | 0; - mid = (mid + Math.imul(al7, bh9)) | 0; - mid = (mid + Math.imul(ah7, bl9)) | 0; - hi = (hi + Math.imul(ah7, bh9)) | 0; - var w16 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0; - c = (((hi + (mid >>> 13)) | 0) + (w16 >>> 26)) | 0; - w16 &= 0x3ffffff; - /* k = 17 */ - lo = Math.imul(al9, bl8); - mid = Math.imul(al9, bh8); - mid = (mid + Math.imul(ah9, bl8)) | 0; - hi = Math.imul(ah9, bh8); - lo = (lo + Math.imul(al8, bl9)) | 0; - mid = (mid + Math.imul(al8, bh9)) | 0; - mid = (mid + Math.imul(ah8, bl9)) | 0; - hi = (hi + Math.imul(ah8, bh9)) | 0; - var w17 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0; - c = (((hi + (mid >>> 13)) | 0) + (w17 >>> 26)) | 0; - w17 &= 0x3ffffff; - /* k = 18 */ - lo = Math.imul(al9, bl9); - mid = Math.imul(al9, bh9); - mid = (mid + Math.imul(ah9, bl9)) | 0; - hi = Math.imul(ah9, bh9); - var w18 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0; - c = (((hi + (mid >>> 13)) | 0) + (w18 >>> 26)) | 0; - w18 &= 0x3ffffff; - o[0] = w0; - o[1] = w1; - o[2] = w2; - o[3] = w3; - o[4] = w4; - o[5] = w5; - o[6] = w6; - o[7] = w7; - o[8] = w8; - o[9] = w9; - o[10] = w10; - o[11] = w11; - o[12] = w12; - o[13] = w13; - o[14] = w14; - o[15] = w15; - o[16] = w16; - o[17] = w17; - o[18] = w18; - if (c !== 0) { - o[19] = c; - out.length++; - } - return out; - }; - - // Polyfill comb - if (!Math.imul) { - comb10MulTo = smallMulTo; - } - - function bigMulTo (self, num, out) { - out.negative = num.negative ^ self.negative; - out.length = self.length + num.length; - - var carry = 0; - var hncarry = 0; - for (var k = 0; k < out.length - 1; k++) { - // Sum all words with the same `i + j = k` and accumulate `ncarry`, - // note that ncarry could be >= 0x3ffffff - var ncarry = hncarry; - hncarry = 0; - var rword = carry & 0x3ffffff; - var maxJ = Math.min(k, num.length - 1); - for (var j = Math.max(0, k - self.length + 1); j <= maxJ; j++) { - var i = k - j; - var a = self.words[i] | 0; - var b = num.words[j] | 0; - var r = a * b; - - var lo = r & 0x3ffffff; - ncarry = (ncarry + ((r / 0x4000000) | 0)) | 0; - lo = (lo + rword) | 0; - rword = lo & 0x3ffffff; - ncarry = (ncarry + (lo >>> 26)) | 0; - - hncarry += ncarry >>> 26; - ncarry &= 0x3ffffff; - } - out.words[k] = rword; - carry = ncarry; - ncarry = hncarry; - } - if (carry !== 0) { - out.words[k] = carry; - } else { - out.length--; - } - - return out.strip(); - } - - function jumboMulTo (self, num, out) { - var fftm = new FFTM(); - return fftm.mulp(self, num, out); - } - - BN.prototype.mulTo = function mulTo (num, out) { - var res; - var len = this.length + num.length; - if (this.length === 10 && num.length === 10) { - res = comb10MulTo(this, num, out); - } else if (len < 63) { - res = smallMulTo(this, num, out); - } else if (len < 1024) { - res = bigMulTo(this, num, out); - } else { - res = jumboMulTo(this, num, out); - } - - return res; - }; - - // Cooley-Tukey algorithm for FFT - // slightly revisited to rely on looping instead of recursion - - function FFTM (x, y) { - this.x = x; - this.y = y; - } - - FFTM.prototype.makeRBT = function makeRBT (N) { - var t = new Array(N); - var l = BN.prototype._countBits(N) - 1; - for (var i = 0; i < N; i++) { - t[i] = this.revBin(i, l, N); - } - - return t; - }; - - // Returns binary-reversed representation of `x` - FFTM.prototype.revBin = function revBin (x, l, N) { - if (x === 0 || x === N - 1) return x; - - var rb = 0; - for (var i = 0; i < l; i++) { - rb |= (x & 1) << (l - i - 1); - x >>= 1; - } - - return rb; - }; - - // Performs "tweedling" phase, therefore 'emulating' - // behaviour of the recursive algorithm - FFTM.prototype.permute = function permute (rbt, rws, iws, rtws, itws, N) { - for (var i = 0; i < N; i++) { - rtws[i] = rws[rbt[i]]; - itws[i] = iws[rbt[i]]; - } - }; - - FFTM.prototype.transform = function transform (rws, iws, rtws, itws, N, rbt) { - this.permute(rbt, rws, iws, rtws, itws, N); - - for (var s = 1; s < N; s <<= 1) { - var l = s << 1; - - var rtwdf = Math.cos(2 * Math.PI / l); - var itwdf = Math.sin(2 * Math.PI / l); - - for (var p = 0; p < N; p += l) { - var rtwdf_ = rtwdf; - var itwdf_ = itwdf; - - for (var j = 0; j < s; j++) { - var re = rtws[p + j]; - var ie = itws[p + j]; - - var ro = rtws[p + j + s]; - var io = itws[p + j + s]; - - var rx = rtwdf_ * ro - itwdf_ * io; - - io = rtwdf_ * io + itwdf_ * ro; - ro = rx; - - rtws[p + j] = re + ro; - itws[p + j] = ie + io; - - rtws[p + j + s] = re - ro; - itws[p + j + s] = ie - io; - - /* jshint maxdepth : false */ - if (j !== l) { - rx = rtwdf * rtwdf_ - itwdf * itwdf_; - - itwdf_ = rtwdf * itwdf_ + itwdf * rtwdf_; - rtwdf_ = rx; - } - } - } - } - }; - - FFTM.prototype.guessLen13b = function guessLen13b (n, m) { - var N = Math.max(m, n) | 1; - var odd = N & 1; - var i = 0; - for (N = N / 2 | 0; N; N = N >>> 1) { - i++; - } - - return 1 << i + 1 + odd; - }; - - FFTM.prototype.conjugate = function conjugate (rws, iws, N) { - if (N <= 1) return; - - for (var i = 0; i < N / 2; i++) { - var t = rws[i]; - - rws[i] = rws[N - i - 1]; - rws[N - i - 1] = t; - - t = iws[i]; - - iws[i] = -iws[N - i - 1]; - iws[N - i - 1] = -t; - } - }; - - FFTM.prototype.normalize13b = function normalize13b (ws, N) { - var carry = 0; - for (var i = 0; i < N / 2; i++) { - var w = Math.round(ws[2 * i + 1] / N) * 0x2000 + - Math.round(ws[2 * i] / N) + - carry; - - ws[i] = w & 0x3ffffff; - - if (w < 0x4000000) { - carry = 0; - } else { - carry = w / 0x4000000 | 0; - } - } - - return ws; - }; - - FFTM.prototype.convert13b = function convert13b (ws, len, rws, N) { - var carry = 0; - for (var i = 0; i < len; i++) { - carry = carry + (ws[i] | 0); - - rws[2 * i] = carry & 0x1fff; carry = carry >>> 13; - rws[2 * i + 1] = carry & 0x1fff; carry = carry >>> 13; - } - - // Pad with zeroes - for (i = 2 * len; i < N; ++i) { - rws[i] = 0; - } - - assert(carry === 0); - assert((carry & ~0x1fff) === 0); - }; - - FFTM.prototype.stub = function stub (N) { - var ph = new Array(N); - for (var i = 0; i < N; i++) { - ph[i] = 0; - } - - return ph; - }; - - FFTM.prototype.mulp = function mulp (x, y, out) { - var N = 2 * this.guessLen13b(x.length, y.length); - - var rbt = this.makeRBT(N); - - var _ = this.stub(N); - - var rws = new Array(N); - var rwst = new Array(N); - var iwst = new Array(N); - - var nrws = new Array(N); - var nrwst = new Array(N); - var niwst = new Array(N); - - var rmws = out.words; - rmws.length = N; - - this.convert13b(x.words, x.length, rws, N); - this.convert13b(y.words, y.length, nrws, N); - - this.transform(rws, _, rwst, iwst, N, rbt); - this.transform(nrws, _, nrwst, niwst, N, rbt); - - for (var i = 0; i < N; i++) { - var rx = rwst[i] * nrwst[i] - iwst[i] * niwst[i]; - iwst[i] = rwst[i] * niwst[i] + iwst[i] * nrwst[i]; - rwst[i] = rx; - } - - this.conjugate(rwst, iwst, N); - this.transform(rwst, iwst, rmws, _, N, rbt); - this.conjugate(rmws, _, N); - this.normalize13b(rmws, N); - - out.negative = x.negative ^ y.negative; - out.length = x.length + y.length; - return out.strip(); - }; - - // Multiply `this` by `num` - BN.prototype.mul = function mul (num) { - var out = new BN(null); - out.words = new Array(this.length + num.length); - return this.mulTo(num, out); - }; - - // Multiply employing FFT - BN.prototype.mulf = function mulf (num) { - var out = new BN(null); - out.words = new Array(this.length + num.length); - return jumboMulTo(this, num, out); - }; - - // In-place Multiplication - BN.prototype.imul = function imul (num) { - return this.clone().mulTo(num, this); - }; - - BN.prototype.imuln = function imuln (num) { - assert(typeof num === 'number'); - assert(num < 0x4000000); - - // Carry - var carry = 0; - for (var i = 0; i < this.length; i++) { - var w = (this.words[i] | 0) * num; - var lo = (w & 0x3ffffff) + (carry & 0x3ffffff); - carry >>= 26; - carry += (w / 0x4000000) | 0; - // NOTE: lo is 27bit maximum - carry += lo >>> 26; - this.words[i] = lo & 0x3ffffff; - } - - if (carry !== 0) { - this.words[i] = carry; - this.length++; - } - - return this; - }; - - BN.prototype.muln = function muln (num) { - return this.clone().imuln(num); - }; - - // `this` * `this` - BN.prototype.sqr = function sqr () { - return this.mul(this); - }; - - // `this` * `this` in-place - BN.prototype.isqr = function isqr () { - return this.imul(this.clone()); - }; - - // Math.pow(`this`, `num`) - BN.prototype.pow = function pow (num) { - var w = toBitArray(num); - if (w.length === 0) return new BN(1); - - // Skip leading zeroes - var res = this; - for (var i = 0; i < w.length; i++, res = res.sqr()) { - if (w[i] !== 0) break; - } - - if (++i < w.length) { - for (var q = res.sqr(); i < w.length; i++, q = q.sqr()) { - if (w[i] === 0) continue; - - res = res.mul(q); - } - } - - return res; - }; - - // Shift-left in-place - BN.prototype.iushln = function iushln (bits) { - assert(typeof bits === 'number' && bits >= 0); - var r = bits % 26; - var s = (bits - r) / 26; - var carryMask = (0x3ffffff >>> (26 - r)) << (26 - r); - var i; - - if (r !== 0) { - var carry = 0; - - for (i = 0; i < this.length; i++) { - var newCarry = this.words[i] & carryMask; - var c = ((this.words[i] | 0) - newCarry) << r; - this.words[i] = c | carry; - carry = newCarry >>> (26 - r); - } - - if (carry) { - this.words[i] = carry; - this.length++; - } - } - - if (s !== 0) { - for (i = this.length - 1; i >= 0; i--) { - this.words[i + s] = this.words[i]; - } - - for (i = 0; i < s; i++) { - this.words[i] = 0; - } - - this.length += s; - } - - return this.strip(); - }; - - BN.prototype.ishln = function ishln (bits) { - // TODO(indutny): implement me - assert(this.negative === 0); - return this.iushln(bits); - }; - - // Shift-right in-place - // NOTE: `hint` is a lowest bit before trailing zeroes - // NOTE: if `extended` is present - it will be filled with destroyed bits - BN.prototype.iushrn = function iushrn (bits, hint, extended) { - assert(typeof bits === 'number' && bits >= 0); - var h; - if (hint) { - h = (hint - (hint % 26)) / 26; - } else { - h = 0; - } - - var r = bits % 26; - var s = Math.min((bits - r) / 26, this.length); - var mask = 0x3ffffff ^ ((0x3ffffff >>> r) << r); - var maskedWords = extended; - - h -= s; - h = Math.max(0, h); - - // Extended mode, copy masked part - if (maskedWords) { - for (var i = 0; i < s; i++) { - maskedWords.words[i] = this.words[i]; - } - maskedWords.length = s; - } - - if (s === 0) { - // No-op, we should not move anything at all - } else if (this.length > s) { - this.length -= s; - for (i = 0; i < this.length; i++) { - this.words[i] = this.words[i + s]; - } - } else { - this.words[0] = 0; - this.length = 1; - } - - var carry = 0; - for (i = this.length - 1; i >= 0 && (carry !== 0 || i >= h); i--) { - var word = this.words[i] | 0; - this.words[i] = (carry << (26 - r)) | (word >>> r); - carry = word & mask; - } - - // Push carried bits as a mask - if (maskedWords && carry !== 0) { - maskedWords.words[maskedWords.length++] = carry; - } - - if (this.length === 0) { - this.words[0] = 0; - this.length = 1; - } - - return this.strip(); - }; - - BN.prototype.ishrn = function ishrn (bits, hint, extended) { - // TODO(indutny): implement me - assert(this.negative === 0); - return this.iushrn(bits, hint, extended); - }; - - // Shift-left - BN.prototype.shln = function shln (bits) { - return this.clone().ishln(bits); - }; - - BN.prototype.ushln = function ushln (bits) { - return this.clone().iushln(bits); - }; - - // Shift-right - BN.prototype.shrn = function shrn (bits) { - return this.clone().ishrn(bits); - }; - - BN.prototype.ushrn = function ushrn (bits) { - return this.clone().iushrn(bits); - }; - - // Test if n bit is set - BN.prototype.testn = function testn (bit) { - assert(typeof bit === 'number' && bit >= 0); - var r = bit % 26; - var s = (bit - r) / 26; - var q = 1 << r; - - // Fast case: bit is much higher than all existing words - if (this.length <= s) return false; - - // Check bit and return - var w = this.words[s]; - - return !!(w & q); - }; - - // Return only lowers bits of number (in-place) - BN.prototype.imaskn = function imaskn (bits) { - assert(typeof bits === 'number' && bits >= 0); - var r = bits % 26; - var s = (bits - r) / 26; - - assert(this.negative === 0, 'imaskn works only with positive numbers'); - - if (this.length <= s) { - return this; - } - - if (r !== 0) { - s++; - } - this.length = Math.min(s, this.length); - - if (r !== 0) { - var mask = 0x3ffffff ^ ((0x3ffffff >>> r) << r); - this.words[this.length - 1] &= mask; - } - - return this.strip(); - }; - - // Return only lowers bits of number - BN.prototype.maskn = function maskn (bits) { - return this.clone().imaskn(bits); - }; - - // Add plain number `num` to `this` - BN.prototype.iaddn = function iaddn (num) { - assert(typeof num === 'number'); - assert(num < 0x4000000); - if (num < 0) return this.isubn(-num); - - // Possible sign change - if (this.negative !== 0) { - if (this.length === 1 && (this.words[0] | 0) < num) { - this.words[0] = num - (this.words[0] | 0); - this.negative = 0; - return this; - } - - this.negative = 0; - this.isubn(num); - this.negative = 1; - return this; - } - - // Add without checks - return this._iaddn(num); - }; - - BN.prototype._iaddn = function _iaddn (num) { - this.words[0] += num; - - // Carry - for (var i = 0; i < this.length && this.words[i] >= 0x4000000; i++) { - this.words[i] -= 0x4000000; - if (i === this.length - 1) { - this.words[i + 1] = 1; - } else { - this.words[i + 1]++; - } - } - this.length = Math.max(this.length, i + 1); - - return this; - }; - - // Subtract plain number `num` from `this` - BN.prototype.isubn = function isubn (num) { - assert(typeof num === 'number'); - assert(num < 0x4000000); - if (num < 0) return this.iaddn(-num); - - if (this.negative !== 0) { - this.negative = 0; - this.iaddn(num); - this.negative = 1; - return this; - } - - this.words[0] -= num; - - if (this.length === 1 && this.words[0] < 0) { - this.words[0] = -this.words[0]; - this.negative = 1; - } else { - // Carry - for (var i = 0; i < this.length && this.words[i] < 0; i++) { - this.words[i] += 0x4000000; - this.words[i + 1] -= 1; - } - } - - return this.strip(); - }; - - BN.prototype.addn = function addn (num) { - return this.clone().iaddn(num); - }; - - BN.prototype.subn = function subn (num) { - return this.clone().isubn(num); - }; - - BN.prototype.iabs = function iabs () { - this.negative = 0; - - return this; - }; - - BN.prototype.abs = function abs () { - return this.clone().iabs(); - }; - - BN.prototype._ishlnsubmul = function _ishlnsubmul (num, mul, shift) { - var len = num.length + shift; - var i; - - this._expand(len); - - var w; - var carry = 0; - for (i = 0; i < num.length; i++) { - w = (this.words[i + shift] | 0) + carry; - var right = (num.words[i] | 0) * mul; - w -= right & 0x3ffffff; - carry = (w >> 26) - ((right / 0x4000000) | 0); - this.words[i + shift] = w & 0x3ffffff; - } - for (; i < this.length - shift; i++) { - w = (this.words[i + shift] | 0) + carry; - carry = w >> 26; - this.words[i + shift] = w & 0x3ffffff; - } - - if (carry === 0) return this.strip(); - - // Subtraction overflow - assert(carry === -1); - carry = 0; - for (i = 0; i < this.length; i++) { - w = -(this.words[i] | 0) + carry; - carry = w >> 26; - this.words[i] = w & 0x3ffffff; - } - this.negative = 1; - - return this.strip(); - }; - - BN.prototype._wordDiv = function _wordDiv (num, mode) { - var shift = this.length - num.length; - - var a = this.clone(); - var b = num; - - // Normalize - var bhi = b.words[b.length - 1] | 0; - var bhiBits = this._countBits(bhi); - shift = 26 - bhiBits; - if (shift !== 0) { - b = b.ushln(shift); - a.iushln(shift); - bhi = b.words[b.length - 1] | 0; - } - - // Initialize quotient - var m = a.length - b.length; - var q; - - if (mode !== 'mod') { - q = new BN(null); - q.length = m + 1; - q.words = new Array(q.length); - for (var i = 0; i < q.length; i++) { - q.words[i] = 0; - } - } - - var diff = a.clone()._ishlnsubmul(b, 1, m); - if (diff.negative === 0) { - a = diff; - if (q) { - q.words[m] = 1; - } - } - - for (var j = m - 1; j >= 0; j--) { - var qj = (a.words[b.length + j] | 0) * 0x4000000 + - (a.words[b.length + j - 1] | 0); - - // NOTE: (qj / bhi) is (0x3ffffff * 0x4000000 + 0x3ffffff) / 0x2000000 max - // (0x7ffffff) - qj = Math.min((qj / bhi) | 0, 0x3ffffff); - - a._ishlnsubmul(b, qj, j); - while (a.negative !== 0) { - qj--; - a.negative = 0; - a._ishlnsubmul(b, 1, j); - if (!a.isZero()) { - a.negative ^= 1; - } - } - if (q) { - q.words[j] = qj; - } - } - if (q) { - q.strip(); - } - a.strip(); - - // Denormalize - if (mode !== 'div' && shift !== 0) { - a.iushrn(shift); - } - - return { - div: q || null, - mod: a - }; - }; - - // NOTE: 1) `mode` can be set to `mod` to request mod only, - // to `div` to request div only, or be absent to - // request both div & mod - // 2) `positive` is true if unsigned mod is requested - BN.prototype.divmod = function divmod (num, mode, positive) { - assert(!num.isZero()); - - if (this.isZero()) { - return { - div: new BN(0), - mod: new BN(0) - }; - } - - var div, mod, res; - if (this.negative !== 0 && num.negative === 0) { - res = this.neg().divmod(num, mode); - - if (mode !== 'mod') { - div = res.div.neg(); - } - - if (mode !== 'div') { - mod = res.mod.neg(); - if (positive && mod.negative !== 0) { - mod.iadd(num); - } - } - - return { - div: div, - mod: mod - }; - } - - if (this.negative === 0 && num.negative !== 0) { - res = this.divmod(num.neg(), mode); - - if (mode !== 'mod') { - div = res.div.neg(); - } - - return { - div: div, - mod: res.mod - }; - } - - if ((this.negative & num.negative) !== 0) { - res = this.neg().divmod(num.neg(), mode); - - if (mode !== 'div') { - mod = res.mod.neg(); - if (positive && mod.negative !== 0) { - mod.isub(num); - } - } - - return { - div: res.div, - mod: mod - }; - } - - // Both numbers are positive at this point - - // Strip both numbers to approximate shift value - if (num.length > this.length || this.cmp(num) < 0) { - return { - div: new BN(0), - mod: this - }; - } - - // Very short reduction - if (num.length === 1) { - if (mode === 'div') { - return { - div: this.divn(num.words[0]), - mod: null - }; - } - - if (mode === 'mod') { - return { - div: null, - mod: new BN(this.modn(num.words[0])) - }; - } - - return { - div: this.divn(num.words[0]), - mod: new BN(this.modn(num.words[0])) - }; - } - - return this._wordDiv(num, mode); - }; - - // Find `this` / `num` - BN.prototype.div = function div (num) { - return this.divmod(num, 'div', false).div; - }; - - // Find `this` % `num` - BN.prototype.mod = function mod (num) { - return this.divmod(num, 'mod', false).mod; - }; - - BN.prototype.umod = function umod (num) { - return this.divmod(num, 'mod', true).mod; - }; - - // Find Round(`this` / `num`) - BN.prototype.divRound = function divRound (num) { - var dm = this.divmod(num); - - // Fast case - exact division - if (dm.mod.isZero()) return dm.div; - - var mod = dm.div.negative !== 0 ? dm.mod.isub(num) : dm.mod; - - var half = num.ushrn(1); - var r2 = num.andln(1); - var cmp = mod.cmp(half); - - // Round down - if (cmp < 0 || r2 === 1 && cmp === 0) return dm.div; - - // Round up - return dm.div.negative !== 0 ? dm.div.isubn(1) : dm.div.iaddn(1); - }; - - BN.prototype.modn = function modn (num) { - assert(num <= 0x3ffffff); - var p = (1 << 26) % num; - - var acc = 0; - for (var i = this.length - 1; i >= 0; i--) { - acc = (p * acc + (this.words[i] | 0)) % num; - } - - return acc; - }; - - // In-place division by number - BN.prototype.idivn = function idivn (num) { - assert(num <= 0x3ffffff); - - var carry = 0; - for (var i = this.length - 1; i >= 0; i--) { - var w = (this.words[i] | 0) + carry * 0x4000000; - this.words[i] = (w / num) | 0; - carry = w % num; - } - - return this.strip(); - }; - - BN.prototype.divn = function divn (num) { - return this.clone().idivn(num); - }; - - BN.prototype.egcd = function egcd (p) { - assert(p.negative === 0); - assert(!p.isZero()); - - var x = this; - var y = p.clone(); - - if (x.negative !== 0) { - x = x.umod(p); - } else { - x = x.clone(); - } - - // A * x + B * y = x - var A = new BN(1); - var B = new BN(0); - - // C * x + D * y = y - var C = new BN(0); - var D = new BN(1); - - var g = 0; - - while (x.isEven() && y.isEven()) { - x.iushrn(1); - y.iushrn(1); - ++g; - } - - var yp = y.clone(); - var xp = x.clone(); - - while (!x.isZero()) { - for (var i = 0, im = 1; (x.words[0] & im) === 0 && i < 26; ++i, im <<= 1); - if (i > 0) { - x.iushrn(i); - while (i-- > 0) { - if (A.isOdd() || B.isOdd()) { - A.iadd(yp); - B.isub(xp); - } - - A.iushrn(1); - B.iushrn(1); - } - } - - for (var j = 0, jm = 1; (y.words[0] & jm) === 0 && j < 26; ++j, jm <<= 1); - if (j > 0) { - y.iushrn(j); - while (j-- > 0) { - if (C.isOdd() || D.isOdd()) { - C.iadd(yp); - D.isub(xp); - } - - C.iushrn(1); - D.iushrn(1); - } - } - - if (x.cmp(y) >= 0) { - x.isub(y); - A.isub(C); - B.isub(D); - } else { - y.isub(x); - C.isub(A); - D.isub(B); - } - } - - return { - a: C, - b: D, - gcd: y.iushln(g) - }; - }; - - // This is reduced incarnation of the binary EEA - // above, designated to invert members of the - // _prime_ fields F(p) at a maximal speed - BN.prototype._invmp = function _invmp (p) { - assert(p.negative === 0); - assert(!p.isZero()); - - var a = this; - var b = p.clone(); - - if (a.negative !== 0) { - a = a.umod(p); - } else { - a = a.clone(); - } - - var x1 = new BN(1); - var x2 = new BN(0); - - var delta = b.clone(); - - while (a.cmpn(1) > 0 && b.cmpn(1) > 0) { - for (var i = 0, im = 1; (a.words[0] & im) === 0 && i < 26; ++i, im <<= 1); - if (i > 0) { - a.iushrn(i); - while (i-- > 0) { - if (x1.isOdd()) { - x1.iadd(delta); - } - - x1.iushrn(1); - } - } - - for (var j = 0, jm = 1; (b.words[0] & jm) === 0 && j < 26; ++j, jm <<= 1); - if (j > 0) { - b.iushrn(j); - while (j-- > 0) { - if (x2.isOdd()) { - x2.iadd(delta); - } - - x2.iushrn(1); - } - } - - if (a.cmp(b) >= 0) { - a.isub(b); - x1.isub(x2); - } else { - b.isub(a); - x2.isub(x1); - } - } - - var res; - if (a.cmpn(1) === 0) { - res = x1; - } else { - res = x2; - } - - if (res.cmpn(0) < 0) { - res.iadd(p); - } - - return res; - }; - - BN.prototype.gcd = function gcd (num) { - if (this.isZero()) return num.abs(); - if (num.isZero()) return this.abs(); - - var a = this.clone(); - var b = num.clone(); - a.negative = 0; - b.negative = 0; - - // Remove common factor of two - for (var shift = 0; a.isEven() && b.isEven(); shift++) { - a.iushrn(1); - b.iushrn(1); - } - - do { - while (a.isEven()) { - a.iushrn(1); - } - while (b.isEven()) { - b.iushrn(1); - } - - var r = a.cmp(b); - if (r < 0) { - // Swap `a` and `b` to make `a` always bigger than `b` - var t = a; - a = b; - b = t; - } else if (r === 0 || b.cmpn(1) === 0) { - break; - } - - a.isub(b); - } while (true); - - return b.iushln(shift); - }; - - // Invert number in the field F(num) - BN.prototype.invm = function invm (num) { - return this.egcd(num).a.umod(num); - }; - - BN.prototype.isEven = function isEven () { - return (this.words[0] & 1) === 0; - }; - - BN.prototype.isOdd = function isOdd () { - return (this.words[0] & 1) === 1; - }; - - // And first word and num - BN.prototype.andln = function andln (num) { - return this.words[0] & num; - }; - - // Increment at the bit position in-line - BN.prototype.bincn = function bincn (bit) { - assert(typeof bit === 'number'); - var r = bit % 26; - var s = (bit - r) / 26; - var q = 1 << r; - - // Fast case: bit is much higher than all existing words - if (this.length <= s) { - this._expand(s + 1); - this.words[s] |= q; - return this; - } - - // Add bit and propagate, if needed - var carry = q; - for (var i = s; carry !== 0 && i < this.length; i++) { - var w = this.words[i] | 0; - w += carry; - carry = w >>> 26; - w &= 0x3ffffff; - this.words[i] = w; - } - if (carry !== 0) { - this.words[i] = carry; - this.length++; - } - return this; - }; - - BN.prototype.isZero = function isZero () { - return this.length === 1 && this.words[0] === 0; - }; - - BN.prototype.cmpn = function cmpn (num) { - var negative = num < 0; - - if (this.negative !== 0 && !negative) return -1; - if (this.negative === 0 && negative) return 1; - - this.strip(); - - var res; - if (this.length > 1) { - res = 1; - } else { - if (negative) { - num = -num; - } - - assert(num <= 0x3ffffff, 'Number is too big'); - - var w = this.words[0] | 0; - res = w === num ? 0 : w < num ? -1 : 1; - } - if (this.negative !== 0) return -res | 0; - return res; - }; - - // Compare two numbers and return: - // 1 - if `this` > `num` - // 0 - if `this` == `num` - // -1 - if `this` < `num` - BN.prototype.cmp = function cmp (num) { - if (this.negative !== 0 && num.negative === 0) return -1; - if (this.negative === 0 && num.negative !== 0) return 1; - - var res = this.ucmp(num); - if (this.negative !== 0) return -res | 0; - return res; - }; - - // Unsigned comparison - BN.prototype.ucmp = function ucmp (num) { - // At this point both numbers have the same sign - if (this.length > num.length) return 1; - if (this.length < num.length) return -1; - - var res = 0; - for (var i = this.length - 1; i >= 0; i--) { - var a = this.words[i] | 0; - var b = num.words[i] | 0; - - if (a === b) continue; - if (a < b) { - res = -1; - } else if (a > b) { - res = 1; - } - break; - } - return res; - }; - - BN.prototype.gtn = function gtn (num) { - return this.cmpn(num) === 1; - }; - - BN.prototype.gt = function gt (num) { - return this.cmp(num) === 1; - }; - - BN.prototype.gten = function gten (num) { - return this.cmpn(num) >= 0; - }; - - BN.prototype.gte = function gte (num) { - return this.cmp(num) >= 0; - }; - - BN.prototype.ltn = function ltn (num) { - return this.cmpn(num) === -1; - }; - - BN.prototype.lt = function lt (num) { - return this.cmp(num) === -1; - }; - - BN.prototype.lten = function lten (num) { - return this.cmpn(num) <= 0; - }; - - BN.prototype.lte = function lte (num) { - return this.cmp(num) <= 0; - }; - - BN.prototype.eqn = function eqn (num) { - return this.cmpn(num) === 0; - }; - - BN.prototype.eq = function eq (num) { - return this.cmp(num) === 0; - }; - - // - // A reduce context, could be using montgomery or something better, depending - // on the `m` itself. - // - BN.red = function red (num) { - return new Red(num); - }; - - BN.prototype.toRed = function toRed (ctx) { - assert(!this.red, 'Already a number in reduction context'); - assert(this.negative === 0, 'red works only with positives'); - return ctx.convertTo(this)._forceRed(ctx); - }; - - BN.prototype.fromRed = function fromRed () { - assert(this.red, 'fromRed works only with numbers in reduction context'); - return this.red.convertFrom(this); - }; - - BN.prototype._forceRed = function _forceRed (ctx) { - this.red = ctx; - return this; - }; - - BN.prototype.forceRed = function forceRed (ctx) { - assert(!this.red, 'Already a number in reduction context'); - return this._forceRed(ctx); - }; - - BN.prototype.redAdd = function redAdd (num) { - assert(this.red, 'redAdd works only with red numbers'); - return this.red.add(this, num); - }; - - BN.prototype.redIAdd = function redIAdd (num) { - assert(this.red, 'redIAdd works only with red numbers'); - return this.red.iadd(this, num); - }; - - BN.prototype.redSub = function redSub (num) { - assert(this.red, 'redSub works only with red numbers'); - return this.red.sub(this, num); - }; - - BN.prototype.redISub = function redISub (num) { - assert(this.red, 'redISub works only with red numbers'); - return this.red.isub(this, num); - }; - - BN.prototype.redShl = function redShl (num) { - assert(this.red, 'redShl works only with red numbers'); - return this.red.shl(this, num); - }; - - BN.prototype.redMul = function redMul (num) { - assert(this.red, 'redMul works only with red numbers'); - this.red._verify2(this, num); - return this.red.mul(this, num); - }; - - BN.prototype.redIMul = function redIMul (num) { - assert(this.red, 'redMul works only with red numbers'); - this.red._verify2(this, num); - return this.red.imul(this, num); - }; - - BN.prototype.redSqr = function redSqr () { - assert(this.red, 'redSqr works only with red numbers'); - this.red._verify1(this); - return this.red.sqr(this); - }; - - BN.prototype.redISqr = function redISqr () { - assert(this.red, 'redISqr works only with red numbers'); - this.red._verify1(this); - return this.red.isqr(this); - }; - - // Square root over p - BN.prototype.redSqrt = function redSqrt () { - assert(this.red, 'redSqrt works only with red numbers'); - this.red._verify1(this); - return this.red.sqrt(this); - }; - - BN.prototype.redInvm = function redInvm () { - assert(this.red, 'redInvm works only with red numbers'); - this.red._verify1(this); - return this.red.invm(this); - }; - - // Return negative clone of `this` % `red modulo` - BN.prototype.redNeg = function redNeg () { - assert(this.red, 'redNeg works only with red numbers'); - this.red._verify1(this); - return this.red.neg(this); - }; - - BN.prototype.redPow = function redPow (num) { - assert(this.red && !num.red, 'redPow(normalNum)'); - this.red._verify1(this); - return this.red.pow(this, num); - }; - - // Prime numbers with efficient reduction - var primes = { - k256: null, - p224: null, - p192: null, - p25519: null - }; - - // Pseudo-Mersenne prime - function MPrime (name, p) { - // P = 2 ^ N - K - this.name = name; - this.p = new BN(p, 16); - this.n = this.p.bitLength(); - this.k = new BN(1).iushln(this.n).isub(this.p); - - this.tmp = this._tmp(); - } - - MPrime.prototype._tmp = function _tmp () { - var tmp = new BN(null); - tmp.words = new Array(Math.ceil(this.n / 13)); - return tmp; - }; - - MPrime.prototype.ireduce = function ireduce (num) { - // Assumes that `num` is less than `P^2` - // num = HI * (2 ^ N - K) + HI * K + LO = HI * K + LO (mod P) - var r = num; - var rlen; - - do { - this.split(r, this.tmp); - r = this.imulK(r); - r = r.iadd(this.tmp); - rlen = r.bitLength(); - } while (rlen > this.n); - - var cmp = rlen < this.n ? -1 : r.ucmp(this.p); - if (cmp === 0) { - r.words[0] = 0; - r.length = 1; - } else if (cmp > 0) { - r.isub(this.p); - } else { - r.strip(); - } - - return r; - }; - - MPrime.prototype.split = function split (input, out) { - input.iushrn(this.n, 0, out); - }; - - MPrime.prototype.imulK = function imulK (num) { - return num.imul(this.k); - }; - - function K256 () { - MPrime.call( - this, - 'k256', - 'ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f'); - } - inherits(K256, MPrime); - - K256.prototype.split = function split (input, output) { - // 256 = 9 * 26 + 22 - var mask = 0x3fffff; - - var outLen = Math.min(input.length, 9); - for (var i = 0; i < outLen; i++) { - output.words[i] = input.words[i]; - } - output.length = outLen; - - if (input.length <= 9) { - input.words[0] = 0; - input.length = 1; - return; - } - - // Shift by 9 limbs - var prev = input.words[9]; - output.words[output.length++] = prev & mask; - - for (i = 10; i < input.length; i++) { - var next = input.words[i] | 0; - input.words[i - 10] = ((next & mask) << 4) | (prev >>> 22); - prev = next; - } - prev >>>= 22; - input.words[i - 10] = prev; - if (prev === 0 && input.length > 10) { - input.length -= 10; - } else { - input.length -= 9; - } - }; - - K256.prototype.imulK = function imulK (num) { - // K = 0x1000003d1 = [ 0x40, 0x3d1 ] - num.words[num.length] = 0; - num.words[num.length + 1] = 0; - num.length += 2; - - // bounded at: 0x40 * 0x3ffffff + 0x3d0 = 0x100000390 - var lo = 0; - for (var i = 0; i < num.length; i++) { - var w = num.words[i] | 0; - lo += w * 0x3d1; - num.words[i] = lo & 0x3ffffff; - lo = w * 0x40 + ((lo / 0x4000000) | 0); - } - - // Fast length reduction - if (num.words[num.length - 1] === 0) { - num.length--; - if (num.words[num.length - 1] === 0) { - num.length--; - } - } - return num; - }; - - function P224 () { - MPrime.call( - this, - 'p224', - 'ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001'); - } - inherits(P224, MPrime); - - function P192 () { - MPrime.call( - this, - 'p192', - 'ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff'); - } - inherits(P192, MPrime); - - function P25519 () { - // 2 ^ 255 - 19 - MPrime.call( - this, - '25519', - '7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed'); - } - inherits(P25519, MPrime); - - P25519.prototype.imulK = function imulK (num) { - // K = 0x13 - var carry = 0; - for (var i = 0; i < num.length; i++) { - var hi = (num.words[i] | 0) * 0x13 + carry; - var lo = hi & 0x3ffffff; - hi >>>= 26; - - num.words[i] = lo; - carry = hi; - } - if (carry !== 0) { - num.words[num.length++] = carry; - } - return num; - }; - - // Exported mostly for testing purposes, use plain name instead - BN._prime = function prime (name) { - // Cached version of prime - if (primes[name]) return primes[name]; - - var prime; - if (name === 'k256') { - prime = new K256(); - } else if (name === 'p224') { - prime = new P224(); - } else if (name === 'p192') { - prime = new P192(); - } else if (name === 'p25519') { - prime = new P25519(); - } else { - throw new Error('Unknown prime ' + name); - } - primes[name] = prime; - - return prime; - }; - - // - // Base reduction engine - // - function Red (m) { - if (typeof m === 'string') { - var prime = BN._prime(m); - this.m = prime.p; - this.prime = prime; - } else { - assert(m.gtn(1), 'modulus must be greater than 1'); - this.m = m; - this.prime = null; - } - } - - Red.prototype._verify1 = function _verify1 (a) { - assert(a.negative === 0, 'red works only with positives'); - assert(a.red, 'red works only with red numbers'); - }; - - Red.prototype._verify2 = function _verify2 (a, b) { - assert((a.negative | b.negative) === 0, 'red works only with positives'); - assert(a.red && a.red === b.red, - 'red works only with red numbers'); - }; - - Red.prototype.imod = function imod (a) { - if (this.prime) return this.prime.ireduce(a)._forceRed(this); - return a.umod(this.m)._forceRed(this); - }; - - Red.prototype.neg = function neg (a) { - if (a.isZero()) { - return a.clone(); - } - - return this.m.sub(a)._forceRed(this); - }; - - Red.prototype.add = function add (a, b) { - this._verify2(a, b); - - var res = a.add(b); - if (res.cmp(this.m) >= 0) { - res.isub(this.m); - } - return res._forceRed(this); - }; - - Red.prototype.iadd = function iadd (a, b) { - this._verify2(a, b); - - var res = a.iadd(b); - if (res.cmp(this.m) >= 0) { - res.isub(this.m); - } - return res; - }; - - Red.prototype.sub = function sub (a, b) { - this._verify2(a, b); - - var res = a.sub(b); - if (res.cmpn(0) < 0) { - res.iadd(this.m); - } - return res._forceRed(this); - }; - - Red.prototype.isub = function isub (a, b) { - this._verify2(a, b); - - var res = a.isub(b); - if (res.cmpn(0) < 0) { - res.iadd(this.m); - } - return res; - }; - - Red.prototype.shl = function shl (a, num) { - this._verify1(a); - return this.imod(a.ushln(num)); - }; - - Red.prototype.imul = function imul (a, b) { - this._verify2(a, b); - return this.imod(a.imul(b)); - }; - - Red.prototype.mul = function mul (a, b) { - this._verify2(a, b); - return this.imod(a.mul(b)); - }; - - Red.prototype.isqr = function isqr (a) { - return this.imul(a, a.clone()); - }; - - Red.prototype.sqr = function sqr (a) { - return this.mul(a, a); - }; - - Red.prototype.sqrt = function sqrt (a) { - if (a.isZero()) return a.clone(); - - var mod3 = this.m.andln(3); - assert(mod3 % 2 === 1); - - // Fast case - if (mod3 === 3) { - var pow = this.m.add(new BN(1)).iushrn(2); - return this.pow(a, pow); - } - - // Tonelli-Shanks algorithm (Totally unoptimized and slow) - // - // Find Q and S, that Q * 2 ^ S = (P - 1) - var q = this.m.subn(1); - var s = 0; - while (!q.isZero() && q.andln(1) === 0) { - s++; - q.iushrn(1); - } - assert(!q.isZero()); - - var one = new BN(1).toRed(this); - var nOne = one.redNeg(); - - // Find quadratic non-residue - // NOTE: Max is such because of generalized Riemann hypothesis. - var lpow = this.m.subn(1).iushrn(1); - var z = this.m.bitLength(); - z = new BN(2 * z * z).toRed(this); - - while (this.pow(z, lpow).cmp(nOne) !== 0) { - z.redIAdd(nOne); - } - - var c = this.pow(z, q); - var r = this.pow(a, q.addn(1).iushrn(1)); - var t = this.pow(a, q); - var m = s; - while (t.cmp(one) !== 0) { - var tmp = t; - for (var i = 0; tmp.cmp(one) !== 0; i++) { - tmp = tmp.redSqr(); - } - assert(i < m); - var b = this.pow(c, new BN(1).iushln(m - i - 1)); - - r = r.redMul(b); - c = b.redSqr(); - t = t.redMul(c); - m = i; - } - - return r; - }; - - Red.prototype.invm = function invm (a) { - var inv = a._invmp(this.m); - if (inv.negative !== 0) { - inv.negative = 0; - return this.imod(inv).redNeg(); - } else { - return this.imod(inv); - } - }; - - Red.prototype.pow = function pow (a, num) { - if (num.isZero()) return new BN(1); - if (num.cmpn(1) === 0) return a.clone(); - - var windowSize = 4; - var wnd = new Array(1 << windowSize); - wnd[0] = new BN(1).toRed(this); - wnd[1] = a; - for (var i = 2; i < wnd.length; i++) { - wnd[i] = this.mul(wnd[i - 1], a); - } - - var res = wnd[0]; - var current = 0; - var currentLen = 0; - var start = num.bitLength() % 26; - if (start === 0) { - start = 26; - } - - for (i = num.length - 1; i >= 0; i--) { - var word = num.words[i]; - for (var j = start - 1; j >= 0; j--) { - var bit = (word >> j) & 1; - if (res !== wnd[0]) { - res = this.sqr(res); - } - - if (bit === 0 && current === 0) { - currentLen = 0; - continue; - } - - current <<= 1; - current |= bit; - currentLen++; - if (currentLen !== windowSize && (i !== 0 || j !== 0)) continue; - - res = this.mul(res, wnd[current]); - currentLen = 0; - current = 0; - } - start = 26; - } - - return res; - }; - - Red.prototype.convertTo = function convertTo (num) { - var r = num.umod(this.m); - - return r === num ? r.clone() : r; - }; - - Red.prototype.convertFrom = function convertFrom (num) { - var res = num.clone(); - res.red = null; - return res; - }; - - // - // Montgomery method engine - // - - BN.mont = function mont (num) { - return new Mont(num); - }; - - function Mont (m) { - Red.call(this, m); - - this.shift = this.m.bitLength(); - if (this.shift % 26 !== 0) { - this.shift += 26 - (this.shift % 26); - } - - this.r = new BN(1).iushln(this.shift); - this.r2 = this.imod(this.r.sqr()); - this.rinv = this.r._invmp(this.m); - - this.minv = this.rinv.mul(this.r).isubn(1).div(this.m); - this.minv = this.minv.umod(this.r); - this.minv = this.r.sub(this.minv); - } - inherits(Mont, Red); - - Mont.prototype.convertTo = function convertTo (num) { - return this.imod(num.ushln(this.shift)); - }; - - Mont.prototype.convertFrom = function convertFrom (num) { - var r = this.imod(num.mul(this.rinv)); - r.red = null; - return r; - }; - - Mont.prototype.imul = function imul (a, b) { - if (a.isZero() || b.isZero()) { - a.words[0] = 0; - a.length = 1; - return a; - } - - var t = a.imul(b); - var c = t.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m); - var u = t.isub(c).iushrn(this.shift); - var res = u; - - if (u.cmp(this.m) >= 0) { - res = u.isub(this.m); - } else if (u.cmpn(0) < 0) { - res = u.iadd(this.m); - } - - return res._forceRed(this); - }; - - Mont.prototype.mul = function mul (a, b) { - if (a.isZero() || b.isZero()) return new BN(0)._forceRed(this); - - var t = a.mul(b); - var c = t.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m); - var u = t.isub(c).iushrn(this.shift); - var res = u; - if (u.cmp(this.m) >= 0) { - res = u.isub(this.m); - } else if (u.cmpn(0) < 0) { - res = u.iadd(this.m); - } - - return res._forceRed(this); - }; - - Mont.prototype.invm = function invm (a) { - // (AR)^-1 * R^2 = (A^-1 * R^-1) * R^2 = A^-1 * R - var res = this.imod(a._invmp(this.m).mul(this.r2)); - return res._forceRed(this); - }; -})(typeof module === 'undefined' || module, this); diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/bn.js/package.json b/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/bn.js/package.json deleted file mode 100644 index 997440c2..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/bn.js/package.json +++ /dev/null @@ -1,71 +0,0 @@ -{ - "name": "bn.js", - "version": "4.11.6", - "description": "Big number implementation in pure javascript", - "main": "lib/bn.js", - "scripts": { - "lint": "semistandard", - "unit": "mocha --reporter=spec test/*-test.js", - "test": "npm run lint && npm run unit" - }, - "repository": { - "type": "git", - "url": "git+ssh://git@github.com/indutny/bn.js.git" - }, - "keywords": [ - "BN", - "BigNum", - "Big number", - "Modulo", - "Montgomery" - ], - "author": { - "name": "Fedor Indutny", - "email": "fedor@indutny.com" - }, - "license": "MIT", - "bugs": { - "url": "https://github.com/indutny/bn.js/issues" - }, - "homepage": "https://github.com/indutny/bn.js", - "devDependencies": { - "istanbul": "^0.3.5", - "mocha": "^2.1.0", - "semistandard": "^7.0.4" - }, - "gitHead": "e4a82134c89ed85b0c3a03da7fabc016206898a4", - "_id": "bn.js@4.11.6", - "_shasum": "53344adb14617a13f6e8dd2ce28905d1c0ba3215", - "_from": "bn.js@>=4.1.1 <5.0.0", - "_npmVersion": "3.10.3", - "_nodeVersion": "6.3.0", - "_npmUser": { - "name": "indutny", - "email": "fedor@indutny.com" - }, - "dist": { - "shasum": "53344adb14617a13f6e8dd2ce28905d1c0ba3215", - "tarball": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.6.tgz" - }, - "maintainers": [ - { - "name": "cwmma", - "email": "calvin.metcalf@gmail.com" - }, - { - "name": "dcousens", - "email": "email@dcousens.com" - }, - { - "name": "indutny", - "email": "fedor@indutny.com" - } - ], - "_npmOperationalInternal": { - "host": "packages-16-east.internal.npmjs.com", - "tmp": "tmp/bn.js-4.11.6.tgz_1470100429753_0.28054949711076915" - }, - "directories": {}, - "_resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.6.tgz", - "readme": "ERROR: No README data found!" -} diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/bn.js/test/arithmetic-test.js b/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/bn.js/test/arithmetic-test.js deleted file mode 100644 index c3a0d7d5..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/bn.js/test/arithmetic-test.js +++ /dev/null @@ -1,635 +0,0 @@ -/* global describe, it */ - -var assert = require('assert'); -var BN = require('../').BN; -var fixtures = require('./fixtures'); - -describe('BN.js/Arithmetic', function () { - describe('.add()', function () { - it('should add numbers', function () { - assert.equal(new BN(14).add(new BN(26)).toString(16), '28'); - var k = new BN(0x1234); - var r = k; - - for (var i = 0; i < 257; i++) { - r = r.add(k); - } - - assert.equal(r.toString(16), '125868'); - }); - - it('should handle carry properly (in-place)', function () { - var k = new BN('abcdefabcdefabcdef', 16); - var r = new BN('deadbeef', 16); - - for (var i = 0; i < 257; i++) { - r.iadd(k); - } - - assert.equal(r.toString(16), 'ac79bd9b79be7a277bde'); - }); - - it('should properly do positive + negative', function () { - var a = new BN('abcd', 16); - var b = new BN('-abce', 16); - - assert.equal(a.iadd(b).toString(16), '-1'); - - a = new BN('abcd', 16); - b = new BN('-abce', 16); - - assert.equal(a.add(b).toString(16), '-1'); - assert.equal(b.add(a).toString(16), '-1'); - }); - }); - - describe('.iaddn()', function () { - it('should allow a sign change', function () { - var a = new BN(-100); - assert.equal(a.negative, 1); - - a.iaddn(200); - - assert.equal(a.negative, 0); - assert.equal(a.toString(), '100'); - }); - - it('should add negative number', function () { - var a = new BN(-100); - assert.equal(a.negative, 1); - - a.iaddn(-200); - - assert.equal(a.toString(), '-300'); - }); - - it('should allow neg + pos with big number', function () { - var a = new BN('-1000000000', 10); - assert.equal(a.negative, 1); - - a.iaddn(200); - - assert.equal(a.toString(), '-999999800'); - }); - - it('should carry limb', function () { - var a = new BN('3ffffff', 16); - - assert.equal(a.iaddn(1).toString(16), '4000000'); - }); - - it('should throw error with num eq 0x4000000', function () { - assert.throws(function () { - new BN(0).iaddn(0x4000000); - }, /^Error: Assertion failed$/); - }); - }); - - describe('.sub()', function () { - it('should subtract small numbers', function () { - assert.equal(new BN(26).sub(new BN(14)).toString(16), 'c'); - assert.equal(new BN(14).sub(new BN(26)).toString(16), '-c'); - assert.equal(new BN(26).sub(new BN(26)).toString(16), '0'); - assert.equal(new BN(-26).sub(new BN(26)).toString(16), '-34'); - }); - - var a = new BN( - '31ff3c61db2db84b9823d320907a573f6ad37c437abe458b1802cda041d6384' + - 'a7d8daef41395491e2', - 16); - var b = new BN( - '6f0e4d9f1d6071c183677f601af9305721c91d31b0bbbae8fb790000', - 16); - var r = new BN( - '31ff3c61db2db84b9823d3208989726578fd75276287cd9516533a9acfb9a67' + - '76281f34583ddb91e2', - 16); - - it('should subtract big numbers', function () { - assert.equal(a.sub(b).cmp(r), 0); - }); - - it('should subtract numbers in place', function () { - assert.equal(b.clone().isub(a).neg().cmp(r), 0); - }); - - it('should subtract with carry', function () { - // Carry and copy - var a = new BN('12345', 16); - var b = new BN('1000000000000', 16); - assert.equal(a.isub(b).toString(16), '-fffffffedcbb'); - - a = new BN('12345', 16); - b = new BN('1000000000000', 16); - assert.equal(b.isub(a).toString(16), 'fffffffedcbb'); - }); - }); - - describe('.isubn()', function () { - it('should subtract negative number', function () { - var r = new BN( - '7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b', 16); - assert.equal(r.isubn(-1).toString(16), - '7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681c'); - }); - - it('should work for positive numbers', function () { - var a = new BN(-100); - assert.equal(a.negative, 1); - - a.isubn(200); - assert.equal(a.negative, 1); - assert.equal(a.toString(), '-300'); - }); - - it('should not allow a sign change', function () { - var a = new BN(-100); - assert.equal(a.negative, 1); - - a.isubn(-200); - assert.equal(a.negative, 0); - assert.equal(a.toString(), '100'); - }); - - it('should change sign on small numbers at 0', function () { - var a = new BN(0).subn(2); - assert.equal(a.toString(), '-2'); - }); - - it('should change sign on small numbers at 1', function () { - var a = new BN(1).subn(2); - assert.equal(a.toString(), '-1'); - }); - - it('should throw error with num eq 0x4000000', function () { - assert.throws(function () { - new BN(0).isubn(0x4000000); - }, /^Error: Assertion failed$/); - }); - }); - - function testMethod (name, mul) { - describe(name, function () { - it('should multiply numbers of different signs', function () { - var offsets = [ - 1, // smallMulTo - 250, // comb10MulTo - 1000, // bigMulTo - 15000 // jumboMulTo - ]; - - for (var i = 0; i < offsets.length; ++i) { - var x = new BN(1).ishln(offsets[i]); - - assert.equal(mul(x, x).isNeg(), false); - assert.equal(mul(x, x.neg()).isNeg(), true); - assert.equal(mul(x.neg(), x).isNeg(), true); - assert.equal(mul(x.neg(), x.neg()).isNeg(), false); - } - }); - - it('should multiply with carry', function () { - var n = new BN(0x1001); - var r = n; - - for (var i = 0; i < 4; i++) { - r = mul(r, n); - } - - assert.equal(r.toString(16), '100500a00a005001'); - }); - - it('should correctly multiply big numbers', function () { - var n = new BN( - '79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798', - 16 - ); - assert.equal( - mul(n, n).toString(16), - '39e58a8055b6fb264b75ec8c646509784204ac15a8c24e05babc9729ab9' + - 'b055c3a9458e4ce3289560a38e08ba8175a9446ce14e608245ab3a9' + - '978a8bd8acaa40'); - assert.equal( - mul(mul(n, n), n).toString(16), - '1b888e01a06e974017a28a5b4da436169761c9730b7aeedf75fc60f687b' + - '46e0cf2cb11667f795d5569482640fe5f628939467a01a612b02350' + - '0d0161e9730279a7561043af6197798e41b7432458463e64fa81158' + - '907322dc330562697d0d600'); - }); - - it('should multiply neg number on 0', function () { - assert.equal( - mul(new BN('-100000000000'), new BN('3').div(new BN('4'))) - .toString(16), - '0' - ); - }); - - it('should regress mul big numbers', function () { - var q = fixtures.dhGroups.p17.q; - var qs = fixtures.dhGroups.p17.qs; - - q = new BN(q, 16); - assert.equal(mul(q, q).toString(16), qs); - }); - }); - } - - testMethod('.mul()', function (x, y) { - return BN.prototype.mul.apply(x, [ y ]); - }); - - testMethod('.mulf()', function (x, y) { - return BN.prototype.mulf.apply(x, [ y ]); - }); - - describe('.imul()', function () { - it('should multiply numbers in-place', function () { - var a = new BN('abcdef01234567890abcd', 16); - var b = new BN('deadbeefa551edebabba8', 16); - var c = a.mul(b); - - assert.equal(a.imul(b).toString(16), c.toString(16)); - - a = new BN('abcdef01234567890abcd214a25123f512361e6d236', 16); - b = new BN('deadbeefa551edebabba8121234fd21bac0341324dd', 16); - c = a.mul(b); - - assert.equal(a.imul(b).toString(16), c.toString(16)); - }); - - it('should multiply by 0', function () { - var a = new BN('abcdef01234567890abcd', 16); - var b = new BN('0', 16); - var c = a.mul(b); - - assert.equal(a.imul(b).toString(16), c.toString(16)); - }); - - it('should regress mul big numbers in-place', function () { - var q = fixtures.dhGroups.p17.q; - var qs = fixtures.dhGroups.p17.qs; - - q = new BN(q, 16); - - assert.equal(q.isqr().toString(16), qs); - }); - }); - - describe('.muln()', function () { - it('should multiply number by small number', function () { - var a = new BN('abcdef01234567890abcd', 16); - var b = new BN('dead', 16); - var c = a.mul(b); - - assert.equal(a.muln(0xdead).toString(16), c.toString(16)); - }); - - it('should throw error with num eq 0x4000000', function () { - assert.throws(function () { - new BN(0).imuln(0x4000000); - }, /^Error: Assertion failed$/); - }); - }); - - describe('.pow()', function () { - it('should raise number to the power', function () { - var a = new BN('ab', 16); - var b = new BN('13', 10); - var c = a.pow(b); - - assert.equal(c.toString(16), '15963da06977df51909c9ba5b'); - }); - }); - - describe('.div()', function () { - it('should divide small numbers (<=26 bits)', function () { - assert.equal(new BN('256').div(new BN(10)).toString(10), - '25'); - assert.equal(new BN('-256').div(new BN(10)).toString(10), - '-25'); - assert.equal(new BN('256').div(new BN(-10)).toString(10), - '-25'); - assert.equal(new BN('-256').div(new BN(-10)).toString(10), - '25'); - - assert.equal(new BN('10').div(new BN(256)).toString(10), - '0'); - assert.equal(new BN('-10').div(new BN(256)).toString(10), - '0'); - assert.equal(new BN('10').div(new BN(-256)).toString(10), - '0'); - assert.equal(new BN('-10').div(new BN(-256)).toString(10), - '0'); - }); - - it('should divide large numbers (>53 bits)', function () { - assert.equal(new BN('1222222225255589').div(new BN('611111124969028')) - .toString(10), '1'); - assert.equal(new BN('-1222222225255589').div(new BN('611111124969028')) - .toString(10), '-1'); - assert.equal(new BN('1222222225255589').div(new BN('-611111124969028')) - .toString(10), '-1'); - assert.equal(new BN('-1222222225255589').div(new BN('-611111124969028')) - .toString(10), '1'); - - assert.equal(new BN('611111124969028').div(new BN('1222222225255589')) - .toString(10), '0'); - assert.equal(new BN('-611111124969028').div(new BN('1222222225255589')) - .toString(10), '0'); - assert.equal(new BN('611111124969028').div(new BN('-1222222225255589')) - .toString(10), '0'); - assert.equal(new BN('-611111124969028').div(new BN('-1222222225255589')) - .toString(10), '0'); - }); - - it('should divide numbers', function () { - assert.equal(new BN('69527932928').div(new BN('16974594')).toString(16), - 'fff'); - assert.equal(new BN('-69527932928').div(new BN('16974594')).toString(16), - '-fff'); - - var b = new BN( - '39e58a8055b6fb264b75ec8c646509784204ac15a8c24e05babc9729ab9' + - 'b055c3a9458e4ce3289560a38e08ba8175a9446ce14e608245ab3a9' + - '978a8bd8acaa40', - 16); - var n = new BN( - '79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798', - 16 - ); - assert.equal(b.div(n).toString(16), n.toString(16)); - - assert.equal(new BN('1').div(new BN('-5')).toString(10), '0'); - }); - - it('should not fail on regression after moving to _wordDiv', function () { - // Regression after moving to word div - var p = new BN( - 'fffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f', - 16); - var a = new BN( - '79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798', - 16); - var as = a.sqr(); - assert.equal( - as.div(p).toString(16), - '39e58a8055b6fb264b75ec8c646509784204ac15a8c24e05babc9729e58090b9'); - - p = new BN( - 'ffffffff00000001000000000000000000000000ffffffffffffffffffffffff', - 16); - a = new BN( - 'fffffffe00000003fffffffd0000000200000001fffffffe00000002ffffffff' + - 'ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff', - 16); - assert.equal( - a.div(p).toString(16), - 'ffffffff00000002000000000000000000000001000000000000000000000001'); - }); - }); - - describe('.idivn()', function () { - it('should divide numbers in-place', function () { - assert.equal(new BN('10', 16).idivn(3).toString(16), '5'); - assert.equal(new BN('12', 16).idivn(3).toString(16), '6'); - assert.equal(new BN('10000000000000000').idivn(3).toString(10), - '3333333333333333'); - assert.equal( - new BN('100000000000000000000000000000').idivn(3).toString(10), - '33333333333333333333333333333'); - - var t = new BN(3); - assert.equal( - new BN('12345678901234567890123456', 16).idivn(3).toString(16), - new BN('12345678901234567890123456', 16).div(t).toString(16)); - }); - }); - - describe('.divRound()', function () { - it('should divide numbers with rounding', function () { - assert.equal(new BN(9).divRound(new BN(20)).toString(10), - '0'); - assert.equal(new BN(10).divRound(new BN(20)).toString(10), - '1'); - assert.equal(new BN(150).divRound(new BN(20)).toString(10), - '8'); - assert.equal(new BN(149).divRound(new BN(20)).toString(10), - '7'); - assert.equal(new BN(149).divRound(new BN(17)).toString(10), - '9'); - assert.equal(new BN(144).divRound(new BN(17)).toString(10), - '8'); - assert.equal(new BN(-144).divRound(new BN(17)).toString(10), - '-8'); - }); - - it('should return 1 on exact division', function () { - assert.equal(new BN(144).divRound(new BN(144)).toString(10), '1'); - }); - }); - - describe('.mod()', function () { - it('should modulo small numbers (<=26 bits)', function () { - assert.equal(new BN('256').mod(new BN(10)).toString(10), - '6'); - assert.equal(new BN('-256').mod(new BN(10)).toString(10), - '-6'); - assert.equal(new BN('256').mod(new BN(-10)).toString(10), - '6'); - assert.equal(new BN('-256').mod(new BN(-10)).toString(10), - '-6'); - - assert.equal(new BN('10').mod(new BN(256)).toString(10), - '10'); - assert.equal(new BN('-10').mod(new BN(256)).toString(10), - '-10'); - assert.equal(new BN('10').mod(new BN(-256)).toString(10), - '10'); - assert.equal(new BN('-10').mod(new BN(-256)).toString(10), - '-10'); - }); - - it('should modulo large numbers (>53 bits)', function () { - assert.equal(new BN('1222222225255589').mod(new BN('611111124969028')) - .toString(10), '611111100286561'); - assert.equal(new BN('-1222222225255589').mod(new BN('611111124969028')) - .toString(10), '-611111100286561'); - assert.equal(new BN('1222222225255589').mod(new BN('-611111124969028')) - .toString(10), '611111100286561'); - assert.equal(new BN('-1222222225255589').mod(new BN('-611111124969028')) - .toString(10), '-611111100286561'); - - assert.equal(new BN('611111124969028').mod(new BN('1222222225255589')) - .toString(10), '611111124969028'); - assert.equal(new BN('-611111124969028').mod(new BN('1222222225255589')) - .toString(10), '-611111124969028'); - assert.equal(new BN('611111124969028').mod(new BN('-1222222225255589')) - .toString(10), '611111124969028'); - assert.equal(new BN('-611111124969028').mod(new BN('-1222222225255589')) - .toString(10), '-611111124969028'); - }); - - it('should mod numbers', function () { - assert.equal(new BN('10').mod(new BN(256)).toString(16), - 'a'); - assert.equal(new BN('69527932928').mod(new BN('16974594')).toString(16), - '102f302'); - - // 178 = 10 * 17 + 8 - assert.equal(new BN(178).div(new BN(10)).toNumber(), 17); - assert.equal(new BN(178).mod(new BN(10)).toNumber(), 8); - assert.equal(new BN(178).umod(new BN(10)).toNumber(), 8); - - // -178 = 10 * (-17) + (-8) - assert.equal(new BN(-178).div(new BN(10)).toNumber(), -17); - assert.equal(new BN(-178).mod(new BN(10)).toNumber(), -8); - assert.equal(new BN(-178).umod(new BN(10)).toNumber(), 2); - - // 178 = -10 * (-17) + 8 - assert.equal(new BN(178).div(new BN(-10)).toNumber(), -17); - assert.equal(new BN(178).mod(new BN(-10)).toNumber(), 8); - assert.equal(new BN(178).umod(new BN(-10)).toNumber(), 8); - - // -178 = -10 * (17) + (-8) - assert.equal(new BN(-178).div(new BN(-10)).toNumber(), 17); - assert.equal(new BN(-178).mod(new BN(-10)).toNumber(), -8); - assert.equal(new BN(-178).umod(new BN(-10)).toNumber(), 2); - - // -4 = 1 * (-3) + -1 - assert.equal(new BN(-4).div(new BN(-3)).toNumber(), 1); - assert.equal(new BN(-4).mod(new BN(-3)).toNumber(), -1); - - // -4 = -1 * (3) + -1 - assert.equal(new BN(-4).mod(new BN(3)).toNumber(), -1); - // -4 = 1 * (-3) + (-1 + 3) - assert.equal(new BN(-4).umod(new BN(-3)).toNumber(), 2); - - var p = new BN( - 'ffffffff00000001000000000000000000000000ffffffffffffffffffffffff', - 16); - var a = new BN( - 'fffffffe00000003fffffffd0000000200000001fffffffe00000002ffffffff' + - 'ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff', - 16); - assert.equal( - a.mod(p).toString(16), - '0'); - }); - - it('should properly carry the sign inside division', function () { - var a = new BN('945304eb96065b2a98b57a48a06ae28d285a71b5', 'hex'); - var b = new BN( - 'fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe', - 'hex'); - - assert.equal(a.mul(b).mod(a).cmpn(0), 0); - }); - }); - - describe('.modn()', function () { - it('should act like .mod() on small numbers', function () { - assert.equal(new BN('10', 16).modn(256).toString(16), '10'); - assert.equal(new BN('100', 16).modn(256).toString(16), '0'); - assert.equal(new BN('1001', 16).modn(256).toString(16), '1'); - assert.equal(new BN('100000000001', 16).modn(256).toString(16), '1'); - assert.equal(new BN('100000000001', 16).modn(257).toString(16), - new BN('100000000001', 16).mod(new BN(257)).toString(16)); - assert.equal(new BN('123456789012', 16).modn(3).toString(16), - new BN('123456789012', 16).mod(new BN(3)).toString(16)); - }); - }); - - describe('.abs()', function () { - it('should return absolute value', function () { - assert.equal(new BN(0x1001).abs().toString(), '4097'); - assert.equal(new BN(-0x1001).abs().toString(), '4097'); - assert.equal(new BN('ffffffff', 16).abs().toString(), '4294967295'); - }); - }); - - describe('.invm()', function () { - it('should invert relatively-prime numbers', function () { - var p = new BN(257); - var a = new BN(3); - var b = a.invm(p); - assert.equal(a.mul(b).mod(p).toString(16), '1'); - - var p192 = new BN( - 'fffffffffffffffffffffffffffffffeffffffffffffffff', - 16); - a = new BN('deadbeef', 16); - b = a.invm(p192); - assert.equal(a.mul(b).mod(p192).toString(16), '1'); - - // Even base - var phi = new BN('872d9b030ba368706b68932cf07a0e0c', 16); - var e = new BN(65537); - var d = e.invm(phi); - assert.equal(e.mul(d).mod(phi).toString(16), '1'); - - // Even base (take #2) - a = new BN('5'); - b = new BN('6'); - var r = a.invm(b); - assert.equal(r.mul(a).mod(b).toString(16), '1'); - }); - }); - - describe('.gcd()', function () { - it('should return GCD', function () { - assert.equal(new BN(3).gcd(new BN(2)).toString(10), '1'); - assert.equal(new BN(18).gcd(new BN(12)).toString(10), '6'); - assert.equal(new BN(-18).gcd(new BN(12)).toString(10), '6'); - assert.equal(new BN(-18).gcd(new BN(-12)).toString(10), '6'); - assert.equal(new BN(-18).gcd(new BN(0)).toString(10), '18'); - assert.equal(new BN(0).gcd(new BN(-18)).toString(10), '18'); - assert.equal(new BN(2).gcd(new BN(0)).toString(10), '2'); - assert.equal(new BN(0).gcd(new BN(3)).toString(10), '3'); - assert.equal(new BN(0).gcd(new BN(0)).toString(10), '0'); - }); - }); - - describe('.egcd()', function () { - it('should return EGCD', function () { - assert.equal(new BN(3).egcd(new BN(2)).gcd.toString(10), '1'); - assert.equal(new BN(18).egcd(new BN(12)).gcd.toString(10), '6'); - assert.equal(new BN(-18).egcd(new BN(12)).gcd.toString(10), '6'); - assert.equal(new BN(0).egcd(new BN(12)).gcd.toString(10), '12'); - }); - it('should not allow 0 input', function () { - assert.throws(function () { - new BN(1).egcd(0); - }, /^Error: Assertion failed$/); - }); - it('should not allow negative input', function () { - assert.throws(function () { - new BN(1).egcd(-1); - }, /^Error: Assertion failed$/); - }); - }); - - describe('BN.max(a, b)', function () { - it('should return maximum', function () { - assert.equal(BN.max(new BN(3), new BN(2)).toString(16), '3'); - assert.equal(BN.max(new BN(2), new BN(3)).toString(16), '3'); - assert.equal(BN.max(new BN(2), new BN(2)).toString(16), '2'); - assert.equal(BN.max(new BN(2), new BN(-2)).toString(16), '2'); - }); - }); - - describe('BN.min(a, b)', function () { - it('should return minimum', function () { - assert.equal(BN.min(new BN(3), new BN(2)).toString(16), '2'); - assert.equal(BN.min(new BN(2), new BN(3)).toString(16), '2'); - assert.equal(BN.min(new BN(2), new BN(2)).toString(16), '2'); - assert.equal(BN.min(new BN(2), new BN(-2)).toString(16), '-2'); - }); - }); - - describe('BN.ineg', function () { - it('shouldn\'t change sign for zero', function () { - assert.equal(new BN(0).ineg().toString(10), '0'); - }); - }); -}); diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/bn.js/test/binary-test.js b/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/bn.js/test/binary-test.js deleted file mode 100644 index 37b6421d..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/bn.js/test/binary-test.js +++ /dev/null @@ -1,233 +0,0 @@ -/* global describe, it */ - -var assert = require('assert'); -var BN = require('../').BN; - -describe('BN.js/Binary', function () { - describe('.shl()', function () { - it('should shl numbers', function () { - // TODO(indutny): add negative numbers when the time will come - assert.equal(new BN('69527932928').shln(13).toString(16), - '2060602000000'); - assert.equal(new BN('69527932928').shln(45).toString(16), - '206060200000000000000'); - }); - - it('should ushl numbers', function () { - assert.equal(new BN('69527932928').ushln(13).toString(16), - '2060602000000'); - assert.equal(new BN('69527932928').ushln(45).toString(16), - '206060200000000000000'); - }); - }); - - describe('.shr()', function () { - it('should shr numbers', function () { - // TODO(indutny): add negative numbers when the time will come - assert.equal(new BN('69527932928').shrn(13).toString(16), - '818180'); - assert.equal(new BN('69527932928').shrn(17).toString(16), - '81818'); - assert.equal(new BN('69527932928').shrn(256).toString(16), - '0'); - }); - - it('should ushr numbers', function () { - assert.equal(new BN('69527932928').ushrn(13).toString(16), - '818180'); - assert.equal(new BN('69527932928').ushrn(17).toString(16), - '81818'); - assert.equal(new BN('69527932928').ushrn(256).toString(16), - '0'); - }); - }); - - describe('.bincn()', function () { - it('should increment bit', function () { - assert.equal(new BN(0).bincn(1).toString(16), '2'); - assert.equal(new BN(2).bincn(1).toString(16), '4'); - assert.equal(new BN(2).bincn(1).bincn(1).toString(16), - new BN(2).bincn(2).toString(16)); - assert.equal(new BN(0xffffff).bincn(1).toString(16), '1000001'); - assert.equal(new BN(2).bincn(63).toString(16), - '8000000000000002'); - }); - }); - - describe('.imaskn()', function () { - it('should mask bits in-place', function () { - assert.equal(new BN(0).imaskn(1).toString(16), '0'); - assert.equal(new BN(3).imaskn(1).toString(16), '1'); - assert.equal(new BN('123456789', 16).imaskn(4).toString(16), '9'); - assert.equal(new BN('123456789', 16).imaskn(16).toString(16), '6789'); - assert.equal(new BN('123456789', 16).imaskn(28).toString(16), '3456789'); - }); - - it('should not mask when number is bigger than length', function () { - assert.equal(new BN(0xe3).imaskn(56).toString(16), 'e3'); - assert.equal(new BN(0xe3).imaskn(26).toString(16), 'e3'); - }); - }); - - describe('.testn()', function () { - it('should support test specific bit', function () { - [ - 'ff', - 'ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff' - ].forEach(function (hex) { - var bn = new BN(hex, 16); - var bl = bn.bitLength(); - - for (var i = 0; i < bl; ++i) { - assert.equal(bn.testn(i), true); - } - - // test off the end - assert.equal(bn.testn(bl), false); - }); - - var xbits = '01111001010111001001000100011101' + - '11010011101100011000111001011101' + - '10010100111000000001011000111101' + - '01011111001111100100011110000010' + - '01011010100111010001010011000100' + - '01101001011110100001001111100110' + - '001110010111'; - - var x = new BN( - '23478905234580795234378912401239784125643978256123048348957342' - ); - for (var i = 0; i < x.bitLength(); ++i) { - assert.equal(x.testn(i), (xbits.charAt(i) === '1'), 'Failed @ bit ' + i); - } - }); - - it('should have short-cuts', function () { - var x = new BN('abcd', 16); - assert(!x.testn(128)); - }); - }); - - describe('.and()', function () { - it('should and numbers', function () { - assert.equal(new BN('1010101010101010101010101010101010101010', 2) - .and(new BN('101010101010101010101010101010101010101', 2)) - .toString(2), '0'); - }); - - it('should and numbers of different limb-length', function () { - assert.equal( - new BN('abcd0000ffff', 16) - .and(new BN('abcd', 16)).toString(16), - 'abcd'); - }); - }); - - describe('.iand()', function () { - it('should iand numbers', function () { - assert.equal(new BN('1010101010101010101010101010101010101010', 2) - .iand(new BN('101010101010101010101010101010101010101', 2)) - .toString(2), '0'); - assert.equal(new BN('1000000000000000000000000000000000000001', 2) - .iand(new BN('1', 2)) - .toString(2), '1'); - assert.equal(new BN('1', 2) - .iand(new BN('1000000000000000000000000000000000000001', 2)) - .toString(2), '1'); - }); - }); - - describe('.or()', function () { - it('should or numbers', function () { - assert.equal(new BN('1010101010101010101010101010101010101010', 2) - .or(new BN('101010101010101010101010101010101010101', 2)) - .toString(2), '1111111111111111111111111111111111111111'); - }); - - it('should or numbers of different limb-length', function () { - assert.equal( - new BN('abcd00000000', 16) - .or(new BN('abcd', 16)).toString(16), - 'abcd0000abcd'); - }); - }); - - describe('.ior()', function () { - it('should ior numbers', function () { - assert.equal(new BN('1010101010101010101010101010101010101010', 2) - .ior(new BN('101010101010101010101010101010101010101', 2)) - .toString(2), '1111111111111111111111111111111111111111'); - assert.equal(new BN('1000000000000000000000000000000000000000', 2) - .ior(new BN('1', 2)) - .toString(2), '1000000000000000000000000000000000000001'); - assert.equal(new BN('1', 2) - .ior(new BN('1000000000000000000000000000000000000000', 2)) - .toString(2), '1000000000000000000000000000000000000001'); - }); - }); - - describe('.xor()', function () { - it('should xor numbers', function () { - assert.equal(new BN('11001100110011001100110011001100', 2) - .xor(new BN('1100110011001100110011001100110', 2)) - .toString(2), '10101010101010101010101010101010'); - }); - }); - - describe('.ixor()', function () { - it('should ixor numbers', function () { - assert.equal(new BN('11001100110011001100110011001100', 2) - .ixor(new BN('1100110011001100110011001100110', 2)) - .toString(2), '10101010101010101010101010101010'); - assert.equal(new BN('11001100110011001100110011001100', 2) - .ixor(new BN('1', 2)) - .toString(2), '11001100110011001100110011001101'); - assert.equal(new BN('1', 2) - .ixor(new BN('11001100110011001100110011001100', 2)) - .toString(2), '11001100110011001100110011001101'); - }); - - it('should and numbers of different limb-length', function () { - assert.equal( - new BN('abcd0000ffff', 16) - .xor(new BN('abcd', 16)).toString(16), - 'abcd00005432'); - }); - }); - - describe('.setn()', function () { - it('should allow single bits to be set', function () { - assert.equal(new BN(0).setn(2, true).toString(2), '100'); - assert.equal(new BN(0).setn(27, true).toString(2), - '1000000000000000000000000000'); - assert.equal(new BN(0).setn(63, true).toString(16), - new BN(1).iushln(63).toString(16)); - assert.equal(new BN('1000000000000000000000000001', 2).setn(27, false) - .toString(2), '1'); - assert.equal(new BN('101', 2).setn(2, false).toString(2), '1'); - }); - }); - - describe('.notn()', function () { - it('should allow bitwise negation', function () { - assert.equal(new BN('111000111', 2).notn(9).toString(2), - '111000'); - assert.equal(new BN('000111000', 2).notn(9).toString(2), - '111000111'); - assert.equal(new BN('111000111', 2).notn(9).toString(2), - '111000'); - assert.equal(new BN('000111000', 2).notn(9).toString(2), - '111000111'); - assert.equal(new BN('111000111', 2).notn(32).toString(2), - '11111111111111111111111000111000'); - assert.equal(new BN('000111000', 2).notn(32).toString(2), - '11111111111111111111111111000111'); - assert.equal(new BN('111000111', 2).notn(68).toString(2), - '11111111111111111111111111111111' + - '111111111111111111111111111000111000'); - assert.equal(new BN('000111000', 2).notn(68).toString(2), - '11111111111111111111111111111111' + - '111111111111111111111111111111000111'); - }); - }); -}); diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/bn.js/test/constructor-test.js b/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/bn.js/test/constructor-test.js deleted file mode 100644 index 11c7df08..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/bn.js/test/constructor-test.js +++ /dev/null @@ -1,149 +0,0 @@ -/* global describe, it */ - -var assert = require('assert'); -var BN = require('../').BN; - -describe('BN.js/Constructor', function () { - describe('with Smi input', function () { - it('should accept one limb number', function () { - assert.equal(new BN(12345).toString(16), '3039'); - }); - - it('should accept two-limb number', function () { - assert.equal(new BN(0x4123456).toString(16), '4123456'); - }); - - it('should accept 52 bits of precision', function () { - var num = Math.pow(2, 52); - assert.equal(new BN(num, 10).toString(10), num.toString(10)); - }); - - it('should accept max safe integer', function () { - var num = Math.pow(2, 53) - 1; - assert.equal(new BN(num, 10).toString(10), num.toString(10)); - }); - - it('should not accept an unsafe integer', function () { - var num = Math.pow(2, 53); - - assert.throws(function () { - return new BN(num, 10); - }, /^Error: Assertion failed$/); - }); - - it('should accept two-limb LE number', function () { - assert.equal(new BN(0x4123456, null, 'le').toString(16), '56341204'); - }); - }); - - describe('with String input', function () { - it('should accept base-16', function () { - assert.equal(new BN('1A6B765D8CDF', 16).toString(16), '1a6b765d8cdf'); - assert.equal(new BN('1A6B765D8CDF', 16).toString(), '29048849665247'); - }); - - it('should accept base-hex', function () { - assert.equal(new BN('FF', 'hex').toString(), '255'); - }); - - it('should accept base-16 with spaces', function () { - var num = 'a89c e5af8724 c0a23e0e 0ff77500'; - assert.equal(new BN(num, 16).toString(16), num.replace(/ /g, '')); - }); - - it('should accept long base-16', function () { - var num = '123456789abcdef123456789abcdef123456789abcdef'; - assert.equal(new BN(num, 16).toString(16), num); - }); - - it('should accept positive base-10', function () { - assert.equal(new BN('10654321').toString(), '10654321'); - assert.equal(new BN('29048849665247').toString(16), '1a6b765d8cdf'); - }); - - it('should accept negative base-10', function () { - assert.equal(new BN('-29048849665247').toString(16), '-1a6b765d8cdf'); - }); - - it('should accept long base-10', function () { - var num = '10000000000000000'; - assert.equal(new BN(num).toString(10), num); - }); - - it('should accept base-2', function () { - var base2 = '11111111111111111111111111111111111111111111111111111'; - assert.equal(new BN(base2, 2).toString(2), base2); - }); - - it('should accept base-36', function () { - var base36 = 'zzZzzzZzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz'; - assert.equal(new BN(base36, 36).toString(36), base36.toLowerCase()); - }); - - it('should not overflow limbs during base-10', function () { - var num = '65820182292848241686198767302293' + - '20890292528855852623664389292032'; - assert(new BN(num).words[0] < 0x4000000); - }); - - it('should accept base-16 LE integer', function () { - assert.equal(new BN('1A6B765D8CDF', 16, 'le').toString(16), - 'df8c5d766b1a'); - }); - }); - - describe('with Array input', function () { - it('should not fail on empty array', function () { - assert.equal(new BN([]).toString(16), '0'); - }); - - it('should import/export big endian', function () { - assert.equal(new BN([ 1, 2, 3 ]).toString(16), '10203'); - assert.equal(new BN([ 1, 2, 3, 4 ]).toString(16), '1020304'); - assert.equal(new BN([ 1, 2, 3, 4, 5 ]).toString(16), '102030405'); - assert.equal(new BN([ 1, 2, 3, 4, 5, 6, 7, 8 ]).toString(16), - '102030405060708'); - assert.equal(new BN([ 1, 2, 3, 4 ]).toArray().join(','), '1,2,3,4'); - assert.equal(new BN([ 1, 2, 3, 4, 5, 6, 7, 8 ]).toArray().join(','), - '1,2,3,4,5,6,7,8'); - }); - - it('should import little endian', function () { - assert.equal(new BN([ 1, 2, 3 ], 10, 'le').toString(16), '30201'); - assert.equal(new BN([ 1, 2, 3, 4 ], 10, 'le').toString(16), '4030201'); - assert.equal(new BN([ 1, 2, 3, 4, 5 ], 10, 'le').toString(16), - '504030201'); - assert.equal(new BN([ 1, 2, 3, 4, 5, 6, 7, 8 ], 'le').toString(16), - '807060504030201'); - assert.equal(new BN([ 1, 2, 3, 4 ]).toArray('le').join(','), '4,3,2,1'); - assert.equal(new BN([ 1, 2, 3, 4, 5, 6, 7, 8 ]).toArray('le').join(','), - '8,7,6,5,4,3,2,1'); - }); - - it('should import big endian with implicit base', function () { - assert.equal(new BN([ 1, 2, 3, 4, 5 ], 'le').toString(16), '504030201'); - }); - }); - - // the Array code is able to handle Buffer - describe('with Buffer input', function () { - it('should not fail on empty Buffer', function () { - assert.equal(new BN(new Buffer(0)).toString(16), '0'); - }); - - it('should import/export big endian', function () { - assert.equal(new BN(new Buffer('010203', 'hex')).toString(16), '10203'); - }); - - it('should import little endian', function () { - assert.equal(new BN(new Buffer('010203', 'hex'), 'le').toString(16), '30201'); - }); - }); - - describe('with BN input', function () { - it('should clone BN', function () { - var num = new BN(12345); - assert.equal(new BN(num).toString(10), '12345'); - }); - }); -}); diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/bn.js/test/fixtures.js b/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/bn.js/test/fixtures.js deleted file mode 100644 index 39fd661d..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/bn.js/test/fixtures.js +++ /dev/null @@ -1,264 +0,0 @@ -exports.dhGroups = { - p16: { - prime: 'ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd1' + - '29024e088a67cc74020bbea63b139b22514a08798e3404dd' + - 'ef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245' + - 'e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7ed' + - 'ee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3d' + - 'c2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f' + - '83655d23dca3ad961c62f356208552bb9ed529077096966d' + - '670c354e4abc9804f1746c08ca18217c32905e462e36ce3b' + - 'e39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9' + - 'de2bcbf6955817183995497cea956ae515d2261898fa0510' + - '15728e5a8aaac42dad33170d04507a33a85521abdf1cba64' + - 'ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7' + - 'abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6b' + - 'f12ffa06d98a0864d87602733ec86a64521f2b18177b200c' + - 'bbe117577a615d6c770988c0bad946e208e24fa074e5ab31' + - '43db5bfce0fd108e4b82d120a92108011a723c12a787e6d7' + - '88719a10bdba5b2699c327186af4e23c1a946834b6150bda' + - '2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6' + - '287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed' + - '1f612970cee2d7afb81bdd762170481cd0069127d5b05aa9' + - '93b4ea988d8fddc186ffb7dc90a6c08f4df435c934063199' + - 'ffffffffffffffff', - priv: '6d5923e6449122cbbcc1b96093e0b7e4fd3e469f58daddae' + - '53b49b20664f4132675df9ce98ae0cfdcac0f4181ccb643b' + - '625f98104dcf6f7d8e81961e2cab4b5014895260cb977c7d' + - '2f981f8532fb5da60b3676dfe57f293f05d525866053ac7e' + - '65abfd19241146e92e64f309a97ef3b529af4d6189fa416c' + - '9e1a816c3bdf88e5edf48fbd8233ef9038bb46faa95122c0' + - '5a426be72039639cd2d53d37254b3d258960dcb33c255ede' + - '20e9d7b4b123c8b4f4b986f53cdd510d042166f7dd7dca98' + - '7c39ab36381ba30a5fdd027eb6128d2ef8e5802a2194d422' + - 'b05fe6e1cb4817789b923d8636c1ec4b7601c90da3ddc178' + - '52f59217ae070d87f2e75cbfb6ff92430ad26a71c8373452' + - 'ae1cc5c93350e2d7b87e0acfeba401aaf518580937bf0b6c' + - '341f8c49165a47e49ce50853989d07171c00f43dcddddf72' + - '94fb9c3f4e1124e98ef656b797ef48974ddcd43a21fa06d0' + - '565ae8ce494747ce9e0ea0166e76eb45279e5c6471db7df8' + - 'cc88764be29666de9c545e72da36da2f7a352fb17bdeb982' + - 'a6dc0193ec4bf00b2e533efd6cd4d46e6fb237b775615576' + - 'dd6c7c7bbc087a25e6909d1ebc6e5b38e5c8472c0fc429c6' + - 'f17da1838cbcd9bbef57c5b5522fd6053e62ba21fe97c826' + - 'd3889d0cc17e5fa00b54d8d9f0f46fb523698af965950f4b' + - '941369e180f0aece3870d9335f2301db251595d173902cad' + - '394eaa6ffef8be6c', - pub: 'd53703b7340bc89bfc47176d351e5cf86d5a18d9662eca3c' + - '9759c83b6ccda8859649a5866524d77f79e501db923416ca' + - '2636243836d3e6df752defc0fb19cc386e3ae48ad647753f' + - 'bf415e2612f8a9fd01efe7aca249589590c7e6a0332630bb' + - '29c5b3501265d720213790556f0f1d114a9e2071be3620bd' + - '4ee1e8bb96689ac9e226f0a4203025f0267adc273a43582b' + - '00b70b490343529eaec4dcff140773cd6654658517f51193' + - '13f21f0a8e04fe7d7b21ffeca85ff8f87c42bb8d9cb13a72' + - 'c00e9c6e9dfcedda0777af951cc8ccab90d35e915e707d8e' + - '4c2aca219547dd78e9a1a0730accdc9ad0b854e51edd1e91' + - '4756760bab156ca6e3cb9c625cf0870def34e9ac2e552800' + - 'd6ce506d43dbbc75acfa0c8d8fb12daa3c783fb726f187d5' + - '58131779239c912d389d0511e0f3a81969d12aeee670e48f' + - 'ba41f7ed9f10705543689c2506b976a8ffabed45e33795b0' + - '1df4f6b993a33d1deab1316a67419afa31fbb6fdd252ee8c' + - '7c7d1d016c44e3fcf6b41898d7f206aa33760b505e4eff2e' + - 'c624bc7fe636b1d59e45d6f904fc391419f13d1f0cdb5b6c' + - '2378b09434159917dde709f8a6b5dc30994d056e3f964371' + - '11587ac7af0a442b8367a7bd940f752ddabf31cf01171e24' + - 'd78df136e9681cd974ce4f858a5fb6efd3234a91857bb52d' + - '9e7b414a8bc66db4b5a73bbeccfb6eb764b4f0cbf0375136' + - 'b024b04e698d54a5' - }, - p17: { - prime: 'ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd1' + - '29024e088a67cc74020bbea63b139b22514a08798e3404dd' + - 'ef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245' + - 'e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7ed' + - 'ee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3d' + - 'c2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f' + - '83655d23dca3ad961c62f356208552bb9ed529077096966d' + - '670c354e4abc9804f1746c08ca18217c32905e462e36ce3b' + - 'e39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9' + - 'de2bcbf6955817183995497cea956ae515d2261898fa0510' + - '15728e5a8aaac42dad33170d04507a33a85521abdf1cba64' + - 'ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7' + - 'abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6b' + - 'f12ffa06d98a0864d87602733ec86a64521f2b18177b200c' + - 'bbe117577a615d6c770988c0bad946e208e24fa074e5ab31' + - '43db5bfce0fd108e4b82d120a92108011a723c12a787e6d7' + - '88719a10bdba5b2699c327186af4e23c1a946834b6150bda' + - '2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6' + - '287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed' + - '1f612970cee2d7afb81bdd762170481cd0069127d5b05aa9' + - '93b4ea988d8fddc186ffb7dc90a6c08f4df435c934028492' + - '36c3fab4d27c7026c1d4dcb2602646dec9751e763dba37bd' + - 'f8ff9406ad9e530ee5db382f413001aeb06a53ed9027d831' + - '179727b0865a8918da3edbebcf9b14ed44ce6cbaced4bb1b' + - 'db7f1447e6cc254b332051512bd7af426fb8f401378cd2bf' + - '5983ca01c64b92ecf032ea15d1721d03f482d7ce6e74fef6' + - 'd55e702f46980c82b5a84031900b1c9e59e7c97fbec7e8f3' + - '23a97a7e36cc88be0f1d45b7ff585ac54bd407b22b4154aa' + - 'cc8f6d7ebf48e1d814cc5ed20f8037e0a79715eef29be328' + - '06a1d58bb7c5da76f550aa3d8a1fbff0eb19ccb1a313d55c' + - 'da56c9ec2ef29632387fe8d76e3c0468043e8f663f4860ee' + - '12bf2d5b0b7474d6e694f91e6dcc4024ffffffffffffffff', - priv: '6017f2bc23e1caff5b0a8b4e1fc72422b5204415787801dc' + - '025762b8dbb98ab57603aaaa27c4e6bdf742b4a1726b9375' + - 'a8ca3cf07771779589831d8bd18ddeb79c43e7e77d433950' + - 'e652e49df35b11fa09644874d71d62fdaffb580816c2c88c' + - '2c4a2eefd4a660360316741b05a15a2e37f236692ad3c463' + - 'fff559938fc6b77176e84e1bb47fb41af691c5eb7bb81bd8' + - 'c918f52625a1128f754b08f5a1403b84667231c4dfe07ed4' + - '326234c113931ce606037e960f35a2dfdec38a5f057884d3' + - '0af8fab3be39c1eeb390205fd65982191fc21d5aa30ddf51' + - 'a8e1c58c0c19fc4b4a7380ea9e836aaf671c90c29bc4bcc7' + - '813811aa436a7a9005de9b507957c56a9caa1351b6efc620' + - '7225a18f6e97f830fb6a8c4f03b82f4611e67ab9497b9271' + - 'd6ac252793cc3e5538990dbd894d2dbc2d152801937d9f74' + - 'da4b741b50b4d40e4c75e2ac163f7b397fd555648b249f97' + - 'ffe58ffb6d096aa84534c4c5729cff137759bd34e80db4ab' + - '47e2b9c52064e7f0bf677f72ac9e5d0c6606943683f9d12f' + - '180cf065a5cb8ec3179a874f358847a907f8471d15f1e728' + - '7023249d6d13c82da52628654438f47b8b5cdf4761fbf6ad' + - '9219eceac657dbd06cf2ab776ad4c968f81c3d039367f0a4' + - 'd77c7ec4435c27b6c147071665100063b5666e06eb2fb2cc' + - '3159ba34bc98ca346342195f6f1fb053ddc3bc1873564d40' + - '1c6738cdf764d6e1ff25ca5926f80102ea6593c17170966b' + - 'b5d7352dd7fb821230237ea3ebed1f920feaadbd21be295a' + - '69f2083deae9c5cdf5f4830eb04b7c1f80cc61c17232d79f' + - '7ecc2cc462a7965f804001c89982734e5abba2d31df1b012' + - '152c6b226dff34510b54be8c2cd68d795def66c57a3abfb6' + - '896f1d139e633417f8c694764974d268f46ece3a8d6616ea' + - 'a592144be48ee1e0a1595d3e5edfede5b27cec6c48ceb2ff' + - 'b42cb44275851b0ebf87dfc9aa2d0cb0805e9454b051dfe8' + - 'a29fadd82491a4b4c23f2d06ba45483ab59976da1433c9ce' + - '500164b957a04cf62dd67595319b512fc4b998424d1164dd' + - 'bbe5d1a0f7257cbb04ec9b5ed92079a1502d98725023ecb2', - pub: '3bf836229c7dd874fe37c1790d201e82ed8e192ed61571ca' + - '7285264974eb2a0171f3747b2fc23969a916cbd21e14f7e2' + - 'f0d72dcd2247affba926f9e7bb99944cb5609aed85e71b89' + - 'e89d2651550cb5bd8281bd3144066af78f194032aa777739' + - 'cccb7862a1af401f99f7e5c693f25ddce2dedd9686633820' + - 'd28d0f5ed0c6b5a094f5fe6170b8e2cbc9dff118398baee6' + - 'e895a6301cb6e881b3cae749a5bdf5c56fc897ff68bc73f2' + - '4811bb108b882872bade1f147d886a415cda2b93dd90190c' + - 'be5c2dd53fe78add5960e97f58ff2506afe437f4cf4c912a' + - '397c1a2139ac6207d3ab76e6b7ffd23bb6866dd7f87a9ae5' + - '578789084ff2d06ea0d30156d7a10496e8ebe094f5703539' + - '730f5fdbebc066de417be82c99c7da59953071f49da7878d' + - 'a588775ff2a7f0084de390f009f372af75cdeba292b08ea8' + - '4bd13a87e1ca678f9ad148145f7cef3620d69a891be46fbb' + - 'cad858e2401ec0fd72abdea2f643e6d0197b7646fbb83220' + - '0f4cf7a7f6a7559f9fb0d0f1680822af9dbd8dec4cd1b5e1' + - '7bc799e902d9fe746ddf41da3b7020350d3600347398999a' + - 'baf75d53e03ad2ee17de8a2032f1008c6c2e6618b62f225b' + - 'a2f350179445debe68500fcbb6cae970a9920e321b468b74' + - '5fb524fb88abbcacdca121d737c44d30724227a99745c209' + - 'b970d1ff93bbc9f28b01b4e714d6c9cbd9ea032d4e964d8e' + - '8fff01db095160c20b7646d9fcd314c4bc11bcc232aeccc0' + - 'fbedccbc786951025597522eef283e3f56b44561a0765783' + - '420128638c257e54b972a76e4261892d81222b3e2039c61a' + - 'ab8408fcaac3d634f848ab3ee65ea1bd13c6cd75d2e78060' + - 'e13cf67fbef8de66d2049e26c0541c679fff3e6afc290efe' + - '875c213df9678e4a7ec484bc87dae5f0a1c26d7583e38941' + - 'b7c68b004d4df8b004b666f9448aac1cc3ea21461f41ea5d' + - 'd0f7a9e6161cfe0f58bcfd304bdc11d78c2e9d542e86c0b5' + - '6985cc83f693f686eaac17411a8247bf62f5ccc7782349b5' + - 'cc1f20e312fa2acc0197154d1bfee507e8db77e8f2732f2d' + - '641440ccf248e8643b2bd1e1f9e8239356ab91098fcb431d', - q: 'a899c59999bf877d96442d284359783bdc64b5f878b688fe' + - '51407f0526e616553ad0aaaac4d5bed3046f10a1faaf42bb' + - '2342dc4b7908eea0c46e4c4576897675c2bfdc4467870d3d' + - 'cd90adaed4359237a4bc6924bfb99aa6bf5f5ede15b574ea' + - 'e977eac096f3c67d09bda574c6306c6123fa89d2f086b8dc' + - 'ff92bc570c18d83fe6c810ccfd22ce4c749ef5e6ead3fffe' + - 'c63d95e0e3fde1df9db6a35fa1d107058f37e41957769199' + - 'd945dd7a373622c65f0af3fd9eb1ddc5c764bbfaf7a3dc37' + - '2548e683b970dac4aa4b9869080d2376c9adecebb84e172c' + - '09aeeb25fb8df23e60033260c4f8aac6b8b98ab894b1fb84' + - 'ebb83c0fb2081c3f3eee07f44e24d8fabf76f19ed167b0d7' + - 'ff971565aa4efa3625fce5a43ceeaa3eebb3ce88a00f597f' + - '048c69292b38dba2103ecdd5ec4ccfe3b2d87fa6202f334b' + - 'c1cab83b608dfc875b650b69f2c7e23c0b2b4adf149a6100' + - 'db1b6dbad4679ecb1ea95eafaba3bd00db11c2134f5a8686' + - '358b8b2ab49a1b2e85e1e45caeac5cd4dc0b3b5fffba8871' + - '1c6baf399edd48dad5e5c313702737a6dbdcede80ca358e5' + - '1d1c4fe42e8948a084403f61baed38aa9a1a5ce2918e9f33' + - '100050a430b47bc592995606440272a4994677577a6aaa1b' + - 'a101045dbec5a4e9566dab5445d1af3ed19519f07ac4e2a8' + - 'bd0a84b01978f203a9125a0be020f71fab56c2c9e344d4f4' + - '12d53d3cd8eb74ca5122002e931e3cb0bd4b7492436be17a' + - 'd7ebe27148671f59432c36d8c56eb762655711cfc8471f70' + - '83a8b7283bcb3b1b1d47d37c23d030288cfcef05fbdb4e16' + - '652ee03ee7b77056a808cd700bc3d9ef826eca9a59be959c' + - '947c865d6b372a1ca2d503d7df6d7611b12111665438475a' + - '1c64145849b3da8c2d343410df892d958db232617f9896f1' + - 'de95b8b5a47132be80dd65298c7f2047858409bf762dbc05' + - 'a62ca392ac40cfb8201a0607a2cae07d99a307625f2b2d04' + - 'fe83fbd3ab53602263410f143b73d5b46fc761882e78c782' + - 'd2c36e716a770a7aefaf7f76cea872db7bffefdbc4c2f9e0' + - '39c19adac915e7a63dcb8c8c78c113f29a3e0bc10e100ce0', - qs: '6f0a2fb763eaeb8eb324d564f03d4a55fdcd709e5f1b65e9' + - '5702b0141182f9f945d71bc3e64a7dfdae7482a7dd5a4e58' + - 'bc38f78de2013f2c468a621f08536969d2c8d011bb3bc259' + - '2124692c91140a5472cad224acdacdeae5751dadfdf068b8' + - '77bfa7374694c6a7be159fc3d24ff9eeeecaf62580427ad8' + - '622d48c51a1c4b1701d768c79d8c819776e096d2694107a2' + - 'f3ec0c32224795b59d32894834039dacb369280afb221bc0' + - '90570a93cf409889b818bb30cccee98b2aa26dbba0f28499' + - '08e1a3cd43fa1f1fb71049e5c77c3724d74dc351d9989057' + - '37bbda3805bd6b1293da8774410fb66e3194e18cdb304dd9' + - 'a0b59b583dcbc9fc045ac9d56aea5cfc9f8a0b95da1e11b7' + - '574d1f976e45fe12294997fac66ca0b83fc056183549e850' + - 'a11413cc4abbe39a211e8c8cbf82f2a23266b3c10ab9e286' + - '07a1b6088909cddff856e1eb6b2cde8bdac53fa939827736' + - 'ca1b892f6c95899613442bd02dbdb747f02487718e2d3f22' + - 'f73734d29767ed8d0e346d0c4098b6fdcb4df7d0c4d29603' + - '5bffe80d6c65ae0a1b814150d349096baaf950f2caf298d2' + - 'b292a1d48cf82b10734fe8cedfa16914076dfe3e9b51337b' + - 'ed28ea1e6824bb717b641ca0e526e175d3e5ed7892aebab0' + - 'f207562cc938a821e2956107c09b6ce4049adddcd0b7505d' + - '49ae6c69a20122461102d465d93dc03db026be54c303613a' + - 'b8e5ce3fd4f65d0b6162ff740a0bf5469ffd442d8c509cd2' + - '3b40dab90f6776ca17fc0678774bd6eee1fa85ababa52ec1' + - 'a15031eb677c6c488661dddd8b83d6031fe294489ded5f08' + - '8ad1689a14baeae7e688afa3033899c81f58de39b392ca94' + - 'af6f15a46f19fa95c06f9493c8b96a9be25e78b9ea35013b' + - 'caa76de6303939299d07426a88a334278fc3d0d9fa71373e' + - 'be51d3c1076ab93a11d3d0d703366ff8cde4c11261d488e5' + - '60a2bdf3bfe2476032294800d6a4a39d306e65c6d7d8d66e' + - '5ec63eee94531e83a9bddc458a2b508285c0ee10b7bd94da' + - '2815a0c5bd5b2e15cbe66355e42f5af8955cdfc0b3a4996d' + - '288db1f4b32b15643b18193e378cb7491f3c3951cdd044b1' + - 'a519571bffac2da986f5f1d506c66530a55f70751e24fa8e' + - 'd83ac2347f4069fb561a5565e78c6f0207da24e889a93a96' + - '65f717d9fe8a2938a09ab5f81be7ccecf466c0397fc15a57' + - '469939793f302739765773c256a3ca55d0548afd117a7cae' + - '98ca7e0d749a130c7b743d376848e255f8fdbe4cb4480b63' + - 'cd2c015d1020cf095d175f3ca9dcdfbaf1b2a6e6468eee4c' + - 'c750f2132a77f376bd9782b9d0ff4da98621b898e251a263' + - '4301ba2214a8c430b2f7a79dbbfd6d7ff6e9b0c137b025ff' + - '587c0bf912f0b19d4fff96b1ecd2ca990c89b386055c60f2' + - '3b94214bd55096f17a7b2c0fa12b333235101cd6f28a128c' + - '782e8a72671adadebbd073ded30bd7f09fb693565dcf0bf3' + - '090c21d13e5b0989dd8956f18f17f4f69449a13549c9d80a' + - '77e5e61b5aeeee9528634100e7bc390672f0ded1ca53555b' + - 'abddbcf700b9da6192255bddf50a76b709fbed251dce4c7e' + - '1ca36b85d1e97c1bc9d38c887a5adf140f9eeef674c31422' + - 'e65f63cae719f8c1324e42fa5fd8500899ef5aa3f9856aa7' + - 'ce10c85600a040343204f36bfeab8cfa6e9deb8a2edd2a8e' + - '018d00c7c9fa3a251ad0f57183c37e6377797653f382ec7a' + - '2b0145e16d3c856bc3634b46d90d7198aff12aff88a30e34' + - 'e2bfaf62705f3382576a9d3eeb0829fca2387b5b654af46e' + - '5cf6316fb57d59e5ea6c369061ac64d99671b0e516529dd5' + - 'd9c48ea0503e55fee090d36c5ea8b5954f6fcc0060794e1c' + - 'b7bc24aa1e5c0142fd4ce6e8fd5aa92a7bf84317ea9e1642' + - 'b6995bac6705adf93cbce72433ed0871139970d640f67b78' + - 'e63a7a6d849db2567df69ac7d79f8c62664ac221df228289' + - 'd0a4f9ebd9acb4f87d49da64e51a619fd3f3baccbd9feb12' + - '5abe0cc2c8d17ed1d8546da2b6c641f4d3020a5f9b9f26ac' + - '16546c2d61385505612275ea344c2bbf1ce890023738f715' + - '5e9eba6a071678c8ebd009c328c3eb643679de86e69a9fa5' + - '67a9e146030ff03d546310a0a568c5ba0070e0da22f2cef8' + - '54714b04d399bbc8fd261f9e8efcd0e83bdbc3f5cfb2d024' + - '3e398478cc598e000124eb8858f9df8f52946c2a1ca5c400' - } -}; diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/bn.js/test/pummel/dh-group-test.js b/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/bn.js/test/pummel/dh-group-test.js deleted file mode 100644 index 37a259ff..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/bn.js/test/pummel/dh-group-test.js +++ /dev/null @@ -1,23 +0,0 @@ -/* global describe, it */ - -var assert = require('assert'); -var BN = require('../../').BN; -var fixtures = require('../fixtures'); - -describe('BN.js/Slow DH test', function () { - var groups = fixtures.dhGroups; - Object.keys(groups).forEach(function (name) { - it('should match public key for ' + name + ' group', function () { - var group = groups[name]; - - this.timeout(3600 * 1000); - - var base = new BN(2); - var mont = BN.red(new BN(group.prime, 16)); - var priv = new BN(group.priv, 16); - var multed = base.toRed(mont).redPow(priv).fromRed(); - var actual = new Buffer(multed.toArray()); - assert.equal(actual.toString('hex'), group.pub); - }); - }); -}); diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/bn.js/test/red-test.js b/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/bn.js/test/red-test.js deleted file mode 100644 index fc2498c9..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/bn.js/test/red-test.js +++ /dev/null @@ -1,263 +0,0 @@ -/* global describe, it */ - -var assert = require('assert'); -var BN = require('../').BN; - -describe('BN.js/Reduction context', function () { - function testMethod (name, fn) { - describe(name + ' method', function () { - it('should support add, iadd, sub, isub operations', function () { - var p = new BN(257); - var m = fn(p); - var a = new BN(123).toRed(m); - var b = new BN(231).toRed(m); - - assert.equal(a.redAdd(b).fromRed().toString(10), '97'); - assert.equal(a.redSub(b).fromRed().toString(10), '149'); - assert.equal(b.redSub(a).fromRed().toString(10), '108'); - - assert.equal(a.clone().redIAdd(b).fromRed().toString(10), '97'); - assert.equal(a.clone().redISub(b).fromRed().toString(10), '149'); - assert.equal(b.clone().redISub(a).fromRed().toString(10), '108'); - }); - - it('should support pow and mul operations', function () { - var p192 = new BN( - 'fffffffffffffffffffffffffffffffeffffffffffffffff', - 16); - var m = fn(p192); - var a = new BN(123); - var b = new BN(231); - var c = a.toRed(m).redMul(b.toRed(m)).fromRed(); - assert(c.cmp(a.mul(b).mod(p192)) === 0); - - assert.equal(a.toRed(m).redPow(new BN(3)).fromRed() - .cmp(a.sqr().mul(a)), 0); - assert.equal(a.toRed(m).redPow(new BN(4)).fromRed() - .cmp(a.sqr().sqr()), 0); - assert.equal(a.toRed(m).redPow(new BN(8)).fromRed() - .cmp(a.sqr().sqr().sqr()), 0); - assert.equal(a.toRed(m).redPow(new BN(9)).fromRed() - .cmp(a.sqr().sqr().sqr().mul(a)), 0); - assert.equal(a.toRed(m).redPow(new BN(17)).fromRed() - .cmp(a.sqr().sqr().sqr().sqr().mul(a)), 0); - assert.equal( - a.toRed(m).redPow(new BN('deadbeefabbadead', 16)).fromRed() - .toString(16), - '3aa0e7e304e320b68ef61592bcb00341866d6fa66e11a4d6'); - }); - - it('should sqrtm numbers', function () { - var p = new BN(263); - var m = fn(p); - var q = new BN(11).toRed(m); - - var qr = q.redSqrt(); - assert.equal(qr.redSqr().cmp(q), 0); - - qr = q.redSqrt(); - assert.equal(qr.redSqr().cmp(q), 0); - - p = new BN( - 'fffffffffffffffffffffffffffffffeffffffffffffffff', - 16); - m = fn(p); - - q = new BN(13).toRed(m); - qr = q.redSqrt(true, p); - assert.equal(qr.redSqr().cmp(q), 0); - - qr = q.redSqrt(false, p); - assert.equal(qr.redSqr().cmp(q), 0); - - // Tonelli-shanks - p = new BN(13); - m = fn(p); - q = new BN(10).toRed(m); - assert.equal(q.redSqrt().fromRed().toString(10), '7'); - }); - - it('should invm numbers', function () { - var p = new BN(257); - var m = fn(p); - var a = new BN(3).toRed(m); - var b = a.redInvm(); - assert.equal(a.redMul(b).fromRed().toString(16), '1'); - }); - - it('should invm numbers (regression)', function () { - var p = new BN( - 'ffffffff00000001000000000000000000000000ffffffffffffffffffffffff', - 16); - var a = new BN( - 'e1d969b8192fbac73ea5b7921896d6a2263d4d4077bb8e5055361d1f7f8163f3', - 16); - - var m = fn(p); - a = a.toRed(m); - - assert.equal(a.redInvm().fromRed().negative, 0); - }); - - it('should imul numbers', function () { - var p = new BN( - 'fffffffffffffffffffffffffffffffeffffffffffffffff', - 16); - var m = fn(p); - - var a = new BN('deadbeefabbadead', 16); - var b = new BN('abbadeadbeefdead', 16); - var c = a.mul(b).mod(p); - - assert.equal(a.toRed(m).redIMul(b.toRed(m)).fromRed().toString(16), - c.toString(16)); - }); - - it('should pow(base, 0) == 1', function () { - var base = new BN(256).toRed(BN.red('k256')); - var exponent = new BN(0); - var result = base.redPow(exponent); - assert.equal(result.toString(), '1'); - }); - - it('should shl numbers', function () { - var base = new BN(256).toRed(BN.red('k256')); - var result = base.redShl(1); - assert.equal(result.toString(), '512'); - }); - - it('should reduce when converting to red', function () { - var p = new BN(257); - var m = fn(p); - var a = new BN(5).toRed(m); - - assert.doesNotThrow(function () { - var b = a.redISub(new BN(512).toRed(m)); - b.redISub(new BN(512).toRed(m)); - }); - }); - - it('redNeg and zero value', function () { - var a = new BN(0).toRed(BN.red('k256')).redNeg(); - assert.equal(a.isZero(), true); - }); - - it('should not allow modulus <= 1', function () { - assert.throws(function () { - BN.red(new BN(0)); - }, /^Error: modulus must be greater than 1$/); - - assert.throws(function () { - BN.red(new BN(1)); - }, /^Error: modulus must be greater than 1$/); - - assert.doesNotThrow(function () { - BN.red(new BN(2)); - }); - }); - }); - } - - testMethod('Plain', BN.red); - testMethod('Montgomery', BN.mont); - - describe('Pseudo-Mersenne Primes', function () { - it('should reduce numbers mod k256', function () { - var p = BN._prime('k256'); - - assert.equal(p.ireduce(new BN(0xdead)).toString(16), 'dead'); - assert.equal(p.ireduce(new BN('deadbeef', 16)).toString(16), 'deadbeef'); - - var num = new BN('fedcba9876543210fedcba9876543210dead' + - 'fedcba9876543210fedcba9876543210dead', - 16); - var exp = num.mod(p.p).toString(16); - assert.equal(p.ireduce(num).toString(16), exp); - - var regr = new BN('f7e46df64c1815962bf7bc9c56128798' + - '3f4fcef9cb1979573163b477eab93959' + - '335dfb29ef07a4d835d22aa3b6797760' + - '70a8b8f59ba73d56d01a79af9', - 16); - exp = regr.mod(p.p).toString(16); - - assert.equal(p.ireduce(regr).toString(16), exp); - }); - - it('should not fail to invm number mod k256', function () { - var regr2 = new BN( - '6c150c4aa9a8cf1934485d40674d4a7cd494675537bda36d49405c5d2c6f496f', 16); - regr2 = regr2.toRed(BN.red('k256')); - assert.equal(regr2.redInvm().redMul(regr2).fromRed().cmpn(1), 0); - }); - - it('should correctly square the number', function () { - var p = BN._prime('k256').p; - var red = BN.red('k256'); - - var n = new BN('9cd8cb48c3281596139f147c1364a3ed' + - 'e88d3f310fdb0eb98c924e599ca1b3c9', - 16); - var expected = n.sqr().mod(p); - var actual = n.toRed(red).redSqr().fromRed(); - - assert.equal(actual.toString(16), expected.toString(16)); - }); - - it('redISqr should return right result', function () { - var n = new BN('30f28939', 16); - var actual = n.toRed(BN.red('k256')).redISqr().fromRed(); - assert.equal(actual.toString(16), '95bd93d19520eb1'); - }); - }); - - it('should avoid 4.1.0 regresion', function () { - function bits2int (obits, q) { - var bits = new BN(obits); - var shift = (obits.length << 3) - q.bitLength(); - if (shift > 0) { - bits.ishrn(shift); - } - return bits; - } - var t = new Buffer('aff1651e4cd6036d57aa8b2a05ccf1a9d5a40166340ecbbdc55' + - 'be10b568aa0aa3d05ce9a2fcec9df8ed018e29683c6051cb83e' + - '46ce31ba4edb045356a8d0d80b', 'hex'); - var g = new BN('5c7ff6b06f8f143fe8288433493e4769c4d988ace5be25a0e24809670' + - '716c613d7b0cee6932f8faa7c44d2cb24523da53fbe4f6ec3595892d1' + - 'aa58c4328a06c46a15662e7eaa703a1decf8bbb2d05dbe2eb956c142a' + - '338661d10461c0d135472085057f3494309ffa73c611f78b32adbb574' + - '0c361c9f35be90997db2014e2ef5aa61782f52abeb8bd6432c4dd097b' + - 'c5423b285dafb60dc364e8161f4a2a35aca3a10b1c4d203cc76a470a3' + - '3afdcbdd92959859abd8b56e1725252d78eac66e71ba9ae3f1dd24871' + - '99874393cd4d832186800654760e1e34c09e4d155179f9ec0dc4473f9' + - '96bdce6eed1cabed8b6f116f7ad9cf505df0f998e34ab27514b0ffe7', - 16); - var p = new BN('9db6fb5951b66bb6fe1e140f1d2ce5502374161fd6538df1648218642' + - 'f0b5c48c8f7a41aadfa187324b87674fa1822b00f1ecf8136943d7c55' + - '757264e5a1a44ffe012e9936e00c1d3e9310b01c7d179805d3058b2a9' + - 'f4bb6f9716bfe6117c6b5b3cc4d9be341104ad4a80ad6c94e005f4b99' + - '3e14f091eb51743bf33050c38de235567e1b34c3d6a5c0ceaa1a0f368' + - '213c3d19843d0b4b09dcb9fc72d39c8de41f1bf14d4bb4563ca283716' + - '21cad3324b6a2d392145bebfac748805236f5ca2fe92b871cd8f9c36d' + - '3292b5509ca8caa77a2adfc7bfd77dda6f71125a7456fea153e433256' + - 'a2261c6a06ed3693797e7995fad5aabbcfbe3eda2741e375404ae25b', - 16); - var q = new BN('f2c3119374ce76c9356990b465374a17f23f9ed35089bd969f61c6dde' + - '9998c1f', 16); - var k = bits2int(t, q); - var expectedR = '89ec4bb1400eccff8e7d9aa515cd1de7803f2daff09693ee7fd1353e' + - '90a68307'; - var r = g.toRed(BN.mont(p)).redPow(k).fromRed().mod(q); - assert.equal(r.toString(16), expectedR); - }); - - it('K256.split for 512 bits number should return equal numbers', function () { - var red = BN.red('k256'); - var input = new BN(1).iushln(512).subn(1); - assert.equal(input.bitLength(), 512); - var output = new BN(0); - red.prime.split(input, output); - assert.equal(input.cmp(output), 0); - }); -}); diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/bn.js/test/utils-test.js b/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/bn.js/test/utils-test.js deleted file mode 100644 index 8571905a..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/bn.js/test/utils-test.js +++ /dev/null @@ -1,345 +0,0 @@ -/* global describe, it */ - -var assert = require('assert'); -var BN = require('../').BN; - -describe('BN.js/Utils', function () { - describe('.toString()', function () { - describe('binary padding', function () { - it('should have a length of 256', function () { - var a = new BN(0); - - assert.equal(a.toString(2, 256).length, 256); - }); - }); - describe('hex padding', function () { - it('should have length of 8 from leading 15', function () { - var a = new BN('ffb9602', 16); - - assert.equal(a.toString('hex', 2).length, 8); - }); - - it('should have length of 8 from leading zero', function () { - var a = new BN('fb9604', 16); - - assert.equal(a.toString('hex', 8).length, 8); - }); - - it('should have length of 8 from leading zeros', function () { - var a = new BN(0); - - assert.equal(a.toString('hex', 8).length, 8); - }); - - it('should have length of 64 from leading 15', function () { - var a = new BN( - 'ffb96ff654e61130ba8422f0debca77a0ea74ae5ea8bca9b54ab64aabf01003', - 16); - - assert.equal(a.toString('hex', 2).length, 64); - }); - - it('should have length of 64 from leading zero', function () { - var a = new BN( - 'fb96ff654e61130ba8422f0debca77a0ea74ae5ea8bca9b54ab64aabf01003', - 16); - - assert.equal(a.toString('hex', 64).length, 64); - }); - }); - }); - - describe('.isNeg()', function () { - it('should return true for negative numbers', function () { - assert.equal(new BN(-1).isNeg(), true); - assert.equal(new BN(1).isNeg(), false); - assert.equal(new BN(0).isNeg(), false); - assert.equal(new BN('-0', 10).isNeg(), false); - }); - }); - - describe('.isOdd()', function () { - it('should return true for odd numbers', function () { - assert.equal(new BN(0).isOdd(), false); - assert.equal(new BN(1).isOdd(), true); - assert.equal(new BN(2).isOdd(), false); - assert.equal(new BN('-0', 10).isOdd(), false); - assert.equal(new BN('-1', 10).isOdd(), true); - assert.equal(new BN('-2', 10).isOdd(), false); - }); - }); - - describe('.isEven()', function () { - it('should return true for even numbers', function () { - assert.equal(new BN(0).isEven(), true); - assert.equal(new BN(1).isEven(), false); - assert.equal(new BN(2).isEven(), true); - assert.equal(new BN('-0', 10).isEven(), true); - assert.equal(new BN('-1', 10).isEven(), false); - assert.equal(new BN('-2', 10).isEven(), true); - }); - }); - - describe('.isZero()', function () { - it('should return true for zero', function () { - assert.equal(new BN(0).isZero(), true); - assert.equal(new BN(1).isZero(), false); - assert.equal(new BN(0xffffffff).isZero(), false); - }); - }); - - describe('.bitLength()', function () { - it('should return proper bitLength', function () { - assert.equal(new BN(0).bitLength(), 0); - assert.equal(new BN(0x1).bitLength(), 1); - assert.equal(new BN(0x2).bitLength(), 2); - assert.equal(new BN(0x3).bitLength(), 2); - assert.equal(new BN(0x4).bitLength(), 3); - assert.equal(new BN(0x8).bitLength(), 4); - assert.equal(new BN(0x10).bitLength(), 5); - assert.equal(new BN(0x100).bitLength(), 9); - assert.equal(new BN(0x123456).bitLength(), 21); - assert.equal(new BN('123456789', 16).bitLength(), 33); - assert.equal(new BN('8023456789', 16).bitLength(), 40); - }); - }); - - describe('.byteLength()', function () { - it('should return proper byteLength', function () { - assert.equal(new BN(0).byteLength(), 0); - assert.equal(new BN(0x1).byteLength(), 1); - assert.equal(new BN(0x2).byteLength(), 1); - assert.equal(new BN(0x3).byteLength(), 1); - assert.equal(new BN(0x4).byteLength(), 1); - assert.equal(new BN(0x8).byteLength(), 1); - assert.equal(new BN(0x10).byteLength(), 1); - assert.equal(new BN(0x100).byteLength(), 2); - assert.equal(new BN(0x123456).byteLength(), 3); - assert.equal(new BN('123456789', 16).byteLength(), 5); - assert.equal(new BN('8023456789', 16).byteLength(), 5); - }); - }); - - describe('.toArray()', function () { - it('should return [ 0 ] for `0`', function () { - var n = new BN(0); - assert.deepEqual(n.toArray('be'), [ 0 ]); - assert.deepEqual(n.toArray('le'), [ 0 ]); - }); - - it('should zero pad to desired lengths', function () { - var n = new BN(0x123456); - assert.deepEqual(n.toArray('be', 5), [ 0x00, 0x00, 0x12, 0x34, 0x56 ]); - assert.deepEqual(n.toArray('le', 5), [ 0x56, 0x34, 0x12, 0x00, 0x00 ]); - }); - - it('should throw when naturally larger than desired length', function () { - var n = new BN(0x123456); - assert.throws(function () { - n.toArray('be', 2); - }, /^Error: byte array longer than desired length$/); - }); - }); - - describe('.toBuffer', function () { - it('should return proper Buffer', function () { - var n = new BN(0x123456); - assert.deepEqual(n.toBuffer('be', 5).toString('hex'), '0000123456'); - assert.deepEqual(n.toBuffer('le', 5).toString('hex'), '5634120000'); - }); - }); - - describe('.toNumber()', function () { - it('should return proper Number if below the limit', function () { - assert.deepEqual(new BN(0x123456).toNumber(), 0x123456); - assert.deepEqual(new BN(0x3ffffff).toNumber(), 0x3ffffff); - assert.deepEqual(new BN(0x4000000).toNumber(), 0x4000000); - assert.deepEqual(new BN(0x10000000000000).toNumber(), 0x10000000000000); - assert.deepEqual(new BN(0x10040004004000).toNumber(), 0x10040004004000); - assert.deepEqual(new BN(-0x123456).toNumber(), -0x123456); - assert.deepEqual(new BN(-0x3ffffff).toNumber(), -0x3ffffff); - assert.deepEqual(new BN(-0x4000000).toNumber(), -0x4000000); - assert.deepEqual(new BN(-0x10000000000000).toNumber(), -0x10000000000000); - assert.deepEqual(new BN(-0x10040004004000).toNumber(), -0x10040004004000); - }); - - it('should throw when number exceeds 53 bits', function () { - var n = new BN(1).iushln(54); - assert.throws(function () { - n.toNumber(); - }, /^Error: Number can only safely store up to 53 bits$/); - }); - }); - - describe('.zeroBits()', function () { - it('should return proper zeroBits', function () { - assert.equal(new BN(0).zeroBits(), 0); - assert.equal(new BN(0x1).zeroBits(), 0); - assert.equal(new BN(0x2).zeroBits(), 1); - assert.equal(new BN(0x3).zeroBits(), 0); - assert.equal(new BN(0x4).zeroBits(), 2); - assert.equal(new BN(0x8).zeroBits(), 3); - assert.equal(new BN(0x10).zeroBits(), 4); - assert.equal(new BN(0x100).zeroBits(), 8); - assert.equal(new BN(0x1000000).zeroBits(), 24); - assert.equal(new BN(0x123456).zeroBits(), 1); - }); - }); - - describe('.toJSON', function () { - it('should return hex string', function () { - assert.equal(new BN(0x123).toJSON(), '123'); - }); - }); - - describe('.cmpn', function () { - it('should return -1, 0, 1 correctly', function () { - assert.equal(new BN(42).cmpn(42), 0); - assert.equal(new BN(42).cmpn(43), -1); - assert.equal(new BN(42).cmpn(41), 1); - assert.equal(new BN(0x3fffffe).cmpn(0x3fffffe), 0); - assert.equal(new BN(0x3fffffe).cmpn(0x3ffffff), -1); - assert.equal(new BN(0x3fffffe).cmpn(0x3fffffd), 1); - assert.throws(function () { - new BN(0x3fffffe).cmpn(0x4000000); - }, /^Error: Number is too big$/); - assert.equal(new BN(42).cmpn(-42), 1); - assert.equal(new BN(-42).cmpn(42), -1); - assert.equal(new BN(-42).cmpn(-42), 0); - assert.equal(1 / new BN(-42).cmpn(-42), Infinity); - }); - }); - - describe('.cmp', function () { - it('should return -1, 0, 1 correctly', function () { - assert.equal(new BN(42).cmp(new BN(42)), 0); - assert.equal(new BN(42).cmp(new BN(43)), -1); - assert.equal(new BN(42).cmp(new BN(41)), 1); - assert.equal(new BN(0x3fffffe).cmp(new BN(0x3fffffe)), 0); - assert.equal(new BN(0x3fffffe).cmp(new BN(0x3ffffff)), -1); - assert.equal(new BN(0x3fffffe).cmp(new BN(0x3fffffd)), 1); - assert.equal(new BN(0x3fffffe).cmp(new BN(0x4000000)), -1); - assert.equal(new BN(42).cmp(new BN(-42)), 1); - assert.equal(new BN(-42).cmp(new BN(42)), -1); - assert.equal(new BN(-42).cmp(new BN(-42)), 0); - assert.equal(1 / new BN(-42).cmp(new BN(-42)), Infinity); - }); - }); - - describe('comparison shorthands', function () { - it('.gtn greater than', function () { - assert.equal(new BN(3).gtn(2), true); - assert.equal(new BN(3).gtn(3), false); - assert.equal(new BN(3).gtn(4), false); - }); - it('.gt greater than', function () { - assert.equal(new BN(3).gt(new BN(2)), true); - assert.equal(new BN(3).gt(new BN(3)), false); - assert.equal(new BN(3).gt(new BN(4)), false); - }); - it('.gten greater than or equal', function () { - assert.equal(new BN(3).gten(3), true); - assert.equal(new BN(3).gten(2), true); - assert.equal(new BN(3).gten(4), false); - }); - it('.gte greater than or equal', function () { - assert.equal(new BN(3).gte(new BN(3)), true); - assert.equal(new BN(3).gte(new BN(2)), true); - assert.equal(new BN(3).gte(new BN(4)), false); - }); - it('.ltn less than', function () { - assert.equal(new BN(2).ltn(3), true); - assert.equal(new BN(2).ltn(2), false); - assert.equal(new BN(2).ltn(1), false); - }); - it('.lt less than', function () { - assert.equal(new BN(2).lt(new BN(3)), true); - assert.equal(new BN(2).lt(new BN(2)), false); - assert.equal(new BN(2).lt(new BN(1)), false); - }); - it('.lten less than or equal', function () { - assert.equal(new BN(3).lten(3), true); - assert.equal(new BN(3).lten(2), false); - assert.equal(new BN(3).lten(4), true); - }); - it('.lte less than or equal', function () { - assert.equal(new BN(3).lte(new BN(3)), true); - assert.equal(new BN(3).lte(new BN(2)), false); - assert.equal(new BN(3).lte(new BN(4)), true); - }); - it('.eqn equal', function () { - assert.equal(new BN(3).eqn(3), true); - assert.equal(new BN(3).eqn(2), false); - assert.equal(new BN(3).eqn(4), false); - }); - it('.eq equal', function () { - assert.equal(new BN(3).eq(new BN(3)), true); - assert.equal(new BN(3).eq(new BN(2)), false); - assert.equal(new BN(3).eq(new BN(4)), false); - }); - }); - - describe('.fromTwos', function () { - it('should convert from two\'s complement to negative number', function () { - assert.equal(new BN('00000000', 16).fromTwos(32).toNumber(), 0); - assert.equal(new BN('00000001', 16).fromTwos(32).toNumber(), 1); - assert.equal(new BN('7fffffff', 16).fromTwos(32).toNumber(), 2147483647); - assert.equal(new BN('80000000', 16).fromTwos(32).toNumber(), -2147483648); - assert.equal(new BN('f0000000', 16).fromTwos(32).toNumber(), -268435456); - assert.equal(new BN('f1234567', 16).fromTwos(32).toNumber(), -249346713); - assert.equal(new BN('ffffffff', 16).fromTwos(32).toNumber(), -1); - assert.equal(new BN('fffffffe', 16).fromTwos(32).toNumber(), -2); - assert.equal(new BN('fffffffffffffffffffffffffffffffe', 16) - .fromTwos(128).toNumber(), -2); - assert.equal(new BN('ffffffffffffffffffffffffffffffff' + - 'fffffffffffffffffffffffffffffffe', 16).fromTwos(256).toNumber(), -2); - assert.equal(new BN('ffffffffffffffffffffffffffffffff' + - 'ffffffffffffffffffffffffffffffff', 16).fromTwos(256).toNumber(), -1); - assert.equal(new BN('7fffffffffffffffffffffffffffffff' + - 'ffffffffffffffffffffffffffffffff', 16).fromTwos(256).toString(10), - new BN('5789604461865809771178549250434395392663499' + - '2332820282019728792003956564819967', 10).toString(10)); - assert.equal(new BN('80000000000000000000000000000000' + - '00000000000000000000000000000000', 16).fromTwos(256).toString(10), - new BN('-578960446186580977117854925043439539266349' + - '92332820282019728792003956564819968', 10).toString(10)); - }); - }); - - describe('.toTwos', function () { - it('should convert from negative number to two\'s complement', function () { - assert.equal(new BN(0).toTwos(32).toString(16), '0'); - assert.equal(new BN(1).toTwos(32).toString(16), '1'); - assert.equal(new BN(2147483647).toTwos(32).toString(16), '7fffffff'); - assert.equal(new BN('-2147483648', 10).toTwos(32).toString(16), '80000000'); - assert.equal(new BN('-268435456', 10).toTwos(32).toString(16), 'f0000000'); - assert.equal(new BN('-249346713', 10).toTwos(32).toString(16), 'f1234567'); - assert.equal(new BN('-1', 10).toTwos(32).toString(16), 'ffffffff'); - assert.equal(new BN('-2', 10).toTwos(32).toString(16), 'fffffffe'); - assert.equal(new BN('-2', 10).toTwos(128).toString(16), - 'fffffffffffffffffffffffffffffffe'); - assert.equal(new BN('-2', 10).toTwos(256).toString(16), - 'fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe'); - assert.equal(new BN('-1', 10).toTwos(256).toString(16), - 'ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff'); - assert.equal(new BN('5789604461865809771178549250434395392663' + - '4992332820282019728792003956564819967', 10).toTwos(256).toString(16), - '7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff'); - assert.equal(new BN('-578960446186580977117854925043439539266' + - '34992332820282019728792003956564819968', 10).toTwos(256).toString(16), - '8000000000000000000000000000000000000000000000000000000000000000'); - }); - }); - - describe('.isBN', function () { - it('should return true for BN', function () { - assert.equal(BN.isBN(new BN()), true); - }); - - it('should return false for everything else', function () { - assert.equal(BN.isBN(1), false); - assert.equal(BN.isBN([]), false); - assert.equal(BN.isBN({}), false); - }); - }); -}); diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/bn.js/util/genCombMulTo.js b/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/bn.js/util/genCombMulTo.js deleted file mode 100644 index 8b456c7c..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/bn.js/util/genCombMulTo.js +++ /dev/null @@ -1,65 +0,0 @@ -'use strict'; - -// NOTE: This could be potentionally used to generate loop-less multiplications -function genCombMulTo (alen, blen) { - var len = alen + blen - 1; - var src = [ - 'var a = self.words;', - 'var b = num.words;', - 'var o = out.words;', - 'var c = 0;', - 'var lo;', - 'var mid;', - 'var hi;' - ]; - for (var i = 0; i < alen; i++) { - src.push('var a' + i + ' = a[' + i + '] | 0;'); - src.push('var al' + i + ' = a' + i + ' & 0x1fff;'); - src.push('var ah' + i + ' = a' + i + ' >>> 13;'); - } - for (i = 0; i < blen; i++) { - src.push('var b' + i + ' = b[' + i + '] | 0;'); - src.push('var bl' + i + ' = b' + i + ' & 0x1fff;'); - src.push('var bh' + i + ' = b' + i + ' >>> 13;'); - } - src.push(''); - src.push('out.negative = self.negative ^ num.negative;'); - src.push('out.length = ' + len + ';'); - - for (var k = 0; k < len; k++) { - var minJ = Math.max(0, k - alen + 1); - var maxJ = Math.min(k, blen - 1); - - src.push('\/* k = ' + k + ' *\/'); - src.push('var w' + k + ' = c;'); - src.push('c = 0;'); - for (var j = minJ; j <= maxJ; j++) { - i = k - j; - - src.push('lo = Math.imul(al' + i + ', bl' + j + ');'); - src.push('mid = Math.imul(al' + i + ', bh' + j + ');'); - src.push('mid = (mid + Math.imul(ah' + i + ', bl' + j + ')) | 0;'); - src.push('hi = Math.imul(ah' + i + ', bh' + j + ');'); - - src.push('w' + k + ' = (w' + k + ' + lo) | 0;'); - src.push('w' + k + ' = (w' + k + ' + ((mid & 0x1fff) << 13)) | 0;'); - src.push('c = (c + hi) | 0;'); - src.push('c = (c + (mid >>> 13)) | 0;'); - src.push('c = (c + (w' + k + ' >>> 26)) | 0;'); - src.push('w' + k + ' &= 0x3ffffff;'); - } - } - // Store in separate step for better memory access - for (k = 0; k < len; k++) { - src.push('o[' + k + '] = w' + k + ';'); - } - src.push('if (c !== 0) {', - ' o[' + k + '] = c;', - ' out.length++;', - '}', - 'return out;'); - - return src.join('\n'); -} - -console.log(genCombMulTo(10, 10)); diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/bn.js/util/genCombMulTo10.js b/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/bn.js/util/genCombMulTo10.js deleted file mode 100644 index cf2e6e80..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/bn.js/util/genCombMulTo10.js +++ /dev/null @@ -1,65 +0,0 @@ -'use strict'; - -function genCombMulTo (alen, blen) { - var len = alen + blen - 1; - var src = [ - 'var a = self.words;', - 'var b = num.words;', - 'var o = out.words;', - 'var c = 0;', - 'var lo;', - 'var mid;', - 'var hi;' - ]; - for (var i = 0; i < alen; i++) { - src.push('var a' + i + ' = a[' + i + '] | 0;'); - src.push('var al' + i + ' = a' + i + ' & 0x1fff;'); - src.push('var ah' + i + ' = a' + i + ' >>> 13;'); - } - for (i = 0; i < blen; i++) { - src.push('var b' + i + ' = b[' + i + '] | 0;'); - src.push('var bl' + i + ' = b' + i + ' & 0x1fff;'); - src.push('var bh' + i + ' = b' + i + ' >>> 13;'); - } - src.push(''); - src.push('out.negative = self.negative ^ num.negative;'); - src.push('out.length = ' + len + ';'); - - for (var k = 0; k < len; k++) { - var minJ = Math.max(0, k - alen + 1); - var maxJ = Math.min(k, blen - 1); - - src.push('\/* k = ' + k + ' *\/'); - src.push('lo = Math.imul(al' + (k - minJ) + ', bl' + minJ + ');'); - src.push('mid = Math.imul(al' + (k - minJ) + ', bh' + minJ + ');'); - src.push( - 'mid = (mid + Math.imul(ah' + (k - minJ) + ', bl' + minJ + ')) | 0;'); - src.push('hi = Math.imul(ah' + (k - minJ) + ', bh' + minJ + ');'); - - for (var j = minJ + 1; j <= maxJ; j++) { - i = k - j; - - src.push('lo = (lo + Math.imul(al' + i + ', bl' + j + ')) | 0;'); - src.push('mid = (mid + Math.imul(al' + i + ', bh' + j + ')) | 0;'); - src.push('mid = (mid + Math.imul(ah' + i + ', bl' + j + ')) | 0;'); - src.push('hi = (hi + Math.imul(ah' + i + ', bh' + j + ')) | 0;'); - } - - src.push('var w' + k + ' = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;'); - src.push('c = (((hi + (mid >>> 13)) | 0) + (w' + k + ' >>> 26)) | 0;'); - src.push('w' + k + ' &= 0x3ffffff;'); - } - // Store in separate step for better memory access - for (k = 0; k < len; k++) { - src.push('o[' + k + '] = w' + k + ';'); - } - src.push('if (c !== 0) {', - ' o[' + k + '] = c;', - ' out.length++;', - '}', - 'return out;'); - - return src.join('\n'); -} - -console.log(genCombMulTo(10, 10)); diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/browserify-rsa/.travis.yml b/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/browserify-rsa/.travis.yml deleted file mode 100644 index 20229620..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/browserify-rsa/.travis.yml +++ /dev/null @@ -1,3 +0,0 @@ -language: node_js -node_js: - - "0.11" \ No newline at end of file diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/browserify-rsa/LICENSE b/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/browserify-rsa/LICENSE deleted file mode 100644 index f6d285c0..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/browserify-rsa/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2014-2015 Calvin Metcalf & contributors - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/browserify-rsa/index.js b/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/browserify-rsa/index.js deleted file mode 100644 index 2b301cdb..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/browserify-rsa/index.js +++ /dev/null @@ -1,40 +0,0 @@ -var bn = require('bn.js'); -var randomBytes = require('randombytes'); -module.exports = crt; -function blind(priv) { - var r = getr(priv); - var blinder = r.toRed(bn.mont(priv.modulus)) - .redPow(new bn(priv.publicExponent)).fromRed(); - return { - blinder: blinder, - unblinder:r.invm(priv.modulus) - }; -} -function crt(msg, priv) { - var blinds = blind(priv); - var len = priv.modulus.byteLength(); - var mod = bn.mont(priv.modulus); - var blinded = new bn(msg).mul(blinds.blinder).umod(priv.modulus); - var c1 = blinded.toRed(bn.mont(priv.prime1)); - var c2 = blinded.toRed(bn.mont(priv.prime2)); - var qinv = priv.coefficient; - var p = priv.prime1; - var q = priv.prime2; - var m1 = c1.redPow(priv.exponent1); - var m2 = c2.redPow(priv.exponent2); - m1 = m1.fromRed(); - m2 = m2.fromRed(); - var h = m1.isub(m2).imul(qinv).umod(p); - h.imul(q); - m2.iadd(h); - return new Buffer(m2.imul(blinds.unblinder).umod(priv.modulus).toArray(false, len)); -} -crt.getr = getr; -function getr(priv) { - var len = priv.modulus.byteLength(); - var r = new bn(randomBytes(len)); - while (r.cmp(priv.modulus) >= 0 || !r.umod(priv.prime1) || !r.umod(priv.prime2)) { - r = new bn(randomBytes(len)); - } - return r; -} diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/browserify-rsa/package.json b/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/browserify-rsa/package.json deleted file mode 100644 index 5658b05e..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/browserify-rsa/package.json +++ /dev/null @@ -1,71 +0,0 @@ -{ - "name": "browserify-rsa", - "version": "4.0.1", - "description": "RSA for browserify", - "main": "index.js", - "scripts": { - "test": "node test.js | tspec" - }, - "author": "", - "license": "MIT", - "dependencies": { - "bn.js": "^4.1.0", - "randombytes": "^2.0.1" - }, - "repository": { - "type": "git", - "url": "git+ssh://git@github.com/crypto-browserify/browserify-rsa.git" - }, - "devDependencies": { - "parse-asn1": "^5.0.0", - "tap-spec": "^2.1.2", - "tape": "^3.0.3" - }, - "gitHead": "63b22b3306a8a55b6c2d4f34e2c331db0c8398e7", - "bugs": { - "url": "https://github.com/crypto-browserify/browserify-rsa/issues" - }, - "homepage": "https://github.com/crypto-browserify/browserify-rsa#readme", - "_id": "browserify-rsa@4.0.1", - "_shasum": "21e0abfaf6f2029cf2fafb133567a701d4135524", - "_from": "browserify-rsa@>=4.0.0 <5.0.0", - "_npmVersion": "3.7.3", - "_nodeVersion": "5.7.0", - "_npmUser": { - "name": "dcousens", - "email": "email@dcousens.com" - }, - "dist": { - "shasum": "21e0abfaf6f2029cf2fafb133567a701d4135524", - "tarball": "https://registry.npmjs.org/browserify-rsa/-/browserify-rsa-4.0.1.tgz" - }, - "maintainers": [ - { - "name": "cwmma", - "email": "calvin.metcalf@gmail.com" - }, - { - "name": "dcousens", - "email": "email@dcousens.com" - }, - { - "name": "dominictarr", - "email": "dominic.tarr@gmail.com" - }, - { - "name": "jprichardson", - "email": "jprichardson@gmail.com" - }, - { - "name": "indutny", - "email": "fedor@indutny.com" - } - ], - "_npmOperationalInternal": { - "host": "packages-6-west.internal.npmjs.com", - "tmp": "tmp/browserify-rsa-4.0.1.tgz_1456441196079_0.6414434532634914" - }, - "directories": {}, - "_resolved": "https://registry.npmjs.org/browserify-rsa/-/browserify-rsa-4.0.1.tgz", - "readme": "ERROR: No README data found!" -} diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/browserify-rsa/readme.md b/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/browserify-rsa/readme.md deleted file mode 100644 index 370fd95e..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/browserify-rsa/readme.md +++ /dev/null @@ -1,10 +0,0 @@ -browserify-rsa -==== -[![Build Status](https://travis-ci.org/crypto-browserify/browserify-rsa.svg)](https://travis-ci.org/crypto-browserify/browserify-rsa) - -RSA private decryption/signing using chinese remainder and blinding. - -API -==== - -Give it a message as a buffer and a private key (as decoded by https://www.npmjs.com/package/parse-asn1) and it returns encrypted data as a buffer. diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/browserify-rsa/test.js b/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/browserify-rsa/test.js deleted file mode 100644 index 3d79a6d3..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/browserify-rsa/test.js +++ /dev/null @@ -1,53 +0,0 @@ -var keys = [ - new Buffer('2d2d2d2d2d424547494e2050524956415445204b45592d2d2d2d2d0a4d494943647749424144414e42676b71686b6947397730424151454641415343416d457767674a6441674541416f4742414b756c55545a3842317163635a38630a44585247535930386757384b764c6c63787878474334675a484e543343425546386e3552344b453330615a79595a2f727473515a7530356a755a4a78614a30710a6d62653735646c5135642b586339424d586551672f4d70545a773554414e374f4964475959704642652b31504c5a367745666a6b59724d714d55636671324c710a68544c64416276424a6e755263595a4c716d42654f51384654724b7241674d4241414543675945416e6b485262455055332f57495353517250333669794362320a532f53425a774b6b7a6d764372427844576850654473777039632f324a593736724e57664c7a793869586755473857557a76486a653631516833676d42634b650a62556154476c34567938486131594241446f3552665272646d3046453474766776752f546b7146717042425a7765753534323835686b357a6c47376e2f4437590a646e4e58557075354d6c4e623578336757306b43515144554c2f2f637763585578592f6576614a50346a53652b5a7745515a6f2b7a58524c695055756c426f560a6177323843564d757864677771416f315831494b65665065556166375251753867434b61526e704775457558416b45417a785a54664d6d766d435544496577340a35476b36624b3236355851576468636769713235346c7042474f596d446a397943453779412b7a6d415351774d73585464514f6931684f434579725875534a350a632b2b4544514a4146683357726e7a6f455042797559584d6d45543874534652574d51357670674e716833686148523562346755433268786169756e43424e4c0a315270565939416f55694479774763472f5350683933436e4b42336e69774a42414b503741747369665a6756587469697a4234614d5468546a565961535a727a0a44304b6739447548796c706b4443686d467537375447724e55516741567559746668622f6252626c56612f4630684a3465514854334a554351425654363874620a4f6752556b30615039744333303231564e383258362b6b6c6f7753514e386f425058382b546644575355696c702f2b6a3234486b792b5a3239446f3779522f520a7175746e4c39324376426c564c56343d0a2d2d2d2d2d454e442050524956415445204b45592d2d2d2d2d0a', 'hex'), - new Buffer('2d2d2d2d2d424547494e205253412050524956415445204b45592d2d2d2d2d0a4d4949435641494241414a2f4f77737762466f2f757943386c7447662f794131412b6756354947646e4167506255534933477a624843412b782b544c472f744c0a76625277337231736d7070592f6a6b6b70695657314572534d754e307569787035676237385a39724831587057623557576770335761592f3945484d6a4d644f0a6b512f394c565a7652766c2f4d2f4669366f77502b712b616d4a493142456a454359666268474c33726d6c5664713471586334305177494441514142416e38490a565a3042506f414f68794633334b464d4878793872323866735667784a5559674d334e715167647634664661774359586a684a7a3964755535594a47464a474a0a57554765486c6b7959466c70693466336d377459374a61776d51555742304d4e536f4b48493363674458342f7466424e386e692b634f3065536f5235637a42590a4573414842553437703161774e46414877642b5a457576394834526d4d6e37703237397251547470416b4148334e7173322f7672524632635a554e34664958660a347848735142427955617947713861334a305547615346577636387a54554b466865727239755a6f744e70374e4a346a425869415277307138646f63585547310a416b4148676d4f4b486f4f5274416d696b71706d46454a5a4f7473584d614c43496d3445737a506f356369596f4c4d42635669743039416469516c74375a4a4c0a445930327376553162306167435a39376b446b6d48446b58416b414361384d394a454c7544732f502f76494759446b4d566174494666573662574630326546470a746157774d71436353457357766277307871597433346a5552704e62436a6d4379515677596641772f2b544c68503964416b414677526a64776a77333771706a0a646467316d4e697533376237737746786d6b694d4f585a5278614e4e736662353641313452704e337a6f6233516447557962476f644d494b5446626d552f6c750a436a71417861664a416b41473279663652576277464957664d7974375759436830566147424363677935373441696e566965456f335a5a7946664336332b786d0a33756f614e7934694c6f4a763447436a7155427a335a666356614f2f444457470a2d2d2d2d2d454e44205253412050524956415445204b45592d2d2d2d2d0a', 'hex'), - new Buffer('2d2d2d2d2d424547494e205253412050524956415445204b45592d2d2d2d2d0a4d4949456a77494241414b422f6779376d6a615767506546645659445a5752434139424e69763370506230657332372b464b593068737a4c614f7734374578430a744157704473483438545841667948425977424c67756179666b344c4749757078622b43474d62526f337845703043626659314a62793236543976476a5243310a666f484444554a4738347561526279487161663469367a74346756522b786c4145496a6b614641414b38634f6f58415431435671474c4c6c6a554363684c38500a6a61486a2f7972695a2f53377264776c49334c6e41427877776d4c726d522f7637315774706d4f2f614e47384e2b31706f2b5177616768546b79513539452f5a0a7641754f6b4657486f6b32712f523650594161326a645a397a696d3046714f502b6e6b5161454452624246426d4271547635664647666b32577341664b662f520a47302f5646642b5a654d353235315465547658483639356e6c53476175566c3941674d42414145436766344c725748592f6c35346f7554685a577676627275670a70667a36734a583267396c3779586d576c455773504543566f2f375355627059467074364f5a7939397a53672b494b624771574b6664686f4b725477495674430a4c30595a304e6c6d646e414e53497a30726f785147375a786b4c352b764853772f506d443978345577662b437a38684154436d4e42763171633630646b7975570a34434c71653732716154695657526f4f316961675167684e634c6f6f36765379363545784c614344545068613779753276773468465a705769456a57346478660a7246644c696978353242433836596c416c784d452f724c6738494a5676696c62796f39615764586d784f6155544c527636506b4644312f6756647738563951720a534c4e39466c4b326b6b6a695830647a6f6962765a7733744d6e74337979644178305838372b734d5256616843316270336b56507a3448793045575834514a2f0a504d33317647697549546b324e43643531445874314c746e324f503546614a536d4361456a6830586b5534716f7559796a585774384275364254436c327675610a466730556a6939432b496b504c6d61554d624d494f7761546b386357714c74685378734c6537304a354f6b477267664b554d2f772b4248483150742f506a7a6a0a432b2b6c306b6946614f5644566141563947704c504c43426f4b2f50433952622f72784d4d6f43434e774a2f4e5a756564496e793277334c4d69693737682f540a7a53766572674e47686a5936526e7661386c4c584a36646c726b6350417970733367577778716a344e5230542b474d3062445550564c62374d303758563753580a7637564a476d35324a625247774d3173732b72385854544e656d65476b2b5752784737546774734d715947584c66423851786b2f66352f4d63633030546c38750a7758464e7366784a786d7436416273547233673336774a2f49684f6e69627a3941642b6e63686c426e4e3351655733434b48717a61523138766f717674566d320a6b4a66484b31357072482f7353476d786d6945476772434a545a78744462614e434f372f56426a6e4b756455554968434177734c747571302f7a7562397641640a384731736366497076357161534e7a6d4b6f5838624f77417276725336775037794b726354737557496c484438724a5649374945446e516f5470354738664b310a68774a2f4d4968384d35763072356455594576366f494a5747636c65364148314a6d73503557496166677137325a32323838704863434648774e59384467394a0a3736517377564c6e556850546c6d6d33454f4f50474574616d32694144357230416679746c62346c624e6f51736a32737a65584f4e4458422b366f7565616a680a564e454c55723848635350356c677a525a6a4a57366146497a6a394c44526d516e55414f6a475358564f517445774a2f4d43515a374e2f763464494b654452410a3864385545785a332b674748756d7a697a7447524a30745172795a483250616b50354937562b316c377145556e4a3263336d462b65317634314570394c4376680a627a72504b773964786831386734622b37624d707357506e7372614b6836697078633761614f615a5630447867657a347a635a753050316f6c4f30634e334b4d0a6e784a305064733352386241684e43446453324a5a61527035513d3d0a2d2d2d2d2d454e44205253412050524956415445204b45592d2d2d2d2d0a', 'hex') -]; -var parseKey = require('parse-asn1'); -var privs = keys.map(parseKey); -var crt = require('./'); -var crypto = require('crypto'); -var test = require('tape'); -var constants = require('constants'); -var bn = require('bn.js'); -function testIt(priv, run) { - test('r is coprime with n ' + (run + 1), function (t) { - var len = 30; - t.plan(len); - var i = 0; - while(i++ < len) { - var r = crt.getr(priv); - t.equals(r.gcd(priv.modulus).toString(), '1', 'are coprime run ' + i); - } - }); -} -privs.forEach(testIt); - -function testMessage(key, run) { - var len = 40; - var i = 0; - while (len--) { - test('round trip key ' + (run + 1) + ' run ' + (++i), function (t) { - t.plan(1); - var priv = parseKey(key); - var len = priv.modulus.byteLength(); - var r = new bn(crypto.randomBytes(len)); - while (r.cmp(priv.modulus) >= 0) { - r = new bn(crypto.randomBytes(len)); - } - var buf = new Buffer(r.toArray()); - if (buf.byteLength < priv.modulus.byteLength()) { - var tmp = new Buffer(priv.modulus.byteLength() - buf.byteLength); - tmp.fill(0); - buf = Buffer.concat([tmp, buf]); - } - var nodeEncrypt = crypto.privateDecrypt({ - padding: constants.RSA_NO_PADDING, - key: key - }, buf).toString('hex'); - var myEncrypt = crt(buf, priv).toString('hex'); - t.equals(myEncrypt, nodeEncrypt, 'equal encrypts'); - }); - } -} -keys.forEach(testMessage); diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/elliptic/README.md b/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/elliptic/README.md deleted file mode 100644 index fe8c311b..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/elliptic/README.md +++ /dev/null @@ -1,205 +0,0 @@ -# Elliptic [![Build Status](https://secure.travis-ci.org/indutny/elliptic.png)](http://travis-ci.org/indutny/elliptic) [![Coverage Status](https://coveralls.io/repos/indutny/elliptic/badge.svg?branch=master&service=github)](https://coveralls.io/github/indutny/elliptic?branch=master) [![Code Climate](https://codeclimate.com/github/indutny/elliptic/badges/gpa.svg)](https://codeclimate.com/github/indutny/elliptic) - -[![Saucelabs Test Status](https://saucelabs.com/browser-matrix/gh-indutny-elliptic.svg)](https://saucelabs.com/u/gh-indutny-elliptic) - -Fast elliptic-curve cryptography in a plain javascript implementation. - -NOTE: Please take a look at http://safecurves.cr.yp.to/ before choosing a curve -for your cryptography operations. - -## Incentive - -ECC is much slower than regular RSA cryptography, the JS implementations are -even more slower. - -## Benchmarks - -```bash -$ node benchmarks/index.js -Benchmarking: sign -elliptic#sign x 262 ops/sec ±0.51% (177 runs sampled) -eccjs#sign x 55.91 ops/sec ±0.90% (144 runs sampled) ------------------------- -Fastest is elliptic#sign -======================== -Benchmarking: verify -elliptic#verify x 113 ops/sec ±0.50% (166 runs sampled) -eccjs#verify x 48.56 ops/sec ±0.36% (125 runs sampled) ------------------------- -Fastest is elliptic#verify -======================== -Benchmarking: gen -elliptic#gen x 294 ops/sec ±0.43% (176 runs sampled) -eccjs#gen x 62.25 ops/sec ±0.63% (129 runs sampled) ------------------------- -Fastest is elliptic#gen -======================== -Benchmarking: ecdh -elliptic#ecdh x 136 ops/sec ±0.85% (156 runs sampled) ------------------------- -Fastest is elliptic#ecdh -======================== -``` - -## API - -### ECDSA - -```javascript -var EC = require('elliptic').ec; - -// Create and initialize EC context -// (better do it once and reuse it) -var ec = new EC('secp256k1'); - -// Generate keys -var key = ec.genKeyPair(); - -// Sign message (must be an array, or it'll be treated as a hex sequence) -var msg = [ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 ]; -var signature = key.sign(msg); - -// Export DER encoded signature in Array -var derSign = signature.toDER(); - -// Verify signature -console.log(key.verify(msg, derSign)); - -// CHECK WITH NO PRIVATE KEY - -// Public key as '04 + x + y' -var pub = '04bb1fa3...'; - -// Signature MUST be either: -// 1) hex-string of DER-encoded signature; or -// 2) DER-encoded signature as buffer; or -// 3) object with two hex-string properties (r and s) - -var signature = 'b102ac...'; // case 1 -var signature = new Buffer('...'); // case 2 -var signature = { r: 'b1fc...', s: '9c42...' }; // case 3 - -// Import public key -var key = ec.keyFromPublic(pub, 'hex'); - -// Verify signature -console.log(key.verify(msg, signature)); -``` - -### EdDSA - -```javascript -var EdDSA = require('elliptic').eddsa; - -// Create and initialize EdDSA context -// (better do it once and reuse it) -var ec = new EdDSA('ed25519'); - -// Create key pair from secret -var key = ec.keyFromSecret('693e3c...'); // hex string, array or Buffer - -// Sign message (must be an array, or it'll be treated as a hex sequence) -var msg = [ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 ]; -var signature = key.sign(msg).toHex(); - -// Verify signature -console.log(key.verify(msg, signature)); - -// CHECK WITH NO PRIVATE KEY - -// Import public key -var pub = '0a1af638...'; -var key = ec.keyFromPublic(pub, 'hex'); - -// Verify signature -var signature = '70bed1...'; -console.log(key.verify(msg, signature)); -``` - -### ECDH - -```javascript -var ECDH = require('elliptic').ec; -var ec = new ECDH('curve25519'); - -// Generate keys -var key1 = ec.genKeyPair(); -var key2 = ec.genKeyPair(); - -var shared1 = key1.derive(key2.getPublic()); -var shared2 = key2.derive(key1.getPublic()); - -console.log('Both shared secrets are BN instances'); -console.log(shared1.toString(16)); -console.log(shared2.toString(16)); -``` - -NOTE: `.derive()` returns a [BN][1] instance. - -## Supported curves - -Elliptic.js support following curve types: - -* Short Weierstrass -* Montgomery -* Edwards -* Twisted Edwards - -Following curve 'presets' are embedded into the library: - -* `secp256k1` -* `p192` -* `p224` -* `p256` -* `p384` -* `p521` -* `curve25519` -* `ed25519` - -NOTE: That `curve25519` could not be used for ECDSA, use `ed25519` instead. - -### Implementation details - -ECDSA is using deterministic `k` value generation as per [RFC6979][0]. Most of -the curve operations are performed on non-affine coordinates (either projective -or extended), various windowing techniques are used for different cases. - -All operations are performed in reduction context using [bn.js][1], hashing is -provided by [hash.js][2] - -### Related projects - -* [eccrypto][3]: isomorphic implementation of ECDSA, ECDH and ECIES for both - browserify and node (uses `elliptic` for browser and [secp256k1-node][4] for - node) - -#### LICENSE - -This software is licensed under the MIT License. - -Copyright Fedor Indutny, 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. - -[0]: http://tools.ietf.org/html/rfc6979 -[1]: https://github.com/indutny/bn.js -[2]: https://github.com/indutny/hash.js -[3]: https://github.com/bitchan/eccrypto -[4]: https://github.com/wanderer/secp256k1-node diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/elliptic/lib/elliptic.js b/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/elliptic/lib/elliptic.js deleted file mode 100644 index 22912008..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/elliptic/lib/elliptic.js +++ /dev/null @@ -1,14 +0,0 @@ -'use strict'; - -var elliptic = exports; - -elliptic.version = require('../package.json').version; -elliptic.utils = require('./elliptic/utils'); -elliptic.rand = require('brorand'); -elliptic.hmacDRBG = require('./elliptic/hmac-drbg'); -elliptic.curve = require('./elliptic/curve'); -elliptic.curves = require('./elliptic/curves'); - -// Protocols -elliptic.ec = require('./elliptic/ec'); -elliptic.eddsa = require('./elliptic/eddsa'); diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/elliptic/lib/elliptic/curve/base.js b/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/elliptic/lib/elliptic/curve/base.js deleted file mode 100644 index 3af82396..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/elliptic/lib/elliptic/curve/base.js +++ /dev/null @@ -1,375 +0,0 @@ -'use strict'; - -var BN = require('bn.js'); -var elliptic = require('../../elliptic'); -var utils = elliptic.utils; -var getNAF = utils.getNAF; -var getJSF = utils.getJSF; -var assert = utils.assert; - -function BaseCurve(type, conf) { - this.type = type; - this.p = new BN(conf.p, 16); - - // Use Montgomery, when there is no fast reduction for the prime - this.red = conf.prime ? BN.red(conf.prime) : BN.mont(this.p); - - // Useful for many curves - this.zero = new BN(0).toRed(this.red); - this.one = new BN(1).toRed(this.red); - this.two = new BN(2).toRed(this.red); - - // Curve configuration, optional - this.n = conf.n && new BN(conf.n, 16); - this.g = conf.g && this.pointFromJSON(conf.g, conf.gRed); - - // Temporary arrays - this._wnafT1 = new Array(4); - this._wnafT2 = new Array(4); - this._wnafT3 = new Array(4); - this._wnafT4 = new Array(4); - - // Generalized Greg Maxwell's trick - var adjustCount = this.n && this.p.div(this.n); - if (!adjustCount || adjustCount.cmpn(100) > 0) { - this.redN = null; - } else { - this._maxwellTrick = true; - this.redN = this.n.toRed(this.red); - } -} -module.exports = BaseCurve; - -BaseCurve.prototype.point = function point() { - throw new Error('Not implemented'); -}; - -BaseCurve.prototype.validate = function validate() { - throw new Error('Not implemented'); -}; - -BaseCurve.prototype._fixedNafMul = function _fixedNafMul(p, k) { - assert(p.precomputed); - var doubles = p._getDoubles(); - - var naf = getNAF(k, 1); - var I = (1 << (doubles.step + 1)) - (doubles.step % 2 === 0 ? 2 : 1); - I /= 3; - - // Translate into more windowed form - var repr = []; - for (var j = 0; j < naf.length; j += doubles.step) { - var nafW = 0; - for (var k = j + doubles.step - 1; k >= j; k--) - nafW = (nafW << 1) + naf[k]; - repr.push(nafW); - } - - var a = this.jpoint(null, null, null); - var b = this.jpoint(null, null, null); - for (var i = I; i > 0; i--) { - for (var j = 0; j < repr.length; j++) { - var nafW = repr[j]; - if (nafW === i) - b = b.mixedAdd(doubles.points[j]); - else if (nafW === -i) - b = b.mixedAdd(doubles.points[j].neg()); - } - a = a.add(b); - } - return a.toP(); -}; - -BaseCurve.prototype._wnafMul = function _wnafMul(p, k) { - var w = 4; - - // Precompute window - var nafPoints = p._getNAFPoints(w); - w = nafPoints.wnd; - var wnd = nafPoints.points; - - // Get NAF form - var naf = getNAF(k, w); - - // Add `this`*(N+1) for every w-NAF index - var acc = this.jpoint(null, null, null); - for (var i = naf.length - 1; i >= 0; i--) { - // Count zeroes - for (var k = 0; i >= 0 && naf[i] === 0; i--) - k++; - if (i >= 0) - k++; - acc = acc.dblp(k); - - if (i < 0) - break; - var z = naf[i]; - assert(z !== 0); - if (p.type === 'affine') { - // J +- P - if (z > 0) - acc = acc.mixedAdd(wnd[(z - 1) >> 1]); - else - acc = acc.mixedAdd(wnd[(-z - 1) >> 1].neg()); - } else { - // J +- J - if (z > 0) - acc = acc.add(wnd[(z - 1) >> 1]); - else - acc = acc.add(wnd[(-z - 1) >> 1].neg()); - } - } - return p.type === 'affine' ? acc.toP() : acc; -}; - -BaseCurve.prototype._wnafMulAdd = function _wnafMulAdd(defW, - points, - coeffs, - len, - jacobianResult) { - var wndWidth = this._wnafT1; - var wnd = this._wnafT2; - var naf = this._wnafT3; - - // Fill all arrays - var max = 0; - for (var i = 0; i < len; i++) { - var p = points[i]; - var nafPoints = p._getNAFPoints(defW); - wndWidth[i] = nafPoints.wnd; - wnd[i] = nafPoints.points; - } - - // Comb small window NAFs - for (var i = len - 1; i >= 1; i -= 2) { - var a = i - 1; - var b = i; - if (wndWidth[a] !== 1 || wndWidth[b] !== 1) { - naf[a] = getNAF(coeffs[a], wndWidth[a]); - naf[b] = getNAF(coeffs[b], wndWidth[b]); - max = Math.max(naf[a].length, max); - max = Math.max(naf[b].length, max); - continue; - } - - var comb = [ - points[a], /* 1 */ - null, /* 3 */ - null, /* 5 */ - points[b] /* 7 */ - ]; - - // Try to avoid Projective points, if possible - if (points[a].y.cmp(points[b].y) === 0) { - comb[1] = points[a].add(points[b]); - comb[2] = points[a].toJ().mixedAdd(points[b].neg()); - } else if (points[a].y.cmp(points[b].y.redNeg()) === 0) { - comb[1] = points[a].toJ().mixedAdd(points[b]); - comb[2] = points[a].add(points[b].neg()); - } else { - comb[1] = points[a].toJ().mixedAdd(points[b]); - comb[2] = points[a].toJ().mixedAdd(points[b].neg()); - } - - var index = [ - -3, /* -1 -1 */ - -1, /* -1 0 */ - -5, /* -1 1 */ - -7, /* 0 -1 */ - 0, /* 0 0 */ - 7, /* 0 1 */ - 5, /* 1 -1 */ - 1, /* 1 0 */ - 3 /* 1 1 */ - ]; - - var jsf = getJSF(coeffs[a], coeffs[b]); - max = Math.max(jsf[0].length, max); - naf[a] = new Array(max); - naf[b] = new Array(max); - for (var j = 0; j < max; j++) { - var ja = jsf[0][j] | 0; - var jb = jsf[1][j] | 0; - - naf[a][j] = index[(ja + 1) * 3 + (jb + 1)]; - naf[b][j] = 0; - wnd[a] = comb; - } - } - - var acc = this.jpoint(null, null, null); - var tmp = this._wnafT4; - for (var i = max; i >= 0; i--) { - var k = 0; - - while (i >= 0) { - var zero = true; - for (var j = 0; j < len; j++) { - tmp[j] = naf[j][i] | 0; - if (tmp[j] !== 0) - zero = false; - } - if (!zero) - break; - k++; - i--; - } - if (i >= 0) - k++; - acc = acc.dblp(k); - if (i < 0) - break; - - for (var j = 0; j < len; j++) { - var z = tmp[j]; - var p; - if (z === 0) - continue; - else if (z > 0) - p = wnd[j][(z - 1) >> 1]; - else if (z < 0) - p = wnd[j][(-z - 1) >> 1].neg(); - - if (p.type === 'affine') - acc = acc.mixedAdd(p); - else - acc = acc.add(p); - } - } - // Zeroify references - for (var i = 0; i < len; i++) - wnd[i] = null; - - if (jacobianResult) - return acc; - else - return acc.toP(); -}; - -function BasePoint(curve, type) { - this.curve = curve; - this.type = type; - this.precomputed = null; -} -BaseCurve.BasePoint = BasePoint; - -BasePoint.prototype.eq = function eq(/*other*/) { - throw new Error('Not implemented'); -}; - -BasePoint.prototype.validate = function validate() { - return this.curve.validate(this); -}; - -BaseCurve.prototype.decodePoint = function decodePoint(bytes, enc) { - bytes = utils.toArray(bytes, enc); - - var len = this.p.byteLength(); - - // uncompressed, hybrid-odd, hybrid-even - if ((bytes[0] === 0x04 || bytes[0] === 0x06 || bytes[0] === 0x07) && - bytes.length - 1 === 2 * len) { - if (bytes[0] === 0x06) - assert(bytes[bytes.length - 1] % 2 === 0); - else if (bytes[0] === 0x07) - assert(bytes[bytes.length - 1] % 2 === 1); - - var res = this.point(bytes.slice(1, 1 + len), - bytes.slice(1 + len, 1 + 2 * len)); - - return res; - } else if ((bytes[0] === 0x02 || bytes[0] === 0x03) && - bytes.length - 1 === len) { - return this.pointFromX(bytes.slice(1, 1 + len), bytes[0] === 0x03); - } - throw new Error('Unknown point format'); -}; - -BasePoint.prototype.encodeCompressed = function encodeCompressed(enc) { - return this.encode(enc, true); -}; - -BasePoint.prototype._encode = function _encode(compact) { - var len = this.curve.p.byteLength(); - var x = this.getX().toArray('be', len); - - if (compact) - return [ this.getY().isEven() ? 0x02 : 0x03 ].concat(x); - - return [ 0x04 ].concat(x, this.getY().toArray('be', len)) ; -}; - -BasePoint.prototype.encode = function encode(enc, compact) { - return utils.encode(this._encode(compact), enc); -}; - -BasePoint.prototype.precompute = function precompute(power) { - if (this.precomputed) - return this; - - var precomputed = { - doubles: null, - naf: null, - beta: null - }; - precomputed.naf = this._getNAFPoints(8); - precomputed.doubles = this._getDoubles(4, power); - precomputed.beta = this._getBeta(); - this.precomputed = precomputed; - - return this; -}; - -BasePoint.prototype._hasDoubles = function _hasDoubles(k) { - if (!this.precomputed) - return false; - - var doubles = this.precomputed.doubles; - if (!doubles) - return false; - - return doubles.points.length >= Math.ceil((k.bitLength() + 1) / doubles.step); -}; - -BasePoint.prototype._getDoubles = function _getDoubles(step, power) { - if (this.precomputed && this.precomputed.doubles) - return this.precomputed.doubles; - - var doubles = [ this ]; - var acc = this; - for (var i = 0; i < power; i += step) { - for (var j = 0; j < step; j++) - acc = acc.dbl(); - doubles.push(acc); - } - return { - step: step, - points: doubles - }; -}; - -BasePoint.prototype._getNAFPoints = function _getNAFPoints(wnd) { - if (this.precomputed && this.precomputed.naf) - return this.precomputed.naf; - - var res = [ this ]; - var max = (1 << wnd) - 1; - var dbl = max === 1 ? null : this.dbl(); - for (var i = 1; i < max; i++) - res[i] = res[i - 1].add(dbl); - return { - wnd: wnd, - points: res - }; -}; - -BasePoint.prototype._getBeta = function _getBeta() { - return null; -}; - -BasePoint.prototype.dblp = function dblp(k) { - var r = this; - for (var i = 0; i < k; i++) - r = r.dbl(); - return r; -}; diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/elliptic/lib/elliptic/curve/edwards.js b/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/elliptic/lib/elliptic/curve/edwards.js deleted file mode 100644 index 6e9fb774..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/elliptic/lib/elliptic/curve/edwards.js +++ /dev/null @@ -1,433 +0,0 @@ -'use strict'; - -var curve = require('../curve'); -var elliptic = require('../../elliptic'); -var BN = require('bn.js'); -var inherits = require('inherits'); -var Base = curve.base; - -var assert = elliptic.utils.assert; - -function EdwardsCurve(conf) { - // NOTE: Important as we are creating point in Base.call() - this.twisted = (conf.a | 0) !== 1; - this.mOneA = this.twisted && (conf.a | 0) === -1; - this.extended = this.mOneA; - - Base.call(this, 'edwards', conf); - - this.a = new BN(conf.a, 16).umod(this.red.m); - this.a = this.a.toRed(this.red); - this.c = new BN(conf.c, 16).toRed(this.red); - this.c2 = this.c.redSqr(); - this.d = new BN(conf.d, 16).toRed(this.red); - this.dd = this.d.redAdd(this.d); - - assert(!this.twisted || this.c.fromRed().cmpn(1) === 0); - this.oneC = (conf.c | 0) === 1; -} -inherits(EdwardsCurve, Base); -module.exports = EdwardsCurve; - -EdwardsCurve.prototype._mulA = function _mulA(num) { - if (this.mOneA) - return num.redNeg(); - else - return this.a.redMul(num); -}; - -EdwardsCurve.prototype._mulC = function _mulC(num) { - if (this.oneC) - return num; - else - return this.c.redMul(num); -}; - -// Just for compatibility with Short curve -EdwardsCurve.prototype.jpoint = function jpoint(x, y, z, t) { - return this.point(x, y, z, t); -}; - -EdwardsCurve.prototype.pointFromX = function pointFromX(x, odd) { - x = new BN(x, 16); - if (!x.red) - x = x.toRed(this.red); - - var x2 = x.redSqr(); - var rhs = this.c2.redSub(this.a.redMul(x2)); - var lhs = this.one.redSub(this.c2.redMul(this.d).redMul(x2)); - - var y2 = rhs.redMul(lhs.redInvm()); - var y = y2.redSqrt(); - if (y.redSqr().redSub(y2).cmp(this.zero) !== 0) - throw new Error('invalid point'); - - var isOdd = y.fromRed().isOdd(); - if (odd && !isOdd || !odd && isOdd) - y = y.redNeg(); - - return this.point(x, y); -}; - -EdwardsCurve.prototype.pointFromY = function pointFromY(y, odd) { - y = new BN(y, 16); - if (!y.red) - y = y.toRed(this.red); - - // x^2 = (y^2 - 1) / (d y^2 + 1) - var y2 = y.redSqr(); - var lhs = y2.redSub(this.one); - var rhs = y2.redMul(this.d).redAdd(this.one); - var x2 = lhs.redMul(rhs.redInvm()); - - if (x2.cmp(this.zero) === 0) { - if (odd) - throw new Error('invalid point'); - else - return this.point(this.zero, y); - } - - var x = x2.redSqrt(); - if (x.redSqr().redSub(x2).cmp(this.zero) !== 0) - throw new Error('invalid point'); - - if (x.isOdd() !== odd) - x = x.redNeg(); - - return this.point(x, y); -}; - -EdwardsCurve.prototype.validate = function validate(point) { - if (point.isInfinity()) - return true; - - // Curve: A * X^2 + Y^2 = C^2 * (1 + D * X^2 * Y^2) - point.normalize(); - - var x2 = point.x.redSqr(); - var y2 = point.y.redSqr(); - var lhs = x2.redMul(this.a).redAdd(y2); - var rhs = this.c2.redMul(this.one.redAdd(this.d.redMul(x2).redMul(y2))); - - return lhs.cmp(rhs) === 0; -}; - -function Point(curve, x, y, z, t) { - Base.BasePoint.call(this, curve, 'projective'); - if (x === null && y === null && z === null) { - this.x = this.curve.zero; - this.y = this.curve.one; - this.z = this.curve.one; - this.t = this.curve.zero; - this.zOne = true; - } else { - this.x = new BN(x, 16); - this.y = new BN(y, 16); - this.z = z ? new BN(z, 16) : this.curve.one; - this.t = t && new BN(t, 16); - if (!this.x.red) - this.x = this.x.toRed(this.curve.red); - if (!this.y.red) - this.y = this.y.toRed(this.curve.red); - if (!this.z.red) - this.z = this.z.toRed(this.curve.red); - if (this.t && !this.t.red) - this.t = this.t.toRed(this.curve.red); - this.zOne = this.z === this.curve.one; - - // Use extended coordinates - if (this.curve.extended && !this.t) { - this.t = this.x.redMul(this.y); - if (!this.zOne) - this.t = this.t.redMul(this.z.redInvm()); - } - } -} -inherits(Point, Base.BasePoint); - -EdwardsCurve.prototype.pointFromJSON = function pointFromJSON(obj) { - return Point.fromJSON(this, obj); -}; - -EdwardsCurve.prototype.point = function point(x, y, z, t) { - return new Point(this, x, y, z, t); -}; - -Point.fromJSON = function fromJSON(curve, obj) { - return new Point(curve, obj[0], obj[1], obj[2]); -}; - -Point.prototype.inspect = function inspect() { - if (this.isInfinity()) - return ''; - return ''; -}; - -Point.prototype.isInfinity = function isInfinity() { - // XXX This code assumes that zero is always zero in red - return this.x.cmpn(0) === 0 && - this.y.cmp(this.z) === 0; -}; - -Point.prototype._extDbl = function _extDbl() { - // hyperelliptic.org/EFD/g1p/auto-twisted-extended-1.html - // #doubling-dbl-2008-hwcd - // 4M + 4S - - // A = X1^2 - var a = this.x.redSqr(); - // B = Y1^2 - var b = this.y.redSqr(); - // C = 2 * Z1^2 - var c = this.z.redSqr(); - c = c.redIAdd(c); - // D = a * A - var d = this.curve._mulA(a); - // E = (X1 + Y1)^2 - A - B - var e = this.x.redAdd(this.y).redSqr().redISub(a).redISub(b); - // G = D + B - var g = d.redAdd(b); - // F = G - C - var f = g.redSub(c); - // H = D - B - var h = d.redSub(b); - // X3 = E * F - var nx = e.redMul(f); - // Y3 = G * H - var ny = g.redMul(h); - // T3 = E * H - var nt = e.redMul(h); - // Z3 = F * G - var nz = f.redMul(g); - return this.curve.point(nx, ny, nz, nt); -}; - -Point.prototype._projDbl = function _projDbl() { - // hyperelliptic.org/EFD/g1p/auto-twisted-projective.html - // #doubling-dbl-2008-bbjlp - // #doubling-dbl-2007-bl - // and others - // Generally 3M + 4S or 2M + 4S - - // B = (X1 + Y1)^2 - var b = this.x.redAdd(this.y).redSqr(); - // C = X1^2 - var c = this.x.redSqr(); - // D = Y1^2 - var d = this.y.redSqr(); - - var nx; - var ny; - var nz; - if (this.curve.twisted) { - // E = a * C - var e = this.curve._mulA(c); - // F = E + D - var f = e.redAdd(d); - if (this.zOne) { - // X3 = (B - C - D) * (F - 2) - nx = b.redSub(c).redSub(d).redMul(f.redSub(this.curve.two)); - // Y3 = F * (E - D) - ny = f.redMul(e.redSub(d)); - // Z3 = F^2 - 2 * F - nz = f.redSqr().redSub(f).redSub(f); - } else { - // H = Z1^2 - var h = this.z.redSqr(); - // J = F - 2 * H - var j = f.redSub(h).redISub(h); - // X3 = (B-C-D)*J - nx = b.redSub(c).redISub(d).redMul(j); - // Y3 = F * (E - D) - ny = f.redMul(e.redSub(d)); - // Z3 = F * J - nz = f.redMul(j); - } - } else { - // E = C + D - var e = c.redAdd(d); - // H = (c * Z1)^2 - var h = this.curve._mulC(this.c.redMul(this.z)).redSqr(); - // J = E - 2 * H - var j = e.redSub(h).redSub(h); - // X3 = c * (B - E) * J - nx = this.curve._mulC(b.redISub(e)).redMul(j); - // Y3 = c * E * (C - D) - ny = this.curve._mulC(e).redMul(c.redISub(d)); - // Z3 = E * J - nz = e.redMul(j); - } - return this.curve.point(nx, ny, nz); -}; - -Point.prototype.dbl = function dbl() { - if (this.isInfinity()) - return this; - - // Double in extended coordinates - if (this.curve.extended) - return this._extDbl(); - else - return this._projDbl(); -}; - -Point.prototype._extAdd = function _extAdd(p) { - // hyperelliptic.org/EFD/g1p/auto-twisted-extended-1.html - // #addition-add-2008-hwcd-3 - // 8M - - // A = (Y1 - X1) * (Y2 - X2) - var a = this.y.redSub(this.x).redMul(p.y.redSub(p.x)); - // B = (Y1 + X1) * (Y2 + X2) - var b = this.y.redAdd(this.x).redMul(p.y.redAdd(p.x)); - // C = T1 * k * T2 - var c = this.t.redMul(this.curve.dd).redMul(p.t); - // D = Z1 * 2 * Z2 - var d = this.z.redMul(p.z.redAdd(p.z)); - // E = B - A - var e = b.redSub(a); - // F = D - C - var f = d.redSub(c); - // G = D + C - var g = d.redAdd(c); - // H = B + A - var h = b.redAdd(a); - // X3 = E * F - var nx = e.redMul(f); - // Y3 = G * H - var ny = g.redMul(h); - // T3 = E * H - var nt = e.redMul(h); - // Z3 = F * G - var nz = f.redMul(g); - return this.curve.point(nx, ny, nz, nt); -}; - -Point.prototype._projAdd = function _projAdd(p) { - // hyperelliptic.org/EFD/g1p/auto-twisted-projective.html - // #addition-add-2008-bbjlp - // #addition-add-2007-bl - // 10M + 1S - - // A = Z1 * Z2 - var a = this.z.redMul(p.z); - // B = A^2 - var b = a.redSqr(); - // C = X1 * X2 - var c = this.x.redMul(p.x); - // D = Y1 * Y2 - var d = this.y.redMul(p.y); - // E = d * C * D - var e = this.curve.d.redMul(c).redMul(d); - // F = B - E - var f = b.redSub(e); - // G = B + E - var g = b.redAdd(e); - // X3 = A * F * ((X1 + Y1) * (X2 + Y2) - C - D) - var tmp = this.x.redAdd(this.y).redMul(p.x.redAdd(p.y)).redISub(c).redISub(d); - var nx = a.redMul(f).redMul(tmp); - var ny; - var nz; - if (this.curve.twisted) { - // Y3 = A * G * (D - a * C) - ny = a.redMul(g).redMul(d.redSub(this.curve._mulA(c))); - // Z3 = F * G - nz = f.redMul(g); - } else { - // Y3 = A * G * (D - C) - ny = a.redMul(g).redMul(d.redSub(c)); - // Z3 = c * F * G - nz = this.curve._mulC(f).redMul(g); - } - return this.curve.point(nx, ny, nz); -}; - -Point.prototype.add = function add(p) { - if (this.isInfinity()) - return p; - if (p.isInfinity()) - return this; - - if (this.curve.extended) - return this._extAdd(p); - else - return this._projAdd(p); -}; - -Point.prototype.mul = function mul(k) { - if (this._hasDoubles(k)) - return this.curve._fixedNafMul(this, k); - else - return this.curve._wnafMul(this, k); -}; - -Point.prototype.mulAdd = function mulAdd(k1, p, k2) { - return this.curve._wnafMulAdd(1, [ this, p ], [ k1, k2 ], 2, false); -}; - -Point.prototype.jmulAdd = function jmulAdd(k1, p, k2) { - return this.curve._wnafMulAdd(1, [ this, p ], [ k1, k2 ], 2, true); -}; - -Point.prototype.normalize = function normalize() { - if (this.zOne) - return this; - - // Normalize coordinates - var zi = this.z.redInvm(); - this.x = this.x.redMul(zi); - this.y = this.y.redMul(zi); - if (this.t) - this.t = this.t.redMul(zi); - this.z = this.curve.one; - this.zOne = true; - return this; -}; - -Point.prototype.neg = function neg() { - return this.curve.point(this.x.redNeg(), - this.y, - this.z, - this.t && this.t.redNeg()); -}; - -Point.prototype.getX = function getX() { - this.normalize(); - return this.x.fromRed(); -}; - -Point.prototype.getY = function getY() { - this.normalize(); - return this.y.fromRed(); -}; - -Point.prototype.eq = function eq(other) { - return this === other || - this.getX().cmp(other.getX()) === 0 && - this.getY().cmp(other.getY()) === 0; -}; - -Point.prototype.eqXToP = function eqXToP(x) { - var rx = x.toRed(this.curve.red).redMul(this.z); - if (this.x.cmp(rx) === 0) - return true; - - var xc = x.clone(); - var t = this.curve.redN.redMul(this.z); - for (;;) { - xc.iadd(this.curve.n); - if (xc.cmp(this.curve.p) >= 0) - return false; - - rx.redIAdd(t); - if (this.x.cmp(rx) === 0) - return true; - } - return false; -}; - -// Compatibility with BaseCurve -Point.prototype.toP = Point.prototype.normalize; -Point.prototype.mixedAdd = Point.prototype.add; diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/elliptic/lib/elliptic/curve/index.js b/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/elliptic/lib/elliptic/curve/index.js deleted file mode 100644 index c589281d..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/elliptic/lib/elliptic/curve/index.js +++ /dev/null @@ -1,8 +0,0 @@ -'use strict'; - -var curve = exports; - -curve.base = require('./base'); -curve.short = require('./short'); -curve.mont = require('./mont'); -curve.edwards = require('./edwards'); diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/elliptic/lib/elliptic/curve/mont.js b/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/elliptic/lib/elliptic/curve/mont.js deleted file mode 100644 index 0ddea33e..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/elliptic/lib/elliptic/curve/mont.js +++ /dev/null @@ -1,180 +0,0 @@ -'use strict'; - -var curve = require('../curve'); -var BN = require('bn.js'); -var inherits = require('inherits'); -var Base = curve.base; - -var elliptic = require('../../elliptic'); -var utils = elliptic.utils; - -function MontCurve(conf) { - Base.call(this, 'mont', conf); - - this.a = new BN(conf.a, 16).toRed(this.red); - this.b = new BN(conf.b, 16).toRed(this.red); - this.i4 = new BN(4).toRed(this.red).redInvm(); - this.two = new BN(2).toRed(this.red); - this.a24 = this.i4.redMul(this.a.redAdd(this.two)); -} -inherits(MontCurve, Base); -module.exports = MontCurve; - -MontCurve.prototype.validate = function validate(point) { - var x = point.normalize().x; - var x2 = x.redSqr(); - var rhs = x2.redMul(x).redAdd(x2.redMul(this.a)).redAdd(x); - var y = rhs.redSqrt(); - - return y.redSqr().cmp(rhs) === 0; -}; - -function Point(curve, x, z) { - Base.BasePoint.call(this, curve, 'projective'); - if (x === null && z === null) { - this.x = this.curve.one; - this.z = this.curve.zero; - } else { - this.x = new BN(x, 16); - this.z = new BN(z, 16); - if (!this.x.red) - this.x = this.x.toRed(this.curve.red); - if (!this.z.red) - this.z = this.z.toRed(this.curve.red); - } -} -inherits(Point, Base.BasePoint); - -MontCurve.prototype.decodePoint = function decodePoint(bytes, enc) { - return this.point(utils.toArray(bytes, enc), 1); -}; - -MontCurve.prototype.point = function point(x, z) { - return new Point(this, x, z); -}; - -MontCurve.prototype.pointFromJSON = function pointFromJSON(obj) { - return Point.fromJSON(this, obj); -}; - -Point.prototype.precompute = function precompute() { - // No-op -}; - -Point.prototype._encode = function _encode() { - return this.getX().toArray('be', this.curve.p.byteLength()); -}; - -Point.fromJSON = function fromJSON(curve, obj) { - return new Point(curve, obj[0], obj[1] || curve.one); -}; - -Point.prototype.inspect = function inspect() { - if (this.isInfinity()) - return ''; - return ''; -}; - -Point.prototype.isInfinity = function isInfinity() { - // XXX This code assumes that zero is always zero in red - return this.z.cmpn(0) === 0; -}; - -Point.prototype.dbl = function dbl() { - // http://hyperelliptic.org/EFD/g1p/auto-montgom-xz.html#doubling-dbl-1987-m-3 - // 2M + 2S + 4A - - // A = X1 + Z1 - var a = this.x.redAdd(this.z); - // AA = A^2 - var aa = a.redSqr(); - // B = X1 - Z1 - var b = this.x.redSub(this.z); - // BB = B^2 - var bb = b.redSqr(); - // C = AA - BB - var c = aa.redSub(bb); - // X3 = AA * BB - var nx = aa.redMul(bb); - // Z3 = C * (BB + A24 * C) - var nz = c.redMul(bb.redAdd(this.curve.a24.redMul(c))); - return this.curve.point(nx, nz); -}; - -Point.prototype.add = function add() { - throw new Error('Not supported on Montgomery curve'); -}; - -Point.prototype.diffAdd = function diffAdd(p, diff) { - // http://hyperelliptic.org/EFD/g1p/auto-montgom-xz.html#diffadd-dadd-1987-m-3 - // 4M + 2S + 6A - - // A = X2 + Z2 - var a = this.x.redAdd(this.z); - // B = X2 - Z2 - var b = this.x.redSub(this.z); - // C = X3 + Z3 - var c = p.x.redAdd(p.z); - // D = X3 - Z3 - var d = p.x.redSub(p.z); - // DA = D * A - var da = d.redMul(a); - // CB = C * B - var cb = c.redMul(b); - // X5 = Z1 * (DA + CB)^2 - var nx = diff.z.redMul(da.redAdd(cb).redSqr()); - // Z5 = X1 * (DA - CB)^2 - var nz = diff.x.redMul(da.redISub(cb).redSqr()); - return this.curve.point(nx, nz); -}; - -Point.prototype.mul = function mul(k) { - var t = k.clone(); - var a = this; // (N / 2) * Q + Q - var b = this.curve.point(null, null); // (N / 2) * Q - var c = this; // Q - - for (var bits = []; t.cmpn(0) !== 0; t.iushrn(1)) - bits.push(t.andln(1)); - - for (var i = bits.length - 1; i >= 0; i--) { - if (bits[i] === 0) { - // N * Q + Q = ((N / 2) * Q + Q)) + (N / 2) * Q - a = a.diffAdd(b, c); - // N * Q = 2 * ((N / 2) * Q + Q)) - b = b.dbl(); - } else { - // N * Q = ((N / 2) * Q + Q) + ((N / 2) * Q) - b = a.diffAdd(b, c); - // N * Q + Q = 2 * ((N / 2) * Q + Q) - a = a.dbl(); - } - } - return b; -}; - -Point.prototype.mulAdd = function mulAdd() { - throw new Error('Not supported on Montgomery curve'); -}; - -Point.prototype.jumlAdd = function jumlAdd() { - throw new Error('Not supported on Montgomery curve'); -}; - -Point.prototype.eq = function eq(other) { - return this.getX().cmp(other.getX()) === 0; -}; - -Point.prototype.normalize = function normalize() { - this.x = this.x.redMul(this.z.redInvm()); - this.z = this.curve.one; - return this; -}; - -Point.prototype.getX = function getX() { - // Normalize coordinates - this.normalize(); - - return this.x.fromRed(); -}; diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/elliptic/lib/elliptic/curve/short.js b/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/elliptic/lib/elliptic/curve/short.js deleted file mode 100644 index 0a09d249..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/elliptic/lib/elliptic/curve/short.js +++ /dev/null @@ -1,938 +0,0 @@ -'use strict'; - -var curve = require('../curve'); -var elliptic = require('../../elliptic'); -var BN = require('bn.js'); -var inherits = require('inherits'); -var Base = curve.base; - -var assert = elliptic.utils.assert; - -function ShortCurve(conf) { - Base.call(this, 'short', conf); - - this.a = new BN(conf.a, 16).toRed(this.red); - this.b = new BN(conf.b, 16).toRed(this.red); - this.tinv = this.two.redInvm(); - - this.zeroA = this.a.fromRed().cmpn(0) === 0; - this.threeA = this.a.fromRed().sub(this.p).cmpn(-3) === 0; - - // If the curve is endomorphic, precalculate beta and lambda - this.endo = this._getEndomorphism(conf); - this._endoWnafT1 = new Array(4); - this._endoWnafT2 = new Array(4); -} -inherits(ShortCurve, Base); -module.exports = ShortCurve; - -ShortCurve.prototype._getEndomorphism = function _getEndomorphism(conf) { - // No efficient endomorphism - if (!this.zeroA || !this.g || !this.n || this.p.modn(3) !== 1) - return; - - // Compute beta and lambda, that lambda * P = (beta * Px; Py) - var beta; - var lambda; - if (conf.beta) { - beta = new BN(conf.beta, 16).toRed(this.red); - } else { - var betas = this._getEndoRoots(this.p); - // Choose the smallest beta - beta = betas[0].cmp(betas[1]) < 0 ? betas[0] : betas[1]; - beta = beta.toRed(this.red); - } - if (conf.lambda) { - lambda = new BN(conf.lambda, 16); - } else { - // Choose the lambda that is matching selected beta - var lambdas = this._getEndoRoots(this.n); - if (this.g.mul(lambdas[0]).x.cmp(this.g.x.redMul(beta)) === 0) { - lambda = lambdas[0]; - } else { - lambda = lambdas[1]; - assert(this.g.mul(lambda).x.cmp(this.g.x.redMul(beta)) === 0); - } - } - - // Get basis vectors, used for balanced length-two representation - var basis; - if (conf.basis) { - basis = conf.basis.map(function(vec) { - return { - a: new BN(vec.a, 16), - b: new BN(vec.b, 16) - }; - }); - } else { - basis = this._getEndoBasis(lambda); - } - - return { - beta: beta, - lambda: lambda, - basis: basis - }; -}; - -ShortCurve.prototype._getEndoRoots = function _getEndoRoots(num) { - // Find roots of for x^2 + x + 1 in F - // Root = (-1 +- Sqrt(-3)) / 2 - // - var red = num === this.p ? this.red : BN.mont(num); - var tinv = new BN(2).toRed(red).redInvm(); - var ntinv = tinv.redNeg(); - - var s = new BN(3).toRed(red).redNeg().redSqrt().redMul(tinv); - - var l1 = ntinv.redAdd(s).fromRed(); - var l2 = ntinv.redSub(s).fromRed(); - return [ l1, l2 ]; -}; - -ShortCurve.prototype._getEndoBasis = function _getEndoBasis(lambda) { - // aprxSqrt >= sqrt(this.n) - var aprxSqrt = this.n.ushrn(Math.floor(this.n.bitLength() / 2)); - - // 3.74 - // Run EGCD, until r(L + 1) < aprxSqrt - var u = lambda; - var v = this.n.clone(); - var x1 = new BN(1); - var y1 = new BN(0); - var x2 = new BN(0); - var y2 = new BN(1); - - // NOTE: all vectors are roots of: a + b * lambda = 0 (mod n) - var a0; - var b0; - // First vector - var a1; - var b1; - // Second vector - var a2; - var b2; - - var prevR; - var i = 0; - var r; - var x; - while (u.cmpn(0) !== 0) { - var q = v.div(u); - r = v.sub(q.mul(u)); - x = x2.sub(q.mul(x1)); - var y = y2.sub(q.mul(y1)); - - if (!a1 && r.cmp(aprxSqrt) < 0) { - a0 = prevR.neg(); - b0 = x1; - a1 = r.neg(); - b1 = x; - } else if (a1 && ++i === 2) { - break; - } - prevR = r; - - v = u; - u = r; - x2 = x1; - x1 = x; - y2 = y1; - y1 = y; - } - a2 = r.neg(); - b2 = x; - - var len1 = a1.sqr().add(b1.sqr()); - var len2 = a2.sqr().add(b2.sqr()); - if (len2.cmp(len1) >= 0) { - a2 = a0; - b2 = b0; - } - - // Normalize signs - if (a1.negative) { - a1 = a1.neg(); - b1 = b1.neg(); - } - if (a2.negative) { - a2 = a2.neg(); - b2 = b2.neg(); - } - - return [ - { a: a1, b: b1 }, - { a: a2, b: b2 } - ]; -}; - -ShortCurve.prototype._endoSplit = function _endoSplit(k) { - var basis = this.endo.basis; - var v1 = basis[0]; - var v2 = basis[1]; - - var c1 = v2.b.mul(k).divRound(this.n); - var c2 = v1.b.neg().mul(k).divRound(this.n); - - var p1 = c1.mul(v1.a); - var p2 = c2.mul(v2.a); - var q1 = c1.mul(v1.b); - var q2 = c2.mul(v2.b); - - // Calculate answer - var k1 = k.sub(p1).sub(p2); - var k2 = q1.add(q2).neg(); - return { k1: k1, k2: k2 }; -}; - -ShortCurve.prototype.pointFromX = function pointFromX(x, odd) { - x = new BN(x, 16); - if (!x.red) - x = x.toRed(this.red); - - var y2 = x.redSqr().redMul(x).redIAdd(x.redMul(this.a)).redIAdd(this.b); - var y = y2.redSqrt(); - if (y.redSqr().redSub(y2).cmp(this.zero) !== 0) - throw new Error('invalid point'); - - // XXX Is there any way to tell if the number is odd without converting it - // to non-red form? - var isOdd = y.fromRed().isOdd(); - if (odd && !isOdd || !odd && isOdd) - y = y.redNeg(); - - return this.point(x, y); -}; - -ShortCurve.prototype.validate = function validate(point) { - if (point.inf) - return true; - - var x = point.x; - var y = point.y; - - var ax = this.a.redMul(x); - var rhs = x.redSqr().redMul(x).redIAdd(ax).redIAdd(this.b); - return y.redSqr().redISub(rhs).cmpn(0) === 0; -}; - -ShortCurve.prototype._endoWnafMulAdd = - function _endoWnafMulAdd(points, coeffs, jacobianResult) { - var npoints = this._endoWnafT1; - var ncoeffs = this._endoWnafT2; - for (var i = 0; i < points.length; i++) { - var split = this._endoSplit(coeffs[i]); - var p = points[i]; - var beta = p._getBeta(); - - if (split.k1.negative) { - split.k1.ineg(); - p = p.neg(true); - } - if (split.k2.negative) { - split.k2.ineg(); - beta = beta.neg(true); - } - - npoints[i * 2] = p; - npoints[i * 2 + 1] = beta; - ncoeffs[i * 2] = split.k1; - ncoeffs[i * 2 + 1] = split.k2; - } - var res = this._wnafMulAdd(1, npoints, ncoeffs, i * 2, jacobianResult); - - // Clean-up references to points and coefficients - for (var j = 0; j < i * 2; j++) { - npoints[j] = null; - ncoeffs[j] = null; - } - return res; -}; - -function Point(curve, x, y, isRed) { - Base.BasePoint.call(this, curve, 'affine'); - if (x === null && y === null) { - this.x = null; - this.y = null; - this.inf = true; - } else { - this.x = new BN(x, 16); - this.y = new BN(y, 16); - // Force redgomery representation when loading from JSON - if (isRed) { - this.x.forceRed(this.curve.red); - this.y.forceRed(this.curve.red); - } - if (!this.x.red) - this.x = this.x.toRed(this.curve.red); - if (!this.y.red) - this.y = this.y.toRed(this.curve.red); - this.inf = false; - } -} -inherits(Point, Base.BasePoint); - -ShortCurve.prototype.point = function point(x, y, isRed) { - return new Point(this, x, y, isRed); -}; - -ShortCurve.prototype.pointFromJSON = function pointFromJSON(obj, red) { - return Point.fromJSON(this, obj, red); -}; - -Point.prototype._getBeta = function _getBeta() { - if (!this.curve.endo) - return; - - var pre = this.precomputed; - if (pre && pre.beta) - return pre.beta; - - var beta = this.curve.point(this.x.redMul(this.curve.endo.beta), this.y); - if (pre) { - var curve = this.curve; - var endoMul = function(p) { - return curve.point(p.x.redMul(curve.endo.beta), p.y); - }; - pre.beta = beta; - beta.precomputed = { - beta: null, - naf: pre.naf && { - wnd: pre.naf.wnd, - points: pre.naf.points.map(endoMul) - }, - doubles: pre.doubles && { - step: pre.doubles.step, - points: pre.doubles.points.map(endoMul) - } - }; - } - return beta; -}; - -Point.prototype.toJSON = function toJSON() { - if (!this.precomputed) - return [ this.x, this.y ]; - - return [ this.x, this.y, this.precomputed && { - doubles: this.precomputed.doubles && { - step: this.precomputed.doubles.step, - points: this.precomputed.doubles.points.slice(1) - }, - naf: this.precomputed.naf && { - wnd: this.precomputed.naf.wnd, - points: this.precomputed.naf.points.slice(1) - } - } ]; -}; - -Point.fromJSON = function fromJSON(curve, obj, red) { - if (typeof obj === 'string') - obj = JSON.parse(obj); - var res = curve.point(obj[0], obj[1], red); - if (!obj[2]) - return res; - - function obj2point(obj) { - return curve.point(obj[0], obj[1], red); - } - - var pre = obj[2]; - res.precomputed = { - beta: null, - doubles: pre.doubles && { - step: pre.doubles.step, - points: [ res ].concat(pre.doubles.points.map(obj2point)) - }, - naf: pre.naf && { - wnd: pre.naf.wnd, - points: [ res ].concat(pre.naf.points.map(obj2point)) - } - }; - return res; -}; - -Point.prototype.inspect = function inspect() { - if (this.isInfinity()) - return ''; - return ''; -}; - -Point.prototype.isInfinity = function isInfinity() { - return this.inf; -}; - -Point.prototype.add = function add(p) { - // O + P = P - if (this.inf) - return p; - - // P + O = P - if (p.inf) - return this; - - // P + P = 2P - if (this.eq(p)) - return this.dbl(); - - // P + (-P) = O - if (this.neg().eq(p)) - return this.curve.point(null, null); - - // P + Q = O - if (this.x.cmp(p.x) === 0) - return this.curve.point(null, null); - - var c = this.y.redSub(p.y); - if (c.cmpn(0) !== 0) - c = c.redMul(this.x.redSub(p.x).redInvm()); - var nx = c.redSqr().redISub(this.x).redISub(p.x); - var ny = c.redMul(this.x.redSub(nx)).redISub(this.y); - return this.curve.point(nx, ny); -}; - -Point.prototype.dbl = function dbl() { - if (this.inf) - return this; - - // 2P = O - var ys1 = this.y.redAdd(this.y); - if (ys1.cmpn(0) === 0) - return this.curve.point(null, null); - - var a = this.curve.a; - - var x2 = this.x.redSqr(); - var dyinv = ys1.redInvm(); - var c = x2.redAdd(x2).redIAdd(x2).redIAdd(a).redMul(dyinv); - - var nx = c.redSqr().redISub(this.x.redAdd(this.x)); - var ny = c.redMul(this.x.redSub(nx)).redISub(this.y); - return this.curve.point(nx, ny); -}; - -Point.prototype.getX = function getX() { - return this.x.fromRed(); -}; - -Point.prototype.getY = function getY() { - return this.y.fromRed(); -}; - -Point.prototype.mul = function mul(k) { - k = new BN(k, 16); - - if (this._hasDoubles(k)) - return this.curve._fixedNafMul(this, k); - else if (this.curve.endo) - return this.curve._endoWnafMulAdd([ this ], [ k ]); - else - return this.curve._wnafMul(this, k); -}; - -Point.prototype.mulAdd = function mulAdd(k1, p2, k2) { - var points = [ this, p2 ]; - var coeffs = [ k1, k2 ]; - if (this.curve.endo) - return this.curve._endoWnafMulAdd(points, coeffs); - else - return this.curve._wnafMulAdd(1, points, coeffs, 2); -}; - -Point.prototype.jmulAdd = function jmulAdd(k1, p2, k2) { - var points = [ this, p2 ]; - var coeffs = [ k1, k2 ]; - if (this.curve.endo) - return this.curve._endoWnafMulAdd(points, coeffs, true); - else - return this.curve._wnafMulAdd(1, points, coeffs, 2, true); -}; - -Point.prototype.eq = function eq(p) { - return this === p || - this.inf === p.inf && - (this.inf || this.x.cmp(p.x) === 0 && this.y.cmp(p.y) === 0); -}; - -Point.prototype.neg = function neg(_precompute) { - if (this.inf) - return this; - - var res = this.curve.point(this.x, this.y.redNeg()); - if (_precompute && this.precomputed) { - var pre = this.precomputed; - var negate = function(p) { - return p.neg(); - }; - res.precomputed = { - naf: pre.naf && { - wnd: pre.naf.wnd, - points: pre.naf.points.map(negate) - }, - doubles: pre.doubles && { - step: pre.doubles.step, - points: pre.doubles.points.map(negate) - } - }; - } - return res; -}; - -Point.prototype.toJ = function toJ() { - if (this.inf) - return this.curve.jpoint(null, null, null); - - var res = this.curve.jpoint(this.x, this.y, this.curve.one); - return res; -}; - -function JPoint(curve, x, y, z) { - Base.BasePoint.call(this, curve, 'jacobian'); - if (x === null && y === null && z === null) { - this.x = this.curve.one; - this.y = this.curve.one; - this.z = new BN(0); - } else { - this.x = new BN(x, 16); - this.y = new BN(y, 16); - this.z = new BN(z, 16); - } - if (!this.x.red) - this.x = this.x.toRed(this.curve.red); - if (!this.y.red) - this.y = this.y.toRed(this.curve.red); - if (!this.z.red) - this.z = this.z.toRed(this.curve.red); - - this.zOne = this.z === this.curve.one; -} -inherits(JPoint, Base.BasePoint); - -ShortCurve.prototype.jpoint = function jpoint(x, y, z) { - return new JPoint(this, x, y, z); -}; - -JPoint.prototype.toP = function toP() { - if (this.isInfinity()) - return this.curve.point(null, null); - - var zinv = this.z.redInvm(); - var zinv2 = zinv.redSqr(); - var ax = this.x.redMul(zinv2); - var ay = this.y.redMul(zinv2).redMul(zinv); - - return this.curve.point(ax, ay); -}; - -JPoint.prototype.neg = function neg() { - return this.curve.jpoint(this.x, this.y.redNeg(), this.z); -}; - -JPoint.prototype.add = function add(p) { - // O + P = P - if (this.isInfinity()) - return p; - - // P + O = P - if (p.isInfinity()) - return this; - - // 12M + 4S + 7A - var pz2 = p.z.redSqr(); - var z2 = this.z.redSqr(); - var u1 = this.x.redMul(pz2); - var u2 = p.x.redMul(z2); - var s1 = this.y.redMul(pz2.redMul(p.z)); - var s2 = p.y.redMul(z2.redMul(this.z)); - - var h = u1.redSub(u2); - var r = s1.redSub(s2); - if (h.cmpn(0) === 0) { - if (r.cmpn(0) !== 0) - return this.curve.jpoint(null, null, null); - else - return this.dbl(); - } - - var h2 = h.redSqr(); - var h3 = h2.redMul(h); - var v = u1.redMul(h2); - - var nx = r.redSqr().redIAdd(h3).redISub(v).redISub(v); - var ny = r.redMul(v.redISub(nx)).redISub(s1.redMul(h3)); - var nz = this.z.redMul(p.z).redMul(h); - - return this.curve.jpoint(nx, ny, nz); -}; - -JPoint.prototype.mixedAdd = function mixedAdd(p) { - // O + P = P - if (this.isInfinity()) - return p.toJ(); - - // P + O = P - if (p.isInfinity()) - return this; - - // 8M + 3S + 7A - var z2 = this.z.redSqr(); - var u1 = this.x; - var u2 = p.x.redMul(z2); - var s1 = this.y; - var s2 = p.y.redMul(z2).redMul(this.z); - - var h = u1.redSub(u2); - var r = s1.redSub(s2); - if (h.cmpn(0) === 0) { - if (r.cmpn(0) !== 0) - return this.curve.jpoint(null, null, null); - else - return this.dbl(); - } - - var h2 = h.redSqr(); - var h3 = h2.redMul(h); - var v = u1.redMul(h2); - - var nx = r.redSqr().redIAdd(h3).redISub(v).redISub(v); - var ny = r.redMul(v.redISub(nx)).redISub(s1.redMul(h3)); - var nz = this.z.redMul(h); - - return this.curve.jpoint(nx, ny, nz); -}; - -JPoint.prototype.dblp = function dblp(pow) { - if (pow === 0) - return this; - if (this.isInfinity()) - return this; - if (!pow) - return this.dbl(); - - if (this.curve.zeroA || this.curve.threeA) { - var r = this; - for (var i = 0; i < pow; i++) - r = r.dbl(); - return r; - } - - // 1M + 2S + 1A + N * (4S + 5M + 8A) - // N = 1 => 6M + 6S + 9A - var a = this.curve.a; - var tinv = this.curve.tinv; - - var jx = this.x; - var jy = this.y; - var jz = this.z; - var jz4 = jz.redSqr().redSqr(); - - // Reuse results - var jyd = jy.redAdd(jy); - for (var i = 0; i < pow; i++) { - var jx2 = jx.redSqr(); - var jyd2 = jyd.redSqr(); - var jyd4 = jyd2.redSqr(); - var c = jx2.redAdd(jx2).redIAdd(jx2).redIAdd(a.redMul(jz4)); - - var t1 = jx.redMul(jyd2); - var nx = c.redSqr().redISub(t1.redAdd(t1)); - var t2 = t1.redISub(nx); - var dny = c.redMul(t2); - dny = dny.redIAdd(dny).redISub(jyd4); - var nz = jyd.redMul(jz); - if (i + 1 < pow) - jz4 = jz4.redMul(jyd4); - - jx = nx; - jz = nz; - jyd = dny; - } - - return this.curve.jpoint(jx, jyd.redMul(tinv), jz); -}; - -JPoint.prototype.dbl = function dbl() { - if (this.isInfinity()) - return this; - - if (this.curve.zeroA) - return this._zeroDbl(); - else if (this.curve.threeA) - return this._threeDbl(); - else - return this._dbl(); -}; - -JPoint.prototype._zeroDbl = function _zeroDbl() { - var nx; - var ny; - var nz; - // Z = 1 - if (this.zOne) { - // hyperelliptic.org/EFD/g1p/auto-shortw-jacobian-0.html - // #doubling-mdbl-2007-bl - // 1M + 5S + 14A - - // XX = X1^2 - var xx = this.x.redSqr(); - // YY = Y1^2 - var yy = this.y.redSqr(); - // YYYY = YY^2 - var yyyy = yy.redSqr(); - // S = 2 * ((X1 + YY)^2 - XX - YYYY) - var s = this.x.redAdd(yy).redSqr().redISub(xx).redISub(yyyy); - s = s.redIAdd(s); - // M = 3 * XX + a; a = 0 - var m = xx.redAdd(xx).redIAdd(xx); - // T = M ^ 2 - 2*S - var t = m.redSqr().redISub(s).redISub(s); - - // 8 * YYYY - var yyyy8 = yyyy.redIAdd(yyyy); - yyyy8 = yyyy8.redIAdd(yyyy8); - yyyy8 = yyyy8.redIAdd(yyyy8); - - // X3 = T - nx = t; - // Y3 = M * (S - T) - 8 * YYYY - ny = m.redMul(s.redISub(t)).redISub(yyyy8); - // Z3 = 2*Y1 - nz = this.y.redAdd(this.y); - } else { - // hyperelliptic.org/EFD/g1p/auto-shortw-jacobian-0.html - // #doubling-dbl-2009-l - // 2M + 5S + 13A - - // A = X1^2 - var a = this.x.redSqr(); - // B = Y1^2 - var b = this.y.redSqr(); - // C = B^2 - var c = b.redSqr(); - // D = 2 * ((X1 + B)^2 - A - C) - var d = this.x.redAdd(b).redSqr().redISub(a).redISub(c); - d = d.redIAdd(d); - // E = 3 * A - var e = a.redAdd(a).redIAdd(a); - // F = E^2 - var f = e.redSqr(); - - // 8 * C - var c8 = c.redIAdd(c); - c8 = c8.redIAdd(c8); - c8 = c8.redIAdd(c8); - - // X3 = F - 2 * D - nx = f.redISub(d).redISub(d); - // Y3 = E * (D - X3) - 8 * C - ny = e.redMul(d.redISub(nx)).redISub(c8); - // Z3 = 2 * Y1 * Z1 - nz = this.y.redMul(this.z); - nz = nz.redIAdd(nz); - } - - return this.curve.jpoint(nx, ny, nz); -}; - -JPoint.prototype._threeDbl = function _threeDbl() { - var nx; - var ny; - var nz; - // Z = 1 - if (this.zOne) { - // hyperelliptic.org/EFD/g1p/auto-shortw-jacobian-3.html - // #doubling-mdbl-2007-bl - // 1M + 5S + 15A - - // XX = X1^2 - var xx = this.x.redSqr(); - // YY = Y1^2 - var yy = this.y.redSqr(); - // YYYY = YY^2 - var yyyy = yy.redSqr(); - // S = 2 * ((X1 + YY)^2 - XX - YYYY) - var s = this.x.redAdd(yy).redSqr().redISub(xx).redISub(yyyy); - s = s.redIAdd(s); - // M = 3 * XX + a - var m = xx.redAdd(xx).redIAdd(xx).redIAdd(this.curve.a); - // T = M^2 - 2 * S - var t = m.redSqr().redISub(s).redISub(s); - // X3 = T - nx = t; - // Y3 = M * (S - T) - 8 * YYYY - var yyyy8 = yyyy.redIAdd(yyyy); - yyyy8 = yyyy8.redIAdd(yyyy8); - yyyy8 = yyyy8.redIAdd(yyyy8); - ny = m.redMul(s.redISub(t)).redISub(yyyy8); - // Z3 = 2 * Y1 - nz = this.y.redAdd(this.y); - } else { - // hyperelliptic.org/EFD/g1p/auto-shortw-jacobian-3.html#doubling-dbl-2001-b - // 3M + 5S - - // delta = Z1^2 - var delta = this.z.redSqr(); - // gamma = Y1^2 - var gamma = this.y.redSqr(); - // beta = X1 * gamma - var beta = this.x.redMul(gamma); - // alpha = 3 * (X1 - delta) * (X1 + delta) - var alpha = this.x.redSub(delta).redMul(this.x.redAdd(delta)); - alpha = alpha.redAdd(alpha).redIAdd(alpha); - // X3 = alpha^2 - 8 * beta - var beta4 = beta.redIAdd(beta); - beta4 = beta4.redIAdd(beta4); - var beta8 = beta4.redAdd(beta4); - nx = alpha.redSqr().redISub(beta8); - // Z3 = (Y1 + Z1)^2 - gamma - delta - nz = this.y.redAdd(this.z).redSqr().redISub(gamma).redISub(delta); - // Y3 = alpha * (4 * beta - X3) - 8 * gamma^2 - var ggamma8 = gamma.redSqr(); - ggamma8 = ggamma8.redIAdd(ggamma8); - ggamma8 = ggamma8.redIAdd(ggamma8); - ggamma8 = ggamma8.redIAdd(ggamma8); - ny = alpha.redMul(beta4.redISub(nx)).redISub(ggamma8); - } - - return this.curve.jpoint(nx, ny, nz); -}; - -JPoint.prototype._dbl = function _dbl() { - var a = this.curve.a; - - // 4M + 6S + 10A - var jx = this.x; - var jy = this.y; - var jz = this.z; - var jz4 = jz.redSqr().redSqr(); - - var jx2 = jx.redSqr(); - var jy2 = jy.redSqr(); - - var c = jx2.redAdd(jx2).redIAdd(jx2).redIAdd(a.redMul(jz4)); - - var jxd4 = jx.redAdd(jx); - jxd4 = jxd4.redIAdd(jxd4); - var t1 = jxd4.redMul(jy2); - var nx = c.redSqr().redISub(t1.redAdd(t1)); - var t2 = t1.redISub(nx); - - var jyd8 = jy2.redSqr(); - jyd8 = jyd8.redIAdd(jyd8); - jyd8 = jyd8.redIAdd(jyd8); - jyd8 = jyd8.redIAdd(jyd8); - var ny = c.redMul(t2).redISub(jyd8); - var nz = jy.redAdd(jy).redMul(jz); - - return this.curve.jpoint(nx, ny, nz); -}; - -JPoint.prototype.trpl = function trpl() { - if (!this.curve.zeroA) - return this.dbl().add(this); - - // hyperelliptic.org/EFD/g1p/auto-shortw-jacobian-0.html#tripling-tpl-2007-bl - // 5M + 10S + ... - - // XX = X1^2 - var xx = this.x.redSqr(); - // YY = Y1^2 - var yy = this.y.redSqr(); - // ZZ = Z1^2 - var zz = this.z.redSqr(); - // YYYY = YY^2 - var yyyy = yy.redSqr(); - // M = 3 * XX + a * ZZ2; a = 0 - var m = xx.redAdd(xx).redIAdd(xx); - // MM = M^2 - var mm = m.redSqr(); - // E = 6 * ((X1 + YY)^2 - XX - YYYY) - MM - var e = this.x.redAdd(yy).redSqr().redISub(xx).redISub(yyyy); - e = e.redIAdd(e); - e = e.redAdd(e).redIAdd(e); - e = e.redISub(mm); - // EE = E^2 - var ee = e.redSqr(); - // T = 16*YYYY - var t = yyyy.redIAdd(yyyy); - t = t.redIAdd(t); - t = t.redIAdd(t); - t = t.redIAdd(t); - // U = (M + E)^2 - MM - EE - T - var u = m.redIAdd(e).redSqr().redISub(mm).redISub(ee).redISub(t); - // X3 = 4 * (X1 * EE - 4 * YY * U) - var yyu4 = yy.redMul(u); - yyu4 = yyu4.redIAdd(yyu4); - yyu4 = yyu4.redIAdd(yyu4); - var nx = this.x.redMul(ee).redISub(yyu4); - nx = nx.redIAdd(nx); - nx = nx.redIAdd(nx); - // Y3 = 8 * Y1 * (U * (T - U) - E * EE) - var ny = this.y.redMul(u.redMul(t.redISub(u)).redISub(e.redMul(ee))); - ny = ny.redIAdd(ny); - ny = ny.redIAdd(ny); - ny = ny.redIAdd(ny); - // Z3 = (Z1 + E)^2 - ZZ - EE - var nz = this.z.redAdd(e).redSqr().redISub(zz).redISub(ee); - - return this.curve.jpoint(nx, ny, nz); -}; - -JPoint.prototype.mul = function mul(k, kbase) { - k = new BN(k, kbase); - - return this.curve._wnafMul(this, k); -}; - -JPoint.prototype.eq = function eq(p) { - if (p.type === 'affine') - return this.eq(p.toJ()); - - if (this === p) - return true; - - // x1 * z2^2 == x2 * z1^2 - var z2 = this.z.redSqr(); - var pz2 = p.z.redSqr(); - if (this.x.redMul(pz2).redISub(p.x.redMul(z2)).cmpn(0) !== 0) - return false; - - // y1 * z2^3 == y2 * z1^3 - var z3 = z2.redMul(this.z); - var pz3 = pz2.redMul(p.z); - return this.y.redMul(pz3).redISub(p.y.redMul(z3)).cmpn(0) === 0; -}; - -JPoint.prototype.eqXToP = function eqXToP(x) { - var zs = this.z.redSqr(); - var rx = x.toRed(this.curve.red).redMul(zs); - if (this.x.cmp(rx) === 0) - return true; - - var xc = x.clone(); - var t = this.curve.redN.redMul(zs); - for (;;) { - xc.iadd(this.curve.n); - if (xc.cmp(this.curve.p) >= 0) - return false; - - rx.redIAdd(t); - if (this.x.cmp(rx) === 0) - return true; - } - return false; -}; - -JPoint.prototype.inspect = function inspect() { - if (this.isInfinity()) - return ''; - return ''; -}; - -JPoint.prototype.isInfinity = function isInfinity() { - // XXX This code assumes that zero is always zero in red - return this.z.cmpn(0) === 0; -}; diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/elliptic/lib/elliptic/curves.js b/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/elliptic/lib/elliptic/curves.js deleted file mode 100644 index 1d8015b3..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/elliptic/lib/elliptic/curves.js +++ /dev/null @@ -1,205 +0,0 @@ -'use strict'; - -var curves = exports; - -var hash = require('hash.js'); -var elliptic = require('../elliptic'); - -var assert = elliptic.utils.assert; - -function PresetCurve(options) { - if (options.type === 'short') - this.curve = new elliptic.curve.short(options); - else if (options.type === 'edwards') - this.curve = new elliptic.curve.edwards(options); - else - this.curve = new elliptic.curve.mont(options); - this.g = this.curve.g; - this.n = this.curve.n; - this.hash = options.hash; - - assert(this.g.validate(), 'Invalid curve'); - assert(this.g.mul(this.n).isInfinity(), 'Invalid curve, G*N != O'); -} -curves.PresetCurve = PresetCurve; - -function defineCurve(name, options) { - Object.defineProperty(curves, name, { - configurable: true, - enumerable: true, - get: function() { - var curve = new PresetCurve(options); - Object.defineProperty(curves, name, { - configurable: true, - enumerable: true, - value: curve - }); - return curve; - } - }); -} - -defineCurve('p192', { - type: 'short', - prime: 'p192', - p: 'ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff', - a: 'ffffffff ffffffff ffffffff fffffffe ffffffff fffffffc', - b: '64210519 e59c80e7 0fa7e9ab 72243049 feb8deec c146b9b1', - n: 'ffffffff ffffffff ffffffff 99def836 146bc9b1 b4d22831', - hash: hash.sha256, - gRed: false, - g: [ - '188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012', - '07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811' - ] -}); - -defineCurve('p224', { - type: 'short', - prime: 'p224', - p: 'ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001', - a: 'ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff fffffffe', - b: 'b4050a85 0c04b3ab f5413256 5044b0b7 d7bfd8ba 270b3943 2355ffb4', - n: 'ffffffff ffffffff ffffffff ffff16a2 e0b8f03e 13dd2945 5c5c2a3d', - hash: hash.sha256, - gRed: false, - g: [ - 'b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21', - 'bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34' - ] -}); - -defineCurve('p256', { - type: 'short', - prime: null, - p: 'ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff ffffffff', - a: 'ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff fffffffc', - b: '5ac635d8 aa3a93e7 b3ebbd55 769886bc 651d06b0 cc53b0f6 3bce3c3e 27d2604b', - n: 'ffffffff 00000000 ffffffff ffffffff bce6faad a7179e84 f3b9cac2 fc632551', - hash: hash.sha256, - gRed: false, - g: [ - '6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296', - '4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5' - ] -}); - -defineCurve('p384', { - type: 'short', - prime: null, - p: 'ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ' + - 'fffffffe ffffffff 00000000 00000000 ffffffff', - a: 'ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ' + - 'fffffffe ffffffff 00000000 00000000 fffffffc', - b: 'b3312fa7 e23ee7e4 988e056b e3f82d19 181d9c6e fe814112 0314088f ' + - '5013875a c656398d 8a2ed19d 2a85c8ed d3ec2aef', - n: 'ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff c7634d81 ' + - 'f4372ddf 581a0db2 48b0a77a ecec196a ccc52973', - hash: hash.sha384, - gRed: false, - g: [ - 'aa87ca22 be8b0537 8eb1c71e f320ad74 6e1d3b62 8ba79b98 59f741e0 82542a38 ' + - '5502f25d bf55296c 3a545e38 72760ab7', - '3617de4a 96262c6f 5d9e98bf 9292dc29 f8f41dbd 289a147c e9da3113 b5f0b8c0 ' + - '0a60b1ce 1d7e819d 7a431d7c 90ea0e5f' - ] -}); - -defineCurve('p521', { - type: 'short', - prime: null, - p: '000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ' + - 'ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ' + - 'ffffffff ffffffff ffffffff ffffffff ffffffff', - a: '000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ' + - 'ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ' + - 'ffffffff ffffffff ffffffff ffffffff fffffffc', - b: '00000051 953eb961 8e1c9a1f 929a21a0 b68540ee a2da725b ' + - '99b315f3 b8b48991 8ef109e1 56193951 ec7e937b 1652c0bd ' + - '3bb1bf07 3573df88 3d2c34f1 ef451fd4 6b503f00', - n: '000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ' + - 'ffffffff ffffffff fffffffa 51868783 bf2f966b 7fcc0148 ' + - 'f709a5d0 3bb5c9b8 899c47ae bb6fb71e 91386409', - hash: hash.sha512, - gRed: false, - g: [ - '000000c6 858e06b7 0404e9cd 9e3ecb66 2395b442 9c648139 ' + - '053fb521 f828af60 6b4d3dba a14b5e77 efe75928 fe1dc127 ' + - 'a2ffa8de 3348b3c1 856a429b f97e7e31 c2e5bd66', - '00000118 39296a78 9a3bc004 5c8a5fb4 2c7d1bd9 98f54449 ' + - '579b4468 17afbd17 273e662c 97ee7299 5ef42640 c550b901 ' + - '3fad0761 353c7086 a272c240 88be9476 9fd16650' - ] -}); - -defineCurve('curve25519', { - type: 'mont', - prime: 'p25519', - p: '7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed', - a: '76d06', - b: '0', - n: '1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed', - hash: hash.sha256, - gRed: false, - g: [ - '9' - ] -}); - -defineCurve('ed25519', { - type: 'edwards', - prime: 'p25519', - p: '7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed', - a: '-1', - c: '1', - // -121665 * (121666^(-1)) (mod P) - d: '52036cee2b6ffe73 8cc740797779e898 00700a4d4141d8ab 75eb4dca135978a3', - n: '1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed', - hash: hash.sha256, - gRed: false, - g: [ - '216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a', - - // 4/5 - '6666666666666666666666666666666666666666666666666666666666666658' - ] -}); - -var pre; -try { - pre = require('./precomputed/secp256k1'); -} catch (e) { - pre = undefined; -} - -defineCurve('secp256k1', { - type: 'short', - prime: 'k256', - p: 'ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f', - a: '0', - b: '7', - n: 'ffffffff ffffffff ffffffff fffffffe baaedce6 af48a03b bfd25e8c d0364141', - h: '1', - hash: hash.sha256, - - // Precomputed endomorphism - beta: '7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee', - lambda: '5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72', - basis: [ - { - a: '3086d221a7d46bcde86c90e49284eb15', - b: '-e4437ed6010e88286f547fa90abfe4c3' - }, - { - a: '114ca50f7a8e2f3f657c1108d9d44cfd8', - b: '3086d221a7d46bcde86c90e49284eb15' - } - ], - - gRed: false, - g: [ - '79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798', - '483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8', - pre - ] -}); diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/elliptic/lib/elliptic/ec/index.js b/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/elliptic/lib/elliptic/ec/index.js deleted file mode 100644 index d71d5df4..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/elliptic/lib/elliptic/ec/index.js +++ /dev/null @@ -1,237 +0,0 @@ -'use strict'; - -var BN = require('bn.js'); -var elliptic = require('../../elliptic'); -var utils = elliptic.utils; -var assert = utils.assert; - -var KeyPair = require('./key'); -var Signature = require('./signature'); - -function EC(options) { - if (!(this instanceof EC)) - return new EC(options); - - // Shortcut `elliptic.ec(curve-name)` - if (typeof options === 'string') { - assert(elliptic.curves.hasOwnProperty(options), 'Unknown curve ' + options); - - options = elliptic.curves[options]; - } - - // Shortcut for `elliptic.ec(elliptic.curves.curveName)` - if (options instanceof elliptic.curves.PresetCurve) - options = { curve: options }; - - this.curve = options.curve.curve; - this.n = this.curve.n; - this.nh = this.n.ushrn(1); - this.g = this.curve.g; - - // Point on curve - this.g = options.curve.g; - this.g.precompute(options.curve.n.bitLength() + 1); - - // Hash for function for DRBG - this.hash = options.hash || options.curve.hash; -} -module.exports = EC; - -EC.prototype.keyPair = function keyPair(options) { - return new KeyPair(this, options); -}; - -EC.prototype.keyFromPrivate = function keyFromPrivate(priv, enc) { - return KeyPair.fromPrivate(this, priv, enc); -}; - -EC.prototype.keyFromPublic = function keyFromPublic(pub, enc) { - return KeyPair.fromPublic(this, pub, enc); -}; - -EC.prototype.genKeyPair = function genKeyPair(options) { - if (!options) - options = {}; - - // Instantiate Hmac_DRBG - var drbg = new elliptic.hmacDRBG({ - hash: this.hash, - pers: options.pers, - entropy: options.entropy || elliptic.rand(this.hash.hmacStrength), - nonce: this.n.toArray() - }); - - var bytes = this.n.byteLength(); - var ns2 = this.n.sub(new BN(2)); - do { - var priv = new BN(drbg.generate(bytes)); - if (priv.cmp(ns2) > 0) - continue; - - priv.iaddn(1); - return this.keyFromPrivate(priv); - } while (true); -}; - -EC.prototype._truncateToN = function truncateToN(msg, truncOnly) { - var delta = msg.byteLength() * 8 - this.n.bitLength(); - if (delta > 0) - msg = msg.ushrn(delta); - if (!truncOnly && msg.cmp(this.n) >= 0) - return msg.sub(this.n); - else - return msg; -}; - -EC.prototype.sign = function sign(msg, key, enc, options) { - if (typeof enc === 'object') { - options = enc; - enc = null; - } - if (!options) - options = {}; - - key = this.keyFromPrivate(key, enc); - msg = this._truncateToN(new BN(msg, 16)); - - // Zero-extend key to provide enough entropy - var bytes = this.n.byteLength(); - var bkey = key.getPrivate().toArray('be', bytes); - - // Zero-extend nonce to have the same byte size as N - var nonce = msg.toArray('be', bytes); - - // Instantiate Hmac_DRBG - var drbg = new elliptic.hmacDRBG({ - hash: this.hash, - entropy: bkey, - nonce: nonce, - pers: options.pers, - persEnc: options.persEnc - }); - - // Number of bytes to generate - var ns1 = this.n.sub(new BN(1)); - - for (var iter = 0; true; iter++) { - var k = options.k ? - options.k(iter) : - new BN(drbg.generate(this.n.byteLength())); - k = this._truncateToN(k, true); - if (k.cmpn(1) <= 0 || k.cmp(ns1) >= 0) - continue; - - var kp = this.g.mul(k); - if (kp.isInfinity()) - continue; - - var kpX = kp.getX(); - var r = kpX.umod(this.n); - if (r.cmpn(0) === 0) - continue; - - var s = k.invm(this.n).mul(r.mul(key.getPrivate()).iadd(msg)); - s = s.umod(this.n); - if (s.cmpn(0) === 0) - continue; - - var recoveryParam = (kp.getY().isOdd() ? 1 : 0) | - (kpX.cmp(r) !== 0 ? 2 : 0); - - // Use complement of `s`, if it is > `n / 2` - if (options.canonical && s.cmp(this.nh) > 0) { - s = this.n.sub(s); - recoveryParam ^= 1; - } - - return new Signature({ r: r, s: s, recoveryParam: recoveryParam }); - } -}; - -EC.prototype.verify = function verify(msg, signature, key, enc) { - msg = this._truncateToN(new BN(msg, 16)); - key = this.keyFromPublic(key, enc); - signature = new Signature(signature, 'hex'); - - // Perform primitive values validation - var r = signature.r; - var s = signature.s; - if (r.cmpn(1) < 0 || r.cmp(this.n) >= 0) - return false; - if (s.cmpn(1) < 0 || s.cmp(this.n) >= 0) - return false; - - // Validate signature - var sinv = s.invm(this.n); - var u1 = sinv.mul(msg).umod(this.n); - var u2 = sinv.mul(r).umod(this.n); - - if (!this.curve._maxwellTrick) { - var p = this.g.mulAdd(u1, key.getPublic(), u2); - if (p.isInfinity()) - return false; - - return p.getX().umod(this.n).cmp(r) === 0; - } - - // NOTE: Greg Maxwell's trick, inspired by: - // https://git.io/vad3K - - var p = this.g.jmulAdd(u1, key.getPublic(), u2); - if (p.isInfinity()) - return false; - - // Compare `p.x` of Jacobian point with `r`, - // this will do `p.x == r * p.z^2` instead of multiplying `p.x` by the - // inverse of `p.z^2` - return p.eqXToP(r); -}; - -EC.prototype.recoverPubKey = function(msg, signature, j, enc) { - assert((3 & j) === j, 'The recovery param is more than two bits'); - signature = new Signature(signature, enc); - - var n = this.n; - var e = new BN(msg); - var r = signature.r; - var s = signature.s; - - // A set LSB signifies that the y-coordinate is odd - var isYOdd = j & 1; - var isSecondKey = j >> 1; - if (r.cmp(this.curve.p.umod(this.curve.n)) >= 0 && isSecondKey) - throw new Error('Unable to find sencond key candinate'); - - // 1.1. Let x = r + jn. - if (isSecondKey) - r = this.curve.pointFromX(r.add(this.curve.n), isYOdd); - else - r = this.curve.pointFromX(r, isYOdd); - - var rInv = signature.r.invm(n); - var s1 = n.sub(e).mul(rInv).umod(n); - var s2 = s.mul(rInv).umod(n); - - // 1.6.1 Compute Q = r^-1 (sR - eG) - // Q = r^-1 (sR + -eG) - return this.g.mulAdd(s1, r, s2); -}; - -EC.prototype.getKeyRecoveryParam = function(e, signature, Q, enc) { - signature = new Signature(signature, enc); - if (signature.recoveryParam !== null) - return signature.recoveryParam; - - for (var i = 0; i < 4; i++) { - var Qprime; - try { - Qprime = this.recoverPubKey(e, signature, i); - } catch (e) { - continue; - } - - if (Qprime.eq(Q)) - return i; - } - throw new Error('Unable to find valid recovery factor'); -}; diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/elliptic/lib/elliptic/ec/key.js b/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/elliptic/lib/elliptic/ec/key.js deleted file mode 100644 index 8d075fb3..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/elliptic/lib/elliptic/ec/key.js +++ /dev/null @@ -1,107 +0,0 @@ -'use strict'; - -var BN = require('bn.js'); - -function KeyPair(ec, options) { - this.ec = ec; - this.priv = null; - this.pub = null; - - // KeyPair(ec, { priv: ..., pub: ... }) - if (options.priv) - this._importPrivate(options.priv, options.privEnc); - if (options.pub) - this._importPublic(options.pub, options.pubEnc); -} -module.exports = KeyPair; - -KeyPair.fromPublic = function fromPublic(ec, pub, enc) { - if (pub instanceof KeyPair) - return pub; - - return new KeyPair(ec, { - pub: pub, - pubEnc: enc - }); -}; - -KeyPair.fromPrivate = function fromPrivate(ec, priv, enc) { - if (priv instanceof KeyPair) - return priv; - - return new KeyPair(ec, { - priv: priv, - privEnc: enc - }); -}; - -KeyPair.prototype.validate = function validate() { - var pub = this.getPublic(); - - if (pub.isInfinity()) - return { result: false, reason: 'Invalid public key' }; - if (!pub.validate()) - return { result: false, reason: 'Public key is not a point' }; - if (!pub.mul(this.ec.curve.n).isInfinity()) - return { result: false, reason: 'Public key * N != O' }; - - return { result: true, reason: null }; -}; - -KeyPair.prototype.getPublic = function getPublic(compact, enc) { - // compact is optional argument - if (typeof compact === 'string') { - enc = compact; - compact = null; - } - - if (!this.pub) - this.pub = this.ec.g.mul(this.priv); - - if (!enc) - return this.pub; - - return this.pub.encode(enc, compact); -}; - -KeyPair.prototype.getPrivate = function getPrivate(enc) { - if (enc === 'hex') - return this.priv.toString(16, 2); - else - return this.priv; -}; - -KeyPair.prototype._importPrivate = function _importPrivate(key, enc) { - this.priv = new BN(key, enc || 16); - - // Ensure that the priv won't be bigger than n, otherwise we may fail - // in fixed multiplication method - this.priv = this.priv.umod(this.ec.curve.n); -}; - -KeyPair.prototype._importPublic = function _importPublic(key, enc) { - if (key.x || key.y) { - this.pub = this.ec.curve.point(key.x, key.y); - return; - } - this.pub = this.ec.curve.decodePoint(key, enc); -}; - -// ECDH -KeyPair.prototype.derive = function derive(pub) { - return pub.mul(this.priv).getX(); -}; - -// ECDSA -KeyPair.prototype.sign = function sign(msg, enc, options) { - return this.ec.sign(msg, this, enc, options); -}; - -KeyPair.prototype.verify = function verify(msg, signature) { - return this.ec.verify(msg, signature, this); -}; - -KeyPair.prototype.inspect = function inspect() { - return ''; -}; diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/elliptic/lib/elliptic/ec/signature.js b/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/elliptic/lib/elliptic/ec/signature.js deleted file mode 100644 index 165b179a..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/elliptic/lib/elliptic/ec/signature.js +++ /dev/null @@ -1,135 +0,0 @@ -'use strict'; - -var BN = require('bn.js'); - -var elliptic = require('../../elliptic'); -var utils = elliptic.utils; -var assert = utils.assert; - -function Signature(options, enc) { - if (options instanceof Signature) - return options; - - if (this._importDER(options, enc)) - return; - - assert(options.r && options.s, 'Signature without r or s'); - this.r = new BN(options.r, 16); - this.s = new BN(options.s, 16); - if (options.recoveryParam === undefined) - this.recoveryParam = null; - else - this.recoveryParam = options.recoveryParam; -} -module.exports = Signature; - -function Position() { - this.place = 0; -} - -function getLength(buf, p) { - var initial = buf[p.place++]; - if (!(initial & 0x80)) { - return initial; - } - var octetLen = initial & 0xf; - var val = 0; - for (var i = 0, off = p.place; i < octetLen; i++, off++) { - val <<= 8; - val |= buf[off]; - } - p.place = off; - return val; -} - -function rmPadding(buf) { - var i = 0; - var len = buf.length - 1; - while (!buf[i] && !(buf[i + 1] & 0x80) && i < len) { - i++; - } - if (i === 0) { - return buf; - } - return buf.slice(i); -} - -Signature.prototype._importDER = function _importDER(data, enc) { - data = utils.toArray(data, enc); - var p = new Position(); - if (data[p.place++] !== 0x30) { - return false; - } - var len = getLength(data, p); - if ((len + p.place) !== data.length) { - return false; - } - if (data[p.place++] !== 0x02) { - return false; - } - var rlen = getLength(data, p); - var r = data.slice(p.place, rlen + p.place); - p.place += rlen; - if (data[p.place++] !== 0x02) { - return false; - } - var slen = getLength(data, p); - if (data.length !== slen + p.place) { - return false; - } - var s = data.slice(p.place, slen + p.place); - if (r[0] === 0 && (r[1] & 0x80)) { - r = r.slice(1); - } - if (s[0] === 0 && (s[1] & 0x80)) { - s = s.slice(1); - } - - this.r = new BN(r); - this.s = new BN(s); - this.recoveryParam = null; - - return true; -}; - -function constructLength(arr, len) { - if (len < 0x80) { - arr.push(len); - return; - } - var octets = 1 + (Math.log(len) / Math.LN2 >>> 3); - arr.push(octets | 0x80); - while (--octets) { - arr.push((len >>> (octets << 3)) & 0xff); - } - arr.push(len); -} - -Signature.prototype.toDER = function toDER(enc) { - var r = this.r.toArray(); - var s = this.s.toArray(); - - // Pad values - if (r[0] & 0x80) - r = [ 0 ].concat(r); - // Pad values - if (s[0] & 0x80) - s = [ 0 ].concat(s); - - r = rmPadding(r); - s = rmPadding(s); - - while (!s[0] && !(s[1] & 0x80)) { - s = s.slice(1); - } - var arr = [ 0x02 ]; - constructLength(arr, r.length); - arr = arr.concat(r); - arr.push(0x02); - constructLength(arr, s.length); - var backHalf = arr.concat(s); - var res = [ 0x30 ]; - constructLength(res, backHalf.length); - res = res.concat(backHalf); - return utils.encode(res, enc); -}; diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/elliptic/lib/elliptic/eddsa/index.js b/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/elliptic/lib/elliptic/eddsa/index.js deleted file mode 100644 index b218a160..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/elliptic/lib/elliptic/eddsa/index.js +++ /dev/null @@ -1,118 +0,0 @@ -'use strict'; - -var hash = require('hash.js'); -var elliptic = require('../../elliptic'); -var utils = elliptic.utils; -var assert = utils.assert; -var parseBytes = utils.parseBytes; -var KeyPair = require('./key'); -var Signature = require('./signature'); - -function EDDSA(curve) { - assert(curve === 'ed25519', 'only tested with ed25519 so far'); - - if (!(this instanceof EDDSA)) - return new EDDSA(curve); - - var curve = elliptic.curves[curve].curve; - this.curve = curve; - this.g = curve.g; - this.g.precompute(curve.n.bitLength() + 1); - - this.pointClass = curve.point().constructor; - this.encodingLength = Math.ceil(curve.n.bitLength() / 8); - this.hash = hash.sha512; -} - -module.exports = EDDSA; - -/** -* @param {Array|String} message - message bytes -* @param {Array|String|KeyPair} secret - secret bytes or a keypair -* @returns {Signature} - signature -*/ -EDDSA.prototype.sign = function sign(message, secret) { - message = parseBytes(message); - var key = this.keyFromSecret(secret); - var r = this.hashInt(key.messagePrefix(), message); - var R = this.g.mul(r); - var Rencoded = this.encodePoint(R); - var s_ = this.hashInt(Rencoded, key.pubBytes(), message) - .mul(key.priv()); - var S = r.add(s_).umod(this.curve.n); - return this.makeSignature({ R: R, S: S, Rencoded: Rencoded }); -}; - -/** -* @param {Array} message - message bytes -* @param {Array|String|Signature} sig - sig bytes -* @param {Array|String|Point|KeyPair} pub - public key -* @returns {Boolean} - true if public key matches sig of message -*/ -EDDSA.prototype.verify = function verify(message, sig, pub) { - message = parseBytes(message); - sig = this.makeSignature(sig); - var key = this.keyFromPublic(pub); - var h = this.hashInt(sig.Rencoded(), key.pubBytes(), message); - var SG = this.g.mul(sig.S()); - var RplusAh = sig.R().add(key.pub().mul(h)); - return RplusAh.eq(SG); -}; - -EDDSA.prototype.hashInt = function hashInt() { - var hash = this.hash(); - for (var i = 0; i < arguments.length; i++) - hash.update(arguments[i]); - return utils.intFromLE(hash.digest()).umod(this.curve.n); -}; - -EDDSA.prototype.keyFromPublic = function keyFromPublic(pub) { - return KeyPair.fromPublic(this, pub); -}; - -EDDSA.prototype.keyFromSecret = function keyFromSecret(secret) { - return KeyPair.fromSecret(this, secret); -}; - -EDDSA.prototype.makeSignature = function makeSignature(sig) { - if (sig instanceof Signature) - return sig; - return new Signature(this, sig); -}; - -/** -* * https://tools.ietf.org/html/draft-josefsson-eddsa-ed25519-03#section-5.2 -* -* EDDSA defines methods for encoding and decoding points and integers. These are -* helper convenience methods, that pass along to utility functions implied -* parameters. -* -*/ -EDDSA.prototype.encodePoint = function encodePoint(point) { - var enc = point.getY().toArray('le', this.encodingLength); - enc[this.encodingLength - 1] |= point.getX().isOdd() ? 0x80 : 0; - return enc; -}; - -EDDSA.prototype.decodePoint = function decodePoint(bytes) { - bytes = utils.parseBytes(bytes); - - var lastIx = bytes.length - 1; - var normed = bytes.slice(0, lastIx).concat(bytes[lastIx] & ~0x80); - var xIsOdd = (bytes[lastIx] & 0x80) !== 0; - - var y = utils.intFromLE(normed); - return this.curve.pointFromY(y, xIsOdd); -}; - -EDDSA.prototype.encodeInt = function encodeInt(num) { - return num.toArray('le', this.encodingLength); -}; - -EDDSA.prototype.decodeInt = function decodeInt(bytes) { - return utils.intFromLE(bytes); -}; - -EDDSA.prototype.isPoint = function isPoint(val) { - return val instanceof this.pointClass; -}; diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/elliptic/lib/elliptic/eddsa/key.js b/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/elliptic/lib/elliptic/eddsa/key.js deleted file mode 100644 index 5d5e1427..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/elliptic/lib/elliptic/eddsa/key.js +++ /dev/null @@ -1,96 +0,0 @@ -'use strict'; - -var elliptic = require('../../elliptic'); -var utils = elliptic.utils; -var assert = utils.assert; -var parseBytes = utils.parseBytes; -var cachedProperty = utils.cachedProperty; - -/** -* @param {EDDSA} eddsa - instance -* @param {Object} params - public/private key parameters -* -* @param {Array} [params.secret] - secret seed bytes -* @param {Point} [params.pub] - public key point (aka `A` in eddsa terms) -* @param {Array} [params.pub] - public key point encoded as bytes -* -*/ -function KeyPair(eddsa, params) { - this.eddsa = eddsa; - this._secret = parseBytes(params.secret); - if (eddsa.isPoint(params.pub)) - this._pub = params.pub; - else - this._pubBytes = parseBytes(params.pub); -} - -KeyPair.fromPublic = function fromPublic(eddsa, pub) { - if (pub instanceof KeyPair) - return pub; - return new KeyPair(eddsa, { pub: pub }); -}; - -KeyPair.fromSecret = function fromSecret(eddsa, secret) { - if (secret instanceof KeyPair) - return secret; - return new KeyPair(eddsa, { secret: secret }); -}; - -KeyPair.prototype.secret = function secret() { - return this._secret; -}; - -cachedProperty(KeyPair, 'pubBytes', function pubBytes() { - return this.eddsa.encodePoint(this.pub()); -}); - -cachedProperty(KeyPair, 'pub', function pub() { - if (this._pubBytes) - return this.eddsa.decodePoint(this._pubBytes); - return this.eddsa.g.mul(this.priv()); -}); - -cachedProperty(KeyPair, 'privBytes', function privBytes() { - var eddsa = this.eddsa; - var hash = this.hash(); - var lastIx = eddsa.encodingLength - 1; - - var a = hash.slice(0, eddsa.encodingLength); - a[0] &= 248; - a[lastIx] &= 127; - a[lastIx] |= 64; - - return a; -}); - -cachedProperty(KeyPair, 'priv', function priv() { - return this.eddsa.decodeInt(this.privBytes()); -}); - -cachedProperty(KeyPair, 'hash', function hash() { - return this.eddsa.hash().update(this.secret()).digest(); -}); - -cachedProperty(KeyPair, 'messagePrefix', function messagePrefix() { - return this.hash().slice(this.eddsa.encodingLength); -}); - -KeyPair.prototype.sign = function sign(message) { - assert(this._secret, 'KeyPair can only verify'); - return this.eddsa.sign(message, this); -}; - -KeyPair.prototype.verify = function verify(message, sig) { - return this.eddsa.verify(message, sig, this); -}; - -KeyPair.prototype.getSecret = function getSecret(enc) { - assert(this._secret, 'KeyPair is public only'); - return utils.encode(this.secret(), enc); -}; - -KeyPair.prototype.getPublic = function getPublic(enc) { - return utils.encode(this.pubBytes(), enc); -}; - -module.exports = KeyPair; diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/elliptic/lib/elliptic/eddsa/signature.js b/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/elliptic/lib/elliptic/eddsa/signature.js deleted file mode 100644 index e944e815..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/elliptic/lib/elliptic/eddsa/signature.js +++ /dev/null @@ -1,66 +0,0 @@ -'use strict'; - -var BN = require('bn.js'); -var elliptic = require('../../elliptic'); -var utils = elliptic.utils; -var assert = utils.assert; -var cachedProperty = utils.cachedProperty; -var parseBytes = utils.parseBytes; - -/** -* @param {EDDSA} eddsa - eddsa instance -* @param {Array|Object} sig - -* @param {Array|Point} [sig.R] - R point as Point or bytes -* @param {Array|bn} [sig.S] - S scalar as bn or bytes -* @param {Array} [sig.Rencoded] - R point encoded -* @param {Array} [sig.Sencoded] - S scalar encoded -*/ -function Signature(eddsa, sig) { - this.eddsa = eddsa; - - if (typeof sig !== 'object') - sig = parseBytes(sig); - - if (Array.isArray(sig)) { - sig = { - R: sig.slice(0, eddsa.encodingLength), - S: sig.slice(eddsa.encodingLength) - }; - } - - assert(sig.R && sig.S, 'Signature without R or S'); - - if (eddsa.isPoint(sig.R)) - this._R = sig.R; - if (sig.S instanceof BN) - this._S = sig.S; - - this._Rencoded = Array.isArray(sig.R) ? sig.R : sig.Rencoded; - this._Sencoded = Array.isArray(sig.S) ? sig.S : sig.Sencoded; -} - -cachedProperty(Signature, 'S', function S() { - return this.eddsa.decodeInt(this.Sencoded()); -}); - -cachedProperty(Signature, 'R', function R() { - return this.eddsa.decodePoint(this.Rencoded()); -}); - -cachedProperty(Signature, 'Rencoded', function Rencoded() { - return this.eddsa.encodePoint(this.R()); -}); - -cachedProperty(Signature, 'Sencoded', function Sencoded() { - return this.eddsa.encodeInt(this.S()); -}); - -Signature.prototype.toBytes = function toBytes() { - return this.Rencoded().concat(this.Sencoded()); -}; - -Signature.prototype.toHex = function toHex() { - return utils.encode(this.toBytes(), 'hex').toUpperCase(); -}; - -module.exports = Signature; diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/elliptic/lib/elliptic/hmac-drbg.js b/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/elliptic/lib/elliptic/hmac-drbg.js deleted file mode 100644 index ff63d2aa..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/elliptic/lib/elliptic/hmac-drbg.js +++ /dev/null @@ -1,114 +0,0 @@ -'use strict'; - -var hash = require('hash.js'); -var elliptic = require('../elliptic'); -var utils = elliptic.utils; -var assert = utils.assert; - -function HmacDRBG(options) { - if (!(this instanceof HmacDRBG)) - return new HmacDRBG(options); - this.hash = options.hash; - this.predResist = !!options.predResist; - - this.outLen = this.hash.outSize; - this.minEntropy = options.minEntropy || this.hash.hmacStrength; - - this.reseed = null; - this.reseedInterval = null; - this.K = null; - this.V = null; - - var entropy = utils.toArray(options.entropy, options.entropyEnc); - var nonce = utils.toArray(options.nonce, options.nonceEnc); - var pers = utils.toArray(options.pers, options.persEnc); - assert(entropy.length >= (this.minEntropy / 8), - 'Not enough entropy. Minimum is: ' + this.minEntropy + ' bits'); - this._init(entropy, nonce, pers); -} -module.exports = HmacDRBG; - -HmacDRBG.prototype._init = function init(entropy, nonce, pers) { - var seed = entropy.concat(nonce).concat(pers); - - this.K = new Array(this.outLen / 8); - this.V = new Array(this.outLen / 8); - for (var i = 0; i < this.V.length; i++) { - this.K[i] = 0x00; - this.V[i] = 0x01; - } - - this._update(seed); - this.reseed = 1; - this.reseedInterval = 0x1000000000000; // 2^48 -}; - -HmacDRBG.prototype._hmac = function hmac() { - return new hash.hmac(this.hash, this.K); -}; - -HmacDRBG.prototype._update = function update(seed) { - var kmac = this._hmac() - .update(this.V) - .update([ 0x00 ]); - if (seed) - kmac = kmac.update(seed); - this.K = kmac.digest(); - this.V = this._hmac().update(this.V).digest(); - if (!seed) - return; - - this.K = this._hmac() - .update(this.V) - .update([ 0x01 ]) - .update(seed) - .digest(); - this.V = this._hmac().update(this.V).digest(); -}; - -HmacDRBG.prototype.reseed = function reseed(entropy, entropyEnc, add, addEnc) { - // Optional entropy enc - if (typeof entropyEnc !== 'string') { - addEnc = add; - add = entropyEnc; - entropyEnc = null; - } - - entropy = utils.toBuffer(entropy, entropyEnc); - add = utils.toBuffer(add, addEnc); - - assert(entropy.length >= (this.minEntropy / 8), - 'Not enough entropy. Minimum is: ' + this.minEntropy + ' bits'); - - this._update(entropy.concat(add || [])); - this.reseed = 1; -}; - -HmacDRBG.prototype.generate = function generate(len, enc, add, addEnc) { - if (this.reseed > this.reseedInterval) - throw new Error('Reseed is required'); - - // Optional encoding - if (typeof enc !== 'string') { - addEnc = add; - add = enc; - enc = null; - } - - // Optional additional data - if (add) { - add = utils.toArray(add, addEnc); - this._update(add); - } - - var temp = []; - while (temp.length < len) { - this.V = this._hmac().update(this.V).digest(); - temp = temp.concat(this.V); - } - - var res = temp.slice(0, len); - this._update(add); - this.reseed++; - return utils.encode(res, enc); -}; diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/elliptic/lib/elliptic/precomputed/secp256k1.js b/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/elliptic/lib/elliptic/precomputed/secp256k1.js deleted file mode 100644 index e4c91e54..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/elliptic/lib/elliptic/precomputed/secp256k1.js +++ /dev/null @@ -1,780 +0,0 @@ -module.exports = { - doubles: { - step: 4, - points: [ - [ - 'e60fce93b59e9ec53011aabc21c23e97b2a31369b87a5ae9c44ee89e2a6dec0a', - 'f7e3507399e595929db99f34f57937101296891e44d23f0be1f32cce69616821' - ], - [ - '8282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f51508', - '11f8a8098557dfe45e8256e830b60ace62d613ac2f7b17bed31b6eaff6e26caf' - ], - [ - '175e159f728b865a72f99cc6c6fc846de0b93833fd2222ed73fce5b551e5b739', - 'd3506e0d9e3c79eba4ef97a51ff71f5eacb5955add24345c6efa6ffee9fed695' - ], - [ - '363d90d447b00c9c99ceac05b6262ee053441c7e55552ffe526bad8f83ff4640', - '4e273adfc732221953b445397f3363145b9a89008199ecb62003c7f3bee9de9' - ], - [ - '8b4b5f165df3c2be8c6244b5b745638843e4a781a15bcd1b69f79a55dffdf80c', - '4aad0a6f68d308b4b3fbd7813ab0da04f9e336546162ee56b3eff0c65fd4fd36' - ], - [ - '723cbaa6e5db996d6bf771c00bd548c7b700dbffa6c0e77bcb6115925232fcda', - '96e867b5595cc498a921137488824d6e2660a0653779494801dc069d9eb39f5f' - ], - [ - 'eebfa4d493bebf98ba5feec812c2d3b50947961237a919839a533eca0e7dd7fa', - '5d9a8ca3970ef0f269ee7edaf178089d9ae4cdc3a711f712ddfd4fdae1de8999' - ], - [ - '100f44da696e71672791d0a09b7bde459f1215a29b3c03bfefd7835b39a48db0', - 'cdd9e13192a00b772ec8f3300c090666b7ff4a18ff5195ac0fbd5cd62bc65a09' - ], - [ - 'e1031be262c7ed1b1dc9227a4a04c017a77f8d4464f3b3852c8acde6e534fd2d', - '9d7061928940405e6bb6a4176597535af292dd419e1ced79a44f18f29456a00d' - ], - [ - 'feea6cae46d55b530ac2839f143bd7ec5cf8b266a41d6af52d5e688d9094696d', - 'e57c6b6c97dce1bab06e4e12bf3ecd5c981c8957cc41442d3155debf18090088' - ], - [ - 'da67a91d91049cdcb367be4be6ffca3cfeed657d808583de33fa978bc1ec6cb1', - '9bacaa35481642bc41f463f7ec9780e5dec7adc508f740a17e9ea8e27a68be1d' - ], - [ - '53904faa0b334cdda6e000935ef22151ec08d0f7bb11069f57545ccc1a37b7c0', - '5bc087d0bc80106d88c9eccac20d3c1c13999981e14434699dcb096b022771c8' - ], - [ - '8e7bcd0bd35983a7719cca7764ca906779b53a043a9b8bcaeff959f43ad86047', - '10b7770b2a3da4b3940310420ca9514579e88e2e47fd68b3ea10047e8460372a' - ], - [ - '385eed34c1cdff21e6d0818689b81bde71a7f4f18397e6690a841e1599c43862', - '283bebc3e8ea23f56701de19e9ebf4576b304eec2086dc8cc0458fe5542e5453' - ], - [ - '6f9d9b803ecf191637c73a4413dfa180fddf84a5947fbc9c606ed86c3fac3a7', - '7c80c68e603059ba69b8e2a30e45c4d47ea4dd2f5c281002d86890603a842160' - ], - [ - '3322d401243c4e2582a2147c104d6ecbf774d163db0f5e5313b7e0e742d0e6bd', - '56e70797e9664ef5bfb019bc4ddaf9b72805f63ea2873af624f3a2e96c28b2a0' - ], - [ - '85672c7d2de0b7da2bd1770d89665868741b3f9af7643397721d74d28134ab83', - '7c481b9b5b43b2eb6374049bfa62c2e5e77f17fcc5298f44c8e3094f790313a6' - ], - [ - '948bf809b1988a46b06c9f1919413b10f9226c60f668832ffd959af60c82a0a', - '53a562856dcb6646dc6b74c5d1c3418c6d4dff08c97cd2bed4cb7f88d8c8e589' - ], - [ - '6260ce7f461801c34f067ce0f02873a8f1b0e44dfc69752accecd819f38fd8e8', - 'bc2da82b6fa5b571a7f09049776a1ef7ecd292238051c198c1a84e95b2b4ae17' - ], - [ - 'e5037de0afc1d8d43d8348414bbf4103043ec8f575bfdc432953cc8d2037fa2d', - '4571534baa94d3b5f9f98d09fb990bddbd5f5b03ec481f10e0e5dc841d755bda' - ], - [ - 'e06372b0f4a207adf5ea905e8f1771b4e7e8dbd1c6a6c5b725866a0ae4fce725', - '7a908974bce18cfe12a27bb2ad5a488cd7484a7787104870b27034f94eee31dd' - ], - [ - '213c7a715cd5d45358d0bbf9dc0ce02204b10bdde2a3f58540ad6908d0559754', - '4b6dad0b5ae462507013ad06245ba190bb4850f5f36a7eeddff2c27534b458f2' - ], - [ - '4e7c272a7af4b34e8dbb9352a5419a87e2838c70adc62cddf0cc3a3b08fbd53c', - '17749c766c9d0b18e16fd09f6def681b530b9614bff7dd33e0b3941817dcaae6' - ], - [ - 'fea74e3dbe778b1b10f238ad61686aa5c76e3db2be43057632427e2840fb27b6', - '6e0568db9b0b13297cf674deccb6af93126b596b973f7b77701d3db7f23cb96f' - ], - [ - '76e64113f677cf0e10a2570d599968d31544e179b760432952c02a4417bdde39', - 'c90ddf8dee4e95cf577066d70681f0d35e2a33d2b56d2032b4b1752d1901ac01' - ], - [ - 'c738c56b03b2abe1e8281baa743f8f9a8f7cc643df26cbee3ab150242bcbb891', - '893fb578951ad2537f718f2eacbfbbbb82314eef7880cfe917e735d9699a84c3' - ], - [ - 'd895626548b65b81e264c7637c972877d1d72e5f3a925014372e9f6588f6c14b', - 'febfaa38f2bc7eae728ec60818c340eb03428d632bb067e179363ed75d7d991f' - ], - [ - 'b8da94032a957518eb0f6433571e8761ceffc73693e84edd49150a564f676e03', - '2804dfa44805a1e4d7c99cc9762808b092cc584d95ff3b511488e4e74efdf6e7' - ], - [ - 'e80fea14441fb33a7d8adab9475d7fab2019effb5156a792f1a11778e3c0df5d', - 'eed1de7f638e00771e89768ca3ca94472d155e80af322ea9fcb4291b6ac9ec78' - ], - [ - 'a301697bdfcd704313ba48e51d567543f2a182031efd6915ddc07bbcc4e16070', - '7370f91cfb67e4f5081809fa25d40f9b1735dbf7c0a11a130c0d1a041e177ea1' - ], - [ - '90ad85b389d6b936463f9d0512678de208cc330b11307fffab7ac63e3fb04ed4', - 'e507a3620a38261affdcbd9427222b839aefabe1582894d991d4d48cb6ef150' - ], - [ - '8f68b9d2f63b5f339239c1ad981f162ee88c5678723ea3351b7b444c9ec4c0da', - '662a9f2dba063986de1d90c2b6be215dbbea2cfe95510bfdf23cbf79501fff82' - ], - [ - 'e4f3fb0176af85d65ff99ff9198c36091f48e86503681e3e6686fd5053231e11', - '1e63633ad0ef4f1c1661a6d0ea02b7286cc7e74ec951d1c9822c38576feb73bc' - ], - [ - '8c00fa9b18ebf331eb961537a45a4266c7034f2f0d4e1d0716fb6eae20eae29e', - 'efa47267fea521a1a9dc343a3736c974c2fadafa81e36c54e7d2a4c66702414b' - ], - [ - 'e7a26ce69dd4829f3e10cec0a9e98ed3143d084f308b92c0997fddfc60cb3e41', - '2a758e300fa7984b471b006a1aafbb18d0a6b2c0420e83e20e8a9421cf2cfd51' - ], - [ - 'b6459e0ee3662ec8d23540c223bcbdc571cbcb967d79424f3cf29eb3de6b80ef', - '67c876d06f3e06de1dadf16e5661db3c4b3ae6d48e35b2ff30bf0b61a71ba45' - ], - [ - 'd68a80c8280bb840793234aa118f06231d6f1fc67e73c5a5deda0f5b496943e8', - 'db8ba9fff4b586d00c4b1f9177b0e28b5b0e7b8f7845295a294c84266b133120' - ], - [ - '324aed7df65c804252dc0270907a30b09612aeb973449cea4095980fc28d3d5d', - '648a365774b61f2ff130c0c35aec1f4f19213b0c7e332843967224af96ab7c84' - ], - [ - '4df9c14919cde61f6d51dfdbe5fee5dceec4143ba8d1ca888e8bd373fd054c96', - '35ec51092d8728050974c23a1d85d4b5d506cdc288490192ebac06cad10d5d' - ], - [ - '9c3919a84a474870faed8a9c1cc66021523489054d7f0308cbfc99c8ac1f98cd', - 'ddb84f0f4a4ddd57584f044bf260e641905326f76c64c8e6be7e5e03d4fc599d' - ], - [ - '6057170b1dd12fdf8de05f281d8e06bb91e1493a8b91d4cc5a21382120a959e5', - '9a1af0b26a6a4807add9a2daf71df262465152bc3ee24c65e899be932385a2a8' - ], - [ - 'a576df8e23a08411421439a4518da31880cef0fba7d4df12b1a6973eecb94266', - '40a6bf20e76640b2c92b97afe58cd82c432e10a7f514d9f3ee8be11ae1b28ec8' - ], - [ - '7778a78c28dec3e30a05fe9629de8c38bb30d1f5cf9a3a208f763889be58ad71', - '34626d9ab5a5b22ff7098e12f2ff580087b38411ff24ac563b513fc1fd9f43ac' - ], - [ - '928955ee637a84463729fd30e7afd2ed5f96274e5ad7e5cb09eda9c06d903ac', - 'c25621003d3f42a827b78a13093a95eeac3d26efa8a8d83fc5180e935bcd091f' - ], - [ - '85d0fef3ec6db109399064f3a0e3b2855645b4a907ad354527aae75163d82751', - '1f03648413a38c0be29d496e582cf5663e8751e96877331582c237a24eb1f962' - ], - [ - 'ff2b0dce97eece97c1c9b6041798b85dfdfb6d8882da20308f5404824526087e', - '493d13fef524ba188af4c4dc54d07936c7b7ed6fb90e2ceb2c951e01f0c29907' - ], - [ - '827fbbe4b1e880ea9ed2b2e6301b212b57f1ee148cd6dd28780e5e2cf856e241', - 'c60f9c923c727b0b71bef2c67d1d12687ff7a63186903166d605b68baec293ec' - ], - [ - 'eaa649f21f51bdbae7be4ae34ce6e5217a58fdce7f47f9aa7f3b58fa2120e2b3', - 'be3279ed5bbbb03ac69a80f89879aa5a01a6b965f13f7e59d47a5305ba5ad93d' - ], - [ - 'e4a42d43c5cf169d9391df6decf42ee541b6d8f0c9a137401e23632dda34d24f', - '4d9f92e716d1c73526fc99ccfb8ad34ce886eedfa8d8e4f13a7f7131deba9414' - ], - [ - '1ec80fef360cbdd954160fadab352b6b92b53576a88fea4947173b9d4300bf19', - 'aeefe93756b5340d2f3a4958a7abbf5e0146e77f6295a07b671cdc1cc107cefd' - ], - [ - '146a778c04670c2f91b00af4680dfa8bce3490717d58ba889ddb5928366642be', - 'b318e0ec3354028add669827f9d4b2870aaa971d2f7e5ed1d0b297483d83efd0' - ], - [ - 'fa50c0f61d22e5f07e3acebb1aa07b128d0012209a28b9776d76a8793180eef9', - '6b84c6922397eba9b72cd2872281a68a5e683293a57a213b38cd8d7d3f4f2811' - ], - [ - 'da1d61d0ca721a11b1a5bf6b7d88e8421a288ab5d5bba5220e53d32b5f067ec2', - '8157f55a7c99306c79c0766161c91e2966a73899d279b48a655fba0f1ad836f1' - ], - [ - 'a8e282ff0c9706907215ff98e8fd416615311de0446f1e062a73b0610d064e13', - '7f97355b8db81c09abfb7f3c5b2515888b679a3e50dd6bd6cef7c73111f4cc0c' - ], - [ - '174a53b9c9a285872d39e56e6913cab15d59b1fa512508c022f382de8319497c', - 'ccc9dc37abfc9c1657b4155f2c47f9e6646b3a1d8cb9854383da13ac079afa73' - ], - [ - '959396981943785c3d3e57edf5018cdbe039e730e4918b3d884fdff09475b7ba', - '2e7e552888c331dd8ba0386a4b9cd6849c653f64c8709385e9b8abf87524f2fd' - ], - [ - 'd2a63a50ae401e56d645a1153b109a8fcca0a43d561fba2dbb51340c9d82b151', - 'e82d86fb6443fcb7565aee58b2948220a70f750af484ca52d4142174dcf89405' - ], - [ - '64587e2335471eb890ee7896d7cfdc866bacbdbd3839317b3436f9b45617e073', - 'd99fcdd5bf6902e2ae96dd6447c299a185b90a39133aeab358299e5e9faf6589' - ], - [ - '8481bde0e4e4d885b3a546d3e549de042f0aa6cea250e7fd358d6c86dd45e458', - '38ee7b8cba5404dd84a25bf39cecb2ca900a79c42b262e556d64b1b59779057e' - ], - [ - '13464a57a78102aa62b6979ae817f4637ffcfed3c4b1ce30bcd6303f6caf666b', - '69be159004614580ef7e433453ccb0ca48f300a81d0942e13f495a907f6ecc27' - ], - [ - 'bc4a9df5b713fe2e9aef430bcc1dc97a0cd9ccede2f28588cada3a0d2d83f366', - 'd3a81ca6e785c06383937adf4b798caa6e8a9fbfa547b16d758d666581f33c1' - ], - [ - '8c28a97bf8298bc0d23d8c749452a32e694b65e30a9472a3954ab30fe5324caa', - '40a30463a3305193378fedf31f7cc0eb7ae784f0451cb9459e71dc73cbef9482' - ], - [ - '8ea9666139527a8c1dd94ce4f071fd23c8b350c5a4bb33748c4ba111faccae0', - '620efabbc8ee2782e24e7c0cfb95c5d735b783be9cf0f8e955af34a30e62b945' - ], - [ - 'dd3625faef5ba06074669716bbd3788d89bdde815959968092f76cc4eb9a9787', - '7a188fa3520e30d461da2501045731ca941461982883395937f68d00c644a573' - ], - [ - 'f710d79d9eb962297e4f6232b40e8f7feb2bc63814614d692c12de752408221e', - 'ea98e67232d3b3295d3b535532115ccac8612c721851617526ae47a9c77bfc82' - ] - ] - }, - naf: { - wnd: 7, - points: [ - [ - 'f9308a019258c31049344f85f89d5229b531c845836f99b08601f113bce036f9', - '388f7b0f632de8140fe337e62a37f3566500a99934c2231b6cb9fd7584b8e672' - ], - [ - '2f8bde4d1a07209355b4a7250a5c5128e88b84bddc619ab7cba8d569b240efe4', - 'd8ac222636e5e3d6d4dba9dda6c9c426f788271bab0d6840dca87d3aa6ac62d6' - ], - [ - '5cbdf0646e5db4eaa398f365f2ea7a0e3d419b7e0330e39ce92bddedcac4f9bc', - '6aebca40ba255960a3178d6d861a54dba813d0b813fde7b5a5082628087264da' - ], - [ - 'acd484e2f0c7f65309ad178a9f559abde09796974c57e714c35f110dfc27ccbe', - 'cc338921b0a7d9fd64380971763b61e9add888a4375f8e0f05cc262ac64f9c37' - ], - [ - '774ae7f858a9411e5ef4246b70c65aac5649980be5c17891bbec17895da008cb', - 'd984a032eb6b5e190243dd56d7b7b365372db1e2dff9d6a8301d74c9c953c61b' - ], - [ - 'f28773c2d975288bc7d1d205c3748651b075fbc6610e58cddeeddf8f19405aa8', - 'ab0902e8d880a89758212eb65cdaf473a1a06da521fa91f29b5cb52db03ed81' - ], - [ - 'd7924d4f7d43ea965a465ae3095ff41131e5946f3c85f79e44adbcf8e27e080e', - '581e2872a86c72a683842ec228cc6defea40af2bd896d3a5c504dc9ff6a26b58' - ], - [ - 'defdea4cdb677750a420fee807eacf21eb9898ae79b9768766e4faa04a2d4a34', - '4211ab0694635168e997b0ead2a93daeced1f4a04a95c0f6cfb199f69e56eb77' - ], - [ - '2b4ea0a797a443d293ef5cff444f4979f06acfebd7e86d277475656138385b6c', - '85e89bc037945d93b343083b5a1c86131a01f60c50269763b570c854e5c09b7a' - ], - [ - '352bbf4a4cdd12564f93fa332ce333301d9ad40271f8107181340aef25be59d5', - '321eb4075348f534d59c18259dda3e1f4a1b3b2e71b1039c67bd3d8bcf81998c' - ], - [ - '2fa2104d6b38d11b0230010559879124e42ab8dfeff5ff29dc9cdadd4ecacc3f', - '2de1068295dd865b64569335bd5dd80181d70ecfc882648423ba76b532b7d67' - ], - [ - '9248279b09b4d68dab21a9b066edda83263c3d84e09572e269ca0cd7f5453714', - '73016f7bf234aade5d1aa71bdea2b1ff3fc0de2a887912ffe54a32ce97cb3402' - ], - [ - 'daed4f2be3a8bf278e70132fb0beb7522f570e144bf615c07e996d443dee8729', - 'a69dce4a7d6c98e8d4a1aca87ef8d7003f83c230f3afa726ab40e52290be1c55' - ], - [ - 'c44d12c7065d812e8acf28d7cbb19f9011ecd9e9fdf281b0e6a3b5e87d22e7db', - '2119a460ce326cdc76c45926c982fdac0e106e861edf61c5a039063f0e0e6482' - ], - [ - '6a245bf6dc698504c89a20cfded60853152b695336c28063b61c65cbd269e6b4', - 'e022cf42c2bd4a708b3f5126f16a24ad8b33ba48d0423b6efd5e6348100d8a82' - ], - [ - '1697ffa6fd9de627c077e3d2fe541084ce13300b0bec1146f95ae57f0d0bd6a5', - 'b9c398f186806f5d27561506e4557433a2cf15009e498ae7adee9d63d01b2396' - ], - [ - '605bdb019981718b986d0f07e834cb0d9deb8360ffb7f61df982345ef27a7479', - '2972d2de4f8d20681a78d93ec96fe23c26bfae84fb14db43b01e1e9056b8c49' - ], - [ - '62d14dab4150bf497402fdc45a215e10dcb01c354959b10cfe31c7e9d87ff33d', - '80fc06bd8cc5b01098088a1950eed0db01aa132967ab472235f5642483b25eaf' - ], - [ - '80c60ad0040f27dade5b4b06c408e56b2c50e9f56b9b8b425e555c2f86308b6f', - '1c38303f1cc5c30f26e66bad7fe72f70a65eed4cbe7024eb1aa01f56430bd57a' - ], - [ - '7a9375ad6167ad54aa74c6348cc54d344cc5dc9487d847049d5eabb0fa03c8fb', - 'd0e3fa9eca8726909559e0d79269046bdc59ea10c70ce2b02d499ec224dc7f7' - ], - [ - 'd528ecd9b696b54c907a9ed045447a79bb408ec39b68df504bb51f459bc3ffc9', - 'eecf41253136e5f99966f21881fd656ebc4345405c520dbc063465b521409933' - ], - [ - '49370a4b5f43412ea25f514e8ecdad05266115e4a7ecb1387231808f8b45963', - '758f3f41afd6ed428b3081b0512fd62a54c3f3afbb5b6764b653052a12949c9a' - ], - [ - '77f230936ee88cbbd73df930d64702ef881d811e0e1498e2f1c13eb1fc345d74', - '958ef42a7886b6400a08266e9ba1b37896c95330d97077cbbe8eb3c7671c60d6' - ], - [ - 'f2dac991cc4ce4b9ea44887e5c7c0bce58c80074ab9d4dbaeb28531b7739f530', - 'e0dedc9b3b2f8dad4da1f32dec2531df9eb5fbeb0598e4fd1a117dba703a3c37' - ], - [ - '463b3d9f662621fb1b4be8fbbe2520125a216cdfc9dae3debcba4850c690d45b', - '5ed430d78c296c3543114306dd8622d7c622e27c970a1de31cb377b01af7307e' - ], - [ - 'f16f804244e46e2a09232d4aff3b59976b98fac14328a2d1a32496b49998f247', - 'cedabd9b82203f7e13d206fcdf4e33d92a6c53c26e5cce26d6579962c4e31df6' - ], - [ - 'caf754272dc84563b0352b7a14311af55d245315ace27c65369e15f7151d41d1', - 'cb474660ef35f5f2a41b643fa5e460575f4fa9b7962232a5c32f908318a04476' - ], - [ - '2600ca4b282cb986f85d0f1709979d8b44a09c07cb86d7c124497bc86f082120', - '4119b88753c15bd6a693b03fcddbb45d5ac6be74ab5f0ef44b0be9475a7e4b40' - ], - [ - '7635ca72d7e8432c338ec53cd12220bc01c48685e24f7dc8c602a7746998e435', - '91b649609489d613d1d5e590f78e6d74ecfc061d57048bad9e76f302c5b9c61' - ], - [ - '754e3239f325570cdbbf4a87deee8a66b7f2b33479d468fbc1a50743bf56cc18', - '673fb86e5bda30fb3cd0ed304ea49a023ee33d0197a695d0c5d98093c536683' - ], - [ - 'e3e6bd1071a1e96aff57859c82d570f0330800661d1c952f9fe2694691d9b9e8', - '59c9e0bba394e76f40c0aa58379a3cb6a5a2283993e90c4167002af4920e37f5' - ], - [ - '186b483d056a033826ae73d88f732985c4ccb1f32ba35f4b4cc47fdcf04aa6eb', - '3b952d32c67cf77e2e17446e204180ab21fb8090895138b4a4a797f86e80888b' - ], - [ - 'df9d70a6b9876ce544c98561f4be4f725442e6d2b737d9c91a8321724ce0963f', - '55eb2dafd84d6ccd5f862b785dc39d4ab157222720ef9da217b8c45cf2ba2417' - ], - [ - '5edd5cc23c51e87a497ca815d5dce0f8ab52554f849ed8995de64c5f34ce7143', - 'efae9c8dbc14130661e8cec030c89ad0c13c66c0d17a2905cdc706ab7399a868' - ], - [ - '290798c2b6476830da12fe02287e9e777aa3fba1c355b17a722d362f84614fba', - 'e38da76dcd440621988d00bcf79af25d5b29c094db2a23146d003afd41943e7a' - ], - [ - 'af3c423a95d9f5b3054754efa150ac39cd29552fe360257362dfdecef4053b45', - 'f98a3fd831eb2b749a93b0e6f35cfb40c8cd5aa667a15581bc2feded498fd9c6' - ], - [ - '766dbb24d134e745cccaa28c99bf274906bb66b26dcf98df8d2fed50d884249a', - '744b1152eacbe5e38dcc887980da38b897584a65fa06cedd2c924f97cbac5996' - ], - [ - '59dbf46f8c94759ba21277c33784f41645f7b44f6c596a58ce92e666191abe3e', - 'c534ad44175fbc300f4ea6ce648309a042ce739a7919798cd85e216c4a307f6e' - ], - [ - 'f13ada95103c4537305e691e74e9a4a8dd647e711a95e73cb62dc6018cfd87b8', - 'e13817b44ee14de663bf4bc808341f326949e21a6a75c2570778419bdaf5733d' - ], - [ - '7754b4fa0e8aced06d4167a2c59cca4cda1869c06ebadfb6488550015a88522c', - '30e93e864e669d82224b967c3020b8fa8d1e4e350b6cbcc537a48b57841163a2' - ], - [ - '948dcadf5990e048aa3874d46abef9d701858f95de8041d2a6828c99e2262519', - 'e491a42537f6e597d5d28a3224b1bc25df9154efbd2ef1d2cbba2cae5347d57e' - ], - [ - '7962414450c76c1689c7b48f8202ec37fb224cf5ac0bfa1570328a8a3d7c77ab', - '100b610ec4ffb4760d5c1fc133ef6f6b12507a051f04ac5760afa5b29db83437' - ], - [ - '3514087834964b54b15b160644d915485a16977225b8847bb0dd085137ec47ca', - 'ef0afbb2056205448e1652c48e8127fc6039e77c15c2378b7e7d15a0de293311' - ], - [ - 'd3cc30ad6b483e4bc79ce2c9dd8bc54993e947eb8df787b442943d3f7b527eaf', - '8b378a22d827278d89c5e9be8f9508ae3c2ad46290358630afb34db04eede0a4' - ], - [ - '1624d84780732860ce1c78fcbfefe08b2b29823db913f6493975ba0ff4847610', - '68651cf9b6da903e0914448c6cd9d4ca896878f5282be4c8cc06e2a404078575' - ], - [ - '733ce80da955a8a26902c95633e62a985192474b5af207da6df7b4fd5fc61cd4', - 'f5435a2bd2badf7d485a4d8b8db9fcce3e1ef8e0201e4578c54673bc1dc5ea1d' - ], - [ - '15d9441254945064cf1a1c33bbd3b49f8966c5092171e699ef258dfab81c045c', - 'd56eb30b69463e7234f5137b73b84177434800bacebfc685fc37bbe9efe4070d' - ], - [ - 'a1d0fcf2ec9de675b612136e5ce70d271c21417c9d2b8aaaac138599d0717940', - 'edd77f50bcb5a3cab2e90737309667f2641462a54070f3d519212d39c197a629' - ], - [ - 'e22fbe15c0af8ccc5780c0735f84dbe9a790badee8245c06c7ca37331cb36980', - 'a855babad5cd60c88b430a69f53a1a7a38289154964799be43d06d77d31da06' - ], - [ - '311091dd9860e8e20ee13473c1155f5f69635e394704eaa74009452246cfa9b3', - '66db656f87d1f04fffd1f04788c06830871ec5a64feee685bd80f0b1286d8374' - ], - [ - '34c1fd04d301be89b31c0442d3e6ac24883928b45a9340781867d4232ec2dbdf', - '9414685e97b1b5954bd46f730174136d57f1ceeb487443dc5321857ba73abee' - ], - [ - 'f219ea5d6b54701c1c14de5b557eb42a8d13f3abbcd08affcc2a5e6b049b8d63', - '4cb95957e83d40b0f73af4544cccf6b1f4b08d3c07b27fb8d8c2962a400766d1' - ], - [ - 'd7b8740f74a8fbaab1f683db8f45de26543a5490bca627087236912469a0b448', - 'fa77968128d9c92ee1010f337ad4717eff15db5ed3c049b3411e0315eaa4593b' - ], - [ - '32d31c222f8f6f0ef86f7c98d3a3335ead5bcd32abdd94289fe4d3091aa824bf', - '5f3032f5892156e39ccd3d7915b9e1da2e6dac9e6f26e961118d14b8462e1661' - ], - [ - '7461f371914ab32671045a155d9831ea8793d77cd59592c4340f86cbc18347b5', - '8ec0ba238b96bec0cbdddcae0aa442542eee1ff50c986ea6b39847b3cc092ff6' - ], - [ - 'ee079adb1df1860074356a25aa38206a6d716b2c3e67453d287698bad7b2b2d6', - '8dc2412aafe3be5c4c5f37e0ecc5f9f6a446989af04c4e25ebaac479ec1c8c1e' - ], - [ - '16ec93e447ec83f0467b18302ee620f7e65de331874c9dc72bfd8616ba9da6b5', - '5e4631150e62fb40d0e8c2a7ca5804a39d58186a50e497139626778e25b0674d' - ], - [ - 'eaa5f980c245f6f038978290afa70b6bd8855897f98b6aa485b96065d537bd99', - 'f65f5d3e292c2e0819a528391c994624d784869d7e6ea67fb18041024edc07dc' - ], - [ - '78c9407544ac132692ee1910a02439958ae04877151342ea96c4b6b35a49f51', - 'f3e0319169eb9b85d5404795539a5e68fa1fbd583c064d2462b675f194a3ddb4' - ], - [ - '494f4be219a1a77016dcd838431aea0001cdc8ae7a6fc688726578d9702857a5', - '42242a969283a5f339ba7f075e36ba2af925ce30d767ed6e55f4b031880d562c' - ], - [ - 'a598a8030da6d86c6bc7f2f5144ea549d28211ea58faa70ebf4c1e665c1fe9b5', - '204b5d6f84822c307e4b4a7140737aec23fc63b65b35f86a10026dbd2d864e6b' - ], - [ - 'c41916365abb2b5d09192f5f2dbeafec208f020f12570a184dbadc3e58595997', - '4f14351d0087efa49d245b328984989d5caf9450f34bfc0ed16e96b58fa9913' - ], - [ - '841d6063a586fa475a724604da03bc5b92a2e0d2e0a36acfe4c73a5514742881', - '73867f59c0659e81904f9a1c7543698e62562d6744c169ce7a36de01a8d6154' - ], - [ - '5e95bb399a6971d376026947f89bde2f282b33810928be4ded112ac4d70e20d5', - '39f23f366809085beebfc71181313775a99c9aed7d8ba38b161384c746012865' - ], - [ - '36e4641a53948fd476c39f8a99fd974e5ec07564b5315d8bf99471bca0ef2f66', - 'd2424b1b1abe4eb8164227b085c9aa9456ea13493fd563e06fd51cf5694c78fc' - ], - [ - '336581ea7bfbbb290c191a2f507a41cf5643842170e914faeab27c2c579f726', - 'ead12168595fe1be99252129b6e56b3391f7ab1410cd1e0ef3dcdcabd2fda224' - ], - [ - '8ab89816dadfd6b6a1f2634fcf00ec8403781025ed6890c4849742706bd43ede', - '6fdcef09f2f6d0a044e654aef624136f503d459c3e89845858a47a9129cdd24e' - ], - [ - '1e33f1a746c9c5778133344d9299fcaa20b0938e8acff2544bb40284b8c5fb94', - '60660257dd11b3aa9c8ed618d24edff2306d320f1d03010e33a7d2057f3b3b6' - ], - [ - '85b7c1dcb3cec1b7ee7f30ded79dd20a0ed1f4cc18cbcfcfa410361fd8f08f31', - '3d98a9cdd026dd43f39048f25a8847f4fcafad1895d7a633c6fed3c35e999511' - ], - [ - '29df9fbd8d9e46509275f4b125d6d45d7fbe9a3b878a7af872a2800661ac5f51', - 'b4c4fe99c775a606e2d8862179139ffda61dc861c019e55cd2876eb2a27d84b' - ], - [ - 'a0b1cae06b0a847a3fea6e671aaf8adfdfe58ca2f768105c8082b2e449fce252', - 'ae434102edde0958ec4b19d917a6a28e6b72da1834aff0e650f049503a296cf2' - ], - [ - '4e8ceafb9b3e9a136dc7ff67e840295b499dfb3b2133e4ba113f2e4c0e121e5', - 'cf2174118c8b6d7a4b48f6d534ce5c79422c086a63460502b827ce62a326683c' - ], - [ - 'd24a44e047e19b6f5afb81c7ca2f69080a5076689a010919f42725c2b789a33b', - '6fb8d5591b466f8fc63db50f1c0f1c69013f996887b8244d2cdec417afea8fa3' - ], - [ - 'ea01606a7a6c9cdd249fdfcfacb99584001edd28abbab77b5104e98e8e3b35d4', - '322af4908c7312b0cfbfe369f7a7b3cdb7d4494bc2823700cfd652188a3ea98d' - ], - [ - 'af8addbf2b661c8a6c6328655eb96651252007d8c5ea31be4ad196de8ce2131f', - '6749e67c029b85f52a034eafd096836b2520818680e26ac8f3dfbcdb71749700' - ], - [ - 'e3ae1974566ca06cc516d47e0fb165a674a3dabcfca15e722f0e3450f45889', - '2aeabe7e4531510116217f07bf4d07300de97e4874f81f533420a72eeb0bd6a4' - ], - [ - '591ee355313d99721cf6993ffed1e3e301993ff3ed258802075ea8ced397e246', - 'b0ea558a113c30bea60fc4775460c7901ff0b053d25ca2bdeee98f1a4be5d196' - ], - [ - '11396d55fda54c49f19aa97318d8da61fa8584e47b084945077cf03255b52984', - '998c74a8cd45ac01289d5833a7beb4744ff536b01b257be4c5767bea93ea57a4' - ], - [ - '3c5d2a1ba39c5a1790000738c9e0c40b8dcdfd5468754b6405540157e017aa7a', - 'b2284279995a34e2f9d4de7396fc18b80f9b8b9fdd270f6661f79ca4c81bd257' - ], - [ - 'cc8704b8a60a0defa3a99a7299f2e9c3fbc395afb04ac078425ef8a1793cc030', - 'bdd46039feed17881d1e0862db347f8cf395b74fc4bcdc4e940b74e3ac1f1b13' - ], - [ - 'c533e4f7ea8555aacd9777ac5cad29b97dd4defccc53ee7ea204119b2889b197', - '6f0a256bc5efdf429a2fb6242f1a43a2d9b925bb4a4b3a26bb8e0f45eb596096' - ], - [ - 'c14f8f2ccb27d6f109f6d08d03cc96a69ba8c34eec07bbcf566d48e33da6593', - 'c359d6923bb398f7fd4473e16fe1c28475b740dd098075e6c0e8649113dc3a38' - ], - [ - 'a6cbc3046bc6a450bac24789fa17115a4c9739ed75f8f21ce441f72e0b90e6ef', - '21ae7f4680e889bb130619e2c0f95a360ceb573c70603139862afd617fa9b9f' - ], - [ - '347d6d9a02c48927ebfb86c1359b1caf130a3c0267d11ce6344b39f99d43cc38', - '60ea7f61a353524d1c987f6ecec92f086d565ab687870cb12689ff1e31c74448' - ], - [ - 'da6545d2181db8d983f7dcb375ef5866d47c67b1bf31c8cf855ef7437b72656a', - '49b96715ab6878a79e78f07ce5680c5d6673051b4935bd897fea824b77dc208a' - ], - [ - 'c40747cc9d012cb1a13b8148309c6de7ec25d6945d657146b9d5994b8feb1111', - '5ca560753be2a12fc6de6caf2cb489565db936156b9514e1bb5e83037e0fa2d4' - ], - [ - '4e42c8ec82c99798ccf3a610be870e78338c7f713348bd34c8203ef4037f3502', - '7571d74ee5e0fb92a7a8b33a07783341a5492144cc54bcc40a94473693606437' - ], - [ - '3775ab7089bc6af823aba2e1af70b236d251cadb0c86743287522a1b3b0dedea', - 'be52d107bcfa09d8bcb9736a828cfa7fac8db17bf7a76a2c42ad961409018cf7' - ], - [ - 'cee31cbf7e34ec379d94fb814d3d775ad954595d1314ba8846959e3e82f74e26', - '8fd64a14c06b589c26b947ae2bcf6bfa0149ef0be14ed4d80f448a01c43b1c6d' - ], - [ - 'b4f9eaea09b6917619f6ea6a4eb5464efddb58fd45b1ebefcdc1a01d08b47986', - '39e5c9925b5a54b07433a4f18c61726f8bb131c012ca542eb24a8ac07200682a' - ], - [ - 'd4263dfc3d2df923a0179a48966d30ce84e2515afc3dccc1b77907792ebcc60e', - '62dfaf07a0f78feb30e30d6295853ce189e127760ad6cf7fae164e122a208d54' - ], - [ - '48457524820fa65a4f8d35eb6930857c0032acc0a4a2de422233eeda897612c4', - '25a748ab367979d98733c38a1fa1c2e7dc6cc07db2d60a9ae7a76aaa49bd0f77' - ], - [ - 'dfeeef1881101f2cb11644f3a2afdfc2045e19919152923f367a1767c11cceda', - 'ecfb7056cf1de042f9420bab396793c0c390bde74b4bbdff16a83ae09a9a7517' - ], - [ - '6d7ef6b17543f8373c573f44e1f389835d89bcbc6062ced36c82df83b8fae859', - 'cd450ec335438986dfefa10c57fea9bcc521a0959b2d80bbf74b190dca712d10' - ], - [ - 'e75605d59102a5a2684500d3b991f2e3f3c88b93225547035af25af66e04541f', - 'f5c54754a8f71ee540b9b48728473e314f729ac5308b06938360990e2bfad125' - ], - [ - 'eb98660f4c4dfaa06a2be453d5020bc99a0c2e60abe388457dd43fefb1ed620c', - '6cb9a8876d9cb8520609af3add26cd20a0a7cd8a9411131ce85f44100099223e' - ], - [ - '13e87b027d8514d35939f2e6892b19922154596941888336dc3563e3b8dba942', - 'fef5a3c68059a6dec5d624114bf1e91aac2b9da568d6abeb2570d55646b8adf1' - ], - [ - 'ee163026e9fd6fe017c38f06a5be6fc125424b371ce2708e7bf4491691e5764a', - '1acb250f255dd61c43d94ccc670d0f58f49ae3fa15b96623e5430da0ad6c62b2' - ], - [ - 'b268f5ef9ad51e4d78de3a750c2dc89b1e626d43505867999932e5db33af3d80', - '5f310d4b3c99b9ebb19f77d41c1dee018cf0d34fd4191614003e945a1216e423' - ], - [ - 'ff07f3118a9df035e9fad85eb6c7bfe42b02f01ca99ceea3bf7ffdba93c4750d', - '438136d603e858a3a5c440c38eccbaddc1d2942114e2eddd4740d098ced1f0d8' - ], - [ - '8d8b9855c7c052a34146fd20ffb658bea4b9f69e0d825ebec16e8c3ce2b526a1', - 'cdb559eedc2d79f926baf44fb84ea4d44bcf50fee51d7ceb30e2e7f463036758' - ], - [ - '52db0b5384dfbf05bfa9d472d7ae26dfe4b851ceca91b1eba54263180da32b63', - 'c3b997d050ee5d423ebaf66a6db9f57b3180c902875679de924b69d84a7b375' - ], - [ - 'e62f9490d3d51da6395efd24e80919cc7d0f29c3f3fa48c6fff543becbd43352', - '6d89ad7ba4876b0b22c2ca280c682862f342c8591f1daf5170e07bfd9ccafa7d' - ], - [ - '7f30ea2476b399b4957509c88f77d0191afa2ff5cb7b14fd6d8e7d65aaab1193', - 'ca5ef7d4b231c94c3b15389a5f6311e9daff7bb67b103e9880ef4bff637acaec' - ], - [ - '5098ff1e1d9f14fb46a210fada6c903fef0fb7b4a1dd1d9ac60a0361800b7a00', - '9731141d81fc8f8084d37c6e7542006b3ee1b40d60dfe5362a5b132fd17ddc0' - ], - [ - '32b78c7de9ee512a72895be6b9cbefa6e2f3c4ccce445c96b9f2c81e2778ad58', - 'ee1849f513df71e32efc3896ee28260c73bb80547ae2275ba497237794c8753c' - ], - [ - 'e2cb74fddc8e9fbcd076eef2a7c72b0ce37d50f08269dfc074b581550547a4f7', - 'd3aa2ed71c9dd2247a62df062736eb0baddea9e36122d2be8641abcb005cc4a4' - ], - [ - '8438447566d4d7bedadc299496ab357426009a35f235cb141be0d99cd10ae3a8', - 'c4e1020916980a4da5d01ac5e6ad330734ef0d7906631c4f2390426b2edd791f' - ], - [ - '4162d488b89402039b584c6fc6c308870587d9c46f660b878ab65c82c711d67e', - '67163e903236289f776f22c25fb8a3afc1732f2b84b4e95dbda47ae5a0852649' - ], - [ - '3fad3fa84caf0f34f0f89bfd2dcf54fc175d767aec3e50684f3ba4a4bf5f683d', - 'cd1bc7cb6cc407bb2f0ca647c718a730cf71872e7d0d2a53fa20efcdfe61826' - ], - [ - '674f2600a3007a00568c1a7ce05d0816c1fb84bf1370798f1c69532faeb1a86b', - '299d21f9413f33b3edf43b257004580b70db57da0b182259e09eecc69e0d38a5' - ], - [ - 'd32f4da54ade74abb81b815ad1fb3b263d82d6c692714bcff87d29bd5ee9f08f', - 'f9429e738b8e53b968e99016c059707782e14f4535359d582fc416910b3eea87' - ], - [ - '30e4e670435385556e593657135845d36fbb6931f72b08cb1ed954f1e3ce3ff6', - '462f9bce619898638499350113bbc9b10a878d35da70740dc695a559eb88db7b' - ], - [ - 'be2062003c51cc3004682904330e4dee7f3dcd10b01e580bf1971b04d4cad297', - '62188bc49d61e5428573d48a74e1c655b1c61090905682a0d5558ed72dccb9bc' - ], - [ - '93144423ace3451ed29e0fb9ac2af211cb6e84a601df5993c419859fff5df04a', - '7c10dfb164c3425f5c71a3f9d7992038f1065224f72bb9d1d902a6d13037b47c' - ], - [ - 'b015f8044f5fcbdcf21ca26d6c34fb8197829205c7b7d2a7cb66418c157b112c', - 'ab8c1e086d04e813744a655b2df8d5f83b3cdc6faa3088c1d3aea1454e3a1d5f' - ], - [ - 'd5e9e1da649d97d89e4868117a465a3a4f8a18de57a140d36b3f2af341a21b52', - '4cb04437f391ed73111a13cc1d4dd0db1693465c2240480d8955e8592f27447a' - ], - [ - 'd3ae41047dd7ca065dbf8ed77b992439983005cd72e16d6f996a5316d36966bb', - 'bd1aeb21ad22ebb22a10f0303417c6d964f8cdd7df0aca614b10dc14d125ac46' - ], - [ - '463e2763d885f958fc66cdd22800f0a487197d0a82e377b49f80af87c897b065', - 'bfefacdb0e5d0fd7df3a311a94de062b26b80c61fbc97508b79992671ef7ca7f' - ], - [ - '7985fdfd127c0567c6f53ec1bb63ec3158e597c40bfe747c83cddfc910641917', - '603c12daf3d9862ef2b25fe1de289aed24ed291e0ec6708703a5bd567f32ed03' - ], - [ - '74a1ad6b5f76e39db2dd249410eac7f99e74c59cb83d2d0ed5ff1543da7703e9', - 'cc6157ef18c9c63cd6193d83631bbea0093e0968942e8c33d5737fd790e0db08' - ], - [ - '30682a50703375f602d416664ba19b7fc9bab42c72747463a71d0896b22f6da3', - '553e04f6b018b4fa6c8f39e7f311d3176290d0e0f19ca73f17714d9977a22ff8' - ], - [ - '9e2158f0d7c0d5f26c3791efefa79597654e7a2b2464f52b1ee6c1347769ef57', - '712fcdd1b9053f09003a3481fa7762e9ffd7c8ef35a38509e2fbf2629008373' - ], - [ - '176e26989a43c9cfeba4029c202538c28172e566e3c4fce7322857f3be327d66', - 'ed8cc9d04b29eb877d270b4878dc43c19aefd31f4eee09ee7b47834c1fa4b1c3' - ], - [ - '75d46efea3771e6e68abb89a13ad747ecf1892393dfc4f1b7004788c50374da8', - '9852390a99507679fd0b86fd2b39a868d7efc22151346e1a3ca4726586a6bed8' - ], - [ - '809a20c67d64900ffb698c4c825f6d5f2310fb0451c869345b7319f645605721', - '9e994980d9917e22b76b061927fa04143d096ccc54963e6a5ebfa5f3f8e286c1' - ], - [ - '1b38903a43f7f114ed4500b4eac7083fdefece1cf29c63528d563446f972c180', - '4036edc931a60ae889353f77fd53de4a2708b26b6f5da72ad3394119daf408f9' - ] - ] - } -}; diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/elliptic/lib/elliptic/utils.js b/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/elliptic/lib/elliptic/utils.js deleted file mode 100644 index 89ed3e8b..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/elliptic/lib/elliptic/utils.js +++ /dev/null @@ -1,172 +0,0 @@ -'use strict'; - -var utils = exports; -var BN = require('bn.js'); - -utils.assert = function assert(val, msg) { - if (!val) - throw new Error(msg || 'Assertion failed'); -}; - -function toArray(msg, enc) { - if (Array.isArray(msg)) - return msg.slice(); - if (!msg) - return []; - var res = []; - if (typeof msg !== 'string') { - for (var i = 0; i < msg.length; i++) - res[i] = msg[i] | 0; - return res; - } - if (!enc) { - for (var i = 0; i < msg.length; i++) { - var c = msg.charCodeAt(i); - var hi = c >> 8; - var lo = c & 0xff; - if (hi) - res.push(hi, lo); - else - res.push(lo); - } - } else if (enc === 'hex') { - msg = msg.replace(/[^a-z0-9]+/ig, ''); - if (msg.length % 2 !== 0) - msg = '0' + msg; - for (var i = 0; i < msg.length; i += 2) - res.push(parseInt(msg[i] + msg[i + 1], 16)); - } - return res; -} -utils.toArray = toArray; - -function zero2(word) { - if (word.length === 1) - return '0' + word; - else - return word; -} -utils.zero2 = zero2; - -function toHex(msg) { - var res = ''; - for (var i = 0; i < msg.length; i++) - res += zero2(msg[i].toString(16)); - return res; -} -utils.toHex = toHex; - -utils.encode = function encode(arr, enc) { - if (enc === 'hex') - return toHex(arr); - else - return arr; -}; - -// Represent num in a w-NAF form -function getNAF(num, w) { - var naf = []; - var ws = 1 << (w + 1); - var k = num.clone(); - while (k.cmpn(1) >= 0) { - var z; - if (k.isOdd()) { - var mod = k.andln(ws - 1); - if (mod > (ws >> 1) - 1) - z = (ws >> 1) - mod; - else - z = mod; - k.isubn(z); - } else { - z = 0; - } - naf.push(z); - - // Optimization, shift by word if possible - var shift = (k.cmpn(0) !== 0 && k.andln(ws - 1) === 0) ? (w + 1) : 1; - for (var i = 1; i < shift; i++) - naf.push(0); - k.iushrn(shift); - } - - return naf; -} -utils.getNAF = getNAF; - -// Represent k1, k2 in a Joint Sparse Form -function getJSF(k1, k2) { - var jsf = [ - [], - [] - ]; - - k1 = k1.clone(); - k2 = k2.clone(); - var d1 = 0; - var d2 = 0; - while (k1.cmpn(-d1) > 0 || k2.cmpn(-d2) > 0) { - - // First phase - var m14 = (k1.andln(3) + d1) & 3; - var m24 = (k2.andln(3) + d2) & 3; - if (m14 === 3) - m14 = -1; - if (m24 === 3) - m24 = -1; - var u1; - if ((m14 & 1) === 0) { - u1 = 0; - } else { - var m8 = (k1.andln(7) + d1) & 7; - if ((m8 === 3 || m8 === 5) && m24 === 2) - u1 = -m14; - else - u1 = m14; - } - jsf[0].push(u1); - - var u2; - if ((m24 & 1) === 0) { - u2 = 0; - } else { - var m8 = (k2.andln(7) + d2) & 7; - if ((m8 === 3 || m8 === 5) && m14 === 2) - u2 = -m24; - else - u2 = m24; - } - jsf[1].push(u2); - - // Second phase - if (2 * d1 === u1 + 1) - d1 = 1 - d1; - if (2 * d2 === u2 + 1) - d2 = 1 - d2; - k1.iushrn(1); - k2.iushrn(1); - } - - return jsf; -} -utils.getJSF = getJSF; - -function cachedProperty(obj, name, computer) { - var key = '_' + name; - obj.prototype[name] = function cachedProperty() { - return this[key] !== undefined ? this[key] : - this[key] = computer.call(this); - }; -} -utils.cachedProperty = cachedProperty; - -function parseBytes(bytes) { - return typeof bytes === 'string' ? utils.toArray(bytes, 'hex') : - bytes; -} -utils.parseBytes = parseBytes; - -function intFromLE(bytes) { - return new BN(bytes, 'hex', 'le'); -} -utils.intFromLE = intFromLE; - diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/elliptic/node_modules/brorand/.npmignore b/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/elliptic/node_modules/brorand/.npmignore deleted file mode 100644 index 1ca95717..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/elliptic/node_modules/brorand/.npmignore +++ /dev/null @@ -1,2 +0,0 @@ -node_modules/ -npm-debug.log diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/elliptic/node_modules/brorand/README.md b/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/elliptic/node_modules/brorand/README.md deleted file mode 100644 index f80437d1..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/elliptic/node_modules/brorand/README.md +++ /dev/null @@ -1,26 +0,0 @@ -# Brorand - -#### LICENSE - -This software is licensed under the MIT License. - -Copyright Fedor Indutny, 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/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/elliptic/node_modules/brorand/index.js b/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/elliptic/node_modules/brorand/index.js deleted file mode 100644 index 17f08555..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/elliptic/node_modules/brorand/index.js +++ /dev/null @@ -1,57 +0,0 @@ -var r; - -module.exports = function rand(len) { - if (!r) - r = new Rand(null); - - return r.generate(len); -}; - -function Rand(rand) { - this.rand = rand; -} -module.exports.Rand = Rand; - -Rand.prototype.generate = function generate(len) { - return this._rand(len); -}; - -if (typeof window === 'object') { - if (window.crypto && window.crypto.getRandomValues) { - // Modern browsers - Rand.prototype._rand = function _rand(n) { - var arr = new Uint8Array(n); - window.crypto.getRandomValues(arr); - return arr; - }; - } else if (window.msCrypto && window.msCrypto.getRandomValues) { - // IE - Rand.prototype._rand = function _rand(n) { - var arr = new Uint8Array(n); - window.msCrypto.getRandomValues(arr); - return arr; - }; - } else { - // Old junk - Rand.prototype._rand = function() { - throw new Error('Not implemented yet'); - }; - } -} else { - // Node.js or Web worker - try { - var crypto = require('crypto'); - - Rand.prototype._rand = function _rand(n) { - return crypto.randomBytes(n); - }; - } catch (e) { - // Emulate crypto API using randy - Rand.prototype._rand = function _rand(n) { - var res = new Uint8Array(n); - for (var i = 0; i < res.length; i++) - res[i] = this.rand.getByte(); - return res; - }; - } -} diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/elliptic/node_modules/brorand/package.json b/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/elliptic/node_modules/brorand/package.json deleted file mode 100644 index f88fbe3b..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/elliptic/node_modules/brorand/package.json +++ /dev/null @@ -1,61 +0,0 @@ -{ - "name": "brorand", - "version": "1.0.6", - "description": "Random number generator for browsers and node.js", - "main": "index.js", - "scripts": { - "test": "mocha --reporter=spec test/**/*-test.js" - }, - "repository": { - "type": "git", - "url": "git+ssh://git@github.com/indutny/brorand.git" - }, - "keywords": [ - "Random", - "RNG", - "browser", - "crypto" - ], - "author": { - "name": "Fedor Indutny", - "email": "fedor@indutny.com" - }, - "license": "MIT", - "bugs": { - "url": "https://github.com/indutny/brorand/issues" - }, - "homepage": "https://github.com/indutny/brorand", - "devDependencies": { - "mocha": "^2.0.1" - }, - "browser": { - "crypto": false - }, - "gitHead": "f077f0a95c627f2707d7b7699ccddca308a58d15", - "_id": "brorand@1.0.6", - "_shasum": "4028706b915f91f7b349a2e0bf3c376039d216e5", - "_from": "brorand@>=1.0.1 <2.0.0", - "_npmVersion": "3.10.3", - "_nodeVersion": "6.3.0", - "_npmUser": { - "name": "indutny", - "email": "fedor@indutny.com" - }, - "dist": { - "shasum": "4028706b915f91f7b349a2e0bf3c376039d216e5", - "tarball": "https://registry.npmjs.org/brorand/-/brorand-1.0.6.tgz" - }, - "maintainers": [ - { - "name": "indutny", - "email": "fedor@indutny.com" - } - ], - "_npmOperationalInternal": { - "host": "packages-12-west.internal.npmjs.com", - "tmp": "tmp/brorand-1.0.6.tgz_1473323651066_0.41867022518999875" - }, - "directories": {}, - "_resolved": "https://registry.npmjs.org/brorand/-/brorand-1.0.6.tgz", - "readme": "ERROR: No README data found!" -} diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/elliptic/node_modules/brorand/test/api-test.js b/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/elliptic/node_modules/brorand/test/api-test.js deleted file mode 100644 index b6c876d3..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/elliptic/node_modules/brorand/test/api-test.js +++ /dev/null @@ -1,8 +0,0 @@ -var brorand = require('../'); -var assert = require('assert'); - -describe('Brorand', function() { - it('should generate random numbers', function() { - assert.equal(brorand(100).length, 100); - }); -}); diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/elliptic/node_modules/hash.js/.npmignore b/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/elliptic/node_modules/hash.js/.npmignore deleted file mode 100644 index 1ca95717..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/elliptic/node_modules/hash.js/.npmignore +++ /dev/null @@ -1,2 +0,0 @@ -node_modules/ -npm-debug.log diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/elliptic/node_modules/hash.js/.travis.yml b/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/elliptic/node_modules/hash.js/.travis.yml deleted file mode 100644 index 92a990f6..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/elliptic/node_modules/hash.js/.travis.yml +++ /dev/null @@ -1,7 +0,0 @@ -language: node_js -node_js: - - "0.10" - - "0.11" -branches: - only: - - master diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/elliptic/node_modules/hash.js/README.md b/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/elliptic/node_modules/hash.js/README.md deleted file mode 100644 index 63107cbe..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/elliptic/node_modules/hash.js/README.md +++ /dev/null @@ -1,28 +0,0 @@ -# hash.js [![Build Status](https://secure.travis-ci.org/indutny/hash.js.png)](http://travis-ci.org/indutny/hash.js) - -Just a bike-shed. - -#### LICENSE - -This software is licensed under the MIT License. - -Copyright Fedor Indutny, 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/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/elliptic/node_modules/hash.js/lib/hash.js b/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/elliptic/node_modules/hash.js/lib/hash.js deleted file mode 100644 index f59b6730..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/elliptic/node_modules/hash.js/lib/hash.js +++ /dev/null @@ -1,15 +0,0 @@ -var hash = exports; - -hash.utils = require('./hash/utils'); -hash.common = require('./hash/common'); -hash.sha = require('./hash/sha'); -hash.ripemd = require('./hash/ripemd'); -hash.hmac = require('./hash/hmac'); - -// Proxy hash functions to the main object -hash.sha1 = hash.sha.sha1; -hash.sha256 = hash.sha.sha256; -hash.sha224 = hash.sha.sha224; -hash.sha384 = hash.sha.sha384; -hash.sha512 = hash.sha.sha512; -hash.ripemd160 = hash.ripemd.ripemd160; diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/elliptic/node_modules/hash.js/lib/hash/common.js b/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/elliptic/node_modules/hash.js/lib/hash/common.js deleted file mode 100644 index a052c55f..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/elliptic/node_modules/hash.js/lib/hash/common.js +++ /dev/null @@ -1,91 +0,0 @@ -var hash = require('../hash'); -var utils = hash.utils; -var assert = utils.assert; - -function BlockHash() { - this.pending = null; - this.pendingTotal = 0; - this.blockSize = this.constructor.blockSize; - this.outSize = this.constructor.outSize; - this.hmacStrength = this.constructor.hmacStrength; - this.padLength = this.constructor.padLength / 8; - this.endian = 'big'; - - this._delta8 = this.blockSize / 8; - this._delta32 = this.blockSize / 32; -} -exports.BlockHash = BlockHash; - -BlockHash.prototype.update = function update(msg, enc) { - // Convert message to array, pad it, and join into 32bit blocks - msg = utils.toArray(msg, enc); - if (!this.pending) - this.pending = msg; - else - this.pending = this.pending.concat(msg); - this.pendingTotal += msg.length; - - // Enough data, try updating - if (this.pending.length >= this._delta8) { - msg = this.pending; - - // Process pending data in blocks - var r = msg.length % this._delta8; - this.pending = msg.slice(msg.length - r, msg.length); - if (this.pending.length === 0) - this.pending = null; - - msg = utils.join32(msg, 0, msg.length - r, this.endian); - for (var i = 0; i < msg.length; i += this._delta32) - this._update(msg, i, i + this._delta32); - } - - return this; -}; - -BlockHash.prototype.digest = function digest(enc) { - this.update(this._pad()); - assert(this.pending === null); - - return this._digest(enc); -}; - -BlockHash.prototype._pad = function pad() { - var len = this.pendingTotal; - var bytes = this._delta8; - var k = bytes - ((len + this.padLength) % bytes); - var res = new Array(k + this.padLength); - res[0] = 0x80; - for (var i = 1; i < k; i++) - res[i] = 0; - - // Append length - len <<= 3; - if (this.endian === 'big') { - for (var t = 8; t < this.padLength; t++) - res[i++] = 0; - - res[i++] = 0; - res[i++] = 0; - res[i++] = 0; - res[i++] = 0; - res[i++] = (len >>> 24) & 0xff; - res[i++] = (len >>> 16) & 0xff; - res[i++] = (len >>> 8) & 0xff; - res[i++] = len & 0xff; - } else { - res[i++] = len & 0xff; - res[i++] = (len >>> 8) & 0xff; - res[i++] = (len >>> 16) & 0xff; - res[i++] = (len >>> 24) & 0xff; - res[i++] = 0; - res[i++] = 0; - res[i++] = 0; - res[i++] = 0; - - for (var t = 8; t < this.padLength; t++) - res[i++] = 0; - } - - return res; -}; diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/elliptic/node_modules/hash.js/lib/hash/hmac.js b/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/elliptic/node_modules/hash.js/lib/hash/hmac.js deleted file mode 100644 index 3a3da972..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/elliptic/node_modules/hash.js/lib/hash/hmac.js +++ /dev/null @@ -1,48 +0,0 @@ -var hmac = exports; - -var hash = require('../hash'); -var utils = hash.utils; -var assert = utils.assert; - -function Hmac(hash, key, enc) { - if (!(this instanceof Hmac)) - return new Hmac(hash, key, enc); - this.Hash = hash; - this.blockSize = hash.blockSize / 8; - this.outSize = hash.outSize / 8; - this.inner = null; - this.outer = null; - - this._init(utils.toArray(key, enc)); -} -module.exports = Hmac; - -Hmac.prototype._init = function init(key) { - // Shorten key, if needed - if (key.length > this.blockSize) - key = new this.Hash().update(key).digest(); - assert(key.length <= this.blockSize); - - // Add padding to key - for (var i = key.length; i < this.blockSize; i++) - key.push(0); - - for (var i = 0; i < key.length; i++) - key[i] ^= 0x36; - this.inner = new this.Hash().update(key); - - // 0x36 ^ 0x5c = 0x6a - for (var i = 0; i < key.length; i++) - key[i] ^= 0x6a; - this.outer = new this.Hash().update(key); -}; - -Hmac.prototype.update = function update(msg, enc) { - this.inner.update(msg, enc); - return this; -}; - -Hmac.prototype.digest = function digest(enc) { - this.outer.update(this.inner.digest()); - return this.outer.digest(enc); -}; diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/elliptic/node_modules/hash.js/lib/hash/ripemd.js b/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/elliptic/node_modules/hash.js/lib/hash/ripemd.js deleted file mode 100644 index cd55bfc7..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/elliptic/node_modules/hash.js/lib/hash/ripemd.js +++ /dev/null @@ -1,144 +0,0 @@ -var hash = require('../hash'); -var utils = hash.utils; - -var rotl32 = utils.rotl32; -var sum32 = utils.sum32; -var sum32_3 = utils.sum32_3; -var sum32_4 = utils.sum32_4; -var BlockHash = hash.common.BlockHash; - -function RIPEMD160() { - if (!(this instanceof RIPEMD160)) - return new RIPEMD160(); - - BlockHash.call(this); - - this.h = [ 0x67452301, 0xefcdab89, 0x98badcfe, 0x10325476, 0xc3d2e1f0 ]; - this.endian = 'little'; -} -utils.inherits(RIPEMD160, BlockHash); -exports.ripemd160 = RIPEMD160; - -RIPEMD160.blockSize = 512; -RIPEMD160.outSize = 160; -RIPEMD160.hmacStrength = 192; -RIPEMD160.padLength = 64; - -RIPEMD160.prototype._update = function update(msg, start) { - var A = this.h[0]; - var B = this.h[1]; - var C = this.h[2]; - var D = this.h[3]; - var E = this.h[4]; - var Ah = A; - var Bh = B; - var Ch = C; - var Dh = D; - var Eh = E; - for (var j = 0; j < 80; j++) { - var T = sum32( - rotl32( - sum32_4(A, f(j, B, C, D), msg[r[j] + start], K(j)), - s[j]), - E); - A = E; - E = D; - D = rotl32(C, 10); - C = B; - B = T; - T = sum32( - rotl32( - sum32_4(Ah, f(79 - j, Bh, Ch, Dh), msg[rh[j] + start], Kh(j)), - sh[j]), - Eh); - Ah = Eh; - Eh = Dh; - Dh = rotl32(Ch, 10); - Ch = Bh; - Bh = T; - } - T = sum32_3(this.h[1], C, Dh); - this.h[1] = sum32_3(this.h[2], D, Eh); - this.h[2] = sum32_3(this.h[3], E, Ah); - this.h[3] = sum32_3(this.h[4], A, Bh); - this.h[4] = sum32_3(this.h[0], B, Ch); - this.h[0] = T; -}; - -RIPEMD160.prototype._digest = function digest(enc) { - if (enc === 'hex') - return utils.toHex32(this.h, 'little'); - else - return utils.split32(this.h, 'little'); -}; - -function f(j, x, y, z) { - if (j <= 15) - return x ^ y ^ z; - else if (j <= 31) - return (x & y) | ((~x) & z); - else if (j <= 47) - return (x | (~y)) ^ z; - else if (j <= 63) - return (x & z) | (y & (~z)); - else - return x ^ (y | (~z)); -} - -function K(j) { - if (j <= 15) - return 0x00000000; - else if (j <= 31) - return 0x5a827999; - else if (j <= 47) - return 0x6ed9eba1; - else if (j <= 63) - return 0x8f1bbcdc; - else - return 0xa953fd4e; -} - -function Kh(j) { - if (j <= 15) - return 0x50a28be6; - else if (j <= 31) - return 0x5c4dd124; - else if (j <= 47) - return 0x6d703ef3; - else if (j <= 63) - return 0x7a6d76e9; - else - return 0x00000000; -} - -var r = [ - 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, - 7, 4, 13, 1, 10, 6, 15, 3, 12, 0, 9, 5, 2, 14, 11, 8, - 3, 10, 14, 4, 9, 15, 8, 1, 2, 7, 0, 6, 13, 11, 5, 12, - 1, 9, 11, 10, 0, 8, 12, 4, 13, 3, 7, 15, 14, 5, 6, 2, - 4, 0, 5, 9, 7, 12, 2, 10, 14, 1, 3, 8, 11, 6, 15, 13 -]; - -var rh = [ - 5, 14, 7, 0, 9, 2, 11, 4, 13, 6, 15, 8, 1, 10, 3, 12, - 6, 11, 3, 7, 0, 13, 5, 10, 14, 15, 8, 12, 4, 9, 1, 2, - 15, 5, 1, 3, 7, 14, 6, 9, 11, 8, 12, 2, 10, 0, 4, 13, - 8, 6, 4, 1, 3, 11, 15, 0, 5, 12, 2, 13, 9, 7, 10, 14, - 12, 15, 10, 4, 1, 5, 8, 7, 6, 2, 13, 14, 0, 3, 9, 11 -]; - -var s = [ - 11, 14, 15, 12, 5, 8, 7, 9, 11, 13, 14, 15, 6, 7, 9, 8, - 7, 6, 8, 13, 11, 9, 7, 15, 7, 12, 15, 9, 11, 7, 13, 12, - 11, 13, 6, 7, 14, 9, 13, 15, 14, 8, 13, 6, 5, 12, 7, 5, - 11, 12, 14, 15, 14, 15, 9, 8, 9, 14, 5, 6, 8, 6, 5, 12, - 9, 15, 5, 11, 6, 8, 13, 12, 5, 12, 13, 14, 11, 8, 5, 6 -]; - -var sh = [ - 8, 9, 9, 11, 13, 15, 15, 5, 7, 7, 8, 11, 14, 14, 12, 6, - 9, 13, 15, 7, 12, 8, 9, 11, 7, 7, 12, 7, 6, 15, 13, 11, - 9, 7, 15, 11, 8, 6, 6, 14, 12, 13, 5, 14, 13, 13, 7, 5, - 15, 5, 8, 11, 14, 14, 6, 14, 6, 9, 12, 9, 12, 5, 15, 8, - 8, 5, 12, 9, 12, 5, 14, 6, 8, 13, 6, 5, 15, 13, 11, 11 -]; diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/elliptic/node_modules/hash.js/lib/hash/sha.js b/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/elliptic/node_modules/hash.js/lib/hash/sha.js deleted file mode 100644 index a7837aad..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/elliptic/node_modules/hash.js/lib/hash/sha.js +++ /dev/null @@ -1,564 +0,0 @@ -var hash = require('../hash'); -var utils = hash.utils; -var assert = utils.assert; - -var rotr32 = utils.rotr32; -var rotl32 = utils.rotl32; -var sum32 = utils.sum32; -var sum32_4 = utils.sum32_4; -var sum32_5 = utils.sum32_5; -var rotr64_hi = utils.rotr64_hi; -var rotr64_lo = utils.rotr64_lo; -var shr64_hi = utils.shr64_hi; -var shr64_lo = utils.shr64_lo; -var sum64 = utils.sum64; -var sum64_hi = utils.sum64_hi; -var sum64_lo = utils.sum64_lo; -var sum64_4_hi = utils.sum64_4_hi; -var sum64_4_lo = utils.sum64_4_lo; -var sum64_5_hi = utils.sum64_5_hi; -var sum64_5_lo = utils.sum64_5_lo; -var BlockHash = hash.common.BlockHash; - -var sha256_K = [ - 0x428a2f98, 0x71374491, 0xb5c0fbcf, 0xe9b5dba5, - 0x3956c25b, 0x59f111f1, 0x923f82a4, 0xab1c5ed5, - 0xd807aa98, 0x12835b01, 0x243185be, 0x550c7dc3, - 0x72be5d74, 0x80deb1fe, 0x9bdc06a7, 0xc19bf174, - 0xe49b69c1, 0xefbe4786, 0x0fc19dc6, 0x240ca1cc, - 0x2de92c6f, 0x4a7484aa, 0x5cb0a9dc, 0x76f988da, - 0x983e5152, 0xa831c66d, 0xb00327c8, 0xbf597fc7, - 0xc6e00bf3, 0xd5a79147, 0x06ca6351, 0x14292967, - 0x27b70a85, 0x2e1b2138, 0x4d2c6dfc, 0x53380d13, - 0x650a7354, 0x766a0abb, 0x81c2c92e, 0x92722c85, - 0xa2bfe8a1, 0xa81a664b, 0xc24b8b70, 0xc76c51a3, - 0xd192e819, 0xd6990624, 0xf40e3585, 0x106aa070, - 0x19a4c116, 0x1e376c08, 0x2748774c, 0x34b0bcb5, - 0x391c0cb3, 0x4ed8aa4a, 0x5b9cca4f, 0x682e6ff3, - 0x748f82ee, 0x78a5636f, 0x84c87814, 0x8cc70208, - 0x90befffa, 0xa4506ceb, 0xbef9a3f7, 0xc67178f2 -]; - -var sha512_K = [ - 0x428a2f98, 0xd728ae22, 0x71374491, 0x23ef65cd, - 0xb5c0fbcf, 0xec4d3b2f, 0xe9b5dba5, 0x8189dbbc, - 0x3956c25b, 0xf348b538, 0x59f111f1, 0xb605d019, - 0x923f82a4, 0xaf194f9b, 0xab1c5ed5, 0xda6d8118, - 0xd807aa98, 0xa3030242, 0x12835b01, 0x45706fbe, - 0x243185be, 0x4ee4b28c, 0x550c7dc3, 0xd5ffb4e2, - 0x72be5d74, 0xf27b896f, 0x80deb1fe, 0x3b1696b1, - 0x9bdc06a7, 0x25c71235, 0xc19bf174, 0xcf692694, - 0xe49b69c1, 0x9ef14ad2, 0xefbe4786, 0x384f25e3, - 0x0fc19dc6, 0x8b8cd5b5, 0x240ca1cc, 0x77ac9c65, - 0x2de92c6f, 0x592b0275, 0x4a7484aa, 0x6ea6e483, - 0x5cb0a9dc, 0xbd41fbd4, 0x76f988da, 0x831153b5, - 0x983e5152, 0xee66dfab, 0xa831c66d, 0x2db43210, - 0xb00327c8, 0x98fb213f, 0xbf597fc7, 0xbeef0ee4, - 0xc6e00bf3, 0x3da88fc2, 0xd5a79147, 0x930aa725, - 0x06ca6351, 0xe003826f, 0x14292967, 0x0a0e6e70, - 0x27b70a85, 0x46d22ffc, 0x2e1b2138, 0x5c26c926, - 0x4d2c6dfc, 0x5ac42aed, 0x53380d13, 0x9d95b3df, - 0x650a7354, 0x8baf63de, 0x766a0abb, 0x3c77b2a8, - 0x81c2c92e, 0x47edaee6, 0x92722c85, 0x1482353b, - 0xa2bfe8a1, 0x4cf10364, 0xa81a664b, 0xbc423001, - 0xc24b8b70, 0xd0f89791, 0xc76c51a3, 0x0654be30, - 0xd192e819, 0xd6ef5218, 0xd6990624, 0x5565a910, - 0xf40e3585, 0x5771202a, 0x106aa070, 0x32bbd1b8, - 0x19a4c116, 0xb8d2d0c8, 0x1e376c08, 0x5141ab53, - 0x2748774c, 0xdf8eeb99, 0x34b0bcb5, 0xe19b48a8, - 0x391c0cb3, 0xc5c95a63, 0x4ed8aa4a, 0xe3418acb, - 0x5b9cca4f, 0x7763e373, 0x682e6ff3, 0xd6b2b8a3, - 0x748f82ee, 0x5defb2fc, 0x78a5636f, 0x43172f60, - 0x84c87814, 0xa1f0ab72, 0x8cc70208, 0x1a6439ec, - 0x90befffa, 0x23631e28, 0xa4506ceb, 0xde82bde9, - 0xbef9a3f7, 0xb2c67915, 0xc67178f2, 0xe372532b, - 0xca273ece, 0xea26619c, 0xd186b8c7, 0x21c0c207, - 0xeada7dd6, 0xcde0eb1e, 0xf57d4f7f, 0xee6ed178, - 0x06f067aa, 0x72176fba, 0x0a637dc5, 0xa2c898a6, - 0x113f9804, 0xbef90dae, 0x1b710b35, 0x131c471b, - 0x28db77f5, 0x23047d84, 0x32caab7b, 0x40c72493, - 0x3c9ebe0a, 0x15c9bebc, 0x431d67c4, 0x9c100d4c, - 0x4cc5d4be, 0xcb3e42b6, 0x597f299c, 0xfc657e2a, - 0x5fcb6fab, 0x3ad6faec, 0x6c44198c, 0x4a475817 -]; - -var sha1_K = [ - 0x5A827999, 0x6ED9EBA1, - 0x8F1BBCDC, 0xCA62C1D6 -]; - -function SHA256() { - if (!(this instanceof SHA256)) - return new SHA256(); - - BlockHash.call(this); - this.h = [ 0x6a09e667, 0xbb67ae85, 0x3c6ef372, 0xa54ff53a, - 0x510e527f, 0x9b05688c, 0x1f83d9ab, 0x5be0cd19 ]; - this.k = sha256_K; - this.W = new Array(64); -} -utils.inherits(SHA256, BlockHash); -exports.sha256 = SHA256; - -SHA256.blockSize = 512; -SHA256.outSize = 256; -SHA256.hmacStrength = 192; -SHA256.padLength = 64; - -SHA256.prototype._update = function _update(msg, start) { - var W = this.W; - - for (var i = 0; i < 16; i++) - W[i] = msg[start + i]; - for (; i < W.length; i++) - W[i] = sum32_4(g1_256(W[i - 2]), W[i - 7], g0_256(W[i - 15]), W[i - 16]); - - var a = this.h[0]; - var b = this.h[1]; - var c = this.h[2]; - var d = this.h[3]; - var e = this.h[4]; - var f = this.h[5]; - var g = this.h[6]; - var h = this.h[7]; - - assert(this.k.length === W.length); - for (var i = 0; i < W.length; i++) { - var T1 = sum32_5(h, s1_256(e), ch32(e, f, g), this.k[i], W[i]); - var T2 = sum32(s0_256(a), maj32(a, b, c)); - h = g; - g = f; - f = e; - e = sum32(d, T1); - d = c; - c = b; - b = a; - a = sum32(T1, T2); - } - - this.h[0] = sum32(this.h[0], a); - this.h[1] = sum32(this.h[1], b); - this.h[2] = sum32(this.h[2], c); - this.h[3] = sum32(this.h[3], d); - this.h[4] = sum32(this.h[4], e); - this.h[5] = sum32(this.h[5], f); - this.h[6] = sum32(this.h[6], g); - this.h[7] = sum32(this.h[7], h); -}; - -SHA256.prototype._digest = function digest(enc) { - if (enc === 'hex') - return utils.toHex32(this.h, 'big'); - else - return utils.split32(this.h, 'big'); -}; - -function SHA224() { - if (!(this instanceof SHA224)) - return new SHA224(); - - SHA256.call(this); - this.h = [ 0xc1059ed8, 0x367cd507, 0x3070dd17, 0xf70e5939, - 0xffc00b31, 0x68581511, 0x64f98fa7, 0xbefa4fa4 ]; -} -utils.inherits(SHA224, SHA256); -exports.sha224 = SHA224; - -SHA224.blockSize = 512; -SHA224.outSize = 224; -SHA224.hmacStrength = 192; -SHA224.padLength = 64; - -SHA224.prototype._digest = function digest(enc) { - // Just truncate output - if (enc === 'hex') - return utils.toHex32(this.h.slice(0, 7), 'big'); - else - return utils.split32(this.h.slice(0, 7), 'big'); -}; - -function SHA512() { - if (!(this instanceof SHA512)) - return new SHA512(); - - BlockHash.call(this); - this.h = [ 0x6a09e667, 0xf3bcc908, - 0xbb67ae85, 0x84caa73b, - 0x3c6ef372, 0xfe94f82b, - 0xa54ff53a, 0x5f1d36f1, - 0x510e527f, 0xade682d1, - 0x9b05688c, 0x2b3e6c1f, - 0x1f83d9ab, 0xfb41bd6b, - 0x5be0cd19, 0x137e2179 ]; - this.k = sha512_K; - this.W = new Array(160); -} -utils.inherits(SHA512, BlockHash); -exports.sha512 = SHA512; - -SHA512.blockSize = 1024; -SHA512.outSize = 512; -SHA512.hmacStrength = 192; -SHA512.padLength = 128; - -SHA512.prototype._prepareBlock = function _prepareBlock(msg, start) { - var W = this.W; - - // 32 x 32bit words - for (var i = 0; i < 32; i++) - W[i] = msg[start + i]; - for (; i < W.length; i += 2) { - var c0_hi = g1_512_hi(W[i - 4], W[i - 3]); // i - 2 - var c0_lo = g1_512_lo(W[i - 4], W[i - 3]); - var c1_hi = W[i - 14]; // i - 7 - var c1_lo = W[i - 13]; - var c2_hi = g0_512_hi(W[i - 30], W[i - 29]); // i - 15 - var c2_lo = g0_512_lo(W[i - 30], W[i - 29]); - var c3_hi = W[i - 32]; // i - 16 - var c3_lo = W[i - 31]; - - W[i] = sum64_4_hi(c0_hi, c0_lo, - c1_hi, c1_lo, - c2_hi, c2_lo, - c3_hi, c3_lo); - W[i + 1] = sum64_4_lo(c0_hi, c0_lo, - c1_hi, c1_lo, - c2_hi, c2_lo, - c3_hi, c3_lo); - } -}; - -SHA512.prototype._update = function _update(msg, start) { - this._prepareBlock(msg, start); - - var W = this.W; - - var ah = this.h[0]; - var al = this.h[1]; - var bh = this.h[2]; - var bl = this.h[3]; - var ch = this.h[4]; - var cl = this.h[5]; - var dh = this.h[6]; - var dl = this.h[7]; - var eh = this.h[8]; - var el = this.h[9]; - var fh = this.h[10]; - var fl = this.h[11]; - var gh = this.h[12]; - var gl = this.h[13]; - var hh = this.h[14]; - var hl = this.h[15]; - - assert(this.k.length === W.length); - for (var i = 0; i < W.length; i += 2) { - var c0_hi = hh; - var c0_lo = hl; - var c1_hi = s1_512_hi(eh, el); - var c1_lo = s1_512_lo(eh, el); - var c2_hi = ch64_hi(eh, el, fh, fl, gh, gl); - var c2_lo = ch64_lo(eh, el, fh, fl, gh, gl); - var c3_hi = this.k[i]; - var c3_lo = this.k[i + 1]; - var c4_hi = W[i]; - var c4_lo = W[i + 1]; - - var T1_hi = sum64_5_hi(c0_hi, c0_lo, - c1_hi, c1_lo, - c2_hi, c2_lo, - c3_hi, c3_lo, - c4_hi, c4_lo); - var T1_lo = sum64_5_lo(c0_hi, c0_lo, - c1_hi, c1_lo, - c2_hi, c2_lo, - c3_hi, c3_lo, - c4_hi, c4_lo); - - var c0_hi = s0_512_hi(ah, al); - var c0_lo = s0_512_lo(ah, al); - var c1_hi = maj64_hi(ah, al, bh, bl, ch, cl); - var c1_lo = maj64_lo(ah, al, bh, bl, ch, cl); - - var T2_hi = sum64_hi(c0_hi, c0_lo, c1_hi, c1_lo); - var T2_lo = sum64_lo(c0_hi, c0_lo, c1_hi, c1_lo); - - hh = gh; - hl = gl; - - gh = fh; - gl = fl; - - fh = eh; - fl = el; - - eh = sum64_hi(dh, dl, T1_hi, T1_lo); - el = sum64_lo(dl, dl, T1_hi, T1_lo); - - dh = ch; - dl = cl; - - ch = bh; - cl = bl; - - bh = ah; - bl = al; - - ah = sum64_hi(T1_hi, T1_lo, T2_hi, T2_lo); - al = sum64_lo(T1_hi, T1_lo, T2_hi, T2_lo); - } - - sum64(this.h, 0, ah, al); - sum64(this.h, 2, bh, bl); - sum64(this.h, 4, ch, cl); - sum64(this.h, 6, dh, dl); - sum64(this.h, 8, eh, el); - sum64(this.h, 10, fh, fl); - sum64(this.h, 12, gh, gl); - sum64(this.h, 14, hh, hl); -}; - -SHA512.prototype._digest = function digest(enc) { - if (enc === 'hex') - return utils.toHex32(this.h, 'big'); - else - return utils.split32(this.h, 'big'); -}; - -function SHA384() { - if (!(this instanceof SHA384)) - return new SHA384(); - - SHA512.call(this); - this.h = [ 0xcbbb9d5d, 0xc1059ed8, - 0x629a292a, 0x367cd507, - 0x9159015a, 0x3070dd17, - 0x152fecd8, 0xf70e5939, - 0x67332667, 0xffc00b31, - 0x8eb44a87, 0x68581511, - 0xdb0c2e0d, 0x64f98fa7, - 0x47b5481d, 0xbefa4fa4 ]; -} -utils.inherits(SHA384, SHA512); -exports.sha384 = SHA384; - -SHA384.blockSize = 1024; -SHA384.outSize = 384; -SHA384.hmacStrength = 192; -SHA384.padLength = 128; - -SHA384.prototype._digest = function digest(enc) { - if (enc === 'hex') - return utils.toHex32(this.h.slice(0, 12), 'big'); - else - return utils.split32(this.h.slice(0, 12), 'big'); -}; - -function SHA1() { - if (!(this instanceof SHA1)) - return new SHA1(); - - BlockHash.call(this); - this.h = [ 0x67452301, 0xefcdab89, 0x98badcfe, - 0x10325476, 0xc3d2e1f0 ]; - this.W = new Array(80); -} - -utils.inherits(SHA1, BlockHash); -exports.sha1 = SHA1; - -SHA1.blockSize = 512; -SHA1.outSize = 160; -SHA1.hmacStrength = 80; -SHA1.padLength = 64; - -SHA1.prototype._update = function _update(msg, start) { - var W = this.W; - - for (var i = 0; i < 16; i++) - W[i] = msg[start + i]; - - for(; i < W.length; i++) - W[i] = rotl32(W[i - 3] ^ W[i - 8] ^ W[i - 14] ^ W[i - 16], 1); - - var a = this.h[0]; - var b = this.h[1]; - var c = this.h[2]; - var d = this.h[3]; - var e = this.h[4]; - - for (var i = 0; i < W.length; i++) { - var s = ~~(i / 20); - var t = sum32_5(rotl32(a, 5), ft_1(s, b, c, d), e, W[i], sha1_K[s]); - e = d; - d = c; - c = rotl32(b, 30); - b = a; - a = t; - } - - this.h[0] = sum32(this.h[0], a); - this.h[1] = sum32(this.h[1], b); - this.h[2] = sum32(this.h[2], c); - this.h[3] = sum32(this.h[3], d); - this.h[4] = sum32(this.h[4], e); -}; - -SHA1.prototype._digest = function digest(enc) { - if (enc === 'hex') - return utils.toHex32(this.h, 'big'); - else - return utils.split32(this.h, 'big'); -}; - -function ch32(x, y, z) { - return (x & y) ^ ((~x) & z); -} - -function maj32(x, y, z) { - return (x & y) ^ (x & z) ^ (y & z); -} - -function p32(x, y, z) { - return x ^ y ^ z; -} - -function s0_256(x) { - return rotr32(x, 2) ^ rotr32(x, 13) ^ rotr32(x, 22); -} - -function s1_256(x) { - return rotr32(x, 6) ^ rotr32(x, 11) ^ rotr32(x, 25); -} - -function g0_256(x) { - return rotr32(x, 7) ^ rotr32(x, 18) ^ (x >>> 3); -} - -function g1_256(x) { - return rotr32(x, 17) ^ rotr32(x, 19) ^ (x >>> 10); -} - -function ft_1(s, x, y, z) { - if (s === 0) - return ch32(x, y, z); - if (s === 1 || s === 3) - return p32(x, y, z); - if (s === 2) - return maj32(x, y, z); -} - -function ch64_hi(xh, xl, yh, yl, zh, zl) { - var r = (xh & yh) ^ ((~xh) & zh); - if (r < 0) - r += 0x100000000; - return r; -} - -function ch64_lo(xh, xl, yh, yl, zh, zl) { - var r = (xl & yl) ^ ((~xl) & zl); - if (r < 0) - r += 0x100000000; - return r; -} - -function maj64_hi(xh, xl, yh, yl, zh, zl) { - var r = (xh & yh) ^ (xh & zh) ^ (yh & zh); - if (r < 0) - r += 0x100000000; - return r; -} - -function maj64_lo(xh, xl, yh, yl, zh, zl) { - var r = (xl & yl) ^ (xl & zl) ^ (yl & zl); - if (r < 0) - r += 0x100000000; - return r; -} - -function s0_512_hi(xh, xl) { - var c0_hi = rotr64_hi(xh, xl, 28); - var c1_hi = rotr64_hi(xl, xh, 2); // 34 - var c2_hi = rotr64_hi(xl, xh, 7); // 39 - - var r = c0_hi ^ c1_hi ^ c2_hi; - if (r < 0) - r += 0x100000000; - return r; -} - -function s0_512_lo(xh, xl) { - var c0_lo = rotr64_lo(xh, xl, 28); - var c1_lo = rotr64_lo(xl, xh, 2); // 34 - var c2_lo = rotr64_lo(xl, xh, 7); // 39 - - var r = c0_lo ^ c1_lo ^ c2_lo; - if (r < 0) - r += 0x100000000; - return r; -} - -function s1_512_hi(xh, xl) { - var c0_hi = rotr64_hi(xh, xl, 14); - var c1_hi = rotr64_hi(xh, xl, 18); - var c2_hi = rotr64_hi(xl, xh, 9); // 41 - - var r = c0_hi ^ c1_hi ^ c2_hi; - if (r < 0) - r += 0x100000000; - return r; -} - -function s1_512_lo(xh, xl) { - var c0_lo = rotr64_lo(xh, xl, 14); - var c1_lo = rotr64_lo(xh, xl, 18); - var c2_lo = rotr64_lo(xl, xh, 9); // 41 - - var r = c0_lo ^ c1_lo ^ c2_lo; - if (r < 0) - r += 0x100000000; - return r; -} - -function g0_512_hi(xh, xl) { - var c0_hi = rotr64_hi(xh, xl, 1); - var c1_hi = rotr64_hi(xh, xl, 8); - var c2_hi = shr64_hi(xh, xl, 7); - - var r = c0_hi ^ c1_hi ^ c2_hi; - if (r < 0) - r += 0x100000000; - return r; -} - -function g0_512_lo(xh, xl) { - var c0_lo = rotr64_lo(xh, xl, 1); - var c1_lo = rotr64_lo(xh, xl, 8); - var c2_lo = shr64_lo(xh, xl, 7); - - var r = c0_lo ^ c1_lo ^ c2_lo; - if (r < 0) - r += 0x100000000; - return r; -} - -function g1_512_hi(xh, xl) { - var c0_hi = rotr64_hi(xh, xl, 19); - var c1_hi = rotr64_hi(xl, xh, 29); // 61 - var c2_hi = shr64_hi(xh, xl, 6); - - var r = c0_hi ^ c1_hi ^ c2_hi; - if (r < 0) - r += 0x100000000; - return r; -} - -function g1_512_lo(xh, xl) { - var c0_lo = rotr64_lo(xh, xl, 19); - var c1_lo = rotr64_lo(xl, xh, 29); // 61 - var c2_lo = shr64_lo(xh, xl, 6); - - var r = c0_lo ^ c1_lo ^ c2_lo; - if (r < 0) - r += 0x100000000; - return r; -} diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/elliptic/node_modules/hash.js/lib/hash/utils.js b/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/elliptic/node_modules/hash.js/lib/hash/utils.js deleted file mode 100644 index 00ed5fb4..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/elliptic/node_modules/hash.js/lib/hash/utils.js +++ /dev/null @@ -1,257 +0,0 @@ -var utils = exports; -var inherits = require('inherits'); - -function toArray(msg, enc) { - if (Array.isArray(msg)) - return msg.slice(); - if (!msg) - return []; - var res = []; - if (typeof msg === 'string') { - if (!enc) { - for (var i = 0; i < msg.length; i++) { - var c = msg.charCodeAt(i); - var hi = c >> 8; - var lo = c & 0xff; - if (hi) - res.push(hi, lo); - else - res.push(lo); - } - } else if (enc === 'hex') { - msg = msg.replace(/[^a-z0-9]+/ig, ''); - if (msg.length % 2 !== 0) - msg = '0' + msg; - for (var i = 0; i < msg.length; i += 2) - res.push(parseInt(msg[i] + msg[i + 1], 16)); - } - } else { - for (var i = 0; i < msg.length; i++) - res[i] = msg[i] | 0; - } - return res; -} -utils.toArray = toArray; - -function toHex(msg) { - var res = ''; - for (var i = 0; i < msg.length; i++) - res += zero2(msg[i].toString(16)); - return res; -} -utils.toHex = toHex; - -function htonl(w) { - var res = (w >>> 24) | - ((w >>> 8) & 0xff00) | - ((w << 8) & 0xff0000) | - ((w & 0xff) << 24); - return res >>> 0; -} -utils.htonl = htonl; - -function toHex32(msg, endian) { - var res = ''; - for (var i = 0; i < msg.length; i++) { - var w = msg[i]; - if (endian === 'little') - w = htonl(w); - res += zero8(w.toString(16)); - } - return res; -} -utils.toHex32 = toHex32; - -function zero2(word) { - if (word.length === 1) - return '0' + word; - else - return word; -} -utils.zero2 = zero2; - -function zero8(word) { - if (word.length === 7) - return '0' + word; - else if (word.length === 6) - return '00' + word; - else if (word.length === 5) - return '000' + word; - else if (word.length === 4) - return '0000' + word; - else if (word.length === 3) - return '00000' + word; - else if (word.length === 2) - return '000000' + word; - else if (word.length === 1) - return '0000000' + word; - else - return word; -} -utils.zero8 = zero8; - -function join32(msg, start, end, endian) { - var len = end - start; - assert(len % 4 === 0); - var res = new Array(len / 4); - for (var i = 0, k = start; i < res.length; i++, k += 4) { - var w; - if (endian === 'big') - w = (msg[k] << 24) | (msg[k + 1] << 16) | (msg[k + 2] << 8) | msg[k + 3]; - else - w = (msg[k + 3] << 24) | (msg[k + 2] << 16) | (msg[k + 1] << 8) | msg[k]; - res[i] = w >>> 0; - } - return res; -} -utils.join32 = join32; - -function split32(msg, endian) { - var res = new Array(msg.length * 4); - for (var i = 0, k = 0; i < msg.length; i++, k += 4) { - var m = msg[i]; - if (endian === 'big') { - res[k] = m >>> 24; - res[k + 1] = (m >>> 16) & 0xff; - res[k + 2] = (m >>> 8) & 0xff; - res[k + 3] = m & 0xff; - } else { - res[k + 3] = m >>> 24; - res[k + 2] = (m >>> 16) & 0xff; - res[k + 1] = (m >>> 8) & 0xff; - res[k] = m & 0xff; - } - } - return res; -} -utils.split32 = split32; - -function rotr32(w, b) { - return (w >>> b) | (w << (32 - b)); -} -utils.rotr32 = rotr32; - -function rotl32(w, b) { - return (w << b) | (w >>> (32 - b)); -} -utils.rotl32 = rotl32; - -function sum32(a, b) { - return (a + b) >>> 0; -} -utils.sum32 = sum32; - -function sum32_3(a, b, c) { - return (a + b + c) >>> 0; -} -utils.sum32_3 = sum32_3; - -function sum32_4(a, b, c, d) { - return (a + b + c + d) >>> 0; -} -utils.sum32_4 = sum32_4; - -function sum32_5(a, b, c, d, e) { - return (a + b + c + d + e) >>> 0; -} -utils.sum32_5 = sum32_5; - -function assert(cond, msg) { - if (!cond) - throw new Error(msg || 'Assertion failed'); -} -utils.assert = assert; - -utils.inherits = inherits; - -function sum64(buf, pos, ah, al) { - var bh = buf[pos]; - var bl = buf[pos + 1]; - - var lo = (al + bl) >>> 0; - var hi = (lo < al ? 1 : 0) + ah + bh; - buf[pos] = hi >>> 0; - buf[pos + 1] = lo; -} -exports.sum64 = sum64; - -function sum64_hi(ah, al, bh, bl) { - var lo = (al + bl) >>> 0; - var hi = (lo < al ? 1 : 0) + ah + bh; - return hi >>> 0; -}; -exports.sum64_hi = sum64_hi; - -function sum64_lo(ah, al, bh, bl) { - var lo = al + bl; - return lo >>> 0; -}; -exports.sum64_lo = sum64_lo; - -function sum64_4_hi(ah, al, bh, bl, ch, cl, dh, dl) { - var carry = 0; - var lo = al; - lo = (lo + bl) >>> 0; - carry += lo < al ? 1 : 0; - lo = (lo + cl) >>> 0; - carry += lo < cl ? 1 : 0; - lo = (lo + dl) >>> 0; - carry += lo < dl ? 1 : 0; - - var hi = ah + bh + ch + dh + carry; - return hi >>> 0; -}; -exports.sum64_4_hi = sum64_4_hi; - -function sum64_4_lo(ah, al, bh, bl, ch, cl, dh, dl) { - var lo = al + bl + cl + dl; - return lo >>> 0; -}; -exports.sum64_4_lo = sum64_4_lo; - -function sum64_5_hi(ah, al, bh, bl, ch, cl, dh, dl, eh, el) { - var carry = 0; - var lo = al; - lo = (lo + bl) >>> 0; - carry += lo < al ? 1 : 0; - lo = (lo + cl) >>> 0; - carry += lo < cl ? 1 : 0; - lo = (lo + dl) >>> 0; - carry += lo < dl ? 1 : 0; - lo = (lo + el) >>> 0; - carry += lo < el ? 1 : 0; - - var hi = ah + bh + ch + dh + eh + carry; - return hi >>> 0; -}; -exports.sum64_5_hi = sum64_5_hi; - -function sum64_5_lo(ah, al, bh, bl, ch, cl, dh, dl, eh, el) { - var lo = al + bl + cl + dl + el; - - return lo >>> 0; -}; -exports.sum64_5_lo = sum64_5_lo; - -function rotr64_hi(ah, al, num) { - var r = (al << (32 - num)) | (ah >>> num); - return r >>> 0; -}; -exports.rotr64_hi = rotr64_hi; - -function rotr64_lo(ah, al, num) { - var r = (ah << (32 - num)) | (al >>> num); - return r >>> 0; -}; -exports.rotr64_lo = rotr64_lo; - -function shr64_hi(ah, al, num) { - return ah >>> num; -}; -exports.shr64_hi = shr64_hi; - -function shr64_lo(ah, al, num) { - var r = (ah << (32 - num)) | (al >>> num); - return r >>> 0; -}; -exports.shr64_lo = shr64_lo; diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/elliptic/node_modules/hash.js/package.json b/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/elliptic/node_modules/hash.js/package.json deleted file mode 100644 index 812e9927..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/elliptic/node_modules/hash.js/package.json +++ /dev/null @@ -1,57 +0,0 @@ -{ - "name": "hash.js", - "version": "1.0.3", - "description": "Various hash functions that could be run by both browser and node", - "main": "lib/hash.js", - "scripts": { - "test": "mocha --reporter=spec test/*-test.js" - }, - "repository": { - "type": "git", - "url": "git+ssh://git@github.com/indutny/hash.js.git" - }, - "keywords": [ - "hash", - "sha256", - "sha224", - "hmac" - ], - "author": { - "name": "Fedor Indutny", - "email": "fedor@indutny.com" - }, - "license": "MIT", - "bugs": { - "url": "https://github.com/indutny/hash.js/issues" - }, - "homepage": "https://github.com/indutny/hash.js", - "dependencies": { - "inherits": "^2.0.1" - }, - "devDependencies": { - "mocha": "^1.18.2" - }, - "gitHead": "9c2ec8f5cdcdc255d5f6951427c5c803c097f7c6", - "_id": "hash.js@1.0.3", - "_shasum": "1332ff00156c0a0ffdd8236013d07b77a0451573", - "_from": "hash.js@>=1.0.0 <2.0.0", - "_npmVersion": "2.9.0", - "_nodeVersion": "2.0.0", - "_npmUser": { - "name": "indutny", - "email": "fedor@indutny.com" - }, - "maintainers": [ - { - "name": "indutny", - "email": "fedor@indutny.com" - } - ], - "dist": { - "shasum": "1332ff00156c0a0ffdd8236013d07b77a0451573", - "tarball": "https://registry.npmjs.org/hash.js/-/hash.js-1.0.3.tgz" - }, - "directories": {}, - "_resolved": "https://registry.npmjs.org/hash.js/-/hash.js-1.0.3.tgz", - "readme": "ERROR: No README data found!" -} diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/elliptic/node_modules/hash.js/test/hash-test.js b/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/elliptic/node_modules/hash.js/test/hash-test.js deleted file mode 100644 index 97347a27..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/elliptic/node_modules/hash.js/test/hash-test.js +++ /dev/null @@ -1,119 +0,0 @@ -var assert = require('assert'); -var hash = require('../'); - -describe('Hash', function() { - function test(fn, cases) { - for (var i = 0; i < cases.length; i++) { - var msg = cases[i][0]; - var res = cases[i][1]; - var enc = cases[i][2]; - - var dgst = fn().update(msg, enc).digest('hex'); - assert.equal(dgst, res); - - // Split message - var dgst = fn().update(msg.slice(0, 2), enc) - .update(msg.slice(2), enc) - .digest('hex'); - assert.equal(dgst, res); - } - } - - it('should support sha256', function() { - assert.equal(hash.sha256.blockSize, 512); - assert.equal(hash.sha256.outSize, 256); - - test(hash.sha256, [ - [ 'abc', - 'ba7816bf8f01cfea414140de5dae2223b00361a396177a9cb410ff61f20015ad' ], - [ 'abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq', - '248d6a61d20638b8e5c026930c3e6039a33ce45964ff2167f6ecedd419db06c1' ], - [ 'deadbeef', - '5f78c33274e43fa9de5659265c1d917e25c03722dcb0b8d27db8d5feaa813953', - 'hex' ], - ]); - }); - - it('should support sha224', function() { - assert.equal(hash.sha224.blockSize, 512); - assert.equal(hash.sha224.outSize, 224); - - test(hash.sha224, [ - [ 'abc', - '23097d223405d8228642a477bda255b32aadbce4bda0b3f7e36c9da7' ], - [ 'abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq', - '75388b16512776cc5dba5da1fd890150b0c6455cb4f58b1952522525' ], - [ 'deadbeef', - '55b9eee5f60cc362ddc07676f620372611e22272f60fdbec94f243f8', - 'hex' ], - ]); - }); - - it('should support ripemd160', function() { - assert.equal(hash.ripemd160.blockSize, 512); - assert.equal(hash.ripemd160.outSize, 160); - - test(hash.ripemd160, [ - [ '', '9c1185a5c5e9fc54612808977ee8f548b2258d31'], - [ 'abc', - '8eb208f7e05d987a9b044a8e98c6b087f15a0bfc' ], - [ 'message digest', - '5d0689ef49d2fae572b881b123a85ffa21595f36' ], - [ 'abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq', - '12a053384a9c0c88e405a06c27dcf49ada62eb2b' ], - [ 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789', - 'b0e20b6e3116640286ed3a87a5713079b21f5189' ], - ]); - }); - - it('should support sha1', function() { - assert.equal(hash.sha1.blockSize, 512); - assert.equal(hash.sha1.outSize, 160); - - test(hash.sha1, [ - [ '', - 'da39a3ee5e6b4b0d3255bfef95601890afd80709' ], - [ 'abc', - 'a9993e364706816aba3e25717850c26c9cd0d89d' ], - [ 'abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq', - '84983e441c3bd26ebaae4aa1f95129e5e54670f1' ], - [ 'deadbeef', - 'd78f8bb992a56a597f6c7a1fb918bb78271367eb', - 'hex' ], - ]); - }); - - it('should support sha512', function() { - assert.equal(hash.sha512.blockSize, 1024); - assert.equal(hash.sha512.outSize, 512); - - test(hash.sha512, [ - [ 'abc', - 'ddaf35a193617abacc417349ae20413112e6fa4e89a97ea20a9eeee64b55d39a' + - '2192992a274fc1a836ba3c23a3feebbd454d4423643ce80e2a9ac94fa54ca49f' - ], - [ 'abcdefghbcdefghicdefghijdefghijkefghijklfghijklmghijklmn' + - 'hijklmnoijklmnopjklmnopqklmnopqrlmnopqrsmnopqrstnopqrstu', - '8e959b75dae313da8cf4f72814fc143f8f7779c6eb9f7fa17299aeadb6889018' + - '501d289e4900f7e4331b99dec4b5433ac7d329eeb6dd26545e96e55b874be909' - ] - ]); - }); - - it('should support sha384', function() { - assert.equal(hash.sha384.blockSize, 1024); - assert.equal(hash.sha384.outSize, 384); - - test(hash.sha384, [ - [ 'abc', - 'cb00753f45a35e8bb5a03d699ac65007272c32ab0eded1631a8b605a43ff5bed' + - '8086072ba1e7cc2358baeca134c825a7' - ], - [ 'abcdefghbcdefghicdefghijdefghijkefghijklfghijklmghijklmn' + - 'hijklmnoijklmnopjklmnopqklmnopqrlmnopqrsmnopqrstnopqrstu', - '09330c33f71147e83d192fc782cd1b4753111b173b3b05d22fa08086e3b0f712' + - 'fcc7c71a557e2db966c3e9fa91746039' - ] - ]); - }); -}); diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/elliptic/node_modules/hash.js/test/hmac-test.js b/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/elliptic/node_modules/hash.js/test/hmac-test.js deleted file mode 100644 index 0a9647ee..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/elliptic/node_modules/hash.js/test/hmac-test.js +++ /dev/null @@ -1,59 +0,0 @@ -var assert = require('assert'); -var hash = require('../'); -var utils = hash.utils; - -describe('Hmac', function() { - describe('mixed test vector', function() { - test({ - name: 'nist 1', - key: '00010203 04050607 08090A0B 0C0D0E0F' + - '10111213 14151617 18191A1B 1C1D1E1F 20212223 24252627' + - '28292A2B 2C2D2E2F 30313233 34353637 38393A3B 3C3D3E3F', - msg: 'Sample message for keylen=blocklen', - res: '8bb9a1db9806f20df7f77b82138c7914d174d59e13dc4d0169c9057b133e1d62' - }); - test({ - name: 'nist 2', - key: '00010203 04050607' + - '08090A0B 0C0D0E0F 10111213 14151617 18191A1B 1C1D1E1F', - msg: 'Sample message for keylen=6.0.0 <7.0.0", - "_npmVersion": "3.10.3", - "_nodeVersion": "6.3.0", - "_npmUser": { - "name": "indutny", - "email": "fedor@indutny.com" - }, - "dist": { - "shasum": "e4c81e0829cf0a65ab70e998b8232723b5c1bc48", - "tarball": "https://registry.npmjs.org/elliptic/-/elliptic-6.3.2.tgz" - }, - "maintainers": [ - { - "name": "indutny", - "email": "fedor@indutny.com" - } - ], - "_npmOperationalInternal": { - "host": "packages-16-east.internal.npmjs.com", - "tmp": "tmp/elliptic-6.3.2.tgz_1473938837205_0.3108903462998569" - }, - "directories": {}, - "_resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.3.2.tgz", - "readme": "ERROR: No README data found!" -} diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/parse-asn1/.npmignore b/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/parse-asn1/.npmignore deleted file mode 100644 index 4ebc8aea..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/parse-asn1/.npmignore +++ /dev/null @@ -1 +0,0 @@ -coverage diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/parse-asn1/.travis.yml b/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/parse-asn1/.travis.yml deleted file mode 100644 index ea321ccc..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/parse-asn1/.travis.yml +++ /dev/null @@ -1,9 +0,0 @@ -sudo: false -language: node_js -node_js: - - "0.12" - - "iojs" -env: - - TEST_SUITE=standard - - TEST_SUITE=unit -script: "npm run-script $TEST_SUITE" diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/parse-asn1/README.md b/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/parse-asn1/README.md deleted file mode 100644 index 89ed0746..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/parse-asn1/README.md +++ /dev/null @@ -1,8 +0,0 @@ -#parse-asn1 - -[![TRAVIS](https://secure.travis-ci.org/crypto-browserify/parse-asn1.png)](http://travis-ci.org/crypto-browserify/parse-asn1) -[![NPM](http://img.shields.io/npm/v/parse-asn1.svg)](https://www.npmjs.org/package/parse-asn1) - -[![js-standard-style](https://cdn.rawgit.com/feross/standard/master/badge.svg)](https://github.com/feross/standard) - -utility library for parsing asn1 files for use with browserify-sign. diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/parse-asn1/aesid.json b/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/parse-asn1/aesid.json deleted file mode 100644 index 24f653b4..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/parse-asn1/aesid.json +++ /dev/null @@ -1,13 +0,0 @@ -{"2.16.840.1.101.3.4.1.1": "aes-128-ecb", -"2.16.840.1.101.3.4.1.2": "aes-128-cbc", -"2.16.840.1.101.3.4.1.3": "aes-128-ofb", -"2.16.840.1.101.3.4.1.4": "aes-128-cfb", -"2.16.840.1.101.3.4.1.21": "aes-192-ecb", -"2.16.840.1.101.3.4.1.22": "aes-192-cbc", -"2.16.840.1.101.3.4.1.23": "aes-192-ofb", -"2.16.840.1.101.3.4.1.24": "aes-192-cfb", -"2.16.840.1.101.3.4.1.41": "aes-256-ecb", -"2.16.840.1.101.3.4.1.42": "aes-256-cbc", -"2.16.840.1.101.3.4.1.43": "aes-256-ofb", -"2.16.840.1.101.3.4.1.44": "aes-256-cfb" -} \ No newline at end of file diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/parse-asn1/asn1.js b/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/parse-asn1/asn1.js deleted file mode 100644 index cb2fcfce..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/parse-asn1/asn1.js +++ /dev/null @@ -1,117 +0,0 @@ -// from https://github.com/indutny/self-signed/blob/gh-pages/lib/asn1.js -// Fedor, you are amazing. - -var asn1 = require('asn1.js') - -var RSAPrivateKey = asn1.define('RSAPrivateKey', function () { - this.seq().obj( - this.key('version').int(), - this.key('modulus').int(), - this.key('publicExponent').int(), - this.key('privateExponent').int(), - this.key('prime1').int(), - this.key('prime2').int(), - this.key('exponent1').int(), - this.key('exponent2').int(), - this.key('coefficient').int() - ) -}) -exports.RSAPrivateKey = RSAPrivateKey - -var RSAPublicKey = asn1.define('RSAPublicKey', function () { - this.seq().obj( - this.key('modulus').int(), - this.key('publicExponent').int() - ) -}) -exports.RSAPublicKey = RSAPublicKey - -var PublicKey = asn1.define('SubjectPublicKeyInfo', function () { - this.seq().obj( - this.key('algorithm').use(AlgorithmIdentifier), - this.key('subjectPublicKey').bitstr() - ) -}) -exports.PublicKey = PublicKey - -var AlgorithmIdentifier = asn1.define('AlgorithmIdentifier', function () { - this.seq().obj( - this.key('algorithm').objid(), - this.key('none').null_().optional(), - this.key('curve').objid().optional(), - this.key('params').seq().obj( - this.key('p').int(), - this.key('q').int(), - this.key('g').int() - ).optional() - ) -}) - -var PrivateKeyInfo = asn1.define('PrivateKeyInfo', function () { - this.seq().obj( - this.key('version').int(), - this.key('algorithm').use(AlgorithmIdentifier), - this.key('subjectPrivateKey').octstr() - ) -}) -exports.PrivateKey = PrivateKeyInfo -var EncryptedPrivateKeyInfo = asn1.define('EncryptedPrivateKeyInfo', function () { - this.seq().obj( - this.key('algorithm').seq().obj( - this.key('id').objid(), - this.key('decrypt').seq().obj( - this.key('kde').seq().obj( - this.key('id').objid(), - this.key('kdeparams').seq().obj( - this.key('salt').octstr(), - this.key('iters').int() - ) - ), - this.key('cipher').seq().obj( - this.key('algo').objid(), - this.key('iv').octstr() - ) - ) - ), - this.key('subjectPrivateKey').octstr() - ) -}) - -exports.EncryptedPrivateKey = EncryptedPrivateKeyInfo - -var DSAPrivateKey = asn1.define('DSAPrivateKey', function () { - this.seq().obj( - this.key('version').int(), - this.key('p').int(), - this.key('q').int(), - this.key('g').int(), - this.key('pub_key').int(), - this.key('priv_key').int() - ) -}) -exports.DSAPrivateKey = DSAPrivateKey - -exports.DSAparam = asn1.define('DSAparam', function () { - this.int() -}) -var ECPrivateKey = asn1.define('ECPrivateKey', function () { - this.seq().obj( - this.key('version').int(), - this.key('privateKey').octstr(), - this.key('parameters').optional().explicit(0).use(ECParameters), - this.key('publicKey').optional().explicit(1).bitstr() - ) -}) -exports.ECPrivateKey = ECPrivateKey -var ECParameters = asn1.define('ECParameters', function () { - this.choice({ - namedCurve: this.objid() - }) -}) - -exports.signature = asn1.define('signature', function () { - this.seq().obj( - this.key('r').int(), - this.key('s').int() - ) -}) diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/parse-asn1/fixProc.js b/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/parse-asn1/fixProc.js deleted file mode 100644 index 5c4085ee..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/parse-asn1/fixProc.js +++ /dev/null @@ -1,30 +0,0 @@ -// adapted from https://github.com/apatil/pemstrip -var findProc = /Proc-Type: 4,ENCRYPTED\r?\nDEK-Info: AES-((?:128)|(?:192)|(?:256))-CBC,([0-9A-H]+)\r?\n\r?\n([0-9A-z\n\r\+\/\=]+)\r?\n/m -var startRegex = /^-----BEGIN (.*) KEY-----\r?\n/m -var fullRegex = /^-----BEGIN (.*) KEY-----\r?\n([0-9A-z\n\r\+\/\=]+)\r?\n-----END \1 KEY-----$/m -var evp = require('evp_bytestokey') -var ciphers = require('browserify-aes') -module.exports = function (okey, password) { - var key = okey.toString() - var match = key.match(findProc) - var decrypted - if (!match) { - var match2 = key.match(fullRegex) - decrypted = new Buffer(match2[2].replace(/\r?\n/g, ''), 'base64') - } else { - var suite = 'aes' + match[1] - var iv = new Buffer(match[2], 'hex') - var cipherText = new Buffer(match[3].replace(/\r?\n/g, ''), 'base64') - var cipherKey = evp(password, iv.slice(0, 8), parseInt(match[1], 10)).key - var out = [] - var cipher = ciphers.createDecipheriv(suite, cipherKey, iv) - out.push(cipher.update(cipherText)) - out.push(cipher.final()) - decrypted = Buffer.concat(out) - } - var tag = key.match(startRegex)[1] + ' KEY' - return { - tag: tag, - data: decrypted - } -} diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/parse-asn1/index.js b/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/parse-asn1/index.js deleted file mode 100644 index 5cc79677..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/parse-asn1/index.js +++ /dev/null @@ -1,101 +0,0 @@ -var asn1 = require('./asn1') -var aesid = require('./aesid.json') -var fixProc = require('./fixProc') -var ciphers = require('browserify-aes') -var compat = require('pbkdf2') -module.exports = parseKeys - -function parseKeys (buffer) { - var password - if (typeof buffer === 'object' && !Buffer.isBuffer(buffer)) { - password = buffer.passphrase - buffer = buffer.key - } - if (typeof buffer === 'string') { - buffer = new Buffer(buffer) - } - - var stripped = fixProc(buffer, password) - - var type = stripped.tag - var data = stripped.data - var subtype, ndata - switch (type) { - case 'PUBLIC KEY': - ndata = asn1.PublicKey.decode(data, 'der') - subtype = ndata.algorithm.algorithm.join('.') - switch (subtype) { - case '1.2.840.113549.1.1.1': - return asn1.RSAPublicKey.decode(ndata.subjectPublicKey.data, 'der') - case '1.2.840.10045.2.1': - ndata.subjectPrivateKey = ndata.subjectPublicKey - return { - type: 'ec', - data: ndata - } - case '1.2.840.10040.4.1': - ndata.algorithm.params.pub_key = asn1.DSAparam.decode(ndata.subjectPublicKey.data, 'der') - return { - type: 'dsa', - data: ndata.algorithm.params - } - default: throw new Error('unknown key id ' + subtype) - } - throw new Error('unknown key type ' + type) - case 'ENCRYPTED PRIVATE KEY': - data = asn1.EncryptedPrivateKey.decode(data, 'der') - data = decrypt(data, password) - // falls through - case 'PRIVATE KEY': - ndata = asn1.PrivateKey.decode(data, 'der') - subtype = ndata.algorithm.algorithm.join('.') - switch (subtype) { - case '1.2.840.113549.1.1.1': - return asn1.RSAPrivateKey.decode(ndata.subjectPrivateKey, 'der') - case '1.2.840.10045.2.1': - return { - curve: ndata.algorithm.curve, - privateKey: asn1.ECPrivateKey.decode(ndata.subjectPrivateKey, 'der').privateKey - } - case '1.2.840.10040.4.1': - ndata.algorithm.params.priv_key = asn1.DSAparam.decode(ndata.subjectPrivateKey, 'der') - return { - type: 'dsa', - params: ndata.algorithm.params - } - default: throw new Error('unknown key id ' + subtype) - } - throw new Error('unknown key type ' + type) - case 'RSA PUBLIC KEY': - return asn1.RSAPublicKey.decode(data, 'der') - case 'RSA PRIVATE KEY': - return asn1.RSAPrivateKey.decode(data, 'der') - case 'DSA PRIVATE KEY': - return { - type: 'dsa', - params: asn1.DSAPrivateKey.decode(data, 'der') - } - case 'EC PRIVATE KEY': - data = asn1.ECPrivateKey.decode(data, 'der') - return { - curve: data.parameters.value, - privateKey: data.privateKey - } - default: throw new Error('unknown key type ' + type) - } -} -parseKeys.signature = asn1.signature -function decrypt (data, password) { - var salt = data.algorithm.decrypt.kde.kdeparams.salt - var iters = parseInt(data.algorithm.decrypt.kde.kdeparams.iters.toString(), 10) - var algo = aesid[data.algorithm.decrypt.cipher.algo.join('.')] - var iv = data.algorithm.decrypt.cipher.iv - var cipherText = data.subjectPrivateKey - var keylen = parseInt(algo.split('-')[1], 10) / 8 - var key = compat.pbkdf2Sync(password, salt, iters, keylen) - var cipher = ciphers.createDecipheriv(algo, key, iv) - var out = [] - out.push(cipher.update(cipherText)) - out.push(cipher.final()) - return Buffer.concat(out) -} diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/parse-asn1/node_modules/asn1.js/.npmignore b/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/parse-asn1/node_modules/asn1.js/.npmignore deleted file mode 100644 index 3d5af0a0..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/parse-asn1/node_modules/asn1.js/.npmignore +++ /dev/null @@ -1,2 +0,0 @@ -test -rfc diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/parse-asn1/node_modules/asn1.js/README.md b/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/parse-asn1/node_modules/asn1.js/README.md deleted file mode 100644 index 0c571b80..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/parse-asn1/node_modules/asn1.js/README.md +++ /dev/null @@ -1,100 +0,0 @@ -# ASN1.js - -ASN.1 DER Encoder/Decoder and DSL. - -## Example - -Define model: - -```javascript -var asn = require('asn1.js'); - -var Human = asn.define('Human', function() { - this.seq().obj( - this.key('firstName').octstr(), - this.key('lastName').octstr(), - this.key('age').int(), - this.key('gender').enum({ 0: 'male', 1: 'female' }), - this.key('bio').seqof(Bio) - ); -}); - -var Bio = asn.define('Bio', function() { - this.seq().obj( - this.key('time').gentime(), - this.key('description').octstr() - ); -}); -``` - -Encode data: - -```javascript -var output = Human.encode({ - firstName: 'Thomas', - lastName: 'Anderson', - age: 28, - gender: 'male', - bio: [ - { - time: +new Date('31 March 1999'), - description: 'freedom of mind' - } - ] -}, 'der'); -``` - -Decode data: - -```javascript -var human = Human.decode(output, 'der'); -console.log(human); -/* -{ firstName: , - lastName: , - age: 28, - gender: 'male', - bio: - [ { time: 922820400000, - description: } ] } -*/ -``` - -### Partial decode - -Its possible to parse data without stopping on first error. In order to do it, -you should call: - -```javascript -var human = Human.decode(output, 'der', { partial: true }); -console.log(human); -/* -{ result: { ... }, - errors: [ ... ] } -*/ -``` - -#### LICENSE - -This software is licensed under the MIT License. - -Copyright Fedor Indutny, 2013. - -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/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/parse-asn1/node_modules/asn1.js/lib/asn1.js b/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/parse-asn1/node_modules/asn1.js/lib/asn1.js deleted file mode 100644 index 02bbdc1d..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/parse-asn1/node_modules/asn1.js/lib/asn1.js +++ /dev/null @@ -1,9 +0,0 @@ -var asn1 = exports; - -asn1.bignum = require('bn.js'); - -asn1.define = require('./asn1/api').define; -asn1.base = require('./asn1/base'); -asn1.constants = require('./asn1/constants'); -asn1.decoders = require('./asn1/decoders'); -asn1.encoders = require('./asn1/encoders'); diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/parse-asn1/node_modules/asn1.js/lib/asn1/api.js b/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/parse-asn1/node_modules/asn1.js/lib/asn1/api.js deleted file mode 100644 index 7c223cc9..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/parse-asn1/node_modules/asn1.js/lib/asn1/api.js +++ /dev/null @@ -1,61 +0,0 @@ -var asn1 = require('../asn1'); -var inherits = require('inherits'); - -var api = exports; - -api.define = function define(name, body) { - return new Entity(name, body); -}; - -function Entity(name, body) { - this.name = name; - this.body = body; - - this.decoders = {}; - this.encoders = {}; -}; - -Entity.prototype._createNamed = function createNamed(base) { - var named; - try { - named = require('vm').runInThisContext( - '(function ' + this.name + '(entity) {\n' + - ' this._initNamed(entity);\n' + - '})' - ); - } catch (e) { - named = function (entity) { - this._initNamed(entity); - }; - } - inherits(named, base); - named.prototype._initNamed = function initnamed(entity) { - base.call(this, entity); - }; - - return new named(this); -}; - -Entity.prototype._getDecoder = function _getDecoder(enc) { - enc = enc || 'der'; - // Lazily create decoder - if (!this.decoders.hasOwnProperty(enc)) - this.decoders[enc] = this._createNamed(asn1.decoders[enc]); - return this.decoders[enc]; -}; - -Entity.prototype.decode = function decode(data, enc, options) { - return this._getDecoder(enc).decode(data, options); -}; - -Entity.prototype._getEncoder = function _getEncoder(enc) { - enc = enc || 'der'; - // Lazily create encoder - if (!this.encoders.hasOwnProperty(enc)) - this.encoders[enc] = this._createNamed(asn1.encoders[enc]); - return this.encoders[enc]; -}; - -Entity.prototype.encode = function encode(data, enc, /* internal */ reporter) { - return this._getEncoder(enc).encode(data, reporter); -}; diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/parse-asn1/node_modules/asn1.js/lib/asn1/base/buffer.js b/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/parse-asn1/node_modules/asn1.js/lib/asn1/base/buffer.js deleted file mode 100644 index bc826e84..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/parse-asn1/node_modules/asn1.js/lib/asn1/base/buffer.js +++ /dev/null @@ -1,116 +0,0 @@ -var inherits = require('inherits'); -var Reporter = require('../base').Reporter; -var Buffer = require('buffer').Buffer; - -function DecoderBuffer(base, options) { - Reporter.call(this, options); - if (!Buffer.isBuffer(base)) { - this.error('Input not Buffer'); - return; - } - - this.base = base; - this.offset = 0; - this.length = base.length; -} -inherits(DecoderBuffer, Reporter); -exports.DecoderBuffer = DecoderBuffer; - -DecoderBuffer.prototype.save = function save() { - return { offset: this.offset, reporter: Reporter.prototype.save.call(this) }; -}; - -DecoderBuffer.prototype.restore = function restore(save) { - // Return skipped data - var res = new DecoderBuffer(this.base); - res.offset = save.offset; - res.length = this.offset; - - this.offset = save.offset; - Reporter.prototype.restore.call(this, save.reporter); - - return res; -}; - -DecoderBuffer.prototype.isEmpty = function isEmpty() { - return this.offset === this.length; -}; - -DecoderBuffer.prototype.readUInt8 = function readUInt8(fail) { - if (this.offset + 1 <= this.length) - return this.base.readUInt8(this.offset++, true); - else - return this.error(fail || 'DecoderBuffer overrun'); -} - -DecoderBuffer.prototype.skip = function skip(bytes, fail) { - if (!(this.offset + bytes <= this.length)) - return this.error(fail || 'DecoderBuffer overrun'); - - var res = new DecoderBuffer(this.base); - - // Share reporter state - res._reporterState = this._reporterState; - - res.offset = this.offset; - res.length = this.offset + bytes; - this.offset += bytes; - return res; -} - -DecoderBuffer.prototype.raw = function raw(save) { - return this.base.slice(save ? save.offset : this.offset, this.length); -} - -function EncoderBuffer(value, reporter) { - if (Array.isArray(value)) { - this.length = 0; - this.value = value.map(function(item) { - if (!(item instanceof EncoderBuffer)) - item = new EncoderBuffer(item, reporter); - this.length += item.length; - return item; - }, this); - } else if (typeof value === 'number') { - if (!(0 <= value && value <= 0xff)) - return reporter.error('non-byte EncoderBuffer value'); - this.value = value; - this.length = 1; - } else if (typeof value === 'string') { - this.value = value; - this.length = Buffer.byteLength(value); - } else if (Buffer.isBuffer(value)) { - this.value = value; - this.length = value.length; - } else { - return reporter.error('Unsupported type: ' + typeof value); - } -} -exports.EncoderBuffer = EncoderBuffer; - -EncoderBuffer.prototype.join = function join(out, offset) { - if (!out) - out = new Buffer(this.length); - if (!offset) - offset = 0; - - if (this.length === 0) - return out; - - if (Array.isArray(this.value)) { - this.value.forEach(function(item) { - item.join(out, offset); - offset += item.length; - }); - } else { - if (typeof this.value === 'number') - out[offset] = this.value; - else if (typeof this.value === 'string') - out.write(this.value, offset); - else if (Buffer.isBuffer(this.value)) - this.value.copy(out, offset); - offset += this.length; - } - - return out; -}; diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/parse-asn1/node_modules/asn1.js/lib/asn1/base/index.js b/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/parse-asn1/node_modules/asn1.js/lib/asn1/base/index.js deleted file mode 100644 index 935abde0..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/parse-asn1/node_modules/asn1.js/lib/asn1/base/index.js +++ /dev/null @@ -1,6 +0,0 @@ -var base = exports; - -base.Reporter = require('./reporter').Reporter; -base.DecoderBuffer = require('./buffer').DecoderBuffer; -base.EncoderBuffer = require('./buffer').EncoderBuffer; -base.Node = require('./node'); diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/parse-asn1/node_modules/asn1.js/lib/asn1/base/node.js b/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/parse-asn1/node_modules/asn1.js/lib/asn1/base/node.js deleted file mode 100644 index 7b26bd88..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/parse-asn1/node_modules/asn1.js/lib/asn1/base/node.js +++ /dev/null @@ -1,634 +0,0 @@ -var Reporter = require('../base').Reporter; -var EncoderBuffer = require('../base').EncoderBuffer; -var DecoderBuffer = require('../base').DecoderBuffer; -var assert = require('minimalistic-assert'); - -// Supported tags -var tags = [ - 'seq', 'seqof', 'set', 'setof', 'objid', 'bool', - 'gentime', 'utctime', 'null_', 'enum', 'int', 'objDesc', - 'bitstr', 'bmpstr', 'charstr', 'genstr', 'graphstr', 'ia5str', 'iso646str', - 'numstr', 'octstr', 'printstr', 't61str', 'unistr', 'utf8str', 'videostr' -]; - -// Public methods list -var methods = [ - 'key', 'obj', 'use', 'optional', 'explicit', 'implicit', 'def', 'choice', - 'any', 'contains' -].concat(tags); - -// Overrided methods list -var overrided = [ - '_peekTag', '_decodeTag', '_use', - '_decodeStr', '_decodeObjid', '_decodeTime', - '_decodeNull', '_decodeInt', '_decodeBool', '_decodeList', - - '_encodeComposite', '_encodeStr', '_encodeObjid', '_encodeTime', - '_encodeNull', '_encodeInt', '_encodeBool' -]; - -function Node(enc, parent) { - var state = {}; - this._baseState = state; - - state.enc = enc; - - state.parent = parent || null; - state.children = null; - - // State - state.tag = null; - state.args = null; - state.reverseArgs = null; - state.choice = null; - state.optional = false; - state.any = false; - state.obj = false; - state.use = null; - state.useDecoder = null; - state.key = null; - state['default'] = null; - state.explicit = null; - state.implicit = null; - state.contains = null; - - // Should create new instance on each method - if (!state.parent) { - state.children = []; - this._wrap(); - } -} -module.exports = Node; - -var stateProps = [ - 'enc', 'parent', 'children', 'tag', 'args', 'reverseArgs', 'choice', - 'optional', 'any', 'obj', 'use', 'alteredUse', 'key', 'default', 'explicit', - 'implicit', 'contains' -]; - -Node.prototype.clone = function clone() { - var state = this._baseState; - var cstate = {}; - stateProps.forEach(function(prop) { - cstate[prop] = state[prop]; - }); - var res = new this.constructor(cstate.parent); - res._baseState = cstate; - return res; -}; - -Node.prototype._wrap = function wrap() { - var state = this._baseState; - methods.forEach(function(method) { - this[method] = function _wrappedMethod() { - var clone = new this.constructor(this); - state.children.push(clone); - return clone[method].apply(clone, arguments); - }; - }, this); -}; - -Node.prototype._init = function init(body) { - var state = this._baseState; - - assert(state.parent === null); - body.call(this); - - // Filter children - state.children = state.children.filter(function(child) { - return child._baseState.parent === this; - }, this); - assert.equal(state.children.length, 1, 'Root node can have only one child'); -}; - -Node.prototype._useArgs = function useArgs(args) { - var state = this._baseState; - - // Filter children and args - var children = args.filter(function(arg) { - return arg instanceof this.constructor; - }, this); - args = args.filter(function(arg) { - return !(arg instanceof this.constructor); - }, this); - - if (children.length !== 0) { - assert(state.children === null); - state.children = children; - - // Replace parent to maintain backward link - children.forEach(function(child) { - child._baseState.parent = this; - }, this); - } - if (args.length !== 0) { - assert(state.args === null); - state.args = args; - state.reverseArgs = args.map(function(arg) { - if (typeof arg !== 'object' || arg.constructor !== Object) - return arg; - - var res = {}; - Object.keys(arg).forEach(function(key) { - if (key == (key | 0)) - key |= 0; - var value = arg[key]; - res[value] = key; - }); - return res; - }); - } -}; - -// -// Overrided methods -// - -overrided.forEach(function(method) { - Node.prototype[method] = function _overrided() { - var state = this._baseState; - throw new Error(method + ' not implemented for encoding: ' + state.enc); - }; -}); - -// -// Public methods -// - -tags.forEach(function(tag) { - Node.prototype[tag] = function _tagMethod() { - var state = this._baseState; - var args = Array.prototype.slice.call(arguments); - - assert(state.tag === null); - state.tag = tag; - - this._useArgs(args); - - return this; - }; -}); - -Node.prototype.use = function use(item) { - assert(item); - var state = this._baseState; - - assert(state.use === null); - state.use = item; - - return this; -}; - -Node.prototype.optional = function optional() { - var state = this._baseState; - - state.optional = true; - - return this; -}; - -Node.prototype.def = function def(val) { - var state = this._baseState; - - assert(state['default'] === null); - state['default'] = val; - state.optional = true; - - return this; -}; - -Node.prototype.explicit = function explicit(num) { - var state = this._baseState; - - assert(state.explicit === null && state.implicit === null); - state.explicit = num; - - return this; -}; - -Node.prototype.implicit = function implicit(num) { - var state = this._baseState; - - assert(state.explicit === null && state.implicit === null); - state.implicit = num; - - return this; -}; - -Node.prototype.obj = function obj() { - var state = this._baseState; - var args = Array.prototype.slice.call(arguments); - - state.obj = true; - - if (args.length !== 0) - this._useArgs(args); - - return this; -}; - -Node.prototype.key = function key(newKey) { - var state = this._baseState; - - assert(state.key === null); - state.key = newKey; - - return this; -}; - -Node.prototype.any = function any() { - var state = this._baseState; - - state.any = true; - - return this; -}; - -Node.prototype.choice = function choice(obj) { - var state = this._baseState; - - assert(state.choice === null); - state.choice = obj; - this._useArgs(Object.keys(obj).map(function(key) { - return obj[key]; - })); - - return this; -}; - -Node.prototype.contains = function contains(item) { - var state = this._baseState; - - assert(state.use === null); - state.contains = item; - - return this; -}; - -// -// Decoding -// - -Node.prototype._decode = function decode(input, options) { - var state = this._baseState; - - // Decode root node - if (state.parent === null) - return input.wrapResult(state.children[0]._decode(input, options)); - - var result = state['default']; - var present = true; - - var prevKey = null; - if (state.key !== null) - prevKey = input.enterKey(state.key); - - // Check if tag is there - if (state.optional) { - var tag = null; - if (state.explicit !== null) - tag = state.explicit; - else if (state.implicit !== null) - tag = state.implicit; - else if (state.tag !== null) - tag = state.tag; - - if (tag === null && !state.any) { - // Trial and Error - var save = input.save(); - try { - if (state.choice === null) - this._decodeGeneric(state.tag, input, options); - else - this._decodeChoice(input, options); - present = true; - } catch (e) { - present = false; - } - input.restore(save); - } else { - present = this._peekTag(input, tag, state.any); - - if (input.isError(present)) - return present; - } - } - - // Push object on stack - var prevObj; - if (state.obj && present) - prevObj = input.enterObject(); - - if (present) { - // Unwrap explicit values - if (state.explicit !== null) { - var explicit = this._decodeTag(input, state.explicit); - if (input.isError(explicit)) - return explicit; - input = explicit; - } - - var start = input.offset; - - // Unwrap implicit and normal values - if (state.use === null && state.choice === null) { - if (state.any) - var save = input.save(); - var body = this._decodeTag( - input, - state.implicit !== null ? state.implicit : state.tag, - state.any - ); - if (input.isError(body)) - return body; - - if (state.any) - result = input.raw(save); - else - input = body; - } - - if (options && options.track && state.tag !== null) - options.track(input.path(), start, input.length, 'tagged'); - - if (options && options.track && state.tag !== null) - options.track(input.path(), input.offset, input.length, 'content'); - - // Select proper method for tag - if (state.any) - result = result; - else if (state.choice === null) - result = this._decodeGeneric(state.tag, input, options); - else - result = this._decodeChoice(input, options); - - if (input.isError(result)) - return result; - - // Decode children - if (!state.any && state.choice === null && state.children !== null) { - state.children.forEach(function decodeChildren(child) { - // NOTE: We are ignoring errors here, to let parser continue with other - // parts of encoded data - child._decode(input, options); - }); - } - - // Decode contained/encoded by schema, only in bit or octet strings - if (state.contains && (state.tag === 'octstr' || state.tag === 'bitstr')) { - var data = new DecoderBuffer(result); - result = this._getUse(state.contains, input._reporterState.obj) - ._decode(data, options); - } - } - - // Pop object - if (state.obj && present) - result = input.leaveObject(prevObj); - - // Set key - if (state.key !== null && (result !== null || present === true)) - input.leaveKey(prevKey, state.key, result); - else if (prevKey !== null) - input.exitKey(prevKey); - - return result; -}; - -Node.prototype._decodeGeneric = function decodeGeneric(tag, input, options) { - var state = this._baseState; - - if (tag === 'seq' || tag === 'set') - return null; - if (tag === 'seqof' || tag === 'setof') - return this._decodeList(input, tag, state.args[0], options); - else if (/str$/.test(tag)) - return this._decodeStr(input, tag, options); - else if (tag === 'objid' && state.args) - return this._decodeObjid(input, state.args[0], state.args[1], options); - else if (tag === 'objid') - return this._decodeObjid(input, null, null, options); - else if (tag === 'gentime' || tag === 'utctime') - return this._decodeTime(input, tag, options); - else if (tag === 'null_') - return this._decodeNull(input, options); - else if (tag === 'bool') - return this._decodeBool(input, options); - else if (tag === 'objDesc') - return this._decodeStr(input, tag, options); - else if (tag === 'int' || tag === 'enum') - return this._decodeInt(input, state.args && state.args[0], options); - - if (state.use !== null) { - return this._getUse(state.use, input._reporterState.obj) - ._decode(input, options); - } else { - return input.error('unknown tag: ' + tag); - } -}; - -Node.prototype._getUse = function _getUse(entity, obj) { - - var state = this._baseState; - // Create altered use decoder if implicit is set - state.useDecoder = this._use(entity, obj); - assert(state.useDecoder._baseState.parent === null); - state.useDecoder = state.useDecoder._baseState.children[0]; - if (state.implicit !== state.useDecoder._baseState.implicit) { - state.useDecoder = state.useDecoder.clone(); - state.useDecoder._baseState.implicit = state.implicit; - } - return state.useDecoder; -}; - -Node.prototype._decodeChoice = function decodeChoice(input, options) { - var state = this._baseState; - var result = null; - var match = false; - - Object.keys(state.choice).some(function(key) { - var save = input.save(); - var node = state.choice[key]; - try { - var value = node._decode(input, options); - if (input.isError(value)) - return false; - - result = { type: key, value: value }; - match = true; - } catch (e) { - input.restore(save); - return false; - } - return true; - }, this); - - if (!match) - return input.error('Choice not matched'); - - return result; -}; - -// -// Encoding -// - -Node.prototype._createEncoderBuffer = function createEncoderBuffer(data) { - return new EncoderBuffer(data, this.reporter); -}; - -Node.prototype._encode = function encode(data, reporter, parent) { - var state = this._baseState; - if (state['default'] !== null && state['default'] === data) - return; - - var result = this._encodeValue(data, reporter, parent); - if (result === undefined) - return; - - if (this._skipDefault(result, reporter, parent)) - return; - - return result; -}; - -Node.prototype._encodeValue = function encode(data, reporter, parent) { - var state = this._baseState; - - // Decode root node - if (state.parent === null) - return state.children[0]._encode(data, reporter || new Reporter()); - - var result = null; - - // Set reporter to share it with a child class - this.reporter = reporter; - - // Check if data is there - if (state.optional && data === undefined) { - if (state['default'] !== null) - data = state['default'] - else - return; - } - - // Encode children first - var content = null; - var primitive = false; - if (state.any) { - // Anything that was given is translated to buffer - result = this._createEncoderBuffer(data); - } else if (state.choice) { - result = this._encodeChoice(data, reporter); - } else if (state.contains) { - content = this._getUse(state.contains, parent)._encode(data, reporter); - primitive = true; - } else if (state.children) { - content = state.children.map(function(child) { - if (child._baseState.tag === 'null_') - return child._encode(null, reporter, data); - - if (child._baseState.key === null) - return reporter.error('Child should have a key'); - var prevKey = reporter.enterKey(child._baseState.key); - - if (typeof data !== 'object') - return reporter.error('Child expected, but input is not object'); - - var res = child._encode(data[child._baseState.key], reporter, data); - reporter.leaveKey(prevKey); - - return res; - }, this).filter(function(child) { - return child; - }); - content = this._createEncoderBuffer(content); - } else { - if (state.tag === 'seqof' || state.tag === 'setof') { - // TODO(indutny): this should be thrown on DSL level - if (!(state.args && state.args.length === 1)) - return reporter.error('Too many args for : ' + state.tag); - - if (!Array.isArray(data)) - return reporter.error('seqof/setof, but data is not Array'); - - var child = this.clone(); - child._baseState.implicit = null; - content = this._createEncoderBuffer(data.map(function(item) { - var state = this._baseState; - - return this._getUse(state.args[0], data)._encode(item, reporter); - }, child)); - } else if (state.use !== null) { - result = this._getUse(state.use, parent)._encode(data, reporter); - } else { - content = this._encodePrimitive(state.tag, data); - primitive = true; - } - } - - // Encode data itself - var result; - if (!state.any && state.choice === null) { - var tag = state.implicit !== null ? state.implicit : state.tag; - var cls = state.implicit === null ? 'universal' : 'context'; - - if (tag === null) { - if (state.use === null) - reporter.error('Tag could be ommited only for .use()'); - } else { - if (state.use === null) - result = this._encodeComposite(tag, primitive, cls, content); - } - } - - // Wrap in explicit - if (state.explicit !== null) - result = this._encodeComposite(state.explicit, false, 'context', result); - - return result; -}; - -Node.prototype._encodeChoice = function encodeChoice(data, reporter) { - var state = this._baseState; - - var node = state.choice[data.type]; - if (!node) { - assert( - false, - data.type + ' not found in ' + - JSON.stringify(Object.keys(state.choice))); - } - return node._encode(data.value, reporter); -}; - -Node.prototype._encodePrimitive = function encodePrimitive(tag, data) { - var state = this._baseState; - - if (/str$/.test(tag)) - return this._encodeStr(data, tag); - else if (tag === 'objid' && state.args) - return this._encodeObjid(data, state.reverseArgs[0], state.args[1]); - else if (tag === 'objid') - return this._encodeObjid(data, null, null); - else if (tag === 'gentime' || tag === 'utctime') - return this._encodeTime(data, tag); - else if (tag === 'null_') - return this._encodeNull(); - else if (tag === 'int' || tag === 'enum') - return this._encodeInt(data, state.args && state.reverseArgs[0]); - else if (tag === 'bool') - return this._encodeBool(data); - else if (tag === 'objDesc') - return this._encodeStr(data, tag); - else - throw new Error('Unsupported tag: ' + tag); -}; - -Node.prototype._isNumstr = function isNumstr(str) { - return /^[0-9 ]*$/.test(str); -}; - -Node.prototype._isPrintstr = function isPrintstr(str) { - return /^[A-Za-z0-9 '\(\)\+,\-\.\/:=\?]*$/.test(str); -}; diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/parse-asn1/node_modules/asn1.js/lib/asn1/base/reporter.js b/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/parse-asn1/node_modules/asn1.js/lib/asn1/base/reporter.js deleted file mode 100644 index ec8b8b82..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/parse-asn1/node_modules/asn1.js/lib/asn1/base/reporter.js +++ /dev/null @@ -1,121 +0,0 @@ -var inherits = require('inherits'); - -function Reporter(options) { - this._reporterState = { - obj: null, - path: [], - options: options || {}, - errors: [] - }; -} -exports.Reporter = Reporter; - -Reporter.prototype.isError = function isError(obj) { - return obj instanceof ReporterError; -}; - -Reporter.prototype.save = function save() { - var state = this._reporterState; - - return { obj: state.obj, pathLen: state.path.length }; -}; - -Reporter.prototype.restore = function restore(data) { - var state = this._reporterState; - - state.obj = data.obj; - state.path = state.path.slice(0, data.pathLen); -}; - -Reporter.prototype.enterKey = function enterKey(key) { - return this._reporterState.path.push(key); -}; - -Reporter.prototype.exitKey = function exitKey(index) { - var state = this._reporterState; - - state.path = state.path.slice(0, index - 1); -}; - -Reporter.prototype.leaveKey = function leaveKey(index, key, value) { - var state = this._reporterState; - - this.exitKey(index); - if (state.obj !== null) - state.obj[key] = value; -}; - -Reporter.prototype.path = function path() { - return this._reporterState.path.join('/'); -}; - -Reporter.prototype.enterObject = function enterObject() { - var state = this._reporterState; - - var prev = state.obj; - state.obj = {}; - return prev; -}; - -Reporter.prototype.leaveObject = function leaveObject(prev) { - var state = this._reporterState; - - var now = state.obj; - state.obj = prev; - return now; -}; - -Reporter.prototype.error = function error(msg) { - var err; - var state = this._reporterState; - - var inherited = msg instanceof ReporterError; - if (inherited) { - err = msg; - } else { - err = new ReporterError(state.path.map(function(elem) { - return '[' + JSON.stringify(elem) + ']'; - }).join(''), msg.message || msg, msg.stack); - } - - if (!state.options.partial) - throw err; - - if (!inherited) - state.errors.push(err); - - return err; -}; - -Reporter.prototype.wrapResult = function wrapResult(result) { - var state = this._reporterState; - if (!state.options.partial) - return result; - - return { - result: this.isError(result) ? null : result, - errors: state.errors - }; -}; - -function ReporterError(path, msg) { - this.path = path; - this.rethrow(msg); -}; -inherits(ReporterError, Error); - -ReporterError.prototype.rethrow = function rethrow(msg) { - this.message = msg + ' at: ' + (this.path || '(shallow)'); - if (Error.captureStackTrace) - Error.captureStackTrace(this, ReporterError); - - if (!this.stack) { - try { - // IE only adds stack when thrown - throw new Error(this.message); - } catch (e) { - this.stack = e.stack; - } - } - return this; -}; diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/parse-asn1/node_modules/asn1.js/lib/asn1/constants/der.js b/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/parse-asn1/node_modules/asn1.js/lib/asn1/constants/der.js deleted file mode 100644 index 907dd397..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/parse-asn1/node_modules/asn1.js/lib/asn1/constants/der.js +++ /dev/null @@ -1,42 +0,0 @@ -var constants = require('../constants'); - -exports.tagClass = { - 0: 'universal', - 1: 'application', - 2: 'context', - 3: 'private' -}; -exports.tagClassByName = constants._reverse(exports.tagClass); - -exports.tag = { - 0x00: 'end', - 0x01: 'bool', - 0x02: 'int', - 0x03: 'bitstr', - 0x04: 'octstr', - 0x05: 'null_', - 0x06: 'objid', - 0x07: 'objDesc', - 0x08: 'external', - 0x09: 'real', - 0x0a: 'enum', - 0x0b: 'embed', - 0x0c: 'utf8str', - 0x0d: 'relativeOid', - 0x10: 'seq', - 0x11: 'set', - 0x12: 'numstr', - 0x13: 'printstr', - 0x14: 't61str', - 0x15: 'videostr', - 0x16: 'ia5str', - 0x17: 'utctime', - 0x18: 'gentime', - 0x19: 'graphstr', - 0x1a: 'iso646str', - 0x1b: 'genstr', - 0x1c: 'unistr', - 0x1d: 'charstr', - 0x1e: 'bmpstr' -}; -exports.tagByName = constants._reverse(exports.tag); diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/parse-asn1/node_modules/asn1.js/lib/asn1/constants/index.js b/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/parse-asn1/node_modules/asn1.js/lib/asn1/constants/index.js deleted file mode 100644 index c44e3251..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/parse-asn1/node_modules/asn1.js/lib/asn1/constants/index.js +++ /dev/null @@ -1,19 +0,0 @@ -var constants = exports; - -// Helper -constants._reverse = function reverse(map) { - var res = {}; - - Object.keys(map).forEach(function(key) { - // Convert key to integer if it is stringified - if ((key | 0) == key) - key = key | 0; - - var value = map[key]; - res[value] = key; - }); - - return res; -}; - -constants.der = require('./der'); diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/parse-asn1/node_modules/asn1.js/lib/asn1/decoders/der.js b/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/parse-asn1/node_modules/asn1.js/lib/asn1/decoders/der.js deleted file mode 100644 index 79a60acc..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/parse-asn1/node_modules/asn1.js/lib/asn1/decoders/der.js +++ /dev/null @@ -1,324 +0,0 @@ -var inherits = require('inherits'); - -var asn1 = require('../../asn1'); -var base = asn1.base; -var bignum = asn1.bignum; - -// Import DER constants -var der = asn1.constants.der; - -function DERDecoder(entity) { - this.enc = 'der'; - this.name = entity.name; - this.entity = entity; - - // Construct base tree - this.tree = new DERNode(); - this.tree._init(entity.body); -}; -module.exports = DERDecoder; - -DERDecoder.prototype.decode = function decode(data, options) { - if (!(data instanceof base.DecoderBuffer)) - data = new base.DecoderBuffer(data, options); - - return this.tree._decode(data, options); -}; - -// Tree methods - -function DERNode(parent) { - base.Node.call(this, 'der', parent); -} -inherits(DERNode, base.Node); - -DERNode.prototype._peekTag = function peekTag(buffer, tag, any) { - if (buffer.isEmpty()) - return false; - - var state = buffer.save(); - var decodedTag = derDecodeTag(buffer, 'Failed to peek tag: "' + tag + '"'); - if (buffer.isError(decodedTag)) - return decodedTag; - - buffer.restore(state); - - return decodedTag.tag === tag || decodedTag.tagStr === tag || - (decodedTag.tagStr + 'of') === tag || any; -}; - -DERNode.prototype._decodeTag = function decodeTag(buffer, tag, any) { - var decodedTag = derDecodeTag(buffer, - 'Failed to decode tag of "' + tag + '"'); - if (buffer.isError(decodedTag)) - return decodedTag; - - var len = derDecodeLen(buffer, - decodedTag.primitive, - 'Failed to get length of "' + tag + '"'); - - // Failure - if (buffer.isError(len)) - return len; - - if (!any && - decodedTag.tag !== tag && - decodedTag.tagStr !== tag && - decodedTag.tagStr + 'of' !== tag) { - return buffer.error('Failed to match tag: "' + tag + '"'); - } - - if (decodedTag.primitive || len !== null) - return buffer.skip(len, 'Failed to match body of: "' + tag + '"'); - - // Indefinite length... find END tag - var state = buffer.save(); - var res = this._skipUntilEnd( - buffer, - 'Failed to skip indefinite length body: "' + this.tag + '"'); - if (buffer.isError(res)) - return res; - - len = buffer.offset - state.offset; - buffer.restore(state); - return buffer.skip(len, 'Failed to match body of: "' + tag + '"'); -}; - -DERNode.prototype._skipUntilEnd = function skipUntilEnd(buffer, fail) { - while (true) { - var tag = derDecodeTag(buffer, fail); - if (buffer.isError(tag)) - return tag; - var len = derDecodeLen(buffer, tag.primitive, fail); - if (buffer.isError(len)) - return len; - - var res; - if (tag.primitive || len !== null) - res = buffer.skip(len) - else - res = this._skipUntilEnd(buffer, fail); - - // Failure - if (buffer.isError(res)) - return res; - - if (tag.tagStr === 'end') - break; - } -}; - -DERNode.prototype._decodeList = function decodeList(buffer, tag, decoder, - options) { - var result = []; - while (!buffer.isEmpty()) { - var possibleEnd = this._peekTag(buffer, 'end'); - if (buffer.isError(possibleEnd)) - return possibleEnd; - - var res = decoder.decode(buffer, 'der', options); - if (buffer.isError(res) && possibleEnd) - break; - result.push(res); - } - return result; -}; - -DERNode.prototype._decodeStr = function decodeStr(buffer, tag) { - if (tag === 'bitstr') { - var unused = buffer.readUInt8(); - if (buffer.isError(unused)) - return unused; - return { unused: unused, data: buffer.raw() }; - } else if (tag === 'bmpstr') { - var raw = buffer.raw(); - if (raw.length % 2 === 1) - return buffer.error('Decoding of string type: bmpstr length mismatch'); - - var str = ''; - for (var i = 0; i < raw.length / 2; i++) { - str += String.fromCharCode(raw.readUInt16BE(i * 2)); - } - return str; - } else if (tag === 'numstr') { - var numstr = buffer.raw().toString('ascii'); - if (!this._isNumstr(numstr)) { - return buffer.error('Decoding of string type: ' + - 'numstr unsupported characters'); - } - return numstr; - } else if (tag === 'octstr') { - return buffer.raw(); - } else if (tag === 'objDesc') { - return buffer.raw(); - } else if (tag === 'printstr') { - var printstr = buffer.raw().toString('ascii'); - if (!this._isPrintstr(printstr)) { - return buffer.error('Decoding of string type: ' + - 'printstr unsupported characters'); - } - return printstr; - } else if (/str$/.test(tag)) { - return buffer.raw().toString(); - } else { - return buffer.error('Decoding of string type: ' + tag + ' unsupported'); - } -}; - -DERNode.prototype._decodeObjid = function decodeObjid(buffer, values, relative) { - var result; - var identifiers = []; - var ident = 0; - while (!buffer.isEmpty()) { - var subident = buffer.readUInt8(); - ident <<= 7; - ident |= subident & 0x7f; - if ((subident & 0x80) === 0) { - identifiers.push(ident); - ident = 0; - } - } - if (subident & 0x80) - identifiers.push(ident); - - var first = (identifiers[0] / 40) | 0; - var second = identifiers[0] % 40; - - if (relative) - result = identifiers; - else - result = [first, second].concat(identifiers.slice(1)); - - if (values) { - var tmp = values[result.join(' ')]; - if (tmp === undefined) - tmp = values[result.join('.')]; - if (tmp !== undefined) - result = tmp; - } - - return result; -}; - -DERNode.prototype._decodeTime = function decodeTime(buffer, tag) { - var str = buffer.raw().toString(); - if (tag === 'gentime') { - var year = str.slice(0, 4) | 0; - var mon = str.slice(4, 6) | 0; - var day = str.slice(6, 8) | 0; - var hour = str.slice(8, 10) | 0; - var min = str.slice(10, 12) | 0; - var sec = str.slice(12, 14) | 0; - } else if (tag === 'utctime') { - var year = str.slice(0, 2) | 0; - var mon = str.slice(2, 4) | 0; - var day = str.slice(4, 6) | 0; - var hour = str.slice(6, 8) | 0; - var min = str.slice(8, 10) | 0; - var sec = str.slice(10, 12) | 0; - if (year < 70) - year = 2000 + year; - else - year = 1900 + year; - } else { - return buffer.error('Decoding ' + tag + ' time is not supported yet'); - } - - return Date.UTC(year, mon - 1, day, hour, min, sec, 0); -}; - -DERNode.prototype._decodeNull = function decodeNull(buffer) { - return null; -}; - -DERNode.prototype._decodeBool = function decodeBool(buffer) { - var res = buffer.readUInt8(); - if (buffer.isError(res)) - return res; - else - return res !== 0; -}; - -DERNode.prototype._decodeInt = function decodeInt(buffer, values) { - // Bigint, return as it is (assume big endian) - var raw = buffer.raw(); - var res = new bignum(raw); - - if (values) - res = values[res.toString(10)] || res; - - return res; -}; - -DERNode.prototype._use = function use(entity, obj) { - if (typeof entity === 'function') - entity = entity(obj); - return entity._getDecoder('der').tree; -}; - -// Utility methods - -function derDecodeTag(buf, fail) { - var tag = buf.readUInt8(fail); - if (buf.isError(tag)) - return tag; - - var cls = der.tagClass[tag >> 6]; - var primitive = (tag & 0x20) === 0; - - // Multi-octet tag - load - if ((tag & 0x1f) === 0x1f) { - var oct = tag; - tag = 0; - while ((oct & 0x80) === 0x80) { - oct = buf.readUInt8(fail); - if (buf.isError(oct)) - return oct; - - tag <<= 7; - tag |= oct & 0x7f; - } - } else { - tag &= 0x1f; - } - var tagStr = der.tag[tag]; - - return { - cls: cls, - primitive: primitive, - tag: tag, - tagStr: tagStr - }; -} - -function derDecodeLen(buf, primitive, fail) { - var len = buf.readUInt8(fail); - if (buf.isError(len)) - return len; - - // Indefinite form - if (!primitive && len === 0x80) - return null; - - // Definite form - if ((len & 0x80) === 0) { - // Short form - return len; - } - - // Long form - var num = len & 0x7f; - if (num > 4) - return buf.error('length octect is too long'); - - len = 0; - for (var i = 0; i < num; i++) { - len <<= 8; - var j = buf.readUInt8(fail); - if (buf.isError(j)) - return j; - len |= j; - } - - return len; -} diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/parse-asn1/node_modules/asn1.js/lib/asn1/decoders/index.js b/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/parse-asn1/node_modules/asn1.js/lib/asn1/decoders/index.js deleted file mode 100644 index e2583aa8..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/parse-asn1/node_modules/asn1.js/lib/asn1/decoders/index.js +++ /dev/null @@ -1,4 +0,0 @@ -var decoders = exports; - -decoders.der = require('./der'); -decoders.pem = require('./pem'); diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/parse-asn1/node_modules/asn1.js/lib/asn1/decoders/pem.js b/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/parse-asn1/node_modules/asn1.js/lib/asn1/decoders/pem.js deleted file mode 100644 index 301059ca..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/parse-asn1/node_modules/asn1.js/lib/asn1/decoders/pem.js +++ /dev/null @@ -1,49 +0,0 @@ -var inherits = require('inherits'); -var Buffer = require('buffer').Buffer; - -var DERDecoder = require('./der'); - -function PEMDecoder(entity) { - DERDecoder.call(this, entity); - this.enc = 'pem'; -}; -inherits(PEMDecoder, DERDecoder); -module.exports = PEMDecoder; - -PEMDecoder.prototype.decode = function decode(data, options) { - var lines = data.toString().split(/[\r\n]+/g); - - var label = options.label.toUpperCase(); - - var re = /^-----(BEGIN|END) ([^-]+)-----$/; - var start = -1; - var end = -1; - for (var i = 0; i < lines.length; i++) { - var match = lines[i].match(re); - if (match === null) - continue; - - if (match[2] !== label) - continue; - - if (start === -1) { - if (match[1] !== 'BEGIN') - break; - start = i; - } else { - if (match[1] !== 'END') - break; - end = i; - break; - } - } - if (start === -1 || end === -1) - throw new Error('PEM section not found for: ' + label); - - var base64 = lines.slice(start + 1, end).join(''); - // Remove excessive symbols - base64.replace(/[^a-z0-9\+\/=]+/gi, ''); - - var input = new Buffer(base64, 'base64'); - return DERDecoder.prototype.decode.call(this, input, options); -}; diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/parse-asn1/node_modules/asn1.js/lib/asn1/encoders/der.js b/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/parse-asn1/node_modules/asn1.js/lib/asn1/encoders/der.js deleted file mode 100644 index 721f8022..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/parse-asn1/node_modules/asn1.js/lib/asn1/encoders/der.js +++ /dev/null @@ -1,295 +0,0 @@ -var inherits = require('inherits'); -var Buffer = require('buffer').Buffer; - -var asn1 = require('../../asn1'); -var base = asn1.base; - -// Import DER constants -var der = asn1.constants.der; - -function DEREncoder(entity) { - this.enc = 'der'; - this.name = entity.name; - this.entity = entity; - - // Construct base tree - this.tree = new DERNode(); - this.tree._init(entity.body); -}; -module.exports = DEREncoder; - -DEREncoder.prototype.encode = function encode(data, reporter) { - return this.tree._encode(data, reporter).join(); -}; - -// Tree methods - -function DERNode(parent) { - base.Node.call(this, 'der', parent); -} -inherits(DERNode, base.Node); - -DERNode.prototype._encodeComposite = function encodeComposite(tag, - primitive, - cls, - content) { - var encodedTag = encodeTag(tag, primitive, cls, this.reporter); - - // Short form - if (content.length < 0x80) { - var header = new Buffer(2); - header[0] = encodedTag; - header[1] = content.length; - return this._createEncoderBuffer([ header, content ]); - } - - // Long form - // Count octets required to store length - var lenOctets = 1; - for (var i = content.length; i >= 0x100; i >>= 8) - lenOctets++; - - var header = new Buffer(1 + 1 + lenOctets); - header[0] = encodedTag; - header[1] = 0x80 | lenOctets; - - for (var i = 1 + lenOctets, j = content.length; j > 0; i--, j >>= 8) - header[i] = j & 0xff; - - return this._createEncoderBuffer([ header, content ]); -}; - -DERNode.prototype._encodeStr = function encodeStr(str, tag) { - if (tag === 'bitstr') { - return this._createEncoderBuffer([ str.unused | 0, str.data ]); - } else if (tag === 'bmpstr') { - var buf = new Buffer(str.length * 2); - for (var i = 0; i < str.length; i++) { - buf.writeUInt16BE(str.charCodeAt(i), i * 2); - } - return this._createEncoderBuffer(buf); - } else if (tag === 'numstr') { - if (!this._isNumstr(str)) { - return this.reporter.error('Encoding of string type: numstr supports ' + - 'only digits and space'); - } - return this._createEncoderBuffer(str); - } else if (tag === 'printstr') { - if (!this._isPrintstr(str)) { - return this.reporter.error('Encoding of string type: printstr supports ' + - 'only latin upper and lower case letters, ' + - 'digits, space, apostrophe, left and rigth ' + - 'parenthesis, plus sign, comma, hyphen, ' + - 'dot, slash, colon, equal sign, ' + - 'question mark'); - } - return this._createEncoderBuffer(str); - } else if (/str$/.test(tag)) { - return this._createEncoderBuffer(str); - } else if (tag === 'objDesc') { - return this._createEncoderBuffer(str); - } else { - return this.reporter.error('Encoding of string type: ' + tag + - ' unsupported'); - } -}; - -DERNode.prototype._encodeObjid = function encodeObjid(id, values, relative) { - if (typeof id === 'string') { - if (!values) - return this.reporter.error('string objid given, but no values map found'); - if (!values.hasOwnProperty(id)) - return this.reporter.error('objid not found in values map'); - id = values[id].split(/[\s\.]+/g); - for (var i = 0; i < id.length; i++) - id[i] |= 0; - } else if (Array.isArray(id)) { - id = id.slice(); - for (var i = 0; i < id.length; i++) - id[i] |= 0; - } - - if (!Array.isArray(id)) { - return this.reporter.error('objid() should be either array or string, ' + - 'got: ' + JSON.stringify(id)); - } - - if (!relative) { - if (id[1] >= 40) - return this.reporter.error('Second objid identifier OOB'); - id.splice(0, 2, id[0] * 40 + id[1]); - } - - // Count number of octets - var size = 0; - for (var i = 0; i < id.length; i++) { - var ident = id[i]; - for (size++; ident >= 0x80; ident >>= 7) - size++; - } - - var objid = new Buffer(size); - var offset = objid.length - 1; - for (var i = id.length - 1; i >= 0; i--) { - var ident = id[i]; - objid[offset--] = ident & 0x7f; - while ((ident >>= 7) > 0) - objid[offset--] = 0x80 | (ident & 0x7f); - } - - return this._createEncoderBuffer(objid); -}; - -function two(num) { - if (num < 10) - return '0' + num; - else - return num; -} - -DERNode.prototype._encodeTime = function encodeTime(time, tag) { - var str; - var date = new Date(time); - - if (tag === 'gentime') { - str = [ - two(date.getFullYear()), - two(date.getUTCMonth() + 1), - two(date.getUTCDate()), - two(date.getUTCHours()), - two(date.getUTCMinutes()), - two(date.getUTCSeconds()), - 'Z' - ].join(''); - } else if (tag === 'utctime') { - str = [ - two(date.getFullYear() % 100), - two(date.getUTCMonth() + 1), - two(date.getUTCDate()), - two(date.getUTCHours()), - two(date.getUTCMinutes()), - two(date.getUTCSeconds()), - 'Z' - ].join(''); - } else { - this.reporter.error('Encoding ' + tag + ' time is not supported yet'); - } - - return this._encodeStr(str, 'octstr'); -}; - -DERNode.prototype._encodeNull = function encodeNull() { - return this._createEncoderBuffer(''); -}; - -DERNode.prototype._encodeInt = function encodeInt(num, values) { - if (typeof num === 'string') { - if (!values) - return this.reporter.error('String int or enum given, but no values map'); - if (!values.hasOwnProperty(num)) { - return this.reporter.error('Values map doesn\'t contain: ' + - JSON.stringify(num)); - } - num = values[num]; - } - - // Bignum, assume big endian - if (typeof num !== 'number' && !Buffer.isBuffer(num)) { - var numArray = num.toArray(); - if (!num.sign && numArray[0] & 0x80) { - numArray.unshift(0); - } - num = new Buffer(numArray); - } - - if (Buffer.isBuffer(num)) { - var size = num.length; - if (num.length === 0) - size++; - - var out = new Buffer(size); - num.copy(out); - if (num.length === 0) - out[0] = 0 - return this._createEncoderBuffer(out); - } - - if (num < 0x80) - return this._createEncoderBuffer(num); - - if (num < 0x100) - return this._createEncoderBuffer([0, num]); - - var size = 1; - for (var i = num; i >= 0x100; i >>= 8) - size++; - - var out = new Array(size); - for (var i = out.length - 1; i >= 0; i--) { - out[i] = num & 0xff; - num >>= 8; - } - if(out[0] & 0x80) { - out.unshift(0); - } - - return this._createEncoderBuffer(new Buffer(out)); -}; - -DERNode.prototype._encodeBool = function encodeBool(value) { - return this._createEncoderBuffer(value ? 0xff : 0); -}; - -DERNode.prototype._use = function use(entity, obj) { - if (typeof entity === 'function') - entity = entity(obj); - return entity._getEncoder('der').tree; -}; - -DERNode.prototype._skipDefault = function skipDefault(dataBuffer, reporter, parent) { - var state = this._baseState; - var i; - if (state['default'] === null) - return false; - - var data = dataBuffer.join(); - if (state.defaultBuffer === undefined) - state.defaultBuffer = this._encodeValue(state['default'], reporter, parent).join(); - - if (data.length !== state.defaultBuffer.length) - return false; - - for (i=0; i < data.length; i++) - if (data[i] !== state.defaultBuffer[i]) - return false; - - return true; -}; - -// Utility methods - -function encodeTag(tag, primitive, cls, reporter) { - var res; - - if (tag === 'seqof') - tag = 'seq'; - else if (tag === 'setof') - tag = 'set'; - - if (der.tagByName.hasOwnProperty(tag)) - res = der.tagByName[tag]; - else if (typeof tag === 'number' && (tag | 0) === tag) - res = tag; - else - return reporter.error('Unknown tag: ' + tag); - - if (res >= 0x1f) - return reporter.error('Multi-octet tag encoding unsupported'); - - if (!primitive) - res |= 0x20; - - res |= (der.tagClassByName[cls || 'universal'] << 6); - - return res; -} diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/parse-asn1/node_modules/asn1.js/lib/asn1/encoders/index.js b/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/parse-asn1/node_modules/asn1.js/lib/asn1/encoders/index.js deleted file mode 100644 index 6a5d29ec..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/parse-asn1/node_modules/asn1.js/lib/asn1/encoders/index.js +++ /dev/null @@ -1,4 +0,0 @@ -var encoders = exports; - -encoders.der = require('./der'); -encoders.pem = require('./pem'); diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/parse-asn1/node_modules/asn1.js/lib/asn1/encoders/pem.js b/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/parse-asn1/node_modules/asn1.js/lib/asn1/encoders/pem.js deleted file mode 100644 index 864271fa..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/parse-asn1/node_modules/asn1.js/lib/asn1/encoders/pem.js +++ /dev/null @@ -1,21 +0,0 @@ -var inherits = require('inherits'); - -var DEREncoder = require('./der'); - -function PEMEncoder(entity) { - DEREncoder.call(this, entity); - this.enc = 'pem'; -}; -inherits(PEMEncoder, DEREncoder); -module.exports = PEMEncoder; - -PEMEncoder.prototype.encode = function encode(data, options) { - var buf = DEREncoder.prototype.encode.call(this, data); - - var p = buf.toString('base64'); - var out = [ '-----BEGIN ' + options.label + '-----' ]; - for (var i = 0; i < p.length; i += 64) - out.push(p.slice(i, i + 64)); - out.push('-----END ' + options.label + '-----'); - return out.join('\n'); -}; diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/parse-asn1/node_modules/asn1.js/node_modules/minimalistic-assert/index.js b/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/parse-asn1/node_modules/asn1.js/node_modules/minimalistic-assert/index.js deleted file mode 100644 index 70b4ea5b..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/parse-asn1/node_modules/asn1.js/node_modules/minimalistic-assert/index.js +++ /dev/null @@ -1,11 +0,0 @@ -module.exports = assert; - -function assert(val, msg) { - if (!val) - throw new Error(msg || 'Assertion failed'); -} - -assert.equal = function assertEqual(l, r, msg) { - if (l != r) - throw new Error(msg || ('Assertion failed: ' + l + ' != ' + r)); -}; diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/parse-asn1/node_modules/asn1.js/node_modules/minimalistic-assert/package.json b/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/parse-asn1/node_modules/asn1.js/node_modules/minimalistic-assert/package.json deleted file mode 100644 index 15ca6b4a..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/parse-asn1/node_modules/asn1.js/node_modules/minimalistic-assert/package.json +++ /dev/null @@ -1,42 +0,0 @@ -{ - "name": "minimalistic-assert", - "version": "1.0.0", - "description": "minimalistic-assert ===", - "main": "index.js", - "scripts": { - "test": "echo \"Error: no test specified\" && exit 1" - }, - "repository": { - "type": "git", - "url": "https://github.com/calvinmetcalf/minimalistic-assert.git" - }, - "author": "", - "license": "ISC", - "bugs": { - "url": "https://github.com/calvinmetcalf/minimalistic-assert/issues" - }, - "homepage": "https://github.com/calvinmetcalf/minimalistic-assert", - "gitHead": "21471ae03175986a30cd3f567ba0bfde5ab10b01", - "_id": "minimalistic-assert@1.0.0", - "_shasum": "702be2dda6b37f4836bcb3f5db56641b64a1d3d3", - "_from": "minimalistic-assert@>=1.0.0 <2.0.0", - "_npmVersion": "2.1.10", - "_nodeVersion": "0.10.35", - "_npmUser": { - "name": "cwmma", - "email": "calvin.metcalf@gmail.com" - }, - "maintainers": [ - { - "name": "cwmma", - "email": "calvin.metcalf@gmail.com" - } - ], - "dist": { - "shasum": "702be2dda6b37f4836bcb3f5db56641b64a1d3d3", - "tarball": "https://registry.npmjs.org/minimalistic-assert/-/minimalistic-assert-1.0.0.tgz" - }, - "directories": {}, - "_resolved": "https://registry.npmjs.org/minimalistic-assert/-/minimalistic-assert-1.0.0.tgz", - "readme": "ERROR: No README data found!" -} diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/parse-asn1/node_modules/asn1.js/node_modules/minimalistic-assert/readme.md b/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/parse-asn1/node_modules/asn1.js/node_modules/minimalistic-assert/readme.md deleted file mode 100644 index 2ca0d256..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/parse-asn1/node_modules/asn1.js/node_modules/minimalistic-assert/readme.md +++ /dev/null @@ -1,4 +0,0 @@ -minimalistic-assert -=== - -very minimalistic assert module. diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/parse-asn1/node_modules/asn1.js/package.json b/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/parse-asn1/node_modules/asn1.js/package.json deleted file mode 100644 index 1f2a34b9..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/parse-asn1/node_modules/asn1.js/package.json +++ /dev/null @@ -1,64 +0,0 @@ -{ - "name": "asn1.js", - "version": "4.9.1", - "description": "ASN.1 encoder and decoder", - "main": "lib/asn1.js", - "scripts": { - "test": "mocha --reporter spec test/*-test.js rfc/2560/test/*-test.js rfc/5280/test/*-test.js" - }, - "repository": { - "type": "git", - "url": "git+ssh://git@github.com/indutny/asn1.js.git" - }, - "keywords": [ - "asn.1", - "der" - ], - "author": { - "name": "Fedor Indutny" - }, - "license": "MIT", - "bugs": { - "url": "https://github.com/indutny/asn1.js/issues" - }, - "homepage": "https://github.com/indutny/asn1.js", - "devDependencies": { - "mocha": "^2.3.4" - }, - "dependencies": { - "bn.js": "^4.0.0", - "inherits": "^2.0.1", - "minimalistic-assert": "^1.0.0" - }, - "gitHead": "33e8f17800306ed28150ef8b6db71efa812552e5", - "_id": "asn1.js@4.9.1", - "_shasum": "48ba240b45a9280e94748990ba597d216617fd40", - "_from": "asn1.js@>=4.0.0 <5.0.0", - "_npmVersion": "3.10.8", - "_nodeVersion": "7.0.0", - "_npmUser": { - "name": "indutny", - "email": "fedor@indutny.com" - }, - "dist": { - "shasum": "48ba240b45a9280e94748990ba597d216617fd40", - "tarball": "https://registry.npmjs.org/asn1.js/-/asn1.js-4.9.1.tgz" - }, - "maintainers": [ - { - "name": "fedor.indutny", - "email": "fedor.indutny@gmail.com" - }, - { - "name": "indutny", - "email": "fedor@indutny.com" - } - ], - "_npmOperationalInternal": { - "host": "packages-12-west.internal.npmjs.com", - "tmp": "tmp/asn1.js-4.9.1.tgz_1482877947207_0.6697999401949346" - }, - "directories": {}, - "_resolved": "https://registry.npmjs.org/asn1.js/-/asn1.js-4.9.1.tgz", - "readme": "ERROR: No README data found!" -} diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/parse-asn1/node_modules/asn1.js/test.js b/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/parse-asn1/node_modules/asn1.js/test.js deleted file mode 100644 index 7b095312..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/parse-asn1/node_modules/asn1.js/test.js +++ /dev/null @@ -1,5 +0,0 @@ -'use strict'; - -const rfc5280 = require('./rfc/5280'); - -const tbs = diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/parse-asn1/node_modules/browserify-aes/.eslintrc b/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/parse-asn1/node_modules/browserify-aes/.eslintrc deleted file mode 100644 index bed248a0..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/parse-asn1/node_modules/browserify-aes/.eslintrc +++ /dev/null @@ -1,132 +0,0 @@ -{ - "ecmaFeatures": { - "modules": true, - "experimentalObjectRestSpread": true - }, - - "env": { - "browser": false, - "es6": true, - "node": true - }, - - "plugins": [ - "standard" - ], - - "globals": { - "document": false, - "navigator": false, - "window": false - }, - - "rules": { - "accessor-pairs": 2, - "arrow-spacing": [2, { "before": true, "after": true }], - "block-spacing": [2, "always"], - "brace-style": [2, "1tbs", { "allowSingleLine": true }], - "comma-dangle": [2, "never"], - "comma-spacing": [2, { "before": false, "after": true }], - "comma-style": [2, "last"], - "constructor-super": 2, - "curly": [2, "multi-line"], - "dot-location": [2, "property"], - "eol-last": 2, - "eqeqeq": [2, "allow-null"], - "generator-star-spacing": [2, { "before": true, "after": true }], - "handle-callback-err": [2, "^(err|error)$" ], - "indent": [2, 2, { "SwitchCase": 1 }], - "key-spacing": [2, { "beforeColon": false, "afterColon": true }], - "new-cap": [2, { "newIsCap": true, "capIsNew": false }], - "new-parens": 2, - "no-array-constructor": 2, - "no-caller": 2, - "no-class-assign": 2, - "no-cond-assign": 2, - "no-const-assign": 2, - "no-control-regex": 2, - "no-debugger": 2, - "no-delete-var": 2, - "no-dupe-args": 2, - "no-dupe-class-members": 2, - "no-dupe-keys": 2, - "no-duplicate-case": 2, - "no-empty-character-class": 2, - "no-empty-label": 2, - "no-eval": 2, - "no-ex-assign": 2, - "no-extend-native": 2, - "no-extra-bind": 2, - "no-extra-boolean-cast": 2, - "no-extra-parens": [2, "functions"], - "no-fallthrough": 2, - "no-floating-decimal": 2, - "no-func-assign": 2, - "no-implied-eval": 2, - "no-inner-declarations": [2, "functions"], - "no-invalid-regexp": 2, - "no-irregular-whitespace": 2, - "no-iterator": 2, - "no-label-var": 2, - "no-labels": 2, - "no-lone-blocks": 2, - "no-mixed-spaces-and-tabs": 2, - "no-multi-spaces": 2, - "no-multi-str": 2, - "no-multiple-empty-lines": [2, { "max": 1 }], - "no-native-reassign": 2, - "no-negated-in-lhs": 2, - "no-new": 2, - "no-new-func": 2, - "no-new-object": 2, - "no-new-require": 2, - "no-new-wrappers": 2, - "no-obj-calls": 2, - "no-octal": 2, - "no-octal-escape": 2, - "no-proto": 2, - "no-redeclare": 2, - "no-regex-spaces": 2, - "no-return-assign": 2, - "no-self-compare": 2, - "no-sequences": 2, - "no-shadow-restricted-names": 2, - "no-spaced-func": 2, - "no-sparse-arrays": 2, - "no-this-before-super": 2, - "no-throw-literal": 2, - "no-trailing-spaces": 2, - "no-undef": 2, - "no-undef-init": 2, - "no-unexpected-multiline": 2, - "no-unneeded-ternary": [2, { "defaultAssignment": false }], - "no-unreachable": 2, - "no-unused-vars": [2, { "vars": "all", "args": "none" }], - "no-useless-call": 2, - "no-with": 2, - "one-var": [2, { "initialized": "never" }], - "operator-linebreak": [2, "after", { "overrides": { "?": "before", ":": "before" } }], - "padded-blocks": [2, "never"], - "quotes": [2, "single", "avoid-escape"], - "radix": 2, - "semi": [2, "never"], - "semi-spacing": [2, { "before": false, "after": true }], - "space-after-keywords": [2, "always"], - "space-before-blocks": [2, "always"], - "space-before-function-paren": [2, "always"], - "space-before-keywords": [2, "always"], - "space-in-parens": [2, "never"], - "space-infix-ops": 2, - "space-return-throw-case": 2, - "space-unary-ops": [2, { "words": true, "nonwords": false }], - "spaced-comment": [2, "always", { "markers": ["global", "globals", "eslint", "eslint-disable", "*package", "!", ","] }], - "use-isnan": 2, - "valid-typeof": 2, - "wrap-iife": [2, "any"], - "yoda": [2, "never"], - - "standard/object-curly-even-spacing": [2, "either"], - "standard/array-bracket-even-spacing": [2, "either"], - "standard/computed-property-even-spacing": [2, "even"] - } -} diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/parse-asn1/node_modules/browserify-aes/.npmignore b/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/parse-asn1/node_modules/browserify-aes/.npmignore deleted file mode 100644 index 65e3ba2e..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/parse-asn1/node_modules/browserify-aes/.npmignore +++ /dev/null @@ -1 +0,0 @@ -test/ diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/parse-asn1/node_modules/browserify-aes/.travis.yml b/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/parse-asn1/node_modules/browserify-aes/.travis.yml deleted file mode 100644 index eb83acd9..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/parse-asn1/node_modules/browserify-aes/.travis.yml +++ /dev/null @@ -1,6 +0,0 @@ -language: node_js -node_js: - - "0.11" - - "0.10" - - "0.12" - - "iojs" diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/parse-asn1/node_modules/browserify-aes/LICENSE b/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/parse-asn1/node_modules/browserify-aes/LICENSE deleted file mode 100644 index 924b38b1..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/parse-asn1/node_modules/browserify-aes/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2014-2015 browserify-aes contributors - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/parse-asn1/node_modules/browserify-aes/aes.js b/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/parse-asn1/node_modules/browserify-aes/aes.js deleted file mode 100644 index 4829057f..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/parse-asn1/node_modules/browserify-aes/aes.js +++ /dev/null @@ -1,177 +0,0 @@ -// based on the aes implimentation in triple sec -// https://github.com/keybase/triplesec - -// which is in turn based on the one from crypto-js -// https://code.google.com/p/crypto-js/ - -var uint_max = Math.pow(2, 32) -function fixup_uint32 (x) { - var ret, x_pos - ret = x > uint_max || x < 0 ? (x_pos = Math.abs(x) % uint_max, x < 0 ? uint_max - x_pos : x_pos) : x - return ret -} -function scrub_vec (v) { - for (var i = 0; i < v.length; v++) { - v[i] = 0 - } - return false -} - -function Global () { - this.SBOX = [] - this.INV_SBOX = [] - this.SUB_MIX = [[], [], [], []] - this.INV_SUB_MIX = [[], [], [], []] - this.init() - this.RCON = [0x00, 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80, 0x1b, 0x36] -} - -Global.prototype.init = function () { - var d, i, sx, t, x, x2, x4, x8, xi, _i - d = (function () { - var _i, _results - _results = [] - for (i = _i = 0; _i < 256; i = ++_i) { - if (i < 128) { - _results.push(i << 1) - } else { - _results.push((i << 1) ^ 0x11b) - } - } - return _results - })() - x = 0 - xi = 0 - for (i = _i = 0; _i < 256; i = ++_i) { - sx = xi ^ (xi << 1) ^ (xi << 2) ^ (xi << 3) ^ (xi << 4) - sx = (sx >>> 8) ^ (sx & 0xff) ^ 0x63 - this.SBOX[x] = sx - this.INV_SBOX[sx] = x - x2 = d[x] - x4 = d[x2] - x8 = d[x4] - t = (d[sx] * 0x101) ^ (sx * 0x1010100) - this.SUB_MIX[0][x] = (t << 24) | (t >>> 8) - this.SUB_MIX[1][x] = (t << 16) | (t >>> 16) - this.SUB_MIX[2][x] = (t << 8) | (t >>> 24) - this.SUB_MIX[3][x] = t - t = (x8 * 0x1010101) ^ (x4 * 0x10001) ^ (x2 * 0x101) ^ (x * 0x1010100) - this.INV_SUB_MIX[0][sx] = (t << 24) | (t >>> 8) - this.INV_SUB_MIX[1][sx] = (t << 16) | (t >>> 16) - this.INV_SUB_MIX[2][sx] = (t << 8) | (t >>> 24) - this.INV_SUB_MIX[3][sx] = t - if (x === 0) { - x = xi = 1 - } else { - x = x2 ^ d[d[d[x8 ^ x2]]] - xi ^= d[d[xi]] - } - } - return true -} - -var G = new Global() - -AES.blockSize = 4 * 4 - -AES.prototype.blockSize = AES.blockSize - -AES.keySize = 256 / 8 - -AES.prototype.keySize = AES.keySize - -function bufferToArray (buf) { - var len = buf.length / 4 - var out = new Array(len) - var i = -1 - while (++i < len) { - out[i] = buf.readUInt32BE(i * 4) - } - return out -} -function AES (key) { - this._key = bufferToArray(key) - this._doReset() -} - -AES.prototype._doReset = function () { - var invKsRow, keySize, keyWords, ksRow, ksRows, t - keyWords = this._key - keySize = keyWords.length - this._nRounds = keySize + 6 - ksRows = (this._nRounds + 1) * 4 - this._keySchedule = [] - for (ksRow = 0; ksRow < ksRows; ksRow++) { - this._keySchedule[ksRow] = ksRow < keySize ? keyWords[ksRow] : (t = this._keySchedule[ksRow - 1], (ksRow % keySize) === 0 ? (t = (t << 8) | (t >>> 24), t = (G.SBOX[t >>> 24] << 24) | (G.SBOX[(t >>> 16) & 0xff] << 16) | (G.SBOX[(t >>> 8) & 0xff] << 8) | G.SBOX[t & 0xff], t ^= G.RCON[(ksRow / keySize) | 0] << 24) : keySize > 6 && ksRow % keySize === 4 ? t = (G.SBOX[t >>> 24] << 24) | (G.SBOX[(t >>> 16) & 0xff] << 16) | (G.SBOX[(t >>> 8) & 0xff] << 8) | G.SBOX[t & 0xff] : void 0, this._keySchedule[ksRow - keySize] ^ t) - } - this._invKeySchedule = [] - for (invKsRow = 0; invKsRow < ksRows; invKsRow++) { - ksRow = ksRows - invKsRow - t = this._keySchedule[ksRow - (invKsRow % 4 ? 0 : 4)] - this._invKeySchedule[invKsRow] = invKsRow < 4 || ksRow <= 4 ? t : G.INV_SUB_MIX[0][G.SBOX[t >>> 24]] ^ G.INV_SUB_MIX[1][G.SBOX[(t >>> 16) & 0xff]] ^ G.INV_SUB_MIX[2][G.SBOX[(t >>> 8) & 0xff]] ^ G.INV_SUB_MIX[3][G.SBOX[t & 0xff]] - } - return true -} - -AES.prototype.encryptBlock = function (M) { - M = bufferToArray(new Buffer(M)) - var out = this._doCryptBlock(M, this._keySchedule, G.SUB_MIX, G.SBOX) - var buf = new Buffer(16) - buf.writeUInt32BE(out[0], 0) - buf.writeUInt32BE(out[1], 4) - buf.writeUInt32BE(out[2], 8) - buf.writeUInt32BE(out[3], 12) - return buf -} - -AES.prototype.decryptBlock = function (M) { - M = bufferToArray(new Buffer(M)) - var temp = [M[3], M[1]] - M[1] = temp[0] - M[3] = temp[1] - var out = this._doCryptBlock(M, this._invKeySchedule, G.INV_SUB_MIX, G.INV_SBOX) - var buf = new Buffer(16) - buf.writeUInt32BE(out[0], 0) - buf.writeUInt32BE(out[3], 4) - buf.writeUInt32BE(out[2], 8) - buf.writeUInt32BE(out[1], 12) - return buf -} - -AES.prototype.scrub = function () { - scrub_vec(this._keySchedule) - scrub_vec(this._invKeySchedule) - scrub_vec(this._key) -} - -AES.prototype._doCryptBlock = function (M, keySchedule, SUB_MIX, SBOX) { - var ksRow, s0, s1, s2, s3, t0, t1, t2, t3 - - s0 = M[0] ^ keySchedule[0] - s1 = M[1] ^ keySchedule[1] - s2 = M[2] ^ keySchedule[2] - s3 = M[3] ^ keySchedule[3] - ksRow = 4 - for (var round = 1; round < this._nRounds; round++) { - t0 = SUB_MIX[0][s0 >>> 24] ^ SUB_MIX[1][(s1 >>> 16) & 0xff] ^ SUB_MIX[2][(s2 >>> 8) & 0xff] ^ SUB_MIX[3][s3 & 0xff] ^ keySchedule[ksRow++] - t1 = SUB_MIX[0][s1 >>> 24] ^ SUB_MIX[1][(s2 >>> 16) & 0xff] ^ SUB_MIX[2][(s3 >>> 8) & 0xff] ^ SUB_MIX[3][s0 & 0xff] ^ keySchedule[ksRow++] - t2 = SUB_MIX[0][s2 >>> 24] ^ SUB_MIX[1][(s3 >>> 16) & 0xff] ^ SUB_MIX[2][(s0 >>> 8) & 0xff] ^ SUB_MIX[3][s1 & 0xff] ^ keySchedule[ksRow++] - t3 = SUB_MIX[0][s3 >>> 24] ^ SUB_MIX[1][(s0 >>> 16) & 0xff] ^ SUB_MIX[2][(s1 >>> 8) & 0xff] ^ SUB_MIX[3][s2 & 0xff] ^ keySchedule[ksRow++] - s0 = t0 - s1 = t1 - s2 = t2 - s3 = t3 - } - t0 = ((SBOX[s0 >>> 24] << 24) | (SBOX[(s1 >>> 16) & 0xff] << 16) | (SBOX[(s2 >>> 8) & 0xff] << 8) | SBOX[s3 & 0xff]) ^ keySchedule[ksRow++] - t1 = ((SBOX[s1 >>> 24] << 24) | (SBOX[(s2 >>> 16) & 0xff] << 16) | (SBOX[(s3 >>> 8) & 0xff] << 8) | SBOX[s0 & 0xff]) ^ keySchedule[ksRow++] - t2 = ((SBOX[s2 >>> 24] << 24) | (SBOX[(s3 >>> 16) & 0xff] << 16) | (SBOX[(s0 >>> 8) & 0xff] << 8) | SBOX[s1 & 0xff]) ^ keySchedule[ksRow++] - t3 = ((SBOX[s3 >>> 24] << 24) | (SBOX[(s0 >>> 16) & 0xff] << 16) | (SBOX[(s1 >>> 8) & 0xff] << 8) | SBOX[s2 & 0xff]) ^ keySchedule[ksRow++] - return [ - fixup_uint32(t0), - fixup_uint32(t1), - fixup_uint32(t2), - fixup_uint32(t3) - ] -} - -exports.AES = AES diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/parse-asn1/node_modules/browserify-aes/authCipher.js b/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/parse-asn1/node_modules/browserify-aes/authCipher.js deleted file mode 100644 index 1107a01a..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/parse-asn1/node_modules/browserify-aes/authCipher.js +++ /dev/null @@ -1,97 +0,0 @@ -var aes = require('./aes') -var Transform = require('cipher-base') -var inherits = require('inherits') -var GHASH = require('./ghash') -var xor = require('buffer-xor') -inherits(StreamCipher, Transform) -module.exports = StreamCipher - -function StreamCipher (mode, key, iv, decrypt) { - if (!(this instanceof StreamCipher)) { - return new StreamCipher(mode, key, iv) - } - Transform.call(this) - this._finID = Buffer.concat([iv, new Buffer([0, 0, 0, 1])]) - iv = Buffer.concat([iv, new Buffer([0, 0, 0, 2])]) - this._cipher = new aes.AES(key) - this._prev = new Buffer(iv.length) - this._cache = new Buffer('') - this._secCache = new Buffer('') - this._decrypt = decrypt - this._alen = 0 - this._len = 0 - iv.copy(this._prev) - this._mode = mode - var h = new Buffer(4) - h.fill(0) - this._ghash = new GHASH(this._cipher.encryptBlock(h)) - this._authTag = null - this._called = false -} -StreamCipher.prototype._update = function (chunk) { - if (!this._called && this._alen) { - var rump = 16 - (this._alen % 16) - if (rump < 16) { - rump = new Buffer(rump) - rump.fill(0) - this._ghash.update(rump) - } - } - this._called = true - var out = this._mode.encrypt(this, chunk) - if (this._decrypt) { - this._ghash.update(chunk) - } else { - this._ghash.update(out) - } - this._len += chunk.length - return out -} -StreamCipher.prototype._final = function () { - if (this._decrypt && !this._authTag) { - throw new Error('Unsupported state or unable to authenticate data') - } - var tag = xor(this._ghash.final(this._alen * 8, this._len * 8), this._cipher.encryptBlock(this._finID)) - if (this._decrypt) { - if (xorTest(tag, this._authTag)) { - throw new Error('Unsupported state or unable to authenticate data') - } - } else { - this._authTag = tag - } - this._cipher.scrub() -} -StreamCipher.prototype.getAuthTag = function getAuthTag () { - if (!this._decrypt && Buffer.isBuffer(this._authTag)) { - return this._authTag - } else { - throw new Error('Attempting to get auth tag in unsupported state') - } -} -StreamCipher.prototype.setAuthTag = function setAuthTag (tag) { - if (this._decrypt) { - this._authTag = tag - } else { - throw new Error('Attempting to set auth tag in unsupported state') - } -} -StreamCipher.prototype.setAAD = function setAAD (buf) { - if (!this._called) { - this._ghash.update(buf) - this._alen += buf.length - } else { - throw new Error('Attempting to set AAD in unsupported state') - } -} -function xorTest (a, b) { - var out = 0 - if (a.length !== b.length) { - out++ - } - var len = Math.min(a.length, b.length) - var i = -1 - while (++i < len) { - out += (a[i] ^ b[i]) - } - return out -} diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/parse-asn1/node_modules/browserify-aes/browser.js b/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/parse-asn1/node_modules/browserify-aes/browser.js deleted file mode 100644 index a058a84d..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/parse-asn1/node_modules/browserify-aes/browser.js +++ /dev/null @@ -1,11 +0,0 @@ -var ciphers = require('./encrypter') -exports.createCipher = exports.Cipher = ciphers.createCipher -exports.createCipheriv = exports.Cipheriv = ciphers.createCipheriv -var deciphers = require('./decrypter') -exports.createDecipher = exports.Decipher = deciphers.createDecipher -exports.createDecipheriv = exports.Decipheriv = deciphers.createDecipheriv -var modes = require('./modes') -function getCiphers () { - return Object.keys(modes) -} -exports.listCiphers = exports.getCiphers = getCiphers diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/parse-asn1/node_modules/browserify-aes/decrypter.js b/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/parse-asn1/node_modules/browserify-aes/decrypter.js deleted file mode 100644 index b7b8bb02..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/parse-asn1/node_modules/browserify-aes/decrypter.js +++ /dev/null @@ -1,137 +0,0 @@ -var aes = require('./aes') -var Transform = require('cipher-base') -var inherits = require('inherits') -var modes = require('./modes') -var StreamCipher = require('./streamCipher') -var AuthCipher = require('./authCipher') -var ebtk = require('evp_bytestokey') - -inherits(Decipher, Transform) -function Decipher (mode, key, iv) { - if (!(this instanceof Decipher)) { - return new Decipher(mode, key, iv) - } - Transform.call(this) - this._cache = new Splitter() - this._last = void 0 - this._cipher = new aes.AES(key) - this._prev = new Buffer(iv.length) - iv.copy(this._prev) - this._mode = mode - this._autopadding = true -} -Decipher.prototype._update = function (data) { - this._cache.add(data) - var chunk - var thing - var out = [] - while ((chunk = this._cache.get(this._autopadding))) { - thing = this._mode.decrypt(this, chunk) - out.push(thing) - } - return Buffer.concat(out) -} -Decipher.prototype._final = function () { - var chunk = this._cache.flush() - if (this._autopadding) { - return unpad(this._mode.decrypt(this, chunk)) - } else if (chunk) { - throw new Error('data not multiple of block length') - } -} -Decipher.prototype.setAutoPadding = function (setTo) { - this._autopadding = !!setTo - return this -} -function Splitter () { - if (!(this instanceof Splitter)) { - return new Splitter() - } - this.cache = new Buffer('') -} -Splitter.prototype.add = function (data) { - this.cache = Buffer.concat([this.cache, data]) -} - -Splitter.prototype.get = function (autoPadding) { - var out - if (autoPadding) { - if (this.cache.length > 16) { - out = this.cache.slice(0, 16) - this.cache = this.cache.slice(16) - return out - } - } else { - if (this.cache.length >= 16) { - out = this.cache.slice(0, 16) - this.cache = this.cache.slice(16) - return out - } - } - return null -} -Splitter.prototype.flush = function () { - if (this.cache.length) { - return this.cache - } -} -function unpad (last) { - var padded = last[15] - var i = -1 - while (++i < padded) { - if (last[(i + (16 - padded))] !== padded) { - throw new Error('unable to decrypt data') - } - } - if (padded === 16) { - return - } - return last.slice(0, 16 - padded) -} - -var modelist = { - ECB: require('./modes/ecb'), - CBC: require('./modes/cbc'), - CFB: require('./modes/cfb'), - CFB8: require('./modes/cfb8'), - CFB1: require('./modes/cfb1'), - OFB: require('./modes/ofb'), - CTR: require('./modes/ctr'), - GCM: require('./modes/ctr') -} - -function createDecipheriv (suite, password, iv) { - var config = modes[suite.toLowerCase()] - if (!config) { - throw new TypeError('invalid suite type') - } - if (typeof iv === 'string') { - iv = new Buffer(iv) - } - if (typeof password === 'string') { - password = new Buffer(password) - } - if (password.length !== config.key / 8) { - throw new TypeError('invalid key length ' + password.length) - } - if (iv.length !== config.iv) { - throw new TypeError('invalid iv length ' + iv.length) - } - if (config.type === 'stream') { - return new StreamCipher(modelist[config.mode], password, iv, true) - } else if (config.type === 'auth') { - return new AuthCipher(modelist[config.mode], password, iv, true) - } - return new Decipher(modelist[config.mode], password, iv) -} - -function createDecipher (suite, password) { - var config = modes[suite.toLowerCase()] - if (!config) { - throw new TypeError('invalid suite type') - } - var keys = ebtk(password, false, config.key, config.iv) - return createDecipheriv(suite, keys.key, keys.iv) -} -exports.createDecipher = createDecipher -exports.createDecipheriv = createDecipheriv diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/parse-asn1/node_modules/browserify-aes/encrypter.js b/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/parse-asn1/node_modules/browserify-aes/encrypter.js deleted file mode 100644 index 3d3f561e..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/parse-asn1/node_modules/browserify-aes/encrypter.js +++ /dev/null @@ -1,122 +0,0 @@ -var aes = require('./aes') -var Transform = require('cipher-base') -var inherits = require('inherits') -var modes = require('./modes') -var ebtk = require('evp_bytestokey') -var StreamCipher = require('./streamCipher') -var AuthCipher = require('./authCipher') -inherits(Cipher, Transform) -function Cipher (mode, key, iv) { - if (!(this instanceof Cipher)) { - return new Cipher(mode, key, iv) - } - Transform.call(this) - this._cache = new Splitter() - this._cipher = new aes.AES(key) - this._prev = new Buffer(iv.length) - iv.copy(this._prev) - this._mode = mode - this._autopadding = true -} -Cipher.prototype._update = function (data) { - this._cache.add(data) - var chunk - var thing - var out = [] - while ((chunk = this._cache.get())) { - thing = this._mode.encrypt(this, chunk) - out.push(thing) - } - return Buffer.concat(out) -} -Cipher.prototype._final = function () { - var chunk = this._cache.flush() - if (this._autopadding) { - chunk = this._mode.encrypt(this, chunk) - this._cipher.scrub() - return chunk - } else if (chunk.toString('hex') !== '10101010101010101010101010101010') { - this._cipher.scrub() - throw new Error('data not multiple of block length') - } -} -Cipher.prototype.setAutoPadding = function (setTo) { - this._autopadding = !!setTo - return this -} - -function Splitter () { - if (!(this instanceof Splitter)) { - return new Splitter() - } - this.cache = new Buffer('') -} -Splitter.prototype.add = function (data) { - this.cache = Buffer.concat([this.cache, data]) -} - -Splitter.prototype.get = function () { - if (this.cache.length > 15) { - var out = this.cache.slice(0, 16) - this.cache = this.cache.slice(16) - return out - } - return null -} -Splitter.prototype.flush = function () { - var len = 16 - this.cache.length - var padBuff = new Buffer(len) - - var i = -1 - while (++i < len) { - padBuff.writeUInt8(len, i) - } - var out = Buffer.concat([this.cache, padBuff]) - return out -} -var modelist = { - ECB: require('./modes/ecb'), - CBC: require('./modes/cbc'), - CFB: require('./modes/cfb'), - CFB8: require('./modes/cfb8'), - CFB1: require('./modes/cfb1'), - OFB: require('./modes/ofb'), - CTR: require('./modes/ctr'), - GCM: require('./modes/ctr') -} - -function createCipheriv (suite, password, iv) { - var config = modes[suite.toLowerCase()] - if (!config) { - throw new TypeError('invalid suite type') - } - if (typeof iv === 'string') { - iv = new Buffer(iv) - } - if (typeof password === 'string') { - password = new Buffer(password) - } - if (password.length !== config.key / 8) { - throw new TypeError('invalid key length ' + password.length) - } - if (iv.length !== config.iv) { - throw new TypeError('invalid iv length ' + iv.length) - } - if (config.type === 'stream') { - return new StreamCipher(modelist[config.mode], password, iv) - } else if (config.type === 'auth') { - return new AuthCipher(modelist[config.mode], password, iv) - } - return new Cipher(modelist[config.mode], password, iv) -} -function createCipher (suite, password) { - var config = modes[suite.toLowerCase()] - if (!config) { - throw new TypeError('invalid suite type') - } - var keys = ebtk(password, false, config.key, config.iv) - return createCipheriv(suite, keys.key, keys.iv) -} - -exports.createCipheriv = createCipheriv -exports.createCipher = createCipher diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/parse-asn1/node_modules/browserify-aes/ghash.js b/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/parse-asn1/node_modules/browserify-aes/ghash.js deleted file mode 100644 index 0ca143cd..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/parse-asn1/node_modules/browserify-aes/ghash.js +++ /dev/null @@ -1,98 +0,0 @@ -var zeros = new Buffer(16) -zeros.fill(0) -module.exports = GHASH -function GHASH (key) { - this.h = key - this.state = new Buffer(16) - this.state.fill(0) - this.cache = new Buffer('') -} -// from http://bitwiseshiftleft.github.io/sjcl/doc/symbols/src/core_gcm.js.html -// by Juho Vähä-Herttua -GHASH.prototype.ghash = function (block) { - var i = -1 - while (++i < block.length) { - this.state[i] ^= block[i] - } - this._multiply() -} - -GHASH.prototype._multiply = function () { - var Vi = toArray(this.h) - var Zi = [0, 0, 0, 0] - var j, xi, lsb_Vi - var i = -1 - while (++i < 128) { - xi = (this.state[~~(i / 8)] & (1 << (7 - i % 8))) !== 0 - if (xi) { - // Z_i+1 = Z_i ^ V_i - Zi = xor(Zi, Vi) - } - - // Store the value of LSB(V_i) - lsb_Vi = (Vi[3] & 1) !== 0 - - // V_i+1 = V_i >> 1 - for (j = 3; j > 0; j--) { - Vi[j] = (Vi[j] >>> 1) | ((Vi[j - 1] & 1) << 31) - } - Vi[0] = Vi[0] >>> 1 - - // If LSB(V_i) is 1, V_i+1 = (V_i >> 1) ^ R - if (lsb_Vi) { - Vi[0] = Vi[0] ^ (0xe1 << 24) - } - } - this.state = fromArray(Zi) -} -GHASH.prototype.update = function (buf) { - this.cache = Buffer.concat([this.cache, buf]) - var chunk - while (this.cache.length >= 16) { - chunk = this.cache.slice(0, 16) - this.cache = this.cache.slice(16) - this.ghash(chunk) - } -} -GHASH.prototype.final = function (abl, bl) { - if (this.cache.length) { - this.ghash(Buffer.concat([this.cache, zeros], 16)) - } - this.ghash(fromArray([ - 0, abl, - 0, bl - ])) - return this.state -} - -function toArray (buf) { - return [ - buf.readUInt32BE(0), - buf.readUInt32BE(4), - buf.readUInt32BE(8), - buf.readUInt32BE(12) - ] -} -function fromArray (out) { - out = out.map(fixup_uint32) - var buf = new Buffer(16) - buf.writeUInt32BE(out[0], 0) - buf.writeUInt32BE(out[1], 4) - buf.writeUInt32BE(out[2], 8) - buf.writeUInt32BE(out[3], 12) - return buf -} -var uint_max = Math.pow(2, 32) -function fixup_uint32 (x) { - var ret, x_pos - ret = x > uint_max || x < 0 ? (x_pos = Math.abs(x) % uint_max, x < 0 ? uint_max - x_pos : x_pos) : x - return ret -} -function xor (a, b) { - return [ - a[0] ^ b[0], - a[1] ^ b[1], - a[2] ^ b[2], - a[3] ^ b[3] - ] -} diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/parse-asn1/node_modules/browserify-aes/index.js b/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/parse-asn1/node_modules/browserify-aes/index.js deleted file mode 100644 index 58fa883f..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/parse-asn1/node_modules/browserify-aes/index.js +++ /dev/null @@ -1,7 +0,0 @@ -var crypto = require('crypto') - -exports.createCipher = exports.Cipher = crypto.createCipher -exports.createCipheriv = exports.Cipheriv = crypto.createCipheriv -exports.createDecipher = exports.Decipher = crypto.createDecipher -exports.createDecipheriv = exports.Decipheriv = crypto.createDecipheriv -exports.listCiphers = exports.getCiphers = crypto.getCiphers diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/parse-asn1/node_modules/browserify-aes/modes.js b/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/parse-asn1/node_modules/browserify-aes/modes.js deleted file mode 100644 index c070086d..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/parse-asn1/node_modules/browserify-aes/modes.js +++ /dev/null @@ -1,171 +0,0 @@ -exports['aes-128-ecb'] = { - cipher: 'AES', - key: 128, - iv: 0, - mode: 'ECB', - type: 'block' -} -exports['aes-192-ecb'] = { - cipher: 'AES', - key: 192, - iv: 0, - mode: 'ECB', - type: 'block' -} -exports['aes-256-ecb'] = { - cipher: 'AES', - key: 256, - iv: 0, - mode: 'ECB', - type: 'block' -} -exports['aes-128-cbc'] = { - cipher: 'AES', - key: 128, - iv: 16, - mode: 'CBC', - type: 'block' -} -exports['aes-192-cbc'] = { - cipher: 'AES', - key: 192, - iv: 16, - mode: 'CBC', - type: 'block' -} -exports['aes-256-cbc'] = { - cipher: 'AES', - key: 256, - iv: 16, - mode: 'CBC', - type: 'block' -} -exports['aes128'] = exports['aes-128-cbc'] -exports['aes192'] = exports['aes-192-cbc'] -exports['aes256'] = exports['aes-256-cbc'] -exports['aes-128-cfb'] = { - cipher: 'AES', - key: 128, - iv: 16, - mode: 'CFB', - type: 'stream' -} -exports['aes-192-cfb'] = { - cipher: 'AES', - key: 192, - iv: 16, - mode: 'CFB', - type: 'stream' -} -exports['aes-256-cfb'] = { - cipher: 'AES', - key: 256, - iv: 16, - mode: 'CFB', - type: 'stream' -} -exports['aes-128-cfb8'] = { - cipher: 'AES', - key: 128, - iv: 16, - mode: 'CFB8', - type: 'stream' -} -exports['aes-192-cfb8'] = { - cipher: 'AES', - key: 192, - iv: 16, - mode: 'CFB8', - type: 'stream' -} -exports['aes-256-cfb8'] = { - cipher: 'AES', - key: 256, - iv: 16, - mode: 'CFB8', - type: 'stream' -} -exports['aes-128-cfb1'] = { - cipher: 'AES', - key: 128, - iv: 16, - mode: 'CFB1', - type: 'stream' -} -exports['aes-192-cfb1'] = { - cipher: 'AES', - key: 192, - iv: 16, - mode: 'CFB1', - type: 'stream' -} -exports['aes-256-cfb1'] = { - cipher: 'AES', - key: 256, - iv: 16, - mode: 'CFB1', - type: 'stream' -} -exports['aes-128-ofb'] = { - cipher: 'AES', - key: 128, - iv: 16, - mode: 'OFB', - type: 'stream' -} -exports['aes-192-ofb'] = { - cipher: 'AES', - key: 192, - iv: 16, - mode: 'OFB', - type: 'stream' -} -exports['aes-256-ofb'] = { - cipher: 'AES', - key: 256, - iv: 16, - mode: 'OFB', - type: 'stream' -} -exports['aes-128-ctr'] = { - cipher: 'AES', - key: 128, - iv: 16, - mode: 'CTR', - type: 'stream' -} -exports['aes-192-ctr'] = { - cipher: 'AES', - key: 192, - iv: 16, - mode: 'CTR', - type: 'stream' -} -exports['aes-256-ctr'] = { - cipher: 'AES', - key: 256, - iv: 16, - mode: 'CTR', - type: 'stream' -} -exports['aes-128-gcm'] = { - cipher: 'AES', - key: 128, - iv: 12, - mode: 'GCM', - type: 'auth' -} -exports['aes-192-gcm'] = { - cipher: 'AES', - key: 192, - iv: 12, - mode: 'GCM', - type: 'auth' -} -exports['aes-256-gcm'] = { - cipher: 'AES', - key: 256, - iv: 12, - mode: 'GCM', - type: 'auth' -} diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/parse-asn1/node_modules/browserify-aes/modes/cbc.js b/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/parse-asn1/node_modules/browserify-aes/modes/cbc.js deleted file mode 100644 index b133e406..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/parse-asn1/node_modules/browserify-aes/modes/cbc.js +++ /dev/null @@ -1,17 +0,0 @@ -var xor = require('buffer-xor') - -exports.encrypt = function (self, block) { - var data = xor(block, self._prev) - - self._prev = self._cipher.encryptBlock(data) - return self._prev -} - -exports.decrypt = function (self, block) { - var pad = self._prev - - self._prev = block - var out = self._cipher.decryptBlock(block) - - return xor(out, pad) -} diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/parse-asn1/node_modules/browserify-aes/modes/cfb.js b/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/parse-asn1/node_modules/browserify-aes/modes/cfb.js deleted file mode 100644 index 0bfe4fab..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/parse-asn1/node_modules/browserify-aes/modes/cfb.js +++ /dev/null @@ -1,31 +0,0 @@ -var xor = require('buffer-xor') - -exports.encrypt = function (self, data, decrypt) { - var out = new Buffer('') - var len - - while (data.length) { - if (self._cache.length === 0) { - self._cache = self._cipher.encryptBlock(self._prev) - self._prev = new Buffer('') - } - - if (self._cache.length <= data.length) { - len = self._cache.length - out = Buffer.concat([out, encryptStart(self, data.slice(0, len), decrypt)]) - data = data.slice(len) - } else { - out = Buffer.concat([out, encryptStart(self, data, decrypt)]) - break - } - } - - return out -} -function encryptStart (self, data, decrypt) { - var len = data.length - var out = xor(data, self._cache) - self._cache = self._cache.slice(len) - self._prev = Buffer.concat([self._prev, decrypt ? data : out]) - return out -} diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/parse-asn1/node_modules/browserify-aes/modes/cfb1.js b/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/parse-asn1/node_modules/browserify-aes/modes/cfb1.js deleted file mode 100644 index 335542e2..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/parse-asn1/node_modules/browserify-aes/modes/cfb1.js +++ /dev/null @@ -1,34 +0,0 @@ -function encryptByte (self, byteParam, decrypt) { - var pad - var i = -1 - var len = 8 - var out = 0 - var bit, value - while (++i < len) { - pad = self._cipher.encryptBlock(self._prev) - bit = (byteParam & (1 << (7 - i))) ? 0x80 : 0 - value = pad[0] ^ bit - out += ((value & 0x80) >> (i % 8)) - self._prev = shiftIn(self._prev, decrypt ? bit : value) - } - return out -} -exports.encrypt = function (self, chunk, decrypt) { - var len = chunk.length - var out = new Buffer(len) - var i = -1 - while (++i < len) { - out[i] = encryptByte(self, chunk[i], decrypt) - } - return out -} -function shiftIn (buffer, value) { - var len = buffer.length - var i = -1 - var out = new Buffer(buffer.length) - buffer = Buffer.concat([buffer, new Buffer([value])]) - while (++i < len) { - out[i] = buffer[i] << 1 | buffer[i + 1] >> (7) - } - return out -} diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/parse-asn1/node_modules/browserify-aes/modes/cfb8.js b/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/parse-asn1/node_modules/browserify-aes/modes/cfb8.js deleted file mode 100644 index c967a959..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/parse-asn1/node_modules/browserify-aes/modes/cfb8.js +++ /dev/null @@ -1,15 +0,0 @@ -function encryptByte (self, byteParam, decrypt) { - var pad = self._cipher.encryptBlock(self._prev) - var out = pad[0] ^ byteParam - self._prev = Buffer.concat([self._prev.slice(1), new Buffer([decrypt ? byteParam : out])]) - return out -} -exports.encrypt = function (self, chunk, decrypt) { - var len = chunk.length - var out = new Buffer(len) - var i = -1 - while (++i < len) { - out[i] = encryptByte(self, chunk[i], decrypt) - } - return out -} diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/parse-asn1/node_modules/browserify-aes/modes/ctr.js b/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/parse-asn1/node_modules/browserify-aes/modes/ctr.js deleted file mode 100644 index 0ef2278b..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/parse-asn1/node_modules/browserify-aes/modes/ctr.js +++ /dev/null @@ -1,31 +0,0 @@ -var xor = require('buffer-xor') - -function incr32 (iv) { - var len = iv.length - var item - while (len--) { - item = iv.readUInt8(len) - if (item === 255) { - iv.writeUInt8(0, len) - } else { - item++ - iv.writeUInt8(item, len) - break - } - } -} - -function getBlock (self) { - var out = self._cipher.encryptBlock(self._prev) - incr32(self._prev) - return out -} - -exports.encrypt = function (self, chunk) { - while (self._cache.length < chunk.length) { - self._cache = Buffer.concat([self._cache, getBlock(self)]) - } - var pad = self._cache.slice(0, chunk.length) - self._cache = self._cache.slice(chunk.length) - return xor(chunk, pad) -} diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/parse-asn1/node_modules/browserify-aes/modes/ecb.js b/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/parse-asn1/node_modules/browserify-aes/modes/ecb.js deleted file mode 100644 index 4dd97e7d..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/parse-asn1/node_modules/browserify-aes/modes/ecb.js +++ /dev/null @@ -1,6 +0,0 @@ -exports.encrypt = function (self, block) { - return self._cipher.encryptBlock(block) -} -exports.decrypt = function (self, block) { - return self._cipher.decryptBlock(block) -} diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/parse-asn1/node_modules/browserify-aes/modes/ofb.js b/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/parse-asn1/node_modules/browserify-aes/modes/ofb.js deleted file mode 100644 index bd875589..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/parse-asn1/node_modules/browserify-aes/modes/ofb.js +++ /dev/null @@ -1,16 +0,0 @@ -var xor = require('buffer-xor') - -function getBlock (self) { - self._prev = self._cipher.encryptBlock(self._prev) - return self._prev -} - -exports.encrypt = function (self, chunk) { - while (self._cache.length < chunk.length) { - self._cache = Buffer.concat([self._cache, getBlock(self)]) - } - - var pad = self._cache.slice(0, chunk.length) - self._cache = self._cache.slice(chunk.length) - return xor(chunk, pad) -} diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/parse-asn1/node_modules/browserify-aes/node_modules/buffer-xor/.npmignore b/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/parse-asn1/node_modules/browserify-aes/node_modules/buffer-xor/.npmignore deleted file mode 100644 index 3c3629e6..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/parse-asn1/node_modules/browserify-aes/node_modules/buffer-xor/.npmignore +++ /dev/null @@ -1 +0,0 @@ -node_modules diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/parse-asn1/node_modules/browserify-aes/node_modules/buffer-xor/.travis.yml b/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/parse-asn1/node_modules/browserify-aes/node_modules/buffer-xor/.travis.yml deleted file mode 100644 index d9f695b7..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/parse-asn1/node_modules/browserify-aes/node_modules/buffer-xor/.travis.yml +++ /dev/null @@ -1,9 +0,0 @@ -language: node_js -before_install: - - "npm install npm -g" -node_js: - - "0.12" -env: - - TEST_SUITE=standard - - TEST_SUITE=unit -script: "npm run-script $TEST_SUITE" diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/parse-asn1/node_modules/browserify-aes/node_modules/buffer-xor/LICENSE b/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/parse-asn1/node_modules/browserify-aes/node_modules/buffer-xor/LICENSE deleted file mode 100644 index bba52181..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/parse-asn1/node_modules/browserify-aes/node_modules/buffer-xor/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2015 Daniel Cousens - -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/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/parse-asn1/node_modules/browserify-aes/node_modules/buffer-xor/README.md b/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/parse-asn1/node_modules/browserify-aes/node_modules/buffer-xor/README.md deleted file mode 100644 index 007f0582..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/parse-asn1/node_modules/browserify-aes/node_modules/buffer-xor/README.md +++ /dev/null @@ -1,41 +0,0 @@ -# buffer-xor - -[![TRAVIS](https://secure.travis-ci.org/crypto-browserify/buffer-xor.png)](http://travis-ci.org/crypto-browserify/buffer-xor) -[![NPM](http://img.shields.io/npm/v/buffer-xor.svg)](https://www.npmjs.org/package/buffer-xor) - -[![js-standard-style](https://cdn.rawgit.com/feross/standard/master/badge.svg)](https://github.com/feross/standard) - -A simple module for bitwise-xor on buffers. - - -## Examples - -``` javascript -var xor = require("buffer-xor") -var a = new Buffer('00ff0f', 'hex') -var b = new Buffer('f0f0', 'hex') - -console.log(xor(a, b)) -// => -``` - - -Or for those seeking those few extra cycles, perform the operation in place: - -``` javascript -var xorInplace = require("buffer-xor/inplace") -var a = new Buffer('00ff0f', 'hex') -var b = new Buffer('f0f0', 'hex') - -console.log(xorInplace(a, b)) -// => -// NOTE: xorInplace will return the shorter slice of its parameters - -// See that a has been mutated -console.log(a) -// => -``` - - -## License [MIT](LICENSE) - diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/parse-asn1/node_modules/browserify-aes/node_modules/buffer-xor/index.js b/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/parse-asn1/node_modules/browserify-aes/node_modules/buffer-xor/index.js deleted file mode 100644 index 85ee6f63..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/parse-asn1/node_modules/browserify-aes/node_modules/buffer-xor/index.js +++ /dev/null @@ -1,10 +0,0 @@ -module.exports = function xor (a, b) { - var length = Math.min(a.length, b.length) - var buffer = new Buffer(length) - - for (var i = 0; i < length; ++i) { - buffer[i] = a[i] ^ b[i] - } - - return buffer -} diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/parse-asn1/node_modules/browserify-aes/node_modules/buffer-xor/inline.js b/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/parse-asn1/node_modules/browserify-aes/node_modules/buffer-xor/inline.js deleted file mode 100644 index 87975703..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/parse-asn1/node_modules/browserify-aes/node_modules/buffer-xor/inline.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('./inplace') diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/parse-asn1/node_modules/browserify-aes/node_modules/buffer-xor/inplace.js b/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/parse-asn1/node_modules/browserify-aes/node_modules/buffer-xor/inplace.js deleted file mode 100644 index d71c172c..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/parse-asn1/node_modules/browserify-aes/node_modules/buffer-xor/inplace.js +++ /dev/null @@ -1,9 +0,0 @@ -module.exports = function xorInplace (a, b) { - var length = Math.min(a.length, b.length) - - for (var i = 0; i < length; ++i) { - a[i] = a[i] ^ b[i] - } - - return a.slice(0, length) -} diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/parse-asn1/node_modules/browserify-aes/node_modules/buffer-xor/package.json b/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/parse-asn1/node_modules/browserify-aes/node_modules/buffer-xor/package.json deleted file mode 100644 index 0a15d4fe..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/parse-asn1/node_modules/browserify-aes/node_modules/buffer-xor/package.json +++ /dev/null @@ -1,62 +0,0 @@ -{ - "name": "buffer-xor", - "version": "1.0.3", - "description": "A simple module for bitwise-xor on buffers", - "main": "index.js", - "scripts": { - "standard": "standard", - "test": "npm run-script unit", - "unit": "mocha" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/crypto-browserify/buffer-xor.git" - }, - "bugs": { - "url": "https://github.com/crypto-browserify/buffer-xor/issues" - }, - "homepage": "https://github.com/crypto-browserify/buffer-xor", - "keywords": [ - "bits", - "bitwise", - "buffer", - "buffer-xor", - "crypto", - "inline", - "math", - "memory", - "performance", - "xor" - ], - "author": { - "name": "Daniel Cousens" - }, - "license": "MIT", - "devDependencies": { - "mocha": "*", - "standard": "*" - }, - "gitHead": "8f92b79a8b8133c26a7ae1af09b2c84ec6e3f426", - "_id": "buffer-xor@1.0.3", - "_shasum": "26e61ed1422fb70dd42e6e36729ed51d855fe8d9", - "_from": "buffer-xor@>=1.0.2 <2.0.0", - "_npmVersion": "3.3.3", - "_nodeVersion": "4.1.1", - "_npmUser": { - "name": "dcousens", - "email": "email@dcousens.com" - }, - "dist": { - "shasum": "26e61ed1422fb70dd42e6e36729ed51d855fe8d9", - "tarball": "https://registry.npmjs.org/buffer-xor/-/buffer-xor-1.0.3.tgz" - }, - "maintainers": [ - { - "name": "dcousens", - "email": "email@dcousens.com" - } - ], - "directories": {}, - "_resolved": "https://registry.npmjs.org/buffer-xor/-/buffer-xor-1.0.3.tgz", - "readme": "ERROR: No README data found!" -} diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/parse-asn1/node_modules/browserify-aes/node_modules/buffer-xor/test/fixtures.json b/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/parse-asn1/node_modules/browserify-aes/node_modules/buffer-xor/test/fixtures.json deleted file mode 100644 index 6f3431ef..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/parse-asn1/node_modules/browserify-aes/node_modules/buffer-xor/test/fixtures.json +++ /dev/null @@ -1,23 +0,0 @@ -[ - { - "a": "000f", - "b": "f0ff", - "expected": "f0f0" - }, - { - "a": "000f0f", - "b": "f0ff", - "mutated": "f0f00f", - "expected": "f0f0" - }, - { - "a": "000f", - "b": "f0ffff", - "expected": "f0f0" - }, - { - "a": "000000", - "b": "000000", - "expected": "000000" - } -] diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/parse-asn1/node_modules/browserify-aes/node_modules/buffer-xor/test/index.js b/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/parse-asn1/node_modules/browserify-aes/node_modules/buffer-xor/test/index.js deleted file mode 100644 index 06eacab4..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/parse-asn1/node_modules/browserify-aes/node_modules/buffer-xor/test/index.js +++ /dev/null @@ -1,38 +0,0 @@ -/* global describe, it */ - -var assert = require('assert') -var xor = require('../') -var xorInplace = require('../inplace') -var fixtures = require('./fixtures') - -describe('xor', function () { - fixtures.forEach(function (f) { - it('returns ' + f.expected + ' for ' + f.a + '/' + f.b, function () { - var a = new Buffer(f.a, 'hex') - var b = new Buffer(f.b, 'hex') - var actual = xor(a, b) - - assert.equal(actual.toString('hex'), f.expected) - - // a/b unchanged - assert.equal(a.toString('hex'), f.a) - assert.equal(b.toString('hex'), f.b) - }) - }) -}) - -describe('xor/inplace', function () { - fixtures.forEach(function (f) { - it('returns ' + f.expected + ' for ' + f.a + '/' + f.b, function () { - var a = new Buffer(f.a, 'hex') - var b = new Buffer(f.b, 'hex') - var actual = xorInplace(a, b) - - assert.equal(actual.toString('hex'), f.expected) - - // a mutated, b unchanged - assert.equal(a.toString('hex'), f.mutated || f.expected) - assert.equal(b.toString('hex'), f.b) - }) - }) -}) diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/parse-asn1/node_modules/browserify-aes/node_modules/cipher-base/.eslintrc b/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/parse-asn1/node_modules/browserify-aes/node_modules/cipher-base/.eslintrc deleted file mode 100644 index a755cdbf..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/parse-asn1/node_modules/browserify-aes/node_modules/cipher-base/.eslintrc +++ /dev/null @@ -1,3 +0,0 @@ -{ - "extends": ["standard"] -} diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/parse-asn1/node_modules/browserify-aes/node_modules/cipher-base/.travis.yml b/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/parse-asn1/node_modules/browserify-aes/node_modules/cipher-base/.travis.yml deleted file mode 100644 index eb83acd9..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/parse-asn1/node_modules/browserify-aes/node_modules/cipher-base/.travis.yml +++ /dev/null @@ -1,6 +0,0 @@ -language: node_js -node_js: - - "0.11" - - "0.10" - - "0.12" - - "iojs" diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/parse-asn1/node_modules/browserify-aes/node_modules/cipher-base/index.js b/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/parse-asn1/node_modules/browserify-aes/node_modules/cipher-base/index.js deleted file mode 100644 index 1a661d62..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/parse-asn1/node_modules/browserify-aes/node_modules/cipher-base/index.js +++ /dev/null @@ -1,90 +0,0 @@ -var Transform = require('stream').Transform -var inherits = require('inherits') -var StringDecoder = require('string_decoder').StringDecoder -module.exports = CipherBase -inherits(CipherBase, Transform) -function CipherBase (hashMode) { - Transform.call(this) - this.hashMode = typeof hashMode === 'string' - if (this.hashMode) { - this[hashMode] = this._finalOrDigest - } else { - this.final = this._finalOrDigest - } - this._decoder = null - this._encoding = null -} -CipherBase.prototype.update = function (data, inputEnc, outputEnc) { - if (typeof data === 'string') { - data = new Buffer(data, inputEnc) - } - var outData = this._update(data) - if (this.hashMode) { - return this - } - if (outputEnc) { - outData = this._toString(outData, outputEnc) - } - return outData -} - -CipherBase.prototype.setAutoPadding = function () {} - -CipherBase.prototype.getAuthTag = function () { - throw new Error('trying to get auth tag in unsupported state') -} - -CipherBase.prototype.setAuthTag = function () { - throw new Error('trying to set auth tag in unsupported state') -} - -CipherBase.prototype.setAAD = function () { - throw new Error('trying to set aad in unsupported state') -} - -CipherBase.prototype._transform = function (data, _, next) { - var err - try { - if (this.hashMode) { - this._update(data) - } else { - this.push(this._update(data)) - } - } catch (e) { - err = e - } finally { - next(err) - } -} -CipherBase.prototype._flush = function (done) { - var err - try { - this.push(this._final()) - } catch (e) { - err = e - } finally { - done(err) - } -} -CipherBase.prototype._finalOrDigest = function (outputEnc) { - var outData = this._final() || new Buffer('') - if (outputEnc) { - outData = this._toString(outData, outputEnc, true) - } - return outData -} - -CipherBase.prototype._toString = function (value, enc, fin) { - if (!this._decoder) { - this._decoder = new StringDecoder(enc) - this._encoding = enc - } - if (this._encoding !== enc) { - throw new Error('can\'t switch encodings') - } - var out = this._decoder.write(value) - if (fin) { - out += this._decoder.end() - } - return out -} diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/parse-asn1/node_modules/browserify-aes/node_modules/cipher-base/package.json b/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/parse-asn1/node_modules/browserify-aes/node_modules/cipher-base/package.json deleted file mode 100644 index d1275bc2..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/parse-asn1/node_modules/browserify-aes/node_modules/cipher-base/package.json +++ /dev/null @@ -1,60 +0,0 @@ -{ - "name": "cipher-base", - "version": "1.0.3", - "description": "abstract base class for crypto-streams", - "main": "index.js", - "scripts": { - "test": "node test.js | tspec" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/crypto-browserify/cipher-base.git" - }, - "keywords": [ - "cipher", - "stream" - ], - "author": { - "name": "Calvin Metcalf", - "email": "calvin.metcalf@gmail.com" - }, - "license": "MIT", - "bugs": { - "url": "https://github.com/crypto-browserify/cipher-base/issues" - }, - "homepage": "https://github.com/crypto-browserify/cipher-base#readme", - "dependencies": { - "inherits": "^2.0.1" - }, - "devDependencies": { - "tap-spec": "^4.1.0", - "tape": "^4.2.0" - }, - "gitHead": "de2af9758ce75ef5f9a9bdaf0ba5312609a7e59a", - "_id": "cipher-base@1.0.3", - "_shasum": "eeabf194419ce900da3018c207d212f2a6df0a07", - "_from": "cipher-base@>=1.0.0 <2.0.0", - "_npmVersion": "3.8.6", - "_nodeVersion": "5.12.0", - "_npmUser": { - "name": "cwmma", - "email": "calvin.metcalf@gmail.com" - }, - "dist": { - "shasum": "eeabf194419ce900da3018c207d212f2a6df0a07", - "tarball": "https://registry.npmjs.org/cipher-base/-/cipher-base-1.0.3.tgz" - }, - "maintainers": [ - { - "name": "cwmma", - "email": "calvin.metcalf@gmail.com" - } - ], - "_npmOperationalInternal": { - "host": "packages-16-east.internal.npmjs.com", - "tmp": "tmp/cipher-base-1.0.3.tgz_1473767078206_0.1380389309488237" - }, - "directories": {}, - "_resolved": "https://registry.npmjs.org/cipher-base/-/cipher-base-1.0.3.tgz", - "readme": "ERROR: No README data found!" -} diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/parse-asn1/node_modules/browserify-aes/node_modules/cipher-base/readme.md b/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/parse-asn1/node_modules/browserify-aes/node_modules/cipher-base/readme.md deleted file mode 100644 index db9a7814..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/parse-asn1/node_modules/browserify-aes/node_modules/cipher-base/readme.md +++ /dev/null @@ -1,17 +0,0 @@ -cipher-base -=== - -[![Build Status](https://travis-ci.org/crypto-browserify/cipher-base.svg)](https://travis-ci.org/crypto-browserify/cipher-base) - -Abstract base class to inherit from if you want to create streams implementing -the same api as node crypto streams. - -Requires you to implement 2 methods `_final` and `_update`. `_update` takes a -buffer and should return a buffer, `_final` takes no arguments and should return -a buffer. - - -The constructor takes one argument and that is a string which if present switches -it into hash mode, i.e. the object you get from crypto.createHash or -crypto.createSign, this switches the name of the final method to be the string -you passed instead of `final` and returns `this` from update. diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/parse-asn1/node_modules/browserify-aes/node_modules/cipher-base/test.js b/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/parse-asn1/node_modules/browserify-aes/node_modules/cipher-base/test.js deleted file mode 100644 index 57d144a5..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/parse-asn1/node_modules/browserify-aes/node_modules/cipher-base/test.js +++ /dev/null @@ -1,108 +0,0 @@ -var test = require('tape') -var CipherBase = require('./') -var inherits = require('inherits') - -test('basic version', function (t) { - inherits(Cipher, CipherBase) - function Cipher () { - CipherBase.call(this) - } - Cipher.prototype._update = function (input) { - t.ok(Buffer.isBuffer(input)) - return input - } - Cipher.prototype._final = function () { - // noop - } - var cipher = new Cipher() - var utf8 = 'abc123abcd' - var update = cipher.update(utf8, 'utf8', 'base64') + cipher.final('base64') - var string = (new Buffer(update, 'base64')).toString() - t.equals(utf8, string) - t.end() -}) -test('hash mode', function (t) { - inherits(Cipher, CipherBase) - function Cipher () { - CipherBase.call(this, 'finalName') - this._cache = [] - } - Cipher.prototype._update = function (input) { - t.ok(Buffer.isBuffer(input)) - this._cache.push(input) - } - Cipher.prototype._final = function () { - return Buffer.concat(this._cache) - } - var cipher = new Cipher() - var utf8 = 'abc123abcd' - var update = cipher.update(utf8, 'utf8').finalName('base64') - var string = (new Buffer(update, 'base64')).toString() - - t.equals(utf8, string) - t.end() -}) -test('hash mode as stream', function (t) { - inherits(Cipher, CipherBase) - function Cipher () { - CipherBase.call(this, 'finalName') - this._cache = [] - } - Cipher.prototype._update = function (input) { - t.ok(Buffer.isBuffer(input)) - this._cache.push(input) - } - Cipher.prototype._final = function () { - return Buffer.concat(this._cache) - } - var cipher = new Cipher() - cipher.on('error', function (e) { - t.notOk(e) - }) - var utf8 = 'abc123abcd' - cipher.end(utf8, 'utf8') - var update = cipher.read().toString('base64') - var string = (new Buffer(update, 'base64')).toString() - - t.equals(utf8, string) - t.end() -}) -test('encodings', function (t) { - inherits(Cipher, CipherBase) - function Cipher () { - CipherBase.call(this) - } - Cipher.prototype._update = function (input) { - return input - } - Cipher.prototype._final = function () { - // noop - } - t.test('mix and match encoding', function (t) { - t.plan(2) - - var cipher = new Cipher() - cipher.update('foo', 'utf8', 'utf8') - t.throws(function () { - cipher.update('foo', 'utf8', 'base64') - }) - cipher = new Cipher() - cipher.update('foo', 'utf8', 'base64') - t.doesNotThrow(function () { - cipher.update('foo', 'utf8') - cipher.final('base64') - }) - }) - t.test('handle long uft8 plaintexts', function (t) { - t.plan(1) - var txt = 'ふっかつ あきる すぶり はやい つける まゆげ たんさん みんぞく ねほりはほり せまい たいまつばな ひはん' - - var cipher = new Cipher() - var decipher = new Cipher() - var enc = decipher.update(cipher.update(txt, 'utf8', 'base64'), 'base64', 'utf8') - enc += decipher.update(cipher.final('base64'), 'base64', 'utf8') - enc += decipher.final('utf8') - - t.equals(txt, enc) - }) -}) diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/parse-asn1/node_modules/browserify-aes/package.json b/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/parse-asn1/node_modules/browserify-aes/package.json deleted file mode 100644 index 37ae8bce..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/parse-asn1/node_modules/browserify-aes/package.json +++ /dev/null @@ -1,78 +0,0 @@ -{ - "name": "browserify-aes", - "version": "1.0.6", - "description": "aes, for browserify", - "browser": "browser.js", - "main": "index.js", - "directories": { - "test": "test" - }, - "scripts": { - "test": "standard && node test/index.js|tspec" - }, - "repository": { - "type": "git", - "url": "git://github.com/crypto-browserify/browserify-aes.git" - }, - "keywords": [ - "aes", - "crypto", - "browserify" - ], - "author": "", - "license": "MIT", - "bugs": { - "url": "https://github.com/crypto-browserify/browserify-aes/issues" - }, - "homepage": "https://github.com/crypto-browserify/browserify-aes", - "dependencies": { - "buffer-xor": "^1.0.2", - "cipher-base": "^1.0.0", - "create-hash": "^1.1.0", - "evp_bytestokey": "^1.0.0", - "inherits": "^2.0.1" - }, - "devDependencies": { - "standard": "^3.7.3", - "tap-spec": "^1.0.0", - "tape": "^3.0.0" - }, - "gitHead": "51f8b9055371c045af448fa07bacaae3df6c8e51", - "_id": "browserify-aes@1.0.6", - "_shasum": "5e7725dbdef1fd5930d4ebab48567ce451c48a0a", - "_from": "browserify-aes@>=1.0.0 <2.0.0", - "_npmVersion": "3.3.12", - "_nodeVersion": "5.4.0", - "_npmUser": { - "name": "cwmma", - "email": "calvin.metcalf@gmail.com" - }, - "dist": { - "shasum": "5e7725dbdef1fd5930d4ebab48567ce451c48a0a", - "tarball": "https://registry.npmjs.org/browserify-aes/-/browserify-aes-1.0.6.tgz" - }, - "maintainers": [ - { - "name": "cwmma", - "email": "calvin.metcalf@gmail.com" - }, - { - "name": "dcousens", - "email": "email@dcousens.com" - }, - { - "name": "dominictarr", - "email": "dominic.tarr@gmail.com" - }, - { - "name": "jprichardson", - "email": "jprichardson@gmail.com" - }, - { - "name": "indutny", - "email": "fedor@indutny.com" - } - ], - "_resolved": "https://registry.npmjs.org/browserify-aes/-/browserify-aes-1.0.6.tgz", - "readme": "ERROR: No README data found!" -} diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/parse-asn1/node_modules/browserify-aes/populateFixtures.js b/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/parse-asn1/node_modules/browserify-aes/populateFixtures.js deleted file mode 100644 index ac31eb33..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/parse-asn1/node_modules/browserify-aes/populateFixtures.js +++ /dev/null @@ -1,25 +0,0 @@ -var modes = require('./modes') -var fixtures = require('./test/fixtures.json') -var crypto = require('crypto') -var types = ['aes-128-cfb1', 'aes-192-cfb1', 'aes-256-cfb1'] -var ebtk = require('./EVP_BytesToKey') -var fs = require('fs') - -fixtures.forEach(function (fixture) { - types.forEach(function (cipher) { - var suite = crypto.createCipher(cipher, new Buffer(fixture.password)) - var buf = new Buffer('') - buf = Buffer.concat([buf, suite.update(new Buffer(fixture.text))]) - buf = Buffer.concat([buf, suite.final()]) - fixture.results.ciphers[cipher] = buf.toString('hex') - if (modes[cipher].mode === 'ECB') { - return - } - var suite2 = crypto.createCipheriv(cipher, ebtk(crypto, fixture.password, modes[cipher].key).key, new Buffer(fixture.iv, 'hex')) - var buf2 = new Buffer('') - buf2 = Buffer.concat([buf2, suite2.update(new Buffer(fixture.text))]) - buf2 = Buffer.concat([buf2, suite2.final()]) - fixture.results.cipherivs[cipher] = buf2.toString('hex') - }) -}) -fs.writeFileSync('./test/fixturesNew.json', JSON.stringify(fixtures, false, 4)) diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/parse-asn1/node_modules/browserify-aes/readme.md b/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/parse-asn1/node_modules/browserify-aes/readme.md deleted file mode 100644 index 1d7b0855..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/parse-asn1/node_modules/browserify-aes/readme.md +++ /dev/null @@ -1,18 +0,0 @@ -browserify-aes -==== - -[![Build Status](https://travis-ci.org/crypto-browserify/browserify-aes.svg)](https://travis-ci.org/crypto-browserify/browserify-aes) - -Node style aes for use in the browser. Implements: - - - createCipher - - createCipheriv - - createDecipher - - createDecipheriv - - getCiphers - -In node.js, the `crypto` implementation is used, in browsers it falls back to a pure JavaScript implementation. - -Much of this library has been taken from the aes implementation in [triplesec](https://github.com/keybase/triplesec), a partial derivation of [crypto-js](https://code.google.com/p/crypto-js/). - -`EVP_BytesToKey` is a straight up port of the same function from OpenSSL as there is literally no documenation on it beyond it using 'undocumented extensions' for longer keys. diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/parse-asn1/node_modules/browserify-aes/streamCipher.js b/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/parse-asn1/node_modules/browserify-aes/streamCipher.js deleted file mode 100644 index a55c762d..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/parse-asn1/node_modules/browserify-aes/streamCipher.js +++ /dev/null @@ -1,25 +0,0 @@ -var aes = require('./aes') -var Transform = require('cipher-base') -var inherits = require('inherits') - -inherits(StreamCipher, Transform) -module.exports = StreamCipher -function StreamCipher (mode, key, iv, decrypt) { - if (!(this instanceof StreamCipher)) { - return new StreamCipher(mode, key, iv) - } - Transform.call(this) - this._cipher = new aes.AES(key) - this._prev = new Buffer(iv.length) - this._cache = new Buffer('') - this._secCache = new Buffer('') - this._decrypt = decrypt - iv.copy(this._prev) - this._mode = mode -} -StreamCipher.prototype._update = function (chunk) { - return this._mode.encrypt(this, chunk, this._decrypt) -} -StreamCipher.prototype._final = function () { - this._cipher.scrub() -} diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/parse-asn1/node_modules/evp_bytestokey/index.js b/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/parse-asn1/node_modules/evp_bytestokey/index.js deleted file mode 100644 index 25fbc9c2..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/parse-asn1/node_modules/evp_bytestokey/index.js +++ /dev/null @@ -1,68 +0,0 @@ -var md5 = require('create-hash/md5') -module.exports = EVP_BytesToKey -function EVP_BytesToKey (password, salt, keyLen, ivLen) { - if (!Buffer.isBuffer(password)) { - password = new Buffer(password, 'binary') - } - if (salt && !Buffer.isBuffer(salt)) { - salt = new Buffer(salt, 'binary') - } - keyLen = keyLen / 8 - ivLen = ivLen || 0 - var ki = 0 - var ii = 0 - var key = new Buffer(keyLen) - var iv = new Buffer(ivLen) - var addmd = 0 - var md_buf - var i - var bufs = [] - while (true) { - if (addmd++ > 0) { - bufs.push(md_buf) - } - bufs.push(password) - if (salt) { - bufs.push(salt) - } - md_buf = md5(Buffer.concat(bufs)) - bufs = [] - i = 0 - if (keyLen > 0) { - while (true) { - if (keyLen === 0) { - break - } - if (i === md_buf.length) { - break - } - key[ki++] = md_buf[i] - keyLen-- - i++ - } - } - if (ivLen > 0 && i !== md_buf.length) { - while (true) { - if (ivLen === 0) { - break - } - if (i === md_buf.length) { - break - } - iv[ii++] = md_buf[i] - ivLen-- - i++ - } - } - if (keyLen === 0 && ivLen === 0) { - break - } - } - for (i = 0; i < md_buf.length; i++) { - md_buf[i] = 0 - } - return { - key: key, - iv: iv - } -} diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/parse-asn1/node_modules/evp_bytestokey/package.json b/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/parse-asn1/node_modules/evp_bytestokey/package.json deleted file mode 100644 index 378c7dbb..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/parse-asn1/node_modules/evp_bytestokey/package.json +++ /dev/null @@ -1,57 +0,0 @@ -{ - "name": "evp_bytestokey", - "version": "1.0.0", - "description": "he super secure key derivation algorithm from openssl", - "main": "index.js", - "scripts": { - "test": "standard && node test.js | tspec" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/crypto-browserify/EVP_BytesToKey.git" - }, - "keywords": [ - "crypto", - "openssl" - ], - "author": { - "name": "Calvin Metcalf", - "email": "calvin.metcalf@gmail.com" - }, - "license": "MIT", - "bugs": { - "url": "https://github.com/crypto-browserify/EVP_BytesToKey/issues" - }, - "homepage": "https://github.com/crypto-browserify/EVP_BytesToKey", - "dependencies": { - "create-hash": "^1.1.1" - }, - "devDependencies": { - "standard": "^5.3.1", - "tap-spec": "^4.1.0", - "tape": "^4.2.0" - }, - "gitHead": "563bd30d95a7771ff0a18afc82cf92ed18f008d3", - "_id": "evp_bytestokey@1.0.0", - "_shasum": "497b66ad9fef65cd7c08a6180824ba1476b66e53", - "_from": "evp_bytestokey@>=1.0.0 <2.0.0", - "_npmVersion": "2.14.4", - "_nodeVersion": "4.1.1", - "_npmUser": { - "name": "cwmma", - "email": "calvin.metcalf@gmail.com" - }, - "dist": { - "shasum": "497b66ad9fef65cd7c08a6180824ba1476b66e53", - "tarball": "https://registry.npmjs.org/evp_bytestokey/-/evp_bytestokey-1.0.0.tgz" - }, - "maintainers": [ - { - "name": "cwmma", - "email": "calvin.metcalf@gmail.com" - } - ], - "directories": {}, - "_resolved": "https://registry.npmjs.org/evp_bytestokey/-/evp_bytestokey-1.0.0.tgz", - "readme": "ERROR: No README data found!" -} diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/parse-asn1/node_modules/evp_bytestokey/readme.md b/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/parse-asn1/node_modules/evp_bytestokey/readme.md deleted file mode 100644 index 86234dbf..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/parse-asn1/node_modules/evp_bytestokey/readme.md +++ /dev/null @@ -1,13 +0,0 @@ -EVP_BytesToKey -=== - -The super secure [key derivation algorithm from openssl](https://wiki.openssl.org/index.php/Manual:EVP_BytesToKey(3)) (spoiler alert not actually secure, only every use it for compatibility reasons). - -Api: -=== - -```js -var result = EVP_BytesToKey('password', 'salt', keyLen, ivLen); -Buffer.isBuffer(result.password); // true -Buffer.isBuffer(result.iv); // true -``` diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/parse-asn1/node_modules/evp_bytestokey/test.js b/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/parse-asn1/node_modules/evp_bytestokey/test.js deleted file mode 100644 index a638fa03..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/parse-asn1/node_modules/evp_bytestokey/test.js +++ /dev/null @@ -1,19 +0,0 @@ -var test = require('tape') -var evp = require('./') -var crypto = require('crypto') - -function runTest (password) { - test('password: ' + password, function (t) { - t.plan(1) - var keys = evp(password, false, 256, 16) - var nodeCipher = crypto.createCipher('aes-256-ctr', password) - var ourCipher = crypto.createCipheriv('aes-256-ctr', keys.key, keys.iv) - var nodeOut = nodeCipher.update('foooooo') - var ourOut = ourCipher.update('foooooo') - t.equals(nodeOut.toString('hex'), ourOut.toString('hex')) - }) -} -runTest('password') -runTest('ふっかつ あきる すぶり はやい つける まゆげ たんさん みんぞく ねほりはほり せまい たいまつばな ひはん') -runTest('Z͑ͫ̓ͪ̂ͫ̽͏̴̙̤̞͉͚̯̞̠͍A̴̵̜̰͔ͫ͗͢L̠ͨͧͩ͘G̴̻͈͍͔̹̑͗̎̅͛́Ǫ̵̹̻̝̳͂̌̌͘!͖̬̰̙̗̿̋ͥͥ̂ͣ̐́́͜͞') -runTest('💩') diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/parse-asn1/package.json b/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/parse-asn1/package.json deleted file mode 100644 index 869b4b14..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/parse-asn1/package.json +++ /dev/null @@ -1,71 +0,0 @@ -{ - "name": "parse-asn1", - "version": "5.0.0", - "description": "[![TRAVIS](https://secure.travis-ci.org/crypto-browserify/parse-asn1.png)](http://travis-ci.org/crypto-browserify/parse-asn1) [![NPM](http://img.shields.io/npm/v/parse-asn1.svg)](https://www.npmjs.org/package/parse-asn1)", - "main": "index.js", - "scripts": { - "unit": "node ./test", - "standard": "standard", - "test": "npm run standard && npm run unit" - }, - "repository": { - "type": "git", - "url": "git://github.com/crypto-browserify/parse-asn1.git" - }, - "author": "", - "license": "ISC", - "dependencies": { - "asn1.js": "^4.0.0", - "browserify-aes": "^1.0.0", - "create-hash": "^1.1.0", - "evp_bytestokey": "^1.0.0", - "pbkdf2": "^3.0.3" - }, - "devDependencies": { - "tape": "^3.4.0", - "standard": "^5.0.0" - }, - "gitHead": "eb88523b7c6dc896a407b896bba470218fde70b4", - "bugs": { - "url": "https://github.com/crypto-browserify/parse-asn1/issues" - }, - "homepage": "https://github.com/crypto-browserify/parse-asn1#readme", - "_id": "parse-asn1@5.0.0", - "_shasum": "35060f6d5015d37628c770f4e091a0b5a278bc23", - "_from": "parse-asn1@>=5.0.0 <6.0.0", - "_npmVersion": "2.9.0", - "_nodeVersion": "4.2.1", - "_npmUser": { - "name": "cwmma", - "email": "calvin.metcalf@gmail.com" - }, - "dist": { - "shasum": "35060f6d5015d37628c770f4e091a0b5a278bc23", - "tarball": "https://registry.npmjs.org/parse-asn1/-/parse-asn1-5.0.0.tgz" - }, - "maintainers": [ - { - "name": "cwmma", - "email": "calvin.metcalf@gmail.com" - }, - { - "name": "dcousens", - "email": "email@dcousens.com" - }, - { - "name": "dominictarr", - "email": "dominic.tarr@gmail.com" - }, - { - "name": "jprichardson", - "email": "jprichardson@gmail.com" - }, - { - "name": "indutny", - "email": "fedor@indutny.com" - } - ], - "directories": {}, - "_resolved": "https://registry.npmjs.org/parse-asn1/-/parse-asn1-5.0.0.tgz", - "readme": "ERROR: No README data found!" -} diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/parse-asn1/test/1024.priv b/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/parse-asn1/test/1024.priv deleted file mode 100644 index 72062169..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/parse-asn1/test/1024.priv +++ /dev/null @@ -1,16 +0,0 @@ ------BEGIN PRIVATE KEY----- -MIICdwIBADANBgkqhkiG9w0BAQEFAASCAmEwggJdAgEAAoGBAKulUTZ8B1qccZ8c -DXRGSY08gW8KvLlcxxxGC4gZHNT3CBUF8n5R4KE30aZyYZ/rtsQZu05juZJxaJ0q -mbe75dlQ5d+Xc9BMXeQg/MpTZw5TAN7OIdGYYpFBe+1PLZ6wEfjkYrMqMUcfq2Lq -hTLdAbvBJnuRcYZLqmBeOQ8FTrKrAgMBAAECgYEAnkHRbEPU3/WISSQrP36iyCb2 -S/SBZwKkzmvCrBxDWhPeDswp9c/2JY76rNWfLzy8iXgUG8WUzvHje61Qh3gmBcKe -bUaTGl4Vy8Ha1YBADo5RfRrdm0FE4tvgvu/TkqFqpBBZweu54285hk5zlG7n/D7Y -dnNXUpu5MlNb5x3gW0kCQQDUL//cwcXUxY/evaJP4jSe+ZwEQZo+zXRLiPUulBoV -aw28CVMuxdgwqAo1X1IKefPeUaf7RQu8gCKaRnpGuEuXAkEAzxZTfMmvmCUDIew4 -5Gk6bK265XQWdhcgiq254lpBGOYmDj9yCE7yA+zmASQwMsXTdQOi1hOCEyrXuSJ5 -c++EDQJAFh3WrnzoEPByuYXMmET8tSFRWMQ5vpgNqh3haHR5b4gUC2hxaiunCBNL -1RpVY9AoUiDywGcG/SPh93CnKB3niwJBAKP7AtsifZgVXtiizB4aMThTjVYaSZrz -D0Kg9DuHylpkDChmFu77TGrNUQgAVuYtfhb/bRblVa/F0hJ4eQHT3JUCQBVT68tb -OgRUk0aP9tC3021VN82X6+klowSQN8oBPX8+TfDWSUilp/+j24Hky+Z29Do7yR/R -qutnL92CvBlVLV4= ------END PRIVATE KEY----- diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/parse-asn1/test/1024.pub b/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/parse-asn1/test/1024.pub deleted file mode 100644 index 2dba785d..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/parse-asn1/test/1024.pub +++ /dev/null @@ -1,6 +0,0 @@ ------BEGIN PUBLIC KEY----- -MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCrpVE2fAdanHGfHA10RkmNPIFv -Cry5XMccRguIGRzU9wgVBfJ+UeChN9GmcmGf67bEGbtOY7mScWidKpm3u+XZUOXf -l3PQTF3kIPzKU2cOUwDeziHRmGKRQXvtTy2esBH45GKzKjFHH6ti6oUy3QG7wSZ7 -kXGGS6pgXjkPBU6yqwIDAQAB ------END PUBLIC KEY----- diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/parse-asn1/test/dsa.1024.priv b/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/parse-asn1/test/dsa.1024.priv deleted file mode 100644 index 1145b7d7..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/parse-asn1/test/dsa.1024.priv +++ /dev/null @@ -1,18 +0,0 @@ ------BEGIN DSA PARAMETERS----- -MIIBHgKBgQDdFg3WQmpOZxObxraIe4rrbUhrBw99fbnz99IvLj60sM/7Uk7eHYvp -UrPaJBIcjPy68BjV4ekDljuPpFoAorsLzyvVSHuNvN6I/bRGm1TCOjDFVe98Oz6k -XmI6pRfIF0TiIPXkel/sWIfBYa1lqdoW82h9FIjhbxVHrKGfvMEc9wIVAOzmJHec -s6yBm+nE3+OmpWFYj0ylAoGAYxO6mFSoIY7PDRyRzKJEnULSzYXd3FoMkPwDCd5I -ch/piIoAUIIQ542TL54GT9wuiCL+0D48qi9GWKasPZABfPQ008WOzmKzD8ncrUTd -a7pzvUvdmwldA4Aa5/5xSXwtpK+DDye7KPlu+oi1BF6uj4TgfeGr1uxouxC2WhBE -qH0= ------END DSA PARAMETERS----- ------BEGIN PRIVATE KEY----- -MIIBSwIBADCCASwGByqGSM44BAEwggEfAoGBAOY0KsTt5EpJ4LtlD3xRS5mDiGE1 -CMNp0S9X0sK8kP8Aps8iYwMLbZYglk18GCNnCk4SjbAnZHSB3kaIv6AKQc2J8W2Y -V5se3VhpKOFst7bqRtkGsl8uJtGlKTiXNclkv2jsKOrsBokSD1USGCECTNeMt3Og -ziRcZ1dS+djSOZ2nAhUAzB96SpxlAak+K/QLVJ+lDe5DcY0CgYEAtxX1/Hckvhlh -HQyKZWLQsDfZBILbhc+OLDpOyT6cJS/sJzfFIYZgK5M3rOS4OmzdYfJccQAuGq+T -VJQ3VcYOdbrIANJV8CDrn4jkkejTzJI6fCwAkPWOyxw8kbV1Hsoy6WLfSCHKpBUc -rogAqRGESqBVTawjyF/ECX667y/P49MEFgIUSeRVRgAXsLmeWR/V4Rh9Hex+9+s= ------END PRIVATE KEY----- diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/parse-asn1/test/dsa.1024.pub b/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/parse-asn1/test/dsa.1024.pub deleted file mode 100644 index 80a731ea..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/parse-asn1/test/dsa.1024.pub +++ /dev/null @@ -1,12 +0,0 @@ ------BEGIN PUBLIC KEY----- -MIIBtzCCASwGByqGSM44BAEwggEfAoGBAOY0KsTt5EpJ4LtlD3xRS5mDiGE1CMNp -0S9X0sK8kP8Aps8iYwMLbZYglk18GCNnCk4SjbAnZHSB3kaIv6AKQc2J8W2YV5se -3VhpKOFst7bqRtkGsl8uJtGlKTiXNclkv2jsKOrsBokSD1USGCECTNeMt3OgziRc -Z1dS+djSOZ2nAhUAzB96SpxlAak+K/QLVJ+lDe5DcY0CgYEAtxX1/HckvhlhHQyK -ZWLQsDfZBILbhc+OLDpOyT6cJS/sJzfFIYZgK5M3rOS4OmzdYfJccQAuGq+TVJQ3 -VcYOdbrIANJV8CDrn4jkkejTzJI6fCwAkPWOyxw8kbV1Hsoy6WLfSCHKpBUcrogA -qRGESqBVTawjyF/ECX667y/P49MDgYQAAoGAXYmxO4+52C1gBzh7GgTwNLJl7bLn -gOhKTFlKhT36VjMjeFfdXmBVBVbfUottKZby/gVX1IXT38PStB/dswbF45bGDdoS -zMFjYmHTtLtrU/4hReVtvb5MYmrPDFX58SwcSRRO/cH6WJPvfu4Aq0cJZA9Kb0B9 -5Wo18JxAqvPtTB8= ------END PUBLIC KEY----- diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/parse-asn1/test/dsa.2048.priv b/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/parse-asn1/test/dsa.2048.priv deleted file mode 100644 index 2a77c2ee..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/parse-asn1/test/dsa.2048.priv +++ /dev/null @@ -1,20 +0,0 @@ ------BEGIN DSA PRIVATE KEY----- -MIIDVQIBAAKCAQEA0jDs9lLWX//NXYE1kNKw4UiDVMHHEtTF1OzJvBJvUh3/xMlU -ic8mUpIMU5mt7BTjcijyLLl/TeNBcI/xDvWH3PAfCjP1CmNzOMHwU6wKA4Q20m5v -zjauVycd7loRm5h+1XyD2JL1KmQTzhIIRAmRTeXMnr8LAHidYfUKmzCOCCrnctlE -EOh1S6e7BFxQBRrlUxZF0LTjcAz31rrjIH6wKkYR4mnpGuI2vVJ+qHGmEhvq1hAb -DvP0GN0iofxHlIVqOlfXYCZO388ZabfcBOQG57tTofm8aS4pnXCgbok9wEYPgbU5 -n6fEvDGOOObQyY109hZZaDJmfygr5mmD0TIXrQIhAMVBhV4liqAN2MrT/+ZUH6hY -+DhTazzSNLIZKQ5gfd+1AoIBADqHGUVQa9pbwyjbzooeWdijUM9W5P7UUj1OjrA0 -HIkcx37qHiYOVFqHpbjDs3tbgRBxBX5zBpwuhywC/6OetDiqzDy7zZCV/YMn06d2 -ncW2Ctjp3KPl7of39+HgXXePgTdKcfkjH9upJQTko88rA4NWwZbHYeA3Lv7DcA11 -XY3+TQHcxMtxf/E6aePjANJBsJsQjYLy3WyUiS87jkgi0Bigjg/cD3Nel4LToCTR -JvQ4m3w3T4W0xL1+8nPjRZ2q0GgmxZzPfwALrwiSYMgGZC/ov43wqOs6WXs0NnpJ -moU4oxutC/uDvTZmJvRj77FINjK0ZA20jmNvWmTIeEm1Xn4CggEABeRpOymQS5IS -X+u9ya7C+P3MPIRGm4dcWPWgPpD1QcclNYLGnhRp7JazNsbbPMjnx1qtF+2qjfy9 -JDeWTAR8qfCNVmQHPAhJsJtV0C/V4PUii71FRNPVC3EAYbcBk8deMGoUg99cxSac -6MCxIIOxuUKWpw8XPlMVpuXc8+lIMTYCPeLGinmT4DQ573t0MS6U3Ck/987xjkH9 -sos7zcYn3vnjywDCxXMidC0eUK1rxAAuY7PL4vQiKwXq8kFtWiKAnns/Zm5LTjiZ -NrwlhNlU2wQVvyIcKaGfSRPheb69IbP+9qp5b7Xe7DNWdo48S0jl2KAFeZ91BnhM -TH6WPtMpjQIgOaTTn6xYK0kZvvH3lZXrzkjp4aNlNY65R0JAKKNsx3s= ------END DSA PRIVATE KEY----- diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/parse-asn1/test/dsa.2048.pub b/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/parse-asn1/test/dsa.2048.pub deleted file mode 100644 index 9f6cac1c..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/parse-asn1/test/dsa.2048.pub +++ /dev/null @@ -1,20 +0,0 @@ ------BEGIN PUBLIC KEY----- -MIIDRjCCAjkGByqGSM44BAEwggIsAoIBAQDSMOz2UtZf/81dgTWQ0rDhSINUwccS -1MXU7Mm8Em9SHf/EyVSJzyZSkgxTma3sFONyKPIsuX9N40Fwj/EO9Yfc8B8KM/UK -Y3M4wfBTrAoDhDbSbm/ONq5XJx3uWhGbmH7VfIPYkvUqZBPOEghECZFN5cyevwsA -eJ1h9QqbMI4IKudy2UQQ6HVLp7sEXFAFGuVTFkXQtONwDPfWuuMgfrAqRhHiaeka -4ja9Un6ocaYSG+rWEBsO8/QY3SKh/EeUhWo6V9dgJk7fzxlpt9wE5Abnu1Oh+bxp -LimdcKBuiT3ARg+BtTmfp8S8MY445tDJjXT2FlloMmZ/KCvmaYPRMhetAiEAxUGF -XiWKoA3YytP/5lQfqFj4OFNrPNI0shkpDmB937UCggEAOocZRVBr2lvDKNvOih5Z -2KNQz1bk/tRSPU6OsDQciRzHfuoeJg5UWoeluMOze1uBEHEFfnMGnC6HLAL/o560 -OKrMPLvNkJX9gyfTp3adxbYK2Onco+Xuh/f34eBdd4+BN0px+SMf26klBOSjzysD -g1bBlsdh4Dcu/sNwDXVdjf5NAdzEy3F/8Tpp4+MA0kGwmxCNgvLdbJSJLzuOSCLQ -GKCOD9wPc16XgtOgJNEm9DibfDdPhbTEvX7yc+NFnarQaCbFnM9/AAuvCJJgyAZk -L+i/jfCo6zpZezQ2ekmahTijG60L+4O9NmYm9GPvsUg2MrRkDbSOY29aZMh4SbVe -fgOCAQUAAoIBAAXkaTspkEuSEl/rvcmuwvj9zDyERpuHXFj1oD6Q9UHHJTWCxp4U -aeyWszbG2zzI58darRftqo38vSQ3lkwEfKnwjVZkBzwISbCbVdAv1eD1Iou9RUTT -1QtxAGG3AZPHXjBqFIPfXMUmnOjAsSCDsblClqcPFz5TFabl3PPpSDE2Aj3ixop5 -k+A0Oe97dDEulNwpP/fO8Y5B/bKLO83GJ97548sAwsVzInQtHlCta8QALmOzy+L0 -IisF6vJBbVoigJ57P2ZuS044mTa8JYTZVNsEFb8iHCmhn0kT4Xm+vSGz/vaqeW+1 -3uwzVnaOPEtI5digBXmfdQZ4TEx+lj7TKY0= ------END PUBLIC KEY----- diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/parse-asn1/test/ec.pass.priv b/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/parse-asn1/test/ec.pass.priv deleted file mode 100644 index bf1836d5..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/parse-asn1/test/ec.pass.priv +++ /dev/null @@ -1,7 +0,0 @@ ------BEGIN ENCRYPTED PRIVATE KEY----- -MIHeMEkGCSqGSIb3DQEFDTA8MBsGCSqGSIb3DQEFDDAOBAi9LqZQx4JFXAICCAAw -HQYJYIZIAWUDBAECBBA+js1fG4Rv/yRN7oZvxbgyBIGQ/D4yj86M1x8lMsnAHQ/K -7/ryb/baDNHqN9LTZanEGBuyxgrTzt08SiL+h91yFGMoaly029K1VgEI8Lxu5Np/ -A+LK7ewh73ABzsbuxYdcXI+rKnrvLN9Tt6veDs4GlqTTsWwq5wF0C+6gaYRBXA74 -T1b6NykGh2UNL5U5pHZEYdOVLz+lRJL7gYqlweNHP/S3 ------END ENCRYPTED PRIVATE KEY----- diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/parse-asn1/test/ec.priv b/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/parse-asn1/test/ec.priv deleted file mode 100644 index 25fffbd8..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/parse-asn1/test/ec.priv +++ /dev/null @@ -1,5 +0,0 @@ ------BEGIN EC PRIVATE KEY----- -MHQCAQEEIDF6Xv8Sv//wGUWD+c780ppGrU0QdZWCAzxAQPQX8r/uoAcGBSuBBAAK -oUQDQgAEIZeowDylls4K/wfBjO18bYo7gGx8nYQRija4e/qEMikOHJai7geeUreU -r5Xky/Ax7s2dGtegsPNsPgGe5MpQvg== ------END EC PRIVATE KEY----- diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/parse-asn1/test/ec.pub b/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/parse-asn1/test/ec.pub deleted file mode 100644 index 2e39e5bb..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/parse-asn1/test/ec.pub +++ /dev/null @@ -1,4 +0,0 @@ ------BEGIN PUBLIC KEY----- -MFYwEAYHKoZIzj0CAQYFK4EEAAoDQgAEIZeowDylls4K/wfBjO18bYo7gGx8nYQR -ija4e/qEMikOHJai7geeUreUr5Xky/Ax7s2dGtegsPNsPgGe5MpQvg== ------END PUBLIC KEY----- diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/parse-asn1/test/index.js b/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/parse-asn1/test/index.js deleted file mode 100644 index 4d160302..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/parse-asn1/test/index.js +++ /dev/null @@ -1,92 +0,0 @@ -var test = require('tape') -var fs = require('fs') -var parseKey = require('../') -var crypto = require('crypto') -var rsa1024 = { - private: fs.readFileSync(__dirname + '/rsa.1024.priv'), - public: fs.readFileSync(__dirname + '/rsa.1024.pub') -} -var rsa2028 = { - private: fs.readFileSync(__dirname + '/rsa.2028.priv'), - public: fs.readFileSync(__dirname + '/rsa.2028.pub') -} -var nonrsa1024 = { - private: fs.readFileSync(__dirname + '/1024.priv'), - public: fs.readFileSync(__dirname + '/1024.pub') -} -var pass1024 = { - private: { - passphrase: 'fooo', - key: fs.readFileSync(__dirname + '/pass.1024.priv') - }, - public: fs.readFileSync(__dirname + '/pass.1024.pub') -} -var ec = { - private: fs.readFileSync(__dirname + '/ec.priv'), - public: fs.readFileSync(__dirname + '/ec.pub') -} -var ecpass = { - private: { - key: fs.readFileSync(__dirname + '/ec.pass.priv'), - passphrase: 'bard' - }, - public: fs.readFileSync(__dirname + '/ec.pub') -} -var dsa = { - private: fs.readFileSync(__dirname + '/dsa.1024.priv'), - public: fs.readFileSync(__dirname + '/dsa.1024.pub') -} -var dsa2 = { - private: fs.readFileSync(__dirname + '/dsa.2048.priv'), - public: fs.readFileSync(__dirname + '/dsa.2048.pub') -} -var dsapass = { - private: { - key: fs.readFileSync(__dirname + '/pass.dsa.1024.priv'), - passphrase: 'password' - }, - public: fs.readFileSync(__dirname + '/pass.dsa.1024.pub') -} -var dsapass2 = { - private: { - key: fs.readFileSync(__dirname + '/pass2.dsa.1024.priv'), - passphrase: 'password' - }, - public: fs.readFileSync(__dirname + '/pass2.dsa.1024.pub') -} -var rsapass = { - private: { - key: fs.readFileSync(__dirname + '/pass.rsa.1024.priv'), - passphrase: 'password' - }, - public: fs.readFileSync(__dirname + '/pass.rsa.1024.pub') -} -var rsapass2 = { - private: { - key: fs.readFileSync(__dirname + '/pass.rsa.2028.priv'), - passphrase: 'password' - }, - public: fs.readFileSync(__dirname + '/pass.rsa.2028.pub') -} -var i = 0 -function testIt (keys) { - test('key ' + (++i), function (t) { - t.plan(2) - t.ok(parseKey(keys.public, crypto), 'public key') - t.ok(parseKey(keys.private, crypto), 'private key') - }) -} - -testIt(dsa) -testIt(dsa2) -testIt(rsa1024) -testIt(ec) -testIt(rsa2028) -testIt(nonrsa1024) -testIt(ecpass) -testIt(dsapass) -testIt(dsapass2) -testIt(rsapass) -testIt(rsapass2) -testIt(pass1024) -testIt(pass1024) diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/parse-asn1/test/pass.1024.priv b/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/parse-asn1/test/pass.1024.priv deleted file mode 100644 index b9f38845..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/parse-asn1/test/pass.1024.priv +++ /dev/null @@ -1,18 +0,0 @@ ------BEGIN ENCRYPTED PRIVATE KEY----- -MIICzzBJBgkqhkiG9w0BBQ0wPDAbBgkqhkiG9w0BBQwwDgQIji3ZZ6JbsA4CAggA -MB0GCWCGSAFlAwQBFgQQC6MKblq8zyX90/KmgotsMQSCAoDghNf+yxPC/KRh7F3O -k0lMgtDkV+wCLDv7aBvUqy8Ry2zqFPIlfLb8XtSW943XEu6KUI13IZPEr8p9h1ve -Iye6L0g6uAgbFxBE2DwBBSI7mYr7lokr4v0k+inMKf4JeRdI9XWgwOILKTGf1vH7 -PhvBnqLhOg6BIOuF426qpiyYlmRda74d0Th4o6ZyhyMSzPI1XbWSg719Ew3N/tLe -OHdYl0eFrgNjq+xO4Ev+W7eNIh/XBMQtk9wo+mxeNdldRnX822HxTsL8fSSPs+9T -W5M/2EBTJMSsswSjZyFkq8ehtxovI2u0IBX1IiPulyUZLnSNPDV1eUVClK6rk+q1 -kVsfJhUr2qvIjNlQWlbEXQj4VwGtgl0++l8vdpj59MuN2J3Nx5TNMLjA6BYAa/tr -Bu928QoT7ET+SGx5XKCwKb5fwXmDlV5zZC4kZWTaF/d/Icvj5F+fDZuYFg1JOXNZ -+q2oA1qMYaHGX6lF3pbO84ebg1iwQTDM8iIqFeSMGUJTnk/3a7sqfaWQbEQwGb+X -fXnSTwkF+wO2rriPbFvWyzecWu67zDCP0ZWUgGb86sSJCM7xRGShESwCjOrb88F1 -5SZjyIqogrkc3IWiLH9gc5U8d86qoFjJnP6BfwYks1UIyXNGKfZTCqICpMphV+IS -b0N2jprjLTkWR6nxYGSH1bkKMs7x1M0FBLWWLAZqPn9X3pe6JwIBds04O6XjF0un -oxwDjcJdoxVs7PgRiM5d1Tubqu2zmpCCmXNiqi9B0+rV9/jHg9IA5gUfvYdCcEv+ -oAr90I+2+PuBFa9lgdbDV6DtZk4bSYluqamxVeLPg/vrewYfVfDv6jftfY1D0DEy -69H0 ------END ENCRYPTED PRIVATE KEY----- diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/parse-asn1/test/pass.1024.pub b/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/parse-asn1/test/pass.1024.pub deleted file mode 100644 index 617e7fb1..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/parse-asn1/test/pass.1024.pub +++ /dev/null @@ -1,6 +0,0 @@ ------BEGIN PUBLIC KEY----- -MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDSK/7i5BV0x+gmX16Wrm7kRkCZ -y1QUt6wiM2g+SAZTYR0381VnSMX2cv7CpN3499lZj1rL5S7YTaZZwX3RvU5fz56/ -eDX6ciL/PZsbclN2KdkMWYgmcb9J1zUeoMQ3cjfFUCdQZ/ZvDWa+wY2Zg8os2Bow -AoufHtYHm3eOly/cWwIDAQAB ------END PUBLIC KEY----- diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/parse-asn1/test/pass.dsa.1024.priv b/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/parse-asn1/test/pass.dsa.1024.priv deleted file mode 100644 index aab5fc2f..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/parse-asn1/test/pass.dsa.1024.priv +++ /dev/null @@ -1,11 +0,0 @@ ------BEGIN ENCRYPTED PRIVATE KEY----- -MIIBnzBJBgkqhkiG9w0BBQ0wPDAbBgkqhkiG9w0BBQwwDgQI1z4IJORFws4CAggA -MB0GCWCGSAFlAwQBAgQQq7f0CuKCTITfPS5Xax1H4wSCAVDFyIjYVXfBNe+BARqz -Tfo09y4vKkErOb7Sz4bQkAjRLjOXiUjM4eTNtivml8NqVrQTKAghN+ggxj416OD4 -oq6Ns7Ncbd4Xm5Ni8wrrWbJxVog6rAa/ioU0sfgRExYy/xE2Q9KkW+VE7SUwanwY -e81Od9qNM5KhZGM1yUSKa0JA6Xqb8dAqBo9rVt8DceumB9OP83xV3fLEimSZfR6p -slA1P/dTvKxwhpguQe4Z3OkzTzGCxyboqeRW1woNHKbxjzzSHcaki9SHQm3xpUW8 -hRAJd6OtDnLbkE9MnC+UcI3mjru1xfnR5MU7qG7e9nvOhEDVaDkiK3DbrSf0B0Bi -p1hyX1XsSXDewSEd/mlfMLdD8WecgUtl9ea7JzxY3/6R78yB951I5TmY45mp/v+N -tbxEv29B65UKf0ac7gVw4LNy8JF2ef/L/meEmBoIAE71f+8= ------END ENCRYPTED PRIVATE KEY----- diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/parse-asn1/test/pass.dsa.1024.pub b/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/parse-asn1/test/pass.dsa.1024.pub deleted file mode 100644 index 80a731ea..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/parse-asn1/test/pass.dsa.1024.pub +++ /dev/null @@ -1,12 +0,0 @@ ------BEGIN PUBLIC KEY----- -MIIBtzCCASwGByqGSM44BAEwggEfAoGBAOY0KsTt5EpJ4LtlD3xRS5mDiGE1CMNp -0S9X0sK8kP8Aps8iYwMLbZYglk18GCNnCk4SjbAnZHSB3kaIv6AKQc2J8W2YV5se -3VhpKOFst7bqRtkGsl8uJtGlKTiXNclkv2jsKOrsBokSD1USGCECTNeMt3OgziRc -Z1dS+djSOZ2nAhUAzB96SpxlAak+K/QLVJ+lDe5DcY0CgYEAtxX1/HckvhlhHQyK -ZWLQsDfZBILbhc+OLDpOyT6cJS/sJzfFIYZgK5M3rOS4OmzdYfJccQAuGq+TVJQ3 -VcYOdbrIANJV8CDrn4jkkejTzJI6fCwAkPWOyxw8kbV1Hsoy6WLfSCHKpBUcrogA -qRGESqBVTawjyF/ECX667y/P49MDgYQAAoGAXYmxO4+52C1gBzh7GgTwNLJl7bLn -gOhKTFlKhT36VjMjeFfdXmBVBVbfUottKZby/gVX1IXT38PStB/dswbF45bGDdoS -zMFjYmHTtLtrU/4hReVtvb5MYmrPDFX58SwcSRRO/cH6WJPvfu4Aq0cJZA9Kb0B9 -5Wo18JxAqvPtTB8= ------END PUBLIC KEY----- diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/parse-asn1/test/pass.rsa.1024.priv b/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/parse-asn1/test/pass.rsa.1024.priv deleted file mode 100644 index b67bd804..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/parse-asn1/test/pass.rsa.1024.priv +++ /dev/null @@ -1,18 +0,0 @@ ------BEGIN RSA PRIVATE KEY----- -Proc-Type: 4,ENCRYPTED -DEK-Info: AES-192-CBC,04D2D7882E0C474E07E542FE997D2A49 - -vfB5Gtm34n3SeI6JELjWiGw6O+j+tGR6Wbi3SNeAZkfSA8PTjei6PVHr+dGK5zMd -nTckd0EpxItqxEdtLK6GtBIa9KRd3cEbayHmyyybH2FC4STXJCUFBe2eb7ZKmnCl -RB5FcmAqExif+QOJwHnZw6DTzq+oGSwi9cSoy2qE62FgXkj8uKAYcBLONmsP1YQA -4zIub4bnEbIghL/swEB/HVS86FyMCsMXrHEOnSuUUBf/UfZFNypI6kVUNXlItnN1 -14eeRsBD37VkL7dAQPMx+Dwm7DbU07QWrVvzgmWlu3KqR0tRNA9e4a5f14XOYxgS -HZ+XVZK8iAd+76OnprlFtGDowDXGM0wUXPYq5j8WpKxNsVs2RV+S6U0gQLoSqNxt -We7UPWZufzEdjTUO8q9KhdGqFmJ53XIYClZf0bp148b+Bk3P+dN5TbmKQEfulScn -rTLTRo34fdTIAJr5BJh0OXGNs9rFlMJ9Nz4FwVTEB1DMerXtt9ICdhud9BktRhvq -axgoz+XA3LrBrlPPcrSCZyIYjZFydGSkzg439OyDEZ6+uRmc0qhWA4j6AgXx6gGR -NvvypoFVKvXqEq/2F+SVyyMGrm4xPmsr/HUBeE9SmuTzNzDfVAM/xerqIoR2szR0 -O0hwtOj4fk7//cd1CjFzd0JiF/SqMkHxkdbmIC9qlhshkWlQbvvhbefodYPuGxmj -L1TaPgX36OcrQSodzyWBN5tSmmX1Nmftcz7iwc4AKrqkdnM3sPS3SczsAjMWrjRr -7iYhdPQSZtxVCTjACU3h7scNAg9AU6l4YZrowR//J6U= ------END RSA PRIVATE KEY----- diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/parse-asn1/test/pass.rsa.1024.pub b/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/parse-asn1/test/pass.rsa.1024.pub deleted file mode 100644 index 3506c331..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/parse-asn1/test/pass.rsa.1024.pub +++ /dev/null @@ -1,6 +0,0 @@ ------BEGIN PUBLIC KEY----- -MIGcMA0GCSqGSIb3DQEBAQUAA4GKADCBhgJ/OwswbFo/uyC8ltGf/yA1A+gV5IGd -nAgPbUSI3GzbHCA+x+TLG/tLvbRw3r1smppY/jkkpiVW1ErSMuN0uixp5gb78Z9r -H1XpWb5WWgp3WaY/9EHMjMdOkQ/9LVZvRvl/M/Fi6owP+q+amJI1BEjECYfbhGL3 -rmlVdq4qXc40QwIDAQAB ------END PUBLIC KEY----- diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/parse-asn1/test/pass.rsa.2028.priv b/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/parse-asn1/test/pass.rsa.2028.priv deleted file mode 100644 index 99e82135..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/parse-asn1/test/pass.rsa.2028.priv +++ /dev/null @@ -1,30 +0,0 @@ ------BEGIN RSA PRIVATE KEY----- -Proc-Type: 4,ENCRYPTED -DEK-Info: AES-256-CBC,7A6A055AD675947A657041422F06D439 - -HQdjzAKUuqqKhZHmpzzY/monfqFhiHnZ5c24jtR9fM4aQJXf/e1fz6MEhyIz6XON -sb4CnXZstnxUuVWDkHEu6KWQ/dKALgiDUuT+UdMawVoVPGdgyWZp35pQPWi3fT2V -XZn58YkG8bO3Y403eZPyhadOefD1VtuFuK6/f90jjzx6ZDnwveXpYgFV7Jy1/pFd -cLLMf07C+hbk416nX6UVipWe4GH+ADFom5ZCfAaUotM7n8i149dULNF4YYi2wP31 -1YaDH5vf1CqiaieDY7xLzpEixwJz6ZEg3gLXaUvz2MpF8owiGI3eP0g7voWp3xt4 -TQx/qDURlaXiaRriWdWtpKyW1MFuJ5+KdNtR1/kXr2BLPB/ZLwyqtynUy8ZYpb4+ -WIRYpUGeb//ZHGhlCH7CRMdABsal4wTwnzi9fW4Ax96ecJ2SlwCuKxwS7iEq2y1/ -FAfGwsE+XufHhme5p6XjKfiHx+zJMIB2NMkrm+wm4PbMTrGVnw5/41/r6XxOB8fe -iKi12Jth4dusc1vYGYfzKop9uEM6CZ6+Chqzb+Zyh/xUiZVlCX/BYnxr7yXUm9aR -PHQgxkn2Act8FgQB3Kgs3jCiCRIJrlsnybeWzQ3YO9TjC4MxygmmwODDBpsOKnEi -kXXS54+cZFjcsva4uJVwhAywRPVUkLzmTkH0tGiwCHjeQNECm+TLahkkEIXrVTb9 -c9creNXMgE6jVVz+R43HXsGvTcgMcBLyFRQJe2nVaj/dQ5JbF4uqNnQzRjAbD34K -uTpFaJ/kmlgcmeScRLnwaoYwFlmhSC+bK0dfY1Jr6AQRA6IDP7nIjqWNDCHNBB8r -Qj1v2KWoVQe3xNHaXhkbJPbA2DKlUIqffkBVtMKtt9KuG3Rccf3bVYAW6oid73/D -z7DMAF5G/OpVR8VbGh1WxXuR7zEVDUwpwsp9ek5dqN8BnBz1ppdZNIKqzszneckU -s2l/6mZBmgV1Nfy/cQU6U5s3S1Xc75UDQVLms3CIOpFTRIpecNTdfa31fYy/svy0 -M2lWTbCva0dOyuvMUhTgBL4I7Qa2dUMPXHMZatV5ooHYq/BZJA1r84C5cM5r+umE -2LLv/BlUr7RaQHhaKGn4Qhpzo5yRDE9mEqDpLVkbg8SxMsdf/pEF5/VyUwA9t8RT -fKVsInRd386tDqJSDbSFqKTvLztr/5YCyzZzvC2YB1voko/caOGd2d/G51Ij+bXU -xEN8U4fHDBsHwPUGb31uZUhTXpL37KiOqZmXFoH2usmuvx882XvyGcV0F4tstMaR -KLKzl2PwqzAYGFexLkYKMz0TYIeN6h3b86ETazPPU49nkaEU23Dx21J2Rb3UlH+I -lDQF3wuH1QlYiTnlcVa/Zu4QQg0/iP8ALkZ06mvn9e9mOtnA8gsh4B2oLqc19VLU -bcpv40dV1H3W9Lcx9B8JYUp0c/Oyno1D7Yj3tjGcwMKECmUpHi4kksehVo0/P933 -xmFmC6eyWYVdO9upvY/vKSB7b1dMt85iWr3gnMsSfRYc6jsbSxdjOPST46UsIzjx -wa1DS6+Bv5tiaC4uC6X+0tCAZo+UOQMYUbTGRR/7g/c= ------END RSA PRIVATE KEY----- diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/parse-asn1/test/pass.rsa.2028.pub b/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/parse-asn1/test/pass.rsa.2028.pub deleted file mode 100644 index 655cc3a4..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/parse-asn1/test/pass.rsa.2028.pub +++ /dev/null @@ -1,9 +0,0 @@ ------BEGIN PUBLIC KEY----- -MIIBHjANBgkqhkiG9w0BAQEFAAOCAQsAMIIBBgKB/gy7mjaWgPeFdVYDZWRCA9BN -iv3pPb0es27+FKY0hszLaOw47ExCtAWpDsH48TXAfyHBYwBLguayfk4LGIupxb+C -GMbRo3xEp0CbfY1Jby26T9vGjRC1foHDDUJG84uaRbyHqaf4i6zt4gVR+xlAEIjk -aFAAK8cOoXAT1CVqGLLljUCchL8PjaHj/yriZ/S7rdwlI3LnABxwwmLrmR/v71Wt -pmO/aNG8N+1po+QwaghTkyQ59E/ZvAuOkFWHok2q/R6PYAa2jdZ9zim0FqOP+nkQ -aEDRbBFBmBqTv5fFGfk2WsAfKf/RG0/VFd+ZeM5251TeTvXH695nlSGauVl9AgMB -AAE= ------END PUBLIC KEY----- diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/parse-asn1/test/pass2.dsa.1024.priv b/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/parse-asn1/test/pass2.dsa.1024.priv deleted file mode 100644 index 29e36734..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/parse-asn1/test/pass2.dsa.1024.priv +++ /dev/null @@ -1,15 +0,0 @@ ------BEGIN DSA PRIVATE KEY----- -Proc-Type: 4,ENCRYPTED -DEK-Info: AES-128-CBC,DC173C6DFD455EBE462A35D6AB9A603A - -FoC3sxbdUFJTaNtRpooMxaX2lcQRLUz8qcRhzDBn5a1kaMHp2JM3KlHK5aauybT4 -ilmlKJ9sSm8pFLAWPKbkczSgZ+X6p/51v4zaEJSebZ98p32kQk87XJQE7aYroxYV -UfM5PSOoKWilj+LZQQEXV10qDoYGrnbSdoNSxYW5V1a1aP+ua0EO7m9MUYkoLxi3 -SJ/s2h/5KM3TOz7d7DOZuSoNm+0n6YC4aqQnR3lmEtAXEYLQqLhH2Q3FTKTHwBQw -HgMBAzcXOS1YSw6Ekwh1eZamizrOEC4I6oZEHoUBqRfbsQ8tu77kDq2ovQSyn8Fp -SeE64m3GgZOYdfcDuNZ0ccmm3shBBfTfD9AwR+1thklKO3oaaLEHb6TmnkD79rEz -9WsiVxoN7vqqWdgoeyl7REOB6WLQp8kYS4FoRG0QB/ZS8Hs/Tf17QPnrQNiMkvP7 -sJSHmlaMKXjWXK0VoN94kfZKUXwkzLD1VXuXFCnUkznWU0tahYi06b8/SVXc6EG+ -0mzylckH7UnjOQfxSFAlZ+e/PiX80tcPakxYbk+f1Nv7L0NOyhrDv18KUbv9mEpV -Ysild1m7/QSF0u1qmjmGNQ== ------END DSA PRIVATE KEY----- diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/parse-asn1/test/pass2.dsa.1024.pub b/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/parse-asn1/test/pass2.dsa.1024.pub deleted file mode 100644 index 80a731ea..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/parse-asn1/test/pass2.dsa.1024.pub +++ /dev/null @@ -1,12 +0,0 @@ ------BEGIN PUBLIC KEY----- -MIIBtzCCASwGByqGSM44BAEwggEfAoGBAOY0KsTt5EpJ4LtlD3xRS5mDiGE1CMNp -0S9X0sK8kP8Aps8iYwMLbZYglk18GCNnCk4SjbAnZHSB3kaIv6AKQc2J8W2YV5se -3VhpKOFst7bqRtkGsl8uJtGlKTiXNclkv2jsKOrsBokSD1USGCECTNeMt3OgziRc -Z1dS+djSOZ2nAhUAzB96SpxlAak+K/QLVJ+lDe5DcY0CgYEAtxX1/HckvhlhHQyK -ZWLQsDfZBILbhc+OLDpOyT6cJS/sJzfFIYZgK5M3rOS4OmzdYfJccQAuGq+TVJQ3 -VcYOdbrIANJV8CDrn4jkkejTzJI6fCwAkPWOyxw8kbV1Hsoy6WLfSCHKpBUcrogA -qRGESqBVTawjyF/ECX667y/P49MDgYQAAoGAXYmxO4+52C1gBzh7GgTwNLJl7bLn -gOhKTFlKhT36VjMjeFfdXmBVBVbfUottKZby/gVX1IXT38PStB/dswbF45bGDdoS -zMFjYmHTtLtrU/4hReVtvb5MYmrPDFX58SwcSRRO/cH6WJPvfu4Aq0cJZA9Kb0B9 -5Wo18JxAqvPtTB8= ------END PUBLIC KEY----- diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/parse-asn1/test/rsa.1024.priv b/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/parse-asn1/test/rsa.1024.priv deleted file mode 100644 index d3b5fdab..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/parse-asn1/test/rsa.1024.priv +++ /dev/null @@ -1,15 +0,0 @@ ------BEGIN RSA PRIVATE KEY----- -MIICVAIBAAJ/OwswbFo/uyC8ltGf/yA1A+gV5IGdnAgPbUSI3GzbHCA+x+TLG/tL -vbRw3r1smppY/jkkpiVW1ErSMuN0uixp5gb78Z9rH1XpWb5WWgp3WaY/9EHMjMdO -kQ/9LVZvRvl/M/Fi6owP+q+amJI1BEjECYfbhGL3rmlVdq4qXc40QwIDAQABAn8I -VZ0BPoAOhyF33KFMHxy8r28fsVgxJUYgM3NqQgdv4fFawCYXjhJz9duU5YJGFJGJ -WUGeHlkyYFlpi4f3m7tY7JawmQUWB0MNSoKHI3cgDX4/tfBN8ni+cO0eSoR5czBY -EsAHBU47p1awNFAHwd+ZEuv9H4RmMn7p279rQTtpAkAH3Nqs2/vrRF2cZUN4fIXf -4xHsQBByUayGq8a3J0UGaSFWv68zTUKFherr9uZotNp7NJ4jBXiARw0q8docXUG1 -AkAHgmOKHoORtAmikqpmFEJZOtsXMaLCIm4EszPo5ciYoLMBcVit09AdiQlt7ZJL -DY02svU1b0agCZ97kDkmHDkXAkACa8M9JELuDs/P/vIGYDkMVatIFfW6bWF02eFG -taWwMqCcSEsWvbw0xqYt34jURpNbCjmCyQVwYfAw/+TLhP9dAkAFwRjdwjw37qpj -ddg1mNiu37b7swFxmkiMOXZRxaNNsfb56A14RpN3zob3QdGUybGodMIKTFbmU/lu -CjqAxafJAkAG2yf6RWbwFIWfMyt7WYCh0VaGBCcgy574AinVieEo3ZZyFfC63+xm -3uoaNy4iLoJv4GCjqUBz3ZfcVaO/DDWG ------END RSA PRIVATE KEY----- diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/parse-asn1/test/rsa.1024.pub b/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/parse-asn1/test/rsa.1024.pub deleted file mode 100644 index 7ba06369..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/parse-asn1/test/rsa.1024.pub +++ /dev/null @@ -1,5 +0,0 @@ ------BEGIN RSA PUBLIC KEY----- -MIGGAn87CzBsWj+7ILyW0Z//IDUD6BXkgZ2cCA9tRIjcbNscID7H5Msb+0u9tHDe -vWyamlj+OSSmJVbUStIy43S6LGnmBvvxn2sfVelZvlZaCndZpj/0QcyMx06RD/0t -Vm9G+X8z8WLqjA/6r5qYkjUESMQJh9uEYveuaVV2ripdzjRDAgMBAAE= ------END RSA PUBLIC KEY----- diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/parse-asn1/test/rsa.2028.priv b/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/parse-asn1/test/rsa.2028.priv deleted file mode 100644 index 10e651d8..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/parse-asn1/test/rsa.2028.priv +++ /dev/null @@ -1,27 +0,0 @@ ------BEGIN RSA PRIVATE KEY----- -MIIEjwIBAAKB/gy7mjaWgPeFdVYDZWRCA9BNiv3pPb0es27+FKY0hszLaOw47ExC -tAWpDsH48TXAfyHBYwBLguayfk4LGIupxb+CGMbRo3xEp0CbfY1Jby26T9vGjRC1 -foHDDUJG84uaRbyHqaf4i6zt4gVR+xlAEIjkaFAAK8cOoXAT1CVqGLLljUCchL8P -jaHj/yriZ/S7rdwlI3LnABxwwmLrmR/v71WtpmO/aNG8N+1po+QwaghTkyQ59E/Z -vAuOkFWHok2q/R6PYAa2jdZ9zim0FqOP+nkQaEDRbBFBmBqTv5fFGfk2WsAfKf/R -G0/VFd+ZeM5251TeTvXH695nlSGauVl9AgMBAAECgf4LrWHY/l54ouThZWvvbrug -pfz6sJX2g9l7yXmWlEWsPECVo/7SUbpYFpt6OZy99zSg+IKbGqWKfdhoKrTwIVtC -L0YZ0NlmdnANSIz0roxQG7ZxkL5+vHSw/PmD9x4Uwf+Cz8hATCmNBv1qc60dkyuW -4CLqe72qaTiVWRoO1iagQghNcLoo6vSy65ExLaCDTPha7yu2vw4hFZpWiEjW4dxf -rFdLiix52BC86YlAlxME/rLg8IJVvilbyo9aWdXmxOaUTLRv6PkFD1/gVdw8V9Qr -SLN9FlK2kkjiX0dzoibvZw3tMnt3yydAx0X87+sMRVahC1bp3kVPz4Hy0EWX4QJ/ -PM31vGiuITk2NCd51DXt1Ltn2OP5FaJSmCaEjh0XkU4qouYyjXWt8Bu6BTCl2vua -Fg0Uji9C+IkPLmaUMbMIOwaTk8cWqLthSxsLe70J5OkGrgfKUM/w+BHH1Pt/Pjzj -C++l0kiFaOVDVaAV9GpLPLCBoK/PC9Rb/rxMMoCCNwJ/NZuedIny2w3LMii77h/T -zSvergNGhjY6Rnva8lLXJ6dlrkcPAyps3gWwxqj4NR0T+GM0bDUPVLb7M07XV7SX -v7VJGm52JbRGwM1ss+r8XTTNemeGk+WRxG7TgtsMqYGXLfB8Qxk/f5/Mcc00Tl8u -wXFNsfxJxmt6AbsTr3g36wJ/IhOnibz9Ad+nchlBnN3QeW3CKHqzaR18voqvtVm2 -kJfHK15prH/sSGmxmiEGgrCJTZxtDbaNCO7/VBjnKudUUIhCAwsLtuq0/zub9vAd -8G1scfIpv5qaSNzmKoX8bOwArvrS6wP7yKrcTsuWIlHD8rJVI7IEDnQoTp5G8fK1 -hwJ/MIh8M5v0r5dUYEv6oIJWGcle6AH1JmsP5WIafgq72Z2288pHcCFHwNY8Dg9J -76QswVLnUhPTlmm3EOOPGEtam2iAD5r0Afytlb4lbNoQsj2szeXONDXB+6oueajh -VNELUr8HcSP5lgzRZjJW6aFIzj9LDRmQnUAOjGSXVOQtEwJ/MCQZ7N/v4dIKeDRA -8d8UExZ3+gGHumziztGRJ0tQryZH2PakP5I7V+1l7qEUnJ2c3mF+e1v41Ep9LCvh -bzrPKw9dxh18g4b+7bMpsWPnsraKh6ipxc7aaOaZV0Dxgez4zcZu0P1olO0cN3KM -nxJ0Pds3R8bAhNCDdS2JZaRp5Q== ------END RSA PRIVATE KEY----- diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/parse-asn1/test/rsa.2028.pub b/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/parse-asn1/test/rsa.2028.pub deleted file mode 100644 index b36dca4d..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/parse-asn1/test/rsa.2028.pub +++ /dev/null @@ -1,8 +0,0 @@ ------BEGIN RSA PUBLIC KEY----- -MIIBBgKB/gy7mjaWgPeFdVYDZWRCA9BNiv3pPb0es27+FKY0hszLaOw47ExCtAWp -DsH48TXAfyHBYwBLguayfk4LGIupxb+CGMbRo3xEp0CbfY1Jby26T9vGjRC1foHD -DUJG84uaRbyHqaf4i6zt4gVR+xlAEIjkaFAAK8cOoXAT1CVqGLLljUCchL8PjaHj -/yriZ/S7rdwlI3LnABxwwmLrmR/v71WtpmO/aNG8N+1po+QwaghTkyQ59E/ZvAuO -kFWHok2q/R6PYAa2jdZ9zim0FqOP+nkQaEDRbBFBmBqTv5fFGfk2WsAfKf/RG0/V -Fd+ZeM5251TeTvXH695nlSGauVl9AgMBAAE= ------END RSA PUBLIC KEY----- diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/parse-asn1/test/vector.js b/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/parse-asn1/test/vector.js deleted file mode 100644 index 4b8d8cf5..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/parse-asn1/test/vector.js +++ /dev/null @@ -1,7 +0,0 @@ -module.exports = { - p: new Buffer('86F5CA03DCFEB225063FF830A0C769B9DD9D6153AD91D7CE27F787C43278B447E6533B86B18BED6E8A48B784A14C252C5BE0DBF60B86D6385BD2F12FB763ED8873ABFD3F5BA2E0A8C0A59082EAC056935E529DAF7C610467899C77ADEDFC846C881870B7B19B2B58F9BE0521A17002E3BDD6B86685EE90B3D9A1B02B782B1779', 'hex'), - q: new Buffer('996F967F6C8E388D9E28D01E205FBA957A5698B1', 'hex'), - g: new Buffer('07B0F92546150B62514BB771E2A0C0CE387F03BDA6C56B505209FF25FD3C133D89BBCD97E904E09114D9A7DEFDEADFC9078EA544D2E401AEECC40BB9FBBF78FD87995A10A1C27CB7789B594BA7EFB5C4326A9FE59A070E136DB77175464ADCA417BE5DCE2F40D10A46A3A3943F26AB7FD9C0398FF8C76EE0A56826A8A88F1DBD', 'hex'), - x: new Buffer('411602CB19A6CCC34494D79D98EF1E7ED5AF25F7', 'hex'), - y: new Buffer('5DF5E01DED31D0297E274E1691C192FE5868FEF9E19A84776454B100CF16F65392195A38B90523E2542EE61871C0440CB87C322FC4B4D2EC5E1E7EC766E1BE8D4CE935437DC11C3C8FD426338933EBFE739CB3465F4D3668C5E473508253B1E682F65CBDC4FAE93C2EA212390E54905A86E2223170B44EAA7DA5DD9FFCFB7F3B', 'hex') -} diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/parse-asn1/test/vector.priv b/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/parse-asn1/test/vector.priv deleted file mode 100644 index 178bd1e6..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/parse-asn1/test/vector.priv +++ /dev/null @@ -1,12 +0,0 @@ ------BEGIN DSA PRIVATE KEY----- -MIIBugIBAAKBgQCG9coD3P6yJQY/+DCgx2m53Z1hU62R184n94fEMni0R+ZTO4ax -i+1uiki3hKFMJSxb4Nv2C4bWOFvS8S+3Y+2Ic6v9P1ui4KjApZCC6sBWk15Sna98 -YQRniZx3re38hGyIGHC3sZsrWPm+BSGhcALjvda4ZoXukLPZobAreCsXeQIVAJlv -ln9sjjiNnijQHiBfupV6VpixAoGAB7D5JUYVC2JRS7dx4qDAzjh/A72mxWtQUgn/ -Jf08Ez2Ju82X6QTgkRTZp9796t/JB46lRNLkAa7sxAu5+794/YeZWhChwny3eJtZ -S6fvtcQyap/lmgcOE223cXVGStykF75dzi9A0QpGo6OUPyarf9nAOY/4x27gpWgm -qKiPHb0CgYBd9eAd7THQKX4nThaRwZL+WGj++eGahHdkVLEAzxb2U5IZWji5BSPi -VC7mGHHARAy4fDIvxLTS7F4efsdm4b6NTOk1Q33BHDyP1CYziTPr/nOcs0ZfTTZo -xeRzUIJTseaC9ly9xPrpPC6iEjkOVJBahuIiMXC0Tqp9pd2f/Pt/OwIUQRYCyxmm -zMNElNedmO8eftWvJfc= ------END DSA PRIVATE KEY----- diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/parse-asn1/test/vector2.priv b/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/parse-asn1/test/vector2.priv deleted file mode 100644 index ef53f614..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/node_modules/parse-asn1/test/vector2.priv +++ /dev/null @@ -1,19 +0,0 @@ ------BEGIN DSA PRIVATE KEY----- -MIIDVQIBAAKCAQEAnbb7WVG2a7b+HhQPHSzlUCN0Fh/WU43xZIIYZC8LXEjI96Qa -rfoYcyS4dnT6GCKwDx7PgTaUPXxVdXJk5aGkT/4BLpk24AwdPpMQsBx9F5gF0wWL -Kp9Ltvlxa/5hF8a1s8xNm+NBEErUqArWyU4AX0uZPhTwketRdDvzMFDDjeI1Vn4b -NMPWpcDOqhoPNoITw9GYQ9C0sJ3Ln8ctOcjeQfG/FNS7RWPKKDcWIcrTMktqLTkh -Rb6/rHSIBSNvXKL+krhxzY+cNtMpK1UJyoyqd6Kt/Hv9d92m9xElp0Vv6hU+QzJW -oiYcagbtNpN5fnmV+tWqu8++PtonQeN1QEriWwIhAPLDEZN0znbJNWmQtGU3Shfy -P57TUIm9lp9hxt3pmYwfAoIBAFx/9rBvjxQ/6CiEM0k+R2nE2Yis5b4loOJICWcH -FsYT17DO5pMvj6p8RNLLJFI9pT++T27DWViS0apYxDKKBsRqFWYufqpwOh3s+Luy -0F2+LrlWwUKjOGYdEEYcDRNUcghQV/NJQwn/pzxhH3izKtu1dAw2HJ81vpCZfbIB -Ti71qmF4L1Kr64vWQyxN0Je8VCOyhdr7YNw2ToFh9KKjWso6ELHE0gPMdqRwozr9 -y92SlZhZq9i1bhclJS146sZucbqa4/HdJIcZmHQ5PNTYMhhoAGVHYOHjTAnk0VUX -n57A3ERz+Za9zm7tHKvti28Rb3rZz1Bd8PmY40qydRSw/+cCggEAZnCYxlRCbHjX -+CAerGwgPvAw1DYFAywvH6k35SN9vZSfNKCiVk/hJtyLcVxRQYAs4JecgkZGPEDm -tr2qJRP6YRcocWwuT9U7yVuJ5plJ2WUS6HO5yPjf1JnMMSiCVhreyzH2WOk0wMGX -8sTZawXLrWc4Hnt2iJHk2jhD0k2UzftRJum4vyHoNY7g4KMO8T/WpmTA3ONzH3+0 -mkhFpP2CVGh5cqLTglmcm6xODteZgZMHiRMDJVgTSXZBC4nSwXHRI6w1/ZdyGVl6p9FcGppCjlkZT3XHIevLz65EaWpJmvp04EKZ8TICZgFjjLh6t5GQ1KCYY -xXajuxlYck4mWvq3wIgacdUjCHQ3+prmlHJ6tTifDPTs/GAMW5byrkskz8OTbw= ------END DSA PRIVATE KEY----- diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/package.json b/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/package.json deleted file mode 100644 index d3dd9cb8..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/package.json +++ /dev/null @@ -1,75 +0,0 @@ -{ - "name": "browserify-sign", - "version": "4.0.0", - "description": "adds node crypto signing for browsers", - "main": "index.js", - "browser": "browser.js", - "scripts": { - "unit": "node test/index.js | tspec", - "standard": "standard", - "test": "npm run standard && npm run unit" - }, - "repository": { - "type": "git", - "url": "git://github.com/crypto-browserify/browserify-sign.git" - }, - "author": "", - "license": "ISC", - "dependencies": { - "bn.js": "^4.1.1", - "browserify-rsa": "^4.0.0", - "create-hash": "^1.1.0", - "create-hmac": "^1.1.2", - "elliptic": "^6.0.0", - "inherits": "^2.0.1", - "parse-asn1": "^5.0.0" - }, - "devDependencies": { - "tap-spec": "^1.0.1", - "tape": "^3.0.3", - "standard": "^5.0.0" - }, - "gitHead": "7e4d3cf65624fbf58c027835a5e2c70de19cd640", - "bugs": { - "url": "https://github.com/crypto-browserify/browserify-sign/issues" - }, - "homepage": "https://github.com/crypto-browserify/browserify-sign#readme", - "_id": "browserify-sign@4.0.0", - "_shasum": "10773910c3c206d5420a46aad8694f820b85968f", - "_from": "browserify-sign@>=4.0.0 <5.0.0", - "_npmVersion": "2.9.0", - "_nodeVersion": "4.2.1", - "_npmUser": { - "name": "cwmma", - "email": "calvin.metcalf@gmail.com" - }, - "dist": { - "shasum": "10773910c3c206d5420a46aad8694f820b85968f", - "tarball": "https://registry.npmjs.org/browserify-sign/-/browserify-sign-4.0.0.tgz" - }, - "maintainers": [ - { - "name": "cwmma", - "email": "calvin.metcalf@gmail.com" - }, - { - "name": "dcousens", - "email": "email@dcousens.com" - }, - { - "name": "dominictarr", - "email": "dominic.tarr@gmail.com" - }, - { - "name": "jprichardson", - "email": "jprichardson@gmail.com" - }, - { - "name": "indutny", - "email": "fedor@indutny.com" - } - ], - "directories": {}, - "_resolved": "https://registry.npmjs.org/browserify-sign/-/browserify-sign-4.0.0.tgz", - "readme": "ERROR: No README data found!" -} diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/sign.js b/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/sign.js deleted file mode 100644 index 571f24de..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/sign.js +++ /dev/null @@ -1,185 +0,0 @@ -// much of this based on https://github.com/indutny/self-signed/blob/gh-pages/lib/rsa.js -var createHmac = require('create-hmac') -var crt = require('browserify-rsa') -var curves = require('./curves') -var elliptic = require('elliptic') -var parseKeys = require('parse-asn1') - -var BN = require('bn.js') -var EC = elliptic.ec - -function sign (hash, key, hashType, signType) { - var priv = parseKeys(key) - if (priv.curve) { - if (signType !== 'ecdsa') throw new Error('wrong private key type') - - return ecSign(hash, priv) - } else if (priv.type === 'dsa') { - if (signType !== 'dsa') { - throw new Error('wrong private key type') - } - return dsaSign(hash, priv, hashType) - } else { - if (signType !== 'rsa') throw new Error('wrong private key type') - } - - var len = priv.modulus.byteLength() - var pad = [ 0, 1 ] - while (hash.length + pad.length + 1 < len) { - pad.push(0xff) - } - pad.push(0x00) - var i = -1 - while (++i < hash.length) { - pad.push(hash[i]) - } - - var out = crt(pad, priv) - return out -} - -function ecSign (hash, priv) { - var curveId = curves[priv.curve.join('.')] - if (!curveId) throw new Error('unknown curve ' + priv.curve.join('.')) - - var curve = new EC(curveId) - var key = curve.genKeyPair() - - key._importPrivate(priv.privateKey) - var out = key.sign(hash) - - return new Buffer(out.toDER()) -} - -function dsaSign (hash, priv, algo) { - var x = priv.params.priv_key - var p = priv.params.p - var q = priv.params.q - var g = priv.params.g - var r = new BN(0) - var k - var H = bits2int(hash, q).mod(q) - var s = false - var kv = getKey(x, q, hash, algo) - while (s === false) { - k = makeKey(q, kv, algo) - r = makeR(g, k, p, q) - s = k.invm(q).imul(H.add(x.mul(r))).mod(q) - if (!s.cmpn(0)) { - s = false - r = new BN(0) - } - } - return toDER(r, s) -} - -function toDER (r, s) { - r = r.toArray() - s = s.toArray() - - // Pad values - if (r[0] & 0x80) { - r = [ 0 ].concat(r) - } - // Pad values - if (s[0] & 0x80) { - s = [0].concat(s) - } - - var total = r.length + s.length + 4 - var res = [ 0x30, total, 0x02, r.length ] - res = res.concat(r, [ 0x02, s.length ], s) - return new Buffer(res) -} - -function getKey (x, q, hash, algo) { - x = new Buffer(x.toArray()) - if (x.length < q.byteLength()) { - var zeros = new Buffer(q.byteLength() - x.length) - zeros.fill(0) - x = Buffer.concat([zeros, x]) - } - var hlen = hash.length - var hbits = bits2octets(hash, q) - var v = new Buffer(hlen) - v.fill(1) - var k = new Buffer(hlen) - k.fill(0) - k = createHmac(algo, k) - .update(v) - .update(new Buffer([0])) - .update(x) - .update(hbits) - .digest() - v = createHmac(algo, k) - .update(v) - .digest() - k = createHmac(algo, k) - .update(v) - .update(new Buffer([1])) - .update(x) - .update(hbits) - .digest() - v = createHmac(algo, k) - .update(v) - .digest() - return { - k: k, - v: v - } -} - -function bits2int (obits, q) { - var bits = new BN(obits) - var shift = (obits.length << 3) - q.bitLength() - if (shift > 0) { - bits.ishrn(shift) - } - return bits -} - -function bits2octets (bits, q) { - bits = bits2int(bits, q) - bits = bits.mod(q) - var out = new Buffer(bits.toArray()) - if (out.length < q.byteLength()) { - var zeros = new Buffer(q.byteLength() - out.length) - zeros.fill(0) - out = Buffer.concat([zeros, out]) - } - return out -} - -function makeKey (q, kv, algo) { - var t, k - - do { - t = new Buffer('') - - while (t.length * 8 < q.bitLength()) { - kv.v = createHmac(algo, kv.k) - .update(kv.v) - .digest() - t = Buffer.concat([t, kv.v]) - } - - k = bits2int(t, q) - kv.k = createHmac(algo, kv.k) - .update(kv.v) - .update(new Buffer([0])) - .digest() - kv.v = createHmac(algo, kv.k) - .update(kv.v) - .digest() - } while (k.cmp(q) !== -1) - - return k -} - -function makeR (g, k, p, q) { - return g.toRed(BN.mont(p)).redPow(k).fromRed().mod(q) -} - -module.exports = sign -module.exports.getKey = getKey -module.exports.makeKey = makeKey diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/verify.js b/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/verify.js deleted file mode 100644 index cc5e7fe5..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/browserify-sign/verify.js +++ /dev/null @@ -1,103 +0,0 @@ -// much of this based on https://github.com/indutny/self-signed/blob/gh-pages/lib/rsa.js -var curves = require('./curves') -var elliptic = require('elliptic') -var parseKeys = require('parse-asn1') - -var BN = require('bn.js') -var EC = elliptic.ec - -function verify (sig, hash, key, signType) { - var pub = parseKeys(key) - if (pub.type === 'ec') { - if (signType !== 'ecdsa') { - throw new Error('wrong public key type') - } - return ecVerify(sig, hash, pub) - } else if (pub.type === 'dsa') { - if (signType !== 'dsa') { - throw new Error('wrong public key type') - } - return dsaVerify(sig, hash, pub) - } else { - if (signType !== 'rsa') { - throw new Error('wrong public key type') - } - } - var len = pub.modulus.byteLength() - var pad = [ 1 ] - var padNum = 0 - while (hash.length + pad.length + 2 < len) { - pad.push(0xff) - padNum++ - } - pad.push(0x00) - var i = -1 - while (++i < hash.length) { - pad.push(hash[i]) - } - pad = new Buffer(pad) - var red = BN.mont(pub.modulus) - sig = new BN(sig).toRed(red) - - sig = sig.redPow(new BN(pub.publicExponent)) - - sig = new Buffer(sig.fromRed().toArray()) - var out = 0 - if (padNum < 8) { - out = 1 - } - len = Math.min(sig.length, pad.length) - if (sig.length !== pad.length) { - out = 1 - } - - i = -1 - while (++i < len) { - out |= (sig[i] ^ pad[i]) - } - return out === 0 -} - -function ecVerify (sig, hash, pub) { - var curveId = curves[pub.data.algorithm.curve.join('.')] - if (!curveId) throw new Error('unknown curve ' + pub.data.algorithm.curve.join('.')) - - var curve = new EC(curveId) - var pubkey = pub.data.subjectPrivateKey.data - - return curve.verify(hash, sig, pubkey) -} - -function dsaVerify (sig, hash, pub) { - var p = pub.data.p - var q = pub.data.q - var g = pub.data.g - var y = pub.data.pub_key - var unpacked = parseKeys.signature.decode(sig, 'der') - var s = unpacked.s - var r = unpacked.r - checkValue(s, q) - checkValue(r, q) - var montp = BN.mont(p) - var w = s.invm(q) - var v = g.toRed(montp) - .redPow(new BN(hash).mul(w).mod(q)) - .fromRed() - .mul( - y.toRed(montp) - .redPow(r.mul(w).mod(q)) - .fromRed() - ).mod(p).mod(q) - return !v.cmp(r) -} - -function checkValue (b, q) { - if (b.cmpn(0) <= 0) { - throw new Error('invalid sig') - } - if (b.cmp(q) >= q) { - throw new Error('invalid sig') - } -} - -module.exports = verify diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/create-ecdh/.npmignore b/node_modules/browserify/node_modules/crypto-browserify/node_modules/create-ecdh/.npmignore deleted file mode 100644 index daa60294..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/create-ecdh/.npmignore +++ /dev/null @@ -1 +0,0 @@ -test.js diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/create-ecdh/.travis.yml b/node_modules/browserify/node_modules/crypto-browserify/node_modules/create-ecdh/.travis.yml deleted file mode 100644 index 254335b2..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/create-ecdh/.travis.yml +++ /dev/null @@ -1,7 +0,0 @@ -language: node_js - -node_js: - - "0.10" - - "0.11" - - "0.12" - - "iojs" \ No newline at end of file diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/create-ecdh/browser.js b/node_modules/browserify/node_modules/crypto-browserify/node_modules/create-ecdh/browser.js deleted file mode 100644 index c24c9752..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/create-ecdh/browser.js +++ /dev/null @@ -1,122 +0,0 @@ -var elliptic = require('elliptic'); -var BN = require('bn.js'); - -module.exports = function createECDH(curve) { - return new ECDH(curve); -}; - -var aliases = { - secp256k1: { - name: 'secp256k1', - byteLength: 32 - }, - secp224r1: { - name: 'p224', - byteLength: 28 - }, - prime256v1: { - name: 'p256', - byteLength: 32 - }, - prime192v1: { - name: 'p192', - byteLength: 24 - }, - ed25519: { - name: 'ed25519', - byteLength: 32 - }, - secp384r1: { - name: 'p384', - byteLength: 48 - }, - secp521r1: { - name: 'p521', - byteLength: 66 - } -}; - -aliases.p224 = aliases.secp224r1; -aliases.p256 = aliases.secp256r1 = aliases.prime256v1; -aliases.p192 = aliases.secp192r1 = aliases.prime192v1; -aliases.p384 = aliases.secp384r1; -aliases.p521 = aliases.secp521r1; - -function ECDH(curve) { - this.curveType = aliases[curve]; - if (!this.curveType ) { - this.curveType = { - name: curve - }; - } - this.curve = new elliptic.ec(this.curveType.name); - this.keys = void 0; -} - -ECDH.prototype.generateKeys = function (enc, format) { - this.keys = this.curve.genKeyPair(); - return this.getPublicKey(enc, format); -}; - -ECDH.prototype.computeSecret = function (other, inenc, enc) { - inenc = inenc || 'utf8'; - if (!Buffer.isBuffer(other)) { - other = new Buffer(other, inenc); - } - var otherPub = this.curve.keyFromPublic(other).getPublic(); - var out = otherPub.mul(this.keys.getPrivate()).getX(); - return formatReturnValue(out, enc, this.curveType.byteLength); -}; - -ECDH.prototype.getPublicKey = function (enc, format) { - var key = this.keys.getPublic(format === 'compressed', true); - if (format === 'hybrid') { - if (key[key.length - 1] % 2) { - key[0] = 7; - } else { - key [0] = 6; - } - } - return formatReturnValue(key, enc); -}; - -ECDH.prototype.getPrivateKey = function (enc) { - return formatReturnValue(this.keys.getPrivate(), enc); -}; - -ECDH.prototype.setPublicKey = function (pub, enc) { - enc = enc || 'utf8'; - if (!Buffer.isBuffer(pub)) { - pub = new Buffer(pub, enc); - } - this.keys._importPublic(pub); - return this; -}; - -ECDH.prototype.setPrivateKey = function (priv, enc) { - enc = enc || 'utf8'; - if (!Buffer.isBuffer(priv)) { - priv = new Buffer(priv, enc); - } - var _priv = new BN(priv); - _priv = _priv.toString(16); - this.keys._importPrivate(_priv); - return this; -}; - -function formatReturnValue(bn, enc, len) { - if (!Array.isArray(bn)) { - bn = bn.toArray(); - } - var buf = new Buffer(bn); - if (len && buf.length < len) { - var zeros = new Buffer(len - buf.length); - zeros.fill(0); - buf = Buffer.concat([zeros, buf]); - } - if (!enc) { - return buf; - } else { - return buf.toString(enc); - } -} diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/create-ecdh/index.js b/node_modules/browserify/node_modules/crypto-browserify/node_modules/create-ecdh/index.js deleted file mode 100644 index 90857b7b..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/create-ecdh/index.js +++ /dev/null @@ -1,3 +0,0 @@ -var createECDH = require('crypto').createECDH; - -module.exports = createECDH || require('./browser'); \ No newline at end of file diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/create-ecdh/node_modules/bn.js/.npmignore b/node_modules/browserify/node_modules/crypto-browserify/node_modules/create-ecdh/node_modules/bn.js/.npmignore deleted file mode 100644 index 6d1eebbd..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/create-ecdh/node_modules/bn.js/.npmignore +++ /dev/null @@ -1,6 +0,0 @@ -benchmarks/ -coverage/ -node_modules/ -npm-debug.log -1.js -logo.png diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/create-ecdh/node_modules/bn.js/.travis.yml b/node_modules/browserify/node_modules/crypto-browserify/node_modules/create-ecdh/node_modules/bn.js/.travis.yml deleted file mode 100644 index 936b7b78..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/create-ecdh/node_modules/bn.js/.travis.yml +++ /dev/null @@ -1,15 +0,0 @@ -sudo: false -language: node_js -node_js: - - "0.10" - - "0.12" - - "4" - - "5" -env: - matrix: - - TEST_SUITE=unit -matrix: - include: - - node_js: "4" - env: TEST_SUITE=lint -script: npm run $TEST_SUITE diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/create-ecdh/node_modules/bn.js/README.md b/node_modules/browserify/node_modules/crypto-browserify/node_modules/create-ecdh/node_modules/bn.js/README.md deleted file mode 100644 index fee65baa..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/create-ecdh/node_modules/bn.js/README.md +++ /dev/null @@ -1,219 +0,0 @@ -# bn.js - -> BigNum in pure javascript - -[![Build Status](https://secure.travis-ci.org/indutny/bn.js.png)](http://travis-ci.org/indutny/bn.js) - -## Install -`npm install --save bn.js` - -## Usage - -```js -const BN = require('bn.js'); - -var a = new BN('dead', 16); -var b = new BN('101010', 2); - -var res = a.add(b); -console.log(res.toString(10)); // 57047 -``` - -**Note**: decimals are not supported in this library. - -## Notation - -### Prefixes - -There are several prefixes to instructions that affect the way the work. Here -is the list of them in the order of appearance in the function name: - -* `i` - perform operation in-place, storing the result in the host object (on - which the method was invoked). Might be used to avoid number allocation costs -* `u` - unsigned, ignore the sign of operands when performing operation, or - always return positive value. Second case applies to reduction operations - like `mod()`. In such cases if the result will be negative - modulo will be - added to the result to make it positive - -### Postfixes - -The only available postfix at the moment is: - -* `n` - which means that the argument of the function must be a plain JavaScript - number - -### Examples - -* `a.iadd(b)` - perform addition on `a` and `b`, storing the result in `a` -* `a.pmod(b)` - reduce `a` modulo `b`, returning positive value -* `a.iushln(13)` - shift bits of `a` left by 13 - -## Instructions - -Prefixes/postfixes are put in parens at the of the line. `endian` - could be -either `le` (little-endian) or `be` (big-endian). - -### Utilities - -* `a.clone()` - clone number -* `a.toString(base, length)` - convert to base-string and pad with zeroes -* `a.toNumber()` - convert to Javascript Number (limited to 53 bits) -* `a.toJSON()` - convert to JSON compatible hex string (alias of `toString(16)`) -* `a.toArray(endian, length)` - convert to byte `Array`, and optionally zero - pad to length, throwing if already exceeding -* `a.toArrayLike(type, endian, length)` - convert to an instance of `type`, - which must behave like an `Array` -* `a.toBuffer(endian, length)` - convert to Node.js Buffer (if available) -* `a.bitLength()` - get number of bits occupied -* `a.zeroBits()` - return number of less-significant consequent zero bits - (example: `1010000` has 4 zero bits) -* `a.byteLength()` - return number of bytes occupied -* `a.isNeg()` - true if the number is negative -* `a.isEven()` - no comments -* `a.isOdd()` - no comments -* `a.isZero()` - no comments -* `a.cmp(b)` - compare numbers and return `-1` (a `<` b), `0` (a `==` b), or `1` (a `>` b) - depending on the comparison result (`ucmp`, `cmpn`) -* `a.lt(b)` - `a` less than `b` (`n`) -* `a.lte(b)` - `a` less than or equals `b` (`n`) -* `a.gt(b)` - `a` greater than `b` (`n`) -* `a.gte(b)` - `a` greater than or equals `b` (`n`) -* `a.eq(b)` - `a` equals `b` (`n`) -* `a.toTwos(width)` - convert to two's complement representation, where `width` is bit width -* `a.fromTwos(width)` - convert from two's complement representation, where `width` is the bit width -* `a.isBN(object)` - returns true if the supplied `object` is a BN.js instance - -### Arithmetics - -* `a.neg()` - negate sign (`i`) -* `a.abs()` - absolute value (`i`) -* `a.add(b)` - addition (`i`, `n`, `in`) -* `a.sub(b)` - subtraction (`i`, `n`, `in`) -* `a.mul(b)` - multiply (`i`, `n`, `in`) -* `a.sqr()` - square (`i`) -* `a.pow(b)` - raise `a` to the power of `b` -* `a.div(b)` - divide (`divn`, `idivn`) -* `a.mod(b)` - reduct (`u`, `n`) (but no `umodn`) -* `a.divRound(b)` - rounded division - -### Bit operations - -* `a.or(b)` - or (`i`, `u`, `iu`) -* `a.and(b)` - and (`i`, `u`, `iu`, `andln`) (NOTE: `andln` is going to be replaced - with `andn` in future) -* `a.xor(b)` - xor (`i`, `u`, `iu`) -* `a.setn(b)` - set specified bit to `1` -* `a.shln(b)` - shift left (`i`, `u`, `iu`) -* `a.shrn(b)` - shift right (`i`, `u`, `iu`) -* `a.testn(b)` - test if specified bit is set -* `a.maskn(b)` - clear bits with indexes higher or equal to `b` (`i`) -* `a.bincn(b)` - add `1 << b` to the number -* `a.notn(w)` - not (for the width specified by `w`) (`i`) - -### Reduction - -* `a.gcd(b)` - GCD -* `a.egcd(b)` - Extended GCD results (`{ a: ..., b: ..., gcd: ... }`) -* `a.invm(b)` - inverse `a` modulo `b` - -## Fast reduction - -When doing lots of reductions using the same modulo, it might be beneficial to -use some tricks: like [Montgomery multiplication][0], or using special algorithm -for [Mersenne Prime][1]. - -### Reduction context - -To enable this tricks one should create a reduction context: - -```js -var red = BN.red(num); -``` -where `num` is just a BN instance. - -Or: - -```js -var red = BN.red(primeName); -``` - -Where `primeName` is either of these [Mersenne Primes][1]: - -* `'k256'` -* `'p224'` -* `'p192'` -* `'p25519'` - -Or: - -```js -var red = BN.mont(num); -``` - -To reduce numbers with [Montgomery trick][1]. `.mont()` is generally faster than -`.red(num)`, but slower than `BN.red(primeName)`. - -### Converting numbers - -Before performing anything in reduction context - numbers should be converted -to it. Usually, this means that one should: - -* Convert inputs to reducted ones -* Operate on them in reduction context -* Convert outputs back from the reduction context - -Here is how one may convert numbers to `red`: - -```js -var redA = a.toRed(red); -``` -Where `red` is a reduction context created using instructions above - -Here is how to convert them back: - -```js -var a = redA.fromRed(); -``` - -### Red instructions - -Most of the instructions from the very start of this readme have their -counterparts in red context: - -* `a.redAdd(b)`, `a.redIAdd(b)` -* `a.redSub(b)`, `a.redISub(b)` -* `a.redShl(num)` -* `a.redMul(b)`, `a.redIMul(b)` -* `a.redSqr()`, `a.redISqr()` -* `a.redSqrt()` - square root modulo reduction context's prime -* `a.redInvm()` - modular inverse of the number -* `a.redNeg()` -* `a.redPow(b)` - modular exponentiation - -## LICENSE - -This software is licensed under the MIT License. - -Copyright Fedor Indutny, 2015. - -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. - -[0]: https://en.wikipedia.org/wiki/Montgomery_modular_multiplication -[1]: https://en.wikipedia.org/wiki/Mersenne_prime diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/create-ecdh/node_modules/bn.js/lib/bn.js b/node_modules/browserify/node_modules/crypto-browserify/node_modules/create-ecdh/node_modules/bn.js/lib/bn.js deleted file mode 100644 index 29a4c51a..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/create-ecdh/node_modules/bn.js/lib/bn.js +++ /dev/null @@ -1,3427 +0,0 @@ -(function (module, exports) { - 'use strict'; - - // Utils - function assert (val, msg) { - if (!val) throw new Error(msg || 'Assertion failed'); - } - - // Could use `inherits` module, but don't want to move from single file - // architecture yet. - function inherits (ctor, superCtor) { - ctor.super_ = superCtor; - var TempCtor = function () {}; - TempCtor.prototype = superCtor.prototype; - ctor.prototype = new TempCtor(); - ctor.prototype.constructor = ctor; - } - - // BN - - function BN (number, base, endian) { - if (BN.isBN(number)) { - return number; - } - - this.negative = 0; - this.words = null; - this.length = 0; - - // Reduction context - this.red = null; - - if (number !== null) { - if (base === 'le' || base === 'be') { - endian = base; - base = 10; - } - - this._init(number || 0, base || 10, endian || 'be'); - } - } - if (typeof module === 'object') { - module.exports = BN; - } else { - exports.BN = BN; - } - - BN.BN = BN; - BN.wordSize = 26; - - var Buffer; - try { - Buffer = require('buf' + 'fer').Buffer; - } catch (e) { - } - - BN.isBN = function isBN (num) { - if (num instanceof BN) { - return true; - } - - return num !== null && typeof num === 'object' && - num.constructor.wordSize === BN.wordSize && Array.isArray(num.words); - }; - - BN.max = function max (left, right) { - if (left.cmp(right) > 0) return left; - return right; - }; - - BN.min = function min (left, right) { - if (left.cmp(right) < 0) return left; - return right; - }; - - BN.prototype._init = function init (number, base, endian) { - if (typeof number === 'number') { - return this._initNumber(number, base, endian); - } - - if (typeof number === 'object') { - return this._initArray(number, base, endian); - } - - if (base === 'hex') { - base = 16; - } - assert(base === (base | 0) && base >= 2 && base <= 36); - - number = number.toString().replace(/\s+/g, ''); - var start = 0; - if (number[0] === '-') { - start++; - } - - if (base === 16) { - this._parseHex(number, start); - } else { - this._parseBase(number, base, start); - } - - if (number[0] === '-') { - this.negative = 1; - } - - this.strip(); - - if (endian !== 'le') return; - - this._initArray(this.toArray(), base, endian); - }; - - BN.prototype._initNumber = function _initNumber (number, base, endian) { - if (number < 0) { - this.negative = 1; - number = -number; - } - if (number < 0x4000000) { - this.words = [ number & 0x3ffffff ]; - this.length = 1; - } else if (number < 0x10000000000000) { - this.words = [ - number & 0x3ffffff, - (number / 0x4000000) & 0x3ffffff - ]; - this.length = 2; - } else { - assert(number < 0x20000000000000); // 2 ^ 53 (unsafe) - this.words = [ - number & 0x3ffffff, - (number / 0x4000000) & 0x3ffffff, - 1 - ]; - this.length = 3; - } - - if (endian !== 'le') return; - - // Reverse the bytes - this._initArray(this.toArray(), base, endian); - }; - - BN.prototype._initArray = function _initArray (number, base, endian) { - // Perhaps a Uint8Array - assert(typeof number.length === 'number'); - if (number.length <= 0) { - this.words = [ 0 ]; - this.length = 1; - return this; - } - - this.length = Math.ceil(number.length / 3); - this.words = new Array(this.length); - for (var i = 0; i < this.length; i++) { - this.words[i] = 0; - } - - var j, w; - var off = 0; - if (endian === 'be') { - for (i = number.length - 1, j = 0; i >= 0; i -= 3) { - w = number[i] | (number[i - 1] << 8) | (number[i - 2] << 16); - this.words[j] |= (w << off) & 0x3ffffff; - this.words[j + 1] = (w >>> (26 - off)) & 0x3ffffff; - off += 24; - if (off >= 26) { - off -= 26; - j++; - } - } - } else if (endian === 'le') { - for (i = 0, j = 0; i < number.length; i += 3) { - w = number[i] | (number[i + 1] << 8) | (number[i + 2] << 16); - this.words[j] |= (w << off) & 0x3ffffff; - this.words[j + 1] = (w >>> (26 - off)) & 0x3ffffff; - off += 24; - if (off >= 26) { - off -= 26; - j++; - } - } - } - return this.strip(); - }; - - function parseHex (str, start, end) { - var r = 0; - var len = Math.min(str.length, end); - for (var i = start; i < len; i++) { - var c = str.charCodeAt(i) - 48; - - r <<= 4; - - // 'a' - 'f' - if (c >= 49 && c <= 54) { - r |= c - 49 + 0xa; - - // 'A' - 'F' - } else if (c >= 17 && c <= 22) { - r |= c - 17 + 0xa; - - // '0' - '9' - } else { - r |= c & 0xf; - } - } - return r; - } - - BN.prototype._parseHex = function _parseHex (number, start) { - // Create possibly bigger array to ensure that it fits the number - this.length = Math.ceil((number.length - start) / 6); - this.words = new Array(this.length); - for (var i = 0; i < this.length; i++) { - this.words[i] = 0; - } - - var j, w; - // Scan 24-bit chunks and add them to the number - var off = 0; - for (i = number.length - 6, j = 0; i >= start; i -= 6) { - w = parseHex(number, i, i + 6); - this.words[j] |= (w << off) & 0x3ffffff; - // NOTE: `0x3fffff` is intentional here, 26bits max shift + 24bit hex limb - this.words[j + 1] |= w >>> (26 - off) & 0x3fffff; - off += 24; - if (off >= 26) { - off -= 26; - j++; - } - } - if (i + 6 !== start) { - w = parseHex(number, start, i + 6); - this.words[j] |= (w << off) & 0x3ffffff; - this.words[j + 1] |= w >>> (26 - off) & 0x3fffff; - } - this.strip(); - }; - - function parseBase (str, start, end, mul) { - var r = 0; - var len = Math.min(str.length, end); - for (var i = start; i < len; i++) { - var c = str.charCodeAt(i) - 48; - - r *= mul; - - // 'a' - if (c >= 49) { - r += c - 49 + 0xa; - - // 'A' - } else if (c >= 17) { - r += c - 17 + 0xa; - - // '0' - '9' - } else { - r += c; - } - } - return r; - } - - BN.prototype._parseBase = function _parseBase (number, base, start) { - // Initialize as zero - this.words = [ 0 ]; - this.length = 1; - - // Find length of limb in base - for (var limbLen = 0, limbPow = 1; limbPow <= 0x3ffffff; limbPow *= base) { - limbLen++; - } - limbLen--; - limbPow = (limbPow / base) | 0; - - var total = number.length - start; - var mod = total % limbLen; - var end = Math.min(total, total - mod) + start; - - var word = 0; - for (var i = start; i < end; i += limbLen) { - word = parseBase(number, i, i + limbLen, base); - - this.imuln(limbPow); - if (this.words[0] + word < 0x4000000) { - this.words[0] += word; - } else { - this._iaddn(word); - } - } - - if (mod !== 0) { - var pow = 1; - word = parseBase(number, i, number.length, base); - - for (i = 0; i < mod; i++) { - pow *= base; - } - - this.imuln(pow); - if (this.words[0] + word < 0x4000000) { - this.words[0] += word; - } else { - this._iaddn(word); - } - } - }; - - BN.prototype.copy = function copy (dest) { - dest.words = new Array(this.length); - for (var i = 0; i < this.length; i++) { - dest.words[i] = this.words[i]; - } - dest.length = this.length; - dest.negative = this.negative; - dest.red = this.red; - }; - - BN.prototype.clone = function clone () { - var r = new BN(null); - this.copy(r); - return r; - }; - - BN.prototype._expand = function _expand (size) { - while (this.length < size) { - this.words[this.length++] = 0; - } - return this; - }; - - // Remove leading `0` from `this` - BN.prototype.strip = function strip () { - while (this.length > 1 && this.words[this.length - 1] === 0) { - this.length--; - } - return this._normSign(); - }; - - BN.prototype._normSign = function _normSign () { - // -0 = 0 - if (this.length === 1 && this.words[0] === 0) { - this.negative = 0; - } - return this; - }; - - BN.prototype.inspect = function inspect () { - return (this.red ? ''; - }; - - /* - - var zeros = []; - var groupSizes = []; - var groupBases = []; - - var s = ''; - var i = -1; - while (++i < BN.wordSize) { - zeros[i] = s; - s += '0'; - } - groupSizes[0] = 0; - groupSizes[1] = 0; - groupBases[0] = 0; - groupBases[1] = 0; - var base = 2 - 1; - while (++base < 36 + 1) { - var groupSize = 0; - var groupBase = 1; - while (groupBase < (1 << BN.wordSize) / base) { - groupBase *= base; - groupSize += 1; - } - groupSizes[base] = groupSize; - groupBases[base] = groupBase; - } - - */ - - var zeros = [ - '', - '0', - '00', - '000', - '0000', - '00000', - '000000', - '0000000', - '00000000', - '000000000', - '0000000000', - '00000000000', - '000000000000', - '0000000000000', - '00000000000000', - '000000000000000', - '0000000000000000', - '00000000000000000', - '000000000000000000', - '0000000000000000000', - '00000000000000000000', - '000000000000000000000', - '0000000000000000000000', - '00000000000000000000000', - '000000000000000000000000', - '0000000000000000000000000' - ]; - - var groupSizes = [ - 0, 0, - 25, 16, 12, 11, 10, 9, 8, - 8, 7, 7, 7, 7, 6, 6, - 6, 6, 6, 6, 6, 5, 5, - 5, 5, 5, 5, 5, 5, 5, - 5, 5, 5, 5, 5, 5, 5 - ]; - - var groupBases = [ - 0, 0, - 33554432, 43046721, 16777216, 48828125, 60466176, 40353607, 16777216, - 43046721, 10000000, 19487171, 35831808, 62748517, 7529536, 11390625, - 16777216, 24137569, 34012224, 47045881, 64000000, 4084101, 5153632, - 6436343, 7962624, 9765625, 11881376, 14348907, 17210368, 20511149, - 24300000, 28629151, 33554432, 39135393, 45435424, 52521875, 60466176 - ]; - - BN.prototype.toString = function toString (base, padding) { - base = base || 10; - padding = padding | 0 || 1; - - var out; - if (base === 16 || base === 'hex') { - out = ''; - var off = 0; - var carry = 0; - for (var i = 0; i < this.length; i++) { - var w = this.words[i]; - var word = (((w << off) | carry) & 0xffffff).toString(16); - carry = (w >>> (24 - off)) & 0xffffff; - if (carry !== 0 || i !== this.length - 1) { - out = zeros[6 - word.length] + word + out; - } else { - out = word + out; - } - off += 2; - if (off >= 26) { - off -= 26; - i--; - } - } - if (carry !== 0) { - out = carry.toString(16) + out; - } - while (out.length % padding !== 0) { - out = '0' + out; - } - if (this.negative !== 0) { - out = '-' + out; - } - return out; - } - - if (base === (base | 0) && base >= 2 && base <= 36) { - // var groupSize = Math.floor(BN.wordSize * Math.LN2 / Math.log(base)); - var groupSize = groupSizes[base]; - // var groupBase = Math.pow(base, groupSize); - var groupBase = groupBases[base]; - out = ''; - var c = this.clone(); - c.negative = 0; - while (!c.isZero()) { - var r = c.modn(groupBase).toString(base); - c = c.idivn(groupBase); - - if (!c.isZero()) { - out = zeros[groupSize - r.length] + r + out; - } else { - out = r + out; - } - } - if (this.isZero()) { - out = '0' + out; - } - while (out.length % padding !== 0) { - out = '0' + out; - } - if (this.negative !== 0) { - out = '-' + out; - } - return out; - } - - assert(false, 'Base should be between 2 and 36'); - }; - - BN.prototype.toNumber = function toNumber () { - var ret = this.words[0]; - if (this.length === 2) { - ret += this.words[1] * 0x4000000; - } else if (this.length === 3 && this.words[2] === 0x01) { - // NOTE: at this stage it is known that the top bit is set - ret += 0x10000000000000 + (this.words[1] * 0x4000000); - } else if (this.length > 2) { - assert(false, 'Number can only safely store up to 53 bits'); - } - return (this.negative !== 0) ? -ret : ret; - }; - - BN.prototype.toJSON = function toJSON () { - return this.toString(16); - }; - - BN.prototype.toBuffer = function toBuffer (endian, length) { - assert(typeof Buffer !== 'undefined'); - return this.toArrayLike(Buffer, endian, length); - }; - - BN.prototype.toArray = function toArray (endian, length) { - return this.toArrayLike(Array, endian, length); - }; - - BN.prototype.toArrayLike = function toArrayLike (ArrayType, endian, length) { - var byteLength = this.byteLength(); - var reqLength = length || Math.max(1, byteLength); - assert(byteLength <= reqLength, 'byte array longer than desired length'); - assert(reqLength > 0, 'Requested array length <= 0'); - - this.strip(); - var littleEndian = endian === 'le'; - var res = new ArrayType(reqLength); - - var b, i; - var q = this.clone(); - if (!littleEndian) { - // Assume big-endian - for (i = 0; i < reqLength - byteLength; i++) { - res[i] = 0; - } - - for (i = 0; !q.isZero(); i++) { - b = q.andln(0xff); - q.iushrn(8); - - res[reqLength - i - 1] = b; - } - } else { - for (i = 0; !q.isZero(); i++) { - b = q.andln(0xff); - q.iushrn(8); - - res[i] = b; - } - - for (; i < reqLength; i++) { - res[i] = 0; - } - } - - return res; - }; - - if (Math.clz32) { - BN.prototype._countBits = function _countBits (w) { - return 32 - Math.clz32(w); - }; - } else { - BN.prototype._countBits = function _countBits (w) { - var t = w; - var r = 0; - if (t >= 0x1000) { - r += 13; - t >>>= 13; - } - if (t >= 0x40) { - r += 7; - t >>>= 7; - } - if (t >= 0x8) { - r += 4; - t >>>= 4; - } - if (t >= 0x02) { - r += 2; - t >>>= 2; - } - return r + t; - }; - } - - BN.prototype._zeroBits = function _zeroBits (w) { - // Short-cut - if (w === 0) return 26; - - var t = w; - var r = 0; - if ((t & 0x1fff) === 0) { - r += 13; - t >>>= 13; - } - if ((t & 0x7f) === 0) { - r += 7; - t >>>= 7; - } - if ((t & 0xf) === 0) { - r += 4; - t >>>= 4; - } - if ((t & 0x3) === 0) { - r += 2; - t >>>= 2; - } - if ((t & 0x1) === 0) { - r++; - } - return r; - }; - - // Return number of used bits in a BN - BN.prototype.bitLength = function bitLength () { - var w = this.words[this.length - 1]; - var hi = this._countBits(w); - return (this.length - 1) * 26 + hi; - }; - - function toBitArray (num) { - var w = new Array(num.bitLength()); - - for (var bit = 0; bit < w.length; bit++) { - var off = (bit / 26) | 0; - var wbit = bit % 26; - - w[bit] = (num.words[off] & (1 << wbit)) >>> wbit; - } - - return w; - } - - // Number of trailing zero bits - BN.prototype.zeroBits = function zeroBits () { - if (this.isZero()) return 0; - - var r = 0; - for (var i = 0; i < this.length; i++) { - var b = this._zeroBits(this.words[i]); - r += b; - if (b !== 26) break; - } - return r; - }; - - BN.prototype.byteLength = function byteLength () { - return Math.ceil(this.bitLength() / 8); - }; - - BN.prototype.toTwos = function toTwos (width) { - if (this.negative !== 0) { - return this.abs().inotn(width).iaddn(1); - } - return this.clone(); - }; - - BN.prototype.fromTwos = function fromTwos (width) { - if (this.testn(width - 1)) { - return this.notn(width).iaddn(1).ineg(); - } - return this.clone(); - }; - - BN.prototype.isNeg = function isNeg () { - return this.negative !== 0; - }; - - // Return negative clone of `this` - BN.prototype.neg = function neg () { - return this.clone().ineg(); - }; - - BN.prototype.ineg = function ineg () { - if (!this.isZero()) { - this.negative ^= 1; - } - - return this; - }; - - // Or `num` with `this` in-place - BN.prototype.iuor = function iuor (num) { - while (this.length < num.length) { - this.words[this.length++] = 0; - } - - for (var i = 0; i < num.length; i++) { - this.words[i] = this.words[i] | num.words[i]; - } - - return this.strip(); - }; - - BN.prototype.ior = function ior (num) { - assert((this.negative | num.negative) === 0); - return this.iuor(num); - }; - - // Or `num` with `this` - BN.prototype.or = function or (num) { - if (this.length > num.length) return this.clone().ior(num); - return num.clone().ior(this); - }; - - BN.prototype.uor = function uor (num) { - if (this.length > num.length) return this.clone().iuor(num); - return num.clone().iuor(this); - }; - - // And `num` with `this` in-place - BN.prototype.iuand = function iuand (num) { - // b = min-length(num, this) - var b; - if (this.length > num.length) { - b = num; - } else { - b = this; - } - - for (var i = 0; i < b.length; i++) { - this.words[i] = this.words[i] & num.words[i]; - } - - this.length = b.length; - - return this.strip(); - }; - - BN.prototype.iand = function iand (num) { - assert((this.negative | num.negative) === 0); - return this.iuand(num); - }; - - // And `num` with `this` - BN.prototype.and = function and (num) { - if (this.length > num.length) return this.clone().iand(num); - return num.clone().iand(this); - }; - - BN.prototype.uand = function uand (num) { - if (this.length > num.length) return this.clone().iuand(num); - return num.clone().iuand(this); - }; - - // Xor `num` with `this` in-place - BN.prototype.iuxor = function iuxor (num) { - // a.length > b.length - var a; - var b; - if (this.length > num.length) { - a = this; - b = num; - } else { - a = num; - b = this; - } - - for (var i = 0; i < b.length; i++) { - this.words[i] = a.words[i] ^ b.words[i]; - } - - if (this !== a) { - for (; i < a.length; i++) { - this.words[i] = a.words[i]; - } - } - - this.length = a.length; - - return this.strip(); - }; - - BN.prototype.ixor = function ixor (num) { - assert((this.negative | num.negative) === 0); - return this.iuxor(num); - }; - - // Xor `num` with `this` - BN.prototype.xor = function xor (num) { - if (this.length > num.length) return this.clone().ixor(num); - return num.clone().ixor(this); - }; - - BN.prototype.uxor = function uxor (num) { - if (this.length > num.length) return this.clone().iuxor(num); - return num.clone().iuxor(this); - }; - - // Not ``this`` with ``width`` bitwidth - BN.prototype.inotn = function inotn (width) { - assert(typeof width === 'number' && width >= 0); - - var bytesNeeded = Math.ceil(width / 26) | 0; - var bitsLeft = width % 26; - - // Extend the buffer with leading zeroes - this._expand(bytesNeeded); - - if (bitsLeft > 0) { - bytesNeeded--; - } - - // Handle complete words - for (var i = 0; i < bytesNeeded; i++) { - this.words[i] = ~this.words[i] & 0x3ffffff; - } - - // Handle the residue - if (bitsLeft > 0) { - this.words[i] = ~this.words[i] & (0x3ffffff >> (26 - bitsLeft)); - } - - // And remove leading zeroes - return this.strip(); - }; - - BN.prototype.notn = function notn (width) { - return this.clone().inotn(width); - }; - - // Set `bit` of `this` - BN.prototype.setn = function setn (bit, val) { - assert(typeof bit === 'number' && bit >= 0); - - var off = (bit / 26) | 0; - var wbit = bit % 26; - - this._expand(off + 1); - - if (val) { - this.words[off] = this.words[off] | (1 << wbit); - } else { - this.words[off] = this.words[off] & ~(1 << wbit); - } - - return this.strip(); - }; - - // Add `num` to `this` in-place - BN.prototype.iadd = function iadd (num) { - var r; - - // negative + positive - if (this.negative !== 0 && num.negative === 0) { - this.negative = 0; - r = this.isub(num); - this.negative ^= 1; - return this._normSign(); - - // positive + negative - } else if (this.negative === 0 && num.negative !== 0) { - num.negative = 0; - r = this.isub(num); - num.negative = 1; - return r._normSign(); - } - - // a.length > b.length - var a, b; - if (this.length > num.length) { - a = this; - b = num; - } else { - a = num; - b = this; - } - - var carry = 0; - for (var i = 0; i < b.length; i++) { - r = (a.words[i] | 0) + (b.words[i] | 0) + carry; - this.words[i] = r & 0x3ffffff; - carry = r >>> 26; - } - for (; carry !== 0 && i < a.length; i++) { - r = (a.words[i] | 0) + carry; - this.words[i] = r & 0x3ffffff; - carry = r >>> 26; - } - - this.length = a.length; - if (carry !== 0) { - this.words[this.length] = carry; - this.length++; - // Copy the rest of the words - } else if (a !== this) { - for (; i < a.length; i++) { - this.words[i] = a.words[i]; - } - } - - return this; - }; - - // Add `num` to `this` - BN.prototype.add = function add (num) { - var res; - if (num.negative !== 0 && this.negative === 0) { - num.negative = 0; - res = this.sub(num); - num.negative ^= 1; - return res; - } else if (num.negative === 0 && this.negative !== 0) { - this.negative = 0; - res = num.sub(this); - this.negative = 1; - return res; - } - - if (this.length > num.length) return this.clone().iadd(num); - - return num.clone().iadd(this); - }; - - // Subtract `num` from `this` in-place - BN.prototype.isub = function isub (num) { - // this - (-num) = this + num - if (num.negative !== 0) { - num.negative = 0; - var r = this.iadd(num); - num.negative = 1; - return r._normSign(); - - // -this - num = -(this + num) - } else if (this.negative !== 0) { - this.negative = 0; - this.iadd(num); - this.negative = 1; - return this._normSign(); - } - - // At this point both numbers are positive - var cmp = this.cmp(num); - - // Optimization - zeroify - if (cmp === 0) { - this.negative = 0; - this.length = 1; - this.words[0] = 0; - return this; - } - - // a > b - var a, b; - if (cmp > 0) { - a = this; - b = num; - } else { - a = num; - b = this; - } - - var carry = 0; - for (var i = 0; i < b.length; i++) { - r = (a.words[i] | 0) - (b.words[i] | 0) + carry; - carry = r >> 26; - this.words[i] = r & 0x3ffffff; - } - for (; carry !== 0 && i < a.length; i++) { - r = (a.words[i] | 0) + carry; - carry = r >> 26; - this.words[i] = r & 0x3ffffff; - } - - // Copy rest of the words - if (carry === 0 && i < a.length && a !== this) { - for (; i < a.length; i++) { - this.words[i] = a.words[i]; - } - } - - this.length = Math.max(this.length, i); - - if (a !== this) { - this.negative = 1; - } - - return this.strip(); - }; - - // Subtract `num` from `this` - BN.prototype.sub = function sub (num) { - return this.clone().isub(num); - }; - - function smallMulTo (self, num, out) { - out.negative = num.negative ^ self.negative; - var len = (self.length + num.length) | 0; - out.length = len; - len = (len - 1) | 0; - - // Peel one iteration (compiler can't do it, because of code complexity) - var a = self.words[0] | 0; - var b = num.words[0] | 0; - var r = a * b; - - var lo = r & 0x3ffffff; - var carry = (r / 0x4000000) | 0; - out.words[0] = lo; - - for (var k = 1; k < len; k++) { - // Sum all words with the same `i + j = k` and accumulate `ncarry`, - // note that ncarry could be >= 0x3ffffff - var ncarry = carry >>> 26; - var rword = carry & 0x3ffffff; - var maxJ = Math.min(k, num.length - 1); - for (var j = Math.max(0, k - self.length + 1); j <= maxJ; j++) { - var i = (k - j) | 0; - a = self.words[i] | 0; - b = num.words[j] | 0; - r = a * b + rword; - ncarry += (r / 0x4000000) | 0; - rword = r & 0x3ffffff; - } - out.words[k] = rword | 0; - carry = ncarry | 0; - } - if (carry !== 0) { - out.words[k] = carry | 0; - } else { - out.length--; - } - - return out.strip(); - } - - // TODO(indutny): it may be reasonable to omit it for users who don't need - // to work with 256-bit numbers, otherwise it gives 20% improvement for 256-bit - // multiplication (like elliptic secp256k1). - var comb10MulTo = function comb10MulTo (self, num, out) { - var a = self.words; - var b = num.words; - var o = out.words; - var c = 0; - var lo; - var mid; - var hi; - var a0 = a[0] | 0; - var al0 = a0 & 0x1fff; - var ah0 = a0 >>> 13; - var a1 = a[1] | 0; - var al1 = a1 & 0x1fff; - var ah1 = a1 >>> 13; - var a2 = a[2] | 0; - var al2 = a2 & 0x1fff; - var ah2 = a2 >>> 13; - var a3 = a[3] | 0; - var al3 = a3 & 0x1fff; - var ah3 = a3 >>> 13; - var a4 = a[4] | 0; - var al4 = a4 & 0x1fff; - var ah4 = a4 >>> 13; - var a5 = a[5] | 0; - var al5 = a5 & 0x1fff; - var ah5 = a5 >>> 13; - var a6 = a[6] | 0; - var al6 = a6 & 0x1fff; - var ah6 = a6 >>> 13; - var a7 = a[7] | 0; - var al7 = a7 & 0x1fff; - var ah7 = a7 >>> 13; - var a8 = a[8] | 0; - var al8 = a8 & 0x1fff; - var ah8 = a8 >>> 13; - var a9 = a[9] | 0; - var al9 = a9 & 0x1fff; - var ah9 = a9 >>> 13; - var b0 = b[0] | 0; - var bl0 = b0 & 0x1fff; - var bh0 = b0 >>> 13; - var b1 = b[1] | 0; - var bl1 = b1 & 0x1fff; - var bh1 = b1 >>> 13; - var b2 = b[2] | 0; - var bl2 = b2 & 0x1fff; - var bh2 = b2 >>> 13; - var b3 = b[3] | 0; - var bl3 = b3 & 0x1fff; - var bh3 = b3 >>> 13; - var b4 = b[4] | 0; - var bl4 = b4 & 0x1fff; - var bh4 = b4 >>> 13; - var b5 = b[5] | 0; - var bl5 = b5 & 0x1fff; - var bh5 = b5 >>> 13; - var b6 = b[6] | 0; - var bl6 = b6 & 0x1fff; - var bh6 = b6 >>> 13; - var b7 = b[7] | 0; - var bl7 = b7 & 0x1fff; - var bh7 = b7 >>> 13; - var b8 = b[8] | 0; - var bl8 = b8 & 0x1fff; - var bh8 = b8 >>> 13; - var b9 = b[9] | 0; - var bl9 = b9 & 0x1fff; - var bh9 = b9 >>> 13; - - out.negative = self.negative ^ num.negative; - out.length = 19; - /* k = 0 */ - lo = Math.imul(al0, bl0); - mid = Math.imul(al0, bh0); - mid = (mid + Math.imul(ah0, bl0)) | 0; - hi = Math.imul(ah0, bh0); - var w0 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0; - c = (((hi + (mid >>> 13)) | 0) + (w0 >>> 26)) | 0; - w0 &= 0x3ffffff; - /* k = 1 */ - lo = Math.imul(al1, bl0); - mid = Math.imul(al1, bh0); - mid = (mid + Math.imul(ah1, bl0)) | 0; - hi = Math.imul(ah1, bh0); - lo = (lo + Math.imul(al0, bl1)) | 0; - mid = (mid + Math.imul(al0, bh1)) | 0; - mid = (mid + Math.imul(ah0, bl1)) | 0; - hi = (hi + Math.imul(ah0, bh1)) | 0; - var w1 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0; - c = (((hi + (mid >>> 13)) | 0) + (w1 >>> 26)) | 0; - w1 &= 0x3ffffff; - /* k = 2 */ - lo = Math.imul(al2, bl0); - mid = Math.imul(al2, bh0); - mid = (mid + Math.imul(ah2, bl0)) | 0; - hi = Math.imul(ah2, bh0); - lo = (lo + Math.imul(al1, bl1)) | 0; - mid = (mid + Math.imul(al1, bh1)) | 0; - mid = (mid + Math.imul(ah1, bl1)) | 0; - hi = (hi + Math.imul(ah1, bh1)) | 0; - lo = (lo + Math.imul(al0, bl2)) | 0; - mid = (mid + Math.imul(al0, bh2)) | 0; - mid = (mid + Math.imul(ah0, bl2)) | 0; - hi = (hi + Math.imul(ah0, bh2)) | 0; - var w2 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0; - c = (((hi + (mid >>> 13)) | 0) + (w2 >>> 26)) | 0; - w2 &= 0x3ffffff; - /* k = 3 */ - lo = Math.imul(al3, bl0); - mid = Math.imul(al3, bh0); - mid = (mid + Math.imul(ah3, bl0)) | 0; - hi = Math.imul(ah3, bh0); - lo = (lo + Math.imul(al2, bl1)) | 0; - mid = (mid + Math.imul(al2, bh1)) | 0; - mid = (mid + Math.imul(ah2, bl1)) | 0; - hi = (hi + Math.imul(ah2, bh1)) | 0; - lo = (lo + Math.imul(al1, bl2)) | 0; - mid = (mid + Math.imul(al1, bh2)) | 0; - mid = (mid + Math.imul(ah1, bl2)) | 0; - hi = (hi + Math.imul(ah1, bh2)) | 0; - lo = (lo + Math.imul(al0, bl3)) | 0; - mid = (mid + Math.imul(al0, bh3)) | 0; - mid = (mid + Math.imul(ah0, bl3)) | 0; - hi = (hi + Math.imul(ah0, bh3)) | 0; - var w3 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0; - c = (((hi + (mid >>> 13)) | 0) + (w3 >>> 26)) | 0; - w3 &= 0x3ffffff; - /* k = 4 */ - lo = Math.imul(al4, bl0); - mid = Math.imul(al4, bh0); - mid = (mid + Math.imul(ah4, bl0)) | 0; - hi = Math.imul(ah4, bh0); - lo = (lo + Math.imul(al3, bl1)) | 0; - mid = (mid + Math.imul(al3, bh1)) | 0; - mid = (mid + Math.imul(ah3, bl1)) | 0; - hi = (hi + Math.imul(ah3, bh1)) | 0; - lo = (lo + Math.imul(al2, bl2)) | 0; - mid = (mid + Math.imul(al2, bh2)) | 0; - mid = (mid + Math.imul(ah2, bl2)) | 0; - hi = (hi + Math.imul(ah2, bh2)) | 0; - lo = (lo + Math.imul(al1, bl3)) | 0; - mid = (mid + Math.imul(al1, bh3)) | 0; - mid = (mid + Math.imul(ah1, bl3)) | 0; - hi = (hi + Math.imul(ah1, bh3)) | 0; - lo = (lo + Math.imul(al0, bl4)) | 0; - mid = (mid + Math.imul(al0, bh4)) | 0; - mid = (mid + Math.imul(ah0, bl4)) | 0; - hi = (hi + Math.imul(ah0, bh4)) | 0; - var w4 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0; - c = (((hi + (mid >>> 13)) | 0) + (w4 >>> 26)) | 0; - w4 &= 0x3ffffff; - /* k = 5 */ - lo = Math.imul(al5, bl0); - mid = Math.imul(al5, bh0); - mid = (mid + Math.imul(ah5, bl0)) | 0; - hi = Math.imul(ah5, bh0); - lo = (lo + Math.imul(al4, bl1)) | 0; - mid = (mid + Math.imul(al4, bh1)) | 0; - mid = (mid + Math.imul(ah4, bl1)) | 0; - hi = (hi + Math.imul(ah4, bh1)) | 0; - lo = (lo + Math.imul(al3, bl2)) | 0; - mid = (mid + Math.imul(al3, bh2)) | 0; - mid = (mid + Math.imul(ah3, bl2)) | 0; - hi = (hi + Math.imul(ah3, bh2)) | 0; - lo = (lo + Math.imul(al2, bl3)) | 0; - mid = (mid + Math.imul(al2, bh3)) | 0; - mid = (mid + Math.imul(ah2, bl3)) | 0; - hi = (hi + Math.imul(ah2, bh3)) | 0; - lo = (lo + Math.imul(al1, bl4)) | 0; - mid = (mid + Math.imul(al1, bh4)) | 0; - mid = (mid + Math.imul(ah1, bl4)) | 0; - hi = (hi + Math.imul(ah1, bh4)) | 0; - lo = (lo + Math.imul(al0, bl5)) | 0; - mid = (mid + Math.imul(al0, bh5)) | 0; - mid = (mid + Math.imul(ah0, bl5)) | 0; - hi = (hi + Math.imul(ah0, bh5)) | 0; - var w5 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0; - c = (((hi + (mid >>> 13)) | 0) + (w5 >>> 26)) | 0; - w5 &= 0x3ffffff; - /* k = 6 */ - lo = Math.imul(al6, bl0); - mid = Math.imul(al6, bh0); - mid = (mid + Math.imul(ah6, bl0)) | 0; - hi = Math.imul(ah6, bh0); - lo = (lo + Math.imul(al5, bl1)) | 0; - mid = (mid + Math.imul(al5, bh1)) | 0; - mid = (mid + Math.imul(ah5, bl1)) | 0; - hi = (hi + Math.imul(ah5, bh1)) | 0; - lo = (lo + Math.imul(al4, bl2)) | 0; - mid = (mid + Math.imul(al4, bh2)) | 0; - mid = (mid + Math.imul(ah4, bl2)) | 0; - hi = (hi + Math.imul(ah4, bh2)) | 0; - lo = (lo + Math.imul(al3, bl3)) | 0; - mid = (mid + Math.imul(al3, bh3)) | 0; - mid = (mid + Math.imul(ah3, bl3)) | 0; - hi = (hi + Math.imul(ah3, bh3)) | 0; - lo = (lo + Math.imul(al2, bl4)) | 0; - mid = (mid + Math.imul(al2, bh4)) | 0; - mid = (mid + Math.imul(ah2, bl4)) | 0; - hi = (hi + Math.imul(ah2, bh4)) | 0; - lo = (lo + Math.imul(al1, bl5)) | 0; - mid = (mid + Math.imul(al1, bh5)) | 0; - mid = (mid + Math.imul(ah1, bl5)) | 0; - hi = (hi + Math.imul(ah1, bh5)) | 0; - lo = (lo + Math.imul(al0, bl6)) | 0; - mid = (mid + Math.imul(al0, bh6)) | 0; - mid = (mid + Math.imul(ah0, bl6)) | 0; - hi = (hi + Math.imul(ah0, bh6)) | 0; - var w6 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0; - c = (((hi + (mid >>> 13)) | 0) + (w6 >>> 26)) | 0; - w6 &= 0x3ffffff; - /* k = 7 */ - lo = Math.imul(al7, bl0); - mid = Math.imul(al7, bh0); - mid = (mid + Math.imul(ah7, bl0)) | 0; - hi = Math.imul(ah7, bh0); - lo = (lo + Math.imul(al6, bl1)) | 0; - mid = (mid + Math.imul(al6, bh1)) | 0; - mid = (mid + Math.imul(ah6, bl1)) | 0; - hi = (hi + Math.imul(ah6, bh1)) | 0; - lo = (lo + Math.imul(al5, bl2)) | 0; - mid = (mid + Math.imul(al5, bh2)) | 0; - mid = (mid + Math.imul(ah5, bl2)) | 0; - hi = (hi + Math.imul(ah5, bh2)) | 0; - lo = (lo + Math.imul(al4, bl3)) | 0; - mid = (mid + Math.imul(al4, bh3)) | 0; - mid = (mid + Math.imul(ah4, bl3)) | 0; - hi = (hi + Math.imul(ah4, bh3)) | 0; - lo = (lo + Math.imul(al3, bl4)) | 0; - mid = (mid + Math.imul(al3, bh4)) | 0; - mid = (mid + Math.imul(ah3, bl4)) | 0; - hi = (hi + Math.imul(ah3, bh4)) | 0; - lo = (lo + Math.imul(al2, bl5)) | 0; - mid = (mid + Math.imul(al2, bh5)) | 0; - mid = (mid + Math.imul(ah2, bl5)) | 0; - hi = (hi + Math.imul(ah2, bh5)) | 0; - lo = (lo + Math.imul(al1, bl6)) | 0; - mid = (mid + Math.imul(al1, bh6)) | 0; - mid = (mid + Math.imul(ah1, bl6)) | 0; - hi = (hi + Math.imul(ah1, bh6)) | 0; - lo = (lo + Math.imul(al0, bl7)) | 0; - mid = (mid + Math.imul(al0, bh7)) | 0; - mid = (mid + Math.imul(ah0, bl7)) | 0; - hi = (hi + Math.imul(ah0, bh7)) | 0; - var w7 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0; - c = (((hi + (mid >>> 13)) | 0) + (w7 >>> 26)) | 0; - w7 &= 0x3ffffff; - /* k = 8 */ - lo = Math.imul(al8, bl0); - mid = Math.imul(al8, bh0); - mid = (mid + Math.imul(ah8, bl0)) | 0; - hi = Math.imul(ah8, bh0); - lo = (lo + Math.imul(al7, bl1)) | 0; - mid = (mid + Math.imul(al7, bh1)) | 0; - mid = (mid + Math.imul(ah7, bl1)) | 0; - hi = (hi + Math.imul(ah7, bh1)) | 0; - lo = (lo + Math.imul(al6, bl2)) | 0; - mid = (mid + Math.imul(al6, bh2)) | 0; - mid = (mid + Math.imul(ah6, bl2)) | 0; - hi = (hi + Math.imul(ah6, bh2)) | 0; - lo = (lo + Math.imul(al5, bl3)) | 0; - mid = (mid + Math.imul(al5, bh3)) | 0; - mid = (mid + Math.imul(ah5, bl3)) | 0; - hi = (hi + Math.imul(ah5, bh3)) | 0; - lo = (lo + Math.imul(al4, bl4)) | 0; - mid = (mid + Math.imul(al4, bh4)) | 0; - mid = (mid + Math.imul(ah4, bl4)) | 0; - hi = (hi + Math.imul(ah4, bh4)) | 0; - lo = (lo + Math.imul(al3, bl5)) | 0; - mid = (mid + Math.imul(al3, bh5)) | 0; - mid = (mid + Math.imul(ah3, bl5)) | 0; - hi = (hi + Math.imul(ah3, bh5)) | 0; - lo = (lo + Math.imul(al2, bl6)) | 0; - mid = (mid + Math.imul(al2, bh6)) | 0; - mid = (mid + Math.imul(ah2, bl6)) | 0; - hi = (hi + Math.imul(ah2, bh6)) | 0; - lo = (lo + Math.imul(al1, bl7)) | 0; - mid = (mid + Math.imul(al1, bh7)) | 0; - mid = (mid + Math.imul(ah1, bl7)) | 0; - hi = (hi + Math.imul(ah1, bh7)) | 0; - lo = (lo + Math.imul(al0, bl8)) | 0; - mid = (mid + Math.imul(al0, bh8)) | 0; - mid = (mid + Math.imul(ah0, bl8)) | 0; - hi = (hi + Math.imul(ah0, bh8)) | 0; - var w8 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0; - c = (((hi + (mid >>> 13)) | 0) + (w8 >>> 26)) | 0; - w8 &= 0x3ffffff; - /* k = 9 */ - lo = Math.imul(al9, bl0); - mid = Math.imul(al9, bh0); - mid = (mid + Math.imul(ah9, bl0)) | 0; - hi = Math.imul(ah9, bh0); - lo = (lo + Math.imul(al8, bl1)) | 0; - mid = (mid + Math.imul(al8, bh1)) | 0; - mid = (mid + Math.imul(ah8, bl1)) | 0; - hi = (hi + Math.imul(ah8, bh1)) | 0; - lo = (lo + Math.imul(al7, bl2)) | 0; - mid = (mid + Math.imul(al7, bh2)) | 0; - mid = (mid + Math.imul(ah7, bl2)) | 0; - hi = (hi + Math.imul(ah7, bh2)) | 0; - lo = (lo + Math.imul(al6, bl3)) | 0; - mid = (mid + Math.imul(al6, bh3)) | 0; - mid = (mid + Math.imul(ah6, bl3)) | 0; - hi = (hi + Math.imul(ah6, bh3)) | 0; - lo = (lo + Math.imul(al5, bl4)) | 0; - mid = (mid + Math.imul(al5, bh4)) | 0; - mid = (mid + Math.imul(ah5, bl4)) | 0; - hi = (hi + Math.imul(ah5, bh4)) | 0; - lo = (lo + Math.imul(al4, bl5)) | 0; - mid = (mid + Math.imul(al4, bh5)) | 0; - mid = (mid + Math.imul(ah4, bl5)) | 0; - hi = (hi + Math.imul(ah4, bh5)) | 0; - lo = (lo + Math.imul(al3, bl6)) | 0; - mid = (mid + Math.imul(al3, bh6)) | 0; - mid = (mid + Math.imul(ah3, bl6)) | 0; - hi = (hi + Math.imul(ah3, bh6)) | 0; - lo = (lo + Math.imul(al2, bl7)) | 0; - mid = (mid + Math.imul(al2, bh7)) | 0; - mid = (mid + Math.imul(ah2, bl7)) | 0; - hi = (hi + Math.imul(ah2, bh7)) | 0; - lo = (lo + Math.imul(al1, bl8)) | 0; - mid = (mid + Math.imul(al1, bh8)) | 0; - mid = (mid + Math.imul(ah1, bl8)) | 0; - hi = (hi + Math.imul(ah1, bh8)) | 0; - lo = (lo + Math.imul(al0, bl9)) | 0; - mid = (mid + Math.imul(al0, bh9)) | 0; - mid = (mid + Math.imul(ah0, bl9)) | 0; - hi = (hi + Math.imul(ah0, bh9)) | 0; - var w9 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0; - c = (((hi + (mid >>> 13)) | 0) + (w9 >>> 26)) | 0; - w9 &= 0x3ffffff; - /* k = 10 */ - lo = Math.imul(al9, bl1); - mid = Math.imul(al9, bh1); - mid = (mid + Math.imul(ah9, bl1)) | 0; - hi = Math.imul(ah9, bh1); - lo = (lo + Math.imul(al8, bl2)) | 0; - mid = (mid + Math.imul(al8, bh2)) | 0; - mid = (mid + Math.imul(ah8, bl2)) | 0; - hi = (hi + Math.imul(ah8, bh2)) | 0; - lo = (lo + Math.imul(al7, bl3)) | 0; - mid = (mid + Math.imul(al7, bh3)) | 0; - mid = (mid + Math.imul(ah7, bl3)) | 0; - hi = (hi + Math.imul(ah7, bh3)) | 0; - lo = (lo + Math.imul(al6, bl4)) | 0; - mid = (mid + Math.imul(al6, bh4)) | 0; - mid = (mid + Math.imul(ah6, bl4)) | 0; - hi = (hi + Math.imul(ah6, bh4)) | 0; - lo = (lo + Math.imul(al5, bl5)) | 0; - mid = (mid + Math.imul(al5, bh5)) | 0; - mid = (mid + Math.imul(ah5, bl5)) | 0; - hi = (hi + Math.imul(ah5, bh5)) | 0; - lo = (lo + Math.imul(al4, bl6)) | 0; - mid = (mid + Math.imul(al4, bh6)) | 0; - mid = (mid + Math.imul(ah4, bl6)) | 0; - hi = (hi + Math.imul(ah4, bh6)) | 0; - lo = (lo + Math.imul(al3, bl7)) | 0; - mid = (mid + Math.imul(al3, bh7)) | 0; - mid = (mid + Math.imul(ah3, bl7)) | 0; - hi = (hi + Math.imul(ah3, bh7)) | 0; - lo = (lo + Math.imul(al2, bl8)) | 0; - mid = (mid + Math.imul(al2, bh8)) | 0; - mid = (mid + Math.imul(ah2, bl8)) | 0; - hi = (hi + Math.imul(ah2, bh8)) | 0; - lo = (lo + Math.imul(al1, bl9)) | 0; - mid = (mid + Math.imul(al1, bh9)) | 0; - mid = (mid + Math.imul(ah1, bl9)) | 0; - hi = (hi + Math.imul(ah1, bh9)) | 0; - var w10 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0; - c = (((hi + (mid >>> 13)) | 0) + (w10 >>> 26)) | 0; - w10 &= 0x3ffffff; - /* k = 11 */ - lo = Math.imul(al9, bl2); - mid = Math.imul(al9, bh2); - mid = (mid + Math.imul(ah9, bl2)) | 0; - hi = Math.imul(ah9, bh2); - lo = (lo + Math.imul(al8, bl3)) | 0; - mid = (mid + Math.imul(al8, bh3)) | 0; - mid = (mid + Math.imul(ah8, bl3)) | 0; - hi = (hi + Math.imul(ah8, bh3)) | 0; - lo = (lo + Math.imul(al7, bl4)) | 0; - mid = (mid + Math.imul(al7, bh4)) | 0; - mid = (mid + Math.imul(ah7, bl4)) | 0; - hi = (hi + Math.imul(ah7, bh4)) | 0; - lo = (lo + Math.imul(al6, bl5)) | 0; - mid = (mid + Math.imul(al6, bh5)) | 0; - mid = (mid + Math.imul(ah6, bl5)) | 0; - hi = (hi + Math.imul(ah6, bh5)) | 0; - lo = (lo + Math.imul(al5, bl6)) | 0; - mid = (mid + Math.imul(al5, bh6)) | 0; - mid = (mid + Math.imul(ah5, bl6)) | 0; - hi = (hi + Math.imul(ah5, bh6)) | 0; - lo = (lo + Math.imul(al4, bl7)) | 0; - mid = (mid + Math.imul(al4, bh7)) | 0; - mid = (mid + Math.imul(ah4, bl7)) | 0; - hi = (hi + Math.imul(ah4, bh7)) | 0; - lo = (lo + Math.imul(al3, bl8)) | 0; - mid = (mid + Math.imul(al3, bh8)) | 0; - mid = (mid + Math.imul(ah3, bl8)) | 0; - hi = (hi + Math.imul(ah3, bh8)) | 0; - lo = (lo + Math.imul(al2, bl9)) | 0; - mid = (mid + Math.imul(al2, bh9)) | 0; - mid = (mid + Math.imul(ah2, bl9)) | 0; - hi = (hi + Math.imul(ah2, bh9)) | 0; - var w11 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0; - c = (((hi + (mid >>> 13)) | 0) + (w11 >>> 26)) | 0; - w11 &= 0x3ffffff; - /* k = 12 */ - lo = Math.imul(al9, bl3); - mid = Math.imul(al9, bh3); - mid = (mid + Math.imul(ah9, bl3)) | 0; - hi = Math.imul(ah9, bh3); - lo = (lo + Math.imul(al8, bl4)) | 0; - mid = (mid + Math.imul(al8, bh4)) | 0; - mid = (mid + Math.imul(ah8, bl4)) | 0; - hi = (hi + Math.imul(ah8, bh4)) | 0; - lo = (lo + Math.imul(al7, bl5)) | 0; - mid = (mid + Math.imul(al7, bh5)) | 0; - mid = (mid + Math.imul(ah7, bl5)) | 0; - hi = (hi + Math.imul(ah7, bh5)) | 0; - lo = (lo + Math.imul(al6, bl6)) | 0; - mid = (mid + Math.imul(al6, bh6)) | 0; - mid = (mid + Math.imul(ah6, bl6)) | 0; - hi = (hi + Math.imul(ah6, bh6)) | 0; - lo = (lo + Math.imul(al5, bl7)) | 0; - mid = (mid + Math.imul(al5, bh7)) | 0; - mid = (mid + Math.imul(ah5, bl7)) | 0; - hi = (hi + Math.imul(ah5, bh7)) | 0; - lo = (lo + Math.imul(al4, bl8)) | 0; - mid = (mid + Math.imul(al4, bh8)) | 0; - mid = (mid + Math.imul(ah4, bl8)) | 0; - hi = (hi + Math.imul(ah4, bh8)) | 0; - lo = (lo + Math.imul(al3, bl9)) | 0; - mid = (mid + Math.imul(al3, bh9)) | 0; - mid = (mid + Math.imul(ah3, bl9)) | 0; - hi = (hi + Math.imul(ah3, bh9)) | 0; - var w12 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0; - c = (((hi + (mid >>> 13)) | 0) + (w12 >>> 26)) | 0; - w12 &= 0x3ffffff; - /* k = 13 */ - lo = Math.imul(al9, bl4); - mid = Math.imul(al9, bh4); - mid = (mid + Math.imul(ah9, bl4)) | 0; - hi = Math.imul(ah9, bh4); - lo = (lo + Math.imul(al8, bl5)) | 0; - mid = (mid + Math.imul(al8, bh5)) | 0; - mid = (mid + Math.imul(ah8, bl5)) | 0; - hi = (hi + Math.imul(ah8, bh5)) | 0; - lo = (lo + Math.imul(al7, bl6)) | 0; - mid = (mid + Math.imul(al7, bh6)) | 0; - mid = (mid + Math.imul(ah7, bl6)) | 0; - hi = (hi + Math.imul(ah7, bh6)) | 0; - lo = (lo + Math.imul(al6, bl7)) | 0; - mid = (mid + Math.imul(al6, bh7)) | 0; - mid = (mid + Math.imul(ah6, bl7)) | 0; - hi = (hi + Math.imul(ah6, bh7)) | 0; - lo = (lo + Math.imul(al5, bl8)) | 0; - mid = (mid + Math.imul(al5, bh8)) | 0; - mid = (mid + Math.imul(ah5, bl8)) | 0; - hi = (hi + Math.imul(ah5, bh8)) | 0; - lo = (lo + Math.imul(al4, bl9)) | 0; - mid = (mid + Math.imul(al4, bh9)) | 0; - mid = (mid + Math.imul(ah4, bl9)) | 0; - hi = (hi + Math.imul(ah4, bh9)) | 0; - var w13 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0; - c = (((hi + (mid >>> 13)) | 0) + (w13 >>> 26)) | 0; - w13 &= 0x3ffffff; - /* k = 14 */ - lo = Math.imul(al9, bl5); - mid = Math.imul(al9, bh5); - mid = (mid + Math.imul(ah9, bl5)) | 0; - hi = Math.imul(ah9, bh5); - lo = (lo + Math.imul(al8, bl6)) | 0; - mid = (mid + Math.imul(al8, bh6)) | 0; - mid = (mid + Math.imul(ah8, bl6)) | 0; - hi = (hi + Math.imul(ah8, bh6)) | 0; - lo = (lo + Math.imul(al7, bl7)) | 0; - mid = (mid + Math.imul(al7, bh7)) | 0; - mid = (mid + Math.imul(ah7, bl7)) | 0; - hi = (hi + Math.imul(ah7, bh7)) | 0; - lo = (lo + Math.imul(al6, bl8)) | 0; - mid = (mid + Math.imul(al6, bh8)) | 0; - mid = (mid + Math.imul(ah6, bl8)) | 0; - hi = (hi + Math.imul(ah6, bh8)) | 0; - lo = (lo + Math.imul(al5, bl9)) | 0; - mid = (mid + Math.imul(al5, bh9)) | 0; - mid = (mid + Math.imul(ah5, bl9)) | 0; - hi = (hi + Math.imul(ah5, bh9)) | 0; - var w14 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0; - c = (((hi + (mid >>> 13)) | 0) + (w14 >>> 26)) | 0; - w14 &= 0x3ffffff; - /* k = 15 */ - lo = Math.imul(al9, bl6); - mid = Math.imul(al9, bh6); - mid = (mid + Math.imul(ah9, bl6)) | 0; - hi = Math.imul(ah9, bh6); - lo = (lo + Math.imul(al8, bl7)) | 0; - mid = (mid + Math.imul(al8, bh7)) | 0; - mid = (mid + Math.imul(ah8, bl7)) | 0; - hi = (hi + Math.imul(ah8, bh7)) | 0; - lo = (lo + Math.imul(al7, bl8)) | 0; - mid = (mid + Math.imul(al7, bh8)) | 0; - mid = (mid + Math.imul(ah7, bl8)) | 0; - hi = (hi + Math.imul(ah7, bh8)) | 0; - lo = (lo + Math.imul(al6, bl9)) | 0; - mid = (mid + Math.imul(al6, bh9)) | 0; - mid = (mid + Math.imul(ah6, bl9)) | 0; - hi = (hi + Math.imul(ah6, bh9)) | 0; - var w15 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0; - c = (((hi + (mid >>> 13)) | 0) + (w15 >>> 26)) | 0; - w15 &= 0x3ffffff; - /* k = 16 */ - lo = Math.imul(al9, bl7); - mid = Math.imul(al9, bh7); - mid = (mid + Math.imul(ah9, bl7)) | 0; - hi = Math.imul(ah9, bh7); - lo = (lo + Math.imul(al8, bl8)) | 0; - mid = (mid + Math.imul(al8, bh8)) | 0; - mid = (mid + Math.imul(ah8, bl8)) | 0; - hi = (hi + Math.imul(ah8, bh8)) | 0; - lo = (lo + Math.imul(al7, bl9)) | 0; - mid = (mid + Math.imul(al7, bh9)) | 0; - mid = (mid + Math.imul(ah7, bl9)) | 0; - hi = (hi + Math.imul(ah7, bh9)) | 0; - var w16 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0; - c = (((hi + (mid >>> 13)) | 0) + (w16 >>> 26)) | 0; - w16 &= 0x3ffffff; - /* k = 17 */ - lo = Math.imul(al9, bl8); - mid = Math.imul(al9, bh8); - mid = (mid + Math.imul(ah9, bl8)) | 0; - hi = Math.imul(ah9, bh8); - lo = (lo + Math.imul(al8, bl9)) | 0; - mid = (mid + Math.imul(al8, bh9)) | 0; - mid = (mid + Math.imul(ah8, bl9)) | 0; - hi = (hi + Math.imul(ah8, bh9)) | 0; - var w17 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0; - c = (((hi + (mid >>> 13)) | 0) + (w17 >>> 26)) | 0; - w17 &= 0x3ffffff; - /* k = 18 */ - lo = Math.imul(al9, bl9); - mid = Math.imul(al9, bh9); - mid = (mid + Math.imul(ah9, bl9)) | 0; - hi = Math.imul(ah9, bh9); - var w18 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0; - c = (((hi + (mid >>> 13)) | 0) + (w18 >>> 26)) | 0; - w18 &= 0x3ffffff; - o[0] = w0; - o[1] = w1; - o[2] = w2; - o[3] = w3; - o[4] = w4; - o[5] = w5; - o[6] = w6; - o[7] = w7; - o[8] = w8; - o[9] = w9; - o[10] = w10; - o[11] = w11; - o[12] = w12; - o[13] = w13; - o[14] = w14; - o[15] = w15; - o[16] = w16; - o[17] = w17; - o[18] = w18; - if (c !== 0) { - o[19] = c; - out.length++; - } - return out; - }; - - // Polyfill comb - if (!Math.imul) { - comb10MulTo = smallMulTo; - } - - function bigMulTo (self, num, out) { - out.negative = num.negative ^ self.negative; - out.length = self.length + num.length; - - var carry = 0; - var hncarry = 0; - for (var k = 0; k < out.length - 1; k++) { - // Sum all words with the same `i + j = k` and accumulate `ncarry`, - // note that ncarry could be >= 0x3ffffff - var ncarry = hncarry; - hncarry = 0; - var rword = carry & 0x3ffffff; - var maxJ = Math.min(k, num.length - 1); - for (var j = Math.max(0, k - self.length + 1); j <= maxJ; j++) { - var i = k - j; - var a = self.words[i] | 0; - var b = num.words[j] | 0; - var r = a * b; - - var lo = r & 0x3ffffff; - ncarry = (ncarry + ((r / 0x4000000) | 0)) | 0; - lo = (lo + rword) | 0; - rword = lo & 0x3ffffff; - ncarry = (ncarry + (lo >>> 26)) | 0; - - hncarry += ncarry >>> 26; - ncarry &= 0x3ffffff; - } - out.words[k] = rword; - carry = ncarry; - ncarry = hncarry; - } - if (carry !== 0) { - out.words[k] = carry; - } else { - out.length--; - } - - return out.strip(); - } - - function jumboMulTo (self, num, out) { - var fftm = new FFTM(); - return fftm.mulp(self, num, out); - } - - BN.prototype.mulTo = function mulTo (num, out) { - var res; - var len = this.length + num.length; - if (this.length === 10 && num.length === 10) { - res = comb10MulTo(this, num, out); - } else if (len < 63) { - res = smallMulTo(this, num, out); - } else if (len < 1024) { - res = bigMulTo(this, num, out); - } else { - res = jumboMulTo(this, num, out); - } - - return res; - }; - - // Cooley-Tukey algorithm for FFT - // slightly revisited to rely on looping instead of recursion - - function FFTM (x, y) { - this.x = x; - this.y = y; - } - - FFTM.prototype.makeRBT = function makeRBT (N) { - var t = new Array(N); - var l = BN.prototype._countBits(N) - 1; - for (var i = 0; i < N; i++) { - t[i] = this.revBin(i, l, N); - } - - return t; - }; - - // Returns binary-reversed representation of `x` - FFTM.prototype.revBin = function revBin (x, l, N) { - if (x === 0 || x === N - 1) return x; - - var rb = 0; - for (var i = 0; i < l; i++) { - rb |= (x & 1) << (l - i - 1); - x >>= 1; - } - - return rb; - }; - - // Performs "tweedling" phase, therefore 'emulating' - // behaviour of the recursive algorithm - FFTM.prototype.permute = function permute (rbt, rws, iws, rtws, itws, N) { - for (var i = 0; i < N; i++) { - rtws[i] = rws[rbt[i]]; - itws[i] = iws[rbt[i]]; - } - }; - - FFTM.prototype.transform = function transform (rws, iws, rtws, itws, N, rbt) { - this.permute(rbt, rws, iws, rtws, itws, N); - - for (var s = 1; s < N; s <<= 1) { - var l = s << 1; - - var rtwdf = Math.cos(2 * Math.PI / l); - var itwdf = Math.sin(2 * Math.PI / l); - - for (var p = 0; p < N; p += l) { - var rtwdf_ = rtwdf; - var itwdf_ = itwdf; - - for (var j = 0; j < s; j++) { - var re = rtws[p + j]; - var ie = itws[p + j]; - - var ro = rtws[p + j + s]; - var io = itws[p + j + s]; - - var rx = rtwdf_ * ro - itwdf_ * io; - - io = rtwdf_ * io + itwdf_ * ro; - ro = rx; - - rtws[p + j] = re + ro; - itws[p + j] = ie + io; - - rtws[p + j + s] = re - ro; - itws[p + j + s] = ie - io; - - /* jshint maxdepth : false */ - if (j !== l) { - rx = rtwdf * rtwdf_ - itwdf * itwdf_; - - itwdf_ = rtwdf * itwdf_ + itwdf * rtwdf_; - rtwdf_ = rx; - } - } - } - } - }; - - FFTM.prototype.guessLen13b = function guessLen13b (n, m) { - var N = Math.max(m, n) | 1; - var odd = N & 1; - var i = 0; - for (N = N / 2 | 0; N; N = N >>> 1) { - i++; - } - - return 1 << i + 1 + odd; - }; - - FFTM.prototype.conjugate = function conjugate (rws, iws, N) { - if (N <= 1) return; - - for (var i = 0; i < N / 2; i++) { - var t = rws[i]; - - rws[i] = rws[N - i - 1]; - rws[N - i - 1] = t; - - t = iws[i]; - - iws[i] = -iws[N - i - 1]; - iws[N - i - 1] = -t; - } - }; - - FFTM.prototype.normalize13b = function normalize13b (ws, N) { - var carry = 0; - for (var i = 0; i < N / 2; i++) { - var w = Math.round(ws[2 * i + 1] / N) * 0x2000 + - Math.round(ws[2 * i] / N) + - carry; - - ws[i] = w & 0x3ffffff; - - if (w < 0x4000000) { - carry = 0; - } else { - carry = w / 0x4000000 | 0; - } - } - - return ws; - }; - - FFTM.prototype.convert13b = function convert13b (ws, len, rws, N) { - var carry = 0; - for (var i = 0; i < len; i++) { - carry = carry + (ws[i] | 0); - - rws[2 * i] = carry & 0x1fff; carry = carry >>> 13; - rws[2 * i + 1] = carry & 0x1fff; carry = carry >>> 13; - } - - // Pad with zeroes - for (i = 2 * len; i < N; ++i) { - rws[i] = 0; - } - - assert(carry === 0); - assert((carry & ~0x1fff) === 0); - }; - - FFTM.prototype.stub = function stub (N) { - var ph = new Array(N); - for (var i = 0; i < N; i++) { - ph[i] = 0; - } - - return ph; - }; - - FFTM.prototype.mulp = function mulp (x, y, out) { - var N = 2 * this.guessLen13b(x.length, y.length); - - var rbt = this.makeRBT(N); - - var _ = this.stub(N); - - var rws = new Array(N); - var rwst = new Array(N); - var iwst = new Array(N); - - var nrws = new Array(N); - var nrwst = new Array(N); - var niwst = new Array(N); - - var rmws = out.words; - rmws.length = N; - - this.convert13b(x.words, x.length, rws, N); - this.convert13b(y.words, y.length, nrws, N); - - this.transform(rws, _, rwst, iwst, N, rbt); - this.transform(nrws, _, nrwst, niwst, N, rbt); - - for (var i = 0; i < N; i++) { - var rx = rwst[i] * nrwst[i] - iwst[i] * niwst[i]; - iwst[i] = rwst[i] * niwst[i] + iwst[i] * nrwst[i]; - rwst[i] = rx; - } - - this.conjugate(rwst, iwst, N); - this.transform(rwst, iwst, rmws, _, N, rbt); - this.conjugate(rmws, _, N); - this.normalize13b(rmws, N); - - out.negative = x.negative ^ y.negative; - out.length = x.length + y.length; - return out.strip(); - }; - - // Multiply `this` by `num` - BN.prototype.mul = function mul (num) { - var out = new BN(null); - out.words = new Array(this.length + num.length); - return this.mulTo(num, out); - }; - - // Multiply employing FFT - BN.prototype.mulf = function mulf (num) { - var out = new BN(null); - out.words = new Array(this.length + num.length); - return jumboMulTo(this, num, out); - }; - - // In-place Multiplication - BN.prototype.imul = function imul (num) { - return this.clone().mulTo(num, this); - }; - - BN.prototype.imuln = function imuln (num) { - assert(typeof num === 'number'); - assert(num < 0x4000000); - - // Carry - var carry = 0; - for (var i = 0; i < this.length; i++) { - var w = (this.words[i] | 0) * num; - var lo = (w & 0x3ffffff) + (carry & 0x3ffffff); - carry >>= 26; - carry += (w / 0x4000000) | 0; - // NOTE: lo is 27bit maximum - carry += lo >>> 26; - this.words[i] = lo & 0x3ffffff; - } - - if (carry !== 0) { - this.words[i] = carry; - this.length++; - } - - return this; - }; - - BN.prototype.muln = function muln (num) { - return this.clone().imuln(num); - }; - - // `this` * `this` - BN.prototype.sqr = function sqr () { - return this.mul(this); - }; - - // `this` * `this` in-place - BN.prototype.isqr = function isqr () { - return this.imul(this.clone()); - }; - - // Math.pow(`this`, `num`) - BN.prototype.pow = function pow (num) { - var w = toBitArray(num); - if (w.length === 0) return new BN(1); - - // Skip leading zeroes - var res = this; - for (var i = 0; i < w.length; i++, res = res.sqr()) { - if (w[i] !== 0) break; - } - - if (++i < w.length) { - for (var q = res.sqr(); i < w.length; i++, q = q.sqr()) { - if (w[i] === 0) continue; - - res = res.mul(q); - } - } - - return res; - }; - - // Shift-left in-place - BN.prototype.iushln = function iushln (bits) { - assert(typeof bits === 'number' && bits >= 0); - var r = bits % 26; - var s = (bits - r) / 26; - var carryMask = (0x3ffffff >>> (26 - r)) << (26 - r); - var i; - - if (r !== 0) { - var carry = 0; - - for (i = 0; i < this.length; i++) { - var newCarry = this.words[i] & carryMask; - var c = ((this.words[i] | 0) - newCarry) << r; - this.words[i] = c | carry; - carry = newCarry >>> (26 - r); - } - - if (carry) { - this.words[i] = carry; - this.length++; - } - } - - if (s !== 0) { - for (i = this.length - 1; i >= 0; i--) { - this.words[i + s] = this.words[i]; - } - - for (i = 0; i < s; i++) { - this.words[i] = 0; - } - - this.length += s; - } - - return this.strip(); - }; - - BN.prototype.ishln = function ishln (bits) { - // TODO(indutny): implement me - assert(this.negative === 0); - return this.iushln(bits); - }; - - // Shift-right in-place - // NOTE: `hint` is a lowest bit before trailing zeroes - // NOTE: if `extended` is present - it will be filled with destroyed bits - BN.prototype.iushrn = function iushrn (bits, hint, extended) { - assert(typeof bits === 'number' && bits >= 0); - var h; - if (hint) { - h = (hint - (hint % 26)) / 26; - } else { - h = 0; - } - - var r = bits % 26; - var s = Math.min((bits - r) / 26, this.length); - var mask = 0x3ffffff ^ ((0x3ffffff >>> r) << r); - var maskedWords = extended; - - h -= s; - h = Math.max(0, h); - - // Extended mode, copy masked part - if (maskedWords) { - for (var i = 0; i < s; i++) { - maskedWords.words[i] = this.words[i]; - } - maskedWords.length = s; - } - - if (s === 0) { - // No-op, we should not move anything at all - } else if (this.length > s) { - this.length -= s; - for (i = 0; i < this.length; i++) { - this.words[i] = this.words[i + s]; - } - } else { - this.words[0] = 0; - this.length = 1; - } - - var carry = 0; - for (i = this.length - 1; i >= 0 && (carry !== 0 || i >= h); i--) { - var word = this.words[i] | 0; - this.words[i] = (carry << (26 - r)) | (word >>> r); - carry = word & mask; - } - - // Push carried bits as a mask - if (maskedWords && carry !== 0) { - maskedWords.words[maskedWords.length++] = carry; - } - - if (this.length === 0) { - this.words[0] = 0; - this.length = 1; - } - - return this.strip(); - }; - - BN.prototype.ishrn = function ishrn (bits, hint, extended) { - // TODO(indutny): implement me - assert(this.negative === 0); - return this.iushrn(bits, hint, extended); - }; - - // Shift-left - BN.prototype.shln = function shln (bits) { - return this.clone().ishln(bits); - }; - - BN.prototype.ushln = function ushln (bits) { - return this.clone().iushln(bits); - }; - - // Shift-right - BN.prototype.shrn = function shrn (bits) { - return this.clone().ishrn(bits); - }; - - BN.prototype.ushrn = function ushrn (bits) { - return this.clone().iushrn(bits); - }; - - // Test if n bit is set - BN.prototype.testn = function testn (bit) { - assert(typeof bit === 'number' && bit >= 0); - var r = bit % 26; - var s = (bit - r) / 26; - var q = 1 << r; - - // Fast case: bit is much higher than all existing words - if (this.length <= s) return false; - - // Check bit and return - var w = this.words[s]; - - return !!(w & q); - }; - - // Return only lowers bits of number (in-place) - BN.prototype.imaskn = function imaskn (bits) { - assert(typeof bits === 'number' && bits >= 0); - var r = bits % 26; - var s = (bits - r) / 26; - - assert(this.negative === 0, 'imaskn works only with positive numbers'); - - if (this.length <= s) { - return this; - } - - if (r !== 0) { - s++; - } - this.length = Math.min(s, this.length); - - if (r !== 0) { - var mask = 0x3ffffff ^ ((0x3ffffff >>> r) << r); - this.words[this.length - 1] &= mask; - } - - return this.strip(); - }; - - // Return only lowers bits of number - BN.prototype.maskn = function maskn (bits) { - return this.clone().imaskn(bits); - }; - - // Add plain number `num` to `this` - BN.prototype.iaddn = function iaddn (num) { - assert(typeof num === 'number'); - assert(num < 0x4000000); - if (num < 0) return this.isubn(-num); - - // Possible sign change - if (this.negative !== 0) { - if (this.length === 1 && (this.words[0] | 0) < num) { - this.words[0] = num - (this.words[0] | 0); - this.negative = 0; - return this; - } - - this.negative = 0; - this.isubn(num); - this.negative = 1; - return this; - } - - // Add without checks - return this._iaddn(num); - }; - - BN.prototype._iaddn = function _iaddn (num) { - this.words[0] += num; - - // Carry - for (var i = 0; i < this.length && this.words[i] >= 0x4000000; i++) { - this.words[i] -= 0x4000000; - if (i === this.length - 1) { - this.words[i + 1] = 1; - } else { - this.words[i + 1]++; - } - } - this.length = Math.max(this.length, i + 1); - - return this; - }; - - // Subtract plain number `num` from `this` - BN.prototype.isubn = function isubn (num) { - assert(typeof num === 'number'); - assert(num < 0x4000000); - if (num < 0) return this.iaddn(-num); - - if (this.negative !== 0) { - this.negative = 0; - this.iaddn(num); - this.negative = 1; - return this; - } - - this.words[0] -= num; - - if (this.length === 1 && this.words[0] < 0) { - this.words[0] = -this.words[0]; - this.negative = 1; - } else { - // Carry - for (var i = 0; i < this.length && this.words[i] < 0; i++) { - this.words[i] += 0x4000000; - this.words[i + 1] -= 1; - } - } - - return this.strip(); - }; - - BN.prototype.addn = function addn (num) { - return this.clone().iaddn(num); - }; - - BN.prototype.subn = function subn (num) { - return this.clone().isubn(num); - }; - - BN.prototype.iabs = function iabs () { - this.negative = 0; - - return this; - }; - - BN.prototype.abs = function abs () { - return this.clone().iabs(); - }; - - BN.prototype._ishlnsubmul = function _ishlnsubmul (num, mul, shift) { - var len = num.length + shift; - var i; - - this._expand(len); - - var w; - var carry = 0; - for (i = 0; i < num.length; i++) { - w = (this.words[i + shift] | 0) + carry; - var right = (num.words[i] | 0) * mul; - w -= right & 0x3ffffff; - carry = (w >> 26) - ((right / 0x4000000) | 0); - this.words[i + shift] = w & 0x3ffffff; - } - for (; i < this.length - shift; i++) { - w = (this.words[i + shift] | 0) + carry; - carry = w >> 26; - this.words[i + shift] = w & 0x3ffffff; - } - - if (carry === 0) return this.strip(); - - // Subtraction overflow - assert(carry === -1); - carry = 0; - for (i = 0; i < this.length; i++) { - w = -(this.words[i] | 0) + carry; - carry = w >> 26; - this.words[i] = w & 0x3ffffff; - } - this.negative = 1; - - return this.strip(); - }; - - BN.prototype._wordDiv = function _wordDiv (num, mode) { - var shift = this.length - num.length; - - var a = this.clone(); - var b = num; - - // Normalize - var bhi = b.words[b.length - 1] | 0; - var bhiBits = this._countBits(bhi); - shift = 26 - bhiBits; - if (shift !== 0) { - b = b.ushln(shift); - a.iushln(shift); - bhi = b.words[b.length - 1] | 0; - } - - // Initialize quotient - var m = a.length - b.length; - var q; - - if (mode !== 'mod') { - q = new BN(null); - q.length = m + 1; - q.words = new Array(q.length); - for (var i = 0; i < q.length; i++) { - q.words[i] = 0; - } - } - - var diff = a.clone()._ishlnsubmul(b, 1, m); - if (diff.negative === 0) { - a = diff; - if (q) { - q.words[m] = 1; - } - } - - for (var j = m - 1; j >= 0; j--) { - var qj = (a.words[b.length + j] | 0) * 0x4000000 + - (a.words[b.length + j - 1] | 0); - - // NOTE: (qj / bhi) is (0x3ffffff * 0x4000000 + 0x3ffffff) / 0x2000000 max - // (0x7ffffff) - qj = Math.min((qj / bhi) | 0, 0x3ffffff); - - a._ishlnsubmul(b, qj, j); - while (a.negative !== 0) { - qj--; - a.negative = 0; - a._ishlnsubmul(b, 1, j); - if (!a.isZero()) { - a.negative ^= 1; - } - } - if (q) { - q.words[j] = qj; - } - } - if (q) { - q.strip(); - } - a.strip(); - - // Denormalize - if (mode !== 'div' && shift !== 0) { - a.iushrn(shift); - } - - return { - div: q || null, - mod: a - }; - }; - - // NOTE: 1) `mode` can be set to `mod` to request mod only, - // to `div` to request div only, or be absent to - // request both div & mod - // 2) `positive` is true if unsigned mod is requested - BN.prototype.divmod = function divmod (num, mode, positive) { - assert(!num.isZero()); - - if (this.isZero()) { - return { - div: new BN(0), - mod: new BN(0) - }; - } - - var div, mod, res; - if (this.negative !== 0 && num.negative === 0) { - res = this.neg().divmod(num, mode); - - if (mode !== 'mod') { - div = res.div.neg(); - } - - if (mode !== 'div') { - mod = res.mod.neg(); - if (positive && mod.negative !== 0) { - mod.iadd(num); - } - } - - return { - div: div, - mod: mod - }; - } - - if (this.negative === 0 && num.negative !== 0) { - res = this.divmod(num.neg(), mode); - - if (mode !== 'mod') { - div = res.div.neg(); - } - - return { - div: div, - mod: res.mod - }; - } - - if ((this.negative & num.negative) !== 0) { - res = this.neg().divmod(num.neg(), mode); - - if (mode !== 'div') { - mod = res.mod.neg(); - if (positive && mod.negative !== 0) { - mod.isub(num); - } - } - - return { - div: res.div, - mod: mod - }; - } - - // Both numbers are positive at this point - - // Strip both numbers to approximate shift value - if (num.length > this.length || this.cmp(num) < 0) { - return { - div: new BN(0), - mod: this - }; - } - - // Very short reduction - if (num.length === 1) { - if (mode === 'div') { - return { - div: this.divn(num.words[0]), - mod: null - }; - } - - if (mode === 'mod') { - return { - div: null, - mod: new BN(this.modn(num.words[0])) - }; - } - - return { - div: this.divn(num.words[0]), - mod: new BN(this.modn(num.words[0])) - }; - } - - return this._wordDiv(num, mode); - }; - - // Find `this` / `num` - BN.prototype.div = function div (num) { - return this.divmod(num, 'div', false).div; - }; - - // Find `this` % `num` - BN.prototype.mod = function mod (num) { - return this.divmod(num, 'mod', false).mod; - }; - - BN.prototype.umod = function umod (num) { - return this.divmod(num, 'mod', true).mod; - }; - - // Find Round(`this` / `num`) - BN.prototype.divRound = function divRound (num) { - var dm = this.divmod(num); - - // Fast case - exact division - if (dm.mod.isZero()) return dm.div; - - var mod = dm.div.negative !== 0 ? dm.mod.isub(num) : dm.mod; - - var half = num.ushrn(1); - var r2 = num.andln(1); - var cmp = mod.cmp(half); - - // Round down - if (cmp < 0 || r2 === 1 && cmp === 0) return dm.div; - - // Round up - return dm.div.negative !== 0 ? dm.div.isubn(1) : dm.div.iaddn(1); - }; - - BN.prototype.modn = function modn (num) { - assert(num <= 0x3ffffff); - var p = (1 << 26) % num; - - var acc = 0; - for (var i = this.length - 1; i >= 0; i--) { - acc = (p * acc + (this.words[i] | 0)) % num; - } - - return acc; - }; - - // In-place division by number - BN.prototype.idivn = function idivn (num) { - assert(num <= 0x3ffffff); - - var carry = 0; - for (var i = this.length - 1; i >= 0; i--) { - var w = (this.words[i] | 0) + carry * 0x4000000; - this.words[i] = (w / num) | 0; - carry = w % num; - } - - return this.strip(); - }; - - BN.prototype.divn = function divn (num) { - return this.clone().idivn(num); - }; - - BN.prototype.egcd = function egcd (p) { - assert(p.negative === 0); - assert(!p.isZero()); - - var x = this; - var y = p.clone(); - - if (x.negative !== 0) { - x = x.umod(p); - } else { - x = x.clone(); - } - - // A * x + B * y = x - var A = new BN(1); - var B = new BN(0); - - // C * x + D * y = y - var C = new BN(0); - var D = new BN(1); - - var g = 0; - - while (x.isEven() && y.isEven()) { - x.iushrn(1); - y.iushrn(1); - ++g; - } - - var yp = y.clone(); - var xp = x.clone(); - - while (!x.isZero()) { - for (var i = 0, im = 1; (x.words[0] & im) === 0 && i < 26; ++i, im <<= 1); - if (i > 0) { - x.iushrn(i); - while (i-- > 0) { - if (A.isOdd() || B.isOdd()) { - A.iadd(yp); - B.isub(xp); - } - - A.iushrn(1); - B.iushrn(1); - } - } - - for (var j = 0, jm = 1; (y.words[0] & jm) === 0 && j < 26; ++j, jm <<= 1); - if (j > 0) { - y.iushrn(j); - while (j-- > 0) { - if (C.isOdd() || D.isOdd()) { - C.iadd(yp); - D.isub(xp); - } - - C.iushrn(1); - D.iushrn(1); - } - } - - if (x.cmp(y) >= 0) { - x.isub(y); - A.isub(C); - B.isub(D); - } else { - y.isub(x); - C.isub(A); - D.isub(B); - } - } - - return { - a: C, - b: D, - gcd: y.iushln(g) - }; - }; - - // This is reduced incarnation of the binary EEA - // above, designated to invert members of the - // _prime_ fields F(p) at a maximal speed - BN.prototype._invmp = function _invmp (p) { - assert(p.negative === 0); - assert(!p.isZero()); - - var a = this; - var b = p.clone(); - - if (a.negative !== 0) { - a = a.umod(p); - } else { - a = a.clone(); - } - - var x1 = new BN(1); - var x2 = new BN(0); - - var delta = b.clone(); - - while (a.cmpn(1) > 0 && b.cmpn(1) > 0) { - for (var i = 0, im = 1; (a.words[0] & im) === 0 && i < 26; ++i, im <<= 1); - if (i > 0) { - a.iushrn(i); - while (i-- > 0) { - if (x1.isOdd()) { - x1.iadd(delta); - } - - x1.iushrn(1); - } - } - - for (var j = 0, jm = 1; (b.words[0] & jm) === 0 && j < 26; ++j, jm <<= 1); - if (j > 0) { - b.iushrn(j); - while (j-- > 0) { - if (x2.isOdd()) { - x2.iadd(delta); - } - - x2.iushrn(1); - } - } - - if (a.cmp(b) >= 0) { - a.isub(b); - x1.isub(x2); - } else { - b.isub(a); - x2.isub(x1); - } - } - - var res; - if (a.cmpn(1) === 0) { - res = x1; - } else { - res = x2; - } - - if (res.cmpn(0) < 0) { - res.iadd(p); - } - - return res; - }; - - BN.prototype.gcd = function gcd (num) { - if (this.isZero()) return num.abs(); - if (num.isZero()) return this.abs(); - - var a = this.clone(); - var b = num.clone(); - a.negative = 0; - b.negative = 0; - - // Remove common factor of two - for (var shift = 0; a.isEven() && b.isEven(); shift++) { - a.iushrn(1); - b.iushrn(1); - } - - do { - while (a.isEven()) { - a.iushrn(1); - } - while (b.isEven()) { - b.iushrn(1); - } - - var r = a.cmp(b); - if (r < 0) { - // Swap `a` and `b` to make `a` always bigger than `b` - var t = a; - a = b; - b = t; - } else if (r === 0 || b.cmpn(1) === 0) { - break; - } - - a.isub(b); - } while (true); - - return b.iushln(shift); - }; - - // Invert number in the field F(num) - BN.prototype.invm = function invm (num) { - return this.egcd(num).a.umod(num); - }; - - BN.prototype.isEven = function isEven () { - return (this.words[0] & 1) === 0; - }; - - BN.prototype.isOdd = function isOdd () { - return (this.words[0] & 1) === 1; - }; - - // And first word and num - BN.prototype.andln = function andln (num) { - return this.words[0] & num; - }; - - // Increment at the bit position in-line - BN.prototype.bincn = function bincn (bit) { - assert(typeof bit === 'number'); - var r = bit % 26; - var s = (bit - r) / 26; - var q = 1 << r; - - // Fast case: bit is much higher than all existing words - if (this.length <= s) { - this._expand(s + 1); - this.words[s] |= q; - return this; - } - - // Add bit and propagate, if needed - var carry = q; - for (var i = s; carry !== 0 && i < this.length; i++) { - var w = this.words[i] | 0; - w += carry; - carry = w >>> 26; - w &= 0x3ffffff; - this.words[i] = w; - } - if (carry !== 0) { - this.words[i] = carry; - this.length++; - } - return this; - }; - - BN.prototype.isZero = function isZero () { - return this.length === 1 && this.words[0] === 0; - }; - - BN.prototype.cmpn = function cmpn (num) { - var negative = num < 0; - - if (this.negative !== 0 && !negative) return -1; - if (this.negative === 0 && negative) return 1; - - this.strip(); - - var res; - if (this.length > 1) { - res = 1; - } else { - if (negative) { - num = -num; - } - - assert(num <= 0x3ffffff, 'Number is too big'); - - var w = this.words[0] | 0; - res = w === num ? 0 : w < num ? -1 : 1; - } - if (this.negative !== 0) return -res | 0; - return res; - }; - - // Compare two numbers and return: - // 1 - if `this` > `num` - // 0 - if `this` == `num` - // -1 - if `this` < `num` - BN.prototype.cmp = function cmp (num) { - if (this.negative !== 0 && num.negative === 0) return -1; - if (this.negative === 0 && num.negative !== 0) return 1; - - var res = this.ucmp(num); - if (this.negative !== 0) return -res | 0; - return res; - }; - - // Unsigned comparison - BN.prototype.ucmp = function ucmp (num) { - // At this point both numbers have the same sign - if (this.length > num.length) return 1; - if (this.length < num.length) return -1; - - var res = 0; - for (var i = this.length - 1; i >= 0; i--) { - var a = this.words[i] | 0; - var b = num.words[i] | 0; - - if (a === b) continue; - if (a < b) { - res = -1; - } else if (a > b) { - res = 1; - } - break; - } - return res; - }; - - BN.prototype.gtn = function gtn (num) { - return this.cmpn(num) === 1; - }; - - BN.prototype.gt = function gt (num) { - return this.cmp(num) === 1; - }; - - BN.prototype.gten = function gten (num) { - return this.cmpn(num) >= 0; - }; - - BN.prototype.gte = function gte (num) { - return this.cmp(num) >= 0; - }; - - BN.prototype.ltn = function ltn (num) { - return this.cmpn(num) === -1; - }; - - BN.prototype.lt = function lt (num) { - return this.cmp(num) === -1; - }; - - BN.prototype.lten = function lten (num) { - return this.cmpn(num) <= 0; - }; - - BN.prototype.lte = function lte (num) { - return this.cmp(num) <= 0; - }; - - BN.prototype.eqn = function eqn (num) { - return this.cmpn(num) === 0; - }; - - BN.prototype.eq = function eq (num) { - return this.cmp(num) === 0; - }; - - // - // A reduce context, could be using montgomery or something better, depending - // on the `m` itself. - // - BN.red = function red (num) { - return new Red(num); - }; - - BN.prototype.toRed = function toRed (ctx) { - assert(!this.red, 'Already a number in reduction context'); - assert(this.negative === 0, 'red works only with positives'); - return ctx.convertTo(this)._forceRed(ctx); - }; - - BN.prototype.fromRed = function fromRed () { - assert(this.red, 'fromRed works only with numbers in reduction context'); - return this.red.convertFrom(this); - }; - - BN.prototype._forceRed = function _forceRed (ctx) { - this.red = ctx; - return this; - }; - - BN.prototype.forceRed = function forceRed (ctx) { - assert(!this.red, 'Already a number in reduction context'); - return this._forceRed(ctx); - }; - - BN.prototype.redAdd = function redAdd (num) { - assert(this.red, 'redAdd works only with red numbers'); - return this.red.add(this, num); - }; - - BN.prototype.redIAdd = function redIAdd (num) { - assert(this.red, 'redIAdd works only with red numbers'); - return this.red.iadd(this, num); - }; - - BN.prototype.redSub = function redSub (num) { - assert(this.red, 'redSub works only with red numbers'); - return this.red.sub(this, num); - }; - - BN.prototype.redISub = function redISub (num) { - assert(this.red, 'redISub works only with red numbers'); - return this.red.isub(this, num); - }; - - BN.prototype.redShl = function redShl (num) { - assert(this.red, 'redShl works only with red numbers'); - return this.red.shl(this, num); - }; - - BN.prototype.redMul = function redMul (num) { - assert(this.red, 'redMul works only with red numbers'); - this.red._verify2(this, num); - return this.red.mul(this, num); - }; - - BN.prototype.redIMul = function redIMul (num) { - assert(this.red, 'redMul works only with red numbers'); - this.red._verify2(this, num); - return this.red.imul(this, num); - }; - - BN.prototype.redSqr = function redSqr () { - assert(this.red, 'redSqr works only with red numbers'); - this.red._verify1(this); - return this.red.sqr(this); - }; - - BN.prototype.redISqr = function redISqr () { - assert(this.red, 'redISqr works only with red numbers'); - this.red._verify1(this); - return this.red.isqr(this); - }; - - // Square root over p - BN.prototype.redSqrt = function redSqrt () { - assert(this.red, 'redSqrt works only with red numbers'); - this.red._verify1(this); - return this.red.sqrt(this); - }; - - BN.prototype.redInvm = function redInvm () { - assert(this.red, 'redInvm works only with red numbers'); - this.red._verify1(this); - return this.red.invm(this); - }; - - // Return negative clone of `this` % `red modulo` - BN.prototype.redNeg = function redNeg () { - assert(this.red, 'redNeg works only with red numbers'); - this.red._verify1(this); - return this.red.neg(this); - }; - - BN.prototype.redPow = function redPow (num) { - assert(this.red && !num.red, 'redPow(normalNum)'); - this.red._verify1(this); - return this.red.pow(this, num); - }; - - // Prime numbers with efficient reduction - var primes = { - k256: null, - p224: null, - p192: null, - p25519: null - }; - - // Pseudo-Mersenne prime - function MPrime (name, p) { - // P = 2 ^ N - K - this.name = name; - this.p = new BN(p, 16); - this.n = this.p.bitLength(); - this.k = new BN(1).iushln(this.n).isub(this.p); - - this.tmp = this._tmp(); - } - - MPrime.prototype._tmp = function _tmp () { - var tmp = new BN(null); - tmp.words = new Array(Math.ceil(this.n / 13)); - return tmp; - }; - - MPrime.prototype.ireduce = function ireduce (num) { - // Assumes that `num` is less than `P^2` - // num = HI * (2 ^ N - K) + HI * K + LO = HI * K + LO (mod P) - var r = num; - var rlen; - - do { - this.split(r, this.tmp); - r = this.imulK(r); - r = r.iadd(this.tmp); - rlen = r.bitLength(); - } while (rlen > this.n); - - var cmp = rlen < this.n ? -1 : r.ucmp(this.p); - if (cmp === 0) { - r.words[0] = 0; - r.length = 1; - } else if (cmp > 0) { - r.isub(this.p); - } else { - r.strip(); - } - - return r; - }; - - MPrime.prototype.split = function split (input, out) { - input.iushrn(this.n, 0, out); - }; - - MPrime.prototype.imulK = function imulK (num) { - return num.imul(this.k); - }; - - function K256 () { - MPrime.call( - this, - 'k256', - 'ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f'); - } - inherits(K256, MPrime); - - K256.prototype.split = function split (input, output) { - // 256 = 9 * 26 + 22 - var mask = 0x3fffff; - - var outLen = Math.min(input.length, 9); - for (var i = 0; i < outLen; i++) { - output.words[i] = input.words[i]; - } - output.length = outLen; - - if (input.length <= 9) { - input.words[0] = 0; - input.length = 1; - return; - } - - // Shift by 9 limbs - var prev = input.words[9]; - output.words[output.length++] = prev & mask; - - for (i = 10; i < input.length; i++) { - var next = input.words[i] | 0; - input.words[i - 10] = ((next & mask) << 4) | (prev >>> 22); - prev = next; - } - prev >>>= 22; - input.words[i - 10] = prev; - if (prev === 0 && input.length > 10) { - input.length -= 10; - } else { - input.length -= 9; - } - }; - - K256.prototype.imulK = function imulK (num) { - // K = 0x1000003d1 = [ 0x40, 0x3d1 ] - num.words[num.length] = 0; - num.words[num.length + 1] = 0; - num.length += 2; - - // bounded at: 0x40 * 0x3ffffff + 0x3d0 = 0x100000390 - var lo = 0; - for (var i = 0; i < num.length; i++) { - var w = num.words[i] | 0; - lo += w * 0x3d1; - num.words[i] = lo & 0x3ffffff; - lo = w * 0x40 + ((lo / 0x4000000) | 0); - } - - // Fast length reduction - if (num.words[num.length - 1] === 0) { - num.length--; - if (num.words[num.length - 1] === 0) { - num.length--; - } - } - return num; - }; - - function P224 () { - MPrime.call( - this, - 'p224', - 'ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001'); - } - inherits(P224, MPrime); - - function P192 () { - MPrime.call( - this, - 'p192', - 'ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff'); - } - inherits(P192, MPrime); - - function P25519 () { - // 2 ^ 255 - 19 - MPrime.call( - this, - '25519', - '7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed'); - } - inherits(P25519, MPrime); - - P25519.prototype.imulK = function imulK (num) { - // K = 0x13 - var carry = 0; - for (var i = 0; i < num.length; i++) { - var hi = (num.words[i] | 0) * 0x13 + carry; - var lo = hi & 0x3ffffff; - hi >>>= 26; - - num.words[i] = lo; - carry = hi; - } - if (carry !== 0) { - num.words[num.length++] = carry; - } - return num; - }; - - // Exported mostly for testing purposes, use plain name instead - BN._prime = function prime (name) { - // Cached version of prime - if (primes[name]) return primes[name]; - - var prime; - if (name === 'k256') { - prime = new K256(); - } else if (name === 'p224') { - prime = new P224(); - } else if (name === 'p192') { - prime = new P192(); - } else if (name === 'p25519') { - prime = new P25519(); - } else { - throw new Error('Unknown prime ' + name); - } - primes[name] = prime; - - return prime; - }; - - // - // Base reduction engine - // - function Red (m) { - if (typeof m === 'string') { - var prime = BN._prime(m); - this.m = prime.p; - this.prime = prime; - } else { - assert(m.gtn(1), 'modulus must be greater than 1'); - this.m = m; - this.prime = null; - } - } - - Red.prototype._verify1 = function _verify1 (a) { - assert(a.negative === 0, 'red works only with positives'); - assert(a.red, 'red works only with red numbers'); - }; - - Red.prototype._verify2 = function _verify2 (a, b) { - assert((a.negative | b.negative) === 0, 'red works only with positives'); - assert(a.red && a.red === b.red, - 'red works only with red numbers'); - }; - - Red.prototype.imod = function imod (a) { - if (this.prime) return this.prime.ireduce(a)._forceRed(this); - return a.umod(this.m)._forceRed(this); - }; - - Red.prototype.neg = function neg (a) { - if (a.isZero()) { - return a.clone(); - } - - return this.m.sub(a)._forceRed(this); - }; - - Red.prototype.add = function add (a, b) { - this._verify2(a, b); - - var res = a.add(b); - if (res.cmp(this.m) >= 0) { - res.isub(this.m); - } - return res._forceRed(this); - }; - - Red.prototype.iadd = function iadd (a, b) { - this._verify2(a, b); - - var res = a.iadd(b); - if (res.cmp(this.m) >= 0) { - res.isub(this.m); - } - return res; - }; - - Red.prototype.sub = function sub (a, b) { - this._verify2(a, b); - - var res = a.sub(b); - if (res.cmpn(0) < 0) { - res.iadd(this.m); - } - return res._forceRed(this); - }; - - Red.prototype.isub = function isub (a, b) { - this._verify2(a, b); - - var res = a.isub(b); - if (res.cmpn(0) < 0) { - res.iadd(this.m); - } - return res; - }; - - Red.prototype.shl = function shl (a, num) { - this._verify1(a); - return this.imod(a.ushln(num)); - }; - - Red.prototype.imul = function imul (a, b) { - this._verify2(a, b); - return this.imod(a.imul(b)); - }; - - Red.prototype.mul = function mul (a, b) { - this._verify2(a, b); - return this.imod(a.mul(b)); - }; - - Red.prototype.isqr = function isqr (a) { - return this.imul(a, a.clone()); - }; - - Red.prototype.sqr = function sqr (a) { - return this.mul(a, a); - }; - - Red.prototype.sqrt = function sqrt (a) { - if (a.isZero()) return a.clone(); - - var mod3 = this.m.andln(3); - assert(mod3 % 2 === 1); - - // Fast case - if (mod3 === 3) { - var pow = this.m.add(new BN(1)).iushrn(2); - return this.pow(a, pow); - } - - // Tonelli-Shanks algorithm (Totally unoptimized and slow) - // - // Find Q and S, that Q * 2 ^ S = (P - 1) - var q = this.m.subn(1); - var s = 0; - while (!q.isZero() && q.andln(1) === 0) { - s++; - q.iushrn(1); - } - assert(!q.isZero()); - - var one = new BN(1).toRed(this); - var nOne = one.redNeg(); - - // Find quadratic non-residue - // NOTE: Max is such because of generalized Riemann hypothesis. - var lpow = this.m.subn(1).iushrn(1); - var z = this.m.bitLength(); - z = new BN(2 * z * z).toRed(this); - - while (this.pow(z, lpow).cmp(nOne) !== 0) { - z.redIAdd(nOne); - } - - var c = this.pow(z, q); - var r = this.pow(a, q.addn(1).iushrn(1)); - var t = this.pow(a, q); - var m = s; - while (t.cmp(one) !== 0) { - var tmp = t; - for (var i = 0; tmp.cmp(one) !== 0; i++) { - tmp = tmp.redSqr(); - } - assert(i < m); - var b = this.pow(c, new BN(1).iushln(m - i - 1)); - - r = r.redMul(b); - c = b.redSqr(); - t = t.redMul(c); - m = i; - } - - return r; - }; - - Red.prototype.invm = function invm (a) { - var inv = a._invmp(this.m); - if (inv.negative !== 0) { - inv.negative = 0; - return this.imod(inv).redNeg(); - } else { - return this.imod(inv); - } - }; - - Red.prototype.pow = function pow (a, num) { - if (num.isZero()) return new BN(1); - if (num.cmpn(1) === 0) return a.clone(); - - var windowSize = 4; - var wnd = new Array(1 << windowSize); - wnd[0] = new BN(1).toRed(this); - wnd[1] = a; - for (var i = 2; i < wnd.length; i++) { - wnd[i] = this.mul(wnd[i - 1], a); - } - - var res = wnd[0]; - var current = 0; - var currentLen = 0; - var start = num.bitLength() % 26; - if (start === 0) { - start = 26; - } - - for (i = num.length - 1; i >= 0; i--) { - var word = num.words[i]; - for (var j = start - 1; j >= 0; j--) { - var bit = (word >> j) & 1; - if (res !== wnd[0]) { - res = this.sqr(res); - } - - if (bit === 0 && current === 0) { - currentLen = 0; - continue; - } - - current <<= 1; - current |= bit; - currentLen++; - if (currentLen !== windowSize && (i !== 0 || j !== 0)) continue; - - res = this.mul(res, wnd[current]); - currentLen = 0; - current = 0; - } - start = 26; - } - - return res; - }; - - Red.prototype.convertTo = function convertTo (num) { - var r = num.umod(this.m); - - return r === num ? r.clone() : r; - }; - - Red.prototype.convertFrom = function convertFrom (num) { - var res = num.clone(); - res.red = null; - return res; - }; - - // - // Montgomery method engine - // - - BN.mont = function mont (num) { - return new Mont(num); - }; - - function Mont (m) { - Red.call(this, m); - - this.shift = this.m.bitLength(); - if (this.shift % 26 !== 0) { - this.shift += 26 - (this.shift % 26); - } - - this.r = new BN(1).iushln(this.shift); - this.r2 = this.imod(this.r.sqr()); - this.rinv = this.r._invmp(this.m); - - this.minv = this.rinv.mul(this.r).isubn(1).div(this.m); - this.minv = this.minv.umod(this.r); - this.minv = this.r.sub(this.minv); - } - inherits(Mont, Red); - - Mont.prototype.convertTo = function convertTo (num) { - return this.imod(num.ushln(this.shift)); - }; - - Mont.prototype.convertFrom = function convertFrom (num) { - var r = this.imod(num.mul(this.rinv)); - r.red = null; - return r; - }; - - Mont.prototype.imul = function imul (a, b) { - if (a.isZero() || b.isZero()) { - a.words[0] = 0; - a.length = 1; - return a; - } - - var t = a.imul(b); - var c = t.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m); - var u = t.isub(c).iushrn(this.shift); - var res = u; - - if (u.cmp(this.m) >= 0) { - res = u.isub(this.m); - } else if (u.cmpn(0) < 0) { - res = u.iadd(this.m); - } - - return res._forceRed(this); - }; - - Mont.prototype.mul = function mul (a, b) { - if (a.isZero() || b.isZero()) return new BN(0)._forceRed(this); - - var t = a.mul(b); - var c = t.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m); - var u = t.isub(c).iushrn(this.shift); - var res = u; - if (u.cmp(this.m) >= 0) { - res = u.isub(this.m); - } else if (u.cmpn(0) < 0) { - res = u.iadd(this.m); - } - - return res._forceRed(this); - }; - - Mont.prototype.invm = function invm (a) { - // (AR)^-1 * R^2 = (A^-1 * R^-1) * R^2 = A^-1 * R - var res = this.imod(a._invmp(this.m).mul(this.r2)); - return res._forceRed(this); - }; -})(typeof module === 'undefined' || module, this); diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/create-ecdh/node_modules/bn.js/package.json b/node_modules/browserify/node_modules/crypto-browserify/node_modules/create-ecdh/node_modules/bn.js/package.json deleted file mode 100644 index 25b71f31..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/create-ecdh/node_modules/bn.js/package.json +++ /dev/null @@ -1,71 +0,0 @@ -{ - "name": "bn.js", - "version": "4.11.6", - "description": "Big number implementation in pure javascript", - "main": "lib/bn.js", - "scripts": { - "lint": "semistandard", - "unit": "mocha --reporter=spec test/*-test.js", - "test": "npm run lint && npm run unit" - }, - "repository": { - "type": "git", - "url": "git+ssh://git@github.com/indutny/bn.js.git" - }, - "keywords": [ - "BN", - "BigNum", - "Big number", - "Modulo", - "Montgomery" - ], - "author": { - "name": "Fedor Indutny", - "email": "fedor@indutny.com" - }, - "license": "MIT", - "bugs": { - "url": "https://github.com/indutny/bn.js/issues" - }, - "homepage": "https://github.com/indutny/bn.js", - "devDependencies": { - "istanbul": "^0.3.5", - "mocha": "^2.1.0", - "semistandard": "^7.0.4" - }, - "gitHead": "e4a82134c89ed85b0c3a03da7fabc016206898a4", - "_id": "bn.js@4.11.6", - "_shasum": "53344adb14617a13f6e8dd2ce28905d1c0ba3215", - "_from": "bn.js@>=4.1.0 <5.0.0", - "_npmVersion": "3.10.3", - "_nodeVersion": "6.3.0", - "_npmUser": { - "name": "indutny", - "email": "fedor@indutny.com" - }, - "dist": { - "shasum": "53344adb14617a13f6e8dd2ce28905d1c0ba3215", - "tarball": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.6.tgz" - }, - "maintainers": [ - { - "name": "cwmma", - "email": "calvin.metcalf@gmail.com" - }, - { - "name": "dcousens", - "email": "email@dcousens.com" - }, - { - "name": "indutny", - "email": "fedor@indutny.com" - } - ], - "_npmOperationalInternal": { - "host": "packages-16-east.internal.npmjs.com", - "tmp": "tmp/bn.js-4.11.6.tgz_1470100429753_0.28054949711076915" - }, - "directories": {}, - "_resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.6.tgz", - "readme": "ERROR: No README data found!" -} diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/create-ecdh/node_modules/bn.js/test/arithmetic-test.js b/node_modules/browserify/node_modules/crypto-browserify/node_modules/create-ecdh/node_modules/bn.js/test/arithmetic-test.js deleted file mode 100644 index c3a0d7d5..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/create-ecdh/node_modules/bn.js/test/arithmetic-test.js +++ /dev/null @@ -1,635 +0,0 @@ -/* global describe, it */ - -var assert = require('assert'); -var BN = require('../').BN; -var fixtures = require('./fixtures'); - -describe('BN.js/Arithmetic', function () { - describe('.add()', function () { - it('should add numbers', function () { - assert.equal(new BN(14).add(new BN(26)).toString(16), '28'); - var k = new BN(0x1234); - var r = k; - - for (var i = 0; i < 257; i++) { - r = r.add(k); - } - - assert.equal(r.toString(16), '125868'); - }); - - it('should handle carry properly (in-place)', function () { - var k = new BN('abcdefabcdefabcdef', 16); - var r = new BN('deadbeef', 16); - - for (var i = 0; i < 257; i++) { - r.iadd(k); - } - - assert.equal(r.toString(16), 'ac79bd9b79be7a277bde'); - }); - - it('should properly do positive + negative', function () { - var a = new BN('abcd', 16); - var b = new BN('-abce', 16); - - assert.equal(a.iadd(b).toString(16), '-1'); - - a = new BN('abcd', 16); - b = new BN('-abce', 16); - - assert.equal(a.add(b).toString(16), '-1'); - assert.equal(b.add(a).toString(16), '-1'); - }); - }); - - describe('.iaddn()', function () { - it('should allow a sign change', function () { - var a = new BN(-100); - assert.equal(a.negative, 1); - - a.iaddn(200); - - assert.equal(a.negative, 0); - assert.equal(a.toString(), '100'); - }); - - it('should add negative number', function () { - var a = new BN(-100); - assert.equal(a.negative, 1); - - a.iaddn(-200); - - assert.equal(a.toString(), '-300'); - }); - - it('should allow neg + pos with big number', function () { - var a = new BN('-1000000000', 10); - assert.equal(a.negative, 1); - - a.iaddn(200); - - assert.equal(a.toString(), '-999999800'); - }); - - it('should carry limb', function () { - var a = new BN('3ffffff', 16); - - assert.equal(a.iaddn(1).toString(16), '4000000'); - }); - - it('should throw error with num eq 0x4000000', function () { - assert.throws(function () { - new BN(0).iaddn(0x4000000); - }, /^Error: Assertion failed$/); - }); - }); - - describe('.sub()', function () { - it('should subtract small numbers', function () { - assert.equal(new BN(26).sub(new BN(14)).toString(16), 'c'); - assert.equal(new BN(14).sub(new BN(26)).toString(16), '-c'); - assert.equal(new BN(26).sub(new BN(26)).toString(16), '0'); - assert.equal(new BN(-26).sub(new BN(26)).toString(16), '-34'); - }); - - var a = new BN( - '31ff3c61db2db84b9823d320907a573f6ad37c437abe458b1802cda041d6384' + - 'a7d8daef41395491e2', - 16); - var b = new BN( - '6f0e4d9f1d6071c183677f601af9305721c91d31b0bbbae8fb790000', - 16); - var r = new BN( - '31ff3c61db2db84b9823d3208989726578fd75276287cd9516533a9acfb9a67' + - '76281f34583ddb91e2', - 16); - - it('should subtract big numbers', function () { - assert.equal(a.sub(b).cmp(r), 0); - }); - - it('should subtract numbers in place', function () { - assert.equal(b.clone().isub(a).neg().cmp(r), 0); - }); - - it('should subtract with carry', function () { - // Carry and copy - var a = new BN('12345', 16); - var b = new BN('1000000000000', 16); - assert.equal(a.isub(b).toString(16), '-fffffffedcbb'); - - a = new BN('12345', 16); - b = new BN('1000000000000', 16); - assert.equal(b.isub(a).toString(16), 'fffffffedcbb'); - }); - }); - - describe('.isubn()', function () { - it('should subtract negative number', function () { - var r = new BN( - '7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b', 16); - assert.equal(r.isubn(-1).toString(16), - '7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681c'); - }); - - it('should work for positive numbers', function () { - var a = new BN(-100); - assert.equal(a.negative, 1); - - a.isubn(200); - assert.equal(a.negative, 1); - assert.equal(a.toString(), '-300'); - }); - - it('should not allow a sign change', function () { - var a = new BN(-100); - assert.equal(a.negative, 1); - - a.isubn(-200); - assert.equal(a.negative, 0); - assert.equal(a.toString(), '100'); - }); - - it('should change sign on small numbers at 0', function () { - var a = new BN(0).subn(2); - assert.equal(a.toString(), '-2'); - }); - - it('should change sign on small numbers at 1', function () { - var a = new BN(1).subn(2); - assert.equal(a.toString(), '-1'); - }); - - it('should throw error with num eq 0x4000000', function () { - assert.throws(function () { - new BN(0).isubn(0x4000000); - }, /^Error: Assertion failed$/); - }); - }); - - function testMethod (name, mul) { - describe(name, function () { - it('should multiply numbers of different signs', function () { - var offsets = [ - 1, // smallMulTo - 250, // comb10MulTo - 1000, // bigMulTo - 15000 // jumboMulTo - ]; - - for (var i = 0; i < offsets.length; ++i) { - var x = new BN(1).ishln(offsets[i]); - - assert.equal(mul(x, x).isNeg(), false); - assert.equal(mul(x, x.neg()).isNeg(), true); - assert.equal(mul(x.neg(), x).isNeg(), true); - assert.equal(mul(x.neg(), x.neg()).isNeg(), false); - } - }); - - it('should multiply with carry', function () { - var n = new BN(0x1001); - var r = n; - - for (var i = 0; i < 4; i++) { - r = mul(r, n); - } - - assert.equal(r.toString(16), '100500a00a005001'); - }); - - it('should correctly multiply big numbers', function () { - var n = new BN( - '79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798', - 16 - ); - assert.equal( - mul(n, n).toString(16), - '39e58a8055b6fb264b75ec8c646509784204ac15a8c24e05babc9729ab9' + - 'b055c3a9458e4ce3289560a38e08ba8175a9446ce14e608245ab3a9' + - '978a8bd8acaa40'); - assert.equal( - mul(mul(n, n), n).toString(16), - '1b888e01a06e974017a28a5b4da436169761c9730b7aeedf75fc60f687b' + - '46e0cf2cb11667f795d5569482640fe5f628939467a01a612b02350' + - '0d0161e9730279a7561043af6197798e41b7432458463e64fa81158' + - '907322dc330562697d0d600'); - }); - - it('should multiply neg number on 0', function () { - assert.equal( - mul(new BN('-100000000000'), new BN('3').div(new BN('4'))) - .toString(16), - '0' - ); - }); - - it('should regress mul big numbers', function () { - var q = fixtures.dhGroups.p17.q; - var qs = fixtures.dhGroups.p17.qs; - - q = new BN(q, 16); - assert.equal(mul(q, q).toString(16), qs); - }); - }); - } - - testMethod('.mul()', function (x, y) { - return BN.prototype.mul.apply(x, [ y ]); - }); - - testMethod('.mulf()', function (x, y) { - return BN.prototype.mulf.apply(x, [ y ]); - }); - - describe('.imul()', function () { - it('should multiply numbers in-place', function () { - var a = new BN('abcdef01234567890abcd', 16); - var b = new BN('deadbeefa551edebabba8', 16); - var c = a.mul(b); - - assert.equal(a.imul(b).toString(16), c.toString(16)); - - a = new BN('abcdef01234567890abcd214a25123f512361e6d236', 16); - b = new BN('deadbeefa551edebabba8121234fd21bac0341324dd', 16); - c = a.mul(b); - - assert.equal(a.imul(b).toString(16), c.toString(16)); - }); - - it('should multiply by 0', function () { - var a = new BN('abcdef01234567890abcd', 16); - var b = new BN('0', 16); - var c = a.mul(b); - - assert.equal(a.imul(b).toString(16), c.toString(16)); - }); - - it('should regress mul big numbers in-place', function () { - var q = fixtures.dhGroups.p17.q; - var qs = fixtures.dhGroups.p17.qs; - - q = new BN(q, 16); - - assert.equal(q.isqr().toString(16), qs); - }); - }); - - describe('.muln()', function () { - it('should multiply number by small number', function () { - var a = new BN('abcdef01234567890abcd', 16); - var b = new BN('dead', 16); - var c = a.mul(b); - - assert.equal(a.muln(0xdead).toString(16), c.toString(16)); - }); - - it('should throw error with num eq 0x4000000', function () { - assert.throws(function () { - new BN(0).imuln(0x4000000); - }, /^Error: Assertion failed$/); - }); - }); - - describe('.pow()', function () { - it('should raise number to the power', function () { - var a = new BN('ab', 16); - var b = new BN('13', 10); - var c = a.pow(b); - - assert.equal(c.toString(16), '15963da06977df51909c9ba5b'); - }); - }); - - describe('.div()', function () { - it('should divide small numbers (<=26 bits)', function () { - assert.equal(new BN('256').div(new BN(10)).toString(10), - '25'); - assert.equal(new BN('-256').div(new BN(10)).toString(10), - '-25'); - assert.equal(new BN('256').div(new BN(-10)).toString(10), - '-25'); - assert.equal(new BN('-256').div(new BN(-10)).toString(10), - '25'); - - assert.equal(new BN('10').div(new BN(256)).toString(10), - '0'); - assert.equal(new BN('-10').div(new BN(256)).toString(10), - '0'); - assert.equal(new BN('10').div(new BN(-256)).toString(10), - '0'); - assert.equal(new BN('-10').div(new BN(-256)).toString(10), - '0'); - }); - - it('should divide large numbers (>53 bits)', function () { - assert.equal(new BN('1222222225255589').div(new BN('611111124969028')) - .toString(10), '1'); - assert.equal(new BN('-1222222225255589').div(new BN('611111124969028')) - .toString(10), '-1'); - assert.equal(new BN('1222222225255589').div(new BN('-611111124969028')) - .toString(10), '-1'); - assert.equal(new BN('-1222222225255589').div(new BN('-611111124969028')) - .toString(10), '1'); - - assert.equal(new BN('611111124969028').div(new BN('1222222225255589')) - .toString(10), '0'); - assert.equal(new BN('-611111124969028').div(new BN('1222222225255589')) - .toString(10), '0'); - assert.equal(new BN('611111124969028').div(new BN('-1222222225255589')) - .toString(10), '0'); - assert.equal(new BN('-611111124969028').div(new BN('-1222222225255589')) - .toString(10), '0'); - }); - - it('should divide numbers', function () { - assert.equal(new BN('69527932928').div(new BN('16974594')).toString(16), - 'fff'); - assert.equal(new BN('-69527932928').div(new BN('16974594')).toString(16), - '-fff'); - - var b = new BN( - '39e58a8055b6fb264b75ec8c646509784204ac15a8c24e05babc9729ab9' + - 'b055c3a9458e4ce3289560a38e08ba8175a9446ce14e608245ab3a9' + - '978a8bd8acaa40', - 16); - var n = new BN( - '79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798', - 16 - ); - assert.equal(b.div(n).toString(16), n.toString(16)); - - assert.equal(new BN('1').div(new BN('-5')).toString(10), '0'); - }); - - it('should not fail on regression after moving to _wordDiv', function () { - // Regression after moving to word div - var p = new BN( - 'fffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f', - 16); - var a = new BN( - '79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798', - 16); - var as = a.sqr(); - assert.equal( - as.div(p).toString(16), - '39e58a8055b6fb264b75ec8c646509784204ac15a8c24e05babc9729e58090b9'); - - p = new BN( - 'ffffffff00000001000000000000000000000000ffffffffffffffffffffffff', - 16); - a = new BN( - 'fffffffe00000003fffffffd0000000200000001fffffffe00000002ffffffff' + - 'ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff', - 16); - assert.equal( - a.div(p).toString(16), - 'ffffffff00000002000000000000000000000001000000000000000000000001'); - }); - }); - - describe('.idivn()', function () { - it('should divide numbers in-place', function () { - assert.equal(new BN('10', 16).idivn(3).toString(16), '5'); - assert.equal(new BN('12', 16).idivn(3).toString(16), '6'); - assert.equal(new BN('10000000000000000').idivn(3).toString(10), - '3333333333333333'); - assert.equal( - new BN('100000000000000000000000000000').idivn(3).toString(10), - '33333333333333333333333333333'); - - var t = new BN(3); - assert.equal( - new BN('12345678901234567890123456', 16).idivn(3).toString(16), - new BN('12345678901234567890123456', 16).div(t).toString(16)); - }); - }); - - describe('.divRound()', function () { - it('should divide numbers with rounding', function () { - assert.equal(new BN(9).divRound(new BN(20)).toString(10), - '0'); - assert.equal(new BN(10).divRound(new BN(20)).toString(10), - '1'); - assert.equal(new BN(150).divRound(new BN(20)).toString(10), - '8'); - assert.equal(new BN(149).divRound(new BN(20)).toString(10), - '7'); - assert.equal(new BN(149).divRound(new BN(17)).toString(10), - '9'); - assert.equal(new BN(144).divRound(new BN(17)).toString(10), - '8'); - assert.equal(new BN(-144).divRound(new BN(17)).toString(10), - '-8'); - }); - - it('should return 1 on exact division', function () { - assert.equal(new BN(144).divRound(new BN(144)).toString(10), '1'); - }); - }); - - describe('.mod()', function () { - it('should modulo small numbers (<=26 bits)', function () { - assert.equal(new BN('256').mod(new BN(10)).toString(10), - '6'); - assert.equal(new BN('-256').mod(new BN(10)).toString(10), - '-6'); - assert.equal(new BN('256').mod(new BN(-10)).toString(10), - '6'); - assert.equal(new BN('-256').mod(new BN(-10)).toString(10), - '-6'); - - assert.equal(new BN('10').mod(new BN(256)).toString(10), - '10'); - assert.equal(new BN('-10').mod(new BN(256)).toString(10), - '-10'); - assert.equal(new BN('10').mod(new BN(-256)).toString(10), - '10'); - assert.equal(new BN('-10').mod(new BN(-256)).toString(10), - '-10'); - }); - - it('should modulo large numbers (>53 bits)', function () { - assert.equal(new BN('1222222225255589').mod(new BN('611111124969028')) - .toString(10), '611111100286561'); - assert.equal(new BN('-1222222225255589').mod(new BN('611111124969028')) - .toString(10), '-611111100286561'); - assert.equal(new BN('1222222225255589').mod(new BN('-611111124969028')) - .toString(10), '611111100286561'); - assert.equal(new BN('-1222222225255589').mod(new BN('-611111124969028')) - .toString(10), '-611111100286561'); - - assert.equal(new BN('611111124969028').mod(new BN('1222222225255589')) - .toString(10), '611111124969028'); - assert.equal(new BN('-611111124969028').mod(new BN('1222222225255589')) - .toString(10), '-611111124969028'); - assert.equal(new BN('611111124969028').mod(new BN('-1222222225255589')) - .toString(10), '611111124969028'); - assert.equal(new BN('-611111124969028').mod(new BN('-1222222225255589')) - .toString(10), '-611111124969028'); - }); - - it('should mod numbers', function () { - assert.equal(new BN('10').mod(new BN(256)).toString(16), - 'a'); - assert.equal(new BN('69527932928').mod(new BN('16974594')).toString(16), - '102f302'); - - // 178 = 10 * 17 + 8 - assert.equal(new BN(178).div(new BN(10)).toNumber(), 17); - assert.equal(new BN(178).mod(new BN(10)).toNumber(), 8); - assert.equal(new BN(178).umod(new BN(10)).toNumber(), 8); - - // -178 = 10 * (-17) + (-8) - assert.equal(new BN(-178).div(new BN(10)).toNumber(), -17); - assert.equal(new BN(-178).mod(new BN(10)).toNumber(), -8); - assert.equal(new BN(-178).umod(new BN(10)).toNumber(), 2); - - // 178 = -10 * (-17) + 8 - assert.equal(new BN(178).div(new BN(-10)).toNumber(), -17); - assert.equal(new BN(178).mod(new BN(-10)).toNumber(), 8); - assert.equal(new BN(178).umod(new BN(-10)).toNumber(), 8); - - // -178 = -10 * (17) + (-8) - assert.equal(new BN(-178).div(new BN(-10)).toNumber(), 17); - assert.equal(new BN(-178).mod(new BN(-10)).toNumber(), -8); - assert.equal(new BN(-178).umod(new BN(-10)).toNumber(), 2); - - // -4 = 1 * (-3) + -1 - assert.equal(new BN(-4).div(new BN(-3)).toNumber(), 1); - assert.equal(new BN(-4).mod(new BN(-3)).toNumber(), -1); - - // -4 = -1 * (3) + -1 - assert.equal(new BN(-4).mod(new BN(3)).toNumber(), -1); - // -4 = 1 * (-3) + (-1 + 3) - assert.equal(new BN(-4).umod(new BN(-3)).toNumber(), 2); - - var p = new BN( - 'ffffffff00000001000000000000000000000000ffffffffffffffffffffffff', - 16); - var a = new BN( - 'fffffffe00000003fffffffd0000000200000001fffffffe00000002ffffffff' + - 'ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff', - 16); - assert.equal( - a.mod(p).toString(16), - '0'); - }); - - it('should properly carry the sign inside division', function () { - var a = new BN('945304eb96065b2a98b57a48a06ae28d285a71b5', 'hex'); - var b = new BN( - 'fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe', - 'hex'); - - assert.equal(a.mul(b).mod(a).cmpn(0), 0); - }); - }); - - describe('.modn()', function () { - it('should act like .mod() on small numbers', function () { - assert.equal(new BN('10', 16).modn(256).toString(16), '10'); - assert.equal(new BN('100', 16).modn(256).toString(16), '0'); - assert.equal(new BN('1001', 16).modn(256).toString(16), '1'); - assert.equal(new BN('100000000001', 16).modn(256).toString(16), '1'); - assert.equal(new BN('100000000001', 16).modn(257).toString(16), - new BN('100000000001', 16).mod(new BN(257)).toString(16)); - assert.equal(new BN('123456789012', 16).modn(3).toString(16), - new BN('123456789012', 16).mod(new BN(3)).toString(16)); - }); - }); - - describe('.abs()', function () { - it('should return absolute value', function () { - assert.equal(new BN(0x1001).abs().toString(), '4097'); - assert.equal(new BN(-0x1001).abs().toString(), '4097'); - assert.equal(new BN('ffffffff', 16).abs().toString(), '4294967295'); - }); - }); - - describe('.invm()', function () { - it('should invert relatively-prime numbers', function () { - var p = new BN(257); - var a = new BN(3); - var b = a.invm(p); - assert.equal(a.mul(b).mod(p).toString(16), '1'); - - var p192 = new BN( - 'fffffffffffffffffffffffffffffffeffffffffffffffff', - 16); - a = new BN('deadbeef', 16); - b = a.invm(p192); - assert.equal(a.mul(b).mod(p192).toString(16), '1'); - - // Even base - var phi = new BN('872d9b030ba368706b68932cf07a0e0c', 16); - var e = new BN(65537); - var d = e.invm(phi); - assert.equal(e.mul(d).mod(phi).toString(16), '1'); - - // Even base (take #2) - a = new BN('5'); - b = new BN('6'); - var r = a.invm(b); - assert.equal(r.mul(a).mod(b).toString(16), '1'); - }); - }); - - describe('.gcd()', function () { - it('should return GCD', function () { - assert.equal(new BN(3).gcd(new BN(2)).toString(10), '1'); - assert.equal(new BN(18).gcd(new BN(12)).toString(10), '6'); - assert.equal(new BN(-18).gcd(new BN(12)).toString(10), '6'); - assert.equal(new BN(-18).gcd(new BN(-12)).toString(10), '6'); - assert.equal(new BN(-18).gcd(new BN(0)).toString(10), '18'); - assert.equal(new BN(0).gcd(new BN(-18)).toString(10), '18'); - assert.equal(new BN(2).gcd(new BN(0)).toString(10), '2'); - assert.equal(new BN(0).gcd(new BN(3)).toString(10), '3'); - assert.equal(new BN(0).gcd(new BN(0)).toString(10), '0'); - }); - }); - - describe('.egcd()', function () { - it('should return EGCD', function () { - assert.equal(new BN(3).egcd(new BN(2)).gcd.toString(10), '1'); - assert.equal(new BN(18).egcd(new BN(12)).gcd.toString(10), '6'); - assert.equal(new BN(-18).egcd(new BN(12)).gcd.toString(10), '6'); - assert.equal(new BN(0).egcd(new BN(12)).gcd.toString(10), '12'); - }); - it('should not allow 0 input', function () { - assert.throws(function () { - new BN(1).egcd(0); - }, /^Error: Assertion failed$/); - }); - it('should not allow negative input', function () { - assert.throws(function () { - new BN(1).egcd(-1); - }, /^Error: Assertion failed$/); - }); - }); - - describe('BN.max(a, b)', function () { - it('should return maximum', function () { - assert.equal(BN.max(new BN(3), new BN(2)).toString(16), '3'); - assert.equal(BN.max(new BN(2), new BN(3)).toString(16), '3'); - assert.equal(BN.max(new BN(2), new BN(2)).toString(16), '2'); - assert.equal(BN.max(new BN(2), new BN(-2)).toString(16), '2'); - }); - }); - - describe('BN.min(a, b)', function () { - it('should return minimum', function () { - assert.equal(BN.min(new BN(3), new BN(2)).toString(16), '2'); - assert.equal(BN.min(new BN(2), new BN(3)).toString(16), '2'); - assert.equal(BN.min(new BN(2), new BN(2)).toString(16), '2'); - assert.equal(BN.min(new BN(2), new BN(-2)).toString(16), '-2'); - }); - }); - - describe('BN.ineg', function () { - it('shouldn\'t change sign for zero', function () { - assert.equal(new BN(0).ineg().toString(10), '0'); - }); - }); -}); diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/create-ecdh/node_modules/bn.js/test/binary-test.js b/node_modules/browserify/node_modules/crypto-browserify/node_modules/create-ecdh/node_modules/bn.js/test/binary-test.js deleted file mode 100644 index 37b6421d..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/create-ecdh/node_modules/bn.js/test/binary-test.js +++ /dev/null @@ -1,233 +0,0 @@ -/* global describe, it */ - -var assert = require('assert'); -var BN = require('../').BN; - -describe('BN.js/Binary', function () { - describe('.shl()', function () { - it('should shl numbers', function () { - // TODO(indutny): add negative numbers when the time will come - assert.equal(new BN('69527932928').shln(13).toString(16), - '2060602000000'); - assert.equal(new BN('69527932928').shln(45).toString(16), - '206060200000000000000'); - }); - - it('should ushl numbers', function () { - assert.equal(new BN('69527932928').ushln(13).toString(16), - '2060602000000'); - assert.equal(new BN('69527932928').ushln(45).toString(16), - '206060200000000000000'); - }); - }); - - describe('.shr()', function () { - it('should shr numbers', function () { - // TODO(indutny): add negative numbers when the time will come - assert.equal(new BN('69527932928').shrn(13).toString(16), - '818180'); - assert.equal(new BN('69527932928').shrn(17).toString(16), - '81818'); - assert.equal(new BN('69527932928').shrn(256).toString(16), - '0'); - }); - - it('should ushr numbers', function () { - assert.equal(new BN('69527932928').ushrn(13).toString(16), - '818180'); - assert.equal(new BN('69527932928').ushrn(17).toString(16), - '81818'); - assert.equal(new BN('69527932928').ushrn(256).toString(16), - '0'); - }); - }); - - describe('.bincn()', function () { - it('should increment bit', function () { - assert.equal(new BN(0).bincn(1).toString(16), '2'); - assert.equal(new BN(2).bincn(1).toString(16), '4'); - assert.equal(new BN(2).bincn(1).bincn(1).toString(16), - new BN(2).bincn(2).toString(16)); - assert.equal(new BN(0xffffff).bincn(1).toString(16), '1000001'); - assert.equal(new BN(2).bincn(63).toString(16), - '8000000000000002'); - }); - }); - - describe('.imaskn()', function () { - it('should mask bits in-place', function () { - assert.equal(new BN(0).imaskn(1).toString(16), '0'); - assert.equal(new BN(3).imaskn(1).toString(16), '1'); - assert.equal(new BN('123456789', 16).imaskn(4).toString(16), '9'); - assert.equal(new BN('123456789', 16).imaskn(16).toString(16), '6789'); - assert.equal(new BN('123456789', 16).imaskn(28).toString(16), '3456789'); - }); - - it('should not mask when number is bigger than length', function () { - assert.equal(new BN(0xe3).imaskn(56).toString(16), 'e3'); - assert.equal(new BN(0xe3).imaskn(26).toString(16), 'e3'); - }); - }); - - describe('.testn()', function () { - it('should support test specific bit', function () { - [ - 'ff', - 'ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff' - ].forEach(function (hex) { - var bn = new BN(hex, 16); - var bl = bn.bitLength(); - - for (var i = 0; i < bl; ++i) { - assert.equal(bn.testn(i), true); - } - - // test off the end - assert.equal(bn.testn(bl), false); - }); - - var xbits = '01111001010111001001000100011101' + - '11010011101100011000111001011101' + - '10010100111000000001011000111101' + - '01011111001111100100011110000010' + - '01011010100111010001010011000100' + - '01101001011110100001001111100110' + - '001110010111'; - - var x = new BN( - '23478905234580795234378912401239784125643978256123048348957342' - ); - for (var i = 0; i < x.bitLength(); ++i) { - assert.equal(x.testn(i), (xbits.charAt(i) === '1'), 'Failed @ bit ' + i); - } - }); - - it('should have short-cuts', function () { - var x = new BN('abcd', 16); - assert(!x.testn(128)); - }); - }); - - describe('.and()', function () { - it('should and numbers', function () { - assert.equal(new BN('1010101010101010101010101010101010101010', 2) - .and(new BN('101010101010101010101010101010101010101', 2)) - .toString(2), '0'); - }); - - it('should and numbers of different limb-length', function () { - assert.equal( - new BN('abcd0000ffff', 16) - .and(new BN('abcd', 16)).toString(16), - 'abcd'); - }); - }); - - describe('.iand()', function () { - it('should iand numbers', function () { - assert.equal(new BN('1010101010101010101010101010101010101010', 2) - .iand(new BN('101010101010101010101010101010101010101', 2)) - .toString(2), '0'); - assert.equal(new BN('1000000000000000000000000000000000000001', 2) - .iand(new BN('1', 2)) - .toString(2), '1'); - assert.equal(new BN('1', 2) - .iand(new BN('1000000000000000000000000000000000000001', 2)) - .toString(2), '1'); - }); - }); - - describe('.or()', function () { - it('should or numbers', function () { - assert.equal(new BN('1010101010101010101010101010101010101010', 2) - .or(new BN('101010101010101010101010101010101010101', 2)) - .toString(2), '1111111111111111111111111111111111111111'); - }); - - it('should or numbers of different limb-length', function () { - assert.equal( - new BN('abcd00000000', 16) - .or(new BN('abcd', 16)).toString(16), - 'abcd0000abcd'); - }); - }); - - describe('.ior()', function () { - it('should ior numbers', function () { - assert.equal(new BN('1010101010101010101010101010101010101010', 2) - .ior(new BN('101010101010101010101010101010101010101', 2)) - .toString(2), '1111111111111111111111111111111111111111'); - assert.equal(new BN('1000000000000000000000000000000000000000', 2) - .ior(new BN('1', 2)) - .toString(2), '1000000000000000000000000000000000000001'); - assert.equal(new BN('1', 2) - .ior(new BN('1000000000000000000000000000000000000000', 2)) - .toString(2), '1000000000000000000000000000000000000001'); - }); - }); - - describe('.xor()', function () { - it('should xor numbers', function () { - assert.equal(new BN('11001100110011001100110011001100', 2) - .xor(new BN('1100110011001100110011001100110', 2)) - .toString(2), '10101010101010101010101010101010'); - }); - }); - - describe('.ixor()', function () { - it('should ixor numbers', function () { - assert.equal(new BN('11001100110011001100110011001100', 2) - .ixor(new BN('1100110011001100110011001100110', 2)) - .toString(2), '10101010101010101010101010101010'); - assert.equal(new BN('11001100110011001100110011001100', 2) - .ixor(new BN('1', 2)) - .toString(2), '11001100110011001100110011001101'); - assert.equal(new BN('1', 2) - .ixor(new BN('11001100110011001100110011001100', 2)) - .toString(2), '11001100110011001100110011001101'); - }); - - it('should and numbers of different limb-length', function () { - assert.equal( - new BN('abcd0000ffff', 16) - .xor(new BN('abcd', 16)).toString(16), - 'abcd00005432'); - }); - }); - - describe('.setn()', function () { - it('should allow single bits to be set', function () { - assert.equal(new BN(0).setn(2, true).toString(2), '100'); - assert.equal(new BN(0).setn(27, true).toString(2), - '1000000000000000000000000000'); - assert.equal(new BN(0).setn(63, true).toString(16), - new BN(1).iushln(63).toString(16)); - assert.equal(new BN('1000000000000000000000000001', 2).setn(27, false) - .toString(2), '1'); - assert.equal(new BN('101', 2).setn(2, false).toString(2), '1'); - }); - }); - - describe('.notn()', function () { - it('should allow bitwise negation', function () { - assert.equal(new BN('111000111', 2).notn(9).toString(2), - '111000'); - assert.equal(new BN('000111000', 2).notn(9).toString(2), - '111000111'); - assert.equal(new BN('111000111', 2).notn(9).toString(2), - '111000'); - assert.equal(new BN('000111000', 2).notn(9).toString(2), - '111000111'); - assert.equal(new BN('111000111', 2).notn(32).toString(2), - '11111111111111111111111000111000'); - assert.equal(new BN('000111000', 2).notn(32).toString(2), - '11111111111111111111111111000111'); - assert.equal(new BN('111000111', 2).notn(68).toString(2), - '11111111111111111111111111111111' + - '111111111111111111111111111000111000'); - assert.equal(new BN('000111000', 2).notn(68).toString(2), - '11111111111111111111111111111111' + - '111111111111111111111111111111000111'); - }); - }); -}); diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/create-ecdh/node_modules/bn.js/test/constructor-test.js b/node_modules/browserify/node_modules/crypto-browserify/node_modules/create-ecdh/node_modules/bn.js/test/constructor-test.js deleted file mode 100644 index 11c7df08..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/create-ecdh/node_modules/bn.js/test/constructor-test.js +++ /dev/null @@ -1,149 +0,0 @@ -/* global describe, it */ - -var assert = require('assert'); -var BN = require('../').BN; - -describe('BN.js/Constructor', function () { - describe('with Smi input', function () { - it('should accept one limb number', function () { - assert.equal(new BN(12345).toString(16), '3039'); - }); - - it('should accept two-limb number', function () { - assert.equal(new BN(0x4123456).toString(16), '4123456'); - }); - - it('should accept 52 bits of precision', function () { - var num = Math.pow(2, 52); - assert.equal(new BN(num, 10).toString(10), num.toString(10)); - }); - - it('should accept max safe integer', function () { - var num = Math.pow(2, 53) - 1; - assert.equal(new BN(num, 10).toString(10), num.toString(10)); - }); - - it('should not accept an unsafe integer', function () { - var num = Math.pow(2, 53); - - assert.throws(function () { - return new BN(num, 10); - }, /^Error: Assertion failed$/); - }); - - it('should accept two-limb LE number', function () { - assert.equal(new BN(0x4123456, null, 'le').toString(16), '56341204'); - }); - }); - - describe('with String input', function () { - it('should accept base-16', function () { - assert.equal(new BN('1A6B765D8CDF', 16).toString(16), '1a6b765d8cdf'); - assert.equal(new BN('1A6B765D8CDF', 16).toString(), '29048849665247'); - }); - - it('should accept base-hex', function () { - assert.equal(new BN('FF', 'hex').toString(), '255'); - }); - - it('should accept base-16 with spaces', function () { - var num = 'a89c e5af8724 c0a23e0e 0ff77500'; - assert.equal(new BN(num, 16).toString(16), num.replace(/ /g, '')); - }); - - it('should accept long base-16', function () { - var num = '123456789abcdef123456789abcdef123456789abcdef'; - assert.equal(new BN(num, 16).toString(16), num); - }); - - it('should accept positive base-10', function () { - assert.equal(new BN('10654321').toString(), '10654321'); - assert.equal(new BN('29048849665247').toString(16), '1a6b765d8cdf'); - }); - - it('should accept negative base-10', function () { - assert.equal(new BN('-29048849665247').toString(16), '-1a6b765d8cdf'); - }); - - it('should accept long base-10', function () { - var num = '10000000000000000'; - assert.equal(new BN(num).toString(10), num); - }); - - it('should accept base-2', function () { - var base2 = '11111111111111111111111111111111111111111111111111111'; - assert.equal(new BN(base2, 2).toString(2), base2); - }); - - it('should accept base-36', function () { - var base36 = 'zzZzzzZzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz'; - assert.equal(new BN(base36, 36).toString(36), base36.toLowerCase()); - }); - - it('should not overflow limbs during base-10', function () { - var num = '65820182292848241686198767302293' + - '20890292528855852623664389292032'; - assert(new BN(num).words[0] < 0x4000000); - }); - - it('should accept base-16 LE integer', function () { - assert.equal(new BN('1A6B765D8CDF', 16, 'le').toString(16), - 'df8c5d766b1a'); - }); - }); - - describe('with Array input', function () { - it('should not fail on empty array', function () { - assert.equal(new BN([]).toString(16), '0'); - }); - - it('should import/export big endian', function () { - assert.equal(new BN([ 1, 2, 3 ]).toString(16), '10203'); - assert.equal(new BN([ 1, 2, 3, 4 ]).toString(16), '1020304'); - assert.equal(new BN([ 1, 2, 3, 4, 5 ]).toString(16), '102030405'); - assert.equal(new BN([ 1, 2, 3, 4, 5, 6, 7, 8 ]).toString(16), - '102030405060708'); - assert.equal(new BN([ 1, 2, 3, 4 ]).toArray().join(','), '1,2,3,4'); - assert.equal(new BN([ 1, 2, 3, 4, 5, 6, 7, 8 ]).toArray().join(','), - '1,2,3,4,5,6,7,8'); - }); - - it('should import little endian', function () { - assert.equal(new BN([ 1, 2, 3 ], 10, 'le').toString(16), '30201'); - assert.equal(new BN([ 1, 2, 3, 4 ], 10, 'le').toString(16), '4030201'); - assert.equal(new BN([ 1, 2, 3, 4, 5 ], 10, 'le').toString(16), - '504030201'); - assert.equal(new BN([ 1, 2, 3, 4, 5, 6, 7, 8 ], 'le').toString(16), - '807060504030201'); - assert.equal(new BN([ 1, 2, 3, 4 ]).toArray('le').join(','), '4,3,2,1'); - assert.equal(new BN([ 1, 2, 3, 4, 5, 6, 7, 8 ]).toArray('le').join(','), - '8,7,6,5,4,3,2,1'); - }); - - it('should import big endian with implicit base', function () { - assert.equal(new BN([ 1, 2, 3, 4, 5 ], 'le').toString(16), '504030201'); - }); - }); - - // the Array code is able to handle Buffer - describe('with Buffer input', function () { - it('should not fail on empty Buffer', function () { - assert.equal(new BN(new Buffer(0)).toString(16), '0'); - }); - - it('should import/export big endian', function () { - assert.equal(new BN(new Buffer('010203', 'hex')).toString(16), '10203'); - }); - - it('should import little endian', function () { - assert.equal(new BN(new Buffer('010203', 'hex'), 'le').toString(16), '30201'); - }); - }); - - describe('with BN input', function () { - it('should clone BN', function () { - var num = new BN(12345); - assert.equal(new BN(num).toString(10), '12345'); - }); - }); -}); diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/create-ecdh/node_modules/bn.js/test/fixtures.js b/node_modules/browserify/node_modules/crypto-browserify/node_modules/create-ecdh/node_modules/bn.js/test/fixtures.js deleted file mode 100644 index 39fd661d..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/create-ecdh/node_modules/bn.js/test/fixtures.js +++ /dev/null @@ -1,264 +0,0 @@ -exports.dhGroups = { - p16: { - prime: 'ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd1' + - '29024e088a67cc74020bbea63b139b22514a08798e3404dd' + - 'ef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245' + - 'e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7ed' + - 'ee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3d' + - 'c2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f' + - '83655d23dca3ad961c62f356208552bb9ed529077096966d' + - '670c354e4abc9804f1746c08ca18217c32905e462e36ce3b' + - 'e39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9' + - 'de2bcbf6955817183995497cea956ae515d2261898fa0510' + - '15728e5a8aaac42dad33170d04507a33a85521abdf1cba64' + - 'ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7' + - 'abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6b' + - 'f12ffa06d98a0864d87602733ec86a64521f2b18177b200c' + - 'bbe117577a615d6c770988c0bad946e208e24fa074e5ab31' + - '43db5bfce0fd108e4b82d120a92108011a723c12a787e6d7' + - '88719a10bdba5b2699c327186af4e23c1a946834b6150bda' + - '2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6' + - '287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed' + - '1f612970cee2d7afb81bdd762170481cd0069127d5b05aa9' + - '93b4ea988d8fddc186ffb7dc90a6c08f4df435c934063199' + - 'ffffffffffffffff', - priv: '6d5923e6449122cbbcc1b96093e0b7e4fd3e469f58daddae' + - '53b49b20664f4132675df9ce98ae0cfdcac0f4181ccb643b' + - '625f98104dcf6f7d8e81961e2cab4b5014895260cb977c7d' + - '2f981f8532fb5da60b3676dfe57f293f05d525866053ac7e' + - '65abfd19241146e92e64f309a97ef3b529af4d6189fa416c' + - '9e1a816c3bdf88e5edf48fbd8233ef9038bb46faa95122c0' + - '5a426be72039639cd2d53d37254b3d258960dcb33c255ede' + - '20e9d7b4b123c8b4f4b986f53cdd510d042166f7dd7dca98' + - '7c39ab36381ba30a5fdd027eb6128d2ef8e5802a2194d422' + - 'b05fe6e1cb4817789b923d8636c1ec4b7601c90da3ddc178' + - '52f59217ae070d87f2e75cbfb6ff92430ad26a71c8373452' + - 'ae1cc5c93350e2d7b87e0acfeba401aaf518580937bf0b6c' + - '341f8c49165a47e49ce50853989d07171c00f43dcddddf72' + - '94fb9c3f4e1124e98ef656b797ef48974ddcd43a21fa06d0' + - '565ae8ce494747ce9e0ea0166e76eb45279e5c6471db7df8' + - 'cc88764be29666de9c545e72da36da2f7a352fb17bdeb982' + - 'a6dc0193ec4bf00b2e533efd6cd4d46e6fb237b775615576' + - 'dd6c7c7bbc087a25e6909d1ebc6e5b38e5c8472c0fc429c6' + - 'f17da1838cbcd9bbef57c5b5522fd6053e62ba21fe97c826' + - 'd3889d0cc17e5fa00b54d8d9f0f46fb523698af965950f4b' + - '941369e180f0aece3870d9335f2301db251595d173902cad' + - '394eaa6ffef8be6c', - pub: 'd53703b7340bc89bfc47176d351e5cf86d5a18d9662eca3c' + - '9759c83b6ccda8859649a5866524d77f79e501db923416ca' + - '2636243836d3e6df752defc0fb19cc386e3ae48ad647753f' + - 'bf415e2612f8a9fd01efe7aca249589590c7e6a0332630bb' + - '29c5b3501265d720213790556f0f1d114a9e2071be3620bd' + - '4ee1e8bb96689ac9e226f0a4203025f0267adc273a43582b' + - '00b70b490343529eaec4dcff140773cd6654658517f51193' + - '13f21f0a8e04fe7d7b21ffeca85ff8f87c42bb8d9cb13a72' + - 'c00e9c6e9dfcedda0777af951cc8ccab90d35e915e707d8e' + - '4c2aca219547dd78e9a1a0730accdc9ad0b854e51edd1e91' + - '4756760bab156ca6e3cb9c625cf0870def34e9ac2e552800' + - 'd6ce506d43dbbc75acfa0c8d8fb12daa3c783fb726f187d5' + - '58131779239c912d389d0511e0f3a81969d12aeee670e48f' + - 'ba41f7ed9f10705543689c2506b976a8ffabed45e33795b0' + - '1df4f6b993a33d1deab1316a67419afa31fbb6fdd252ee8c' + - '7c7d1d016c44e3fcf6b41898d7f206aa33760b505e4eff2e' + - 'c624bc7fe636b1d59e45d6f904fc391419f13d1f0cdb5b6c' + - '2378b09434159917dde709f8a6b5dc30994d056e3f964371' + - '11587ac7af0a442b8367a7bd940f752ddabf31cf01171e24' + - 'd78df136e9681cd974ce4f858a5fb6efd3234a91857bb52d' + - '9e7b414a8bc66db4b5a73bbeccfb6eb764b4f0cbf0375136' + - 'b024b04e698d54a5' - }, - p17: { - prime: 'ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd1' + - '29024e088a67cc74020bbea63b139b22514a08798e3404dd' + - 'ef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245' + - 'e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7ed' + - 'ee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3d' + - 'c2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f' + - '83655d23dca3ad961c62f356208552bb9ed529077096966d' + - '670c354e4abc9804f1746c08ca18217c32905e462e36ce3b' + - 'e39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9' + - 'de2bcbf6955817183995497cea956ae515d2261898fa0510' + - '15728e5a8aaac42dad33170d04507a33a85521abdf1cba64' + - 'ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7' + - 'abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6b' + - 'f12ffa06d98a0864d87602733ec86a64521f2b18177b200c' + - 'bbe117577a615d6c770988c0bad946e208e24fa074e5ab31' + - '43db5bfce0fd108e4b82d120a92108011a723c12a787e6d7' + - '88719a10bdba5b2699c327186af4e23c1a946834b6150bda' + - '2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6' + - '287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed' + - '1f612970cee2d7afb81bdd762170481cd0069127d5b05aa9' + - '93b4ea988d8fddc186ffb7dc90a6c08f4df435c934028492' + - '36c3fab4d27c7026c1d4dcb2602646dec9751e763dba37bd' + - 'f8ff9406ad9e530ee5db382f413001aeb06a53ed9027d831' + - '179727b0865a8918da3edbebcf9b14ed44ce6cbaced4bb1b' + - 'db7f1447e6cc254b332051512bd7af426fb8f401378cd2bf' + - '5983ca01c64b92ecf032ea15d1721d03f482d7ce6e74fef6' + - 'd55e702f46980c82b5a84031900b1c9e59e7c97fbec7e8f3' + - '23a97a7e36cc88be0f1d45b7ff585ac54bd407b22b4154aa' + - 'cc8f6d7ebf48e1d814cc5ed20f8037e0a79715eef29be328' + - '06a1d58bb7c5da76f550aa3d8a1fbff0eb19ccb1a313d55c' + - 'da56c9ec2ef29632387fe8d76e3c0468043e8f663f4860ee' + - '12bf2d5b0b7474d6e694f91e6dcc4024ffffffffffffffff', - priv: '6017f2bc23e1caff5b0a8b4e1fc72422b5204415787801dc' + - '025762b8dbb98ab57603aaaa27c4e6bdf742b4a1726b9375' + - 'a8ca3cf07771779589831d8bd18ddeb79c43e7e77d433950' + - 'e652e49df35b11fa09644874d71d62fdaffb580816c2c88c' + - '2c4a2eefd4a660360316741b05a15a2e37f236692ad3c463' + - 'fff559938fc6b77176e84e1bb47fb41af691c5eb7bb81bd8' + - 'c918f52625a1128f754b08f5a1403b84667231c4dfe07ed4' + - '326234c113931ce606037e960f35a2dfdec38a5f057884d3' + - '0af8fab3be39c1eeb390205fd65982191fc21d5aa30ddf51' + - 'a8e1c58c0c19fc4b4a7380ea9e836aaf671c90c29bc4bcc7' + - '813811aa436a7a9005de9b507957c56a9caa1351b6efc620' + - '7225a18f6e97f830fb6a8c4f03b82f4611e67ab9497b9271' + - 'd6ac252793cc3e5538990dbd894d2dbc2d152801937d9f74' + - 'da4b741b50b4d40e4c75e2ac163f7b397fd555648b249f97' + - 'ffe58ffb6d096aa84534c4c5729cff137759bd34e80db4ab' + - '47e2b9c52064e7f0bf677f72ac9e5d0c6606943683f9d12f' + - '180cf065a5cb8ec3179a874f358847a907f8471d15f1e728' + - '7023249d6d13c82da52628654438f47b8b5cdf4761fbf6ad' + - '9219eceac657dbd06cf2ab776ad4c968f81c3d039367f0a4' + - 'd77c7ec4435c27b6c147071665100063b5666e06eb2fb2cc' + - '3159ba34bc98ca346342195f6f1fb053ddc3bc1873564d40' + - '1c6738cdf764d6e1ff25ca5926f80102ea6593c17170966b' + - 'b5d7352dd7fb821230237ea3ebed1f920feaadbd21be295a' + - '69f2083deae9c5cdf5f4830eb04b7c1f80cc61c17232d79f' + - '7ecc2cc462a7965f804001c89982734e5abba2d31df1b012' + - '152c6b226dff34510b54be8c2cd68d795def66c57a3abfb6' + - '896f1d139e633417f8c694764974d268f46ece3a8d6616ea' + - 'a592144be48ee1e0a1595d3e5edfede5b27cec6c48ceb2ff' + - 'b42cb44275851b0ebf87dfc9aa2d0cb0805e9454b051dfe8' + - 'a29fadd82491a4b4c23f2d06ba45483ab59976da1433c9ce' + - '500164b957a04cf62dd67595319b512fc4b998424d1164dd' + - 'bbe5d1a0f7257cbb04ec9b5ed92079a1502d98725023ecb2', - pub: '3bf836229c7dd874fe37c1790d201e82ed8e192ed61571ca' + - '7285264974eb2a0171f3747b2fc23969a916cbd21e14f7e2' + - 'f0d72dcd2247affba926f9e7bb99944cb5609aed85e71b89' + - 'e89d2651550cb5bd8281bd3144066af78f194032aa777739' + - 'cccb7862a1af401f99f7e5c693f25ddce2dedd9686633820' + - 'd28d0f5ed0c6b5a094f5fe6170b8e2cbc9dff118398baee6' + - 'e895a6301cb6e881b3cae749a5bdf5c56fc897ff68bc73f2' + - '4811bb108b882872bade1f147d886a415cda2b93dd90190c' + - 'be5c2dd53fe78add5960e97f58ff2506afe437f4cf4c912a' + - '397c1a2139ac6207d3ab76e6b7ffd23bb6866dd7f87a9ae5' + - '578789084ff2d06ea0d30156d7a10496e8ebe094f5703539' + - '730f5fdbebc066de417be82c99c7da59953071f49da7878d' + - 'a588775ff2a7f0084de390f009f372af75cdeba292b08ea8' + - '4bd13a87e1ca678f9ad148145f7cef3620d69a891be46fbb' + - 'cad858e2401ec0fd72abdea2f643e6d0197b7646fbb83220' + - '0f4cf7a7f6a7559f9fb0d0f1680822af9dbd8dec4cd1b5e1' + - '7bc799e902d9fe746ddf41da3b7020350d3600347398999a' + - 'baf75d53e03ad2ee17de8a2032f1008c6c2e6618b62f225b' + - 'a2f350179445debe68500fcbb6cae970a9920e321b468b74' + - '5fb524fb88abbcacdca121d737c44d30724227a99745c209' + - 'b970d1ff93bbc9f28b01b4e714d6c9cbd9ea032d4e964d8e' + - '8fff01db095160c20b7646d9fcd314c4bc11bcc232aeccc0' + - 'fbedccbc786951025597522eef283e3f56b44561a0765783' + - '420128638c257e54b972a76e4261892d81222b3e2039c61a' + - 'ab8408fcaac3d634f848ab3ee65ea1bd13c6cd75d2e78060' + - 'e13cf67fbef8de66d2049e26c0541c679fff3e6afc290efe' + - '875c213df9678e4a7ec484bc87dae5f0a1c26d7583e38941' + - 'b7c68b004d4df8b004b666f9448aac1cc3ea21461f41ea5d' + - 'd0f7a9e6161cfe0f58bcfd304bdc11d78c2e9d542e86c0b5' + - '6985cc83f693f686eaac17411a8247bf62f5ccc7782349b5' + - 'cc1f20e312fa2acc0197154d1bfee507e8db77e8f2732f2d' + - '641440ccf248e8643b2bd1e1f9e8239356ab91098fcb431d', - q: 'a899c59999bf877d96442d284359783bdc64b5f878b688fe' + - '51407f0526e616553ad0aaaac4d5bed3046f10a1faaf42bb' + - '2342dc4b7908eea0c46e4c4576897675c2bfdc4467870d3d' + - 'cd90adaed4359237a4bc6924bfb99aa6bf5f5ede15b574ea' + - 'e977eac096f3c67d09bda574c6306c6123fa89d2f086b8dc' + - 'ff92bc570c18d83fe6c810ccfd22ce4c749ef5e6ead3fffe' + - 'c63d95e0e3fde1df9db6a35fa1d107058f37e41957769199' + - 'd945dd7a373622c65f0af3fd9eb1ddc5c764bbfaf7a3dc37' + - '2548e683b970dac4aa4b9869080d2376c9adecebb84e172c' + - '09aeeb25fb8df23e60033260c4f8aac6b8b98ab894b1fb84' + - 'ebb83c0fb2081c3f3eee07f44e24d8fabf76f19ed167b0d7' + - 'ff971565aa4efa3625fce5a43ceeaa3eebb3ce88a00f597f' + - '048c69292b38dba2103ecdd5ec4ccfe3b2d87fa6202f334b' + - 'c1cab83b608dfc875b650b69f2c7e23c0b2b4adf149a6100' + - 'db1b6dbad4679ecb1ea95eafaba3bd00db11c2134f5a8686' + - '358b8b2ab49a1b2e85e1e45caeac5cd4dc0b3b5fffba8871' + - '1c6baf399edd48dad5e5c313702737a6dbdcede80ca358e5' + - '1d1c4fe42e8948a084403f61baed38aa9a1a5ce2918e9f33' + - '100050a430b47bc592995606440272a4994677577a6aaa1b' + - 'a101045dbec5a4e9566dab5445d1af3ed19519f07ac4e2a8' + - 'bd0a84b01978f203a9125a0be020f71fab56c2c9e344d4f4' + - '12d53d3cd8eb74ca5122002e931e3cb0bd4b7492436be17a' + - 'd7ebe27148671f59432c36d8c56eb762655711cfc8471f70' + - '83a8b7283bcb3b1b1d47d37c23d030288cfcef05fbdb4e16' + - '652ee03ee7b77056a808cd700bc3d9ef826eca9a59be959c' + - '947c865d6b372a1ca2d503d7df6d7611b12111665438475a' + - '1c64145849b3da8c2d343410df892d958db232617f9896f1' + - 'de95b8b5a47132be80dd65298c7f2047858409bf762dbc05' + - 'a62ca392ac40cfb8201a0607a2cae07d99a307625f2b2d04' + - 'fe83fbd3ab53602263410f143b73d5b46fc761882e78c782' + - 'd2c36e716a770a7aefaf7f76cea872db7bffefdbc4c2f9e0' + - '39c19adac915e7a63dcb8c8c78c113f29a3e0bc10e100ce0', - qs: '6f0a2fb763eaeb8eb324d564f03d4a55fdcd709e5f1b65e9' + - '5702b0141182f9f945d71bc3e64a7dfdae7482a7dd5a4e58' + - 'bc38f78de2013f2c468a621f08536969d2c8d011bb3bc259' + - '2124692c91140a5472cad224acdacdeae5751dadfdf068b8' + - '77bfa7374694c6a7be159fc3d24ff9eeeecaf62580427ad8' + - '622d48c51a1c4b1701d768c79d8c819776e096d2694107a2' + - 'f3ec0c32224795b59d32894834039dacb369280afb221bc0' + - '90570a93cf409889b818bb30cccee98b2aa26dbba0f28499' + - '08e1a3cd43fa1f1fb71049e5c77c3724d74dc351d9989057' + - '37bbda3805bd6b1293da8774410fb66e3194e18cdb304dd9' + - 'a0b59b583dcbc9fc045ac9d56aea5cfc9f8a0b95da1e11b7' + - '574d1f976e45fe12294997fac66ca0b83fc056183549e850' + - 'a11413cc4abbe39a211e8c8cbf82f2a23266b3c10ab9e286' + - '07a1b6088909cddff856e1eb6b2cde8bdac53fa939827736' + - 'ca1b892f6c95899613442bd02dbdb747f02487718e2d3f22' + - 'f73734d29767ed8d0e346d0c4098b6fdcb4df7d0c4d29603' + - '5bffe80d6c65ae0a1b814150d349096baaf950f2caf298d2' + - 'b292a1d48cf82b10734fe8cedfa16914076dfe3e9b51337b' + - 'ed28ea1e6824bb717b641ca0e526e175d3e5ed7892aebab0' + - 'f207562cc938a821e2956107c09b6ce4049adddcd0b7505d' + - '49ae6c69a20122461102d465d93dc03db026be54c303613a' + - 'b8e5ce3fd4f65d0b6162ff740a0bf5469ffd442d8c509cd2' + - '3b40dab90f6776ca17fc0678774bd6eee1fa85ababa52ec1' + - 'a15031eb677c6c488661dddd8b83d6031fe294489ded5f08' + - '8ad1689a14baeae7e688afa3033899c81f58de39b392ca94' + - 'af6f15a46f19fa95c06f9493c8b96a9be25e78b9ea35013b' + - 'caa76de6303939299d07426a88a334278fc3d0d9fa71373e' + - 'be51d3c1076ab93a11d3d0d703366ff8cde4c11261d488e5' + - '60a2bdf3bfe2476032294800d6a4a39d306e65c6d7d8d66e' + - '5ec63eee94531e83a9bddc458a2b508285c0ee10b7bd94da' + - '2815a0c5bd5b2e15cbe66355e42f5af8955cdfc0b3a4996d' + - '288db1f4b32b15643b18193e378cb7491f3c3951cdd044b1' + - 'a519571bffac2da986f5f1d506c66530a55f70751e24fa8e' + - 'd83ac2347f4069fb561a5565e78c6f0207da24e889a93a96' + - '65f717d9fe8a2938a09ab5f81be7ccecf466c0397fc15a57' + - '469939793f302739765773c256a3ca55d0548afd117a7cae' + - '98ca7e0d749a130c7b743d376848e255f8fdbe4cb4480b63' + - 'cd2c015d1020cf095d175f3ca9dcdfbaf1b2a6e6468eee4c' + - 'c750f2132a77f376bd9782b9d0ff4da98621b898e251a263' + - '4301ba2214a8c430b2f7a79dbbfd6d7ff6e9b0c137b025ff' + - '587c0bf912f0b19d4fff96b1ecd2ca990c89b386055c60f2' + - '3b94214bd55096f17a7b2c0fa12b333235101cd6f28a128c' + - '782e8a72671adadebbd073ded30bd7f09fb693565dcf0bf3' + - '090c21d13e5b0989dd8956f18f17f4f69449a13549c9d80a' + - '77e5e61b5aeeee9528634100e7bc390672f0ded1ca53555b' + - 'abddbcf700b9da6192255bddf50a76b709fbed251dce4c7e' + - '1ca36b85d1e97c1bc9d38c887a5adf140f9eeef674c31422' + - 'e65f63cae719f8c1324e42fa5fd8500899ef5aa3f9856aa7' + - 'ce10c85600a040343204f36bfeab8cfa6e9deb8a2edd2a8e' + - '018d00c7c9fa3a251ad0f57183c37e6377797653f382ec7a' + - '2b0145e16d3c856bc3634b46d90d7198aff12aff88a30e34' + - 'e2bfaf62705f3382576a9d3eeb0829fca2387b5b654af46e' + - '5cf6316fb57d59e5ea6c369061ac64d99671b0e516529dd5' + - 'd9c48ea0503e55fee090d36c5ea8b5954f6fcc0060794e1c' + - 'b7bc24aa1e5c0142fd4ce6e8fd5aa92a7bf84317ea9e1642' + - 'b6995bac6705adf93cbce72433ed0871139970d640f67b78' + - 'e63a7a6d849db2567df69ac7d79f8c62664ac221df228289' + - 'd0a4f9ebd9acb4f87d49da64e51a619fd3f3baccbd9feb12' + - '5abe0cc2c8d17ed1d8546da2b6c641f4d3020a5f9b9f26ac' + - '16546c2d61385505612275ea344c2bbf1ce890023738f715' + - '5e9eba6a071678c8ebd009c328c3eb643679de86e69a9fa5' + - '67a9e146030ff03d546310a0a568c5ba0070e0da22f2cef8' + - '54714b04d399bbc8fd261f9e8efcd0e83bdbc3f5cfb2d024' + - '3e398478cc598e000124eb8858f9df8f52946c2a1ca5c400' - } -}; diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/create-ecdh/node_modules/bn.js/test/pummel/dh-group-test.js b/node_modules/browserify/node_modules/crypto-browserify/node_modules/create-ecdh/node_modules/bn.js/test/pummel/dh-group-test.js deleted file mode 100644 index 37a259ff..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/create-ecdh/node_modules/bn.js/test/pummel/dh-group-test.js +++ /dev/null @@ -1,23 +0,0 @@ -/* global describe, it */ - -var assert = require('assert'); -var BN = require('../../').BN; -var fixtures = require('../fixtures'); - -describe('BN.js/Slow DH test', function () { - var groups = fixtures.dhGroups; - Object.keys(groups).forEach(function (name) { - it('should match public key for ' + name + ' group', function () { - var group = groups[name]; - - this.timeout(3600 * 1000); - - var base = new BN(2); - var mont = BN.red(new BN(group.prime, 16)); - var priv = new BN(group.priv, 16); - var multed = base.toRed(mont).redPow(priv).fromRed(); - var actual = new Buffer(multed.toArray()); - assert.equal(actual.toString('hex'), group.pub); - }); - }); -}); diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/create-ecdh/node_modules/bn.js/test/red-test.js b/node_modules/browserify/node_modules/crypto-browserify/node_modules/create-ecdh/node_modules/bn.js/test/red-test.js deleted file mode 100644 index fc2498c9..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/create-ecdh/node_modules/bn.js/test/red-test.js +++ /dev/null @@ -1,263 +0,0 @@ -/* global describe, it */ - -var assert = require('assert'); -var BN = require('../').BN; - -describe('BN.js/Reduction context', function () { - function testMethod (name, fn) { - describe(name + ' method', function () { - it('should support add, iadd, sub, isub operations', function () { - var p = new BN(257); - var m = fn(p); - var a = new BN(123).toRed(m); - var b = new BN(231).toRed(m); - - assert.equal(a.redAdd(b).fromRed().toString(10), '97'); - assert.equal(a.redSub(b).fromRed().toString(10), '149'); - assert.equal(b.redSub(a).fromRed().toString(10), '108'); - - assert.equal(a.clone().redIAdd(b).fromRed().toString(10), '97'); - assert.equal(a.clone().redISub(b).fromRed().toString(10), '149'); - assert.equal(b.clone().redISub(a).fromRed().toString(10), '108'); - }); - - it('should support pow and mul operations', function () { - var p192 = new BN( - 'fffffffffffffffffffffffffffffffeffffffffffffffff', - 16); - var m = fn(p192); - var a = new BN(123); - var b = new BN(231); - var c = a.toRed(m).redMul(b.toRed(m)).fromRed(); - assert(c.cmp(a.mul(b).mod(p192)) === 0); - - assert.equal(a.toRed(m).redPow(new BN(3)).fromRed() - .cmp(a.sqr().mul(a)), 0); - assert.equal(a.toRed(m).redPow(new BN(4)).fromRed() - .cmp(a.sqr().sqr()), 0); - assert.equal(a.toRed(m).redPow(new BN(8)).fromRed() - .cmp(a.sqr().sqr().sqr()), 0); - assert.equal(a.toRed(m).redPow(new BN(9)).fromRed() - .cmp(a.sqr().sqr().sqr().mul(a)), 0); - assert.equal(a.toRed(m).redPow(new BN(17)).fromRed() - .cmp(a.sqr().sqr().sqr().sqr().mul(a)), 0); - assert.equal( - a.toRed(m).redPow(new BN('deadbeefabbadead', 16)).fromRed() - .toString(16), - '3aa0e7e304e320b68ef61592bcb00341866d6fa66e11a4d6'); - }); - - it('should sqrtm numbers', function () { - var p = new BN(263); - var m = fn(p); - var q = new BN(11).toRed(m); - - var qr = q.redSqrt(); - assert.equal(qr.redSqr().cmp(q), 0); - - qr = q.redSqrt(); - assert.equal(qr.redSqr().cmp(q), 0); - - p = new BN( - 'fffffffffffffffffffffffffffffffeffffffffffffffff', - 16); - m = fn(p); - - q = new BN(13).toRed(m); - qr = q.redSqrt(true, p); - assert.equal(qr.redSqr().cmp(q), 0); - - qr = q.redSqrt(false, p); - assert.equal(qr.redSqr().cmp(q), 0); - - // Tonelli-shanks - p = new BN(13); - m = fn(p); - q = new BN(10).toRed(m); - assert.equal(q.redSqrt().fromRed().toString(10), '7'); - }); - - it('should invm numbers', function () { - var p = new BN(257); - var m = fn(p); - var a = new BN(3).toRed(m); - var b = a.redInvm(); - assert.equal(a.redMul(b).fromRed().toString(16), '1'); - }); - - it('should invm numbers (regression)', function () { - var p = new BN( - 'ffffffff00000001000000000000000000000000ffffffffffffffffffffffff', - 16); - var a = new BN( - 'e1d969b8192fbac73ea5b7921896d6a2263d4d4077bb8e5055361d1f7f8163f3', - 16); - - var m = fn(p); - a = a.toRed(m); - - assert.equal(a.redInvm().fromRed().negative, 0); - }); - - it('should imul numbers', function () { - var p = new BN( - 'fffffffffffffffffffffffffffffffeffffffffffffffff', - 16); - var m = fn(p); - - var a = new BN('deadbeefabbadead', 16); - var b = new BN('abbadeadbeefdead', 16); - var c = a.mul(b).mod(p); - - assert.equal(a.toRed(m).redIMul(b.toRed(m)).fromRed().toString(16), - c.toString(16)); - }); - - it('should pow(base, 0) == 1', function () { - var base = new BN(256).toRed(BN.red('k256')); - var exponent = new BN(0); - var result = base.redPow(exponent); - assert.equal(result.toString(), '1'); - }); - - it('should shl numbers', function () { - var base = new BN(256).toRed(BN.red('k256')); - var result = base.redShl(1); - assert.equal(result.toString(), '512'); - }); - - it('should reduce when converting to red', function () { - var p = new BN(257); - var m = fn(p); - var a = new BN(5).toRed(m); - - assert.doesNotThrow(function () { - var b = a.redISub(new BN(512).toRed(m)); - b.redISub(new BN(512).toRed(m)); - }); - }); - - it('redNeg and zero value', function () { - var a = new BN(0).toRed(BN.red('k256')).redNeg(); - assert.equal(a.isZero(), true); - }); - - it('should not allow modulus <= 1', function () { - assert.throws(function () { - BN.red(new BN(0)); - }, /^Error: modulus must be greater than 1$/); - - assert.throws(function () { - BN.red(new BN(1)); - }, /^Error: modulus must be greater than 1$/); - - assert.doesNotThrow(function () { - BN.red(new BN(2)); - }); - }); - }); - } - - testMethod('Plain', BN.red); - testMethod('Montgomery', BN.mont); - - describe('Pseudo-Mersenne Primes', function () { - it('should reduce numbers mod k256', function () { - var p = BN._prime('k256'); - - assert.equal(p.ireduce(new BN(0xdead)).toString(16), 'dead'); - assert.equal(p.ireduce(new BN('deadbeef', 16)).toString(16), 'deadbeef'); - - var num = new BN('fedcba9876543210fedcba9876543210dead' + - 'fedcba9876543210fedcba9876543210dead', - 16); - var exp = num.mod(p.p).toString(16); - assert.equal(p.ireduce(num).toString(16), exp); - - var regr = new BN('f7e46df64c1815962bf7bc9c56128798' + - '3f4fcef9cb1979573163b477eab93959' + - '335dfb29ef07a4d835d22aa3b6797760' + - '70a8b8f59ba73d56d01a79af9', - 16); - exp = regr.mod(p.p).toString(16); - - assert.equal(p.ireduce(regr).toString(16), exp); - }); - - it('should not fail to invm number mod k256', function () { - var regr2 = new BN( - '6c150c4aa9a8cf1934485d40674d4a7cd494675537bda36d49405c5d2c6f496f', 16); - regr2 = regr2.toRed(BN.red('k256')); - assert.equal(regr2.redInvm().redMul(regr2).fromRed().cmpn(1), 0); - }); - - it('should correctly square the number', function () { - var p = BN._prime('k256').p; - var red = BN.red('k256'); - - var n = new BN('9cd8cb48c3281596139f147c1364a3ed' + - 'e88d3f310fdb0eb98c924e599ca1b3c9', - 16); - var expected = n.sqr().mod(p); - var actual = n.toRed(red).redSqr().fromRed(); - - assert.equal(actual.toString(16), expected.toString(16)); - }); - - it('redISqr should return right result', function () { - var n = new BN('30f28939', 16); - var actual = n.toRed(BN.red('k256')).redISqr().fromRed(); - assert.equal(actual.toString(16), '95bd93d19520eb1'); - }); - }); - - it('should avoid 4.1.0 regresion', function () { - function bits2int (obits, q) { - var bits = new BN(obits); - var shift = (obits.length << 3) - q.bitLength(); - if (shift > 0) { - bits.ishrn(shift); - } - return bits; - } - var t = new Buffer('aff1651e4cd6036d57aa8b2a05ccf1a9d5a40166340ecbbdc55' + - 'be10b568aa0aa3d05ce9a2fcec9df8ed018e29683c6051cb83e' + - '46ce31ba4edb045356a8d0d80b', 'hex'); - var g = new BN('5c7ff6b06f8f143fe8288433493e4769c4d988ace5be25a0e24809670' + - '716c613d7b0cee6932f8faa7c44d2cb24523da53fbe4f6ec3595892d1' + - 'aa58c4328a06c46a15662e7eaa703a1decf8bbb2d05dbe2eb956c142a' + - '338661d10461c0d135472085057f3494309ffa73c611f78b32adbb574' + - '0c361c9f35be90997db2014e2ef5aa61782f52abeb8bd6432c4dd097b' + - 'c5423b285dafb60dc364e8161f4a2a35aca3a10b1c4d203cc76a470a3' + - '3afdcbdd92959859abd8b56e1725252d78eac66e71ba9ae3f1dd24871' + - '99874393cd4d832186800654760e1e34c09e4d155179f9ec0dc4473f9' + - '96bdce6eed1cabed8b6f116f7ad9cf505df0f998e34ab27514b0ffe7', - 16); - var p = new BN('9db6fb5951b66bb6fe1e140f1d2ce5502374161fd6538df1648218642' + - 'f0b5c48c8f7a41aadfa187324b87674fa1822b00f1ecf8136943d7c55' + - '757264e5a1a44ffe012e9936e00c1d3e9310b01c7d179805d3058b2a9' + - 'f4bb6f9716bfe6117c6b5b3cc4d9be341104ad4a80ad6c94e005f4b99' + - '3e14f091eb51743bf33050c38de235567e1b34c3d6a5c0ceaa1a0f368' + - '213c3d19843d0b4b09dcb9fc72d39c8de41f1bf14d4bb4563ca283716' + - '21cad3324b6a2d392145bebfac748805236f5ca2fe92b871cd8f9c36d' + - '3292b5509ca8caa77a2adfc7bfd77dda6f71125a7456fea153e433256' + - 'a2261c6a06ed3693797e7995fad5aabbcfbe3eda2741e375404ae25b', - 16); - var q = new BN('f2c3119374ce76c9356990b465374a17f23f9ed35089bd969f61c6dde' + - '9998c1f', 16); - var k = bits2int(t, q); - var expectedR = '89ec4bb1400eccff8e7d9aa515cd1de7803f2daff09693ee7fd1353e' + - '90a68307'; - var r = g.toRed(BN.mont(p)).redPow(k).fromRed().mod(q); - assert.equal(r.toString(16), expectedR); - }); - - it('K256.split for 512 bits number should return equal numbers', function () { - var red = BN.red('k256'); - var input = new BN(1).iushln(512).subn(1); - assert.equal(input.bitLength(), 512); - var output = new BN(0); - red.prime.split(input, output); - assert.equal(input.cmp(output), 0); - }); -}); diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/create-ecdh/node_modules/bn.js/test/utils-test.js b/node_modules/browserify/node_modules/crypto-browserify/node_modules/create-ecdh/node_modules/bn.js/test/utils-test.js deleted file mode 100644 index 8571905a..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/create-ecdh/node_modules/bn.js/test/utils-test.js +++ /dev/null @@ -1,345 +0,0 @@ -/* global describe, it */ - -var assert = require('assert'); -var BN = require('../').BN; - -describe('BN.js/Utils', function () { - describe('.toString()', function () { - describe('binary padding', function () { - it('should have a length of 256', function () { - var a = new BN(0); - - assert.equal(a.toString(2, 256).length, 256); - }); - }); - describe('hex padding', function () { - it('should have length of 8 from leading 15', function () { - var a = new BN('ffb9602', 16); - - assert.equal(a.toString('hex', 2).length, 8); - }); - - it('should have length of 8 from leading zero', function () { - var a = new BN('fb9604', 16); - - assert.equal(a.toString('hex', 8).length, 8); - }); - - it('should have length of 8 from leading zeros', function () { - var a = new BN(0); - - assert.equal(a.toString('hex', 8).length, 8); - }); - - it('should have length of 64 from leading 15', function () { - var a = new BN( - 'ffb96ff654e61130ba8422f0debca77a0ea74ae5ea8bca9b54ab64aabf01003', - 16); - - assert.equal(a.toString('hex', 2).length, 64); - }); - - it('should have length of 64 from leading zero', function () { - var a = new BN( - 'fb96ff654e61130ba8422f0debca77a0ea74ae5ea8bca9b54ab64aabf01003', - 16); - - assert.equal(a.toString('hex', 64).length, 64); - }); - }); - }); - - describe('.isNeg()', function () { - it('should return true for negative numbers', function () { - assert.equal(new BN(-1).isNeg(), true); - assert.equal(new BN(1).isNeg(), false); - assert.equal(new BN(0).isNeg(), false); - assert.equal(new BN('-0', 10).isNeg(), false); - }); - }); - - describe('.isOdd()', function () { - it('should return true for odd numbers', function () { - assert.equal(new BN(0).isOdd(), false); - assert.equal(new BN(1).isOdd(), true); - assert.equal(new BN(2).isOdd(), false); - assert.equal(new BN('-0', 10).isOdd(), false); - assert.equal(new BN('-1', 10).isOdd(), true); - assert.equal(new BN('-2', 10).isOdd(), false); - }); - }); - - describe('.isEven()', function () { - it('should return true for even numbers', function () { - assert.equal(new BN(0).isEven(), true); - assert.equal(new BN(1).isEven(), false); - assert.equal(new BN(2).isEven(), true); - assert.equal(new BN('-0', 10).isEven(), true); - assert.equal(new BN('-1', 10).isEven(), false); - assert.equal(new BN('-2', 10).isEven(), true); - }); - }); - - describe('.isZero()', function () { - it('should return true for zero', function () { - assert.equal(new BN(0).isZero(), true); - assert.equal(new BN(1).isZero(), false); - assert.equal(new BN(0xffffffff).isZero(), false); - }); - }); - - describe('.bitLength()', function () { - it('should return proper bitLength', function () { - assert.equal(new BN(0).bitLength(), 0); - assert.equal(new BN(0x1).bitLength(), 1); - assert.equal(new BN(0x2).bitLength(), 2); - assert.equal(new BN(0x3).bitLength(), 2); - assert.equal(new BN(0x4).bitLength(), 3); - assert.equal(new BN(0x8).bitLength(), 4); - assert.equal(new BN(0x10).bitLength(), 5); - assert.equal(new BN(0x100).bitLength(), 9); - assert.equal(new BN(0x123456).bitLength(), 21); - assert.equal(new BN('123456789', 16).bitLength(), 33); - assert.equal(new BN('8023456789', 16).bitLength(), 40); - }); - }); - - describe('.byteLength()', function () { - it('should return proper byteLength', function () { - assert.equal(new BN(0).byteLength(), 0); - assert.equal(new BN(0x1).byteLength(), 1); - assert.equal(new BN(0x2).byteLength(), 1); - assert.equal(new BN(0x3).byteLength(), 1); - assert.equal(new BN(0x4).byteLength(), 1); - assert.equal(new BN(0x8).byteLength(), 1); - assert.equal(new BN(0x10).byteLength(), 1); - assert.equal(new BN(0x100).byteLength(), 2); - assert.equal(new BN(0x123456).byteLength(), 3); - assert.equal(new BN('123456789', 16).byteLength(), 5); - assert.equal(new BN('8023456789', 16).byteLength(), 5); - }); - }); - - describe('.toArray()', function () { - it('should return [ 0 ] for `0`', function () { - var n = new BN(0); - assert.deepEqual(n.toArray('be'), [ 0 ]); - assert.deepEqual(n.toArray('le'), [ 0 ]); - }); - - it('should zero pad to desired lengths', function () { - var n = new BN(0x123456); - assert.deepEqual(n.toArray('be', 5), [ 0x00, 0x00, 0x12, 0x34, 0x56 ]); - assert.deepEqual(n.toArray('le', 5), [ 0x56, 0x34, 0x12, 0x00, 0x00 ]); - }); - - it('should throw when naturally larger than desired length', function () { - var n = new BN(0x123456); - assert.throws(function () { - n.toArray('be', 2); - }, /^Error: byte array longer than desired length$/); - }); - }); - - describe('.toBuffer', function () { - it('should return proper Buffer', function () { - var n = new BN(0x123456); - assert.deepEqual(n.toBuffer('be', 5).toString('hex'), '0000123456'); - assert.deepEqual(n.toBuffer('le', 5).toString('hex'), '5634120000'); - }); - }); - - describe('.toNumber()', function () { - it('should return proper Number if below the limit', function () { - assert.deepEqual(new BN(0x123456).toNumber(), 0x123456); - assert.deepEqual(new BN(0x3ffffff).toNumber(), 0x3ffffff); - assert.deepEqual(new BN(0x4000000).toNumber(), 0x4000000); - assert.deepEqual(new BN(0x10000000000000).toNumber(), 0x10000000000000); - assert.deepEqual(new BN(0x10040004004000).toNumber(), 0x10040004004000); - assert.deepEqual(new BN(-0x123456).toNumber(), -0x123456); - assert.deepEqual(new BN(-0x3ffffff).toNumber(), -0x3ffffff); - assert.deepEqual(new BN(-0x4000000).toNumber(), -0x4000000); - assert.deepEqual(new BN(-0x10000000000000).toNumber(), -0x10000000000000); - assert.deepEqual(new BN(-0x10040004004000).toNumber(), -0x10040004004000); - }); - - it('should throw when number exceeds 53 bits', function () { - var n = new BN(1).iushln(54); - assert.throws(function () { - n.toNumber(); - }, /^Error: Number can only safely store up to 53 bits$/); - }); - }); - - describe('.zeroBits()', function () { - it('should return proper zeroBits', function () { - assert.equal(new BN(0).zeroBits(), 0); - assert.equal(new BN(0x1).zeroBits(), 0); - assert.equal(new BN(0x2).zeroBits(), 1); - assert.equal(new BN(0x3).zeroBits(), 0); - assert.equal(new BN(0x4).zeroBits(), 2); - assert.equal(new BN(0x8).zeroBits(), 3); - assert.equal(new BN(0x10).zeroBits(), 4); - assert.equal(new BN(0x100).zeroBits(), 8); - assert.equal(new BN(0x1000000).zeroBits(), 24); - assert.equal(new BN(0x123456).zeroBits(), 1); - }); - }); - - describe('.toJSON', function () { - it('should return hex string', function () { - assert.equal(new BN(0x123).toJSON(), '123'); - }); - }); - - describe('.cmpn', function () { - it('should return -1, 0, 1 correctly', function () { - assert.equal(new BN(42).cmpn(42), 0); - assert.equal(new BN(42).cmpn(43), -1); - assert.equal(new BN(42).cmpn(41), 1); - assert.equal(new BN(0x3fffffe).cmpn(0x3fffffe), 0); - assert.equal(new BN(0x3fffffe).cmpn(0x3ffffff), -1); - assert.equal(new BN(0x3fffffe).cmpn(0x3fffffd), 1); - assert.throws(function () { - new BN(0x3fffffe).cmpn(0x4000000); - }, /^Error: Number is too big$/); - assert.equal(new BN(42).cmpn(-42), 1); - assert.equal(new BN(-42).cmpn(42), -1); - assert.equal(new BN(-42).cmpn(-42), 0); - assert.equal(1 / new BN(-42).cmpn(-42), Infinity); - }); - }); - - describe('.cmp', function () { - it('should return -1, 0, 1 correctly', function () { - assert.equal(new BN(42).cmp(new BN(42)), 0); - assert.equal(new BN(42).cmp(new BN(43)), -1); - assert.equal(new BN(42).cmp(new BN(41)), 1); - assert.equal(new BN(0x3fffffe).cmp(new BN(0x3fffffe)), 0); - assert.equal(new BN(0x3fffffe).cmp(new BN(0x3ffffff)), -1); - assert.equal(new BN(0x3fffffe).cmp(new BN(0x3fffffd)), 1); - assert.equal(new BN(0x3fffffe).cmp(new BN(0x4000000)), -1); - assert.equal(new BN(42).cmp(new BN(-42)), 1); - assert.equal(new BN(-42).cmp(new BN(42)), -1); - assert.equal(new BN(-42).cmp(new BN(-42)), 0); - assert.equal(1 / new BN(-42).cmp(new BN(-42)), Infinity); - }); - }); - - describe('comparison shorthands', function () { - it('.gtn greater than', function () { - assert.equal(new BN(3).gtn(2), true); - assert.equal(new BN(3).gtn(3), false); - assert.equal(new BN(3).gtn(4), false); - }); - it('.gt greater than', function () { - assert.equal(new BN(3).gt(new BN(2)), true); - assert.equal(new BN(3).gt(new BN(3)), false); - assert.equal(new BN(3).gt(new BN(4)), false); - }); - it('.gten greater than or equal', function () { - assert.equal(new BN(3).gten(3), true); - assert.equal(new BN(3).gten(2), true); - assert.equal(new BN(3).gten(4), false); - }); - it('.gte greater than or equal', function () { - assert.equal(new BN(3).gte(new BN(3)), true); - assert.equal(new BN(3).gte(new BN(2)), true); - assert.equal(new BN(3).gte(new BN(4)), false); - }); - it('.ltn less than', function () { - assert.equal(new BN(2).ltn(3), true); - assert.equal(new BN(2).ltn(2), false); - assert.equal(new BN(2).ltn(1), false); - }); - it('.lt less than', function () { - assert.equal(new BN(2).lt(new BN(3)), true); - assert.equal(new BN(2).lt(new BN(2)), false); - assert.equal(new BN(2).lt(new BN(1)), false); - }); - it('.lten less than or equal', function () { - assert.equal(new BN(3).lten(3), true); - assert.equal(new BN(3).lten(2), false); - assert.equal(new BN(3).lten(4), true); - }); - it('.lte less than or equal', function () { - assert.equal(new BN(3).lte(new BN(3)), true); - assert.equal(new BN(3).lte(new BN(2)), false); - assert.equal(new BN(3).lte(new BN(4)), true); - }); - it('.eqn equal', function () { - assert.equal(new BN(3).eqn(3), true); - assert.equal(new BN(3).eqn(2), false); - assert.equal(new BN(3).eqn(4), false); - }); - it('.eq equal', function () { - assert.equal(new BN(3).eq(new BN(3)), true); - assert.equal(new BN(3).eq(new BN(2)), false); - assert.equal(new BN(3).eq(new BN(4)), false); - }); - }); - - describe('.fromTwos', function () { - it('should convert from two\'s complement to negative number', function () { - assert.equal(new BN('00000000', 16).fromTwos(32).toNumber(), 0); - assert.equal(new BN('00000001', 16).fromTwos(32).toNumber(), 1); - assert.equal(new BN('7fffffff', 16).fromTwos(32).toNumber(), 2147483647); - assert.equal(new BN('80000000', 16).fromTwos(32).toNumber(), -2147483648); - assert.equal(new BN('f0000000', 16).fromTwos(32).toNumber(), -268435456); - assert.equal(new BN('f1234567', 16).fromTwos(32).toNumber(), -249346713); - assert.equal(new BN('ffffffff', 16).fromTwos(32).toNumber(), -1); - assert.equal(new BN('fffffffe', 16).fromTwos(32).toNumber(), -2); - assert.equal(new BN('fffffffffffffffffffffffffffffffe', 16) - .fromTwos(128).toNumber(), -2); - assert.equal(new BN('ffffffffffffffffffffffffffffffff' + - 'fffffffffffffffffffffffffffffffe', 16).fromTwos(256).toNumber(), -2); - assert.equal(new BN('ffffffffffffffffffffffffffffffff' + - 'ffffffffffffffffffffffffffffffff', 16).fromTwos(256).toNumber(), -1); - assert.equal(new BN('7fffffffffffffffffffffffffffffff' + - 'ffffffffffffffffffffffffffffffff', 16).fromTwos(256).toString(10), - new BN('5789604461865809771178549250434395392663499' + - '2332820282019728792003956564819967', 10).toString(10)); - assert.equal(new BN('80000000000000000000000000000000' + - '00000000000000000000000000000000', 16).fromTwos(256).toString(10), - new BN('-578960446186580977117854925043439539266349' + - '92332820282019728792003956564819968', 10).toString(10)); - }); - }); - - describe('.toTwos', function () { - it('should convert from negative number to two\'s complement', function () { - assert.equal(new BN(0).toTwos(32).toString(16), '0'); - assert.equal(new BN(1).toTwos(32).toString(16), '1'); - assert.equal(new BN(2147483647).toTwos(32).toString(16), '7fffffff'); - assert.equal(new BN('-2147483648', 10).toTwos(32).toString(16), '80000000'); - assert.equal(new BN('-268435456', 10).toTwos(32).toString(16), 'f0000000'); - assert.equal(new BN('-249346713', 10).toTwos(32).toString(16), 'f1234567'); - assert.equal(new BN('-1', 10).toTwos(32).toString(16), 'ffffffff'); - assert.equal(new BN('-2', 10).toTwos(32).toString(16), 'fffffffe'); - assert.equal(new BN('-2', 10).toTwos(128).toString(16), - 'fffffffffffffffffffffffffffffffe'); - assert.equal(new BN('-2', 10).toTwos(256).toString(16), - 'fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe'); - assert.equal(new BN('-1', 10).toTwos(256).toString(16), - 'ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff'); - assert.equal(new BN('5789604461865809771178549250434395392663' + - '4992332820282019728792003956564819967', 10).toTwos(256).toString(16), - '7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff'); - assert.equal(new BN('-578960446186580977117854925043439539266' + - '34992332820282019728792003956564819968', 10).toTwos(256).toString(16), - '8000000000000000000000000000000000000000000000000000000000000000'); - }); - }); - - describe('.isBN', function () { - it('should return true for BN', function () { - assert.equal(BN.isBN(new BN()), true); - }); - - it('should return false for everything else', function () { - assert.equal(BN.isBN(1), false); - assert.equal(BN.isBN([]), false); - assert.equal(BN.isBN({}), false); - }); - }); -}); diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/create-ecdh/node_modules/bn.js/util/genCombMulTo.js b/node_modules/browserify/node_modules/crypto-browserify/node_modules/create-ecdh/node_modules/bn.js/util/genCombMulTo.js deleted file mode 100644 index 8b456c7c..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/create-ecdh/node_modules/bn.js/util/genCombMulTo.js +++ /dev/null @@ -1,65 +0,0 @@ -'use strict'; - -// NOTE: This could be potentionally used to generate loop-less multiplications -function genCombMulTo (alen, blen) { - var len = alen + blen - 1; - var src = [ - 'var a = self.words;', - 'var b = num.words;', - 'var o = out.words;', - 'var c = 0;', - 'var lo;', - 'var mid;', - 'var hi;' - ]; - for (var i = 0; i < alen; i++) { - src.push('var a' + i + ' = a[' + i + '] | 0;'); - src.push('var al' + i + ' = a' + i + ' & 0x1fff;'); - src.push('var ah' + i + ' = a' + i + ' >>> 13;'); - } - for (i = 0; i < blen; i++) { - src.push('var b' + i + ' = b[' + i + '] | 0;'); - src.push('var bl' + i + ' = b' + i + ' & 0x1fff;'); - src.push('var bh' + i + ' = b' + i + ' >>> 13;'); - } - src.push(''); - src.push('out.negative = self.negative ^ num.negative;'); - src.push('out.length = ' + len + ';'); - - for (var k = 0; k < len; k++) { - var minJ = Math.max(0, k - alen + 1); - var maxJ = Math.min(k, blen - 1); - - src.push('\/* k = ' + k + ' *\/'); - src.push('var w' + k + ' = c;'); - src.push('c = 0;'); - for (var j = minJ; j <= maxJ; j++) { - i = k - j; - - src.push('lo = Math.imul(al' + i + ', bl' + j + ');'); - src.push('mid = Math.imul(al' + i + ', bh' + j + ');'); - src.push('mid = (mid + Math.imul(ah' + i + ', bl' + j + ')) | 0;'); - src.push('hi = Math.imul(ah' + i + ', bh' + j + ');'); - - src.push('w' + k + ' = (w' + k + ' + lo) | 0;'); - src.push('w' + k + ' = (w' + k + ' + ((mid & 0x1fff) << 13)) | 0;'); - src.push('c = (c + hi) | 0;'); - src.push('c = (c + (mid >>> 13)) | 0;'); - src.push('c = (c + (w' + k + ' >>> 26)) | 0;'); - src.push('w' + k + ' &= 0x3ffffff;'); - } - } - // Store in separate step for better memory access - for (k = 0; k < len; k++) { - src.push('o[' + k + '] = w' + k + ';'); - } - src.push('if (c !== 0) {', - ' o[' + k + '] = c;', - ' out.length++;', - '}', - 'return out;'); - - return src.join('\n'); -} - -console.log(genCombMulTo(10, 10)); diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/create-ecdh/node_modules/bn.js/util/genCombMulTo10.js b/node_modules/browserify/node_modules/crypto-browserify/node_modules/create-ecdh/node_modules/bn.js/util/genCombMulTo10.js deleted file mode 100644 index cf2e6e80..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/create-ecdh/node_modules/bn.js/util/genCombMulTo10.js +++ /dev/null @@ -1,65 +0,0 @@ -'use strict'; - -function genCombMulTo (alen, blen) { - var len = alen + blen - 1; - var src = [ - 'var a = self.words;', - 'var b = num.words;', - 'var o = out.words;', - 'var c = 0;', - 'var lo;', - 'var mid;', - 'var hi;' - ]; - for (var i = 0; i < alen; i++) { - src.push('var a' + i + ' = a[' + i + '] | 0;'); - src.push('var al' + i + ' = a' + i + ' & 0x1fff;'); - src.push('var ah' + i + ' = a' + i + ' >>> 13;'); - } - for (i = 0; i < blen; i++) { - src.push('var b' + i + ' = b[' + i + '] | 0;'); - src.push('var bl' + i + ' = b' + i + ' & 0x1fff;'); - src.push('var bh' + i + ' = b' + i + ' >>> 13;'); - } - src.push(''); - src.push('out.negative = self.negative ^ num.negative;'); - src.push('out.length = ' + len + ';'); - - for (var k = 0; k < len; k++) { - var minJ = Math.max(0, k - alen + 1); - var maxJ = Math.min(k, blen - 1); - - src.push('\/* k = ' + k + ' *\/'); - src.push('lo = Math.imul(al' + (k - minJ) + ', bl' + minJ + ');'); - src.push('mid = Math.imul(al' + (k - minJ) + ', bh' + minJ + ');'); - src.push( - 'mid = (mid + Math.imul(ah' + (k - minJ) + ', bl' + minJ + ')) | 0;'); - src.push('hi = Math.imul(ah' + (k - minJ) + ', bh' + minJ + ');'); - - for (var j = minJ + 1; j <= maxJ; j++) { - i = k - j; - - src.push('lo = (lo + Math.imul(al' + i + ', bl' + j + ')) | 0;'); - src.push('mid = (mid + Math.imul(al' + i + ', bh' + j + ')) | 0;'); - src.push('mid = (mid + Math.imul(ah' + i + ', bl' + j + ')) | 0;'); - src.push('hi = (hi + Math.imul(ah' + i + ', bh' + j + ')) | 0;'); - } - - src.push('var w' + k + ' = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;'); - src.push('c = (((hi + (mid >>> 13)) | 0) + (w' + k + ' >>> 26)) | 0;'); - src.push('w' + k + ' &= 0x3ffffff;'); - } - // Store in separate step for better memory access - for (k = 0; k < len; k++) { - src.push('o[' + k + '] = w' + k + ';'); - } - src.push('if (c !== 0) {', - ' o[' + k + '] = c;', - ' out.length++;', - '}', - 'return out;'); - - return src.join('\n'); -} - -console.log(genCombMulTo(10, 10)); diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/create-ecdh/node_modules/elliptic/README.md b/node_modules/browserify/node_modules/crypto-browserify/node_modules/create-ecdh/node_modules/elliptic/README.md deleted file mode 100644 index fe8c311b..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/create-ecdh/node_modules/elliptic/README.md +++ /dev/null @@ -1,205 +0,0 @@ -# Elliptic [![Build Status](https://secure.travis-ci.org/indutny/elliptic.png)](http://travis-ci.org/indutny/elliptic) [![Coverage Status](https://coveralls.io/repos/indutny/elliptic/badge.svg?branch=master&service=github)](https://coveralls.io/github/indutny/elliptic?branch=master) [![Code Climate](https://codeclimate.com/github/indutny/elliptic/badges/gpa.svg)](https://codeclimate.com/github/indutny/elliptic) - -[![Saucelabs Test Status](https://saucelabs.com/browser-matrix/gh-indutny-elliptic.svg)](https://saucelabs.com/u/gh-indutny-elliptic) - -Fast elliptic-curve cryptography in a plain javascript implementation. - -NOTE: Please take a look at http://safecurves.cr.yp.to/ before choosing a curve -for your cryptography operations. - -## Incentive - -ECC is much slower than regular RSA cryptography, the JS implementations are -even more slower. - -## Benchmarks - -```bash -$ node benchmarks/index.js -Benchmarking: sign -elliptic#sign x 262 ops/sec ±0.51% (177 runs sampled) -eccjs#sign x 55.91 ops/sec ±0.90% (144 runs sampled) ------------------------- -Fastest is elliptic#sign -======================== -Benchmarking: verify -elliptic#verify x 113 ops/sec ±0.50% (166 runs sampled) -eccjs#verify x 48.56 ops/sec ±0.36% (125 runs sampled) ------------------------- -Fastest is elliptic#verify -======================== -Benchmarking: gen -elliptic#gen x 294 ops/sec ±0.43% (176 runs sampled) -eccjs#gen x 62.25 ops/sec ±0.63% (129 runs sampled) ------------------------- -Fastest is elliptic#gen -======================== -Benchmarking: ecdh -elliptic#ecdh x 136 ops/sec ±0.85% (156 runs sampled) ------------------------- -Fastest is elliptic#ecdh -======================== -``` - -## API - -### ECDSA - -```javascript -var EC = require('elliptic').ec; - -// Create and initialize EC context -// (better do it once and reuse it) -var ec = new EC('secp256k1'); - -// Generate keys -var key = ec.genKeyPair(); - -// Sign message (must be an array, or it'll be treated as a hex sequence) -var msg = [ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 ]; -var signature = key.sign(msg); - -// Export DER encoded signature in Array -var derSign = signature.toDER(); - -// Verify signature -console.log(key.verify(msg, derSign)); - -// CHECK WITH NO PRIVATE KEY - -// Public key as '04 + x + y' -var pub = '04bb1fa3...'; - -// Signature MUST be either: -// 1) hex-string of DER-encoded signature; or -// 2) DER-encoded signature as buffer; or -// 3) object with two hex-string properties (r and s) - -var signature = 'b102ac...'; // case 1 -var signature = new Buffer('...'); // case 2 -var signature = { r: 'b1fc...', s: '9c42...' }; // case 3 - -// Import public key -var key = ec.keyFromPublic(pub, 'hex'); - -// Verify signature -console.log(key.verify(msg, signature)); -``` - -### EdDSA - -```javascript -var EdDSA = require('elliptic').eddsa; - -// Create and initialize EdDSA context -// (better do it once and reuse it) -var ec = new EdDSA('ed25519'); - -// Create key pair from secret -var key = ec.keyFromSecret('693e3c...'); // hex string, array or Buffer - -// Sign message (must be an array, or it'll be treated as a hex sequence) -var msg = [ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 ]; -var signature = key.sign(msg).toHex(); - -// Verify signature -console.log(key.verify(msg, signature)); - -// CHECK WITH NO PRIVATE KEY - -// Import public key -var pub = '0a1af638...'; -var key = ec.keyFromPublic(pub, 'hex'); - -// Verify signature -var signature = '70bed1...'; -console.log(key.verify(msg, signature)); -``` - -### ECDH - -```javascript -var ECDH = require('elliptic').ec; -var ec = new ECDH('curve25519'); - -// Generate keys -var key1 = ec.genKeyPair(); -var key2 = ec.genKeyPair(); - -var shared1 = key1.derive(key2.getPublic()); -var shared2 = key2.derive(key1.getPublic()); - -console.log('Both shared secrets are BN instances'); -console.log(shared1.toString(16)); -console.log(shared2.toString(16)); -``` - -NOTE: `.derive()` returns a [BN][1] instance. - -## Supported curves - -Elliptic.js support following curve types: - -* Short Weierstrass -* Montgomery -* Edwards -* Twisted Edwards - -Following curve 'presets' are embedded into the library: - -* `secp256k1` -* `p192` -* `p224` -* `p256` -* `p384` -* `p521` -* `curve25519` -* `ed25519` - -NOTE: That `curve25519` could not be used for ECDSA, use `ed25519` instead. - -### Implementation details - -ECDSA is using deterministic `k` value generation as per [RFC6979][0]. Most of -the curve operations are performed on non-affine coordinates (either projective -or extended), various windowing techniques are used for different cases. - -All operations are performed in reduction context using [bn.js][1], hashing is -provided by [hash.js][2] - -### Related projects - -* [eccrypto][3]: isomorphic implementation of ECDSA, ECDH and ECIES for both - browserify and node (uses `elliptic` for browser and [secp256k1-node][4] for - node) - -#### LICENSE - -This software is licensed under the MIT License. - -Copyright Fedor Indutny, 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. - -[0]: http://tools.ietf.org/html/rfc6979 -[1]: https://github.com/indutny/bn.js -[2]: https://github.com/indutny/hash.js -[3]: https://github.com/bitchan/eccrypto -[4]: https://github.com/wanderer/secp256k1-node diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/create-ecdh/node_modules/elliptic/lib/elliptic.js b/node_modules/browserify/node_modules/crypto-browserify/node_modules/create-ecdh/node_modules/elliptic/lib/elliptic.js deleted file mode 100644 index 22912008..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/create-ecdh/node_modules/elliptic/lib/elliptic.js +++ /dev/null @@ -1,14 +0,0 @@ -'use strict'; - -var elliptic = exports; - -elliptic.version = require('../package.json').version; -elliptic.utils = require('./elliptic/utils'); -elliptic.rand = require('brorand'); -elliptic.hmacDRBG = require('./elliptic/hmac-drbg'); -elliptic.curve = require('./elliptic/curve'); -elliptic.curves = require('./elliptic/curves'); - -// Protocols -elliptic.ec = require('./elliptic/ec'); -elliptic.eddsa = require('./elliptic/eddsa'); diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/create-ecdh/node_modules/elliptic/lib/elliptic/curve/base.js b/node_modules/browserify/node_modules/crypto-browserify/node_modules/create-ecdh/node_modules/elliptic/lib/elliptic/curve/base.js deleted file mode 100644 index 3af82396..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/create-ecdh/node_modules/elliptic/lib/elliptic/curve/base.js +++ /dev/null @@ -1,375 +0,0 @@ -'use strict'; - -var BN = require('bn.js'); -var elliptic = require('../../elliptic'); -var utils = elliptic.utils; -var getNAF = utils.getNAF; -var getJSF = utils.getJSF; -var assert = utils.assert; - -function BaseCurve(type, conf) { - this.type = type; - this.p = new BN(conf.p, 16); - - // Use Montgomery, when there is no fast reduction for the prime - this.red = conf.prime ? BN.red(conf.prime) : BN.mont(this.p); - - // Useful for many curves - this.zero = new BN(0).toRed(this.red); - this.one = new BN(1).toRed(this.red); - this.two = new BN(2).toRed(this.red); - - // Curve configuration, optional - this.n = conf.n && new BN(conf.n, 16); - this.g = conf.g && this.pointFromJSON(conf.g, conf.gRed); - - // Temporary arrays - this._wnafT1 = new Array(4); - this._wnafT2 = new Array(4); - this._wnafT3 = new Array(4); - this._wnafT4 = new Array(4); - - // Generalized Greg Maxwell's trick - var adjustCount = this.n && this.p.div(this.n); - if (!adjustCount || adjustCount.cmpn(100) > 0) { - this.redN = null; - } else { - this._maxwellTrick = true; - this.redN = this.n.toRed(this.red); - } -} -module.exports = BaseCurve; - -BaseCurve.prototype.point = function point() { - throw new Error('Not implemented'); -}; - -BaseCurve.prototype.validate = function validate() { - throw new Error('Not implemented'); -}; - -BaseCurve.prototype._fixedNafMul = function _fixedNafMul(p, k) { - assert(p.precomputed); - var doubles = p._getDoubles(); - - var naf = getNAF(k, 1); - var I = (1 << (doubles.step + 1)) - (doubles.step % 2 === 0 ? 2 : 1); - I /= 3; - - // Translate into more windowed form - var repr = []; - for (var j = 0; j < naf.length; j += doubles.step) { - var nafW = 0; - for (var k = j + doubles.step - 1; k >= j; k--) - nafW = (nafW << 1) + naf[k]; - repr.push(nafW); - } - - var a = this.jpoint(null, null, null); - var b = this.jpoint(null, null, null); - for (var i = I; i > 0; i--) { - for (var j = 0; j < repr.length; j++) { - var nafW = repr[j]; - if (nafW === i) - b = b.mixedAdd(doubles.points[j]); - else if (nafW === -i) - b = b.mixedAdd(doubles.points[j].neg()); - } - a = a.add(b); - } - return a.toP(); -}; - -BaseCurve.prototype._wnafMul = function _wnafMul(p, k) { - var w = 4; - - // Precompute window - var nafPoints = p._getNAFPoints(w); - w = nafPoints.wnd; - var wnd = nafPoints.points; - - // Get NAF form - var naf = getNAF(k, w); - - // Add `this`*(N+1) for every w-NAF index - var acc = this.jpoint(null, null, null); - for (var i = naf.length - 1; i >= 0; i--) { - // Count zeroes - for (var k = 0; i >= 0 && naf[i] === 0; i--) - k++; - if (i >= 0) - k++; - acc = acc.dblp(k); - - if (i < 0) - break; - var z = naf[i]; - assert(z !== 0); - if (p.type === 'affine') { - // J +- P - if (z > 0) - acc = acc.mixedAdd(wnd[(z - 1) >> 1]); - else - acc = acc.mixedAdd(wnd[(-z - 1) >> 1].neg()); - } else { - // J +- J - if (z > 0) - acc = acc.add(wnd[(z - 1) >> 1]); - else - acc = acc.add(wnd[(-z - 1) >> 1].neg()); - } - } - return p.type === 'affine' ? acc.toP() : acc; -}; - -BaseCurve.prototype._wnafMulAdd = function _wnafMulAdd(defW, - points, - coeffs, - len, - jacobianResult) { - var wndWidth = this._wnafT1; - var wnd = this._wnafT2; - var naf = this._wnafT3; - - // Fill all arrays - var max = 0; - for (var i = 0; i < len; i++) { - var p = points[i]; - var nafPoints = p._getNAFPoints(defW); - wndWidth[i] = nafPoints.wnd; - wnd[i] = nafPoints.points; - } - - // Comb small window NAFs - for (var i = len - 1; i >= 1; i -= 2) { - var a = i - 1; - var b = i; - if (wndWidth[a] !== 1 || wndWidth[b] !== 1) { - naf[a] = getNAF(coeffs[a], wndWidth[a]); - naf[b] = getNAF(coeffs[b], wndWidth[b]); - max = Math.max(naf[a].length, max); - max = Math.max(naf[b].length, max); - continue; - } - - var comb = [ - points[a], /* 1 */ - null, /* 3 */ - null, /* 5 */ - points[b] /* 7 */ - ]; - - // Try to avoid Projective points, if possible - if (points[a].y.cmp(points[b].y) === 0) { - comb[1] = points[a].add(points[b]); - comb[2] = points[a].toJ().mixedAdd(points[b].neg()); - } else if (points[a].y.cmp(points[b].y.redNeg()) === 0) { - comb[1] = points[a].toJ().mixedAdd(points[b]); - comb[2] = points[a].add(points[b].neg()); - } else { - comb[1] = points[a].toJ().mixedAdd(points[b]); - comb[2] = points[a].toJ().mixedAdd(points[b].neg()); - } - - var index = [ - -3, /* -1 -1 */ - -1, /* -1 0 */ - -5, /* -1 1 */ - -7, /* 0 -1 */ - 0, /* 0 0 */ - 7, /* 0 1 */ - 5, /* 1 -1 */ - 1, /* 1 0 */ - 3 /* 1 1 */ - ]; - - var jsf = getJSF(coeffs[a], coeffs[b]); - max = Math.max(jsf[0].length, max); - naf[a] = new Array(max); - naf[b] = new Array(max); - for (var j = 0; j < max; j++) { - var ja = jsf[0][j] | 0; - var jb = jsf[1][j] | 0; - - naf[a][j] = index[(ja + 1) * 3 + (jb + 1)]; - naf[b][j] = 0; - wnd[a] = comb; - } - } - - var acc = this.jpoint(null, null, null); - var tmp = this._wnafT4; - for (var i = max; i >= 0; i--) { - var k = 0; - - while (i >= 0) { - var zero = true; - for (var j = 0; j < len; j++) { - tmp[j] = naf[j][i] | 0; - if (tmp[j] !== 0) - zero = false; - } - if (!zero) - break; - k++; - i--; - } - if (i >= 0) - k++; - acc = acc.dblp(k); - if (i < 0) - break; - - for (var j = 0; j < len; j++) { - var z = tmp[j]; - var p; - if (z === 0) - continue; - else if (z > 0) - p = wnd[j][(z - 1) >> 1]; - else if (z < 0) - p = wnd[j][(-z - 1) >> 1].neg(); - - if (p.type === 'affine') - acc = acc.mixedAdd(p); - else - acc = acc.add(p); - } - } - // Zeroify references - for (var i = 0; i < len; i++) - wnd[i] = null; - - if (jacobianResult) - return acc; - else - return acc.toP(); -}; - -function BasePoint(curve, type) { - this.curve = curve; - this.type = type; - this.precomputed = null; -} -BaseCurve.BasePoint = BasePoint; - -BasePoint.prototype.eq = function eq(/*other*/) { - throw new Error('Not implemented'); -}; - -BasePoint.prototype.validate = function validate() { - return this.curve.validate(this); -}; - -BaseCurve.prototype.decodePoint = function decodePoint(bytes, enc) { - bytes = utils.toArray(bytes, enc); - - var len = this.p.byteLength(); - - // uncompressed, hybrid-odd, hybrid-even - if ((bytes[0] === 0x04 || bytes[0] === 0x06 || bytes[0] === 0x07) && - bytes.length - 1 === 2 * len) { - if (bytes[0] === 0x06) - assert(bytes[bytes.length - 1] % 2 === 0); - else if (bytes[0] === 0x07) - assert(bytes[bytes.length - 1] % 2 === 1); - - var res = this.point(bytes.slice(1, 1 + len), - bytes.slice(1 + len, 1 + 2 * len)); - - return res; - } else if ((bytes[0] === 0x02 || bytes[0] === 0x03) && - bytes.length - 1 === len) { - return this.pointFromX(bytes.slice(1, 1 + len), bytes[0] === 0x03); - } - throw new Error('Unknown point format'); -}; - -BasePoint.prototype.encodeCompressed = function encodeCompressed(enc) { - return this.encode(enc, true); -}; - -BasePoint.prototype._encode = function _encode(compact) { - var len = this.curve.p.byteLength(); - var x = this.getX().toArray('be', len); - - if (compact) - return [ this.getY().isEven() ? 0x02 : 0x03 ].concat(x); - - return [ 0x04 ].concat(x, this.getY().toArray('be', len)) ; -}; - -BasePoint.prototype.encode = function encode(enc, compact) { - return utils.encode(this._encode(compact), enc); -}; - -BasePoint.prototype.precompute = function precompute(power) { - if (this.precomputed) - return this; - - var precomputed = { - doubles: null, - naf: null, - beta: null - }; - precomputed.naf = this._getNAFPoints(8); - precomputed.doubles = this._getDoubles(4, power); - precomputed.beta = this._getBeta(); - this.precomputed = precomputed; - - return this; -}; - -BasePoint.prototype._hasDoubles = function _hasDoubles(k) { - if (!this.precomputed) - return false; - - var doubles = this.precomputed.doubles; - if (!doubles) - return false; - - return doubles.points.length >= Math.ceil((k.bitLength() + 1) / doubles.step); -}; - -BasePoint.prototype._getDoubles = function _getDoubles(step, power) { - if (this.precomputed && this.precomputed.doubles) - return this.precomputed.doubles; - - var doubles = [ this ]; - var acc = this; - for (var i = 0; i < power; i += step) { - for (var j = 0; j < step; j++) - acc = acc.dbl(); - doubles.push(acc); - } - return { - step: step, - points: doubles - }; -}; - -BasePoint.prototype._getNAFPoints = function _getNAFPoints(wnd) { - if (this.precomputed && this.precomputed.naf) - return this.precomputed.naf; - - var res = [ this ]; - var max = (1 << wnd) - 1; - var dbl = max === 1 ? null : this.dbl(); - for (var i = 1; i < max; i++) - res[i] = res[i - 1].add(dbl); - return { - wnd: wnd, - points: res - }; -}; - -BasePoint.prototype._getBeta = function _getBeta() { - return null; -}; - -BasePoint.prototype.dblp = function dblp(k) { - var r = this; - for (var i = 0; i < k; i++) - r = r.dbl(); - return r; -}; diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/create-ecdh/node_modules/elliptic/lib/elliptic/curve/edwards.js b/node_modules/browserify/node_modules/crypto-browserify/node_modules/create-ecdh/node_modules/elliptic/lib/elliptic/curve/edwards.js deleted file mode 100644 index 6e9fb774..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/create-ecdh/node_modules/elliptic/lib/elliptic/curve/edwards.js +++ /dev/null @@ -1,433 +0,0 @@ -'use strict'; - -var curve = require('../curve'); -var elliptic = require('../../elliptic'); -var BN = require('bn.js'); -var inherits = require('inherits'); -var Base = curve.base; - -var assert = elliptic.utils.assert; - -function EdwardsCurve(conf) { - // NOTE: Important as we are creating point in Base.call() - this.twisted = (conf.a | 0) !== 1; - this.mOneA = this.twisted && (conf.a | 0) === -1; - this.extended = this.mOneA; - - Base.call(this, 'edwards', conf); - - this.a = new BN(conf.a, 16).umod(this.red.m); - this.a = this.a.toRed(this.red); - this.c = new BN(conf.c, 16).toRed(this.red); - this.c2 = this.c.redSqr(); - this.d = new BN(conf.d, 16).toRed(this.red); - this.dd = this.d.redAdd(this.d); - - assert(!this.twisted || this.c.fromRed().cmpn(1) === 0); - this.oneC = (conf.c | 0) === 1; -} -inherits(EdwardsCurve, Base); -module.exports = EdwardsCurve; - -EdwardsCurve.prototype._mulA = function _mulA(num) { - if (this.mOneA) - return num.redNeg(); - else - return this.a.redMul(num); -}; - -EdwardsCurve.prototype._mulC = function _mulC(num) { - if (this.oneC) - return num; - else - return this.c.redMul(num); -}; - -// Just for compatibility with Short curve -EdwardsCurve.prototype.jpoint = function jpoint(x, y, z, t) { - return this.point(x, y, z, t); -}; - -EdwardsCurve.prototype.pointFromX = function pointFromX(x, odd) { - x = new BN(x, 16); - if (!x.red) - x = x.toRed(this.red); - - var x2 = x.redSqr(); - var rhs = this.c2.redSub(this.a.redMul(x2)); - var lhs = this.one.redSub(this.c2.redMul(this.d).redMul(x2)); - - var y2 = rhs.redMul(lhs.redInvm()); - var y = y2.redSqrt(); - if (y.redSqr().redSub(y2).cmp(this.zero) !== 0) - throw new Error('invalid point'); - - var isOdd = y.fromRed().isOdd(); - if (odd && !isOdd || !odd && isOdd) - y = y.redNeg(); - - return this.point(x, y); -}; - -EdwardsCurve.prototype.pointFromY = function pointFromY(y, odd) { - y = new BN(y, 16); - if (!y.red) - y = y.toRed(this.red); - - // x^2 = (y^2 - 1) / (d y^2 + 1) - var y2 = y.redSqr(); - var lhs = y2.redSub(this.one); - var rhs = y2.redMul(this.d).redAdd(this.one); - var x2 = lhs.redMul(rhs.redInvm()); - - if (x2.cmp(this.zero) === 0) { - if (odd) - throw new Error('invalid point'); - else - return this.point(this.zero, y); - } - - var x = x2.redSqrt(); - if (x.redSqr().redSub(x2).cmp(this.zero) !== 0) - throw new Error('invalid point'); - - if (x.isOdd() !== odd) - x = x.redNeg(); - - return this.point(x, y); -}; - -EdwardsCurve.prototype.validate = function validate(point) { - if (point.isInfinity()) - return true; - - // Curve: A * X^2 + Y^2 = C^2 * (1 + D * X^2 * Y^2) - point.normalize(); - - var x2 = point.x.redSqr(); - var y2 = point.y.redSqr(); - var lhs = x2.redMul(this.a).redAdd(y2); - var rhs = this.c2.redMul(this.one.redAdd(this.d.redMul(x2).redMul(y2))); - - return lhs.cmp(rhs) === 0; -}; - -function Point(curve, x, y, z, t) { - Base.BasePoint.call(this, curve, 'projective'); - if (x === null && y === null && z === null) { - this.x = this.curve.zero; - this.y = this.curve.one; - this.z = this.curve.one; - this.t = this.curve.zero; - this.zOne = true; - } else { - this.x = new BN(x, 16); - this.y = new BN(y, 16); - this.z = z ? new BN(z, 16) : this.curve.one; - this.t = t && new BN(t, 16); - if (!this.x.red) - this.x = this.x.toRed(this.curve.red); - if (!this.y.red) - this.y = this.y.toRed(this.curve.red); - if (!this.z.red) - this.z = this.z.toRed(this.curve.red); - if (this.t && !this.t.red) - this.t = this.t.toRed(this.curve.red); - this.zOne = this.z === this.curve.one; - - // Use extended coordinates - if (this.curve.extended && !this.t) { - this.t = this.x.redMul(this.y); - if (!this.zOne) - this.t = this.t.redMul(this.z.redInvm()); - } - } -} -inherits(Point, Base.BasePoint); - -EdwardsCurve.prototype.pointFromJSON = function pointFromJSON(obj) { - return Point.fromJSON(this, obj); -}; - -EdwardsCurve.prototype.point = function point(x, y, z, t) { - return new Point(this, x, y, z, t); -}; - -Point.fromJSON = function fromJSON(curve, obj) { - return new Point(curve, obj[0], obj[1], obj[2]); -}; - -Point.prototype.inspect = function inspect() { - if (this.isInfinity()) - return ''; - return ''; -}; - -Point.prototype.isInfinity = function isInfinity() { - // XXX This code assumes that zero is always zero in red - return this.x.cmpn(0) === 0 && - this.y.cmp(this.z) === 0; -}; - -Point.prototype._extDbl = function _extDbl() { - // hyperelliptic.org/EFD/g1p/auto-twisted-extended-1.html - // #doubling-dbl-2008-hwcd - // 4M + 4S - - // A = X1^2 - var a = this.x.redSqr(); - // B = Y1^2 - var b = this.y.redSqr(); - // C = 2 * Z1^2 - var c = this.z.redSqr(); - c = c.redIAdd(c); - // D = a * A - var d = this.curve._mulA(a); - // E = (X1 + Y1)^2 - A - B - var e = this.x.redAdd(this.y).redSqr().redISub(a).redISub(b); - // G = D + B - var g = d.redAdd(b); - // F = G - C - var f = g.redSub(c); - // H = D - B - var h = d.redSub(b); - // X3 = E * F - var nx = e.redMul(f); - // Y3 = G * H - var ny = g.redMul(h); - // T3 = E * H - var nt = e.redMul(h); - // Z3 = F * G - var nz = f.redMul(g); - return this.curve.point(nx, ny, nz, nt); -}; - -Point.prototype._projDbl = function _projDbl() { - // hyperelliptic.org/EFD/g1p/auto-twisted-projective.html - // #doubling-dbl-2008-bbjlp - // #doubling-dbl-2007-bl - // and others - // Generally 3M + 4S or 2M + 4S - - // B = (X1 + Y1)^2 - var b = this.x.redAdd(this.y).redSqr(); - // C = X1^2 - var c = this.x.redSqr(); - // D = Y1^2 - var d = this.y.redSqr(); - - var nx; - var ny; - var nz; - if (this.curve.twisted) { - // E = a * C - var e = this.curve._mulA(c); - // F = E + D - var f = e.redAdd(d); - if (this.zOne) { - // X3 = (B - C - D) * (F - 2) - nx = b.redSub(c).redSub(d).redMul(f.redSub(this.curve.two)); - // Y3 = F * (E - D) - ny = f.redMul(e.redSub(d)); - // Z3 = F^2 - 2 * F - nz = f.redSqr().redSub(f).redSub(f); - } else { - // H = Z1^2 - var h = this.z.redSqr(); - // J = F - 2 * H - var j = f.redSub(h).redISub(h); - // X3 = (B-C-D)*J - nx = b.redSub(c).redISub(d).redMul(j); - // Y3 = F * (E - D) - ny = f.redMul(e.redSub(d)); - // Z3 = F * J - nz = f.redMul(j); - } - } else { - // E = C + D - var e = c.redAdd(d); - // H = (c * Z1)^2 - var h = this.curve._mulC(this.c.redMul(this.z)).redSqr(); - // J = E - 2 * H - var j = e.redSub(h).redSub(h); - // X3 = c * (B - E) * J - nx = this.curve._mulC(b.redISub(e)).redMul(j); - // Y3 = c * E * (C - D) - ny = this.curve._mulC(e).redMul(c.redISub(d)); - // Z3 = E * J - nz = e.redMul(j); - } - return this.curve.point(nx, ny, nz); -}; - -Point.prototype.dbl = function dbl() { - if (this.isInfinity()) - return this; - - // Double in extended coordinates - if (this.curve.extended) - return this._extDbl(); - else - return this._projDbl(); -}; - -Point.prototype._extAdd = function _extAdd(p) { - // hyperelliptic.org/EFD/g1p/auto-twisted-extended-1.html - // #addition-add-2008-hwcd-3 - // 8M - - // A = (Y1 - X1) * (Y2 - X2) - var a = this.y.redSub(this.x).redMul(p.y.redSub(p.x)); - // B = (Y1 + X1) * (Y2 + X2) - var b = this.y.redAdd(this.x).redMul(p.y.redAdd(p.x)); - // C = T1 * k * T2 - var c = this.t.redMul(this.curve.dd).redMul(p.t); - // D = Z1 * 2 * Z2 - var d = this.z.redMul(p.z.redAdd(p.z)); - // E = B - A - var e = b.redSub(a); - // F = D - C - var f = d.redSub(c); - // G = D + C - var g = d.redAdd(c); - // H = B + A - var h = b.redAdd(a); - // X3 = E * F - var nx = e.redMul(f); - // Y3 = G * H - var ny = g.redMul(h); - // T3 = E * H - var nt = e.redMul(h); - // Z3 = F * G - var nz = f.redMul(g); - return this.curve.point(nx, ny, nz, nt); -}; - -Point.prototype._projAdd = function _projAdd(p) { - // hyperelliptic.org/EFD/g1p/auto-twisted-projective.html - // #addition-add-2008-bbjlp - // #addition-add-2007-bl - // 10M + 1S - - // A = Z1 * Z2 - var a = this.z.redMul(p.z); - // B = A^2 - var b = a.redSqr(); - // C = X1 * X2 - var c = this.x.redMul(p.x); - // D = Y1 * Y2 - var d = this.y.redMul(p.y); - // E = d * C * D - var e = this.curve.d.redMul(c).redMul(d); - // F = B - E - var f = b.redSub(e); - // G = B + E - var g = b.redAdd(e); - // X3 = A * F * ((X1 + Y1) * (X2 + Y2) - C - D) - var tmp = this.x.redAdd(this.y).redMul(p.x.redAdd(p.y)).redISub(c).redISub(d); - var nx = a.redMul(f).redMul(tmp); - var ny; - var nz; - if (this.curve.twisted) { - // Y3 = A * G * (D - a * C) - ny = a.redMul(g).redMul(d.redSub(this.curve._mulA(c))); - // Z3 = F * G - nz = f.redMul(g); - } else { - // Y3 = A * G * (D - C) - ny = a.redMul(g).redMul(d.redSub(c)); - // Z3 = c * F * G - nz = this.curve._mulC(f).redMul(g); - } - return this.curve.point(nx, ny, nz); -}; - -Point.prototype.add = function add(p) { - if (this.isInfinity()) - return p; - if (p.isInfinity()) - return this; - - if (this.curve.extended) - return this._extAdd(p); - else - return this._projAdd(p); -}; - -Point.prototype.mul = function mul(k) { - if (this._hasDoubles(k)) - return this.curve._fixedNafMul(this, k); - else - return this.curve._wnafMul(this, k); -}; - -Point.prototype.mulAdd = function mulAdd(k1, p, k2) { - return this.curve._wnafMulAdd(1, [ this, p ], [ k1, k2 ], 2, false); -}; - -Point.prototype.jmulAdd = function jmulAdd(k1, p, k2) { - return this.curve._wnafMulAdd(1, [ this, p ], [ k1, k2 ], 2, true); -}; - -Point.prototype.normalize = function normalize() { - if (this.zOne) - return this; - - // Normalize coordinates - var zi = this.z.redInvm(); - this.x = this.x.redMul(zi); - this.y = this.y.redMul(zi); - if (this.t) - this.t = this.t.redMul(zi); - this.z = this.curve.one; - this.zOne = true; - return this; -}; - -Point.prototype.neg = function neg() { - return this.curve.point(this.x.redNeg(), - this.y, - this.z, - this.t && this.t.redNeg()); -}; - -Point.prototype.getX = function getX() { - this.normalize(); - return this.x.fromRed(); -}; - -Point.prototype.getY = function getY() { - this.normalize(); - return this.y.fromRed(); -}; - -Point.prototype.eq = function eq(other) { - return this === other || - this.getX().cmp(other.getX()) === 0 && - this.getY().cmp(other.getY()) === 0; -}; - -Point.prototype.eqXToP = function eqXToP(x) { - var rx = x.toRed(this.curve.red).redMul(this.z); - if (this.x.cmp(rx) === 0) - return true; - - var xc = x.clone(); - var t = this.curve.redN.redMul(this.z); - for (;;) { - xc.iadd(this.curve.n); - if (xc.cmp(this.curve.p) >= 0) - return false; - - rx.redIAdd(t); - if (this.x.cmp(rx) === 0) - return true; - } - return false; -}; - -// Compatibility with BaseCurve -Point.prototype.toP = Point.prototype.normalize; -Point.prototype.mixedAdd = Point.prototype.add; diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/create-ecdh/node_modules/elliptic/lib/elliptic/curve/index.js b/node_modules/browserify/node_modules/crypto-browserify/node_modules/create-ecdh/node_modules/elliptic/lib/elliptic/curve/index.js deleted file mode 100644 index c589281d..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/create-ecdh/node_modules/elliptic/lib/elliptic/curve/index.js +++ /dev/null @@ -1,8 +0,0 @@ -'use strict'; - -var curve = exports; - -curve.base = require('./base'); -curve.short = require('./short'); -curve.mont = require('./mont'); -curve.edwards = require('./edwards'); diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/create-ecdh/node_modules/elliptic/lib/elliptic/curve/mont.js b/node_modules/browserify/node_modules/crypto-browserify/node_modules/create-ecdh/node_modules/elliptic/lib/elliptic/curve/mont.js deleted file mode 100644 index 0ddea33e..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/create-ecdh/node_modules/elliptic/lib/elliptic/curve/mont.js +++ /dev/null @@ -1,180 +0,0 @@ -'use strict'; - -var curve = require('../curve'); -var BN = require('bn.js'); -var inherits = require('inherits'); -var Base = curve.base; - -var elliptic = require('../../elliptic'); -var utils = elliptic.utils; - -function MontCurve(conf) { - Base.call(this, 'mont', conf); - - this.a = new BN(conf.a, 16).toRed(this.red); - this.b = new BN(conf.b, 16).toRed(this.red); - this.i4 = new BN(4).toRed(this.red).redInvm(); - this.two = new BN(2).toRed(this.red); - this.a24 = this.i4.redMul(this.a.redAdd(this.two)); -} -inherits(MontCurve, Base); -module.exports = MontCurve; - -MontCurve.prototype.validate = function validate(point) { - var x = point.normalize().x; - var x2 = x.redSqr(); - var rhs = x2.redMul(x).redAdd(x2.redMul(this.a)).redAdd(x); - var y = rhs.redSqrt(); - - return y.redSqr().cmp(rhs) === 0; -}; - -function Point(curve, x, z) { - Base.BasePoint.call(this, curve, 'projective'); - if (x === null && z === null) { - this.x = this.curve.one; - this.z = this.curve.zero; - } else { - this.x = new BN(x, 16); - this.z = new BN(z, 16); - if (!this.x.red) - this.x = this.x.toRed(this.curve.red); - if (!this.z.red) - this.z = this.z.toRed(this.curve.red); - } -} -inherits(Point, Base.BasePoint); - -MontCurve.prototype.decodePoint = function decodePoint(bytes, enc) { - return this.point(utils.toArray(bytes, enc), 1); -}; - -MontCurve.prototype.point = function point(x, z) { - return new Point(this, x, z); -}; - -MontCurve.prototype.pointFromJSON = function pointFromJSON(obj) { - return Point.fromJSON(this, obj); -}; - -Point.prototype.precompute = function precompute() { - // No-op -}; - -Point.prototype._encode = function _encode() { - return this.getX().toArray('be', this.curve.p.byteLength()); -}; - -Point.fromJSON = function fromJSON(curve, obj) { - return new Point(curve, obj[0], obj[1] || curve.one); -}; - -Point.prototype.inspect = function inspect() { - if (this.isInfinity()) - return ''; - return ''; -}; - -Point.prototype.isInfinity = function isInfinity() { - // XXX This code assumes that zero is always zero in red - return this.z.cmpn(0) === 0; -}; - -Point.prototype.dbl = function dbl() { - // http://hyperelliptic.org/EFD/g1p/auto-montgom-xz.html#doubling-dbl-1987-m-3 - // 2M + 2S + 4A - - // A = X1 + Z1 - var a = this.x.redAdd(this.z); - // AA = A^2 - var aa = a.redSqr(); - // B = X1 - Z1 - var b = this.x.redSub(this.z); - // BB = B^2 - var bb = b.redSqr(); - // C = AA - BB - var c = aa.redSub(bb); - // X3 = AA * BB - var nx = aa.redMul(bb); - // Z3 = C * (BB + A24 * C) - var nz = c.redMul(bb.redAdd(this.curve.a24.redMul(c))); - return this.curve.point(nx, nz); -}; - -Point.prototype.add = function add() { - throw new Error('Not supported on Montgomery curve'); -}; - -Point.prototype.diffAdd = function diffAdd(p, diff) { - // http://hyperelliptic.org/EFD/g1p/auto-montgom-xz.html#diffadd-dadd-1987-m-3 - // 4M + 2S + 6A - - // A = X2 + Z2 - var a = this.x.redAdd(this.z); - // B = X2 - Z2 - var b = this.x.redSub(this.z); - // C = X3 + Z3 - var c = p.x.redAdd(p.z); - // D = X3 - Z3 - var d = p.x.redSub(p.z); - // DA = D * A - var da = d.redMul(a); - // CB = C * B - var cb = c.redMul(b); - // X5 = Z1 * (DA + CB)^2 - var nx = diff.z.redMul(da.redAdd(cb).redSqr()); - // Z5 = X1 * (DA - CB)^2 - var nz = diff.x.redMul(da.redISub(cb).redSqr()); - return this.curve.point(nx, nz); -}; - -Point.prototype.mul = function mul(k) { - var t = k.clone(); - var a = this; // (N / 2) * Q + Q - var b = this.curve.point(null, null); // (N / 2) * Q - var c = this; // Q - - for (var bits = []; t.cmpn(0) !== 0; t.iushrn(1)) - bits.push(t.andln(1)); - - for (var i = bits.length - 1; i >= 0; i--) { - if (bits[i] === 0) { - // N * Q + Q = ((N / 2) * Q + Q)) + (N / 2) * Q - a = a.diffAdd(b, c); - // N * Q = 2 * ((N / 2) * Q + Q)) - b = b.dbl(); - } else { - // N * Q = ((N / 2) * Q + Q) + ((N / 2) * Q) - b = a.diffAdd(b, c); - // N * Q + Q = 2 * ((N / 2) * Q + Q) - a = a.dbl(); - } - } - return b; -}; - -Point.prototype.mulAdd = function mulAdd() { - throw new Error('Not supported on Montgomery curve'); -}; - -Point.prototype.jumlAdd = function jumlAdd() { - throw new Error('Not supported on Montgomery curve'); -}; - -Point.prototype.eq = function eq(other) { - return this.getX().cmp(other.getX()) === 0; -}; - -Point.prototype.normalize = function normalize() { - this.x = this.x.redMul(this.z.redInvm()); - this.z = this.curve.one; - return this; -}; - -Point.prototype.getX = function getX() { - // Normalize coordinates - this.normalize(); - - return this.x.fromRed(); -}; diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/create-ecdh/node_modules/elliptic/lib/elliptic/curve/short.js b/node_modules/browserify/node_modules/crypto-browserify/node_modules/create-ecdh/node_modules/elliptic/lib/elliptic/curve/short.js deleted file mode 100644 index 0a09d249..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/create-ecdh/node_modules/elliptic/lib/elliptic/curve/short.js +++ /dev/null @@ -1,938 +0,0 @@ -'use strict'; - -var curve = require('../curve'); -var elliptic = require('../../elliptic'); -var BN = require('bn.js'); -var inherits = require('inherits'); -var Base = curve.base; - -var assert = elliptic.utils.assert; - -function ShortCurve(conf) { - Base.call(this, 'short', conf); - - this.a = new BN(conf.a, 16).toRed(this.red); - this.b = new BN(conf.b, 16).toRed(this.red); - this.tinv = this.two.redInvm(); - - this.zeroA = this.a.fromRed().cmpn(0) === 0; - this.threeA = this.a.fromRed().sub(this.p).cmpn(-3) === 0; - - // If the curve is endomorphic, precalculate beta and lambda - this.endo = this._getEndomorphism(conf); - this._endoWnafT1 = new Array(4); - this._endoWnafT2 = new Array(4); -} -inherits(ShortCurve, Base); -module.exports = ShortCurve; - -ShortCurve.prototype._getEndomorphism = function _getEndomorphism(conf) { - // No efficient endomorphism - if (!this.zeroA || !this.g || !this.n || this.p.modn(3) !== 1) - return; - - // Compute beta and lambda, that lambda * P = (beta * Px; Py) - var beta; - var lambda; - if (conf.beta) { - beta = new BN(conf.beta, 16).toRed(this.red); - } else { - var betas = this._getEndoRoots(this.p); - // Choose the smallest beta - beta = betas[0].cmp(betas[1]) < 0 ? betas[0] : betas[1]; - beta = beta.toRed(this.red); - } - if (conf.lambda) { - lambda = new BN(conf.lambda, 16); - } else { - // Choose the lambda that is matching selected beta - var lambdas = this._getEndoRoots(this.n); - if (this.g.mul(lambdas[0]).x.cmp(this.g.x.redMul(beta)) === 0) { - lambda = lambdas[0]; - } else { - lambda = lambdas[1]; - assert(this.g.mul(lambda).x.cmp(this.g.x.redMul(beta)) === 0); - } - } - - // Get basis vectors, used for balanced length-two representation - var basis; - if (conf.basis) { - basis = conf.basis.map(function(vec) { - return { - a: new BN(vec.a, 16), - b: new BN(vec.b, 16) - }; - }); - } else { - basis = this._getEndoBasis(lambda); - } - - return { - beta: beta, - lambda: lambda, - basis: basis - }; -}; - -ShortCurve.prototype._getEndoRoots = function _getEndoRoots(num) { - // Find roots of for x^2 + x + 1 in F - // Root = (-1 +- Sqrt(-3)) / 2 - // - var red = num === this.p ? this.red : BN.mont(num); - var tinv = new BN(2).toRed(red).redInvm(); - var ntinv = tinv.redNeg(); - - var s = new BN(3).toRed(red).redNeg().redSqrt().redMul(tinv); - - var l1 = ntinv.redAdd(s).fromRed(); - var l2 = ntinv.redSub(s).fromRed(); - return [ l1, l2 ]; -}; - -ShortCurve.prototype._getEndoBasis = function _getEndoBasis(lambda) { - // aprxSqrt >= sqrt(this.n) - var aprxSqrt = this.n.ushrn(Math.floor(this.n.bitLength() / 2)); - - // 3.74 - // Run EGCD, until r(L + 1) < aprxSqrt - var u = lambda; - var v = this.n.clone(); - var x1 = new BN(1); - var y1 = new BN(0); - var x2 = new BN(0); - var y2 = new BN(1); - - // NOTE: all vectors are roots of: a + b * lambda = 0 (mod n) - var a0; - var b0; - // First vector - var a1; - var b1; - // Second vector - var a2; - var b2; - - var prevR; - var i = 0; - var r; - var x; - while (u.cmpn(0) !== 0) { - var q = v.div(u); - r = v.sub(q.mul(u)); - x = x2.sub(q.mul(x1)); - var y = y2.sub(q.mul(y1)); - - if (!a1 && r.cmp(aprxSqrt) < 0) { - a0 = prevR.neg(); - b0 = x1; - a1 = r.neg(); - b1 = x; - } else if (a1 && ++i === 2) { - break; - } - prevR = r; - - v = u; - u = r; - x2 = x1; - x1 = x; - y2 = y1; - y1 = y; - } - a2 = r.neg(); - b2 = x; - - var len1 = a1.sqr().add(b1.sqr()); - var len2 = a2.sqr().add(b2.sqr()); - if (len2.cmp(len1) >= 0) { - a2 = a0; - b2 = b0; - } - - // Normalize signs - if (a1.negative) { - a1 = a1.neg(); - b1 = b1.neg(); - } - if (a2.negative) { - a2 = a2.neg(); - b2 = b2.neg(); - } - - return [ - { a: a1, b: b1 }, - { a: a2, b: b2 } - ]; -}; - -ShortCurve.prototype._endoSplit = function _endoSplit(k) { - var basis = this.endo.basis; - var v1 = basis[0]; - var v2 = basis[1]; - - var c1 = v2.b.mul(k).divRound(this.n); - var c2 = v1.b.neg().mul(k).divRound(this.n); - - var p1 = c1.mul(v1.a); - var p2 = c2.mul(v2.a); - var q1 = c1.mul(v1.b); - var q2 = c2.mul(v2.b); - - // Calculate answer - var k1 = k.sub(p1).sub(p2); - var k2 = q1.add(q2).neg(); - return { k1: k1, k2: k2 }; -}; - -ShortCurve.prototype.pointFromX = function pointFromX(x, odd) { - x = new BN(x, 16); - if (!x.red) - x = x.toRed(this.red); - - var y2 = x.redSqr().redMul(x).redIAdd(x.redMul(this.a)).redIAdd(this.b); - var y = y2.redSqrt(); - if (y.redSqr().redSub(y2).cmp(this.zero) !== 0) - throw new Error('invalid point'); - - // XXX Is there any way to tell if the number is odd without converting it - // to non-red form? - var isOdd = y.fromRed().isOdd(); - if (odd && !isOdd || !odd && isOdd) - y = y.redNeg(); - - return this.point(x, y); -}; - -ShortCurve.prototype.validate = function validate(point) { - if (point.inf) - return true; - - var x = point.x; - var y = point.y; - - var ax = this.a.redMul(x); - var rhs = x.redSqr().redMul(x).redIAdd(ax).redIAdd(this.b); - return y.redSqr().redISub(rhs).cmpn(0) === 0; -}; - -ShortCurve.prototype._endoWnafMulAdd = - function _endoWnafMulAdd(points, coeffs, jacobianResult) { - var npoints = this._endoWnafT1; - var ncoeffs = this._endoWnafT2; - for (var i = 0; i < points.length; i++) { - var split = this._endoSplit(coeffs[i]); - var p = points[i]; - var beta = p._getBeta(); - - if (split.k1.negative) { - split.k1.ineg(); - p = p.neg(true); - } - if (split.k2.negative) { - split.k2.ineg(); - beta = beta.neg(true); - } - - npoints[i * 2] = p; - npoints[i * 2 + 1] = beta; - ncoeffs[i * 2] = split.k1; - ncoeffs[i * 2 + 1] = split.k2; - } - var res = this._wnafMulAdd(1, npoints, ncoeffs, i * 2, jacobianResult); - - // Clean-up references to points and coefficients - for (var j = 0; j < i * 2; j++) { - npoints[j] = null; - ncoeffs[j] = null; - } - return res; -}; - -function Point(curve, x, y, isRed) { - Base.BasePoint.call(this, curve, 'affine'); - if (x === null && y === null) { - this.x = null; - this.y = null; - this.inf = true; - } else { - this.x = new BN(x, 16); - this.y = new BN(y, 16); - // Force redgomery representation when loading from JSON - if (isRed) { - this.x.forceRed(this.curve.red); - this.y.forceRed(this.curve.red); - } - if (!this.x.red) - this.x = this.x.toRed(this.curve.red); - if (!this.y.red) - this.y = this.y.toRed(this.curve.red); - this.inf = false; - } -} -inherits(Point, Base.BasePoint); - -ShortCurve.prototype.point = function point(x, y, isRed) { - return new Point(this, x, y, isRed); -}; - -ShortCurve.prototype.pointFromJSON = function pointFromJSON(obj, red) { - return Point.fromJSON(this, obj, red); -}; - -Point.prototype._getBeta = function _getBeta() { - if (!this.curve.endo) - return; - - var pre = this.precomputed; - if (pre && pre.beta) - return pre.beta; - - var beta = this.curve.point(this.x.redMul(this.curve.endo.beta), this.y); - if (pre) { - var curve = this.curve; - var endoMul = function(p) { - return curve.point(p.x.redMul(curve.endo.beta), p.y); - }; - pre.beta = beta; - beta.precomputed = { - beta: null, - naf: pre.naf && { - wnd: pre.naf.wnd, - points: pre.naf.points.map(endoMul) - }, - doubles: pre.doubles && { - step: pre.doubles.step, - points: pre.doubles.points.map(endoMul) - } - }; - } - return beta; -}; - -Point.prototype.toJSON = function toJSON() { - if (!this.precomputed) - return [ this.x, this.y ]; - - return [ this.x, this.y, this.precomputed && { - doubles: this.precomputed.doubles && { - step: this.precomputed.doubles.step, - points: this.precomputed.doubles.points.slice(1) - }, - naf: this.precomputed.naf && { - wnd: this.precomputed.naf.wnd, - points: this.precomputed.naf.points.slice(1) - } - } ]; -}; - -Point.fromJSON = function fromJSON(curve, obj, red) { - if (typeof obj === 'string') - obj = JSON.parse(obj); - var res = curve.point(obj[0], obj[1], red); - if (!obj[2]) - return res; - - function obj2point(obj) { - return curve.point(obj[0], obj[1], red); - } - - var pre = obj[2]; - res.precomputed = { - beta: null, - doubles: pre.doubles && { - step: pre.doubles.step, - points: [ res ].concat(pre.doubles.points.map(obj2point)) - }, - naf: pre.naf && { - wnd: pre.naf.wnd, - points: [ res ].concat(pre.naf.points.map(obj2point)) - } - }; - return res; -}; - -Point.prototype.inspect = function inspect() { - if (this.isInfinity()) - return ''; - return ''; -}; - -Point.prototype.isInfinity = function isInfinity() { - return this.inf; -}; - -Point.prototype.add = function add(p) { - // O + P = P - if (this.inf) - return p; - - // P + O = P - if (p.inf) - return this; - - // P + P = 2P - if (this.eq(p)) - return this.dbl(); - - // P + (-P) = O - if (this.neg().eq(p)) - return this.curve.point(null, null); - - // P + Q = O - if (this.x.cmp(p.x) === 0) - return this.curve.point(null, null); - - var c = this.y.redSub(p.y); - if (c.cmpn(0) !== 0) - c = c.redMul(this.x.redSub(p.x).redInvm()); - var nx = c.redSqr().redISub(this.x).redISub(p.x); - var ny = c.redMul(this.x.redSub(nx)).redISub(this.y); - return this.curve.point(nx, ny); -}; - -Point.prototype.dbl = function dbl() { - if (this.inf) - return this; - - // 2P = O - var ys1 = this.y.redAdd(this.y); - if (ys1.cmpn(0) === 0) - return this.curve.point(null, null); - - var a = this.curve.a; - - var x2 = this.x.redSqr(); - var dyinv = ys1.redInvm(); - var c = x2.redAdd(x2).redIAdd(x2).redIAdd(a).redMul(dyinv); - - var nx = c.redSqr().redISub(this.x.redAdd(this.x)); - var ny = c.redMul(this.x.redSub(nx)).redISub(this.y); - return this.curve.point(nx, ny); -}; - -Point.prototype.getX = function getX() { - return this.x.fromRed(); -}; - -Point.prototype.getY = function getY() { - return this.y.fromRed(); -}; - -Point.prototype.mul = function mul(k) { - k = new BN(k, 16); - - if (this._hasDoubles(k)) - return this.curve._fixedNafMul(this, k); - else if (this.curve.endo) - return this.curve._endoWnafMulAdd([ this ], [ k ]); - else - return this.curve._wnafMul(this, k); -}; - -Point.prototype.mulAdd = function mulAdd(k1, p2, k2) { - var points = [ this, p2 ]; - var coeffs = [ k1, k2 ]; - if (this.curve.endo) - return this.curve._endoWnafMulAdd(points, coeffs); - else - return this.curve._wnafMulAdd(1, points, coeffs, 2); -}; - -Point.prototype.jmulAdd = function jmulAdd(k1, p2, k2) { - var points = [ this, p2 ]; - var coeffs = [ k1, k2 ]; - if (this.curve.endo) - return this.curve._endoWnafMulAdd(points, coeffs, true); - else - return this.curve._wnafMulAdd(1, points, coeffs, 2, true); -}; - -Point.prototype.eq = function eq(p) { - return this === p || - this.inf === p.inf && - (this.inf || this.x.cmp(p.x) === 0 && this.y.cmp(p.y) === 0); -}; - -Point.prototype.neg = function neg(_precompute) { - if (this.inf) - return this; - - var res = this.curve.point(this.x, this.y.redNeg()); - if (_precompute && this.precomputed) { - var pre = this.precomputed; - var negate = function(p) { - return p.neg(); - }; - res.precomputed = { - naf: pre.naf && { - wnd: pre.naf.wnd, - points: pre.naf.points.map(negate) - }, - doubles: pre.doubles && { - step: pre.doubles.step, - points: pre.doubles.points.map(negate) - } - }; - } - return res; -}; - -Point.prototype.toJ = function toJ() { - if (this.inf) - return this.curve.jpoint(null, null, null); - - var res = this.curve.jpoint(this.x, this.y, this.curve.one); - return res; -}; - -function JPoint(curve, x, y, z) { - Base.BasePoint.call(this, curve, 'jacobian'); - if (x === null && y === null && z === null) { - this.x = this.curve.one; - this.y = this.curve.one; - this.z = new BN(0); - } else { - this.x = new BN(x, 16); - this.y = new BN(y, 16); - this.z = new BN(z, 16); - } - if (!this.x.red) - this.x = this.x.toRed(this.curve.red); - if (!this.y.red) - this.y = this.y.toRed(this.curve.red); - if (!this.z.red) - this.z = this.z.toRed(this.curve.red); - - this.zOne = this.z === this.curve.one; -} -inherits(JPoint, Base.BasePoint); - -ShortCurve.prototype.jpoint = function jpoint(x, y, z) { - return new JPoint(this, x, y, z); -}; - -JPoint.prototype.toP = function toP() { - if (this.isInfinity()) - return this.curve.point(null, null); - - var zinv = this.z.redInvm(); - var zinv2 = zinv.redSqr(); - var ax = this.x.redMul(zinv2); - var ay = this.y.redMul(zinv2).redMul(zinv); - - return this.curve.point(ax, ay); -}; - -JPoint.prototype.neg = function neg() { - return this.curve.jpoint(this.x, this.y.redNeg(), this.z); -}; - -JPoint.prototype.add = function add(p) { - // O + P = P - if (this.isInfinity()) - return p; - - // P + O = P - if (p.isInfinity()) - return this; - - // 12M + 4S + 7A - var pz2 = p.z.redSqr(); - var z2 = this.z.redSqr(); - var u1 = this.x.redMul(pz2); - var u2 = p.x.redMul(z2); - var s1 = this.y.redMul(pz2.redMul(p.z)); - var s2 = p.y.redMul(z2.redMul(this.z)); - - var h = u1.redSub(u2); - var r = s1.redSub(s2); - if (h.cmpn(0) === 0) { - if (r.cmpn(0) !== 0) - return this.curve.jpoint(null, null, null); - else - return this.dbl(); - } - - var h2 = h.redSqr(); - var h3 = h2.redMul(h); - var v = u1.redMul(h2); - - var nx = r.redSqr().redIAdd(h3).redISub(v).redISub(v); - var ny = r.redMul(v.redISub(nx)).redISub(s1.redMul(h3)); - var nz = this.z.redMul(p.z).redMul(h); - - return this.curve.jpoint(nx, ny, nz); -}; - -JPoint.prototype.mixedAdd = function mixedAdd(p) { - // O + P = P - if (this.isInfinity()) - return p.toJ(); - - // P + O = P - if (p.isInfinity()) - return this; - - // 8M + 3S + 7A - var z2 = this.z.redSqr(); - var u1 = this.x; - var u2 = p.x.redMul(z2); - var s1 = this.y; - var s2 = p.y.redMul(z2).redMul(this.z); - - var h = u1.redSub(u2); - var r = s1.redSub(s2); - if (h.cmpn(0) === 0) { - if (r.cmpn(0) !== 0) - return this.curve.jpoint(null, null, null); - else - return this.dbl(); - } - - var h2 = h.redSqr(); - var h3 = h2.redMul(h); - var v = u1.redMul(h2); - - var nx = r.redSqr().redIAdd(h3).redISub(v).redISub(v); - var ny = r.redMul(v.redISub(nx)).redISub(s1.redMul(h3)); - var nz = this.z.redMul(h); - - return this.curve.jpoint(nx, ny, nz); -}; - -JPoint.prototype.dblp = function dblp(pow) { - if (pow === 0) - return this; - if (this.isInfinity()) - return this; - if (!pow) - return this.dbl(); - - if (this.curve.zeroA || this.curve.threeA) { - var r = this; - for (var i = 0; i < pow; i++) - r = r.dbl(); - return r; - } - - // 1M + 2S + 1A + N * (4S + 5M + 8A) - // N = 1 => 6M + 6S + 9A - var a = this.curve.a; - var tinv = this.curve.tinv; - - var jx = this.x; - var jy = this.y; - var jz = this.z; - var jz4 = jz.redSqr().redSqr(); - - // Reuse results - var jyd = jy.redAdd(jy); - for (var i = 0; i < pow; i++) { - var jx2 = jx.redSqr(); - var jyd2 = jyd.redSqr(); - var jyd4 = jyd2.redSqr(); - var c = jx2.redAdd(jx2).redIAdd(jx2).redIAdd(a.redMul(jz4)); - - var t1 = jx.redMul(jyd2); - var nx = c.redSqr().redISub(t1.redAdd(t1)); - var t2 = t1.redISub(nx); - var dny = c.redMul(t2); - dny = dny.redIAdd(dny).redISub(jyd4); - var nz = jyd.redMul(jz); - if (i + 1 < pow) - jz4 = jz4.redMul(jyd4); - - jx = nx; - jz = nz; - jyd = dny; - } - - return this.curve.jpoint(jx, jyd.redMul(tinv), jz); -}; - -JPoint.prototype.dbl = function dbl() { - if (this.isInfinity()) - return this; - - if (this.curve.zeroA) - return this._zeroDbl(); - else if (this.curve.threeA) - return this._threeDbl(); - else - return this._dbl(); -}; - -JPoint.prototype._zeroDbl = function _zeroDbl() { - var nx; - var ny; - var nz; - // Z = 1 - if (this.zOne) { - // hyperelliptic.org/EFD/g1p/auto-shortw-jacobian-0.html - // #doubling-mdbl-2007-bl - // 1M + 5S + 14A - - // XX = X1^2 - var xx = this.x.redSqr(); - // YY = Y1^2 - var yy = this.y.redSqr(); - // YYYY = YY^2 - var yyyy = yy.redSqr(); - // S = 2 * ((X1 + YY)^2 - XX - YYYY) - var s = this.x.redAdd(yy).redSqr().redISub(xx).redISub(yyyy); - s = s.redIAdd(s); - // M = 3 * XX + a; a = 0 - var m = xx.redAdd(xx).redIAdd(xx); - // T = M ^ 2 - 2*S - var t = m.redSqr().redISub(s).redISub(s); - - // 8 * YYYY - var yyyy8 = yyyy.redIAdd(yyyy); - yyyy8 = yyyy8.redIAdd(yyyy8); - yyyy8 = yyyy8.redIAdd(yyyy8); - - // X3 = T - nx = t; - // Y3 = M * (S - T) - 8 * YYYY - ny = m.redMul(s.redISub(t)).redISub(yyyy8); - // Z3 = 2*Y1 - nz = this.y.redAdd(this.y); - } else { - // hyperelliptic.org/EFD/g1p/auto-shortw-jacobian-0.html - // #doubling-dbl-2009-l - // 2M + 5S + 13A - - // A = X1^2 - var a = this.x.redSqr(); - // B = Y1^2 - var b = this.y.redSqr(); - // C = B^2 - var c = b.redSqr(); - // D = 2 * ((X1 + B)^2 - A - C) - var d = this.x.redAdd(b).redSqr().redISub(a).redISub(c); - d = d.redIAdd(d); - // E = 3 * A - var e = a.redAdd(a).redIAdd(a); - // F = E^2 - var f = e.redSqr(); - - // 8 * C - var c8 = c.redIAdd(c); - c8 = c8.redIAdd(c8); - c8 = c8.redIAdd(c8); - - // X3 = F - 2 * D - nx = f.redISub(d).redISub(d); - // Y3 = E * (D - X3) - 8 * C - ny = e.redMul(d.redISub(nx)).redISub(c8); - // Z3 = 2 * Y1 * Z1 - nz = this.y.redMul(this.z); - nz = nz.redIAdd(nz); - } - - return this.curve.jpoint(nx, ny, nz); -}; - -JPoint.prototype._threeDbl = function _threeDbl() { - var nx; - var ny; - var nz; - // Z = 1 - if (this.zOne) { - // hyperelliptic.org/EFD/g1p/auto-shortw-jacobian-3.html - // #doubling-mdbl-2007-bl - // 1M + 5S + 15A - - // XX = X1^2 - var xx = this.x.redSqr(); - // YY = Y1^2 - var yy = this.y.redSqr(); - // YYYY = YY^2 - var yyyy = yy.redSqr(); - // S = 2 * ((X1 + YY)^2 - XX - YYYY) - var s = this.x.redAdd(yy).redSqr().redISub(xx).redISub(yyyy); - s = s.redIAdd(s); - // M = 3 * XX + a - var m = xx.redAdd(xx).redIAdd(xx).redIAdd(this.curve.a); - // T = M^2 - 2 * S - var t = m.redSqr().redISub(s).redISub(s); - // X3 = T - nx = t; - // Y3 = M * (S - T) - 8 * YYYY - var yyyy8 = yyyy.redIAdd(yyyy); - yyyy8 = yyyy8.redIAdd(yyyy8); - yyyy8 = yyyy8.redIAdd(yyyy8); - ny = m.redMul(s.redISub(t)).redISub(yyyy8); - // Z3 = 2 * Y1 - nz = this.y.redAdd(this.y); - } else { - // hyperelliptic.org/EFD/g1p/auto-shortw-jacobian-3.html#doubling-dbl-2001-b - // 3M + 5S - - // delta = Z1^2 - var delta = this.z.redSqr(); - // gamma = Y1^2 - var gamma = this.y.redSqr(); - // beta = X1 * gamma - var beta = this.x.redMul(gamma); - // alpha = 3 * (X1 - delta) * (X1 + delta) - var alpha = this.x.redSub(delta).redMul(this.x.redAdd(delta)); - alpha = alpha.redAdd(alpha).redIAdd(alpha); - // X3 = alpha^2 - 8 * beta - var beta4 = beta.redIAdd(beta); - beta4 = beta4.redIAdd(beta4); - var beta8 = beta4.redAdd(beta4); - nx = alpha.redSqr().redISub(beta8); - // Z3 = (Y1 + Z1)^2 - gamma - delta - nz = this.y.redAdd(this.z).redSqr().redISub(gamma).redISub(delta); - // Y3 = alpha * (4 * beta - X3) - 8 * gamma^2 - var ggamma8 = gamma.redSqr(); - ggamma8 = ggamma8.redIAdd(ggamma8); - ggamma8 = ggamma8.redIAdd(ggamma8); - ggamma8 = ggamma8.redIAdd(ggamma8); - ny = alpha.redMul(beta4.redISub(nx)).redISub(ggamma8); - } - - return this.curve.jpoint(nx, ny, nz); -}; - -JPoint.prototype._dbl = function _dbl() { - var a = this.curve.a; - - // 4M + 6S + 10A - var jx = this.x; - var jy = this.y; - var jz = this.z; - var jz4 = jz.redSqr().redSqr(); - - var jx2 = jx.redSqr(); - var jy2 = jy.redSqr(); - - var c = jx2.redAdd(jx2).redIAdd(jx2).redIAdd(a.redMul(jz4)); - - var jxd4 = jx.redAdd(jx); - jxd4 = jxd4.redIAdd(jxd4); - var t1 = jxd4.redMul(jy2); - var nx = c.redSqr().redISub(t1.redAdd(t1)); - var t2 = t1.redISub(nx); - - var jyd8 = jy2.redSqr(); - jyd8 = jyd8.redIAdd(jyd8); - jyd8 = jyd8.redIAdd(jyd8); - jyd8 = jyd8.redIAdd(jyd8); - var ny = c.redMul(t2).redISub(jyd8); - var nz = jy.redAdd(jy).redMul(jz); - - return this.curve.jpoint(nx, ny, nz); -}; - -JPoint.prototype.trpl = function trpl() { - if (!this.curve.zeroA) - return this.dbl().add(this); - - // hyperelliptic.org/EFD/g1p/auto-shortw-jacobian-0.html#tripling-tpl-2007-bl - // 5M + 10S + ... - - // XX = X1^2 - var xx = this.x.redSqr(); - // YY = Y1^2 - var yy = this.y.redSqr(); - // ZZ = Z1^2 - var zz = this.z.redSqr(); - // YYYY = YY^2 - var yyyy = yy.redSqr(); - // M = 3 * XX + a * ZZ2; a = 0 - var m = xx.redAdd(xx).redIAdd(xx); - // MM = M^2 - var mm = m.redSqr(); - // E = 6 * ((X1 + YY)^2 - XX - YYYY) - MM - var e = this.x.redAdd(yy).redSqr().redISub(xx).redISub(yyyy); - e = e.redIAdd(e); - e = e.redAdd(e).redIAdd(e); - e = e.redISub(mm); - // EE = E^2 - var ee = e.redSqr(); - // T = 16*YYYY - var t = yyyy.redIAdd(yyyy); - t = t.redIAdd(t); - t = t.redIAdd(t); - t = t.redIAdd(t); - // U = (M + E)^2 - MM - EE - T - var u = m.redIAdd(e).redSqr().redISub(mm).redISub(ee).redISub(t); - // X3 = 4 * (X1 * EE - 4 * YY * U) - var yyu4 = yy.redMul(u); - yyu4 = yyu4.redIAdd(yyu4); - yyu4 = yyu4.redIAdd(yyu4); - var nx = this.x.redMul(ee).redISub(yyu4); - nx = nx.redIAdd(nx); - nx = nx.redIAdd(nx); - // Y3 = 8 * Y1 * (U * (T - U) - E * EE) - var ny = this.y.redMul(u.redMul(t.redISub(u)).redISub(e.redMul(ee))); - ny = ny.redIAdd(ny); - ny = ny.redIAdd(ny); - ny = ny.redIAdd(ny); - // Z3 = (Z1 + E)^2 - ZZ - EE - var nz = this.z.redAdd(e).redSqr().redISub(zz).redISub(ee); - - return this.curve.jpoint(nx, ny, nz); -}; - -JPoint.prototype.mul = function mul(k, kbase) { - k = new BN(k, kbase); - - return this.curve._wnafMul(this, k); -}; - -JPoint.prototype.eq = function eq(p) { - if (p.type === 'affine') - return this.eq(p.toJ()); - - if (this === p) - return true; - - // x1 * z2^2 == x2 * z1^2 - var z2 = this.z.redSqr(); - var pz2 = p.z.redSqr(); - if (this.x.redMul(pz2).redISub(p.x.redMul(z2)).cmpn(0) !== 0) - return false; - - // y1 * z2^3 == y2 * z1^3 - var z3 = z2.redMul(this.z); - var pz3 = pz2.redMul(p.z); - return this.y.redMul(pz3).redISub(p.y.redMul(z3)).cmpn(0) === 0; -}; - -JPoint.prototype.eqXToP = function eqXToP(x) { - var zs = this.z.redSqr(); - var rx = x.toRed(this.curve.red).redMul(zs); - if (this.x.cmp(rx) === 0) - return true; - - var xc = x.clone(); - var t = this.curve.redN.redMul(zs); - for (;;) { - xc.iadd(this.curve.n); - if (xc.cmp(this.curve.p) >= 0) - return false; - - rx.redIAdd(t); - if (this.x.cmp(rx) === 0) - return true; - } - return false; -}; - -JPoint.prototype.inspect = function inspect() { - if (this.isInfinity()) - return ''; - return ''; -}; - -JPoint.prototype.isInfinity = function isInfinity() { - // XXX This code assumes that zero is always zero in red - return this.z.cmpn(0) === 0; -}; diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/create-ecdh/node_modules/elliptic/lib/elliptic/curves.js b/node_modules/browserify/node_modules/crypto-browserify/node_modules/create-ecdh/node_modules/elliptic/lib/elliptic/curves.js deleted file mode 100644 index 1d8015b3..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/create-ecdh/node_modules/elliptic/lib/elliptic/curves.js +++ /dev/null @@ -1,205 +0,0 @@ -'use strict'; - -var curves = exports; - -var hash = require('hash.js'); -var elliptic = require('../elliptic'); - -var assert = elliptic.utils.assert; - -function PresetCurve(options) { - if (options.type === 'short') - this.curve = new elliptic.curve.short(options); - else if (options.type === 'edwards') - this.curve = new elliptic.curve.edwards(options); - else - this.curve = new elliptic.curve.mont(options); - this.g = this.curve.g; - this.n = this.curve.n; - this.hash = options.hash; - - assert(this.g.validate(), 'Invalid curve'); - assert(this.g.mul(this.n).isInfinity(), 'Invalid curve, G*N != O'); -} -curves.PresetCurve = PresetCurve; - -function defineCurve(name, options) { - Object.defineProperty(curves, name, { - configurable: true, - enumerable: true, - get: function() { - var curve = new PresetCurve(options); - Object.defineProperty(curves, name, { - configurable: true, - enumerable: true, - value: curve - }); - return curve; - } - }); -} - -defineCurve('p192', { - type: 'short', - prime: 'p192', - p: 'ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff', - a: 'ffffffff ffffffff ffffffff fffffffe ffffffff fffffffc', - b: '64210519 e59c80e7 0fa7e9ab 72243049 feb8deec c146b9b1', - n: 'ffffffff ffffffff ffffffff 99def836 146bc9b1 b4d22831', - hash: hash.sha256, - gRed: false, - g: [ - '188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012', - '07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811' - ] -}); - -defineCurve('p224', { - type: 'short', - prime: 'p224', - p: 'ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001', - a: 'ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff fffffffe', - b: 'b4050a85 0c04b3ab f5413256 5044b0b7 d7bfd8ba 270b3943 2355ffb4', - n: 'ffffffff ffffffff ffffffff ffff16a2 e0b8f03e 13dd2945 5c5c2a3d', - hash: hash.sha256, - gRed: false, - g: [ - 'b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21', - 'bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34' - ] -}); - -defineCurve('p256', { - type: 'short', - prime: null, - p: 'ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff ffffffff', - a: 'ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff fffffffc', - b: '5ac635d8 aa3a93e7 b3ebbd55 769886bc 651d06b0 cc53b0f6 3bce3c3e 27d2604b', - n: 'ffffffff 00000000 ffffffff ffffffff bce6faad a7179e84 f3b9cac2 fc632551', - hash: hash.sha256, - gRed: false, - g: [ - '6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296', - '4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5' - ] -}); - -defineCurve('p384', { - type: 'short', - prime: null, - p: 'ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ' + - 'fffffffe ffffffff 00000000 00000000 ffffffff', - a: 'ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ' + - 'fffffffe ffffffff 00000000 00000000 fffffffc', - b: 'b3312fa7 e23ee7e4 988e056b e3f82d19 181d9c6e fe814112 0314088f ' + - '5013875a c656398d 8a2ed19d 2a85c8ed d3ec2aef', - n: 'ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff c7634d81 ' + - 'f4372ddf 581a0db2 48b0a77a ecec196a ccc52973', - hash: hash.sha384, - gRed: false, - g: [ - 'aa87ca22 be8b0537 8eb1c71e f320ad74 6e1d3b62 8ba79b98 59f741e0 82542a38 ' + - '5502f25d bf55296c 3a545e38 72760ab7', - '3617de4a 96262c6f 5d9e98bf 9292dc29 f8f41dbd 289a147c e9da3113 b5f0b8c0 ' + - '0a60b1ce 1d7e819d 7a431d7c 90ea0e5f' - ] -}); - -defineCurve('p521', { - type: 'short', - prime: null, - p: '000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ' + - 'ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ' + - 'ffffffff ffffffff ffffffff ffffffff ffffffff', - a: '000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ' + - 'ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ' + - 'ffffffff ffffffff ffffffff ffffffff fffffffc', - b: '00000051 953eb961 8e1c9a1f 929a21a0 b68540ee a2da725b ' + - '99b315f3 b8b48991 8ef109e1 56193951 ec7e937b 1652c0bd ' + - '3bb1bf07 3573df88 3d2c34f1 ef451fd4 6b503f00', - n: '000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ' + - 'ffffffff ffffffff fffffffa 51868783 bf2f966b 7fcc0148 ' + - 'f709a5d0 3bb5c9b8 899c47ae bb6fb71e 91386409', - hash: hash.sha512, - gRed: false, - g: [ - '000000c6 858e06b7 0404e9cd 9e3ecb66 2395b442 9c648139 ' + - '053fb521 f828af60 6b4d3dba a14b5e77 efe75928 fe1dc127 ' + - 'a2ffa8de 3348b3c1 856a429b f97e7e31 c2e5bd66', - '00000118 39296a78 9a3bc004 5c8a5fb4 2c7d1bd9 98f54449 ' + - '579b4468 17afbd17 273e662c 97ee7299 5ef42640 c550b901 ' + - '3fad0761 353c7086 a272c240 88be9476 9fd16650' - ] -}); - -defineCurve('curve25519', { - type: 'mont', - prime: 'p25519', - p: '7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed', - a: '76d06', - b: '0', - n: '1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed', - hash: hash.sha256, - gRed: false, - g: [ - '9' - ] -}); - -defineCurve('ed25519', { - type: 'edwards', - prime: 'p25519', - p: '7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed', - a: '-1', - c: '1', - // -121665 * (121666^(-1)) (mod P) - d: '52036cee2b6ffe73 8cc740797779e898 00700a4d4141d8ab 75eb4dca135978a3', - n: '1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed', - hash: hash.sha256, - gRed: false, - g: [ - '216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a', - - // 4/5 - '6666666666666666666666666666666666666666666666666666666666666658' - ] -}); - -var pre; -try { - pre = require('./precomputed/secp256k1'); -} catch (e) { - pre = undefined; -} - -defineCurve('secp256k1', { - type: 'short', - prime: 'k256', - p: 'ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f', - a: '0', - b: '7', - n: 'ffffffff ffffffff ffffffff fffffffe baaedce6 af48a03b bfd25e8c d0364141', - h: '1', - hash: hash.sha256, - - // Precomputed endomorphism - beta: '7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee', - lambda: '5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72', - basis: [ - { - a: '3086d221a7d46bcde86c90e49284eb15', - b: '-e4437ed6010e88286f547fa90abfe4c3' - }, - { - a: '114ca50f7a8e2f3f657c1108d9d44cfd8', - b: '3086d221a7d46bcde86c90e49284eb15' - } - ], - - gRed: false, - g: [ - '79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798', - '483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8', - pre - ] -}); diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/create-ecdh/node_modules/elliptic/lib/elliptic/ec/index.js b/node_modules/browserify/node_modules/crypto-browserify/node_modules/create-ecdh/node_modules/elliptic/lib/elliptic/ec/index.js deleted file mode 100644 index d71d5df4..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/create-ecdh/node_modules/elliptic/lib/elliptic/ec/index.js +++ /dev/null @@ -1,237 +0,0 @@ -'use strict'; - -var BN = require('bn.js'); -var elliptic = require('../../elliptic'); -var utils = elliptic.utils; -var assert = utils.assert; - -var KeyPair = require('./key'); -var Signature = require('./signature'); - -function EC(options) { - if (!(this instanceof EC)) - return new EC(options); - - // Shortcut `elliptic.ec(curve-name)` - if (typeof options === 'string') { - assert(elliptic.curves.hasOwnProperty(options), 'Unknown curve ' + options); - - options = elliptic.curves[options]; - } - - // Shortcut for `elliptic.ec(elliptic.curves.curveName)` - if (options instanceof elliptic.curves.PresetCurve) - options = { curve: options }; - - this.curve = options.curve.curve; - this.n = this.curve.n; - this.nh = this.n.ushrn(1); - this.g = this.curve.g; - - // Point on curve - this.g = options.curve.g; - this.g.precompute(options.curve.n.bitLength() + 1); - - // Hash for function for DRBG - this.hash = options.hash || options.curve.hash; -} -module.exports = EC; - -EC.prototype.keyPair = function keyPair(options) { - return new KeyPair(this, options); -}; - -EC.prototype.keyFromPrivate = function keyFromPrivate(priv, enc) { - return KeyPair.fromPrivate(this, priv, enc); -}; - -EC.prototype.keyFromPublic = function keyFromPublic(pub, enc) { - return KeyPair.fromPublic(this, pub, enc); -}; - -EC.prototype.genKeyPair = function genKeyPair(options) { - if (!options) - options = {}; - - // Instantiate Hmac_DRBG - var drbg = new elliptic.hmacDRBG({ - hash: this.hash, - pers: options.pers, - entropy: options.entropy || elliptic.rand(this.hash.hmacStrength), - nonce: this.n.toArray() - }); - - var bytes = this.n.byteLength(); - var ns2 = this.n.sub(new BN(2)); - do { - var priv = new BN(drbg.generate(bytes)); - if (priv.cmp(ns2) > 0) - continue; - - priv.iaddn(1); - return this.keyFromPrivate(priv); - } while (true); -}; - -EC.prototype._truncateToN = function truncateToN(msg, truncOnly) { - var delta = msg.byteLength() * 8 - this.n.bitLength(); - if (delta > 0) - msg = msg.ushrn(delta); - if (!truncOnly && msg.cmp(this.n) >= 0) - return msg.sub(this.n); - else - return msg; -}; - -EC.prototype.sign = function sign(msg, key, enc, options) { - if (typeof enc === 'object') { - options = enc; - enc = null; - } - if (!options) - options = {}; - - key = this.keyFromPrivate(key, enc); - msg = this._truncateToN(new BN(msg, 16)); - - // Zero-extend key to provide enough entropy - var bytes = this.n.byteLength(); - var bkey = key.getPrivate().toArray('be', bytes); - - // Zero-extend nonce to have the same byte size as N - var nonce = msg.toArray('be', bytes); - - // Instantiate Hmac_DRBG - var drbg = new elliptic.hmacDRBG({ - hash: this.hash, - entropy: bkey, - nonce: nonce, - pers: options.pers, - persEnc: options.persEnc - }); - - // Number of bytes to generate - var ns1 = this.n.sub(new BN(1)); - - for (var iter = 0; true; iter++) { - var k = options.k ? - options.k(iter) : - new BN(drbg.generate(this.n.byteLength())); - k = this._truncateToN(k, true); - if (k.cmpn(1) <= 0 || k.cmp(ns1) >= 0) - continue; - - var kp = this.g.mul(k); - if (kp.isInfinity()) - continue; - - var kpX = kp.getX(); - var r = kpX.umod(this.n); - if (r.cmpn(0) === 0) - continue; - - var s = k.invm(this.n).mul(r.mul(key.getPrivate()).iadd(msg)); - s = s.umod(this.n); - if (s.cmpn(0) === 0) - continue; - - var recoveryParam = (kp.getY().isOdd() ? 1 : 0) | - (kpX.cmp(r) !== 0 ? 2 : 0); - - // Use complement of `s`, if it is > `n / 2` - if (options.canonical && s.cmp(this.nh) > 0) { - s = this.n.sub(s); - recoveryParam ^= 1; - } - - return new Signature({ r: r, s: s, recoveryParam: recoveryParam }); - } -}; - -EC.prototype.verify = function verify(msg, signature, key, enc) { - msg = this._truncateToN(new BN(msg, 16)); - key = this.keyFromPublic(key, enc); - signature = new Signature(signature, 'hex'); - - // Perform primitive values validation - var r = signature.r; - var s = signature.s; - if (r.cmpn(1) < 0 || r.cmp(this.n) >= 0) - return false; - if (s.cmpn(1) < 0 || s.cmp(this.n) >= 0) - return false; - - // Validate signature - var sinv = s.invm(this.n); - var u1 = sinv.mul(msg).umod(this.n); - var u2 = sinv.mul(r).umod(this.n); - - if (!this.curve._maxwellTrick) { - var p = this.g.mulAdd(u1, key.getPublic(), u2); - if (p.isInfinity()) - return false; - - return p.getX().umod(this.n).cmp(r) === 0; - } - - // NOTE: Greg Maxwell's trick, inspired by: - // https://git.io/vad3K - - var p = this.g.jmulAdd(u1, key.getPublic(), u2); - if (p.isInfinity()) - return false; - - // Compare `p.x` of Jacobian point with `r`, - // this will do `p.x == r * p.z^2` instead of multiplying `p.x` by the - // inverse of `p.z^2` - return p.eqXToP(r); -}; - -EC.prototype.recoverPubKey = function(msg, signature, j, enc) { - assert((3 & j) === j, 'The recovery param is more than two bits'); - signature = new Signature(signature, enc); - - var n = this.n; - var e = new BN(msg); - var r = signature.r; - var s = signature.s; - - // A set LSB signifies that the y-coordinate is odd - var isYOdd = j & 1; - var isSecondKey = j >> 1; - if (r.cmp(this.curve.p.umod(this.curve.n)) >= 0 && isSecondKey) - throw new Error('Unable to find sencond key candinate'); - - // 1.1. Let x = r + jn. - if (isSecondKey) - r = this.curve.pointFromX(r.add(this.curve.n), isYOdd); - else - r = this.curve.pointFromX(r, isYOdd); - - var rInv = signature.r.invm(n); - var s1 = n.sub(e).mul(rInv).umod(n); - var s2 = s.mul(rInv).umod(n); - - // 1.6.1 Compute Q = r^-1 (sR - eG) - // Q = r^-1 (sR + -eG) - return this.g.mulAdd(s1, r, s2); -}; - -EC.prototype.getKeyRecoveryParam = function(e, signature, Q, enc) { - signature = new Signature(signature, enc); - if (signature.recoveryParam !== null) - return signature.recoveryParam; - - for (var i = 0; i < 4; i++) { - var Qprime; - try { - Qprime = this.recoverPubKey(e, signature, i); - } catch (e) { - continue; - } - - if (Qprime.eq(Q)) - return i; - } - throw new Error('Unable to find valid recovery factor'); -}; diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/create-ecdh/node_modules/elliptic/lib/elliptic/ec/key.js b/node_modules/browserify/node_modules/crypto-browserify/node_modules/create-ecdh/node_modules/elliptic/lib/elliptic/ec/key.js deleted file mode 100644 index 8d075fb3..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/create-ecdh/node_modules/elliptic/lib/elliptic/ec/key.js +++ /dev/null @@ -1,107 +0,0 @@ -'use strict'; - -var BN = require('bn.js'); - -function KeyPair(ec, options) { - this.ec = ec; - this.priv = null; - this.pub = null; - - // KeyPair(ec, { priv: ..., pub: ... }) - if (options.priv) - this._importPrivate(options.priv, options.privEnc); - if (options.pub) - this._importPublic(options.pub, options.pubEnc); -} -module.exports = KeyPair; - -KeyPair.fromPublic = function fromPublic(ec, pub, enc) { - if (pub instanceof KeyPair) - return pub; - - return new KeyPair(ec, { - pub: pub, - pubEnc: enc - }); -}; - -KeyPair.fromPrivate = function fromPrivate(ec, priv, enc) { - if (priv instanceof KeyPair) - return priv; - - return new KeyPair(ec, { - priv: priv, - privEnc: enc - }); -}; - -KeyPair.prototype.validate = function validate() { - var pub = this.getPublic(); - - if (pub.isInfinity()) - return { result: false, reason: 'Invalid public key' }; - if (!pub.validate()) - return { result: false, reason: 'Public key is not a point' }; - if (!pub.mul(this.ec.curve.n).isInfinity()) - return { result: false, reason: 'Public key * N != O' }; - - return { result: true, reason: null }; -}; - -KeyPair.prototype.getPublic = function getPublic(compact, enc) { - // compact is optional argument - if (typeof compact === 'string') { - enc = compact; - compact = null; - } - - if (!this.pub) - this.pub = this.ec.g.mul(this.priv); - - if (!enc) - return this.pub; - - return this.pub.encode(enc, compact); -}; - -KeyPair.prototype.getPrivate = function getPrivate(enc) { - if (enc === 'hex') - return this.priv.toString(16, 2); - else - return this.priv; -}; - -KeyPair.prototype._importPrivate = function _importPrivate(key, enc) { - this.priv = new BN(key, enc || 16); - - // Ensure that the priv won't be bigger than n, otherwise we may fail - // in fixed multiplication method - this.priv = this.priv.umod(this.ec.curve.n); -}; - -KeyPair.prototype._importPublic = function _importPublic(key, enc) { - if (key.x || key.y) { - this.pub = this.ec.curve.point(key.x, key.y); - return; - } - this.pub = this.ec.curve.decodePoint(key, enc); -}; - -// ECDH -KeyPair.prototype.derive = function derive(pub) { - return pub.mul(this.priv).getX(); -}; - -// ECDSA -KeyPair.prototype.sign = function sign(msg, enc, options) { - return this.ec.sign(msg, this, enc, options); -}; - -KeyPair.prototype.verify = function verify(msg, signature) { - return this.ec.verify(msg, signature, this); -}; - -KeyPair.prototype.inspect = function inspect() { - return ''; -}; diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/create-ecdh/node_modules/elliptic/lib/elliptic/ec/signature.js b/node_modules/browserify/node_modules/crypto-browserify/node_modules/create-ecdh/node_modules/elliptic/lib/elliptic/ec/signature.js deleted file mode 100644 index 165b179a..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/create-ecdh/node_modules/elliptic/lib/elliptic/ec/signature.js +++ /dev/null @@ -1,135 +0,0 @@ -'use strict'; - -var BN = require('bn.js'); - -var elliptic = require('../../elliptic'); -var utils = elliptic.utils; -var assert = utils.assert; - -function Signature(options, enc) { - if (options instanceof Signature) - return options; - - if (this._importDER(options, enc)) - return; - - assert(options.r && options.s, 'Signature without r or s'); - this.r = new BN(options.r, 16); - this.s = new BN(options.s, 16); - if (options.recoveryParam === undefined) - this.recoveryParam = null; - else - this.recoveryParam = options.recoveryParam; -} -module.exports = Signature; - -function Position() { - this.place = 0; -} - -function getLength(buf, p) { - var initial = buf[p.place++]; - if (!(initial & 0x80)) { - return initial; - } - var octetLen = initial & 0xf; - var val = 0; - for (var i = 0, off = p.place; i < octetLen; i++, off++) { - val <<= 8; - val |= buf[off]; - } - p.place = off; - return val; -} - -function rmPadding(buf) { - var i = 0; - var len = buf.length - 1; - while (!buf[i] && !(buf[i + 1] & 0x80) && i < len) { - i++; - } - if (i === 0) { - return buf; - } - return buf.slice(i); -} - -Signature.prototype._importDER = function _importDER(data, enc) { - data = utils.toArray(data, enc); - var p = new Position(); - if (data[p.place++] !== 0x30) { - return false; - } - var len = getLength(data, p); - if ((len + p.place) !== data.length) { - return false; - } - if (data[p.place++] !== 0x02) { - return false; - } - var rlen = getLength(data, p); - var r = data.slice(p.place, rlen + p.place); - p.place += rlen; - if (data[p.place++] !== 0x02) { - return false; - } - var slen = getLength(data, p); - if (data.length !== slen + p.place) { - return false; - } - var s = data.slice(p.place, slen + p.place); - if (r[0] === 0 && (r[1] & 0x80)) { - r = r.slice(1); - } - if (s[0] === 0 && (s[1] & 0x80)) { - s = s.slice(1); - } - - this.r = new BN(r); - this.s = new BN(s); - this.recoveryParam = null; - - return true; -}; - -function constructLength(arr, len) { - if (len < 0x80) { - arr.push(len); - return; - } - var octets = 1 + (Math.log(len) / Math.LN2 >>> 3); - arr.push(octets | 0x80); - while (--octets) { - arr.push((len >>> (octets << 3)) & 0xff); - } - arr.push(len); -} - -Signature.prototype.toDER = function toDER(enc) { - var r = this.r.toArray(); - var s = this.s.toArray(); - - // Pad values - if (r[0] & 0x80) - r = [ 0 ].concat(r); - // Pad values - if (s[0] & 0x80) - s = [ 0 ].concat(s); - - r = rmPadding(r); - s = rmPadding(s); - - while (!s[0] && !(s[1] & 0x80)) { - s = s.slice(1); - } - var arr = [ 0x02 ]; - constructLength(arr, r.length); - arr = arr.concat(r); - arr.push(0x02); - constructLength(arr, s.length); - var backHalf = arr.concat(s); - var res = [ 0x30 ]; - constructLength(res, backHalf.length); - res = res.concat(backHalf); - return utils.encode(res, enc); -}; diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/create-ecdh/node_modules/elliptic/lib/elliptic/eddsa/index.js b/node_modules/browserify/node_modules/crypto-browserify/node_modules/create-ecdh/node_modules/elliptic/lib/elliptic/eddsa/index.js deleted file mode 100644 index b218a160..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/create-ecdh/node_modules/elliptic/lib/elliptic/eddsa/index.js +++ /dev/null @@ -1,118 +0,0 @@ -'use strict'; - -var hash = require('hash.js'); -var elliptic = require('../../elliptic'); -var utils = elliptic.utils; -var assert = utils.assert; -var parseBytes = utils.parseBytes; -var KeyPair = require('./key'); -var Signature = require('./signature'); - -function EDDSA(curve) { - assert(curve === 'ed25519', 'only tested with ed25519 so far'); - - if (!(this instanceof EDDSA)) - return new EDDSA(curve); - - var curve = elliptic.curves[curve].curve; - this.curve = curve; - this.g = curve.g; - this.g.precompute(curve.n.bitLength() + 1); - - this.pointClass = curve.point().constructor; - this.encodingLength = Math.ceil(curve.n.bitLength() / 8); - this.hash = hash.sha512; -} - -module.exports = EDDSA; - -/** -* @param {Array|String} message - message bytes -* @param {Array|String|KeyPair} secret - secret bytes or a keypair -* @returns {Signature} - signature -*/ -EDDSA.prototype.sign = function sign(message, secret) { - message = parseBytes(message); - var key = this.keyFromSecret(secret); - var r = this.hashInt(key.messagePrefix(), message); - var R = this.g.mul(r); - var Rencoded = this.encodePoint(R); - var s_ = this.hashInt(Rencoded, key.pubBytes(), message) - .mul(key.priv()); - var S = r.add(s_).umod(this.curve.n); - return this.makeSignature({ R: R, S: S, Rencoded: Rencoded }); -}; - -/** -* @param {Array} message - message bytes -* @param {Array|String|Signature} sig - sig bytes -* @param {Array|String|Point|KeyPair} pub - public key -* @returns {Boolean} - true if public key matches sig of message -*/ -EDDSA.prototype.verify = function verify(message, sig, pub) { - message = parseBytes(message); - sig = this.makeSignature(sig); - var key = this.keyFromPublic(pub); - var h = this.hashInt(sig.Rencoded(), key.pubBytes(), message); - var SG = this.g.mul(sig.S()); - var RplusAh = sig.R().add(key.pub().mul(h)); - return RplusAh.eq(SG); -}; - -EDDSA.prototype.hashInt = function hashInt() { - var hash = this.hash(); - for (var i = 0; i < arguments.length; i++) - hash.update(arguments[i]); - return utils.intFromLE(hash.digest()).umod(this.curve.n); -}; - -EDDSA.prototype.keyFromPublic = function keyFromPublic(pub) { - return KeyPair.fromPublic(this, pub); -}; - -EDDSA.prototype.keyFromSecret = function keyFromSecret(secret) { - return KeyPair.fromSecret(this, secret); -}; - -EDDSA.prototype.makeSignature = function makeSignature(sig) { - if (sig instanceof Signature) - return sig; - return new Signature(this, sig); -}; - -/** -* * https://tools.ietf.org/html/draft-josefsson-eddsa-ed25519-03#section-5.2 -* -* EDDSA defines methods for encoding and decoding points and integers. These are -* helper convenience methods, that pass along to utility functions implied -* parameters. -* -*/ -EDDSA.prototype.encodePoint = function encodePoint(point) { - var enc = point.getY().toArray('le', this.encodingLength); - enc[this.encodingLength - 1] |= point.getX().isOdd() ? 0x80 : 0; - return enc; -}; - -EDDSA.prototype.decodePoint = function decodePoint(bytes) { - bytes = utils.parseBytes(bytes); - - var lastIx = bytes.length - 1; - var normed = bytes.slice(0, lastIx).concat(bytes[lastIx] & ~0x80); - var xIsOdd = (bytes[lastIx] & 0x80) !== 0; - - var y = utils.intFromLE(normed); - return this.curve.pointFromY(y, xIsOdd); -}; - -EDDSA.prototype.encodeInt = function encodeInt(num) { - return num.toArray('le', this.encodingLength); -}; - -EDDSA.prototype.decodeInt = function decodeInt(bytes) { - return utils.intFromLE(bytes); -}; - -EDDSA.prototype.isPoint = function isPoint(val) { - return val instanceof this.pointClass; -}; diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/create-ecdh/node_modules/elliptic/lib/elliptic/eddsa/key.js b/node_modules/browserify/node_modules/crypto-browserify/node_modules/create-ecdh/node_modules/elliptic/lib/elliptic/eddsa/key.js deleted file mode 100644 index 5d5e1427..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/create-ecdh/node_modules/elliptic/lib/elliptic/eddsa/key.js +++ /dev/null @@ -1,96 +0,0 @@ -'use strict'; - -var elliptic = require('../../elliptic'); -var utils = elliptic.utils; -var assert = utils.assert; -var parseBytes = utils.parseBytes; -var cachedProperty = utils.cachedProperty; - -/** -* @param {EDDSA} eddsa - instance -* @param {Object} params - public/private key parameters -* -* @param {Array} [params.secret] - secret seed bytes -* @param {Point} [params.pub] - public key point (aka `A` in eddsa terms) -* @param {Array} [params.pub] - public key point encoded as bytes -* -*/ -function KeyPair(eddsa, params) { - this.eddsa = eddsa; - this._secret = parseBytes(params.secret); - if (eddsa.isPoint(params.pub)) - this._pub = params.pub; - else - this._pubBytes = parseBytes(params.pub); -} - -KeyPair.fromPublic = function fromPublic(eddsa, pub) { - if (pub instanceof KeyPair) - return pub; - return new KeyPair(eddsa, { pub: pub }); -}; - -KeyPair.fromSecret = function fromSecret(eddsa, secret) { - if (secret instanceof KeyPair) - return secret; - return new KeyPair(eddsa, { secret: secret }); -}; - -KeyPair.prototype.secret = function secret() { - return this._secret; -}; - -cachedProperty(KeyPair, 'pubBytes', function pubBytes() { - return this.eddsa.encodePoint(this.pub()); -}); - -cachedProperty(KeyPair, 'pub', function pub() { - if (this._pubBytes) - return this.eddsa.decodePoint(this._pubBytes); - return this.eddsa.g.mul(this.priv()); -}); - -cachedProperty(KeyPair, 'privBytes', function privBytes() { - var eddsa = this.eddsa; - var hash = this.hash(); - var lastIx = eddsa.encodingLength - 1; - - var a = hash.slice(0, eddsa.encodingLength); - a[0] &= 248; - a[lastIx] &= 127; - a[lastIx] |= 64; - - return a; -}); - -cachedProperty(KeyPair, 'priv', function priv() { - return this.eddsa.decodeInt(this.privBytes()); -}); - -cachedProperty(KeyPair, 'hash', function hash() { - return this.eddsa.hash().update(this.secret()).digest(); -}); - -cachedProperty(KeyPair, 'messagePrefix', function messagePrefix() { - return this.hash().slice(this.eddsa.encodingLength); -}); - -KeyPair.prototype.sign = function sign(message) { - assert(this._secret, 'KeyPair can only verify'); - return this.eddsa.sign(message, this); -}; - -KeyPair.prototype.verify = function verify(message, sig) { - return this.eddsa.verify(message, sig, this); -}; - -KeyPair.prototype.getSecret = function getSecret(enc) { - assert(this._secret, 'KeyPair is public only'); - return utils.encode(this.secret(), enc); -}; - -KeyPair.prototype.getPublic = function getPublic(enc) { - return utils.encode(this.pubBytes(), enc); -}; - -module.exports = KeyPair; diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/create-ecdh/node_modules/elliptic/lib/elliptic/eddsa/signature.js b/node_modules/browserify/node_modules/crypto-browserify/node_modules/create-ecdh/node_modules/elliptic/lib/elliptic/eddsa/signature.js deleted file mode 100644 index e944e815..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/create-ecdh/node_modules/elliptic/lib/elliptic/eddsa/signature.js +++ /dev/null @@ -1,66 +0,0 @@ -'use strict'; - -var BN = require('bn.js'); -var elliptic = require('../../elliptic'); -var utils = elliptic.utils; -var assert = utils.assert; -var cachedProperty = utils.cachedProperty; -var parseBytes = utils.parseBytes; - -/** -* @param {EDDSA} eddsa - eddsa instance -* @param {Array|Object} sig - -* @param {Array|Point} [sig.R] - R point as Point or bytes -* @param {Array|bn} [sig.S] - S scalar as bn or bytes -* @param {Array} [sig.Rencoded] - R point encoded -* @param {Array} [sig.Sencoded] - S scalar encoded -*/ -function Signature(eddsa, sig) { - this.eddsa = eddsa; - - if (typeof sig !== 'object') - sig = parseBytes(sig); - - if (Array.isArray(sig)) { - sig = { - R: sig.slice(0, eddsa.encodingLength), - S: sig.slice(eddsa.encodingLength) - }; - } - - assert(sig.R && sig.S, 'Signature without R or S'); - - if (eddsa.isPoint(sig.R)) - this._R = sig.R; - if (sig.S instanceof BN) - this._S = sig.S; - - this._Rencoded = Array.isArray(sig.R) ? sig.R : sig.Rencoded; - this._Sencoded = Array.isArray(sig.S) ? sig.S : sig.Sencoded; -} - -cachedProperty(Signature, 'S', function S() { - return this.eddsa.decodeInt(this.Sencoded()); -}); - -cachedProperty(Signature, 'R', function R() { - return this.eddsa.decodePoint(this.Rencoded()); -}); - -cachedProperty(Signature, 'Rencoded', function Rencoded() { - return this.eddsa.encodePoint(this.R()); -}); - -cachedProperty(Signature, 'Sencoded', function Sencoded() { - return this.eddsa.encodeInt(this.S()); -}); - -Signature.prototype.toBytes = function toBytes() { - return this.Rencoded().concat(this.Sencoded()); -}; - -Signature.prototype.toHex = function toHex() { - return utils.encode(this.toBytes(), 'hex').toUpperCase(); -}; - -module.exports = Signature; diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/create-ecdh/node_modules/elliptic/lib/elliptic/hmac-drbg.js b/node_modules/browserify/node_modules/crypto-browserify/node_modules/create-ecdh/node_modules/elliptic/lib/elliptic/hmac-drbg.js deleted file mode 100644 index ff63d2aa..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/create-ecdh/node_modules/elliptic/lib/elliptic/hmac-drbg.js +++ /dev/null @@ -1,114 +0,0 @@ -'use strict'; - -var hash = require('hash.js'); -var elliptic = require('../elliptic'); -var utils = elliptic.utils; -var assert = utils.assert; - -function HmacDRBG(options) { - if (!(this instanceof HmacDRBG)) - return new HmacDRBG(options); - this.hash = options.hash; - this.predResist = !!options.predResist; - - this.outLen = this.hash.outSize; - this.minEntropy = options.minEntropy || this.hash.hmacStrength; - - this.reseed = null; - this.reseedInterval = null; - this.K = null; - this.V = null; - - var entropy = utils.toArray(options.entropy, options.entropyEnc); - var nonce = utils.toArray(options.nonce, options.nonceEnc); - var pers = utils.toArray(options.pers, options.persEnc); - assert(entropy.length >= (this.minEntropy / 8), - 'Not enough entropy. Minimum is: ' + this.minEntropy + ' bits'); - this._init(entropy, nonce, pers); -} -module.exports = HmacDRBG; - -HmacDRBG.prototype._init = function init(entropy, nonce, pers) { - var seed = entropy.concat(nonce).concat(pers); - - this.K = new Array(this.outLen / 8); - this.V = new Array(this.outLen / 8); - for (var i = 0; i < this.V.length; i++) { - this.K[i] = 0x00; - this.V[i] = 0x01; - } - - this._update(seed); - this.reseed = 1; - this.reseedInterval = 0x1000000000000; // 2^48 -}; - -HmacDRBG.prototype._hmac = function hmac() { - return new hash.hmac(this.hash, this.K); -}; - -HmacDRBG.prototype._update = function update(seed) { - var kmac = this._hmac() - .update(this.V) - .update([ 0x00 ]); - if (seed) - kmac = kmac.update(seed); - this.K = kmac.digest(); - this.V = this._hmac().update(this.V).digest(); - if (!seed) - return; - - this.K = this._hmac() - .update(this.V) - .update([ 0x01 ]) - .update(seed) - .digest(); - this.V = this._hmac().update(this.V).digest(); -}; - -HmacDRBG.prototype.reseed = function reseed(entropy, entropyEnc, add, addEnc) { - // Optional entropy enc - if (typeof entropyEnc !== 'string') { - addEnc = add; - add = entropyEnc; - entropyEnc = null; - } - - entropy = utils.toBuffer(entropy, entropyEnc); - add = utils.toBuffer(add, addEnc); - - assert(entropy.length >= (this.minEntropy / 8), - 'Not enough entropy. Minimum is: ' + this.minEntropy + ' bits'); - - this._update(entropy.concat(add || [])); - this.reseed = 1; -}; - -HmacDRBG.prototype.generate = function generate(len, enc, add, addEnc) { - if (this.reseed > this.reseedInterval) - throw new Error('Reseed is required'); - - // Optional encoding - if (typeof enc !== 'string') { - addEnc = add; - add = enc; - enc = null; - } - - // Optional additional data - if (add) { - add = utils.toArray(add, addEnc); - this._update(add); - } - - var temp = []; - while (temp.length < len) { - this.V = this._hmac().update(this.V).digest(); - temp = temp.concat(this.V); - } - - var res = temp.slice(0, len); - this._update(add); - this.reseed++; - return utils.encode(res, enc); -}; diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/create-ecdh/node_modules/elliptic/lib/elliptic/precomputed/secp256k1.js b/node_modules/browserify/node_modules/crypto-browserify/node_modules/create-ecdh/node_modules/elliptic/lib/elliptic/precomputed/secp256k1.js deleted file mode 100644 index e4c91e54..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/create-ecdh/node_modules/elliptic/lib/elliptic/precomputed/secp256k1.js +++ /dev/null @@ -1,780 +0,0 @@ -module.exports = { - doubles: { - step: 4, - points: [ - [ - 'e60fce93b59e9ec53011aabc21c23e97b2a31369b87a5ae9c44ee89e2a6dec0a', - 'f7e3507399e595929db99f34f57937101296891e44d23f0be1f32cce69616821' - ], - [ - '8282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f51508', - '11f8a8098557dfe45e8256e830b60ace62d613ac2f7b17bed31b6eaff6e26caf' - ], - [ - '175e159f728b865a72f99cc6c6fc846de0b93833fd2222ed73fce5b551e5b739', - 'd3506e0d9e3c79eba4ef97a51ff71f5eacb5955add24345c6efa6ffee9fed695' - ], - [ - '363d90d447b00c9c99ceac05b6262ee053441c7e55552ffe526bad8f83ff4640', - '4e273adfc732221953b445397f3363145b9a89008199ecb62003c7f3bee9de9' - ], - [ - '8b4b5f165df3c2be8c6244b5b745638843e4a781a15bcd1b69f79a55dffdf80c', - '4aad0a6f68d308b4b3fbd7813ab0da04f9e336546162ee56b3eff0c65fd4fd36' - ], - [ - '723cbaa6e5db996d6bf771c00bd548c7b700dbffa6c0e77bcb6115925232fcda', - '96e867b5595cc498a921137488824d6e2660a0653779494801dc069d9eb39f5f' - ], - [ - 'eebfa4d493bebf98ba5feec812c2d3b50947961237a919839a533eca0e7dd7fa', - '5d9a8ca3970ef0f269ee7edaf178089d9ae4cdc3a711f712ddfd4fdae1de8999' - ], - [ - '100f44da696e71672791d0a09b7bde459f1215a29b3c03bfefd7835b39a48db0', - 'cdd9e13192a00b772ec8f3300c090666b7ff4a18ff5195ac0fbd5cd62bc65a09' - ], - [ - 'e1031be262c7ed1b1dc9227a4a04c017a77f8d4464f3b3852c8acde6e534fd2d', - '9d7061928940405e6bb6a4176597535af292dd419e1ced79a44f18f29456a00d' - ], - [ - 'feea6cae46d55b530ac2839f143bd7ec5cf8b266a41d6af52d5e688d9094696d', - 'e57c6b6c97dce1bab06e4e12bf3ecd5c981c8957cc41442d3155debf18090088' - ], - [ - 'da67a91d91049cdcb367be4be6ffca3cfeed657d808583de33fa978bc1ec6cb1', - '9bacaa35481642bc41f463f7ec9780e5dec7adc508f740a17e9ea8e27a68be1d' - ], - [ - '53904faa0b334cdda6e000935ef22151ec08d0f7bb11069f57545ccc1a37b7c0', - '5bc087d0bc80106d88c9eccac20d3c1c13999981e14434699dcb096b022771c8' - ], - [ - '8e7bcd0bd35983a7719cca7764ca906779b53a043a9b8bcaeff959f43ad86047', - '10b7770b2a3da4b3940310420ca9514579e88e2e47fd68b3ea10047e8460372a' - ], - [ - '385eed34c1cdff21e6d0818689b81bde71a7f4f18397e6690a841e1599c43862', - '283bebc3e8ea23f56701de19e9ebf4576b304eec2086dc8cc0458fe5542e5453' - ], - [ - '6f9d9b803ecf191637c73a4413dfa180fddf84a5947fbc9c606ed86c3fac3a7', - '7c80c68e603059ba69b8e2a30e45c4d47ea4dd2f5c281002d86890603a842160' - ], - [ - '3322d401243c4e2582a2147c104d6ecbf774d163db0f5e5313b7e0e742d0e6bd', - '56e70797e9664ef5bfb019bc4ddaf9b72805f63ea2873af624f3a2e96c28b2a0' - ], - [ - '85672c7d2de0b7da2bd1770d89665868741b3f9af7643397721d74d28134ab83', - '7c481b9b5b43b2eb6374049bfa62c2e5e77f17fcc5298f44c8e3094f790313a6' - ], - [ - '948bf809b1988a46b06c9f1919413b10f9226c60f668832ffd959af60c82a0a', - '53a562856dcb6646dc6b74c5d1c3418c6d4dff08c97cd2bed4cb7f88d8c8e589' - ], - [ - '6260ce7f461801c34f067ce0f02873a8f1b0e44dfc69752accecd819f38fd8e8', - 'bc2da82b6fa5b571a7f09049776a1ef7ecd292238051c198c1a84e95b2b4ae17' - ], - [ - 'e5037de0afc1d8d43d8348414bbf4103043ec8f575bfdc432953cc8d2037fa2d', - '4571534baa94d3b5f9f98d09fb990bddbd5f5b03ec481f10e0e5dc841d755bda' - ], - [ - 'e06372b0f4a207adf5ea905e8f1771b4e7e8dbd1c6a6c5b725866a0ae4fce725', - '7a908974bce18cfe12a27bb2ad5a488cd7484a7787104870b27034f94eee31dd' - ], - [ - '213c7a715cd5d45358d0bbf9dc0ce02204b10bdde2a3f58540ad6908d0559754', - '4b6dad0b5ae462507013ad06245ba190bb4850f5f36a7eeddff2c27534b458f2' - ], - [ - '4e7c272a7af4b34e8dbb9352a5419a87e2838c70adc62cddf0cc3a3b08fbd53c', - '17749c766c9d0b18e16fd09f6def681b530b9614bff7dd33e0b3941817dcaae6' - ], - [ - 'fea74e3dbe778b1b10f238ad61686aa5c76e3db2be43057632427e2840fb27b6', - '6e0568db9b0b13297cf674deccb6af93126b596b973f7b77701d3db7f23cb96f' - ], - [ - '76e64113f677cf0e10a2570d599968d31544e179b760432952c02a4417bdde39', - 'c90ddf8dee4e95cf577066d70681f0d35e2a33d2b56d2032b4b1752d1901ac01' - ], - [ - 'c738c56b03b2abe1e8281baa743f8f9a8f7cc643df26cbee3ab150242bcbb891', - '893fb578951ad2537f718f2eacbfbbbb82314eef7880cfe917e735d9699a84c3' - ], - [ - 'd895626548b65b81e264c7637c972877d1d72e5f3a925014372e9f6588f6c14b', - 'febfaa38f2bc7eae728ec60818c340eb03428d632bb067e179363ed75d7d991f' - ], - [ - 'b8da94032a957518eb0f6433571e8761ceffc73693e84edd49150a564f676e03', - '2804dfa44805a1e4d7c99cc9762808b092cc584d95ff3b511488e4e74efdf6e7' - ], - [ - 'e80fea14441fb33a7d8adab9475d7fab2019effb5156a792f1a11778e3c0df5d', - 'eed1de7f638e00771e89768ca3ca94472d155e80af322ea9fcb4291b6ac9ec78' - ], - [ - 'a301697bdfcd704313ba48e51d567543f2a182031efd6915ddc07bbcc4e16070', - '7370f91cfb67e4f5081809fa25d40f9b1735dbf7c0a11a130c0d1a041e177ea1' - ], - [ - '90ad85b389d6b936463f9d0512678de208cc330b11307fffab7ac63e3fb04ed4', - 'e507a3620a38261affdcbd9427222b839aefabe1582894d991d4d48cb6ef150' - ], - [ - '8f68b9d2f63b5f339239c1ad981f162ee88c5678723ea3351b7b444c9ec4c0da', - '662a9f2dba063986de1d90c2b6be215dbbea2cfe95510bfdf23cbf79501fff82' - ], - [ - 'e4f3fb0176af85d65ff99ff9198c36091f48e86503681e3e6686fd5053231e11', - '1e63633ad0ef4f1c1661a6d0ea02b7286cc7e74ec951d1c9822c38576feb73bc' - ], - [ - '8c00fa9b18ebf331eb961537a45a4266c7034f2f0d4e1d0716fb6eae20eae29e', - 'efa47267fea521a1a9dc343a3736c974c2fadafa81e36c54e7d2a4c66702414b' - ], - [ - 'e7a26ce69dd4829f3e10cec0a9e98ed3143d084f308b92c0997fddfc60cb3e41', - '2a758e300fa7984b471b006a1aafbb18d0a6b2c0420e83e20e8a9421cf2cfd51' - ], - [ - 'b6459e0ee3662ec8d23540c223bcbdc571cbcb967d79424f3cf29eb3de6b80ef', - '67c876d06f3e06de1dadf16e5661db3c4b3ae6d48e35b2ff30bf0b61a71ba45' - ], - [ - 'd68a80c8280bb840793234aa118f06231d6f1fc67e73c5a5deda0f5b496943e8', - 'db8ba9fff4b586d00c4b1f9177b0e28b5b0e7b8f7845295a294c84266b133120' - ], - [ - '324aed7df65c804252dc0270907a30b09612aeb973449cea4095980fc28d3d5d', - '648a365774b61f2ff130c0c35aec1f4f19213b0c7e332843967224af96ab7c84' - ], - [ - '4df9c14919cde61f6d51dfdbe5fee5dceec4143ba8d1ca888e8bd373fd054c96', - '35ec51092d8728050974c23a1d85d4b5d506cdc288490192ebac06cad10d5d' - ], - [ - '9c3919a84a474870faed8a9c1cc66021523489054d7f0308cbfc99c8ac1f98cd', - 'ddb84f0f4a4ddd57584f044bf260e641905326f76c64c8e6be7e5e03d4fc599d' - ], - [ - '6057170b1dd12fdf8de05f281d8e06bb91e1493a8b91d4cc5a21382120a959e5', - '9a1af0b26a6a4807add9a2daf71df262465152bc3ee24c65e899be932385a2a8' - ], - [ - 'a576df8e23a08411421439a4518da31880cef0fba7d4df12b1a6973eecb94266', - '40a6bf20e76640b2c92b97afe58cd82c432e10a7f514d9f3ee8be11ae1b28ec8' - ], - [ - '7778a78c28dec3e30a05fe9629de8c38bb30d1f5cf9a3a208f763889be58ad71', - '34626d9ab5a5b22ff7098e12f2ff580087b38411ff24ac563b513fc1fd9f43ac' - ], - [ - '928955ee637a84463729fd30e7afd2ed5f96274e5ad7e5cb09eda9c06d903ac', - 'c25621003d3f42a827b78a13093a95eeac3d26efa8a8d83fc5180e935bcd091f' - ], - [ - '85d0fef3ec6db109399064f3a0e3b2855645b4a907ad354527aae75163d82751', - '1f03648413a38c0be29d496e582cf5663e8751e96877331582c237a24eb1f962' - ], - [ - 'ff2b0dce97eece97c1c9b6041798b85dfdfb6d8882da20308f5404824526087e', - '493d13fef524ba188af4c4dc54d07936c7b7ed6fb90e2ceb2c951e01f0c29907' - ], - [ - '827fbbe4b1e880ea9ed2b2e6301b212b57f1ee148cd6dd28780e5e2cf856e241', - 'c60f9c923c727b0b71bef2c67d1d12687ff7a63186903166d605b68baec293ec' - ], - [ - 'eaa649f21f51bdbae7be4ae34ce6e5217a58fdce7f47f9aa7f3b58fa2120e2b3', - 'be3279ed5bbbb03ac69a80f89879aa5a01a6b965f13f7e59d47a5305ba5ad93d' - ], - [ - 'e4a42d43c5cf169d9391df6decf42ee541b6d8f0c9a137401e23632dda34d24f', - '4d9f92e716d1c73526fc99ccfb8ad34ce886eedfa8d8e4f13a7f7131deba9414' - ], - [ - '1ec80fef360cbdd954160fadab352b6b92b53576a88fea4947173b9d4300bf19', - 'aeefe93756b5340d2f3a4958a7abbf5e0146e77f6295a07b671cdc1cc107cefd' - ], - [ - '146a778c04670c2f91b00af4680dfa8bce3490717d58ba889ddb5928366642be', - 'b318e0ec3354028add669827f9d4b2870aaa971d2f7e5ed1d0b297483d83efd0' - ], - [ - 'fa50c0f61d22e5f07e3acebb1aa07b128d0012209a28b9776d76a8793180eef9', - '6b84c6922397eba9b72cd2872281a68a5e683293a57a213b38cd8d7d3f4f2811' - ], - [ - 'da1d61d0ca721a11b1a5bf6b7d88e8421a288ab5d5bba5220e53d32b5f067ec2', - '8157f55a7c99306c79c0766161c91e2966a73899d279b48a655fba0f1ad836f1' - ], - [ - 'a8e282ff0c9706907215ff98e8fd416615311de0446f1e062a73b0610d064e13', - '7f97355b8db81c09abfb7f3c5b2515888b679a3e50dd6bd6cef7c73111f4cc0c' - ], - [ - '174a53b9c9a285872d39e56e6913cab15d59b1fa512508c022f382de8319497c', - 'ccc9dc37abfc9c1657b4155f2c47f9e6646b3a1d8cb9854383da13ac079afa73' - ], - [ - '959396981943785c3d3e57edf5018cdbe039e730e4918b3d884fdff09475b7ba', - '2e7e552888c331dd8ba0386a4b9cd6849c653f64c8709385e9b8abf87524f2fd' - ], - [ - 'd2a63a50ae401e56d645a1153b109a8fcca0a43d561fba2dbb51340c9d82b151', - 'e82d86fb6443fcb7565aee58b2948220a70f750af484ca52d4142174dcf89405' - ], - [ - '64587e2335471eb890ee7896d7cfdc866bacbdbd3839317b3436f9b45617e073', - 'd99fcdd5bf6902e2ae96dd6447c299a185b90a39133aeab358299e5e9faf6589' - ], - [ - '8481bde0e4e4d885b3a546d3e549de042f0aa6cea250e7fd358d6c86dd45e458', - '38ee7b8cba5404dd84a25bf39cecb2ca900a79c42b262e556d64b1b59779057e' - ], - [ - '13464a57a78102aa62b6979ae817f4637ffcfed3c4b1ce30bcd6303f6caf666b', - '69be159004614580ef7e433453ccb0ca48f300a81d0942e13f495a907f6ecc27' - ], - [ - 'bc4a9df5b713fe2e9aef430bcc1dc97a0cd9ccede2f28588cada3a0d2d83f366', - 'd3a81ca6e785c06383937adf4b798caa6e8a9fbfa547b16d758d666581f33c1' - ], - [ - '8c28a97bf8298bc0d23d8c749452a32e694b65e30a9472a3954ab30fe5324caa', - '40a30463a3305193378fedf31f7cc0eb7ae784f0451cb9459e71dc73cbef9482' - ], - [ - '8ea9666139527a8c1dd94ce4f071fd23c8b350c5a4bb33748c4ba111faccae0', - '620efabbc8ee2782e24e7c0cfb95c5d735b783be9cf0f8e955af34a30e62b945' - ], - [ - 'dd3625faef5ba06074669716bbd3788d89bdde815959968092f76cc4eb9a9787', - '7a188fa3520e30d461da2501045731ca941461982883395937f68d00c644a573' - ], - [ - 'f710d79d9eb962297e4f6232b40e8f7feb2bc63814614d692c12de752408221e', - 'ea98e67232d3b3295d3b535532115ccac8612c721851617526ae47a9c77bfc82' - ] - ] - }, - naf: { - wnd: 7, - points: [ - [ - 'f9308a019258c31049344f85f89d5229b531c845836f99b08601f113bce036f9', - '388f7b0f632de8140fe337e62a37f3566500a99934c2231b6cb9fd7584b8e672' - ], - [ - '2f8bde4d1a07209355b4a7250a5c5128e88b84bddc619ab7cba8d569b240efe4', - 'd8ac222636e5e3d6d4dba9dda6c9c426f788271bab0d6840dca87d3aa6ac62d6' - ], - [ - '5cbdf0646e5db4eaa398f365f2ea7a0e3d419b7e0330e39ce92bddedcac4f9bc', - '6aebca40ba255960a3178d6d861a54dba813d0b813fde7b5a5082628087264da' - ], - [ - 'acd484e2f0c7f65309ad178a9f559abde09796974c57e714c35f110dfc27ccbe', - 'cc338921b0a7d9fd64380971763b61e9add888a4375f8e0f05cc262ac64f9c37' - ], - [ - '774ae7f858a9411e5ef4246b70c65aac5649980be5c17891bbec17895da008cb', - 'd984a032eb6b5e190243dd56d7b7b365372db1e2dff9d6a8301d74c9c953c61b' - ], - [ - 'f28773c2d975288bc7d1d205c3748651b075fbc6610e58cddeeddf8f19405aa8', - 'ab0902e8d880a89758212eb65cdaf473a1a06da521fa91f29b5cb52db03ed81' - ], - [ - 'd7924d4f7d43ea965a465ae3095ff41131e5946f3c85f79e44adbcf8e27e080e', - '581e2872a86c72a683842ec228cc6defea40af2bd896d3a5c504dc9ff6a26b58' - ], - [ - 'defdea4cdb677750a420fee807eacf21eb9898ae79b9768766e4faa04a2d4a34', - '4211ab0694635168e997b0ead2a93daeced1f4a04a95c0f6cfb199f69e56eb77' - ], - [ - '2b4ea0a797a443d293ef5cff444f4979f06acfebd7e86d277475656138385b6c', - '85e89bc037945d93b343083b5a1c86131a01f60c50269763b570c854e5c09b7a' - ], - [ - '352bbf4a4cdd12564f93fa332ce333301d9ad40271f8107181340aef25be59d5', - '321eb4075348f534d59c18259dda3e1f4a1b3b2e71b1039c67bd3d8bcf81998c' - ], - [ - '2fa2104d6b38d11b0230010559879124e42ab8dfeff5ff29dc9cdadd4ecacc3f', - '2de1068295dd865b64569335bd5dd80181d70ecfc882648423ba76b532b7d67' - ], - [ - '9248279b09b4d68dab21a9b066edda83263c3d84e09572e269ca0cd7f5453714', - '73016f7bf234aade5d1aa71bdea2b1ff3fc0de2a887912ffe54a32ce97cb3402' - ], - [ - 'daed4f2be3a8bf278e70132fb0beb7522f570e144bf615c07e996d443dee8729', - 'a69dce4a7d6c98e8d4a1aca87ef8d7003f83c230f3afa726ab40e52290be1c55' - ], - [ - 'c44d12c7065d812e8acf28d7cbb19f9011ecd9e9fdf281b0e6a3b5e87d22e7db', - '2119a460ce326cdc76c45926c982fdac0e106e861edf61c5a039063f0e0e6482' - ], - [ - '6a245bf6dc698504c89a20cfded60853152b695336c28063b61c65cbd269e6b4', - 'e022cf42c2bd4a708b3f5126f16a24ad8b33ba48d0423b6efd5e6348100d8a82' - ], - [ - '1697ffa6fd9de627c077e3d2fe541084ce13300b0bec1146f95ae57f0d0bd6a5', - 'b9c398f186806f5d27561506e4557433a2cf15009e498ae7adee9d63d01b2396' - ], - [ - '605bdb019981718b986d0f07e834cb0d9deb8360ffb7f61df982345ef27a7479', - '2972d2de4f8d20681a78d93ec96fe23c26bfae84fb14db43b01e1e9056b8c49' - ], - [ - '62d14dab4150bf497402fdc45a215e10dcb01c354959b10cfe31c7e9d87ff33d', - '80fc06bd8cc5b01098088a1950eed0db01aa132967ab472235f5642483b25eaf' - ], - [ - '80c60ad0040f27dade5b4b06c408e56b2c50e9f56b9b8b425e555c2f86308b6f', - '1c38303f1cc5c30f26e66bad7fe72f70a65eed4cbe7024eb1aa01f56430bd57a' - ], - [ - '7a9375ad6167ad54aa74c6348cc54d344cc5dc9487d847049d5eabb0fa03c8fb', - 'd0e3fa9eca8726909559e0d79269046bdc59ea10c70ce2b02d499ec224dc7f7' - ], - [ - 'd528ecd9b696b54c907a9ed045447a79bb408ec39b68df504bb51f459bc3ffc9', - 'eecf41253136e5f99966f21881fd656ebc4345405c520dbc063465b521409933' - ], - [ - '49370a4b5f43412ea25f514e8ecdad05266115e4a7ecb1387231808f8b45963', - '758f3f41afd6ed428b3081b0512fd62a54c3f3afbb5b6764b653052a12949c9a' - ], - [ - '77f230936ee88cbbd73df930d64702ef881d811e0e1498e2f1c13eb1fc345d74', - '958ef42a7886b6400a08266e9ba1b37896c95330d97077cbbe8eb3c7671c60d6' - ], - [ - 'f2dac991cc4ce4b9ea44887e5c7c0bce58c80074ab9d4dbaeb28531b7739f530', - 'e0dedc9b3b2f8dad4da1f32dec2531df9eb5fbeb0598e4fd1a117dba703a3c37' - ], - [ - '463b3d9f662621fb1b4be8fbbe2520125a216cdfc9dae3debcba4850c690d45b', - '5ed430d78c296c3543114306dd8622d7c622e27c970a1de31cb377b01af7307e' - ], - [ - 'f16f804244e46e2a09232d4aff3b59976b98fac14328a2d1a32496b49998f247', - 'cedabd9b82203f7e13d206fcdf4e33d92a6c53c26e5cce26d6579962c4e31df6' - ], - [ - 'caf754272dc84563b0352b7a14311af55d245315ace27c65369e15f7151d41d1', - 'cb474660ef35f5f2a41b643fa5e460575f4fa9b7962232a5c32f908318a04476' - ], - [ - '2600ca4b282cb986f85d0f1709979d8b44a09c07cb86d7c124497bc86f082120', - '4119b88753c15bd6a693b03fcddbb45d5ac6be74ab5f0ef44b0be9475a7e4b40' - ], - [ - '7635ca72d7e8432c338ec53cd12220bc01c48685e24f7dc8c602a7746998e435', - '91b649609489d613d1d5e590f78e6d74ecfc061d57048bad9e76f302c5b9c61' - ], - [ - '754e3239f325570cdbbf4a87deee8a66b7f2b33479d468fbc1a50743bf56cc18', - '673fb86e5bda30fb3cd0ed304ea49a023ee33d0197a695d0c5d98093c536683' - ], - [ - 'e3e6bd1071a1e96aff57859c82d570f0330800661d1c952f9fe2694691d9b9e8', - '59c9e0bba394e76f40c0aa58379a3cb6a5a2283993e90c4167002af4920e37f5' - ], - [ - '186b483d056a033826ae73d88f732985c4ccb1f32ba35f4b4cc47fdcf04aa6eb', - '3b952d32c67cf77e2e17446e204180ab21fb8090895138b4a4a797f86e80888b' - ], - [ - 'df9d70a6b9876ce544c98561f4be4f725442e6d2b737d9c91a8321724ce0963f', - '55eb2dafd84d6ccd5f862b785dc39d4ab157222720ef9da217b8c45cf2ba2417' - ], - [ - '5edd5cc23c51e87a497ca815d5dce0f8ab52554f849ed8995de64c5f34ce7143', - 'efae9c8dbc14130661e8cec030c89ad0c13c66c0d17a2905cdc706ab7399a868' - ], - [ - '290798c2b6476830da12fe02287e9e777aa3fba1c355b17a722d362f84614fba', - 'e38da76dcd440621988d00bcf79af25d5b29c094db2a23146d003afd41943e7a' - ], - [ - 'af3c423a95d9f5b3054754efa150ac39cd29552fe360257362dfdecef4053b45', - 'f98a3fd831eb2b749a93b0e6f35cfb40c8cd5aa667a15581bc2feded498fd9c6' - ], - [ - '766dbb24d134e745cccaa28c99bf274906bb66b26dcf98df8d2fed50d884249a', - '744b1152eacbe5e38dcc887980da38b897584a65fa06cedd2c924f97cbac5996' - ], - [ - '59dbf46f8c94759ba21277c33784f41645f7b44f6c596a58ce92e666191abe3e', - 'c534ad44175fbc300f4ea6ce648309a042ce739a7919798cd85e216c4a307f6e' - ], - [ - 'f13ada95103c4537305e691e74e9a4a8dd647e711a95e73cb62dc6018cfd87b8', - 'e13817b44ee14de663bf4bc808341f326949e21a6a75c2570778419bdaf5733d' - ], - [ - '7754b4fa0e8aced06d4167a2c59cca4cda1869c06ebadfb6488550015a88522c', - '30e93e864e669d82224b967c3020b8fa8d1e4e350b6cbcc537a48b57841163a2' - ], - [ - '948dcadf5990e048aa3874d46abef9d701858f95de8041d2a6828c99e2262519', - 'e491a42537f6e597d5d28a3224b1bc25df9154efbd2ef1d2cbba2cae5347d57e' - ], - [ - '7962414450c76c1689c7b48f8202ec37fb224cf5ac0bfa1570328a8a3d7c77ab', - '100b610ec4ffb4760d5c1fc133ef6f6b12507a051f04ac5760afa5b29db83437' - ], - [ - '3514087834964b54b15b160644d915485a16977225b8847bb0dd085137ec47ca', - 'ef0afbb2056205448e1652c48e8127fc6039e77c15c2378b7e7d15a0de293311' - ], - [ - 'd3cc30ad6b483e4bc79ce2c9dd8bc54993e947eb8df787b442943d3f7b527eaf', - '8b378a22d827278d89c5e9be8f9508ae3c2ad46290358630afb34db04eede0a4' - ], - [ - '1624d84780732860ce1c78fcbfefe08b2b29823db913f6493975ba0ff4847610', - '68651cf9b6da903e0914448c6cd9d4ca896878f5282be4c8cc06e2a404078575' - ], - [ - '733ce80da955a8a26902c95633e62a985192474b5af207da6df7b4fd5fc61cd4', - 'f5435a2bd2badf7d485a4d8b8db9fcce3e1ef8e0201e4578c54673bc1dc5ea1d' - ], - [ - '15d9441254945064cf1a1c33bbd3b49f8966c5092171e699ef258dfab81c045c', - 'd56eb30b69463e7234f5137b73b84177434800bacebfc685fc37bbe9efe4070d' - ], - [ - 'a1d0fcf2ec9de675b612136e5ce70d271c21417c9d2b8aaaac138599d0717940', - 'edd77f50bcb5a3cab2e90737309667f2641462a54070f3d519212d39c197a629' - ], - [ - 'e22fbe15c0af8ccc5780c0735f84dbe9a790badee8245c06c7ca37331cb36980', - 'a855babad5cd60c88b430a69f53a1a7a38289154964799be43d06d77d31da06' - ], - [ - '311091dd9860e8e20ee13473c1155f5f69635e394704eaa74009452246cfa9b3', - '66db656f87d1f04fffd1f04788c06830871ec5a64feee685bd80f0b1286d8374' - ], - [ - '34c1fd04d301be89b31c0442d3e6ac24883928b45a9340781867d4232ec2dbdf', - '9414685e97b1b5954bd46f730174136d57f1ceeb487443dc5321857ba73abee' - ], - [ - 'f219ea5d6b54701c1c14de5b557eb42a8d13f3abbcd08affcc2a5e6b049b8d63', - '4cb95957e83d40b0f73af4544cccf6b1f4b08d3c07b27fb8d8c2962a400766d1' - ], - [ - 'd7b8740f74a8fbaab1f683db8f45de26543a5490bca627087236912469a0b448', - 'fa77968128d9c92ee1010f337ad4717eff15db5ed3c049b3411e0315eaa4593b' - ], - [ - '32d31c222f8f6f0ef86f7c98d3a3335ead5bcd32abdd94289fe4d3091aa824bf', - '5f3032f5892156e39ccd3d7915b9e1da2e6dac9e6f26e961118d14b8462e1661' - ], - [ - '7461f371914ab32671045a155d9831ea8793d77cd59592c4340f86cbc18347b5', - '8ec0ba238b96bec0cbdddcae0aa442542eee1ff50c986ea6b39847b3cc092ff6' - ], - [ - 'ee079adb1df1860074356a25aa38206a6d716b2c3e67453d287698bad7b2b2d6', - '8dc2412aafe3be5c4c5f37e0ecc5f9f6a446989af04c4e25ebaac479ec1c8c1e' - ], - [ - '16ec93e447ec83f0467b18302ee620f7e65de331874c9dc72bfd8616ba9da6b5', - '5e4631150e62fb40d0e8c2a7ca5804a39d58186a50e497139626778e25b0674d' - ], - [ - 'eaa5f980c245f6f038978290afa70b6bd8855897f98b6aa485b96065d537bd99', - 'f65f5d3e292c2e0819a528391c994624d784869d7e6ea67fb18041024edc07dc' - ], - [ - '78c9407544ac132692ee1910a02439958ae04877151342ea96c4b6b35a49f51', - 'f3e0319169eb9b85d5404795539a5e68fa1fbd583c064d2462b675f194a3ddb4' - ], - [ - '494f4be219a1a77016dcd838431aea0001cdc8ae7a6fc688726578d9702857a5', - '42242a969283a5f339ba7f075e36ba2af925ce30d767ed6e55f4b031880d562c' - ], - [ - 'a598a8030da6d86c6bc7f2f5144ea549d28211ea58faa70ebf4c1e665c1fe9b5', - '204b5d6f84822c307e4b4a7140737aec23fc63b65b35f86a10026dbd2d864e6b' - ], - [ - 'c41916365abb2b5d09192f5f2dbeafec208f020f12570a184dbadc3e58595997', - '4f14351d0087efa49d245b328984989d5caf9450f34bfc0ed16e96b58fa9913' - ], - [ - '841d6063a586fa475a724604da03bc5b92a2e0d2e0a36acfe4c73a5514742881', - '73867f59c0659e81904f9a1c7543698e62562d6744c169ce7a36de01a8d6154' - ], - [ - '5e95bb399a6971d376026947f89bde2f282b33810928be4ded112ac4d70e20d5', - '39f23f366809085beebfc71181313775a99c9aed7d8ba38b161384c746012865' - ], - [ - '36e4641a53948fd476c39f8a99fd974e5ec07564b5315d8bf99471bca0ef2f66', - 'd2424b1b1abe4eb8164227b085c9aa9456ea13493fd563e06fd51cf5694c78fc' - ], - [ - '336581ea7bfbbb290c191a2f507a41cf5643842170e914faeab27c2c579f726', - 'ead12168595fe1be99252129b6e56b3391f7ab1410cd1e0ef3dcdcabd2fda224' - ], - [ - '8ab89816dadfd6b6a1f2634fcf00ec8403781025ed6890c4849742706bd43ede', - '6fdcef09f2f6d0a044e654aef624136f503d459c3e89845858a47a9129cdd24e' - ], - [ - '1e33f1a746c9c5778133344d9299fcaa20b0938e8acff2544bb40284b8c5fb94', - '60660257dd11b3aa9c8ed618d24edff2306d320f1d03010e33a7d2057f3b3b6' - ], - [ - '85b7c1dcb3cec1b7ee7f30ded79dd20a0ed1f4cc18cbcfcfa410361fd8f08f31', - '3d98a9cdd026dd43f39048f25a8847f4fcafad1895d7a633c6fed3c35e999511' - ], - [ - '29df9fbd8d9e46509275f4b125d6d45d7fbe9a3b878a7af872a2800661ac5f51', - 'b4c4fe99c775a606e2d8862179139ffda61dc861c019e55cd2876eb2a27d84b' - ], - [ - 'a0b1cae06b0a847a3fea6e671aaf8adfdfe58ca2f768105c8082b2e449fce252', - 'ae434102edde0958ec4b19d917a6a28e6b72da1834aff0e650f049503a296cf2' - ], - [ - '4e8ceafb9b3e9a136dc7ff67e840295b499dfb3b2133e4ba113f2e4c0e121e5', - 'cf2174118c8b6d7a4b48f6d534ce5c79422c086a63460502b827ce62a326683c' - ], - [ - 'd24a44e047e19b6f5afb81c7ca2f69080a5076689a010919f42725c2b789a33b', - '6fb8d5591b466f8fc63db50f1c0f1c69013f996887b8244d2cdec417afea8fa3' - ], - [ - 'ea01606a7a6c9cdd249fdfcfacb99584001edd28abbab77b5104e98e8e3b35d4', - '322af4908c7312b0cfbfe369f7a7b3cdb7d4494bc2823700cfd652188a3ea98d' - ], - [ - 'af8addbf2b661c8a6c6328655eb96651252007d8c5ea31be4ad196de8ce2131f', - '6749e67c029b85f52a034eafd096836b2520818680e26ac8f3dfbcdb71749700' - ], - [ - 'e3ae1974566ca06cc516d47e0fb165a674a3dabcfca15e722f0e3450f45889', - '2aeabe7e4531510116217f07bf4d07300de97e4874f81f533420a72eeb0bd6a4' - ], - [ - '591ee355313d99721cf6993ffed1e3e301993ff3ed258802075ea8ced397e246', - 'b0ea558a113c30bea60fc4775460c7901ff0b053d25ca2bdeee98f1a4be5d196' - ], - [ - '11396d55fda54c49f19aa97318d8da61fa8584e47b084945077cf03255b52984', - '998c74a8cd45ac01289d5833a7beb4744ff536b01b257be4c5767bea93ea57a4' - ], - [ - '3c5d2a1ba39c5a1790000738c9e0c40b8dcdfd5468754b6405540157e017aa7a', - 'b2284279995a34e2f9d4de7396fc18b80f9b8b9fdd270f6661f79ca4c81bd257' - ], - [ - 'cc8704b8a60a0defa3a99a7299f2e9c3fbc395afb04ac078425ef8a1793cc030', - 'bdd46039feed17881d1e0862db347f8cf395b74fc4bcdc4e940b74e3ac1f1b13' - ], - [ - 'c533e4f7ea8555aacd9777ac5cad29b97dd4defccc53ee7ea204119b2889b197', - '6f0a256bc5efdf429a2fb6242f1a43a2d9b925bb4a4b3a26bb8e0f45eb596096' - ], - [ - 'c14f8f2ccb27d6f109f6d08d03cc96a69ba8c34eec07bbcf566d48e33da6593', - 'c359d6923bb398f7fd4473e16fe1c28475b740dd098075e6c0e8649113dc3a38' - ], - [ - 'a6cbc3046bc6a450bac24789fa17115a4c9739ed75f8f21ce441f72e0b90e6ef', - '21ae7f4680e889bb130619e2c0f95a360ceb573c70603139862afd617fa9b9f' - ], - [ - '347d6d9a02c48927ebfb86c1359b1caf130a3c0267d11ce6344b39f99d43cc38', - '60ea7f61a353524d1c987f6ecec92f086d565ab687870cb12689ff1e31c74448' - ], - [ - 'da6545d2181db8d983f7dcb375ef5866d47c67b1bf31c8cf855ef7437b72656a', - '49b96715ab6878a79e78f07ce5680c5d6673051b4935bd897fea824b77dc208a' - ], - [ - 'c40747cc9d012cb1a13b8148309c6de7ec25d6945d657146b9d5994b8feb1111', - '5ca560753be2a12fc6de6caf2cb489565db936156b9514e1bb5e83037e0fa2d4' - ], - [ - '4e42c8ec82c99798ccf3a610be870e78338c7f713348bd34c8203ef4037f3502', - '7571d74ee5e0fb92a7a8b33a07783341a5492144cc54bcc40a94473693606437' - ], - [ - '3775ab7089bc6af823aba2e1af70b236d251cadb0c86743287522a1b3b0dedea', - 'be52d107bcfa09d8bcb9736a828cfa7fac8db17bf7a76a2c42ad961409018cf7' - ], - [ - 'cee31cbf7e34ec379d94fb814d3d775ad954595d1314ba8846959e3e82f74e26', - '8fd64a14c06b589c26b947ae2bcf6bfa0149ef0be14ed4d80f448a01c43b1c6d' - ], - [ - 'b4f9eaea09b6917619f6ea6a4eb5464efddb58fd45b1ebefcdc1a01d08b47986', - '39e5c9925b5a54b07433a4f18c61726f8bb131c012ca542eb24a8ac07200682a' - ], - [ - 'd4263dfc3d2df923a0179a48966d30ce84e2515afc3dccc1b77907792ebcc60e', - '62dfaf07a0f78feb30e30d6295853ce189e127760ad6cf7fae164e122a208d54' - ], - [ - '48457524820fa65a4f8d35eb6930857c0032acc0a4a2de422233eeda897612c4', - '25a748ab367979d98733c38a1fa1c2e7dc6cc07db2d60a9ae7a76aaa49bd0f77' - ], - [ - 'dfeeef1881101f2cb11644f3a2afdfc2045e19919152923f367a1767c11cceda', - 'ecfb7056cf1de042f9420bab396793c0c390bde74b4bbdff16a83ae09a9a7517' - ], - [ - '6d7ef6b17543f8373c573f44e1f389835d89bcbc6062ced36c82df83b8fae859', - 'cd450ec335438986dfefa10c57fea9bcc521a0959b2d80bbf74b190dca712d10' - ], - [ - 'e75605d59102a5a2684500d3b991f2e3f3c88b93225547035af25af66e04541f', - 'f5c54754a8f71ee540b9b48728473e314f729ac5308b06938360990e2bfad125' - ], - [ - 'eb98660f4c4dfaa06a2be453d5020bc99a0c2e60abe388457dd43fefb1ed620c', - '6cb9a8876d9cb8520609af3add26cd20a0a7cd8a9411131ce85f44100099223e' - ], - [ - '13e87b027d8514d35939f2e6892b19922154596941888336dc3563e3b8dba942', - 'fef5a3c68059a6dec5d624114bf1e91aac2b9da568d6abeb2570d55646b8adf1' - ], - [ - 'ee163026e9fd6fe017c38f06a5be6fc125424b371ce2708e7bf4491691e5764a', - '1acb250f255dd61c43d94ccc670d0f58f49ae3fa15b96623e5430da0ad6c62b2' - ], - [ - 'b268f5ef9ad51e4d78de3a750c2dc89b1e626d43505867999932e5db33af3d80', - '5f310d4b3c99b9ebb19f77d41c1dee018cf0d34fd4191614003e945a1216e423' - ], - [ - 'ff07f3118a9df035e9fad85eb6c7bfe42b02f01ca99ceea3bf7ffdba93c4750d', - '438136d603e858a3a5c440c38eccbaddc1d2942114e2eddd4740d098ced1f0d8' - ], - [ - '8d8b9855c7c052a34146fd20ffb658bea4b9f69e0d825ebec16e8c3ce2b526a1', - 'cdb559eedc2d79f926baf44fb84ea4d44bcf50fee51d7ceb30e2e7f463036758' - ], - [ - '52db0b5384dfbf05bfa9d472d7ae26dfe4b851ceca91b1eba54263180da32b63', - 'c3b997d050ee5d423ebaf66a6db9f57b3180c902875679de924b69d84a7b375' - ], - [ - 'e62f9490d3d51da6395efd24e80919cc7d0f29c3f3fa48c6fff543becbd43352', - '6d89ad7ba4876b0b22c2ca280c682862f342c8591f1daf5170e07bfd9ccafa7d' - ], - [ - '7f30ea2476b399b4957509c88f77d0191afa2ff5cb7b14fd6d8e7d65aaab1193', - 'ca5ef7d4b231c94c3b15389a5f6311e9daff7bb67b103e9880ef4bff637acaec' - ], - [ - '5098ff1e1d9f14fb46a210fada6c903fef0fb7b4a1dd1d9ac60a0361800b7a00', - '9731141d81fc8f8084d37c6e7542006b3ee1b40d60dfe5362a5b132fd17ddc0' - ], - [ - '32b78c7de9ee512a72895be6b9cbefa6e2f3c4ccce445c96b9f2c81e2778ad58', - 'ee1849f513df71e32efc3896ee28260c73bb80547ae2275ba497237794c8753c' - ], - [ - 'e2cb74fddc8e9fbcd076eef2a7c72b0ce37d50f08269dfc074b581550547a4f7', - 'd3aa2ed71c9dd2247a62df062736eb0baddea9e36122d2be8641abcb005cc4a4' - ], - [ - '8438447566d4d7bedadc299496ab357426009a35f235cb141be0d99cd10ae3a8', - 'c4e1020916980a4da5d01ac5e6ad330734ef0d7906631c4f2390426b2edd791f' - ], - [ - '4162d488b89402039b584c6fc6c308870587d9c46f660b878ab65c82c711d67e', - '67163e903236289f776f22c25fb8a3afc1732f2b84b4e95dbda47ae5a0852649' - ], - [ - '3fad3fa84caf0f34f0f89bfd2dcf54fc175d767aec3e50684f3ba4a4bf5f683d', - 'cd1bc7cb6cc407bb2f0ca647c718a730cf71872e7d0d2a53fa20efcdfe61826' - ], - [ - '674f2600a3007a00568c1a7ce05d0816c1fb84bf1370798f1c69532faeb1a86b', - '299d21f9413f33b3edf43b257004580b70db57da0b182259e09eecc69e0d38a5' - ], - [ - 'd32f4da54ade74abb81b815ad1fb3b263d82d6c692714bcff87d29bd5ee9f08f', - 'f9429e738b8e53b968e99016c059707782e14f4535359d582fc416910b3eea87' - ], - [ - '30e4e670435385556e593657135845d36fbb6931f72b08cb1ed954f1e3ce3ff6', - '462f9bce619898638499350113bbc9b10a878d35da70740dc695a559eb88db7b' - ], - [ - 'be2062003c51cc3004682904330e4dee7f3dcd10b01e580bf1971b04d4cad297', - '62188bc49d61e5428573d48a74e1c655b1c61090905682a0d5558ed72dccb9bc' - ], - [ - '93144423ace3451ed29e0fb9ac2af211cb6e84a601df5993c419859fff5df04a', - '7c10dfb164c3425f5c71a3f9d7992038f1065224f72bb9d1d902a6d13037b47c' - ], - [ - 'b015f8044f5fcbdcf21ca26d6c34fb8197829205c7b7d2a7cb66418c157b112c', - 'ab8c1e086d04e813744a655b2df8d5f83b3cdc6faa3088c1d3aea1454e3a1d5f' - ], - [ - 'd5e9e1da649d97d89e4868117a465a3a4f8a18de57a140d36b3f2af341a21b52', - '4cb04437f391ed73111a13cc1d4dd0db1693465c2240480d8955e8592f27447a' - ], - [ - 'd3ae41047dd7ca065dbf8ed77b992439983005cd72e16d6f996a5316d36966bb', - 'bd1aeb21ad22ebb22a10f0303417c6d964f8cdd7df0aca614b10dc14d125ac46' - ], - [ - '463e2763d885f958fc66cdd22800f0a487197d0a82e377b49f80af87c897b065', - 'bfefacdb0e5d0fd7df3a311a94de062b26b80c61fbc97508b79992671ef7ca7f' - ], - [ - '7985fdfd127c0567c6f53ec1bb63ec3158e597c40bfe747c83cddfc910641917', - '603c12daf3d9862ef2b25fe1de289aed24ed291e0ec6708703a5bd567f32ed03' - ], - [ - '74a1ad6b5f76e39db2dd249410eac7f99e74c59cb83d2d0ed5ff1543da7703e9', - 'cc6157ef18c9c63cd6193d83631bbea0093e0968942e8c33d5737fd790e0db08' - ], - [ - '30682a50703375f602d416664ba19b7fc9bab42c72747463a71d0896b22f6da3', - '553e04f6b018b4fa6c8f39e7f311d3176290d0e0f19ca73f17714d9977a22ff8' - ], - [ - '9e2158f0d7c0d5f26c3791efefa79597654e7a2b2464f52b1ee6c1347769ef57', - '712fcdd1b9053f09003a3481fa7762e9ffd7c8ef35a38509e2fbf2629008373' - ], - [ - '176e26989a43c9cfeba4029c202538c28172e566e3c4fce7322857f3be327d66', - 'ed8cc9d04b29eb877d270b4878dc43c19aefd31f4eee09ee7b47834c1fa4b1c3' - ], - [ - '75d46efea3771e6e68abb89a13ad747ecf1892393dfc4f1b7004788c50374da8', - '9852390a99507679fd0b86fd2b39a868d7efc22151346e1a3ca4726586a6bed8' - ], - [ - '809a20c67d64900ffb698c4c825f6d5f2310fb0451c869345b7319f645605721', - '9e994980d9917e22b76b061927fa04143d096ccc54963e6a5ebfa5f3f8e286c1' - ], - [ - '1b38903a43f7f114ed4500b4eac7083fdefece1cf29c63528d563446f972c180', - '4036edc931a60ae889353f77fd53de4a2708b26b6f5da72ad3394119daf408f9' - ] - ] - } -}; diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/create-ecdh/node_modules/elliptic/lib/elliptic/utils.js b/node_modules/browserify/node_modules/crypto-browserify/node_modules/create-ecdh/node_modules/elliptic/lib/elliptic/utils.js deleted file mode 100644 index 89ed3e8b..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/create-ecdh/node_modules/elliptic/lib/elliptic/utils.js +++ /dev/null @@ -1,172 +0,0 @@ -'use strict'; - -var utils = exports; -var BN = require('bn.js'); - -utils.assert = function assert(val, msg) { - if (!val) - throw new Error(msg || 'Assertion failed'); -}; - -function toArray(msg, enc) { - if (Array.isArray(msg)) - return msg.slice(); - if (!msg) - return []; - var res = []; - if (typeof msg !== 'string') { - for (var i = 0; i < msg.length; i++) - res[i] = msg[i] | 0; - return res; - } - if (!enc) { - for (var i = 0; i < msg.length; i++) { - var c = msg.charCodeAt(i); - var hi = c >> 8; - var lo = c & 0xff; - if (hi) - res.push(hi, lo); - else - res.push(lo); - } - } else if (enc === 'hex') { - msg = msg.replace(/[^a-z0-9]+/ig, ''); - if (msg.length % 2 !== 0) - msg = '0' + msg; - for (var i = 0; i < msg.length; i += 2) - res.push(parseInt(msg[i] + msg[i + 1], 16)); - } - return res; -} -utils.toArray = toArray; - -function zero2(word) { - if (word.length === 1) - return '0' + word; - else - return word; -} -utils.zero2 = zero2; - -function toHex(msg) { - var res = ''; - for (var i = 0; i < msg.length; i++) - res += zero2(msg[i].toString(16)); - return res; -} -utils.toHex = toHex; - -utils.encode = function encode(arr, enc) { - if (enc === 'hex') - return toHex(arr); - else - return arr; -}; - -// Represent num in a w-NAF form -function getNAF(num, w) { - var naf = []; - var ws = 1 << (w + 1); - var k = num.clone(); - while (k.cmpn(1) >= 0) { - var z; - if (k.isOdd()) { - var mod = k.andln(ws - 1); - if (mod > (ws >> 1) - 1) - z = (ws >> 1) - mod; - else - z = mod; - k.isubn(z); - } else { - z = 0; - } - naf.push(z); - - // Optimization, shift by word if possible - var shift = (k.cmpn(0) !== 0 && k.andln(ws - 1) === 0) ? (w + 1) : 1; - for (var i = 1; i < shift; i++) - naf.push(0); - k.iushrn(shift); - } - - return naf; -} -utils.getNAF = getNAF; - -// Represent k1, k2 in a Joint Sparse Form -function getJSF(k1, k2) { - var jsf = [ - [], - [] - ]; - - k1 = k1.clone(); - k2 = k2.clone(); - var d1 = 0; - var d2 = 0; - while (k1.cmpn(-d1) > 0 || k2.cmpn(-d2) > 0) { - - // First phase - var m14 = (k1.andln(3) + d1) & 3; - var m24 = (k2.andln(3) + d2) & 3; - if (m14 === 3) - m14 = -1; - if (m24 === 3) - m24 = -1; - var u1; - if ((m14 & 1) === 0) { - u1 = 0; - } else { - var m8 = (k1.andln(7) + d1) & 7; - if ((m8 === 3 || m8 === 5) && m24 === 2) - u1 = -m14; - else - u1 = m14; - } - jsf[0].push(u1); - - var u2; - if ((m24 & 1) === 0) { - u2 = 0; - } else { - var m8 = (k2.andln(7) + d2) & 7; - if ((m8 === 3 || m8 === 5) && m14 === 2) - u2 = -m24; - else - u2 = m24; - } - jsf[1].push(u2); - - // Second phase - if (2 * d1 === u1 + 1) - d1 = 1 - d1; - if (2 * d2 === u2 + 1) - d2 = 1 - d2; - k1.iushrn(1); - k2.iushrn(1); - } - - return jsf; -} -utils.getJSF = getJSF; - -function cachedProperty(obj, name, computer) { - var key = '_' + name; - obj.prototype[name] = function cachedProperty() { - return this[key] !== undefined ? this[key] : - this[key] = computer.call(this); - }; -} -utils.cachedProperty = cachedProperty; - -function parseBytes(bytes) { - return typeof bytes === 'string' ? utils.toArray(bytes, 'hex') : - bytes; -} -utils.parseBytes = parseBytes; - -function intFromLE(bytes) { - return new BN(bytes, 'hex', 'le'); -} -utils.intFromLE = intFromLE; - diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/create-ecdh/node_modules/elliptic/node_modules/brorand/.npmignore b/node_modules/browserify/node_modules/crypto-browserify/node_modules/create-ecdh/node_modules/elliptic/node_modules/brorand/.npmignore deleted file mode 100644 index 1ca95717..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/create-ecdh/node_modules/elliptic/node_modules/brorand/.npmignore +++ /dev/null @@ -1,2 +0,0 @@ -node_modules/ -npm-debug.log diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/create-ecdh/node_modules/elliptic/node_modules/brorand/README.md b/node_modules/browserify/node_modules/crypto-browserify/node_modules/create-ecdh/node_modules/elliptic/node_modules/brorand/README.md deleted file mode 100644 index f80437d1..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/create-ecdh/node_modules/elliptic/node_modules/brorand/README.md +++ /dev/null @@ -1,26 +0,0 @@ -# Brorand - -#### LICENSE - -This software is licensed under the MIT License. - -Copyright Fedor Indutny, 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/node_modules/browserify/node_modules/crypto-browserify/node_modules/create-ecdh/node_modules/elliptic/node_modules/brorand/index.js b/node_modules/browserify/node_modules/crypto-browserify/node_modules/create-ecdh/node_modules/elliptic/node_modules/brorand/index.js deleted file mode 100644 index 17f08555..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/create-ecdh/node_modules/elliptic/node_modules/brorand/index.js +++ /dev/null @@ -1,57 +0,0 @@ -var r; - -module.exports = function rand(len) { - if (!r) - r = new Rand(null); - - return r.generate(len); -}; - -function Rand(rand) { - this.rand = rand; -} -module.exports.Rand = Rand; - -Rand.prototype.generate = function generate(len) { - return this._rand(len); -}; - -if (typeof window === 'object') { - if (window.crypto && window.crypto.getRandomValues) { - // Modern browsers - Rand.prototype._rand = function _rand(n) { - var arr = new Uint8Array(n); - window.crypto.getRandomValues(arr); - return arr; - }; - } else if (window.msCrypto && window.msCrypto.getRandomValues) { - // IE - Rand.prototype._rand = function _rand(n) { - var arr = new Uint8Array(n); - window.msCrypto.getRandomValues(arr); - return arr; - }; - } else { - // Old junk - Rand.prototype._rand = function() { - throw new Error('Not implemented yet'); - }; - } -} else { - // Node.js or Web worker - try { - var crypto = require('crypto'); - - Rand.prototype._rand = function _rand(n) { - return crypto.randomBytes(n); - }; - } catch (e) { - // Emulate crypto API using randy - Rand.prototype._rand = function _rand(n) { - var res = new Uint8Array(n); - for (var i = 0; i < res.length; i++) - res[i] = this.rand.getByte(); - return res; - }; - } -} diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/create-ecdh/node_modules/elliptic/node_modules/brorand/package.json b/node_modules/browserify/node_modules/crypto-browserify/node_modules/create-ecdh/node_modules/elliptic/node_modules/brorand/package.json deleted file mode 100644 index f88fbe3b..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/create-ecdh/node_modules/elliptic/node_modules/brorand/package.json +++ /dev/null @@ -1,61 +0,0 @@ -{ - "name": "brorand", - "version": "1.0.6", - "description": "Random number generator for browsers and node.js", - "main": "index.js", - "scripts": { - "test": "mocha --reporter=spec test/**/*-test.js" - }, - "repository": { - "type": "git", - "url": "git+ssh://git@github.com/indutny/brorand.git" - }, - "keywords": [ - "Random", - "RNG", - "browser", - "crypto" - ], - "author": { - "name": "Fedor Indutny", - "email": "fedor@indutny.com" - }, - "license": "MIT", - "bugs": { - "url": "https://github.com/indutny/brorand/issues" - }, - "homepage": "https://github.com/indutny/brorand", - "devDependencies": { - "mocha": "^2.0.1" - }, - "browser": { - "crypto": false - }, - "gitHead": "f077f0a95c627f2707d7b7699ccddca308a58d15", - "_id": "brorand@1.0.6", - "_shasum": "4028706b915f91f7b349a2e0bf3c376039d216e5", - "_from": "brorand@>=1.0.1 <2.0.0", - "_npmVersion": "3.10.3", - "_nodeVersion": "6.3.0", - "_npmUser": { - "name": "indutny", - "email": "fedor@indutny.com" - }, - "dist": { - "shasum": "4028706b915f91f7b349a2e0bf3c376039d216e5", - "tarball": "https://registry.npmjs.org/brorand/-/brorand-1.0.6.tgz" - }, - "maintainers": [ - { - "name": "indutny", - "email": "fedor@indutny.com" - } - ], - "_npmOperationalInternal": { - "host": "packages-12-west.internal.npmjs.com", - "tmp": "tmp/brorand-1.0.6.tgz_1473323651066_0.41867022518999875" - }, - "directories": {}, - "_resolved": "https://registry.npmjs.org/brorand/-/brorand-1.0.6.tgz", - "readme": "ERROR: No README data found!" -} diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/create-ecdh/node_modules/elliptic/node_modules/brorand/test/api-test.js b/node_modules/browserify/node_modules/crypto-browserify/node_modules/create-ecdh/node_modules/elliptic/node_modules/brorand/test/api-test.js deleted file mode 100644 index b6c876d3..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/create-ecdh/node_modules/elliptic/node_modules/brorand/test/api-test.js +++ /dev/null @@ -1,8 +0,0 @@ -var brorand = require('../'); -var assert = require('assert'); - -describe('Brorand', function() { - it('should generate random numbers', function() { - assert.equal(brorand(100).length, 100); - }); -}); diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/create-ecdh/node_modules/elliptic/node_modules/hash.js/.npmignore b/node_modules/browserify/node_modules/crypto-browserify/node_modules/create-ecdh/node_modules/elliptic/node_modules/hash.js/.npmignore deleted file mode 100644 index 1ca95717..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/create-ecdh/node_modules/elliptic/node_modules/hash.js/.npmignore +++ /dev/null @@ -1,2 +0,0 @@ -node_modules/ -npm-debug.log diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/create-ecdh/node_modules/elliptic/node_modules/hash.js/.travis.yml b/node_modules/browserify/node_modules/crypto-browserify/node_modules/create-ecdh/node_modules/elliptic/node_modules/hash.js/.travis.yml deleted file mode 100644 index 92a990f6..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/create-ecdh/node_modules/elliptic/node_modules/hash.js/.travis.yml +++ /dev/null @@ -1,7 +0,0 @@ -language: node_js -node_js: - - "0.10" - - "0.11" -branches: - only: - - master diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/create-ecdh/node_modules/elliptic/node_modules/hash.js/README.md b/node_modules/browserify/node_modules/crypto-browserify/node_modules/create-ecdh/node_modules/elliptic/node_modules/hash.js/README.md deleted file mode 100644 index 63107cbe..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/create-ecdh/node_modules/elliptic/node_modules/hash.js/README.md +++ /dev/null @@ -1,28 +0,0 @@ -# hash.js [![Build Status](https://secure.travis-ci.org/indutny/hash.js.png)](http://travis-ci.org/indutny/hash.js) - -Just a bike-shed. - -#### LICENSE - -This software is licensed under the MIT License. - -Copyright Fedor Indutny, 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/node_modules/browserify/node_modules/crypto-browserify/node_modules/create-ecdh/node_modules/elliptic/node_modules/hash.js/lib/hash.js b/node_modules/browserify/node_modules/crypto-browserify/node_modules/create-ecdh/node_modules/elliptic/node_modules/hash.js/lib/hash.js deleted file mode 100644 index f59b6730..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/create-ecdh/node_modules/elliptic/node_modules/hash.js/lib/hash.js +++ /dev/null @@ -1,15 +0,0 @@ -var hash = exports; - -hash.utils = require('./hash/utils'); -hash.common = require('./hash/common'); -hash.sha = require('./hash/sha'); -hash.ripemd = require('./hash/ripemd'); -hash.hmac = require('./hash/hmac'); - -// Proxy hash functions to the main object -hash.sha1 = hash.sha.sha1; -hash.sha256 = hash.sha.sha256; -hash.sha224 = hash.sha.sha224; -hash.sha384 = hash.sha.sha384; -hash.sha512 = hash.sha.sha512; -hash.ripemd160 = hash.ripemd.ripemd160; diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/create-ecdh/node_modules/elliptic/node_modules/hash.js/lib/hash/common.js b/node_modules/browserify/node_modules/crypto-browserify/node_modules/create-ecdh/node_modules/elliptic/node_modules/hash.js/lib/hash/common.js deleted file mode 100644 index a052c55f..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/create-ecdh/node_modules/elliptic/node_modules/hash.js/lib/hash/common.js +++ /dev/null @@ -1,91 +0,0 @@ -var hash = require('../hash'); -var utils = hash.utils; -var assert = utils.assert; - -function BlockHash() { - this.pending = null; - this.pendingTotal = 0; - this.blockSize = this.constructor.blockSize; - this.outSize = this.constructor.outSize; - this.hmacStrength = this.constructor.hmacStrength; - this.padLength = this.constructor.padLength / 8; - this.endian = 'big'; - - this._delta8 = this.blockSize / 8; - this._delta32 = this.blockSize / 32; -} -exports.BlockHash = BlockHash; - -BlockHash.prototype.update = function update(msg, enc) { - // Convert message to array, pad it, and join into 32bit blocks - msg = utils.toArray(msg, enc); - if (!this.pending) - this.pending = msg; - else - this.pending = this.pending.concat(msg); - this.pendingTotal += msg.length; - - // Enough data, try updating - if (this.pending.length >= this._delta8) { - msg = this.pending; - - // Process pending data in blocks - var r = msg.length % this._delta8; - this.pending = msg.slice(msg.length - r, msg.length); - if (this.pending.length === 0) - this.pending = null; - - msg = utils.join32(msg, 0, msg.length - r, this.endian); - for (var i = 0; i < msg.length; i += this._delta32) - this._update(msg, i, i + this._delta32); - } - - return this; -}; - -BlockHash.prototype.digest = function digest(enc) { - this.update(this._pad()); - assert(this.pending === null); - - return this._digest(enc); -}; - -BlockHash.prototype._pad = function pad() { - var len = this.pendingTotal; - var bytes = this._delta8; - var k = bytes - ((len + this.padLength) % bytes); - var res = new Array(k + this.padLength); - res[0] = 0x80; - for (var i = 1; i < k; i++) - res[i] = 0; - - // Append length - len <<= 3; - if (this.endian === 'big') { - for (var t = 8; t < this.padLength; t++) - res[i++] = 0; - - res[i++] = 0; - res[i++] = 0; - res[i++] = 0; - res[i++] = 0; - res[i++] = (len >>> 24) & 0xff; - res[i++] = (len >>> 16) & 0xff; - res[i++] = (len >>> 8) & 0xff; - res[i++] = len & 0xff; - } else { - res[i++] = len & 0xff; - res[i++] = (len >>> 8) & 0xff; - res[i++] = (len >>> 16) & 0xff; - res[i++] = (len >>> 24) & 0xff; - res[i++] = 0; - res[i++] = 0; - res[i++] = 0; - res[i++] = 0; - - for (var t = 8; t < this.padLength; t++) - res[i++] = 0; - } - - return res; -}; diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/create-ecdh/node_modules/elliptic/node_modules/hash.js/lib/hash/hmac.js b/node_modules/browserify/node_modules/crypto-browserify/node_modules/create-ecdh/node_modules/elliptic/node_modules/hash.js/lib/hash/hmac.js deleted file mode 100644 index 3a3da972..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/create-ecdh/node_modules/elliptic/node_modules/hash.js/lib/hash/hmac.js +++ /dev/null @@ -1,48 +0,0 @@ -var hmac = exports; - -var hash = require('../hash'); -var utils = hash.utils; -var assert = utils.assert; - -function Hmac(hash, key, enc) { - if (!(this instanceof Hmac)) - return new Hmac(hash, key, enc); - this.Hash = hash; - this.blockSize = hash.blockSize / 8; - this.outSize = hash.outSize / 8; - this.inner = null; - this.outer = null; - - this._init(utils.toArray(key, enc)); -} -module.exports = Hmac; - -Hmac.prototype._init = function init(key) { - // Shorten key, if needed - if (key.length > this.blockSize) - key = new this.Hash().update(key).digest(); - assert(key.length <= this.blockSize); - - // Add padding to key - for (var i = key.length; i < this.blockSize; i++) - key.push(0); - - for (var i = 0; i < key.length; i++) - key[i] ^= 0x36; - this.inner = new this.Hash().update(key); - - // 0x36 ^ 0x5c = 0x6a - for (var i = 0; i < key.length; i++) - key[i] ^= 0x6a; - this.outer = new this.Hash().update(key); -}; - -Hmac.prototype.update = function update(msg, enc) { - this.inner.update(msg, enc); - return this; -}; - -Hmac.prototype.digest = function digest(enc) { - this.outer.update(this.inner.digest()); - return this.outer.digest(enc); -}; diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/create-ecdh/node_modules/elliptic/node_modules/hash.js/lib/hash/ripemd.js b/node_modules/browserify/node_modules/crypto-browserify/node_modules/create-ecdh/node_modules/elliptic/node_modules/hash.js/lib/hash/ripemd.js deleted file mode 100644 index cd55bfc7..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/create-ecdh/node_modules/elliptic/node_modules/hash.js/lib/hash/ripemd.js +++ /dev/null @@ -1,144 +0,0 @@ -var hash = require('../hash'); -var utils = hash.utils; - -var rotl32 = utils.rotl32; -var sum32 = utils.sum32; -var sum32_3 = utils.sum32_3; -var sum32_4 = utils.sum32_4; -var BlockHash = hash.common.BlockHash; - -function RIPEMD160() { - if (!(this instanceof RIPEMD160)) - return new RIPEMD160(); - - BlockHash.call(this); - - this.h = [ 0x67452301, 0xefcdab89, 0x98badcfe, 0x10325476, 0xc3d2e1f0 ]; - this.endian = 'little'; -} -utils.inherits(RIPEMD160, BlockHash); -exports.ripemd160 = RIPEMD160; - -RIPEMD160.blockSize = 512; -RIPEMD160.outSize = 160; -RIPEMD160.hmacStrength = 192; -RIPEMD160.padLength = 64; - -RIPEMD160.prototype._update = function update(msg, start) { - var A = this.h[0]; - var B = this.h[1]; - var C = this.h[2]; - var D = this.h[3]; - var E = this.h[4]; - var Ah = A; - var Bh = B; - var Ch = C; - var Dh = D; - var Eh = E; - for (var j = 0; j < 80; j++) { - var T = sum32( - rotl32( - sum32_4(A, f(j, B, C, D), msg[r[j] + start], K(j)), - s[j]), - E); - A = E; - E = D; - D = rotl32(C, 10); - C = B; - B = T; - T = sum32( - rotl32( - sum32_4(Ah, f(79 - j, Bh, Ch, Dh), msg[rh[j] + start], Kh(j)), - sh[j]), - Eh); - Ah = Eh; - Eh = Dh; - Dh = rotl32(Ch, 10); - Ch = Bh; - Bh = T; - } - T = sum32_3(this.h[1], C, Dh); - this.h[1] = sum32_3(this.h[2], D, Eh); - this.h[2] = sum32_3(this.h[3], E, Ah); - this.h[3] = sum32_3(this.h[4], A, Bh); - this.h[4] = sum32_3(this.h[0], B, Ch); - this.h[0] = T; -}; - -RIPEMD160.prototype._digest = function digest(enc) { - if (enc === 'hex') - return utils.toHex32(this.h, 'little'); - else - return utils.split32(this.h, 'little'); -}; - -function f(j, x, y, z) { - if (j <= 15) - return x ^ y ^ z; - else if (j <= 31) - return (x & y) | ((~x) & z); - else if (j <= 47) - return (x | (~y)) ^ z; - else if (j <= 63) - return (x & z) | (y & (~z)); - else - return x ^ (y | (~z)); -} - -function K(j) { - if (j <= 15) - return 0x00000000; - else if (j <= 31) - return 0x5a827999; - else if (j <= 47) - return 0x6ed9eba1; - else if (j <= 63) - return 0x8f1bbcdc; - else - return 0xa953fd4e; -} - -function Kh(j) { - if (j <= 15) - return 0x50a28be6; - else if (j <= 31) - return 0x5c4dd124; - else if (j <= 47) - return 0x6d703ef3; - else if (j <= 63) - return 0x7a6d76e9; - else - return 0x00000000; -} - -var r = [ - 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, - 7, 4, 13, 1, 10, 6, 15, 3, 12, 0, 9, 5, 2, 14, 11, 8, - 3, 10, 14, 4, 9, 15, 8, 1, 2, 7, 0, 6, 13, 11, 5, 12, - 1, 9, 11, 10, 0, 8, 12, 4, 13, 3, 7, 15, 14, 5, 6, 2, - 4, 0, 5, 9, 7, 12, 2, 10, 14, 1, 3, 8, 11, 6, 15, 13 -]; - -var rh = [ - 5, 14, 7, 0, 9, 2, 11, 4, 13, 6, 15, 8, 1, 10, 3, 12, - 6, 11, 3, 7, 0, 13, 5, 10, 14, 15, 8, 12, 4, 9, 1, 2, - 15, 5, 1, 3, 7, 14, 6, 9, 11, 8, 12, 2, 10, 0, 4, 13, - 8, 6, 4, 1, 3, 11, 15, 0, 5, 12, 2, 13, 9, 7, 10, 14, - 12, 15, 10, 4, 1, 5, 8, 7, 6, 2, 13, 14, 0, 3, 9, 11 -]; - -var s = [ - 11, 14, 15, 12, 5, 8, 7, 9, 11, 13, 14, 15, 6, 7, 9, 8, - 7, 6, 8, 13, 11, 9, 7, 15, 7, 12, 15, 9, 11, 7, 13, 12, - 11, 13, 6, 7, 14, 9, 13, 15, 14, 8, 13, 6, 5, 12, 7, 5, - 11, 12, 14, 15, 14, 15, 9, 8, 9, 14, 5, 6, 8, 6, 5, 12, - 9, 15, 5, 11, 6, 8, 13, 12, 5, 12, 13, 14, 11, 8, 5, 6 -]; - -var sh = [ - 8, 9, 9, 11, 13, 15, 15, 5, 7, 7, 8, 11, 14, 14, 12, 6, - 9, 13, 15, 7, 12, 8, 9, 11, 7, 7, 12, 7, 6, 15, 13, 11, - 9, 7, 15, 11, 8, 6, 6, 14, 12, 13, 5, 14, 13, 13, 7, 5, - 15, 5, 8, 11, 14, 14, 6, 14, 6, 9, 12, 9, 12, 5, 15, 8, - 8, 5, 12, 9, 12, 5, 14, 6, 8, 13, 6, 5, 15, 13, 11, 11 -]; diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/create-ecdh/node_modules/elliptic/node_modules/hash.js/lib/hash/sha.js b/node_modules/browserify/node_modules/crypto-browserify/node_modules/create-ecdh/node_modules/elliptic/node_modules/hash.js/lib/hash/sha.js deleted file mode 100644 index a7837aad..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/create-ecdh/node_modules/elliptic/node_modules/hash.js/lib/hash/sha.js +++ /dev/null @@ -1,564 +0,0 @@ -var hash = require('../hash'); -var utils = hash.utils; -var assert = utils.assert; - -var rotr32 = utils.rotr32; -var rotl32 = utils.rotl32; -var sum32 = utils.sum32; -var sum32_4 = utils.sum32_4; -var sum32_5 = utils.sum32_5; -var rotr64_hi = utils.rotr64_hi; -var rotr64_lo = utils.rotr64_lo; -var shr64_hi = utils.shr64_hi; -var shr64_lo = utils.shr64_lo; -var sum64 = utils.sum64; -var sum64_hi = utils.sum64_hi; -var sum64_lo = utils.sum64_lo; -var sum64_4_hi = utils.sum64_4_hi; -var sum64_4_lo = utils.sum64_4_lo; -var sum64_5_hi = utils.sum64_5_hi; -var sum64_5_lo = utils.sum64_5_lo; -var BlockHash = hash.common.BlockHash; - -var sha256_K = [ - 0x428a2f98, 0x71374491, 0xb5c0fbcf, 0xe9b5dba5, - 0x3956c25b, 0x59f111f1, 0x923f82a4, 0xab1c5ed5, - 0xd807aa98, 0x12835b01, 0x243185be, 0x550c7dc3, - 0x72be5d74, 0x80deb1fe, 0x9bdc06a7, 0xc19bf174, - 0xe49b69c1, 0xefbe4786, 0x0fc19dc6, 0x240ca1cc, - 0x2de92c6f, 0x4a7484aa, 0x5cb0a9dc, 0x76f988da, - 0x983e5152, 0xa831c66d, 0xb00327c8, 0xbf597fc7, - 0xc6e00bf3, 0xd5a79147, 0x06ca6351, 0x14292967, - 0x27b70a85, 0x2e1b2138, 0x4d2c6dfc, 0x53380d13, - 0x650a7354, 0x766a0abb, 0x81c2c92e, 0x92722c85, - 0xa2bfe8a1, 0xa81a664b, 0xc24b8b70, 0xc76c51a3, - 0xd192e819, 0xd6990624, 0xf40e3585, 0x106aa070, - 0x19a4c116, 0x1e376c08, 0x2748774c, 0x34b0bcb5, - 0x391c0cb3, 0x4ed8aa4a, 0x5b9cca4f, 0x682e6ff3, - 0x748f82ee, 0x78a5636f, 0x84c87814, 0x8cc70208, - 0x90befffa, 0xa4506ceb, 0xbef9a3f7, 0xc67178f2 -]; - -var sha512_K = [ - 0x428a2f98, 0xd728ae22, 0x71374491, 0x23ef65cd, - 0xb5c0fbcf, 0xec4d3b2f, 0xe9b5dba5, 0x8189dbbc, - 0x3956c25b, 0xf348b538, 0x59f111f1, 0xb605d019, - 0x923f82a4, 0xaf194f9b, 0xab1c5ed5, 0xda6d8118, - 0xd807aa98, 0xa3030242, 0x12835b01, 0x45706fbe, - 0x243185be, 0x4ee4b28c, 0x550c7dc3, 0xd5ffb4e2, - 0x72be5d74, 0xf27b896f, 0x80deb1fe, 0x3b1696b1, - 0x9bdc06a7, 0x25c71235, 0xc19bf174, 0xcf692694, - 0xe49b69c1, 0x9ef14ad2, 0xefbe4786, 0x384f25e3, - 0x0fc19dc6, 0x8b8cd5b5, 0x240ca1cc, 0x77ac9c65, - 0x2de92c6f, 0x592b0275, 0x4a7484aa, 0x6ea6e483, - 0x5cb0a9dc, 0xbd41fbd4, 0x76f988da, 0x831153b5, - 0x983e5152, 0xee66dfab, 0xa831c66d, 0x2db43210, - 0xb00327c8, 0x98fb213f, 0xbf597fc7, 0xbeef0ee4, - 0xc6e00bf3, 0x3da88fc2, 0xd5a79147, 0x930aa725, - 0x06ca6351, 0xe003826f, 0x14292967, 0x0a0e6e70, - 0x27b70a85, 0x46d22ffc, 0x2e1b2138, 0x5c26c926, - 0x4d2c6dfc, 0x5ac42aed, 0x53380d13, 0x9d95b3df, - 0x650a7354, 0x8baf63de, 0x766a0abb, 0x3c77b2a8, - 0x81c2c92e, 0x47edaee6, 0x92722c85, 0x1482353b, - 0xa2bfe8a1, 0x4cf10364, 0xa81a664b, 0xbc423001, - 0xc24b8b70, 0xd0f89791, 0xc76c51a3, 0x0654be30, - 0xd192e819, 0xd6ef5218, 0xd6990624, 0x5565a910, - 0xf40e3585, 0x5771202a, 0x106aa070, 0x32bbd1b8, - 0x19a4c116, 0xb8d2d0c8, 0x1e376c08, 0x5141ab53, - 0x2748774c, 0xdf8eeb99, 0x34b0bcb5, 0xe19b48a8, - 0x391c0cb3, 0xc5c95a63, 0x4ed8aa4a, 0xe3418acb, - 0x5b9cca4f, 0x7763e373, 0x682e6ff3, 0xd6b2b8a3, - 0x748f82ee, 0x5defb2fc, 0x78a5636f, 0x43172f60, - 0x84c87814, 0xa1f0ab72, 0x8cc70208, 0x1a6439ec, - 0x90befffa, 0x23631e28, 0xa4506ceb, 0xde82bde9, - 0xbef9a3f7, 0xb2c67915, 0xc67178f2, 0xe372532b, - 0xca273ece, 0xea26619c, 0xd186b8c7, 0x21c0c207, - 0xeada7dd6, 0xcde0eb1e, 0xf57d4f7f, 0xee6ed178, - 0x06f067aa, 0x72176fba, 0x0a637dc5, 0xa2c898a6, - 0x113f9804, 0xbef90dae, 0x1b710b35, 0x131c471b, - 0x28db77f5, 0x23047d84, 0x32caab7b, 0x40c72493, - 0x3c9ebe0a, 0x15c9bebc, 0x431d67c4, 0x9c100d4c, - 0x4cc5d4be, 0xcb3e42b6, 0x597f299c, 0xfc657e2a, - 0x5fcb6fab, 0x3ad6faec, 0x6c44198c, 0x4a475817 -]; - -var sha1_K = [ - 0x5A827999, 0x6ED9EBA1, - 0x8F1BBCDC, 0xCA62C1D6 -]; - -function SHA256() { - if (!(this instanceof SHA256)) - return new SHA256(); - - BlockHash.call(this); - this.h = [ 0x6a09e667, 0xbb67ae85, 0x3c6ef372, 0xa54ff53a, - 0x510e527f, 0x9b05688c, 0x1f83d9ab, 0x5be0cd19 ]; - this.k = sha256_K; - this.W = new Array(64); -} -utils.inherits(SHA256, BlockHash); -exports.sha256 = SHA256; - -SHA256.blockSize = 512; -SHA256.outSize = 256; -SHA256.hmacStrength = 192; -SHA256.padLength = 64; - -SHA256.prototype._update = function _update(msg, start) { - var W = this.W; - - for (var i = 0; i < 16; i++) - W[i] = msg[start + i]; - for (; i < W.length; i++) - W[i] = sum32_4(g1_256(W[i - 2]), W[i - 7], g0_256(W[i - 15]), W[i - 16]); - - var a = this.h[0]; - var b = this.h[1]; - var c = this.h[2]; - var d = this.h[3]; - var e = this.h[4]; - var f = this.h[5]; - var g = this.h[6]; - var h = this.h[7]; - - assert(this.k.length === W.length); - for (var i = 0; i < W.length; i++) { - var T1 = sum32_5(h, s1_256(e), ch32(e, f, g), this.k[i], W[i]); - var T2 = sum32(s0_256(a), maj32(a, b, c)); - h = g; - g = f; - f = e; - e = sum32(d, T1); - d = c; - c = b; - b = a; - a = sum32(T1, T2); - } - - this.h[0] = sum32(this.h[0], a); - this.h[1] = sum32(this.h[1], b); - this.h[2] = sum32(this.h[2], c); - this.h[3] = sum32(this.h[3], d); - this.h[4] = sum32(this.h[4], e); - this.h[5] = sum32(this.h[5], f); - this.h[6] = sum32(this.h[6], g); - this.h[7] = sum32(this.h[7], h); -}; - -SHA256.prototype._digest = function digest(enc) { - if (enc === 'hex') - return utils.toHex32(this.h, 'big'); - else - return utils.split32(this.h, 'big'); -}; - -function SHA224() { - if (!(this instanceof SHA224)) - return new SHA224(); - - SHA256.call(this); - this.h = [ 0xc1059ed8, 0x367cd507, 0x3070dd17, 0xf70e5939, - 0xffc00b31, 0x68581511, 0x64f98fa7, 0xbefa4fa4 ]; -} -utils.inherits(SHA224, SHA256); -exports.sha224 = SHA224; - -SHA224.blockSize = 512; -SHA224.outSize = 224; -SHA224.hmacStrength = 192; -SHA224.padLength = 64; - -SHA224.prototype._digest = function digest(enc) { - // Just truncate output - if (enc === 'hex') - return utils.toHex32(this.h.slice(0, 7), 'big'); - else - return utils.split32(this.h.slice(0, 7), 'big'); -}; - -function SHA512() { - if (!(this instanceof SHA512)) - return new SHA512(); - - BlockHash.call(this); - this.h = [ 0x6a09e667, 0xf3bcc908, - 0xbb67ae85, 0x84caa73b, - 0x3c6ef372, 0xfe94f82b, - 0xa54ff53a, 0x5f1d36f1, - 0x510e527f, 0xade682d1, - 0x9b05688c, 0x2b3e6c1f, - 0x1f83d9ab, 0xfb41bd6b, - 0x5be0cd19, 0x137e2179 ]; - this.k = sha512_K; - this.W = new Array(160); -} -utils.inherits(SHA512, BlockHash); -exports.sha512 = SHA512; - -SHA512.blockSize = 1024; -SHA512.outSize = 512; -SHA512.hmacStrength = 192; -SHA512.padLength = 128; - -SHA512.prototype._prepareBlock = function _prepareBlock(msg, start) { - var W = this.W; - - // 32 x 32bit words - for (var i = 0; i < 32; i++) - W[i] = msg[start + i]; - for (; i < W.length; i += 2) { - var c0_hi = g1_512_hi(W[i - 4], W[i - 3]); // i - 2 - var c0_lo = g1_512_lo(W[i - 4], W[i - 3]); - var c1_hi = W[i - 14]; // i - 7 - var c1_lo = W[i - 13]; - var c2_hi = g0_512_hi(W[i - 30], W[i - 29]); // i - 15 - var c2_lo = g0_512_lo(W[i - 30], W[i - 29]); - var c3_hi = W[i - 32]; // i - 16 - var c3_lo = W[i - 31]; - - W[i] = sum64_4_hi(c0_hi, c0_lo, - c1_hi, c1_lo, - c2_hi, c2_lo, - c3_hi, c3_lo); - W[i + 1] = sum64_4_lo(c0_hi, c0_lo, - c1_hi, c1_lo, - c2_hi, c2_lo, - c3_hi, c3_lo); - } -}; - -SHA512.prototype._update = function _update(msg, start) { - this._prepareBlock(msg, start); - - var W = this.W; - - var ah = this.h[0]; - var al = this.h[1]; - var bh = this.h[2]; - var bl = this.h[3]; - var ch = this.h[4]; - var cl = this.h[5]; - var dh = this.h[6]; - var dl = this.h[7]; - var eh = this.h[8]; - var el = this.h[9]; - var fh = this.h[10]; - var fl = this.h[11]; - var gh = this.h[12]; - var gl = this.h[13]; - var hh = this.h[14]; - var hl = this.h[15]; - - assert(this.k.length === W.length); - for (var i = 0; i < W.length; i += 2) { - var c0_hi = hh; - var c0_lo = hl; - var c1_hi = s1_512_hi(eh, el); - var c1_lo = s1_512_lo(eh, el); - var c2_hi = ch64_hi(eh, el, fh, fl, gh, gl); - var c2_lo = ch64_lo(eh, el, fh, fl, gh, gl); - var c3_hi = this.k[i]; - var c3_lo = this.k[i + 1]; - var c4_hi = W[i]; - var c4_lo = W[i + 1]; - - var T1_hi = sum64_5_hi(c0_hi, c0_lo, - c1_hi, c1_lo, - c2_hi, c2_lo, - c3_hi, c3_lo, - c4_hi, c4_lo); - var T1_lo = sum64_5_lo(c0_hi, c0_lo, - c1_hi, c1_lo, - c2_hi, c2_lo, - c3_hi, c3_lo, - c4_hi, c4_lo); - - var c0_hi = s0_512_hi(ah, al); - var c0_lo = s0_512_lo(ah, al); - var c1_hi = maj64_hi(ah, al, bh, bl, ch, cl); - var c1_lo = maj64_lo(ah, al, bh, bl, ch, cl); - - var T2_hi = sum64_hi(c0_hi, c0_lo, c1_hi, c1_lo); - var T2_lo = sum64_lo(c0_hi, c0_lo, c1_hi, c1_lo); - - hh = gh; - hl = gl; - - gh = fh; - gl = fl; - - fh = eh; - fl = el; - - eh = sum64_hi(dh, dl, T1_hi, T1_lo); - el = sum64_lo(dl, dl, T1_hi, T1_lo); - - dh = ch; - dl = cl; - - ch = bh; - cl = bl; - - bh = ah; - bl = al; - - ah = sum64_hi(T1_hi, T1_lo, T2_hi, T2_lo); - al = sum64_lo(T1_hi, T1_lo, T2_hi, T2_lo); - } - - sum64(this.h, 0, ah, al); - sum64(this.h, 2, bh, bl); - sum64(this.h, 4, ch, cl); - sum64(this.h, 6, dh, dl); - sum64(this.h, 8, eh, el); - sum64(this.h, 10, fh, fl); - sum64(this.h, 12, gh, gl); - sum64(this.h, 14, hh, hl); -}; - -SHA512.prototype._digest = function digest(enc) { - if (enc === 'hex') - return utils.toHex32(this.h, 'big'); - else - return utils.split32(this.h, 'big'); -}; - -function SHA384() { - if (!(this instanceof SHA384)) - return new SHA384(); - - SHA512.call(this); - this.h = [ 0xcbbb9d5d, 0xc1059ed8, - 0x629a292a, 0x367cd507, - 0x9159015a, 0x3070dd17, - 0x152fecd8, 0xf70e5939, - 0x67332667, 0xffc00b31, - 0x8eb44a87, 0x68581511, - 0xdb0c2e0d, 0x64f98fa7, - 0x47b5481d, 0xbefa4fa4 ]; -} -utils.inherits(SHA384, SHA512); -exports.sha384 = SHA384; - -SHA384.blockSize = 1024; -SHA384.outSize = 384; -SHA384.hmacStrength = 192; -SHA384.padLength = 128; - -SHA384.prototype._digest = function digest(enc) { - if (enc === 'hex') - return utils.toHex32(this.h.slice(0, 12), 'big'); - else - return utils.split32(this.h.slice(0, 12), 'big'); -}; - -function SHA1() { - if (!(this instanceof SHA1)) - return new SHA1(); - - BlockHash.call(this); - this.h = [ 0x67452301, 0xefcdab89, 0x98badcfe, - 0x10325476, 0xc3d2e1f0 ]; - this.W = new Array(80); -} - -utils.inherits(SHA1, BlockHash); -exports.sha1 = SHA1; - -SHA1.blockSize = 512; -SHA1.outSize = 160; -SHA1.hmacStrength = 80; -SHA1.padLength = 64; - -SHA1.prototype._update = function _update(msg, start) { - var W = this.W; - - for (var i = 0; i < 16; i++) - W[i] = msg[start + i]; - - for(; i < W.length; i++) - W[i] = rotl32(W[i - 3] ^ W[i - 8] ^ W[i - 14] ^ W[i - 16], 1); - - var a = this.h[0]; - var b = this.h[1]; - var c = this.h[2]; - var d = this.h[3]; - var e = this.h[4]; - - for (var i = 0; i < W.length; i++) { - var s = ~~(i / 20); - var t = sum32_5(rotl32(a, 5), ft_1(s, b, c, d), e, W[i], sha1_K[s]); - e = d; - d = c; - c = rotl32(b, 30); - b = a; - a = t; - } - - this.h[0] = sum32(this.h[0], a); - this.h[1] = sum32(this.h[1], b); - this.h[2] = sum32(this.h[2], c); - this.h[3] = sum32(this.h[3], d); - this.h[4] = sum32(this.h[4], e); -}; - -SHA1.prototype._digest = function digest(enc) { - if (enc === 'hex') - return utils.toHex32(this.h, 'big'); - else - return utils.split32(this.h, 'big'); -}; - -function ch32(x, y, z) { - return (x & y) ^ ((~x) & z); -} - -function maj32(x, y, z) { - return (x & y) ^ (x & z) ^ (y & z); -} - -function p32(x, y, z) { - return x ^ y ^ z; -} - -function s0_256(x) { - return rotr32(x, 2) ^ rotr32(x, 13) ^ rotr32(x, 22); -} - -function s1_256(x) { - return rotr32(x, 6) ^ rotr32(x, 11) ^ rotr32(x, 25); -} - -function g0_256(x) { - return rotr32(x, 7) ^ rotr32(x, 18) ^ (x >>> 3); -} - -function g1_256(x) { - return rotr32(x, 17) ^ rotr32(x, 19) ^ (x >>> 10); -} - -function ft_1(s, x, y, z) { - if (s === 0) - return ch32(x, y, z); - if (s === 1 || s === 3) - return p32(x, y, z); - if (s === 2) - return maj32(x, y, z); -} - -function ch64_hi(xh, xl, yh, yl, zh, zl) { - var r = (xh & yh) ^ ((~xh) & zh); - if (r < 0) - r += 0x100000000; - return r; -} - -function ch64_lo(xh, xl, yh, yl, zh, zl) { - var r = (xl & yl) ^ ((~xl) & zl); - if (r < 0) - r += 0x100000000; - return r; -} - -function maj64_hi(xh, xl, yh, yl, zh, zl) { - var r = (xh & yh) ^ (xh & zh) ^ (yh & zh); - if (r < 0) - r += 0x100000000; - return r; -} - -function maj64_lo(xh, xl, yh, yl, zh, zl) { - var r = (xl & yl) ^ (xl & zl) ^ (yl & zl); - if (r < 0) - r += 0x100000000; - return r; -} - -function s0_512_hi(xh, xl) { - var c0_hi = rotr64_hi(xh, xl, 28); - var c1_hi = rotr64_hi(xl, xh, 2); // 34 - var c2_hi = rotr64_hi(xl, xh, 7); // 39 - - var r = c0_hi ^ c1_hi ^ c2_hi; - if (r < 0) - r += 0x100000000; - return r; -} - -function s0_512_lo(xh, xl) { - var c0_lo = rotr64_lo(xh, xl, 28); - var c1_lo = rotr64_lo(xl, xh, 2); // 34 - var c2_lo = rotr64_lo(xl, xh, 7); // 39 - - var r = c0_lo ^ c1_lo ^ c2_lo; - if (r < 0) - r += 0x100000000; - return r; -} - -function s1_512_hi(xh, xl) { - var c0_hi = rotr64_hi(xh, xl, 14); - var c1_hi = rotr64_hi(xh, xl, 18); - var c2_hi = rotr64_hi(xl, xh, 9); // 41 - - var r = c0_hi ^ c1_hi ^ c2_hi; - if (r < 0) - r += 0x100000000; - return r; -} - -function s1_512_lo(xh, xl) { - var c0_lo = rotr64_lo(xh, xl, 14); - var c1_lo = rotr64_lo(xh, xl, 18); - var c2_lo = rotr64_lo(xl, xh, 9); // 41 - - var r = c0_lo ^ c1_lo ^ c2_lo; - if (r < 0) - r += 0x100000000; - return r; -} - -function g0_512_hi(xh, xl) { - var c0_hi = rotr64_hi(xh, xl, 1); - var c1_hi = rotr64_hi(xh, xl, 8); - var c2_hi = shr64_hi(xh, xl, 7); - - var r = c0_hi ^ c1_hi ^ c2_hi; - if (r < 0) - r += 0x100000000; - return r; -} - -function g0_512_lo(xh, xl) { - var c0_lo = rotr64_lo(xh, xl, 1); - var c1_lo = rotr64_lo(xh, xl, 8); - var c2_lo = shr64_lo(xh, xl, 7); - - var r = c0_lo ^ c1_lo ^ c2_lo; - if (r < 0) - r += 0x100000000; - return r; -} - -function g1_512_hi(xh, xl) { - var c0_hi = rotr64_hi(xh, xl, 19); - var c1_hi = rotr64_hi(xl, xh, 29); // 61 - var c2_hi = shr64_hi(xh, xl, 6); - - var r = c0_hi ^ c1_hi ^ c2_hi; - if (r < 0) - r += 0x100000000; - return r; -} - -function g1_512_lo(xh, xl) { - var c0_lo = rotr64_lo(xh, xl, 19); - var c1_lo = rotr64_lo(xl, xh, 29); // 61 - var c2_lo = shr64_lo(xh, xl, 6); - - var r = c0_lo ^ c1_lo ^ c2_lo; - if (r < 0) - r += 0x100000000; - return r; -} diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/create-ecdh/node_modules/elliptic/node_modules/hash.js/lib/hash/utils.js b/node_modules/browserify/node_modules/crypto-browserify/node_modules/create-ecdh/node_modules/elliptic/node_modules/hash.js/lib/hash/utils.js deleted file mode 100644 index 00ed5fb4..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/create-ecdh/node_modules/elliptic/node_modules/hash.js/lib/hash/utils.js +++ /dev/null @@ -1,257 +0,0 @@ -var utils = exports; -var inherits = require('inherits'); - -function toArray(msg, enc) { - if (Array.isArray(msg)) - return msg.slice(); - if (!msg) - return []; - var res = []; - if (typeof msg === 'string') { - if (!enc) { - for (var i = 0; i < msg.length; i++) { - var c = msg.charCodeAt(i); - var hi = c >> 8; - var lo = c & 0xff; - if (hi) - res.push(hi, lo); - else - res.push(lo); - } - } else if (enc === 'hex') { - msg = msg.replace(/[^a-z0-9]+/ig, ''); - if (msg.length % 2 !== 0) - msg = '0' + msg; - for (var i = 0; i < msg.length; i += 2) - res.push(parseInt(msg[i] + msg[i + 1], 16)); - } - } else { - for (var i = 0; i < msg.length; i++) - res[i] = msg[i] | 0; - } - return res; -} -utils.toArray = toArray; - -function toHex(msg) { - var res = ''; - for (var i = 0; i < msg.length; i++) - res += zero2(msg[i].toString(16)); - return res; -} -utils.toHex = toHex; - -function htonl(w) { - var res = (w >>> 24) | - ((w >>> 8) & 0xff00) | - ((w << 8) & 0xff0000) | - ((w & 0xff) << 24); - return res >>> 0; -} -utils.htonl = htonl; - -function toHex32(msg, endian) { - var res = ''; - for (var i = 0; i < msg.length; i++) { - var w = msg[i]; - if (endian === 'little') - w = htonl(w); - res += zero8(w.toString(16)); - } - return res; -} -utils.toHex32 = toHex32; - -function zero2(word) { - if (word.length === 1) - return '0' + word; - else - return word; -} -utils.zero2 = zero2; - -function zero8(word) { - if (word.length === 7) - return '0' + word; - else if (word.length === 6) - return '00' + word; - else if (word.length === 5) - return '000' + word; - else if (word.length === 4) - return '0000' + word; - else if (word.length === 3) - return '00000' + word; - else if (word.length === 2) - return '000000' + word; - else if (word.length === 1) - return '0000000' + word; - else - return word; -} -utils.zero8 = zero8; - -function join32(msg, start, end, endian) { - var len = end - start; - assert(len % 4 === 0); - var res = new Array(len / 4); - for (var i = 0, k = start; i < res.length; i++, k += 4) { - var w; - if (endian === 'big') - w = (msg[k] << 24) | (msg[k + 1] << 16) | (msg[k + 2] << 8) | msg[k + 3]; - else - w = (msg[k + 3] << 24) | (msg[k + 2] << 16) | (msg[k + 1] << 8) | msg[k]; - res[i] = w >>> 0; - } - return res; -} -utils.join32 = join32; - -function split32(msg, endian) { - var res = new Array(msg.length * 4); - for (var i = 0, k = 0; i < msg.length; i++, k += 4) { - var m = msg[i]; - if (endian === 'big') { - res[k] = m >>> 24; - res[k + 1] = (m >>> 16) & 0xff; - res[k + 2] = (m >>> 8) & 0xff; - res[k + 3] = m & 0xff; - } else { - res[k + 3] = m >>> 24; - res[k + 2] = (m >>> 16) & 0xff; - res[k + 1] = (m >>> 8) & 0xff; - res[k] = m & 0xff; - } - } - return res; -} -utils.split32 = split32; - -function rotr32(w, b) { - return (w >>> b) | (w << (32 - b)); -} -utils.rotr32 = rotr32; - -function rotl32(w, b) { - return (w << b) | (w >>> (32 - b)); -} -utils.rotl32 = rotl32; - -function sum32(a, b) { - return (a + b) >>> 0; -} -utils.sum32 = sum32; - -function sum32_3(a, b, c) { - return (a + b + c) >>> 0; -} -utils.sum32_3 = sum32_3; - -function sum32_4(a, b, c, d) { - return (a + b + c + d) >>> 0; -} -utils.sum32_4 = sum32_4; - -function sum32_5(a, b, c, d, e) { - return (a + b + c + d + e) >>> 0; -} -utils.sum32_5 = sum32_5; - -function assert(cond, msg) { - if (!cond) - throw new Error(msg || 'Assertion failed'); -} -utils.assert = assert; - -utils.inherits = inherits; - -function sum64(buf, pos, ah, al) { - var bh = buf[pos]; - var bl = buf[pos + 1]; - - var lo = (al + bl) >>> 0; - var hi = (lo < al ? 1 : 0) + ah + bh; - buf[pos] = hi >>> 0; - buf[pos + 1] = lo; -} -exports.sum64 = sum64; - -function sum64_hi(ah, al, bh, bl) { - var lo = (al + bl) >>> 0; - var hi = (lo < al ? 1 : 0) + ah + bh; - return hi >>> 0; -}; -exports.sum64_hi = sum64_hi; - -function sum64_lo(ah, al, bh, bl) { - var lo = al + bl; - return lo >>> 0; -}; -exports.sum64_lo = sum64_lo; - -function sum64_4_hi(ah, al, bh, bl, ch, cl, dh, dl) { - var carry = 0; - var lo = al; - lo = (lo + bl) >>> 0; - carry += lo < al ? 1 : 0; - lo = (lo + cl) >>> 0; - carry += lo < cl ? 1 : 0; - lo = (lo + dl) >>> 0; - carry += lo < dl ? 1 : 0; - - var hi = ah + bh + ch + dh + carry; - return hi >>> 0; -}; -exports.sum64_4_hi = sum64_4_hi; - -function sum64_4_lo(ah, al, bh, bl, ch, cl, dh, dl) { - var lo = al + bl + cl + dl; - return lo >>> 0; -}; -exports.sum64_4_lo = sum64_4_lo; - -function sum64_5_hi(ah, al, bh, bl, ch, cl, dh, dl, eh, el) { - var carry = 0; - var lo = al; - lo = (lo + bl) >>> 0; - carry += lo < al ? 1 : 0; - lo = (lo + cl) >>> 0; - carry += lo < cl ? 1 : 0; - lo = (lo + dl) >>> 0; - carry += lo < dl ? 1 : 0; - lo = (lo + el) >>> 0; - carry += lo < el ? 1 : 0; - - var hi = ah + bh + ch + dh + eh + carry; - return hi >>> 0; -}; -exports.sum64_5_hi = sum64_5_hi; - -function sum64_5_lo(ah, al, bh, bl, ch, cl, dh, dl, eh, el) { - var lo = al + bl + cl + dl + el; - - return lo >>> 0; -}; -exports.sum64_5_lo = sum64_5_lo; - -function rotr64_hi(ah, al, num) { - var r = (al << (32 - num)) | (ah >>> num); - return r >>> 0; -}; -exports.rotr64_hi = rotr64_hi; - -function rotr64_lo(ah, al, num) { - var r = (ah << (32 - num)) | (al >>> num); - return r >>> 0; -}; -exports.rotr64_lo = rotr64_lo; - -function shr64_hi(ah, al, num) { - return ah >>> num; -}; -exports.shr64_hi = shr64_hi; - -function shr64_lo(ah, al, num) { - var r = (ah << (32 - num)) | (al >>> num); - return r >>> 0; -}; -exports.shr64_lo = shr64_lo; diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/create-ecdh/node_modules/elliptic/node_modules/hash.js/package.json b/node_modules/browserify/node_modules/crypto-browserify/node_modules/create-ecdh/node_modules/elliptic/node_modules/hash.js/package.json deleted file mode 100644 index 812e9927..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/create-ecdh/node_modules/elliptic/node_modules/hash.js/package.json +++ /dev/null @@ -1,57 +0,0 @@ -{ - "name": "hash.js", - "version": "1.0.3", - "description": "Various hash functions that could be run by both browser and node", - "main": "lib/hash.js", - "scripts": { - "test": "mocha --reporter=spec test/*-test.js" - }, - "repository": { - "type": "git", - "url": "git+ssh://git@github.com/indutny/hash.js.git" - }, - "keywords": [ - "hash", - "sha256", - "sha224", - "hmac" - ], - "author": { - "name": "Fedor Indutny", - "email": "fedor@indutny.com" - }, - "license": "MIT", - "bugs": { - "url": "https://github.com/indutny/hash.js/issues" - }, - "homepage": "https://github.com/indutny/hash.js", - "dependencies": { - "inherits": "^2.0.1" - }, - "devDependencies": { - "mocha": "^1.18.2" - }, - "gitHead": "9c2ec8f5cdcdc255d5f6951427c5c803c097f7c6", - "_id": "hash.js@1.0.3", - "_shasum": "1332ff00156c0a0ffdd8236013d07b77a0451573", - "_from": "hash.js@>=1.0.0 <2.0.0", - "_npmVersion": "2.9.0", - "_nodeVersion": "2.0.0", - "_npmUser": { - "name": "indutny", - "email": "fedor@indutny.com" - }, - "maintainers": [ - { - "name": "indutny", - "email": "fedor@indutny.com" - } - ], - "dist": { - "shasum": "1332ff00156c0a0ffdd8236013d07b77a0451573", - "tarball": "https://registry.npmjs.org/hash.js/-/hash.js-1.0.3.tgz" - }, - "directories": {}, - "_resolved": "https://registry.npmjs.org/hash.js/-/hash.js-1.0.3.tgz", - "readme": "ERROR: No README data found!" -} diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/create-ecdh/node_modules/elliptic/node_modules/hash.js/test/hash-test.js b/node_modules/browserify/node_modules/crypto-browserify/node_modules/create-ecdh/node_modules/elliptic/node_modules/hash.js/test/hash-test.js deleted file mode 100644 index 97347a27..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/create-ecdh/node_modules/elliptic/node_modules/hash.js/test/hash-test.js +++ /dev/null @@ -1,119 +0,0 @@ -var assert = require('assert'); -var hash = require('../'); - -describe('Hash', function() { - function test(fn, cases) { - for (var i = 0; i < cases.length; i++) { - var msg = cases[i][0]; - var res = cases[i][1]; - var enc = cases[i][2]; - - var dgst = fn().update(msg, enc).digest('hex'); - assert.equal(dgst, res); - - // Split message - var dgst = fn().update(msg.slice(0, 2), enc) - .update(msg.slice(2), enc) - .digest('hex'); - assert.equal(dgst, res); - } - } - - it('should support sha256', function() { - assert.equal(hash.sha256.blockSize, 512); - assert.equal(hash.sha256.outSize, 256); - - test(hash.sha256, [ - [ 'abc', - 'ba7816bf8f01cfea414140de5dae2223b00361a396177a9cb410ff61f20015ad' ], - [ 'abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq', - '248d6a61d20638b8e5c026930c3e6039a33ce45964ff2167f6ecedd419db06c1' ], - [ 'deadbeef', - '5f78c33274e43fa9de5659265c1d917e25c03722dcb0b8d27db8d5feaa813953', - 'hex' ], - ]); - }); - - it('should support sha224', function() { - assert.equal(hash.sha224.blockSize, 512); - assert.equal(hash.sha224.outSize, 224); - - test(hash.sha224, [ - [ 'abc', - '23097d223405d8228642a477bda255b32aadbce4bda0b3f7e36c9da7' ], - [ 'abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq', - '75388b16512776cc5dba5da1fd890150b0c6455cb4f58b1952522525' ], - [ 'deadbeef', - '55b9eee5f60cc362ddc07676f620372611e22272f60fdbec94f243f8', - 'hex' ], - ]); - }); - - it('should support ripemd160', function() { - assert.equal(hash.ripemd160.blockSize, 512); - assert.equal(hash.ripemd160.outSize, 160); - - test(hash.ripemd160, [ - [ '', '9c1185a5c5e9fc54612808977ee8f548b2258d31'], - [ 'abc', - '8eb208f7e05d987a9b044a8e98c6b087f15a0bfc' ], - [ 'message digest', - '5d0689ef49d2fae572b881b123a85ffa21595f36' ], - [ 'abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq', - '12a053384a9c0c88e405a06c27dcf49ada62eb2b' ], - [ 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789', - 'b0e20b6e3116640286ed3a87a5713079b21f5189' ], - ]); - }); - - it('should support sha1', function() { - assert.equal(hash.sha1.blockSize, 512); - assert.equal(hash.sha1.outSize, 160); - - test(hash.sha1, [ - [ '', - 'da39a3ee5e6b4b0d3255bfef95601890afd80709' ], - [ 'abc', - 'a9993e364706816aba3e25717850c26c9cd0d89d' ], - [ 'abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq', - '84983e441c3bd26ebaae4aa1f95129e5e54670f1' ], - [ 'deadbeef', - 'd78f8bb992a56a597f6c7a1fb918bb78271367eb', - 'hex' ], - ]); - }); - - it('should support sha512', function() { - assert.equal(hash.sha512.blockSize, 1024); - assert.equal(hash.sha512.outSize, 512); - - test(hash.sha512, [ - [ 'abc', - 'ddaf35a193617abacc417349ae20413112e6fa4e89a97ea20a9eeee64b55d39a' + - '2192992a274fc1a836ba3c23a3feebbd454d4423643ce80e2a9ac94fa54ca49f' - ], - [ 'abcdefghbcdefghicdefghijdefghijkefghijklfghijklmghijklmn' + - 'hijklmnoijklmnopjklmnopqklmnopqrlmnopqrsmnopqrstnopqrstu', - '8e959b75dae313da8cf4f72814fc143f8f7779c6eb9f7fa17299aeadb6889018' + - '501d289e4900f7e4331b99dec4b5433ac7d329eeb6dd26545e96e55b874be909' - ] - ]); - }); - - it('should support sha384', function() { - assert.equal(hash.sha384.blockSize, 1024); - assert.equal(hash.sha384.outSize, 384); - - test(hash.sha384, [ - [ 'abc', - 'cb00753f45a35e8bb5a03d699ac65007272c32ab0eded1631a8b605a43ff5bed' + - '8086072ba1e7cc2358baeca134c825a7' - ], - [ 'abcdefghbcdefghicdefghijdefghijkefghijklfghijklmghijklmn' + - 'hijklmnoijklmnopjklmnopqklmnopqrlmnopqrsmnopqrstnopqrstu', - '09330c33f71147e83d192fc782cd1b4753111b173b3b05d22fa08086e3b0f712' + - 'fcc7c71a557e2db966c3e9fa91746039' - ] - ]); - }); -}); diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/create-ecdh/node_modules/elliptic/node_modules/hash.js/test/hmac-test.js b/node_modules/browserify/node_modules/crypto-browserify/node_modules/create-ecdh/node_modules/elliptic/node_modules/hash.js/test/hmac-test.js deleted file mode 100644 index 0a9647ee..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/create-ecdh/node_modules/elliptic/node_modules/hash.js/test/hmac-test.js +++ /dev/null @@ -1,59 +0,0 @@ -var assert = require('assert'); -var hash = require('../'); -var utils = hash.utils; - -describe('Hmac', function() { - describe('mixed test vector', function() { - test({ - name: 'nist 1', - key: '00010203 04050607 08090A0B 0C0D0E0F' + - '10111213 14151617 18191A1B 1C1D1E1F 20212223 24252627' + - '28292A2B 2C2D2E2F 30313233 34353637 38393A3B 3C3D3E3F', - msg: 'Sample message for keylen=blocklen', - res: '8bb9a1db9806f20df7f77b82138c7914d174d59e13dc4d0169c9057b133e1d62' - }); - test({ - name: 'nist 2', - key: '00010203 04050607' + - '08090A0B 0C0D0E0F 10111213 14151617 18191A1B 1C1D1E1F', - msg: 'Sample message for keylen=6.0.0 <7.0.0", - "_npmVersion": "3.10.3", - "_nodeVersion": "6.3.0", - "_npmUser": { - "name": "indutny", - "email": "fedor@indutny.com" - }, - "dist": { - "shasum": "e4c81e0829cf0a65ab70e998b8232723b5c1bc48", - "tarball": "https://registry.npmjs.org/elliptic/-/elliptic-6.3.2.tgz" - }, - "maintainers": [ - { - "name": "indutny", - "email": "fedor@indutny.com" - } - ], - "_npmOperationalInternal": { - "host": "packages-16-east.internal.npmjs.com", - "tmp": "tmp/elliptic-6.3.2.tgz_1473938837205_0.3108903462998569" - }, - "directories": {}, - "_resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.3.2.tgz", - "readme": "ERROR: No README data found!" -} diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/create-ecdh/package.json b/node_modules/browserify/node_modules/crypto-browserify/node_modules/create-ecdh/package.json deleted file mode 100644 index 9079caaf..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/create-ecdh/package.json +++ /dev/null @@ -1,75 +0,0 @@ -{ - "name": "create-ecdh", - "version": "4.0.0", - "description": "createECDH but browserifiable", - "main": "index.js", - "browser": "browser.js", - "scripts": { - "test": "node test.js | tspec" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/crypto-browserify/createECDH.git" - }, - "keywords": [ - "diffie", - "hellman", - "diffiehellman", - "ECDH" - ], - "author": { - "name": "Calvin Metcalf" - }, - "license": "MIT", - "bugs": { - "url": "https://github.com/crypto-browserify/createECDH/issues" - }, - "homepage": "https://github.com/crypto-browserify/createECDH", - "dependencies": { - "bn.js": "^4.1.0", - "elliptic": "^6.0.0" - }, - "devDependencies": { - "tap-spec": "^1.0.1", - "tape": "^3.0.1" - }, - "gitHead": "115f7b6bad56934285b9015575e1b43f23148a8a", - "_id": "create-ecdh@4.0.0", - "_shasum": "888c723596cdf7612f6498233eebd7a35301737d", - "_from": "create-ecdh@>=4.0.0 <5.0.0", - "_npmVersion": "2.9.0", - "_nodeVersion": "4.2.1", - "_npmUser": { - "name": "cwmma", - "email": "calvin.metcalf@gmail.com" - }, - "dist": { - "shasum": "888c723596cdf7612f6498233eebd7a35301737d", - "tarball": "https://registry.npmjs.org/create-ecdh/-/create-ecdh-4.0.0.tgz" - }, - "maintainers": [ - { - "name": "cwmma", - "email": "calvin.metcalf@gmail.com" - }, - { - "name": "dcousens", - "email": "email@dcousens.com" - }, - { - "name": "dominictarr", - "email": "dominic.tarr@gmail.com" - }, - { - "name": "jprichardson", - "email": "jprichardson@gmail.com" - }, - { - "name": "indutny", - "email": "fedor@indutny.com" - } - ], - "directories": {}, - "_resolved": "https://registry.npmjs.org/create-ecdh/-/create-ecdh-4.0.0.tgz", - "readme": "ERROR: No README data found!" -} diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/create-ecdh/readme.md b/node_modules/browserify/node_modules/crypto-browserify/node_modules/create-ecdh/readme.md deleted file mode 100644 index 7e5ce47b..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/create-ecdh/readme.md +++ /dev/null @@ -1,4 +0,0 @@ -createECDH [![Build Status](https://travis-ci.org/crypto-browserify/createECDH.svg)](https://travis-ci.org/crypto-browserify/createECDH) -==== - -In io.js or node >= 0.11 this module is just a shortcut to crypto.createECDH. In node <= 0.11 or the browser this is a pure JavaScript implimentation, more specifically a wrapper around [elliptic](https://github.com/indutny/elliptic), to give it the same API as node. `secp256k1`, `secp224r1` (aka p224), `prime256v1` (aka p256, secp256r1), `prime192v1` (aka p192, secp192r1), `secp384r1` (aka p384), `secp521r1` (aka p521) curves all work in both this library and node (though only the highlighted name will work in node). diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/create-hash/.npmignore b/node_modules/browserify/node_modules/crypto-browserify/node_modules/create-hash/.npmignore deleted file mode 100644 index 3c3629e6..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/create-hash/.npmignore +++ /dev/null @@ -1 +0,0 @@ -node_modules diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/create-hash/.travis.yml b/node_modules/browserify/node_modules/crypto-browserify/node_modules/create-hash/.travis.yml deleted file mode 100644 index 1416d607..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/create-hash/.travis.yml +++ /dev/null @@ -1,4 +0,0 @@ -language: node_js -node_js: - - "0.10" - - "0.11" \ No newline at end of file diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/create-hash/browser.js b/node_modules/browserify/node_modules/crypto-browserify/node_modules/create-hash/browser.js deleted file mode 100644 index e9add1e9..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/create-hash/browser.js +++ /dev/null @@ -1,52 +0,0 @@ -'use strict'; -var inherits = require('inherits') -var md5 = require('./md5') -var rmd160 = require('ripemd160') -var sha = require('sha.js') - -var Base = require('cipher-base') - -function HashNoConstructor(hash) { - Base.call(this, 'digest') - - this._hash = hash - this.buffers = [] -} - -inherits(HashNoConstructor, Base) - -HashNoConstructor.prototype._update = function (data) { - this.buffers.push(data) -} - -HashNoConstructor.prototype._final = function () { - var buf = Buffer.concat(this.buffers) - var r = this._hash(buf) - this.buffers = null - - return r -} - -function Hash(hash) { - Base.call(this, 'digest') - - this._hash = hash -} - -inherits(Hash, Base) - -Hash.prototype._update = function (data) { - this._hash.update(data) -} - -Hash.prototype._final = function () { - return this._hash.digest() -} - -module.exports = function createHash (alg) { - alg = alg.toLowerCase() - if ('md5' === alg) return new HashNoConstructor(md5) - if ('rmd160' === alg || 'ripemd160' === alg) return new HashNoConstructor(rmd160) - - return new Hash(sha(alg)) -} diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/create-hash/helpers.js b/node_modules/browserify/node_modules/crypto-browserify/node_modules/create-hash/helpers.js deleted file mode 100644 index 33b463dc..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/create-hash/helpers.js +++ /dev/null @@ -1,34 +0,0 @@ -'use strict'; -var intSize = 4; -var zeroBuffer = new Buffer(intSize); zeroBuffer.fill(0); -var chrsz = 8; - -function toArray(buf, bigEndian) { - if ((buf.length % intSize) !== 0) { - var len = buf.length + (intSize - (buf.length % intSize)); - buf = Buffer.concat([buf, zeroBuffer], len); - } - - var arr = []; - var fn = bigEndian ? buf.readInt32BE : buf.readInt32LE; - for (var i = 0; i < buf.length; i += intSize) { - arr.push(fn.call(buf, i)); - } - return arr; -} - -function toBuffer(arr, size, bigEndian) { - var buf = new Buffer(size); - var fn = bigEndian ? buf.writeInt32BE : buf.writeInt32LE; - for (var i = 0; i < arr.length; i++) { - fn.call(buf, arr[i], i * 4, true); - } - return buf; -} - -function hash(buf, fn, hashSize, bigEndian) { - if (!Buffer.isBuffer(buf)) buf = new Buffer(buf); - var arr = fn(toArray(buf, bigEndian), buf.length * chrsz); - return toBuffer(arr, hashSize, bigEndian); -} -exports.hash = hash; \ No newline at end of file diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/create-hash/index.js b/node_modules/browserify/node_modules/crypto-browserify/node_modules/create-hash/index.js deleted file mode 100644 index 9d2d26f8..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/create-hash/index.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('crypto').createHash; \ No newline at end of file diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/create-hash/md5.js b/node_modules/browserify/node_modules/crypto-browserify/node_modules/create-hash/md5.js deleted file mode 100644 index d2135f4d..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/create-hash/md5.js +++ /dev/null @@ -1,156 +0,0 @@ -'use strict'; -/* - * A JavaScript implementation of the RSA Data Security, Inc. MD5 Message - * Digest Algorithm, as defined in RFC 1321. - * Version 2.1 Copyright (C) Paul Johnston 1999 - 2002. - * Other contributors: Greg Holt, Andrew Kepert, Ydnar, Lostinet - * Distributed under the BSD License - * See http://pajhome.org.uk/crypt/md5 for more info. - */ - -var helpers = require('./helpers'); - -/* - * Calculate the MD5 of an array of little-endian words, and a bit length - */ -function core_md5(x, len) -{ - /* append padding */ - x[len >> 5] |= 0x80 << ((len) % 32); - x[(((len + 64) >>> 9) << 4) + 14] = len; - - var a = 1732584193; - var b = -271733879; - var c = -1732584194; - var d = 271733878; - - for(var i = 0; i < x.length; i += 16) - { - var olda = a; - var oldb = b; - var oldc = c; - var oldd = d; - - a = md5_ff(a, b, c, d, x[i+ 0], 7 , -680876936); - d = md5_ff(d, a, b, c, x[i+ 1], 12, -389564586); - c = md5_ff(c, d, a, b, x[i+ 2], 17, 606105819); - b = md5_ff(b, c, d, a, x[i+ 3], 22, -1044525330); - a = md5_ff(a, b, c, d, x[i+ 4], 7 , -176418897); - d = md5_ff(d, a, b, c, x[i+ 5], 12, 1200080426); - c = md5_ff(c, d, a, b, x[i+ 6], 17, -1473231341); - b = md5_ff(b, c, d, a, x[i+ 7], 22, -45705983); - a = md5_ff(a, b, c, d, x[i+ 8], 7 , 1770035416); - d = md5_ff(d, a, b, c, x[i+ 9], 12, -1958414417); - c = md5_ff(c, d, a, b, x[i+10], 17, -42063); - b = md5_ff(b, c, d, a, x[i+11], 22, -1990404162); - a = md5_ff(a, b, c, d, x[i+12], 7 , 1804603682); - d = md5_ff(d, a, b, c, x[i+13], 12, -40341101); - c = md5_ff(c, d, a, b, x[i+14], 17, -1502002290); - b = md5_ff(b, c, d, a, x[i+15], 22, 1236535329); - - a = md5_gg(a, b, c, d, x[i+ 1], 5 , -165796510); - d = md5_gg(d, a, b, c, x[i+ 6], 9 , -1069501632); - c = md5_gg(c, d, a, b, x[i+11], 14, 643717713); - b = md5_gg(b, c, d, a, x[i+ 0], 20, -373897302); - a = md5_gg(a, b, c, d, x[i+ 5], 5 , -701558691); - d = md5_gg(d, a, b, c, x[i+10], 9 , 38016083); - c = md5_gg(c, d, a, b, x[i+15], 14, -660478335); - b = md5_gg(b, c, d, a, x[i+ 4], 20, -405537848); - a = md5_gg(a, b, c, d, x[i+ 9], 5 , 568446438); - d = md5_gg(d, a, b, c, x[i+14], 9 , -1019803690); - c = md5_gg(c, d, a, b, x[i+ 3], 14, -187363961); - b = md5_gg(b, c, d, a, x[i+ 8], 20, 1163531501); - a = md5_gg(a, b, c, d, x[i+13], 5 , -1444681467); - d = md5_gg(d, a, b, c, x[i+ 2], 9 , -51403784); - c = md5_gg(c, d, a, b, x[i+ 7], 14, 1735328473); - b = md5_gg(b, c, d, a, x[i+12], 20, -1926607734); - - a = md5_hh(a, b, c, d, x[i+ 5], 4 , -378558); - d = md5_hh(d, a, b, c, x[i+ 8], 11, -2022574463); - c = md5_hh(c, d, a, b, x[i+11], 16, 1839030562); - b = md5_hh(b, c, d, a, x[i+14], 23, -35309556); - a = md5_hh(a, b, c, d, x[i+ 1], 4 , -1530992060); - d = md5_hh(d, a, b, c, x[i+ 4], 11, 1272893353); - c = md5_hh(c, d, a, b, x[i+ 7], 16, -155497632); - b = md5_hh(b, c, d, a, x[i+10], 23, -1094730640); - a = md5_hh(a, b, c, d, x[i+13], 4 , 681279174); - d = md5_hh(d, a, b, c, x[i+ 0], 11, -358537222); - c = md5_hh(c, d, a, b, x[i+ 3], 16, -722521979); - b = md5_hh(b, c, d, a, x[i+ 6], 23, 76029189); - a = md5_hh(a, b, c, d, x[i+ 9], 4 , -640364487); - d = md5_hh(d, a, b, c, x[i+12], 11, -421815835); - c = md5_hh(c, d, a, b, x[i+15], 16, 530742520); - b = md5_hh(b, c, d, a, x[i+ 2], 23, -995338651); - - a = md5_ii(a, b, c, d, x[i+ 0], 6 , -198630844); - d = md5_ii(d, a, b, c, x[i+ 7], 10, 1126891415); - c = md5_ii(c, d, a, b, x[i+14], 15, -1416354905); - b = md5_ii(b, c, d, a, x[i+ 5], 21, -57434055); - a = md5_ii(a, b, c, d, x[i+12], 6 , 1700485571); - d = md5_ii(d, a, b, c, x[i+ 3], 10, -1894986606); - c = md5_ii(c, d, a, b, x[i+10], 15, -1051523); - b = md5_ii(b, c, d, a, x[i+ 1], 21, -2054922799); - a = md5_ii(a, b, c, d, x[i+ 8], 6 , 1873313359); - d = md5_ii(d, a, b, c, x[i+15], 10, -30611744); - c = md5_ii(c, d, a, b, x[i+ 6], 15, -1560198380); - b = md5_ii(b, c, d, a, x[i+13], 21, 1309151649); - a = md5_ii(a, b, c, d, x[i+ 4], 6 , -145523070); - d = md5_ii(d, a, b, c, x[i+11], 10, -1120210379); - c = md5_ii(c, d, a, b, x[i+ 2], 15, 718787259); - b = md5_ii(b, c, d, a, x[i+ 9], 21, -343485551); - - a = safe_add(a, olda); - b = safe_add(b, oldb); - c = safe_add(c, oldc); - d = safe_add(d, oldd); - } - return Array(a, b, c, d); - -} - -/* - * These functions implement the four basic operations the algorithm uses. - */ -function md5_cmn(q, a, b, x, s, t) -{ - return safe_add(bit_rol(safe_add(safe_add(a, q), safe_add(x, t)), s),b); -} -function md5_ff(a, b, c, d, x, s, t) -{ - return md5_cmn((b & c) | ((~b) & d), a, b, x, s, t); -} -function md5_gg(a, b, c, d, x, s, t) -{ - return md5_cmn((b & d) | (c & (~d)), a, b, x, s, t); -} -function md5_hh(a, b, c, d, x, s, t) -{ - return md5_cmn(b ^ c ^ d, a, b, x, s, t); -} -function md5_ii(a, b, c, d, x, s, t) -{ - return md5_cmn(c ^ (b | (~d)), a, b, x, s, t); -} - -/* - * Add integers, wrapping at 2^32. This uses 16-bit operations internally - * to work around bugs in some JS interpreters. - */ -function safe_add(x, y) -{ - var lsw = (x & 0xFFFF) + (y & 0xFFFF); - var msw = (x >> 16) + (y >> 16) + (lsw >> 16); - return (msw << 16) | (lsw & 0xFFFF); -} - -/* - * Bitwise rotate a 32-bit number to the left. - */ -function bit_rol(num, cnt) -{ - return (num << cnt) | (num >>> (32 - cnt)); -} - -module.exports = function md5(buf) { - return helpers.hash(buf, core_md5, 16); -}; \ No newline at end of file diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/create-hash/node_modules/.bin/sha.js b/node_modules/browserify/node_modules/crypto-browserify/node_modules/create-hash/node_modules/.bin/sha.js deleted file mode 120000 index 3c761051..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/create-hash/node_modules/.bin/sha.js +++ /dev/null @@ -1 +0,0 @@ -../sha.js/bin.js \ No newline at end of file diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/create-hash/node_modules/cipher-base/.eslintrc b/node_modules/browserify/node_modules/crypto-browserify/node_modules/create-hash/node_modules/cipher-base/.eslintrc deleted file mode 100644 index a755cdbf..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/create-hash/node_modules/cipher-base/.eslintrc +++ /dev/null @@ -1,3 +0,0 @@ -{ - "extends": ["standard"] -} diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/create-hash/node_modules/cipher-base/.travis.yml b/node_modules/browserify/node_modules/crypto-browserify/node_modules/create-hash/node_modules/cipher-base/.travis.yml deleted file mode 100644 index eb83acd9..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/create-hash/node_modules/cipher-base/.travis.yml +++ /dev/null @@ -1,6 +0,0 @@ -language: node_js -node_js: - - "0.11" - - "0.10" - - "0.12" - - "iojs" diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/create-hash/node_modules/cipher-base/index.js b/node_modules/browserify/node_modules/crypto-browserify/node_modules/create-hash/node_modules/cipher-base/index.js deleted file mode 100644 index 1a661d62..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/create-hash/node_modules/cipher-base/index.js +++ /dev/null @@ -1,90 +0,0 @@ -var Transform = require('stream').Transform -var inherits = require('inherits') -var StringDecoder = require('string_decoder').StringDecoder -module.exports = CipherBase -inherits(CipherBase, Transform) -function CipherBase (hashMode) { - Transform.call(this) - this.hashMode = typeof hashMode === 'string' - if (this.hashMode) { - this[hashMode] = this._finalOrDigest - } else { - this.final = this._finalOrDigest - } - this._decoder = null - this._encoding = null -} -CipherBase.prototype.update = function (data, inputEnc, outputEnc) { - if (typeof data === 'string') { - data = new Buffer(data, inputEnc) - } - var outData = this._update(data) - if (this.hashMode) { - return this - } - if (outputEnc) { - outData = this._toString(outData, outputEnc) - } - return outData -} - -CipherBase.prototype.setAutoPadding = function () {} - -CipherBase.prototype.getAuthTag = function () { - throw new Error('trying to get auth tag in unsupported state') -} - -CipherBase.prototype.setAuthTag = function () { - throw new Error('trying to set auth tag in unsupported state') -} - -CipherBase.prototype.setAAD = function () { - throw new Error('trying to set aad in unsupported state') -} - -CipherBase.prototype._transform = function (data, _, next) { - var err - try { - if (this.hashMode) { - this._update(data) - } else { - this.push(this._update(data)) - } - } catch (e) { - err = e - } finally { - next(err) - } -} -CipherBase.prototype._flush = function (done) { - var err - try { - this.push(this._final()) - } catch (e) { - err = e - } finally { - done(err) - } -} -CipherBase.prototype._finalOrDigest = function (outputEnc) { - var outData = this._final() || new Buffer('') - if (outputEnc) { - outData = this._toString(outData, outputEnc, true) - } - return outData -} - -CipherBase.prototype._toString = function (value, enc, fin) { - if (!this._decoder) { - this._decoder = new StringDecoder(enc) - this._encoding = enc - } - if (this._encoding !== enc) { - throw new Error('can\'t switch encodings') - } - var out = this._decoder.write(value) - if (fin) { - out += this._decoder.end() - } - return out -} diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/create-hash/node_modules/cipher-base/package.json b/node_modules/browserify/node_modules/crypto-browserify/node_modules/create-hash/node_modules/cipher-base/package.json deleted file mode 100644 index 654e5a65..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/create-hash/node_modules/cipher-base/package.json +++ /dev/null @@ -1,60 +0,0 @@ -{ - "name": "cipher-base", - "version": "1.0.3", - "description": "abstract base class for crypto-streams", - "main": "index.js", - "scripts": { - "test": "node test.js | tspec" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/crypto-browserify/cipher-base.git" - }, - "keywords": [ - "cipher", - "stream" - ], - "author": { - "name": "Calvin Metcalf", - "email": "calvin.metcalf@gmail.com" - }, - "license": "MIT", - "bugs": { - "url": "https://github.com/crypto-browserify/cipher-base/issues" - }, - "homepage": "https://github.com/crypto-browserify/cipher-base#readme", - "dependencies": { - "inherits": "^2.0.1" - }, - "devDependencies": { - "tap-spec": "^4.1.0", - "tape": "^4.2.0" - }, - "gitHead": "de2af9758ce75ef5f9a9bdaf0ba5312609a7e59a", - "_id": "cipher-base@1.0.3", - "_shasum": "eeabf194419ce900da3018c207d212f2a6df0a07", - "_from": "cipher-base@>=1.0.1 <2.0.0", - "_npmVersion": "3.8.6", - "_nodeVersion": "5.12.0", - "_npmUser": { - "name": "cwmma", - "email": "calvin.metcalf@gmail.com" - }, - "dist": { - "shasum": "eeabf194419ce900da3018c207d212f2a6df0a07", - "tarball": "https://registry.npmjs.org/cipher-base/-/cipher-base-1.0.3.tgz" - }, - "maintainers": [ - { - "name": "cwmma", - "email": "calvin.metcalf@gmail.com" - } - ], - "_npmOperationalInternal": { - "host": "packages-16-east.internal.npmjs.com", - "tmp": "tmp/cipher-base-1.0.3.tgz_1473767078206_0.1380389309488237" - }, - "directories": {}, - "_resolved": "https://registry.npmjs.org/cipher-base/-/cipher-base-1.0.3.tgz", - "readme": "ERROR: No README data found!" -} diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/create-hash/node_modules/cipher-base/readme.md b/node_modules/browserify/node_modules/crypto-browserify/node_modules/create-hash/node_modules/cipher-base/readme.md deleted file mode 100644 index db9a7814..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/create-hash/node_modules/cipher-base/readme.md +++ /dev/null @@ -1,17 +0,0 @@ -cipher-base -=== - -[![Build Status](https://travis-ci.org/crypto-browserify/cipher-base.svg)](https://travis-ci.org/crypto-browserify/cipher-base) - -Abstract base class to inherit from if you want to create streams implementing -the same api as node crypto streams. - -Requires you to implement 2 methods `_final` and `_update`. `_update` takes a -buffer and should return a buffer, `_final` takes no arguments and should return -a buffer. - - -The constructor takes one argument and that is a string which if present switches -it into hash mode, i.e. the object you get from crypto.createHash or -crypto.createSign, this switches the name of the final method to be the string -you passed instead of `final` and returns `this` from update. diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/create-hash/node_modules/cipher-base/test.js b/node_modules/browserify/node_modules/crypto-browserify/node_modules/create-hash/node_modules/cipher-base/test.js deleted file mode 100644 index 57d144a5..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/create-hash/node_modules/cipher-base/test.js +++ /dev/null @@ -1,108 +0,0 @@ -var test = require('tape') -var CipherBase = require('./') -var inherits = require('inherits') - -test('basic version', function (t) { - inherits(Cipher, CipherBase) - function Cipher () { - CipherBase.call(this) - } - Cipher.prototype._update = function (input) { - t.ok(Buffer.isBuffer(input)) - return input - } - Cipher.prototype._final = function () { - // noop - } - var cipher = new Cipher() - var utf8 = 'abc123abcd' - var update = cipher.update(utf8, 'utf8', 'base64') + cipher.final('base64') - var string = (new Buffer(update, 'base64')).toString() - t.equals(utf8, string) - t.end() -}) -test('hash mode', function (t) { - inherits(Cipher, CipherBase) - function Cipher () { - CipherBase.call(this, 'finalName') - this._cache = [] - } - Cipher.prototype._update = function (input) { - t.ok(Buffer.isBuffer(input)) - this._cache.push(input) - } - Cipher.prototype._final = function () { - return Buffer.concat(this._cache) - } - var cipher = new Cipher() - var utf8 = 'abc123abcd' - var update = cipher.update(utf8, 'utf8').finalName('base64') - var string = (new Buffer(update, 'base64')).toString() - - t.equals(utf8, string) - t.end() -}) -test('hash mode as stream', function (t) { - inherits(Cipher, CipherBase) - function Cipher () { - CipherBase.call(this, 'finalName') - this._cache = [] - } - Cipher.prototype._update = function (input) { - t.ok(Buffer.isBuffer(input)) - this._cache.push(input) - } - Cipher.prototype._final = function () { - return Buffer.concat(this._cache) - } - var cipher = new Cipher() - cipher.on('error', function (e) { - t.notOk(e) - }) - var utf8 = 'abc123abcd' - cipher.end(utf8, 'utf8') - var update = cipher.read().toString('base64') - var string = (new Buffer(update, 'base64')).toString() - - t.equals(utf8, string) - t.end() -}) -test('encodings', function (t) { - inherits(Cipher, CipherBase) - function Cipher () { - CipherBase.call(this) - } - Cipher.prototype._update = function (input) { - return input - } - Cipher.prototype._final = function () { - // noop - } - t.test('mix and match encoding', function (t) { - t.plan(2) - - var cipher = new Cipher() - cipher.update('foo', 'utf8', 'utf8') - t.throws(function () { - cipher.update('foo', 'utf8', 'base64') - }) - cipher = new Cipher() - cipher.update('foo', 'utf8', 'base64') - t.doesNotThrow(function () { - cipher.update('foo', 'utf8') - cipher.final('base64') - }) - }) - t.test('handle long uft8 plaintexts', function (t) { - t.plan(1) - var txt = 'ふっかつ あきる すぶり はやい つける まゆげ たんさん みんぞく ねほりはほり せまい たいまつばな ひはん' - - var cipher = new Cipher() - var decipher = new Cipher() - var enc = decipher.update(cipher.update(txt, 'utf8', 'base64'), 'base64', 'utf8') - enc += decipher.update(cipher.final('base64'), 'base64', 'utf8') - enc += decipher.final('utf8') - - t.equals(txt, enc) - }) -}) diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/create-hash/node_modules/ripemd160/.npmignore b/node_modules/browserify/node_modules/crypto-browserify/node_modules/create-hash/node_modules/ripemd160/.npmignore deleted file mode 100644 index a091fb10..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/create-hash/node_modules/ripemd160/.npmignore +++ /dev/null @@ -1,5 +0,0 @@ -.gitignore -test/ -.DS_Store -.min-wd -Makefile diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/create-hash/node_modules/ripemd160/CHANGELOG.md b/node_modules/browserify/node_modules/crypto-browserify/node_modules/create-hash/node_modules/ripemd160/CHANGELOG.md deleted file mode 100644 index 9e1e6dfb..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/create-hash/node_modules/ripemd160/CHANGELOG.md +++ /dev/null @@ -1,36 +0,0 @@ -1.0.1 / 2015-05-05 ------------------- -- standard formatting - -1.0.0 / 2015-01-14 ------------------- -- updated dev deps -- added more test fixtures -- updated readme with usage, testing, etc -- moved from https://github.com/cryptocoinjs/ripemd160 to https://github.com/crypto-browserify/ripemd160 - -0.2.1 / 2014-12-31 ------------------- -- made license clear in `package.json` -- deleted `Makefile`, moved targets to `package.json` -- removed `terst` for `assert` - -0.2.0 / 2014-03-09 ------------------- -* removed bower.json and component.json -* changed 4 spacing to 2 -* returns `Buffer` type now, input must be Array, Uint8Array, Buffer, or string -* remove deps: `convert-hex` and `convert-string` - -0.1.0 / 2013-11-20 ------------------- -* changed package name -* removed AMD support - -0.0.2 / 2013-11-06 ------------------- -* fixed component.json file - -0.0.1 / 2013-11-03 ------------------- -* initial release diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/create-hash/node_modules/ripemd160/README.md b/node_modules/browserify/node_modules/crypto-browserify/node_modules/create-hash/node_modules/ripemd160/README.md deleted file mode 100644 index c09f50b1..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/create-hash/node_modules/ripemd160/README.md +++ /dev/null @@ -1,100 +0,0 @@ -ripemd160 -========= - -JavaScript component to compute the RIPEMD-160 hash of strings or bytes. This hash is commonly used in crypto currencies -like Bitcoin. - -Usage ------ - -### Install - - npm install --save ripemd160 - - -### ripemd160(input) - -`input` should be either a `string`, `Buffer`, or an `Array`. It returns a `Buffer`. - -**example 1**: - -```js -var ripemd16 = require('ripemd160') - -var data = 'hello' -var result = ripemd160(data) -console.log(result.toString('hex')) -// => 108f07b8382412612c048d07d13f814118445acd -``` - -**example 2**: - -```js -var ripemd16 = require('ripemd160') - -var data = new Buffer('hello', 'utf8') -var result = ripemd160(data) -console.log(result.toString('hex')) -// => 108f07b8382412612c048d07d13f814118445acd -``` - - -#### Converting Buffers - -If you're not familiar with the Node.js ecosystem, type `Buffer` is a common way that a developer can pass around -binary data. `Buffer` also exists in the [Browserify](http://browserify.org/) environment. Converting to and from Buffers is very easy. - -##### To buffer - -```js -// from string -var buf = new Buffer('some string', 'utf8') - -// from hex string -var buf = new Buffer('3f5a4c22', 'hex') - -// from array -var buf = new Buffer([1, 2, 3, 4]) -``` - -#### From buffer - -```js -// to string -var str = buf.toString('utf8') - -// to hex string -var hex = buf.toString('hex') - -// to array -var arr = [].slice.call(buf) -``` - - -Testing -------- - -### Install dev deps: - - npm install --development - -### Test in Node.js: - - npm run test - -### Test in a Browser: - -Testing in the browser uses the excellent [Mochify](https://github.com/mantoni/mochify.js). Mochify can use either PhantomJS -or an actual browser. You must have Selenium installed if you want to use an actual browser. The easiest way is to -`npm install -g start-selenium` and then run `start-selenium`. - -Then run: - - npm run browser-test - - - -License -------- - -Licensed: BSD3-Clause diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/create-hash/node_modules/ripemd160/lib/ripemd160.js b/node_modules/browserify/node_modules/crypto-browserify/node_modules/create-hash/node_modules/ripemd160/lib/ripemd160.js deleted file mode 100644 index a96ac5b3..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/create-hash/node_modules/ripemd160/lib/ripemd160.js +++ /dev/null @@ -1,210 +0,0 @@ -/* -CryptoJS v3.1.2 -code.google.com/p/crypto-js -(c) 2009-2013 by Jeff Mott. All rights reserved. -code.google.com/p/crypto-js/wiki/License -*/ -/** @preserve -(c) 2012 by Cédric Mesnil. All rights reserved. - -Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - - - Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. - - Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -// constants table -var zl = [ - 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, - 7, 4, 13, 1, 10, 6, 15, 3, 12, 0, 9, 5, 2, 14, 11, 8, - 3, 10, 14, 4, 9, 15, 8, 1, 2, 7, 0, 6, 13, 11, 5, 12, - 1, 9, 11, 10, 0, 8, 12, 4, 13, 3, 7, 15, 14, 5, 6, 2, - 4, 0, 5, 9, 7, 12, 2, 10, 14, 1, 3, 8, 11, 6, 15, 13 -] - -var zr = [ - 5, 14, 7, 0, 9, 2, 11, 4, 13, 6, 15, 8, 1, 10, 3, 12, - 6, 11, 3, 7, 0, 13, 5, 10, 14, 15, 8, 12, 4, 9, 1, 2, - 15, 5, 1, 3, 7, 14, 6, 9, 11, 8, 12, 2, 10, 0, 4, 13, - 8, 6, 4, 1, 3, 11, 15, 0, 5, 12, 2, 13, 9, 7, 10, 14, - 12, 15, 10, 4, 1, 5, 8, 7, 6, 2, 13, 14, 0, 3, 9, 11 -] - -var sl = [ - 11, 14, 15, 12, 5, 8, 7, 9, 11, 13, 14, 15, 6, 7, 9, 8, - 7, 6, 8, 13, 11, 9, 7, 15, 7, 12, 15, 9, 11, 7, 13, 12, - 11, 13, 6, 7, 14, 9, 13, 15, 14, 8, 13, 6, 5, 12, 7, 5, - 11, 12, 14, 15, 14, 15, 9, 8, 9, 14, 5, 6, 8, 6, 5, 12, - 9, 15, 5, 11, 6, 8, 13, 12, 5, 12, 13, 14, 11, 8, 5, 6 -] - -var sr = [ - 8, 9, 9, 11, 13, 15, 15, 5, 7, 7, 8, 11, 14, 14, 12, 6, - 9, 13, 15, 7, 12, 8, 9, 11, 7, 7, 12, 7, 6, 15, 13, 11, - 9, 7, 15, 11, 8, 6, 6, 14, 12, 13, 5, 14, 13, 13, 7, 5, - 15, 5, 8, 11, 14, 14, 6, 14, 6, 9, 12, 9, 12, 5, 15, 8, - 8, 5, 12, 9, 12, 5, 14, 6, 8, 13, 6, 5, 15, 13, 11, 11 -] - -var hl = [0x00000000, 0x5A827999, 0x6ED9EBA1, 0x8F1BBCDC, 0xA953FD4E] -var hr = [0x50A28BE6, 0x5C4DD124, 0x6D703EF3, 0x7A6D76E9, 0x00000000] - -function bytesToWords (bytes) { - var words = [] - for (var i = 0, b = 0; i < bytes.length; i++, b += 8) { - words[b >>> 5] |= bytes[i] << (24 - b % 32) - } - return words -} - -function wordsToBytes (words) { - var bytes = [] - for (var b = 0; b < words.length * 32; b += 8) { - bytes.push((words[b >>> 5] >>> (24 - b % 32)) & 0xFF) - } - return bytes -} - -function processBlock (H, M, offset) { - // swap endian - for (var i = 0; i < 16; i++) { - var offset_i = offset + i - var M_offset_i = M[offset_i] - - // Swap - M[offset_i] = ( - (((M_offset_i << 8) | (M_offset_i >>> 24)) & 0x00ff00ff) | - (((M_offset_i << 24) | (M_offset_i >>> 8)) & 0xff00ff00) - ) - } - - // Working variables - var al, bl, cl, dl, el - var ar, br, cr, dr, er - - ar = al = H[0] - br = bl = H[1] - cr = cl = H[2] - dr = dl = H[3] - er = el = H[4] - - // computation - var t - for (i = 0; i < 80; i += 1) { - t = (al + M[offset + zl[i]]) | 0 - if (i < 16) { - t += f1(bl, cl, dl) + hl[0] - } else if (i < 32) { - t += f2(bl, cl, dl) + hl[1] - } else if (i < 48) { - t += f3(bl, cl, dl) + hl[2] - } else if (i < 64) { - t += f4(bl, cl, dl) + hl[3] - } else {// if (i<80) { - t += f5(bl, cl, dl) + hl[4] - } - t = t | 0 - t = rotl(t, sl[i]) - t = (t + el) | 0 - al = el - el = dl - dl = rotl(cl, 10) - cl = bl - bl = t - - t = (ar + M[offset + zr[i]]) | 0 - if (i < 16) { - t += f5(br, cr, dr) + hr[0] - } else if (i < 32) { - t += f4(br, cr, dr) + hr[1] - } else if (i < 48) { - t += f3(br, cr, dr) + hr[2] - } else if (i < 64) { - t += f2(br, cr, dr) + hr[3] - } else {// if (i<80) { - t += f1(br, cr, dr) + hr[4] - } - - t = t | 0 - t = rotl(t, sr[i]) - t = (t + er) | 0 - ar = er - er = dr - dr = rotl(cr, 10) - cr = br - br = t - } - - // intermediate hash value - t = (H[1] + cl + dr) | 0 - H[1] = (H[2] + dl + er) | 0 - H[2] = (H[3] + el + ar) | 0 - H[3] = (H[4] + al + br) | 0 - H[4] = (H[0] + bl + cr) | 0 - H[0] = t -} - -function f1 (x, y, z) { - return ((x) ^ (y) ^ (z)) -} - -function f2 (x, y, z) { - return (((x) & (y)) | ((~x) & (z))) -} - -function f3 (x, y, z) { - return (((x) | (~(y))) ^ (z)) -} - -function f4 (x, y, z) { - return (((x) & (z)) | ((y) & (~(z)))) -} - -function f5 (x, y, z) { - return ((x) ^ ((y) | (~(z)))) -} - -function rotl (x, n) { - return (x << n) | (x >>> (32 - n)) -} - -function ripemd160 (message) { - var H = [0x67452301, 0xEFCDAB89, 0x98BADCFE, 0x10325476, 0xC3D2E1F0] - - if (typeof message === 'string') { - message = new Buffer(message, 'utf8') - } - - var m = bytesToWords(message) - - var nBitsLeft = message.length * 8 - var nBitsTotal = message.length * 8 - - // Add padding - m[nBitsLeft >>> 5] |= 0x80 << (24 - nBitsLeft % 32) - m[(((nBitsLeft + 64) >>> 9) << 4) + 14] = ( - (((nBitsTotal << 8) | (nBitsTotal >>> 24)) & 0x00ff00ff) | - (((nBitsTotal << 24) | (nBitsTotal >>> 8)) & 0xff00ff00) - ) - - for (var i = 0; i < m.length; i += 16) { - processBlock(H, m, i) - } - - // swap endian - for (i = 0; i < 5; i++) { - // shortcut - var H_i = H[i] - - // Swap - H[i] = (((H_i << 8) | (H_i >>> 24)) & 0x00ff00ff) | - (((H_i << 24) | (H_i >>> 8)) & 0xff00ff00) - } - - var digestbytes = wordsToBytes(H) - return new Buffer(digestbytes) -} - -module.exports = ripemd160 diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/create-hash/node_modules/ripemd160/package.json b/node_modules/browserify/node_modules/crypto-browserify/node_modules/create-hash/node_modules/ripemd160/package.json deleted file mode 100644 index 21a2b9ae..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/create-hash/node_modules/ripemd160/package.json +++ /dev/null @@ -1,81 +0,0 @@ -{ - "name": "ripemd160", - "version": "1.0.1", - "description": "Compute ripemd160 of bytes or strings.", - "keywords": [ - "string", - "strings", - "ripemd160", - "ripe160", - "bitcoin", - "bytes", - "cryptography" - ], - "license": "BSD-3-Clause", - "devDependencies": { - "mocha": "^2.1.0", - "mochify": "^2.1.1", - "standard": "3.x" - }, - "repository": { - "url": "https://github.com/crypto-browserify/ripemd160", - "type": "git" - }, - "main": "./lib/ripemd160.js", - "dependencies": {}, - "scripts": { - "test": "mocha test", - "browser-test": "mochify --wd -R spec" - }, - "gitHead": "42172c6527a55a24a9ee306996b4a8578d4780db", - "bugs": { - "url": "https://github.com/crypto-browserify/ripemd160/issues" - }, - "homepage": "https://github.com/crypto-browserify/ripemd160", - "_id": "ripemd160@1.0.1", - "_shasum": "93a4bbd4942bc574b69a8fa57c71de10ecca7d6e", - "_from": "ripemd160@>=1.0.0 <2.0.0", - "_npmVersion": "2.3.0", - "_nodeVersion": "0.10.32", - "_npmUser": { - "name": "jprichardson", - "email": "jprichardson@gmail.com" - }, - "maintainers": [ - { - "name": "vbuterin", - "email": "vbuterin@gmail.com" - }, - { - "name": "midnightlightning", - "email": "boydb@midnightdesign.ws" - }, - { - "name": "nadav", - "email": "npm@shesek.info" - }, - { - "name": "dcousens", - "email": "email@dcousens.com" - }, - { - "name": "dominictarr", - "email": "dominic.tarr@gmail.com" - }, - { - "name": "cwmma", - "email": "calvin.metcalf@gmail.com" - }, - { - "name": "jprichardson", - "email": "jprichardson@gmail.com" - } - ], - "dist": { - "shasum": "93a4bbd4942bc574b69a8fa57c71de10ecca7d6e", - "tarball": "https://registry.npmjs.org/ripemd160/-/ripemd160-1.0.1.tgz" - }, - "directories": {}, - "_resolved": "https://registry.npmjs.org/ripemd160/-/ripemd160-1.0.1.tgz", - "readme": "ERROR: No README data found!" -} diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/create-hash/node_modules/sha.js/.npmignore b/node_modules/browserify/node_modules/crypto-browserify/node_modules/create-hash/node_modules/sha.js/.npmignore deleted file mode 100644 index 3c3629e6..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/create-hash/node_modules/sha.js/.npmignore +++ /dev/null @@ -1 +0,0 @@ -node_modules diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/create-hash/node_modules/sha.js/.travis.yml b/node_modules/browserify/node_modules/crypto-browserify/node_modules/create-hash/node_modules/sha.js/.travis.yml deleted file mode 100644 index cbc0adb7..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/create-hash/node_modules/sha.js/.travis.yml +++ /dev/null @@ -1,19 +0,0 @@ -sudo: false -os: - - linux -language: node_js -node_js: - - "0.10" - - "0.11" - - "0.12" - - "4" - - "5" - - "6" -env: - matrix: - - TEST_SUITE=unit -matrix: - include: - - node_js: "4" - env: TEST_SUITE=lint -script: npm run $TEST_SUITE diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/create-hash/node_modules/sha.js/LICENSE b/node_modules/browserify/node_modules/crypto-browserify/node_modules/create-hash/node_modules/sha.js/LICENSE deleted file mode 100644 index 92ba9d30..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/create-hash/node_modules/sha.js/LICENSE +++ /dev/null @@ -1,22 +0,0 @@ -Copyright (c) 2013-2014 sha.js contributors - -Permission is hereby granted, free of charge, -to any person obtaining a copy of this software and -associated documentation files (the "Software"), to -deal in the Software without restriction, including -without limitation the rights to use, copy, modify, -merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom -the Software is furnished to do so, -subject to the following conditions: - -The above copyright notice and this permission notice -shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES -OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR -ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/create-hash/node_modules/sha.js/README.md b/node_modules/browserify/node_modules/crypto-browserify/node_modules/create-hash/node_modules/sha.js/README.md deleted file mode 100644 index fbce2319..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/create-hash/node_modules/sha.js/README.md +++ /dev/null @@ -1,54 +0,0 @@ -# sha.js - -Streamable SHA hashes in pure javascript. - -[![build status](https://secure.travis-ci.org/crypto-browserify/sha.js.png)](http://travis-ci.org/crypto-browserify/sha.js) -[![NPM](http://img.shields.io/npm/v/sha.js.svg)](https://www.npmjs.org/package/sha.js) - - -## Example - -``` js -var createHash = require('sha.js') - -var sha256 = createHash('sha256') -var sha512 = createHash('sha512') - -var h = sha256.update('abc', 'utf8').digest('hex') -console.log(h) //ba7816bf8f01cfea414140de5dae2223b00361a396177a9cb410ff61f20015ad - -//LEGACY, do not use in new systems: -var sha0 = createHash('sha') -var sha1 = createHash('sha1') - - -``` - -## supported hashes - -sha.js currently implements: - - -* sha256 -* sha512 -* sha1 (legacy, no not use in new systems) -* sha (legacy, no not use in new systems) - -## Note - -Note, this doesn't actually implement a stream, but wrapping this in a stream is trivial. -but is does update incrementally, so you can hash things larger than ram, and also, since it reuses -the typedarrays, it uses a constant amount of memory (except when using base64 or utf8 encoding, -see code comments) - - -## Acknowledgements - -This work is derived from Paul Johnston's ["A JavaScript implementation of the Secure Hash Algorithm"] -(http://pajhome.org.uk/crypt/md5/sha1.html) - - - -## License - -MIT diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/create-hash/node_modules/sha.js/bin.js b/node_modules/browserify/node_modules/crypto-browserify/node_modules/create-hash/node_modules/sha.js/bin.js deleted file mode 100755 index 0a4e95bf..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/create-hash/node_modules/sha.js/bin.js +++ /dev/null @@ -1,43 +0,0 @@ -#! /usr/bin/env node - -var createHash = require('./browserify') -var argv = process.argv.slice(2) - -function pipe (algorithm, s) { - var start = Date.now() - var hash = createHash(algorithm || 'sha1') - - s.on('data', function (data) { - hash.update(data) - }) - - s.on('end', function () { - if (process.env.DEBUG) { - return console.log(hash.digest('hex'), Date.now() - start) - } - - console.log(hash.digest('hex')) - }) -} - -function usage () { - console.error('sha.js [algorithm=sha1] [filename] # hash filename with algorithm') - console.error('input | sha.js [algorithm=sha1] # hash stdin with algorithm') - console.error('sha.js --help # display this message') -} - -if (!process.stdin.isTTY) { - pipe(argv[0], process.stdin) - -} else if (argv.length) { - if (/--help|-h/.test(argv[0])) { - usage() - - } else { - var filename = argv.pop() - var algorithm = argv.pop() - pipe(algorithm, require('fs').createReadStream(filename)) - } -} else { - usage() -} diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/create-hash/node_modules/sha.js/hash.js b/node_modules/browserify/node_modules/crypto-browserify/node_modules/create-hash/node_modules/sha.js/hash.js deleted file mode 100644 index 09579d2d..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/create-hash/node_modules/sha.js/hash.js +++ /dev/null @@ -1,69 +0,0 @@ -// prototype class for hash functions -function Hash (blockSize, finalSize) { - this._block = new Buffer(blockSize) - this._finalSize = finalSize - this._blockSize = blockSize - this._len = 0 - this._s = 0 -} - -Hash.prototype.update = function (data, enc) { - if (typeof data === 'string') { - enc = enc || 'utf8' - data = new Buffer(data, enc) - } - - var l = this._len += data.length - var s = this._s || 0 - var f = 0 - var buffer = this._block - - while (s < l) { - var t = Math.min(data.length, f + this._blockSize - (s % this._blockSize)) - var ch = (t - f) - - for (var i = 0; i < ch; i++) { - buffer[(s % this._blockSize) + i] = data[i + f] - } - - s += ch - f += ch - - if ((s % this._blockSize) === 0) { - this._update(buffer) - } - } - this._s = s - - return this -} - -Hash.prototype.digest = function (enc) { - // Suppose the length of the message M, in bits, is l - var l = this._len * 8 - - // Append the bit 1 to the end of the message - this._block[this._len % this._blockSize] = 0x80 - - // and then k zero bits, where k is the smallest non-negative solution to the equation (l + 1 + k) === finalSize mod blockSize - this._block.fill(0, this._len % this._blockSize + 1) - - if (l % (this._blockSize * 8) >= this._finalSize * 8) { - this._update(this._block) - this._block.fill(0) - } - - // to this append the block which is equal to the number l written in binary - // TODO: handle case where l is > Math.pow(2, 29) - this._block.writeInt32BE(l, this._blockSize - 4) - - var hash = this._update(this._block) || this._hash() - - return enc ? hash.toString(enc) : hash -} - -Hash.prototype._update = function () { - throw new Error('_update must be implemented by subclass') -} - -module.exports = Hash diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/create-hash/node_modules/sha.js/hexpp.js b/node_modules/browserify/node_modules/crypto-browserify/node_modules/create-hash/node_modules/sha.js/hexpp.js deleted file mode 100644 index 4f1e9219..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/create-hash/node_modules/sha.js/hexpp.js +++ /dev/null @@ -1,26 +0,0 @@ -function toHex (buf, group, wrap, LE) { - buf = buf.buffer || buf - var s = '' - var l = buf.byteLength || buf.length - for (var i = 0; i < l ; i++) { - var byteParam = (i & 0xfffffffc) | (!LE ? i % 4 : 3 - i % 4) - s += ((buf[byteParam] >> 4).toString(16)) + - ((buf[byteParam] & 0xf).toString(16)) + - (group - 1 === i % group ? ' ' : '') + - (wrap - 1 === i % wrap ? '\n' : '') - } - return s -} - -var hexpp = module.exports = function hexpp (buffer, opts) { - opts = opts || {} - opts.groups = opts.groups || 4 - opts.wrap = opts.wrap || 16 - return toHex(buffer, opts.groups, opts.wrap, opts.bigendian, opts.ints) -} - -hexpp.defaults = function (opts) { - return function (b) { - return hexpp(b, opts) - } -} diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/create-hash/node_modules/sha.js/index.js b/node_modules/browserify/node_modules/crypto-browserify/node_modules/create-hash/node_modules/sha.js/index.js deleted file mode 100644 index 87cdf493..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/create-hash/node_modules/sha.js/index.js +++ /dev/null @@ -1,15 +0,0 @@ -var exports = module.exports = function SHA (algorithm) { - algorithm = algorithm.toLowerCase() - - var Algorithm = exports[algorithm] - if (!Algorithm) throw new Error(algorithm + ' is not supported (we accept pull requests)') - - return new Algorithm() -} - -exports.sha = require('./sha') -exports.sha1 = require('./sha1') -exports.sha224 = require('./sha224') -exports.sha256 = require('./sha256') -exports.sha384 = require('./sha384') -exports.sha512 = require('./sha512') diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/create-hash/node_modules/sha.js/package.json b/node_modules/browserify/node_modules/crypto-browserify/node_modules/create-hash/node_modules/sha.js/package.json deleted file mode 100644 index a7c0c55d..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/create-hash/node_modules/sha.js/package.json +++ /dev/null @@ -1,69 +0,0 @@ -{ - "name": "sha.js", - "description": "Streamable SHA hashes in pure javascript", - "version": "2.4.8", - "homepage": "https://github.com/crypto-browserify/sha.js", - "repository": { - "type": "git", - "url": "git://github.com/crypto-browserify/sha.js.git" - }, - "dependencies": { - "inherits": "^2.0.1" - }, - "devDependencies": { - "buffer": "~2.3.2", - "hash-test-vectors": "^1.3.1", - "standard": "^4.0.0", - "tape": "~2.3.2", - "typedarray": "0.0.6" - }, - "bin": { - "sha.js": "./bin.js" - }, - "scripts": { - "prepublish": "npm ls && npm run unit", - "lint": "standard", - "test": "npm run lint && npm run unit", - "unit": "set -e; for t in test/*.js; do node $t; done;" - }, - "author": { - "name": "Dominic Tarr", - "email": "dominic.tarr@gmail.com", - "url": "dominictarr.com" - }, - "license": "MIT", - "gitHead": "c233442bbd5695863d03155511d61bc8dcc63652", - "bugs": { - "url": "https://github.com/crypto-browserify/sha.js/issues" - }, - "_id": "sha.js@2.4.8", - "_shasum": "37068c2c476b6baf402d14a49c67f597921f634f", - "_from": "sha.js@>=2.3.6 <3.0.0", - "_npmVersion": "3.10.9", - "_nodeVersion": "7.1.0", - "_npmUser": { - "name": "dcousens", - "email": "email@dcousens.com" - }, - "dist": { - "shasum": "37068c2c476b6baf402d14a49c67f597921f634f", - "tarball": "https://registry.npmjs.org/sha.js/-/sha.js-2.4.8.tgz" - }, - "maintainers": [ - { - "name": "dominictarr", - "email": "dominic.tarr@gmail.com" - }, - { - "name": "dcousens", - "email": "email@dcousens.com" - } - ], - "_npmOperationalInternal": { - "host": "packages-18-east.internal.npmjs.com", - "tmp": "tmp/sha.js-2.4.8.tgz_1478821351146_0.4951752780470997" - }, - "directories": {}, - "_resolved": "https://registry.npmjs.org/sha.js/-/sha.js-2.4.8.tgz", - "readme": "ERROR: No README data found!" -} diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/create-hash/node_modules/sha.js/sha.js b/node_modules/browserify/node_modules/crypto-browserify/node_modules/create-hash/node_modules/sha.js/sha.js deleted file mode 100644 index 7cde1b0c..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/create-hash/node_modules/sha.js/sha.js +++ /dev/null @@ -1,93 +0,0 @@ -/* - * A JavaScript implementation of the Secure Hash Algorithm, SHA-0, as defined - * in FIPS PUB 180-1 - * This source code is derived from sha1.js of the same repository. - * The difference between SHA-0 and SHA-1 is just a bitwise rotate left - * operation was added. - */ - -var inherits = require('inherits') -var Hash = require('./hash') - -var K = [ - 0x5a827999, 0x6ed9eba1, 0x8f1bbcdc | 0, 0xca62c1d6 | 0 -] - -var W = new Array(80) - -function Sha () { - this.init() - this._w = W - - Hash.call(this, 64, 56) -} - -inherits(Sha, Hash) - -Sha.prototype.init = function () { - this._a = 0x67452301 - this._b = 0xefcdab89 - this._c = 0x98badcfe - this._d = 0x10325476 - this._e = 0xc3d2e1f0 - - return this -} - -function rotl5 (num) { - return (num << 5) | (num >>> 27) -} - -function rotl30 (num) { - return (num << 30) | (num >>> 2) -} - -function ft (s, b, c, d) { - if (s === 0) return (b & c) | ((~b) & d) - if (s === 2) return (b & c) | (b & d) | (c & d) - return b ^ c ^ d -} - -Sha.prototype._update = function (M) { - var W = this._w - - var a = this._a | 0 - var b = this._b | 0 - var c = this._c | 0 - var d = this._d | 0 - var e = this._e | 0 - - for (var i = 0; i < 16; ++i) W[i] = M.readInt32BE(i * 4) - for (; i < 80; ++i) W[i] = W[i - 3] ^ W[i - 8] ^ W[i - 14] ^ W[i - 16] - - for (var j = 0; j < 80; ++j) { - var s = ~~(j / 20) - var t = (rotl5(a) + ft(s, b, c, d) + e + W[j] + K[s]) | 0 - - e = d - d = c - c = rotl30(b) - b = a - a = t - } - - this._a = (a + this._a) | 0 - this._b = (b + this._b) | 0 - this._c = (c + this._c) | 0 - this._d = (d + this._d) | 0 - this._e = (e + this._e) | 0 -} - -Sha.prototype._hash = function () { - var H = new Buffer(20) - - H.writeInt32BE(this._a | 0, 0) - H.writeInt32BE(this._b | 0, 4) - H.writeInt32BE(this._c | 0, 8) - H.writeInt32BE(this._d | 0, 12) - H.writeInt32BE(this._e | 0, 16) - - return H -} - -module.exports = Sha diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/create-hash/node_modules/sha.js/sha1.js b/node_modules/browserify/node_modules/crypto-browserify/node_modules/create-hash/node_modules/sha.js/sha1.js deleted file mode 100644 index 97f6b142..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/create-hash/node_modules/sha.js/sha1.js +++ /dev/null @@ -1,98 +0,0 @@ -/* - * A JavaScript implementation of the Secure Hash Algorithm, SHA-1, as defined - * in FIPS PUB 180-1 - * Version 2.1a Copyright Paul Johnston 2000 - 2002. - * Other contributors: Greg Holt, Andrew Kepert, Ydnar, Lostinet - * Distributed under the BSD License - * See http://pajhome.org.uk/crypt/md5 for details. - */ - -var inherits = require('inherits') -var Hash = require('./hash') - -var K = [ - 0x5a827999, 0x6ed9eba1, 0x8f1bbcdc | 0, 0xca62c1d6 | 0 -] - -var W = new Array(80) - -function Sha1 () { - this.init() - this._w = W - - Hash.call(this, 64, 56) -} - -inherits(Sha1, Hash) - -Sha1.prototype.init = function () { - this._a = 0x67452301 - this._b = 0xefcdab89 - this._c = 0x98badcfe - this._d = 0x10325476 - this._e = 0xc3d2e1f0 - - return this -} - -function rotl1 (num) { - return (num << 1) | (num >>> 31) -} - -function rotl5 (num) { - return (num << 5) | (num >>> 27) -} - -function rotl30 (num) { - return (num << 30) | (num >>> 2) -} - -function ft (s, b, c, d) { - if (s === 0) return (b & c) | ((~b) & d) - if (s === 2) return (b & c) | (b & d) | (c & d) - return b ^ c ^ d -} - -Sha1.prototype._update = function (M) { - var W = this._w - - var a = this._a | 0 - var b = this._b | 0 - var c = this._c | 0 - var d = this._d | 0 - var e = this._e | 0 - - for (var i = 0; i < 16; ++i) W[i] = M.readInt32BE(i * 4) - for (; i < 80; ++i) W[i] = rotl1(W[i - 3] ^ W[i - 8] ^ W[i - 14] ^ W[i - 16]) - - for (var j = 0; j < 80; ++j) { - var s = ~~(j / 20) - var t = (rotl5(a) + ft(s, b, c, d) + e + W[j] + K[s]) | 0 - - e = d - d = c - c = rotl30(b) - b = a - a = t - } - - this._a = (a + this._a) | 0 - this._b = (b + this._b) | 0 - this._c = (c + this._c) | 0 - this._d = (d + this._d) | 0 - this._e = (e + this._e) | 0 -} - -Sha1.prototype._hash = function () { - var H = new Buffer(20) - - H.writeInt32BE(this._a | 0, 0) - H.writeInt32BE(this._b | 0, 4) - H.writeInt32BE(this._c | 0, 8) - H.writeInt32BE(this._d | 0, 12) - H.writeInt32BE(this._e | 0, 16) - - return H -} - -module.exports = Sha1 diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/create-hash/node_modules/sha.js/sha224.js b/node_modules/browserify/node_modules/crypto-browserify/node_modules/create-hash/node_modules/sha.js/sha224.js deleted file mode 100644 index 31899ef4..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/create-hash/node_modules/sha.js/sha224.js +++ /dev/null @@ -1,52 +0,0 @@ -/** - * A JavaScript implementation of the Secure Hash Algorithm, SHA-256, as defined - * in FIPS 180-2 - * Version 2.2-beta Copyright Angel Marin, Paul Johnston 2000 - 2009. - * Other contributors: Greg Holt, Andrew Kepert, Ydnar, Lostinet - * - */ - -var inherits = require('inherits') -var Sha256 = require('./sha256') -var Hash = require('./hash') - -var W = new Array(64) - -function Sha224 () { - this.init() - - this._w = W // new Array(64) - - Hash.call(this, 64, 56) -} - -inherits(Sha224, Sha256) - -Sha224.prototype.init = function () { - this._a = 0xc1059ed8 - this._b = 0x367cd507 - this._c = 0x3070dd17 - this._d = 0xf70e5939 - this._e = 0xffc00b31 - this._f = 0x68581511 - this._g = 0x64f98fa7 - this._h = 0xbefa4fa4 - - return this -} - -Sha224.prototype._hash = function () { - var H = new Buffer(28) - - H.writeInt32BE(this._a, 0) - H.writeInt32BE(this._b, 4) - H.writeInt32BE(this._c, 8) - H.writeInt32BE(this._d, 12) - H.writeInt32BE(this._e, 16) - H.writeInt32BE(this._f, 20) - H.writeInt32BE(this._g, 24) - - return H -} - -module.exports = Sha224 diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/create-hash/node_modules/sha.js/sha256.js b/node_modules/browserify/node_modules/crypto-browserify/node_modules/create-hash/node_modules/sha.js/sha256.js deleted file mode 100644 index 69b60fef..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/create-hash/node_modules/sha.js/sha256.js +++ /dev/null @@ -1,134 +0,0 @@ -/** - * A JavaScript implementation of the Secure Hash Algorithm, SHA-256, as defined - * in FIPS 180-2 - * Version 2.2-beta Copyright Angel Marin, Paul Johnston 2000 - 2009. - * Other contributors: Greg Holt, Andrew Kepert, Ydnar, Lostinet - * - */ - -var inherits = require('inherits') -var Hash = require('./hash') - -var K = [ - 0x428A2F98, 0x71374491, 0xB5C0FBCF, 0xE9B5DBA5, - 0x3956C25B, 0x59F111F1, 0x923F82A4, 0xAB1C5ED5, - 0xD807AA98, 0x12835B01, 0x243185BE, 0x550C7DC3, - 0x72BE5D74, 0x80DEB1FE, 0x9BDC06A7, 0xC19BF174, - 0xE49B69C1, 0xEFBE4786, 0x0FC19DC6, 0x240CA1CC, - 0x2DE92C6F, 0x4A7484AA, 0x5CB0A9DC, 0x76F988DA, - 0x983E5152, 0xA831C66D, 0xB00327C8, 0xBF597FC7, - 0xC6E00BF3, 0xD5A79147, 0x06CA6351, 0x14292967, - 0x27B70A85, 0x2E1B2138, 0x4D2C6DFC, 0x53380D13, - 0x650A7354, 0x766A0ABB, 0x81C2C92E, 0x92722C85, - 0xA2BFE8A1, 0xA81A664B, 0xC24B8B70, 0xC76C51A3, - 0xD192E819, 0xD6990624, 0xF40E3585, 0x106AA070, - 0x19A4C116, 0x1E376C08, 0x2748774C, 0x34B0BCB5, - 0x391C0CB3, 0x4ED8AA4A, 0x5B9CCA4F, 0x682E6FF3, - 0x748F82EE, 0x78A5636F, 0x84C87814, 0x8CC70208, - 0x90BEFFFA, 0xA4506CEB, 0xBEF9A3F7, 0xC67178F2 -] - -var W = new Array(64) - -function Sha256 () { - this.init() - - this._w = W // new Array(64) - - Hash.call(this, 64, 56) -} - -inherits(Sha256, Hash) - -Sha256.prototype.init = function () { - this._a = 0x6a09e667 - this._b = 0xbb67ae85 - this._c = 0x3c6ef372 - this._d = 0xa54ff53a - this._e = 0x510e527f - this._f = 0x9b05688c - this._g = 0x1f83d9ab - this._h = 0x5be0cd19 - - return this -} - -function ch (x, y, z) { - return z ^ (x & (y ^ z)) -} - -function maj (x, y, z) { - return (x & y) | (z & (x | y)) -} - -function sigma0 (x) { - return (x >>> 2 | x << 30) ^ (x >>> 13 | x << 19) ^ (x >>> 22 | x << 10) -} - -function sigma1 (x) { - return (x >>> 6 | x << 26) ^ (x >>> 11 | x << 21) ^ (x >>> 25 | x << 7) -} - -function gamma0 (x) { - return (x >>> 7 | x << 25) ^ (x >>> 18 | x << 14) ^ (x >>> 3) -} - -function gamma1 (x) { - return (x >>> 17 | x << 15) ^ (x >>> 19 | x << 13) ^ (x >>> 10) -} - -Sha256.prototype._update = function (M) { - var W = this._w - - var a = this._a | 0 - var b = this._b | 0 - var c = this._c | 0 - var d = this._d | 0 - var e = this._e | 0 - var f = this._f | 0 - var g = this._g | 0 - var h = this._h | 0 - - for (var i = 0; i < 16; ++i) W[i] = M.readInt32BE(i * 4) - for (; i < 64; ++i) W[i] = (gamma1(W[i - 2]) + W[i - 7] + gamma0(W[i - 15]) + W[i - 16]) | 0 - - for (var j = 0; j < 64; ++j) { - var T1 = (h + sigma1(e) + ch(e, f, g) + K[j] + W[j]) | 0 - var T2 = (sigma0(a) + maj(a, b, c)) | 0 - - h = g - g = f - f = e - e = (d + T1) | 0 - d = c - c = b - b = a - a = (T1 + T2) | 0 - } - - this._a = (a + this._a) | 0 - this._b = (b + this._b) | 0 - this._c = (c + this._c) | 0 - this._d = (d + this._d) | 0 - this._e = (e + this._e) | 0 - this._f = (f + this._f) | 0 - this._g = (g + this._g) | 0 - this._h = (h + this._h) | 0 -} - -Sha256.prototype._hash = function () { - var H = new Buffer(32) - - H.writeInt32BE(this._a, 0) - H.writeInt32BE(this._b, 4) - H.writeInt32BE(this._c, 8) - H.writeInt32BE(this._d, 12) - H.writeInt32BE(this._e, 16) - H.writeInt32BE(this._f, 20) - H.writeInt32BE(this._g, 24) - H.writeInt32BE(this._h, 28) - - return H -} - -module.exports = Sha256 diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/create-hash/node_modules/sha.js/sha384.js b/node_modules/browserify/node_modules/crypto-browserify/node_modules/create-hash/node_modules/sha.js/sha384.js deleted file mode 100644 index dc483120..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/create-hash/node_modules/sha.js/sha384.js +++ /dev/null @@ -1,56 +0,0 @@ -var inherits = require('inherits') -var SHA512 = require('./sha512') -var Hash = require('./hash') - -var W = new Array(160) - -function Sha384 () { - this.init() - this._w = W - - Hash.call(this, 128, 112) -} - -inherits(Sha384, SHA512) - -Sha384.prototype.init = function () { - this._ah = 0xcbbb9d5d - this._bh = 0x629a292a - this._ch = 0x9159015a - this._dh = 0x152fecd8 - this._eh = 0x67332667 - this._fh = 0x8eb44a87 - this._gh = 0xdb0c2e0d - this._hh = 0x47b5481d - - this._al = 0xc1059ed8 - this._bl = 0x367cd507 - this._cl = 0x3070dd17 - this._dl = 0xf70e5939 - this._el = 0xffc00b31 - this._fl = 0x68581511 - this._gl = 0x64f98fa7 - this._hl = 0xbefa4fa4 - - return this -} - -Sha384.prototype._hash = function () { - var H = new Buffer(48) - - function writeInt64BE (h, l, offset) { - H.writeInt32BE(h, offset) - H.writeInt32BE(l, offset + 4) - } - - writeInt64BE(this._ah, this._al, 0) - writeInt64BE(this._bh, this._bl, 8) - writeInt64BE(this._ch, this._cl, 16) - writeInt64BE(this._dh, this._dl, 24) - writeInt64BE(this._eh, this._el, 32) - writeInt64BE(this._fh, this._fl, 40) - - return H -} - -module.exports = Sha384 diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/create-hash/node_modules/sha.js/sha512.js b/node_modules/browserify/node_modules/crypto-browserify/node_modules/create-hash/node_modules/sha.js/sha512.js deleted file mode 100644 index 204a7b83..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/create-hash/node_modules/sha.js/sha512.js +++ /dev/null @@ -1,259 +0,0 @@ -var inherits = require('inherits') -var Hash = require('./hash') - -var K = [ - 0x428a2f98, 0xd728ae22, 0x71374491, 0x23ef65cd, - 0xb5c0fbcf, 0xec4d3b2f, 0xe9b5dba5, 0x8189dbbc, - 0x3956c25b, 0xf348b538, 0x59f111f1, 0xb605d019, - 0x923f82a4, 0xaf194f9b, 0xab1c5ed5, 0xda6d8118, - 0xd807aa98, 0xa3030242, 0x12835b01, 0x45706fbe, - 0x243185be, 0x4ee4b28c, 0x550c7dc3, 0xd5ffb4e2, - 0x72be5d74, 0xf27b896f, 0x80deb1fe, 0x3b1696b1, - 0x9bdc06a7, 0x25c71235, 0xc19bf174, 0xcf692694, - 0xe49b69c1, 0x9ef14ad2, 0xefbe4786, 0x384f25e3, - 0x0fc19dc6, 0x8b8cd5b5, 0x240ca1cc, 0x77ac9c65, - 0x2de92c6f, 0x592b0275, 0x4a7484aa, 0x6ea6e483, - 0x5cb0a9dc, 0xbd41fbd4, 0x76f988da, 0x831153b5, - 0x983e5152, 0xee66dfab, 0xa831c66d, 0x2db43210, - 0xb00327c8, 0x98fb213f, 0xbf597fc7, 0xbeef0ee4, - 0xc6e00bf3, 0x3da88fc2, 0xd5a79147, 0x930aa725, - 0x06ca6351, 0xe003826f, 0x14292967, 0x0a0e6e70, - 0x27b70a85, 0x46d22ffc, 0x2e1b2138, 0x5c26c926, - 0x4d2c6dfc, 0x5ac42aed, 0x53380d13, 0x9d95b3df, - 0x650a7354, 0x8baf63de, 0x766a0abb, 0x3c77b2a8, - 0x81c2c92e, 0x47edaee6, 0x92722c85, 0x1482353b, - 0xa2bfe8a1, 0x4cf10364, 0xa81a664b, 0xbc423001, - 0xc24b8b70, 0xd0f89791, 0xc76c51a3, 0x0654be30, - 0xd192e819, 0xd6ef5218, 0xd6990624, 0x5565a910, - 0xf40e3585, 0x5771202a, 0x106aa070, 0x32bbd1b8, - 0x19a4c116, 0xb8d2d0c8, 0x1e376c08, 0x5141ab53, - 0x2748774c, 0xdf8eeb99, 0x34b0bcb5, 0xe19b48a8, - 0x391c0cb3, 0xc5c95a63, 0x4ed8aa4a, 0xe3418acb, - 0x5b9cca4f, 0x7763e373, 0x682e6ff3, 0xd6b2b8a3, - 0x748f82ee, 0x5defb2fc, 0x78a5636f, 0x43172f60, - 0x84c87814, 0xa1f0ab72, 0x8cc70208, 0x1a6439ec, - 0x90befffa, 0x23631e28, 0xa4506ceb, 0xde82bde9, - 0xbef9a3f7, 0xb2c67915, 0xc67178f2, 0xe372532b, - 0xca273ece, 0xea26619c, 0xd186b8c7, 0x21c0c207, - 0xeada7dd6, 0xcde0eb1e, 0xf57d4f7f, 0xee6ed178, - 0x06f067aa, 0x72176fba, 0x0a637dc5, 0xa2c898a6, - 0x113f9804, 0xbef90dae, 0x1b710b35, 0x131c471b, - 0x28db77f5, 0x23047d84, 0x32caab7b, 0x40c72493, - 0x3c9ebe0a, 0x15c9bebc, 0x431d67c4, 0x9c100d4c, - 0x4cc5d4be, 0xcb3e42b6, 0x597f299c, 0xfc657e2a, - 0x5fcb6fab, 0x3ad6faec, 0x6c44198c, 0x4a475817 -] - -var W = new Array(160) - -function Sha512 () { - this.init() - this._w = W - - Hash.call(this, 128, 112) -} - -inherits(Sha512, Hash) - -Sha512.prototype.init = function () { - this._ah = 0x6a09e667 - this._bh = 0xbb67ae85 - this._ch = 0x3c6ef372 - this._dh = 0xa54ff53a - this._eh = 0x510e527f - this._fh = 0x9b05688c - this._gh = 0x1f83d9ab - this._hh = 0x5be0cd19 - - this._al = 0xf3bcc908 - this._bl = 0x84caa73b - this._cl = 0xfe94f82b - this._dl = 0x5f1d36f1 - this._el = 0xade682d1 - this._fl = 0x2b3e6c1f - this._gl = 0xfb41bd6b - this._hl = 0x137e2179 - - return this -} - -function Ch (x, y, z) { - return z ^ (x & (y ^ z)) -} - -function maj (x, y, z) { - return (x & y) | (z & (x | y)) -} - -function sigma0 (x, xl) { - return (x >>> 28 | xl << 4) ^ (xl >>> 2 | x << 30) ^ (xl >>> 7 | x << 25) -} - -function sigma1 (x, xl) { - return (x >>> 14 | xl << 18) ^ (x >>> 18 | xl << 14) ^ (xl >>> 9 | x << 23) -} - -function Gamma0 (x, xl) { - return (x >>> 1 | xl << 31) ^ (x >>> 8 | xl << 24) ^ (x >>> 7) -} - -function Gamma0l (x, xl) { - return (x >>> 1 | xl << 31) ^ (x >>> 8 | xl << 24) ^ (x >>> 7 | xl << 25) -} - -function Gamma1 (x, xl) { - return (x >>> 19 | xl << 13) ^ (xl >>> 29 | x << 3) ^ (x >>> 6) -} - -function Gamma1l (x, xl) { - return (x >>> 19 | xl << 13) ^ (xl >>> 29 | x << 3) ^ (x >>> 6 | xl << 26) -} - -function getCarry (a, b) { - return (a >>> 0) < (b >>> 0) ? 1 : 0 -} - -Sha512.prototype._update = function (M) { - var W = this._w - - var ah = this._ah | 0 - var bh = this._bh | 0 - var ch = this._ch | 0 - var dh = this._dh | 0 - var eh = this._eh | 0 - var fh = this._fh | 0 - var gh = this._gh | 0 - var hh = this._hh | 0 - - var al = this._al | 0 - var bl = this._bl | 0 - var cl = this._cl | 0 - var dl = this._dl | 0 - var el = this._el | 0 - var fl = this._fl | 0 - var gl = this._gl | 0 - var hl = this._hl | 0 - - for (var i = 0; i < 32; i += 2) { - W[i] = M.readInt32BE(i * 4) - W[i + 1] = M.readInt32BE(i * 4 + 4) - } - for (; i < 160; i += 2) { - var xh = W[i - 15 * 2] - var xl = W[i - 15 * 2 + 1] - var gamma0 = Gamma0(xh, xl) - var gamma0l = Gamma0l(xl, xh) - - xh = W[i - 2 * 2] - xl = W[i - 2 * 2 + 1] - var gamma1 = Gamma1(xh, xl) - var gamma1l = Gamma1l(xl, xh) - - // W[i] = gamma0 + W[i - 7] + gamma1 + W[i - 16] - var Wi7h = W[i - 7 * 2] - var Wi7l = W[i - 7 * 2 + 1] - - var Wi16h = W[i - 16 * 2] - var Wi16l = W[i - 16 * 2 + 1] - - var Wil = (gamma0l + Wi7l) | 0 - var Wih = (gamma0 + Wi7h + getCarry(Wil, gamma0l)) | 0 - Wil = (Wil + gamma1l) | 0 - Wih = (Wih + gamma1 + getCarry(Wil, gamma1l)) | 0 - Wil = (Wil + Wi16l) | 0 - Wih = (Wih + Wi16h + getCarry(Wil, Wi16l)) | 0 - - W[i] = Wih - W[i + 1] = Wil - } - - for (var j = 0; j < 160; j += 2) { - Wih = W[j] - Wil = W[j + 1] - - var majh = maj(ah, bh, ch) - var majl = maj(al, bl, cl) - - var sigma0h = sigma0(ah, al) - var sigma0l = sigma0(al, ah) - var sigma1h = sigma1(eh, el) - var sigma1l = sigma1(el, eh) - - // t1 = h + sigma1 + ch + K[j] + W[j] - var Kih = K[j] - var Kil = K[j + 1] - - var chh = Ch(eh, fh, gh) - var chl = Ch(el, fl, gl) - - var t1l = (hl + sigma1l) | 0 - var t1h = (hh + sigma1h + getCarry(t1l, hl)) | 0 - t1l = (t1l + chl) | 0 - t1h = (t1h + chh + getCarry(t1l, chl)) | 0 - t1l = (t1l + Kil) | 0 - t1h = (t1h + Kih + getCarry(t1l, Kil)) | 0 - t1l = (t1l + Wil) | 0 - t1h = (t1h + Wih + getCarry(t1l, Wil)) | 0 - - // t2 = sigma0 + maj - var t2l = (sigma0l + majl) | 0 - var t2h = (sigma0h + majh + getCarry(t2l, sigma0l)) | 0 - - hh = gh - hl = gl - gh = fh - gl = fl - fh = eh - fl = el - el = (dl + t1l) | 0 - eh = (dh + t1h + getCarry(el, dl)) | 0 - dh = ch - dl = cl - ch = bh - cl = bl - bh = ah - bl = al - al = (t1l + t2l) | 0 - ah = (t1h + t2h + getCarry(al, t1l)) | 0 - } - - this._al = (this._al + al) | 0 - this._bl = (this._bl + bl) | 0 - this._cl = (this._cl + cl) | 0 - this._dl = (this._dl + dl) | 0 - this._el = (this._el + el) | 0 - this._fl = (this._fl + fl) | 0 - this._gl = (this._gl + gl) | 0 - this._hl = (this._hl + hl) | 0 - - this._ah = (this._ah + ah + getCarry(this._al, al)) | 0 - this._bh = (this._bh + bh + getCarry(this._bl, bl)) | 0 - this._ch = (this._ch + ch + getCarry(this._cl, cl)) | 0 - this._dh = (this._dh + dh + getCarry(this._dl, dl)) | 0 - this._eh = (this._eh + eh + getCarry(this._el, el)) | 0 - this._fh = (this._fh + fh + getCarry(this._fl, fl)) | 0 - this._gh = (this._gh + gh + getCarry(this._gl, gl)) | 0 - this._hh = (this._hh + hh + getCarry(this._hl, hl)) | 0 -} - -Sha512.prototype._hash = function () { - var H = new Buffer(64) - - function writeInt64BE (h, l, offset) { - H.writeInt32BE(h, offset) - H.writeInt32BE(l, offset + 4) - } - - writeInt64BE(this._ah, this._al, 0) - writeInt64BE(this._bh, this._bl, 8) - writeInt64BE(this._ch, this._cl, 16) - writeInt64BE(this._dh, this._dl, 24) - writeInt64BE(this._eh, this._el, 32) - writeInt64BE(this._fh, this._fl, 40) - writeInt64BE(this._gh, this._gl, 48) - writeInt64BE(this._hh, this._hl, 56) - - return H -} - -module.exports = Sha512 diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/create-hash/node_modules/sha.js/test/hash.js b/node_modules/browserify/node_modules/crypto-browserify/node_modules/create-hash/node_modules/sha.js/test/hash.js deleted file mode 100644 index 2f376b4d..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/create-hash/node_modules/sha.js/test/hash.js +++ /dev/null @@ -1,86 +0,0 @@ -var hexpp = require('../hexpp').defaults({ bigendian: false }) -var tape = require('tape') -var Hash = require('../hash') - -var hex = '0A1B2C3D4E5F6G7H' - -function equal (t, a, b) { - t.equal(a.length, b.length) - - for (var i = 0; i < a.length; i++) { - t.equal(a[i], b[i]) - } -} - -var hexBuf = new Buffer([48, 65, 49, 66, 50, 67, 51, 68, 52, 69, 53, 70, 54, 71, 55, 72]) -var count16 = { - strings: ['0A1B2C3D4E5F6G7H'], - buffers: [ - hexBuf, - new Buffer([ 128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 128]) - ] -} - -var empty = { - strings: [''], - buffers: [ - new Buffer([ 128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]) - ] -} - -var multi = { - strings: ['abcd', 'efhijk', 'lmnopq'], - buffers: [ - new Buffer('abcdefhijklmnopq', 'ascii'), - new Buffer([128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 128]) - ] - } - -var long = { - strings: [hex + hex], - buffers: [ - hexBuf, - hexBuf, - new Buffer([128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0]) - ] -} - -function makeTest (name, data) { - tape(name, function (t) { - - var h = new Hash(16, 8) - var hash = new Buffer(20) - var n = 2 - var expected = data.buffers.slice() - // t.plan(expected.length + 1) - - h._update = function (block) { - var e = expected.shift() - - console.log('---block---') - console.log(hexpp(block), block.length) - console.log('---e---') - console.log(hexpp(e), block.length) - console.log(block) - equal(t, block, e) - - if (n < 0) { - throw new Error('expecting only 2 calls to _update') - } - - return hash - } - - data.strings.forEach(function (string) { - h.update(string, 'ascii') - }) - - equal(t, h.digest(), hash) - t.end() - }) -} - -makeTest('Hash#update 1 in 1', count16) -makeTest('empty Hash#update', empty) -makeTest('Hash#update 1 in 3', multi) -makeTest('Hash#update 2 in 1', long) diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/create-hash/node_modules/sha.js/test/test.js b/node_modules/browserify/node_modules/crypto-browserify/node_modules/create-hash/node_modules/sha.js/test/test.js deleted file mode 100644 index 0a46e44b..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/create-hash/node_modules/sha.js/test/test.js +++ /dev/null @@ -1,85 +0,0 @@ -var crypto = require('crypto') -var tape = require('tape') -var Sha1 = require('../').sha1 - -var inputs = [ - ['', 'ascii'], - ['abc', 'ascii'], - ['123', 'ascii'], - ['123456789abcdef123456789abcdef123456789abcdef123456789abcdef', 'ascii'], - ['123456789abcdef123456789abcdef123456789abcdef123456789abc', 'ascii'], - ['123456789abcdef123456789abcdef123456789abcdef123456789ab', 'ascii'], - ['0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcde', 'ascii'], - ['0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef', 'ascii'], - ['foobarbaz', 'ascii'] -] - -tape("hash is the same as node's crypto", function (t) { - inputs.forEach(function (v) { - var a = new Sha1().update(v[0], v[1]).digest('hex') - var e = crypto.createHash('sha1').update(v[0], v[1]).digest('hex') - console.log(a, '==', e) - t.equal(a, e) - }) - - t.end() -}) - -tape('call update multiple times', function (t) { - inputs.forEach(function (v) { - var hash = new Sha1() - var _hash = crypto.createHash('sha1') - - for (var i = 0; i < v[0].length; i = (i + 1) * 2) { - var s = v[0].substring(i, (i + 1) * 2) - hash.update(s, v[1]) - _hash.update(s, v[1]) - } - - var a = hash.digest('hex') - var e = _hash.digest('hex') - console.log(a, '==', e) - t.equal(a, e) - }) - t.end() -}) - -tape('call update twice', function (t) { - var _hash = crypto.createHash('sha1') - var hash = new Sha1() - - _hash.update('foo', 'ascii') - hash.update('foo', 'ascii') - - _hash.update('bar', 'ascii') - hash.update('bar', 'ascii') - - _hash.update('baz', 'ascii') - hash.update('baz', 'ascii') - - var a = hash.digest('hex') - var e = _hash.digest('hex') - - t.equal(a, e) - t.end() -}) - -tape('hex encoding', function (t) { - inputs.forEach(function (v) { - var hash = new Sha1() - var _hash = crypto.createHash('sha1') - - for (var i = 0; i < v[0].length; i = (i + 1) * 2) { - var s = v[0].substring(i, (i + 1) * 2) - hash.update(new Buffer(s, 'ascii').toString('hex'), 'hex') - _hash.update(new Buffer(s, 'ascii').toString('hex'), 'hex') - } - var a = hash.digest('hex') - var e = _hash.digest('hex') - - console.log(a, '==', e) - t.equal(a, e) - }) - - t.end() -}) diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/create-hash/node_modules/sha.js/test/vectors.js b/node_modules/browserify/node_modules/crypto-browserify/node_modules/create-hash/node_modules/sha.js/test/vectors.js deleted file mode 100644 index 4aef39cc..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/create-hash/node_modules/sha.js/test/vectors.js +++ /dev/null @@ -1,76 +0,0 @@ -var tape = require('tape') -var vectors = require('hash-test-vectors') -// var from = require('bops/typedarray/from') -var Buffer = require('buffer').Buffer -var hexpp = require('../hexpp') - -var createHash = require('../') - -function makeTest (alg, i, verbose) { - var v = vectors[i] - - tape(alg + ': NIST vector ' + i, function (t) { - if (verbose) { - console.log(v) - console.log('VECTOR', i) - console.log('INPUT', v.input) - console.log(hexpp(new Buffer(v.input, 'base64'))) - console.log(new Buffer(v.input, 'base64').toString('hex')) - } - - var buf = new Buffer(v.input, 'base64') - t.equal(createHash(alg).update(buf).digest('hex'), v[alg]) - - i = ~~(buf.length / 2) - var buf1 = buf.slice(0, i) - var buf2 = buf.slice(i, buf.length) - - console.log(buf1.length, buf2.length, buf.length) - console.log(createHash(alg)._block.length) - - t.equal( - createHash(alg) - .update(buf1) - .update(buf2) - .digest('hex'), - v[alg] - ) - - var j, buf3 - - i = ~~(buf.length / 3) - j = ~~(buf.length * 2 / 3) - buf1 = buf.slice(0, i) - buf2 = buf.slice(i, j) - buf3 = buf.slice(j, buf.length) - - t.equal( - createHash(alg) - .update(buf1) - .update(buf2) - .update(buf3) - .digest('hex'), - v[alg] - ) - - setTimeout(function () { - // avoid "too much recursion" errors in tape in firefox - t.end() - }) - }) - -} - -if (process.argv[2]) { - makeTest(process.argv[2], parseInt(process.argv[3], 10), true) - -} else { - vectors.forEach(function (v, i) { - makeTest('sha', i) - makeTest('sha1', i) - makeTest('sha224', i) - makeTest('sha256', i) - makeTest('sha384', i) - makeTest('sha512', i) - }) -} diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/create-hash/package.json b/node_modules/browserify/node_modules/crypto-browserify/node_modules/create-hash/package.json deleted file mode 100644 index 59365f19..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/create-hash/package.json +++ /dev/null @@ -1,73 +0,0 @@ -{ - "name": "create-hash", - "version": "1.1.2", - "description": "create hashes for browserify", - "browser": "browser.js", - "main": "index.js", - "scripts": { - "test": "node test.js | tspec" - }, - "repository": { - "type": "git", - "url": "git+ssh://git@github.com/crypto-browserify/createHash.git" - }, - "keywords": [ - "crypto" - ], - "author": "", - "license": "MIT", - "bugs": { - "url": "https://github.com/crypto-browserify/createHash/issues" - }, - "homepage": "https://github.com/crypto-browserify/createHash", - "devDependencies": { - "hash-test-vectors": "^1.3.2", - "tap-spec": "^2.1.2", - "tape": "^3.0.3" - }, - "dependencies": { - "cipher-base": "^1.0.1", - "inherits": "^2.0.1", - "ripemd160": "^1.0.0", - "sha.js": "^2.3.6" - }, - "gitHead": "426cefe8cae9feddda5af336d34e1d83bed13579", - "_id": "create-hash@1.1.2", - "_shasum": "51210062d7bb7479f6c65bb41a92208b1d61abad", - "_from": "create-hash@>=1.1.0 <2.0.0", - "_npmVersion": "3.3.4", - "_nodeVersion": "4.1.1", - "_npmUser": { - "name": "dcousens", - "email": "email@dcousens.com" - }, - "dist": { - "shasum": "51210062d7bb7479f6c65bb41a92208b1d61abad", - "tarball": "https://registry.npmjs.org/create-hash/-/create-hash-1.1.2.tgz" - }, - "maintainers": [ - { - "name": "cwmma", - "email": "calvin.metcalf@gmail.com" - }, - { - "name": "dcousens", - "email": "email@dcousens.com" - }, - { - "name": "dominictarr", - "email": "dominic.tarr@gmail.com" - }, - { - "name": "jprichardson", - "email": "jprichardson@gmail.com" - }, - { - "name": "indutny", - "email": "fedor@indutny.com" - } - ], - "directories": {}, - "_resolved": "https://registry.npmjs.org/create-hash/-/create-hash-1.1.2.tgz", - "readme": "ERROR: No README data found!" -} diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/create-hash/readme.md b/node_modules/browserify/node_modules/crypto-browserify/node_modules/create-hash/readme.md deleted file mode 100644 index a4a68151..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/create-hash/readme.md +++ /dev/null @@ -1,19 +0,0 @@ -create-hash -=== - -[![Build Status](https://travis-ci.org/crypto-browserify/createHash.svg)](https://travis-ci.org/crypto-browserify/createHash) - -Node style hashes for use in the browser, with native hash functions in node. Api is the same as hashes in node: - -```js -var createHash = require('create-hash'); -var hash = createHash('sha224'); -hash.update('synchronous write'); //optional encoding parameter -hash.digest();// synchronously get result with optional encoding parameter - -hash.write('write to it as a stream'); -hash.end();//remember it's a stream -hash.read();//only if you ended it as a stream though -``` - -To get the JavaScript version even in node do `require('create-hash/browser');` \ No newline at end of file diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/create-hash/test.js b/node_modules/browserify/node_modules/crypto-browserify/node_modules/create-hash/test.js deleted file mode 100644 index 0c6bd88c..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/create-hash/test.js +++ /dev/null @@ -1,39 +0,0 @@ -var fs = require('fs') -var test = require('tape') - -var algorithms = ['sha1', 'sha224', 'sha256', 'sha384', 'sha512', 'md5', 'rmd160', 'ripemd160'] -var encodings = [/*'binary',*/ 'hex', 'base64']; -var vectors = require('hash-test-vectors') -vectors.forEach(function (vector) { - vector.ripemd160 = vector.rmd160 -}) -var createHash = require('./browser') - -algorithms.forEach(function (algorithm) { - test('test ' + algorithm + ' against test vectors', function (t) { - vectors.forEach(function (obj, i) { - var input = new Buffer(obj.input, 'base64') - var node = obj[algorithm] - var js = createHash(algorithm).update(input).digest('hex') - t.equal(js, node, algorithm + '(testVector['+i+']) == ' + node) - }) - - encodings.forEach(function (encoding) { - vectors.forEach(function (obj, i) { - var input = new Buffer(obj.input, 'base64').toString(encoding) - var node = obj[algorithm] - var js = createHash(algorithm).update(input, encoding).digest('hex') - t.equal(js, node, algorithm + '(testVector['+i+'], '+encoding+') == ' + node) - }) - }); - vectors.forEach(function (obj, i) { - var input = new Buffer(obj.input, 'base64') - var node = obj[algorithm] - var hash = createHash(algorithm); - hash.end(input) - var js = hash.read().toString('hex') - t.equal(js, node, algorithm + '(testVector['+i+']) == ' + node) - }) - t.end() - }) -}); diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/create-hmac/.travis.yml b/node_modules/browserify/node_modules/crypto-browserify/node_modules/create-hmac/.travis.yml deleted file mode 100644 index 1416d607..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/create-hmac/.travis.yml +++ /dev/null @@ -1,4 +0,0 @@ -language: node_js -node_js: - - "0.10" - - "0.11" \ No newline at end of file diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/create-hmac/browser.js b/node_modules/browserify/node_modules/crypto-browserify/node_modules/create-hmac/browser.js deleted file mode 100644 index b610781b..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/create-hmac/browser.js +++ /dev/null @@ -1,68 +0,0 @@ -'use strict'; -var createHash = require('create-hash/browser'); -var inherits = require('inherits') - -var Transform = require('stream').Transform - -var ZEROS = new Buffer(128) -ZEROS.fill(0) - -function Hmac(alg, key) { - Transform.call(this) - alg = alg.toLowerCase() - if (typeof key === 'string') { - key = new Buffer(key) - } - - var blocksize = (alg === 'sha512' || alg === 'sha384') ? 128 : 64 - - this._alg = alg - this._key = key - - if (key.length > blocksize) { - key = createHash(alg).update(key).digest() - - } else if (key.length < blocksize) { - key = Buffer.concat([key, ZEROS], blocksize) - } - - var ipad = this._ipad = new Buffer(blocksize) - var opad = this._opad = new Buffer(blocksize) - - for (var i = 0; i < blocksize; i++) { - ipad[i] = key[i] ^ 0x36 - opad[i] = key[i] ^ 0x5C - } - - this._hash = createHash(alg).update(ipad) -} - -inherits(Hmac, Transform) - -Hmac.prototype.update = function (data, enc) { - this._hash.update(data, enc) - - return this -} - -Hmac.prototype._transform = function (data, _, next) { - this._hash.update(data) - - next() -} - -Hmac.prototype._flush = function (next) { - this.push(this.digest()) - - next() -} - -Hmac.prototype.digest = function (enc) { - var h = this._hash.digest() - - return createHash(this._alg).update(this._opad).update(h).digest(enc) -} - -module.exports = function createHmac(alg, key) { - return new Hmac(alg, key) -} diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/create-hmac/index.js b/node_modules/browserify/node_modules/crypto-browserify/node_modules/create-hmac/index.js deleted file mode 100644 index 220908ad..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/create-hmac/index.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('crypto').createHmac; \ No newline at end of file diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/create-hmac/package.json b/node_modules/browserify/node_modules/crypto-browserify/node_modules/create-hmac/package.json deleted file mode 100644 index 2a3d4d7e..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/create-hmac/package.json +++ /dev/null @@ -1,72 +0,0 @@ -{ - "name": "create-hmac", - "version": "1.1.4", - "description": "node style hmacs in the browser", - "main": "index.js", - "scripts": { - "test": "node test.js | tspec" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/crypto-browserify/createHmac.git" - }, - "keywords": [ - "crypto", - "hmac" - ], - "author": "", - "license": "MIT", - "bugs": { - "url": "https://github.com/crypto-browserify/createHmac/issues" - }, - "homepage": "https://github.com/crypto-browserify/createHmac", - "devDependencies": { - "hash-test-vectors": "^1.3.2", - "tap-spec": "^2.1.2", - "tape": "^3.0.3" - }, - "dependencies": { - "create-hash": "^1.1.0", - "inherits": "^2.0.1" - }, - "browser": "./browser.js", - "gitHead": "3c7dd3047b5ab3e3be44d802241d224f0c9e2325", - "_id": "create-hmac@1.1.4", - "_shasum": "d3fb4ba253eb8b3f56e39ea2fbcb8af747bd3170", - "_from": "create-hmac@>=1.1.0 <2.0.0", - "_npmVersion": "3.3.4", - "_nodeVersion": "4.1.1", - "_npmUser": { - "name": "dcousens", - "email": "email@dcousens.com" - }, - "dist": { - "shasum": "d3fb4ba253eb8b3f56e39ea2fbcb8af747bd3170", - "tarball": "https://registry.npmjs.org/create-hmac/-/create-hmac-1.1.4.tgz" - }, - "maintainers": [ - { - "name": "cwmma", - "email": "calvin.metcalf@gmail.com" - }, - { - "name": "dcousens", - "email": "email@dcousens.com" - }, - { - "name": "dominictarr", - "email": "dominic.tarr@gmail.com" - }, - { - "name": "jprichardson", - "email": "jprichardson@gmail.com" - }, - { - "name": "indutny", - "email": "fedor@indutny.com" - } - ], - "directories": {}, - "_resolved": "https://registry.npmjs.org/create-hmac/-/create-hmac-1.1.4.tgz", - "readme": "ERROR: No README data found!" -} diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/create-hmac/readme.md b/node_modules/browserify/node_modules/crypto-browserify/node_modules/create-hmac/readme.md deleted file mode 100644 index 4e8bda4d..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/create-hmac/readme.md +++ /dev/null @@ -1,19 +0,0 @@ -create-hmac -=== - -[![Build Status](https://travis-ci.org/crypto-browserify/createHmac.svg)](https://travis-ci.org/crypto-browserify/createHmac) - -Node style hmacs for use in the browser, with native hmac functions in node. Api is the same as hmacs in node: - -```js -var createHmac = require('create-hmac'); -var hmac = createHmac('sha224', new Buffer("secret key")); -hmac.update('synchronous write'); //optional encoding parameter -hmac.digest();// synchronously get result with optional encoding parameter - -hmac.write('write to it as a stream'); -hmac.end();//remember it's a stream -hmac.read();//only if you ended it as a stream though -``` - -To get the JavaScript version even in node require `require('create-hmac/browser');` \ No newline at end of file diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/create-hmac/test.js b/node_modules/browserify/node_modules/crypto-browserify/node_modules/create-hmac/test.js deleted file mode 100644 index cb0cd576..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/create-hmac/test.js +++ /dev/null @@ -1,41 +0,0 @@ -var test = require('tape') - -var algorithms = ['sha1', 'sha224','sha256', 'sha384', 'sha512', 'SHA512', 'md5', 'rmd160'] -var formats = [undefined, 'base64', 'hex', 'binary'] - -var vectors = require('hash-test-vectors/hmac') -var createHmac = require('./browser') -algorithms.forEach(function (alg) { - vectors.forEach(function (input) { - var key = new Buffer(input.key, 'hex') - var inputBuffer = new Buffer(input.data, 'hex') - - formats.forEach(function (format) { - test('hmac(' + alg + ') w/ ' + input.data.slice(0, 6) + '... as ' + format, function (t) { - var hmac = createHmac(alg, key) - - var formattedInput = format ? inputBuffer.toString(format) : inputBuffer - hmac.update(formattedInput, format) - - var formattedOutput = hmac.digest(format) - var output = new Buffer(formattedOutput, format) - - var truncated = input.truncate ? output.slice(0, input.truncate) : output - t.equal(truncated.toString('hex'), input[alg.toLowerCase()]) - t.end() - }) - }) - }) - - vectors.forEach(function (input) { - test('hmac(' + alg + ') as stream w/ ' + input.data.slice(0, 6) + '...', function (t) { - var hmac = createHmac(alg, new Buffer(input.key, 'hex')) - hmac.end(input.data, 'hex') - - var output = hmac.read() - var truncated = input.truncate ? output.slice(0, input.truncate) : output - t.equal(truncated.toString('hex'), input[alg.toLowerCase()]) - t.end() - }) - }) -}) diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/diffie-hellman/.npmignore b/node_modules/browserify/node_modules/crypto-browserify/node_modules/diffie-hellman/.npmignore deleted file mode 100644 index daa60294..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/diffie-hellman/.npmignore +++ /dev/null @@ -1 +0,0 @@ -test.js diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/diffie-hellman/.travis.yml b/node_modules/browserify/node_modules/crypto-browserify/node_modules/diffie-hellman/.travis.yml deleted file mode 100644 index 0dda2731..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/diffie-hellman/.travis.yml +++ /dev/null @@ -1,10 +0,0 @@ -language: node_js -node_js: - - "0.11" - - "0.10" - - "0.12" - - "1" - - "2" - - "3" - - "4" -sudo: false diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/diffie-hellman/browser.js b/node_modules/browserify/node_modules/crypto-browserify/node_modules/diffie-hellman/browser.js deleted file mode 100644 index d4be92bb..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/diffie-hellman/browser.js +++ /dev/null @@ -1,42 +0,0 @@ -var generatePrime = require('./lib/generatePrime') -var primes = require('./lib/primes.json') - -var DH = require('./lib/dh') - -function getDiffieHellman (mod) { - var prime = new Buffer(primes[mod].prime, 'hex') - var gen = new Buffer(primes[mod].gen, 'hex') - - return new DH(prime, gen) -} - -var ENCODINGS = { - 'binary': true, 'hex': true, 'base64': true -} - -function createDiffieHellman (prime, enc, generator, genc) { - if (Buffer.isBuffer(enc) || ENCODINGS[enc] === undefined) { - return createDiffieHellman(prime, 'binary', enc, generator) - } - - enc = enc || 'binary' - genc = genc || 'binary' - generator = generator || new Buffer([2]) - - if (!Buffer.isBuffer(generator)) { - generator = new Buffer(generator, genc) - } - - if (typeof prime === 'number') { - return new DH(generatePrime(prime, generator), generator, true) - } - - if (!Buffer.isBuffer(prime)) { - prime = new Buffer(prime, enc) - } - - return new DH(prime, generator, true) -} - -exports.DiffieHellmanGroup = exports.createDiffieHellmanGroup = exports.getDiffieHellman = getDiffieHellman -exports.createDiffieHellman = exports.DiffieHellman = createDiffieHellman diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/diffie-hellman/index.js b/node_modules/browserify/node_modules/crypto-browserify/node_modules/diffie-hellman/index.js deleted file mode 100644 index ab7c40fe..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/diffie-hellman/index.js +++ /dev/null @@ -1,10 +0,0 @@ -var crypto = require('crypto') - -// getDiffieHellman -exports.DiffieHellmanGroup = crypto.DiffieHellmanGroup -exports.createDiffieHellmanGroup = crypto.createDiffieHellmanGroup -exports.getDiffieHellman = crypto.getDiffieHellman - -// createDiffieHellman -exports.createDiffieHellman = crypto.createDiffieHellman -exports.DiffieHellman = crypto.DiffieHellman diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/diffie-hellman/lib/dh.js b/node_modules/browserify/node_modules/crypto-browserify/node_modules/diffie-hellman/lib/dh.js deleted file mode 100644 index 0650f65d..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/diffie-hellman/lib/dh.js +++ /dev/null @@ -1,164 +0,0 @@ -var BN = require('bn.js'); -var MillerRabin = require('miller-rabin'); -var millerRabin = new MillerRabin(); -var TWENTYFOUR = new BN(24); -var ELEVEN = new BN(11); -var TEN = new BN(10); -var THREE = new BN(3); -var SEVEN = new BN(7); -var primes = require('./generatePrime'); -var randomBytes = require('randombytes'); -module.exports = DH; - -function setPublicKey(pub, enc) { - enc = enc || 'utf8'; - if (!Buffer.isBuffer(pub)) { - pub = new Buffer(pub, enc); - } - this._pub = new BN(pub); - return this; -} - -function setPrivateKey(priv, enc) { - enc = enc || 'utf8'; - if (!Buffer.isBuffer(priv)) { - priv = new Buffer(priv, enc); - } - this._priv = new BN(priv); - return this; -} - -var primeCache = {}; -function checkPrime(prime, generator) { - var gen = generator.toString('hex'); - var hex = [gen, prime.toString(16)].join('_'); - if (hex in primeCache) { - return primeCache[hex]; - } - var error = 0; - - if (prime.isEven() || - !primes.simpleSieve || - !primes.fermatTest(prime) || - !millerRabin.test(prime)) { - //not a prime so +1 - error += 1; - - if (gen === '02' || gen === '05') { - // we'd be able to check the generator - // it would fail so +8 - error += 8; - } else { - //we wouldn't be able to test the generator - // so +4 - error += 4; - } - primeCache[hex] = error; - return error; - } - if (!millerRabin.test(prime.shrn(1))) { - //not a safe prime - error += 2; - } - var rem; - switch (gen) { - case '02': - if (prime.mod(TWENTYFOUR).cmp(ELEVEN)) { - // unsuidable generator - error += 8; - } - break; - case '05': - rem = prime.mod(TEN); - if (rem.cmp(THREE) && rem.cmp(SEVEN)) { - // prime mod 10 needs to equal 3 or 7 - error += 8; - } - break; - default: - error += 4; - } - primeCache[hex] = error; - return error; -} - -function DH(prime, generator, malleable) { - this.setGenerator(generator); - this.__prime = new BN(prime); - this._prime = BN.mont(this.__prime); - this._primeLen = prime.length; - this._pub = undefined; - this._priv = undefined; - this._primeCode = undefined; - if (malleable) { - this.setPublicKey = setPublicKey; - this.setPrivateKey = setPrivateKey; - } else { - this._primeCode = 8; - } -} -Object.defineProperty(DH.prototype, 'verifyError', { - enumerable: true, - get: function () { - if (typeof this._primeCode !== 'number') { - this._primeCode = checkPrime(this.__prime, this.__gen); - } - return this._primeCode; - } -}); -DH.prototype.generateKeys = function () { - if (!this._priv) { - this._priv = new BN(randomBytes(this._primeLen)); - } - this._pub = this._gen.toRed(this._prime).redPow(this._priv).fromRed(); - return this.getPublicKey(); -}; - -DH.prototype.computeSecret = function (other) { - other = new BN(other); - other = other.toRed(this._prime); - var secret = other.redPow(this._priv).fromRed(); - var out = new Buffer(secret.toArray()); - var prime = this.getPrime(); - if (out.length < prime.length) { - var front = new Buffer(prime.length - out.length); - front.fill(0); - out = Buffer.concat([front, out]); - } - return out; -}; - -DH.prototype.getPublicKey = function getPublicKey(enc) { - return formatReturnValue(this._pub, enc); -}; - -DH.prototype.getPrivateKey = function getPrivateKey(enc) { - return formatReturnValue(this._priv, enc); -}; - -DH.prototype.getPrime = function (enc) { - return formatReturnValue(this.__prime, enc); -}; - -DH.prototype.getGenerator = function (enc) { - return formatReturnValue(this._gen, enc); -}; - -DH.prototype.setGenerator = function (gen, enc) { - enc = enc || 'utf8'; - if (!Buffer.isBuffer(gen)) { - gen = new Buffer(gen, enc); - } - this.__gen = gen; - this._gen = new BN(gen); - return this; -}; - -function formatReturnValue(bn, enc) { - var buf = new Buffer(bn.toArray()); - if (!enc) { - return buf; - } else { - return buf.toString(enc); - } -} diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/diffie-hellman/lib/generatePrime.js b/node_modules/browserify/node_modules/crypto-browserify/node_modules/diffie-hellman/lib/generatePrime.js deleted file mode 100644 index 32e053cf..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/diffie-hellman/lib/generatePrime.js +++ /dev/null @@ -1,105 +0,0 @@ -var randomBytes = require('randombytes'); -module.exports = findPrime; -findPrime.simpleSieve = simpleSieve; -findPrime.fermatTest = fermatTest; -var BN = require('bn.js'); -var TWENTYFOUR = new BN(24); -var MillerRabin = require('miller-rabin'); -var millerRabin = new MillerRabin(); -var ONE = new BN(1); -var TWO = new BN(2); -var FIVE = new BN(5); -var SIXTEEN = new BN(16); -var EIGHT = new BN(8); -var TEN = new BN(10); -var THREE = new BN(3); -var SEVEN = new BN(7); -var ELEVEN = new BN(11); -var FOUR = new BN(4); -var TWELVE = new BN(12); -var primes = null; - -function _getPrimes() { - if (primes !== null) - return primes; - - var limit = 0x100000; - var res = []; - res[0] = 2; - for (var i = 1, k = 3; k < limit; k += 2) { - var sqrt = Math.ceil(Math.sqrt(k)); - for (var j = 0; j < i && res[j] <= sqrt; j++) - if (k % res[j] === 0) - break; - - if (i !== j && res[j] <= sqrt) - continue; - - res[i++] = k; - } - primes = res; - return res; -} - -function simpleSieve(p) { - var primes = _getPrimes(); - - for (var i = 0; i < primes.length; i++) - if (p.modn(primes[i]) === 0) { - if (p.cmpn(primes[i]) === 0) { - return true; - } else { - return false; - } - } - - return true; -} - -function fermatTest(p) { - var red = BN.mont(p); - return TWO.toRed(red).redPow(p.subn(1)).fromRed().cmpn(1) === 0; -} - -function findPrime(bits, gen) { - if (bits < 16) { - // this is what openssl does - if (gen === 2 || gen === 5) { - return new BN([0x8c, 0x7b]); - } else { - return new BN([0x8c, 0x27]); - } - } - gen = new BN(gen); - - var num, n2; - - while (true) { - num = new BN(randomBytes(Math.ceil(bits / 8))); - while (num.bitLength() > bits) { - num.ishrn(1); - } - if (num.isEven()) { - num.iadd(ONE); - } - if (!num.testn(1)) { - num.iadd(TWO); - } - if (!gen.cmp(TWO)) { - while (num.mod(TWENTYFOUR).cmp(ELEVEN)) { - num.iadd(FOUR); - } - } else if (!gen.cmp(FIVE)) { - while (num.mod(TEN).cmp(THREE)) { - num.iadd(FOUR); - } - } - n2 = num.shrn(1); - if (simpleSieve(n2) && simpleSieve(num) && - fermatTest(n2) && fermatTest(num) && - millerRabin.test(n2) && millerRabin.test(num)) { - return num; - } - } - -} diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/diffie-hellman/lib/primes.json b/node_modules/browserify/node_modules/crypto-browserify/node_modules/diffie-hellman/lib/primes.json deleted file mode 100644 index 9fef6c96..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/diffie-hellman/lib/primes.json +++ /dev/null @@ -1,34 +0,0 @@ -{ - "modp1": { - "gen": "02", - "prime": "ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a63a3620ffffffffffffffff" - }, - "modp2": { - "gen": "02", - "prime": "ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece65381ffffffffffffffff" - }, - "modp5": { - "gen": "02", - "prime": "ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca237327ffffffffffffffff" - }, - "modp14": { - "gen": "02", - "prime": "ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aacaa68ffffffffffffffff" - }, - "modp15": { - "gen": "02", - "prime": "ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a93ad2caffffffffffffffff" - }, - "modp16": { - "gen": "02", - "prime": "ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c934063199ffffffffffffffff" - }, - "modp17": { - "gen": "02", - "prime": "ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c93402849236c3fab4d27c7026c1d4dcb2602646dec9751e763dba37bdf8ff9406ad9e530ee5db382f413001aeb06a53ed9027d831179727b0865a8918da3edbebcf9b14ed44ce6cbaced4bb1bdb7f1447e6cc254b332051512bd7af426fb8f401378cd2bf5983ca01c64b92ecf032ea15d1721d03f482d7ce6e74fef6d55e702f46980c82b5a84031900b1c9e59e7c97fbec7e8f323a97a7e36cc88be0f1d45b7ff585ac54bd407b22b4154aacc8f6d7ebf48e1d814cc5ed20f8037e0a79715eef29be32806a1d58bb7c5da76f550aa3d8a1fbff0eb19ccb1a313d55cda56c9ec2ef29632387fe8d76e3c0468043e8f663f4860ee12bf2d5b0b7474d6e694f91e6dcc4024ffffffffffffffff" - }, - "modp18": { - "gen": "02", - "prime": "ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c93402849236c3fab4d27c7026c1d4dcb2602646dec9751e763dba37bdf8ff9406ad9e530ee5db382f413001aeb06a53ed9027d831179727b0865a8918da3edbebcf9b14ed44ce6cbaced4bb1bdb7f1447e6cc254b332051512bd7af426fb8f401378cd2bf5983ca01c64b92ecf032ea15d1721d03f482d7ce6e74fef6d55e702f46980c82b5a84031900b1c9e59e7c97fbec7e8f323a97a7e36cc88be0f1d45b7ff585ac54bd407b22b4154aacc8f6d7ebf48e1d814cc5ed20f8037e0a79715eef29be32806a1d58bb7c5da76f550aa3d8a1fbff0eb19ccb1a313d55cda56c9ec2ef29632387fe8d76e3c0468043e8f663f4860ee12bf2d5b0b7474d6e694f91e6dbe115974a3926f12fee5e438777cb6a932df8cd8bec4d073b931ba3bc832b68d9dd300741fa7bf8afc47ed2576f6936ba424663aab639c5ae4f5683423b4742bf1c978238f16cbe39d652de3fdb8befc848ad922222e04a4037c0713eb57a81a23f0c73473fc646cea306b4bcbc8862f8385ddfa9d4b7fa2c087e879683303ed5bdd3a062b3cf5b3a278a66d2a13f83f44f82ddf310ee074ab6a364597e899a0255dc164f31cc50846851df9ab48195ded7ea1b1d510bd7ee74d73faf36bc31ecfa268359046f4eb879f924009438b481c6cd7889a002ed5ee382bc9190da6fc026e479558e4475677e9aa9e3050e2765694dfc81f56e880b96e7160c980dd98edd3dfffffffffffffffff" - } -} \ No newline at end of file diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/diffie-hellman/node_modules/.bin/miller-rabin b/node_modules/browserify/node_modules/crypto-browserify/node_modules/diffie-hellman/node_modules/.bin/miller-rabin deleted file mode 120000 index c175fe9f..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/diffie-hellman/node_modules/.bin/miller-rabin +++ /dev/null @@ -1 +0,0 @@ -../miller-rabin/bin/miller-rabin \ No newline at end of file diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/diffie-hellman/node_modules/bn.js/.npmignore b/node_modules/browserify/node_modules/crypto-browserify/node_modules/diffie-hellman/node_modules/bn.js/.npmignore deleted file mode 100644 index 6d1eebbd..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/diffie-hellman/node_modules/bn.js/.npmignore +++ /dev/null @@ -1,6 +0,0 @@ -benchmarks/ -coverage/ -node_modules/ -npm-debug.log -1.js -logo.png diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/diffie-hellman/node_modules/bn.js/.travis.yml b/node_modules/browserify/node_modules/crypto-browserify/node_modules/diffie-hellman/node_modules/bn.js/.travis.yml deleted file mode 100644 index 936b7b78..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/diffie-hellman/node_modules/bn.js/.travis.yml +++ /dev/null @@ -1,15 +0,0 @@ -sudo: false -language: node_js -node_js: - - "0.10" - - "0.12" - - "4" - - "5" -env: - matrix: - - TEST_SUITE=unit -matrix: - include: - - node_js: "4" - env: TEST_SUITE=lint -script: npm run $TEST_SUITE diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/diffie-hellman/node_modules/bn.js/README.md b/node_modules/browserify/node_modules/crypto-browserify/node_modules/diffie-hellman/node_modules/bn.js/README.md deleted file mode 100644 index fee65baa..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/diffie-hellman/node_modules/bn.js/README.md +++ /dev/null @@ -1,219 +0,0 @@ -# bn.js - -> BigNum in pure javascript - -[![Build Status](https://secure.travis-ci.org/indutny/bn.js.png)](http://travis-ci.org/indutny/bn.js) - -## Install -`npm install --save bn.js` - -## Usage - -```js -const BN = require('bn.js'); - -var a = new BN('dead', 16); -var b = new BN('101010', 2); - -var res = a.add(b); -console.log(res.toString(10)); // 57047 -``` - -**Note**: decimals are not supported in this library. - -## Notation - -### Prefixes - -There are several prefixes to instructions that affect the way the work. Here -is the list of them in the order of appearance in the function name: - -* `i` - perform operation in-place, storing the result in the host object (on - which the method was invoked). Might be used to avoid number allocation costs -* `u` - unsigned, ignore the sign of operands when performing operation, or - always return positive value. Second case applies to reduction operations - like `mod()`. In such cases if the result will be negative - modulo will be - added to the result to make it positive - -### Postfixes - -The only available postfix at the moment is: - -* `n` - which means that the argument of the function must be a plain JavaScript - number - -### Examples - -* `a.iadd(b)` - perform addition on `a` and `b`, storing the result in `a` -* `a.pmod(b)` - reduce `a` modulo `b`, returning positive value -* `a.iushln(13)` - shift bits of `a` left by 13 - -## Instructions - -Prefixes/postfixes are put in parens at the of the line. `endian` - could be -either `le` (little-endian) or `be` (big-endian). - -### Utilities - -* `a.clone()` - clone number -* `a.toString(base, length)` - convert to base-string and pad with zeroes -* `a.toNumber()` - convert to Javascript Number (limited to 53 bits) -* `a.toJSON()` - convert to JSON compatible hex string (alias of `toString(16)`) -* `a.toArray(endian, length)` - convert to byte `Array`, and optionally zero - pad to length, throwing if already exceeding -* `a.toArrayLike(type, endian, length)` - convert to an instance of `type`, - which must behave like an `Array` -* `a.toBuffer(endian, length)` - convert to Node.js Buffer (if available) -* `a.bitLength()` - get number of bits occupied -* `a.zeroBits()` - return number of less-significant consequent zero bits - (example: `1010000` has 4 zero bits) -* `a.byteLength()` - return number of bytes occupied -* `a.isNeg()` - true if the number is negative -* `a.isEven()` - no comments -* `a.isOdd()` - no comments -* `a.isZero()` - no comments -* `a.cmp(b)` - compare numbers and return `-1` (a `<` b), `0` (a `==` b), or `1` (a `>` b) - depending on the comparison result (`ucmp`, `cmpn`) -* `a.lt(b)` - `a` less than `b` (`n`) -* `a.lte(b)` - `a` less than or equals `b` (`n`) -* `a.gt(b)` - `a` greater than `b` (`n`) -* `a.gte(b)` - `a` greater than or equals `b` (`n`) -* `a.eq(b)` - `a` equals `b` (`n`) -* `a.toTwos(width)` - convert to two's complement representation, where `width` is bit width -* `a.fromTwos(width)` - convert from two's complement representation, where `width` is the bit width -* `a.isBN(object)` - returns true if the supplied `object` is a BN.js instance - -### Arithmetics - -* `a.neg()` - negate sign (`i`) -* `a.abs()` - absolute value (`i`) -* `a.add(b)` - addition (`i`, `n`, `in`) -* `a.sub(b)` - subtraction (`i`, `n`, `in`) -* `a.mul(b)` - multiply (`i`, `n`, `in`) -* `a.sqr()` - square (`i`) -* `a.pow(b)` - raise `a` to the power of `b` -* `a.div(b)` - divide (`divn`, `idivn`) -* `a.mod(b)` - reduct (`u`, `n`) (but no `umodn`) -* `a.divRound(b)` - rounded division - -### Bit operations - -* `a.or(b)` - or (`i`, `u`, `iu`) -* `a.and(b)` - and (`i`, `u`, `iu`, `andln`) (NOTE: `andln` is going to be replaced - with `andn` in future) -* `a.xor(b)` - xor (`i`, `u`, `iu`) -* `a.setn(b)` - set specified bit to `1` -* `a.shln(b)` - shift left (`i`, `u`, `iu`) -* `a.shrn(b)` - shift right (`i`, `u`, `iu`) -* `a.testn(b)` - test if specified bit is set -* `a.maskn(b)` - clear bits with indexes higher or equal to `b` (`i`) -* `a.bincn(b)` - add `1 << b` to the number -* `a.notn(w)` - not (for the width specified by `w`) (`i`) - -### Reduction - -* `a.gcd(b)` - GCD -* `a.egcd(b)` - Extended GCD results (`{ a: ..., b: ..., gcd: ... }`) -* `a.invm(b)` - inverse `a` modulo `b` - -## Fast reduction - -When doing lots of reductions using the same modulo, it might be beneficial to -use some tricks: like [Montgomery multiplication][0], or using special algorithm -for [Mersenne Prime][1]. - -### Reduction context - -To enable this tricks one should create a reduction context: - -```js -var red = BN.red(num); -``` -where `num` is just a BN instance. - -Or: - -```js -var red = BN.red(primeName); -``` - -Where `primeName` is either of these [Mersenne Primes][1]: - -* `'k256'` -* `'p224'` -* `'p192'` -* `'p25519'` - -Or: - -```js -var red = BN.mont(num); -``` - -To reduce numbers with [Montgomery trick][1]. `.mont()` is generally faster than -`.red(num)`, but slower than `BN.red(primeName)`. - -### Converting numbers - -Before performing anything in reduction context - numbers should be converted -to it. Usually, this means that one should: - -* Convert inputs to reducted ones -* Operate on them in reduction context -* Convert outputs back from the reduction context - -Here is how one may convert numbers to `red`: - -```js -var redA = a.toRed(red); -``` -Where `red` is a reduction context created using instructions above - -Here is how to convert them back: - -```js -var a = redA.fromRed(); -``` - -### Red instructions - -Most of the instructions from the very start of this readme have their -counterparts in red context: - -* `a.redAdd(b)`, `a.redIAdd(b)` -* `a.redSub(b)`, `a.redISub(b)` -* `a.redShl(num)` -* `a.redMul(b)`, `a.redIMul(b)` -* `a.redSqr()`, `a.redISqr()` -* `a.redSqrt()` - square root modulo reduction context's prime -* `a.redInvm()` - modular inverse of the number -* `a.redNeg()` -* `a.redPow(b)` - modular exponentiation - -## LICENSE - -This software is licensed under the MIT License. - -Copyright Fedor Indutny, 2015. - -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. - -[0]: https://en.wikipedia.org/wiki/Montgomery_modular_multiplication -[1]: https://en.wikipedia.org/wiki/Mersenne_prime diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/diffie-hellman/node_modules/bn.js/lib/bn.js b/node_modules/browserify/node_modules/crypto-browserify/node_modules/diffie-hellman/node_modules/bn.js/lib/bn.js deleted file mode 100644 index 29a4c51a..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/diffie-hellman/node_modules/bn.js/lib/bn.js +++ /dev/null @@ -1,3427 +0,0 @@ -(function (module, exports) { - 'use strict'; - - // Utils - function assert (val, msg) { - if (!val) throw new Error(msg || 'Assertion failed'); - } - - // Could use `inherits` module, but don't want to move from single file - // architecture yet. - function inherits (ctor, superCtor) { - ctor.super_ = superCtor; - var TempCtor = function () {}; - TempCtor.prototype = superCtor.prototype; - ctor.prototype = new TempCtor(); - ctor.prototype.constructor = ctor; - } - - // BN - - function BN (number, base, endian) { - if (BN.isBN(number)) { - return number; - } - - this.negative = 0; - this.words = null; - this.length = 0; - - // Reduction context - this.red = null; - - if (number !== null) { - if (base === 'le' || base === 'be') { - endian = base; - base = 10; - } - - this._init(number || 0, base || 10, endian || 'be'); - } - } - if (typeof module === 'object') { - module.exports = BN; - } else { - exports.BN = BN; - } - - BN.BN = BN; - BN.wordSize = 26; - - var Buffer; - try { - Buffer = require('buf' + 'fer').Buffer; - } catch (e) { - } - - BN.isBN = function isBN (num) { - if (num instanceof BN) { - return true; - } - - return num !== null && typeof num === 'object' && - num.constructor.wordSize === BN.wordSize && Array.isArray(num.words); - }; - - BN.max = function max (left, right) { - if (left.cmp(right) > 0) return left; - return right; - }; - - BN.min = function min (left, right) { - if (left.cmp(right) < 0) return left; - return right; - }; - - BN.prototype._init = function init (number, base, endian) { - if (typeof number === 'number') { - return this._initNumber(number, base, endian); - } - - if (typeof number === 'object') { - return this._initArray(number, base, endian); - } - - if (base === 'hex') { - base = 16; - } - assert(base === (base | 0) && base >= 2 && base <= 36); - - number = number.toString().replace(/\s+/g, ''); - var start = 0; - if (number[0] === '-') { - start++; - } - - if (base === 16) { - this._parseHex(number, start); - } else { - this._parseBase(number, base, start); - } - - if (number[0] === '-') { - this.negative = 1; - } - - this.strip(); - - if (endian !== 'le') return; - - this._initArray(this.toArray(), base, endian); - }; - - BN.prototype._initNumber = function _initNumber (number, base, endian) { - if (number < 0) { - this.negative = 1; - number = -number; - } - if (number < 0x4000000) { - this.words = [ number & 0x3ffffff ]; - this.length = 1; - } else if (number < 0x10000000000000) { - this.words = [ - number & 0x3ffffff, - (number / 0x4000000) & 0x3ffffff - ]; - this.length = 2; - } else { - assert(number < 0x20000000000000); // 2 ^ 53 (unsafe) - this.words = [ - number & 0x3ffffff, - (number / 0x4000000) & 0x3ffffff, - 1 - ]; - this.length = 3; - } - - if (endian !== 'le') return; - - // Reverse the bytes - this._initArray(this.toArray(), base, endian); - }; - - BN.prototype._initArray = function _initArray (number, base, endian) { - // Perhaps a Uint8Array - assert(typeof number.length === 'number'); - if (number.length <= 0) { - this.words = [ 0 ]; - this.length = 1; - return this; - } - - this.length = Math.ceil(number.length / 3); - this.words = new Array(this.length); - for (var i = 0; i < this.length; i++) { - this.words[i] = 0; - } - - var j, w; - var off = 0; - if (endian === 'be') { - for (i = number.length - 1, j = 0; i >= 0; i -= 3) { - w = number[i] | (number[i - 1] << 8) | (number[i - 2] << 16); - this.words[j] |= (w << off) & 0x3ffffff; - this.words[j + 1] = (w >>> (26 - off)) & 0x3ffffff; - off += 24; - if (off >= 26) { - off -= 26; - j++; - } - } - } else if (endian === 'le') { - for (i = 0, j = 0; i < number.length; i += 3) { - w = number[i] | (number[i + 1] << 8) | (number[i + 2] << 16); - this.words[j] |= (w << off) & 0x3ffffff; - this.words[j + 1] = (w >>> (26 - off)) & 0x3ffffff; - off += 24; - if (off >= 26) { - off -= 26; - j++; - } - } - } - return this.strip(); - }; - - function parseHex (str, start, end) { - var r = 0; - var len = Math.min(str.length, end); - for (var i = start; i < len; i++) { - var c = str.charCodeAt(i) - 48; - - r <<= 4; - - // 'a' - 'f' - if (c >= 49 && c <= 54) { - r |= c - 49 + 0xa; - - // 'A' - 'F' - } else if (c >= 17 && c <= 22) { - r |= c - 17 + 0xa; - - // '0' - '9' - } else { - r |= c & 0xf; - } - } - return r; - } - - BN.prototype._parseHex = function _parseHex (number, start) { - // Create possibly bigger array to ensure that it fits the number - this.length = Math.ceil((number.length - start) / 6); - this.words = new Array(this.length); - for (var i = 0; i < this.length; i++) { - this.words[i] = 0; - } - - var j, w; - // Scan 24-bit chunks and add them to the number - var off = 0; - for (i = number.length - 6, j = 0; i >= start; i -= 6) { - w = parseHex(number, i, i + 6); - this.words[j] |= (w << off) & 0x3ffffff; - // NOTE: `0x3fffff` is intentional here, 26bits max shift + 24bit hex limb - this.words[j + 1] |= w >>> (26 - off) & 0x3fffff; - off += 24; - if (off >= 26) { - off -= 26; - j++; - } - } - if (i + 6 !== start) { - w = parseHex(number, start, i + 6); - this.words[j] |= (w << off) & 0x3ffffff; - this.words[j + 1] |= w >>> (26 - off) & 0x3fffff; - } - this.strip(); - }; - - function parseBase (str, start, end, mul) { - var r = 0; - var len = Math.min(str.length, end); - for (var i = start; i < len; i++) { - var c = str.charCodeAt(i) - 48; - - r *= mul; - - // 'a' - if (c >= 49) { - r += c - 49 + 0xa; - - // 'A' - } else if (c >= 17) { - r += c - 17 + 0xa; - - // '0' - '9' - } else { - r += c; - } - } - return r; - } - - BN.prototype._parseBase = function _parseBase (number, base, start) { - // Initialize as zero - this.words = [ 0 ]; - this.length = 1; - - // Find length of limb in base - for (var limbLen = 0, limbPow = 1; limbPow <= 0x3ffffff; limbPow *= base) { - limbLen++; - } - limbLen--; - limbPow = (limbPow / base) | 0; - - var total = number.length - start; - var mod = total % limbLen; - var end = Math.min(total, total - mod) + start; - - var word = 0; - for (var i = start; i < end; i += limbLen) { - word = parseBase(number, i, i + limbLen, base); - - this.imuln(limbPow); - if (this.words[0] + word < 0x4000000) { - this.words[0] += word; - } else { - this._iaddn(word); - } - } - - if (mod !== 0) { - var pow = 1; - word = parseBase(number, i, number.length, base); - - for (i = 0; i < mod; i++) { - pow *= base; - } - - this.imuln(pow); - if (this.words[0] + word < 0x4000000) { - this.words[0] += word; - } else { - this._iaddn(word); - } - } - }; - - BN.prototype.copy = function copy (dest) { - dest.words = new Array(this.length); - for (var i = 0; i < this.length; i++) { - dest.words[i] = this.words[i]; - } - dest.length = this.length; - dest.negative = this.negative; - dest.red = this.red; - }; - - BN.prototype.clone = function clone () { - var r = new BN(null); - this.copy(r); - return r; - }; - - BN.prototype._expand = function _expand (size) { - while (this.length < size) { - this.words[this.length++] = 0; - } - return this; - }; - - // Remove leading `0` from `this` - BN.prototype.strip = function strip () { - while (this.length > 1 && this.words[this.length - 1] === 0) { - this.length--; - } - return this._normSign(); - }; - - BN.prototype._normSign = function _normSign () { - // -0 = 0 - if (this.length === 1 && this.words[0] === 0) { - this.negative = 0; - } - return this; - }; - - BN.prototype.inspect = function inspect () { - return (this.red ? ''; - }; - - /* - - var zeros = []; - var groupSizes = []; - var groupBases = []; - - var s = ''; - var i = -1; - while (++i < BN.wordSize) { - zeros[i] = s; - s += '0'; - } - groupSizes[0] = 0; - groupSizes[1] = 0; - groupBases[0] = 0; - groupBases[1] = 0; - var base = 2 - 1; - while (++base < 36 + 1) { - var groupSize = 0; - var groupBase = 1; - while (groupBase < (1 << BN.wordSize) / base) { - groupBase *= base; - groupSize += 1; - } - groupSizes[base] = groupSize; - groupBases[base] = groupBase; - } - - */ - - var zeros = [ - '', - '0', - '00', - '000', - '0000', - '00000', - '000000', - '0000000', - '00000000', - '000000000', - '0000000000', - '00000000000', - '000000000000', - '0000000000000', - '00000000000000', - '000000000000000', - '0000000000000000', - '00000000000000000', - '000000000000000000', - '0000000000000000000', - '00000000000000000000', - '000000000000000000000', - '0000000000000000000000', - '00000000000000000000000', - '000000000000000000000000', - '0000000000000000000000000' - ]; - - var groupSizes = [ - 0, 0, - 25, 16, 12, 11, 10, 9, 8, - 8, 7, 7, 7, 7, 6, 6, - 6, 6, 6, 6, 6, 5, 5, - 5, 5, 5, 5, 5, 5, 5, - 5, 5, 5, 5, 5, 5, 5 - ]; - - var groupBases = [ - 0, 0, - 33554432, 43046721, 16777216, 48828125, 60466176, 40353607, 16777216, - 43046721, 10000000, 19487171, 35831808, 62748517, 7529536, 11390625, - 16777216, 24137569, 34012224, 47045881, 64000000, 4084101, 5153632, - 6436343, 7962624, 9765625, 11881376, 14348907, 17210368, 20511149, - 24300000, 28629151, 33554432, 39135393, 45435424, 52521875, 60466176 - ]; - - BN.prototype.toString = function toString (base, padding) { - base = base || 10; - padding = padding | 0 || 1; - - var out; - if (base === 16 || base === 'hex') { - out = ''; - var off = 0; - var carry = 0; - for (var i = 0; i < this.length; i++) { - var w = this.words[i]; - var word = (((w << off) | carry) & 0xffffff).toString(16); - carry = (w >>> (24 - off)) & 0xffffff; - if (carry !== 0 || i !== this.length - 1) { - out = zeros[6 - word.length] + word + out; - } else { - out = word + out; - } - off += 2; - if (off >= 26) { - off -= 26; - i--; - } - } - if (carry !== 0) { - out = carry.toString(16) + out; - } - while (out.length % padding !== 0) { - out = '0' + out; - } - if (this.negative !== 0) { - out = '-' + out; - } - return out; - } - - if (base === (base | 0) && base >= 2 && base <= 36) { - // var groupSize = Math.floor(BN.wordSize * Math.LN2 / Math.log(base)); - var groupSize = groupSizes[base]; - // var groupBase = Math.pow(base, groupSize); - var groupBase = groupBases[base]; - out = ''; - var c = this.clone(); - c.negative = 0; - while (!c.isZero()) { - var r = c.modn(groupBase).toString(base); - c = c.idivn(groupBase); - - if (!c.isZero()) { - out = zeros[groupSize - r.length] + r + out; - } else { - out = r + out; - } - } - if (this.isZero()) { - out = '0' + out; - } - while (out.length % padding !== 0) { - out = '0' + out; - } - if (this.negative !== 0) { - out = '-' + out; - } - return out; - } - - assert(false, 'Base should be between 2 and 36'); - }; - - BN.prototype.toNumber = function toNumber () { - var ret = this.words[0]; - if (this.length === 2) { - ret += this.words[1] * 0x4000000; - } else if (this.length === 3 && this.words[2] === 0x01) { - // NOTE: at this stage it is known that the top bit is set - ret += 0x10000000000000 + (this.words[1] * 0x4000000); - } else if (this.length > 2) { - assert(false, 'Number can only safely store up to 53 bits'); - } - return (this.negative !== 0) ? -ret : ret; - }; - - BN.prototype.toJSON = function toJSON () { - return this.toString(16); - }; - - BN.prototype.toBuffer = function toBuffer (endian, length) { - assert(typeof Buffer !== 'undefined'); - return this.toArrayLike(Buffer, endian, length); - }; - - BN.prototype.toArray = function toArray (endian, length) { - return this.toArrayLike(Array, endian, length); - }; - - BN.prototype.toArrayLike = function toArrayLike (ArrayType, endian, length) { - var byteLength = this.byteLength(); - var reqLength = length || Math.max(1, byteLength); - assert(byteLength <= reqLength, 'byte array longer than desired length'); - assert(reqLength > 0, 'Requested array length <= 0'); - - this.strip(); - var littleEndian = endian === 'le'; - var res = new ArrayType(reqLength); - - var b, i; - var q = this.clone(); - if (!littleEndian) { - // Assume big-endian - for (i = 0; i < reqLength - byteLength; i++) { - res[i] = 0; - } - - for (i = 0; !q.isZero(); i++) { - b = q.andln(0xff); - q.iushrn(8); - - res[reqLength - i - 1] = b; - } - } else { - for (i = 0; !q.isZero(); i++) { - b = q.andln(0xff); - q.iushrn(8); - - res[i] = b; - } - - for (; i < reqLength; i++) { - res[i] = 0; - } - } - - return res; - }; - - if (Math.clz32) { - BN.prototype._countBits = function _countBits (w) { - return 32 - Math.clz32(w); - }; - } else { - BN.prototype._countBits = function _countBits (w) { - var t = w; - var r = 0; - if (t >= 0x1000) { - r += 13; - t >>>= 13; - } - if (t >= 0x40) { - r += 7; - t >>>= 7; - } - if (t >= 0x8) { - r += 4; - t >>>= 4; - } - if (t >= 0x02) { - r += 2; - t >>>= 2; - } - return r + t; - }; - } - - BN.prototype._zeroBits = function _zeroBits (w) { - // Short-cut - if (w === 0) return 26; - - var t = w; - var r = 0; - if ((t & 0x1fff) === 0) { - r += 13; - t >>>= 13; - } - if ((t & 0x7f) === 0) { - r += 7; - t >>>= 7; - } - if ((t & 0xf) === 0) { - r += 4; - t >>>= 4; - } - if ((t & 0x3) === 0) { - r += 2; - t >>>= 2; - } - if ((t & 0x1) === 0) { - r++; - } - return r; - }; - - // Return number of used bits in a BN - BN.prototype.bitLength = function bitLength () { - var w = this.words[this.length - 1]; - var hi = this._countBits(w); - return (this.length - 1) * 26 + hi; - }; - - function toBitArray (num) { - var w = new Array(num.bitLength()); - - for (var bit = 0; bit < w.length; bit++) { - var off = (bit / 26) | 0; - var wbit = bit % 26; - - w[bit] = (num.words[off] & (1 << wbit)) >>> wbit; - } - - return w; - } - - // Number of trailing zero bits - BN.prototype.zeroBits = function zeroBits () { - if (this.isZero()) return 0; - - var r = 0; - for (var i = 0; i < this.length; i++) { - var b = this._zeroBits(this.words[i]); - r += b; - if (b !== 26) break; - } - return r; - }; - - BN.prototype.byteLength = function byteLength () { - return Math.ceil(this.bitLength() / 8); - }; - - BN.prototype.toTwos = function toTwos (width) { - if (this.negative !== 0) { - return this.abs().inotn(width).iaddn(1); - } - return this.clone(); - }; - - BN.prototype.fromTwos = function fromTwos (width) { - if (this.testn(width - 1)) { - return this.notn(width).iaddn(1).ineg(); - } - return this.clone(); - }; - - BN.prototype.isNeg = function isNeg () { - return this.negative !== 0; - }; - - // Return negative clone of `this` - BN.prototype.neg = function neg () { - return this.clone().ineg(); - }; - - BN.prototype.ineg = function ineg () { - if (!this.isZero()) { - this.negative ^= 1; - } - - return this; - }; - - // Or `num` with `this` in-place - BN.prototype.iuor = function iuor (num) { - while (this.length < num.length) { - this.words[this.length++] = 0; - } - - for (var i = 0; i < num.length; i++) { - this.words[i] = this.words[i] | num.words[i]; - } - - return this.strip(); - }; - - BN.prototype.ior = function ior (num) { - assert((this.negative | num.negative) === 0); - return this.iuor(num); - }; - - // Or `num` with `this` - BN.prototype.or = function or (num) { - if (this.length > num.length) return this.clone().ior(num); - return num.clone().ior(this); - }; - - BN.prototype.uor = function uor (num) { - if (this.length > num.length) return this.clone().iuor(num); - return num.clone().iuor(this); - }; - - // And `num` with `this` in-place - BN.prototype.iuand = function iuand (num) { - // b = min-length(num, this) - var b; - if (this.length > num.length) { - b = num; - } else { - b = this; - } - - for (var i = 0; i < b.length; i++) { - this.words[i] = this.words[i] & num.words[i]; - } - - this.length = b.length; - - return this.strip(); - }; - - BN.prototype.iand = function iand (num) { - assert((this.negative | num.negative) === 0); - return this.iuand(num); - }; - - // And `num` with `this` - BN.prototype.and = function and (num) { - if (this.length > num.length) return this.clone().iand(num); - return num.clone().iand(this); - }; - - BN.prototype.uand = function uand (num) { - if (this.length > num.length) return this.clone().iuand(num); - return num.clone().iuand(this); - }; - - // Xor `num` with `this` in-place - BN.prototype.iuxor = function iuxor (num) { - // a.length > b.length - var a; - var b; - if (this.length > num.length) { - a = this; - b = num; - } else { - a = num; - b = this; - } - - for (var i = 0; i < b.length; i++) { - this.words[i] = a.words[i] ^ b.words[i]; - } - - if (this !== a) { - for (; i < a.length; i++) { - this.words[i] = a.words[i]; - } - } - - this.length = a.length; - - return this.strip(); - }; - - BN.prototype.ixor = function ixor (num) { - assert((this.negative | num.negative) === 0); - return this.iuxor(num); - }; - - // Xor `num` with `this` - BN.prototype.xor = function xor (num) { - if (this.length > num.length) return this.clone().ixor(num); - return num.clone().ixor(this); - }; - - BN.prototype.uxor = function uxor (num) { - if (this.length > num.length) return this.clone().iuxor(num); - return num.clone().iuxor(this); - }; - - // Not ``this`` with ``width`` bitwidth - BN.prototype.inotn = function inotn (width) { - assert(typeof width === 'number' && width >= 0); - - var bytesNeeded = Math.ceil(width / 26) | 0; - var bitsLeft = width % 26; - - // Extend the buffer with leading zeroes - this._expand(bytesNeeded); - - if (bitsLeft > 0) { - bytesNeeded--; - } - - // Handle complete words - for (var i = 0; i < bytesNeeded; i++) { - this.words[i] = ~this.words[i] & 0x3ffffff; - } - - // Handle the residue - if (bitsLeft > 0) { - this.words[i] = ~this.words[i] & (0x3ffffff >> (26 - bitsLeft)); - } - - // And remove leading zeroes - return this.strip(); - }; - - BN.prototype.notn = function notn (width) { - return this.clone().inotn(width); - }; - - // Set `bit` of `this` - BN.prototype.setn = function setn (bit, val) { - assert(typeof bit === 'number' && bit >= 0); - - var off = (bit / 26) | 0; - var wbit = bit % 26; - - this._expand(off + 1); - - if (val) { - this.words[off] = this.words[off] | (1 << wbit); - } else { - this.words[off] = this.words[off] & ~(1 << wbit); - } - - return this.strip(); - }; - - // Add `num` to `this` in-place - BN.prototype.iadd = function iadd (num) { - var r; - - // negative + positive - if (this.negative !== 0 && num.negative === 0) { - this.negative = 0; - r = this.isub(num); - this.negative ^= 1; - return this._normSign(); - - // positive + negative - } else if (this.negative === 0 && num.negative !== 0) { - num.negative = 0; - r = this.isub(num); - num.negative = 1; - return r._normSign(); - } - - // a.length > b.length - var a, b; - if (this.length > num.length) { - a = this; - b = num; - } else { - a = num; - b = this; - } - - var carry = 0; - for (var i = 0; i < b.length; i++) { - r = (a.words[i] | 0) + (b.words[i] | 0) + carry; - this.words[i] = r & 0x3ffffff; - carry = r >>> 26; - } - for (; carry !== 0 && i < a.length; i++) { - r = (a.words[i] | 0) + carry; - this.words[i] = r & 0x3ffffff; - carry = r >>> 26; - } - - this.length = a.length; - if (carry !== 0) { - this.words[this.length] = carry; - this.length++; - // Copy the rest of the words - } else if (a !== this) { - for (; i < a.length; i++) { - this.words[i] = a.words[i]; - } - } - - return this; - }; - - // Add `num` to `this` - BN.prototype.add = function add (num) { - var res; - if (num.negative !== 0 && this.negative === 0) { - num.negative = 0; - res = this.sub(num); - num.negative ^= 1; - return res; - } else if (num.negative === 0 && this.negative !== 0) { - this.negative = 0; - res = num.sub(this); - this.negative = 1; - return res; - } - - if (this.length > num.length) return this.clone().iadd(num); - - return num.clone().iadd(this); - }; - - // Subtract `num` from `this` in-place - BN.prototype.isub = function isub (num) { - // this - (-num) = this + num - if (num.negative !== 0) { - num.negative = 0; - var r = this.iadd(num); - num.negative = 1; - return r._normSign(); - - // -this - num = -(this + num) - } else if (this.negative !== 0) { - this.negative = 0; - this.iadd(num); - this.negative = 1; - return this._normSign(); - } - - // At this point both numbers are positive - var cmp = this.cmp(num); - - // Optimization - zeroify - if (cmp === 0) { - this.negative = 0; - this.length = 1; - this.words[0] = 0; - return this; - } - - // a > b - var a, b; - if (cmp > 0) { - a = this; - b = num; - } else { - a = num; - b = this; - } - - var carry = 0; - for (var i = 0; i < b.length; i++) { - r = (a.words[i] | 0) - (b.words[i] | 0) + carry; - carry = r >> 26; - this.words[i] = r & 0x3ffffff; - } - for (; carry !== 0 && i < a.length; i++) { - r = (a.words[i] | 0) + carry; - carry = r >> 26; - this.words[i] = r & 0x3ffffff; - } - - // Copy rest of the words - if (carry === 0 && i < a.length && a !== this) { - for (; i < a.length; i++) { - this.words[i] = a.words[i]; - } - } - - this.length = Math.max(this.length, i); - - if (a !== this) { - this.negative = 1; - } - - return this.strip(); - }; - - // Subtract `num` from `this` - BN.prototype.sub = function sub (num) { - return this.clone().isub(num); - }; - - function smallMulTo (self, num, out) { - out.negative = num.negative ^ self.negative; - var len = (self.length + num.length) | 0; - out.length = len; - len = (len - 1) | 0; - - // Peel one iteration (compiler can't do it, because of code complexity) - var a = self.words[0] | 0; - var b = num.words[0] | 0; - var r = a * b; - - var lo = r & 0x3ffffff; - var carry = (r / 0x4000000) | 0; - out.words[0] = lo; - - for (var k = 1; k < len; k++) { - // Sum all words with the same `i + j = k` and accumulate `ncarry`, - // note that ncarry could be >= 0x3ffffff - var ncarry = carry >>> 26; - var rword = carry & 0x3ffffff; - var maxJ = Math.min(k, num.length - 1); - for (var j = Math.max(0, k - self.length + 1); j <= maxJ; j++) { - var i = (k - j) | 0; - a = self.words[i] | 0; - b = num.words[j] | 0; - r = a * b + rword; - ncarry += (r / 0x4000000) | 0; - rword = r & 0x3ffffff; - } - out.words[k] = rword | 0; - carry = ncarry | 0; - } - if (carry !== 0) { - out.words[k] = carry | 0; - } else { - out.length--; - } - - return out.strip(); - } - - // TODO(indutny): it may be reasonable to omit it for users who don't need - // to work with 256-bit numbers, otherwise it gives 20% improvement for 256-bit - // multiplication (like elliptic secp256k1). - var comb10MulTo = function comb10MulTo (self, num, out) { - var a = self.words; - var b = num.words; - var o = out.words; - var c = 0; - var lo; - var mid; - var hi; - var a0 = a[0] | 0; - var al0 = a0 & 0x1fff; - var ah0 = a0 >>> 13; - var a1 = a[1] | 0; - var al1 = a1 & 0x1fff; - var ah1 = a1 >>> 13; - var a2 = a[2] | 0; - var al2 = a2 & 0x1fff; - var ah2 = a2 >>> 13; - var a3 = a[3] | 0; - var al3 = a3 & 0x1fff; - var ah3 = a3 >>> 13; - var a4 = a[4] | 0; - var al4 = a4 & 0x1fff; - var ah4 = a4 >>> 13; - var a5 = a[5] | 0; - var al5 = a5 & 0x1fff; - var ah5 = a5 >>> 13; - var a6 = a[6] | 0; - var al6 = a6 & 0x1fff; - var ah6 = a6 >>> 13; - var a7 = a[7] | 0; - var al7 = a7 & 0x1fff; - var ah7 = a7 >>> 13; - var a8 = a[8] | 0; - var al8 = a8 & 0x1fff; - var ah8 = a8 >>> 13; - var a9 = a[9] | 0; - var al9 = a9 & 0x1fff; - var ah9 = a9 >>> 13; - var b0 = b[0] | 0; - var bl0 = b0 & 0x1fff; - var bh0 = b0 >>> 13; - var b1 = b[1] | 0; - var bl1 = b1 & 0x1fff; - var bh1 = b1 >>> 13; - var b2 = b[2] | 0; - var bl2 = b2 & 0x1fff; - var bh2 = b2 >>> 13; - var b3 = b[3] | 0; - var bl3 = b3 & 0x1fff; - var bh3 = b3 >>> 13; - var b4 = b[4] | 0; - var bl4 = b4 & 0x1fff; - var bh4 = b4 >>> 13; - var b5 = b[5] | 0; - var bl5 = b5 & 0x1fff; - var bh5 = b5 >>> 13; - var b6 = b[6] | 0; - var bl6 = b6 & 0x1fff; - var bh6 = b6 >>> 13; - var b7 = b[7] | 0; - var bl7 = b7 & 0x1fff; - var bh7 = b7 >>> 13; - var b8 = b[8] | 0; - var bl8 = b8 & 0x1fff; - var bh8 = b8 >>> 13; - var b9 = b[9] | 0; - var bl9 = b9 & 0x1fff; - var bh9 = b9 >>> 13; - - out.negative = self.negative ^ num.negative; - out.length = 19; - /* k = 0 */ - lo = Math.imul(al0, bl0); - mid = Math.imul(al0, bh0); - mid = (mid + Math.imul(ah0, bl0)) | 0; - hi = Math.imul(ah0, bh0); - var w0 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0; - c = (((hi + (mid >>> 13)) | 0) + (w0 >>> 26)) | 0; - w0 &= 0x3ffffff; - /* k = 1 */ - lo = Math.imul(al1, bl0); - mid = Math.imul(al1, bh0); - mid = (mid + Math.imul(ah1, bl0)) | 0; - hi = Math.imul(ah1, bh0); - lo = (lo + Math.imul(al0, bl1)) | 0; - mid = (mid + Math.imul(al0, bh1)) | 0; - mid = (mid + Math.imul(ah0, bl1)) | 0; - hi = (hi + Math.imul(ah0, bh1)) | 0; - var w1 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0; - c = (((hi + (mid >>> 13)) | 0) + (w1 >>> 26)) | 0; - w1 &= 0x3ffffff; - /* k = 2 */ - lo = Math.imul(al2, bl0); - mid = Math.imul(al2, bh0); - mid = (mid + Math.imul(ah2, bl0)) | 0; - hi = Math.imul(ah2, bh0); - lo = (lo + Math.imul(al1, bl1)) | 0; - mid = (mid + Math.imul(al1, bh1)) | 0; - mid = (mid + Math.imul(ah1, bl1)) | 0; - hi = (hi + Math.imul(ah1, bh1)) | 0; - lo = (lo + Math.imul(al0, bl2)) | 0; - mid = (mid + Math.imul(al0, bh2)) | 0; - mid = (mid + Math.imul(ah0, bl2)) | 0; - hi = (hi + Math.imul(ah0, bh2)) | 0; - var w2 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0; - c = (((hi + (mid >>> 13)) | 0) + (w2 >>> 26)) | 0; - w2 &= 0x3ffffff; - /* k = 3 */ - lo = Math.imul(al3, bl0); - mid = Math.imul(al3, bh0); - mid = (mid + Math.imul(ah3, bl0)) | 0; - hi = Math.imul(ah3, bh0); - lo = (lo + Math.imul(al2, bl1)) | 0; - mid = (mid + Math.imul(al2, bh1)) | 0; - mid = (mid + Math.imul(ah2, bl1)) | 0; - hi = (hi + Math.imul(ah2, bh1)) | 0; - lo = (lo + Math.imul(al1, bl2)) | 0; - mid = (mid + Math.imul(al1, bh2)) | 0; - mid = (mid + Math.imul(ah1, bl2)) | 0; - hi = (hi + Math.imul(ah1, bh2)) | 0; - lo = (lo + Math.imul(al0, bl3)) | 0; - mid = (mid + Math.imul(al0, bh3)) | 0; - mid = (mid + Math.imul(ah0, bl3)) | 0; - hi = (hi + Math.imul(ah0, bh3)) | 0; - var w3 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0; - c = (((hi + (mid >>> 13)) | 0) + (w3 >>> 26)) | 0; - w3 &= 0x3ffffff; - /* k = 4 */ - lo = Math.imul(al4, bl0); - mid = Math.imul(al4, bh0); - mid = (mid + Math.imul(ah4, bl0)) | 0; - hi = Math.imul(ah4, bh0); - lo = (lo + Math.imul(al3, bl1)) | 0; - mid = (mid + Math.imul(al3, bh1)) | 0; - mid = (mid + Math.imul(ah3, bl1)) | 0; - hi = (hi + Math.imul(ah3, bh1)) | 0; - lo = (lo + Math.imul(al2, bl2)) | 0; - mid = (mid + Math.imul(al2, bh2)) | 0; - mid = (mid + Math.imul(ah2, bl2)) | 0; - hi = (hi + Math.imul(ah2, bh2)) | 0; - lo = (lo + Math.imul(al1, bl3)) | 0; - mid = (mid + Math.imul(al1, bh3)) | 0; - mid = (mid + Math.imul(ah1, bl3)) | 0; - hi = (hi + Math.imul(ah1, bh3)) | 0; - lo = (lo + Math.imul(al0, bl4)) | 0; - mid = (mid + Math.imul(al0, bh4)) | 0; - mid = (mid + Math.imul(ah0, bl4)) | 0; - hi = (hi + Math.imul(ah0, bh4)) | 0; - var w4 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0; - c = (((hi + (mid >>> 13)) | 0) + (w4 >>> 26)) | 0; - w4 &= 0x3ffffff; - /* k = 5 */ - lo = Math.imul(al5, bl0); - mid = Math.imul(al5, bh0); - mid = (mid + Math.imul(ah5, bl0)) | 0; - hi = Math.imul(ah5, bh0); - lo = (lo + Math.imul(al4, bl1)) | 0; - mid = (mid + Math.imul(al4, bh1)) | 0; - mid = (mid + Math.imul(ah4, bl1)) | 0; - hi = (hi + Math.imul(ah4, bh1)) | 0; - lo = (lo + Math.imul(al3, bl2)) | 0; - mid = (mid + Math.imul(al3, bh2)) | 0; - mid = (mid + Math.imul(ah3, bl2)) | 0; - hi = (hi + Math.imul(ah3, bh2)) | 0; - lo = (lo + Math.imul(al2, bl3)) | 0; - mid = (mid + Math.imul(al2, bh3)) | 0; - mid = (mid + Math.imul(ah2, bl3)) | 0; - hi = (hi + Math.imul(ah2, bh3)) | 0; - lo = (lo + Math.imul(al1, bl4)) | 0; - mid = (mid + Math.imul(al1, bh4)) | 0; - mid = (mid + Math.imul(ah1, bl4)) | 0; - hi = (hi + Math.imul(ah1, bh4)) | 0; - lo = (lo + Math.imul(al0, bl5)) | 0; - mid = (mid + Math.imul(al0, bh5)) | 0; - mid = (mid + Math.imul(ah0, bl5)) | 0; - hi = (hi + Math.imul(ah0, bh5)) | 0; - var w5 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0; - c = (((hi + (mid >>> 13)) | 0) + (w5 >>> 26)) | 0; - w5 &= 0x3ffffff; - /* k = 6 */ - lo = Math.imul(al6, bl0); - mid = Math.imul(al6, bh0); - mid = (mid + Math.imul(ah6, bl0)) | 0; - hi = Math.imul(ah6, bh0); - lo = (lo + Math.imul(al5, bl1)) | 0; - mid = (mid + Math.imul(al5, bh1)) | 0; - mid = (mid + Math.imul(ah5, bl1)) | 0; - hi = (hi + Math.imul(ah5, bh1)) | 0; - lo = (lo + Math.imul(al4, bl2)) | 0; - mid = (mid + Math.imul(al4, bh2)) | 0; - mid = (mid + Math.imul(ah4, bl2)) | 0; - hi = (hi + Math.imul(ah4, bh2)) | 0; - lo = (lo + Math.imul(al3, bl3)) | 0; - mid = (mid + Math.imul(al3, bh3)) | 0; - mid = (mid + Math.imul(ah3, bl3)) | 0; - hi = (hi + Math.imul(ah3, bh3)) | 0; - lo = (lo + Math.imul(al2, bl4)) | 0; - mid = (mid + Math.imul(al2, bh4)) | 0; - mid = (mid + Math.imul(ah2, bl4)) | 0; - hi = (hi + Math.imul(ah2, bh4)) | 0; - lo = (lo + Math.imul(al1, bl5)) | 0; - mid = (mid + Math.imul(al1, bh5)) | 0; - mid = (mid + Math.imul(ah1, bl5)) | 0; - hi = (hi + Math.imul(ah1, bh5)) | 0; - lo = (lo + Math.imul(al0, bl6)) | 0; - mid = (mid + Math.imul(al0, bh6)) | 0; - mid = (mid + Math.imul(ah0, bl6)) | 0; - hi = (hi + Math.imul(ah0, bh6)) | 0; - var w6 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0; - c = (((hi + (mid >>> 13)) | 0) + (w6 >>> 26)) | 0; - w6 &= 0x3ffffff; - /* k = 7 */ - lo = Math.imul(al7, bl0); - mid = Math.imul(al7, bh0); - mid = (mid + Math.imul(ah7, bl0)) | 0; - hi = Math.imul(ah7, bh0); - lo = (lo + Math.imul(al6, bl1)) | 0; - mid = (mid + Math.imul(al6, bh1)) | 0; - mid = (mid + Math.imul(ah6, bl1)) | 0; - hi = (hi + Math.imul(ah6, bh1)) | 0; - lo = (lo + Math.imul(al5, bl2)) | 0; - mid = (mid + Math.imul(al5, bh2)) | 0; - mid = (mid + Math.imul(ah5, bl2)) | 0; - hi = (hi + Math.imul(ah5, bh2)) | 0; - lo = (lo + Math.imul(al4, bl3)) | 0; - mid = (mid + Math.imul(al4, bh3)) | 0; - mid = (mid + Math.imul(ah4, bl3)) | 0; - hi = (hi + Math.imul(ah4, bh3)) | 0; - lo = (lo + Math.imul(al3, bl4)) | 0; - mid = (mid + Math.imul(al3, bh4)) | 0; - mid = (mid + Math.imul(ah3, bl4)) | 0; - hi = (hi + Math.imul(ah3, bh4)) | 0; - lo = (lo + Math.imul(al2, bl5)) | 0; - mid = (mid + Math.imul(al2, bh5)) | 0; - mid = (mid + Math.imul(ah2, bl5)) | 0; - hi = (hi + Math.imul(ah2, bh5)) | 0; - lo = (lo + Math.imul(al1, bl6)) | 0; - mid = (mid + Math.imul(al1, bh6)) | 0; - mid = (mid + Math.imul(ah1, bl6)) | 0; - hi = (hi + Math.imul(ah1, bh6)) | 0; - lo = (lo + Math.imul(al0, bl7)) | 0; - mid = (mid + Math.imul(al0, bh7)) | 0; - mid = (mid + Math.imul(ah0, bl7)) | 0; - hi = (hi + Math.imul(ah0, bh7)) | 0; - var w7 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0; - c = (((hi + (mid >>> 13)) | 0) + (w7 >>> 26)) | 0; - w7 &= 0x3ffffff; - /* k = 8 */ - lo = Math.imul(al8, bl0); - mid = Math.imul(al8, bh0); - mid = (mid + Math.imul(ah8, bl0)) | 0; - hi = Math.imul(ah8, bh0); - lo = (lo + Math.imul(al7, bl1)) | 0; - mid = (mid + Math.imul(al7, bh1)) | 0; - mid = (mid + Math.imul(ah7, bl1)) | 0; - hi = (hi + Math.imul(ah7, bh1)) | 0; - lo = (lo + Math.imul(al6, bl2)) | 0; - mid = (mid + Math.imul(al6, bh2)) | 0; - mid = (mid + Math.imul(ah6, bl2)) | 0; - hi = (hi + Math.imul(ah6, bh2)) | 0; - lo = (lo + Math.imul(al5, bl3)) | 0; - mid = (mid + Math.imul(al5, bh3)) | 0; - mid = (mid + Math.imul(ah5, bl3)) | 0; - hi = (hi + Math.imul(ah5, bh3)) | 0; - lo = (lo + Math.imul(al4, bl4)) | 0; - mid = (mid + Math.imul(al4, bh4)) | 0; - mid = (mid + Math.imul(ah4, bl4)) | 0; - hi = (hi + Math.imul(ah4, bh4)) | 0; - lo = (lo + Math.imul(al3, bl5)) | 0; - mid = (mid + Math.imul(al3, bh5)) | 0; - mid = (mid + Math.imul(ah3, bl5)) | 0; - hi = (hi + Math.imul(ah3, bh5)) | 0; - lo = (lo + Math.imul(al2, bl6)) | 0; - mid = (mid + Math.imul(al2, bh6)) | 0; - mid = (mid + Math.imul(ah2, bl6)) | 0; - hi = (hi + Math.imul(ah2, bh6)) | 0; - lo = (lo + Math.imul(al1, bl7)) | 0; - mid = (mid + Math.imul(al1, bh7)) | 0; - mid = (mid + Math.imul(ah1, bl7)) | 0; - hi = (hi + Math.imul(ah1, bh7)) | 0; - lo = (lo + Math.imul(al0, bl8)) | 0; - mid = (mid + Math.imul(al0, bh8)) | 0; - mid = (mid + Math.imul(ah0, bl8)) | 0; - hi = (hi + Math.imul(ah0, bh8)) | 0; - var w8 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0; - c = (((hi + (mid >>> 13)) | 0) + (w8 >>> 26)) | 0; - w8 &= 0x3ffffff; - /* k = 9 */ - lo = Math.imul(al9, bl0); - mid = Math.imul(al9, bh0); - mid = (mid + Math.imul(ah9, bl0)) | 0; - hi = Math.imul(ah9, bh0); - lo = (lo + Math.imul(al8, bl1)) | 0; - mid = (mid + Math.imul(al8, bh1)) | 0; - mid = (mid + Math.imul(ah8, bl1)) | 0; - hi = (hi + Math.imul(ah8, bh1)) | 0; - lo = (lo + Math.imul(al7, bl2)) | 0; - mid = (mid + Math.imul(al7, bh2)) | 0; - mid = (mid + Math.imul(ah7, bl2)) | 0; - hi = (hi + Math.imul(ah7, bh2)) | 0; - lo = (lo + Math.imul(al6, bl3)) | 0; - mid = (mid + Math.imul(al6, bh3)) | 0; - mid = (mid + Math.imul(ah6, bl3)) | 0; - hi = (hi + Math.imul(ah6, bh3)) | 0; - lo = (lo + Math.imul(al5, bl4)) | 0; - mid = (mid + Math.imul(al5, bh4)) | 0; - mid = (mid + Math.imul(ah5, bl4)) | 0; - hi = (hi + Math.imul(ah5, bh4)) | 0; - lo = (lo + Math.imul(al4, bl5)) | 0; - mid = (mid + Math.imul(al4, bh5)) | 0; - mid = (mid + Math.imul(ah4, bl5)) | 0; - hi = (hi + Math.imul(ah4, bh5)) | 0; - lo = (lo + Math.imul(al3, bl6)) | 0; - mid = (mid + Math.imul(al3, bh6)) | 0; - mid = (mid + Math.imul(ah3, bl6)) | 0; - hi = (hi + Math.imul(ah3, bh6)) | 0; - lo = (lo + Math.imul(al2, bl7)) | 0; - mid = (mid + Math.imul(al2, bh7)) | 0; - mid = (mid + Math.imul(ah2, bl7)) | 0; - hi = (hi + Math.imul(ah2, bh7)) | 0; - lo = (lo + Math.imul(al1, bl8)) | 0; - mid = (mid + Math.imul(al1, bh8)) | 0; - mid = (mid + Math.imul(ah1, bl8)) | 0; - hi = (hi + Math.imul(ah1, bh8)) | 0; - lo = (lo + Math.imul(al0, bl9)) | 0; - mid = (mid + Math.imul(al0, bh9)) | 0; - mid = (mid + Math.imul(ah0, bl9)) | 0; - hi = (hi + Math.imul(ah0, bh9)) | 0; - var w9 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0; - c = (((hi + (mid >>> 13)) | 0) + (w9 >>> 26)) | 0; - w9 &= 0x3ffffff; - /* k = 10 */ - lo = Math.imul(al9, bl1); - mid = Math.imul(al9, bh1); - mid = (mid + Math.imul(ah9, bl1)) | 0; - hi = Math.imul(ah9, bh1); - lo = (lo + Math.imul(al8, bl2)) | 0; - mid = (mid + Math.imul(al8, bh2)) | 0; - mid = (mid + Math.imul(ah8, bl2)) | 0; - hi = (hi + Math.imul(ah8, bh2)) | 0; - lo = (lo + Math.imul(al7, bl3)) | 0; - mid = (mid + Math.imul(al7, bh3)) | 0; - mid = (mid + Math.imul(ah7, bl3)) | 0; - hi = (hi + Math.imul(ah7, bh3)) | 0; - lo = (lo + Math.imul(al6, bl4)) | 0; - mid = (mid + Math.imul(al6, bh4)) | 0; - mid = (mid + Math.imul(ah6, bl4)) | 0; - hi = (hi + Math.imul(ah6, bh4)) | 0; - lo = (lo + Math.imul(al5, bl5)) | 0; - mid = (mid + Math.imul(al5, bh5)) | 0; - mid = (mid + Math.imul(ah5, bl5)) | 0; - hi = (hi + Math.imul(ah5, bh5)) | 0; - lo = (lo + Math.imul(al4, bl6)) | 0; - mid = (mid + Math.imul(al4, bh6)) | 0; - mid = (mid + Math.imul(ah4, bl6)) | 0; - hi = (hi + Math.imul(ah4, bh6)) | 0; - lo = (lo + Math.imul(al3, bl7)) | 0; - mid = (mid + Math.imul(al3, bh7)) | 0; - mid = (mid + Math.imul(ah3, bl7)) | 0; - hi = (hi + Math.imul(ah3, bh7)) | 0; - lo = (lo + Math.imul(al2, bl8)) | 0; - mid = (mid + Math.imul(al2, bh8)) | 0; - mid = (mid + Math.imul(ah2, bl8)) | 0; - hi = (hi + Math.imul(ah2, bh8)) | 0; - lo = (lo + Math.imul(al1, bl9)) | 0; - mid = (mid + Math.imul(al1, bh9)) | 0; - mid = (mid + Math.imul(ah1, bl9)) | 0; - hi = (hi + Math.imul(ah1, bh9)) | 0; - var w10 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0; - c = (((hi + (mid >>> 13)) | 0) + (w10 >>> 26)) | 0; - w10 &= 0x3ffffff; - /* k = 11 */ - lo = Math.imul(al9, bl2); - mid = Math.imul(al9, bh2); - mid = (mid + Math.imul(ah9, bl2)) | 0; - hi = Math.imul(ah9, bh2); - lo = (lo + Math.imul(al8, bl3)) | 0; - mid = (mid + Math.imul(al8, bh3)) | 0; - mid = (mid + Math.imul(ah8, bl3)) | 0; - hi = (hi + Math.imul(ah8, bh3)) | 0; - lo = (lo + Math.imul(al7, bl4)) | 0; - mid = (mid + Math.imul(al7, bh4)) | 0; - mid = (mid + Math.imul(ah7, bl4)) | 0; - hi = (hi + Math.imul(ah7, bh4)) | 0; - lo = (lo + Math.imul(al6, bl5)) | 0; - mid = (mid + Math.imul(al6, bh5)) | 0; - mid = (mid + Math.imul(ah6, bl5)) | 0; - hi = (hi + Math.imul(ah6, bh5)) | 0; - lo = (lo + Math.imul(al5, bl6)) | 0; - mid = (mid + Math.imul(al5, bh6)) | 0; - mid = (mid + Math.imul(ah5, bl6)) | 0; - hi = (hi + Math.imul(ah5, bh6)) | 0; - lo = (lo + Math.imul(al4, bl7)) | 0; - mid = (mid + Math.imul(al4, bh7)) | 0; - mid = (mid + Math.imul(ah4, bl7)) | 0; - hi = (hi + Math.imul(ah4, bh7)) | 0; - lo = (lo + Math.imul(al3, bl8)) | 0; - mid = (mid + Math.imul(al3, bh8)) | 0; - mid = (mid + Math.imul(ah3, bl8)) | 0; - hi = (hi + Math.imul(ah3, bh8)) | 0; - lo = (lo + Math.imul(al2, bl9)) | 0; - mid = (mid + Math.imul(al2, bh9)) | 0; - mid = (mid + Math.imul(ah2, bl9)) | 0; - hi = (hi + Math.imul(ah2, bh9)) | 0; - var w11 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0; - c = (((hi + (mid >>> 13)) | 0) + (w11 >>> 26)) | 0; - w11 &= 0x3ffffff; - /* k = 12 */ - lo = Math.imul(al9, bl3); - mid = Math.imul(al9, bh3); - mid = (mid + Math.imul(ah9, bl3)) | 0; - hi = Math.imul(ah9, bh3); - lo = (lo + Math.imul(al8, bl4)) | 0; - mid = (mid + Math.imul(al8, bh4)) | 0; - mid = (mid + Math.imul(ah8, bl4)) | 0; - hi = (hi + Math.imul(ah8, bh4)) | 0; - lo = (lo + Math.imul(al7, bl5)) | 0; - mid = (mid + Math.imul(al7, bh5)) | 0; - mid = (mid + Math.imul(ah7, bl5)) | 0; - hi = (hi + Math.imul(ah7, bh5)) | 0; - lo = (lo + Math.imul(al6, bl6)) | 0; - mid = (mid + Math.imul(al6, bh6)) | 0; - mid = (mid + Math.imul(ah6, bl6)) | 0; - hi = (hi + Math.imul(ah6, bh6)) | 0; - lo = (lo + Math.imul(al5, bl7)) | 0; - mid = (mid + Math.imul(al5, bh7)) | 0; - mid = (mid + Math.imul(ah5, bl7)) | 0; - hi = (hi + Math.imul(ah5, bh7)) | 0; - lo = (lo + Math.imul(al4, bl8)) | 0; - mid = (mid + Math.imul(al4, bh8)) | 0; - mid = (mid + Math.imul(ah4, bl8)) | 0; - hi = (hi + Math.imul(ah4, bh8)) | 0; - lo = (lo + Math.imul(al3, bl9)) | 0; - mid = (mid + Math.imul(al3, bh9)) | 0; - mid = (mid + Math.imul(ah3, bl9)) | 0; - hi = (hi + Math.imul(ah3, bh9)) | 0; - var w12 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0; - c = (((hi + (mid >>> 13)) | 0) + (w12 >>> 26)) | 0; - w12 &= 0x3ffffff; - /* k = 13 */ - lo = Math.imul(al9, bl4); - mid = Math.imul(al9, bh4); - mid = (mid + Math.imul(ah9, bl4)) | 0; - hi = Math.imul(ah9, bh4); - lo = (lo + Math.imul(al8, bl5)) | 0; - mid = (mid + Math.imul(al8, bh5)) | 0; - mid = (mid + Math.imul(ah8, bl5)) | 0; - hi = (hi + Math.imul(ah8, bh5)) | 0; - lo = (lo + Math.imul(al7, bl6)) | 0; - mid = (mid + Math.imul(al7, bh6)) | 0; - mid = (mid + Math.imul(ah7, bl6)) | 0; - hi = (hi + Math.imul(ah7, bh6)) | 0; - lo = (lo + Math.imul(al6, bl7)) | 0; - mid = (mid + Math.imul(al6, bh7)) | 0; - mid = (mid + Math.imul(ah6, bl7)) | 0; - hi = (hi + Math.imul(ah6, bh7)) | 0; - lo = (lo + Math.imul(al5, bl8)) | 0; - mid = (mid + Math.imul(al5, bh8)) | 0; - mid = (mid + Math.imul(ah5, bl8)) | 0; - hi = (hi + Math.imul(ah5, bh8)) | 0; - lo = (lo + Math.imul(al4, bl9)) | 0; - mid = (mid + Math.imul(al4, bh9)) | 0; - mid = (mid + Math.imul(ah4, bl9)) | 0; - hi = (hi + Math.imul(ah4, bh9)) | 0; - var w13 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0; - c = (((hi + (mid >>> 13)) | 0) + (w13 >>> 26)) | 0; - w13 &= 0x3ffffff; - /* k = 14 */ - lo = Math.imul(al9, bl5); - mid = Math.imul(al9, bh5); - mid = (mid + Math.imul(ah9, bl5)) | 0; - hi = Math.imul(ah9, bh5); - lo = (lo + Math.imul(al8, bl6)) | 0; - mid = (mid + Math.imul(al8, bh6)) | 0; - mid = (mid + Math.imul(ah8, bl6)) | 0; - hi = (hi + Math.imul(ah8, bh6)) | 0; - lo = (lo + Math.imul(al7, bl7)) | 0; - mid = (mid + Math.imul(al7, bh7)) | 0; - mid = (mid + Math.imul(ah7, bl7)) | 0; - hi = (hi + Math.imul(ah7, bh7)) | 0; - lo = (lo + Math.imul(al6, bl8)) | 0; - mid = (mid + Math.imul(al6, bh8)) | 0; - mid = (mid + Math.imul(ah6, bl8)) | 0; - hi = (hi + Math.imul(ah6, bh8)) | 0; - lo = (lo + Math.imul(al5, bl9)) | 0; - mid = (mid + Math.imul(al5, bh9)) | 0; - mid = (mid + Math.imul(ah5, bl9)) | 0; - hi = (hi + Math.imul(ah5, bh9)) | 0; - var w14 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0; - c = (((hi + (mid >>> 13)) | 0) + (w14 >>> 26)) | 0; - w14 &= 0x3ffffff; - /* k = 15 */ - lo = Math.imul(al9, bl6); - mid = Math.imul(al9, bh6); - mid = (mid + Math.imul(ah9, bl6)) | 0; - hi = Math.imul(ah9, bh6); - lo = (lo + Math.imul(al8, bl7)) | 0; - mid = (mid + Math.imul(al8, bh7)) | 0; - mid = (mid + Math.imul(ah8, bl7)) | 0; - hi = (hi + Math.imul(ah8, bh7)) | 0; - lo = (lo + Math.imul(al7, bl8)) | 0; - mid = (mid + Math.imul(al7, bh8)) | 0; - mid = (mid + Math.imul(ah7, bl8)) | 0; - hi = (hi + Math.imul(ah7, bh8)) | 0; - lo = (lo + Math.imul(al6, bl9)) | 0; - mid = (mid + Math.imul(al6, bh9)) | 0; - mid = (mid + Math.imul(ah6, bl9)) | 0; - hi = (hi + Math.imul(ah6, bh9)) | 0; - var w15 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0; - c = (((hi + (mid >>> 13)) | 0) + (w15 >>> 26)) | 0; - w15 &= 0x3ffffff; - /* k = 16 */ - lo = Math.imul(al9, bl7); - mid = Math.imul(al9, bh7); - mid = (mid + Math.imul(ah9, bl7)) | 0; - hi = Math.imul(ah9, bh7); - lo = (lo + Math.imul(al8, bl8)) | 0; - mid = (mid + Math.imul(al8, bh8)) | 0; - mid = (mid + Math.imul(ah8, bl8)) | 0; - hi = (hi + Math.imul(ah8, bh8)) | 0; - lo = (lo + Math.imul(al7, bl9)) | 0; - mid = (mid + Math.imul(al7, bh9)) | 0; - mid = (mid + Math.imul(ah7, bl9)) | 0; - hi = (hi + Math.imul(ah7, bh9)) | 0; - var w16 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0; - c = (((hi + (mid >>> 13)) | 0) + (w16 >>> 26)) | 0; - w16 &= 0x3ffffff; - /* k = 17 */ - lo = Math.imul(al9, bl8); - mid = Math.imul(al9, bh8); - mid = (mid + Math.imul(ah9, bl8)) | 0; - hi = Math.imul(ah9, bh8); - lo = (lo + Math.imul(al8, bl9)) | 0; - mid = (mid + Math.imul(al8, bh9)) | 0; - mid = (mid + Math.imul(ah8, bl9)) | 0; - hi = (hi + Math.imul(ah8, bh9)) | 0; - var w17 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0; - c = (((hi + (mid >>> 13)) | 0) + (w17 >>> 26)) | 0; - w17 &= 0x3ffffff; - /* k = 18 */ - lo = Math.imul(al9, bl9); - mid = Math.imul(al9, bh9); - mid = (mid + Math.imul(ah9, bl9)) | 0; - hi = Math.imul(ah9, bh9); - var w18 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0; - c = (((hi + (mid >>> 13)) | 0) + (w18 >>> 26)) | 0; - w18 &= 0x3ffffff; - o[0] = w0; - o[1] = w1; - o[2] = w2; - o[3] = w3; - o[4] = w4; - o[5] = w5; - o[6] = w6; - o[7] = w7; - o[8] = w8; - o[9] = w9; - o[10] = w10; - o[11] = w11; - o[12] = w12; - o[13] = w13; - o[14] = w14; - o[15] = w15; - o[16] = w16; - o[17] = w17; - o[18] = w18; - if (c !== 0) { - o[19] = c; - out.length++; - } - return out; - }; - - // Polyfill comb - if (!Math.imul) { - comb10MulTo = smallMulTo; - } - - function bigMulTo (self, num, out) { - out.negative = num.negative ^ self.negative; - out.length = self.length + num.length; - - var carry = 0; - var hncarry = 0; - for (var k = 0; k < out.length - 1; k++) { - // Sum all words with the same `i + j = k` and accumulate `ncarry`, - // note that ncarry could be >= 0x3ffffff - var ncarry = hncarry; - hncarry = 0; - var rword = carry & 0x3ffffff; - var maxJ = Math.min(k, num.length - 1); - for (var j = Math.max(0, k - self.length + 1); j <= maxJ; j++) { - var i = k - j; - var a = self.words[i] | 0; - var b = num.words[j] | 0; - var r = a * b; - - var lo = r & 0x3ffffff; - ncarry = (ncarry + ((r / 0x4000000) | 0)) | 0; - lo = (lo + rword) | 0; - rword = lo & 0x3ffffff; - ncarry = (ncarry + (lo >>> 26)) | 0; - - hncarry += ncarry >>> 26; - ncarry &= 0x3ffffff; - } - out.words[k] = rword; - carry = ncarry; - ncarry = hncarry; - } - if (carry !== 0) { - out.words[k] = carry; - } else { - out.length--; - } - - return out.strip(); - } - - function jumboMulTo (self, num, out) { - var fftm = new FFTM(); - return fftm.mulp(self, num, out); - } - - BN.prototype.mulTo = function mulTo (num, out) { - var res; - var len = this.length + num.length; - if (this.length === 10 && num.length === 10) { - res = comb10MulTo(this, num, out); - } else if (len < 63) { - res = smallMulTo(this, num, out); - } else if (len < 1024) { - res = bigMulTo(this, num, out); - } else { - res = jumboMulTo(this, num, out); - } - - return res; - }; - - // Cooley-Tukey algorithm for FFT - // slightly revisited to rely on looping instead of recursion - - function FFTM (x, y) { - this.x = x; - this.y = y; - } - - FFTM.prototype.makeRBT = function makeRBT (N) { - var t = new Array(N); - var l = BN.prototype._countBits(N) - 1; - for (var i = 0; i < N; i++) { - t[i] = this.revBin(i, l, N); - } - - return t; - }; - - // Returns binary-reversed representation of `x` - FFTM.prototype.revBin = function revBin (x, l, N) { - if (x === 0 || x === N - 1) return x; - - var rb = 0; - for (var i = 0; i < l; i++) { - rb |= (x & 1) << (l - i - 1); - x >>= 1; - } - - return rb; - }; - - // Performs "tweedling" phase, therefore 'emulating' - // behaviour of the recursive algorithm - FFTM.prototype.permute = function permute (rbt, rws, iws, rtws, itws, N) { - for (var i = 0; i < N; i++) { - rtws[i] = rws[rbt[i]]; - itws[i] = iws[rbt[i]]; - } - }; - - FFTM.prototype.transform = function transform (rws, iws, rtws, itws, N, rbt) { - this.permute(rbt, rws, iws, rtws, itws, N); - - for (var s = 1; s < N; s <<= 1) { - var l = s << 1; - - var rtwdf = Math.cos(2 * Math.PI / l); - var itwdf = Math.sin(2 * Math.PI / l); - - for (var p = 0; p < N; p += l) { - var rtwdf_ = rtwdf; - var itwdf_ = itwdf; - - for (var j = 0; j < s; j++) { - var re = rtws[p + j]; - var ie = itws[p + j]; - - var ro = rtws[p + j + s]; - var io = itws[p + j + s]; - - var rx = rtwdf_ * ro - itwdf_ * io; - - io = rtwdf_ * io + itwdf_ * ro; - ro = rx; - - rtws[p + j] = re + ro; - itws[p + j] = ie + io; - - rtws[p + j + s] = re - ro; - itws[p + j + s] = ie - io; - - /* jshint maxdepth : false */ - if (j !== l) { - rx = rtwdf * rtwdf_ - itwdf * itwdf_; - - itwdf_ = rtwdf * itwdf_ + itwdf * rtwdf_; - rtwdf_ = rx; - } - } - } - } - }; - - FFTM.prototype.guessLen13b = function guessLen13b (n, m) { - var N = Math.max(m, n) | 1; - var odd = N & 1; - var i = 0; - for (N = N / 2 | 0; N; N = N >>> 1) { - i++; - } - - return 1 << i + 1 + odd; - }; - - FFTM.prototype.conjugate = function conjugate (rws, iws, N) { - if (N <= 1) return; - - for (var i = 0; i < N / 2; i++) { - var t = rws[i]; - - rws[i] = rws[N - i - 1]; - rws[N - i - 1] = t; - - t = iws[i]; - - iws[i] = -iws[N - i - 1]; - iws[N - i - 1] = -t; - } - }; - - FFTM.prototype.normalize13b = function normalize13b (ws, N) { - var carry = 0; - for (var i = 0; i < N / 2; i++) { - var w = Math.round(ws[2 * i + 1] / N) * 0x2000 + - Math.round(ws[2 * i] / N) + - carry; - - ws[i] = w & 0x3ffffff; - - if (w < 0x4000000) { - carry = 0; - } else { - carry = w / 0x4000000 | 0; - } - } - - return ws; - }; - - FFTM.prototype.convert13b = function convert13b (ws, len, rws, N) { - var carry = 0; - for (var i = 0; i < len; i++) { - carry = carry + (ws[i] | 0); - - rws[2 * i] = carry & 0x1fff; carry = carry >>> 13; - rws[2 * i + 1] = carry & 0x1fff; carry = carry >>> 13; - } - - // Pad with zeroes - for (i = 2 * len; i < N; ++i) { - rws[i] = 0; - } - - assert(carry === 0); - assert((carry & ~0x1fff) === 0); - }; - - FFTM.prototype.stub = function stub (N) { - var ph = new Array(N); - for (var i = 0; i < N; i++) { - ph[i] = 0; - } - - return ph; - }; - - FFTM.prototype.mulp = function mulp (x, y, out) { - var N = 2 * this.guessLen13b(x.length, y.length); - - var rbt = this.makeRBT(N); - - var _ = this.stub(N); - - var rws = new Array(N); - var rwst = new Array(N); - var iwst = new Array(N); - - var nrws = new Array(N); - var nrwst = new Array(N); - var niwst = new Array(N); - - var rmws = out.words; - rmws.length = N; - - this.convert13b(x.words, x.length, rws, N); - this.convert13b(y.words, y.length, nrws, N); - - this.transform(rws, _, rwst, iwst, N, rbt); - this.transform(nrws, _, nrwst, niwst, N, rbt); - - for (var i = 0; i < N; i++) { - var rx = rwst[i] * nrwst[i] - iwst[i] * niwst[i]; - iwst[i] = rwst[i] * niwst[i] + iwst[i] * nrwst[i]; - rwst[i] = rx; - } - - this.conjugate(rwst, iwst, N); - this.transform(rwst, iwst, rmws, _, N, rbt); - this.conjugate(rmws, _, N); - this.normalize13b(rmws, N); - - out.negative = x.negative ^ y.negative; - out.length = x.length + y.length; - return out.strip(); - }; - - // Multiply `this` by `num` - BN.prototype.mul = function mul (num) { - var out = new BN(null); - out.words = new Array(this.length + num.length); - return this.mulTo(num, out); - }; - - // Multiply employing FFT - BN.prototype.mulf = function mulf (num) { - var out = new BN(null); - out.words = new Array(this.length + num.length); - return jumboMulTo(this, num, out); - }; - - // In-place Multiplication - BN.prototype.imul = function imul (num) { - return this.clone().mulTo(num, this); - }; - - BN.prototype.imuln = function imuln (num) { - assert(typeof num === 'number'); - assert(num < 0x4000000); - - // Carry - var carry = 0; - for (var i = 0; i < this.length; i++) { - var w = (this.words[i] | 0) * num; - var lo = (w & 0x3ffffff) + (carry & 0x3ffffff); - carry >>= 26; - carry += (w / 0x4000000) | 0; - // NOTE: lo is 27bit maximum - carry += lo >>> 26; - this.words[i] = lo & 0x3ffffff; - } - - if (carry !== 0) { - this.words[i] = carry; - this.length++; - } - - return this; - }; - - BN.prototype.muln = function muln (num) { - return this.clone().imuln(num); - }; - - // `this` * `this` - BN.prototype.sqr = function sqr () { - return this.mul(this); - }; - - // `this` * `this` in-place - BN.prototype.isqr = function isqr () { - return this.imul(this.clone()); - }; - - // Math.pow(`this`, `num`) - BN.prototype.pow = function pow (num) { - var w = toBitArray(num); - if (w.length === 0) return new BN(1); - - // Skip leading zeroes - var res = this; - for (var i = 0; i < w.length; i++, res = res.sqr()) { - if (w[i] !== 0) break; - } - - if (++i < w.length) { - for (var q = res.sqr(); i < w.length; i++, q = q.sqr()) { - if (w[i] === 0) continue; - - res = res.mul(q); - } - } - - return res; - }; - - // Shift-left in-place - BN.prototype.iushln = function iushln (bits) { - assert(typeof bits === 'number' && bits >= 0); - var r = bits % 26; - var s = (bits - r) / 26; - var carryMask = (0x3ffffff >>> (26 - r)) << (26 - r); - var i; - - if (r !== 0) { - var carry = 0; - - for (i = 0; i < this.length; i++) { - var newCarry = this.words[i] & carryMask; - var c = ((this.words[i] | 0) - newCarry) << r; - this.words[i] = c | carry; - carry = newCarry >>> (26 - r); - } - - if (carry) { - this.words[i] = carry; - this.length++; - } - } - - if (s !== 0) { - for (i = this.length - 1; i >= 0; i--) { - this.words[i + s] = this.words[i]; - } - - for (i = 0; i < s; i++) { - this.words[i] = 0; - } - - this.length += s; - } - - return this.strip(); - }; - - BN.prototype.ishln = function ishln (bits) { - // TODO(indutny): implement me - assert(this.negative === 0); - return this.iushln(bits); - }; - - // Shift-right in-place - // NOTE: `hint` is a lowest bit before trailing zeroes - // NOTE: if `extended` is present - it will be filled with destroyed bits - BN.prototype.iushrn = function iushrn (bits, hint, extended) { - assert(typeof bits === 'number' && bits >= 0); - var h; - if (hint) { - h = (hint - (hint % 26)) / 26; - } else { - h = 0; - } - - var r = bits % 26; - var s = Math.min((bits - r) / 26, this.length); - var mask = 0x3ffffff ^ ((0x3ffffff >>> r) << r); - var maskedWords = extended; - - h -= s; - h = Math.max(0, h); - - // Extended mode, copy masked part - if (maskedWords) { - for (var i = 0; i < s; i++) { - maskedWords.words[i] = this.words[i]; - } - maskedWords.length = s; - } - - if (s === 0) { - // No-op, we should not move anything at all - } else if (this.length > s) { - this.length -= s; - for (i = 0; i < this.length; i++) { - this.words[i] = this.words[i + s]; - } - } else { - this.words[0] = 0; - this.length = 1; - } - - var carry = 0; - for (i = this.length - 1; i >= 0 && (carry !== 0 || i >= h); i--) { - var word = this.words[i] | 0; - this.words[i] = (carry << (26 - r)) | (word >>> r); - carry = word & mask; - } - - // Push carried bits as a mask - if (maskedWords && carry !== 0) { - maskedWords.words[maskedWords.length++] = carry; - } - - if (this.length === 0) { - this.words[0] = 0; - this.length = 1; - } - - return this.strip(); - }; - - BN.prototype.ishrn = function ishrn (bits, hint, extended) { - // TODO(indutny): implement me - assert(this.negative === 0); - return this.iushrn(bits, hint, extended); - }; - - // Shift-left - BN.prototype.shln = function shln (bits) { - return this.clone().ishln(bits); - }; - - BN.prototype.ushln = function ushln (bits) { - return this.clone().iushln(bits); - }; - - // Shift-right - BN.prototype.shrn = function shrn (bits) { - return this.clone().ishrn(bits); - }; - - BN.prototype.ushrn = function ushrn (bits) { - return this.clone().iushrn(bits); - }; - - // Test if n bit is set - BN.prototype.testn = function testn (bit) { - assert(typeof bit === 'number' && bit >= 0); - var r = bit % 26; - var s = (bit - r) / 26; - var q = 1 << r; - - // Fast case: bit is much higher than all existing words - if (this.length <= s) return false; - - // Check bit and return - var w = this.words[s]; - - return !!(w & q); - }; - - // Return only lowers bits of number (in-place) - BN.prototype.imaskn = function imaskn (bits) { - assert(typeof bits === 'number' && bits >= 0); - var r = bits % 26; - var s = (bits - r) / 26; - - assert(this.negative === 0, 'imaskn works only with positive numbers'); - - if (this.length <= s) { - return this; - } - - if (r !== 0) { - s++; - } - this.length = Math.min(s, this.length); - - if (r !== 0) { - var mask = 0x3ffffff ^ ((0x3ffffff >>> r) << r); - this.words[this.length - 1] &= mask; - } - - return this.strip(); - }; - - // Return only lowers bits of number - BN.prototype.maskn = function maskn (bits) { - return this.clone().imaskn(bits); - }; - - // Add plain number `num` to `this` - BN.prototype.iaddn = function iaddn (num) { - assert(typeof num === 'number'); - assert(num < 0x4000000); - if (num < 0) return this.isubn(-num); - - // Possible sign change - if (this.negative !== 0) { - if (this.length === 1 && (this.words[0] | 0) < num) { - this.words[0] = num - (this.words[0] | 0); - this.negative = 0; - return this; - } - - this.negative = 0; - this.isubn(num); - this.negative = 1; - return this; - } - - // Add without checks - return this._iaddn(num); - }; - - BN.prototype._iaddn = function _iaddn (num) { - this.words[0] += num; - - // Carry - for (var i = 0; i < this.length && this.words[i] >= 0x4000000; i++) { - this.words[i] -= 0x4000000; - if (i === this.length - 1) { - this.words[i + 1] = 1; - } else { - this.words[i + 1]++; - } - } - this.length = Math.max(this.length, i + 1); - - return this; - }; - - // Subtract plain number `num` from `this` - BN.prototype.isubn = function isubn (num) { - assert(typeof num === 'number'); - assert(num < 0x4000000); - if (num < 0) return this.iaddn(-num); - - if (this.negative !== 0) { - this.negative = 0; - this.iaddn(num); - this.negative = 1; - return this; - } - - this.words[0] -= num; - - if (this.length === 1 && this.words[0] < 0) { - this.words[0] = -this.words[0]; - this.negative = 1; - } else { - // Carry - for (var i = 0; i < this.length && this.words[i] < 0; i++) { - this.words[i] += 0x4000000; - this.words[i + 1] -= 1; - } - } - - return this.strip(); - }; - - BN.prototype.addn = function addn (num) { - return this.clone().iaddn(num); - }; - - BN.prototype.subn = function subn (num) { - return this.clone().isubn(num); - }; - - BN.prototype.iabs = function iabs () { - this.negative = 0; - - return this; - }; - - BN.prototype.abs = function abs () { - return this.clone().iabs(); - }; - - BN.prototype._ishlnsubmul = function _ishlnsubmul (num, mul, shift) { - var len = num.length + shift; - var i; - - this._expand(len); - - var w; - var carry = 0; - for (i = 0; i < num.length; i++) { - w = (this.words[i + shift] | 0) + carry; - var right = (num.words[i] | 0) * mul; - w -= right & 0x3ffffff; - carry = (w >> 26) - ((right / 0x4000000) | 0); - this.words[i + shift] = w & 0x3ffffff; - } - for (; i < this.length - shift; i++) { - w = (this.words[i + shift] | 0) + carry; - carry = w >> 26; - this.words[i + shift] = w & 0x3ffffff; - } - - if (carry === 0) return this.strip(); - - // Subtraction overflow - assert(carry === -1); - carry = 0; - for (i = 0; i < this.length; i++) { - w = -(this.words[i] | 0) + carry; - carry = w >> 26; - this.words[i] = w & 0x3ffffff; - } - this.negative = 1; - - return this.strip(); - }; - - BN.prototype._wordDiv = function _wordDiv (num, mode) { - var shift = this.length - num.length; - - var a = this.clone(); - var b = num; - - // Normalize - var bhi = b.words[b.length - 1] | 0; - var bhiBits = this._countBits(bhi); - shift = 26 - bhiBits; - if (shift !== 0) { - b = b.ushln(shift); - a.iushln(shift); - bhi = b.words[b.length - 1] | 0; - } - - // Initialize quotient - var m = a.length - b.length; - var q; - - if (mode !== 'mod') { - q = new BN(null); - q.length = m + 1; - q.words = new Array(q.length); - for (var i = 0; i < q.length; i++) { - q.words[i] = 0; - } - } - - var diff = a.clone()._ishlnsubmul(b, 1, m); - if (diff.negative === 0) { - a = diff; - if (q) { - q.words[m] = 1; - } - } - - for (var j = m - 1; j >= 0; j--) { - var qj = (a.words[b.length + j] | 0) * 0x4000000 + - (a.words[b.length + j - 1] | 0); - - // NOTE: (qj / bhi) is (0x3ffffff * 0x4000000 + 0x3ffffff) / 0x2000000 max - // (0x7ffffff) - qj = Math.min((qj / bhi) | 0, 0x3ffffff); - - a._ishlnsubmul(b, qj, j); - while (a.negative !== 0) { - qj--; - a.negative = 0; - a._ishlnsubmul(b, 1, j); - if (!a.isZero()) { - a.negative ^= 1; - } - } - if (q) { - q.words[j] = qj; - } - } - if (q) { - q.strip(); - } - a.strip(); - - // Denormalize - if (mode !== 'div' && shift !== 0) { - a.iushrn(shift); - } - - return { - div: q || null, - mod: a - }; - }; - - // NOTE: 1) `mode` can be set to `mod` to request mod only, - // to `div` to request div only, or be absent to - // request both div & mod - // 2) `positive` is true if unsigned mod is requested - BN.prototype.divmod = function divmod (num, mode, positive) { - assert(!num.isZero()); - - if (this.isZero()) { - return { - div: new BN(0), - mod: new BN(0) - }; - } - - var div, mod, res; - if (this.negative !== 0 && num.negative === 0) { - res = this.neg().divmod(num, mode); - - if (mode !== 'mod') { - div = res.div.neg(); - } - - if (mode !== 'div') { - mod = res.mod.neg(); - if (positive && mod.negative !== 0) { - mod.iadd(num); - } - } - - return { - div: div, - mod: mod - }; - } - - if (this.negative === 0 && num.negative !== 0) { - res = this.divmod(num.neg(), mode); - - if (mode !== 'mod') { - div = res.div.neg(); - } - - return { - div: div, - mod: res.mod - }; - } - - if ((this.negative & num.negative) !== 0) { - res = this.neg().divmod(num.neg(), mode); - - if (mode !== 'div') { - mod = res.mod.neg(); - if (positive && mod.negative !== 0) { - mod.isub(num); - } - } - - return { - div: res.div, - mod: mod - }; - } - - // Both numbers are positive at this point - - // Strip both numbers to approximate shift value - if (num.length > this.length || this.cmp(num) < 0) { - return { - div: new BN(0), - mod: this - }; - } - - // Very short reduction - if (num.length === 1) { - if (mode === 'div') { - return { - div: this.divn(num.words[0]), - mod: null - }; - } - - if (mode === 'mod') { - return { - div: null, - mod: new BN(this.modn(num.words[0])) - }; - } - - return { - div: this.divn(num.words[0]), - mod: new BN(this.modn(num.words[0])) - }; - } - - return this._wordDiv(num, mode); - }; - - // Find `this` / `num` - BN.prototype.div = function div (num) { - return this.divmod(num, 'div', false).div; - }; - - // Find `this` % `num` - BN.prototype.mod = function mod (num) { - return this.divmod(num, 'mod', false).mod; - }; - - BN.prototype.umod = function umod (num) { - return this.divmod(num, 'mod', true).mod; - }; - - // Find Round(`this` / `num`) - BN.prototype.divRound = function divRound (num) { - var dm = this.divmod(num); - - // Fast case - exact division - if (dm.mod.isZero()) return dm.div; - - var mod = dm.div.negative !== 0 ? dm.mod.isub(num) : dm.mod; - - var half = num.ushrn(1); - var r2 = num.andln(1); - var cmp = mod.cmp(half); - - // Round down - if (cmp < 0 || r2 === 1 && cmp === 0) return dm.div; - - // Round up - return dm.div.negative !== 0 ? dm.div.isubn(1) : dm.div.iaddn(1); - }; - - BN.prototype.modn = function modn (num) { - assert(num <= 0x3ffffff); - var p = (1 << 26) % num; - - var acc = 0; - for (var i = this.length - 1; i >= 0; i--) { - acc = (p * acc + (this.words[i] | 0)) % num; - } - - return acc; - }; - - // In-place division by number - BN.prototype.idivn = function idivn (num) { - assert(num <= 0x3ffffff); - - var carry = 0; - for (var i = this.length - 1; i >= 0; i--) { - var w = (this.words[i] | 0) + carry * 0x4000000; - this.words[i] = (w / num) | 0; - carry = w % num; - } - - return this.strip(); - }; - - BN.prototype.divn = function divn (num) { - return this.clone().idivn(num); - }; - - BN.prototype.egcd = function egcd (p) { - assert(p.negative === 0); - assert(!p.isZero()); - - var x = this; - var y = p.clone(); - - if (x.negative !== 0) { - x = x.umod(p); - } else { - x = x.clone(); - } - - // A * x + B * y = x - var A = new BN(1); - var B = new BN(0); - - // C * x + D * y = y - var C = new BN(0); - var D = new BN(1); - - var g = 0; - - while (x.isEven() && y.isEven()) { - x.iushrn(1); - y.iushrn(1); - ++g; - } - - var yp = y.clone(); - var xp = x.clone(); - - while (!x.isZero()) { - for (var i = 0, im = 1; (x.words[0] & im) === 0 && i < 26; ++i, im <<= 1); - if (i > 0) { - x.iushrn(i); - while (i-- > 0) { - if (A.isOdd() || B.isOdd()) { - A.iadd(yp); - B.isub(xp); - } - - A.iushrn(1); - B.iushrn(1); - } - } - - for (var j = 0, jm = 1; (y.words[0] & jm) === 0 && j < 26; ++j, jm <<= 1); - if (j > 0) { - y.iushrn(j); - while (j-- > 0) { - if (C.isOdd() || D.isOdd()) { - C.iadd(yp); - D.isub(xp); - } - - C.iushrn(1); - D.iushrn(1); - } - } - - if (x.cmp(y) >= 0) { - x.isub(y); - A.isub(C); - B.isub(D); - } else { - y.isub(x); - C.isub(A); - D.isub(B); - } - } - - return { - a: C, - b: D, - gcd: y.iushln(g) - }; - }; - - // This is reduced incarnation of the binary EEA - // above, designated to invert members of the - // _prime_ fields F(p) at a maximal speed - BN.prototype._invmp = function _invmp (p) { - assert(p.negative === 0); - assert(!p.isZero()); - - var a = this; - var b = p.clone(); - - if (a.negative !== 0) { - a = a.umod(p); - } else { - a = a.clone(); - } - - var x1 = new BN(1); - var x2 = new BN(0); - - var delta = b.clone(); - - while (a.cmpn(1) > 0 && b.cmpn(1) > 0) { - for (var i = 0, im = 1; (a.words[0] & im) === 0 && i < 26; ++i, im <<= 1); - if (i > 0) { - a.iushrn(i); - while (i-- > 0) { - if (x1.isOdd()) { - x1.iadd(delta); - } - - x1.iushrn(1); - } - } - - for (var j = 0, jm = 1; (b.words[0] & jm) === 0 && j < 26; ++j, jm <<= 1); - if (j > 0) { - b.iushrn(j); - while (j-- > 0) { - if (x2.isOdd()) { - x2.iadd(delta); - } - - x2.iushrn(1); - } - } - - if (a.cmp(b) >= 0) { - a.isub(b); - x1.isub(x2); - } else { - b.isub(a); - x2.isub(x1); - } - } - - var res; - if (a.cmpn(1) === 0) { - res = x1; - } else { - res = x2; - } - - if (res.cmpn(0) < 0) { - res.iadd(p); - } - - return res; - }; - - BN.prototype.gcd = function gcd (num) { - if (this.isZero()) return num.abs(); - if (num.isZero()) return this.abs(); - - var a = this.clone(); - var b = num.clone(); - a.negative = 0; - b.negative = 0; - - // Remove common factor of two - for (var shift = 0; a.isEven() && b.isEven(); shift++) { - a.iushrn(1); - b.iushrn(1); - } - - do { - while (a.isEven()) { - a.iushrn(1); - } - while (b.isEven()) { - b.iushrn(1); - } - - var r = a.cmp(b); - if (r < 0) { - // Swap `a` and `b` to make `a` always bigger than `b` - var t = a; - a = b; - b = t; - } else if (r === 0 || b.cmpn(1) === 0) { - break; - } - - a.isub(b); - } while (true); - - return b.iushln(shift); - }; - - // Invert number in the field F(num) - BN.prototype.invm = function invm (num) { - return this.egcd(num).a.umod(num); - }; - - BN.prototype.isEven = function isEven () { - return (this.words[0] & 1) === 0; - }; - - BN.prototype.isOdd = function isOdd () { - return (this.words[0] & 1) === 1; - }; - - // And first word and num - BN.prototype.andln = function andln (num) { - return this.words[0] & num; - }; - - // Increment at the bit position in-line - BN.prototype.bincn = function bincn (bit) { - assert(typeof bit === 'number'); - var r = bit % 26; - var s = (bit - r) / 26; - var q = 1 << r; - - // Fast case: bit is much higher than all existing words - if (this.length <= s) { - this._expand(s + 1); - this.words[s] |= q; - return this; - } - - // Add bit and propagate, if needed - var carry = q; - for (var i = s; carry !== 0 && i < this.length; i++) { - var w = this.words[i] | 0; - w += carry; - carry = w >>> 26; - w &= 0x3ffffff; - this.words[i] = w; - } - if (carry !== 0) { - this.words[i] = carry; - this.length++; - } - return this; - }; - - BN.prototype.isZero = function isZero () { - return this.length === 1 && this.words[0] === 0; - }; - - BN.prototype.cmpn = function cmpn (num) { - var negative = num < 0; - - if (this.negative !== 0 && !negative) return -1; - if (this.negative === 0 && negative) return 1; - - this.strip(); - - var res; - if (this.length > 1) { - res = 1; - } else { - if (negative) { - num = -num; - } - - assert(num <= 0x3ffffff, 'Number is too big'); - - var w = this.words[0] | 0; - res = w === num ? 0 : w < num ? -1 : 1; - } - if (this.negative !== 0) return -res | 0; - return res; - }; - - // Compare two numbers and return: - // 1 - if `this` > `num` - // 0 - if `this` == `num` - // -1 - if `this` < `num` - BN.prototype.cmp = function cmp (num) { - if (this.negative !== 0 && num.negative === 0) return -1; - if (this.negative === 0 && num.negative !== 0) return 1; - - var res = this.ucmp(num); - if (this.negative !== 0) return -res | 0; - return res; - }; - - // Unsigned comparison - BN.prototype.ucmp = function ucmp (num) { - // At this point both numbers have the same sign - if (this.length > num.length) return 1; - if (this.length < num.length) return -1; - - var res = 0; - for (var i = this.length - 1; i >= 0; i--) { - var a = this.words[i] | 0; - var b = num.words[i] | 0; - - if (a === b) continue; - if (a < b) { - res = -1; - } else if (a > b) { - res = 1; - } - break; - } - return res; - }; - - BN.prototype.gtn = function gtn (num) { - return this.cmpn(num) === 1; - }; - - BN.prototype.gt = function gt (num) { - return this.cmp(num) === 1; - }; - - BN.prototype.gten = function gten (num) { - return this.cmpn(num) >= 0; - }; - - BN.prototype.gte = function gte (num) { - return this.cmp(num) >= 0; - }; - - BN.prototype.ltn = function ltn (num) { - return this.cmpn(num) === -1; - }; - - BN.prototype.lt = function lt (num) { - return this.cmp(num) === -1; - }; - - BN.prototype.lten = function lten (num) { - return this.cmpn(num) <= 0; - }; - - BN.prototype.lte = function lte (num) { - return this.cmp(num) <= 0; - }; - - BN.prototype.eqn = function eqn (num) { - return this.cmpn(num) === 0; - }; - - BN.prototype.eq = function eq (num) { - return this.cmp(num) === 0; - }; - - // - // A reduce context, could be using montgomery or something better, depending - // on the `m` itself. - // - BN.red = function red (num) { - return new Red(num); - }; - - BN.prototype.toRed = function toRed (ctx) { - assert(!this.red, 'Already a number in reduction context'); - assert(this.negative === 0, 'red works only with positives'); - return ctx.convertTo(this)._forceRed(ctx); - }; - - BN.prototype.fromRed = function fromRed () { - assert(this.red, 'fromRed works only with numbers in reduction context'); - return this.red.convertFrom(this); - }; - - BN.prototype._forceRed = function _forceRed (ctx) { - this.red = ctx; - return this; - }; - - BN.prototype.forceRed = function forceRed (ctx) { - assert(!this.red, 'Already a number in reduction context'); - return this._forceRed(ctx); - }; - - BN.prototype.redAdd = function redAdd (num) { - assert(this.red, 'redAdd works only with red numbers'); - return this.red.add(this, num); - }; - - BN.prototype.redIAdd = function redIAdd (num) { - assert(this.red, 'redIAdd works only with red numbers'); - return this.red.iadd(this, num); - }; - - BN.prototype.redSub = function redSub (num) { - assert(this.red, 'redSub works only with red numbers'); - return this.red.sub(this, num); - }; - - BN.prototype.redISub = function redISub (num) { - assert(this.red, 'redISub works only with red numbers'); - return this.red.isub(this, num); - }; - - BN.prototype.redShl = function redShl (num) { - assert(this.red, 'redShl works only with red numbers'); - return this.red.shl(this, num); - }; - - BN.prototype.redMul = function redMul (num) { - assert(this.red, 'redMul works only with red numbers'); - this.red._verify2(this, num); - return this.red.mul(this, num); - }; - - BN.prototype.redIMul = function redIMul (num) { - assert(this.red, 'redMul works only with red numbers'); - this.red._verify2(this, num); - return this.red.imul(this, num); - }; - - BN.prototype.redSqr = function redSqr () { - assert(this.red, 'redSqr works only with red numbers'); - this.red._verify1(this); - return this.red.sqr(this); - }; - - BN.prototype.redISqr = function redISqr () { - assert(this.red, 'redISqr works only with red numbers'); - this.red._verify1(this); - return this.red.isqr(this); - }; - - // Square root over p - BN.prototype.redSqrt = function redSqrt () { - assert(this.red, 'redSqrt works only with red numbers'); - this.red._verify1(this); - return this.red.sqrt(this); - }; - - BN.prototype.redInvm = function redInvm () { - assert(this.red, 'redInvm works only with red numbers'); - this.red._verify1(this); - return this.red.invm(this); - }; - - // Return negative clone of `this` % `red modulo` - BN.prototype.redNeg = function redNeg () { - assert(this.red, 'redNeg works only with red numbers'); - this.red._verify1(this); - return this.red.neg(this); - }; - - BN.prototype.redPow = function redPow (num) { - assert(this.red && !num.red, 'redPow(normalNum)'); - this.red._verify1(this); - return this.red.pow(this, num); - }; - - // Prime numbers with efficient reduction - var primes = { - k256: null, - p224: null, - p192: null, - p25519: null - }; - - // Pseudo-Mersenne prime - function MPrime (name, p) { - // P = 2 ^ N - K - this.name = name; - this.p = new BN(p, 16); - this.n = this.p.bitLength(); - this.k = new BN(1).iushln(this.n).isub(this.p); - - this.tmp = this._tmp(); - } - - MPrime.prototype._tmp = function _tmp () { - var tmp = new BN(null); - tmp.words = new Array(Math.ceil(this.n / 13)); - return tmp; - }; - - MPrime.prototype.ireduce = function ireduce (num) { - // Assumes that `num` is less than `P^2` - // num = HI * (2 ^ N - K) + HI * K + LO = HI * K + LO (mod P) - var r = num; - var rlen; - - do { - this.split(r, this.tmp); - r = this.imulK(r); - r = r.iadd(this.tmp); - rlen = r.bitLength(); - } while (rlen > this.n); - - var cmp = rlen < this.n ? -1 : r.ucmp(this.p); - if (cmp === 0) { - r.words[0] = 0; - r.length = 1; - } else if (cmp > 0) { - r.isub(this.p); - } else { - r.strip(); - } - - return r; - }; - - MPrime.prototype.split = function split (input, out) { - input.iushrn(this.n, 0, out); - }; - - MPrime.prototype.imulK = function imulK (num) { - return num.imul(this.k); - }; - - function K256 () { - MPrime.call( - this, - 'k256', - 'ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f'); - } - inherits(K256, MPrime); - - K256.prototype.split = function split (input, output) { - // 256 = 9 * 26 + 22 - var mask = 0x3fffff; - - var outLen = Math.min(input.length, 9); - for (var i = 0; i < outLen; i++) { - output.words[i] = input.words[i]; - } - output.length = outLen; - - if (input.length <= 9) { - input.words[0] = 0; - input.length = 1; - return; - } - - // Shift by 9 limbs - var prev = input.words[9]; - output.words[output.length++] = prev & mask; - - for (i = 10; i < input.length; i++) { - var next = input.words[i] | 0; - input.words[i - 10] = ((next & mask) << 4) | (prev >>> 22); - prev = next; - } - prev >>>= 22; - input.words[i - 10] = prev; - if (prev === 0 && input.length > 10) { - input.length -= 10; - } else { - input.length -= 9; - } - }; - - K256.prototype.imulK = function imulK (num) { - // K = 0x1000003d1 = [ 0x40, 0x3d1 ] - num.words[num.length] = 0; - num.words[num.length + 1] = 0; - num.length += 2; - - // bounded at: 0x40 * 0x3ffffff + 0x3d0 = 0x100000390 - var lo = 0; - for (var i = 0; i < num.length; i++) { - var w = num.words[i] | 0; - lo += w * 0x3d1; - num.words[i] = lo & 0x3ffffff; - lo = w * 0x40 + ((lo / 0x4000000) | 0); - } - - // Fast length reduction - if (num.words[num.length - 1] === 0) { - num.length--; - if (num.words[num.length - 1] === 0) { - num.length--; - } - } - return num; - }; - - function P224 () { - MPrime.call( - this, - 'p224', - 'ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001'); - } - inherits(P224, MPrime); - - function P192 () { - MPrime.call( - this, - 'p192', - 'ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff'); - } - inherits(P192, MPrime); - - function P25519 () { - // 2 ^ 255 - 19 - MPrime.call( - this, - '25519', - '7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed'); - } - inherits(P25519, MPrime); - - P25519.prototype.imulK = function imulK (num) { - // K = 0x13 - var carry = 0; - for (var i = 0; i < num.length; i++) { - var hi = (num.words[i] | 0) * 0x13 + carry; - var lo = hi & 0x3ffffff; - hi >>>= 26; - - num.words[i] = lo; - carry = hi; - } - if (carry !== 0) { - num.words[num.length++] = carry; - } - return num; - }; - - // Exported mostly for testing purposes, use plain name instead - BN._prime = function prime (name) { - // Cached version of prime - if (primes[name]) return primes[name]; - - var prime; - if (name === 'k256') { - prime = new K256(); - } else if (name === 'p224') { - prime = new P224(); - } else if (name === 'p192') { - prime = new P192(); - } else if (name === 'p25519') { - prime = new P25519(); - } else { - throw new Error('Unknown prime ' + name); - } - primes[name] = prime; - - return prime; - }; - - // - // Base reduction engine - // - function Red (m) { - if (typeof m === 'string') { - var prime = BN._prime(m); - this.m = prime.p; - this.prime = prime; - } else { - assert(m.gtn(1), 'modulus must be greater than 1'); - this.m = m; - this.prime = null; - } - } - - Red.prototype._verify1 = function _verify1 (a) { - assert(a.negative === 0, 'red works only with positives'); - assert(a.red, 'red works only with red numbers'); - }; - - Red.prototype._verify2 = function _verify2 (a, b) { - assert((a.negative | b.negative) === 0, 'red works only with positives'); - assert(a.red && a.red === b.red, - 'red works only with red numbers'); - }; - - Red.prototype.imod = function imod (a) { - if (this.prime) return this.prime.ireduce(a)._forceRed(this); - return a.umod(this.m)._forceRed(this); - }; - - Red.prototype.neg = function neg (a) { - if (a.isZero()) { - return a.clone(); - } - - return this.m.sub(a)._forceRed(this); - }; - - Red.prototype.add = function add (a, b) { - this._verify2(a, b); - - var res = a.add(b); - if (res.cmp(this.m) >= 0) { - res.isub(this.m); - } - return res._forceRed(this); - }; - - Red.prototype.iadd = function iadd (a, b) { - this._verify2(a, b); - - var res = a.iadd(b); - if (res.cmp(this.m) >= 0) { - res.isub(this.m); - } - return res; - }; - - Red.prototype.sub = function sub (a, b) { - this._verify2(a, b); - - var res = a.sub(b); - if (res.cmpn(0) < 0) { - res.iadd(this.m); - } - return res._forceRed(this); - }; - - Red.prototype.isub = function isub (a, b) { - this._verify2(a, b); - - var res = a.isub(b); - if (res.cmpn(0) < 0) { - res.iadd(this.m); - } - return res; - }; - - Red.prototype.shl = function shl (a, num) { - this._verify1(a); - return this.imod(a.ushln(num)); - }; - - Red.prototype.imul = function imul (a, b) { - this._verify2(a, b); - return this.imod(a.imul(b)); - }; - - Red.prototype.mul = function mul (a, b) { - this._verify2(a, b); - return this.imod(a.mul(b)); - }; - - Red.prototype.isqr = function isqr (a) { - return this.imul(a, a.clone()); - }; - - Red.prototype.sqr = function sqr (a) { - return this.mul(a, a); - }; - - Red.prototype.sqrt = function sqrt (a) { - if (a.isZero()) return a.clone(); - - var mod3 = this.m.andln(3); - assert(mod3 % 2 === 1); - - // Fast case - if (mod3 === 3) { - var pow = this.m.add(new BN(1)).iushrn(2); - return this.pow(a, pow); - } - - // Tonelli-Shanks algorithm (Totally unoptimized and slow) - // - // Find Q and S, that Q * 2 ^ S = (P - 1) - var q = this.m.subn(1); - var s = 0; - while (!q.isZero() && q.andln(1) === 0) { - s++; - q.iushrn(1); - } - assert(!q.isZero()); - - var one = new BN(1).toRed(this); - var nOne = one.redNeg(); - - // Find quadratic non-residue - // NOTE: Max is such because of generalized Riemann hypothesis. - var lpow = this.m.subn(1).iushrn(1); - var z = this.m.bitLength(); - z = new BN(2 * z * z).toRed(this); - - while (this.pow(z, lpow).cmp(nOne) !== 0) { - z.redIAdd(nOne); - } - - var c = this.pow(z, q); - var r = this.pow(a, q.addn(1).iushrn(1)); - var t = this.pow(a, q); - var m = s; - while (t.cmp(one) !== 0) { - var tmp = t; - for (var i = 0; tmp.cmp(one) !== 0; i++) { - tmp = tmp.redSqr(); - } - assert(i < m); - var b = this.pow(c, new BN(1).iushln(m - i - 1)); - - r = r.redMul(b); - c = b.redSqr(); - t = t.redMul(c); - m = i; - } - - return r; - }; - - Red.prototype.invm = function invm (a) { - var inv = a._invmp(this.m); - if (inv.negative !== 0) { - inv.negative = 0; - return this.imod(inv).redNeg(); - } else { - return this.imod(inv); - } - }; - - Red.prototype.pow = function pow (a, num) { - if (num.isZero()) return new BN(1); - if (num.cmpn(1) === 0) return a.clone(); - - var windowSize = 4; - var wnd = new Array(1 << windowSize); - wnd[0] = new BN(1).toRed(this); - wnd[1] = a; - for (var i = 2; i < wnd.length; i++) { - wnd[i] = this.mul(wnd[i - 1], a); - } - - var res = wnd[0]; - var current = 0; - var currentLen = 0; - var start = num.bitLength() % 26; - if (start === 0) { - start = 26; - } - - for (i = num.length - 1; i >= 0; i--) { - var word = num.words[i]; - for (var j = start - 1; j >= 0; j--) { - var bit = (word >> j) & 1; - if (res !== wnd[0]) { - res = this.sqr(res); - } - - if (bit === 0 && current === 0) { - currentLen = 0; - continue; - } - - current <<= 1; - current |= bit; - currentLen++; - if (currentLen !== windowSize && (i !== 0 || j !== 0)) continue; - - res = this.mul(res, wnd[current]); - currentLen = 0; - current = 0; - } - start = 26; - } - - return res; - }; - - Red.prototype.convertTo = function convertTo (num) { - var r = num.umod(this.m); - - return r === num ? r.clone() : r; - }; - - Red.prototype.convertFrom = function convertFrom (num) { - var res = num.clone(); - res.red = null; - return res; - }; - - // - // Montgomery method engine - // - - BN.mont = function mont (num) { - return new Mont(num); - }; - - function Mont (m) { - Red.call(this, m); - - this.shift = this.m.bitLength(); - if (this.shift % 26 !== 0) { - this.shift += 26 - (this.shift % 26); - } - - this.r = new BN(1).iushln(this.shift); - this.r2 = this.imod(this.r.sqr()); - this.rinv = this.r._invmp(this.m); - - this.minv = this.rinv.mul(this.r).isubn(1).div(this.m); - this.minv = this.minv.umod(this.r); - this.minv = this.r.sub(this.minv); - } - inherits(Mont, Red); - - Mont.prototype.convertTo = function convertTo (num) { - return this.imod(num.ushln(this.shift)); - }; - - Mont.prototype.convertFrom = function convertFrom (num) { - var r = this.imod(num.mul(this.rinv)); - r.red = null; - return r; - }; - - Mont.prototype.imul = function imul (a, b) { - if (a.isZero() || b.isZero()) { - a.words[0] = 0; - a.length = 1; - return a; - } - - var t = a.imul(b); - var c = t.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m); - var u = t.isub(c).iushrn(this.shift); - var res = u; - - if (u.cmp(this.m) >= 0) { - res = u.isub(this.m); - } else if (u.cmpn(0) < 0) { - res = u.iadd(this.m); - } - - return res._forceRed(this); - }; - - Mont.prototype.mul = function mul (a, b) { - if (a.isZero() || b.isZero()) return new BN(0)._forceRed(this); - - var t = a.mul(b); - var c = t.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m); - var u = t.isub(c).iushrn(this.shift); - var res = u; - if (u.cmp(this.m) >= 0) { - res = u.isub(this.m); - } else if (u.cmpn(0) < 0) { - res = u.iadd(this.m); - } - - return res._forceRed(this); - }; - - Mont.prototype.invm = function invm (a) { - // (AR)^-1 * R^2 = (A^-1 * R^-1) * R^2 = A^-1 * R - var res = this.imod(a._invmp(this.m).mul(this.r2)); - return res._forceRed(this); - }; -})(typeof module === 'undefined' || module, this); diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/diffie-hellman/node_modules/bn.js/package.json b/node_modules/browserify/node_modules/crypto-browserify/node_modules/diffie-hellman/node_modules/bn.js/package.json deleted file mode 100644 index 25b71f31..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/diffie-hellman/node_modules/bn.js/package.json +++ /dev/null @@ -1,71 +0,0 @@ -{ - "name": "bn.js", - "version": "4.11.6", - "description": "Big number implementation in pure javascript", - "main": "lib/bn.js", - "scripts": { - "lint": "semistandard", - "unit": "mocha --reporter=spec test/*-test.js", - "test": "npm run lint && npm run unit" - }, - "repository": { - "type": "git", - "url": "git+ssh://git@github.com/indutny/bn.js.git" - }, - "keywords": [ - "BN", - "BigNum", - "Big number", - "Modulo", - "Montgomery" - ], - "author": { - "name": "Fedor Indutny", - "email": "fedor@indutny.com" - }, - "license": "MIT", - "bugs": { - "url": "https://github.com/indutny/bn.js/issues" - }, - "homepage": "https://github.com/indutny/bn.js", - "devDependencies": { - "istanbul": "^0.3.5", - "mocha": "^2.1.0", - "semistandard": "^7.0.4" - }, - "gitHead": "e4a82134c89ed85b0c3a03da7fabc016206898a4", - "_id": "bn.js@4.11.6", - "_shasum": "53344adb14617a13f6e8dd2ce28905d1c0ba3215", - "_from": "bn.js@>=4.1.0 <5.0.0", - "_npmVersion": "3.10.3", - "_nodeVersion": "6.3.0", - "_npmUser": { - "name": "indutny", - "email": "fedor@indutny.com" - }, - "dist": { - "shasum": "53344adb14617a13f6e8dd2ce28905d1c0ba3215", - "tarball": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.6.tgz" - }, - "maintainers": [ - { - "name": "cwmma", - "email": "calvin.metcalf@gmail.com" - }, - { - "name": "dcousens", - "email": "email@dcousens.com" - }, - { - "name": "indutny", - "email": "fedor@indutny.com" - } - ], - "_npmOperationalInternal": { - "host": "packages-16-east.internal.npmjs.com", - "tmp": "tmp/bn.js-4.11.6.tgz_1470100429753_0.28054949711076915" - }, - "directories": {}, - "_resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.6.tgz", - "readme": "ERROR: No README data found!" -} diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/diffie-hellman/node_modules/bn.js/test/arithmetic-test.js b/node_modules/browserify/node_modules/crypto-browserify/node_modules/diffie-hellman/node_modules/bn.js/test/arithmetic-test.js deleted file mode 100644 index c3a0d7d5..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/diffie-hellman/node_modules/bn.js/test/arithmetic-test.js +++ /dev/null @@ -1,635 +0,0 @@ -/* global describe, it */ - -var assert = require('assert'); -var BN = require('../').BN; -var fixtures = require('./fixtures'); - -describe('BN.js/Arithmetic', function () { - describe('.add()', function () { - it('should add numbers', function () { - assert.equal(new BN(14).add(new BN(26)).toString(16), '28'); - var k = new BN(0x1234); - var r = k; - - for (var i = 0; i < 257; i++) { - r = r.add(k); - } - - assert.equal(r.toString(16), '125868'); - }); - - it('should handle carry properly (in-place)', function () { - var k = new BN('abcdefabcdefabcdef', 16); - var r = new BN('deadbeef', 16); - - for (var i = 0; i < 257; i++) { - r.iadd(k); - } - - assert.equal(r.toString(16), 'ac79bd9b79be7a277bde'); - }); - - it('should properly do positive + negative', function () { - var a = new BN('abcd', 16); - var b = new BN('-abce', 16); - - assert.equal(a.iadd(b).toString(16), '-1'); - - a = new BN('abcd', 16); - b = new BN('-abce', 16); - - assert.equal(a.add(b).toString(16), '-1'); - assert.equal(b.add(a).toString(16), '-1'); - }); - }); - - describe('.iaddn()', function () { - it('should allow a sign change', function () { - var a = new BN(-100); - assert.equal(a.negative, 1); - - a.iaddn(200); - - assert.equal(a.negative, 0); - assert.equal(a.toString(), '100'); - }); - - it('should add negative number', function () { - var a = new BN(-100); - assert.equal(a.negative, 1); - - a.iaddn(-200); - - assert.equal(a.toString(), '-300'); - }); - - it('should allow neg + pos with big number', function () { - var a = new BN('-1000000000', 10); - assert.equal(a.negative, 1); - - a.iaddn(200); - - assert.equal(a.toString(), '-999999800'); - }); - - it('should carry limb', function () { - var a = new BN('3ffffff', 16); - - assert.equal(a.iaddn(1).toString(16), '4000000'); - }); - - it('should throw error with num eq 0x4000000', function () { - assert.throws(function () { - new BN(0).iaddn(0x4000000); - }, /^Error: Assertion failed$/); - }); - }); - - describe('.sub()', function () { - it('should subtract small numbers', function () { - assert.equal(new BN(26).sub(new BN(14)).toString(16), 'c'); - assert.equal(new BN(14).sub(new BN(26)).toString(16), '-c'); - assert.equal(new BN(26).sub(new BN(26)).toString(16), '0'); - assert.equal(new BN(-26).sub(new BN(26)).toString(16), '-34'); - }); - - var a = new BN( - '31ff3c61db2db84b9823d320907a573f6ad37c437abe458b1802cda041d6384' + - 'a7d8daef41395491e2', - 16); - var b = new BN( - '6f0e4d9f1d6071c183677f601af9305721c91d31b0bbbae8fb790000', - 16); - var r = new BN( - '31ff3c61db2db84b9823d3208989726578fd75276287cd9516533a9acfb9a67' + - '76281f34583ddb91e2', - 16); - - it('should subtract big numbers', function () { - assert.equal(a.sub(b).cmp(r), 0); - }); - - it('should subtract numbers in place', function () { - assert.equal(b.clone().isub(a).neg().cmp(r), 0); - }); - - it('should subtract with carry', function () { - // Carry and copy - var a = new BN('12345', 16); - var b = new BN('1000000000000', 16); - assert.equal(a.isub(b).toString(16), '-fffffffedcbb'); - - a = new BN('12345', 16); - b = new BN('1000000000000', 16); - assert.equal(b.isub(a).toString(16), 'fffffffedcbb'); - }); - }); - - describe('.isubn()', function () { - it('should subtract negative number', function () { - var r = new BN( - '7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b', 16); - assert.equal(r.isubn(-1).toString(16), - '7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681c'); - }); - - it('should work for positive numbers', function () { - var a = new BN(-100); - assert.equal(a.negative, 1); - - a.isubn(200); - assert.equal(a.negative, 1); - assert.equal(a.toString(), '-300'); - }); - - it('should not allow a sign change', function () { - var a = new BN(-100); - assert.equal(a.negative, 1); - - a.isubn(-200); - assert.equal(a.negative, 0); - assert.equal(a.toString(), '100'); - }); - - it('should change sign on small numbers at 0', function () { - var a = new BN(0).subn(2); - assert.equal(a.toString(), '-2'); - }); - - it('should change sign on small numbers at 1', function () { - var a = new BN(1).subn(2); - assert.equal(a.toString(), '-1'); - }); - - it('should throw error with num eq 0x4000000', function () { - assert.throws(function () { - new BN(0).isubn(0x4000000); - }, /^Error: Assertion failed$/); - }); - }); - - function testMethod (name, mul) { - describe(name, function () { - it('should multiply numbers of different signs', function () { - var offsets = [ - 1, // smallMulTo - 250, // comb10MulTo - 1000, // bigMulTo - 15000 // jumboMulTo - ]; - - for (var i = 0; i < offsets.length; ++i) { - var x = new BN(1).ishln(offsets[i]); - - assert.equal(mul(x, x).isNeg(), false); - assert.equal(mul(x, x.neg()).isNeg(), true); - assert.equal(mul(x.neg(), x).isNeg(), true); - assert.equal(mul(x.neg(), x.neg()).isNeg(), false); - } - }); - - it('should multiply with carry', function () { - var n = new BN(0x1001); - var r = n; - - for (var i = 0; i < 4; i++) { - r = mul(r, n); - } - - assert.equal(r.toString(16), '100500a00a005001'); - }); - - it('should correctly multiply big numbers', function () { - var n = new BN( - '79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798', - 16 - ); - assert.equal( - mul(n, n).toString(16), - '39e58a8055b6fb264b75ec8c646509784204ac15a8c24e05babc9729ab9' + - 'b055c3a9458e4ce3289560a38e08ba8175a9446ce14e608245ab3a9' + - '978a8bd8acaa40'); - assert.equal( - mul(mul(n, n), n).toString(16), - '1b888e01a06e974017a28a5b4da436169761c9730b7aeedf75fc60f687b' + - '46e0cf2cb11667f795d5569482640fe5f628939467a01a612b02350' + - '0d0161e9730279a7561043af6197798e41b7432458463e64fa81158' + - '907322dc330562697d0d600'); - }); - - it('should multiply neg number on 0', function () { - assert.equal( - mul(new BN('-100000000000'), new BN('3').div(new BN('4'))) - .toString(16), - '0' - ); - }); - - it('should regress mul big numbers', function () { - var q = fixtures.dhGroups.p17.q; - var qs = fixtures.dhGroups.p17.qs; - - q = new BN(q, 16); - assert.equal(mul(q, q).toString(16), qs); - }); - }); - } - - testMethod('.mul()', function (x, y) { - return BN.prototype.mul.apply(x, [ y ]); - }); - - testMethod('.mulf()', function (x, y) { - return BN.prototype.mulf.apply(x, [ y ]); - }); - - describe('.imul()', function () { - it('should multiply numbers in-place', function () { - var a = new BN('abcdef01234567890abcd', 16); - var b = new BN('deadbeefa551edebabba8', 16); - var c = a.mul(b); - - assert.equal(a.imul(b).toString(16), c.toString(16)); - - a = new BN('abcdef01234567890abcd214a25123f512361e6d236', 16); - b = new BN('deadbeefa551edebabba8121234fd21bac0341324dd', 16); - c = a.mul(b); - - assert.equal(a.imul(b).toString(16), c.toString(16)); - }); - - it('should multiply by 0', function () { - var a = new BN('abcdef01234567890abcd', 16); - var b = new BN('0', 16); - var c = a.mul(b); - - assert.equal(a.imul(b).toString(16), c.toString(16)); - }); - - it('should regress mul big numbers in-place', function () { - var q = fixtures.dhGroups.p17.q; - var qs = fixtures.dhGroups.p17.qs; - - q = new BN(q, 16); - - assert.equal(q.isqr().toString(16), qs); - }); - }); - - describe('.muln()', function () { - it('should multiply number by small number', function () { - var a = new BN('abcdef01234567890abcd', 16); - var b = new BN('dead', 16); - var c = a.mul(b); - - assert.equal(a.muln(0xdead).toString(16), c.toString(16)); - }); - - it('should throw error with num eq 0x4000000', function () { - assert.throws(function () { - new BN(0).imuln(0x4000000); - }, /^Error: Assertion failed$/); - }); - }); - - describe('.pow()', function () { - it('should raise number to the power', function () { - var a = new BN('ab', 16); - var b = new BN('13', 10); - var c = a.pow(b); - - assert.equal(c.toString(16), '15963da06977df51909c9ba5b'); - }); - }); - - describe('.div()', function () { - it('should divide small numbers (<=26 bits)', function () { - assert.equal(new BN('256').div(new BN(10)).toString(10), - '25'); - assert.equal(new BN('-256').div(new BN(10)).toString(10), - '-25'); - assert.equal(new BN('256').div(new BN(-10)).toString(10), - '-25'); - assert.equal(new BN('-256').div(new BN(-10)).toString(10), - '25'); - - assert.equal(new BN('10').div(new BN(256)).toString(10), - '0'); - assert.equal(new BN('-10').div(new BN(256)).toString(10), - '0'); - assert.equal(new BN('10').div(new BN(-256)).toString(10), - '0'); - assert.equal(new BN('-10').div(new BN(-256)).toString(10), - '0'); - }); - - it('should divide large numbers (>53 bits)', function () { - assert.equal(new BN('1222222225255589').div(new BN('611111124969028')) - .toString(10), '1'); - assert.equal(new BN('-1222222225255589').div(new BN('611111124969028')) - .toString(10), '-1'); - assert.equal(new BN('1222222225255589').div(new BN('-611111124969028')) - .toString(10), '-1'); - assert.equal(new BN('-1222222225255589').div(new BN('-611111124969028')) - .toString(10), '1'); - - assert.equal(new BN('611111124969028').div(new BN('1222222225255589')) - .toString(10), '0'); - assert.equal(new BN('-611111124969028').div(new BN('1222222225255589')) - .toString(10), '0'); - assert.equal(new BN('611111124969028').div(new BN('-1222222225255589')) - .toString(10), '0'); - assert.equal(new BN('-611111124969028').div(new BN('-1222222225255589')) - .toString(10), '0'); - }); - - it('should divide numbers', function () { - assert.equal(new BN('69527932928').div(new BN('16974594')).toString(16), - 'fff'); - assert.equal(new BN('-69527932928').div(new BN('16974594')).toString(16), - '-fff'); - - var b = new BN( - '39e58a8055b6fb264b75ec8c646509784204ac15a8c24e05babc9729ab9' + - 'b055c3a9458e4ce3289560a38e08ba8175a9446ce14e608245ab3a9' + - '978a8bd8acaa40', - 16); - var n = new BN( - '79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798', - 16 - ); - assert.equal(b.div(n).toString(16), n.toString(16)); - - assert.equal(new BN('1').div(new BN('-5')).toString(10), '0'); - }); - - it('should not fail on regression after moving to _wordDiv', function () { - // Regression after moving to word div - var p = new BN( - 'fffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f', - 16); - var a = new BN( - '79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798', - 16); - var as = a.sqr(); - assert.equal( - as.div(p).toString(16), - '39e58a8055b6fb264b75ec8c646509784204ac15a8c24e05babc9729e58090b9'); - - p = new BN( - 'ffffffff00000001000000000000000000000000ffffffffffffffffffffffff', - 16); - a = new BN( - 'fffffffe00000003fffffffd0000000200000001fffffffe00000002ffffffff' + - 'ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff', - 16); - assert.equal( - a.div(p).toString(16), - 'ffffffff00000002000000000000000000000001000000000000000000000001'); - }); - }); - - describe('.idivn()', function () { - it('should divide numbers in-place', function () { - assert.equal(new BN('10', 16).idivn(3).toString(16), '5'); - assert.equal(new BN('12', 16).idivn(3).toString(16), '6'); - assert.equal(new BN('10000000000000000').idivn(3).toString(10), - '3333333333333333'); - assert.equal( - new BN('100000000000000000000000000000').idivn(3).toString(10), - '33333333333333333333333333333'); - - var t = new BN(3); - assert.equal( - new BN('12345678901234567890123456', 16).idivn(3).toString(16), - new BN('12345678901234567890123456', 16).div(t).toString(16)); - }); - }); - - describe('.divRound()', function () { - it('should divide numbers with rounding', function () { - assert.equal(new BN(9).divRound(new BN(20)).toString(10), - '0'); - assert.equal(new BN(10).divRound(new BN(20)).toString(10), - '1'); - assert.equal(new BN(150).divRound(new BN(20)).toString(10), - '8'); - assert.equal(new BN(149).divRound(new BN(20)).toString(10), - '7'); - assert.equal(new BN(149).divRound(new BN(17)).toString(10), - '9'); - assert.equal(new BN(144).divRound(new BN(17)).toString(10), - '8'); - assert.equal(new BN(-144).divRound(new BN(17)).toString(10), - '-8'); - }); - - it('should return 1 on exact division', function () { - assert.equal(new BN(144).divRound(new BN(144)).toString(10), '1'); - }); - }); - - describe('.mod()', function () { - it('should modulo small numbers (<=26 bits)', function () { - assert.equal(new BN('256').mod(new BN(10)).toString(10), - '6'); - assert.equal(new BN('-256').mod(new BN(10)).toString(10), - '-6'); - assert.equal(new BN('256').mod(new BN(-10)).toString(10), - '6'); - assert.equal(new BN('-256').mod(new BN(-10)).toString(10), - '-6'); - - assert.equal(new BN('10').mod(new BN(256)).toString(10), - '10'); - assert.equal(new BN('-10').mod(new BN(256)).toString(10), - '-10'); - assert.equal(new BN('10').mod(new BN(-256)).toString(10), - '10'); - assert.equal(new BN('-10').mod(new BN(-256)).toString(10), - '-10'); - }); - - it('should modulo large numbers (>53 bits)', function () { - assert.equal(new BN('1222222225255589').mod(new BN('611111124969028')) - .toString(10), '611111100286561'); - assert.equal(new BN('-1222222225255589').mod(new BN('611111124969028')) - .toString(10), '-611111100286561'); - assert.equal(new BN('1222222225255589').mod(new BN('-611111124969028')) - .toString(10), '611111100286561'); - assert.equal(new BN('-1222222225255589').mod(new BN('-611111124969028')) - .toString(10), '-611111100286561'); - - assert.equal(new BN('611111124969028').mod(new BN('1222222225255589')) - .toString(10), '611111124969028'); - assert.equal(new BN('-611111124969028').mod(new BN('1222222225255589')) - .toString(10), '-611111124969028'); - assert.equal(new BN('611111124969028').mod(new BN('-1222222225255589')) - .toString(10), '611111124969028'); - assert.equal(new BN('-611111124969028').mod(new BN('-1222222225255589')) - .toString(10), '-611111124969028'); - }); - - it('should mod numbers', function () { - assert.equal(new BN('10').mod(new BN(256)).toString(16), - 'a'); - assert.equal(new BN('69527932928').mod(new BN('16974594')).toString(16), - '102f302'); - - // 178 = 10 * 17 + 8 - assert.equal(new BN(178).div(new BN(10)).toNumber(), 17); - assert.equal(new BN(178).mod(new BN(10)).toNumber(), 8); - assert.equal(new BN(178).umod(new BN(10)).toNumber(), 8); - - // -178 = 10 * (-17) + (-8) - assert.equal(new BN(-178).div(new BN(10)).toNumber(), -17); - assert.equal(new BN(-178).mod(new BN(10)).toNumber(), -8); - assert.equal(new BN(-178).umod(new BN(10)).toNumber(), 2); - - // 178 = -10 * (-17) + 8 - assert.equal(new BN(178).div(new BN(-10)).toNumber(), -17); - assert.equal(new BN(178).mod(new BN(-10)).toNumber(), 8); - assert.equal(new BN(178).umod(new BN(-10)).toNumber(), 8); - - // -178 = -10 * (17) + (-8) - assert.equal(new BN(-178).div(new BN(-10)).toNumber(), 17); - assert.equal(new BN(-178).mod(new BN(-10)).toNumber(), -8); - assert.equal(new BN(-178).umod(new BN(-10)).toNumber(), 2); - - // -4 = 1 * (-3) + -1 - assert.equal(new BN(-4).div(new BN(-3)).toNumber(), 1); - assert.equal(new BN(-4).mod(new BN(-3)).toNumber(), -1); - - // -4 = -1 * (3) + -1 - assert.equal(new BN(-4).mod(new BN(3)).toNumber(), -1); - // -4 = 1 * (-3) + (-1 + 3) - assert.equal(new BN(-4).umod(new BN(-3)).toNumber(), 2); - - var p = new BN( - 'ffffffff00000001000000000000000000000000ffffffffffffffffffffffff', - 16); - var a = new BN( - 'fffffffe00000003fffffffd0000000200000001fffffffe00000002ffffffff' + - 'ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff', - 16); - assert.equal( - a.mod(p).toString(16), - '0'); - }); - - it('should properly carry the sign inside division', function () { - var a = new BN('945304eb96065b2a98b57a48a06ae28d285a71b5', 'hex'); - var b = new BN( - 'fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe', - 'hex'); - - assert.equal(a.mul(b).mod(a).cmpn(0), 0); - }); - }); - - describe('.modn()', function () { - it('should act like .mod() on small numbers', function () { - assert.equal(new BN('10', 16).modn(256).toString(16), '10'); - assert.equal(new BN('100', 16).modn(256).toString(16), '0'); - assert.equal(new BN('1001', 16).modn(256).toString(16), '1'); - assert.equal(new BN('100000000001', 16).modn(256).toString(16), '1'); - assert.equal(new BN('100000000001', 16).modn(257).toString(16), - new BN('100000000001', 16).mod(new BN(257)).toString(16)); - assert.equal(new BN('123456789012', 16).modn(3).toString(16), - new BN('123456789012', 16).mod(new BN(3)).toString(16)); - }); - }); - - describe('.abs()', function () { - it('should return absolute value', function () { - assert.equal(new BN(0x1001).abs().toString(), '4097'); - assert.equal(new BN(-0x1001).abs().toString(), '4097'); - assert.equal(new BN('ffffffff', 16).abs().toString(), '4294967295'); - }); - }); - - describe('.invm()', function () { - it('should invert relatively-prime numbers', function () { - var p = new BN(257); - var a = new BN(3); - var b = a.invm(p); - assert.equal(a.mul(b).mod(p).toString(16), '1'); - - var p192 = new BN( - 'fffffffffffffffffffffffffffffffeffffffffffffffff', - 16); - a = new BN('deadbeef', 16); - b = a.invm(p192); - assert.equal(a.mul(b).mod(p192).toString(16), '1'); - - // Even base - var phi = new BN('872d9b030ba368706b68932cf07a0e0c', 16); - var e = new BN(65537); - var d = e.invm(phi); - assert.equal(e.mul(d).mod(phi).toString(16), '1'); - - // Even base (take #2) - a = new BN('5'); - b = new BN('6'); - var r = a.invm(b); - assert.equal(r.mul(a).mod(b).toString(16), '1'); - }); - }); - - describe('.gcd()', function () { - it('should return GCD', function () { - assert.equal(new BN(3).gcd(new BN(2)).toString(10), '1'); - assert.equal(new BN(18).gcd(new BN(12)).toString(10), '6'); - assert.equal(new BN(-18).gcd(new BN(12)).toString(10), '6'); - assert.equal(new BN(-18).gcd(new BN(-12)).toString(10), '6'); - assert.equal(new BN(-18).gcd(new BN(0)).toString(10), '18'); - assert.equal(new BN(0).gcd(new BN(-18)).toString(10), '18'); - assert.equal(new BN(2).gcd(new BN(0)).toString(10), '2'); - assert.equal(new BN(0).gcd(new BN(3)).toString(10), '3'); - assert.equal(new BN(0).gcd(new BN(0)).toString(10), '0'); - }); - }); - - describe('.egcd()', function () { - it('should return EGCD', function () { - assert.equal(new BN(3).egcd(new BN(2)).gcd.toString(10), '1'); - assert.equal(new BN(18).egcd(new BN(12)).gcd.toString(10), '6'); - assert.equal(new BN(-18).egcd(new BN(12)).gcd.toString(10), '6'); - assert.equal(new BN(0).egcd(new BN(12)).gcd.toString(10), '12'); - }); - it('should not allow 0 input', function () { - assert.throws(function () { - new BN(1).egcd(0); - }, /^Error: Assertion failed$/); - }); - it('should not allow negative input', function () { - assert.throws(function () { - new BN(1).egcd(-1); - }, /^Error: Assertion failed$/); - }); - }); - - describe('BN.max(a, b)', function () { - it('should return maximum', function () { - assert.equal(BN.max(new BN(3), new BN(2)).toString(16), '3'); - assert.equal(BN.max(new BN(2), new BN(3)).toString(16), '3'); - assert.equal(BN.max(new BN(2), new BN(2)).toString(16), '2'); - assert.equal(BN.max(new BN(2), new BN(-2)).toString(16), '2'); - }); - }); - - describe('BN.min(a, b)', function () { - it('should return minimum', function () { - assert.equal(BN.min(new BN(3), new BN(2)).toString(16), '2'); - assert.equal(BN.min(new BN(2), new BN(3)).toString(16), '2'); - assert.equal(BN.min(new BN(2), new BN(2)).toString(16), '2'); - assert.equal(BN.min(new BN(2), new BN(-2)).toString(16), '-2'); - }); - }); - - describe('BN.ineg', function () { - it('shouldn\'t change sign for zero', function () { - assert.equal(new BN(0).ineg().toString(10), '0'); - }); - }); -}); diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/diffie-hellman/node_modules/bn.js/test/binary-test.js b/node_modules/browserify/node_modules/crypto-browserify/node_modules/diffie-hellman/node_modules/bn.js/test/binary-test.js deleted file mode 100644 index 37b6421d..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/diffie-hellman/node_modules/bn.js/test/binary-test.js +++ /dev/null @@ -1,233 +0,0 @@ -/* global describe, it */ - -var assert = require('assert'); -var BN = require('../').BN; - -describe('BN.js/Binary', function () { - describe('.shl()', function () { - it('should shl numbers', function () { - // TODO(indutny): add negative numbers when the time will come - assert.equal(new BN('69527932928').shln(13).toString(16), - '2060602000000'); - assert.equal(new BN('69527932928').shln(45).toString(16), - '206060200000000000000'); - }); - - it('should ushl numbers', function () { - assert.equal(new BN('69527932928').ushln(13).toString(16), - '2060602000000'); - assert.equal(new BN('69527932928').ushln(45).toString(16), - '206060200000000000000'); - }); - }); - - describe('.shr()', function () { - it('should shr numbers', function () { - // TODO(indutny): add negative numbers when the time will come - assert.equal(new BN('69527932928').shrn(13).toString(16), - '818180'); - assert.equal(new BN('69527932928').shrn(17).toString(16), - '81818'); - assert.equal(new BN('69527932928').shrn(256).toString(16), - '0'); - }); - - it('should ushr numbers', function () { - assert.equal(new BN('69527932928').ushrn(13).toString(16), - '818180'); - assert.equal(new BN('69527932928').ushrn(17).toString(16), - '81818'); - assert.equal(new BN('69527932928').ushrn(256).toString(16), - '0'); - }); - }); - - describe('.bincn()', function () { - it('should increment bit', function () { - assert.equal(new BN(0).bincn(1).toString(16), '2'); - assert.equal(new BN(2).bincn(1).toString(16), '4'); - assert.equal(new BN(2).bincn(1).bincn(1).toString(16), - new BN(2).bincn(2).toString(16)); - assert.equal(new BN(0xffffff).bincn(1).toString(16), '1000001'); - assert.equal(new BN(2).bincn(63).toString(16), - '8000000000000002'); - }); - }); - - describe('.imaskn()', function () { - it('should mask bits in-place', function () { - assert.equal(new BN(0).imaskn(1).toString(16), '0'); - assert.equal(new BN(3).imaskn(1).toString(16), '1'); - assert.equal(new BN('123456789', 16).imaskn(4).toString(16), '9'); - assert.equal(new BN('123456789', 16).imaskn(16).toString(16), '6789'); - assert.equal(new BN('123456789', 16).imaskn(28).toString(16), '3456789'); - }); - - it('should not mask when number is bigger than length', function () { - assert.equal(new BN(0xe3).imaskn(56).toString(16), 'e3'); - assert.equal(new BN(0xe3).imaskn(26).toString(16), 'e3'); - }); - }); - - describe('.testn()', function () { - it('should support test specific bit', function () { - [ - 'ff', - 'ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff' - ].forEach(function (hex) { - var bn = new BN(hex, 16); - var bl = bn.bitLength(); - - for (var i = 0; i < bl; ++i) { - assert.equal(bn.testn(i), true); - } - - // test off the end - assert.equal(bn.testn(bl), false); - }); - - var xbits = '01111001010111001001000100011101' + - '11010011101100011000111001011101' + - '10010100111000000001011000111101' + - '01011111001111100100011110000010' + - '01011010100111010001010011000100' + - '01101001011110100001001111100110' + - '001110010111'; - - var x = new BN( - '23478905234580795234378912401239784125643978256123048348957342' - ); - for (var i = 0; i < x.bitLength(); ++i) { - assert.equal(x.testn(i), (xbits.charAt(i) === '1'), 'Failed @ bit ' + i); - } - }); - - it('should have short-cuts', function () { - var x = new BN('abcd', 16); - assert(!x.testn(128)); - }); - }); - - describe('.and()', function () { - it('should and numbers', function () { - assert.equal(new BN('1010101010101010101010101010101010101010', 2) - .and(new BN('101010101010101010101010101010101010101', 2)) - .toString(2), '0'); - }); - - it('should and numbers of different limb-length', function () { - assert.equal( - new BN('abcd0000ffff', 16) - .and(new BN('abcd', 16)).toString(16), - 'abcd'); - }); - }); - - describe('.iand()', function () { - it('should iand numbers', function () { - assert.equal(new BN('1010101010101010101010101010101010101010', 2) - .iand(new BN('101010101010101010101010101010101010101', 2)) - .toString(2), '0'); - assert.equal(new BN('1000000000000000000000000000000000000001', 2) - .iand(new BN('1', 2)) - .toString(2), '1'); - assert.equal(new BN('1', 2) - .iand(new BN('1000000000000000000000000000000000000001', 2)) - .toString(2), '1'); - }); - }); - - describe('.or()', function () { - it('should or numbers', function () { - assert.equal(new BN('1010101010101010101010101010101010101010', 2) - .or(new BN('101010101010101010101010101010101010101', 2)) - .toString(2), '1111111111111111111111111111111111111111'); - }); - - it('should or numbers of different limb-length', function () { - assert.equal( - new BN('abcd00000000', 16) - .or(new BN('abcd', 16)).toString(16), - 'abcd0000abcd'); - }); - }); - - describe('.ior()', function () { - it('should ior numbers', function () { - assert.equal(new BN('1010101010101010101010101010101010101010', 2) - .ior(new BN('101010101010101010101010101010101010101', 2)) - .toString(2), '1111111111111111111111111111111111111111'); - assert.equal(new BN('1000000000000000000000000000000000000000', 2) - .ior(new BN('1', 2)) - .toString(2), '1000000000000000000000000000000000000001'); - assert.equal(new BN('1', 2) - .ior(new BN('1000000000000000000000000000000000000000', 2)) - .toString(2), '1000000000000000000000000000000000000001'); - }); - }); - - describe('.xor()', function () { - it('should xor numbers', function () { - assert.equal(new BN('11001100110011001100110011001100', 2) - .xor(new BN('1100110011001100110011001100110', 2)) - .toString(2), '10101010101010101010101010101010'); - }); - }); - - describe('.ixor()', function () { - it('should ixor numbers', function () { - assert.equal(new BN('11001100110011001100110011001100', 2) - .ixor(new BN('1100110011001100110011001100110', 2)) - .toString(2), '10101010101010101010101010101010'); - assert.equal(new BN('11001100110011001100110011001100', 2) - .ixor(new BN('1', 2)) - .toString(2), '11001100110011001100110011001101'); - assert.equal(new BN('1', 2) - .ixor(new BN('11001100110011001100110011001100', 2)) - .toString(2), '11001100110011001100110011001101'); - }); - - it('should and numbers of different limb-length', function () { - assert.equal( - new BN('abcd0000ffff', 16) - .xor(new BN('abcd', 16)).toString(16), - 'abcd00005432'); - }); - }); - - describe('.setn()', function () { - it('should allow single bits to be set', function () { - assert.equal(new BN(0).setn(2, true).toString(2), '100'); - assert.equal(new BN(0).setn(27, true).toString(2), - '1000000000000000000000000000'); - assert.equal(new BN(0).setn(63, true).toString(16), - new BN(1).iushln(63).toString(16)); - assert.equal(new BN('1000000000000000000000000001', 2).setn(27, false) - .toString(2), '1'); - assert.equal(new BN('101', 2).setn(2, false).toString(2), '1'); - }); - }); - - describe('.notn()', function () { - it('should allow bitwise negation', function () { - assert.equal(new BN('111000111', 2).notn(9).toString(2), - '111000'); - assert.equal(new BN('000111000', 2).notn(9).toString(2), - '111000111'); - assert.equal(new BN('111000111', 2).notn(9).toString(2), - '111000'); - assert.equal(new BN('000111000', 2).notn(9).toString(2), - '111000111'); - assert.equal(new BN('111000111', 2).notn(32).toString(2), - '11111111111111111111111000111000'); - assert.equal(new BN('000111000', 2).notn(32).toString(2), - '11111111111111111111111111000111'); - assert.equal(new BN('111000111', 2).notn(68).toString(2), - '11111111111111111111111111111111' + - '111111111111111111111111111000111000'); - assert.equal(new BN('000111000', 2).notn(68).toString(2), - '11111111111111111111111111111111' + - '111111111111111111111111111111000111'); - }); - }); -}); diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/diffie-hellman/node_modules/bn.js/test/constructor-test.js b/node_modules/browserify/node_modules/crypto-browserify/node_modules/diffie-hellman/node_modules/bn.js/test/constructor-test.js deleted file mode 100644 index 11c7df08..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/diffie-hellman/node_modules/bn.js/test/constructor-test.js +++ /dev/null @@ -1,149 +0,0 @@ -/* global describe, it */ - -var assert = require('assert'); -var BN = require('../').BN; - -describe('BN.js/Constructor', function () { - describe('with Smi input', function () { - it('should accept one limb number', function () { - assert.equal(new BN(12345).toString(16), '3039'); - }); - - it('should accept two-limb number', function () { - assert.equal(new BN(0x4123456).toString(16), '4123456'); - }); - - it('should accept 52 bits of precision', function () { - var num = Math.pow(2, 52); - assert.equal(new BN(num, 10).toString(10), num.toString(10)); - }); - - it('should accept max safe integer', function () { - var num = Math.pow(2, 53) - 1; - assert.equal(new BN(num, 10).toString(10), num.toString(10)); - }); - - it('should not accept an unsafe integer', function () { - var num = Math.pow(2, 53); - - assert.throws(function () { - return new BN(num, 10); - }, /^Error: Assertion failed$/); - }); - - it('should accept two-limb LE number', function () { - assert.equal(new BN(0x4123456, null, 'le').toString(16), '56341204'); - }); - }); - - describe('with String input', function () { - it('should accept base-16', function () { - assert.equal(new BN('1A6B765D8CDF', 16).toString(16), '1a6b765d8cdf'); - assert.equal(new BN('1A6B765D8CDF', 16).toString(), '29048849665247'); - }); - - it('should accept base-hex', function () { - assert.equal(new BN('FF', 'hex').toString(), '255'); - }); - - it('should accept base-16 with spaces', function () { - var num = 'a89c e5af8724 c0a23e0e 0ff77500'; - assert.equal(new BN(num, 16).toString(16), num.replace(/ /g, '')); - }); - - it('should accept long base-16', function () { - var num = '123456789abcdef123456789abcdef123456789abcdef'; - assert.equal(new BN(num, 16).toString(16), num); - }); - - it('should accept positive base-10', function () { - assert.equal(new BN('10654321').toString(), '10654321'); - assert.equal(new BN('29048849665247').toString(16), '1a6b765d8cdf'); - }); - - it('should accept negative base-10', function () { - assert.equal(new BN('-29048849665247').toString(16), '-1a6b765d8cdf'); - }); - - it('should accept long base-10', function () { - var num = '10000000000000000'; - assert.equal(new BN(num).toString(10), num); - }); - - it('should accept base-2', function () { - var base2 = '11111111111111111111111111111111111111111111111111111'; - assert.equal(new BN(base2, 2).toString(2), base2); - }); - - it('should accept base-36', function () { - var base36 = 'zzZzzzZzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz'; - assert.equal(new BN(base36, 36).toString(36), base36.toLowerCase()); - }); - - it('should not overflow limbs during base-10', function () { - var num = '65820182292848241686198767302293' + - '20890292528855852623664389292032'; - assert(new BN(num).words[0] < 0x4000000); - }); - - it('should accept base-16 LE integer', function () { - assert.equal(new BN('1A6B765D8CDF', 16, 'le').toString(16), - 'df8c5d766b1a'); - }); - }); - - describe('with Array input', function () { - it('should not fail on empty array', function () { - assert.equal(new BN([]).toString(16), '0'); - }); - - it('should import/export big endian', function () { - assert.equal(new BN([ 1, 2, 3 ]).toString(16), '10203'); - assert.equal(new BN([ 1, 2, 3, 4 ]).toString(16), '1020304'); - assert.equal(new BN([ 1, 2, 3, 4, 5 ]).toString(16), '102030405'); - assert.equal(new BN([ 1, 2, 3, 4, 5, 6, 7, 8 ]).toString(16), - '102030405060708'); - assert.equal(new BN([ 1, 2, 3, 4 ]).toArray().join(','), '1,2,3,4'); - assert.equal(new BN([ 1, 2, 3, 4, 5, 6, 7, 8 ]).toArray().join(','), - '1,2,3,4,5,6,7,8'); - }); - - it('should import little endian', function () { - assert.equal(new BN([ 1, 2, 3 ], 10, 'le').toString(16), '30201'); - assert.equal(new BN([ 1, 2, 3, 4 ], 10, 'le').toString(16), '4030201'); - assert.equal(new BN([ 1, 2, 3, 4, 5 ], 10, 'le').toString(16), - '504030201'); - assert.equal(new BN([ 1, 2, 3, 4, 5, 6, 7, 8 ], 'le').toString(16), - '807060504030201'); - assert.equal(new BN([ 1, 2, 3, 4 ]).toArray('le').join(','), '4,3,2,1'); - assert.equal(new BN([ 1, 2, 3, 4, 5, 6, 7, 8 ]).toArray('le').join(','), - '8,7,6,5,4,3,2,1'); - }); - - it('should import big endian with implicit base', function () { - assert.equal(new BN([ 1, 2, 3, 4, 5 ], 'le').toString(16), '504030201'); - }); - }); - - // the Array code is able to handle Buffer - describe('with Buffer input', function () { - it('should not fail on empty Buffer', function () { - assert.equal(new BN(new Buffer(0)).toString(16), '0'); - }); - - it('should import/export big endian', function () { - assert.equal(new BN(new Buffer('010203', 'hex')).toString(16), '10203'); - }); - - it('should import little endian', function () { - assert.equal(new BN(new Buffer('010203', 'hex'), 'le').toString(16), '30201'); - }); - }); - - describe('with BN input', function () { - it('should clone BN', function () { - var num = new BN(12345); - assert.equal(new BN(num).toString(10), '12345'); - }); - }); -}); diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/diffie-hellman/node_modules/bn.js/test/fixtures.js b/node_modules/browserify/node_modules/crypto-browserify/node_modules/diffie-hellman/node_modules/bn.js/test/fixtures.js deleted file mode 100644 index 39fd661d..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/diffie-hellman/node_modules/bn.js/test/fixtures.js +++ /dev/null @@ -1,264 +0,0 @@ -exports.dhGroups = { - p16: { - prime: 'ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd1' + - '29024e088a67cc74020bbea63b139b22514a08798e3404dd' + - 'ef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245' + - 'e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7ed' + - 'ee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3d' + - 'c2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f' + - '83655d23dca3ad961c62f356208552bb9ed529077096966d' + - '670c354e4abc9804f1746c08ca18217c32905e462e36ce3b' + - 'e39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9' + - 'de2bcbf6955817183995497cea956ae515d2261898fa0510' + - '15728e5a8aaac42dad33170d04507a33a85521abdf1cba64' + - 'ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7' + - 'abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6b' + - 'f12ffa06d98a0864d87602733ec86a64521f2b18177b200c' + - 'bbe117577a615d6c770988c0bad946e208e24fa074e5ab31' + - '43db5bfce0fd108e4b82d120a92108011a723c12a787e6d7' + - '88719a10bdba5b2699c327186af4e23c1a946834b6150bda' + - '2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6' + - '287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed' + - '1f612970cee2d7afb81bdd762170481cd0069127d5b05aa9' + - '93b4ea988d8fddc186ffb7dc90a6c08f4df435c934063199' + - 'ffffffffffffffff', - priv: '6d5923e6449122cbbcc1b96093e0b7e4fd3e469f58daddae' + - '53b49b20664f4132675df9ce98ae0cfdcac0f4181ccb643b' + - '625f98104dcf6f7d8e81961e2cab4b5014895260cb977c7d' + - '2f981f8532fb5da60b3676dfe57f293f05d525866053ac7e' + - '65abfd19241146e92e64f309a97ef3b529af4d6189fa416c' + - '9e1a816c3bdf88e5edf48fbd8233ef9038bb46faa95122c0' + - '5a426be72039639cd2d53d37254b3d258960dcb33c255ede' + - '20e9d7b4b123c8b4f4b986f53cdd510d042166f7dd7dca98' + - '7c39ab36381ba30a5fdd027eb6128d2ef8e5802a2194d422' + - 'b05fe6e1cb4817789b923d8636c1ec4b7601c90da3ddc178' + - '52f59217ae070d87f2e75cbfb6ff92430ad26a71c8373452' + - 'ae1cc5c93350e2d7b87e0acfeba401aaf518580937bf0b6c' + - '341f8c49165a47e49ce50853989d07171c00f43dcddddf72' + - '94fb9c3f4e1124e98ef656b797ef48974ddcd43a21fa06d0' + - '565ae8ce494747ce9e0ea0166e76eb45279e5c6471db7df8' + - 'cc88764be29666de9c545e72da36da2f7a352fb17bdeb982' + - 'a6dc0193ec4bf00b2e533efd6cd4d46e6fb237b775615576' + - 'dd6c7c7bbc087a25e6909d1ebc6e5b38e5c8472c0fc429c6' + - 'f17da1838cbcd9bbef57c5b5522fd6053e62ba21fe97c826' + - 'd3889d0cc17e5fa00b54d8d9f0f46fb523698af965950f4b' + - '941369e180f0aece3870d9335f2301db251595d173902cad' + - '394eaa6ffef8be6c', - pub: 'd53703b7340bc89bfc47176d351e5cf86d5a18d9662eca3c' + - '9759c83b6ccda8859649a5866524d77f79e501db923416ca' + - '2636243836d3e6df752defc0fb19cc386e3ae48ad647753f' + - 'bf415e2612f8a9fd01efe7aca249589590c7e6a0332630bb' + - '29c5b3501265d720213790556f0f1d114a9e2071be3620bd' + - '4ee1e8bb96689ac9e226f0a4203025f0267adc273a43582b' + - '00b70b490343529eaec4dcff140773cd6654658517f51193' + - '13f21f0a8e04fe7d7b21ffeca85ff8f87c42bb8d9cb13a72' + - 'c00e9c6e9dfcedda0777af951cc8ccab90d35e915e707d8e' + - '4c2aca219547dd78e9a1a0730accdc9ad0b854e51edd1e91' + - '4756760bab156ca6e3cb9c625cf0870def34e9ac2e552800' + - 'd6ce506d43dbbc75acfa0c8d8fb12daa3c783fb726f187d5' + - '58131779239c912d389d0511e0f3a81969d12aeee670e48f' + - 'ba41f7ed9f10705543689c2506b976a8ffabed45e33795b0' + - '1df4f6b993a33d1deab1316a67419afa31fbb6fdd252ee8c' + - '7c7d1d016c44e3fcf6b41898d7f206aa33760b505e4eff2e' + - 'c624bc7fe636b1d59e45d6f904fc391419f13d1f0cdb5b6c' + - '2378b09434159917dde709f8a6b5dc30994d056e3f964371' + - '11587ac7af0a442b8367a7bd940f752ddabf31cf01171e24' + - 'd78df136e9681cd974ce4f858a5fb6efd3234a91857bb52d' + - '9e7b414a8bc66db4b5a73bbeccfb6eb764b4f0cbf0375136' + - 'b024b04e698d54a5' - }, - p17: { - prime: 'ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd1' + - '29024e088a67cc74020bbea63b139b22514a08798e3404dd' + - 'ef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245' + - 'e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7ed' + - 'ee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3d' + - 'c2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f' + - '83655d23dca3ad961c62f356208552bb9ed529077096966d' + - '670c354e4abc9804f1746c08ca18217c32905e462e36ce3b' + - 'e39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9' + - 'de2bcbf6955817183995497cea956ae515d2261898fa0510' + - '15728e5a8aaac42dad33170d04507a33a85521abdf1cba64' + - 'ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7' + - 'abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6b' + - 'f12ffa06d98a0864d87602733ec86a64521f2b18177b200c' + - 'bbe117577a615d6c770988c0bad946e208e24fa074e5ab31' + - '43db5bfce0fd108e4b82d120a92108011a723c12a787e6d7' + - '88719a10bdba5b2699c327186af4e23c1a946834b6150bda' + - '2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6' + - '287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed' + - '1f612970cee2d7afb81bdd762170481cd0069127d5b05aa9' + - '93b4ea988d8fddc186ffb7dc90a6c08f4df435c934028492' + - '36c3fab4d27c7026c1d4dcb2602646dec9751e763dba37bd' + - 'f8ff9406ad9e530ee5db382f413001aeb06a53ed9027d831' + - '179727b0865a8918da3edbebcf9b14ed44ce6cbaced4bb1b' + - 'db7f1447e6cc254b332051512bd7af426fb8f401378cd2bf' + - '5983ca01c64b92ecf032ea15d1721d03f482d7ce6e74fef6' + - 'd55e702f46980c82b5a84031900b1c9e59e7c97fbec7e8f3' + - '23a97a7e36cc88be0f1d45b7ff585ac54bd407b22b4154aa' + - 'cc8f6d7ebf48e1d814cc5ed20f8037e0a79715eef29be328' + - '06a1d58bb7c5da76f550aa3d8a1fbff0eb19ccb1a313d55c' + - 'da56c9ec2ef29632387fe8d76e3c0468043e8f663f4860ee' + - '12bf2d5b0b7474d6e694f91e6dcc4024ffffffffffffffff', - priv: '6017f2bc23e1caff5b0a8b4e1fc72422b5204415787801dc' + - '025762b8dbb98ab57603aaaa27c4e6bdf742b4a1726b9375' + - 'a8ca3cf07771779589831d8bd18ddeb79c43e7e77d433950' + - 'e652e49df35b11fa09644874d71d62fdaffb580816c2c88c' + - '2c4a2eefd4a660360316741b05a15a2e37f236692ad3c463' + - 'fff559938fc6b77176e84e1bb47fb41af691c5eb7bb81bd8' + - 'c918f52625a1128f754b08f5a1403b84667231c4dfe07ed4' + - '326234c113931ce606037e960f35a2dfdec38a5f057884d3' + - '0af8fab3be39c1eeb390205fd65982191fc21d5aa30ddf51' + - 'a8e1c58c0c19fc4b4a7380ea9e836aaf671c90c29bc4bcc7' + - '813811aa436a7a9005de9b507957c56a9caa1351b6efc620' + - '7225a18f6e97f830fb6a8c4f03b82f4611e67ab9497b9271' + - 'd6ac252793cc3e5538990dbd894d2dbc2d152801937d9f74' + - 'da4b741b50b4d40e4c75e2ac163f7b397fd555648b249f97' + - 'ffe58ffb6d096aa84534c4c5729cff137759bd34e80db4ab' + - '47e2b9c52064e7f0bf677f72ac9e5d0c6606943683f9d12f' + - '180cf065a5cb8ec3179a874f358847a907f8471d15f1e728' + - '7023249d6d13c82da52628654438f47b8b5cdf4761fbf6ad' + - '9219eceac657dbd06cf2ab776ad4c968f81c3d039367f0a4' + - 'd77c7ec4435c27b6c147071665100063b5666e06eb2fb2cc' + - '3159ba34bc98ca346342195f6f1fb053ddc3bc1873564d40' + - '1c6738cdf764d6e1ff25ca5926f80102ea6593c17170966b' + - 'b5d7352dd7fb821230237ea3ebed1f920feaadbd21be295a' + - '69f2083deae9c5cdf5f4830eb04b7c1f80cc61c17232d79f' + - '7ecc2cc462a7965f804001c89982734e5abba2d31df1b012' + - '152c6b226dff34510b54be8c2cd68d795def66c57a3abfb6' + - '896f1d139e633417f8c694764974d268f46ece3a8d6616ea' + - 'a592144be48ee1e0a1595d3e5edfede5b27cec6c48ceb2ff' + - 'b42cb44275851b0ebf87dfc9aa2d0cb0805e9454b051dfe8' + - 'a29fadd82491a4b4c23f2d06ba45483ab59976da1433c9ce' + - '500164b957a04cf62dd67595319b512fc4b998424d1164dd' + - 'bbe5d1a0f7257cbb04ec9b5ed92079a1502d98725023ecb2', - pub: '3bf836229c7dd874fe37c1790d201e82ed8e192ed61571ca' + - '7285264974eb2a0171f3747b2fc23969a916cbd21e14f7e2' + - 'f0d72dcd2247affba926f9e7bb99944cb5609aed85e71b89' + - 'e89d2651550cb5bd8281bd3144066af78f194032aa777739' + - 'cccb7862a1af401f99f7e5c693f25ddce2dedd9686633820' + - 'd28d0f5ed0c6b5a094f5fe6170b8e2cbc9dff118398baee6' + - 'e895a6301cb6e881b3cae749a5bdf5c56fc897ff68bc73f2' + - '4811bb108b882872bade1f147d886a415cda2b93dd90190c' + - 'be5c2dd53fe78add5960e97f58ff2506afe437f4cf4c912a' + - '397c1a2139ac6207d3ab76e6b7ffd23bb6866dd7f87a9ae5' + - '578789084ff2d06ea0d30156d7a10496e8ebe094f5703539' + - '730f5fdbebc066de417be82c99c7da59953071f49da7878d' + - 'a588775ff2a7f0084de390f009f372af75cdeba292b08ea8' + - '4bd13a87e1ca678f9ad148145f7cef3620d69a891be46fbb' + - 'cad858e2401ec0fd72abdea2f643e6d0197b7646fbb83220' + - '0f4cf7a7f6a7559f9fb0d0f1680822af9dbd8dec4cd1b5e1' + - '7bc799e902d9fe746ddf41da3b7020350d3600347398999a' + - 'baf75d53e03ad2ee17de8a2032f1008c6c2e6618b62f225b' + - 'a2f350179445debe68500fcbb6cae970a9920e321b468b74' + - '5fb524fb88abbcacdca121d737c44d30724227a99745c209' + - 'b970d1ff93bbc9f28b01b4e714d6c9cbd9ea032d4e964d8e' + - '8fff01db095160c20b7646d9fcd314c4bc11bcc232aeccc0' + - 'fbedccbc786951025597522eef283e3f56b44561a0765783' + - '420128638c257e54b972a76e4261892d81222b3e2039c61a' + - 'ab8408fcaac3d634f848ab3ee65ea1bd13c6cd75d2e78060' + - 'e13cf67fbef8de66d2049e26c0541c679fff3e6afc290efe' + - '875c213df9678e4a7ec484bc87dae5f0a1c26d7583e38941' + - 'b7c68b004d4df8b004b666f9448aac1cc3ea21461f41ea5d' + - 'd0f7a9e6161cfe0f58bcfd304bdc11d78c2e9d542e86c0b5' + - '6985cc83f693f686eaac17411a8247bf62f5ccc7782349b5' + - 'cc1f20e312fa2acc0197154d1bfee507e8db77e8f2732f2d' + - '641440ccf248e8643b2bd1e1f9e8239356ab91098fcb431d', - q: 'a899c59999bf877d96442d284359783bdc64b5f878b688fe' + - '51407f0526e616553ad0aaaac4d5bed3046f10a1faaf42bb' + - '2342dc4b7908eea0c46e4c4576897675c2bfdc4467870d3d' + - 'cd90adaed4359237a4bc6924bfb99aa6bf5f5ede15b574ea' + - 'e977eac096f3c67d09bda574c6306c6123fa89d2f086b8dc' + - 'ff92bc570c18d83fe6c810ccfd22ce4c749ef5e6ead3fffe' + - 'c63d95e0e3fde1df9db6a35fa1d107058f37e41957769199' + - 'd945dd7a373622c65f0af3fd9eb1ddc5c764bbfaf7a3dc37' + - '2548e683b970dac4aa4b9869080d2376c9adecebb84e172c' + - '09aeeb25fb8df23e60033260c4f8aac6b8b98ab894b1fb84' + - 'ebb83c0fb2081c3f3eee07f44e24d8fabf76f19ed167b0d7' + - 'ff971565aa4efa3625fce5a43ceeaa3eebb3ce88a00f597f' + - '048c69292b38dba2103ecdd5ec4ccfe3b2d87fa6202f334b' + - 'c1cab83b608dfc875b650b69f2c7e23c0b2b4adf149a6100' + - 'db1b6dbad4679ecb1ea95eafaba3bd00db11c2134f5a8686' + - '358b8b2ab49a1b2e85e1e45caeac5cd4dc0b3b5fffba8871' + - '1c6baf399edd48dad5e5c313702737a6dbdcede80ca358e5' + - '1d1c4fe42e8948a084403f61baed38aa9a1a5ce2918e9f33' + - '100050a430b47bc592995606440272a4994677577a6aaa1b' + - 'a101045dbec5a4e9566dab5445d1af3ed19519f07ac4e2a8' + - 'bd0a84b01978f203a9125a0be020f71fab56c2c9e344d4f4' + - '12d53d3cd8eb74ca5122002e931e3cb0bd4b7492436be17a' + - 'd7ebe27148671f59432c36d8c56eb762655711cfc8471f70' + - '83a8b7283bcb3b1b1d47d37c23d030288cfcef05fbdb4e16' + - '652ee03ee7b77056a808cd700bc3d9ef826eca9a59be959c' + - '947c865d6b372a1ca2d503d7df6d7611b12111665438475a' + - '1c64145849b3da8c2d343410df892d958db232617f9896f1' + - 'de95b8b5a47132be80dd65298c7f2047858409bf762dbc05' + - 'a62ca392ac40cfb8201a0607a2cae07d99a307625f2b2d04' + - 'fe83fbd3ab53602263410f143b73d5b46fc761882e78c782' + - 'd2c36e716a770a7aefaf7f76cea872db7bffefdbc4c2f9e0' + - '39c19adac915e7a63dcb8c8c78c113f29a3e0bc10e100ce0', - qs: '6f0a2fb763eaeb8eb324d564f03d4a55fdcd709e5f1b65e9' + - '5702b0141182f9f945d71bc3e64a7dfdae7482a7dd5a4e58' + - 'bc38f78de2013f2c468a621f08536969d2c8d011bb3bc259' + - '2124692c91140a5472cad224acdacdeae5751dadfdf068b8' + - '77bfa7374694c6a7be159fc3d24ff9eeeecaf62580427ad8' + - '622d48c51a1c4b1701d768c79d8c819776e096d2694107a2' + - 'f3ec0c32224795b59d32894834039dacb369280afb221bc0' + - '90570a93cf409889b818bb30cccee98b2aa26dbba0f28499' + - '08e1a3cd43fa1f1fb71049e5c77c3724d74dc351d9989057' + - '37bbda3805bd6b1293da8774410fb66e3194e18cdb304dd9' + - 'a0b59b583dcbc9fc045ac9d56aea5cfc9f8a0b95da1e11b7' + - '574d1f976e45fe12294997fac66ca0b83fc056183549e850' + - 'a11413cc4abbe39a211e8c8cbf82f2a23266b3c10ab9e286' + - '07a1b6088909cddff856e1eb6b2cde8bdac53fa939827736' + - 'ca1b892f6c95899613442bd02dbdb747f02487718e2d3f22' + - 'f73734d29767ed8d0e346d0c4098b6fdcb4df7d0c4d29603' + - '5bffe80d6c65ae0a1b814150d349096baaf950f2caf298d2' + - 'b292a1d48cf82b10734fe8cedfa16914076dfe3e9b51337b' + - 'ed28ea1e6824bb717b641ca0e526e175d3e5ed7892aebab0' + - 'f207562cc938a821e2956107c09b6ce4049adddcd0b7505d' + - '49ae6c69a20122461102d465d93dc03db026be54c303613a' + - 'b8e5ce3fd4f65d0b6162ff740a0bf5469ffd442d8c509cd2' + - '3b40dab90f6776ca17fc0678774bd6eee1fa85ababa52ec1' + - 'a15031eb677c6c488661dddd8b83d6031fe294489ded5f08' + - '8ad1689a14baeae7e688afa3033899c81f58de39b392ca94' + - 'af6f15a46f19fa95c06f9493c8b96a9be25e78b9ea35013b' + - 'caa76de6303939299d07426a88a334278fc3d0d9fa71373e' + - 'be51d3c1076ab93a11d3d0d703366ff8cde4c11261d488e5' + - '60a2bdf3bfe2476032294800d6a4a39d306e65c6d7d8d66e' + - '5ec63eee94531e83a9bddc458a2b508285c0ee10b7bd94da' + - '2815a0c5bd5b2e15cbe66355e42f5af8955cdfc0b3a4996d' + - '288db1f4b32b15643b18193e378cb7491f3c3951cdd044b1' + - 'a519571bffac2da986f5f1d506c66530a55f70751e24fa8e' + - 'd83ac2347f4069fb561a5565e78c6f0207da24e889a93a96' + - '65f717d9fe8a2938a09ab5f81be7ccecf466c0397fc15a57' + - '469939793f302739765773c256a3ca55d0548afd117a7cae' + - '98ca7e0d749a130c7b743d376848e255f8fdbe4cb4480b63' + - 'cd2c015d1020cf095d175f3ca9dcdfbaf1b2a6e6468eee4c' + - 'c750f2132a77f376bd9782b9d0ff4da98621b898e251a263' + - '4301ba2214a8c430b2f7a79dbbfd6d7ff6e9b0c137b025ff' + - '587c0bf912f0b19d4fff96b1ecd2ca990c89b386055c60f2' + - '3b94214bd55096f17a7b2c0fa12b333235101cd6f28a128c' + - '782e8a72671adadebbd073ded30bd7f09fb693565dcf0bf3' + - '090c21d13e5b0989dd8956f18f17f4f69449a13549c9d80a' + - '77e5e61b5aeeee9528634100e7bc390672f0ded1ca53555b' + - 'abddbcf700b9da6192255bddf50a76b709fbed251dce4c7e' + - '1ca36b85d1e97c1bc9d38c887a5adf140f9eeef674c31422' + - 'e65f63cae719f8c1324e42fa5fd8500899ef5aa3f9856aa7' + - 'ce10c85600a040343204f36bfeab8cfa6e9deb8a2edd2a8e' + - '018d00c7c9fa3a251ad0f57183c37e6377797653f382ec7a' + - '2b0145e16d3c856bc3634b46d90d7198aff12aff88a30e34' + - 'e2bfaf62705f3382576a9d3eeb0829fca2387b5b654af46e' + - '5cf6316fb57d59e5ea6c369061ac64d99671b0e516529dd5' + - 'd9c48ea0503e55fee090d36c5ea8b5954f6fcc0060794e1c' + - 'b7bc24aa1e5c0142fd4ce6e8fd5aa92a7bf84317ea9e1642' + - 'b6995bac6705adf93cbce72433ed0871139970d640f67b78' + - 'e63a7a6d849db2567df69ac7d79f8c62664ac221df228289' + - 'd0a4f9ebd9acb4f87d49da64e51a619fd3f3baccbd9feb12' + - '5abe0cc2c8d17ed1d8546da2b6c641f4d3020a5f9b9f26ac' + - '16546c2d61385505612275ea344c2bbf1ce890023738f715' + - '5e9eba6a071678c8ebd009c328c3eb643679de86e69a9fa5' + - '67a9e146030ff03d546310a0a568c5ba0070e0da22f2cef8' + - '54714b04d399bbc8fd261f9e8efcd0e83bdbc3f5cfb2d024' + - '3e398478cc598e000124eb8858f9df8f52946c2a1ca5c400' - } -}; diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/diffie-hellman/node_modules/bn.js/test/pummel/dh-group-test.js b/node_modules/browserify/node_modules/crypto-browserify/node_modules/diffie-hellman/node_modules/bn.js/test/pummel/dh-group-test.js deleted file mode 100644 index 37a259ff..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/diffie-hellman/node_modules/bn.js/test/pummel/dh-group-test.js +++ /dev/null @@ -1,23 +0,0 @@ -/* global describe, it */ - -var assert = require('assert'); -var BN = require('../../').BN; -var fixtures = require('../fixtures'); - -describe('BN.js/Slow DH test', function () { - var groups = fixtures.dhGroups; - Object.keys(groups).forEach(function (name) { - it('should match public key for ' + name + ' group', function () { - var group = groups[name]; - - this.timeout(3600 * 1000); - - var base = new BN(2); - var mont = BN.red(new BN(group.prime, 16)); - var priv = new BN(group.priv, 16); - var multed = base.toRed(mont).redPow(priv).fromRed(); - var actual = new Buffer(multed.toArray()); - assert.equal(actual.toString('hex'), group.pub); - }); - }); -}); diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/diffie-hellman/node_modules/bn.js/test/red-test.js b/node_modules/browserify/node_modules/crypto-browserify/node_modules/diffie-hellman/node_modules/bn.js/test/red-test.js deleted file mode 100644 index fc2498c9..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/diffie-hellman/node_modules/bn.js/test/red-test.js +++ /dev/null @@ -1,263 +0,0 @@ -/* global describe, it */ - -var assert = require('assert'); -var BN = require('../').BN; - -describe('BN.js/Reduction context', function () { - function testMethod (name, fn) { - describe(name + ' method', function () { - it('should support add, iadd, sub, isub operations', function () { - var p = new BN(257); - var m = fn(p); - var a = new BN(123).toRed(m); - var b = new BN(231).toRed(m); - - assert.equal(a.redAdd(b).fromRed().toString(10), '97'); - assert.equal(a.redSub(b).fromRed().toString(10), '149'); - assert.equal(b.redSub(a).fromRed().toString(10), '108'); - - assert.equal(a.clone().redIAdd(b).fromRed().toString(10), '97'); - assert.equal(a.clone().redISub(b).fromRed().toString(10), '149'); - assert.equal(b.clone().redISub(a).fromRed().toString(10), '108'); - }); - - it('should support pow and mul operations', function () { - var p192 = new BN( - 'fffffffffffffffffffffffffffffffeffffffffffffffff', - 16); - var m = fn(p192); - var a = new BN(123); - var b = new BN(231); - var c = a.toRed(m).redMul(b.toRed(m)).fromRed(); - assert(c.cmp(a.mul(b).mod(p192)) === 0); - - assert.equal(a.toRed(m).redPow(new BN(3)).fromRed() - .cmp(a.sqr().mul(a)), 0); - assert.equal(a.toRed(m).redPow(new BN(4)).fromRed() - .cmp(a.sqr().sqr()), 0); - assert.equal(a.toRed(m).redPow(new BN(8)).fromRed() - .cmp(a.sqr().sqr().sqr()), 0); - assert.equal(a.toRed(m).redPow(new BN(9)).fromRed() - .cmp(a.sqr().sqr().sqr().mul(a)), 0); - assert.equal(a.toRed(m).redPow(new BN(17)).fromRed() - .cmp(a.sqr().sqr().sqr().sqr().mul(a)), 0); - assert.equal( - a.toRed(m).redPow(new BN('deadbeefabbadead', 16)).fromRed() - .toString(16), - '3aa0e7e304e320b68ef61592bcb00341866d6fa66e11a4d6'); - }); - - it('should sqrtm numbers', function () { - var p = new BN(263); - var m = fn(p); - var q = new BN(11).toRed(m); - - var qr = q.redSqrt(); - assert.equal(qr.redSqr().cmp(q), 0); - - qr = q.redSqrt(); - assert.equal(qr.redSqr().cmp(q), 0); - - p = new BN( - 'fffffffffffffffffffffffffffffffeffffffffffffffff', - 16); - m = fn(p); - - q = new BN(13).toRed(m); - qr = q.redSqrt(true, p); - assert.equal(qr.redSqr().cmp(q), 0); - - qr = q.redSqrt(false, p); - assert.equal(qr.redSqr().cmp(q), 0); - - // Tonelli-shanks - p = new BN(13); - m = fn(p); - q = new BN(10).toRed(m); - assert.equal(q.redSqrt().fromRed().toString(10), '7'); - }); - - it('should invm numbers', function () { - var p = new BN(257); - var m = fn(p); - var a = new BN(3).toRed(m); - var b = a.redInvm(); - assert.equal(a.redMul(b).fromRed().toString(16), '1'); - }); - - it('should invm numbers (regression)', function () { - var p = new BN( - 'ffffffff00000001000000000000000000000000ffffffffffffffffffffffff', - 16); - var a = new BN( - 'e1d969b8192fbac73ea5b7921896d6a2263d4d4077bb8e5055361d1f7f8163f3', - 16); - - var m = fn(p); - a = a.toRed(m); - - assert.equal(a.redInvm().fromRed().negative, 0); - }); - - it('should imul numbers', function () { - var p = new BN( - 'fffffffffffffffffffffffffffffffeffffffffffffffff', - 16); - var m = fn(p); - - var a = new BN('deadbeefabbadead', 16); - var b = new BN('abbadeadbeefdead', 16); - var c = a.mul(b).mod(p); - - assert.equal(a.toRed(m).redIMul(b.toRed(m)).fromRed().toString(16), - c.toString(16)); - }); - - it('should pow(base, 0) == 1', function () { - var base = new BN(256).toRed(BN.red('k256')); - var exponent = new BN(0); - var result = base.redPow(exponent); - assert.equal(result.toString(), '1'); - }); - - it('should shl numbers', function () { - var base = new BN(256).toRed(BN.red('k256')); - var result = base.redShl(1); - assert.equal(result.toString(), '512'); - }); - - it('should reduce when converting to red', function () { - var p = new BN(257); - var m = fn(p); - var a = new BN(5).toRed(m); - - assert.doesNotThrow(function () { - var b = a.redISub(new BN(512).toRed(m)); - b.redISub(new BN(512).toRed(m)); - }); - }); - - it('redNeg and zero value', function () { - var a = new BN(0).toRed(BN.red('k256')).redNeg(); - assert.equal(a.isZero(), true); - }); - - it('should not allow modulus <= 1', function () { - assert.throws(function () { - BN.red(new BN(0)); - }, /^Error: modulus must be greater than 1$/); - - assert.throws(function () { - BN.red(new BN(1)); - }, /^Error: modulus must be greater than 1$/); - - assert.doesNotThrow(function () { - BN.red(new BN(2)); - }); - }); - }); - } - - testMethod('Plain', BN.red); - testMethod('Montgomery', BN.mont); - - describe('Pseudo-Mersenne Primes', function () { - it('should reduce numbers mod k256', function () { - var p = BN._prime('k256'); - - assert.equal(p.ireduce(new BN(0xdead)).toString(16), 'dead'); - assert.equal(p.ireduce(new BN('deadbeef', 16)).toString(16), 'deadbeef'); - - var num = new BN('fedcba9876543210fedcba9876543210dead' + - 'fedcba9876543210fedcba9876543210dead', - 16); - var exp = num.mod(p.p).toString(16); - assert.equal(p.ireduce(num).toString(16), exp); - - var regr = new BN('f7e46df64c1815962bf7bc9c56128798' + - '3f4fcef9cb1979573163b477eab93959' + - '335dfb29ef07a4d835d22aa3b6797760' + - '70a8b8f59ba73d56d01a79af9', - 16); - exp = regr.mod(p.p).toString(16); - - assert.equal(p.ireduce(regr).toString(16), exp); - }); - - it('should not fail to invm number mod k256', function () { - var regr2 = new BN( - '6c150c4aa9a8cf1934485d40674d4a7cd494675537bda36d49405c5d2c6f496f', 16); - regr2 = regr2.toRed(BN.red('k256')); - assert.equal(regr2.redInvm().redMul(regr2).fromRed().cmpn(1), 0); - }); - - it('should correctly square the number', function () { - var p = BN._prime('k256').p; - var red = BN.red('k256'); - - var n = new BN('9cd8cb48c3281596139f147c1364a3ed' + - 'e88d3f310fdb0eb98c924e599ca1b3c9', - 16); - var expected = n.sqr().mod(p); - var actual = n.toRed(red).redSqr().fromRed(); - - assert.equal(actual.toString(16), expected.toString(16)); - }); - - it('redISqr should return right result', function () { - var n = new BN('30f28939', 16); - var actual = n.toRed(BN.red('k256')).redISqr().fromRed(); - assert.equal(actual.toString(16), '95bd93d19520eb1'); - }); - }); - - it('should avoid 4.1.0 regresion', function () { - function bits2int (obits, q) { - var bits = new BN(obits); - var shift = (obits.length << 3) - q.bitLength(); - if (shift > 0) { - bits.ishrn(shift); - } - return bits; - } - var t = new Buffer('aff1651e4cd6036d57aa8b2a05ccf1a9d5a40166340ecbbdc55' + - 'be10b568aa0aa3d05ce9a2fcec9df8ed018e29683c6051cb83e' + - '46ce31ba4edb045356a8d0d80b', 'hex'); - var g = new BN('5c7ff6b06f8f143fe8288433493e4769c4d988ace5be25a0e24809670' + - '716c613d7b0cee6932f8faa7c44d2cb24523da53fbe4f6ec3595892d1' + - 'aa58c4328a06c46a15662e7eaa703a1decf8bbb2d05dbe2eb956c142a' + - '338661d10461c0d135472085057f3494309ffa73c611f78b32adbb574' + - '0c361c9f35be90997db2014e2ef5aa61782f52abeb8bd6432c4dd097b' + - 'c5423b285dafb60dc364e8161f4a2a35aca3a10b1c4d203cc76a470a3' + - '3afdcbdd92959859abd8b56e1725252d78eac66e71ba9ae3f1dd24871' + - '99874393cd4d832186800654760e1e34c09e4d155179f9ec0dc4473f9' + - '96bdce6eed1cabed8b6f116f7ad9cf505df0f998e34ab27514b0ffe7', - 16); - var p = new BN('9db6fb5951b66bb6fe1e140f1d2ce5502374161fd6538df1648218642' + - 'f0b5c48c8f7a41aadfa187324b87674fa1822b00f1ecf8136943d7c55' + - '757264e5a1a44ffe012e9936e00c1d3e9310b01c7d179805d3058b2a9' + - 'f4bb6f9716bfe6117c6b5b3cc4d9be341104ad4a80ad6c94e005f4b99' + - '3e14f091eb51743bf33050c38de235567e1b34c3d6a5c0ceaa1a0f368' + - '213c3d19843d0b4b09dcb9fc72d39c8de41f1bf14d4bb4563ca283716' + - '21cad3324b6a2d392145bebfac748805236f5ca2fe92b871cd8f9c36d' + - '3292b5509ca8caa77a2adfc7bfd77dda6f71125a7456fea153e433256' + - 'a2261c6a06ed3693797e7995fad5aabbcfbe3eda2741e375404ae25b', - 16); - var q = new BN('f2c3119374ce76c9356990b465374a17f23f9ed35089bd969f61c6dde' + - '9998c1f', 16); - var k = bits2int(t, q); - var expectedR = '89ec4bb1400eccff8e7d9aa515cd1de7803f2daff09693ee7fd1353e' + - '90a68307'; - var r = g.toRed(BN.mont(p)).redPow(k).fromRed().mod(q); - assert.equal(r.toString(16), expectedR); - }); - - it('K256.split for 512 bits number should return equal numbers', function () { - var red = BN.red('k256'); - var input = new BN(1).iushln(512).subn(1); - assert.equal(input.bitLength(), 512); - var output = new BN(0); - red.prime.split(input, output); - assert.equal(input.cmp(output), 0); - }); -}); diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/diffie-hellman/node_modules/bn.js/test/utils-test.js b/node_modules/browserify/node_modules/crypto-browserify/node_modules/diffie-hellman/node_modules/bn.js/test/utils-test.js deleted file mode 100644 index 8571905a..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/diffie-hellman/node_modules/bn.js/test/utils-test.js +++ /dev/null @@ -1,345 +0,0 @@ -/* global describe, it */ - -var assert = require('assert'); -var BN = require('../').BN; - -describe('BN.js/Utils', function () { - describe('.toString()', function () { - describe('binary padding', function () { - it('should have a length of 256', function () { - var a = new BN(0); - - assert.equal(a.toString(2, 256).length, 256); - }); - }); - describe('hex padding', function () { - it('should have length of 8 from leading 15', function () { - var a = new BN('ffb9602', 16); - - assert.equal(a.toString('hex', 2).length, 8); - }); - - it('should have length of 8 from leading zero', function () { - var a = new BN('fb9604', 16); - - assert.equal(a.toString('hex', 8).length, 8); - }); - - it('should have length of 8 from leading zeros', function () { - var a = new BN(0); - - assert.equal(a.toString('hex', 8).length, 8); - }); - - it('should have length of 64 from leading 15', function () { - var a = new BN( - 'ffb96ff654e61130ba8422f0debca77a0ea74ae5ea8bca9b54ab64aabf01003', - 16); - - assert.equal(a.toString('hex', 2).length, 64); - }); - - it('should have length of 64 from leading zero', function () { - var a = new BN( - 'fb96ff654e61130ba8422f0debca77a0ea74ae5ea8bca9b54ab64aabf01003', - 16); - - assert.equal(a.toString('hex', 64).length, 64); - }); - }); - }); - - describe('.isNeg()', function () { - it('should return true for negative numbers', function () { - assert.equal(new BN(-1).isNeg(), true); - assert.equal(new BN(1).isNeg(), false); - assert.equal(new BN(0).isNeg(), false); - assert.equal(new BN('-0', 10).isNeg(), false); - }); - }); - - describe('.isOdd()', function () { - it('should return true for odd numbers', function () { - assert.equal(new BN(0).isOdd(), false); - assert.equal(new BN(1).isOdd(), true); - assert.equal(new BN(2).isOdd(), false); - assert.equal(new BN('-0', 10).isOdd(), false); - assert.equal(new BN('-1', 10).isOdd(), true); - assert.equal(new BN('-2', 10).isOdd(), false); - }); - }); - - describe('.isEven()', function () { - it('should return true for even numbers', function () { - assert.equal(new BN(0).isEven(), true); - assert.equal(new BN(1).isEven(), false); - assert.equal(new BN(2).isEven(), true); - assert.equal(new BN('-0', 10).isEven(), true); - assert.equal(new BN('-1', 10).isEven(), false); - assert.equal(new BN('-2', 10).isEven(), true); - }); - }); - - describe('.isZero()', function () { - it('should return true for zero', function () { - assert.equal(new BN(0).isZero(), true); - assert.equal(new BN(1).isZero(), false); - assert.equal(new BN(0xffffffff).isZero(), false); - }); - }); - - describe('.bitLength()', function () { - it('should return proper bitLength', function () { - assert.equal(new BN(0).bitLength(), 0); - assert.equal(new BN(0x1).bitLength(), 1); - assert.equal(new BN(0x2).bitLength(), 2); - assert.equal(new BN(0x3).bitLength(), 2); - assert.equal(new BN(0x4).bitLength(), 3); - assert.equal(new BN(0x8).bitLength(), 4); - assert.equal(new BN(0x10).bitLength(), 5); - assert.equal(new BN(0x100).bitLength(), 9); - assert.equal(new BN(0x123456).bitLength(), 21); - assert.equal(new BN('123456789', 16).bitLength(), 33); - assert.equal(new BN('8023456789', 16).bitLength(), 40); - }); - }); - - describe('.byteLength()', function () { - it('should return proper byteLength', function () { - assert.equal(new BN(0).byteLength(), 0); - assert.equal(new BN(0x1).byteLength(), 1); - assert.equal(new BN(0x2).byteLength(), 1); - assert.equal(new BN(0x3).byteLength(), 1); - assert.equal(new BN(0x4).byteLength(), 1); - assert.equal(new BN(0x8).byteLength(), 1); - assert.equal(new BN(0x10).byteLength(), 1); - assert.equal(new BN(0x100).byteLength(), 2); - assert.equal(new BN(0x123456).byteLength(), 3); - assert.equal(new BN('123456789', 16).byteLength(), 5); - assert.equal(new BN('8023456789', 16).byteLength(), 5); - }); - }); - - describe('.toArray()', function () { - it('should return [ 0 ] for `0`', function () { - var n = new BN(0); - assert.deepEqual(n.toArray('be'), [ 0 ]); - assert.deepEqual(n.toArray('le'), [ 0 ]); - }); - - it('should zero pad to desired lengths', function () { - var n = new BN(0x123456); - assert.deepEqual(n.toArray('be', 5), [ 0x00, 0x00, 0x12, 0x34, 0x56 ]); - assert.deepEqual(n.toArray('le', 5), [ 0x56, 0x34, 0x12, 0x00, 0x00 ]); - }); - - it('should throw when naturally larger than desired length', function () { - var n = new BN(0x123456); - assert.throws(function () { - n.toArray('be', 2); - }, /^Error: byte array longer than desired length$/); - }); - }); - - describe('.toBuffer', function () { - it('should return proper Buffer', function () { - var n = new BN(0x123456); - assert.deepEqual(n.toBuffer('be', 5).toString('hex'), '0000123456'); - assert.deepEqual(n.toBuffer('le', 5).toString('hex'), '5634120000'); - }); - }); - - describe('.toNumber()', function () { - it('should return proper Number if below the limit', function () { - assert.deepEqual(new BN(0x123456).toNumber(), 0x123456); - assert.deepEqual(new BN(0x3ffffff).toNumber(), 0x3ffffff); - assert.deepEqual(new BN(0x4000000).toNumber(), 0x4000000); - assert.deepEqual(new BN(0x10000000000000).toNumber(), 0x10000000000000); - assert.deepEqual(new BN(0x10040004004000).toNumber(), 0x10040004004000); - assert.deepEqual(new BN(-0x123456).toNumber(), -0x123456); - assert.deepEqual(new BN(-0x3ffffff).toNumber(), -0x3ffffff); - assert.deepEqual(new BN(-0x4000000).toNumber(), -0x4000000); - assert.deepEqual(new BN(-0x10000000000000).toNumber(), -0x10000000000000); - assert.deepEqual(new BN(-0x10040004004000).toNumber(), -0x10040004004000); - }); - - it('should throw when number exceeds 53 bits', function () { - var n = new BN(1).iushln(54); - assert.throws(function () { - n.toNumber(); - }, /^Error: Number can only safely store up to 53 bits$/); - }); - }); - - describe('.zeroBits()', function () { - it('should return proper zeroBits', function () { - assert.equal(new BN(0).zeroBits(), 0); - assert.equal(new BN(0x1).zeroBits(), 0); - assert.equal(new BN(0x2).zeroBits(), 1); - assert.equal(new BN(0x3).zeroBits(), 0); - assert.equal(new BN(0x4).zeroBits(), 2); - assert.equal(new BN(0x8).zeroBits(), 3); - assert.equal(new BN(0x10).zeroBits(), 4); - assert.equal(new BN(0x100).zeroBits(), 8); - assert.equal(new BN(0x1000000).zeroBits(), 24); - assert.equal(new BN(0x123456).zeroBits(), 1); - }); - }); - - describe('.toJSON', function () { - it('should return hex string', function () { - assert.equal(new BN(0x123).toJSON(), '123'); - }); - }); - - describe('.cmpn', function () { - it('should return -1, 0, 1 correctly', function () { - assert.equal(new BN(42).cmpn(42), 0); - assert.equal(new BN(42).cmpn(43), -1); - assert.equal(new BN(42).cmpn(41), 1); - assert.equal(new BN(0x3fffffe).cmpn(0x3fffffe), 0); - assert.equal(new BN(0x3fffffe).cmpn(0x3ffffff), -1); - assert.equal(new BN(0x3fffffe).cmpn(0x3fffffd), 1); - assert.throws(function () { - new BN(0x3fffffe).cmpn(0x4000000); - }, /^Error: Number is too big$/); - assert.equal(new BN(42).cmpn(-42), 1); - assert.equal(new BN(-42).cmpn(42), -1); - assert.equal(new BN(-42).cmpn(-42), 0); - assert.equal(1 / new BN(-42).cmpn(-42), Infinity); - }); - }); - - describe('.cmp', function () { - it('should return -1, 0, 1 correctly', function () { - assert.equal(new BN(42).cmp(new BN(42)), 0); - assert.equal(new BN(42).cmp(new BN(43)), -1); - assert.equal(new BN(42).cmp(new BN(41)), 1); - assert.equal(new BN(0x3fffffe).cmp(new BN(0x3fffffe)), 0); - assert.equal(new BN(0x3fffffe).cmp(new BN(0x3ffffff)), -1); - assert.equal(new BN(0x3fffffe).cmp(new BN(0x3fffffd)), 1); - assert.equal(new BN(0x3fffffe).cmp(new BN(0x4000000)), -1); - assert.equal(new BN(42).cmp(new BN(-42)), 1); - assert.equal(new BN(-42).cmp(new BN(42)), -1); - assert.equal(new BN(-42).cmp(new BN(-42)), 0); - assert.equal(1 / new BN(-42).cmp(new BN(-42)), Infinity); - }); - }); - - describe('comparison shorthands', function () { - it('.gtn greater than', function () { - assert.equal(new BN(3).gtn(2), true); - assert.equal(new BN(3).gtn(3), false); - assert.equal(new BN(3).gtn(4), false); - }); - it('.gt greater than', function () { - assert.equal(new BN(3).gt(new BN(2)), true); - assert.equal(new BN(3).gt(new BN(3)), false); - assert.equal(new BN(3).gt(new BN(4)), false); - }); - it('.gten greater than or equal', function () { - assert.equal(new BN(3).gten(3), true); - assert.equal(new BN(3).gten(2), true); - assert.equal(new BN(3).gten(4), false); - }); - it('.gte greater than or equal', function () { - assert.equal(new BN(3).gte(new BN(3)), true); - assert.equal(new BN(3).gte(new BN(2)), true); - assert.equal(new BN(3).gte(new BN(4)), false); - }); - it('.ltn less than', function () { - assert.equal(new BN(2).ltn(3), true); - assert.equal(new BN(2).ltn(2), false); - assert.equal(new BN(2).ltn(1), false); - }); - it('.lt less than', function () { - assert.equal(new BN(2).lt(new BN(3)), true); - assert.equal(new BN(2).lt(new BN(2)), false); - assert.equal(new BN(2).lt(new BN(1)), false); - }); - it('.lten less than or equal', function () { - assert.equal(new BN(3).lten(3), true); - assert.equal(new BN(3).lten(2), false); - assert.equal(new BN(3).lten(4), true); - }); - it('.lte less than or equal', function () { - assert.equal(new BN(3).lte(new BN(3)), true); - assert.equal(new BN(3).lte(new BN(2)), false); - assert.equal(new BN(3).lte(new BN(4)), true); - }); - it('.eqn equal', function () { - assert.equal(new BN(3).eqn(3), true); - assert.equal(new BN(3).eqn(2), false); - assert.equal(new BN(3).eqn(4), false); - }); - it('.eq equal', function () { - assert.equal(new BN(3).eq(new BN(3)), true); - assert.equal(new BN(3).eq(new BN(2)), false); - assert.equal(new BN(3).eq(new BN(4)), false); - }); - }); - - describe('.fromTwos', function () { - it('should convert from two\'s complement to negative number', function () { - assert.equal(new BN('00000000', 16).fromTwos(32).toNumber(), 0); - assert.equal(new BN('00000001', 16).fromTwos(32).toNumber(), 1); - assert.equal(new BN('7fffffff', 16).fromTwos(32).toNumber(), 2147483647); - assert.equal(new BN('80000000', 16).fromTwos(32).toNumber(), -2147483648); - assert.equal(new BN('f0000000', 16).fromTwos(32).toNumber(), -268435456); - assert.equal(new BN('f1234567', 16).fromTwos(32).toNumber(), -249346713); - assert.equal(new BN('ffffffff', 16).fromTwos(32).toNumber(), -1); - assert.equal(new BN('fffffffe', 16).fromTwos(32).toNumber(), -2); - assert.equal(new BN('fffffffffffffffffffffffffffffffe', 16) - .fromTwos(128).toNumber(), -2); - assert.equal(new BN('ffffffffffffffffffffffffffffffff' + - 'fffffffffffffffffffffffffffffffe', 16).fromTwos(256).toNumber(), -2); - assert.equal(new BN('ffffffffffffffffffffffffffffffff' + - 'ffffffffffffffffffffffffffffffff', 16).fromTwos(256).toNumber(), -1); - assert.equal(new BN('7fffffffffffffffffffffffffffffff' + - 'ffffffffffffffffffffffffffffffff', 16).fromTwos(256).toString(10), - new BN('5789604461865809771178549250434395392663499' + - '2332820282019728792003956564819967', 10).toString(10)); - assert.equal(new BN('80000000000000000000000000000000' + - '00000000000000000000000000000000', 16).fromTwos(256).toString(10), - new BN('-578960446186580977117854925043439539266349' + - '92332820282019728792003956564819968', 10).toString(10)); - }); - }); - - describe('.toTwos', function () { - it('should convert from negative number to two\'s complement', function () { - assert.equal(new BN(0).toTwos(32).toString(16), '0'); - assert.equal(new BN(1).toTwos(32).toString(16), '1'); - assert.equal(new BN(2147483647).toTwos(32).toString(16), '7fffffff'); - assert.equal(new BN('-2147483648', 10).toTwos(32).toString(16), '80000000'); - assert.equal(new BN('-268435456', 10).toTwos(32).toString(16), 'f0000000'); - assert.equal(new BN('-249346713', 10).toTwos(32).toString(16), 'f1234567'); - assert.equal(new BN('-1', 10).toTwos(32).toString(16), 'ffffffff'); - assert.equal(new BN('-2', 10).toTwos(32).toString(16), 'fffffffe'); - assert.equal(new BN('-2', 10).toTwos(128).toString(16), - 'fffffffffffffffffffffffffffffffe'); - assert.equal(new BN('-2', 10).toTwos(256).toString(16), - 'fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe'); - assert.equal(new BN('-1', 10).toTwos(256).toString(16), - 'ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff'); - assert.equal(new BN('5789604461865809771178549250434395392663' + - '4992332820282019728792003956564819967', 10).toTwos(256).toString(16), - '7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff'); - assert.equal(new BN('-578960446186580977117854925043439539266' + - '34992332820282019728792003956564819968', 10).toTwos(256).toString(16), - '8000000000000000000000000000000000000000000000000000000000000000'); - }); - }); - - describe('.isBN', function () { - it('should return true for BN', function () { - assert.equal(BN.isBN(new BN()), true); - }); - - it('should return false for everything else', function () { - assert.equal(BN.isBN(1), false); - assert.equal(BN.isBN([]), false); - assert.equal(BN.isBN({}), false); - }); - }); -}); diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/diffie-hellman/node_modules/bn.js/util/genCombMulTo.js b/node_modules/browserify/node_modules/crypto-browserify/node_modules/diffie-hellman/node_modules/bn.js/util/genCombMulTo.js deleted file mode 100644 index 8b456c7c..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/diffie-hellman/node_modules/bn.js/util/genCombMulTo.js +++ /dev/null @@ -1,65 +0,0 @@ -'use strict'; - -// NOTE: This could be potentionally used to generate loop-less multiplications -function genCombMulTo (alen, blen) { - var len = alen + blen - 1; - var src = [ - 'var a = self.words;', - 'var b = num.words;', - 'var o = out.words;', - 'var c = 0;', - 'var lo;', - 'var mid;', - 'var hi;' - ]; - for (var i = 0; i < alen; i++) { - src.push('var a' + i + ' = a[' + i + '] | 0;'); - src.push('var al' + i + ' = a' + i + ' & 0x1fff;'); - src.push('var ah' + i + ' = a' + i + ' >>> 13;'); - } - for (i = 0; i < blen; i++) { - src.push('var b' + i + ' = b[' + i + '] | 0;'); - src.push('var bl' + i + ' = b' + i + ' & 0x1fff;'); - src.push('var bh' + i + ' = b' + i + ' >>> 13;'); - } - src.push(''); - src.push('out.negative = self.negative ^ num.negative;'); - src.push('out.length = ' + len + ';'); - - for (var k = 0; k < len; k++) { - var minJ = Math.max(0, k - alen + 1); - var maxJ = Math.min(k, blen - 1); - - src.push('\/* k = ' + k + ' *\/'); - src.push('var w' + k + ' = c;'); - src.push('c = 0;'); - for (var j = minJ; j <= maxJ; j++) { - i = k - j; - - src.push('lo = Math.imul(al' + i + ', bl' + j + ');'); - src.push('mid = Math.imul(al' + i + ', bh' + j + ');'); - src.push('mid = (mid + Math.imul(ah' + i + ', bl' + j + ')) | 0;'); - src.push('hi = Math.imul(ah' + i + ', bh' + j + ');'); - - src.push('w' + k + ' = (w' + k + ' + lo) | 0;'); - src.push('w' + k + ' = (w' + k + ' + ((mid & 0x1fff) << 13)) | 0;'); - src.push('c = (c + hi) | 0;'); - src.push('c = (c + (mid >>> 13)) | 0;'); - src.push('c = (c + (w' + k + ' >>> 26)) | 0;'); - src.push('w' + k + ' &= 0x3ffffff;'); - } - } - // Store in separate step for better memory access - for (k = 0; k < len; k++) { - src.push('o[' + k + '] = w' + k + ';'); - } - src.push('if (c !== 0) {', - ' o[' + k + '] = c;', - ' out.length++;', - '}', - 'return out;'); - - return src.join('\n'); -} - -console.log(genCombMulTo(10, 10)); diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/diffie-hellman/node_modules/bn.js/util/genCombMulTo10.js b/node_modules/browserify/node_modules/crypto-browserify/node_modules/diffie-hellman/node_modules/bn.js/util/genCombMulTo10.js deleted file mode 100644 index cf2e6e80..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/diffie-hellman/node_modules/bn.js/util/genCombMulTo10.js +++ /dev/null @@ -1,65 +0,0 @@ -'use strict'; - -function genCombMulTo (alen, blen) { - var len = alen + blen - 1; - var src = [ - 'var a = self.words;', - 'var b = num.words;', - 'var o = out.words;', - 'var c = 0;', - 'var lo;', - 'var mid;', - 'var hi;' - ]; - for (var i = 0; i < alen; i++) { - src.push('var a' + i + ' = a[' + i + '] | 0;'); - src.push('var al' + i + ' = a' + i + ' & 0x1fff;'); - src.push('var ah' + i + ' = a' + i + ' >>> 13;'); - } - for (i = 0; i < blen; i++) { - src.push('var b' + i + ' = b[' + i + '] | 0;'); - src.push('var bl' + i + ' = b' + i + ' & 0x1fff;'); - src.push('var bh' + i + ' = b' + i + ' >>> 13;'); - } - src.push(''); - src.push('out.negative = self.negative ^ num.negative;'); - src.push('out.length = ' + len + ';'); - - for (var k = 0; k < len; k++) { - var minJ = Math.max(0, k - alen + 1); - var maxJ = Math.min(k, blen - 1); - - src.push('\/* k = ' + k + ' *\/'); - src.push('lo = Math.imul(al' + (k - minJ) + ', bl' + minJ + ');'); - src.push('mid = Math.imul(al' + (k - minJ) + ', bh' + minJ + ');'); - src.push( - 'mid = (mid + Math.imul(ah' + (k - minJ) + ', bl' + minJ + ')) | 0;'); - src.push('hi = Math.imul(ah' + (k - minJ) + ', bh' + minJ + ');'); - - for (var j = minJ + 1; j <= maxJ; j++) { - i = k - j; - - src.push('lo = (lo + Math.imul(al' + i + ', bl' + j + ')) | 0;'); - src.push('mid = (mid + Math.imul(al' + i + ', bh' + j + ')) | 0;'); - src.push('mid = (mid + Math.imul(ah' + i + ', bl' + j + ')) | 0;'); - src.push('hi = (hi + Math.imul(ah' + i + ', bh' + j + ')) | 0;'); - } - - src.push('var w' + k + ' = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;'); - src.push('c = (((hi + (mid >>> 13)) | 0) + (w' + k + ' >>> 26)) | 0;'); - src.push('w' + k + ' &= 0x3ffffff;'); - } - // Store in separate step for better memory access - for (k = 0; k < len; k++) { - src.push('o[' + k + '] = w' + k + ';'); - } - src.push('if (c !== 0) {', - ' o[' + k + '] = c;', - ' out.length++;', - '}', - 'return out;'); - - return src.join('\n'); -} - -console.log(genCombMulTo(10, 10)); diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/diffie-hellman/node_modules/miller-rabin/.npmignore b/node_modules/browserify/node_modules/crypto-browserify/node_modules/diffie-hellman/node_modules/miller-rabin/.npmignore deleted file mode 100644 index 1ca95717..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/diffie-hellman/node_modules/miller-rabin/.npmignore +++ /dev/null @@ -1,2 +0,0 @@ -node_modules/ -npm-debug.log diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/diffie-hellman/node_modules/miller-rabin/README.md b/node_modules/browserify/node_modules/crypto-browserify/node_modules/diffie-hellman/node_modules/miller-rabin/README.md deleted file mode 100644 index e9d76f67..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/diffie-hellman/node_modules/miller-rabin/README.md +++ /dev/null @@ -1,26 +0,0 @@ -# Miller-Rabin - -#### LICENSE - -This software is licensed under the MIT License. - -Copyright Fedor Indutny, 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/node_modules/browserify/node_modules/crypto-browserify/node_modules/diffie-hellman/node_modules/miller-rabin/bin/miller-rabin b/node_modules/browserify/node_modules/crypto-browserify/node_modules/diffie-hellman/node_modules/miller-rabin/bin/miller-rabin deleted file mode 100755 index 2e18dfd5..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/diffie-hellman/node_modules/miller-rabin/bin/miller-rabin +++ /dev/null @@ -1,29 +0,0 @@ -#!/usr/bin/env node -var bn = require('bn.js'); -var fs = require('fs'); -var mr = require('../').create(); - -var num = ''; -if (process.argv[2]) { - num += fs.readFileSync(process.argv[2]); - start(num); -} else { - process.stdin.on('data', function(chunk) { - num += chunk.toString().replace(/[^0-9a-f]/gi, ''); - }); - process.stdin.once('end', function() { - start(num); - }); -} - -function start(text) { - var num = new bn(text, 16); - - var divisor = mr.getDivisor(num); - if (!divisor) - process.exit(1); - if (divisor.cmpn(1) === 0) - process.exit(0); - - console.log(divisor.toString(16)); -} diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/diffie-hellman/node_modules/miller-rabin/lib/mr.js b/node_modules/browserify/node_modules/crypto-browserify/node_modules/diffie-hellman/node_modules/miller-rabin/lib/mr.js deleted file mode 100644 index a9e935b1..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/diffie-hellman/node_modules/miller-rabin/lib/mr.js +++ /dev/null @@ -1,113 +0,0 @@ -var bn = require('bn.js'); -var brorand = require('brorand'); - -function MillerRabin(rand) { - this.rand = rand || new brorand.Rand(); -} -module.exports = MillerRabin; - -MillerRabin.create = function create(rand) { - return new MillerRabin(rand); -}; - -MillerRabin.prototype._rand = function _rand(n) { - var len = n.bitLength(); - var buf = this.rand.generate(Math.ceil(len / 8)); - - // Set low bits - buf[0] |= 3; - - // Mask high bits - var mask = len & 0x7; - if (mask !== 0) - buf[buf.length - 1] >>= 7 - mask; - - return new bn(buf); -} - -MillerRabin.prototype.test = function test(n, k, cb) { - var len = n.bitLength(); - var red = bn.mont(n); - var rone = new bn(1).toRed(red); - - if (!k) - k = Math.max(1, (len / 48) | 0); - - // Find d and s, (n - 1) = (2 ^ s) * d; - var n1 = n.subn(1); - var n2 = n1.subn(1); - for (var s = 0; !n1.testn(s); s++) {} - var d = n.shrn(s); - - var rn1 = n1.toRed(red); - - var prime = true; - for (; k > 0; k--) { - var a = this._rand(n2); - if (cb) - cb(a); - - var x = a.toRed(red).redPow(d); - if (x.cmp(rone) === 0 || x.cmp(rn1) === 0) - continue; - - for (var i = 1; i < s; i++) { - x = x.redSqr(); - - if (x.cmp(rone) === 0) - return false; - if (x.cmp(rn1) === 0) - break; - } - - if (i === s) - return false; - } - - return prime; -}; - -MillerRabin.prototype.getDivisor = function getDivisor(n, k) { - var len = n.bitLength(); - var red = bn.mont(n); - var rone = new bn(1).toRed(red); - - if (!k) - k = Math.max(1, (len / 48) | 0); - - // Find d and s, (n - 1) = (2 ^ s) * d; - var n1 = n.subn(1); - var n2 = n1.subn(1); - for (var s = 0; !n1.testn(s); s++) {} - var d = n.shrn(s); - - var rn1 = n1.toRed(red); - - for (; k > 0; k--) { - var a = this._rand(n2); - - var g = n.gcd(a); - if (g.cmpn(1) !== 0) - return g; - - var x = a.toRed(red).redPow(d); - if (x.cmp(rone) === 0 || x.cmp(rn1) === 0) - continue; - - for (var i = 1; i < s; i++) { - x = x.redSqr(); - - if (x.cmp(rone) === 0) - return x.fromRed().subn(1).gcd(n); - if (x.cmp(rn1) === 0) - break; - } - - if (i === s) { - x = x.redSqr(); - return x.fromRed().subn(1).gcd(n); - } - } - - return false; -}; diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/diffie-hellman/node_modules/miller-rabin/node_modules/brorand/.npmignore b/node_modules/browserify/node_modules/crypto-browserify/node_modules/diffie-hellman/node_modules/miller-rabin/node_modules/brorand/.npmignore deleted file mode 100644 index 1ca95717..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/diffie-hellman/node_modules/miller-rabin/node_modules/brorand/.npmignore +++ /dev/null @@ -1,2 +0,0 @@ -node_modules/ -npm-debug.log diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/diffie-hellman/node_modules/miller-rabin/node_modules/brorand/README.md b/node_modules/browserify/node_modules/crypto-browserify/node_modules/diffie-hellman/node_modules/miller-rabin/node_modules/brorand/README.md deleted file mode 100644 index f80437d1..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/diffie-hellman/node_modules/miller-rabin/node_modules/brorand/README.md +++ /dev/null @@ -1,26 +0,0 @@ -# Brorand - -#### LICENSE - -This software is licensed under the MIT License. - -Copyright Fedor Indutny, 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/node_modules/browserify/node_modules/crypto-browserify/node_modules/diffie-hellman/node_modules/miller-rabin/node_modules/brorand/index.js b/node_modules/browserify/node_modules/crypto-browserify/node_modules/diffie-hellman/node_modules/miller-rabin/node_modules/brorand/index.js deleted file mode 100644 index 17f08555..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/diffie-hellman/node_modules/miller-rabin/node_modules/brorand/index.js +++ /dev/null @@ -1,57 +0,0 @@ -var r; - -module.exports = function rand(len) { - if (!r) - r = new Rand(null); - - return r.generate(len); -}; - -function Rand(rand) { - this.rand = rand; -} -module.exports.Rand = Rand; - -Rand.prototype.generate = function generate(len) { - return this._rand(len); -}; - -if (typeof window === 'object') { - if (window.crypto && window.crypto.getRandomValues) { - // Modern browsers - Rand.prototype._rand = function _rand(n) { - var arr = new Uint8Array(n); - window.crypto.getRandomValues(arr); - return arr; - }; - } else if (window.msCrypto && window.msCrypto.getRandomValues) { - // IE - Rand.prototype._rand = function _rand(n) { - var arr = new Uint8Array(n); - window.msCrypto.getRandomValues(arr); - return arr; - }; - } else { - // Old junk - Rand.prototype._rand = function() { - throw new Error('Not implemented yet'); - }; - } -} else { - // Node.js or Web worker - try { - var crypto = require('crypto'); - - Rand.prototype._rand = function _rand(n) { - return crypto.randomBytes(n); - }; - } catch (e) { - // Emulate crypto API using randy - Rand.prototype._rand = function _rand(n) { - var res = new Uint8Array(n); - for (var i = 0; i < res.length; i++) - res[i] = this.rand.getByte(); - return res; - }; - } -} diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/diffie-hellman/node_modules/miller-rabin/node_modules/brorand/package.json b/node_modules/browserify/node_modules/crypto-browserify/node_modules/diffie-hellman/node_modules/miller-rabin/node_modules/brorand/package.json deleted file mode 100644 index f88fbe3b..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/diffie-hellman/node_modules/miller-rabin/node_modules/brorand/package.json +++ /dev/null @@ -1,61 +0,0 @@ -{ - "name": "brorand", - "version": "1.0.6", - "description": "Random number generator for browsers and node.js", - "main": "index.js", - "scripts": { - "test": "mocha --reporter=spec test/**/*-test.js" - }, - "repository": { - "type": "git", - "url": "git+ssh://git@github.com/indutny/brorand.git" - }, - "keywords": [ - "Random", - "RNG", - "browser", - "crypto" - ], - "author": { - "name": "Fedor Indutny", - "email": "fedor@indutny.com" - }, - "license": "MIT", - "bugs": { - "url": "https://github.com/indutny/brorand/issues" - }, - "homepage": "https://github.com/indutny/brorand", - "devDependencies": { - "mocha": "^2.0.1" - }, - "browser": { - "crypto": false - }, - "gitHead": "f077f0a95c627f2707d7b7699ccddca308a58d15", - "_id": "brorand@1.0.6", - "_shasum": "4028706b915f91f7b349a2e0bf3c376039d216e5", - "_from": "brorand@>=1.0.1 <2.0.0", - "_npmVersion": "3.10.3", - "_nodeVersion": "6.3.0", - "_npmUser": { - "name": "indutny", - "email": "fedor@indutny.com" - }, - "dist": { - "shasum": "4028706b915f91f7b349a2e0bf3c376039d216e5", - "tarball": "https://registry.npmjs.org/brorand/-/brorand-1.0.6.tgz" - }, - "maintainers": [ - { - "name": "indutny", - "email": "fedor@indutny.com" - } - ], - "_npmOperationalInternal": { - "host": "packages-12-west.internal.npmjs.com", - "tmp": "tmp/brorand-1.0.6.tgz_1473323651066_0.41867022518999875" - }, - "directories": {}, - "_resolved": "https://registry.npmjs.org/brorand/-/brorand-1.0.6.tgz", - "readme": "ERROR: No README data found!" -} diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/diffie-hellman/node_modules/miller-rabin/node_modules/brorand/test/api-test.js b/node_modules/browserify/node_modules/crypto-browserify/node_modules/diffie-hellman/node_modules/miller-rabin/node_modules/brorand/test/api-test.js deleted file mode 100644 index b6c876d3..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/diffie-hellman/node_modules/miller-rabin/node_modules/brorand/test/api-test.js +++ /dev/null @@ -1,8 +0,0 @@ -var brorand = require('../'); -var assert = require('assert'); - -describe('Brorand', function() { - it('should generate random numbers', function() { - assert.equal(brorand(100).length, 100); - }); -}); diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/diffie-hellman/node_modules/miller-rabin/package.json b/node_modules/browserify/node_modules/crypto-browserify/node_modules/diffie-hellman/node_modules/miller-rabin/package.json deleted file mode 100644 index abc0ebe7..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/diffie-hellman/node_modules/miller-rabin/package.json +++ /dev/null @@ -1,64 +0,0 @@ -{ - "name": "miller-rabin", - "version": "4.0.0", - "description": "Miller Rabin algorithm for primality test", - "main": "lib/mr.js", - "bin": { - "miller-rabin": "bin/miller-rabin" - }, - "scripts": { - "test": "mocha --reporter=spec test/**/*-test.js" - }, - "repository": { - "type": "git", - "url": "git+ssh://git@github.com/indutny/miller-rabin.git" - }, - "keywords": [ - "prime", - "miller-rabin", - "bignumber" - ], - "author": { - "name": "Fedor Indutny", - "email": "fedor@indutny.com" - }, - "license": "MIT", - "bugs": { - "url": "https://github.com/indutny/miller-rabin/issues" - }, - "homepage": "https://github.com/indutny/miller-rabin", - "devDependencies": { - "mocha": "^2.0.1" - }, - "dependencies": { - "bn.js": "^4.0.0", - "brorand": "^1.0.1" - }, - "gitHead": "94b56df9948a1ae592b331afc9559115f3f98fb2", - "_id": "miller-rabin@4.0.0", - "_shasum": "4a62fb1d42933c05583982f4c716f6fb9e6c6d3d", - "_from": "miller-rabin@>=4.0.0 <5.0.0", - "_npmVersion": "2.14.7", - "_nodeVersion": "4.2.1", - "_npmUser": { - "name": "indutny", - "email": "fedor@indutny.com" - }, - "dist": { - "shasum": "4a62fb1d42933c05583982f4c716f6fb9e6c6d3d", - "tarball": "https://registry.npmjs.org/miller-rabin/-/miller-rabin-4.0.0.tgz" - }, - "maintainers": [ - { - "name": "indutny", - "email": "fedor@indutny.com" - }, - { - "name": "cwmma", - "email": "calvin.metcalf@gmail.com" - } - ], - "directories": {}, - "_resolved": "https://registry.npmjs.org/miller-rabin/-/miller-rabin-4.0.0.tgz", - "readme": "ERROR: No README data found!" -} diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/diffie-hellman/node_modules/miller-rabin/test/api-test.js b/node_modules/browserify/node_modules/crypto-browserify/node_modules/diffie-hellman/node_modules/miller-rabin/test/api-test.js deleted file mode 100644 index dee094d9..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/diffie-hellman/node_modules/miller-rabin/test/api-test.js +++ /dev/null @@ -1,18 +0,0 @@ -var assert = require('assert'); -var mr = require('../').create(); -var bn = require('bn.js'); - -describe('Miller-Rabin', function() { - it('should test number for primality', function() { - assert(!mr.test(new bn(221))); - assert(mr.test(new bn(257))); - - var p = new bn('dba8191813fe8f51eaae1de70213aafede8f323f95f32cff' + - '8b64ebada275cfb18a446a0150e5fdaee246244c5f002ce0' + - 'aca97584be1745f2dd1eea2849c52aac8c4b5fb78a1c4da7' + - '052774338d3310a6e020c46168cb1f94014e9312511cc4fb' + - '79d695bb732449f0e015745b86bfa371dc6ca7386e9c7309' + - '5549c2e4b8002873', 16); - assert(mr.test(p)); - }); -}); diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/diffie-hellman/package.json b/node_modules/browserify/node_modules/crypto-browserify/node_modules/diffie-hellman/package.json deleted file mode 100644 index 059dff7b..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/diffie-hellman/package.json +++ /dev/null @@ -1,76 +0,0 @@ -{ - "name": "diffie-hellman", - "version": "5.0.2", - "description": "pure js diffie-hellman", - "main": "index.js", - "browser": "browser.js", - "scripts": { - "test": "node test.js | tspec" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/crypto-browserify/diffie-hellman.git" - }, - "keywords": [ - "diffie", - "hellman", - "diffiehellman", - "dh" - ], - "author": { - "name": "Calvin Metcalf" - }, - "license": "MIT", - "bugs": { - "url": "https://github.com/crypto-browserify/diffie-hellman/issues" - }, - "homepage": "https://github.com/crypto-browserify/diffie-hellman", - "dependencies": { - "bn.js": "^4.1.0", - "miller-rabin": "^4.0.0", - "randombytes": "^2.0.0" - }, - "devDependencies": { - "tap-spec": "^1.0.1", - "tape": "^3.0.1" - }, - "gitHead": "6a58413e1004b48425b28fb337187db00c2d83c0", - "_id": "diffie-hellman@5.0.2", - "_shasum": "b5835739270cfe26acf632099fded2a07f209e5e", - "_from": "diffie-hellman@>=5.0.0 <6.0.0", - "_npmVersion": "3.3.12", - "_nodeVersion": "5.5.0", - "_npmUser": { - "name": "cwmma", - "email": "calvin.metcalf@gmail.com" - }, - "dist": { - "shasum": "b5835739270cfe26acf632099fded2a07f209e5e", - "tarball": "https://registry.npmjs.org/diffie-hellman/-/diffie-hellman-5.0.2.tgz" - }, - "maintainers": [ - { - "name": "cwmma", - "email": "calvin.metcalf@gmail.com" - }, - { - "name": "dcousens", - "email": "email@dcousens.com" - }, - { - "name": "dominictarr", - "email": "dominic.tarr@gmail.com" - }, - { - "name": "jprichardson", - "email": "jprichardson@gmail.com" - }, - { - "name": "indutny", - "email": "fedor@indutny.com" - } - ], - "directories": {}, - "_resolved": "https://registry.npmjs.org/diffie-hellman/-/diffie-hellman-5.0.2.tgz", - "readme": "ERROR: No README data found!" -} diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/diffie-hellman/readme.md b/node_modules/browserify/node_modules/crypto-browserify/node_modules/diffie-hellman/readme.md deleted file mode 100644 index afba499d..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/diffie-hellman/readme.md +++ /dev/null @@ -1,4 +0,0 @@ -diffie hellman [![Build Status](https://travis-ci.org/crypto-browserify/diffie-hellman.svg)](https://travis-ci.org/crypto-browserify/diffie-hellman) -==== - -pure js diffie-hellman, same api as node, most hard parts thanks to [bn.js](https://www.npmjs.org/package/bn.js) by [@indutny](https://github.com/indutny). In node just returns an object with `crypto.createDiffieHellman` and `crypto.getDiffieHellman` in the browser returns a shim. To require the pure JavaScript one in node `require('diffie-hellman/browser');`; \ No newline at end of file diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/pbkdf2/LICENSE b/node_modules/browserify/node_modules/crypto-browserify/node_modules/pbkdf2/LICENSE deleted file mode 100644 index a115b524..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/pbkdf2/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2014 Daniel Cousens - -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/node_modules/browserify/node_modules/crypto-browserify/node_modules/pbkdf2/README.md b/node_modules/browserify/node_modules/crypto-browserify/node_modules/pbkdf2/README.md deleted file mode 100644 index 05757828..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/pbkdf2/README.md +++ /dev/null @@ -1,28 +0,0 @@ -# pbkdf2 - -[![NPM Package](https://img.shields.io/npm/v/pbkdf2.svg?style=flat-square)](https://www.npmjs.org/package/pbkdf2) -[![Build Status](https://img.shields.io/travis/crypto-browserify/pbkdf2.svg?branch=master&style=flat-square)](https://travis-ci.org/crypto-browserify/pbkdf2) -[![Dependency status](https://img.shields.io/david/crypto-browserify/pbkdf2.svg?style=flat-square)](https://david-dm.org/crypto-browserify/pbkdf2#info=dependencies) - -[![js-standard-style](https://cdn.rawgit.com/feross/standard/master/badge.svg)](https://github.com/feross/standard) - -This library provides the functionality of PBKDF2 with the ability to use any supported hashing algorithm returned from `crypto.getHashes()` - - -## Usage - -```js -var pbkdf2 = require('pbkdf2') -var derivedKey = pbkdf2.pbkdf2Sync('password', 'salt', 1, 32, 'sha512') - -... -``` - -For more information on the API, please see the relevant [Node documentation](https://nodejs.org/api/crypto.html#crypto_crypto_pbkdf2_password_salt_iterations_keylen_digest_callback). - - -## Credits - -This module is a derivative of [cryptocoinjs/pbkdf2-sha256](https://github.com/cryptocoinjs/pbkdf2-sha256/), so thanks to [JP Richardson](https://github.com/jprichardson/) for laying the ground work. - -Thank you to [FangDun Cai](https://github.com/fundon) for donating the package name on npm, if you're looking for his previous module it is located at [fundon/pbkdf2](https://github.com/fundon/pbkdf2). diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/pbkdf2/browser.js b/node_modules/browserify/node_modules/crypto-browserify/node_modules/pbkdf2/browser.js deleted file mode 100644 index e07b5ad5..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/pbkdf2/browser.js +++ /dev/null @@ -1,68 +0,0 @@ -var createHmac = require('create-hmac') -var checkParameters = require('./precondition') - -exports.pbkdf2 = function (password, salt, iterations, keylen, digest, callback) { - if (typeof digest === 'function') { - callback = digest - digest = undefined - } - - checkParameters(iterations, keylen) - if (typeof callback !== 'function') throw new Error('No callback provided to pbkdf2') - - setTimeout(function () { - callback(null, exports.pbkdf2Sync(password, salt, iterations, keylen, digest)) - }) -} - -var defaultEncoding -if (process.browser) { - defaultEncoding = 'utf-8' -} else { - var pVersionMajor = parseInt(process.version.split('.')[0].slice(1), 10) - - defaultEncoding = pVersionMajor >= 6 ? 'utf-8' : 'binary' -} - -exports.pbkdf2Sync = function (password, salt, iterations, keylen, digest) { - if (!Buffer.isBuffer(password)) password = new Buffer(password, defaultEncoding) - if (!Buffer.isBuffer(salt)) salt = new Buffer(salt, defaultEncoding) - - checkParameters(iterations, keylen) - - digest = digest || 'sha1' - - var hLen - var l = 1 - var DK = new Buffer(keylen) - var block1 = new Buffer(salt.length + 4) - salt.copy(block1, 0, 0, salt.length) - - var r - var T - - for (var i = 1; i <= l; i++) { - block1.writeUInt32BE(i, salt.length) - var U = createHmac(digest, password).update(block1).digest() - - if (!hLen) { - hLen = U.length - T = new Buffer(hLen) - l = Math.ceil(keylen / hLen) - r = keylen - (l - 1) * hLen - } - - U.copy(T, 0, 0, hLen) - - for (var j = 1; j < iterations; j++) { - U = createHmac(digest, password).update(U).digest() - for (var k = 0; k < hLen; k++) T[k] ^= U[k] - } - - var destPos = (i - 1) * hLen - var len = (i === l ? r : hLen) - T.copy(DK, destPos, 0, len) - } - - return DK -} diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/pbkdf2/index.js b/node_modules/browserify/node_modules/crypto-browserify/node_modules/pbkdf2/index.js deleted file mode 100644 index 2dc6c39f..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/pbkdf2/index.js +++ /dev/null @@ -1,7 +0,0 @@ -var crypto = require('crypto') -if (crypto.pbkdf2Sync.toString().indexOf('keylen, digest') === -1) { - throw new Error('Unsupported crypto version') -} - -exports.pbkdf2Sync = crypto.pbkdf2Sync -exports.pbkdf2 = crypto.pbkdf2 diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/pbkdf2/package.json b/node_modules/browserify/node_modules/crypto-browserify/node_modules/pbkdf2/package.json deleted file mode 100644 index 61172229..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/pbkdf2/package.json +++ /dev/null @@ -1,104 +0,0 @@ -{ - "name": "pbkdf2", - "version": "3.0.9", - "description": "This library provides the functionality of PBKDF2 with the ability to use any supported hashing algorithm returned from crypto.getHashes()", - "keywords": [ - "pbkdf2", - "kdf", - "salt", - "hash" - ], - "homepage": "https://github.com/crypto-browserify/pbkdf2", - "bugs": { - "url": "https://github.com/crypto-browserify/pbkdf2/issues" - }, - "license": "MIT", - "author": { - "name": "Daniel Cousens" - }, - "browser": "browser.js", - "files": [ - "browser.js", - "index.js", - "node-shim-async.js", - "node-shim.js", - "precondition.js" - ], - "main": "index.js", - "repository": { - "type": "git", - "url": "git+https://github.com/crypto-browserify/pbkdf2.git" - }, - "scripts": { - "prepublish": "npm run test", - "coverage": "nyc --check-coverage --branches 90 --functions 100 tape test/*.js", - "lint": "standard", - "test": "npm run lint && npm run unit", - "bundle-test": "browserify test/index.js > test/bundle.js", - "unit": "tape test/*.js" - }, - "devDependencies": { - "browserify": "*", - "nyc": "^6.4.0", - "standard": "*", - "tape": "^4.5.1" - }, - "dependencies": { - "create-hmac": "^1.1.2" - }, - "standard": { - "ignore": [ - "test/bundle.js" - ] - }, - "engines": { - "node": ">=0.12" - }, - "gitHead": "188f9b0aca397f2937249504f72d1d7e4b2f7bd3", - "_id": "pbkdf2@3.0.9", - "_shasum": "f2c4b25a600058b3c3773c086c37dbbee1ffe693", - "_from": "pbkdf2@>=3.0.3 <4.0.0", - "_npmVersion": "3.10.8", - "_nodeVersion": "6.7.0", - "_npmUser": { - "name": "dcousens", - "email": "email@dcousens.com" - }, - "dist": { - "shasum": "f2c4b25a600058b3c3773c086c37dbbee1ffe693", - "tarball": "https://registry.npmjs.org/pbkdf2/-/pbkdf2-3.0.9.tgz" - }, - "maintainers": [ - { - "name": "fundon", - "email": "cfddream@gmail.com" - }, - { - "name": "cwmma", - "email": "calvin.metcalf@gmail.com" - }, - { - "name": "dcousens", - "email": "email@dcousens.com" - }, - { - "name": "jprichardson", - "email": "jprichardson@gmail.com" - }, - { - "name": "dominictarr", - "email": "dominic.tarr@gmail.com" - }, - { - "name": "indutny", - "email": "fedor@indutny.com" - } - ], - "_npmOperationalInternal": { - "host": "packages-12-west.internal.npmjs.com", - "tmp": "tmp/pbkdf2-3.0.9.tgz_1475671782268_0.27150986436754465" - }, - "directories": {}, - "_resolved": "https://registry.npmjs.org/pbkdf2/-/pbkdf2-3.0.9.tgz", - "readme": "ERROR: No README data found!" -} diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/pbkdf2/precondition.js b/node_modules/browserify/node_modules/crypto-browserify/node_modules/pbkdf2/precondition.js deleted file mode 100644 index 1519b009..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/pbkdf2/precondition.js +++ /dev/null @@ -1,18 +0,0 @@ -var MAX_ALLOC = Math.pow(2, 30) - 1 // default in iojs -module.exports = function (iterations, keylen) { - if (typeof iterations !== 'number') { - throw new TypeError('Iterations not a number') - } - - if (iterations < 0) { - throw new TypeError('Bad iterations') - } - - if (typeof keylen !== 'number') { - throw new TypeError('Key length not a number') - } - - if (keylen < 0 || keylen > MAX_ALLOC || keylen !== keylen) { /* eslint no-self-compare: 0 */ - throw new TypeError('Bad key length') - } -} diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/.travis.yml b/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/.travis.yml deleted file mode 100644 index 1b726667..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/.travis.yml +++ /dev/null @@ -1,6 +0,0 @@ -language: node_js -node_js: - - "0.10" - - "0.11" - - "0.12" - - iojs \ No newline at end of file diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/browser.js b/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/browser.js deleted file mode 100644 index 0e4fabf1..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/browser.js +++ /dev/null @@ -1,10 +0,0 @@ -exports.publicEncrypt = require('./publicEncrypt'); -exports.privateDecrypt = require('./privateDecrypt'); - -exports.privateEncrypt = function privateEncrypt(key, buf) { - return exports.publicEncrypt(key, buf, true); -}; - -exports.publicDecrypt = function publicDecrypt(key, buf) { - return exports.privateDecrypt(key, buf, true); -}; \ No newline at end of file diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/index.js b/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/index.js deleted file mode 100644 index bec688e1..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/index.js +++ /dev/null @@ -1,18 +0,0 @@ -var crypto = require('crypto'); -if (typeof crypto.publicEncrypt !== 'function') { - crypto = require('./browser'); -} -exports.publicEncrypt = crypto.publicEncrypt; -exports.privateDecrypt = crypto.privateDecrypt; - -if (typeof crypto.privateEncrypt !== 'function') { - exports.privateEncrypt = require('./browser').privateEncrypt; -} else { - exports.privateEncrypt = crypto.privateEncrypt; -} - -if (typeof crypto.publicDecrypt !== 'function') { - exports.publicDecrypt = require('./browser').publicDecrypt; -} else { - exports.publicDecrypt = crypto.publicDecrypt; -} \ No newline at end of file diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/mgf.js b/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/mgf.js deleted file mode 100644 index ff727448..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/mgf.js +++ /dev/null @@ -1,16 +0,0 @@ -var createHash = require('create-hash'); -module.exports = function (seed, len) { - var t = new Buffer(''); - var i = 0, c; - while (t.length < len) { - c = i2ops(i++); - t = Buffer.concat([t, createHash('sha1').update(seed).update(c).digest()]); - } - return t.slice(0, len); -}; - -function i2ops(c) { - var out = new Buffer(4); - out.writeUInt32BE(c,0); - return out; -} \ No newline at end of file diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/node_modules/bn.js/.npmignore b/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/node_modules/bn.js/.npmignore deleted file mode 100644 index 6d1eebbd..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/node_modules/bn.js/.npmignore +++ /dev/null @@ -1,6 +0,0 @@ -benchmarks/ -coverage/ -node_modules/ -npm-debug.log -1.js -logo.png diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/node_modules/bn.js/.travis.yml b/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/node_modules/bn.js/.travis.yml deleted file mode 100644 index 936b7b78..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/node_modules/bn.js/.travis.yml +++ /dev/null @@ -1,15 +0,0 @@ -sudo: false -language: node_js -node_js: - - "0.10" - - "0.12" - - "4" - - "5" -env: - matrix: - - TEST_SUITE=unit -matrix: - include: - - node_js: "4" - env: TEST_SUITE=lint -script: npm run $TEST_SUITE diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/node_modules/bn.js/README.md b/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/node_modules/bn.js/README.md deleted file mode 100644 index fee65baa..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/node_modules/bn.js/README.md +++ /dev/null @@ -1,219 +0,0 @@ -# bn.js - -> BigNum in pure javascript - -[![Build Status](https://secure.travis-ci.org/indutny/bn.js.png)](http://travis-ci.org/indutny/bn.js) - -## Install -`npm install --save bn.js` - -## Usage - -```js -const BN = require('bn.js'); - -var a = new BN('dead', 16); -var b = new BN('101010', 2); - -var res = a.add(b); -console.log(res.toString(10)); // 57047 -``` - -**Note**: decimals are not supported in this library. - -## Notation - -### Prefixes - -There are several prefixes to instructions that affect the way the work. Here -is the list of them in the order of appearance in the function name: - -* `i` - perform operation in-place, storing the result in the host object (on - which the method was invoked). Might be used to avoid number allocation costs -* `u` - unsigned, ignore the sign of operands when performing operation, or - always return positive value. Second case applies to reduction operations - like `mod()`. In such cases if the result will be negative - modulo will be - added to the result to make it positive - -### Postfixes - -The only available postfix at the moment is: - -* `n` - which means that the argument of the function must be a plain JavaScript - number - -### Examples - -* `a.iadd(b)` - perform addition on `a` and `b`, storing the result in `a` -* `a.pmod(b)` - reduce `a` modulo `b`, returning positive value -* `a.iushln(13)` - shift bits of `a` left by 13 - -## Instructions - -Prefixes/postfixes are put in parens at the of the line. `endian` - could be -either `le` (little-endian) or `be` (big-endian). - -### Utilities - -* `a.clone()` - clone number -* `a.toString(base, length)` - convert to base-string and pad with zeroes -* `a.toNumber()` - convert to Javascript Number (limited to 53 bits) -* `a.toJSON()` - convert to JSON compatible hex string (alias of `toString(16)`) -* `a.toArray(endian, length)` - convert to byte `Array`, and optionally zero - pad to length, throwing if already exceeding -* `a.toArrayLike(type, endian, length)` - convert to an instance of `type`, - which must behave like an `Array` -* `a.toBuffer(endian, length)` - convert to Node.js Buffer (if available) -* `a.bitLength()` - get number of bits occupied -* `a.zeroBits()` - return number of less-significant consequent zero bits - (example: `1010000` has 4 zero bits) -* `a.byteLength()` - return number of bytes occupied -* `a.isNeg()` - true if the number is negative -* `a.isEven()` - no comments -* `a.isOdd()` - no comments -* `a.isZero()` - no comments -* `a.cmp(b)` - compare numbers and return `-1` (a `<` b), `0` (a `==` b), or `1` (a `>` b) - depending on the comparison result (`ucmp`, `cmpn`) -* `a.lt(b)` - `a` less than `b` (`n`) -* `a.lte(b)` - `a` less than or equals `b` (`n`) -* `a.gt(b)` - `a` greater than `b` (`n`) -* `a.gte(b)` - `a` greater than or equals `b` (`n`) -* `a.eq(b)` - `a` equals `b` (`n`) -* `a.toTwos(width)` - convert to two's complement representation, where `width` is bit width -* `a.fromTwos(width)` - convert from two's complement representation, where `width` is the bit width -* `a.isBN(object)` - returns true if the supplied `object` is a BN.js instance - -### Arithmetics - -* `a.neg()` - negate sign (`i`) -* `a.abs()` - absolute value (`i`) -* `a.add(b)` - addition (`i`, `n`, `in`) -* `a.sub(b)` - subtraction (`i`, `n`, `in`) -* `a.mul(b)` - multiply (`i`, `n`, `in`) -* `a.sqr()` - square (`i`) -* `a.pow(b)` - raise `a` to the power of `b` -* `a.div(b)` - divide (`divn`, `idivn`) -* `a.mod(b)` - reduct (`u`, `n`) (but no `umodn`) -* `a.divRound(b)` - rounded division - -### Bit operations - -* `a.or(b)` - or (`i`, `u`, `iu`) -* `a.and(b)` - and (`i`, `u`, `iu`, `andln`) (NOTE: `andln` is going to be replaced - with `andn` in future) -* `a.xor(b)` - xor (`i`, `u`, `iu`) -* `a.setn(b)` - set specified bit to `1` -* `a.shln(b)` - shift left (`i`, `u`, `iu`) -* `a.shrn(b)` - shift right (`i`, `u`, `iu`) -* `a.testn(b)` - test if specified bit is set -* `a.maskn(b)` - clear bits with indexes higher or equal to `b` (`i`) -* `a.bincn(b)` - add `1 << b` to the number -* `a.notn(w)` - not (for the width specified by `w`) (`i`) - -### Reduction - -* `a.gcd(b)` - GCD -* `a.egcd(b)` - Extended GCD results (`{ a: ..., b: ..., gcd: ... }`) -* `a.invm(b)` - inverse `a` modulo `b` - -## Fast reduction - -When doing lots of reductions using the same modulo, it might be beneficial to -use some tricks: like [Montgomery multiplication][0], or using special algorithm -for [Mersenne Prime][1]. - -### Reduction context - -To enable this tricks one should create a reduction context: - -```js -var red = BN.red(num); -``` -where `num` is just a BN instance. - -Or: - -```js -var red = BN.red(primeName); -``` - -Where `primeName` is either of these [Mersenne Primes][1]: - -* `'k256'` -* `'p224'` -* `'p192'` -* `'p25519'` - -Or: - -```js -var red = BN.mont(num); -``` - -To reduce numbers with [Montgomery trick][1]. `.mont()` is generally faster than -`.red(num)`, but slower than `BN.red(primeName)`. - -### Converting numbers - -Before performing anything in reduction context - numbers should be converted -to it. Usually, this means that one should: - -* Convert inputs to reducted ones -* Operate on them in reduction context -* Convert outputs back from the reduction context - -Here is how one may convert numbers to `red`: - -```js -var redA = a.toRed(red); -``` -Where `red` is a reduction context created using instructions above - -Here is how to convert them back: - -```js -var a = redA.fromRed(); -``` - -### Red instructions - -Most of the instructions from the very start of this readme have their -counterparts in red context: - -* `a.redAdd(b)`, `a.redIAdd(b)` -* `a.redSub(b)`, `a.redISub(b)` -* `a.redShl(num)` -* `a.redMul(b)`, `a.redIMul(b)` -* `a.redSqr()`, `a.redISqr()` -* `a.redSqrt()` - square root modulo reduction context's prime -* `a.redInvm()` - modular inverse of the number -* `a.redNeg()` -* `a.redPow(b)` - modular exponentiation - -## LICENSE - -This software is licensed under the MIT License. - -Copyright Fedor Indutny, 2015. - -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. - -[0]: https://en.wikipedia.org/wiki/Montgomery_modular_multiplication -[1]: https://en.wikipedia.org/wiki/Mersenne_prime diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/node_modules/bn.js/lib/bn.js b/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/node_modules/bn.js/lib/bn.js deleted file mode 100644 index 29a4c51a..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/node_modules/bn.js/lib/bn.js +++ /dev/null @@ -1,3427 +0,0 @@ -(function (module, exports) { - 'use strict'; - - // Utils - function assert (val, msg) { - if (!val) throw new Error(msg || 'Assertion failed'); - } - - // Could use `inherits` module, but don't want to move from single file - // architecture yet. - function inherits (ctor, superCtor) { - ctor.super_ = superCtor; - var TempCtor = function () {}; - TempCtor.prototype = superCtor.prototype; - ctor.prototype = new TempCtor(); - ctor.prototype.constructor = ctor; - } - - // BN - - function BN (number, base, endian) { - if (BN.isBN(number)) { - return number; - } - - this.negative = 0; - this.words = null; - this.length = 0; - - // Reduction context - this.red = null; - - if (number !== null) { - if (base === 'le' || base === 'be') { - endian = base; - base = 10; - } - - this._init(number || 0, base || 10, endian || 'be'); - } - } - if (typeof module === 'object') { - module.exports = BN; - } else { - exports.BN = BN; - } - - BN.BN = BN; - BN.wordSize = 26; - - var Buffer; - try { - Buffer = require('buf' + 'fer').Buffer; - } catch (e) { - } - - BN.isBN = function isBN (num) { - if (num instanceof BN) { - return true; - } - - return num !== null && typeof num === 'object' && - num.constructor.wordSize === BN.wordSize && Array.isArray(num.words); - }; - - BN.max = function max (left, right) { - if (left.cmp(right) > 0) return left; - return right; - }; - - BN.min = function min (left, right) { - if (left.cmp(right) < 0) return left; - return right; - }; - - BN.prototype._init = function init (number, base, endian) { - if (typeof number === 'number') { - return this._initNumber(number, base, endian); - } - - if (typeof number === 'object') { - return this._initArray(number, base, endian); - } - - if (base === 'hex') { - base = 16; - } - assert(base === (base | 0) && base >= 2 && base <= 36); - - number = number.toString().replace(/\s+/g, ''); - var start = 0; - if (number[0] === '-') { - start++; - } - - if (base === 16) { - this._parseHex(number, start); - } else { - this._parseBase(number, base, start); - } - - if (number[0] === '-') { - this.negative = 1; - } - - this.strip(); - - if (endian !== 'le') return; - - this._initArray(this.toArray(), base, endian); - }; - - BN.prototype._initNumber = function _initNumber (number, base, endian) { - if (number < 0) { - this.negative = 1; - number = -number; - } - if (number < 0x4000000) { - this.words = [ number & 0x3ffffff ]; - this.length = 1; - } else if (number < 0x10000000000000) { - this.words = [ - number & 0x3ffffff, - (number / 0x4000000) & 0x3ffffff - ]; - this.length = 2; - } else { - assert(number < 0x20000000000000); // 2 ^ 53 (unsafe) - this.words = [ - number & 0x3ffffff, - (number / 0x4000000) & 0x3ffffff, - 1 - ]; - this.length = 3; - } - - if (endian !== 'le') return; - - // Reverse the bytes - this._initArray(this.toArray(), base, endian); - }; - - BN.prototype._initArray = function _initArray (number, base, endian) { - // Perhaps a Uint8Array - assert(typeof number.length === 'number'); - if (number.length <= 0) { - this.words = [ 0 ]; - this.length = 1; - return this; - } - - this.length = Math.ceil(number.length / 3); - this.words = new Array(this.length); - for (var i = 0; i < this.length; i++) { - this.words[i] = 0; - } - - var j, w; - var off = 0; - if (endian === 'be') { - for (i = number.length - 1, j = 0; i >= 0; i -= 3) { - w = number[i] | (number[i - 1] << 8) | (number[i - 2] << 16); - this.words[j] |= (w << off) & 0x3ffffff; - this.words[j + 1] = (w >>> (26 - off)) & 0x3ffffff; - off += 24; - if (off >= 26) { - off -= 26; - j++; - } - } - } else if (endian === 'le') { - for (i = 0, j = 0; i < number.length; i += 3) { - w = number[i] | (number[i + 1] << 8) | (number[i + 2] << 16); - this.words[j] |= (w << off) & 0x3ffffff; - this.words[j + 1] = (w >>> (26 - off)) & 0x3ffffff; - off += 24; - if (off >= 26) { - off -= 26; - j++; - } - } - } - return this.strip(); - }; - - function parseHex (str, start, end) { - var r = 0; - var len = Math.min(str.length, end); - for (var i = start; i < len; i++) { - var c = str.charCodeAt(i) - 48; - - r <<= 4; - - // 'a' - 'f' - if (c >= 49 && c <= 54) { - r |= c - 49 + 0xa; - - // 'A' - 'F' - } else if (c >= 17 && c <= 22) { - r |= c - 17 + 0xa; - - // '0' - '9' - } else { - r |= c & 0xf; - } - } - return r; - } - - BN.prototype._parseHex = function _parseHex (number, start) { - // Create possibly bigger array to ensure that it fits the number - this.length = Math.ceil((number.length - start) / 6); - this.words = new Array(this.length); - for (var i = 0; i < this.length; i++) { - this.words[i] = 0; - } - - var j, w; - // Scan 24-bit chunks and add them to the number - var off = 0; - for (i = number.length - 6, j = 0; i >= start; i -= 6) { - w = parseHex(number, i, i + 6); - this.words[j] |= (w << off) & 0x3ffffff; - // NOTE: `0x3fffff` is intentional here, 26bits max shift + 24bit hex limb - this.words[j + 1] |= w >>> (26 - off) & 0x3fffff; - off += 24; - if (off >= 26) { - off -= 26; - j++; - } - } - if (i + 6 !== start) { - w = parseHex(number, start, i + 6); - this.words[j] |= (w << off) & 0x3ffffff; - this.words[j + 1] |= w >>> (26 - off) & 0x3fffff; - } - this.strip(); - }; - - function parseBase (str, start, end, mul) { - var r = 0; - var len = Math.min(str.length, end); - for (var i = start; i < len; i++) { - var c = str.charCodeAt(i) - 48; - - r *= mul; - - // 'a' - if (c >= 49) { - r += c - 49 + 0xa; - - // 'A' - } else if (c >= 17) { - r += c - 17 + 0xa; - - // '0' - '9' - } else { - r += c; - } - } - return r; - } - - BN.prototype._parseBase = function _parseBase (number, base, start) { - // Initialize as zero - this.words = [ 0 ]; - this.length = 1; - - // Find length of limb in base - for (var limbLen = 0, limbPow = 1; limbPow <= 0x3ffffff; limbPow *= base) { - limbLen++; - } - limbLen--; - limbPow = (limbPow / base) | 0; - - var total = number.length - start; - var mod = total % limbLen; - var end = Math.min(total, total - mod) + start; - - var word = 0; - for (var i = start; i < end; i += limbLen) { - word = parseBase(number, i, i + limbLen, base); - - this.imuln(limbPow); - if (this.words[0] + word < 0x4000000) { - this.words[0] += word; - } else { - this._iaddn(word); - } - } - - if (mod !== 0) { - var pow = 1; - word = parseBase(number, i, number.length, base); - - for (i = 0; i < mod; i++) { - pow *= base; - } - - this.imuln(pow); - if (this.words[0] + word < 0x4000000) { - this.words[0] += word; - } else { - this._iaddn(word); - } - } - }; - - BN.prototype.copy = function copy (dest) { - dest.words = new Array(this.length); - for (var i = 0; i < this.length; i++) { - dest.words[i] = this.words[i]; - } - dest.length = this.length; - dest.negative = this.negative; - dest.red = this.red; - }; - - BN.prototype.clone = function clone () { - var r = new BN(null); - this.copy(r); - return r; - }; - - BN.prototype._expand = function _expand (size) { - while (this.length < size) { - this.words[this.length++] = 0; - } - return this; - }; - - // Remove leading `0` from `this` - BN.prototype.strip = function strip () { - while (this.length > 1 && this.words[this.length - 1] === 0) { - this.length--; - } - return this._normSign(); - }; - - BN.prototype._normSign = function _normSign () { - // -0 = 0 - if (this.length === 1 && this.words[0] === 0) { - this.negative = 0; - } - return this; - }; - - BN.prototype.inspect = function inspect () { - return (this.red ? ''; - }; - - /* - - var zeros = []; - var groupSizes = []; - var groupBases = []; - - var s = ''; - var i = -1; - while (++i < BN.wordSize) { - zeros[i] = s; - s += '0'; - } - groupSizes[0] = 0; - groupSizes[1] = 0; - groupBases[0] = 0; - groupBases[1] = 0; - var base = 2 - 1; - while (++base < 36 + 1) { - var groupSize = 0; - var groupBase = 1; - while (groupBase < (1 << BN.wordSize) / base) { - groupBase *= base; - groupSize += 1; - } - groupSizes[base] = groupSize; - groupBases[base] = groupBase; - } - - */ - - var zeros = [ - '', - '0', - '00', - '000', - '0000', - '00000', - '000000', - '0000000', - '00000000', - '000000000', - '0000000000', - '00000000000', - '000000000000', - '0000000000000', - '00000000000000', - '000000000000000', - '0000000000000000', - '00000000000000000', - '000000000000000000', - '0000000000000000000', - '00000000000000000000', - '000000000000000000000', - '0000000000000000000000', - '00000000000000000000000', - '000000000000000000000000', - '0000000000000000000000000' - ]; - - var groupSizes = [ - 0, 0, - 25, 16, 12, 11, 10, 9, 8, - 8, 7, 7, 7, 7, 6, 6, - 6, 6, 6, 6, 6, 5, 5, - 5, 5, 5, 5, 5, 5, 5, - 5, 5, 5, 5, 5, 5, 5 - ]; - - var groupBases = [ - 0, 0, - 33554432, 43046721, 16777216, 48828125, 60466176, 40353607, 16777216, - 43046721, 10000000, 19487171, 35831808, 62748517, 7529536, 11390625, - 16777216, 24137569, 34012224, 47045881, 64000000, 4084101, 5153632, - 6436343, 7962624, 9765625, 11881376, 14348907, 17210368, 20511149, - 24300000, 28629151, 33554432, 39135393, 45435424, 52521875, 60466176 - ]; - - BN.prototype.toString = function toString (base, padding) { - base = base || 10; - padding = padding | 0 || 1; - - var out; - if (base === 16 || base === 'hex') { - out = ''; - var off = 0; - var carry = 0; - for (var i = 0; i < this.length; i++) { - var w = this.words[i]; - var word = (((w << off) | carry) & 0xffffff).toString(16); - carry = (w >>> (24 - off)) & 0xffffff; - if (carry !== 0 || i !== this.length - 1) { - out = zeros[6 - word.length] + word + out; - } else { - out = word + out; - } - off += 2; - if (off >= 26) { - off -= 26; - i--; - } - } - if (carry !== 0) { - out = carry.toString(16) + out; - } - while (out.length % padding !== 0) { - out = '0' + out; - } - if (this.negative !== 0) { - out = '-' + out; - } - return out; - } - - if (base === (base | 0) && base >= 2 && base <= 36) { - // var groupSize = Math.floor(BN.wordSize * Math.LN2 / Math.log(base)); - var groupSize = groupSizes[base]; - // var groupBase = Math.pow(base, groupSize); - var groupBase = groupBases[base]; - out = ''; - var c = this.clone(); - c.negative = 0; - while (!c.isZero()) { - var r = c.modn(groupBase).toString(base); - c = c.idivn(groupBase); - - if (!c.isZero()) { - out = zeros[groupSize - r.length] + r + out; - } else { - out = r + out; - } - } - if (this.isZero()) { - out = '0' + out; - } - while (out.length % padding !== 0) { - out = '0' + out; - } - if (this.negative !== 0) { - out = '-' + out; - } - return out; - } - - assert(false, 'Base should be between 2 and 36'); - }; - - BN.prototype.toNumber = function toNumber () { - var ret = this.words[0]; - if (this.length === 2) { - ret += this.words[1] * 0x4000000; - } else if (this.length === 3 && this.words[2] === 0x01) { - // NOTE: at this stage it is known that the top bit is set - ret += 0x10000000000000 + (this.words[1] * 0x4000000); - } else if (this.length > 2) { - assert(false, 'Number can only safely store up to 53 bits'); - } - return (this.negative !== 0) ? -ret : ret; - }; - - BN.prototype.toJSON = function toJSON () { - return this.toString(16); - }; - - BN.prototype.toBuffer = function toBuffer (endian, length) { - assert(typeof Buffer !== 'undefined'); - return this.toArrayLike(Buffer, endian, length); - }; - - BN.prototype.toArray = function toArray (endian, length) { - return this.toArrayLike(Array, endian, length); - }; - - BN.prototype.toArrayLike = function toArrayLike (ArrayType, endian, length) { - var byteLength = this.byteLength(); - var reqLength = length || Math.max(1, byteLength); - assert(byteLength <= reqLength, 'byte array longer than desired length'); - assert(reqLength > 0, 'Requested array length <= 0'); - - this.strip(); - var littleEndian = endian === 'le'; - var res = new ArrayType(reqLength); - - var b, i; - var q = this.clone(); - if (!littleEndian) { - // Assume big-endian - for (i = 0; i < reqLength - byteLength; i++) { - res[i] = 0; - } - - for (i = 0; !q.isZero(); i++) { - b = q.andln(0xff); - q.iushrn(8); - - res[reqLength - i - 1] = b; - } - } else { - for (i = 0; !q.isZero(); i++) { - b = q.andln(0xff); - q.iushrn(8); - - res[i] = b; - } - - for (; i < reqLength; i++) { - res[i] = 0; - } - } - - return res; - }; - - if (Math.clz32) { - BN.prototype._countBits = function _countBits (w) { - return 32 - Math.clz32(w); - }; - } else { - BN.prototype._countBits = function _countBits (w) { - var t = w; - var r = 0; - if (t >= 0x1000) { - r += 13; - t >>>= 13; - } - if (t >= 0x40) { - r += 7; - t >>>= 7; - } - if (t >= 0x8) { - r += 4; - t >>>= 4; - } - if (t >= 0x02) { - r += 2; - t >>>= 2; - } - return r + t; - }; - } - - BN.prototype._zeroBits = function _zeroBits (w) { - // Short-cut - if (w === 0) return 26; - - var t = w; - var r = 0; - if ((t & 0x1fff) === 0) { - r += 13; - t >>>= 13; - } - if ((t & 0x7f) === 0) { - r += 7; - t >>>= 7; - } - if ((t & 0xf) === 0) { - r += 4; - t >>>= 4; - } - if ((t & 0x3) === 0) { - r += 2; - t >>>= 2; - } - if ((t & 0x1) === 0) { - r++; - } - return r; - }; - - // Return number of used bits in a BN - BN.prototype.bitLength = function bitLength () { - var w = this.words[this.length - 1]; - var hi = this._countBits(w); - return (this.length - 1) * 26 + hi; - }; - - function toBitArray (num) { - var w = new Array(num.bitLength()); - - for (var bit = 0; bit < w.length; bit++) { - var off = (bit / 26) | 0; - var wbit = bit % 26; - - w[bit] = (num.words[off] & (1 << wbit)) >>> wbit; - } - - return w; - } - - // Number of trailing zero bits - BN.prototype.zeroBits = function zeroBits () { - if (this.isZero()) return 0; - - var r = 0; - for (var i = 0; i < this.length; i++) { - var b = this._zeroBits(this.words[i]); - r += b; - if (b !== 26) break; - } - return r; - }; - - BN.prototype.byteLength = function byteLength () { - return Math.ceil(this.bitLength() / 8); - }; - - BN.prototype.toTwos = function toTwos (width) { - if (this.negative !== 0) { - return this.abs().inotn(width).iaddn(1); - } - return this.clone(); - }; - - BN.prototype.fromTwos = function fromTwos (width) { - if (this.testn(width - 1)) { - return this.notn(width).iaddn(1).ineg(); - } - return this.clone(); - }; - - BN.prototype.isNeg = function isNeg () { - return this.negative !== 0; - }; - - // Return negative clone of `this` - BN.prototype.neg = function neg () { - return this.clone().ineg(); - }; - - BN.prototype.ineg = function ineg () { - if (!this.isZero()) { - this.negative ^= 1; - } - - return this; - }; - - // Or `num` with `this` in-place - BN.prototype.iuor = function iuor (num) { - while (this.length < num.length) { - this.words[this.length++] = 0; - } - - for (var i = 0; i < num.length; i++) { - this.words[i] = this.words[i] | num.words[i]; - } - - return this.strip(); - }; - - BN.prototype.ior = function ior (num) { - assert((this.negative | num.negative) === 0); - return this.iuor(num); - }; - - // Or `num` with `this` - BN.prototype.or = function or (num) { - if (this.length > num.length) return this.clone().ior(num); - return num.clone().ior(this); - }; - - BN.prototype.uor = function uor (num) { - if (this.length > num.length) return this.clone().iuor(num); - return num.clone().iuor(this); - }; - - // And `num` with `this` in-place - BN.prototype.iuand = function iuand (num) { - // b = min-length(num, this) - var b; - if (this.length > num.length) { - b = num; - } else { - b = this; - } - - for (var i = 0; i < b.length; i++) { - this.words[i] = this.words[i] & num.words[i]; - } - - this.length = b.length; - - return this.strip(); - }; - - BN.prototype.iand = function iand (num) { - assert((this.negative | num.negative) === 0); - return this.iuand(num); - }; - - // And `num` with `this` - BN.prototype.and = function and (num) { - if (this.length > num.length) return this.clone().iand(num); - return num.clone().iand(this); - }; - - BN.prototype.uand = function uand (num) { - if (this.length > num.length) return this.clone().iuand(num); - return num.clone().iuand(this); - }; - - // Xor `num` with `this` in-place - BN.prototype.iuxor = function iuxor (num) { - // a.length > b.length - var a; - var b; - if (this.length > num.length) { - a = this; - b = num; - } else { - a = num; - b = this; - } - - for (var i = 0; i < b.length; i++) { - this.words[i] = a.words[i] ^ b.words[i]; - } - - if (this !== a) { - for (; i < a.length; i++) { - this.words[i] = a.words[i]; - } - } - - this.length = a.length; - - return this.strip(); - }; - - BN.prototype.ixor = function ixor (num) { - assert((this.negative | num.negative) === 0); - return this.iuxor(num); - }; - - // Xor `num` with `this` - BN.prototype.xor = function xor (num) { - if (this.length > num.length) return this.clone().ixor(num); - return num.clone().ixor(this); - }; - - BN.prototype.uxor = function uxor (num) { - if (this.length > num.length) return this.clone().iuxor(num); - return num.clone().iuxor(this); - }; - - // Not ``this`` with ``width`` bitwidth - BN.prototype.inotn = function inotn (width) { - assert(typeof width === 'number' && width >= 0); - - var bytesNeeded = Math.ceil(width / 26) | 0; - var bitsLeft = width % 26; - - // Extend the buffer with leading zeroes - this._expand(bytesNeeded); - - if (bitsLeft > 0) { - bytesNeeded--; - } - - // Handle complete words - for (var i = 0; i < bytesNeeded; i++) { - this.words[i] = ~this.words[i] & 0x3ffffff; - } - - // Handle the residue - if (bitsLeft > 0) { - this.words[i] = ~this.words[i] & (0x3ffffff >> (26 - bitsLeft)); - } - - // And remove leading zeroes - return this.strip(); - }; - - BN.prototype.notn = function notn (width) { - return this.clone().inotn(width); - }; - - // Set `bit` of `this` - BN.prototype.setn = function setn (bit, val) { - assert(typeof bit === 'number' && bit >= 0); - - var off = (bit / 26) | 0; - var wbit = bit % 26; - - this._expand(off + 1); - - if (val) { - this.words[off] = this.words[off] | (1 << wbit); - } else { - this.words[off] = this.words[off] & ~(1 << wbit); - } - - return this.strip(); - }; - - // Add `num` to `this` in-place - BN.prototype.iadd = function iadd (num) { - var r; - - // negative + positive - if (this.negative !== 0 && num.negative === 0) { - this.negative = 0; - r = this.isub(num); - this.negative ^= 1; - return this._normSign(); - - // positive + negative - } else if (this.negative === 0 && num.negative !== 0) { - num.negative = 0; - r = this.isub(num); - num.negative = 1; - return r._normSign(); - } - - // a.length > b.length - var a, b; - if (this.length > num.length) { - a = this; - b = num; - } else { - a = num; - b = this; - } - - var carry = 0; - for (var i = 0; i < b.length; i++) { - r = (a.words[i] | 0) + (b.words[i] | 0) + carry; - this.words[i] = r & 0x3ffffff; - carry = r >>> 26; - } - for (; carry !== 0 && i < a.length; i++) { - r = (a.words[i] | 0) + carry; - this.words[i] = r & 0x3ffffff; - carry = r >>> 26; - } - - this.length = a.length; - if (carry !== 0) { - this.words[this.length] = carry; - this.length++; - // Copy the rest of the words - } else if (a !== this) { - for (; i < a.length; i++) { - this.words[i] = a.words[i]; - } - } - - return this; - }; - - // Add `num` to `this` - BN.prototype.add = function add (num) { - var res; - if (num.negative !== 0 && this.negative === 0) { - num.negative = 0; - res = this.sub(num); - num.negative ^= 1; - return res; - } else if (num.negative === 0 && this.negative !== 0) { - this.negative = 0; - res = num.sub(this); - this.negative = 1; - return res; - } - - if (this.length > num.length) return this.clone().iadd(num); - - return num.clone().iadd(this); - }; - - // Subtract `num` from `this` in-place - BN.prototype.isub = function isub (num) { - // this - (-num) = this + num - if (num.negative !== 0) { - num.negative = 0; - var r = this.iadd(num); - num.negative = 1; - return r._normSign(); - - // -this - num = -(this + num) - } else if (this.negative !== 0) { - this.negative = 0; - this.iadd(num); - this.negative = 1; - return this._normSign(); - } - - // At this point both numbers are positive - var cmp = this.cmp(num); - - // Optimization - zeroify - if (cmp === 0) { - this.negative = 0; - this.length = 1; - this.words[0] = 0; - return this; - } - - // a > b - var a, b; - if (cmp > 0) { - a = this; - b = num; - } else { - a = num; - b = this; - } - - var carry = 0; - for (var i = 0; i < b.length; i++) { - r = (a.words[i] | 0) - (b.words[i] | 0) + carry; - carry = r >> 26; - this.words[i] = r & 0x3ffffff; - } - for (; carry !== 0 && i < a.length; i++) { - r = (a.words[i] | 0) + carry; - carry = r >> 26; - this.words[i] = r & 0x3ffffff; - } - - // Copy rest of the words - if (carry === 0 && i < a.length && a !== this) { - for (; i < a.length; i++) { - this.words[i] = a.words[i]; - } - } - - this.length = Math.max(this.length, i); - - if (a !== this) { - this.negative = 1; - } - - return this.strip(); - }; - - // Subtract `num` from `this` - BN.prototype.sub = function sub (num) { - return this.clone().isub(num); - }; - - function smallMulTo (self, num, out) { - out.negative = num.negative ^ self.negative; - var len = (self.length + num.length) | 0; - out.length = len; - len = (len - 1) | 0; - - // Peel one iteration (compiler can't do it, because of code complexity) - var a = self.words[0] | 0; - var b = num.words[0] | 0; - var r = a * b; - - var lo = r & 0x3ffffff; - var carry = (r / 0x4000000) | 0; - out.words[0] = lo; - - for (var k = 1; k < len; k++) { - // Sum all words with the same `i + j = k` and accumulate `ncarry`, - // note that ncarry could be >= 0x3ffffff - var ncarry = carry >>> 26; - var rword = carry & 0x3ffffff; - var maxJ = Math.min(k, num.length - 1); - for (var j = Math.max(0, k - self.length + 1); j <= maxJ; j++) { - var i = (k - j) | 0; - a = self.words[i] | 0; - b = num.words[j] | 0; - r = a * b + rword; - ncarry += (r / 0x4000000) | 0; - rword = r & 0x3ffffff; - } - out.words[k] = rword | 0; - carry = ncarry | 0; - } - if (carry !== 0) { - out.words[k] = carry | 0; - } else { - out.length--; - } - - return out.strip(); - } - - // TODO(indutny): it may be reasonable to omit it for users who don't need - // to work with 256-bit numbers, otherwise it gives 20% improvement for 256-bit - // multiplication (like elliptic secp256k1). - var comb10MulTo = function comb10MulTo (self, num, out) { - var a = self.words; - var b = num.words; - var o = out.words; - var c = 0; - var lo; - var mid; - var hi; - var a0 = a[0] | 0; - var al0 = a0 & 0x1fff; - var ah0 = a0 >>> 13; - var a1 = a[1] | 0; - var al1 = a1 & 0x1fff; - var ah1 = a1 >>> 13; - var a2 = a[2] | 0; - var al2 = a2 & 0x1fff; - var ah2 = a2 >>> 13; - var a3 = a[3] | 0; - var al3 = a3 & 0x1fff; - var ah3 = a3 >>> 13; - var a4 = a[4] | 0; - var al4 = a4 & 0x1fff; - var ah4 = a4 >>> 13; - var a5 = a[5] | 0; - var al5 = a5 & 0x1fff; - var ah5 = a5 >>> 13; - var a6 = a[6] | 0; - var al6 = a6 & 0x1fff; - var ah6 = a6 >>> 13; - var a7 = a[7] | 0; - var al7 = a7 & 0x1fff; - var ah7 = a7 >>> 13; - var a8 = a[8] | 0; - var al8 = a8 & 0x1fff; - var ah8 = a8 >>> 13; - var a9 = a[9] | 0; - var al9 = a9 & 0x1fff; - var ah9 = a9 >>> 13; - var b0 = b[0] | 0; - var bl0 = b0 & 0x1fff; - var bh0 = b0 >>> 13; - var b1 = b[1] | 0; - var bl1 = b1 & 0x1fff; - var bh1 = b1 >>> 13; - var b2 = b[2] | 0; - var bl2 = b2 & 0x1fff; - var bh2 = b2 >>> 13; - var b3 = b[3] | 0; - var bl3 = b3 & 0x1fff; - var bh3 = b3 >>> 13; - var b4 = b[4] | 0; - var bl4 = b4 & 0x1fff; - var bh4 = b4 >>> 13; - var b5 = b[5] | 0; - var bl5 = b5 & 0x1fff; - var bh5 = b5 >>> 13; - var b6 = b[6] | 0; - var bl6 = b6 & 0x1fff; - var bh6 = b6 >>> 13; - var b7 = b[7] | 0; - var bl7 = b7 & 0x1fff; - var bh7 = b7 >>> 13; - var b8 = b[8] | 0; - var bl8 = b8 & 0x1fff; - var bh8 = b8 >>> 13; - var b9 = b[9] | 0; - var bl9 = b9 & 0x1fff; - var bh9 = b9 >>> 13; - - out.negative = self.negative ^ num.negative; - out.length = 19; - /* k = 0 */ - lo = Math.imul(al0, bl0); - mid = Math.imul(al0, bh0); - mid = (mid + Math.imul(ah0, bl0)) | 0; - hi = Math.imul(ah0, bh0); - var w0 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0; - c = (((hi + (mid >>> 13)) | 0) + (w0 >>> 26)) | 0; - w0 &= 0x3ffffff; - /* k = 1 */ - lo = Math.imul(al1, bl0); - mid = Math.imul(al1, bh0); - mid = (mid + Math.imul(ah1, bl0)) | 0; - hi = Math.imul(ah1, bh0); - lo = (lo + Math.imul(al0, bl1)) | 0; - mid = (mid + Math.imul(al0, bh1)) | 0; - mid = (mid + Math.imul(ah0, bl1)) | 0; - hi = (hi + Math.imul(ah0, bh1)) | 0; - var w1 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0; - c = (((hi + (mid >>> 13)) | 0) + (w1 >>> 26)) | 0; - w1 &= 0x3ffffff; - /* k = 2 */ - lo = Math.imul(al2, bl0); - mid = Math.imul(al2, bh0); - mid = (mid + Math.imul(ah2, bl0)) | 0; - hi = Math.imul(ah2, bh0); - lo = (lo + Math.imul(al1, bl1)) | 0; - mid = (mid + Math.imul(al1, bh1)) | 0; - mid = (mid + Math.imul(ah1, bl1)) | 0; - hi = (hi + Math.imul(ah1, bh1)) | 0; - lo = (lo + Math.imul(al0, bl2)) | 0; - mid = (mid + Math.imul(al0, bh2)) | 0; - mid = (mid + Math.imul(ah0, bl2)) | 0; - hi = (hi + Math.imul(ah0, bh2)) | 0; - var w2 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0; - c = (((hi + (mid >>> 13)) | 0) + (w2 >>> 26)) | 0; - w2 &= 0x3ffffff; - /* k = 3 */ - lo = Math.imul(al3, bl0); - mid = Math.imul(al3, bh0); - mid = (mid + Math.imul(ah3, bl0)) | 0; - hi = Math.imul(ah3, bh0); - lo = (lo + Math.imul(al2, bl1)) | 0; - mid = (mid + Math.imul(al2, bh1)) | 0; - mid = (mid + Math.imul(ah2, bl1)) | 0; - hi = (hi + Math.imul(ah2, bh1)) | 0; - lo = (lo + Math.imul(al1, bl2)) | 0; - mid = (mid + Math.imul(al1, bh2)) | 0; - mid = (mid + Math.imul(ah1, bl2)) | 0; - hi = (hi + Math.imul(ah1, bh2)) | 0; - lo = (lo + Math.imul(al0, bl3)) | 0; - mid = (mid + Math.imul(al0, bh3)) | 0; - mid = (mid + Math.imul(ah0, bl3)) | 0; - hi = (hi + Math.imul(ah0, bh3)) | 0; - var w3 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0; - c = (((hi + (mid >>> 13)) | 0) + (w3 >>> 26)) | 0; - w3 &= 0x3ffffff; - /* k = 4 */ - lo = Math.imul(al4, bl0); - mid = Math.imul(al4, bh0); - mid = (mid + Math.imul(ah4, bl0)) | 0; - hi = Math.imul(ah4, bh0); - lo = (lo + Math.imul(al3, bl1)) | 0; - mid = (mid + Math.imul(al3, bh1)) | 0; - mid = (mid + Math.imul(ah3, bl1)) | 0; - hi = (hi + Math.imul(ah3, bh1)) | 0; - lo = (lo + Math.imul(al2, bl2)) | 0; - mid = (mid + Math.imul(al2, bh2)) | 0; - mid = (mid + Math.imul(ah2, bl2)) | 0; - hi = (hi + Math.imul(ah2, bh2)) | 0; - lo = (lo + Math.imul(al1, bl3)) | 0; - mid = (mid + Math.imul(al1, bh3)) | 0; - mid = (mid + Math.imul(ah1, bl3)) | 0; - hi = (hi + Math.imul(ah1, bh3)) | 0; - lo = (lo + Math.imul(al0, bl4)) | 0; - mid = (mid + Math.imul(al0, bh4)) | 0; - mid = (mid + Math.imul(ah0, bl4)) | 0; - hi = (hi + Math.imul(ah0, bh4)) | 0; - var w4 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0; - c = (((hi + (mid >>> 13)) | 0) + (w4 >>> 26)) | 0; - w4 &= 0x3ffffff; - /* k = 5 */ - lo = Math.imul(al5, bl0); - mid = Math.imul(al5, bh0); - mid = (mid + Math.imul(ah5, bl0)) | 0; - hi = Math.imul(ah5, bh0); - lo = (lo + Math.imul(al4, bl1)) | 0; - mid = (mid + Math.imul(al4, bh1)) | 0; - mid = (mid + Math.imul(ah4, bl1)) | 0; - hi = (hi + Math.imul(ah4, bh1)) | 0; - lo = (lo + Math.imul(al3, bl2)) | 0; - mid = (mid + Math.imul(al3, bh2)) | 0; - mid = (mid + Math.imul(ah3, bl2)) | 0; - hi = (hi + Math.imul(ah3, bh2)) | 0; - lo = (lo + Math.imul(al2, bl3)) | 0; - mid = (mid + Math.imul(al2, bh3)) | 0; - mid = (mid + Math.imul(ah2, bl3)) | 0; - hi = (hi + Math.imul(ah2, bh3)) | 0; - lo = (lo + Math.imul(al1, bl4)) | 0; - mid = (mid + Math.imul(al1, bh4)) | 0; - mid = (mid + Math.imul(ah1, bl4)) | 0; - hi = (hi + Math.imul(ah1, bh4)) | 0; - lo = (lo + Math.imul(al0, bl5)) | 0; - mid = (mid + Math.imul(al0, bh5)) | 0; - mid = (mid + Math.imul(ah0, bl5)) | 0; - hi = (hi + Math.imul(ah0, bh5)) | 0; - var w5 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0; - c = (((hi + (mid >>> 13)) | 0) + (w5 >>> 26)) | 0; - w5 &= 0x3ffffff; - /* k = 6 */ - lo = Math.imul(al6, bl0); - mid = Math.imul(al6, bh0); - mid = (mid + Math.imul(ah6, bl0)) | 0; - hi = Math.imul(ah6, bh0); - lo = (lo + Math.imul(al5, bl1)) | 0; - mid = (mid + Math.imul(al5, bh1)) | 0; - mid = (mid + Math.imul(ah5, bl1)) | 0; - hi = (hi + Math.imul(ah5, bh1)) | 0; - lo = (lo + Math.imul(al4, bl2)) | 0; - mid = (mid + Math.imul(al4, bh2)) | 0; - mid = (mid + Math.imul(ah4, bl2)) | 0; - hi = (hi + Math.imul(ah4, bh2)) | 0; - lo = (lo + Math.imul(al3, bl3)) | 0; - mid = (mid + Math.imul(al3, bh3)) | 0; - mid = (mid + Math.imul(ah3, bl3)) | 0; - hi = (hi + Math.imul(ah3, bh3)) | 0; - lo = (lo + Math.imul(al2, bl4)) | 0; - mid = (mid + Math.imul(al2, bh4)) | 0; - mid = (mid + Math.imul(ah2, bl4)) | 0; - hi = (hi + Math.imul(ah2, bh4)) | 0; - lo = (lo + Math.imul(al1, bl5)) | 0; - mid = (mid + Math.imul(al1, bh5)) | 0; - mid = (mid + Math.imul(ah1, bl5)) | 0; - hi = (hi + Math.imul(ah1, bh5)) | 0; - lo = (lo + Math.imul(al0, bl6)) | 0; - mid = (mid + Math.imul(al0, bh6)) | 0; - mid = (mid + Math.imul(ah0, bl6)) | 0; - hi = (hi + Math.imul(ah0, bh6)) | 0; - var w6 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0; - c = (((hi + (mid >>> 13)) | 0) + (w6 >>> 26)) | 0; - w6 &= 0x3ffffff; - /* k = 7 */ - lo = Math.imul(al7, bl0); - mid = Math.imul(al7, bh0); - mid = (mid + Math.imul(ah7, bl0)) | 0; - hi = Math.imul(ah7, bh0); - lo = (lo + Math.imul(al6, bl1)) | 0; - mid = (mid + Math.imul(al6, bh1)) | 0; - mid = (mid + Math.imul(ah6, bl1)) | 0; - hi = (hi + Math.imul(ah6, bh1)) | 0; - lo = (lo + Math.imul(al5, bl2)) | 0; - mid = (mid + Math.imul(al5, bh2)) | 0; - mid = (mid + Math.imul(ah5, bl2)) | 0; - hi = (hi + Math.imul(ah5, bh2)) | 0; - lo = (lo + Math.imul(al4, bl3)) | 0; - mid = (mid + Math.imul(al4, bh3)) | 0; - mid = (mid + Math.imul(ah4, bl3)) | 0; - hi = (hi + Math.imul(ah4, bh3)) | 0; - lo = (lo + Math.imul(al3, bl4)) | 0; - mid = (mid + Math.imul(al3, bh4)) | 0; - mid = (mid + Math.imul(ah3, bl4)) | 0; - hi = (hi + Math.imul(ah3, bh4)) | 0; - lo = (lo + Math.imul(al2, bl5)) | 0; - mid = (mid + Math.imul(al2, bh5)) | 0; - mid = (mid + Math.imul(ah2, bl5)) | 0; - hi = (hi + Math.imul(ah2, bh5)) | 0; - lo = (lo + Math.imul(al1, bl6)) | 0; - mid = (mid + Math.imul(al1, bh6)) | 0; - mid = (mid + Math.imul(ah1, bl6)) | 0; - hi = (hi + Math.imul(ah1, bh6)) | 0; - lo = (lo + Math.imul(al0, bl7)) | 0; - mid = (mid + Math.imul(al0, bh7)) | 0; - mid = (mid + Math.imul(ah0, bl7)) | 0; - hi = (hi + Math.imul(ah0, bh7)) | 0; - var w7 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0; - c = (((hi + (mid >>> 13)) | 0) + (w7 >>> 26)) | 0; - w7 &= 0x3ffffff; - /* k = 8 */ - lo = Math.imul(al8, bl0); - mid = Math.imul(al8, bh0); - mid = (mid + Math.imul(ah8, bl0)) | 0; - hi = Math.imul(ah8, bh0); - lo = (lo + Math.imul(al7, bl1)) | 0; - mid = (mid + Math.imul(al7, bh1)) | 0; - mid = (mid + Math.imul(ah7, bl1)) | 0; - hi = (hi + Math.imul(ah7, bh1)) | 0; - lo = (lo + Math.imul(al6, bl2)) | 0; - mid = (mid + Math.imul(al6, bh2)) | 0; - mid = (mid + Math.imul(ah6, bl2)) | 0; - hi = (hi + Math.imul(ah6, bh2)) | 0; - lo = (lo + Math.imul(al5, bl3)) | 0; - mid = (mid + Math.imul(al5, bh3)) | 0; - mid = (mid + Math.imul(ah5, bl3)) | 0; - hi = (hi + Math.imul(ah5, bh3)) | 0; - lo = (lo + Math.imul(al4, bl4)) | 0; - mid = (mid + Math.imul(al4, bh4)) | 0; - mid = (mid + Math.imul(ah4, bl4)) | 0; - hi = (hi + Math.imul(ah4, bh4)) | 0; - lo = (lo + Math.imul(al3, bl5)) | 0; - mid = (mid + Math.imul(al3, bh5)) | 0; - mid = (mid + Math.imul(ah3, bl5)) | 0; - hi = (hi + Math.imul(ah3, bh5)) | 0; - lo = (lo + Math.imul(al2, bl6)) | 0; - mid = (mid + Math.imul(al2, bh6)) | 0; - mid = (mid + Math.imul(ah2, bl6)) | 0; - hi = (hi + Math.imul(ah2, bh6)) | 0; - lo = (lo + Math.imul(al1, bl7)) | 0; - mid = (mid + Math.imul(al1, bh7)) | 0; - mid = (mid + Math.imul(ah1, bl7)) | 0; - hi = (hi + Math.imul(ah1, bh7)) | 0; - lo = (lo + Math.imul(al0, bl8)) | 0; - mid = (mid + Math.imul(al0, bh8)) | 0; - mid = (mid + Math.imul(ah0, bl8)) | 0; - hi = (hi + Math.imul(ah0, bh8)) | 0; - var w8 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0; - c = (((hi + (mid >>> 13)) | 0) + (w8 >>> 26)) | 0; - w8 &= 0x3ffffff; - /* k = 9 */ - lo = Math.imul(al9, bl0); - mid = Math.imul(al9, bh0); - mid = (mid + Math.imul(ah9, bl0)) | 0; - hi = Math.imul(ah9, bh0); - lo = (lo + Math.imul(al8, bl1)) | 0; - mid = (mid + Math.imul(al8, bh1)) | 0; - mid = (mid + Math.imul(ah8, bl1)) | 0; - hi = (hi + Math.imul(ah8, bh1)) | 0; - lo = (lo + Math.imul(al7, bl2)) | 0; - mid = (mid + Math.imul(al7, bh2)) | 0; - mid = (mid + Math.imul(ah7, bl2)) | 0; - hi = (hi + Math.imul(ah7, bh2)) | 0; - lo = (lo + Math.imul(al6, bl3)) | 0; - mid = (mid + Math.imul(al6, bh3)) | 0; - mid = (mid + Math.imul(ah6, bl3)) | 0; - hi = (hi + Math.imul(ah6, bh3)) | 0; - lo = (lo + Math.imul(al5, bl4)) | 0; - mid = (mid + Math.imul(al5, bh4)) | 0; - mid = (mid + Math.imul(ah5, bl4)) | 0; - hi = (hi + Math.imul(ah5, bh4)) | 0; - lo = (lo + Math.imul(al4, bl5)) | 0; - mid = (mid + Math.imul(al4, bh5)) | 0; - mid = (mid + Math.imul(ah4, bl5)) | 0; - hi = (hi + Math.imul(ah4, bh5)) | 0; - lo = (lo + Math.imul(al3, bl6)) | 0; - mid = (mid + Math.imul(al3, bh6)) | 0; - mid = (mid + Math.imul(ah3, bl6)) | 0; - hi = (hi + Math.imul(ah3, bh6)) | 0; - lo = (lo + Math.imul(al2, bl7)) | 0; - mid = (mid + Math.imul(al2, bh7)) | 0; - mid = (mid + Math.imul(ah2, bl7)) | 0; - hi = (hi + Math.imul(ah2, bh7)) | 0; - lo = (lo + Math.imul(al1, bl8)) | 0; - mid = (mid + Math.imul(al1, bh8)) | 0; - mid = (mid + Math.imul(ah1, bl8)) | 0; - hi = (hi + Math.imul(ah1, bh8)) | 0; - lo = (lo + Math.imul(al0, bl9)) | 0; - mid = (mid + Math.imul(al0, bh9)) | 0; - mid = (mid + Math.imul(ah0, bl9)) | 0; - hi = (hi + Math.imul(ah0, bh9)) | 0; - var w9 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0; - c = (((hi + (mid >>> 13)) | 0) + (w9 >>> 26)) | 0; - w9 &= 0x3ffffff; - /* k = 10 */ - lo = Math.imul(al9, bl1); - mid = Math.imul(al9, bh1); - mid = (mid + Math.imul(ah9, bl1)) | 0; - hi = Math.imul(ah9, bh1); - lo = (lo + Math.imul(al8, bl2)) | 0; - mid = (mid + Math.imul(al8, bh2)) | 0; - mid = (mid + Math.imul(ah8, bl2)) | 0; - hi = (hi + Math.imul(ah8, bh2)) | 0; - lo = (lo + Math.imul(al7, bl3)) | 0; - mid = (mid + Math.imul(al7, bh3)) | 0; - mid = (mid + Math.imul(ah7, bl3)) | 0; - hi = (hi + Math.imul(ah7, bh3)) | 0; - lo = (lo + Math.imul(al6, bl4)) | 0; - mid = (mid + Math.imul(al6, bh4)) | 0; - mid = (mid + Math.imul(ah6, bl4)) | 0; - hi = (hi + Math.imul(ah6, bh4)) | 0; - lo = (lo + Math.imul(al5, bl5)) | 0; - mid = (mid + Math.imul(al5, bh5)) | 0; - mid = (mid + Math.imul(ah5, bl5)) | 0; - hi = (hi + Math.imul(ah5, bh5)) | 0; - lo = (lo + Math.imul(al4, bl6)) | 0; - mid = (mid + Math.imul(al4, bh6)) | 0; - mid = (mid + Math.imul(ah4, bl6)) | 0; - hi = (hi + Math.imul(ah4, bh6)) | 0; - lo = (lo + Math.imul(al3, bl7)) | 0; - mid = (mid + Math.imul(al3, bh7)) | 0; - mid = (mid + Math.imul(ah3, bl7)) | 0; - hi = (hi + Math.imul(ah3, bh7)) | 0; - lo = (lo + Math.imul(al2, bl8)) | 0; - mid = (mid + Math.imul(al2, bh8)) | 0; - mid = (mid + Math.imul(ah2, bl8)) | 0; - hi = (hi + Math.imul(ah2, bh8)) | 0; - lo = (lo + Math.imul(al1, bl9)) | 0; - mid = (mid + Math.imul(al1, bh9)) | 0; - mid = (mid + Math.imul(ah1, bl9)) | 0; - hi = (hi + Math.imul(ah1, bh9)) | 0; - var w10 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0; - c = (((hi + (mid >>> 13)) | 0) + (w10 >>> 26)) | 0; - w10 &= 0x3ffffff; - /* k = 11 */ - lo = Math.imul(al9, bl2); - mid = Math.imul(al9, bh2); - mid = (mid + Math.imul(ah9, bl2)) | 0; - hi = Math.imul(ah9, bh2); - lo = (lo + Math.imul(al8, bl3)) | 0; - mid = (mid + Math.imul(al8, bh3)) | 0; - mid = (mid + Math.imul(ah8, bl3)) | 0; - hi = (hi + Math.imul(ah8, bh3)) | 0; - lo = (lo + Math.imul(al7, bl4)) | 0; - mid = (mid + Math.imul(al7, bh4)) | 0; - mid = (mid + Math.imul(ah7, bl4)) | 0; - hi = (hi + Math.imul(ah7, bh4)) | 0; - lo = (lo + Math.imul(al6, bl5)) | 0; - mid = (mid + Math.imul(al6, bh5)) | 0; - mid = (mid + Math.imul(ah6, bl5)) | 0; - hi = (hi + Math.imul(ah6, bh5)) | 0; - lo = (lo + Math.imul(al5, bl6)) | 0; - mid = (mid + Math.imul(al5, bh6)) | 0; - mid = (mid + Math.imul(ah5, bl6)) | 0; - hi = (hi + Math.imul(ah5, bh6)) | 0; - lo = (lo + Math.imul(al4, bl7)) | 0; - mid = (mid + Math.imul(al4, bh7)) | 0; - mid = (mid + Math.imul(ah4, bl7)) | 0; - hi = (hi + Math.imul(ah4, bh7)) | 0; - lo = (lo + Math.imul(al3, bl8)) | 0; - mid = (mid + Math.imul(al3, bh8)) | 0; - mid = (mid + Math.imul(ah3, bl8)) | 0; - hi = (hi + Math.imul(ah3, bh8)) | 0; - lo = (lo + Math.imul(al2, bl9)) | 0; - mid = (mid + Math.imul(al2, bh9)) | 0; - mid = (mid + Math.imul(ah2, bl9)) | 0; - hi = (hi + Math.imul(ah2, bh9)) | 0; - var w11 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0; - c = (((hi + (mid >>> 13)) | 0) + (w11 >>> 26)) | 0; - w11 &= 0x3ffffff; - /* k = 12 */ - lo = Math.imul(al9, bl3); - mid = Math.imul(al9, bh3); - mid = (mid + Math.imul(ah9, bl3)) | 0; - hi = Math.imul(ah9, bh3); - lo = (lo + Math.imul(al8, bl4)) | 0; - mid = (mid + Math.imul(al8, bh4)) | 0; - mid = (mid + Math.imul(ah8, bl4)) | 0; - hi = (hi + Math.imul(ah8, bh4)) | 0; - lo = (lo + Math.imul(al7, bl5)) | 0; - mid = (mid + Math.imul(al7, bh5)) | 0; - mid = (mid + Math.imul(ah7, bl5)) | 0; - hi = (hi + Math.imul(ah7, bh5)) | 0; - lo = (lo + Math.imul(al6, bl6)) | 0; - mid = (mid + Math.imul(al6, bh6)) | 0; - mid = (mid + Math.imul(ah6, bl6)) | 0; - hi = (hi + Math.imul(ah6, bh6)) | 0; - lo = (lo + Math.imul(al5, bl7)) | 0; - mid = (mid + Math.imul(al5, bh7)) | 0; - mid = (mid + Math.imul(ah5, bl7)) | 0; - hi = (hi + Math.imul(ah5, bh7)) | 0; - lo = (lo + Math.imul(al4, bl8)) | 0; - mid = (mid + Math.imul(al4, bh8)) | 0; - mid = (mid + Math.imul(ah4, bl8)) | 0; - hi = (hi + Math.imul(ah4, bh8)) | 0; - lo = (lo + Math.imul(al3, bl9)) | 0; - mid = (mid + Math.imul(al3, bh9)) | 0; - mid = (mid + Math.imul(ah3, bl9)) | 0; - hi = (hi + Math.imul(ah3, bh9)) | 0; - var w12 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0; - c = (((hi + (mid >>> 13)) | 0) + (w12 >>> 26)) | 0; - w12 &= 0x3ffffff; - /* k = 13 */ - lo = Math.imul(al9, bl4); - mid = Math.imul(al9, bh4); - mid = (mid + Math.imul(ah9, bl4)) | 0; - hi = Math.imul(ah9, bh4); - lo = (lo + Math.imul(al8, bl5)) | 0; - mid = (mid + Math.imul(al8, bh5)) | 0; - mid = (mid + Math.imul(ah8, bl5)) | 0; - hi = (hi + Math.imul(ah8, bh5)) | 0; - lo = (lo + Math.imul(al7, bl6)) | 0; - mid = (mid + Math.imul(al7, bh6)) | 0; - mid = (mid + Math.imul(ah7, bl6)) | 0; - hi = (hi + Math.imul(ah7, bh6)) | 0; - lo = (lo + Math.imul(al6, bl7)) | 0; - mid = (mid + Math.imul(al6, bh7)) | 0; - mid = (mid + Math.imul(ah6, bl7)) | 0; - hi = (hi + Math.imul(ah6, bh7)) | 0; - lo = (lo + Math.imul(al5, bl8)) | 0; - mid = (mid + Math.imul(al5, bh8)) | 0; - mid = (mid + Math.imul(ah5, bl8)) | 0; - hi = (hi + Math.imul(ah5, bh8)) | 0; - lo = (lo + Math.imul(al4, bl9)) | 0; - mid = (mid + Math.imul(al4, bh9)) | 0; - mid = (mid + Math.imul(ah4, bl9)) | 0; - hi = (hi + Math.imul(ah4, bh9)) | 0; - var w13 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0; - c = (((hi + (mid >>> 13)) | 0) + (w13 >>> 26)) | 0; - w13 &= 0x3ffffff; - /* k = 14 */ - lo = Math.imul(al9, bl5); - mid = Math.imul(al9, bh5); - mid = (mid + Math.imul(ah9, bl5)) | 0; - hi = Math.imul(ah9, bh5); - lo = (lo + Math.imul(al8, bl6)) | 0; - mid = (mid + Math.imul(al8, bh6)) | 0; - mid = (mid + Math.imul(ah8, bl6)) | 0; - hi = (hi + Math.imul(ah8, bh6)) | 0; - lo = (lo + Math.imul(al7, bl7)) | 0; - mid = (mid + Math.imul(al7, bh7)) | 0; - mid = (mid + Math.imul(ah7, bl7)) | 0; - hi = (hi + Math.imul(ah7, bh7)) | 0; - lo = (lo + Math.imul(al6, bl8)) | 0; - mid = (mid + Math.imul(al6, bh8)) | 0; - mid = (mid + Math.imul(ah6, bl8)) | 0; - hi = (hi + Math.imul(ah6, bh8)) | 0; - lo = (lo + Math.imul(al5, bl9)) | 0; - mid = (mid + Math.imul(al5, bh9)) | 0; - mid = (mid + Math.imul(ah5, bl9)) | 0; - hi = (hi + Math.imul(ah5, bh9)) | 0; - var w14 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0; - c = (((hi + (mid >>> 13)) | 0) + (w14 >>> 26)) | 0; - w14 &= 0x3ffffff; - /* k = 15 */ - lo = Math.imul(al9, bl6); - mid = Math.imul(al9, bh6); - mid = (mid + Math.imul(ah9, bl6)) | 0; - hi = Math.imul(ah9, bh6); - lo = (lo + Math.imul(al8, bl7)) | 0; - mid = (mid + Math.imul(al8, bh7)) | 0; - mid = (mid + Math.imul(ah8, bl7)) | 0; - hi = (hi + Math.imul(ah8, bh7)) | 0; - lo = (lo + Math.imul(al7, bl8)) | 0; - mid = (mid + Math.imul(al7, bh8)) | 0; - mid = (mid + Math.imul(ah7, bl8)) | 0; - hi = (hi + Math.imul(ah7, bh8)) | 0; - lo = (lo + Math.imul(al6, bl9)) | 0; - mid = (mid + Math.imul(al6, bh9)) | 0; - mid = (mid + Math.imul(ah6, bl9)) | 0; - hi = (hi + Math.imul(ah6, bh9)) | 0; - var w15 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0; - c = (((hi + (mid >>> 13)) | 0) + (w15 >>> 26)) | 0; - w15 &= 0x3ffffff; - /* k = 16 */ - lo = Math.imul(al9, bl7); - mid = Math.imul(al9, bh7); - mid = (mid + Math.imul(ah9, bl7)) | 0; - hi = Math.imul(ah9, bh7); - lo = (lo + Math.imul(al8, bl8)) | 0; - mid = (mid + Math.imul(al8, bh8)) | 0; - mid = (mid + Math.imul(ah8, bl8)) | 0; - hi = (hi + Math.imul(ah8, bh8)) | 0; - lo = (lo + Math.imul(al7, bl9)) | 0; - mid = (mid + Math.imul(al7, bh9)) | 0; - mid = (mid + Math.imul(ah7, bl9)) | 0; - hi = (hi + Math.imul(ah7, bh9)) | 0; - var w16 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0; - c = (((hi + (mid >>> 13)) | 0) + (w16 >>> 26)) | 0; - w16 &= 0x3ffffff; - /* k = 17 */ - lo = Math.imul(al9, bl8); - mid = Math.imul(al9, bh8); - mid = (mid + Math.imul(ah9, bl8)) | 0; - hi = Math.imul(ah9, bh8); - lo = (lo + Math.imul(al8, bl9)) | 0; - mid = (mid + Math.imul(al8, bh9)) | 0; - mid = (mid + Math.imul(ah8, bl9)) | 0; - hi = (hi + Math.imul(ah8, bh9)) | 0; - var w17 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0; - c = (((hi + (mid >>> 13)) | 0) + (w17 >>> 26)) | 0; - w17 &= 0x3ffffff; - /* k = 18 */ - lo = Math.imul(al9, bl9); - mid = Math.imul(al9, bh9); - mid = (mid + Math.imul(ah9, bl9)) | 0; - hi = Math.imul(ah9, bh9); - var w18 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0; - c = (((hi + (mid >>> 13)) | 0) + (w18 >>> 26)) | 0; - w18 &= 0x3ffffff; - o[0] = w0; - o[1] = w1; - o[2] = w2; - o[3] = w3; - o[4] = w4; - o[5] = w5; - o[6] = w6; - o[7] = w7; - o[8] = w8; - o[9] = w9; - o[10] = w10; - o[11] = w11; - o[12] = w12; - o[13] = w13; - o[14] = w14; - o[15] = w15; - o[16] = w16; - o[17] = w17; - o[18] = w18; - if (c !== 0) { - o[19] = c; - out.length++; - } - return out; - }; - - // Polyfill comb - if (!Math.imul) { - comb10MulTo = smallMulTo; - } - - function bigMulTo (self, num, out) { - out.negative = num.negative ^ self.negative; - out.length = self.length + num.length; - - var carry = 0; - var hncarry = 0; - for (var k = 0; k < out.length - 1; k++) { - // Sum all words with the same `i + j = k` and accumulate `ncarry`, - // note that ncarry could be >= 0x3ffffff - var ncarry = hncarry; - hncarry = 0; - var rword = carry & 0x3ffffff; - var maxJ = Math.min(k, num.length - 1); - for (var j = Math.max(0, k - self.length + 1); j <= maxJ; j++) { - var i = k - j; - var a = self.words[i] | 0; - var b = num.words[j] | 0; - var r = a * b; - - var lo = r & 0x3ffffff; - ncarry = (ncarry + ((r / 0x4000000) | 0)) | 0; - lo = (lo + rword) | 0; - rword = lo & 0x3ffffff; - ncarry = (ncarry + (lo >>> 26)) | 0; - - hncarry += ncarry >>> 26; - ncarry &= 0x3ffffff; - } - out.words[k] = rword; - carry = ncarry; - ncarry = hncarry; - } - if (carry !== 0) { - out.words[k] = carry; - } else { - out.length--; - } - - return out.strip(); - } - - function jumboMulTo (self, num, out) { - var fftm = new FFTM(); - return fftm.mulp(self, num, out); - } - - BN.prototype.mulTo = function mulTo (num, out) { - var res; - var len = this.length + num.length; - if (this.length === 10 && num.length === 10) { - res = comb10MulTo(this, num, out); - } else if (len < 63) { - res = smallMulTo(this, num, out); - } else if (len < 1024) { - res = bigMulTo(this, num, out); - } else { - res = jumboMulTo(this, num, out); - } - - return res; - }; - - // Cooley-Tukey algorithm for FFT - // slightly revisited to rely on looping instead of recursion - - function FFTM (x, y) { - this.x = x; - this.y = y; - } - - FFTM.prototype.makeRBT = function makeRBT (N) { - var t = new Array(N); - var l = BN.prototype._countBits(N) - 1; - for (var i = 0; i < N; i++) { - t[i] = this.revBin(i, l, N); - } - - return t; - }; - - // Returns binary-reversed representation of `x` - FFTM.prototype.revBin = function revBin (x, l, N) { - if (x === 0 || x === N - 1) return x; - - var rb = 0; - for (var i = 0; i < l; i++) { - rb |= (x & 1) << (l - i - 1); - x >>= 1; - } - - return rb; - }; - - // Performs "tweedling" phase, therefore 'emulating' - // behaviour of the recursive algorithm - FFTM.prototype.permute = function permute (rbt, rws, iws, rtws, itws, N) { - for (var i = 0; i < N; i++) { - rtws[i] = rws[rbt[i]]; - itws[i] = iws[rbt[i]]; - } - }; - - FFTM.prototype.transform = function transform (rws, iws, rtws, itws, N, rbt) { - this.permute(rbt, rws, iws, rtws, itws, N); - - for (var s = 1; s < N; s <<= 1) { - var l = s << 1; - - var rtwdf = Math.cos(2 * Math.PI / l); - var itwdf = Math.sin(2 * Math.PI / l); - - for (var p = 0; p < N; p += l) { - var rtwdf_ = rtwdf; - var itwdf_ = itwdf; - - for (var j = 0; j < s; j++) { - var re = rtws[p + j]; - var ie = itws[p + j]; - - var ro = rtws[p + j + s]; - var io = itws[p + j + s]; - - var rx = rtwdf_ * ro - itwdf_ * io; - - io = rtwdf_ * io + itwdf_ * ro; - ro = rx; - - rtws[p + j] = re + ro; - itws[p + j] = ie + io; - - rtws[p + j + s] = re - ro; - itws[p + j + s] = ie - io; - - /* jshint maxdepth : false */ - if (j !== l) { - rx = rtwdf * rtwdf_ - itwdf * itwdf_; - - itwdf_ = rtwdf * itwdf_ + itwdf * rtwdf_; - rtwdf_ = rx; - } - } - } - } - }; - - FFTM.prototype.guessLen13b = function guessLen13b (n, m) { - var N = Math.max(m, n) | 1; - var odd = N & 1; - var i = 0; - for (N = N / 2 | 0; N; N = N >>> 1) { - i++; - } - - return 1 << i + 1 + odd; - }; - - FFTM.prototype.conjugate = function conjugate (rws, iws, N) { - if (N <= 1) return; - - for (var i = 0; i < N / 2; i++) { - var t = rws[i]; - - rws[i] = rws[N - i - 1]; - rws[N - i - 1] = t; - - t = iws[i]; - - iws[i] = -iws[N - i - 1]; - iws[N - i - 1] = -t; - } - }; - - FFTM.prototype.normalize13b = function normalize13b (ws, N) { - var carry = 0; - for (var i = 0; i < N / 2; i++) { - var w = Math.round(ws[2 * i + 1] / N) * 0x2000 + - Math.round(ws[2 * i] / N) + - carry; - - ws[i] = w & 0x3ffffff; - - if (w < 0x4000000) { - carry = 0; - } else { - carry = w / 0x4000000 | 0; - } - } - - return ws; - }; - - FFTM.prototype.convert13b = function convert13b (ws, len, rws, N) { - var carry = 0; - for (var i = 0; i < len; i++) { - carry = carry + (ws[i] | 0); - - rws[2 * i] = carry & 0x1fff; carry = carry >>> 13; - rws[2 * i + 1] = carry & 0x1fff; carry = carry >>> 13; - } - - // Pad with zeroes - for (i = 2 * len; i < N; ++i) { - rws[i] = 0; - } - - assert(carry === 0); - assert((carry & ~0x1fff) === 0); - }; - - FFTM.prototype.stub = function stub (N) { - var ph = new Array(N); - for (var i = 0; i < N; i++) { - ph[i] = 0; - } - - return ph; - }; - - FFTM.prototype.mulp = function mulp (x, y, out) { - var N = 2 * this.guessLen13b(x.length, y.length); - - var rbt = this.makeRBT(N); - - var _ = this.stub(N); - - var rws = new Array(N); - var rwst = new Array(N); - var iwst = new Array(N); - - var nrws = new Array(N); - var nrwst = new Array(N); - var niwst = new Array(N); - - var rmws = out.words; - rmws.length = N; - - this.convert13b(x.words, x.length, rws, N); - this.convert13b(y.words, y.length, nrws, N); - - this.transform(rws, _, rwst, iwst, N, rbt); - this.transform(nrws, _, nrwst, niwst, N, rbt); - - for (var i = 0; i < N; i++) { - var rx = rwst[i] * nrwst[i] - iwst[i] * niwst[i]; - iwst[i] = rwst[i] * niwst[i] + iwst[i] * nrwst[i]; - rwst[i] = rx; - } - - this.conjugate(rwst, iwst, N); - this.transform(rwst, iwst, rmws, _, N, rbt); - this.conjugate(rmws, _, N); - this.normalize13b(rmws, N); - - out.negative = x.negative ^ y.negative; - out.length = x.length + y.length; - return out.strip(); - }; - - // Multiply `this` by `num` - BN.prototype.mul = function mul (num) { - var out = new BN(null); - out.words = new Array(this.length + num.length); - return this.mulTo(num, out); - }; - - // Multiply employing FFT - BN.prototype.mulf = function mulf (num) { - var out = new BN(null); - out.words = new Array(this.length + num.length); - return jumboMulTo(this, num, out); - }; - - // In-place Multiplication - BN.prototype.imul = function imul (num) { - return this.clone().mulTo(num, this); - }; - - BN.prototype.imuln = function imuln (num) { - assert(typeof num === 'number'); - assert(num < 0x4000000); - - // Carry - var carry = 0; - for (var i = 0; i < this.length; i++) { - var w = (this.words[i] | 0) * num; - var lo = (w & 0x3ffffff) + (carry & 0x3ffffff); - carry >>= 26; - carry += (w / 0x4000000) | 0; - // NOTE: lo is 27bit maximum - carry += lo >>> 26; - this.words[i] = lo & 0x3ffffff; - } - - if (carry !== 0) { - this.words[i] = carry; - this.length++; - } - - return this; - }; - - BN.prototype.muln = function muln (num) { - return this.clone().imuln(num); - }; - - // `this` * `this` - BN.prototype.sqr = function sqr () { - return this.mul(this); - }; - - // `this` * `this` in-place - BN.prototype.isqr = function isqr () { - return this.imul(this.clone()); - }; - - // Math.pow(`this`, `num`) - BN.prototype.pow = function pow (num) { - var w = toBitArray(num); - if (w.length === 0) return new BN(1); - - // Skip leading zeroes - var res = this; - for (var i = 0; i < w.length; i++, res = res.sqr()) { - if (w[i] !== 0) break; - } - - if (++i < w.length) { - for (var q = res.sqr(); i < w.length; i++, q = q.sqr()) { - if (w[i] === 0) continue; - - res = res.mul(q); - } - } - - return res; - }; - - // Shift-left in-place - BN.prototype.iushln = function iushln (bits) { - assert(typeof bits === 'number' && bits >= 0); - var r = bits % 26; - var s = (bits - r) / 26; - var carryMask = (0x3ffffff >>> (26 - r)) << (26 - r); - var i; - - if (r !== 0) { - var carry = 0; - - for (i = 0; i < this.length; i++) { - var newCarry = this.words[i] & carryMask; - var c = ((this.words[i] | 0) - newCarry) << r; - this.words[i] = c | carry; - carry = newCarry >>> (26 - r); - } - - if (carry) { - this.words[i] = carry; - this.length++; - } - } - - if (s !== 0) { - for (i = this.length - 1; i >= 0; i--) { - this.words[i + s] = this.words[i]; - } - - for (i = 0; i < s; i++) { - this.words[i] = 0; - } - - this.length += s; - } - - return this.strip(); - }; - - BN.prototype.ishln = function ishln (bits) { - // TODO(indutny): implement me - assert(this.negative === 0); - return this.iushln(bits); - }; - - // Shift-right in-place - // NOTE: `hint` is a lowest bit before trailing zeroes - // NOTE: if `extended` is present - it will be filled with destroyed bits - BN.prototype.iushrn = function iushrn (bits, hint, extended) { - assert(typeof bits === 'number' && bits >= 0); - var h; - if (hint) { - h = (hint - (hint % 26)) / 26; - } else { - h = 0; - } - - var r = bits % 26; - var s = Math.min((bits - r) / 26, this.length); - var mask = 0x3ffffff ^ ((0x3ffffff >>> r) << r); - var maskedWords = extended; - - h -= s; - h = Math.max(0, h); - - // Extended mode, copy masked part - if (maskedWords) { - for (var i = 0; i < s; i++) { - maskedWords.words[i] = this.words[i]; - } - maskedWords.length = s; - } - - if (s === 0) { - // No-op, we should not move anything at all - } else if (this.length > s) { - this.length -= s; - for (i = 0; i < this.length; i++) { - this.words[i] = this.words[i + s]; - } - } else { - this.words[0] = 0; - this.length = 1; - } - - var carry = 0; - for (i = this.length - 1; i >= 0 && (carry !== 0 || i >= h); i--) { - var word = this.words[i] | 0; - this.words[i] = (carry << (26 - r)) | (word >>> r); - carry = word & mask; - } - - // Push carried bits as a mask - if (maskedWords && carry !== 0) { - maskedWords.words[maskedWords.length++] = carry; - } - - if (this.length === 0) { - this.words[0] = 0; - this.length = 1; - } - - return this.strip(); - }; - - BN.prototype.ishrn = function ishrn (bits, hint, extended) { - // TODO(indutny): implement me - assert(this.negative === 0); - return this.iushrn(bits, hint, extended); - }; - - // Shift-left - BN.prototype.shln = function shln (bits) { - return this.clone().ishln(bits); - }; - - BN.prototype.ushln = function ushln (bits) { - return this.clone().iushln(bits); - }; - - // Shift-right - BN.prototype.shrn = function shrn (bits) { - return this.clone().ishrn(bits); - }; - - BN.prototype.ushrn = function ushrn (bits) { - return this.clone().iushrn(bits); - }; - - // Test if n bit is set - BN.prototype.testn = function testn (bit) { - assert(typeof bit === 'number' && bit >= 0); - var r = bit % 26; - var s = (bit - r) / 26; - var q = 1 << r; - - // Fast case: bit is much higher than all existing words - if (this.length <= s) return false; - - // Check bit and return - var w = this.words[s]; - - return !!(w & q); - }; - - // Return only lowers bits of number (in-place) - BN.prototype.imaskn = function imaskn (bits) { - assert(typeof bits === 'number' && bits >= 0); - var r = bits % 26; - var s = (bits - r) / 26; - - assert(this.negative === 0, 'imaskn works only with positive numbers'); - - if (this.length <= s) { - return this; - } - - if (r !== 0) { - s++; - } - this.length = Math.min(s, this.length); - - if (r !== 0) { - var mask = 0x3ffffff ^ ((0x3ffffff >>> r) << r); - this.words[this.length - 1] &= mask; - } - - return this.strip(); - }; - - // Return only lowers bits of number - BN.prototype.maskn = function maskn (bits) { - return this.clone().imaskn(bits); - }; - - // Add plain number `num` to `this` - BN.prototype.iaddn = function iaddn (num) { - assert(typeof num === 'number'); - assert(num < 0x4000000); - if (num < 0) return this.isubn(-num); - - // Possible sign change - if (this.negative !== 0) { - if (this.length === 1 && (this.words[0] | 0) < num) { - this.words[0] = num - (this.words[0] | 0); - this.negative = 0; - return this; - } - - this.negative = 0; - this.isubn(num); - this.negative = 1; - return this; - } - - // Add without checks - return this._iaddn(num); - }; - - BN.prototype._iaddn = function _iaddn (num) { - this.words[0] += num; - - // Carry - for (var i = 0; i < this.length && this.words[i] >= 0x4000000; i++) { - this.words[i] -= 0x4000000; - if (i === this.length - 1) { - this.words[i + 1] = 1; - } else { - this.words[i + 1]++; - } - } - this.length = Math.max(this.length, i + 1); - - return this; - }; - - // Subtract plain number `num` from `this` - BN.prototype.isubn = function isubn (num) { - assert(typeof num === 'number'); - assert(num < 0x4000000); - if (num < 0) return this.iaddn(-num); - - if (this.negative !== 0) { - this.negative = 0; - this.iaddn(num); - this.negative = 1; - return this; - } - - this.words[0] -= num; - - if (this.length === 1 && this.words[0] < 0) { - this.words[0] = -this.words[0]; - this.negative = 1; - } else { - // Carry - for (var i = 0; i < this.length && this.words[i] < 0; i++) { - this.words[i] += 0x4000000; - this.words[i + 1] -= 1; - } - } - - return this.strip(); - }; - - BN.prototype.addn = function addn (num) { - return this.clone().iaddn(num); - }; - - BN.prototype.subn = function subn (num) { - return this.clone().isubn(num); - }; - - BN.prototype.iabs = function iabs () { - this.negative = 0; - - return this; - }; - - BN.prototype.abs = function abs () { - return this.clone().iabs(); - }; - - BN.prototype._ishlnsubmul = function _ishlnsubmul (num, mul, shift) { - var len = num.length + shift; - var i; - - this._expand(len); - - var w; - var carry = 0; - for (i = 0; i < num.length; i++) { - w = (this.words[i + shift] | 0) + carry; - var right = (num.words[i] | 0) * mul; - w -= right & 0x3ffffff; - carry = (w >> 26) - ((right / 0x4000000) | 0); - this.words[i + shift] = w & 0x3ffffff; - } - for (; i < this.length - shift; i++) { - w = (this.words[i + shift] | 0) + carry; - carry = w >> 26; - this.words[i + shift] = w & 0x3ffffff; - } - - if (carry === 0) return this.strip(); - - // Subtraction overflow - assert(carry === -1); - carry = 0; - for (i = 0; i < this.length; i++) { - w = -(this.words[i] | 0) + carry; - carry = w >> 26; - this.words[i] = w & 0x3ffffff; - } - this.negative = 1; - - return this.strip(); - }; - - BN.prototype._wordDiv = function _wordDiv (num, mode) { - var shift = this.length - num.length; - - var a = this.clone(); - var b = num; - - // Normalize - var bhi = b.words[b.length - 1] | 0; - var bhiBits = this._countBits(bhi); - shift = 26 - bhiBits; - if (shift !== 0) { - b = b.ushln(shift); - a.iushln(shift); - bhi = b.words[b.length - 1] | 0; - } - - // Initialize quotient - var m = a.length - b.length; - var q; - - if (mode !== 'mod') { - q = new BN(null); - q.length = m + 1; - q.words = new Array(q.length); - for (var i = 0; i < q.length; i++) { - q.words[i] = 0; - } - } - - var diff = a.clone()._ishlnsubmul(b, 1, m); - if (diff.negative === 0) { - a = diff; - if (q) { - q.words[m] = 1; - } - } - - for (var j = m - 1; j >= 0; j--) { - var qj = (a.words[b.length + j] | 0) * 0x4000000 + - (a.words[b.length + j - 1] | 0); - - // NOTE: (qj / bhi) is (0x3ffffff * 0x4000000 + 0x3ffffff) / 0x2000000 max - // (0x7ffffff) - qj = Math.min((qj / bhi) | 0, 0x3ffffff); - - a._ishlnsubmul(b, qj, j); - while (a.negative !== 0) { - qj--; - a.negative = 0; - a._ishlnsubmul(b, 1, j); - if (!a.isZero()) { - a.negative ^= 1; - } - } - if (q) { - q.words[j] = qj; - } - } - if (q) { - q.strip(); - } - a.strip(); - - // Denormalize - if (mode !== 'div' && shift !== 0) { - a.iushrn(shift); - } - - return { - div: q || null, - mod: a - }; - }; - - // NOTE: 1) `mode` can be set to `mod` to request mod only, - // to `div` to request div only, or be absent to - // request both div & mod - // 2) `positive` is true if unsigned mod is requested - BN.prototype.divmod = function divmod (num, mode, positive) { - assert(!num.isZero()); - - if (this.isZero()) { - return { - div: new BN(0), - mod: new BN(0) - }; - } - - var div, mod, res; - if (this.negative !== 0 && num.negative === 0) { - res = this.neg().divmod(num, mode); - - if (mode !== 'mod') { - div = res.div.neg(); - } - - if (mode !== 'div') { - mod = res.mod.neg(); - if (positive && mod.negative !== 0) { - mod.iadd(num); - } - } - - return { - div: div, - mod: mod - }; - } - - if (this.negative === 0 && num.negative !== 0) { - res = this.divmod(num.neg(), mode); - - if (mode !== 'mod') { - div = res.div.neg(); - } - - return { - div: div, - mod: res.mod - }; - } - - if ((this.negative & num.negative) !== 0) { - res = this.neg().divmod(num.neg(), mode); - - if (mode !== 'div') { - mod = res.mod.neg(); - if (positive && mod.negative !== 0) { - mod.isub(num); - } - } - - return { - div: res.div, - mod: mod - }; - } - - // Both numbers are positive at this point - - // Strip both numbers to approximate shift value - if (num.length > this.length || this.cmp(num) < 0) { - return { - div: new BN(0), - mod: this - }; - } - - // Very short reduction - if (num.length === 1) { - if (mode === 'div') { - return { - div: this.divn(num.words[0]), - mod: null - }; - } - - if (mode === 'mod') { - return { - div: null, - mod: new BN(this.modn(num.words[0])) - }; - } - - return { - div: this.divn(num.words[0]), - mod: new BN(this.modn(num.words[0])) - }; - } - - return this._wordDiv(num, mode); - }; - - // Find `this` / `num` - BN.prototype.div = function div (num) { - return this.divmod(num, 'div', false).div; - }; - - // Find `this` % `num` - BN.prototype.mod = function mod (num) { - return this.divmod(num, 'mod', false).mod; - }; - - BN.prototype.umod = function umod (num) { - return this.divmod(num, 'mod', true).mod; - }; - - // Find Round(`this` / `num`) - BN.prototype.divRound = function divRound (num) { - var dm = this.divmod(num); - - // Fast case - exact division - if (dm.mod.isZero()) return dm.div; - - var mod = dm.div.negative !== 0 ? dm.mod.isub(num) : dm.mod; - - var half = num.ushrn(1); - var r2 = num.andln(1); - var cmp = mod.cmp(half); - - // Round down - if (cmp < 0 || r2 === 1 && cmp === 0) return dm.div; - - // Round up - return dm.div.negative !== 0 ? dm.div.isubn(1) : dm.div.iaddn(1); - }; - - BN.prototype.modn = function modn (num) { - assert(num <= 0x3ffffff); - var p = (1 << 26) % num; - - var acc = 0; - for (var i = this.length - 1; i >= 0; i--) { - acc = (p * acc + (this.words[i] | 0)) % num; - } - - return acc; - }; - - // In-place division by number - BN.prototype.idivn = function idivn (num) { - assert(num <= 0x3ffffff); - - var carry = 0; - for (var i = this.length - 1; i >= 0; i--) { - var w = (this.words[i] | 0) + carry * 0x4000000; - this.words[i] = (w / num) | 0; - carry = w % num; - } - - return this.strip(); - }; - - BN.prototype.divn = function divn (num) { - return this.clone().idivn(num); - }; - - BN.prototype.egcd = function egcd (p) { - assert(p.negative === 0); - assert(!p.isZero()); - - var x = this; - var y = p.clone(); - - if (x.negative !== 0) { - x = x.umod(p); - } else { - x = x.clone(); - } - - // A * x + B * y = x - var A = new BN(1); - var B = new BN(0); - - // C * x + D * y = y - var C = new BN(0); - var D = new BN(1); - - var g = 0; - - while (x.isEven() && y.isEven()) { - x.iushrn(1); - y.iushrn(1); - ++g; - } - - var yp = y.clone(); - var xp = x.clone(); - - while (!x.isZero()) { - for (var i = 0, im = 1; (x.words[0] & im) === 0 && i < 26; ++i, im <<= 1); - if (i > 0) { - x.iushrn(i); - while (i-- > 0) { - if (A.isOdd() || B.isOdd()) { - A.iadd(yp); - B.isub(xp); - } - - A.iushrn(1); - B.iushrn(1); - } - } - - for (var j = 0, jm = 1; (y.words[0] & jm) === 0 && j < 26; ++j, jm <<= 1); - if (j > 0) { - y.iushrn(j); - while (j-- > 0) { - if (C.isOdd() || D.isOdd()) { - C.iadd(yp); - D.isub(xp); - } - - C.iushrn(1); - D.iushrn(1); - } - } - - if (x.cmp(y) >= 0) { - x.isub(y); - A.isub(C); - B.isub(D); - } else { - y.isub(x); - C.isub(A); - D.isub(B); - } - } - - return { - a: C, - b: D, - gcd: y.iushln(g) - }; - }; - - // This is reduced incarnation of the binary EEA - // above, designated to invert members of the - // _prime_ fields F(p) at a maximal speed - BN.prototype._invmp = function _invmp (p) { - assert(p.negative === 0); - assert(!p.isZero()); - - var a = this; - var b = p.clone(); - - if (a.negative !== 0) { - a = a.umod(p); - } else { - a = a.clone(); - } - - var x1 = new BN(1); - var x2 = new BN(0); - - var delta = b.clone(); - - while (a.cmpn(1) > 0 && b.cmpn(1) > 0) { - for (var i = 0, im = 1; (a.words[0] & im) === 0 && i < 26; ++i, im <<= 1); - if (i > 0) { - a.iushrn(i); - while (i-- > 0) { - if (x1.isOdd()) { - x1.iadd(delta); - } - - x1.iushrn(1); - } - } - - for (var j = 0, jm = 1; (b.words[0] & jm) === 0 && j < 26; ++j, jm <<= 1); - if (j > 0) { - b.iushrn(j); - while (j-- > 0) { - if (x2.isOdd()) { - x2.iadd(delta); - } - - x2.iushrn(1); - } - } - - if (a.cmp(b) >= 0) { - a.isub(b); - x1.isub(x2); - } else { - b.isub(a); - x2.isub(x1); - } - } - - var res; - if (a.cmpn(1) === 0) { - res = x1; - } else { - res = x2; - } - - if (res.cmpn(0) < 0) { - res.iadd(p); - } - - return res; - }; - - BN.prototype.gcd = function gcd (num) { - if (this.isZero()) return num.abs(); - if (num.isZero()) return this.abs(); - - var a = this.clone(); - var b = num.clone(); - a.negative = 0; - b.negative = 0; - - // Remove common factor of two - for (var shift = 0; a.isEven() && b.isEven(); shift++) { - a.iushrn(1); - b.iushrn(1); - } - - do { - while (a.isEven()) { - a.iushrn(1); - } - while (b.isEven()) { - b.iushrn(1); - } - - var r = a.cmp(b); - if (r < 0) { - // Swap `a` and `b` to make `a` always bigger than `b` - var t = a; - a = b; - b = t; - } else if (r === 0 || b.cmpn(1) === 0) { - break; - } - - a.isub(b); - } while (true); - - return b.iushln(shift); - }; - - // Invert number in the field F(num) - BN.prototype.invm = function invm (num) { - return this.egcd(num).a.umod(num); - }; - - BN.prototype.isEven = function isEven () { - return (this.words[0] & 1) === 0; - }; - - BN.prototype.isOdd = function isOdd () { - return (this.words[0] & 1) === 1; - }; - - // And first word and num - BN.prototype.andln = function andln (num) { - return this.words[0] & num; - }; - - // Increment at the bit position in-line - BN.prototype.bincn = function bincn (bit) { - assert(typeof bit === 'number'); - var r = bit % 26; - var s = (bit - r) / 26; - var q = 1 << r; - - // Fast case: bit is much higher than all existing words - if (this.length <= s) { - this._expand(s + 1); - this.words[s] |= q; - return this; - } - - // Add bit and propagate, if needed - var carry = q; - for (var i = s; carry !== 0 && i < this.length; i++) { - var w = this.words[i] | 0; - w += carry; - carry = w >>> 26; - w &= 0x3ffffff; - this.words[i] = w; - } - if (carry !== 0) { - this.words[i] = carry; - this.length++; - } - return this; - }; - - BN.prototype.isZero = function isZero () { - return this.length === 1 && this.words[0] === 0; - }; - - BN.prototype.cmpn = function cmpn (num) { - var negative = num < 0; - - if (this.negative !== 0 && !negative) return -1; - if (this.negative === 0 && negative) return 1; - - this.strip(); - - var res; - if (this.length > 1) { - res = 1; - } else { - if (negative) { - num = -num; - } - - assert(num <= 0x3ffffff, 'Number is too big'); - - var w = this.words[0] | 0; - res = w === num ? 0 : w < num ? -1 : 1; - } - if (this.negative !== 0) return -res | 0; - return res; - }; - - // Compare two numbers and return: - // 1 - if `this` > `num` - // 0 - if `this` == `num` - // -1 - if `this` < `num` - BN.prototype.cmp = function cmp (num) { - if (this.negative !== 0 && num.negative === 0) return -1; - if (this.negative === 0 && num.negative !== 0) return 1; - - var res = this.ucmp(num); - if (this.negative !== 0) return -res | 0; - return res; - }; - - // Unsigned comparison - BN.prototype.ucmp = function ucmp (num) { - // At this point both numbers have the same sign - if (this.length > num.length) return 1; - if (this.length < num.length) return -1; - - var res = 0; - for (var i = this.length - 1; i >= 0; i--) { - var a = this.words[i] | 0; - var b = num.words[i] | 0; - - if (a === b) continue; - if (a < b) { - res = -1; - } else if (a > b) { - res = 1; - } - break; - } - return res; - }; - - BN.prototype.gtn = function gtn (num) { - return this.cmpn(num) === 1; - }; - - BN.prototype.gt = function gt (num) { - return this.cmp(num) === 1; - }; - - BN.prototype.gten = function gten (num) { - return this.cmpn(num) >= 0; - }; - - BN.prototype.gte = function gte (num) { - return this.cmp(num) >= 0; - }; - - BN.prototype.ltn = function ltn (num) { - return this.cmpn(num) === -1; - }; - - BN.prototype.lt = function lt (num) { - return this.cmp(num) === -1; - }; - - BN.prototype.lten = function lten (num) { - return this.cmpn(num) <= 0; - }; - - BN.prototype.lte = function lte (num) { - return this.cmp(num) <= 0; - }; - - BN.prototype.eqn = function eqn (num) { - return this.cmpn(num) === 0; - }; - - BN.prototype.eq = function eq (num) { - return this.cmp(num) === 0; - }; - - // - // A reduce context, could be using montgomery or something better, depending - // on the `m` itself. - // - BN.red = function red (num) { - return new Red(num); - }; - - BN.prototype.toRed = function toRed (ctx) { - assert(!this.red, 'Already a number in reduction context'); - assert(this.negative === 0, 'red works only with positives'); - return ctx.convertTo(this)._forceRed(ctx); - }; - - BN.prototype.fromRed = function fromRed () { - assert(this.red, 'fromRed works only with numbers in reduction context'); - return this.red.convertFrom(this); - }; - - BN.prototype._forceRed = function _forceRed (ctx) { - this.red = ctx; - return this; - }; - - BN.prototype.forceRed = function forceRed (ctx) { - assert(!this.red, 'Already a number in reduction context'); - return this._forceRed(ctx); - }; - - BN.prototype.redAdd = function redAdd (num) { - assert(this.red, 'redAdd works only with red numbers'); - return this.red.add(this, num); - }; - - BN.prototype.redIAdd = function redIAdd (num) { - assert(this.red, 'redIAdd works only with red numbers'); - return this.red.iadd(this, num); - }; - - BN.prototype.redSub = function redSub (num) { - assert(this.red, 'redSub works only with red numbers'); - return this.red.sub(this, num); - }; - - BN.prototype.redISub = function redISub (num) { - assert(this.red, 'redISub works only with red numbers'); - return this.red.isub(this, num); - }; - - BN.prototype.redShl = function redShl (num) { - assert(this.red, 'redShl works only with red numbers'); - return this.red.shl(this, num); - }; - - BN.prototype.redMul = function redMul (num) { - assert(this.red, 'redMul works only with red numbers'); - this.red._verify2(this, num); - return this.red.mul(this, num); - }; - - BN.prototype.redIMul = function redIMul (num) { - assert(this.red, 'redMul works only with red numbers'); - this.red._verify2(this, num); - return this.red.imul(this, num); - }; - - BN.prototype.redSqr = function redSqr () { - assert(this.red, 'redSqr works only with red numbers'); - this.red._verify1(this); - return this.red.sqr(this); - }; - - BN.prototype.redISqr = function redISqr () { - assert(this.red, 'redISqr works only with red numbers'); - this.red._verify1(this); - return this.red.isqr(this); - }; - - // Square root over p - BN.prototype.redSqrt = function redSqrt () { - assert(this.red, 'redSqrt works only with red numbers'); - this.red._verify1(this); - return this.red.sqrt(this); - }; - - BN.prototype.redInvm = function redInvm () { - assert(this.red, 'redInvm works only with red numbers'); - this.red._verify1(this); - return this.red.invm(this); - }; - - // Return negative clone of `this` % `red modulo` - BN.prototype.redNeg = function redNeg () { - assert(this.red, 'redNeg works only with red numbers'); - this.red._verify1(this); - return this.red.neg(this); - }; - - BN.prototype.redPow = function redPow (num) { - assert(this.red && !num.red, 'redPow(normalNum)'); - this.red._verify1(this); - return this.red.pow(this, num); - }; - - // Prime numbers with efficient reduction - var primes = { - k256: null, - p224: null, - p192: null, - p25519: null - }; - - // Pseudo-Mersenne prime - function MPrime (name, p) { - // P = 2 ^ N - K - this.name = name; - this.p = new BN(p, 16); - this.n = this.p.bitLength(); - this.k = new BN(1).iushln(this.n).isub(this.p); - - this.tmp = this._tmp(); - } - - MPrime.prototype._tmp = function _tmp () { - var tmp = new BN(null); - tmp.words = new Array(Math.ceil(this.n / 13)); - return tmp; - }; - - MPrime.prototype.ireduce = function ireduce (num) { - // Assumes that `num` is less than `P^2` - // num = HI * (2 ^ N - K) + HI * K + LO = HI * K + LO (mod P) - var r = num; - var rlen; - - do { - this.split(r, this.tmp); - r = this.imulK(r); - r = r.iadd(this.tmp); - rlen = r.bitLength(); - } while (rlen > this.n); - - var cmp = rlen < this.n ? -1 : r.ucmp(this.p); - if (cmp === 0) { - r.words[0] = 0; - r.length = 1; - } else if (cmp > 0) { - r.isub(this.p); - } else { - r.strip(); - } - - return r; - }; - - MPrime.prototype.split = function split (input, out) { - input.iushrn(this.n, 0, out); - }; - - MPrime.prototype.imulK = function imulK (num) { - return num.imul(this.k); - }; - - function K256 () { - MPrime.call( - this, - 'k256', - 'ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f'); - } - inherits(K256, MPrime); - - K256.prototype.split = function split (input, output) { - // 256 = 9 * 26 + 22 - var mask = 0x3fffff; - - var outLen = Math.min(input.length, 9); - for (var i = 0; i < outLen; i++) { - output.words[i] = input.words[i]; - } - output.length = outLen; - - if (input.length <= 9) { - input.words[0] = 0; - input.length = 1; - return; - } - - // Shift by 9 limbs - var prev = input.words[9]; - output.words[output.length++] = prev & mask; - - for (i = 10; i < input.length; i++) { - var next = input.words[i] | 0; - input.words[i - 10] = ((next & mask) << 4) | (prev >>> 22); - prev = next; - } - prev >>>= 22; - input.words[i - 10] = prev; - if (prev === 0 && input.length > 10) { - input.length -= 10; - } else { - input.length -= 9; - } - }; - - K256.prototype.imulK = function imulK (num) { - // K = 0x1000003d1 = [ 0x40, 0x3d1 ] - num.words[num.length] = 0; - num.words[num.length + 1] = 0; - num.length += 2; - - // bounded at: 0x40 * 0x3ffffff + 0x3d0 = 0x100000390 - var lo = 0; - for (var i = 0; i < num.length; i++) { - var w = num.words[i] | 0; - lo += w * 0x3d1; - num.words[i] = lo & 0x3ffffff; - lo = w * 0x40 + ((lo / 0x4000000) | 0); - } - - // Fast length reduction - if (num.words[num.length - 1] === 0) { - num.length--; - if (num.words[num.length - 1] === 0) { - num.length--; - } - } - return num; - }; - - function P224 () { - MPrime.call( - this, - 'p224', - 'ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001'); - } - inherits(P224, MPrime); - - function P192 () { - MPrime.call( - this, - 'p192', - 'ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff'); - } - inherits(P192, MPrime); - - function P25519 () { - // 2 ^ 255 - 19 - MPrime.call( - this, - '25519', - '7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed'); - } - inherits(P25519, MPrime); - - P25519.prototype.imulK = function imulK (num) { - // K = 0x13 - var carry = 0; - for (var i = 0; i < num.length; i++) { - var hi = (num.words[i] | 0) * 0x13 + carry; - var lo = hi & 0x3ffffff; - hi >>>= 26; - - num.words[i] = lo; - carry = hi; - } - if (carry !== 0) { - num.words[num.length++] = carry; - } - return num; - }; - - // Exported mostly for testing purposes, use plain name instead - BN._prime = function prime (name) { - // Cached version of prime - if (primes[name]) return primes[name]; - - var prime; - if (name === 'k256') { - prime = new K256(); - } else if (name === 'p224') { - prime = new P224(); - } else if (name === 'p192') { - prime = new P192(); - } else if (name === 'p25519') { - prime = new P25519(); - } else { - throw new Error('Unknown prime ' + name); - } - primes[name] = prime; - - return prime; - }; - - // - // Base reduction engine - // - function Red (m) { - if (typeof m === 'string') { - var prime = BN._prime(m); - this.m = prime.p; - this.prime = prime; - } else { - assert(m.gtn(1), 'modulus must be greater than 1'); - this.m = m; - this.prime = null; - } - } - - Red.prototype._verify1 = function _verify1 (a) { - assert(a.negative === 0, 'red works only with positives'); - assert(a.red, 'red works only with red numbers'); - }; - - Red.prototype._verify2 = function _verify2 (a, b) { - assert((a.negative | b.negative) === 0, 'red works only with positives'); - assert(a.red && a.red === b.red, - 'red works only with red numbers'); - }; - - Red.prototype.imod = function imod (a) { - if (this.prime) return this.prime.ireduce(a)._forceRed(this); - return a.umod(this.m)._forceRed(this); - }; - - Red.prototype.neg = function neg (a) { - if (a.isZero()) { - return a.clone(); - } - - return this.m.sub(a)._forceRed(this); - }; - - Red.prototype.add = function add (a, b) { - this._verify2(a, b); - - var res = a.add(b); - if (res.cmp(this.m) >= 0) { - res.isub(this.m); - } - return res._forceRed(this); - }; - - Red.prototype.iadd = function iadd (a, b) { - this._verify2(a, b); - - var res = a.iadd(b); - if (res.cmp(this.m) >= 0) { - res.isub(this.m); - } - return res; - }; - - Red.prototype.sub = function sub (a, b) { - this._verify2(a, b); - - var res = a.sub(b); - if (res.cmpn(0) < 0) { - res.iadd(this.m); - } - return res._forceRed(this); - }; - - Red.prototype.isub = function isub (a, b) { - this._verify2(a, b); - - var res = a.isub(b); - if (res.cmpn(0) < 0) { - res.iadd(this.m); - } - return res; - }; - - Red.prototype.shl = function shl (a, num) { - this._verify1(a); - return this.imod(a.ushln(num)); - }; - - Red.prototype.imul = function imul (a, b) { - this._verify2(a, b); - return this.imod(a.imul(b)); - }; - - Red.prototype.mul = function mul (a, b) { - this._verify2(a, b); - return this.imod(a.mul(b)); - }; - - Red.prototype.isqr = function isqr (a) { - return this.imul(a, a.clone()); - }; - - Red.prototype.sqr = function sqr (a) { - return this.mul(a, a); - }; - - Red.prototype.sqrt = function sqrt (a) { - if (a.isZero()) return a.clone(); - - var mod3 = this.m.andln(3); - assert(mod3 % 2 === 1); - - // Fast case - if (mod3 === 3) { - var pow = this.m.add(new BN(1)).iushrn(2); - return this.pow(a, pow); - } - - // Tonelli-Shanks algorithm (Totally unoptimized and slow) - // - // Find Q and S, that Q * 2 ^ S = (P - 1) - var q = this.m.subn(1); - var s = 0; - while (!q.isZero() && q.andln(1) === 0) { - s++; - q.iushrn(1); - } - assert(!q.isZero()); - - var one = new BN(1).toRed(this); - var nOne = one.redNeg(); - - // Find quadratic non-residue - // NOTE: Max is such because of generalized Riemann hypothesis. - var lpow = this.m.subn(1).iushrn(1); - var z = this.m.bitLength(); - z = new BN(2 * z * z).toRed(this); - - while (this.pow(z, lpow).cmp(nOne) !== 0) { - z.redIAdd(nOne); - } - - var c = this.pow(z, q); - var r = this.pow(a, q.addn(1).iushrn(1)); - var t = this.pow(a, q); - var m = s; - while (t.cmp(one) !== 0) { - var tmp = t; - for (var i = 0; tmp.cmp(one) !== 0; i++) { - tmp = tmp.redSqr(); - } - assert(i < m); - var b = this.pow(c, new BN(1).iushln(m - i - 1)); - - r = r.redMul(b); - c = b.redSqr(); - t = t.redMul(c); - m = i; - } - - return r; - }; - - Red.prototype.invm = function invm (a) { - var inv = a._invmp(this.m); - if (inv.negative !== 0) { - inv.negative = 0; - return this.imod(inv).redNeg(); - } else { - return this.imod(inv); - } - }; - - Red.prototype.pow = function pow (a, num) { - if (num.isZero()) return new BN(1); - if (num.cmpn(1) === 0) return a.clone(); - - var windowSize = 4; - var wnd = new Array(1 << windowSize); - wnd[0] = new BN(1).toRed(this); - wnd[1] = a; - for (var i = 2; i < wnd.length; i++) { - wnd[i] = this.mul(wnd[i - 1], a); - } - - var res = wnd[0]; - var current = 0; - var currentLen = 0; - var start = num.bitLength() % 26; - if (start === 0) { - start = 26; - } - - for (i = num.length - 1; i >= 0; i--) { - var word = num.words[i]; - for (var j = start - 1; j >= 0; j--) { - var bit = (word >> j) & 1; - if (res !== wnd[0]) { - res = this.sqr(res); - } - - if (bit === 0 && current === 0) { - currentLen = 0; - continue; - } - - current <<= 1; - current |= bit; - currentLen++; - if (currentLen !== windowSize && (i !== 0 || j !== 0)) continue; - - res = this.mul(res, wnd[current]); - currentLen = 0; - current = 0; - } - start = 26; - } - - return res; - }; - - Red.prototype.convertTo = function convertTo (num) { - var r = num.umod(this.m); - - return r === num ? r.clone() : r; - }; - - Red.prototype.convertFrom = function convertFrom (num) { - var res = num.clone(); - res.red = null; - return res; - }; - - // - // Montgomery method engine - // - - BN.mont = function mont (num) { - return new Mont(num); - }; - - function Mont (m) { - Red.call(this, m); - - this.shift = this.m.bitLength(); - if (this.shift % 26 !== 0) { - this.shift += 26 - (this.shift % 26); - } - - this.r = new BN(1).iushln(this.shift); - this.r2 = this.imod(this.r.sqr()); - this.rinv = this.r._invmp(this.m); - - this.minv = this.rinv.mul(this.r).isubn(1).div(this.m); - this.minv = this.minv.umod(this.r); - this.minv = this.r.sub(this.minv); - } - inherits(Mont, Red); - - Mont.prototype.convertTo = function convertTo (num) { - return this.imod(num.ushln(this.shift)); - }; - - Mont.prototype.convertFrom = function convertFrom (num) { - var r = this.imod(num.mul(this.rinv)); - r.red = null; - return r; - }; - - Mont.prototype.imul = function imul (a, b) { - if (a.isZero() || b.isZero()) { - a.words[0] = 0; - a.length = 1; - return a; - } - - var t = a.imul(b); - var c = t.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m); - var u = t.isub(c).iushrn(this.shift); - var res = u; - - if (u.cmp(this.m) >= 0) { - res = u.isub(this.m); - } else if (u.cmpn(0) < 0) { - res = u.iadd(this.m); - } - - return res._forceRed(this); - }; - - Mont.prototype.mul = function mul (a, b) { - if (a.isZero() || b.isZero()) return new BN(0)._forceRed(this); - - var t = a.mul(b); - var c = t.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m); - var u = t.isub(c).iushrn(this.shift); - var res = u; - if (u.cmp(this.m) >= 0) { - res = u.isub(this.m); - } else if (u.cmpn(0) < 0) { - res = u.iadd(this.m); - } - - return res._forceRed(this); - }; - - Mont.prototype.invm = function invm (a) { - // (AR)^-1 * R^2 = (A^-1 * R^-1) * R^2 = A^-1 * R - var res = this.imod(a._invmp(this.m).mul(this.r2)); - return res._forceRed(this); - }; -})(typeof module === 'undefined' || module, this); diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/node_modules/bn.js/package.json b/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/node_modules/bn.js/package.json deleted file mode 100644 index 25b71f31..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/node_modules/bn.js/package.json +++ /dev/null @@ -1,71 +0,0 @@ -{ - "name": "bn.js", - "version": "4.11.6", - "description": "Big number implementation in pure javascript", - "main": "lib/bn.js", - "scripts": { - "lint": "semistandard", - "unit": "mocha --reporter=spec test/*-test.js", - "test": "npm run lint && npm run unit" - }, - "repository": { - "type": "git", - "url": "git+ssh://git@github.com/indutny/bn.js.git" - }, - "keywords": [ - "BN", - "BigNum", - "Big number", - "Modulo", - "Montgomery" - ], - "author": { - "name": "Fedor Indutny", - "email": "fedor@indutny.com" - }, - "license": "MIT", - "bugs": { - "url": "https://github.com/indutny/bn.js/issues" - }, - "homepage": "https://github.com/indutny/bn.js", - "devDependencies": { - "istanbul": "^0.3.5", - "mocha": "^2.1.0", - "semistandard": "^7.0.4" - }, - "gitHead": "e4a82134c89ed85b0c3a03da7fabc016206898a4", - "_id": "bn.js@4.11.6", - "_shasum": "53344adb14617a13f6e8dd2ce28905d1c0ba3215", - "_from": "bn.js@>=4.1.0 <5.0.0", - "_npmVersion": "3.10.3", - "_nodeVersion": "6.3.0", - "_npmUser": { - "name": "indutny", - "email": "fedor@indutny.com" - }, - "dist": { - "shasum": "53344adb14617a13f6e8dd2ce28905d1c0ba3215", - "tarball": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.6.tgz" - }, - "maintainers": [ - { - "name": "cwmma", - "email": "calvin.metcalf@gmail.com" - }, - { - "name": "dcousens", - "email": "email@dcousens.com" - }, - { - "name": "indutny", - "email": "fedor@indutny.com" - } - ], - "_npmOperationalInternal": { - "host": "packages-16-east.internal.npmjs.com", - "tmp": "tmp/bn.js-4.11.6.tgz_1470100429753_0.28054949711076915" - }, - "directories": {}, - "_resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.6.tgz", - "readme": "ERROR: No README data found!" -} diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/node_modules/bn.js/test/arithmetic-test.js b/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/node_modules/bn.js/test/arithmetic-test.js deleted file mode 100644 index c3a0d7d5..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/node_modules/bn.js/test/arithmetic-test.js +++ /dev/null @@ -1,635 +0,0 @@ -/* global describe, it */ - -var assert = require('assert'); -var BN = require('../').BN; -var fixtures = require('./fixtures'); - -describe('BN.js/Arithmetic', function () { - describe('.add()', function () { - it('should add numbers', function () { - assert.equal(new BN(14).add(new BN(26)).toString(16), '28'); - var k = new BN(0x1234); - var r = k; - - for (var i = 0; i < 257; i++) { - r = r.add(k); - } - - assert.equal(r.toString(16), '125868'); - }); - - it('should handle carry properly (in-place)', function () { - var k = new BN('abcdefabcdefabcdef', 16); - var r = new BN('deadbeef', 16); - - for (var i = 0; i < 257; i++) { - r.iadd(k); - } - - assert.equal(r.toString(16), 'ac79bd9b79be7a277bde'); - }); - - it('should properly do positive + negative', function () { - var a = new BN('abcd', 16); - var b = new BN('-abce', 16); - - assert.equal(a.iadd(b).toString(16), '-1'); - - a = new BN('abcd', 16); - b = new BN('-abce', 16); - - assert.equal(a.add(b).toString(16), '-1'); - assert.equal(b.add(a).toString(16), '-1'); - }); - }); - - describe('.iaddn()', function () { - it('should allow a sign change', function () { - var a = new BN(-100); - assert.equal(a.negative, 1); - - a.iaddn(200); - - assert.equal(a.negative, 0); - assert.equal(a.toString(), '100'); - }); - - it('should add negative number', function () { - var a = new BN(-100); - assert.equal(a.negative, 1); - - a.iaddn(-200); - - assert.equal(a.toString(), '-300'); - }); - - it('should allow neg + pos with big number', function () { - var a = new BN('-1000000000', 10); - assert.equal(a.negative, 1); - - a.iaddn(200); - - assert.equal(a.toString(), '-999999800'); - }); - - it('should carry limb', function () { - var a = new BN('3ffffff', 16); - - assert.equal(a.iaddn(1).toString(16), '4000000'); - }); - - it('should throw error with num eq 0x4000000', function () { - assert.throws(function () { - new BN(0).iaddn(0x4000000); - }, /^Error: Assertion failed$/); - }); - }); - - describe('.sub()', function () { - it('should subtract small numbers', function () { - assert.equal(new BN(26).sub(new BN(14)).toString(16), 'c'); - assert.equal(new BN(14).sub(new BN(26)).toString(16), '-c'); - assert.equal(new BN(26).sub(new BN(26)).toString(16), '0'); - assert.equal(new BN(-26).sub(new BN(26)).toString(16), '-34'); - }); - - var a = new BN( - '31ff3c61db2db84b9823d320907a573f6ad37c437abe458b1802cda041d6384' + - 'a7d8daef41395491e2', - 16); - var b = new BN( - '6f0e4d9f1d6071c183677f601af9305721c91d31b0bbbae8fb790000', - 16); - var r = new BN( - '31ff3c61db2db84b9823d3208989726578fd75276287cd9516533a9acfb9a67' + - '76281f34583ddb91e2', - 16); - - it('should subtract big numbers', function () { - assert.equal(a.sub(b).cmp(r), 0); - }); - - it('should subtract numbers in place', function () { - assert.equal(b.clone().isub(a).neg().cmp(r), 0); - }); - - it('should subtract with carry', function () { - // Carry and copy - var a = new BN('12345', 16); - var b = new BN('1000000000000', 16); - assert.equal(a.isub(b).toString(16), '-fffffffedcbb'); - - a = new BN('12345', 16); - b = new BN('1000000000000', 16); - assert.equal(b.isub(a).toString(16), 'fffffffedcbb'); - }); - }); - - describe('.isubn()', function () { - it('should subtract negative number', function () { - var r = new BN( - '7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b', 16); - assert.equal(r.isubn(-1).toString(16), - '7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681c'); - }); - - it('should work for positive numbers', function () { - var a = new BN(-100); - assert.equal(a.negative, 1); - - a.isubn(200); - assert.equal(a.negative, 1); - assert.equal(a.toString(), '-300'); - }); - - it('should not allow a sign change', function () { - var a = new BN(-100); - assert.equal(a.negative, 1); - - a.isubn(-200); - assert.equal(a.negative, 0); - assert.equal(a.toString(), '100'); - }); - - it('should change sign on small numbers at 0', function () { - var a = new BN(0).subn(2); - assert.equal(a.toString(), '-2'); - }); - - it('should change sign on small numbers at 1', function () { - var a = new BN(1).subn(2); - assert.equal(a.toString(), '-1'); - }); - - it('should throw error with num eq 0x4000000', function () { - assert.throws(function () { - new BN(0).isubn(0x4000000); - }, /^Error: Assertion failed$/); - }); - }); - - function testMethod (name, mul) { - describe(name, function () { - it('should multiply numbers of different signs', function () { - var offsets = [ - 1, // smallMulTo - 250, // comb10MulTo - 1000, // bigMulTo - 15000 // jumboMulTo - ]; - - for (var i = 0; i < offsets.length; ++i) { - var x = new BN(1).ishln(offsets[i]); - - assert.equal(mul(x, x).isNeg(), false); - assert.equal(mul(x, x.neg()).isNeg(), true); - assert.equal(mul(x.neg(), x).isNeg(), true); - assert.equal(mul(x.neg(), x.neg()).isNeg(), false); - } - }); - - it('should multiply with carry', function () { - var n = new BN(0x1001); - var r = n; - - for (var i = 0; i < 4; i++) { - r = mul(r, n); - } - - assert.equal(r.toString(16), '100500a00a005001'); - }); - - it('should correctly multiply big numbers', function () { - var n = new BN( - '79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798', - 16 - ); - assert.equal( - mul(n, n).toString(16), - '39e58a8055b6fb264b75ec8c646509784204ac15a8c24e05babc9729ab9' + - 'b055c3a9458e4ce3289560a38e08ba8175a9446ce14e608245ab3a9' + - '978a8bd8acaa40'); - assert.equal( - mul(mul(n, n), n).toString(16), - '1b888e01a06e974017a28a5b4da436169761c9730b7aeedf75fc60f687b' + - '46e0cf2cb11667f795d5569482640fe5f628939467a01a612b02350' + - '0d0161e9730279a7561043af6197798e41b7432458463e64fa81158' + - '907322dc330562697d0d600'); - }); - - it('should multiply neg number on 0', function () { - assert.equal( - mul(new BN('-100000000000'), new BN('3').div(new BN('4'))) - .toString(16), - '0' - ); - }); - - it('should regress mul big numbers', function () { - var q = fixtures.dhGroups.p17.q; - var qs = fixtures.dhGroups.p17.qs; - - q = new BN(q, 16); - assert.equal(mul(q, q).toString(16), qs); - }); - }); - } - - testMethod('.mul()', function (x, y) { - return BN.prototype.mul.apply(x, [ y ]); - }); - - testMethod('.mulf()', function (x, y) { - return BN.prototype.mulf.apply(x, [ y ]); - }); - - describe('.imul()', function () { - it('should multiply numbers in-place', function () { - var a = new BN('abcdef01234567890abcd', 16); - var b = new BN('deadbeefa551edebabba8', 16); - var c = a.mul(b); - - assert.equal(a.imul(b).toString(16), c.toString(16)); - - a = new BN('abcdef01234567890abcd214a25123f512361e6d236', 16); - b = new BN('deadbeefa551edebabba8121234fd21bac0341324dd', 16); - c = a.mul(b); - - assert.equal(a.imul(b).toString(16), c.toString(16)); - }); - - it('should multiply by 0', function () { - var a = new BN('abcdef01234567890abcd', 16); - var b = new BN('0', 16); - var c = a.mul(b); - - assert.equal(a.imul(b).toString(16), c.toString(16)); - }); - - it('should regress mul big numbers in-place', function () { - var q = fixtures.dhGroups.p17.q; - var qs = fixtures.dhGroups.p17.qs; - - q = new BN(q, 16); - - assert.equal(q.isqr().toString(16), qs); - }); - }); - - describe('.muln()', function () { - it('should multiply number by small number', function () { - var a = new BN('abcdef01234567890abcd', 16); - var b = new BN('dead', 16); - var c = a.mul(b); - - assert.equal(a.muln(0xdead).toString(16), c.toString(16)); - }); - - it('should throw error with num eq 0x4000000', function () { - assert.throws(function () { - new BN(0).imuln(0x4000000); - }, /^Error: Assertion failed$/); - }); - }); - - describe('.pow()', function () { - it('should raise number to the power', function () { - var a = new BN('ab', 16); - var b = new BN('13', 10); - var c = a.pow(b); - - assert.equal(c.toString(16), '15963da06977df51909c9ba5b'); - }); - }); - - describe('.div()', function () { - it('should divide small numbers (<=26 bits)', function () { - assert.equal(new BN('256').div(new BN(10)).toString(10), - '25'); - assert.equal(new BN('-256').div(new BN(10)).toString(10), - '-25'); - assert.equal(new BN('256').div(new BN(-10)).toString(10), - '-25'); - assert.equal(new BN('-256').div(new BN(-10)).toString(10), - '25'); - - assert.equal(new BN('10').div(new BN(256)).toString(10), - '0'); - assert.equal(new BN('-10').div(new BN(256)).toString(10), - '0'); - assert.equal(new BN('10').div(new BN(-256)).toString(10), - '0'); - assert.equal(new BN('-10').div(new BN(-256)).toString(10), - '0'); - }); - - it('should divide large numbers (>53 bits)', function () { - assert.equal(new BN('1222222225255589').div(new BN('611111124969028')) - .toString(10), '1'); - assert.equal(new BN('-1222222225255589').div(new BN('611111124969028')) - .toString(10), '-1'); - assert.equal(new BN('1222222225255589').div(new BN('-611111124969028')) - .toString(10), '-1'); - assert.equal(new BN('-1222222225255589').div(new BN('-611111124969028')) - .toString(10), '1'); - - assert.equal(new BN('611111124969028').div(new BN('1222222225255589')) - .toString(10), '0'); - assert.equal(new BN('-611111124969028').div(new BN('1222222225255589')) - .toString(10), '0'); - assert.equal(new BN('611111124969028').div(new BN('-1222222225255589')) - .toString(10), '0'); - assert.equal(new BN('-611111124969028').div(new BN('-1222222225255589')) - .toString(10), '0'); - }); - - it('should divide numbers', function () { - assert.equal(new BN('69527932928').div(new BN('16974594')).toString(16), - 'fff'); - assert.equal(new BN('-69527932928').div(new BN('16974594')).toString(16), - '-fff'); - - var b = new BN( - '39e58a8055b6fb264b75ec8c646509784204ac15a8c24e05babc9729ab9' + - 'b055c3a9458e4ce3289560a38e08ba8175a9446ce14e608245ab3a9' + - '978a8bd8acaa40', - 16); - var n = new BN( - '79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798', - 16 - ); - assert.equal(b.div(n).toString(16), n.toString(16)); - - assert.equal(new BN('1').div(new BN('-5')).toString(10), '0'); - }); - - it('should not fail on regression after moving to _wordDiv', function () { - // Regression after moving to word div - var p = new BN( - 'fffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f', - 16); - var a = new BN( - '79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798', - 16); - var as = a.sqr(); - assert.equal( - as.div(p).toString(16), - '39e58a8055b6fb264b75ec8c646509784204ac15a8c24e05babc9729e58090b9'); - - p = new BN( - 'ffffffff00000001000000000000000000000000ffffffffffffffffffffffff', - 16); - a = new BN( - 'fffffffe00000003fffffffd0000000200000001fffffffe00000002ffffffff' + - 'ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff', - 16); - assert.equal( - a.div(p).toString(16), - 'ffffffff00000002000000000000000000000001000000000000000000000001'); - }); - }); - - describe('.idivn()', function () { - it('should divide numbers in-place', function () { - assert.equal(new BN('10', 16).idivn(3).toString(16), '5'); - assert.equal(new BN('12', 16).idivn(3).toString(16), '6'); - assert.equal(new BN('10000000000000000').idivn(3).toString(10), - '3333333333333333'); - assert.equal( - new BN('100000000000000000000000000000').idivn(3).toString(10), - '33333333333333333333333333333'); - - var t = new BN(3); - assert.equal( - new BN('12345678901234567890123456', 16).idivn(3).toString(16), - new BN('12345678901234567890123456', 16).div(t).toString(16)); - }); - }); - - describe('.divRound()', function () { - it('should divide numbers with rounding', function () { - assert.equal(new BN(9).divRound(new BN(20)).toString(10), - '0'); - assert.equal(new BN(10).divRound(new BN(20)).toString(10), - '1'); - assert.equal(new BN(150).divRound(new BN(20)).toString(10), - '8'); - assert.equal(new BN(149).divRound(new BN(20)).toString(10), - '7'); - assert.equal(new BN(149).divRound(new BN(17)).toString(10), - '9'); - assert.equal(new BN(144).divRound(new BN(17)).toString(10), - '8'); - assert.equal(new BN(-144).divRound(new BN(17)).toString(10), - '-8'); - }); - - it('should return 1 on exact division', function () { - assert.equal(new BN(144).divRound(new BN(144)).toString(10), '1'); - }); - }); - - describe('.mod()', function () { - it('should modulo small numbers (<=26 bits)', function () { - assert.equal(new BN('256').mod(new BN(10)).toString(10), - '6'); - assert.equal(new BN('-256').mod(new BN(10)).toString(10), - '-6'); - assert.equal(new BN('256').mod(new BN(-10)).toString(10), - '6'); - assert.equal(new BN('-256').mod(new BN(-10)).toString(10), - '-6'); - - assert.equal(new BN('10').mod(new BN(256)).toString(10), - '10'); - assert.equal(new BN('-10').mod(new BN(256)).toString(10), - '-10'); - assert.equal(new BN('10').mod(new BN(-256)).toString(10), - '10'); - assert.equal(new BN('-10').mod(new BN(-256)).toString(10), - '-10'); - }); - - it('should modulo large numbers (>53 bits)', function () { - assert.equal(new BN('1222222225255589').mod(new BN('611111124969028')) - .toString(10), '611111100286561'); - assert.equal(new BN('-1222222225255589').mod(new BN('611111124969028')) - .toString(10), '-611111100286561'); - assert.equal(new BN('1222222225255589').mod(new BN('-611111124969028')) - .toString(10), '611111100286561'); - assert.equal(new BN('-1222222225255589').mod(new BN('-611111124969028')) - .toString(10), '-611111100286561'); - - assert.equal(new BN('611111124969028').mod(new BN('1222222225255589')) - .toString(10), '611111124969028'); - assert.equal(new BN('-611111124969028').mod(new BN('1222222225255589')) - .toString(10), '-611111124969028'); - assert.equal(new BN('611111124969028').mod(new BN('-1222222225255589')) - .toString(10), '611111124969028'); - assert.equal(new BN('-611111124969028').mod(new BN('-1222222225255589')) - .toString(10), '-611111124969028'); - }); - - it('should mod numbers', function () { - assert.equal(new BN('10').mod(new BN(256)).toString(16), - 'a'); - assert.equal(new BN('69527932928').mod(new BN('16974594')).toString(16), - '102f302'); - - // 178 = 10 * 17 + 8 - assert.equal(new BN(178).div(new BN(10)).toNumber(), 17); - assert.equal(new BN(178).mod(new BN(10)).toNumber(), 8); - assert.equal(new BN(178).umod(new BN(10)).toNumber(), 8); - - // -178 = 10 * (-17) + (-8) - assert.equal(new BN(-178).div(new BN(10)).toNumber(), -17); - assert.equal(new BN(-178).mod(new BN(10)).toNumber(), -8); - assert.equal(new BN(-178).umod(new BN(10)).toNumber(), 2); - - // 178 = -10 * (-17) + 8 - assert.equal(new BN(178).div(new BN(-10)).toNumber(), -17); - assert.equal(new BN(178).mod(new BN(-10)).toNumber(), 8); - assert.equal(new BN(178).umod(new BN(-10)).toNumber(), 8); - - // -178 = -10 * (17) + (-8) - assert.equal(new BN(-178).div(new BN(-10)).toNumber(), 17); - assert.equal(new BN(-178).mod(new BN(-10)).toNumber(), -8); - assert.equal(new BN(-178).umod(new BN(-10)).toNumber(), 2); - - // -4 = 1 * (-3) + -1 - assert.equal(new BN(-4).div(new BN(-3)).toNumber(), 1); - assert.equal(new BN(-4).mod(new BN(-3)).toNumber(), -1); - - // -4 = -1 * (3) + -1 - assert.equal(new BN(-4).mod(new BN(3)).toNumber(), -1); - // -4 = 1 * (-3) + (-1 + 3) - assert.equal(new BN(-4).umod(new BN(-3)).toNumber(), 2); - - var p = new BN( - 'ffffffff00000001000000000000000000000000ffffffffffffffffffffffff', - 16); - var a = new BN( - 'fffffffe00000003fffffffd0000000200000001fffffffe00000002ffffffff' + - 'ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff', - 16); - assert.equal( - a.mod(p).toString(16), - '0'); - }); - - it('should properly carry the sign inside division', function () { - var a = new BN('945304eb96065b2a98b57a48a06ae28d285a71b5', 'hex'); - var b = new BN( - 'fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe', - 'hex'); - - assert.equal(a.mul(b).mod(a).cmpn(0), 0); - }); - }); - - describe('.modn()', function () { - it('should act like .mod() on small numbers', function () { - assert.equal(new BN('10', 16).modn(256).toString(16), '10'); - assert.equal(new BN('100', 16).modn(256).toString(16), '0'); - assert.equal(new BN('1001', 16).modn(256).toString(16), '1'); - assert.equal(new BN('100000000001', 16).modn(256).toString(16), '1'); - assert.equal(new BN('100000000001', 16).modn(257).toString(16), - new BN('100000000001', 16).mod(new BN(257)).toString(16)); - assert.equal(new BN('123456789012', 16).modn(3).toString(16), - new BN('123456789012', 16).mod(new BN(3)).toString(16)); - }); - }); - - describe('.abs()', function () { - it('should return absolute value', function () { - assert.equal(new BN(0x1001).abs().toString(), '4097'); - assert.equal(new BN(-0x1001).abs().toString(), '4097'); - assert.equal(new BN('ffffffff', 16).abs().toString(), '4294967295'); - }); - }); - - describe('.invm()', function () { - it('should invert relatively-prime numbers', function () { - var p = new BN(257); - var a = new BN(3); - var b = a.invm(p); - assert.equal(a.mul(b).mod(p).toString(16), '1'); - - var p192 = new BN( - 'fffffffffffffffffffffffffffffffeffffffffffffffff', - 16); - a = new BN('deadbeef', 16); - b = a.invm(p192); - assert.equal(a.mul(b).mod(p192).toString(16), '1'); - - // Even base - var phi = new BN('872d9b030ba368706b68932cf07a0e0c', 16); - var e = new BN(65537); - var d = e.invm(phi); - assert.equal(e.mul(d).mod(phi).toString(16), '1'); - - // Even base (take #2) - a = new BN('5'); - b = new BN('6'); - var r = a.invm(b); - assert.equal(r.mul(a).mod(b).toString(16), '1'); - }); - }); - - describe('.gcd()', function () { - it('should return GCD', function () { - assert.equal(new BN(3).gcd(new BN(2)).toString(10), '1'); - assert.equal(new BN(18).gcd(new BN(12)).toString(10), '6'); - assert.equal(new BN(-18).gcd(new BN(12)).toString(10), '6'); - assert.equal(new BN(-18).gcd(new BN(-12)).toString(10), '6'); - assert.equal(new BN(-18).gcd(new BN(0)).toString(10), '18'); - assert.equal(new BN(0).gcd(new BN(-18)).toString(10), '18'); - assert.equal(new BN(2).gcd(new BN(0)).toString(10), '2'); - assert.equal(new BN(0).gcd(new BN(3)).toString(10), '3'); - assert.equal(new BN(0).gcd(new BN(0)).toString(10), '0'); - }); - }); - - describe('.egcd()', function () { - it('should return EGCD', function () { - assert.equal(new BN(3).egcd(new BN(2)).gcd.toString(10), '1'); - assert.equal(new BN(18).egcd(new BN(12)).gcd.toString(10), '6'); - assert.equal(new BN(-18).egcd(new BN(12)).gcd.toString(10), '6'); - assert.equal(new BN(0).egcd(new BN(12)).gcd.toString(10), '12'); - }); - it('should not allow 0 input', function () { - assert.throws(function () { - new BN(1).egcd(0); - }, /^Error: Assertion failed$/); - }); - it('should not allow negative input', function () { - assert.throws(function () { - new BN(1).egcd(-1); - }, /^Error: Assertion failed$/); - }); - }); - - describe('BN.max(a, b)', function () { - it('should return maximum', function () { - assert.equal(BN.max(new BN(3), new BN(2)).toString(16), '3'); - assert.equal(BN.max(new BN(2), new BN(3)).toString(16), '3'); - assert.equal(BN.max(new BN(2), new BN(2)).toString(16), '2'); - assert.equal(BN.max(new BN(2), new BN(-2)).toString(16), '2'); - }); - }); - - describe('BN.min(a, b)', function () { - it('should return minimum', function () { - assert.equal(BN.min(new BN(3), new BN(2)).toString(16), '2'); - assert.equal(BN.min(new BN(2), new BN(3)).toString(16), '2'); - assert.equal(BN.min(new BN(2), new BN(2)).toString(16), '2'); - assert.equal(BN.min(new BN(2), new BN(-2)).toString(16), '-2'); - }); - }); - - describe('BN.ineg', function () { - it('shouldn\'t change sign for zero', function () { - assert.equal(new BN(0).ineg().toString(10), '0'); - }); - }); -}); diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/node_modules/bn.js/test/binary-test.js b/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/node_modules/bn.js/test/binary-test.js deleted file mode 100644 index 37b6421d..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/node_modules/bn.js/test/binary-test.js +++ /dev/null @@ -1,233 +0,0 @@ -/* global describe, it */ - -var assert = require('assert'); -var BN = require('../').BN; - -describe('BN.js/Binary', function () { - describe('.shl()', function () { - it('should shl numbers', function () { - // TODO(indutny): add negative numbers when the time will come - assert.equal(new BN('69527932928').shln(13).toString(16), - '2060602000000'); - assert.equal(new BN('69527932928').shln(45).toString(16), - '206060200000000000000'); - }); - - it('should ushl numbers', function () { - assert.equal(new BN('69527932928').ushln(13).toString(16), - '2060602000000'); - assert.equal(new BN('69527932928').ushln(45).toString(16), - '206060200000000000000'); - }); - }); - - describe('.shr()', function () { - it('should shr numbers', function () { - // TODO(indutny): add negative numbers when the time will come - assert.equal(new BN('69527932928').shrn(13).toString(16), - '818180'); - assert.equal(new BN('69527932928').shrn(17).toString(16), - '81818'); - assert.equal(new BN('69527932928').shrn(256).toString(16), - '0'); - }); - - it('should ushr numbers', function () { - assert.equal(new BN('69527932928').ushrn(13).toString(16), - '818180'); - assert.equal(new BN('69527932928').ushrn(17).toString(16), - '81818'); - assert.equal(new BN('69527932928').ushrn(256).toString(16), - '0'); - }); - }); - - describe('.bincn()', function () { - it('should increment bit', function () { - assert.equal(new BN(0).bincn(1).toString(16), '2'); - assert.equal(new BN(2).bincn(1).toString(16), '4'); - assert.equal(new BN(2).bincn(1).bincn(1).toString(16), - new BN(2).bincn(2).toString(16)); - assert.equal(new BN(0xffffff).bincn(1).toString(16), '1000001'); - assert.equal(new BN(2).bincn(63).toString(16), - '8000000000000002'); - }); - }); - - describe('.imaskn()', function () { - it('should mask bits in-place', function () { - assert.equal(new BN(0).imaskn(1).toString(16), '0'); - assert.equal(new BN(3).imaskn(1).toString(16), '1'); - assert.equal(new BN('123456789', 16).imaskn(4).toString(16), '9'); - assert.equal(new BN('123456789', 16).imaskn(16).toString(16), '6789'); - assert.equal(new BN('123456789', 16).imaskn(28).toString(16), '3456789'); - }); - - it('should not mask when number is bigger than length', function () { - assert.equal(new BN(0xe3).imaskn(56).toString(16), 'e3'); - assert.equal(new BN(0xe3).imaskn(26).toString(16), 'e3'); - }); - }); - - describe('.testn()', function () { - it('should support test specific bit', function () { - [ - 'ff', - 'ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff' - ].forEach(function (hex) { - var bn = new BN(hex, 16); - var bl = bn.bitLength(); - - for (var i = 0; i < bl; ++i) { - assert.equal(bn.testn(i), true); - } - - // test off the end - assert.equal(bn.testn(bl), false); - }); - - var xbits = '01111001010111001001000100011101' + - '11010011101100011000111001011101' + - '10010100111000000001011000111101' + - '01011111001111100100011110000010' + - '01011010100111010001010011000100' + - '01101001011110100001001111100110' + - '001110010111'; - - var x = new BN( - '23478905234580795234378912401239784125643978256123048348957342' - ); - for (var i = 0; i < x.bitLength(); ++i) { - assert.equal(x.testn(i), (xbits.charAt(i) === '1'), 'Failed @ bit ' + i); - } - }); - - it('should have short-cuts', function () { - var x = new BN('abcd', 16); - assert(!x.testn(128)); - }); - }); - - describe('.and()', function () { - it('should and numbers', function () { - assert.equal(new BN('1010101010101010101010101010101010101010', 2) - .and(new BN('101010101010101010101010101010101010101', 2)) - .toString(2), '0'); - }); - - it('should and numbers of different limb-length', function () { - assert.equal( - new BN('abcd0000ffff', 16) - .and(new BN('abcd', 16)).toString(16), - 'abcd'); - }); - }); - - describe('.iand()', function () { - it('should iand numbers', function () { - assert.equal(new BN('1010101010101010101010101010101010101010', 2) - .iand(new BN('101010101010101010101010101010101010101', 2)) - .toString(2), '0'); - assert.equal(new BN('1000000000000000000000000000000000000001', 2) - .iand(new BN('1', 2)) - .toString(2), '1'); - assert.equal(new BN('1', 2) - .iand(new BN('1000000000000000000000000000000000000001', 2)) - .toString(2), '1'); - }); - }); - - describe('.or()', function () { - it('should or numbers', function () { - assert.equal(new BN('1010101010101010101010101010101010101010', 2) - .or(new BN('101010101010101010101010101010101010101', 2)) - .toString(2), '1111111111111111111111111111111111111111'); - }); - - it('should or numbers of different limb-length', function () { - assert.equal( - new BN('abcd00000000', 16) - .or(new BN('abcd', 16)).toString(16), - 'abcd0000abcd'); - }); - }); - - describe('.ior()', function () { - it('should ior numbers', function () { - assert.equal(new BN('1010101010101010101010101010101010101010', 2) - .ior(new BN('101010101010101010101010101010101010101', 2)) - .toString(2), '1111111111111111111111111111111111111111'); - assert.equal(new BN('1000000000000000000000000000000000000000', 2) - .ior(new BN('1', 2)) - .toString(2), '1000000000000000000000000000000000000001'); - assert.equal(new BN('1', 2) - .ior(new BN('1000000000000000000000000000000000000000', 2)) - .toString(2), '1000000000000000000000000000000000000001'); - }); - }); - - describe('.xor()', function () { - it('should xor numbers', function () { - assert.equal(new BN('11001100110011001100110011001100', 2) - .xor(new BN('1100110011001100110011001100110', 2)) - .toString(2), '10101010101010101010101010101010'); - }); - }); - - describe('.ixor()', function () { - it('should ixor numbers', function () { - assert.equal(new BN('11001100110011001100110011001100', 2) - .ixor(new BN('1100110011001100110011001100110', 2)) - .toString(2), '10101010101010101010101010101010'); - assert.equal(new BN('11001100110011001100110011001100', 2) - .ixor(new BN('1', 2)) - .toString(2), '11001100110011001100110011001101'); - assert.equal(new BN('1', 2) - .ixor(new BN('11001100110011001100110011001100', 2)) - .toString(2), '11001100110011001100110011001101'); - }); - - it('should and numbers of different limb-length', function () { - assert.equal( - new BN('abcd0000ffff', 16) - .xor(new BN('abcd', 16)).toString(16), - 'abcd00005432'); - }); - }); - - describe('.setn()', function () { - it('should allow single bits to be set', function () { - assert.equal(new BN(0).setn(2, true).toString(2), '100'); - assert.equal(new BN(0).setn(27, true).toString(2), - '1000000000000000000000000000'); - assert.equal(new BN(0).setn(63, true).toString(16), - new BN(1).iushln(63).toString(16)); - assert.equal(new BN('1000000000000000000000000001', 2).setn(27, false) - .toString(2), '1'); - assert.equal(new BN('101', 2).setn(2, false).toString(2), '1'); - }); - }); - - describe('.notn()', function () { - it('should allow bitwise negation', function () { - assert.equal(new BN('111000111', 2).notn(9).toString(2), - '111000'); - assert.equal(new BN('000111000', 2).notn(9).toString(2), - '111000111'); - assert.equal(new BN('111000111', 2).notn(9).toString(2), - '111000'); - assert.equal(new BN('000111000', 2).notn(9).toString(2), - '111000111'); - assert.equal(new BN('111000111', 2).notn(32).toString(2), - '11111111111111111111111000111000'); - assert.equal(new BN('000111000', 2).notn(32).toString(2), - '11111111111111111111111111000111'); - assert.equal(new BN('111000111', 2).notn(68).toString(2), - '11111111111111111111111111111111' + - '111111111111111111111111111000111000'); - assert.equal(new BN('000111000', 2).notn(68).toString(2), - '11111111111111111111111111111111' + - '111111111111111111111111111111000111'); - }); - }); -}); diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/node_modules/bn.js/test/constructor-test.js b/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/node_modules/bn.js/test/constructor-test.js deleted file mode 100644 index 11c7df08..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/node_modules/bn.js/test/constructor-test.js +++ /dev/null @@ -1,149 +0,0 @@ -/* global describe, it */ - -var assert = require('assert'); -var BN = require('../').BN; - -describe('BN.js/Constructor', function () { - describe('with Smi input', function () { - it('should accept one limb number', function () { - assert.equal(new BN(12345).toString(16), '3039'); - }); - - it('should accept two-limb number', function () { - assert.equal(new BN(0x4123456).toString(16), '4123456'); - }); - - it('should accept 52 bits of precision', function () { - var num = Math.pow(2, 52); - assert.equal(new BN(num, 10).toString(10), num.toString(10)); - }); - - it('should accept max safe integer', function () { - var num = Math.pow(2, 53) - 1; - assert.equal(new BN(num, 10).toString(10), num.toString(10)); - }); - - it('should not accept an unsafe integer', function () { - var num = Math.pow(2, 53); - - assert.throws(function () { - return new BN(num, 10); - }, /^Error: Assertion failed$/); - }); - - it('should accept two-limb LE number', function () { - assert.equal(new BN(0x4123456, null, 'le').toString(16), '56341204'); - }); - }); - - describe('with String input', function () { - it('should accept base-16', function () { - assert.equal(new BN('1A6B765D8CDF', 16).toString(16), '1a6b765d8cdf'); - assert.equal(new BN('1A6B765D8CDF', 16).toString(), '29048849665247'); - }); - - it('should accept base-hex', function () { - assert.equal(new BN('FF', 'hex').toString(), '255'); - }); - - it('should accept base-16 with spaces', function () { - var num = 'a89c e5af8724 c0a23e0e 0ff77500'; - assert.equal(new BN(num, 16).toString(16), num.replace(/ /g, '')); - }); - - it('should accept long base-16', function () { - var num = '123456789abcdef123456789abcdef123456789abcdef'; - assert.equal(new BN(num, 16).toString(16), num); - }); - - it('should accept positive base-10', function () { - assert.equal(new BN('10654321').toString(), '10654321'); - assert.equal(new BN('29048849665247').toString(16), '1a6b765d8cdf'); - }); - - it('should accept negative base-10', function () { - assert.equal(new BN('-29048849665247').toString(16), '-1a6b765d8cdf'); - }); - - it('should accept long base-10', function () { - var num = '10000000000000000'; - assert.equal(new BN(num).toString(10), num); - }); - - it('should accept base-2', function () { - var base2 = '11111111111111111111111111111111111111111111111111111'; - assert.equal(new BN(base2, 2).toString(2), base2); - }); - - it('should accept base-36', function () { - var base36 = 'zzZzzzZzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz'; - assert.equal(new BN(base36, 36).toString(36), base36.toLowerCase()); - }); - - it('should not overflow limbs during base-10', function () { - var num = '65820182292848241686198767302293' + - '20890292528855852623664389292032'; - assert(new BN(num).words[0] < 0x4000000); - }); - - it('should accept base-16 LE integer', function () { - assert.equal(new BN('1A6B765D8CDF', 16, 'le').toString(16), - 'df8c5d766b1a'); - }); - }); - - describe('with Array input', function () { - it('should not fail on empty array', function () { - assert.equal(new BN([]).toString(16), '0'); - }); - - it('should import/export big endian', function () { - assert.equal(new BN([ 1, 2, 3 ]).toString(16), '10203'); - assert.equal(new BN([ 1, 2, 3, 4 ]).toString(16), '1020304'); - assert.equal(new BN([ 1, 2, 3, 4, 5 ]).toString(16), '102030405'); - assert.equal(new BN([ 1, 2, 3, 4, 5, 6, 7, 8 ]).toString(16), - '102030405060708'); - assert.equal(new BN([ 1, 2, 3, 4 ]).toArray().join(','), '1,2,3,4'); - assert.equal(new BN([ 1, 2, 3, 4, 5, 6, 7, 8 ]).toArray().join(','), - '1,2,3,4,5,6,7,8'); - }); - - it('should import little endian', function () { - assert.equal(new BN([ 1, 2, 3 ], 10, 'le').toString(16), '30201'); - assert.equal(new BN([ 1, 2, 3, 4 ], 10, 'le').toString(16), '4030201'); - assert.equal(new BN([ 1, 2, 3, 4, 5 ], 10, 'le').toString(16), - '504030201'); - assert.equal(new BN([ 1, 2, 3, 4, 5, 6, 7, 8 ], 'le').toString(16), - '807060504030201'); - assert.equal(new BN([ 1, 2, 3, 4 ]).toArray('le').join(','), '4,3,2,1'); - assert.equal(new BN([ 1, 2, 3, 4, 5, 6, 7, 8 ]).toArray('le').join(','), - '8,7,6,5,4,3,2,1'); - }); - - it('should import big endian with implicit base', function () { - assert.equal(new BN([ 1, 2, 3, 4, 5 ], 'le').toString(16), '504030201'); - }); - }); - - // the Array code is able to handle Buffer - describe('with Buffer input', function () { - it('should not fail on empty Buffer', function () { - assert.equal(new BN(new Buffer(0)).toString(16), '0'); - }); - - it('should import/export big endian', function () { - assert.equal(new BN(new Buffer('010203', 'hex')).toString(16), '10203'); - }); - - it('should import little endian', function () { - assert.equal(new BN(new Buffer('010203', 'hex'), 'le').toString(16), '30201'); - }); - }); - - describe('with BN input', function () { - it('should clone BN', function () { - var num = new BN(12345); - assert.equal(new BN(num).toString(10), '12345'); - }); - }); -}); diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/node_modules/bn.js/test/fixtures.js b/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/node_modules/bn.js/test/fixtures.js deleted file mode 100644 index 39fd661d..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/node_modules/bn.js/test/fixtures.js +++ /dev/null @@ -1,264 +0,0 @@ -exports.dhGroups = { - p16: { - prime: 'ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd1' + - '29024e088a67cc74020bbea63b139b22514a08798e3404dd' + - 'ef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245' + - 'e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7ed' + - 'ee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3d' + - 'c2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f' + - '83655d23dca3ad961c62f356208552bb9ed529077096966d' + - '670c354e4abc9804f1746c08ca18217c32905e462e36ce3b' + - 'e39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9' + - 'de2bcbf6955817183995497cea956ae515d2261898fa0510' + - '15728e5a8aaac42dad33170d04507a33a85521abdf1cba64' + - 'ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7' + - 'abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6b' + - 'f12ffa06d98a0864d87602733ec86a64521f2b18177b200c' + - 'bbe117577a615d6c770988c0bad946e208e24fa074e5ab31' + - '43db5bfce0fd108e4b82d120a92108011a723c12a787e6d7' + - '88719a10bdba5b2699c327186af4e23c1a946834b6150bda' + - '2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6' + - '287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed' + - '1f612970cee2d7afb81bdd762170481cd0069127d5b05aa9' + - '93b4ea988d8fddc186ffb7dc90a6c08f4df435c934063199' + - 'ffffffffffffffff', - priv: '6d5923e6449122cbbcc1b96093e0b7e4fd3e469f58daddae' + - '53b49b20664f4132675df9ce98ae0cfdcac0f4181ccb643b' + - '625f98104dcf6f7d8e81961e2cab4b5014895260cb977c7d' + - '2f981f8532fb5da60b3676dfe57f293f05d525866053ac7e' + - '65abfd19241146e92e64f309a97ef3b529af4d6189fa416c' + - '9e1a816c3bdf88e5edf48fbd8233ef9038bb46faa95122c0' + - '5a426be72039639cd2d53d37254b3d258960dcb33c255ede' + - '20e9d7b4b123c8b4f4b986f53cdd510d042166f7dd7dca98' + - '7c39ab36381ba30a5fdd027eb6128d2ef8e5802a2194d422' + - 'b05fe6e1cb4817789b923d8636c1ec4b7601c90da3ddc178' + - '52f59217ae070d87f2e75cbfb6ff92430ad26a71c8373452' + - 'ae1cc5c93350e2d7b87e0acfeba401aaf518580937bf0b6c' + - '341f8c49165a47e49ce50853989d07171c00f43dcddddf72' + - '94fb9c3f4e1124e98ef656b797ef48974ddcd43a21fa06d0' + - '565ae8ce494747ce9e0ea0166e76eb45279e5c6471db7df8' + - 'cc88764be29666de9c545e72da36da2f7a352fb17bdeb982' + - 'a6dc0193ec4bf00b2e533efd6cd4d46e6fb237b775615576' + - 'dd6c7c7bbc087a25e6909d1ebc6e5b38e5c8472c0fc429c6' + - 'f17da1838cbcd9bbef57c5b5522fd6053e62ba21fe97c826' + - 'd3889d0cc17e5fa00b54d8d9f0f46fb523698af965950f4b' + - '941369e180f0aece3870d9335f2301db251595d173902cad' + - '394eaa6ffef8be6c', - pub: 'd53703b7340bc89bfc47176d351e5cf86d5a18d9662eca3c' + - '9759c83b6ccda8859649a5866524d77f79e501db923416ca' + - '2636243836d3e6df752defc0fb19cc386e3ae48ad647753f' + - 'bf415e2612f8a9fd01efe7aca249589590c7e6a0332630bb' + - '29c5b3501265d720213790556f0f1d114a9e2071be3620bd' + - '4ee1e8bb96689ac9e226f0a4203025f0267adc273a43582b' + - '00b70b490343529eaec4dcff140773cd6654658517f51193' + - '13f21f0a8e04fe7d7b21ffeca85ff8f87c42bb8d9cb13a72' + - 'c00e9c6e9dfcedda0777af951cc8ccab90d35e915e707d8e' + - '4c2aca219547dd78e9a1a0730accdc9ad0b854e51edd1e91' + - '4756760bab156ca6e3cb9c625cf0870def34e9ac2e552800' + - 'd6ce506d43dbbc75acfa0c8d8fb12daa3c783fb726f187d5' + - '58131779239c912d389d0511e0f3a81969d12aeee670e48f' + - 'ba41f7ed9f10705543689c2506b976a8ffabed45e33795b0' + - '1df4f6b993a33d1deab1316a67419afa31fbb6fdd252ee8c' + - '7c7d1d016c44e3fcf6b41898d7f206aa33760b505e4eff2e' + - 'c624bc7fe636b1d59e45d6f904fc391419f13d1f0cdb5b6c' + - '2378b09434159917dde709f8a6b5dc30994d056e3f964371' + - '11587ac7af0a442b8367a7bd940f752ddabf31cf01171e24' + - 'd78df136e9681cd974ce4f858a5fb6efd3234a91857bb52d' + - '9e7b414a8bc66db4b5a73bbeccfb6eb764b4f0cbf0375136' + - 'b024b04e698d54a5' - }, - p17: { - prime: 'ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd1' + - '29024e088a67cc74020bbea63b139b22514a08798e3404dd' + - 'ef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245' + - 'e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7ed' + - 'ee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3d' + - 'c2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f' + - '83655d23dca3ad961c62f356208552bb9ed529077096966d' + - '670c354e4abc9804f1746c08ca18217c32905e462e36ce3b' + - 'e39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9' + - 'de2bcbf6955817183995497cea956ae515d2261898fa0510' + - '15728e5a8aaac42dad33170d04507a33a85521abdf1cba64' + - 'ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7' + - 'abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6b' + - 'f12ffa06d98a0864d87602733ec86a64521f2b18177b200c' + - 'bbe117577a615d6c770988c0bad946e208e24fa074e5ab31' + - '43db5bfce0fd108e4b82d120a92108011a723c12a787e6d7' + - '88719a10bdba5b2699c327186af4e23c1a946834b6150bda' + - '2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6' + - '287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed' + - '1f612970cee2d7afb81bdd762170481cd0069127d5b05aa9' + - '93b4ea988d8fddc186ffb7dc90a6c08f4df435c934028492' + - '36c3fab4d27c7026c1d4dcb2602646dec9751e763dba37bd' + - 'f8ff9406ad9e530ee5db382f413001aeb06a53ed9027d831' + - '179727b0865a8918da3edbebcf9b14ed44ce6cbaced4bb1b' + - 'db7f1447e6cc254b332051512bd7af426fb8f401378cd2bf' + - '5983ca01c64b92ecf032ea15d1721d03f482d7ce6e74fef6' + - 'd55e702f46980c82b5a84031900b1c9e59e7c97fbec7e8f3' + - '23a97a7e36cc88be0f1d45b7ff585ac54bd407b22b4154aa' + - 'cc8f6d7ebf48e1d814cc5ed20f8037e0a79715eef29be328' + - '06a1d58bb7c5da76f550aa3d8a1fbff0eb19ccb1a313d55c' + - 'da56c9ec2ef29632387fe8d76e3c0468043e8f663f4860ee' + - '12bf2d5b0b7474d6e694f91e6dcc4024ffffffffffffffff', - priv: '6017f2bc23e1caff5b0a8b4e1fc72422b5204415787801dc' + - '025762b8dbb98ab57603aaaa27c4e6bdf742b4a1726b9375' + - 'a8ca3cf07771779589831d8bd18ddeb79c43e7e77d433950' + - 'e652e49df35b11fa09644874d71d62fdaffb580816c2c88c' + - '2c4a2eefd4a660360316741b05a15a2e37f236692ad3c463' + - 'fff559938fc6b77176e84e1bb47fb41af691c5eb7bb81bd8' + - 'c918f52625a1128f754b08f5a1403b84667231c4dfe07ed4' + - '326234c113931ce606037e960f35a2dfdec38a5f057884d3' + - '0af8fab3be39c1eeb390205fd65982191fc21d5aa30ddf51' + - 'a8e1c58c0c19fc4b4a7380ea9e836aaf671c90c29bc4bcc7' + - '813811aa436a7a9005de9b507957c56a9caa1351b6efc620' + - '7225a18f6e97f830fb6a8c4f03b82f4611e67ab9497b9271' + - 'd6ac252793cc3e5538990dbd894d2dbc2d152801937d9f74' + - 'da4b741b50b4d40e4c75e2ac163f7b397fd555648b249f97' + - 'ffe58ffb6d096aa84534c4c5729cff137759bd34e80db4ab' + - '47e2b9c52064e7f0bf677f72ac9e5d0c6606943683f9d12f' + - '180cf065a5cb8ec3179a874f358847a907f8471d15f1e728' + - '7023249d6d13c82da52628654438f47b8b5cdf4761fbf6ad' + - '9219eceac657dbd06cf2ab776ad4c968f81c3d039367f0a4' + - 'd77c7ec4435c27b6c147071665100063b5666e06eb2fb2cc' + - '3159ba34bc98ca346342195f6f1fb053ddc3bc1873564d40' + - '1c6738cdf764d6e1ff25ca5926f80102ea6593c17170966b' + - 'b5d7352dd7fb821230237ea3ebed1f920feaadbd21be295a' + - '69f2083deae9c5cdf5f4830eb04b7c1f80cc61c17232d79f' + - '7ecc2cc462a7965f804001c89982734e5abba2d31df1b012' + - '152c6b226dff34510b54be8c2cd68d795def66c57a3abfb6' + - '896f1d139e633417f8c694764974d268f46ece3a8d6616ea' + - 'a592144be48ee1e0a1595d3e5edfede5b27cec6c48ceb2ff' + - 'b42cb44275851b0ebf87dfc9aa2d0cb0805e9454b051dfe8' + - 'a29fadd82491a4b4c23f2d06ba45483ab59976da1433c9ce' + - '500164b957a04cf62dd67595319b512fc4b998424d1164dd' + - 'bbe5d1a0f7257cbb04ec9b5ed92079a1502d98725023ecb2', - pub: '3bf836229c7dd874fe37c1790d201e82ed8e192ed61571ca' + - '7285264974eb2a0171f3747b2fc23969a916cbd21e14f7e2' + - 'f0d72dcd2247affba926f9e7bb99944cb5609aed85e71b89' + - 'e89d2651550cb5bd8281bd3144066af78f194032aa777739' + - 'cccb7862a1af401f99f7e5c693f25ddce2dedd9686633820' + - 'd28d0f5ed0c6b5a094f5fe6170b8e2cbc9dff118398baee6' + - 'e895a6301cb6e881b3cae749a5bdf5c56fc897ff68bc73f2' + - '4811bb108b882872bade1f147d886a415cda2b93dd90190c' + - 'be5c2dd53fe78add5960e97f58ff2506afe437f4cf4c912a' + - '397c1a2139ac6207d3ab76e6b7ffd23bb6866dd7f87a9ae5' + - '578789084ff2d06ea0d30156d7a10496e8ebe094f5703539' + - '730f5fdbebc066de417be82c99c7da59953071f49da7878d' + - 'a588775ff2a7f0084de390f009f372af75cdeba292b08ea8' + - '4bd13a87e1ca678f9ad148145f7cef3620d69a891be46fbb' + - 'cad858e2401ec0fd72abdea2f643e6d0197b7646fbb83220' + - '0f4cf7a7f6a7559f9fb0d0f1680822af9dbd8dec4cd1b5e1' + - '7bc799e902d9fe746ddf41da3b7020350d3600347398999a' + - 'baf75d53e03ad2ee17de8a2032f1008c6c2e6618b62f225b' + - 'a2f350179445debe68500fcbb6cae970a9920e321b468b74' + - '5fb524fb88abbcacdca121d737c44d30724227a99745c209' + - 'b970d1ff93bbc9f28b01b4e714d6c9cbd9ea032d4e964d8e' + - '8fff01db095160c20b7646d9fcd314c4bc11bcc232aeccc0' + - 'fbedccbc786951025597522eef283e3f56b44561a0765783' + - '420128638c257e54b972a76e4261892d81222b3e2039c61a' + - 'ab8408fcaac3d634f848ab3ee65ea1bd13c6cd75d2e78060' + - 'e13cf67fbef8de66d2049e26c0541c679fff3e6afc290efe' + - '875c213df9678e4a7ec484bc87dae5f0a1c26d7583e38941' + - 'b7c68b004d4df8b004b666f9448aac1cc3ea21461f41ea5d' + - 'd0f7a9e6161cfe0f58bcfd304bdc11d78c2e9d542e86c0b5' + - '6985cc83f693f686eaac17411a8247bf62f5ccc7782349b5' + - 'cc1f20e312fa2acc0197154d1bfee507e8db77e8f2732f2d' + - '641440ccf248e8643b2bd1e1f9e8239356ab91098fcb431d', - q: 'a899c59999bf877d96442d284359783bdc64b5f878b688fe' + - '51407f0526e616553ad0aaaac4d5bed3046f10a1faaf42bb' + - '2342dc4b7908eea0c46e4c4576897675c2bfdc4467870d3d' + - 'cd90adaed4359237a4bc6924bfb99aa6bf5f5ede15b574ea' + - 'e977eac096f3c67d09bda574c6306c6123fa89d2f086b8dc' + - 'ff92bc570c18d83fe6c810ccfd22ce4c749ef5e6ead3fffe' + - 'c63d95e0e3fde1df9db6a35fa1d107058f37e41957769199' + - 'd945dd7a373622c65f0af3fd9eb1ddc5c764bbfaf7a3dc37' + - '2548e683b970dac4aa4b9869080d2376c9adecebb84e172c' + - '09aeeb25fb8df23e60033260c4f8aac6b8b98ab894b1fb84' + - 'ebb83c0fb2081c3f3eee07f44e24d8fabf76f19ed167b0d7' + - 'ff971565aa4efa3625fce5a43ceeaa3eebb3ce88a00f597f' + - '048c69292b38dba2103ecdd5ec4ccfe3b2d87fa6202f334b' + - 'c1cab83b608dfc875b650b69f2c7e23c0b2b4adf149a6100' + - 'db1b6dbad4679ecb1ea95eafaba3bd00db11c2134f5a8686' + - '358b8b2ab49a1b2e85e1e45caeac5cd4dc0b3b5fffba8871' + - '1c6baf399edd48dad5e5c313702737a6dbdcede80ca358e5' + - '1d1c4fe42e8948a084403f61baed38aa9a1a5ce2918e9f33' + - '100050a430b47bc592995606440272a4994677577a6aaa1b' + - 'a101045dbec5a4e9566dab5445d1af3ed19519f07ac4e2a8' + - 'bd0a84b01978f203a9125a0be020f71fab56c2c9e344d4f4' + - '12d53d3cd8eb74ca5122002e931e3cb0bd4b7492436be17a' + - 'd7ebe27148671f59432c36d8c56eb762655711cfc8471f70' + - '83a8b7283bcb3b1b1d47d37c23d030288cfcef05fbdb4e16' + - '652ee03ee7b77056a808cd700bc3d9ef826eca9a59be959c' + - '947c865d6b372a1ca2d503d7df6d7611b12111665438475a' + - '1c64145849b3da8c2d343410df892d958db232617f9896f1' + - 'de95b8b5a47132be80dd65298c7f2047858409bf762dbc05' + - 'a62ca392ac40cfb8201a0607a2cae07d99a307625f2b2d04' + - 'fe83fbd3ab53602263410f143b73d5b46fc761882e78c782' + - 'd2c36e716a770a7aefaf7f76cea872db7bffefdbc4c2f9e0' + - '39c19adac915e7a63dcb8c8c78c113f29a3e0bc10e100ce0', - qs: '6f0a2fb763eaeb8eb324d564f03d4a55fdcd709e5f1b65e9' + - '5702b0141182f9f945d71bc3e64a7dfdae7482a7dd5a4e58' + - 'bc38f78de2013f2c468a621f08536969d2c8d011bb3bc259' + - '2124692c91140a5472cad224acdacdeae5751dadfdf068b8' + - '77bfa7374694c6a7be159fc3d24ff9eeeecaf62580427ad8' + - '622d48c51a1c4b1701d768c79d8c819776e096d2694107a2' + - 'f3ec0c32224795b59d32894834039dacb369280afb221bc0' + - '90570a93cf409889b818bb30cccee98b2aa26dbba0f28499' + - '08e1a3cd43fa1f1fb71049e5c77c3724d74dc351d9989057' + - '37bbda3805bd6b1293da8774410fb66e3194e18cdb304dd9' + - 'a0b59b583dcbc9fc045ac9d56aea5cfc9f8a0b95da1e11b7' + - '574d1f976e45fe12294997fac66ca0b83fc056183549e850' + - 'a11413cc4abbe39a211e8c8cbf82f2a23266b3c10ab9e286' + - '07a1b6088909cddff856e1eb6b2cde8bdac53fa939827736' + - 'ca1b892f6c95899613442bd02dbdb747f02487718e2d3f22' + - 'f73734d29767ed8d0e346d0c4098b6fdcb4df7d0c4d29603' + - '5bffe80d6c65ae0a1b814150d349096baaf950f2caf298d2' + - 'b292a1d48cf82b10734fe8cedfa16914076dfe3e9b51337b' + - 'ed28ea1e6824bb717b641ca0e526e175d3e5ed7892aebab0' + - 'f207562cc938a821e2956107c09b6ce4049adddcd0b7505d' + - '49ae6c69a20122461102d465d93dc03db026be54c303613a' + - 'b8e5ce3fd4f65d0b6162ff740a0bf5469ffd442d8c509cd2' + - '3b40dab90f6776ca17fc0678774bd6eee1fa85ababa52ec1' + - 'a15031eb677c6c488661dddd8b83d6031fe294489ded5f08' + - '8ad1689a14baeae7e688afa3033899c81f58de39b392ca94' + - 'af6f15a46f19fa95c06f9493c8b96a9be25e78b9ea35013b' + - 'caa76de6303939299d07426a88a334278fc3d0d9fa71373e' + - 'be51d3c1076ab93a11d3d0d703366ff8cde4c11261d488e5' + - '60a2bdf3bfe2476032294800d6a4a39d306e65c6d7d8d66e' + - '5ec63eee94531e83a9bddc458a2b508285c0ee10b7bd94da' + - '2815a0c5bd5b2e15cbe66355e42f5af8955cdfc0b3a4996d' + - '288db1f4b32b15643b18193e378cb7491f3c3951cdd044b1' + - 'a519571bffac2da986f5f1d506c66530a55f70751e24fa8e' + - 'd83ac2347f4069fb561a5565e78c6f0207da24e889a93a96' + - '65f717d9fe8a2938a09ab5f81be7ccecf466c0397fc15a57' + - '469939793f302739765773c256a3ca55d0548afd117a7cae' + - '98ca7e0d749a130c7b743d376848e255f8fdbe4cb4480b63' + - 'cd2c015d1020cf095d175f3ca9dcdfbaf1b2a6e6468eee4c' + - 'c750f2132a77f376bd9782b9d0ff4da98621b898e251a263' + - '4301ba2214a8c430b2f7a79dbbfd6d7ff6e9b0c137b025ff' + - '587c0bf912f0b19d4fff96b1ecd2ca990c89b386055c60f2' + - '3b94214bd55096f17a7b2c0fa12b333235101cd6f28a128c' + - '782e8a72671adadebbd073ded30bd7f09fb693565dcf0bf3' + - '090c21d13e5b0989dd8956f18f17f4f69449a13549c9d80a' + - '77e5e61b5aeeee9528634100e7bc390672f0ded1ca53555b' + - 'abddbcf700b9da6192255bddf50a76b709fbed251dce4c7e' + - '1ca36b85d1e97c1bc9d38c887a5adf140f9eeef674c31422' + - 'e65f63cae719f8c1324e42fa5fd8500899ef5aa3f9856aa7' + - 'ce10c85600a040343204f36bfeab8cfa6e9deb8a2edd2a8e' + - '018d00c7c9fa3a251ad0f57183c37e6377797653f382ec7a' + - '2b0145e16d3c856bc3634b46d90d7198aff12aff88a30e34' + - 'e2bfaf62705f3382576a9d3eeb0829fca2387b5b654af46e' + - '5cf6316fb57d59e5ea6c369061ac64d99671b0e516529dd5' + - 'd9c48ea0503e55fee090d36c5ea8b5954f6fcc0060794e1c' + - 'b7bc24aa1e5c0142fd4ce6e8fd5aa92a7bf84317ea9e1642' + - 'b6995bac6705adf93cbce72433ed0871139970d640f67b78' + - 'e63a7a6d849db2567df69ac7d79f8c62664ac221df228289' + - 'd0a4f9ebd9acb4f87d49da64e51a619fd3f3baccbd9feb12' + - '5abe0cc2c8d17ed1d8546da2b6c641f4d3020a5f9b9f26ac' + - '16546c2d61385505612275ea344c2bbf1ce890023738f715' + - '5e9eba6a071678c8ebd009c328c3eb643679de86e69a9fa5' + - '67a9e146030ff03d546310a0a568c5ba0070e0da22f2cef8' + - '54714b04d399bbc8fd261f9e8efcd0e83bdbc3f5cfb2d024' + - '3e398478cc598e000124eb8858f9df8f52946c2a1ca5c400' - } -}; diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/node_modules/bn.js/test/pummel/dh-group-test.js b/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/node_modules/bn.js/test/pummel/dh-group-test.js deleted file mode 100644 index 37a259ff..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/node_modules/bn.js/test/pummel/dh-group-test.js +++ /dev/null @@ -1,23 +0,0 @@ -/* global describe, it */ - -var assert = require('assert'); -var BN = require('../../').BN; -var fixtures = require('../fixtures'); - -describe('BN.js/Slow DH test', function () { - var groups = fixtures.dhGroups; - Object.keys(groups).forEach(function (name) { - it('should match public key for ' + name + ' group', function () { - var group = groups[name]; - - this.timeout(3600 * 1000); - - var base = new BN(2); - var mont = BN.red(new BN(group.prime, 16)); - var priv = new BN(group.priv, 16); - var multed = base.toRed(mont).redPow(priv).fromRed(); - var actual = new Buffer(multed.toArray()); - assert.equal(actual.toString('hex'), group.pub); - }); - }); -}); diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/node_modules/bn.js/test/red-test.js b/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/node_modules/bn.js/test/red-test.js deleted file mode 100644 index fc2498c9..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/node_modules/bn.js/test/red-test.js +++ /dev/null @@ -1,263 +0,0 @@ -/* global describe, it */ - -var assert = require('assert'); -var BN = require('../').BN; - -describe('BN.js/Reduction context', function () { - function testMethod (name, fn) { - describe(name + ' method', function () { - it('should support add, iadd, sub, isub operations', function () { - var p = new BN(257); - var m = fn(p); - var a = new BN(123).toRed(m); - var b = new BN(231).toRed(m); - - assert.equal(a.redAdd(b).fromRed().toString(10), '97'); - assert.equal(a.redSub(b).fromRed().toString(10), '149'); - assert.equal(b.redSub(a).fromRed().toString(10), '108'); - - assert.equal(a.clone().redIAdd(b).fromRed().toString(10), '97'); - assert.equal(a.clone().redISub(b).fromRed().toString(10), '149'); - assert.equal(b.clone().redISub(a).fromRed().toString(10), '108'); - }); - - it('should support pow and mul operations', function () { - var p192 = new BN( - 'fffffffffffffffffffffffffffffffeffffffffffffffff', - 16); - var m = fn(p192); - var a = new BN(123); - var b = new BN(231); - var c = a.toRed(m).redMul(b.toRed(m)).fromRed(); - assert(c.cmp(a.mul(b).mod(p192)) === 0); - - assert.equal(a.toRed(m).redPow(new BN(3)).fromRed() - .cmp(a.sqr().mul(a)), 0); - assert.equal(a.toRed(m).redPow(new BN(4)).fromRed() - .cmp(a.sqr().sqr()), 0); - assert.equal(a.toRed(m).redPow(new BN(8)).fromRed() - .cmp(a.sqr().sqr().sqr()), 0); - assert.equal(a.toRed(m).redPow(new BN(9)).fromRed() - .cmp(a.sqr().sqr().sqr().mul(a)), 0); - assert.equal(a.toRed(m).redPow(new BN(17)).fromRed() - .cmp(a.sqr().sqr().sqr().sqr().mul(a)), 0); - assert.equal( - a.toRed(m).redPow(new BN('deadbeefabbadead', 16)).fromRed() - .toString(16), - '3aa0e7e304e320b68ef61592bcb00341866d6fa66e11a4d6'); - }); - - it('should sqrtm numbers', function () { - var p = new BN(263); - var m = fn(p); - var q = new BN(11).toRed(m); - - var qr = q.redSqrt(); - assert.equal(qr.redSqr().cmp(q), 0); - - qr = q.redSqrt(); - assert.equal(qr.redSqr().cmp(q), 0); - - p = new BN( - 'fffffffffffffffffffffffffffffffeffffffffffffffff', - 16); - m = fn(p); - - q = new BN(13).toRed(m); - qr = q.redSqrt(true, p); - assert.equal(qr.redSqr().cmp(q), 0); - - qr = q.redSqrt(false, p); - assert.equal(qr.redSqr().cmp(q), 0); - - // Tonelli-shanks - p = new BN(13); - m = fn(p); - q = new BN(10).toRed(m); - assert.equal(q.redSqrt().fromRed().toString(10), '7'); - }); - - it('should invm numbers', function () { - var p = new BN(257); - var m = fn(p); - var a = new BN(3).toRed(m); - var b = a.redInvm(); - assert.equal(a.redMul(b).fromRed().toString(16), '1'); - }); - - it('should invm numbers (regression)', function () { - var p = new BN( - 'ffffffff00000001000000000000000000000000ffffffffffffffffffffffff', - 16); - var a = new BN( - 'e1d969b8192fbac73ea5b7921896d6a2263d4d4077bb8e5055361d1f7f8163f3', - 16); - - var m = fn(p); - a = a.toRed(m); - - assert.equal(a.redInvm().fromRed().negative, 0); - }); - - it('should imul numbers', function () { - var p = new BN( - 'fffffffffffffffffffffffffffffffeffffffffffffffff', - 16); - var m = fn(p); - - var a = new BN('deadbeefabbadead', 16); - var b = new BN('abbadeadbeefdead', 16); - var c = a.mul(b).mod(p); - - assert.equal(a.toRed(m).redIMul(b.toRed(m)).fromRed().toString(16), - c.toString(16)); - }); - - it('should pow(base, 0) == 1', function () { - var base = new BN(256).toRed(BN.red('k256')); - var exponent = new BN(0); - var result = base.redPow(exponent); - assert.equal(result.toString(), '1'); - }); - - it('should shl numbers', function () { - var base = new BN(256).toRed(BN.red('k256')); - var result = base.redShl(1); - assert.equal(result.toString(), '512'); - }); - - it('should reduce when converting to red', function () { - var p = new BN(257); - var m = fn(p); - var a = new BN(5).toRed(m); - - assert.doesNotThrow(function () { - var b = a.redISub(new BN(512).toRed(m)); - b.redISub(new BN(512).toRed(m)); - }); - }); - - it('redNeg and zero value', function () { - var a = new BN(0).toRed(BN.red('k256')).redNeg(); - assert.equal(a.isZero(), true); - }); - - it('should not allow modulus <= 1', function () { - assert.throws(function () { - BN.red(new BN(0)); - }, /^Error: modulus must be greater than 1$/); - - assert.throws(function () { - BN.red(new BN(1)); - }, /^Error: modulus must be greater than 1$/); - - assert.doesNotThrow(function () { - BN.red(new BN(2)); - }); - }); - }); - } - - testMethod('Plain', BN.red); - testMethod('Montgomery', BN.mont); - - describe('Pseudo-Mersenne Primes', function () { - it('should reduce numbers mod k256', function () { - var p = BN._prime('k256'); - - assert.equal(p.ireduce(new BN(0xdead)).toString(16), 'dead'); - assert.equal(p.ireduce(new BN('deadbeef', 16)).toString(16), 'deadbeef'); - - var num = new BN('fedcba9876543210fedcba9876543210dead' + - 'fedcba9876543210fedcba9876543210dead', - 16); - var exp = num.mod(p.p).toString(16); - assert.equal(p.ireduce(num).toString(16), exp); - - var regr = new BN('f7e46df64c1815962bf7bc9c56128798' + - '3f4fcef9cb1979573163b477eab93959' + - '335dfb29ef07a4d835d22aa3b6797760' + - '70a8b8f59ba73d56d01a79af9', - 16); - exp = regr.mod(p.p).toString(16); - - assert.equal(p.ireduce(regr).toString(16), exp); - }); - - it('should not fail to invm number mod k256', function () { - var regr2 = new BN( - '6c150c4aa9a8cf1934485d40674d4a7cd494675537bda36d49405c5d2c6f496f', 16); - regr2 = regr2.toRed(BN.red('k256')); - assert.equal(regr2.redInvm().redMul(regr2).fromRed().cmpn(1), 0); - }); - - it('should correctly square the number', function () { - var p = BN._prime('k256').p; - var red = BN.red('k256'); - - var n = new BN('9cd8cb48c3281596139f147c1364a3ed' + - 'e88d3f310fdb0eb98c924e599ca1b3c9', - 16); - var expected = n.sqr().mod(p); - var actual = n.toRed(red).redSqr().fromRed(); - - assert.equal(actual.toString(16), expected.toString(16)); - }); - - it('redISqr should return right result', function () { - var n = new BN('30f28939', 16); - var actual = n.toRed(BN.red('k256')).redISqr().fromRed(); - assert.equal(actual.toString(16), '95bd93d19520eb1'); - }); - }); - - it('should avoid 4.1.0 regresion', function () { - function bits2int (obits, q) { - var bits = new BN(obits); - var shift = (obits.length << 3) - q.bitLength(); - if (shift > 0) { - bits.ishrn(shift); - } - return bits; - } - var t = new Buffer('aff1651e4cd6036d57aa8b2a05ccf1a9d5a40166340ecbbdc55' + - 'be10b568aa0aa3d05ce9a2fcec9df8ed018e29683c6051cb83e' + - '46ce31ba4edb045356a8d0d80b', 'hex'); - var g = new BN('5c7ff6b06f8f143fe8288433493e4769c4d988ace5be25a0e24809670' + - '716c613d7b0cee6932f8faa7c44d2cb24523da53fbe4f6ec3595892d1' + - 'aa58c4328a06c46a15662e7eaa703a1decf8bbb2d05dbe2eb956c142a' + - '338661d10461c0d135472085057f3494309ffa73c611f78b32adbb574' + - '0c361c9f35be90997db2014e2ef5aa61782f52abeb8bd6432c4dd097b' + - 'c5423b285dafb60dc364e8161f4a2a35aca3a10b1c4d203cc76a470a3' + - '3afdcbdd92959859abd8b56e1725252d78eac66e71ba9ae3f1dd24871' + - '99874393cd4d832186800654760e1e34c09e4d155179f9ec0dc4473f9' + - '96bdce6eed1cabed8b6f116f7ad9cf505df0f998e34ab27514b0ffe7', - 16); - var p = new BN('9db6fb5951b66bb6fe1e140f1d2ce5502374161fd6538df1648218642' + - 'f0b5c48c8f7a41aadfa187324b87674fa1822b00f1ecf8136943d7c55' + - '757264e5a1a44ffe012e9936e00c1d3e9310b01c7d179805d3058b2a9' + - 'f4bb6f9716bfe6117c6b5b3cc4d9be341104ad4a80ad6c94e005f4b99' + - '3e14f091eb51743bf33050c38de235567e1b34c3d6a5c0ceaa1a0f368' + - '213c3d19843d0b4b09dcb9fc72d39c8de41f1bf14d4bb4563ca283716' + - '21cad3324b6a2d392145bebfac748805236f5ca2fe92b871cd8f9c36d' + - '3292b5509ca8caa77a2adfc7bfd77dda6f71125a7456fea153e433256' + - 'a2261c6a06ed3693797e7995fad5aabbcfbe3eda2741e375404ae25b', - 16); - var q = new BN('f2c3119374ce76c9356990b465374a17f23f9ed35089bd969f61c6dde' + - '9998c1f', 16); - var k = bits2int(t, q); - var expectedR = '89ec4bb1400eccff8e7d9aa515cd1de7803f2daff09693ee7fd1353e' + - '90a68307'; - var r = g.toRed(BN.mont(p)).redPow(k).fromRed().mod(q); - assert.equal(r.toString(16), expectedR); - }); - - it('K256.split for 512 bits number should return equal numbers', function () { - var red = BN.red('k256'); - var input = new BN(1).iushln(512).subn(1); - assert.equal(input.bitLength(), 512); - var output = new BN(0); - red.prime.split(input, output); - assert.equal(input.cmp(output), 0); - }); -}); diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/node_modules/bn.js/test/utils-test.js b/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/node_modules/bn.js/test/utils-test.js deleted file mode 100644 index 8571905a..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/node_modules/bn.js/test/utils-test.js +++ /dev/null @@ -1,345 +0,0 @@ -/* global describe, it */ - -var assert = require('assert'); -var BN = require('../').BN; - -describe('BN.js/Utils', function () { - describe('.toString()', function () { - describe('binary padding', function () { - it('should have a length of 256', function () { - var a = new BN(0); - - assert.equal(a.toString(2, 256).length, 256); - }); - }); - describe('hex padding', function () { - it('should have length of 8 from leading 15', function () { - var a = new BN('ffb9602', 16); - - assert.equal(a.toString('hex', 2).length, 8); - }); - - it('should have length of 8 from leading zero', function () { - var a = new BN('fb9604', 16); - - assert.equal(a.toString('hex', 8).length, 8); - }); - - it('should have length of 8 from leading zeros', function () { - var a = new BN(0); - - assert.equal(a.toString('hex', 8).length, 8); - }); - - it('should have length of 64 from leading 15', function () { - var a = new BN( - 'ffb96ff654e61130ba8422f0debca77a0ea74ae5ea8bca9b54ab64aabf01003', - 16); - - assert.equal(a.toString('hex', 2).length, 64); - }); - - it('should have length of 64 from leading zero', function () { - var a = new BN( - 'fb96ff654e61130ba8422f0debca77a0ea74ae5ea8bca9b54ab64aabf01003', - 16); - - assert.equal(a.toString('hex', 64).length, 64); - }); - }); - }); - - describe('.isNeg()', function () { - it('should return true for negative numbers', function () { - assert.equal(new BN(-1).isNeg(), true); - assert.equal(new BN(1).isNeg(), false); - assert.equal(new BN(0).isNeg(), false); - assert.equal(new BN('-0', 10).isNeg(), false); - }); - }); - - describe('.isOdd()', function () { - it('should return true for odd numbers', function () { - assert.equal(new BN(0).isOdd(), false); - assert.equal(new BN(1).isOdd(), true); - assert.equal(new BN(2).isOdd(), false); - assert.equal(new BN('-0', 10).isOdd(), false); - assert.equal(new BN('-1', 10).isOdd(), true); - assert.equal(new BN('-2', 10).isOdd(), false); - }); - }); - - describe('.isEven()', function () { - it('should return true for even numbers', function () { - assert.equal(new BN(0).isEven(), true); - assert.equal(new BN(1).isEven(), false); - assert.equal(new BN(2).isEven(), true); - assert.equal(new BN('-0', 10).isEven(), true); - assert.equal(new BN('-1', 10).isEven(), false); - assert.equal(new BN('-2', 10).isEven(), true); - }); - }); - - describe('.isZero()', function () { - it('should return true for zero', function () { - assert.equal(new BN(0).isZero(), true); - assert.equal(new BN(1).isZero(), false); - assert.equal(new BN(0xffffffff).isZero(), false); - }); - }); - - describe('.bitLength()', function () { - it('should return proper bitLength', function () { - assert.equal(new BN(0).bitLength(), 0); - assert.equal(new BN(0x1).bitLength(), 1); - assert.equal(new BN(0x2).bitLength(), 2); - assert.equal(new BN(0x3).bitLength(), 2); - assert.equal(new BN(0x4).bitLength(), 3); - assert.equal(new BN(0x8).bitLength(), 4); - assert.equal(new BN(0x10).bitLength(), 5); - assert.equal(new BN(0x100).bitLength(), 9); - assert.equal(new BN(0x123456).bitLength(), 21); - assert.equal(new BN('123456789', 16).bitLength(), 33); - assert.equal(new BN('8023456789', 16).bitLength(), 40); - }); - }); - - describe('.byteLength()', function () { - it('should return proper byteLength', function () { - assert.equal(new BN(0).byteLength(), 0); - assert.equal(new BN(0x1).byteLength(), 1); - assert.equal(new BN(0x2).byteLength(), 1); - assert.equal(new BN(0x3).byteLength(), 1); - assert.equal(new BN(0x4).byteLength(), 1); - assert.equal(new BN(0x8).byteLength(), 1); - assert.equal(new BN(0x10).byteLength(), 1); - assert.equal(new BN(0x100).byteLength(), 2); - assert.equal(new BN(0x123456).byteLength(), 3); - assert.equal(new BN('123456789', 16).byteLength(), 5); - assert.equal(new BN('8023456789', 16).byteLength(), 5); - }); - }); - - describe('.toArray()', function () { - it('should return [ 0 ] for `0`', function () { - var n = new BN(0); - assert.deepEqual(n.toArray('be'), [ 0 ]); - assert.deepEqual(n.toArray('le'), [ 0 ]); - }); - - it('should zero pad to desired lengths', function () { - var n = new BN(0x123456); - assert.deepEqual(n.toArray('be', 5), [ 0x00, 0x00, 0x12, 0x34, 0x56 ]); - assert.deepEqual(n.toArray('le', 5), [ 0x56, 0x34, 0x12, 0x00, 0x00 ]); - }); - - it('should throw when naturally larger than desired length', function () { - var n = new BN(0x123456); - assert.throws(function () { - n.toArray('be', 2); - }, /^Error: byte array longer than desired length$/); - }); - }); - - describe('.toBuffer', function () { - it('should return proper Buffer', function () { - var n = new BN(0x123456); - assert.deepEqual(n.toBuffer('be', 5).toString('hex'), '0000123456'); - assert.deepEqual(n.toBuffer('le', 5).toString('hex'), '5634120000'); - }); - }); - - describe('.toNumber()', function () { - it('should return proper Number if below the limit', function () { - assert.deepEqual(new BN(0x123456).toNumber(), 0x123456); - assert.deepEqual(new BN(0x3ffffff).toNumber(), 0x3ffffff); - assert.deepEqual(new BN(0x4000000).toNumber(), 0x4000000); - assert.deepEqual(new BN(0x10000000000000).toNumber(), 0x10000000000000); - assert.deepEqual(new BN(0x10040004004000).toNumber(), 0x10040004004000); - assert.deepEqual(new BN(-0x123456).toNumber(), -0x123456); - assert.deepEqual(new BN(-0x3ffffff).toNumber(), -0x3ffffff); - assert.deepEqual(new BN(-0x4000000).toNumber(), -0x4000000); - assert.deepEqual(new BN(-0x10000000000000).toNumber(), -0x10000000000000); - assert.deepEqual(new BN(-0x10040004004000).toNumber(), -0x10040004004000); - }); - - it('should throw when number exceeds 53 bits', function () { - var n = new BN(1).iushln(54); - assert.throws(function () { - n.toNumber(); - }, /^Error: Number can only safely store up to 53 bits$/); - }); - }); - - describe('.zeroBits()', function () { - it('should return proper zeroBits', function () { - assert.equal(new BN(0).zeroBits(), 0); - assert.equal(new BN(0x1).zeroBits(), 0); - assert.equal(new BN(0x2).zeroBits(), 1); - assert.equal(new BN(0x3).zeroBits(), 0); - assert.equal(new BN(0x4).zeroBits(), 2); - assert.equal(new BN(0x8).zeroBits(), 3); - assert.equal(new BN(0x10).zeroBits(), 4); - assert.equal(new BN(0x100).zeroBits(), 8); - assert.equal(new BN(0x1000000).zeroBits(), 24); - assert.equal(new BN(0x123456).zeroBits(), 1); - }); - }); - - describe('.toJSON', function () { - it('should return hex string', function () { - assert.equal(new BN(0x123).toJSON(), '123'); - }); - }); - - describe('.cmpn', function () { - it('should return -1, 0, 1 correctly', function () { - assert.equal(new BN(42).cmpn(42), 0); - assert.equal(new BN(42).cmpn(43), -1); - assert.equal(new BN(42).cmpn(41), 1); - assert.equal(new BN(0x3fffffe).cmpn(0x3fffffe), 0); - assert.equal(new BN(0x3fffffe).cmpn(0x3ffffff), -1); - assert.equal(new BN(0x3fffffe).cmpn(0x3fffffd), 1); - assert.throws(function () { - new BN(0x3fffffe).cmpn(0x4000000); - }, /^Error: Number is too big$/); - assert.equal(new BN(42).cmpn(-42), 1); - assert.equal(new BN(-42).cmpn(42), -1); - assert.equal(new BN(-42).cmpn(-42), 0); - assert.equal(1 / new BN(-42).cmpn(-42), Infinity); - }); - }); - - describe('.cmp', function () { - it('should return -1, 0, 1 correctly', function () { - assert.equal(new BN(42).cmp(new BN(42)), 0); - assert.equal(new BN(42).cmp(new BN(43)), -1); - assert.equal(new BN(42).cmp(new BN(41)), 1); - assert.equal(new BN(0x3fffffe).cmp(new BN(0x3fffffe)), 0); - assert.equal(new BN(0x3fffffe).cmp(new BN(0x3ffffff)), -1); - assert.equal(new BN(0x3fffffe).cmp(new BN(0x3fffffd)), 1); - assert.equal(new BN(0x3fffffe).cmp(new BN(0x4000000)), -1); - assert.equal(new BN(42).cmp(new BN(-42)), 1); - assert.equal(new BN(-42).cmp(new BN(42)), -1); - assert.equal(new BN(-42).cmp(new BN(-42)), 0); - assert.equal(1 / new BN(-42).cmp(new BN(-42)), Infinity); - }); - }); - - describe('comparison shorthands', function () { - it('.gtn greater than', function () { - assert.equal(new BN(3).gtn(2), true); - assert.equal(new BN(3).gtn(3), false); - assert.equal(new BN(3).gtn(4), false); - }); - it('.gt greater than', function () { - assert.equal(new BN(3).gt(new BN(2)), true); - assert.equal(new BN(3).gt(new BN(3)), false); - assert.equal(new BN(3).gt(new BN(4)), false); - }); - it('.gten greater than or equal', function () { - assert.equal(new BN(3).gten(3), true); - assert.equal(new BN(3).gten(2), true); - assert.equal(new BN(3).gten(4), false); - }); - it('.gte greater than or equal', function () { - assert.equal(new BN(3).gte(new BN(3)), true); - assert.equal(new BN(3).gte(new BN(2)), true); - assert.equal(new BN(3).gte(new BN(4)), false); - }); - it('.ltn less than', function () { - assert.equal(new BN(2).ltn(3), true); - assert.equal(new BN(2).ltn(2), false); - assert.equal(new BN(2).ltn(1), false); - }); - it('.lt less than', function () { - assert.equal(new BN(2).lt(new BN(3)), true); - assert.equal(new BN(2).lt(new BN(2)), false); - assert.equal(new BN(2).lt(new BN(1)), false); - }); - it('.lten less than or equal', function () { - assert.equal(new BN(3).lten(3), true); - assert.equal(new BN(3).lten(2), false); - assert.equal(new BN(3).lten(4), true); - }); - it('.lte less than or equal', function () { - assert.equal(new BN(3).lte(new BN(3)), true); - assert.equal(new BN(3).lte(new BN(2)), false); - assert.equal(new BN(3).lte(new BN(4)), true); - }); - it('.eqn equal', function () { - assert.equal(new BN(3).eqn(3), true); - assert.equal(new BN(3).eqn(2), false); - assert.equal(new BN(3).eqn(4), false); - }); - it('.eq equal', function () { - assert.equal(new BN(3).eq(new BN(3)), true); - assert.equal(new BN(3).eq(new BN(2)), false); - assert.equal(new BN(3).eq(new BN(4)), false); - }); - }); - - describe('.fromTwos', function () { - it('should convert from two\'s complement to negative number', function () { - assert.equal(new BN('00000000', 16).fromTwos(32).toNumber(), 0); - assert.equal(new BN('00000001', 16).fromTwos(32).toNumber(), 1); - assert.equal(new BN('7fffffff', 16).fromTwos(32).toNumber(), 2147483647); - assert.equal(new BN('80000000', 16).fromTwos(32).toNumber(), -2147483648); - assert.equal(new BN('f0000000', 16).fromTwos(32).toNumber(), -268435456); - assert.equal(new BN('f1234567', 16).fromTwos(32).toNumber(), -249346713); - assert.equal(new BN('ffffffff', 16).fromTwos(32).toNumber(), -1); - assert.equal(new BN('fffffffe', 16).fromTwos(32).toNumber(), -2); - assert.equal(new BN('fffffffffffffffffffffffffffffffe', 16) - .fromTwos(128).toNumber(), -2); - assert.equal(new BN('ffffffffffffffffffffffffffffffff' + - 'fffffffffffffffffffffffffffffffe', 16).fromTwos(256).toNumber(), -2); - assert.equal(new BN('ffffffffffffffffffffffffffffffff' + - 'ffffffffffffffffffffffffffffffff', 16).fromTwos(256).toNumber(), -1); - assert.equal(new BN('7fffffffffffffffffffffffffffffff' + - 'ffffffffffffffffffffffffffffffff', 16).fromTwos(256).toString(10), - new BN('5789604461865809771178549250434395392663499' + - '2332820282019728792003956564819967', 10).toString(10)); - assert.equal(new BN('80000000000000000000000000000000' + - '00000000000000000000000000000000', 16).fromTwos(256).toString(10), - new BN('-578960446186580977117854925043439539266349' + - '92332820282019728792003956564819968', 10).toString(10)); - }); - }); - - describe('.toTwos', function () { - it('should convert from negative number to two\'s complement', function () { - assert.equal(new BN(0).toTwos(32).toString(16), '0'); - assert.equal(new BN(1).toTwos(32).toString(16), '1'); - assert.equal(new BN(2147483647).toTwos(32).toString(16), '7fffffff'); - assert.equal(new BN('-2147483648', 10).toTwos(32).toString(16), '80000000'); - assert.equal(new BN('-268435456', 10).toTwos(32).toString(16), 'f0000000'); - assert.equal(new BN('-249346713', 10).toTwos(32).toString(16), 'f1234567'); - assert.equal(new BN('-1', 10).toTwos(32).toString(16), 'ffffffff'); - assert.equal(new BN('-2', 10).toTwos(32).toString(16), 'fffffffe'); - assert.equal(new BN('-2', 10).toTwos(128).toString(16), - 'fffffffffffffffffffffffffffffffe'); - assert.equal(new BN('-2', 10).toTwos(256).toString(16), - 'fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe'); - assert.equal(new BN('-1', 10).toTwos(256).toString(16), - 'ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff'); - assert.equal(new BN('5789604461865809771178549250434395392663' + - '4992332820282019728792003956564819967', 10).toTwos(256).toString(16), - '7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff'); - assert.equal(new BN('-578960446186580977117854925043439539266' + - '34992332820282019728792003956564819968', 10).toTwos(256).toString(16), - '8000000000000000000000000000000000000000000000000000000000000000'); - }); - }); - - describe('.isBN', function () { - it('should return true for BN', function () { - assert.equal(BN.isBN(new BN()), true); - }); - - it('should return false for everything else', function () { - assert.equal(BN.isBN(1), false); - assert.equal(BN.isBN([]), false); - assert.equal(BN.isBN({}), false); - }); - }); -}); diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/node_modules/bn.js/util/genCombMulTo.js b/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/node_modules/bn.js/util/genCombMulTo.js deleted file mode 100644 index 8b456c7c..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/node_modules/bn.js/util/genCombMulTo.js +++ /dev/null @@ -1,65 +0,0 @@ -'use strict'; - -// NOTE: This could be potentionally used to generate loop-less multiplications -function genCombMulTo (alen, blen) { - var len = alen + blen - 1; - var src = [ - 'var a = self.words;', - 'var b = num.words;', - 'var o = out.words;', - 'var c = 0;', - 'var lo;', - 'var mid;', - 'var hi;' - ]; - for (var i = 0; i < alen; i++) { - src.push('var a' + i + ' = a[' + i + '] | 0;'); - src.push('var al' + i + ' = a' + i + ' & 0x1fff;'); - src.push('var ah' + i + ' = a' + i + ' >>> 13;'); - } - for (i = 0; i < blen; i++) { - src.push('var b' + i + ' = b[' + i + '] | 0;'); - src.push('var bl' + i + ' = b' + i + ' & 0x1fff;'); - src.push('var bh' + i + ' = b' + i + ' >>> 13;'); - } - src.push(''); - src.push('out.negative = self.negative ^ num.negative;'); - src.push('out.length = ' + len + ';'); - - for (var k = 0; k < len; k++) { - var minJ = Math.max(0, k - alen + 1); - var maxJ = Math.min(k, blen - 1); - - src.push('\/* k = ' + k + ' *\/'); - src.push('var w' + k + ' = c;'); - src.push('c = 0;'); - for (var j = minJ; j <= maxJ; j++) { - i = k - j; - - src.push('lo = Math.imul(al' + i + ', bl' + j + ');'); - src.push('mid = Math.imul(al' + i + ', bh' + j + ');'); - src.push('mid = (mid + Math.imul(ah' + i + ', bl' + j + ')) | 0;'); - src.push('hi = Math.imul(ah' + i + ', bh' + j + ');'); - - src.push('w' + k + ' = (w' + k + ' + lo) | 0;'); - src.push('w' + k + ' = (w' + k + ' + ((mid & 0x1fff) << 13)) | 0;'); - src.push('c = (c + hi) | 0;'); - src.push('c = (c + (mid >>> 13)) | 0;'); - src.push('c = (c + (w' + k + ' >>> 26)) | 0;'); - src.push('w' + k + ' &= 0x3ffffff;'); - } - } - // Store in separate step for better memory access - for (k = 0; k < len; k++) { - src.push('o[' + k + '] = w' + k + ';'); - } - src.push('if (c !== 0) {', - ' o[' + k + '] = c;', - ' out.length++;', - '}', - 'return out;'); - - return src.join('\n'); -} - -console.log(genCombMulTo(10, 10)); diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/node_modules/bn.js/util/genCombMulTo10.js b/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/node_modules/bn.js/util/genCombMulTo10.js deleted file mode 100644 index cf2e6e80..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/node_modules/bn.js/util/genCombMulTo10.js +++ /dev/null @@ -1,65 +0,0 @@ -'use strict'; - -function genCombMulTo (alen, blen) { - var len = alen + blen - 1; - var src = [ - 'var a = self.words;', - 'var b = num.words;', - 'var o = out.words;', - 'var c = 0;', - 'var lo;', - 'var mid;', - 'var hi;' - ]; - for (var i = 0; i < alen; i++) { - src.push('var a' + i + ' = a[' + i + '] | 0;'); - src.push('var al' + i + ' = a' + i + ' & 0x1fff;'); - src.push('var ah' + i + ' = a' + i + ' >>> 13;'); - } - for (i = 0; i < blen; i++) { - src.push('var b' + i + ' = b[' + i + '] | 0;'); - src.push('var bl' + i + ' = b' + i + ' & 0x1fff;'); - src.push('var bh' + i + ' = b' + i + ' >>> 13;'); - } - src.push(''); - src.push('out.negative = self.negative ^ num.negative;'); - src.push('out.length = ' + len + ';'); - - for (var k = 0; k < len; k++) { - var minJ = Math.max(0, k - alen + 1); - var maxJ = Math.min(k, blen - 1); - - src.push('\/* k = ' + k + ' *\/'); - src.push('lo = Math.imul(al' + (k - minJ) + ', bl' + minJ + ');'); - src.push('mid = Math.imul(al' + (k - minJ) + ', bh' + minJ + ');'); - src.push( - 'mid = (mid + Math.imul(ah' + (k - minJ) + ', bl' + minJ + ')) | 0;'); - src.push('hi = Math.imul(ah' + (k - minJ) + ', bh' + minJ + ');'); - - for (var j = minJ + 1; j <= maxJ; j++) { - i = k - j; - - src.push('lo = (lo + Math.imul(al' + i + ', bl' + j + ')) | 0;'); - src.push('mid = (mid + Math.imul(al' + i + ', bh' + j + ')) | 0;'); - src.push('mid = (mid + Math.imul(ah' + i + ', bl' + j + ')) | 0;'); - src.push('hi = (hi + Math.imul(ah' + i + ', bh' + j + ')) | 0;'); - } - - src.push('var w' + k + ' = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;'); - src.push('c = (((hi + (mid >>> 13)) | 0) + (w' + k + ' >>> 26)) | 0;'); - src.push('w' + k + ' &= 0x3ffffff;'); - } - // Store in separate step for better memory access - for (k = 0; k < len; k++) { - src.push('o[' + k + '] = w' + k + ';'); - } - src.push('if (c !== 0) {', - ' o[' + k + '] = c;', - ' out.length++;', - '}', - 'return out;'); - - return src.join('\n'); -} - -console.log(genCombMulTo(10, 10)); diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/node_modules/browserify-rsa/.travis.yml b/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/node_modules/browserify-rsa/.travis.yml deleted file mode 100644 index 20229620..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/node_modules/browserify-rsa/.travis.yml +++ /dev/null @@ -1,3 +0,0 @@ -language: node_js -node_js: - - "0.11" \ No newline at end of file diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/node_modules/browserify-rsa/LICENSE b/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/node_modules/browserify-rsa/LICENSE deleted file mode 100644 index f6d285c0..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/node_modules/browserify-rsa/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2014-2015 Calvin Metcalf & contributors - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/node_modules/browserify-rsa/index.js b/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/node_modules/browserify-rsa/index.js deleted file mode 100644 index 2b301cdb..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/node_modules/browserify-rsa/index.js +++ /dev/null @@ -1,40 +0,0 @@ -var bn = require('bn.js'); -var randomBytes = require('randombytes'); -module.exports = crt; -function blind(priv) { - var r = getr(priv); - var blinder = r.toRed(bn.mont(priv.modulus)) - .redPow(new bn(priv.publicExponent)).fromRed(); - return { - blinder: blinder, - unblinder:r.invm(priv.modulus) - }; -} -function crt(msg, priv) { - var blinds = blind(priv); - var len = priv.modulus.byteLength(); - var mod = bn.mont(priv.modulus); - var blinded = new bn(msg).mul(blinds.blinder).umod(priv.modulus); - var c1 = blinded.toRed(bn.mont(priv.prime1)); - var c2 = blinded.toRed(bn.mont(priv.prime2)); - var qinv = priv.coefficient; - var p = priv.prime1; - var q = priv.prime2; - var m1 = c1.redPow(priv.exponent1); - var m2 = c2.redPow(priv.exponent2); - m1 = m1.fromRed(); - m2 = m2.fromRed(); - var h = m1.isub(m2).imul(qinv).umod(p); - h.imul(q); - m2.iadd(h); - return new Buffer(m2.imul(blinds.unblinder).umod(priv.modulus).toArray(false, len)); -} -crt.getr = getr; -function getr(priv) { - var len = priv.modulus.byteLength(); - var r = new bn(randomBytes(len)); - while (r.cmp(priv.modulus) >= 0 || !r.umod(priv.prime1) || !r.umod(priv.prime2)) { - r = new bn(randomBytes(len)); - } - return r; -} diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/node_modules/browserify-rsa/package.json b/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/node_modules/browserify-rsa/package.json deleted file mode 100644 index 5658b05e..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/node_modules/browserify-rsa/package.json +++ /dev/null @@ -1,71 +0,0 @@ -{ - "name": "browserify-rsa", - "version": "4.0.1", - "description": "RSA for browserify", - "main": "index.js", - "scripts": { - "test": "node test.js | tspec" - }, - "author": "", - "license": "MIT", - "dependencies": { - "bn.js": "^4.1.0", - "randombytes": "^2.0.1" - }, - "repository": { - "type": "git", - "url": "git+ssh://git@github.com/crypto-browserify/browserify-rsa.git" - }, - "devDependencies": { - "parse-asn1": "^5.0.0", - "tap-spec": "^2.1.2", - "tape": "^3.0.3" - }, - "gitHead": "63b22b3306a8a55b6c2d4f34e2c331db0c8398e7", - "bugs": { - "url": "https://github.com/crypto-browserify/browserify-rsa/issues" - }, - "homepage": "https://github.com/crypto-browserify/browserify-rsa#readme", - "_id": "browserify-rsa@4.0.1", - "_shasum": "21e0abfaf6f2029cf2fafb133567a701d4135524", - "_from": "browserify-rsa@>=4.0.0 <5.0.0", - "_npmVersion": "3.7.3", - "_nodeVersion": "5.7.0", - "_npmUser": { - "name": "dcousens", - "email": "email@dcousens.com" - }, - "dist": { - "shasum": "21e0abfaf6f2029cf2fafb133567a701d4135524", - "tarball": "https://registry.npmjs.org/browserify-rsa/-/browserify-rsa-4.0.1.tgz" - }, - "maintainers": [ - { - "name": "cwmma", - "email": "calvin.metcalf@gmail.com" - }, - { - "name": "dcousens", - "email": "email@dcousens.com" - }, - { - "name": "dominictarr", - "email": "dominic.tarr@gmail.com" - }, - { - "name": "jprichardson", - "email": "jprichardson@gmail.com" - }, - { - "name": "indutny", - "email": "fedor@indutny.com" - } - ], - "_npmOperationalInternal": { - "host": "packages-6-west.internal.npmjs.com", - "tmp": "tmp/browserify-rsa-4.0.1.tgz_1456441196079_0.6414434532634914" - }, - "directories": {}, - "_resolved": "https://registry.npmjs.org/browserify-rsa/-/browserify-rsa-4.0.1.tgz", - "readme": "ERROR: No README data found!" -} diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/node_modules/browserify-rsa/readme.md b/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/node_modules/browserify-rsa/readme.md deleted file mode 100644 index 370fd95e..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/node_modules/browserify-rsa/readme.md +++ /dev/null @@ -1,10 +0,0 @@ -browserify-rsa -==== -[![Build Status](https://travis-ci.org/crypto-browserify/browserify-rsa.svg)](https://travis-ci.org/crypto-browserify/browserify-rsa) - -RSA private decryption/signing using chinese remainder and blinding. - -API -==== - -Give it a message as a buffer and a private key (as decoded by https://www.npmjs.com/package/parse-asn1) and it returns encrypted data as a buffer. diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/node_modules/browserify-rsa/test.js b/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/node_modules/browserify-rsa/test.js deleted file mode 100644 index 3d79a6d3..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/node_modules/browserify-rsa/test.js +++ /dev/null @@ -1,53 +0,0 @@ -var keys = [ - new Buffer('2d2d2d2d2d424547494e2050524956415445204b45592d2d2d2d2d0a4d494943647749424144414e42676b71686b6947397730424151454641415343416d457767674a6441674541416f4742414b756c55545a3842317163635a38630a44585247535930386757384b764c6c63787878474334675a484e543343425546386e3552344b453330615a79595a2f727473515a7530356a755a4a78614a30710a6d62653735646c5135642b586339424d586551672f4d70545a773554414e374f4964475959704642652b31504c5a367745666a6b59724d714d55636671324c710a68544c64416276424a6e755263595a4c716d42654f51384654724b7241674d4241414543675945416e6b485262455055332f57495353517250333669794362320a532f53425a774b6b7a6d764372427844576850654473777039632f324a593736724e57664c7a793869586755473857557a76486a653631516833676d42634b650a62556154476c34567938486131594241446f3552665272646d3046453474766776752f546b7146717042425a7765753534323835686b357a6c47376e2f4437590a646e4e58557075354d6c4e623578336757306b43515144554c2f2f637763585578592f6576614a50346a53652b5a7745515a6f2b7a58524c695055756c426f560a6177323843564d757864677771416f315831494b65665065556166375251753867434b61526e704775457558416b45417a785a54664d6d766d435544496577340a35476b36624b3236355851576468636769713235346c7042474f596d446a397943453779412b7a6d415351774d73585464514f6931684f434579725875534a350a632b2b4544514a4146683357726e7a6f455042797559584d6d45543874534652574d51357670674e716833686148523562346755433268786169756e43424e4c0a315270565939416f55694479774763472f5350683933436e4b42336e69774a42414b503741747369665a6756587469697a4234614d5468546a565961535a727a0a44304b6739447548796c706b4443686d467537375447724e55516741567559746668622f6252626c56612f4630684a3465514854334a554351425654363874620a4f6752556b30615039744333303231564e383258362b6b6c6f7753514e386f425058382b546644575355696c702f2b6a3234486b792b5a3239446f3779522f520a7175746e4c39324376426c564c56343d0a2d2d2d2d2d454e442050524956415445204b45592d2d2d2d2d0a', 'hex'), - new Buffer('2d2d2d2d2d424547494e205253412050524956415445204b45592d2d2d2d2d0a4d4949435641494241414a2f4f77737762466f2f757943386c7447662f794131412b6756354947646e4167506255534933477a624843412b782b544c472f744c0a76625277337231736d7070592f6a6b6b70695657314572534d754e307569787035676237385a39724831587057623557576770335761592f3945484d6a4d644f0a6b512f394c565a7652766c2f4d2f4669366f77502b712b616d4a493142456a454359666268474c33726d6c5664713471586334305177494441514142416e38490a565a3042506f414f68794633334b464d4878793872323866735667784a5559674d334e715167647634664661774359586a684a7a3964755535594a47464a474a0a57554765486c6b7959466c70693466336d377459374a61776d51555742304d4e536f4b48493363674458342f7466424e386e692b634f3065536f5235637a42590a4573414842553437703161774e46414877642b5a457576394834526d4d6e37703237397251547470416b4148334e7173322f7672524632635a554e34664958660a347848735142427955617947713861334a305547615346577636387a54554b466865727239755a6f744e70374e4a346a425869415277307138646f63585547310a416b4148676d4f4b486f4f5274416d696b71706d46454a5a4f7473584d614c43496d3445737a506f356369596f4c4d42635669743039416469516c74375a4a4c0a445930327376553162306167435a39376b446b6d48446b58416b414361384d394a454c7544732f502f76494759446b4d566174494666573662574630326546470a746157774d71436353457357766277307871597433346a5552704e62436a6d4379515677596641772f2b544c68503964416b414677526a64776a77333771706a0a646467316d4e697533376237737746786d6b694d4f585a5278614e4e736662353641313452704e337a6f6233516447557962476f644d494b5446626d552f6c750a436a71417861664a416b41473279663652576277464957664d7974375759436830566147424363677935373441696e566965456f335a5a7946664336332b786d0a33756f614e7934694c6f4a763447436a7155427a335a666356614f2f444457470a2d2d2d2d2d454e44205253412050524956415445204b45592d2d2d2d2d0a', 'hex'), - new Buffer('2d2d2d2d2d424547494e205253412050524956415445204b45592d2d2d2d2d0a4d4949456a77494241414b422f6779376d6a615767506546645659445a5752434139424e69763370506230657332372b464b593068737a4c614f7734374578430a744157704473483438545841667948425977424c67756179666b344c4749757078622b43474d62526f337845703043626659314a62793236543976476a5243310a666f484444554a4738347561526279487161663469367a74346756522b786c4145496a6b614641414b38634f6f58415431435671474c4c6c6a554363684c38500a6a61486a2f7972695a2f53377264776c49334c6e41427877776d4c726d522f7637315774706d4f2f614e47384e2b31706f2b5177616768546b79513539452f5a0a7641754f6b4657486f6b32712f523650594161326a645a397a696d3046714f502b6e6b5161454452624246426d4271547635664647666b32577341664b662f520a47302f5646642b5a654d353235315465547658483639356e6c53476175566c3941674d42414145436766344c725748592f6c35346f7554685a577676627275670a70667a36734a583267396c3779586d576c455773504543566f2f375355627059467074364f5a7939397a53672b494b624771574b6664686f4b725477495674430a4c30595a304e6c6d646e414e53497a30726f785147375a786b4c352b764853772f506d443978345577662b437a38684154436d4e42763171633630646b7975570a34434c71653732716154695657526f4f316961675167684e634c6f6f36765379363545784c614344545068613779753276773468465a705769456a57346478660a7246644c696978353242433836596c416c784d452f724c6738494a5676696c62796f39615764586d784f6155544c527636506b4644312f6756647738563951720a534c4e39466c4b326b6b6a695830647a6f6962765a7733744d6e74337979644178305838372b734d5256616843316270336b56507a3448793045575834514a2f0a504d33317647697549546b324e43643531445874314c746e324f503546614a536d4361456a6830586b5534716f7559796a585774384275364254436c327675610a466730556a6939432b496b504c6d61554d624d494f7761546b386357714c74685378734c6537304a354f6b477267664b554d2f772b4248483150742f506a7a6a0a432b2b6c306b6946614f5644566141563947704c504c43426f4b2f50433952622f72784d4d6f43434e774a2f4e5a756564496e793277334c4d69693737682f540a7a53766572674e47686a5936526e7661386c4c584a36646c726b6350417970733367577778716a344e5230542b474d3062445550564c62374d303758563753580a7637564a476d35324a625247774d3173732b72385854544e656d65476b2b5752784737546774734d715947584c66423851786b2f66352f4d63633030546c38750a7758464e7366784a786d7436416273547233673336774a2f49684f6e69627a3941642b6e63686c426e4e3351655733434b48717a61523138766f717674566d320a6b4a66484b31357072482f7353476d786d6945476772434a545a78744462614e434f372f56426a6e4b756455554968434177734c747571302f7a7562397641640a384731736366497076357161534e7a6d4b6f5838624f77417276725336775037794b726354737557496c484438724a5649374945446e516f5470354738664b310a68774a2f4d4968384d35763072356455594576366f494a5747636c65364148314a6d73503557496166677137325a32323838704863434648774e59384467394a0a3736517377564c6e556850546c6d6d33454f4f50474574616d32694144357230416679746c62346c624e6f51736a32737a65584f4e4458422b366f7565616a680a564e454c55723848635350356c677a525a6a4a57366146497a6a394c44526d516e55414f6a475358564f517445774a2f4d43515a374e2f763464494b654452410a3864385545785a332b674748756d7a697a7447524a30745172795a483250616b50354937562b316c377145556e4a3263336d462b65317634314570394c4376680a627a72504b773964786831386734622b37624d707357506e7372614b6836697078633761614f615a5630447867657a347a635a753050316f6c4f30634e334b4d0a6e784a305064733352386241684e43446453324a5a61527035513d3d0a2d2d2d2d2d454e44205253412050524956415445204b45592d2d2d2d2d0a', 'hex') -]; -var parseKey = require('parse-asn1'); -var privs = keys.map(parseKey); -var crt = require('./'); -var crypto = require('crypto'); -var test = require('tape'); -var constants = require('constants'); -var bn = require('bn.js'); -function testIt(priv, run) { - test('r is coprime with n ' + (run + 1), function (t) { - var len = 30; - t.plan(len); - var i = 0; - while(i++ < len) { - var r = crt.getr(priv); - t.equals(r.gcd(priv.modulus).toString(), '1', 'are coprime run ' + i); - } - }); -} -privs.forEach(testIt); - -function testMessage(key, run) { - var len = 40; - var i = 0; - while (len--) { - test('round trip key ' + (run + 1) + ' run ' + (++i), function (t) { - t.plan(1); - var priv = parseKey(key); - var len = priv.modulus.byteLength(); - var r = new bn(crypto.randomBytes(len)); - while (r.cmp(priv.modulus) >= 0) { - r = new bn(crypto.randomBytes(len)); - } - var buf = new Buffer(r.toArray()); - if (buf.byteLength < priv.modulus.byteLength()) { - var tmp = new Buffer(priv.modulus.byteLength() - buf.byteLength); - tmp.fill(0); - buf = Buffer.concat([tmp, buf]); - } - var nodeEncrypt = crypto.privateDecrypt({ - padding: constants.RSA_NO_PADDING, - key: key - }, buf).toString('hex'); - var myEncrypt = crt(buf, priv).toString('hex'); - t.equals(myEncrypt, nodeEncrypt, 'equal encrypts'); - }); - } -} -keys.forEach(testMessage); diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/node_modules/parse-asn1/.npmignore b/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/node_modules/parse-asn1/.npmignore deleted file mode 100644 index 4ebc8aea..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/node_modules/parse-asn1/.npmignore +++ /dev/null @@ -1 +0,0 @@ -coverage diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/node_modules/parse-asn1/.travis.yml b/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/node_modules/parse-asn1/.travis.yml deleted file mode 100644 index ea321ccc..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/node_modules/parse-asn1/.travis.yml +++ /dev/null @@ -1,9 +0,0 @@ -sudo: false -language: node_js -node_js: - - "0.12" - - "iojs" -env: - - TEST_SUITE=standard - - TEST_SUITE=unit -script: "npm run-script $TEST_SUITE" diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/node_modules/parse-asn1/README.md b/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/node_modules/parse-asn1/README.md deleted file mode 100644 index 89ed0746..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/node_modules/parse-asn1/README.md +++ /dev/null @@ -1,8 +0,0 @@ -#parse-asn1 - -[![TRAVIS](https://secure.travis-ci.org/crypto-browserify/parse-asn1.png)](http://travis-ci.org/crypto-browserify/parse-asn1) -[![NPM](http://img.shields.io/npm/v/parse-asn1.svg)](https://www.npmjs.org/package/parse-asn1) - -[![js-standard-style](https://cdn.rawgit.com/feross/standard/master/badge.svg)](https://github.com/feross/standard) - -utility library for parsing asn1 files for use with browserify-sign. diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/node_modules/parse-asn1/aesid.json b/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/node_modules/parse-asn1/aesid.json deleted file mode 100644 index 24f653b4..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/node_modules/parse-asn1/aesid.json +++ /dev/null @@ -1,13 +0,0 @@ -{"2.16.840.1.101.3.4.1.1": "aes-128-ecb", -"2.16.840.1.101.3.4.1.2": "aes-128-cbc", -"2.16.840.1.101.3.4.1.3": "aes-128-ofb", -"2.16.840.1.101.3.4.1.4": "aes-128-cfb", -"2.16.840.1.101.3.4.1.21": "aes-192-ecb", -"2.16.840.1.101.3.4.1.22": "aes-192-cbc", -"2.16.840.1.101.3.4.1.23": "aes-192-ofb", -"2.16.840.1.101.3.4.1.24": "aes-192-cfb", -"2.16.840.1.101.3.4.1.41": "aes-256-ecb", -"2.16.840.1.101.3.4.1.42": "aes-256-cbc", -"2.16.840.1.101.3.4.1.43": "aes-256-ofb", -"2.16.840.1.101.3.4.1.44": "aes-256-cfb" -} \ No newline at end of file diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/node_modules/parse-asn1/asn1.js b/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/node_modules/parse-asn1/asn1.js deleted file mode 100644 index cb2fcfce..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/node_modules/parse-asn1/asn1.js +++ /dev/null @@ -1,117 +0,0 @@ -// from https://github.com/indutny/self-signed/blob/gh-pages/lib/asn1.js -// Fedor, you are amazing. - -var asn1 = require('asn1.js') - -var RSAPrivateKey = asn1.define('RSAPrivateKey', function () { - this.seq().obj( - this.key('version').int(), - this.key('modulus').int(), - this.key('publicExponent').int(), - this.key('privateExponent').int(), - this.key('prime1').int(), - this.key('prime2').int(), - this.key('exponent1').int(), - this.key('exponent2').int(), - this.key('coefficient').int() - ) -}) -exports.RSAPrivateKey = RSAPrivateKey - -var RSAPublicKey = asn1.define('RSAPublicKey', function () { - this.seq().obj( - this.key('modulus').int(), - this.key('publicExponent').int() - ) -}) -exports.RSAPublicKey = RSAPublicKey - -var PublicKey = asn1.define('SubjectPublicKeyInfo', function () { - this.seq().obj( - this.key('algorithm').use(AlgorithmIdentifier), - this.key('subjectPublicKey').bitstr() - ) -}) -exports.PublicKey = PublicKey - -var AlgorithmIdentifier = asn1.define('AlgorithmIdentifier', function () { - this.seq().obj( - this.key('algorithm').objid(), - this.key('none').null_().optional(), - this.key('curve').objid().optional(), - this.key('params').seq().obj( - this.key('p').int(), - this.key('q').int(), - this.key('g').int() - ).optional() - ) -}) - -var PrivateKeyInfo = asn1.define('PrivateKeyInfo', function () { - this.seq().obj( - this.key('version').int(), - this.key('algorithm').use(AlgorithmIdentifier), - this.key('subjectPrivateKey').octstr() - ) -}) -exports.PrivateKey = PrivateKeyInfo -var EncryptedPrivateKeyInfo = asn1.define('EncryptedPrivateKeyInfo', function () { - this.seq().obj( - this.key('algorithm').seq().obj( - this.key('id').objid(), - this.key('decrypt').seq().obj( - this.key('kde').seq().obj( - this.key('id').objid(), - this.key('kdeparams').seq().obj( - this.key('salt').octstr(), - this.key('iters').int() - ) - ), - this.key('cipher').seq().obj( - this.key('algo').objid(), - this.key('iv').octstr() - ) - ) - ), - this.key('subjectPrivateKey').octstr() - ) -}) - -exports.EncryptedPrivateKey = EncryptedPrivateKeyInfo - -var DSAPrivateKey = asn1.define('DSAPrivateKey', function () { - this.seq().obj( - this.key('version').int(), - this.key('p').int(), - this.key('q').int(), - this.key('g').int(), - this.key('pub_key').int(), - this.key('priv_key').int() - ) -}) -exports.DSAPrivateKey = DSAPrivateKey - -exports.DSAparam = asn1.define('DSAparam', function () { - this.int() -}) -var ECPrivateKey = asn1.define('ECPrivateKey', function () { - this.seq().obj( - this.key('version').int(), - this.key('privateKey').octstr(), - this.key('parameters').optional().explicit(0).use(ECParameters), - this.key('publicKey').optional().explicit(1).bitstr() - ) -}) -exports.ECPrivateKey = ECPrivateKey -var ECParameters = asn1.define('ECParameters', function () { - this.choice({ - namedCurve: this.objid() - }) -}) - -exports.signature = asn1.define('signature', function () { - this.seq().obj( - this.key('r').int(), - this.key('s').int() - ) -}) diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/node_modules/parse-asn1/fixProc.js b/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/node_modules/parse-asn1/fixProc.js deleted file mode 100644 index 5c4085ee..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/node_modules/parse-asn1/fixProc.js +++ /dev/null @@ -1,30 +0,0 @@ -// adapted from https://github.com/apatil/pemstrip -var findProc = /Proc-Type: 4,ENCRYPTED\r?\nDEK-Info: AES-((?:128)|(?:192)|(?:256))-CBC,([0-9A-H]+)\r?\n\r?\n([0-9A-z\n\r\+\/\=]+)\r?\n/m -var startRegex = /^-----BEGIN (.*) KEY-----\r?\n/m -var fullRegex = /^-----BEGIN (.*) KEY-----\r?\n([0-9A-z\n\r\+\/\=]+)\r?\n-----END \1 KEY-----$/m -var evp = require('evp_bytestokey') -var ciphers = require('browserify-aes') -module.exports = function (okey, password) { - var key = okey.toString() - var match = key.match(findProc) - var decrypted - if (!match) { - var match2 = key.match(fullRegex) - decrypted = new Buffer(match2[2].replace(/\r?\n/g, ''), 'base64') - } else { - var suite = 'aes' + match[1] - var iv = new Buffer(match[2], 'hex') - var cipherText = new Buffer(match[3].replace(/\r?\n/g, ''), 'base64') - var cipherKey = evp(password, iv.slice(0, 8), parseInt(match[1], 10)).key - var out = [] - var cipher = ciphers.createDecipheriv(suite, cipherKey, iv) - out.push(cipher.update(cipherText)) - out.push(cipher.final()) - decrypted = Buffer.concat(out) - } - var tag = key.match(startRegex)[1] + ' KEY' - return { - tag: tag, - data: decrypted - } -} diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/node_modules/parse-asn1/index.js b/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/node_modules/parse-asn1/index.js deleted file mode 100644 index 5cc79677..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/node_modules/parse-asn1/index.js +++ /dev/null @@ -1,101 +0,0 @@ -var asn1 = require('./asn1') -var aesid = require('./aesid.json') -var fixProc = require('./fixProc') -var ciphers = require('browserify-aes') -var compat = require('pbkdf2') -module.exports = parseKeys - -function parseKeys (buffer) { - var password - if (typeof buffer === 'object' && !Buffer.isBuffer(buffer)) { - password = buffer.passphrase - buffer = buffer.key - } - if (typeof buffer === 'string') { - buffer = new Buffer(buffer) - } - - var stripped = fixProc(buffer, password) - - var type = stripped.tag - var data = stripped.data - var subtype, ndata - switch (type) { - case 'PUBLIC KEY': - ndata = asn1.PublicKey.decode(data, 'der') - subtype = ndata.algorithm.algorithm.join('.') - switch (subtype) { - case '1.2.840.113549.1.1.1': - return asn1.RSAPublicKey.decode(ndata.subjectPublicKey.data, 'der') - case '1.2.840.10045.2.1': - ndata.subjectPrivateKey = ndata.subjectPublicKey - return { - type: 'ec', - data: ndata - } - case '1.2.840.10040.4.1': - ndata.algorithm.params.pub_key = asn1.DSAparam.decode(ndata.subjectPublicKey.data, 'der') - return { - type: 'dsa', - data: ndata.algorithm.params - } - default: throw new Error('unknown key id ' + subtype) - } - throw new Error('unknown key type ' + type) - case 'ENCRYPTED PRIVATE KEY': - data = asn1.EncryptedPrivateKey.decode(data, 'der') - data = decrypt(data, password) - // falls through - case 'PRIVATE KEY': - ndata = asn1.PrivateKey.decode(data, 'der') - subtype = ndata.algorithm.algorithm.join('.') - switch (subtype) { - case '1.2.840.113549.1.1.1': - return asn1.RSAPrivateKey.decode(ndata.subjectPrivateKey, 'der') - case '1.2.840.10045.2.1': - return { - curve: ndata.algorithm.curve, - privateKey: asn1.ECPrivateKey.decode(ndata.subjectPrivateKey, 'der').privateKey - } - case '1.2.840.10040.4.1': - ndata.algorithm.params.priv_key = asn1.DSAparam.decode(ndata.subjectPrivateKey, 'der') - return { - type: 'dsa', - params: ndata.algorithm.params - } - default: throw new Error('unknown key id ' + subtype) - } - throw new Error('unknown key type ' + type) - case 'RSA PUBLIC KEY': - return asn1.RSAPublicKey.decode(data, 'der') - case 'RSA PRIVATE KEY': - return asn1.RSAPrivateKey.decode(data, 'der') - case 'DSA PRIVATE KEY': - return { - type: 'dsa', - params: asn1.DSAPrivateKey.decode(data, 'der') - } - case 'EC PRIVATE KEY': - data = asn1.ECPrivateKey.decode(data, 'der') - return { - curve: data.parameters.value, - privateKey: data.privateKey - } - default: throw new Error('unknown key type ' + type) - } -} -parseKeys.signature = asn1.signature -function decrypt (data, password) { - var salt = data.algorithm.decrypt.kde.kdeparams.salt - var iters = parseInt(data.algorithm.decrypt.kde.kdeparams.iters.toString(), 10) - var algo = aesid[data.algorithm.decrypt.cipher.algo.join('.')] - var iv = data.algorithm.decrypt.cipher.iv - var cipherText = data.subjectPrivateKey - var keylen = parseInt(algo.split('-')[1], 10) / 8 - var key = compat.pbkdf2Sync(password, salt, iters, keylen) - var cipher = ciphers.createDecipheriv(algo, key, iv) - var out = [] - out.push(cipher.update(cipherText)) - out.push(cipher.final()) - return Buffer.concat(out) -} diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/node_modules/parse-asn1/node_modules/asn1.js/.npmignore b/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/node_modules/parse-asn1/node_modules/asn1.js/.npmignore deleted file mode 100644 index 3d5af0a0..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/node_modules/parse-asn1/node_modules/asn1.js/.npmignore +++ /dev/null @@ -1,2 +0,0 @@ -test -rfc diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/node_modules/parse-asn1/node_modules/asn1.js/README.md b/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/node_modules/parse-asn1/node_modules/asn1.js/README.md deleted file mode 100644 index 0c571b80..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/node_modules/parse-asn1/node_modules/asn1.js/README.md +++ /dev/null @@ -1,100 +0,0 @@ -# ASN1.js - -ASN.1 DER Encoder/Decoder and DSL. - -## Example - -Define model: - -```javascript -var asn = require('asn1.js'); - -var Human = asn.define('Human', function() { - this.seq().obj( - this.key('firstName').octstr(), - this.key('lastName').octstr(), - this.key('age').int(), - this.key('gender').enum({ 0: 'male', 1: 'female' }), - this.key('bio').seqof(Bio) - ); -}); - -var Bio = asn.define('Bio', function() { - this.seq().obj( - this.key('time').gentime(), - this.key('description').octstr() - ); -}); -``` - -Encode data: - -```javascript -var output = Human.encode({ - firstName: 'Thomas', - lastName: 'Anderson', - age: 28, - gender: 'male', - bio: [ - { - time: +new Date('31 March 1999'), - description: 'freedom of mind' - } - ] -}, 'der'); -``` - -Decode data: - -```javascript -var human = Human.decode(output, 'der'); -console.log(human); -/* -{ firstName: , - lastName: , - age: 28, - gender: 'male', - bio: - [ { time: 922820400000, - description: } ] } -*/ -``` - -### Partial decode - -Its possible to parse data without stopping on first error. In order to do it, -you should call: - -```javascript -var human = Human.decode(output, 'der', { partial: true }); -console.log(human); -/* -{ result: { ... }, - errors: [ ... ] } -*/ -``` - -#### LICENSE - -This software is licensed under the MIT License. - -Copyright Fedor Indutny, 2013. - -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/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/node_modules/parse-asn1/node_modules/asn1.js/lib/asn1.js b/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/node_modules/parse-asn1/node_modules/asn1.js/lib/asn1.js deleted file mode 100644 index 02bbdc1d..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/node_modules/parse-asn1/node_modules/asn1.js/lib/asn1.js +++ /dev/null @@ -1,9 +0,0 @@ -var asn1 = exports; - -asn1.bignum = require('bn.js'); - -asn1.define = require('./asn1/api').define; -asn1.base = require('./asn1/base'); -asn1.constants = require('./asn1/constants'); -asn1.decoders = require('./asn1/decoders'); -asn1.encoders = require('./asn1/encoders'); diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/node_modules/parse-asn1/node_modules/asn1.js/lib/asn1/api.js b/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/node_modules/parse-asn1/node_modules/asn1.js/lib/asn1/api.js deleted file mode 100644 index 7c223cc9..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/node_modules/parse-asn1/node_modules/asn1.js/lib/asn1/api.js +++ /dev/null @@ -1,61 +0,0 @@ -var asn1 = require('../asn1'); -var inherits = require('inherits'); - -var api = exports; - -api.define = function define(name, body) { - return new Entity(name, body); -}; - -function Entity(name, body) { - this.name = name; - this.body = body; - - this.decoders = {}; - this.encoders = {}; -}; - -Entity.prototype._createNamed = function createNamed(base) { - var named; - try { - named = require('vm').runInThisContext( - '(function ' + this.name + '(entity) {\n' + - ' this._initNamed(entity);\n' + - '})' - ); - } catch (e) { - named = function (entity) { - this._initNamed(entity); - }; - } - inherits(named, base); - named.prototype._initNamed = function initnamed(entity) { - base.call(this, entity); - }; - - return new named(this); -}; - -Entity.prototype._getDecoder = function _getDecoder(enc) { - enc = enc || 'der'; - // Lazily create decoder - if (!this.decoders.hasOwnProperty(enc)) - this.decoders[enc] = this._createNamed(asn1.decoders[enc]); - return this.decoders[enc]; -}; - -Entity.prototype.decode = function decode(data, enc, options) { - return this._getDecoder(enc).decode(data, options); -}; - -Entity.prototype._getEncoder = function _getEncoder(enc) { - enc = enc || 'der'; - // Lazily create encoder - if (!this.encoders.hasOwnProperty(enc)) - this.encoders[enc] = this._createNamed(asn1.encoders[enc]); - return this.encoders[enc]; -}; - -Entity.prototype.encode = function encode(data, enc, /* internal */ reporter) { - return this._getEncoder(enc).encode(data, reporter); -}; diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/node_modules/parse-asn1/node_modules/asn1.js/lib/asn1/base/buffer.js b/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/node_modules/parse-asn1/node_modules/asn1.js/lib/asn1/base/buffer.js deleted file mode 100644 index bc826e84..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/node_modules/parse-asn1/node_modules/asn1.js/lib/asn1/base/buffer.js +++ /dev/null @@ -1,116 +0,0 @@ -var inherits = require('inherits'); -var Reporter = require('../base').Reporter; -var Buffer = require('buffer').Buffer; - -function DecoderBuffer(base, options) { - Reporter.call(this, options); - if (!Buffer.isBuffer(base)) { - this.error('Input not Buffer'); - return; - } - - this.base = base; - this.offset = 0; - this.length = base.length; -} -inherits(DecoderBuffer, Reporter); -exports.DecoderBuffer = DecoderBuffer; - -DecoderBuffer.prototype.save = function save() { - return { offset: this.offset, reporter: Reporter.prototype.save.call(this) }; -}; - -DecoderBuffer.prototype.restore = function restore(save) { - // Return skipped data - var res = new DecoderBuffer(this.base); - res.offset = save.offset; - res.length = this.offset; - - this.offset = save.offset; - Reporter.prototype.restore.call(this, save.reporter); - - return res; -}; - -DecoderBuffer.prototype.isEmpty = function isEmpty() { - return this.offset === this.length; -}; - -DecoderBuffer.prototype.readUInt8 = function readUInt8(fail) { - if (this.offset + 1 <= this.length) - return this.base.readUInt8(this.offset++, true); - else - return this.error(fail || 'DecoderBuffer overrun'); -} - -DecoderBuffer.prototype.skip = function skip(bytes, fail) { - if (!(this.offset + bytes <= this.length)) - return this.error(fail || 'DecoderBuffer overrun'); - - var res = new DecoderBuffer(this.base); - - // Share reporter state - res._reporterState = this._reporterState; - - res.offset = this.offset; - res.length = this.offset + bytes; - this.offset += bytes; - return res; -} - -DecoderBuffer.prototype.raw = function raw(save) { - return this.base.slice(save ? save.offset : this.offset, this.length); -} - -function EncoderBuffer(value, reporter) { - if (Array.isArray(value)) { - this.length = 0; - this.value = value.map(function(item) { - if (!(item instanceof EncoderBuffer)) - item = new EncoderBuffer(item, reporter); - this.length += item.length; - return item; - }, this); - } else if (typeof value === 'number') { - if (!(0 <= value && value <= 0xff)) - return reporter.error('non-byte EncoderBuffer value'); - this.value = value; - this.length = 1; - } else if (typeof value === 'string') { - this.value = value; - this.length = Buffer.byteLength(value); - } else if (Buffer.isBuffer(value)) { - this.value = value; - this.length = value.length; - } else { - return reporter.error('Unsupported type: ' + typeof value); - } -} -exports.EncoderBuffer = EncoderBuffer; - -EncoderBuffer.prototype.join = function join(out, offset) { - if (!out) - out = new Buffer(this.length); - if (!offset) - offset = 0; - - if (this.length === 0) - return out; - - if (Array.isArray(this.value)) { - this.value.forEach(function(item) { - item.join(out, offset); - offset += item.length; - }); - } else { - if (typeof this.value === 'number') - out[offset] = this.value; - else if (typeof this.value === 'string') - out.write(this.value, offset); - else if (Buffer.isBuffer(this.value)) - this.value.copy(out, offset); - offset += this.length; - } - - return out; -}; diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/node_modules/parse-asn1/node_modules/asn1.js/lib/asn1/base/index.js b/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/node_modules/parse-asn1/node_modules/asn1.js/lib/asn1/base/index.js deleted file mode 100644 index 935abde0..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/node_modules/parse-asn1/node_modules/asn1.js/lib/asn1/base/index.js +++ /dev/null @@ -1,6 +0,0 @@ -var base = exports; - -base.Reporter = require('./reporter').Reporter; -base.DecoderBuffer = require('./buffer').DecoderBuffer; -base.EncoderBuffer = require('./buffer').EncoderBuffer; -base.Node = require('./node'); diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/node_modules/parse-asn1/node_modules/asn1.js/lib/asn1/base/node.js b/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/node_modules/parse-asn1/node_modules/asn1.js/lib/asn1/base/node.js deleted file mode 100644 index 7b26bd88..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/node_modules/parse-asn1/node_modules/asn1.js/lib/asn1/base/node.js +++ /dev/null @@ -1,634 +0,0 @@ -var Reporter = require('../base').Reporter; -var EncoderBuffer = require('../base').EncoderBuffer; -var DecoderBuffer = require('../base').DecoderBuffer; -var assert = require('minimalistic-assert'); - -// Supported tags -var tags = [ - 'seq', 'seqof', 'set', 'setof', 'objid', 'bool', - 'gentime', 'utctime', 'null_', 'enum', 'int', 'objDesc', - 'bitstr', 'bmpstr', 'charstr', 'genstr', 'graphstr', 'ia5str', 'iso646str', - 'numstr', 'octstr', 'printstr', 't61str', 'unistr', 'utf8str', 'videostr' -]; - -// Public methods list -var methods = [ - 'key', 'obj', 'use', 'optional', 'explicit', 'implicit', 'def', 'choice', - 'any', 'contains' -].concat(tags); - -// Overrided methods list -var overrided = [ - '_peekTag', '_decodeTag', '_use', - '_decodeStr', '_decodeObjid', '_decodeTime', - '_decodeNull', '_decodeInt', '_decodeBool', '_decodeList', - - '_encodeComposite', '_encodeStr', '_encodeObjid', '_encodeTime', - '_encodeNull', '_encodeInt', '_encodeBool' -]; - -function Node(enc, parent) { - var state = {}; - this._baseState = state; - - state.enc = enc; - - state.parent = parent || null; - state.children = null; - - // State - state.tag = null; - state.args = null; - state.reverseArgs = null; - state.choice = null; - state.optional = false; - state.any = false; - state.obj = false; - state.use = null; - state.useDecoder = null; - state.key = null; - state['default'] = null; - state.explicit = null; - state.implicit = null; - state.contains = null; - - // Should create new instance on each method - if (!state.parent) { - state.children = []; - this._wrap(); - } -} -module.exports = Node; - -var stateProps = [ - 'enc', 'parent', 'children', 'tag', 'args', 'reverseArgs', 'choice', - 'optional', 'any', 'obj', 'use', 'alteredUse', 'key', 'default', 'explicit', - 'implicit', 'contains' -]; - -Node.prototype.clone = function clone() { - var state = this._baseState; - var cstate = {}; - stateProps.forEach(function(prop) { - cstate[prop] = state[prop]; - }); - var res = new this.constructor(cstate.parent); - res._baseState = cstate; - return res; -}; - -Node.prototype._wrap = function wrap() { - var state = this._baseState; - methods.forEach(function(method) { - this[method] = function _wrappedMethod() { - var clone = new this.constructor(this); - state.children.push(clone); - return clone[method].apply(clone, arguments); - }; - }, this); -}; - -Node.prototype._init = function init(body) { - var state = this._baseState; - - assert(state.parent === null); - body.call(this); - - // Filter children - state.children = state.children.filter(function(child) { - return child._baseState.parent === this; - }, this); - assert.equal(state.children.length, 1, 'Root node can have only one child'); -}; - -Node.prototype._useArgs = function useArgs(args) { - var state = this._baseState; - - // Filter children and args - var children = args.filter(function(arg) { - return arg instanceof this.constructor; - }, this); - args = args.filter(function(arg) { - return !(arg instanceof this.constructor); - }, this); - - if (children.length !== 0) { - assert(state.children === null); - state.children = children; - - // Replace parent to maintain backward link - children.forEach(function(child) { - child._baseState.parent = this; - }, this); - } - if (args.length !== 0) { - assert(state.args === null); - state.args = args; - state.reverseArgs = args.map(function(arg) { - if (typeof arg !== 'object' || arg.constructor !== Object) - return arg; - - var res = {}; - Object.keys(arg).forEach(function(key) { - if (key == (key | 0)) - key |= 0; - var value = arg[key]; - res[value] = key; - }); - return res; - }); - } -}; - -// -// Overrided methods -// - -overrided.forEach(function(method) { - Node.prototype[method] = function _overrided() { - var state = this._baseState; - throw new Error(method + ' not implemented for encoding: ' + state.enc); - }; -}); - -// -// Public methods -// - -tags.forEach(function(tag) { - Node.prototype[tag] = function _tagMethod() { - var state = this._baseState; - var args = Array.prototype.slice.call(arguments); - - assert(state.tag === null); - state.tag = tag; - - this._useArgs(args); - - return this; - }; -}); - -Node.prototype.use = function use(item) { - assert(item); - var state = this._baseState; - - assert(state.use === null); - state.use = item; - - return this; -}; - -Node.prototype.optional = function optional() { - var state = this._baseState; - - state.optional = true; - - return this; -}; - -Node.prototype.def = function def(val) { - var state = this._baseState; - - assert(state['default'] === null); - state['default'] = val; - state.optional = true; - - return this; -}; - -Node.prototype.explicit = function explicit(num) { - var state = this._baseState; - - assert(state.explicit === null && state.implicit === null); - state.explicit = num; - - return this; -}; - -Node.prototype.implicit = function implicit(num) { - var state = this._baseState; - - assert(state.explicit === null && state.implicit === null); - state.implicit = num; - - return this; -}; - -Node.prototype.obj = function obj() { - var state = this._baseState; - var args = Array.prototype.slice.call(arguments); - - state.obj = true; - - if (args.length !== 0) - this._useArgs(args); - - return this; -}; - -Node.prototype.key = function key(newKey) { - var state = this._baseState; - - assert(state.key === null); - state.key = newKey; - - return this; -}; - -Node.prototype.any = function any() { - var state = this._baseState; - - state.any = true; - - return this; -}; - -Node.prototype.choice = function choice(obj) { - var state = this._baseState; - - assert(state.choice === null); - state.choice = obj; - this._useArgs(Object.keys(obj).map(function(key) { - return obj[key]; - })); - - return this; -}; - -Node.prototype.contains = function contains(item) { - var state = this._baseState; - - assert(state.use === null); - state.contains = item; - - return this; -}; - -// -// Decoding -// - -Node.prototype._decode = function decode(input, options) { - var state = this._baseState; - - // Decode root node - if (state.parent === null) - return input.wrapResult(state.children[0]._decode(input, options)); - - var result = state['default']; - var present = true; - - var prevKey = null; - if (state.key !== null) - prevKey = input.enterKey(state.key); - - // Check if tag is there - if (state.optional) { - var tag = null; - if (state.explicit !== null) - tag = state.explicit; - else if (state.implicit !== null) - tag = state.implicit; - else if (state.tag !== null) - tag = state.tag; - - if (tag === null && !state.any) { - // Trial and Error - var save = input.save(); - try { - if (state.choice === null) - this._decodeGeneric(state.tag, input, options); - else - this._decodeChoice(input, options); - present = true; - } catch (e) { - present = false; - } - input.restore(save); - } else { - present = this._peekTag(input, tag, state.any); - - if (input.isError(present)) - return present; - } - } - - // Push object on stack - var prevObj; - if (state.obj && present) - prevObj = input.enterObject(); - - if (present) { - // Unwrap explicit values - if (state.explicit !== null) { - var explicit = this._decodeTag(input, state.explicit); - if (input.isError(explicit)) - return explicit; - input = explicit; - } - - var start = input.offset; - - // Unwrap implicit and normal values - if (state.use === null && state.choice === null) { - if (state.any) - var save = input.save(); - var body = this._decodeTag( - input, - state.implicit !== null ? state.implicit : state.tag, - state.any - ); - if (input.isError(body)) - return body; - - if (state.any) - result = input.raw(save); - else - input = body; - } - - if (options && options.track && state.tag !== null) - options.track(input.path(), start, input.length, 'tagged'); - - if (options && options.track && state.tag !== null) - options.track(input.path(), input.offset, input.length, 'content'); - - // Select proper method for tag - if (state.any) - result = result; - else if (state.choice === null) - result = this._decodeGeneric(state.tag, input, options); - else - result = this._decodeChoice(input, options); - - if (input.isError(result)) - return result; - - // Decode children - if (!state.any && state.choice === null && state.children !== null) { - state.children.forEach(function decodeChildren(child) { - // NOTE: We are ignoring errors here, to let parser continue with other - // parts of encoded data - child._decode(input, options); - }); - } - - // Decode contained/encoded by schema, only in bit or octet strings - if (state.contains && (state.tag === 'octstr' || state.tag === 'bitstr')) { - var data = new DecoderBuffer(result); - result = this._getUse(state.contains, input._reporterState.obj) - ._decode(data, options); - } - } - - // Pop object - if (state.obj && present) - result = input.leaveObject(prevObj); - - // Set key - if (state.key !== null && (result !== null || present === true)) - input.leaveKey(prevKey, state.key, result); - else if (prevKey !== null) - input.exitKey(prevKey); - - return result; -}; - -Node.prototype._decodeGeneric = function decodeGeneric(tag, input, options) { - var state = this._baseState; - - if (tag === 'seq' || tag === 'set') - return null; - if (tag === 'seqof' || tag === 'setof') - return this._decodeList(input, tag, state.args[0], options); - else if (/str$/.test(tag)) - return this._decodeStr(input, tag, options); - else if (tag === 'objid' && state.args) - return this._decodeObjid(input, state.args[0], state.args[1], options); - else if (tag === 'objid') - return this._decodeObjid(input, null, null, options); - else if (tag === 'gentime' || tag === 'utctime') - return this._decodeTime(input, tag, options); - else if (tag === 'null_') - return this._decodeNull(input, options); - else if (tag === 'bool') - return this._decodeBool(input, options); - else if (tag === 'objDesc') - return this._decodeStr(input, tag, options); - else if (tag === 'int' || tag === 'enum') - return this._decodeInt(input, state.args && state.args[0], options); - - if (state.use !== null) { - return this._getUse(state.use, input._reporterState.obj) - ._decode(input, options); - } else { - return input.error('unknown tag: ' + tag); - } -}; - -Node.prototype._getUse = function _getUse(entity, obj) { - - var state = this._baseState; - // Create altered use decoder if implicit is set - state.useDecoder = this._use(entity, obj); - assert(state.useDecoder._baseState.parent === null); - state.useDecoder = state.useDecoder._baseState.children[0]; - if (state.implicit !== state.useDecoder._baseState.implicit) { - state.useDecoder = state.useDecoder.clone(); - state.useDecoder._baseState.implicit = state.implicit; - } - return state.useDecoder; -}; - -Node.prototype._decodeChoice = function decodeChoice(input, options) { - var state = this._baseState; - var result = null; - var match = false; - - Object.keys(state.choice).some(function(key) { - var save = input.save(); - var node = state.choice[key]; - try { - var value = node._decode(input, options); - if (input.isError(value)) - return false; - - result = { type: key, value: value }; - match = true; - } catch (e) { - input.restore(save); - return false; - } - return true; - }, this); - - if (!match) - return input.error('Choice not matched'); - - return result; -}; - -// -// Encoding -// - -Node.prototype._createEncoderBuffer = function createEncoderBuffer(data) { - return new EncoderBuffer(data, this.reporter); -}; - -Node.prototype._encode = function encode(data, reporter, parent) { - var state = this._baseState; - if (state['default'] !== null && state['default'] === data) - return; - - var result = this._encodeValue(data, reporter, parent); - if (result === undefined) - return; - - if (this._skipDefault(result, reporter, parent)) - return; - - return result; -}; - -Node.prototype._encodeValue = function encode(data, reporter, parent) { - var state = this._baseState; - - // Decode root node - if (state.parent === null) - return state.children[0]._encode(data, reporter || new Reporter()); - - var result = null; - - // Set reporter to share it with a child class - this.reporter = reporter; - - // Check if data is there - if (state.optional && data === undefined) { - if (state['default'] !== null) - data = state['default'] - else - return; - } - - // Encode children first - var content = null; - var primitive = false; - if (state.any) { - // Anything that was given is translated to buffer - result = this._createEncoderBuffer(data); - } else if (state.choice) { - result = this._encodeChoice(data, reporter); - } else if (state.contains) { - content = this._getUse(state.contains, parent)._encode(data, reporter); - primitive = true; - } else if (state.children) { - content = state.children.map(function(child) { - if (child._baseState.tag === 'null_') - return child._encode(null, reporter, data); - - if (child._baseState.key === null) - return reporter.error('Child should have a key'); - var prevKey = reporter.enterKey(child._baseState.key); - - if (typeof data !== 'object') - return reporter.error('Child expected, but input is not object'); - - var res = child._encode(data[child._baseState.key], reporter, data); - reporter.leaveKey(prevKey); - - return res; - }, this).filter(function(child) { - return child; - }); - content = this._createEncoderBuffer(content); - } else { - if (state.tag === 'seqof' || state.tag === 'setof') { - // TODO(indutny): this should be thrown on DSL level - if (!(state.args && state.args.length === 1)) - return reporter.error('Too many args for : ' + state.tag); - - if (!Array.isArray(data)) - return reporter.error('seqof/setof, but data is not Array'); - - var child = this.clone(); - child._baseState.implicit = null; - content = this._createEncoderBuffer(data.map(function(item) { - var state = this._baseState; - - return this._getUse(state.args[0], data)._encode(item, reporter); - }, child)); - } else if (state.use !== null) { - result = this._getUse(state.use, parent)._encode(data, reporter); - } else { - content = this._encodePrimitive(state.tag, data); - primitive = true; - } - } - - // Encode data itself - var result; - if (!state.any && state.choice === null) { - var tag = state.implicit !== null ? state.implicit : state.tag; - var cls = state.implicit === null ? 'universal' : 'context'; - - if (tag === null) { - if (state.use === null) - reporter.error('Tag could be ommited only for .use()'); - } else { - if (state.use === null) - result = this._encodeComposite(tag, primitive, cls, content); - } - } - - // Wrap in explicit - if (state.explicit !== null) - result = this._encodeComposite(state.explicit, false, 'context', result); - - return result; -}; - -Node.prototype._encodeChoice = function encodeChoice(data, reporter) { - var state = this._baseState; - - var node = state.choice[data.type]; - if (!node) { - assert( - false, - data.type + ' not found in ' + - JSON.stringify(Object.keys(state.choice))); - } - return node._encode(data.value, reporter); -}; - -Node.prototype._encodePrimitive = function encodePrimitive(tag, data) { - var state = this._baseState; - - if (/str$/.test(tag)) - return this._encodeStr(data, tag); - else if (tag === 'objid' && state.args) - return this._encodeObjid(data, state.reverseArgs[0], state.args[1]); - else if (tag === 'objid') - return this._encodeObjid(data, null, null); - else if (tag === 'gentime' || tag === 'utctime') - return this._encodeTime(data, tag); - else if (tag === 'null_') - return this._encodeNull(); - else if (tag === 'int' || tag === 'enum') - return this._encodeInt(data, state.args && state.reverseArgs[0]); - else if (tag === 'bool') - return this._encodeBool(data); - else if (tag === 'objDesc') - return this._encodeStr(data, tag); - else - throw new Error('Unsupported tag: ' + tag); -}; - -Node.prototype._isNumstr = function isNumstr(str) { - return /^[0-9 ]*$/.test(str); -}; - -Node.prototype._isPrintstr = function isPrintstr(str) { - return /^[A-Za-z0-9 '\(\)\+,\-\.\/:=\?]*$/.test(str); -}; diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/node_modules/parse-asn1/node_modules/asn1.js/lib/asn1/base/reporter.js b/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/node_modules/parse-asn1/node_modules/asn1.js/lib/asn1/base/reporter.js deleted file mode 100644 index ec8b8b82..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/node_modules/parse-asn1/node_modules/asn1.js/lib/asn1/base/reporter.js +++ /dev/null @@ -1,121 +0,0 @@ -var inherits = require('inherits'); - -function Reporter(options) { - this._reporterState = { - obj: null, - path: [], - options: options || {}, - errors: [] - }; -} -exports.Reporter = Reporter; - -Reporter.prototype.isError = function isError(obj) { - return obj instanceof ReporterError; -}; - -Reporter.prototype.save = function save() { - var state = this._reporterState; - - return { obj: state.obj, pathLen: state.path.length }; -}; - -Reporter.prototype.restore = function restore(data) { - var state = this._reporterState; - - state.obj = data.obj; - state.path = state.path.slice(0, data.pathLen); -}; - -Reporter.prototype.enterKey = function enterKey(key) { - return this._reporterState.path.push(key); -}; - -Reporter.prototype.exitKey = function exitKey(index) { - var state = this._reporterState; - - state.path = state.path.slice(0, index - 1); -}; - -Reporter.prototype.leaveKey = function leaveKey(index, key, value) { - var state = this._reporterState; - - this.exitKey(index); - if (state.obj !== null) - state.obj[key] = value; -}; - -Reporter.prototype.path = function path() { - return this._reporterState.path.join('/'); -}; - -Reporter.prototype.enterObject = function enterObject() { - var state = this._reporterState; - - var prev = state.obj; - state.obj = {}; - return prev; -}; - -Reporter.prototype.leaveObject = function leaveObject(prev) { - var state = this._reporterState; - - var now = state.obj; - state.obj = prev; - return now; -}; - -Reporter.prototype.error = function error(msg) { - var err; - var state = this._reporterState; - - var inherited = msg instanceof ReporterError; - if (inherited) { - err = msg; - } else { - err = new ReporterError(state.path.map(function(elem) { - return '[' + JSON.stringify(elem) + ']'; - }).join(''), msg.message || msg, msg.stack); - } - - if (!state.options.partial) - throw err; - - if (!inherited) - state.errors.push(err); - - return err; -}; - -Reporter.prototype.wrapResult = function wrapResult(result) { - var state = this._reporterState; - if (!state.options.partial) - return result; - - return { - result: this.isError(result) ? null : result, - errors: state.errors - }; -}; - -function ReporterError(path, msg) { - this.path = path; - this.rethrow(msg); -}; -inherits(ReporterError, Error); - -ReporterError.prototype.rethrow = function rethrow(msg) { - this.message = msg + ' at: ' + (this.path || '(shallow)'); - if (Error.captureStackTrace) - Error.captureStackTrace(this, ReporterError); - - if (!this.stack) { - try { - // IE only adds stack when thrown - throw new Error(this.message); - } catch (e) { - this.stack = e.stack; - } - } - return this; -}; diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/node_modules/parse-asn1/node_modules/asn1.js/lib/asn1/constants/der.js b/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/node_modules/parse-asn1/node_modules/asn1.js/lib/asn1/constants/der.js deleted file mode 100644 index 907dd397..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/node_modules/parse-asn1/node_modules/asn1.js/lib/asn1/constants/der.js +++ /dev/null @@ -1,42 +0,0 @@ -var constants = require('../constants'); - -exports.tagClass = { - 0: 'universal', - 1: 'application', - 2: 'context', - 3: 'private' -}; -exports.tagClassByName = constants._reverse(exports.tagClass); - -exports.tag = { - 0x00: 'end', - 0x01: 'bool', - 0x02: 'int', - 0x03: 'bitstr', - 0x04: 'octstr', - 0x05: 'null_', - 0x06: 'objid', - 0x07: 'objDesc', - 0x08: 'external', - 0x09: 'real', - 0x0a: 'enum', - 0x0b: 'embed', - 0x0c: 'utf8str', - 0x0d: 'relativeOid', - 0x10: 'seq', - 0x11: 'set', - 0x12: 'numstr', - 0x13: 'printstr', - 0x14: 't61str', - 0x15: 'videostr', - 0x16: 'ia5str', - 0x17: 'utctime', - 0x18: 'gentime', - 0x19: 'graphstr', - 0x1a: 'iso646str', - 0x1b: 'genstr', - 0x1c: 'unistr', - 0x1d: 'charstr', - 0x1e: 'bmpstr' -}; -exports.tagByName = constants._reverse(exports.tag); diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/node_modules/parse-asn1/node_modules/asn1.js/lib/asn1/constants/index.js b/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/node_modules/parse-asn1/node_modules/asn1.js/lib/asn1/constants/index.js deleted file mode 100644 index c44e3251..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/node_modules/parse-asn1/node_modules/asn1.js/lib/asn1/constants/index.js +++ /dev/null @@ -1,19 +0,0 @@ -var constants = exports; - -// Helper -constants._reverse = function reverse(map) { - var res = {}; - - Object.keys(map).forEach(function(key) { - // Convert key to integer if it is stringified - if ((key | 0) == key) - key = key | 0; - - var value = map[key]; - res[value] = key; - }); - - return res; -}; - -constants.der = require('./der'); diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/node_modules/parse-asn1/node_modules/asn1.js/lib/asn1/decoders/der.js b/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/node_modules/parse-asn1/node_modules/asn1.js/lib/asn1/decoders/der.js deleted file mode 100644 index 79a60acc..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/node_modules/parse-asn1/node_modules/asn1.js/lib/asn1/decoders/der.js +++ /dev/null @@ -1,324 +0,0 @@ -var inherits = require('inherits'); - -var asn1 = require('../../asn1'); -var base = asn1.base; -var bignum = asn1.bignum; - -// Import DER constants -var der = asn1.constants.der; - -function DERDecoder(entity) { - this.enc = 'der'; - this.name = entity.name; - this.entity = entity; - - // Construct base tree - this.tree = new DERNode(); - this.tree._init(entity.body); -}; -module.exports = DERDecoder; - -DERDecoder.prototype.decode = function decode(data, options) { - if (!(data instanceof base.DecoderBuffer)) - data = new base.DecoderBuffer(data, options); - - return this.tree._decode(data, options); -}; - -// Tree methods - -function DERNode(parent) { - base.Node.call(this, 'der', parent); -} -inherits(DERNode, base.Node); - -DERNode.prototype._peekTag = function peekTag(buffer, tag, any) { - if (buffer.isEmpty()) - return false; - - var state = buffer.save(); - var decodedTag = derDecodeTag(buffer, 'Failed to peek tag: "' + tag + '"'); - if (buffer.isError(decodedTag)) - return decodedTag; - - buffer.restore(state); - - return decodedTag.tag === tag || decodedTag.tagStr === tag || - (decodedTag.tagStr + 'of') === tag || any; -}; - -DERNode.prototype._decodeTag = function decodeTag(buffer, tag, any) { - var decodedTag = derDecodeTag(buffer, - 'Failed to decode tag of "' + tag + '"'); - if (buffer.isError(decodedTag)) - return decodedTag; - - var len = derDecodeLen(buffer, - decodedTag.primitive, - 'Failed to get length of "' + tag + '"'); - - // Failure - if (buffer.isError(len)) - return len; - - if (!any && - decodedTag.tag !== tag && - decodedTag.tagStr !== tag && - decodedTag.tagStr + 'of' !== tag) { - return buffer.error('Failed to match tag: "' + tag + '"'); - } - - if (decodedTag.primitive || len !== null) - return buffer.skip(len, 'Failed to match body of: "' + tag + '"'); - - // Indefinite length... find END tag - var state = buffer.save(); - var res = this._skipUntilEnd( - buffer, - 'Failed to skip indefinite length body: "' + this.tag + '"'); - if (buffer.isError(res)) - return res; - - len = buffer.offset - state.offset; - buffer.restore(state); - return buffer.skip(len, 'Failed to match body of: "' + tag + '"'); -}; - -DERNode.prototype._skipUntilEnd = function skipUntilEnd(buffer, fail) { - while (true) { - var tag = derDecodeTag(buffer, fail); - if (buffer.isError(tag)) - return tag; - var len = derDecodeLen(buffer, tag.primitive, fail); - if (buffer.isError(len)) - return len; - - var res; - if (tag.primitive || len !== null) - res = buffer.skip(len) - else - res = this._skipUntilEnd(buffer, fail); - - // Failure - if (buffer.isError(res)) - return res; - - if (tag.tagStr === 'end') - break; - } -}; - -DERNode.prototype._decodeList = function decodeList(buffer, tag, decoder, - options) { - var result = []; - while (!buffer.isEmpty()) { - var possibleEnd = this._peekTag(buffer, 'end'); - if (buffer.isError(possibleEnd)) - return possibleEnd; - - var res = decoder.decode(buffer, 'der', options); - if (buffer.isError(res) && possibleEnd) - break; - result.push(res); - } - return result; -}; - -DERNode.prototype._decodeStr = function decodeStr(buffer, tag) { - if (tag === 'bitstr') { - var unused = buffer.readUInt8(); - if (buffer.isError(unused)) - return unused; - return { unused: unused, data: buffer.raw() }; - } else if (tag === 'bmpstr') { - var raw = buffer.raw(); - if (raw.length % 2 === 1) - return buffer.error('Decoding of string type: bmpstr length mismatch'); - - var str = ''; - for (var i = 0; i < raw.length / 2; i++) { - str += String.fromCharCode(raw.readUInt16BE(i * 2)); - } - return str; - } else if (tag === 'numstr') { - var numstr = buffer.raw().toString('ascii'); - if (!this._isNumstr(numstr)) { - return buffer.error('Decoding of string type: ' + - 'numstr unsupported characters'); - } - return numstr; - } else if (tag === 'octstr') { - return buffer.raw(); - } else if (tag === 'objDesc') { - return buffer.raw(); - } else if (tag === 'printstr') { - var printstr = buffer.raw().toString('ascii'); - if (!this._isPrintstr(printstr)) { - return buffer.error('Decoding of string type: ' + - 'printstr unsupported characters'); - } - return printstr; - } else if (/str$/.test(tag)) { - return buffer.raw().toString(); - } else { - return buffer.error('Decoding of string type: ' + tag + ' unsupported'); - } -}; - -DERNode.prototype._decodeObjid = function decodeObjid(buffer, values, relative) { - var result; - var identifiers = []; - var ident = 0; - while (!buffer.isEmpty()) { - var subident = buffer.readUInt8(); - ident <<= 7; - ident |= subident & 0x7f; - if ((subident & 0x80) === 0) { - identifiers.push(ident); - ident = 0; - } - } - if (subident & 0x80) - identifiers.push(ident); - - var first = (identifiers[0] / 40) | 0; - var second = identifiers[0] % 40; - - if (relative) - result = identifiers; - else - result = [first, second].concat(identifiers.slice(1)); - - if (values) { - var tmp = values[result.join(' ')]; - if (tmp === undefined) - tmp = values[result.join('.')]; - if (tmp !== undefined) - result = tmp; - } - - return result; -}; - -DERNode.prototype._decodeTime = function decodeTime(buffer, tag) { - var str = buffer.raw().toString(); - if (tag === 'gentime') { - var year = str.slice(0, 4) | 0; - var mon = str.slice(4, 6) | 0; - var day = str.slice(6, 8) | 0; - var hour = str.slice(8, 10) | 0; - var min = str.slice(10, 12) | 0; - var sec = str.slice(12, 14) | 0; - } else if (tag === 'utctime') { - var year = str.slice(0, 2) | 0; - var mon = str.slice(2, 4) | 0; - var day = str.slice(4, 6) | 0; - var hour = str.slice(6, 8) | 0; - var min = str.slice(8, 10) | 0; - var sec = str.slice(10, 12) | 0; - if (year < 70) - year = 2000 + year; - else - year = 1900 + year; - } else { - return buffer.error('Decoding ' + tag + ' time is not supported yet'); - } - - return Date.UTC(year, mon - 1, day, hour, min, sec, 0); -}; - -DERNode.prototype._decodeNull = function decodeNull(buffer) { - return null; -}; - -DERNode.prototype._decodeBool = function decodeBool(buffer) { - var res = buffer.readUInt8(); - if (buffer.isError(res)) - return res; - else - return res !== 0; -}; - -DERNode.prototype._decodeInt = function decodeInt(buffer, values) { - // Bigint, return as it is (assume big endian) - var raw = buffer.raw(); - var res = new bignum(raw); - - if (values) - res = values[res.toString(10)] || res; - - return res; -}; - -DERNode.prototype._use = function use(entity, obj) { - if (typeof entity === 'function') - entity = entity(obj); - return entity._getDecoder('der').tree; -}; - -// Utility methods - -function derDecodeTag(buf, fail) { - var tag = buf.readUInt8(fail); - if (buf.isError(tag)) - return tag; - - var cls = der.tagClass[tag >> 6]; - var primitive = (tag & 0x20) === 0; - - // Multi-octet tag - load - if ((tag & 0x1f) === 0x1f) { - var oct = tag; - tag = 0; - while ((oct & 0x80) === 0x80) { - oct = buf.readUInt8(fail); - if (buf.isError(oct)) - return oct; - - tag <<= 7; - tag |= oct & 0x7f; - } - } else { - tag &= 0x1f; - } - var tagStr = der.tag[tag]; - - return { - cls: cls, - primitive: primitive, - tag: tag, - tagStr: tagStr - }; -} - -function derDecodeLen(buf, primitive, fail) { - var len = buf.readUInt8(fail); - if (buf.isError(len)) - return len; - - // Indefinite form - if (!primitive && len === 0x80) - return null; - - // Definite form - if ((len & 0x80) === 0) { - // Short form - return len; - } - - // Long form - var num = len & 0x7f; - if (num > 4) - return buf.error('length octect is too long'); - - len = 0; - for (var i = 0; i < num; i++) { - len <<= 8; - var j = buf.readUInt8(fail); - if (buf.isError(j)) - return j; - len |= j; - } - - return len; -} diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/node_modules/parse-asn1/node_modules/asn1.js/lib/asn1/decoders/index.js b/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/node_modules/parse-asn1/node_modules/asn1.js/lib/asn1/decoders/index.js deleted file mode 100644 index e2583aa8..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/node_modules/parse-asn1/node_modules/asn1.js/lib/asn1/decoders/index.js +++ /dev/null @@ -1,4 +0,0 @@ -var decoders = exports; - -decoders.der = require('./der'); -decoders.pem = require('./pem'); diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/node_modules/parse-asn1/node_modules/asn1.js/lib/asn1/decoders/pem.js b/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/node_modules/parse-asn1/node_modules/asn1.js/lib/asn1/decoders/pem.js deleted file mode 100644 index 301059ca..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/node_modules/parse-asn1/node_modules/asn1.js/lib/asn1/decoders/pem.js +++ /dev/null @@ -1,49 +0,0 @@ -var inherits = require('inherits'); -var Buffer = require('buffer').Buffer; - -var DERDecoder = require('./der'); - -function PEMDecoder(entity) { - DERDecoder.call(this, entity); - this.enc = 'pem'; -}; -inherits(PEMDecoder, DERDecoder); -module.exports = PEMDecoder; - -PEMDecoder.prototype.decode = function decode(data, options) { - var lines = data.toString().split(/[\r\n]+/g); - - var label = options.label.toUpperCase(); - - var re = /^-----(BEGIN|END) ([^-]+)-----$/; - var start = -1; - var end = -1; - for (var i = 0; i < lines.length; i++) { - var match = lines[i].match(re); - if (match === null) - continue; - - if (match[2] !== label) - continue; - - if (start === -1) { - if (match[1] !== 'BEGIN') - break; - start = i; - } else { - if (match[1] !== 'END') - break; - end = i; - break; - } - } - if (start === -1 || end === -1) - throw new Error('PEM section not found for: ' + label); - - var base64 = lines.slice(start + 1, end).join(''); - // Remove excessive symbols - base64.replace(/[^a-z0-9\+\/=]+/gi, ''); - - var input = new Buffer(base64, 'base64'); - return DERDecoder.prototype.decode.call(this, input, options); -}; diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/node_modules/parse-asn1/node_modules/asn1.js/lib/asn1/encoders/der.js b/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/node_modules/parse-asn1/node_modules/asn1.js/lib/asn1/encoders/der.js deleted file mode 100644 index 721f8022..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/node_modules/parse-asn1/node_modules/asn1.js/lib/asn1/encoders/der.js +++ /dev/null @@ -1,295 +0,0 @@ -var inherits = require('inherits'); -var Buffer = require('buffer').Buffer; - -var asn1 = require('../../asn1'); -var base = asn1.base; - -// Import DER constants -var der = asn1.constants.der; - -function DEREncoder(entity) { - this.enc = 'der'; - this.name = entity.name; - this.entity = entity; - - // Construct base tree - this.tree = new DERNode(); - this.tree._init(entity.body); -}; -module.exports = DEREncoder; - -DEREncoder.prototype.encode = function encode(data, reporter) { - return this.tree._encode(data, reporter).join(); -}; - -// Tree methods - -function DERNode(parent) { - base.Node.call(this, 'der', parent); -} -inherits(DERNode, base.Node); - -DERNode.prototype._encodeComposite = function encodeComposite(tag, - primitive, - cls, - content) { - var encodedTag = encodeTag(tag, primitive, cls, this.reporter); - - // Short form - if (content.length < 0x80) { - var header = new Buffer(2); - header[0] = encodedTag; - header[1] = content.length; - return this._createEncoderBuffer([ header, content ]); - } - - // Long form - // Count octets required to store length - var lenOctets = 1; - for (var i = content.length; i >= 0x100; i >>= 8) - lenOctets++; - - var header = new Buffer(1 + 1 + lenOctets); - header[0] = encodedTag; - header[1] = 0x80 | lenOctets; - - for (var i = 1 + lenOctets, j = content.length; j > 0; i--, j >>= 8) - header[i] = j & 0xff; - - return this._createEncoderBuffer([ header, content ]); -}; - -DERNode.prototype._encodeStr = function encodeStr(str, tag) { - if (tag === 'bitstr') { - return this._createEncoderBuffer([ str.unused | 0, str.data ]); - } else if (tag === 'bmpstr') { - var buf = new Buffer(str.length * 2); - for (var i = 0; i < str.length; i++) { - buf.writeUInt16BE(str.charCodeAt(i), i * 2); - } - return this._createEncoderBuffer(buf); - } else if (tag === 'numstr') { - if (!this._isNumstr(str)) { - return this.reporter.error('Encoding of string type: numstr supports ' + - 'only digits and space'); - } - return this._createEncoderBuffer(str); - } else if (tag === 'printstr') { - if (!this._isPrintstr(str)) { - return this.reporter.error('Encoding of string type: printstr supports ' + - 'only latin upper and lower case letters, ' + - 'digits, space, apostrophe, left and rigth ' + - 'parenthesis, plus sign, comma, hyphen, ' + - 'dot, slash, colon, equal sign, ' + - 'question mark'); - } - return this._createEncoderBuffer(str); - } else if (/str$/.test(tag)) { - return this._createEncoderBuffer(str); - } else if (tag === 'objDesc') { - return this._createEncoderBuffer(str); - } else { - return this.reporter.error('Encoding of string type: ' + tag + - ' unsupported'); - } -}; - -DERNode.prototype._encodeObjid = function encodeObjid(id, values, relative) { - if (typeof id === 'string') { - if (!values) - return this.reporter.error('string objid given, but no values map found'); - if (!values.hasOwnProperty(id)) - return this.reporter.error('objid not found in values map'); - id = values[id].split(/[\s\.]+/g); - for (var i = 0; i < id.length; i++) - id[i] |= 0; - } else if (Array.isArray(id)) { - id = id.slice(); - for (var i = 0; i < id.length; i++) - id[i] |= 0; - } - - if (!Array.isArray(id)) { - return this.reporter.error('objid() should be either array or string, ' + - 'got: ' + JSON.stringify(id)); - } - - if (!relative) { - if (id[1] >= 40) - return this.reporter.error('Second objid identifier OOB'); - id.splice(0, 2, id[0] * 40 + id[1]); - } - - // Count number of octets - var size = 0; - for (var i = 0; i < id.length; i++) { - var ident = id[i]; - for (size++; ident >= 0x80; ident >>= 7) - size++; - } - - var objid = new Buffer(size); - var offset = objid.length - 1; - for (var i = id.length - 1; i >= 0; i--) { - var ident = id[i]; - objid[offset--] = ident & 0x7f; - while ((ident >>= 7) > 0) - objid[offset--] = 0x80 | (ident & 0x7f); - } - - return this._createEncoderBuffer(objid); -}; - -function two(num) { - if (num < 10) - return '0' + num; - else - return num; -} - -DERNode.prototype._encodeTime = function encodeTime(time, tag) { - var str; - var date = new Date(time); - - if (tag === 'gentime') { - str = [ - two(date.getFullYear()), - two(date.getUTCMonth() + 1), - two(date.getUTCDate()), - two(date.getUTCHours()), - two(date.getUTCMinutes()), - two(date.getUTCSeconds()), - 'Z' - ].join(''); - } else if (tag === 'utctime') { - str = [ - two(date.getFullYear() % 100), - two(date.getUTCMonth() + 1), - two(date.getUTCDate()), - two(date.getUTCHours()), - two(date.getUTCMinutes()), - two(date.getUTCSeconds()), - 'Z' - ].join(''); - } else { - this.reporter.error('Encoding ' + tag + ' time is not supported yet'); - } - - return this._encodeStr(str, 'octstr'); -}; - -DERNode.prototype._encodeNull = function encodeNull() { - return this._createEncoderBuffer(''); -}; - -DERNode.prototype._encodeInt = function encodeInt(num, values) { - if (typeof num === 'string') { - if (!values) - return this.reporter.error('String int or enum given, but no values map'); - if (!values.hasOwnProperty(num)) { - return this.reporter.error('Values map doesn\'t contain: ' + - JSON.stringify(num)); - } - num = values[num]; - } - - // Bignum, assume big endian - if (typeof num !== 'number' && !Buffer.isBuffer(num)) { - var numArray = num.toArray(); - if (!num.sign && numArray[0] & 0x80) { - numArray.unshift(0); - } - num = new Buffer(numArray); - } - - if (Buffer.isBuffer(num)) { - var size = num.length; - if (num.length === 0) - size++; - - var out = new Buffer(size); - num.copy(out); - if (num.length === 0) - out[0] = 0 - return this._createEncoderBuffer(out); - } - - if (num < 0x80) - return this._createEncoderBuffer(num); - - if (num < 0x100) - return this._createEncoderBuffer([0, num]); - - var size = 1; - for (var i = num; i >= 0x100; i >>= 8) - size++; - - var out = new Array(size); - for (var i = out.length - 1; i >= 0; i--) { - out[i] = num & 0xff; - num >>= 8; - } - if(out[0] & 0x80) { - out.unshift(0); - } - - return this._createEncoderBuffer(new Buffer(out)); -}; - -DERNode.prototype._encodeBool = function encodeBool(value) { - return this._createEncoderBuffer(value ? 0xff : 0); -}; - -DERNode.prototype._use = function use(entity, obj) { - if (typeof entity === 'function') - entity = entity(obj); - return entity._getEncoder('der').tree; -}; - -DERNode.prototype._skipDefault = function skipDefault(dataBuffer, reporter, parent) { - var state = this._baseState; - var i; - if (state['default'] === null) - return false; - - var data = dataBuffer.join(); - if (state.defaultBuffer === undefined) - state.defaultBuffer = this._encodeValue(state['default'], reporter, parent).join(); - - if (data.length !== state.defaultBuffer.length) - return false; - - for (i=0; i < data.length; i++) - if (data[i] !== state.defaultBuffer[i]) - return false; - - return true; -}; - -// Utility methods - -function encodeTag(tag, primitive, cls, reporter) { - var res; - - if (tag === 'seqof') - tag = 'seq'; - else if (tag === 'setof') - tag = 'set'; - - if (der.tagByName.hasOwnProperty(tag)) - res = der.tagByName[tag]; - else if (typeof tag === 'number' && (tag | 0) === tag) - res = tag; - else - return reporter.error('Unknown tag: ' + tag); - - if (res >= 0x1f) - return reporter.error('Multi-octet tag encoding unsupported'); - - if (!primitive) - res |= 0x20; - - res |= (der.tagClassByName[cls || 'universal'] << 6); - - return res; -} diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/node_modules/parse-asn1/node_modules/asn1.js/lib/asn1/encoders/index.js b/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/node_modules/parse-asn1/node_modules/asn1.js/lib/asn1/encoders/index.js deleted file mode 100644 index 6a5d29ec..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/node_modules/parse-asn1/node_modules/asn1.js/lib/asn1/encoders/index.js +++ /dev/null @@ -1,4 +0,0 @@ -var encoders = exports; - -encoders.der = require('./der'); -encoders.pem = require('./pem'); diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/node_modules/parse-asn1/node_modules/asn1.js/lib/asn1/encoders/pem.js b/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/node_modules/parse-asn1/node_modules/asn1.js/lib/asn1/encoders/pem.js deleted file mode 100644 index 864271fa..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/node_modules/parse-asn1/node_modules/asn1.js/lib/asn1/encoders/pem.js +++ /dev/null @@ -1,21 +0,0 @@ -var inherits = require('inherits'); - -var DEREncoder = require('./der'); - -function PEMEncoder(entity) { - DEREncoder.call(this, entity); - this.enc = 'pem'; -}; -inherits(PEMEncoder, DEREncoder); -module.exports = PEMEncoder; - -PEMEncoder.prototype.encode = function encode(data, options) { - var buf = DEREncoder.prototype.encode.call(this, data); - - var p = buf.toString('base64'); - var out = [ '-----BEGIN ' + options.label + '-----' ]; - for (var i = 0; i < p.length; i += 64) - out.push(p.slice(i, i + 64)); - out.push('-----END ' + options.label + '-----'); - return out.join('\n'); -}; diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/node_modules/parse-asn1/node_modules/asn1.js/node_modules/minimalistic-assert/index.js b/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/node_modules/parse-asn1/node_modules/asn1.js/node_modules/minimalistic-assert/index.js deleted file mode 100644 index 70b4ea5b..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/node_modules/parse-asn1/node_modules/asn1.js/node_modules/minimalistic-assert/index.js +++ /dev/null @@ -1,11 +0,0 @@ -module.exports = assert; - -function assert(val, msg) { - if (!val) - throw new Error(msg || 'Assertion failed'); -} - -assert.equal = function assertEqual(l, r, msg) { - if (l != r) - throw new Error(msg || ('Assertion failed: ' + l + ' != ' + r)); -}; diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/node_modules/parse-asn1/node_modules/asn1.js/node_modules/minimalistic-assert/package.json b/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/node_modules/parse-asn1/node_modules/asn1.js/node_modules/minimalistic-assert/package.json deleted file mode 100644 index 15ca6b4a..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/node_modules/parse-asn1/node_modules/asn1.js/node_modules/minimalistic-assert/package.json +++ /dev/null @@ -1,42 +0,0 @@ -{ - "name": "minimalistic-assert", - "version": "1.0.0", - "description": "minimalistic-assert ===", - "main": "index.js", - "scripts": { - "test": "echo \"Error: no test specified\" && exit 1" - }, - "repository": { - "type": "git", - "url": "https://github.com/calvinmetcalf/minimalistic-assert.git" - }, - "author": "", - "license": "ISC", - "bugs": { - "url": "https://github.com/calvinmetcalf/minimalistic-assert/issues" - }, - "homepage": "https://github.com/calvinmetcalf/minimalistic-assert", - "gitHead": "21471ae03175986a30cd3f567ba0bfde5ab10b01", - "_id": "minimalistic-assert@1.0.0", - "_shasum": "702be2dda6b37f4836bcb3f5db56641b64a1d3d3", - "_from": "minimalistic-assert@>=1.0.0 <2.0.0", - "_npmVersion": "2.1.10", - "_nodeVersion": "0.10.35", - "_npmUser": { - "name": "cwmma", - "email": "calvin.metcalf@gmail.com" - }, - "maintainers": [ - { - "name": "cwmma", - "email": "calvin.metcalf@gmail.com" - } - ], - "dist": { - "shasum": "702be2dda6b37f4836bcb3f5db56641b64a1d3d3", - "tarball": "https://registry.npmjs.org/minimalistic-assert/-/minimalistic-assert-1.0.0.tgz" - }, - "directories": {}, - "_resolved": "https://registry.npmjs.org/minimalistic-assert/-/minimalistic-assert-1.0.0.tgz", - "readme": "ERROR: No README data found!" -} diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/node_modules/parse-asn1/node_modules/asn1.js/node_modules/minimalistic-assert/readme.md b/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/node_modules/parse-asn1/node_modules/asn1.js/node_modules/minimalistic-assert/readme.md deleted file mode 100644 index 2ca0d256..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/node_modules/parse-asn1/node_modules/asn1.js/node_modules/minimalistic-assert/readme.md +++ /dev/null @@ -1,4 +0,0 @@ -minimalistic-assert -=== - -very minimalistic assert module. diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/node_modules/parse-asn1/node_modules/asn1.js/package.json b/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/node_modules/parse-asn1/node_modules/asn1.js/package.json deleted file mode 100644 index 1f2a34b9..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/node_modules/parse-asn1/node_modules/asn1.js/package.json +++ /dev/null @@ -1,64 +0,0 @@ -{ - "name": "asn1.js", - "version": "4.9.1", - "description": "ASN.1 encoder and decoder", - "main": "lib/asn1.js", - "scripts": { - "test": "mocha --reporter spec test/*-test.js rfc/2560/test/*-test.js rfc/5280/test/*-test.js" - }, - "repository": { - "type": "git", - "url": "git+ssh://git@github.com/indutny/asn1.js.git" - }, - "keywords": [ - "asn.1", - "der" - ], - "author": { - "name": "Fedor Indutny" - }, - "license": "MIT", - "bugs": { - "url": "https://github.com/indutny/asn1.js/issues" - }, - "homepage": "https://github.com/indutny/asn1.js", - "devDependencies": { - "mocha": "^2.3.4" - }, - "dependencies": { - "bn.js": "^4.0.0", - "inherits": "^2.0.1", - "minimalistic-assert": "^1.0.0" - }, - "gitHead": "33e8f17800306ed28150ef8b6db71efa812552e5", - "_id": "asn1.js@4.9.1", - "_shasum": "48ba240b45a9280e94748990ba597d216617fd40", - "_from": "asn1.js@>=4.0.0 <5.0.0", - "_npmVersion": "3.10.8", - "_nodeVersion": "7.0.0", - "_npmUser": { - "name": "indutny", - "email": "fedor@indutny.com" - }, - "dist": { - "shasum": "48ba240b45a9280e94748990ba597d216617fd40", - "tarball": "https://registry.npmjs.org/asn1.js/-/asn1.js-4.9.1.tgz" - }, - "maintainers": [ - { - "name": "fedor.indutny", - "email": "fedor.indutny@gmail.com" - }, - { - "name": "indutny", - "email": "fedor@indutny.com" - } - ], - "_npmOperationalInternal": { - "host": "packages-12-west.internal.npmjs.com", - "tmp": "tmp/asn1.js-4.9.1.tgz_1482877947207_0.6697999401949346" - }, - "directories": {}, - "_resolved": "https://registry.npmjs.org/asn1.js/-/asn1.js-4.9.1.tgz", - "readme": "ERROR: No README data found!" -} diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/node_modules/parse-asn1/node_modules/asn1.js/test.js b/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/node_modules/parse-asn1/node_modules/asn1.js/test.js deleted file mode 100644 index 7b095312..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/node_modules/parse-asn1/node_modules/asn1.js/test.js +++ /dev/null @@ -1,5 +0,0 @@ -'use strict'; - -const rfc5280 = require('./rfc/5280'); - -const tbs = diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/node_modules/parse-asn1/node_modules/browserify-aes/.eslintrc b/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/node_modules/parse-asn1/node_modules/browserify-aes/.eslintrc deleted file mode 100644 index bed248a0..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/node_modules/parse-asn1/node_modules/browserify-aes/.eslintrc +++ /dev/null @@ -1,132 +0,0 @@ -{ - "ecmaFeatures": { - "modules": true, - "experimentalObjectRestSpread": true - }, - - "env": { - "browser": false, - "es6": true, - "node": true - }, - - "plugins": [ - "standard" - ], - - "globals": { - "document": false, - "navigator": false, - "window": false - }, - - "rules": { - "accessor-pairs": 2, - "arrow-spacing": [2, { "before": true, "after": true }], - "block-spacing": [2, "always"], - "brace-style": [2, "1tbs", { "allowSingleLine": true }], - "comma-dangle": [2, "never"], - "comma-spacing": [2, { "before": false, "after": true }], - "comma-style": [2, "last"], - "constructor-super": 2, - "curly": [2, "multi-line"], - "dot-location": [2, "property"], - "eol-last": 2, - "eqeqeq": [2, "allow-null"], - "generator-star-spacing": [2, { "before": true, "after": true }], - "handle-callback-err": [2, "^(err|error)$" ], - "indent": [2, 2, { "SwitchCase": 1 }], - "key-spacing": [2, { "beforeColon": false, "afterColon": true }], - "new-cap": [2, { "newIsCap": true, "capIsNew": false }], - "new-parens": 2, - "no-array-constructor": 2, - "no-caller": 2, - "no-class-assign": 2, - "no-cond-assign": 2, - "no-const-assign": 2, - "no-control-regex": 2, - "no-debugger": 2, - "no-delete-var": 2, - "no-dupe-args": 2, - "no-dupe-class-members": 2, - "no-dupe-keys": 2, - "no-duplicate-case": 2, - "no-empty-character-class": 2, - "no-empty-label": 2, - "no-eval": 2, - "no-ex-assign": 2, - "no-extend-native": 2, - "no-extra-bind": 2, - "no-extra-boolean-cast": 2, - "no-extra-parens": [2, "functions"], - "no-fallthrough": 2, - "no-floating-decimal": 2, - "no-func-assign": 2, - "no-implied-eval": 2, - "no-inner-declarations": [2, "functions"], - "no-invalid-regexp": 2, - "no-irregular-whitespace": 2, - "no-iterator": 2, - "no-label-var": 2, - "no-labels": 2, - "no-lone-blocks": 2, - "no-mixed-spaces-and-tabs": 2, - "no-multi-spaces": 2, - "no-multi-str": 2, - "no-multiple-empty-lines": [2, { "max": 1 }], - "no-native-reassign": 2, - "no-negated-in-lhs": 2, - "no-new": 2, - "no-new-func": 2, - "no-new-object": 2, - "no-new-require": 2, - "no-new-wrappers": 2, - "no-obj-calls": 2, - "no-octal": 2, - "no-octal-escape": 2, - "no-proto": 2, - "no-redeclare": 2, - "no-regex-spaces": 2, - "no-return-assign": 2, - "no-self-compare": 2, - "no-sequences": 2, - "no-shadow-restricted-names": 2, - "no-spaced-func": 2, - "no-sparse-arrays": 2, - "no-this-before-super": 2, - "no-throw-literal": 2, - "no-trailing-spaces": 2, - "no-undef": 2, - "no-undef-init": 2, - "no-unexpected-multiline": 2, - "no-unneeded-ternary": [2, { "defaultAssignment": false }], - "no-unreachable": 2, - "no-unused-vars": [2, { "vars": "all", "args": "none" }], - "no-useless-call": 2, - "no-with": 2, - "one-var": [2, { "initialized": "never" }], - "operator-linebreak": [2, "after", { "overrides": { "?": "before", ":": "before" } }], - "padded-blocks": [2, "never"], - "quotes": [2, "single", "avoid-escape"], - "radix": 2, - "semi": [2, "never"], - "semi-spacing": [2, { "before": false, "after": true }], - "space-after-keywords": [2, "always"], - "space-before-blocks": [2, "always"], - "space-before-function-paren": [2, "always"], - "space-before-keywords": [2, "always"], - "space-in-parens": [2, "never"], - "space-infix-ops": 2, - "space-return-throw-case": 2, - "space-unary-ops": [2, { "words": true, "nonwords": false }], - "spaced-comment": [2, "always", { "markers": ["global", "globals", "eslint", "eslint-disable", "*package", "!", ","] }], - "use-isnan": 2, - "valid-typeof": 2, - "wrap-iife": [2, "any"], - "yoda": [2, "never"], - - "standard/object-curly-even-spacing": [2, "either"], - "standard/array-bracket-even-spacing": [2, "either"], - "standard/computed-property-even-spacing": [2, "even"] - } -} diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/node_modules/parse-asn1/node_modules/browserify-aes/.npmignore b/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/node_modules/parse-asn1/node_modules/browserify-aes/.npmignore deleted file mode 100644 index 65e3ba2e..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/node_modules/parse-asn1/node_modules/browserify-aes/.npmignore +++ /dev/null @@ -1 +0,0 @@ -test/ diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/node_modules/parse-asn1/node_modules/browserify-aes/.travis.yml b/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/node_modules/parse-asn1/node_modules/browserify-aes/.travis.yml deleted file mode 100644 index eb83acd9..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/node_modules/parse-asn1/node_modules/browserify-aes/.travis.yml +++ /dev/null @@ -1,6 +0,0 @@ -language: node_js -node_js: - - "0.11" - - "0.10" - - "0.12" - - "iojs" diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/node_modules/parse-asn1/node_modules/browserify-aes/LICENSE b/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/node_modules/parse-asn1/node_modules/browserify-aes/LICENSE deleted file mode 100644 index 924b38b1..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/node_modules/parse-asn1/node_modules/browserify-aes/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2014-2015 browserify-aes contributors - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/node_modules/parse-asn1/node_modules/browserify-aes/aes.js b/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/node_modules/parse-asn1/node_modules/browserify-aes/aes.js deleted file mode 100644 index 4829057f..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/node_modules/parse-asn1/node_modules/browserify-aes/aes.js +++ /dev/null @@ -1,177 +0,0 @@ -// based on the aes implimentation in triple sec -// https://github.com/keybase/triplesec - -// which is in turn based on the one from crypto-js -// https://code.google.com/p/crypto-js/ - -var uint_max = Math.pow(2, 32) -function fixup_uint32 (x) { - var ret, x_pos - ret = x > uint_max || x < 0 ? (x_pos = Math.abs(x) % uint_max, x < 0 ? uint_max - x_pos : x_pos) : x - return ret -} -function scrub_vec (v) { - for (var i = 0; i < v.length; v++) { - v[i] = 0 - } - return false -} - -function Global () { - this.SBOX = [] - this.INV_SBOX = [] - this.SUB_MIX = [[], [], [], []] - this.INV_SUB_MIX = [[], [], [], []] - this.init() - this.RCON = [0x00, 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80, 0x1b, 0x36] -} - -Global.prototype.init = function () { - var d, i, sx, t, x, x2, x4, x8, xi, _i - d = (function () { - var _i, _results - _results = [] - for (i = _i = 0; _i < 256; i = ++_i) { - if (i < 128) { - _results.push(i << 1) - } else { - _results.push((i << 1) ^ 0x11b) - } - } - return _results - })() - x = 0 - xi = 0 - for (i = _i = 0; _i < 256; i = ++_i) { - sx = xi ^ (xi << 1) ^ (xi << 2) ^ (xi << 3) ^ (xi << 4) - sx = (sx >>> 8) ^ (sx & 0xff) ^ 0x63 - this.SBOX[x] = sx - this.INV_SBOX[sx] = x - x2 = d[x] - x4 = d[x2] - x8 = d[x4] - t = (d[sx] * 0x101) ^ (sx * 0x1010100) - this.SUB_MIX[0][x] = (t << 24) | (t >>> 8) - this.SUB_MIX[1][x] = (t << 16) | (t >>> 16) - this.SUB_MIX[2][x] = (t << 8) | (t >>> 24) - this.SUB_MIX[3][x] = t - t = (x8 * 0x1010101) ^ (x4 * 0x10001) ^ (x2 * 0x101) ^ (x * 0x1010100) - this.INV_SUB_MIX[0][sx] = (t << 24) | (t >>> 8) - this.INV_SUB_MIX[1][sx] = (t << 16) | (t >>> 16) - this.INV_SUB_MIX[2][sx] = (t << 8) | (t >>> 24) - this.INV_SUB_MIX[3][sx] = t - if (x === 0) { - x = xi = 1 - } else { - x = x2 ^ d[d[d[x8 ^ x2]]] - xi ^= d[d[xi]] - } - } - return true -} - -var G = new Global() - -AES.blockSize = 4 * 4 - -AES.prototype.blockSize = AES.blockSize - -AES.keySize = 256 / 8 - -AES.prototype.keySize = AES.keySize - -function bufferToArray (buf) { - var len = buf.length / 4 - var out = new Array(len) - var i = -1 - while (++i < len) { - out[i] = buf.readUInt32BE(i * 4) - } - return out -} -function AES (key) { - this._key = bufferToArray(key) - this._doReset() -} - -AES.prototype._doReset = function () { - var invKsRow, keySize, keyWords, ksRow, ksRows, t - keyWords = this._key - keySize = keyWords.length - this._nRounds = keySize + 6 - ksRows = (this._nRounds + 1) * 4 - this._keySchedule = [] - for (ksRow = 0; ksRow < ksRows; ksRow++) { - this._keySchedule[ksRow] = ksRow < keySize ? keyWords[ksRow] : (t = this._keySchedule[ksRow - 1], (ksRow % keySize) === 0 ? (t = (t << 8) | (t >>> 24), t = (G.SBOX[t >>> 24] << 24) | (G.SBOX[(t >>> 16) & 0xff] << 16) | (G.SBOX[(t >>> 8) & 0xff] << 8) | G.SBOX[t & 0xff], t ^= G.RCON[(ksRow / keySize) | 0] << 24) : keySize > 6 && ksRow % keySize === 4 ? t = (G.SBOX[t >>> 24] << 24) | (G.SBOX[(t >>> 16) & 0xff] << 16) | (G.SBOX[(t >>> 8) & 0xff] << 8) | G.SBOX[t & 0xff] : void 0, this._keySchedule[ksRow - keySize] ^ t) - } - this._invKeySchedule = [] - for (invKsRow = 0; invKsRow < ksRows; invKsRow++) { - ksRow = ksRows - invKsRow - t = this._keySchedule[ksRow - (invKsRow % 4 ? 0 : 4)] - this._invKeySchedule[invKsRow] = invKsRow < 4 || ksRow <= 4 ? t : G.INV_SUB_MIX[0][G.SBOX[t >>> 24]] ^ G.INV_SUB_MIX[1][G.SBOX[(t >>> 16) & 0xff]] ^ G.INV_SUB_MIX[2][G.SBOX[(t >>> 8) & 0xff]] ^ G.INV_SUB_MIX[3][G.SBOX[t & 0xff]] - } - return true -} - -AES.prototype.encryptBlock = function (M) { - M = bufferToArray(new Buffer(M)) - var out = this._doCryptBlock(M, this._keySchedule, G.SUB_MIX, G.SBOX) - var buf = new Buffer(16) - buf.writeUInt32BE(out[0], 0) - buf.writeUInt32BE(out[1], 4) - buf.writeUInt32BE(out[2], 8) - buf.writeUInt32BE(out[3], 12) - return buf -} - -AES.prototype.decryptBlock = function (M) { - M = bufferToArray(new Buffer(M)) - var temp = [M[3], M[1]] - M[1] = temp[0] - M[3] = temp[1] - var out = this._doCryptBlock(M, this._invKeySchedule, G.INV_SUB_MIX, G.INV_SBOX) - var buf = new Buffer(16) - buf.writeUInt32BE(out[0], 0) - buf.writeUInt32BE(out[3], 4) - buf.writeUInt32BE(out[2], 8) - buf.writeUInt32BE(out[1], 12) - return buf -} - -AES.prototype.scrub = function () { - scrub_vec(this._keySchedule) - scrub_vec(this._invKeySchedule) - scrub_vec(this._key) -} - -AES.prototype._doCryptBlock = function (M, keySchedule, SUB_MIX, SBOX) { - var ksRow, s0, s1, s2, s3, t0, t1, t2, t3 - - s0 = M[0] ^ keySchedule[0] - s1 = M[1] ^ keySchedule[1] - s2 = M[2] ^ keySchedule[2] - s3 = M[3] ^ keySchedule[3] - ksRow = 4 - for (var round = 1; round < this._nRounds; round++) { - t0 = SUB_MIX[0][s0 >>> 24] ^ SUB_MIX[1][(s1 >>> 16) & 0xff] ^ SUB_MIX[2][(s2 >>> 8) & 0xff] ^ SUB_MIX[3][s3 & 0xff] ^ keySchedule[ksRow++] - t1 = SUB_MIX[0][s1 >>> 24] ^ SUB_MIX[1][(s2 >>> 16) & 0xff] ^ SUB_MIX[2][(s3 >>> 8) & 0xff] ^ SUB_MIX[3][s0 & 0xff] ^ keySchedule[ksRow++] - t2 = SUB_MIX[0][s2 >>> 24] ^ SUB_MIX[1][(s3 >>> 16) & 0xff] ^ SUB_MIX[2][(s0 >>> 8) & 0xff] ^ SUB_MIX[3][s1 & 0xff] ^ keySchedule[ksRow++] - t3 = SUB_MIX[0][s3 >>> 24] ^ SUB_MIX[1][(s0 >>> 16) & 0xff] ^ SUB_MIX[2][(s1 >>> 8) & 0xff] ^ SUB_MIX[3][s2 & 0xff] ^ keySchedule[ksRow++] - s0 = t0 - s1 = t1 - s2 = t2 - s3 = t3 - } - t0 = ((SBOX[s0 >>> 24] << 24) | (SBOX[(s1 >>> 16) & 0xff] << 16) | (SBOX[(s2 >>> 8) & 0xff] << 8) | SBOX[s3 & 0xff]) ^ keySchedule[ksRow++] - t1 = ((SBOX[s1 >>> 24] << 24) | (SBOX[(s2 >>> 16) & 0xff] << 16) | (SBOX[(s3 >>> 8) & 0xff] << 8) | SBOX[s0 & 0xff]) ^ keySchedule[ksRow++] - t2 = ((SBOX[s2 >>> 24] << 24) | (SBOX[(s3 >>> 16) & 0xff] << 16) | (SBOX[(s0 >>> 8) & 0xff] << 8) | SBOX[s1 & 0xff]) ^ keySchedule[ksRow++] - t3 = ((SBOX[s3 >>> 24] << 24) | (SBOX[(s0 >>> 16) & 0xff] << 16) | (SBOX[(s1 >>> 8) & 0xff] << 8) | SBOX[s2 & 0xff]) ^ keySchedule[ksRow++] - return [ - fixup_uint32(t0), - fixup_uint32(t1), - fixup_uint32(t2), - fixup_uint32(t3) - ] -} - -exports.AES = AES diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/node_modules/parse-asn1/node_modules/browserify-aes/authCipher.js b/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/node_modules/parse-asn1/node_modules/browserify-aes/authCipher.js deleted file mode 100644 index 1107a01a..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/node_modules/parse-asn1/node_modules/browserify-aes/authCipher.js +++ /dev/null @@ -1,97 +0,0 @@ -var aes = require('./aes') -var Transform = require('cipher-base') -var inherits = require('inherits') -var GHASH = require('./ghash') -var xor = require('buffer-xor') -inherits(StreamCipher, Transform) -module.exports = StreamCipher - -function StreamCipher (mode, key, iv, decrypt) { - if (!(this instanceof StreamCipher)) { - return new StreamCipher(mode, key, iv) - } - Transform.call(this) - this._finID = Buffer.concat([iv, new Buffer([0, 0, 0, 1])]) - iv = Buffer.concat([iv, new Buffer([0, 0, 0, 2])]) - this._cipher = new aes.AES(key) - this._prev = new Buffer(iv.length) - this._cache = new Buffer('') - this._secCache = new Buffer('') - this._decrypt = decrypt - this._alen = 0 - this._len = 0 - iv.copy(this._prev) - this._mode = mode - var h = new Buffer(4) - h.fill(0) - this._ghash = new GHASH(this._cipher.encryptBlock(h)) - this._authTag = null - this._called = false -} -StreamCipher.prototype._update = function (chunk) { - if (!this._called && this._alen) { - var rump = 16 - (this._alen % 16) - if (rump < 16) { - rump = new Buffer(rump) - rump.fill(0) - this._ghash.update(rump) - } - } - this._called = true - var out = this._mode.encrypt(this, chunk) - if (this._decrypt) { - this._ghash.update(chunk) - } else { - this._ghash.update(out) - } - this._len += chunk.length - return out -} -StreamCipher.prototype._final = function () { - if (this._decrypt && !this._authTag) { - throw new Error('Unsupported state or unable to authenticate data') - } - var tag = xor(this._ghash.final(this._alen * 8, this._len * 8), this._cipher.encryptBlock(this._finID)) - if (this._decrypt) { - if (xorTest(tag, this._authTag)) { - throw new Error('Unsupported state or unable to authenticate data') - } - } else { - this._authTag = tag - } - this._cipher.scrub() -} -StreamCipher.prototype.getAuthTag = function getAuthTag () { - if (!this._decrypt && Buffer.isBuffer(this._authTag)) { - return this._authTag - } else { - throw new Error('Attempting to get auth tag in unsupported state') - } -} -StreamCipher.prototype.setAuthTag = function setAuthTag (tag) { - if (this._decrypt) { - this._authTag = tag - } else { - throw new Error('Attempting to set auth tag in unsupported state') - } -} -StreamCipher.prototype.setAAD = function setAAD (buf) { - if (!this._called) { - this._ghash.update(buf) - this._alen += buf.length - } else { - throw new Error('Attempting to set AAD in unsupported state') - } -} -function xorTest (a, b) { - var out = 0 - if (a.length !== b.length) { - out++ - } - var len = Math.min(a.length, b.length) - var i = -1 - while (++i < len) { - out += (a[i] ^ b[i]) - } - return out -} diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/node_modules/parse-asn1/node_modules/browserify-aes/browser.js b/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/node_modules/parse-asn1/node_modules/browserify-aes/browser.js deleted file mode 100644 index a058a84d..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/node_modules/parse-asn1/node_modules/browserify-aes/browser.js +++ /dev/null @@ -1,11 +0,0 @@ -var ciphers = require('./encrypter') -exports.createCipher = exports.Cipher = ciphers.createCipher -exports.createCipheriv = exports.Cipheriv = ciphers.createCipheriv -var deciphers = require('./decrypter') -exports.createDecipher = exports.Decipher = deciphers.createDecipher -exports.createDecipheriv = exports.Decipheriv = deciphers.createDecipheriv -var modes = require('./modes') -function getCiphers () { - return Object.keys(modes) -} -exports.listCiphers = exports.getCiphers = getCiphers diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/node_modules/parse-asn1/node_modules/browserify-aes/decrypter.js b/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/node_modules/parse-asn1/node_modules/browserify-aes/decrypter.js deleted file mode 100644 index b7b8bb02..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/node_modules/parse-asn1/node_modules/browserify-aes/decrypter.js +++ /dev/null @@ -1,137 +0,0 @@ -var aes = require('./aes') -var Transform = require('cipher-base') -var inherits = require('inherits') -var modes = require('./modes') -var StreamCipher = require('./streamCipher') -var AuthCipher = require('./authCipher') -var ebtk = require('evp_bytestokey') - -inherits(Decipher, Transform) -function Decipher (mode, key, iv) { - if (!(this instanceof Decipher)) { - return new Decipher(mode, key, iv) - } - Transform.call(this) - this._cache = new Splitter() - this._last = void 0 - this._cipher = new aes.AES(key) - this._prev = new Buffer(iv.length) - iv.copy(this._prev) - this._mode = mode - this._autopadding = true -} -Decipher.prototype._update = function (data) { - this._cache.add(data) - var chunk - var thing - var out = [] - while ((chunk = this._cache.get(this._autopadding))) { - thing = this._mode.decrypt(this, chunk) - out.push(thing) - } - return Buffer.concat(out) -} -Decipher.prototype._final = function () { - var chunk = this._cache.flush() - if (this._autopadding) { - return unpad(this._mode.decrypt(this, chunk)) - } else if (chunk) { - throw new Error('data not multiple of block length') - } -} -Decipher.prototype.setAutoPadding = function (setTo) { - this._autopadding = !!setTo - return this -} -function Splitter () { - if (!(this instanceof Splitter)) { - return new Splitter() - } - this.cache = new Buffer('') -} -Splitter.prototype.add = function (data) { - this.cache = Buffer.concat([this.cache, data]) -} - -Splitter.prototype.get = function (autoPadding) { - var out - if (autoPadding) { - if (this.cache.length > 16) { - out = this.cache.slice(0, 16) - this.cache = this.cache.slice(16) - return out - } - } else { - if (this.cache.length >= 16) { - out = this.cache.slice(0, 16) - this.cache = this.cache.slice(16) - return out - } - } - return null -} -Splitter.prototype.flush = function () { - if (this.cache.length) { - return this.cache - } -} -function unpad (last) { - var padded = last[15] - var i = -1 - while (++i < padded) { - if (last[(i + (16 - padded))] !== padded) { - throw new Error('unable to decrypt data') - } - } - if (padded === 16) { - return - } - return last.slice(0, 16 - padded) -} - -var modelist = { - ECB: require('./modes/ecb'), - CBC: require('./modes/cbc'), - CFB: require('./modes/cfb'), - CFB8: require('./modes/cfb8'), - CFB1: require('./modes/cfb1'), - OFB: require('./modes/ofb'), - CTR: require('./modes/ctr'), - GCM: require('./modes/ctr') -} - -function createDecipheriv (suite, password, iv) { - var config = modes[suite.toLowerCase()] - if (!config) { - throw new TypeError('invalid suite type') - } - if (typeof iv === 'string') { - iv = new Buffer(iv) - } - if (typeof password === 'string') { - password = new Buffer(password) - } - if (password.length !== config.key / 8) { - throw new TypeError('invalid key length ' + password.length) - } - if (iv.length !== config.iv) { - throw new TypeError('invalid iv length ' + iv.length) - } - if (config.type === 'stream') { - return new StreamCipher(modelist[config.mode], password, iv, true) - } else if (config.type === 'auth') { - return new AuthCipher(modelist[config.mode], password, iv, true) - } - return new Decipher(modelist[config.mode], password, iv) -} - -function createDecipher (suite, password) { - var config = modes[suite.toLowerCase()] - if (!config) { - throw new TypeError('invalid suite type') - } - var keys = ebtk(password, false, config.key, config.iv) - return createDecipheriv(suite, keys.key, keys.iv) -} -exports.createDecipher = createDecipher -exports.createDecipheriv = createDecipheriv diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/node_modules/parse-asn1/node_modules/browserify-aes/encrypter.js b/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/node_modules/parse-asn1/node_modules/browserify-aes/encrypter.js deleted file mode 100644 index 3d3f561e..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/node_modules/parse-asn1/node_modules/browserify-aes/encrypter.js +++ /dev/null @@ -1,122 +0,0 @@ -var aes = require('./aes') -var Transform = require('cipher-base') -var inherits = require('inherits') -var modes = require('./modes') -var ebtk = require('evp_bytestokey') -var StreamCipher = require('./streamCipher') -var AuthCipher = require('./authCipher') -inherits(Cipher, Transform) -function Cipher (mode, key, iv) { - if (!(this instanceof Cipher)) { - return new Cipher(mode, key, iv) - } - Transform.call(this) - this._cache = new Splitter() - this._cipher = new aes.AES(key) - this._prev = new Buffer(iv.length) - iv.copy(this._prev) - this._mode = mode - this._autopadding = true -} -Cipher.prototype._update = function (data) { - this._cache.add(data) - var chunk - var thing - var out = [] - while ((chunk = this._cache.get())) { - thing = this._mode.encrypt(this, chunk) - out.push(thing) - } - return Buffer.concat(out) -} -Cipher.prototype._final = function () { - var chunk = this._cache.flush() - if (this._autopadding) { - chunk = this._mode.encrypt(this, chunk) - this._cipher.scrub() - return chunk - } else if (chunk.toString('hex') !== '10101010101010101010101010101010') { - this._cipher.scrub() - throw new Error('data not multiple of block length') - } -} -Cipher.prototype.setAutoPadding = function (setTo) { - this._autopadding = !!setTo - return this -} - -function Splitter () { - if (!(this instanceof Splitter)) { - return new Splitter() - } - this.cache = new Buffer('') -} -Splitter.prototype.add = function (data) { - this.cache = Buffer.concat([this.cache, data]) -} - -Splitter.prototype.get = function () { - if (this.cache.length > 15) { - var out = this.cache.slice(0, 16) - this.cache = this.cache.slice(16) - return out - } - return null -} -Splitter.prototype.flush = function () { - var len = 16 - this.cache.length - var padBuff = new Buffer(len) - - var i = -1 - while (++i < len) { - padBuff.writeUInt8(len, i) - } - var out = Buffer.concat([this.cache, padBuff]) - return out -} -var modelist = { - ECB: require('./modes/ecb'), - CBC: require('./modes/cbc'), - CFB: require('./modes/cfb'), - CFB8: require('./modes/cfb8'), - CFB1: require('./modes/cfb1'), - OFB: require('./modes/ofb'), - CTR: require('./modes/ctr'), - GCM: require('./modes/ctr') -} - -function createCipheriv (suite, password, iv) { - var config = modes[suite.toLowerCase()] - if (!config) { - throw new TypeError('invalid suite type') - } - if (typeof iv === 'string') { - iv = new Buffer(iv) - } - if (typeof password === 'string') { - password = new Buffer(password) - } - if (password.length !== config.key / 8) { - throw new TypeError('invalid key length ' + password.length) - } - if (iv.length !== config.iv) { - throw new TypeError('invalid iv length ' + iv.length) - } - if (config.type === 'stream') { - return new StreamCipher(modelist[config.mode], password, iv) - } else if (config.type === 'auth') { - return new AuthCipher(modelist[config.mode], password, iv) - } - return new Cipher(modelist[config.mode], password, iv) -} -function createCipher (suite, password) { - var config = modes[suite.toLowerCase()] - if (!config) { - throw new TypeError('invalid suite type') - } - var keys = ebtk(password, false, config.key, config.iv) - return createCipheriv(suite, keys.key, keys.iv) -} - -exports.createCipheriv = createCipheriv -exports.createCipher = createCipher diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/node_modules/parse-asn1/node_modules/browserify-aes/ghash.js b/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/node_modules/parse-asn1/node_modules/browserify-aes/ghash.js deleted file mode 100644 index 0ca143cd..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/node_modules/parse-asn1/node_modules/browserify-aes/ghash.js +++ /dev/null @@ -1,98 +0,0 @@ -var zeros = new Buffer(16) -zeros.fill(0) -module.exports = GHASH -function GHASH (key) { - this.h = key - this.state = new Buffer(16) - this.state.fill(0) - this.cache = new Buffer('') -} -// from http://bitwiseshiftleft.github.io/sjcl/doc/symbols/src/core_gcm.js.html -// by Juho Vähä-Herttua -GHASH.prototype.ghash = function (block) { - var i = -1 - while (++i < block.length) { - this.state[i] ^= block[i] - } - this._multiply() -} - -GHASH.prototype._multiply = function () { - var Vi = toArray(this.h) - var Zi = [0, 0, 0, 0] - var j, xi, lsb_Vi - var i = -1 - while (++i < 128) { - xi = (this.state[~~(i / 8)] & (1 << (7 - i % 8))) !== 0 - if (xi) { - // Z_i+1 = Z_i ^ V_i - Zi = xor(Zi, Vi) - } - - // Store the value of LSB(V_i) - lsb_Vi = (Vi[3] & 1) !== 0 - - // V_i+1 = V_i >> 1 - for (j = 3; j > 0; j--) { - Vi[j] = (Vi[j] >>> 1) | ((Vi[j - 1] & 1) << 31) - } - Vi[0] = Vi[0] >>> 1 - - // If LSB(V_i) is 1, V_i+1 = (V_i >> 1) ^ R - if (lsb_Vi) { - Vi[0] = Vi[0] ^ (0xe1 << 24) - } - } - this.state = fromArray(Zi) -} -GHASH.prototype.update = function (buf) { - this.cache = Buffer.concat([this.cache, buf]) - var chunk - while (this.cache.length >= 16) { - chunk = this.cache.slice(0, 16) - this.cache = this.cache.slice(16) - this.ghash(chunk) - } -} -GHASH.prototype.final = function (abl, bl) { - if (this.cache.length) { - this.ghash(Buffer.concat([this.cache, zeros], 16)) - } - this.ghash(fromArray([ - 0, abl, - 0, bl - ])) - return this.state -} - -function toArray (buf) { - return [ - buf.readUInt32BE(0), - buf.readUInt32BE(4), - buf.readUInt32BE(8), - buf.readUInt32BE(12) - ] -} -function fromArray (out) { - out = out.map(fixup_uint32) - var buf = new Buffer(16) - buf.writeUInt32BE(out[0], 0) - buf.writeUInt32BE(out[1], 4) - buf.writeUInt32BE(out[2], 8) - buf.writeUInt32BE(out[3], 12) - return buf -} -var uint_max = Math.pow(2, 32) -function fixup_uint32 (x) { - var ret, x_pos - ret = x > uint_max || x < 0 ? (x_pos = Math.abs(x) % uint_max, x < 0 ? uint_max - x_pos : x_pos) : x - return ret -} -function xor (a, b) { - return [ - a[0] ^ b[0], - a[1] ^ b[1], - a[2] ^ b[2], - a[3] ^ b[3] - ] -} diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/node_modules/parse-asn1/node_modules/browserify-aes/index.js b/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/node_modules/parse-asn1/node_modules/browserify-aes/index.js deleted file mode 100644 index 58fa883f..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/node_modules/parse-asn1/node_modules/browserify-aes/index.js +++ /dev/null @@ -1,7 +0,0 @@ -var crypto = require('crypto') - -exports.createCipher = exports.Cipher = crypto.createCipher -exports.createCipheriv = exports.Cipheriv = crypto.createCipheriv -exports.createDecipher = exports.Decipher = crypto.createDecipher -exports.createDecipheriv = exports.Decipheriv = crypto.createDecipheriv -exports.listCiphers = exports.getCiphers = crypto.getCiphers diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/node_modules/parse-asn1/node_modules/browserify-aes/modes.js b/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/node_modules/parse-asn1/node_modules/browserify-aes/modes.js deleted file mode 100644 index c070086d..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/node_modules/parse-asn1/node_modules/browserify-aes/modes.js +++ /dev/null @@ -1,171 +0,0 @@ -exports['aes-128-ecb'] = { - cipher: 'AES', - key: 128, - iv: 0, - mode: 'ECB', - type: 'block' -} -exports['aes-192-ecb'] = { - cipher: 'AES', - key: 192, - iv: 0, - mode: 'ECB', - type: 'block' -} -exports['aes-256-ecb'] = { - cipher: 'AES', - key: 256, - iv: 0, - mode: 'ECB', - type: 'block' -} -exports['aes-128-cbc'] = { - cipher: 'AES', - key: 128, - iv: 16, - mode: 'CBC', - type: 'block' -} -exports['aes-192-cbc'] = { - cipher: 'AES', - key: 192, - iv: 16, - mode: 'CBC', - type: 'block' -} -exports['aes-256-cbc'] = { - cipher: 'AES', - key: 256, - iv: 16, - mode: 'CBC', - type: 'block' -} -exports['aes128'] = exports['aes-128-cbc'] -exports['aes192'] = exports['aes-192-cbc'] -exports['aes256'] = exports['aes-256-cbc'] -exports['aes-128-cfb'] = { - cipher: 'AES', - key: 128, - iv: 16, - mode: 'CFB', - type: 'stream' -} -exports['aes-192-cfb'] = { - cipher: 'AES', - key: 192, - iv: 16, - mode: 'CFB', - type: 'stream' -} -exports['aes-256-cfb'] = { - cipher: 'AES', - key: 256, - iv: 16, - mode: 'CFB', - type: 'stream' -} -exports['aes-128-cfb8'] = { - cipher: 'AES', - key: 128, - iv: 16, - mode: 'CFB8', - type: 'stream' -} -exports['aes-192-cfb8'] = { - cipher: 'AES', - key: 192, - iv: 16, - mode: 'CFB8', - type: 'stream' -} -exports['aes-256-cfb8'] = { - cipher: 'AES', - key: 256, - iv: 16, - mode: 'CFB8', - type: 'stream' -} -exports['aes-128-cfb1'] = { - cipher: 'AES', - key: 128, - iv: 16, - mode: 'CFB1', - type: 'stream' -} -exports['aes-192-cfb1'] = { - cipher: 'AES', - key: 192, - iv: 16, - mode: 'CFB1', - type: 'stream' -} -exports['aes-256-cfb1'] = { - cipher: 'AES', - key: 256, - iv: 16, - mode: 'CFB1', - type: 'stream' -} -exports['aes-128-ofb'] = { - cipher: 'AES', - key: 128, - iv: 16, - mode: 'OFB', - type: 'stream' -} -exports['aes-192-ofb'] = { - cipher: 'AES', - key: 192, - iv: 16, - mode: 'OFB', - type: 'stream' -} -exports['aes-256-ofb'] = { - cipher: 'AES', - key: 256, - iv: 16, - mode: 'OFB', - type: 'stream' -} -exports['aes-128-ctr'] = { - cipher: 'AES', - key: 128, - iv: 16, - mode: 'CTR', - type: 'stream' -} -exports['aes-192-ctr'] = { - cipher: 'AES', - key: 192, - iv: 16, - mode: 'CTR', - type: 'stream' -} -exports['aes-256-ctr'] = { - cipher: 'AES', - key: 256, - iv: 16, - mode: 'CTR', - type: 'stream' -} -exports['aes-128-gcm'] = { - cipher: 'AES', - key: 128, - iv: 12, - mode: 'GCM', - type: 'auth' -} -exports['aes-192-gcm'] = { - cipher: 'AES', - key: 192, - iv: 12, - mode: 'GCM', - type: 'auth' -} -exports['aes-256-gcm'] = { - cipher: 'AES', - key: 256, - iv: 12, - mode: 'GCM', - type: 'auth' -} diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/node_modules/parse-asn1/node_modules/browserify-aes/modes/cbc.js b/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/node_modules/parse-asn1/node_modules/browserify-aes/modes/cbc.js deleted file mode 100644 index b133e406..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/node_modules/parse-asn1/node_modules/browserify-aes/modes/cbc.js +++ /dev/null @@ -1,17 +0,0 @@ -var xor = require('buffer-xor') - -exports.encrypt = function (self, block) { - var data = xor(block, self._prev) - - self._prev = self._cipher.encryptBlock(data) - return self._prev -} - -exports.decrypt = function (self, block) { - var pad = self._prev - - self._prev = block - var out = self._cipher.decryptBlock(block) - - return xor(out, pad) -} diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/node_modules/parse-asn1/node_modules/browserify-aes/modes/cfb.js b/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/node_modules/parse-asn1/node_modules/browserify-aes/modes/cfb.js deleted file mode 100644 index 0bfe4fab..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/node_modules/parse-asn1/node_modules/browserify-aes/modes/cfb.js +++ /dev/null @@ -1,31 +0,0 @@ -var xor = require('buffer-xor') - -exports.encrypt = function (self, data, decrypt) { - var out = new Buffer('') - var len - - while (data.length) { - if (self._cache.length === 0) { - self._cache = self._cipher.encryptBlock(self._prev) - self._prev = new Buffer('') - } - - if (self._cache.length <= data.length) { - len = self._cache.length - out = Buffer.concat([out, encryptStart(self, data.slice(0, len), decrypt)]) - data = data.slice(len) - } else { - out = Buffer.concat([out, encryptStart(self, data, decrypt)]) - break - } - } - - return out -} -function encryptStart (self, data, decrypt) { - var len = data.length - var out = xor(data, self._cache) - self._cache = self._cache.slice(len) - self._prev = Buffer.concat([self._prev, decrypt ? data : out]) - return out -} diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/node_modules/parse-asn1/node_modules/browserify-aes/modes/cfb1.js b/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/node_modules/parse-asn1/node_modules/browserify-aes/modes/cfb1.js deleted file mode 100644 index 335542e2..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/node_modules/parse-asn1/node_modules/browserify-aes/modes/cfb1.js +++ /dev/null @@ -1,34 +0,0 @@ -function encryptByte (self, byteParam, decrypt) { - var pad - var i = -1 - var len = 8 - var out = 0 - var bit, value - while (++i < len) { - pad = self._cipher.encryptBlock(self._prev) - bit = (byteParam & (1 << (7 - i))) ? 0x80 : 0 - value = pad[0] ^ bit - out += ((value & 0x80) >> (i % 8)) - self._prev = shiftIn(self._prev, decrypt ? bit : value) - } - return out -} -exports.encrypt = function (self, chunk, decrypt) { - var len = chunk.length - var out = new Buffer(len) - var i = -1 - while (++i < len) { - out[i] = encryptByte(self, chunk[i], decrypt) - } - return out -} -function shiftIn (buffer, value) { - var len = buffer.length - var i = -1 - var out = new Buffer(buffer.length) - buffer = Buffer.concat([buffer, new Buffer([value])]) - while (++i < len) { - out[i] = buffer[i] << 1 | buffer[i + 1] >> (7) - } - return out -} diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/node_modules/parse-asn1/node_modules/browserify-aes/modes/cfb8.js b/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/node_modules/parse-asn1/node_modules/browserify-aes/modes/cfb8.js deleted file mode 100644 index c967a959..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/node_modules/parse-asn1/node_modules/browserify-aes/modes/cfb8.js +++ /dev/null @@ -1,15 +0,0 @@ -function encryptByte (self, byteParam, decrypt) { - var pad = self._cipher.encryptBlock(self._prev) - var out = pad[0] ^ byteParam - self._prev = Buffer.concat([self._prev.slice(1), new Buffer([decrypt ? byteParam : out])]) - return out -} -exports.encrypt = function (self, chunk, decrypt) { - var len = chunk.length - var out = new Buffer(len) - var i = -1 - while (++i < len) { - out[i] = encryptByte(self, chunk[i], decrypt) - } - return out -} diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/node_modules/parse-asn1/node_modules/browserify-aes/modes/ctr.js b/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/node_modules/parse-asn1/node_modules/browserify-aes/modes/ctr.js deleted file mode 100644 index 0ef2278b..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/node_modules/parse-asn1/node_modules/browserify-aes/modes/ctr.js +++ /dev/null @@ -1,31 +0,0 @@ -var xor = require('buffer-xor') - -function incr32 (iv) { - var len = iv.length - var item - while (len--) { - item = iv.readUInt8(len) - if (item === 255) { - iv.writeUInt8(0, len) - } else { - item++ - iv.writeUInt8(item, len) - break - } - } -} - -function getBlock (self) { - var out = self._cipher.encryptBlock(self._prev) - incr32(self._prev) - return out -} - -exports.encrypt = function (self, chunk) { - while (self._cache.length < chunk.length) { - self._cache = Buffer.concat([self._cache, getBlock(self)]) - } - var pad = self._cache.slice(0, chunk.length) - self._cache = self._cache.slice(chunk.length) - return xor(chunk, pad) -} diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/node_modules/parse-asn1/node_modules/browserify-aes/modes/ecb.js b/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/node_modules/parse-asn1/node_modules/browserify-aes/modes/ecb.js deleted file mode 100644 index 4dd97e7d..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/node_modules/parse-asn1/node_modules/browserify-aes/modes/ecb.js +++ /dev/null @@ -1,6 +0,0 @@ -exports.encrypt = function (self, block) { - return self._cipher.encryptBlock(block) -} -exports.decrypt = function (self, block) { - return self._cipher.decryptBlock(block) -} diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/node_modules/parse-asn1/node_modules/browserify-aes/modes/ofb.js b/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/node_modules/parse-asn1/node_modules/browserify-aes/modes/ofb.js deleted file mode 100644 index bd875589..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/node_modules/parse-asn1/node_modules/browserify-aes/modes/ofb.js +++ /dev/null @@ -1,16 +0,0 @@ -var xor = require('buffer-xor') - -function getBlock (self) { - self._prev = self._cipher.encryptBlock(self._prev) - return self._prev -} - -exports.encrypt = function (self, chunk) { - while (self._cache.length < chunk.length) { - self._cache = Buffer.concat([self._cache, getBlock(self)]) - } - - var pad = self._cache.slice(0, chunk.length) - self._cache = self._cache.slice(chunk.length) - return xor(chunk, pad) -} diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/node_modules/parse-asn1/node_modules/browserify-aes/node_modules/buffer-xor/.npmignore b/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/node_modules/parse-asn1/node_modules/browserify-aes/node_modules/buffer-xor/.npmignore deleted file mode 100644 index 3c3629e6..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/node_modules/parse-asn1/node_modules/browserify-aes/node_modules/buffer-xor/.npmignore +++ /dev/null @@ -1 +0,0 @@ -node_modules diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/node_modules/parse-asn1/node_modules/browserify-aes/node_modules/buffer-xor/.travis.yml b/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/node_modules/parse-asn1/node_modules/browserify-aes/node_modules/buffer-xor/.travis.yml deleted file mode 100644 index d9f695b7..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/node_modules/parse-asn1/node_modules/browserify-aes/node_modules/buffer-xor/.travis.yml +++ /dev/null @@ -1,9 +0,0 @@ -language: node_js -before_install: - - "npm install npm -g" -node_js: - - "0.12" -env: - - TEST_SUITE=standard - - TEST_SUITE=unit -script: "npm run-script $TEST_SUITE" diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/node_modules/parse-asn1/node_modules/browserify-aes/node_modules/buffer-xor/LICENSE b/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/node_modules/parse-asn1/node_modules/browserify-aes/node_modules/buffer-xor/LICENSE deleted file mode 100644 index bba52181..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/node_modules/parse-asn1/node_modules/browserify-aes/node_modules/buffer-xor/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2015 Daniel Cousens - -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/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/node_modules/parse-asn1/node_modules/browserify-aes/node_modules/buffer-xor/README.md b/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/node_modules/parse-asn1/node_modules/browserify-aes/node_modules/buffer-xor/README.md deleted file mode 100644 index 007f0582..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/node_modules/parse-asn1/node_modules/browserify-aes/node_modules/buffer-xor/README.md +++ /dev/null @@ -1,41 +0,0 @@ -# buffer-xor - -[![TRAVIS](https://secure.travis-ci.org/crypto-browserify/buffer-xor.png)](http://travis-ci.org/crypto-browserify/buffer-xor) -[![NPM](http://img.shields.io/npm/v/buffer-xor.svg)](https://www.npmjs.org/package/buffer-xor) - -[![js-standard-style](https://cdn.rawgit.com/feross/standard/master/badge.svg)](https://github.com/feross/standard) - -A simple module for bitwise-xor on buffers. - - -## Examples - -``` javascript -var xor = require("buffer-xor") -var a = new Buffer('00ff0f', 'hex') -var b = new Buffer('f0f0', 'hex') - -console.log(xor(a, b)) -// => -``` - - -Or for those seeking those few extra cycles, perform the operation in place: - -``` javascript -var xorInplace = require("buffer-xor/inplace") -var a = new Buffer('00ff0f', 'hex') -var b = new Buffer('f0f0', 'hex') - -console.log(xorInplace(a, b)) -// => -// NOTE: xorInplace will return the shorter slice of its parameters - -// See that a has been mutated -console.log(a) -// => -``` - - -## License [MIT](LICENSE) - diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/node_modules/parse-asn1/node_modules/browserify-aes/node_modules/buffer-xor/index.js b/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/node_modules/parse-asn1/node_modules/browserify-aes/node_modules/buffer-xor/index.js deleted file mode 100644 index 85ee6f63..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/node_modules/parse-asn1/node_modules/browserify-aes/node_modules/buffer-xor/index.js +++ /dev/null @@ -1,10 +0,0 @@ -module.exports = function xor (a, b) { - var length = Math.min(a.length, b.length) - var buffer = new Buffer(length) - - for (var i = 0; i < length; ++i) { - buffer[i] = a[i] ^ b[i] - } - - return buffer -} diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/node_modules/parse-asn1/node_modules/browserify-aes/node_modules/buffer-xor/inline.js b/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/node_modules/parse-asn1/node_modules/browserify-aes/node_modules/buffer-xor/inline.js deleted file mode 100644 index 87975703..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/node_modules/parse-asn1/node_modules/browserify-aes/node_modules/buffer-xor/inline.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('./inplace') diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/node_modules/parse-asn1/node_modules/browserify-aes/node_modules/buffer-xor/inplace.js b/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/node_modules/parse-asn1/node_modules/browserify-aes/node_modules/buffer-xor/inplace.js deleted file mode 100644 index d71c172c..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/node_modules/parse-asn1/node_modules/browserify-aes/node_modules/buffer-xor/inplace.js +++ /dev/null @@ -1,9 +0,0 @@ -module.exports = function xorInplace (a, b) { - var length = Math.min(a.length, b.length) - - for (var i = 0; i < length; ++i) { - a[i] = a[i] ^ b[i] - } - - return a.slice(0, length) -} diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/node_modules/parse-asn1/node_modules/browserify-aes/node_modules/buffer-xor/package.json b/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/node_modules/parse-asn1/node_modules/browserify-aes/node_modules/buffer-xor/package.json deleted file mode 100644 index 0a15d4fe..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/node_modules/parse-asn1/node_modules/browserify-aes/node_modules/buffer-xor/package.json +++ /dev/null @@ -1,62 +0,0 @@ -{ - "name": "buffer-xor", - "version": "1.0.3", - "description": "A simple module for bitwise-xor on buffers", - "main": "index.js", - "scripts": { - "standard": "standard", - "test": "npm run-script unit", - "unit": "mocha" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/crypto-browserify/buffer-xor.git" - }, - "bugs": { - "url": "https://github.com/crypto-browserify/buffer-xor/issues" - }, - "homepage": "https://github.com/crypto-browserify/buffer-xor", - "keywords": [ - "bits", - "bitwise", - "buffer", - "buffer-xor", - "crypto", - "inline", - "math", - "memory", - "performance", - "xor" - ], - "author": { - "name": "Daniel Cousens" - }, - "license": "MIT", - "devDependencies": { - "mocha": "*", - "standard": "*" - }, - "gitHead": "8f92b79a8b8133c26a7ae1af09b2c84ec6e3f426", - "_id": "buffer-xor@1.0.3", - "_shasum": "26e61ed1422fb70dd42e6e36729ed51d855fe8d9", - "_from": "buffer-xor@>=1.0.2 <2.0.0", - "_npmVersion": "3.3.3", - "_nodeVersion": "4.1.1", - "_npmUser": { - "name": "dcousens", - "email": "email@dcousens.com" - }, - "dist": { - "shasum": "26e61ed1422fb70dd42e6e36729ed51d855fe8d9", - "tarball": "https://registry.npmjs.org/buffer-xor/-/buffer-xor-1.0.3.tgz" - }, - "maintainers": [ - { - "name": "dcousens", - "email": "email@dcousens.com" - } - ], - "directories": {}, - "_resolved": "https://registry.npmjs.org/buffer-xor/-/buffer-xor-1.0.3.tgz", - "readme": "ERROR: No README data found!" -} diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/node_modules/parse-asn1/node_modules/browserify-aes/node_modules/buffer-xor/test/fixtures.json b/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/node_modules/parse-asn1/node_modules/browserify-aes/node_modules/buffer-xor/test/fixtures.json deleted file mode 100644 index 6f3431ef..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/node_modules/parse-asn1/node_modules/browserify-aes/node_modules/buffer-xor/test/fixtures.json +++ /dev/null @@ -1,23 +0,0 @@ -[ - { - "a": "000f", - "b": "f0ff", - "expected": "f0f0" - }, - { - "a": "000f0f", - "b": "f0ff", - "mutated": "f0f00f", - "expected": "f0f0" - }, - { - "a": "000f", - "b": "f0ffff", - "expected": "f0f0" - }, - { - "a": "000000", - "b": "000000", - "expected": "000000" - } -] diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/node_modules/parse-asn1/node_modules/browserify-aes/node_modules/buffer-xor/test/index.js b/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/node_modules/parse-asn1/node_modules/browserify-aes/node_modules/buffer-xor/test/index.js deleted file mode 100644 index 06eacab4..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/node_modules/parse-asn1/node_modules/browserify-aes/node_modules/buffer-xor/test/index.js +++ /dev/null @@ -1,38 +0,0 @@ -/* global describe, it */ - -var assert = require('assert') -var xor = require('../') -var xorInplace = require('../inplace') -var fixtures = require('./fixtures') - -describe('xor', function () { - fixtures.forEach(function (f) { - it('returns ' + f.expected + ' for ' + f.a + '/' + f.b, function () { - var a = new Buffer(f.a, 'hex') - var b = new Buffer(f.b, 'hex') - var actual = xor(a, b) - - assert.equal(actual.toString('hex'), f.expected) - - // a/b unchanged - assert.equal(a.toString('hex'), f.a) - assert.equal(b.toString('hex'), f.b) - }) - }) -}) - -describe('xor/inplace', function () { - fixtures.forEach(function (f) { - it('returns ' + f.expected + ' for ' + f.a + '/' + f.b, function () { - var a = new Buffer(f.a, 'hex') - var b = new Buffer(f.b, 'hex') - var actual = xorInplace(a, b) - - assert.equal(actual.toString('hex'), f.expected) - - // a mutated, b unchanged - assert.equal(a.toString('hex'), f.mutated || f.expected) - assert.equal(b.toString('hex'), f.b) - }) - }) -}) diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/node_modules/parse-asn1/node_modules/browserify-aes/node_modules/cipher-base/.eslintrc b/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/node_modules/parse-asn1/node_modules/browserify-aes/node_modules/cipher-base/.eslintrc deleted file mode 100644 index a755cdbf..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/node_modules/parse-asn1/node_modules/browserify-aes/node_modules/cipher-base/.eslintrc +++ /dev/null @@ -1,3 +0,0 @@ -{ - "extends": ["standard"] -} diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/node_modules/parse-asn1/node_modules/browserify-aes/node_modules/cipher-base/.travis.yml b/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/node_modules/parse-asn1/node_modules/browserify-aes/node_modules/cipher-base/.travis.yml deleted file mode 100644 index eb83acd9..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/node_modules/parse-asn1/node_modules/browserify-aes/node_modules/cipher-base/.travis.yml +++ /dev/null @@ -1,6 +0,0 @@ -language: node_js -node_js: - - "0.11" - - "0.10" - - "0.12" - - "iojs" diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/node_modules/parse-asn1/node_modules/browserify-aes/node_modules/cipher-base/index.js b/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/node_modules/parse-asn1/node_modules/browserify-aes/node_modules/cipher-base/index.js deleted file mode 100644 index 1a661d62..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/node_modules/parse-asn1/node_modules/browserify-aes/node_modules/cipher-base/index.js +++ /dev/null @@ -1,90 +0,0 @@ -var Transform = require('stream').Transform -var inherits = require('inherits') -var StringDecoder = require('string_decoder').StringDecoder -module.exports = CipherBase -inherits(CipherBase, Transform) -function CipherBase (hashMode) { - Transform.call(this) - this.hashMode = typeof hashMode === 'string' - if (this.hashMode) { - this[hashMode] = this._finalOrDigest - } else { - this.final = this._finalOrDigest - } - this._decoder = null - this._encoding = null -} -CipherBase.prototype.update = function (data, inputEnc, outputEnc) { - if (typeof data === 'string') { - data = new Buffer(data, inputEnc) - } - var outData = this._update(data) - if (this.hashMode) { - return this - } - if (outputEnc) { - outData = this._toString(outData, outputEnc) - } - return outData -} - -CipherBase.prototype.setAutoPadding = function () {} - -CipherBase.prototype.getAuthTag = function () { - throw new Error('trying to get auth tag in unsupported state') -} - -CipherBase.prototype.setAuthTag = function () { - throw new Error('trying to set auth tag in unsupported state') -} - -CipherBase.prototype.setAAD = function () { - throw new Error('trying to set aad in unsupported state') -} - -CipherBase.prototype._transform = function (data, _, next) { - var err - try { - if (this.hashMode) { - this._update(data) - } else { - this.push(this._update(data)) - } - } catch (e) { - err = e - } finally { - next(err) - } -} -CipherBase.prototype._flush = function (done) { - var err - try { - this.push(this._final()) - } catch (e) { - err = e - } finally { - done(err) - } -} -CipherBase.prototype._finalOrDigest = function (outputEnc) { - var outData = this._final() || new Buffer('') - if (outputEnc) { - outData = this._toString(outData, outputEnc, true) - } - return outData -} - -CipherBase.prototype._toString = function (value, enc, fin) { - if (!this._decoder) { - this._decoder = new StringDecoder(enc) - this._encoding = enc - } - if (this._encoding !== enc) { - throw new Error('can\'t switch encodings') - } - var out = this._decoder.write(value) - if (fin) { - out += this._decoder.end() - } - return out -} diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/node_modules/parse-asn1/node_modules/browserify-aes/node_modules/cipher-base/package.json b/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/node_modules/parse-asn1/node_modules/browserify-aes/node_modules/cipher-base/package.json deleted file mode 100644 index d1275bc2..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/node_modules/parse-asn1/node_modules/browserify-aes/node_modules/cipher-base/package.json +++ /dev/null @@ -1,60 +0,0 @@ -{ - "name": "cipher-base", - "version": "1.0.3", - "description": "abstract base class for crypto-streams", - "main": "index.js", - "scripts": { - "test": "node test.js | tspec" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/crypto-browserify/cipher-base.git" - }, - "keywords": [ - "cipher", - "stream" - ], - "author": { - "name": "Calvin Metcalf", - "email": "calvin.metcalf@gmail.com" - }, - "license": "MIT", - "bugs": { - "url": "https://github.com/crypto-browserify/cipher-base/issues" - }, - "homepage": "https://github.com/crypto-browserify/cipher-base#readme", - "dependencies": { - "inherits": "^2.0.1" - }, - "devDependencies": { - "tap-spec": "^4.1.0", - "tape": "^4.2.0" - }, - "gitHead": "de2af9758ce75ef5f9a9bdaf0ba5312609a7e59a", - "_id": "cipher-base@1.0.3", - "_shasum": "eeabf194419ce900da3018c207d212f2a6df0a07", - "_from": "cipher-base@>=1.0.0 <2.0.0", - "_npmVersion": "3.8.6", - "_nodeVersion": "5.12.0", - "_npmUser": { - "name": "cwmma", - "email": "calvin.metcalf@gmail.com" - }, - "dist": { - "shasum": "eeabf194419ce900da3018c207d212f2a6df0a07", - "tarball": "https://registry.npmjs.org/cipher-base/-/cipher-base-1.0.3.tgz" - }, - "maintainers": [ - { - "name": "cwmma", - "email": "calvin.metcalf@gmail.com" - } - ], - "_npmOperationalInternal": { - "host": "packages-16-east.internal.npmjs.com", - "tmp": "tmp/cipher-base-1.0.3.tgz_1473767078206_0.1380389309488237" - }, - "directories": {}, - "_resolved": "https://registry.npmjs.org/cipher-base/-/cipher-base-1.0.3.tgz", - "readme": "ERROR: No README data found!" -} diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/node_modules/parse-asn1/node_modules/browserify-aes/node_modules/cipher-base/readme.md b/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/node_modules/parse-asn1/node_modules/browserify-aes/node_modules/cipher-base/readme.md deleted file mode 100644 index db9a7814..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/node_modules/parse-asn1/node_modules/browserify-aes/node_modules/cipher-base/readme.md +++ /dev/null @@ -1,17 +0,0 @@ -cipher-base -=== - -[![Build Status](https://travis-ci.org/crypto-browserify/cipher-base.svg)](https://travis-ci.org/crypto-browserify/cipher-base) - -Abstract base class to inherit from if you want to create streams implementing -the same api as node crypto streams. - -Requires you to implement 2 methods `_final` and `_update`. `_update` takes a -buffer and should return a buffer, `_final` takes no arguments and should return -a buffer. - - -The constructor takes one argument and that is a string which if present switches -it into hash mode, i.e. the object you get from crypto.createHash or -crypto.createSign, this switches the name of the final method to be the string -you passed instead of `final` and returns `this` from update. diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/node_modules/parse-asn1/node_modules/browserify-aes/node_modules/cipher-base/test.js b/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/node_modules/parse-asn1/node_modules/browserify-aes/node_modules/cipher-base/test.js deleted file mode 100644 index 57d144a5..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/node_modules/parse-asn1/node_modules/browserify-aes/node_modules/cipher-base/test.js +++ /dev/null @@ -1,108 +0,0 @@ -var test = require('tape') -var CipherBase = require('./') -var inherits = require('inherits') - -test('basic version', function (t) { - inherits(Cipher, CipherBase) - function Cipher () { - CipherBase.call(this) - } - Cipher.prototype._update = function (input) { - t.ok(Buffer.isBuffer(input)) - return input - } - Cipher.prototype._final = function () { - // noop - } - var cipher = new Cipher() - var utf8 = 'abc123abcd' - var update = cipher.update(utf8, 'utf8', 'base64') + cipher.final('base64') - var string = (new Buffer(update, 'base64')).toString() - t.equals(utf8, string) - t.end() -}) -test('hash mode', function (t) { - inherits(Cipher, CipherBase) - function Cipher () { - CipherBase.call(this, 'finalName') - this._cache = [] - } - Cipher.prototype._update = function (input) { - t.ok(Buffer.isBuffer(input)) - this._cache.push(input) - } - Cipher.prototype._final = function () { - return Buffer.concat(this._cache) - } - var cipher = new Cipher() - var utf8 = 'abc123abcd' - var update = cipher.update(utf8, 'utf8').finalName('base64') - var string = (new Buffer(update, 'base64')).toString() - - t.equals(utf8, string) - t.end() -}) -test('hash mode as stream', function (t) { - inherits(Cipher, CipherBase) - function Cipher () { - CipherBase.call(this, 'finalName') - this._cache = [] - } - Cipher.prototype._update = function (input) { - t.ok(Buffer.isBuffer(input)) - this._cache.push(input) - } - Cipher.prototype._final = function () { - return Buffer.concat(this._cache) - } - var cipher = new Cipher() - cipher.on('error', function (e) { - t.notOk(e) - }) - var utf8 = 'abc123abcd' - cipher.end(utf8, 'utf8') - var update = cipher.read().toString('base64') - var string = (new Buffer(update, 'base64')).toString() - - t.equals(utf8, string) - t.end() -}) -test('encodings', function (t) { - inherits(Cipher, CipherBase) - function Cipher () { - CipherBase.call(this) - } - Cipher.prototype._update = function (input) { - return input - } - Cipher.prototype._final = function () { - // noop - } - t.test('mix and match encoding', function (t) { - t.plan(2) - - var cipher = new Cipher() - cipher.update('foo', 'utf8', 'utf8') - t.throws(function () { - cipher.update('foo', 'utf8', 'base64') - }) - cipher = new Cipher() - cipher.update('foo', 'utf8', 'base64') - t.doesNotThrow(function () { - cipher.update('foo', 'utf8') - cipher.final('base64') - }) - }) - t.test('handle long uft8 plaintexts', function (t) { - t.plan(1) - var txt = 'ふっかつ あきる すぶり はやい つける まゆげ たんさん みんぞく ねほりはほり せまい たいまつばな ひはん' - - var cipher = new Cipher() - var decipher = new Cipher() - var enc = decipher.update(cipher.update(txt, 'utf8', 'base64'), 'base64', 'utf8') - enc += decipher.update(cipher.final('base64'), 'base64', 'utf8') - enc += decipher.final('utf8') - - t.equals(txt, enc) - }) -}) diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/node_modules/parse-asn1/node_modules/browserify-aes/package.json b/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/node_modules/parse-asn1/node_modules/browserify-aes/package.json deleted file mode 100644 index 37ae8bce..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/node_modules/parse-asn1/node_modules/browserify-aes/package.json +++ /dev/null @@ -1,78 +0,0 @@ -{ - "name": "browserify-aes", - "version": "1.0.6", - "description": "aes, for browserify", - "browser": "browser.js", - "main": "index.js", - "directories": { - "test": "test" - }, - "scripts": { - "test": "standard && node test/index.js|tspec" - }, - "repository": { - "type": "git", - "url": "git://github.com/crypto-browserify/browserify-aes.git" - }, - "keywords": [ - "aes", - "crypto", - "browserify" - ], - "author": "", - "license": "MIT", - "bugs": { - "url": "https://github.com/crypto-browserify/browserify-aes/issues" - }, - "homepage": "https://github.com/crypto-browserify/browserify-aes", - "dependencies": { - "buffer-xor": "^1.0.2", - "cipher-base": "^1.0.0", - "create-hash": "^1.1.0", - "evp_bytestokey": "^1.0.0", - "inherits": "^2.0.1" - }, - "devDependencies": { - "standard": "^3.7.3", - "tap-spec": "^1.0.0", - "tape": "^3.0.0" - }, - "gitHead": "51f8b9055371c045af448fa07bacaae3df6c8e51", - "_id": "browserify-aes@1.0.6", - "_shasum": "5e7725dbdef1fd5930d4ebab48567ce451c48a0a", - "_from": "browserify-aes@>=1.0.0 <2.0.0", - "_npmVersion": "3.3.12", - "_nodeVersion": "5.4.0", - "_npmUser": { - "name": "cwmma", - "email": "calvin.metcalf@gmail.com" - }, - "dist": { - "shasum": "5e7725dbdef1fd5930d4ebab48567ce451c48a0a", - "tarball": "https://registry.npmjs.org/browserify-aes/-/browserify-aes-1.0.6.tgz" - }, - "maintainers": [ - { - "name": "cwmma", - "email": "calvin.metcalf@gmail.com" - }, - { - "name": "dcousens", - "email": "email@dcousens.com" - }, - { - "name": "dominictarr", - "email": "dominic.tarr@gmail.com" - }, - { - "name": "jprichardson", - "email": "jprichardson@gmail.com" - }, - { - "name": "indutny", - "email": "fedor@indutny.com" - } - ], - "_resolved": "https://registry.npmjs.org/browserify-aes/-/browserify-aes-1.0.6.tgz", - "readme": "ERROR: No README data found!" -} diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/node_modules/parse-asn1/node_modules/browserify-aes/populateFixtures.js b/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/node_modules/parse-asn1/node_modules/browserify-aes/populateFixtures.js deleted file mode 100644 index ac31eb33..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/node_modules/parse-asn1/node_modules/browserify-aes/populateFixtures.js +++ /dev/null @@ -1,25 +0,0 @@ -var modes = require('./modes') -var fixtures = require('./test/fixtures.json') -var crypto = require('crypto') -var types = ['aes-128-cfb1', 'aes-192-cfb1', 'aes-256-cfb1'] -var ebtk = require('./EVP_BytesToKey') -var fs = require('fs') - -fixtures.forEach(function (fixture) { - types.forEach(function (cipher) { - var suite = crypto.createCipher(cipher, new Buffer(fixture.password)) - var buf = new Buffer('') - buf = Buffer.concat([buf, suite.update(new Buffer(fixture.text))]) - buf = Buffer.concat([buf, suite.final()]) - fixture.results.ciphers[cipher] = buf.toString('hex') - if (modes[cipher].mode === 'ECB') { - return - } - var suite2 = crypto.createCipheriv(cipher, ebtk(crypto, fixture.password, modes[cipher].key).key, new Buffer(fixture.iv, 'hex')) - var buf2 = new Buffer('') - buf2 = Buffer.concat([buf2, suite2.update(new Buffer(fixture.text))]) - buf2 = Buffer.concat([buf2, suite2.final()]) - fixture.results.cipherivs[cipher] = buf2.toString('hex') - }) -}) -fs.writeFileSync('./test/fixturesNew.json', JSON.stringify(fixtures, false, 4)) diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/node_modules/parse-asn1/node_modules/browserify-aes/readme.md b/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/node_modules/parse-asn1/node_modules/browserify-aes/readme.md deleted file mode 100644 index 1d7b0855..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/node_modules/parse-asn1/node_modules/browserify-aes/readme.md +++ /dev/null @@ -1,18 +0,0 @@ -browserify-aes -==== - -[![Build Status](https://travis-ci.org/crypto-browserify/browserify-aes.svg)](https://travis-ci.org/crypto-browserify/browserify-aes) - -Node style aes for use in the browser. Implements: - - - createCipher - - createCipheriv - - createDecipher - - createDecipheriv - - getCiphers - -In node.js, the `crypto` implementation is used, in browsers it falls back to a pure JavaScript implementation. - -Much of this library has been taken from the aes implementation in [triplesec](https://github.com/keybase/triplesec), a partial derivation of [crypto-js](https://code.google.com/p/crypto-js/). - -`EVP_BytesToKey` is a straight up port of the same function from OpenSSL as there is literally no documenation on it beyond it using 'undocumented extensions' for longer keys. diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/node_modules/parse-asn1/node_modules/browserify-aes/streamCipher.js b/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/node_modules/parse-asn1/node_modules/browserify-aes/streamCipher.js deleted file mode 100644 index a55c762d..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/node_modules/parse-asn1/node_modules/browserify-aes/streamCipher.js +++ /dev/null @@ -1,25 +0,0 @@ -var aes = require('./aes') -var Transform = require('cipher-base') -var inherits = require('inherits') - -inherits(StreamCipher, Transform) -module.exports = StreamCipher -function StreamCipher (mode, key, iv, decrypt) { - if (!(this instanceof StreamCipher)) { - return new StreamCipher(mode, key, iv) - } - Transform.call(this) - this._cipher = new aes.AES(key) - this._prev = new Buffer(iv.length) - this._cache = new Buffer('') - this._secCache = new Buffer('') - this._decrypt = decrypt - iv.copy(this._prev) - this._mode = mode -} -StreamCipher.prototype._update = function (chunk) { - return this._mode.encrypt(this, chunk, this._decrypt) -} -StreamCipher.prototype._final = function () { - this._cipher.scrub() -} diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/node_modules/parse-asn1/node_modules/evp_bytestokey/index.js b/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/node_modules/parse-asn1/node_modules/evp_bytestokey/index.js deleted file mode 100644 index 25fbc9c2..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/node_modules/parse-asn1/node_modules/evp_bytestokey/index.js +++ /dev/null @@ -1,68 +0,0 @@ -var md5 = require('create-hash/md5') -module.exports = EVP_BytesToKey -function EVP_BytesToKey (password, salt, keyLen, ivLen) { - if (!Buffer.isBuffer(password)) { - password = new Buffer(password, 'binary') - } - if (salt && !Buffer.isBuffer(salt)) { - salt = new Buffer(salt, 'binary') - } - keyLen = keyLen / 8 - ivLen = ivLen || 0 - var ki = 0 - var ii = 0 - var key = new Buffer(keyLen) - var iv = new Buffer(ivLen) - var addmd = 0 - var md_buf - var i - var bufs = [] - while (true) { - if (addmd++ > 0) { - bufs.push(md_buf) - } - bufs.push(password) - if (salt) { - bufs.push(salt) - } - md_buf = md5(Buffer.concat(bufs)) - bufs = [] - i = 0 - if (keyLen > 0) { - while (true) { - if (keyLen === 0) { - break - } - if (i === md_buf.length) { - break - } - key[ki++] = md_buf[i] - keyLen-- - i++ - } - } - if (ivLen > 0 && i !== md_buf.length) { - while (true) { - if (ivLen === 0) { - break - } - if (i === md_buf.length) { - break - } - iv[ii++] = md_buf[i] - ivLen-- - i++ - } - } - if (keyLen === 0 && ivLen === 0) { - break - } - } - for (i = 0; i < md_buf.length; i++) { - md_buf[i] = 0 - } - return { - key: key, - iv: iv - } -} diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/node_modules/parse-asn1/node_modules/evp_bytestokey/package.json b/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/node_modules/parse-asn1/node_modules/evp_bytestokey/package.json deleted file mode 100644 index 378c7dbb..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/node_modules/parse-asn1/node_modules/evp_bytestokey/package.json +++ /dev/null @@ -1,57 +0,0 @@ -{ - "name": "evp_bytestokey", - "version": "1.0.0", - "description": "he super secure key derivation algorithm from openssl", - "main": "index.js", - "scripts": { - "test": "standard && node test.js | tspec" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/crypto-browserify/EVP_BytesToKey.git" - }, - "keywords": [ - "crypto", - "openssl" - ], - "author": { - "name": "Calvin Metcalf", - "email": "calvin.metcalf@gmail.com" - }, - "license": "MIT", - "bugs": { - "url": "https://github.com/crypto-browserify/EVP_BytesToKey/issues" - }, - "homepage": "https://github.com/crypto-browserify/EVP_BytesToKey", - "dependencies": { - "create-hash": "^1.1.1" - }, - "devDependencies": { - "standard": "^5.3.1", - "tap-spec": "^4.1.0", - "tape": "^4.2.0" - }, - "gitHead": "563bd30d95a7771ff0a18afc82cf92ed18f008d3", - "_id": "evp_bytestokey@1.0.0", - "_shasum": "497b66ad9fef65cd7c08a6180824ba1476b66e53", - "_from": "evp_bytestokey@>=1.0.0 <2.0.0", - "_npmVersion": "2.14.4", - "_nodeVersion": "4.1.1", - "_npmUser": { - "name": "cwmma", - "email": "calvin.metcalf@gmail.com" - }, - "dist": { - "shasum": "497b66ad9fef65cd7c08a6180824ba1476b66e53", - "tarball": "https://registry.npmjs.org/evp_bytestokey/-/evp_bytestokey-1.0.0.tgz" - }, - "maintainers": [ - { - "name": "cwmma", - "email": "calvin.metcalf@gmail.com" - } - ], - "directories": {}, - "_resolved": "https://registry.npmjs.org/evp_bytestokey/-/evp_bytestokey-1.0.0.tgz", - "readme": "ERROR: No README data found!" -} diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/node_modules/parse-asn1/node_modules/evp_bytestokey/readme.md b/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/node_modules/parse-asn1/node_modules/evp_bytestokey/readme.md deleted file mode 100644 index 86234dbf..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/node_modules/parse-asn1/node_modules/evp_bytestokey/readme.md +++ /dev/null @@ -1,13 +0,0 @@ -EVP_BytesToKey -=== - -The super secure [key derivation algorithm from openssl](https://wiki.openssl.org/index.php/Manual:EVP_BytesToKey(3)) (spoiler alert not actually secure, only every use it for compatibility reasons). - -Api: -=== - -```js -var result = EVP_BytesToKey('password', 'salt', keyLen, ivLen); -Buffer.isBuffer(result.password); // true -Buffer.isBuffer(result.iv); // true -``` diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/node_modules/parse-asn1/node_modules/evp_bytestokey/test.js b/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/node_modules/parse-asn1/node_modules/evp_bytestokey/test.js deleted file mode 100644 index a638fa03..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/node_modules/parse-asn1/node_modules/evp_bytestokey/test.js +++ /dev/null @@ -1,19 +0,0 @@ -var test = require('tape') -var evp = require('./') -var crypto = require('crypto') - -function runTest (password) { - test('password: ' + password, function (t) { - t.plan(1) - var keys = evp(password, false, 256, 16) - var nodeCipher = crypto.createCipher('aes-256-ctr', password) - var ourCipher = crypto.createCipheriv('aes-256-ctr', keys.key, keys.iv) - var nodeOut = nodeCipher.update('foooooo') - var ourOut = ourCipher.update('foooooo') - t.equals(nodeOut.toString('hex'), ourOut.toString('hex')) - }) -} -runTest('password') -runTest('ふっかつ あきる すぶり はやい つける まゆげ たんさん みんぞく ねほりはほり せまい たいまつばな ひはん') -runTest('Z͑ͫ̓ͪ̂ͫ̽͏̴̙̤̞͉͚̯̞̠͍A̴̵̜̰͔ͫ͗͢L̠ͨͧͩ͘G̴̻͈͍͔̹̑͗̎̅͛́Ǫ̵̹̻̝̳͂̌̌͘!͖̬̰̙̗̿̋ͥͥ̂ͣ̐́́͜͞') -runTest('💩') diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/node_modules/parse-asn1/package.json b/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/node_modules/parse-asn1/package.json deleted file mode 100644 index 869b4b14..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/node_modules/parse-asn1/package.json +++ /dev/null @@ -1,71 +0,0 @@ -{ - "name": "parse-asn1", - "version": "5.0.0", - "description": "[![TRAVIS](https://secure.travis-ci.org/crypto-browserify/parse-asn1.png)](http://travis-ci.org/crypto-browserify/parse-asn1) [![NPM](http://img.shields.io/npm/v/parse-asn1.svg)](https://www.npmjs.org/package/parse-asn1)", - "main": "index.js", - "scripts": { - "unit": "node ./test", - "standard": "standard", - "test": "npm run standard && npm run unit" - }, - "repository": { - "type": "git", - "url": "git://github.com/crypto-browserify/parse-asn1.git" - }, - "author": "", - "license": "ISC", - "dependencies": { - "asn1.js": "^4.0.0", - "browserify-aes": "^1.0.0", - "create-hash": "^1.1.0", - "evp_bytestokey": "^1.0.0", - "pbkdf2": "^3.0.3" - }, - "devDependencies": { - "tape": "^3.4.0", - "standard": "^5.0.0" - }, - "gitHead": "eb88523b7c6dc896a407b896bba470218fde70b4", - "bugs": { - "url": "https://github.com/crypto-browserify/parse-asn1/issues" - }, - "homepage": "https://github.com/crypto-browserify/parse-asn1#readme", - "_id": "parse-asn1@5.0.0", - "_shasum": "35060f6d5015d37628c770f4e091a0b5a278bc23", - "_from": "parse-asn1@>=5.0.0 <6.0.0", - "_npmVersion": "2.9.0", - "_nodeVersion": "4.2.1", - "_npmUser": { - "name": "cwmma", - "email": "calvin.metcalf@gmail.com" - }, - "dist": { - "shasum": "35060f6d5015d37628c770f4e091a0b5a278bc23", - "tarball": "https://registry.npmjs.org/parse-asn1/-/parse-asn1-5.0.0.tgz" - }, - "maintainers": [ - { - "name": "cwmma", - "email": "calvin.metcalf@gmail.com" - }, - { - "name": "dcousens", - "email": "email@dcousens.com" - }, - { - "name": "dominictarr", - "email": "dominic.tarr@gmail.com" - }, - { - "name": "jprichardson", - "email": "jprichardson@gmail.com" - }, - { - "name": "indutny", - "email": "fedor@indutny.com" - } - ], - "directories": {}, - "_resolved": "https://registry.npmjs.org/parse-asn1/-/parse-asn1-5.0.0.tgz", - "readme": "ERROR: No README data found!" -} diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/node_modules/parse-asn1/test/1024.priv b/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/node_modules/parse-asn1/test/1024.priv deleted file mode 100644 index 72062169..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/node_modules/parse-asn1/test/1024.priv +++ /dev/null @@ -1,16 +0,0 @@ ------BEGIN PRIVATE KEY----- -MIICdwIBADANBgkqhkiG9w0BAQEFAASCAmEwggJdAgEAAoGBAKulUTZ8B1qccZ8c -DXRGSY08gW8KvLlcxxxGC4gZHNT3CBUF8n5R4KE30aZyYZ/rtsQZu05juZJxaJ0q -mbe75dlQ5d+Xc9BMXeQg/MpTZw5TAN7OIdGYYpFBe+1PLZ6wEfjkYrMqMUcfq2Lq -hTLdAbvBJnuRcYZLqmBeOQ8FTrKrAgMBAAECgYEAnkHRbEPU3/WISSQrP36iyCb2 -S/SBZwKkzmvCrBxDWhPeDswp9c/2JY76rNWfLzy8iXgUG8WUzvHje61Qh3gmBcKe -bUaTGl4Vy8Ha1YBADo5RfRrdm0FE4tvgvu/TkqFqpBBZweu54285hk5zlG7n/D7Y -dnNXUpu5MlNb5x3gW0kCQQDUL//cwcXUxY/evaJP4jSe+ZwEQZo+zXRLiPUulBoV -aw28CVMuxdgwqAo1X1IKefPeUaf7RQu8gCKaRnpGuEuXAkEAzxZTfMmvmCUDIew4 -5Gk6bK265XQWdhcgiq254lpBGOYmDj9yCE7yA+zmASQwMsXTdQOi1hOCEyrXuSJ5 -c++EDQJAFh3WrnzoEPByuYXMmET8tSFRWMQ5vpgNqh3haHR5b4gUC2hxaiunCBNL -1RpVY9AoUiDywGcG/SPh93CnKB3niwJBAKP7AtsifZgVXtiizB4aMThTjVYaSZrz -D0Kg9DuHylpkDChmFu77TGrNUQgAVuYtfhb/bRblVa/F0hJ4eQHT3JUCQBVT68tb -OgRUk0aP9tC3021VN82X6+klowSQN8oBPX8+TfDWSUilp/+j24Hky+Z29Do7yR/R -qutnL92CvBlVLV4= ------END PRIVATE KEY----- diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/node_modules/parse-asn1/test/1024.pub b/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/node_modules/parse-asn1/test/1024.pub deleted file mode 100644 index 2dba785d..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/node_modules/parse-asn1/test/1024.pub +++ /dev/null @@ -1,6 +0,0 @@ ------BEGIN PUBLIC KEY----- -MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCrpVE2fAdanHGfHA10RkmNPIFv -Cry5XMccRguIGRzU9wgVBfJ+UeChN9GmcmGf67bEGbtOY7mScWidKpm3u+XZUOXf -l3PQTF3kIPzKU2cOUwDeziHRmGKRQXvtTy2esBH45GKzKjFHH6ti6oUy3QG7wSZ7 -kXGGS6pgXjkPBU6yqwIDAQAB ------END PUBLIC KEY----- diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/node_modules/parse-asn1/test/dsa.1024.priv b/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/node_modules/parse-asn1/test/dsa.1024.priv deleted file mode 100644 index 1145b7d7..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/node_modules/parse-asn1/test/dsa.1024.priv +++ /dev/null @@ -1,18 +0,0 @@ ------BEGIN DSA PARAMETERS----- -MIIBHgKBgQDdFg3WQmpOZxObxraIe4rrbUhrBw99fbnz99IvLj60sM/7Uk7eHYvp -UrPaJBIcjPy68BjV4ekDljuPpFoAorsLzyvVSHuNvN6I/bRGm1TCOjDFVe98Oz6k -XmI6pRfIF0TiIPXkel/sWIfBYa1lqdoW82h9FIjhbxVHrKGfvMEc9wIVAOzmJHec -s6yBm+nE3+OmpWFYj0ylAoGAYxO6mFSoIY7PDRyRzKJEnULSzYXd3FoMkPwDCd5I -ch/piIoAUIIQ542TL54GT9wuiCL+0D48qi9GWKasPZABfPQ008WOzmKzD8ncrUTd -a7pzvUvdmwldA4Aa5/5xSXwtpK+DDye7KPlu+oi1BF6uj4TgfeGr1uxouxC2WhBE -qH0= ------END DSA PARAMETERS----- ------BEGIN PRIVATE KEY----- -MIIBSwIBADCCASwGByqGSM44BAEwggEfAoGBAOY0KsTt5EpJ4LtlD3xRS5mDiGE1 -CMNp0S9X0sK8kP8Aps8iYwMLbZYglk18GCNnCk4SjbAnZHSB3kaIv6AKQc2J8W2Y -V5se3VhpKOFst7bqRtkGsl8uJtGlKTiXNclkv2jsKOrsBokSD1USGCECTNeMt3Og -ziRcZ1dS+djSOZ2nAhUAzB96SpxlAak+K/QLVJ+lDe5DcY0CgYEAtxX1/Hckvhlh -HQyKZWLQsDfZBILbhc+OLDpOyT6cJS/sJzfFIYZgK5M3rOS4OmzdYfJccQAuGq+T -VJQ3VcYOdbrIANJV8CDrn4jkkejTzJI6fCwAkPWOyxw8kbV1Hsoy6WLfSCHKpBUc -rogAqRGESqBVTawjyF/ECX667y/P49MEFgIUSeRVRgAXsLmeWR/V4Rh9Hex+9+s= ------END PRIVATE KEY----- diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/node_modules/parse-asn1/test/dsa.1024.pub b/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/node_modules/parse-asn1/test/dsa.1024.pub deleted file mode 100644 index 80a731ea..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/node_modules/parse-asn1/test/dsa.1024.pub +++ /dev/null @@ -1,12 +0,0 @@ ------BEGIN PUBLIC KEY----- -MIIBtzCCASwGByqGSM44BAEwggEfAoGBAOY0KsTt5EpJ4LtlD3xRS5mDiGE1CMNp -0S9X0sK8kP8Aps8iYwMLbZYglk18GCNnCk4SjbAnZHSB3kaIv6AKQc2J8W2YV5se -3VhpKOFst7bqRtkGsl8uJtGlKTiXNclkv2jsKOrsBokSD1USGCECTNeMt3OgziRc -Z1dS+djSOZ2nAhUAzB96SpxlAak+K/QLVJ+lDe5DcY0CgYEAtxX1/HckvhlhHQyK -ZWLQsDfZBILbhc+OLDpOyT6cJS/sJzfFIYZgK5M3rOS4OmzdYfJccQAuGq+TVJQ3 -VcYOdbrIANJV8CDrn4jkkejTzJI6fCwAkPWOyxw8kbV1Hsoy6WLfSCHKpBUcrogA -qRGESqBVTawjyF/ECX667y/P49MDgYQAAoGAXYmxO4+52C1gBzh7GgTwNLJl7bLn -gOhKTFlKhT36VjMjeFfdXmBVBVbfUottKZby/gVX1IXT38PStB/dswbF45bGDdoS -zMFjYmHTtLtrU/4hReVtvb5MYmrPDFX58SwcSRRO/cH6WJPvfu4Aq0cJZA9Kb0B9 -5Wo18JxAqvPtTB8= ------END PUBLIC KEY----- diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/node_modules/parse-asn1/test/dsa.2048.priv b/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/node_modules/parse-asn1/test/dsa.2048.priv deleted file mode 100644 index 2a77c2ee..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/node_modules/parse-asn1/test/dsa.2048.priv +++ /dev/null @@ -1,20 +0,0 @@ ------BEGIN DSA PRIVATE KEY----- -MIIDVQIBAAKCAQEA0jDs9lLWX//NXYE1kNKw4UiDVMHHEtTF1OzJvBJvUh3/xMlU -ic8mUpIMU5mt7BTjcijyLLl/TeNBcI/xDvWH3PAfCjP1CmNzOMHwU6wKA4Q20m5v -zjauVycd7loRm5h+1XyD2JL1KmQTzhIIRAmRTeXMnr8LAHidYfUKmzCOCCrnctlE -EOh1S6e7BFxQBRrlUxZF0LTjcAz31rrjIH6wKkYR4mnpGuI2vVJ+qHGmEhvq1hAb -DvP0GN0iofxHlIVqOlfXYCZO388ZabfcBOQG57tTofm8aS4pnXCgbok9wEYPgbU5 -n6fEvDGOOObQyY109hZZaDJmfygr5mmD0TIXrQIhAMVBhV4liqAN2MrT/+ZUH6hY -+DhTazzSNLIZKQ5gfd+1AoIBADqHGUVQa9pbwyjbzooeWdijUM9W5P7UUj1OjrA0 -HIkcx37qHiYOVFqHpbjDs3tbgRBxBX5zBpwuhywC/6OetDiqzDy7zZCV/YMn06d2 -ncW2Ctjp3KPl7of39+HgXXePgTdKcfkjH9upJQTko88rA4NWwZbHYeA3Lv7DcA11 -XY3+TQHcxMtxf/E6aePjANJBsJsQjYLy3WyUiS87jkgi0Bigjg/cD3Nel4LToCTR -JvQ4m3w3T4W0xL1+8nPjRZ2q0GgmxZzPfwALrwiSYMgGZC/ov43wqOs6WXs0NnpJ -moU4oxutC/uDvTZmJvRj77FINjK0ZA20jmNvWmTIeEm1Xn4CggEABeRpOymQS5IS -X+u9ya7C+P3MPIRGm4dcWPWgPpD1QcclNYLGnhRp7JazNsbbPMjnx1qtF+2qjfy9 -JDeWTAR8qfCNVmQHPAhJsJtV0C/V4PUii71FRNPVC3EAYbcBk8deMGoUg99cxSac -6MCxIIOxuUKWpw8XPlMVpuXc8+lIMTYCPeLGinmT4DQ573t0MS6U3Ck/987xjkH9 -sos7zcYn3vnjywDCxXMidC0eUK1rxAAuY7PL4vQiKwXq8kFtWiKAnns/Zm5LTjiZ -NrwlhNlU2wQVvyIcKaGfSRPheb69IbP+9qp5b7Xe7DNWdo48S0jl2KAFeZ91BnhM -TH6WPtMpjQIgOaTTn6xYK0kZvvH3lZXrzkjp4aNlNY65R0JAKKNsx3s= ------END DSA PRIVATE KEY----- diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/node_modules/parse-asn1/test/dsa.2048.pub b/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/node_modules/parse-asn1/test/dsa.2048.pub deleted file mode 100644 index 9f6cac1c..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/node_modules/parse-asn1/test/dsa.2048.pub +++ /dev/null @@ -1,20 +0,0 @@ ------BEGIN PUBLIC KEY----- -MIIDRjCCAjkGByqGSM44BAEwggIsAoIBAQDSMOz2UtZf/81dgTWQ0rDhSINUwccS -1MXU7Mm8Em9SHf/EyVSJzyZSkgxTma3sFONyKPIsuX9N40Fwj/EO9Yfc8B8KM/UK -Y3M4wfBTrAoDhDbSbm/ONq5XJx3uWhGbmH7VfIPYkvUqZBPOEghECZFN5cyevwsA -eJ1h9QqbMI4IKudy2UQQ6HVLp7sEXFAFGuVTFkXQtONwDPfWuuMgfrAqRhHiaeka -4ja9Un6ocaYSG+rWEBsO8/QY3SKh/EeUhWo6V9dgJk7fzxlpt9wE5Abnu1Oh+bxp -LimdcKBuiT3ARg+BtTmfp8S8MY445tDJjXT2FlloMmZ/KCvmaYPRMhetAiEAxUGF -XiWKoA3YytP/5lQfqFj4OFNrPNI0shkpDmB937UCggEAOocZRVBr2lvDKNvOih5Z -2KNQz1bk/tRSPU6OsDQciRzHfuoeJg5UWoeluMOze1uBEHEFfnMGnC6HLAL/o560 -OKrMPLvNkJX9gyfTp3adxbYK2Onco+Xuh/f34eBdd4+BN0px+SMf26klBOSjzysD -g1bBlsdh4Dcu/sNwDXVdjf5NAdzEy3F/8Tpp4+MA0kGwmxCNgvLdbJSJLzuOSCLQ -GKCOD9wPc16XgtOgJNEm9DibfDdPhbTEvX7yc+NFnarQaCbFnM9/AAuvCJJgyAZk -L+i/jfCo6zpZezQ2ekmahTijG60L+4O9NmYm9GPvsUg2MrRkDbSOY29aZMh4SbVe -fgOCAQUAAoIBAAXkaTspkEuSEl/rvcmuwvj9zDyERpuHXFj1oD6Q9UHHJTWCxp4U -aeyWszbG2zzI58darRftqo38vSQ3lkwEfKnwjVZkBzwISbCbVdAv1eD1Iou9RUTT -1QtxAGG3AZPHXjBqFIPfXMUmnOjAsSCDsblClqcPFz5TFabl3PPpSDE2Aj3ixop5 -k+A0Oe97dDEulNwpP/fO8Y5B/bKLO83GJ97548sAwsVzInQtHlCta8QALmOzy+L0 -IisF6vJBbVoigJ57P2ZuS044mTa8JYTZVNsEFb8iHCmhn0kT4Xm+vSGz/vaqeW+1 -3uwzVnaOPEtI5digBXmfdQZ4TEx+lj7TKY0= ------END PUBLIC KEY----- diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/node_modules/parse-asn1/test/ec.pass.priv b/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/node_modules/parse-asn1/test/ec.pass.priv deleted file mode 100644 index bf1836d5..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/node_modules/parse-asn1/test/ec.pass.priv +++ /dev/null @@ -1,7 +0,0 @@ ------BEGIN ENCRYPTED PRIVATE KEY----- -MIHeMEkGCSqGSIb3DQEFDTA8MBsGCSqGSIb3DQEFDDAOBAi9LqZQx4JFXAICCAAw -HQYJYIZIAWUDBAECBBA+js1fG4Rv/yRN7oZvxbgyBIGQ/D4yj86M1x8lMsnAHQ/K -7/ryb/baDNHqN9LTZanEGBuyxgrTzt08SiL+h91yFGMoaly029K1VgEI8Lxu5Np/ -A+LK7ewh73ABzsbuxYdcXI+rKnrvLN9Tt6veDs4GlqTTsWwq5wF0C+6gaYRBXA74 -T1b6NykGh2UNL5U5pHZEYdOVLz+lRJL7gYqlweNHP/S3 ------END ENCRYPTED PRIVATE KEY----- diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/node_modules/parse-asn1/test/ec.priv b/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/node_modules/parse-asn1/test/ec.priv deleted file mode 100644 index 25fffbd8..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/node_modules/parse-asn1/test/ec.priv +++ /dev/null @@ -1,5 +0,0 @@ ------BEGIN EC PRIVATE KEY----- -MHQCAQEEIDF6Xv8Sv//wGUWD+c780ppGrU0QdZWCAzxAQPQX8r/uoAcGBSuBBAAK -oUQDQgAEIZeowDylls4K/wfBjO18bYo7gGx8nYQRija4e/qEMikOHJai7geeUreU -r5Xky/Ax7s2dGtegsPNsPgGe5MpQvg== ------END EC PRIVATE KEY----- diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/node_modules/parse-asn1/test/ec.pub b/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/node_modules/parse-asn1/test/ec.pub deleted file mode 100644 index 2e39e5bb..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/node_modules/parse-asn1/test/ec.pub +++ /dev/null @@ -1,4 +0,0 @@ ------BEGIN PUBLIC KEY----- -MFYwEAYHKoZIzj0CAQYFK4EEAAoDQgAEIZeowDylls4K/wfBjO18bYo7gGx8nYQR -ija4e/qEMikOHJai7geeUreUr5Xky/Ax7s2dGtegsPNsPgGe5MpQvg== ------END PUBLIC KEY----- diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/node_modules/parse-asn1/test/index.js b/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/node_modules/parse-asn1/test/index.js deleted file mode 100644 index 4d160302..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/node_modules/parse-asn1/test/index.js +++ /dev/null @@ -1,92 +0,0 @@ -var test = require('tape') -var fs = require('fs') -var parseKey = require('../') -var crypto = require('crypto') -var rsa1024 = { - private: fs.readFileSync(__dirname + '/rsa.1024.priv'), - public: fs.readFileSync(__dirname + '/rsa.1024.pub') -} -var rsa2028 = { - private: fs.readFileSync(__dirname + '/rsa.2028.priv'), - public: fs.readFileSync(__dirname + '/rsa.2028.pub') -} -var nonrsa1024 = { - private: fs.readFileSync(__dirname + '/1024.priv'), - public: fs.readFileSync(__dirname + '/1024.pub') -} -var pass1024 = { - private: { - passphrase: 'fooo', - key: fs.readFileSync(__dirname + '/pass.1024.priv') - }, - public: fs.readFileSync(__dirname + '/pass.1024.pub') -} -var ec = { - private: fs.readFileSync(__dirname + '/ec.priv'), - public: fs.readFileSync(__dirname + '/ec.pub') -} -var ecpass = { - private: { - key: fs.readFileSync(__dirname + '/ec.pass.priv'), - passphrase: 'bard' - }, - public: fs.readFileSync(__dirname + '/ec.pub') -} -var dsa = { - private: fs.readFileSync(__dirname + '/dsa.1024.priv'), - public: fs.readFileSync(__dirname + '/dsa.1024.pub') -} -var dsa2 = { - private: fs.readFileSync(__dirname + '/dsa.2048.priv'), - public: fs.readFileSync(__dirname + '/dsa.2048.pub') -} -var dsapass = { - private: { - key: fs.readFileSync(__dirname + '/pass.dsa.1024.priv'), - passphrase: 'password' - }, - public: fs.readFileSync(__dirname + '/pass.dsa.1024.pub') -} -var dsapass2 = { - private: { - key: fs.readFileSync(__dirname + '/pass2.dsa.1024.priv'), - passphrase: 'password' - }, - public: fs.readFileSync(__dirname + '/pass2.dsa.1024.pub') -} -var rsapass = { - private: { - key: fs.readFileSync(__dirname + '/pass.rsa.1024.priv'), - passphrase: 'password' - }, - public: fs.readFileSync(__dirname + '/pass.rsa.1024.pub') -} -var rsapass2 = { - private: { - key: fs.readFileSync(__dirname + '/pass.rsa.2028.priv'), - passphrase: 'password' - }, - public: fs.readFileSync(__dirname + '/pass.rsa.2028.pub') -} -var i = 0 -function testIt (keys) { - test('key ' + (++i), function (t) { - t.plan(2) - t.ok(parseKey(keys.public, crypto), 'public key') - t.ok(parseKey(keys.private, crypto), 'private key') - }) -} - -testIt(dsa) -testIt(dsa2) -testIt(rsa1024) -testIt(ec) -testIt(rsa2028) -testIt(nonrsa1024) -testIt(ecpass) -testIt(dsapass) -testIt(dsapass2) -testIt(rsapass) -testIt(rsapass2) -testIt(pass1024) -testIt(pass1024) diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/node_modules/parse-asn1/test/pass.1024.priv b/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/node_modules/parse-asn1/test/pass.1024.priv deleted file mode 100644 index b9f38845..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/node_modules/parse-asn1/test/pass.1024.priv +++ /dev/null @@ -1,18 +0,0 @@ ------BEGIN ENCRYPTED PRIVATE KEY----- -MIICzzBJBgkqhkiG9w0BBQ0wPDAbBgkqhkiG9w0BBQwwDgQIji3ZZ6JbsA4CAggA -MB0GCWCGSAFlAwQBFgQQC6MKblq8zyX90/KmgotsMQSCAoDghNf+yxPC/KRh7F3O -k0lMgtDkV+wCLDv7aBvUqy8Ry2zqFPIlfLb8XtSW943XEu6KUI13IZPEr8p9h1ve -Iye6L0g6uAgbFxBE2DwBBSI7mYr7lokr4v0k+inMKf4JeRdI9XWgwOILKTGf1vH7 -PhvBnqLhOg6BIOuF426qpiyYlmRda74d0Th4o6ZyhyMSzPI1XbWSg719Ew3N/tLe -OHdYl0eFrgNjq+xO4Ev+W7eNIh/XBMQtk9wo+mxeNdldRnX822HxTsL8fSSPs+9T -W5M/2EBTJMSsswSjZyFkq8ehtxovI2u0IBX1IiPulyUZLnSNPDV1eUVClK6rk+q1 -kVsfJhUr2qvIjNlQWlbEXQj4VwGtgl0++l8vdpj59MuN2J3Nx5TNMLjA6BYAa/tr -Bu928QoT7ET+SGx5XKCwKb5fwXmDlV5zZC4kZWTaF/d/Icvj5F+fDZuYFg1JOXNZ -+q2oA1qMYaHGX6lF3pbO84ebg1iwQTDM8iIqFeSMGUJTnk/3a7sqfaWQbEQwGb+X -fXnSTwkF+wO2rriPbFvWyzecWu67zDCP0ZWUgGb86sSJCM7xRGShESwCjOrb88F1 -5SZjyIqogrkc3IWiLH9gc5U8d86qoFjJnP6BfwYks1UIyXNGKfZTCqICpMphV+IS -b0N2jprjLTkWR6nxYGSH1bkKMs7x1M0FBLWWLAZqPn9X3pe6JwIBds04O6XjF0un -oxwDjcJdoxVs7PgRiM5d1Tubqu2zmpCCmXNiqi9B0+rV9/jHg9IA5gUfvYdCcEv+ -oAr90I+2+PuBFa9lgdbDV6DtZk4bSYluqamxVeLPg/vrewYfVfDv6jftfY1D0DEy -69H0 ------END ENCRYPTED PRIVATE KEY----- diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/node_modules/parse-asn1/test/pass.1024.pub b/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/node_modules/parse-asn1/test/pass.1024.pub deleted file mode 100644 index 617e7fb1..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/node_modules/parse-asn1/test/pass.1024.pub +++ /dev/null @@ -1,6 +0,0 @@ ------BEGIN PUBLIC KEY----- -MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDSK/7i5BV0x+gmX16Wrm7kRkCZ -y1QUt6wiM2g+SAZTYR0381VnSMX2cv7CpN3499lZj1rL5S7YTaZZwX3RvU5fz56/ -eDX6ciL/PZsbclN2KdkMWYgmcb9J1zUeoMQ3cjfFUCdQZ/ZvDWa+wY2Zg8os2Bow -AoufHtYHm3eOly/cWwIDAQAB ------END PUBLIC KEY----- diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/node_modules/parse-asn1/test/pass.dsa.1024.priv b/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/node_modules/parse-asn1/test/pass.dsa.1024.priv deleted file mode 100644 index aab5fc2f..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/node_modules/parse-asn1/test/pass.dsa.1024.priv +++ /dev/null @@ -1,11 +0,0 @@ ------BEGIN ENCRYPTED PRIVATE KEY----- -MIIBnzBJBgkqhkiG9w0BBQ0wPDAbBgkqhkiG9w0BBQwwDgQI1z4IJORFws4CAggA -MB0GCWCGSAFlAwQBAgQQq7f0CuKCTITfPS5Xax1H4wSCAVDFyIjYVXfBNe+BARqz -Tfo09y4vKkErOb7Sz4bQkAjRLjOXiUjM4eTNtivml8NqVrQTKAghN+ggxj416OD4 -oq6Ns7Ncbd4Xm5Ni8wrrWbJxVog6rAa/ioU0sfgRExYy/xE2Q9KkW+VE7SUwanwY -e81Od9qNM5KhZGM1yUSKa0JA6Xqb8dAqBo9rVt8DceumB9OP83xV3fLEimSZfR6p -slA1P/dTvKxwhpguQe4Z3OkzTzGCxyboqeRW1woNHKbxjzzSHcaki9SHQm3xpUW8 -hRAJd6OtDnLbkE9MnC+UcI3mjru1xfnR5MU7qG7e9nvOhEDVaDkiK3DbrSf0B0Bi -p1hyX1XsSXDewSEd/mlfMLdD8WecgUtl9ea7JzxY3/6R78yB951I5TmY45mp/v+N -tbxEv29B65UKf0ac7gVw4LNy8JF2ef/L/meEmBoIAE71f+8= ------END ENCRYPTED PRIVATE KEY----- diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/node_modules/parse-asn1/test/pass.dsa.1024.pub b/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/node_modules/parse-asn1/test/pass.dsa.1024.pub deleted file mode 100644 index 80a731ea..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/node_modules/parse-asn1/test/pass.dsa.1024.pub +++ /dev/null @@ -1,12 +0,0 @@ ------BEGIN PUBLIC KEY----- -MIIBtzCCASwGByqGSM44BAEwggEfAoGBAOY0KsTt5EpJ4LtlD3xRS5mDiGE1CMNp -0S9X0sK8kP8Aps8iYwMLbZYglk18GCNnCk4SjbAnZHSB3kaIv6AKQc2J8W2YV5se -3VhpKOFst7bqRtkGsl8uJtGlKTiXNclkv2jsKOrsBokSD1USGCECTNeMt3OgziRc -Z1dS+djSOZ2nAhUAzB96SpxlAak+K/QLVJ+lDe5DcY0CgYEAtxX1/HckvhlhHQyK -ZWLQsDfZBILbhc+OLDpOyT6cJS/sJzfFIYZgK5M3rOS4OmzdYfJccQAuGq+TVJQ3 -VcYOdbrIANJV8CDrn4jkkejTzJI6fCwAkPWOyxw8kbV1Hsoy6WLfSCHKpBUcrogA -qRGESqBVTawjyF/ECX667y/P49MDgYQAAoGAXYmxO4+52C1gBzh7GgTwNLJl7bLn -gOhKTFlKhT36VjMjeFfdXmBVBVbfUottKZby/gVX1IXT38PStB/dswbF45bGDdoS -zMFjYmHTtLtrU/4hReVtvb5MYmrPDFX58SwcSRRO/cH6WJPvfu4Aq0cJZA9Kb0B9 -5Wo18JxAqvPtTB8= ------END PUBLIC KEY----- diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/node_modules/parse-asn1/test/pass.rsa.1024.priv b/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/node_modules/parse-asn1/test/pass.rsa.1024.priv deleted file mode 100644 index b67bd804..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/node_modules/parse-asn1/test/pass.rsa.1024.priv +++ /dev/null @@ -1,18 +0,0 @@ ------BEGIN RSA PRIVATE KEY----- -Proc-Type: 4,ENCRYPTED -DEK-Info: AES-192-CBC,04D2D7882E0C474E07E542FE997D2A49 - -vfB5Gtm34n3SeI6JELjWiGw6O+j+tGR6Wbi3SNeAZkfSA8PTjei6PVHr+dGK5zMd -nTckd0EpxItqxEdtLK6GtBIa9KRd3cEbayHmyyybH2FC4STXJCUFBe2eb7ZKmnCl -RB5FcmAqExif+QOJwHnZw6DTzq+oGSwi9cSoy2qE62FgXkj8uKAYcBLONmsP1YQA -4zIub4bnEbIghL/swEB/HVS86FyMCsMXrHEOnSuUUBf/UfZFNypI6kVUNXlItnN1 -14eeRsBD37VkL7dAQPMx+Dwm7DbU07QWrVvzgmWlu3KqR0tRNA9e4a5f14XOYxgS -HZ+XVZK8iAd+76OnprlFtGDowDXGM0wUXPYq5j8WpKxNsVs2RV+S6U0gQLoSqNxt -We7UPWZufzEdjTUO8q9KhdGqFmJ53XIYClZf0bp148b+Bk3P+dN5TbmKQEfulScn -rTLTRo34fdTIAJr5BJh0OXGNs9rFlMJ9Nz4FwVTEB1DMerXtt9ICdhud9BktRhvq -axgoz+XA3LrBrlPPcrSCZyIYjZFydGSkzg439OyDEZ6+uRmc0qhWA4j6AgXx6gGR -NvvypoFVKvXqEq/2F+SVyyMGrm4xPmsr/HUBeE9SmuTzNzDfVAM/xerqIoR2szR0 -O0hwtOj4fk7//cd1CjFzd0JiF/SqMkHxkdbmIC9qlhshkWlQbvvhbefodYPuGxmj -L1TaPgX36OcrQSodzyWBN5tSmmX1Nmftcz7iwc4AKrqkdnM3sPS3SczsAjMWrjRr -7iYhdPQSZtxVCTjACU3h7scNAg9AU6l4YZrowR//J6U= ------END RSA PRIVATE KEY----- diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/node_modules/parse-asn1/test/pass.rsa.1024.pub b/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/node_modules/parse-asn1/test/pass.rsa.1024.pub deleted file mode 100644 index 3506c331..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/node_modules/parse-asn1/test/pass.rsa.1024.pub +++ /dev/null @@ -1,6 +0,0 @@ ------BEGIN PUBLIC KEY----- -MIGcMA0GCSqGSIb3DQEBAQUAA4GKADCBhgJ/OwswbFo/uyC8ltGf/yA1A+gV5IGd -nAgPbUSI3GzbHCA+x+TLG/tLvbRw3r1smppY/jkkpiVW1ErSMuN0uixp5gb78Z9r -H1XpWb5WWgp3WaY/9EHMjMdOkQ/9LVZvRvl/M/Fi6owP+q+amJI1BEjECYfbhGL3 -rmlVdq4qXc40QwIDAQAB ------END PUBLIC KEY----- diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/node_modules/parse-asn1/test/pass.rsa.2028.priv b/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/node_modules/parse-asn1/test/pass.rsa.2028.priv deleted file mode 100644 index 99e82135..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/node_modules/parse-asn1/test/pass.rsa.2028.priv +++ /dev/null @@ -1,30 +0,0 @@ ------BEGIN RSA PRIVATE KEY----- -Proc-Type: 4,ENCRYPTED -DEK-Info: AES-256-CBC,7A6A055AD675947A657041422F06D439 - -HQdjzAKUuqqKhZHmpzzY/monfqFhiHnZ5c24jtR9fM4aQJXf/e1fz6MEhyIz6XON -sb4CnXZstnxUuVWDkHEu6KWQ/dKALgiDUuT+UdMawVoVPGdgyWZp35pQPWi3fT2V -XZn58YkG8bO3Y403eZPyhadOefD1VtuFuK6/f90jjzx6ZDnwveXpYgFV7Jy1/pFd -cLLMf07C+hbk416nX6UVipWe4GH+ADFom5ZCfAaUotM7n8i149dULNF4YYi2wP31 -1YaDH5vf1CqiaieDY7xLzpEixwJz6ZEg3gLXaUvz2MpF8owiGI3eP0g7voWp3xt4 -TQx/qDURlaXiaRriWdWtpKyW1MFuJ5+KdNtR1/kXr2BLPB/ZLwyqtynUy8ZYpb4+ -WIRYpUGeb//ZHGhlCH7CRMdABsal4wTwnzi9fW4Ax96ecJ2SlwCuKxwS7iEq2y1/ -FAfGwsE+XufHhme5p6XjKfiHx+zJMIB2NMkrm+wm4PbMTrGVnw5/41/r6XxOB8fe -iKi12Jth4dusc1vYGYfzKop9uEM6CZ6+Chqzb+Zyh/xUiZVlCX/BYnxr7yXUm9aR -PHQgxkn2Act8FgQB3Kgs3jCiCRIJrlsnybeWzQ3YO9TjC4MxygmmwODDBpsOKnEi -kXXS54+cZFjcsva4uJVwhAywRPVUkLzmTkH0tGiwCHjeQNECm+TLahkkEIXrVTb9 -c9creNXMgE6jVVz+R43HXsGvTcgMcBLyFRQJe2nVaj/dQ5JbF4uqNnQzRjAbD34K -uTpFaJ/kmlgcmeScRLnwaoYwFlmhSC+bK0dfY1Jr6AQRA6IDP7nIjqWNDCHNBB8r -Qj1v2KWoVQe3xNHaXhkbJPbA2DKlUIqffkBVtMKtt9KuG3Rccf3bVYAW6oid73/D -z7DMAF5G/OpVR8VbGh1WxXuR7zEVDUwpwsp9ek5dqN8BnBz1ppdZNIKqzszneckU -s2l/6mZBmgV1Nfy/cQU6U5s3S1Xc75UDQVLms3CIOpFTRIpecNTdfa31fYy/svy0 -M2lWTbCva0dOyuvMUhTgBL4I7Qa2dUMPXHMZatV5ooHYq/BZJA1r84C5cM5r+umE -2LLv/BlUr7RaQHhaKGn4Qhpzo5yRDE9mEqDpLVkbg8SxMsdf/pEF5/VyUwA9t8RT -fKVsInRd386tDqJSDbSFqKTvLztr/5YCyzZzvC2YB1voko/caOGd2d/G51Ij+bXU -xEN8U4fHDBsHwPUGb31uZUhTXpL37KiOqZmXFoH2usmuvx882XvyGcV0F4tstMaR -KLKzl2PwqzAYGFexLkYKMz0TYIeN6h3b86ETazPPU49nkaEU23Dx21J2Rb3UlH+I -lDQF3wuH1QlYiTnlcVa/Zu4QQg0/iP8ALkZ06mvn9e9mOtnA8gsh4B2oLqc19VLU -bcpv40dV1H3W9Lcx9B8JYUp0c/Oyno1D7Yj3tjGcwMKECmUpHi4kksehVo0/P933 -xmFmC6eyWYVdO9upvY/vKSB7b1dMt85iWr3gnMsSfRYc6jsbSxdjOPST46UsIzjx -wa1DS6+Bv5tiaC4uC6X+0tCAZo+UOQMYUbTGRR/7g/c= ------END RSA PRIVATE KEY----- diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/node_modules/parse-asn1/test/pass.rsa.2028.pub b/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/node_modules/parse-asn1/test/pass.rsa.2028.pub deleted file mode 100644 index 655cc3a4..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/node_modules/parse-asn1/test/pass.rsa.2028.pub +++ /dev/null @@ -1,9 +0,0 @@ ------BEGIN PUBLIC KEY----- -MIIBHjANBgkqhkiG9w0BAQEFAAOCAQsAMIIBBgKB/gy7mjaWgPeFdVYDZWRCA9BN -iv3pPb0es27+FKY0hszLaOw47ExCtAWpDsH48TXAfyHBYwBLguayfk4LGIupxb+C -GMbRo3xEp0CbfY1Jby26T9vGjRC1foHDDUJG84uaRbyHqaf4i6zt4gVR+xlAEIjk -aFAAK8cOoXAT1CVqGLLljUCchL8PjaHj/yriZ/S7rdwlI3LnABxwwmLrmR/v71Wt -pmO/aNG8N+1po+QwaghTkyQ59E/ZvAuOkFWHok2q/R6PYAa2jdZ9zim0FqOP+nkQ -aEDRbBFBmBqTv5fFGfk2WsAfKf/RG0/VFd+ZeM5251TeTvXH695nlSGauVl9AgMB -AAE= ------END PUBLIC KEY----- diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/node_modules/parse-asn1/test/pass2.dsa.1024.priv b/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/node_modules/parse-asn1/test/pass2.dsa.1024.priv deleted file mode 100644 index 29e36734..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/node_modules/parse-asn1/test/pass2.dsa.1024.priv +++ /dev/null @@ -1,15 +0,0 @@ ------BEGIN DSA PRIVATE KEY----- -Proc-Type: 4,ENCRYPTED -DEK-Info: AES-128-CBC,DC173C6DFD455EBE462A35D6AB9A603A - -FoC3sxbdUFJTaNtRpooMxaX2lcQRLUz8qcRhzDBn5a1kaMHp2JM3KlHK5aauybT4 -ilmlKJ9sSm8pFLAWPKbkczSgZ+X6p/51v4zaEJSebZ98p32kQk87XJQE7aYroxYV -UfM5PSOoKWilj+LZQQEXV10qDoYGrnbSdoNSxYW5V1a1aP+ua0EO7m9MUYkoLxi3 -SJ/s2h/5KM3TOz7d7DOZuSoNm+0n6YC4aqQnR3lmEtAXEYLQqLhH2Q3FTKTHwBQw -HgMBAzcXOS1YSw6Ekwh1eZamizrOEC4I6oZEHoUBqRfbsQ8tu77kDq2ovQSyn8Fp -SeE64m3GgZOYdfcDuNZ0ccmm3shBBfTfD9AwR+1thklKO3oaaLEHb6TmnkD79rEz -9WsiVxoN7vqqWdgoeyl7REOB6WLQp8kYS4FoRG0QB/ZS8Hs/Tf17QPnrQNiMkvP7 -sJSHmlaMKXjWXK0VoN94kfZKUXwkzLD1VXuXFCnUkznWU0tahYi06b8/SVXc6EG+ -0mzylckH7UnjOQfxSFAlZ+e/PiX80tcPakxYbk+f1Nv7L0NOyhrDv18KUbv9mEpV -Ysild1m7/QSF0u1qmjmGNQ== ------END DSA PRIVATE KEY----- diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/node_modules/parse-asn1/test/pass2.dsa.1024.pub b/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/node_modules/parse-asn1/test/pass2.dsa.1024.pub deleted file mode 100644 index 80a731ea..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/node_modules/parse-asn1/test/pass2.dsa.1024.pub +++ /dev/null @@ -1,12 +0,0 @@ ------BEGIN PUBLIC KEY----- -MIIBtzCCASwGByqGSM44BAEwggEfAoGBAOY0KsTt5EpJ4LtlD3xRS5mDiGE1CMNp -0S9X0sK8kP8Aps8iYwMLbZYglk18GCNnCk4SjbAnZHSB3kaIv6AKQc2J8W2YV5se -3VhpKOFst7bqRtkGsl8uJtGlKTiXNclkv2jsKOrsBokSD1USGCECTNeMt3OgziRc -Z1dS+djSOZ2nAhUAzB96SpxlAak+K/QLVJ+lDe5DcY0CgYEAtxX1/HckvhlhHQyK -ZWLQsDfZBILbhc+OLDpOyT6cJS/sJzfFIYZgK5M3rOS4OmzdYfJccQAuGq+TVJQ3 -VcYOdbrIANJV8CDrn4jkkejTzJI6fCwAkPWOyxw8kbV1Hsoy6WLfSCHKpBUcrogA -qRGESqBVTawjyF/ECX667y/P49MDgYQAAoGAXYmxO4+52C1gBzh7GgTwNLJl7bLn -gOhKTFlKhT36VjMjeFfdXmBVBVbfUottKZby/gVX1IXT38PStB/dswbF45bGDdoS -zMFjYmHTtLtrU/4hReVtvb5MYmrPDFX58SwcSRRO/cH6WJPvfu4Aq0cJZA9Kb0B9 -5Wo18JxAqvPtTB8= ------END PUBLIC KEY----- diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/node_modules/parse-asn1/test/rsa.1024.priv b/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/node_modules/parse-asn1/test/rsa.1024.priv deleted file mode 100644 index d3b5fdab..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/node_modules/parse-asn1/test/rsa.1024.priv +++ /dev/null @@ -1,15 +0,0 @@ ------BEGIN RSA PRIVATE KEY----- -MIICVAIBAAJ/OwswbFo/uyC8ltGf/yA1A+gV5IGdnAgPbUSI3GzbHCA+x+TLG/tL -vbRw3r1smppY/jkkpiVW1ErSMuN0uixp5gb78Z9rH1XpWb5WWgp3WaY/9EHMjMdO -kQ/9LVZvRvl/M/Fi6owP+q+amJI1BEjECYfbhGL3rmlVdq4qXc40QwIDAQABAn8I -VZ0BPoAOhyF33KFMHxy8r28fsVgxJUYgM3NqQgdv4fFawCYXjhJz9duU5YJGFJGJ -WUGeHlkyYFlpi4f3m7tY7JawmQUWB0MNSoKHI3cgDX4/tfBN8ni+cO0eSoR5czBY -EsAHBU47p1awNFAHwd+ZEuv9H4RmMn7p279rQTtpAkAH3Nqs2/vrRF2cZUN4fIXf -4xHsQBByUayGq8a3J0UGaSFWv68zTUKFherr9uZotNp7NJ4jBXiARw0q8docXUG1 -AkAHgmOKHoORtAmikqpmFEJZOtsXMaLCIm4EszPo5ciYoLMBcVit09AdiQlt7ZJL -DY02svU1b0agCZ97kDkmHDkXAkACa8M9JELuDs/P/vIGYDkMVatIFfW6bWF02eFG -taWwMqCcSEsWvbw0xqYt34jURpNbCjmCyQVwYfAw/+TLhP9dAkAFwRjdwjw37qpj -ddg1mNiu37b7swFxmkiMOXZRxaNNsfb56A14RpN3zob3QdGUybGodMIKTFbmU/lu -CjqAxafJAkAG2yf6RWbwFIWfMyt7WYCh0VaGBCcgy574AinVieEo3ZZyFfC63+xm -3uoaNy4iLoJv4GCjqUBz3ZfcVaO/DDWG ------END RSA PRIVATE KEY----- diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/node_modules/parse-asn1/test/rsa.1024.pub b/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/node_modules/parse-asn1/test/rsa.1024.pub deleted file mode 100644 index 7ba06369..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/node_modules/parse-asn1/test/rsa.1024.pub +++ /dev/null @@ -1,5 +0,0 @@ ------BEGIN RSA PUBLIC KEY----- -MIGGAn87CzBsWj+7ILyW0Z//IDUD6BXkgZ2cCA9tRIjcbNscID7H5Msb+0u9tHDe -vWyamlj+OSSmJVbUStIy43S6LGnmBvvxn2sfVelZvlZaCndZpj/0QcyMx06RD/0t -Vm9G+X8z8WLqjA/6r5qYkjUESMQJh9uEYveuaVV2ripdzjRDAgMBAAE= ------END RSA PUBLIC KEY----- diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/node_modules/parse-asn1/test/rsa.2028.priv b/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/node_modules/parse-asn1/test/rsa.2028.priv deleted file mode 100644 index 10e651d8..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/node_modules/parse-asn1/test/rsa.2028.priv +++ /dev/null @@ -1,27 +0,0 @@ ------BEGIN RSA PRIVATE KEY----- -MIIEjwIBAAKB/gy7mjaWgPeFdVYDZWRCA9BNiv3pPb0es27+FKY0hszLaOw47ExC -tAWpDsH48TXAfyHBYwBLguayfk4LGIupxb+CGMbRo3xEp0CbfY1Jby26T9vGjRC1 -foHDDUJG84uaRbyHqaf4i6zt4gVR+xlAEIjkaFAAK8cOoXAT1CVqGLLljUCchL8P -jaHj/yriZ/S7rdwlI3LnABxwwmLrmR/v71WtpmO/aNG8N+1po+QwaghTkyQ59E/Z -vAuOkFWHok2q/R6PYAa2jdZ9zim0FqOP+nkQaEDRbBFBmBqTv5fFGfk2WsAfKf/R -G0/VFd+ZeM5251TeTvXH695nlSGauVl9AgMBAAECgf4LrWHY/l54ouThZWvvbrug -pfz6sJX2g9l7yXmWlEWsPECVo/7SUbpYFpt6OZy99zSg+IKbGqWKfdhoKrTwIVtC -L0YZ0NlmdnANSIz0roxQG7ZxkL5+vHSw/PmD9x4Uwf+Cz8hATCmNBv1qc60dkyuW -4CLqe72qaTiVWRoO1iagQghNcLoo6vSy65ExLaCDTPha7yu2vw4hFZpWiEjW4dxf -rFdLiix52BC86YlAlxME/rLg8IJVvilbyo9aWdXmxOaUTLRv6PkFD1/gVdw8V9Qr -SLN9FlK2kkjiX0dzoibvZw3tMnt3yydAx0X87+sMRVahC1bp3kVPz4Hy0EWX4QJ/ -PM31vGiuITk2NCd51DXt1Ltn2OP5FaJSmCaEjh0XkU4qouYyjXWt8Bu6BTCl2vua -Fg0Uji9C+IkPLmaUMbMIOwaTk8cWqLthSxsLe70J5OkGrgfKUM/w+BHH1Pt/Pjzj -C++l0kiFaOVDVaAV9GpLPLCBoK/PC9Rb/rxMMoCCNwJ/NZuedIny2w3LMii77h/T -zSvergNGhjY6Rnva8lLXJ6dlrkcPAyps3gWwxqj4NR0T+GM0bDUPVLb7M07XV7SX -v7VJGm52JbRGwM1ss+r8XTTNemeGk+WRxG7TgtsMqYGXLfB8Qxk/f5/Mcc00Tl8u -wXFNsfxJxmt6AbsTr3g36wJ/IhOnibz9Ad+nchlBnN3QeW3CKHqzaR18voqvtVm2 -kJfHK15prH/sSGmxmiEGgrCJTZxtDbaNCO7/VBjnKudUUIhCAwsLtuq0/zub9vAd -8G1scfIpv5qaSNzmKoX8bOwArvrS6wP7yKrcTsuWIlHD8rJVI7IEDnQoTp5G8fK1 -hwJ/MIh8M5v0r5dUYEv6oIJWGcle6AH1JmsP5WIafgq72Z2288pHcCFHwNY8Dg9J -76QswVLnUhPTlmm3EOOPGEtam2iAD5r0Afytlb4lbNoQsj2szeXONDXB+6oueajh -VNELUr8HcSP5lgzRZjJW6aFIzj9LDRmQnUAOjGSXVOQtEwJ/MCQZ7N/v4dIKeDRA -8d8UExZ3+gGHumziztGRJ0tQryZH2PakP5I7V+1l7qEUnJ2c3mF+e1v41Ep9LCvh -bzrPKw9dxh18g4b+7bMpsWPnsraKh6ipxc7aaOaZV0Dxgez4zcZu0P1olO0cN3KM -nxJ0Pds3R8bAhNCDdS2JZaRp5Q== ------END RSA PRIVATE KEY----- diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/node_modules/parse-asn1/test/rsa.2028.pub b/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/node_modules/parse-asn1/test/rsa.2028.pub deleted file mode 100644 index b36dca4d..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/node_modules/parse-asn1/test/rsa.2028.pub +++ /dev/null @@ -1,8 +0,0 @@ ------BEGIN RSA PUBLIC KEY----- -MIIBBgKB/gy7mjaWgPeFdVYDZWRCA9BNiv3pPb0es27+FKY0hszLaOw47ExCtAWp -DsH48TXAfyHBYwBLguayfk4LGIupxb+CGMbRo3xEp0CbfY1Jby26T9vGjRC1foHD -DUJG84uaRbyHqaf4i6zt4gVR+xlAEIjkaFAAK8cOoXAT1CVqGLLljUCchL8PjaHj -/yriZ/S7rdwlI3LnABxwwmLrmR/v71WtpmO/aNG8N+1po+QwaghTkyQ59E/ZvAuO -kFWHok2q/R6PYAa2jdZ9zim0FqOP+nkQaEDRbBFBmBqTv5fFGfk2WsAfKf/RG0/V -Fd+ZeM5251TeTvXH695nlSGauVl9AgMBAAE= ------END RSA PUBLIC KEY----- diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/node_modules/parse-asn1/test/vector.js b/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/node_modules/parse-asn1/test/vector.js deleted file mode 100644 index 4b8d8cf5..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/node_modules/parse-asn1/test/vector.js +++ /dev/null @@ -1,7 +0,0 @@ -module.exports = { - p: new Buffer('86F5CA03DCFEB225063FF830A0C769B9DD9D6153AD91D7CE27F787C43278B447E6533B86B18BED6E8A48B784A14C252C5BE0DBF60B86D6385BD2F12FB763ED8873ABFD3F5BA2E0A8C0A59082EAC056935E529DAF7C610467899C77ADEDFC846C881870B7B19B2B58F9BE0521A17002E3BDD6B86685EE90B3D9A1B02B782B1779', 'hex'), - q: new Buffer('996F967F6C8E388D9E28D01E205FBA957A5698B1', 'hex'), - g: new Buffer('07B0F92546150B62514BB771E2A0C0CE387F03BDA6C56B505209FF25FD3C133D89BBCD97E904E09114D9A7DEFDEADFC9078EA544D2E401AEECC40BB9FBBF78FD87995A10A1C27CB7789B594BA7EFB5C4326A9FE59A070E136DB77175464ADCA417BE5DCE2F40D10A46A3A3943F26AB7FD9C0398FF8C76EE0A56826A8A88F1DBD', 'hex'), - x: new Buffer('411602CB19A6CCC34494D79D98EF1E7ED5AF25F7', 'hex'), - y: new Buffer('5DF5E01DED31D0297E274E1691C192FE5868FEF9E19A84776454B100CF16F65392195A38B90523E2542EE61871C0440CB87C322FC4B4D2EC5E1E7EC766E1BE8D4CE935437DC11C3C8FD426338933EBFE739CB3465F4D3668C5E473508253B1E682F65CBDC4FAE93C2EA212390E54905A86E2223170B44EAA7DA5DD9FFCFB7F3B', 'hex') -} diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/node_modules/parse-asn1/test/vector.priv b/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/node_modules/parse-asn1/test/vector.priv deleted file mode 100644 index 178bd1e6..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/node_modules/parse-asn1/test/vector.priv +++ /dev/null @@ -1,12 +0,0 @@ ------BEGIN DSA PRIVATE KEY----- -MIIBugIBAAKBgQCG9coD3P6yJQY/+DCgx2m53Z1hU62R184n94fEMni0R+ZTO4ax -i+1uiki3hKFMJSxb4Nv2C4bWOFvS8S+3Y+2Ic6v9P1ui4KjApZCC6sBWk15Sna98 -YQRniZx3re38hGyIGHC3sZsrWPm+BSGhcALjvda4ZoXukLPZobAreCsXeQIVAJlv -ln9sjjiNnijQHiBfupV6VpixAoGAB7D5JUYVC2JRS7dx4qDAzjh/A72mxWtQUgn/ -Jf08Ez2Ju82X6QTgkRTZp9796t/JB46lRNLkAa7sxAu5+794/YeZWhChwny3eJtZ -S6fvtcQyap/lmgcOE223cXVGStykF75dzi9A0QpGo6OUPyarf9nAOY/4x27gpWgm -qKiPHb0CgYBd9eAd7THQKX4nThaRwZL+WGj++eGahHdkVLEAzxb2U5IZWji5BSPi -VC7mGHHARAy4fDIvxLTS7F4efsdm4b6NTOk1Q33BHDyP1CYziTPr/nOcs0ZfTTZo -xeRzUIJTseaC9ly9xPrpPC6iEjkOVJBahuIiMXC0Tqp9pd2f/Pt/OwIUQRYCyxmm -zMNElNedmO8eftWvJfc= ------END DSA PRIVATE KEY----- diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/node_modules/parse-asn1/test/vector2.priv b/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/node_modules/parse-asn1/test/vector2.priv deleted file mode 100644 index ef53f614..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/node_modules/parse-asn1/test/vector2.priv +++ /dev/null @@ -1,19 +0,0 @@ ------BEGIN DSA PRIVATE KEY----- -MIIDVQIBAAKCAQEAnbb7WVG2a7b+HhQPHSzlUCN0Fh/WU43xZIIYZC8LXEjI96Qa -rfoYcyS4dnT6GCKwDx7PgTaUPXxVdXJk5aGkT/4BLpk24AwdPpMQsBx9F5gF0wWL -Kp9Ltvlxa/5hF8a1s8xNm+NBEErUqArWyU4AX0uZPhTwketRdDvzMFDDjeI1Vn4b -NMPWpcDOqhoPNoITw9GYQ9C0sJ3Ln8ctOcjeQfG/FNS7RWPKKDcWIcrTMktqLTkh -Rb6/rHSIBSNvXKL+krhxzY+cNtMpK1UJyoyqd6Kt/Hv9d92m9xElp0Vv6hU+QzJW -oiYcagbtNpN5fnmV+tWqu8++PtonQeN1QEriWwIhAPLDEZN0znbJNWmQtGU3Shfy -P57TUIm9lp9hxt3pmYwfAoIBAFx/9rBvjxQ/6CiEM0k+R2nE2Yis5b4loOJICWcH -FsYT17DO5pMvj6p8RNLLJFI9pT++T27DWViS0apYxDKKBsRqFWYufqpwOh3s+Luy -0F2+LrlWwUKjOGYdEEYcDRNUcghQV/NJQwn/pzxhH3izKtu1dAw2HJ81vpCZfbIB -Ti71qmF4L1Kr64vWQyxN0Je8VCOyhdr7YNw2ToFh9KKjWso6ELHE0gPMdqRwozr9 -y92SlZhZq9i1bhclJS146sZucbqa4/HdJIcZmHQ5PNTYMhhoAGVHYOHjTAnk0VUX -n57A3ERz+Za9zm7tHKvti28Rb3rZz1Bd8PmY40qydRSw/+cCggEAZnCYxlRCbHjX -+CAerGwgPvAw1DYFAywvH6k35SN9vZSfNKCiVk/hJtyLcVxRQYAs4JecgkZGPEDm -tr2qJRP6YRcocWwuT9U7yVuJ5plJ2WUS6HO5yPjf1JnMMSiCVhreyzH2WOk0wMGX -8sTZawXLrWc4Hnt2iJHk2jhD0k2UzftRJum4vyHoNY7g4KMO8T/WpmTA3ONzH3+0 -mkhFpP2CVGh5cqLTglmcm6xODteZgZMHiRMDJVgTSXZBC4nSwXHRI6w1/ZdyGVl6p9FcGppCjlkZT3XHIevLz65EaWpJmvp04EKZ8TICZgFjjLh6t5GQ1KCYY -xXajuxlYck4mWvq3wIgacdUjCHQ3+prmlHJ6tTifDPTs/GAMW5byrkskz8OTbw= ------END DSA PRIVATE KEY----- diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/package.json b/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/package.json deleted file mode 100644 index ec3aa14c..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/package.json +++ /dev/null @@ -1,72 +0,0 @@ -{ - "name": "public-encrypt", - "version": "4.0.0", - "description": "browserify version of publicEncrypt & privateDecrypt", - "main": "index.js", - "browser": "browser.js", - "directories": { - "test": "test" - }, - "scripts": { - "test": "node test/index.js | tspec" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/crypto-browserify/publicEncrypt.git" - }, - "author": "", - "license": "MIT", - "bugs": { - "url": "https://github.com/crypto-browserify/publicEncrypt/issues" - }, - "homepage": "https://github.com/crypto-browserify/publicEncrypt", - "dependencies": { - "bn.js": "^4.1.0", - "browserify-rsa": "^4.0.0", - "create-hash": "^1.1.0", - "parse-asn1": "^5.0.0", - "randombytes": "^2.0.1" - }, - "devDependencies": { - "tape": "^3.0.3", - "tap-spec": "^2.1.2" - }, - "gitHead": "e7654c62f2929caeae09bcf6e3572b1aafcbd8b1", - "_id": "public-encrypt@4.0.0", - "_shasum": "39f699f3a46560dd5ebacbca693caf7c65c18cc6", - "_from": "public-encrypt@>=4.0.0 <5.0.0", - "_npmVersion": "2.9.0", - "_nodeVersion": "4.2.1", - "_npmUser": { - "name": "cwmma", - "email": "calvin.metcalf@gmail.com" - }, - "dist": { - "shasum": "39f699f3a46560dd5ebacbca693caf7c65c18cc6", - "tarball": "https://registry.npmjs.org/public-encrypt/-/public-encrypt-4.0.0.tgz" - }, - "maintainers": [ - { - "name": "cwmma", - "email": "calvin.metcalf@gmail.com" - }, - { - "name": "dcousens", - "email": "email@dcousens.com" - }, - { - "name": "dominictarr", - "email": "dominic.tarr@gmail.com" - }, - { - "name": "jprichardson", - "email": "jprichardson@gmail.com" - }, - { - "name": "indutny", - "email": "fedor@indutny.com" - } - ], - "_resolved": "https://registry.npmjs.org/public-encrypt/-/public-encrypt-4.0.0.tgz", - "readme": "ERROR: No README data found!" -} diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/privateDecrypt.js b/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/privateDecrypt.js deleted file mode 100644 index 9047c0e0..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/privateDecrypt.js +++ /dev/null @@ -1,108 +0,0 @@ -var parseKeys = require('parse-asn1'); -var mgf = require('./mgf'); -var xor = require('./xor'); -var bn = require('bn.js'); -var crt = require('browserify-rsa'); -var createHash = require('create-hash'); -var withPublic = require('./withPublic'); -module.exports = function privateDecrypt(private_key, enc, reverse) { - var padding; - if (private_key.padding) { - padding = private_key.padding; - } else if (reverse) { - padding = 1; - } else { - padding = 4; - } - - var key = parseKeys(private_key); - var k = key.modulus.byteLength(); - if (enc.length > k || new bn(enc).cmp(key.modulus) >= 0) { - throw new Error('decryption error'); - } - var msg; - if (reverse) { - msg = withPublic(new bn(enc), key); - } else { - msg = crt(enc, key); - } - var zBuffer = new Buffer(k - msg.length); - zBuffer.fill(0); - msg = Buffer.concat([zBuffer, msg], k); - if (padding === 4) { - return oaep(key, msg); - } else if (padding === 1) { - return pkcs1(key, msg, reverse); - } else if (padding === 3) { - return msg; - } else { - throw new Error('unknown padding'); - } -}; - -function oaep(key, msg){ - var n = key.modulus; - var k = key.modulus.byteLength(); - var mLen = msg.length; - var iHash = createHash('sha1').update(new Buffer('')).digest(); - var hLen = iHash.length; - var hLen2 = 2 * hLen; - if (msg[0] !== 0) { - throw new Error('decryption error'); - } - var maskedSeed = msg.slice(1, hLen + 1); - var maskedDb = msg.slice(hLen + 1); - var seed = xor(maskedSeed, mgf(maskedDb, hLen)); - var db = xor(maskedDb, mgf(seed, k - hLen - 1)); - if (compare(iHash, db.slice(0, hLen))) { - throw new Error('decryption error'); - } - var i = hLen; - while (db[i] === 0) { - i++; - } - if (db[i++] !== 1) { - throw new Error('decryption error'); - } - return db.slice(i); -} - -function pkcs1(key, msg, reverse){ - var p1 = msg.slice(0, 2); - var i = 2; - var status = 0; - while (msg[i++] !== 0) { - if (i >= msg.length) { - status++; - break; - } - } - var ps = msg.slice(2, i - 1); - var p2 = msg.slice(i - 1, i); - - if ((p1.toString('hex') !== '0002' && !reverse) || (p1.toString('hex') !== '0001' && reverse)){ - status++; - } - if (ps.length < 8) { - status++; - } - if (status) { - throw new Error('decryption error'); - } - return msg.slice(i); -} -function compare(a, b){ - a = new Buffer(a); - b = new Buffer(b); - var dif = 0; - var len = a.length; - if (a.length !== b.length) { - dif++; - len = Math.min(a.length, b.length); - } - var i = -1; - while (++i < len) { - dif += (a[i] ^ b[i]); - } - return dif; -} \ No newline at end of file diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/publicEncrypt.js b/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/publicEncrypt.js deleted file mode 100644 index f1ce4046..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/publicEncrypt.js +++ /dev/null @@ -1,95 +0,0 @@ -var parseKeys = require('parse-asn1'); -var randomBytes = require('randombytes'); -var createHash = require('create-hash'); -var mgf = require('./mgf'); -var xor = require('./xor'); -var bn = require('bn.js'); -var withPublic = require('./withPublic'); -var crt = require('browserify-rsa'); - -var constants = { - RSA_PKCS1_OAEP_PADDING: 4, - RSA_PKCS1_PADDIN: 1, - RSA_NO_PADDING: 3 -}; - -module.exports = function publicEncrypt(public_key, msg, reverse) { - var padding; - if (public_key.padding) { - padding = public_key.padding; - } else if (reverse) { - padding = 1; - } else { - padding = 4; - } - var key = parseKeys(public_key); - var paddedMsg; - if (padding === 4) { - paddedMsg = oaep(key, msg); - } else if (padding === 1) { - paddedMsg = pkcs1(key, msg, reverse); - } else if (padding === 3) { - paddedMsg = new bn(msg); - if (paddedMsg.cmp(key.modulus) >= 0) { - throw new Error('data too long for modulus'); - } - } else { - throw new Error('unknown padding'); - } - if (reverse) { - return crt(paddedMsg, key); - } else { - return withPublic(paddedMsg, key); - } -}; - -function oaep(key, msg){ - var k = key.modulus.byteLength(); - var mLen = msg.length; - var iHash = createHash('sha1').update(new Buffer('')).digest(); - var hLen = iHash.length; - var hLen2 = 2 * hLen; - if (mLen > k - hLen2 - 2) { - throw new Error('message too long'); - } - var ps = new Buffer(k - mLen - hLen2 - 2); - ps.fill(0); - var dblen = k - hLen - 1; - var seed = randomBytes(hLen); - var maskedDb = xor(Buffer.concat([iHash, ps, new Buffer([1]), msg], dblen), mgf(seed, dblen)); - var maskedSeed = xor(seed, mgf(maskedDb, hLen)); - return new bn(Buffer.concat([new Buffer([0]), maskedSeed, maskedDb], k)); -} -function pkcs1(key, msg, reverse){ - var mLen = msg.length; - var k = key.modulus.byteLength(); - if (mLen > k - 11) { - throw new Error('message too long'); - } - var ps; - if (reverse) { - ps = new Buffer(k - mLen - 3); - ps.fill(0xff); - } else { - ps = nonZero(k - mLen - 3); - } - return new bn(Buffer.concat([new Buffer([0, reverse?1:2]), ps, new Buffer([0]), msg], k)); -} -function nonZero(len, crypto) { - var out = new Buffer(len); - var i = 0; - var cache = randomBytes(len*2); - var cur = 0; - var num; - while (i < len) { - if (cur === cache.length) { - cache = randomBytes(len*2); - cur = 0; - } - num = cache[cur++]; - if (num) { - out[i++] = num; - } - } - return out; -} \ No newline at end of file diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/readme.md b/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/readme.md deleted file mode 100644 index 47c69401..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/readme.md +++ /dev/null @@ -1,6 +0,0 @@ -publicEncrypt -=== - -[![Build Status](https://travis-ci.org/crypto-browserify/publicEncrypt.svg)](https://travis-ci.org/crypto-browserify/publicEncrypt) - -publicEncrypt/privateDecrypt for browserify \ No newline at end of file diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/test/1024.priv b/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/test/1024.priv deleted file mode 100644 index 72062169..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/test/1024.priv +++ /dev/null @@ -1,16 +0,0 @@ ------BEGIN PRIVATE KEY----- -MIICdwIBADANBgkqhkiG9w0BAQEFAASCAmEwggJdAgEAAoGBAKulUTZ8B1qccZ8c -DXRGSY08gW8KvLlcxxxGC4gZHNT3CBUF8n5R4KE30aZyYZ/rtsQZu05juZJxaJ0q -mbe75dlQ5d+Xc9BMXeQg/MpTZw5TAN7OIdGYYpFBe+1PLZ6wEfjkYrMqMUcfq2Lq -hTLdAbvBJnuRcYZLqmBeOQ8FTrKrAgMBAAECgYEAnkHRbEPU3/WISSQrP36iyCb2 -S/SBZwKkzmvCrBxDWhPeDswp9c/2JY76rNWfLzy8iXgUG8WUzvHje61Qh3gmBcKe -bUaTGl4Vy8Ha1YBADo5RfRrdm0FE4tvgvu/TkqFqpBBZweu54285hk5zlG7n/D7Y -dnNXUpu5MlNb5x3gW0kCQQDUL//cwcXUxY/evaJP4jSe+ZwEQZo+zXRLiPUulBoV -aw28CVMuxdgwqAo1X1IKefPeUaf7RQu8gCKaRnpGuEuXAkEAzxZTfMmvmCUDIew4 -5Gk6bK265XQWdhcgiq254lpBGOYmDj9yCE7yA+zmASQwMsXTdQOi1hOCEyrXuSJ5 -c++EDQJAFh3WrnzoEPByuYXMmET8tSFRWMQ5vpgNqh3haHR5b4gUC2hxaiunCBNL -1RpVY9AoUiDywGcG/SPh93CnKB3niwJBAKP7AtsifZgVXtiizB4aMThTjVYaSZrz -D0Kg9DuHylpkDChmFu77TGrNUQgAVuYtfhb/bRblVa/F0hJ4eQHT3JUCQBVT68tb -OgRUk0aP9tC3021VN82X6+klowSQN8oBPX8+TfDWSUilp/+j24Hky+Z29Do7yR/R -qutnL92CvBlVLV4= ------END PRIVATE KEY----- diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/test/1024.pub b/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/test/1024.pub deleted file mode 100644 index 2dba785d..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/test/1024.pub +++ /dev/null @@ -1,6 +0,0 @@ ------BEGIN PUBLIC KEY----- -MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCrpVE2fAdanHGfHA10RkmNPIFv -Cry5XMccRguIGRzU9wgVBfJ+UeChN9GmcmGf67bEGbtOY7mScWidKpm3u+XZUOXf -l3PQTF3kIPzKU2cOUwDeziHRmGKRQXvtTy2esBH45GKzKjFHH6ti6oUy3QG7wSZ7 -kXGGS6pgXjkPBU6yqwIDAQAB ------END PUBLIC KEY----- diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/test/ec.pass.priv b/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/test/ec.pass.priv deleted file mode 100644 index bf1836d5..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/test/ec.pass.priv +++ /dev/null @@ -1,7 +0,0 @@ ------BEGIN ENCRYPTED PRIVATE KEY----- -MIHeMEkGCSqGSIb3DQEFDTA8MBsGCSqGSIb3DQEFDDAOBAi9LqZQx4JFXAICCAAw -HQYJYIZIAWUDBAECBBA+js1fG4Rv/yRN7oZvxbgyBIGQ/D4yj86M1x8lMsnAHQ/K -7/ryb/baDNHqN9LTZanEGBuyxgrTzt08SiL+h91yFGMoaly029K1VgEI8Lxu5Np/ -A+LK7ewh73ABzsbuxYdcXI+rKnrvLN9Tt6veDs4GlqTTsWwq5wF0C+6gaYRBXA74 -T1b6NykGh2UNL5U5pHZEYdOVLz+lRJL7gYqlweNHP/S3 ------END ENCRYPTED PRIVATE KEY----- diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/test/ec.priv b/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/test/ec.priv deleted file mode 100644 index 25fffbd8..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/test/ec.priv +++ /dev/null @@ -1,5 +0,0 @@ ------BEGIN EC PRIVATE KEY----- -MHQCAQEEIDF6Xv8Sv//wGUWD+c780ppGrU0QdZWCAzxAQPQX8r/uoAcGBSuBBAAK -oUQDQgAEIZeowDylls4K/wfBjO18bYo7gGx8nYQRija4e/qEMikOHJai7geeUreU -r5Xky/Ax7s2dGtegsPNsPgGe5MpQvg== ------END EC PRIVATE KEY----- diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/test/ec.pub b/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/test/ec.pub deleted file mode 100644 index 2e39e5bb..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/test/ec.pub +++ /dev/null @@ -1,4 +0,0 @@ ------BEGIN PUBLIC KEY----- -MFYwEAYHKoZIzj0CAQYFK4EEAAoDQgAEIZeowDylls4K/wfBjO18bYo7gGx8nYQR -ija4e/qEMikOHJai7geeUreUr5Xky/Ax7s2dGtegsPNsPgGe5MpQvg== ------END PUBLIC KEY----- diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/test/index.js b/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/test/index.js deleted file mode 100644 index ea472b62..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/test/index.js +++ /dev/null @@ -1,117 +0,0 @@ -var test = require('tape'); -var fs = require('fs'); -var constants = require('constants'); -var parseKeys = require('parse-asn1'); -require('./nodeTests'); -var priv1024 = fs.readFileSync(__dirname + '/rsa.1024.priv'); -var rsa1024 = { - private: fs.readFileSync(__dirname + '/rsa.1024.priv'), - public: fs.readFileSync(__dirname + '/rsa.1024.pub') -}; -var rsa1024priv = { - private: fs.readFileSync(__dirname + '/rsa.1024.priv'), - public: fs.readFileSync(__dirname + '/rsa.1024.priv') -}; -var rsa1024 = { - private: fs.readFileSync(__dirname + '/rsa.1024.priv'), - public: fs.readFileSync(__dirname + '/rsa.1024.pub') -}; -var rsa2028 = { - private: fs.readFileSync(__dirname + '/rsa.2028.priv'), - public: fs.readFileSync(__dirname + '/rsa.2028.pub') -}; -var nonrsa1024 = { - private: fs.readFileSync(__dirname + '/1024.priv'), - public: fs.readFileSync(__dirname + '/1024.pub') -}; -var nonrsa1024str = { - private: fs.readFileSync(__dirname + '/1024.priv').toString(), - public: fs.readFileSync(__dirname + '/1024.pub').toString() -}; -var pass1024 = { - private: { - passphrase: 'fooo', - key:fs.readFileSync(__dirname + '/pass.1024.priv') - }, - public: fs.readFileSync(__dirname + '/pass.1024.pub') -}; -var pass2028 = { - private: { - passphrase: 'password', - key:fs.readFileSync(__dirname + '/rsa.pass.priv') - }, - public: fs.readFileSync(__dirname + '/rsa.pass.pub') -}; - -var nodeCrypto = require('../'); -var myCrypto = require('../browser'); -function _testIt(keys, message, t) { - var pub = keys.public; - var priv = keys.private; - t.test(message.toString(), function (t) { - t.plan(8); - - var myEnc = myCrypto.publicEncrypt(pub, message); - var nodeEnc = nodeCrypto.publicEncrypt(pub, message); - t.equals(myCrypto.privateDecrypt(priv, myEnc).toString('hex'), message.toString('hex'), 'my decrypter my message'); - t.equals(myCrypto.privateDecrypt(priv, nodeEnc).toString('hex'), message.toString('hex'), 'my decrypter node\'s message'); - t.equals(nodeCrypto.privateDecrypt(priv, myEnc).toString('hex'), message.toString('hex'), 'node decrypter my message'); - t.equals(nodeCrypto.privateDecrypt(priv, nodeEnc).toString('hex'), message.toString('hex'), 'node decrypter node\'s message'); - myEnc = myCrypto.privateEncrypt(priv, message); - nodeEnc = nodeCrypto.privateEncrypt(priv, message); - t.equals(myCrypto.publicDecrypt(pub, myEnc).toString('hex'), message.toString('hex'), 'reverse methods my decrypter my message'); - t.equals(myCrypto.publicDecrypt(pub, nodeEnc).toString('hex'), message.toString('hex'), 'reverse methods my decrypter node\'s message'); - t.equals(nodeCrypto.publicDecrypt(pub, myEnc).toString('hex'), message.toString('hex'), 'reverse methods node decrypter my message'); - t.equals(nodeCrypto.publicDecrypt(pub, nodeEnc).toString('hex'), message.toString('hex'), 'reverse methods node decrypter node\'s message'); - - }); -} -function testIt(keys, message, t) { - _testIt(keys, message, t); - _testIt(paddingObject(keys, 1), Buffer.concat([message, new Buffer(' with RSA_PKCS1_PADDING')]), t); - var parsedKey = parseKeys(keys.public); - var k = parsedKey.modulus.byteLength(); - var zBuf = new Buffer(k); - zBuf.fill(0); - var msg = Buffer.concat([zBuf, message, new Buffer(' with no padding')]).slice(-k); - _testIt(paddingObject(keys, 3), msg, t); -} -function paddingObject(keys, padding) { - return { - public: addPadding(keys.public, padding), - private: addPadding(keys.private, padding) - }; -} -function addPadding(key, padding) { - if (typeof key === 'string' || Buffer.isBuffer(key)) { - return { - key: key, - padding: padding - }; - } - var out = { - key: key.key, - padding:padding - }; - if ('passphrase' in key) { - out.passphrase = key.passphrase; - } - return out; -} -function testRun(i) { - test('run ' + i, function (t) { - testIt(rsa1024priv, new Buffer('1024 2 private keys'), t); - testIt(rsa1024, new Buffer('1024 keys'), t); - testIt(rsa2028, new Buffer('2028 keys'), t); - testIt(nonrsa1024, new Buffer('1024 keys non-rsa key'), t); - testIt(pass1024, new Buffer('1024 keys and password'), t); - testIt(nonrsa1024str, new Buffer('1024 keys non-rsa key as a string'), t); - testIt(pass2028, new Buffer('2028 rsa key with variant passwords'), t); - }); -} - -var i = 0; -var num = 20; -while (++i <= 20) { - testRun(i); -} diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/test/nodeTests.js b/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/test/nodeTests.js deleted file mode 100644 index f168e934..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/test/nodeTests.js +++ /dev/null @@ -1,51 +0,0 @@ -var crypto = require('../browser'); -var test = require('tape'); -var fs = require('fs'); - -// Test RSA encryption/decryption -test('node tests', function (t) { - var certPem = fs.readFileSync(__dirname + '/test_cert.pem', 'ascii'); - var keyPem = fs.readFileSync(__dirname + '/test_key.pem', 'ascii'); - var rsaPubPem = fs.readFileSync(__dirname + '/test_rsa_pubkey.pem', - 'ascii'); - var rsaKeyPem = fs.readFileSync(__dirname + '/test_rsa_privkey.pem', - 'ascii'); - var rsaKeyPemEncrypted = fs.readFileSync( - __dirname + '/test_rsa_privkey_encrypted.pem', 'ascii'); - var input = 'I AM THE WALRUS'; - var bufferToEncrypt = new Buffer(input); - - var encryptedBuffer = crypto.publicEncrypt(rsaPubPem, bufferToEncrypt); - - var decryptedBuffer = crypto.privateDecrypt(rsaKeyPem, encryptedBuffer); - t.equal(input, decryptedBuffer.toString()); - - var decryptedBufferWithPassword = crypto.privateDecrypt({ - key: rsaKeyPemEncrypted, - passphrase: 'password' - }, encryptedBuffer); - t.equal(input, decryptedBufferWithPassword.toString()); - - // encryptedBuffer = crypto.publicEncrypt(certPem, bufferToEncrypt); - - // decryptedBuffer = crypto.privateDecrypt(keyPem, encryptedBuffer); - // t.equal(input, decryptedBuffer.toString()); - - encryptedBuffer = crypto.publicEncrypt(keyPem, bufferToEncrypt); - - decryptedBuffer = crypto.privateDecrypt(keyPem, encryptedBuffer); - t.equal(input, decryptedBuffer.toString()); - - encryptedBuffer = crypto.privateEncrypt(keyPem, bufferToEncrypt); - - decryptedBuffer = crypto.publicDecrypt(keyPem, encryptedBuffer); - t.equal(input, decryptedBuffer.toString()); - - t.throws(function() { - crypto.privateDecrypt({ - key: rsaKeyPemEncrypted, - passphrase: 'wrong' - }, encryptedBuffer); - }); - t.end(); -}); \ No newline at end of file diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/test/pass.1024.priv b/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/test/pass.1024.priv deleted file mode 100644 index b9f38845..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/test/pass.1024.priv +++ /dev/null @@ -1,18 +0,0 @@ ------BEGIN ENCRYPTED PRIVATE KEY----- -MIICzzBJBgkqhkiG9w0BBQ0wPDAbBgkqhkiG9w0BBQwwDgQIji3ZZ6JbsA4CAggA -MB0GCWCGSAFlAwQBFgQQC6MKblq8zyX90/KmgotsMQSCAoDghNf+yxPC/KRh7F3O -k0lMgtDkV+wCLDv7aBvUqy8Ry2zqFPIlfLb8XtSW943XEu6KUI13IZPEr8p9h1ve -Iye6L0g6uAgbFxBE2DwBBSI7mYr7lokr4v0k+inMKf4JeRdI9XWgwOILKTGf1vH7 -PhvBnqLhOg6BIOuF426qpiyYlmRda74d0Th4o6ZyhyMSzPI1XbWSg719Ew3N/tLe -OHdYl0eFrgNjq+xO4Ev+W7eNIh/XBMQtk9wo+mxeNdldRnX822HxTsL8fSSPs+9T -W5M/2EBTJMSsswSjZyFkq8ehtxovI2u0IBX1IiPulyUZLnSNPDV1eUVClK6rk+q1 -kVsfJhUr2qvIjNlQWlbEXQj4VwGtgl0++l8vdpj59MuN2J3Nx5TNMLjA6BYAa/tr -Bu928QoT7ET+SGx5XKCwKb5fwXmDlV5zZC4kZWTaF/d/Icvj5F+fDZuYFg1JOXNZ -+q2oA1qMYaHGX6lF3pbO84ebg1iwQTDM8iIqFeSMGUJTnk/3a7sqfaWQbEQwGb+X -fXnSTwkF+wO2rriPbFvWyzecWu67zDCP0ZWUgGb86sSJCM7xRGShESwCjOrb88F1 -5SZjyIqogrkc3IWiLH9gc5U8d86qoFjJnP6BfwYks1UIyXNGKfZTCqICpMphV+IS -b0N2jprjLTkWR6nxYGSH1bkKMs7x1M0FBLWWLAZqPn9X3pe6JwIBds04O6XjF0un -oxwDjcJdoxVs7PgRiM5d1Tubqu2zmpCCmXNiqi9B0+rV9/jHg9IA5gUfvYdCcEv+ -oAr90I+2+PuBFa9lgdbDV6DtZk4bSYluqamxVeLPg/vrewYfVfDv6jftfY1D0DEy -69H0 ------END ENCRYPTED PRIVATE KEY----- diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/test/pass.1024.pub b/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/test/pass.1024.pub deleted file mode 100644 index 617e7fb1..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/test/pass.1024.pub +++ /dev/null @@ -1,6 +0,0 @@ ------BEGIN PUBLIC KEY----- -MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDSK/7i5BV0x+gmX16Wrm7kRkCZ -y1QUt6wiM2g+SAZTYR0381VnSMX2cv7CpN3499lZj1rL5S7YTaZZwX3RvU5fz56/ -eDX6ciL/PZsbclN2KdkMWYgmcb9J1zUeoMQ3cjfFUCdQZ/ZvDWa+wY2Zg8os2Bow -AoufHtYHm3eOly/cWwIDAQAB ------END PUBLIC KEY----- diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/test/rsa.1024.priv b/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/test/rsa.1024.priv deleted file mode 100644 index d3b5fdab..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/test/rsa.1024.priv +++ /dev/null @@ -1,15 +0,0 @@ ------BEGIN RSA PRIVATE KEY----- -MIICVAIBAAJ/OwswbFo/uyC8ltGf/yA1A+gV5IGdnAgPbUSI3GzbHCA+x+TLG/tL -vbRw3r1smppY/jkkpiVW1ErSMuN0uixp5gb78Z9rH1XpWb5WWgp3WaY/9EHMjMdO -kQ/9LVZvRvl/M/Fi6owP+q+amJI1BEjECYfbhGL3rmlVdq4qXc40QwIDAQABAn8I -VZ0BPoAOhyF33KFMHxy8r28fsVgxJUYgM3NqQgdv4fFawCYXjhJz9duU5YJGFJGJ -WUGeHlkyYFlpi4f3m7tY7JawmQUWB0MNSoKHI3cgDX4/tfBN8ni+cO0eSoR5czBY -EsAHBU47p1awNFAHwd+ZEuv9H4RmMn7p279rQTtpAkAH3Nqs2/vrRF2cZUN4fIXf -4xHsQBByUayGq8a3J0UGaSFWv68zTUKFherr9uZotNp7NJ4jBXiARw0q8docXUG1 -AkAHgmOKHoORtAmikqpmFEJZOtsXMaLCIm4EszPo5ciYoLMBcVit09AdiQlt7ZJL -DY02svU1b0agCZ97kDkmHDkXAkACa8M9JELuDs/P/vIGYDkMVatIFfW6bWF02eFG -taWwMqCcSEsWvbw0xqYt34jURpNbCjmCyQVwYfAw/+TLhP9dAkAFwRjdwjw37qpj -ddg1mNiu37b7swFxmkiMOXZRxaNNsfb56A14RpN3zob3QdGUybGodMIKTFbmU/lu -CjqAxafJAkAG2yf6RWbwFIWfMyt7WYCh0VaGBCcgy574AinVieEo3ZZyFfC63+xm -3uoaNy4iLoJv4GCjqUBz3ZfcVaO/DDWG ------END RSA PRIVATE KEY----- diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/test/rsa.1024.pub b/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/test/rsa.1024.pub deleted file mode 100644 index 7ba06369..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/test/rsa.1024.pub +++ /dev/null @@ -1,5 +0,0 @@ ------BEGIN RSA PUBLIC KEY----- -MIGGAn87CzBsWj+7ILyW0Z//IDUD6BXkgZ2cCA9tRIjcbNscID7H5Msb+0u9tHDe -vWyamlj+OSSmJVbUStIy43S6LGnmBvvxn2sfVelZvlZaCndZpj/0QcyMx06RD/0t -Vm9G+X8z8WLqjA/6r5qYkjUESMQJh9uEYveuaVV2ripdzjRDAgMBAAE= ------END RSA PUBLIC KEY----- diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/test/rsa.2028.priv b/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/test/rsa.2028.priv deleted file mode 100644 index 10e651d8..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/test/rsa.2028.priv +++ /dev/null @@ -1,27 +0,0 @@ ------BEGIN RSA PRIVATE KEY----- -MIIEjwIBAAKB/gy7mjaWgPeFdVYDZWRCA9BNiv3pPb0es27+FKY0hszLaOw47ExC -tAWpDsH48TXAfyHBYwBLguayfk4LGIupxb+CGMbRo3xEp0CbfY1Jby26T9vGjRC1 -foHDDUJG84uaRbyHqaf4i6zt4gVR+xlAEIjkaFAAK8cOoXAT1CVqGLLljUCchL8P -jaHj/yriZ/S7rdwlI3LnABxwwmLrmR/v71WtpmO/aNG8N+1po+QwaghTkyQ59E/Z -vAuOkFWHok2q/R6PYAa2jdZ9zim0FqOP+nkQaEDRbBFBmBqTv5fFGfk2WsAfKf/R -G0/VFd+ZeM5251TeTvXH695nlSGauVl9AgMBAAECgf4LrWHY/l54ouThZWvvbrug -pfz6sJX2g9l7yXmWlEWsPECVo/7SUbpYFpt6OZy99zSg+IKbGqWKfdhoKrTwIVtC -L0YZ0NlmdnANSIz0roxQG7ZxkL5+vHSw/PmD9x4Uwf+Cz8hATCmNBv1qc60dkyuW -4CLqe72qaTiVWRoO1iagQghNcLoo6vSy65ExLaCDTPha7yu2vw4hFZpWiEjW4dxf -rFdLiix52BC86YlAlxME/rLg8IJVvilbyo9aWdXmxOaUTLRv6PkFD1/gVdw8V9Qr -SLN9FlK2kkjiX0dzoibvZw3tMnt3yydAx0X87+sMRVahC1bp3kVPz4Hy0EWX4QJ/ -PM31vGiuITk2NCd51DXt1Ltn2OP5FaJSmCaEjh0XkU4qouYyjXWt8Bu6BTCl2vua -Fg0Uji9C+IkPLmaUMbMIOwaTk8cWqLthSxsLe70J5OkGrgfKUM/w+BHH1Pt/Pjzj -C++l0kiFaOVDVaAV9GpLPLCBoK/PC9Rb/rxMMoCCNwJ/NZuedIny2w3LMii77h/T -zSvergNGhjY6Rnva8lLXJ6dlrkcPAyps3gWwxqj4NR0T+GM0bDUPVLb7M07XV7SX -v7VJGm52JbRGwM1ss+r8XTTNemeGk+WRxG7TgtsMqYGXLfB8Qxk/f5/Mcc00Tl8u -wXFNsfxJxmt6AbsTr3g36wJ/IhOnibz9Ad+nchlBnN3QeW3CKHqzaR18voqvtVm2 -kJfHK15prH/sSGmxmiEGgrCJTZxtDbaNCO7/VBjnKudUUIhCAwsLtuq0/zub9vAd -8G1scfIpv5qaSNzmKoX8bOwArvrS6wP7yKrcTsuWIlHD8rJVI7IEDnQoTp5G8fK1 -hwJ/MIh8M5v0r5dUYEv6oIJWGcle6AH1JmsP5WIafgq72Z2288pHcCFHwNY8Dg9J -76QswVLnUhPTlmm3EOOPGEtam2iAD5r0Afytlb4lbNoQsj2szeXONDXB+6oueajh -VNELUr8HcSP5lgzRZjJW6aFIzj9LDRmQnUAOjGSXVOQtEwJ/MCQZ7N/v4dIKeDRA -8d8UExZ3+gGHumziztGRJ0tQryZH2PakP5I7V+1l7qEUnJ2c3mF+e1v41Ep9LCvh -bzrPKw9dxh18g4b+7bMpsWPnsraKh6ipxc7aaOaZV0Dxgez4zcZu0P1olO0cN3KM -nxJ0Pds3R8bAhNCDdS2JZaRp5Q== ------END RSA PRIVATE KEY----- diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/test/rsa.2028.pub b/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/test/rsa.2028.pub deleted file mode 100644 index b36dca4d..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/test/rsa.2028.pub +++ /dev/null @@ -1,8 +0,0 @@ ------BEGIN RSA PUBLIC KEY----- -MIIBBgKB/gy7mjaWgPeFdVYDZWRCA9BNiv3pPb0es27+FKY0hszLaOw47ExCtAWp -DsH48TXAfyHBYwBLguayfk4LGIupxb+CGMbRo3xEp0CbfY1Jby26T9vGjRC1foHD -DUJG84uaRbyHqaf4i6zt4gVR+xlAEIjkaFAAK8cOoXAT1CVqGLLljUCchL8PjaHj -/yriZ/S7rdwlI3LnABxwwmLrmR/v71WtpmO/aNG8N+1po+QwaghTkyQ59E/ZvAuO -kFWHok2q/R6PYAa2jdZ9zim0FqOP+nkQaEDRbBFBmBqTv5fFGfk2WsAfKf/RG0/V -Fd+ZeM5251TeTvXH695nlSGauVl9AgMBAAE= ------END RSA PUBLIC KEY----- diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/test/rsa.pass.priv b/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/test/rsa.pass.priv deleted file mode 100644 index 99e82135..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/test/rsa.pass.priv +++ /dev/null @@ -1,30 +0,0 @@ ------BEGIN RSA PRIVATE KEY----- -Proc-Type: 4,ENCRYPTED -DEK-Info: AES-256-CBC,7A6A055AD675947A657041422F06D439 - -HQdjzAKUuqqKhZHmpzzY/monfqFhiHnZ5c24jtR9fM4aQJXf/e1fz6MEhyIz6XON -sb4CnXZstnxUuVWDkHEu6KWQ/dKALgiDUuT+UdMawVoVPGdgyWZp35pQPWi3fT2V -XZn58YkG8bO3Y403eZPyhadOefD1VtuFuK6/f90jjzx6ZDnwveXpYgFV7Jy1/pFd -cLLMf07C+hbk416nX6UVipWe4GH+ADFom5ZCfAaUotM7n8i149dULNF4YYi2wP31 -1YaDH5vf1CqiaieDY7xLzpEixwJz6ZEg3gLXaUvz2MpF8owiGI3eP0g7voWp3xt4 -TQx/qDURlaXiaRriWdWtpKyW1MFuJ5+KdNtR1/kXr2BLPB/ZLwyqtynUy8ZYpb4+ -WIRYpUGeb//ZHGhlCH7CRMdABsal4wTwnzi9fW4Ax96ecJ2SlwCuKxwS7iEq2y1/ -FAfGwsE+XufHhme5p6XjKfiHx+zJMIB2NMkrm+wm4PbMTrGVnw5/41/r6XxOB8fe -iKi12Jth4dusc1vYGYfzKop9uEM6CZ6+Chqzb+Zyh/xUiZVlCX/BYnxr7yXUm9aR -PHQgxkn2Act8FgQB3Kgs3jCiCRIJrlsnybeWzQ3YO9TjC4MxygmmwODDBpsOKnEi -kXXS54+cZFjcsva4uJVwhAywRPVUkLzmTkH0tGiwCHjeQNECm+TLahkkEIXrVTb9 -c9creNXMgE6jVVz+R43HXsGvTcgMcBLyFRQJe2nVaj/dQ5JbF4uqNnQzRjAbD34K -uTpFaJ/kmlgcmeScRLnwaoYwFlmhSC+bK0dfY1Jr6AQRA6IDP7nIjqWNDCHNBB8r -Qj1v2KWoVQe3xNHaXhkbJPbA2DKlUIqffkBVtMKtt9KuG3Rccf3bVYAW6oid73/D -z7DMAF5G/OpVR8VbGh1WxXuR7zEVDUwpwsp9ek5dqN8BnBz1ppdZNIKqzszneckU -s2l/6mZBmgV1Nfy/cQU6U5s3S1Xc75UDQVLms3CIOpFTRIpecNTdfa31fYy/svy0 -M2lWTbCva0dOyuvMUhTgBL4I7Qa2dUMPXHMZatV5ooHYq/BZJA1r84C5cM5r+umE -2LLv/BlUr7RaQHhaKGn4Qhpzo5yRDE9mEqDpLVkbg8SxMsdf/pEF5/VyUwA9t8RT -fKVsInRd386tDqJSDbSFqKTvLztr/5YCyzZzvC2YB1voko/caOGd2d/G51Ij+bXU -xEN8U4fHDBsHwPUGb31uZUhTXpL37KiOqZmXFoH2usmuvx882XvyGcV0F4tstMaR -KLKzl2PwqzAYGFexLkYKMz0TYIeN6h3b86ETazPPU49nkaEU23Dx21J2Rb3UlH+I -lDQF3wuH1QlYiTnlcVa/Zu4QQg0/iP8ALkZ06mvn9e9mOtnA8gsh4B2oLqc19VLU -bcpv40dV1H3W9Lcx9B8JYUp0c/Oyno1D7Yj3tjGcwMKECmUpHi4kksehVo0/P933 -xmFmC6eyWYVdO9upvY/vKSB7b1dMt85iWr3gnMsSfRYc6jsbSxdjOPST46UsIzjx -wa1DS6+Bv5tiaC4uC6X+0tCAZo+UOQMYUbTGRR/7g/c= ------END RSA PRIVATE KEY----- diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/test/rsa.pass.pub b/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/test/rsa.pass.pub deleted file mode 100644 index 655cc3a4..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/test/rsa.pass.pub +++ /dev/null @@ -1,9 +0,0 @@ ------BEGIN PUBLIC KEY----- -MIIBHjANBgkqhkiG9w0BAQEFAAOCAQsAMIIBBgKB/gy7mjaWgPeFdVYDZWRCA9BN -iv3pPb0es27+FKY0hszLaOw47ExCtAWpDsH48TXAfyHBYwBLguayfk4LGIupxb+C -GMbRo3xEp0CbfY1Jby26T9vGjRC1foHDDUJG84uaRbyHqaf4i6zt4gVR+xlAEIjk -aFAAK8cOoXAT1CVqGLLljUCchL8PjaHj/yriZ/S7rdwlI3LnABxwwmLrmR/v71Wt -pmO/aNG8N+1po+QwaghTkyQ59E/ZvAuOkFWHok2q/R6PYAa2jdZ9zim0FqOP+nkQ -aEDRbBFBmBqTv5fFGfk2WsAfKf/RG0/VFd+ZeM5251TeTvXH695nlSGauVl9AgMB -AAE= ------END PUBLIC KEY----- diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/test/test_cert.pem b/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/test/test_cert.pem deleted file mode 100644 index a3c1e4a0..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/test/test_cert.pem +++ /dev/null @@ -1,20 +0,0 @@ ------BEGIN CERTIFICATE----- -MIIDXDCCAsWgAwIBAgIJAKL0UG+mRkSPMA0GCSqGSIb3DQEBBQUAMH0xCzAJBgNV -BAYTAlVLMRQwEgYDVQQIEwtBY2tuYWNrIEx0ZDETMBEGA1UEBxMKUmh5cyBKb25l -czEQMA4GA1UEChMHbm9kZS5qczEdMBsGA1UECxMUVGVzdCBUTFMgQ2VydGlmaWNh -dGUxEjAQBgNVBAMTCWxvY2FsaG9zdDAeFw0wOTExMTEwOTUyMjJaFw0yOTExMDYw -OTUyMjJaMH0xCzAJBgNVBAYTAlVLMRQwEgYDVQQIEwtBY2tuYWNrIEx0ZDETMBEG -A1UEBxMKUmh5cyBKb25lczEQMA4GA1UEChMHbm9kZS5qczEdMBsGA1UECxMUVGVz -dCBUTFMgQ2VydGlmaWNhdGUxEjAQBgNVBAMTCWxvY2FsaG9zdDCBnzANBgkqhkiG -9w0BAQEFAAOBjQAwgYkCgYEA8d8Hc6atq78Jt1HLp9agA/wpQfsFvkYUdZ1YsdvO -kL2janjwHQgMMCy/Njal3FUEW0OLPebKZUJ8L44JBXSlVxU4zyiiSOWld8EkTetR -AVT3WKQq3ud+cnxv7g8rGRQp1UHZwmdbZ1wEfAYq8QjYx6m1ciMgRo7DaDQhD29k -d+UCAwEAAaOB4zCB4DAdBgNVHQ4EFgQUL9miTJn+HKNuTmx/oMWlZP9cd4QwgbAG -A1UdIwSBqDCBpYAUL9miTJn+HKNuTmx/oMWlZP9cd4ShgYGkfzB9MQswCQYDVQQG -EwJVSzEUMBIGA1UECBMLQWNrbmFjayBMdGQxEzARBgNVBAcTClJoeXMgSm9uZXMx -EDAOBgNVBAoTB25vZGUuanMxHTAbBgNVBAsTFFRlc3QgVExTIENlcnRpZmljYXRl -MRIwEAYDVQQDEwlsb2NhbGhvc3SCCQCi9FBvpkZEjzAMBgNVHRMEBTADAQH/MA0G -CSqGSIb3DQEBBQUAA4GBADRXXA2xSUK5W1i3oLYWW6NEDVWkTQ9RveplyeS9MOkP -e7yPcpz0+O0ZDDrxR9chAiZ7fmdBBX1Tr+pIuCrG/Ud49SBqeS5aMJGVwiSd7o1n -dhU2Sz3Q60DwJEL1VenQHiVYlWWtqXBThe9ggqRPnCfsCRTP8qifKkjk45zWPcpN ------END CERTIFICATE----- diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/test/test_key.pem b/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/test/test_key.pem deleted file mode 100644 index 48fd93c9..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/test/test_key.pem +++ /dev/null @@ -1,15 +0,0 @@ ------BEGIN RSA PRIVATE KEY----- -MIICXQIBAAKBgQDx3wdzpq2rvwm3Ucun1qAD/ClB+wW+RhR1nVix286QvaNqePAd -CAwwLL82NqXcVQRbQ4s95splQnwvjgkFdKVXFTjPKKJI5aV3wSRN61EBVPdYpCre -535yfG/uDysZFCnVQdnCZ1tnXAR8BirxCNjHqbVyIyBGjsNoNCEPb2R35QIDAQAB -AoGBAJNem9C4ftrFNGtQ2DB0Udz7uDuucepkErUy4MbFsc947GfENjDKJXr42Kx0 -kYx09ImS1vUpeKpH3xiuhwqe7tm4FsCBg4TYqQle14oxxm7TNeBwwGC3OB7hiokb -aAjbPZ1hAuNs6ms3Ybvvj6Lmxzx42m8O5DXCG2/f+KMvaNUhAkEA/ekrOsWkNoW9 -2n3m+msdVuxeek4B87EoTOtzCXb1dybIZUVv4J48VAiM43hhZHWZck2boD/hhwjC -M5NWd4oY6QJBAPPcgBVNdNZSZ8hR4ogI4nzwWrQhl9MRbqqtfOn2TK/tjMv10ALg -lPmn3SaPSNRPKD2hoLbFuHFERlcS79pbCZ0CQQChX3PuIna/gDitiJ8oQLOg7xEM -wk9TRiDK4kl2lnhjhe6PDpaQN4E4F0cTuwqLAoLHtrNWIcOAQvzKMrYdu1MhAkBm -Et3qDMnjDAs05lGT72QeN90/mPAcASf5eTTYGahv21cb6IBxM+AnwAPpqAAsHhYR -9h13Y7uYbaOjvuF23LRhAkBoI9eaSMn+l81WXOVUHnzh3ZwB4GuTyxMXXNOhuiFd -0z4LKAMh99Z4xQmqSoEkXsfM4KPpfhYjF/bwIcP5gOei ------END RSA PRIVATE KEY----- diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/test/test_rsa_privkey.pem b/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/test/test_rsa_privkey.pem deleted file mode 100644 index 425518a0..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/test/test_rsa_privkey.pem +++ /dev/null @@ -1,15 +0,0 @@ ------BEGIN RSA PRIVATE KEY----- -MIICXgIBAAKBgQDCFENGw33yGihy92pDjZQhl0C36rPJj+CvfSC8+q28hxA161QF -NUd13wuCTUcq0Qd2qsBe/2hFyc2DCJJg0h1L78+6Z4UMR7EOcpfdUE9Hf3m/hs+F -UR45uBJeDK1HSFHD8bHKD6kv8FPGfJTotc+2xjJwoYi+1hqp1fIekaxsyQIDAQAB -AoGBAJR8ZkCUvx5kzv+utdl7T5MnordT1TvoXXJGXK7ZZ+UuvMNUCdN2QPc4sBiA -QWvLw1cSKt5DsKZ8UETpYPy8pPYnnDEz2dDYiaew9+xEpubyeW2oH4Zx71wqBtOK -kqwrXa/pzdpiucRRjk6vE6YY7EBBs/g7uanVpGibOVAEsqH1AkEA7DkjVH28WDUg -f1nqvfn2Kj6CT7nIcE3jGJsZZ7zlZmBmHFDONMLUrXR/Zm3pR5m0tCmBqa5RK95u -412jt1dPIwJBANJT3v8pnkth48bQo/fKel6uEYyboRtA5/uHuHkZ6FQF7OUkGogc -mSJluOdc5t6hI1VsLn0QZEjQZMEOWr+wKSMCQQCC4kXJEsHAve77oP6HtG/IiEn7 -kpyUXRNvFsDE0czpJJBvL/aRFUJxuRK91jhjC68sA7NsKMGg5OXb5I5Jj36xAkEA -gIT7aFOYBFwGgQAQkWNKLvySgKbAZRTeLBacpHMuQdl1DfdntvAyqpAZ0lY0RKmW -G6aFKaqQfOXKCyWoUiVknQJAXrlgySFci/2ueKlIE1QqIiLSZ8V8OlpFLRnb1pzI -7U1yQXnTAEFYM560yJlzUpOb1V4cScGd365tiSMvxLOvTA== ------END RSA PRIVATE KEY----- diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/test/test_rsa_privkey_encrypted.pem b/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/test/test_rsa_privkey_encrypted.pem deleted file mode 100644 index 08e76171..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/test/test_rsa_privkey_encrypted.pem +++ /dev/null @@ -1,18 +0,0 @@ ------BEGIN RSA PRIVATE KEY----- -Proc-Type: 4,ENCRYPTED -DEK-Info: AES-128-CBC,9D916E00476DFF9E70FA4BA9E3A6CB0E - -oj0VC35ShSEqlfJ0rLGgkqJCyIK+mXSsa/X/xAur+lI/RVOVTWd7oQQGTdI/0rLX -PdQR02Na3X9Rptezh6J04PfMGeFysxdT6RpC+rkHRPVbN0F4TqxSNNXzkwK70+EF -dSuDMyVKv9YN4wWDf0g6VKe4ShAH/sqICQBrVyzWyYLvH/hwZmZZ1QEab6ylIKtb -EJunwu9BxVVA04bbuATKkKjJOqDn0fG8hb4bYbyD02dJwgLePzzn36F31kcBCEHI -tESlD3RsS+EtfpfgPkplXNOhqYzkD9auDb7Zy+ZwL20fjnJb75OSGu8gOg3KTljt -mApZOg0nJ5Jk9ATAdyzyVSFOM1Hhcw12ws06Dq9KRnXgO6bbuadLTFRDdvSYDFvD -ijUb+97UolQfYIXQMqXli3EIvHr7CTWe/3mpoDgK1mtr0+923Bm97XgE7KSr0L46 -n5QpNjCZf1vbXldNmW+TRifiJMgtVdS7x0N4vqDPNEe+FelVv3U4Pz3HIOtFuWLr -ZCxlgVxJY4IsyYlV0ItQjIv8fJiAyemZdO2lA9K6h0eEF+9Apr3i79JGWUi74p5D -Ooak4le0Va9O34f6FxCGn/a54A6bhKu24Ub/0gr/e4WRa7693euEdgIAZXhtMu2Z -taU5SKjjXPzjmRCM2kINHTCENlaU4oFzTmj3TYY/jdKyNP1bHa07NhlomladkIHK -GD6HaYkcbuwvh8hOPsopSwuS+NqjnGPq9Vv4ecBC+9veDEmpIE1iR6FK9Hjrre88 -kLoMQNmA+vuc8jG4/FIHM3SauQiR1ZJ6+zkz97kcmOf+X7LRaS4j6lfFR6qHiJ6y ------END RSA PRIVATE KEY----- diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/test/test_rsa_pubkey.pem b/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/test/test_rsa_pubkey.pem deleted file mode 100644 index b3bbf6cb..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/test/test_rsa_pubkey.pem +++ /dev/null @@ -1,6 +0,0 @@ ------BEGIN PUBLIC KEY----- -MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDCFENGw33yGihy92pDjZQhl0C3 -6rPJj+CvfSC8+q28hxA161QFNUd13wuCTUcq0Qd2qsBe/2hFyc2DCJJg0h1L78+6 -Z4UMR7EOcpfdUE9Hf3m/hs+FUR45uBJeDK1HSFHD8bHKD6kv8FPGfJTotc+2xjJw -oYi+1hqp1fIekaxsyQIDAQAB ------END PUBLIC KEY----- diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/withPublic.js b/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/withPublic.js deleted file mode 100644 index abdbe35c..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/withPublic.js +++ /dev/null @@ -1,10 +0,0 @@ -var bn = require('bn.js'); -function withPublic(paddedMsg, key) { - return new Buffer(paddedMsg - .toRed(bn.mont(key.modulus)) - .redPow(new bn(key.publicExponent)) - .fromRed() - .toArray()); -} - -module.exports = withPublic; \ No newline at end of file diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/xor.js b/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/xor.js deleted file mode 100644 index aca81316..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/public-encrypt/xor.js +++ /dev/null @@ -1,8 +0,0 @@ -module.exports = function xor(a, b) { - var len = a.length; - var i = -1; - while (++i < len) { - a[i] ^= b[i]; - } - return a -}; \ No newline at end of file diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/randombytes/.travis.yml b/node_modules/browserify/node_modules/crypto-browserify/node_modules/randombytes/.travis.yml deleted file mode 100644 index f8eebd87..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/randombytes/.travis.yml +++ /dev/null @@ -1,15 +0,0 @@ -sudo: false -language: node_js -matrix: - include: - - node_js: '0.10' - env: TEST_SUITE=test - - node_js: '0.12' - env: TEST_SUITE=test - - node_js: '5' - env: TEST_SUITE=test - - node_js: '4' - env: TEST_SUITE=test - - node_js: '4' - env: TEST_SUITE=phantom -script: "npm run-script $TEST_SUITE" diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/randombytes/.zuul.yml b/node_modules/browserify/node_modules/crypto-browserify/node_modules/randombytes/.zuul.yml deleted file mode 100644 index 96d9cfbd..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/randombytes/.zuul.yml +++ /dev/null @@ -1 +0,0 @@ -ui: tape diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/randombytes/README.md b/node_modules/browserify/node_modules/crypto-browserify/node_modules/randombytes/README.md deleted file mode 100644 index 3bacba4d..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/randombytes/README.md +++ /dev/null @@ -1,14 +0,0 @@ -randombytes -=== - -[![Version](http://img.shields.io/npm/v/randombytes.svg)](https://www.npmjs.org/package/randombytes) [![Build Status](https://travis-ci.org/crypto-browserify/randombytes.svg?branch=master)](https://travis-ci.org/crypto-browserify/randombytes) - -randombytes from node that works in the browser. In node you just get crypto.randomBytes, but in the browser it uses .crypto/msCrypto.getRandomValues - -```js -var randomBytes = require('randombytes'); -randomBytes(16);//get 16 random bytes -randomBytes(16, function (err, resp) { - // resp is 16 random bytes -}); -``` diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/randombytes/browser.js b/node_modules/browserify/node_modules/crypto-browserify/node_modules/randombytes/browser.js deleted file mode 100644 index 1aa3edcc..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/randombytes/browser.js +++ /dev/null @@ -1,36 +0,0 @@ -'use strict' - -function oldBrowser () { - throw new Error('secure random number generation not supported by this browser\nuse chrome, FireFox or Internet Explorer 11') -} - -var crypto = global.crypto || global.msCrypto - -if (crypto && crypto.getRandomValues) { - module.exports = randomBytes -} else { - module.exports = oldBrowser -} - -function randomBytes (size, cb) { - // phantomjs needs to throw - if (size > 65536) throw new Error('requested too many random bytes') - // in case browserify isn't using the Uint8Array version - var rawBytes = new global.Uint8Array(size) - - // This will not work in older browsers. - // See https://developer.mozilla.org/en-US/docs/Web/API/window.crypto.getRandomValues - if (size > 0) { // getRandomValues fails on IE if size == 0 - crypto.getRandomValues(rawBytes) - } - // phantomjs doesn't like a buffer being passed here - var bytes = new Buffer(rawBytes.buffer) - - if (typeof cb === 'function') { - return process.nextTick(function () { - cb(null, bytes) - }) - } - - return bytes -} diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/randombytes/index.js b/node_modules/browserify/node_modules/crypto-browserify/node_modules/randombytes/index.js deleted file mode 100644 index a2d9e391..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/randombytes/index.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('crypto').randomBytes diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/randombytes/package.json b/node_modules/browserify/node_modules/crypto-browserify/node_modules/randombytes/package.json deleted file mode 100644 index 1096c011..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/randombytes/package.json +++ /dev/null @@ -1,76 +0,0 @@ -{ - "name": "randombytes", - "version": "2.0.3", - "description": "random bytes from browserify stand alone", - "main": "index.js", - "scripts": { - "test": "standard && node test.js | tspec", - "phantom": "zuul --phantom -- test.js", - "local": "zuul --local --no-coverage -- test.js" - }, - "repository": { - "type": "git", - "url": "git+ssh://git@github.com/crypto-browserify/randombytes.git" - }, - "keywords": [ - "crypto", - "random" - ], - "author": "", - "license": "MIT", - "bugs": { - "url": "https://github.com/crypto-browserify/randombytes/issues" - }, - "homepage": "https://github.com/crypto-browserify/randombytes", - "browser": "browser.js", - "devDependencies": { - "phantomjs": "^1.9.9", - "standard": "^3.3.0", - "tap-spec": "^2.1.2", - "tape": "^3.0.3", - "zuul": "^3.7.2" - }, - "gitHead": "f466c002a706ee11dadf3b6aa0a6e9bf1c37c82d", - "_id": "randombytes@2.0.3", - "_shasum": "674c99760901c3c4112771a31e521dc349cc09ec", - "_from": "randombytes@>=2.0.0 <3.0.0", - "_npmVersion": "3.6.0", - "_nodeVersion": "5.5.0", - "_npmUser": { - "name": "cwmma", - "email": "calvin.metcalf@gmail.com" - }, - "dist": { - "shasum": "674c99760901c3c4112771a31e521dc349cc09ec", - "tarball": "https://registry.npmjs.org/randombytes/-/randombytes-2.0.3.tgz" - }, - "maintainers": [ - { - "name": "cwmma", - "email": "calvin.metcalf@gmail.com" - }, - { - "name": "dcousens", - "email": "email@dcousens.com" - }, - { - "name": "dominictarr", - "email": "dominic.tarr@gmail.com" - }, - { - "name": "jprichardson", - "email": "jprichardson@gmail.com" - }, - { - "name": "indutny", - "email": "fedor@indutny.com" - } - ], - "_npmOperationalInternal": { - "host": "packages-13-west.internal.npmjs.com", - "tmp": "tmp/randombytes-2.0.3.tgz_1456944700918_0.5908831511624157" - }, - "directories": {}, - "_resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.0.3.tgz", - "readme": "ERROR: No README data found!" -} diff --git a/node_modules/browserify/node_modules/crypto-browserify/node_modules/randombytes/test.js b/node_modules/browserify/node_modules/crypto-browserify/node_modules/randombytes/test.js deleted file mode 100644 index 8e34dcaa..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/node_modules/randombytes/test.js +++ /dev/null @@ -1,56 +0,0 @@ -var test = require('tape') -var randomBytes = require('./') - -test('sync', function (t) { - t.plan(4) - t.equals(randomBytes(0).length, 0, 'len: ' + 0) - t.equals(randomBytes(3).length, 3, 'len: ' + 3) - t.equals(randomBytes(30).length, 30, 'len: ' + 30) - t.equals(randomBytes(300).length, 300, 'len: ' + 300) -}) - -test('async', function (t) { - t.plan(4) - - randomBytes(0, function (err, resp) { - if (err) throw err - - t.equals(resp.length, 0, 'len: ' + 0) - }) - - randomBytes(3, function (err, resp) { - if (err) throw err - - t.equals(resp.length, 3, 'len: ' + 3) - }) - - randomBytes(30, function (err, resp) { - if (err) throw err - - t.equals(resp.length, 30, 'len: ' + 30) - }) - - randomBytes(300, function (err, resp) { - if (err) throw err - - t.equals(resp.length, 300, 'len: ' + 300) - }) -}) - -if (process.browser) { - test('requesting to much throws', function (t) { - t.plan(1) - t.throws(function () { - randomBytes(65537) - }) - }) - - test('requesting to much throws async', function (t) { - t.plan(1) - t.throws(function () { - randomBytes(65537, function () { - t.ok(false, 'should not get here') - }) - }) - }) -} diff --git a/node_modules/browserify/node_modules/crypto-browserify/package.json b/node_modules/browserify/node_modules/crypto-browserify/package.json deleted file mode 100644 index ac6fe2e9..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/package.json +++ /dev/null @@ -1,90 +0,0 @@ -{ - "author": { - "name": "Dominic Tarr", - "email": "dominic.tarr@gmail.com", - "url": "dominictarr.com" - }, - "name": "crypto-browserify", - "description": "implementation of crypto for the browser", - "version": "3.11.0", - "homepage": "https://github.com/crypto-browserify/crypto-browserify", - "repository": { - "type": "git", - "url": "git://github.com/crypto-browserify/crypto-browserify.git" - }, - "scripts": { - "standard": "standard", - "test": "npm run standard && npm run unit", - "unit": "node test/", - "browser": "zuul --browser-version $BROWSER_VERSION --browser-name $BROWSER_NAME -- test/index.js" - }, - "engines": { - "node": "*" - }, - "dependencies": { - "browserify-cipher": "^1.0.0", - "browserify-sign": "^4.0.0", - "create-ecdh": "^4.0.0", - "create-hash": "^1.1.0", - "create-hmac": "^1.1.0", - "diffie-hellman": "^5.0.0", - "inherits": "^2.0.1", - "pbkdf2": "^3.0.3", - "public-encrypt": "^4.0.0", - "randombytes": "^2.0.0" - }, - "devDependencies": { - "hash-test-vectors": "~1.3.2", - "pseudorandombytes": "^2.0.0", - "standard": "^5.0.2", - "tape": "~2.3.2", - "zuul": "^3.6.0" - }, - "optionalDependencies": {}, - "browser": { - "crypto": false - }, - "license": "MIT", - "gitHead": "9fabcbd78209a99c7c624d1509d389b00e8d733f", - "bugs": { - "url": "https://github.com/crypto-browserify/crypto-browserify/issues" - }, - "_id": "crypto-browserify@3.11.0", - "_shasum": "3652a0906ab9b2a7e0c3ce66a408e957a2485522", - "_from": "crypto-browserify@>=3.0.0 <4.0.0", - "_npmVersion": "3.3.10", - "_nodeVersion": "4.2.1", - "_npmUser": { - "name": "cwmma", - "email": "calvin.metcalf@gmail.com" - }, - "dist": { - "shasum": "3652a0906ab9b2a7e0c3ce66a408e957a2485522", - "tarball": "https://registry.npmjs.org/crypto-browserify/-/crypto-browserify-3.11.0.tgz" - }, - "maintainers": [ - { - "name": "dominictarr", - "email": "dominic.tarr@gmail.com" - }, - { - "name": "cwmma", - "email": "calvin.metcalf@gmail.com" - }, - { - "name": "dcousens", - "email": "email@dcousens.com" - }, - { - "name": "jprichardson", - "email": "jprichardson@gmail.com" - }, - { - "name": "indutny", - "email": "fedor@indutny.com" - } - ], - "directories": {}, - "_resolved": "https://registry.npmjs.org/crypto-browserify/-/crypto-browserify-3.11.0.tgz", - "readme": "ERROR: No README data found!" -} diff --git a/node_modules/browserify/node_modules/crypto-browserify/test/aes.js b/node_modules/browserify/node_modules/crypto-browserify/test/aes.js deleted file mode 100644 index 916a0192..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/test/aes.js +++ /dev/null @@ -1,49 +0,0 @@ -var test = require('tape') -var crypto = require('browserify-cipher/browser') -var randomBytes = require('pseudorandombytes') - -function runIt (i) { - crypto.listCiphers().forEach(function (cipher) { - test('run: ' + i, function (t) { - t.test('ciphers: ' + cipher, function (t) { - t.plan(1) - var data = randomBytes(562) - var password = randomBytes(20) - var crypter = crypto.createCipher(cipher, password) - var decrypter = crypto.createDecipher(cipher, password) - var out = [] - out.push(decrypter.update(crypter.update(data))) - out.push(decrypter.update(crypter.final())) - if (cipher.indexOf('gcm') > -1) { - decrypter.setAuthTag(crypter.getAuthTag()) - } - out.push(decrypter.final()) - t.equals(data.toString('hex'), Buffer.concat(out).toString('hex')) - }) - }) - }) - if (i < 4) { - setTimeout(runIt, 0, i + 1) - } -} -runIt(1) -test('getCiphers', function (t) { - t.plan(1) - t.ok(crypto.getCiphers().length, 'get ciphers returns an array') -}) - -test('through crypto browserify works', function (t) { - t.plan(2) - var crypto = require('../') - var cipher = 'aes-128-ctr' - var data = randomBytes(562) - var password = randomBytes(20) - var crypter = crypto.createCipher(cipher, password) - var decrypter = crypto.createDecipher(cipher, password) - var out = [] - out.push(decrypter.update(crypter.update(data))) - out.push(decrypter.update(crypter.final())) - out.push(decrypter.final()) - t.equals(data.toString('hex'), Buffer.concat(out).toString('hex')) - t.ok(crypto.getCiphers().length, 'get ciphers returns an array') -}) diff --git a/node_modules/browserify/node_modules/crypto-browserify/test/create-hash.js b/node_modules/browserify/node_modules/crypto-browserify/test/create-hash.js deleted file mode 100644 index 33532fd7..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/test/create-hash.js +++ /dev/null @@ -1,50 +0,0 @@ -var test = require('tape') - -var algorithms = ['sha1', 'sha224', 'sha256', 'sha384', 'sha512', 'md5', 'rmd160'] -var encodings = ['hex', 'base64'] // FIXME: test binary -var vectors = require('hash-test-vectors') - -testLib('createHash in crypto-browserify', require('../').createHash) -testLib('create-hash/browser', require('create-hash/browser')) - -function testLib (name, createHash) { - algorithms.forEach(function (algorithm) { - runTest(name, createHash, algorithm) - }) -} -function runTest (name, createHash, algorithm) { - test(name + ' test ' + algorithm + ' against test vectors', function (t) { - run(0) - function run (i) { - if (i >= vectors.length) { - return t.end() - } - var obj = vectors[i] - - var input = new Buffer(obj.input, 'base64') - var node = obj[algorithm] - var js = createHash(algorithm).update(input).digest('hex') - if (js !== node) { - t.equal(js, node, algorithm + '(testVector[' + i + ']) == ' + node) - } - - encodings.forEach(function (encoding) { - var input = new Buffer(obj.input, 'base64').toString(encoding) - var node = obj[algorithm] - var js = createHash(algorithm).update(input, encoding).digest('hex') - if (js !== node) { - t.equal(js, node, algorithm + '(testVector[' + i + '], ' + encoding + ') == ' + node) - } - }) - input = new Buffer(obj.input, 'base64') - node = obj[algorithm] - var hash = createHash(algorithm) - hash.end(input) - js = hash.read().toString('hex') - if (js !== node) { - t.equal(js, node, algorithm + '(testVector[' + i + ']) == ' + node) - } - setTimeout(run, 0, i + 1) - } - }) -} diff --git a/node_modules/browserify/node_modules/crypto-browserify/test/create-hmac.js b/node_modules/browserify/node_modules/crypto-browserify/test/create-hmac.js deleted file mode 100644 index 08488ab7..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/test/create-hmac.js +++ /dev/null @@ -1,50 +0,0 @@ -var test = require('tape') - -var algorithms = ['sha1', 'sha224', 'sha256', 'sha384', 'sha512', 'md5', 'rmd160'] -var vectors = require('hash-test-vectors/hmac') -testLib('createHmac in crypto-browserify', require('../').createHmac) -testLib('create-hmac/browser', require('create-hmac/browser')) - -function testLib (name, createHmac) { - algorithms.forEach(function (alg) { - test(name + ' hmac(' + alg + ')', function (t) { - run(0) - function run (i) { - if (i >= vectors.length) { - return t.end() - } - var input = vectors[i] - var output = createHmac(alg, new Buffer(input.key, 'hex')) - .update(input.data, 'hex').digest() - - output = input.truncate ? output.slice(0, input.truncate) : output - output = output.toString('hex') - if (output !== input[alg]) { - t.equal(output, input[alg]) - } - setTimeout(run, 0, i + 1) - } - }) - - test('hmac(' + alg + ')', function (t) { - run(0) - function run (i) { - if (i >= vectors.length) { - return t.end() - } - var input = vectors[i] - var hmac = createHmac(alg, new Buffer(input.key, 'hex')) - - hmac.end(input.data, 'hex') - var output = hmac.read() - - output = input.truncate ? output.slice(0, input.truncate) : output - output = output.toString('hex') - if (output !== input[alg]) { - t.equal(output, input[alg]) - } - setTimeout(run, 0, i + 1) - } - }) - }) -} diff --git a/node_modules/browserify/node_modules/crypto-browserify/test/dh.js b/node_modules/browserify/node_modules/crypto-browserify/test/dh.js deleted file mode 100644 index 61fd0744..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/test/dh.js +++ /dev/null @@ -1,49 +0,0 @@ -var test = require('tape') -var crypto = require('diffie-hellman/browser') - -test('diffie-hellman mod groups', function (t) { - [ - 'modp1', 'modp2', 'modp5', 'modp14', 'modp15', 'modp16' - ].forEach(function (mod) { - t.test(mod, function (t) { - t.plan(3) - var dh1 = crypto.getDiffieHellman(mod) - var p1 = dh1.getPrime().toString('hex') - dh1.generateKeys() - var dh2 = crypto.getDiffieHellman(mod) - var p2 = dh2.getPrime().toString('hex') - dh2.generateKeys() - t.equals(p1, p2, 'equal primes') - var pubk1 = dh1.getPublicKey() - var pubk2 = dh2.getPublicKey() - t.notEquals(pubk1, pubk2, 'diff public keys') - var pub1 = dh1.computeSecret(pubk2).toString('hex') - var pub2 = dh2.computeSecret(dh1.getPublicKey()).toString('hex') - t.equals(pub1, pub2, 'equal secrets') - }) - }) -}) - -test('diffie-hellman key lengths', function (t) { - [ - 64, 65, 192 - ].forEach(function (len) { - t.test('' + len, function (t) { - t.plan(3) - var dh2 = crypto.createDiffieHellman(len) - var prime2 = dh2.getPrime() - var p2 = prime2.toString('hex') - var dh1 = crypto.createDiffieHellman(prime2) - var p1 = dh1.getPrime().toString('hex') - dh1.generateKeys() - dh2.generateKeys() - t.equals(p1, p2, 'equal primes') - var pubk1 = dh1.getPublicKey() - var pubk2 = dh2.getPublicKey() - t.notEquals(pubk1, pubk2, 'diff public keys') - var pub1 = dh1.computeSecret(pubk2).toString('hex') - var pub2 = dh2.computeSecret(dh1.getPublicKey()).toString('hex') - t.equals(pub1, pub2, 'equal secrets') - }) - }) -}) diff --git a/node_modules/browserify/node_modules/crypto-browserify/test/ecdh.js b/node_modules/browserify/node_modules/crypto-browserify/test/ecdh.js deleted file mode 100644 index 86b5aed5..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/test/ecdh.js +++ /dev/null @@ -1,61 +0,0 @@ -var mods = [ - 'secp256k1', - 'secp224r1', - 'prime256v1', - 'prime192v1' -] -var test = require('tape') -var _crypto = require('../') -var createECDH1 = _crypto.createECDH -var createECDH2 = require('create-ecdh/browser') - -mods.forEach(function (mod) { - test('createECDH: ' + mod + ' uncompressed', function (t) { - t.plan(2) - var dh1 = createECDH1(mod) - dh1.generateKeys() - var dh2 = createECDH2(mod) - dh2.generateKeys() - var pubk1 = dh1.getPublicKey() - var pubk2 = dh2.getPublicKey() - t.notEquals(pubk1.toString('hex'), pubk2.toString('hex'), 'diff public keys') - var pub1 = dh1.computeSecret(pubk2).toString('hex') - var pub2 = dh2.computeSecret(pubk1).toString('hex') - t.equals(pub1, pub2, 'equal secrets') - }) - - test('createECDH: ' + mod + ' compressed', function (t) { - t.plan(2) - var dh1 = createECDH1(mod) - dh1.generateKeys() - var dh2 = createECDH2(mod) - dh2.generateKeys() - var pubk1 = dh1.getPublicKey(null, 'compressed') - var pubk2 = dh2.getPublicKey(null, 'compressed') - t.notEquals(pubk1.toString('hex'), pubk2.toString('hex'), 'diff public keys') - var pub1 = dh1.computeSecret(pubk2).toString('hex') - var pub2 = dh2.computeSecret(pubk1).toString('hex') - t.equals(pub1, pub2, 'equal secrets') - }) - - test('createECDH: ' + mod + ' set stuff', function (t) { - t.plan(5) - var dh1 = createECDH1(mod) - var dh2 = createECDH2(mod) - dh1.generateKeys() - dh2.generateKeys() - dh1.setPrivateKey(dh2.getPrivateKey()) - dh1.setPublicKey(dh2.getPublicKey()) - var priv1 = dh1.getPrivateKey('hex') - var priv2 = dh2.getPrivateKey('hex') - t.equals(priv1, priv2, 'same private key') - var pubk1 = dh1.getPublicKey() - var pubk2 = dh2.getPublicKey() - t.equals(pubk1.toString('hex'), pubk2.toString('hex'), 'same public keys, uncompressed') - t.equals(dh1.getPublicKey('hex', 'compressed'), dh2.getPublicKey('hex', 'compressed'), 'same public keys compressed') - t.equals(dh1.getPublicKey('hex', 'hybrid'), dh2.getPublicKey('hex', 'hybrid'), 'same public keys hybrid') - var pub1 = dh1.computeSecret(pubk2).toString('hex') - var pub2 = dh2.computeSecret(pubk1).toString('hex') - t.equals(pub1, pub2, 'equal secrets') - }) -}) diff --git a/node_modules/browserify/node_modules/crypto-browserify/test/index.js b/node_modules/browserify/node_modules/crypto-browserify/test/index.js deleted file mode 100644 index 0a9d290b..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/test/index.js +++ /dev/null @@ -1,18 +0,0 @@ - -require('./create-hash') -require('./create-hmac') -if (!process.browser) { - require('./dh') -} - -require('./pbkdf2') -try { - require('randombytes')(8) - require('./ecdh') - require('./public-encrypt') - require('./random-bytes') - require('./sign') -} catch (e) { - console.log('no secure rng avaiable') -} -require('./aes') diff --git a/node_modules/browserify/node_modules/crypto-browserify/test/node/dh.js b/node_modules/browserify/node_modules/crypto-browserify/test/node/dh.js deleted file mode 100644 index 0b3aa710..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/test/node/dh.js +++ /dev/null @@ -1,51 +0,0 @@ -var test = require('tape') -var cryptoB = require('../../') -var crypto = require('crypto') - -test('diffie-hellman mod groups', function (t) { - [ - 'modp1', 'modp2', 'modp5', 'modp14', 'modp15', 'modp16' - ].forEach(function (mod) { - t.test(mod, function (t) { - t.plan(3) - var dh1 = cryptoB.getDiffieHellman(mod) - var p1 = dh1.getPrime().toString('hex') - dh1.generateKeys() - - var dh2 = crypto.getDiffieHellman(mod) - var p2 = dh2.getPrime().toString('hex') - dh2.generateKeys() - t.equals(p1, p2, 'equal primes') - var pubk1 = dh1.getPublicKey() - var pubk2 = dh2.getPublicKey() - t.notEquals(pubk1, pubk2, 'diff public keys') - var pub1 = dh1.computeSecret(pubk2).toString('hex') - var pub2 = dh2.computeSecret(pubk1).toString('hex') - t.equals(pub1, pub2, 'equal secrets') - }) - }) -}) - -test('diffie-hellman key lengths', function (t) { - [ - 64, 65, 192 - ].forEach(function (len) { - t.test('' + len, function (t) { - t.plan(3) - var dh2 = cryptoB.createDiffieHellman(len) - var prime2 = dh2.getPrime() - var p2 = prime2.toString('hex') - var dh1 = crypto.createDiffieHellman(prime2) - var p1 = dh1.getPrime().toString('hex') - dh1.generateKeys() - dh2.generateKeys() - t.equals(p1, p2, 'equal primes') - var pubk1 = dh1.getPublicKey() - var pubk2 = dh2.getPublicKey() - t.notEquals(pubk1, pubk2, 'diff public keys') - var pub1 = dh1.computeSecret(pubk2).toString('hex') - var pub2 = dh2.computeSecret(dh1.getPublicKey()).toString('hex') - t.equals(pub1, pub2, 'equal secrets') - }) - }) -}) diff --git a/node_modules/browserify/node_modules/crypto-browserify/test/pbkdf2.js b/node_modules/browserify/node_modules/crypto-browserify/test/pbkdf2.js deleted file mode 100644 index 084014ee..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/test/pbkdf2.js +++ /dev/null @@ -1,21 +0,0 @@ -var tape = require('tape') -var crypto = require('pbkdf2/browser') - -var vectors = require('hash-test-vectors/pbkdf2') - -tape('pbkdf2', function (t) { - vectors.forEach(function (input) { - // skip inputs that will take way too long - if (input.iterations > 10000) return - - var key = crypto.pbkdf2Sync(input.password, input.salt, input.iterations, input.length) - - if (key.toString('hex') !== input.sha1) { - console.log(input) - } - - t.equal(key.toString('hex'), input.sha1) - }) - - t.end() -}) diff --git a/node_modules/browserify/node_modules/crypto-browserify/test/public-encrypt.js b/node_modules/browserify/node_modules/crypto-browserify/test/public-encrypt.js deleted file mode 100644 index edb435c9..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/test/public-encrypt.js +++ /dev/null @@ -1,36 +0,0 @@ -var test = require('tape') -var crypto1 = require('../') -var rsa = { - 'private': '2d2d2d2d2d424547494e205253412050524956415445204b45592d2d2d2d2d0a4d4949456a77494241414b422f6779376d6a615767506546645659445a5752434139424e69763370506230657332372b464b593068737a4c614f7734374578430a744157704473483438545841667948425977424c67756179666b344c4749757078622b43474d62526f337845703043626659314a62793236543976476a5243310a666f484444554a4738347561526279487161663469367a74346756522b786c4145496a6b614641414b38634f6f58415431435671474c4c6c6a554363684c38500a6a61486a2f7972695a2f53377264776c49334c6e41427877776d4c726d522f7637315774706d4f2f614e47384e2b31706f2b5177616768546b79513539452f5a0a7641754f6b4657486f6b32712f523650594161326a645a397a696d3046714f502b6e6b5161454452624246426d4271547635664647666b32577341664b662f520a47302f5646642b5a654d353235315465547658483639356e6c53476175566c3941674d42414145436766344c725748592f6c35346f7554685a577676627275670a70667a36734a583267396c3779586d576c455773504543566f2f375355627059467074364f5a7939397a53672b494b624771574b6664686f4b725477495674430a4c30595a304e6c6d646e414e53497a30726f785147375a786b4c352b764853772f506d443978345577662b437a38684154436d4e42763171633630646b7975570a34434c71653732716154695657526f4f316961675167684e634c6f6f36765379363545784c614344545068613779753276773468465a705769456a57346478660a7246644c696978353242433836596c416c784d452f724c6738494a5676696c62796f39615764586d784f6155544c527636506b4644312f6756647738563951720a534c4e39466c4b326b6b6a695830647a6f6962765a7733744d6e74337979644178305838372b734d5256616843316270336b56507a3448793045575834514a2f0a504d33317647697549546b324e43643531445874314c746e324f503546614a536d4361456a6830586b5534716f7559796a585774384275364254436c327675610a466730556a6939432b496b504c6d61554d624d494f7761546b386357714c74685378734c6537304a354f6b477267664b554d2f772b4248483150742f506a7a6a0a432b2b6c306b6946614f5644566141563947704c504c43426f4b2f50433952622f72784d4d6f43434e774a2f4e5a756564496e793277334c4d69693737682f540a7a53766572674e47686a5936526e7661386c4c584a36646c726b6350417970733367577778716a344e5230542b474d3062445550564c62374d303758563753580a7637564a476d35324a625247774d3173732b72385854544e656d65476b2b5752784737546774734d715947584c66423851786b2f66352f4d63633030546c38750a7758464e7366784a786d7436416273547233673336774a2f49684f6e69627a3941642b6e63686c426e4e3351655733434b48717a61523138766f717674566d320a6b4a66484b31357072482f7353476d786d6945476772434a545a78744462614e434f372f56426a6e4b756455554968434177734c747571302f7a7562397641640a384731736366497076357161534e7a6d4b6f5838624f77417276725336775037794b726354737557496c484438724a5649374945446e516f5470354738664b310a68774a2f4d4968384d35763072356455594576366f494a5747636c65364148314a6d73503557496166677137325a32323838704863434648774e59384467394a0a3736517377564c6e556850546c6d6d33454f4f50474574616d32694144357230416679746c62346c624e6f51736a32737a65584f4e4458422b366f7565616a680a564e454c55723848635350356c677a525a6a4a57366146497a6a394c44526d516e55414f6a475358564f517445774a2f4d43515a374e2f763464494b654452410a3864385545785a332b674748756d7a697a7447524a30745172795a483250616b50354937562b316c377145556e4a3263336d462b65317634314570394c4376680a627a72504b773964786831386734622b37624d707357506e7372614b6836697078633761614f615a5630447867657a347a635a753050316f6c4f30634e334b4d0a6e784a305064733352386241684e43446453324a5a61527035513d3d0a2d2d2d2d2d454e44205253412050524956415445204b45592d2d2d2d2d0a', - 'public': '2d2d2d2d2d424547494e20525341205055424c4943204b45592d2d2d2d2d0a4d49494242674b422f6779376d6a615767506546645659445a5752434139424e69763370506230657332372b464b593068737a4c614f773437457843744157700a4473483438545841667948425977424c67756179666b344c4749757078622b43474d62526f337845703043626659314a62793236543976476a524331666f48440a44554a4738347561526279487161663469367a74346756522b786c4145496a6b614641414b38634f6f58415431435671474c4c6c6a554363684c38506a61486a0a2f7972695a2f53377264776c49334c6e41427877776d4c726d522f7637315774706d4f2f614e47384e2b31706f2b5177616768546b79513539452f5a7641754f0a6b4657486f6b32712f523650594161326a645a397a696d3046714f502b6e6b5161454452624246426d4271547635664647666b32577341664b662f5247302f560a46642b5a654d353235315465547658483639356e6c53476175566c3941674d424141453d0a2d2d2d2d2d454e4420525341205055424c4943204b45592d2d2d2d2d0a' -} -var crypto2 = require('public-encrypt/browser') -rsa.private = new Buffer(rsa.private, 'hex') -rsa.public = new Buffer(rsa.public, 'hex') -var encrypted = '0bcd6462ad7a563be2d42b0b73e0b0a163886304e7723b025f97605144fe1781e84acdc4031327d6bccd67fe13183e8fbdc8c5fe947b49d011ce3ebb08b11e83b87a77328ca57ee77cfdc78743b0749366643d7a21b2abcd4aa32dee9832938445540ee3007b7a70191c8dc9ff2ad76fe8dfaa5362d9d2c4b31a67b816d7b7970a293cb95bf3437a301bedb9f431b7075aa2f9df77b4385bea2a37982beda467260b384a58258b5eb4e36a0e0bf7dff83589636f5f97bf542084f0f76868c9f3f989a27fee5b8cd2bfee0bae1eae958df7c3184e5a40fda101196214f371606feca4330b221f30577804bbd4f61578a84e85dcd298849f509e630d275280' - -test('publicEncrypt/privateDecrypt', function (t) { - t.test('can decrypt', function (t) { - t.plan(2) - // note encryption is ranomized so can't test to see if they encrypt the same - t.equals(crypto1.privateDecrypt(rsa.private, new Buffer(encrypted, 'hex')).toString(), 'hello there I am a nice message', 'decrypt it properly') - t.equals(crypto2.privateDecrypt(rsa.private, new Buffer(encrypted, 'hex')).toString(), 'hello there I am a nice message', 'decrypt it properly') - }) - t.test('can round trip', function (t) { - t.plan(2) - var msg = 'this is a message' - // note encryption is ranomized so can't test to see if they encrypt the same - t.equals(crypto1.privateDecrypt(rsa.private, crypto2.publicEncrypt(rsa.public, new Buffer(msg))).toString(), msg, 'round trip it') - t.equals(crypto2.privateDecrypt(rsa.private, crypto1.publicEncrypt(rsa.public, new Buffer(msg))).toString(), msg, 'round trip it') - }) -}) - -test('privateEncrypt/publicDecrypt', function (t) { - t.test('can round trip', function (t) { - t.plan(2) - var msg = 'this is a message' - // note encryption is ranomized so can't test to see if they encrypt the same - t.equals(crypto1.publicDecrypt(rsa.public, crypto2.privateEncrypt(rsa.private, new Buffer(msg))).toString(), msg, 'round trip it') - t.equals(crypto2.publicDecrypt(rsa.public, crypto1.privateEncrypt(rsa.private, new Buffer(msg))).toString(), msg, 'round trip it') - }) -}) diff --git a/node_modules/browserify/node_modules/crypto-browserify/test/random-bytes.js b/node_modules/browserify/node_modules/crypto-browserify/test/random-bytes.js deleted file mode 100644 index 398af24a..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/test/random-bytes.js +++ /dev/null @@ -1,60 +0,0 @@ -var test = require('tape') -var crypto = require('../') - -var randomBytesFunctions = { - randomBytes: require('randombytes'), - pseudoRandomBytes: crypto.pseudoRandomBytes -} - -for (var randomBytesName in randomBytesFunctions) { - // Both randomBytes and pseudoRandomBytes should provide the same interface - var randomBytes = randomBytesFunctions[randomBytesName] - - test('get error message', function (t) { - try { - var b = randomBytes(10) - t.ok(Buffer.isBuffer(b)) - t.end() - } catch (err) { - t.ok(/not supported/.test(err.message), '"not supported" is in error message') - t.end() - } - }) - - test(randomBytesName, function (t) { - t.plan(5) - t.equal(randomBytes(10).length, 10) - t.ok(Buffer.isBuffer(randomBytes(10))) - randomBytes(10, function (ex, bytes) { - t.error(ex) - t.equal(bytes.length, 10) - t.ok(Buffer.isBuffer(bytes)) - t.end() - }) - }) - - test(randomBytesName + ' seem random', function (t) { - var L = 1000 - var b = randomBytes(L) - - var mean = [].reduce.call(b, function (a, b) { return a + b }, 0) / L - - // test that the random numbers are plausably random. - // Math.random() will pass this, but this will catch - // terrible mistakes such as this blunder: - // https://github.com/dominictarr/crypto-browserify/commit/3267955e1df7edd1680e52aeede9a89506ed2464#commitcomment-7916835 - - // this doesn't check that the bytes are in a random *order* - // but it's better than nothing. - - var expected = 256 / 2 - var smean = Math.sqrt(mean) - - // console.log doesn't work right on testling, *grumble grumble* - console.log(JSON.stringify([expected - smean, mean, expected + smean])) - t.ok(mean < expected + smean) - t.ok(mean > expected - smean) - - t.end() - }) -} diff --git a/node_modules/browserify/node_modules/crypto-browserify/test/sign.js b/node_modules/browserify/node_modules/crypto-browserify/test/sign.js deleted file mode 100644 index 7d67685c..00000000 --- a/node_modules/browserify/node_modules/crypto-browserify/test/sign.js +++ /dev/null @@ -1,59 +0,0 @@ -var test = require('tape') -var nodeCrypto = require('../') -var ourCrypto = require('browserify-sign/browser') - -var rsa = { - 'private': '2d2d2d2d2d424547494e205253412050524956415445204b45592d2d2d2d2d0a4d4949456a77494241414b422f6779376d6a615767506546645659445a5752434139424e69763370506230657332372b464b593068737a4c614f7734374578430a744157704473483438545841667948425977424c67756179666b344c4749757078622b43474d62526f337845703043626659314a62793236543976476a5243310a666f484444554a4738347561526279487161663469367a74346756522b786c4145496a6b614641414b38634f6f58415431435671474c4c6c6a554363684c38500a6a61486a2f7972695a2f53377264776c49334c6e41427877776d4c726d522f7637315774706d4f2f614e47384e2b31706f2b5177616768546b79513539452f5a0a7641754f6b4657486f6b32712f523650594161326a645a397a696d3046714f502b6e6b5161454452624246426d4271547635664647666b32577341664b662f520a47302f5646642b5a654d353235315465547658483639356e6c53476175566c3941674d42414145436766344c725748592f6c35346f7554685a577676627275670a70667a36734a583267396c3779586d576c455773504543566f2f375355627059467074364f5a7939397a53672b494b624771574b6664686f4b725477495674430a4c30595a304e6c6d646e414e53497a30726f785147375a786b4c352b764853772f506d443978345577662b437a38684154436d4e42763171633630646b7975570a34434c71653732716154695657526f4f316961675167684e634c6f6f36765379363545784c614344545068613779753276773468465a705769456a57346478660a7246644c696978353242433836596c416c784d452f724c6738494a5676696c62796f39615764586d784f6155544c527636506b4644312f6756647738563951720a534c4e39466c4b326b6b6a695830647a6f6962765a7733744d6e74337979644178305838372b734d5256616843316270336b56507a3448793045575834514a2f0a504d33317647697549546b324e43643531445874314c746e324f503546614a536d4361456a6830586b5534716f7559796a585774384275364254436c327675610a466730556a6939432b496b504c6d61554d624d494f7761546b386357714c74685378734c6537304a354f6b477267664b554d2f772b4248483150742f506a7a6a0a432b2b6c306b6946614f5644566141563947704c504c43426f4b2f50433952622f72784d4d6f43434e774a2f4e5a756564496e793277334c4d69693737682f540a7a53766572674e47686a5936526e7661386c4c584a36646c726b6350417970733367577778716a344e5230542b474d3062445550564c62374d303758563753580a7637564a476d35324a625247774d3173732b72385854544e656d65476b2b5752784737546774734d715947584c66423851786b2f66352f4d63633030546c38750a7758464e7366784a786d7436416273547233673336774a2f49684f6e69627a3941642b6e63686c426e4e3351655733434b48717a61523138766f717674566d320a6b4a66484b31357072482f7353476d786d6945476772434a545a78744462614e434f372f56426a6e4b756455554968434177734c747571302f7a7562397641640a384731736366497076357161534e7a6d4b6f5838624f77417276725336775037794b726354737557496c484438724a5649374945446e516f5470354738664b310a68774a2f4d4968384d35763072356455594576366f494a5747636c65364148314a6d73503557496166677137325a32323838704863434648774e59384467394a0a3736517377564c6e556850546c6d6d33454f4f50474574616d32694144357230416679746c62346c624e6f51736a32737a65584f4e4458422b366f7565616a680a564e454c55723848635350356c677a525a6a4a57366146497a6a394c44526d516e55414f6a475358564f517445774a2f4d43515a374e2f763464494b654452410a3864385545785a332b674748756d7a697a7447524a30745172795a483250616b50354937562b316c377145556e4a3263336d462b65317634314570394c4376680a627a72504b773964786831386734622b37624d707357506e7372614b6836697078633761614f615a5630447867657a347a635a753050316f6c4f30634e334b4d0a6e784a305064733352386241684e43446453324a5a61527035513d3d0a2d2d2d2d2d454e44205253412050524956415445204b45592d2d2d2d2d0a', - 'public': '2d2d2d2d2d424547494e20525341205055424c4943204b45592d2d2d2d2d0a4d49494242674b422f6779376d6a615767506546645659445a5752434139424e69763370506230657332372b464b593068737a4c614f773437457843744157700a4473483438545841667948425977424c67756179666b344c4749757078622b43474d62526f337845703043626659314a62793236543976476a524331666f48440a44554a4738347561526279487161663469367a74346756522b786c4145496a6b614641414b38634f6f58415431435671474c4c6c6a554363684c38506a61486a0a2f7972695a2f53377264776c49334c6e41427877776d4c726d522f7637315774706d4f2f614e47384e2b31706f2b5177616768546b79513539452f5a7641754f0a6b4657486f6b32712f523650594161326a645a397a696d3046714f502b6e6b5161454452624246426d4271547635664647666b32577341664b662f5247302f560a46642b5a654d353235315465547658483639356e6c53476175566c3941674d424141453d0a2d2d2d2d2d454e4420525341205055424c4943204b45592d2d2d2d2d0a' -} - -var ec = { - 'private': '2d2d2d2d2d424547494e2045432050524956415445204b45592d2d2d2d2d0a4d485143415145454944463658763853762f2f77475557442b6337383070704772553051645a5743417a78415150515838722f756f416347425375424241414b0a6f55514451674145495a656f7744796c6c73344b2f7766426a4f313862596f37674778386e595152696a6134652f71454d696b4f484a616937676565557265550a7235586b792f4178377332644774656773504e7350674765354d705176673d3d0a2d2d2d2d2d454e442045432050524956415445204b45592d2d2d2d2d0a', - 'public': '2d2d2d2d2d424547494e205055424c4943204b45592d2d2d2d2d0a4d465977454159484b6f5a497a6a3043415159464b34454541416f4451674145495a656f7744796c6c73344b2f7766426a4f313862596f37674778386e5951520a696a6134652f71454d696b4f484a616937676565557265557235586b792f4178377332644774656773504e7350674765354d705176673d3d0a2d2d2d2d2d454e44205055424c4943204b45592d2d2d2d2d0a' -} - -rsa.private = new Buffer(rsa.private, 'hex') -rsa.public = new Buffer(rsa.public, 'hex') -ec.private = new Buffer(ec.private, 'hex') -ec.public = new Buffer(ec.public, 'hex') - -function testit (keys, message, scheme) { - var pub = keys.public - var priv = keys.private - test(message.toString(), function (t) { - t.test('js sign and verify', function (t) { - t.plan(t) - var mySign = ourCrypto.createSign(scheme) - var mySig = mySign.update(message).sign(priv) - var myVer = ourCrypto.createVerify(scheme) - t.ok(myVer.update(message).verify(pub, mySig), 'validates') - }) - - t.test('node sign and verify', function (t) { - t.plan(t) - var mySign = nodeCrypto.createSign(scheme) - var mySig = mySign.update(message).sign(priv) - var myVer = nodeCrypto.createVerify(scheme) - t.ok(myVer.update(message).verify(pub, mySig), 'validates') - }) - - t.test('node sign and js verify', function (t) { - t.plan(t) - var mySign = nodeCrypto.createSign(scheme) - var mySig = mySign.update(message).sign(priv) - var myVer = ourCrypto.createVerify(scheme) - t.ok(myVer.update(message).verify(pub, mySig), 'validates') - }) - - t.test('js sign and node verify', function (t) { - t.plan(t) - var mySign = ourCrypto.createSign(scheme) - var mySig = mySign.update(message).sign(priv) - var myVer = nodeCrypto.createVerify(scheme) - t.ok(myVer.update(message).verify(pub, mySig), 'validates') - }) - }) -} - -testit(rsa, new Buffer('rsa with sha256'), 'RSA-SHA256') -testit(ec, new Buffer('ec with sha1'), 'ecdsa-with-SHA1') diff --git a/node_modules/browserify/node_modules/defined/.travis.yml b/node_modules/browserify/node_modules/defined/.travis.yml deleted file mode 100644 index 895dbd36..00000000 --- a/node_modules/browserify/node_modules/defined/.travis.yml +++ /dev/null @@ -1,4 +0,0 @@ -language: node_js -node_js: - - 0.6 - - 0.8 diff --git a/node_modules/browserify/node_modules/defined/LICENSE b/node_modules/browserify/node_modules/defined/LICENSE deleted file mode 100644 index ee27ba4b..00000000 --- a/node_modules/browserify/node_modules/defined/LICENSE +++ /dev/null @@ -1,18 +0,0 @@ -This software is released under the MIT license: - -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/node_modules/browserify/node_modules/defined/example/defined.js b/node_modules/browserify/node_modules/defined/example/defined.js deleted file mode 100644 index 7b5d982f..00000000 --- a/node_modules/browserify/node_modules/defined/example/defined.js +++ /dev/null @@ -1,4 +0,0 @@ -var defined = require('../'); -var opts = { y : false, w : 4 }; -var x = defined(opts.x, opts.y, opts.w, 8); -console.log(x); diff --git a/node_modules/browserify/node_modules/defined/index.js b/node_modules/browserify/node_modules/defined/index.js deleted file mode 100644 index f8a22198..00000000 --- a/node_modules/browserify/node_modules/defined/index.js +++ /dev/null @@ -1,5 +0,0 @@ -module.exports = function () { - for (var i = 0; i < arguments.length; i++) { - if (arguments[i] !== undefined) return arguments[i]; - } -}; diff --git a/node_modules/browserify/node_modules/defined/package.json b/node_modules/browserify/node_modules/defined/package.json deleted file mode 100644 index 5db2691b..00000000 --- a/node_modules/browserify/node_modules/defined/package.json +++ /dev/null @@ -1,87 +0,0 @@ -{ - "name": "defined", - "version": "1.0.0", - "description": "return the first argument that is `!== undefined`", - "main": "index.js", - "directories": { - "example": "example", - "test": "test" - }, - "dependencies": {}, - "devDependencies": { - "tape": "~3.5.0" - }, - "scripts": { - "test": "tape test/*.js" - }, - "testling": { - "files": "test/*.js", - "browsers": { - "ie": [ - 6, - 7, - 8, - 9 - ], - "ff": [ - 3.5, - 10, - 15 - ], - "chrome": [ - 10, - 22 - ], - "safari": [ - 5.1 - ], - "opera": [ - 12 - ] - } - }, - "repository": { - "type": "git", - "url": "git://github.com/substack/defined.git" - }, - "homepage": "https://github.com/substack/defined", - "keywords": [ - "undefined", - "short-circuit", - "||", - "or", - "//", - "defined-or" - ], - "author": { - "name": "James Halliday", - "email": "mail@substack.net", - "url": "http://substack.net" - }, - "license": "MIT", - "gitHead": "3a46c81d39b5f94c0c17c47638939af2528520f3", - "bugs": { - "url": "https://github.com/substack/defined/issues" - }, - "_id": "defined@1.0.0", - "_shasum": "c98d9bcef75674188e110969151199e39b1fa693", - "_from": "defined@>=1.0.0 <2.0.0", - "_npmVersion": "2.7.5", - "_nodeVersion": "0.12.0", - "_npmUser": { - "name": "substack", - "email": "mail@substack.net" - }, - "maintainers": [ - { - "name": "substack", - "email": "mail@substack.net" - } - ], - "dist": { - "shasum": "c98d9bcef75674188e110969151199e39b1fa693", - "tarball": "http://registry.npmjs.org/defined/-/defined-1.0.0.tgz" - }, - "_resolved": "https://registry.npmjs.org/defined/-/defined-1.0.0.tgz", - "readme": "ERROR: No README data found!" -} diff --git a/node_modules/browserify/node_modules/defined/readme.markdown b/node_modules/browserify/node_modules/defined/readme.markdown deleted file mode 100644 index 9616195d..00000000 --- a/node_modules/browserify/node_modules/defined/readme.markdown +++ /dev/null @@ -1,53 +0,0 @@ -# defined - -return the first argument that is `!== undefined` - -[![browser support](http://ci.testling.com/substack/defined.png)](http://ci.testling.com/substack/defined) - -[![build status](https://secure.travis-ci.org/substack/defined.png)](http://travis-ci.org/substack/defined) - -Most of the time when I chain together `||`s, I actually just want the first -item that is not `undefined`, not the first non-falsy item. - -This module is like the defined-or (`//`) operator in perl 5.10+. - -# example - -``` js -var defined = require('defined'); -var opts = { y : false, w : 4 }; -var x = defined(opts.x, opts.y, opts.w, 100); -console.log(x); -``` - -``` -$ node example/defined.js -false -``` - -The return value is `false` because `false` is the first item that is -`!== undefined`. - -# methods - -``` js -var defined = require('defined') -``` - -## var x = defined(a, b, c...) - -Return the first item in the argument list `a, b, c...` that is `!== undefined`. - -If all the items are `=== undefined`, return undefined. - -# install - -With [npm](https://npmjs.org) do: - -``` -npm install defined -``` - -# license - -MIT diff --git a/node_modules/browserify/node_modules/defined/test/def.js b/node_modules/browserify/node_modules/defined/test/def.js deleted file mode 100644 index 48da5171..00000000 --- a/node_modules/browserify/node_modules/defined/test/def.js +++ /dev/null @@ -1,22 +0,0 @@ -var defined = require('../'); -var test = require('tape'); - -test('defined-or', function (t) { - var u = undefined; - - t.equal(defined(), u, 'empty arguments'); - t.equal(defined(u), u, '1 undefined'); - t.equal(defined(u, u), u, '2 undefined'); - t.equal(defined(u, u, u, u), u, '4 undefineds'); - - t.equal(defined(undefined, false, true), false, 'false[0]'); - t.equal(defined(false, true), false, 'false[1]'); - t.equal(defined(undefined, 0, true), 0, 'zero[0]'); - t.equal(defined(0, true), 0, 'zero[1]'); - - t.equal(defined(3, undefined, 4), 3, 'first arg'); - t.equal(defined(undefined, 3, 4), 3, 'second arg'); - t.equal(defined(undefined, undefined, 3), 3, 'third arg'); - - t.end(); -}); diff --git a/node_modules/browserify/node_modules/defined/test/falsy.js b/node_modules/browserify/node_modules/defined/test/falsy.js deleted file mode 100644 index 6b7d623f..00000000 --- a/node_modules/browserify/node_modules/defined/test/falsy.js +++ /dev/null @@ -1,9 +0,0 @@ -var test = require('tape'); -var defined = require('../'); - -test('falsy', function (t) { - t.plan(1); - var opts = { y : false, w : 4 }; - var x = defined(opts.x, opts.y, opts.w, 8); - t.equal(x, false); -}); diff --git a/node_modules/browserify/node_modules/deps-sort/.travis.yml b/node_modules/browserify/node_modules/deps-sort/.travis.yml deleted file mode 100644 index 74c57bf1..00000000 --- a/node_modules/browserify/node_modules/deps-sort/.travis.yml +++ /dev/null @@ -1,8 +0,0 @@ -language: node_js -node_js: - - "0.8" - - "0.10" - - "0.12" - - "iojs" -before_install: - - npm install -g npm@~1.4.6 diff --git a/node_modules/browserify/node_modules/deps-sort/LICENSE b/node_modules/browserify/node_modules/deps-sort/LICENSE deleted file mode 100644 index ee27ba4b..00000000 --- a/node_modules/browserify/node_modules/deps-sort/LICENSE +++ /dev/null @@ -1,18 +0,0 @@ -This software is released under the MIT license: - -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/node_modules/browserify/node_modules/deps-sort/bin/cmd.js b/node_modules/browserify/node_modules/deps-sort/bin/cmd.js deleted file mode 100755 index e5461301..00000000 --- a/node_modules/browserify/node_modules/deps-sort/bin/cmd.js +++ /dev/null @@ -1,10 +0,0 @@ -#!/usr/bin/env node - -var argv = require('subarg')(process.argv.slice(2)); -var JSONStream = require('JSONStream'); - -var sort = require('../')(argv); -var parse = JSONStream.parse([ true ]); -var stringify = JSONStream.stringify(); - -process.stdin.pipe(parse).pipe(sort).pipe(stringify).pipe(process.stdout); diff --git a/node_modules/browserify/node_modules/deps-sort/example/sort.js b/node_modules/browserify/node_modules/deps-sort/example/sort.js deleted file mode 100644 index cfc00754..00000000 --- a/node_modules/browserify/node_modules/deps-sort/example/sort.js +++ /dev/null @@ -1,6 +0,0 @@ -var sort = require('../')(); -var JSONStream = require('JSONStream'); -var parse = JSONStream.parse([ true ]); -var stringify = JSONStream.stringify(); - -process.stdin.pipe(parse).pipe(sort).pipe(stringify).pipe(process.stdout); diff --git a/node_modules/browserify/node_modules/deps-sort/index.js b/node_modules/browserify/node_modules/deps-sort/index.js deleted file mode 100644 index 32cead40..00000000 --- a/node_modules/browserify/node_modules/deps-sort/index.js +++ /dev/null @@ -1,122 +0,0 @@ -var through = require('through2'); -var shasum = require('shasum'); - -module.exports = function (opts) { - if (!opts) opts = {}; - var rows = []; - return through.obj(write, end); - - function write (row, enc, next) { rows.push(row); next() } - - function end () { - var tr = this; - rows.sort(cmp); - sorter(rows, tr, opts); - } -}; - -function sorter (rows, tr, opts) { - var expose = opts.expose || {}; - if (Array.isArray(expose)) { - expose = expose.reduce(function (acc, key) { - acc[key] = true; - return acc; - }, {}); - } - - var hashes = {}, deduped = {}; - var sameDeps = depCmp(); - - if (opts.dedupe) { - rows.forEach(function (row) { - var h = shasum(row.source); - sameDeps.add(row, h); - if (hashes[h]) { - hashes[h].push(row); - } else { - hashes[h] = [row]; - } - }); - Object.keys(hashes).forEach(function (h) { - var rows = hashes[h]; - while (rows.length > 1) { - var row = rows.pop(); - row.dedupe = rows[0].id; - row.sameDeps = sameDeps.cmp(rows[0].deps, row.deps); - deduped[row.id] = rows[0].id; - } - }); - } - - if (opts.index) { - var index = {}; - var offset = 0; - rows.forEach(function (row, ix) { - if (has(expose, row.id)) { - row.index = row.id; - offset ++; - if (expose[row.id] !== true) { - index[expose[row.id]] = row.index; - } - } - else { - row.index = ix + 1 - offset; - } - index[row.id] = row.index; - }); - rows.forEach(function (row) { - row.indexDeps = {}; - Object.keys(row.deps).forEach(function (key) { - var id = row.deps[key]; - row.indexDeps[key] = index[id]; - }); - if (row.dedupe) { - row.dedupeIndex = index[row.dedupe]; - } - tr.push(row); - }); - } - else { - rows.forEach(function (row) { tr.push(row) }); - } - tr.push(null); -} - -function cmp (a, b) { - return a.id + a.hash < b.id + b.hash ? -1 : 1; -} - -function has (obj, key) { - return Object.prototype.hasOwnProperty.call(obj, key); -} - -function depCmp () { - var deps = {}, hashes = {}; - return { add: add, cmp: cmp } - - function add (row, hash) { - deps[row.id] = row.deps; - hashes[row.id] = hash; - } - function cmp (a, b, limit) { - if (!a && !b) return true; - if (!a || !b) return false; - - var keys = Object.keys(a); - if (keys.length !== Object.keys(b).length) return false; - - for (var i = 0; i < keys.length; i++) { - var k = keys[i], ka = a[k], kb = b[k]; - var ha = hashes[ka]; - var hb = hashes[kb]; - var da = deps[ka]; - var db = deps[kb]; - - if (ka === kb) continue; - if (ha !== hb || (!limit && !cmp(da, db, 1))) { - return false; - } - } - return true; - } -} diff --git a/node_modules/browserify/node_modules/deps-sort/package.json b/node_modules/browserify/node_modules/deps-sort/package.json deleted file mode 100644 index bd124e23..00000000 --- a/node_modules/browserify/node_modules/deps-sort/package.json +++ /dev/null @@ -1,72 +0,0 @@ -{ - "name": "deps-sort", - "version": "1.3.9", - "description": "sort module-deps output for deterministic browserify bundles", - "main": "index.js", - "bin": { - "deps-sort": "bin/cmd.js" - }, - "dependencies": { - "JSONStream": "^1.0.3", - "shasum": "^1.0.0", - "subarg": "^1.0.0", - "through2": "^1.0.0" - }, - "devDependencies": { - "tap": "^1.1.0" - }, - "scripts": { - "test": "tap test/*.js" - }, - "repository": { - "type": "git", - "url": "git://github.com/substack/deps-sort.git" - }, - "homepage": "https://github.com/substack/deps-sort", - "keywords": [ - "dependency", - "graph", - "browser", - "browserify", - "module-deps", - "browser-pack", - "sorted", - "determinism" - ], - "author": { - "name": "James Halliday", - "email": "mail@substack.net", - "url": "http://substack.net" - }, - "license": "MIT", - "gitHead": "34043da3d9dd4732f975765741127163283f8fcd", - "bugs": { - "url": "https://github.com/substack/deps-sort/issues" - }, - "_id": "deps-sort@1.3.9", - "_shasum": "29dfff53e17b36aecae7530adbbbf622c2ed1a71", - "_from": "deps-sort@>=1.3.7 <2.0.0", - "_npmVersion": "2.10.1", - "_nodeVersion": "0.10.38", - "_npmUser": { - "name": "zertosh", - "email": "zertosh@gmail.com" - }, - "maintainers": [ - { - "name": "substack", - "email": "substack@gmail.com" - }, - { - "name": "zertosh", - "email": "zertosh@gmail.com" - } - ], - "dist": { - "shasum": "29dfff53e17b36aecae7530adbbbf622c2ed1a71", - "tarball": "https://registry.npmjs.org/deps-sort/-/deps-sort-1.3.9.tgz" - }, - "directories": {}, - "_resolved": "https://registry.npmjs.org/deps-sort/-/deps-sort-1.3.9.tgz", - "readme": "ERROR: No README data found!" -} diff --git a/node_modules/browserify/node_modules/deps-sort/readme.markdown b/node_modules/browserify/node_modules/deps-sort/readme.markdown deleted file mode 100644 index 873210b8..00000000 --- a/node_modules/browserify/node_modules/deps-sort/readme.markdown +++ /dev/null @@ -1,83 +0,0 @@ -# deps-sort - -sort [module-deps](https://npmjs.org/package/module-deps) output for deterministic -browserify bundles - -[![build status](https://secure.travis-ci.org/substack/deps-sort.png)](http://travis-ci.org/substack/deps-sort) - -# example - -## command-line - -``` -$ for((i=0;i<5;i++)); do module-deps main.js | deps-sort | browser-pack | md5sum; done -e9e630de2c62953140357db0444c3c3a - -e9e630de2c62953140357db0444c3c3a - -e9e630de2c62953140357db0444c3c3a - -e9e630de2c62953140357db0444c3c3a - -e9e630de2c62953140357db0444c3c3a - -``` - -or using `browserify --deps` on a [voxeljs](http://voxeljs.com/) project: - -``` -$ for((i=0;i<5;i++)); do browserify --deps browser.js | deps-sort | browser-pack | md5sum; done -fb418c74b53ba2e4cef7d01808b848e6 - -fb418c74b53ba2e4cef7d01808b848e6 - -fb418c74b53ba2e4cef7d01808b848e6 - -fb418c74b53ba2e4cef7d01808b848e6 - -fb418c74b53ba2e4cef7d01808b848e6 - -``` - -## api - -To use this module programmatically, write streaming object data and read -streaming object data: - -``` js -var sort = require('../')(); -var JSONStream = require('JSONStream'); -var parse = JSONStream.parse([ true ]); -var stringify = JSONStream.stringify(); - -process.stdin.pipe(parse).pipe(sort).pipe(stringify).pipe(process.stdout); -``` - -# methods - -``` js -var depsSort = require('deps-sort'); -``` - -## var stream = depsSort(opts) - -Return a new through `stream` that should get written -[module-deps](https://npmjs.org/package/module-deps) objects and will output -sorted objects. - -`opts` can be: - -* `opts.index` - when true, for each module-deps row, insert `row.index` with -the numeric index and `row.indexDeps` like `row.deps` but mapping require -strings to row indices - -* `opts.expose` - array of names or object mapping names to `true` not to mangle -with integer indexes when `opts.index` is turned on. If `opts.expose` maps names -to strings, those strings will be used to resolve the indexed references. - -* `opts.dedupe` - set `row.dedupe` for files that match existing contents. Sets -`row.dedupeIndex` when `opts.index` is enabled. When `row.dedupe` is set, -`row.sameDeps` will be set to a boolean of whether the dependencies at the -dedupe target match (true) or just the source content (false). - -# install - -With [npm](https://npmjs.org) do: - -``` -npm install deps-sort -``` - -# license - -MIT diff --git a/node_modules/browserify/node_modules/deps-sort/test/dedupe-deps-of-deps.js b/node_modules/browserify/node_modules/deps-sort/test/dedupe-deps-of-deps.js deleted file mode 100644 index f0849c59..00000000 --- a/node_modules/browserify/node_modules/deps-sort/test/dedupe-deps-of-deps.js +++ /dev/null @@ -1,71 +0,0 @@ -var sort = require('../'); -var test = require('tap').test; -var through = require('through2'); - -test('dedupe-deps-of-deps', function (t) { - t.plan(1); - var s = sort({ dedupe: true }); - var rows = []; - function write (row, enc, next) { rows.push(row); next() } - function end () { - t.deepEqual(rows, [ - { - id: '/bar.js', - deps: { baz: '/bar/baz.js' }, - source: 'TWO' - }, - { - id: '/bar/baz.js', - deps: {}, - source: 'THREE' - }, - { - id: '/foo.js', - deps: { baz: '/foo/baz.js' }, - source: 'TWO', - dedupe: '/bar.js', - sameDeps: true - }, - { - id: '/foo/baz.js', - deps: {}, - source: 'THREE', - dedupe: '/bar/baz.js', - sameDeps: true - }, - { - id: '/main.js', - deps: { './foo': '/foo.js', './bar': '/bar.js' }, - source: 'ONE' - } - ]); - } - s.pipe(through.obj(write, end)); - - s.write({ - id: '/main.js', - deps: { './foo': '/foo.js', './bar': '/bar.js' }, - source: 'ONE' - }); - s.write({ - id: '/foo.js', - deps: { baz : '/foo/baz.js' }, - source: 'TWO' - }); - s.write({ - id: '/bar.js', - deps: { baz : '/bar/baz.js' }, - source: 'TWO' - }); - s.write({ - id: '/foo/baz.js', - deps: {}, - source: 'THREE' - }); - s.write({ - id: '/bar/baz.js', - deps: {}, - source: 'THREE' - }); - s.end(); -}); diff --git a/node_modules/browserify/node_modules/deps-sort/test/dedupe.js b/node_modules/browserify/node_modules/deps-sort/test/dedupe.js deleted file mode 100644 index e5b0ef3c..00000000 --- a/node_modules/browserify/node_modules/deps-sort/test/dedupe.js +++ /dev/null @@ -1,39 +0,0 @@ -var sort = require('../'); -var test = require('tap').test; -var through = require('through2'); - -test('dedupe', function (t) { - t.plan(1); - var s = sort({ dedupe: true }); - var rows = []; - function write (row, enc, next) { rows.push(row); next() } - function end () { - t.deepEqual(rows, [ - { id: '/bar.js', deps: {}, source: 'TWO' }, - { id: '/foo.js', deps: {}, source: 'TWO', dedupe: '/bar.js', sameDeps: true }, - { - id: '/main.js', - deps: { './foo': '/foo.js', './bar': '/bar.js' }, - source: 'ONE' - } - ]); - } - s.pipe(through.obj(write, end)); - - s.write({ - id: '/main.js', - deps: { './foo': '/foo.js', './bar': '/bar.js' }, - source: 'ONE' - }); - s.write({ - id: '/foo.js', - deps: {}, - source: 'TWO' - }); - s.write({ - id: '/bar.js', - deps: {}, - source: 'TWO' - }); - s.end(); -}); diff --git a/node_modules/browserify/node_modules/deps-sort/test/dedupe_index.js b/node_modules/browserify/node_modules/deps-sort/test/dedupe_index.js deleted file mode 100644 index 313b7442..00000000 --- a/node_modules/browserify/node_modules/deps-sort/test/dedupe_index.js +++ /dev/null @@ -1,56 +0,0 @@ -var sort = require('../'); -var test = require('tap').test; -var through = require('through2'); - -test('dedupe index', function (t) { - t.plan(1); - var s = sort({ dedupe: true, index: true }); - var rows = []; - function write (row, enc, next) { rows.push(row); next() } - function end () { - t.deepEqual(rows, [ - { - id: '/bar.js', - deps: {}, - source: 'TWO', - index: 1, - indexDeps: {} - }, - { - id: '/foo.js', - deps: {}, - source: 'TWO', - dedupe: '/bar.js', - index: 2, - indexDeps: {}, - dedupeIndex: 1, - sameDeps: true - }, - { - id: '/main.js', - deps: { './foo': '/foo.js', './bar': '/bar.js' }, - source: 'ONE', - index: 3, - indexDeps: { './foo': 2, './bar': 1 }, - } - ]); - } - s.pipe(through.obj(write, end)); - - s.write({ - id: '/main.js', - deps: { './foo': '/foo.js', './bar': '/bar.js' }, - source: 'ONE' - }); - s.write({ - id: '/foo.js', - deps: {}, - source: 'TWO' - }); - s.write({ - id: '/bar.js', - deps: {}, - source: 'TWO' - }); - s.end(); -}); diff --git a/node_modules/browserify/node_modules/deps-sort/test/dedupe_undef.js b/node_modules/browserify/node_modules/deps-sort/test/dedupe_undef.js deleted file mode 100644 index 3a9f987e..00000000 --- a/node_modules/browserify/node_modules/deps-sort/test/dedupe_undef.js +++ /dev/null @@ -1,37 +0,0 @@ -var sort = require('../'); -var test = require('tap').test; -var through = require('through2'); - -test('dedupe undef', function (t) { - t.plan(1); - var s = sort({ dedupe: true }); - var rows = []; - function write (row, enc, next) { rows.push(row); next() } - function end () { - t.deepEqual(rows, [ - { id: '/bar.js', source: 'TWO' }, - { id: '/foo.js', source: 'TWO', dedupe: '/bar.js', sameDeps: true }, - { - id: '/main.js', - deps: { './foo': '/foo.js', './bar': '/bar.js' }, - source: 'ONE' - } - ]); - } - s.pipe(through.obj(write, end)); - - s.write({ - id: '/main.js', - deps: { './foo': '/foo.js', './bar': '/bar.js' }, - source: 'ONE' - }); - s.write({ - id: '/foo.js', - source: 'TWO' - }); - s.write({ - id: '/bar.js', - source: 'TWO' - }); - s.end(); -}); diff --git a/node_modules/browserify/node_modules/deps-sort/test/expose.js b/node_modules/browserify/node_modules/deps-sort/test/expose.js deleted file mode 100644 index 7beb90d8..00000000 --- a/node_modules/browserify/node_modules/deps-sort/test/expose.js +++ /dev/null @@ -1,38 +0,0 @@ -var sort = require('../'); -var test = require('tap').test; -var through = require('through2'); - -test('expose true', function (t) { - t.plan(1); - var s = sort({ index: true, expose: [ '/foo.js', '/bar.js' ] }); - var rows = []; - function write (row, enc, next) { rows.push(row); next() } - function end () { - t.deepEqual(rows, [ - { - id: '/bar.js', - deps: {}, - index: '/bar.js', - indexDeps: {} - }, - { - id: '/foo.js', - deps: { './bar': '/bar.js' }, - index: '/foo.js', - indexDeps: { './bar': '/bar.js' } - }, - { - id: '/main.js', - deps: { './foo': '/foo.js' }, - index: 1, - indexDeps: { './foo': '/foo.js' } - }, - ]); - } - s.pipe(through.obj(write, end)); - - s.write({ id: '/main.js', deps: { './foo': '/foo.js' } }); - s.write({ id: '/foo.js', deps: { './bar': '/bar.js' } }); - s.write({ id: '/bar.js', deps: {} }); - s.end(); -}); diff --git a/node_modules/browserify/node_modules/deps-sort/test/expose_str.js b/node_modules/browserify/node_modules/deps-sort/test/expose_str.js deleted file mode 100644 index 9ba151ef..00000000 --- a/node_modules/browserify/node_modules/deps-sort/test/expose_str.js +++ /dev/null @@ -1,44 +0,0 @@ -var sort = require('../'); -var test = require('tap').test; -var through = require('through2'); - -test('expose string', function (t) { - t.plan(1); - var s = sort({ - index: true, - expose: { - 'f': '/foo.js', - 'b': '/bar.js' - } - }); - var rows = []; - function write (row, enc, next) { rows.push(row); next() } - function end () { - t.deepEqual(rows, [ - { - id: '/main.js', - deps: { './foo': '/foo.js' }, - index: 1, - indexDeps: { './foo': 'f' } - }, - { - id: 'b', - deps: {}, - index: 'b', - indexDeps: {} - }, - { - id: 'f', - deps: { './bar': '/bar.js' }, - index: 'f', - indexDeps: { './bar': 'b' } - } - ]); - } - s.pipe(through.obj(write, end)); - - s.write({ id: '/main.js', deps: { './foo': '/foo.js' } }); - s.write({ id: 'f', deps: { './bar': '/bar.js' } }); - s.write({ id: 'b', deps: {} }); - s.end(); -}); diff --git a/node_modules/browserify/node_modules/deps-sort/test/indexed.js b/node_modules/browserify/node_modules/deps-sort/test/indexed.js deleted file mode 100644 index f47ea8c1..00000000 --- a/node_modules/browserify/node_modules/deps-sort/test/indexed.js +++ /dev/null @@ -1,38 +0,0 @@ -var sort = require('../'); -var test = require('tap').test; -var through = require('through2'); - -test('indexed', function (t) { - t.plan(1); - var s = sort({ index: true }); - var rows = []; - function write (row, enc, next) { rows.push(row); next() } - function end () { - t.deepEqual(rows, [ - { - id: '/bar.js', - deps: {}, - index: 1, - indexDeps: {} - }, - { - id: '/foo.js', - deps: { './bar': '/bar.js' }, - index: 2, - indexDeps: { './bar': 1 } - }, - { - id: '/main.js', - deps: { './foo': '/foo.js' }, - index: 3, - indexDeps: { './foo': 2 } - }, - ]); - } - s.pipe(through.obj(write, end)); - - s.write({ id: '/main.js', deps: { './foo': '/foo.js' } }); - s.write({ id: '/foo.js', deps: { './bar': '/bar.js' } }); - s.write({ id: '/bar.js', deps: {} }); - s.end(); -}); diff --git a/node_modules/browserify/node_modules/deps-sort/test/sort.js b/node_modules/browserify/node_modules/deps-sort/test/sort.js deleted file mode 100644 index 7c600d4b..00000000 --- a/node_modules/browserify/node_modules/deps-sort/test/sort.js +++ /dev/null @@ -1,23 +0,0 @@ -var sort = require('../'); -var test = require('tap').test; -var through = require('through2'); - -test('sort', function (t) { - t.plan(1); - var s = sort(); - var rows = []; - function write (row, enc, next) { rows.push(row); next() } - function end () { - t.deepEqual(rows, [ - { id: '/bar.js', deps: {} }, - { id: '/foo.js', deps: { './bar': '/bar.js' } }, - { id: '/main.js', deps: { './foo': '/foo.js' } } - ]); - } - s.pipe(through.obj(write, end)); - - s.write({ id: '/main.js', deps: { './foo': '/foo.js' } }); - s.write({ id: '/foo.js', deps: { './bar': '/bar.js' } }); - s.write({ id: '/bar.js', deps: {} }); - s.end(); -}); diff --git a/node_modules/browserify/node_modules/domain-browser/.eslintrc.js b/node_modules/browserify/node_modules/domain-browser/.eslintrc.js deleted file mode 100644 index b6238861..00000000 --- a/node_modules/browserify/node_modules/domain-browser/.eslintrc.js +++ /dev/null @@ -1,701 +0,0 @@ -// 2015 December 1 -// https://github.com/bevry/base -// http://eslint.org -/* eslint no-warning-comments: 0 */ -'use strict' - -const IGNORE = 0, WARN = 1, ERROR = 2, MAX_PARAMS = 4 - -module.exports = { - // parser: 'babel-eslint', - // ^ the bundled ESLINT parser is now actually quite good, and supports the ecmaFeatures property - ecmaFeatures: { - // this property only works with the bundled ESLINT parser, not babel-eslint - arrowFunctions: true, - binaryLiterals: true, - blockBindings: true, - classes: true, - defaultParams: true, - destructuring: true, - forOf: true, - generators: true, - modules: false, // Disabled due to https://twitter.com/balupton/status/671519915795345410 - objectLiteralComputedProperties: true, - objectLiteralDuplicateProperties: true, - objectLiteralShorthandMethods: true, - objectLiteralShorthandProperties: true, - octalLiterals: true, - regexUFlag: true, - regexYFlag: true, - restParams: true, - spread: true, - superInFunctions: true, - templateStrings: true, - unicodeCodePointEscapes: true, - globalReturn: true, - jsx: true, - experimentalObjectRestSpread: true - }, - env: { - browser: true, - node: true, - es6: true, - commonjs: true, - amd: true - }, - rules: { - // ---------------------------- - // Problems with these rules - // If we can figure out how to enable the following, that would be great - - // Two spaces after one line if or else: - // if ( blah ) return - // Insead of one space: - // if ( blah ) return - - // No spaces on embedded function: - // .forEach(function(key, value){ - // instead of: - // .forEach(function (key, value) { - - // Else and catch statements on the same line as closing brace: - // } else { - // } catch (e) { - // instead of: - // } - // else { - - - // -------------------------------------- - // Possible Errors - // The following rules point out areas where you might have made mistakes. - - // ES6 supports dangling commas - 'comma-dangle': IGNORE, - - // Don't allow assignments in conditional statements (if, while, etc.) - 'no-cond-assign': [ERROR, 'always'], - - // Warn but don't error about console statements - 'no-console': WARN, - - // Allow while(true) loops - 'no-constant-condition': IGNORE, - - // Seems like a good idea to error about this - 'no-control-regex': ERROR, - - // Warn but don't error about console statements - 'no-debugger': WARN, - - // Don't allow duplicate arguments in a function, they can cause errors - 'no-dupe-args': ERROR, - - // Disallow duplicate keys in an object, they can cause errors - 'no-dupe-keys': ERROR, - - // Disallow duplicate case statements in a switch - 'no-duplicate-case': ERROR, - - // Disallow empty [] in regular expressions as they cause unexpected behaviour - 'no-empty-character-class': ERROR, - - // Allow empty block statements, they are useful for clarity - 'no-empty': IGNORE, - - // Overwriting the exception argument in a catch statement can cause memory leaks in some browsers - 'no-ex-assign': ERROR, - - // Disallow superflous boolean casts, they offer no value - 'no-extra-boolean-cast': ERROR, - - // Allow superflous parenthesis as they offer clarity in some cases - 'no-extra-parens': IGNORE, - - // Disallow superflous semicolons, they offer no value - 'no-extra-semi': IGNORE, - - // Seems like a good idea to error about this - 'no-func-assign': ERROR, - - // Seems like a good idea to error about this - 'no-inner-declarations': ERROR, - - // Seems like a good idea to error about this - 'no-invalid-regexp': ERROR, - - // Seems like a good idea to error about this - 'no-irregular-whitespace': ERROR, - - // Seems like a good idea to error about this - 'no-negated-in-lhs': ERROR, - - // Seems like a good idea to error about this - 'no-obj-calls': ERROR, - - // Seems like a good idea to error about this - // Instead of / / used / {ERROR}/ instead - 'no-regex-spaces': ERROR, - - // Seems like a good idea to error about this - 'no-sparse-arrays': ERROR, - - // Seems like a good idea to error about this - 'no-unexpected-multiline': ERROR, - - // Seems like a good idea to error about this - 'no-unreachable': ERROR, - - // Seems like a good idea to error about this - 'use-isnan': ERROR, - - // We use YUIdoc, not JSDoc - 'valid-jsdoc': IGNORE, - - // Seems like a good idea to error about this - 'valid-typeof': ERROR, - - - // -------------------------------------- - // Best Practices - // These are rules designed to prevent you from making mistakes. They either prescribe a better way of doing something or help you avoid footguns. - - // Meh - 'accessor-pairs': IGNORE, - - // This rule seems buggy - 'block-scoped-var': IGNORE, - - // Disable complexity checks, they are annoying and not that useful in detecting actual complexity - 'complexity': IGNORE, - - // We use blank returns for break statements - 'consistent-return': IGNORE, - - // Always require curly braces unless the statement is all on a single line - 'curly': [ERROR, 'multi-line'], - - // If we don't have a default cause, it probably means we should throw an error - 'default-case': ERROR, - - // Dots should be on the newlines - // chainableThingy - // .doSomething() - // .doSomethingElse() - 'dot-location': [ERROR, 'property'], - - // Use dot notation where possible - 'dot-notation': ERROR, - - // Unless you are doing == null, then force === to avoid truthy/falsey mistakes - 'eqeqeq': [ERROR, 'allow-null'], - - // Always use hasOwnProperty when doing for in - 'guard-for-in': ERROR, - - // Warn about alert statements in our code - // Use one of the suggested alternatives instead - // Reasoning is they could be mistaken for left over debugging statements - 'no-alert': WARN, - - // They are very slow - 'no-caller': ERROR, - - // Wow... - 'no-case-declarations': ERROR, - - // Seems like a good idea to error about this - 'no-div-regex': ERROR, - - // Returns in else statements offer code clarity, so disable this rule - 'no-else-return': IGNORE, - - // Seems like a good idea to error about this - 'no-empty-label': ERROR, - - // Seems sensible - 'no-empty-pattern': ERROR, - - // We know that == null is a null and undefined check - 'no-eq-null': IGNORE, - - // Eval is slow and unsafe, use vm's instead - 'no-eval': ERROR, - - // There is never a good reason for this - 'no-extend-native': ERROR, - - // Don't allow useless binds - 'no-extra-bind': ERROR, - - // Don't allow switch case statements to follow through, use continue keyword instead - 'no-fallthrough': ERROR, - - // Use zero when doing decimals, otherwise it is confusing - 'no-floating-decimal': ERROR, - - // Cleverness is unclear - 'no-implicit-coercion': ERROR, - - // A sneaky way to do evals - 'no-implied-eval': ERROR, - - // This throws for a lot of senseless things, like chainy functions - 'no-invalid-this': IGNORE, - - // Use proper iterators instead - 'no-iterator': ERROR, - - // We never use this, it seems silly to allow this - 'no-labels': ERROR, - - // We never use this, it seems silly to allow this - 'no-lone-blocks': ERROR, - - // Loop functions always cause problems, as the scope isn't clear through iterations - 'no-loop-func': ERROR, - - // This is a great idea - // Although ignore -1 and 0 as it is common with indexOf - 'no-magic-numbers': [WARN, { ignore: [-1, 0] }], - - // We like multi spaces for clarity - // E.g. We like - // if ( blah ) return foo - // Instead of: - // if ( blah ) return foo - // @TODO would be great to enforce the above - 'no-multi-spaces': IGNORE, - - // Use ES6 template strings instead - 'no-multi-str': ERROR, - - // Would be silly to allow this - 'no-native-reassign': ERROR, - - // We never use this, it seems silly to allow this - 'no-new-func': ERROR, - - // We never use this, it seems silly to allow this - 'no-new-wrappers': ERROR, - - // We never use this, it seems silly to allow this - 'no-new': ERROR, - - // We never use this, it seems silly to allow this - 'no-octal-escape': ERROR, - - // We never use this, it seems silly to allow this - 'no-octal': ERROR, - - // We got to be pretty silly if we don't realise we are doing this - // As such, take any usage as intentional and aware - 'no-param-reassign': IGNORE, - - // We use process.env wisely - 'no-process-env': IGNORE, - - // We never use this, it seems silly to allow this - 'no-proto': ERROR, - - // We never use this, it seems silly to allow this - 'no-redeclare': ERROR, - - // We never use this, it seems silly to allow this - 'no-return-assign': ERROR, - - // We never use this, it seems silly to allow this - 'no-script-url': ERROR, - - // We never use this, it seems silly to allow this - 'no-self-compare': ERROR, - - // We never use this, it seems silly to allow this - 'no-sequences': ERROR, - - // We always want proper error objects as they have stack traces and respond to instanceof Error checks - 'no-throw-literal': ERROR, - - // We never use this, it seems silly to allow this - 'no-unused-expressions': ERROR, - - // Seems sensible - 'no-useless-call': ERROR, - - // Seems sensible - 'no-useless-concat': ERROR, - - // We never use this, it seems silly to allow this - 'no-void': ERROR, - - // Warn about todos - 'no-warning-comments': [WARN, { terms: ['todo', 'fixme'], location: 'anywhere' }], - - // We never use this, it seems silly to allow this - 'no-with': ERROR, - - // Always specify a radix to avoid errors - 'radix': ERROR, - - // We appreciate the clarity late defines offer - 'vars-on-top': IGNORE, - - // Wrap instant called functions in parenthesis for clearer intent - 'wrap-iife': ERROR, - - // Because we force === and never allow assignments in conditions - // we have no need for yoda statements, so disable them - 'yoda': [ERROR, 'never'], - - - // -------------------------------------- - // Strict Mode - // These rules relate to using strict mode. - - // Ensure that use strict is specified to prevent the runtime erorr: - // SyntaxError: Block-scoped declarations (let, const, function, class) not yet supported outside strict mode - 'strict': [ERROR, 'global'], - - - // -------------------------------------- - // Variables - // These rules have to do with variable declarations. - - // We don't care - 'init-declaration': IGNORE, - - // Don't allow the catch method to shadow objects as browsers handle this differently - // Update: We don't care for IE8 - 'no-catch-shadow': IGNORE, - - // Don't use delete, it disables optimisations - 'no-delete-var': ERROR, - - // We never use this, it seems silly to allow this - 'no-label-var': ERROR, - - // We never use this, it seems silly to allow this - 'no-shadow-restricted-names': ERROR, - - // We use shadowing - 'no-shadow': IGNORE, - - // Makes sense - 'no-undef-init': ERROR, - - // Error when an undefined variable is used - 'no-undef': ERROR, - - // typeof blah === 'undefined' should always be used - 'no-undefined': ERROR, - - // Warn us when we don't use something - 'no-unused-vars': WARN, - - // Error when we try and use something before it is defined - 'no-use-before-define': ERROR, - - - // -------------------------------------- - // Node.js and CommonJS - // These rules are specific to JavaScript running on Node.js or using CommonJS in the browser. - - // Seems to difficult to enforce - 'callback-return': IGNORE, - - // We use require where it is appropriate to use it - 'global-require': IGNORE, - - // Force handling of callback errors - 'handle-callback-err': ERROR, - - // @TODO decide if this is good or not - 'no-mixed-requires': ERROR, - - // Disallow error prone syntax - 'no-new-require': ERROR, - - // Always use path.join for windows support - 'no-path-concat': ERROR, - - // We know what we are doing - 'no-process-exit': IGNORE, - - // No need to disallow any modules - 'no-restricted-modules': IGNORE, - - // Sometimes sync methods are useful, so warn but don't error - 'no-sync': WARN, - - - // -------------------------------------- - // Stylistic - // These rules are purely matters of style and are quite subjective. - - // We don't use spaces with brackets - 'array-bracket-spacing': [ERROR, 'never'], - - // Disallow or enforce spaces inside of single line blocks - 'block-spacing': [ERROR, 'always'], - - // Opening brace on same line, closing brace on its own line, except when statement is a single line - 'brace-style': [ERROR, 'stroustrup', { allowSingleLine: true }], - - // Use camel case - 'camelcase': ERROR, - - // Require a comma after always - 'comma-spacing': [ERROR, { before: false, after: true }], - - // Commas go last, we have tooling to detect if we forget a comma - 'comma-style': [ERROR, 'last'], - - // Require or disallow padding inside computed properties - 'computed-property-spacing': [ERROR, 'never'], - - // Enabling this was incredibly annoying when doing layers of nesting - 'consistent-this': IGNORE, - - // Enable to make UNIX people's lives easier - 'eol-last': ERROR, - - // We like anonymous functions - 'func-names': IGNORE, - - // Prefer to define functions via variables - 'func-style': [WARN, 'declaration'], - - // Sometimes short names are appropriate - 'id-length': IGNORE, - - // Camel case handles this for us - 'id-match': IGNORE, - - // Use tabs and indent case blocks - 'indent': [ERROR, 'tab', { SwitchCase: WARN }], - - // Prefer double qoutes for JSX properties:
    , - 'jsx-quotes': [ERROR, 'prefer-double'], - - // Space after the colon - 'key-spacing': [ERROR, { - beforeColon: false, - afterColon: true - }], - - // Enforce unix line breaks - 'linebreak-style': [ERROR, 'unix'], - - // Enforce new lines before block comments - 'lines-around-comment': [ERROR, { beforeBlockComment: true, allowBlockStart: true }], - - // Disabled to ensure consistency with complexity option - 'max-depth': IGNORE, - - // We use soft wrap - 'max-len': IGNORE, - - // We are smart enough to know if this is bad or not - 'max-nested-callbacks': IGNORE, - - // Sometimes we have no control over this for compat reasons, so just warn - 'max-params': [WARN, MAX_PARAMS], - - // We should be able to use whatever feels right - 'max-statements': IGNORE, - - // Constructors should be CamelCase - 'new-cap': ERROR, - - // Always use parens when instantiating a class - 'new-parens': ERROR, - - // Too difficult to enforce correctly as too many edge-cases - 'newline-after-var': IGNORE, - - // Don't use the array constructor when it is not needed - 'no-array-constructor': ERROR, - - // We never use bitwise, they are too clever - 'no-bitwise': ERROR, - - // We use continue - 'no-continue': IGNORE, - - // We like inline comments - 'no-inline-comments': IGNORE, - - // The code could be optimised if this error occurs - 'no-lonely-if': ERROR, - - // Don't mix spaces and tabs - // @TODO maybe [ERROR, 'smart-tabs'] will be better, we will see - 'no-mixed-spaces-and-tabs': ERROR, - - // We use multiple empty lines for styling - 'no-multiple-empty-lines': IGNORE, - - // Sometimes it is more understandable with a negated condition - 'no-negated-condition': IGNORE, - - // Sometimes these are useful - 'no-nested-ternary': IGNORE, - - // Use {} instead of new Object() - 'no-new-object': ERROR, - - // We use plus plus - 'no-plusplus': IGNORE, - - // Handled by other rules - 'no-restricted-syntax': IGNORE, - - // We never use this, it seems silly to allow this - 'no-spaced-func': ERROR, - - // Sometimes ternaries are useful - 'no-ternary': IGNORE, - - // Disallow trailing spaces - 'no-trailing-spaces': ERROR, - - // Sometimes this is useful when avoiding shadowing - 'no-underscore-dangle': IGNORE, - - // Sensible - 'no-unneeded-ternary': ERROR, - - // Desirable, but too many edge cases it turns out where it is actually preferred - 'object-curly-spacing': IGNORE, // [ERROR, 'always'], - - // We like multiple var statements - 'one-var': IGNORE, - - // Force use of shorthands when available - 'operator-assignment': [ERROR, 'always'], - - // Should be before, but not with =, *=, /=, += lines - // @TODO figure out how to enforce - 'operator-linebreak': IGNORE, - - // This rule doesn't appear to work correclty - 'padded-blocks': IGNORE, - - // Seems like a good idea to error about this - 'quote-props': [ERROR, 'consistent-as-needed'], - - // Use single quotes where escaping isn't needed - 'quotes': [ERROR, 'single', 'avoid-escape'], - - // We use YUIdoc - 'require-jsdoc': IGNORE, - - // If semi's are used, then add spacing after - 'semi-spacing': [ERROR, { before: false, after: true }], - - // Never use semicolons - 'semi': [ERROR, 'never'], - - // We don't care if our vars are alphabetical - 'sort-vars': IGNORE, - - // Always force a space after a keyword - 'space-after-keywords': [ERROR, 'always'], - - // Always force a space before a { - 'space-before-blocks': [ERROR, 'always'], - - // function () {, get blah () { - 'space-before-function-paren': [ERROR, 'always'], - - // We do this - 'space-before-keywords': [ERROR, 'always'], - - // This is for spacing between [], so [ WARN, ERROR, 3 ] which we don't want - 'space-in-brackets': IGNORE, - - // This is for spacing between (), so doSomething( WARN, ERROR, 3 ) or if ( WARN === 3 ) - // which we want for ifs, but don't want for calls - 'space-in-parens': IGNORE, - - // We use this - 'space-infix-ops': ERROR, - - // We use this - 'space-return-throw-case': ERROR, - - // We use this - 'space-unary-ops': ERROR, - - // We use this - // 'spaced-line-comment': ERROR, - 'spaced-comment': ERROR, - - // We use this - // @TODO revise this - 'wrap-regex': ERROR, - - - // -------------------------------------- - // ECMAScript 6 - - // Sensible to create more informed and clear code - 'arrow-body-style': [ERROR, 'as-needed'], - - // We do this, no reason why, just what we do - 'arrow-parens': [ERROR, 'always'], - - // Require consistent spacing for arrow functions - 'arrow-spacing': ERROR, - - // Makes sense as otherwise runtime error will occur - 'constructor-super': ERROR, - - // Seems the most consistent location for it - 'generator-star-spacing': [ERROR, 'before'], - - // Seems sensible - 'no-arrow-condition': ERROR, - - // Seems sensible - 'no-class-assign': ERROR, - - // Makes sense as otherwise runtime error will occur - 'no-const-assign': ERROR, - - // Makes sense as otherwise runtime error will occur - 'no-dupe-class-members': ERROR, - - // Makes sense as otherwise runtime error will occur - 'no-this-before-super': ERROR, - - // @TODO This probably should be an error - // however it is useful for: for ( var key in obj ) { - // which hopefully is more performant than let (@TODO check if it actually is more performant) - 'no-var': WARN, - - // Enforce ES6 object shorthand - 'object-shorthand': ERROR, - - // Better performance when running native - // but horrible performance if not running native as could fallback to bind - // https://travis-ci.org/bevry/es6-benchmarks - 'prefer-arrow-callback': IGNORE, - - // Sure, why not - 'prefer-const': WARN, - - // Controversial change, but makes sense to move towards to reduce the risk of bad people overwriting apply and call - // https://github.com/eslint/eslint/issues/ERROR939 - 'prefer-reflect': WARN, - - // Sure, why not - 'prefer-spread': ERROR, - - // Too annoying to enforce - 'prefer-template': IGNORE, - - // Makes sense - 'require-yield': ERROR - } -} diff --git a/node_modules/browserify/node_modules/domain-browser/.npmignore b/node_modules/browserify/node_modules/domain-browser/.npmignore deleted file mode 100644 index 27859c14..00000000 --- a/node_modules/browserify/node_modules/domain-browser/.npmignore +++ /dev/null @@ -1,44 +0,0 @@ -# 2015 September 18 -# https://github.com/bevry/base - -# Temp Files -**/.docpad.db -**/out.* -**/*.log -**/*.cpuprofile -**/*.heapsnapshot - -# Build Files -build/ -components/ -bower_components/ -node_modules/ - -# Private Files -.env - -# Development Files -.editorconfig -.eslintrc -.jshintrc -.jscrc -coffeelint.json -.travis* -nakefile.js -Cakefile -Makefile -BACKERS.md -CONTRIBUTING.md -HISTORY.md -**/src/ -**/test/ - -# Other Package Definitions -template.js -component.json -bower.json - -# ===================================== -# CUSTOM MODIFICATIONS - -# None diff --git a/node_modules/browserify/node_modules/domain-browser/HISTORY.md b/node_modules/browserify/node_modules/domain-browser/HISTORY.md deleted file mode 100644 index 758a44fc..00000000 --- a/node_modules/browserify/node_modules/domain-browser/HISTORY.md +++ /dev/null @@ -1,42 +0,0 @@ -# History - -## v1.1.7 2015 December 12 -- Revert minimum node version from 0.12 back to 0.4 - - Thanks to [Alexander Sorokin](https://github.com/syrnick) for [this comment](https://github.com/bevry/domain-browser/commit/c66ee3445e87955e70d0d60d4515f2d26a81b9c4#commitcomment-14938325) - -## v1.1.6 2015 December 12 -- Fixed `assert-helpers` sneaking into `dependencies` - - Thanks to [Bogdan Chadkin](https://github.com/TrySound) for [Pull Request #8](https://github.com/bevry/domain-browser/pull/8) - -## v1.1.5 2015 December 9 -- Updated internal conventions -- Added better jspm support - - Thanks to [Guy Bedford](https://github.com/guybedford) for [Pull Request #7](https://github.com/bevry/domain-browser/pull/7) - -## v1.1.4 2015 February 3 -- Added - - `domain.enter()` - - `domain.exit()` - - `domain.bind()` - - `domain.intercept()` - -## v1.1.3 2014 October 10 -- Added - - `domain.add()` - - `domain.remove()` - -## v1.1.2 2014 June 8 -- Added `domain.createDomain()` alias - - Thanks to [James Halliday](https://github.com/substack) for [Pull Request #1](https://github.com/bevry/domain-browser/pull/1) - -## v1.1.1 2013 December 27 -- Fixed `domain.create()` not returning anything - -## v1.1.0 2013 November 1 -- Dropped component.io and bower support, just use ender or browserify - -## v1.0.1 2013 September 18 -- Now called `domain-browser` everywhere - -## v1.0.0 2013 September 18 -- Initial release diff --git a/node_modules/browserify/node_modules/domain-browser/LICENSE.md b/node_modules/browserify/node_modules/domain-browser/LICENSE.md deleted file mode 100644 index 08d8802a..00000000 --- a/node_modules/browserify/node_modules/domain-browser/LICENSE.md +++ /dev/null @@ -1,23 +0,0 @@ - - -

    License

    - -Unless stated otherwise all works are: - -
    - -and licensed under: - - - -

    MIT License

    - -
    -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/node_modules/browserify/node_modules/domain-browser/README.md b/node_modules/browserify/node_modules/domain-browser/README.md deleted file mode 100644 index 43502eff..00000000 --- a/node_modules/browserify/node_modules/domain-browser/README.md +++ /dev/null @@ -1,111 +0,0 @@ - - -

    domain-browser

    - - - - - - -Travis CI Build Status -NPM version -NPM downloads -Dependency Status -Dev Dependency Status -
    -Slack community badge -Patreon donate button -Gratipay donate button -Flattr donate button -PayPal donate button -Bitcoin donate button -Wishlist browse button - - - - - - -Node's domain module for the web browser. This is merely an evented try...catch with the same API as node, nothing more. - - - - - - -

    Install

    - -

    NPM

      -
    • Install: npm install --save domain-browser
    • -
    • Use: require('domain-browser')
    - -

    Browserify

      -
    • Install: npm install --save domain-browser
    • -
    • Use: require('domain-browser')
    • -
    • CDN URL: //wzrd.in/bundle/domain-browser@1.1.7
    - -

    Ender

      -
    • Install: ender add domain-browser
    • -
    • Use: require('domain-browser')
    - - - - - - -

    History

    - -Discover the release history by heading on over to the HISTORY.md file. - - - - - - -

    Backers

    - -

    Maintainers

    - -These amazing people are maintaining this project: - - - -

    Sponsors

    - -No sponsors yet! Will you be the first? - -Patreon donate button -Gratipay donate button -Flattr donate button -PayPal donate button -Bitcoin donate button -Wishlist browse button - -

    Contributors

    - -These amazing people have contributed code to this project: - - - -Discover how you can contribute by heading on over to the CONTRIBUTING.md file. - - - - - - -

    License

    - -Unless stated otherwise all works are: - - - -and licensed under: - - - - diff --git a/node_modules/browserify/node_modules/domain-browser/index.js b/node_modules/browserify/node_modules/domain-browser/index.js deleted file mode 100644 index f6cd7f7d..00000000 --- a/node_modules/browserify/node_modules/domain-browser/index.js +++ /dev/null @@ -1,69 +0,0 @@ -// This file should be ES5 compatible -/* eslint prefer-spread:0, no-var:0, prefer-reflect:0, no-magic-numbers:0 */ -'use strict' -module.exports = (function () { - // Import Events - var events = require('events') - - // Export Domain - var domain = {} - domain.createDomain = domain.create = function () { - var d = new events.EventEmitter() - - function emitError (e) { - d.emit('error', e) - } - - d.add = function (emitter) { - emitter.on('error', emitError) - } - d.remove = function (emitter) { - emitter.removeListener('error', emitError) - } - d.bind = function (fn) { - return function () { - var args = Array.prototype.slice.call(arguments) - try { - fn.apply(null, args) - } - catch (err) { - emitError(err) - } - } - } - d.intercept = function (fn) { - return function (err) { - if ( err ) { - emitError(err) - } - else { - var args = Array.prototype.slice.call(arguments, 1) - try { - fn.apply(null, args) - } - catch (err) { - emitError(err) - } - } - } - } - d.run = function (fn) { - try { - fn() - } - catch (err) { - emitError(err) - } - return this - } - d.dispose = function () { - this.removeAllListeners() - return this - } - d.enter = d.exit = function () { - return this - } - return d - } - return domain -}).call(this) diff --git a/node_modules/browserify/node_modules/domain-browser/package.json b/node_modules/browserify/node_modules/domain-browser/package.json deleted file mode 100644 index 77618954..00000000 --- a/node_modules/browserify/node_modules/domain-browser/package.json +++ /dev/null @@ -1,148 +0,0 @@ -{ - "name": "domain-browser", - "version": "1.1.7", - "description": "Node's domain module for the web browser. This is merely an evented try...catch with the same API as node, nothing more.", - "homepage": "https://github.com/bevry/domain-browser", - "license": "MIT", - "badges": { - "list": [ - "travisci", - "npmversion", - "npmdownloads", - "daviddm", - "daviddmdev", - "---", - "slackin", - "patreon", - "gratipay", - "flattr", - "paypal", - "bitcoin", - "wishlist" - ], - "config": { - "patreonUsername": "bevry", - "gratipayUsername": "bevry", - "flattrCode": "344188/balupton-on-Flattr", - "paypalButtonID": "QB8GQPZAH84N6", - "bitcoinURL": "https://bevry.me/bitcoin", - "wishlistURL": "https://bevry.me/wishlist", - "slackinURL": "https://slack.bevry.me" - } - }, - "keywords": [ - "domain", - "trycatch", - "try", - "catch", - "node-compat", - "ender.js", - "component", - "component.io", - "umd", - "amd", - "require.js", - "browser" - ], - "author": { - "name": "2013+ Bevry Pty Ltd", - "email": "us@bevry.me", - "url": "http://bevry.me" - }, - "maintainers": [ - { - "name": "balupton", - "email": "b@lupton.cc" - }, - { - "name": "substack", - "email": "mail@substack.net" - }, - { - "name": "evansolomon", - "email": "evan@evanalyze.com" - } - ], - "contributors": [ - { - "name": "Benjamin Lupton", - "email": "b@lupton.cc", - "url": "http://balupton.com" - }, - { - "name": "Evan Solomon", - "url": "http://evansolomon.me" - }, - { - "name": "James Halliday", - "email": "substack@gmail.com", - "url": "http://substack.net/" - }, - { - "name": "Guy Bedford", - "email": "guybedford@gmail.com", - "url": "twitter.com/guybedford" - }, - { - "name": "Bogdan Chadkin", - "email": "trysound@yandex.ru", - "url": "https://github.com/TrySound" - } - ], - "bugs": { - "url": "https://github.com/bevry/domain-browser/issues" - }, - "repository": { - "type": "git", - "url": "git+ssh://git@github.com/bevry/domain-browser.git" - }, - "engines": { - "node": ">=0.4", - "npm": ">=1.2" - }, - "browsers": true, - "main": "./index.js", - "jspm": { - "map": { - "./index.js": { - "node": "@node/domain" - } - } - }, - "dependencies": {}, - "devDependencies": { - "assert-helpers": "^4.1.0", - "eslint": "^1.10.3", - "joe": "^1.6.0", - "joe-reporter-console": "^1.2.1", - "projectz": "^1.0.8" - }, - "scripts": { - "clean": "node --harmony nakefile.js clean", - "setup": "node --harmony nakefile.js setup", - "compile": "node --harmony nakefile.js compile", - "watch": "node --harmony nakefile.js watch", - "verify": "node --harmony nakefile.js verify", - "meta": "node --harmony nakefile.js meta", - "prepare": "node --harmony nakefile.js prepare", - "release": "node --harmony nakefile.js release", - "test": "node --harmony ./test.js" - }, - "gitHead": "9b7f0590a10569078b1b3b5c33f201f0a59d9822", - "_id": "domain-browser@1.1.7", - "_shasum": "867aa4b093faa05f1de08c06f4d7b21fdf8698bc", - "_from": "domain-browser@>=1.1.0 <1.2.0", - "_npmVersion": "3.5.1", - "_nodeVersion": "5.2.0", - "_npmUser": { - "name": "balupton", - "email": "b@lupton.cc" - }, - "dist": { - "shasum": "867aa4b093faa05f1de08c06f4d7b21fdf8698bc", - "tarball": "https://registry.npmjs.org/domain-browser/-/domain-browser-1.1.7.tgz" - }, - "directories": {}, - "_resolved": "https://registry.npmjs.org/domain-browser/-/domain-browser-1.1.7.tgz", - "readme": "ERROR: No README data found!" -} diff --git a/node_modules/browserify/node_modules/domain-browser/test.js b/node_modules/browserify/node_modules/domain-browser/test.js deleted file mode 100644 index 70efcfcf..00000000 --- a/node_modules/browserify/node_modules/domain-browser/test.js +++ /dev/null @@ -1,100 +0,0 @@ -/* eslint handle-callback-err:0, no-magic-numbers:0, no-unused-vars:0 */ -'use strict' - -// Import -const events = require('events') -const equal = require('assert-helpers').equal -const joe = require('joe') -const domain = require('./') - -// ===================================== -// Tests - -joe.describe('domain-browser', function (describe, it) { - it('should work on throws', function (done) { - const d = domain.create() - d.on('error', function (err) { - equal(err && err.message, 'a thrown error', 'error message') - done() - }) - d.run(function () { - throw new Error('a thrown error') - }) - }) - - it('should be able to add emitters', function (done) { - const d = domain.create() - const emitter = new events.EventEmitter() - - d.add(emitter) - d.on('error', function (err) { - equal(err && err.message, 'an emitted error', 'error message') - done() - }) - - emitter.emit('error', new Error('an emitted error')) - }) - - it('should be able to remove emitters', function (done) { - const emitter = new events.EventEmitter() - const d = domain.create() - let domainGotError = false - - d.add(emitter) - d.on('error', function (err) { - domainGotError = true - }) - - emitter.on('error', function (err) { - equal(err && err.message, 'This error should not go to the domain', 'error message') - - // Make sure nothing race condition-y is happening - setTimeout(function () { - equal(domainGotError, false, 'no domain error') - done() - }, 0) - }) - - d.remove(emitter) - emitter.emit('error', new Error('This error should not go to the domain')) - }) - - it('bind should work', function (done) { - const d = domain.create() - d.on('error', function (err) { - equal(err && err.message, 'a thrown error', 'error message') - done() - }) - d.bind(function (err, a, b) { - equal(err && err.message, 'a passed error', 'error message') - equal(a, 2, 'value of a') - equal(b, 3, 'value of b') - throw new Error('a thrown error') - })(new Error('a passed error'), 2, 3) - }) - - it('intercept should work', function (done) { - const d = domain.create() - let count = 0 - d.on('error', function (err) { - if ( count === 0 ) { - equal(err && err.message, 'a thrown error', 'error message') - } - else if ( count === 1 ) { - equal(err && err.message, 'a passed error', 'error message') - done() - } - count++ - }) - - d.intercept(function (a, b) { - equal(a, 2, 'value of a') - equal(b, 3, 'value of b') - throw new Error('a thrown error') - })(null, 2, 3) - - d.intercept(function (a, b) { - throw new Error('should never reach here') - })(new Error('a passed error'), 2, 3) - }) -}) diff --git a/node_modules/browserify/node_modules/duplexer2/.npmignore b/node_modules/browserify/node_modules/duplexer2/.npmignore deleted file mode 100644 index 07e6e472..00000000 --- a/node_modules/browserify/node_modules/duplexer2/.npmignore +++ /dev/null @@ -1 +0,0 @@ -/node_modules diff --git a/node_modules/browserify/node_modules/duplexer2/.travis.yml b/node_modules/browserify/node_modules/duplexer2/.travis.yml deleted file mode 100644 index 6e5919de..00000000 --- a/node_modules/browserify/node_modules/duplexer2/.travis.yml +++ /dev/null @@ -1,3 +0,0 @@ -language: node_js -node_js: - - "0.10" diff --git a/node_modules/browserify/node_modules/duplexer2/LICENSE.md b/node_modules/browserify/node_modules/duplexer2/LICENSE.md deleted file mode 100644 index 547189a6..00000000 --- a/node_modules/browserify/node_modules/duplexer2/LICENSE.md +++ /dev/null @@ -1,26 +0,0 @@ -Copyright (c) 2013, Deoxxa Development -====================================== -All rights reserved. --------------------- - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: -1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. -3. Neither the name of Deoxxa Development nor the names of its contributors - may be used to endorse or promote products derived from this software - without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY DEOXXA DEVELOPMENT ''AS IS'' AND ANY -EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL DEOXXA DEVELOPMENT BE LIABLE FOR ANY -DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/node_modules/browserify/node_modules/duplexer2/README.md b/node_modules/browserify/node_modules/duplexer2/README.md deleted file mode 100644 index e39e1e9e..00000000 --- a/node_modules/browserify/node_modules/duplexer2/README.md +++ /dev/null @@ -1,129 +0,0 @@ -duplexer2 [![build status](https://travis-ci.org/deoxxa/duplexer2.png)](https://travis-ci.org/deoxxa/fork) -========= - -Like duplexer (http://npm.im/duplexer) but using streams2. - -Overview --------- - -duplexer2 is a reimplementation of [duplexer](http://npm.im/duplexer) using the -readable-stream API which is standard in node as of v0.10. Everything largely -works the same. - -Installation ------------- - -Available via [npm](http://npmjs.org/): - -> $ npm install duplexer2 - -Or via git: - -> $ git clone git://github.com/deoxxa/duplexer2.git node_modules/duplexer2 - -API ---- - -**duplexer2** - -Creates a new `DuplexWrapper` object, which is the actual class that implements -most of the fun stuff. All that fun stuff is hidden. DON'T LOOK. - -```javascript -duplexer2([options], writable, readable) -``` - -```javascript -var duplex = duplexer2(new stream.Writable(), new stream.Readable()); -``` - -Arguments - -* __options__ - an object specifying the regular `stream.Duplex` options, as - well as the properties described below. -* __writable__ - a writable stream -* __readable__ - a readable stream - -Options - -* __bubbleErrors__ - a boolean value that specifies whether to bubble errors - from the underlying readable/writable streams. Default is `true`. - -Example -------- - -Also see [example.js](https://github.com/deoxxa/duplexer2/blob/master/example.js). - -Code: - -```javascript -var stream = require("stream"); - -var duplexer2 = require("duplexer2"); - -var writable = new stream.Writable({objectMode: true}), - readable = new stream.Readable({objectMode: true}); - -writable._write = function _write(input, encoding, done) { - if (readable.push(input)) { - return done(); - } else { - readable.once("drain", done); - } -}; - -readable._read = function _read(n) { - // no-op -}; - -// simulate the readable thing closing after a bit -writable.once("finish", function() { - setTimeout(function() { - readable.push(null); - }, 500); -}); - -var duplex = duplexer2(writable, readable); - -duplex.on("data", function(e) { - console.log("got data", JSON.stringify(e)); -}); - -duplex.on("finish", function() { - console.log("got finish event"); -}); - -duplex.on("end", function() { - console.log("got end event"); -}); - -duplex.write("oh, hi there", function() { - console.log("finished writing"); -}); - -duplex.end(function() { - console.log("finished ending"); -}); -``` - -Output: - -``` -got data "oh, hi there" -finished writing -got finish event -finished ending -got end event -``` - -License -------- - -3-clause BSD. A copy is included with the source. - -Contact -------- - -* GitHub ([deoxxa](http://github.com/deoxxa)) -* Twitter ([@deoxxa](http://twitter.com/deoxxa)) -* Email ([deoxxa@fknsrs.biz](mailto:deoxxa@fknsrs.biz)) diff --git a/node_modules/browserify/node_modules/duplexer2/example.js b/node_modules/browserify/node_modules/duplexer2/example.js deleted file mode 100755 index 90416e9a..00000000 --- a/node_modules/browserify/node_modules/duplexer2/example.js +++ /dev/null @@ -1,49 +0,0 @@ -#!/usr/bin/env node - -var stream = require("readable-stream"); - -var duplexer2 = require("./"); - -var writable = new stream.Writable({objectMode: true}), - readable = new stream.Readable({objectMode: true}); - -writable._write = function _write(input, encoding, done) { - if (readable.push(input)) { - return done(); - } else { - readable.once("drain", done); - } -}; - -readable._read = function _read(n) { - // no-op -}; - -// simulate the readable thing closing after a bit -writable.once("finish", function() { - setTimeout(function() { - readable.push(null); - }, 500); -}); - -var duplex = duplexer2(writable, readable); - -duplex.on("data", function(e) { - console.log("got data", JSON.stringify(e)); -}); - -duplex.on("finish", function() { - console.log("got finish event"); -}); - -duplex.on("end", function() { - console.log("got end event"); -}); - -duplex.write("oh, hi there", function() { - console.log("finished writing"); -}); - -duplex.end(function() { - console.log("finished ending"); -}); diff --git a/node_modules/browserify/node_modules/duplexer2/index.js b/node_modules/browserify/node_modules/duplexer2/index.js deleted file mode 100644 index b8fafcb3..00000000 --- a/node_modules/browserify/node_modules/duplexer2/index.js +++ /dev/null @@ -1,62 +0,0 @@ -var stream = require("readable-stream"); - -var duplex2 = module.exports = function duplex2(options, writable, readable) { - return new DuplexWrapper(options, writable, readable); -}; - -var DuplexWrapper = exports.DuplexWrapper = function DuplexWrapper(options, writable, readable) { - if (typeof readable === "undefined") { - readable = writable; - writable = options; - options = null; - } - - options = options || {}; - options.objectMode = true; - - stream.Duplex.call(this, options); - - this._bubbleErrors = (typeof options.bubbleErrors === "undefined") || !!options.bubbleErrors; - - this._writable = writable; - this._readable = readable; - - var self = this; - - writable.once("finish", function() { - self.end(); - }); - - this.once("finish", function() { - writable.end(); - }); - - readable.on("data", function(e) { - if (!self.push(e)) { - readable.pause(); - } - }); - - readable.once("end", function() { - return self.push(null); - }); - - if (this._bubbleErrors) { - writable.on("error", function(err) { - return self.emit("error", err); - }); - - readable.on("error", function(err) { - return self.emit("error", err); - }); - } -}; -DuplexWrapper.prototype = Object.create(stream.Duplex.prototype, {constructor: {value: DuplexWrapper}}); - -DuplexWrapper.prototype._write = function _write(input, encoding, done) { - this._writable.write(input, encoding, done); -}; - -DuplexWrapper.prototype._read = function _read(n) { - this._readable.resume(); -}; diff --git a/node_modules/browserify/node_modules/duplexer2/package.json b/node_modules/browserify/node_modules/duplexer2/package.json deleted file mode 100644 index 09d976f0..00000000 --- a/node_modules/browserify/node_modules/duplexer2/package.json +++ /dev/null @@ -1,57 +0,0 @@ -{ - "name": "duplexer2", - "version": "0.0.2", - "description": "Like duplexer (http://npm.im/duplexer) but using streams2", - "main": "index.js", - "scripts": { - "test": "mocha -R tap" - }, - "repository": { - "type": "git", - "url": "git://github.com/deoxxa/duplexer2.git" - }, - "keywords": [ - "duplex", - "stream", - "join", - "combine" - ], - "author": { - "name": "Conrad Pankoff", - "email": "deoxxa@fknsrs.biz", - "url": "http://www.fknsrs.biz/" - }, - "license": "BSD", - "bugs": { - "url": "https://github.com/deoxxa/duplexer2/issues" - }, - "devDependencies": { - "chai": "~1.7.2", - "mocha": "~1.12.1" - }, - "dependencies": { - "readable-stream": "~1.1.9" - }, - "homepage": "https://github.com/deoxxa/duplexer2", - "_id": "duplexer2@0.0.2", - "dist": { - "shasum": "c614dcf67e2fb14995a91711e5a617e8a60a31db", - "tarball": "https://registry.npmjs.org/duplexer2/-/duplexer2-0.0.2.tgz" - }, - "_from": "duplexer2@>=0.0.2 <0.1.0", - "_npmVersion": "1.4.3", - "_npmUser": { - "name": "deoxxa", - "email": "deoxxa@fknsrs.biz" - }, - "maintainers": [ - { - "name": "deoxxa", - "email": "deoxxa@fknsrs.biz" - } - ], - "directories": {}, - "_shasum": "c614dcf67e2fb14995a91711e5a617e8a60a31db", - "_resolved": "https://registry.npmjs.org/duplexer2/-/duplexer2-0.0.2.tgz", - "readme": "ERROR: No README data found!" -} diff --git a/node_modules/browserify/node_modules/duplexer2/test/tests.js b/node_modules/browserify/node_modules/duplexer2/test/tests.js deleted file mode 100644 index c3cf76f6..00000000 --- a/node_modules/browserify/node_modules/duplexer2/test/tests.js +++ /dev/null @@ -1,161 +0,0 @@ -var assert = require("chai").assert; - -var stream = require("readable-stream"); - -var duplexer2 = require("../"); - -describe("duplexer2", function() { - var writable, readable; - - beforeEach(function() { - writable = new stream.Writable({objectMode: true}); - readable = new stream.Readable({objectMode: true}); - - writable._write = function _write(input, encoding, done) { - return done(); - }; - - readable._read = function _read(n) { - }; - }); - - it("should interact with the writable stream properly for writing", function(done) { - var duplex = duplexer2(writable, readable); - - writable._write = function _write(input, encoding, _done) { - assert.strictEqual(input, "well hello there"); - - return done(); - }; - - duplex.write("well hello there"); - }); - - it("should interact with the readable stream properly for reading", function(done) { - var duplex = duplexer2(writable, readable); - - duplex.on("data", function(e) { - assert.strictEqual(e, "well hello there"); - - return done(); - }); - - readable.push("well hello there"); - }); - - it("should end the writable stream, causing it to finish", function(done) { - var duplex = duplexer2(writable, readable); - - writable.once("finish", done); - - duplex.end(); - }); - - it("should finish when the writable stream finishes", function(done) { - var duplex = duplexer2(writable, readable); - - duplex.once("finish", done); - - writable.end(); - }); - - it("should end when the readable stream ends", function(done) { - var duplex = duplexer2(writable, readable); - - // required to let "end" fire without reading - duplex.resume(); - duplex.once("end", done); - - readable.push(null); - }); - - it("should bubble errors from the writable stream when no behaviour is specified", function(done) { - var duplex = duplexer2(writable, readable); - - var originalErr = Error("testing"); - - duplex.on("error", function(err) { - assert.strictEqual(err, originalErr); - - return done(); - }); - - writable.emit("error", originalErr); - }); - - it("should bubble errors from the readable stream when no behaviour is specified", function(done) { - var duplex = duplexer2(writable, readable); - - var originalErr = Error("testing"); - - duplex.on("error", function(err) { - assert.strictEqual(err, originalErr); - - return done(); - }); - - readable.emit("error", originalErr); - }); - - it("should bubble errors from the writable stream when bubbleErrors is true", function(done) { - var duplex = duplexer2({bubbleErrors: true}, writable, readable); - - var originalErr = Error("testing"); - - duplex.on("error", function(err) { - assert.strictEqual(err, originalErr); - - return done(); - }); - - writable.emit("error", originalErr); - }); - - it("should bubble errors from the readable stream when bubbleErrors is true", function(done) { - var duplex = duplexer2({bubbleErrors: true}, writable, readable); - - var originalErr = Error("testing"); - - duplex.on("error", function(err) { - assert.strictEqual(err, originalErr); - - return done(); - }); - - readable.emit("error", originalErr); - }); - - it("should not bubble errors from the writable stream when bubbleErrors is false", function(done) { - var duplex = duplexer2({bubbleErrors: false}, writable, readable); - - var timeout = setTimeout(done, 25); - - duplex.on("error", function(err) { - clearTimeout(timeout); - - return done(Error("shouldn't bubble error")); - }); - - // prevent uncaught error exception - writable.on("error", function() {}); - - writable.emit("error", Error("testing")); - }); - - it("should not bubble errors from the readable stream when bubbleErrors is false", function(done) { - var duplex = duplexer2({bubbleErrors: false}, writable, readable); - - var timeout = setTimeout(done, 25); - - duplex.on("error", function(err) { - clearTimeout(timeout); - - return done(Error("shouldn't bubble error")); - }); - - // prevent uncaught error exception - readable.on("error", function() {}); - - readable.emit("error", Error("testing")); - }); -}); diff --git a/node_modules/browserify/node_modules/events/.npmignore b/node_modules/browserify/node_modules/events/.npmignore deleted file mode 100644 index 3c3629e6..00000000 --- a/node_modules/browserify/node_modules/events/.npmignore +++ /dev/null @@ -1 +0,0 @@ -node_modules diff --git a/node_modules/browserify/node_modules/events/.travis.yml b/node_modules/browserify/node_modules/events/.travis.yml deleted file mode 100644 index e716bc0f..00000000 --- a/node_modules/browserify/node_modules/events/.travis.yml +++ /dev/null @@ -1,7 +0,0 @@ -language: node_js -node_js: -- '0.10' -env: - global: - - secure: XcBiD8yReflut9q7leKsigDZ0mI3qTKH+QrNVY8DaqlomJOZw8aOrVuX9Jz12l86ZJ41nbxmKnRNkFzcVr9mbP9YaeTb3DpeOBWmvaoSfud9Wnc16VfXtc1FCcwDhSVcSiM3UtnrmFU5cH+Dw1LPh5PbfylYOS/nJxUvG0FFLqI= - - secure: jNWtEbqhUdQ0xXDHvCYfUbKYeJCi6a7B4LsrcxYCyWWn4NIgncE5x2YbB+FSUUFVYfz0dsn5RKP1oHB99f0laUEo18HBNkrAS/rtyOdVzcpJjbQ6kgSILGjnJD/Ty1B57Rcz3iyev5Y7bLZ6Y1FbDnk/i9/l0faOGz8vTC3Vdkc= diff --git a/node_modules/browserify/node_modules/events/.zuul.yml b/node_modules/browserify/node_modules/events/.zuul.yml deleted file mode 100644 index a8e35afd..00000000 --- a/node_modules/browserify/node_modules/events/.zuul.yml +++ /dev/null @@ -1,12 +0,0 @@ -ui: mocha-qunit -browsers: - - name: chrome - version: latest - - name: firefox - version: latest - - name: safari - version: 5..latest - - name: iphone - version: latest - - name: ie - version: 8..latest diff --git a/node_modules/browserify/node_modules/events/History.md b/node_modules/browserify/node_modules/events/History.md deleted file mode 100644 index 690cbb7e..00000000 --- a/node_modules/browserify/node_modules/events/History.md +++ /dev/null @@ -1,34 +0,0 @@ -# 1.0.2 (2014-08-28) - - - remove un-reachable code - - update devDeps - -## 1.0.1 / 2014-05-11 - - - check for console.trace before using it - -## 1.0.0 / 2013-12-10 - - - Update to latest events code from node.js 0.10 - - copy tests from node.js - -## 0.4.0 / 2011-07-03 ## - - - Switching to graphquire@0.8.0 - -## 0.3.0 / 2011-07-03 ## - - - Switching to URL based module require. - -## 0.2.0 / 2011-06-10 ## - - - Simplified package structure. - - Graphquire for dependency management. - -## 0.1.1 / 2011-05-16 ## - - - Unhandled errors are logged via console.error - -## 0.1.0 / 2011-04-22 ## - - - Initial release diff --git a/node_modules/browserify/node_modules/events/LICENSE b/node_modules/browserify/node_modules/events/LICENSE deleted file mode 100644 index 52ed3b0a..00000000 --- a/node_modules/browserify/node_modules/events/LICENSE +++ /dev/null @@ -1,22 +0,0 @@ -MIT - -Copyright Joyent, Inc. and other Node contributors. - -Permission is hereby granted, free of charge, to any person obtaining a -copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to permit -persons to whom the Software is furnished to do so, subject to the -following conditions: - -The above copyright notice and this permission notice shall be included -in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/browserify/node_modules/events/Readme.md b/node_modules/browserify/node_modules/events/Readme.md deleted file mode 100644 index 02694efa..00000000 --- a/node_modules/browserify/node_modules/events/Readme.md +++ /dev/null @@ -1,19 +0,0 @@ -# events [![Build Status](https://travis-ci.org/Gozala/events.png?branch=master)](https://travis-ci.org/Gozala/events) - -Node's event emitter for all engines. - -## Install ## - -``` -npm install events -``` - -## Require ## - -```javascript -var EventEmitter = require('events').EventEmitter -``` - -## Usage ## - -See the [node.js event emitter docs](http://nodejs.org/api/events.html) diff --git a/node_modules/browserify/node_modules/events/events.js b/node_modules/browserify/node_modules/events/events.js deleted file mode 100644 index c5897959..00000000 --- a/node_modules/browserify/node_modules/events/events.js +++ /dev/null @@ -1,301 +0,0 @@ -// Copyright Joyent, Inc. and other Node contributors. -// -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to permit -// persons to whom the Software is furnished to do so, subject to the -// following conditions: -// -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -// USE OR OTHER DEALINGS IN THE SOFTWARE. - -function EventEmitter() { - this._events = this._events || {}; - this._maxListeners = this._maxListeners || undefined; -} -module.exports = EventEmitter; - -// Backwards-compat with node 0.10.x -EventEmitter.EventEmitter = EventEmitter; - -EventEmitter.prototype._events = undefined; -EventEmitter.prototype._maxListeners = undefined; - -// By default EventEmitters will print a warning if more than 10 listeners are -// added to it. This is a useful default which helps finding memory leaks. -EventEmitter.defaultMaxListeners = 10; - -// Obviously not all Emitters should be limited to 10. This function allows -// that to be increased. Set to zero for unlimited. -EventEmitter.prototype.setMaxListeners = function(n) { - if (!isNumber(n) || n < 0 || isNaN(n)) - throw TypeError('n must be a positive number'); - this._maxListeners = n; - return this; -}; - -EventEmitter.prototype.emit = function(type) { - var er, handler, len, args, i, listeners; - - if (!this._events) - this._events = {}; - - // If there is no 'error' event listener then throw. - if (type === 'error') { - if (!this._events.error || - (isObject(this._events.error) && !this._events.error.length)) { - er = arguments[1]; - if (er instanceof Error) { - throw er; // Unhandled 'error' event - } - throw TypeError('Uncaught, unspecified "error" event.'); - } - } - - handler = this._events[type]; - - if (isUndefined(handler)) - return false; - - if (isFunction(handler)) { - switch (arguments.length) { - // fast cases - case 1: - handler.call(this); - break; - case 2: - handler.call(this, arguments[1]); - break; - case 3: - handler.call(this, arguments[1], arguments[2]); - break; - // slower - default: - len = arguments.length; - args = new Array(len - 1); - for (i = 1; i < len; i++) - args[i - 1] = arguments[i]; - handler.apply(this, args); - } - } else if (isObject(handler)) { - len = arguments.length; - args = new Array(len - 1); - for (i = 1; i < len; i++) - args[i - 1] = arguments[i]; - - listeners = handler.slice(); - len = listeners.length; - for (i = 0; i < len; i++) - listeners[i].apply(this, args); - } - - return true; -}; - -EventEmitter.prototype.addListener = function(type, listener) { - var m; - - if (!isFunction(listener)) - throw TypeError('listener must be a function'); - - if (!this._events) - this._events = {}; - - // To avoid recursion in the case that type === "newListener"! Before - // adding it to the listeners, first emit "newListener". - if (this._events.newListener) - this.emit('newListener', type, - isFunction(listener.listener) ? - listener.listener : listener); - - if (!this._events[type]) - // Optimize the case of one listener. Don't need the extra array object. - this._events[type] = listener; - else if (isObject(this._events[type])) - // If we've already got an array, just append. - this._events[type].push(listener); - else - // Adding the second element, need to change to array. - this._events[type] = [this._events[type], listener]; - - // Check for listener leak - if (isObject(this._events[type]) && !this._events[type].warned) { - var m; - if (!isUndefined(this._maxListeners)) { - m = this._maxListeners; - } else { - m = EventEmitter.defaultMaxListeners; - } - - if (m && m > 0 && this._events[type].length > m) { - this._events[type].warned = true; - console.error('(node) warning: possible EventEmitter memory ' + - 'leak detected. %d listeners added. ' + - 'Use emitter.setMaxListeners() to increase limit.', - this._events[type].length); - if (typeof console.trace === 'function') { - // not supported in IE 10 - console.trace(); - } - } - } - - return this; -}; - -EventEmitter.prototype.on = EventEmitter.prototype.addListener; - -EventEmitter.prototype.once = function(type, listener) { - if (!isFunction(listener)) - throw TypeError('listener must be a function'); - - var fired = false; - - function g() { - this.removeListener(type, g); - - if (!fired) { - fired = true; - listener.apply(this, arguments); - } - } - - g.listener = listener; - this.on(type, g); - - return this; -}; - -// emits a 'removeListener' event iff the listener was removed -EventEmitter.prototype.removeListener = function(type, listener) { - var list, position, length, i; - - if (!isFunction(listener)) - throw TypeError('listener must be a function'); - - if (!this._events || !this._events[type]) - return this; - - list = this._events[type]; - length = list.length; - position = -1; - - if (list === listener || - (isFunction(list.listener) && list.listener === listener)) { - delete this._events[type]; - if (this._events.removeListener) - this.emit('removeListener', type, listener); - - } else if (isObject(list)) { - for (i = length; i-- > 0;) { - if (list[i] === listener || - (list[i].listener && list[i].listener === listener)) { - position = i; - break; - } - } - - if (position < 0) - return this; - - if (list.length === 1) { - list.length = 0; - delete this._events[type]; - } else { - list.splice(position, 1); - } - - if (this._events.removeListener) - this.emit('removeListener', type, listener); - } - - return this; -}; - -EventEmitter.prototype.removeAllListeners = function(type) { - var key, listeners; - - if (!this._events) - return this; - - // not listening for removeListener, no need to emit - if (!this._events.removeListener) { - if (arguments.length === 0) - this._events = {}; - else if (this._events[type]) - delete this._events[type]; - return this; - } - - // emit removeListener for all listeners on all events - if (arguments.length === 0) { - for (key in this._events) { - if (key === 'removeListener') continue; - this.removeAllListeners(key); - } - this.removeAllListeners('removeListener'); - this._events = {}; - return this; - } - - listeners = this._events[type]; - - if (isFunction(listeners)) { - this.removeListener(type, listeners); - } else { - // LIFO order - while (listeners.length) - this.removeListener(type, listeners[listeners.length - 1]); - } - delete this._events[type]; - - return this; -}; - -EventEmitter.prototype.listeners = function(type) { - var ret; - if (!this._events || !this._events[type]) - ret = []; - else if (isFunction(this._events[type])) - ret = [this._events[type]]; - else - ret = this._events[type].slice(); - return ret; -}; - -EventEmitter.listenerCount = function(emitter, type) { - var ret; - if (!emitter._events || !emitter._events[type]) - ret = 0; - else if (isFunction(emitter._events[type])) - ret = 1; - else - ret = emitter._events[type].length; - return ret; -}; - -function isFunction(arg) { - return typeof arg === 'function'; -} - -function isNumber(arg) { - return typeof arg === 'number'; -} - -function isObject(arg) { - return typeof arg === 'object' && arg !== null; -} - -function isUndefined(arg) { - return arg === void 0; -} diff --git a/node_modules/browserify/node_modules/events/package.json b/node_modules/browserify/node_modules/events/package.json deleted file mode 100644 index 9e82a563..00000000 --- a/node_modules/browserify/node_modules/events/package.json +++ /dev/null @@ -1,64 +0,0 @@ -{ - "name": "events", - "id": "events", - "version": "1.0.2", - "description": "Node's event emitter for all engines.", - "keywords": [ - "events", - "eventEmitter", - "eventDispatcher", - "listeners" - ], - "author": { - "name": "Irakli Gozalishvili", - "email": "rfobic@gmail.com", - "url": "http://jeditoolkit.com" - }, - "repository": { - "type": "git", - "url": "git://github.com/Gozala/events.git", - "web": "https://github.com/Gozala/events" - }, - "bugs": { - "url": "http://github.com/Gozala/events/issues/" - }, - "main": "./events.js", - "engines": { - "node": ">=0.4.x" - }, - "devDependencies": { - "mocha": "~1.21.4", - "zuul": "~1.10.2" - }, - "scripts": { - "test": "mocha --ui qunit -- tests/index.js && zuul -- tests/index.js" - }, - "licenses": "MIT", - "gitHead": "82020ee4e10570370b342863887fdc73e723ca7a", - "homepage": "https://github.com/Gozala/events", - "_id": "events@1.0.2", - "_shasum": "75849dcfe93d10fb057c30055afdbd51d06a8e24", - "_from": "events@>=1.0.0 <1.1.0", - "_npmVersion": "1.4.23", - "_npmUser": { - "name": "shtylman", - "email": "shtylman@gmail.com" - }, - "maintainers": [ - { - "name": "gozala", - "email": "rfobic@gmail.com" - }, - { - "name": "shtylman", - "email": "shtylman@gmail.com" - } - ], - "dist": { - "shasum": "75849dcfe93d10fb057c30055afdbd51d06a8e24", - "tarball": "https://registry.npmjs.org/events/-/events-1.0.2.tgz" - }, - "directories": {}, - "_resolved": "https://registry.npmjs.org/events/-/events-1.0.2.tgz", - "readme": "ERROR: No README data found!" -} diff --git a/node_modules/browserify/node_modules/events/tests/add-listeners.js b/node_modules/browserify/node_modules/events/tests/add-listeners.js deleted file mode 100644 index 5ab874ce..00000000 --- a/node_modules/browserify/node_modules/events/tests/add-listeners.js +++ /dev/null @@ -1,63 +0,0 @@ -// Copyright Joyent, Inc. and other Node contributors. -// -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to permit -// persons to whom the Software is furnished to do so, subject to the -// following conditions: -// -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -// USE OR OTHER DEALINGS IN THE SOFTWARE. - -var assert = require('assert'); -var events = require('../'); - -var e = new events.EventEmitter(); - -var events_new_listener_emited = []; -var listeners_new_listener_emited = []; -var times_hello_emited = 0; - -// sanity check -assert.equal(e.addListener, e.on); - -e.on('newListener', function(event, listener) { - console.log('newListener: ' + event); - events_new_listener_emited.push(event); - listeners_new_listener_emited.push(listener); -}); - -function hello(a, b) { - console.log('hello'); - times_hello_emited += 1; - assert.equal('a', a); - assert.equal('b', b); -} -e.on('hello', hello); - -var foo = function() {}; -e.once('foo', foo); - -console.log('start'); - -e.emit('hello', 'a', 'b'); - - -// just make sure that this doesn't throw: -var f = new events.EventEmitter(); -f.setMaxListeners(0); - -assert.deepEqual(['hello', 'foo'], events_new_listener_emited); -assert.deepEqual([hello, foo], listeners_new_listener_emited); -assert.equal(1, times_hello_emited); - diff --git a/node_modules/browserify/node_modules/events/tests/check-listener-leaks.js b/node_modules/browserify/node_modules/events/tests/check-listener-leaks.js deleted file mode 100644 index e07866a5..00000000 --- a/node_modules/browserify/node_modules/events/tests/check-listener-leaks.js +++ /dev/null @@ -1,86 +0,0 @@ -// Copyright Joyent, Inc. and other Node contributors. -// -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to permit -// persons to whom the Software is furnished to do so, subject to the -// following conditions: -// -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -// USE OR OTHER DEALINGS IN THE SOFTWARE. - -var assert = require('assert'); -var events = require('../'); - -var e = new events.EventEmitter(); - -// default -for (var i = 0; i < 10; i++) { - e.on('default', function() {}); -} -assert.ok(!e._events['default'].hasOwnProperty('warned')); -e.on('default', function() {}); -assert.ok(e._events['default'].warned); - -// specific -e.setMaxListeners(5); -for (var i = 0; i < 5; i++) { - e.on('specific', function() {}); -} -assert.ok(!e._events['specific'].hasOwnProperty('warned')); -e.on('specific', function() {}); -assert.ok(e._events['specific'].warned); - -// only one -e.setMaxListeners(1); -e.on('only one', function() {}); -assert.ok(!e._events['only one'].hasOwnProperty('warned')); -e.on('only one', function() {}); -assert.ok(e._events['only one'].hasOwnProperty('warned')); - -// unlimited -e.setMaxListeners(0); -for (var i = 0; i < 1000; i++) { - e.on('unlimited', function() {}); -} -assert.ok(!e._events['unlimited'].hasOwnProperty('warned')); - -// process-wide -events.EventEmitter.defaultMaxListeners = 42; -e = new events.EventEmitter(); - -for (var i = 0; i < 42; ++i) { - e.on('fortytwo', function() {}); -} -assert.ok(!e._events['fortytwo'].hasOwnProperty('warned')); -e.on('fortytwo', function() {}); -assert.ok(e._events['fortytwo'].hasOwnProperty('warned')); -delete e._events['fortytwo'].warned; - -events.EventEmitter.defaultMaxListeners = 44; -e.on('fortytwo', function() {}); -assert.ok(!e._events['fortytwo'].hasOwnProperty('warned')); -e.on('fortytwo', function() {}); -assert.ok(e._events['fortytwo'].hasOwnProperty('warned')); - -// but _maxListeners still has precedence over defaultMaxListeners -events.EventEmitter.defaultMaxListeners = 42; -e = new events.EventEmitter(); -e.setMaxListeners(1); -e.on('uno', function() {}); -assert.ok(!e._events['uno'].hasOwnProperty('warned')); -e.on('uno', function() {}); -assert.ok(e._events['uno'].hasOwnProperty('warned')); - -// chainable -assert.strictEqual(e, e.setMaxListeners(1)); diff --git a/node_modules/browserify/node_modules/events/tests/common.js b/node_modules/browserify/node_modules/events/tests/common.js deleted file mode 100644 index 66f70a39..00000000 --- a/node_modules/browserify/node_modules/events/tests/common.js +++ /dev/null @@ -1,42 +0,0 @@ -var assert = require('assert'); - -var mustCallChecks = []; - -function runCallChecks() { - var failed_count = 0; - for (var i=0 ; i< mustCallChecks.length; ++i) { - var context = mustCallChecks[i]; - if (context.actual === context.expected) { - continue; - } - - failed_count++; - console.log('Mismatched %s function calls. Expected %d, actual %d.', - context.name, - context.expected, - context.actual); - console.log(context.stack.split('\n').slice(2).join('\n')); - } - - assert(failed_count === 0); -} - -after(runCallChecks); - -exports.mustCall = function(fn, expected) { - if (typeof expected !== 'number') expected = 1; - - var context = { - expected: expected, - actual: 0, - stack: (new Error).stack, - name: fn.name || '' - }; - - mustCallChecks.push(context); - - return function() { - context.actual++; - return fn.apply(this, arguments); - }; -}; diff --git a/node_modules/browserify/node_modules/events/tests/index.js b/node_modules/browserify/node_modules/events/tests/index.js deleted file mode 100644 index 2fb97086..00000000 --- a/node_modules/browserify/node_modules/events/tests/index.js +++ /dev/null @@ -1,24 +0,0 @@ - -require('./legacy-compat'); - -// we do this to easily wrap each file in a mocha test -// and also have browserify be able to statically analyze this file -var orig_require = require; -var require = function(file) { - test(file, function() { - orig_require(file); - }); -} - -require('./add-listeners.js'); -require('./check-listener-leaks.js'); -require('./listeners-side-effects.js'); -require('./listeners.js'); -require('./max-listeners.js'); -require('./modify-in-emit.js'); -require('./num-args.js'); -require('./once.js'); -require('./set-max-listeners-side-effects.js'); -require('./subclass.js'); -require('./remove-all-listeners.js'); -require('./remove-listeners.js'); diff --git a/node_modules/browserify/node_modules/events/tests/legacy-compat.js b/node_modules/browserify/node_modules/events/tests/legacy-compat.js deleted file mode 100644 index afbc0ab8..00000000 --- a/node_modules/browserify/node_modules/events/tests/legacy-compat.js +++ /dev/null @@ -1,18 +0,0 @@ -// sigh... life is hard -if (!global.console) { - console = {} -} - -var fns = ['log', 'error', 'trace']; -for (var i=0 ; ifoo should not be emitted', '!'); -}; - -e.once('foo', remove); -e.removeListener('foo', remove); -e.emit('foo'); - -var times_recurse_emitted = 0; - -e.once('e', function() { - e.emit('e'); - times_recurse_emitted++; -}); - -e.once('e', function() { - times_recurse_emitted++; -}); - -e.emit('e'); - -assert.equal(1, times_hello_emited); -assert.equal(2, times_recurse_emitted); diff --git a/node_modules/browserify/node_modules/events/tests/remove-all-listeners.js b/node_modules/browserify/node_modules/events/tests/remove-all-listeners.js deleted file mode 100644 index b3dc886e..00000000 --- a/node_modules/browserify/node_modules/events/tests/remove-all-listeners.js +++ /dev/null @@ -1,80 +0,0 @@ -// Copyright Joyent, Inc. and other Node contributors. -// -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to permit -// persons to whom the Software is furnished to do so, subject to the -// following conditions: -// -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -// USE OR OTHER DEALINGS IN THE SOFTWARE. - -var common = require('./common'); -var assert = require('assert'); -var events = require('../'); - -var after_checks = []; -after(function() { - for (var i=0 ; i} filenames found matching the pattern - -Perform an asynchronous glob search. - -## glob.sync(pattern, [options]) - -* `pattern` {String} Pattern to be matched -* `options` {Object} -* return: {Array} filenames found matching the pattern - -Perform a synchronous glob search. - -## Class: glob.Glob - -Create a Glob object by instantiating the `glob.Glob` class. - -```javascript -var Glob = require("glob").Glob -var mg = new Glob(pattern, options, cb) -``` - -It's an EventEmitter, and starts walking the filesystem to find matches -immediately. - -### new glob.Glob(pattern, [options], [cb]) - -* `pattern` {String} pattern to search for -* `options` {Object} -* `cb` {Function} Called when an error occurs, or matches are found - * `err` {Error | null} - * `matches` {Array} filenames found matching the pattern - -Note that if the `sync` flag is set in the options, then matches will -be immediately available on the `g.found` member. - -### Properties - -* `minimatch` The minimatch object that the glob uses. -* `options` The options object passed in. -* `aborted` Boolean which is set to true when calling `abort()`. There - is no way at this time to continue a glob search after aborting, but - you can re-use the statCache to avoid having to duplicate syscalls. -* `statCache` Collection of all the stat results the glob search - performed. -* `cache` Convenience object. Each field has the following possible - values: - * `false` - Path does not exist - * `true` - Path exists - * `'DIR'` - Path exists, and is not a directory - * `'FILE'` - Path exists, and is a directory - * `[file, entries, ...]` - Path exists, is a directory, and the - array value is the results of `fs.readdir` -* `statCache` Cache of `fs.stat` results, to prevent statting the same - path multiple times. -* `symlinks` A record of which paths are symbolic links, which is - relevant in resolving `**` patterns. -* `realpathCache` An optional object which is passed to `fs.realpath` - to minimize unnecessary syscalls. It is stored on the instantiated - Glob object, and may be re-used. - -### Events - -* `end` When the matching is finished, this is emitted with all the - matches found. If the `nonull` option is set, and no match was found, - then the `matches` list contains the original pattern. The matches - are sorted, unless the `nosort` flag is set. -* `match` Every time a match is found, this is emitted with the matched. -* `error` Emitted when an unexpected error is encountered, or whenever - any fs error occurs if `options.strict` is set. -* `abort` When `abort()` is called, this event is raised. - -### Methods - -* `pause` Temporarily stop the search -* `resume` Resume the search -* `abort` Stop the search forever - -### Options - -All the options that can be passed to Minimatch can also be passed to -Glob to change pattern matching behavior. Also, some have been added, -or have glob-specific ramifications. - -All options are false by default, unless otherwise noted. - -All options are added to the Glob object, as well. - -If you are running many `glob` operations, you can pass a Glob object -as the `options` argument to a subsequent operation to shortcut some -`stat` and `readdir` calls. At the very least, you may pass in shared -`symlinks`, `statCache`, `realpathCache`, and `cache` options, so that -parallel glob operations will be sped up by sharing information about -the filesystem. - -* `cwd` The current working directory in which to search. Defaults - to `process.cwd()`. -* `root` The place where patterns starting with `/` will be mounted - onto. Defaults to `path.resolve(options.cwd, "/")` (`/` on Unix - systems, and `C:\` or some such on Windows.) -* `dot` Include `.dot` files in normal matches and `globstar` matches. - Note that an explicit dot in a portion of the pattern will always - match dot files. -* `nomount` By default, a pattern starting with a forward-slash will be - "mounted" onto the root setting, so that a valid filesystem path is - returned. Set this flag to disable that behavior. -* `mark` Add a `/` character to directory matches. Note that this - requires additional stat calls. -* `nosort` Don't sort the results. -* `stat` Set to true to stat *all* results. This reduces performance - somewhat, and is completely unnecessary, unless `readdir` is presumed - to be an untrustworthy indicator of file existence. -* `silent` When an unusual error is encountered when attempting to - read a directory, a warning will be printed to stderr. Set the - `silent` option to true to suppress these warnings. -* `strict` When an unusual error is encountered when attempting to - read a directory, the process will just continue on in search of - other matches. Set the `strict` option to raise an error in these - cases. -* `cache` See `cache` property above. Pass in a previously generated - cache object to save some fs calls. -* `statCache` A cache of results of filesystem information, to prevent - unnecessary stat calls. While it should not normally be necessary - to set this, you may pass the statCache from one glob() call to the - options object of another, if you know that the filesystem will not - change between calls. (See "Race Conditions" below.) -* `symlinks` A cache of known symbolic links. You may pass in a - previously generated `symlinks` object to save `lstat` calls when - resolving `**` matches. -* `sync` DEPRECATED: use `glob.sync(pattern, opts)` instead. -* `nounique` In some cases, brace-expanded patterns can result in the - same file showing up multiple times in the result set. By default, - this implementation prevents duplicates in the result set. Set this - flag to disable that behavior. -* `nonull` Set to never return an empty set, instead returning a set - containing the pattern itself. This is the default in glob(3). -* `debug` Set to enable debug logging in minimatch and glob. -* `nobrace` Do not expand `{a,b}` and `{1..3}` brace sets. -* `noglobstar` Do not match `**` against multiple filenames. (Ie, - treat it as a normal `*` instead.) -* `noext` Do not match `+(a|b)` "extglob" patterns. -* `nocase` Perform a case-insensitive match. Note: on - case-insensitive filesystems, non-magic patterns will match by - default, since `stat` and `readdir` will not raise errors. -* `matchBase` Perform a basename-only match if the pattern does not - contain any slash characters. That is, `*.js` would be treated as - equivalent to `**/*.js`, matching all js files in all directories. -* `nonegate` Suppress `negate` behavior. (See below.) -* `nocomment` Suppress `comment` behavior. (See below.) -* `nonull` Return the pattern when no matches are found. -* `nodir` Do not match directories, only files. (Note: to match - *only* directories, simply put a `/` at the end of the pattern.) -* `ignore` Add a pattern or an array of patterns to exclude matches. -* `follow` Follow symlinked directories when expanding `**` patterns. - Note that this can result in a lot of duplicate references in the - presence of cyclic links. -* `realpath` Set to true to call `fs.realpath` on all of the results. - In the case of a symlink that cannot be resolved, the full absolute - path to the matched entry is returned (though it will usually be a - broken symlink) - -## Comparisons to other fnmatch/glob implementations - -While strict compliance with the existing standards is a worthwhile -goal, some discrepancies exist between node-glob and other -implementations, and are intentional. - -If the pattern starts with a `!` character, then it is negated. Set the -`nonegate` flag to suppress this behavior, and treat leading `!` -characters normally. This is perhaps relevant if you wish to start the -pattern with a negative extglob pattern like `!(a|B)`. Multiple `!` -characters at the start of a pattern will negate the pattern multiple -times. - -If a pattern starts with `#`, then it is treated as a comment, and -will not match anything. Use `\#` to match a literal `#` at the -start of a line, or set the `nocomment` flag to suppress this behavior. - -The double-star character `**` is supported by default, unless the -`noglobstar` flag is set. This is supported in the manner of bsdglob -and bash 4.3, where `**` only has special significance if it is the only -thing in a path part. That is, `a/**/b` will match `a/x/y/b`, but -`a/**b` will not. - -Note that symlinked directories are not crawled as part of a `**`, -though their contents may match against subsequent portions of the -pattern. This prevents infinite loops and duplicates and the like. - -If an escaped pattern has no matches, and the `nonull` flag is set, -then glob returns the pattern as-provided, rather than -interpreting the character escapes. For example, -`glob.match([], "\\*a\\?")` will return `"\\*a\\?"` rather than -`"*a?"`. This is akin to setting the `nullglob` option in bash, except -that it does not resolve escaped pattern characters. - -If brace expansion is not disabled, then it is performed before any -other interpretation of the glob pattern. Thus, a pattern like -`+(a|{b),c)}`, which would not be valid in bash or zsh, is expanded -**first** into the set of `+(a|b)` and `+(a|c)`, and those patterns are -checked for validity. Since those two are valid, matching proceeds. - -## Windows - -**Please only use forward-slashes in glob expressions.** - -Though windows uses either `/` or `\` as its path separator, only `/` -characters are used by this glob implementation. You must use -forward-slashes **only** in glob expressions. Back-slashes will always -be interpreted as escape characters, not path separators. - -Results from absolute patterns such as `/foo/*` are mounted onto the -root setting using `path.join`. On windows, this will by default result -in `/foo/*` matching `C:\foo\bar.txt`. - -## Race Conditions - -Glob searching, by its very nature, is susceptible to race conditions, -since it relies on directory walking and such. - -As a result, it is possible that a file that exists when glob looks for -it may have been deleted or modified by the time it returns the result. - -As part of its internal implementation, this program caches all stat -and readdir calls that it makes, in order to cut down on system -overhead. However, this also makes it even more susceptible to races, -especially if the cache or statCache objects are reused between glob -calls. - -Users are thus advised not to use a glob result as a guarantee of -filesystem state in the face of rapid changes. For the vast majority -of operations, this is never a problem. - -## Contributing - -Any change to behavior (including bugfixes) must come with a test. - -Patches that fail tests or reduce performance will be rejected. - -``` -# to run tests -npm test - -# to re-generate test fixtures -npm run test-regen - -# to benchmark against bash/zsh -npm run bench - -# to profile javascript -npm run prof -``` diff --git a/node_modules/browserify/node_modules/glob/common.js b/node_modules/browserify/node_modules/glob/common.js deleted file mode 100644 index cd7c8244..00000000 --- a/node_modules/browserify/node_modules/glob/common.js +++ /dev/null @@ -1,237 +0,0 @@ -exports.alphasort = alphasort -exports.alphasorti = alphasorti -exports.isAbsolute = process.platform === "win32" ? absWin : absUnix -exports.setopts = setopts -exports.ownProp = ownProp -exports.makeAbs = makeAbs -exports.finish = finish -exports.mark = mark -exports.isIgnored = isIgnored -exports.childrenIgnored = childrenIgnored - -function ownProp (obj, field) { - return Object.prototype.hasOwnProperty.call(obj, field) -} - -var path = require("path") -var minimatch = require("minimatch") -var Minimatch = minimatch.Minimatch - -function absWin (p) { - if (absUnix(p)) return true - // pull off the device/UNC bit from a windows path. - // from node's lib/path.js - var splitDeviceRe = - /^([a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/]+[^\\\/]+)?([\\\/])?([\s\S]*?)$/ - var result = splitDeviceRe.exec(p) - var device = result[1] || '' - var isUnc = device && device.charAt(1) !== ':' - var isAbsolute = !!result[2] || isUnc // UNC paths are always absolute - - return isAbsolute -} - -function absUnix (p) { - return p.charAt(0) === "/" || p === "" -} - -function alphasorti (a, b) { - return a.toLowerCase().localeCompare(b.toLowerCase()) -} - -function alphasort (a, b) { - return a.localeCompare(b) -} - -function setupIgnores (self, options) { - self.ignore = options.ignore || [] - - if (!Array.isArray(self.ignore)) - self.ignore = [self.ignore] - - if (self.ignore.length) { - self.ignore = self.ignore.map(ignoreMap) - } -} - -function ignoreMap (pattern) { - var gmatcher = null - if (pattern.slice(-3) === '/**') { - var gpattern = pattern.replace(/(\/\*\*)+$/, '') - gmatcher = new Minimatch(gpattern, { nonegate: true }) - } - - return { - matcher: new Minimatch(pattern, { nonegate: true }), - gmatcher: gmatcher - } -} - -function setopts (self, pattern, options) { - if (!options) - options = {} - - // base-matching: just use globstar for that. - if (options.matchBase && -1 === pattern.indexOf("/")) { - if (options.noglobstar) { - throw new Error("base matching requires globstar") - } - pattern = "**/" + pattern - } - - self.pattern = pattern - self.strict = options.strict !== false - self.realpath = !!options.realpath - self.realpathCache = options.realpathCache || Object.create(null) - self.follow = !!options.follow - self.dot = !!options.dot - self.mark = !!options.mark - self.nodir = !!options.nodir - if (self.nodir) - self.mark = true - self.sync = !!options.sync - self.nounique = !!options.nounique - self.nonull = !!options.nonull - self.nosort = !!options.nosort - self.nocase = !!options.nocase - self.stat = !!options.stat - self.noprocess = !!options.noprocess - - self.maxLength = options.maxLength || Infinity - self.cache = options.cache || Object.create(null) - self.statCache = options.statCache || Object.create(null) - self.symlinks = options.symlinks || Object.create(null) - - setupIgnores(self, options) - - self.changedCwd = false - var cwd = process.cwd() - if (!ownProp(options, "cwd")) - self.cwd = cwd - else { - self.cwd = options.cwd - self.changedCwd = path.resolve(options.cwd) !== cwd - } - - self.root = options.root || path.resolve(self.cwd, "/") - self.root = path.resolve(self.root) - if (process.platform === "win32") - self.root = self.root.replace(/\\/g, "/") - - self.nomount = !!options.nomount - - self.minimatch = new Minimatch(pattern, options) - self.options = self.minimatch.options -} - -function finish (self) { - var nou = self.nounique - var all = nou ? [] : Object.create(null) - - for (var i = 0, l = self.matches.length; i < l; i ++) { - var matches = self.matches[i] - if (!matches || Object.keys(matches).length === 0) { - if (self.nonull) { - // do like the shell, and spit out the literal glob - var literal = self.minimatch.globSet[i] - if (nou) - all.push(literal) - else - all[literal] = true - } - } else { - // had matches - var m = Object.keys(matches) - if (nou) - all.push.apply(all, m) - else - m.forEach(function (m) { - all[m] = true - }) - } - } - - if (!nou) - all = Object.keys(all) - - if (!self.nosort) - all = all.sort(self.nocase ? alphasorti : alphasort) - - // at *some* point we statted all of these - if (self.mark) { - for (var i = 0; i < all.length; i++) { - all[i] = self._mark(all[i]) - } - if (self.nodir) { - all = all.filter(function (e) { - return !(/\/$/.test(e)) - }) - } - } - - if (self.ignore.length) - all = all.filter(function(m) { - return !isIgnored(self, m) - }) - - self.found = all -} - -function mark (self, p) { - var abs = makeAbs(self, p) - var c = self.cache[abs] - var m = p - if (c) { - var isDir = c === 'DIR' || Array.isArray(c) - var slash = p.slice(-1) === '/' - - if (isDir && !slash) - m += '/' - else if (!isDir && slash) - m = m.slice(0, -1) - - if (m !== p) { - var mabs = makeAbs(self, m) - self.statCache[mabs] = self.statCache[abs] - self.cache[mabs] = self.cache[abs] - } - } - - return m -} - -// lotta situps... -function makeAbs (self, f) { - var abs = f - if (f.charAt(0) === '/') { - abs = path.join(self.root, f) - } else if (exports.isAbsolute(f)) { - abs = f - } else if (self.changedCwd) { - abs = path.resolve(self.cwd, f) - } else if (self.realpath) { - abs = path.resolve(f) - } - return abs -} - - -// Return true, if pattern ends with globstar '**', for the accompanying parent directory. -// Ex:- If node_modules/** is the pattern, add 'node_modules' to ignore list along with it's contents -function isIgnored (self, path) { - if (!self.ignore.length) - return false - - return self.ignore.some(function(item) { - return item.matcher.match(path) || !!(item.gmatcher && item.gmatcher.match(path)) - }) -} - -function childrenIgnored (self, path) { - if (!self.ignore.length) - return false - - return self.ignore.some(function(item) { - return !!(item.gmatcher && item.gmatcher.match(path)) - }) -} diff --git a/node_modules/browserify/node_modules/glob/glob.js b/node_modules/browserify/node_modules/glob/glob.js deleted file mode 100644 index eac0693c..00000000 --- a/node_modules/browserify/node_modules/glob/glob.js +++ /dev/null @@ -1,740 +0,0 @@ -// Approach: -// -// 1. Get the minimatch set -// 2. For each pattern in the set, PROCESS(pattern, false) -// 3. Store matches per-set, then uniq them -// -// PROCESS(pattern, inGlobStar) -// Get the first [n] items from pattern that are all strings -// Join these together. This is PREFIX. -// If there is no more remaining, then stat(PREFIX) and -// add to matches if it succeeds. END. -// -// If inGlobStar and PREFIX is symlink and points to dir -// set ENTRIES = [] -// else readdir(PREFIX) as ENTRIES -// If fail, END -// -// with ENTRIES -// If pattern[n] is GLOBSTAR -// // handle the case where the globstar match is empty -// // by pruning it out, and testing the resulting pattern -// PROCESS(pattern[0..n] + pattern[n+1 .. $], false) -// // handle other cases. -// for ENTRY in ENTRIES (not dotfiles) -// // attach globstar + tail onto the entry -// // Mark that this entry is a globstar match -// PROCESS(pattern[0..n] + ENTRY + pattern[n .. $], true) -// -// else // not globstar -// for ENTRY in ENTRIES (not dotfiles, unless pattern[n] is dot) -// Test ENTRY against pattern[n] -// If fails, continue -// If passes, PROCESS(pattern[0..n] + item + pattern[n+1 .. $]) -// -// Caveat: -// Cache all stats and readdirs results to minimize syscall. Since all -// we ever care about is existence and directory-ness, we can just keep -// `true` for files, and [children,...] for directories, or `false` for -// things that don't exist. - -module.exports = glob - -var fs = require('fs') -var minimatch = require('minimatch') -var Minimatch = minimatch.Minimatch -var inherits = require('inherits') -var EE = require('events').EventEmitter -var path = require('path') -var assert = require('assert') -var globSync = require('./sync.js') -var common = require('./common.js') -var alphasort = common.alphasort -var alphasorti = common.alphasorti -var isAbsolute = common.isAbsolute -var setopts = common.setopts -var ownProp = common.ownProp -var inflight = require('inflight') -var util = require('util') -var childrenIgnored = common.childrenIgnored - -var once = require('once') - -function glob (pattern, options, cb) { - if (typeof options === 'function') cb = options, options = {} - if (!options) options = {} - - if (options.sync) { - if (cb) - throw new TypeError('callback provided to sync glob') - return globSync(pattern, options) - } - - return new Glob(pattern, options, cb) -} - -glob.sync = globSync -var GlobSync = glob.GlobSync = globSync.GlobSync - -// old api surface -glob.glob = glob - -glob.hasMagic = function (pattern, options_) { - var options = util._extend({}, options_) - options.noprocess = true - - var g = new Glob(pattern, options) - var set = g.minimatch.set - if (set.length > 1) - return true - - for (var j = 0; j < set[0].length; j++) { - if (typeof set[0][j] !== 'string') - return true - } - - return false -} - -glob.Glob = Glob -inherits(Glob, EE) -function Glob (pattern, options, cb) { - if (typeof options === 'function') { - cb = options - options = null - } - - if (options && options.sync) { - if (cb) - throw new TypeError('callback provided to sync glob') - return new GlobSync(pattern, options) - } - - if (!(this instanceof Glob)) - return new Glob(pattern, options, cb) - - setopts(this, pattern, options) - this._didRealPath = false - - // process each pattern in the minimatch set - var n = this.minimatch.set.length - - // The matches are stored as {: true,...} so that - // duplicates are automagically pruned. - // Later, we do an Object.keys() on these. - // Keep them as a list so we can fill in when nonull is set. - this.matches = new Array(n) - - if (typeof cb === 'function') { - cb = once(cb) - this.on('error', cb) - this.on('end', function (matches) { - cb(null, matches) - }) - } - - var self = this - var n = this.minimatch.set.length - this._processing = 0 - this.matches = new Array(n) - - this._emitQueue = [] - this._processQueue = [] - this.paused = false - - if (this.noprocess) - return this - - if (n === 0) - return done() - - for (var i = 0; i < n; i ++) { - this._process(this.minimatch.set[i], i, false, done) - } - - function done () { - --self._processing - if (self._processing <= 0) - self._finish() - } -} - -Glob.prototype._finish = function () { - assert(this instanceof Glob) - if (this.aborted) - return - - if (this.realpath && !this._didRealpath) - return this._realpath() - - common.finish(this) - this.emit('end', this.found) -} - -Glob.prototype._realpath = function () { - if (this._didRealpath) - return - - this._didRealpath = true - - var n = this.matches.length - if (n === 0) - return this._finish() - - var self = this - for (var i = 0; i < this.matches.length; i++) - this._realpathSet(i, next) - - function next () { - if (--n === 0) - self._finish() - } -} - -Glob.prototype._realpathSet = function (index, cb) { - var matchset = this.matches[index] - if (!matchset) - return cb() - - var found = Object.keys(matchset) - var self = this - var n = found.length - - if (n === 0) - return cb() - - var set = this.matches[index] = Object.create(null) - found.forEach(function (p, i) { - // If there's a problem with the stat, then it means that - // one or more of the links in the realpath couldn't be - // resolved. just return the abs value in that case. - p = self._makeAbs(p) - fs.realpath(p, self.realpathCache, function (er, real) { - if (!er) - set[real] = true - else if (er.syscall === 'stat') - set[p] = true - else - self.emit('error', er) // srsly wtf right here - - if (--n === 0) { - self.matches[index] = set - cb() - } - }) - }) -} - -Glob.prototype._mark = function (p) { - return common.mark(this, p) -} - -Glob.prototype._makeAbs = function (f) { - return common.makeAbs(this, f) -} - -Glob.prototype.abort = function () { - this.aborted = true - this.emit('abort') -} - -Glob.prototype.pause = function () { - if (!this.paused) { - this.paused = true - this.emit('pause') - } -} - -Glob.prototype.resume = function () { - if (this.paused) { - this.emit('resume') - this.paused = false - if (this._emitQueue.length) { - var eq = this._emitQueue.slice(0) - this._emitQueue.length = 0 - for (var i = 0; i < eq.length; i ++) { - var e = eq[i] - this._emitMatch(e[0], e[1]) - } - } - if (this._processQueue.length) { - var pq = this._processQueue.slice(0) - this._processQueue.length = 0 - for (var i = 0; i < pq.length; i ++) { - var p = pq[i] - this._processing-- - this._process(p[0], p[1], p[2], p[3]) - } - } - } -} - -Glob.prototype._process = function (pattern, index, inGlobStar, cb) { - assert(this instanceof Glob) - assert(typeof cb === 'function') - - if (this.aborted) - return - - this._processing++ - if (this.paused) { - this._processQueue.push([pattern, index, inGlobStar, cb]) - return - } - - //console.error('PROCESS %d', this._processing, pattern) - - // Get the first [n] parts of pattern that are all strings. - var n = 0 - while (typeof pattern[n] === 'string') { - n ++ - } - // now n is the index of the first one that is *not* a string. - - // see if there's anything else - var prefix - switch (n) { - // if not, then this is rather simple - case pattern.length: - this._processSimple(pattern.join('/'), index, cb) - return - - case 0: - // pattern *starts* with some non-trivial item. - // going to readdir(cwd), but not include the prefix in matches. - prefix = null - break - - default: - // pattern has some string bits in the front. - // whatever it starts with, whether that's 'absolute' like /foo/bar, - // or 'relative' like '../baz' - prefix = pattern.slice(0, n).join('/') - break - } - - var remain = pattern.slice(n) - - // get the list of entries. - var read - if (prefix === null) - read = '.' - else if (isAbsolute(prefix) || isAbsolute(pattern.join('/'))) { - if (!prefix || !isAbsolute(prefix)) - prefix = '/' + prefix - read = prefix - } else - read = prefix - - var abs = this._makeAbs(read) - - //if ignored, skip _processing - if (childrenIgnored(this, read)) - return cb() - - var isGlobStar = remain[0] === minimatch.GLOBSTAR - if (isGlobStar) - this._processGlobStar(prefix, read, abs, remain, index, inGlobStar, cb) - else - this._processReaddir(prefix, read, abs, remain, index, inGlobStar, cb) -} - -Glob.prototype._processReaddir = function (prefix, read, abs, remain, index, inGlobStar, cb) { - var self = this - this._readdir(abs, inGlobStar, function (er, entries) { - return self._processReaddir2(prefix, read, abs, remain, index, inGlobStar, entries, cb) - }) -} - -Glob.prototype._processReaddir2 = function (prefix, read, abs, remain, index, inGlobStar, entries, cb) { - - // if the abs isn't a dir, then nothing can match! - if (!entries) - return cb() - - // It will only match dot entries if it starts with a dot, or if - // dot is set. Stuff like @(.foo|.bar) isn't allowed. - var pn = remain[0] - var negate = !!this.minimatch.negate - var rawGlob = pn._glob - var dotOk = this.dot || rawGlob.charAt(0) === '.' - - var matchedEntries = [] - for (var i = 0; i < entries.length; i++) { - var e = entries[i] - if (e.charAt(0) !== '.' || dotOk) { - var m - if (negate && !prefix) { - m = !e.match(pn) - } else { - m = e.match(pn) - } - if (m) - matchedEntries.push(e) - } - } - - //console.error('prd2', prefix, entries, remain[0]._glob, matchedEntries) - - var len = matchedEntries.length - // If there are no matched entries, then nothing matches. - if (len === 0) - return cb() - - // if this is the last remaining pattern bit, then no need for - // an additional stat *unless* the user has specified mark or - // stat explicitly. We know they exist, since readdir returned - // them. - - if (remain.length === 1 && !this.mark && !this.stat) { - if (!this.matches[index]) - this.matches[index] = Object.create(null) - - for (var i = 0; i < len; i ++) { - var e = matchedEntries[i] - if (prefix) { - if (prefix !== '/') - e = prefix + '/' + e - else - e = prefix + e - } - - if (e.charAt(0) === '/' && !this.nomount) { - e = path.join(this.root, e) - } - this._emitMatch(index, e) - } - // This was the last one, and no stats were needed - return cb() - } - - // now test all matched entries as stand-ins for that part - // of the pattern. - remain.shift() - for (var i = 0; i < len; i ++) { - var e = matchedEntries[i] - var newPattern - if (prefix) { - if (prefix !== '/') - e = prefix + '/' + e - else - e = prefix + e - } - this._process([e].concat(remain), index, inGlobStar, cb) - } - cb() -} - -Glob.prototype._emitMatch = function (index, e) { - if (this.aborted) - return - - if (this.matches[index][e]) - return - - if (this.paused) { - this._emitQueue.push([index, e]) - return - } - - var abs = this._makeAbs(e) - - if (this.nodir) { - var c = this.cache[abs] - if (c === 'DIR' || Array.isArray(c)) - return - } - - if (this.mark) - e = this._mark(e) - - this.matches[index][e] = true - - var st = this.statCache[abs] - if (st) - this.emit('stat', e, st) - - this.emit('match', e) -} - -Glob.prototype._readdirInGlobStar = function (abs, cb) { - if (this.aborted) - return - - // follow all symlinked directories forever - // just proceed as if this is a non-globstar situation - if (this.follow) - return this._readdir(abs, false, cb) - - var lstatkey = 'lstat\0' + abs - var self = this - var lstatcb = inflight(lstatkey, lstatcb_) - - if (lstatcb) - fs.lstat(abs, lstatcb) - - function lstatcb_ (er, lstat) { - if (er) - return cb() - - var isSym = lstat.isSymbolicLink() - self.symlinks[abs] = isSym - - // If it's not a symlink or a dir, then it's definitely a regular file. - // don't bother doing a readdir in that case. - if (!isSym && !lstat.isDirectory()) { - self.cache[abs] = 'FILE' - cb() - } else - self._readdir(abs, false, cb) - } -} - -Glob.prototype._readdir = function (abs, inGlobStar, cb) { - if (this.aborted) - return - - cb = inflight('readdir\0'+abs+'\0'+inGlobStar, cb) - if (!cb) - return - - //console.error('RD %j %j', +inGlobStar, abs) - if (inGlobStar && !ownProp(this.symlinks, abs)) - return this._readdirInGlobStar(abs, cb) - - if (ownProp(this.cache, abs)) { - var c = this.cache[abs] - if (!c || c === 'FILE') - return cb() - - if (Array.isArray(c)) - return cb(null, c) - } - - var self = this - fs.readdir(abs, readdirCb(this, abs, cb)) -} - -function readdirCb (self, abs, cb) { - return function (er, entries) { - if (er) - self._readdirError(abs, er, cb) - else - self._readdirEntries(abs, entries, cb) - } -} - -Glob.prototype._readdirEntries = function (abs, entries, cb) { - if (this.aborted) - return - - // if we haven't asked to stat everything, then just - // assume that everything in there exists, so we can avoid - // having to stat it a second time. - if (!this.mark && !this.stat) { - for (var i = 0; i < entries.length; i ++) { - var e = entries[i] - if (abs === '/') - e = abs + e - else - e = abs + '/' + e - this.cache[e] = true - } - } - - this.cache[abs] = entries - return cb(null, entries) -} - -Glob.prototype._readdirError = function (f, er, cb) { - if (this.aborted) - return - - // handle errors, and cache the information - switch (er.code) { - case 'ENOTDIR': // totally normal. means it *does* exist. - this.cache[this._makeAbs(f)] = 'FILE' - break - - case 'ENOENT': // not terribly unusual - case 'ELOOP': - case 'ENAMETOOLONG': - case 'UNKNOWN': - this.cache[this._makeAbs(f)] = false - break - - default: // some unusual error. Treat as failure. - this.cache[this._makeAbs(f)] = false - if (this.strict) return this.emit('error', er) - if (!this.silent) console.error('glob error', er) - break - } - return cb() -} - -Glob.prototype._processGlobStar = function (prefix, read, abs, remain, index, inGlobStar, cb) { - var self = this - this._readdir(abs, inGlobStar, function (er, entries) { - self._processGlobStar2(prefix, read, abs, remain, index, inGlobStar, entries, cb) - }) -} - - -Glob.prototype._processGlobStar2 = function (prefix, read, abs, remain, index, inGlobStar, entries, cb) { - //console.error('pgs2', prefix, remain[0], entries) - - // no entries means not a dir, so it can never have matches - // foo.txt/** doesn't match foo.txt - if (!entries) - return cb() - - // test without the globstar, and with every child both below - // and replacing the globstar. - var remainWithoutGlobStar = remain.slice(1) - var gspref = prefix ? [ prefix ] : [] - var noGlobStar = gspref.concat(remainWithoutGlobStar) - - // the noGlobStar pattern exits the inGlobStar state - this._process(noGlobStar, index, false, cb) - - var isSym = this.symlinks[abs] - var len = entries.length - - // If it's a symlink, and we're in a globstar, then stop - if (isSym && inGlobStar) - return cb() - - for (var i = 0; i < len; i++) { - var e = entries[i] - if (e.charAt(0) === '.' && !this.dot) - continue - - // these two cases enter the inGlobStar state - var instead = gspref.concat(entries[i], remainWithoutGlobStar) - this._process(instead, index, true, cb) - - var below = gspref.concat(entries[i], remain) - this._process(below, index, true, cb) - } - - cb() -} - -Glob.prototype._processSimple = function (prefix, index, cb) { - // XXX review this. Shouldn't it be doing the mounting etc - // before doing stat? kinda weird? - var self = this - this._stat(prefix, function (er, exists) { - self._processSimple2(prefix, index, er, exists, cb) - }) -} -Glob.prototype._processSimple2 = function (prefix, index, er, exists, cb) { - - //console.error('ps2', prefix, exists) - - if (!this.matches[index]) - this.matches[index] = Object.create(null) - - // If it doesn't exist, then just mark the lack of results - if (!exists) - return cb() - - if (prefix && isAbsolute(prefix) && !this.nomount) { - var trail = /[\/\\]$/.test(prefix) - if (prefix.charAt(0) === '/') { - prefix = path.join(this.root, prefix) - } else { - prefix = path.resolve(this.root, prefix) - if (trail) - prefix += '/' - } - } - - if (process.platform === 'win32') - prefix = prefix.replace(/\\/g, '/') - - // Mark this as a match - this._emitMatch(index, prefix) - cb() -} - -// Returns either 'DIR', 'FILE', or false -Glob.prototype._stat = function (f, cb) { - var abs = this._makeAbs(f) - var needDir = f.slice(-1) === '/' - - if (f.length > this.maxLength) - return cb() - - if (!this.stat && ownProp(this.cache, abs)) { - var c = this.cache[abs] - - if (Array.isArray(c)) - c = 'DIR' - - // It exists, but maybe not how we need it - if (!needDir || c === 'DIR') - return cb(null, c) - - if (needDir && c === 'FILE') - return cb() - - // otherwise we have to stat, because maybe c=true - // if we know it exists, but not what it is. - } - - var exists - var stat = this.statCache[abs] - if (stat !== undefined) { - if (stat === false) - return cb(null, stat) - else { - var type = stat.isDirectory() ? 'DIR' : 'FILE' - if (needDir && type === 'FILE') - return cb() - else - return cb(null, type, stat) - } - } - - var self = this - var statcb = inflight('stat\0' + abs, lstatcb_) - if (statcb) - fs.lstat(abs, statcb) - - function lstatcb_ (er, lstat) { - if (lstat && lstat.isSymbolicLink()) { - // If it's a symlink, then treat it as the target, unless - // the target does not exist, then treat it as a file. - return fs.stat(abs, function (er, stat) { - if (er) - self._stat2(f, abs, null, lstat, cb) - else - self._stat2(f, abs, er, stat, cb) - }) - } else { - self._stat2(f, abs, er, lstat, cb) - } - } -} - -Glob.prototype._stat2 = function (f, abs, er, stat, cb) { - if (er) { - this.statCache[abs] = false - return cb() - } - - var needDir = f.slice(-1) === '/' - this.statCache[abs] = stat - - if (abs.slice(-1) === '/' && !stat.isDirectory()) - return cb(null, false, stat) - - var c = stat.isDirectory() ? 'DIR' : 'FILE' - this.cache[abs] = this.cache[abs] || c - - if (needDir && c !== 'DIR') - return cb() - - return cb(null, c, stat) -} diff --git a/node_modules/browserify/node_modules/glob/node_modules/inflight/LICENSE b/node_modules/browserify/node_modules/glob/node_modules/inflight/LICENSE deleted file mode 100644 index 05eeeb88..00000000 --- a/node_modules/browserify/node_modules/glob/node_modules/inflight/LICENSE +++ /dev/null @@ -1,15 +0,0 @@ -The ISC License - -Copyright (c) Isaac Z. Schlueter - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR -IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/node_modules/browserify/node_modules/glob/node_modules/inflight/README.md b/node_modules/browserify/node_modules/glob/node_modules/inflight/README.md deleted file mode 100644 index 6dc89291..00000000 --- a/node_modules/browserify/node_modules/glob/node_modules/inflight/README.md +++ /dev/null @@ -1,37 +0,0 @@ -# inflight - -Add callbacks to requests in flight to avoid async duplication - -## USAGE - -```javascript -var inflight = require('inflight') - -// some request that does some stuff -function req(key, callback) { - // key is any random string. like a url or filename or whatever. - // - // will return either a falsey value, indicating that the - // request for this key is already in flight, or a new callback - // which when called will call all callbacks passed to inflightk - // with the same key - callback = inflight(key, callback) - - // If we got a falsey value back, then there's already a req going - if (!callback) return - - // this is where you'd fetch the url or whatever - // callback is also once()-ified, so it can safely be assigned - // to multiple events etc. First call wins. - setTimeout(function() { - callback(null, key) - }, 100) -} - -// only assigns a single setTimeout -// when it dings, all cbs get called -req('foo', cb1) -req('foo', cb2) -req('foo', cb3) -req('foo', cb4) -``` diff --git a/node_modules/browserify/node_modules/glob/node_modules/inflight/inflight.js b/node_modules/browserify/node_modules/glob/node_modules/inflight/inflight.js deleted file mode 100644 index 48202b3c..00000000 --- a/node_modules/browserify/node_modules/glob/node_modules/inflight/inflight.js +++ /dev/null @@ -1,54 +0,0 @@ -var wrappy = require('wrappy') -var reqs = Object.create(null) -var once = require('once') - -module.exports = wrappy(inflight) - -function inflight (key, cb) { - if (reqs[key]) { - reqs[key].push(cb) - return null - } else { - reqs[key] = [cb] - return makeres(key) - } -} - -function makeres (key) { - return once(function RES () { - var cbs = reqs[key] - var len = cbs.length - var args = slice(arguments) - - // XXX It's somewhat ambiguous whether a new callback added in this - // pass should be queued for later execution if something in the - // list of callbacks throws, or if it should just be discarded. - // However, it's such an edge case that it hardly matters, and either - // choice is likely as surprising as the other. - // As it happens, we do go ahead and schedule it for later execution. - try { - for (var i = 0; i < len; i++) { - cbs[i].apply(null, args) - } - } finally { - if (cbs.length > len) { - // added more in the interim. - // de-zalgo, just in case, but don't call again. - cbs.splice(0, len) - process.nextTick(function () { - RES.apply(null, args) - }) - } else { - delete reqs[key] - } - } - }) -} - -function slice (args) { - var length = args.length - var array = [] - - for (var i = 0; i < length; i++) array[i] = args[i] - return array -} diff --git a/node_modules/browserify/node_modules/glob/node_modules/inflight/node_modules/wrappy/LICENSE b/node_modules/browserify/node_modules/glob/node_modules/inflight/node_modules/wrappy/LICENSE deleted file mode 100644 index 19129e31..00000000 --- a/node_modules/browserify/node_modules/glob/node_modules/inflight/node_modules/wrappy/LICENSE +++ /dev/null @@ -1,15 +0,0 @@ -The ISC License - -Copyright (c) Isaac Z. Schlueter and Contributors - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR -IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/node_modules/browserify/node_modules/glob/node_modules/inflight/node_modules/wrappy/README.md b/node_modules/browserify/node_modules/glob/node_modules/inflight/node_modules/wrappy/README.md deleted file mode 100644 index 98eab252..00000000 --- a/node_modules/browserify/node_modules/glob/node_modules/inflight/node_modules/wrappy/README.md +++ /dev/null @@ -1,36 +0,0 @@ -# wrappy - -Callback wrapping utility - -## USAGE - -```javascript -var wrappy = require("wrappy") - -// var wrapper = wrappy(wrapperFunction) - -// make sure a cb is called only once -// See also: http://npm.im/once for this specific use case -var once = wrappy(function (cb) { - var called = false - return function () { - if (called) return - called = true - return cb.apply(this, arguments) - } -}) - -function printBoo () { - console.log('boo') -} -// has some rando property -printBoo.iAmBooPrinter = true - -var onlyPrintOnce = once(printBoo) - -onlyPrintOnce() // prints 'boo' -onlyPrintOnce() // does nothing - -// random property is retained! -assert.equal(onlyPrintOnce.iAmBooPrinter, true) -``` diff --git a/node_modules/browserify/node_modules/glob/node_modules/inflight/node_modules/wrappy/package.json b/node_modules/browserify/node_modules/glob/node_modules/inflight/node_modules/wrappy/package.json deleted file mode 100644 index de3bfd53..00000000 --- a/node_modules/browserify/node_modules/glob/node_modules/inflight/node_modules/wrappy/package.json +++ /dev/null @@ -1,63 +0,0 @@ -{ - "name": "wrappy", - "version": "1.0.2", - "description": "Callback wrapping utility", - "main": "wrappy.js", - "files": [ - "wrappy.js" - ], - "directories": { - "test": "test" - }, - "dependencies": {}, - "devDependencies": { - "tap": "^2.3.1" - }, - "scripts": { - "test": "tap --coverage test/*.js" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/npm/wrappy.git" - }, - "author": { - "name": "Isaac Z. Schlueter", - "email": "i@izs.me", - "url": "http://blog.izs.me/" - }, - "license": "ISC", - "bugs": { - "url": "https://github.com/npm/wrappy/issues" - }, - "homepage": "https://github.com/npm/wrappy", - "gitHead": "71d91b6dc5bdeac37e218c2cf03f9ab55b60d214", - "_id": "wrappy@1.0.2", - "_shasum": "b5243d8f3ec1aa35f1364605bc0d1036e30ab69f", - "_from": "wrappy@>=1.0.0 <2.0.0", - "_npmVersion": "3.9.1", - "_nodeVersion": "5.10.1", - "_npmUser": { - "name": "zkat", - "email": "kat@sykosomatic.org" - }, - "dist": { - "shasum": "b5243d8f3ec1aa35f1364605bc0d1036e30ab69f", - "tarball": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz" - }, - "maintainers": [ - { - "name": "isaacs", - "email": "i@izs.me" - }, - { - "name": "zkat", - "email": "kat@sykosomatic.org" - } - ], - "_npmOperationalInternal": { - "host": "packages-16-east.internal.npmjs.com", - "tmp": "tmp/wrappy-1.0.2.tgz_1463527848281_0.037129373755306005" - }, - "_resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", - "readme": "ERROR: No README data found!" -} diff --git a/node_modules/browserify/node_modules/glob/node_modules/inflight/node_modules/wrappy/wrappy.js b/node_modules/browserify/node_modules/glob/node_modules/inflight/node_modules/wrappy/wrappy.js deleted file mode 100644 index bb7e7d6f..00000000 --- a/node_modules/browserify/node_modules/glob/node_modules/inflight/node_modules/wrappy/wrappy.js +++ /dev/null @@ -1,33 +0,0 @@ -// Returns a wrapper function that returns a wrapped callback -// The wrapper function should do some stuff, and return a -// presumably different callback function. -// This makes sure that own properties are retained, so that -// decorations and such are not lost along the way. -module.exports = wrappy -function wrappy (fn, cb) { - if (fn && cb) return wrappy(fn)(cb) - - if (typeof fn !== 'function') - throw new TypeError('need wrapper function') - - Object.keys(fn).forEach(function (k) { - wrapper[k] = fn[k] - }) - - return wrapper - - function wrapper() { - var args = new Array(arguments.length) - for (var i = 0; i < args.length; i++) { - args[i] = arguments[i] - } - var ret = fn.apply(this, args) - var cb = args[args.length-1] - if (typeof ret === 'function' && ret !== cb) { - Object.keys(cb).forEach(function (k) { - ret[k] = cb[k] - }) - } - return ret - } -} diff --git a/node_modules/browserify/node_modules/glob/node_modules/inflight/package.json b/node_modules/browserify/node_modules/glob/node_modules/inflight/package.json deleted file mode 100644 index 60911dc1..00000000 --- a/node_modules/browserify/node_modules/glob/node_modules/inflight/package.json +++ /dev/null @@ -1,72 +0,0 @@ -{ - "name": "inflight", - "version": "1.0.6", - "description": "Add callbacks to requests in flight to avoid async duplication", - "main": "inflight.js", - "files": [ - "inflight.js" - ], - "dependencies": { - "once": "^1.3.0", - "wrappy": "1" - }, - "devDependencies": { - "tap": "^7.1.2" - }, - "scripts": { - "test": "tap test.js --100" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/npm/inflight.git" - }, - "author": { - "name": "Isaac Z. Schlueter", - "email": "i@izs.me", - "url": "http://blog.izs.me/" - }, - "bugs": { - "url": "https://github.com/isaacs/inflight/issues" - }, - "homepage": "https://github.com/isaacs/inflight", - "license": "ISC", - "gitHead": "a547881738c8f57b27795e584071d67cf6ac1a57", - "_id": "inflight@1.0.6", - "_shasum": "49bd6331d7d02d0c09bc910a1075ba8165b56df9", - "_from": "inflight@>=1.0.4 <2.0.0", - "_npmVersion": "3.10.7", - "_nodeVersion": "6.5.0", - "_npmUser": { - "name": "isaacs", - "email": "i@izs.me" - }, - "dist": { - "shasum": "49bd6331d7d02d0c09bc910a1075ba8165b56df9", - "tarball": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz" - }, - "maintainers": [ - { - "name": "iarna", - "email": "me@re-becca.org" - }, - { - "name": "isaacs", - "email": "i@izs.me" - }, - { - "name": "othiym23", - "email": "ogd@aoaioxxysz.net" - }, - { - "name": "zkat", - "email": "kat@sykosomatic.org" - } - ], - "_npmOperationalInternal": { - "host": "packages-16-east.internal.npmjs.com", - "tmp": "tmp/inflight-1.0.6.tgz_1476330807696_0.10388551792129874" - }, - "directories": {}, - "_resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", - "readme": "ERROR: No README data found!" -} diff --git a/node_modules/browserify/node_modules/glob/node_modules/minimatch/LICENSE b/node_modules/browserify/node_modules/glob/node_modules/minimatch/LICENSE deleted file mode 100644 index 19129e31..00000000 --- a/node_modules/browserify/node_modules/glob/node_modules/minimatch/LICENSE +++ /dev/null @@ -1,15 +0,0 @@ -The ISC License - -Copyright (c) Isaac Z. Schlueter and Contributors - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR -IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/node_modules/browserify/node_modules/glob/node_modules/minimatch/README.md b/node_modules/browserify/node_modules/glob/node_modules/minimatch/README.md deleted file mode 100644 index d458bc2e..00000000 --- a/node_modules/browserify/node_modules/glob/node_modules/minimatch/README.md +++ /dev/null @@ -1,216 +0,0 @@ -# minimatch - -A minimal matching utility. - -[![Build Status](https://secure.travis-ci.org/isaacs/minimatch.png)](http://travis-ci.org/isaacs/minimatch) - - -This is the matching library used internally by npm. - -It works by converting glob expressions into JavaScript `RegExp` -objects. - -## Usage - -```javascript -var minimatch = require("minimatch") - -minimatch("bar.foo", "*.foo") // true! -minimatch("bar.foo", "*.bar") // false! -minimatch("bar.foo", "*.+(bar|foo)", { debug: true }) // true, and noisy! -``` - -## Features - -Supports these glob features: - -* Brace Expansion -* Extended glob matching -* "Globstar" `**` matching - -See: - -* `man sh` -* `man bash` -* `man 3 fnmatch` -* `man 5 gitignore` - -## Minimatch Class - -Create a minimatch object by instanting the `minimatch.Minimatch` class. - -```javascript -var Minimatch = require("minimatch").Minimatch -var mm = new Minimatch(pattern, options) -``` - -### Properties - -* `pattern` The original pattern the minimatch object represents. -* `options` The options supplied to the constructor. -* `set` A 2-dimensional array of regexp or string expressions. - Each row in the - array corresponds to a brace-expanded pattern. Each item in the row - corresponds to a single path-part. For example, the pattern - `{a,b/c}/d` would expand to a set of patterns like: - - [ [ a, d ] - , [ b, c, d ] ] - - If a portion of the pattern doesn't have any "magic" in it - (that is, it's something like `"foo"` rather than `fo*o?`), then it - will be left as a string rather than converted to a regular - expression. - -* `regexp` Created by the `makeRe` method. A single regular expression - expressing the entire pattern. This is useful in cases where you wish - to use the pattern somewhat like `fnmatch(3)` with `FNM_PATH` enabled. -* `negate` True if the pattern is negated. -* `comment` True if the pattern is a comment. -* `empty` True if the pattern is `""`. - -### Methods - -* `makeRe` Generate the `regexp` member if necessary, and return it. - Will return `false` if the pattern is invalid. -* `match(fname)` Return true if the filename matches the pattern, or - false otherwise. -* `matchOne(fileArray, patternArray, partial)` Take a `/`-split - filename, and match it against a single row in the `regExpSet`. This - method is mainly for internal use, but is exposed so that it can be - used by a glob-walker that needs to avoid excessive filesystem calls. - -All other methods are internal, and will be called as necessary. - -## Functions - -The top-level exported function has a `cache` property, which is an LRU -cache set to store 100 items. So, calling these methods repeatedly -with the same pattern and options will use the same Minimatch object, -saving the cost of parsing it multiple times. - -### minimatch(path, pattern, options) - -Main export. Tests a path against the pattern using the options. - -```javascript -var isJS = minimatch(file, "*.js", { matchBase: true }) -``` - -### minimatch.filter(pattern, options) - -Returns a function that tests its -supplied argument, suitable for use with `Array.filter`. Example: - -```javascript -var javascripts = fileList.filter(minimatch.filter("*.js", {matchBase: true})) -``` - -### minimatch.match(list, pattern, options) - -Match against the list of -files, in the style of fnmatch or glob. If nothing is matched, and -options.nonull is set, then return a list containing the pattern itself. - -```javascript -var javascripts = minimatch.match(fileList, "*.js", {matchBase: true})) -``` - -### minimatch.makeRe(pattern, options) - -Make a regular expression object from the pattern. - -## Options - -All options are `false` by default. - -### debug - -Dump a ton of stuff to stderr. - -### nobrace - -Do not expand `{a,b}` and `{1..3}` brace sets. - -### noglobstar - -Disable `**` matching against multiple folder names. - -### dot - -Allow patterns to match filenames starting with a period, even if -the pattern does not explicitly have a period in that spot. - -Note that by default, `a/**/b` will **not** match `a/.d/b`, unless `dot` -is set. - -### noext - -Disable "extglob" style patterns like `+(a|b)`. - -### nocase - -Perform a case-insensitive match. - -### nonull - -When a match is not found by `minimatch.match`, return a list containing -the pattern itself if this option is set. When not set, an empty list -is returned if there are no matches. - -### matchBase - -If set, then patterns without slashes will be matched -against the basename of the path if it contains slashes. For example, -`a?b` would match the path `/xyz/123/acb`, but not `/xyz/acb/123`. - -### nocomment - -Suppress the behavior of treating `#` at the start of a pattern as a -comment. - -### nonegate - -Suppress the behavior of treating a leading `!` character as negation. - -### flipNegate - -Returns from negate expressions the same as if they were not negated. -(Ie, true on a hit, false on a miss.) - - -## Comparisons to other fnmatch/glob implementations - -While strict compliance with the existing standards is a worthwhile -goal, some discrepancies exist between minimatch and other -implementations, and are intentional. - -If the pattern starts with a `!` character, then it is negated. Set the -`nonegate` flag to suppress this behavior, and treat leading `!` -characters normally. This is perhaps relevant if you wish to start the -pattern with a negative extglob pattern like `!(a|B)`. Multiple `!` -characters at the start of a pattern will negate the pattern multiple -times. - -If a pattern starts with `#`, then it is treated as a comment, and -will not match anything. Use `\#` to match a literal `#` at the -start of a line, or set the `nocomment` flag to suppress this behavior. - -The double-star character `**` is supported by default, unless the -`noglobstar` flag is set. This is supported in the manner of bsdglob -and bash 4.1, where `**` only has special significance if it is the only -thing in a path part. That is, `a/**/b` will match `a/x/y/b`, but -`a/**b` will not. - -If an escaped pattern has no matches, and the `nonull` flag is set, -then minimatch.match returns the pattern as-provided, rather than -interpreting the character escapes. For example, -`minimatch.match([], "\\*a\\?")` will return `"\\*a\\?"` rather than -`"*a?"`. This is akin to setting the `nullglob` option in bash, except -that it does not resolve escaped pattern characters. - -If brace expansion is not disabled, then it is performed before any -other interpretation of the glob pattern. Thus, a pattern like -`+(a|{b),c)}`, which would not be valid in bash or zsh, is expanded -**first** into the set of `+(a|b)` and `+(a|c)`, and those patterns are -checked for validity. Since those two are valid, matching proceeds. diff --git a/node_modules/browserify/node_modules/glob/node_modules/minimatch/browser.js b/node_modules/browserify/node_modules/glob/node_modules/minimatch/browser.js deleted file mode 100644 index 7d051592..00000000 --- a/node_modules/browserify/node_modules/glob/node_modules/minimatch/browser.js +++ /dev/null @@ -1,1159 +0,0 @@ -(function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.minimatch = f()}})(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o any number of characters -var star = qmark + '*?' - -// ** when dots are allowed. Anything goes, except .. and . -// not (^ or / followed by one or two dots followed by $ or /), -// followed by anything, any number of times. -var twoStarDot = '(?:(?!(?:\\\/|^)(?:\\.{1,2})($|\\\/)).)*?' - -// not a ^ or / followed by a dot, -// followed by anything, any number of times. -var twoStarNoDot = '(?:(?!(?:\\\/|^)\\.).)*?' - -// characters that need to be escaped in RegExp. -var reSpecials = charSet('().*{}+?[]^$\\!') - -// "abc" -> { a:true, b:true, c:true } -function charSet (s) { - return s.split('').reduce(function (set, c) { - set[c] = true - return set - }, {}) -} - -// normalizes slashes. -var slashSplit = /\/+/ - -minimatch.filter = filter -function filter (pattern, options) { - options = options || {} - return function (p, i, list) { - return minimatch(p, pattern, options) - } -} - -function ext (a, b) { - a = a || {} - b = b || {} - var t = {} - Object.keys(b).forEach(function (k) { - t[k] = b[k] - }) - Object.keys(a).forEach(function (k) { - t[k] = a[k] - }) - return t -} - -minimatch.defaults = function (def) { - if (!def || !Object.keys(def).length) return minimatch - - var orig = minimatch - - var m = function minimatch (p, pattern, options) { - return orig.minimatch(p, pattern, ext(def, options)) - } - - m.Minimatch = function Minimatch (pattern, options) { - return new orig.Minimatch(pattern, ext(def, options)) - } - - return m -} - -Minimatch.defaults = function (def) { - if (!def || !Object.keys(def).length) return Minimatch - return minimatch.defaults(def).Minimatch -} - -function minimatch (p, pattern, options) { - if (typeof pattern !== 'string') { - throw new TypeError('glob pattern string required') - } - - if (!options) options = {} - - // shortcut: comments match nothing. - if (!options.nocomment && pattern.charAt(0) === '#') { - return false - } - - // "" only matches "" - if (pattern.trim() === '') return p === '' - - return new Minimatch(pattern, options).match(p) -} - -function Minimatch (pattern, options) { - if (!(this instanceof Minimatch)) { - return new Minimatch(pattern, options) - } - - if (typeof pattern !== 'string') { - throw new TypeError('glob pattern string required') - } - - if (!options) options = {} - pattern = pattern.trim() - - // windows support: need to use /, not \ - if (path.sep !== '/') { - pattern = pattern.split(path.sep).join('/') - } - - this.options = options - this.set = [] - this.pattern = pattern - this.regexp = null - this.negate = false - this.comment = false - this.empty = false - - // make the set of regexps etc. - this.make() -} - -Minimatch.prototype.debug = function () {} - -Minimatch.prototype.make = make -function make () { - // don't do it more than once. - if (this._made) return - - var pattern = this.pattern - var options = this.options - - // empty patterns and comments match nothing. - if (!options.nocomment && pattern.charAt(0) === '#') { - this.comment = true - return - } - if (!pattern) { - this.empty = true - return - } - - // step 1: figure out negation, etc. - this.parseNegate() - - // step 2: expand braces - var set = this.globSet = this.braceExpand() - - if (options.debug) this.debug = console.error - - this.debug(this.pattern, set) - - // step 3: now we have a set, so turn each one into a series of path-portion - // matching patterns. - // These will be regexps, except in the case of "**", which is - // set to the GLOBSTAR object for globstar behavior, - // and will not contain any / characters - set = this.globParts = set.map(function (s) { - return s.split(slashSplit) - }) - - this.debug(this.pattern, set) - - // glob --> regexps - set = set.map(function (s, si, set) { - return s.map(this.parse, this) - }, this) - - this.debug(this.pattern, set) - - // filter out everything that didn't compile properly. - set = set.filter(function (s) { - return s.indexOf(false) === -1 - }) - - this.debug(this.pattern, set) - - this.set = set -} - -Minimatch.prototype.parseNegate = parseNegate -function parseNegate () { - var pattern = this.pattern - var negate = false - var options = this.options - var negateOffset = 0 - - if (options.nonegate) return - - for (var i = 0, l = pattern.length - ; i < l && pattern.charAt(i) === '!' - ; i++) { - negate = !negate - negateOffset++ - } - - if (negateOffset) this.pattern = pattern.substr(negateOffset) - this.negate = negate -} - -// Brace expansion: -// a{b,c}d -> abd acd -// a{b,}c -> abc ac -// a{0..3}d -> a0d a1d a2d a3d -// a{b,c{d,e}f}g -> abg acdfg acefg -// a{b,c}d{e,f}g -> abdeg acdeg abdeg abdfg -// -// Invalid sets are not expanded. -// a{2..}b -> a{2..}b -// a{b}c -> a{b}c -minimatch.braceExpand = function (pattern, options) { - return braceExpand(pattern, options) -} - -Minimatch.prototype.braceExpand = braceExpand - -function braceExpand (pattern, options) { - if (!options) { - if (this instanceof Minimatch) { - options = this.options - } else { - options = {} - } - } - - pattern = typeof pattern === 'undefined' - ? this.pattern : pattern - - if (typeof pattern === 'undefined') { - throw new Error('undefined pattern') - } - - if (options.nobrace || - !pattern.match(/\{.*\}/)) { - // shortcut. no need to expand. - return [pattern] - } - - return expand(pattern) -} - -// parse a component of the expanded set. -// At this point, no pattern may contain "/" in it -// so we're going to return a 2d array, where each entry is the full -// pattern, split on '/', and then turned into a regular expression. -// A regexp is made at the end which joins each array with an -// escaped /, and another full one which joins each regexp with |. -// -// Following the lead of Bash 4.1, note that "**" only has special meaning -// when it is the *only* thing in a path portion. Otherwise, any series -// of * is equivalent to a single *. Globstar behavior is enabled by -// default, and can be disabled by setting options.noglobstar. -Minimatch.prototype.parse = parse -var SUBPARSE = {} -function parse (pattern, isSub) { - var options = this.options - - // shortcuts - if (!options.noglobstar && pattern === '**') return GLOBSTAR - if (pattern === '') return '' - - var re = '' - var hasMagic = !!options.nocase - var escaping = false - // ? => one single character - var patternListStack = [] - var negativeLists = [] - var plType - var stateChar - var inClass = false - var reClassStart = -1 - var classStart = -1 - // . and .. never match anything that doesn't start with ., - // even when options.dot is set. - var patternStart = pattern.charAt(0) === '.' ? '' // anything - // not (start or / followed by . or .. followed by / or end) - : options.dot ? '(?!(?:^|\\\/)\\.{1,2}(?:$|\\\/))' - : '(?!\\.)' - var self = this - - function clearStateChar () { - if (stateChar) { - // we had some state-tracking character - // that wasn't consumed by this pass. - switch (stateChar) { - case '*': - re += star - hasMagic = true - break - case '?': - re += qmark - hasMagic = true - break - default: - re += '\\' + stateChar - break - } - self.debug('clearStateChar %j %j', stateChar, re) - stateChar = false - } - } - - for (var i = 0, len = pattern.length, c - ; (i < len) && (c = pattern.charAt(i)) - ; i++) { - this.debug('%s\t%s %s %j', pattern, i, re, c) - - // skip over any that are escaped. - if (escaping && reSpecials[c]) { - re += '\\' + c - escaping = false - continue - } - - switch (c) { - case '/': - // completely not allowed, even escaped. - // Should already be path-split by now. - return false - - case '\\': - clearStateChar() - escaping = true - continue - - // the various stateChar values - // for the "extglob" stuff. - case '?': - case '*': - case '+': - case '@': - case '!': - this.debug('%s\t%s %s %j <-- stateChar', pattern, i, re, c) - - // all of those are literals inside a class, except that - // the glob [!a] means [^a] in regexp - if (inClass) { - this.debug(' in class') - if (c === '!' && i === classStart + 1) c = '^' - re += c - continue - } - - // if we already have a stateChar, then it means - // that there was something like ** or +? in there. - // Handle the stateChar, then proceed with this one. - self.debug('call clearStateChar %j', stateChar) - clearStateChar() - stateChar = c - // if extglob is disabled, then +(asdf|foo) isn't a thing. - // just clear the statechar *now*, rather than even diving into - // the patternList stuff. - if (options.noext) clearStateChar() - continue - - case '(': - if (inClass) { - re += '(' - continue - } - - if (!stateChar) { - re += '\\(' - continue - } - - plType = stateChar - patternListStack.push({ - type: plType, - start: i - 1, - reStart: re.length - }) - // negation is (?:(?!js)[^/]*) - re += stateChar === '!' ? '(?:(?!(?:' : '(?:' - this.debug('plType %j %j', stateChar, re) - stateChar = false - continue - - case ')': - if (inClass || !patternListStack.length) { - re += '\\)' - continue - } - - clearStateChar() - hasMagic = true - re += ')' - var pl = patternListStack.pop() - plType = pl.type - // negation is (?:(?!js)[^/]*) - // The others are (?:) - switch (plType) { - case '!': - negativeLists.push(pl) - re += ')[^/]*?)' - pl.reEnd = re.length - break - case '?': - case '+': - case '*': - re += plType - break - case '@': break // the default anyway - } - continue - - case '|': - if (inClass || !patternListStack.length || escaping) { - re += '\\|' - escaping = false - continue - } - - clearStateChar() - re += '|' - continue - - // these are mostly the same in regexp and glob - case '[': - // swallow any state-tracking char before the [ - clearStateChar() - - if (inClass) { - re += '\\' + c - continue - } - - inClass = true - classStart = i - reClassStart = re.length - re += c - continue - - case ']': - // a right bracket shall lose its special - // meaning and represent itself in - // a bracket expression if it occurs - // first in the list. -- POSIX.2 2.8.3.2 - if (i === classStart + 1 || !inClass) { - re += '\\' + c - escaping = false - continue - } - - // handle the case where we left a class open. - // "[z-a]" is valid, equivalent to "\[z-a\]" - if (inClass) { - // split where the last [ was, make sure we don't have - // an invalid re. if so, re-walk the contents of the - // would-be class to re-translate any characters that - // were passed through as-is - // TODO: It would probably be faster to determine this - // without a try/catch and a new RegExp, but it's tricky - // to do safely. For now, this is safe and works. - var cs = pattern.substring(classStart + 1, i) - try { - RegExp('[' + cs + ']') - } catch (er) { - // not a valid class! - var sp = this.parse(cs, SUBPARSE) - re = re.substr(0, reClassStart) + '\\[' + sp[0] + '\\]' - hasMagic = hasMagic || sp[1] - inClass = false - continue - } - } - - // finish up the class. - hasMagic = true - inClass = false - re += c - continue - - default: - // swallow any state char that wasn't consumed - clearStateChar() - - if (escaping) { - // no need - escaping = false - } else if (reSpecials[c] - && !(c === '^' && inClass)) { - re += '\\' - } - - re += c - - } // switch - } // for - - // handle the case where we left a class open. - // "[abc" is valid, equivalent to "\[abc" - if (inClass) { - // split where the last [ was, and escape it - // this is a huge pita. We now have to re-walk - // the contents of the would-be class to re-translate - // any characters that were passed through as-is - cs = pattern.substr(classStart + 1) - sp = this.parse(cs, SUBPARSE) - re = re.substr(0, reClassStart) + '\\[' + sp[0] - hasMagic = hasMagic || sp[1] - } - - // handle the case where we had a +( thing at the *end* - // of the pattern. - // each pattern list stack adds 3 chars, and we need to go through - // and escape any | chars that were passed through as-is for the regexp. - // Go through and escape them, taking care not to double-escape any - // | chars that were already escaped. - for (pl = patternListStack.pop(); pl; pl = patternListStack.pop()) { - var tail = re.slice(pl.reStart + 3) - // maybe some even number of \, then maybe 1 \, followed by a | - tail = tail.replace(/((?:\\{2})*)(\\?)\|/g, function (_, $1, $2) { - if (!$2) { - // the | isn't already escaped, so escape it. - $2 = '\\' - } - - // need to escape all those slashes *again*, without escaping the - // one that we need for escaping the | character. As it works out, - // escaping an even number of slashes can be done by simply repeating - // it exactly after itself. That's why this trick works. - // - // I am sorry that you have to see this. - return $1 + $1 + $2 + '|' - }) - - this.debug('tail=%j\n %s', tail, tail) - var t = pl.type === '*' ? star - : pl.type === '?' ? qmark - : '\\' + pl.type - - hasMagic = true - re = re.slice(0, pl.reStart) + t + '\\(' + tail - } - - // handle trailing things that only matter at the very end. - clearStateChar() - if (escaping) { - // trailing \\ - re += '\\\\' - } - - // only need to apply the nodot start if the re starts with - // something that could conceivably capture a dot - var addPatternStart = false - switch (re.charAt(0)) { - case '.': - case '[': - case '(': addPatternStart = true - } - - // Hack to work around lack of negative lookbehind in JS - // A pattern like: *.!(x).!(y|z) needs to ensure that a name - // like 'a.xyz.yz' doesn't match. So, the first negative - // lookahead, has to look ALL the way ahead, to the end of - // the pattern. - for (var n = negativeLists.length - 1; n > -1; n--) { - var nl = negativeLists[n] - - var nlBefore = re.slice(0, nl.reStart) - var nlFirst = re.slice(nl.reStart, nl.reEnd - 8) - var nlLast = re.slice(nl.reEnd - 8, nl.reEnd) - var nlAfter = re.slice(nl.reEnd) - - nlLast += nlAfter - - // Handle nested stuff like *(*.js|!(*.json)), where open parens - // mean that we should *not* include the ) in the bit that is considered - // "after" the negated section. - var openParensBefore = nlBefore.split('(').length - 1 - var cleanAfter = nlAfter - for (i = 0; i < openParensBefore; i++) { - cleanAfter = cleanAfter.replace(/\)[+*?]?/, '') - } - nlAfter = cleanAfter - - var dollar = '' - if (nlAfter === '' && isSub !== SUBPARSE) { - dollar = '$' - } - var newRe = nlBefore + nlFirst + nlAfter + dollar + nlLast - re = newRe - } - - // if the re is not "" at this point, then we need to make sure - // it doesn't match against an empty path part. - // Otherwise a/* will match a/, which it should not. - if (re !== '' && hasMagic) { - re = '(?=.)' + re - } - - if (addPatternStart) { - re = patternStart + re - } - - // parsing just a piece of a larger pattern. - if (isSub === SUBPARSE) { - return [re, hasMagic] - } - - // skip the regexp for non-magical patterns - // unescape anything in it, though, so that it'll be - // an exact match against a file etc. - if (!hasMagic) { - return globUnescape(pattern) - } - - var flags = options.nocase ? 'i' : '' - var regExp = new RegExp('^' + re + '$', flags) - - regExp._glob = pattern - regExp._src = re - - return regExp -} - -minimatch.makeRe = function (pattern, options) { - return new Minimatch(pattern, options || {}).makeRe() -} - -Minimatch.prototype.makeRe = makeRe -function makeRe () { - if (this.regexp || this.regexp === false) return this.regexp - - // at this point, this.set is a 2d array of partial - // pattern strings, or "**". - // - // It's better to use .match(). This function shouldn't - // be used, really, but it's pretty convenient sometimes, - // when you just want to work with a regex. - var set = this.set - - if (!set.length) { - this.regexp = false - return this.regexp - } - var options = this.options - - var twoStar = options.noglobstar ? star - : options.dot ? twoStarDot - : twoStarNoDot - var flags = options.nocase ? 'i' : '' - - var re = set.map(function (pattern) { - return pattern.map(function (p) { - return (p === GLOBSTAR) ? twoStar - : (typeof p === 'string') ? regExpEscape(p) - : p._src - }).join('\\\/') - }).join('|') - - // must match entire pattern - // ending in a * or ** will make it less strict. - re = '^(?:' + re + ')$' - - // can match anything, as long as it's not this. - if (this.negate) re = '^(?!' + re + ').*$' - - try { - this.regexp = new RegExp(re, flags) - } catch (ex) { - this.regexp = false - } - return this.regexp -} - -minimatch.match = function (list, pattern, options) { - options = options || {} - var mm = new Minimatch(pattern, options) - list = list.filter(function (f) { - return mm.match(f) - }) - if (mm.options.nonull && !list.length) { - list.push(pattern) - } - return list -} - -Minimatch.prototype.match = match -function match (f, partial) { - this.debug('match', f, this.pattern) - // short-circuit in the case of busted things. - // comments, etc. - if (this.comment) return false - if (this.empty) return f === '' - - if (f === '/' && partial) return true - - var options = this.options - - // windows: need to use /, not \ - if (path.sep !== '/') { - f = f.split(path.sep).join('/') - } - - // treat the test path as a set of pathparts. - f = f.split(slashSplit) - this.debug(this.pattern, 'split', f) - - // just ONE of the pattern sets in this.set needs to match - // in order for it to be valid. If negating, then just one - // match means that we have failed. - // Either way, return on the first hit. - - var set = this.set - this.debug(this.pattern, 'set', set) - - // Find the basename of the path by looking for the last non-empty segment - var filename - var i - for (i = f.length - 1; i >= 0; i--) { - filename = f[i] - if (filename) break - } - - for (i = 0; i < set.length; i++) { - var pattern = set[i] - var file = f - if (options.matchBase && pattern.length === 1) { - file = [filename] - } - var hit = this.matchOne(file, pattern, partial) - if (hit) { - if (options.flipNegate) return true - return !this.negate - } - } - - // didn't get any hits. this is success if it's a negative - // pattern, failure otherwise. - if (options.flipNegate) return false - return this.negate -} - -// set partial to true to test if, for example, -// "/a/b" matches the start of "/*/b/*/d" -// Partial means, if you run out of file before you run -// out of pattern, then that's fine, as long as all -// the parts match. -Minimatch.prototype.matchOne = function (file, pattern, partial) { - var options = this.options - - this.debug('matchOne', - { 'this': this, file: file, pattern: pattern }) - - this.debug('matchOne', file.length, pattern.length) - - for (var fi = 0, - pi = 0, - fl = file.length, - pl = pattern.length - ; (fi < fl) && (pi < pl) - ; fi++, pi++) { - this.debug('matchOne loop') - var p = pattern[pi] - var f = file[fi] - - this.debug(pattern, p, f) - - // should be impossible. - // some invalid regexp stuff in the set. - if (p === false) return false - - if (p === GLOBSTAR) { - this.debug('GLOBSTAR', [pattern, p, f]) - - // "**" - // a/**/b/**/c would match the following: - // a/b/x/y/z/c - // a/x/y/z/b/c - // a/b/x/b/x/c - // a/b/c - // To do this, take the rest of the pattern after - // the **, and see if it would match the file remainder. - // If so, return success. - // If not, the ** "swallows" a segment, and try again. - // This is recursively awful. - // - // a/**/b/**/c matching a/b/x/y/z/c - // - a matches a - // - doublestar - // - matchOne(b/x/y/z/c, b/**/c) - // - b matches b - // - doublestar - // - matchOne(x/y/z/c, c) -> no - // - matchOne(y/z/c, c) -> no - // - matchOne(z/c, c) -> no - // - matchOne(c, c) yes, hit - var fr = fi - var pr = pi + 1 - if (pr === pl) { - this.debug('** at the end') - // a ** at the end will just swallow the rest. - // We have found a match. - // however, it will not swallow /.x, unless - // options.dot is set. - // . and .. are *never* matched by **, for explosively - // exponential reasons. - for (; fi < fl; fi++) { - if (file[fi] === '.' || file[fi] === '..' || - (!options.dot && file[fi].charAt(0) === '.')) return false - } - return true - } - - // ok, let's see if we can swallow whatever we can. - while (fr < fl) { - var swallowee = file[fr] - - this.debug('\nglobstar while', file, fr, pattern, pr, swallowee) - - // XXX remove this slice. Just pass the start index. - if (this.matchOne(file.slice(fr), pattern.slice(pr), partial)) { - this.debug('globstar found match!', fr, fl, swallowee) - // found a match. - return true - } else { - // can't swallow "." or ".." ever. - // can only swallow ".foo" when explicitly asked. - if (swallowee === '.' || swallowee === '..' || - (!options.dot && swallowee.charAt(0) === '.')) { - this.debug('dot detected!', file, fr, pattern, pr) - break - } - - // ** swallows a segment, and continue. - this.debug('globstar swallow a segment, and continue') - fr++ - } - } - - // no match was found. - // However, in partial mode, we can't say this is necessarily over. - // If there's more *pattern* left, then - if (partial) { - // ran out of file - this.debug('\n>>> no match, partial?', file, fr, pattern, pr) - if (fr === fl) return true - } - return false - } - - // something other than ** - // non-magic patterns just have to match exactly - // patterns with magic have been turned into regexps. - var hit - if (typeof p === 'string') { - if (options.nocase) { - hit = f.toLowerCase() === p.toLowerCase() - } else { - hit = f === p - } - this.debug('string match', p, f, hit) - } else { - hit = f.match(p) - this.debug('pattern match', p, f, hit) - } - - if (!hit) return false - } - - // Note: ending in / means that we'll get a final "" - // at the end of the pattern. This can only match a - // corresponding "" at the end of the file. - // If the file ends in /, then it can only match a - // a pattern that ends in /, unless the pattern just - // doesn't have any more for it. But, a/b/ should *not* - // match "a/b/*", even though "" matches against the - // [^/]*? pattern, except in partial mode, where it might - // simply not be reached yet. - // However, a/b/ should still satisfy a/* - - // now either we fell off the end of the pattern, or we're done. - if (fi === fl && pi === pl) { - // ran out of pattern and filename at the same time. - // an exact hit! - return true - } else if (fi === fl) { - // ran out of file, but still had pattern left. - // this is ok if we're doing the match as part of - // a glob fs traversal. - return partial - } else if (pi === pl) { - // ran out of pattern, still have file left. - // this is only acceptable if we're on the very last - // empty segment of a file with a trailing slash. - // a/* should match a/b/ - var emptyFileEnd = (fi === fl - 1) && (file[fi] === '') - return emptyFileEnd - } - - // should be unreachable. - throw new Error('wtf?') -} - -// replace stuff like \* with * -function globUnescape (s) { - return s.replace(/\\(.)/g, '$1') -} - -function regExpEscape (s) { - return s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, '\\$&') -} - -},{"brace-expansion":2,"path":undefined}],2:[function(require,module,exports){ -var concatMap = require('concat-map'); -var balanced = require('balanced-match'); - -module.exports = expandTop; - -var escSlash = '\0SLASH'+Math.random()+'\0'; -var escOpen = '\0OPEN'+Math.random()+'\0'; -var escClose = '\0CLOSE'+Math.random()+'\0'; -var escComma = '\0COMMA'+Math.random()+'\0'; -var escPeriod = '\0PERIOD'+Math.random()+'\0'; - -function numeric(str) { - return parseInt(str, 10) == str - ? parseInt(str, 10) - : str.charCodeAt(0); -} - -function escapeBraces(str) { - return str.split('\\\\').join(escSlash) - .split('\\{').join(escOpen) - .split('\\}').join(escClose) - .split('\\,').join(escComma) - .split('\\.').join(escPeriod); -} - -function unescapeBraces(str) { - return str.split(escSlash).join('\\') - .split(escOpen).join('{') - .split(escClose).join('}') - .split(escComma).join(',') - .split(escPeriod).join('.'); -} - - -// Basically just str.split(","), but handling cases -// where we have nested braced sections, which should be -// treated as individual members, like {a,{b,c},d} -function parseCommaParts(str) { - if (!str) - return ['']; - - var parts = []; - var m = balanced('{', '}', str); - - if (!m) - return str.split(','); - - var pre = m.pre; - var body = m.body; - var post = m.post; - var p = pre.split(','); - - p[p.length-1] += '{' + body + '}'; - var postParts = parseCommaParts(post); - if (post.length) { - p[p.length-1] += postParts.shift(); - p.push.apply(p, postParts); - } - - parts.push.apply(parts, p); - - return parts; -} - -function expandTop(str) { - if (!str) - return []; - - var expansions = expand(escapeBraces(str)); - return expansions.filter(identity).map(unescapeBraces); -} - -function identity(e) { - return e; -} - -function embrace(str) { - return '{' + str + '}'; -} -function isPadded(el) { - return /^-?0\d/.test(el); -} - -function lte(i, y) { - return i <= y; -} -function gte(i, y) { - return i >= y; -} - -function expand(str) { - var expansions = []; - - var m = balanced('{', '}', str); - if (!m || /\$$/.test(m.pre)) return [str]; - - var isNumericSequence = /^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(m.body); - var isAlphaSequence = /^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(m.body); - var isSequence = isNumericSequence || isAlphaSequence; - var isOptions = /^(.*,)+(.+)?$/.test(m.body); - if (!isSequence && !isOptions) { - // {a},b} - if (m.post.match(/,.*}/)) { - str = m.pre + '{' + m.body + escClose + m.post; - return expand(str); - } - return [str]; - } - - var n; - if (isSequence) { - n = m.body.split(/\.\./); - } else { - n = parseCommaParts(m.body); - if (n.length === 1) { - // x{{a,b}}y ==> x{a}y x{b}y - n = expand(n[0]).map(embrace); - if (n.length === 1) { - var post = m.post.length - ? expand(m.post) - : ['']; - return post.map(function(p) { - return m.pre + n[0] + p; - }); - } - } - } - - // at this point, n is the parts, and we know it's not a comma set - // with a single entry. - - // no need to expand pre, since it is guaranteed to be free of brace-sets - var pre = m.pre; - var post = m.post.length - ? expand(m.post) - : ['']; - - var N; - - if (isSequence) { - var x = numeric(n[0]); - var y = numeric(n[1]); - var width = Math.max(n[0].length, n[1].length) - var incr = n.length == 3 - ? Math.abs(numeric(n[2])) - : 1; - var test = lte; - var reverse = y < x; - if (reverse) { - incr *= -1; - test = gte; - } - var pad = n.some(isPadded); - - N = []; - - for (var i = x; test(i, y); i += incr) { - var c; - if (isAlphaSequence) { - c = String.fromCharCode(i); - if (c === '\\') - c = ''; - } else { - c = String(i); - if (pad) { - var need = width - c.length; - if (need > 0) { - var z = new Array(need + 1).join('0'); - if (i < 0) - c = '-' + z + c.slice(1); - else - c = z + c; - } - } - } - N.push(c); - } - } else { - N = concatMap(n, function(el) { return expand(el) }); - } - - for (var j = 0; j < N.length; j++) { - for (var k = 0; k < post.length; k++) { - expansions.push([pre, N[j], post[k]].join('')) - } - } - - return expansions; -} - - -},{"balanced-match":3,"concat-map":4}],3:[function(require,module,exports){ -module.exports = balanced; -function balanced(a, b, str) { - var bal = 0; - var m = {}; - var ended = false; - - for (var i = 0; i < str.length; i++) { - if (a == str.substr(i, a.length)) { - if (!('start' in m)) m.start = i; - bal++; - } - else if (b == str.substr(i, b.length) && 'start' in m) { - ended = true; - bal--; - if (!bal) { - m.end = i; - m.pre = str.substr(0, m.start); - m.body = (m.end - m.start > 1) - ? str.substring(m.start + a.length, m.end) - : ''; - m.post = str.slice(m.end + b.length); - return m; - } - } - } - - // if we opened more than we closed, find the one we closed - if (bal && ended) { - var start = m.start + a.length; - m = balanced(a, b, str.substr(start)); - if (m) { - m.start += start; - m.end += start; - m.pre = str.slice(0, start) + m.pre; - } - return m; - } -} - -},{}],4:[function(require,module,exports){ -module.exports = function (xs, fn) { - var res = []; - for (var i = 0; i < xs.length; i++) { - var x = fn(xs[i], i); - if (Array.isArray(x)) res.push.apply(res, x); - else res.push(x); - } - return res; -}; - -},{}]},{},[1])(1) -}); \ No newline at end of file diff --git a/node_modules/browserify/node_modules/glob/node_modules/minimatch/minimatch.js b/node_modules/browserify/node_modules/glob/node_modules/minimatch/minimatch.js deleted file mode 100644 index ec4c05c5..00000000 --- a/node_modules/browserify/node_modules/glob/node_modules/minimatch/minimatch.js +++ /dev/null @@ -1,912 +0,0 @@ -module.exports = minimatch -minimatch.Minimatch = Minimatch - -var path = { sep: '/' } -try { - path = require('path') -} catch (er) {} - -var GLOBSTAR = minimatch.GLOBSTAR = Minimatch.GLOBSTAR = {} -var expand = require('brace-expansion') - -// any single thing other than / -// don't need to escape / when using new RegExp() -var qmark = '[^/]' - -// * => any number of characters -var star = qmark + '*?' - -// ** when dots are allowed. Anything goes, except .. and . -// not (^ or / followed by one or two dots followed by $ or /), -// followed by anything, any number of times. -var twoStarDot = '(?:(?!(?:\\\/|^)(?:\\.{1,2})($|\\\/)).)*?' - -// not a ^ or / followed by a dot, -// followed by anything, any number of times. -var twoStarNoDot = '(?:(?!(?:\\\/|^)\\.).)*?' - -// characters that need to be escaped in RegExp. -var reSpecials = charSet('().*{}+?[]^$\\!') - -// "abc" -> { a:true, b:true, c:true } -function charSet (s) { - return s.split('').reduce(function (set, c) { - set[c] = true - return set - }, {}) -} - -// normalizes slashes. -var slashSplit = /\/+/ - -minimatch.filter = filter -function filter (pattern, options) { - options = options || {} - return function (p, i, list) { - return minimatch(p, pattern, options) - } -} - -function ext (a, b) { - a = a || {} - b = b || {} - var t = {} - Object.keys(b).forEach(function (k) { - t[k] = b[k] - }) - Object.keys(a).forEach(function (k) { - t[k] = a[k] - }) - return t -} - -minimatch.defaults = function (def) { - if (!def || !Object.keys(def).length) return minimatch - - var orig = minimatch - - var m = function minimatch (p, pattern, options) { - return orig.minimatch(p, pattern, ext(def, options)) - } - - m.Minimatch = function Minimatch (pattern, options) { - return new orig.Minimatch(pattern, ext(def, options)) - } - - return m -} - -Minimatch.defaults = function (def) { - if (!def || !Object.keys(def).length) return Minimatch - return minimatch.defaults(def).Minimatch -} - -function minimatch (p, pattern, options) { - if (typeof pattern !== 'string') { - throw new TypeError('glob pattern string required') - } - - if (!options) options = {} - - // shortcut: comments match nothing. - if (!options.nocomment && pattern.charAt(0) === '#') { - return false - } - - // "" only matches "" - if (pattern.trim() === '') return p === '' - - return new Minimatch(pattern, options).match(p) -} - -function Minimatch (pattern, options) { - if (!(this instanceof Minimatch)) { - return new Minimatch(pattern, options) - } - - if (typeof pattern !== 'string') { - throw new TypeError('glob pattern string required') - } - - if (!options) options = {} - pattern = pattern.trim() - - // windows support: need to use /, not \ - if (path.sep !== '/') { - pattern = pattern.split(path.sep).join('/') - } - - this.options = options - this.set = [] - this.pattern = pattern - this.regexp = null - this.negate = false - this.comment = false - this.empty = false - - // make the set of regexps etc. - this.make() -} - -Minimatch.prototype.debug = function () {} - -Minimatch.prototype.make = make -function make () { - // don't do it more than once. - if (this._made) return - - var pattern = this.pattern - var options = this.options - - // empty patterns and comments match nothing. - if (!options.nocomment && pattern.charAt(0) === '#') { - this.comment = true - return - } - if (!pattern) { - this.empty = true - return - } - - // step 1: figure out negation, etc. - this.parseNegate() - - // step 2: expand braces - var set = this.globSet = this.braceExpand() - - if (options.debug) this.debug = console.error - - this.debug(this.pattern, set) - - // step 3: now we have a set, so turn each one into a series of path-portion - // matching patterns. - // These will be regexps, except in the case of "**", which is - // set to the GLOBSTAR object for globstar behavior, - // and will not contain any / characters - set = this.globParts = set.map(function (s) { - return s.split(slashSplit) - }) - - this.debug(this.pattern, set) - - // glob --> regexps - set = set.map(function (s, si, set) { - return s.map(this.parse, this) - }, this) - - this.debug(this.pattern, set) - - // filter out everything that didn't compile properly. - set = set.filter(function (s) { - return s.indexOf(false) === -1 - }) - - this.debug(this.pattern, set) - - this.set = set -} - -Minimatch.prototype.parseNegate = parseNegate -function parseNegate () { - var pattern = this.pattern - var negate = false - var options = this.options - var negateOffset = 0 - - if (options.nonegate) return - - for (var i = 0, l = pattern.length - ; i < l && pattern.charAt(i) === '!' - ; i++) { - negate = !negate - negateOffset++ - } - - if (negateOffset) this.pattern = pattern.substr(negateOffset) - this.negate = negate -} - -// Brace expansion: -// a{b,c}d -> abd acd -// a{b,}c -> abc ac -// a{0..3}d -> a0d a1d a2d a3d -// a{b,c{d,e}f}g -> abg acdfg acefg -// a{b,c}d{e,f}g -> abdeg acdeg abdeg abdfg -// -// Invalid sets are not expanded. -// a{2..}b -> a{2..}b -// a{b}c -> a{b}c -minimatch.braceExpand = function (pattern, options) { - return braceExpand(pattern, options) -} - -Minimatch.prototype.braceExpand = braceExpand - -function braceExpand (pattern, options) { - if (!options) { - if (this instanceof Minimatch) { - options = this.options - } else { - options = {} - } - } - - pattern = typeof pattern === 'undefined' - ? this.pattern : pattern - - if (typeof pattern === 'undefined') { - throw new Error('undefined pattern') - } - - if (options.nobrace || - !pattern.match(/\{.*\}/)) { - // shortcut. no need to expand. - return [pattern] - } - - return expand(pattern) -} - -// parse a component of the expanded set. -// At this point, no pattern may contain "/" in it -// so we're going to return a 2d array, where each entry is the full -// pattern, split on '/', and then turned into a regular expression. -// A regexp is made at the end which joins each array with an -// escaped /, and another full one which joins each regexp with |. -// -// Following the lead of Bash 4.1, note that "**" only has special meaning -// when it is the *only* thing in a path portion. Otherwise, any series -// of * is equivalent to a single *. Globstar behavior is enabled by -// default, and can be disabled by setting options.noglobstar. -Minimatch.prototype.parse = parse -var SUBPARSE = {} -function parse (pattern, isSub) { - var options = this.options - - // shortcuts - if (!options.noglobstar && pattern === '**') return GLOBSTAR - if (pattern === '') return '' - - var re = '' - var hasMagic = !!options.nocase - var escaping = false - // ? => one single character - var patternListStack = [] - var negativeLists = [] - var plType - var stateChar - var inClass = false - var reClassStart = -1 - var classStart = -1 - // . and .. never match anything that doesn't start with ., - // even when options.dot is set. - var patternStart = pattern.charAt(0) === '.' ? '' // anything - // not (start or / followed by . or .. followed by / or end) - : options.dot ? '(?!(?:^|\\\/)\\.{1,2}(?:$|\\\/))' - : '(?!\\.)' - var self = this - - function clearStateChar () { - if (stateChar) { - // we had some state-tracking character - // that wasn't consumed by this pass. - switch (stateChar) { - case '*': - re += star - hasMagic = true - break - case '?': - re += qmark - hasMagic = true - break - default: - re += '\\' + stateChar - break - } - self.debug('clearStateChar %j %j', stateChar, re) - stateChar = false - } - } - - for (var i = 0, len = pattern.length, c - ; (i < len) && (c = pattern.charAt(i)) - ; i++) { - this.debug('%s\t%s %s %j', pattern, i, re, c) - - // skip over any that are escaped. - if (escaping && reSpecials[c]) { - re += '\\' + c - escaping = false - continue - } - - switch (c) { - case '/': - // completely not allowed, even escaped. - // Should already be path-split by now. - return false - - case '\\': - clearStateChar() - escaping = true - continue - - // the various stateChar values - // for the "extglob" stuff. - case '?': - case '*': - case '+': - case '@': - case '!': - this.debug('%s\t%s %s %j <-- stateChar', pattern, i, re, c) - - // all of those are literals inside a class, except that - // the glob [!a] means [^a] in regexp - if (inClass) { - this.debug(' in class') - if (c === '!' && i === classStart + 1) c = '^' - re += c - continue - } - - // if we already have a stateChar, then it means - // that there was something like ** or +? in there. - // Handle the stateChar, then proceed with this one. - self.debug('call clearStateChar %j', stateChar) - clearStateChar() - stateChar = c - // if extglob is disabled, then +(asdf|foo) isn't a thing. - // just clear the statechar *now*, rather than even diving into - // the patternList stuff. - if (options.noext) clearStateChar() - continue - - case '(': - if (inClass) { - re += '(' - continue - } - - if (!stateChar) { - re += '\\(' - continue - } - - plType = stateChar - patternListStack.push({ - type: plType, - start: i - 1, - reStart: re.length - }) - // negation is (?:(?!js)[^/]*) - re += stateChar === '!' ? '(?:(?!(?:' : '(?:' - this.debug('plType %j %j', stateChar, re) - stateChar = false - continue - - case ')': - if (inClass || !patternListStack.length) { - re += '\\)' - continue - } - - clearStateChar() - hasMagic = true - re += ')' - var pl = patternListStack.pop() - plType = pl.type - // negation is (?:(?!js)[^/]*) - // The others are (?:) - switch (plType) { - case '!': - negativeLists.push(pl) - re += ')[^/]*?)' - pl.reEnd = re.length - break - case '?': - case '+': - case '*': - re += plType - break - case '@': break // the default anyway - } - continue - - case '|': - if (inClass || !patternListStack.length || escaping) { - re += '\\|' - escaping = false - continue - } - - clearStateChar() - re += '|' - continue - - // these are mostly the same in regexp and glob - case '[': - // swallow any state-tracking char before the [ - clearStateChar() - - if (inClass) { - re += '\\' + c - continue - } - - inClass = true - classStart = i - reClassStart = re.length - re += c - continue - - case ']': - // a right bracket shall lose its special - // meaning and represent itself in - // a bracket expression if it occurs - // first in the list. -- POSIX.2 2.8.3.2 - if (i === classStart + 1 || !inClass) { - re += '\\' + c - escaping = false - continue - } - - // handle the case where we left a class open. - // "[z-a]" is valid, equivalent to "\[z-a\]" - if (inClass) { - // split where the last [ was, make sure we don't have - // an invalid re. if so, re-walk the contents of the - // would-be class to re-translate any characters that - // were passed through as-is - // TODO: It would probably be faster to determine this - // without a try/catch and a new RegExp, but it's tricky - // to do safely. For now, this is safe and works. - var cs = pattern.substring(classStart + 1, i) - try { - RegExp('[' + cs + ']') - } catch (er) { - // not a valid class! - var sp = this.parse(cs, SUBPARSE) - re = re.substr(0, reClassStart) + '\\[' + sp[0] + '\\]' - hasMagic = hasMagic || sp[1] - inClass = false - continue - } - } - - // finish up the class. - hasMagic = true - inClass = false - re += c - continue - - default: - // swallow any state char that wasn't consumed - clearStateChar() - - if (escaping) { - // no need - escaping = false - } else if (reSpecials[c] - && !(c === '^' && inClass)) { - re += '\\' - } - - re += c - - } // switch - } // for - - // handle the case where we left a class open. - // "[abc" is valid, equivalent to "\[abc" - if (inClass) { - // split where the last [ was, and escape it - // this is a huge pita. We now have to re-walk - // the contents of the would-be class to re-translate - // any characters that were passed through as-is - cs = pattern.substr(classStart + 1) - sp = this.parse(cs, SUBPARSE) - re = re.substr(0, reClassStart) + '\\[' + sp[0] - hasMagic = hasMagic || sp[1] - } - - // handle the case where we had a +( thing at the *end* - // of the pattern. - // each pattern list stack adds 3 chars, and we need to go through - // and escape any | chars that were passed through as-is for the regexp. - // Go through and escape them, taking care not to double-escape any - // | chars that were already escaped. - for (pl = patternListStack.pop(); pl; pl = patternListStack.pop()) { - var tail = re.slice(pl.reStart + 3) - // maybe some even number of \, then maybe 1 \, followed by a | - tail = tail.replace(/((?:\\{2})*)(\\?)\|/g, function (_, $1, $2) { - if (!$2) { - // the | isn't already escaped, so escape it. - $2 = '\\' - } - - // need to escape all those slashes *again*, without escaping the - // one that we need for escaping the | character. As it works out, - // escaping an even number of slashes can be done by simply repeating - // it exactly after itself. That's why this trick works. - // - // I am sorry that you have to see this. - return $1 + $1 + $2 + '|' - }) - - this.debug('tail=%j\n %s', tail, tail) - var t = pl.type === '*' ? star - : pl.type === '?' ? qmark - : '\\' + pl.type - - hasMagic = true - re = re.slice(0, pl.reStart) + t + '\\(' + tail - } - - // handle trailing things that only matter at the very end. - clearStateChar() - if (escaping) { - // trailing \\ - re += '\\\\' - } - - // only need to apply the nodot start if the re starts with - // something that could conceivably capture a dot - var addPatternStart = false - switch (re.charAt(0)) { - case '.': - case '[': - case '(': addPatternStart = true - } - - // Hack to work around lack of negative lookbehind in JS - // A pattern like: *.!(x).!(y|z) needs to ensure that a name - // like 'a.xyz.yz' doesn't match. So, the first negative - // lookahead, has to look ALL the way ahead, to the end of - // the pattern. - for (var n = negativeLists.length - 1; n > -1; n--) { - var nl = negativeLists[n] - - var nlBefore = re.slice(0, nl.reStart) - var nlFirst = re.slice(nl.reStart, nl.reEnd - 8) - var nlLast = re.slice(nl.reEnd - 8, nl.reEnd) - var nlAfter = re.slice(nl.reEnd) - - nlLast += nlAfter - - // Handle nested stuff like *(*.js|!(*.json)), where open parens - // mean that we should *not* include the ) in the bit that is considered - // "after" the negated section. - var openParensBefore = nlBefore.split('(').length - 1 - var cleanAfter = nlAfter - for (i = 0; i < openParensBefore; i++) { - cleanAfter = cleanAfter.replace(/\)[+*?]?/, '') - } - nlAfter = cleanAfter - - var dollar = '' - if (nlAfter === '' && isSub !== SUBPARSE) { - dollar = '$' - } - var newRe = nlBefore + nlFirst + nlAfter + dollar + nlLast - re = newRe - } - - // if the re is not "" at this point, then we need to make sure - // it doesn't match against an empty path part. - // Otherwise a/* will match a/, which it should not. - if (re !== '' && hasMagic) { - re = '(?=.)' + re - } - - if (addPatternStart) { - re = patternStart + re - } - - // parsing just a piece of a larger pattern. - if (isSub === SUBPARSE) { - return [re, hasMagic] - } - - // skip the regexp for non-magical patterns - // unescape anything in it, though, so that it'll be - // an exact match against a file etc. - if (!hasMagic) { - return globUnescape(pattern) - } - - var flags = options.nocase ? 'i' : '' - var regExp = new RegExp('^' + re + '$', flags) - - regExp._glob = pattern - regExp._src = re - - return regExp -} - -minimatch.makeRe = function (pattern, options) { - return new Minimatch(pattern, options || {}).makeRe() -} - -Minimatch.prototype.makeRe = makeRe -function makeRe () { - if (this.regexp || this.regexp === false) return this.regexp - - // at this point, this.set is a 2d array of partial - // pattern strings, or "**". - // - // It's better to use .match(). This function shouldn't - // be used, really, but it's pretty convenient sometimes, - // when you just want to work with a regex. - var set = this.set - - if (!set.length) { - this.regexp = false - return this.regexp - } - var options = this.options - - var twoStar = options.noglobstar ? star - : options.dot ? twoStarDot - : twoStarNoDot - var flags = options.nocase ? 'i' : '' - - var re = set.map(function (pattern) { - return pattern.map(function (p) { - return (p === GLOBSTAR) ? twoStar - : (typeof p === 'string') ? regExpEscape(p) - : p._src - }).join('\\\/') - }).join('|') - - // must match entire pattern - // ending in a * or ** will make it less strict. - re = '^(?:' + re + ')$' - - // can match anything, as long as it's not this. - if (this.negate) re = '^(?!' + re + ').*$' - - try { - this.regexp = new RegExp(re, flags) - } catch (ex) { - this.regexp = false - } - return this.regexp -} - -minimatch.match = function (list, pattern, options) { - options = options || {} - var mm = new Minimatch(pattern, options) - list = list.filter(function (f) { - return mm.match(f) - }) - if (mm.options.nonull && !list.length) { - list.push(pattern) - } - return list -} - -Minimatch.prototype.match = match -function match (f, partial) { - this.debug('match', f, this.pattern) - // short-circuit in the case of busted things. - // comments, etc. - if (this.comment) return false - if (this.empty) return f === '' - - if (f === '/' && partial) return true - - var options = this.options - - // windows: need to use /, not \ - if (path.sep !== '/') { - f = f.split(path.sep).join('/') - } - - // treat the test path as a set of pathparts. - f = f.split(slashSplit) - this.debug(this.pattern, 'split', f) - - // just ONE of the pattern sets in this.set needs to match - // in order for it to be valid. If negating, then just one - // match means that we have failed. - // Either way, return on the first hit. - - var set = this.set - this.debug(this.pattern, 'set', set) - - // Find the basename of the path by looking for the last non-empty segment - var filename - var i - for (i = f.length - 1; i >= 0; i--) { - filename = f[i] - if (filename) break - } - - for (i = 0; i < set.length; i++) { - var pattern = set[i] - var file = f - if (options.matchBase && pattern.length === 1) { - file = [filename] - } - var hit = this.matchOne(file, pattern, partial) - if (hit) { - if (options.flipNegate) return true - return !this.negate - } - } - - // didn't get any hits. this is success if it's a negative - // pattern, failure otherwise. - if (options.flipNegate) return false - return this.negate -} - -// set partial to true to test if, for example, -// "/a/b" matches the start of "/*/b/*/d" -// Partial means, if you run out of file before you run -// out of pattern, then that's fine, as long as all -// the parts match. -Minimatch.prototype.matchOne = function (file, pattern, partial) { - var options = this.options - - this.debug('matchOne', - { 'this': this, file: file, pattern: pattern }) - - this.debug('matchOne', file.length, pattern.length) - - for (var fi = 0, - pi = 0, - fl = file.length, - pl = pattern.length - ; (fi < fl) && (pi < pl) - ; fi++, pi++) { - this.debug('matchOne loop') - var p = pattern[pi] - var f = file[fi] - - this.debug(pattern, p, f) - - // should be impossible. - // some invalid regexp stuff in the set. - if (p === false) return false - - if (p === GLOBSTAR) { - this.debug('GLOBSTAR', [pattern, p, f]) - - // "**" - // a/**/b/**/c would match the following: - // a/b/x/y/z/c - // a/x/y/z/b/c - // a/b/x/b/x/c - // a/b/c - // To do this, take the rest of the pattern after - // the **, and see if it would match the file remainder. - // If so, return success. - // If not, the ** "swallows" a segment, and try again. - // This is recursively awful. - // - // a/**/b/**/c matching a/b/x/y/z/c - // - a matches a - // - doublestar - // - matchOne(b/x/y/z/c, b/**/c) - // - b matches b - // - doublestar - // - matchOne(x/y/z/c, c) -> no - // - matchOne(y/z/c, c) -> no - // - matchOne(z/c, c) -> no - // - matchOne(c, c) yes, hit - var fr = fi - var pr = pi + 1 - if (pr === pl) { - this.debug('** at the end') - // a ** at the end will just swallow the rest. - // We have found a match. - // however, it will not swallow /.x, unless - // options.dot is set. - // . and .. are *never* matched by **, for explosively - // exponential reasons. - for (; fi < fl; fi++) { - if (file[fi] === '.' || file[fi] === '..' || - (!options.dot && file[fi].charAt(0) === '.')) return false - } - return true - } - - // ok, let's see if we can swallow whatever we can. - while (fr < fl) { - var swallowee = file[fr] - - this.debug('\nglobstar while', file, fr, pattern, pr, swallowee) - - // XXX remove this slice. Just pass the start index. - if (this.matchOne(file.slice(fr), pattern.slice(pr), partial)) { - this.debug('globstar found match!', fr, fl, swallowee) - // found a match. - return true - } else { - // can't swallow "." or ".." ever. - // can only swallow ".foo" when explicitly asked. - if (swallowee === '.' || swallowee === '..' || - (!options.dot && swallowee.charAt(0) === '.')) { - this.debug('dot detected!', file, fr, pattern, pr) - break - } - - // ** swallows a segment, and continue. - this.debug('globstar swallow a segment, and continue') - fr++ - } - } - - // no match was found. - // However, in partial mode, we can't say this is necessarily over. - // If there's more *pattern* left, then - if (partial) { - // ran out of file - this.debug('\n>>> no match, partial?', file, fr, pattern, pr) - if (fr === fl) return true - } - return false - } - - // something other than ** - // non-magic patterns just have to match exactly - // patterns with magic have been turned into regexps. - var hit - if (typeof p === 'string') { - if (options.nocase) { - hit = f.toLowerCase() === p.toLowerCase() - } else { - hit = f === p - } - this.debug('string match', p, f, hit) - } else { - hit = f.match(p) - this.debug('pattern match', p, f, hit) - } - - if (!hit) return false - } - - // Note: ending in / means that we'll get a final "" - // at the end of the pattern. This can only match a - // corresponding "" at the end of the file. - // If the file ends in /, then it can only match a - // a pattern that ends in /, unless the pattern just - // doesn't have any more for it. But, a/b/ should *not* - // match "a/b/*", even though "" matches against the - // [^/]*? pattern, except in partial mode, where it might - // simply not be reached yet. - // However, a/b/ should still satisfy a/* - - // now either we fell off the end of the pattern, or we're done. - if (fi === fl && pi === pl) { - // ran out of pattern and filename at the same time. - // an exact hit! - return true - } else if (fi === fl) { - // ran out of file, but still had pattern left. - // this is ok if we're doing the match as part of - // a glob fs traversal. - return partial - } else if (pi === pl) { - // ran out of pattern, still have file left. - // this is only acceptable if we're on the very last - // empty segment of a file with a trailing slash. - // a/* should match a/b/ - var emptyFileEnd = (fi === fl - 1) && (file[fi] === '') - return emptyFileEnd - } - - // should be unreachable. - throw new Error('wtf?') -} - -// replace stuff like \* with * -function globUnescape (s) { - return s.replace(/\\(.)/g, '$1') -} - -function regExpEscape (s) { - return s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, '\\$&') -} diff --git a/node_modules/browserify/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/README.md b/node_modules/browserify/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/README.md deleted file mode 100644 index 17939297..00000000 --- a/node_modules/browserify/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/README.md +++ /dev/null @@ -1,122 +0,0 @@ -# brace-expansion - -[Brace expansion](https://www.gnu.org/software/bash/manual/html_node/Brace-Expansion.html), -as known from sh/bash, in JavaScript. - -[![build status](https://secure.travis-ci.org/juliangruber/brace-expansion.svg)](http://travis-ci.org/juliangruber/brace-expansion) -[![downloads](https://img.shields.io/npm/dm/brace-expansion.svg)](https://www.npmjs.org/package/brace-expansion) - -[![testling badge](https://ci.testling.com/juliangruber/brace-expansion.png)](https://ci.testling.com/juliangruber/brace-expansion) - -## Example - -```js -var expand = require('brace-expansion'); - -expand('file-{a,b,c}.jpg') -// => ['file-a.jpg', 'file-b.jpg', 'file-c.jpg'] - -expand('-v{,,}') -// => ['-v', '-v', '-v'] - -expand('file{0..2}.jpg') -// => ['file0.jpg', 'file1.jpg', 'file2.jpg'] - -expand('file-{a..c}.jpg') -// => ['file-a.jpg', 'file-b.jpg', 'file-c.jpg'] - -expand('file{2..0}.jpg') -// => ['file2.jpg', 'file1.jpg', 'file0.jpg'] - -expand('file{0..4..2}.jpg') -// => ['file0.jpg', 'file2.jpg', 'file4.jpg'] - -expand('file-{a..e..2}.jpg') -// => ['file-a.jpg', 'file-c.jpg', 'file-e.jpg'] - -expand('file{00..10..5}.jpg') -// => ['file00.jpg', 'file05.jpg', 'file10.jpg'] - -expand('{{A..C},{a..c}}') -// => ['A', 'B', 'C', 'a', 'b', 'c'] - -expand('ppp{,config,oe{,conf}}') -// => ['ppp', 'pppconfig', 'pppoe', 'pppoeconf'] -``` - -## API - -```js -var expand = require('brace-expansion'); -``` - -### var expanded = expand(str) - -Return an array of all possible and valid expansions of `str`. If none are -found, `[str]` is returned. - -Valid expansions are: - -```js -/^(.*,)+(.+)?$/ -// {a,b,...} -``` - -A comma seperated list of options, like `{a,b}` or `{a,{b,c}}` or `{,a,}`. - -```js -/^-?\d+\.\.-?\d+(\.\.-?\d+)?$/ -// {x..y[..incr]} -``` - -A numeric sequence from `x` to `y` inclusive, with optional increment. -If `x` or `y` start with a leading `0`, all the numbers will be padded -to have equal length. Negative numbers and backwards iteration work too. - -```js -/^-?\d+\.\.-?\d+(\.\.-?\d+)?$/ -// {x..y[..incr]} -``` - -An alphabetic sequence from `x` to `y` inclusive, with optional increment. -`x` and `y` must be exactly one character, and if given, `incr` must be a -number. - -For compatibility reasons, the string `${` is not eligible for brace expansion. - -## Installation - -With [npm](https://npmjs.org) do: - -```bash -npm install brace-expansion -``` - -## Contributors - -- [Julian Gruber](https://github.com/juliangruber) -- [Isaac Z. Schlueter](https://github.com/isaacs) - -## License - -(MIT) - -Copyright (c) 2013 Julian Gruber <julian@juliangruber.com> - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies -of the Software, and to permit persons to whom the Software is furnished to do -so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/node_modules/browserify/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/index.js b/node_modules/browserify/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/index.js deleted file mode 100644 index 955f27c8..00000000 --- a/node_modules/browserify/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/index.js +++ /dev/null @@ -1,201 +0,0 @@ -var concatMap = require('concat-map'); -var balanced = require('balanced-match'); - -module.exports = expandTop; - -var escSlash = '\0SLASH'+Math.random()+'\0'; -var escOpen = '\0OPEN'+Math.random()+'\0'; -var escClose = '\0CLOSE'+Math.random()+'\0'; -var escComma = '\0COMMA'+Math.random()+'\0'; -var escPeriod = '\0PERIOD'+Math.random()+'\0'; - -function numeric(str) { - return parseInt(str, 10) == str - ? parseInt(str, 10) - : str.charCodeAt(0); -} - -function escapeBraces(str) { - return str.split('\\\\').join(escSlash) - .split('\\{').join(escOpen) - .split('\\}').join(escClose) - .split('\\,').join(escComma) - .split('\\.').join(escPeriod); -} - -function unescapeBraces(str) { - return str.split(escSlash).join('\\') - .split(escOpen).join('{') - .split(escClose).join('}') - .split(escComma).join(',') - .split(escPeriod).join('.'); -} - - -// Basically just str.split(","), but handling cases -// where we have nested braced sections, which should be -// treated as individual members, like {a,{b,c},d} -function parseCommaParts(str) { - if (!str) - return ['']; - - var parts = []; - var m = balanced('{', '}', str); - - if (!m) - return str.split(','); - - var pre = m.pre; - var body = m.body; - var post = m.post; - var p = pre.split(','); - - p[p.length-1] += '{' + body + '}'; - var postParts = parseCommaParts(post); - if (post.length) { - p[p.length-1] += postParts.shift(); - p.push.apply(p, postParts); - } - - parts.push.apply(parts, p); - - return parts; -} - -function expandTop(str) { - if (!str) - return []; - - // I don't know why Bash 4.3 does this, but it does. - // Anything starting with {} will have the first two bytes preserved - // but *only* at the top level, so {},a}b will not expand to anything, - // but a{},b}c will be expanded to [a}c,abc]. - // One could argue that this is a bug in Bash, but since the goal of - // this module is to match Bash's rules, we escape a leading {} - if (str.substr(0, 2) === '{}') { - str = '\\{\\}' + str.substr(2); - } - - return expand(escapeBraces(str), true).map(unescapeBraces); -} - -function identity(e) { - return e; -} - -function embrace(str) { - return '{' + str + '}'; -} -function isPadded(el) { - return /^-?0\d/.test(el); -} - -function lte(i, y) { - return i <= y; -} -function gte(i, y) { - return i >= y; -} - -function expand(str, isTop) { - var expansions = []; - - var m = balanced('{', '}', str); - if (!m || /\$$/.test(m.pre)) return [str]; - - var isNumericSequence = /^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(m.body); - var isAlphaSequence = /^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(m.body); - var isSequence = isNumericSequence || isAlphaSequence; - var isOptions = /^(.*,)+(.+)?$/.test(m.body); - if (!isSequence && !isOptions) { - // {a},b} - if (m.post.match(/,.*\}/)) { - str = m.pre + '{' + m.body + escClose + m.post; - return expand(str); - } - return [str]; - } - - var n; - if (isSequence) { - n = m.body.split(/\.\./); - } else { - n = parseCommaParts(m.body); - if (n.length === 1) { - // x{{a,b}}y ==> x{a}y x{b}y - n = expand(n[0], false).map(embrace); - if (n.length === 1) { - var post = m.post.length - ? expand(m.post, false) - : ['']; - return post.map(function(p) { - return m.pre + n[0] + p; - }); - } - } - } - - // at this point, n is the parts, and we know it's not a comma set - // with a single entry. - - // no need to expand pre, since it is guaranteed to be free of brace-sets - var pre = m.pre; - var post = m.post.length - ? expand(m.post, false) - : ['']; - - var N; - - if (isSequence) { - var x = numeric(n[0]); - var y = numeric(n[1]); - var width = Math.max(n[0].length, n[1].length) - var incr = n.length == 3 - ? Math.abs(numeric(n[2])) - : 1; - var test = lte; - var reverse = y < x; - if (reverse) { - incr *= -1; - test = gte; - } - var pad = n.some(isPadded); - - N = []; - - for (var i = x; test(i, y); i += incr) { - var c; - if (isAlphaSequence) { - c = String.fromCharCode(i); - if (c === '\\') - c = ''; - } else { - c = String(i); - if (pad) { - var need = width - c.length; - if (need > 0) { - var z = new Array(need + 1).join('0'); - if (i < 0) - c = '-' + z + c.slice(1); - else - c = z + c; - } - } - } - N.push(c); - } - } else { - N = concatMap(n, function(el) { return expand(el, false) }); - } - - for (var j = 0; j < N.length; j++) { - for (var k = 0; k < post.length; k++) { - var expansion = pre + N[j] + post[k]; - if (!isTop || isSequence || expansion) - expansions.push(expansion); - } - } - - return expansions; -} - diff --git a/node_modules/browserify/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/.npmignore b/node_modules/browserify/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/.npmignore deleted file mode 100644 index ae5d8c36..00000000 --- a/node_modules/browserify/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/.npmignore +++ /dev/null @@ -1,5 +0,0 @@ -test -.gitignore -.travis.yml -Makefile -example.js diff --git a/node_modules/browserify/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/LICENSE.md b/node_modules/browserify/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/LICENSE.md deleted file mode 100644 index 2cdc8e41..00000000 --- a/node_modules/browserify/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/LICENSE.md +++ /dev/null @@ -1,21 +0,0 @@ -(MIT) - -Copyright (c) 2013 Julian Gruber <julian@juliangruber.com> - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies -of the Software, and to permit persons to whom the Software is furnished to do -so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/node_modules/browserify/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/README.md b/node_modules/browserify/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/README.md deleted file mode 100644 index 08e918c0..00000000 --- a/node_modules/browserify/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/README.md +++ /dev/null @@ -1,91 +0,0 @@ -# balanced-match - -Match balanced string pairs, like `{` and `}` or `` and ``. Supports regular expressions as well! - -[![build status](https://secure.travis-ci.org/juliangruber/balanced-match.svg)](http://travis-ci.org/juliangruber/balanced-match) -[![downloads](https://img.shields.io/npm/dm/balanced-match.svg)](https://www.npmjs.org/package/balanced-match) - -[![testling badge](https://ci.testling.com/juliangruber/balanced-match.png)](https://ci.testling.com/juliangruber/balanced-match) - -## Example - -Get the first matching pair of braces: - -```js -var balanced = require('balanced-match'); - -console.log(balanced('{', '}', 'pre{in{nested}}post')); -console.log(balanced('{', '}', 'pre{first}between{second}post')); -console.log(balanced(/\s+\{\s+/, /\s+\}\s+/, 'pre { in{nest} } post')); -``` - -The matches are: - -```bash -$ node example.js -{ start: 3, end: 14, pre: 'pre', body: 'in{nested}', post: 'post' } -{ start: 3, - end: 9, - pre: 'pre', - body: 'first', - post: 'between{second}post' } -{ start: 3, end: 17, pre: 'pre', body: 'in{nest}', post: 'post' } -``` - -## API - -### var m = balanced(a, b, str) - -For the first non-nested matching pair of `a` and `b` in `str`, return an -object with those keys: - -* **start** the index of the first match of `a` -* **end** the index of the matching `b` -* **pre** the preamble, `a` and `b` not included -* **body** the match, `a` and `b` not included -* **post** the postscript, `a` and `b` not included - -If there's no match, `undefined` will be returned. - -If the `str` contains more `a` than `b` / there are unmatched pairs, the first match that was closed will be used. For example, `{{a}` will match `['{', 'a', '']` and `{a}}` will match `['', 'a', '}']`. - -### var r = balanced.range(a, b, str) - -For the first non-nested matching pair of `a` and `b` in `str`, return an -array with indexes: `[ , ]`. - -If there's no match, `undefined` will be returned. - -If the `str` contains more `a` than `b` / there are unmatched pairs, the first match that was closed will be used. For example, `{{a}` will match `[ 1, 3 ]` and `{a}}` will match `[0, 2]`. - -## Installation - -With [npm](https://npmjs.org) do: - -```bash -npm install balanced-match -``` - -## License - -(MIT) - -Copyright (c) 2013 Julian Gruber <julian@juliangruber.com> - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies -of the Software, and to permit persons to whom the Software is furnished to do -so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/node_modules/browserify/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/index.js b/node_modules/browserify/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/index.js deleted file mode 100644 index e8d85870..00000000 --- a/node_modules/browserify/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/index.js +++ /dev/null @@ -1,58 +0,0 @@ -module.exports = balanced; -function balanced(a, b, str) { - if (a instanceof RegExp) a = maybeMatch(a, str); - if (b instanceof RegExp) b = maybeMatch(b, str); - - var r = range(a, b, str); - - return r && { - start: r[0], - end: r[1], - pre: str.slice(0, r[0]), - body: str.slice(r[0] + a.length, r[1]), - post: str.slice(r[1] + b.length) - }; -} - -function maybeMatch(reg, str) { - var m = str.match(reg); - return m ? m[0] : null; -} - -balanced.range = range; -function range(a, b, str) { - var begs, beg, left, right, result; - var ai = str.indexOf(a); - var bi = str.indexOf(b, ai + 1); - var i = ai; - - if (ai >= 0 && bi > 0) { - begs = []; - left = str.length; - - while (i >= 0 && !result) { - if (i == ai) { - begs.push(i); - ai = str.indexOf(a, i + 1); - } else if (begs.length == 1) { - result = [ begs.pop(), bi ]; - } else { - beg = begs.pop(); - if (beg < left) { - left = beg; - right = bi; - } - - bi = str.indexOf(b, i + 1); - } - - i = ai < bi && ai >= 0 ? ai : bi; - } - - if (begs.length) { - result = [ left, right ]; - } - } - - return result; -} diff --git a/node_modules/browserify/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/package.json b/node_modules/browserify/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/package.json deleted file mode 100644 index 2557ddab..00000000 --- a/node_modules/browserify/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/package.json +++ /dev/null @@ -1,77 +0,0 @@ -{ - "name": "balanced-match", - "description": "Match balanced character pairs, like \"{\" and \"}\"", - "version": "0.4.2", - "repository": { - "type": "git", - "url": "git://github.com/juliangruber/balanced-match.git" - }, - "homepage": "https://github.com/juliangruber/balanced-match", - "main": "index.js", - "scripts": { - "test": "make test" - }, - "dependencies": {}, - "devDependencies": { - "tape": "^4.6.0" - }, - "keywords": [ - "match", - "regexp", - "test", - "balanced", - "parse" - ], - "author": { - "name": "Julian Gruber", - "email": "mail@juliangruber.com", - "url": "http://juliangruber.com" - }, - "license": "MIT", - "testling": { - "files": "test/*.js", - "browsers": [ - "ie/8..latest", - "firefox/20..latest", - "firefox/nightly", - "chrome/25..latest", - "chrome/canary", - "opera/12..latest", - "opera/next", - "safari/5.1..latest", - "ipad/6.0..latest", - "iphone/6.0..latest", - "android-browser/4.2..latest" - ] - }, - "gitHead": "57c2ea29d89a2844ae3bdcc637c6e2cbb73725e2", - "bugs": { - "url": "https://github.com/juliangruber/balanced-match/issues" - }, - "_id": "balanced-match@0.4.2", - "_shasum": "cb3f3e3c732dc0f01ee70b403f302e61d7709838", - "_from": "balanced-match@>=0.4.1 <0.5.0", - "_npmVersion": "2.15.8", - "_nodeVersion": "4.4.7", - "_npmUser": { - "name": "juliangruber", - "email": "julian@juliangruber.com" - }, - "dist": { - "shasum": "cb3f3e3c732dc0f01ee70b403f302e61d7709838", - "tarball": "https://registry.npmjs.org/balanced-match/-/balanced-match-0.4.2.tgz" - }, - "maintainers": [ - { - "name": "juliangruber", - "email": "julian@juliangruber.com" - } - ], - "_npmOperationalInternal": { - "host": "packages-16-east.internal.npmjs.com", - "tmp": "tmp/balanced-match-0.4.2.tgz_1468834991581_0.6590619895141572" - }, - "directories": {}, - "_resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-0.4.2.tgz", - "readme": "ERROR: No README data found!" -} diff --git a/node_modules/browserify/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map/.travis.yml b/node_modules/browserify/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map/.travis.yml deleted file mode 100644 index f1d0f13c..00000000 --- a/node_modules/browserify/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map/.travis.yml +++ /dev/null @@ -1,4 +0,0 @@ -language: node_js -node_js: - - 0.4 - - 0.6 diff --git a/node_modules/browserify/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map/LICENSE b/node_modules/browserify/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map/LICENSE deleted file mode 100644 index ee27ba4b..00000000 --- a/node_modules/browserify/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map/LICENSE +++ /dev/null @@ -1,18 +0,0 @@ -This software is released under the MIT license: - -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/node_modules/browserify/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map/README.markdown b/node_modules/browserify/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map/README.markdown deleted file mode 100644 index 408f70a1..00000000 --- a/node_modules/browserify/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map/README.markdown +++ /dev/null @@ -1,62 +0,0 @@ -concat-map -========== - -Concatenative mapdashery. - -[![browser support](http://ci.testling.com/substack/node-concat-map.png)](http://ci.testling.com/substack/node-concat-map) - -[![build status](https://secure.travis-ci.org/substack/node-concat-map.png)](http://travis-ci.org/substack/node-concat-map) - -example -======= - -``` js -var concatMap = require('concat-map'); -var xs = [ 1, 2, 3, 4, 5, 6 ]; -var ys = concatMap(xs, function (x) { - return x % 2 ? [ x - 0.1, x, x + 0.1 ] : []; -}); -console.dir(ys); -``` - -*** - -``` -[ 0.9, 1, 1.1, 2.9, 3, 3.1, 4.9, 5, 5.1 ] -``` - -methods -======= - -``` js -var concatMap = require('concat-map') -``` - -concatMap(xs, fn) ------------------ - -Return an array of concatenated elements by calling `fn(x, i)` for each element -`x` and each index `i` in the array `xs`. - -When `fn(x, i)` returns an array, its result will be concatenated with the -result array. If `fn(x, i)` returns anything else, that value will be pushed -onto the end of the result array. - -install -======= - -With [npm](http://npmjs.org) do: - -``` -npm install concat-map -``` - -license -======= - -MIT - -notes -===== - -This module was written while sitting high above the ground in a tree. diff --git a/node_modules/browserify/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map/example/map.js b/node_modules/browserify/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map/example/map.js deleted file mode 100644 index 33656217..00000000 --- a/node_modules/browserify/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map/example/map.js +++ /dev/null @@ -1,6 +0,0 @@ -var concatMap = require('../'); -var xs = [ 1, 2, 3, 4, 5, 6 ]; -var ys = concatMap(xs, function (x) { - return x % 2 ? [ x - 0.1, x, x + 0.1 ] : []; -}); -console.dir(ys); diff --git a/node_modules/browserify/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map/index.js b/node_modules/browserify/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map/index.js deleted file mode 100644 index b29a7812..00000000 --- a/node_modules/browserify/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map/index.js +++ /dev/null @@ -1,13 +0,0 @@ -module.exports = function (xs, fn) { - var res = []; - for (var i = 0; i < xs.length; i++) { - var x = fn(xs[i], i); - if (isArray(x)) res.push.apply(res, x); - else res.push(x); - } - return res; -}; - -var isArray = Array.isArray || function (xs) { - return Object.prototype.toString.call(xs) === '[object Array]'; -}; diff --git a/node_modules/browserify/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map/package.json b/node_modules/browserify/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map/package.json deleted file mode 100644 index ba4b5a86..00000000 --- a/node_modules/browserify/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map/package.json +++ /dev/null @@ -1,84 +0,0 @@ -{ - "name": "concat-map", - "description": "concatenative mapdashery", - "version": "0.0.1", - "repository": { - "type": "git", - "url": "git://github.com/substack/node-concat-map.git" - }, - "main": "index.js", - "keywords": [ - "concat", - "concatMap", - "map", - "functional", - "higher-order" - ], - "directories": { - "example": "example", - "test": "test" - }, - "scripts": { - "test": "tape test/*.js" - }, - "devDependencies": { - "tape": "~2.4.0" - }, - "license": "MIT", - "author": { - "name": "James Halliday", - "email": "mail@substack.net", - "url": "http://substack.net" - }, - "testling": { - "files": "test/*.js", - "browsers": { - "ie": [ - 6, - 7, - 8, - 9 - ], - "ff": [ - 3.5, - 10, - 15 - ], - "chrome": [ - 10, - 22 - ], - "safari": [ - 5.1 - ], - "opera": [ - 12 - ] - } - }, - "bugs": { - "url": "https://github.com/substack/node-concat-map/issues" - }, - "homepage": "https://github.com/substack/node-concat-map", - "_id": "concat-map@0.0.1", - "dist": { - "shasum": "d8a96bd77fd68df7793a73036a3ba0d5405d477b", - "tarball": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz" - }, - "_from": "concat-map@0.0.1", - "_npmVersion": "1.3.21", - "_npmUser": { - "name": "substack", - "email": "mail@substack.net" - }, - "maintainers": [ - { - "name": "substack", - "email": "mail@substack.net" - } - ], - "_shasum": "d8a96bd77fd68df7793a73036a3ba0d5405d477b", - "_resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", - "readme": "concat-map\n==========\n\nConcatenative mapdashery.\n\n[![browser support](http://ci.testling.com/substack/node-concat-map.png)](http://ci.testling.com/substack/node-concat-map)\n\n[![build status](https://secure.travis-ci.org/substack/node-concat-map.png)](http://travis-ci.org/substack/node-concat-map)\n\nexample\n=======\n\n``` js\nvar concatMap = require('concat-map');\nvar xs = [ 1, 2, 3, 4, 5, 6 ];\nvar ys = concatMap(xs, function (x) {\n return x % 2 ? [ x - 0.1, x, x + 0.1 ] : [];\n});\nconsole.dir(ys);\n```\n\n***\n\n```\n[ 0.9, 1, 1.1, 2.9, 3, 3.1, 4.9, 5, 5.1 ]\n```\n\nmethods\n=======\n\n``` js\nvar concatMap = require('concat-map')\n```\n\nconcatMap(xs, fn)\n-----------------\n\nReturn an array of concatenated elements by calling `fn(x, i)` for each element\n`x` and each index `i` in the array `xs`.\n\nWhen `fn(x, i)` returns an array, its result will be concatenated with the\nresult array. If `fn(x, i)` returns anything else, that value will be pushed\nonto the end of the result array.\n\ninstall\n=======\n\nWith [npm](http://npmjs.org) do:\n\n```\nnpm install concat-map\n```\n\nlicense\n=======\n\nMIT\n\nnotes\n=====\n\nThis module was written while sitting high above the ground in a tree.\n", - "readmeFilename": "README.markdown" -} diff --git a/node_modules/browserify/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map/test/map.js b/node_modules/browserify/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map/test/map.js deleted file mode 100644 index fdbd7022..00000000 --- a/node_modules/browserify/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map/test/map.js +++ /dev/null @@ -1,39 +0,0 @@ -var concatMap = require('../'); -var test = require('tape'); - -test('empty or not', function (t) { - var xs = [ 1, 2, 3, 4, 5, 6 ]; - var ixes = []; - var ys = concatMap(xs, function (x, ix) { - ixes.push(ix); - return x % 2 ? [ x - 0.1, x, x + 0.1 ] : []; - }); - t.same(ys, [ 0.9, 1, 1.1, 2.9, 3, 3.1, 4.9, 5, 5.1 ]); - t.same(ixes, [ 0, 1, 2, 3, 4, 5 ]); - t.end(); -}); - -test('always something', function (t) { - var xs = [ 'a', 'b', 'c', 'd' ]; - var ys = concatMap(xs, function (x) { - return x === 'b' ? [ 'B', 'B', 'B' ] : [ x ]; - }); - t.same(ys, [ 'a', 'B', 'B', 'B', 'c', 'd' ]); - t.end(); -}); - -test('scalars', function (t) { - var xs = [ 'a', 'b', 'c', 'd' ]; - var ys = concatMap(xs, function (x) { - return x === 'b' ? [ 'B', 'B', 'B' ] : x; - }); - t.same(ys, [ 'a', 'B', 'B', 'B', 'c', 'd' ]); - t.end(); -}); - -test('undefs', function (t) { - var xs = [ 'a', 'b', 'c', 'd' ]; - var ys = concatMap(xs, function () {}); - t.same(ys, [ undefined, undefined, undefined, undefined ]); - t.end(); -}); diff --git a/node_modules/browserify/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/package.json b/node_modules/browserify/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/package.json deleted file mode 100644 index e00a73ad..00000000 --- a/node_modules/browserify/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/package.json +++ /dev/null @@ -1,79 +0,0 @@ -{ - "name": "brace-expansion", - "description": "Brace expansion as known from sh/bash", - "version": "1.1.6", - "repository": { - "type": "git", - "url": "git://github.com/juliangruber/brace-expansion.git" - }, - "homepage": "https://github.com/juliangruber/brace-expansion", - "main": "index.js", - "scripts": { - "test": "tape test/*.js", - "gentest": "bash test/generate.sh" - }, - "dependencies": { - "balanced-match": "^0.4.1", - "concat-map": "0.0.1" - }, - "devDependencies": { - "tape": "^4.6.0" - }, - "keywords": [], - "author": { - "name": "Julian Gruber", - "email": "mail@juliangruber.com", - "url": "http://juliangruber.com" - }, - "license": "MIT", - "testling": { - "files": "test/*.js", - "browsers": [ - "ie/8..latest", - "firefox/20..latest", - "firefox/nightly", - "chrome/25..latest", - "chrome/canary", - "opera/12..latest", - "opera/next", - "safari/5.1..latest", - "ipad/6.0..latest", - "iphone/6.0..latest", - "android-browser/4.2..latest" - ] - }, - "gitHead": "791262fa06625e9c5594cde529a21d82086af5f2", - "bugs": { - "url": "https://github.com/juliangruber/brace-expansion/issues" - }, - "_id": "brace-expansion@1.1.6", - "_shasum": "7197d7eaa9b87e648390ea61fc66c84427420df9", - "_from": "brace-expansion@>=1.0.0 <2.0.0", - "_npmVersion": "2.15.8", - "_nodeVersion": "4.4.7", - "_npmUser": { - "name": "juliangruber", - "email": "julian@juliangruber.com" - }, - "dist": { - "shasum": "7197d7eaa9b87e648390ea61fc66c84427420df9", - "tarball": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.6.tgz" - }, - "maintainers": [ - { - "name": "juliangruber", - "email": "julian@juliangruber.com" - }, - { - "name": "isaacs", - "email": "isaacs@npmjs.com" - } - ], - "_npmOperationalInternal": { - "host": "packages-16-east.internal.npmjs.com", - "tmp": "tmp/brace-expansion-1.1.6.tgz_1469047715600_0.9362958471756428" - }, - "directories": {}, - "_resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.6.tgz", - "readme": "ERROR: No README data found!" -} diff --git a/node_modules/browserify/node_modules/glob/node_modules/minimatch/package.json b/node_modules/browserify/node_modules/glob/node_modules/minimatch/package.json deleted file mode 100644 index 3dc6beb4..00000000 --- a/node_modules/browserify/node_modules/glob/node_modules/minimatch/package.json +++ /dev/null @@ -1,63 +0,0 @@ -{ - "author": { - "name": "Isaac Z. Schlueter", - "email": "i@izs.me", - "url": "http://blog.izs.me" - }, - "name": "minimatch", - "description": "a glob matcher in javascript", - "version": "2.0.10", - "repository": { - "type": "git", - "url": "git://github.com/isaacs/minimatch.git" - }, - "main": "minimatch.js", - "scripts": { - "posttest": "standard minimatch.js test/*.js", - "test": "tap test/*.js", - "prepublish": "browserify -o browser.js -e minimatch.js -s minimatch --bare" - }, - "engines": { - "node": "*" - }, - "dependencies": { - "brace-expansion": "^1.0.0" - }, - "devDependencies": { - "browserify": "^9.0.3", - "standard": "^3.7.2", - "tap": "^1.2.0" - }, - "license": "ISC", - "files": [ - "minimatch.js", - "browser.js" - ], - "gitHead": "6afb85f0c324b321f76a38df81891e562693e257", - "bugs": { - "url": "https://github.com/isaacs/minimatch/issues" - }, - "homepage": "https://github.com/isaacs/minimatch#readme", - "_id": "minimatch@2.0.10", - "_shasum": "8d087c39c6b38c001b97fca7ce6d0e1e80afbac7", - "_from": "minimatch@>=2.0.1 <3.0.0", - "_npmVersion": "3.1.0", - "_nodeVersion": "2.2.1", - "_npmUser": { - "name": "isaacs", - "email": "isaacs@npmjs.com" - }, - "dist": { - "shasum": "8d087c39c6b38c001b97fca7ce6d0e1e80afbac7", - "tarball": "http://registry.npmjs.org/minimatch/-/minimatch-2.0.10.tgz" - }, - "maintainers": [ - { - "name": "isaacs", - "email": "i@izs.me" - } - ], - "directories": {}, - "_resolved": "https://registry.npmjs.org/minimatch/-/minimatch-2.0.10.tgz", - "readme": "ERROR: No README data found!" -} diff --git a/node_modules/browserify/node_modules/glob/node_modules/once/LICENSE b/node_modules/browserify/node_modules/glob/node_modules/once/LICENSE deleted file mode 100644 index 19129e31..00000000 --- a/node_modules/browserify/node_modules/glob/node_modules/once/LICENSE +++ /dev/null @@ -1,15 +0,0 @@ -The ISC License - -Copyright (c) Isaac Z. Schlueter and Contributors - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR -IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/node_modules/browserify/node_modules/glob/node_modules/once/README.md b/node_modules/browserify/node_modules/glob/node_modules/once/README.md deleted file mode 100644 index 1f1ffca9..00000000 --- a/node_modules/browserify/node_modules/glob/node_modules/once/README.md +++ /dev/null @@ -1,79 +0,0 @@ -# once - -Only call a function once. - -## usage - -```javascript -var once = require('once') - -function load (file, cb) { - cb = once(cb) - loader.load('file') - loader.once('load', cb) - loader.once('error', cb) -} -``` - -Or add to the Function.prototype in a responsible way: - -```javascript -// only has to be done once -require('once').proto() - -function load (file, cb) { - cb = cb.once() - loader.load('file') - loader.once('load', cb) - loader.once('error', cb) -} -``` - -Ironically, the prototype feature makes this module twice as -complicated as necessary. - -To check whether you function has been called, use `fn.called`. Once the -function is called for the first time the return value of the original -function is saved in `fn.value` and subsequent calls will continue to -return this value. - -```javascript -var once = require('once') - -function load (cb) { - cb = once(cb) - var stream = createStream() - stream.once('data', cb) - stream.once('end', function () { - if (!cb.called) cb(new Error('not found')) - }) -} -``` - -## `once.strict(func)` - -Throw an error if the function is called twice. - -Some functions are expected to be called only once. Using `once` for them would -potentially hide logical errors. - -In the example below, the `greet` function has to call the callback only once: - -```javascript -function greet (name, cb) { - // return is missing from the if statement - // when no name is passed, the callback is called twice - if (!name) cb('Hello anonymous') - cb('Hello ' + name) -} - -function log (msg) { - console.log(msg) -} - -// this will print 'Hello anonymous' but the logical error will be missed -greet(null, once(msg)) - -// once.strict will print 'Hello anonymous' and throw an error when the callback will be called the second time -greet(null, once.strict(msg)) -``` diff --git a/node_modules/browserify/node_modules/glob/node_modules/once/node_modules/wrappy/LICENSE b/node_modules/browserify/node_modules/glob/node_modules/once/node_modules/wrappy/LICENSE deleted file mode 100644 index 19129e31..00000000 --- a/node_modules/browserify/node_modules/glob/node_modules/once/node_modules/wrappy/LICENSE +++ /dev/null @@ -1,15 +0,0 @@ -The ISC License - -Copyright (c) Isaac Z. Schlueter and Contributors - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR -IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/node_modules/browserify/node_modules/glob/node_modules/once/node_modules/wrappy/README.md b/node_modules/browserify/node_modules/glob/node_modules/once/node_modules/wrappy/README.md deleted file mode 100644 index 98eab252..00000000 --- a/node_modules/browserify/node_modules/glob/node_modules/once/node_modules/wrappy/README.md +++ /dev/null @@ -1,36 +0,0 @@ -# wrappy - -Callback wrapping utility - -## USAGE - -```javascript -var wrappy = require("wrappy") - -// var wrapper = wrappy(wrapperFunction) - -// make sure a cb is called only once -// See also: http://npm.im/once for this specific use case -var once = wrappy(function (cb) { - var called = false - return function () { - if (called) return - called = true - return cb.apply(this, arguments) - } -}) - -function printBoo () { - console.log('boo') -} -// has some rando property -printBoo.iAmBooPrinter = true - -var onlyPrintOnce = once(printBoo) - -onlyPrintOnce() // prints 'boo' -onlyPrintOnce() // does nothing - -// random property is retained! -assert.equal(onlyPrintOnce.iAmBooPrinter, true) -``` diff --git a/node_modules/browserify/node_modules/glob/node_modules/once/node_modules/wrappy/package.json b/node_modules/browserify/node_modules/glob/node_modules/once/node_modules/wrappy/package.json deleted file mode 100644 index de3bfd53..00000000 --- a/node_modules/browserify/node_modules/glob/node_modules/once/node_modules/wrappy/package.json +++ /dev/null @@ -1,63 +0,0 @@ -{ - "name": "wrappy", - "version": "1.0.2", - "description": "Callback wrapping utility", - "main": "wrappy.js", - "files": [ - "wrappy.js" - ], - "directories": { - "test": "test" - }, - "dependencies": {}, - "devDependencies": { - "tap": "^2.3.1" - }, - "scripts": { - "test": "tap --coverage test/*.js" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/npm/wrappy.git" - }, - "author": { - "name": "Isaac Z. Schlueter", - "email": "i@izs.me", - "url": "http://blog.izs.me/" - }, - "license": "ISC", - "bugs": { - "url": "https://github.com/npm/wrappy/issues" - }, - "homepage": "https://github.com/npm/wrappy", - "gitHead": "71d91b6dc5bdeac37e218c2cf03f9ab55b60d214", - "_id": "wrappy@1.0.2", - "_shasum": "b5243d8f3ec1aa35f1364605bc0d1036e30ab69f", - "_from": "wrappy@>=1.0.0 <2.0.0", - "_npmVersion": "3.9.1", - "_nodeVersion": "5.10.1", - "_npmUser": { - "name": "zkat", - "email": "kat@sykosomatic.org" - }, - "dist": { - "shasum": "b5243d8f3ec1aa35f1364605bc0d1036e30ab69f", - "tarball": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz" - }, - "maintainers": [ - { - "name": "isaacs", - "email": "i@izs.me" - }, - { - "name": "zkat", - "email": "kat@sykosomatic.org" - } - ], - "_npmOperationalInternal": { - "host": "packages-16-east.internal.npmjs.com", - "tmp": "tmp/wrappy-1.0.2.tgz_1463527848281_0.037129373755306005" - }, - "_resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", - "readme": "ERROR: No README data found!" -} diff --git a/node_modules/browserify/node_modules/glob/node_modules/once/node_modules/wrappy/wrappy.js b/node_modules/browserify/node_modules/glob/node_modules/once/node_modules/wrappy/wrappy.js deleted file mode 100644 index bb7e7d6f..00000000 --- a/node_modules/browserify/node_modules/glob/node_modules/once/node_modules/wrappy/wrappy.js +++ /dev/null @@ -1,33 +0,0 @@ -// Returns a wrapper function that returns a wrapped callback -// The wrapper function should do some stuff, and return a -// presumably different callback function. -// This makes sure that own properties are retained, so that -// decorations and such are not lost along the way. -module.exports = wrappy -function wrappy (fn, cb) { - if (fn && cb) return wrappy(fn)(cb) - - if (typeof fn !== 'function') - throw new TypeError('need wrapper function') - - Object.keys(fn).forEach(function (k) { - wrapper[k] = fn[k] - }) - - return wrapper - - function wrapper() { - var args = new Array(arguments.length) - for (var i = 0; i < args.length; i++) { - args[i] = arguments[i] - } - var ret = fn.apply(this, args) - var cb = args[args.length-1] - if (typeof ret === 'function' && ret !== cb) { - Object.keys(cb).forEach(function (k) { - ret[k] = cb[k] - }) - } - return ret - } -} diff --git a/node_modules/browserify/node_modules/glob/node_modules/once/once.js b/node_modules/browserify/node_modules/glob/node_modules/once/once.js deleted file mode 100644 index 23540673..00000000 --- a/node_modules/browserify/node_modules/glob/node_modules/once/once.js +++ /dev/null @@ -1,42 +0,0 @@ -var wrappy = require('wrappy') -module.exports = wrappy(once) -module.exports.strict = wrappy(onceStrict) - -once.proto = once(function () { - Object.defineProperty(Function.prototype, 'once', { - value: function () { - return once(this) - }, - configurable: true - }) - - Object.defineProperty(Function.prototype, 'onceStrict', { - value: function () { - return onceStrict(this) - }, - configurable: true - }) -}) - -function once (fn) { - var f = function () { - if (f.called) return f.value - f.called = true - return f.value = fn.apply(this, arguments) - } - f.called = false - return f -} - -function onceStrict (fn) { - var f = function () { - if (f.called) - throw new Error(f.onceError) - f.called = true - return f.value = fn.apply(this, arguments) - } - var name = fn.name || 'Function wrapped with `once`' - f.onceError = name + " shouldn't be called more than once" - f.called = false - return f -} diff --git a/node_modules/browserify/node_modules/glob/node_modules/once/package.json b/node_modules/browserify/node_modules/glob/node_modules/once/package.json deleted file mode 100644 index 98009972..00000000 --- a/node_modules/browserify/node_modules/glob/node_modules/once/package.json +++ /dev/null @@ -1,67 +0,0 @@ -{ - "name": "once", - "version": "1.4.0", - "description": "Run a function exactly one time", - "main": "once.js", - "directories": { - "test": "test" - }, - "dependencies": { - "wrappy": "1" - }, - "devDependencies": { - "tap": "^7.0.1" - }, - "scripts": { - "test": "tap test/*.js" - }, - "files": [ - "once.js" - ], - "repository": { - "type": "git", - "url": "git://github.com/isaacs/once.git" - }, - "keywords": [ - "once", - "function", - "one", - "single" - ], - "author": { - "name": "Isaac Z. Schlueter", - "email": "i@izs.me", - "url": "http://blog.izs.me/" - }, - "license": "ISC", - "gitHead": "0e614d9f5a7e6f0305c625f6b581f6d80b33b8a6", - "bugs": { - "url": "https://github.com/isaacs/once/issues" - }, - "homepage": "https://github.com/isaacs/once#readme", - "_id": "once@1.4.0", - "_shasum": "583b1aa775961d4b113ac17d9c50baef9dd76bd1", - "_from": "once@>=1.3.0 <2.0.0", - "_npmVersion": "3.10.7", - "_nodeVersion": "6.5.0", - "_npmUser": { - "name": "isaacs", - "email": "i@izs.me" - }, - "dist": { - "shasum": "583b1aa775961d4b113ac17d9c50baef9dd76bd1", - "tarball": "https://registry.npmjs.org/once/-/once-1.4.0.tgz" - }, - "maintainers": [ - { - "name": "isaacs", - "email": "i@izs.me" - } - ], - "_npmOperationalInternal": { - "host": "packages-12-west.internal.npmjs.com", - "tmp": "tmp/once-1.4.0.tgz_1473196269128_0.537820661207661" - }, - "_resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", - "readme": "ERROR: No README data found!" -} diff --git a/node_modules/browserify/node_modules/glob/package.json b/node_modules/browserify/node_modules/glob/package.json deleted file mode 100644 index e3216c40..00000000 --- a/node_modules/browserify/node_modules/glob/package.json +++ /dev/null @@ -1,72 +0,0 @@ -{ - "author": { - "name": "Isaac Z. Schlueter", - "email": "i@izs.me", - "url": "http://blog.izs.me/" - }, - "name": "glob", - "description": "a little globber", - "version": "4.5.3", - "repository": { - "type": "git", - "url": "git://github.com/isaacs/node-glob.git" - }, - "main": "glob.js", - "files": [ - "glob.js", - "sync.js", - "common.js" - ], - "engines": { - "node": "*" - }, - "dependencies": { - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^2.0.1", - "once": "^1.3.0" - }, - "devDependencies": { - "mkdirp": "0", - "rimraf": "^2.2.8", - "tap": "^0.5.0", - "tick": "0.0.6" - }, - "scripts": { - "prepublish": "npm run benchclean", - "profclean": "rm -f v8.log profile.txt", - "test": "npm run profclean && tap test/*.js", - "test-regen": "npm run profclean && TEST_REGEN=1 node test/00-setup.js", - "bench": "bash benchmark.sh", - "prof": "bash prof.sh && cat profile.txt", - "benchclean": "bash benchclean.sh" - }, - "license": "ISC", - "gitHead": "a4e461ab59a837eee80a4d8dbdbf5ae1054a646f", - "bugs": { - "url": "https://github.com/isaacs/node-glob/issues" - }, - "homepage": "https://github.com/isaacs/node-glob", - "_id": "glob@4.5.3", - "_shasum": "c6cb73d3226c1efef04de3c56d012f03377ee15f", - "_from": "glob@>=4.0.5 <5.0.0", - "_npmVersion": "2.7.1", - "_nodeVersion": "1.4.2", - "_npmUser": { - "name": "isaacs", - "email": "i@izs.me" - }, - "maintainers": [ - { - "name": "isaacs", - "email": "i@izs.me" - } - ], - "dist": { - "shasum": "c6cb73d3226c1efef04de3c56d012f03377ee15f", - "tarball": "http://registry.npmjs.org/glob/-/glob-4.5.3.tgz" - }, - "directories": {}, - "_resolved": "https://registry.npmjs.org/glob/-/glob-4.5.3.tgz", - "readme": "ERROR: No README data found!" -} diff --git a/node_modules/browserify/node_modules/glob/sync.js b/node_modules/browserify/node_modules/glob/sync.js deleted file mode 100644 index f4f5e36d..00000000 --- a/node_modules/browserify/node_modules/glob/sync.js +++ /dev/null @@ -1,457 +0,0 @@ -module.exports = globSync -globSync.GlobSync = GlobSync - -var fs = require('fs') -var minimatch = require('minimatch') -var Minimatch = minimatch.Minimatch -var Glob = require('./glob.js').Glob -var util = require('util') -var path = require('path') -var assert = require('assert') -var common = require('./common.js') -var alphasort = common.alphasort -var alphasorti = common.alphasorti -var isAbsolute = common.isAbsolute -var setopts = common.setopts -var ownProp = common.ownProp -var childrenIgnored = common.childrenIgnored - -function globSync (pattern, options) { - if (typeof options === 'function' || arguments.length === 3) - throw new TypeError('callback provided to sync glob\n'+ - 'See: https://github.com/isaacs/node-glob/issues/167') - - return new GlobSync(pattern, options).found -} - -function GlobSync (pattern, options) { - if (!pattern) - throw new Error('must provide pattern') - - if (typeof options === 'function' || arguments.length === 3) - throw new TypeError('callback provided to sync glob\n'+ - 'See: https://github.com/isaacs/node-glob/issues/167') - - if (!(this instanceof GlobSync)) - return new GlobSync(pattern, options) - - setopts(this, pattern, options) - - if (this.noprocess) - return this - - var n = this.minimatch.set.length - this.matches = new Array(n) - for (var i = 0; i < n; i ++) { - this._process(this.minimatch.set[i], i, false) - } - this._finish() -} - -GlobSync.prototype._finish = function () { - assert(this instanceof GlobSync) - if (this.realpath) { - var self = this - this.matches.forEach(function (matchset, index) { - var set = self.matches[index] = Object.create(null) - for (var p in matchset) { - try { - p = self._makeAbs(p) - var real = fs.realpathSync(p, this.realpathCache) - set[real] = true - } catch (er) { - if (er.syscall === 'stat') - set[self._makeAbs(p)] = true - else - throw er - } - } - }) - } - common.finish(this) -} - - -GlobSync.prototype._process = function (pattern, index, inGlobStar) { - assert(this instanceof GlobSync) - - // Get the first [n] parts of pattern that are all strings. - var n = 0 - while (typeof pattern[n] === 'string') { - n ++ - } - // now n is the index of the first one that is *not* a string. - - // See if there's anything else - var prefix - switch (n) { - // if not, then this is rather simple - case pattern.length: - this._processSimple(pattern.join('/'), index) - return - - case 0: - // pattern *starts* with some non-trivial item. - // going to readdir(cwd), but not include the prefix in matches. - prefix = null - break - - default: - // pattern has some string bits in the front. - // whatever it starts with, whether that's 'absolute' like /foo/bar, - // or 'relative' like '../baz' - prefix = pattern.slice(0, n).join('/') - break - } - - var remain = pattern.slice(n) - - // get the list of entries. - var read - if (prefix === null) - read = '.' - else if (isAbsolute(prefix) || isAbsolute(pattern.join('/'))) { - if (!prefix || !isAbsolute(prefix)) - prefix = '/' + prefix - read = prefix - } else - read = prefix - - var abs = this._makeAbs(read) - - //if ignored, skip processing - if (childrenIgnored(this, read)) - return - - var isGlobStar = remain[0] === minimatch.GLOBSTAR - if (isGlobStar) - this._processGlobStar(prefix, read, abs, remain, index, inGlobStar) - else - this._processReaddir(prefix, read, abs, remain, index, inGlobStar) -} - - -GlobSync.prototype._processReaddir = function (prefix, read, abs, remain, index, inGlobStar) { - var entries = this._readdir(abs, inGlobStar) - - // if the abs isn't a dir, then nothing can match! - if (!entries) - return - - // It will only match dot entries if it starts with a dot, or if - // dot is set. Stuff like @(.foo|.bar) isn't allowed. - var pn = remain[0] - var negate = !!this.minimatch.negate - var rawGlob = pn._glob - var dotOk = this.dot || rawGlob.charAt(0) === '.' - - var matchedEntries = [] - for (var i = 0; i < entries.length; i++) { - var e = entries[i] - if (e.charAt(0) !== '.' || dotOk) { - var m - if (negate && !prefix) { - m = !e.match(pn) - } else { - m = e.match(pn) - } - if (m) - matchedEntries.push(e) - } - } - - var len = matchedEntries.length - // If there are no matched entries, then nothing matches. - if (len === 0) - return - - // if this is the last remaining pattern bit, then no need for - // an additional stat *unless* the user has specified mark or - // stat explicitly. We know they exist, since readdir returned - // them. - - if (remain.length === 1 && !this.mark && !this.stat) { - if (!this.matches[index]) - this.matches[index] = Object.create(null) - - for (var i = 0; i < len; i ++) { - var e = matchedEntries[i] - if (prefix) { - if (prefix.slice(-1) !== '/') - e = prefix + '/' + e - else - e = prefix + e - } - - if (e.charAt(0) === '/' && !this.nomount) { - e = path.join(this.root, e) - } - this.matches[index][e] = true - } - // This was the last one, and no stats were needed - return - } - - // now test all matched entries as stand-ins for that part - // of the pattern. - remain.shift() - for (var i = 0; i < len; i ++) { - var e = matchedEntries[i] - var newPattern - if (prefix) - newPattern = [prefix, e] - else - newPattern = [e] - this._process(newPattern.concat(remain), index, inGlobStar) - } -} - - -GlobSync.prototype._emitMatch = function (index, e) { - var abs = this._makeAbs(e) - if (this.mark) - e = this._mark(e) - - if (this.matches[index][e]) - return - - if (this.nodir) { - var c = this.cache[this._makeAbs(e)] - if (c === 'DIR' || Array.isArray(c)) - return - } - - this.matches[index][e] = true - if (this.stat) - this._stat(e) -} - - -GlobSync.prototype._readdirInGlobStar = function (abs) { - // follow all symlinked directories forever - // just proceed as if this is a non-globstar situation - if (this.follow) - return this._readdir(abs, false) - - var entries - var lstat - var stat - try { - lstat = fs.lstatSync(abs) - } catch (er) { - // lstat failed, doesn't exist - return null - } - - var isSym = lstat.isSymbolicLink() - this.symlinks[abs] = isSym - - // If it's not a symlink or a dir, then it's definitely a regular file. - // don't bother doing a readdir in that case. - if (!isSym && !lstat.isDirectory()) - this.cache[abs] = 'FILE' - else - entries = this._readdir(abs, false) - - return entries -} - -GlobSync.prototype._readdir = function (abs, inGlobStar) { - var entries - - if (inGlobStar && !ownProp(this.symlinks, abs)) - return this._readdirInGlobStar(abs) - - if (ownProp(this.cache, abs)) { - var c = this.cache[abs] - if (!c || c === 'FILE') - return null - - if (Array.isArray(c)) - return c - } - - try { - return this._readdirEntries(abs, fs.readdirSync(abs)) - } catch (er) { - this._readdirError(abs, er) - return null - } -} - -GlobSync.prototype._readdirEntries = function (abs, entries) { - // if we haven't asked to stat everything, then just - // assume that everything in there exists, so we can avoid - // having to stat it a second time. - if (!this.mark && !this.stat) { - for (var i = 0; i < entries.length; i ++) { - var e = entries[i] - if (abs === '/') - e = abs + e - else - e = abs + '/' + e - this.cache[e] = true - } - } - - this.cache[abs] = entries - - // mark and cache dir-ness - return entries -} - -GlobSync.prototype._readdirError = function (f, er) { - // handle errors, and cache the information - switch (er.code) { - case 'ENOTDIR': // totally normal. means it *does* exist. - this.cache[this._makeAbs(f)] = 'FILE' - break - - case 'ENOENT': // not terribly unusual - case 'ELOOP': - case 'ENAMETOOLONG': - case 'UNKNOWN': - this.cache[this._makeAbs(f)] = false - break - - default: // some unusual error. Treat as failure. - this.cache[this._makeAbs(f)] = false - if (this.strict) throw er - if (!this.silent) console.error('glob error', er) - break - } -} - -GlobSync.prototype._processGlobStar = function (prefix, read, abs, remain, index, inGlobStar) { - - var entries = this._readdir(abs, inGlobStar) - - // no entries means not a dir, so it can never have matches - // foo.txt/** doesn't match foo.txt - if (!entries) - return - - // test without the globstar, and with every child both below - // and replacing the globstar. - var remainWithoutGlobStar = remain.slice(1) - var gspref = prefix ? [ prefix ] : [] - var noGlobStar = gspref.concat(remainWithoutGlobStar) - - // the noGlobStar pattern exits the inGlobStar state - this._process(noGlobStar, index, false) - - var len = entries.length - var isSym = this.symlinks[abs] - - // If it's a symlink, and we're in a globstar, then stop - if (isSym && inGlobStar) - return - - for (var i = 0; i < len; i++) { - var e = entries[i] - if (e.charAt(0) === '.' && !this.dot) - continue - - // these two cases enter the inGlobStar state - var instead = gspref.concat(entries[i], remainWithoutGlobStar) - this._process(instead, index, true) - - var below = gspref.concat(entries[i], remain) - this._process(below, index, true) - } -} - -GlobSync.prototype._processSimple = function (prefix, index) { - // XXX review this. Shouldn't it be doing the mounting etc - // before doing stat? kinda weird? - var exists = this._stat(prefix) - - if (!this.matches[index]) - this.matches[index] = Object.create(null) - - // If it doesn't exist, then just mark the lack of results - if (!exists) - return - - if (prefix && isAbsolute(prefix) && !this.nomount) { - var trail = /[\/\\]$/.test(prefix) - if (prefix.charAt(0) === '/') { - prefix = path.join(this.root, prefix) - } else { - prefix = path.resolve(this.root, prefix) - if (trail) - prefix += '/' - } - } - - if (process.platform === 'win32') - prefix = prefix.replace(/\\/g, '/') - - // Mark this as a match - this.matches[index][prefix] = true -} - -// Returns either 'DIR', 'FILE', or false -GlobSync.prototype._stat = function (f) { - var abs = this._makeAbs(f) - var needDir = f.slice(-1) === '/' - - if (f.length > this.maxLength) - return false - - if (!this.stat && ownProp(this.cache, abs)) { - var c = this.cache[abs] - - if (Array.isArray(c)) - c = 'DIR' - - // It exists, but maybe not how we need it - if (!needDir || c === 'DIR') - return c - - if (needDir && c === 'FILE') - return false - - // otherwise we have to stat, because maybe c=true - // if we know it exists, but not what it is. - } - - var exists - var stat = this.statCache[abs] - if (!stat) { - var lstat - try { - lstat = fs.lstatSync(abs) - } catch (er) { - return false - } - - if (lstat.isSymbolicLink()) { - try { - stat = fs.statSync(abs) - } catch (er) { - stat = lstat - } - } else { - stat = lstat - } - } - - this.statCache[abs] = stat - - var c = stat.isDirectory() ? 'DIR' : 'FILE' - this.cache[abs] = this.cache[abs] || c - - if (needDir && c !== 'DIR') - return false - - return c -} - -GlobSync.prototype._mark = function (p) { - return common.mark(this, p) -} - -GlobSync.prototype._makeAbs = function (f) { - return common.makeAbs(this, f) -} diff --git a/node_modules/browserify/node_modules/has/.jshintrc b/node_modules/browserify/node_modules/has/.jshintrc deleted file mode 100644 index 6a61a73d..00000000 --- a/node_modules/browserify/node_modules/has/.jshintrc +++ /dev/null @@ -1,14 +0,0 @@ -{ - "curly": true, - "eqeqeq": true, - "immed": true, - "latedef": true, - "newcap": true, - "noarg": true, - "sub": true, - "undef": true, - "boss": true, - "eqnull": true, - "node": true, - "browser": true -} \ No newline at end of file diff --git a/node_modules/browserify/node_modules/has/.npmignore b/node_modules/browserify/node_modules/has/.npmignore deleted file mode 100644 index 8419859f..00000000 --- a/node_modules/browserify/node_modules/has/.npmignore +++ /dev/null @@ -1,3 +0,0 @@ -/node_modules/ -*.log -*~ diff --git a/node_modules/browserify/node_modules/has/LICENSE-MIT b/node_modules/browserify/node_modules/has/LICENSE-MIT deleted file mode 100644 index ae7014d3..00000000 --- a/node_modules/browserify/node_modules/has/LICENSE-MIT +++ /dev/null @@ -1,22 +0,0 @@ -Copyright (c) 2013 Thiago de Arruda - -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/node_modules/browserify/node_modules/has/README.mkd b/node_modules/browserify/node_modules/has/README.mkd deleted file mode 100644 index 635e3a4b..00000000 --- a/node_modules/browserify/node_modules/has/README.mkd +++ /dev/null @@ -1,18 +0,0 @@ -# has - -> Object.prototype.hasOwnProperty.call shortcut - -## Installation - -```sh -npm install --save has -``` - -## Usage - -```js -var has = require('has'); - -has({}, 'hasOwnProperty'); // false -has(Object.prototype, 'hasOwnProperty'); // true -``` diff --git a/node_modules/browserify/node_modules/has/node_modules/function-bind/.eslintrc b/node_modules/browserify/node_modules/has/node_modules/function-bind/.eslintrc deleted file mode 100644 index 420b2535..00000000 --- a/node_modules/browserify/node_modules/has/node_modules/function-bind/.eslintrc +++ /dev/null @@ -1,13 +0,0 @@ -{ - "root": true, - - "extends": "@ljharb", - - "rules": { - "max-nested-callbacks": [2, 3], - "max-params": [2, 3], - "max-statements": [2, 20], - "no-new-func": [1], - "strict": [0] - } -} diff --git a/node_modules/browserify/node_modules/has/node_modules/function-bind/.jscs.json b/node_modules/browserify/node_modules/has/node_modules/function-bind/.jscs.json deleted file mode 100644 index d7047f6e..00000000 --- a/node_modules/browserify/node_modules/has/node_modules/function-bind/.jscs.json +++ /dev/null @@ -1,159 +0,0 @@ -{ - "es3": true, - - "additionalRules": [], - - "requireSemicolons": true, - - "disallowMultipleSpaces": true, - - "disallowIdentifierNames": [], - - "requireCurlyBraces": { - "allExcept": [], - "keywords": ["if", "else", "for", "while", "do", "try", "catch"] - }, - - "requireSpaceAfterKeywords": ["if", "else", "for", "while", "do", "switch", "return", "try", "catch", "function"], - - "disallowSpaceAfterKeywords": [], - - "disallowSpaceBeforeComma": true, - "disallowSpaceAfterComma": false, - "disallowSpaceBeforeSemicolon": true, - - "disallowNodeTypes": [ - "DebuggerStatement", - "ForInStatement", - "LabeledStatement", - "SwitchCase", - "SwitchStatement", - "WithStatement" - ], - - "requireObjectKeysOnNewLine": { "allExcept": ["sameLine"] }, - - "requireSpacesInAnonymousFunctionExpression": { "beforeOpeningRoundBrace": true, "beforeOpeningCurlyBrace": true }, - "requireSpacesInNamedFunctionExpression": { "beforeOpeningCurlyBrace": true }, - "disallowSpacesInNamedFunctionExpression": { "beforeOpeningRoundBrace": true }, - "requireSpacesInFunctionDeclaration": { "beforeOpeningCurlyBrace": true }, - "disallowSpacesInFunctionDeclaration": { "beforeOpeningRoundBrace": true }, - - "requireSpaceBetweenArguments": true, - - "disallowSpacesInsideParentheses": true, - - "disallowSpacesInsideArrayBrackets": true, - - "disallowQuotedKeysInObjects": "allButReserved", - - "disallowSpaceAfterObjectKeys": true, - - "requireCommaBeforeLineBreak": true, - - "disallowSpaceAfterPrefixUnaryOperators": ["++", "--", "+", "-", "~", "!"], - "requireSpaceAfterPrefixUnaryOperators": [], - - "disallowSpaceBeforePostfixUnaryOperators": ["++", "--"], - "requireSpaceBeforePostfixUnaryOperators": [], - - "disallowSpaceBeforeBinaryOperators": [], - "requireSpaceBeforeBinaryOperators": ["+", "-", "/", "*", "=", "==", "===", "!=", "!=="], - - "requireSpaceAfterBinaryOperators": ["+", "-", "/", "*", "=", "==", "===", "!=", "!=="], - "disallowSpaceAfterBinaryOperators": [], - - "disallowImplicitTypeConversion": ["binary", "string"], - - "disallowKeywords": ["with", "eval"], - - "requireKeywordsOnNewLine": [], - "disallowKeywordsOnNewLine": ["else"], - - "requireLineFeedAtFileEnd": true, - - "disallowTrailingWhitespace": true, - - "disallowTrailingComma": true, - - "excludeFiles": ["node_modules/**", "vendor/**"], - - "disallowMultipleLineStrings": true, - - "requireDotNotation": { "allExcept": ["keywords"] }, - - "requireParenthesesAroundIIFE": true, - - "validateLineBreaks": "LF", - - "validateQuoteMarks": { - "escape": true, - "mark": "'" - }, - - "disallowOperatorBeforeLineBreak": [], - - "requireSpaceBeforeKeywords": [ - "do", - "for", - "if", - "else", - "switch", - "case", - "try", - "catch", - "finally", - "while", - "with", - "return" - ], - - "validateAlignedFunctionParameters": { - "lineBreakAfterOpeningBraces": true, - "lineBreakBeforeClosingBraces": true - }, - - "requirePaddingNewLinesBeforeExport": true, - - "validateNewlineAfterArrayElements": { - "maximum": 8 - }, - - "requirePaddingNewLinesAfterUseStrict": true, - - "disallowArrowFunctions": true, - - "disallowMultiLineTernary": true, - - "validateOrderInObjectKeys": "asc-insensitive", - - "disallowIdenticalDestructuringNames": true, - - "disallowNestedTernaries": { "maxLevel": 1 }, - - "requireSpaceAfterComma": { "allExcept": ["trailing"] }, - "requireAlignedMultilineParams": false, - - "requireSpacesInGenerator": { - "afterStar": true - }, - - "disallowSpacesInGenerator": { - "beforeStar": true - }, - - "disallowVar": false, - - "requireArrayDestructuring": false, - - "requireEnhancedObjectLiterals": false, - - "requireObjectDestructuring": false, - - "requireEarlyReturn": false, - - "requireCapitalizedConstructorsNew": { - "allExcept": ["Function", "String", "Object", "Symbol", "Number", "Date", "RegExp", "Error", "Boolean", "Array"] - } -} - diff --git a/node_modules/browserify/node_modules/has/node_modules/function-bind/.npmignore b/node_modules/browserify/node_modules/has/node_modules/function-bind/.npmignore deleted file mode 100644 index 8363b8e3..00000000 --- a/node_modules/browserify/node_modules/has/node_modules/function-bind/.npmignore +++ /dev/null @@ -1,16 +0,0 @@ -.DS_Store -.monitor -.*.swp -.nodemonignore -releases -*.log -*.err -fleet.json -public/browserify -bin/*.json -.bin -build -compile -.lock-wscript -coverage -node_modules diff --git a/node_modules/browserify/node_modules/has/node_modules/function-bind/.travis.yml b/node_modules/browserify/node_modules/has/node_modules/function-bind/.travis.yml deleted file mode 100644 index caabb460..00000000 --- a/node_modules/browserify/node_modules/has/node_modules/function-bind/.travis.yml +++ /dev/null @@ -1,77 +0,0 @@ -language: node_js -node_js: - - "5.6" - - "5.5" - - "5.4" - - "5.3" - - "5.2" - - "5.1" - - "5.0" - - "4.3" - - "4.2" - - "4.1" - - "4.0" - - "iojs-v3.3" - - "iojs-v3.2" - - "iojs-v3.1" - - "iojs-v3.0" - - "iojs-v2.5" - - "iojs-v2.4" - - "iojs-v2.3" - - "iojs-v2.2" - - "iojs-v2.1" - - "iojs-v2.0" - - "iojs-v1.8" - - "iojs-v1.7" - - "iojs-v1.6" - - "iojs-v1.5" - - "iojs-v1.4" - - "iojs-v1.3" - - "iojs-v1.2" - - "iojs-v1.1" - - "iojs-v1.0" - - "0.12" - - "0.11" - - "0.10" - - "0.9" - - "0.8" - - "0.6" - - "0.4" -before_install: - - 'if [ "${TRAVIS_NODE_VERSION}" != "0.9" ]; then case "$(npm --version)" in 1.*) npm install -g npm@1.4.28 ;; 2.*) npm install -g npm@2 ;; esac ; fi' - - 'if [ "${TRAVIS_NODE_VERSION}" != "0.6" ] && [ "${TRAVIS_NODE_VERSION}" != "0.9" ]; then npm install -g npm; fi' -script: - - 'if [ "${TRAVIS_NODE_VERSION}" != "4.3" ]; then npm run tests-only ; else npm test ; fi' -sudo: false -matrix: - fast_finish: true - allow_failures: - - node_js: "5.5" - - node_js: "5.4" - - node_js: "5.3" - - node_js: "5.2" - - node_js: "5.1" - - node_js: "5.0" - - node_js: "4.2" - - node_js: "4.1" - - node_js: "4.0" - - node_js: "iojs-v3.2" - - node_js: "iojs-v3.1" - - node_js: "iojs-v3.0" - - node_js: "iojs-v2.4" - - node_js: "iojs-v2.3" - - node_js: "iojs-v2.2" - - node_js: "iojs-v2.1" - - node_js: "iojs-v2.0" - - node_js: "iojs-v1.7" - - node_js: "iojs-v1.6" - - node_js: "iojs-v1.5" - - node_js: "iojs-v1.4" - - node_js: "iojs-v1.3" - - node_js: "iojs-v1.2" - - node_js: "iojs-v1.1" - - node_js: "iojs-v1.0" - - node_js: "0.11" - - node_js: "0.9" - - node_js: "0.6" - - node_js: "0.4" diff --git a/node_modules/browserify/node_modules/has/node_modules/function-bind/LICENSE b/node_modules/browserify/node_modules/has/node_modules/function-bind/LICENSE deleted file mode 100644 index 62d6d237..00000000 --- a/node_modules/browserify/node_modules/has/node_modules/function-bind/LICENSE +++ /dev/null @@ -1,20 +0,0 @@ -Copyright (c) 2013 Raynos. - -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/node_modules/browserify/node_modules/has/node_modules/function-bind/README.md b/node_modules/browserify/node_modules/has/node_modules/function-bind/README.md deleted file mode 100644 index 81862a02..00000000 --- a/node_modules/browserify/node_modules/has/node_modules/function-bind/README.md +++ /dev/null @@ -1,48 +0,0 @@ -# function-bind - - - - - -Implementation of function.prototype.bind - -## Example - -I mainly do this for unit tests I run on phantomjs. -PhantomJS does not have Function.prototype.bind :( - -```js -Function.prototype.bind = require("function-bind") -``` - -## Installation - -`npm install function-bind` - -## Contributors - - - Raynos - -## MIT Licenced - - [travis-svg]: https://travis-ci.org/Raynos/function-bind.svg - [travis-url]: https://travis-ci.org/Raynos/function-bind - [npm-badge-svg]: https://badge.fury.io/js/function-bind.svg - [npm-url]: https://npmjs.org/package/function-bind - [5]: https://coveralls.io/repos/Raynos/function-bind/badge.png - [6]: https://coveralls.io/r/Raynos/function-bind - [7]: https://gemnasium.com/Raynos/function-bind.png - [8]: https://gemnasium.com/Raynos/function-bind - [deps-svg]: https://david-dm.org/Raynos/function-bind.svg - [deps-url]: https://david-dm.org/Raynos/function-bind - [dev-deps-svg]: https://david-dm.org/Raynos/function-bind/dev-status.svg - [dev-deps-url]: https://david-dm.org/Raynos/function-bind#info=devDependencies - [11]: https://ci.testling.com/Raynos/function-bind.png - [12]: https://ci.testling.com/Raynos/function-bind diff --git a/node_modules/browserify/node_modules/has/node_modules/function-bind/implementation.js b/node_modules/browserify/node_modules/has/node_modules/function-bind/implementation.js deleted file mode 100644 index 5e912728..00000000 --- a/node_modules/browserify/node_modules/has/node_modules/function-bind/implementation.js +++ /dev/null @@ -1,48 +0,0 @@ -var ERROR_MESSAGE = 'Function.prototype.bind called on incompatible '; -var slice = Array.prototype.slice; -var toStr = Object.prototype.toString; -var funcType = '[object Function]'; - -module.exports = function bind(that) { - var target = this; - if (typeof target !== 'function' || toStr.call(target) !== funcType) { - throw new TypeError(ERROR_MESSAGE + target); - } - var args = slice.call(arguments, 1); - - var bound; - var binder = function () { - if (this instanceof bound) { - var result = target.apply( - this, - args.concat(slice.call(arguments)) - ); - if (Object(result) === result) { - return result; - } - return this; - } else { - return target.apply( - that, - args.concat(slice.call(arguments)) - ); - } - }; - - var boundLength = Math.max(0, target.length - args.length); - var boundArgs = []; - for (var i = 0; i < boundLength; i++) { - boundArgs.push('$' + i); - } - - bound = Function('binder', 'return function (' + boundArgs.join(',') + '){ return binder.apply(this,arguments); }')(binder); - - if (target.prototype) { - var Empty = function Empty() {}; - Empty.prototype = target.prototype; - bound.prototype = new Empty(); - Empty.prototype = null; - } - - return bound; -}; diff --git a/node_modules/browserify/node_modules/has/node_modules/function-bind/index.js b/node_modules/browserify/node_modules/has/node_modules/function-bind/index.js deleted file mode 100644 index 60ba5784..00000000 --- a/node_modules/browserify/node_modules/has/node_modules/function-bind/index.js +++ /dev/null @@ -1,3 +0,0 @@ -var implementation = require('./implementation'); - -module.exports = Function.prototype.bind || implementation; diff --git a/node_modules/browserify/node_modules/has/node_modules/function-bind/package.json b/node_modules/browserify/node_modules/has/node_modules/function-bind/package.json deleted file mode 100644 index 58301472..00000000 --- a/node_modules/browserify/node_modules/has/node_modules/function-bind/package.json +++ /dev/null @@ -1,104 +0,0 @@ -{ - "name": "function-bind", - "version": "1.1.0", - "description": "Implementation of Function.prototype.bind", - "keywords": [ - "function", - "bind", - "shim", - "es5" - ], - "author": { - "name": "Raynos", - "email": "raynos2@gmail.com" - }, - "repository": { - "type": "git", - "url": "git://github.com/Raynos/function-bind.git" - }, - "main": "index", - "homepage": "https://github.com/Raynos/function-bind", - "contributors": [ - { - "name": "Raynos" - }, - { - "name": "Jordan Harband", - "url": "https://github.com/ljharb" - } - ], - "bugs": { - "url": "https://github.com/Raynos/function-bind/issues", - "email": "raynos2@gmail.com" - }, - "dependencies": {}, - "devDependencies": { - "tape": "^4.4.0", - "covert": "^1.1.0", - "jscs": "^2.9.0", - "eslint": "^2.0.0", - "@ljharb/eslint-config": "^2.1.0" - }, - "licenses": [ - { - "type": "MIT", - "url": "http://github.com/Raynos/function-bind/raw/master/LICENSE" - } - ], - "scripts": { - "test": "npm run lint && npm run tests-only && npm run coverage-quiet", - "tests-only": "node test", - "coverage": "covert test/*.js", - "coverage-quiet": "covert test/*.js --quiet", - "lint": "npm run jscs && npm run eslint", - "jscs": "jscs *.js */*.js", - "eslint": "eslint *.js */*.js" - }, - "testling": { - "files": "test/index.js", - "browsers": [ - "ie/8..latest", - "firefox/16..latest", - "firefox/nightly", - "chrome/22..latest", - "chrome/canary", - "opera/12..latest", - "opera/next", - "safari/5.1..latest", - "ipad/6.0..latest", - "iphone/6.0..latest", - "android-browser/4.2..latest" - ] - }, - "gitHead": "cb5057f2a0018ac48c812ccee86934a5af30efdb", - "_id": "function-bind@1.1.0", - "_shasum": "16176714c801798e4e8f2cf7f7529467bb4a5771", - "_from": "function-bind@>=1.0.2 <2.0.0", - "_npmVersion": "3.6.0", - "_nodeVersion": "5.6.0", - "_npmUser": { - "name": "ljharb", - "email": "ljharb@gmail.com" - }, - "dist": { - "shasum": "16176714c801798e4e8f2cf7f7529467bb4a5771", - "tarball": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.0.tgz" - }, - "maintainers": [ - { - "name": "raynos", - "email": "raynos2@gmail.com" - }, - { - "name": "ljharb", - "email": "ljharb@gmail.com" - } - ], - "_npmOperationalInternal": { - "host": "packages-6-west.internal.npmjs.com", - "tmp": "tmp/function-bind-1.1.0.tgz_1455438520627_0.822420896962285" - }, - "directories": {}, - "_resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.0.tgz", - "readme": "ERROR: No README data found!" -} diff --git a/node_modules/browserify/node_modules/has/node_modules/function-bind/test/index.js b/node_modules/browserify/node_modules/has/node_modules/function-bind/test/index.js deleted file mode 100644 index ba1bfad2..00000000 --- a/node_modules/browserify/node_modules/has/node_modules/function-bind/test/index.js +++ /dev/null @@ -1,250 +0,0 @@ -var test = require('tape'); - -var functionBind = require('../implementation'); -var getCurrentContext = function () { return this; }; - -test('functionBind is a function', function (t) { - t.equal(typeof functionBind, 'function'); - t.end(); -}); - -test('non-functions', function (t) { - var nonFunctions = [true, false, [], {}, 42, 'foo', NaN, /a/g]; - t.plan(nonFunctions.length); - for (var i = 0; i < nonFunctions.length; ++i) { - try { functionBind.call(nonFunctions[i]); } catch (ex) { - t.ok(ex instanceof TypeError, 'throws when given ' + String(nonFunctions[i])); - } - } - t.end(); -}); - -test('without a context', function (t) { - t.test('binds properly', function (st) { - var args, context; - var namespace = { - func: functionBind.call(function () { - args = Array.prototype.slice.call(arguments); - context = this; - }) - }; - namespace.func(1, 2, 3); - st.deepEqual(args, [1, 2, 3]); - st.equal(context, getCurrentContext.call()); - st.end(); - }); - - t.test('binds properly, and still supplies bound arguments', function (st) { - var args, context; - var namespace = { - func: functionBind.call(function () { - args = Array.prototype.slice.call(arguments); - context = this; - }, undefined, 1, 2, 3) - }; - namespace.func(4, 5, 6); - st.deepEqual(args, [1, 2, 3, 4, 5, 6]); - st.equal(context, getCurrentContext.call()); - st.end(); - }); - - t.test('returns properly', function (st) { - var args; - var namespace = { - func: functionBind.call(function () { - args = Array.prototype.slice.call(arguments); - return this; - }, null) - }; - var context = namespace.func(1, 2, 3); - st.equal(context, getCurrentContext.call(), 'returned context is namespaced context'); - st.deepEqual(args, [1, 2, 3], 'passed arguments are correct'); - st.end(); - }); - - t.test('returns properly with bound arguments', function (st) { - var args; - var namespace = { - func: functionBind.call(function () { - args = Array.prototype.slice.call(arguments); - return this; - }, null, 1, 2, 3) - }; - var context = namespace.func(4, 5, 6); - st.equal(context, getCurrentContext.call(), 'returned context is namespaced context'); - st.deepEqual(args, [1, 2, 3, 4, 5, 6], 'passed arguments are correct'); - st.end(); - }); - - t.test('called as a constructor', function (st) { - var thunkify = function (value) { - return function () { return value; }; - }; - st.test('returns object value', function (sst) { - var expectedReturnValue = [1, 2, 3]; - var Constructor = functionBind.call(thunkify(expectedReturnValue), null); - var result = new Constructor(); - sst.equal(result, expectedReturnValue); - sst.end(); - }); - - st.test('does not return primitive value', function (sst) { - var Constructor = functionBind.call(thunkify(42), null); - var result = new Constructor(); - sst.notEqual(result, 42); - sst.end(); - }); - - st.test('object from bound constructor is instance of original and bound constructor', function (sst) { - var A = function (x) { - this.name = x || 'A'; - }; - var B = functionBind.call(A, null, 'B'); - - var result = new B(); - sst.ok(result instanceof B, 'result is instance of bound constructor'); - sst.ok(result instanceof A, 'result is instance of original constructor'); - sst.end(); - }); - - st.end(); - }); - - t.end(); -}); - -test('with a context', function (t) { - t.test('with no bound arguments', function (st) { - var args, context; - var boundContext = {}; - var namespace = { - func: functionBind.call(function () { - args = Array.prototype.slice.call(arguments); - context = this; - }, boundContext) - }; - namespace.func(1, 2, 3); - st.equal(context, boundContext, 'binds a context properly'); - st.deepEqual(args, [1, 2, 3], 'supplies passed arguments'); - st.end(); - }); - - t.test('with bound arguments', function (st) { - var args, context; - var boundContext = {}; - var namespace = { - func: functionBind.call(function () { - args = Array.prototype.slice.call(arguments); - context = this; - }, boundContext, 1, 2, 3) - }; - namespace.func(4, 5, 6); - st.equal(context, boundContext, 'binds a context properly'); - st.deepEqual(args, [1, 2, 3, 4, 5, 6], 'supplies bound and passed arguments'); - st.end(); - }); - - t.test('returns properly', function (st) { - var boundContext = {}; - var args; - var namespace = { - func: functionBind.call(function () { - args = Array.prototype.slice.call(arguments); - return this; - }, boundContext) - }; - var context = namespace.func(1, 2, 3); - st.equal(context, boundContext, 'returned context is bound context'); - st.notEqual(context, getCurrentContext.call(), 'returned context is not lexical context'); - st.deepEqual(args, [1, 2, 3], 'passed arguments are correct'); - st.end(); - }); - - t.test('returns properly with bound arguments', function (st) { - var boundContext = {}; - var args; - var namespace = { - func: functionBind.call(function () { - args = Array.prototype.slice.call(arguments); - return this; - }, boundContext, 1, 2, 3) - }; - var context = namespace.func(4, 5, 6); - st.equal(context, boundContext, 'returned context is bound context'); - st.notEqual(context, getCurrentContext.call(), 'returned context is not lexical context'); - st.deepEqual(args, [1, 2, 3, 4, 5, 6], 'passed arguments are correct'); - st.end(); - }); - - t.test('passes the correct arguments when called as a constructor', function (st) { - var expected = { name: 'Correct' }; - var namespace = { - Func: functionBind.call(function (arg) { - return arg; - }, { name: 'Incorrect' }) - }; - var returned = new namespace.Func(expected); - st.equal(returned, expected, 'returns the right arg when called as a constructor'); - st.end(); - }); - - t.test('has the new instance\'s context when called as a constructor', function (st) { - var actualContext; - var expectedContext = { foo: 'bar' }; - var namespace = { - Func: functionBind.call(function () { - actualContext = this; - }, expectedContext) - }; - var result = new namespace.Func(); - st.equal(result instanceof namespace.Func, true); - st.notEqual(actualContext, expectedContext); - st.end(); - }); - - t.end(); -}); - -test('bound function length', function (t) { - t.test('sets a correct length without thisArg', function (st) { - var subject = functionBind.call(function (a, b, c) { return a + b + c; }); - st.equal(subject.length, 3); - st.equal(subject(1, 2, 3), 6); - st.end(); - }); - - t.test('sets a correct length with thisArg', function (st) { - var subject = functionBind.call(function (a, b, c) { return a + b + c; }, {}); - st.equal(subject.length, 3); - st.equal(subject(1, 2, 3), 6); - st.end(); - }); - - t.test('sets a correct length without thisArg and first argument', function (st) { - var subject = functionBind.call(function (a, b, c) { return a + b + c; }, undefined, 1); - st.equal(subject.length, 2); - st.equal(subject(2, 3), 6); - st.end(); - }); - - t.test('sets a correct length with thisArg and first argument', function (st) { - var subject = functionBind.call(function (a, b, c) { return a + b + c; }, {}, 1); - st.equal(subject.length, 2); - st.equal(subject(2, 3), 6); - st.end(); - }); - - t.test('sets a correct length without thisArg and too many arguments', function (st) { - var subject = functionBind.call(function (a, b, c) { return a + b + c; }, undefined, 1, 2, 3, 4); - st.equal(subject.length, 0); - st.equal(subject(), 6); - st.end(); - }); - - t.test('sets a correct length with thisArg and too many arguments', function (st) { - var subject = functionBind.call(function (a, b, c) { return a + b + c; }, {}, 1, 2, 3, 4); - st.equal(subject.length, 0); - st.equal(subject(), 6); - st.end(); - }); -}); diff --git a/node_modules/browserify/node_modules/has/package.json b/node_modules/browserify/node_modules/has/package.json deleted file mode 100644 index 5b288d92..00000000 --- a/node_modules/browserify/node_modules/has/package.json +++ /dev/null @@ -1,60 +0,0 @@ -{ - "name": "has", - "description": "Object.prototype.hasOwnProperty.call shortcut", - "version": "1.0.1", - "homepage": "https://github.com/tarruda/has", - "author": { - "name": "Thiago de Arruda", - "email": "tpadilha84@gmail.com" - }, - "repository": { - "type": "git", - "url": "git://github.com/tarruda/has.git" - }, - "bugs": { - "url": "https://github.com/tarruda/has/issues" - }, - "licenses": [ - { - "type": "MIT", - "url": "https://github.com/tarruda/has/blob/master/LICENSE-MIT" - } - ], - "main": "./src/index", - "dependencies": { - "function-bind": "^1.0.2" - }, - "devDependencies": { - "chai": "~1.7.2", - "mocha": "^1.21.4" - }, - "engines": { - "node": ">= 0.8.0" - }, - "scripts": { - "test": "node_modules/mocha/bin/mocha" - }, - "gitHead": "535c5c8ed1dc255c9e223829e702548dd514d2a5", - "_id": "has@1.0.1", - "_shasum": "8461733f538b0837c9361e39a9ab9e9704dc2f28", - "_from": "has@>=1.0.0 <2.0.0", - "_npmVersion": "2.11.0", - "_nodeVersion": "2.2.1", - "_npmUser": { - "name": "tarruda", - "email": "tpadilha84@gmail.com" - }, - "dist": { - "shasum": "8461733f538b0837c9361e39a9ab9e9704dc2f28", - "tarball": "https://registry.npmjs.org/has/-/has-1.0.1.tgz" - }, - "maintainers": [ - { - "name": "tarruda", - "email": "tpadilha84@gmail.com" - } - ], - "directories": {}, - "_resolved": "https://registry.npmjs.org/has/-/has-1.0.1.tgz", - "readme": "ERROR: No README data found!" -} diff --git a/node_modules/browserify/node_modules/has/src/index.js b/node_modules/browserify/node_modules/has/src/index.js deleted file mode 100644 index cdf32857..00000000 --- a/node_modules/browserify/node_modules/has/src/index.js +++ /dev/null @@ -1,3 +0,0 @@ -var bind = require('function-bind'); - -module.exports = bind.call(Function.call, Object.prototype.hasOwnProperty); diff --git a/node_modules/browserify/node_modules/has/test/.jshintrc b/node_modules/browserify/node_modules/has/test/.jshintrc deleted file mode 100644 index e1da2e42..00000000 --- a/node_modules/browserify/node_modules/has/test/.jshintrc +++ /dev/null @@ -1,7 +0,0 @@ -{ - "globals": { - "expect": false, - "run": false - }, - "expr": true -} \ No newline at end of file diff --git a/node_modules/browserify/node_modules/has/test/index.js b/node_modules/browserify/node_modules/has/test/index.js deleted file mode 100644 index 38909b0a..00000000 --- a/node_modules/browserify/node_modules/has/test/index.js +++ /dev/null @@ -1,10 +0,0 @@ -global.expect = require('chai').expect; -var has = require('../src'); - - -describe('has', function() { - it('works!', function() { - expect(has({}, 'hasOwnProperty')).to.be.false; - expect(has(Object.prototype, 'hasOwnProperty')).to.be.true; - }); -}); diff --git a/node_modules/browserify/node_modules/htmlescape/.npmignore b/node_modules/browserify/node_modules/htmlescape/.npmignore deleted file mode 100644 index e2a6af87..00000000 --- a/node_modules/browserify/node_modules/htmlescape/.npmignore +++ /dev/null @@ -1,4 +0,0 @@ -/.gitignore -/CHANGELOG.md -/LICENSE -/test diff --git a/node_modules/browserify/node_modules/htmlescape/CHANGELOG.md b/node_modules/browserify/node_modules/htmlescape/CHANGELOG.md deleted file mode 100644 index d03d6204..00000000 --- a/node_modules/browserify/node_modules/htmlescape/CHANGELOG.md +++ /dev/null @@ -1,9 +0,0 @@ -1.0.0 / 2014-09-29 -================== - - * No more API changes - -0.0.1 / 2014-09-28 -================== - - * Initial release diff --git a/node_modules/browserify/node_modules/htmlescape/LICENSE b/node_modules/browserify/node_modules/htmlescape/LICENSE deleted file mode 100644 index bdff13e8..00000000 --- a/node_modules/browserify/node_modules/htmlescape/LICENSE +++ /dev/null @@ -1,9 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2014 Andres Suarez - -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/node_modules/browserify/node_modules/htmlescape/README.md b/node_modules/browserify/node_modules/htmlescape/README.md deleted file mode 100644 index 870ba166..00000000 --- a/node_modules/browserify/node_modules/htmlescape/README.md +++ /dev/null @@ -1,30 +0,0 @@ -# htmlescape - -Properly escape JSON for usage as an object literal inside of a ` -``` diff --git a/node_modules/browserify/node_modules/htmlescape/htmlescape.js b/node_modules/browserify/node_modules/htmlescape/htmlescape.js deleted file mode 100644 index 5f0ce6c7..00000000 --- a/node_modules/browserify/node_modules/htmlescape/htmlescape.js +++ /dev/null @@ -1,42 +0,0 @@ -/** - * Properly escape JSON for usage as an object literal inside of a ` - - diff --git a/node_modules/browserify/node_modules/http-browserify/example/get/main.js b/node_modules/browserify/node_modules/http-browserify/example/get/main.js deleted file mode 100644 index 3030d2df..00000000 --- a/node_modules/browserify/node_modules/http-browserify/example/get/main.js +++ /dev/null @@ -1,14 +0,0 @@ -var http = require('../../'); - -http.get({ path : '/beep' }, function (res) { - var div = document.getElementById('result'); - div.innerHTML += 'GET /beep
    '; - - res.on('data', function (buf) { - div.innerHTML += buf; - }); - - res.on('end', function () { - div.innerHTML += '
    __END__'; - }); -}); diff --git a/node_modules/browserify/node_modules/http-browserify/example/get/server.js b/node_modules/browserify/node_modules/http-browserify/example/get/server.js deleted file mode 100644 index a0482779..00000000 --- a/node_modules/browserify/node_modules/http-browserify/example/get/server.js +++ /dev/null @@ -1,12 +0,0 @@ -var http = require('http'); -var ecstatic = require('ecstatic')(__dirname); -var server = http.createServer(function (req, res) { - if (req.url === '/beep') { - res.setHeader('content-type', 'text/plain'); - res.end('boop'); - } - else ecstatic(req, res); -}); - -console.log('Listening on :8082'); -server.listen(8082); diff --git a/node_modules/browserify/node_modules/http-browserify/example/headers/index.html b/node_modules/browserify/node_modules/http-browserify/example/headers/index.html deleted file mode 100644 index 7001c209..00000000 --- a/node_modules/browserify/node_modules/http-browserify/example/headers/index.html +++ /dev/null @@ -1,9 +0,0 @@ - - - xhr - - -
    - - - diff --git a/node_modules/browserify/node_modules/http-browserify/example/headers/main.js b/node_modules/browserify/node_modules/http-browserify/example/headers/main.js deleted file mode 100644 index 247806cf..00000000 --- a/node_modules/browserify/node_modules/http-browserify/example/headers/main.js +++ /dev/null @@ -1,18 +0,0 @@ -var http = require('../../'); - -var opts = { path : '/beep', method : 'GET' }; -var req = http.request(opts, function (res) { - var div = document.getElementById('result'); - - for (var key in res.headers) { - div.innerHTML += key + ': ' + res.getHeader(key) + '
    '; - } - div.innerHTML += '
    '; - - res.on('data', function (buf) { - div.innerHTML += buf; - }); -}); - -req.setHeader('bling', 'blong'); -req.end(); diff --git a/node_modules/browserify/node_modules/http-browserify/example/headers/server.js b/node_modules/browserify/node_modules/http-browserify/example/headers/server.js deleted file mode 100644 index 386e1fab..00000000 --- a/node_modules/browserify/node_modules/http-browserify/example/headers/server.js +++ /dev/null @@ -1,15 +0,0 @@ -var http = require('http'); -var ecstatic = require('ecstatic')(__dirname); -var server = http.createServer(function (req, res) { - if (req.url === '/beep') { - res.setHeader('content-type', 'text/plain'); - res.setHeader('foo', 'bar'); - res.setHeader('bling', req.headers.bling + '-blong'); - - res.end('boop'); - } - else ecstatic(req, res); -}); - -console.log('Listening on :8082'); -server.listen(8082); diff --git a/node_modules/browserify/node_modules/http-browserify/example/post/index.html b/node_modules/browserify/node_modules/http-browserify/example/post/index.html deleted file mode 100644 index 7001c209..00000000 --- a/node_modules/browserify/node_modules/http-browserify/example/post/index.html +++ /dev/null @@ -1,9 +0,0 @@ - - - xhr - - -
    - - - diff --git a/node_modules/browserify/node_modules/http-browserify/example/post/main.js b/node_modules/browserify/node_modules/http-browserify/example/post/main.js deleted file mode 100644 index dfb67463..00000000 --- a/node_modules/browserify/node_modules/http-browserify/example/post/main.js +++ /dev/null @@ -1,16 +0,0 @@ -var http = require('../../'); - -var n = 100; -var opts = { path : '/plusone', method : 'post' }; - -var req = http.request(opts, function (res) { - var div = document.getElementById('result'); - div.innerHTML += n.toString() + ' + 1 = '; - - res.on('data', function (buf) { - div.innerHTML += buf; - }); -}); - -req.write(n); -req.end(); diff --git a/node_modules/browserify/node_modules/http-browserify/example/post/server.js b/node_modules/browserify/node_modules/http-browserify/example/post/server.js deleted file mode 100644 index d16963ff..00000000 --- a/node_modules/browserify/node_modules/http-browserify/example/post/server.js +++ /dev/null @@ -1,19 +0,0 @@ -var http = require('http'); -var ecstatic = require('ecstatic')(__dirname); -var server = http.createServer(function (req, res) { - if (req.method === 'POST' && req.url === '/plusone') { - res.setHeader('content-type', 'text/plain'); - - var s = ''; - req.on('data', function (buf) { s += buf.toString() }); - - req.on('end', function () { - var n = parseInt(s) + 1; - res.end(n.toString()); - }); - } - else ecstatic(req, res); -}); - -console.log('Listening on :8082'); -server.listen(8082); diff --git a/node_modules/browserify/node_modules/http-browserify/example/streaming/index.html b/node_modules/browserify/node_modules/http-browserify/example/streaming/index.html deleted file mode 100644 index 7001c209..00000000 --- a/node_modules/browserify/node_modules/http-browserify/example/streaming/index.html +++ /dev/null @@ -1,9 +0,0 @@ - - - xhr - - -
    - - - diff --git a/node_modules/browserify/node_modules/http-browserify/example/streaming/main.js b/node_modules/browserify/node_modules/http-browserify/example/streaming/main.js deleted file mode 100644 index 40ee353f..00000000 --- a/node_modules/browserify/node_modules/http-browserify/example/streaming/main.js +++ /dev/null @@ -1,16 +0,0 @@ -var http = require('../../'); - -http.get({ path : '/doom' }, function (res) { - var div = document.getElementById('result'); - if (!div.style) div.style = {}; - div.style.color = 'rgb(80,80,80)'; - - res.on('data', function (buf) { - div.innerHTML += buf; - }); - - res.on('end', function () { - div.style.color = 'black'; - div.innerHTML += '!'; - }); -}); diff --git a/node_modules/browserify/node_modules/http-browserify/example/streaming/server.js b/node_modules/browserify/node_modules/http-browserify/example/streaming/server.js deleted file mode 100644 index 55c9edea..00000000 --- a/node_modules/browserify/node_modules/http-browserify/example/streaming/server.js +++ /dev/null @@ -1,21 +0,0 @@ -var http = require('http'); -var ecstatic = require('ecstatic')(__dirname); -var server = http.createServer(function (req, res) { - if (req.url === '/doom') { - res.setHeader('content-type', 'multipart/octet-stream'); - - res.write('d'); - var i = 0; - var iv = setInterval(function () { - res.write('o'); - if (i++ >= 10) { - clearInterval(iv); - res.end('m'); - } - }, 500); - } - else ecstatic(req, res); -}); - -console.log('Listening on :8082'); -server.listen(8082); diff --git a/node_modules/browserify/node_modules/http-browserify/index.js b/node_modules/browserify/node_modules/http-browserify/index.js deleted file mode 100644 index fedd2a2e..00000000 --- a/node_modules/browserify/node_modules/http-browserify/index.js +++ /dev/null @@ -1,145 +0,0 @@ -var http = module.exports; -var EventEmitter = require('events').EventEmitter; -var Request = require('./lib/request'); -var url = require('url') - -http.request = function (params, cb) { - if (typeof params === 'string') { - params = url.parse(params) - } - if (!params) params = {}; - if (!params.host && !params.port) { - params.port = parseInt(window.location.port, 10); - } - if (!params.host && params.hostname) { - params.host = params.hostname; - } - - if (!params.protocol) { - if (params.scheme) { - params.protocol = params.scheme + ':'; - } else { - params.protocol = window.location.protocol; - } - } - - if (!params.host) { - params.host = window.location.hostname || window.location.host; - } - if (/:/.test(params.host)) { - if (!params.port) { - params.port = params.host.split(':')[1]; - } - params.host = params.host.split(':')[0]; - } - if (!params.port) params.port = params.protocol == 'https:' ? 443 : 80; - - var req = new Request(new xhrHttp, params); - if (cb) req.on('response', cb); - return req; -}; - -http.get = function (params, cb) { - params.method = 'GET'; - var req = http.request(params, cb); - req.end(); - return req; -}; - -http.Agent = function () {}; -http.Agent.defaultMaxSockets = 4; - -var xhrHttp = (function () { - if (typeof window === 'undefined') { - throw new Error('no window object present'); - } - else if (window.XMLHttpRequest) { - return window.XMLHttpRequest; - } - else if (window.ActiveXObject) { - var axs = [ - 'Msxml2.XMLHTTP.6.0', - 'Msxml2.XMLHTTP.3.0', - 'Microsoft.XMLHTTP' - ]; - for (var i = 0; i < axs.length; i++) { - try { - var ax = new(window.ActiveXObject)(axs[i]); - return function () { - if (ax) { - var ax_ = ax; - ax = null; - return ax_; - } - else { - return new(window.ActiveXObject)(axs[i]); - } - }; - } - catch (e) {} - } - throw new Error('ajax not supported in this browser') - } - else { - throw new Error('ajax not supported in this browser'); - } -})(); - -http.STATUS_CODES = { - 100 : 'Continue', - 101 : 'Switching Protocols', - 102 : 'Processing', // RFC 2518, obsoleted by RFC 4918 - 200 : 'OK', - 201 : 'Created', - 202 : 'Accepted', - 203 : 'Non-Authoritative Information', - 204 : 'No Content', - 205 : 'Reset Content', - 206 : 'Partial Content', - 207 : 'Multi-Status', // RFC 4918 - 300 : 'Multiple Choices', - 301 : 'Moved Permanently', - 302 : 'Moved Temporarily', - 303 : 'See Other', - 304 : 'Not Modified', - 305 : 'Use Proxy', - 307 : 'Temporary Redirect', - 400 : 'Bad Request', - 401 : 'Unauthorized', - 402 : 'Payment Required', - 403 : 'Forbidden', - 404 : 'Not Found', - 405 : 'Method Not Allowed', - 406 : 'Not Acceptable', - 407 : 'Proxy Authentication Required', - 408 : 'Request Time-out', - 409 : 'Conflict', - 410 : 'Gone', - 411 : 'Length Required', - 412 : 'Precondition Failed', - 413 : 'Request Entity Too Large', - 414 : 'Request-URI Too Large', - 415 : 'Unsupported Media Type', - 416 : 'Requested Range Not Satisfiable', - 417 : 'Expectation Failed', - 418 : 'I\'m a teapot', // RFC 2324 - 422 : 'Unprocessable Entity', // RFC 4918 - 423 : 'Locked', // RFC 4918 - 424 : 'Failed Dependency', // RFC 4918 - 425 : 'Unordered Collection', // RFC 4918 - 426 : 'Upgrade Required', // RFC 2817 - 428 : 'Precondition Required', // RFC 6585 - 429 : 'Too Many Requests', // RFC 6585 - 431 : 'Request Header Fields Too Large',// RFC 6585 - 500 : 'Internal Server Error', - 501 : 'Not Implemented', - 502 : 'Bad Gateway', - 503 : 'Service Unavailable', - 504 : 'Gateway Time-out', - 505 : 'HTTP Version Not Supported', - 506 : 'Variant Also Negotiates', // RFC 2295 - 507 : 'Insufficient Storage', // RFC 4918 - 509 : 'Bandwidth Limit Exceeded', - 510 : 'Not Extended', // RFC 2774 - 511 : 'Network Authentication Required' // RFC 6585 -}; \ No newline at end of file diff --git a/node_modules/browserify/node_modules/http-browserify/lib/request.js b/node_modules/browserify/node_modules/http-browserify/lib/request.js deleted file mode 100644 index 7b8b7335..00000000 --- a/node_modules/browserify/node_modules/http-browserify/lib/request.js +++ /dev/null @@ -1,209 +0,0 @@ -var Stream = require('stream'); -var Response = require('./response'); -var Base64 = require('Base64'); -var inherits = require('inherits'); - -var Request = module.exports = function (xhr, params) { - var self = this; - self.writable = true; - self.xhr = xhr; - self.body = []; - - self.uri = (params.protocol || 'http:') + '//' - + params.host - + (params.port ? ':' + params.port : '') - + (params.path || '/') - ; - - if (typeof params.withCredentials === 'undefined') { - params.withCredentials = true; - } - - try { xhr.withCredentials = params.withCredentials } - catch (e) {} - - if (params.responseType) try { xhr.responseType = params.responseType } - catch (e) {} - - xhr.open( - params.method || 'GET', - self.uri, - true - ); - - xhr.onerror = function(event) { - self.emit('error', new Error('Network error')); - }; - - self._headers = {}; - - if (params.headers) { - var keys = objectKeys(params.headers); - for (var i = 0; i < keys.length; i++) { - var key = keys[i]; - if (!self.isSafeRequestHeader(key)) continue; - var value = params.headers[key]; - self.setHeader(key, value); - } - } - - if (params.auth) { - //basic auth - this.setHeader('Authorization', 'Basic ' + Base64.btoa(params.auth)); - } - - var res = new Response; - res.on('close', function () { - self.emit('close'); - }); - - res.on('ready', function () { - self.emit('response', res); - }); - - res.on('error', function (err) { - self.emit('error', err); - }); - - xhr.onreadystatechange = function () { - // Fix for IE9 bug - // SCRIPT575: Could not complete the operation due to error c00c023f - // It happens when a request is aborted, calling the success callback anyway with readyState === 4 - if (xhr.__aborted) return; - res.handle(xhr); - }; -}; - -inherits(Request, Stream); - -Request.prototype.setHeader = function (key, value) { - this._headers[key.toLowerCase()] = value -}; - -Request.prototype.getHeader = function (key) { - return this._headers[key.toLowerCase()] -}; - -Request.prototype.removeHeader = function (key) { - delete this._headers[key.toLowerCase()] -}; - -Request.prototype.write = function (s) { - this.body.push(s); -}; - -Request.prototype.destroy = function (s) { - this.xhr.__aborted = true; - this.xhr.abort(); - this.emit('close'); -}; - -Request.prototype.end = function (s) { - if (s !== undefined) this.body.push(s); - - var keys = objectKeys(this._headers); - for (var i = 0; i < keys.length; i++) { - var key = keys[i]; - var value = this._headers[key]; - if (isArray(value)) { - for (var j = 0; j < value.length; j++) { - this.xhr.setRequestHeader(key, value[j]); - } - } - else this.xhr.setRequestHeader(key, value) - } - - if (this.body.length === 0) { - this.xhr.send(''); - } - else if (typeof this.body[0] === 'string') { - this.xhr.send(this.body.join('')); - } - else if (isArray(this.body[0])) { - var body = []; - for (var i = 0; i < this.body.length; i++) { - body.push.apply(body, this.body[i]); - } - this.xhr.send(body); - } - else if (/Array/.test(Object.prototype.toString.call(this.body[0]))) { - var len = 0; - for (var i = 0; i < this.body.length; i++) { - len += this.body[i].length; - } - var body = new(this.body[0].constructor)(len); - var k = 0; - - for (var i = 0; i < this.body.length; i++) { - var b = this.body[i]; - for (var j = 0; j < b.length; j++) { - body[k++] = b[j]; - } - } - this.xhr.send(body); - } - else if (isXHR2Compatible(this.body[0])) { - this.xhr.send(this.body[0]); - } - else { - var body = ''; - for (var i = 0; i < this.body.length; i++) { - body += this.body[i].toString(); - } - this.xhr.send(body); - } -}; - -// Taken from http://dxr.mozilla.org/mozilla/mozilla-central/content/base/src/nsXMLHttpRequest.cpp.html -Request.unsafeHeaders = [ - "accept-charset", - "accept-encoding", - "access-control-request-headers", - "access-control-request-method", - "connection", - "content-length", - "cookie", - "cookie2", - "content-transfer-encoding", - "date", - "expect", - "host", - "keep-alive", - "origin", - "referer", - "te", - "trailer", - "transfer-encoding", - "upgrade", - "user-agent", - "via" -]; - -Request.prototype.isSafeRequestHeader = function (headerName) { - if (!headerName) return false; - return indexOf(Request.unsafeHeaders, headerName.toLowerCase()) === -1; -}; - -var objectKeys = Object.keys || function (obj) { - var keys = []; - for (var key in obj) keys.push(key); - return keys; -}; - -var isArray = Array.isArray || function (xs) { - return Object.prototype.toString.call(xs) === '[object Array]'; -}; - -var indexOf = function (xs, x) { - if (xs.indexOf) return xs.indexOf(x); - for (var i = 0; i < xs.length; i++) { - if (xs[i] === x) return i; - } - return -1; -}; - -var isXHR2Compatible = function (obj) { - if (typeof Blob !== 'undefined' && obj instanceof Blob) return true; - if (typeof ArrayBuffer !== 'undefined' && obj instanceof ArrayBuffer) return true; - if (typeof FormData !== 'undefined' && obj instanceof FormData) return true; -}; diff --git a/node_modules/browserify/node_modules/http-browserify/lib/response.js b/node_modules/browserify/node_modules/http-browserify/lib/response.js deleted file mode 100644 index f83d7616..00000000 --- a/node_modules/browserify/node_modules/http-browserify/lib/response.js +++ /dev/null @@ -1,120 +0,0 @@ -var Stream = require('stream'); -var util = require('util'); - -var Response = module.exports = function (res) { - this.offset = 0; - this.readable = true; -}; - -util.inherits(Response, Stream); - -var capable = { - streaming : true, - status2 : true -}; - -function parseHeaders (res) { - var lines = res.getAllResponseHeaders().split(/\r?\n/); - var headers = {}; - for (var i = 0; i < lines.length; i++) { - var line = lines[i]; - if (line === '') continue; - - var m = line.match(/^([^:]+):\s*(.*)/); - if (m) { - var key = m[1].toLowerCase(), value = m[2]; - - if (headers[key] !== undefined) { - - if (isArray(headers[key])) { - headers[key].push(value); - } - else { - headers[key] = [ headers[key], value ]; - } - } - else { - headers[key] = value; - } - } - else { - headers[line] = true; - } - } - return headers; -} - -Response.prototype.getResponse = function (xhr) { - var respType = String(xhr.responseType).toLowerCase(); - if (respType === 'blob') return xhr.responseBlob || xhr.response; - if (respType === 'arraybuffer') return xhr.response; - return xhr.responseText; -} - -Response.prototype.getHeader = function (key) { - return this.headers[key.toLowerCase()]; -}; - -Response.prototype.handle = function (res) { - if (res.readyState === 2 && capable.status2) { - try { - this.statusCode = res.status; - this.headers = parseHeaders(res); - } - catch (err) { - capable.status2 = false; - } - - if (capable.status2) { - this.emit('ready'); - } - } - else if (capable.streaming && res.readyState === 3) { - try { - if (!this.statusCode) { - this.statusCode = res.status; - this.headers = parseHeaders(res); - this.emit('ready'); - } - } - catch (err) {} - - try { - this._emitData(res); - } - catch (err) { - capable.streaming = false; - } - } - else if (res.readyState === 4) { - if (!this.statusCode) { - this.statusCode = res.status; - this.emit('ready'); - } - this._emitData(res); - - if (res.error) { - this.emit('error', this.getResponse(res)); - } - else this.emit('end'); - - this.emit('close'); - } -}; - -Response.prototype._emitData = function (res) { - var respBody = this.getResponse(res); - if (respBody.toString().match(/ArrayBuffer/)) { - this.emit('data', new Uint8Array(respBody, this.offset)); - this.offset = respBody.byteLength; - return; - } - if (respBody.length > this.offset) { - this.emit('data', respBody.slice(this.offset)); - this.offset = respBody.length; - } -}; - -var isArray = Array.isArray || function (xs) { - return Object.prototype.toString.call(xs) === '[object Array]'; -}; diff --git a/node_modules/browserify/node_modules/http-browserify/node_modules/Base64/.npmignore b/node_modules/browserify/node_modules/http-browserify/node_modules/Base64/.npmignore deleted file mode 100644 index cba87a39..00000000 --- a/node_modules/browserify/node_modules/http-browserify/node_modules/Base64/.npmignore +++ /dev/null @@ -1,2 +0,0 @@ -/coverage/ -/node_modules/ diff --git a/node_modules/browserify/node_modules/http-browserify/node_modules/Base64/.travis.yml b/node_modules/browserify/node_modules/http-browserify/node_modules/Base64/.travis.yml deleted file mode 100644 index fbde0513..00000000 --- a/node_modules/browserify/node_modules/http-browserify/node_modules/Base64/.travis.yml +++ /dev/null @@ -1,7 +0,0 @@ -language: node_js -node_js: - - "0.8" - - "0.10" - - "0.11" -install: make setup -script: make test diff --git a/node_modules/browserify/node_modules/http-browserify/node_modules/Base64/LICENSE b/node_modules/browserify/node_modules/http-browserify/node_modules/Base64/LICENSE deleted file mode 100644 index 48327671..00000000 --- a/node_modules/browserify/node_modules/http-browserify/node_modules/Base64/LICENSE +++ /dev/null @@ -1,14 +0,0 @@ - - DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE - Version 2, December 2004 - - Copyright (c) 2011..2012 David Chambers - - Everyone is permitted to copy and distribute verbatim or modified - copies of this license document, and changing it is allowed as long - as the name is changed. - - DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE - TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION - - 0. You just DO WHAT THE FUCK YOU WANT TO. diff --git a/node_modules/browserify/node_modules/http-browserify/node_modules/Base64/Makefile b/node_modules/browserify/node_modules/http-browserify/node_modules/Base64/Makefile deleted file mode 100644 index 5c475dfc..00000000 --- a/node_modules/browserify/node_modules/http-browserify/node_modules/Base64/Makefile +++ /dev/null @@ -1,42 +0,0 @@ -ISTANBUL = node_modules/.bin/istanbul -UGLIFYJS = node_modules/.bin/uglifyjs -XYZ = node_modules/.bin/xyz --message X.Y.Z --tag X.Y.Z - -SRC = base64.js -MIN = $(patsubst %.js,%.min.js,$(SRC)) - - -.PHONY: all -all: $(MIN) - -%.min.js: %.js - $(UGLIFYJS) $< --compress --mangle > $@ - - -.PHONY: bytes -bytes: base64.min.js - gzip --best --stdout $< | wc -c | tr -d ' ' - - -.PHONY: clean -clean: - rm -f -- $(MIN) - - -.PHONY: release-major release-minor release-patch -release-major: - $(XYZ) --increment major -release-minor: - $(XYZ) --increment minor -release-patch: - $(XYZ) --increment patch - - -.PHONY: setup -setup: - npm install - - -.PHONY: test -test: - $(ISTANBUL) cover node_modules/.bin/_mocha -- --compilers coffee:coffee-script/register diff --git a/node_modules/browserify/node_modules/http-browserify/node_modules/Base64/README.md b/node_modules/browserify/node_modules/http-browserify/node_modules/Base64/README.md deleted file mode 100644 index e5dafed4..00000000 --- a/node_modules/browserify/node_modules/http-browserify/node_modules/Base64/README.md +++ /dev/null @@ -1,34 +0,0 @@ -# Base64.js - -≈ 500 byte* polyfill for browsers which don't provide [`window.btoa`][1] and -[`window.atob`][2]. - -Although the script does no harm in browsers which do provide these functions, -a conditional script loader such as [yepnope][3] can prevent unnecessary HTTP -requests. - -```javascript -yepnope({ - test: window.btoa && window.atob, - nope: 'base64.js', - callback: function () { - // `btoa` and `atob` are now safe to use - } -}) -``` - -Base64.js stems from a [gist][4] by [yahiko][5]. - -### Running the test suite - - make setup - make test - -\* Minified and gzipped. Run `make bytes` to verify. - - -[1]: https://developer.mozilla.org/en/DOM/window.btoa -[2]: https://developer.mozilla.org/en/DOM/window.atob -[3]: http://yepnopejs.com/ -[4]: https://gist.github.com/229984 -[5]: https://github.com/yahiko diff --git a/node_modules/browserify/node_modules/http-browserify/node_modules/Base64/base64.js b/node_modules/browserify/node_modules/http-browserify/node_modules/Base64/base64.js deleted file mode 100644 index 15d3a8af..00000000 --- a/node_modules/browserify/node_modules/http-browserify/node_modules/Base64/base64.js +++ /dev/null @@ -1,60 +0,0 @@ -;(function () { - - var object = typeof exports != 'undefined' ? exports : this; // #8: web workers - var chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/='; - - function InvalidCharacterError(message) { - this.message = message; - } - InvalidCharacterError.prototype = new Error; - InvalidCharacterError.prototype.name = 'InvalidCharacterError'; - - // encoder - // [https://gist.github.com/999166] by [https://github.com/nignag] - object.btoa || ( - object.btoa = function (input) { - for ( - // initialize result and counter - var block, charCode, idx = 0, map = chars, output = ''; - // if the next input index does not exist: - // change the mapping table to "=" - // check if d has no fractional digits - input.charAt(idx | 0) || (map = '=', idx % 1); - // "8 - idx % 1 * 8" generates the sequence 2, 4, 6, 8 - output += map.charAt(63 & block >> 8 - idx % 1 * 8) - ) { - charCode = input.charCodeAt(idx += 3/4); - if (charCode > 0xFF) { - throw new InvalidCharacterError("'btoa' failed: The string to be encoded contains characters outside of the Latin1 range."); - } - block = block << 8 | charCode; - } - return output; - }); - - // decoder - // [https://gist.github.com/1020396] by [https://github.com/atk] - object.atob || ( - object.atob = function (input) { - input = input.replace(/=+$/, ''); - if (input.length % 4 == 1) { - throw new InvalidCharacterError("'atob' failed: The string to be decoded is not correctly encoded."); - } - for ( - // initialize result and counters - var bc = 0, bs, buffer, idx = 0, output = ''; - // get next character - buffer = input.charAt(idx++); - // character found in table? initialize bit storage and add its ascii value; - ~buffer && (bs = bc % 4 ? bs * 64 + buffer : buffer, - // and if not first of each 4 characters, - // convert the first 8 bits to one ascii character - bc++ % 4) ? output += String.fromCharCode(255 & bs >> (-2 * bc & 6)) : 0 - ) { - // try to find character in table (0-63, not found => -1) - buffer = chars.indexOf(buffer); - } - return output; - }); - -}()); diff --git a/node_modules/browserify/node_modules/http-browserify/node_modules/Base64/base64.min.js b/node_modules/browserify/node_modules/http-browserify/node_modules/Base64/base64.min.js deleted file mode 100644 index 33c7aa40..00000000 --- a/node_modules/browserify/node_modules/http-browserify/node_modules/Base64/base64.min.js +++ /dev/null @@ -1 +0,0 @@ -!function(){function t(t){this.message=t}var e="undefined"!=typeof exports?exports:this,r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";t.prototype=new Error,t.prototype.name="InvalidCharacterError",e.btoa||(e.btoa=function(e){for(var o,n,a=0,i=r,c="";e.charAt(0|a)||(i="=",a%1);c+=i.charAt(63&o>>8-a%1*8)){if(n=e.charCodeAt(a+=.75),n>255)throw new t("'btoa' failed: The string to be encoded contains characters outside of the Latin1 range.");o=o<<8|n}return c}),e.atob||(e.atob=function(e){if(e=e.replace(/=+$/,""),e.length%4==1)throw new t("'atob' failed: The string to be decoded is not correctly encoded.");for(var o,n,a=0,i=0,c="";n=e.charAt(i++);~n&&(o=a%4?64*o+n:n,a++%4)?c+=String.fromCharCode(255&o>>(-2*a&6)):0)n=r.indexOf(n);return c})}(); \ No newline at end of file diff --git a/node_modules/browserify/node_modules/http-browserify/node_modules/Base64/package.json b/node_modules/browserify/node_modules/http-browserify/node_modules/Base64/package.json deleted file mode 100644 index c2a4a998..00000000 --- a/node_modules/browserify/node_modules/http-browserify/node_modules/Base64/package.json +++ /dev/null @@ -1,56 +0,0 @@ -{ - "name": "Base64", - "version": "0.2.1", - "description": "Base64 encoding and decoding", - "author": { - "name": "David Chambers", - "email": "dc@davidchambers.me" - }, - "main": "./base64.js", - "licenses": [ - { - "type": "WTFPL", - "url": "https://raw.github.com/davidchambers/Base64.js/master/LICENSE" - } - ], - "repository": { - "type": "git", - "url": "git://github.com/davidchambers/Base64.js.git" - }, - "devDependencies": { - "coffee-script": "1.7.x", - "istanbul": "0.2.x", - "mocha": "1.18.x", - "uglify-js": "2.4.x", - "xyz": "0.1.x" - }, - "bugs": { - "url": "https://github.com/davidchambers/Base64.js/issues" - }, - "homepage": "https://github.com/davidchambers/Base64.js", - "_id": "Base64@0.2.1", - "dist": { - "shasum": "ba3a4230708e186705065e66babdd4c35cf60028", - "tarball": "https://registry.npmjs.org/Base64/-/Base64-0.2.1.tgz" - }, - "_from": "Base64@>=0.2.0 <0.3.0", - "_npmVersion": "1.4.3", - "_npmUser": { - "name": "michaelficarra", - "email": "npm@michael.ficarra.me" - }, - "maintainers": [ - { - "name": "davidchambers", - "email": "dc@hashify.me" - }, - { - "name": "michaelficarra", - "email": "npm@michael.ficarra.me" - } - ], - "directories": {}, - "_shasum": "ba3a4230708e186705065e66babdd4c35cf60028", - "_resolved": "https://registry.npmjs.org/Base64/-/Base64-0.2.1.tgz", - "readme": "ERROR: No README data found!" -} diff --git a/node_modules/browserify/node_modules/http-browserify/node_modules/Base64/test/base64.coffee b/node_modules/browserify/node_modules/http-browserify/node_modules/Base64/test/base64.coffee deleted file mode 100644 index e25cf5c6..00000000 --- a/node_modules/browserify/node_modules/http-browserify/node_modules/Base64/test/base64.coffee +++ /dev/null @@ -1,52 +0,0 @@ -assert = require 'assert' - -{btoa, atob} = require '..' - - -describe 'Base64.js', -> - - it 'can encode ASCII input', -> - assert.strictEqual btoa(''), '' - assert.strictEqual btoa('f'), 'Zg==' - assert.strictEqual btoa('fo'), 'Zm8=' - assert.strictEqual btoa('foo'), 'Zm9v' - assert.strictEqual btoa('quux'), 'cXV1eA==' - assert.strictEqual btoa('!"#$%'), 'ISIjJCU=' - assert.strictEqual btoa("&'()*+"), 'JicoKSor' - assert.strictEqual btoa(',-./012'), 'LC0uLzAxMg==' - assert.strictEqual btoa('3456789:'), 'MzQ1Njc4OTo=' - assert.strictEqual btoa(';<=>?@ABC'), 'Ozw9Pj9AQUJD' - assert.strictEqual btoa('DEFGHIJKLM'), 'REVGR0hJSktMTQ==' - assert.strictEqual btoa('NOPQRSTUVWX'), 'Tk9QUVJTVFVWV1g=' - assert.strictEqual btoa('YZ[\\]^_`abc'), 'WVpbXF1eX2BhYmM=' - assert.strictEqual btoa('defghijklmnop'), 'ZGVmZ2hpamtsbW5vcA==' - assert.strictEqual btoa('qrstuvwxyz{|}~'), 'cXJzdHV2d3h5ent8fX4=' - - it 'cannot encode non-ASCII input', -> - assert.throws (-> btoa '✈'), (err) -> - err instanceof Error and - err.name is 'InvalidCharacterError' and - err.message is "'btoa' failed: The string to be encoded contains characters outside of the Latin1 range." - - it 'can decode Base64-encoded input', -> - assert.strictEqual atob(''), '' - assert.strictEqual atob('Zg=='), 'f' - assert.strictEqual atob('Zm8='), 'fo' - assert.strictEqual atob('Zm9v'), 'foo' - assert.strictEqual atob('cXV1eA=='), 'quux' - assert.strictEqual atob('ISIjJCU='), '!"#$%' - assert.strictEqual atob('JicoKSor'), "&'()*+" - assert.strictEqual atob('LC0uLzAxMg=='), ',-./012' - assert.strictEqual atob('MzQ1Njc4OTo='), '3456789:' - assert.strictEqual atob('Ozw9Pj9AQUJD'), ';<=>?@ABC' - assert.strictEqual atob('REVGR0hJSktMTQ=='), 'DEFGHIJKLM' - assert.strictEqual atob('Tk9QUVJTVFVWV1g='), 'NOPQRSTUVWX' - assert.strictEqual atob('WVpbXF1eX2BhYmM='), 'YZ[\\]^_`abc' - assert.strictEqual atob('ZGVmZ2hpamtsbW5vcA=='), 'defghijklmnop' - assert.strictEqual atob('cXJzdHV2d3h5ent8fX4='), 'qrstuvwxyz{|}~' - - it 'cannot decode invalid input', -> - assert.throws (-> atob 'a'), (err) -> - err instanceof Error and - err.name is 'InvalidCharacterError' and - err.message is "'atob' failed: The string to be decoded is not correctly encoded." diff --git a/node_modules/browserify/node_modules/http-browserify/package.json b/node_modules/browserify/node_modules/http-browserify/package.json deleted file mode 100644 index 915d3d21..00000000 --- a/node_modules/browserify/node_modules/http-browserify/package.json +++ /dev/null @@ -1,65 +0,0 @@ -{ - "name": "http-browserify", - "version": "1.7.0", - "description": "http module compatability for browserify", - "main": "index.js", - "browserify": "index.js", - "directories": { - "lib": ".", - "example": "example", - "test": "test" - }, - "scripts": { - "test": "tape test/*.js" - }, - "dependencies": { - "Base64": "~0.2.0", - "inherits": "~2.0.1" - }, - "devDependencies": { - "ecstatic": "~0.1.6", - "tape": "~2.3.2" - }, - "repository": { - "type": "git", - "url": "http://github.com/substack/http-browserify.git" - }, - "keywords": [ - "http", - "browserify", - "compatible", - "meatless", - "browser" - ], - "author": { - "name": "James Halliday", - "email": "mail@substack.net", - "url": "http://substack.net" - }, - "license": "MIT/X11", - "gitHead": "17b2990010ebd39461d1117c1e2c50c25eab869f", - "bugs": { - "url": "https://github.com/substack/http-browserify/issues" - }, - "homepage": "https://github.com/substack/http-browserify", - "_id": "http-browserify@1.7.0", - "_shasum": "33795ade72df88acfbfd36773cefeda764735b20", - "_from": "http-browserify@>=1.4.0 <2.0.0", - "_npmVersion": "2.0.0", - "_npmUser": { - "name": "substack", - "email": "mail@substack.net" - }, - "maintainers": [ - { - "name": "substack", - "email": "mail@substack.net" - } - ], - "dist": { - "shasum": "33795ade72df88acfbfd36773cefeda764735b20", - "tarball": "https://registry.npmjs.org/http-browserify/-/http-browserify-1.7.0.tgz" - }, - "_resolved": "https://registry.npmjs.org/http-browserify/-/http-browserify-1.7.0.tgz", - "readme": "ERROR: No README data found!" -} diff --git a/node_modules/browserify/node_modules/http-browserify/readme.markdown b/node_modules/browserify/node_modules/http-browserify/readme.markdown deleted file mode 100644 index bd5c14b2..00000000 --- a/node_modules/browserify/node_modules/http-browserify/readme.markdown +++ /dev/null @@ -1,131 +0,0 @@ -# http-browserify - -The -[http](http://nodejs.org/docs/v0.4.10/api/all.html#hTTP) module from node.js, -but for browsers. - -When you `require('http')` in -[browserify](http://github.com/substack/node-browserify), -this module will be loaded. - -# example - -``` js -var http = require('http'); - -http.get({ path : '/beep' }, function (res) { - var div = document.getElementById('result'); - div.innerHTML += 'GET /beep
    '; - - res.on('data', function (buf) { - div.innerHTML += buf; - }); - - res.on('end', function () { - div.innerHTML += '
    __END__'; - }); -}); -``` - -# http methods - -var http = require('http'); - -## var req = http.request(opts, cb) - -where `opts` are: - -* `opts.method='GET'` - http method verb -* `opts.path` - path string, example: `'/foo/bar?baz=555'` -* `opts.headers={}` - as an object mapping key names to string or Array values -* `opts.host=window.location.host` - http host -* `opts.port=window.location.port` - http port -* `opts.responseType` - response type to set on the underlying xhr object - -The callback will be called with the response object. - -## var req = http.get(options, cb) - -A shortcut for - -``` js -options.method = 'GET'; -var req = http.request(options, cb); -req.end(); -``` - -# request methods - -## req.setHeader(key, value) - -Set an http header. - -## req.getHeader(key) - -Get an http header. - -## req.removeHeader(key) - -Remove an http header. - -## req.write(data) - -Write some data to the request body. - -If only 1 piece of data is written, `data` can be a FormData, Blob, or -ArrayBuffer instance. Otherwise, `data` should be a string or a buffer. - -## req.end(data) - -Close and send the request body, optionally with additional `data` to append. - -# response methods - -## res.getHeader(key) - -Return an http header, if set. `key` is case-insensitive. - -# response attributes - -* res.statusCode, the numeric http response code -* res.headers, an object with all lowercase keys - -# compatibility - -This module has been tested and works with: - -* Internet Explorer 5.5, 6, 7, 8, 9 -* Firefox 3.5 -* Chrome 7.0 -* Opera 10.6 -* Safari 5.0 - -Multipart streaming responses are buffered in all versions of Internet Explorer -and are somewhat buffered in Opera. In all the other browsers you get a nice -unbuffered stream of `"data"` events when you send down a content-type of -`multipart/octet-stream` or similar. - -# protip - -You can do: - -````javascript -var bundle = browserify({ - require : { http : 'http-browserify' } -}); -```` - -in order to map "http-browserify" over `require('http')` in your browserified -source. - -# install - -With [npm](https://npmjs.org) do: - -``` -npm install http-browserify -``` - -# license - -MIT diff --git a/node_modules/browserify/node_modules/http-browserify/test/request_url.js b/node_modules/browserify/node_modules/http-browserify/test/request_url.js deleted file mode 100644 index 1f58f2d8..00000000 --- a/node_modules/browserify/node_modules/http-browserify/test/request_url.js +++ /dev/null @@ -1,114 +0,0 @@ -global.window = global; -global.location = { - host: 'localhost:8081', - port: 8081, - protocol: 'http:' -}; - -var noop = function() {}; -global.XMLHttpRequest = function() { - this.open = noop; - this.send = noop; -}; - -global.FormData = function () {}; -global.Blob = function () {}; -global.ArrayBuffer = function () {}; - -var test = require('tape').test; -var http = require('../index.js'); - - -test('Test simple url string', function(t) { - var url = { path: '/api/foo' }; - var request = http.get(url, noop); - - t.equal( request.uri, 'http://localhost:8081/api/foo', 'Url should be correct'); - t.end(); - -}); - - -test('Test full url object', function(t) { - var url = { - host: "localhost:8081", - hostname: "localhost", - href: "http://localhost:8081/api/foo?bar=baz", - method: "GET", - path: "/api/foo?bar=baz", - pathname: "/api/foo", - port: "8081", - protocol: "http:", - query: "bar=baz", - search: "?bar=baz", - slashes: true - }; - - var request = http.get(url, noop); - - t.equal( request.uri, 'http://localhost:8081/api/foo?bar=baz', 'Url should be correct'); - t.end(); - -}); - -test('Test alt protocol', function(t) { - var params = { - protocol: "foo:", - hostname: "localhost", - port: "3000", - path: "/bar" - }; - - var request = http.get(params, noop); - - t.equal( request.uri, 'foo://localhost:3000/bar', 'Url should be correct'); - t.end(); - -}); - -test('Test string as parameters', function(t) { - var url = '/api/foo'; - var request = http.get(url, noop); - - t.equal( request.uri, 'http://localhost:8081/api/foo', 'Url should be correct'); - t.end(); - -}); - -test('Test withCredentials param', function(t) { - var url = '/api/foo'; - - var request = http.request({ url: url, withCredentials: false }, noop); - t.equal( request.xhr.withCredentials, false, 'xhr.withCredentials should be false'); - - var request = http.request({ url: url, withCredentials: true }, noop); - t.equal( request.xhr.withCredentials, true, 'xhr.withCredentials should be true'); - - var request = http.request({ url: url }, noop); - t.equal( request.xhr.withCredentials, true, 'xhr.withCredentials should be true'); - - t.end(); -}); - -test('Test POST XHR2 types', function(t) { - t.plan(3); - var url = '/api/foo'; - - var request = http.request({ url: url, method: 'POST' }, noop); - request.xhr.send = function (data) { - t.ok(data instanceof global.ArrayBuffer, 'data should be instanceof ArrayBuffer'); - }; - request.end(new global.ArrayBuffer()); - - request = http.request({ url: url, method: 'POST' }, noop); - request.xhr.send = function (data) { - t.ok(data instanceof global.Blob, 'data should be instanceof Blob'); - }; - request.end(new global.Blob()); - - request = http.request({ url: url, method: 'POST' }, noop); - request.xhr.send = function (data) { - t.ok(data instanceof global.FormData, 'data should be instanceof FormData'); - }; - request.end(new global.FormData()); -}); diff --git a/node_modules/browserify/node_modules/https-browserify/LICENSE b/node_modules/browserify/node_modules/https-browserify/LICENSE deleted file mode 100644 index ee27ba4b..00000000 --- a/node_modules/browserify/node_modules/https-browserify/LICENSE +++ /dev/null @@ -1,18 +0,0 @@ -This software is released under the MIT license: - -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/node_modules/browserify/node_modules/https-browserify/index.js b/node_modules/browserify/node_modules/https-browserify/index.js deleted file mode 100644 index 85355325..00000000 --- a/node_modules/browserify/node_modules/https-browserify/index.js +++ /dev/null @@ -1,14 +0,0 @@ -var http = require('http'); - -var https = module.exports; - -for (var key in http) { - if (http.hasOwnProperty(key)) https[key] = http[key]; -}; - -https.request = function (params, cb) { - if (!params) params = {}; - params.scheme = 'https'; - params.protocol = 'https:'; - return http.request.call(this, params, cb); -} diff --git a/node_modules/browserify/node_modules/https-browserify/package.json b/node_modules/browserify/node_modules/https-browserify/package.json deleted file mode 100644 index 88a2e536..00000000 --- a/node_modules/browserify/node_modules/https-browserify/package.json +++ /dev/null @@ -1,57 +0,0 @@ -{ - "name": "https-browserify", - "version": "0.0.1", - "description": "https module compatability for browserify", - "main": "index.js", - "repository": { - "type": "git", - "url": "git://github.com/substack/https-browserify.git" - }, - "homepage": "https://github.com/substack/https-browserify", - "keywords": [ - "https", - "browser", - "browserify" - ], - "author": { - "name": "James Halliday", - "email": "mail@substack.net", - "url": "http://substack.net" - }, - "license": "MIT", - "gitHead": "7ce43143cc6dd3e5576a977fd49d7e25f35bfdb8", - "bugs": { - "url": "https://github.com/substack/https-browserify/issues" - }, - "_id": "https-browserify@0.0.1", - "scripts": {}, - "_shasum": "3f91365cabe60b77ed0ebba24b454e3e09d95a82", - "_from": "https-browserify@>=0.0.0 <0.1.0", - "_npmVersion": "2.9.0", - "_nodeVersion": "1.8.4", - "_npmUser": { - "name": "feross", - "email": "feross@feross.org" - }, - "dist": { - "shasum": "3f91365cabe60b77ed0ebba24b454e3e09d95a82", - "tarball": "https://registry.npmjs.org/https-browserify/-/https-browserify-0.0.1.tgz" - }, - "maintainers": [ - { - "name": "feross", - "email": "feross@feross.org" - }, - { - "name": "ptarjan", - "email": "npm@paulisageek.com" - }, - { - "name": "substack", - "email": "substack@gmail.com" - } - ], - "directories": {}, - "_resolved": "https://registry.npmjs.org/https-browserify/-/https-browserify-0.0.1.tgz", - "readme": "ERROR: No README data found!" -} diff --git a/node_modules/browserify/node_modules/https-browserify/readme.markdown b/node_modules/browserify/node_modules/https-browserify/readme.markdown deleted file mode 100644 index 8638614f..00000000 --- a/node_modules/browserify/node_modules/https-browserify/readme.markdown +++ /dev/null @@ -1,22 +0,0 @@ -# https-browserify - -https module compatability for browserify - -# example - -``` js -var https = require('https-browserify'); -var r = https.request('https://github.com'); -r.on('request', function (res) { - console.log(res); -}); -``` - -# methods - -The API is the same as the client portion of the -[node core https module](http://nodejs.org/docs/latest/api/https.html). - -# license - -MIT diff --git a/node_modules/browserify/node_modules/inherits/LICENSE b/node_modules/browserify/node_modules/inherits/LICENSE deleted file mode 100644 index dea3013d..00000000 --- a/node_modules/browserify/node_modules/inherits/LICENSE +++ /dev/null @@ -1,16 +0,0 @@ -The ISC License - -Copyright (c) Isaac Z. Schlueter - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH -REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND -FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, -INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM -LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR -OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR -PERFORMANCE OF THIS SOFTWARE. - diff --git a/node_modules/browserify/node_modules/inherits/README.md b/node_modules/browserify/node_modules/inherits/README.md deleted file mode 100644 index b1c56658..00000000 --- a/node_modules/browserify/node_modules/inherits/README.md +++ /dev/null @@ -1,42 +0,0 @@ -Browser-friendly inheritance fully compatible with standard node.js -[inherits](http://nodejs.org/api/util.html#util_util_inherits_constructor_superconstructor). - -This package exports standard `inherits` from node.js `util` module in -node environment, but also provides alternative browser-friendly -implementation through [browser -field](https://gist.github.com/shtylman/4339901). Alternative -implementation is a literal copy of standard one located in standalone -module to avoid requiring of `util`. It also has a shim for old -browsers with no `Object.create` support. - -While keeping you sure you are using standard `inherits` -implementation in node.js environment, it allows bundlers such as -[browserify](https://github.com/substack/node-browserify) to not -include full `util` package to your client code if all you need is -just `inherits` function. It worth, because browser shim for `util` -package is large and `inherits` is often the single function you need -from it. - -It's recommended to use this package instead of -`require('util').inherits` for any code that has chances to be used -not only in node.js but in browser too. - -## usage - -```js -var inherits = require('inherits'); -// then use exactly as the standard one -``` - -## note on version ~1.0 - -Version ~1.0 had completely different motivation and is not compatible -neither with 2.0 nor with standard node.js `inherits`. - -If you are using version ~1.0 and planning to switch to ~2.0, be -careful: - -* new version uses `super_` instead of `super` for referencing - superclass -* new version overwrites current prototype while old one preserves any - existing fields on it diff --git a/node_modules/browserify/node_modules/inherits/inherits.js b/node_modules/browserify/node_modules/inherits/inherits.js deleted file mode 100644 index 3b94763a..00000000 --- a/node_modules/browserify/node_modules/inherits/inherits.js +++ /dev/null @@ -1,7 +0,0 @@ -try { - var util = require('util'); - if (typeof util.inherits !== 'function') throw ''; - module.exports = util.inherits; -} catch (e) { - module.exports = require('./inherits_browser.js'); -} diff --git a/node_modules/browserify/node_modules/inherits/inherits_browser.js b/node_modules/browserify/node_modules/inherits/inherits_browser.js deleted file mode 100644 index c1e78a75..00000000 --- a/node_modules/browserify/node_modules/inherits/inherits_browser.js +++ /dev/null @@ -1,23 +0,0 @@ -if (typeof Object.create === 'function') { - // implementation from standard node.js 'util' module - module.exports = function inherits(ctor, superCtor) { - ctor.super_ = superCtor - ctor.prototype = Object.create(superCtor.prototype, { - constructor: { - value: ctor, - enumerable: false, - writable: true, - configurable: true - } - }); - }; -} else { - // old school shim for old browsers - module.exports = function inherits(ctor, superCtor) { - ctor.super_ = superCtor - var TempCtor = function () {} - TempCtor.prototype = superCtor.prototype - ctor.prototype = new TempCtor() - ctor.prototype.constructor = ctor - } -} diff --git a/node_modules/browserify/node_modules/inherits/package.json b/node_modules/browserify/node_modules/inherits/package.json deleted file mode 100644 index 9146e757..00000000 --- a/node_modules/browserify/node_modules/inherits/package.json +++ /dev/null @@ -1,63 +0,0 @@ -{ - "name": "inherits", - "description": "Browser-friendly inheritance fully compatible with standard node.js inherits()", - "version": "2.0.3", - "keywords": [ - "inheritance", - "class", - "klass", - "oop", - "object-oriented", - "inherits", - "browser", - "browserify" - ], - "main": "./inherits.js", - "browser": "./inherits_browser.js", - "repository": { - "type": "git", - "url": "git://github.com/isaacs/inherits.git" - }, - "license": "ISC", - "scripts": { - "test": "node test" - }, - "devDependencies": { - "tap": "^7.1.0" - }, - "files": [ - "inherits.js", - "inherits_browser.js" - ], - "gitHead": "e05d0fb27c61a3ec687214f0476386b765364d5f", - "bugs": { - "url": "https://github.com/isaacs/inherits/issues" - }, - "homepage": "https://github.com/isaacs/inherits#readme", - "_id": "inherits@2.0.3", - "_shasum": "633c2c83e3da42a502f52466022480f4208261de", - "_from": "inherits@>=2.0.1 <2.1.0", - "_npmVersion": "3.10.7", - "_nodeVersion": "6.5.0", - "_npmUser": { - "name": "isaacs", - "email": "i@izs.me" - }, - "dist": { - "shasum": "633c2c83e3da42a502f52466022480f4208261de", - "tarball": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz" - }, - "maintainers": [ - { - "name": "isaacs", - "email": "i@izs.me" - } - ], - "_npmOperationalInternal": { - "host": "packages-16-east.internal.npmjs.com", - "tmp": "tmp/inherits-2.0.3.tgz_1473295776489_0.08142363070510328" - }, - "directories": {}, - "_resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", - "readme": "ERROR: No README data found!" -} diff --git a/node_modules/browserify/node_modules/insert-module-globals/.travis.yml b/node_modules/browserify/node_modules/insert-module-globals/.travis.yml deleted file mode 100644 index 74c57bf1..00000000 --- a/node_modules/browserify/node_modules/insert-module-globals/.travis.yml +++ /dev/null @@ -1,8 +0,0 @@ -language: node_js -node_js: - - "0.8" - - "0.10" - - "0.12" - - "iojs" -before_install: - - npm install -g npm@~1.4.6 diff --git a/node_modules/browserify/node_modules/insert-module-globals/LICENSE b/node_modules/browserify/node_modules/insert-module-globals/LICENSE deleted file mode 100644 index ee27ba4b..00000000 --- a/node_modules/browserify/node_modules/insert-module-globals/LICENSE +++ /dev/null @@ -1,18 +0,0 @@ -This software is released under the MIT license: - -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/node_modules/browserify/node_modules/insert-module-globals/bench/results.txt b/node_modules/browserify/node_modules/insert-module-globals/bench/results.txt deleted file mode 100644 index 7c9977d1..00000000 --- a/node_modules/browserify/node_modules/insert-module-globals/bench/results.txt +++ /dev/null @@ -1,18 +0,0 @@ -$ git log|head -n1 -commit 8b66aec6f43c5099c72ab365a93da2a9e406824e - -with lexical-scope@0.0.4: - -$ time module-deps bench/jquery.js | bin/cmd.js >/dev/null - -real 0m7.380s -user 0m7.504s -sys 0m0.320s - -with lexical-scope@0.0.5: - -$ time module-deps bench/jquery.js | bin/cmd.js >/dev/null - -real 0m2.441s -user 0m2.584s -sys 0m0.176s diff --git a/node_modules/browserify/node_modules/insert-module-globals/bench/run.sh b/node_modules/browserify/node_modules/insert-module-globals/bench/run.sh deleted file mode 100755 index 088cda6b..00000000 --- a/node_modules/browserify/node_modules/insert-module-globals/bench/run.sh +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/bash -time module-deps bench/jquery.js | bin/cmd.js >/dev/null diff --git a/node_modules/browserify/node_modules/insert-module-globals/bin/cmd.js b/node_modules/browserify/node_modules/insert-module-globals/bin/cmd.js deleted file mode 100755 index 3efe095e..00000000 --- a/node_modules/browserify/node_modules/insert-module-globals/bin/cmd.js +++ /dev/null @@ -1,26 +0,0 @@ -#!/usr/bin/env node - -var insert = require('../'); -var through = require('through2'); -var concat = require('concat-stream'); -var JSONStream = require('JSONStream'); - -var basedir = process.argv[2] || process.cwd(); - -process.stdin - .pipe(JSONStream.parse([ true ])) - .pipe(through.obj(write)) - .pipe(JSONStream.stringify()) - .pipe(process.stdout) -; - -function write (row, enc, next) { - var self = this; - var s = insert(row.id, { basedir: basedir }); - s.pipe(concat(function (src) { - row.source = src.toString('utf8'); - self.push(row); - next(); - })); - s.end(row.source); -} diff --git a/node_modules/browserify/node_modules/insert-module-globals/example/files/foo/index.js b/node_modules/browserify/node_modules/insert-module-globals/example/files/foo/index.js deleted file mode 100644 index 1f477ad7..00000000 --- a/node_modules/browserify/node_modules/insert-module-globals/example/files/foo/index.js +++ /dev/null @@ -1,6 +0,0 @@ -process.nextTick(function () { - console.log('in foo/index.js: ' + JSON.stringify({ - __filename: __filename, - __dirname: __dirname - })); -}); diff --git a/node_modules/browserify/node_modules/insert-module-globals/example/files/main.js b/node_modules/browserify/node_modules/insert-module-globals/example/files/main.js deleted file mode 100644 index 4b359a25..00000000 --- a/node_modules/browserify/node_modules/insert-module-globals/example/files/main.js +++ /dev/null @@ -1,6 +0,0 @@ -console.log('in main.js: ' + JSON.stringify({ - __filename: __filename, - __dirname: __dirname -})); - -require('./foo'); diff --git a/node_modules/browserify/node_modules/insert-module-globals/example/insert.js b/node_modules/browserify/node_modules/insert-module-globals/example/insert.js deleted file mode 100644 index d2caefcf..00000000 --- a/node_modules/browserify/node_modules/insert-module-globals/example/insert.js +++ /dev/null @@ -1,12 +0,0 @@ -var mdeps = require('module-deps'); -var bpack = require('browser-pack'); -var insert = require('../'); -function inserter (file) { - return insert(file, { basedir: __dirname + '/files' }); -} - -var files = [ __dirname + '/files/main.js' ]; -mdeps(files, { transform: inserter }) - .pipe(bpack({ raw: true })) - .pipe(process.stdout) -; diff --git a/node_modules/browserify/node_modules/insert-module-globals/index.js b/node_modules/browserify/node_modules/insert-module-globals/index.js deleted file mode 100644 index 29e4490f..00000000 --- a/node_modules/browserify/node_modules/insert-module-globals/index.js +++ /dev/null @@ -1,163 +0,0 @@ -var parseScope = require('lexical-scope'); -var through = require('through2'); -var merge = require('xtend'); - -var path = require('path'); -var processPath = require.resolve('process/browser.js'); -var isbufferPath = require.resolve('is-buffer') -var combineSourceMap = require('combine-source-map'); - -function getRelativeRequirePath(fullPath, fromPath) { - var relpath = path.relative(path.dirname(fromPath), fullPath); - if (relpath[0] !== "." && relpath[0] !== "/") { - relpath = "./" + relpath; - } - return relpath.replace(/\\/g, '/'); -} - -var defaultVars = { - process: function (file) { - var relpath = getRelativeRequirePath(processPath, file); - return 'require(' + JSON.stringify(relpath) + ')'; - }, - global: function () { - return 'typeof global !== "undefined" ? global : ' - + 'typeof self !== "undefined" ? self : ' - + 'typeof window !== "undefined" ? window : {}' - ; - }, - 'Buffer.isBuffer': function (file) { - var relpath = getRelativeRequirePath(isbufferPath, file); - return 'require(' + JSON.stringify(relpath) + ')'; - }, - Buffer: function () { - return 'require("buffer").Buffer'; - }, - __filename: function (file, basedir) { - var filename = '/' + path.relative(basedir, file); - return JSON.stringify(filename); - }, - __dirname: function (file, basedir) { - var dir = path.dirname('/' + path.relative(basedir, file)); - return JSON.stringify(dir); - } -}; - -module.exports = function (file, opts) { - if (/\.json$/i.test(file)) return through(); - if (!opts) opts = {}; - - var basedir = opts.basedir || '/'; - var vars = merge(defaultVars, opts.vars); - var varNames = Object.keys(vars).filter(function(name) { - return typeof vars[name] === 'function'; - }); - - var quick = RegExp(varNames.map(function (name) { - return '\\b' + name + '\\b'; - }).join('|')); - - var chunks = []; - - return through(write, end); - - function write (chunk, enc, next) { chunks.push(chunk); next() } - - function end () { - var self = this; - var source = Buffer.isBuffer(chunks[0]) - ? Buffer.concat(chunks).toString('utf8') - : chunks.join('') - ; - source = source - .replace(/^\ufeff/, '') - .replace(/^#![^\n]*\n/, '\n'); - - if (opts.always !== true && !quick.test(source)) { - this.push(source); - this.push(null); - return; - } - - try { - var scope = opts.always - ? { globals: { implicit: varNames } } - : parseScope('(function(){\n' + source + '\n})()') - ; - } - catch (err) { - var e = new SyntaxError( - (err.message || err) + ' while parsing ' + file - ); - e.type = 'syntax'; - e.filename = file; - return this.emit('error', e); - } - - var globals = {}; - - varNames.forEach(function (name) { - if (!/\./.test(name)) return; - var parts = name.split('.') - var prop = (scope.globals.implicitProperties || {})[parts[0]] - if (!prop || prop.length !== 1 || prop[0] !== parts[1]) return; - var value = vars[name](file, basedir); - if (!value) return; - globals[parts[0]] = '{' - + JSON.stringify(parts[1]) + ':' + value + '}'; - self.emit('global', name); - }); - varNames.forEach(function (name) { - if (/\./.test(name)) return; - if (globals[name]) return; - if (scope.globals.implicit.indexOf(name) < 0) return; - var value = vars[name](file, basedir); - if (!value) return; - globals[name] = value; - self.emit('global', name); - }); - - this.push(closeOver(globals, source, file, opts)); - this.push(null); - } -}; - -module.exports.vars = defaultVars; - -function closeOver (globals, src, file, opts) { - var keys = Object.keys(globals); - if (keys.length === 0) return src; - var values = keys.map(function (key) { return globals[key] }); - - var wrappedSource; - if (keys.length <= 3) { - wrappedSource = '(function (' + keys.join(',') + '){\n' - + src + '\n}).call(this,' + values.join(',') + ')' - ; - } - else { - // necessary to make arguments[3..6] still work for workerify etc - // a,b,c,arguments[3..6],d,e,f... - var extra = [ '__argument0', '__argument1', '__argument2', '__argument3' ]; - var names = keys.slice(0,3).concat(extra).concat(keys.slice(3)); - values.splice(3, 0, - 'arguments[3]','arguments[4]', - 'arguments[5]','arguments[6]' - ); - wrappedSource = '(function (' + names.join(',') + '){\n' - + src + '\n}).call(this,' + values.join(',') + ')'; - } - - // Generate source maps if wanted. Including the right offset for - // the wrapped source. - if (!opts.debug) { - return wrappedSource; - } - var sourceFile = path.relative(opts.basedir, file) - .replace(/\\/g, '/'); - var sourceMap = combineSourceMap.create().addFile( - { sourceFile: sourceFile, source: src}, - { line: 1 }); - return combineSourceMap.removeComments(wrappedSource) + "\n" - + sourceMap.comment(); -} diff --git a/node_modules/browserify/node_modules/insert-module-globals/node_modules/combine-source-map/.npmignore b/node_modules/browserify/node_modules/insert-module-globals/node_modules/combine-source-map/.npmignore deleted file mode 100644 index de78e273..00000000 --- a/node_modules/browserify/node_modules/insert-module-globals/node_modules/combine-source-map/.npmignore +++ /dev/null @@ -1,16 +0,0 @@ -lib-cov -*.seed -*.log -*.csv -*.dat -*.out -*.pid -*.gz - -pids -logs -results - -node_modules -npm-debug.log -tmp diff --git a/node_modules/browserify/node_modules/insert-module-globals/node_modules/combine-source-map/.travis.yml b/node_modules/browserify/node_modules/insert-module-globals/node_modules/combine-source-map/.travis.yml deleted file mode 100644 index 895dbd36..00000000 --- a/node_modules/browserify/node_modules/insert-module-globals/node_modules/combine-source-map/.travis.yml +++ /dev/null @@ -1,4 +0,0 @@ -language: node_js -node_js: - - 0.6 - - 0.8 diff --git a/node_modules/browserify/node_modules/insert-module-globals/node_modules/combine-source-map/LICENSE b/node_modules/browserify/node_modules/insert-module-globals/node_modules/combine-source-map/LICENSE deleted file mode 100644 index 41702c50..00000000 --- a/node_modules/browserify/node_modules/insert-module-globals/node_modules/combine-source-map/LICENSE +++ /dev/null @@ -1,23 +0,0 @@ -Copyright 2013 Thorsten Lorenz. -All rights reserved. - -Permission is hereby granted, free of charge, to any person -obtaining a copy of this software and associated documentation -files (the "Software"), to deal in the Software without -restriction, including without limitation the rights to use, -copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the -Software is furnished to do so, subject to the following -conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES -OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT -HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, -WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR -OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/browserify/node_modules/insert-module-globals/node_modules/combine-source-map/README.md b/node_modules/browserify/node_modules/insert-module-globals/node_modules/combine-source-map/README.md deleted file mode 100644 index 92dfc1f6..00000000 --- a/node_modules/browserify/node_modules/insert-module-globals/node_modules/combine-source-map/README.md +++ /dev/null @@ -1,111 +0,0 @@ -# combine-source-map [![build status](https://secure.travis-ci.org/thlorenz/combine-source-map.png)](http://travis-ci.org/thlorenz/combine-source-map) - -Add source maps of multiple files, offset them and then combine them into one source map. - -```js -var convert = require('convert-source-map'); -var combine = require('combine-source-map'); - -var fooComment = '//# sourceMappingURL=data:application/json;base64,eyJ2Z [..] pzJylcbiJdfQ=='; -var barComment = '//# sourceMappingURL=data:application/json;base64,eyJ2Z [..] VjaycpXG4iXX0='; - -var fooFile = { - source: '(function() {\n\n console.log(require(\'./bar.js\'));\n\n}).call(this);\n' + '\n' + fooComment - , sourceFile: 'foo.js' -}; -var barFile = { - source: '(function() {\n\n console.log(alert(\'alerts suck\'));\n\n}).call(this);\n' + '\n' + barComment - , sourceFile: 'bar.js' -}; - -var offset = { line: 2 }; -var base64 = combine - .create('bundle.js') - .addFile(fooFile, offset) - .addFile(barFile, { line: offset.line + 8 }) - .base64(); - -var sm = convert.fromBase64(base64).toObject(); -console.log(sm); -``` - -``` -{ version: 3, - file: 'bundle.js', - sources: [ 'foo.coffee', 'bar.coffee' ], - names: [], - mappings: ';;;AAAA;CAAA;CAAA,CAAA,CAAA,IAAO,GAAK;CAAZ;;;;;ACAA;CAAA;CAAA,CAAA,CAAA,IAAO,GAAK;CAAZ', - sourcesContent: - [ 'console.log(require \'./bar.js\')\n', - 'console.log(alert \'alerts suck\')\n' ] } -``` - -## Installation - - npm install combine-source-map - -## API - -### create() - -``` -/** - * @name create - * @function - * @param file {String} optional name of the generated file - * @param sourceRoot { String} optional sourceRoot of the map to be generated - * @return {Object} Combiner instance to which source maps can be added and later combined - */ -``` - -### Combiner.prototype.addFile(opts, offset) - -``` -/** - * Adds map to underlying source map. - * If source contains a source map comment that has the source of the original file inlined it will offset these - * mappings and include them. - * If no source map comment is found or it has no source inlined, mappings for the file will be generated and included - * - * @name addMap - * @function - * @param opts {Object} { sourceFile: {String}, source: {String} } - * @param offset {Object} { line: {Number}, column: {Number} } - */ -``` - -### Combiner.prototype.base64() - -``` -/** -* @name base64 -* @function -* @return {String} base64 encoded combined source map -*/ -``` - -### Combiner.prototype.comment() - -``` -/** - * @name comment - * @function - * @return {String} base64 encoded sourceMappingUrl comment of the combined source map - */ -``` - -### removeComments(src) - -``` -/** - * @name removeComments - * @function - * @param src - * @return {String} src with all sourceMappingUrl comments removed - */ -``` - -## Example - -Read and run the [more elaborate example](https://github.com/thlorenz/combine-source-map/blob/master/example/two-files.js) -in order to get a better idea how things work. diff --git a/node_modules/browserify/node_modules/insert-module-globals/node_modules/combine-source-map/example/two-files-short.js b/node_modules/browserify/node_modules/insert-module-globals/node_modules/combine-source-map/example/two-files-short.js deleted file mode 100644 index 311849c7..00000000 --- a/node_modules/browserify/node_modules/insert-module-globals/node_modules/combine-source-map/example/two-files-short.js +++ /dev/null @@ -1,26 +0,0 @@ -'use strict'; - -var convert = require('convert-source-map'); -var combine = require('..'); - -var fooComment = '//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZm9vLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiZm9vLmNvZmZlZSJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiO0FBQUE7Q0FBQTtDQUFBLENBQUEsQ0FBQSxJQUFPLEdBQUs7Q0FBWiIsInNvdXJjZXNDb250ZW50IjpbImNvbnNvbGUubG9nKHJlcXVpcmUgJy4vYmFyLmpzJylcbiJdfQ=='; -var barComment = '//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYmFyLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiYmFyLmNvZmZlZSJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiO0FBQUE7Q0FBQTtDQUFBLENBQUEsQ0FBQSxJQUFPLEdBQUs7Q0FBWiIsInNvdXJjZXNDb250ZW50IjpbImNvbnNvbGUubG9nKGFsZXJ0ICdhbGVydHMgc3VjaycpXG4iXX0='; - -var fooFile = { - source: '(function() {\n\n console.log(require(\'./bar.js\'));\n\n}).call(this);\n' + '\n' + fooComment - , sourceFile: 'foo.js' -}; -var barFile = { - source: '(function() {\n\n console.log(alert(\'alerts suck\'));\n\n}).call(this);\n' + '\n' + barComment - , sourceFile: 'bar.js' -}; - -var offset = { line: 2 }; -var base64 = combine - .create('bundle.js') - .addFile(fooFile, offset) - .addFile(barFile, { line: offset.line + 8 }) - .base64(); - -var sm = convert.fromBase64(base64).toObject(); -console.log(sm); diff --git a/node_modules/browserify/node_modules/insert-module-globals/node_modules/combine-source-map/example/two-files.js b/node_modules/browserify/node_modules/insert-module-globals/node_modules/combine-source-map/example/two-files.js deleted file mode 100644 index 0a4500bd..00000000 --- a/node_modules/browserify/node_modules/insert-module-globals/node_modules/combine-source-map/example/two-files.js +++ /dev/null @@ -1,46 +0,0 @@ -'use strict'; - -var convert = require('convert-source-map'); -var combine = require('..'); - -var foo = { - version : 3, - file : 'foo.js', - sourceRoot : '', - sources : [ 'foo.coffee' ], - names : [], - mappings : ';AAAA;CAAA;CAAA,CAAA,CAAA,IAAO,GAAK;CAAZ', - sourcesContent : [ 'console.log(require \'./bar.js\')\n' ] }; - -var bar = { - version : 3, - file : 'bar.js', - sourceRoot : '', - sources : [ 'bar.coffee' ], - names : [], - mappings : ';AAAA;CAAA;CAAA,CAAA,CAAA,IAAO,GAAK;CAAZ', - sourcesContent : [ 'console.log(alert \'alerts suck\')\n' ] }; - - -var fooComment = convert.fromObject(foo).toComment(); -var barComment = convert.fromObject(bar).toComment(); - -var fooFile = { - source: '(function() {\n\n console.log(require(\'./bar.js\'));\n\n}).call(this);\n' + '\n' + fooComment - , sourceFile: 'foo.js' -}; -var barFile = { - source: '(function() {\n\n console.log(alert(\'alerts suck\'));\n\n}).call(this);\n' + '\n' + barComment - , sourceFile: 'bar.js' -}; - -var offset = { line: 2 }; -var base64 = combine - .create('bundle.js') - .addFile(fooFile, offset) - .addFile(barFile, { line: offset.line + 8 }) - .base64(); - -var sm = convert.fromBase64(base64).toObject(); -console.log('Combined source maps:\n', sm); -console.log('\nMappings:\n', sm.mappings); diff --git a/node_modules/browserify/node_modules/insert-module-globals/node_modules/combine-source-map/index.js b/node_modules/browserify/node_modules/insert-module-globals/node_modules/combine-source-map/index.js deleted file mode 100644 index 78d9f696..00000000 --- a/node_modules/browserify/node_modules/insert-module-globals/node_modules/combine-source-map/index.js +++ /dev/null @@ -1,153 +0,0 @@ -'use strict'; - -var path = require('path'); -var convert = require('convert-source-map'); -var memoize = require('lodash.memoize'); -var createGenerator = require('inline-source-map'); -var pathIsAbsolute = require('./lib/path-is-absolute'); -var mappingsFromMap = require('./lib/mappings-from-map'); - -var protocolRx = /^[a-z]+:\/\//; - -/** - * Rebases a relative path in 'sourceFile' to be relative - * to the path where 'sourceFile' is located. - * - * This is necessary before adding relative paths to the - * new combined map to ensure all paths are relative to their - * original source. - * - * The 'sourceRoot' from the original source map is joined - * as well to ensure the complete path. - * - * Resulting paths that are absolute are passed along directly. - * - * @param sourceFile {String} path to the original source file that references a map - * @param relativeRoot {String} sourceRoot in sourceFile's map to combine with relativePath - * @param relativePath {String} source path from sourceFile's map - */ -var rebaseRelativePath = memoize(function(sourceFile, relativeRoot, relativePath) { - if (!relativePath) { - return relativePath; - } - - // join relative path to root (e.g. 'src/' + 'file.js') - var relativeRootedPath = relativeRoot ? path.join(relativeRoot, relativePath) : relativePath; - - if (sourceFile === relativeRootedPath || // same path, - pathIsAbsolute(relativeRootedPath) || // absolute path, nor - protocolRx.test(relativeRootedPath)) { // absolute protocol need rebasing - return relativeRootedPath; - } - - // make relative to source file - return path.join(path.dirname(sourceFile), relativeRootedPath); -}, function(a, b, c) { - return a + '::' + b + '::' + c; -}); - -function resolveMap(source) { - var gen = convert.fromSource(source); - return gen ? gen.toObject() : null; -} - -function hasInlinedSource(existingMap) { - return existingMap.sourcesContent && !!existingMap.sourcesContent[0]; -} - -function Combiner(file, sourceRoot) { - // since we include the original code in the map sourceRoot actually not needed - this.generator = createGenerator({ file: file || 'generated.js', sourceRoot: sourceRoot }); -} - -Combiner.prototype._addGeneratedMap = function (sourceFile, source, offset) { - this.generator.addGeneratedMappings(sourceFile, source, offset); - this.generator.addSourceContent(sourceFile, source); - return this; -}; - -Combiner.prototype._addExistingMap = function (sourceFile, source, existingMap, offset) { - var mappings = mappingsFromMap(existingMap); - - // add all of the sources from the map - for (var i = 0, len = existingMap.sources.length; i < len; i++) { - if (!existingMap.sourcesContent) continue; - - this.generator.addSourceContent( - rebaseRelativePath(sourceFile, existingMap.sourceRoot, existingMap.sources[i]), - existingMap.sourcesContent[i]); - } - - // add the mappings, preserving the original mapping 'source' - mappings.forEach(function(mapping) { - // Add the mappings one at a time because 'inline-source-map' doesn't handle - // mapping source filenames. The mapping.source already takes sourceRoot into account - // per the SMConsumer.eachMapping function, so pass null for the root here. - this.generator.addMappings( - rebaseRelativePath(sourceFile, null, mapping.source), [mapping], offset); - }, this); - - return this; -}; - -/** - * Adds map to underlying source map. - * If source contains a source map comment that has the source of the original file inlined it will offset these - * mappings and include them. - * If no source map comment is found or it has no source inlined, mappings for the file will be generated and included - * - * @name addMap - * @function - * @param opts {Object} { sourceFile: {String}, source: {String} } - * @param offset {Object} { line: {Number}, column: {Number} } - */ -Combiner.prototype.addFile = function (opts, offset) { - - offset = offset || {}; - if (!offset.hasOwnProperty('line')) offset.line = 0; - if (!offset.hasOwnProperty('column')) offset.column = 0; - - var existingMap = resolveMap(opts.source); - - return existingMap && hasInlinedSource(existingMap) - ? this._addExistingMap(opts.sourceFile, opts.source, existingMap, offset) - : this._addGeneratedMap(opts.sourceFile, opts.source, offset); -}; - -/** -* @name base64 -* @function -* @return {String} base64 encoded combined source map -*/ -Combiner.prototype.base64 = function () { - return this.generator.base64Encode(); -}; - -/** - * @name comment - * @function - * @return {String} base64 encoded sourceMappingUrl comment of the combined source map - */ -Combiner.prototype.comment = function () { - return this.generator.inlineMappingUrl(); -}; - -/** - * @name create - * @function - * @param file {String} optional name of the generated file - * @param sourceRoot {String} optional sourceRoot of the map to be generated - * @return {Object} Combiner instance to which source maps can be added and later combined - */ -exports.create = function (file, sourceRoot) { return new Combiner(file, sourceRoot); }; - -/** - * @name removeComments - * @function - * @param src - * @return {String} src with all sourceMappingUrl comments removed - */ -exports.removeComments = function (src) { - if (!src.replace) return src; - return src.replace(convert.commentRegex, '').replace(convert.mapFileCommentRegex, ''); -}; diff --git a/node_modules/browserify/node_modules/insert-module-globals/node_modules/combine-source-map/lib/mappings-from-map.js b/node_modules/browserify/node_modules/insert-module-globals/node_modules/combine-source-map/lib/mappings-from-map.js deleted file mode 100644 index e11a69e7..00000000 --- a/node_modules/browserify/node_modules/insert-module-globals/node_modules/combine-source-map/lib/mappings-from-map.js +++ /dev/null @@ -1,30 +0,0 @@ -var SMConsumer = require('source-map').SourceMapConsumer; - -/** - * @name mappingsFromMap - * @function - * @param map {Object} the JSON.parse()'ed map - * @return {Array} array of mappings - */ -module.exports = function (map) { - var consumer = new SMConsumer(map); - var mappings = []; - - consumer.eachMapping(function (mapping) { - // only set source if we have original position to handle edgecase (see inline-source-map tests) - mappings.push({ - original: mapping.originalColumn != null ? { - column: mapping.originalColumn - , line: mapping.originalLine - } : undefined - , generated: { - column: mapping.generatedColumn - , line: mapping.generatedLine - } - , source: mapping.originalColumn != null ? mapping.source : undefined - , name: mapping.name - }); - }); - - return mappings; -} diff --git a/node_modules/browserify/node_modules/insert-module-globals/node_modules/combine-source-map/lib/path-is-absolute.js b/node_modules/browserify/node_modules/insert-module-globals/node_modules/combine-source-map/lib/path-is-absolute.js deleted file mode 100644 index 719a336d..00000000 --- a/node_modules/browserify/node_modules/insert-module-globals/node_modules/combine-source-map/lib/path-is-absolute.js +++ /dev/null @@ -1,20 +0,0 @@ -'use strict'; - -function posix(path) { - return path.charAt(0) === '/'; -}; - -function win32(path) { - // https://github.com/joyent/node/blob/b3fcc245fb25539909ef1d5eaa01dbf92e168633/lib/path.js#L56 - var splitDeviceRe = /^([a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/]+[^\\\/]+)?([\\\/])?([\s\S]*?)$/; - var result = splitDeviceRe.exec(path); - var device = result[1] || ''; - var isUnc = !!device && device.charAt(1) !== ':'; - - // UNC paths are always absolute - return !!result[2] || isUnc; -}; - -module.exports = process.platform === 'win32' ? win32 : posix; -module.exports.posix = posix; -module.exports.win32 = win32; \ No newline at end of file diff --git a/node_modules/browserify/node_modules/insert-module-globals/node_modules/combine-source-map/lib/path-is-absolute.license b/node_modules/browserify/node_modules/insert-module-globals/node_modules/combine-source-map/lib/path-is-absolute.license deleted file mode 100644 index 0c06b5ac..00000000 --- a/node_modules/browserify/node_modules/insert-module-globals/node_modules/combine-source-map/lib/path-is-absolute.license +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) Sindre Sorhus (sindresorhus.com) - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. \ No newline at end of file diff --git a/node_modules/browserify/node_modules/insert-module-globals/node_modules/combine-source-map/node_modules/convert-source-map/.npmignore b/node_modules/browserify/node_modules/insert-module-globals/node_modules/combine-source-map/node_modules/convert-source-map/.npmignore deleted file mode 100644 index de78e273..00000000 --- a/node_modules/browserify/node_modules/insert-module-globals/node_modules/combine-source-map/node_modules/convert-source-map/.npmignore +++ /dev/null @@ -1,16 +0,0 @@ -lib-cov -*.seed -*.log -*.csv -*.dat -*.out -*.pid -*.gz - -pids -logs -results - -node_modules -npm-debug.log -tmp diff --git a/node_modules/browserify/node_modules/insert-module-globals/node_modules/combine-source-map/node_modules/convert-source-map/.travis.yml b/node_modules/browserify/node_modules/insert-module-globals/node_modules/combine-source-map/node_modules/convert-source-map/.travis.yml deleted file mode 100644 index a55b235f..00000000 --- a/node_modules/browserify/node_modules/insert-module-globals/node_modules/combine-source-map/node_modules/convert-source-map/.travis.yml +++ /dev/null @@ -1,5 +0,0 @@ -language: node_js -node_js: - - 0.8 - - 0.10 - - 0.11 \ No newline at end of file diff --git a/node_modules/browserify/node_modules/insert-module-globals/node_modules/combine-source-map/node_modules/convert-source-map/LICENSE b/node_modules/browserify/node_modules/insert-module-globals/node_modules/combine-source-map/node_modules/convert-source-map/LICENSE deleted file mode 100644 index 41702c50..00000000 --- a/node_modules/browserify/node_modules/insert-module-globals/node_modules/combine-source-map/node_modules/convert-source-map/LICENSE +++ /dev/null @@ -1,23 +0,0 @@ -Copyright 2013 Thorsten Lorenz. -All rights reserved. - -Permission is hereby granted, free of charge, to any person -obtaining a copy of this software and associated documentation -files (the "Software"), to deal in the Software without -restriction, including without limitation the rights to use, -copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the -Software is furnished to do so, subject to the following -conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES -OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT -HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, -WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR -OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/browserify/node_modules/insert-module-globals/node_modules/combine-source-map/node_modules/convert-source-map/README.md b/node_modules/browserify/node_modules/insert-module-globals/node_modules/combine-source-map/node_modules/convert-source-map/README.md deleted file mode 100644 index e415fecc..00000000 --- a/node_modules/browserify/node_modules/insert-module-globals/node_modules/combine-source-map/node_modules/convert-source-map/README.md +++ /dev/null @@ -1,121 +0,0 @@ -# convert-source-map [![build status](https://secure.travis-ci.org/thlorenz/convert-source-map.png)](http://travis-ci.org/thlorenz/convert-source-map) - -[![NPM](https://nodei.co/npm/convert-source-map.png?downloads=true&stars=true)](https://nodei.co/npm/convert-source-map/) - -Converts a source-map from/to different formats and allows adding/changing properties. - -```js -var convert = require('convert-source-map'); - -var json = convert - .fromComment('//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZm9vLmpzIiwic291cmNlcyI6WyJjb25zb2xlLmxvZyhcImhpXCIpOyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSIsInNvdXJjZVJvb3QiOiIvIn0=') - .toJSON(); - -var modified = convert - .fromComment('//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZm9vLmpzIiwic291cmNlcyI6WyJjb25zb2xlLmxvZyhcImhpXCIpOyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSIsInNvdXJjZVJvb3QiOiIvIn0=') - .setProperty('sources', [ 'CONSOLE.LOG("HI");' ]) - .toJSON(); - -console.log(json); -console.log(modified); -``` - -```json -{"version":3,"file":"foo.js","sources":["console.log(\"hi\");"],"names":[],"mappings":"AAAA","sourceRoot":"/"} -{"version":3,"file":"foo.js","sources":["CONSOLE.LOG(\"HI\");"],"names":[],"mappings":"AAAA","sourceRoot":"/"} -``` - -## API - -### fromObject(obj) - -Returns source map converter from given object. - -### fromJSON(json) - -Returns source map converter from given json string. - -### fromBase64(base64) - -Returns source map converter from given base64 encoded json string. - -### fromComment(comment) - -Returns source map converter from given base64 encoded json string prefixed with `//# sourceMappingURL=...`. - -### fromMapFileComment(comment, mapFileDir) - -Returns source map converter from given `filename` by parsing `//# sourceMappingURL=filename`. - -`filename` must point to a file that is found inside the `mapFileDir`. Most tools store this file right next to the -generated file, i.e. the one containing the source map. - -### fromSource(source[, largeSource]) - -Finds last sourcemap comment in file and returns source map converter or returns null if no source map comment was found. - -If `largeSource` is set to `true`, an algorithm that does not use regex is applied to find the source map. This is faster and especially useful if you're running into "call stack size exceeded" errors with the default algorithm. - -However, it is less accurate and may match content that isn't a source map comment. - -### fromMapFileSource(source, mapFileDir) - -Finds last sourcemap comment in file and returns source map converter or returns null if no source map comment was -found. - -The sourcemap will be read from the map file found by parsing `# sourceMappingURL=file` comment. For more info see -fromMapFileComment. - -### toObject() - -Returns a copy of the underlying source map. - -### toJSON([space]) - -Converts source map to json string. If `space` is given (optional), this will be passed to -[JSON.stringify](https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/JSON/stringify) when the -JSON string is generated. - -### toBase64() - -Converts source map to base64 encoded json string. - -### toComment([options]) - -Converts source map to an inline comment that can be appended to the source-file. - -By default, the comment is formatted like: `//# sourceMappingURL=...`, which you would -normally see in a JS source file. - -When `options.multiline == true`, the comment is formatted like: `/*# sourceMappingURL=... */`, which you would find in a CSS source file. - -### addProperty(key, value) - -Adds given property to the source map. Throws an error if property already exists. - -### setProperty(key, value) - -Sets given property to the source map. If property doesn't exist it is added, otherwise its value is updated. - -### getProperty(key) - -Gets given property of the source map. - -### removeComments(src) - -Returns `src` with all source map comments removed - -### removeMapFileComments(src) - -Returns `src` with all source map comments pointing to map files removed. - -### commentRegex - -Returns the regex used to find source map comments. - -### mapFileCommentRegex - -Returns the regex used to find source map comments pointing to map files. - - -[![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/thlorenz/convert-source-map/trend.png)](https://bitdeli.com/free "Bitdeli Badge") diff --git a/node_modules/browserify/node_modules/insert-module-globals/node_modules/combine-source-map/node_modules/convert-source-map/example/comment-to-json.js b/node_modules/browserify/node_modules/insert-module-globals/node_modules/combine-source-map/node_modules/convert-source-map/example/comment-to-json.js deleted file mode 100644 index dfab1861..00000000 --- a/node_modules/browserify/node_modules/insert-module-globals/node_modules/combine-source-map/node_modules/convert-source-map/example/comment-to-json.js +++ /dev/null @@ -1,15 +0,0 @@ -'use strict'; - -var convert = require('..'); - -var json = convert - .fromComment('//@ sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZm9vLmpzIiwic291cmNlcyI6WyJjb25zb2xlLmxvZyhcImhpXCIpOyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSIsInNvdXJjZVJvb3QiOiIvIn0=') - .toJSON(); - -var modified = convert - .fromComment('//@ sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZm9vLmpzIiwic291cmNlcyI6WyJjb25zb2xlLmxvZyhcImhpXCIpOyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSIsInNvdXJjZVJvb3QiOiIvIn0=') - .setProperty('sources', [ 'CONSOLE.LOG("HI");' ]) - .toJSON(); - -console.log(json); -console.log(modified); diff --git a/node_modules/browserify/node_modules/insert-module-globals/node_modules/combine-source-map/node_modules/convert-source-map/index.js b/node_modules/browserify/node_modules/insert-module-globals/node_modules/combine-source-map/node_modules/convert-source-map/index.js deleted file mode 100644 index bfe92d1e..00000000 --- a/node_modules/browserify/node_modules/insert-module-globals/node_modules/combine-source-map/node_modules/convert-source-map/index.js +++ /dev/null @@ -1,156 +0,0 @@ -'use strict'; -var fs = require('fs'); -var path = require('path'); - -var commentRx = /^\s*\/(?:\/|\*)[@#]\s+sourceMappingURL=data:(?:application|text)\/json;(?:charset[:=]\S+;)?base64,(.*)$/mg; -var mapFileCommentRx = - //Example (Extra space between slashes added to solve Safari bug. Exclude space in production): - // / /# sourceMappingURL=foo.js.map /*# sourceMappingURL=foo.js.map */ - /(?:\/\/[@#][ \t]+sourceMappingURL=([^\s'"]+?)[ \t]*$)|(?:\/\*[@#][ \t]+sourceMappingURL=([^\*]+?)[ \t]*(?:\*\/){1}[ \t]*$)/mg - -function decodeBase64(base64) { - return new Buffer(base64, 'base64').toString(); -} - -function stripComment(sm) { - return sm.split(',').pop(); -} - -function readFromFileMap(sm, dir) { - // NOTE: this will only work on the server since it attempts to read the map file - - var r = mapFileCommentRx.exec(sm); - mapFileCommentRx.lastIndex = 0; - - // for some odd reason //# .. captures in 1 and /* .. */ in 2 - var filename = r[1] || r[2]; - var filepath = path.join(dir, filename); - - try { - return fs.readFileSync(filepath, 'utf8'); - } catch (e) { - throw new Error('An error occurred while trying to read the map file at ' + filepath + '\n' + e); - } -} - -function Converter (sm, opts) { - opts = opts || {}; - - if (opts.isFileComment) sm = readFromFileMap(sm, opts.commentFileDir); - if (opts.hasComment) sm = stripComment(sm); - if (opts.isEncoded) sm = decodeBase64(sm); - if (opts.isJSON || opts.isEncoded) sm = JSON.parse(sm); - - this.sourcemap = sm; -} - -function convertFromLargeSource(content){ - var lines = content.split('\n'); - var line; - // find first line which contains a source map starting at end of content - for (var i = lines.length - 1; i > 0; i--) { - line = lines[i] - if (~line.indexOf('sourceMappingURL=data:')) return exports.fromComment(line); - } -} - -Converter.prototype.toJSON = function (space) { - return JSON.stringify(this.sourcemap, null, space); -}; - -Converter.prototype.toBase64 = function () { - var json = this.toJSON(); - return new Buffer(json).toString('base64'); -}; - -Converter.prototype.toComment = function (options) { - var base64 = this.toBase64(); - var data = 'sourceMappingURL=data:application/json;base64,' + base64; - return options && options.multiline ? '/*# ' + data + ' */' : '//# ' + data; -}; - -// returns copy instead of original -Converter.prototype.toObject = function () { - return JSON.parse(this.toJSON()); -}; - -Converter.prototype.addProperty = function (key, value) { - if (this.sourcemap.hasOwnProperty(key)) throw new Error('property %s already exists on the sourcemap, use set property instead'); - return this.setProperty(key, value); -}; - -Converter.prototype.setProperty = function (key, value) { - this.sourcemap[key] = value; - return this; -}; - -Converter.prototype.getProperty = function (key) { - return this.sourcemap[key]; -}; - -exports.fromObject = function (obj) { - return new Converter(obj); -}; - -exports.fromJSON = function (json) { - return new Converter(json, { isJSON: true }); -}; - -exports.fromBase64 = function (base64) { - return new Converter(base64, { isEncoded: true }); -}; - -exports.fromComment = function (comment) { - comment = comment - .replace(/^\/\*/g, '//') - .replace(/\*\/$/g, ''); - - return new Converter(comment, { isEncoded: true, hasComment: true }); -}; - -exports.fromMapFileComment = function (comment, dir) { - return new Converter(comment, { commentFileDir: dir, isFileComment: true, isJSON: true }); -}; - -// Finds last sourcemap comment in file or returns null if none was found -exports.fromSource = function (content, largeSource) { - if (largeSource) { - var res = convertFromLargeSource(content); - return res ? res : null; - } - - var m = content.match(commentRx); - commentRx.lastIndex = 0; - return m ? exports.fromComment(m.pop()) : null; -}; - -// Finds last sourcemap comment in file or returns null if none was found -exports.fromMapFileSource = function (content, dir) { - var m = content.match(mapFileCommentRx); - mapFileCommentRx.lastIndex = 0; - return m ? exports.fromMapFileComment(m.pop(), dir) : null; -}; - -exports.removeComments = function (src) { - commentRx.lastIndex = 0; - return src.replace(commentRx, ''); -}; - -exports.removeMapFileComments = function (src) { - mapFileCommentRx.lastIndex = 0; - return src.replace(mapFileCommentRx, ''); -}; - -Object.defineProperty(exports, 'commentRegex', { - get: function getCommentRegex () { - commentRx.lastIndex = 0; - return commentRx; - } -}); - -Object.defineProperty(exports, 'mapFileCommentRegex', { - get: function getMapFileCommentRegex () { - mapFileCommentRx.lastIndex = 0; - return mapFileCommentRx; - } -}); diff --git a/node_modules/browserify/node_modules/insert-module-globals/node_modules/combine-source-map/node_modules/convert-source-map/package.json b/node_modules/browserify/node_modules/insert-module-globals/node_modules/combine-source-map/node_modules/convert-source-map/package.json deleted file mode 100644 index 9782648b..00000000 --- a/node_modules/browserify/node_modules/insert-module-globals/node_modules/combine-source-map/node_modules/convert-source-map/package.json +++ /dev/null @@ -1,62 +0,0 @@ -{ - "name": "convert-source-map", - "version": "1.1.3", - "description": "Converts a source-map from/to different formats and allows adding/changing properties.", - "main": "index.js", - "scripts": { - "test": "tap test/*.js" - }, - "repository": { - "type": "git", - "url": "git://github.com/thlorenz/convert-source-map.git" - }, - "homepage": "https://github.com/thlorenz/convert-source-map", - "dependencies": {}, - "devDependencies": { - "inline-source-map": "~0.3.1", - "tap": "~0.4.13" - }, - "keywords": [ - "convert", - "sourcemap", - "source", - "map", - "browser", - "debug" - ], - "author": { - "name": "Thorsten Lorenz", - "email": "thlorenz@gmx.de", - "url": "http://thlorenz.com" - }, - "license": "MIT", - "engine": { - "node": ">=0.6" - }, - "gitHead": "5b208c76f8fd0aaa6dcaeeb07abc83187cf513f5", - "bugs": { - "url": "https://github.com/thlorenz/convert-source-map/issues" - }, - "_id": "convert-source-map@1.1.3", - "_shasum": "4829c877e9fe49b3161f3bf3673888e204699860", - "_from": "convert-source-map@>=1.1.0 <1.2.0", - "_npmVersion": "2.14.15", - "_nodeVersion": "4.2.4", - "_npmUser": { - "name": "thlorenz", - "email": "thlorenz@gmx.de" - }, - "dist": { - "shasum": "4829c877e9fe49b3161f3bf3673888e204699860", - "tarball": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.1.3.tgz" - }, - "maintainers": [ - { - "name": "thlorenz", - "email": "thlorenz@gmx.de" - } - ], - "directories": {}, - "_resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.1.3.tgz", - "readme": "ERROR: No README data found!" -} diff --git a/node_modules/browserify/node_modules/insert-module-globals/node_modules/combine-source-map/node_modules/convert-source-map/test/comment-regex.js b/node_modules/browserify/node_modules/insert-module-globals/node_modules/combine-source-map/node_modules/convert-source-map/test/comment-regex.js deleted file mode 100644 index 16331ccb..00000000 --- a/node_modules/browserify/node_modules/insert-module-globals/node_modules/combine-source-map/node_modules/convert-source-map/test/comment-regex.js +++ /dev/null @@ -1,138 +0,0 @@ -'use strict'; -/*jshint asi: true */ - -var test = require('tap').test - , generator = require('inline-source-map') - , rx = require('..').commentRegex - , mapFileRx = require('..').mapFileCommentRegex - -function comment(prefix, suffix) { - rx.lastIndex = 0; - return rx.test(prefix + 'sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiIiwic291cmNlcyI6WyJmdW5jdGlvbiBmb28oKSB7XG4gY29uc29sZS5sb2coXCJoZWxsbyBJIGFtIGZvb1wiKTtcbiBjb25zb2xlLmxvZyhcIndobyBhcmUgeW91XCIpO1xufVxuXG5mb28oKTtcbiJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSJ9' + suffix) -} - -function commentWithCharSet(prefix, suffix, sep) { - sep = sep || ':'; - rx.lastIndex = 0; - return rx.test(prefix + 'sourceMappingURL=data:application/json;charset' + sep +'utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiIiwic291cmNlcyI6WyJmdW5jdGlvbiBmb28oKSB7XG4gY29uc29sZS5sb2coXCJoZWxsbyBJIGFtIGZvb1wiKTtcbiBjb25zb2xlLmxvZyhcIndobyBhcmUgeW91XCIpO1xufVxuXG5mb28oKTtcbiJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSJ9' + suffix) -} - -// Source Map v2 Tests -test('comment regex old spec - @', function (t) { - [ - '//@ ', - ' //@ ', // with leading space - '\t//@ ', // with leading tab - '//@ ', // with leading text - '/*@ ', // multi line style - ' /*@ ', // multi line style with leading spaces - '\t/*@ ', // multi line style with leading tab - '/*@ ', // multi line style with leading text - ].forEach(function (x) { - t.ok(comment(x, ''), 'matches ' + x) - t.ok(commentWithCharSet(x, ''), 'matches ' + x + ' with charset') - t.ok(commentWithCharSet(x, '', '='), 'matches ' + x + ' with charset') - }); - - [ - ' @// @', - ' @/* @', - ].forEach(function (x) { t.ok(!comment(x, ''), 'should not match ' + x) }) - - t.end() -}) - -test('comment regex new spec - #', function (t) { - [ - ' //# ', // with leading spaces - '\t//# ', // with leading tab - '//# ', // with leading text - '/*# ', // multi line style - ' /*# ', // multi line style with leading spaces - '\t/*# ', // multi line style with leading tab - '/*# ', // multi line style with leading text - ].forEach(function (x) { - t.ok(comment(x, ''), 'matches ' + x) - t.ok(commentWithCharSet(x, ''), 'matches ' + x + ' with charset') - t.ok(commentWithCharSet(x, '', '='), 'matches ' + x + ' with charset') - }); - - [ - ' #// #', - ' #/* #', - ].forEach(function (x) { t.ok(!comment(x, ''), 'should not match ' + x) }) - - t.end() -}) - -function mapFileCommentWrap(s1, s2) { - mapFileRx.lastIndex = 0; - return mapFileRx.test(s1 + 'sourceMappingURL=foo.js.map' + s2) -} - -test('mapFileComment regex old spec - @', function (t) { - - [ - ['//@ ', ''], - [' //@ ', ''], // with leading spaces - ['\t//@ ', ''], // with a leading tab - ['///@ ', ''], // with a leading text - [';//@ ', ''], // with a leading text - ['return//@ ', ''], // with a leading text - ].forEach(function (x) { t.ok(mapFileCommentWrap(x[0], x[1]), 'matches ' + x.join(' :: ')) }); - - [ - [' @// @', ''], - ['var sm = "//@ ', '"'], // not inside a string - ['var sm = \'//@ ', '\''], // not inside a string - ['var sm = \' //@ ', '\''], // not inside a string - ].forEach(function (x) { t.ok(!mapFileCommentWrap(x[0], x[1]), 'does not match ' + x.join(' :: ')) }) - t.end() -}) - -test('mapFileComment regex new spec - #', function (t) { - [ - ['//# ', ''], - [' //# ', ''], // with leading space - ['\t//# ', ''], // with leading tab - ['///# ', ''], // with leading text - [';//# ', ''], // with leading text - ['return//# ', ''], // with leading text - ].forEach(function (x) { t.ok(mapFileCommentWrap(x[0], x[1]), 'matches ' + x.join(' :: ')) }); - - [ - [' #// #', ''], - ['var sm = "//# ', '"'], // not inside a string - ['var sm = \'//# ', '\''], // not inside a string - ['var sm = \' //# ', '\''], // not inside a string - ].forEach(function (x) { t.ok(!mapFileCommentWrap(x[0], x[1]), 'does not match ' + x.join(' :: ')) }) - t.end() -}) - -test('mapFileComment regex /* */ old spec - @', function (t) { - [ [ '/*@ ', '*/' ] - , [' /*@ ', ' */ ' ] // with leading spaces - , [ '\t/*@ ', ' \t*/\t '] // with a leading tab - , [ 'leading string/*@ ', '*/' ] // with a leading string - , [ '/*@ ', ' \t*/\t '] // with trailing whitespace - ].forEach(function (x) { t.ok(mapFileCommentWrap(x[0], x[1]), 'matches ' + x.join(' :: ')) }); - - [ ['/*@ ', ' */ */ ' ], // not the last thing on its line - ['/*@ ', ' */ more text ' ] // not the last thing on its line - ].forEach(function (x) { t.ok(!mapFileCommentWrap(x[0], x[1]), 'does not match ' + x.join(' :: ')) }); - t.end() -}) - -test('mapFileComment regex /* */ new spec - #', function (t) { - [ [ '/*# ', '*/' ] - , [' /*# ', ' */ ' ] // with leading spaces - , [ '\t/*# ', ' \t*/\t '] // with a leading tab - , [ 'leading string/*# ', '*/' ] // with a leading string - , [ '/*# ', ' \t*/\t '] // with trailing whitespace - ].forEach(function (x) { t.ok(mapFileCommentWrap(x[0], x[1]), 'matches ' + x.join(' :: ')) }); - - [ ['/*# ', ' */ */ ' ], // not the last thing on its line - ['/*# ', ' */ more text ' ] // not the last thing on its line - ].forEach(function (x) { t.ok(!mapFileCommentWrap(x[0], x[1]), 'does not match ' + x.join(' :: ')) }); - t.end() -}) diff --git a/node_modules/browserify/node_modules/insert-module-globals/node_modules/combine-source-map/node_modules/convert-source-map/test/convert-source-map.js b/node_modules/browserify/node_modules/insert-module-globals/node_modules/combine-source-map/node_modules/convert-source-map/test/convert-source-map.js deleted file mode 100644 index 9bd3ba91..00000000 --- a/node_modules/browserify/node_modules/insert-module-globals/node_modules/combine-source-map/node_modules/convert-source-map/test/convert-source-map.js +++ /dev/null @@ -1,207 +0,0 @@ -'use strict'; -/*jshint asi: true */ - -var test = require('tap').test - , generator = require('inline-source-map') - , convert = require('..') - -var gen = generator() - .addMappings('foo.js', [{ original: { line: 2, column: 3 } , generated: { line: 5, column: 10 } }], { line: 5 }) - .addGeneratedMappings('bar.js', 'var a = 2;\nconsole.log(a)', { line: 23, column: 22 }) - - , base64 = gen.base64Encode() - , comment = gen.inlineMappingUrl() - , json = gen.toString() - , obj = JSON.parse(json) - -test('different formats', function (t) { - - t.equal(convert.fromComment(comment).toComment(), comment, 'comment -> comment') - t.equal(convert.fromComment(comment).toBase64(), base64, 'comment -> base64') - t.equal(convert.fromComment(comment).toJSON(), json, 'comment -> json') - t.deepEqual(convert.fromComment(comment).toObject(), obj, 'comment -> object') - - t.equal(convert.fromBase64(base64).toBase64(), base64, 'base64 -> base64') - t.equal(convert.fromBase64(base64).toComment(), comment, 'base64 -> comment') - t.equal(convert.fromBase64(base64).toJSON(), json, 'base64 -> json') - t.deepEqual(convert.fromBase64(base64).toObject(), obj, 'base64 -> object') - - t.equal(convert.fromJSON(json).toJSON(), json, 'json -> json') - t.equal(convert.fromJSON(json).toBase64(), base64, 'json -> base64') - t.equal(convert.fromJSON(json).toComment(), comment, 'json -> comment') - t.deepEqual(convert.fromJSON(json).toObject(), obj, 'json -> object') - t.end() -}) - -test('to object returns a copy', function (t) { - var c = convert.fromJSON(json) - var o = c.toObject() - o.version = '99'; - t.equal(c.toObject().version, 3, 'setting property on returned object does not affect original') - t.end() -}) - -test('to multi-line map', function (t) { - var c = convert.fromObject(obj); - var s = c.toComment({ multiline: true }); - t.similar(s, /^\/\*# sourceMappingURL=.+ \*\/$/); - t.end(); -}) - -test('from source', function (t) { - var foo = [ - 'function foo() {' - , ' console.log("hello I am foo");' - , ' console.log("who are you");' - , '}' - , '' - , 'foo();' - , '' - ].join('\n') - , map = '//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiIiwic291cmNlcyI6WyJmdW5jdGlvbiBmb28oKSB7XG4gY29uc29sZS5sb2coXCJoZWxsbyBJIGFtIGZvb1wiKTtcbiBjb25zb2xlLmxvZyhcIndobyBhcmUgeW91XCIpO1xufVxuXG5mb28oKTtcbiJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSJ9' - , otherMap = '//# sourceMappingURL=data:application/json;base64,otherZXJzaW9uIjozLCJmaWxlIjoiIiwic291cmNlcyI6WyJmdW5jdGlvbiBmb28oKSB7XG4gY29uc29sZS5sb2coXCJoZWxsbyBJIGFtIGZvb1wiKTtcbiBjb25zb2xlLmxvZyhcIndobyBhcmUgeW91XCIpO1xufVxuXG5mb28oKTtcbiJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSJ9' - - function getComment(src) { - var map = convert.fromSource(src); - return map ? map.toComment() : null; - } - - t.equal(getComment(foo), null, 'no comment returns null') - t.equal(getComment(foo + map), map, 'beginning of last line') - t.equal(getComment(foo + ' ' + map), map, 'indented of last line') - t.equal(getComment(foo + ' ' + map + '\n\n'), map, 'indented on last non empty line') - t.equal(getComment(foo + map + '\nconsole.log("more code");\nfoo()\n'), map, 'in the middle of code') - t.equal(getComment(foo + otherMap + '\n' + map), map, 'finds last map in source') - t.end() -}) - -test('from source with a large source', function (t) { - var foo = [ - 'function foo() {' - , ' console.log("hello I am foo");' - , ' console.log("who are you");' - , '}' - , '' - , 'foo();' - , '' - ].join('\n') - , map = '//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiIiwic291cmNlcyI6WyJmdW5jdGlvbiBmb28oKSB7XG4gY29uc29sZS5sb2coXCJoZWxsbyBJIGFtIGZvb1wiKTtcbiBjb25zb2xlLmxvZyhcIndobyBhcmUgeW91XCIpO1xufVxuXG5mb28oKTtcbiJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSJ9' - , otherMap = '//# sourceMappingURL=data:application/json;base64,otherZXJzaW9uIjozLCJmaWxlIjoiIiwic291cmNlcyI6WyJmdW5jdGlvbiBmb28oKSB7XG4gY29uc29sZS5sb2coXCJoZWxsbyBJIGFtIGZvb1wiKTtcbiBjb25zb2xlLmxvZyhcIndobyBhcmUgeW91XCIpO1xufVxuXG5mb28oKTtcbiJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSJ9' - - function getComment(src) { - var map = convert.fromSource(src, true); - return map ? map.toComment() : null; - } - - t.equal(getComment(foo), null, 'no comment returns null') - t.equal(getComment(foo + map), map, 'beginning of last line') - t.equal(getComment(foo + ' ' + map), map, 'indented of last line') - t.equal(getComment(foo + ' ' + map + '\n\n'), map, 'indented on last non empty line') - t.equal(getComment(foo + map + '\nconsole.log("more code");\nfoo()\n'), map, 'in the middle of code') - t.equal(getComment(foo + otherMap + '\n' + map), map, 'finds last map in source') - t.end() -}) - -test('remove comments', function (t) { - var foo = [ - 'function foo() {' - , ' console.log("hello I am foo");' - , ' console.log("who are you");' - , '}' - , '' - , 'foo();' - , '' - ].join('\n') - // this one is old spec on purpose - , map = '//@ sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiIiwic291cmNlcyI6WyJmdW5jdGlvbiBmb28oKSB7XG4gY29uc29sZS5sb2coXCJoZWxsbyBJIGFtIGZvb1wiKTtcbiBjb25zb2xlLmxvZyhcIndobyBhcmUgeW91XCIpO1xufVxuXG5mb28oKTtcbiJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSJ9' - , otherMap = '//# sourceMappingURL=data:application/json;base64,ZXJzaW9uIjozLCJmaWxlIjoiIiwic291cmNlcyI6WyJmdW5jdGlvbiBmb28oKSB7XG4gY29uc29sZS5sb2coXCJoZWxsbyBJIGFtIGZvb1wiKTtcbiBjb25zb2xlLmxvZyhcIndobyBhcmUgeW91XCIpO1xufVxuXG5mb28oKTtcbiJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSJ9' - , extraCode = '\nconsole.log("more code");\nfoo()\n' - - t.equal(convert.removeComments(foo + map), foo, 'from last line') - t.equal(convert.removeComments(foo + map + extraCode), foo + extraCode, 'from the middle of code') - t.equal(convert.removeComments(foo + otherMap + extraCode + map), foo + extraCode, 'multiple comments from the middle of code') - t.end() -}) - -test('remove map file comments', function (t) { - var foo = [ - 'function foo() {' - , ' console.log("hello I am foo");' - , ' console.log("who are you");' - , '}' - , '' - , 'foo();' - , '' - ].join('\n') - , fileMap1 = '//# sourceMappingURL=foo.js.map' - , fileMap2 = '/*# sourceMappingURL=foo.js.map */'; - - t.equal(convert.removeMapFileComments(foo + fileMap1), foo, '// style filemap comment') - t.equal(convert.removeMapFileComments(foo + fileMap2), foo, '/* */ style filemap comment') - t.end() -}) - -test('pretty json', function (t) { - var mod = convert.fromJSON(json).toJSON(2) - , expected = JSON.stringify(obj, null, 2); - - t.equal( - mod - , expected - , 'pretty prints json when space is given') - t.end() -}) - -test('adding properties', function (t) { - var mod = convert - .fromJSON(json) - .addProperty('foo', 'bar') - .toJSON() - , expected = JSON.parse(json); - expected.foo = 'bar'; - t.equal( - mod - , JSON.stringify(expected) - , 'includes added property' - ) - t.end() -}) - -test('setting properties', function (t) { - var mod = convert - .fromJSON(json) - .setProperty('version', '2') - .setProperty('mappings', ';;;UACG') - .setProperty('should add', 'this') - .toJSON() - , expected = JSON.parse(json); - expected.version = '2'; - expected.mappings = ';;;UACG'; - expected['should add'] = 'this'; - t.equal( - mod - , JSON.stringify(expected) - , 'includes new property and changes existing properties' - ) - t.end() -}) - -test('getting properties', function (t) { - var sm = convert.fromJSON(json) - - t.equal(sm.getProperty('version'), 3, 'gets version') - t.deepEqual(sm.getProperty('sources'), ['foo.js', 'bar.js'], 'gets sources') - t.end() -}) - -test('return null fromSource when largeSource is true', function(t) { - var mod = convert.fromSource('', true) - , expected = null; - - t.equal( - mod - , expected - , 'return value should be null' - ) - t.end() -}) diff --git a/node_modules/browserify/node_modules/insert-module-globals/node_modules/combine-source-map/node_modules/convert-source-map/test/fixtures/map-file-comment-double-slash.css b/node_modules/browserify/node_modules/insert-module-globals/node_modules/combine-source-map/node_modules/convert-source-map/test/fixtures/map-file-comment-double-slash.css deleted file mode 100644 index e7779916..00000000 --- a/node_modules/browserify/node_modules/insert-module-globals/node_modules/combine-source-map/node_modules/convert-source-map/test/fixtures/map-file-comment-double-slash.css +++ /dev/null @@ -1,14 +0,0 @@ -.header { - background: #444; - border: solid; - padding: 10px; - border-radius: 10px 5px 10px 5px; - color: #b4b472; } - -#main li { - color: green; - margin: 10px; - padding: 10px; - font-size: 18px; } - -//# sourceMappingURL=map-file-comment.css.map diff --git a/node_modules/browserify/node_modules/insert-module-globals/node_modules/combine-source-map/node_modules/convert-source-map/test/fixtures/map-file-comment-inline.css b/node_modules/browserify/node_modules/insert-module-globals/node_modules/combine-source-map/node_modules/convert-source-map/test/fixtures/map-file-comment-inline.css deleted file mode 100644 index 1e61b241..00000000 --- a/node_modules/browserify/node_modules/insert-module-globals/node_modules/combine-source-map/node_modules/convert-source-map/test/fixtures/map-file-comment-inline.css +++ /dev/null @@ -1,14 +0,0 @@ -.header { - background: #444; - border: solid; - padding: 10px; - border-radius: 10px 5px 10px 5px; - color: #b4b472; } - -#main li { - color: green; - margin: 10px; - padding: 10px; - font-size: 18px; } - -/*# sourceMappingURL=data:application/json;base64,ewoidmVyc2lvbiI6ICIzIiwKIm1hcHBpbmdzIjogIkFBQUEsd0JBQXlCO0VBQ3ZCLFVBQVUsRUFBRSxJQUFJO0VBQ2hCLE1BQU0sRUFBRSxLQUFLO0VBQ2IsT0FBTyxFQUFFLElBQUk7RUFDYixhQUFhLEVBQUUsaUJBQWlCO0VBQ2hDLEtBQUssRUFBRSxPQUFrQjs7QUFHM0Isd0JBQXlCO0VBQ3ZCLE9BQU8sRUFBRSxJQUFJOztBQ1RmLGdCQUFpQjtFQUNmLFVBQVUsRUFBRSxJQUFJO0VBQ2hCLEtBQUssRUFBRSxNQUFNOztBQUdmLGtCQUFtQjtFQUNqQixNQUFNLEVBQUUsSUFBSTtFQUNaLE9BQU8sRUFBRSxJQUFJO0VBQ2IsVUFBVSxFQUFFLEtBQUs7RUFDakIsYUFBYSxFQUFFLEdBQUc7RUFDbEIsS0FBSyxFQUFFLEtBQUs7O0FBRWQsa0JBQW1CO0VBQ2pCLEtBQUssRUFBRSxLQUFLOztBQUdkLG1CQUFvQjtFQUNsQixLQUFLLEVBQUUsS0FBSztFQUNaLE1BQU0sRUFBRSxJQUFJO0VBQ1osT0FBTyxFQUFFLElBQUk7RUFDYixTQUFTLEVBQUUsSUFBSSIsCiJzb3VyY2VzIjogWyIuL2NsaWVudC9zYXNzL2NvcmUuc2NzcyIsIi4vY2xpZW50L3Nhc3MvbWFpbi5zY3NzIl0sCiJmaWxlIjogIm1hcC1maWxlLWNvbW1lbnQuY3NzIgp9 */ diff --git a/node_modules/browserify/node_modules/insert-module-globals/node_modules/combine-source-map/node_modules/convert-source-map/test/fixtures/map-file-comment.css b/node_modules/browserify/node_modules/insert-module-globals/node_modules/combine-source-map/node_modules/convert-source-map/test/fixtures/map-file-comment.css deleted file mode 100644 index 8b282680..00000000 --- a/node_modules/browserify/node_modules/insert-module-globals/node_modules/combine-source-map/node_modules/convert-source-map/test/fixtures/map-file-comment.css +++ /dev/null @@ -1,14 +0,0 @@ -.header { - background: #444; - border: solid; - padding: 10px; - border-radius: 10px 5px 10px 5px; - color: #b4b472; } - -#main li { - color: green; - margin: 10px; - padding: 10px; - font-size: 18px; } - -/*# sourceMappingURL=map-file-comment.css.map */ diff --git a/node_modules/browserify/node_modules/insert-module-globals/node_modules/combine-source-map/node_modules/convert-source-map/test/fixtures/map-file-comment.css.map b/node_modules/browserify/node_modules/insert-module-globals/node_modules/combine-source-map/node_modules/convert-source-map/test/fixtures/map-file-comment.css.map deleted file mode 100644 index 25950ea2..00000000 --- a/node_modules/browserify/node_modules/insert-module-globals/node_modules/combine-source-map/node_modules/convert-source-map/test/fixtures/map-file-comment.css.map +++ /dev/null @@ -1,6 +0,0 @@ -{ -"version": "3", -"mappings": "AAAA,wBAAyB;EACvB,UAAU,EAAE,IAAI;EAChB,MAAM,EAAE,KAAK;EACb,OAAO,EAAE,IAAI;EACb,aAAa,EAAE,iBAAiB;EAChC,KAAK,EAAE,OAAkB;;AAG3B,wBAAyB;EACvB,OAAO,EAAE,IAAI;;ACTf,gBAAiB;EACf,UAAU,EAAE,IAAI;EAChB,KAAK,EAAE,MAAM;;AAGf,kBAAmB;EACjB,MAAM,EAAE,IAAI;EACZ,OAAO,EAAE,IAAI;EACb,UAAU,EAAE,KAAK;EACjB,aAAa,EAAE,GAAG;EAClB,KAAK,EAAE,KAAK;;AAEd,kBAAmB;EACjB,KAAK,EAAE,KAAK;;AAGd,mBAAoB;EAClB,KAAK,EAAE,KAAK;EACZ,MAAM,EAAE,IAAI;EACZ,OAAO,EAAE,IAAI;EACb,SAAS,EAAE,IAAI", -"sources": ["./client/sass/core.scss","./client/sass/main.scss"], -"file": "map-file-comment.css" -} diff --git a/node_modules/browserify/node_modules/insert-module-globals/node_modules/combine-source-map/node_modules/convert-source-map/test/map-file-comment.js b/node_modules/browserify/node_modules/insert-module-globals/node_modules/combine-source-map/node_modules/convert-source-map/test/map-file-comment.js deleted file mode 100644 index b4167877..00000000 --- a/node_modules/browserify/node_modules/insert-module-globals/node_modules/combine-source-map/node_modules/convert-source-map/test/map-file-comment.js +++ /dev/null @@ -1,70 +0,0 @@ -'use strict'; -/*jshint asi: true */ - -var test = require('tap').test - , rx = require('..') - , fs = require('fs') - , convert = require('..') - -test('\nresolving a "/*# sourceMappingURL=map-file-comment.css.map*/" style comment inside a given css content', function (t) { - var css = fs.readFileSync(__dirname + '/fixtures/map-file-comment.css', 'utf8') - var conv = convert.fromMapFileSource(css, __dirname + '/fixtures'); - var sm = conv.toObject(); - - t.deepEqual( - sm.sources - , [ './client/sass/core.scss', - './client/sass/main.scss' ] - , 'resolves paths of original sources' - ) - - t.equal(sm.file, 'map-file-comment.css', 'includes filename of generated file') - t.equal( - sm.mappings - , 'AAAA,wBAAyB;EACvB,UAAU,EAAE,IAAI;EAChB,MAAM,EAAE,KAAK;EACb,OAAO,EAAE,IAAI;EACb,aAAa,EAAE,iBAAiB;EAChC,KAAK,EAAE,OAAkB;;AAG3B,wBAAyB;EACvB,OAAO,EAAE,IAAI;;ACTf,gBAAiB;EACf,UAAU,EAAE,IAAI;EAChB,KAAK,EAAE,MAAM;;AAGf,kBAAmB;EACjB,MAAM,EAAE,IAAI;EACZ,OAAO,EAAE,IAAI;EACb,UAAU,EAAE,KAAK;EACjB,aAAa,EAAE,GAAG;EAClB,KAAK,EAAE,KAAK;;AAEd,kBAAmB;EACjB,KAAK,EAAE,KAAK;;AAGd,mBAAoB;EAClB,KAAK,EAAE,KAAK;EACZ,MAAM,EAAE,IAAI;EACZ,OAAO,EAAE,IAAI;EACb,SAAS,EAAE,IAAI' - , 'includes mappings' - ) - t.end() -}) - -test('\nresolving a "//# sourceMappingURL=map-file-comment.css.map" style comment inside a given css content', function (t) { - var css = fs.readFileSync(__dirname + '/fixtures/map-file-comment-double-slash.css', 'utf8') - var conv = convert.fromMapFileSource(css, __dirname + '/fixtures'); - var sm = conv.toObject(); - - t.deepEqual( - sm.sources - , [ './client/sass/core.scss', - './client/sass/main.scss' ] - , 'resolves paths of original sources' - ) - - t.equal(sm.file, 'map-file-comment.css', 'includes filename of generated file') - t.equal( - sm.mappings - , 'AAAA,wBAAyB;EACvB,UAAU,EAAE,IAAI;EAChB,MAAM,EAAE,KAAK;EACb,OAAO,EAAE,IAAI;EACb,aAAa,EAAE,iBAAiB;EAChC,KAAK,EAAE,OAAkB;;AAG3B,wBAAyB;EACvB,OAAO,EAAE,IAAI;;ACTf,gBAAiB;EACf,UAAU,EAAE,IAAI;EAChB,KAAK,EAAE,MAAM;;AAGf,kBAAmB;EACjB,MAAM,EAAE,IAAI;EACZ,OAAO,EAAE,IAAI;EACb,UAAU,EAAE,KAAK;EACjB,aAAa,EAAE,GAAG;EAClB,KAAK,EAAE,KAAK;;AAEd,kBAAmB;EACjB,KAAK,EAAE,KAAK;;AAGd,mBAAoB;EAClB,KAAK,EAAE,KAAK;EACZ,MAAM,EAAE,IAAI;EACZ,OAAO,EAAE,IAAI;EACb,SAAS,EAAE,IAAI' - , 'includes mappings' - ) - t.end() -}) - -test('\nresolving a /*# sourceMappingURL=data:application/json;base64,... */ style comment inside a given css content', function(t) { - var css = fs.readFileSync(__dirname + '/fixtures/map-file-comment-inline.css', 'utf8') - var conv = convert.fromSource(css, __dirname + '/fixtures') - var sm = conv.toObject() - - t.deepEqual( - sm.sources - , [ './client/sass/core.scss', - './client/sass/main.scss' ] - , 'resolves paths of original sources' - ) - - t.equal(sm.file, 'map-file-comment.css', 'includes filename of generated file') - t.equal( - sm.mappings - , 'AAAA,wBAAyB;EACvB,UAAU,EAAE,IAAI;EAChB,MAAM,EAAE,KAAK;EACb,OAAO,EAAE,IAAI;EACb,aAAa,EAAE,iBAAiB;EAChC,KAAK,EAAE,OAAkB;;AAG3B,wBAAyB;EACvB,OAAO,EAAE,IAAI;;ACTf,gBAAiB;EACf,UAAU,EAAE,IAAI;EAChB,KAAK,EAAE,MAAM;;AAGf,kBAAmB;EACjB,MAAM,EAAE,IAAI;EACZ,OAAO,EAAE,IAAI;EACb,UAAU,EAAE,KAAK;EACjB,aAAa,EAAE,GAAG;EAClB,KAAK,EAAE,KAAK;;AAEd,kBAAmB;EACjB,KAAK,EAAE,KAAK;;AAGd,mBAAoB;EAClB,KAAK,EAAE,KAAK;EACZ,MAAM,EAAE,IAAI;EACZ,OAAO,EAAE,IAAI;EACb,SAAS,EAAE,IAAI' - , 'includes mappings' - ) - t.end() -}) diff --git a/node_modules/browserify/node_modules/insert-module-globals/node_modules/combine-source-map/node_modules/inline-source-map/.npmignore b/node_modules/browserify/node_modules/insert-module-globals/node_modules/combine-source-map/node_modules/inline-source-map/.npmignore deleted file mode 100644 index de78e273..00000000 --- a/node_modules/browserify/node_modules/insert-module-globals/node_modules/combine-source-map/node_modules/inline-source-map/.npmignore +++ /dev/null @@ -1,16 +0,0 @@ -lib-cov -*.seed -*.log -*.csv -*.dat -*.out -*.pid -*.gz - -pids -logs -results - -node_modules -npm-debug.log -tmp diff --git a/node_modules/browserify/node_modules/insert-module-globals/node_modules/combine-source-map/node_modules/inline-source-map/.travis.yml b/node_modules/browserify/node_modules/insert-module-globals/node_modules/combine-source-map/node_modules/inline-source-map/.travis.yml deleted file mode 100644 index b7684aa9..00000000 --- a/node_modules/browserify/node_modules/insert-module-globals/node_modules/combine-source-map/node_modules/inline-source-map/.travis.yml +++ /dev/null @@ -1,7 +0,0 @@ -sudo: false -language: node_js -node_js: - - 0.8 - - 0.10 - - 0.12 - - io.js diff --git a/node_modules/browserify/node_modules/insert-module-globals/node_modules/combine-source-map/node_modules/inline-source-map/LICENSE b/node_modules/browserify/node_modules/insert-module-globals/node_modules/combine-source-map/node_modules/inline-source-map/LICENSE deleted file mode 100644 index 41702c50..00000000 --- a/node_modules/browserify/node_modules/insert-module-globals/node_modules/combine-source-map/node_modules/inline-source-map/LICENSE +++ /dev/null @@ -1,23 +0,0 @@ -Copyright 2013 Thorsten Lorenz. -All rights reserved. - -Permission is hereby granted, free of charge, to any person -obtaining a copy of this software and associated documentation -files (the "Software"), to deal in the Software without -restriction, including without limitation the rights to use, -copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the -Software is furnished to do so, subject to the following -conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES -OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT -HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, -WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR -OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/browserify/node_modules/insert-module-globals/node_modules/combine-source-map/node_modules/inline-source-map/README.md b/node_modules/browserify/node_modules/insert-module-globals/node_modules/combine-source-map/node_modules/inline-source-map/README.md deleted file mode 100644 index 4271a6be..00000000 --- a/node_modules/browserify/node_modules/insert-module-globals/node_modules/combine-source-map/node_modules/inline-source-map/README.md +++ /dev/null @@ -1,89 +0,0 @@ -# inline-source-map [![build status](https://secure.travis-ci.org/thlorenz/inline-source-map.png)](http://travis-ci.org/thlorenz/inline-source-map) - -Adds source mappings and base64 encodes them, so they can be inlined in your generated file. - -```js -var generator = require('inline-source-map'); - -// default charset 'utf-8' is configurable -var gen = generator({ charset: 'utf-8' }) - .addMappings('foo.js', [{ original: { line: 2, column: 3 } , generated: { line: 5, column: 10 } }], { line: 5 }) - .addGeneratedMappings('bar.js', 'var a = 2;\nconsole.log(a)', { line: 23, column: 22 }); - -console.log('base64 mapping:', gen.base64Encode()); -console.log('inline mapping url:', gen.inlineMappingUrl()); -``` - -``` -base64 mapping: eyJ2ZXJzaW9uIjozLCJmaWxlIjoiIiwic291cmNlcyI6WyJmb28uanMiLCJiYXIuanMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7O1VBQ0c7Ozs7Ozs7Ozs7Ozs7O3NCQ0RIO3NCQUNBIn0= -inline mapping url: //@ sourceMappingURL=data:application/json;charset:utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiIiwic291cmNlcyI6WyJmb28uanMiLCJiYXIuanMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7O1VBQ0c7Ozs7Ozs7Ozs7Ozs7O3NCQ0RIO3NCQUNBIn0= -``` - -## API - -### addMappings(sourceFile, mappings, offset) - -``` -/** - * Adds the given mappings to the generator and offsets them if offset is given - * - * @name addMappings - * @function - * @param sourceFile {String} name of the source file - * @param mappings {Array{{Object}} each object has the form { original: { line: _, column: _ }, generated: { line: _, column: _ } } - * @param offset {Object} offset to apply to each mapping. Has the form { line: _, column: _ } - * @return {Object} the generator to allow chaining - */ -``` - -### addGeneratedMappings(sourceFile, source, offset) - -``` -/** - * Generates mappings for the given source and adds them, assuming that no translation from original to generated is necessary. - * - * @name addGeneratedMappings - * @function - * @param sourceFile {String} name of the source file - * @param source {String} source of the file - * @param offset {Object} offset to apply to each mapping. Has the form { line: _, column: _ } - * @return {Object} the generator to allow chaining - */ -``` - -### addSourceContent(sourceFile, sourceContent) - -``` -/** - * Adds source content for the given source file. - * - * @name addSourceContent - * @function - * @param sourceFile {String} The source file for which a mapping is included - * @param sourceContent {String} The content of the source file - * @return {Object} The generator to allow chaining - */ -``` - - -### base64Encode() - -``` -/** - * @name base64Encode - * @function - * @return {String} bas64 encoded representation of the added mappings - */ -``` - -If source contents were added, this will be included in the encoded mappings. - -### inlineMappingUrl() - -``` -/** - * @name inlineMappingUrl - * @function - * @return {String} comment with base64 encoded representation of the added mappings. Can be inlined at the end of the generated file. - */ -``` diff --git a/node_modules/browserify/node_modules/insert-module-globals/node_modules/combine-source-map/node_modules/inline-source-map/example/foo-bar.js b/node_modules/browserify/node_modules/insert-module-globals/node_modules/combine-source-map/node_modules/inline-source-map/example/foo-bar.js deleted file mode 100644 index 247ee308..00000000 --- a/node_modules/browserify/node_modules/insert-module-globals/node_modules/combine-source-map/node_modules/inline-source-map/example/foo-bar.js +++ /dev/null @@ -1,8 +0,0 @@ -var generator = require('..'); - -var gen = generator() - .addMappings('foo.js', [{ original: { line: 2, column: 3 } , generated: { line: 5, column: 10 } }], { line: 5 }) - .addGeneratedMappings('bar.js', 'var a = 2;\nconsole.log(a)', { line: 23, column: 22 }); - -console.log('base64 mapping', gen.base64Encode()); -console.log('inline mapping url', gen.inlineMappingUrl()); diff --git a/node_modules/browserify/node_modules/insert-module-globals/node_modules/combine-source-map/node_modules/inline-source-map/index.js b/node_modules/browserify/node_modules/insert-module-globals/node_modules/combine-source-map/node_modules/inline-source-map/index.js deleted file mode 100644 index 97419f42..00000000 --- a/node_modules/browserify/node_modules/insert-module-globals/node_modules/combine-source-map/node_modules/inline-source-map/index.js +++ /dev/null @@ -1,129 +0,0 @@ -'use strict'; -var SourceMapGenerator = require('source-map').SourceMapGenerator; - -function offsetMapping(mapping, offset) { - return { line: offset.line + mapping.line, column: offset.column + mapping.column }; -} - -function newlinesIn(src) { - if (!src) return 0; - var newlines = src.match(/\n/g); - - return newlines ? newlines.length : 0; -} - -function Generator(opts) { - opts = opts || {}; - this.generator = new SourceMapGenerator({ file: opts.file || '', sourceRoot: opts.sourceRoot || '' }); - this.sourcesContent = undefined; - this.opts = opts; -} - -/** - * Adds the given mappings to the generator and offsets them if offset is given - * - * @name addMappings - * @function - * @param sourceFile {String} name of the source file - * @param mappings {Array{{Object}} each object has the form { original: { line: _, column: _ }, generated: { line: _, column: _ } } - * @param offset {Object} offset to apply to each mapping. Has the form { line: _, column: _ } - * @return {Object} the generator to allow chaining - */ -Generator.prototype.addMappings = function (sourceFile, mappings, offset) { - var generator = this.generator; - - offset = offset || {}; - offset.line = offset.hasOwnProperty('line') ? offset.line : 0; - offset.column = offset.hasOwnProperty('column') ? offset.column : 0; - - mappings.forEach(function (m) { - // only set source if we have original position to handle edgecase (see inline-source-map tests) - generator.addMapping({ - source : m.original ? sourceFile : undefined - , original : m.original - , generated : offsetMapping(m.generated, offset) - }); - }); - return this; -}; - -/** - * Generates mappings for the given source, assuming that no translation from original to generated is necessary. - * - * @name addGeneratedMappings - * @function - * @param sourceFile {String} name of the source file - * @param source {String} source of the file - * @param offset {Object} offset to apply to each mapping. Has the form { line: _, column: _ } - * @return {Object} the generator to allow chaining - */ -Generator.prototype.addGeneratedMappings = function (sourceFile, source, offset) { - var mappings = [] - , linesToGenerate = newlinesIn(source) + 1; - - for (var line = 1; line <= linesToGenerate; line++) { - var location = { line: line, column: 0 }; - mappings.push({ original: location, generated: location }); - } - - return this.addMappings(sourceFile, mappings, offset); -}; - -/** - * Adds source content for the given source file. - * - * @name addSourceContent - * @function - * @param sourceFile {String} The source file for which a mapping is included - * @param sourcesContent {String} The content of the source file - * @return {Object} The generator to allow chaining - */ -Generator.prototype.addSourceContent = function (sourceFile, sourcesContent) { - this.sourcesContent = this.sourcesContent || {}; - this.sourcesContent[sourceFile] = sourcesContent; - return this; -}; - -/** - * @name base64Encode - * @function - * @return {String} bas64 encoded representation of the added mappings - */ -Generator.prototype.base64Encode = function () { - var map = this.toString(); - return new Buffer(map).toString('base64'); -}; - -/** - * @name inlineMappingUrl - * @function - * @return {String} comment with base64 encoded representation of the added mappings. Can be inlined at the end of the generated file. - */ -Generator.prototype.inlineMappingUrl = function () { - var charset = this.opts.charset || 'utf-8'; - return '//# sourceMappingURL=data:application/json;charset:' + charset + ';base64,' + this.base64Encode(); -}; - -Generator.prototype.toJSON = function () { - var map = this.generator.toJSON(); - if (!this.sourcesContent) return map; - - var toSourcesContent = (function (s) { return this.sourcesContent[s] || null; }).bind(this); - map.sourcesContent = map.sources.map(toSourcesContent); - return map; -}; - -Generator.prototype.toString = function () { - return JSON.stringify(this); -}; - -Generator.prototype._mappings = function () { - return this.generator._mappings._array; -}; - -Generator.prototype.gen = function () { - return this.generator; -}; - -module.exports = function (opts) { return new Generator(opts); }; -module.exports.Generator = Generator; diff --git a/node_modules/browserify/node_modules/insert-module-globals/node_modules/combine-source-map/node_modules/inline-source-map/package.json b/node_modules/browserify/node_modules/insert-module-globals/node_modules/combine-source-map/node_modules/inline-source-map/package.json deleted file mode 100644 index 3cd8533d..00000000 --- a/node_modules/browserify/node_modules/insert-module-globals/node_modules/combine-source-map/node_modules/inline-source-map/package.json +++ /dev/null @@ -1,70 +0,0 @@ -{ - "name": "inline-source-map", - "version": "0.5.0", - "description": "Adds source mappings and base64 encodes them, so they can be inlined in your generated file.", - "main": "index.js", - "scripts": { - "test-main": "tap test/*.js", - "test-0.8": "nave use 0.8 npm run test-main", - "test-0.10": "nave use 0.10 npm run test-main", - "test-0.12": "nave use 0.12 npm run test-main", - "test-all": "npm run test-main && npm run test-0.8 && npm run test-0.10 && npm run test-0.12", - "test": "if [ -e $TRAVIS ]; then npm run test-all; else npm run test-main; fi" - }, - "repository": { - "type": "git", - "url": "git://github.com/thlorenz/inline-source-map.git" - }, - "homepage": "https://github.com/thlorenz/inline-source-map", - "dependencies": { - "source-map": "~0.4.0" - }, - "devDependencies": { - "tap": "~0.7.0", - "nave": "~0.5.0" - }, - "keywords": [ - "source", - "map", - "inline", - "base64", - "bundle", - "generate", - "transpile" - ], - "author": { - "name": "Thorsten Lorenz", - "email": "thlorenz@gmx.de", - "url": "http://thlorenz.com" - }, - "license": "MIT", - "engine": { - "node": ">=0.6" - }, - "gitHead": "38625bdbb684712db90833373640f4bec7671784", - "bugs": { - "url": "https://github.com/thlorenz/inline-source-map/issues" - }, - "_id": "inline-source-map@0.5.0", - "_shasum": "4a4c5dd8e4fb5e9b3cda60c822dfadcaee66e0af", - "_from": "inline-source-map@>=0.5.0 <0.6.0", - "_npmVersion": "2.5.1", - "_nodeVersion": "1.2.0", - "_npmUser": { - "name": "thlorenz", - "email": "thlorenz@gmx.de" - }, - "maintainers": [ - { - "name": "thlorenz", - "email": "thlorenz@gmx.de" - } - ], - "dist": { - "shasum": "4a4c5dd8e4fb5e9b3cda60c822dfadcaee66e0af", - "tarball": "https://registry.npmjs.org/inline-source-map/-/inline-source-map-0.5.0.tgz" - }, - "directories": {}, - "_resolved": "https://registry.npmjs.org/inline-source-map/-/inline-source-map-0.5.0.tgz", - "readme": "ERROR: No README data found!" -} diff --git a/node_modules/browserify/node_modules/insert-module-globals/node_modules/combine-source-map/node_modules/inline-source-map/test/inline-source-map.js b/node_modules/browserify/node_modules/insert-module-globals/node_modules/combine-source-map/node_modules/inline-source-map/test/inline-source-map.js deleted file mode 100644 index 7b8be84c..00000000 --- a/node_modules/browserify/node_modules/insert-module-globals/node_modules/combine-source-map/node_modules/inline-source-map/test/inline-source-map.js +++ /dev/null @@ -1,342 +0,0 @@ -'use strict'; -/*jshint asi: true*/ - -var test = require('tap').test -var generator = require('..'); - -var foo = '' + function foo () { - var hello = 'hello'; - var world = 'world'; - console.log('%s %s', hello, world); -} - -var bar = '' + function bar () { - console.log('yes?'); -} - -function decode(base64) { - return new Buffer(base64, 'base64').toString(); -} - -function inspect(obj, depth) { - console.error(require('util').inspect(obj, false, depth || 5, true)); -} - -test('generated mappings', function (t) { - - t.test('one file no offset', function (t) { - var gen = generator() - .addGeneratedMappings('foo.js', foo) - - t.deepEqual( - gen._mappings() - , [ { generatedLine: 1, - generatedColumn: 0, - originalLine: 1, - originalColumn: 0, - source: 'foo.js', - name: null }, - { generatedLine: 2, - generatedColumn: 0, - originalLine: 2, - originalColumn: 0, - source: 'foo.js', - name: null }, - { generatedLine: 3, - generatedColumn: 0, - originalLine: 3, - originalColumn: 0, - source: 'foo.js', - name: null }, - { generatedLine: 4, - generatedColumn: 0, - originalLine: 4, - originalColumn: 0, - source: 'foo.js', - name: null }, - { generatedLine: 5, - generatedColumn: 0, - originalLine: 5, - originalColumn: 0, - source: 'foo.js', - name: null } ] - , 'generates correct mappings' - ) - - t.deepEqual( - JSON.parse(decode(gen.base64Encode())) - , {"version":3,"file":"","sources":["foo.js"],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA","sourceRoot":""} - , 'encodes generated mappings' - ) - t.equal( - gen.inlineMappingUrl() - , '//# sourceMappingURL=data:application/json;charset:utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImZvby5qcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBIiwiZmlsZSI6IiIsInNvdXJjZVJvb3QiOiIifQ==' - , 'returns correct inline mapping url' - ) - t.end() - }) - - t.test('two files no offset', function (t) { - var gen = generator() - .addGeneratedMappings('foo.js', foo) - .addGeneratedMappings('bar.js', bar) - - t.deepEqual( - gen._mappings() - , [ { generatedLine: 1, - generatedColumn: 0, - originalLine: 1, - originalColumn: 0, - source: 'foo.js', - name: null }, - { generatedLine: 2, - generatedColumn: 0, - originalLine: 2, - originalColumn: 0, - source: 'foo.js', - name: null }, - { generatedLine: 3, - generatedColumn: 0, - originalLine: 3, - originalColumn: 0, - source: 'foo.js', - name: null }, - { generatedLine: 4, - generatedColumn: 0, - originalLine: 4, - originalColumn: 0, - source: 'foo.js', - name: null }, - { generatedLine: 5, - generatedColumn: 0, - originalLine: 5, - originalColumn: 0, - source: 'foo.js', - name: null }, - { generatedLine: 1, - generatedColumn: 0, - originalLine: 1, - originalColumn: 0, - source: 'bar.js', - name: null }, - { generatedLine: 2, - generatedColumn: 0, - originalLine: 2, - originalColumn: 0, - source: 'bar.js', - name: null }, - { generatedLine: 3, - generatedColumn: 0, - originalLine: 3, - originalColumn: 0, - source: 'bar.js', - name: null } ] - , 'generates correct mappings' - ) - t.deepEqual( - JSON.parse(decode(gen.base64Encode())) - , {"version":3,"file":"","sources":["foo.js","bar.js"],"names":[],"mappings":"ACAA,ADAA;ACCA,ADAA;ACCA,ADAA;AACA;AACA","sourceRoot": ""} - , 'encodes generated mappings' - ) - t.equal( - gen.inlineMappingUrl() - , '//# sourceMappingURL=data:application/json;charset:utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImZvby5qcyIsImJhci5qcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUNBQSxBREFBO0FDQ0EsQURBQTtBQ0NBLEFEQUE7QUFDQTtBQUNBIiwiZmlsZSI6IiIsInNvdXJjZVJvb3QiOiIifQ==' - , 'returns correct inline mapping url' - ) - t.end() - }) - - t.test('one line source', function (t) { - var gen = generator().addGeneratedMappings('one-liner.js', 'console.log("line one");') - t.deepEqual( - gen._mappings() - , [ { generatedLine: 1, - generatedColumn: 0, - originalLine: 1, - originalColumn: 0, - source: 'one-liner.js', - name: null } ] - , 'generates correct mappings' - ) - t.end() - }) - - t.test('with offset', function (t) { - var gen = generator() - .addGeneratedMappings('foo.js', foo, { line: 20 }) - .addGeneratedMappings('bar.js', bar, { line: 23, column: 22 }) - - t.deepEqual( - gen._mappings() - , [ { generatedLine: 21, - generatedColumn: 0, - originalLine: 1, - originalColumn: 0, - source: 'foo.js', - name: null }, - { generatedLine: 22, - generatedColumn: 0, - originalLine: 2, - originalColumn: 0, - source: 'foo.js', - name: null }, - { generatedLine: 23, - generatedColumn: 0, - originalLine: 3, - originalColumn: 0, - source: 'foo.js', - name: null }, - { generatedLine: 24, - generatedColumn: 0, - originalLine: 4, - originalColumn: 0, - source: 'foo.js', - name: null }, - { generatedLine: 25, - generatedColumn: 0, - originalLine: 5, - originalColumn: 0, - source: 'foo.js', - name: null }, - { generatedLine: 24, - generatedColumn: 22, - originalLine: 1, - originalColumn: 0, - source: 'bar.js', - name: null }, - { generatedLine: 25, - generatedColumn: 22, - originalLine: 2, - originalColumn: 0, - source: 'bar.js', - name: null }, - { generatedLine: 26, - generatedColumn: 22, - originalLine: 3, - originalColumn: 0, - source: 'bar.js', - name: null } ] - , 'generates correct mappings' - ) - - t.deepEqual( - JSON.parse(decode(gen.base64Encode())) - , {"version":3,"file":"","sources":["foo.js","bar.js"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AACA;AACA;AACA,sBCHA;ADIA,sBCHA;sBACA", "sourceRoot": ""} - , 'encodes generated mappings with offset' - ) - t.end() - }) -}) - -test('given mappings, with one having no original', function (t) { - t.test('no offset', function (t) { - var gen = generator() - .addMappings('foo.js', [{ original: { line: 2, column: 3 } , generated: { line: 5, column: 10 } }]) - - // This addresses an edgecase in which a transpiler generates mappings but doesn't include the original position. - // If we set source to sourceFile (as usual) in that case, the mappings are considered invalid by the source-map module's - // SourceMapGenerator. Keeping source undefined fixes this problem. - // Raised issue: https://github.com/thlorenz/inline-source-map/issues/2 - // Validate function: https://github.com/mozilla/source-map/blob/a3372ea78e662582087dd25ebda999c06424e047/lib/source-map/source-map-generator.js#L232 - .addMappings('bar.js', [ - { original: { line: 6, column: 0 } , generated: { line: 7, column: 20 } } - , { generated: { line: 8, column: 30 } } - ]) - - t.deepEqual( - gen._mappings() - , [ { generatedLine: 5, - generatedColumn: 10, - originalLine: 2, - originalColumn: 3, - source: 'foo.js', - name: null }, - { generatedLine: 7, - generatedColumn: 20, - originalLine: 6, - originalColumn: 0, - source: 'bar.js', - name: null }, - { generatedLine: 8, - generatedColumn: 30, - originalLine: false, - originalColumn: false, - source: undefined, - name: null } ] - , 'adds correct mappings' - ) - t.deepEqual( - JSON.parse(decode(gen.base64Encode())) - , {"version":3,"file":"","sources":["foo.js","bar.js"],"names":[],"mappings":";;;;UACG;;oBCIH;8B", sourceRoot: ""} - , 'encodes generated mappings' - ) - t.equal( - gen.inlineMappingUrl() - , '//# sourceMappingURL=data:application/json;charset:utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImZvby5qcyIsImJhci5qcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7O1VBQ0c7O29CQ0lIOzhCIiwiZmlsZSI6IiIsInNvdXJjZVJvb3QiOiIifQ==' - , 'returns correct inline mapping url' - ) - t.end() - }) - - t.test('with offset', function (t) { - var gen = generator() - .addMappings('foo.js', [{ original: { line: 2, column: 3 } , generated: { line: 5, column: 10 } }], { line: 5 }) - .addMappings('bar.js', [{ original: { line: 6, column: 0 } , generated: { line: 7, column: 20 } }, { generated: { line: 8, column: 30 } }], { line: 9, column: 3 }) - - t.deepEqual( - gen._mappings() - , [ { generatedLine: 10, - generatedColumn: 10, - originalLine: 2, - originalColumn: 3, - source: 'foo.js', - name: null }, - { generatedLine: 16, - generatedColumn: 23, - originalLine: 6, - originalColumn: 0, - source: 'bar.js', - name: null }, - { generatedLine: 17, - generatedColumn: 33, - originalLine: false, - originalColumn: false, - source: undefined, - name: null } ] - , 'adds correct mappings' - ) - t.deepEqual( - JSON.parse(decode(gen.base64Encode())) - , {"version":3,"file":"","sources":["foo.js","bar.js"],"names":[],"mappings":";;;;;;;;;UACG;;;;;;uBCIH;iC", sourceRoot: ""} - , 'encodes mappings with offset' - ) - t.end() - }) -}); - -test('inline mapping url with charset opt', function(t){ - t.test('set inline mapping url charset to gbk', function(t){ - var gen = generator({charset: 'gbk'}) - .addGeneratedMappings('foo.js', foo); - t.equal( - gen.inlineMappingUrl(), - '//# sourceMappingURL=data:application/json;charset:gbk;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImZvby5qcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBIiwiZmlsZSI6IiIsInNvdXJjZVJvb3QiOiIifQ==', - 'charset set to gbk' - ); - - t.end(); - }); - - t.test('default charset should be utf-8', function(t){ - var gen = generator() - .addGeneratedMappings('foo.js', foo); - - t.equal( - gen.inlineMappingUrl(), - '//# sourceMappingURL=data:application/json;charset:utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImZvby5qcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBIiwiZmlsZSI6IiIsInNvdXJjZVJvb3QiOiIifQ==', - 'charset default to utf-8' - ); - - t.end(); - }); -}); diff --git a/node_modules/browserify/node_modules/insert-module-globals/node_modules/combine-source-map/node_modules/inline-source-map/test/source-content.js b/node_modules/browserify/node_modules/insert-module-globals/node_modules/combine-source-map/node_modules/inline-source-map/test/source-content.js deleted file mode 100644 index 051d058f..00000000 --- a/node_modules/browserify/node_modules/insert-module-globals/node_modules/combine-source-map/node_modules/inline-source-map/test/source-content.js +++ /dev/null @@ -1,135 +0,0 @@ -'use strict'; -/*jshint asi: true*/ - -var test = require('tap').test -var generator = require('..'); - -var foo = '' + function foo () { - var hello = 'hello'; - var world = 'world'; - console.log('%s %s', hello, world); -} - -var bar = '' + function bar () { - console.log('yes?'); -} - -function decode(base64) { - return new Buffer(base64, 'base64').toString(); -} - -function inspect(obj, depth) { - console.log(require('util').inspect(obj, false, depth || 5, true)); -} - -test('generated mappings', function (t) { - - t.test('one file with source content', function (t) { - var gen = generator() - .addGeneratedMappings('foo.js', foo) - .addSourceContent('foo.js', foo) - - t.deepEqual( - gen.toJSON() - , { "version": 3, - "file": "", - "sources": [ - "foo.js" - ], - "names": [], - "mappings": "AAAA;AACA;AACA;AACA;AACA", - "sourceRoot": "", - "sourcesContent": [ - "function foo() {\n var hello = 'hello';\n var world = 'world';\n console.log('%s %s', hello, world);\n}" - ], - } - , 'includes source content' - ) - - t.equal( - decode(gen.base64Encode()) - , '{"version":3,"sources":["foo.js"],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA","file":"","sourceRoot":"","sourcesContent":["function foo() {\\n var hello = \'hello\';\\n var world = \'world\';\\n console.log(\'%s %s\', hello, world);\\n}"]}' - , 'encodes generated mappings including source content' - ) - t.equal( - gen.inlineMappingUrl() - , '//# sourceMappingURL=data:application/json;charset:utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImZvby5qcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBIiwiZmlsZSI6IiIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzQ29udGVudCI6WyJmdW5jdGlvbiBmb28oKSB7XG4gIHZhciBoZWxsbyA9ICdoZWxsbyc7XG4gIHZhciB3b3JsZCA9ICd3b3JsZCc7XG4gIGNvbnNvbGUubG9nKCclcyAlcycsIGhlbGxvLCB3b3JsZCk7XG59Il19' - , 'returns correct inline mapping url including source content' - ) - t.end() - }) - - t.test('two files with source content', function (t) { - var gen = generator() - .addGeneratedMappings('foo.js', foo) - .addSourceContent('foo.js', foo) - .addGeneratedMappings('bar.js', bar) - .addSourceContent('bar.js', bar) - - t.deepEqual( - gen.toJSON() - , { "version": 3, - "file": "", - "sources": [ - "foo.js", - "bar.js" - ], - "names": [], - "mappings": "ACAA,ADAA;ACCA,ADAA;ACCA,ADAA;AACA;AACA", - "sourceRoot": "", - "sourcesContent": [ - "function foo() {\n var hello = 'hello';\n var world = 'world';\n console.log('%s %s', hello, world);\n}", - "function bar() {\n console.log('yes?');\n}" - ], - } - , 'includes source content for both files' - ) - - t.deepEqual( - decode(gen.base64Encode()) - , '{"version":3,"sources":["foo.js","bar.js"],"names":[],"mappings":"ACAA,ADAA;ACCA,ADAA;ACCA,ADAA;AACA;AACA","file":"","sourceRoot":"","sourcesContent":["function foo() {\\n var hello = \'hello\';\\n var world = \'world\';\\n console.log(\'%s %s\', hello, world);\\n}","function bar() {\\n console.log(\'yes?\');\\n}"]}' - , 'encodes generated mappings including source content' - ) - t.equal( - gen.inlineMappingUrl() - , '//# sourceMappingURL=data:application/json;charset:utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImZvby5qcyIsImJhci5qcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUNBQSxBREFBO0FDQ0EsQURBQTtBQ0NBLEFEQUE7QUFDQTtBQUNBIiwiZmlsZSI6IiIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzQ29udGVudCI6WyJmdW5jdGlvbiBmb28oKSB7XG4gIHZhciBoZWxsbyA9ICdoZWxsbyc7XG4gIHZhciB3b3JsZCA9ICd3b3JsZCc7XG4gIGNvbnNvbGUubG9nKCclcyAlcycsIGhlbGxvLCB3b3JsZCk7XG59IiwiZnVuY3Rpb24gYmFyKCkge1xuICBjb25zb2xlLmxvZygneWVzPycpO1xufSJdfQ==' - , 'returns correct inline mapping url including source content' - ) - t.end() - }) - - t.test('two files, only one with source content', function (t) { - var gen = generator() - .addGeneratedMappings('foo.js', foo) - .addGeneratedMappings('bar.js', bar) - .addSourceContent('bar.js', bar) - - t.deepEqual( - gen.toJSON() - , { "version": 3, - "file": "", - "sources": [ - "foo.js", - "bar.js" - ], - "names": [], - "mappings": "ACAA,ADAA;ACCA,ADAA;ACCA,ADAA;AACA;AACA", - "sourcesContent": [ null, "function bar() {\n console.log('yes?');\n}" ], - "sourceRoot": "" - } - , 'includes source content for the file with source content and [null] for the other file' - ) - - t.deepEqual( - decode(gen.base64Encode()) - , '{"version":3,"sources":["foo.js","bar.js"],"names":[],"mappings":"ACAA,ADAA;ACCA,ADAA;ACCA,ADAA;AACA;AACA","file":"","sourceRoot":"","sourcesContent":[null,"function bar() {\\n console.log(\'yes?\');\\n}"]}' - , 'encodes generated mappings including source content' - ) - t.equal( - gen.inlineMappingUrl() - , '//# sourceMappingURL=data:application/json;charset:utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImZvby5qcyIsImJhci5qcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUNBQSxBREFBO0FDQ0EsQURBQTtBQ0NBLEFEQUE7QUFDQTtBQUNBIiwiZmlsZSI6IiIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzQ29udGVudCI6W251bGwsImZ1bmN0aW9uIGJhcigpIHtcbiAgY29uc29sZS5sb2coJ3llcz8nKTtcbn0iXX0=' - , 'returns correct inline mapping url including source content' - ) - t.end() - }) -}) diff --git a/node_modules/browserify/node_modules/insert-module-globals/node_modules/combine-source-map/node_modules/lodash.memoize/LICENSE.txt b/node_modules/browserify/node_modules/insert-module-globals/node_modules/combine-source-map/node_modules/lodash.memoize/LICENSE.txt deleted file mode 100644 index 9cd87e5d..00000000 --- a/node_modules/browserify/node_modules/insert-module-globals/node_modules/combine-source-map/node_modules/lodash.memoize/LICENSE.txt +++ /dev/null @@ -1,22 +0,0 @@ -Copyright 2012-2015 The Dojo Foundation -Based on Underscore.js, copyright 2009-2015 Jeremy Ashkenas, -DocumentCloud and Investigative Reporters & Editors - -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/node_modules/browserify/node_modules/insert-module-globals/node_modules/combine-source-map/node_modules/lodash.memoize/README.md b/node_modules/browserify/node_modules/insert-module-globals/node_modules/combine-source-map/node_modules/lodash.memoize/README.md deleted file mode 100644 index a417e274..00000000 --- a/node_modules/browserify/node_modules/insert-module-globals/node_modules/combine-source-map/node_modules/lodash.memoize/README.md +++ /dev/null @@ -1,20 +0,0 @@ -# lodash.memoize v3.0.4 - -The [modern build](https://github.com/lodash/lodash/wiki/Build-Differences) of [lodash’s](https://lodash.com/) `_.memoize` exported as a [Node.js](http://nodejs.org/)/[io.js](https://iojs.org/) module. - -## Installation - -Using npm: - -```bash -$ {sudo -H} npm i -g npm -$ npm i --save lodash.memoize -``` - -In Node.js/io.js: - -```js -var memoize = require('lodash.memoize'); -``` - -See the [documentation](https://lodash.com/docs#memoize) or [package source](https://github.com/lodash/lodash/blob/3.0.4-npm-packages/lodash.memoize) for more details. diff --git a/node_modules/browserify/node_modules/insert-module-globals/node_modules/combine-source-map/node_modules/lodash.memoize/index.js b/node_modules/browserify/node_modules/insert-module-globals/node_modules/combine-source-map/node_modules/lodash.memoize/index.js deleted file mode 100644 index 8cb054a4..00000000 --- a/node_modules/browserify/node_modules/insert-module-globals/node_modules/combine-source-map/node_modules/lodash.memoize/index.js +++ /dev/null @@ -1,167 +0,0 @@ -/** - * lodash 3.0.4 (Custom Build) - * Build: `lodash modern modularize exports="npm" -o ./` - * Copyright 2012-2015 The Dojo Foundation - * Based on Underscore.js 1.8.3 - * Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - * Available under MIT license - */ - -/** Used as the `TypeError` message for "Functions" methods. */ -var FUNC_ERROR_TEXT = 'Expected a function'; - -/** Used for native method references. */ -var objectProto = Object.prototype; - -/** Used to check objects for own properties. */ -var hasOwnProperty = objectProto.hasOwnProperty; - -/** - * Creates a cache object to store key/value pairs. - * - * @private - * @static - * @name Cache - * @memberOf _.memoize - */ -function MapCache() { - this.__data__ = {}; -} - -/** - * Removes `key` and its value from the cache. - * - * @private - * @name delete - * @memberOf _.memoize.Cache - * @param {string} key The key of the value to remove. - * @returns {boolean} Returns `true` if the entry was removed successfully, else `false`. - */ -function mapDelete(key) { - return this.has(key) && delete this.__data__[key]; -} - -/** - * Gets the cached value for `key`. - * - * @private - * @name get - * @memberOf _.memoize.Cache - * @param {string} key The key of the value to get. - * @returns {*} Returns the cached value. - */ -function mapGet(key) { - return key == '__proto__' ? undefined : this.__data__[key]; -} - -/** - * Checks if a cached value for `key` exists. - * - * @private - * @name has - * @memberOf _.memoize.Cache - * @param {string} key The key of the entry to check. - * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. - */ -function mapHas(key) { - return key != '__proto__' && hasOwnProperty.call(this.__data__, key); -} - -/** - * Sets `value` to `key` of the cache. - * - * @private - * @name set - * @memberOf _.memoize.Cache - * @param {string} key The key of the value to cache. - * @param {*} value The value to cache. - * @returns {Object} Returns the cache object. - */ -function mapSet(key, value) { - if (key != '__proto__') { - this.__data__[key] = value; - } - return this; -} - -/** - * Creates a function that memoizes the result of `func`. If `resolver` is - * provided it determines the cache key for storing the result based on the - * arguments provided to the memoized function. By default, the first argument - * provided to the memoized function is coerced to a string and used as the - * cache key. The `func` is invoked with the `this` binding of the memoized - * function. - * - * **Note:** The cache is exposed as the `cache` property on the memoized - * function. Its creation may be customized by replacing the `_.memoize.Cache` - * constructor with one whose instances implement the [`Map`](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-properties-of-the-map-prototype-object) - * method interface of `get`, `has`, and `set`. - * - * @static - * @memberOf _ - * @category Function - * @param {Function} func The function to have its output memoized. - * @param {Function} [resolver] The function to resolve the cache key. - * @returns {Function} Returns the new memoizing function. - * @example - * - * var upperCase = _.memoize(function(string) { - * return string.toUpperCase(); - * }); - * - * upperCase('fred'); - * // => 'FRED' - * - * // modifying the result cache - * upperCase.cache.set('fred', 'BARNEY'); - * upperCase('fred'); - * // => 'BARNEY' - * - * // replacing `_.memoize.Cache` - * var object = { 'user': 'fred' }; - * var other = { 'user': 'barney' }; - * var identity = _.memoize(_.identity); - * - * identity(object); - * // => { 'user': 'fred' } - * identity(other); - * // => { 'user': 'fred' } - * - * _.memoize.Cache = WeakMap; - * var identity = _.memoize(_.identity); - * - * identity(object); - * // => { 'user': 'fred' } - * identity(other); - * // => { 'user': 'barney' } - */ -function memoize(func, resolver) { - if (typeof func != 'function' || (resolver && typeof resolver != 'function')) { - throw new TypeError(FUNC_ERROR_TEXT); - } - var memoized = function() { - var args = arguments, - key = resolver ? resolver.apply(this, args) : args[0], - cache = memoized.cache; - - if (cache.has(key)) { - return cache.get(key); - } - var result = func.apply(this, args); - memoized.cache = cache.set(key, result); - return result; - }; - memoized.cache = new memoize.Cache; - return memoized; -} - -// Add functions to the `Map` cache. -MapCache.prototype['delete'] = mapDelete; -MapCache.prototype.get = mapGet; -MapCache.prototype.has = mapHas; -MapCache.prototype.set = mapSet; - -// Assign cache to `_.memoize`. -memoize.Cache = MapCache; - -module.exports = memoize; diff --git a/node_modules/browserify/node_modules/insert-module-globals/node_modules/combine-source-map/node_modules/lodash.memoize/package.json b/node_modules/browserify/node_modules/insert-module-globals/node_modules/combine-source-map/node_modules/lodash.memoize/package.json deleted file mode 100644 index a068b61b..00000000 --- a/node_modules/browserify/node_modules/insert-module-globals/node_modules/combine-source-map/node_modules/lodash.memoize/package.json +++ /dev/null @@ -1,94 +0,0 @@ -{ - "name": "lodash.memoize", - "version": "3.0.4", - "description": "The modern build of lodash’s `_.memoize` as a module.", - "homepage": "https://lodash.com/", - "icon": "https://lodash.com/icon.svg", - "license": "MIT", - "keywords": [ - "lodash", - "lodash-modularized", - "stdlib", - "util" - ], - "author": { - "name": "John-David Dalton", - "email": "john.david.dalton@gmail.com", - "url": "http://allyoucanleet.com/" - }, - "contributors": [ - { - "name": "John-David Dalton", - "email": "john.david.dalton@gmail.com", - "url": "http://allyoucanleet.com/" - }, - { - "name": "Benjamin Tan", - "email": "demoneaux@gmail.com", - "url": "https://d10.github.io/" - }, - { - "name": "Blaine Bublitz", - "email": "blaine@iceddev.com", - "url": "http://www.iceddev.com/" - }, - { - "name": "Kit Cambridge", - "email": "github@kitcambridge.be", - "url": "http://kitcambridge.be/" - }, - { - "name": "Mathias Bynens", - "email": "mathias@qiwi.be", - "url": "https://mathiasbynens.be/" - } - ], - "repository": { - "type": "git", - "url": "git+https://github.com/lodash/lodash.git" - }, - "scripts": { - "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" - }, - "bugs": { - "url": "https://github.com/lodash/lodash/issues" - }, - "_id": "lodash.memoize@3.0.4", - "_shasum": "2dcbd2c287cbc0a55cc42328bd0c736150d53e3f", - "_from": "lodash.memoize@>=3.0.3 <3.1.0", - "_npmVersion": "2.10.0", - "_nodeVersion": "0.12.3", - "_npmUser": { - "name": "jdalton", - "email": "john.david.dalton@gmail.com" - }, - "maintainers": [ - { - "name": "jdalton", - "email": "john.david.dalton@gmail.com" - }, - { - "name": "kitcambridge", - "email": "github@kitcambridge.be" - }, - { - "name": "mathias", - "email": "mathias@qiwi.be" - }, - { - "name": "phated", - "email": "blaine@iceddev.com" - }, - { - "name": "d10", - "email": "demoneaux@gmail.com" - } - ], - "dist": { - "shasum": "2dcbd2c287cbc0a55cc42328bd0c736150d53e3f", - "tarball": "https://registry.npmjs.org/lodash.memoize/-/lodash.memoize-3.0.4.tgz" - }, - "directories": {}, - "_resolved": "https://registry.npmjs.org/lodash.memoize/-/lodash.memoize-3.0.4.tgz", - "readme": "ERROR: No README data found!" -} diff --git a/node_modules/browserify/node_modules/insert-module-globals/node_modules/combine-source-map/node_modules/source-map/README.md b/node_modules/browserify/node_modules/insert-module-globals/node_modules/combine-source-map/node_modules/source-map/README.md deleted file mode 100644 index b7c6786c..00000000 --- a/node_modules/browserify/node_modules/insert-module-globals/node_modules/combine-source-map/node_modules/source-map/README.md +++ /dev/null @@ -1,510 +0,0 @@ -# Source Map - -This is a library to generate and consume the source map format -[described here][format]. - -This library is written in the Asynchronous Module Definition format, and works -in the following environments: - -* Modern Browsers supporting ECMAScript 5 (either after the build, or with an - AMD loader such as RequireJS) - -* Inside Firefox (as a JSM file, after the build) - -* With NodeJS versions 0.8.X and higher - -## Node - - $ npm install source-map - -## Building from Source (for everywhere else) - -Install Node and then run - - $ git clone https://fitzgen@github.com/mozilla/source-map.git - $ cd source-map - $ npm link . - -Next, run - - $ node Makefile.dryice.js - -This should spew a bunch of stuff to stdout, and create the following files: - -* `dist/source-map.js` - The unminified browser version. - -* `dist/source-map.min.js` - The minified browser version. - -* `dist/SourceMap.jsm` - The JavaScript Module for inclusion in Firefox source. - -## Examples - -### Consuming a source map - -```js -var rawSourceMap = { - version: 3, - file: 'min.js', - names: ['bar', 'baz', 'n'], - sources: ['one.js', 'two.js'], - sourceRoot: 'http://example.com/www/js/', - mappings: 'CAAC,IAAI,IAAM,SAAUA,GAClB,OAAOC,IAAID;CCDb,IAAI,IAAM,SAAUE,GAClB,OAAOA' -}; - -var smc = new SourceMapConsumer(rawSourceMap); - -console.log(smc.sources); -// [ 'http://example.com/www/js/one.js', -// 'http://example.com/www/js/two.js' ] - -console.log(smc.originalPositionFor({ - line: 2, - column: 28 -})); -// { source: 'http://example.com/www/js/two.js', -// line: 2, -// column: 10, -// name: 'n' } - -console.log(smc.generatedPositionFor({ - source: 'http://example.com/www/js/two.js', - line: 2, - column: 10 -})); -// { line: 2, column: 28 } - -smc.eachMapping(function (m) { - // ... -}); -``` - -### Generating a source map - -In depth guide: -[**Compiling to JavaScript, and Debugging with Source Maps**](https://hacks.mozilla.org/2013/05/compiling-to-javascript-and-debugging-with-source-maps/) - -#### With SourceNode (high level API) - -```js -function compile(ast) { - switch (ast.type) { - case 'BinaryExpression': - return new SourceNode( - ast.location.line, - ast.location.column, - ast.location.source, - [compile(ast.left), " + ", compile(ast.right)] - ); - case 'Literal': - return new SourceNode( - ast.location.line, - ast.location.column, - ast.location.source, - String(ast.value) - ); - // ... - default: - throw new Error("Bad AST"); - } -} - -var ast = parse("40 + 2", "add.js"); -console.log(compile(ast).toStringWithSourceMap({ - file: 'add.js' -})); -// { code: '40 + 2', -// map: [object SourceMapGenerator] } -``` - -#### With SourceMapGenerator (low level API) - -```js -var map = new SourceMapGenerator({ - file: "source-mapped.js" -}); - -map.addMapping({ - generated: { - line: 10, - column: 35 - }, - source: "foo.js", - original: { - line: 33, - column: 2 - }, - name: "christopher" -}); - -console.log(map.toString()); -// '{"version":3,"file":"source-mapped.js","sources":["foo.js"],"names":["christopher"],"mappings":";;;;;;;;;mCAgCEA"}' -``` - -## API - -Get a reference to the module: - -```js -// NodeJS -var sourceMap = require('source-map'); - -// Browser builds -var sourceMap = window.sourceMap; - -// Inside Firefox -let sourceMap = {}; -Components.utils.import('resource:///modules/devtools/SourceMap.jsm', sourceMap); -``` - -### SourceMapConsumer - -A SourceMapConsumer instance represents a parsed source map which we can query -for information about the original file positions by giving it a file position -in the generated source. - -#### new SourceMapConsumer(rawSourceMap) - -The only parameter is the raw source map (either as a string which can be -`JSON.parse`'d, or an object). According to the spec, source maps have the -following attributes: - -* `version`: Which version of the source map spec this map is following. - -* `sources`: An array of URLs to the original source files. - -* `names`: An array of identifiers which can be referrenced by individual - mappings. - -* `sourceRoot`: Optional. The URL root from which all sources are relative. - -* `sourcesContent`: Optional. An array of contents of the original source files. - -* `mappings`: A string of base64 VLQs which contain the actual mappings. - -* `file`: Optional. The generated filename this source map is associated with. - -#### SourceMapConsumer.prototype.computeColumnSpans() - -Compute the last column for each generated mapping. The last column is -inclusive. - -#### SourceMapConsumer.prototype.originalPositionFor(generatedPosition) - -Returns the original source, line, and column information for the generated -source's line and column positions provided. The only argument is an object with -the following properties: - -* `line`: The line number in the generated source. - -* `column`: The column number in the generated source. - -* `bias`: Either `SourceMapConsumer.GREATEST_LOWER_BOUND` or - `SourceMapConsumer.LEAST_UPPER_BOUND`. Specifies whether to return the closest - element that is smaller than or greater than the one we are searching for, - respectively, if the exact element cannot be found. Defaults to - `SourceMapConsumer.GREATEST_LOWER_BOUND`. - -and an object is returned with the following properties: - -* `source`: The original source file, or null if this information is not - available. - -* `line`: The line number in the original source, or null if this information is - not available. - -* `column`: The column number in the original source, or null or null if this - information is not available. - -* `name`: The original identifier, or null if this information is not available. - -#### SourceMapConsumer.prototype.generatedPositionFor(originalPosition) - -Returns the generated line and column information for the original source, -line, and column positions provided. The only argument is an object with -the following properties: - -* `source`: The filename of the original source. - -* `line`: The line number in the original source. - -* `column`: The column number in the original source. - -and an object is returned with the following properties: - -* `line`: The line number in the generated source, or null. - -* `column`: The column number in the generated source, or null. - -#### SourceMapConsumer.prototype.allGeneratedPositionsFor(originalPosition) - -Returns all generated line and column information for the original source, line, -and column provided. If no column is provided, returns all mappings -corresponding to a either the line we are searching for or the next closest line -that has any mappings. Otherwise, returns all mappings corresponding to the -given line and either the column we are searching for or the next closest column -that has any offsets. - -The only argument is an object with the following properties: - -* `source`: The filename of the original source. - -* `line`: The line number in the original source. - -* `column`: Optional. The column number in the original source. - -and an array of objects is returned, each with the following properties: - -* `line`: The line number in the generated source, or null. - -* `column`: The column number in the generated source, or null. - -#### SourceMapConsumer.prototype.hasContentsOfAllSources() - -Return true if we have the embedded source content for every source listed in -the source map, false otherwise. - -In other words, if this method returns `true`, then `smc.sourceContentFor(s)` -will succeed for every source `s` in `smc.sources`. - -#### SourceMapConsumer.prototype.sourceContentFor(source[, returnNullOnMissing]) - -Returns the original source content for the source provided. The only -argument is the URL of the original source file. - -If the source content for the given source is not found, then an error is -thrown. Optionally, pass `true` as the second param to have `null` returned -instead. - -#### SourceMapConsumer.prototype.eachMapping(callback, context, order) - -Iterate over each mapping between an original source/line/column and a -generated line/column in this source map. - -* `callback`: The function that is called with each mapping. Mappings have the - form `{ source, generatedLine, generatedColumn, originalLine, originalColumn, - name }` - -* `context`: Optional. If specified, this object will be the value of `this` - every time that `callback` is called. - -* `order`: Either `SourceMapConsumer.GENERATED_ORDER` or - `SourceMapConsumer.ORIGINAL_ORDER`. Specifies whether you want to iterate over - the mappings sorted by the generated file's line/column order or the - original's source/line/column order, respectively. Defaults to - `SourceMapConsumer.GENERATED_ORDER`. - -### SourceMapGenerator - -An instance of the SourceMapGenerator represents a source map which is being -built incrementally. - -#### new SourceMapGenerator([startOfSourceMap]) - -You may pass an object with the following properties: - -* `file`: The filename of the generated source that this source map is - associated with. - -* `sourceRoot`: A root for all relative URLs in this source map. - -* `skipValidation`: Optional. When `true`, disables validation of mappings as - they are added. This can improve performance but should be used with - discretion, as a last resort. Even then, one should avoid using this flag when - running tests, if possible. - -#### SourceMapGenerator.fromSourceMap(sourceMapConsumer) - -Creates a new SourceMapGenerator based on a SourceMapConsumer - -* `sourceMapConsumer` The SourceMap. - -#### SourceMapGenerator.prototype.addMapping(mapping) - -Add a single mapping from original source line and column to the generated -source's line and column for this source map being created. The mapping object -should have the following properties: - -* `generated`: An object with the generated line and column positions. - -* `original`: An object with the original line and column positions. - -* `source`: The original source file (relative to the sourceRoot). - -* `name`: An optional original token name for this mapping. - -#### SourceMapGenerator.prototype.setSourceContent(sourceFile, sourceContent) - -Set the source content for an original source file. - -* `sourceFile` the URL of the original source file. - -* `sourceContent` the content of the source file. - -#### SourceMapGenerator.prototype.applySourceMap(sourceMapConsumer[, sourceFile[, sourceMapPath]]) - -Applies a SourceMap for a source file to the SourceMap. -Each mapping to the supplied source file is rewritten using the -supplied SourceMap. Note: The resolution for the resulting mappings -is the minimium of this map and the supplied map. - -* `sourceMapConsumer`: The SourceMap to be applied. - -* `sourceFile`: Optional. The filename of the source file. - If omitted, sourceMapConsumer.file will be used, if it exists. - Otherwise an error will be thrown. - -* `sourceMapPath`: Optional. The dirname of the path to the SourceMap - to be applied. If relative, it is relative to the SourceMap. - - This parameter is needed when the two SourceMaps aren't in the same - directory, and the SourceMap to be applied contains relative source - paths. If so, those relative source paths need to be rewritten - relative to the SourceMap. - - If omitted, it is assumed that both SourceMaps are in the same directory, - thus not needing any rewriting. (Supplying `'.'` has the same effect.) - -#### SourceMapGenerator.prototype.toString() - -Renders the source map being generated to a string. - -### SourceNode - -SourceNodes provide a way to abstract over interpolating and/or concatenating -snippets of generated JavaScript source code, while maintaining the line and -column information associated between those snippets and the original source -code. This is useful as the final intermediate representation a compiler might -use before outputting the generated JS and source map. - -#### new SourceNode([line, column, source[, chunk[, name]]]) - -* `line`: The original line number associated with this source node, or null if - it isn't associated with an original line. - -* `column`: The original column number associated with this source node, or null - if it isn't associated with an original column. - -* `source`: The original source's filename; null if no filename is provided. - -* `chunk`: Optional. Is immediately passed to `SourceNode.prototype.add`, see - below. - -* `name`: Optional. The original identifier. - -#### SourceNode.fromStringWithSourceMap(code, sourceMapConsumer[, relativePath]) - -Creates a SourceNode from generated code and a SourceMapConsumer. - -* `code`: The generated code - -* `sourceMapConsumer` The SourceMap for the generated code - -* `relativePath` The optional path that relative sources in `sourceMapConsumer` - should be relative to. - -#### SourceNode.prototype.add(chunk) - -Add a chunk of generated JS to this source node. - -* `chunk`: A string snippet of generated JS code, another instance of - `SourceNode`, or an array where each member is one of those things. - -#### SourceNode.prototype.prepend(chunk) - -Prepend a chunk of generated JS to this source node. - -* `chunk`: A string snippet of generated JS code, another instance of - `SourceNode`, or an array where each member is one of those things. - -#### SourceNode.prototype.setSourceContent(sourceFile, sourceContent) - -Set the source content for a source file. This will be added to the -`SourceMap` in the `sourcesContent` field. - -* `sourceFile`: The filename of the source file - -* `sourceContent`: The content of the source file - -#### SourceNode.prototype.walk(fn) - -Walk over the tree of JS snippets in this node and its children. The walking -function is called once for each snippet of JS and is passed that snippet and -the its original associated source's line/column location. - -* `fn`: The traversal function. - -#### SourceNode.prototype.walkSourceContents(fn) - -Walk over the tree of SourceNodes. The walking function is called for each -source file content and is passed the filename and source content. - -* `fn`: The traversal function. - -#### SourceNode.prototype.join(sep) - -Like `Array.prototype.join` except for SourceNodes. Inserts the separator -between each of this source node's children. - -* `sep`: The separator. - -#### SourceNode.prototype.replaceRight(pattern, replacement) - -Call `String.prototype.replace` on the very right-most source snippet. Useful -for trimming whitespace from the end of a source node, etc. - -* `pattern`: The pattern to replace. - -* `replacement`: The thing to replace the pattern with. - -#### SourceNode.prototype.toString() - -Return the string representation of this source node. Walks over the tree and -concatenates all the various snippets together to one string. - -#### SourceNode.prototype.toStringWithSourceMap([startOfSourceMap]) - -Returns the string representation of this tree of source nodes, plus a -SourceMapGenerator which contains all the mappings between the generated and -original sources. - -The arguments are the same as those to `new SourceMapGenerator`. - -## Tests - -[![Build Status](https://travis-ci.org/mozilla/source-map.png?branch=master)](https://travis-ci.org/mozilla/source-map) - -Install NodeJS version 0.8.0 or greater, then run `node test/run-tests.js`. - -To add new tests, create a new file named `test/test-.js` -and export your test functions with names that start with "test", for example - -```js -exports["test doing the foo bar"] = function (assert, util) { - ... -}; -``` - -The new test will be located automatically when you run the suite. - -The `util` argument is the test utility module located at `test/source-map/util`. - -The `assert` argument is a cut down version of node's assert module. You have -access to the following assertion functions: - -* `doesNotThrow` - -* `equal` - -* `ok` - -* `strictEqual` - -* `throws` - -(The reason for the restricted set of test functions is because we need the -tests to run inside Firefox's test suite as well and so the assert module is -shimmed in that environment. See `build/assert-shim.js`.) - -[format]: https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit -[feature]: https://wiki.mozilla.org/DevTools/Features/SourceMap -[Dryice]: https://github.com/mozilla/dryice diff --git a/node_modules/browserify/node_modules/insert-module-globals/node_modules/combine-source-map/node_modules/source-map/build/assert-shim.js b/node_modules/browserify/node_modules/insert-module-globals/node_modules/combine-source-map/node_modules/source-map/build/assert-shim.js deleted file mode 100644 index daa1a623..00000000 --- a/node_modules/browserify/node_modules/insert-module-globals/node_modules/combine-source-map/node_modules/source-map/build/assert-shim.js +++ /dev/null @@ -1,56 +0,0 @@ -/* -*- Mode: js; js-indent-level: 2; -*- */ -/* - * Copyright 2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - */ -define('test/source-map/assert', ['exports'], function (exports) { - - let do_throw = function (msg) { - throw new Error(msg); - }; - - exports.init = function (throw_fn) { - do_throw = throw_fn; - }; - - exports.doesNotThrow = function (fn) { - try { - fn(); - } - catch (e) { - do_throw(e.message); - } - }; - - exports.equal = function (actual, expected, msg) { - msg = msg || String(actual) + ' != ' + String(expected); - if (actual != expected) { - do_throw(msg); - } - }; - - exports.ok = function (val, msg) { - msg = msg || String(val) + ' is falsey'; - if (!Boolean(val)) { - do_throw(msg); - } - }; - - exports.strictEqual = function (actual, expected, msg) { - msg = msg || String(actual) + ' !== ' + String(expected); - if (actual !== expected) { - do_throw(msg); - } - }; - - exports.throws = function (fn) { - try { - fn(); - do_throw('Expected an error to be thrown, but it wasn\'t.'); - } - catch (e) { - } - }; - -}); diff --git a/node_modules/browserify/node_modules/insert-module-globals/node_modules/combine-source-map/node_modules/source-map/build/mini-require.js b/node_modules/browserify/node_modules/insert-module-globals/node_modules/combine-source-map/node_modules/source-map/build/mini-require.js deleted file mode 100644 index 0daf4537..00000000 --- a/node_modules/browserify/node_modules/insert-module-globals/node_modules/combine-source-map/node_modules/source-map/build/mini-require.js +++ /dev/null @@ -1,152 +0,0 @@ -/* -*- Mode: js; js-indent-level: 2; -*- */ -/* - * Copyright 2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - */ - -/** - * Define a module along with a payload. - * @param {string} moduleName Name for the payload - * @param {ignored} deps Ignored. For compatibility with CommonJS AMD Spec - * @param {function} payload Function with (require, exports, module) params - */ -function define(moduleName, deps, payload) { - if (typeof moduleName != "string") { - throw new TypeError('Expected string, got: ' + moduleName); - } - - if (arguments.length == 2) { - payload = deps; - } - - if (moduleName in define.modules) { - throw new Error("Module already defined: " + moduleName); - } - define.modules[moduleName] = payload; -}; - -/** - * The global store of un-instantiated modules - */ -define.modules = {}; - - -/** - * We invoke require() in the context of a Domain so we can have multiple - * sets of modules running separate from each other. - * This contrasts with JSMs which are singletons, Domains allows us to - * optionally load a CommonJS module twice with separate data each time. - * Perhaps you want 2 command lines with a different set of commands in each, - * for example. - */ -function Domain() { - this.modules = {}; - this._currentModule = null; -} - -(function () { - - /** - * Lookup module names and resolve them by calling the definition function if - * needed. - * There are 2 ways to call this, either with an array of dependencies and a - * callback to call when the dependencies are found (which can happen - * asynchronously in an in-page context) or with a single string an no callback - * where the dependency is resolved synchronously and returned. - * The API is designed to be compatible with the CommonJS AMD spec and - * RequireJS. - * @param {string[]|string} deps A name, or names for the payload - * @param {function|undefined} callback Function to call when the dependencies - * are resolved - * @return {undefined|object} The module required or undefined for - * array/callback method - */ - Domain.prototype.require = function(deps, callback) { - if (Array.isArray(deps)) { - var params = deps.map(function(dep) { - return this.lookup(dep); - }, this); - if (callback) { - callback.apply(null, params); - } - return undefined; - } - else { - return this.lookup(deps); - } - }; - - function normalize(path) { - var bits = path.split('/'); - var i = 1; - while (i < bits.length) { - if (bits[i] === '..') { - bits.splice(i-1, 1); - } else if (bits[i] === '.') { - bits.splice(i, 1); - } else { - i++; - } - } - return bits.join('/'); - } - - function join(a, b) { - a = a.trim(); - b = b.trim(); - if (/^\//.test(b)) { - return b; - } else { - return a.replace(/\/*$/, '/') + b; - } - } - - function dirname(path) { - var bits = path.split('/'); - bits.pop(); - return bits.join('/'); - } - - /** - * Lookup module names and resolve them by calling the definition function if - * needed. - * @param {string} moduleName A name for the payload to lookup - * @return {object} The module specified by aModuleName or null if not found. - */ - Domain.prototype.lookup = function(moduleName) { - if (/^\./.test(moduleName)) { - moduleName = normalize(join(dirname(this._currentModule), moduleName)); - } - - if (moduleName in this.modules) { - var module = this.modules[moduleName]; - return module; - } - - if (!(moduleName in define.modules)) { - throw new Error("Module not defined: " + moduleName); - } - - var module = define.modules[moduleName]; - - if (typeof module == "function") { - var exports = {}; - var previousModule = this._currentModule; - this._currentModule = moduleName; - module(this.require.bind(this), exports, { id: moduleName, uri: "" }); - this._currentModule = previousModule; - module = exports; - } - - // cache the resulting module object for next time - this.modules[moduleName] = module; - - return module; - }; - -}()); - -define.Domain = Domain; -define.globalDomain = new Domain(); -var require = define.globalDomain.require.bind(define.globalDomain); diff --git a/node_modules/browserify/node_modules/insert-module-globals/node_modules/combine-source-map/node_modules/source-map/build/prefix-source-map.jsm b/node_modules/browserify/node_modules/insert-module-globals/node_modules/combine-source-map/node_modules/source-map/build/prefix-source-map.jsm deleted file mode 100644 index 209dbd7d..00000000 --- a/node_modules/browserify/node_modules/insert-module-globals/node_modules/combine-source-map/node_modules/source-map/build/prefix-source-map.jsm +++ /dev/null @@ -1,21 +0,0 @@ -/* -*- Mode: js; js-indent-level: 2; -*- */ -/* - * Copyright 2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - */ - -/* - * WARNING! - * - * Do not edit this file directly, it is built from the sources at - * https://github.com/mozilla/source-map/ - */ - -/////////////////////////////////////////////////////////////////////////////// - - -this.EXPORTED_SYMBOLS = [ "SourceMapConsumer", "SourceMapGenerator", "SourceNode" ]; - -Components.utils.import("resource://gre/modules/devtools/Console.jsm"); -Components.utils.import('resource://gre/modules/devtools/Require.jsm'); diff --git a/node_modules/browserify/node_modules/insert-module-globals/node_modules/combine-source-map/node_modules/source-map/build/prefix-utils.jsm b/node_modules/browserify/node_modules/insert-module-globals/node_modules/combine-source-map/node_modules/source-map/build/prefix-utils.jsm deleted file mode 100644 index 80341d45..00000000 --- a/node_modules/browserify/node_modules/insert-module-globals/node_modules/combine-source-map/node_modules/source-map/build/prefix-utils.jsm +++ /dev/null @@ -1,18 +0,0 @@ -/* -*- Mode: js; js-indent-level: 2; -*- */ -/* - * Copyright 2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - */ - -/* - * WARNING! - * - * Do not edit this file directly, it is built from the sources at - * https://github.com/mozilla/source-map/ - */ - -Components.utils.import('resource://gre/modules/devtools/Require.jsm'); -Components.utils.import('resource://gre/modules/devtools/SourceMap.jsm'); - -this.EXPORTED_SYMBOLS = [ "define", "runSourceMapTests" ]; diff --git a/node_modules/browserify/node_modules/insert-module-globals/node_modules/combine-source-map/node_modules/source-map/build/suffix-browser.js b/node_modules/browserify/node_modules/insert-module-globals/node_modules/combine-source-map/node_modules/source-map/build/suffix-browser.js deleted file mode 100644 index fb29ff5f..00000000 --- a/node_modules/browserify/node_modules/insert-module-globals/node_modules/combine-source-map/node_modules/source-map/build/suffix-browser.js +++ /dev/null @@ -1,8 +0,0 @@ -/* -*- Mode: js; js-indent-level: 2; -*- */ -/////////////////////////////////////////////////////////////////////////////// - -this.sourceMap = { - SourceMapConsumer: require('source-map/source-map-consumer').SourceMapConsumer, - SourceMapGenerator: require('source-map/source-map-generator').SourceMapGenerator, - SourceNode: require('source-map/source-node').SourceNode -}; diff --git a/node_modules/browserify/node_modules/insert-module-globals/node_modules/combine-source-map/node_modules/source-map/build/suffix-source-map.jsm b/node_modules/browserify/node_modules/insert-module-globals/node_modules/combine-source-map/node_modules/source-map/build/suffix-source-map.jsm deleted file mode 100644 index cf3c2d8d..00000000 --- a/node_modules/browserify/node_modules/insert-module-globals/node_modules/combine-source-map/node_modules/source-map/build/suffix-source-map.jsm +++ /dev/null @@ -1,6 +0,0 @@ -/* -*- Mode: js; js-indent-level: 2; -*- */ -/////////////////////////////////////////////////////////////////////////////// - -this.SourceMapConsumer = require('source-map/source-map-consumer').SourceMapConsumer; -this.SourceMapGenerator = require('source-map/source-map-generator').SourceMapGenerator; -this.SourceNode = require('source-map/source-node').SourceNode; diff --git a/node_modules/browserify/node_modules/insert-module-globals/node_modules/combine-source-map/node_modules/source-map/build/suffix-utils.jsm b/node_modules/browserify/node_modules/insert-module-globals/node_modules/combine-source-map/node_modules/source-map/build/suffix-utils.jsm deleted file mode 100644 index b31b84cb..00000000 --- a/node_modules/browserify/node_modules/insert-module-globals/node_modules/combine-source-map/node_modules/source-map/build/suffix-utils.jsm +++ /dev/null @@ -1,21 +0,0 @@ -/* -*- Mode: js; js-indent-level: 2; -*- */ -/* - * Copyright 2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - */ -function runSourceMapTests(modName, do_throw) { - let mod = require(modName); - let assert = require('test/source-map/assert'); - let util = require('test/source-map/util'); - - assert.init(do_throw); - - for (let k in mod) { - if (/^test/.test(k)) { - mod[k](assert, util); - } - } - -} -this.runSourceMapTests = runSourceMapTests; diff --git a/node_modules/browserify/node_modules/insert-module-globals/node_modules/combine-source-map/node_modules/source-map/build/test-prefix.js b/node_modules/browserify/node_modules/insert-module-globals/node_modules/combine-source-map/node_modules/source-map/build/test-prefix.js deleted file mode 100644 index 1b13f300..00000000 --- a/node_modules/browserify/node_modules/insert-module-globals/node_modules/combine-source-map/node_modules/source-map/build/test-prefix.js +++ /dev/null @@ -1,8 +0,0 @@ -/* - * WARNING! - * - * Do not edit this file directly, it is built from the sources at - * https://github.com/mozilla/source-map/ - */ - -Components.utils.import('resource://test/Utils.jsm'); diff --git a/node_modules/browserify/node_modules/insert-module-globals/node_modules/combine-source-map/node_modules/source-map/build/test-suffix.js b/node_modules/browserify/node_modules/insert-module-globals/node_modules/combine-source-map/node_modules/source-map/build/test-suffix.js deleted file mode 100644 index bec2de3f..00000000 --- a/node_modules/browserify/node_modules/insert-module-globals/node_modules/combine-source-map/node_modules/source-map/build/test-suffix.js +++ /dev/null @@ -1,3 +0,0 @@ -function run_test() { - runSourceMapTests('{THIS_MODULE}', do_throw); -} diff --git a/node_modules/browserify/node_modules/insert-module-globals/node_modules/combine-source-map/node_modules/source-map/lib/source-map.js b/node_modules/browserify/node_modules/insert-module-globals/node_modules/combine-source-map/node_modules/source-map/lib/source-map.js deleted file mode 100644 index 121ad241..00000000 --- a/node_modules/browserify/node_modules/insert-module-globals/node_modules/combine-source-map/node_modules/source-map/lib/source-map.js +++ /dev/null @@ -1,8 +0,0 @@ -/* - * Copyright 2009-2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE.txt or: - * http://opensource.org/licenses/BSD-3-Clause - */ -exports.SourceMapGenerator = require('./source-map/source-map-generator').SourceMapGenerator; -exports.SourceMapConsumer = require('./source-map/source-map-consumer').SourceMapConsumer; -exports.SourceNode = require('./source-map/source-node').SourceNode; diff --git a/node_modules/browserify/node_modules/insert-module-globals/node_modules/combine-source-map/node_modules/source-map/lib/source-map/array-set.js b/node_modules/browserify/node_modules/insert-module-globals/node_modules/combine-source-map/node_modules/source-map/lib/source-map/array-set.js deleted file mode 100644 index 19cb841c..00000000 --- a/node_modules/browserify/node_modules/insert-module-globals/node_modules/combine-source-map/node_modules/source-map/lib/source-map/array-set.js +++ /dev/null @@ -1,107 +0,0 @@ -/* -*- Mode: js; js-indent-level: 2; -*- */ -/* - * Copyright 2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - */ -if (typeof define !== 'function') { - var define = require('amdefine')(module, require); -} -define(function (require, exports, module) { - - var util = require('./util'); - - /** - * A data structure which is a combination of an array and a set. Adding a new - * member is O(1), testing for membership is O(1), and finding the index of an - * element is O(1). Removing elements from the set is not supported. Only - * strings are supported for membership. - */ - function ArraySet() { - this._array = []; - this._set = {}; - } - - /** - * Static method for creating ArraySet instances from an existing array. - */ - ArraySet.fromArray = function ArraySet_fromArray(aArray, aAllowDuplicates) { - var set = new ArraySet(); - for (var i = 0, len = aArray.length; i < len; i++) { - set.add(aArray[i], aAllowDuplicates); - } - return set; - }; - - /** - * Return how many unique items are in this ArraySet. If duplicates have been - * added, than those do not count towards the size. - * - * @returns Number - */ - ArraySet.prototype.size = function ArraySet_size() { - return Object.getOwnPropertyNames(this._set).length; - }; - - /** - * Add the given string to this set. - * - * @param String aStr - */ - ArraySet.prototype.add = function ArraySet_add(aStr, aAllowDuplicates) { - var isDuplicate = this.has(aStr); - var idx = this._array.length; - if (!isDuplicate || aAllowDuplicates) { - this._array.push(aStr); - } - if (!isDuplicate) { - this._set[util.toSetString(aStr)] = idx; - } - }; - - /** - * Is the given string a member of this set? - * - * @param String aStr - */ - ArraySet.prototype.has = function ArraySet_has(aStr) { - return Object.prototype.hasOwnProperty.call(this._set, - util.toSetString(aStr)); - }; - - /** - * What is the index of the given string in the array? - * - * @param String aStr - */ - ArraySet.prototype.indexOf = function ArraySet_indexOf(aStr) { - if (this.has(aStr)) { - return this._set[util.toSetString(aStr)]; - } - throw new Error('"' + aStr + '" is not in the set.'); - }; - - /** - * What is the element at the given index? - * - * @param Number aIdx - */ - ArraySet.prototype.at = function ArraySet_at(aIdx) { - if (aIdx >= 0 && aIdx < this._array.length) { - return this._array[aIdx]; - } - throw new Error('No element indexed by ' + aIdx); - }; - - /** - * Returns the array representation of this set (which has the proper indices - * indicated by indexOf). Note that this is a copy of the internal array used - * for storing the members so that no one can mess with internal state. - */ - ArraySet.prototype.toArray = function ArraySet_toArray() { - return this._array.slice(); - }; - - exports.ArraySet = ArraySet; - -}); diff --git a/node_modules/browserify/node_modules/insert-module-globals/node_modules/combine-source-map/node_modules/source-map/lib/source-map/base64-vlq.js b/node_modules/browserify/node_modules/insert-module-globals/node_modules/combine-source-map/node_modules/source-map/lib/source-map/base64-vlq.js deleted file mode 100644 index bbe9a58e..00000000 --- a/node_modules/browserify/node_modules/insert-module-globals/node_modules/combine-source-map/node_modules/source-map/lib/source-map/base64-vlq.js +++ /dev/null @@ -1,146 +0,0 @@ -/* -*- Mode: js; js-indent-level: 2; -*- */ -/* - * Copyright 2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - * - * Based on the Base 64 VLQ implementation in Closure Compiler: - * https://code.google.com/p/closure-compiler/source/browse/trunk/src/com/google/debugging/sourcemap/Base64VLQ.java - * - * Copyright 2011 The Closure Compiler Authors. All rights reserved. - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following - * disclaimer in the documentation and/or other materials provided - * with the distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ -if (typeof define !== 'function') { - var define = require('amdefine')(module, require); -} -define(function (require, exports, module) { - - var base64 = require('./base64'); - - // A single base 64 digit can contain 6 bits of data. For the base 64 variable - // length quantities we use in the source map spec, the first bit is the sign, - // the next four bits are the actual value, and the 6th bit is the - // continuation bit. The continuation bit tells us whether there are more - // digits in this value following this digit. - // - // Continuation - // | Sign - // | | - // V V - // 101011 - - var VLQ_BASE_SHIFT = 5; - - // binary: 100000 - var VLQ_BASE = 1 << VLQ_BASE_SHIFT; - - // binary: 011111 - var VLQ_BASE_MASK = VLQ_BASE - 1; - - // binary: 100000 - var VLQ_CONTINUATION_BIT = VLQ_BASE; - - /** - * Converts from a two-complement value to a value where the sign bit is - * placed in the least significant bit. For example, as decimals: - * 1 becomes 2 (10 binary), -1 becomes 3 (11 binary) - * 2 becomes 4 (100 binary), -2 becomes 5 (101 binary) - */ - function toVLQSigned(aValue) { - return aValue < 0 - ? ((-aValue) << 1) + 1 - : (aValue << 1) + 0; - } - - /** - * Converts to a two-complement value from a value where the sign bit is - * placed in the least significant bit. For example, as decimals: - * 2 (10 binary) becomes 1, 3 (11 binary) becomes -1 - * 4 (100 binary) becomes 2, 5 (101 binary) becomes -2 - */ - function fromVLQSigned(aValue) { - var isNegative = (aValue & 1) === 1; - var shifted = aValue >> 1; - return isNegative - ? -shifted - : shifted; - } - - /** - * Returns the base 64 VLQ encoded value. - */ - exports.encode = function base64VLQ_encode(aValue) { - var encoded = ""; - var digit; - - var vlq = toVLQSigned(aValue); - - do { - digit = vlq & VLQ_BASE_MASK; - vlq >>>= VLQ_BASE_SHIFT; - if (vlq > 0) { - // There are still more digits in this value, so we must make sure the - // continuation bit is marked. - digit |= VLQ_CONTINUATION_BIT; - } - encoded += base64.encode(digit); - } while (vlq > 0); - - return encoded; - }; - - /** - * Decodes the next base 64 VLQ value from the given string and returns the - * value and the rest of the string via the out parameter. - */ - exports.decode = function base64VLQ_decode(aStr, aIndex, aOutParam) { - var strLen = aStr.length; - var result = 0; - var shift = 0; - var continuation, digit; - - do { - if (aIndex >= strLen) { - throw new Error("Expected more digits in base 64 VLQ value."); - } - - digit = base64.decode(aStr.charCodeAt(aIndex++)); - if (digit === -1) { - throw new Error("Invalid base64 digit: " + aStr.charAt(aIndex - 1)); - } - - continuation = !!(digit & VLQ_CONTINUATION_BIT); - digit &= VLQ_BASE_MASK; - result = result + (digit << shift); - shift += VLQ_BASE_SHIFT; - } while (continuation); - - aOutParam.value = fromVLQSigned(result); - aOutParam.rest = aIndex; - }; - -}); diff --git a/node_modules/browserify/node_modules/insert-module-globals/node_modules/combine-source-map/node_modules/source-map/lib/source-map/base64.js b/node_modules/browserify/node_modules/insert-module-globals/node_modules/combine-source-map/node_modules/source-map/lib/source-map/base64.js deleted file mode 100644 index 35adbc1a..00000000 --- a/node_modules/browserify/node_modules/insert-module-globals/node_modules/combine-source-map/node_modules/source-map/lib/source-map/base64.js +++ /dev/null @@ -1,73 +0,0 @@ -/* -*- Mode: js; js-indent-level: 2; -*- */ -/* - * Copyright 2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - */ -if (typeof define !== 'function') { - var define = require('amdefine')(module, require); -} -define(function (require, exports, module) { - - var intToCharMap = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'.split(''); - - /** - * Encode an integer in the range of 0 to 63 to a single base 64 digit. - */ - exports.encode = function (number) { - if (0 <= number && number < intToCharMap.length) { - return intToCharMap[number]; - } - throw new TypeError("Must be between 0 and 63: " + aNumber); - }; - - /** - * Decode a single base 64 character code digit to an integer. Returns -1 on - * failure. - */ - exports.decode = function (charCode) { - var bigA = 65; // 'A' - var bigZ = 90; // 'Z' - - var littleA = 97; // 'a' - var littleZ = 122; // 'z' - - var zero = 48; // '0' - var nine = 57; // '9' - - var plus = 43; // '+' - var slash = 47; // '/' - - var littleOffset = 26; - var numberOffset = 52; - - // 0 - 25: ABCDEFGHIJKLMNOPQRSTUVWXYZ - if (bigA <= charCode && charCode <= bigZ) { - return (charCode - bigA); - } - - // 26 - 51: abcdefghijklmnopqrstuvwxyz - if (littleA <= charCode && charCode <= littleZ) { - return (charCode - littleA + littleOffset); - } - - // 52 - 61: 0123456789 - if (zero <= charCode && charCode <= nine) { - return (charCode - zero + numberOffset); - } - - // 62: + - if (charCode == plus) { - return 62; - } - - // 63: / - if (charCode == slash) { - return 63; - } - - // Invalid base64 digit. - return -1; - }; - -}); diff --git a/node_modules/browserify/node_modules/insert-module-globals/node_modules/combine-source-map/node_modules/source-map/lib/source-map/binary-search.js b/node_modules/browserify/node_modules/insert-module-globals/node_modules/combine-source-map/node_modules/source-map/lib/source-map/binary-search.js deleted file mode 100644 index 7936f7e7..00000000 --- a/node_modules/browserify/node_modules/insert-module-globals/node_modules/combine-source-map/node_modules/source-map/lib/source-map/binary-search.js +++ /dev/null @@ -1,117 +0,0 @@ -/* -*- Mode: js; js-indent-level: 2; -*- */ -/* - * Copyright 2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - */ -if (typeof define !== 'function') { - var define = require('amdefine')(module, require); -} -define(function (require, exports, module) { - - exports.GREATEST_LOWER_BOUND = 1; - exports.LEAST_UPPER_BOUND = 2; - - /** - * Recursive implementation of binary search. - * - * @param aLow Indices here and lower do not contain the needle. - * @param aHigh Indices here and higher do not contain the needle. - * @param aNeedle The element being searched for. - * @param aHaystack The non-empty array being searched. - * @param aCompare Function which takes two elements and returns -1, 0, or 1. - * @param aBias Either 'binarySearch.GREATEST_LOWER_BOUND' or - * 'binarySearch.LEAST_UPPER_BOUND'. Specifies whether to return the - * closest element that is smaller than or greater than the one we are - * searching for, respectively, if the exact element cannot be found. - */ - function recursiveSearch(aLow, aHigh, aNeedle, aHaystack, aCompare, aBias) { - // This function terminates when one of the following is true: - // - // 1. We find the exact element we are looking for. - // - // 2. We did not find the exact element, but we can return the index of - // the next-closest element. - // - // 3. We did not find the exact element, and there is no next-closest - // element than the one we are searching for, so we return -1. - var mid = Math.floor((aHigh - aLow) / 2) + aLow; - var cmp = aCompare(aNeedle, aHaystack[mid], true); - if (cmp === 0) { - // Found the element we are looking for. - return mid; - } - else if (cmp > 0) { - // Our needle is greater than aHaystack[mid]. - if (aHigh - mid > 1) { - // The element is in the upper half. - return recursiveSearch(mid, aHigh, aNeedle, aHaystack, aCompare, aBias); - } - - // The exact needle element was not found in this haystack. Determine if - // we are in termination case (3) or (2) and return the appropriate thing. - if (aBias == exports.LEAST_UPPER_BOUND) { - return aHigh < aHaystack.length ? aHigh : -1; - } else { - return mid; - } - } - else { - // Our needle is less than aHaystack[mid]. - if (mid - aLow > 1) { - // The element is in the lower half. - return recursiveSearch(aLow, mid, aNeedle, aHaystack, aCompare, aBias); - } - - // we are in termination case (3) or (2) and return the appropriate thing. - if (aBias == exports.LEAST_UPPER_BOUND) { - return mid; - } else { - return aLow < 0 ? -1 : aLow; - } - } - } - - /** - * This is an implementation of binary search which will always try and return - * the index of the closest element if there is no exact hit. This is because - * mappings between original and generated line/col pairs are single points, - * and there is an implicit region between each of them, so a miss just means - * that you aren't on the very start of a region. - * - * @param aNeedle The element you are looking for. - * @param aHaystack The array that is being searched. - * @param aCompare A function which takes the needle and an element in the - * array and returns -1, 0, or 1 depending on whether the needle is less - * than, equal to, or greater than the element, respectively. - * @param aBias Either 'binarySearch.GREATEST_LOWER_BOUND' or - * 'binarySearch.LEAST_UPPER_BOUND'. Specifies whether to return the - * closest element that is smaller than or greater than the one we are - * searching for, respectively, if the exact element cannot be found. - * Defaults to 'binarySearch.GREATEST_LOWER_BOUND'. - */ - exports.search = function search(aNeedle, aHaystack, aCompare, aBias) { - if (aHaystack.length === 0) { - return -1; - } - - var index = recursiveSearch(-1, aHaystack.length, aNeedle, aHaystack, - aCompare, aBias || exports.GREATEST_LOWER_BOUND); - if (index < 0) { - return -1; - } - - // We have found either the exact element, or the next-closest element than - // the one we are searching for. However, there may be more than one such - // element. Make sure we always return the smallest of these. - while (index - 1 >= 0) { - if (aCompare(aHaystack[index], aHaystack[index - 1], true) !== 0) { - break; - } - --index; - } - - return index; - }; - -}); diff --git a/node_modules/browserify/node_modules/insert-module-globals/node_modules/combine-source-map/node_modules/source-map/lib/source-map/mapping-list.js b/node_modules/browserify/node_modules/insert-module-globals/node_modules/combine-source-map/node_modules/source-map/lib/source-map/mapping-list.js deleted file mode 100644 index 01aff224..00000000 --- a/node_modules/browserify/node_modules/insert-module-globals/node_modules/combine-source-map/node_modules/source-map/lib/source-map/mapping-list.js +++ /dev/null @@ -1,86 +0,0 @@ -/* -*- Mode: js; js-indent-level: 2; -*- */ -/* - * Copyright 2014 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - */ -if (typeof define !== 'function') { - var define = require('amdefine')(module, require); -} -define(function (require, exports, module) { - - var util = require('./util'); - - /** - * Determine whether mappingB is after mappingA with respect to generated - * position. - */ - function generatedPositionAfter(mappingA, mappingB) { - // Optimized for most common case - var lineA = mappingA.generatedLine; - var lineB = mappingB.generatedLine; - var columnA = mappingA.generatedColumn; - var columnB = mappingB.generatedColumn; - return lineB > lineA || lineB == lineA && columnB >= columnA || - util.compareByGeneratedPositionsInflated(mappingA, mappingB) <= 0; - } - - /** - * A data structure to provide a sorted view of accumulated mappings in a - * performance conscious manner. It trades a neglibable overhead in general - * case for a large speedup in case of mappings being added in order. - */ - function MappingList() { - this._array = []; - this._sorted = true; - // Serves as infimum - this._last = {generatedLine: -1, generatedColumn: 0}; - } - - /** - * Iterate through internal items. This method takes the same arguments that - * `Array.prototype.forEach` takes. - * - * NOTE: The order of the mappings is NOT guaranteed. - */ - MappingList.prototype.unsortedForEach = - function MappingList_forEach(aCallback, aThisArg) { - this._array.forEach(aCallback, aThisArg); - }; - - /** - * Add the given source mapping. - * - * @param Object aMapping - */ - MappingList.prototype.add = function MappingList_add(aMapping) { - var mapping; - if (generatedPositionAfter(this._last, aMapping)) { - this._last = aMapping; - this._array.push(aMapping); - } else { - this._sorted = false; - this._array.push(aMapping); - } - }; - - /** - * Returns the flat, sorted array of mappings. The mappings are sorted by - * generated position. - * - * WARNING: This method returns internal data without copying, for - * performance. The return value must NOT be mutated, and should be treated as - * an immutable borrow. If you want to take ownership, you must make your own - * copy. - */ - MappingList.prototype.toArray = function MappingList_toArray() { - if (!this._sorted) { - this._array.sort(util.compareByGeneratedPositionsInflated); - this._sorted = true; - } - return this._array; - }; - - exports.MappingList = MappingList; - -}); diff --git a/node_modules/browserify/node_modules/insert-module-globals/node_modules/combine-source-map/node_modules/source-map/lib/source-map/quick-sort.js b/node_modules/browserify/node_modules/insert-module-globals/node_modules/combine-source-map/node_modules/source-map/lib/source-map/quick-sort.js deleted file mode 100644 index e0551eda..00000000 --- a/node_modules/browserify/node_modules/insert-module-globals/node_modules/combine-source-map/node_modules/source-map/lib/source-map/quick-sort.js +++ /dev/null @@ -1,120 +0,0 @@ -/* -*- Mode: js; js-indent-level: 2; -*- */ -/* - * Copyright 2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - */ -if (typeof define !== 'function') { - var define = require('amdefine')(module, require); -} -define(function (require, exports, module) { - - // It turns out that some (most?) JavaScript engines don't self-host - // `Array.prototype.sort`. This makes sense because C++ will likely remain - // faster than JS when doing raw CPU-intensive sorting. However, when using a - // custom comparator function, calling back and forth between the VM's C++ and - // JIT'd JS is rather slow *and* loses JIT type information, resulting in - // worse generated code for the comparator function than would be optimal. In - // fact, when sorting with a comparator, these costs outweigh the benefits of - // sorting in C++. By using our own JS-implemented Quick Sort (below), we get - // a ~3500ms mean speed-up in `bench/bench.html`. - - /** - * Swap the elements indexed by `x` and `y` in the array `ary`. - * - * @param {Array} ary - * The array. - * @param {Number} x - * The index of the first item. - * @param {Number} y - * The index of the second item. - */ - function swap(ary, x, y) { - var temp = ary[x]; - ary[x] = ary[y]; - ary[y] = temp; - } - - /** - * Returns a random integer within the range `low .. high` inclusive. - * - * @param {Number} low - * The lower bound on the range. - * @param {Number} high - * The upper bound on the range. - */ - function randomIntInRange(low, high) { - return Math.round(low + (Math.random() * (high - low))); - } - - /** - * The Quick Sort algorithm. - * - * @param {Array} ary - * An array to sort. - * @param {function} comparator - * Function to use to compare two items. - * @param {Number} p - * Start index of the array - * @param {Number} r - * End index of the array - */ - function doQuickSort(ary, comparator, p, r) { - // If our lower bound is less than our upper bound, we (1) partition the - // array into two pieces and (2) recurse on each half. If it is not, this is - // the empty array and our base case. - - if (p < r) { - // (1) Partitioning. - // - // The partitioning chooses a pivot between `p` and `r` and moves all - // elements that are less than or equal to the pivot to the before it, and - // all the elements that are greater than it after it. The effect is that - // once partition is done, the pivot is in the exact place it will be when - // the array is put in sorted order, and it will not need to be moved - // again. This runs in O(n) time. - - // Always choose a random pivot so that an input array which is reverse - // sorted does not cause O(n^2) running time. - var pivotIndex = randomIntInRange(p, r); - var i = p - 1; - - swap(ary, pivotIndex, r); - var pivot = ary[r]; - - // Immediately after `j` is incremented in this loop, the following hold - // true: - // - // * Every element in `ary[p .. i]` is less than or equal to the pivot. - // - // * Every element in `ary[i+1 .. j-1]` is greater than the pivot. - for (var j = p; j < r; j++) { - if (comparator(ary[j], pivot) <= 0) { - i += 1; - swap(ary, i, j); - } - } - - swap(ary, i + 1, j); - var q = i + 1; - - // (2) Recurse on each half. - - doQuickSort(ary, comparator, p, q - 1); - doQuickSort(ary, comparator, q + 1, r); - } - } - - /** - * Sort the given array in-place with the given comparator function. - * - * @param {Array} ary - * An array to sort. - * @param {function} comparator - * Function to use to compare two items. - */ - exports.quickSort = function (ary, comparator) { - doQuickSort(ary, comparator, 0, ary.length - 1); - }; - -}); diff --git a/node_modules/browserify/node_modules/insert-module-globals/node_modules/combine-source-map/node_modules/source-map/lib/source-map/source-map-consumer.js b/node_modules/browserify/node_modules/insert-module-globals/node_modules/combine-source-map/node_modules/source-map/lib/source-map/source-map-consumer.js deleted file mode 100644 index cbdc467c..00000000 --- a/node_modules/browserify/node_modules/insert-module-globals/node_modules/combine-source-map/node_modules/source-map/lib/source-map/source-map-consumer.js +++ /dev/null @@ -1,1077 +0,0 @@ -/* -*- Mode: js; js-indent-level: 2; -*- */ -/* - * Copyright 2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - */ -if (typeof define !== 'function') { - var define = require('amdefine')(module, require); -} -define(function (require, exports, module) { - - var util = require('./util'); - var binarySearch = require('./binary-search'); - var ArraySet = require('./array-set').ArraySet; - var base64VLQ = require('./base64-vlq'); - var quickSort = require('./quick-sort').quickSort; - - function SourceMapConsumer(aSourceMap) { - var sourceMap = aSourceMap; - if (typeof aSourceMap === 'string') { - sourceMap = JSON.parse(aSourceMap.replace(/^\)\]\}'/, '')); - } - - return sourceMap.sections != null - ? new IndexedSourceMapConsumer(sourceMap) - : new BasicSourceMapConsumer(sourceMap); - } - - SourceMapConsumer.fromSourceMap = function(aSourceMap) { - return BasicSourceMapConsumer.fromSourceMap(aSourceMap); - } - - /** - * The version of the source mapping spec that we are consuming. - */ - SourceMapConsumer.prototype._version = 3; - - // `__generatedMappings` and `__originalMappings` are arrays that hold the - // parsed mapping coordinates from the source map's "mappings" attribute. They - // are lazily instantiated, accessed via the `_generatedMappings` and - // `_originalMappings` getters respectively, and we only parse the mappings - // and create these arrays once queried for a source location. We jump through - // these hoops because there can be many thousands of mappings, and parsing - // them is expensive, so we only want to do it if we must. - // - // Each object in the arrays is of the form: - // - // { - // generatedLine: The line number in the generated code, - // generatedColumn: The column number in the generated code, - // source: The path to the original source file that generated this - // chunk of code, - // originalLine: The line number in the original source that - // corresponds to this chunk of generated code, - // originalColumn: The column number in the original source that - // corresponds to this chunk of generated code, - // name: The name of the original symbol which generated this chunk of - // code. - // } - // - // All properties except for `generatedLine` and `generatedColumn` can be - // `null`. - // - // `_generatedMappings` is ordered by the generated positions. - // - // `_originalMappings` is ordered by the original positions. - - SourceMapConsumer.prototype.__generatedMappings = null; - Object.defineProperty(SourceMapConsumer.prototype, '_generatedMappings', { - get: function () { - if (!this.__generatedMappings) { - this._parseMappings(this._mappings, this.sourceRoot); - } - - return this.__generatedMappings; - } - }); - - SourceMapConsumer.prototype.__originalMappings = null; - Object.defineProperty(SourceMapConsumer.prototype, '_originalMappings', { - get: function () { - if (!this.__originalMappings) { - this._parseMappings(this._mappings, this.sourceRoot); - } - - return this.__originalMappings; - } - }); - - SourceMapConsumer.prototype._charIsMappingSeparator = - function SourceMapConsumer_charIsMappingSeparator(aStr, index) { - var c = aStr.charAt(index); - return c === ";" || c === ","; - }; - - /** - * Parse the mappings in a string in to a data structure which we can easily - * query (the ordered arrays in the `this.__generatedMappings` and - * `this.__originalMappings` properties). - */ - SourceMapConsumer.prototype._parseMappings = - function SourceMapConsumer_parseMappings(aStr, aSourceRoot) { - throw new Error("Subclasses must implement _parseMappings"); - }; - - SourceMapConsumer.GENERATED_ORDER = 1; - SourceMapConsumer.ORIGINAL_ORDER = 2; - - SourceMapConsumer.GREATEST_LOWER_BOUND = 1; - SourceMapConsumer.LEAST_UPPER_BOUND = 2; - - /** - * Iterate over each mapping between an original source/line/column and a - * generated line/column in this source map. - * - * @param Function aCallback - * The function that is called with each mapping. - * @param Object aContext - * Optional. If specified, this object will be the value of `this` every - * time that `aCallback` is called. - * @param aOrder - * Either `SourceMapConsumer.GENERATED_ORDER` or - * `SourceMapConsumer.ORIGINAL_ORDER`. Specifies whether you want to - * iterate over the mappings sorted by the generated file's line/column - * order or the original's source/line/column order, respectively. Defaults to - * `SourceMapConsumer.GENERATED_ORDER`. - */ - SourceMapConsumer.prototype.eachMapping = - function SourceMapConsumer_eachMapping(aCallback, aContext, aOrder) { - var context = aContext || null; - var order = aOrder || SourceMapConsumer.GENERATED_ORDER; - - var mappings; - switch (order) { - case SourceMapConsumer.GENERATED_ORDER: - mappings = this._generatedMappings; - break; - case SourceMapConsumer.ORIGINAL_ORDER: - mappings = this._originalMappings; - break; - default: - throw new Error("Unknown order of iteration."); - } - - var sourceRoot = this.sourceRoot; - mappings.map(function (mapping) { - var source = mapping.source === null ? null : this._sources.at(mapping.source); - if (source != null && sourceRoot != null) { - source = util.join(sourceRoot, source); - } - return { - source: source, - generatedLine: mapping.generatedLine, - generatedColumn: mapping.generatedColumn, - originalLine: mapping.originalLine, - originalColumn: mapping.originalColumn, - name: mapping.name === null ? null : this._names.at(mapping.name) - }; - }, this).forEach(aCallback, context); - }; - - /** - * Returns all generated line and column information for the original source, - * line, and column provided. If no column is provided, returns all mappings - * corresponding to a either the line we are searching for or the next - * closest line that has any mappings. Otherwise, returns all mappings - * corresponding to the given line and either the column we are searching for - * or the next closest column that has any offsets. - * - * The only argument is an object with the following properties: - * - * - source: The filename of the original source. - * - line: The line number in the original source. - * - column: Optional. the column number in the original source. - * - * and an array of objects is returned, each with the following properties: - * - * - line: The line number in the generated source, or null. - * - column: The column number in the generated source, or null. - */ - SourceMapConsumer.prototype.allGeneratedPositionsFor = - function SourceMapConsumer_allGeneratedPositionsFor(aArgs) { - var line = util.getArg(aArgs, 'line'); - - // When there is no exact match, BasicSourceMapConsumer.prototype._findMapping - // returns the index of the closest mapping less than the needle. By - // setting needle.originalColumn to 0, we thus find the last mapping for - // the given line, provided such a mapping exists. - var needle = { - source: util.getArg(aArgs, 'source'), - originalLine: line, - originalColumn: util.getArg(aArgs, 'column', 0) - }; - - if (this.sourceRoot != null) { - needle.source = util.relative(this.sourceRoot, needle.source); - } - if (!this._sources.has(needle.source)) { - return []; - } - needle.source = this._sources.indexOf(needle.source); - - var mappings = []; - - var index = this._findMapping(needle, - this._originalMappings, - "originalLine", - "originalColumn", - util.compareByOriginalPositions, - binarySearch.LEAST_UPPER_BOUND); - if (index >= 0) { - var mapping = this._originalMappings[index]; - - if (aArgs.column === undefined) { - var originalLine = mapping.originalLine; - - // Iterate until either we run out of mappings, or we run into - // a mapping for a different line than the one we found. Since - // mappings are sorted, this is guaranteed to find all mappings for - // the line we found. - while (mapping && mapping.originalLine === originalLine) { - mappings.push({ - line: util.getArg(mapping, 'generatedLine', null), - column: util.getArg(mapping, 'generatedColumn', null), - lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null) - }); - - mapping = this._originalMappings[++index]; - } - } else { - var originalColumn = mapping.originalColumn; - - // Iterate until either we run out of mappings, or we run into - // a mapping for a different line than the one we were searching for. - // Since mappings are sorted, this is guaranteed to find all mappings for - // the line we are searching for. - while (mapping && - mapping.originalLine === line && - mapping.originalColumn == originalColumn) { - mappings.push({ - line: util.getArg(mapping, 'generatedLine', null), - column: util.getArg(mapping, 'generatedColumn', null), - lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null) - }); - - mapping = this._originalMappings[++index]; - } - } - } - - return mappings; - }; - - exports.SourceMapConsumer = SourceMapConsumer; - - /** - * A BasicSourceMapConsumer instance represents a parsed source map which we can - * query for information about the original file positions by giving it a file - * position in the generated source. - * - * The only parameter is the raw source map (either as a JSON string, or - * already parsed to an object). According to the spec, source maps have the - * following attributes: - * - * - version: Which version of the source map spec this map is following. - * - sources: An array of URLs to the original source files. - * - names: An array of identifiers which can be referrenced by individual mappings. - * - sourceRoot: Optional. The URL root from which all sources are relative. - * - sourcesContent: Optional. An array of contents of the original source files. - * - mappings: A string of base64 VLQs which contain the actual mappings. - * - file: Optional. The generated file this source map is associated with. - * - * Here is an example source map, taken from the source map spec[0]: - * - * { - * version : 3, - * file: "out.js", - * sourceRoot : "", - * sources: ["foo.js", "bar.js"], - * names: ["src", "maps", "are", "fun"], - * mappings: "AA,AB;;ABCDE;" - * } - * - * [0]: https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit?pli=1# - */ - function BasicSourceMapConsumer(aSourceMap) { - var sourceMap = aSourceMap; - if (typeof aSourceMap === 'string') { - sourceMap = JSON.parse(aSourceMap.replace(/^\)\]\}'/, '')); - } - - var version = util.getArg(sourceMap, 'version'); - var sources = util.getArg(sourceMap, 'sources'); - // Sass 3.3 leaves out the 'names' array, so we deviate from the spec (which - // requires the array) to play nice here. - var names = util.getArg(sourceMap, 'names', []); - var sourceRoot = util.getArg(sourceMap, 'sourceRoot', null); - var sourcesContent = util.getArg(sourceMap, 'sourcesContent', null); - var mappings = util.getArg(sourceMap, 'mappings'); - var file = util.getArg(sourceMap, 'file', null); - - // Once again, Sass deviates from the spec and supplies the version as a - // string rather than a number, so we use loose equality checking here. - if (version != this._version) { - throw new Error('Unsupported version: ' + version); - } - - // Some source maps produce relative source paths like "./foo.js" instead of - // "foo.js". Normalize these first so that future comparisons will succeed. - // See bugzil.la/1090768. - sources = sources.map(util.normalize); - - // Pass `true` below to allow duplicate names and sources. While source maps - // are intended to be compressed and deduplicated, the TypeScript compiler - // sometimes generates source maps with duplicates in them. See Github issue - // #72 and bugzil.la/889492. - this._names = ArraySet.fromArray(names, true); - this._sources = ArraySet.fromArray(sources, true); - - this.sourceRoot = sourceRoot; - this.sourcesContent = sourcesContent; - this._mappings = mappings; - this.file = file; - } - - BasicSourceMapConsumer.prototype = Object.create(SourceMapConsumer.prototype); - BasicSourceMapConsumer.prototype.consumer = SourceMapConsumer; - - /** - * Create a BasicSourceMapConsumer from a SourceMapGenerator. - * - * @param SourceMapGenerator aSourceMap - * The source map that will be consumed. - * @returns BasicSourceMapConsumer - */ - BasicSourceMapConsumer.fromSourceMap = - function SourceMapConsumer_fromSourceMap(aSourceMap) { - var smc = Object.create(BasicSourceMapConsumer.prototype); - - var names = smc._names = ArraySet.fromArray(aSourceMap._names.toArray(), true); - var sources = smc._sources = ArraySet.fromArray(aSourceMap._sources.toArray(), true); - smc.sourceRoot = aSourceMap._sourceRoot; - smc.sourcesContent = aSourceMap._generateSourcesContent(smc._sources.toArray(), - smc.sourceRoot); - smc.file = aSourceMap._file; - - // Because we are modifying the entries (by converting string sources and - // names to indices into the sources and names ArraySets), we have to make - // a copy of the entry or else bad things happen. Shared mutable state - // strikes again! See github issue #191. - - var generatedMappings = aSourceMap._mappings.toArray().slice(); - var destGeneratedMappings = smc.__generatedMappings = []; - var destOriginalMappings = smc.__originalMappings = []; - - for (var i = 0, length = generatedMappings.length; i < length; i++) { - var srcMapping = generatedMappings[i]; - var destMapping = new Mapping; - destMapping.generatedLine = srcMapping.generatedLine; - destMapping.generatedColumn = srcMapping.generatedColumn; - - if (srcMapping.source) { - destMapping.source = sources.indexOf(srcMapping.source); - destMapping.originalLine = srcMapping.originalLine; - destMapping.originalColumn = srcMapping.originalColumn; - - if (srcMapping.name) { - destMapping.name = names.indexOf(srcMapping.name); - } - - destOriginalMappings.push(destMapping); - } - - destGeneratedMappings.push(destMapping); - } - - quickSort(smc.__originalMappings, util.compareByOriginalPositions); - - return smc; - }; - - /** - * The version of the source mapping spec that we are consuming. - */ - BasicSourceMapConsumer.prototype._version = 3; - - /** - * The list of original sources. - */ - Object.defineProperty(BasicSourceMapConsumer.prototype, 'sources', { - get: function () { - return this._sources.toArray().map(function (s) { - return this.sourceRoot != null ? util.join(this.sourceRoot, s) : s; - }, this); - } - }); - - /** - * Provide the JIT with a nice shape / hidden class. - */ - function Mapping() { - this.generatedLine = 0; - this.generatedColumn = 0; - this.source = null; - this.originalLine = null; - this.originalColumn = null; - this.name = null; - } - - /** - * Parse the mappings in a string in to a data structure which we can easily - * query (the ordered arrays in the `this.__generatedMappings` and - * `this.__originalMappings` properties). - */ - BasicSourceMapConsumer.prototype._parseMappings = - function SourceMapConsumer_parseMappings(aStr, aSourceRoot) { - var generatedLine = 1; - var previousGeneratedColumn = 0; - var previousOriginalLine = 0; - var previousOriginalColumn = 0; - var previousSource = 0; - var previousName = 0; - var length = aStr.length; - var index = 0; - var cachedSegments = {}; - var temp = {}; - var originalMappings = []; - var generatedMappings = []; - var mapping, str, segment, end, value; - - while (index < length) { - if (aStr.charAt(index) === ';') { - generatedLine++; - index++; - previousGeneratedColumn = 0; - } - else if (aStr.charAt(index) === ',') { - index++; - } - else { - mapping = new Mapping(); - mapping.generatedLine = generatedLine; - - // Because each offset is encoded relative to the previous one, - // many segments often have the same encoding. We can exploit this - // fact by caching the parsed variable length fields of each segment, - // allowing us to avoid a second parse if we encounter the same - // segment again. - for (end = index; end < length; end++) { - if (this._charIsMappingSeparator(aStr, end)) { - break; - } - } - str = aStr.slice(index, end); - - segment = cachedSegments[str]; - if (segment) { - index += str.length; - } else { - segment = []; - while (index < end) { - base64VLQ.decode(aStr, index, temp); - value = temp.value; - index = temp.rest; - segment.push(value); - } - - if (segment.length === 2) { - throw new Error('Found a source, but no line and column'); - } - - if (segment.length === 3) { - throw new Error('Found a source and line, but no column'); - } - - cachedSegments[str] = segment; - } - - // Generated column. - mapping.generatedColumn = previousGeneratedColumn + segment[0]; - previousGeneratedColumn = mapping.generatedColumn; - - if (segment.length > 1) { - // Original source. - mapping.source = previousSource + segment[1]; - previousSource += segment[1]; - - // Original line. - mapping.originalLine = previousOriginalLine + segment[2]; - previousOriginalLine = mapping.originalLine; - // Lines are stored 0-based - mapping.originalLine += 1; - - // Original column. - mapping.originalColumn = previousOriginalColumn + segment[3]; - previousOriginalColumn = mapping.originalColumn; - - if (segment.length > 4) { - // Original name. - mapping.name = previousName + segment[4]; - previousName += segment[4]; - } - } - - generatedMappings.push(mapping); - if (typeof mapping.originalLine === 'number') { - originalMappings.push(mapping); - } - } - } - - quickSort(generatedMappings, util.compareByGeneratedPositionsDeflated); - this.__generatedMappings = generatedMappings; - - quickSort(originalMappings, util.compareByOriginalPositions); - this.__originalMappings = originalMappings; - }; - - /** - * Find the mapping that best matches the hypothetical "needle" mapping that - * we are searching for in the given "haystack" of mappings. - */ - BasicSourceMapConsumer.prototype._findMapping = - function SourceMapConsumer_findMapping(aNeedle, aMappings, aLineName, - aColumnName, aComparator, aBias) { - // To return the position we are searching for, we must first find the - // mapping for the given position and then return the opposite position it - // points to. Because the mappings are sorted, we can use binary search to - // find the best mapping. - - if (aNeedle[aLineName] <= 0) { - throw new TypeError('Line must be greater than or equal to 1, got ' - + aNeedle[aLineName]); - } - if (aNeedle[aColumnName] < 0) { - throw new TypeError('Column must be greater than or equal to 0, got ' - + aNeedle[aColumnName]); - } - - return binarySearch.search(aNeedle, aMappings, aComparator, aBias); - }; - - /** - * Compute the last column for each generated mapping. The last column is - * inclusive. - */ - BasicSourceMapConsumer.prototype.computeColumnSpans = - function SourceMapConsumer_computeColumnSpans() { - for (var index = 0; index < this._generatedMappings.length; ++index) { - var mapping = this._generatedMappings[index]; - - // Mappings do not contain a field for the last generated columnt. We - // can come up with an optimistic estimate, however, by assuming that - // mappings are contiguous (i.e. given two consecutive mappings, the - // first mapping ends where the second one starts). - if (index + 1 < this._generatedMappings.length) { - var nextMapping = this._generatedMappings[index + 1]; - - if (mapping.generatedLine === nextMapping.generatedLine) { - mapping.lastGeneratedColumn = nextMapping.generatedColumn - 1; - continue; - } - } - - // The last mapping for each line spans the entire line. - mapping.lastGeneratedColumn = Infinity; - } - }; - - /** - * Returns the original source, line, and column information for the generated - * source's line and column positions provided. The only argument is an object - * with the following properties: - * - * - line: The line number in the generated source. - * - column: The column number in the generated source. - * - bias: Either 'SourceMapConsumer.GREATEST_LOWER_BOUND' or - * 'SourceMapConsumer.LEAST_UPPER_BOUND'. Specifies whether to return the - * closest element that is smaller than or greater than the one we are - * searching for, respectively, if the exact element cannot be found. - * Defaults to 'SourceMapConsumer.GREATEST_LOWER_BOUND'. - * - * and an object is returned with the following properties: - * - * - source: The original source file, or null. - * - line: The line number in the original source, or null. - * - column: The column number in the original source, or null. - * - name: The original identifier, or null. - */ - BasicSourceMapConsumer.prototype.originalPositionFor = - function SourceMapConsumer_originalPositionFor(aArgs) { - var needle = { - generatedLine: util.getArg(aArgs, 'line'), - generatedColumn: util.getArg(aArgs, 'column') - }; - - var index = this._findMapping( - needle, - this._generatedMappings, - "generatedLine", - "generatedColumn", - util.compareByGeneratedPositionsDeflated, - util.getArg(aArgs, 'bias', SourceMapConsumer.GREATEST_LOWER_BOUND) - ); - - if (index >= 0) { - var mapping = this._generatedMappings[index]; - - if (mapping.generatedLine === needle.generatedLine) { - var source = util.getArg(mapping, 'source', null); - if (source !== null) { - source = this._sources.at(source); - if (this.sourceRoot != null) { - source = util.join(this.sourceRoot, source); - } - } - var name = util.getArg(mapping, 'name', null); - if (name !== null) { - name = this._names.at(name); - } - return { - source: source, - line: util.getArg(mapping, 'originalLine', null), - column: util.getArg(mapping, 'originalColumn', null), - name: name - }; - } - } - - return { - source: null, - line: null, - column: null, - name: null - }; - }; - - /** - * Return true if we have the source content for every source in the source - * map, false otherwise. - */ - BasicSourceMapConsumer.prototype.hasContentsOfAllSources = - function BasicSourceMapConsumer_hasContentsOfAllSources() { - if (!this.sourcesContent) { - return false; - } - return this.sourcesContent.length >= this._sources.size() && - !this.sourcesContent.some(function (sc) { return sc == null; }); - }; - - /** - * Returns the original source content. The only argument is the url of the - * original source file. Returns null if no original source content is - * availible. - */ - BasicSourceMapConsumer.prototype.sourceContentFor = - function SourceMapConsumer_sourceContentFor(aSource, nullOnMissing) { - if (!this.sourcesContent) { - return null; - } - - if (this.sourceRoot != null) { - aSource = util.relative(this.sourceRoot, aSource); - } - - if (this._sources.has(aSource)) { - return this.sourcesContent[this._sources.indexOf(aSource)]; - } - - var url; - if (this.sourceRoot != null - && (url = util.urlParse(this.sourceRoot))) { - // XXX: file:// URIs and absolute paths lead to unexpected behavior for - // many users. We can help them out when they expect file:// URIs to - // behave like it would if they were running a local HTTP server. See - // https://bugzilla.mozilla.org/show_bug.cgi?id=885597. - var fileUriAbsPath = aSource.replace(/^file:\/\//, ""); - if (url.scheme == "file" - && this._sources.has(fileUriAbsPath)) { - return this.sourcesContent[this._sources.indexOf(fileUriAbsPath)] - } - - if ((!url.path || url.path == "/") - && this._sources.has("/" + aSource)) { - return this.sourcesContent[this._sources.indexOf("/" + aSource)]; - } - } - - // This function is used recursively from - // IndexedSourceMapConsumer.prototype.sourceContentFor. In that case, we - // don't want to throw if we can't find the source - we just want to - // return null, so we provide a flag to exit gracefully. - if (nullOnMissing) { - return null; - } - else { - throw new Error('"' + aSource + '" is not in the SourceMap.'); - } - }; - - /** - * Returns the generated line and column information for the original source, - * line, and column positions provided. The only argument is an object with - * the following properties: - * - * - source: The filename of the original source. - * - line: The line number in the original source. - * - column: The column number in the original source. - * - bias: Either 'SourceMapConsumer.GREATEST_LOWER_BOUND' or - * 'SourceMapConsumer.LEAST_UPPER_BOUND'. Specifies whether to return the - * closest element that is smaller than or greater than the one we are - * searching for, respectively, if the exact element cannot be found. - * Defaults to 'SourceMapConsumer.GREATEST_LOWER_BOUND'. - * - * and an object is returned with the following properties: - * - * - line: The line number in the generated source, or null. - * - column: The column number in the generated source, or null. - */ - BasicSourceMapConsumer.prototype.generatedPositionFor = - function SourceMapConsumer_generatedPositionFor(aArgs) { - var source = util.getArg(aArgs, 'source'); - if (this.sourceRoot != null) { - source = util.relative(this.sourceRoot, source); - } - if (!this._sources.has(source)) { - return { - line: null, - column: null, - lastColumn: null - }; - } - source = this._sources.indexOf(source); - - var needle = { - source: source, - originalLine: util.getArg(aArgs, 'line'), - originalColumn: util.getArg(aArgs, 'column') - }; - - var index = this._findMapping( - needle, - this._originalMappings, - "originalLine", - "originalColumn", - util.compareByOriginalPositions, - util.getArg(aArgs, 'bias', SourceMapConsumer.GREATEST_LOWER_BOUND) - ); - - if (index >= 0) { - var mapping = this._originalMappings[index]; - - if (mapping.source === needle.source) { - return { - line: util.getArg(mapping, 'generatedLine', null), - column: util.getArg(mapping, 'generatedColumn', null), - lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null) - }; - } - } - - return { - line: null, - column: null, - lastColumn: null - }; - }; - - exports.BasicSourceMapConsumer = BasicSourceMapConsumer; - - /** - * An IndexedSourceMapConsumer instance represents a parsed source map which - * we can query for information. It differs from BasicSourceMapConsumer in - * that it takes "indexed" source maps (i.e. ones with a "sections" field) as - * input. - * - * The only parameter is a raw source map (either as a JSON string, or already - * parsed to an object). According to the spec for indexed source maps, they - * have the following attributes: - * - * - version: Which version of the source map spec this map is following. - * - file: Optional. The generated file this source map is associated with. - * - sections: A list of section definitions. - * - * Each value under the "sections" field has two fields: - * - offset: The offset into the original specified at which this section - * begins to apply, defined as an object with a "line" and "column" - * field. - * - map: A source map definition. This source map could also be indexed, - * but doesn't have to be. - * - * Instead of the "map" field, it's also possible to have a "url" field - * specifying a URL to retrieve a source map from, but that's currently - * unsupported. - * - * Here's an example source map, taken from the source map spec[0], but - * modified to omit a section which uses the "url" field. - * - * { - * version : 3, - * file: "app.js", - * sections: [{ - * offset: {line:100, column:10}, - * map: { - * version : 3, - * file: "section.js", - * sources: ["foo.js", "bar.js"], - * names: ["src", "maps", "are", "fun"], - * mappings: "AAAA,E;;ABCDE;" - * } - * }], - * } - * - * [0]: https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit#heading=h.535es3xeprgt - */ - function IndexedSourceMapConsumer(aSourceMap) { - var sourceMap = aSourceMap; - if (typeof aSourceMap === 'string') { - sourceMap = JSON.parse(aSourceMap.replace(/^\)\]\}'/, '')); - } - - var version = util.getArg(sourceMap, 'version'); - var sections = util.getArg(sourceMap, 'sections'); - - if (version != this._version) { - throw new Error('Unsupported version: ' + version); - } - - this._sources = new ArraySet(); - this._names = new ArraySet(); - - var lastOffset = { - line: -1, - column: 0 - }; - this._sections = sections.map(function (s) { - if (s.url) { - // The url field will require support for asynchronicity. - // See https://github.com/mozilla/source-map/issues/16 - throw new Error('Support for url field in sections not implemented.'); - } - var offset = util.getArg(s, 'offset'); - var offsetLine = util.getArg(offset, 'line'); - var offsetColumn = util.getArg(offset, 'column'); - - if (offsetLine < lastOffset.line || - (offsetLine === lastOffset.line && offsetColumn < lastOffset.column)) { - throw new Error('Section offsets must be ordered and non-overlapping.'); - } - lastOffset = offset; - - return { - generatedOffset: { - // The offset fields are 0-based, but we use 1-based indices when - // encoding/decoding from VLQ. - generatedLine: offsetLine + 1, - generatedColumn: offsetColumn + 1 - }, - consumer: new SourceMapConsumer(util.getArg(s, 'map')) - } - }); - } - - IndexedSourceMapConsumer.prototype = Object.create(SourceMapConsumer.prototype); - IndexedSourceMapConsumer.prototype.constructor = SourceMapConsumer; - - /** - * The version of the source mapping spec that we are consuming. - */ - IndexedSourceMapConsumer.prototype._version = 3; - - /** - * The list of original sources. - */ - Object.defineProperty(IndexedSourceMapConsumer.prototype, 'sources', { - get: function () { - var sources = []; - for (var i = 0; i < this._sections.length; i++) { - for (var j = 0; j < this._sections[i].consumer.sources.length; j++) { - sources.push(this._sections[i].consumer.sources[j]); - } - }; - return sources; - } - }); - - /** - * Returns the original source, line, and column information for the generated - * source's line and column positions provided. The only argument is an object - * with the following properties: - * - * - line: The line number in the generated source. - * - column: The column number in the generated source. - * - * and an object is returned with the following properties: - * - * - source: The original source file, or null. - * - line: The line number in the original source, or null. - * - column: The column number in the original source, or null. - * - name: The original identifier, or null. - */ - IndexedSourceMapConsumer.prototype.originalPositionFor = - function IndexedSourceMapConsumer_originalPositionFor(aArgs) { - var needle = { - generatedLine: util.getArg(aArgs, 'line'), - generatedColumn: util.getArg(aArgs, 'column') - }; - - // Find the section containing the generated position we're trying to map - // to an original position. - var sectionIndex = binarySearch.search(needle, this._sections, - function(needle, section) { - var cmp = needle.generatedLine - section.generatedOffset.generatedLine; - if (cmp) { - return cmp; - } - - return (needle.generatedColumn - - section.generatedOffset.generatedColumn); - }); - var section = this._sections[sectionIndex]; - - if (!section) { - return { - source: null, - line: null, - column: null, - name: null - }; - } - - return section.consumer.originalPositionFor({ - line: needle.generatedLine - - (section.generatedOffset.generatedLine - 1), - column: needle.generatedColumn - - (section.generatedOffset.generatedLine === needle.generatedLine - ? section.generatedOffset.generatedColumn - 1 - : 0), - bias: aArgs.bias - }); - }; - - /** - * Return true if we have the source content for every source in the source - * map, false otherwise. - */ - IndexedSourceMapConsumer.prototype.hasContentsOfAllSources = - function IndexedSourceMapConsumer_hasContentsOfAllSources() { - return this._sections.every(function (s) { - return s.consumer.hasContentsOfAllSources(); - }); - }; - - /** - * Returns the original source content. The only argument is the url of the - * original source file. Returns null if no original source content is - * available. - */ - IndexedSourceMapConsumer.prototype.sourceContentFor = - function IndexedSourceMapConsumer_sourceContentFor(aSource, nullOnMissing) { - for (var i = 0; i < this._sections.length; i++) { - var section = this._sections[i]; - - var content = section.consumer.sourceContentFor(aSource, true); - if (content) { - return content; - } - } - if (nullOnMissing) { - return null; - } - else { - throw new Error('"' + aSource + '" is not in the SourceMap.'); - } - }; - - /** - * Returns the generated line and column information for the original source, - * line, and column positions provided. The only argument is an object with - * the following properties: - * - * - source: The filename of the original source. - * - line: The line number in the original source. - * - column: The column number in the original source. - * - * and an object is returned with the following properties: - * - * - line: The line number in the generated source, or null. - * - column: The column number in the generated source, or null. - */ - IndexedSourceMapConsumer.prototype.generatedPositionFor = - function IndexedSourceMapConsumer_generatedPositionFor(aArgs) { - for (var i = 0; i < this._sections.length; i++) { - var section = this._sections[i]; - - // Only consider this section if the requested source is in the list of - // sources of the consumer. - if (section.consumer.sources.indexOf(util.getArg(aArgs, 'source')) === -1) { - continue; - } - var generatedPosition = section.consumer.generatedPositionFor(aArgs); - if (generatedPosition) { - var ret = { - line: generatedPosition.line + - (section.generatedOffset.generatedLine - 1), - column: generatedPosition.column + - (section.generatedOffset.generatedLine === generatedPosition.line - ? section.generatedOffset.generatedColumn - 1 - : 0) - }; - return ret; - } - } - - return { - line: null, - column: null - }; - }; - - /** - * Parse the mappings in a string in to a data structure which we can easily - * query (the ordered arrays in the `this.__generatedMappings` and - * `this.__originalMappings` properties). - */ - IndexedSourceMapConsumer.prototype._parseMappings = - function IndexedSourceMapConsumer_parseMappings(aStr, aSourceRoot) { - this.__generatedMappings = []; - this.__originalMappings = []; - for (var i = 0; i < this._sections.length; i++) { - var section = this._sections[i]; - var sectionMappings = section.consumer._generatedMappings; - for (var j = 0; j < sectionMappings.length; j++) { - var mapping = sectionMappings[i]; - - var source = section.consumer._sources.at(mapping.source); - if (section.consumer.sourceRoot !== null) { - source = util.join(section.consumer.sourceRoot, source); - } - this._sources.add(source); - source = this._sources.indexOf(source); - - var name = section.consumer._names.at(mapping.name); - this._names.add(name); - name = this._names.indexOf(name); - - // The mappings coming from the consumer for the section have - // generated positions relative to the start of the section, so we - // need to offset them to be relative to the start of the concatenated - // generated file. - var adjustedMapping = { - source: source, - generatedLine: mapping.generatedLine + - (section.generatedOffset.generatedLine - 1), - generatedColumn: mapping.column + - (section.generatedOffset.generatedLine === mapping.generatedLine) - ? section.generatedOffset.generatedColumn - 1 - : 0, - originalLine: mapping.originalLine, - originalColumn: mapping.originalColumn, - name: name - }; - - this.__generatedMappings.push(adjustedMapping); - if (typeof adjustedMapping.originalLine === 'number') { - this.__originalMappings.push(adjustedMapping); - } - }; - }; - - quickSort(this.__generatedMappings, util.compareByGeneratedPositionsDeflated); - quickSort(this.__originalMappings, util.compareByOriginalPositions); - }; - - exports.IndexedSourceMapConsumer = IndexedSourceMapConsumer; - -}); diff --git a/node_modules/browserify/node_modules/insert-module-globals/node_modules/combine-source-map/node_modules/source-map/lib/source-map/source-map-generator.js b/node_modules/browserify/node_modules/insert-module-globals/node_modules/combine-source-map/node_modules/source-map/lib/source-map/source-map-generator.js deleted file mode 100644 index d8a9025b..00000000 --- a/node_modules/browserify/node_modules/insert-module-globals/node_modules/combine-source-map/node_modules/source-map/lib/source-map/source-map-generator.js +++ /dev/null @@ -1,399 +0,0 @@ -/* -*- Mode: js; js-indent-level: 2; -*- */ -/* - * Copyright 2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - */ -if (typeof define !== 'function') { - var define = require('amdefine')(module, require); -} -define(function (require, exports, module) { - - var base64VLQ = require('./base64-vlq'); - var util = require('./util'); - var ArraySet = require('./array-set').ArraySet; - var MappingList = require('./mapping-list').MappingList; - - /** - * An instance of the SourceMapGenerator represents a source map which is - * being built incrementally. You may pass an object with the following - * properties: - * - * - file: The filename of the generated source. - * - sourceRoot: A root for all relative URLs in this source map. - */ - function SourceMapGenerator(aArgs) { - if (!aArgs) { - aArgs = {}; - } - this._file = util.getArg(aArgs, 'file', null); - this._sourceRoot = util.getArg(aArgs, 'sourceRoot', null); - this._skipValidation = util.getArg(aArgs, 'skipValidation', false); - this._sources = new ArraySet(); - this._names = new ArraySet(); - this._mappings = new MappingList(); - this._sourcesContents = null; - } - - SourceMapGenerator.prototype._version = 3; - - /** - * Creates a new SourceMapGenerator based on a SourceMapConsumer - * - * @param aSourceMapConsumer The SourceMap. - */ - SourceMapGenerator.fromSourceMap = - function SourceMapGenerator_fromSourceMap(aSourceMapConsumer) { - var sourceRoot = aSourceMapConsumer.sourceRoot; - var generator = new SourceMapGenerator({ - file: aSourceMapConsumer.file, - sourceRoot: sourceRoot - }); - aSourceMapConsumer.eachMapping(function (mapping) { - var newMapping = { - generated: { - line: mapping.generatedLine, - column: mapping.generatedColumn - } - }; - - if (mapping.source != null) { - newMapping.source = mapping.source; - if (sourceRoot != null) { - newMapping.source = util.relative(sourceRoot, newMapping.source); - } - - newMapping.original = { - line: mapping.originalLine, - column: mapping.originalColumn - }; - - if (mapping.name != null) { - newMapping.name = mapping.name; - } - } - - generator.addMapping(newMapping); - }); - aSourceMapConsumer.sources.forEach(function (sourceFile) { - var content = aSourceMapConsumer.sourceContentFor(sourceFile); - if (content != null) { - generator.setSourceContent(sourceFile, content); - } - }); - return generator; - }; - - /** - * Add a single mapping from original source line and column to the generated - * source's line and column for this source map being created. The mapping - * object should have the following properties: - * - * - generated: An object with the generated line and column positions. - * - original: An object with the original line and column positions. - * - source: The original source file (relative to the sourceRoot). - * - name: An optional original token name for this mapping. - */ - SourceMapGenerator.prototype.addMapping = - function SourceMapGenerator_addMapping(aArgs) { - var generated = util.getArg(aArgs, 'generated'); - var original = util.getArg(aArgs, 'original', null); - var source = util.getArg(aArgs, 'source', null); - var name = util.getArg(aArgs, 'name', null); - - if (!this._skipValidation) { - this._validateMapping(generated, original, source, name); - } - - if (source != null && !this._sources.has(source)) { - this._sources.add(source); - } - - if (name != null && !this._names.has(name)) { - this._names.add(name); - } - - this._mappings.add({ - generatedLine: generated.line, - generatedColumn: generated.column, - originalLine: original != null && original.line, - originalColumn: original != null && original.column, - source: source, - name: name - }); - }; - - /** - * Set the source content for a source file. - */ - SourceMapGenerator.prototype.setSourceContent = - function SourceMapGenerator_setSourceContent(aSourceFile, aSourceContent) { - var source = aSourceFile; - if (this._sourceRoot != null) { - source = util.relative(this._sourceRoot, source); - } - - if (aSourceContent != null) { - // Add the source content to the _sourcesContents map. - // Create a new _sourcesContents map if the property is null. - if (!this._sourcesContents) { - this._sourcesContents = {}; - } - this._sourcesContents[util.toSetString(source)] = aSourceContent; - } else if (this._sourcesContents) { - // Remove the source file from the _sourcesContents map. - // If the _sourcesContents map is empty, set the property to null. - delete this._sourcesContents[util.toSetString(source)]; - if (Object.keys(this._sourcesContents).length === 0) { - this._sourcesContents = null; - } - } - }; - - /** - * Applies the mappings of a sub-source-map for a specific source file to the - * source map being generated. Each mapping to the supplied source file is - * rewritten using the supplied source map. Note: The resolution for the - * resulting mappings is the minimium of this map and the supplied map. - * - * @param aSourceMapConsumer The source map to be applied. - * @param aSourceFile Optional. The filename of the source file. - * If omitted, SourceMapConsumer's file property will be used. - * @param aSourceMapPath Optional. The dirname of the path to the source map - * to be applied. If relative, it is relative to the SourceMapConsumer. - * This parameter is needed when the two source maps aren't in the same - * directory, and the source map to be applied contains relative source - * paths. If so, those relative source paths need to be rewritten - * relative to the SourceMapGenerator. - */ - SourceMapGenerator.prototype.applySourceMap = - function SourceMapGenerator_applySourceMap(aSourceMapConsumer, aSourceFile, aSourceMapPath) { - var sourceFile = aSourceFile; - // If aSourceFile is omitted, we will use the file property of the SourceMap - if (aSourceFile == null) { - if (aSourceMapConsumer.file == null) { - throw new Error( - 'SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, ' + - 'or the source map\'s "file" property. Both were omitted.' - ); - } - sourceFile = aSourceMapConsumer.file; - } - var sourceRoot = this._sourceRoot; - // Make "sourceFile" relative if an absolute Url is passed. - if (sourceRoot != null) { - sourceFile = util.relative(sourceRoot, sourceFile); - } - // Applying the SourceMap can add and remove items from the sources and - // the names array. - var newSources = new ArraySet(); - var newNames = new ArraySet(); - - // Find mappings for the "sourceFile" - this._mappings.unsortedForEach(function (mapping) { - if (mapping.source === sourceFile && mapping.originalLine != null) { - // Check if it can be mapped by the source map, then update the mapping. - var original = aSourceMapConsumer.originalPositionFor({ - line: mapping.originalLine, - column: mapping.originalColumn - }); - if (original.source != null) { - // Copy mapping - mapping.source = original.source; - if (aSourceMapPath != null) { - mapping.source = util.join(aSourceMapPath, mapping.source) - } - if (sourceRoot != null) { - mapping.source = util.relative(sourceRoot, mapping.source); - } - mapping.originalLine = original.line; - mapping.originalColumn = original.column; - if (original.name != null) { - mapping.name = original.name; - } - } - } - - var source = mapping.source; - if (source != null && !newSources.has(source)) { - newSources.add(source); - } - - var name = mapping.name; - if (name != null && !newNames.has(name)) { - newNames.add(name); - } - - }, this); - this._sources = newSources; - this._names = newNames; - - // Copy sourcesContents of applied map. - aSourceMapConsumer.sources.forEach(function (sourceFile) { - var content = aSourceMapConsumer.sourceContentFor(sourceFile); - if (content != null) { - if (aSourceMapPath != null) { - sourceFile = util.join(aSourceMapPath, sourceFile); - } - if (sourceRoot != null) { - sourceFile = util.relative(sourceRoot, sourceFile); - } - this.setSourceContent(sourceFile, content); - } - }, this); - }; - - /** - * A mapping can have one of the three levels of data: - * - * 1. Just the generated position. - * 2. The Generated position, original position, and original source. - * 3. Generated and original position, original source, as well as a name - * token. - * - * To maintain consistency, we validate that any new mapping being added falls - * in to one of these categories. - */ - SourceMapGenerator.prototype._validateMapping = - function SourceMapGenerator_validateMapping(aGenerated, aOriginal, aSource, - aName) { - if (aGenerated && 'line' in aGenerated && 'column' in aGenerated - && aGenerated.line > 0 && aGenerated.column >= 0 - && !aOriginal && !aSource && !aName) { - // Case 1. - return; - } - else if (aGenerated && 'line' in aGenerated && 'column' in aGenerated - && aOriginal && 'line' in aOriginal && 'column' in aOriginal - && aGenerated.line > 0 && aGenerated.column >= 0 - && aOriginal.line > 0 && aOriginal.column >= 0 - && aSource) { - // Cases 2 and 3. - return; - } - else { - throw new Error('Invalid mapping: ' + JSON.stringify({ - generated: aGenerated, - source: aSource, - original: aOriginal, - name: aName - })); - } - }; - - /** - * Serialize the accumulated mappings in to the stream of base 64 VLQs - * specified by the source map format. - */ - SourceMapGenerator.prototype._serializeMappings = - function SourceMapGenerator_serializeMappings() { - var previousGeneratedColumn = 0; - var previousGeneratedLine = 1; - var previousOriginalColumn = 0; - var previousOriginalLine = 0; - var previousName = 0; - var previousSource = 0; - var result = ''; - var mapping; - - var mappings = this._mappings.toArray(); - for (var i = 0, len = mappings.length; i < len; i++) { - mapping = mappings[i]; - - if (mapping.generatedLine !== previousGeneratedLine) { - previousGeneratedColumn = 0; - while (mapping.generatedLine !== previousGeneratedLine) { - result += ';'; - previousGeneratedLine++; - } - } - else { - if (i > 0) { - if (!util.compareByGeneratedPositionsInflated(mapping, mappings[i - 1])) { - continue; - } - result += ','; - } - } - - result += base64VLQ.encode(mapping.generatedColumn - - previousGeneratedColumn); - previousGeneratedColumn = mapping.generatedColumn; - - if (mapping.source != null) { - result += base64VLQ.encode(this._sources.indexOf(mapping.source) - - previousSource); - previousSource = this._sources.indexOf(mapping.source); - - // lines are stored 0-based in SourceMap spec version 3 - result += base64VLQ.encode(mapping.originalLine - 1 - - previousOriginalLine); - previousOriginalLine = mapping.originalLine - 1; - - result += base64VLQ.encode(mapping.originalColumn - - previousOriginalColumn); - previousOriginalColumn = mapping.originalColumn; - - if (mapping.name != null) { - result += base64VLQ.encode(this._names.indexOf(mapping.name) - - previousName); - previousName = this._names.indexOf(mapping.name); - } - } - } - - return result; - }; - - SourceMapGenerator.prototype._generateSourcesContent = - function SourceMapGenerator_generateSourcesContent(aSources, aSourceRoot) { - return aSources.map(function (source) { - if (!this._sourcesContents) { - return null; - } - if (aSourceRoot != null) { - source = util.relative(aSourceRoot, source); - } - var key = util.toSetString(source); - return Object.prototype.hasOwnProperty.call(this._sourcesContents, - key) - ? this._sourcesContents[key] - : null; - }, this); - }; - - /** - * Externalize the source map. - */ - SourceMapGenerator.prototype.toJSON = - function SourceMapGenerator_toJSON() { - var map = { - version: this._version, - sources: this._sources.toArray(), - names: this._names.toArray(), - mappings: this._serializeMappings() - }; - if (this._file != null) { - map.file = this._file; - } - if (this._sourceRoot != null) { - map.sourceRoot = this._sourceRoot; - } - if (this._sourcesContents) { - map.sourcesContent = this._generateSourcesContent(map.sources, map.sourceRoot); - } - - return map; - }; - - /** - * Render the source map being generated to a string. - */ - SourceMapGenerator.prototype.toString = - function SourceMapGenerator_toString() { - return JSON.stringify(this.toJSON()); - }; - - exports.SourceMapGenerator = SourceMapGenerator; - -}); diff --git a/node_modules/browserify/node_modules/insert-module-globals/node_modules/combine-source-map/node_modules/source-map/lib/source-map/source-node.js b/node_modules/browserify/node_modules/insert-module-globals/node_modules/combine-source-map/node_modules/source-map/lib/source-map/source-node.js deleted file mode 100644 index 9ee90bd5..00000000 --- a/node_modules/browserify/node_modules/insert-module-globals/node_modules/combine-source-map/node_modules/source-map/lib/source-map/source-node.js +++ /dev/null @@ -1,414 +0,0 @@ -/* -*- Mode: js; js-indent-level: 2; -*- */ -/* - * Copyright 2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - */ -if (typeof define !== 'function') { - var define = require('amdefine')(module, require); -} -define(function (require, exports, module) { - - var SourceMapGenerator = require('./source-map-generator').SourceMapGenerator; - var util = require('./util'); - - // Matches a Windows-style `\r\n` newline or a `\n` newline used by all other - // operating systems these days (capturing the result). - var REGEX_NEWLINE = /(\r?\n)/; - - // Newline character code for charCodeAt() comparisons - var NEWLINE_CODE = 10; - - // Private symbol for identifying `SourceNode`s when multiple versions of - // the source-map library are loaded. This MUST NOT CHANGE across - // versions! - var isSourceNode = "$$$isSourceNode$$$"; - - /** - * SourceNodes provide a way to abstract over interpolating/concatenating - * snippets of generated JavaScript source code while maintaining the line and - * column information associated with the original source code. - * - * @param aLine The original line number. - * @param aColumn The original column number. - * @param aSource The original source's filename. - * @param aChunks Optional. An array of strings which are snippets of - * generated JS, or other SourceNodes. - * @param aName The original identifier. - */ - function SourceNode(aLine, aColumn, aSource, aChunks, aName) { - this.children = []; - this.sourceContents = {}; - this.line = aLine == null ? null : aLine; - this.column = aColumn == null ? null : aColumn; - this.source = aSource == null ? null : aSource; - this.name = aName == null ? null : aName; - this[isSourceNode] = true; - if (aChunks != null) this.add(aChunks); - } - - /** - * Creates a SourceNode from generated code and a SourceMapConsumer. - * - * @param aGeneratedCode The generated code - * @param aSourceMapConsumer The SourceMap for the generated code - * @param aRelativePath Optional. The path that relative sources in the - * SourceMapConsumer should be relative to. - */ - SourceNode.fromStringWithSourceMap = - function SourceNode_fromStringWithSourceMap(aGeneratedCode, aSourceMapConsumer, aRelativePath) { - // The SourceNode we want to fill with the generated code - // and the SourceMap - var node = new SourceNode(); - - // All even indices of this array are one line of the generated code, - // while all odd indices are the newlines between two adjacent lines - // (since `REGEX_NEWLINE` captures its match). - // Processed fragments are removed from this array, by calling `shiftNextLine`. - var remainingLines = aGeneratedCode.split(REGEX_NEWLINE); - var shiftNextLine = function() { - var lineContents = remainingLines.shift(); - // The last line of a file might not have a newline. - var newLine = remainingLines.shift() || ""; - return lineContents + newLine; - }; - - // We need to remember the position of "remainingLines" - var lastGeneratedLine = 1, lastGeneratedColumn = 0; - - // The generate SourceNodes we need a code range. - // To extract it current and last mapping is used. - // Here we store the last mapping. - var lastMapping = null; - - aSourceMapConsumer.eachMapping(function (mapping) { - if (lastMapping !== null) { - // We add the code from "lastMapping" to "mapping": - // First check if there is a new line in between. - if (lastGeneratedLine < mapping.generatedLine) { - var code = ""; - // Associate first line with "lastMapping" - addMappingWithCode(lastMapping, shiftNextLine()); - lastGeneratedLine++; - lastGeneratedColumn = 0; - // The remaining code is added without mapping - } else { - // There is no new line in between. - // Associate the code between "lastGeneratedColumn" and - // "mapping.generatedColumn" with "lastMapping" - var nextLine = remainingLines[0]; - var code = nextLine.substr(0, mapping.generatedColumn - - lastGeneratedColumn); - remainingLines[0] = nextLine.substr(mapping.generatedColumn - - lastGeneratedColumn); - lastGeneratedColumn = mapping.generatedColumn; - addMappingWithCode(lastMapping, code); - // No more remaining code, continue - lastMapping = mapping; - return; - } - } - // We add the generated code until the first mapping - // to the SourceNode without any mapping. - // Each line is added as separate string. - while (lastGeneratedLine < mapping.generatedLine) { - node.add(shiftNextLine()); - lastGeneratedLine++; - } - if (lastGeneratedColumn < mapping.generatedColumn) { - var nextLine = remainingLines[0]; - node.add(nextLine.substr(0, mapping.generatedColumn)); - remainingLines[0] = nextLine.substr(mapping.generatedColumn); - lastGeneratedColumn = mapping.generatedColumn; - } - lastMapping = mapping; - }, this); - // We have processed all mappings. - if (remainingLines.length > 0) { - if (lastMapping) { - // Associate the remaining code in the current line with "lastMapping" - addMappingWithCode(lastMapping, shiftNextLine()); - } - // and add the remaining lines without any mapping - node.add(remainingLines.join("")); - } - - // Copy sourcesContent into SourceNode - aSourceMapConsumer.sources.forEach(function (sourceFile) { - var content = aSourceMapConsumer.sourceContentFor(sourceFile); - if (content != null) { - if (aRelativePath != null) { - sourceFile = util.join(aRelativePath, sourceFile); - } - node.setSourceContent(sourceFile, content); - } - }); - - return node; - - function addMappingWithCode(mapping, code) { - if (mapping === null || mapping.source === undefined) { - node.add(code); - } else { - var source = aRelativePath - ? util.join(aRelativePath, mapping.source) - : mapping.source; - node.add(new SourceNode(mapping.originalLine, - mapping.originalColumn, - source, - code, - mapping.name)); - } - } - }; - - /** - * Add a chunk of generated JS to this source node. - * - * @param aChunk A string snippet of generated JS code, another instance of - * SourceNode, or an array where each member is one of those things. - */ - SourceNode.prototype.add = function SourceNode_add(aChunk) { - if (Array.isArray(aChunk)) { - aChunk.forEach(function (chunk) { - this.add(chunk); - }, this); - } - else if (aChunk[isSourceNode] || typeof aChunk === "string") { - if (aChunk) { - this.children.push(aChunk); - } - } - else { - throw new TypeError( - "Expected a SourceNode, string, or an array of SourceNodes and strings. Got " + aChunk - ); - } - return this; - }; - - /** - * Add a chunk of generated JS to the beginning of this source node. - * - * @param aChunk A string snippet of generated JS code, another instance of - * SourceNode, or an array where each member is one of those things. - */ - SourceNode.prototype.prepend = function SourceNode_prepend(aChunk) { - if (Array.isArray(aChunk)) { - for (var i = aChunk.length-1; i >= 0; i--) { - this.prepend(aChunk[i]); - } - } - else if (aChunk[isSourceNode] || typeof aChunk === "string") { - this.children.unshift(aChunk); - } - else { - throw new TypeError( - "Expected a SourceNode, string, or an array of SourceNodes and strings. Got " + aChunk - ); - } - return this; - }; - - /** - * Walk over the tree of JS snippets in this node and its children. The - * walking function is called once for each snippet of JS and is passed that - * snippet and the its original associated source's line/column location. - * - * @param aFn The traversal function. - */ - SourceNode.prototype.walk = function SourceNode_walk(aFn) { - var chunk; - for (var i = 0, len = this.children.length; i < len; i++) { - chunk = this.children[i]; - if (chunk[isSourceNode]) { - chunk.walk(aFn); - } - else { - if (chunk !== '') { - aFn(chunk, { source: this.source, - line: this.line, - column: this.column, - name: this.name }); - } - } - } - }; - - /** - * Like `String.prototype.join` except for SourceNodes. Inserts `aStr` between - * each of `this.children`. - * - * @param aSep The separator. - */ - SourceNode.prototype.join = function SourceNode_join(aSep) { - var newChildren; - var i; - var len = this.children.length; - if (len > 0) { - newChildren = []; - for (i = 0; i < len-1; i++) { - newChildren.push(this.children[i]); - newChildren.push(aSep); - } - newChildren.push(this.children[i]); - this.children = newChildren; - } - return this; - }; - - /** - * Call String.prototype.replace on the very right-most source snippet. Useful - * for trimming whitespace from the end of a source node, etc. - * - * @param aPattern The pattern to replace. - * @param aReplacement The thing to replace the pattern with. - */ - SourceNode.prototype.replaceRight = function SourceNode_replaceRight(aPattern, aReplacement) { - var lastChild = this.children[this.children.length - 1]; - if (lastChild[isSourceNode]) { - lastChild.replaceRight(aPattern, aReplacement); - } - else if (typeof lastChild === 'string') { - this.children[this.children.length - 1] = lastChild.replace(aPattern, aReplacement); - } - else { - this.children.push(''.replace(aPattern, aReplacement)); - } - return this; - }; - - /** - * Set the source content for a source file. This will be added to the SourceMapGenerator - * in the sourcesContent field. - * - * @param aSourceFile The filename of the source file - * @param aSourceContent The content of the source file - */ - SourceNode.prototype.setSourceContent = - function SourceNode_setSourceContent(aSourceFile, aSourceContent) { - this.sourceContents[util.toSetString(aSourceFile)] = aSourceContent; - }; - - /** - * Walk over the tree of SourceNodes. The walking function is called for each - * source file content and is passed the filename and source content. - * - * @param aFn The traversal function. - */ - SourceNode.prototype.walkSourceContents = - function SourceNode_walkSourceContents(aFn) { - for (var i = 0, len = this.children.length; i < len; i++) { - if (this.children[i][isSourceNode]) { - this.children[i].walkSourceContents(aFn); - } - } - - var sources = Object.keys(this.sourceContents); - for (var i = 0, len = sources.length; i < len; i++) { - aFn(util.fromSetString(sources[i]), this.sourceContents[sources[i]]); - } - }; - - /** - * Return the string representation of this source node. Walks over the tree - * and concatenates all the various snippets together to one string. - */ - SourceNode.prototype.toString = function SourceNode_toString() { - var str = ""; - this.walk(function (chunk) { - str += chunk; - }); - return str; - }; - - /** - * Returns the string representation of this source node along with a source - * map. - */ - SourceNode.prototype.toStringWithSourceMap = function SourceNode_toStringWithSourceMap(aArgs) { - var generated = { - code: "", - line: 1, - column: 0 - }; - var map = new SourceMapGenerator(aArgs); - var sourceMappingActive = false; - var lastOriginalSource = null; - var lastOriginalLine = null; - var lastOriginalColumn = null; - var lastOriginalName = null; - this.walk(function (chunk, original) { - generated.code += chunk; - if (original.source !== null - && original.line !== null - && original.column !== null) { - if(lastOriginalSource !== original.source - || lastOriginalLine !== original.line - || lastOriginalColumn !== original.column - || lastOriginalName !== original.name) { - map.addMapping({ - source: original.source, - original: { - line: original.line, - column: original.column - }, - generated: { - line: generated.line, - column: generated.column - }, - name: original.name - }); - } - lastOriginalSource = original.source; - lastOriginalLine = original.line; - lastOriginalColumn = original.column; - lastOriginalName = original.name; - sourceMappingActive = true; - } else if (sourceMappingActive) { - map.addMapping({ - generated: { - line: generated.line, - column: generated.column - } - }); - lastOriginalSource = null; - sourceMappingActive = false; - } - for (var idx = 0, length = chunk.length; idx < length; idx++) { - if (chunk.charCodeAt(idx) === NEWLINE_CODE) { - generated.line++; - generated.column = 0; - // Mappings end at eol - if (idx + 1 === length) { - lastOriginalSource = null; - sourceMappingActive = false; - } else if (sourceMappingActive) { - map.addMapping({ - source: original.source, - original: { - line: original.line, - column: original.column - }, - generated: { - line: generated.line, - column: generated.column - }, - name: original.name - }); - } - } else { - generated.column++; - } - } - }); - this.walkSourceContents(function (sourceFile, sourceContent) { - map.setSourceContent(sourceFile, sourceContent); - }); - - return { code: generated.code, map: map }; - }; - - exports.SourceNode = SourceNode; - -}); diff --git a/node_modules/browserify/node_modules/insert-module-globals/node_modules/combine-source-map/node_modules/source-map/lib/source-map/util.js b/node_modules/browserify/node_modules/insert-module-globals/node_modules/combine-source-map/node_modules/source-map/lib/source-map/util.js deleted file mode 100644 index 0b9d75dd..00000000 --- a/node_modules/browserify/node_modules/insert-module-globals/node_modules/combine-source-map/node_modules/source-map/lib/source-map/util.js +++ /dev/null @@ -1,370 +0,0 @@ -/* -*- Mode: js; js-indent-level: 2; -*- */ -/* - * Copyright 2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - */ -if (typeof define !== 'function') { - var define = require('amdefine')(module, require); -} -define(function (require, exports, module) { - - /** - * This is a helper function for getting values from parameter/options - * objects. - * - * @param args The object we are extracting values from - * @param name The name of the property we are getting. - * @param defaultValue An optional value to return if the property is missing - * from the object. If this is not specified and the property is missing, an - * error will be thrown. - */ - function getArg(aArgs, aName, aDefaultValue) { - if (aName in aArgs) { - return aArgs[aName]; - } else if (arguments.length === 3) { - return aDefaultValue; - } else { - throw new Error('"' + aName + '" is a required argument.'); - } - } - exports.getArg = getArg; - - var urlRegexp = /^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.]*)(?::(\d+))?(\S*)$/; - var dataUrlRegexp = /^data:.+\,.+$/; - - function urlParse(aUrl) { - var match = aUrl.match(urlRegexp); - if (!match) { - return null; - } - return { - scheme: match[1], - auth: match[2], - host: match[3], - port: match[4], - path: match[5] - }; - } - exports.urlParse = urlParse; - - function urlGenerate(aParsedUrl) { - var url = ''; - if (aParsedUrl.scheme) { - url += aParsedUrl.scheme + ':'; - } - url += '//'; - if (aParsedUrl.auth) { - url += aParsedUrl.auth + '@'; - } - if (aParsedUrl.host) { - url += aParsedUrl.host; - } - if (aParsedUrl.port) { - url += ":" + aParsedUrl.port - } - if (aParsedUrl.path) { - url += aParsedUrl.path; - } - return url; - } - exports.urlGenerate = urlGenerate; - - /** - * Normalizes a path, or the path portion of a URL: - * - * - Replaces consequtive slashes with one slash. - * - Removes unnecessary '.' parts. - * - Removes unnecessary '
    /..' parts. - * - * Based on code in the Node.js 'path' core module. - * - * @param aPath The path or url to normalize. - */ - function normalize(aPath) { - var path = aPath; - var url = urlParse(aPath); - if (url) { - if (!url.path) { - return aPath; - } - path = url.path; - } - var isAbsolute = (path.charAt(0) === '/'); - - var parts = path.split(/\/+/); - for (var part, up = 0, i = parts.length - 1; i >= 0; i--) { - part = parts[i]; - if (part === '.') { - parts.splice(i, 1); - } else if (part === '..') { - up++; - } else if (up > 0) { - if (part === '') { - // The first part is blank if the path is absolute. Trying to go - // above the root is a no-op. Therefore we can remove all '..' parts - // directly after the root. - parts.splice(i + 1, up); - up = 0; - } else { - parts.splice(i, 2); - up--; - } - } - } - path = parts.join('/'); - - if (path === '') { - path = isAbsolute ? '/' : '.'; - } - - if (url) { - url.path = path; - return urlGenerate(url); - } - return path; - } - exports.normalize = normalize; - - /** - * Joins two paths/URLs. - * - * @param aRoot The root path or URL. - * @param aPath The path or URL to be joined with the root. - * - * - If aPath is a URL or a data URI, aPath is returned, unless aPath is a - * scheme-relative URL: Then the scheme of aRoot, if any, is prepended - * first. - * - Otherwise aPath is a path. If aRoot is a URL, then its path portion - * is updated with the result and aRoot is returned. Otherwise the result - * is returned. - * - If aPath is absolute, the result is aPath. - * - Otherwise the two paths are joined with a slash. - * - Joining for example 'http://' and 'www.example.com' is also supported. - */ - function join(aRoot, aPath) { - if (aRoot === "") { - aRoot = "."; - } - if (aPath === "") { - aPath = "."; - } - var aPathUrl = urlParse(aPath); - var aRootUrl = urlParse(aRoot); - if (aRootUrl) { - aRoot = aRootUrl.path || '/'; - } - - // `join(foo, '//www.example.org')` - if (aPathUrl && !aPathUrl.scheme) { - if (aRootUrl) { - aPathUrl.scheme = aRootUrl.scheme; - } - return urlGenerate(aPathUrl); - } - - if (aPathUrl || aPath.match(dataUrlRegexp)) { - return aPath; - } - - // `join('http://', 'www.example.com')` - if (aRootUrl && !aRootUrl.host && !aRootUrl.path) { - aRootUrl.host = aPath; - return urlGenerate(aRootUrl); - } - - var joined = aPath.charAt(0) === '/' - ? aPath - : normalize(aRoot.replace(/\/+$/, '') + '/' + aPath); - - if (aRootUrl) { - aRootUrl.path = joined; - return urlGenerate(aRootUrl); - } - return joined; - } - exports.join = join; - - /** - * Make a path relative to a URL or another path. - * - * @param aRoot The root path or URL. - * @param aPath The path or URL to be made relative to aRoot. - */ - function relative(aRoot, aPath) { - if (aRoot === "") { - aRoot = "."; - } - - aRoot = aRoot.replace(/\/$/, ''); - - // It is possible for the path to be above the root. In this case, simply - // checking whether the root is a prefix of the path won't work. Instead, we - // need to remove components from the root one by one, until either we find - // a prefix that fits, or we run out of components to remove. - var level = 0; - while (aPath.indexOf(aRoot + '/') !== 0) { - var index = aRoot.lastIndexOf("/"); - if (index < 0) { - return aPath; - } - - // If the only part of the root that is left is the scheme (i.e. http://, - // file:///, etc.), one or more slashes (/), or simply nothing at all, we - // have exhausted all components, so the path is not relative to the root. - aRoot = aRoot.slice(0, index); - if (aRoot.match(/^([^\/]+:\/)?\/*$/)) { - return aPath; - } - - ++level; - } - - // Make sure we add a "../" for each component we removed from the root. - return Array(level + 1).join("../") + aPath.substr(aRoot.length + 1); - } - exports.relative = relative; - - /** - * Because behavior goes wacky when you set `__proto__` on objects, we - * have to prefix all the strings in our set with an arbitrary character. - * - * See https://github.com/mozilla/source-map/pull/31 and - * https://github.com/mozilla/source-map/issues/30 - * - * @param String aStr - */ - function toSetString(aStr) { - return '$' + aStr; - } - exports.toSetString = toSetString; - - function fromSetString(aStr) { - return aStr.substr(1); - } - exports.fromSetString = fromSetString; - - /** - * Comparator between two mappings where the original positions are compared. - * - * Optionally pass in `true` as `onlyCompareGenerated` to consider two - * mappings with the same original source/line/column, but different generated - * line and column the same. Useful when searching for a mapping with a - * stubbed out mapping. - */ - function compareByOriginalPositions(mappingA, mappingB, onlyCompareOriginal) { - var cmp = mappingA.source - mappingB.source; - if (cmp !== 0) { - return cmp; - } - - cmp = mappingA.originalLine - mappingB.originalLine; - if (cmp !== 0) { - return cmp; - } - - cmp = mappingA.originalColumn - mappingB.originalColumn; - if (cmp !== 0 || onlyCompareOriginal) { - return cmp; - } - - cmp = mappingA.generatedColumn - mappingB.generatedColumn; - if (cmp !== 0) { - return cmp; - } - - cmp = mappingA.generatedLine - mappingB.generatedLine; - if (cmp !== 0) { - return cmp; - } - - return mappingA.name - mappingB.name; - }; - exports.compareByOriginalPositions = compareByOriginalPositions; - - /** - * Comparator between two mappings with deflated source and name indices where - * the generated positions are compared. - * - * Optionally pass in `true` as `onlyCompareGenerated` to consider two - * mappings with the same generated line and column, but different - * source/name/original line and column the same. Useful when searching for a - * mapping with a stubbed out mapping. - */ - function compareByGeneratedPositionsDeflated(mappingA, mappingB, onlyCompareGenerated) { - var cmp = mappingA.generatedLine - mappingB.generatedLine; - if (cmp !== 0) { - return cmp; - } - - cmp = mappingA.generatedColumn - mappingB.generatedColumn; - if (cmp !== 0 || onlyCompareGenerated) { - return cmp; - } - - cmp = mappingA.source - mappingB.source; - if (cmp !== 0) { - return cmp; - } - - cmp = mappingA.originalLine - mappingB.originalLine; - if (cmp !== 0) { - return cmp; - } - - cmp = mappingA.originalColumn - mappingB.originalColumn; - if (cmp !== 0) { - return cmp; - } - - return mappingA.name - mappingB.name; - }; - exports.compareByGeneratedPositionsDeflated = compareByGeneratedPositionsDeflated; - - function strcmp(aStr1, aStr2) { - if (aStr1 === aStr2) { - return 0; - } - - if (aStr1 > aStr2) { - return 1; - } - - return -1; - } - - /** - * Comparator between two mappings with inflated source and name strings where - * the generated positions are compared. - */ - function compareByGeneratedPositionsInflated(mappingA, mappingB) { - var cmp = mappingA.generatedLine - mappingB.generatedLine; - if (cmp !== 0) { - return cmp; - } - - cmp = mappingA.generatedColumn - mappingB.generatedColumn; - if (cmp !== 0) { - return cmp; - } - - cmp = strcmp(mappingA.source, mappingB.source); - if (cmp !== 0) { - return cmp; - } - - cmp = mappingA.originalLine - mappingB.originalLine; - if (cmp !== 0) { - return cmp; - } - - cmp = mappingA.originalColumn - mappingB.originalColumn; - if (cmp !== 0) { - return cmp; - } - - return strcmp(mappingA.name, mappingB.name); - }; - exports.compareByGeneratedPositionsInflated = compareByGeneratedPositionsInflated; - -}); diff --git a/node_modules/browserify/node_modules/insert-module-globals/node_modules/combine-source-map/node_modules/source-map/node_modules/amdefine/LICENSE b/node_modules/browserify/node_modules/insert-module-globals/node_modules/combine-source-map/node_modules/source-map/node_modules/amdefine/LICENSE deleted file mode 100644 index 9b25ee00..00000000 --- a/node_modules/browserify/node_modules/insert-module-globals/node_modules/combine-source-map/node_modules/source-map/node_modules/amdefine/LICENSE +++ /dev/null @@ -1,58 +0,0 @@ -amdefine is released under two licenses: new BSD, and MIT. You may pick the -license that best suits your development needs. The text of both licenses are -provided below. - - -The "New" BSD License: ----------------------- - -Copyright (c) 2011-2016, The Dojo Foundation -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - * Neither the name of the Dojo Foundation nor the names of its contributors - may be used to endorse or promote products derived from this software - without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, -OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - - -MIT License ------------ - -Copyright (c) 2011-2016, The Dojo Foundation - -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/node_modules/browserify/node_modules/insert-module-globals/node_modules/combine-source-map/node_modules/source-map/node_modules/amdefine/README.md b/node_modules/browserify/node_modules/insert-module-globals/node_modules/combine-source-map/node_modules/source-map/node_modules/amdefine/README.md deleted file mode 100644 index 037a6e81..00000000 --- a/node_modules/browserify/node_modules/insert-module-globals/node_modules/combine-source-map/node_modules/source-map/node_modules/amdefine/README.md +++ /dev/null @@ -1,171 +0,0 @@ -# amdefine - -A module that can be used to implement AMD's define() in Node. This allows you -to code to the AMD API and have the module work in node programs without -requiring those other programs to use AMD. - -## Usage - -**1)** Update your package.json to indicate amdefine as a dependency: - -```javascript - "dependencies": { - "amdefine": ">=0.1.0" - } -``` - -Then run `npm install` to get amdefine into your project. - -**2)** At the top of each module that uses define(), place this code: - -```javascript -if (typeof define !== 'function') { var define = require('amdefine')(module) } -``` - -**Only use these snippets** when loading amdefine. If you preserve the basic structure, -with the braces, it will be stripped out when using the [RequireJS optimizer](#optimizer). - -You can add spaces, line breaks and even require amdefine with a local path, but -keep the rest of the structure to get the stripping behavior. - -As you may know, because `if` statements in JavaScript don't have their own scope, the var -declaration in the above snippet is made whether the `if` expression is truthy or not. If -RequireJS is loaded then the declaration is superfluous because `define` is already already -declared in the same scope in RequireJS. Fortunately JavaScript handles multiple `var` -declarations of the same variable in the same scope gracefully. - -If you want to deliver amdefine.js with your code rather than specifying it as a dependency -with npm, then just download the latest release and refer to it using a relative path: - -[Latest Version](https://github.com/jrburke/amdefine/raw/latest/amdefine.js) - -### amdefine/intercept - -Consider this very experimental. - -Instead of pasting the piece of text for the amdefine setup of a `define` -variable in each module you create or consume, you can use `amdefine/intercept` -instead. It will automatically insert the above snippet in each .js file loaded -by Node. - -**Warning**: you should only use this if you are creating an application that -is consuming AMD style defined()'d modules that are distributed via npm and want -to run that code in Node. - -For library code where you are not sure if it will be used by others in Node or -in the browser, then explicitly depending on amdefine and placing the code -snippet above is suggested path, instead of using `amdefine/intercept`. The -intercept module affects all .js files loaded in the Node app, and it is -inconsiderate to modify global state like that unless you are also controlling -the top level app. - -#### Why distribute AMD-style modules via npm? - -npm has a lot of weaknesses for front-end use (installed layout is not great, -should have better support for the `baseUrl + moduleID + '.js' style of loading, -single file JS installs), but some people want a JS package manager and are -willing to live with those constraints. If that is you, but still want to author -in AMD style modules to get dynamic require([]), better direct source usage and -powerful loader plugin support in the browser, then this tool can help. - -#### amdefine/intercept usage - -Just require it in your top level app module (for example index.js, server.js): - -```javascript -require('amdefine/intercept'); -``` - -The module does not return a value, so no need to assign the result to a local -variable. - -Then just require() code as you normally would with Node's require(). Any .js -loaded after the intercept require will have the amdefine check injected in -the .js source as it is loaded. It does not modify the source on disk, just -prepends some content to the text of the module as it is loaded by Node. - -#### How amdefine/intercept works - -It overrides the `Module._extensions['.js']` in Node to automatically prepend -the amdefine snippet above. So, it will affect any .js file loaded by your -app. - -## define() usage - -It is best if you use the anonymous forms of define() in your module: - -```javascript -define(function (require) { - var dependency = require('dependency'); -}); -``` - -or - -```javascript -define(['dependency'], function (dependency) { - -}); -``` - -## RequireJS optimizer integration. - -Version 1.0.3 of the [RequireJS optimizer](http://requirejs.org/docs/optimization.html) -will have support for stripping the `if (typeof define !== 'function')` check -mentioned above, so you can include this snippet for code that runs in the -browser, but avoid taking the cost of the if() statement once the code is -optimized for deployment. - -## Node 0.4 Support - -If you want to support Node 0.4, then add `require` as the second parameter to amdefine: - -```javascript -//Only if you want Node 0.4. If using 0.5 or later, use the above snippet. -if (typeof define !== 'function') { var define = require('amdefine')(module, require) } -``` - -## Limitations - -### Synchronous vs Asynchronous - -amdefine creates a define() function that is callable by your code. It will -execute and trace dependencies and call the factory function *synchronously*, -to keep the behavior in line with Node's synchronous dependency tracing. - -The exception: calling AMD's callback-style require() from inside a factory -function. The require callback is called on process.nextTick(): - -```javascript -define(function (require) { - require(['a'], function(a) { - //'a' is loaded synchronously, but - //this callback is called on process.nextTick(). - }); -}); -``` - -### Loader Plugins - -Loader plugins are supported as long as they call their load() callbacks -synchronously. So ones that do network requests will not work. However plugins -like [text](http://requirejs.org/docs/api.html#text) can load text files locally. - -The plugin API's `load.fromText()` is **not supported** in amdefine, so this means -transpiler plugins like the [CoffeeScript loader plugin](https://github.com/jrburke/require-cs) -will not work. This may be fixable, but it is a bit complex, and I do not have -enough node-fu to figure it out yet. See the source for amdefine.js if you want -to get an idea of the issues involved. - -## Tests - -To run the tests, cd to **tests** and run: - -``` -node all.js -node all-intercept.js -``` - -## License - -New BSD and MIT. Check the LICENSE file for all the details. diff --git a/node_modules/browserify/node_modules/insert-module-globals/node_modules/combine-source-map/node_modules/source-map/node_modules/amdefine/amdefine.js b/node_modules/browserify/node_modules/insert-module-globals/node_modules/combine-source-map/node_modules/source-map/node_modules/amdefine/amdefine.js deleted file mode 100644 index ca830ba4..00000000 --- a/node_modules/browserify/node_modules/insert-module-globals/node_modules/combine-source-map/node_modules/source-map/node_modules/amdefine/amdefine.js +++ /dev/null @@ -1,301 +0,0 @@ -/** vim: et:ts=4:sw=4:sts=4 - * @license amdefine 1.0.1 Copyright (c) 2011-2016, The Dojo Foundation All Rights Reserved. - * Available via the MIT or new BSD license. - * see: http://github.com/jrburke/amdefine for details - */ - -/*jslint node: true */ -/*global module, process */ -'use strict'; - -/** - * Creates a define for node. - * @param {Object} module the "module" object that is defined by Node for the - * current module. - * @param {Function} [requireFn]. Node's require function for the current module. - * It only needs to be passed in Node versions before 0.5, when module.require - * did not exist. - * @returns {Function} a define function that is usable for the current node - * module. - */ -function amdefine(module, requireFn) { - 'use strict'; - var defineCache = {}, - loaderCache = {}, - alreadyCalled = false, - path = require('path'), - makeRequire, stringRequire; - - /** - * Trims the . and .. from an array of path segments. - * It will keep a leading path segment if a .. will become - * the first path segment, to help with module name lookups, - * which act like paths, but can be remapped. But the end result, - * all paths that use this function should look normalized. - * NOTE: this method MODIFIES the input array. - * @param {Array} ary the array of path segments. - */ - function trimDots(ary) { - var i, part; - for (i = 0; ary[i]; i+= 1) { - part = ary[i]; - if (part === '.') { - ary.splice(i, 1); - i -= 1; - } else if (part === '..') { - if (i === 1 && (ary[2] === '..' || ary[0] === '..')) { - //End of the line. Keep at least one non-dot - //path segment at the front so it can be mapped - //correctly to disk. Otherwise, there is likely - //no path mapping for a path starting with '..'. - //This can still fail, but catches the most reasonable - //uses of .. - break; - } else if (i > 0) { - ary.splice(i - 1, 2); - i -= 2; - } - } - } - } - - function normalize(name, baseName) { - var baseParts; - - //Adjust any relative paths. - if (name && name.charAt(0) === '.') { - //If have a base name, try to normalize against it, - //otherwise, assume it is a top-level require that will - //be relative to baseUrl in the end. - if (baseName) { - baseParts = baseName.split('/'); - baseParts = baseParts.slice(0, baseParts.length - 1); - baseParts = baseParts.concat(name.split('/')); - trimDots(baseParts); - name = baseParts.join('/'); - } - } - - return name; - } - - /** - * Create the normalize() function passed to a loader plugin's - * normalize method. - */ - function makeNormalize(relName) { - return function (name) { - return normalize(name, relName); - }; - } - - function makeLoad(id) { - function load(value) { - loaderCache[id] = value; - } - - load.fromText = function (id, text) { - //This one is difficult because the text can/probably uses - //define, and any relative paths and requires should be relative - //to that id was it would be found on disk. But this would require - //bootstrapping a module/require fairly deeply from node core. - //Not sure how best to go about that yet. - throw new Error('amdefine does not implement load.fromText'); - }; - - return load; - } - - makeRequire = function (systemRequire, exports, module, relId) { - function amdRequire(deps, callback) { - if (typeof deps === 'string') { - //Synchronous, single module require('') - return stringRequire(systemRequire, exports, module, deps, relId); - } else { - //Array of dependencies with a callback. - - //Convert the dependencies to modules. - deps = deps.map(function (depName) { - return stringRequire(systemRequire, exports, module, depName, relId); - }); - - //Wait for next tick to call back the require call. - if (callback) { - process.nextTick(function () { - callback.apply(null, deps); - }); - } - } - } - - amdRequire.toUrl = function (filePath) { - if (filePath.indexOf('.') === 0) { - return normalize(filePath, path.dirname(module.filename)); - } else { - return filePath; - } - }; - - return amdRequire; - }; - - //Favor explicit value, passed in if the module wants to support Node 0.4. - requireFn = requireFn || function req() { - return module.require.apply(module, arguments); - }; - - function runFactory(id, deps, factory) { - var r, e, m, result; - - if (id) { - e = loaderCache[id] = {}; - m = { - id: id, - uri: __filename, - exports: e - }; - r = makeRequire(requireFn, e, m, id); - } else { - //Only support one define call per file - if (alreadyCalled) { - throw new Error('amdefine with no module ID cannot be called more than once per file.'); - } - alreadyCalled = true; - - //Use the real variables from node - //Use module.exports for exports, since - //the exports in here is amdefine exports. - e = module.exports; - m = module; - r = makeRequire(requireFn, e, m, module.id); - } - - //If there are dependencies, they are strings, so need - //to convert them to dependency values. - if (deps) { - deps = deps.map(function (depName) { - return r(depName); - }); - } - - //Call the factory with the right dependencies. - if (typeof factory === 'function') { - result = factory.apply(m.exports, deps); - } else { - result = factory; - } - - if (result !== undefined) { - m.exports = result; - if (id) { - loaderCache[id] = m.exports; - } - } - } - - stringRequire = function (systemRequire, exports, module, id, relId) { - //Split the ID by a ! so that - var index = id.indexOf('!'), - originalId = id, - prefix, plugin; - - if (index === -1) { - id = normalize(id, relId); - - //Straight module lookup. If it is one of the special dependencies, - //deal with it, otherwise, delegate to node. - if (id === 'require') { - return makeRequire(systemRequire, exports, module, relId); - } else if (id === 'exports') { - return exports; - } else if (id === 'module') { - return module; - } else if (loaderCache.hasOwnProperty(id)) { - return loaderCache[id]; - } else if (defineCache[id]) { - runFactory.apply(null, defineCache[id]); - return loaderCache[id]; - } else { - if(systemRequire) { - return systemRequire(originalId); - } else { - throw new Error('No module with ID: ' + id); - } - } - } else { - //There is a plugin in play. - prefix = id.substring(0, index); - id = id.substring(index + 1, id.length); - - plugin = stringRequire(systemRequire, exports, module, prefix, relId); - - if (plugin.normalize) { - id = plugin.normalize(id, makeNormalize(relId)); - } else { - //Normalize the ID normally. - id = normalize(id, relId); - } - - if (loaderCache[id]) { - return loaderCache[id]; - } else { - plugin.load(id, makeRequire(systemRequire, exports, module, relId), makeLoad(id), {}); - - return loaderCache[id]; - } - } - }; - - //Create a define function specific to the module asking for amdefine. - function define(id, deps, factory) { - if (Array.isArray(id)) { - factory = deps; - deps = id; - id = undefined; - } else if (typeof id !== 'string') { - factory = id; - id = deps = undefined; - } - - if (deps && !Array.isArray(deps)) { - factory = deps; - deps = undefined; - } - - if (!deps) { - deps = ['require', 'exports', 'module']; - } - - //Set up properties for this module. If an ID, then use - //internal cache. If no ID, then use the external variables - //for this node module. - if (id) { - //Put the module in deep freeze until there is a - //require call for it. - defineCache[id] = [id, deps, factory]; - } else { - runFactory(id, deps, factory); - } - } - - //define.require, which has access to all the values in the - //cache. Useful for AMD modules that all have IDs in the file, - //but need to finally export a value to node based on one of those - //IDs. - define.require = function (id) { - if (loaderCache[id]) { - return loaderCache[id]; - } - - if (defineCache[id]) { - runFactory.apply(null, defineCache[id]); - return loaderCache[id]; - } - }; - - define.amd = {}; - - return define; -} - -module.exports = amdefine; diff --git a/node_modules/browserify/node_modules/insert-module-globals/node_modules/combine-source-map/node_modules/source-map/node_modules/amdefine/intercept.js b/node_modules/browserify/node_modules/insert-module-globals/node_modules/combine-source-map/node_modules/source-map/node_modules/amdefine/intercept.js deleted file mode 100644 index 771a9830..00000000 --- a/node_modules/browserify/node_modules/insert-module-globals/node_modules/combine-source-map/node_modules/source-map/node_modules/amdefine/intercept.js +++ /dev/null @@ -1,36 +0,0 @@ -/*jshint node: true */ -var inserted, - Module = require('module'), - fs = require('fs'), - existingExtFn = Module._extensions['.js'], - amdefineRegExp = /amdefine\.js/; - -inserted = "if (typeof define !== 'function') {var define = require('amdefine')(module)}"; - -//From the node/lib/module.js source: -function stripBOM(content) { - // Remove byte order marker. This catches EF BB BF (the UTF-8 BOM) - // because the buffer-to-string conversion in `fs.readFileSync()` - // translates it to FEFF, the UTF-16 BOM. - if (content.charCodeAt(0) === 0xFEFF) { - content = content.slice(1); - } - return content; -} - -//Also adapted from the node/lib/module.js source: -function intercept(module, filename) { - var content = stripBOM(fs.readFileSync(filename, 'utf8')); - - if (!amdefineRegExp.test(module.id)) { - content = inserted + content; - } - - module._compile(content, filename); -} - -intercept._id = 'amdefine/intercept'; - -if (!existingExtFn._id || existingExtFn._id !== intercept._id) { - Module._extensions['.js'] = intercept; -} diff --git a/node_modules/browserify/node_modules/insert-module-globals/node_modules/combine-source-map/node_modules/source-map/node_modules/amdefine/package.json b/node_modules/browserify/node_modules/insert-module-globals/node_modules/combine-source-map/node_modules/source-map/node_modules/amdefine/package.json deleted file mode 100644 index 4e89580f..00000000 --- a/node_modules/browserify/node_modules/insert-module-globals/node_modules/combine-source-map/node_modules/source-map/node_modules/amdefine/package.json +++ /dev/null @@ -1,51 +0,0 @@ -{ - "name": "amdefine", - "description": "Provide AMD's define() API for declaring modules in the AMD format", - "version": "1.0.1", - "homepage": "http://github.com/jrburke/amdefine", - "author": { - "name": "James Burke", - "email": "jrburke@gmail.com", - "url": "http://github.com/jrburke" - }, - "license": "BSD-3-Clause OR MIT", - "repository": { - "type": "git", - "url": "git+https://github.com/jrburke/amdefine.git" - }, - "main": "./amdefine.js", - "engines": { - "node": ">=0.4.2" - }, - "gitHead": "e59edc9da24404ec7937098e3992f8fb0e260be7", - "bugs": { - "url": "https://github.com/jrburke/amdefine/issues" - }, - "_id": "amdefine@1.0.1", - "scripts": {}, - "_shasum": "4a5282ac164729e93619bcfd3ad151f817ce91f5", - "_from": "amdefine@>=0.0.4", - "_npmVersion": "3.10.3", - "_nodeVersion": "6.7.0", - "_npmUser": { - "name": "jrburke", - "email": "jrburke@gmail.com" - }, - "dist": { - "shasum": "4a5282ac164729e93619bcfd3ad151f817ce91f5", - "tarball": "https://registry.npmjs.org/amdefine/-/amdefine-1.0.1.tgz" - }, - "maintainers": [ - { - "name": "jrburke", - "email": "jrburke@gmail.com" - } - ], - "_npmOperationalInternal": { - "host": "packages-18-east.internal.npmjs.com", - "tmp": "tmp/amdefine-1.0.1.tgz_1478062849665_0.19916908955201507" - }, - "directories": {}, - "_resolved": "https://registry.npmjs.org/amdefine/-/amdefine-1.0.1.tgz", - "readme": "ERROR: No README data found!" -} diff --git a/node_modules/browserify/node_modules/insert-module-globals/node_modules/combine-source-map/node_modules/source-map/package.json b/node_modules/browserify/node_modules/insert-module-globals/node_modules/combine-source-map/node_modules/source-map/package.json deleted file mode 100644 index 7898259d..00000000 --- a/node_modules/browserify/node_modules/insert-module-globals/node_modules/combine-source-map/node_modules/source-map/package.json +++ /dev/null @@ -1,201 +0,0 @@ -{ - "name": "source-map", - "description": "Generates and consumes source maps", - "version": "0.4.4", - "homepage": "https://github.com/mozilla/source-map", - "author": { - "name": "Nick Fitzgerald", - "email": "nfitzgerald@mozilla.com" - }, - "contributors": [ - { - "name": "Tobias Koppers", - "email": "tobias.koppers@googlemail.com" - }, - { - "name": "Duncan Beevers", - "email": "duncan@dweebd.com" - }, - { - "name": "Stephen Crane", - "email": "scrane@mozilla.com" - }, - { - "name": "Ryan Seddon", - "email": "seddon.ryan@gmail.com" - }, - { - "name": "Miles Elam", - "email": "miles.elam@deem.com" - }, - { - "name": "Mihai Bazon", - "email": "mihai.bazon@gmail.com" - }, - { - "name": "Michael Ficarra", - "email": "github.public.email@michael.ficarra.me" - }, - { - "name": "Todd Wolfson", - "email": "todd@twolfson.com" - }, - { - "name": "Alexander Solovyov", - "email": "alexander@solovyov.net" - }, - { - "name": "Felix Gnass", - "email": "fgnass@gmail.com" - }, - { - "name": "Conrad Irwin", - "email": "conrad.irwin@gmail.com" - }, - { - "name": "usrbincc", - "email": "usrbincc@yahoo.com" - }, - { - "name": "David Glasser", - "email": "glasser@davidglasser.net" - }, - { - "name": "Chase Douglas", - "email": "chase@newrelic.com" - }, - { - "name": "Evan Wallace", - "email": "evan.exe@gmail.com" - }, - { - "name": "Heather Arthur", - "email": "fayearthur@gmail.com" - }, - { - "name": "Hugh Kennedy", - "email": "hughskennedy@gmail.com" - }, - { - "name": "David Glasser", - "email": "glasser@davidglasser.net" - }, - { - "name": "Simon Lydell", - "email": "simon.lydell@gmail.com" - }, - { - "name": "Jmeas Smith", - "email": "jellyes2@gmail.com" - }, - { - "name": "Michael Z Goddard", - "email": "mzgoddard@gmail.com" - }, - { - "name": "azu", - "email": "azu@users.noreply.github.com" - }, - { - "name": "John Gozde", - "email": "john@gozde.ca" - }, - { - "name": "Adam Kirkton", - "email": "akirkton@truefitinnovation.com" - }, - { - "name": "Chris Montgomery", - "email": "christopher.montgomery@dowjones.com" - }, - { - "name": "J. Ryan Stinnett", - "email": "jryans@gmail.com" - }, - { - "name": "Jack Herrington", - "email": "jherrington@walmartlabs.com" - }, - { - "name": "Chris Truter", - "email": "jeffpalentine@gmail.com" - }, - { - "name": "Daniel Espeset", - "email": "daniel@danielespeset.com" - }, - { - "name": "Jamie Wong", - "email": "jamie.lf.wong@gmail.com" - }, - { - "name": "Eddy Bruël", - "email": "ejpbruel@mozilla.com" - }, - { - "name": "Hawken Rives", - "email": "hawkrives@gmail.com" - }, - { - "name": "Gilad Peleg", - "email": "giladp007@gmail.com" - } - ], - "repository": { - "type": "git", - "url": "http://github.com/mozilla/source-map.git" - }, - "directories": { - "lib": "./lib" - }, - "main": "./lib/source-map.js", - "files": [ - "lib/", - "build/" - ], - "engines": { - "node": ">=0.8.0" - }, - "license": "BSD-3-Clause", - "dependencies": { - "amdefine": ">=0.0.4" - }, - "devDependencies": { - "dryice": ">=0.4.8" - }, - "scripts": { - "test": "node test/run-tests.js", - "build": "node Makefile.dryice.js" - }, - "bugs": { - "url": "https://github.com/mozilla/source-map/issues" - }, - "_id": "source-map@0.4.4", - "_shasum": "eba4f5da9c0dc999de68032d8b4f76173652036b", - "_from": "source-map@>=0.4.2 <0.5.0", - "_npmVersion": "1.4.9", - "_npmUser": { - "name": "nickfitzgerald", - "email": "fitzgen@gmail.com" - }, - "maintainers": [ - { - "name": "mozilla-devtools", - "email": "mozilla-developer-tools@googlegroups.com" - }, - { - "name": "mozilla", - "email": "dherman@mozilla.com" - }, - { - "name": "nickfitzgerald", - "email": "fitzgen@gmail.com" - } - ], - "dist": { - "shasum": "eba4f5da9c0dc999de68032d8b4f76173652036b", - "tarball": "http://registry.npmjs.org/source-map/-/source-map-0.4.4.tgz" - }, - "_resolved": "https://registry.npmjs.org/source-map/-/source-map-0.4.4.tgz", - "readme": "ERROR: No README data found!" -} diff --git a/node_modules/browserify/node_modules/insert-module-globals/node_modules/combine-source-map/package.json b/node_modules/browserify/node_modules/insert-module-globals/node_modules/combine-source-map/package.json deleted file mode 100644 index 24e07b96..00000000 --- a/node_modules/browserify/node_modules/insert-module-globals/node_modules/combine-source-map/package.json +++ /dev/null @@ -1,68 +0,0 @@ -{ - "name": "combine-source-map", - "version": "0.6.1", - "description": "Add source maps of multiple files, offset them and then combine them into one source map", - "main": "index.js", - "scripts": { - "test": "tap test/*.js" - }, - "repository": { - "type": "git", - "url": "git://github.com/thlorenz/combine-source-map.git" - }, - "homepage": "https://github.com/thlorenz/combine-source-map", - "dependencies": { - "convert-source-map": "~1.1.0", - "inline-source-map": "~0.5.0", - "lodash.memoize": "~3.0.3", - "source-map": "~0.4.2" - }, - "devDependencies": { - "tap": "~0.4.3" - }, - "keywords": [ - "source", - "map", - "sourcemap", - "bundle", - "combine", - "cat", - "sourceMappingUrl", - "browserify" - ], - "author": { - "name": "Thorsten Lorenz", - "email": "thlorenz@gmx.de", - "url": "http://thlorenz.com" - }, - "license": "MIT", - "engine": { - "node": ">=0.6" - }, - "gitHead": "8f2c6f23df9689d0b27af328bdc575bb44375829", - "bugs": { - "url": "https://github.com/thlorenz/combine-source-map/issues" - }, - "_id": "combine-source-map@0.6.1", - "_shasum": "9b4a09c316033d768e0f11e029fa2730e079ad96", - "_from": "combine-source-map@>=0.6.1 <0.7.0", - "_npmVersion": "2.8.3", - "_nodeVersion": "1.8.1", - "_npmUser": { - "name": "thlorenz", - "email": "thlorenz@gmx.de" - }, - "maintainers": [ - { - "name": "thlorenz", - "email": "thlorenz@gmx.de" - } - ], - "dist": { - "shasum": "9b4a09c316033d768e0f11e029fa2730e079ad96", - "tarball": "https://registry.npmjs.org/combine-source-map/-/combine-source-map-0.6.1.tgz" - }, - "directories": {}, - "_resolved": "https://registry.npmjs.org/combine-source-map/-/combine-source-map-0.6.1.tgz", - "readme": "ERROR: No README data found!" -} diff --git a/node_modules/browserify/node_modules/insert-module-globals/node_modules/combine-source-map/test/combine-source-map.js b/node_modules/browserify/node_modules/insert-module-globals/node_modules/combine-source-map/test/combine-source-map.js deleted file mode 100644 index 77c5bcad..00000000 --- a/node_modules/browserify/node_modules/insert-module-globals/node_modules/combine-source-map/test/combine-source-map.js +++ /dev/null @@ -1,347 +0,0 @@ -'use strict'; -/*jshint asi: true */ - -var test = require('tap').test; -var convert = require('convert-source-map'); -var commentRegex = require('convert-source-map').commentRegex; -var combine = require('..'); -var mappingsFromMap = require('../lib/mappings-from-map'); - -function checkMappings(foo, sm, lineOffset) { - function inspect(obj, depth) { - return require('util').inspect(obj, false, depth || 5, true); - } - - var fooMappings = mappingsFromMap(foo); - var mappings = mappingsFromMap(sm); - - var genLinesOffset = true; - var origLinesSame = true; - for (var i = 0; i < mappings.length; i++) { - var fooGen = fooMappings[i].generated; - var fooOrig = fooMappings[i].original; - var gen = mappings[i].generated - var orig = mappings[i].original; - - if (gen.column !== fooGen.column || gen.line !== (fooGen.line + lineOffset)) { - console.error( - 'generated mapping at %s not offset properly:\ninput: [%s]\noutput:[%s]\n\n', - i , - inspect(fooGen), - inspect(gen) - ); - genLinesOffset = false; - } - - if (orig.column !== fooOrig.column || orig.line !== fooOrig.line) { - console.error( - 'original mapping at %s is not the same as the genrated mapping:\ninput: [%s]\noutput:[%s]\n\n', - i , - inspect(fooOrig), - inspect(orig) - ); - origLinesSame = false; - } - } - return { genLinesOffset: genLinesOffset, origLinesSame: origLinesSame }; -} - -var foo = { - version : 3, - file : 'foo.js', - sourceRoot : '', - sources : [ 'foo.coffee' ], - names : [], - mappings : ';AAAA;CAAA;CAAA,CAAA,CAAA,IAAO,GAAK;CAAZ', - sourcesContent : [ 'console.log(require \'./bar.js\')\n' ] }; - -test('add one file with inlined source', function (t) { - - var mapComment = convert.fromObject(foo).toComment(); - var file = { - id: 'xyz' - , source: '(function() {\n\n console.log(require(\'./bar.js\'));\n\n}).call(this);\n' + '\n' + mapComment - , sourceFile: 'foo.js' - }; - - var lineOffset = 3 - var base64 = combine.create() - .addFile(file, { line: lineOffset }) - .base64() - - var sm = convert.fromBase64(base64).toObject(); - var res = checkMappings(foo, sm, lineOffset); - - t.ok(res.genLinesOffset, 'all generated lines are offset properly and columns unchanged') - t.ok(res.origLinesSame, 'all original lines and columns are unchanged') - t.deepEqual(sm.sourcesContent, foo.sourcesContent, 'includes the original source') - t.deepEqual(sm.sources, ['foo.coffee'], 'includes original filename') - t.end() -}); - - -test('add one file without inlined source', function (t) { - - var mapComment = convert - .fromObject(foo) - .setProperty('sourcesContent', []) - .toComment(); - - var file = { - id: 'xyz' - , source: '(function() {\n\n console.log(require(\'./bar.js\'));\n\n}).call(this);\n' + '\n' + mapComment - , sourceFile: 'foo.js' - }; - - var lineOffset = 3 - var base64 = combine.create() - .addFile(file, { line: lineOffset }) - .base64() - - var sm = convert.fromBase64(base64).toObject(); - var mappings = mappingsFromMap(sm); - - t.deepEqual(sm.sourcesContent, [file.source], 'includes the generated source') - t.deepEqual(sm.sources, ['foo.js'], 'includes generated filename') - - t.deepEqual( - mappings - , [ { generated: { line: 4, column: 0 }, - original: { line: 1, column: 0 }, - source: 'foo.js', name: undefined }, - { generated: { line: 5, column: 0 }, - original: { line: 2, column: 0 }, - source: 'foo.js', name: undefined }, - { generated: { line: 6, column: 0 }, - original: { line: 3, column: 0 }, - source: 'foo.js', name: undefined }, - { generated: { line: 7, column: 0 }, - original: { line: 4, column: 0 }, - source: 'foo.js', name: undefined }, - { generated: { line: 8, column: 0 }, - original: { line: 5, column: 0 }, - source: 'foo.js', name: undefined }, - { generated: { line: 9, column: 0 }, - original: { line: 6, column: 0 }, - source: 'foo.js', name: undefined }, - { generated: { line: 10, column: 0 }, - original: { line: 7, column: 0 }, - source: 'foo.js', name: undefined } ] - , 'generates mappings offset by the given line' - ) - t.end() -}) - -test('add one file with inlined sources from multiple files', function(t) { - var gen1Map = { - version: 3, - sources: [ 'one.js', 'two.js' ], - names: [], - mappings: 'AAAA;ACAA', - sourcesContent: [ 'console.log(1);', 'console.log(2);' ] - }; - - var gen2Map = { - version: 3, - sources: [ 'three.js', 'four.js' ], - names: [], - mappings: 'AAAA;ACAA', - sourcesContent: [ 'console.log(3);', 'console.log(4);' ] - }; - - var base64 = combine.create() - .addFile({ - source: 'console.log(1);\nconsole.log(2);\n' + convert.fromObject(gen1Map).toComment(), - sourceFile: 'gen1.js' - }) - .addFile({ - source: 'console.log(3);\nconsole.log(4);\n' + convert.fromObject(gen2Map).toComment(), - sourceFile: 'gen2.js' - }, {line: 2}) - .base64() - - var sm = convert.fromBase64(base64).toObject(); - - - t.deepEqual(sm.sources, ['one.js', 'two.js', 'three.js', 'four.js'], 'include the correct source'); - - t.deepEqual(sm.sourcesContent, [ - 'console.log(1);', - 'console.log(2);', - 'console.log(3);', - 'console.log(4);' - ], 'include the correct source file content'); - - t.deepEqual( - mappingsFromMap(sm) - , [ { original: { column: 0, line: 1 }, - generated: { column: 0, line: 1 }, - source: 'one.js', - name: undefined }, - { original: { column: 0, line: 1 }, - generated: { column: 0, line: 2 }, - source: 'two.js', - name: undefined }, - { original: { column: 0, line: 1 }, - generated: { column: 0, line: 3 }, - source: 'three.js', - name: undefined }, - { original: { column: 0, line: 1 }, - generated: { column: 0, line: 4 }, - source: 'four.js', - name: undefined } ], 'should properly map multiple files'); - t.end() -}); - -test('relative path from multiple files', function(t) { - // Folder structure as follows: - // - // project - // +- src - // +- package1 - // +- sub - // -- one.js - // -- two.js - // +- package2 - // +- sub - // -- three.js - // -- four.js - // +- gen - // +- gen1.js - // +- gen2.js - // -- combined.js - // - // Where 'one.js', 'two.js' were combined to 'gen1.js' - // and 'three.js', 'four.js' were combined to 'gen2.js'. - // Now 'gen1.js' and 'gen2.js' are being combined from - // the project root folder. - var gen1Map = { - version: 3, - sources: [ 'sub/one.js', 'sub/two.js' ], - names: [], - mappings: 'AAAA;ACAA', - sourcesContent: [ 'console.log(1);', 'console.log(2);' ], - sourceRoot: '../src/package1' - }; - - var gen2Map = { - version: 3, - sources: [ 'sub/three.js', 'sub/four.js' ], - names: [], - mappings: 'AAAA;ACAA', - sourcesContent: [ 'console.log(3);', 'console.log(4);' ], - sourceRoot: '../src/package2' - }; - - var base64 = combine.create() - .addFile({ - source: 'console.log(1);\nconsole.log(2);\n' + convert.fromObject(gen1Map).toComment(), - sourceFile: 'gen/gen1.js' - }) - .addFile({ - source: 'console.log(3);\nconsole.log(4);\n' + convert.fromObject(gen2Map).toComment(), - sourceFile: 'gen/gen2.js' - }, {line: 2}) - .base64() - - var sm = convert.fromBase64(base64).toObject(); - - t.deepEqual(sm.sources, ['src/package1/sub/one.js', 'src/package1/sub/two.js', - 'src/package2/sub/three.js', 'src/package2/sub/four.js'], - 'include the correct source'); - - t.deepEqual(sm.sourcesContent, [ - 'console.log(1);', - 'console.log(2);', - 'console.log(3);', - 'console.log(4);' - ], 'include the correct source file content'); - - t.deepEqual( - mappingsFromMap(sm) - , [ { original: { column: 0, line: 1 }, - generated: { column: 0, line: 1 }, - source: 'src/package1/sub/one.js', - name: undefined }, - { original: { column: 0, line: 1 }, - generated: { column: 0, line: 2 }, - source: 'src/package1/sub/two.js', - name: undefined }, - { original: { column: 0, line: 1 }, - generated: { column: 0, line: 3 }, - source: 'src/package2/sub/three.js', - name: undefined }, - { original: { column: 0, line: 1 }, - generated: { column: 0, line: 4 }, - source: 'src/package2/sub/four.js', - name: undefined } ], 'should properly map multiple files'); - t.end() -}); - -test('relative path when source and file name are the same', function(t) { - var gen1Map = { - version: 3, - sources: [ 'a/b/one.js' ], - names: [], - mappings: 'AAAA', - file: 'a/b/one.js', - sourcesContent: [ 'console.log(1);\n' ] - }; - - var gen2Map = { - version: 3, - sources: [ 'a/b/two.js' ], - names: [], - mappings: 'AAAA', - file: 'a/b/two.js', - sourcesContent: [ 'console.log(2);\n' ] - }; - - var base64 = combine.create() - .addFile({ - source: 'console.log(1);\n' + convert.fromObject(gen1Map).toComment(), - sourceFile: 'a/b/one.js' - }) - .addFile({ - source: 'console.log(2);\n' + convert.fromObject(gen2Map).toComment(), - sourceFile: 'a/b/two.js' - }, {line: 1}) - .base64() - - var sm = convert.fromBase64(base64).toObject(); - - t.deepEqual(sm.sources, ['a/b/one.js', 'a/b/two.js'], - 'include the correct source'); - - t.deepEqual( - mappingsFromMap(sm) - , [ { original: { column: 0, line: 1 }, - generated: { column: 0, line: 1 }, - source: 'a/b/one.js', - name: undefined }, - { original: { column: 0, line: 1 }, - generated: { column: 0, line: 2 }, - source: 'a/b/two.js', - name: undefined } ], 'should properly map multiple files'); - t.end() -}); - -test('remove comments', function (t) { - var mapComment = convert.fromObject(foo).toComment(); - - function sourcemapComments(src) { - var matches = src.match(commentRegex); - return matches ? matches.length : 0; - } - - t.equal(sourcemapComments('var a = 1;\n' + mapComment), 1); - - [ '' - , 'var a = 1;\n' + mapComment - , 'var a = 1;\n' + mapComment + '\nvar b = 5;\n' + mapComment - ] .forEach(function (x) { - var removed = combine.removeComments(x) - t.equal(sourcemapComments(removed), 0) - }) - t.end() -}) diff --git a/node_modules/browserify/node_modules/insert-module-globals/node_modules/is-buffer/.travis.yml b/node_modules/browserify/node_modules/insert-module-globals/node_modules/is-buffer/.travis.yml deleted file mode 100644 index 24885a36..00000000 --- a/node_modules/browserify/node_modules/insert-module-globals/node_modules/is-buffer/.travis.yml +++ /dev/null @@ -1,8 +0,0 @@ -sudo: false -language: node_js -node_js: - - node -env: - global: - - secure: du27W3wTgZ3G183axW7w0I01lOIurx8kilMH9p45VMfNXCu8lo6FLtLIQZxJ1FYMoJLQ1yfJTu2G0rq39SotDfJumsk6tF7BjTY/HKCocZaHqCMgw0W2bcylb5kMAdLhBNPlzejpPoWa1x1axbAHNFOLQNVosG/Bavu3/kuIIps= - - secure: Ax/5aekM40o67NuTkvQqx1DhfP86ZlHTtKbv5yI+WFmbjD3FQM8b8G1J/o7doaBDev7Mp+1zDJOK2pFGtt+JGRl0lM2JUmLh6yh/b28obXyei5iuUkqzKJLfKZHMbY5QW/1i4DUM+zSXe6Kava0qnqYg5wBBnrF6gLdsVsCGNQk= diff --git a/node_modules/browserify/node_modules/insert-module-globals/node_modules/is-buffer/.zuul.yml b/node_modules/browserify/node_modules/insert-module-globals/node_modules/is-buffer/.zuul.yml deleted file mode 100644 index eb3cae6d..00000000 --- a/node_modules/browserify/node_modules/insert-module-globals/node_modules/is-buffer/.zuul.yml +++ /dev/null @@ -1,14 +0,0 @@ -ui: tape -browsers: - - name: chrome - version: 39..latest - - name: firefox - version: 34..latest - - name: safari - version: 5..latest - - name: microsoftedge - version: latest - - name: ie - version: 8..latest - - name: android - version: 5.0..latest diff --git a/node_modules/browserify/node_modules/insert-module-globals/node_modules/is-buffer/LICENSE b/node_modules/browserify/node_modules/insert-module-globals/node_modules/is-buffer/LICENSE deleted file mode 100644 index 0c068cee..00000000 --- a/node_modules/browserify/node_modules/insert-module-globals/node_modules/is-buffer/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) Feross Aboukhadijeh - -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/node_modules/browserify/node_modules/insert-module-globals/node_modules/is-buffer/README.md b/node_modules/browserify/node_modules/insert-module-globals/node_modules/is-buffer/README.md deleted file mode 100644 index cb6f356d..00000000 --- a/node_modules/browserify/node_modules/insert-module-globals/node_modules/is-buffer/README.md +++ /dev/null @@ -1,49 +0,0 @@ -# is-buffer [![travis][travis-image]][travis-url] [![npm][npm-image]][npm-url] [![downloads][downloads-image]][npm-url] - -#### Determine if an object is a [`Buffer`](http://nodejs.org/api/buffer.html) (including the [browserify Buffer](https://github.com/feross/buffer)) - -[![saucelabs][saucelabs-image]][saucelabs-url] - -[travis-image]: https://img.shields.io/travis/feross/is-buffer/master.svg -[travis-url]: https://travis-ci.org/feross/is-buffer -[npm-image]: https://img.shields.io/npm/v/is-buffer.svg -[npm-url]: https://npmjs.org/package/is-buffer -[downloads-image]: https://img.shields.io/npm/dm/is-buffer.svg -[saucelabs-image]: https://saucelabs.com/browser-matrix/is-buffer.svg -[saucelabs-url]: https://saucelabs.com/u/is-buffer - -## Why not use `Buffer.isBuffer`? - -This module lets you check if an object is a `Buffer` without using `Buffer.isBuffer` (which includes the whole [buffer](https://github.com/feross/buffer) module in [browserify](http://browserify.org/)). - -It's future-proof and works in node too! - -## install - -```bash -npm install is-buffer -``` - -## usage - -```js -var isBuffer = require('is-buffer') - -isBuffer(new Buffer(4)) // true - -isBuffer(undefined) // false -isBuffer(null) // false -isBuffer('') // false -isBuffer(true) // false -isBuffer(false) // false -isBuffer(0) // false -isBuffer(1) // false -isBuffer(1.0) // false -isBuffer('string') // false -isBuffer({}) // false -isBuffer(function foo () {}) // false -``` - -## license - -MIT. Copyright (C) [Feross Aboukhadijeh](http://feross.org). diff --git a/node_modules/browserify/node_modules/insert-module-globals/node_modules/is-buffer/index.js b/node_modules/browserify/node_modules/insert-module-globals/node_modules/is-buffer/index.js deleted file mode 100644 index 36c808ea..00000000 --- a/node_modules/browserify/node_modules/insert-module-globals/node_modules/is-buffer/index.js +++ /dev/null @@ -1,21 +0,0 @@ -/*! - * Determine if an object is a Buffer - * - * @author Feross Aboukhadijeh - * @license MIT - */ - -// The _isBuffer check is for Safari 5-7 support, because it's missing -// Object.prototype.constructor. Remove this eventually -module.exports = function (obj) { - return obj != null && (isBuffer(obj) || isSlowBuffer(obj) || !!obj._isBuffer) -} - -function isBuffer (obj) { - return !!obj.constructor && typeof obj.constructor.isBuffer === 'function' && obj.constructor.isBuffer(obj) -} - -// For Node v0.10 support. Remove this eventually. -function isSlowBuffer (obj) { - return typeof obj.readFloatLE === 'function' && typeof obj.slice === 'function' && isBuffer(obj.slice(0, 0)) -} diff --git a/node_modules/browserify/node_modules/insert-module-globals/node_modules/is-buffer/package.json b/node_modules/browserify/node_modules/insert-module-globals/node_modules/is-buffer/package.json deleted file mode 100644 index 60c9c5fc..00000000 --- a/node_modules/browserify/node_modules/insert-module-globals/node_modules/is-buffer/package.json +++ /dev/null @@ -1,79 +0,0 @@ -{ - "name": "is-buffer", - "description": "Determine if an object is a Buffer", - "version": "1.1.4", - "author": { - "name": "Feross Aboukhadijeh", - "email": "feross@feross.org", - "url": "http://feross.org/" - }, - "bugs": { - "url": "https://github.com/feross/is-buffer/issues" - }, - "dependencies": {}, - "devDependencies": { - "standard": "^7.0.0", - "tape": "^4.0.0", - "zuul": "^3.0.0" - }, - "keywords": [ - "buffer", - "buffers", - "type", - "core buffer", - "browser buffer", - "browserify", - "typed array", - "uint32array", - "int16array", - "int32array", - "float32array", - "float64array", - "browser", - "arraybuffer", - "dataview" - ], - "license": "MIT", - "main": "index.js", - "repository": { - "type": "git", - "url": "git://github.com/feross/is-buffer.git" - }, - "scripts": { - "test": "standard && npm run test-node && npm run test-browser", - "test-browser": "zuul -- test/*.js", - "test-browser-local": "zuul --local -- test/*.js", - "test-node": "tape test/*.js" - }, - "testling": { - "files": "test/*.js" - }, - "gitHead": "fd1a429f6ab8092f2e39cb5cc7175b5d9a986c31", - "homepage": "https://github.com/feross/is-buffer#readme", - "_id": "is-buffer@1.1.4", - "_shasum": "cfc86ccd5dc5a52fa80489111c6920c457e2d98b", - "_from": "is-buffer@>=1.1.0 <2.0.0", - "_npmVersion": "2.15.1", - "_nodeVersion": "0.10.46", - "_npmUser": { - "name": "feross", - "email": "feross@feross.org" - }, - "dist": { - "shasum": "cfc86ccd5dc5a52fa80489111c6920c457e2d98b", - "tarball": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.4.tgz" - }, - "maintainers": [ - { - "name": "feross", - "email": "feross@feross.org" - } - ], - "_npmOperationalInternal": { - "host": "packages-16-east.internal.npmjs.com", - "tmp": "tmp/is-buffer-1.1.4.tgz_1470267365943_0.6724087686743587" - }, - "directories": {}, - "_resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.4.tgz", - "readme": "ERROR: No README data found!" -} diff --git a/node_modules/browserify/node_modules/insert-module-globals/node_modules/is-buffer/test/basic.js b/node_modules/browserify/node_modules/insert-module-globals/node_modules/is-buffer/test/basic.js deleted file mode 100644 index 43b7c823..00000000 --- a/node_modules/browserify/node_modules/insert-module-globals/node_modules/is-buffer/test/basic.js +++ /dev/null @@ -1,25 +0,0 @@ -var buffer = require('buffer') -var isBuffer = require('../') -var test = require('tape') - -test('is-buffer', function (t) { - t.equal(isBuffer(new Buffer(4)), true, 'new Buffer(4)') - t.equal(isBuffer(buffer.SlowBuffer(100)), true, 'SlowBuffer(100)') - - t.equal(isBuffer(undefined), false, 'undefined') - t.equal(isBuffer(null), false, 'null') - t.equal(isBuffer(''), false, 'empty string') - t.equal(isBuffer(true), false, 'true') - t.equal(isBuffer(false), false, 'false') - t.equal(isBuffer(0), false, '0') - t.equal(isBuffer(1), false, '1') - t.equal(isBuffer(1.0), false, '1.0') - t.equal(isBuffer('string'), false, 'string') - t.equal(isBuffer({}), false, '{}') - t.equal(isBuffer([]), false, '[]') - t.equal(isBuffer(function foo () {}), false, 'function foo () {}') - t.equal(isBuffer({ isBuffer: null }), false, '{ isBuffer: null }') - t.equal(isBuffer({ isBuffer: function () { throw new Error() } }), false, '{ isBuffer: function () { throw new Error() } }') - - t.end() -}) diff --git a/node_modules/browserify/node_modules/insert-module-globals/node_modules/lexical-scope/.travis.yml b/node_modules/browserify/node_modules/insert-module-globals/node_modules/lexical-scope/.travis.yml deleted file mode 100644 index 09d3ef37..00000000 --- a/node_modules/browserify/node_modules/insert-module-globals/node_modules/lexical-scope/.travis.yml +++ /dev/null @@ -1,4 +0,0 @@ -language: node_js -node_js: - - 0.8 - - 0.10 diff --git a/node_modules/browserify/node_modules/insert-module-globals/node_modules/lexical-scope/LICENSE b/node_modules/browserify/node_modules/insert-module-globals/node_modules/lexical-scope/LICENSE deleted file mode 100644 index ee27ba4b..00000000 --- a/node_modules/browserify/node_modules/insert-module-globals/node_modules/lexical-scope/LICENSE +++ /dev/null @@ -1,18 +0,0 @@ -This software is released under the MIT license: - -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/node_modules/browserify/node_modules/insert-module-globals/node_modules/lexical-scope/bench/jquery.js b/node_modules/browserify/node_modules/insert-module-globals/node_modules/lexical-scope/bench/jquery.js deleted file mode 100644 index 198b3ff0..00000000 --- a/node_modules/browserify/node_modules/insert-module-globals/node_modules/lexical-scope/bench/jquery.js +++ /dev/null @@ -1,4 +0,0 @@ -/*! jQuery v1.7.1 jquery.com | jquery.org/license */ -(function(a,b){function cy(a){return f.isWindow(a)?a:a.nodeType===9?a.defaultView||a.parentWindow:!1}function cv(a){if(!ck[a]){var b=c.body,d=f("<"+a+">").appendTo(b),e=d.css("display");d.remove();if(e==="none"||e===""){cl||(cl=c.createElement("iframe"),cl.frameBorder=cl.width=cl.height=0),b.appendChild(cl);if(!cm||!cl.createElement)cm=(cl.contentWindow||cl.contentDocument).document,cm.write((c.compatMode==="CSS1Compat"?"":"")+""),cm.close();d=cm.createElement(a),cm.body.appendChild(d),e=f.css(d,"display"),b.removeChild(cl)}ck[a]=e}return ck[a]}function cu(a,b){var c={};f.each(cq.concat.apply([],cq.slice(0,b)),function(){c[this]=a});return c}function ct(){cr=b}function cs(){setTimeout(ct,0);return cr=f.now()}function cj(){try{return new a.ActiveXObject("Microsoft.XMLHTTP")}catch(b){}}function ci(){try{return new a.XMLHttpRequest}catch(b){}}function cc(a,c){a.dataFilter&&(c=a.dataFilter(c,a.dataType));var d=a.dataTypes,e={},g,h,i=d.length,j,k=d[0],l,m,n,o,p;for(g=1;g0){if(c!=="border")for(;g=0===c})}function S(a){return!a||!a.parentNode||a.parentNode.nodeType===11}function K(){return!0}function J(){return!1}function n(a,b,c){var d=b+"defer",e=b+"queue",g=b+"mark",h=f._data(a,d);h&&(c==="queue"||!f._data(a,e))&&(c==="mark"||!f._data(a,g))&&setTimeout(function(){!f._data(a,e)&&!f._data(a,g)&&(f.removeData(a,d,!0),h.fire())},0)}function m(a){for(var b in a){if(b==="data"&&f.isEmptyObject(a[b]))continue;if(b!=="toJSON")return!1}return!0}function l(a,c,d){if(d===b&&a.nodeType===1){var e="data-"+c.replace(k,"-$1").toLowerCase();d=a.getAttribute(e);if(typeof d=="string"){try{d=d==="true"?!0:d==="false"?!1:d==="null"?null:f.isNumeric(d)?parseFloat(d):j.test(d)?f.parseJSON(d):d}catch(g){}f.data(a,c,d)}else d=b}return d}function h(a){var b=g[a]={},c,d;a=a.split(/\s+/);for(c=0,d=a.length;c)[^>]*$|#([\w\-]*)$)/,j=/\S/,k=/^\s+/,l=/\s+$/,m=/^<(\w+)\s*\/?>(?:<\/\1>)?$/,n=/^[\],:{}\s]*$/,o=/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,p=/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,q=/(?:^|:|,)(?:\s*\[)+/g,r=/(webkit)[ \/]([\w.]+)/,s=/(opera)(?:.*version)?[ \/]([\w.]+)/,t=/(msie) ([\w.]+)/,u=/(mozilla)(?:.*? rv:([\w.]+))?/,v=/-([a-z]|[0-9])/ig,w=/^-ms-/,x=function(a,b){return(b+"").toUpperCase()},y=d.userAgent,z,A,B,C=Object.prototype.toString,D=Object.prototype.hasOwnProperty,E=Array.prototype.push,F=Array.prototype.slice,G=String.prototype.trim,H=Array.prototype.indexOf,I={};e.fn=e.prototype={constructor:e,init:function(a,d,f){var g,h,j,k;if(!a)return this;if(a.nodeType){this.context=this[0]=a,this.length=1;return this}if(a==="body"&&!d&&c.body){this.context=c,this[0]=c.body,this.selector=a,this.length=1;return this}if(typeof a=="string"){a.charAt(0)!=="<"||a.charAt(a.length-1)!==">"||a.length<3?g=i.exec(a):g=[null,a,null];if(g&&(g[1]||!d)){if(g[1]){d=d instanceof e?d[0]:d,k=d?d.ownerDocument||d:c,j=m.exec(a),j?e.isPlainObject(d)?(a=[c.createElement(j[1])],e.fn.attr.call(a,d,!0)):a=[k.createElement(j[1])]:(j=e.buildFragment([g[1]],[k]),a=(j.cacheable?e.clone(j.fragment):j.fragment).childNodes);return e.merge(this,a)}h=c.getElementById(g[2]);if(h&&h.parentNode){if(h.id!==g[2])return f.find(a);this.length=1,this[0]=h}this.context=c,this.selector=a;return this}return!d||d.jquery?(d||f).find(a):this.constructor(d).find(a)}if(e.isFunction(a))return f.ready(a);a.selector!==b&&(this.selector=a.selector,this.context=a.context);return e.makeArray(a,this)},selector:"",jquery:"1.7.1",length:0,size:function(){return this.length},toArray:function(){return F.call(this,0)},get:function(a){return a==null?this.toArray():a<0?this[this.length+a]:this[a]},pushStack:function(a,b,c){var d=this.constructor();e.isArray(a)?E.apply(d,a):e.merge(d,a),d.prevObject=this,d.context=this.context,b==="find"?d.selector=this.selector+(this.selector?" ":"")+c:b&&(d.selector=this.selector+"."+b+"("+c+")");return d},each:function(a,b){return e.each(this,a,b)},ready:function(a){e.bindReady(),A.add(a);return this},eq:function(a){a=+a;return a===-1?this.slice(a):this.slice(a,a+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(F.apply(this,arguments),"slice",F.call(arguments).join(","))},map:function(a){return this.pushStack(e.map(this,function(b,c){return a.call(b,c,b)}))},end:function(){return this.prevObject||this.constructor(null)},push:E,sort:[].sort,splice:[].splice},e.fn.init.prototype=e.fn,e.extend=e.fn.extend=function(){var a,c,d,f,g,h,i=arguments[0]||{},j=1,k=arguments.length,l=!1;typeof i=="boolean"&&(l=i,i=arguments[1]||{},j=2),typeof i!="object"&&!e.isFunction(i)&&(i={}),k===j&&(i=this,--j);for(;j0)return;A.fireWith(c,[e]),e.fn.trigger&&e(c).trigger("ready").off("ready")}},bindReady:function(){if(!A){A=e.Callbacks("once memory");if(c.readyState==="complete")return setTimeout(e.ready,1);if(c.addEventListener)c.addEventListener("DOMContentLoaded",B,!1),a.addEventListener("load",e.ready,!1);else if(c.attachEvent){c.attachEvent("onreadystatechange",B),a.attachEvent("onload",e.ready);var b=!1;try{b=a.frameElement==null}catch(d){}c.documentElement.doScroll&&b&&J()}}},isFunction:function(a){return e.type(a)==="function"},isArray:Array.isArray||function(a){return e.type(a)==="array"},isWindow:function(a){return a&&typeof a=="object"&&"setInterval"in a},isNumeric:function(a){return!isNaN(parseFloat(a))&&isFinite(a)},type:function(a){return a==null?String(a):I[C.call(a)]||"object"},isPlainObject:function(a){if(!a||e.type(a)!=="object"||a.nodeType||e.isWindow(a))return!1;try{if(a.constructor&&!D.call(a,"constructor")&&!D.call(a.constructor.prototype,"isPrototypeOf"))return!1}catch(c){return!1}var d;for(d in a);return d===b||D.call(a,d)},isEmptyObject:function(a){for(var b in a)return!1;return!0},error:function(a){throw new Error(a)},parseJSON:function(b){if(typeof b!="string"||!b)return null;b=e.trim(b);if(a.JSON&&a.JSON.parse)return a.JSON.parse(b);if(n.test(b.replace(o,"@").replace(p,"]").replace(q,"")))return(new Function("return "+b))();e.error("Invalid JSON: "+b)},parseXML:function(c){var d,f;try{a.DOMParser?(f=new DOMParser,d=f.parseFromString(c,"text/xml")):(d=new ActiveXObject("Microsoft.XMLDOM"),d.async="false",d.loadXML(c))}catch(g){d=b}(!d||!d.documentElement||d.getElementsByTagName("parsererror").length)&&e.error("Invalid XML: "+c);return d},noop:function(){},globalEval:function(b){b&&j.test(b)&&(a.execScript||function(b){a.eval.call(a,b)})(b)},camelCase:function(a){return a.replace(w,"ms-").replace(v,x)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toUpperCase()===b.toUpperCase()},each:function(a,c,d){var f,g=0,h=a.length,i=h===b||e.isFunction(a);if(d){if(i){for(f in a)if(c.apply(a[f],d)===!1)break}else for(;g0&&a[0]&&a[j-1]||j===0||e.isArray(a));if(k)for(;i1?i.call(arguments,0):b,j.notifyWith(k,e)}}function l(a){return function(c){b[a]=arguments.length>1?i.call(arguments,0):c,--g||j.resolveWith(j,b)}}var b=i.call(arguments,0),c=0,d=b.length,e=Array(d),g=d,h=d,j=d<=1&&a&&f.isFunction(a.promise)?a:f.Deferred(),k=j.promise();if(d>1){for(;c
    a",d=q.getElementsByTagName("*"),e=q.getElementsByTagName("a")[0];if(!d||!d.length||!e)return{};g=c.createElement("select"),h=g.appendChild(c.createElement("option")),i=q.getElementsByTagName("input")[0],b={leadingWhitespace:q.firstChild.nodeType===3,tbody:!q.getElementsByTagName("tbody").length,htmlSerialize:!!q.getElementsByTagName("link").length,style:/top/.test(e.getAttribute("style")),hrefNormalized:e.getAttribute("href")==="/a",opacity:/^0.55/.test(e.style.opacity),cssFloat:!!e.style.cssFloat,checkOn:i.value==="on",optSelected:h.selected,getSetAttribute:q.className!=="t",enctype:!!c.createElement("form").enctype,html5Clone:c.createElement("nav").cloneNode(!0).outerHTML!=="<:nav>",submitBubbles:!0,changeBubbles:!0,focusinBubbles:!1,deleteExpando:!0,noCloneEvent:!0,inlineBlockNeedsLayout:!1,shrinkWrapBlocks:!1,reliableMarginRight:!0},i.checked=!0,b.noCloneChecked=i.cloneNode(!0).checked,g.disabled=!0,b.optDisabled=!h.disabled;try{delete q.test}catch(s){b.deleteExpando=!1}!q.addEventListener&&q.attachEvent&&q.fireEvent&&(q.attachEvent("onclick",function(){b.noCloneEvent=!1}),q.cloneNode(!0).fireEvent("onclick")),i=c.createElement("input"),i.value="t",i.setAttribute("type","radio"),b.radioValue=i.value==="t",i.setAttribute("checked","checked"),q.appendChild(i),k=c.createDocumentFragment(),k.appendChild(q.lastChild),b.checkClone=k.cloneNode(!0).cloneNode(!0).lastChild.checked,b.appendChecked=i.checked,k.removeChild(i),k.appendChild(q),q.innerHTML="",a.getComputedStyle&&(j=c.createElement("div"),j.style.width="0",j.style.marginRight="0",q.style.width="2px",q.appendChild(j),b.reliableMarginRight=(parseInt((a.getComputedStyle(j,null)||{marginRight:0}).marginRight,10)||0)===0);if(q.attachEvent)for(o in{submit:1,change:1,focusin:1})n="on"+o,p=n in q,p||(q.setAttribute(n,"return;"),p=typeof q[n]=="function"),b[o+"Bubbles"]=p;k.removeChild(q),k=g=h=j=q=i=null,f(function(){var a,d,e,g,h,i,j,k,m,n,o,r=c.getElementsByTagName("body")[0];!r||(j=1,k="position:absolute;top:0;left:0;width:1px;height:1px;margin:0;",m="visibility:hidden;border:0;",n="style='"+k+"border:5px solid #000;padding:0;'",o="
    "+""+"
    ",a=c.createElement("div"),a.style.cssText=m+"width:0;height:0;position:static;top:0;margin-top:"+j+"px",r.insertBefore(a,r.firstChild),q=c.createElement("div"),a.appendChild(q),q.innerHTML="
    t
    ",l=q.getElementsByTagName("td"),p=l[0].offsetHeight===0,l[0].style.display="",l[1].style.display="none",b.reliableHiddenOffsets=p&&l[0].offsetHeight===0,q.innerHTML="",q.style.width=q.style.paddingLeft="1px",f.boxModel=b.boxModel=q.offsetWidth===2,typeof q.style.zoom!="undefined"&&(q.style.display="inline",q.style.zoom=1,b.inlineBlockNeedsLayout=q.offsetWidth===2,q.style.display="",q.innerHTML="
    ",b.shrinkWrapBlocks=q.offsetWidth!==2),q.style.cssText=k+m,q.innerHTML=o,d=q.firstChild,e=d.firstChild,h=d.nextSibling.firstChild.firstChild,i={doesNotAddBorder:e.offsetTop!==5,doesAddBorderForTableAndCells:h.offsetTop===5},e.style.position="fixed",e.style.top="20px",i.fixedPosition=e.offsetTop===20||e.offsetTop===15,e.style.position=e.style.top="",d.style.overflow="hidden",d.style.position="relative",i.subtractsBorderForOverflowNotVisible=e.offsetTop===-5,i.doesNotIncludeMarginInBodyOffset=r.offsetTop!==j,r.removeChild(a),q=a=null,f.extend(b,i))});return b}();var j=/^(?:\{.*\}|\[.*\])$/,k=/([A-Z])/g;f.extend({cache:{},uuid:0,expando:"jQuery"+(f.fn.jquery+Math.random()).replace(/\D/g,""),noData:{embed:!0,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:!0},hasData:function(a){a=a.nodeType?f.cache[a[f.expando]]:a[f.expando];return!!a&&!m(a)},data:function(a,c,d,e){if(!!f.acceptData(a)){var g,h,i,j=f.expando,k=typeof c=="string",l=a.nodeType,m=l?f.cache:a,n=l?a[j]:a[j]&&j,o=c==="events";if((!n||!m[n]||!o&&!e&&!m[n].data)&&k&&d===b)return;n||(l?a[j]=n=++f.uuid:n=j),m[n]||(m[n]={},l||(m[n].toJSON=f.noop));if(typeof c=="object"||typeof c=="function")e?m[n]=f.extend(m[n],c):m[n].data=f.extend(m[n].data,c);g=h=m[n],e||(h.data||(h.data={}),h=h.data),d!==b&&(h[f.camelCase(c)]=d);if(o&&!h[c])return g.events;k?(i=h[c],i==null&&(i=h[f.camelCase(c)])):i=h;return i}},removeData:function(a,b,c){if(!!f.acceptData(a)){var d,e,g,h=f.expando,i=a.nodeType,j=i?f.cache:a,k=i?a[h]:h;if(!j[k])return;if(b){d=c?j[k]:j[k].data;if(d){f.isArray(b)||(b in d?b=[b]:(b=f.camelCase(b),b in d?b=[b]:b=b.split(" ")));for(e=0,g=b.length;e-1)return!0;return!1},val:function(a){var c,d,e,g=this[0];{if(!!arguments.length){e=f.isFunction(a);return this.each(function(d){var g=f(this),h;if(this.nodeType===1){e?h=a.call(this,d,g.val()):h=a,h==null?h="":typeof h=="number"?h+="":f.isArray(h)&&(h=f.map(h,function(a){return a==null?"":a+""})),c=f.valHooks[this.nodeName.toLowerCase()]||f.valHooks[this.type];if(!c||!("set"in c)||c.set(this,h,"value")===b)this.value=h}})}if(g){c=f.valHooks[g.nodeName.toLowerCase()]||f.valHooks[g.type];if(c&&"get"in c&&(d=c.get(g,"value"))!==b)return d;d=g.value;return typeof d=="string"?d.replace(q,""):d==null?"":d}}}}),f.extend({valHooks:{option:{get:function(a){var b=a.attributes.value;return!b||b.specified?a.value:a.text}},select:{get:function(a){var b,c,d,e,g=a.selectedIndex,h=[],i=a.options,j=a.type==="select-one";if(g<0)return null;c=j?g:0,d=j?g+1:i.length;for(;c=0}),c.length||(a.selectedIndex=-1);return c}}},attrFn:{val:!0,css:!0,html:!0,text:!0,data:!0,width:!0,height:!0,offset:!0},attr:function(a,c,d,e){var g,h,i,j=a.nodeType;if(!!a&&j!==3&&j!==8&&j!==2){if(e&&c in f.attrFn)return f(a)[c](d);if(typeof a.getAttribute=="undefined")return f.prop(a,c,d);i=j!==1||!f.isXMLDoc(a),i&&(c=c.toLowerCase(),h=f.attrHooks[c]||(u.test(c)?x:w));if(d!==b){if(d===null){f.removeAttr(a,c);return}if(h&&"set"in h&&i&&(g=h.set(a,d,c))!==b)return g;a.setAttribute(c,""+d);return d}if(h&&"get"in h&&i&&(g=h.get(a,c))!==null)return g;g=a.getAttribute(c);return g===null?b:g}},removeAttr:function(a,b){var c,d,e,g,h=0;if(b&&a.nodeType===1){d=b.toLowerCase().split(p),g=d.length;for(;h=0}})});var z=/^(?:textarea|input|select)$/i,A=/^([^\.]*)?(?:\.(.+))?$/,B=/\bhover(\.\S+)?\b/,C=/^key/,D=/^(?:mouse|contextmenu)|click/,E=/^(?:focusinfocus|focusoutblur)$/,F=/^(\w*)(?:#([\w\-]+))?(?:\.([\w\-]+))?$/,G=function(a){var b=F.exec(a);b&&(b[1]=(b[1]||"").toLowerCase(),b[3]=b[3]&&new RegExp("(?:^|\\s)"+b[3]+"(?:\\s|$)"));return b},H=function(a,b){var c=a.attributes||{};return(!b[1]||a.nodeName.toLowerCase()===b[1])&&(!b[2]||(c.id||{}).value===b[2])&&(!b[3]||b[3].test((c["class"]||{}).value))},I=function(a){return f.event.special.hover?a:a.replace(B,"mouseenter$1 mouseleave$1")}; -f.event={add:function(a,c,d,e,g){var h,i,j,k,l,m,n,o,p,q,r,s;if(!(a.nodeType===3||a.nodeType===8||!c||!d||!(h=f._data(a)))){d.handler&&(p=d,d=p.handler),d.guid||(d.guid=f.guid++),j=h.events,j||(h.events=j={}),i=h.handle,i||(h.handle=i=function(a){return typeof f!="undefined"&&(!a||f.event.triggered!==a.type)?f.event.dispatch.apply(i.elem,arguments):b},i.elem=a),c=f.trim(I(c)).split(" ");for(k=0;k=0&&(h=h.slice(0,-1),k=!0),h.indexOf(".")>=0&&(i=h.split("."),h=i.shift(),i.sort());if((!e||f.event.customEvent[h])&&!f.event.global[h])return;c=typeof c=="object"?c[f.expando]?c:new f.Event(h,c):new f.Event(h),c.type=h,c.isTrigger=!0,c.exclusive=k,c.namespace=i.join("."),c.namespace_re=c.namespace?new RegExp("(^|\\.)"+i.join("\\.(?:.*\\.)?")+"(\\.|$)"):null,o=h.indexOf(":")<0?"on"+h:"";if(!e){j=f.cache;for(l in j)j[l].events&&j[l].events[h]&&f.event.trigger(c,d,j[l].handle.elem,!0);return}c.result=b,c.target||(c.target=e),d=d!=null?f.makeArray(d):[],d.unshift(c),p=f.event.special[h]||{};if(p.trigger&&p.trigger.apply(e,d)===!1)return;r=[[e,p.bindType||h]];if(!g&&!p.noBubble&&!f.isWindow(e)){s=p.delegateType||h,m=E.test(s+h)?e:e.parentNode,n=null;for(;m;m=m.parentNode)r.push([m,s]),n=m;n&&n===e.ownerDocument&&r.push([n.defaultView||n.parentWindow||a,s])}for(l=0;le&&i.push({elem:this,matches:d.slice(e)});for(j=0;j0?this.on(b,null,a,c):this.trigger(b)},f.attrFn&&(f.attrFn[b]=!0),C.test(b)&&(f.event.fixHooks[b]=f.event.keyHooks),D.test(b)&&(f.event.fixHooks[b]=f.event.mouseHooks)}),function(){function x(a,b,c,e,f,g){for(var h=0,i=e.length;h0){k=j;break}}j=j[a]}e[h]=k}}}function w(a,b,c,e,f,g){for(var h=0,i=e.length;h+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,d="sizcache"+(Math.random()+"").replace(".",""),e=0,g=Object.prototype.toString,h=!1,i=!0,j=/\\/g,k=/\r\n/g,l=/\W/;[0,0].sort(function(){i=!1;return 0});var m=function(b,d,e,f){e=e||[],d=d||c;var h=d;if(d.nodeType!==1&&d.nodeType!==9)return[];if(!b||typeof b!="string")return e;var i,j,k,l,n,q,r,t,u=!0,v=m.isXML(d),w=[],x=b;do{a.exec(""),i=a.exec(x);if(i){x=i[3],w.push(i[1]);if(i[2]){l=i[3];break}}}while(i);if(w.length>1&&p.exec(b))if(w.length===2&&o.relative[w[0]])j=y(w[0]+w[1],d,f);else{j=o.relative[w[0]]?[d]:m(w.shift(),d);while(w.length)b=w.shift(),o.relative[b]&&(b+=w.shift()),j=y(b,j,f)}else{!f&&w.length>1&&d.nodeType===9&&!v&&o.match.ID.test(w[0])&&!o.match.ID.test(w[w.length-1])&&(n=m.find(w.shift(),d,v),d=n.expr?m.filter(n.expr,n.set)[0]:n.set[0]);if(d){n=f?{expr:w.pop(),set:s(f)}:m.find(w.pop(),w.length===1&&(w[0]==="~"||w[0]==="+")&&d.parentNode?d.parentNode:d,v),j=n.expr?m.filter(n.expr,n.set):n.set,w.length>0?k=s(j):u=!1;while(w.length)q=w.pop(),r=q,o.relative[q]?r=w.pop():q="",r==null&&(r=d),o.relative[q](k,r,v)}else k=w=[]}k||(k=j),k||m.error(q||b);if(g.call(k)==="[object Array]")if(!u)e.push.apply(e,k);else if(d&&d.nodeType===1)for(t=0;k[t]!=null;t++)k[t]&&(k[t]===!0||k[t].nodeType===1&&m.contains(d,k[t]))&&e.push(j[t]);else for(t=0;k[t]!=null;t++)k[t]&&k[t].nodeType===1&&e.push(j[t]);else s(k,e);l&&(m(l,h,e,f),m.uniqueSort(e));return e};m.uniqueSort=function(a){if(u){h=i,a.sort(u);if(h)for(var b=1;b0},m.find=function(a,b,c){var d,e,f,g,h,i;if(!a)return[];for(e=0,f=o.order.length;e":function(a,b){var c,d=typeof b=="string",e=0,f=a.length;if(d&&!l.test(b)){b=b.toLowerCase();for(;e=0)?c||d.push(h):c&&(b[g]=!1));return!1},ID:function(a){return a[1].replace(j,"")},TAG:function(a,b){return a[1].replace(j,"").toLowerCase()},CHILD:function(a){if(a[1]==="nth"){a[2]||m.error(a[0]),a[2]=a[2].replace(/^\+|\s*/g,"");var b=/(-?)(\d*)(?:n([+\-]?\d*))?/.exec(a[2]==="even"&&"2n"||a[2]==="odd"&&"2n+1"||!/\D/.test(a[2])&&"0n+"+a[2]||a[2]);a[2]=b[1]+(b[2]||1)-0,a[3]=b[3]-0}else a[2]&&m.error(a[0]);a[0]=e++;return a},ATTR:function(a,b,c,d,e,f){var g=a[1]=a[1].replace(j,"");!f&&o.attrMap[g]&&(a[1]=o.attrMap[g]),a[4]=(a[4]||a[5]||"").replace(j,""),a[2]==="~="&&(a[4]=" "+a[4]+" ");return a},PSEUDO:function(b,c,d,e,f){if(b[1]==="not")if((a.exec(b[3])||"").length>1||/^\w/.test(b[3]))b[3]=m(b[3],null,null,c);else{var g=m.filter(b[3],c,d,!0^f);d||e.push.apply(e,g);return!1}else if(o.match.POS.test(b[0])||o.match.CHILD.test(b[0]))return!0;return b},POS:function(a){a.unshift(!0);return a}},filters:{enabled:function(a){return a.disabled===!1&&a.type!=="hidden"},disabled:function(a){return a.disabled===!0},checked:function(a){return a.checked===!0},selected:function(a){a.parentNode&&a.parentNode.selectedIndex;return a.selected===!0},parent:function(a){return!!a.firstChild},empty:function(a){return!a.firstChild},has:function(a,b,c){return!!m(c[3],a).length},header:function(a){return/h\d/i.test(a.nodeName)},text:function(a){var b=a.getAttribute("type"),c=a.type;return a.nodeName.toLowerCase()==="input"&&"text"===c&&(b===c||b===null)},radio:function(a){return a.nodeName.toLowerCase()==="input"&&"radio"===a.type},checkbox:function(a){return a.nodeName.toLowerCase()==="input"&&"checkbox"===a.type},file:function(a){return a.nodeName.toLowerCase()==="input"&&"file"===a.type},password:function(a){return a.nodeName.toLowerCase()==="input"&&"password"===a.type},submit:function(a){var b=a.nodeName.toLowerCase();return(b==="input"||b==="button")&&"submit"===a.type},image:function(a){return a.nodeName.toLowerCase()==="input"&&"image"===a.type},reset:function(a){var b=a.nodeName.toLowerCase();return(b==="input"||b==="button")&&"reset"===a.type},button:function(a){var b=a.nodeName.toLowerCase();return b==="input"&&"button"===a.type||b==="button"},input:function(a){return/input|select|textarea|button/i.test(a.nodeName)},focus:function(a){return a===a.ownerDocument.activeElement}},setFilters:{first:function(a,b){return b===0},last:function(a,b,c,d){return b===d.length-1},even:function(a,b){return b%2===0},odd:function(a,b){return b%2===1},lt:function(a,b,c){return bc[3]-0},nth:function(a,b,c){return c[3]-0===b},eq:function(a,b,c){return c[3]-0===b}},filter:{PSEUDO:function(a,b,c,d){var e=b[1],f=o.filters[e];if(f)return f(a,c,b,d);if(e==="contains")return(a.textContent||a.innerText||n([a])||"").indexOf(b[3])>=0;if(e==="not"){var g=b[3];for(var h=0,i=g.length;h=0}},ID:function(a,b){return a.nodeType===1&&a.getAttribute("id")===b},TAG:function(a,b){return b==="*"&&a.nodeType===1||!!a.nodeName&&a.nodeName.toLowerCase()===b},CLASS:function(a,b){return(" "+(a.className||a.getAttribute("class"))+" ").indexOf(b)>-1},ATTR:function(a,b){var c=b[1],d=m.attr?m.attr(a,c):o.attrHandle[c]?o.attrHandle[c](a):a[c]!=null?a[c]:a.getAttribute(c),e=d+"",f=b[2],g=b[4];return d==null?f==="!=":!f&&m.attr?d!=null:f==="="?e===g:f==="*="?e.indexOf(g)>=0:f==="~="?(" "+e+" ").indexOf(g)>=0:g?f==="!="?e!==g:f==="^="?e.indexOf(g)===0:f==="$="?e.substr(e.length-g.length)===g:f==="|="?e===g||e.substr(0,g.length+1)===g+"-":!1:e&&d!==!1},POS:function(a,b,c,d){var e=b[2],f=o.setFilters[e];if(f)return f(a,c,b,d)}}},p=o.match.POS,q=function(a,b){return"\\"+(b-0+1)};for(var r in o.match)o.match[r]=new RegExp(o.match[r].source+/(?![^\[]*\])(?![^\(]*\))/.source),o.leftMatch[r]=new RegExp(/(^(?:.|\r|\n)*?)/.source+o.match[r].source.replace(/\\(\d+)/g,q));var s=function(a,b){a=Array.prototype.slice.call(a,0);if(b){b.push.apply(b,a);return b}return a};try{Array.prototype.slice.call(c.documentElement.childNodes,0)[0].nodeType}catch(t){s=function(a,b){var c=0,d=b||[];if(g.call(a)==="[object Array]")Array.prototype.push.apply(d,a);else if(typeof a.length=="number")for(var e=a.length;c",e.insertBefore(a,e.firstChild),c.getElementById(d)&&(o.find.ID=function(a,c,d){if(typeof c.getElementById!="undefined"&&!d){var e=c.getElementById(a[1]);return e?e.id===a[1]||typeof e.getAttributeNode!="undefined"&&e.getAttributeNode("id").nodeValue===a[1]?[e]:b:[]}},o.filter.ID=function(a,b){var c=typeof a.getAttributeNode!="undefined"&&a.getAttributeNode("id");return a.nodeType===1&&c&&c.nodeValue===b}),e.removeChild(a),e=a=null}(),function(){var a=c.createElement("div");a.appendChild(c.createComment("")),a.getElementsByTagName("*").length>0&&(o.find.TAG=function(a,b){var c=b.getElementsByTagName(a[1]);if(a[1]==="*"){var d=[];for(var e=0;c[e];e++)c[e].nodeType===1&&d.push(c[e]);c=d}return c}),a.innerHTML="",a.firstChild&&typeof a.firstChild.getAttribute!="undefined"&&a.firstChild.getAttribute("href")!=="#"&&(o.attrHandle.href=function(a){return a.getAttribute("href",2)}),a=null}(),c.querySelectorAll&&function(){var a=m,b=c.createElement("div"),d="__sizzle__";b.innerHTML="

    ";if(!b.querySelectorAll||b.querySelectorAll(".TEST").length!==0){m=function(b,e,f,g){e=e||c;if(!g&&!m.isXML(e)){var h=/^(\w+$)|^\.([\w\-]+$)|^#([\w\-]+$)/.exec(b);if(h&&(e.nodeType===1||e.nodeType===9)){if(h[1])return s(e.getElementsByTagName(b),f);if(h[2]&&o.find.CLASS&&e.getElementsByClassName)return s(e.getElementsByClassName(h[2]),f)}if(e.nodeType===9){if(b==="body"&&e.body)return s([e.body],f);if(h&&h[3]){var i=e.getElementById(h[3]);if(!i||!i.parentNode)return s([],f);if(i.id===h[3])return s([i],f)}try{return s(e.querySelectorAll(b),f)}catch(j){}}else if(e.nodeType===1&&e.nodeName.toLowerCase()!=="object"){var k=e,l=e.getAttribute("id"),n=l||d,p=e.parentNode,q=/^\s*[+~]/.test(b);l?n=n.replace(/'/g,"\\$&"):e.setAttribute("id",n),q&&p&&(e=e.parentNode);try{if(!q||p)return s(e.querySelectorAll("[id='"+n+"'] "+b),f)}catch(r){}finally{l||k.removeAttribute("id")}}}return a(b,e,f,g)};for(var e in a)m[e]=a[e];b=null}}(),function(){var a=c.documentElement,b=a.matchesSelector||a.mozMatchesSelector||a.webkitMatchesSelector||a.msMatchesSelector;if(b){var d=!b.call(c.createElement("div"),"div"),e=!1;try{b.call(c.documentElement,"[test!='']:sizzle")}catch(f){e=!0}m.matchesSelector=function(a,c){c=c.replace(/\=\s*([^'"\]]*)\s*\]/g,"='$1']");if(!m.isXML(a))try{if(e||!o.match.PSEUDO.test(c)&&!/!=/.test(c)){var f=b.call(a,c);if(f||!d||a.document&&a.document.nodeType!==11)return f}}catch(g){}return m(c,null,null,[a]).length>0}}}(),function(){var a=c.createElement("div");a.innerHTML="
    ";if(!!a.getElementsByClassName&&a.getElementsByClassName("e").length!==0){a.lastChild.className="e";if(a.getElementsByClassName("e").length===1)return;o.order.splice(1,0,"CLASS"),o.find.CLASS=function(a,b,c){if(typeof b.getElementsByClassName!="undefined"&&!c)return b.getElementsByClassName(a[1])},a=null}}(),c.documentElement.contains?m.contains=function(a,b){return a!==b&&(a.contains?a.contains(b):!0)}:c.documentElement.compareDocumentPosition?m.contains=function(a,b){return!!(a.compareDocumentPosition(b)&16)}:m.contains=function(){return!1},m.isXML=function(a){var b=(a?a.ownerDocument||a:0).documentElement;return b?b.nodeName!=="HTML":!1};var y=function(a,b,c){var d,e=[],f="",g=b.nodeType?[b]:b;while(d=o.match.PSEUDO.exec(a))f+=d[0],a=a.replace(o.match.PSEUDO,"");a=o.relative[a]?a+"*":a;for(var h=0,i=g.length;h0)for(h=g;h=0:f.filter(a,this).length>0:this.filter(a).length>0)},closest:function(a,b){var c=[],d,e,g=this[0];if(f.isArray(a)){var h=1;while(g&&g.ownerDocument&&g!==b){for(d=0;d-1:f.find.matchesSelector(g,a)){c.push(g);break}g=g.parentNode;if(!g||!g.ownerDocument||g===b||g.nodeType===11)break}}c=c.length>1?f.unique(c):c;return this.pushStack(c,"closest",a)},index:function(a){if(!a)return this[0]&&this[0].parentNode?this.prevAll().length:-1;if(typeof a=="string")return f.inArray(this[0],f(a));return f.inArray(a.jquery?a[0]:a,this)},add:function(a,b){var c=typeof a=="string"?f(a,b):f.makeArray(a&&a.nodeType?[a]:a),d=f.merge(this.get(),c);return this.pushStack(S(c[0])||S(d[0])?d:f.unique(d))},andSelf:function(){return this.add(this.prevObject)}}),f.each({parent:function(a){var b=a.parentNode;return b&&b.nodeType!==11?b:null},parents:function(a){return f.dir(a,"parentNode")},parentsUntil:function(a,b,c){return f.dir(a,"parentNode",c)},next:function(a){return f.nth(a,2,"nextSibling")},prev:function(a){return f.nth(a,2,"previousSibling")},nextAll:function(a){return f.dir(a,"nextSibling")},prevAll:function(a){return f.dir(a,"previousSibling")},nextUntil:function(a,b,c){return f.dir(a,"nextSibling",c)},prevUntil:function(a,b,c){return f.dir(a,"previousSibling",c)},siblings:function(a){return f.sibling(a.parentNode.firstChild,a)},children:function(a){return f.sibling(a.firstChild)},contents:function(a){return f.nodeName(a,"iframe")?a.contentDocument||a.contentWindow.document:f.makeArray(a.childNodes)}},function(a,b){f.fn[a]=function(c,d){var e=f.map(this,b,c);L.test(a)||(d=c),d&&typeof d=="string"&&(e=f.filter(d,e)),e=this.length>1&&!R[a]?f.unique(e):e,(this.length>1||N.test(d))&&M.test(a)&&(e=e.reverse());return this.pushStack(e,a,P.call(arguments).join(","))}}),f.extend({filter:function(a,b,c){c&&(a=":not("+a+")");return b.length===1?f.find.matchesSelector(b[0],a)?[b[0]]:[]:f.find.matches(a,b)},dir:function(a,c,d){var e=[],g=a[c];while(g&&g.nodeType!==9&&(d===b||g.nodeType!==1||!f(g).is(d)))g.nodeType===1&&e.push(g),g=g[c];return e},nth:function(a,b,c,d){b=b||1;var e=0;for(;a;a=a[c])if(a.nodeType===1&&++e===b)break;return a},sibling:function(a,b){var c=[];for(;a;a=a.nextSibling)a.nodeType===1&&a!==b&&c.push(a);return c}});var V="abbr|article|aside|audio|canvas|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",W=/ jQuery\d+="(?:\d+|null)"/g,X=/^\s+/,Y=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/ig,Z=/<([\w:]+)/,$=/",""],legend:[1,"
    ","
    "],thead:[1,"","
    "],tr:[2,"","
    "],td:[3,"","
    "],col:[2,"","
    "],area:[1,"",""],_default:[0,"",""]},bh=U(c);bg.optgroup=bg.option,bg.tbody=bg.tfoot=bg.colgroup=bg.caption=bg.thead,bg.th=bg.td,f.support.htmlSerialize||(bg._default=[1,"div
    ","
    "]),f.fn.extend({text:function(a){if(f.isFunction(a))return this.each(function(b){var c=f(this);c.text(a.call(this,b,c.text()))});if(typeof a!="object"&&a!==b)return this.empty().append((this[0]&&this[0].ownerDocument||c).createTextNode(a));return f.text(this)},wrapAll:function(a){if(f.isFunction(a))return this.each(function(b){f(this).wrapAll(a.call(this,b))});if(this[0]){var b=f(a,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&b.insertBefore(this[0]),b.map(function(){var a=this;while(a.firstChild&&a.firstChild.nodeType===1)a=a.firstChild;return a}).append(this)}return this},wrapInner:function(a){if(f.isFunction(a))return this.each(function(b){f(this).wrapInner(a.call(this,b))});return this.each(function(){var b=f(this),c=b.contents();c.length?c.wrapAll(a):b.append(a)})},wrap:function(a){var b=f.isFunction(a);return this.each(function(c){f(this).wrapAll(b?a.call(this,c):a)})},unwrap:function(){return this.parent().each(function(){f.nodeName(this,"body")||f(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,!0,function(a){this.nodeType===1&&this.appendChild(a)})},prepend:function(){return this.domManip(arguments,!0,function(a){this.nodeType===1&&this.insertBefore(a,this.firstChild)})},before:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,!1,function(a){this.parentNode.insertBefore(a,this)});if(arguments.length){var a=f.clean(arguments);a.push.apply(a,this.toArray());return this.pushStack(a,"before",arguments)}},after:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,!1,function(a){this.parentNode.insertBefore(a,this.nextSibling)});if(arguments.length){var a=this.pushStack(this,"after",arguments);a.push.apply(a,f.clean(arguments));return a}},remove:function(a,b){for(var c=0,d;(d=this[c])!=null;c++)if(!a||f.filter(a,[d]).length)!b&&d.nodeType===1&&(f.cleanData(d.getElementsByTagName("*")),f.cleanData([d])),d.parentNode&&d.parentNode.removeChild(d);return this},empty:function() -{for(var a=0,b;(b=this[a])!=null;a++){b.nodeType===1&&f.cleanData(b.getElementsByTagName("*"));while(b.firstChild)b.removeChild(b.firstChild)}return this},clone:function(a,b){a=a==null?!1:a,b=b==null?a:b;return this.map(function(){return f.clone(this,a,b)})},html:function(a){if(a===b)return this[0]&&this[0].nodeType===1?this[0].innerHTML.replace(W,""):null;if(typeof a=="string"&&!ba.test(a)&&(f.support.leadingWhitespace||!X.test(a))&&!bg[(Z.exec(a)||["",""])[1].toLowerCase()]){a=a.replace(Y,"<$1>");try{for(var c=0,d=this.length;c1&&l0?this.clone(!0):this).get();f(e[h])[b](j),d=d.concat(j)}return this.pushStack(d,a,e.selector)}}),f.extend({clone:function(a,b,c){var d,e,g,h=f.support.html5Clone||!bc.test("<"+a.nodeName)?a.cloneNode(!0):bo(a);if((!f.support.noCloneEvent||!f.support.noCloneChecked)&&(a.nodeType===1||a.nodeType===11)&&!f.isXMLDoc(a)){bk(a,h),d=bl(a),e=bl(h);for(g=0;d[g];++g)e[g]&&bk(d[g],e[g])}if(b){bj(a,h);if(c){d=bl(a),e=bl(h);for(g=0;d[g];++g)bj(d[g],e[g])}}d=e=null;return h},clean:function(a,b,d,e){var g;b=b||c,typeof b.createElement=="undefined"&&(b=b.ownerDocument||b[0]&&b[0].ownerDocument||c);var h=[],i;for(var j=0,k;(k=a[j])!=null;j++){typeof k=="number"&&(k+="");if(!k)continue;if(typeof k=="string")if(!_.test(k))k=b.createTextNode(k);else{k=k.replace(Y,"<$1>");var l=(Z.exec(k)||["",""])[1].toLowerCase(),m=bg[l]||bg._default,n=m[0],o=b.createElement("div");b===c?bh.appendChild(o):U(b).appendChild(o),o.innerHTML=m[1]+k+m[2];while(n--)o=o.lastChild;if(!f.support.tbody){var p=$.test(k),q=l==="table"&&!p?o.firstChild&&o.firstChild.childNodes:m[1]===""&&!p?o.childNodes:[];for(i=q.length-1;i>=0;--i)f.nodeName(q[i],"tbody")&&!q[i].childNodes.length&&q[i].parentNode.removeChild(q[i])}!f.support.leadingWhitespace&&X.test(k)&&o.insertBefore(b.createTextNode(X.exec(k)[0]),o.firstChild),k=o.childNodes}var r;if(!f.support.appendChecked)if(k[0]&&typeof (r=k.length)=="number")for(i=0;i=0)return b+"px"}}}),f.support.opacity||(f.cssHooks.opacity={get:function(a,b){return br.test((b&&a.currentStyle?a.currentStyle.filter:a.style.filter)||"")?parseFloat(RegExp.$1)/100+"":b?"1":""},set:function(a,b){var c=a.style,d=a.currentStyle,e=f.isNumeric(b)?"alpha(opacity="+b*100+")":"",g=d&&d.filter||c.filter||"";c.zoom=1;if(b>=1&&f.trim(g.replace(bq,""))===""){c.removeAttribute("filter");if(d&&!d.filter)return}c.filter=bq.test(g)?g.replace(bq,e):g+" "+e}}),f(function(){f.support.reliableMarginRight||(f.cssHooks.marginRight={get:function(a,b){var c;f.swap(a,{display:"inline-block"},function(){b?c=bz(a,"margin-right","marginRight"):c=a.style.marginRight});return c}})}),c.defaultView&&c.defaultView.getComputedStyle&&(bA=function(a,b){var c,d,e;b=b.replace(bs,"-$1").toLowerCase(),(d=a.ownerDocument.defaultView)&&(e=d.getComputedStyle(a,null))&&(c=e.getPropertyValue(b),c===""&&!f.contains(a.ownerDocument.documentElement,a)&&(c=f.style(a,b)));return c}),c.documentElement.currentStyle&&(bB=function(a,b){var c,d,e,f=a.currentStyle&&a.currentStyle[b],g=a.style;f===null&&g&&(e=g[b])&&(f=e),!bt.test(f)&&bu.test(f)&&(c=g.left,d=a.runtimeStyle&&a.runtimeStyle.left,d&&(a.runtimeStyle.left=a.currentStyle.left),g.left=b==="fontSize"?"1em":f||0,f=g.pixelLeft+"px",g.left=c,d&&(a.runtimeStyle.left=d));return f===""?"auto":f}),bz=bA||bB,f.expr&&f.expr.filters&&(f.expr.filters.hidden=function(a){var b=a.offsetWidth,c=a.offsetHeight;return b===0&&c===0||!f.support.reliableHiddenOffsets&&(a.style&&a.style.display||f.css(a,"display"))==="none"},f.expr.filters.visible=function(a){return!f.expr.filters.hidden(a)});var bD=/%20/g,bE=/\[\]$/,bF=/\r?\n/g,bG=/#.*$/,bH=/^(.*?):[ \t]*([^\r\n]*)\r?$/mg,bI=/^(?:color|date|datetime|datetime-local|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i,bJ=/^(?:about|app|app\-storage|.+\-extension|file|res|widget):$/,bK=/^(?:GET|HEAD)$/,bL=/^\/\//,bM=/\?/,bN=/)<[^<]*)*<\/script>/gi,bO=/^(?:select|textarea)/i,bP=/\s+/,bQ=/([?&])_=[^&]*/,bR=/^([\w\+\.\-]+:)(?:\/\/([^\/?#:]*)(?::(\d+))?)?/,bS=f.fn.load,bT={},bU={},bV,bW,bX=["*/"]+["*"];try{bV=e.href}catch(bY){bV=c.createElement("a"),bV.href="",bV=bV.href}bW=bR.exec(bV.toLowerCase())||[],f.fn.extend({load:function(a,c,d){if(typeof a!="string"&&bS)return bS.apply(this,arguments);if(!this.length)return this;var e=a.indexOf(" ");if(e>=0){var g=a.slice(e,a.length);a=a.slice(0,e)}var h="GET";c&&(f.isFunction(c)?(d=c,c=b):typeof c=="object"&&(c=f.param(c,f.ajaxSettings.traditional),h="POST"));var i=this;f.ajax({url:a,type:h,dataType:"html",data:c,complete:function(a,b,c){c=a.responseText,a.isResolved()&&(a.done(function(a){c=a}),i.html(g?f("
    ").append(c.replace(bN,"")).find(g):c)),d&&i.each(d,[c,b,a])}});return this},serialize:function(){return f.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?f.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||bO.test(this.nodeName)||bI.test(this.type))}).map(function(a,b){var c=f(this).val();return c==null?null:f.isArray(c)?f.map(c,function(a,c){return{name:b.name,value:a.replace(bF,"\r\n")}}):{name:b.name,value:c.replace(bF,"\r\n")}}).get()}}),f.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "),function(a,b){f.fn[b]=function(a){return this.on(b,a)}}),f.each(["get","post"],function(a,c){f[c]=function(a,d,e,g){f.isFunction(d)&&(g=g||e,e=d,d=b);return f.ajax({type:c,url:a,data:d,success:e,dataType:g})}}),f.extend({getScript:function(a,c){return f.get(a,b,c,"script")},getJSON:function(a,b,c){return f.get(a,b,c,"json")},ajaxSetup:function(a,b){b?b_(a,f.ajaxSettings):(b=a,a=f.ajaxSettings),b_(a,b);return a},ajaxSettings:{url:bV,isLocal:bJ.test(bW[1]),global:!0,type:"GET",contentType:"application/x-www-form-urlencoded",processData:!0,async:!0,accepts:{xml:"application/xml, text/xml",html:"text/html",text:"text/plain",json:"application/json, text/javascript","*":bX},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText"},converters:{"* text":a.String,"text html":!0,"text json":f.parseJSON,"text xml":f.parseXML},flatOptions:{context:!0,url:!0}},ajaxPrefilter:bZ(bT),ajaxTransport:bZ(bU),ajax:function(a,c){function w(a,c,l,m){if(s!==2){s=2,q&&clearTimeout(q),p=b,n=m||"",v.readyState=a>0?4:0;var o,r,u,w=c,x=l?cb(d,v,l):b,y,z;if(a>=200&&a<300||a===304){if(d.ifModified){if(y=v.getResponseHeader("Last-Modified"))f.lastModified[k]=y;if(z=v.getResponseHeader("Etag"))f.etag[k]=z}if(a===304)w="notmodified",o=!0;else try{r=cc(d,x),w="success",o=!0}catch(A){w="parsererror",u=A}}else{u=w;if(!w||a)w="error",a<0&&(a=0)}v.status=a,v.statusText=""+(c||w),o?h.resolveWith(e,[r,w,v]):h.rejectWith(e,[v,w,u]),v.statusCode(j),j=b,t&&g.trigger("ajax"+(o?"Success":"Error"),[v,d,o?r:u]),i.fireWith(e,[v,w]),t&&(g.trigger("ajaxComplete",[v,d]),--f.active||f.event.trigger("ajaxStop"))}}typeof a=="object"&&(c=a,a=b),c=c||{};var d=f.ajaxSetup({},c),e=d.context||d,g=e!==d&&(e.nodeType||e instanceof f)?f(e):f.event,h=f.Deferred(),i=f.Callbacks("once memory"),j=d.statusCode||{},k,l={},m={},n,o,p,q,r,s=0,t,u,v={readyState:0,setRequestHeader:function(a,b){if(!s){var c=a.toLowerCase();a=m[c]=m[c]||a,l[a]=b}return this},getAllResponseHeaders:function(){return s===2?n:null},getResponseHeader:function(a){var c;if(s===2){if(!o){o={};while(c=bH.exec(n))o[c[1].toLowerCase()]=c[2]}c=o[a.toLowerCase()]}return c===b?null:c},overrideMimeType:function(a){s||(d.mimeType=a);return this},abort:function(a){a=a||"abort",p&&p.abort(a),w(0,a);return this}};h.promise(v),v.success=v.done,v.error=v.fail,v.complete=i.add,v.statusCode=function(a){if(a){var b;if(s<2)for(b in a)j[b]=[j[b],a[b]];else b=a[v.status],v.then(b,b)}return this},d.url=((a||d.url)+"").replace(bG,"").replace(bL,bW[1]+"//"),d.dataTypes=f.trim(d.dataType||"*").toLowerCase().split(bP),d.crossDomain==null&&(r=bR.exec(d.url.toLowerCase()),d.crossDomain=!(!r||r[1]==bW[1]&&r[2]==bW[2]&&(r[3]||(r[1]==="http:"?80:443))==(bW[3]||(bW[1]==="http:"?80:443)))),d.data&&d.processData&&typeof d.data!="string"&&(d.data=f.param(d.data,d.traditional)),b$(bT,d,c,v);if(s===2)return!1;t=d.global,d.type=d.type.toUpperCase(),d.hasContent=!bK.test(d.type),t&&f.active++===0&&f.event.trigger("ajaxStart");if(!d.hasContent){d.data&&(d.url+=(bM.test(d.url)?"&":"?")+d.data,delete d.data),k=d.url;if(d.cache===!1){var x=f.now(),y=d.url.replace(bQ,"$1_="+x);d.url=y+(y===d.url?(bM.test(d.url)?"&":"?")+"_="+x:"")}}(d.data&&d.hasContent&&d.contentType!==!1||c.contentType)&&v.setRequestHeader("Content-Type",d.contentType),d.ifModified&&(k=k||d.url,f.lastModified[k]&&v.setRequestHeader("If-Modified-Since",f.lastModified[k]),f.etag[k]&&v.setRequestHeader("If-None-Match",f.etag[k])),v.setRequestHeader("Accept",d.dataTypes[0]&&d.accepts[d.dataTypes[0]]?d.accepts[d.dataTypes[0]]+(d.dataTypes[0]!=="*"?", "+bX+"; q=0.01":""):d.accepts["*"]);for(u in d.headers)v.setRequestHeader(u,d.headers[u]);if(d.beforeSend&&(d.beforeSend.call(e,v,d)===!1||s===2)){v.abort();return!1}for(u in{success:1,error:1,complete:1})v[u](d[u]);p=b$(bU,d,c,v);if(!p)w(-1,"No Transport");else{v.readyState=1,t&&g.trigger("ajaxSend",[v,d]),d.async&&d.timeout>0&&(q=setTimeout(function(){v.abort("timeout")},d.timeout));try{s=1,p.send(l,w)}catch(z){if(s<2)w(-1,z);else throw z}}return v},param:function(a,c){var d=[],e=function(a,b){b=f.isFunction(b)?b():b,d[d.length]=encodeURIComponent(a)+"="+encodeURIComponent(b)};c===b&&(c=f.ajaxSettings.traditional);if(f.isArray(a)||a.jquery&&!f.isPlainObject(a))f.each(a,function(){e(this.name,this.value)});else for(var g in a)ca(g,a[g],c,e);return d.join("&").replace(bD,"+")}}),f.extend({active:0,lastModified:{},etag:{}});var cd=f.now(),ce=/(\=)\?(&|$)|\?\?/i;f.ajaxSetup({jsonp:"callback",jsonpCallback:function(){return f.expando+"_"+cd++}}),f.ajaxPrefilter("json jsonp",function(b,c,d){var e=b.contentType==="application/x-www-form-urlencoded"&&typeof b.data=="string";if(b.dataTypes[0]==="jsonp"||b.jsonp!==!1&&(ce.test(b.url)||e&&ce.test(b.data))){var g,h=b.jsonpCallback=f.isFunction(b.jsonpCallback)?b.jsonpCallback():b.jsonpCallback,i=a[h],j=b.url,k=b.data,l="$1"+h+"$2";b.jsonp!==!1&&(j=j.replace(ce,l),b.url===j&&(e&&(k=k.replace(ce,l)),b.data===k&&(j+=(/\?/.test(j)?"&":"?")+b.jsonp+"="+h))),b.url=j,b.data=k,a[h]=function(a){g=[a]},d.always(function(){a[h]=i,g&&f.isFunction(i)&&a[h](g[0])}),b.converters["script json"]=function(){g||f.error(h+" was not called");return g[0]},b.dataTypes[0]="json";return"script"}}),f.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/javascript|ecmascript/},converters:{"text script":function(a){f.globalEval(a);return a}}}),f.ajaxPrefilter("script",function(a){a.cache===b&&(a.cache=!1),a.crossDomain&&(a.type="GET",a.global=!1)}),f.ajaxTransport("script",function(a){if(a.crossDomain){var d,e=c.head||c.getElementsByTagName("head")[0]||c.documentElement;return{send:function(f,g){d=c.createElement("script"),d.async="async",a.scriptCharset&&(d.charset=a.scriptCharset),d.src=a.url,d.onload=d.onreadystatechange=function(a,c){if(c||!d.readyState||/loaded|complete/.test(d.readyState))d.onload=d.onreadystatechange=null,e&&d.parentNode&&e.removeChild(d),d=b,c||g(200,"success")},e.insertBefore(d,e.firstChild)},abort:function(){d&&d.onload(0,1)}}}});var cf=a.ActiveXObject?function(){for(var a in ch)ch[a](0,1)}:!1,cg=0,ch;f.ajaxSettings.xhr=a.ActiveXObject?function(){return!this.isLocal&&ci()||cj()}:ci,function(a){f.extend(f.support,{ajax:!!a,cors:!!a&&"withCredentials"in a})}(f.ajaxSettings.xhr()),f.support.ajax&&f.ajaxTransport(function(c){if(!c.crossDomain||f.support.cors){var d;return{send:function(e,g){var h=c.xhr(),i,j;c.username?h.open(c.type,c.url,c.async,c.username,c.password):h.open(c.type,c.url,c.async);if(c.xhrFields)for(j in c.xhrFields)h[j]=c.xhrFields[j];c.mimeType&&h.overrideMimeType&&h.overrideMimeType(c.mimeType),!c.crossDomain&&!e["X-Requested-With"]&&(e["X-Requested-With"]="XMLHttpRequest");try{for(j in e)h.setRequestHeader(j,e[j])}catch(k){}h.send(c.hasContent&&c.data||null),d=function(a,e){var j,k,l,m,n;try{if(d&&(e||h.readyState===4)){d=b,i&&(h.onreadystatechange=f.noop,cf&&delete ch[i]);if(e)h.readyState!==4&&h.abort();else{j=h.status,l=h.getAllResponseHeaders(),m={},n=h.responseXML,n&&n.documentElement&&(m.xml=n),m.text=h.responseText;try{k=h.statusText}catch(o){k=""}!j&&c.isLocal&&!c.crossDomain?j=m.text?200:404:j===1223&&(j=204)}}}catch(p){e||g(-1,p)}m&&g(j,k,m,l)},!c.async||h.readyState===4?d():(i=++cg,cf&&(ch||(ch={},f(a).unload(cf)),ch[i]=d),h.onreadystatechange=d)},abort:function(){d&&d(0,1)}}}});var ck={},cl,cm,cn=/^(?:toggle|show|hide)$/,co=/^([+\-]=)?([\d+.\-]+)([a-z%]*)$/i,cp,cq=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]],cr;f.fn.extend({show:function(a,b,c){var d,e;if(a||a===0)return this.animate(cu("show",3),a,b,c);for(var g=0,h=this.length;g=i.duration+this.startTime){this.now=this.end,this.pos=this.state=1,this.update(),i.animatedProperties[this.prop]=!0;for(b in i.animatedProperties)i.animatedProperties[b]!==!0&&(g=!1);if(g){i.overflow!=null&&!f.support.shrinkWrapBlocks&&f.each(["","X","Y"],function(a,b){h.style["overflow"+b]=i.overflow[a]}),i.hide&&f(h).hide();if(i.hide||i.show)for(b in i.animatedProperties)f.style(h,b,i.orig[b]),f.removeData(h,"fxshow"+b,!0),f.removeData(h,"toggle"+b,!0);d=i.complete,d&&(i.complete=!1,d.call(h))}return!1}i.duration==Infinity?this.now=e:(c=e-this.startTime,this.state=c/i.duration,this.pos=f.easing[i.animatedProperties[this.prop]](this.state,c,0,1,i.duration),this.now=this.start+(this.end-this.start)*this.pos),this.update();return!0}},f.extend(f.fx,{tick:function(){var a,b=f.timers,c=0;for(;c-1,k={},l={},m,n;j?(l=e.position(),m=l.top,n=l.left):(m=parseFloat(h)||0,n=parseFloat(i)||0),f.isFunction(b)&&(b=b.call(a,c,g)),b.top!=null&&(k.top=b.top-g.top+m),b.left!=null&&(k.left=b.left-g.left+n),"using"in b?b.using.call(a,k):e.css(k)}},f.fn.extend({position:function(){if(!this[0])return null;var a=this[0],b=this.offsetParent(),c=this.offset(),d=cx.test(b[0].nodeName)?{top:0,left:0}:b.offset();c.top-=parseFloat(f.css(a,"marginTop"))||0,c.left-=parseFloat(f.css(a,"marginLeft"))||0,d.top+=parseFloat(f.css(b[0],"borderTopWidth"))||0,d.left+=parseFloat(f.css(b[0],"borderLeftWidth"))||0;return{top:c.top-d.top,left:c.left-d.left}},offsetParent:function(){return this.map(function(){var a=this.offsetParent||c.body;while(a&&!cx.test(a.nodeName)&&f.css(a,"position")==="static")a=a.offsetParent;return a})}}),f.each(["Left","Top"],function(a,c){var d="scroll"+c;f.fn[d]=function(c){var e,g;if(c===b){e=this[0];if(!e)return null;g=cy(e);return g?"pageXOffset"in g?g[a?"pageYOffset":"pageXOffset"]:f.support.boxModel&&g.document.documentElement[d]||g.document.body[d]:e[d]}return this.each(function(){g=cy(this),g?g.scrollTo(a?f(g).scrollLeft():c,a?c:f(g).scrollTop()):this[d]=c})}}),f.each(["Height","Width"],function(a,c){var d=c.toLowerCase();f.fn["inner"+c]=function(){var a=this[0];return a?a.style?parseFloat(f.css(a,d,"padding")):this[d]():null},f.fn["outer"+c]=function(a){var b=this[0];return b?b.style?parseFloat(f.css(b,d,a?"margin":"border")):this[d]():null},f.fn[d]=function(a){var e=this[0];if(!e)return a==null?null:this;if(f.isFunction(a))return this.each(function(b){var c=f(this);c[d](a.call(this,b,c[d]()))});if(f.isWindow(e)){var g=e.document.documentElement["client"+c],h=e.document.body;return e.document.compatMode==="CSS1Compat"&&g||h&&h["client"+c]||g}if(e.nodeType===9)return Math.max(e.documentElement["client"+c],e.body["scroll"+c],e.documentElement["scroll"+c],e.body["offset"+c],e.documentElement["offset"+c]);if(a===b){var i=f.css(e,d),j=parseFloat(i);return f.isNumeric(j)?j:i}return this.css(d,typeof a=="string"?a:a+"px")}}),a.jQuery=a.$=f,typeof define=="function"&&define.amd&&define.amd.jQuery&&define("jquery",[],function(){return f})})(window); \ No newline at end of file diff --git a/node_modules/browserify/node_modules/insert-module-globals/node_modules/lexical-scope/bench/results.txt b/node_modules/browserify/node_modules/insert-module-globals/node_modules/lexical-scope/bench/results.txt deleted file mode 100644 index 2a68ff8d..00000000 --- a/node_modules/browserify/node_modules/insert-module-globals/node_modules/lexical-scope/bench/results.txt +++ /dev/null @@ -1,15 +0,0 @@ -$ git log|head -n1 -commit ae85dfd4cc0284679ce21bb662427340fa966666 -$ time node run.js >/dev/null - -real 0m6.551s -user 0m6.336s -sys 0m0.288s - -$ git log|head -n1 -commit 9125bf1ec0cf78c77a852e0547a4cc69db7797bf -$ time node run.js>/dev/null - -real 0m1.702s -user 0m1.644s -sys 0m0.084s diff --git a/node_modules/browserify/node_modules/insert-module-globals/node_modules/lexical-scope/bench/run.js b/node_modules/browserify/node_modules/insert-module-globals/node_modules/lexical-scope/bench/run.js deleted file mode 100755 index 3c0ca061..00000000 --- a/node_modules/browserify/node_modules/insert-module-globals/node_modules/lexical-scope/bench/run.js +++ /dev/null @@ -1,7 +0,0 @@ -#!/usr/bin/env node -var detect = require('../'); -var fs = require('fs'); -var src = fs.readFileSync(__dirname + '/jquery.js'); - -var scope = detect(src); -console.dir(scope); diff --git a/node_modules/browserify/node_modules/insert-module-globals/node_modules/lexical-scope/example/detect.js b/node_modules/browserify/node_modules/insert-module-globals/node_modules/lexical-scope/example/detect.js deleted file mode 100644 index 1ad4d515..00000000 --- a/node_modules/browserify/node_modules/insert-module-globals/node_modules/lexical-scope/example/detect.js +++ /dev/null @@ -1,6 +0,0 @@ -var detect = require('../'); -var fs = require('fs'); -var src = fs.readFileSync(__dirname + '/src.js'); - -var scope = detect(src); -console.log(JSON.stringify(scope,null,2)); diff --git a/node_modules/browserify/node_modules/insert-module-globals/node_modules/lexical-scope/example/src.js b/node_modules/browserify/node_modules/insert-module-globals/node_modules/lexical-scope/example/src.js deleted file mode 100644 index ff45a922..00000000 --- a/node_modules/browserify/node_modules/insert-module-globals/node_modules/lexical-scope/example/src.js +++ /dev/null @@ -1,27 +0,0 @@ -var x = 5; -var y = 3, z = 2; - -w.foo(); -w = 2; - -RAWR=444; -RAWR.foo(); - -BLARG=3; - -foo(function () { - var BAR = 3; - process.nextTick(function (ZZZZZZZZZZZZ) { - console.log('beep boop'); - var xyz = 4; - x += 10; - x.zzzzzz; - ZZZ=6; - }); - function doom () { - } - ZZZ.foo(); - -}); - -console.log(xyz); diff --git a/node_modules/browserify/node_modules/insert-module-globals/node_modules/lexical-scope/index.js b/node_modules/browserify/node_modules/insert-module-globals/node_modules/lexical-scope/index.js deleted file mode 100644 index 69da4708..00000000 --- a/node_modules/browserify/node_modules/insert-module-globals/node_modules/lexical-scope/index.js +++ /dev/null @@ -1,194 +0,0 @@ -var astw = require('astw'); - -module.exports = function (src) { - var locals = {}; - var implicit = {}; - var exported = {}; - var implicitProps = {}; - - if (typeof src === 'string') { - src = String(src).replace(/^#![^\n]*\n/, ''); - } - if (src && typeof src === 'object' - && typeof src.copy === 'function' && typeof src.toString === 'function') { - src = src.toString('utf8'); - } - var walk = astw(src); - - walk(function (node) { - if (node.type === 'VariableDeclaration') { - // take off the leading `var ` - var id = getScope(node); - for (var i = 0; i < node.declarations.length; i++) { - var d = node.declarations[i]; - locals[id][d.id.name] = d; - } - } - else if (node.type === 'CatchClause') { - var id = getScope(node); - locals[id][node.param.name] = node.param - } - else if (isFunction(node)) { - var id = getScope(node.parent); - if (node.id) locals[id][node.id.name] = node; - var nid = node.params.length && getScope(node); - if (nid && !locals[nid]) locals[nid] = {}; - for (var i = 0; i < node.params.length; i++) { - var p = node.params[i]; - locals[nid][p.name] = p; - } - } - }); - - walk(function (node) { - if (node.type === 'Identifier' - && lookup(node) === undefined) { - if (node.parent.type === 'Property' - && node.parent.key === node) return; - if (node.parent.type === 'MemberExpression' - && node.parent.property === node) return; - if (isFunction(node.parent)) return; - if (node.parent.type === 'LabeledStatement') return; - if (node.parent.type === 'ContinueStatement') return; - if (node.parent.type === 'BreakStatement') return; - - if (node.parent.type === 'AssignmentExpression') { - var isLeft0 = node.parent.left.type === 'MemberExpression' - && node.parent.left.object === node.name - ; - var isLeft1 = node.parent.left.type === 'Identifier' - && node.parent.left.name === node.name - ; - if (isLeft0 || isLeft1) { - exported[node.name] = keyOf(node).length; - } - } - if (!exported[node.name] - || exported[node.name] < keyOf(node).length) { - implicit[node.name] = keyOf(node).length; - if (!implicitProps[node.name]) implicitProps[node.name] = {}; - if (node.parent && node.parent.type === 'MemberExpression' - && node.parent.property.type === 'Identifier') { - implicitProps[node.name][node.parent.property.name] = true; - } - else if (node.parent && node.parent.type === 'CallExpression' - && node.parent.callee === node) { - implicitProps[node.name]['()'] = true; - } - else { - implicitProps[node.name]['*'] = true; - } - } - } - }); - - var localScopes = {}; - var lks = objectKeys(locals); - for (var i = 0; i < lks.length; i++) { - var key = lks[i]; - localScopes[key] = objectKeys(locals[key]); - } - - var props = {}; - var pkeys = objectKeys(implicitProps); - for (var i = 0; i < pkeys.length; i++) { - props[pkeys[i]] = objectKeys(implicitProps[pkeys[i]]); - } - return { - locals: localScopes, - globals: { - implicit: objectKeys(implicit), - implicitProperties: props, - exported: objectKeys(exported) - } - }; - - function lookup (node) { - for (var p = node; p; p = p.parent) { - if (isFunction(p) || p.type === 'Program') { - var id = getScope(p); - if (locals[id][node.name]) { - return id; - } - } - } - return undefined; - } - - function getScope (node) { - for ( - var p = node; - !isFunction(p) && p.type !== 'Program'; - p = p.parent - ); - var id = idOf(p); - if (!locals[id]) locals[id] = {}; - return id; - } - -}; - -function isFunction (x) { - return x.type === 'FunctionDeclaration' - || x.type === 'FunctionExpression' - ; -} - -function idOf (node) { - var id = []; - for (var n = node; n.type !== 'Program'; n = n.parent) { - var key = keyOf(n).join('.'); - id.unshift(key); - } - return id.join('.'); -} - -function keyOf (node) { - if (node.lexicalScopeKey) return node.lexicalScopeKey; - var p = node.parent; - var ks = objectKeys(p); - var kv = { keys : [], values : [], top : [] }; - - for (var i = 0; i < ks.length; i++) { - var key = ks[i]; - kv.keys.push(key); - kv.values.push(p[key]); - kv.top.push(undefined); - - if (isArray(p[key])) { - var keys = objectKeys(p[key]); - kv.keys.push.apply(kv.keys, keys); - kv.values.push.apply(kv.values, p[key]); - - var nkeys = []; - for (var j = 0; j < keys.length; j++) nkeys.push(key); - kv.top.push.apply(kv.top, nkeys); - } - } - var ix = indexOf(kv.values, node); - var res = []; - if (kv.top[ix]) res.push(kv.top[ix]); - if (kv.keys[ix]) res.push(kv.keys[ix]); - if (node.parent.type === 'CallExpression') { - res.unshift.apply(res, keyOf(node.parent.parent)); - } - return node.lexicalScopeKey = res; -} - -var isArray = Array.isArray || function (xs) { - return Object.prototype.toString.call(xs) === '[object Array]'; -}; - -var objectKeys = Object.keys || function (obj) { - var keys = []; - for (var key in obj) keys.push(key); - return keys; -}; - -function indexOf (xs, x) { - if (xs.indexOf) return xs.indexOf(x); - for (var i = 0; i < xs.length; i++) { - if (x === xs[i]) return i; - } - return -1; -} diff --git a/node_modules/browserify/node_modules/insert-module-globals/node_modules/lexical-scope/node_modules/astw/.travis.yml b/node_modules/browserify/node_modules/insert-module-globals/node_modules/lexical-scope/node_modules/astw/.travis.yml deleted file mode 100644 index 74c57bf1..00000000 --- a/node_modules/browserify/node_modules/insert-module-globals/node_modules/lexical-scope/node_modules/astw/.travis.yml +++ /dev/null @@ -1,8 +0,0 @@ -language: node_js -node_js: - - "0.8" - - "0.10" - - "0.12" - - "iojs" -before_install: - - npm install -g npm@~1.4.6 diff --git a/node_modules/browserify/node_modules/insert-module-globals/node_modules/lexical-scope/node_modules/astw/LICENSE b/node_modules/browserify/node_modules/insert-module-globals/node_modules/lexical-scope/node_modules/astw/LICENSE deleted file mode 100644 index ee27ba4b..00000000 --- a/node_modules/browserify/node_modules/insert-module-globals/node_modules/lexical-scope/node_modules/astw/LICENSE +++ /dev/null @@ -1,18 +0,0 @@ -This software is released under the MIT license: - -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/node_modules/browserify/node_modules/insert-module-globals/node_modules/lexical-scope/node_modules/astw/example/types.js b/node_modules/browserify/node_modules/insert-module-globals/node_modules/lexical-scope/node_modules/astw/example/types.js deleted file mode 100644 index 08cbe28e..00000000 --- a/node_modules/browserify/node_modules/insert-module-globals/node_modules/lexical-scope/node_modules/astw/example/types.js +++ /dev/null @@ -1,8 +0,0 @@ -var astw = require('../'); -var deparse = require('escodegen').generate; -var walk = astw('4 + beep(5 * 2)'); - -walk(function (node) { - var src = deparse(node); - console.log(node.type + ' :: ' + JSON.stringify(src)); -}); diff --git a/node_modules/browserify/node_modules/insert-module-globals/node_modules/lexical-scope/node_modules/astw/index.js b/node_modules/browserify/node_modules/insert-module-globals/node_modules/lexical-scope/node_modules/astw/index.js deleted file mode 100644 index 8e34110a..00000000 --- a/node_modules/browserify/node_modules/insert-module-globals/node_modules/lexical-scope/node_modules/astw/index.js +++ /dev/null @@ -1,51 +0,0 @@ -var parse = require('acorn').parse; - -module.exports = function (src) { - var ast = src; - if (typeof src === 'string') { - try { - ast = parse(src, { - ecmaVersion: 6, - allowReturnOutsideFunction: true - }) - } - catch (err) { ast = parse('(' + src + ')') } - } - return function (cb) { - walk(ast, undefined, cb); - }; -}; - -function walk (node, parent, cb) { - var keys = objectKeys(node); - for (var i = 0; i < keys.length; i++) { - var key = keys[i]; - if (key === 'parent') continue; - - var child = node[key]; - if (isArray(child)) { - for (var j = 0; j < child.length; j++) { - var c = child[j]; - if (c && typeof c.type === 'string') { - c.parent = node; - walk(c, node, cb); - } - } - } - else if (child && typeof child.type === 'string') { - child.parent = node; - walk(child, node, cb); - } - } - cb(node); -} - -var isArray = Array.isArray || function (xs) { - return Object.prototype.toString.call(xs) === '[object Array]'; -}; - -var objectKeys = Object.keys || function (obj) { - var keys = []; - for (var key in obj) keys.push(key); - return keys; -}; diff --git a/node_modules/browserify/node_modules/insert-module-globals/node_modules/lexical-scope/node_modules/astw/node_modules/.bin/acorn b/node_modules/browserify/node_modules/insert-module-globals/node_modules/lexical-scope/node_modules/astw/node_modules/.bin/acorn deleted file mode 120000 index cf767603..00000000 --- a/node_modules/browserify/node_modules/insert-module-globals/node_modules/lexical-scope/node_modules/astw/node_modules/.bin/acorn +++ /dev/null @@ -1 +0,0 @@ -../acorn/bin/acorn \ No newline at end of file diff --git a/node_modules/browserify/node_modules/insert-module-globals/node_modules/lexical-scope/node_modules/astw/node_modules/acorn/.editorconfig b/node_modules/browserify/node_modules/insert-module-globals/node_modules/lexical-scope/node_modules/astw/node_modules/acorn/.editorconfig deleted file mode 100644 index c14d5c67..00000000 --- a/node_modules/browserify/node_modules/insert-module-globals/node_modules/lexical-scope/node_modules/astw/node_modules/acorn/.editorconfig +++ /dev/null @@ -1,7 +0,0 @@ -root = true - -[*] -indent_style = space -indent_size = 2 -end_of_line = lf -insert_final_newline = true diff --git a/node_modules/browserify/node_modules/insert-module-globals/node_modules/lexical-scope/node_modules/astw/node_modules/acorn/.gitattributes b/node_modules/browserify/node_modules/insert-module-globals/node_modules/lexical-scope/node_modules/astw/node_modules/acorn/.gitattributes deleted file mode 100644 index fcadb2cf..00000000 --- a/node_modules/browserify/node_modules/insert-module-globals/node_modules/lexical-scope/node_modules/astw/node_modules/acorn/.gitattributes +++ /dev/null @@ -1 +0,0 @@ -* text eol=lf diff --git a/node_modules/browserify/node_modules/insert-module-globals/node_modules/lexical-scope/node_modules/astw/node_modules/acorn/.npmignore b/node_modules/browserify/node_modules/insert-module-globals/node_modules/lexical-scope/node_modules/astw/node_modules/acorn/.npmignore deleted file mode 100644 index ecba2911..00000000 --- a/node_modules/browserify/node_modules/insert-module-globals/node_modules/lexical-scope/node_modules/astw/node_modules/acorn/.npmignore +++ /dev/null @@ -1,3 +0,0 @@ -/.tern-port -/test -/local diff --git a/node_modules/browserify/node_modules/insert-module-globals/node_modules/lexical-scope/node_modules/astw/node_modules/acorn/.tern-project b/node_modules/browserify/node_modules/insert-module-globals/node_modules/lexical-scope/node_modules/astw/node_modules/acorn/.tern-project deleted file mode 100644 index 9e26dfee..00000000 --- a/node_modules/browserify/node_modules/insert-module-globals/node_modules/lexical-scope/node_modules/astw/node_modules/acorn/.tern-project +++ /dev/null @@ -1 +0,0 @@ -{} \ No newline at end of file diff --git a/node_modules/browserify/node_modules/insert-module-globals/node_modules/lexical-scope/node_modules/astw/node_modules/acorn/.travis.yml b/node_modules/browserify/node_modules/insert-module-globals/node_modules/lexical-scope/node_modules/astw/node_modules/acorn/.travis.yml deleted file mode 100644 index ffb9f710..00000000 --- a/node_modules/browserify/node_modules/insert-module-globals/node_modules/lexical-scope/node_modules/astw/node_modules/acorn/.travis.yml +++ /dev/null @@ -1,2 +0,0 @@ -language: node_js -node_js: '0.10' diff --git a/node_modules/browserify/node_modules/insert-module-globals/node_modules/lexical-scope/node_modules/astw/node_modules/acorn/AUTHORS b/node_modules/browserify/node_modules/insert-module-globals/node_modules/lexical-scope/node_modules/astw/node_modules/acorn/AUTHORS deleted file mode 100644 index 0fb284bb..00000000 --- a/node_modules/browserify/node_modules/insert-module-globals/node_modules/lexical-scope/node_modules/astw/node_modules/acorn/AUTHORS +++ /dev/null @@ -1,38 +0,0 @@ -List of Acorn contributors. Updated before every release. - -Adrian Rakovsky -Alistair Braidwood -Andres Suarez -Aparajita Fishman -Arian Stolwijk -Artem Govorov -Brandon Mills -Charles Hughes -Conrad Irwin -David Bonnet -Forbes Lindesay -Gilad Peleg -impinball -Ingvar Stepanyan -Jiaxing Wang -Johannes Herr -Jürg Lehni -keeyipchan -krator -Marijn Haverbeke -Martin Carlberg -Mathias Bynens -Mathieu 'p01' Henri -Max Schaefer -Max Zerzouri -Mihai Bazon -Mike Rennie -Nick Fitzgerald -Oskar Schöldström -Paul Harper -Peter Rust -PlNG -r-e-d -Rich Harris -Sebastian McKenzie -zsjforcn diff --git a/node_modules/browserify/node_modules/insert-module-globals/node_modules/lexical-scope/node_modules/astw/node_modules/acorn/LICENSE b/node_modules/browserify/node_modules/insert-module-globals/node_modules/lexical-scope/node_modules/astw/node_modules/acorn/LICENSE deleted file mode 100644 index d4c7fc58..00000000 --- a/node_modules/browserify/node_modules/insert-module-globals/node_modules/lexical-scope/node_modules/astw/node_modules/acorn/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (C) 2012-2014 by various contributors (see AUTHORS) - -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/node_modules/browserify/node_modules/insert-module-globals/node_modules/lexical-scope/node_modules/astw/node_modules/acorn/README.md b/node_modules/browserify/node_modules/insert-module-globals/node_modules/lexical-scope/node_modules/astw/node_modules/acorn/README.md deleted file mode 100644 index ec22d521..00000000 --- a/node_modules/browserify/node_modules/insert-module-globals/node_modules/lexical-scope/node_modules/astw/node_modules/acorn/README.md +++ /dev/null @@ -1,377 +0,0 @@ -# Acorn - -[![Build Status](https://travis-ci.org/marijnh/acorn.svg?branch=master)](https://travis-ci.org/marijnh/acorn) -[![NPM version](https://img.shields.io/npm/v/acorn.svg)](https://www.npmjs.org/package/acorn) -[Author funding status: ![maintainer happiness](https://marijnhaverbeke.nl/fund/status_s.png?force)](https://marijnhaverbeke.nl/fund/) - -A tiny, fast JavaScript parser, written completely in JavaScript. - -## Installation - -The easiest way to install acorn is with [`npm`][npm]. - -[npm]: http://npmjs.org - -```sh -npm install acorn -``` - -Alternately, download the source. - -```sh -git clone https://github.com/marijnh/acorn.git -``` - -## Components - -When run in a CommonJS (node.js) or AMD environment, exported values -appear in the interfaces exposed by the individual files, as usual. -When loaded in the browser (Acorn works in any JS-enabled browser more -recent than IE5) without any kind of module management, a single -global object `acorn` will be defined, and all the exported properties -will be added to that. - -### Main parser - -This is implemented in `dist/acorn.js`, and is what you get when you -`require("acorn")` in node.js. - -**parse**`(input, options)` is used to parse a JavaScript program. -The `input` parameter is a string, `options` can be undefined or an -object setting some of the options listed below. The return value will -be an abstract syntax tree object as specified by the -[Mozilla Parser API][mozapi]. - -When encountering a syntax error, the parser will raise a -`SyntaxError` object with a meaningful message. The error object will -have a `pos` property that indicates the character offset at which the -error occurred, and a `loc` object that contains a `{line, column}` -object referring to that same position. - -[mozapi]: https://developer.mozilla.org/en-US/docs/SpiderMonkey/Parser_API - -- **ecmaVersion**: Indicates the ECMAScript version to parse. Must be - either 3, 5, or 6. This influences support for strict mode, the set - of reserved words, and support for new syntax features. Default is 5. - -- **sourceType**: Indicate the mode the code should be parsed in. Can be - either `"script"` or `"module"`. - -- **onInsertedSemicolon**: If given a callback, that callback will be - called whenever a missing semicolon is inserted by the parser. The - callback will be given the character offset of the point where the - semicolon is inserted as argument, and if `locations` is on, also a - `{line, column}` object representing this position. - -- **onTrailingComma**: Like `onInsertedSemicolon`, but for trailing - commas. - -- **allowReserved**: If `false`, using a reserved word will generate - an error. Defaults to `true`. When given the value `"never"`, - reserved words and keywords can also not be used as property names - (as in Internet Explorer's old parser). - -- **allowReturnOutsideFunction**: By default, a return statement at - the top level raises an error. Set this to `true` to accept such - code. - -- **allowImportExportEverywhere**: By default, `import` and `export` - declarations can only appear at a program's top level. Setting this - option to `true` allows them anywhere where a statement is allowed. - -- **allowHashBang**: When this is enabled (off by default), if the - code starts with the characters `#!` (as in a shellscript), the - first line will be treated as a comment. - -- **locations**: When `true`, each node has a `loc` object attached - with `start` and `end` subobjects, each of which contains the - one-based line and zero-based column numbers in `{line, column}` - form. Default is `false`. - -- **onToken**: If a function is passed for this option, each found - token will be passed in same format as `tokenize()` returns. - - If array is passed, each found token is pushed to it. - - Note that you are not allowed to call the parser from the - callback—that will corrupt its internal state. - -- **onComment**: If a function is passed for this option, whenever a - comment is encountered the function will be called with the - following parameters: - - - `block`: `true` if the comment is a block comment, false if it - is a line comment. - - `text`: The content of the comment. - - `start`: Character offset of the start of the comment. - - `end`: Character offset of the end of the comment. - - When the `locations` options is on, the `{line, column}` locations - of the comment’s start and end are passed as two additional - parameters. - - If array is passed for this option, each found comment is pushed - to it as object in Esprima format: - - ```javascript - { - "type": "Line" | "Block", - "value": "comment text", - "range": ..., - "loc": ... - } - ``` - - Note that you are not allowed to call the parser from the - callback—that will corrupt its internal state. - -- **ranges**: Nodes have their start and end characters offsets - recorded in `start` and `end` properties (directly on the node, - rather than the `loc` object, which holds line/column data. To also - add a [semi-standardized][range] "range" property holding a - `[start, end]` array with the same numbers, set the `ranges` option - to `true`. - -- **program**: It is possible to parse multiple files into a single - AST by passing the tree produced by parsing the first file as the - `program` option in subsequent parses. This will add the toplevel - forms of the parsed file to the "Program" (top) node of an existing - parse tree. - -- **sourceFile**: When the `locations` option is `true`, you can pass - this option to add a `source` attribute in every node’s `loc` - object. Note that the contents of this option are not examined or - processed in any way; you are free to use whatever format you - choose. - -- **directSourceFile**: Like `sourceFile`, but a `sourceFile` property - will be added directly to the nodes, rather than the `loc` object. - -- **preserveParens**: If this option is `true`, parenthesized expressions - are represented by (non-standard) `ParenthesizedExpression` nodes - that have a single `expression` property containing the expression - inside parentheses. - -[range]: https://bugzilla.mozilla.org/show_bug.cgi?id=745678 - -**parseExpressionAt**`(input, offset, options)` will parse a single -expression in a string, and return its AST. It will not complain if -there is more of the string left after the expression. - -**getLineInfo**`(input, offset)` can be used to get a `{line, -column}` object for a given program string and character offset. - -**tokenizer**`(input, options)` returns an object with a `getToken` -method that can be called repeatedly to get the next token, a `{start, -end, type, value}` object (with added `loc` property when the -`locations` option is enabled and `range` property when the `ranges` -option is enabled). When the token's type is `tokTypes.eof`, you -should stop calling the method, since it will keep returning that same -token forever. - -In ES6 environment, returned result can be used as any other -protocol-compliant iterable: - -```javascript -for (let token of acorn.tokenize(str)) { - // iterate over the tokens -} - -// transform code to array of tokens: -var tokens = [...acorn.tokenize(str)]; -``` - -**tokTypes** holds an object mapping names to the token type objects -that end up in the `type` properties of tokens. - -#### Note on using with [Escodegen][escodegen] - -Escodegen supports generating comments from AST, attached in -Esprima-specific format. In order to simulate same format in -Acorn, consider following example: - -```javascript -var comments = [], tokens = []; - -var ast = acorn.parse('var x = 42; // answer', { - // collect ranges for each node - ranges: true, - // collect comments in Esprima's format - onComment: comments, - // collect token ranges - onToken: tokens -}); - -// attach comments using collected information -escodegen.attachComments(ast, comments, tokens); - -// generate code -console.log(escodegen.generate(ast, {comment: true})); -// > 'var x = 42; // answer' -``` - -[escodegen]: https://github.com/Constellation/escodegen - -#### Using Acorn in an environment with a Content Security Policy - -Some contexts, such as Chrome Web Apps, disallow run-time code evaluation. -Acorn uses `new Function` to generate fast functions that test whether -a word is in a given set, and will trigger a security error when used -in a context with such a -[Content Security Policy](http://www.html5rocks.com/en/tutorials/security/content-security-policy/#eval-too) -(see [#90](https://github.com/marijnh/acorn/issues/90) and -[#123](https://github.com/marijnh/acorn/issues/123)). - -The `dist/acorn_csp.js` file in the distribution (which is built -by the `bin/without_eval` script) has the generated code inlined, and -can thus run without evaluating anything. - -### dist/acorn_loose.js ### - -This file implements an error-tolerant parser. It exposes a single -function. - -**parse_dammit**`(input, options)` takes the same arguments and -returns the same syntax tree as the `parse` function in `acorn.js`, -but never raises an error, and will do its best to parse syntactically -invalid code in as meaningful a way as it can. It'll insert identifier -nodes with name `"✖"` as placeholders in places where it can't make -sense of the input. Depends on `acorn.js`, because it uses the same -tokenizer. - -### dist/walk.js ### - -Implements an abstract syntax tree walker. Will store its interface in -`acorn.walk` when loaded without a module system. - -**simple**`(node, visitors, base, state)` does a 'simple' walk over -a tree. `node` should be the AST node to walk, and `visitors` an -object with properties whose names correspond to node types in the -[Mozilla Parser API][mozapi]. The properties should contain functions -that will be called with the node object and, if applicable the state -at that point. The last two arguments are optional. `base` is a walker -algorithm, and `state` is a start state. The default walker will -simply visit all statements and expressions and not produce a -meaningful state. (An example of a use of state it to track scope at -each point in the tree.) - -**ancestor**`(node, visitors, base, state)` does a 'simple' walk over -a tree, building up an array of ancestor nodes (including the current node) -and passing the array to callbacks in the `state` parameter. - -**recursive**`(node, state, functions, base)` does a 'recursive' -walk, where the walker functions are responsible for continuing the -walk on the child nodes of their target node. `state` is the start -state, and `functions` should contain an object that maps node types -to walker functions. Such functions are called with `(node, state, c)` -arguments, and can cause the walk to continue on a sub-node by calling -the `c` argument on it with `(node, state)` arguments. The optional -`base` argument provides the fallback walker functions for node types -that aren't handled in the `functions` object. If not given, the -default walkers will be used. - -**make**`(functions, base)` builds a new walker object by using the -walker functions in `functions` and filling in the missing ones by -taking defaults from `base`. - -**findNodeAt**`(node, start, end, test, base, state)` tries to -locate a node in a tree at the given start and/or end offsets, which -satisfies the predicate `test`. `start` end `end` can be either `null` -(as wildcard) or a number. `test` may be a string (indicating a node -type) or a function that takes `(nodeType, node)` arguments and -returns a boolean indicating whether this node is interesting. `base` -and `state` are optional, and can be used to specify a custom walker. -Nodes are tested from inner to outer, so if two nodes match the -boundaries, the inner one will be preferred. - -**findNodeAround**`(node, pos, test, base, state)` is a lot like -`findNodeAt`, but will match any node that exists 'around' (spanning) -the given position. - -**findNodeAfter**`(node, pos, test, base, state)` is similar to -`findNodeAround`, but will match all nodes *after* the given position -(testing outer nodes before inner nodes). - -## Command line interface - -The `bin/acorn` utility can be used to parse a file from the command -line. It accepts as arguments its input file and the following -options: - -- `--ecma3|--ecma5|--ecma6`: Sets the ECMAScript version to parse. Default is - version 5. - -- `--locations`: Attaches a "loc" object to each node with "start" and - "end" subobjects, each of which contains the one-based line and - zero-based column numbers in `{line, column}` form. - -- `--allow-hash-bang`: If the code starts with the characters #! (as in a shellscript), the first line will be treated as a comment. - -- `--compact`: No whitespace is used in the AST output. - -- `--silent`: Do not output the AST, just return the exit status. - -- `--help`: Print the usage information and quit. - -The utility spits out the syntax tree as JSON data. - -## Build system - -Acorn is written in ECMAScript 6, as a set of small modules, in the -project's `src` directory, and compiled down to bigger ECMAScript 3 -files in `dist` using [Browserify](http://browserify.org) and -[Babel](http://babeljs.io/). If you are already using Babel, you can -consider including the modules directly. - -The command-line test runner (`npm test`) uses the ES6 modules. The -browser-based test page (`test/index.html`) uses the compiled modules. -The `bin/build-acorn.js` script builds the latter from the former. - -If you are working on Acorn, you'll probably want to try the code out -directly, without an intermediate build step. In your scripts, you can -register the Babel require shim like this: - - require("babelify/node_modules/babel-core/register") - -That will allow you to directly `require` the ES6 modules. - -## Plugins - -Acorn is designed support allow plugins which, within reasonable -bounds, redefine the way the parser works. Plugins can add new token -types and new tokenizer contexts (if necessary), and extend methods in -the parser object. This is not a clean, elegant API—using it requires -an understanding of Acorn's internals, and plugins are likely to break -whenever those internals are significantly changed. But still, it is -_possible_, in this way, to create parsers for JavaScript dialects -without forking all of Acorn. And in principle it is even possible to -combine such plugins, so that if you have, for example, a plugin for -parsing types and a plugin for parsing JSX-style XML literals, you -could load them both and parse code with both JSX tags and types. - -A plugin should register itself by adding a property to -`acorn.plugins`, which holds a function. Calling `acorn.parse`, a -`plugin` option can be passed, holding an object mapping plugin names -to configuration values (or just `true` for plugins that don't take -options). After the parser object has been created, the initialization -functions for the chosen plugins are called with `(parser, -configValue)` arguments. They are expected to use the `parser.extend` -method to extend parser methods. For example, the `readToken` method -could be extended like this: - -```javascript -parser.extend("readToken", function(nextMethod) { - return function(code) { - console.log("Reading a token!") - return nextMethod.call(this, code) - } -}) -``` - -The `nextMethod` argument passed to `extend`'s second argument is the -previous value of this method, and should usually be called through to -whenever the extended method does not handle the call itself. - -There is a proof-of-concept JSX plugin in the [`jsx` -branch](https://github.com/marijnh/acorn/tree/jsx) branch of the -Github repository. diff --git a/node_modules/browserify/node_modules/insert-module-globals/node_modules/lexical-scope/node_modules/astw/node_modules/acorn/bin/acorn b/node_modules/browserify/node_modules/insert-module-globals/node_modules/lexical-scope/node_modules/astw/node_modules/acorn/bin/acorn deleted file mode 100755 index 76d8178b..00000000 --- a/node_modules/browserify/node_modules/insert-module-globals/node_modules/lexical-scope/node_modules/astw/node_modules/acorn/bin/acorn +++ /dev/null @@ -1,54 +0,0 @@ -#!/usr/bin/env node - -var path = require("path"); -var fs = require("fs"); -var acorn = require("../dist/acorn.js"); - -var infile, parsed, tokens, options = {}, silent = false, compact = false, tokenize = false; - -function help(status) { - var print = (status == 0) ? console.log : console.error; - print("usage: " + path.basename(process.argv[1]) + " [--ecma3|--ecma5|--ecma6]"); - print(" [--tokenize] [--locations] [---allow-hash-bang] [--compact] [--silent] [--help] [--] infile"); - process.exit(status); -} - -for (var i = 2; i < process.argv.length; ++i) { - var arg = process.argv[i]; - if (arg[0] != "-" && !infile) infile = arg; - else if (arg == "--" && !infile && i + 2 == process.argv.length) infile = process.argv[++i]; - else if (arg == "--ecma3") options.ecmaVersion = 3; - else if (arg == "--ecma5") options.ecmaVersion = 5; - else if (arg == "--ecma6") options.ecmaVersion = 6; - else if (arg == "--ecma7") options.ecmaVersion = 7; - else if (arg == "--locations") options.locations = true; - else if (arg == "--allow-hash-bang") options.allowHashBang = true; - else if (arg == "--silent") silent = true; - else if (arg == "--compact") compact = true; - else if (arg == "--help") help(0); - else if (arg == "--tokenize") tokenize = true; - else help(1); -} - -try { - var code = fs.readFileSync(infile, "utf8"); - - if (!tokenize) - parsed = acorn.parse(code, options); - else { - var get = acorn.tokenize(code, options); - tokens = []; - while (true) { - var token = get(); - tokens.push(token); - if (token.type.type == "eof") - break; - } - } -} catch(e) { - console.log(e.message); - process.exit(1); -} - -if (!silent) - console.log(JSON.stringify(tokenize ? tokens : parsed, null, compact ? null : 2)); diff --git a/node_modules/browserify/node_modules/insert-module-globals/node_modules/lexical-scope/node_modules/astw/node_modules/acorn/bin/build-acorn.js b/node_modules/browserify/node_modules/insert-module-globals/node_modules/lexical-scope/node_modules/astw/node_modules/acorn/bin/build-acorn.js deleted file mode 100644 index a97b7575..00000000 --- a/node_modules/browserify/node_modules/insert-module-globals/node_modules/lexical-scope/node_modules/astw/node_modules/acorn/bin/build-acorn.js +++ /dev/null @@ -1,51 +0,0 @@ -var fs = require("fs"), path = require("path") -var stream = require("stream") - -var browserify = require("browserify") -var babelify = require("babelify").configure({loose: "all"}) - -process.chdir(path.resolve(__dirname, "..")) - -browserify({standalone: "acorn"}) - .plugin(require('browserify-derequire')) - .transform(babelify) - .require("./src/index.js", {entry: true}) - .bundle() - .on("error", function (err) { console.log("Error: " + err.message) }) - .pipe(fs.createWriteStream("dist/acorn.js")) - -function acornShim(file) { - var tr = new stream.Transform - if (file == path.resolve(__dirname, "../src/index.js")) { - var sent = false - tr._transform = function(chunk, _, callback) { - if (!sent) { - sent = true - callback(null, "module.exports = typeof acorn != 'undefined' ? acorn : _dereq_(\"./acorn\")") - } else { - callback() - } - } - } else { - tr._transform = function(chunk, _, callback) { callback(null, chunk) } - } - return tr -} - -browserify({standalone: "acorn.loose"}) - .plugin(require('browserify-derequire')) - .transform(acornShim) - .transform(babelify) - .require("./src/loose/index.js", {entry: true}) - .bundle() - .on("error", function (err) { console.log("Error: " + err.message) }) - .pipe(fs.createWriteStream("dist/acorn_loose.js")) - -browserify({standalone: "acorn.walk"}) - .plugin(require('browserify-derequire')) - .transform(acornShim) - .transform(babelify) - .require("./src/walk/index.js", {entry: true}) - .bundle() - .on("error", function (err) { console.log("Error: " + err.message) }) - .pipe(fs.createWriteStream("dist/walk.js")) diff --git a/node_modules/browserify/node_modules/insert-module-globals/node_modules/lexical-scope/node_modules/astw/node_modules/acorn/bin/generate-identifier-regex.js b/node_modules/browserify/node_modules/insert-module-globals/node_modules/lexical-scope/node_modules/astw/node_modules/acorn/bin/generate-identifier-regex.js deleted file mode 100644 index 0d7c50fc..00000000 --- a/node_modules/browserify/node_modules/insert-module-globals/node_modules/lexical-scope/node_modules/astw/node_modules/acorn/bin/generate-identifier-regex.js +++ /dev/null @@ -1,47 +0,0 @@ -// Note: run `npm install unicode-7.0.0` first. - -// Which Unicode version should be used? -var version = '7.0.0'; - -var start = require('unicode-' + version + '/properties/ID_Start/code-points') - .filter(function(ch) { return ch > 127; }); -var cont = [0x200c, 0x200d].concat(require('unicode-' + version + '/properties/ID_Continue/code-points') - .filter(function(ch) { return ch > 127 && start.indexOf(ch) == -1; })); - -function pad(str, width) { - while (str.length < width) str = "0" + str; - return str; -} - -function esc(code) { - var hex = code.toString(16); - if (hex.length <= 2) return "\\x" + pad(hex, 2); - else return "\\u" + pad(hex, 4); -} - -function generate(chars) { - var astral = [], re = ""; - for (var i = 0, at = 0x10000; i < chars.length; i++) { - var from = chars[i], to = from; - while (i < chars.length - 1 && chars[i + 1] == to + 1) { - i++; - to++; - } - if (to <= 0xffff) { - if (from == to) re += esc(from); - else if (from + 1 == to) re += esc(from) + esc(to); - else re += esc(from) + "-" + esc(to); - } else { - astral.push(from - at, to - from); - at = to; - } - } - return {nonASCII: re, astral: astral}; -} - -var startData = generate(start), contData = generate(cont); - -console.log(" var nonASCIIidentifierStartChars = \"" + startData.nonASCII + "\";"); -console.log(" var nonASCIIidentifierChars = \"" + contData.nonASCII + "\";"); -console.log(" var astralIdentifierStartCodes = " + JSON.stringify(startData.astral) + ";"); -console.log(" var astralIdentifierCodes = " + JSON.stringify(contData.astral) + ";"); diff --git a/node_modules/browserify/node_modules/insert-module-globals/node_modules/lexical-scope/node_modules/astw/node_modules/acorn/bin/prepublish.sh b/node_modules/browserify/node_modules/insert-module-globals/node_modules/lexical-scope/node_modules/astw/node_modules/acorn/bin/prepublish.sh deleted file mode 100755 index 879834da..00000000 --- a/node_modules/browserify/node_modules/insert-module-globals/node_modules/lexical-scope/node_modules/astw/node_modules/acorn/bin/prepublish.sh +++ /dev/null @@ -1,2 +0,0 @@ -node bin/build-acorn.js -node bin/without_eval > dist/acorn_csp.js diff --git a/node_modules/browserify/node_modules/insert-module-globals/node_modules/lexical-scope/node_modules/astw/node_modules/acorn/bin/update_authors.sh b/node_modules/browserify/node_modules/insert-module-globals/node_modules/lexical-scope/node_modules/astw/node_modules/acorn/bin/update_authors.sh deleted file mode 100755 index 466c8db5..00000000 --- a/node_modules/browserify/node_modules/insert-module-globals/node_modules/lexical-scope/node_modules/astw/node_modules/acorn/bin/update_authors.sh +++ /dev/null @@ -1,6 +0,0 @@ -# Combine existing list of authors with everyone known in git, sort, add header. -tail --lines=+3 AUTHORS > AUTHORS.tmp -git log --format='%aN' | grep -v abraidwood >> AUTHORS.tmp -echo -e "List of Acorn contributors. Updated before every release.\n" > AUTHORS -sort -u AUTHORS.tmp >> AUTHORS -rm -f AUTHORS.tmp diff --git a/node_modules/browserify/node_modules/insert-module-globals/node_modules/lexical-scope/node_modules/astw/node_modules/acorn/bin/without_eval b/node_modules/browserify/node_modules/insert-module-globals/node_modules/lexical-scope/node_modules/astw/node_modules/acorn/bin/without_eval deleted file mode 100755 index 4331e707..00000000 --- a/node_modules/browserify/node_modules/insert-module-globals/node_modules/lexical-scope/node_modules/astw/node_modules/acorn/bin/without_eval +++ /dev/null @@ -1,48 +0,0 @@ -#!/usr/bin/env node - -var fs = require("fs") - -var acornSrc = fs.readFileSync(require.resolve("../dist/acorn"), "utf8") -var acorn = require("../dist/acorn"), walk = require("../dist/walk") - -var ast = acorn.parse(acornSrc) -var touchups = [], uses = [] - -var makePred - -walk.simple(ast, { - FunctionDeclaration: function(node) { - if (node.id.name == "makePredicate") { - makePred = node - touchups.push({text: "// Removed to create an eval-free library", from: node.start, to: node.end}) - } - }, - ObjectExpression: function(node) { - node.properties.forEach(function(prop) { - if (prop.value.type == "CallExpression" && - prop.value.callee.name == "makePredicate") - uses.push(prop.value) - }) - } -}) - -var results = [] -var dryRun = acornSrc.slice(0, makePred.end) + "; makePredicate = (function(mp) {" + - "return function(words) { var r = mp(words); predicates.push(r); return r }})(makePredicate);" + - acornSrc.slice(makePred.end) -;(new Function("predicates", dryRun))(results) - -uses.forEach(function (node, i) { - touchups.push({text: results[i].toString(), from: node.start, to: node.end}) -}) - -var result = "", pos = 0 -touchups.sort(function(a, b) { return a.from - b.from }) -touchups.forEach(function(touchup) { - result += acornSrc.slice(pos, touchup.from) - result += touchup.text - pos = touchup.to -}) -result += acornSrc.slice(pos) - -process.stdout.write(result) diff --git a/node_modules/browserify/node_modules/insert-module-globals/node_modules/lexical-scope/node_modules/astw/node_modules/acorn/dist/.keep b/node_modules/browserify/node_modules/insert-module-globals/node_modules/lexical-scope/node_modules/astw/node_modules/acorn/dist/.keep deleted file mode 100644 index e69de29b..00000000 diff --git a/node_modules/browserify/node_modules/insert-module-globals/node_modules/lexical-scope/node_modules/astw/node_modules/acorn/dist/acorn.js b/node_modules/browserify/node_modules/insert-module-globals/node_modules/lexical-scope/node_modules/astw/node_modules/acorn/dist/acorn.js deleted file mode 100644 index 1f1b6f24..00000000 --- a/node_modules/browserify/node_modules/insert-module-globals/node_modules/lexical-scope/node_modules/astw/node_modules/acorn/dist/acorn.js +++ /dev/null @@ -1,4014 +0,0 @@ -(function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.acorn = f()}})(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o= len) return x; - switch (x) { - case '%s': return String(args[i++]); - case '%d': return Number(args[i++]); - case '%j': - try { - return JSON.stringify(args[i++]); - } catch (_) { - return '[Circular]'; - } - default: - return x; - } - }); - for (var x = args[i]; i < len; x = args[++i]) { - if (isNull(x) || !isObject(x)) { - str += ' ' + x; - } else { - str += ' ' + inspect(x); - } - } - return str; -}; - - -// Mark that a method should not be used. -// Returns a modified function which warns once by default. -// If --no-deprecation is set, then it is a no-op. -exports.deprecate = function(fn, msg) { - // Allow for deprecating things in the process of starting up. - if (isUndefined(global.process)) { - return function() { - return exports.deprecate(fn, msg).apply(this, arguments); - }; - } - - if (process.noDeprecation === true) { - return fn; - } - - var warned = false; - function deprecated() { - if (!warned) { - if (process.throwDeprecation) { - throw new Error(msg); - } else if (process.traceDeprecation) { - console.trace(msg); - } else { - console.error(msg); - } - warned = true; - } - return fn.apply(this, arguments); - } - - return deprecated; -}; - - -var debugs = {}; -var debugEnviron; -exports.debuglog = function(set) { - if (isUndefined(debugEnviron)) - debugEnviron = process.env.NODE_DEBUG || ''; - set = set.toUpperCase(); - if (!debugs[set]) { - if (new RegExp('\\b' + set + '\\b', 'i').test(debugEnviron)) { - var pid = process.pid; - debugs[set] = function() { - var msg = exports.format.apply(exports, arguments); - console.error('%s %d: %s', set, pid, msg); - }; - } else { - debugs[set] = function() {}; - } - } - return debugs[set]; -}; - - -/** - * Echos the value of a value. Trys to print the value out - * in the best way possible given the different types. - * - * @param {Object} obj The object to print out. - * @param {Object} opts Optional options object that alters the output. - */ -/* legacy: obj, showHidden, depth, colors*/ -function inspect(obj, opts) { - // default options - var ctx = { - seen: [], - stylize: stylizeNoColor - }; - // legacy... - if (arguments.length >= 3) ctx.depth = arguments[2]; - if (arguments.length >= 4) ctx.colors = arguments[3]; - if (isBoolean(opts)) { - // legacy... - ctx.showHidden = opts; - } else if (opts) { - // got an "options" object - exports._extend(ctx, opts); - } - // set default options - if (isUndefined(ctx.showHidden)) ctx.showHidden = false; - if (isUndefined(ctx.depth)) ctx.depth = 2; - if (isUndefined(ctx.colors)) ctx.colors = false; - if (isUndefined(ctx.customInspect)) ctx.customInspect = true; - if (ctx.colors) ctx.stylize = stylizeWithColor; - return formatValue(ctx, obj, ctx.depth); -} -exports.inspect = inspect; - - -// http://en.wikipedia.org/wiki/ANSI_escape_code#graphics -inspect.colors = { - 'bold' : [1, 22], - 'italic' : [3, 23], - 'underline' : [4, 24], - 'inverse' : [7, 27], - 'white' : [37, 39], - 'grey' : [90, 39], - 'black' : [30, 39], - 'blue' : [34, 39], - 'cyan' : [36, 39], - 'green' : [32, 39], - 'magenta' : [35, 39], - 'red' : [31, 39], - 'yellow' : [33, 39] -}; - -// Don't use 'blue' not visible on cmd.exe -inspect.styles = { - 'special': 'cyan', - 'number': 'yellow', - 'boolean': 'yellow', - 'undefined': 'grey', - 'null': 'bold', - 'string': 'green', - 'date': 'magenta', - // "name": intentionally not styling - 'regexp': 'red' -}; - - -function stylizeWithColor(str, styleType) { - var style = inspect.styles[styleType]; - - if (style) { - return '\u001b[' + inspect.colors[style][0] + 'm' + str + - '\u001b[' + inspect.colors[style][1] + 'm'; - } else { - return str; - } -} - - -function stylizeNoColor(str, styleType) { - return str; -} - - -function arrayToHash(array) { - var hash = {}; - - array.forEach(function(val, idx) { - hash[val] = true; - }); - - return hash; -} - - -function formatValue(ctx, value, recurseTimes) { - // Provide a hook for user-specified inspect functions. - // Check that value is an object with an inspect function on it - if (ctx.customInspect && - value && - isFunction(value.inspect) && - // Filter out the util module, it's inspect function is special - value.inspect !== exports.inspect && - // Also filter out any prototype objects using the circular check. - !(value.constructor && value.constructor.prototype === value)) { - var ret = value.inspect(recurseTimes, ctx); - if (!isString(ret)) { - ret = formatValue(ctx, ret, recurseTimes); - } - return ret; - } - - // Primitive types cannot have properties - var primitive = formatPrimitive(ctx, value); - if (primitive) { - return primitive; - } - - // Look up the keys of the object. - var keys = Object.keys(value); - var visibleKeys = arrayToHash(keys); - - if (ctx.showHidden) { - keys = Object.getOwnPropertyNames(value); - } - - // IE doesn't make error fields non-enumerable - // http://msdn.microsoft.com/en-us/library/ie/dww52sbt(v=vs.94).aspx - if (isError(value) - && (keys.indexOf('message') >= 0 || keys.indexOf('description') >= 0)) { - return formatError(value); - } - - // Some type of object without properties can be shortcutted. - if (keys.length === 0) { - if (isFunction(value)) { - var name = value.name ? ': ' + value.name : ''; - return ctx.stylize('[Function' + name + ']', 'special'); - } - if (isRegExp(value)) { - return ctx.stylize(RegExp.prototype.toString.call(value), 'regexp'); - } - if (isDate(value)) { - return ctx.stylize(Date.prototype.toString.call(value), 'date'); - } - if (isError(value)) { - return formatError(value); - } - } - - var base = '', array = false, braces = ['{', '}']; - - // Make Array say that they are Array - if (isArray(value)) { - array = true; - braces = ['[', ']']; - } - - // Make functions say that they are functions - if (isFunction(value)) { - var n = value.name ? ': ' + value.name : ''; - base = ' [Function' + n + ']'; - } - - // Make RegExps say that they are RegExps - if (isRegExp(value)) { - base = ' ' + RegExp.prototype.toString.call(value); - } - - // Make dates with properties first say the date - if (isDate(value)) { - base = ' ' + Date.prototype.toUTCString.call(value); - } - - // Make error with message first say the error - if (isError(value)) { - base = ' ' + formatError(value); - } - - if (keys.length === 0 && (!array || value.length == 0)) { - return braces[0] + base + braces[1]; - } - - if (recurseTimes < 0) { - if (isRegExp(value)) { - return ctx.stylize(RegExp.prototype.toString.call(value), 'regexp'); - } else { - return ctx.stylize('[Object]', 'special'); - } - } - - ctx.seen.push(value); - - var output; - if (array) { - output = formatArray(ctx, value, recurseTimes, visibleKeys, keys); - } else { - output = keys.map(function(key) { - return formatProperty(ctx, value, recurseTimes, visibleKeys, key, array); - }); - } - - ctx.seen.pop(); - - return reduceToSingleString(output, base, braces); -} - - -function formatPrimitive(ctx, value) { - if (isUndefined(value)) - return ctx.stylize('undefined', 'undefined'); - if (isString(value)) { - var simple = '\'' + JSON.stringify(value).replace(/^"|"$/g, '') - .replace(/'/g, "\\'") - .replace(/\\"/g, '"') + '\''; - return ctx.stylize(simple, 'string'); - } - if (isNumber(value)) - return ctx.stylize('' + value, 'number'); - if (isBoolean(value)) - return ctx.stylize('' + value, 'boolean'); - // For some reason typeof null is "object", so special case here. - if (isNull(value)) - return ctx.stylize('null', 'null'); -} - - -function formatError(value) { - return '[' + Error.prototype.toString.call(value) + ']'; -} - - -function formatArray(ctx, value, recurseTimes, visibleKeys, keys) { - var output = []; - for (var i = 0, l = value.length; i < l; ++i) { - if (hasOwnProperty(value, String(i))) { - output.push(formatProperty(ctx, value, recurseTimes, visibleKeys, - String(i), true)); - } else { - output.push(''); - } - } - keys.forEach(function(key) { - if (!key.match(/^\d+$/)) { - output.push(formatProperty(ctx, value, recurseTimes, visibleKeys, - key, true)); - } - }); - return output; -} - - -function formatProperty(ctx, value, recurseTimes, visibleKeys, key, array) { - var name, str, desc; - desc = Object.getOwnPropertyDescriptor(value, key) || { value: value[key] }; - if (desc.get) { - if (desc.set) { - str = ctx.stylize('[Getter/Setter]', 'special'); - } else { - str = ctx.stylize('[Getter]', 'special'); - } - } else { - if (desc.set) { - str = ctx.stylize('[Setter]', 'special'); - } - } - if (!hasOwnProperty(visibleKeys, key)) { - name = '[' + key + ']'; - } - if (!str) { - if (ctx.seen.indexOf(desc.value) < 0) { - if (isNull(recurseTimes)) { - str = formatValue(ctx, desc.value, null); - } else { - str = formatValue(ctx, desc.value, recurseTimes - 1); - } - if (str.indexOf('\n') > -1) { - if (array) { - str = str.split('\n').map(function(line) { - return ' ' + line; - }).join('\n').substr(2); - } else { - str = '\n' + str.split('\n').map(function(line) { - return ' ' + line; - }).join('\n'); - } - } - } else { - str = ctx.stylize('[Circular]', 'special'); - } - } - if (isUndefined(name)) { - if (array && key.match(/^\d+$/)) { - return str; - } - name = JSON.stringify('' + key); - if (name.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)) { - name = name.substr(1, name.length - 2); - name = ctx.stylize(name, 'name'); - } else { - name = name.replace(/'/g, "\\'") - .replace(/\\"/g, '"') - .replace(/(^"|"$)/g, "'"); - name = ctx.stylize(name, 'string'); - } - } - - return name + ': ' + str; -} - - -function reduceToSingleString(output, base, braces) { - var numLinesEst = 0; - var length = output.reduce(function(prev, cur) { - numLinesEst++; - if (cur.indexOf('\n') >= 0) numLinesEst++; - return prev + cur.replace(/\u001b\[\d\d?m/g, '').length + 1; - }, 0); - - if (length > 60) { - return braces[0] + - (base === '' ? '' : base + '\n ') + - ' ' + - output.join(',\n ') + - ' ' + - braces[1]; - } - - return braces[0] + base + ' ' + output.join(', ') + ' ' + braces[1]; -} - - -// NOTE: These type checking functions intentionally don't use `instanceof` -// because it is fragile and can be easily faked with `Object.create()`. -function isArray(ar) { - return Array.isArray(ar); -} -exports.isArray = isArray; - -function isBoolean(arg) { - return typeof arg === 'boolean'; -} -exports.isBoolean = isBoolean; - -function isNull(arg) { - return arg === null; -} -exports.isNull = isNull; - -function isNullOrUndefined(arg) { - return arg == null; -} -exports.isNullOrUndefined = isNullOrUndefined; - -function isNumber(arg) { - return typeof arg === 'number'; -} -exports.isNumber = isNumber; - -function isString(arg) { - return typeof arg === 'string'; -} -exports.isString = isString; - -function isSymbol(arg) { - return typeof arg === 'symbol'; -} -exports.isSymbol = isSymbol; - -function isUndefined(arg) { - return arg === void 0; -} -exports.isUndefined = isUndefined; - -function isRegExp(re) { - return isObject(re) && objectToString(re) === '[object RegExp]'; -} -exports.isRegExp = isRegExp; - -function isObject(arg) { - return typeof arg === 'object' && arg !== null; -} -exports.isObject = isObject; - -function isDate(d) { - return isObject(d) && objectToString(d) === '[object Date]'; -} -exports.isDate = isDate; - -function isError(e) { - return isObject(e) && - (objectToString(e) === '[object Error]' || e instanceof Error); -} -exports.isError = isError; - -function isFunction(arg) { - return typeof arg === 'function'; -} -exports.isFunction = isFunction; - -function isPrimitive(arg) { - return arg === null || - typeof arg === 'boolean' || - typeof arg === 'number' || - typeof arg === 'string' || - typeof arg === 'symbol' || // ES6 symbol - typeof arg === 'undefined'; -} -exports.isPrimitive = isPrimitive; - -exports.isBuffer = _dereq_('./support/isBuffer'); - -function objectToString(o) { - return Object.prototype.toString.call(o); -} - - -function pad(n) { - return n < 10 ? '0' + n.toString(10) : n.toString(10); -} - - -var months = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', - 'Oct', 'Nov', 'Dec']; - -// 26 Feb 16:19:34 -function timestamp() { - var d = new Date(); - var time = [pad(d.getHours()), - pad(d.getMinutes()), - pad(d.getSeconds())].join(':'); - return [d.getDate(), months[d.getMonth()], time].join(' '); -} - - -// log is just a thin wrapper to console.log that prepends a timestamp -exports.log = function() { - console.log('%s - %s', timestamp(), exports.format.apply(exports, arguments)); -}; - - -/** - * Inherit the prototype methods from one constructor into another. - * - * The Function.prototype.inherits from lang.js rewritten as a standalone - * function (not on Function.prototype). NOTE: If this file is to be loaded - * during bootstrapping this function needs to be rewritten using some native - * functions as prototype setup using normal JavaScript does not work as - * expected during bootstrapping (see mirror.js in r114903). - * - * @param {function} ctor Constructor function which needs to inherit the - * prototype. - * @param {function} superCtor Constructor function to inherit prototype from. - */ -exports.inherits = _dereq_('inherits'); - -exports._extend = function(origin, add) { - // Don't do anything if add isn't an object - if (!add || !isObject(add)) return origin; - - var keys = Object.keys(add); - var i = keys.length; - while (i--) { - origin[keys[i]] = add[keys[i]]; - } - return origin; -}; - -function hasOwnProperty(obj, prop) { - return Object.prototype.hasOwnProperty.call(obj, prop); -} - -}).call(this,_dereq_('_process'),typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) -},{"./support/isBuffer":4,"_process":3,"inherits":2}],6:[function(_dereq_,module,exports){ -// A recursive descent parser operates by defining functions for all -// syntactic elements, and recursively calling those, each function -// advancing the input stream and returning an AST node. Precedence -// of constructs (for example, the fact that `!x[1]` means `!(x[1])` -// instead of `(!x)[1]` is handled by the fact that the parser -// function that parses unary prefix operators is called first, and -// in turn calls the function that parses `[]` subscripts — that -// way, it'll receive the node for `x[1]` already parsed, and wraps -// *that* in the unary operator node. -// -// Acorn uses an [operator precedence parser][opp] to handle binary -// operator precedence, because it is much more compact than using -// the technique outlined above, which uses different, nesting -// functions to specify precedence, for all of the ten binary -// precedence levels that JavaScript defines. -// -// [opp]: http://en.wikipedia.org/wiki/Operator-precedence_parser - -"use strict"; - -var tt = _dereq_("./tokentype").types; - -var Parser = _dereq_("./state").Parser; - -var reservedWords = _dereq_("./identifier").reservedWords; - -var has = _dereq_("./util").has; - -var pp = Parser.prototype; - -// Check if property name clashes with already added. -// Object/class getters and setters are not allowed to clash — -// either with each other or with an init property — and in -// strict mode, init properties are also not allowed to be repeated. - -pp.checkPropClash = function (prop, propHash) { - if (this.options.ecmaVersion >= 6) return; - var key = prop.key, - name = undefined; - switch (key.type) { - case "Identifier": - name = key.name;break; - case "Literal": - name = String(key.value);break; - default: - return; - } - var kind = prop.kind || "init", - other = undefined; - if (has(propHash, name)) { - other = propHash[name]; - var isGetSet = kind !== "init"; - if ((this.strict || isGetSet) && other[kind] || !(isGetSet ^ other.init)) this.raise(key.start, "Redefinition of property"); - } else { - other = propHash[name] = { - init: false, - get: false, - set: false - }; - } - other[kind] = true; -}; - -// ### Expression parsing - -// These nest, from the most general expression type at the top to -// 'atomic', nondivisible expression types at the bottom. Most of -// the functions will simply let the function(s) below them parse, -// and, *if* the syntactic construct they handle is present, wrap -// the AST node that the inner parser gave them in another node. - -// Parse a full expression. The optional arguments are used to -// forbid the `in` operator (in for loops initalization expressions) -// and provide reference for storing '=' operator inside shorthand -// property assignment in contexts where both object expression -// and object pattern might appear (so it's possible to raise -// delayed syntax error at correct position). - -pp.parseExpression = function (noIn, refShorthandDefaultPos) { - var startPos = this.start, - startLoc = this.startLoc; - var expr = this.parseMaybeAssign(noIn, refShorthandDefaultPos); - if (this.type === tt.comma) { - var node = this.startNodeAt(startPos, startLoc); - node.expressions = [expr]; - while (this.eat(tt.comma)) node.expressions.push(this.parseMaybeAssign(noIn, refShorthandDefaultPos)); - return this.finishNode(node, "SequenceExpression"); - } - return expr; -}; - -// Parse an assignment expression. This includes applications of -// operators like `+=`. - -pp.parseMaybeAssign = function (noIn, refShorthandDefaultPos, afterLeftParse) { - if (this.type == tt._yield && this.inGenerator) return this.parseYield(); - - var failOnShorthandAssign = undefined; - if (!refShorthandDefaultPos) { - refShorthandDefaultPos = { start: 0 }; - failOnShorthandAssign = true; - } else { - failOnShorthandAssign = false; - } - var startPos = this.start, - startLoc = this.startLoc; - if (this.type == tt.parenL || this.type == tt.name) this.potentialArrowAt = this.start; - var left = this.parseMaybeConditional(noIn, refShorthandDefaultPos); - if (afterLeftParse) left = afterLeftParse.call(this, left, startPos, startLoc); - if (this.type.isAssign) { - var node = this.startNodeAt(startPos, startLoc); - node.operator = this.value; - node.left = this.type === tt.eq ? this.toAssignable(left) : left; - refShorthandDefaultPos.start = 0; // reset because shorthand default was used correctly - this.checkLVal(left); - this.next(); - node.right = this.parseMaybeAssign(noIn); - return this.finishNode(node, "AssignmentExpression"); - } else if (failOnShorthandAssign && refShorthandDefaultPos.start) { - this.unexpected(refShorthandDefaultPos.start); - } - return left; -}; - -// Parse a ternary conditional (`?:`) operator. - -pp.parseMaybeConditional = function (noIn, refShorthandDefaultPos) { - var startPos = this.start, - startLoc = this.startLoc; - var expr = this.parseExprOps(noIn, refShorthandDefaultPos); - if (refShorthandDefaultPos && refShorthandDefaultPos.start) return expr; - if (this.eat(tt.question)) { - var node = this.startNodeAt(startPos, startLoc); - node.test = expr; - node.consequent = this.parseMaybeAssign(); - this.expect(tt.colon); - node.alternate = this.parseMaybeAssign(noIn); - return this.finishNode(node, "ConditionalExpression"); - } - return expr; -}; - -// Start the precedence parser. - -pp.parseExprOps = function (noIn, refShorthandDefaultPos) { - var startPos = this.start, - startLoc = this.startLoc; - var expr = this.parseMaybeUnary(refShorthandDefaultPos); - if (refShorthandDefaultPos && refShorthandDefaultPos.start) return expr; - return this.parseExprOp(expr, startPos, startLoc, -1, noIn); -}; - -// Parse binary operators with the operator precedence parsing -// algorithm. `left` is the left-hand side of the operator. -// `minPrec` provides context that allows the function to stop and -// defer further parser to one of its callers when it encounters an -// operator that has a lower precedence than the set it is parsing. - -pp.parseExprOp = function (left, leftStartPos, leftStartLoc, minPrec, noIn) { - var prec = this.type.binop; - if (Array.isArray(leftStartPos)) { - if (this.options.locations && noIn === undefined) { - // shift arguments to left by one - noIn = minPrec; - minPrec = leftStartLoc; - // flatten leftStartPos - leftStartLoc = leftStartPos[1]; - leftStartPos = leftStartPos[0]; - } - } - if (prec != null && (!noIn || this.type !== tt._in)) { - if (prec > minPrec) { - var node = this.startNodeAt(leftStartPos, leftStartLoc); - node.left = left; - node.operator = this.value; - var op = this.type; - this.next(); - var startPos = this.start, - startLoc = this.startLoc; - node.right = this.parseExprOp(this.parseMaybeUnary(), startPos, startLoc, prec, noIn); - this.finishNode(node, op === tt.logicalOR || op === tt.logicalAND ? "LogicalExpression" : "BinaryExpression"); - return this.parseExprOp(node, leftStartPos, leftStartLoc, minPrec, noIn); - } - } - return left; -}; - -// Parse unary operators, both prefix and postfix. - -pp.parseMaybeUnary = function (refShorthandDefaultPos) { - if (this.type.prefix) { - var node = this.startNode(), - update = this.type === tt.incDec; - node.operator = this.value; - node.prefix = true; - this.next(); - node.argument = this.parseMaybeUnary(); - if (refShorthandDefaultPos && refShorthandDefaultPos.start) this.unexpected(refShorthandDefaultPos.start); - if (update) this.checkLVal(node.argument);else if (this.strict && node.operator === "delete" && node.argument.type === "Identifier") this.raise(node.start, "Deleting local variable in strict mode"); - return this.finishNode(node, update ? "UpdateExpression" : "UnaryExpression"); - } - var startPos = this.start, - startLoc = this.startLoc; - var expr = this.parseExprSubscripts(refShorthandDefaultPos); - if (refShorthandDefaultPos && refShorthandDefaultPos.start) return expr; - while (this.type.postfix && !this.canInsertSemicolon()) { - var node = this.startNodeAt(startPos, startLoc); - node.operator = this.value; - node.prefix = false; - node.argument = expr; - this.checkLVal(expr); - this.next(); - expr = this.finishNode(node, "UpdateExpression"); - } - return expr; -}; - -// Parse call, dot, and `[]`-subscript expressions. - -pp.parseExprSubscripts = function (refShorthandDefaultPos) { - var startPos = this.start, - startLoc = this.startLoc; - var expr = this.parseExprAtom(refShorthandDefaultPos); - if (refShorthandDefaultPos && refShorthandDefaultPos.start) return expr; - return this.parseSubscripts(expr, startPos, startLoc); -}; - -pp.parseSubscripts = function (base, startPos, startLoc, noCalls) { - if (Array.isArray(startPos)) { - if (this.options.locations && noCalls === undefined) { - // shift arguments to left by one - noCalls = startLoc; - // flatten startPos - startLoc = startPos[1]; - startPos = startPos[0]; - } - } - for (;;) { - if (this.eat(tt.dot)) { - var node = this.startNodeAt(startPos, startLoc); - node.object = base; - node.property = this.parseIdent(true); - node.computed = false; - base = this.finishNode(node, "MemberExpression"); - } else if (this.eat(tt.bracketL)) { - var node = this.startNodeAt(startPos, startLoc); - node.object = base; - node.property = this.parseExpression(); - node.computed = true; - this.expect(tt.bracketR); - base = this.finishNode(node, "MemberExpression"); - } else if (!noCalls && this.eat(tt.parenL)) { - var node = this.startNodeAt(startPos, startLoc); - node.callee = base; - node.arguments = this.parseExprList(tt.parenR, false); - base = this.finishNode(node, "CallExpression"); - } else if (this.type === tt.backQuote) { - var node = this.startNodeAt(startPos, startLoc); - node.tag = base; - node.quasi = this.parseTemplate(); - base = this.finishNode(node, "TaggedTemplateExpression"); - } else { - return base; - } - } -}; - -// Parse an atomic expression — either a single token that is an -// expression, an expression started by a keyword like `function` or -// `new`, or an expression wrapped in punctuation like `()`, `[]`, -// or `{}`. - -pp.parseExprAtom = function (refShorthandDefaultPos) { - var node = undefined, - canBeArrow = this.potentialArrowAt == this.start; - switch (this.type) { - case tt._this: - case tt._super: - var type = this.type === tt._this ? "ThisExpression" : "Super"; - node = this.startNode(); - this.next(); - return this.finishNode(node, type); - - case tt._yield: - if (this.inGenerator) this.unexpected(); - - case tt.name: - var startPos = this.start, - startLoc = this.startLoc; - var id = this.parseIdent(this.type !== tt.name); - if (canBeArrow && !this.canInsertSemicolon() && this.eat(tt.arrow)) return this.parseArrowExpression(this.startNodeAt(startPos, startLoc), [id]); - return id; - - case tt.regexp: - var value = this.value; - node = this.parseLiteral(value.value); - node.regex = { pattern: value.pattern, flags: value.flags }; - return node; - - case tt.num:case tt.string: - return this.parseLiteral(this.value); - - case tt._null:case tt._true:case tt._false: - node = this.startNode(); - node.value = this.type === tt._null ? null : this.type === tt._true; - node.raw = this.type.keyword; - this.next(); - return this.finishNode(node, "Literal"); - - case tt.parenL: - return this.parseParenAndDistinguishExpression(canBeArrow); - - case tt.bracketL: - node = this.startNode(); - this.next(); - // check whether this is array comprehension or regular array - if (this.options.ecmaVersion >= 7 && this.type === tt._for) { - return this.parseComprehension(node, false); - } - node.elements = this.parseExprList(tt.bracketR, true, true, refShorthandDefaultPos); - return this.finishNode(node, "ArrayExpression"); - - case tt.braceL: - return this.parseObj(false, refShorthandDefaultPos); - - case tt._function: - node = this.startNode(); - this.next(); - return this.parseFunction(node, false); - - case tt._class: - return this.parseClass(this.startNode(), false); - - case tt._new: - return this.parseNew(); - - case tt.backQuote: - return this.parseTemplate(); - - default: - this.unexpected(); - } -}; - -pp.parseLiteral = function (value) { - var node = this.startNode(); - node.value = value; - node.raw = this.input.slice(this.start, this.end); - this.next(); - return this.finishNode(node, "Literal"); -}; - -pp.parseParenExpression = function () { - this.expect(tt.parenL); - var val = this.parseExpression(); - this.expect(tt.parenR); - return val; -}; - -pp.parseParenAndDistinguishExpression = function (canBeArrow) { - var startPos = this.start, - startLoc = this.startLoc, - val = undefined; - if (this.options.ecmaVersion >= 6) { - this.next(); - - if (this.options.ecmaVersion >= 7 && this.type === tt._for) { - return this.parseComprehension(this.startNodeAt(startPos, startLoc), true); - } - - var innerStartPos = this.start, - innerStartLoc = this.startLoc; - var exprList = [], - first = true; - var refShorthandDefaultPos = { start: 0 }, - spreadStart = undefined, - innerParenStart = undefined; - while (this.type !== tt.parenR) { - first ? first = false : this.expect(tt.comma); - if (this.type === tt.ellipsis) { - spreadStart = this.start; - exprList.push(this.parseParenItem(this.parseRest())); - break; - } else { - if (this.type === tt.parenL && !innerParenStart) { - innerParenStart = this.start; - } - exprList.push(this.parseMaybeAssign(false, refShorthandDefaultPos, this.parseParenItem)); - } - } - var innerEndPos = this.start, - innerEndLoc = this.startLoc; - this.expect(tt.parenR); - - if (canBeArrow && !this.canInsertSemicolon() && this.eat(tt.arrow)) { - if (innerParenStart) this.unexpected(innerParenStart); - return this.parseParenArrowList(startPos, startLoc, exprList); - } - - if (!exprList.length) this.unexpected(this.lastTokStart); - if (spreadStart) this.unexpected(spreadStart); - if (refShorthandDefaultPos.start) this.unexpected(refShorthandDefaultPos.start); - - if (exprList.length > 1) { - val = this.startNodeAt(innerStartPos, innerStartLoc); - val.expressions = exprList; - this.finishNodeAt(val, "SequenceExpression", innerEndPos, innerEndLoc); - } else { - val = exprList[0]; - } - } else { - val = this.parseParenExpression(); - } - - if (this.options.preserveParens) { - var par = this.startNodeAt(startPos, startLoc); - par.expression = val; - return this.finishNode(par, "ParenthesizedExpression"); - } else { - return val; - } -}; - -pp.parseParenItem = function (item) { - return item; -}; - -pp.parseParenArrowList = function (startPos, startLoc, exprList) { - return this.parseArrowExpression(this.startNodeAt(startPos, startLoc), exprList); -}; - -// New's precedence is slightly tricky. It must allow its argument -// to be a `[]` or dot subscript expression, but not a call — at -// least, not without wrapping it in parentheses. Thus, it uses the - -var empty = []; - -pp.parseNew = function () { - var node = this.startNode(); - var meta = this.parseIdent(true); - if (this.options.ecmaVersion >= 6 && this.eat(tt.dot)) { - node.meta = meta; - node.property = this.parseIdent(true); - if (node.property.name !== "target") this.raise(node.property.start, "The only valid meta property for new is new.target"); - return this.finishNode(node, "MetaProperty"); - } - var startPos = this.start, - startLoc = this.startLoc; - node.callee = this.parseSubscripts(this.parseExprAtom(), startPos, startLoc, true); - if (this.eat(tt.parenL)) node.arguments = this.parseExprList(tt.parenR, false);else node.arguments = empty; - return this.finishNode(node, "NewExpression"); -}; - -// Parse template expression. - -pp.parseTemplateElement = function () { - var elem = this.startNode(); - elem.value = { - raw: this.input.slice(this.start, this.end), - cooked: this.value - }; - this.next(); - elem.tail = this.type === tt.backQuote; - return this.finishNode(elem, "TemplateElement"); -}; - -pp.parseTemplate = function () { - var node = this.startNode(); - this.next(); - node.expressions = []; - var curElt = this.parseTemplateElement(); - node.quasis = [curElt]; - while (!curElt.tail) { - this.expect(tt.dollarBraceL); - node.expressions.push(this.parseExpression()); - this.expect(tt.braceR); - node.quasis.push(curElt = this.parseTemplateElement()); - } - this.next(); - return this.finishNode(node, "TemplateLiteral"); -}; - -// Parse an object literal or binding pattern. - -pp.parseObj = function (isPattern, refShorthandDefaultPos) { - var node = this.startNode(), - first = true, - propHash = {}; - node.properties = []; - this.next(); - while (!this.eat(tt.braceR)) { - if (!first) { - this.expect(tt.comma); - if (this.afterTrailingComma(tt.braceR)) break; - } else first = false; - - var prop = this.startNode(), - isGenerator = undefined, - startPos = undefined, - startLoc = undefined; - if (this.options.ecmaVersion >= 6) { - prop.method = false; - prop.shorthand = false; - if (isPattern || refShorthandDefaultPos) { - startPos = this.start; - startLoc = this.startLoc; - } - if (!isPattern) isGenerator = this.eat(tt.star); - } - this.parsePropertyName(prop); - this.parsePropertyValue(prop, isPattern, isGenerator, startPos, startLoc, refShorthandDefaultPos); - this.checkPropClash(prop, propHash); - node.properties.push(this.finishNode(prop, "Property")); - } - return this.finishNode(node, isPattern ? "ObjectPattern" : "ObjectExpression"); -}; - -pp.parsePropertyValue = function (prop, isPattern, isGenerator, startPos, startLoc, refShorthandDefaultPos) { - if (this.eat(tt.colon)) { - prop.value = isPattern ? this.parseMaybeDefault(this.start, this.startLoc) : this.parseMaybeAssign(false, refShorthandDefaultPos); - prop.kind = "init"; - } else if (this.options.ecmaVersion >= 6 && this.type === tt.parenL) { - if (isPattern) this.unexpected(); - prop.kind = "init"; - prop.method = true; - prop.value = this.parseMethod(isGenerator); - } else if (this.options.ecmaVersion >= 5 && !prop.computed && prop.key.type === "Identifier" && (prop.key.name === "get" || prop.key.name === "set") && (this.type != tt.comma && this.type != tt.braceR)) { - if (isGenerator || isPattern) this.unexpected(); - prop.kind = prop.key.name; - this.parsePropertyName(prop); - prop.value = this.parseMethod(false); - } else if (this.options.ecmaVersion >= 6 && !prop.computed && prop.key.type === "Identifier") { - prop.kind = "init"; - if (isPattern) { - if (this.isKeyword(prop.key.name) || this.strict && (reservedWords.strictBind(prop.key.name) || reservedWords.strict(prop.key.name)) || !this.options.allowReserved && this.isReservedWord(prop.key.name)) this.raise(prop.key.start, "Binding " + prop.key.name); - prop.value = this.parseMaybeDefault(startPos, startLoc, prop.key); - } else if (this.type === tt.eq && refShorthandDefaultPos) { - if (!refShorthandDefaultPos.start) refShorthandDefaultPos.start = this.start; - prop.value = this.parseMaybeDefault(startPos, startLoc, prop.key); - } else { - prop.value = prop.key; - } - prop.shorthand = true; - } else this.unexpected(); -}; - -pp.parsePropertyName = function (prop) { - if (this.options.ecmaVersion >= 6) { - if (this.eat(tt.bracketL)) { - prop.computed = true; - prop.key = this.parseMaybeAssign(); - this.expect(tt.bracketR); - return prop.key; - } else { - prop.computed = false; - } - } - return prop.key = this.type === tt.num || this.type === tt.string ? this.parseExprAtom() : this.parseIdent(true); -}; - -// Initialize empty function node. - -pp.initFunction = function (node) { - node.id = null; - if (this.options.ecmaVersion >= 6) { - node.generator = false; - node.expression = false; - } -}; - -// Parse object or class method. - -pp.parseMethod = function (isGenerator) { - var node = this.startNode(); - this.initFunction(node); - this.expect(tt.parenL); - node.params = this.parseBindingList(tt.parenR, false, false); - var allowExpressionBody = undefined; - if (this.options.ecmaVersion >= 6) { - node.generator = isGenerator; - allowExpressionBody = true; - } else { - allowExpressionBody = false; - } - this.parseFunctionBody(node, allowExpressionBody); - return this.finishNode(node, "FunctionExpression"); -}; - -// Parse arrow function expression with given parameters. - -pp.parseArrowExpression = function (node, params) { - this.initFunction(node); - node.params = this.toAssignableList(params, true); - this.parseFunctionBody(node, true); - return this.finishNode(node, "ArrowFunctionExpression"); -}; - -// Parse function body and check parameters. - -pp.parseFunctionBody = function (node, allowExpression) { - var isExpression = allowExpression && this.type !== tt.braceL; - - if (isExpression) { - node.body = this.parseMaybeAssign(); - node.expression = true; - } else { - // Start a new scope with regard to labels and the `inFunction` - // flag (restore them to their old value afterwards). - var oldInFunc = this.inFunction, - oldInGen = this.inGenerator, - oldLabels = this.labels; - this.inFunction = true;this.inGenerator = node.generator;this.labels = []; - node.body = this.parseBlock(true); - node.expression = false; - this.inFunction = oldInFunc;this.inGenerator = oldInGen;this.labels = oldLabels; - } - - // If this is a strict mode function, verify that argument names - // are not repeated, and it does not try to bind the words `eval` - // or `arguments`. - if (this.strict || !isExpression && node.body.body.length && this.isUseStrict(node.body.body[0])) { - var nameHash = {}, - oldStrict = this.strict; - this.strict = true; - if (node.id) this.checkLVal(node.id, true); - for (var i = 0; i < node.params.length; i++) { - this.checkLVal(node.params[i], true, nameHash); - }this.strict = oldStrict; - } -}; - -// Parses a comma-separated list of expressions, and returns them as -// an array. `close` is the token type that ends the list, and -// `allowEmpty` can be turned on to allow subsequent commas with -// nothing in between them to be parsed as `null` (which is needed -// for array literals). - -pp.parseExprList = function (close, allowTrailingComma, allowEmpty, refShorthandDefaultPos) { - var elts = [], - first = true; - while (!this.eat(close)) { - if (!first) { - this.expect(tt.comma); - if (allowTrailingComma && this.afterTrailingComma(close)) break; - } else first = false; - - if (allowEmpty && this.type === tt.comma) { - elts.push(null); - } else { - if (this.type === tt.ellipsis) elts.push(this.parseSpread(refShorthandDefaultPos));else elts.push(this.parseMaybeAssign(false, refShorthandDefaultPos)); - } - } - return elts; -}; - -// Parse the next token as an identifier. If `liberal` is true (used -// when parsing properties), it will also convert keywords into -// identifiers. - -pp.parseIdent = function (liberal) { - var node = this.startNode(); - if (liberal && this.options.allowReserved == "never") liberal = false; - if (this.type === tt.name) { - if (!liberal && (!this.options.allowReserved && this.isReservedWord(this.value) || this.strict && reservedWords.strict(this.value) && (this.options.ecmaVersion >= 6 || this.input.slice(this.start, this.end).indexOf("\\") == -1))) this.raise(this.start, "The keyword '" + this.value + "' is reserved"); - node.name = this.value; - } else if (liberal && this.type.keyword) { - node.name = this.type.keyword; - } else { - this.unexpected(); - } - this.next(); - return this.finishNode(node, "Identifier"); -}; - -// Parses yield expression inside generator. - -pp.parseYield = function () { - var node = this.startNode(); - this.next(); - if (this.type == tt.semi || this.canInsertSemicolon() || this.type != tt.star && !this.type.startsExpr) { - node.delegate = false; - node.argument = null; - } else { - node.delegate = this.eat(tt.star); - node.argument = this.parseMaybeAssign(); - } - return this.finishNode(node, "YieldExpression"); -}; - -// Parses array and generator comprehensions. - -pp.parseComprehension = function (node, isGenerator) { - node.blocks = []; - while (this.type === tt._for) { - var block = this.startNode(); - this.next(); - this.expect(tt.parenL); - block.left = this.parseBindingAtom(); - this.checkLVal(block.left, true); - this.expectContextual("of"); - block.right = this.parseExpression(); - this.expect(tt.parenR); - node.blocks.push(this.finishNode(block, "ComprehensionBlock")); - } - node.filter = this.eat(tt._if) ? this.parseParenExpression() : null; - node.body = this.parseExpression(); - this.expect(isGenerator ? tt.parenR : tt.bracketR); - node.generator = isGenerator; - return this.finishNode(node, "ComprehensionExpression"); -}; - -},{"./identifier":7,"./state":13,"./tokentype":17,"./util":18}],7:[function(_dereq_,module,exports){ - - -// Test whether a given character code starts an identifier. - -"use strict"; - -exports.isIdentifierStart = isIdentifierStart; - -// Test whether a given character is part of an identifier. - -exports.isIdentifierChar = isIdentifierChar; -exports.__esModule = true; -// This is a trick taken from Esprima. It turns out that, on -// non-Chrome browsers, to check whether a string is in a set, a -// predicate containing a big ugly `switch` statement is faster than -// a regular expression, and on Chrome the two are about on par. -// This function uses `eval` (non-lexical) to produce such a -// predicate from a space-separated string of words. -// -// It starts by sorting the words by length. - -function makePredicate(words) { - words = words.split(" "); - var f = "", - cats = []; - out: for (var i = 0; i < words.length; ++i) { - for (var j = 0; j < cats.length; ++j) { - if (cats[j][0].length == words[i].length) { - cats[j].push(words[i]); - continue out; - } - }cats.push([words[i]]); - } - function compareTo(arr) { - if (arr.length == 1) { - return f += "return str === " + JSON.stringify(arr[0]) + ";"; - }f += "switch(str){"; - for (var i = 0; i < arr.length; ++i) { - f += "case " + JSON.stringify(arr[i]) + ":"; - }f += "return true}return false;"; - } - - // When there are more than three length categories, an outer - // switch first dispatches on the lengths, to save on comparisons. - - if (cats.length > 3) { - cats.sort(function (a, b) { - return b.length - a.length; - }); - f += "switch(str.length){"; - for (var i = 0; i < cats.length; ++i) { - var cat = cats[i]; - f += "case " + cat[0].length + ":"; - compareTo(cat); - } - f += "}" - - // Otherwise, simply generate a flat `switch` statement. - - ; - } else { - compareTo(words); - } - return new Function("str", f); -} - -// Reserved word lists for various dialects of the language - -var reservedWords = { - 3: makePredicate("abstract boolean byte char class double enum export extends final float goto implements import int interface long native package private protected public short static super synchronized throws transient volatile"), - 5: makePredicate("class enum extends super const export import"), - 6: makePredicate("enum await"), - strict: makePredicate("implements interface let package private protected public static yield"), - strictBind: makePredicate("eval arguments") -}; - -exports.reservedWords = reservedWords; -// And the keywords - -var ecma5AndLessKeywords = "break case catch continue debugger default do else finally for function if return switch throw try var while with null true false instanceof typeof void delete new in this"; - -var keywords = { - 5: makePredicate(ecma5AndLessKeywords), - 6: makePredicate(ecma5AndLessKeywords + " let const class extends export import yield super") -}; - -exports.keywords = keywords; -// ## Character categories - -// Big ugly regular expressions that match characters in the -// whitespace, identifier, and identifier-start categories. These -// are only applied when a character is found to actually have a -// code point above 128. -// Generated by `tools/generate-identifier-regex.js`. - -var nonASCIIidentifierStartChars = "ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽͿΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԯԱ-Ֆՙա-ևא-תװ-ײؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘࢠ-ࢲऄ-हऽॐक़-ॡॱ-ঀঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-హఽౘౙౠౡಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽೞೠೡೱೲഅ-ഌഎ-ഐഒ-ഺഽൎൠൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะาำเ-ๆກຂຄງຈຊຍດ-ທນ-ຟມ-ຣລວສຫອ-ະາຳຽເ-ໄໆໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿၐ-ၕၚ-ၝၡၥၦၮ-ၰၵ-ႁႎႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏼᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛸᜀ-ᜌᜎ-ᜑᜠ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៗៜᠠ-ᡷᢀ-ᢨᢪᢰ-ᣵᤀ-ᤞᥐ-ᥭᥰ-ᥴᦀ-ᦫᧁ-ᧇᨀ-ᨖᨠ-ᩔᪧᬅ-ᬳᭅ-ᭋᮃ-ᮠᮮᮯᮺ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᳩ-ᳬᳮ-ᳱᳵᳶᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕ℘-ℝℤΩℨK-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-Ⱞⰰ-ⱞⱠ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞ々-〇〡-〩〱-〵〸-〼ぁ-ゖ゛-ゟァ-ヺー-ヿㄅ-ㄭㄱ-ㆎㆠ-ㆺㇰ-ㇿ㐀-䶵一-鿌ꀀ-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚝꚠ-ꛯꜗ-ꜟꜢ-ꞈꞋ-ꞎꞐ-ꞭꞰꞱꟷ-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꧠ-ꧤꧦ-ꧯꧺ-ꧾꨀ-ꨨꩀ-ꩂꩄ-ꩋꩠ-ꩶꩺꩾ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛ-ꫝꫠ-ꫪꫲ-ꫴꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꬰ-ꭚꭜ-ꭟꭤꭥꯀ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA-Za-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ"; -var nonASCIIidentifierChars = "‌‍·̀-ͯ·҃-֑҇-ׇֽֿׁׂׅׄؐ-ًؚ-٩ٰۖ-ۜ۟-۪ۤۧۨ-ۭ۰-۹ܑܰ-݊ަ-ް߀-߉߫-߳ࠖ-࠙ࠛ-ࠣࠥ-ࠧࠩ-࡙࠭-࡛ࣤ-ःऺ-़ा-ॏ॑-ॗॢॣ०-९ঁ-ঃ়া-ৄেৈো-্ৗৢৣ০-৯ਁ-ਃ਼ਾ-ੂੇੈੋ-੍ੑ੦-ੱੵઁ-ઃ઼ા-ૅે-ૉો-્ૢૣ૦-૯ଁ-ଃ଼ା-ୄେୈୋ-୍ୖୗୢୣ୦-୯ஂா-ூெ-ைொ-்ௗ௦-௯ఀ-ఃా-ౄె-ైొ-్ౕౖౢౣ౦-౯ಁ-ಃ಼ಾ-ೄೆ-ೈೊ-್ೕೖೢೣ೦-೯ഁ-ഃാ-ൄെ-ൈൊ-്ൗൢൣ൦-൯ංඃ්ා-ුූෘ-ෟ෦-෯ෲෳัิ-ฺ็-๎๐-๙ັິ-ູົຼ່-ໍ໐-໙༘༙༠-༩༹༵༷༾༿ཱ-྄྆྇ྍ-ྗྙ-ྼ࿆ါ-ှ၀-၉ၖ-ၙၞ-ၠၢ-ၤၧ-ၭၱ-ၴႂ-ႍႏ-ႝ፝-፟፩-፱ᜒ-᜔ᜲ-᜴ᝒᝓᝲᝳ឴-៓៝០-៩᠋-᠍᠐-᠙ᢩᤠ-ᤫᤰ-᤻᥆-᥏ᦰ-ᧀᧈᧉ᧐-᧚ᨗ-ᨛᩕ-ᩞ᩠-᩿᩼-᪉᪐-᪙᪰-᪽ᬀ-ᬄ᬴-᭄᭐-᭙᭫-᭳ᮀ-ᮂᮡ-ᮭ᮰-᮹᯦-᯳ᰤ-᰷᱀-᱉᱐-᱙᳐-᳔᳒-᳨᳭ᳲ-᳴᳸᳹᷀-᷵᷼-᷿‿⁀⁔⃐-⃥⃜⃡-⃰⳯-⵿⳱ⷠ-〪ⷿ-゙゚〯꘠-꘩꙯ꙴ-꙽ꚟ꛰꛱ꠂ꠆ꠋꠣ-ꠧꢀꢁꢴ-꣄꣐-꣙꣠-꣱꤀-꤉ꤦ-꤭ꥇ-꥓ꦀ-ꦃ꦳-꧀꧐-꧙ꧥ꧰-꧹ꨩ-ꨶꩃꩌꩍ꩐-꩙ꩻ-ꩽꪰꪲ-ꪴꪷꪸꪾ꪿꫁ꫫ-ꫯꫵ꫶ꯣ-ꯪ꯬꯭꯰-꯹ﬞ︀-️︠-︭︳︴﹍-﹏0-9_"; - -var nonASCIIidentifierStart = new RegExp("[" + nonASCIIidentifierStartChars + "]"); -var nonASCIIidentifier = new RegExp("[" + nonASCIIidentifierStartChars + nonASCIIidentifierChars + "]"); - -nonASCIIidentifierStartChars = nonASCIIidentifierChars = null; - -// These are a run-length and offset encoded representation of the -// >0xffff code points that are a valid part of identifiers. The -// offset starts at 0x10000, and each pair of numbers represents an -// offset to the next range, and then a size of the range. They were -// generated by tools/generate-identifier-regex.js -var astralIdentifierStartCodes = [0, 11, 2, 25, 2, 18, 2, 1, 2, 14, 3, 13, 35, 122, 70, 52, 268, 28, 4, 48, 48, 31, 17, 26, 6, 37, 11, 29, 3, 35, 5, 7, 2, 4, 43, 157, 99, 39, 9, 51, 157, 310, 10, 21, 11, 7, 153, 5, 3, 0, 2, 43, 2, 1, 4, 0, 3, 22, 11, 22, 10, 30, 98, 21, 11, 25, 71, 55, 7, 1, 65, 0, 16, 3, 2, 2, 2, 26, 45, 28, 4, 28, 36, 7, 2, 27, 28, 53, 11, 21, 11, 18, 14, 17, 111, 72, 955, 52, 76, 44, 33, 24, 27, 35, 42, 34, 4, 0, 13, 47, 15, 3, 22, 0, 38, 17, 2, 24, 133, 46, 39, 7, 3, 1, 3, 21, 2, 6, 2, 1, 2, 4, 4, 0, 32, 4, 287, 47, 21, 1, 2, 0, 185, 46, 82, 47, 21, 0, 60, 42, 502, 63, 32, 0, 449, 56, 1288, 920, 104, 110, 2962, 1070, 13266, 568, 8, 30, 114, 29, 19, 47, 17, 3, 32, 20, 6, 18, 881, 68, 12, 0, 67, 12, 16481, 1, 3071, 106, 6, 12, 4, 8, 8, 9, 5991, 84, 2, 70, 2, 1, 3, 0, 3, 1, 3, 3, 2, 11, 2, 0, 2, 6, 2, 64, 2, 3, 3, 7, 2, 6, 2, 27, 2, 3, 2, 4, 2, 0, 4, 6, 2, 339, 3, 24, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 7, 4149, 196, 1340, 3, 2, 26, 2, 1, 2, 0, 3, 0, 2, 9, 2, 3, 2, 0, 2, 0, 7, 0, 5, 0, 2, 0, 2, 0, 2, 2, 2, 1, 2, 0, 3, 0, 2, 0, 2, 0, 2, 0, 2, 0, 2, 1, 2, 0, 3, 3, 2, 6, 2, 3, 2, 3, 2, 0, 2, 9, 2, 16, 6, 2, 2, 4, 2, 16, 4421, 42710, 42, 4148, 12, 221, 16355, 541]; -var astralIdentifierCodes = [509, 0, 227, 0, 150, 4, 294, 9, 1368, 2, 2, 1, 6, 3, 41, 2, 5, 0, 166, 1, 1306, 2, 54, 14, 32, 9, 16, 3, 46, 10, 54, 9, 7, 2, 37, 13, 2, 9, 52, 0, 13, 2, 49, 13, 16, 9, 83, 11, 168, 11, 6, 9, 8, 2, 57, 0, 2, 6, 3, 1, 3, 2, 10, 0, 11, 1, 3, 6, 4, 4, 316, 19, 13, 9, 214, 6, 3, 8, 112, 16, 16, 9, 82, 12, 9, 9, 535, 9, 20855, 9, 135, 4, 60, 6, 26, 9, 1016, 45, 17, 3, 19723, 1, 5319, 4, 4, 5, 9, 7, 3, 6, 31, 3, 149, 2, 1418, 49, 4305, 6, 792618, 239]; - -// This has a complexity linear to the value of the code. The -// assumption is that looking up astral identifier characters is -// rare. -function isInAstralSet(code, set) { - var pos = 65536; - for (var i = 0; i < set.length; i += 2) { - pos += set[i]; - if (pos > code) { - return false; - }pos += set[i + 1]; - if (pos >= code) { - return true; - } - } -} -function isIdentifierStart(code, astral) { - if (code < 65) { - return code === 36; - }if (code < 91) { - return true; - }if (code < 97) { - return code === 95; - }if (code < 123) { - return true; - }if (code <= 65535) { - return code >= 170 && nonASCIIidentifierStart.test(String.fromCharCode(code)); - }if (astral === false) { - return false; - }return isInAstralSet(code, astralIdentifierStartCodes); -} - -function isIdentifierChar(code, astral) { - if (code < 48) { - return code === 36; - }if (code < 58) { - return true; - }if (code < 65) { - return false; - }if (code < 91) { - return true; - }if (code < 97) { - return code === 95; - }if (code < 123) { - return true; - }if (code <= 65535) { - return code >= 170 && nonASCIIidentifier.test(String.fromCharCode(code)); - }if (astral === false) { - return false; - }return isInAstralSet(code, astralIdentifierStartCodes) || isInAstralSet(code, astralIdentifierCodes); -} - -},{}],8:[function(_dereq_,module,exports){ -"use strict"; - -var _classCallCheck = function (instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }; - -// The `getLineInfo` function is mostly useful when the -// `locations` option is off (for performance reasons) and you -// want to find the line/column position for a given character -// offset. `input` should be the code string that the offset refers -// into. - -exports.getLineInfo = getLineInfo; -exports.__esModule = true; - -var Parser = _dereq_("./state").Parser; - -var lineBreakG = _dereq_("./whitespace").lineBreakG; - -var deprecate = _dereq_("util").deprecate; - -// These are used when `options.locations` is on, for the -// `startLoc` and `endLoc` properties. - -var Position = exports.Position = (function () { - function Position(line, col) { - _classCallCheck(this, Position); - - this.line = line; - this.column = col; - } - - Position.prototype.offset = function offset(n) { - return new Position(this.line, this.column + n); - }; - - return Position; -})(); - -var SourceLocation = exports.SourceLocation = function SourceLocation(p, start, end) { - _classCallCheck(this, SourceLocation); - - this.start = start; - this.end = end; - if (p.sourceFile !== null) this.source = p.sourceFile; -}; - -function getLineInfo(input, offset) { - for (var line = 1, cur = 0;;) { - lineBreakG.lastIndex = cur; - var match = lineBreakG.exec(input); - if (match && match.index < offset) { - ++line; - cur = match.index + match[0].length; - } else { - return new Position(line, offset - cur); - } - } -} - -var pp = Parser.prototype; - -// This function is used to raise exceptions on parse errors. It -// takes an offset integer (into the current `input`) to indicate -// the location of the error, attaches the position to the end -// of the error message, and then raises a `SyntaxError` with that -// message. - -pp.raise = function (pos, message) { - var loc = getLineInfo(this.input, pos); - message += " (" + loc.line + ":" + loc.column + ")"; - var err = new SyntaxError(message); - err.pos = pos;err.loc = loc;err.raisedAt = this.pos; - throw err; -}; - -pp.curPosition = function () { - return new Position(this.curLine, this.pos - this.lineStart); -}; - -pp.markPosition = function () { - return this.options.locations ? [this.start, this.startLoc] : this.start; -}; - -},{"./state":13,"./whitespace":19,"util":5}],9:[function(_dereq_,module,exports){ -"use strict"; - -var tt = _dereq_("./tokentype").types; - -var Parser = _dereq_("./state").Parser; - -var reservedWords = _dereq_("./identifier").reservedWords; - -var has = _dereq_("./util").has; - -var pp = Parser.prototype; - -// Convert existing expression atom to assignable pattern -// if possible. - -pp.toAssignable = function (node, isBinding) { - if (this.options.ecmaVersion >= 6 && node) { - switch (node.type) { - case "Identifier": - case "ObjectPattern": - case "ArrayPattern": - case "AssignmentPattern": - break; - - case "ObjectExpression": - node.type = "ObjectPattern"; - for (var i = 0; i < node.properties.length; i++) { - var prop = node.properties[i]; - if (prop.kind !== "init") this.raise(prop.key.start, "Object pattern can't contain getter or setter"); - this.toAssignable(prop.value, isBinding); - } - break; - - case "ArrayExpression": - node.type = "ArrayPattern"; - this.toAssignableList(node.elements, isBinding); - break; - - case "AssignmentExpression": - if (node.operator === "=") { - node.type = "AssignmentPattern"; - } else { - this.raise(node.left.end, "Only '=' operator can be used for specifying default value."); - } - break; - - case "ParenthesizedExpression": - node.expression = this.toAssignable(node.expression, isBinding); - break; - - case "MemberExpression": - if (!isBinding) break; - - default: - this.raise(node.start, "Assigning to rvalue"); - } - } - return node; -}; - -// Convert list of expression atoms to binding list. - -pp.toAssignableList = function (exprList, isBinding) { - var end = exprList.length; - if (end) { - var last = exprList[end - 1]; - if (last && last.type == "RestElement") { - --end; - } else if (last && last.type == "SpreadElement") { - last.type = "RestElement"; - var arg = last.argument; - this.toAssignable(arg, isBinding); - if (arg.type !== "Identifier" && arg.type !== "MemberExpression" && arg.type !== "ArrayPattern") this.unexpected(arg.start); - --end; - } - } - for (var i = 0; i < end; i++) { - var elt = exprList[i]; - if (elt) this.toAssignable(elt, isBinding); - } - return exprList; -}; - -// Parses spread element. - -pp.parseSpread = function (refShorthandDefaultPos) { - var node = this.startNode(); - this.next(); - node.argument = this.parseMaybeAssign(refShorthandDefaultPos); - return this.finishNode(node, "SpreadElement"); -}; - -pp.parseRest = function () { - var node = this.startNode(); - this.next(); - node.argument = this.type === tt.name || this.type === tt.bracketL ? this.parseBindingAtom() : this.unexpected(); - return this.finishNode(node, "RestElement"); -}; - -// Parses lvalue (assignable) atom. - -pp.parseBindingAtom = function () { - if (this.options.ecmaVersion < 6) return this.parseIdent(); - switch (this.type) { - case tt.name: - return this.parseIdent(); - - case tt.bracketL: - var node = this.startNode(); - this.next(); - node.elements = this.parseBindingList(tt.bracketR, true, true); - return this.finishNode(node, "ArrayPattern"); - - case tt.braceL: - return this.parseObj(true); - - default: - this.unexpected(); - } -}; - -pp.parseBindingList = function (close, allowEmpty, allowTrailingComma) { - var elts = [], - first = true; - while (!this.eat(close)) { - if (first) first = false;else this.expect(tt.comma); - if (allowEmpty && this.type === tt.comma) { - elts.push(null); - } else if (allowTrailingComma && this.afterTrailingComma(close)) { - break; - } else if (this.type === tt.ellipsis) { - var rest = this.parseRest(); - this.parseBindingListItem(rest); - elts.push(rest); - this.expect(close); - break; - } else { - var elem = this.parseMaybeDefault(this.start, this.startLoc); - this.parseBindingListItem(elem); - elts.push(elem); - } - } - return elts; -}; - -pp.parseBindingListItem = function (param) { - return param; -}; - -// Parses assignment pattern around given atom if possible. - -pp.parseMaybeDefault = function (startPos, startLoc, left) { - if (Array.isArray(startPos)) { - if (this.options.locations && noCalls === undefined) { - // shift arguments to left by one - left = startLoc; - // flatten startPos - startLoc = startPos[1]; - startPos = startPos[0]; - } - } - left = left || this.parseBindingAtom(); - if (!this.eat(tt.eq)) return left; - var node = this.startNodeAt(startPos, startLoc); - node.operator = "="; - node.left = left; - node.right = this.parseMaybeAssign(); - return this.finishNode(node, "AssignmentPattern"); -}; - -// Verify that a node is an lval — something that can be assigned -// to. - -pp.checkLVal = function (expr, isBinding, checkClashes) { - switch (expr.type) { - case "Identifier": - if (this.strict && (reservedWords.strictBind(expr.name) || reservedWords.strict(expr.name))) this.raise(expr.start, (isBinding ? "Binding " : "Assigning to ") + expr.name + " in strict mode"); - if (checkClashes) { - if (has(checkClashes, expr.name)) this.raise(expr.start, "Argument name clash in strict mode"); - checkClashes[expr.name] = true; - } - break; - - case "MemberExpression": - if (isBinding) this.raise(expr.start, (isBinding ? "Binding" : "Assigning to") + " member expression"); - break; - - case "ObjectPattern": - for (var i = 0; i < expr.properties.length; i++) { - this.checkLVal(expr.properties[i].value, isBinding, checkClashes); - }break; - - case "ArrayPattern": - for (var i = 0; i < expr.elements.length; i++) { - var elem = expr.elements[i]; - if (elem) this.checkLVal(elem, isBinding, checkClashes); - } - break; - - case "AssignmentPattern": - this.checkLVal(expr.left, isBinding, checkClashes); - break; - - case "RestElement": - this.checkLVal(expr.argument, isBinding, checkClashes); - break; - - case "ParenthesizedExpression": - this.checkLVal(expr.expression, isBinding, checkClashes); - break; - - default: - this.raise(expr.start, (isBinding ? "Binding" : "Assigning to") + " rvalue"); - } -}; - -},{"./identifier":7,"./state":13,"./tokentype":17,"./util":18}],10:[function(_dereq_,module,exports){ -"use strict"; - -var _classCallCheck = function (instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }; - -exports.__esModule = true; - -var Parser = _dereq_("./state").Parser; - -var SourceLocation = _dereq_("./location").SourceLocation; - -// Start an AST node, attaching a start offset. - -var pp = Parser.prototype; - -var Node = exports.Node = function Node() { - _classCallCheck(this, Node); -}; - -pp.startNode = function () { - var node = new Node(); - node.start = this.start; - if (this.options.locations) node.loc = new SourceLocation(this, this.startLoc); - if (this.options.directSourceFile) node.sourceFile = this.options.directSourceFile; - if (this.options.ranges) node.range = [this.start, 0]; - return node; -}; - -pp.startNodeAt = function (pos, loc) { - var node = new Node(); - if (Array.isArray(pos)) { - if (this.options.locations && loc === undefined) { - // flatten pos - loc = pos[1]; - pos = pos[0]; - } - } - node.start = pos; - if (this.options.locations) node.loc = new SourceLocation(this, loc); - if (this.options.directSourceFile) node.sourceFile = this.options.directSourceFile; - if (this.options.ranges) node.range = [pos, 0]; - return node; -}; - -// Finish an AST node, adding `type` and `end` properties. - -pp.finishNode = function (node, type) { - node.type = type; - node.end = this.lastTokEnd; - if (this.options.locations) node.loc.end = this.lastTokEndLoc; - if (this.options.ranges) node.range[1] = this.lastTokEnd; - return node; -}; - -// Finish node at given position - -pp.finishNodeAt = function (node, type, pos, loc) { - node.type = type; - if (Array.isArray(pos)) { - if (this.options.locations && loc === undefined) { - // flatten pos - loc = pos[1]; - pos = pos[0]; - } - } - node.end = pos; - if (this.options.locations) node.loc.end = loc; - if (this.options.ranges) node.range[1] = pos; - return node; -}; - -},{"./location":8,"./state":13}],11:[function(_dereq_,module,exports){ - - -// Interpret and default an options object - -"use strict"; - -exports.getOptions = getOptions; -exports.__esModule = true; - -var _util = _dereq_("./util"); - -var has = _util.has; -var isArray = _util.isArray; - -var SourceLocation = _dereq_("./location").SourceLocation; - -// A second optional argument can be given to further configure -// the parser process. These options are recognized: - -var defaultOptions = { - // `ecmaVersion` indicates the ECMAScript version to parse. Must - // be either 3, or 5, or 6. This influences support for strict - // mode, the set of reserved words, support for getters and - // setters and other features. - ecmaVersion: 5, - // Source type ("script" or "module") for different semantics - sourceType: "script", - // `onInsertedSemicolon` can be a callback that will be called - // when a semicolon is automatically inserted. It will be passed - // th position of the comma as an offset, and if `locations` is - // enabled, it is given the location as a `{line, column}` object - // as second argument. - onInsertedSemicolon: null, - // `onTrailingComma` is similar to `onInsertedSemicolon`, but for - // trailing commas. - onTrailingComma: null, - // By default, reserved words are not enforced. Disable - // `allowReserved` to enforce them. When this option has the - // value "never", reserved words and keywords can also not be - // used as property names. - allowReserved: true, - // When enabled, a return at the top level is not considered an - // error. - allowReturnOutsideFunction: false, - // When enabled, import/export statements are not constrained to - // appearing at the top of the program. - allowImportExportEverywhere: false, - // When enabled, hashbang directive in the beginning of file - // is allowed and treated as a line comment. - allowHashBang: false, - // When `locations` is on, `loc` properties holding objects with - // `start` and `end` properties in `{line, column}` form (with - // line being 1-based and column 0-based) will be attached to the - // nodes. - locations: false, - // A function can be passed as `onToken` option, which will - // cause Acorn to call that function with object in the same - // format as tokenize() returns. Note that you are not - // allowed to call the parser from the callback—that will - // corrupt its internal state. - onToken: null, - // A function can be passed as `onComment` option, which will - // cause Acorn to call that function with `(block, text, start, - // end)` parameters whenever a comment is skipped. `block` is a - // boolean indicating whether this is a block (`/* */`) comment, - // `text` is the content of the comment, and `start` and `end` are - // character offsets that denote the start and end of the comment. - // When the `locations` option is on, two more parameters are - // passed, the full `{line, column}` locations of the start and - // end of the comments. Note that you are not allowed to call the - // parser from the callback—that will corrupt its internal state. - onComment: null, - // Nodes have their start and end characters offsets recorded in - // `start` and `end` properties (directly on the node, rather than - // the `loc` object, which holds line/column data. To also add a - // [semi-standardized][range] `range` property holding a `[start, - // end]` array with the same numbers, set the `ranges` option to - // `true`. - // - // [range]: https://bugzilla.mozilla.org/show_bug.cgi?id=745678 - ranges: false, - // It is possible to parse multiple files into a single AST by - // passing the tree produced by parsing the first file as - // `program` option in subsequent parses. This will add the - // toplevel forms of the parsed file to the `Program` (top) node - // of an existing parse tree. - program: null, - // When `locations` is on, you can pass this to record the source - // file in every node's `loc` object. - sourceFile: null, - // This value, if given, is stored in every node, whether - // `locations` is on or off. - directSourceFile: null, - // When enabled, parenthesized expressions are represented by - // (non-standard) ParenthesizedExpression nodes - preserveParens: false, - plugins: {} -};exports.defaultOptions = defaultOptions; - -function getOptions(opts) { - var options = {}; - for (var opt in defaultOptions) { - options[opt] = opts && has(opts, opt) ? opts[opt] : defaultOptions[opt]; - }if (isArray(options.onToken)) { - (function () { - var tokens = options.onToken; - options.onToken = function (token) { - return tokens.push(token); - }; - })(); - } - if (isArray(options.onComment)) options.onComment = pushComment(options, options.onComment); - - return options; -} - -function pushComment(options, array) { - return function (block, text, start, end, startLoc, endLoc) { - var comment = { - type: block ? "Block" : "Line", - value: text, - start: start, - end: end - }; - if (options.locations) comment.loc = new SourceLocation(this, startLoc, endLoc); - if (options.ranges) comment.range = [start, end]; - array.push(comment); - }; -} - -},{"./location":8,"./util":18}],12:[function(_dereq_,module,exports){ -"use strict"; - -var tt = _dereq_("./tokentype").types; - -var Parser = _dereq_("./state").Parser; - -var lineBreak = _dereq_("./whitespace").lineBreak; - -var pp = Parser.prototype; - -// ## Parser utilities - -// Test whether a statement node is the string literal `"use strict"`. - -pp.isUseStrict = function (stmt) { - return this.options.ecmaVersion >= 5 && stmt.type === "ExpressionStatement" && stmt.expression.type === "Literal" && stmt.expression.value === "use strict"; -}; - -// Predicate that tests whether the next token is of the given -// type, and if yes, consumes it as a side effect. - -pp.eat = function (type) { - if (this.type === type) { - this.next(); - return true; - } else { - return false; - } -}; - -// Tests whether parsed token is a contextual keyword. - -pp.isContextual = function (name) { - return this.type === tt.name && this.value === name; -}; - -// Consumes contextual keyword if possible. - -pp.eatContextual = function (name) { - return this.value === name && this.eat(tt.name); -}; - -// Asserts that following token is given contextual keyword. - -pp.expectContextual = function (name) { - if (!this.eatContextual(name)) this.unexpected(); -}; - -// Test whether a semicolon can be inserted at the current position. - -pp.canInsertSemicolon = function () { - return this.type === tt.eof || this.type === tt.braceR || lineBreak.test(this.input.slice(this.lastTokEnd, this.start)); -}; - -pp.insertSemicolon = function () { - if (this.canInsertSemicolon()) { - if (this.options.onInsertedSemicolon) this.options.onInsertedSemicolon(this.lastTokEnd, this.lastTokEndLoc); - return true; - } -}; - -// Consume a semicolon, or, failing that, see if we are allowed to -// pretend that there is a semicolon at this position. - -pp.semicolon = function () { - if (!this.eat(tt.semi) && !this.insertSemicolon()) this.unexpected(); -}; - -pp.afterTrailingComma = function (tokType) { - if (this.type == tokType) { - if (this.options.onTrailingComma) this.options.onTrailingComma(this.lastTokStart, this.lastTokStartLoc); - this.next(); - return true; - } -}; - -// Expect a token of a given type. If found, consume it, otherwise, -// raise an unexpected token error. - -pp.expect = function (type) { - this.eat(type) || this.unexpected(); -}; - -// Raise an unexpected token error. - -pp.unexpected = function (pos) { - this.raise(pos != null ? pos : this.start, "Unexpected token"); -}; - -},{"./state":13,"./tokentype":17,"./whitespace":19}],13:[function(_dereq_,module,exports){ -"use strict"; - -exports.Parser = Parser; -exports.__esModule = true; - -var _identifier = _dereq_("./identifier"); - -var reservedWords = _identifier.reservedWords; -var keywords = _identifier.keywords; - -var tt = _dereq_("./tokentype").types; - -var lineBreak = _dereq_("./whitespace").lineBreak; - -function Parser(options, input, startPos) { - this.options = options; - this.sourceFile = this.options.sourceFile || null; - this.isKeyword = keywords[this.options.ecmaVersion >= 6 ? 6 : 5]; - this.isReservedWord = reservedWords[this.options.ecmaVersion]; - this.input = input; - - // Load plugins - this.loadPlugins(this.options.plugins); - - // Set up token state - - // The current position of the tokenizer in the input. - if (startPos) { - this.pos = startPos; - this.lineStart = Math.max(0, this.input.lastIndexOf("\n", startPos)); - this.curLine = this.input.slice(0, this.lineStart).split(lineBreak).length; - } else { - this.pos = this.lineStart = 0; - this.curLine = 1; - } - - // Properties of the current token: - // Its type - this.type = tt.eof; - // For tokens that include more information than their type, the value - this.value = null; - // Its start and end offset - this.start = this.end = this.pos; - // And, if locations are used, the {line, column} object - // corresponding to those offsets - this.startLoc = this.endLoc = null; - - // Position information for the previous token - this.lastTokEndLoc = this.lastTokStartLoc = null; - this.lastTokStart = this.lastTokEnd = this.pos; - - // The context stack is used to superficially track syntactic - // context to predict whether a regular expression is allowed in a - // given position. - this.context = this.initialContext(); - this.exprAllowed = true; - - // Figure out if it's a module code. - this.strict = this.inModule = this.options.sourceType === "module"; - - // Used to signify the start of a potential arrow function - this.potentialArrowAt = -1; - - // Flags to track whether we are in a function, a generator. - this.inFunction = this.inGenerator = false; - // Labels in scope. - this.labels = []; - - // If enabled, skip leading hashbang line. - if (this.pos === 0 && this.options.allowHashBang && this.input.slice(0, 2) === "#!") this.skipLineComment(2); -} - -Parser.prototype.extend = function (name, f) { - this[name] = f(this[name]); -}; - -// Registered plugins - -var plugins = {}; - -exports.plugins = plugins; -Parser.prototype.loadPlugins = function (plugins) { - for (var _name in plugins) { - var plugin = exports.plugins[_name]; - if (!plugin) throw new Error("Plugin '" + _name + "' not found"); - plugin(this, plugins[_name]); - } -}; - -},{"./identifier":7,"./tokentype":17,"./whitespace":19}],14:[function(_dereq_,module,exports){ -"use strict"; - -var tt = _dereq_("./tokentype").types; - -var Parser = _dereq_("./state").Parser; - -var lineBreak = _dereq_("./whitespace").lineBreak; - -var pp = Parser.prototype; - -// ### Statement parsing - -// Parse a program. Initializes the parser, reads any number of -// statements, and wraps them in a Program node. Optionally takes a -// `program` argument. If present, the statements will be appended -// to its body instead of creating a new node. - -pp.parseTopLevel = function (node) { - var first = true; - if (!node.body) node.body = []; - while (this.type !== tt.eof) { - var stmt = this.parseStatement(true, true); - node.body.push(stmt); - if (first && this.isUseStrict(stmt)) this.setStrict(true); - first = false; - } - this.next(); - if (this.options.ecmaVersion >= 6) { - node.sourceType = this.options.sourceType; - } - return this.finishNode(node, "Program"); -}; - -var loopLabel = { kind: "loop" }, - switchLabel = { kind: "switch" }; - -// Parse a single statement. -// -// If expecting a statement and finding a slash operator, parse a -// regular expression literal. This is to handle cases like -// `if (foo) /blah/.exec(foo)`, where looking at the previous token -// does not help. - -pp.parseStatement = function (declaration, topLevel) { - var starttype = this.type, - node = this.startNode(); - - // Most types of statements are recognized by the keyword they - // start with. Many are trivial to parse, some require a bit of - // complexity. - - switch (starttype) { - case tt._break:case tt._continue: - return this.parseBreakContinueStatement(node, starttype.keyword); - case tt._debugger: - return this.parseDebuggerStatement(node); - case tt._do: - return this.parseDoStatement(node); - case tt._for: - return this.parseForStatement(node); - case tt._function: - if (!declaration && this.options.ecmaVersion >= 6) this.unexpected(); - return this.parseFunctionStatement(node); - case tt._class: - if (!declaration) this.unexpected(); - return this.parseClass(node, true); - case tt._if: - return this.parseIfStatement(node); - case tt._return: - return this.parseReturnStatement(node); - case tt._switch: - return this.parseSwitchStatement(node); - case tt._throw: - return this.parseThrowStatement(node); - case tt._try: - return this.parseTryStatement(node); - case tt._let:case tt._const: - if (!declaration) this.unexpected(); // NOTE: falls through to _var - case tt._var: - return this.parseVarStatement(node, starttype); - case tt._while: - return this.parseWhileStatement(node); - case tt._with: - return this.parseWithStatement(node); - case tt.braceL: - return this.parseBlock(); - case tt.semi: - return this.parseEmptyStatement(node); - case tt._export: - case tt._import: - if (!this.options.allowImportExportEverywhere) { - if (!topLevel) this.raise(this.start, "'import' and 'export' may only appear at the top level"); - if (!this.inModule) this.raise(this.start, "'import' and 'export' may appear only with 'sourceType: module'"); - } - return starttype === tt._import ? this.parseImport(node) : this.parseExport(node); - - // If the statement does not start with a statement keyword or a - // brace, it's an ExpressionStatement or LabeledStatement. We - // simply start parsing an expression, and afterwards, if the - // next token is a colon and the expression was a simple - // Identifier node, we switch to interpreting it as a label. - default: - var maybeName = this.value, - expr = this.parseExpression(); - if (starttype === tt.name && expr.type === "Identifier" && this.eat(tt.colon)) return this.parseLabeledStatement(node, maybeName, expr);else return this.parseExpressionStatement(node, expr); - } -}; - -pp.parseBreakContinueStatement = function (node, keyword) { - var isBreak = keyword == "break"; - this.next(); - if (this.eat(tt.semi) || this.insertSemicolon()) node.label = null;else if (this.type !== tt.name) this.unexpected();else { - node.label = this.parseIdent(); - this.semicolon(); - } - - // Verify that there is an actual destination to break or - // continue to. - for (var i = 0; i < this.labels.length; ++i) { - var lab = this.labels[i]; - if (node.label == null || lab.name === node.label.name) { - if (lab.kind != null && (isBreak || lab.kind === "loop")) break; - if (node.label && isBreak) break; - } - } - if (i === this.labels.length) this.raise(node.start, "Unsyntactic " + keyword); - return this.finishNode(node, isBreak ? "BreakStatement" : "ContinueStatement"); -}; - -pp.parseDebuggerStatement = function (node) { - this.next(); - this.semicolon(); - return this.finishNode(node, "DebuggerStatement"); -}; - -pp.parseDoStatement = function (node) { - this.next(); - this.labels.push(loopLabel); - node.body = this.parseStatement(false); - this.labels.pop(); - this.expect(tt._while); - node.test = this.parseParenExpression(); - if (this.options.ecmaVersion >= 6) this.eat(tt.semi);else this.semicolon(); - return this.finishNode(node, "DoWhileStatement"); -}; - -// Disambiguating between a `for` and a `for`/`in` or `for`/`of` -// loop is non-trivial. Basically, we have to parse the init `var` -// statement or expression, disallowing the `in` operator (see -// the second parameter to `parseExpression`), and then check -// whether the next token is `in` or `of`. When there is no init -// part (semicolon immediately after the opening parenthesis), it -// is a regular `for` loop. - -pp.parseForStatement = function (node) { - this.next(); - this.labels.push(loopLabel); - this.expect(tt.parenL); - if (this.type === tt.semi) return this.parseFor(node, null); - if (this.type === tt._var || this.type === tt._let || this.type === tt._const) { - var _init = this.startNode(), - varKind = this.type; - this.next(); - this.parseVar(_init, true, varKind); - this.finishNode(_init, "VariableDeclaration"); - if ((this.type === tt._in || this.options.ecmaVersion >= 6 && this.isContextual("of")) && _init.declarations.length === 1 && !(varKind !== tt._var && _init.declarations[0].init)) return this.parseForIn(node, _init); - return this.parseFor(node, _init); - } - var refShorthandDefaultPos = { start: 0 }; - var init = this.parseExpression(true, refShorthandDefaultPos); - if (this.type === tt._in || this.options.ecmaVersion >= 6 && this.isContextual("of")) { - this.toAssignable(init); - this.checkLVal(init); - return this.parseForIn(node, init); - } else if (refShorthandDefaultPos.start) { - this.unexpected(refShorthandDefaultPos.start); - } - return this.parseFor(node, init); -}; - -pp.parseFunctionStatement = function (node) { - this.next(); - return this.parseFunction(node, true); -}; - -pp.parseIfStatement = function (node) { - this.next(); - node.test = this.parseParenExpression(); - node.consequent = this.parseStatement(false); - node.alternate = this.eat(tt._else) ? this.parseStatement(false) : null; - return this.finishNode(node, "IfStatement"); -}; - -pp.parseReturnStatement = function (node) { - if (!this.inFunction && !this.options.allowReturnOutsideFunction) this.raise(this.start, "'return' outside of function"); - this.next(); - - // In `return` (and `break`/`continue`), the keywords with - // optional arguments, we eagerly look for a semicolon or the - // possibility to insert one. - - if (this.eat(tt.semi) || this.insertSemicolon()) node.argument = null;else { - node.argument = this.parseExpression();this.semicolon(); - } - return this.finishNode(node, "ReturnStatement"); -}; - -pp.parseSwitchStatement = function (node) { - this.next(); - node.discriminant = this.parseParenExpression(); - node.cases = []; - this.expect(tt.braceL); - this.labels.push(switchLabel); - - // Statements under must be grouped (by label) in SwitchCase - // nodes. `cur` is used to keep the node that we are currently - // adding statements to. - - for (var cur, sawDefault; this.type != tt.braceR;) { - if (this.type === tt._case || this.type === tt._default) { - var isCase = this.type === tt._case; - if (cur) this.finishNode(cur, "SwitchCase"); - node.cases.push(cur = this.startNode()); - cur.consequent = []; - this.next(); - if (isCase) { - cur.test = this.parseExpression(); - } else { - if (sawDefault) this.raise(this.lastTokStart, "Multiple default clauses"); - sawDefault = true; - cur.test = null; - } - this.expect(tt.colon); - } else { - if (!cur) this.unexpected(); - cur.consequent.push(this.parseStatement(true)); - } - } - if (cur) this.finishNode(cur, "SwitchCase"); - this.next(); // Closing brace - this.labels.pop(); - return this.finishNode(node, "SwitchStatement"); -}; - -pp.parseThrowStatement = function (node) { - this.next(); - if (lineBreak.test(this.input.slice(this.lastTokEnd, this.start))) this.raise(this.lastTokEnd, "Illegal newline after throw"); - node.argument = this.parseExpression(); - this.semicolon(); - return this.finishNode(node, "ThrowStatement"); -}; - -// Reused empty array added for node fields that are always empty. - -var empty = []; - -pp.parseTryStatement = function (node) { - this.next(); - node.block = this.parseBlock(); - node.handler = null; - if (this.type === tt._catch) { - var clause = this.startNode(); - this.next(); - this.expect(tt.parenL); - clause.param = this.parseBindingAtom(); - this.checkLVal(clause.param, true); - this.expect(tt.parenR); - clause.guard = null; - clause.body = this.parseBlock(); - node.handler = this.finishNode(clause, "CatchClause"); - } - node.guardedHandlers = empty; - node.finalizer = this.eat(tt._finally) ? this.parseBlock() : null; - if (!node.handler && !node.finalizer) this.raise(node.start, "Missing catch or finally clause"); - return this.finishNode(node, "TryStatement"); -}; - -pp.parseVarStatement = function (node, kind) { - this.next(); - this.parseVar(node, false, kind); - this.semicolon(); - return this.finishNode(node, "VariableDeclaration"); -}; - -pp.parseWhileStatement = function (node) { - this.next(); - node.test = this.parseParenExpression(); - this.labels.push(loopLabel); - node.body = this.parseStatement(false); - this.labels.pop(); - return this.finishNode(node, "WhileStatement"); -}; - -pp.parseWithStatement = function (node) { - if (this.strict) this.raise(this.start, "'with' in strict mode"); - this.next(); - node.object = this.parseParenExpression(); - node.body = this.parseStatement(false); - return this.finishNode(node, "WithStatement"); -}; - -pp.parseEmptyStatement = function (node) { - this.next(); - return this.finishNode(node, "EmptyStatement"); -}; - -pp.parseLabeledStatement = function (node, maybeName, expr) { - for (var i = 0; i < this.labels.length; ++i) { - if (this.labels[i].name === maybeName) this.raise(expr.start, "Label '" + maybeName + "' is already declared"); - }var kind = this.type.isLoop ? "loop" : this.type === tt._switch ? "switch" : null; - this.labels.push({ name: maybeName, kind: kind }); - node.body = this.parseStatement(true); - this.labels.pop(); - node.label = expr; - return this.finishNode(node, "LabeledStatement"); -}; - -pp.parseExpressionStatement = function (node, expr) { - node.expression = expr; - this.semicolon(); - return this.finishNode(node, "ExpressionStatement"); -}; - -// Parse a semicolon-enclosed block of statements, handling `"use -// strict"` declarations when `allowStrict` is true (used for -// function bodies). - -pp.parseBlock = function (allowStrict) { - var node = this.startNode(), - first = true, - oldStrict = undefined; - node.body = []; - this.expect(tt.braceL); - while (!this.eat(tt.braceR)) { - var stmt = this.parseStatement(true); - node.body.push(stmt); - if (first && allowStrict && this.isUseStrict(stmt)) { - oldStrict = this.strict; - this.setStrict(this.strict = true); - } - first = false; - } - if (oldStrict === false) this.setStrict(false); - return this.finishNode(node, "BlockStatement"); -}; - -// Parse a regular `for` loop. The disambiguation code in -// `parseStatement` will already have parsed the init statement or -// expression. - -pp.parseFor = function (node, init) { - node.init = init; - this.expect(tt.semi); - node.test = this.type === tt.semi ? null : this.parseExpression(); - this.expect(tt.semi); - node.update = this.type === tt.parenR ? null : this.parseExpression(); - this.expect(tt.parenR); - node.body = this.parseStatement(false); - this.labels.pop(); - return this.finishNode(node, "ForStatement"); -}; - -// Parse a `for`/`in` and `for`/`of` loop, which are almost -// same from parser's perspective. - -pp.parseForIn = function (node, init) { - var type = this.type === tt._in ? "ForInStatement" : "ForOfStatement"; - this.next(); - node.left = init; - node.right = this.parseExpression(); - this.expect(tt.parenR); - node.body = this.parseStatement(false); - this.labels.pop(); - return this.finishNode(node, type); -}; - -// Parse a list of variable declarations. - -pp.parseVar = function (node, isFor, kind) { - node.declarations = []; - node.kind = kind.keyword; - for (;;) { - var decl = this.startNode(); - this.parseVarId(decl); - if (this.eat(tt.eq)) { - decl.init = this.parseMaybeAssign(isFor); - } else if (kind === tt._const && !(this.type === tt._in || this.options.ecmaVersion >= 6 && this.isContextual("of"))) { - this.unexpected(); - } else if (decl.id.type != "Identifier" && !(isFor && (this.type === tt._in || this.isContextual("of")))) { - this.raise(this.lastTokEnd, "Complex binding patterns require an initialization value"); - } else { - decl.init = null; - } - node.declarations.push(this.finishNode(decl, "VariableDeclarator")); - if (!this.eat(tt.comma)) break; - } - return node; -}; - -pp.parseVarId = function (decl) { - decl.id = this.parseBindingAtom(); - this.checkLVal(decl.id, true); -}; - -// Parse a function declaration or literal (depending on the -// `isStatement` parameter). - -pp.parseFunction = function (node, isStatement, allowExpressionBody) { - this.initFunction(node); - if (this.options.ecmaVersion >= 6) node.generator = this.eat(tt.star); - if (isStatement || this.type === tt.name) node.id = this.parseIdent(); - this.parseFunctionParams(node); - this.parseFunctionBody(node, allowExpressionBody); - return this.finishNode(node, isStatement ? "FunctionDeclaration" : "FunctionExpression"); -}; - -pp.parseFunctionParams = function (node) { - this.expect(tt.parenL); - node.params = this.parseBindingList(tt.parenR, false, false); -}; - -// Parse a class declaration or literal (depending on the -// `isStatement` parameter). - -pp.parseClass = function (node, isStatement) { - this.next(); - this.parseClassId(node, isStatement); - this.parseClassSuper(node); - var classBody = this.startNode(); - var hadConstructor = false; - classBody.body = []; - this.expect(tt.braceL); - while (!this.eat(tt.braceR)) { - if (this.eat(tt.semi)) continue; - var method = this.startNode(); - var isGenerator = this.eat(tt.star); - var isMaybeStatic = this.type === tt.name && this.value === "static"; - this.parsePropertyName(method); - method["static"] = isMaybeStatic && this.type !== tt.parenL; - if (method["static"]) { - if (isGenerator) this.unexpected(); - isGenerator = this.eat(tt.star); - this.parsePropertyName(method); - } - method.kind = "method"; - if (!method.computed) { - var key = method.key; - - var isGetSet = false; - if (!isGenerator && key.type === "Identifier" && this.type !== tt.parenL && (key.name === "get" || key.name === "set")) { - isGetSet = true; - method.kind = key.name; - key = this.parsePropertyName(method); - } - if (!method["static"] && (key.type === "Identifier" && key.name === "constructor" || key.type === "Literal" && key.value === "constructor")) { - if (hadConstructor) this.raise(key.start, "Duplicate constructor in the same class"); - if (isGetSet) this.raise(key.start, "Constructor can't have get/set modifier"); - if (isGenerator) this.raise(key.start, "Constructor can't be a generator"); - method.kind = "constructor"; - hadConstructor = true; - } - } - this.parseClassMethod(classBody, method, isGenerator); - } - node.body = this.finishNode(classBody, "ClassBody"); - return this.finishNode(node, isStatement ? "ClassDeclaration" : "ClassExpression"); -}; - -pp.parseClassMethod = function (classBody, method, isGenerator) { - method.value = this.parseMethod(isGenerator); - classBody.body.push(this.finishNode(method, "MethodDefinition")); -}; - -pp.parseClassId = function (node, isStatement) { - node.id = this.type === tt.name ? this.parseIdent() : isStatement ? this.unexpected() : null; -}; - -pp.parseClassSuper = function (node) { - node.superClass = this.eat(tt._extends) ? this.parseExprSubscripts() : null; -}; - -// Parses module export declaration. - -pp.parseExport = function (node) { - this.next(); - // export * from '...' - if (this.eat(tt.star)) { - this.expectContextual("from"); - node.source = this.type === tt.string ? this.parseExprAtom() : this.unexpected(); - this.semicolon(); - return this.finishNode(node, "ExportAllDeclaration"); - } - if (this.eat(tt._default)) { - // export default ... - var expr = this.parseMaybeAssign(); - var needsSemi = true; - if (expr.type == "FunctionExpression" || expr.type == "ClassExpression") { - needsSemi = false; - if (expr.id) { - expr.type = expr.type == "FunctionExpression" ? "FunctionDeclaration" : "ClassDeclaration"; - } - } - node.declaration = expr; - if (needsSemi) this.semicolon(); - return this.finishNode(node, "ExportDefaultDeclaration"); - } - // export var|const|let|function|class ... - if (this.shouldParseExportStatement()) { - node.declaration = this.parseStatement(true); - node.specifiers = []; - node.source = null; - } else { - // export { x, y as z } [from '...'] - node.declaration = null; - node.specifiers = this.parseExportSpecifiers(); - if (this.eatContextual("from")) { - node.source = this.type === tt.string ? this.parseExprAtom() : this.unexpected(); - } else { - node.source = null; - } - this.semicolon(); - } - return this.finishNode(node, "ExportNamedDeclaration"); -}; - -pp.shouldParseExportStatement = function () { - return this.type.keyword; -}; - -// Parses a comma-separated list of module exports. - -pp.parseExportSpecifiers = function () { - var nodes = [], - first = true; - // export { x, y as z } [from '...'] - this.expect(tt.braceL); - while (!this.eat(tt.braceR)) { - if (!first) { - this.expect(tt.comma); - if (this.afterTrailingComma(tt.braceR)) break; - } else first = false; - - var node = this.startNode(); - node.local = this.parseIdent(this.type === tt._default); - node.exported = this.eatContextual("as") ? this.parseIdent(true) : node.local; - nodes.push(this.finishNode(node, "ExportSpecifier")); - } - return nodes; -}; - -// Parses import declaration. - -pp.parseImport = function (node) { - this.next(); - // import '...' - if (this.type === tt.string) { - node.specifiers = empty; - node.source = this.parseExprAtom(); - node.kind = ""; - } else { - node.specifiers = this.parseImportSpecifiers(); - this.expectContextual("from"); - node.source = this.type === tt.string ? this.parseExprAtom() : this.unexpected(); - } - this.semicolon(); - return this.finishNode(node, "ImportDeclaration"); -}; - -// Parses a comma-separated list of module imports. - -pp.parseImportSpecifiers = function () { - var nodes = [], - first = true; - if (this.type === tt.name) { - // import defaultObj, { x, y as z } from '...' - var node = this.startNode(); - node.local = this.parseIdent(); - this.checkLVal(node.local, true); - nodes.push(this.finishNode(node, "ImportDefaultSpecifier")); - if (!this.eat(tt.comma)) return nodes; - } - if (this.type === tt.star) { - var node = this.startNode(); - this.next(); - this.expectContextual("as"); - node.local = this.parseIdent(); - this.checkLVal(node.local, true); - nodes.push(this.finishNode(node, "ImportNamespaceSpecifier")); - return nodes; - } - this.expect(tt.braceL); - while (!this.eat(tt.braceR)) { - if (!first) { - this.expect(tt.comma); - if (this.afterTrailingComma(tt.braceR)) break; - } else first = false; - - var node = this.startNode(); - node.imported = this.parseIdent(true); - node.local = this.eatContextual("as") ? this.parseIdent() : node.imported; - this.checkLVal(node.local, true); - nodes.push(this.finishNode(node, "ImportSpecifier")); - } - return nodes; -}; - -},{"./state":13,"./tokentype":17,"./whitespace":19}],15:[function(_dereq_,module,exports){ -"use strict"; - -var _classCallCheck = function (instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }; - -exports.__esModule = true; -// The algorithm used to determine whether a regexp can appear at a -// given point in the program is loosely based on sweet.js' approach. -// See https://github.com/mozilla/sweet.js/wiki/design - -var Parser = _dereq_("./state").Parser; - -var tt = _dereq_("./tokentype").types; - -var lineBreak = _dereq_("./whitespace").lineBreak; - -var TokContext = exports.TokContext = function TokContext(token, isExpr, preserveSpace, override) { - _classCallCheck(this, TokContext); - - this.token = token; - this.isExpr = isExpr; - this.preserveSpace = preserveSpace; - this.override = override; -}; - -var types = { - b_stat: new TokContext("{", false), - b_expr: new TokContext("{", true), - b_tmpl: new TokContext("${", true), - p_stat: new TokContext("(", false), - p_expr: new TokContext("(", true), - q_tmpl: new TokContext("`", true, true, function (p) { - return p.readTmplToken(); - }), - f_expr: new TokContext("function", true) -}; - -exports.types = types; -var pp = Parser.prototype; - -pp.initialContext = function () { - return [types.b_stat]; -}; - -pp.braceIsBlock = function (prevType) { - var parent = undefined; - if (prevType === tt.colon && (parent = this.curContext()).token == "{") return !parent.isExpr; - if (prevType === tt._return) return lineBreak.test(this.input.slice(this.lastTokEnd, this.start)); - if (prevType === tt._else || prevType === tt.semi || prevType === tt.eof) return true; - if (prevType == tt.braceL) return this.curContext() === types.b_stat; - return !this.exprAllowed; -}; - -pp.updateContext = function (prevType) { - var update = undefined, - type = this.type; - if (type.keyword && prevType == tt.dot) this.exprAllowed = false;else if (update = type.updateContext) update.call(this, prevType);else this.exprAllowed = type.beforeExpr; -}; - -// Token-specific context update code - -tt.parenR.updateContext = tt.braceR.updateContext = function () { - if (this.context.length == 1) { - this.exprAllowed = true; - return; - } - var out = this.context.pop(); - if (out === types.b_stat && this.curContext() === types.f_expr) { - this.context.pop(); - this.exprAllowed = false; - } else if (out === types.b_tmpl) { - this.exprAllowed = true; - } else { - this.exprAllowed = !out.isExpr; - } -}; - -tt.braceL.updateContext = function (prevType) { - this.context.push(this.braceIsBlock(prevType) ? types.b_stat : types.b_expr); - this.exprAllowed = true; -}; - -tt.dollarBraceL.updateContext = function () { - this.context.push(types.b_tmpl); - this.exprAllowed = true; -}; - -tt.parenL.updateContext = function (prevType) { - var statementParens = prevType === tt._if || prevType === tt._for || prevType === tt._with || prevType === tt._while; - this.context.push(statementParens ? types.p_stat : types.p_expr); - this.exprAllowed = true; -}; - -tt.incDec.updateContext = function () {}; - -tt._function.updateContext = function () { - if (this.curContext() !== types.b_stat) this.context.push(types.f_expr); - this.exprAllowed = false; -}; - -tt.backQuote.updateContext = function () { - if (this.curContext() === types.q_tmpl) this.context.pop();else this.context.push(types.q_tmpl); - this.exprAllowed = false; -}; - -// tokExprAllowed stays unchanged - -},{"./state":13,"./tokentype":17,"./whitespace":19}],16:[function(_dereq_,module,exports){ -"use strict"; - -var _classCallCheck = function (instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }; - -exports.__esModule = true; - -var _identifier = _dereq_("./identifier"); - -var isIdentifierStart = _identifier.isIdentifierStart; -var isIdentifierChar = _identifier.isIdentifierChar; - -var _tokentype = _dereq_("./tokentype"); - -var tt = _tokentype.types; -var keywordTypes = _tokentype.keywords; - -var Parser = _dereq_("./state").Parser; - -var SourceLocation = _dereq_("./location").SourceLocation; - -var _whitespace = _dereq_("./whitespace"); - -var lineBreak = _whitespace.lineBreak; -var lineBreakG = _whitespace.lineBreakG; -var isNewLine = _whitespace.isNewLine; -var nonASCIIwhitespace = _whitespace.nonASCIIwhitespace; - -// Object type used to represent tokens. Note that normally, tokens -// simply exist as properties on the parser object. This is only -// used for the onToken callback and the external tokenizer. - -var Token = exports.Token = function Token(p) { - _classCallCheck(this, Token); - - this.type = p.type; - this.value = p.value; - this.start = p.start; - this.end = p.end; - if (p.options.locations) this.loc = new SourceLocation(p, p.startLoc, p.endLoc); - if (p.options.ranges) this.range = [p.start, p.end]; -}; - -// ## Tokenizer - -var pp = Parser.prototype; - -// Are we running under Rhino? -var isRhino = typeof Packages !== "undefined"; - -// Move to the next token - -pp.next = function () { - if (this.options.onToken) this.options.onToken(new Token(this)); - - this.lastTokEnd = this.end; - this.lastTokStart = this.start; - this.lastTokEndLoc = this.endLoc; - this.lastTokStartLoc = this.startLoc; - this.nextToken(); -}; - -pp.getToken = function () { - this.next(); - return new Token(this); -}; - -// If we're in an ES6 environment, make parsers iterable -if (typeof Symbol !== "undefined") pp[Symbol.iterator] = function () { - var self = this; - return { next: function next() { - var token = self.getToken(); - return { - done: token.type === tt.eof, - value: token - }; - } }; -}; - -// Toggle strict mode. Re-reads the next number or string to please -// pedantic tests (`"use strict"; 010;` should fail). - -pp.setStrict = function (strict) { - this.strict = strict; - if (this.type !== tt.num && this.type !== tt.string) return; - this.pos = this.start; - if (this.options.locations) { - while (this.pos < this.lineStart) { - this.lineStart = this.input.lastIndexOf("\n", this.lineStart - 2) + 1; - --this.curLine; - } - } - this.nextToken(); -}; - -pp.curContext = function () { - return this.context[this.context.length - 1]; -}; - -// Read a single token, updating the parser object's token-related -// properties. - -pp.nextToken = function () { - var curContext = this.curContext(); - if (!curContext || !curContext.preserveSpace) this.skipSpace(); - - this.start = this.pos; - if (this.options.locations) this.startLoc = this.curPosition(); - if (this.pos >= this.input.length) return this.finishToken(tt.eof); - - if (curContext.override) return curContext.override(this);else this.readToken(this.fullCharCodeAtPos()); -}; - -pp.readToken = function (code) { - // Identifier or keyword. '\uXXXX' sequences are allowed in - // identifiers, so '\' also dispatches to that. - if (isIdentifierStart(code, this.options.ecmaVersion >= 6) || code === 92 /* '\' */) return this.readWord(); - - return this.getTokenFromCode(code); -}; - -pp.fullCharCodeAtPos = function () { - var code = this.input.charCodeAt(this.pos); - if (code <= 55295 || code >= 57344) return code; - var next = this.input.charCodeAt(this.pos + 1); - return (code << 10) + next - 56613888; -}; - -pp.skipBlockComment = function () { - var startLoc = this.options.onComment && this.options.locations && this.curPosition(); - var start = this.pos, - end = this.input.indexOf("*/", this.pos += 2); - if (end === -1) this.raise(this.pos - 2, "Unterminated comment"); - this.pos = end + 2; - if (this.options.locations) { - lineBreakG.lastIndex = start; - var match = undefined; - while ((match = lineBreakG.exec(this.input)) && match.index < this.pos) { - ++this.curLine; - this.lineStart = match.index + match[0].length; - } - } - if (this.options.onComment) this.options.onComment(true, this.input.slice(start + 2, end), start, this.pos, startLoc, this.options.locations && this.curPosition()); -}; - -pp.skipLineComment = function (startSkip) { - var start = this.pos; - var startLoc = this.options.onComment && this.options.locations && this.curPosition(); - var ch = this.input.charCodeAt(this.pos += startSkip); - while (this.pos < this.input.length && ch !== 10 && ch !== 13 && ch !== 8232 && ch !== 8233) { - ++this.pos; - ch = this.input.charCodeAt(this.pos); - } - if (this.options.onComment) this.options.onComment(false, this.input.slice(start + startSkip, this.pos), start, this.pos, startLoc, this.options.locations && this.curPosition()); -}; - -// Called at the start of the parse and after every token. Skips -// whitespace and comments, and. - -pp.skipSpace = function () { - while (this.pos < this.input.length) { - var ch = this.input.charCodeAt(this.pos); - if (ch === 32) { - // ' ' - ++this.pos; - } else if (ch === 13) { - ++this.pos; - var next = this.input.charCodeAt(this.pos); - if (next === 10) { - ++this.pos; - } - if (this.options.locations) { - ++this.curLine; - this.lineStart = this.pos; - } - } else if (ch === 10 || ch === 8232 || ch === 8233) { - ++this.pos; - if (this.options.locations) { - ++this.curLine; - this.lineStart = this.pos; - } - } else if (ch > 8 && ch < 14) { - ++this.pos; - } else if (ch === 47) { - // '/' - var next = this.input.charCodeAt(this.pos + 1); - if (next === 42) { - // '*' - this.skipBlockComment(); - } else if (next === 47) { - // '/' - this.skipLineComment(2); - } else break; - } else if (ch === 160) { - // '\xa0' - ++this.pos; - } else if (ch >= 5760 && nonASCIIwhitespace.test(String.fromCharCode(ch))) { - ++this.pos; - } else { - break; - } - } -}; - -// Called at the end of every token. Sets `end`, `val`, and -// maintains `context` and `exprAllowed`, and skips the space after -// the token, so that the next one's `start` will point at the -// right position. - -pp.finishToken = function (type, val) { - this.end = this.pos; - if (this.options.locations) this.endLoc = this.curPosition(); - var prevType = this.type; - this.type = type; - this.value = val; - - this.updateContext(prevType); -}; - -// ### Token reading - -// This is the function that is called to fetch the next token. It -// is somewhat obscure, because it works in character codes rather -// than characters, and because operator parsing has been inlined -// into it. -// -// All in the name of speed. -// -pp.readToken_dot = function () { - var next = this.input.charCodeAt(this.pos + 1); - if (next >= 48 && next <= 57) return this.readNumber(true); - var next2 = this.input.charCodeAt(this.pos + 2); - if (this.options.ecmaVersion >= 6 && next === 46 && next2 === 46) { - // 46 = dot '.' - this.pos += 3; - return this.finishToken(tt.ellipsis); - } else { - ++this.pos; - return this.finishToken(tt.dot); - } -}; - -pp.readToken_slash = function () { - // '/' - var next = this.input.charCodeAt(this.pos + 1); - if (this.exprAllowed) { - ++this.pos;return this.readRegexp(); - } - if (next === 61) return this.finishOp(tt.assign, 2); - return this.finishOp(tt.slash, 1); -}; - -pp.readToken_mult_modulo = function (code) { - // '%*' - var next = this.input.charCodeAt(this.pos + 1); - if (next === 61) return this.finishOp(tt.assign, 2); - return this.finishOp(code === 42 ? tt.star : tt.modulo, 1); -}; - -pp.readToken_pipe_amp = function (code) { - // '|&' - var next = this.input.charCodeAt(this.pos + 1); - if (next === code) return this.finishOp(code === 124 ? tt.logicalOR : tt.logicalAND, 2); - if (next === 61) return this.finishOp(tt.assign, 2); - return this.finishOp(code === 124 ? tt.bitwiseOR : tt.bitwiseAND, 1); -}; - -pp.readToken_caret = function () { - // '^' - var next = this.input.charCodeAt(this.pos + 1); - if (next === 61) return this.finishOp(tt.assign, 2); - return this.finishOp(tt.bitwiseXOR, 1); -}; - -pp.readToken_plus_min = function (code) { - // '+-' - var next = this.input.charCodeAt(this.pos + 1); - if (next === code) { - if (next == 45 && this.input.charCodeAt(this.pos + 2) == 62 && lineBreak.test(this.input.slice(this.lastTokEnd, this.pos))) { - // A `-->` line comment - this.skipLineComment(3); - this.skipSpace(); - return this.nextToken(); - } - return this.finishOp(tt.incDec, 2); - } - if (next === 61) return this.finishOp(tt.assign, 2); - return this.finishOp(tt.plusMin, 1); -}; - -pp.readToken_lt_gt = function (code) { - // '<>' - var next = this.input.charCodeAt(this.pos + 1); - var size = 1; - if (next === code) { - size = code === 62 && this.input.charCodeAt(this.pos + 2) === 62 ? 3 : 2; - if (this.input.charCodeAt(this.pos + size) === 61) return this.finishOp(tt.assign, size + 1); - return this.finishOp(tt.bitShift, size); - } - if (next == 33 && code == 60 && this.input.charCodeAt(this.pos + 2) == 45 && this.input.charCodeAt(this.pos + 3) == 45) { - if (this.inModule) this.unexpected(); - // `` line comment - this.skipLineComment(3); - this.skipSpace(); - return this.nextToken(); - } - return this.finishOp(tt.incDec, 2); - } - if (next === 61) return this.finishOp(tt.assign, 2); - return this.finishOp(tt.plusMin, 1); -}; - -pp.readToken_lt_gt = function (code) { - // '<>' - var next = this.input.charCodeAt(this.pos + 1); - var size = 1; - if (next === code) { - size = code === 62 && this.input.charCodeAt(this.pos + 2) === 62 ? 3 : 2; - if (this.input.charCodeAt(this.pos + size) === 61) return this.finishOp(tt.assign, size + 1); - return this.finishOp(tt.bitShift, size); - } - if (next == 33 && code == 60 && this.input.charCodeAt(this.pos + 2) == 45 && this.input.charCodeAt(this.pos + 3) == 45) { - if (this.inModule) this.unexpected(); - // `` line comment - this.skipLineComment(3) - this.skipSpace() - return this.nextToken() - } - return this.finishOp(tt.incDec, 2) - } - if (next === 61) return this.finishOp(tt.assign, 2) - return this.finishOp(tt.plusMin, 1) -} - -pp.readToken_lt_gt = function(code) { // '<>' - let next = this.input.charCodeAt(this.pos + 1) - let size = 1 - if (next === code) { - size = code === 62 && this.input.charCodeAt(this.pos + 2) === 62 ? 3 : 2 - if (this.input.charCodeAt(this.pos + size) === 61) return this.finishOp(tt.assign, size + 1) - return this.finishOp(tt.bitShift, size) - } - if (next == 33 && code == 60 && this.input.charCodeAt(this.pos + 2) == 45 && - this.input.charCodeAt(this.pos + 3) == 45) { - if (this.inModule) this.unexpected() - // `` line comment - this.skipLineComment(3) - this.skipSpace() - return this.nextToken() - } - return this.finishOp(tt.incDec, 2) - } - if (next === 61) return this.finishOp(tt.assign, 2) - return this.finishOp(tt.plusMin, 1) -} - -pp$7.readToken_lt_gt = function(code) { // '<>' - var next = this.input.charCodeAt(this.pos + 1) - var size = 1 - if (next === code) { - size = code === 62 && this.input.charCodeAt(this.pos + 2) === 62 ? 3 : 2 - if (this.input.charCodeAt(this.pos + size) === 61) return this.finishOp(tt.assign, size + 1) - return this.finishOp(tt.bitShift, size) - } - if (next == 33 && code == 60 && this.input.charCodeAt(this.pos + 2) == 45 && - this.input.charCodeAt(this.pos + 3) == 45) { - if (this.inModule) this.unexpected() - // `` line comment - this.skipLineComment(3) - this.skipSpace() - return this.nextToken() - } - return this.finishOp(tt.incDec, 2) - } - if (next === 61) return this.finishOp(tt.assign, 2) - return this.finishOp(tt.plusMin, 1) - } - - pp$7.readToken_lt_gt = function(code) { // '<>' - var next = this.input.charCodeAt(this.pos + 1) - var size = 1 - if (next === code) { - size = code === 62 && this.input.charCodeAt(this.pos + 2) === 62 ? 3 : 2 - if (this.input.charCodeAt(this.pos + size) === 61) return this.finishOp(tt.assign, size + 1) - return this.finishOp(tt.bitShift, size) - } - if (next == 33 && code == 60 && this.input.charCodeAt(this.pos + 2) == 45 && - this.input.charCodeAt(this.pos + 3) == 45) { - if (this.inModule) this.unexpected() - // `` line comment - this.skipLineComment(3) - this.skipSpace() - return this.nextToken() - } - return this.finishOp(tt.incDec, 2) - } - if (next === 61) return this.finishOp(tt.assign, 2) - return this.finishOp(tt.plusMin, 1) -} - -pp.readToken_lt_gt = function(code) { // '<>' - let next = this.input.charCodeAt(this.pos + 1) - let size = 1 - if (next === code) { - size = code === 62 && this.input.charCodeAt(this.pos + 2) === 62 ? 3 : 2 - if (this.input.charCodeAt(this.pos + size) === 61) return this.finishOp(tt.assign, size + 1) - return this.finishOp(tt.bitShift, size) - } - if (next == 33 && code == 60 && this.input.charCodeAt(this.pos + 2) == 45 && - this.input.charCodeAt(this.pos + 3) == 45) { - if (this.inModule) this.unexpected() - // ` - -[![NPM](https://nodei.co/npm/through2.png?compact=true)](https://nodei.co/npm/through2/) - - - -**A tiny wrapper around Node streams.Transform (Streams2) to avoid explicit subclassing noise** - -Inspired by [Dominic Tarr](https://github.com/dominictarr)'s [through](https://github.com/dominictarr/through) in that it's so much easier to make a stream out of a function than it is to set up the prototype chain properly: `through(function (chunk) { ... })`. - -Note: A **Streams3** version of through2 is available in npm with the tag `"1.0"` rather than `"latest"` so an `npm install through2` will get you the current Streams2 version (version number is 0.x.x). To use a Streams3 version use `npm install through2@1` to fetch the latest version 1.x.x. More information about Streams2 vs Streams3 and recommendations [here](http://www.nearform.com/nodecrunch/dont-use-nodes-core-stream-module). - -```js -fs.createReadStream('ex.txt') - .pipe(through2(function (chunk, enc, callback) { - - for (var i = 0; i < chunk.length; i++) - if (chunk[i] == 97) - chunk[i] = 122 // swap 'a' for 'z' - - this.push(chunk) - - callback() - - })) - .pipe(fs.createWriteStream('out.txt')) -``` - -Or object streams: - -```js -var all = [] - -fs.createReadStream('data.csv') - .pipe(csv2()) - .pipe(through2.obj(function (chunk, enc, callback) { - - var data = { - name : chunk[0] - , address : chunk[3] - , phone : chunk[10] - } - - this.push(data) - - callback() - - })) - .on('data', function (data) { - all.push(data) - }) - .on('end', function () { - doSomethingSpecial(all) - }) -``` - -Note that `through2.obj(fn)` is a convenience wrapper around `through2({ objectMode: true }, fn)`. - -## API - -through2([ options, ] [ transformFunction ] [, flushFunction ]) - -Consult the **[stream.Transform](http://nodejs.org/docs/latest/api/stream.html#stream_class_stream_transform)** documentation for the exact rules of the `transformFunction` (i.e. `this._transform`) and the optional `flushFunction` (i.e. `this._flush`). - -### options - -The options argument is optional and is passed straight through to `stream.Transform`. So you can use `objectMode:true` if you are processing non-binary streams (or just use `through2.obj()`). - -The `options` argument is first, unlike standard convention, because if I'm passing in an anonymous function then I'd prefer for the options argument to not get lost at the end of the call: - -```js -fs.createReadStream('/tmp/important.dat') - .pipe(through2({ objectMode: true, allowHalfOpen: false }, function (chunk, enc, cb) { - - this.push(new Buffer('wut?')) - cb() - - }) - .pipe(fs.createWriteStream('/tmp/wut.txt')) -``` - -### transformFunction - -The `transformFunction` must have the following signature: `function (chunk, encoding, callback) {}`. A minimal implementation should call the `callback` function to indicate that the transformation is done, even if that transformation means discarding the chunk. - -To queue a new chunk, call `this.push(chunk)`—this can be called as many times as required before the `callback()` if you have multiple pieces to send on. - -If you **do not provide a `transformFunction`** then you will get a simple simple pass-through stream. - -### flushFunction - -The optional `flushFunction` is provided as the last argument (2nd or 3rd, depending on whether you've supplied options) is called just prior to the stream ending. Can be used to finish up any processing that may be in progress. - -through2.ctor([ options, ] transformFunction[, flushFunction ]) - -Instead of returning a `stream.Transform` instance, `through2.ctor()` returns a **constructor** for a custom Transform. This is useful when you want to use the same transform logic in multiple instances. - -```js -var FToC = through2.ctor({objectMode: true}, function (record, encoding, callback) { - if (record.temp != null && record.unit = "F") { - record.temp = ( ( record.temp - 32 ) * 5 ) / 9 - record.unit = "C" - } - this.push(record) - callback() -}) - -// Create instances of FToC like so: -var converter = new FToC() -// Or: -var converter = FToC() -// Or specify/override options when you instantiate, if you prefer: -var converter = FToC({objectMode: true}) -``` - -## See Also - - - [through2-map](https://github.com/brycebaril/through2-map) - Array.prototype.map analog for streams. - - [through2-filter](https://github.com/brycebaril/through2-filter) - Array.prototype.filter analog for streams. - - [through2-reduce](https://github.com/brycebaril/through2-reduce) - Array.prototype.reduce analog for streams. - - [through2-spy](https://github.com/brycebaril/through2-spy) - Wrapper for simple stream.PassThrough spies. - -## License - -**through2** is Copyright (c) 2013 Rod Vagg [@rvagg](https://twitter.com/rvagg) and licenced under the MIT licence. All rights not explicitly granted in the MIT license are reserved. See the included LICENSE file for more details. diff --git a/node_modules/browserify/node_modules/module-deps/node_modules/stream-combiner2/node_modules/through2/node_modules/readable-stream/.npmignore b/node_modules/browserify/node_modules/module-deps/node_modules/stream-combiner2/node_modules/through2/node_modules/readable-stream/.npmignore deleted file mode 100644 index 38344f87..00000000 --- a/node_modules/browserify/node_modules/module-deps/node_modules/stream-combiner2/node_modules/through2/node_modules/readable-stream/.npmignore +++ /dev/null @@ -1,5 +0,0 @@ -build/ -test/ -examples/ -fs.js -zlib.js \ No newline at end of file diff --git a/node_modules/browserify/node_modules/module-deps/node_modules/stream-combiner2/node_modules/through2/node_modules/readable-stream/LICENSE b/node_modules/browserify/node_modules/module-deps/node_modules/stream-combiner2/node_modules/through2/node_modules/readable-stream/LICENSE deleted file mode 100644 index e3d4e695..00000000 --- a/node_modules/browserify/node_modules/module-deps/node_modules/stream-combiner2/node_modules/through2/node_modules/readable-stream/LICENSE +++ /dev/null @@ -1,18 +0,0 @@ -Copyright Joyent, Inc. and other Node contributors. All rights reserved. -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to -deal in the Software without restriction, including without limitation the -rights to use, copy, modify, merge, publish, distribute, sublicense, and/or -sell copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS -IN THE SOFTWARE. diff --git a/node_modules/browserify/node_modules/module-deps/node_modules/stream-combiner2/node_modules/through2/node_modules/readable-stream/README.md b/node_modules/browserify/node_modules/module-deps/node_modules/stream-combiner2/node_modules/through2/node_modules/readable-stream/README.md deleted file mode 100644 index 3fb3e802..00000000 --- a/node_modules/browserify/node_modules/module-deps/node_modules/stream-combiner2/node_modules/through2/node_modules/readable-stream/README.md +++ /dev/null @@ -1,15 +0,0 @@ -# readable-stream - -***Node-core streams for userland*** - -[![NPM](https://nodei.co/npm/readable-stream.png?downloads=true&downloadRank=true)](https://nodei.co/npm/readable-stream/) -[![NPM](https://nodei.co/npm-dl/readable-stream.png?&months=6&height=3)](https://nodei.co/npm/readable-stream/) - -This package is a mirror of the Streams2 and Streams3 implementations in Node-core. - -If you want to guarantee a stable streams base, regardless of what version of Node you, or the users of your libraries are using, use **readable-stream** *only* and avoid the *"stream"* module in Node-core. - -**readable-stream** comes in two major versions, v1.0.x and v1.1.x. The former tracks the Streams2 implementation in Node 0.10, including bug-fixes and minor improvements as they are added. The latter tracks Streams3 as it develops in Node 0.11; we will likely see a v1.2.x branch for Node 0.12. - -**readable-stream** uses proper patch-level versioning so if you pin to `"~1.0.0"` you’ll get the latest Node 0.10 Streams2 implementation, including any fixes and minor non-breaking improvements. The patch-level versions of 1.0.x and 1.1.x should mirror the patch-level versions of Node-core releases. You should prefer the **1.0.x** releases for now and when you’re ready to start using Streams3, pin to `"~1.1.0"` - diff --git a/node_modules/browserify/node_modules/module-deps/node_modules/stream-combiner2/node_modules/through2/node_modules/readable-stream/duplex.js b/node_modules/browserify/node_modules/module-deps/node_modules/stream-combiner2/node_modules/through2/node_modules/readable-stream/duplex.js deleted file mode 100644 index ca807af8..00000000 --- a/node_modules/browserify/node_modules/module-deps/node_modules/stream-combiner2/node_modules/through2/node_modules/readable-stream/duplex.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require("./lib/_stream_duplex.js") diff --git a/node_modules/browserify/node_modules/module-deps/node_modules/stream-combiner2/node_modules/through2/node_modules/readable-stream/lib/_stream_duplex.js b/node_modules/browserify/node_modules/module-deps/node_modules/stream-combiner2/node_modules/through2/node_modules/readable-stream/lib/_stream_duplex.js deleted file mode 100644 index b513d61a..00000000 --- a/node_modules/browserify/node_modules/module-deps/node_modules/stream-combiner2/node_modules/through2/node_modules/readable-stream/lib/_stream_duplex.js +++ /dev/null @@ -1,89 +0,0 @@ -// Copyright Joyent, Inc. and other Node contributors. -// -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to permit -// persons to whom the Software is furnished to do so, subject to the -// following conditions: -// -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -// USE OR OTHER DEALINGS IN THE SOFTWARE. - -// a duplex stream is just a stream that is both readable and writable. -// Since JS doesn't have multiple prototypal inheritance, this class -// prototypally inherits from Readable, and then parasitically from -// Writable. - -module.exports = Duplex; - -/**/ -var objectKeys = Object.keys || function (obj) { - var keys = []; - for (var key in obj) keys.push(key); - return keys; -} -/**/ - - -/**/ -var util = require('core-util-is'); -util.inherits = require('inherits'); -/**/ - -var Readable = require('./_stream_readable'); -var Writable = require('./_stream_writable'); - -util.inherits(Duplex, Readable); - -forEach(objectKeys(Writable.prototype), function(method) { - if (!Duplex.prototype[method]) - Duplex.prototype[method] = Writable.prototype[method]; -}); - -function Duplex(options) { - if (!(this instanceof Duplex)) - return new Duplex(options); - - Readable.call(this, options); - Writable.call(this, options); - - if (options && options.readable === false) - this.readable = false; - - if (options && options.writable === false) - this.writable = false; - - this.allowHalfOpen = true; - if (options && options.allowHalfOpen === false) - this.allowHalfOpen = false; - - this.once('end', onend); -} - -// the no-half-open enforcer -function onend() { - // if we allow half-open state, or if the writable side ended, - // then we're ok. - if (this.allowHalfOpen || this._writableState.ended) - return; - - // no more data can be written. - // But allow more writes to happen in this tick. - process.nextTick(this.end.bind(this)); -} - -function forEach (xs, f) { - for (var i = 0, l = xs.length; i < l; i++) { - f(xs[i], i); - } -} diff --git a/node_modules/browserify/node_modules/module-deps/node_modules/stream-combiner2/node_modules/through2/node_modules/readable-stream/lib/_stream_passthrough.js b/node_modules/browserify/node_modules/module-deps/node_modules/stream-combiner2/node_modules/through2/node_modules/readable-stream/lib/_stream_passthrough.js deleted file mode 100644 index 895ca50a..00000000 --- a/node_modules/browserify/node_modules/module-deps/node_modules/stream-combiner2/node_modules/through2/node_modules/readable-stream/lib/_stream_passthrough.js +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright Joyent, Inc. and other Node contributors. -// -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to permit -// persons to whom the Software is furnished to do so, subject to the -// following conditions: -// -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -// USE OR OTHER DEALINGS IN THE SOFTWARE. - -// a passthrough stream. -// basically just the most minimal sort of Transform stream. -// Every written chunk gets output as-is. - -module.exports = PassThrough; - -var Transform = require('./_stream_transform'); - -/**/ -var util = require('core-util-is'); -util.inherits = require('inherits'); -/**/ - -util.inherits(PassThrough, Transform); - -function PassThrough(options) { - if (!(this instanceof PassThrough)) - return new PassThrough(options); - - Transform.call(this, options); -} - -PassThrough.prototype._transform = function(chunk, encoding, cb) { - cb(null, chunk); -}; diff --git a/node_modules/browserify/node_modules/module-deps/node_modules/stream-combiner2/node_modules/through2/node_modules/readable-stream/lib/_stream_readable.js b/node_modules/browserify/node_modules/module-deps/node_modules/stream-combiner2/node_modules/through2/node_modules/readable-stream/lib/_stream_readable.js deleted file mode 100644 index 63072209..00000000 --- a/node_modules/browserify/node_modules/module-deps/node_modules/stream-combiner2/node_modules/through2/node_modules/readable-stream/lib/_stream_readable.js +++ /dev/null @@ -1,982 +0,0 @@ -// Copyright Joyent, Inc. and other Node contributors. -// -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to permit -// persons to whom the Software is furnished to do so, subject to the -// following conditions: -// -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -// USE OR OTHER DEALINGS IN THE SOFTWARE. - -module.exports = Readable; - -/**/ -var isArray = require('isarray'); -/**/ - - -/**/ -var Buffer = require('buffer').Buffer; -/**/ - -Readable.ReadableState = ReadableState; - -var EE = require('events').EventEmitter; - -/**/ -if (!EE.listenerCount) EE.listenerCount = function(emitter, type) { - return emitter.listeners(type).length; -}; -/**/ - -var Stream = require('stream'); - -/**/ -var util = require('core-util-is'); -util.inherits = require('inherits'); -/**/ - -var StringDecoder; - -util.inherits(Readable, Stream); - -function ReadableState(options, stream) { - options = options || {}; - - // the point at which it stops calling _read() to fill the buffer - // Note: 0 is a valid value, means "don't call _read preemptively ever" - var hwm = options.highWaterMark; - this.highWaterMark = (hwm || hwm === 0) ? hwm : 16 * 1024; - - // cast to ints. - this.highWaterMark = ~~this.highWaterMark; - - this.buffer = []; - this.length = 0; - this.pipes = null; - this.pipesCount = 0; - this.flowing = false; - this.ended = false; - this.endEmitted = false; - this.reading = false; - - // In streams that never have any data, and do push(null) right away, - // the consumer can miss the 'end' event if they do some I/O before - // consuming the stream. So, we don't emit('end') until some reading - // happens. - this.calledRead = false; - - // a flag to be able to tell if the onwrite cb is called immediately, - // or on a later tick. We set this to true at first, becuase any - // actions that shouldn't happen until "later" should generally also - // not happen before the first write call. - this.sync = true; - - // whenever we return null, then we set a flag to say - // that we're awaiting a 'readable' event emission. - this.needReadable = false; - this.emittedReadable = false; - this.readableListening = false; - - - // object stream flag. Used to make read(n) ignore n and to - // make all the buffer merging and length checks go away - this.objectMode = !!options.objectMode; - - // Crypto is kind of old and crusty. Historically, its default string - // encoding is 'binary' so we have to make this configurable. - // Everything else in the universe uses 'utf8', though. - this.defaultEncoding = options.defaultEncoding || 'utf8'; - - // when piping, we only care about 'readable' events that happen - // after read()ing all the bytes and not getting any pushback. - this.ranOut = false; - - // the number of writers that are awaiting a drain event in .pipe()s - this.awaitDrain = 0; - - // if true, a maybeReadMore has been scheduled - this.readingMore = false; - - this.decoder = null; - this.encoding = null; - if (options.encoding) { - if (!StringDecoder) - StringDecoder = require('string_decoder/').StringDecoder; - this.decoder = new StringDecoder(options.encoding); - this.encoding = options.encoding; - } -} - -function Readable(options) { - if (!(this instanceof Readable)) - return new Readable(options); - - this._readableState = new ReadableState(options, this); - - // legacy - this.readable = true; - - Stream.call(this); -} - -// Manually shove something into the read() buffer. -// This returns true if the highWaterMark has not been hit yet, -// similar to how Writable.write() returns true if you should -// write() some more. -Readable.prototype.push = function(chunk, encoding) { - var state = this._readableState; - - if (typeof chunk === 'string' && !state.objectMode) { - encoding = encoding || state.defaultEncoding; - if (encoding !== state.encoding) { - chunk = new Buffer(chunk, encoding); - encoding = ''; - } - } - - return readableAddChunk(this, state, chunk, encoding, false); -}; - -// Unshift should *always* be something directly out of read() -Readable.prototype.unshift = function(chunk) { - var state = this._readableState; - return readableAddChunk(this, state, chunk, '', true); -}; - -function readableAddChunk(stream, state, chunk, encoding, addToFront) { - var er = chunkInvalid(state, chunk); - if (er) { - stream.emit('error', er); - } else if (chunk === null || chunk === undefined) { - state.reading = false; - if (!state.ended) - onEofChunk(stream, state); - } else if (state.objectMode || chunk && chunk.length > 0) { - if (state.ended && !addToFront) { - var e = new Error('stream.push() after EOF'); - stream.emit('error', e); - } else if (state.endEmitted && addToFront) { - var e = new Error('stream.unshift() after end event'); - stream.emit('error', e); - } else { - if (state.decoder && !addToFront && !encoding) - chunk = state.decoder.write(chunk); - - // update the buffer info. - state.length += state.objectMode ? 1 : chunk.length; - if (addToFront) { - state.buffer.unshift(chunk); - } else { - state.reading = false; - state.buffer.push(chunk); - } - - if (state.needReadable) - emitReadable(stream); - - maybeReadMore(stream, state); - } - } else if (!addToFront) { - state.reading = false; - } - - return needMoreData(state); -} - - - -// if it's past the high water mark, we can push in some more. -// Also, if we have no data yet, we can stand some -// more bytes. This is to work around cases where hwm=0, -// such as the repl. Also, if the push() triggered a -// readable event, and the user called read(largeNumber) such that -// needReadable was set, then we ought to push more, so that another -// 'readable' event will be triggered. -function needMoreData(state) { - return !state.ended && - (state.needReadable || - state.length < state.highWaterMark || - state.length === 0); -} - -// backwards compatibility. -Readable.prototype.setEncoding = function(enc) { - if (!StringDecoder) - StringDecoder = require('string_decoder/').StringDecoder; - this._readableState.decoder = new StringDecoder(enc); - this._readableState.encoding = enc; -}; - -// Don't raise the hwm > 128MB -var MAX_HWM = 0x800000; -function roundUpToNextPowerOf2(n) { - if (n >= MAX_HWM) { - n = MAX_HWM; - } else { - // Get the next highest power of 2 - n--; - for (var p = 1; p < 32; p <<= 1) n |= n >> p; - n++; - } - return n; -} - -function howMuchToRead(n, state) { - if (state.length === 0 && state.ended) - return 0; - - if (state.objectMode) - return n === 0 ? 0 : 1; - - if (n === null || isNaN(n)) { - // only flow one buffer at a time - if (state.flowing && state.buffer.length) - return state.buffer[0].length; - else - return state.length; - } - - if (n <= 0) - return 0; - - // If we're asking for more than the target buffer level, - // then raise the water mark. Bump up to the next highest - // power of 2, to prevent increasing it excessively in tiny - // amounts. - if (n > state.highWaterMark) - state.highWaterMark = roundUpToNextPowerOf2(n); - - // don't have that much. return null, unless we've ended. - if (n > state.length) { - if (!state.ended) { - state.needReadable = true; - return 0; - } else - return state.length; - } - - return n; -} - -// you can override either this method, or the async _read(n) below. -Readable.prototype.read = function(n) { - var state = this._readableState; - state.calledRead = true; - var nOrig = n; - var ret; - - if (typeof n !== 'number' || n > 0) - state.emittedReadable = false; - - // if we're doing read(0) to trigger a readable event, but we - // already have a bunch of data in the buffer, then just trigger - // the 'readable' event and move on. - if (n === 0 && - state.needReadable && - (state.length >= state.highWaterMark || state.ended)) { - emitReadable(this); - return null; - } - - n = howMuchToRead(n, state); - - // if we've ended, and we're now clear, then finish it up. - if (n === 0 && state.ended) { - ret = null; - - // In cases where the decoder did not receive enough data - // to produce a full chunk, then immediately received an - // EOF, state.buffer will contain [, ]. - // howMuchToRead will see this and coerce the amount to - // read to zero (because it's looking at the length of the - // first in state.buffer), and we'll end up here. - // - // This can only happen via state.decoder -- no other venue - // exists for pushing a zero-length chunk into state.buffer - // and triggering this behavior. In this case, we return our - // remaining data and end the stream, if appropriate. - if (state.length > 0 && state.decoder) { - ret = fromList(n, state); - state.length -= ret.length; - } - - if (state.length === 0) - endReadable(this); - - return ret; - } - - // All the actual chunk generation logic needs to be - // *below* the call to _read. The reason is that in certain - // synthetic stream cases, such as passthrough streams, _read - // may be a completely synchronous operation which may change - // the state of the read buffer, providing enough data when - // before there was *not* enough. - // - // So, the steps are: - // 1. Figure out what the state of things will be after we do - // a read from the buffer. - // - // 2. If that resulting state will trigger a _read, then call _read. - // Note that this may be asynchronous, or synchronous. Yes, it is - // deeply ugly to write APIs this way, but that still doesn't mean - // that the Readable class should behave improperly, as streams are - // designed to be sync/async agnostic. - // Take note if the _read call is sync or async (ie, if the read call - // has returned yet), so that we know whether or not it's safe to emit - // 'readable' etc. - // - // 3. Actually pull the requested chunks out of the buffer and return. - - // if we need a readable event, then we need to do some reading. - var doRead = state.needReadable; - - // if we currently have less than the highWaterMark, then also read some - if (state.length - n <= state.highWaterMark) - doRead = true; - - // however, if we've ended, then there's no point, and if we're already - // reading, then it's unnecessary. - if (state.ended || state.reading) - doRead = false; - - if (doRead) { - state.reading = true; - state.sync = true; - // if the length is currently zero, then we *need* a readable event. - if (state.length === 0) - state.needReadable = true; - // call internal read method - this._read(state.highWaterMark); - state.sync = false; - } - - // If _read called its callback synchronously, then `reading` - // will be false, and we need to re-evaluate how much data we - // can return to the user. - if (doRead && !state.reading) - n = howMuchToRead(nOrig, state); - - if (n > 0) - ret = fromList(n, state); - else - ret = null; - - if (ret === null) { - state.needReadable = true; - n = 0; - } - - state.length -= n; - - // If we have nothing in the buffer, then we want to know - // as soon as we *do* get something into the buffer. - if (state.length === 0 && !state.ended) - state.needReadable = true; - - // If we happened to read() exactly the remaining amount in the - // buffer, and the EOF has been seen at this point, then make sure - // that we emit 'end' on the very next tick. - if (state.ended && !state.endEmitted && state.length === 0) - endReadable(this); - - return ret; -}; - -function chunkInvalid(state, chunk) { - var er = null; - if (!Buffer.isBuffer(chunk) && - 'string' !== typeof chunk && - chunk !== null && - chunk !== undefined && - !state.objectMode) { - er = new TypeError('Invalid non-string/buffer chunk'); - } - return er; -} - - -function onEofChunk(stream, state) { - if (state.decoder && !state.ended) { - var chunk = state.decoder.end(); - if (chunk && chunk.length) { - state.buffer.push(chunk); - state.length += state.objectMode ? 1 : chunk.length; - } - } - state.ended = true; - - // if we've ended and we have some data left, then emit - // 'readable' now to make sure it gets picked up. - if (state.length > 0) - emitReadable(stream); - else - endReadable(stream); -} - -// Don't emit readable right away in sync mode, because this can trigger -// another read() call => stack overflow. This way, it might trigger -// a nextTick recursion warning, but that's not so bad. -function emitReadable(stream) { - var state = stream._readableState; - state.needReadable = false; - if (state.emittedReadable) - return; - - state.emittedReadable = true; - if (state.sync) - process.nextTick(function() { - emitReadable_(stream); - }); - else - emitReadable_(stream); -} - -function emitReadable_(stream) { - stream.emit('readable'); -} - - -// at this point, the user has presumably seen the 'readable' event, -// and called read() to consume some data. that may have triggered -// in turn another _read(n) call, in which case reading = true if -// it's in progress. -// However, if we're not ended, or reading, and the length < hwm, -// then go ahead and try to read some more preemptively. -function maybeReadMore(stream, state) { - if (!state.readingMore) { - state.readingMore = true; - process.nextTick(function() { - maybeReadMore_(stream, state); - }); - } -} - -function maybeReadMore_(stream, state) { - var len = state.length; - while (!state.reading && !state.flowing && !state.ended && - state.length < state.highWaterMark) { - stream.read(0); - if (len === state.length) - // didn't get any data, stop spinning. - break; - else - len = state.length; - } - state.readingMore = false; -} - -// abstract method. to be overridden in specific implementation classes. -// call cb(er, data) where data is <= n in length. -// for virtual (non-string, non-buffer) streams, "length" is somewhat -// arbitrary, and perhaps not very meaningful. -Readable.prototype._read = function(n) { - this.emit('error', new Error('not implemented')); -}; - -Readable.prototype.pipe = function(dest, pipeOpts) { - var src = this; - var state = this._readableState; - - switch (state.pipesCount) { - case 0: - state.pipes = dest; - break; - case 1: - state.pipes = [state.pipes, dest]; - break; - default: - state.pipes.push(dest); - break; - } - state.pipesCount += 1; - - var doEnd = (!pipeOpts || pipeOpts.end !== false) && - dest !== process.stdout && - dest !== process.stderr; - - var endFn = doEnd ? onend : cleanup; - if (state.endEmitted) - process.nextTick(endFn); - else - src.once('end', endFn); - - dest.on('unpipe', onunpipe); - function onunpipe(readable) { - if (readable !== src) return; - cleanup(); - } - - function onend() { - dest.end(); - } - - // when the dest drains, it reduces the awaitDrain counter - // on the source. This would be more elegant with a .once() - // handler in flow(), but adding and removing repeatedly is - // too slow. - var ondrain = pipeOnDrain(src); - dest.on('drain', ondrain); - - function cleanup() { - // cleanup event handlers once the pipe is broken - dest.removeListener('close', onclose); - dest.removeListener('finish', onfinish); - dest.removeListener('drain', ondrain); - dest.removeListener('error', onerror); - dest.removeListener('unpipe', onunpipe); - src.removeListener('end', onend); - src.removeListener('end', cleanup); - - // if the reader is waiting for a drain event from this - // specific writer, then it would cause it to never start - // flowing again. - // So, if this is awaiting a drain, then we just call it now. - // If we don't know, then assume that we are waiting for one. - if (!dest._writableState || dest._writableState.needDrain) - ondrain(); - } - - // if the dest has an error, then stop piping into it. - // however, don't suppress the throwing behavior for this. - function onerror(er) { - unpipe(); - dest.removeListener('error', onerror); - if (EE.listenerCount(dest, 'error') === 0) - dest.emit('error', er); - } - // This is a brutally ugly hack to make sure that our error handler - // is attached before any userland ones. NEVER DO THIS. - if (!dest._events || !dest._events.error) - dest.on('error', onerror); - else if (isArray(dest._events.error)) - dest._events.error.unshift(onerror); - else - dest._events.error = [onerror, dest._events.error]; - - - - // Both close and finish should trigger unpipe, but only once. - function onclose() { - dest.removeListener('finish', onfinish); - unpipe(); - } - dest.once('close', onclose); - function onfinish() { - dest.removeListener('close', onclose); - unpipe(); - } - dest.once('finish', onfinish); - - function unpipe() { - src.unpipe(dest); - } - - // tell the dest that it's being piped to - dest.emit('pipe', src); - - // start the flow if it hasn't been started already. - if (!state.flowing) { - // the handler that waits for readable events after all - // the data gets sucked out in flow. - // This would be easier to follow with a .once() handler - // in flow(), but that is too slow. - this.on('readable', pipeOnReadable); - - state.flowing = true; - process.nextTick(function() { - flow(src); - }); - } - - return dest; -}; - -function pipeOnDrain(src) { - return function() { - var dest = this; - var state = src._readableState; - state.awaitDrain--; - if (state.awaitDrain === 0) - flow(src); - }; -} - -function flow(src) { - var state = src._readableState; - var chunk; - state.awaitDrain = 0; - - function write(dest, i, list) { - var written = dest.write(chunk); - if (false === written) { - state.awaitDrain++; - } - } - - while (state.pipesCount && null !== (chunk = src.read())) { - - if (state.pipesCount === 1) - write(state.pipes, 0, null); - else - forEach(state.pipes, write); - - src.emit('data', chunk); - - // if anyone needs a drain, then we have to wait for that. - if (state.awaitDrain > 0) - return; - } - - // if every destination was unpiped, either before entering this - // function, or in the while loop, then stop flowing. - // - // NB: This is a pretty rare edge case. - if (state.pipesCount === 0) { - state.flowing = false; - - // if there were data event listeners added, then switch to old mode. - if (EE.listenerCount(src, 'data') > 0) - emitDataEvents(src); - return; - } - - // at this point, no one needed a drain, so we just ran out of data - // on the next readable event, start it over again. - state.ranOut = true; -} - -function pipeOnReadable() { - if (this._readableState.ranOut) { - this._readableState.ranOut = false; - flow(this); - } -} - - -Readable.prototype.unpipe = function(dest) { - var state = this._readableState; - - // if we're not piping anywhere, then do nothing. - if (state.pipesCount === 0) - return this; - - // just one destination. most common case. - if (state.pipesCount === 1) { - // passed in one, but it's not the right one. - if (dest && dest !== state.pipes) - return this; - - if (!dest) - dest = state.pipes; - - // got a match. - state.pipes = null; - state.pipesCount = 0; - this.removeListener('readable', pipeOnReadable); - state.flowing = false; - if (dest) - dest.emit('unpipe', this); - return this; - } - - // slow case. multiple pipe destinations. - - if (!dest) { - // remove all. - var dests = state.pipes; - var len = state.pipesCount; - state.pipes = null; - state.pipesCount = 0; - this.removeListener('readable', pipeOnReadable); - state.flowing = false; - - for (var i = 0; i < len; i++) - dests[i].emit('unpipe', this); - return this; - } - - // try to find the right one. - var i = indexOf(state.pipes, dest); - if (i === -1) - return this; - - state.pipes.splice(i, 1); - state.pipesCount -= 1; - if (state.pipesCount === 1) - state.pipes = state.pipes[0]; - - dest.emit('unpipe', this); - - return this; -}; - -// set up data events if they are asked for -// Ensure readable listeners eventually get something -Readable.prototype.on = function(ev, fn) { - var res = Stream.prototype.on.call(this, ev, fn); - - if (ev === 'data' && !this._readableState.flowing) - emitDataEvents(this); - - if (ev === 'readable' && this.readable) { - var state = this._readableState; - if (!state.readableListening) { - state.readableListening = true; - state.emittedReadable = false; - state.needReadable = true; - if (!state.reading) { - this.read(0); - } else if (state.length) { - emitReadable(this, state); - } - } - } - - return res; -}; -Readable.prototype.addListener = Readable.prototype.on; - -// pause() and resume() are remnants of the legacy readable stream API -// If the user uses them, then switch into old mode. -Readable.prototype.resume = function() { - emitDataEvents(this); - this.read(0); - this.emit('resume'); -}; - -Readable.prototype.pause = function() { - emitDataEvents(this, true); - this.emit('pause'); -}; - -function emitDataEvents(stream, startPaused) { - var state = stream._readableState; - - if (state.flowing) { - // https://github.com/isaacs/readable-stream/issues/16 - throw new Error('Cannot switch to old mode now.'); - } - - var paused = startPaused || false; - var readable = false; - - // convert to an old-style stream. - stream.readable = true; - stream.pipe = Stream.prototype.pipe; - stream.on = stream.addListener = Stream.prototype.on; - - stream.on('readable', function() { - readable = true; - - var c; - while (!paused && (null !== (c = stream.read()))) - stream.emit('data', c); - - if (c === null) { - readable = false; - stream._readableState.needReadable = true; - } - }); - - stream.pause = function() { - paused = true; - this.emit('pause'); - }; - - stream.resume = function() { - paused = false; - if (readable) - process.nextTick(function() { - stream.emit('readable'); - }); - else - this.read(0); - this.emit('resume'); - }; - - // now make it start, just in case it hadn't already. - stream.emit('readable'); -} - -// wrap an old-style stream as the async data source. -// This is *not* part of the readable stream interface. -// It is an ugly unfortunate mess of history. -Readable.prototype.wrap = function(stream) { - var state = this._readableState; - var paused = false; - - var self = this; - stream.on('end', function() { - if (state.decoder && !state.ended) { - var chunk = state.decoder.end(); - if (chunk && chunk.length) - self.push(chunk); - } - - self.push(null); - }); - - stream.on('data', function(chunk) { - if (state.decoder) - chunk = state.decoder.write(chunk); - - // don't skip over falsy values in objectMode - //if (state.objectMode && util.isNullOrUndefined(chunk)) - if (state.objectMode && (chunk === null || chunk === undefined)) - return; - else if (!state.objectMode && (!chunk || !chunk.length)) - return; - - var ret = self.push(chunk); - if (!ret) { - paused = true; - stream.pause(); - } - }); - - // proxy all the other methods. - // important when wrapping filters and duplexes. - for (var i in stream) { - if (typeof stream[i] === 'function' && - typeof this[i] === 'undefined') { - this[i] = function(method) { return function() { - return stream[method].apply(stream, arguments); - }}(i); - } - } - - // proxy certain important events. - var events = ['error', 'close', 'destroy', 'pause', 'resume']; - forEach(events, function(ev) { - stream.on(ev, self.emit.bind(self, ev)); - }); - - // when we try to consume some more bytes, simply unpause the - // underlying stream. - self._read = function(n) { - if (paused) { - paused = false; - stream.resume(); - } - }; - - return self; -}; - - - -// exposed for testing purposes only. -Readable._fromList = fromList; - -// Pluck off n bytes from an array of buffers. -// Length is the combined lengths of all the buffers in the list. -function fromList(n, state) { - var list = state.buffer; - var length = state.length; - var stringMode = !!state.decoder; - var objectMode = !!state.objectMode; - var ret; - - // nothing in the list, definitely empty. - if (list.length === 0) - return null; - - if (length === 0) - ret = null; - else if (objectMode) - ret = list.shift(); - else if (!n || n >= length) { - // read it all, truncate the array. - if (stringMode) - ret = list.join(''); - else - ret = Buffer.concat(list, length); - list.length = 0; - } else { - // read just some of it. - if (n < list[0].length) { - // just take a part of the first list item. - // slice is the same for buffers and strings. - var buf = list[0]; - ret = buf.slice(0, n); - list[0] = buf.slice(n); - } else if (n === list[0].length) { - // first list is a perfect match - ret = list.shift(); - } else { - // complex case. - // we have enough to cover it, but it spans past the first buffer. - if (stringMode) - ret = ''; - else - ret = new Buffer(n); - - var c = 0; - for (var i = 0, l = list.length; i < l && c < n; i++) { - var buf = list[0]; - var cpy = Math.min(n - c, buf.length); - - if (stringMode) - ret += buf.slice(0, cpy); - else - buf.copy(ret, c, 0, cpy); - - if (cpy < buf.length) - list[0] = buf.slice(cpy); - else - list.shift(); - - c += cpy; - } - } - } - - return ret; -} - -function endReadable(stream) { - var state = stream._readableState; - - // If we get here before consuming all the bytes, then that is a - // bug in node. Should never happen. - if (state.length > 0) - throw new Error('endReadable called on non-empty stream'); - - if (!state.endEmitted && state.calledRead) { - state.ended = true; - process.nextTick(function() { - // Check that we didn't get one last unshift. - if (!state.endEmitted && state.length === 0) { - state.endEmitted = true; - stream.readable = false; - stream.emit('end'); - } - }); - } -} - -function forEach (xs, f) { - for (var i = 0, l = xs.length; i < l; i++) { - f(xs[i], i); - } -} - -function indexOf (xs, x) { - for (var i = 0, l = xs.length; i < l; i++) { - if (xs[i] === x) return i; - } - return -1; -} diff --git a/node_modules/browserify/node_modules/module-deps/node_modules/stream-combiner2/node_modules/through2/node_modules/readable-stream/lib/_stream_transform.js b/node_modules/browserify/node_modules/module-deps/node_modules/stream-combiner2/node_modules/through2/node_modules/readable-stream/lib/_stream_transform.js deleted file mode 100644 index eb188df3..00000000 --- a/node_modules/browserify/node_modules/module-deps/node_modules/stream-combiner2/node_modules/through2/node_modules/readable-stream/lib/_stream_transform.js +++ /dev/null @@ -1,210 +0,0 @@ -// Copyright Joyent, Inc. and other Node contributors. -// -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to permit -// persons to whom the Software is furnished to do so, subject to the -// following conditions: -// -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -// USE OR OTHER DEALINGS IN THE SOFTWARE. - - -// a transform stream is a readable/writable stream where you do -// something with the data. Sometimes it's called a "filter", -// but that's not a great name for it, since that implies a thing where -// some bits pass through, and others are simply ignored. (That would -// be a valid example of a transform, of course.) -// -// While the output is causally related to the input, it's not a -// necessarily symmetric or synchronous transformation. For example, -// a zlib stream might take multiple plain-text writes(), and then -// emit a single compressed chunk some time in the future. -// -// Here's how this works: -// -// The Transform stream has all the aspects of the readable and writable -// stream classes. When you write(chunk), that calls _write(chunk,cb) -// internally, and returns false if there's a lot of pending writes -// buffered up. When you call read(), that calls _read(n) until -// there's enough pending readable data buffered up. -// -// In a transform stream, the written data is placed in a buffer. When -// _read(n) is called, it transforms the queued up data, calling the -// buffered _write cb's as it consumes chunks. If consuming a single -// written chunk would result in multiple output chunks, then the first -// outputted bit calls the readcb, and subsequent chunks just go into -// the read buffer, and will cause it to emit 'readable' if necessary. -// -// This way, back-pressure is actually determined by the reading side, -// since _read has to be called to start processing a new chunk. However, -// a pathological inflate type of transform can cause excessive buffering -// here. For example, imagine a stream where every byte of input is -// interpreted as an integer from 0-255, and then results in that many -// bytes of output. Writing the 4 bytes {ff,ff,ff,ff} would result in -// 1kb of data being output. In this case, you could write a very small -// amount of input, and end up with a very large amount of output. In -// such a pathological inflating mechanism, there'd be no way to tell -// the system to stop doing the transform. A single 4MB write could -// cause the system to run out of memory. -// -// However, even in such a pathological case, only a single written chunk -// would be consumed, and then the rest would wait (un-transformed) until -// the results of the previous transformed chunk were consumed. - -module.exports = Transform; - -var Duplex = require('./_stream_duplex'); - -/**/ -var util = require('core-util-is'); -util.inherits = require('inherits'); -/**/ - -util.inherits(Transform, Duplex); - - -function TransformState(options, stream) { - this.afterTransform = function(er, data) { - return afterTransform(stream, er, data); - }; - - this.needTransform = false; - this.transforming = false; - this.writecb = null; - this.writechunk = null; -} - -function afterTransform(stream, er, data) { - var ts = stream._transformState; - ts.transforming = false; - - var cb = ts.writecb; - - if (!cb) - return stream.emit('error', new Error('no writecb in Transform class')); - - ts.writechunk = null; - ts.writecb = null; - - if (data !== null && data !== undefined) - stream.push(data); - - if (cb) - cb(er); - - var rs = stream._readableState; - rs.reading = false; - if (rs.needReadable || rs.length < rs.highWaterMark) { - stream._read(rs.highWaterMark); - } -} - - -function Transform(options) { - if (!(this instanceof Transform)) - return new Transform(options); - - Duplex.call(this, options); - - var ts = this._transformState = new TransformState(options, this); - - // when the writable side finishes, then flush out anything remaining. - var stream = this; - - // start out asking for a readable event once data is transformed. - this._readableState.needReadable = true; - - // we have implemented the _read method, and done the other things - // that Readable wants before the first _read call, so unset the - // sync guard flag. - this._readableState.sync = false; - - this.once('finish', function() { - if ('function' === typeof this._flush) - this._flush(function(er) { - done(stream, er); - }); - else - done(stream); - }); -} - -Transform.prototype.push = function(chunk, encoding) { - this._transformState.needTransform = false; - return Duplex.prototype.push.call(this, chunk, encoding); -}; - -// This is the part where you do stuff! -// override this function in implementation classes. -// 'chunk' is an input chunk. -// -// Call `push(newChunk)` to pass along transformed output -// to the readable side. You may call 'push' zero or more times. -// -// Call `cb(err)` when you are done with this chunk. If you pass -// an error, then that'll put the hurt on the whole operation. If you -// never call cb(), then you'll never get another chunk. -Transform.prototype._transform = function(chunk, encoding, cb) { - throw new Error('not implemented'); -}; - -Transform.prototype._write = function(chunk, encoding, cb) { - var ts = this._transformState; - ts.writecb = cb; - ts.writechunk = chunk; - ts.writeencoding = encoding; - if (!ts.transforming) { - var rs = this._readableState; - if (ts.needTransform || - rs.needReadable || - rs.length < rs.highWaterMark) - this._read(rs.highWaterMark); - } -}; - -// Doesn't matter what the args are here. -// _transform does all the work. -// That we got here means that the readable side wants more data. -Transform.prototype._read = function(n) { - var ts = this._transformState; - - if (ts.writechunk !== null && ts.writecb && !ts.transforming) { - ts.transforming = true; - this._transform(ts.writechunk, ts.writeencoding, ts.afterTransform); - } else { - // mark that we need a transform, so that any data that comes in - // will get processed, now that we've asked for it. - ts.needTransform = true; - } -}; - - -function done(stream, er) { - if (er) - return stream.emit('error', er); - - // if there's nothing in the write buffer, then that means - // that nothing more will ever be provided - var ws = stream._writableState; - var rs = stream._readableState; - var ts = stream._transformState; - - if (ws.length) - throw new Error('calling transform done when ws.length != 0'); - - if (ts.transforming) - throw new Error('calling transform done when still transforming'); - - return stream.push(null); -} diff --git a/node_modules/browserify/node_modules/module-deps/node_modules/stream-combiner2/node_modules/through2/node_modules/readable-stream/lib/_stream_writable.js b/node_modules/browserify/node_modules/module-deps/node_modules/stream-combiner2/node_modules/through2/node_modules/readable-stream/lib/_stream_writable.js deleted file mode 100644 index 4bdaa4fa..00000000 --- a/node_modules/browserify/node_modules/module-deps/node_modules/stream-combiner2/node_modules/through2/node_modules/readable-stream/lib/_stream_writable.js +++ /dev/null @@ -1,386 +0,0 @@ -// Copyright Joyent, Inc. and other Node contributors. -// -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to permit -// persons to whom the Software is furnished to do so, subject to the -// following conditions: -// -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -// USE OR OTHER DEALINGS IN THE SOFTWARE. - -// A bit simpler than readable streams. -// Implement an async ._write(chunk, cb), and it'll handle all -// the drain event emission and buffering. - -module.exports = Writable; - -/**/ -var Buffer = require('buffer').Buffer; -/**/ - -Writable.WritableState = WritableState; - - -/**/ -var util = require('core-util-is'); -util.inherits = require('inherits'); -/**/ - -var Stream = require('stream'); - -util.inherits(Writable, Stream); - -function WriteReq(chunk, encoding, cb) { - this.chunk = chunk; - this.encoding = encoding; - this.callback = cb; -} - -function WritableState(options, stream) { - options = options || {}; - - // the point at which write() starts returning false - // Note: 0 is a valid value, means that we always return false if - // the entire buffer is not flushed immediately on write() - var hwm = options.highWaterMark; - this.highWaterMark = (hwm || hwm === 0) ? hwm : 16 * 1024; - - // object stream flag to indicate whether or not this stream - // contains buffers or objects. - this.objectMode = !!options.objectMode; - - // cast to ints. - this.highWaterMark = ~~this.highWaterMark; - - this.needDrain = false; - // at the start of calling end() - this.ending = false; - // when end() has been called, and returned - this.ended = false; - // when 'finish' is emitted - this.finished = false; - - // should we decode strings into buffers before passing to _write? - // this is here so that some node-core streams can optimize string - // handling at a lower level. - var noDecode = options.decodeStrings === false; - this.decodeStrings = !noDecode; - - // Crypto is kind of old and crusty. Historically, its default string - // encoding is 'binary' so we have to make this configurable. - // Everything else in the universe uses 'utf8', though. - this.defaultEncoding = options.defaultEncoding || 'utf8'; - - // not an actual buffer we keep track of, but a measurement - // of how much we're waiting to get pushed to some underlying - // socket or file. - this.length = 0; - - // a flag to see when we're in the middle of a write. - this.writing = false; - - // a flag to be able to tell if the onwrite cb is called immediately, - // or on a later tick. We set this to true at first, becuase any - // actions that shouldn't happen until "later" should generally also - // not happen before the first write call. - this.sync = true; - - // a flag to know if we're processing previously buffered items, which - // may call the _write() callback in the same tick, so that we don't - // end up in an overlapped onwrite situation. - this.bufferProcessing = false; - - // the callback that's passed to _write(chunk,cb) - this.onwrite = function(er) { - onwrite(stream, er); - }; - - // the callback that the user supplies to write(chunk,encoding,cb) - this.writecb = null; - - // the amount that is being written when _write is called. - this.writelen = 0; - - this.buffer = []; - - // True if the error was already emitted and should not be thrown again - this.errorEmitted = false; -} - -function Writable(options) { - var Duplex = require('./_stream_duplex'); - - // Writable ctor is applied to Duplexes, though they're not - // instanceof Writable, they're instanceof Readable. - if (!(this instanceof Writable) && !(this instanceof Duplex)) - return new Writable(options); - - this._writableState = new WritableState(options, this); - - // legacy. - this.writable = true; - - Stream.call(this); -} - -// Otherwise people can pipe Writable streams, which is just wrong. -Writable.prototype.pipe = function() { - this.emit('error', new Error('Cannot pipe. Not readable.')); -}; - - -function writeAfterEnd(stream, state, cb) { - var er = new Error('write after end'); - // TODO: defer error events consistently everywhere, not just the cb - stream.emit('error', er); - process.nextTick(function() { - cb(er); - }); -} - -// If we get something that is not a buffer, string, null, or undefined, -// and we're not in objectMode, then that's an error. -// Otherwise stream chunks are all considered to be of length=1, and the -// watermarks determine how many objects to keep in the buffer, rather than -// how many bytes or characters. -function validChunk(stream, state, chunk, cb) { - var valid = true; - if (!Buffer.isBuffer(chunk) && - 'string' !== typeof chunk && - chunk !== null && - chunk !== undefined && - !state.objectMode) { - var er = new TypeError('Invalid non-string/buffer chunk'); - stream.emit('error', er); - process.nextTick(function() { - cb(er); - }); - valid = false; - } - return valid; -} - -Writable.prototype.write = function(chunk, encoding, cb) { - var state = this._writableState; - var ret = false; - - if (typeof encoding === 'function') { - cb = encoding; - encoding = null; - } - - if (Buffer.isBuffer(chunk)) - encoding = 'buffer'; - else if (!encoding) - encoding = state.defaultEncoding; - - if (typeof cb !== 'function') - cb = function() {}; - - if (state.ended) - writeAfterEnd(this, state, cb); - else if (validChunk(this, state, chunk, cb)) - ret = writeOrBuffer(this, state, chunk, encoding, cb); - - return ret; -}; - -function decodeChunk(state, chunk, encoding) { - if (!state.objectMode && - state.decodeStrings !== false && - typeof chunk === 'string') { - chunk = new Buffer(chunk, encoding); - } - return chunk; -} - -// if we're already writing something, then just put this -// in the queue, and wait our turn. Otherwise, call _write -// If we return false, then we need a drain event, so set that flag. -function writeOrBuffer(stream, state, chunk, encoding, cb) { - chunk = decodeChunk(state, chunk, encoding); - if (Buffer.isBuffer(chunk)) - encoding = 'buffer'; - var len = state.objectMode ? 1 : chunk.length; - - state.length += len; - - var ret = state.length < state.highWaterMark; - // we must ensure that previous needDrain will not be reset to false. - if (!ret) - state.needDrain = true; - - if (state.writing) - state.buffer.push(new WriteReq(chunk, encoding, cb)); - else - doWrite(stream, state, len, chunk, encoding, cb); - - return ret; -} - -function doWrite(stream, state, len, chunk, encoding, cb) { - state.writelen = len; - state.writecb = cb; - state.writing = true; - state.sync = true; - stream._write(chunk, encoding, state.onwrite); - state.sync = false; -} - -function onwriteError(stream, state, sync, er, cb) { - if (sync) - process.nextTick(function() { - cb(er); - }); - else - cb(er); - - stream._writableState.errorEmitted = true; - stream.emit('error', er); -} - -function onwriteStateUpdate(state) { - state.writing = false; - state.writecb = null; - state.length -= state.writelen; - state.writelen = 0; -} - -function onwrite(stream, er) { - var state = stream._writableState; - var sync = state.sync; - var cb = state.writecb; - - onwriteStateUpdate(state); - - if (er) - onwriteError(stream, state, sync, er, cb); - else { - // Check if we're actually ready to finish, but don't emit yet - var finished = needFinish(stream, state); - - if (!finished && !state.bufferProcessing && state.buffer.length) - clearBuffer(stream, state); - - if (sync) { - process.nextTick(function() { - afterWrite(stream, state, finished, cb); - }); - } else { - afterWrite(stream, state, finished, cb); - } - } -} - -function afterWrite(stream, state, finished, cb) { - if (!finished) - onwriteDrain(stream, state); - cb(); - if (finished) - finishMaybe(stream, state); -} - -// Must force callback to be called on nextTick, so that we don't -// emit 'drain' before the write() consumer gets the 'false' return -// value, and has a chance to attach a 'drain' listener. -function onwriteDrain(stream, state) { - if (state.length === 0 && state.needDrain) { - state.needDrain = false; - stream.emit('drain'); - } -} - - -// if there's something in the buffer waiting, then process it -function clearBuffer(stream, state) { - state.bufferProcessing = true; - - for (var c = 0; c < state.buffer.length; c++) { - var entry = state.buffer[c]; - var chunk = entry.chunk; - var encoding = entry.encoding; - var cb = entry.callback; - var len = state.objectMode ? 1 : chunk.length; - - doWrite(stream, state, len, chunk, encoding, cb); - - // if we didn't call the onwrite immediately, then - // it means that we need to wait until it does. - // also, that means that the chunk and cb are currently - // being processed, so move the buffer counter past them. - if (state.writing) { - c++; - break; - } - } - - state.bufferProcessing = false; - if (c < state.buffer.length) - state.buffer = state.buffer.slice(c); - else - state.buffer.length = 0; -} - -Writable.prototype._write = function(chunk, encoding, cb) { - cb(new Error('not implemented')); -}; - -Writable.prototype.end = function(chunk, encoding, cb) { - var state = this._writableState; - - if (typeof chunk === 'function') { - cb = chunk; - chunk = null; - encoding = null; - } else if (typeof encoding === 'function') { - cb = encoding; - encoding = null; - } - - if (typeof chunk !== 'undefined' && chunk !== null) - this.write(chunk, encoding); - - // ignore unnecessary end() calls. - if (!state.ending && !state.finished) - endWritable(this, state, cb); -}; - - -function needFinish(stream, state) { - return (state.ending && - state.length === 0 && - !state.finished && - !state.writing); -} - -function finishMaybe(stream, state) { - var need = needFinish(stream, state); - if (need) { - state.finished = true; - stream.emit('finish'); - } - return need; -} - -function endWritable(stream, state, cb) { - state.ending = true; - finishMaybe(stream, state); - if (cb) { - if (state.finished) - process.nextTick(cb); - else - stream.once('finish', cb); - } - state.ended = true; -} diff --git a/node_modules/browserify/node_modules/module-deps/node_modules/stream-combiner2/node_modules/through2/node_modules/readable-stream/node_modules/core-util-is/LICENSE b/node_modules/browserify/node_modules/module-deps/node_modules/stream-combiner2/node_modules/through2/node_modules/readable-stream/node_modules/core-util-is/LICENSE deleted file mode 100644 index d8d7f943..00000000 --- a/node_modules/browserify/node_modules/module-deps/node_modules/stream-combiner2/node_modules/through2/node_modules/readable-stream/node_modules/core-util-is/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright Node.js contributors. All rights reserved. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to -deal in the Software without restriction, including without limitation the -rights to use, copy, modify, merge, publish, distribute, sublicense, and/or -sell copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS -IN THE SOFTWARE. diff --git a/node_modules/browserify/node_modules/module-deps/node_modules/stream-combiner2/node_modules/through2/node_modules/readable-stream/node_modules/core-util-is/README.md b/node_modules/browserify/node_modules/module-deps/node_modules/stream-combiner2/node_modules/through2/node_modules/readable-stream/node_modules/core-util-is/README.md deleted file mode 100644 index 5a76b414..00000000 --- a/node_modules/browserify/node_modules/module-deps/node_modules/stream-combiner2/node_modules/through2/node_modules/readable-stream/node_modules/core-util-is/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# core-util-is - -The `util.is*` functions introduced in Node v0.12. diff --git a/node_modules/browserify/node_modules/module-deps/node_modules/stream-combiner2/node_modules/through2/node_modules/readable-stream/node_modules/core-util-is/float.patch b/node_modules/browserify/node_modules/module-deps/node_modules/stream-combiner2/node_modules/through2/node_modules/readable-stream/node_modules/core-util-is/float.patch deleted file mode 100644 index a06d5c05..00000000 --- a/node_modules/browserify/node_modules/module-deps/node_modules/stream-combiner2/node_modules/through2/node_modules/readable-stream/node_modules/core-util-is/float.patch +++ /dev/null @@ -1,604 +0,0 @@ -diff --git a/lib/util.js b/lib/util.js -index a03e874..9074e8e 100644 ---- a/lib/util.js -+++ b/lib/util.js -@@ -19,430 +19,6 @@ - // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE - // USE OR OTHER DEALINGS IN THE SOFTWARE. - --var formatRegExp = /%[sdj%]/g; --exports.format = function(f) { -- if (!isString(f)) { -- var objects = []; -- for (var i = 0; i < arguments.length; i++) { -- objects.push(inspect(arguments[i])); -- } -- return objects.join(' '); -- } -- -- var i = 1; -- var args = arguments; -- var len = args.length; -- var str = String(f).replace(formatRegExp, function(x) { -- if (x === '%%') return '%'; -- if (i >= len) return x; -- switch (x) { -- case '%s': return String(args[i++]); -- case '%d': return Number(args[i++]); -- case '%j': -- try { -- return JSON.stringify(args[i++]); -- } catch (_) { -- return '[Circular]'; -- } -- default: -- return x; -- } -- }); -- for (var x = args[i]; i < len; x = args[++i]) { -- if (isNull(x) || !isObject(x)) { -- str += ' ' + x; -- } else { -- str += ' ' + inspect(x); -- } -- } -- return str; --}; -- -- --// Mark that a method should not be used. --// Returns a modified function which warns once by default. --// If --no-deprecation is set, then it is a no-op. --exports.deprecate = function(fn, msg) { -- // Allow for deprecating things in the process of starting up. -- if (isUndefined(global.process)) { -- return function() { -- return exports.deprecate(fn, msg).apply(this, arguments); -- }; -- } -- -- if (process.noDeprecation === true) { -- return fn; -- } -- -- var warned = false; -- function deprecated() { -- if (!warned) { -- if (process.throwDeprecation) { -- throw new Error(msg); -- } else if (process.traceDeprecation) { -- console.trace(msg); -- } else { -- console.error(msg); -- } -- warned = true; -- } -- return fn.apply(this, arguments); -- } -- -- return deprecated; --}; -- -- --var debugs = {}; --var debugEnviron; --exports.debuglog = function(set) { -- if (isUndefined(debugEnviron)) -- debugEnviron = process.env.NODE_DEBUG || ''; -- set = set.toUpperCase(); -- if (!debugs[set]) { -- if (new RegExp('\\b' + set + '\\b', 'i').test(debugEnviron)) { -- var pid = process.pid; -- debugs[set] = function() { -- var msg = exports.format.apply(exports, arguments); -- console.error('%s %d: %s', set, pid, msg); -- }; -- } else { -- debugs[set] = function() {}; -- } -- } -- return debugs[set]; --}; -- -- --/** -- * Echos the value of a value. Trys to print the value out -- * in the best way possible given the different types. -- * -- * @param {Object} obj The object to print out. -- * @param {Object} opts Optional options object that alters the output. -- */ --/* legacy: obj, showHidden, depth, colors*/ --function inspect(obj, opts) { -- // default options -- var ctx = { -- seen: [], -- stylize: stylizeNoColor -- }; -- // legacy... -- if (arguments.length >= 3) ctx.depth = arguments[2]; -- if (arguments.length >= 4) ctx.colors = arguments[3]; -- if (isBoolean(opts)) { -- // legacy... -- ctx.showHidden = opts; -- } else if (opts) { -- // got an "options" object -- exports._extend(ctx, opts); -- } -- // set default options -- if (isUndefined(ctx.showHidden)) ctx.showHidden = false; -- if (isUndefined(ctx.depth)) ctx.depth = 2; -- if (isUndefined(ctx.colors)) ctx.colors = false; -- if (isUndefined(ctx.customInspect)) ctx.customInspect = true; -- if (ctx.colors) ctx.stylize = stylizeWithColor; -- return formatValue(ctx, obj, ctx.depth); --} --exports.inspect = inspect; -- -- --// http://en.wikipedia.org/wiki/ANSI_escape_code#graphics --inspect.colors = { -- 'bold' : [1, 22], -- 'italic' : [3, 23], -- 'underline' : [4, 24], -- 'inverse' : [7, 27], -- 'white' : [37, 39], -- 'grey' : [90, 39], -- 'black' : [30, 39], -- 'blue' : [34, 39], -- 'cyan' : [36, 39], -- 'green' : [32, 39], -- 'magenta' : [35, 39], -- 'red' : [31, 39], -- 'yellow' : [33, 39] --}; -- --// Don't use 'blue' not visible on cmd.exe --inspect.styles = { -- 'special': 'cyan', -- 'number': 'yellow', -- 'boolean': 'yellow', -- 'undefined': 'grey', -- 'null': 'bold', -- 'string': 'green', -- 'date': 'magenta', -- // "name": intentionally not styling -- 'regexp': 'red' --}; -- -- --function stylizeWithColor(str, styleType) { -- var style = inspect.styles[styleType]; -- -- if (style) { -- return '\u001b[' + inspect.colors[style][0] + 'm' + str + -- '\u001b[' + inspect.colors[style][1] + 'm'; -- } else { -- return str; -- } --} -- -- --function stylizeNoColor(str, styleType) { -- return str; --} -- -- --function arrayToHash(array) { -- var hash = {}; -- -- array.forEach(function(val, idx) { -- hash[val] = true; -- }); -- -- return hash; --} -- -- --function formatValue(ctx, value, recurseTimes) { -- // Provide a hook for user-specified inspect functions. -- // Check that value is an object with an inspect function on it -- if (ctx.customInspect && -- value && -- isFunction(value.inspect) && -- // Filter out the util module, it's inspect function is special -- value.inspect !== exports.inspect && -- // Also filter out any prototype objects using the circular check. -- !(value.constructor && value.constructor.prototype === value)) { -- var ret = value.inspect(recurseTimes, ctx); -- if (!isString(ret)) { -- ret = formatValue(ctx, ret, recurseTimes); -- } -- return ret; -- } -- -- // Primitive types cannot have properties -- var primitive = formatPrimitive(ctx, value); -- if (primitive) { -- return primitive; -- } -- -- // Look up the keys of the object. -- var keys = Object.keys(value); -- var visibleKeys = arrayToHash(keys); -- -- if (ctx.showHidden) { -- keys = Object.getOwnPropertyNames(value); -- } -- -- // Some type of object without properties can be shortcutted. -- if (keys.length === 0) { -- if (isFunction(value)) { -- var name = value.name ? ': ' + value.name : ''; -- return ctx.stylize('[Function' + name + ']', 'special'); -- } -- if (isRegExp(value)) { -- return ctx.stylize(RegExp.prototype.toString.call(value), 'regexp'); -- } -- if (isDate(value)) { -- return ctx.stylize(Date.prototype.toString.call(value), 'date'); -- } -- if (isError(value)) { -- return formatError(value); -- } -- } -- -- var base = '', array = false, braces = ['{', '}']; -- -- // Make Array say that they are Array -- if (isArray(value)) { -- array = true; -- braces = ['[', ']']; -- } -- -- // Make functions say that they are functions -- if (isFunction(value)) { -- var n = value.name ? ': ' + value.name : ''; -- base = ' [Function' + n + ']'; -- } -- -- // Make RegExps say that they are RegExps -- if (isRegExp(value)) { -- base = ' ' + RegExp.prototype.toString.call(value); -- } -- -- // Make dates with properties first say the date -- if (isDate(value)) { -- base = ' ' + Date.prototype.toUTCString.call(value); -- } -- -- // Make error with message first say the error -- if (isError(value)) { -- base = ' ' + formatError(value); -- } -- -- if (keys.length === 0 && (!array || value.length == 0)) { -- return braces[0] + base + braces[1]; -- } -- -- if (recurseTimes < 0) { -- if (isRegExp(value)) { -- return ctx.stylize(RegExp.prototype.toString.call(value), 'regexp'); -- } else { -- return ctx.stylize('[Object]', 'special'); -- } -- } -- -- ctx.seen.push(value); -- -- var output; -- if (array) { -- output = formatArray(ctx, value, recurseTimes, visibleKeys, keys); -- } else { -- output = keys.map(function(key) { -- return formatProperty(ctx, value, recurseTimes, visibleKeys, key, array); -- }); -- } -- -- ctx.seen.pop(); -- -- return reduceToSingleString(output, base, braces); --} -- -- --function formatPrimitive(ctx, value) { -- if (isUndefined(value)) -- return ctx.stylize('undefined', 'undefined'); -- if (isString(value)) { -- var simple = '\'' + JSON.stringify(value).replace(/^"|"$/g, '') -- .replace(/'/g, "\\'") -- .replace(/\\"/g, '"') + '\''; -- return ctx.stylize(simple, 'string'); -- } -- if (isNumber(value)) { -- // Format -0 as '-0'. Strict equality won't distinguish 0 from -0, -- // so instead we use the fact that 1 / -0 < 0 whereas 1 / 0 > 0 . -- if (value === 0 && 1 / value < 0) -- return ctx.stylize('-0', 'number'); -- return ctx.stylize('' + value, 'number'); -- } -- if (isBoolean(value)) -- return ctx.stylize('' + value, 'boolean'); -- // For some reason typeof null is "object", so special case here. -- if (isNull(value)) -- return ctx.stylize('null', 'null'); --} -- -- --function formatError(value) { -- return '[' + Error.prototype.toString.call(value) + ']'; --} -- -- --function formatArray(ctx, value, recurseTimes, visibleKeys, keys) { -- var output = []; -- for (var i = 0, l = value.length; i < l; ++i) { -- if (hasOwnProperty(value, String(i))) { -- output.push(formatProperty(ctx, value, recurseTimes, visibleKeys, -- String(i), true)); -- } else { -- output.push(''); -- } -- } -- keys.forEach(function(key) { -- if (!key.match(/^\d+$/)) { -- output.push(formatProperty(ctx, value, recurseTimes, visibleKeys, -- key, true)); -- } -- }); -- return output; --} -- -- --function formatProperty(ctx, value, recurseTimes, visibleKeys, key, array) { -- var name, str, desc; -- desc = Object.getOwnPropertyDescriptor(value, key) || { value: value[key] }; -- if (desc.get) { -- if (desc.set) { -- str = ctx.stylize('[Getter/Setter]', 'special'); -- } else { -- str = ctx.stylize('[Getter]', 'special'); -- } -- } else { -- if (desc.set) { -- str = ctx.stylize('[Setter]', 'special'); -- } -- } -- if (!hasOwnProperty(visibleKeys, key)) { -- name = '[' + key + ']'; -- } -- if (!str) { -- if (ctx.seen.indexOf(desc.value) < 0) { -- if (isNull(recurseTimes)) { -- str = formatValue(ctx, desc.value, null); -- } else { -- str = formatValue(ctx, desc.value, recurseTimes - 1); -- } -- if (str.indexOf('\n') > -1) { -- if (array) { -- str = str.split('\n').map(function(line) { -- return ' ' + line; -- }).join('\n').substr(2); -- } else { -- str = '\n' + str.split('\n').map(function(line) { -- return ' ' + line; -- }).join('\n'); -- } -- } -- } else { -- str = ctx.stylize('[Circular]', 'special'); -- } -- } -- if (isUndefined(name)) { -- if (array && key.match(/^\d+$/)) { -- return str; -- } -- name = JSON.stringify('' + key); -- if (name.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)) { -- name = name.substr(1, name.length - 2); -- name = ctx.stylize(name, 'name'); -- } else { -- name = name.replace(/'/g, "\\'") -- .replace(/\\"/g, '"') -- .replace(/(^"|"$)/g, "'"); -- name = ctx.stylize(name, 'string'); -- } -- } -- -- return name + ': ' + str; --} -- -- --function reduceToSingleString(output, base, braces) { -- var numLinesEst = 0; -- var length = output.reduce(function(prev, cur) { -- numLinesEst++; -- if (cur.indexOf('\n') >= 0) numLinesEst++; -- return prev + cur.replace(/\u001b\[\d\d?m/g, '').length + 1; -- }, 0); -- -- if (length > 60) { -- return braces[0] + -- (base === '' ? '' : base + '\n ') + -- ' ' + -- output.join(',\n ') + -- ' ' + -- braces[1]; -- } -- -- return braces[0] + base + ' ' + output.join(', ') + ' ' + braces[1]; --} -- -- - // NOTE: These type checking functions intentionally don't use `instanceof` - // because it is fragile and can be easily faked with `Object.create()`. - function isArray(ar) { -@@ -522,166 +98,10 @@ function isPrimitive(arg) { - exports.isPrimitive = isPrimitive; - - function isBuffer(arg) { -- return arg instanceof Buffer; -+ return Buffer.isBuffer(arg); - } - exports.isBuffer = isBuffer; - - function objectToString(o) { - return Object.prototype.toString.call(o); --} -- -- --function pad(n) { -- return n < 10 ? '0' + n.toString(10) : n.toString(10); --} -- -- --var months = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', -- 'Oct', 'Nov', 'Dec']; -- --// 26 Feb 16:19:34 --function timestamp() { -- var d = new Date(); -- var time = [pad(d.getHours()), -- pad(d.getMinutes()), -- pad(d.getSeconds())].join(':'); -- return [d.getDate(), months[d.getMonth()], time].join(' '); --} -- -- --// log is just a thin wrapper to console.log that prepends a timestamp --exports.log = function() { -- console.log('%s - %s', timestamp(), exports.format.apply(exports, arguments)); --}; -- -- --/** -- * Inherit the prototype methods from one constructor into another. -- * -- * The Function.prototype.inherits from lang.js rewritten as a standalone -- * function (not on Function.prototype). NOTE: If this file is to be loaded -- * during bootstrapping this function needs to be rewritten using some native -- * functions as prototype setup using normal JavaScript does not work as -- * expected during bootstrapping (see mirror.js in r114903). -- * -- * @param {function} ctor Constructor function which needs to inherit the -- * prototype. -- * @param {function} superCtor Constructor function to inherit prototype from. -- */ --exports.inherits = function(ctor, superCtor) { -- ctor.super_ = superCtor; -- ctor.prototype = Object.create(superCtor.prototype, { -- constructor: { -- value: ctor, -- enumerable: false, -- writable: true, -- configurable: true -- } -- }); --}; -- --exports._extend = function(origin, add) { -- // Don't do anything if add isn't an object -- if (!add || !isObject(add)) return origin; -- -- var keys = Object.keys(add); -- var i = keys.length; -- while (i--) { -- origin[keys[i]] = add[keys[i]]; -- } -- return origin; --}; -- --function hasOwnProperty(obj, prop) { -- return Object.prototype.hasOwnProperty.call(obj, prop); --} -- -- --// Deprecated old stuff. -- --exports.p = exports.deprecate(function() { -- for (var i = 0, len = arguments.length; i < len; ++i) { -- console.error(exports.inspect(arguments[i])); -- } --}, 'util.p: Use console.error() instead'); -- -- --exports.exec = exports.deprecate(function() { -- return require('child_process').exec.apply(this, arguments); --}, 'util.exec is now called `child_process.exec`.'); -- -- --exports.print = exports.deprecate(function() { -- for (var i = 0, len = arguments.length; i < len; ++i) { -- process.stdout.write(String(arguments[i])); -- } --}, 'util.print: Use console.log instead'); -- -- --exports.puts = exports.deprecate(function() { -- for (var i = 0, len = arguments.length; i < len; ++i) { -- process.stdout.write(arguments[i] + '\n'); -- } --}, 'util.puts: Use console.log instead'); -- -- --exports.debug = exports.deprecate(function(x) { -- process.stderr.write('DEBUG: ' + x + '\n'); --}, 'util.debug: Use console.error instead'); -- -- --exports.error = exports.deprecate(function(x) { -- for (var i = 0, len = arguments.length; i < len; ++i) { -- process.stderr.write(arguments[i] + '\n'); -- } --}, 'util.error: Use console.error instead'); -- -- --exports.pump = exports.deprecate(function(readStream, writeStream, callback) { -- var callbackCalled = false; -- -- function call(a, b, c) { -- if (callback && !callbackCalled) { -- callback(a, b, c); -- callbackCalled = true; -- } -- } -- -- readStream.addListener('data', function(chunk) { -- if (writeStream.write(chunk) === false) readStream.pause(); -- }); -- -- writeStream.addListener('drain', function() { -- readStream.resume(); -- }); -- -- readStream.addListener('end', function() { -- writeStream.end(); -- }); -- -- readStream.addListener('close', function() { -- call(); -- }); -- -- readStream.addListener('error', function(err) { -- writeStream.end(); -- call(err); -- }); -- -- writeStream.addListener('error', function(err) { -- readStream.destroy(); -- call(err); -- }); --}, 'util.pump(): Use readableStream.pipe() instead'); -- -- --var uv; --exports._errnoException = function(err, syscall) { -- if (isUndefined(uv)) uv = process.binding('uv'); -- var errname = uv.errname(err); -- var e = new Error(syscall + ' ' + errname); -- e.code = errname; -- e.errno = errname; -- e.syscall = syscall; -- return e; --}; -+} \ No newline at end of file diff --git a/node_modules/browserify/node_modules/module-deps/node_modules/stream-combiner2/node_modules/through2/node_modules/readable-stream/node_modules/core-util-is/lib/util.js b/node_modules/browserify/node_modules/module-deps/node_modules/stream-combiner2/node_modules/through2/node_modules/readable-stream/node_modules/core-util-is/lib/util.js deleted file mode 100644 index ff4c851c..00000000 --- a/node_modules/browserify/node_modules/module-deps/node_modules/stream-combiner2/node_modules/through2/node_modules/readable-stream/node_modules/core-util-is/lib/util.js +++ /dev/null @@ -1,107 +0,0 @@ -// Copyright Joyent, Inc. and other Node contributors. -// -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to permit -// persons to whom the Software is furnished to do so, subject to the -// following conditions: -// -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -// USE OR OTHER DEALINGS IN THE SOFTWARE. - -// NOTE: These type checking functions intentionally don't use `instanceof` -// because it is fragile and can be easily faked with `Object.create()`. - -function isArray(arg) { - if (Array.isArray) { - return Array.isArray(arg); - } - return objectToString(arg) === '[object Array]'; -} -exports.isArray = isArray; - -function isBoolean(arg) { - return typeof arg === 'boolean'; -} -exports.isBoolean = isBoolean; - -function isNull(arg) { - return arg === null; -} -exports.isNull = isNull; - -function isNullOrUndefined(arg) { - return arg == null; -} -exports.isNullOrUndefined = isNullOrUndefined; - -function isNumber(arg) { - return typeof arg === 'number'; -} -exports.isNumber = isNumber; - -function isString(arg) { - return typeof arg === 'string'; -} -exports.isString = isString; - -function isSymbol(arg) { - return typeof arg === 'symbol'; -} -exports.isSymbol = isSymbol; - -function isUndefined(arg) { - return arg === void 0; -} -exports.isUndefined = isUndefined; - -function isRegExp(re) { - return objectToString(re) === '[object RegExp]'; -} -exports.isRegExp = isRegExp; - -function isObject(arg) { - return typeof arg === 'object' && arg !== null; -} -exports.isObject = isObject; - -function isDate(d) { - return objectToString(d) === '[object Date]'; -} -exports.isDate = isDate; - -function isError(e) { - return (objectToString(e) === '[object Error]' || e instanceof Error); -} -exports.isError = isError; - -function isFunction(arg) { - return typeof arg === 'function'; -} -exports.isFunction = isFunction; - -function isPrimitive(arg) { - return arg === null || - typeof arg === 'boolean' || - typeof arg === 'number' || - typeof arg === 'string' || - typeof arg === 'symbol' || // ES6 symbol - typeof arg === 'undefined'; -} -exports.isPrimitive = isPrimitive; - -exports.isBuffer = Buffer.isBuffer; - -function objectToString(o) { - return Object.prototype.toString.call(o); -} diff --git a/node_modules/browserify/node_modules/module-deps/node_modules/stream-combiner2/node_modules/through2/node_modules/readable-stream/node_modules/core-util-is/package.json b/node_modules/browserify/node_modules/module-deps/node_modules/stream-combiner2/node_modules/through2/node_modules/readable-stream/node_modules/core-util-is/package.json deleted file mode 100644 index ddd227e6..00000000 --- a/node_modules/browserify/node_modules/module-deps/node_modules/stream-combiner2/node_modules/through2/node_modules/readable-stream/node_modules/core-util-is/package.json +++ /dev/null @@ -1,60 +0,0 @@ -{ - "name": "core-util-is", - "version": "1.0.2", - "description": "The `util.is*` functions introduced in Node v0.12.", - "main": "lib/util.js", - "repository": { - "type": "git", - "url": "git://github.com/isaacs/core-util-is.git" - }, - "keywords": [ - "util", - "isBuffer", - "isArray", - "isNumber", - "isString", - "isRegExp", - "isThis", - "isThat", - "polyfill" - ], - "author": { - "name": "Isaac Z. Schlueter", - "email": "i@izs.me", - "url": "http://blog.izs.me/" - }, - "license": "MIT", - "bugs": { - "url": "https://github.com/isaacs/core-util-is/issues" - }, - "scripts": { - "test": "tap test.js" - }, - "devDependencies": { - "tap": "^2.3.0" - }, - "gitHead": "a177da234df5638b363ddc15fa324619a38577c8", - "homepage": "https://github.com/isaacs/core-util-is#readme", - "_id": "core-util-is@1.0.2", - "_shasum": "b5fd54220aa2bc5ab57aab7140c940754503c1a7", - "_from": "core-util-is@>=1.0.0 <1.1.0", - "_npmVersion": "3.3.2", - "_nodeVersion": "4.0.0", - "_npmUser": { - "name": "isaacs", - "email": "i@izs.me" - }, - "dist": { - "shasum": "b5fd54220aa2bc5ab57aab7140c940754503c1a7", - "tarball": "http://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz" - }, - "maintainers": [ - { - "name": "isaacs", - "email": "i@izs.me" - } - ], - "directories": {}, - "_resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", - "readme": "ERROR: No README data found!" -} diff --git a/node_modules/browserify/node_modules/module-deps/node_modules/stream-combiner2/node_modules/through2/node_modules/readable-stream/node_modules/core-util-is/test.js b/node_modules/browserify/node_modules/module-deps/node_modules/stream-combiner2/node_modules/through2/node_modules/readable-stream/node_modules/core-util-is/test.js deleted file mode 100644 index 1a490c65..00000000 --- a/node_modules/browserify/node_modules/module-deps/node_modules/stream-combiner2/node_modules/through2/node_modules/readable-stream/node_modules/core-util-is/test.js +++ /dev/null @@ -1,68 +0,0 @@ -var assert = require('tap'); - -var t = require('./lib/util'); - -assert.equal(t.isArray([]), true); -assert.equal(t.isArray({}), false); - -assert.equal(t.isBoolean(null), false); -assert.equal(t.isBoolean(true), true); -assert.equal(t.isBoolean(false), true); - -assert.equal(t.isNull(null), true); -assert.equal(t.isNull(undefined), false); -assert.equal(t.isNull(false), false); -assert.equal(t.isNull(), false); - -assert.equal(t.isNullOrUndefined(null), true); -assert.equal(t.isNullOrUndefined(undefined), true); -assert.equal(t.isNullOrUndefined(false), false); -assert.equal(t.isNullOrUndefined(), true); - -assert.equal(t.isNumber(null), false); -assert.equal(t.isNumber('1'), false); -assert.equal(t.isNumber(1), true); - -assert.equal(t.isString(null), false); -assert.equal(t.isString('1'), true); -assert.equal(t.isString(1), false); - -assert.equal(t.isSymbol(null), false); -assert.equal(t.isSymbol('1'), false); -assert.equal(t.isSymbol(1), false); -assert.equal(t.isSymbol(Symbol()), true); - -assert.equal(t.isUndefined(null), false); -assert.equal(t.isUndefined(undefined), true); -assert.equal(t.isUndefined(false), false); -assert.equal(t.isUndefined(), true); - -assert.equal(t.isRegExp(null), false); -assert.equal(t.isRegExp('1'), false); -assert.equal(t.isRegExp(new RegExp()), true); - -assert.equal(t.isObject({}), true); -assert.equal(t.isObject([]), true); -assert.equal(t.isObject(new RegExp()), true); -assert.equal(t.isObject(new Date()), true); - -assert.equal(t.isDate(null), false); -assert.equal(t.isDate('1'), false); -assert.equal(t.isDate(new Date()), true); - -assert.equal(t.isError(null), false); -assert.equal(t.isError({ err: true }), false); -assert.equal(t.isError(new Error()), true); - -assert.equal(t.isFunction(null), false); -assert.equal(t.isFunction({ }), false); -assert.equal(t.isFunction(function() {}), true); - -assert.equal(t.isPrimitive(null), true); -assert.equal(t.isPrimitive(''), true); -assert.equal(t.isPrimitive(0), true); -assert.equal(t.isPrimitive(new Date()), false); - -assert.equal(t.isBuffer(null), false); -assert.equal(t.isBuffer({}), false); -assert.equal(t.isBuffer(new Buffer(0)), true); diff --git a/node_modules/browserify/node_modules/module-deps/node_modules/stream-combiner2/node_modules/through2/node_modules/readable-stream/package.json b/node_modules/browserify/node_modules/module-deps/node_modules/stream-combiner2/node_modules/through2/node_modules/readable-stream/package.json deleted file mode 100644 index dad4bd08..00000000 --- a/node_modules/browserify/node_modules/module-deps/node_modules/stream-combiner2/node_modules/through2/node_modules/readable-stream/package.json +++ /dev/null @@ -1,79 +0,0 @@ -{ - "name": "readable-stream", - "version": "1.0.34", - "description": "Streams2, a user-land copy of the stream library from Node.js v0.10.x", - "main": "readable.js", - "dependencies": { - "core-util-is": "~1.0.0", - "isarray": "0.0.1", - "string_decoder": "~0.10.x", - "inherits": "~2.0.1" - }, - "devDependencies": { - "tap": "~0.2.6" - }, - "scripts": { - "test": "tap test/simple/*.js" - }, - "repository": { - "type": "git", - "url": "git://github.com/isaacs/readable-stream" - }, - "keywords": [ - "readable", - "stream", - "pipe" - ], - "browser": { - "util": false - }, - "author": { - "name": "Isaac Z. Schlueter", - "email": "i@izs.me", - "url": "http://blog.izs.me/" - }, - "license": "MIT", - "gitHead": "1227c7b66deedb1dc5284a89425854d5f7ad9576", - "bugs": { - "url": "https://github.com/isaacs/readable-stream/issues" - }, - "_id": "readable-stream@1.0.34", - "_shasum": "125820e34bc842d2f2aaafafe4c2916ee32c157c", - "_from": "readable-stream@>=1.0.17 <1.1.0", - "_npmVersion": "3.8.3", - "_nodeVersion": "5.10.1", - "_npmUser": { - "name": "cwmma", - "email": "calvin.metcalf@gmail.com" - }, - "dist": { - "shasum": "125820e34bc842d2f2aaafafe4c2916ee32c157c", - "tarball": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.0.34.tgz" - }, - "maintainers": [ - { - "name": "isaacs", - "email": "isaacs@npmjs.com" - }, - { - "name": "tootallnate", - "email": "nathan@tootallnate.net" - }, - { - "name": "rvagg", - "email": "rod@vagg.org" - }, - { - "name": "cwmma", - "email": "calvin.metcalf@gmail.com" - } - ], - "_npmOperationalInternal": { - "host": "packages-12-west.internal.npmjs.com", - "tmp": "tmp/readable-stream-1.0.34.tgz_1460562521506_0.019665231462568045" - }, - "directories": {}, - "_resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.0.34.tgz", - "readme": "ERROR: No README data found!", - "homepage": "https://github.com/isaacs/readable-stream" -} diff --git a/node_modules/browserify/node_modules/module-deps/node_modules/stream-combiner2/node_modules/through2/node_modules/readable-stream/passthrough.js b/node_modules/browserify/node_modules/module-deps/node_modules/stream-combiner2/node_modules/through2/node_modules/readable-stream/passthrough.js deleted file mode 100644 index 27e8d8a5..00000000 --- a/node_modules/browserify/node_modules/module-deps/node_modules/stream-combiner2/node_modules/through2/node_modules/readable-stream/passthrough.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require("./lib/_stream_passthrough.js") diff --git a/node_modules/browserify/node_modules/module-deps/node_modules/stream-combiner2/node_modules/through2/node_modules/readable-stream/readable.js b/node_modules/browserify/node_modules/module-deps/node_modules/stream-combiner2/node_modules/through2/node_modules/readable-stream/readable.js deleted file mode 100644 index 26511e87..00000000 --- a/node_modules/browserify/node_modules/module-deps/node_modules/stream-combiner2/node_modules/through2/node_modules/readable-stream/readable.js +++ /dev/null @@ -1,11 +0,0 @@ -var Stream = require('stream'); // hack to fix a circular dependency issue when used with browserify -exports = module.exports = require('./lib/_stream_readable.js'); -exports.Stream = Stream; -exports.Readable = exports; -exports.Writable = require('./lib/_stream_writable.js'); -exports.Duplex = require('./lib/_stream_duplex.js'); -exports.Transform = require('./lib/_stream_transform.js'); -exports.PassThrough = require('./lib/_stream_passthrough.js'); -if (!process.browser && process.env.READABLE_STREAM === 'disable') { - module.exports = require('stream'); -} diff --git a/node_modules/browserify/node_modules/module-deps/node_modules/stream-combiner2/node_modules/through2/node_modules/readable-stream/transform.js b/node_modules/browserify/node_modules/module-deps/node_modules/stream-combiner2/node_modules/through2/node_modules/readable-stream/transform.js deleted file mode 100644 index 5d482f07..00000000 --- a/node_modules/browserify/node_modules/module-deps/node_modules/stream-combiner2/node_modules/through2/node_modules/readable-stream/transform.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require("./lib/_stream_transform.js") diff --git a/node_modules/browserify/node_modules/module-deps/node_modules/stream-combiner2/node_modules/through2/node_modules/readable-stream/writable.js b/node_modules/browserify/node_modules/module-deps/node_modules/stream-combiner2/node_modules/through2/node_modules/readable-stream/writable.js deleted file mode 100644 index e1e9efdf..00000000 --- a/node_modules/browserify/node_modules/module-deps/node_modules/stream-combiner2/node_modules/through2/node_modules/readable-stream/writable.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require("./lib/_stream_writable.js") diff --git a/node_modules/browserify/node_modules/module-deps/node_modules/stream-combiner2/node_modules/through2/node_modules/xtend/.jshintrc b/node_modules/browserify/node_modules/module-deps/node_modules/stream-combiner2/node_modules/through2/node_modules/xtend/.jshintrc deleted file mode 100644 index 77887b5f..00000000 --- a/node_modules/browserify/node_modules/module-deps/node_modules/stream-combiner2/node_modules/through2/node_modules/xtend/.jshintrc +++ /dev/null @@ -1,30 +0,0 @@ -{ - "maxdepth": 4, - "maxstatements": 200, - "maxcomplexity": 12, - "maxlen": 80, - "maxparams": 5, - - "curly": true, - "eqeqeq": true, - "immed": true, - "latedef": false, - "noarg": true, - "noempty": true, - "nonew": true, - "undef": true, - "unused": "vars", - "trailing": true, - - "quotmark": true, - "expr": true, - "asi": true, - - "browser": false, - "esnext": true, - "devel": false, - "node": false, - "nonstandard": false, - - "predef": ["require", "module", "__dirname", "__filename"] -} diff --git a/node_modules/browserify/node_modules/module-deps/node_modules/stream-combiner2/node_modules/through2/node_modules/xtend/.npmignore b/node_modules/browserify/node_modules/module-deps/node_modules/stream-combiner2/node_modules/through2/node_modules/xtend/.npmignore deleted file mode 100644 index 3c3629e6..00000000 --- a/node_modules/browserify/node_modules/module-deps/node_modules/stream-combiner2/node_modules/through2/node_modules/xtend/.npmignore +++ /dev/null @@ -1 +0,0 @@ -node_modules diff --git a/node_modules/browserify/node_modules/module-deps/node_modules/stream-combiner2/node_modules/through2/node_modules/xtend/LICENCE b/node_modules/browserify/node_modules/module-deps/node_modules/stream-combiner2/node_modules/through2/node_modules/xtend/LICENCE deleted file mode 100644 index 1a14b437..00000000 --- a/node_modules/browserify/node_modules/module-deps/node_modules/stream-combiner2/node_modules/through2/node_modules/xtend/LICENCE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (c) 2012-2014 Raynos. - -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/node_modules/browserify/node_modules/module-deps/node_modules/stream-combiner2/node_modules/through2/node_modules/xtend/Makefile b/node_modules/browserify/node_modules/module-deps/node_modules/stream-combiner2/node_modules/through2/node_modules/xtend/Makefile deleted file mode 100644 index d583fcf4..00000000 --- a/node_modules/browserify/node_modules/module-deps/node_modules/stream-combiner2/node_modules/through2/node_modules/xtend/Makefile +++ /dev/null @@ -1,4 +0,0 @@ -browser: - node ./support/compile - -.PHONY: browser \ No newline at end of file diff --git a/node_modules/browserify/node_modules/module-deps/node_modules/stream-combiner2/node_modules/through2/node_modules/xtend/README.md b/node_modules/browserify/node_modules/module-deps/node_modules/stream-combiner2/node_modules/through2/node_modules/xtend/README.md deleted file mode 100644 index e7548318..00000000 --- a/node_modules/browserify/node_modules/module-deps/node_modules/stream-combiner2/node_modules/through2/node_modules/xtend/README.md +++ /dev/null @@ -1,28 +0,0 @@ -# xtend - -[![browser support][3]][4] - -Extend like a boss - -xtend is a basic utility library which allows you to extend an object by appending all of the properties from each object in a list. When there are identical properties, the right-most property takes presedence. - -## Examples - -```js -var extend = require("xtend") - -// extend returns a new object. Does not mutate arguments -var combination = extend({ - a: "a" -}, { - b: "b" -}) -// { a: "a", b: "b" } -``` - - -## MIT Licenced - - - [3]: http://ci.testling.com/Raynos/xtend.png - [4]: http://ci.testling.com/Raynos/xtend diff --git a/node_modules/browserify/node_modules/module-deps/node_modules/stream-combiner2/node_modules/through2/node_modules/xtend/index.js b/node_modules/browserify/node_modules/module-deps/node_modules/stream-combiner2/node_modules/through2/node_modules/xtend/index.js deleted file mode 100644 index 5b760152..00000000 --- a/node_modules/browserify/node_modules/module-deps/node_modules/stream-combiner2/node_modules/through2/node_modules/xtend/index.js +++ /dev/null @@ -1,17 +0,0 @@ -module.exports = extend - -function extend() { - var target = {} - - for (var i = 0; i < arguments.length; i++) { - var source = arguments[i] - - for (var key in source) { - if (source.hasOwnProperty(key)) { - target[key] = source[key] - } - } - } - - return target -} diff --git a/node_modules/browserify/node_modules/module-deps/node_modules/stream-combiner2/node_modules/through2/node_modules/xtend/mutable.js b/node_modules/browserify/node_modules/module-deps/node_modules/stream-combiner2/node_modules/through2/node_modules/xtend/mutable.js deleted file mode 100644 index a34475eb..00000000 --- a/node_modules/browserify/node_modules/module-deps/node_modules/stream-combiner2/node_modules/through2/node_modules/xtend/mutable.js +++ /dev/null @@ -1,15 +0,0 @@ -module.exports = extend - -function extend(target) { - for (var i = 1; i < arguments.length; i++) { - var source = arguments[i] - - for (var key in source) { - if (source.hasOwnProperty(key)) { - target[key] = source[key] - } - } - } - - return target -} diff --git a/node_modules/browserify/node_modules/module-deps/node_modules/stream-combiner2/node_modules/through2/node_modules/xtend/package.json b/node_modules/browserify/node_modules/module-deps/node_modules/stream-combiner2/node_modules/through2/node_modules/xtend/package.json deleted file mode 100644 index f62a02f3..00000000 --- a/node_modules/browserify/node_modules/module-deps/node_modules/stream-combiner2/node_modules/through2/node_modules/xtend/package.json +++ /dev/null @@ -1,87 +0,0 @@ -{ - "name": "xtend", - "version": "3.0.0", - "description": "extend like a boss", - "keywords": [ - "extend", - "merge", - "options", - "opts", - "object", - "array" - ], - "author": { - "name": "Raynos", - "email": "raynos2@gmail.com" - }, - "repository": { - "type": "git", - "url": "git://github.com/Raynos/xtend.git" - }, - "main": "index", - "scripts": { - "test": "node test" - }, - "dependencies": {}, - "devDependencies": { - "tape": "~1.1.0" - }, - "homepage": "https://github.com/Raynos/xtend", - "contributors": [ - { - "name": "Jake Verbaten" - }, - { - "name": "Matt Esch" - } - ], - "bugs": { - "url": "https://github.com/Raynos/xtend/issues", - "email": "raynos2@gmail.com" - }, - "licenses": [ - { - "type": "MIT", - "url": "http://github.com/raynos/xtend/raw/master/LICENSE" - } - ], - "testling": { - "files": "test.js", - "browsers": [ - "ie/7..latest", - "firefox/16..latest", - "firefox/nightly", - "chrome/22..latest", - "chrome/canary", - "opera/12..latest", - "opera/next", - "safari/5.1..latest", - "ipad/6.0..latest", - "iphone/6.0..latest" - ] - }, - "engines": { - "node": ">=0.4" - }, - "_id": "xtend@3.0.0", - "dist": { - "shasum": "5cce7407baf642cba7becda568111c493f59665a", - "tarball": "https://registry.npmjs.org/xtend/-/xtend-3.0.0.tgz" - }, - "_from": "xtend@>=3.0.0 <3.1.0", - "_npmVersion": "1.4.6", - "_npmUser": { - "name": "raynos", - "email": "raynos2@gmail.com" - }, - "maintainers": [ - { - "name": "raynos", - "email": "raynos2@gmail.com" - } - ], - "directories": {}, - "_shasum": "5cce7407baf642cba7becda568111c493f59665a", - "_resolved": "https://registry.npmjs.org/xtend/-/xtend-3.0.0.tgz", - "readme": "ERROR: No README data found!" -} diff --git a/node_modules/browserify/node_modules/module-deps/node_modules/stream-combiner2/node_modules/through2/node_modules/xtend/test.js b/node_modules/browserify/node_modules/module-deps/node_modules/stream-combiner2/node_modules/through2/node_modules/xtend/test.js deleted file mode 100644 index 3369d796..00000000 --- a/node_modules/browserify/node_modules/module-deps/node_modules/stream-combiner2/node_modules/through2/node_modules/xtend/test.js +++ /dev/null @@ -1,63 +0,0 @@ -var test = require("tape") -var extend = require("./") -var mutableExtend = require("./mutable") - -test("merge", function(assert) { - var a = { a: "foo" } - var b = { b: "bar" } - - assert.deepEqual(extend(a, b), { a: "foo", b: "bar" }) - assert.end() -}) - -test("replace", function(assert) { - var a = { a: "foo" } - var b = { a: "bar" } - - assert.deepEqual(extend(a, b), { a: "bar" }) - assert.end() -}) - -test("undefined", function(assert) { - var a = { a: undefined } - var b = { b: "foo" } - - assert.deepEqual(extend(a, b), { a: undefined, b: "foo" }) - assert.deepEqual(extend(b, a), { a: undefined, b: "foo" }) - assert.end() -}) - -test("handle 0", function(assert) { - var a = { a: "default" } - var b = { a: 0 } - - assert.deepEqual(extend(a, b), { a: 0 }) - assert.deepEqual(extend(b, a), { a: "default" }) - assert.end() -}) - -test("is immutable", function (assert) { - var record = {} - - extend(record, { foo: "bar" }) - assert.equal(record.foo, undefined) - assert.end() -}) - -test("null as argument", function (assert) { - var a = { foo: "bar" } - var b = null - var c = void 0 - - assert.deepEqual(extend(b, a, c), { foo: "bar" }) - assert.end() -}) - -test("mutable", function (assert) { - var a = { foo: "bar" } - - mutableExtend(a, { bar: "baz" }) - - assert.equal(a.bar, "baz") - assert.end() -}) diff --git a/node_modules/browserify/node_modules/module-deps/node_modules/stream-combiner2/node_modules/through2/package.json b/node_modules/browserify/node_modules/module-deps/node_modules/stream-combiner2/node_modules/through2/package.json deleted file mode 100644 index 9b03b665..00000000 --- a/node_modules/browserify/node_modules/module-deps/node_modules/stream-combiner2/node_modules/through2/package.json +++ /dev/null @@ -1,65 +0,0 @@ -{ - "name": "through2", - "version": "0.5.1", - "description": "A tiny wrapper around Node streams2 Transform to avoid explicit subclassing noise", - "main": "through2.js", - "scripts": { - "test": "node test/test.js", - "test-local": "brtapsauce-local test/basic-test.js" - }, - "repository": { - "type": "git", - "url": "https://github.com/rvagg/through2.git" - }, - "keywords": [ - "stream", - "streams2", - "through", - "transform" - ], - "author": { - "name": "Rod Vagg", - "email": "r@va.gg", - "url": "https://github.com/rvagg" - }, - "license": "MIT", - "dependencies": { - "readable-stream": "~1.0.17", - "xtend": "~3.0.0" - }, - "devDependencies": { - "tape": "~2.3.0", - "bl": "~0.6.0", - "stream-spigot": "~3.0.1", - "brtapsauce": "~0.2.2" - }, - "bugs": { - "url": "https://github.com/rvagg/through2/issues" - }, - "homepage": "https://github.com/rvagg/through2", - "_id": "through2@0.5.1", - "dist": { - "shasum": "dfdd012eb9c700e2323fd334f38ac622ab372da7", - "tarball": "https://registry.npmjs.org/through2/-/through2-0.5.1.tgz" - }, - "_from": "through2@>=0.5.1 <0.6.0", - "_npmVersion": "1.4.3", - "_npmUser": { - "name": "rvagg", - "email": "rod@vagg.org" - }, - "maintainers": [ - { - "name": "rvagg", - "email": "rod@vagg.org" - }, - { - "name": "bryce", - "email": "bryce@ravenwall.com" - } - ], - "directories": {}, - "_shasum": "dfdd012eb9c700e2323fd334f38ac622ab372da7", - "_resolved": "https://registry.npmjs.org/through2/-/through2-0.5.1.tgz", - "readme": "ERROR: No README data found!" -} diff --git a/node_modules/browserify/node_modules/module-deps/node_modules/stream-combiner2/node_modules/through2/through2.js b/node_modules/browserify/node_modules/module-deps/node_modules/stream-combiner2/node_modules/through2/through2.js deleted file mode 100644 index d3610aa5..00000000 --- a/node_modules/browserify/node_modules/module-deps/node_modules/stream-combiner2/node_modules/through2/through2.js +++ /dev/null @@ -1,78 +0,0 @@ -var Transform = require('readable-stream/transform') - , inherits = require('util').inherits - , xtend = require('xtend') - - -// a noop _transform function -function noop (chunk, enc, callback) { - callback(null, chunk) -} - - -// create a new export function, used by both the main export and -// the .ctor export, contains common logic for dealing with arguments -function through2 (construct) { - return function (options, transform, flush) { - if (typeof options == 'function') { - flush = transform - transform = options - options = {} - } - - if (typeof transform != 'function') - transform = noop - - if (typeof flush != 'function') - flush = null - - return construct(options, transform, flush) - } -} - - -// main export, just make me a transform stream! -module.exports = through2(function (options, transform, flush) { - var t2 = new Transform(options) - - t2._transform = transform - - if (flush) - t2._flush = flush - - return t2 -}) - - -// make me a reusable prototype that I can `new`, or implicitly `new` -// with a constructor call -module.exports.ctor = through2(function (options, transform, flush) { - function Through2 (override) { - if (!(this instanceof Through2)) - return new Through2(override) - - this.options = xtend(options, override) - - Transform.call(this, this.options) - } - - inherits(Through2, Transform) - - Through2.prototype._transform = transform - - if (flush) - Through2.prototype._flush = flush - - return Through2 -}) - - -module.exports.obj = through2(function (options, transform, flush) { - var t2 = new Transform(xtend({ objectMode: true, highWaterMark: 16 }, options)) - - t2._transform = transform - - if (flush) - t2._flush = flush - - return t2 -}) diff --git a/node_modules/browserify/node_modules/module-deps/node_modules/stream-combiner2/package.json b/node_modules/browserify/node_modules/module-deps/node_modules/stream-combiner2/package.json deleted file mode 100644 index cc0953eb..00000000 --- a/node_modules/browserify/node_modules/module-deps/node_modules/stream-combiner2/package.json +++ /dev/null @@ -1,54 +0,0 @@ -{ - "name": "stream-combiner2", - "version": "1.0.2", - "homepage": "https://github.com/substack/stream-combiner2", - "repository": { - "type": "git", - "url": "git://github.com/substack/stream-combiner2.git" - }, - "dependencies": { - "duplexer2": "~0.0.2", - "through2": "~0.5.1" - }, - "devDependencies": { - "tape": "~2.3.0", - "through": "~2.3.4", - "event-stream": "~3.0.7" - }, - "scripts": { - "test": "set -e; for t in test/*.js; do node $t; done" - }, - "author": { - "name": "'Dominic Tarr'", - "email": "dominic.tarr@gmail.com", - "url": "http://dominictarr.com" - }, - "license": "MIT", - "gitHead": "da79632e5adb4e87e326b9432656494aa4204544", - "description": "This is a sequel to [stream-combiner](https://npmjs.org/package/stream-combiner) for streams2.", - "bugs": { - "url": "https://github.com/substack/stream-combiner2/issues" - }, - "_id": "stream-combiner2@1.0.2", - "_shasum": "ba72a6b50cbfabfa950fc8bc87604bd01eb60671", - "_from": "stream-combiner2@>=1.0.0 <1.1.0", - "_npmVersion": "2.0.2", - "_nodeVersion": "0.10.12", - "_npmUser": { - "name": "substack", - "email": "mail@substack.net" - }, - "maintainers": [ - { - "name": "substack", - "email": "mail@substack.net" - } - ], - "dist": { - "shasum": "ba72a6b50cbfabfa950fc8bc87604bd01eb60671", - "tarball": "https://registry.npmjs.org/stream-combiner2/-/stream-combiner2-1.0.2.tgz" - }, - "directories": {}, - "_resolved": "https://registry.npmjs.org/stream-combiner2/-/stream-combiner2-1.0.2.tgz", - "readme": "ERROR: No README data found!" -} diff --git a/node_modules/browserify/node_modules/module-deps/node_modules/stream-combiner2/test/index.js b/node_modules/browserify/node_modules/module-deps/node_modules/stream-combiner2/test/index.js deleted file mode 100644 index 79ee38a9..00000000 --- a/node_modules/browserify/node_modules/module-deps/node_modules/stream-combiner2/test/index.js +++ /dev/null @@ -1,98 +0,0 @@ -var es = require('event-stream') -var through = require('through2') -var combine = require('..') -var test = require('tape') - -test('re-emit error object for old streams', function (test) { - test.plan(1) - - var expectedErr = new Error('asplode') - - var pipe = combine( - es.through(function(data) { - return this.emit('error', expectedErr) - }) - ) - - pipe.on('error', function (err) { - test.equal(err, expectedErr) - }) - - pipe.write('pow') -}) - -test('do not duplicate errors', function (test) { - - var errors = 0; - var pipe = combine( - es.through(function(data) { - return this.emit('data', data); - }), - es.through(function(data) { - return this.emit('error', new Error(data)); - }) - ) - - pipe.on('error', function(err) { - errors++ - test.ok(errors, 'expected error count') - process.nextTick(function () { - return test.end(); - }) - }) - - return pipe.write('meh'); -}) - -test('3 pipe do not duplicate errors', function (test) { - - var errors = 0; - var pipe = combine( - es.through(function(data) { - return this.emit('data', data); - }), - es.through(function(data) { - return this.emit('error', new Error(data)); - }), - es.through() - ) - - pipe.on('error', function(err) { - errors++ - test.ok(errors, 'expected error count') - process.nextTick(function () { - return test.end(); - }) - }) - - return pipe.write('meh'); - -}) - -test('0 argument through stream', function (test) { - test.plan(3) - var pipe = combine() - , expected = [ 'beep', 'boop', 'robots' ] - - pipe.pipe(es.through(function(data) { - test.equal(data.toString('utf8'), expected.shift()) - })) - pipe.write('beep') - pipe.write('boop') - pipe.end('robots') -}) - -test('object mode', function (test) { - test.plan(2) - var pipe = combine.obj() - , expected = [ [4,5,6], {x:5} ] - - pipe.pipe(through.obj(function(data, enc, next) { - test.deepEqual(data, expected.shift()) - next() - })) - pipe.write([4,5,6]) - pipe.write({x:5}) - pipe.end() -}) - diff --git a/node_modules/browserify/node_modules/module-deps/package.json b/node_modules/browserify/node_modules/module-deps/package.json deleted file mode 100644 index 6d619eac..00000000 --- a/node_modules/browserify/node_modules/module-deps/package.json +++ /dev/null @@ -1,93 +0,0 @@ -{ - "name": "module-deps", - "version": "3.9.1", - "description": "walk the dependency graph to generate json output that can be fed into browser-pack", - "main": "index.js", - "bin": { - "module-deps": "bin/cmd.js" - }, - "dependencies": { - "JSONStream": "^1.0.3", - "browser-resolve": "^1.7.0", - "concat-stream": "~1.4.5", - "defined": "^1.0.0", - "detective": "^4.0.0", - "duplexer2": "0.0.2", - "inherits": "^2.0.1", - "parents": "^1.0.0", - "readable-stream": "^1.1.13", - "resolve": "^1.1.3", - "stream-combiner2": "~1.0.0", - "subarg": "^1.0.0", - "through2": "^1.0.0", - "xtend": "^4.0.0" - }, - "devDependencies": { - "tap": "^1.0.0", - "browser-pack": "^5.0.0" - }, - "scripts": { - "test": "tap test/*.js" - }, - "repository": { - "type": "git", - "url": "git://github.com/substack/module-deps.git" - }, - "homepage": "https://github.com/substack/module-deps", - "keywords": [ - "dependency", - "graph", - "browser", - "require", - "module", - "exports", - "json" - ], - "author": { - "name": "James Halliday", - "email": "mail@substack.net", - "url": "http://substack.net" - }, - "engines": { - "node": ">= 0.6" - }, - "license": "MIT", - "gitHead": "9112e326d76a97869ecffee06d84be21e6f7d157", - "bugs": { - "url": "https://github.com/substack/module-deps/issues" - }, - "_id": "module-deps@3.9.1", - "_shasum": "ea75caf9199090d25b0d5512b5acacb96e7f87f3", - "_from": "module-deps@>=3.7.11 <4.0.0", - "_npmVersion": "2.13.2", - "_nodeVersion": "2.5.0", - "_npmUser": { - "name": "zertosh", - "email": "zertosh@gmail.com" - }, - "maintainers": [ - { - "name": "substack", - "email": "substack@gmail.com" - }, - { - "name": "zertosh", - "email": "zertosh@gmail.com" - }, - { - "name": "jmm", - "email": "npm-public@jessemccarthy.net" - }, - { - "name": "terinjokes", - "email": "terinjokes@gmail.com" - } - ], - "dist": { - "shasum": "ea75caf9199090d25b0d5512b5acacb96e7f87f3", - "tarball": "https://registry.npmjs.org/module-deps/-/module-deps-3.9.1.tgz" - }, - "directories": {}, - "_resolved": "https://registry.npmjs.org/module-deps/-/module-deps-3.9.1.tgz", - "readme": "ERROR: No README data found!" -} diff --git a/node_modules/browserify/node_modules/module-deps/readme.markdown b/node_modules/browserify/node_modules/module-deps/readme.markdown deleted file mode 100644 index b9a5c79f..00000000 --- a/node_modules/browserify/node_modules/module-deps/readme.markdown +++ /dev/null @@ -1,239 +0,0 @@ -# module-deps - -walk the dependency graph to generate json output that can be fed into -[browser-pack](https://github.com/substack/browser-pack) - -[![build status](https://secure.travis-ci.org/substack/module-deps.png)](http://travis-ci.org/substack/module-deps) - -# example - -``` js -var mdeps = require('module-deps'); -var JSONStream = require('JSONStream'); - -var md = mdeps(); -md.pipe(JSONStream.stringify()).pipe(process.stdout); -md.end({ file: __dirname + '/files/main.js' }); -``` - -output: - -``` -$ node example/deps.js -[ -{"id":"/home/substack/projects/module-deps/example/files/main.js","source":"var foo = require('./foo');\nconsole.log('main: ' + foo(5));\n","entry":true,"deps":{"./foo":"/home/substack/projects/module-deps/example/files/foo.js"}} -, -{"id":"/home/substack/projects/module-deps/example/files/foo.js","source":"var bar = require('./bar');\n\nmodule.exports = function (n) {\n return n * 111 + bar(n);\n};\n","deps":{"./bar":"/home/substack/projects/module-deps/example/files/bar.js"}} -, -{"id":"/home/substack/projects/module-deps/example/files/bar.js","source":"module.exports = function (n) {\n return n * 100;\n};\n","deps":{}} -] -``` - -and you can feed this json data into -[browser-pack](https://github.com/substack/browser-pack): - -``` -$ node example/deps.js | browser-pack | node -main: 1055 -``` - -# usage - -``` -usage: module-deps [files] - - generate json output from each entry file - -``` - -# methods - -``` js -var mdeps = require('module-deps') -``` - -## var d = mdeps(opts={}) - -Return an object transform stream `d` that expects entry filenames or -`{ id: ..., file: ... }` objects as input and produces objects for every -dependency from a recursive module traversal as output. - -Each file in `files` can be a string filename or a stream. - -Optionally pass in some `opts`: - -* `opts.transform` - a string or array of string transforms (see below) - -* `opts.transformKey` - an array path of strings showing where to look in the -package.json for source transformations. If falsy, don't look at the -package.json at all. - -* `opts.resolve` - custom resolve function using the -`opts.resolve(id, parent, cb)` signature that -[browser-resolve](https://github.com/shtylman/node-browser-resolve) has - -* `opts.filter` - a function (id) to skip resolution of some module `id` strings. -If defined, `opts.filter(id)` should return truthy for all the ids to include -and falsey for all the ids to skip. - -* `opts.postFilter` - a function (id, file, pkg) that gets called after `id` has -been resolved. Return false to skip this file. - -* `opts.packageFilter` - transform the parsed package.json contents before using -the values. `opts.packageFilter(pkg, dir)` should return the new `pkg` object to -use. - -* `opts.noParse` - an array of absolute paths to not parse for dependencies. Use -this for large dependencies like jquery or threejs which take forever to parse. - -* `opts.cache` - an object mapping filenames to file objects to skip costly io - -* `opts.packageCache` - an object mapping filenames to their parent package.json -contents for browser fields, main entries, and transforms - -* `opts.fileCache` - an object mapping filenames to raw source to avoid reading -from disk. - -* `opts.paths` - array of global paths to search. Defaults to splitting on `':'` -in `process.env.NODE_PATH` - -* `opts.ignoreMissing` - ignore files that failed to resolve - -# input objects - -Input objects should be string filenames or objects with these parameters: - -* `row.file` - filename -* `row.expose` - name to be exposed as -* `row.noparse` when true, don't parse the file contents for dependencies - -or objects can specify transforms: - -* `row.transform` - string name, path, or function -* `row.options` - transform options as an object -* `row.global` - boolean, whether the transform is global - -# events - -## d.on('transform', function (tr, file) {}) - -Every time a transform is applied to a `file`, a `'transform'` event fires with -the instantiated transform stream `tr`. - -## d.on('file', function (file) {}) - -Every time a file is read, this event fires with the file path. - -## d.on('missing', function (id, parent) {}) - -When `opts.ignoreMissing` is enabled, this event fires for each missing package. - -## d.on('package', function (pkg) {}) - -Every time a package is read, this event fires. The directory name of the -package is available in `pkg.__dirname`. - -# transforms - -module-deps can be configured to run source transformations on files before -parsing them for `require()` calls. These transforms are useful if you want to -compile a language like [coffeescript](http://coffeescript.org/) on the fly or -if you want to load static assets into your bundle by parsing the AST for -`fs.readFileSync()` calls. - -If the transform is a function, it should take the `file` name as an argument -and return a through stream that will be written file contents and should output -the new transformed file contents. - -If the transform is a string, it is treated as a module name that will resolve -to a module that is expected to follow this format: - -``` js -var through = require('through2'); -module.exports = function (file) { return through() }; -``` - -You don't necessarily need to use the -[through2](https://github.com/rvagg/through2) module to create a -readable/writable filter stream for transforming file contents, but this is an -easy way to do it. - -When you call `mdeps()` with an `opts.transform`, the transformations you -specify will not be run for any files in node_modules/. This is because modules -you include should be self-contained and not need to worry about guarding -themselves against transformations that may happen upstream. - -Modules can apply their own transformations by setting a transformation pipeline -in their package.json at the `opts.transformKey` path. These transformations -only apply to the files directly in the module itself, not to the module's -dependants nor to its dependencies. - -## package.json transformKey - -Transform keys live at a configurable location in the package.json denoted by -the `opts.transformKey` array. - -For a transformKey of `['foo','bar']`, the transformKey can be a single string -(`"fff"`): - -``` json -{ - "foo": { - "bar": "fff" - } -} -``` - -or an array of strings (`["fff","ggg"]`): - -``` json -{ - "foo": { - "bar": ["fff","ggg"] - } -} -``` - -If you want to pass options to the transforms, you can use a 2-element array -inside of the primary array. Here `fff` gets an options object with `{"x":3}` -and `ggg` gets `{"y":4}`: - -``` json -{ - "foo": { - "bar": [["fff",{"x":3}],["ggg",{"y":4}]] - } -} -``` - -# usage - -``` -module-deps [FILES] OPTIONS - - Generate json output for the entry point FILES. - -OPTIONS are: - - -t TRANSFORM Apply a TRANSFORM. - -g TRANSFORM Apply a global TRANSFORM. - -``` - -# install - -With [npm](http://npmjs.org), to get the module do: - -``` -npm install module-deps -``` - -and to get the `module-deps` command do: - -``` -npm install -g module-deps -``` - -# license - -MIT diff --git a/node_modules/browserify/node_modules/module-deps/test/bundle.js b/node_modules/browserify/node_modules/module-deps/test/bundle.js deleted file mode 100644 index adf12efe..00000000 --- a/node_modules/browserify/node_modules/module-deps/test/bundle.js +++ /dev/null @@ -1,23 +0,0 @@ -var parser = require('../'); -var test = require('tap').test; -var JSONStream = require('JSONStream'); -var packer = require('browser-pack'); -var path = require('path'); - -test('bundle', function (t) { - t.plan(1); - var p = parser(); - p.end(path.join(__dirname, '/files/main.js')); - p.on('error', t.fail.bind(t)); - var pack = packer(); - - p.pipe(JSONStream.stringify()).pipe(pack); - - var src = ''; - pack.on('data', function (buf) { src += buf }); - pack.on('end', function () { - Function('console', src)({ - log: function (s) { t.equal(s, 'main: 1055') } - }); - }); -}); diff --git a/node_modules/browserify/node_modules/module-deps/test/cache.js b/node_modules/browserify/node_modules/module-deps/test/cache.js deleted file mode 100644 index 95c8afb5..00000000 --- a/node_modules/browserify/node_modules/module-deps/test/cache.js +++ /dev/null @@ -1,50 +0,0 @@ -var parser = require('../'); -var test = require('tap').test; -var path = require('path'); - -var files = { - foo: path.join(__dirname, '/files/foo.js'), - bar: path.join(__dirname, '/files/bar.js') -}; - -var sources = { - foo: 'notreal foo', - bar: 'notreal bar' -}; - -var cache = {}; -cache[files.foo] = { - source: sources.foo, - deps: { './bar': files.bar } -}; -cache[files.bar] = { - source: sources.bar, - deps: {} -}; - -test('uses cache', function (t) { - t.plan(1); - var p = parser({ cache: cache }); - p.end({ id: 'foo', file: files.foo, entry: false }); - - var rows = []; - p.on('data', function (row) { rows.push(row) }); - p.on('end', function () { - t.same(rows.sort(cmp), [ - { - id: 'foo', - file: files.foo, - source: sources.foo, - deps: { './bar': files.bar } - }, - { - id: files.bar, - file: files.bar, - source: sources.bar, - deps: {} - } - ].sort(cmp)); - }); -}); - -function cmp (a, b) { return a.id < b.id ? -1 : 1 } diff --git a/node_modules/browserify/node_modules/module-deps/test/cache_expose.js b/node_modules/browserify/node_modules/module-deps/test/cache_expose.js deleted file mode 100644 index d52dc69f..00000000 --- a/node_modules/browserify/node_modules/module-deps/test/cache_expose.js +++ /dev/null @@ -1,54 +0,0 @@ -var parser = require('../'); -var test = require('tap').test; -var path = require('path'); - -var files = { - foo: path.join(__dirname, '/files/foo.js'), - bar: path.join(__dirname, '/files/bar.js') -}; - -var sources = { - foo: 'notreal foo', - bar: 'notreal bar' -}; - -var cache = {}; -cache[files.foo] = { - source: sources.foo, - deps: { './bar': files.bar } -}; -cache[files.bar] = { - source: sources.bar, - deps: {} -}; - -test('cache preserves expose and entry', function (t) { - t.plan(1); - var p = parser({ cache: cache }); - p.write({ id: files.bar, expose: 'bar2', entry: false }); - p.end({ id: 'foo', file: files.foo, entry: true, expose: 'foo2' }); - - var rows = []; - p.on('data', function (row) { rows.push(row) }); - p.on('end', function () { - t.same(rows.sort(cmp), [ - { - id: 'foo', - expose: 'foo2', - entry: true, - file: files.foo, - source: sources.foo, - deps: { './bar': files.bar } - }, - { - id: files.bar, - expose: 'bar2', - file: files.bar, - source: sources.bar, - deps: {} - } - ].sort(cmp)); - }); -}); - -function cmp (a, b) { return a.id < b.id ? -1 : 1 } diff --git a/node_modules/browserify/node_modules/module-deps/test/cache_partial.js b/node_modules/browserify/node_modules/module-deps/test/cache_partial.js deleted file mode 100644 index ca98c119..00000000 --- a/node_modules/browserify/node_modules/module-deps/test/cache_partial.js +++ /dev/null @@ -1,47 +0,0 @@ -var parser = require('../'); -var test = require('tap').test; -var fs = require('fs'); -var path = require('path'); - -var files = { - foo: path.join(__dirname, '/files/foo.js'), - bar: path.join(__dirname, '/files/bar.js') -}; - -var sources = { - foo: 'notreal foo', - bar: fs.readFileSync(files.bar, 'utf8') -}; - -var cache = {}; -cache[files.foo] = { - source: sources.foo, - deps: { './bar': files.bar } -}; - -test('uses cache and reads from disk', function (t) { - t.plan(1); - var p = parser({ cache: cache }); - p.end({ id: 'foo', file: files.foo, entry: false }); - - var rows = []; - p.on('data', function (row) { rows.push(row) }); - p.on('end', function () { - t.same(rows.sort(cmp), [ - { - id: 'foo', - file: files.foo, - source: sources.foo, - deps: { './bar': files.bar } - }, - { - id: files.bar, - file: files.bar, - source: sources.bar, - deps: {} - } - ].sort(cmp)); - }); -}); - -function cmp (a, b) { return a.id < b.id ? -1 : 1 } diff --git a/node_modules/browserify/node_modules/module-deps/test/cache_partial_expose.js b/node_modules/browserify/node_modules/module-deps/test/cache_partial_expose.js deleted file mode 100644 index 1d5280b5..00000000 --- a/node_modules/browserify/node_modules/module-deps/test/cache_partial_expose.js +++ /dev/null @@ -1,104 +0,0 @@ -var parser = require('../'); -var test = require('tap').test; -var fs = require('fs'); -var path = require('path'); -var xtend = require('xtend'); - -var files = { - abc: path.join(__dirname, '/expose/lib/abc.js'), - xyz: path.join(__dirname, '/expose/lib/xyz.js'), - foo: path.join(__dirname, '/expose/foo.js'), - bar: path.join(__dirname, '/expose/bar.js'), - main: path.join(__dirname, '/expose/main.js') -}; - -var sources = Object.keys(files).reduce(function (acc, file) { - acc[file] = fs.readFileSync(files[file], 'utf8'); - return acc; -}, {}); - -var cache = {}; -cache[files.abc] = { - source: sources.abc, - deps: {} -}; -cache[files.xyz] = { - source: sources.xyz, - deps: {'../foo': files.foo} -}; -cache[files.foo] = { - source: sources.foo, - deps: {'./lib/abc': files.abc} -}; -cache[files.bar] = { - source: sources.bar, - deps: {xyz: files.xyz} -}; -cache[files.main] = { - source: sources.main, - deps: { - abc: files.abc, - xyz: files.xyz, - './bar': files.bar - } -}; - -test('preserves expose and entry with partial cache', function(t) { - t.plan(1); - - var partialCache = xtend(cache); - delete partialCache[files.bar]; - - var p = parser({ cache: partialCache }); - p.write({ id: 'abc', file: files.abc, expose: 'abc' }); - p.write({ id: 'xyz', file: files.xyz, expose: 'xyz' }); - p.end({ id: 'main', file: files.main, entry: true }); - - var rows = []; - p.on('data', function (row) { rows.push(row); }); - p.on('end', function () { - t.same(rows.sort(cmp), [ - { - id: files.bar, - file: files.bar, - source: sources.bar, - deps: {xyz: files.xyz} - }, - { - file: files.foo, - id: files.foo, - source: sources.foo, - deps: {'./lib/abc': files.abc} - }, - { - id: 'abc', - file: files.abc, - source: sources.abc, - deps: {}, - entry: true, - expose: 'abc' - }, - { - id: 'main', - file: files.main, - source: sources.main, - deps: { - './bar': files.bar, - abc: files.abc, - xyz: files.xyz - }, - entry: true - }, - { - id: 'xyz', - file: files.xyz, - source: sources.xyz, - deps: {'../foo': files.foo}, - entry: true, - expose: 'xyz' - } - ].sort(cmp)); - }); -}); - -function cmp (a, b) { return a.id < b.id ? -1 : 1 } diff --git a/node_modules/browserify/node_modules/module-deps/test/cycle.js b/node_modules/browserify/node_modules/module-deps/test/cycle.js deleted file mode 100644 index e2e3e9e5..00000000 --- a/node_modules/browserify/node_modules/module-deps/test/cycle.js +++ /dev/null @@ -1,19 +0,0 @@ -var mdeps = require('../'); -var test = require('tap').test; -var JSONStream = require('JSONStream'); -var packer = require('browser-pack'); -var concat = require('concat-stream'); -var path = require('path'); - -test('cycle', function (t) { - t.plan(1); - var p = mdeps(); - p.end(path.join(__dirname, '/cycle/main.js')); - var pack = packer(); - - p.pipe(JSONStream.stringify()).pipe(pack).pipe(concat(function (src) { - Function('console', src.toString('utf8'))({ - log: function (msg) { t.equal(msg, 333) } - }); - })); -}); diff --git a/node_modules/browserify/node_modules/module-deps/test/cycle/bar.js b/node_modules/browserify/node_modules/module-deps/test/cycle/bar.js deleted file mode 100644 index c78d1a5f..00000000 --- a/node_modules/browserify/node_modules/module-deps/test/cycle/bar.js +++ /dev/null @@ -1,3 +0,0 @@ -var foo = require('./foo.js'); - -module.exports = function (n) { return foo.p(n, 1) }; diff --git a/node_modules/browserify/node_modules/module-deps/test/cycle/foo.js b/node_modules/browserify/node_modules/module-deps/test/cycle/foo.js deleted file mode 100644 index 17449687..00000000 --- a/node_modules/browserify/node_modules/module-deps/test/cycle/foo.js +++ /dev/null @@ -1,4 +0,0 @@ -var bar = require('./bar.js'); - -exports.ooo = function (n) { return n * bar(110) }; -exports.p = function (a, b) { return a + b } diff --git a/node_modules/browserify/node_modules/module-deps/test/cycle/main.js b/node_modules/browserify/node_modules/module-deps/test/cycle/main.js deleted file mode 100644 index 6601355f..00000000 --- a/node_modules/browserify/node_modules/module-deps/test/cycle/main.js +++ /dev/null @@ -1,4 +0,0 @@ -var foo = require('./foo.js'); -var bar = require('./bar.js'); - -console.log(foo.ooo(bar(2))); diff --git a/node_modules/browserify/node_modules/module-deps/test/deps.js b/node_modules/browserify/node_modules/module-deps/test/deps.js deleted file mode 100644 index f269bc76..00000000 --- a/node_modules/browserify/node_modules/module-deps/test/deps.js +++ /dev/null @@ -1,49 +0,0 @@ -var parser = require('../'); -var test = require('tap').test; -var fs = require('fs'); -var path = require('path'); - -var files = { - main: path.join(__dirname, '/files/main.js'), - foo: path.join(__dirname, '/files/foo.js'), - bar: path.join(__dirname, '/files/bar.js') -}; - -var sources = Object.keys(files).reduce(function (acc, file) { - acc[file] = fs.readFileSync(files[file], 'utf8'); - return acc; -}, {}); - -test('deps', function (t) { - t.plan(1); - var p = parser(); - p.end({ file: files.main, entry: true }); - - var rows = []; - p.on('data', function (row) { rows.push(row) }); - p.on('end', function () { - t.same(rows.sort(cmp), [ - { - id: files.main, - file: files.main, - source: sources.main, - entry: true, - deps: { './foo': files.foo } - }, - { - id: files.foo, - file: files.foo, - source: sources.foo, - deps: { './bar': files.bar } - }, - { - id: files.bar, - file: files.bar, - source: sources.bar, - deps: {} - } - ].sort(cmp)); - }); -}); - -function cmp (a, b) { return a.id < b.id ? -1 : 1 } diff --git a/node_modules/browserify/node_modules/module-deps/test/dotdot.js b/node_modules/browserify/node_modules/module-deps/test/dotdot.js deleted file mode 100644 index d5f5fdde..00000000 --- a/node_modules/browserify/node_modules/module-deps/test/dotdot.js +++ /dev/null @@ -1,20 +0,0 @@ -var mdeps = require('../'); -var test = require('tap').test; -var through = require('through2'); -var path = require('path'); - -test('dotdot', function (t) { - var expected = [ - path.join(__dirname, '/dotdot/index.js'), - path.join(__dirname, '/dotdot/abc/index.js') - ]; - t.plan(expected.length); - - var d = mdeps(); - d.end(path.join(__dirname, '/dotdot/abc/index.js')); - - d.pipe(through.obj(function (row, enc, next) { - t.deepEqual(row.file, expected.shift()); - next(); - })); -}); diff --git a/node_modules/browserify/node_modules/module-deps/test/dotdot/abc/index.js b/node_modules/browserify/node_modules/module-deps/test/dotdot/abc/index.js deleted file mode 100644 index 67f2534e..00000000 --- a/node_modules/browserify/node_modules/module-deps/test/dotdot/abc/index.js +++ /dev/null @@ -1,2 +0,0 @@ -var x = require('..'); -console.log(x); diff --git a/node_modules/browserify/node_modules/module-deps/test/dotdot/index.js b/node_modules/browserify/node_modules/module-deps/test/dotdot/index.js deleted file mode 100644 index afec7360..00000000 --- a/node_modules/browserify/node_modules/module-deps/test/dotdot/index.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = 'whatever' diff --git a/node_modules/browserify/node_modules/module-deps/test/expose.js b/node_modules/browserify/node_modules/module-deps/test/expose.js deleted file mode 100644 index 947e7984..00000000 --- a/node_modules/browserify/node_modules/module-deps/test/expose.js +++ /dev/null @@ -1,41 +0,0 @@ -var parser = require('../'); -var test = require('tap').test; -var fs = require('fs'); -var path = require('path'); - -var files = { - foo: path.join(__dirname, '/files/foo.js'), - bar: path.join(__dirname, '/files/bar.js') -}; - -var sources = Object.keys(files).reduce(function (acc, file) { - acc[file] = fs.readFileSync(files[file], 'utf8'); - return acc; -}, {}); - -test('single id export', function (t) { - t.plan(1); - var p = parser(); - p.end({ id: 'foo', file: files.foo, entry: false }); - - var rows = []; - p.on('data', function (row) { rows.push(row) }); - p.on('end', function () { - t.same(rows.sort(cmp), [ - { - id: 'foo', - file: files.foo, - source: sources.foo, - deps: { './bar': files.bar } - }, - { - id: files.bar, - file: files.bar, - source: sources.bar, - deps: {} - } - ].sort(cmp)); - }); -}); - -function cmp (a, b) { return a.id < b.id ? -1 : 1 } diff --git a/node_modules/browserify/node_modules/module-deps/test/expose/bar.js b/node_modules/browserify/node_modules/module-deps/test/expose/bar.js deleted file mode 100644 index 31559cee..00000000 --- a/node_modules/browserify/node_modules/module-deps/test/expose/bar.js +++ /dev/null @@ -1 +0,0 @@ -require('xyz'); diff --git a/node_modules/browserify/node_modules/module-deps/test/expose/foo.js b/node_modules/browserify/node_modules/module-deps/test/expose/foo.js deleted file mode 100644 index aa7d3b95..00000000 --- a/node_modules/browserify/node_modules/module-deps/test/expose/foo.js +++ /dev/null @@ -1 +0,0 @@ -require('./lib/abc'); diff --git a/node_modules/browserify/node_modules/module-deps/test/expose/lib/abc.js b/node_modules/browserify/node_modules/module-deps/test/expose/lib/abc.js deleted file mode 100644 index d13b5367..00000000 --- a/node_modules/browserify/node_modules/module-deps/test/expose/lib/abc.js +++ /dev/null @@ -1 +0,0 @@ -console.log('abc'); diff --git a/node_modules/browserify/node_modules/module-deps/test/expose/lib/xyz.js b/node_modules/browserify/node_modules/module-deps/test/expose/lib/xyz.js deleted file mode 100644 index a44c530b..00000000 --- a/node_modules/browserify/node_modules/module-deps/test/expose/lib/xyz.js +++ /dev/null @@ -1,2 +0,0 @@ -require('../foo'); -console.log('xyz'); diff --git a/node_modules/browserify/node_modules/module-deps/test/expose/main.js b/node_modules/browserify/node_modules/module-deps/test/expose/main.js deleted file mode 100644 index 00c0e24f..00000000 --- a/node_modules/browserify/node_modules/module-deps/test/expose/main.js +++ /dev/null @@ -1,3 +0,0 @@ -require('abc'); -require('xyz'); -require('./bar'); diff --git a/node_modules/browserify/node_modules/module-deps/test/file_cache.js b/node_modules/browserify/node_modules/module-deps/test/file_cache.js deleted file mode 100644 index 0a03c877..00000000 --- a/node_modules/browserify/node_modules/module-deps/test/file_cache.js +++ /dev/null @@ -1,58 +0,0 @@ -var mdeps = require('../'); -var test = require('tap').test; -var path = require('path'); -var through = require('through2'); - -var files = { - foo: path.join(__dirname, '/files/foo.js'), - bar: path.join(__dirname, '/files/bar.js') -}; - -var sources = { - foo: 'require("./bar"); var tongs;', - bar: 'notreal tongs' -}; - -var fileCache = {}; -fileCache[files.foo] = sources.foo; -fileCache[files.bar] = sources.bar; - -var specialReplace = function(input) { - return input.replace(/tongs/g, 'tangs'); -}; - -test('uses file cache', function (t) { - t.plan(1); - var p = mdeps({ - fileCache: fileCache, - transform: function (file) { - return through(function (buf, enc, next) { - this.push(specialReplace(String(buf))); - next(); - }); - }, - transformKey: [ 'browserify', 'transform' ] - }); - p.end({ id: 'foo', file: files.foo, entry: false }); - - var rows = []; - p.on('data', function (row) { rows.push(row) }); - p.on('end', function () { - t.same(rows.sort(cmp), [ - { - id: 'foo', - file: files.foo, - source: specialReplace(sources.foo), - deps: { './bar': files.bar } - }, - { - id: files.bar, - file: files.bar, - source: specialReplace(sources.bar), - deps: {} - } - ].sort(cmp)); - }); -}); - -function cmp (a, b) { return a.id < b.id ? -1 : 1 } diff --git a/node_modules/browserify/node_modules/module-deps/test/files/bar.js b/node_modules/browserify/node_modules/module-deps/test/files/bar.js deleted file mode 100644 index c57fa530..00000000 --- a/node_modules/browserify/node_modules/module-deps/test/files/bar.js +++ /dev/null @@ -1,3 +0,0 @@ -module.exports = function (n) { - return n * 100; -}; diff --git a/node_modules/browserify/node_modules/module-deps/test/files/extra.js b/node_modules/browserify/node_modules/module-deps/test/files/extra.js deleted file mode 100644 index 3e842e73..00000000 --- a/node_modules/browserify/node_modules/module-deps/test/files/extra.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = 555 diff --git a/node_modules/browserify/node_modules/module-deps/test/files/filterable.js b/node_modules/browserify/node_modules/module-deps/test/files/filterable.js deleted file mode 100644 index 9374ed27..00000000 --- a/node_modules/browserify/node_modules/module-deps/test/files/filterable.js +++ /dev/null @@ -1,10 +0,0 @@ - -module.exports = { - events: require('events'), - fs : require('fs'), - net : require('net'), - http : require('http'), - https : require('https'), - dgram : require('dgram'), - dns : require('dns') -} diff --git a/node_modules/browserify/node_modules/module-deps/test/files/foo.js b/node_modules/browserify/node_modules/module-deps/test/files/foo.js deleted file mode 100644 index c62e6385..00000000 --- a/node_modules/browserify/node_modules/module-deps/test/files/foo.js +++ /dev/null @@ -1,5 +0,0 @@ -var bar = require('./bar'); - -module.exports = function (n) { - return n * 111 + bar(n); -}; diff --git a/node_modules/browserify/node_modules/module-deps/test/files/main.js b/node_modules/browserify/node_modules/module-deps/test/files/main.js deleted file mode 100644 index 8c71d799..00000000 --- a/node_modules/browserify/node_modules/module-deps/test/files/main.js +++ /dev/null @@ -1,2 +0,0 @@ -var foo = require('./foo'); -console.log('main: ' + foo(5)); diff --git a/node_modules/browserify/node_modules/module-deps/test/files/pkg_filter/one.js b/node_modules/browserify/node_modules/module-deps/test/files/pkg_filter/one.js deleted file mode 100644 index e8f7328d..00000000 --- a/node_modules/browserify/node_modules/module-deps/test/files/pkg_filter/one.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = 1 diff --git a/node_modules/browserify/node_modules/module-deps/test/files/pkg_filter/package.json b/node_modules/browserify/node_modules/module-deps/test/files/pkg_filter/package.json deleted file mode 100644 index 0b4f872f..00000000 --- a/node_modules/browserify/node_modules/module-deps/test/files/pkg_filter/package.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "main": "one.js" -} diff --git a/node_modules/browserify/node_modules/module-deps/test/files/pkg_filter/test.js b/node_modules/browserify/node_modules/module-deps/test/files/pkg_filter/test.js deleted file mode 100644 index 87697b9d..00000000 --- a/node_modules/browserify/node_modules/module-deps/test/files/pkg_filter/test.js +++ /dev/null @@ -1 +0,0 @@ -t.equal(require('./'), 2); diff --git a/node_modules/browserify/node_modules/module-deps/test/files/pkg_filter/two.js b/node_modules/browserify/node_modules/module-deps/test/files/pkg_filter/two.js deleted file mode 100644 index 4afe2ede..00000000 --- a/node_modules/browserify/node_modules/module-deps/test/files/pkg_filter/two.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = 2 diff --git a/node_modules/browserify/node_modules/module-deps/test/files/tr_2dep_module/f.js b/node_modules/browserify/node_modules/module-deps/test/files/tr_2dep_module/f.js deleted file mode 100644 index 39c9ea4b..00000000 --- a/node_modules/browserify/node_modules/module-deps/test/files/tr_2dep_module/f.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = function (x) { return x + BBB } diff --git a/node_modules/browserify/node_modules/module-deps/test/files/tr_2dep_module/main.js b/node_modules/browserify/node_modules/module-deps/test/files/tr_2dep_module/main.js deleted file mode 100644 index b7d22ab6..00000000 --- a/node_modules/browserify/node_modules/module-deps/test/files/tr_2dep_module/main.js +++ /dev/null @@ -1,7 +0,0 @@ -var f = require('./f.js'); -var m = require('m'); -var g = require('g'); - -t.equal(m(f(AAA)), 777, 'transformation scope'); -t.equal(g(3), 333, 'sub-transformation applied'); -t.equal(typeof GGG, 'undefined', 'GGG leak'); diff --git a/node_modules/browserify/node_modules/module-deps/test/files/tr_2dep_module/node_modules/g/index.js b/node_modules/browserify/node_modules/module-deps/test/files/tr_2dep_module/node_modules/g/index.js deleted file mode 100644 index ee3356a1..00000000 --- a/node_modules/browserify/node_modules/module-deps/test/files/tr_2dep_module/node_modules/g/index.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = function (x) { return x * GGG } diff --git a/node_modules/browserify/node_modules/module-deps/test/files/tr_2dep_module/node_modules/g/node_modules/insert-ggg/index.js b/node_modules/browserify/node_modules/module-deps/test/files/tr_2dep_module/node_modules/g/node_modules/insert-ggg/index.js deleted file mode 100644 index f6117a00..00000000 --- a/node_modules/browserify/node_modules/module-deps/test/files/tr_2dep_module/node_modules/g/node_modules/insert-ggg/index.js +++ /dev/null @@ -1,8 +0,0 @@ -var through = require('through2'); - -module.exports = function (file) { - return through(function (buf, enc, next) { - this.push(String(buf).replace(/GGG/g, '111')); - next(); - }); -}; diff --git a/node_modules/browserify/node_modules/module-deps/test/files/tr_2dep_module/node_modules/g/package.json b/node_modules/browserify/node_modules/module-deps/test/files/tr_2dep_module/node_modules/g/package.json deleted file mode 100644 index 3a16bd45..00000000 --- a/node_modules/browserify/node_modules/module-deps/test/files/tr_2dep_module/node_modules/g/package.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "main": "index.js", - "browserify": { - "transform": "insert-ggg" - } -} diff --git a/node_modules/browserify/node_modules/module-deps/test/files/tr_2dep_module/node_modules/insert-aaa/index.js b/node_modules/browserify/node_modules/module-deps/test/files/tr_2dep_module/node_modules/insert-aaa/index.js deleted file mode 100644 index fc7b3566..00000000 --- a/node_modules/browserify/node_modules/module-deps/test/files/tr_2dep_module/node_modules/insert-aaa/index.js +++ /dev/null @@ -1,8 +0,0 @@ -var through = require('through2'); - -module.exports = function (file) { - return through(function (buf, enc, next) { - this.push(String(buf).replace(/AAA/g, '5')); - next(); - }); -}; diff --git a/node_modules/browserify/node_modules/module-deps/test/files/tr_2dep_module/node_modules/insert-bbb/index.js b/node_modules/browserify/node_modules/module-deps/test/files/tr_2dep_module/node_modules/insert-bbb/index.js deleted file mode 100644 index eaa64d83..00000000 --- a/node_modules/browserify/node_modules/module-deps/test/files/tr_2dep_module/node_modules/insert-bbb/index.js +++ /dev/null @@ -1,8 +0,0 @@ -var through = require('through2'); - -module.exports = function (file) { - return through(function (buf, enc, next) { - this.push(String(buf).replace(/BBB/g, '50')); - next(); - }); -}; diff --git a/node_modules/browserify/node_modules/module-deps/test/files/tr_2dep_module/node_modules/m/index.js b/node_modules/browserify/node_modules/module-deps/test/files/tr_2dep_module/node_modules/m/index.js deleted file mode 100644 index ed1f3399..00000000 --- a/node_modules/browserify/node_modules/module-deps/test/files/tr_2dep_module/node_modules/m/index.js +++ /dev/null @@ -1,3 +0,0 @@ -var AAA = 200, BBB = 300; - -module.exports = function (x) { return AAA + BBB + MMM + x } diff --git a/node_modules/browserify/node_modules/module-deps/test/files/tr_2dep_module/node_modules/m/node_modules/insert-mmm/index.js b/node_modules/browserify/node_modules/module-deps/test/files/tr_2dep_module/node_modules/m/node_modules/insert-mmm/index.js deleted file mode 100644 index 074ed1f3..00000000 --- a/node_modules/browserify/node_modules/module-deps/test/files/tr_2dep_module/node_modules/m/node_modules/insert-mmm/index.js +++ /dev/null @@ -1,8 +0,0 @@ -var through = require('through2'); - -module.exports = function (file) { - return through(function (buf, enc, next) { - this.push(String(buf).replace(/MMM/g, '222')); - next(); - }); -}; diff --git a/node_modules/browserify/node_modules/module-deps/test/files/tr_2dep_module/node_modules/m/package.json b/node_modules/browserify/node_modules/module-deps/test/files/tr_2dep_module/node_modules/m/package.json deleted file mode 100644 index 0cb75aa9..00000000 --- a/node_modules/browserify/node_modules/module-deps/test/files/tr_2dep_module/node_modules/m/package.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "main": "index.js", - "browserify": { - "transform": "insert-mmm" - } -} diff --git a/node_modules/browserify/node_modules/module-deps/test/files/tr_global/main.js b/node_modules/browserify/node_modules/module-deps/test/files/tr_global/main.js deleted file mode 100644 index 49393183..00000000 --- a/node_modules/browserify/node_modules/module-deps/test/files/tr_global/main.js +++ /dev/null @@ -1 +0,0 @@ -console.log(AAA + BBB + CCC + DDD + EEE + FFF); diff --git a/node_modules/browserify/node_modules/module-deps/test/files/tr_global/package.json b/node_modules/browserify/node_modules/module-deps/test/files/tr_global/package.json deleted file mode 100644 index 08b4f713..00000000 --- a/node_modules/browserify/node_modules/module-deps/test/files/tr_global/package.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "browserify": { - "transform": [ "tr-a", "tr-b" ] - } -} diff --git a/node_modules/browserify/node_modules/module-deps/test/files/tr_module/f.js b/node_modules/browserify/node_modules/module-deps/test/files/tr_module/f.js deleted file mode 100644 index 39c9ea4b..00000000 --- a/node_modules/browserify/node_modules/module-deps/test/files/tr_module/f.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = function (x) { return x + BBB } diff --git a/node_modules/browserify/node_modules/module-deps/test/files/tr_module/index.js b/node_modules/browserify/node_modules/module-deps/test/files/tr_module/index.js deleted file mode 100644 index b61f675e..00000000 --- a/node_modules/browserify/node_modules/module-deps/test/files/tr_module/index.js +++ /dev/null @@ -1,8 +0,0 @@ -var through = require('through2'); - -module.exports = function (file) { - return through(function (buf, enc, next) { - this.push(String(buf).replace(/XXX/g, '123')); - next(); - }); -}; diff --git a/node_modules/browserify/node_modules/module-deps/test/files/tr_module/main.js b/node_modules/browserify/node_modules/module-deps/test/files/tr_module/main.js deleted file mode 100644 index 19775fb6..00000000 --- a/node_modules/browserify/node_modules/module-deps/test/files/tr_module/main.js +++ /dev/null @@ -1,8 +0,0 @@ -var f = require('./f.js'); -var m = require('m'); -var g = require('g'); - -t.equal(m(f(AAA)), 555, 'transformation scope'); -t.equal(g(3), 333, 'sub-transformation applied'); -t.equal(typeof GGG, 'undefined', 'GGG leak'); -t.equal(XXX, 123, 'XXX'); diff --git a/node_modules/browserify/node_modules/module-deps/test/files/tr_module/package.json b/node_modules/browserify/node_modules/module-deps/test/files/tr_module/package.json deleted file mode 100644 index efba4063..00000000 --- a/node_modules/browserify/node_modules/module-deps/test/files/tr_module/package.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "browserify": { - "transform": [ "./xxx.js" ] - } -} diff --git a/node_modules/browserify/node_modules/module-deps/test/files/tr_module/xxx.js b/node_modules/browserify/node_modules/module-deps/test/files/tr_module/xxx.js deleted file mode 100644 index b61f675e..00000000 --- a/node_modules/browserify/node_modules/module-deps/test/files/tr_module/xxx.js +++ /dev/null @@ -1,8 +0,0 @@ -var through = require('through2'); - -module.exports = function (file) { - return through(function (buf, enc, next) { - this.push(String(buf).replace(/XXX/g, '123')); - next(); - }); -}; diff --git a/node_modules/browserify/node_modules/module-deps/test/files/tr_no_entry/main.js b/node_modules/browserify/node_modules/module-deps/test/files/tr_no_entry/main.js deleted file mode 100644 index 4f1d7337..00000000 --- a/node_modules/browserify/node_modules/module-deps/test/files/tr_no_entry/main.js +++ /dev/null @@ -1 +0,0 @@ -console.log(AAA) diff --git a/node_modules/browserify/node_modules/module-deps/test/files/tr_rel/package.json b/node_modules/browserify/node_modules/module-deps/test/files/tr_rel/package.json deleted file mode 100644 index efba4063..00000000 --- a/node_modules/browserify/node_modules/module-deps/test/files/tr_rel/package.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "browserify": { - "transform": [ "./xxx.js" ] - } -} diff --git a/node_modules/browserify/node_modules/module-deps/test/files/tr_rel/subdir/main.js b/node_modules/browserify/node_modules/module-deps/test/files/tr_rel/subdir/main.js deleted file mode 100644 index f0355220..00000000 --- a/node_modules/browserify/node_modules/module-deps/test/files/tr_rel/subdir/main.js +++ /dev/null @@ -1 +0,0 @@ -console.log(XXX * 3) diff --git a/node_modules/browserify/node_modules/module-deps/test/files/tr_rel/xxx.js b/node_modules/browserify/node_modules/module-deps/test/files/tr_rel/xxx.js deleted file mode 100644 index f8b47b11..00000000 --- a/node_modules/browserify/node_modules/module-deps/test/files/tr_rel/xxx.js +++ /dev/null @@ -1,8 +0,0 @@ -var through = require('through2'); - -module.exports = function (file) { - return through(function (buf, enc, next) { - this.push(String(buf).replace(/XXX/g, '111')); - next(); - }); -}; diff --git a/node_modules/browserify/node_modules/module-deps/test/files/tr_sh/f.js b/node_modules/browserify/node_modules/module-deps/test/files/tr_sh/f.js deleted file mode 100644 index 39c9ea4b..00000000 --- a/node_modules/browserify/node_modules/module-deps/test/files/tr_sh/f.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = function (x) { return x + BBB } diff --git a/node_modules/browserify/node_modules/module-deps/test/files/tr_sh/main.js b/node_modules/browserify/node_modules/module-deps/test/files/tr_sh/main.js deleted file mode 100644 index 084b20e0..00000000 --- a/node_modules/browserify/node_modules/module-deps/test/files/tr_sh/main.js +++ /dev/null @@ -1,7 +0,0 @@ -var f = require('./f.js'); -var m = require('m'); -var g = require('g'); - -t.equal(m(f(AAA)), 555, 'transformation scope'); -t.equal(g(3), 333, 'sub-transformation applied'); -t.equal(typeof GGG, 'undefined', 'GGG leak'); diff --git a/node_modules/browserify/node_modules/module-deps/test/files/tr_sh/node_modules/g/index.js b/node_modules/browserify/node_modules/module-deps/test/files/tr_sh/node_modules/g/index.js deleted file mode 100644 index ee3356a1..00000000 --- a/node_modules/browserify/node_modules/module-deps/test/files/tr_sh/node_modules/g/index.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = function (x) { return x * GGG } diff --git a/node_modules/browserify/node_modules/module-deps/test/files/tr_sh/node_modules/g/package.json b/node_modules/browserify/node_modules/module-deps/test/files/tr_sh/node_modules/g/package.json deleted file mode 100644 index ded8cc69..00000000 --- a/node_modules/browserify/node_modules/module-deps/test/files/tr_sh/node_modules/g/package.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "main": "index.js", - "browserify": { - "transform": "./tr_g.js" - } -} diff --git a/node_modules/browserify/node_modules/module-deps/test/files/tr_sh/node_modules/g/tr_g.js b/node_modules/browserify/node_modules/module-deps/test/files/tr_sh/node_modules/g/tr_g.js deleted file mode 100644 index 8f5d6147..00000000 --- a/node_modules/browserify/node_modules/module-deps/test/files/tr_sh/node_modules/g/tr_g.js +++ /dev/null @@ -1,7 +0,0 @@ -var through = require('through2'); -module.exports = function (file) { - return through(function (buf, enc, next) { - this.push(String(buf).replace(/GGG/g, '111')); - next(); - }); -}; diff --git a/node_modules/browserify/node_modules/module-deps/test/files/tr_sh/node_modules/m/index.js b/node_modules/browserify/node_modules/module-deps/test/files/tr_sh/node_modules/m/index.js deleted file mode 100644 index 4cd0ff36..00000000 --- a/node_modules/browserify/node_modules/module-deps/test/files/tr_sh/node_modules/m/index.js +++ /dev/null @@ -1,3 +0,0 @@ -var AAA = 200, BBB = 300; - -module.exports = function (x) { return AAA + BBB + x } diff --git a/node_modules/browserify/node_modules/module-deps/test/files/tr_sh/tr_a.js b/node_modules/browserify/node_modules/module-deps/test/files/tr_sh/tr_a.js deleted file mode 100644 index 397adcb6..00000000 --- a/node_modules/browserify/node_modules/module-deps/test/files/tr_sh/tr_a.js +++ /dev/null @@ -1,7 +0,0 @@ -var through = require('through2'); -module.exports = function (file) { - return through(function (buf, enc, next) { - this.push(String(buf).replace(/AAA/g, '5')); - next(); - }); -}; diff --git a/node_modules/browserify/node_modules/module-deps/test/files/tr_sh/tr_b.js b/node_modules/browserify/node_modules/module-deps/test/files/tr_sh/tr_b.js deleted file mode 100644 index 6dfcb4ef..00000000 --- a/node_modules/browserify/node_modules/module-deps/test/files/tr_sh/tr_b.js +++ /dev/null @@ -1,7 +0,0 @@ -var through = require('through2'); -module.exports = function (file) { - return through(function (buf, enc, next) { - this.push(String(buf).replace(/BBB/g, '50')); - next(); - }); -}; diff --git a/node_modules/browserify/node_modules/module-deps/test/files/tr_whole_package/f.js b/node_modules/browserify/node_modules/module-deps/test/files/tr_whole_package/f.js deleted file mode 100644 index 39d983d5..00000000 --- a/node_modules/browserify/node_modules/module-deps/test/files/tr_whole_package/f.js +++ /dev/null @@ -1,3 +0,0 @@ -var calc = require('algo').calc; - -module.exports = function (x) { return calc(x); } diff --git a/node_modules/browserify/node_modules/module-deps/test/files/tr_whole_package/main.js b/node_modules/browserify/node_modules/module-deps/test/files/tr_whole_package/main.js deleted file mode 100644 index 5b61c241..00000000 --- a/node_modules/browserify/node_modules/module-deps/test/files/tr_whole_package/main.js +++ /dev/null @@ -1,3 +0,0 @@ -var f = require('./f.js'); - -t.equal(f(14), 11, 'transformation scope'); diff --git a/node_modules/browserify/node_modules/module-deps/test/files/tr_whole_package/node_modules/algo/index.js b/node_modules/browserify/node_modules/module-deps/test/files/tr_whole_package/node_modules/algo/index.js deleted file mode 100644 index 84771c4b..00000000 --- a/node_modules/browserify/node_modules/module-deps/test/files/tr_whole_package/node_modules/algo/index.js +++ /dev/null @@ -1,3 +0,0 @@ -var decrement = require('./lib/decrement'); - -exports.calc = function (x) { return decrement(x) - GGG - GGG } diff --git a/node_modules/browserify/node_modules/module-deps/test/files/tr_whole_package/node_modules/algo/lib/decrement.js b/node_modules/browserify/node_modules/module-deps/test/files/tr_whole_package/node_modules/algo/lib/decrement.js deleted file mode 100644 index 6ea84d3e..00000000 --- a/node_modules/browserify/node_modules/module-deps/test/files/tr_whole_package/node_modules/algo/lib/decrement.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = function (x) { return x - GGG } diff --git a/node_modules/browserify/node_modules/module-deps/test/files/tr_whole_package/node_modules/algo/node_modules/insert-ggg/index.js b/node_modules/browserify/node_modules/module-deps/test/files/tr_whole_package/node_modules/algo/node_modules/insert-ggg/index.js deleted file mode 100644 index 3fed9ae0..00000000 --- a/node_modules/browserify/node_modules/module-deps/test/files/tr_whole_package/node_modules/algo/node_modules/insert-ggg/index.js +++ /dev/null @@ -1,8 +0,0 @@ -var through = require('through2'); - -module.exports = function (file) { - return through(function (buf, enc, next) { - this.push(String(buf).replace(/GGG/g, '1')); - next(); - }); -}; diff --git a/node_modules/browserify/node_modules/module-deps/test/files/tr_whole_package/node_modules/algo/package.json b/node_modules/browserify/node_modules/module-deps/test/files/tr_whole_package/node_modules/algo/package.json deleted file mode 100644 index 3a16bd45..00000000 --- a/node_modules/browserify/node_modules/module-deps/test/files/tr_whole_package/node_modules/algo/package.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "main": "index.js", - "browserify": { - "transform": "insert-ggg" - } -} diff --git a/node_modules/browserify/node_modules/module-deps/test/files/unicode/bar.js b/node_modules/browserify/node_modules/module-deps/test/files/unicode/bar.js deleted file mode 100644 index 7ebb0ae4..00000000 --- a/node_modules/browserify/node_modules/module-deps/test/files/unicode/bar.js +++ /dev/null @@ -1,3 +0,0 @@ -module.exports = function (ñ) { - return ñ * 100; -}; diff --git a/node_modules/browserify/node_modules/module-deps/test/files/unicode/foo.js b/node_modules/browserify/node_modules/module-deps/test/files/unicode/foo.js deleted file mode 100644 index 6541c71a..00000000 --- a/node_modules/browserify/node_modules/module-deps/test/files/unicode/foo.js +++ /dev/null @@ -1,5 +0,0 @@ -var é = require('./bar'); - -module.exports = function (ñ) { - return ñ * 111 + é(n); -}; diff --git a/node_modules/browserify/node_modules/module-deps/test/files/unicode/main.js b/node_modules/browserify/node_modules/module-deps/test/files/unicode/main.js deleted file mode 100644 index bb2095eb..00000000 --- a/node_modules/browserify/node_modules/module-deps/test/files/unicode/main.js +++ /dev/null @@ -1,2 +0,0 @@ -var π = require('./foo'); -console.log('main: ' + foo(5)); diff --git a/node_modules/browserify/node_modules/module-deps/test/files/xyz.js b/node_modules/browserify/node_modules/module-deps/test/files/xyz.js deleted file mode 100644 index dff6877a..00000000 --- a/node_modules/browserify/node_modules/module-deps/test/files/xyz.js +++ /dev/null @@ -1,2 +0,0 @@ -var foo = require('./foo'); -console.log('xyz: ' + foo(6)); diff --git a/node_modules/browserify/node_modules/module-deps/test/filter.js b/node_modules/browserify/node_modules/module-deps/test/filter.js deleted file mode 100644 index f66c12e2..00000000 --- a/node_modules/browserify/node_modules/module-deps/test/filter.js +++ /dev/null @@ -1,36 +0,0 @@ -var test = require('tap').test; -var path = require('path') -var mdeps = require('../') - -var core = ['events', 'util', 'dns', 'dgram', 'http', 'https', 'net', 'fs'] - -var collect = [] - -var entry = path.join(__dirname, 'files', 'filterable.js') - -test('can filter core deps', function (t) { - var p = mdeps({ - filter: function (e) { - return !~core.indexOf(e) - } - }) - p.on('data', function (d) { - collect.push(d) - t.equal(d.id, entry) - t.deepEqual(d.deps, { - events: false, - fs: false, - net: false, - http: false, - https: false, - dgram: false, - dns: false - }) - t.equal(d.entry, true) - }); - p.on('end', function () { - t.equal(collect.length, 1) - t.end() - }); - p.end(entry); -}) diff --git a/node_modules/browserify/node_modules/module-deps/test/ignore_missing.js b/node_modules/browserify/node_modules/module-deps/test/ignore_missing.js deleted file mode 100644 index a8684575..00000000 --- a/node_modules/browserify/node_modules/module-deps/test/ignore_missing.js +++ /dev/null @@ -1,60 +0,0 @@ -var parser = require('../'); -var test = require('tap').test; -var fs = require('fs'); -var path = require('path'); - -var files = { - main: path.join(__dirname, '/ignore_missing/main.js'), - other: path.join(__dirname, '/ignore_missing/other.js') -}; - -var sources = Object.keys(files).reduce(function (acc, file) { - acc[file] = fs.readFileSync(files[file], 'utf8'); - return acc; -}, {}); - -test('ignoreMissing', function (t) { - t.plan(1); - var p = parser({ignoreMissing: true}); - p.end({file: files.main, entry: true}); - - var rows = []; - p.on('data', function (row) { rows.push(row) }); - p.on('end', function () { - t.same(rows.sort(cmp), [ - { - id: files.main, - file: files.main, - source: sources.main, - entry: true, - deps: { './other': files.other } - }, - { - id: files.other, - file: files.other, - source: sources.other, - deps: { 'missingModule': undefined } - } - ].sort(cmp)); - }); -}); - -test('ignoreMissing off', function (t) { - t.plan(1); - var p = parser(); - p.end({file: files.main, entry: true}); - - var rows = []; - p.on('data', function (row) { rows.push(row) }); - p.on('error', function (err) { - t.match( - String(err), - /Cannot find module 'missingModule'/ - ); - }); - p.on('end', function () { - t.fail('should have errored'); - }); -}); - -function cmp (a, b) { return a.id < b.id ? -1 : 1 } diff --git a/node_modules/browserify/node_modules/module-deps/test/ignore_missing/main.js b/node_modules/browserify/node_modules/module-deps/test/ignore_missing/main.js deleted file mode 100644 index 709d2dba..00000000 --- a/node_modules/browserify/node_modules/module-deps/test/ignore_missing/main.js +++ /dev/null @@ -1 +0,0 @@ -require('./other'); diff --git a/node_modules/browserify/node_modules/module-deps/test/ignore_missing/other.js b/node_modules/browserify/node_modules/module-deps/test/ignore_missing/other.js deleted file mode 100644 index d173b34d..00000000 --- a/node_modules/browserify/node_modules/module-deps/test/ignore_missing/other.js +++ /dev/null @@ -1 +0,0 @@ -require('missingModule'); diff --git a/node_modules/browserify/node_modules/module-deps/test/ignore_missing_cache.js b/node_modules/browserify/node_modules/module-deps/test/ignore_missing_cache.js deleted file mode 100644 index 71520151..00000000 --- a/node_modules/browserify/node_modules/module-deps/test/ignore_missing_cache.js +++ /dev/null @@ -1,52 +0,0 @@ -var parser = require('../'); -var test = require('tap').test; -var fs = require('fs'); -var path = require('path'); - -var files = { - main: path.join(__dirname, '/ignore_missing/main.js'), - other: path.join(__dirname, '/ignore_missing/other.js') -}; - -var sources = Object.keys(files).reduce(function (acc, file) { - acc[file] = fs.readFileSync(files[file], 'utf8'); - return acc; -}, {}); - -var cache = {}; -cache[files.main] = { - source: sources.main, - deps: { './other': files.other } -}; -cache[files.other] = { - source: sources.other, - deps: { 'missingModule': undefined } -}; - -test('ignoreMissing with cache', function (t) { - t.plan(1); - var p = parser({ cache: cache, ignoreMissing: true }); - p.end({file: files.main, entry: true}); - - var rows = []; - p.on('data', function (row) { rows.push(row) }); - p.on('end', function () { - t.same(rows.sort(cmp), [ - { - id: files.main, - file: files.main, - source: sources.main, - entry: true, - deps: { './other': files.other } - }, - { - id: files.other, - file: files.other, - source: sources.other, - deps: { 'missingModule': undefined } - } - ].sort(cmp)); - }); -}); - -function cmp (a, b) { return a.id < b.id ? -1 : 1 } diff --git a/node_modules/browserify/node_modules/module-deps/test/node_modules/insert-www/index.js b/node_modules/browserify/node_modules/module-deps/test/node_modules/insert-www/index.js deleted file mode 100644 index db9d97d1..00000000 --- a/node_modules/browserify/node_modules/module-deps/test/node_modules/insert-www/index.js +++ /dev/null @@ -1,8 +0,0 @@ -var through = require('through2'); - -module.exports = function (file) { - return through(function (buf, enc, next) { - this.push(String(buf).replace(/WWW/g, '"world wide wow"')); - next(); - }); -}; diff --git a/node_modules/browserify/node_modules/module-deps/test/noparse.js b/node_modules/browserify/node_modules/module-deps/test/noparse.js deleted file mode 100644 index accbabae..00000000 --- a/node_modules/browserify/node_modules/module-deps/test/noparse.js +++ /dev/null @@ -1,43 +0,0 @@ -var parser = require('../'); -var test = require('tap').test; -var fs = require('fs'); -var path = require('path'); - -var files = { - main: path.join(__dirname, '/files/main.js'), - foo: path.join(__dirname, '/files/foo.js'), - bar: path.join(__dirname, '/files/bar.js') -}; - -var sources = Object.keys(files).reduce(function (acc, file) { - acc[file] = fs.readFileSync(files[file], 'utf8'); - return acc; -}, {}); - -test('noParse', function (t) { - t.plan(1); - var p = parser({ noParse: [ files.foo ] }); - p.end(files.main); - var rows = []; - - p.on('data', function (row) { rows.push(row) }); - p.on('end', function () { - t.deepEqual(rows.sort(cmp), [ - { - id: files.main, - file: files.main, - source: sources.main, - entry: true, - deps: { './foo': files.foo } - }, - { - id: files.foo, - file: files.foo, - source: sources.foo, - deps: {} - } - ].sort(cmp)); - }); -}); - -function cmp (a, b) { return a.id < b.id ? -1 : 1 } diff --git a/node_modules/browserify/node_modules/module-deps/test/noparse_row.js b/node_modules/browserify/node_modules/module-deps/test/noparse_row.js deleted file mode 100644 index e418da0f..00000000 --- a/node_modules/browserify/node_modules/module-deps/test/noparse_row.js +++ /dev/null @@ -1,39 +0,0 @@ -var parser = require('../'); -var test = require('tap').test; -var fs = require('fs'); -var concat = require('concat-stream'); -var path = require('path'); - -var files = { - main: path.join(__dirname, '/files/main.js'), - foo: path.join(__dirname, '/files/foo.js'), - bar: path.join(__dirname, '/files/bar.js') -}; - -var sources = Object.keys(files).reduce(function (acc, file) { - acc[file] = fs.readFileSync(files[file], 'utf8'); - return acc; -}, {}); - -test('noParse row', function (t) { - t.plan(1); - var p = parser(); - p.end({ file: files.main, noparse: true }); - var rows = []; - - p.on('data', function (row) { rows.push(row) }); - p.on('end', function () { - t.deepEqual(rows.sort(cmp), [ - { - id: files.main, - file: files.main, - source: sources.main, - entry: true, - noparse: true, - deps: {} - } - ].sort(cmp)); - }); -}); - -function cmp (a, b) { return a.id < b.id ? -1 : 1 } diff --git a/node_modules/browserify/node_modules/module-deps/test/pkg.js b/node_modules/browserify/node_modules/module-deps/test/pkg.js deleted file mode 100644 index 2306a24d..00000000 --- a/node_modules/browserify/node_modules/module-deps/test/pkg.js +++ /dev/null @@ -1,20 +0,0 @@ -var mdeps = require('../'); -var test = require('tap').test; -var path = require('path'); -var fs = require('fs'); - -var dirname = path.join(__dirname, '/pkg'); - -test('pkg', function (t) { - t.plan(4); - - var d = mdeps(); - d.on('package', function (pkg_) { - var pkg = JSON.parse(fs.readFileSync(dirname + pkg_.dir + '/package.json')); - pkg.__dirname = dirname + pkg_.dir; - - t.deepEqual(pkg_, pkg); - }); - d.end(path.join(__dirname, '/pkg/main.js')); - d.resume(); -}); diff --git a/node_modules/browserify/node_modules/module-deps/test/pkg/main.js b/node_modules/browserify/node_modules/module-deps/test/pkg/main.js deleted file mode 100644 index 100fc1f7..00000000 --- a/node_modules/browserify/node_modules/module-deps/test/pkg/main.js +++ /dev/null @@ -1,2 +0,0 @@ -require('pkga'); -require('pkgb'); diff --git a/node_modules/browserify/node_modules/module-deps/test/pkg/package.json b/node_modules/browserify/node_modules/module-deps/test/pkg/package.json deleted file mode 100644 index e6c480b1..00000000 --- a/node_modules/browserify/node_modules/module-deps/test/pkg/package.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "dir": "", - "main": "index.js" -} diff --git a/node_modules/browserify/node_modules/module-deps/test/pkg_filter.js b/node_modules/browserify/node_modules/module-deps/test/pkg_filter.js deleted file mode 100644 index f383a6b4..00000000 --- a/node_modules/browserify/node_modules/module-deps/test/pkg_filter.js +++ /dev/null @@ -1,26 +0,0 @@ -var mdeps = require('../'); -var test = require('tap').test; -var JSONStream = require('JSONStream'); -var packer = require('browser-pack'); -var concat = require('concat-stream'); -var path = require('path'); - -test('pkg filter', function (t) { - t.plan(3); - - var p = mdeps({ - packageFilter: function (pkg) { - t.equal(pkg.main, 'one.js'); - pkg.main = 'two.js' - return pkg; - } - }); - p.end(path.join(__dirname, '/files/pkg_filter/test.js')); - - var pack = packer(); - p.pipe(JSONStream.stringify()).pipe(pack); - - pack.pipe(concat(function (src) { - Function('t', src)(t); - })); -}); diff --git a/node_modules/browserify/node_modules/module-deps/test/row_expose.js b/node_modules/browserify/node_modules/module-deps/test/row_expose.js deleted file mode 100644 index 006e944c..00000000 --- a/node_modules/browserify/node_modules/module-deps/test/row_expose.js +++ /dev/null @@ -1,24 +0,0 @@ -var parser = require('../'); -var test = require('tap').test; -var through = require('through2'); -var path = require('path'); - -// Test that p.options.expose is defined and that the row is properly exposed -// (resolved to the absolute pathname corresponding to the `file` value passed -// in the row, and set in opts.expose). -test('row is exposed', function (t) { - t.plan(1); - var common_path = path.join(__dirname, '/files/main'); - var opts = { expose: {} }; - var p = parser(opts); - // Note pathname without extension. - p.end({ file: common_path, expose: "whatever" }); - p.on('error', t.fail.bind(t)); - - p.pipe(through.obj()); - - p.on('end', function () { - // Note pathname with extension. - t.equal(opts.expose.whatever, common_path + '.js'); - }); -}); diff --git a/node_modules/browserify/node_modules/module-deps/test/source.js b/node_modules/browserify/node_modules/module-deps/test/source.js deleted file mode 100644 index 2c96e56e..00000000 --- a/node_modules/browserify/node_modules/module-deps/test/source.js +++ /dev/null @@ -1,61 +0,0 @@ -var parser = require('../'); -var test = require('tap').test; -var fs = require('fs'); -var path = require('path'); - -var files = { - main: path.join(__dirname, '/files/main.js'), - foo: path.join(__dirname, '/files/foo.js'), - bar: path.join(__dirname, '/files/bar.js'), - extra: path.join(__dirname, '/files/extra.js') -}; -var sources = { - foo: fs.readFileSync(files.foo, 'utf8'), - bar: fs.readFileSync(files.bar, 'utf8'), - extra: fs.readFileSync(files.extra, 'utf8'), - main: "console.log(require('./foo')(5)); require('./extra.js')" -}; - -test('source', function (t) { - t.plan(1); - var p = parser(); - p.end({ - file: files.main, - source: sources.main, - entry: true - }); - - var rows = []; - p.on('data', function (row) { rows.push(row) }); - p.on('end', function () { - t.same(rows.sort(cmp), [ - { - id: files.main, - file: files.main, - source: sources.main, - entry: true, - deps: { './foo': files.foo, './extra.js': files.extra } - }, - { - id: files.foo, - file: files.foo, - source: sources.foo, - deps: { './bar': files.bar } - }, - { - id: files.bar, - file: files.bar, - source: sources.bar, - deps: {} - }, - { - id: files.extra, - file: files.extra, - source: sources.extra, - deps: {} - }, - ].sort(cmp)); - }); -}); - -function cmp (a, b) { return a.id < b.id ? -1 : 1 } diff --git a/node_modules/browserify/node_modules/module-deps/test/tr_2dep_module.js b/node_modules/browserify/node_modules/module-deps/test/tr_2dep_module.js deleted file mode 100644 index 6ba8f891..00000000 --- a/node_modules/browserify/node_modules/module-deps/test/tr_2dep_module.js +++ /dev/null @@ -1,23 +0,0 @@ -var mdeps = require('../'); -var test = require('tap').test; -var JSONStream = require('JSONStream'); -var packer = require('browser-pack'); -var path = require('path'); - -test('transform', function (t) { - t.plan(3); - var p = mdeps({ - transform: [ 'insert-aaa', 'insert-bbb' ], - transformKey: [ 'browserify', 'transform' ] - }); - p.end(path.join(__dirname, '/files/tr_2dep_module/main.js')); - var pack = packer(); - - p.pipe(JSONStream.stringify()).pipe(pack); - - var src = ''; - pack.on('data', function (buf) { src += buf }); - pack.on('end', function () { - Function('t', src)(t); - }); -}); diff --git a/node_modules/browserify/node_modules/module-deps/test/tr_err.js b/node_modules/browserify/node_modules/module-deps/test/tr_err.js deleted file mode 100644 index 29322da0..00000000 --- a/node_modules/browserify/node_modules/module-deps/test/tr_err.js +++ /dev/null @@ -1,21 +0,0 @@ -var mdeps = require('../'); -var test = require('tap').test; -var JSONStream = require('JSONStream'); -var packer = require('browser-pack'); -var through = require('through2'); -var path = require('path'); - -test('transform', function (t) { - t.plan(1); - var p = mdeps({ - transform: function (file) { - return through(function () { - this.emit('error', new Error('rawr')); - }); - } - }); - p.on('error', function (err) { - t.ok(/tr_sh[\\\/]main\.js/.test(err)); - }); - p.end(path.join(__dirname, '/files/tr_sh/main.js')); -}); diff --git a/node_modules/browserify/node_modules/module-deps/test/tr_fn.js b/node_modules/browserify/node_modules/module-deps/test/tr_fn.js deleted file mode 100644 index 127f4adc..00000000 --- a/node_modules/browserify/node_modules/module-deps/test/tr_fn.js +++ /dev/null @@ -1,32 +0,0 @@ -var mdeps = require('../'); -var test = require('tap').test; -var JSONStream = require('JSONStream'); -var packer = require('browser-pack'); -var through = require('through2'); -var path = require('path'); - -test('transform', function (t) { - t.plan(3); - var p = mdeps({ - transform: function (file) { - return through(function (buf, enc, next) { - this.push(String(buf) - .replace(/AAA/g, '5') - .replace(/BBB/g, '50') - ); - next(); - }); - }, - transformKey: [ 'browserify', 'transform' ] - }); - p.end(path.join(__dirname, '/files/tr_sh/main.js')); - var pack = packer(); - - p.pipe(JSONStream.stringify()).pipe(pack); - - var src = ''; - pack.on('data', function (buf) { src += buf }); - pack.on('end', function () { - Function('t', src)(t); - }); -}); diff --git a/node_modules/browserify/node_modules/module-deps/test/tr_global.js b/node_modules/browserify/node_modules/module-deps/test/tr_global.js deleted file mode 100644 index 2b4695e4..00000000 --- a/node_modules/browserify/node_modules/module-deps/test/tr_global.js +++ /dev/null @@ -1,29 +0,0 @@ -var mdeps = require('../'); -var test = require('tap').test; -var JSONStream = require('JSONStream'); -var packer = require('browser-pack'); -var concat = require('concat-stream'); -var path = require('path'); - -test('global transforms', function (t) { - t.plan(1); - - var p = mdeps({ - transform: [ 'tr-c', 'tr-d' ], - globalTransform: [ - path.join(__dirname, '/files/tr_global/node_modules/tr-e'), - path.join(__dirname, '/files/tr_global/node_modules/tr-f') - ], - transformKey: [ 'browserify', 'transform' ] - }); - p.end(path.join(__dirname, '/files/tr_global/main.js')); - var pack = packer(); - - p.pipe(JSONStream.stringify()).pipe(pack).pipe(concat(function (src) { - Function(['console'], src)({ - log: function (msg) { - t.equal(msg, 111111); - } - }); - })); -}); diff --git a/node_modules/browserify/node_modules/module-deps/test/tr_module.js b/node_modules/browserify/node_modules/module-deps/test/tr_module.js deleted file mode 100644 index f781746c..00000000 --- a/node_modules/browserify/node_modules/module-deps/test/tr_module.js +++ /dev/null @@ -1,23 +0,0 @@ -var mdeps = require('../'); -var test = require('tap').test; -var JSONStream = require('JSONStream'); -var packer = require('browser-pack'); -var path = require('path'); - -test('transform', function (t) { - t.plan(4); - var p = mdeps({ - transform: [ 'insert-aaa', 'insert-bbb' ], - transformKey: [ 'browserify', 'transform' ] - }); - p.end(path.join(__dirname, '/files/tr_module/main.js')); - var pack = packer(); - - p.pipe(JSONStream.stringify()).pipe(pack); - - var src = ''; - pack.on('data', function (buf) { src += buf }); - pack.on('end', function () { - Function('t', src)(t); - }); -}); diff --git a/node_modules/browserify/node_modules/module-deps/test/tr_no_entry.js b/node_modules/browserify/node_modules/module-deps/test/tr_no_entry.js deleted file mode 100644 index e4428572..00000000 --- a/node_modules/browserify/node_modules/module-deps/test/tr_no_entry.js +++ /dev/null @@ -1,31 +0,0 @@ -var mdeps = require('../'); -var test = require('tap').test; -var JSONStream = require('JSONStream'); -var packer = require('browser-pack'); -var through = require('through2'); -var concat = require('concat-stream'); -var path = require('path'); - -test('transform no entry', function (t) { - t.plan(1); - var p = mdeps({ - transform: [ function (file) { - return through(function (buf, enc, next) { - this.push(String(buf).replace(/AAA/g, '"WOW"')); - next(); - }); - } ] - }); - p.end({ - file: path.join(__dirname, '/files/tr_no_entry/main.js'), - id: 'xxx' - }); - - p.pipe(JSONStream.stringify()).pipe(packer()) - .pipe(concat(function (body) { - var con = { log: function (x) { t.equal(x, 'WOW') } }; - var src = 'require=' + body.toString('utf8') + ';require("xxx")'; - Function('console', src)(con); - })) - ; -}); diff --git a/node_modules/browserify/node_modules/module-deps/test/tr_opts.js b/node_modules/browserify/node_modules/module-deps/test/tr_opts.js deleted file mode 100644 index cc821b99..00000000 --- a/node_modules/browserify/node_modules/module-deps/test/tr_opts.js +++ /dev/null @@ -1,21 +0,0 @@ -var mdeps = require('../'); -var test = require('tap').test; -var JSONStream = require('JSONStream'); -var packer = require('browser-pack'); -var concat = require('concat-stream'); -var path = require('path'); - -test('transform options', function (t) { - t.plan(1); - var p = mdeps({ - transformKey: [ 'mdtr' ] - }); - p.end(path.join(__dirname, '/tr_opts/main.js')); - var pack = packer(); - - p.pipe(JSONStream.stringify()).pipe(pack).pipe(concat(function (src) { - Function('console', src.toString('utf8'))({ - log: function (msg) { t.equal(msg, 333) } - }); - })); -}); diff --git a/node_modules/browserify/node_modules/module-deps/test/tr_opts/main.js b/node_modules/browserify/node_modules/module-deps/test/tr_opts/main.js deleted file mode 100644 index 1f284076..00000000 --- a/node_modules/browserify/node_modules/module-deps/test/tr_opts/main.js +++ /dev/null @@ -1 +0,0 @@ -console.log(FFF * GGG); diff --git a/node_modules/browserify/node_modules/module-deps/test/tr_opts/package.json b/node_modules/browserify/node_modules/module-deps/test/tr_opts/package.json deleted file mode 100644 index 6bc52d85..00000000 --- a/node_modules/browserify/node_modules/module-deps/test/tr_opts/package.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "mdtr": [ - [ "fff", { "x": 3 } ], - [ "ggg", { "z": 111 } ] - ] -} diff --git a/node_modules/browserify/node_modules/module-deps/test/tr_rel.js b/node_modules/browserify/node_modules/module-deps/test/tr_rel.js deleted file mode 100644 index 4e340c42..00000000 --- a/node_modules/browserify/node_modules/module-deps/test/tr_rel.js +++ /dev/null @@ -1,24 +0,0 @@ -var mdeps = require('../'); -var test = require('tap').test; -var JSONStream = require('JSONStream'); -var packer = require('browser-pack'); -var path = require('path'); - -test('transform', function (t) { - t.plan(1); - var p = mdeps({ - transformKey: [ 'browserify', 'transform' ] - }); - p.end(path.join(__dirname, '/files/tr_rel/subdir/main.js')); - var pack = packer(); - - p.pipe(JSONStream.stringify()).pipe(pack); - - var src = ''; - pack.on('data', function (buf) { src += buf }); - pack.on('end', function () { - Function('console', src)({ log: function (msg) { - t.equal(msg, 333); - } }); - }); -}); diff --git a/node_modules/browserify/node_modules/module-deps/test/tr_sh.js b/node_modules/browserify/node_modules/module-deps/test/tr_sh.js deleted file mode 100644 index a46f599d..00000000 --- a/node_modules/browserify/node_modules/module-deps/test/tr_sh.js +++ /dev/null @@ -1,23 +0,0 @@ -var mdeps = require('../'); -var test = require('tap').test; -var JSONStream = require('JSONStream'); -var packer = require('browser-pack'); -var path = require('path'); - -test('transform', function (t) { - t.plan(3); - var p = mdeps({ - transform: [ './tr_a.js', './tr_b.js' ], - transformKey: [ 'browserify', 'transform' ] - }); - p.end(path.join(__dirname, '/files/tr_sh/main.js')); - var pack = packer(); - - p.pipe(JSONStream.stringify()).pipe(pack); - - var src = ''; - pack.on('data', function (buf) { src += buf }); - pack.on('end', function () { - Function('t', src)(t); - }); -}); diff --git a/node_modules/browserify/node_modules/module-deps/test/tr_whole_package.js b/node_modules/browserify/node_modules/module-deps/test/tr_whole_package.js deleted file mode 100644 index a2a31310..00000000 --- a/node_modules/browserify/node_modules/module-deps/test/tr_whole_package.js +++ /dev/null @@ -1,22 +0,0 @@ -var mdeps = require('../'); -var test = require('tap').test; -var JSONStream = require('JSONStream'); -var packer = require('browser-pack'); -var path = require('path'); - -test('transform', function (t) { - t.plan(1); - var p = mdeps({ - transformKey: [ 'browserify', 'transform' ] - }); - p.end(path.join(__dirname, '/files/tr_whole_package/main.js')); - var pack = packer(); - - p.pipe(JSONStream.stringify()).pipe(pack); - - var src = ''; - pack.on('data', function (buf) { src += buf }); - pack.on('end', function () { - Function('t', src)(t); - }); -}); diff --git a/node_modules/browserify/node_modules/module-deps/test/tr_write.js b/node_modules/browserify/node_modules/module-deps/test/tr_write.js deleted file mode 100644 index 1d709d97..00000000 --- a/node_modules/browserify/node_modules/module-deps/test/tr_write.js +++ /dev/null @@ -1,32 +0,0 @@ -var mdeps = require('../'); -var test = require('tap').test; -var JSONStream = require('JSONStream'); -var packer = require('browser-pack'); -var path = require('path'); -var concat = require('concat-stream'); - -test('transform write', function (t) { - t.plan(1); - var p = mdeps(); - - p.write({ - transform: 'insert-www', - options: {} - }); - p.write({ - file: path.join(__dirname, 'tr_write/main.js'), - id: path.join(__dirname, 'tr_write/main.js'), - entry: true - }); - p.end(); - - var pack = packer(); - p.pipe(JSONStream.stringify()).pipe(pack); - - pack.pipe(concat(function (buf) { - var src = buf.toString('utf8'); - Function('console', src)({ log: function (msg) { - t.equal(msg, 'WORLD WIDE WOW'); - } }); - })); -}); diff --git a/node_modules/browserify/node_modules/module-deps/test/tr_write/main.js b/node_modules/browserify/node_modules/module-deps/test/tr_write/main.js deleted file mode 100644 index 70f75325..00000000 --- a/node_modules/browserify/node_modules/module-deps/test/tr_write/main.js +++ /dev/null @@ -1 +0,0 @@ -console.log(WWW.toUpperCase()); diff --git a/node_modules/browserify/node_modules/module-deps/test/undef_file.js b/node_modules/browserify/node_modules/module-deps/test/undef_file.js deleted file mode 100644 index 83f39052..00000000 --- a/node_modules/browserify/node_modules/module-deps/test/undef_file.js +++ /dev/null @@ -1,49 +0,0 @@ -var parser = require('../'); -var test = require('tap').test; -var fs = require('fs'); -var path = require('path'); - -var files = { - main: path.join(__dirname, '/files/main.js'), - foo: path.join(__dirname, '/files/foo.js'), - bar: path.join(__dirname, '/files/bar.js') -}; - -var sources = Object.keys(files).reduce(function (acc, file) { - acc[file] = fs.readFileSync(files[file], 'utf8'); - return acc; -}, {}); - -test('undef file', function (t) { - t.plan(1); - var p = parser(); - p.end({ id: files.main, entry: true }); - - var rows = []; - p.on('data', function (row) { rows.push(row) }); - p.on('end', function () { - t.same(rows.sort(cmp), [ - { - id: files.main, - file: files.main, - source: sources.main, - entry: true, - deps: { './foo': files.foo } - }, - { - id: files.foo, - file: files.foo, - source: sources.foo, - deps: { './bar': files.bar } - }, - { - id: files.bar, - file: files.bar, - source: sources.bar, - deps: {} - } - ].sort(cmp)); - }); -}); - -function cmp (a, b) { return a.id < b.id ? -1 : 1 } diff --git a/node_modules/browserify/node_modules/module-deps/test/unicode.js b/node_modules/browserify/node_modules/module-deps/test/unicode.js deleted file mode 100644 index 682f0f85..00000000 --- a/node_modules/browserify/node_modules/module-deps/test/unicode.js +++ /dev/null @@ -1,49 +0,0 @@ -var parser = require('../'); -var test = require('tap').test; -var fs = require('fs'); -var path = require('path'); - -var files = { - main: path.join(__dirname, '/files/unicode/main.js'), - foo: path.join(__dirname, '/files/unicode/foo.js'), - bar: path.join(__dirname, '/files/unicode/bar.js') -}; - -var sources = Object.keys(files).reduce(function (acc, file) { - acc[file] = fs.readFileSync(files[file], 'utf8'); - return acc; -}, {}); - -test('unicode deps', function (t) { - t.plan(1); - var p = parser(); - p.end(files.main); - var rows = []; - - p.on('data', function (row) { rows.push(row) }); - p.on('end', function () { - t.same(rows.sort(cmp), [ - { - id: files.main, - file: files.main, - source: sources.main, - entry: true, - deps: { './foo': files.foo } - }, - { - id: files.foo, - file: files.foo, - source: sources.foo, - deps: { './bar': files.bar } - }, - { - id: files.bar, - file: files.bar, - source: sources.bar, - deps: {} - } - ].sort(cmp)); - }); -}); - -function cmp (a, b) { return a.id < b.id ? -1 : 1 } diff --git a/node_modules/browserify/node_modules/os-browserify/.npmignore b/node_modules/browserify/node_modules/os-browserify/.npmignore deleted file mode 100644 index f356293e..00000000 --- a/node_modules/browserify/node_modules/os-browserify/.npmignore +++ /dev/null @@ -1,14 +0,0 @@ -lib-cov -*.seed -*.log -*.csv -*.dat -*.out -*.pid -*.gz - -pids -logs -results - -npm-debug.log diff --git a/node_modules/browserify/node_modules/os-browserify/LICENSE b/node_modules/browserify/node_modules/os-browserify/LICENSE deleted file mode 100644 index a52e9b89..00000000 --- a/node_modules/browserify/node_modules/os-browserify/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2014 Drew Young - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. \ No newline at end of file diff --git a/node_modules/browserify/node_modules/os-browserify/README.md b/node_modules/browserify/node_modules/os-browserify/README.md deleted file mode 100644 index c772502d..00000000 --- a/node_modules/browserify/node_modules/os-browserify/README.md +++ /dev/null @@ -1,2 +0,0 @@ -os-browserify -============= \ No newline at end of file diff --git a/node_modules/browserify/node_modules/os-browserify/browser.js b/node_modules/browserify/node_modules/os-browserify/browser.js deleted file mode 100644 index 6a1ecb07..00000000 --- a/node_modules/browserify/node_modules/os-browserify/browser.js +++ /dev/null @@ -1,45 +0,0 @@ -exports.endianness = function () { return 'LE' }; - -exports.hostname = function () { - if (typeof location !== 'undefined') { - return location.hostname - } - else return ''; -}; - -exports.loadavg = function () { return [] }; - -exports.uptime = function () { return 0 }; - -exports.freemem = function () { - return Number.MAX_VALUE; -}; - -exports.totalmem = function () { - return Number.MAX_VALUE; -}; - -exports.cpus = function () { return [] }; - -exports.type = function () { return 'Browser' }; - -exports.release = function () { - if (typeof navigator !== 'undefined') { - return navigator.appVersion; - } - return ''; -}; - -exports.networkInterfaces -= exports.getNetworkInterfaces -= function () { return {} }; - -exports.arch = function () { return 'javascript' }; - -exports.platform = function () { return 'browser' }; - -exports.tmpdir = exports.tmpDir = function () { - return '/tmp'; -}; - -exports.EOL = '\n'; diff --git a/node_modules/browserify/node_modules/os-browserify/main.js b/node_modules/browserify/node_modules/os-browserify/main.js deleted file mode 100644 index 5910697d..00000000 --- a/node_modules/browserify/node_modules/os-browserify/main.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('os'); diff --git a/node_modules/browserify/node_modules/os-browserify/package.json b/node_modules/browserify/node_modules/os-browserify/package.json deleted file mode 100644 index 9a429145..00000000 --- a/node_modules/browserify/node_modules/os-browserify/package.json +++ /dev/null @@ -1,41 +0,0 @@ -{ - "name": "os-browserify", - "version": "0.1.2", - "author": { - "name": "Drew Young" - }, - "license": "MIT", - "main": "main.js", - "browser": "browser.js", - "repository": { - "type": "git", - "url": "http://github.com/drewyoung1/os-browserify.git" - }, - "description": "os-browserify =============", - "bugs": { - "url": "https://github.com/drewyoung1/os-browserify/issues" - }, - "homepage": "https://github.com/drewyoung1/os-browserify", - "_id": "os-browserify@0.1.2", - "dist": { - "shasum": "49ca0293e0b19590a5f5de10c7f265a617d8fe54", - "tarball": "https://registry.npmjs.org/os-browserify/-/os-browserify-0.1.2.tgz" - }, - "_from": "os-browserify@>=0.1.1 <0.2.0", - "_npmVersion": "1.3.25", - "_npmUser": { - "name": "drewyoung1", - "email": "drewyoung1@gmail.com" - }, - "maintainers": [ - { - "name": "drewyoung1", - "email": "drewyoung1@gmail.com" - } - ], - "directories": {}, - "_shasum": "49ca0293e0b19590a5f5de10c7f265a617d8fe54", - "_resolved": "https://registry.npmjs.org/os-browserify/-/os-browserify-0.1.2.tgz", - "readme": "ERROR: No README data found!", - "scripts": {} -} diff --git a/node_modules/browserify/node_modules/parents/.travis.yml b/node_modules/browserify/node_modules/parents/.travis.yml deleted file mode 100644 index 895dbd36..00000000 --- a/node_modules/browserify/node_modules/parents/.travis.yml +++ /dev/null @@ -1,4 +0,0 @@ -language: node_js -node_js: - - 0.6 - - 0.8 diff --git a/node_modules/browserify/node_modules/parents/LICENSE b/node_modules/browserify/node_modules/parents/LICENSE deleted file mode 100644 index ee27ba4b..00000000 --- a/node_modules/browserify/node_modules/parents/LICENSE +++ /dev/null @@ -1,18 +0,0 @@ -This software is released under the MIT license: - -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/node_modules/browserify/node_modules/parents/example/dirname.js b/node_modules/browserify/node_modules/parents/example/dirname.js deleted file mode 100644 index c9d381b2..00000000 --- a/node_modules/browserify/node_modules/parents/example/dirname.js +++ /dev/null @@ -1,3 +0,0 @@ -var parents = require('../'); -var dirs = parents(__dirname); -console.dir(dirs); diff --git a/node_modules/browserify/node_modules/parents/example/win32.js b/node_modules/browserify/node_modules/parents/example/win32.js deleted file mode 100644 index 11b85d6e..00000000 --- a/node_modules/browserify/node_modules/parents/example/win32.js +++ /dev/null @@ -1,5 +0,0 @@ -var parents = require('../'); -var dir = 'C:\\Program Files\\Maxis\\Sim City 2000\\cities'; - -var dirs = parents(dir, { platform : 'win32' }); -console.dir(dirs); diff --git a/node_modules/browserify/node_modules/parents/index.js b/node_modules/browserify/node_modules/parents/index.js deleted file mode 100644 index 84a96397..00000000 --- a/node_modules/browserify/node_modules/parents/index.js +++ /dev/null @@ -1,48 +0,0 @@ -var pathPlatform = require('path-platform'); - -module.exports = function (cwd, opts) { - if (cwd === undefined) cwd = process.cwd(); - if (!opts) opts = {}; - var platform = opts.platform || process.platform; - - var isWindows = /^win/.test(platform); - var path = isWindows ? pathPlatform.win32 : pathPlatform; - var normalize = !isWindows ? path.normalize : - path.normalize('c:') === 'c:.' ? fixNormalize(path.normalize) : - path.normalize; - var sep = isWindows ? /[\\\/]/ : '/'; - var init = isWindows ? '' : '/'; - - var join = function (x, y) { - var ps = [ x, y ].filter(function (p) { - return p && typeof p === 'string' - }); - - return normalize(ps.join(isWindows ? '\\' : '/')); - }; - - var res = normalize(cwd) - .split(sep) - .reduce(function (acc,dir,ix) { - return acc.concat(join(acc[ix], dir)) - }, [init]) - .slice(1) - .reverse() - ; - if (res[0] === res[1]) return [ res[0] ]; - if (isWindows && /^\\/.test(cwd)) { - return res.slice(0,-1).map(function (d) { - var ch = d.charAt(0) - return ch === '\\' ? d : - ch === '.' ? '\\' + d.slice(1) : - '\\' + d - }); - } - return res; - - function fixNormalize(fn) { - return function(p) { - return fn(p).replace(/:\.$/, ':') - } - } -} diff --git a/node_modules/browserify/node_modules/parents/node_modules/path-platform/LICENSE b/node_modules/browserify/node_modules/parents/node_modules/path-platform/LICENSE deleted file mode 100644 index cfa529ec..00000000 --- a/node_modules/browserify/node_modules/parents/node_modules/path-platform/LICENSE +++ /dev/null @@ -1,3 +0,0 @@ -MIT -- see https://github.com/joyent/node for license - -This file is pulled directly from Node.js diff --git a/node_modules/browserify/node_modules/parents/node_modules/path-platform/README.md b/node_modules/browserify/node_modules/parents/node_modules/path-platform/README.md deleted file mode 100644 index 9892dbdc..00000000 --- a/node_modules/browserify/node_modules/parents/node_modules/path-platform/README.md +++ /dev/null @@ -1,5 +0,0 @@ -# path-platform - -This is a transitional package for those not on 0.12 that provides a compatible -interface to the builtin `path` module, but adds `path.posix` and `path.win32` -so you can `path.posix.normalize` on a win32 platform, or vice versa. diff --git a/node_modules/browserify/node_modules/parents/node_modules/path-platform/package.json b/node_modules/browserify/node_modules/parents/node_modules/path-platform/package.json deleted file mode 100644 index 91dab1a9..00000000 --- a/node_modules/browserify/node_modules/parents/node_modules/path-platform/package.json +++ /dev/null @@ -1,52 +0,0 @@ -{ - "name": "path-platform", - "version": "0.11.15", - "license": "MIT", - "author": { - "name": "Timothy J Fontaine", - "email": "tjfontaine@gmail.com", - "url": "http://atxconsulting.com" - }, - "description": "Provide access to win32 and posix path operations; sourced directly from upstream Node.js", - "keywords": [ - "path", - "platform", - "posix", - "win32" - ], - "homepage": "http://github.com/tjfontaine/node-path-platform", - "bugs": { - "url": "http://github.com/tjfontaine/node-path-platform/issues" - }, - "repository": { - "type": "git", - "url": "http://github.com/tjfontaine/node-path-platform.git" - }, - "main": "path.js", - "engines": { - "node": ">= 0.8.0" - }, - "gitHead": "901e4d8a69ed3906bbbec5f65e9b7eec6d033474", - "_id": "path-platform@0.11.15", - "scripts": {}, - "_shasum": "e864217f74c36850f0852b78dc7bf7d4a5721bf2", - "_from": "path-platform@>=0.11.15 <0.12.0", - "_npmVersion": "1.4.28", - "_npmUser": { - "name": "tjfontaine", - "email": "tjfontaine@gmail.com" - }, - "maintainers": [ - { - "name": "tjfontaine", - "email": "tjfontaine@gmail.com" - } - ], - "dist": { - "shasum": "e864217f74c36850f0852b78dc7bf7d4a5721bf2", - "tarball": "https://registry.npmjs.org/path-platform/-/path-platform-0.11.15.tgz" - }, - "directories": {}, - "_resolved": "https://registry.npmjs.org/path-platform/-/path-platform-0.11.15.tgz", - "readme": "ERROR: No README data found!" -} diff --git a/node_modules/browserify/node_modules/parents/node_modules/path-platform/path.js b/node_modules/browserify/node_modules/parents/node_modules/path-platform/path.js deleted file mode 100644 index 0a7a7075..00000000 --- a/node_modules/browserify/node_modules/parents/node_modules/path-platform/path.js +++ /dev/null @@ -1,643 +0,0 @@ -// Copyright Joyent, Inc. and other Node contributors. -// -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to permit -// persons to whom the Software is furnished to do so, subject to the -// following conditions: -// -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -// USE OR OTHER DEALINGS IN THE SOFTWARE. - - -var isWindows = process.platform === 'win32'; -var util = require('util'); - -var _path = require('path'); - -// we are new enough we already have this from the system, just export the -// system then -if (_path.posix) { - module.exports = _path; - return; -} - -// resolves . and .. elements in a path array with directory names there -// must be no slashes or device names (c:\) in the array -// (so also no leading and trailing slashes - it does not distinguish -// relative and absolute paths) -function normalizeArray(parts, allowAboveRoot) { - var res = []; - for (var i = 0; i < parts.length; i++) { - var p = parts[i]; - - // ignore empty parts - if (!p || p === '.') - continue; - - if (p === '..') { - if (res.length && res[res.length - 1] !== '..') { - res.pop(); - } else if (allowAboveRoot) { - res.push('..'); - } - } else { - res.push(p); - } - } - - return res; -} - -// Regex to split a windows path into three parts: [*, device, slash, -// tail] windows-only -var splitDeviceRe = - /^([a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/]+[^\\\/]+)?([\\\/])?([\s\S]*?)$/; - -// Regex to split the tail part of the above into [*, dir, basename, ext] -var splitTailRe = - /^([\s\S]*?)((?:\.{1,2}|[^\\\/]+?|)(\.[^.\/\\]*|))(?:[\\\/]*)$/; - -var win32 = {}; - -// Function to split a filename into [root, dir, basename, ext] -function win32SplitPath(filename) { - // Separate device+slash from tail - var result = splitDeviceRe.exec(filename), - device = (result[1] || '') + (result[2] || ''), - tail = result[3] || ''; - // Split the tail into dir, basename and extension - var result2 = splitTailRe.exec(tail), - dir = result2[1], - basename = result2[2], - ext = result2[3]; - return [device, dir, basename, ext]; -} - -var normalizeUNCRoot = function(device) { - return '\\\\' + device.replace(/^[\\\/]+/, '').replace(/[\\\/]+/g, '\\'); -}; - -// path.resolve([from ...], to) -win32.resolve = function() { - var resolvedDevice = '', - resolvedTail = '', - resolvedAbsolute = false; - - for (var i = arguments.length - 1; i >= -1; i--) { - var path; - if (i >= 0) { - path = arguments[i]; - } else if (!resolvedDevice) { - path = process.cwd(); - } else { - // Windows has the concept of drive-specific current working - // directories. If we've resolved a drive letter but not yet an - // absolute path, get cwd for that drive. We're sure the device is not - // an unc path at this points, because unc paths are always absolute. - path = process.env['=' + resolvedDevice]; - // Verify that a drive-local cwd was found and that it actually points - // to our drive. If not, default to the drive's root. - if (!path || path.substr(0, 3).toLowerCase() !== - resolvedDevice.toLowerCase() + '\\') { - path = resolvedDevice + '\\'; - } - } - - // Skip empty and invalid entries - if (!util.isString(path)) { - throw new TypeError('Arguments to path.resolve must be strings'); - } else if (!path) { - continue; - } - - var result = splitDeviceRe.exec(path), - device = result[1] || '', - isUnc = device && device.charAt(1) !== ':', - isAbsolute = win32.isAbsolute(path), - tail = result[3]; - - if (device && - resolvedDevice && - device.toLowerCase() !== resolvedDevice.toLowerCase()) { - // This path points to another device so it is not applicable - continue; - } - - if (!resolvedDevice) { - resolvedDevice = device; - } - if (!resolvedAbsolute) { - resolvedTail = tail + '\\' + resolvedTail; - resolvedAbsolute = isAbsolute; - } - - if (resolvedDevice && resolvedAbsolute) { - break; - } - } - - // Convert slashes to backslashes when `resolvedDevice` points to an UNC - // root. Also squash multiple slashes into a single one where appropriate. - if (isUnc) { - resolvedDevice = normalizeUNCRoot(resolvedDevice); - } - - // At this point the path should be resolved to a full absolute path, - // but handle relative paths to be safe (might happen when process.cwd() - // fails) - - // Normalize the tail path - resolvedTail = normalizeArray(resolvedTail.split(/[\\\/]+/), - !resolvedAbsolute).join('\\'); - - // If device is a drive letter, we'll normalize to lower case. - if (resolvedDevice && resolvedDevice.charAt(1) === ':') { - resolvedDevice = resolvedDevice[0].toLowerCase() + - resolvedDevice.substr(1); - } - - return (resolvedDevice + (resolvedAbsolute ? '\\' : '') + resolvedTail) || - '.'; -}; - - -win32.normalize = function(path) { - var result = splitDeviceRe.exec(path), - device = result[1] || '', - isUnc = device && device.charAt(1) !== ':', - isAbsolute = win32.isAbsolute(path), - tail = result[3], - trailingSlash = /[\\\/]$/.test(tail); - - // If device is a drive letter, we'll normalize to lower case. - if (device && device.charAt(1) === ':') { - device = device[0].toLowerCase() + device.substr(1); - } - - // Normalize the tail path - tail = normalizeArray(tail.split(/[\\\/]+/), !isAbsolute).join('\\'); - - if (!tail && !isAbsolute) { - tail = '.'; - } - if (tail && trailingSlash) { - tail += '\\'; - } - - // Convert slashes to backslashes when `device` points to an UNC root. - // Also squash multiple slashes into a single one where appropriate. - if (isUnc) { - device = normalizeUNCRoot(device); - } - - return device + (isAbsolute ? '\\' : '') + tail; -}; - - -win32.isAbsolute = function(path) { - var result = splitDeviceRe.exec(path), - device = result[1] || '', - isUnc = !!device && device.charAt(1) !== ':'; - // UNC paths are always absolute - return !!result[2] || isUnc; -}; - -win32.join = function() { - function f(p) { - if (!util.isString(p)) { - throw new TypeError('Arguments to path.join must be strings'); - } - return p; - } - - var paths = Array.prototype.filter.call(arguments, f); - var joined = paths.join('\\'); - - // Make sure that the joined path doesn't start with two slashes, because - // normalize() will mistake it for an UNC path then. - // - // This step is skipped when it is very clear that the user actually - // intended to point at an UNC path. This is assumed when the first - // non-empty string arguments starts with exactly two slashes followed by - // at least one more non-slash character. - // - // Note that for normalize() to treat a path as an UNC path it needs to - // have at least 2 components, so we don't filter for that here. - // This means that the user can use join to construct UNC paths from - // a server name and a share name; for example: - // path.join('//server', 'share') -> '\\\\server\\share\') - if (!/^[\\\/]{2}[^\\\/]/.test(paths[0])) { - joined = joined.replace(/^[\\\/]{2,}/, '\\'); - } - - return win32.normalize(joined); -}; - - -// path.relative(from, to) -// it will solve the relative path from 'from' to 'to', for instance: -// from = 'C:\\orandea\\test\\aaa' -// to = 'C:\\orandea\\impl\\bbb' -// The output of the function should be: '..\\..\\impl\\bbb' -win32.relative = function(from, to) { - from = win32.resolve(from); - to = win32.resolve(to); - - // windows is not case sensitive - var lowerFrom = from.toLowerCase(); - var lowerTo = to.toLowerCase(); - - function trim(arr) { - var start = 0; - for (; start < arr.length; start++) { - if (arr[start] !== '') break; - } - - var end = arr.length - 1; - for (; end >= 0; end--) { - if (arr[end] !== '') break; - } - - if (start > end) return []; - return arr.slice(start, end + 1); - } - - var toParts = trim(to.split('\\')); - - var lowerFromParts = trim(lowerFrom.split('\\')); - var lowerToParts = trim(lowerTo.split('\\')); - - var length = Math.min(lowerFromParts.length, lowerToParts.length); - var samePartsLength = length; - for (var i = 0; i < length; i++) { - if (lowerFromParts[i] !== lowerToParts[i]) { - samePartsLength = i; - break; - } - } - - if (samePartsLength == 0) { - return to; - } - - var outputParts = []; - for (var i = samePartsLength; i < lowerFromParts.length; i++) { - outputParts.push('..'); - } - - outputParts = outputParts.concat(toParts.slice(samePartsLength)); - - return outputParts.join('\\'); -}; - - -win32._makeLong = function(path) { - // Note: this will *probably* throw somewhere. - if (!util.isString(path)) - return path; - - if (!path) { - return ''; - } - - var resolvedPath = win32.resolve(path); - - if (/^[a-zA-Z]\:\\/.test(resolvedPath)) { - // path is local filesystem path, which needs to be converted - // to long UNC path. - return '\\\\?\\' + resolvedPath; - } else if (/^\\\\[^?.]/.test(resolvedPath)) { - // path is network UNC path, which needs to be converted - // to long UNC path. - return '\\\\?\\UNC\\' + resolvedPath.substring(2); - } - - return path; -}; - - -win32.dirname = function(path) { - var result = win32SplitPath(path), - root = result[0], - dir = result[1]; - - if (!root && !dir) { - // No dirname whatsoever - return '.'; - } - - if (dir) { - // It has a dirname, strip trailing slash - dir = dir.substr(0, dir.length - 1); - } - - return root + dir; -}; - - -win32.basename = function(path, ext) { - var f = win32SplitPath(path)[2]; - // TODO: make this comparison case-insensitive on windows? - if (ext && f.substr(-1 * ext.length) === ext) { - f = f.substr(0, f.length - ext.length); - } - return f; -}; - - -win32.extname = function(path) { - return win32SplitPath(path)[3]; -}; - - -win32.format = function(pathObject) { - if (!util.isObject(pathObject)) { - throw new TypeError( - "Parameter 'pathObject' must be an object, not " + typeof pathObject - ); - } - - var root = pathObject.root || ''; - - if (!util.isString(root)) { - throw new TypeError( - "'pathObject.root' must be a string or undefined, not " + - typeof pathObject.root - ); - } - - var dir = pathObject.dir; - var base = pathObject.base || ''; - if (dir.slice(dir.length - 1, dir.length) === win32.sep) { - return dir + base; - } - - if (dir) { - return dir + win32.sep + base; - } - - return base; -}; - - -win32.parse = function(pathString) { - if (!util.isString(pathString)) { - throw new TypeError( - "Parameter 'pathString' must be a string, not " + typeof pathString - ); - } - var allParts = win32SplitPath(pathString); - if (!allParts || allParts.length !== 4) { - throw new TypeError("Invalid path '" + pathString + "'"); - } - return { - root: allParts[0], - dir: allParts[0] + allParts[1].slice(0, allParts[1].length - 1), - base: allParts[2], - ext: allParts[3], - name: allParts[2].slice(0, allParts[2].length - allParts[3].length) - }; -}; - - -win32.sep = '\\'; -win32.delimiter = ';'; - - -// Split a filename into [root, dir, basename, ext], unix version -// 'root' is just a slash, or nothing. -var splitPathRe = - /^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/; -var posix = {}; - - -function posixSplitPath(filename) { - return splitPathRe.exec(filename).slice(1); -} - - -// path.resolve([from ...], to) -// posix version -posix.resolve = function() { - var resolvedPath = '', - resolvedAbsolute = false; - - for (var i = arguments.length - 1; i >= -1 && !resolvedAbsolute; i--) { - var path = (i >= 0) ? arguments[i] : process.cwd(); - - // Skip empty and invalid entries - if (!util.isString(path)) { - throw new TypeError('Arguments to path.resolve must be strings'); - } else if (!path) { - continue; - } - - resolvedPath = path + '/' + resolvedPath; - resolvedAbsolute = path.charAt(0) === '/'; - } - - // At this point the path should be resolved to a full absolute path, but - // handle relative paths to be safe (might happen when process.cwd() fails) - - // Normalize the path - resolvedPath = normalizeArray(resolvedPath.split('/'), - !resolvedAbsolute).join('/'); - - return ((resolvedAbsolute ? '/' : '') + resolvedPath) || '.'; -}; - -// path.normalize(path) -// posix version -posix.normalize = function(path) { - var isAbsolute = posix.isAbsolute(path), - trailingSlash = path.substr(-1) === '/'; - - // Normalize the path - path = normalizeArray(path.split('/'), !isAbsolute).join('/'); - - if (!path && !isAbsolute) { - path = '.'; - } - if (path && trailingSlash) { - path += '/'; - } - - return (isAbsolute ? '/' : '') + path; -}; - -// posix version -posix.isAbsolute = function(path) { - return path.charAt(0) === '/'; -}; - -// posix version -posix.join = function() { - var path = ''; - for (var i = 0; i < arguments.length; i++) { - var segment = arguments[i]; - if (!util.isString(segment)) { - throw new TypeError('Arguments to path.join must be strings'); - } - if (segment) { - if (!path) { - path += segment; - } else { - path += '/' + segment; - } - } - } - return posix.normalize(path); -}; - - -// path.relative(from, to) -// posix version -posix.relative = function(from, to) { - from = posix.resolve(from).substr(1); - to = posix.resolve(to).substr(1); - - function trim(arr) { - var start = 0; - for (; start < arr.length; start++) { - if (arr[start] !== '') break; - } - - var end = arr.length - 1; - for (; end >= 0; end--) { - if (arr[end] !== '') break; - } - - if (start > end) return []; - return arr.slice(start, end + 1); - } - - var fromParts = trim(from.split('/')); - var toParts = trim(to.split('/')); - - var length = Math.min(fromParts.length, toParts.length); - var samePartsLength = length; - for (var i = 0; i < length; i++) { - if (fromParts[i] !== toParts[i]) { - samePartsLength = i; - break; - } - } - - var outputParts = []; - for (var i = samePartsLength; i < fromParts.length; i++) { - outputParts.push('..'); - } - - outputParts = outputParts.concat(toParts.slice(samePartsLength)); - - return outputParts.join('/'); -}; - - -posix._makeLong = function(path) { - return path; -}; - - -posix.dirname = function(path) { - var result = posixSplitPath(path), - root = result[0], - dir = result[1]; - - if (!root && !dir) { - // No dirname whatsoever - return '.'; - } - - if (dir) { - // It has a dirname, strip trailing slash - dir = dir.substr(0, dir.length - 1); - } - - return root + dir; -}; - - -posix.basename = function(path, ext) { - var f = posixSplitPath(path)[2]; - // TODO: make this comparison case-insensitive on windows? - if (ext && f.substr(-1 * ext.length) === ext) { - f = f.substr(0, f.length - ext.length); - } - return f; -}; - - -posix.extname = function(path) { - return posixSplitPath(path)[3]; -}; - - -posix.format = function(pathObject) { - if (!util.isObject(pathObject)) { - throw new TypeError( - "Parameter 'pathObject' must be an object, not " + typeof pathObject - ); - } - - var root = pathObject.root || ''; - - if (!util.isString(root)) { - throw new TypeError( - "'pathObject.root' must be a string or undefined, not " + - typeof pathObject.root - ); - } - - var dir = pathObject.dir ? pathObject.dir + posix.sep : ''; - var base = pathObject.base || ''; - return dir + base; -}; - - -posix.parse = function(pathString) { - if (!util.isString(pathString)) { - throw new TypeError( - "Parameter 'pathString' must be a string, not " + typeof pathString - ); - } - var allParts = posixSplitPath(pathString); - if (!allParts || allParts.length !== 4) { - throw new TypeError("Invalid path '" + pathString + "'"); - } - allParts[1] = allParts[1] || ''; - allParts[2] = allParts[2] || ''; - allParts[3] = allParts[3] || ''; - - return { - root: allParts[0], - dir: allParts[0] + allParts[1].slice(0, allParts[1].length - 1), - base: allParts[2], - ext: allParts[3], - name: allParts[2].slice(0, allParts[2].length - allParts[3].length) - }; -}; - - -posix.sep = '/'; -posix.delimiter = ':'; - - -if (isWindows) - module.exports = win32; -else /* posix */ - module.exports = posix; - -module.exports.posix = posix; -module.exports.win32 = win32; diff --git a/node_modules/browserify/node_modules/parents/package.json b/node_modules/browserify/node_modules/parents/package.json deleted file mode 100644 index 38271124..00000000 --- a/node_modules/browserify/node_modules/parents/package.json +++ /dev/null @@ -1,65 +0,0 @@ -{ - "name": "parents", - "version": "1.0.1", - "description": "return all the parent directories for a directory", - "main": "index.js", - "bin": {}, - "directories": { - "example": "example", - "test": "test" - }, - "dependencies": { - "path-platform": "~0.11.15" - }, - "devDependencies": { - "tap": "~0.2.5" - }, - "scripts": { - "test": "tap test/*.js" - }, - "repository": { - "type": "git", - "url": "git://github.com/substack/node-parents.git" - }, - "homepage": "https://github.com/substack/node-parents", - "keywords": [ - "directory", - "parent", - "path", - "tree" - ], - "author": { - "name": "James Halliday", - "email": "mail@substack.net", - "url": "http://substack.net" - }, - "license": "MIT", - "engine": { - "node": ">=0.6" - }, - "gitHead": "1a90e0b70695f08e3eab32be2f1a867b4bbe6880", - "bugs": { - "url": "https://github.com/substack/node-parents/issues" - }, - "_id": "parents@1.0.1", - "_shasum": "fedd4d2bf193a77745fe71e371d73c3307d9c751", - "_from": "parents@>=1.0.1 <2.0.0", - "_npmVersion": "2.1.16", - "_nodeVersion": "0.10.35", - "_npmUser": { - "name": "substack", - "email": "mail@substack.net" - }, - "maintainers": [ - { - "name": "substack", - "email": "mail@substack.net" - } - ], - "dist": { - "shasum": "fedd4d2bf193a77745fe71e371d73c3307d9c751", - "tarball": "https://registry.npmjs.org/parents/-/parents-1.0.1.tgz" - }, - "_resolved": "https://registry.npmjs.org/parents/-/parents-1.0.1.tgz", - "readme": "ERROR: No README data found!" -} diff --git a/node_modules/browserify/node_modules/parents/readme.markdown b/node_modules/browserify/node_modules/parents/readme.markdown deleted file mode 100644 index fe3bc1f0..00000000 --- a/node_modules/browserify/node_modules/parents/readme.markdown +++ /dev/null @@ -1,75 +0,0 @@ -# parents - -Return all the parent directories of a directory, inclusive of that directory. - -[![build status](https://secure.travis-ci.org/substack/node-parents.png)](http://travis-ci.org/substack/node-parents) - -# example - -## dirname - -``` js -var parents = require('parents'); -var dirs = parents(__dirname); -console.dir(dirs); -``` - -*** - -``` -[ '/home/substack/projects/node-parents/example', - '/home/substack/projects/node-parents', - '/home/substack/projects', - '/home/substack', - '/home', - '/' ] -``` - -## win32 - -``` js -var parents = require('parents'); -var dir = 'C:\\Program Files\\Maxis\\Sim City 2000\\cities'; - -var dirs = parents(dir, { platform : 'win32' }); -console.dir(dirs); -``` - -*** - -``` -[ 'C:\\Program Files\\Maxis\\Sim City 2000\\cities', - 'C:\\Program Files\\Maxis\\Sim City 2000', - 'C:\\Program Files\\Maxis', - 'C:\\Program Files', - 'C:' ] -``` - -# methods - -``` js -var parents = require('parents') -``` - -## parents(dir, opts) - -Return an array of the parent directories of `dir`, including and starting with -`dir`. If a `dir` isn't specified, `process.cwd()` will be used. - -Optionally specify an `opts.platform` to control whether the separator and paths -works the unixy way with `'/'` or the windowsy way where sometimes things use -`'/'` and sometimes they use `'\\'` and also there are leading drive letters and -other exotic features. If `opts.platform` isn't specified, `process.platform` -will be used. Anything that matches `/^win/` will use the windowsy behavior. - -# install - -With [npm](http://npmjs.org) do: - -``` -npm install parents -``` - -# licence - -MIT diff --git a/node_modules/browserify/node_modules/parents/test/dirname.js b/node_modules/browserify/node_modules/parents/test/dirname.js deleted file mode 100644 index 317d131c..00000000 --- a/node_modules/browserify/node_modules/parents/test/dirname.js +++ /dev/null @@ -1,20 +0,0 @@ -var test = require('tap').test; -var parents = require('../'); - -test('dirname', function (t) { - var dirs = parents('/foo/bar/baz/quux'); - t.same(dirs, [ - '/foo/bar/baz/quux', - '/foo/bar/baz', - '/foo/bar', - '/foo', - '/', - ]); - t.end(); -}); - -test('root', function (t) { - var dirs = parents('/'); - t.same(dirs, [ '/' ]); - t.end(); -}); diff --git a/node_modules/browserify/node_modules/parents/test/win32.js b/node_modules/browserify/node_modules/parents/test/win32.js deleted file mode 100644 index c6f2ece8..00000000 --- a/node_modules/browserify/node_modules/parents/test/win32.js +++ /dev/null @@ -1,34 +0,0 @@ -var test = require('tap').test; -var parents = require('../'); - -test('win32', function (t) { - var dir = 'c:\\Program Files\\Maxis\\Sim City 2000\\cities'; - var dirs = parents(dir, { platform : 'win32' }); - t.same(dirs, [ - 'c:\\Program Files\\Maxis\\Sim City 2000\\cities', - 'c:\\Program Files\\Maxis\\Sim City 2000', - 'c:\\Program Files\\Maxis', - 'c:\\Program Files', - 'c:', - ]); - t.end(); -}); - -test('win32 c:', function (t) { - var dirs = parents('c:\\', { platform : 'win32' }); - t.same(dirs, [ 'c:' ]); - t.end(); -}); - -test('win32 network drive', function (t) { - var dirs = parents( - '\\storageserver01\\Active Projects\\ProjectA', - { platform : 'win32' } - ); - t.same(dirs, [ - '\\storageserver01\\Active Projects\\ProjectA', - '\\storageserver01\\Active Projects', - '\\storageserver01' - ]); - t.end(); -}); diff --git a/node_modules/browserify/node_modules/path-browserify/LICENSE b/node_modules/browserify/node_modules/path-browserify/LICENSE deleted file mode 100644 index ee27ba4b..00000000 --- a/node_modules/browserify/node_modules/path-browserify/LICENSE +++ /dev/null @@ -1,18 +0,0 @@ -This software is released under the MIT license: - -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/node_modules/browserify/node_modules/path-browserify/index.js b/node_modules/browserify/node_modules/path-browserify/index.js deleted file mode 100644 index 285e32d7..00000000 --- a/node_modules/browserify/node_modules/path-browserify/index.js +++ /dev/null @@ -1,224 +0,0 @@ -// Copyright Joyent, Inc. and other Node contributors. -// -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to permit -// persons to whom the Software is furnished to do so, subject to the -// following conditions: -// -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -// USE OR OTHER DEALINGS IN THE SOFTWARE. - -// resolves . and .. elements in a path array with directory names there -// must be no slashes, empty elements, or device names (c:\) in the array -// (so also no leading and trailing slashes - it does not distinguish -// relative and absolute paths) -function normalizeArray(parts, allowAboveRoot) { - // if the path tries to go above the root, `up` ends up > 0 - var up = 0; - for (var i = parts.length - 1; i >= 0; i--) { - var last = parts[i]; - if (last === '.') { - parts.splice(i, 1); - } else if (last === '..') { - parts.splice(i, 1); - up++; - } else if (up) { - parts.splice(i, 1); - up--; - } - } - - // if the path is allowed to go above the root, restore leading ..s - if (allowAboveRoot) { - for (; up--; up) { - parts.unshift('..'); - } - } - - return parts; -} - -// Split a filename into [root, dir, basename, ext], unix version -// 'root' is just a slash, or nothing. -var splitPathRe = - /^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/; -var splitPath = function(filename) { - return splitPathRe.exec(filename).slice(1); -}; - -// path.resolve([from ...], to) -// posix version -exports.resolve = function() { - var resolvedPath = '', - resolvedAbsolute = false; - - for (var i = arguments.length - 1; i >= -1 && !resolvedAbsolute; i--) { - var path = (i >= 0) ? arguments[i] : process.cwd(); - - // Skip empty and invalid entries - if (typeof path !== 'string') { - throw new TypeError('Arguments to path.resolve must be strings'); - } else if (!path) { - continue; - } - - resolvedPath = path + '/' + resolvedPath; - resolvedAbsolute = path.charAt(0) === '/'; - } - - // At this point the path should be resolved to a full absolute path, but - // handle relative paths to be safe (might happen when process.cwd() fails) - - // Normalize the path - resolvedPath = normalizeArray(filter(resolvedPath.split('/'), function(p) { - return !!p; - }), !resolvedAbsolute).join('/'); - - return ((resolvedAbsolute ? '/' : '') + resolvedPath) || '.'; -}; - -// path.normalize(path) -// posix version -exports.normalize = function(path) { - var isAbsolute = exports.isAbsolute(path), - trailingSlash = substr(path, -1) === '/'; - - // Normalize the path - path = normalizeArray(filter(path.split('/'), function(p) { - return !!p; - }), !isAbsolute).join('/'); - - if (!path && !isAbsolute) { - path = '.'; - } - if (path && trailingSlash) { - path += '/'; - } - - return (isAbsolute ? '/' : '') + path; -}; - -// posix version -exports.isAbsolute = function(path) { - return path.charAt(0) === '/'; -}; - -// posix version -exports.join = function() { - var paths = Array.prototype.slice.call(arguments, 0); - return exports.normalize(filter(paths, function(p, index) { - if (typeof p !== 'string') { - throw new TypeError('Arguments to path.join must be strings'); - } - return p; - }).join('/')); -}; - - -// path.relative(from, to) -// posix version -exports.relative = function(from, to) { - from = exports.resolve(from).substr(1); - to = exports.resolve(to).substr(1); - - function trim(arr) { - var start = 0; - for (; start < arr.length; start++) { - if (arr[start] !== '') break; - } - - var end = arr.length - 1; - for (; end >= 0; end--) { - if (arr[end] !== '') break; - } - - if (start > end) return []; - return arr.slice(start, end - start + 1); - } - - var fromParts = trim(from.split('/')); - var toParts = trim(to.split('/')); - - var length = Math.min(fromParts.length, toParts.length); - var samePartsLength = length; - for (var i = 0; i < length; i++) { - if (fromParts[i] !== toParts[i]) { - samePartsLength = i; - break; - } - } - - var outputParts = []; - for (var i = samePartsLength; i < fromParts.length; i++) { - outputParts.push('..'); - } - - outputParts = outputParts.concat(toParts.slice(samePartsLength)); - - return outputParts.join('/'); -}; - -exports.sep = '/'; -exports.delimiter = ':'; - -exports.dirname = function(path) { - var result = splitPath(path), - root = result[0], - dir = result[1]; - - if (!root && !dir) { - // No dirname whatsoever - return '.'; - } - - if (dir) { - // It has a dirname, strip trailing slash - dir = dir.substr(0, dir.length - 1); - } - - return root + dir; -}; - - -exports.basename = function(path, ext) { - var f = splitPath(path)[2]; - // TODO: make this comparison case-insensitive on windows? - if (ext && f.substr(-1 * ext.length) === ext) { - f = f.substr(0, f.length - ext.length); - } - return f; -}; - - -exports.extname = function(path) { - return splitPath(path)[3]; -}; - -function filter (xs, f) { - if (xs.filter) return xs.filter(f); - var res = []; - for (var i = 0; i < xs.length; i++) { - if (f(xs[i], i, xs)) res.push(xs[i]); - } - return res; -} - -// String.prototype.substr - negative index don't work in IE8 -var substr = 'ab'.substr(-1) === 'b' - ? function (str, start, len) { return str.substr(start, len) } - : function (str, start, len) { - if (start < 0) start = str.length + start; - return str.substr(start, len); - } -; diff --git a/node_modules/browserify/node_modules/path-browserify/package.json b/node_modules/browserify/node_modules/path-browserify/package.json deleted file mode 100644 index 1ea6f4c2..00000000 --- a/node_modules/browserify/node_modules/path-browserify/package.json +++ /dev/null @@ -1,53 +0,0 @@ -{ - "name": "path-browserify", - "version": "0.0.0", - "description": "the path module from node core for browsers", - "main": "index.js", - "dependencies": {}, - "devDependencies": { - "tape": "~1.0.4" - }, - "scripts": { - "test": "tape test/*.js" - }, - "repository": { - "type": "git", - "url": "git://github.com/substack/path-browserify.git" - }, - "homepage": "https://github.com/substack/path-browserify", - "keywords": [ - "path", - "browser", - "browserify" - ], - "author": { - "name": "James Halliday", - "email": "mail@substack.net", - "url": "http://substack.net" - }, - "license": "MIT", - "bugs": { - "url": "https://github.com/substack/path-browserify/issues" - }, - "_id": "path-browserify@0.0.0", - "dist": { - "shasum": "a0b870729aae214005b7d5032ec2cbbb0fb4451a", - "tarball": "https://registry.npmjs.org/path-browserify/-/path-browserify-0.0.0.tgz" - }, - "_from": "path-browserify@>=0.0.0 <0.1.0", - "_npmVersion": "1.3.14", - "_npmUser": { - "name": "substack", - "email": "mail@substack.net" - }, - "maintainers": [ - { - "name": "substack", - "email": "mail@substack.net" - } - ], - "directories": {}, - "_shasum": "a0b870729aae214005b7d5032ec2cbbb0fb4451a", - "_resolved": "https://registry.npmjs.org/path-browserify/-/path-browserify-0.0.0.tgz", - "readme": "ERROR: No README data found!" -} diff --git a/node_modules/browserify/node_modules/path-browserify/readme.markdown b/node_modules/browserify/node_modules/path-browserify/readme.markdown deleted file mode 100644 index 8ae1dd89..00000000 --- a/node_modules/browserify/node_modules/path-browserify/readme.markdown +++ /dev/null @@ -1,3 +0,0 @@ -# path-browserify - -the path module from node core for browsers diff --git a/node_modules/browserify/node_modules/process/.eslintrc b/node_modules/browserify/node_modules/process/.eslintrc deleted file mode 100644 index 1e7aab73..00000000 --- a/node_modules/browserify/node_modules/process/.eslintrc +++ /dev/null @@ -1,21 +0,0 @@ -{ -extends: "eslint:recommended", - "env": { - "node": true, - "browser": true, - "es6" : true, - "mocha": true - }, - "rules": { - "indent": [2, 4], - "brace-style": [2, "1tbs"], - "quotes": [2, "single"], - "no-console": 0, - "no-shadow": 0, - "no-use-before-define": [2, "nofunc"], - "no-underscore-dangle": 0, - "no-constant-condition": 0, - "space-after-function-name": 0, - "consistent-return": 0 - } -} diff --git a/node_modules/browserify/node_modules/process/LICENSE b/node_modules/browserify/node_modules/process/LICENSE deleted file mode 100644 index b8c1246c..00000000 --- a/node_modules/browserify/node_modules/process/LICENSE +++ /dev/null @@ -1,22 +0,0 @@ -(The MIT License) - -Copyright (c) 2013 Roman Shtylman - -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/node_modules/browserify/node_modules/process/README.md b/node_modules/browserify/node_modules/process/README.md deleted file mode 100644 index 6570729b..00000000 --- a/node_modules/browserify/node_modules/process/README.md +++ /dev/null @@ -1,26 +0,0 @@ -# process - -```require('process');``` just like any other module. - -Works in node.js and browsers via the browser.js shim provided with the module. - -## browser implementation - -The goal of this module is not to be a full-fledged alternative to the builtin process module. This module mostly exists to provide the nextTick functionality and little more. We keep this module lean because it will often be included by default by tools like browserify when it detects a module has used the `process` global. - -It also exposes a "browser" member (i.e. `process.browser`) which is `true` in this implementation but `undefined` in node. This can be used in isomorphic code that adjusts it's behavior depending on which environment it's running in. - -If you are looking to provide other process methods, I suggest you monkey patch them onto the process global in your app. A list of user created patches is below. - -* [hrtime](https://github.com/kumavis/browser-process-hrtime) -* [stdout](https://github.com/kumavis/browser-stdout) - -## package manager notes - -If you are writing a bundler to package modules for client side use, make sure you use the ```browser``` field hint in package.json. - -See https://gist.github.com/4339901 for details. - -The [browserify](https://github.com/substack/node-browserify) module will properly handle this field when bundling your files. - - diff --git a/node_modules/browserify/node_modules/process/browser.js b/node_modules/browserify/node_modules/process/browser.js deleted file mode 100644 index d3e30e9b..00000000 --- a/node_modules/browserify/node_modules/process/browser.js +++ /dev/null @@ -1,180 +0,0 @@ -// shim for using process in browser -var process = module.exports = {}; - -// cached from whatever global is present so that test runners that stub it -// don't break things. But we need to wrap it in a try catch in case it is -// wrapped in strict mode code which doesn't define any globals. It's inside a -// function because try/catches deoptimize in certain engines. - -var cachedSetTimeout; -var cachedClearTimeout; - -function defaultSetTimout() { - throw new Error('setTimeout has not been defined'); -} -function defaultClearTimeout () { - throw new Error('clearTimeout has not been defined'); -} -(function () { - try { - if (typeof setTimeout === 'function') { - cachedSetTimeout = setTimeout; - } else { - cachedSetTimeout = defaultSetTimout; - } - } catch (e) { - cachedSetTimeout = defaultSetTimout; - } - try { - if (typeof clearTimeout === 'function') { - cachedClearTimeout = clearTimeout; - } else { - cachedClearTimeout = defaultClearTimeout; - } - } catch (e) { - cachedClearTimeout = defaultClearTimeout; - } -} ()) -function runTimeout(fun) { - if (cachedSetTimeout === setTimeout) { - //normal enviroments in sane situations - return setTimeout(fun, 0); - } - // if setTimeout wasn't available but was latter defined - if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) { - cachedSetTimeout = setTimeout; - return setTimeout(fun, 0); - } - try { - // when when somebody has screwed with setTimeout but no I.E. maddness - return cachedSetTimeout(fun, 0); - } catch(e){ - try { - // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally - return cachedSetTimeout.call(null, fun, 0); - } catch(e){ - // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error - return cachedSetTimeout.call(this, fun, 0); - } - } - - -} -function runClearTimeout(marker) { - if (cachedClearTimeout === clearTimeout) { - //normal enviroments in sane situations - return clearTimeout(marker); - } - // if clearTimeout wasn't available but was latter defined - if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) { - cachedClearTimeout = clearTimeout; - return clearTimeout(marker); - } - try { - // when when somebody has screwed with setTimeout but no I.E. maddness - return cachedClearTimeout(marker); - } catch (e){ - try { - // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally - return cachedClearTimeout.call(null, marker); - } catch (e){ - // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error. - // Some versions of I.E. have different rules for clearTimeout vs setTimeout - return cachedClearTimeout.call(this, marker); - } - } - - - -} -var queue = []; -var draining = false; -var currentQueue; -var queueIndex = -1; - -function cleanUpNextTick() { - if (!draining || !currentQueue) { - return; - } - draining = false; - if (currentQueue.length) { - queue = currentQueue.concat(queue); - } else { - queueIndex = -1; - } - if (queue.length) { - drainQueue(); - } -} - -function drainQueue() { - if (draining) { - return; - } - var timeout = runTimeout(cleanUpNextTick); - draining = true; - - var len = queue.length; - while(len) { - currentQueue = queue; - queue = []; - while (++queueIndex < len) { - if (currentQueue) { - currentQueue[queueIndex].run(); - } - } - queueIndex = -1; - len = queue.length; - } - currentQueue = null; - draining = false; - runClearTimeout(timeout); -} - -process.nextTick = function (fun) { - var args = new Array(arguments.length - 1); - if (arguments.length > 1) { - for (var i = 1; i < arguments.length; i++) { - args[i - 1] = arguments[i]; - } - } - queue.push(new Item(fun, args)); - if (queue.length === 1 && !draining) { - runTimeout(drainQueue); - } -}; - -// v8 likes predictible objects -function Item(fun, array) { - this.fun = fun; - this.array = array; -} -Item.prototype.run = function () { - this.fun.apply(null, this.array); -}; -process.title = 'browser'; -process.browser = true; -process.env = {}; -process.argv = []; -process.version = ''; // empty string to avoid regexp issues -process.versions = {}; - -function noop() {} - -process.on = noop; -process.addListener = noop; -process.once = noop; -process.off = noop; -process.removeListener = noop; -process.removeAllListeners = noop; -process.emit = noop; - -process.binding = function (name) { - throw new Error('process.binding is not supported'); -}; - -process.cwd = function () { return '/' }; -process.chdir = function (dir) { - throw new Error('process.chdir is not supported'); -}; -process.umask = function() { return 0; }; diff --git a/node_modules/browserify/node_modules/process/index.js b/node_modules/browserify/node_modules/process/index.js deleted file mode 100644 index 8d8ed7df..00000000 --- a/node_modules/browserify/node_modules/process/index.js +++ /dev/null @@ -1,2 +0,0 @@ -// for now just expose the builtin process global from node.js -module.exports = global.process; diff --git a/node_modules/browserify/node_modules/process/package.json b/node_modules/browserify/node_modules/process/package.json deleted file mode 100644 index 2d63ca5f..00000000 --- a/node_modules/browserify/node_modules/process/package.json +++ /dev/null @@ -1,69 +0,0 @@ -{ - "author": { - "name": "Roman Shtylman", - "email": "shtylman@gmail.com" - }, - "name": "process", - "description": "process information for node.js and browsers", - "keywords": [ - "process" - ], - "scripts": { - "test": "mocha test.js", - "browser": "zuul --no-coverage --ui mocha-bdd --local 8080 -- test.js" - }, - "version": "0.11.9", - "repository": { - "type": "git", - "url": "git://github.com/shtylman/node-process.git" - }, - "license": "MIT", - "browser": "./browser.js", - "main": "./index.js", - "engines": { - "node": ">= 0.6.0" - }, - "devDependencies": { - "mocha": "2.2.1", - "zuul": "^3.10.3" - }, - "gitHead": "7d8c3702a8bbc43fa55f4bab74b150aef37001dd", - "bugs": { - "url": "https://github.com/shtylman/node-process/issues" - }, - "_id": "process@0.11.9", - "_shasum": "7bd5ad21aa6253e7da8682264f1e11d11c0318c1", - "_from": "process@>=0.11.0 <0.12.0", - "_npmVersion": "3.8.6", - "_nodeVersion": "5.12.0", - "_npmUser": { - "name": "cwmma", - "email": "calvin.metcalf@gmail.com" - }, - "dist": { - "shasum": "7bd5ad21aa6253e7da8682264f1e11d11c0318c1", - "tarball": "https://registry.npmjs.org/process/-/process-0.11.9.tgz" - }, - "maintainers": [ - { - "name": "coolaj86", - "email": "coolaj86@gmail.com" - }, - { - "name": "cwmma", - "email": "calvin.metcalf@gmail.com" - }, - { - "name": "defunctzombie", - "email": "shtylman@gmail.com" - } - ], - "_npmOperationalInternal": { - "host": "packages-16-east.internal.npmjs.com", - "tmp": "tmp/process-0.11.9.tgz_1472587751718_0.8843140550889075" - }, - "directories": {}, - "_resolved": "https://registry.npmjs.org/process/-/process-0.11.9.tgz", - "readme": "ERROR: No README data found!", - "homepage": "https://github.com/shtylman/node-process" -} diff --git a/node_modules/browserify/node_modules/process/test.js b/node_modules/browserify/node_modules/process/test.js deleted file mode 100644 index 8ba579c0..00000000 --- a/node_modules/browserify/node_modules/process/test.js +++ /dev/null @@ -1,199 +0,0 @@ -var assert = require('assert'); -var ourProcess = require('./browser'); -describe('test against our process', function () { - test(ourProcess); -}); -if (!process.browser) { - describe('test against node', function () { - test(process); - }); - vmtest(); -} -function test (ourProcess) { - describe('test arguments', function () { - it ('works', function (done) { - var order = 0; - - - ourProcess.nextTick(function (num) { - assert.equal(num, order++, 'first one works'); - ourProcess.nextTick(function (num) { - assert.equal(num, order++, 'recursive one is 4th'); - }, 3); - }, 0); - ourProcess.nextTick(function (num) { - assert.equal(num, order++, 'second one starts'); - ourProcess.nextTick(function (num) { - assert.equal(num, order++, 'this is third'); - ourProcess.nextTick(function (num) { - assert.equal(num, order++, 'this is last'); - done(); - }, 5); - }, 4); - }, 1); - ourProcess.nextTick(function (num) { - - assert.equal(num, order++, '3rd schedualed happens after the error'); - }, 2); - }); - }); -if (!process.browser) { - describe('test errors', function (t) { - it ('works', function (done) { - var order = 0; - process.removeAllListeners('uncaughtException'); - process.once('uncaughtException', function(err) { - assert.equal(2, order++, 'error is third'); - ourProcess.nextTick(function () { - assert.equal(5, order++, 'schedualed in error is last'); - done(); - }); - }); - ourProcess.nextTick(function () { - assert.equal(0, order++, 'first one works'); - ourProcess.nextTick(function () { - assert.equal(4, order++, 'recursive one is 4th'); - }); - }); - ourProcess.nextTick(function () { - assert.equal(1, order++, 'second one starts'); - throw(new Error('an error is thrown')); - }); - ourProcess.nextTick(function () { - assert.equal(3, order++, '3rd schedualed happens after the error'); - }); - }); - }); -} - describe('rename globals', function (t) { - var oldTimeout = setTimeout; - var oldClear = clearTimeout; - - it('clearTimeout', function (done){ - - var ok = true; - clearTimeout = function () { - ok = false; - } - var ran = false; - function cleanup() { - clearTimeout = oldClear; - var err; - try { - assert.ok(ok, 'fake clearTimeout ran'); - assert.ok(ran, 'should have run'); - } catch (e) { - err = e; - } - done(err); - } - setTimeout(cleanup, 1000); - ourProcess.nextTick(function () { - ran = true; - }); - }); - it('just setTimeout', function (done){ - - - setTimeout = function () { - setTimeout = oldTimeout; - try { - assert.ok(false, 'fake setTimeout called') - } catch (e) { - done(e); - } - - } - - ourProcess.nextTick(function () { - setTimeout = oldTimeout; - done(); - }); - }); - }); -} -function vmtest() { - var vm = require('vm'); - var fs = require('fs'); - var process = fs.readFileSync('./browser.js', {encoding: 'utf8'}); - - - describe('should work in vm in strict mode with no globals', function () { - it('should parse', function (done) { - var str = '"use strict";var module = {exports:{}};'; - str += process; - str += 'this.works = process.browser;'; - var script = new vm.Script(str); - var context = { - works: false - }; - script.runInNewContext(context); - assert.ok(context.works); - done(); - }); - it('setTimeout throws error', function (done) { - var str = '"use strict";var module = {exports:{}};'; - str += process; - str += 'try {process.nextTick(function () {})} catch (e){this.works = e;}'; - var script = new vm.Script(str); - var context = { - works: false - }; - script.runInNewContext(context); - assert.ok(context.works); - done(); - }); - it('should generally work', function (done) { - var str = '"use strict";var module = {exports:{}};'; - str += process; - str += 'process.nextTick(function () {assert.ok(true);done();})'; - var script = new vm.Script(str); - var context = { - clearTimeout: clearTimeout, - setTimeout: setTimeout, - done: done, - assert: assert - }; - script.runInNewContext(context); - }); - it('late defs setTimeout', function (done) { - var str = '"use strict";var module = {exports:{}};'; - str += process; - str += 'var setTimeout = hiddenSetTimeout;process.nextTick(function () {assert.ok(true);done();})'; - var script = new vm.Script(str); - var context = { - clearTimeout: clearTimeout, - hiddenSetTimeout: setTimeout, - done: done, - assert: assert - }; - script.runInNewContext(context); - }); - it('late defs clearTimeout', function (done) { - var str = '"use strict";var module = {exports:{}};'; - str += process; - str += 'var clearTimeout = hiddenClearTimeout;process.nextTick(function () {assert.ok(true);done();})'; - var script = new vm.Script(str); - var context = { - hiddenClearTimeout: clearTimeout, - setTimeout: setTimeout, - done: done, - assert: assert - }; - script.runInNewContext(context); - }); - it('late defs setTimeout and then redefine', function (done) { - var str = '"use strict";var module = {exports:{}};'; - str += process; - str += 'var setTimeout = hiddenSetTimeout;process.nextTick(function () {setTimeout = function (){throw new Error("foo")};hiddenSetTimeout(function(){process.nextTick(function (){assert.ok(true);done();});});});'; - var script = new vm.Script(str); - var context = { - clearTimeout: clearTimeout, - hiddenSetTimeout: setTimeout, - done: done, - assert: assert - }; - script.runInNewContext(context); - }); - }); -} diff --git a/node_modules/browserify/node_modules/punycode/LICENSE-MIT.txt b/node_modules/browserify/node_modules/punycode/LICENSE-MIT.txt deleted file mode 100644 index a41e0a7e..00000000 --- a/node_modules/browserify/node_modules/punycode/LICENSE-MIT.txt +++ /dev/null @@ -1,20 +0,0 @@ -Copyright Mathias Bynens - -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/node_modules/browserify/node_modules/punycode/README.md b/node_modules/browserify/node_modules/punycode/README.md deleted file mode 100644 index 7ad7d1fa..00000000 --- a/node_modules/browserify/node_modules/punycode/README.md +++ /dev/null @@ -1,176 +0,0 @@ -# Punycode.js [![Build status](https://travis-ci.org/bestiejs/punycode.js.svg?branch=master)](https://travis-ci.org/bestiejs/punycode.js) [![Code coverage status](http://img.shields.io/coveralls/bestiejs/punycode.js/master.svg)](https://coveralls.io/r/bestiejs/punycode.js) [![Dependency status](https://gemnasium.com/bestiejs/punycode.js.svg)](https://gemnasium.com/bestiejs/punycode.js) - -A robust Punycode converter that fully complies to [RFC 3492](https://tools.ietf.org/html/rfc3492) and [RFC 5891](https://tools.ietf.org/html/rfc5891), and works on nearly all JavaScript platforms. - -This JavaScript library is the result of comparing, optimizing and documenting different open-source implementations of the Punycode algorithm: - -* [The C example code from RFC 3492](https://tools.ietf.org/html/rfc3492#appendix-C) -* [`punycode.c` by _Markus W. Scherer_ (IBM)](http://opensource.apple.com/source/ICU/ICU-400.42/icuSources/common/punycode.c) -* [`punycode.c` by _Ben Noordhuis_](https://github.com/bnoordhuis/punycode/blob/master/punycode.c) -* [JavaScript implementation by _some_](http://stackoverflow.com/questions/183485/can-anyone-recommend-a-good-free-javascript-for-punycode-to-unicode-conversion/301287#301287) -* [`punycode.js` by _Ben Noordhuis_](https://github.com/joyent/node/blob/426298c8c1c0d5b5224ac3658c41e7c2a3fe9377/lib/punycode.js) (note: [not fully compliant](https://github.com/joyent/node/issues/2072)) - -This project is [bundled](https://github.com/joyent/node/blob/master/lib/punycode.js) with [Node.js v0.6.2+](https://github.com/joyent/node/compare/975f1930b1...61e796decc) and [io.js v1.0.0+](https://github.com/iojs/io.js/blob/v1.x/lib/punycode.js). - -## Installation - -Via [npm](https://www.npmjs.com/) (only required for Node.js releases older than v0.6.2): - -```bash -npm install punycode -``` - -Via [Bower](http://bower.io/): - -```bash -bower install punycode -``` - -Via [Component](https://github.com/component/component): - -```bash -component install bestiejs/punycode.js -``` - -In a browser: - -```html - -``` - -In [Node.js](https://nodejs.org/), [io.js](https://iojs.org/), [Narwhal](http://narwhaljs.org/), and [RingoJS](http://ringojs.org/): - -```js -var punycode = require('punycode'); -``` - -In [Rhino](http://www.mozilla.org/rhino/): - -```js -load('punycode.js'); -``` - -Using an AMD loader like [RequireJS](http://requirejs.org/): - -```js -require( - { - 'paths': { - 'punycode': 'path/to/punycode' - } - }, - ['punycode'], - function(punycode) { - console.log(punycode); - } -); -``` - -## API - -### `punycode.decode(string)` - -Converts a Punycode string of ASCII symbols to a string of Unicode symbols. - -```js -// decode domain name parts -punycode.decode('maana-pta'); // 'mañana' -punycode.decode('--dqo34k'); // '☃-⌘' -``` - -### `punycode.encode(string)` - -Converts a string of Unicode symbols to a Punycode string of ASCII symbols. - -```js -// encode domain name parts -punycode.encode('mañana'); // 'maana-pta' -punycode.encode('☃-⌘'); // '--dqo34k' -``` - -### `punycode.toUnicode(input)` - -Converts a Punycode string representing a domain name or an email address to Unicode. Only the Punycoded parts of the input will be converted, i.e. it doesn’t matter if you call it on a string that has already been converted to Unicode. - -```js -// decode domain names -punycode.toUnicode('xn--maana-pta.com'); -// → 'mañana.com' -punycode.toUnicode('xn----dqo34k.com'); -// → '☃-⌘.com' - -// decode email addresses -punycode.toUnicode('джумла@xn--p-8sbkgc5ag7bhce.xn--ba-lmcq'); -// → 'джумла@джpумлатест.bрфa' -``` - -### `punycode.toASCII(input)` - -Converts a lowercased Unicode string representing a domain name or an email address to Punycode. Only the non-ASCII parts of the input will be converted, i.e. it doesn’t matter if you call it with a domain that’s already in ASCII. - -```js -// encode domain names -punycode.toASCII('mañana.com'); -// → 'xn--maana-pta.com' -punycode.toASCII('☃-⌘.com'); -// → 'xn----dqo34k.com' - -// encode email addresses -punycode.toASCII('джумла@джpумлатест.bрфa'); -// → 'джумла@xn--p-8sbkgc5ag7bhce.xn--ba-lmcq' -``` - -### `punycode.ucs2` - -#### `punycode.ucs2.decode(string)` - -Creates an array containing the numeric code point values of each Unicode symbol in the string. While [JavaScript uses UCS-2 internally](https://mathiasbynens.be/notes/javascript-encoding), this function will convert a pair of surrogate halves (each of which UCS-2 exposes as separate characters) into a single code point, matching UTF-16. - -```js -punycode.ucs2.decode('abc'); -// → [0x61, 0x62, 0x63] -// surrogate pair for U+1D306 TETRAGRAM FOR CENTRE: -punycode.ucs2.decode('\uD834\uDF06'); -// → [0x1D306] -``` - -#### `punycode.ucs2.encode(codePoints)` - -Creates a string based on an array of numeric code point values. - -```js -punycode.ucs2.encode([0x61, 0x62, 0x63]); -// → 'abc' -punycode.ucs2.encode([0x1D306]); -// → '\uD834\uDF06' -``` - -### `punycode.version` - -A string representing the current Punycode.js version number. - -## Unit tests & code coverage - -After cloning this repository, run `npm install --dev` to install the dependencies needed for Punycode.js development and testing. You may want to install Istanbul _globally_ using `npm install istanbul -g`. - -Once that’s done, you can run the unit tests in Node using `npm test` or `node tests/tests.js`. To run the tests in Rhino, Ringo, Narwhal, PhantomJS, and web browsers as well, use `grunt test`. - -To generate the code coverage report, use `grunt cover`. - -Feel free to fork if you see possible improvements! - -## Author - -| [![twitter/mathias](https://gravatar.com/avatar/24e08a9ea84deb17ae121074d0f17125?s=70)](https://twitter.com/mathias "Follow @mathias on Twitter") | -|---| -| [Mathias Bynens](https://mathiasbynens.be/) | - -## Contributors - -| [![twitter/jdalton](https://gravatar.com/avatar/299a3d891ff1920b69c364d061007043?s=70)](https://twitter.com/jdalton "Follow @jdalton on Twitter") | -|---| -| [John-David Dalton](http://allyoucanleet.com/) | - -## License - -Punycode.js is available under the [MIT](https://mths.be/mit) license. diff --git a/node_modules/browserify/node_modules/punycode/package.json b/node_modules/browserify/node_modules/punycode/package.json deleted file mode 100644 index 0b150a6b..00000000 --- a/node_modules/browserify/node_modules/punycode/package.json +++ /dev/null @@ -1,93 +0,0 @@ -{ - "name": "punycode", - "version": "1.4.1", - "description": "A robust Punycode converter that fully complies to RFC 3492 and RFC 5891, and works on nearly all JavaScript platforms.", - "homepage": "https://mths.be/punycode", - "main": "punycode.js", - "keywords": [ - "punycode", - "unicode", - "idn", - "idna", - "dns", - "url", - "domain" - ], - "license": "MIT", - "author": { - "name": "Mathias Bynens", - "url": "https://mathiasbynens.be/" - }, - "contributors": [ - { - "name": "Mathias Bynens", - "url": "https://mathiasbynens.be/" - }, - { - "name": "John-David Dalton", - "url": "http://allyoucanleet.com/" - } - ], - "repository": { - "type": "git", - "url": "git+https://github.com/bestiejs/punycode.js.git" - }, - "bugs": { - "url": "https://github.com/bestiejs/punycode.js/issues" - }, - "files": [ - "LICENSE-MIT.txt", - "punycode.js" - ], - "scripts": { - "test": "node tests/tests.js" - }, - "devDependencies": { - "coveralls": "^2.11.4", - "grunt": "^0.4.5", - "grunt-contrib-uglify": "^0.11.0", - "grunt-shell": "^1.1.2", - "istanbul": "^0.4.1", - "qunit-extras": "^1.4.4", - "qunitjs": "~1.11.0", - "requirejs": "^2.1.22" - }, - "jspm": { - "map": { - "./punycode.js": { - "node": "@node/punycode" - } - } - }, - "gitHead": "0fbadd6e81f3a0ce06c38998040d6db6bdfbc5c9", - "_id": "punycode@1.4.1", - "_shasum": "c0d5a63b2718800ad8e1eb0fa5269c84dd41845e", - "_from": "punycode@>=1.3.2 <2.0.0", - "_npmVersion": "3.8.2", - "_nodeVersion": "5.2.0", - "_npmUser": { - "name": "mathias", - "email": "mathias@qiwi.be" - }, - "maintainers": [ - { - "name": "mathias", - "email": "mathias@qiwi.be" - }, - { - "name": "reconbot", - "email": "wizard@roborooter.com" - } - ], - "dist": { - "shasum": "c0d5a63b2718800ad8e1eb0fa5269c84dd41845e", - "tarball": "https://registry.npmjs.org/punycode/-/punycode-1.4.1.tgz" - }, - "_npmOperationalInternal": { - "host": "packages-12-west.internal.npmjs.com", - "tmp": "tmp/punycode-1.4.1.tgz_1458437236261_0.07678767060860991" - }, - "directories": {}, - "_resolved": "https://registry.npmjs.org/punycode/-/punycode-1.4.1.tgz", - "readme": "ERROR: No README data found!" -} diff --git a/node_modules/browserify/node_modules/punycode/punycode.js b/node_modules/browserify/node_modules/punycode/punycode.js deleted file mode 100644 index 2c87f6cc..00000000 --- a/node_modules/browserify/node_modules/punycode/punycode.js +++ /dev/null @@ -1,533 +0,0 @@ -/*! https://mths.be/punycode v1.4.1 by @mathias */ -;(function(root) { - - /** Detect free variables */ - var freeExports = typeof exports == 'object' && exports && - !exports.nodeType && exports; - var freeModule = typeof module == 'object' && module && - !module.nodeType && module; - var freeGlobal = typeof global == 'object' && global; - if ( - freeGlobal.global === freeGlobal || - freeGlobal.window === freeGlobal || - freeGlobal.self === freeGlobal - ) { - root = freeGlobal; - } - - /** - * The `punycode` object. - * @name punycode - * @type Object - */ - var punycode, - - /** Highest positive signed 32-bit float value */ - maxInt = 2147483647, // aka. 0x7FFFFFFF or 2^31-1 - - /** Bootstring parameters */ - base = 36, - tMin = 1, - tMax = 26, - skew = 38, - damp = 700, - initialBias = 72, - initialN = 128, // 0x80 - delimiter = '-', // '\x2D' - - /** Regular expressions */ - regexPunycode = /^xn--/, - regexNonASCII = /[^\x20-\x7E]/, // unprintable ASCII chars + non-ASCII chars - regexSeparators = /[\x2E\u3002\uFF0E\uFF61]/g, // RFC 3490 separators - - /** Error messages */ - errors = { - 'overflow': 'Overflow: input needs wider integers to process', - 'not-basic': 'Illegal input >= 0x80 (not a basic code point)', - 'invalid-input': 'Invalid input' - }, - - /** Convenience shortcuts */ - baseMinusTMin = base - tMin, - floor = Math.floor, - stringFromCharCode = String.fromCharCode, - - /** Temporary variable */ - key; - - /*--------------------------------------------------------------------------*/ - - /** - * A generic error utility function. - * @private - * @param {String} type The error type. - * @returns {Error} Throws a `RangeError` with the applicable error message. - */ - function error(type) { - throw new RangeError(errors[type]); - } - - /** - * A generic `Array#map` utility function. - * @private - * @param {Array} array The array to iterate over. - * @param {Function} callback The function that gets called for every array - * item. - * @returns {Array} A new array of values returned by the callback function. - */ - function map(array, fn) { - var length = array.length; - var result = []; - while (length--) { - result[length] = fn(array[length]); - } - return result; - } - - /** - * A simple `Array#map`-like wrapper to work with domain name strings or email - * addresses. - * @private - * @param {String} domain The domain name or email address. - * @param {Function} callback The function that gets called for every - * character. - * @returns {Array} A new string of characters returned by the callback - * function. - */ - function mapDomain(string, fn) { - var parts = string.split('@'); - var result = ''; - if (parts.length > 1) { - // In email addresses, only the domain name should be punycoded. Leave - // the local part (i.e. everything up to `@`) intact. - result = parts[0] + '@'; - string = parts[1]; - } - // Avoid `split(regex)` for IE8 compatibility. See #17. - string = string.replace(regexSeparators, '\x2E'); - var labels = string.split('.'); - var encoded = map(labels, fn).join('.'); - return result + encoded; - } - - /** - * Creates an array containing the numeric code points of each Unicode - * character in the string. While JavaScript uses UCS-2 internally, - * this function will convert a pair of surrogate halves (each of which - * UCS-2 exposes as separate characters) into a single code point, - * matching UTF-16. - * @see `punycode.ucs2.encode` - * @see - * @memberOf punycode.ucs2 - * @name decode - * @param {String} string The Unicode input string (UCS-2). - * @returns {Array} The new array of code points. - */ - function ucs2decode(string) { - var output = [], - counter = 0, - length = string.length, - value, - extra; - while (counter < length) { - value = string.charCodeAt(counter++); - if (value >= 0xD800 && value <= 0xDBFF && counter < length) { - // high surrogate, and there is a next character - extra = string.charCodeAt(counter++); - if ((extra & 0xFC00) == 0xDC00) { // low surrogate - output.push(((value & 0x3FF) << 10) + (extra & 0x3FF) + 0x10000); - } else { - // unmatched surrogate; only append this code unit, in case the next - // code unit is the high surrogate of a surrogate pair - output.push(value); - counter--; - } - } else { - output.push(value); - } - } - return output; - } - - /** - * Creates a string based on an array of numeric code points. - * @see `punycode.ucs2.decode` - * @memberOf punycode.ucs2 - * @name encode - * @param {Array} codePoints The array of numeric code points. - * @returns {String} The new Unicode string (UCS-2). - */ - function ucs2encode(array) { - return map(array, function(value) { - var output = ''; - if (value > 0xFFFF) { - value -= 0x10000; - output += stringFromCharCode(value >>> 10 & 0x3FF | 0xD800); - value = 0xDC00 | value & 0x3FF; - } - output += stringFromCharCode(value); - return output; - }).join(''); - } - - /** - * Converts a basic code point into a digit/integer. - * @see `digitToBasic()` - * @private - * @param {Number} codePoint The basic numeric code point value. - * @returns {Number} The numeric value of a basic code point (for use in - * representing integers) in the range `0` to `base - 1`, or `base` if - * the code point does not represent a value. - */ - function basicToDigit(codePoint) { - if (codePoint - 48 < 10) { - return codePoint - 22; - } - if (codePoint - 65 < 26) { - return codePoint - 65; - } - if (codePoint - 97 < 26) { - return codePoint - 97; - } - return base; - } - - /** - * Converts a digit/integer into a basic code point. - * @see `basicToDigit()` - * @private - * @param {Number} digit The numeric value of a basic code point. - * @returns {Number} The basic code point whose value (when used for - * representing integers) is `digit`, which needs to be in the range - * `0` to `base - 1`. If `flag` is non-zero, the uppercase form is - * used; else, the lowercase form is used. The behavior is undefined - * if `flag` is non-zero and `digit` has no uppercase form. - */ - function digitToBasic(digit, flag) { - // 0..25 map to ASCII a..z or A..Z - // 26..35 map to ASCII 0..9 - return digit + 22 + 75 * (digit < 26) - ((flag != 0) << 5); - } - - /** - * Bias adaptation function as per section 3.4 of RFC 3492. - * https://tools.ietf.org/html/rfc3492#section-3.4 - * @private - */ - function adapt(delta, numPoints, firstTime) { - var k = 0; - delta = firstTime ? floor(delta / damp) : delta >> 1; - delta += floor(delta / numPoints); - for (/* no initialization */; delta > baseMinusTMin * tMax >> 1; k += base) { - delta = floor(delta / baseMinusTMin); - } - return floor(k + (baseMinusTMin + 1) * delta / (delta + skew)); - } - - /** - * Converts a Punycode string of ASCII-only symbols to a string of Unicode - * symbols. - * @memberOf punycode - * @param {String} input The Punycode string of ASCII-only symbols. - * @returns {String} The resulting string of Unicode symbols. - */ - function decode(input) { - // Don't use UCS-2 - var output = [], - inputLength = input.length, - out, - i = 0, - n = initialN, - bias = initialBias, - basic, - j, - index, - oldi, - w, - k, - digit, - t, - /** Cached calculation results */ - baseMinusT; - - // Handle the basic code points: let `basic` be the number of input code - // points before the last delimiter, or `0` if there is none, then copy - // the first basic code points to the output. - - basic = input.lastIndexOf(delimiter); - if (basic < 0) { - basic = 0; - } - - for (j = 0; j < basic; ++j) { - // if it's not a basic code point - if (input.charCodeAt(j) >= 0x80) { - error('not-basic'); - } - output.push(input.charCodeAt(j)); - } - - // Main decoding loop: start just after the last delimiter if any basic code - // points were copied; start at the beginning otherwise. - - for (index = basic > 0 ? basic + 1 : 0; index < inputLength; /* no final expression */) { - - // `index` is the index of the next character to be consumed. - // Decode a generalized variable-length integer into `delta`, - // which gets added to `i`. The overflow checking is easier - // if we increase `i` as we go, then subtract off its starting - // value at the end to obtain `delta`. - for (oldi = i, w = 1, k = base; /* no condition */; k += base) { - - if (index >= inputLength) { - error('invalid-input'); - } - - digit = basicToDigit(input.charCodeAt(index++)); - - if (digit >= base || digit > floor((maxInt - i) / w)) { - error('overflow'); - } - - i += digit * w; - t = k <= bias ? tMin : (k >= bias + tMax ? tMax : k - bias); - - if (digit < t) { - break; - } - - baseMinusT = base - t; - if (w > floor(maxInt / baseMinusT)) { - error('overflow'); - } - - w *= baseMinusT; - - } - - out = output.length + 1; - bias = adapt(i - oldi, out, oldi == 0); - - // `i` was supposed to wrap around from `out` to `0`, - // incrementing `n` each time, so we'll fix that now: - if (floor(i / out) > maxInt - n) { - error('overflow'); - } - - n += floor(i / out); - i %= out; - - // Insert `n` at position `i` of the output - output.splice(i++, 0, n); - - } - - return ucs2encode(output); - } - - /** - * Converts a string of Unicode symbols (e.g. a domain name label) to a - * Punycode string of ASCII-only symbols. - * @memberOf punycode - * @param {String} input The string of Unicode symbols. - * @returns {String} The resulting Punycode string of ASCII-only symbols. - */ - function encode(input) { - var n, - delta, - handledCPCount, - basicLength, - bias, - j, - m, - q, - k, - t, - currentValue, - output = [], - /** `inputLength` will hold the number of code points in `input`. */ - inputLength, - /** Cached calculation results */ - handledCPCountPlusOne, - baseMinusT, - qMinusT; - - // Convert the input in UCS-2 to Unicode - input = ucs2decode(input); - - // Cache the length - inputLength = input.length; - - // Initialize the state - n = initialN; - delta = 0; - bias = initialBias; - - // Handle the basic code points - for (j = 0; j < inputLength; ++j) { - currentValue = input[j]; - if (currentValue < 0x80) { - output.push(stringFromCharCode(currentValue)); - } - } - - handledCPCount = basicLength = output.length; - - // `handledCPCount` is the number of code points that have been handled; - // `basicLength` is the number of basic code points. - - // Finish the basic string - if it is not empty - with a delimiter - if (basicLength) { - output.push(delimiter); - } - - // Main encoding loop: - while (handledCPCount < inputLength) { - - // All non-basic code points < n have been handled already. Find the next - // larger one: - for (m = maxInt, j = 0; j < inputLength; ++j) { - currentValue = input[j]; - if (currentValue >= n && currentValue < m) { - m = currentValue; - } - } - - // Increase `delta` enough to advance the decoder's state to , - // but guard against overflow - handledCPCountPlusOne = handledCPCount + 1; - if (m - n > floor((maxInt - delta) / handledCPCountPlusOne)) { - error('overflow'); - } - - delta += (m - n) * handledCPCountPlusOne; - n = m; - - for (j = 0; j < inputLength; ++j) { - currentValue = input[j]; - - if (currentValue < n && ++delta > maxInt) { - error('overflow'); - } - - if (currentValue == n) { - // Represent delta as a generalized variable-length integer - for (q = delta, k = base; /* no condition */; k += base) { - t = k <= bias ? tMin : (k >= bias + tMax ? tMax : k - bias); - if (q < t) { - break; - } - qMinusT = q - t; - baseMinusT = base - t; - output.push( - stringFromCharCode(digitToBasic(t + qMinusT % baseMinusT, 0)) - ); - q = floor(qMinusT / baseMinusT); - } - - output.push(stringFromCharCode(digitToBasic(q, 0))); - bias = adapt(delta, handledCPCountPlusOne, handledCPCount == basicLength); - delta = 0; - ++handledCPCount; - } - } - - ++delta; - ++n; - - } - return output.join(''); - } - - /** - * Converts a Punycode string representing a domain name or an email address - * to Unicode. Only the Punycoded parts of the input will be converted, i.e. - * it doesn't matter if you call it on a string that has already been - * converted to Unicode. - * @memberOf punycode - * @param {String} input The Punycoded domain name or email address to - * convert to Unicode. - * @returns {String} The Unicode representation of the given Punycode - * string. - */ - function toUnicode(input) { - return mapDomain(input, function(string) { - return regexPunycode.test(string) - ? decode(string.slice(4).toLowerCase()) - : string; - }); - } - - /** - * Converts a Unicode string representing a domain name or an email address to - * Punycode. Only the non-ASCII parts of the domain name will be converted, - * i.e. it doesn't matter if you call it with a domain that's already in - * ASCII. - * @memberOf punycode - * @param {String} input The domain name or email address to convert, as a - * Unicode string. - * @returns {String} The Punycode representation of the given domain name or - * email address. - */ - function toASCII(input) { - return mapDomain(input, function(string) { - return regexNonASCII.test(string) - ? 'xn--' + encode(string) - : string; - }); - } - - /*--------------------------------------------------------------------------*/ - - /** Define the public API */ - punycode = { - /** - * A string representing the current Punycode.js version number. - * @memberOf punycode - * @type String - */ - 'version': '1.4.1', - /** - * An object of methods to convert from JavaScript's internal character - * representation (UCS-2) to Unicode code points, and back. - * @see - * @memberOf punycode - * @type Object - */ - 'ucs2': { - 'decode': ucs2decode, - 'encode': ucs2encode - }, - 'decode': decode, - 'encode': encode, - 'toASCII': toASCII, - 'toUnicode': toUnicode - }; - - /** Expose `punycode` */ - // Some AMD build optimizers, like r.js, check for specific condition patterns - // like the following: - if ( - typeof define == 'function' && - typeof define.amd == 'object' && - define.amd - ) { - define('punycode', function() { - return punycode; - }); - } else if (freeExports && freeModule) { - if (module.exports == freeExports) { - // in Node.js, io.js, or RingoJS v0.8.0+ - freeModule.exports = punycode; - } else { - // in Narwhal or RingoJS v0.7.0- - for (key in punycode) { - punycode.hasOwnProperty(key) && (freeExports[key] = punycode[key]); - } - } - } else { - // in Rhino or a web browser - root.punycode = punycode; - } - -}(this)); diff --git a/node_modules/browserify/node_modules/querystring-es3/.travis.yml b/node_modules/browserify/node_modules/querystring-es3/.travis.yml deleted file mode 100644 index 895dbd36..00000000 --- a/node_modules/browserify/node_modules/querystring-es3/.travis.yml +++ /dev/null @@ -1,4 +0,0 @@ -language: node_js -node_js: - - 0.6 - - 0.8 diff --git a/node_modules/browserify/node_modules/querystring-es3/History.md b/node_modules/browserify/node_modules/querystring-es3/History.md deleted file mode 100644 index 4fddbaf7..00000000 --- a/node_modules/browserify/node_modules/querystring-es3/History.md +++ /dev/null @@ -1,20 +0,0 @@ -# 0.2.0 / 2013-02-21 - - - Refactor into function per-module idiomatic style. - - Improved test coverage. - -# 0.1.0 / 2011-12-13 - - - Minor project reorganization - -# 0.0.3 / 2011-04-16 - - Support for AMD module loaders - -# 0.0.2 / 2011-04-16 - - - Ported unit tests - - Removed functionality that depended on Buffers - -# 0.0.1 / 2011-04-15 - - - Initial release diff --git a/node_modules/browserify/node_modules/querystring-es3/License.md b/node_modules/browserify/node_modules/querystring-es3/License.md deleted file mode 100644 index fc80e85f..00000000 --- a/node_modules/browserify/node_modules/querystring-es3/License.md +++ /dev/null @@ -1,19 +0,0 @@ - -Copyright 2012 Irakli Gozalishvili. All rights reserved. -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to -deal in the Software without restriction, including without limitation the -rights to use, copy, modify, merge, publish, distribute, sublicense, and/or -sell copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS -IN THE SOFTWARE. diff --git a/node_modules/browserify/node_modules/querystring-es3/Readme.md b/node_modules/browserify/node_modules/querystring-es3/Readme.md deleted file mode 100644 index be1668df..00000000 --- a/node_modules/browserify/node_modules/querystring-es3/Readme.md +++ /dev/null @@ -1,15 +0,0 @@ -# querystring - -[![Build Status](https://secure.travis-ci.org/mike-spainhower/querystring.png)](http://travis-ci.org/mike-spainhower/querystring) - - -[![Browser support](http://ci.testling.com/mike-spainhower/querystring.png)](http://ci.testling.com/mike-spainhower/querystring) - - - -Node's querystring module for all engines. - -## Install ## - - npm install querystring - diff --git a/node_modules/browserify/node_modules/querystring-es3/decode.js b/node_modules/browserify/node_modules/querystring-es3/decode.js deleted file mode 100644 index b5825c0b..00000000 --- a/node_modules/browserify/node_modules/querystring-es3/decode.js +++ /dev/null @@ -1,84 +0,0 @@ -// Copyright Joyent, Inc. and other Node contributors. -// -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to permit -// persons to whom the Software is furnished to do so, subject to the -// following conditions: -// -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -// USE OR OTHER DEALINGS IN THE SOFTWARE. - -'use strict'; - -// If obj.hasOwnProperty has been overridden, then calling -// obj.hasOwnProperty(prop) will break. -// See: https://github.com/joyent/node/issues/1707 -function hasOwnProperty(obj, prop) { - return Object.prototype.hasOwnProperty.call(obj, prop); -} - -module.exports = function(qs, sep, eq, options) { - sep = sep || '&'; - eq = eq || '='; - var obj = {}; - - if (typeof qs !== 'string' || qs.length === 0) { - return obj; - } - - var regexp = /\+/g; - qs = qs.split(sep); - - var maxKeys = 1000; - if (options && typeof options.maxKeys === 'number') { - maxKeys = options.maxKeys; - } - - var len = qs.length; - // maxKeys <= 0 means that we should not limit keys count - if (maxKeys > 0 && len > maxKeys) { - len = maxKeys; - } - - for (var i = 0; i < len; ++i) { - var x = qs[i].replace(regexp, '%20'), - idx = x.indexOf(eq), - kstr, vstr, k, v; - - if (idx >= 0) { - kstr = x.substr(0, idx); - vstr = x.substr(idx + 1); - } else { - kstr = x; - vstr = ''; - } - - k = decodeURIComponent(kstr); - v = decodeURIComponent(vstr); - - if (!hasOwnProperty(obj, k)) { - obj[k] = v; - } else if (isArray(obj[k])) { - obj[k].push(v); - } else { - obj[k] = [obj[k], v]; - } - } - - return obj; -}; - -var isArray = Array.isArray || function (xs) { - return Object.prototype.toString.call(xs) === '[object Array]'; -}; diff --git a/node_modules/browserify/node_modules/querystring-es3/encode.js b/node_modules/browserify/node_modules/querystring-es3/encode.js deleted file mode 100644 index 76e4cfb0..00000000 --- a/node_modules/browserify/node_modules/querystring-es3/encode.js +++ /dev/null @@ -1,85 +0,0 @@ -// Copyright Joyent, Inc. and other Node contributors. -// -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to permit -// persons to whom the Software is furnished to do so, subject to the -// following conditions: -// -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -// USE OR OTHER DEALINGS IN THE SOFTWARE. - -'use strict'; - -var stringifyPrimitive = function(v) { - switch (typeof v) { - case 'string': - return v; - - case 'boolean': - return v ? 'true' : 'false'; - - case 'number': - return isFinite(v) ? v : ''; - - default: - return ''; - } -}; - -module.exports = function(obj, sep, eq, name) { - sep = sep || '&'; - eq = eq || '='; - if (obj === null) { - obj = undefined; - } - - if (typeof obj === 'object') { - return map(objectKeys(obj), function(k) { - var ks = encodeURIComponent(stringifyPrimitive(k)) + eq; - if (isArray(obj[k])) { - return map(obj[k], function(v) { - return ks + encodeURIComponent(stringifyPrimitive(v)); - }).join(sep); - } else { - return ks + encodeURIComponent(stringifyPrimitive(obj[k])); - } - }).join(sep); - - } - - if (!name) return ''; - return encodeURIComponent(stringifyPrimitive(name)) + eq + - encodeURIComponent(stringifyPrimitive(obj)); -}; - -var isArray = Array.isArray || function (xs) { - return Object.prototype.toString.call(xs) === '[object Array]'; -}; - -function map (xs, f) { - if (xs.map) return xs.map(f); - var res = []; - for (var i = 0; i < xs.length; i++) { - res.push(f(xs[i], i)); - } - return res; -} - -var objectKeys = Object.keys || function (obj) { - var res = []; - for (var key in obj) { - if (Object.prototype.hasOwnProperty.call(obj, key)) res.push(key); - } - return res; -}; diff --git a/node_modules/browserify/node_modules/querystring-es3/index.js b/node_modules/browserify/node_modules/querystring-es3/index.js deleted file mode 100644 index 99826ea8..00000000 --- a/node_modules/browserify/node_modules/querystring-es3/index.js +++ /dev/null @@ -1,4 +0,0 @@ -'use strict'; - -exports.decode = exports.parse = require('./decode'); -exports.encode = exports.stringify = require('./encode'); diff --git a/node_modules/browserify/node_modules/querystring-es3/package.json b/node_modules/browserify/node_modules/querystring-es3/package.json deleted file mode 100644 index a8935d79..00000000 --- a/node_modules/browserify/node_modules/querystring-es3/package.json +++ /dev/null @@ -1,98 +0,0 @@ -{ - "name": "querystring-es3", - "id": "querystring-es3", - "version": "0.2.1", - "description": "Node's querystring module for all engines. (ES3 compat fork)", - "keywords": [ - "commonjs", - "query", - "querystring" - ], - "author": { - "name": "Irakli Gozalishvili", - "email": "rfobic@gmail.com" - }, - "repository": { - "type": "git", - "url": "git://github.com/mike-spainhower/querystring.git", - "web": "https://github.com/mike-spainhower/querystring" - }, - "bugs": { - "url": "http://github.com/mike-spainhower/querystring/issues/" - }, - "devDependencies": { - "test": "~0.x.0", - "phantomify": "~0.x.0", - "retape": "~0.x.0", - "tape": "~0.1.5" - }, - "engines": { - "node": ">=0.4.x" - }, - "scripts": { - "test": "npm run test-node && npm run test-browser && npm run test-tap", - "test-browser": "node ./node_modules/phantomify/bin/cmd.js ./test/common-index.js", - "test-node": "node ./test/common-index.js", - "test-tap": "node ./test/tap-index.js" - }, - "testling": { - "files": "test/tap-index.js", - "browsers": { - "iexplore": [ - 9, - 10 - ], - "chrome": [ - 16, - 20, - 25, - "canary" - ], - "firefox": [ - 10, - 15, - 16, - 17, - 18, - "nightly" - ], - "safari": [ - 5, - 6 - ], - "opera": [ - 12 - ] - } - }, - "licenses": [ - { - "type": "MIT", - "url": "https://github.com/Gozala/enchain/License.md" - } - ], - "gitHead": "c58e18a37d9970e13a84dcc421ab682c7836fad2", - "homepage": "https://github.com/mike-spainhower/querystring", - "_id": "querystring-es3@0.2.1", - "_shasum": "9ec61f79049875707d69414596fd907a4d711e73", - "_from": "querystring-es3@>=0.2.0 <0.3.0", - "_npmVersion": "2.0.2", - "_nodeVersion": "0.10.26", - "_npmUser": { - "name": "spaintrain", - "email": "mc.s.pain.how.er+npm@gmail.com" - }, - "maintainers": [ - { - "name": "spaintrain", - "email": "mc.s.pain.how.er+npm@gmail.com" - } - ], - "dist": { - "shasum": "9ec61f79049875707d69414596fd907a4d711e73", - "tarball": "https://registry.npmjs.org/querystring-es3/-/querystring-es3-0.2.1.tgz" - }, - "directories": {}, - "_resolved": "https://registry.npmjs.org/querystring-es3/-/querystring-es3-0.2.1.tgz", - "readme": "ERROR: No README data found!" -} diff --git a/node_modules/browserify/node_modules/querystring-es3/test/common-index.js b/node_modules/browserify/node_modules/querystring-es3/test/common-index.js deleted file mode 100644 index f356f987..00000000 --- a/node_modules/browserify/node_modules/querystring-es3/test/common-index.js +++ /dev/null @@ -1,3 +0,0 @@ -"use strict"; - -require("test").run(require("./index")) \ No newline at end of file diff --git a/node_modules/browserify/node_modules/querystring-es3/test/index.js b/node_modules/browserify/node_modules/querystring-es3/test/index.js deleted file mode 100644 index 62eb2ac8..00000000 --- a/node_modules/browserify/node_modules/querystring-es3/test/index.js +++ /dev/null @@ -1,210 +0,0 @@ -// Copyright Joyent, Inc. and other Node contributors. -// -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to permit -// persons to whom the Software is furnished to do so, subject to the -// following conditions: -// -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -// USE OR OTHER DEALINGS IN THE SOFTWARE. - -"use strict"; - -// test using assert -var qs = require('../'); - -// folding block, commented to pass gjslint -// {{{ -// [ wonkyQS, canonicalQS, obj ] -var qsTestCases = [ - ['foo=918854443121279438895193', - 'foo=918854443121279438895193', - {'foo': '918854443121279438895193'}], - ['foo=bar', 'foo=bar', {'foo': 'bar'}], - ['foo=bar&foo=quux', 'foo=bar&foo=quux', {'foo': ['bar', 'quux']}], - ['foo=1&bar=2', 'foo=1&bar=2', {'foo': '1', 'bar': '2'}], - ['my+weird+field=q1%212%22%27w%245%267%2Fz8%29%3F', - 'my%20weird%20field=q1!2%22\'w%245%267%2Fz8)%3F', - {'my weird field': 'q1!2"\'w$5&7/z8)?' }], - ['foo%3Dbaz=bar', 'foo%3Dbaz=bar', {'foo=baz': 'bar'}], - ['foo=baz=bar', 'foo=baz%3Dbar', {'foo': 'baz=bar'}], - ['str=foo&arr=1&arr=2&arr=3&somenull=&undef=', - 'str=foo&arr=1&arr=2&arr=3&somenull=&undef=', - { 'str': 'foo', - 'arr': ['1', '2', '3'], - 'somenull': '', - 'undef': ''}], - [' foo = bar ', '%20foo%20=%20bar%20', {' foo ': ' bar '}], - // disable test that fails ['foo=%zx', 'foo=%25zx', {'foo': '%zx'}], - ['foo=%EF%BF%BD', 'foo=%EF%BF%BD', {'foo': '\ufffd' }], - // See: https://github.com/joyent/node/issues/1707 - ['hasOwnProperty=x&toString=foo&valueOf=bar&__defineGetter__=baz', - 'hasOwnProperty=x&toString=foo&valueOf=bar&__defineGetter__=baz', - { hasOwnProperty: 'x', - toString: 'foo', - valueOf: 'bar', - __defineGetter__: 'baz' }], - // See: https://github.com/joyent/node/issues/3058 - ['foo&bar=baz', 'foo=&bar=baz', { foo: '', bar: 'baz' }] -]; - -// [ wonkyQS, canonicalQS, obj ] -var qsColonTestCases = [ - ['foo:bar', 'foo:bar', {'foo': 'bar'}], - ['foo:bar;foo:quux', 'foo:bar;foo:quux', {'foo': ['bar', 'quux']}], - ['foo:1&bar:2;baz:quux', - 'foo:1%26bar%3A2;baz:quux', - {'foo': '1&bar:2', 'baz': 'quux'}], - ['foo%3Abaz:bar', 'foo%3Abaz:bar', {'foo:baz': 'bar'}], - ['foo:baz:bar', 'foo:baz%3Abar', {'foo': 'baz:bar'}] -]; - -// [wonkyObj, qs, canonicalObj] -var extendedFunction = function() {}; -extendedFunction.prototype = {a: 'b'}; -var qsWeirdObjects = [ - [{regexp: /./g}, 'regexp=', {'regexp': ''}], - [{regexp: new RegExp('.', 'g')}, 'regexp=', {'regexp': ''}], - [{fn: function() {}}, 'fn=', {'fn': ''}], - [{fn: new Function('')}, 'fn=', {'fn': ''}], - [{math: Math}, 'math=', {'math': ''}], - [{e: extendedFunction}, 'e=', {'e': ''}], - [{d: new Date()}, 'd=', {'d': ''}], - [{d: Date}, 'd=', {'d': ''}], - [{f: new Boolean(false), t: new Boolean(true)}, 'f=&t=', {'f': '', 't': ''}], - [{f: false, t: true}, 'f=false&t=true', {'f': 'false', 't': 'true'}], - [{n: null}, 'n=', {'n': ''}], - [{nan: NaN}, 'nan=', {'nan': ''}], - [{inf: Infinity}, 'inf=', {'inf': ''}] -]; -// }}} - -var qsNoMungeTestCases = [ - ['', {}], - ['foo=bar&foo=baz', {'foo': ['bar', 'baz']}], - ['blah=burp', {'blah': 'burp'}], - ['gragh=1&gragh=3&goo=2', {'gragh': ['1', '3'], 'goo': '2'}], - ['frappucino=muffin&goat%5B%5D=scone&pond=moose', - {'frappucino': 'muffin', 'goat[]': 'scone', 'pond': 'moose'}], - ['trololol=yes&lololo=no', {'trololol': 'yes', 'lololo': 'no'}] -]; - -exports['test basic'] = function(assert) { - assert.strictEqual('918854443121279438895193', - qs.parse('id=918854443121279438895193').id, - 'prase id=918854443121279438895193'); -}; - -exports['test that the canonical qs is parsed properly'] = function(assert) { - qsTestCases.forEach(function(testCase) { - assert.deepEqual(testCase[2], qs.parse(testCase[0]), - 'parse ' + testCase[0]); - }); -}; - - -exports['test that the colon test cases can do the same'] = function(assert) { - qsColonTestCases.forEach(function(testCase) { - assert.deepEqual(testCase[2], qs.parse(testCase[0], ';', ':'), - 'parse ' + testCase[0] + ' -> ; :'); - }); -}; - -exports['test the weird objects, that they get parsed properly'] = function(assert) { - qsWeirdObjects.forEach(function(testCase) { - assert.deepEqual(testCase[2], qs.parse(testCase[1]), - 'parse ' + testCase[1]); - }); -}; - -exports['test non munge test cases'] = function(assert) { - qsNoMungeTestCases.forEach(function(testCase) { - assert.deepEqual(testCase[0], qs.stringify(testCase[1], '&', '=', false), - 'stringify ' + JSON.stringify(testCase[1]) + ' -> & ='); - }); -}; - -exports['test the nested qs-in-qs case'] = function(assert) { - var f = qs.parse('a=b&q=x%3Dy%26y%3Dz'); - f.q = qs.parse(f.q); - assert.deepEqual(f, { a: 'b', q: { x: 'y', y: 'z' } }, - 'parse a=b&q=x%3Dy%26y%3Dz'); -}; - -exports['test nested in colon'] = function(assert) { - var f = qs.parse('a:b;q:x%3Ay%3By%3Az', ';', ':'); - f.q = qs.parse(f.q, ';', ':'); - assert.deepEqual(f, { a: 'b', q: { x: 'y', y: 'z' } }, - 'parse a:b;q:x%3Ay%3By%3Az -> ; :'); -}; - -exports['test stringifying'] = function(assert) { - qsTestCases.forEach(function(testCase) { - assert.equal(testCase[1], qs.stringify(testCase[2]), - 'stringify ' + JSON.stringify(testCase[2])); - }); - - qsColonTestCases.forEach(function(testCase) { - assert.equal(testCase[1], qs.stringify(testCase[2], ';', ':'), - 'stringify ' + JSON.stringify(testCase[2]) + ' -> ; :'); - }); - - qsWeirdObjects.forEach(function(testCase) { - assert.equal(testCase[1], qs.stringify(testCase[0]), - 'stringify ' + JSON.stringify(testCase[0])); - }); -}; - -exports['test stringifying nested'] = function(assert) { - var f = qs.stringify({ - a: 'b', - q: qs.stringify({ - x: 'y', - y: 'z' - }) - }); - assert.equal(f, 'a=b&q=x%3Dy%26y%3Dz', - JSON.stringify({ - a: 'b', - 'qs.stringify -> q': { - x: 'y', - y: 'z' - } - })); - - var threw = false; - try { qs.parse(undefined); } catch(error) { threw = true; } - assert.ok(!threw, "does not throws on undefined"); -}; - -exports['test nested in colon'] = function(assert) { - var f = qs.stringify({ - a: 'b', - q: qs.stringify({ - x: 'y', - y: 'z' - }, ';', ':') - }, ';', ':'); - assert.equal(f, 'a:b;q:x%3Ay%3By%3Az', - 'stringify ' + JSON.stringify({ - a: 'b', - 'qs.stringify -> q': { - x: 'y', - y: 'z' - } - }) + ' -> ; : '); - - - assert.deepEqual({}, qs.parse(), 'parse undefined'); -}; diff --git a/node_modules/browserify/node_modules/querystring-es3/test/tap-index.js b/node_modules/browserify/node_modules/querystring-es3/test/tap-index.js deleted file mode 100644 index 70679b3f..00000000 --- a/node_modules/browserify/node_modules/querystring-es3/test/tap-index.js +++ /dev/null @@ -1,3 +0,0 @@ -"use strict"; - -require("retape")(require("./index")) \ No newline at end of file diff --git a/node_modules/browserify/node_modules/read-only-stream/.travis.yml b/node_modules/browserify/node_modules/read-only-stream/.travis.yml deleted file mode 100644 index 9672e129..00000000 --- a/node_modules/browserify/node_modules/read-only-stream/.travis.yml +++ /dev/null @@ -1,6 +0,0 @@ -language: node_js -node_js: - - "0.8" - - "0.10" -before_install: - - npm install -g npm@~1.4.6 diff --git a/node_modules/browserify/node_modules/read-only-stream/LICENSE b/node_modules/browserify/node_modules/read-only-stream/LICENSE deleted file mode 100644 index ee27ba4b..00000000 --- a/node_modules/browserify/node_modules/read-only-stream/LICENSE +++ /dev/null @@ -1,18 +0,0 @@ -This software is released under the MIT license: - -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/node_modules/browserify/node_modules/read-only-stream/example/main.js b/node_modules/browserify/node_modules/read-only-stream/example/main.js deleted file mode 100644 index 22720fe3..00000000 --- a/node_modules/browserify/node_modules/read-only-stream/example/main.js +++ /dev/null @@ -1,3 +0,0 @@ -var wrap = require('./wrap.js'); -var ro = wrap(); // can't write to `ro` and muck up internal state -ro.pipe(process.stdout); diff --git a/node_modules/browserify/node_modules/read-only-stream/example/wrap.js b/node_modules/browserify/node_modules/read-only-stream/example/wrap.js deleted file mode 100644 index 55860810..00000000 --- a/node_modules/browserify/node_modules/read-only-stream/example/wrap.js +++ /dev/null @@ -1,8 +0,0 @@ -var through = require('through2'); -var readonly = require('../'); - -module.exports = function () { - var stream = through(); - stream.end('wooooo\n'); - return readonly(stream); -}; diff --git a/node_modules/browserify/node_modules/read-only-stream/index.js b/node_modules/browserify/node_modules/read-only-stream/index.js deleted file mode 100644 index c2f27c9a..00000000 --- a/node_modules/browserify/node_modules/read-only-stream/index.js +++ /dev/null @@ -1,29 +0,0 @@ -var Readable = require('readable-stream/readable'); -var rwrap = require('readable-wrap'); - -module.exports = function (stream) { - var opts = stream._readableState; - if (typeof stream.read !== 'function') stream = rwrap(stream, opts); - - var ro = new Readable({ objectMode: opts && opts.objectMode }); - var waiting = false; - - stream.on('readable', function () { - if (waiting) { - waiting = false; - ro._read(); - } - }); - - ro._read = function () { - var buf, reads = 0; - while ((buf = stream.read()) !== null) { - ro.push(buf); - reads ++; - } - if (reads === 0) waiting = true; - }; - stream.once('end', function () { ro.push(null) }); - stream.on('error', function (err) { ro.emit('error', err) }); - return ro; -}; diff --git a/node_modules/browserify/node_modules/read-only-stream/node_modules/readable-wrap/.travis.yml b/node_modules/browserify/node_modules/read-only-stream/node_modules/readable-wrap/.travis.yml deleted file mode 100644 index 9672e129..00000000 --- a/node_modules/browserify/node_modules/read-only-stream/node_modules/readable-wrap/.travis.yml +++ /dev/null @@ -1,6 +0,0 @@ -language: node_js -node_js: - - "0.8" - - "0.10" -before_install: - - npm install -g npm@~1.4.6 diff --git a/node_modules/browserify/node_modules/read-only-stream/node_modules/readable-wrap/LICENSE b/node_modules/browserify/node_modules/read-only-stream/node_modules/readable-wrap/LICENSE deleted file mode 100644 index 6de584a4..00000000 --- a/node_modules/browserify/node_modules/read-only-stream/node_modules/readable-wrap/LICENSE +++ /dev/null @@ -1,20 +0,0 @@ -Copyright Joyent, Inc. and other Node contributors. - -Permission is hereby granted, free of charge, to any person obtaining a -copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to permit -persons to whom the Software is furnished to do so, subject to the -following conditions: - -The above copyright notice and this permission notice shall be included -in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/browserify/node_modules/read-only-stream/node_modules/readable-wrap/example/split.js b/node_modules/browserify/node_modules/read-only-stream/node_modules/readable-wrap/example/split.js deleted file mode 100644 index 40c13f50..00000000 --- a/node_modules/browserify/node_modules/read-only-stream/node_modules/readable-wrap/example/split.js +++ /dev/null @@ -1,10 +0,0 @@ -var split = require('split'); -var wrap = require('../'); -var through = require('through2'); - -process.stdin.pipe(wrap.obj(split())).pipe(through.obj(write)); - -function write (buf, enc, next) { - console.log(buf.length + ': ' + buf); - next(); -} diff --git a/node_modules/browserify/node_modules/read-only-stream/node_modules/readable-wrap/index.js b/node_modules/browserify/node_modules/read-only-stream/node_modules/readable-wrap/index.js deleted file mode 100644 index ef7cee5a..00000000 --- a/node_modules/browserify/node_modules/read-only-stream/node_modules/readable-wrap/index.js +++ /dev/null @@ -1,76 +0,0 @@ -var Readable = require('readable-stream').Readable; - -// wrap an old-style stream as the async data source. -// This is *not* part of the readable stream interface. -// It is an ugly unfortunate mess of history. -module.exports = wrap; -module.exports.obj = function (stream, opts) { - if (!opts) opts = {}; - opts.objectMode = true; - return wrap(stream, opts); -}; - -function wrap (stream, opts) { - var self = new Readable(opts) - var state = self._readableState; - var paused = false; - - stream.on('end', function() { - if (state.decoder && !state.ended) { - var chunk = state.decoder.end(); - if (chunk && chunk.length) - self.push(chunk); - } - - self.push(null); - }); - - stream.on('data', function(chunk) { - if (state.decoder) - chunk = state.decoder.write(chunk); - - // don't skip over falsy values in objectMode - //if (state.objectMode && util.isNullOrUndefined(chunk)) - if (state.objectMode && (chunk === null || chunk === undefined)) - return - else if (!state.objectMode && (!chunk || !chunk.length)) - return; - - var ret = self.push(chunk); - if (!ret) { - paused = true; - stream.pause(); - } - }); - - // proxy all the other methods. - // important when wrapping filters and duplexes. - for (var i in stream) { - if (typeof stream[i] === 'function' && - typeof self[i] === 'undefined') { - self[i] = function(method) { return function() { - return stream[method].apply(stream, arguments); - }}(i); - } - } - - // proxy certain important events. - var events = ['error', 'close', 'destroy', 'pause', 'resume']; - for (var i = 0; i < events.length; i++) (function (ev) { - stream.on(ev, function () { - var args = [ ev ].concat([].slice.call(arguments)); - self.emit.apply(self, args); - }) - })(events[i]); - - // when we try to consume some more bytes, simply unpause the - // underlying stream. - self._read = function(n) { - if (paused) { - paused = false; - stream.resume(); - } - }; - - return self; -}; diff --git a/node_modules/browserify/node_modules/read-only-stream/node_modules/readable-wrap/package.json b/node_modules/browserify/node_modules/read-only-stream/node_modules/readable-wrap/package.json deleted file mode 100644 index 194a832c..00000000 --- a/node_modules/browserify/node_modules/read-only-stream/node_modules/readable-wrap/package.json +++ /dev/null @@ -1,76 +0,0 @@ -{ - "name": "readable-wrap", - "version": "1.0.0", - "description": "upgrade streams1 to streams2 streams as a standalone module", - "main": "index.js", - "dependencies": { - "readable-stream": "^1.1.13-1" - }, - "devDependencies": { - "tape": "~2.12.1", - "through2": "~1.0.0" - }, - "scripts": { - "test": "tape test/*.js" - }, - "repository": { - "type": "git", - "url": "git://github.com/substack/readable-wrap.git" - }, - "homepage": "https://github.com/substack/readable-wrap", - "keywords": [ - "streams1", - "streams2", - "readable-stream", - "streams", - "wrapper" - ], - "author": { - "name": "James Halliday", - "email": "mail@substack.net", - "url": "http://substack.net" - }, - "license": "MIT", - "testling": { - "files": "test/*.js", - "browsers": [ - "ie/8..latest", - "firefox/15", - "firefox/latest", - "firefox/nightly", - "chrome/15", - "chrome/latest", - "chrome/canary", - "opera/12..latest", - "opera/next", - "safari/5.1..latest", - "ipad/6.0..latest", - "iphone/6.0..latest", - "android-browser/4.2..latest" - ] - }, - "bugs": { - "url": "https://github.com/substack/readable-wrap/issues" - }, - "_id": "readable-wrap@1.0.0", - "dist": { - "shasum": "3b5a211c631e12303a54991c806c17e7ae206bff", - "tarball": "https://registry.npmjs.org/readable-wrap/-/readable-wrap-1.0.0.tgz" - }, - "_from": "readable-wrap@>=1.0.0 <2.0.0", - "_npmVersion": "1.4.3", - "_npmUser": { - "name": "substack", - "email": "mail@substack.net" - }, - "maintainers": [ - { - "name": "substack", - "email": "mail@substack.net" - } - ], - "directories": {}, - "_shasum": "3b5a211c631e12303a54991c806c17e7ae206bff", - "_resolved": "https://registry.npmjs.org/readable-wrap/-/readable-wrap-1.0.0.tgz", - "readme": "ERROR: No README data found!" -} diff --git a/node_modules/browserify/node_modules/read-only-stream/node_modules/readable-wrap/readme.markdown b/node_modules/browserify/node_modules/read-only-stream/node_modules/readable-wrap/readme.markdown deleted file mode 100644 index d434e287..00000000 --- a/node_modules/browserify/node_modules/read-only-stream/node_modules/readable-wrap/readme.markdown +++ /dev/null @@ -1,76 +0,0 @@ -# readable-wrap - -upgrade streams1 to streams2 streams as a standalone module - -This module provides a wrap function based on `Readable().wrap()` from node core -but as a standalone module. - -Use this module if you don't want to wait for -[a patch in node core](https://github.com/joyent/node/pull/7758) -to land that fixes falsey objectMode values in wrapped readable streams. - -[![build status](https://secure.travis-ci.org/substack/readable-wrap.png)](http://travis-ci.org/substack/readable-wrap) - -[![testling badge](https://ci.testling.com/substack/readable-wrap.png)](https://ci.testling.com/substack/readable-wrap) - -# example - -``` js -var split = require('split'); -var wrap = require('readable-wrap'); -var through = require('through2'); - -process.stdin.pipe(wrap.obj(split())).pipe(through.obj(write)); - -function write (buf, enc, next) { - console.log(buf.length + ': ' + buf); - next(); -} -``` - -output: - -``` -$ echo -e 'one\ntwo\n\nthree' | node example/split.js -3: one -3: two -0: -5: three -0: -``` - -In object mode you get the empty lines, which is handy if you need to perform a -special action on empty lines such as to partition an HTTP request header from a -body in a streaming fashion. - -In non-object mode the empty lines get ignored because that is how node core -streams work. - -# methods - -``` js -var wrap = require('readable-wrap') -``` - -## var stream = wrap(oldStream, opts) - -Return a new streams2 `stream` based on the streams1 stream `oldStream`. - -The `opts` will be passed to the underlying readable stream instance. - -## var stream = wrap.obj(oldStream, opts) - -Return a new streams2 `stream` based on the streams1 stream `oldStream` with -`opts.objectMode` set to `true`. - -# install - -With [npm](https://npmjs.org) do: - -``` -npm install readable-wrap -``` - -# license - -MIT diff --git a/node_modules/browserify/node_modules/read-only-stream/node_modules/readable-wrap/test/buffer.js b/node_modules/browserify/node_modules/read-only-stream/node_modules/readable-wrap/test/buffer.js deleted file mode 100644 index e65e841c..00000000 --- a/node_modules/browserify/node_modules/read-only-stream/node_modules/readable-wrap/test/buffer.js +++ /dev/null @@ -1,30 +0,0 @@ -var test = require('tape'); -var through = require('through2'); -var EventEmitter = require('events').EventEmitter; -var wrap = require('../'); - -test('buffer', function (t) { - var oldStream = new EventEmitter; - var wrapped = wrap(oldStream); - - var input = [ Buffer('abc'), Buffer('def'), Buffer('ghi') ]; - var expected = input.slice(); - t.plan(expected.length + 1); - - wrapped.pipe(through.obj(write, end)); - - var iv = setInterval(function () { - if (input.length === 0) { - oldStream.emit('end'); - clearInterval(iv); - } - else oldStream.emit('data', input.shift()); - }, 5); - - function write (row, enc, next) { - t.deepEqual(row, expected.shift()); - next(); - } - - function end () { t.ok('ended') } -}); diff --git a/node_modules/browserify/node_modules/read-only-stream/node_modules/readable-wrap/test/object_mode.js b/node_modules/browserify/node_modules/read-only-stream/node_modules/readable-wrap/test/object_mode.js deleted file mode 100644 index 6c21e411..00000000 --- a/node_modules/browserify/node_modules/read-only-stream/node_modules/readable-wrap/test/object_mode.js +++ /dev/null @@ -1,56 +0,0 @@ -var test = require('tape'); -var through = require('through2'); -var EventEmitter = require('events').EventEmitter; -var wrap = require('../'); - -test('falsey object mode', function (t) { - var oldStream = new EventEmitter; - var wrapped = wrap.obj(oldStream); - - var input = [ 5, 'a', false, 0, '', 'xyz', { x: 4 }, 7, [], 555 ]; - var expected = input.slice(); - t.plan(expected.length + 1); - - wrapped.pipe(through.obj(write, end)); - - var iv = setInterval(function () { - if (input.length === 0) { - oldStream.emit('end'); - clearInterval(iv); - } - else oldStream.emit('data', input.shift()); - }, 5); - - function write (row, enc, next) { - t.deepEqual(row, expected.shift()); - next(); - } - - function end () { t.ok('ended') } -}); - -test('falsey object mode option', function (t) { - var oldStream = new EventEmitter; - var wrapped = wrap(oldStream, { objectMode: true }); - - var input = [ 5, 'a', false, 0, '', 'xyz', { x: 4 }, 7, [], 555 ]; - var expected = input.slice(); - t.plan(expected.length + 1); - - wrapped.pipe(through.obj(write, end)); - - var iv = setInterval(function () { - if (input.length === 0) { - oldStream.emit('end'); - clearInterval(iv); - } - else oldStream.emit('data', input.shift()); - }, 5); - - function write (row, enc, next) { - t.deepEqual(row, expected.shift()); - next(); - } - - function end () { t.ok('ended') } -}); diff --git a/node_modules/browserify/node_modules/read-only-stream/node_modules/readable-wrap/test/string.js b/node_modules/browserify/node_modules/read-only-stream/node_modules/readable-wrap/test/string.js deleted file mode 100644 index b6fd2c5a..00000000 --- a/node_modules/browserify/node_modules/read-only-stream/node_modules/readable-wrap/test/string.js +++ /dev/null @@ -1,33 +0,0 @@ -var test = require('tape'); -var through = require('through2'); -var EventEmitter = require('events').EventEmitter; -var wrap = require('../'); - -test('string', function (t) { - var oldStream = new EventEmitter; - var wrapped = wrap(oldStream); - - var input = [ 'abc', 'def', 'ghi' ]; - var expected = []; - for (var i = 0; i < input.length; i++) { - expected.push(Buffer(input[i])); - } - t.plan(expected.length + 1); - - wrapped.pipe(through.obj(write, end)); - - var iv = setInterval(function () { - if (input.length === 0) { - oldStream.emit('end'); - clearInterval(iv); - } - else oldStream.emit('data', input.shift()); - }, 5); - - function write (row, enc, next) { - t.deepEqual(row, expected.shift()); - next(); - } - - function end () { t.ok('ended') } -}); diff --git a/node_modules/browserify/node_modules/read-only-stream/package.json b/node_modules/browserify/node_modules/read-only-stream/package.json deleted file mode 100644 index ef6a9a7c..00000000 --- a/node_modules/browserify/node_modules/read-only-stream/package.json +++ /dev/null @@ -1,61 +0,0 @@ -{ - "name": "read-only-stream", - "version": "1.1.1", - "description": "wrap a readable/writable stream to be read-only", - "main": "index.js", - "dependencies": { - "readable-stream": "^1.0.31", - "readable-wrap": "^1.0.0" - }, - "devDependencies": { - "concat-stream": "^1.4.6", - "tape": "^2.13.2", - "through2": "~0.6.1", - "through": "^2.3.4", - "covert": "^1.0.0" - }, - "scripts": { - "test": "tape test/*.js", - "coverage": "covert test/*.js" - }, - "repository": { - "type": "git", - "url": "git://github.com/substack/read-only-stream.git" - }, - "homepage": "https://github.com/substack/read-only-stream", - "keywords": [ - "stream", - "readonly" - ], - "author": { - "name": "James Halliday", - "email": "mail@substack.net", - "url": "http://substack.net" - }, - "license": "MIT", - "gitHead": "ab5c349f1819bd45c208e41dead2af33f44898a8", - "bugs": { - "url": "https://github.com/substack/read-only-stream/issues" - }, - "_id": "read-only-stream@1.1.1", - "_shasum": "5da77c799ed1388d3ef88a18471bb5924f8a0ba1", - "_from": "read-only-stream@>=1.1.1 <2.0.0", - "_npmVersion": "2.0.0", - "_npmUser": { - "name": "substack", - "email": "mail@substack.net" - }, - "maintainers": [ - { - "name": "substack", - "email": "mail@substack.net" - } - ], - "dist": { - "shasum": "5da77c799ed1388d3ef88a18471bb5924f8a0ba1", - "tarball": "https://registry.npmjs.org/read-only-stream/-/read-only-stream-1.1.1.tgz" - }, - "directories": {}, - "_resolved": "https://registry.npmjs.org/read-only-stream/-/read-only-stream-1.1.1.tgz", - "readme": "ERROR: No README data found!" -} diff --git a/node_modules/browserify/node_modules/read-only-stream/readme.markdown b/node_modules/browserify/node_modules/read-only-stream/readme.markdown deleted file mode 100644 index 05e6a9db..00000000 --- a/node_modules/browserify/node_modules/read-only-stream/readme.markdown +++ /dev/null @@ -1,60 +0,0 @@ -# read-only-stream - -wrap a readable/writable stream to be read-only -to prevent mucking up the input side - -[![build status](https://secure.travis-ci.org/substack/read-only-stream.png)](http://travis-ci.org/substack/read-only-stream) - -# example - -Suppose you have a module that uses a readable/writable stream internally but -want to expose just the readable part of that internal stream. This is common if -you use the writable side internally and expose the readable side as the -interface. - -Now we can write some code like this with a `through` stream internally for -convenience: - -``` js -var through = require('through2'); -var readonly = require('read-only-stream'); - -module.exports = function () { - var stream = through(); - stream.end('wooooo\n'); - return readonly(stream); -}; -``` - -but consumers won't be able to write to the input side and break the api: - -``` js -var wrap = require('./wrap.js'); -var ro = wrap(); // can't write to `ro` and muck up internal state -ro.pipe(process.stdout); -``` - -# methods - -``` js -var readonly = require('read-only-stream') -``` - -## var ro = readonly(stream) - -Return a readable stream `ro` that wraps the readable/writable `stream` argument -given to only expose the readable side. - -`stream` can be a streams1 or streams2 stream. - -# install - -With [npm](https://npmjs.org) do: - -``` -npm install read-only-stream -``` - -# license - -MIT diff --git a/node_modules/browserify/node_modules/read-only-stream/test/error.js b/node_modules/browserify/node_modules/read-only-stream/test/error.js deleted file mode 100644 index e53447c6..00000000 --- a/node_modules/browserify/node_modules/read-only-stream/test/error.js +++ /dev/null @@ -1,15 +0,0 @@ -var test = require('tape'); -var readonly = require('../'); -var through = require('through2'); - -test('error', function (t) { - t.plan(1); - - var stream = through(); - var ro = readonly(stream); - - ro.on('error', function (err) { - t.ok(err); - }); - stream.emit('error', new Error); -}); diff --git a/node_modules/browserify/node_modules/read-only-stream/test/ro.js b/node_modules/browserify/node_modules/read-only-stream/test/ro.js deleted file mode 100644 index b7f4a551..00000000 --- a/node_modules/browserify/node_modules/read-only-stream/test/ro.js +++ /dev/null @@ -1,22 +0,0 @@ -var test = require('tape'); -var readonly = require('../'); -var through = require('through2'); -var concat = require('concat-stream'); - -test('readonly', function (t) { - t.plan(2); - - var stream = through(); - stream.write('woo'); - - var ro = readonly(stream); - ro.pipe(concat(function (body) { - t.equal(body.toString('utf8'), 'woo'); - })); - - t.throws(function () { - ro.write('beep'); - }); - - stream.end(); -}); diff --git a/node_modules/browserify/node_modules/read-only-stream/test/streams1.js b/node_modules/browserify/node_modules/read-only-stream/test/streams1.js deleted file mode 100644 index dfe408fa..00000000 --- a/node_modules/browserify/node_modules/read-only-stream/test/streams1.js +++ /dev/null @@ -1,21 +0,0 @@ -var test = require('tape'); -var readonly = require('../'); -var through = require('through'); -var concat = require('concat-stream'); - -test('streams1', function (t) { - t.plan(2); - - var stream = through(); - - var ro = readonly(stream); - ro.pipe(concat(function (body) { - t.equal(body.toString('utf8'), 'woo'); - })); - - t.throws(function () { - ro.write('beep'); - }); - - stream.end('woo'); -}); diff --git a/node_modules/browserify/node_modules/readable-stream/.npmignore b/node_modules/browserify/node_modules/readable-stream/.npmignore deleted file mode 100644 index 38344f87..00000000 --- a/node_modules/browserify/node_modules/readable-stream/.npmignore +++ /dev/null @@ -1,5 +0,0 @@ -build/ -test/ -examples/ -fs.js -zlib.js \ No newline at end of file diff --git a/node_modules/browserify/node_modules/readable-stream/LICENSE b/node_modules/browserify/node_modules/readable-stream/LICENSE deleted file mode 100644 index e3d4e695..00000000 --- a/node_modules/browserify/node_modules/readable-stream/LICENSE +++ /dev/null @@ -1,18 +0,0 @@ -Copyright Joyent, Inc. and other Node contributors. All rights reserved. -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to -deal in the Software without restriction, including without limitation the -rights to use, copy, modify, merge, publish, distribute, sublicense, and/or -sell copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS -IN THE SOFTWARE. diff --git a/node_modules/browserify/node_modules/readable-stream/README.md b/node_modules/browserify/node_modules/readable-stream/README.md deleted file mode 100644 index e46b8239..00000000 --- a/node_modules/browserify/node_modules/readable-stream/README.md +++ /dev/null @@ -1,15 +0,0 @@ -# readable-stream - -***Node-core streams for userland*** - -[![NPM](https://nodei.co/npm/readable-stream.png?downloads=true&downloadRank=true)](https://nodei.co/npm/readable-stream/) -[![NPM](https://nodei.co/npm-dl/readable-stream.png&months=6&height=3)](https://nodei.co/npm/readable-stream/) - -This package is a mirror of the Streams2 and Streams3 implementations in Node-core. - -If you want to guarantee a stable streams base, regardless of what version of Node you, or the users of your libraries are using, use **readable-stream** *only* and avoid the *"stream"* module in Node-core. - -**readable-stream** comes in two major versions, v1.0.x and v1.1.x. The former tracks the Streams2 implementation in Node 0.10, including bug-fixes and minor improvements as they are added. The latter tracks Streams3 as it develops in Node 0.11; we will likely see a v1.2.x branch for Node 0.12. - -**readable-stream** uses proper patch-level versioning so if you pin to `"~1.0.0"` you’ll get the latest Node 0.10 Streams2 implementation, including any fixes and minor non-breaking improvements. The patch-level versions of 1.0.x and 1.1.x should mirror the patch-level versions of Node-core releases. You should prefer the **1.0.x** releases for now and when you’re ready to start using Streams3, pin to `"~1.1.0"` - diff --git a/node_modules/browserify/node_modules/readable-stream/duplex.js b/node_modules/browserify/node_modules/readable-stream/duplex.js deleted file mode 100644 index ca807af8..00000000 --- a/node_modules/browserify/node_modules/readable-stream/duplex.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require("./lib/_stream_duplex.js") diff --git a/node_modules/browserify/node_modules/readable-stream/float.patch b/node_modules/browserify/node_modules/readable-stream/float.patch deleted file mode 100644 index b984607a..00000000 --- a/node_modules/browserify/node_modules/readable-stream/float.patch +++ /dev/null @@ -1,923 +0,0 @@ -diff --git a/lib/_stream_duplex.js b/lib/_stream_duplex.js -index c5a741c..a2e0d8e 100644 ---- a/lib/_stream_duplex.js -+++ b/lib/_stream_duplex.js -@@ -26,8 +26,8 @@ - - module.exports = Duplex; - var util = require('util'); --var Readable = require('_stream_readable'); --var Writable = require('_stream_writable'); -+var Readable = require('./_stream_readable'); -+var Writable = require('./_stream_writable'); - - util.inherits(Duplex, Readable); - -diff --git a/lib/_stream_passthrough.js b/lib/_stream_passthrough.js -index a5e9864..330c247 100644 ---- a/lib/_stream_passthrough.js -+++ b/lib/_stream_passthrough.js -@@ -25,7 +25,7 @@ - - module.exports = PassThrough; - --var Transform = require('_stream_transform'); -+var Transform = require('./_stream_transform'); - var util = require('util'); - util.inherits(PassThrough, Transform); - -diff --git a/lib/_stream_readable.js b/lib/_stream_readable.js -index 0c3fe3e..90a8298 100644 ---- a/lib/_stream_readable.js -+++ b/lib/_stream_readable.js -@@ -23,10 +23,34 @@ module.exports = Readable; - Readable.ReadableState = ReadableState; - - var EE = require('events').EventEmitter; -+if (!EE.listenerCount) EE.listenerCount = function(emitter, type) { -+ return emitter.listeners(type).length; -+}; -+ -+if (!global.setImmediate) global.setImmediate = function setImmediate(fn) { -+ return setTimeout(fn, 0); -+}; -+if (!global.clearImmediate) global.clearImmediate = function clearImmediate(i) { -+ return clearTimeout(i); -+}; -+ - var Stream = require('stream'); - var util = require('util'); -+if (!util.isUndefined) { -+ var utilIs = require('core-util-is'); -+ for (var f in utilIs) { -+ util[f] = utilIs[f]; -+ } -+} - var StringDecoder; --var debug = util.debuglog('stream'); -+var debug; -+if (util.debuglog) -+ debug = util.debuglog('stream'); -+else try { -+ debug = require('debuglog')('stream'); -+} catch (er) { -+ debug = function() {}; -+} - - util.inherits(Readable, Stream); - -@@ -380,7 +404,7 @@ function chunkInvalid(state, chunk) { - - - function onEofChunk(stream, state) { -- if (state.decoder && !state.ended) { -+ if (state.decoder && !state.ended && state.decoder.end) { - var chunk = state.decoder.end(); - if (chunk && chunk.length) { - state.buffer.push(chunk); -diff --git a/lib/_stream_transform.js b/lib/_stream_transform.js -index b1f9fcc..b0caf57 100644 ---- a/lib/_stream_transform.js -+++ b/lib/_stream_transform.js -@@ -64,8 +64,14 @@ - - module.exports = Transform; - --var Duplex = require('_stream_duplex'); -+var Duplex = require('./_stream_duplex'); - var util = require('util'); -+if (!util.isUndefined) { -+ var utilIs = require('core-util-is'); -+ for (var f in utilIs) { -+ util[f] = utilIs[f]; -+ } -+} - util.inherits(Transform, Duplex); - - -diff --git a/lib/_stream_writable.js b/lib/_stream_writable.js -index ba2e920..f49288b 100644 ---- a/lib/_stream_writable.js -+++ b/lib/_stream_writable.js -@@ -27,6 +27,12 @@ module.exports = Writable; - Writable.WritableState = WritableState; - - var util = require('util'); -+if (!util.isUndefined) { -+ var utilIs = require('core-util-is'); -+ for (var f in utilIs) { -+ util[f] = utilIs[f]; -+ } -+} - var Stream = require('stream'); - - util.inherits(Writable, Stream); -@@ -119,7 +125,7 @@ function WritableState(options, stream) { - function Writable(options) { - // Writable ctor is applied to Duplexes, though they're not - // instanceof Writable, they're instanceof Readable. -- if (!(this instanceof Writable) && !(this instanceof Stream.Duplex)) -+ if (!(this instanceof Writable) && !(this instanceof require('./_stream_duplex'))) - return new Writable(options); - - this._writableState = new WritableState(options, this); -diff --git a/test/simple/test-stream-big-push.js b/test/simple/test-stream-big-push.js -index e3787e4..8cd2127 100644 ---- a/test/simple/test-stream-big-push.js -+++ b/test/simple/test-stream-big-push.js -@@ -21,7 +21,7 @@ - - var common = require('../common'); - var assert = require('assert'); --var stream = require('stream'); -+var stream = require('../../'); - var str = 'asdfasdfasdfasdfasdf'; - - var r = new stream.Readable({ -diff --git a/test/simple/test-stream-end-paused.js b/test/simple/test-stream-end-paused.js -index bb73777..d40efc7 100644 ---- a/test/simple/test-stream-end-paused.js -+++ b/test/simple/test-stream-end-paused.js -@@ -25,7 +25,7 @@ var gotEnd = false; - - // Make sure we don't miss the end event for paused 0-length streams - --var Readable = require('stream').Readable; -+var Readable = require('../../').Readable; - var stream = new Readable(); - var calledRead = false; - stream._read = function() { -diff --git a/test/simple/test-stream-pipe-after-end.js b/test/simple/test-stream-pipe-after-end.js -index b46ee90..0be8366 100644 ---- a/test/simple/test-stream-pipe-after-end.js -+++ b/test/simple/test-stream-pipe-after-end.js -@@ -22,8 +22,8 @@ - var common = require('../common'); - var assert = require('assert'); - --var Readable = require('_stream_readable'); --var Writable = require('_stream_writable'); -+var Readable = require('../../lib/_stream_readable'); -+var Writable = require('../../lib/_stream_writable'); - var util = require('util'); - - util.inherits(TestReadable, Readable); -diff --git a/test/simple/test-stream-pipe-cleanup.js b/test/simple/test-stream-pipe-cleanup.js -deleted file mode 100644 -index f689358..0000000 ---- a/test/simple/test-stream-pipe-cleanup.js -+++ /dev/null -@@ -1,122 +0,0 @@ --// Copyright Joyent, Inc. and other Node contributors. --// --// Permission is hereby granted, free of charge, to any person obtaining a --// copy of this software and associated documentation files (the --// "Software"), to deal in the Software without restriction, including --// without limitation the rights to use, copy, modify, merge, publish, --// distribute, sublicense, and/or sell copies of the Software, and to permit --// persons to whom the Software is furnished to do so, subject to the --// following conditions: --// --// The above copyright notice and this permission notice shall be included --// in all copies or substantial portions of the Software. --// --// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS --// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF --// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN --// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, --// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR --// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE --// USE OR OTHER DEALINGS IN THE SOFTWARE. -- --// This test asserts that Stream.prototype.pipe does not leave listeners --// hanging on the source or dest. -- --var common = require('../common'); --var stream = require('stream'); --var assert = require('assert'); --var util = require('util'); -- --function Writable() { -- this.writable = true; -- this.endCalls = 0; -- stream.Stream.call(this); --} --util.inherits(Writable, stream.Stream); --Writable.prototype.end = function() { -- this.endCalls++; --}; -- --Writable.prototype.destroy = function() { -- this.endCalls++; --}; -- --function Readable() { -- this.readable = true; -- stream.Stream.call(this); --} --util.inherits(Readable, stream.Stream); -- --function Duplex() { -- this.readable = true; -- Writable.call(this); --} --util.inherits(Duplex, Writable); -- --var i = 0; --var limit = 100; -- --var w = new Writable(); -- --var r; -- --for (i = 0; i < limit; i++) { -- r = new Readable(); -- r.pipe(w); -- r.emit('end'); --} --assert.equal(0, r.listeners('end').length); --assert.equal(limit, w.endCalls); -- --w.endCalls = 0; -- --for (i = 0; i < limit; i++) { -- r = new Readable(); -- r.pipe(w); -- r.emit('close'); --} --assert.equal(0, r.listeners('close').length); --assert.equal(limit, w.endCalls); -- --w.endCalls = 0; -- --r = new Readable(); -- --for (i = 0; i < limit; i++) { -- w = new Writable(); -- r.pipe(w); -- w.emit('close'); --} --assert.equal(0, w.listeners('close').length); -- --r = new Readable(); --w = new Writable(); --var d = new Duplex(); --r.pipe(d); // pipeline A --d.pipe(w); // pipeline B --assert.equal(r.listeners('end').length, 2); // A.onend, A.cleanup --assert.equal(r.listeners('close').length, 2); // A.onclose, A.cleanup --assert.equal(d.listeners('end').length, 2); // B.onend, B.cleanup --assert.equal(d.listeners('close').length, 3); // A.cleanup, B.onclose, B.cleanup --assert.equal(w.listeners('end').length, 0); --assert.equal(w.listeners('close').length, 1); // B.cleanup -- --r.emit('end'); --assert.equal(d.endCalls, 1); --assert.equal(w.endCalls, 0); --assert.equal(r.listeners('end').length, 0); --assert.equal(r.listeners('close').length, 0); --assert.equal(d.listeners('end').length, 2); // B.onend, B.cleanup --assert.equal(d.listeners('close').length, 2); // B.onclose, B.cleanup --assert.equal(w.listeners('end').length, 0); --assert.equal(w.listeners('close').length, 1); // B.cleanup -- --d.emit('end'); --assert.equal(d.endCalls, 1); --assert.equal(w.endCalls, 1); --assert.equal(r.listeners('end').length, 0); --assert.equal(r.listeners('close').length, 0); --assert.equal(d.listeners('end').length, 0); --assert.equal(d.listeners('close').length, 0); --assert.equal(w.listeners('end').length, 0); --assert.equal(w.listeners('close').length, 0); -diff --git a/test/simple/test-stream-pipe-error-handling.js b/test/simple/test-stream-pipe-error-handling.js -index c5d724b..c7d6b7d 100644 ---- a/test/simple/test-stream-pipe-error-handling.js -+++ b/test/simple/test-stream-pipe-error-handling.js -@@ -21,7 +21,7 @@ - - var common = require('../common'); - var assert = require('assert'); --var Stream = require('stream').Stream; -+var Stream = require('../../').Stream; - - (function testErrorListenerCatches() { - var source = new Stream(); -diff --git a/test/simple/test-stream-pipe-event.js b/test/simple/test-stream-pipe-event.js -index cb9d5fe..56f8d61 100644 ---- a/test/simple/test-stream-pipe-event.js -+++ b/test/simple/test-stream-pipe-event.js -@@ -20,7 +20,7 @@ - // USE OR OTHER DEALINGS IN THE SOFTWARE. - - var common = require('../common'); --var stream = require('stream'); -+var stream = require('../../'); - var assert = require('assert'); - var util = require('util'); - -diff --git a/test/simple/test-stream-push-order.js b/test/simple/test-stream-push-order.js -index f2e6ec2..a5c9bf9 100644 ---- a/test/simple/test-stream-push-order.js -+++ b/test/simple/test-stream-push-order.js -@@ -20,7 +20,7 @@ - // USE OR OTHER DEALINGS IN THE SOFTWARE. - - var common = require('../common.js'); --var Readable = require('stream').Readable; -+var Readable = require('../../').Readable; - var assert = require('assert'); - - var s = new Readable({ -diff --git a/test/simple/test-stream-push-strings.js b/test/simple/test-stream-push-strings.js -index 06f43dc..1701a9a 100644 ---- a/test/simple/test-stream-push-strings.js -+++ b/test/simple/test-stream-push-strings.js -@@ -22,7 +22,7 @@ - var common = require('../common'); - var assert = require('assert'); - --var Readable = require('stream').Readable; -+var Readable = require('../../').Readable; - var util = require('util'); - - util.inherits(MyStream, Readable); -diff --git a/test/simple/test-stream-readable-event.js b/test/simple/test-stream-readable-event.js -index ba6a577..a8e6f7b 100644 ---- a/test/simple/test-stream-readable-event.js -+++ b/test/simple/test-stream-readable-event.js -@@ -22,7 +22,7 @@ - var common = require('../common'); - var assert = require('assert'); - --var Readable = require('stream').Readable; -+var Readable = require('../../').Readable; - - (function first() { - // First test, not reading when the readable is added. -diff --git a/test/simple/test-stream-readable-flow-recursion.js b/test/simple/test-stream-readable-flow-recursion.js -index 2891ad6..11689ba 100644 ---- a/test/simple/test-stream-readable-flow-recursion.js -+++ b/test/simple/test-stream-readable-flow-recursion.js -@@ -27,7 +27,7 @@ var assert = require('assert'); - // more data continuously, but without triggering a nextTick - // warning or RangeError. - --var Readable = require('stream').Readable; -+var Readable = require('../../').Readable; - - // throw an error if we trigger a nextTick warning. - process.throwDeprecation = true; -diff --git a/test/simple/test-stream-unshift-empty-chunk.js b/test/simple/test-stream-unshift-empty-chunk.js -index 0c96476..7827538 100644 ---- a/test/simple/test-stream-unshift-empty-chunk.js -+++ b/test/simple/test-stream-unshift-empty-chunk.js -@@ -24,7 +24,7 @@ var assert = require('assert'); - - // This test verifies that stream.unshift(Buffer(0)) or - // stream.unshift('') does not set state.reading=false. --var Readable = require('stream').Readable; -+var Readable = require('../../').Readable; - - var r = new Readable(); - var nChunks = 10; -diff --git a/test/simple/test-stream-unshift-read-race.js b/test/simple/test-stream-unshift-read-race.js -index 83fd9fa..17c18aa 100644 ---- a/test/simple/test-stream-unshift-read-race.js -+++ b/test/simple/test-stream-unshift-read-race.js -@@ -29,7 +29,7 @@ var assert = require('assert'); - // 3. push() after the EOF signaling null is an error. - // 4. _read() is not called after pushing the EOF null chunk. - --var stream = require('stream'); -+var stream = require('../../'); - var hwm = 10; - var r = stream.Readable({ highWaterMark: hwm }); - var chunks = 10; -@@ -51,7 +51,14 @@ r._read = function(n) { - - function push(fast) { - assert(!pushedNull, 'push() after null push'); -- var c = pos >= data.length ? null : data.slice(pos, pos + n); -+ var c; -+ if (pos >= data.length) -+ c = null; -+ else { -+ if (n + pos > data.length) -+ n = data.length - pos; -+ c = data.slice(pos, pos + n); -+ } - pushedNull = c === null; - if (fast) { - pos += n; -diff --git a/test/simple/test-stream-writev.js b/test/simple/test-stream-writev.js -index 5b49e6e..b5321f3 100644 ---- a/test/simple/test-stream-writev.js -+++ b/test/simple/test-stream-writev.js -@@ -22,7 +22,7 @@ - var common = require('../common'); - var assert = require('assert'); - --var stream = require('stream'); -+var stream = require('../../'); - - var queue = []; - for (var decode = 0; decode < 2; decode++) { -diff --git a/test/simple/test-stream2-basic.js b/test/simple/test-stream2-basic.js -index 3814bf0..248c1be 100644 ---- a/test/simple/test-stream2-basic.js -+++ b/test/simple/test-stream2-basic.js -@@ -21,7 +21,7 @@ - - - var common = require('../common.js'); --var R = require('_stream_readable'); -+var R = require('../../lib/_stream_readable'); - var assert = require('assert'); - - var util = require('util'); -diff --git a/test/simple/test-stream2-compatibility.js b/test/simple/test-stream2-compatibility.js -index 6cdd4e9..f0fa84b 100644 ---- a/test/simple/test-stream2-compatibility.js -+++ b/test/simple/test-stream2-compatibility.js -@@ -21,7 +21,7 @@ - - - var common = require('../common.js'); --var R = require('_stream_readable'); -+var R = require('../../lib/_stream_readable'); - var assert = require('assert'); - - var util = require('util'); -diff --git a/test/simple/test-stream2-finish-pipe.js b/test/simple/test-stream2-finish-pipe.js -index 39b274f..006a19b 100644 ---- a/test/simple/test-stream2-finish-pipe.js -+++ b/test/simple/test-stream2-finish-pipe.js -@@ -20,7 +20,7 @@ - // USE OR OTHER DEALINGS IN THE SOFTWARE. - - var common = require('../common.js'); --var stream = require('stream'); -+var stream = require('../../'); - var Buffer = require('buffer').Buffer; - - var r = new stream.Readable(); -diff --git a/test/simple/test-stream2-fs.js b/test/simple/test-stream2-fs.js -deleted file mode 100644 -index e162406..0000000 ---- a/test/simple/test-stream2-fs.js -+++ /dev/null -@@ -1,72 +0,0 @@ --// Copyright Joyent, Inc. and other Node contributors. --// --// Permission is hereby granted, free of charge, to any person obtaining a --// copy of this software and associated documentation files (the --// "Software"), to deal in the Software without restriction, including --// without limitation the rights to use, copy, modify, merge, publish, --// distribute, sublicense, and/or sell copies of the Software, and to permit --// persons to whom the Software is furnished to do so, subject to the --// following conditions: --// --// The above copyright notice and this permission notice shall be included --// in all copies or substantial portions of the Software. --// --// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS --// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF --// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN --// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, --// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR --// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE --// USE OR OTHER DEALINGS IN THE SOFTWARE. -- -- --var common = require('../common.js'); --var R = require('_stream_readable'); --var assert = require('assert'); -- --var fs = require('fs'); --var FSReadable = fs.ReadStream; -- --var path = require('path'); --var file = path.resolve(common.fixturesDir, 'x1024.txt'); -- --var size = fs.statSync(file).size; -- --var expectLengths = [1024]; -- --var util = require('util'); --var Stream = require('stream'); -- --util.inherits(TestWriter, Stream); -- --function TestWriter() { -- Stream.apply(this); -- this.buffer = []; -- this.length = 0; --} -- --TestWriter.prototype.write = function(c) { -- this.buffer.push(c.toString()); -- this.length += c.length; -- return true; --}; -- --TestWriter.prototype.end = function(c) { -- if (c) this.buffer.push(c.toString()); -- this.emit('results', this.buffer); --} -- --var r = new FSReadable(file); --var w = new TestWriter(); -- --w.on('results', function(res) { -- console.error(res, w.length); -- assert.equal(w.length, size); -- var l = 0; -- assert.deepEqual(res.map(function (c) { -- return c.length; -- }), expectLengths); -- console.log('ok'); --}); -- --r.pipe(w); -diff --git a/test/simple/test-stream2-httpclient-response-end.js b/test/simple/test-stream2-httpclient-response-end.js -deleted file mode 100644 -index 15cffc2..0000000 ---- a/test/simple/test-stream2-httpclient-response-end.js -+++ /dev/null -@@ -1,52 +0,0 @@ --// Copyright Joyent, Inc. and other Node contributors. --// --// Permission is hereby granted, free of charge, to any person obtaining a --// copy of this software and associated documentation files (the --// "Software"), to deal in the Software without restriction, including --// without limitation the rights to use, copy, modify, merge, publish, --// distribute, sublicense, and/or sell copies of the Software, and to permit --// persons to whom the Software is furnished to do so, subject to the --// following conditions: --// --// The above copyright notice and this permission notice shall be included --// in all copies or substantial portions of the Software. --// --// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS --// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF --// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN --// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, --// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR --// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE --// USE OR OTHER DEALINGS IN THE SOFTWARE. -- --var common = require('../common.js'); --var assert = require('assert'); --var http = require('http'); --var msg = 'Hello'; --var readable_event = false; --var end_event = false; --var server = http.createServer(function(req, res) { -- res.writeHead(200, {'Content-Type': 'text/plain'}); -- res.end(msg); --}).listen(common.PORT, function() { -- http.get({port: common.PORT}, function(res) { -- var data = ''; -- res.on('readable', function() { -- console.log('readable event'); -- readable_event = true; -- data += res.read(); -- }); -- res.on('end', function() { -- console.log('end event'); -- end_event = true; -- assert.strictEqual(msg, data); -- server.close(); -- }); -- }); --}); -- --process.on('exit', function() { -- assert(readable_event); -- assert(end_event); --}); -- -diff --git a/test/simple/test-stream2-large-read-stall.js b/test/simple/test-stream2-large-read-stall.js -index 2fbfbca..667985b 100644 ---- a/test/simple/test-stream2-large-read-stall.js -+++ b/test/simple/test-stream2-large-read-stall.js -@@ -30,7 +30,7 @@ var PUSHSIZE = 20; - var PUSHCOUNT = 1000; - var HWM = 50; - --var Readable = require('stream').Readable; -+var Readable = require('../../').Readable; - var r = new Readable({ - highWaterMark: HWM - }); -@@ -39,23 +39,23 @@ var rs = r._readableState; - r._read = push; - - r.on('readable', function() { -- console.error('>> readable'); -+ //console.error('>> readable'); - do { -- console.error(' > read(%d)', READSIZE); -+ //console.error(' > read(%d)', READSIZE); - var ret = r.read(READSIZE); -- console.error(' < %j (%d remain)', ret && ret.length, rs.length); -+ //console.error(' < %j (%d remain)', ret && ret.length, rs.length); - } while (ret && ret.length === READSIZE); - -- console.error('<< after read()', -- ret && ret.length, -- rs.needReadable, -- rs.length); -+ //console.error('<< after read()', -+ // ret && ret.length, -+ // rs.needReadable, -+ // rs.length); - }); - - var endEmitted = false; - r.on('end', function() { - endEmitted = true; -- console.error('end'); -+ //console.error('end'); - }); - - var pushes = 0; -@@ -64,11 +64,11 @@ function push() { - return; - - if (pushes++ === PUSHCOUNT) { -- console.error(' push(EOF)'); -+ //console.error(' push(EOF)'); - return r.push(null); - } - -- console.error(' push #%d', pushes); -+ //console.error(' push #%d', pushes); - if (r.push(new Buffer(PUSHSIZE))) - setTimeout(push); - } -diff --git a/test/simple/test-stream2-objects.js b/test/simple/test-stream2-objects.js -index 3e6931d..ff47d89 100644 ---- a/test/simple/test-stream2-objects.js -+++ b/test/simple/test-stream2-objects.js -@@ -21,8 +21,8 @@ - - - var common = require('../common.js'); --var Readable = require('_stream_readable'); --var Writable = require('_stream_writable'); -+var Readable = require('../../lib/_stream_readable'); -+var Writable = require('../../lib/_stream_writable'); - var assert = require('assert'); - - // tiny node-tap lookalike. -diff --git a/test/simple/test-stream2-pipe-error-handling.js b/test/simple/test-stream2-pipe-error-handling.js -index cf7531c..e3f3e4e 100644 ---- a/test/simple/test-stream2-pipe-error-handling.js -+++ b/test/simple/test-stream2-pipe-error-handling.js -@@ -21,7 +21,7 @@ - - var common = require('../common'); - var assert = require('assert'); --var stream = require('stream'); -+var stream = require('../../'); - - (function testErrorListenerCatches() { - var count = 1000; -diff --git a/test/simple/test-stream2-pipe-error-once-listener.js b/test/simple/test-stream2-pipe-error-once-listener.js -index 5e8e3cb..53b2616 100755 ---- a/test/simple/test-stream2-pipe-error-once-listener.js -+++ b/test/simple/test-stream2-pipe-error-once-listener.js -@@ -24,7 +24,7 @@ var common = require('../common.js'); - var assert = require('assert'); - - var util = require('util'); --var stream = require('stream'); -+var stream = require('../../'); - - - var Read = function() { -diff --git a/test/simple/test-stream2-push.js b/test/simple/test-stream2-push.js -index b63edc3..eb2b0e9 100644 ---- a/test/simple/test-stream2-push.js -+++ b/test/simple/test-stream2-push.js -@@ -20,7 +20,7 @@ - // USE OR OTHER DEALINGS IN THE SOFTWARE. - - var common = require('../common.js'); --var stream = require('stream'); -+var stream = require('../../'); - var Readable = stream.Readable; - var Writable = stream.Writable; - var assert = require('assert'); -diff --git a/test/simple/test-stream2-read-sync-stack.js b/test/simple/test-stream2-read-sync-stack.js -index e8a7305..9740a47 100644 ---- a/test/simple/test-stream2-read-sync-stack.js -+++ b/test/simple/test-stream2-read-sync-stack.js -@@ -21,7 +21,7 @@ - - var common = require('../common'); - var assert = require('assert'); --var Readable = require('stream').Readable; -+var Readable = require('../../').Readable; - var r = new Readable(); - var N = 256 * 1024; - -diff --git a/test/simple/test-stream2-readable-empty-buffer-no-eof.js b/test/simple/test-stream2-readable-empty-buffer-no-eof.js -index cd30178..4b1659d 100644 ---- a/test/simple/test-stream2-readable-empty-buffer-no-eof.js -+++ b/test/simple/test-stream2-readable-empty-buffer-no-eof.js -@@ -22,10 +22,9 @@ - var common = require('../common'); - var assert = require('assert'); - --var Readable = require('stream').Readable; -+var Readable = require('../../').Readable; - - test1(); --test2(); - - function test1() { - var r = new Readable(); -@@ -88,31 +87,3 @@ function test1() { - console.log('ok'); - }); - } -- --function test2() { -- var r = new Readable({ encoding: 'base64' }); -- var reads = 5; -- r._read = function(n) { -- if (!reads--) -- return r.push(null); // EOF -- else -- return r.push(new Buffer('x')); -- }; -- -- var results = []; -- function flow() { -- var chunk; -- while (null !== (chunk = r.read())) -- results.push(chunk + ''); -- } -- r.on('readable', flow); -- r.on('end', function() { -- results.push('EOF'); -- }); -- flow(); -- -- process.on('exit', function() { -- assert.deepEqual(results, [ 'eHh4', 'eHg=', 'EOF' ]); -- console.log('ok'); -- }); --} -diff --git a/test/simple/test-stream2-readable-from-list.js b/test/simple/test-stream2-readable-from-list.js -index 7c96ffe..04a96f5 100644 ---- a/test/simple/test-stream2-readable-from-list.js -+++ b/test/simple/test-stream2-readable-from-list.js -@@ -21,7 +21,7 @@ - - var assert = require('assert'); - var common = require('../common.js'); --var fromList = require('_stream_readable')._fromList; -+var fromList = require('../../lib/_stream_readable')._fromList; - - // tiny node-tap lookalike. - var tests = []; -diff --git a/test/simple/test-stream2-readable-legacy-drain.js b/test/simple/test-stream2-readable-legacy-drain.js -index 675da8e..51fd3d5 100644 ---- a/test/simple/test-stream2-readable-legacy-drain.js -+++ b/test/simple/test-stream2-readable-legacy-drain.js -@@ -22,7 +22,7 @@ - var common = require('../common'); - var assert = require('assert'); - --var Stream = require('stream'); -+var Stream = require('../../'); - var Readable = Stream.Readable; - - var r = new Readable(); -diff --git a/test/simple/test-stream2-readable-non-empty-end.js b/test/simple/test-stream2-readable-non-empty-end.js -index 7314ae7..c971898 100644 ---- a/test/simple/test-stream2-readable-non-empty-end.js -+++ b/test/simple/test-stream2-readable-non-empty-end.js -@@ -21,7 +21,7 @@ - - var assert = require('assert'); - var common = require('../common.js'); --var Readable = require('_stream_readable'); -+var Readable = require('../../lib/_stream_readable'); - - var len = 0; - var chunks = new Array(10); -diff --git a/test/simple/test-stream2-readable-wrap-empty.js b/test/simple/test-stream2-readable-wrap-empty.js -index 2e5cf25..fd8a3dc 100644 ---- a/test/simple/test-stream2-readable-wrap-empty.js -+++ b/test/simple/test-stream2-readable-wrap-empty.js -@@ -22,7 +22,7 @@ - var common = require('../common'); - var assert = require('assert'); - --var Readable = require('_stream_readable'); -+var Readable = require('../../lib/_stream_readable'); - var EE = require('events').EventEmitter; - - var oldStream = new EE(); -diff --git a/test/simple/test-stream2-readable-wrap.js b/test/simple/test-stream2-readable-wrap.js -index 90eea01..6b177f7 100644 ---- a/test/simple/test-stream2-readable-wrap.js -+++ b/test/simple/test-stream2-readable-wrap.js -@@ -22,8 +22,8 @@ - var common = require('../common'); - var assert = require('assert'); - --var Readable = require('_stream_readable'); --var Writable = require('_stream_writable'); -+var Readable = require('../../lib/_stream_readable'); -+var Writable = require('../../lib/_stream_writable'); - var EE = require('events').EventEmitter; - - var testRuns = 0, completedRuns = 0; -diff --git a/test/simple/test-stream2-set-encoding.js b/test/simple/test-stream2-set-encoding.js -index 5d2c32a..685531b 100644 ---- a/test/simple/test-stream2-set-encoding.js -+++ b/test/simple/test-stream2-set-encoding.js -@@ -22,7 +22,7 @@ - - var common = require('../common.js'); - var assert = require('assert'); --var R = require('_stream_readable'); -+var R = require('../../lib/_stream_readable'); - var util = require('util'); - - // tiny node-tap lookalike. -diff --git a/test/simple/test-stream2-transform.js b/test/simple/test-stream2-transform.js -index 9c9ddd8..a0cacc6 100644 ---- a/test/simple/test-stream2-transform.js -+++ b/test/simple/test-stream2-transform.js -@@ -21,8 +21,8 @@ - - var assert = require('assert'); - var common = require('../common.js'); --var PassThrough = require('_stream_passthrough'); --var Transform = require('_stream_transform'); -+var PassThrough = require('../../').PassThrough; -+var Transform = require('../../').Transform; - - // tiny node-tap lookalike. - var tests = []; -diff --git a/test/simple/test-stream2-unpipe-drain.js b/test/simple/test-stream2-unpipe-drain.js -index d66dc3c..365b327 100644 ---- a/test/simple/test-stream2-unpipe-drain.js -+++ b/test/simple/test-stream2-unpipe-drain.js -@@ -22,7 +22,7 @@ - - var common = require('../common.js'); - var assert = require('assert'); --var stream = require('stream'); -+var stream = require('../../'); - var crypto = require('crypto'); - - var util = require('util'); -diff --git a/test/simple/test-stream2-unpipe-leak.js b/test/simple/test-stream2-unpipe-leak.js -index 99f8746..17c92ae 100644 ---- a/test/simple/test-stream2-unpipe-leak.js -+++ b/test/simple/test-stream2-unpipe-leak.js -@@ -22,7 +22,7 @@ - - var common = require('../common.js'); - var assert = require('assert'); --var stream = require('stream'); -+var stream = require('../../'); - - var chunk = new Buffer('hallo'); - -diff --git a/test/simple/test-stream2-writable.js b/test/simple/test-stream2-writable.js -index 704100c..209c3a6 100644 ---- a/test/simple/test-stream2-writable.js -+++ b/test/simple/test-stream2-writable.js -@@ -20,8 +20,8 @@ - // USE OR OTHER DEALINGS IN THE SOFTWARE. - - var common = require('../common.js'); --var W = require('_stream_writable'); --var D = require('_stream_duplex'); -+var W = require('../../').Writable; -+var D = require('../../').Duplex; - var assert = require('assert'); - - var util = require('util'); -diff --git a/test/simple/test-stream3-pause-then-read.js b/test/simple/test-stream3-pause-then-read.js -index b91bde3..2f72c15 100644 ---- a/test/simple/test-stream3-pause-then-read.js -+++ b/test/simple/test-stream3-pause-then-read.js -@@ -22,7 +22,7 @@ - var common = require('../common'); - var assert = require('assert'); - --var stream = require('stream'); -+var stream = require('../../'); - var Readable = stream.Readable; - var Writable = stream.Writable; - diff --git a/node_modules/browserify/node_modules/readable-stream/lib/_stream_duplex.js b/node_modules/browserify/node_modules/readable-stream/lib/_stream_duplex.js deleted file mode 100644 index b513d61a..00000000 --- a/node_modules/browserify/node_modules/readable-stream/lib/_stream_duplex.js +++ /dev/null @@ -1,89 +0,0 @@ -// Copyright Joyent, Inc. and other Node contributors. -// -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to permit -// persons to whom the Software is furnished to do so, subject to the -// following conditions: -// -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -// USE OR OTHER DEALINGS IN THE SOFTWARE. - -// a duplex stream is just a stream that is both readable and writable. -// Since JS doesn't have multiple prototypal inheritance, this class -// prototypally inherits from Readable, and then parasitically from -// Writable. - -module.exports = Duplex; - -/**/ -var objectKeys = Object.keys || function (obj) { - var keys = []; - for (var key in obj) keys.push(key); - return keys; -} -/**/ - - -/**/ -var util = require('core-util-is'); -util.inherits = require('inherits'); -/**/ - -var Readable = require('./_stream_readable'); -var Writable = require('./_stream_writable'); - -util.inherits(Duplex, Readable); - -forEach(objectKeys(Writable.prototype), function(method) { - if (!Duplex.prototype[method]) - Duplex.prototype[method] = Writable.prototype[method]; -}); - -function Duplex(options) { - if (!(this instanceof Duplex)) - return new Duplex(options); - - Readable.call(this, options); - Writable.call(this, options); - - if (options && options.readable === false) - this.readable = false; - - if (options && options.writable === false) - this.writable = false; - - this.allowHalfOpen = true; - if (options && options.allowHalfOpen === false) - this.allowHalfOpen = false; - - this.once('end', onend); -} - -// the no-half-open enforcer -function onend() { - // if we allow half-open state, or if the writable side ended, - // then we're ok. - if (this.allowHalfOpen || this._writableState.ended) - return; - - // no more data can be written. - // But allow more writes to happen in this tick. - process.nextTick(this.end.bind(this)); -} - -function forEach (xs, f) { - for (var i = 0, l = xs.length; i < l; i++) { - f(xs[i], i); - } -} diff --git a/node_modules/browserify/node_modules/readable-stream/lib/_stream_passthrough.js b/node_modules/browserify/node_modules/readable-stream/lib/_stream_passthrough.js deleted file mode 100644 index 895ca50a..00000000 --- a/node_modules/browserify/node_modules/readable-stream/lib/_stream_passthrough.js +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright Joyent, Inc. and other Node contributors. -// -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to permit -// persons to whom the Software is furnished to do so, subject to the -// following conditions: -// -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -// USE OR OTHER DEALINGS IN THE SOFTWARE. - -// a passthrough stream. -// basically just the most minimal sort of Transform stream. -// Every written chunk gets output as-is. - -module.exports = PassThrough; - -var Transform = require('./_stream_transform'); - -/**/ -var util = require('core-util-is'); -util.inherits = require('inherits'); -/**/ - -util.inherits(PassThrough, Transform); - -function PassThrough(options) { - if (!(this instanceof PassThrough)) - return new PassThrough(options); - - Transform.call(this, options); -} - -PassThrough.prototype._transform = function(chunk, encoding, cb) { - cb(null, chunk); -}; diff --git a/node_modules/browserify/node_modules/readable-stream/lib/_stream_readable.js b/node_modules/browserify/node_modules/readable-stream/lib/_stream_readable.js deleted file mode 100644 index 19ab3588..00000000 --- a/node_modules/browserify/node_modules/readable-stream/lib/_stream_readable.js +++ /dev/null @@ -1,951 +0,0 @@ -// Copyright Joyent, Inc. and other Node contributors. -// -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to permit -// persons to whom the Software is furnished to do so, subject to the -// following conditions: -// -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -// USE OR OTHER DEALINGS IN THE SOFTWARE. - -module.exports = Readable; - -/**/ -var isArray = require('isarray'); -/**/ - - -/**/ -var Buffer = require('buffer').Buffer; -/**/ - -Readable.ReadableState = ReadableState; - -var EE = require('events').EventEmitter; - -/**/ -if (!EE.listenerCount) EE.listenerCount = function(emitter, type) { - return emitter.listeners(type).length; -}; -/**/ - -var Stream = require('stream'); - -/**/ -var util = require('core-util-is'); -util.inherits = require('inherits'); -/**/ - -var StringDecoder; - - -/**/ -var debug = require('util'); -if (debug && debug.debuglog) { - debug = debug.debuglog('stream'); -} else { - debug = function () {}; -} -/**/ - - -util.inherits(Readable, Stream); - -function ReadableState(options, stream) { - var Duplex = require('./_stream_duplex'); - - options = options || {}; - - // the point at which it stops calling _read() to fill the buffer - // Note: 0 is a valid value, means "don't call _read preemptively ever" - var hwm = options.highWaterMark; - var defaultHwm = options.objectMode ? 16 : 16 * 1024; - this.highWaterMark = (hwm || hwm === 0) ? hwm : defaultHwm; - - // cast to ints. - this.highWaterMark = ~~this.highWaterMark; - - this.buffer = []; - this.length = 0; - this.pipes = null; - this.pipesCount = 0; - this.flowing = null; - this.ended = false; - this.endEmitted = false; - this.reading = false; - - // a flag to be able to tell if the onwrite cb is called immediately, - // or on a later tick. We set this to true at first, because any - // actions that shouldn't happen until "later" should generally also - // not happen before the first write call. - this.sync = true; - - // whenever we return null, then we set a flag to say - // that we're awaiting a 'readable' event emission. - this.needReadable = false; - this.emittedReadable = false; - this.readableListening = false; - - - // object stream flag. Used to make read(n) ignore n and to - // make all the buffer merging and length checks go away - this.objectMode = !!options.objectMode; - - if (stream instanceof Duplex) - this.objectMode = this.objectMode || !!options.readableObjectMode; - - // Crypto is kind of old and crusty. Historically, its default string - // encoding is 'binary' so we have to make this configurable. - // Everything else in the universe uses 'utf8', though. - this.defaultEncoding = options.defaultEncoding || 'utf8'; - - // when piping, we only care about 'readable' events that happen - // after read()ing all the bytes and not getting any pushback. - this.ranOut = false; - - // the number of writers that are awaiting a drain event in .pipe()s - this.awaitDrain = 0; - - // if true, a maybeReadMore has been scheduled - this.readingMore = false; - - this.decoder = null; - this.encoding = null; - if (options.encoding) { - if (!StringDecoder) - StringDecoder = require('string_decoder/').StringDecoder; - this.decoder = new StringDecoder(options.encoding); - this.encoding = options.encoding; - } -} - -function Readable(options) { - var Duplex = require('./_stream_duplex'); - - if (!(this instanceof Readable)) - return new Readable(options); - - this._readableState = new ReadableState(options, this); - - // legacy - this.readable = true; - - Stream.call(this); -} - -// Manually shove something into the read() buffer. -// This returns true if the highWaterMark has not been hit yet, -// similar to how Writable.write() returns true if you should -// write() some more. -Readable.prototype.push = function(chunk, encoding) { - var state = this._readableState; - - if (util.isString(chunk) && !state.objectMode) { - encoding = encoding || state.defaultEncoding; - if (encoding !== state.encoding) { - chunk = new Buffer(chunk, encoding); - encoding = ''; - } - } - - return readableAddChunk(this, state, chunk, encoding, false); -}; - -// Unshift should *always* be something directly out of read() -Readable.prototype.unshift = function(chunk) { - var state = this._readableState; - return readableAddChunk(this, state, chunk, '', true); -}; - -function readableAddChunk(stream, state, chunk, encoding, addToFront) { - var er = chunkInvalid(state, chunk); - if (er) { - stream.emit('error', er); - } else if (util.isNullOrUndefined(chunk)) { - state.reading = false; - if (!state.ended) - onEofChunk(stream, state); - } else if (state.objectMode || chunk && chunk.length > 0) { - if (state.ended && !addToFront) { - var e = new Error('stream.push() after EOF'); - stream.emit('error', e); - } else if (state.endEmitted && addToFront) { - var e = new Error('stream.unshift() after end event'); - stream.emit('error', e); - } else { - if (state.decoder && !addToFront && !encoding) - chunk = state.decoder.write(chunk); - - if (!addToFront) - state.reading = false; - - // if we want the data now, just emit it. - if (state.flowing && state.length === 0 && !state.sync) { - stream.emit('data', chunk); - stream.read(0); - } else { - // update the buffer info. - state.length += state.objectMode ? 1 : chunk.length; - if (addToFront) - state.buffer.unshift(chunk); - else - state.buffer.push(chunk); - - if (state.needReadable) - emitReadable(stream); - } - - maybeReadMore(stream, state); - } - } else if (!addToFront) { - state.reading = false; - } - - return needMoreData(state); -} - - - -// if it's past the high water mark, we can push in some more. -// Also, if we have no data yet, we can stand some -// more bytes. This is to work around cases where hwm=0, -// such as the repl. Also, if the push() triggered a -// readable event, and the user called read(largeNumber) such that -// needReadable was set, then we ought to push more, so that another -// 'readable' event will be triggered. -function needMoreData(state) { - return !state.ended && - (state.needReadable || - state.length < state.highWaterMark || - state.length === 0); -} - -// backwards compatibility. -Readable.prototype.setEncoding = function(enc) { - if (!StringDecoder) - StringDecoder = require('string_decoder/').StringDecoder; - this._readableState.decoder = new StringDecoder(enc); - this._readableState.encoding = enc; - return this; -}; - -// Don't raise the hwm > 128MB -var MAX_HWM = 0x800000; -function roundUpToNextPowerOf2(n) { - if (n >= MAX_HWM) { - n = MAX_HWM; - } else { - // Get the next highest power of 2 - n--; - for (var p = 1; p < 32; p <<= 1) n |= n >> p; - n++; - } - return n; -} - -function howMuchToRead(n, state) { - if (state.length === 0 && state.ended) - return 0; - - if (state.objectMode) - return n === 0 ? 0 : 1; - - if (isNaN(n) || util.isNull(n)) { - // only flow one buffer at a time - if (state.flowing && state.buffer.length) - return state.buffer[0].length; - else - return state.length; - } - - if (n <= 0) - return 0; - - // If we're asking for more than the target buffer level, - // then raise the water mark. Bump up to the next highest - // power of 2, to prevent increasing it excessively in tiny - // amounts. - if (n > state.highWaterMark) - state.highWaterMark = roundUpToNextPowerOf2(n); - - // don't have that much. return null, unless we've ended. - if (n > state.length) { - if (!state.ended) { - state.needReadable = true; - return 0; - } else - return state.length; - } - - return n; -} - -// you can override either this method, or the async _read(n) below. -Readable.prototype.read = function(n) { - debug('read', n); - var state = this._readableState; - var nOrig = n; - - if (!util.isNumber(n) || n > 0) - state.emittedReadable = false; - - // if we're doing read(0) to trigger a readable event, but we - // already have a bunch of data in the buffer, then just trigger - // the 'readable' event and move on. - if (n === 0 && - state.needReadable && - (state.length >= state.highWaterMark || state.ended)) { - debug('read: emitReadable', state.length, state.ended); - if (state.length === 0 && state.ended) - endReadable(this); - else - emitReadable(this); - return null; - } - - n = howMuchToRead(n, state); - - // if we've ended, and we're now clear, then finish it up. - if (n === 0 && state.ended) { - if (state.length === 0) - endReadable(this); - return null; - } - - // All the actual chunk generation logic needs to be - // *below* the call to _read. The reason is that in certain - // synthetic stream cases, such as passthrough streams, _read - // may be a completely synchronous operation which may change - // the state of the read buffer, providing enough data when - // before there was *not* enough. - // - // So, the steps are: - // 1. Figure out what the state of things will be after we do - // a read from the buffer. - // - // 2. If that resulting state will trigger a _read, then call _read. - // Note that this may be asynchronous, or synchronous. Yes, it is - // deeply ugly to write APIs this way, but that still doesn't mean - // that the Readable class should behave improperly, as streams are - // designed to be sync/async agnostic. - // Take note if the _read call is sync or async (ie, if the read call - // has returned yet), so that we know whether or not it's safe to emit - // 'readable' etc. - // - // 3. Actually pull the requested chunks out of the buffer and return. - - // if we need a readable event, then we need to do some reading. - var doRead = state.needReadable; - debug('need readable', doRead); - - // if we currently have less than the highWaterMark, then also read some - if (state.length === 0 || state.length - n < state.highWaterMark) { - doRead = true; - debug('length less than watermark', doRead); - } - - // however, if we've ended, then there's no point, and if we're already - // reading, then it's unnecessary. - if (state.ended || state.reading) { - doRead = false; - debug('reading or ended', doRead); - } - - if (doRead) { - debug('do read'); - state.reading = true; - state.sync = true; - // if the length is currently zero, then we *need* a readable event. - if (state.length === 0) - state.needReadable = true; - // call internal read method - this._read(state.highWaterMark); - state.sync = false; - } - - // If _read pushed data synchronously, then `reading` will be false, - // and we need to re-evaluate how much data we can return to the user. - if (doRead && !state.reading) - n = howMuchToRead(nOrig, state); - - var ret; - if (n > 0) - ret = fromList(n, state); - else - ret = null; - - if (util.isNull(ret)) { - state.needReadable = true; - n = 0; - } - - state.length -= n; - - // If we have nothing in the buffer, then we want to know - // as soon as we *do* get something into the buffer. - if (state.length === 0 && !state.ended) - state.needReadable = true; - - // If we tried to read() past the EOF, then emit end on the next tick. - if (nOrig !== n && state.ended && state.length === 0) - endReadable(this); - - if (!util.isNull(ret)) - this.emit('data', ret); - - return ret; -}; - -function chunkInvalid(state, chunk) { - var er = null; - if (!util.isBuffer(chunk) && - !util.isString(chunk) && - !util.isNullOrUndefined(chunk) && - !state.objectMode) { - er = new TypeError('Invalid non-string/buffer chunk'); - } - return er; -} - - -function onEofChunk(stream, state) { - if (state.decoder && !state.ended) { - var chunk = state.decoder.end(); - if (chunk && chunk.length) { - state.buffer.push(chunk); - state.length += state.objectMode ? 1 : chunk.length; - } - } - state.ended = true; - - // emit 'readable' now to make sure it gets picked up. - emitReadable(stream); -} - -// Don't emit readable right away in sync mode, because this can trigger -// another read() call => stack overflow. This way, it might trigger -// a nextTick recursion warning, but that's not so bad. -function emitReadable(stream) { - var state = stream._readableState; - state.needReadable = false; - if (!state.emittedReadable) { - debug('emitReadable', state.flowing); - state.emittedReadable = true; - if (state.sync) - process.nextTick(function() { - emitReadable_(stream); - }); - else - emitReadable_(stream); - } -} - -function emitReadable_(stream) { - debug('emit readable'); - stream.emit('readable'); - flow(stream); -} - - -// at this point, the user has presumably seen the 'readable' event, -// and called read() to consume some data. that may have triggered -// in turn another _read(n) call, in which case reading = true if -// it's in progress. -// However, if we're not ended, or reading, and the length < hwm, -// then go ahead and try to read some more preemptively. -function maybeReadMore(stream, state) { - if (!state.readingMore) { - state.readingMore = true; - process.nextTick(function() { - maybeReadMore_(stream, state); - }); - } -} - -function maybeReadMore_(stream, state) { - var len = state.length; - while (!state.reading && !state.flowing && !state.ended && - state.length < state.highWaterMark) { - debug('maybeReadMore read 0'); - stream.read(0); - if (len === state.length) - // didn't get any data, stop spinning. - break; - else - len = state.length; - } - state.readingMore = false; -} - -// abstract method. to be overridden in specific implementation classes. -// call cb(er, data) where data is <= n in length. -// for virtual (non-string, non-buffer) streams, "length" is somewhat -// arbitrary, and perhaps not very meaningful. -Readable.prototype._read = function(n) { - this.emit('error', new Error('not implemented')); -}; - -Readable.prototype.pipe = function(dest, pipeOpts) { - var src = this; - var state = this._readableState; - - switch (state.pipesCount) { - case 0: - state.pipes = dest; - break; - case 1: - state.pipes = [state.pipes, dest]; - break; - default: - state.pipes.push(dest); - break; - } - state.pipesCount += 1; - debug('pipe count=%d opts=%j', state.pipesCount, pipeOpts); - - var doEnd = (!pipeOpts || pipeOpts.end !== false) && - dest !== process.stdout && - dest !== process.stderr; - - var endFn = doEnd ? onend : cleanup; - if (state.endEmitted) - process.nextTick(endFn); - else - src.once('end', endFn); - - dest.on('unpipe', onunpipe); - function onunpipe(readable) { - debug('onunpipe'); - if (readable === src) { - cleanup(); - } - } - - function onend() { - debug('onend'); - dest.end(); - } - - // when the dest drains, it reduces the awaitDrain counter - // on the source. This would be more elegant with a .once() - // handler in flow(), but adding and removing repeatedly is - // too slow. - var ondrain = pipeOnDrain(src); - dest.on('drain', ondrain); - - function cleanup() { - debug('cleanup'); - // cleanup event handlers once the pipe is broken - dest.removeListener('close', onclose); - dest.removeListener('finish', onfinish); - dest.removeListener('drain', ondrain); - dest.removeListener('error', onerror); - dest.removeListener('unpipe', onunpipe); - src.removeListener('end', onend); - src.removeListener('end', cleanup); - src.removeListener('data', ondata); - - // if the reader is waiting for a drain event from this - // specific writer, then it would cause it to never start - // flowing again. - // So, if this is awaiting a drain, then we just call it now. - // If we don't know, then assume that we are waiting for one. - if (state.awaitDrain && - (!dest._writableState || dest._writableState.needDrain)) - ondrain(); - } - - src.on('data', ondata); - function ondata(chunk) { - debug('ondata'); - var ret = dest.write(chunk); - if (false === ret) { - debug('false write response, pause', - src._readableState.awaitDrain); - src._readableState.awaitDrain++; - src.pause(); - } - } - - // if the dest has an error, then stop piping into it. - // however, don't suppress the throwing behavior for this. - function onerror(er) { - debug('onerror', er); - unpipe(); - dest.removeListener('error', onerror); - if (EE.listenerCount(dest, 'error') === 0) - dest.emit('error', er); - } - // This is a brutally ugly hack to make sure that our error handler - // is attached before any userland ones. NEVER DO THIS. - if (!dest._events || !dest._events.error) - dest.on('error', onerror); - else if (isArray(dest._events.error)) - dest._events.error.unshift(onerror); - else - dest._events.error = [onerror, dest._events.error]; - - - - // Both close and finish should trigger unpipe, but only once. - function onclose() { - dest.removeListener('finish', onfinish); - unpipe(); - } - dest.once('close', onclose); - function onfinish() { - debug('onfinish'); - dest.removeListener('close', onclose); - unpipe(); - } - dest.once('finish', onfinish); - - function unpipe() { - debug('unpipe'); - src.unpipe(dest); - } - - // tell the dest that it's being piped to - dest.emit('pipe', src); - - // start the flow if it hasn't been started already. - if (!state.flowing) { - debug('pipe resume'); - src.resume(); - } - - return dest; -}; - -function pipeOnDrain(src) { - return function() { - var state = src._readableState; - debug('pipeOnDrain', state.awaitDrain); - if (state.awaitDrain) - state.awaitDrain--; - if (state.awaitDrain === 0 && EE.listenerCount(src, 'data')) { - state.flowing = true; - flow(src); - } - }; -} - - -Readable.prototype.unpipe = function(dest) { - var state = this._readableState; - - // if we're not piping anywhere, then do nothing. - if (state.pipesCount === 0) - return this; - - // just one destination. most common case. - if (state.pipesCount === 1) { - // passed in one, but it's not the right one. - if (dest && dest !== state.pipes) - return this; - - if (!dest) - dest = state.pipes; - - // got a match. - state.pipes = null; - state.pipesCount = 0; - state.flowing = false; - if (dest) - dest.emit('unpipe', this); - return this; - } - - // slow case. multiple pipe destinations. - - if (!dest) { - // remove all. - var dests = state.pipes; - var len = state.pipesCount; - state.pipes = null; - state.pipesCount = 0; - state.flowing = false; - - for (var i = 0; i < len; i++) - dests[i].emit('unpipe', this); - return this; - } - - // try to find the right one. - var i = indexOf(state.pipes, dest); - if (i === -1) - return this; - - state.pipes.splice(i, 1); - state.pipesCount -= 1; - if (state.pipesCount === 1) - state.pipes = state.pipes[0]; - - dest.emit('unpipe', this); - - return this; -}; - -// set up data events if they are asked for -// Ensure readable listeners eventually get something -Readable.prototype.on = function(ev, fn) { - var res = Stream.prototype.on.call(this, ev, fn); - - // If listening to data, and it has not explicitly been paused, - // then call resume to start the flow of data on the next tick. - if (ev === 'data' && false !== this._readableState.flowing) { - this.resume(); - } - - if (ev === 'readable' && this.readable) { - var state = this._readableState; - if (!state.readableListening) { - state.readableListening = true; - state.emittedReadable = false; - state.needReadable = true; - if (!state.reading) { - var self = this; - process.nextTick(function() { - debug('readable nexttick read 0'); - self.read(0); - }); - } else if (state.length) { - emitReadable(this, state); - } - } - } - - return res; -}; -Readable.prototype.addListener = Readable.prototype.on; - -// pause() and resume() are remnants of the legacy readable stream API -// If the user uses them, then switch into old mode. -Readable.prototype.resume = function() { - var state = this._readableState; - if (!state.flowing) { - debug('resume'); - state.flowing = true; - if (!state.reading) { - debug('resume read 0'); - this.read(0); - } - resume(this, state); - } - return this; -}; - -function resume(stream, state) { - if (!state.resumeScheduled) { - state.resumeScheduled = true; - process.nextTick(function() { - resume_(stream, state); - }); - } -} - -function resume_(stream, state) { - state.resumeScheduled = false; - stream.emit('resume'); - flow(stream); - if (state.flowing && !state.reading) - stream.read(0); -} - -Readable.prototype.pause = function() { - debug('call pause flowing=%j', this._readableState.flowing); - if (false !== this._readableState.flowing) { - debug('pause'); - this._readableState.flowing = false; - this.emit('pause'); - } - return this; -}; - -function flow(stream) { - var state = stream._readableState; - debug('flow', state.flowing); - if (state.flowing) { - do { - var chunk = stream.read(); - } while (null !== chunk && state.flowing); - } -} - -// wrap an old-style stream as the async data source. -// This is *not* part of the readable stream interface. -// It is an ugly unfortunate mess of history. -Readable.prototype.wrap = function(stream) { - var state = this._readableState; - var paused = false; - - var self = this; - stream.on('end', function() { - debug('wrapped end'); - if (state.decoder && !state.ended) { - var chunk = state.decoder.end(); - if (chunk && chunk.length) - self.push(chunk); - } - - self.push(null); - }); - - stream.on('data', function(chunk) { - debug('wrapped data'); - if (state.decoder) - chunk = state.decoder.write(chunk); - if (!chunk || !state.objectMode && !chunk.length) - return; - - var ret = self.push(chunk); - if (!ret) { - paused = true; - stream.pause(); - } - }); - - // proxy all the other methods. - // important when wrapping filters and duplexes. - for (var i in stream) { - if (util.isFunction(stream[i]) && util.isUndefined(this[i])) { - this[i] = function(method) { return function() { - return stream[method].apply(stream, arguments); - }}(i); - } - } - - // proxy certain important events. - var events = ['error', 'close', 'destroy', 'pause', 'resume']; - forEach(events, function(ev) { - stream.on(ev, self.emit.bind(self, ev)); - }); - - // when we try to consume some more bytes, simply unpause the - // underlying stream. - self._read = function(n) { - debug('wrapped _read', n); - if (paused) { - paused = false; - stream.resume(); - } - }; - - return self; -}; - - - -// exposed for testing purposes only. -Readable._fromList = fromList; - -// Pluck off n bytes from an array of buffers. -// Length is the combined lengths of all the buffers in the list. -function fromList(n, state) { - var list = state.buffer; - var length = state.length; - var stringMode = !!state.decoder; - var objectMode = !!state.objectMode; - var ret; - - // nothing in the list, definitely empty. - if (list.length === 0) - return null; - - if (length === 0) - ret = null; - else if (objectMode) - ret = list.shift(); - else if (!n || n >= length) { - // read it all, truncate the array. - if (stringMode) - ret = list.join(''); - else - ret = Buffer.concat(list, length); - list.length = 0; - } else { - // read just some of it. - if (n < list[0].length) { - // just take a part of the first list item. - // slice is the same for buffers and strings. - var buf = list[0]; - ret = buf.slice(0, n); - list[0] = buf.slice(n); - } else if (n === list[0].length) { - // first list is a perfect match - ret = list.shift(); - } else { - // complex case. - // we have enough to cover it, but it spans past the first buffer. - if (stringMode) - ret = ''; - else - ret = new Buffer(n); - - var c = 0; - for (var i = 0, l = list.length; i < l && c < n; i++) { - var buf = list[0]; - var cpy = Math.min(n - c, buf.length); - - if (stringMode) - ret += buf.slice(0, cpy); - else - buf.copy(ret, c, 0, cpy); - - if (cpy < buf.length) - list[0] = buf.slice(cpy); - else - list.shift(); - - c += cpy; - } - } - } - - return ret; -} - -function endReadable(stream) { - var state = stream._readableState; - - // If we get here before consuming all the bytes, then that is a - // bug in node. Should never happen. - if (state.length > 0) - throw new Error('endReadable called on non-empty stream'); - - if (!state.endEmitted) { - state.ended = true; - process.nextTick(function() { - // Check that we didn't get one last unshift. - if (!state.endEmitted && state.length === 0) { - state.endEmitted = true; - stream.readable = false; - stream.emit('end'); - } - }); - } -} - -function forEach (xs, f) { - for (var i = 0, l = xs.length; i < l; i++) { - f(xs[i], i); - } -} - -function indexOf (xs, x) { - for (var i = 0, l = xs.length; i < l; i++) { - if (xs[i] === x) return i; - } - return -1; -} diff --git a/node_modules/browserify/node_modules/readable-stream/lib/_stream_transform.js b/node_modules/browserify/node_modules/readable-stream/lib/_stream_transform.js deleted file mode 100644 index 905c5e45..00000000 --- a/node_modules/browserify/node_modules/readable-stream/lib/_stream_transform.js +++ /dev/null @@ -1,209 +0,0 @@ -// Copyright Joyent, Inc. and other Node contributors. -// -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to permit -// persons to whom the Software is furnished to do so, subject to the -// following conditions: -// -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -// USE OR OTHER DEALINGS IN THE SOFTWARE. - - -// a transform stream is a readable/writable stream where you do -// something with the data. Sometimes it's called a "filter", -// but that's not a great name for it, since that implies a thing where -// some bits pass through, and others are simply ignored. (That would -// be a valid example of a transform, of course.) -// -// While the output is causally related to the input, it's not a -// necessarily symmetric or synchronous transformation. For example, -// a zlib stream might take multiple plain-text writes(), and then -// emit a single compressed chunk some time in the future. -// -// Here's how this works: -// -// The Transform stream has all the aspects of the readable and writable -// stream classes. When you write(chunk), that calls _write(chunk,cb) -// internally, and returns false if there's a lot of pending writes -// buffered up. When you call read(), that calls _read(n) until -// there's enough pending readable data buffered up. -// -// In a transform stream, the written data is placed in a buffer. When -// _read(n) is called, it transforms the queued up data, calling the -// buffered _write cb's as it consumes chunks. If consuming a single -// written chunk would result in multiple output chunks, then the first -// outputted bit calls the readcb, and subsequent chunks just go into -// the read buffer, and will cause it to emit 'readable' if necessary. -// -// This way, back-pressure is actually determined by the reading side, -// since _read has to be called to start processing a new chunk. However, -// a pathological inflate type of transform can cause excessive buffering -// here. For example, imagine a stream where every byte of input is -// interpreted as an integer from 0-255, and then results in that many -// bytes of output. Writing the 4 bytes {ff,ff,ff,ff} would result in -// 1kb of data being output. In this case, you could write a very small -// amount of input, and end up with a very large amount of output. In -// such a pathological inflating mechanism, there'd be no way to tell -// the system to stop doing the transform. A single 4MB write could -// cause the system to run out of memory. -// -// However, even in such a pathological case, only a single written chunk -// would be consumed, and then the rest would wait (un-transformed) until -// the results of the previous transformed chunk were consumed. - -module.exports = Transform; - -var Duplex = require('./_stream_duplex'); - -/**/ -var util = require('core-util-is'); -util.inherits = require('inherits'); -/**/ - -util.inherits(Transform, Duplex); - - -function TransformState(options, stream) { - this.afterTransform = function(er, data) { - return afterTransform(stream, er, data); - }; - - this.needTransform = false; - this.transforming = false; - this.writecb = null; - this.writechunk = null; -} - -function afterTransform(stream, er, data) { - var ts = stream._transformState; - ts.transforming = false; - - var cb = ts.writecb; - - if (!cb) - return stream.emit('error', new Error('no writecb in Transform class')); - - ts.writechunk = null; - ts.writecb = null; - - if (!util.isNullOrUndefined(data)) - stream.push(data); - - if (cb) - cb(er); - - var rs = stream._readableState; - rs.reading = false; - if (rs.needReadable || rs.length < rs.highWaterMark) { - stream._read(rs.highWaterMark); - } -} - - -function Transform(options) { - if (!(this instanceof Transform)) - return new Transform(options); - - Duplex.call(this, options); - - this._transformState = new TransformState(options, this); - - // when the writable side finishes, then flush out anything remaining. - var stream = this; - - // start out asking for a readable event once data is transformed. - this._readableState.needReadable = true; - - // we have implemented the _read method, and done the other things - // that Readable wants before the first _read call, so unset the - // sync guard flag. - this._readableState.sync = false; - - this.once('prefinish', function() { - if (util.isFunction(this._flush)) - this._flush(function(er) { - done(stream, er); - }); - else - done(stream); - }); -} - -Transform.prototype.push = function(chunk, encoding) { - this._transformState.needTransform = false; - return Duplex.prototype.push.call(this, chunk, encoding); -}; - -// This is the part where you do stuff! -// override this function in implementation classes. -// 'chunk' is an input chunk. -// -// Call `push(newChunk)` to pass along transformed output -// to the readable side. You may call 'push' zero or more times. -// -// Call `cb(err)` when you are done with this chunk. If you pass -// an error, then that'll put the hurt on the whole operation. If you -// never call cb(), then you'll never get another chunk. -Transform.prototype._transform = function(chunk, encoding, cb) { - throw new Error('not implemented'); -}; - -Transform.prototype._write = function(chunk, encoding, cb) { - var ts = this._transformState; - ts.writecb = cb; - ts.writechunk = chunk; - ts.writeencoding = encoding; - if (!ts.transforming) { - var rs = this._readableState; - if (ts.needTransform || - rs.needReadable || - rs.length < rs.highWaterMark) - this._read(rs.highWaterMark); - } -}; - -// Doesn't matter what the args are here. -// _transform does all the work. -// That we got here means that the readable side wants more data. -Transform.prototype._read = function(n) { - var ts = this._transformState; - - if (!util.isNull(ts.writechunk) && ts.writecb && !ts.transforming) { - ts.transforming = true; - this._transform(ts.writechunk, ts.writeencoding, ts.afterTransform); - } else { - // mark that we need a transform, so that any data that comes in - // will get processed, now that we've asked for it. - ts.needTransform = true; - } -}; - - -function done(stream, er) { - if (er) - return stream.emit('error', er); - - // if there's nothing in the write buffer, then that means - // that nothing more will ever be provided - var ws = stream._writableState; - var ts = stream._transformState; - - if (ws.length) - throw new Error('calling transform done when ws.length != 0'); - - if (ts.transforming) - throw new Error('calling transform done when still transforming'); - - return stream.push(null); -} diff --git a/node_modules/browserify/node_modules/readable-stream/lib/_stream_writable.js b/node_modules/browserify/node_modules/readable-stream/lib/_stream_writable.js deleted file mode 100644 index db8539cd..00000000 --- a/node_modules/browserify/node_modules/readable-stream/lib/_stream_writable.js +++ /dev/null @@ -1,477 +0,0 @@ -// Copyright Joyent, Inc. and other Node contributors. -// -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to permit -// persons to whom the Software is furnished to do so, subject to the -// following conditions: -// -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -// USE OR OTHER DEALINGS IN THE SOFTWARE. - -// A bit simpler than readable streams. -// Implement an async ._write(chunk, cb), and it'll handle all -// the drain event emission and buffering. - -module.exports = Writable; - -/**/ -var Buffer = require('buffer').Buffer; -/**/ - -Writable.WritableState = WritableState; - - -/**/ -var util = require('core-util-is'); -util.inherits = require('inherits'); -/**/ - -var Stream = require('stream'); - -util.inherits(Writable, Stream); - -function WriteReq(chunk, encoding, cb) { - this.chunk = chunk; - this.encoding = encoding; - this.callback = cb; -} - -function WritableState(options, stream) { - var Duplex = require('./_stream_duplex'); - - options = options || {}; - - // the point at which write() starts returning false - // Note: 0 is a valid value, means that we always return false if - // the entire buffer is not flushed immediately on write() - var hwm = options.highWaterMark; - var defaultHwm = options.objectMode ? 16 : 16 * 1024; - this.highWaterMark = (hwm || hwm === 0) ? hwm : defaultHwm; - - // object stream flag to indicate whether or not this stream - // contains buffers or objects. - this.objectMode = !!options.objectMode; - - if (stream instanceof Duplex) - this.objectMode = this.objectMode || !!options.writableObjectMode; - - // cast to ints. - this.highWaterMark = ~~this.highWaterMark; - - this.needDrain = false; - // at the start of calling end() - this.ending = false; - // when end() has been called, and returned - this.ended = false; - // when 'finish' is emitted - this.finished = false; - - // should we decode strings into buffers before passing to _write? - // this is here so that some node-core streams can optimize string - // handling at a lower level. - var noDecode = options.decodeStrings === false; - this.decodeStrings = !noDecode; - - // Crypto is kind of old and crusty. Historically, its default string - // encoding is 'binary' so we have to make this configurable. - // Everything else in the universe uses 'utf8', though. - this.defaultEncoding = options.defaultEncoding || 'utf8'; - - // not an actual buffer we keep track of, but a measurement - // of how much we're waiting to get pushed to some underlying - // socket or file. - this.length = 0; - - // a flag to see when we're in the middle of a write. - this.writing = false; - - // when true all writes will be buffered until .uncork() call - this.corked = 0; - - // a flag to be able to tell if the onwrite cb is called immediately, - // or on a later tick. We set this to true at first, because any - // actions that shouldn't happen until "later" should generally also - // not happen before the first write call. - this.sync = true; - - // a flag to know if we're processing previously buffered items, which - // may call the _write() callback in the same tick, so that we don't - // end up in an overlapped onwrite situation. - this.bufferProcessing = false; - - // the callback that's passed to _write(chunk,cb) - this.onwrite = function(er) { - onwrite(stream, er); - }; - - // the callback that the user supplies to write(chunk,encoding,cb) - this.writecb = null; - - // the amount that is being written when _write is called. - this.writelen = 0; - - this.buffer = []; - - // number of pending user-supplied write callbacks - // this must be 0 before 'finish' can be emitted - this.pendingcb = 0; - - // emit prefinish if the only thing we're waiting for is _write cbs - // This is relevant for synchronous Transform streams - this.prefinished = false; - - // True if the error was already emitted and should not be thrown again - this.errorEmitted = false; -} - -function Writable(options) { - var Duplex = require('./_stream_duplex'); - - // Writable ctor is applied to Duplexes, though they're not - // instanceof Writable, they're instanceof Readable. - if (!(this instanceof Writable) && !(this instanceof Duplex)) - return new Writable(options); - - this._writableState = new WritableState(options, this); - - // legacy. - this.writable = true; - - Stream.call(this); -} - -// Otherwise people can pipe Writable streams, which is just wrong. -Writable.prototype.pipe = function() { - this.emit('error', new Error('Cannot pipe. Not readable.')); -}; - - -function writeAfterEnd(stream, state, cb) { - var er = new Error('write after end'); - // TODO: defer error events consistently everywhere, not just the cb - stream.emit('error', er); - process.nextTick(function() { - cb(er); - }); -} - -// If we get something that is not a buffer, string, null, or undefined, -// and we're not in objectMode, then that's an error. -// Otherwise stream chunks are all considered to be of length=1, and the -// watermarks determine how many objects to keep in the buffer, rather than -// how many bytes or characters. -function validChunk(stream, state, chunk, cb) { - var valid = true; - if (!util.isBuffer(chunk) && - !util.isString(chunk) && - !util.isNullOrUndefined(chunk) && - !state.objectMode) { - var er = new TypeError('Invalid non-string/buffer chunk'); - stream.emit('error', er); - process.nextTick(function() { - cb(er); - }); - valid = false; - } - return valid; -} - -Writable.prototype.write = function(chunk, encoding, cb) { - var state = this._writableState; - var ret = false; - - if (util.isFunction(encoding)) { - cb = encoding; - encoding = null; - } - - if (util.isBuffer(chunk)) - encoding = 'buffer'; - else if (!encoding) - encoding = state.defaultEncoding; - - if (!util.isFunction(cb)) - cb = function() {}; - - if (state.ended) - writeAfterEnd(this, state, cb); - else if (validChunk(this, state, chunk, cb)) { - state.pendingcb++; - ret = writeOrBuffer(this, state, chunk, encoding, cb); - } - - return ret; -}; - -Writable.prototype.cork = function() { - var state = this._writableState; - - state.corked++; -}; - -Writable.prototype.uncork = function() { - var state = this._writableState; - - if (state.corked) { - state.corked--; - - if (!state.writing && - !state.corked && - !state.finished && - !state.bufferProcessing && - state.buffer.length) - clearBuffer(this, state); - } -}; - -function decodeChunk(state, chunk, encoding) { - if (!state.objectMode && - state.decodeStrings !== false && - util.isString(chunk)) { - chunk = new Buffer(chunk, encoding); - } - return chunk; -} - -// if we're already writing something, then just put this -// in the queue, and wait our turn. Otherwise, call _write -// If we return false, then we need a drain event, so set that flag. -function writeOrBuffer(stream, state, chunk, encoding, cb) { - chunk = decodeChunk(state, chunk, encoding); - if (util.isBuffer(chunk)) - encoding = 'buffer'; - var len = state.objectMode ? 1 : chunk.length; - - state.length += len; - - var ret = state.length < state.highWaterMark; - // we must ensure that previous needDrain will not be reset to false. - if (!ret) - state.needDrain = true; - - if (state.writing || state.corked) - state.buffer.push(new WriteReq(chunk, encoding, cb)); - else - doWrite(stream, state, false, len, chunk, encoding, cb); - - return ret; -} - -function doWrite(stream, state, writev, len, chunk, encoding, cb) { - state.writelen = len; - state.writecb = cb; - state.writing = true; - state.sync = true; - if (writev) - stream._writev(chunk, state.onwrite); - else - stream._write(chunk, encoding, state.onwrite); - state.sync = false; -} - -function onwriteError(stream, state, sync, er, cb) { - if (sync) - process.nextTick(function() { - state.pendingcb--; - cb(er); - }); - else { - state.pendingcb--; - cb(er); - } - - stream._writableState.errorEmitted = true; - stream.emit('error', er); -} - -function onwriteStateUpdate(state) { - state.writing = false; - state.writecb = null; - state.length -= state.writelen; - state.writelen = 0; -} - -function onwrite(stream, er) { - var state = stream._writableState; - var sync = state.sync; - var cb = state.writecb; - - onwriteStateUpdate(state); - - if (er) - onwriteError(stream, state, sync, er, cb); - else { - // Check if we're actually ready to finish, but don't emit yet - var finished = needFinish(stream, state); - - if (!finished && - !state.corked && - !state.bufferProcessing && - state.buffer.length) { - clearBuffer(stream, state); - } - - if (sync) { - process.nextTick(function() { - afterWrite(stream, state, finished, cb); - }); - } else { - afterWrite(stream, state, finished, cb); - } - } -} - -function afterWrite(stream, state, finished, cb) { - if (!finished) - onwriteDrain(stream, state); - state.pendingcb--; - cb(); - finishMaybe(stream, state); -} - -// Must force callback to be called on nextTick, so that we don't -// emit 'drain' before the write() consumer gets the 'false' return -// value, and has a chance to attach a 'drain' listener. -function onwriteDrain(stream, state) { - if (state.length === 0 && state.needDrain) { - state.needDrain = false; - stream.emit('drain'); - } -} - - -// if there's something in the buffer waiting, then process it -function clearBuffer(stream, state) { - state.bufferProcessing = true; - - if (stream._writev && state.buffer.length > 1) { - // Fast case, write everything using _writev() - var cbs = []; - for (var c = 0; c < state.buffer.length; c++) - cbs.push(state.buffer[c].callback); - - // count the one we are adding, as well. - // TODO(isaacs) clean this up - state.pendingcb++; - doWrite(stream, state, true, state.length, state.buffer, '', function(err) { - for (var i = 0; i < cbs.length; i++) { - state.pendingcb--; - cbs[i](err); - } - }); - - // Clear buffer - state.buffer = []; - } else { - // Slow case, write chunks one-by-one - for (var c = 0; c < state.buffer.length; c++) { - var entry = state.buffer[c]; - var chunk = entry.chunk; - var encoding = entry.encoding; - var cb = entry.callback; - var len = state.objectMode ? 1 : chunk.length; - - doWrite(stream, state, false, len, chunk, encoding, cb); - - // if we didn't call the onwrite immediately, then - // it means that we need to wait until it does. - // also, that means that the chunk and cb are currently - // being processed, so move the buffer counter past them. - if (state.writing) { - c++; - break; - } - } - - if (c < state.buffer.length) - state.buffer = state.buffer.slice(c); - else - state.buffer.length = 0; - } - - state.bufferProcessing = false; -} - -Writable.prototype._write = function(chunk, encoding, cb) { - cb(new Error('not implemented')); - -}; - -Writable.prototype._writev = null; - -Writable.prototype.end = function(chunk, encoding, cb) { - var state = this._writableState; - - if (util.isFunction(chunk)) { - cb = chunk; - chunk = null; - encoding = null; - } else if (util.isFunction(encoding)) { - cb = encoding; - encoding = null; - } - - if (!util.isNullOrUndefined(chunk)) - this.write(chunk, encoding); - - // .end() fully uncorks - if (state.corked) { - state.corked = 1; - this.uncork(); - } - - // ignore unnecessary end() calls. - if (!state.ending && !state.finished) - endWritable(this, state, cb); -}; - - -function needFinish(stream, state) { - return (state.ending && - state.length === 0 && - !state.finished && - !state.writing); -} - -function prefinish(stream, state) { - if (!state.prefinished) { - state.prefinished = true; - stream.emit('prefinish'); - } -} - -function finishMaybe(stream, state) { - var need = needFinish(stream, state); - if (need) { - if (state.pendingcb === 0) { - prefinish(stream, state); - state.finished = true; - stream.emit('finish'); - } else - prefinish(stream, state); - } - return need; -} - -function endWritable(stream, state, cb) { - state.ending = true; - finishMaybe(stream, state); - if (cb) { - if (state.finished) - process.nextTick(cb); - else - stream.once('finish', cb); - } - state.ended = true; -} diff --git a/node_modules/browserify/node_modules/readable-stream/node_modules/core-util-is/LICENSE b/node_modules/browserify/node_modules/readable-stream/node_modules/core-util-is/LICENSE deleted file mode 100644 index d8d7f943..00000000 --- a/node_modules/browserify/node_modules/readable-stream/node_modules/core-util-is/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright Node.js contributors. All rights reserved. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to -deal in the Software without restriction, including without limitation the -rights to use, copy, modify, merge, publish, distribute, sublicense, and/or -sell copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS -IN THE SOFTWARE. diff --git a/node_modules/browserify/node_modules/readable-stream/node_modules/core-util-is/README.md b/node_modules/browserify/node_modules/readable-stream/node_modules/core-util-is/README.md deleted file mode 100644 index 5a76b414..00000000 --- a/node_modules/browserify/node_modules/readable-stream/node_modules/core-util-is/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# core-util-is - -The `util.is*` functions introduced in Node v0.12. diff --git a/node_modules/browserify/node_modules/readable-stream/node_modules/core-util-is/float.patch b/node_modules/browserify/node_modules/readable-stream/node_modules/core-util-is/float.patch deleted file mode 100644 index a06d5c05..00000000 --- a/node_modules/browserify/node_modules/readable-stream/node_modules/core-util-is/float.patch +++ /dev/null @@ -1,604 +0,0 @@ -diff --git a/lib/util.js b/lib/util.js -index a03e874..9074e8e 100644 ---- a/lib/util.js -+++ b/lib/util.js -@@ -19,430 +19,6 @@ - // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE - // USE OR OTHER DEALINGS IN THE SOFTWARE. - --var formatRegExp = /%[sdj%]/g; --exports.format = function(f) { -- if (!isString(f)) { -- var objects = []; -- for (var i = 0; i < arguments.length; i++) { -- objects.push(inspect(arguments[i])); -- } -- return objects.join(' '); -- } -- -- var i = 1; -- var args = arguments; -- var len = args.length; -- var str = String(f).replace(formatRegExp, function(x) { -- if (x === '%%') return '%'; -- if (i >= len) return x; -- switch (x) { -- case '%s': return String(args[i++]); -- case '%d': return Number(args[i++]); -- case '%j': -- try { -- return JSON.stringify(args[i++]); -- } catch (_) { -- return '[Circular]'; -- } -- default: -- return x; -- } -- }); -- for (var x = args[i]; i < len; x = args[++i]) { -- if (isNull(x) || !isObject(x)) { -- str += ' ' + x; -- } else { -- str += ' ' + inspect(x); -- } -- } -- return str; --}; -- -- --// Mark that a method should not be used. --// Returns a modified function which warns once by default. --// If --no-deprecation is set, then it is a no-op. --exports.deprecate = function(fn, msg) { -- // Allow for deprecating things in the process of starting up. -- if (isUndefined(global.process)) { -- return function() { -- return exports.deprecate(fn, msg).apply(this, arguments); -- }; -- } -- -- if (process.noDeprecation === true) { -- return fn; -- } -- -- var warned = false; -- function deprecated() { -- if (!warned) { -- if (process.throwDeprecation) { -- throw new Error(msg); -- } else if (process.traceDeprecation) { -- console.trace(msg); -- } else { -- console.error(msg); -- } -- warned = true; -- } -- return fn.apply(this, arguments); -- } -- -- return deprecated; --}; -- -- --var debugs = {}; --var debugEnviron; --exports.debuglog = function(set) { -- if (isUndefined(debugEnviron)) -- debugEnviron = process.env.NODE_DEBUG || ''; -- set = set.toUpperCase(); -- if (!debugs[set]) { -- if (new RegExp('\\b' + set + '\\b', 'i').test(debugEnviron)) { -- var pid = process.pid; -- debugs[set] = function() { -- var msg = exports.format.apply(exports, arguments); -- console.error('%s %d: %s', set, pid, msg); -- }; -- } else { -- debugs[set] = function() {}; -- } -- } -- return debugs[set]; --}; -- -- --/** -- * Echos the value of a value. Trys to print the value out -- * in the best way possible given the different types. -- * -- * @param {Object} obj The object to print out. -- * @param {Object} opts Optional options object that alters the output. -- */ --/* legacy: obj, showHidden, depth, colors*/ --function inspect(obj, opts) { -- // default options -- var ctx = { -- seen: [], -- stylize: stylizeNoColor -- }; -- // legacy... -- if (arguments.length >= 3) ctx.depth = arguments[2]; -- if (arguments.length >= 4) ctx.colors = arguments[3]; -- if (isBoolean(opts)) { -- // legacy... -- ctx.showHidden = opts; -- } else if (opts) { -- // got an "options" object -- exports._extend(ctx, opts); -- } -- // set default options -- if (isUndefined(ctx.showHidden)) ctx.showHidden = false; -- if (isUndefined(ctx.depth)) ctx.depth = 2; -- if (isUndefined(ctx.colors)) ctx.colors = false; -- if (isUndefined(ctx.customInspect)) ctx.customInspect = true; -- if (ctx.colors) ctx.stylize = stylizeWithColor; -- return formatValue(ctx, obj, ctx.depth); --} --exports.inspect = inspect; -- -- --// http://en.wikipedia.org/wiki/ANSI_escape_code#graphics --inspect.colors = { -- 'bold' : [1, 22], -- 'italic' : [3, 23], -- 'underline' : [4, 24], -- 'inverse' : [7, 27], -- 'white' : [37, 39], -- 'grey' : [90, 39], -- 'black' : [30, 39], -- 'blue' : [34, 39], -- 'cyan' : [36, 39], -- 'green' : [32, 39], -- 'magenta' : [35, 39], -- 'red' : [31, 39], -- 'yellow' : [33, 39] --}; -- --// Don't use 'blue' not visible on cmd.exe --inspect.styles = { -- 'special': 'cyan', -- 'number': 'yellow', -- 'boolean': 'yellow', -- 'undefined': 'grey', -- 'null': 'bold', -- 'string': 'green', -- 'date': 'magenta', -- // "name": intentionally not styling -- 'regexp': 'red' --}; -- -- --function stylizeWithColor(str, styleType) { -- var style = inspect.styles[styleType]; -- -- if (style) { -- return '\u001b[' + inspect.colors[style][0] + 'm' + str + -- '\u001b[' + inspect.colors[style][1] + 'm'; -- } else { -- return str; -- } --} -- -- --function stylizeNoColor(str, styleType) { -- return str; --} -- -- --function arrayToHash(array) { -- var hash = {}; -- -- array.forEach(function(val, idx) { -- hash[val] = true; -- }); -- -- return hash; --} -- -- --function formatValue(ctx, value, recurseTimes) { -- // Provide a hook for user-specified inspect functions. -- // Check that value is an object with an inspect function on it -- if (ctx.customInspect && -- value && -- isFunction(value.inspect) && -- // Filter out the util module, it's inspect function is special -- value.inspect !== exports.inspect && -- // Also filter out any prototype objects using the circular check. -- !(value.constructor && value.constructor.prototype === value)) { -- var ret = value.inspect(recurseTimes, ctx); -- if (!isString(ret)) { -- ret = formatValue(ctx, ret, recurseTimes); -- } -- return ret; -- } -- -- // Primitive types cannot have properties -- var primitive = formatPrimitive(ctx, value); -- if (primitive) { -- return primitive; -- } -- -- // Look up the keys of the object. -- var keys = Object.keys(value); -- var visibleKeys = arrayToHash(keys); -- -- if (ctx.showHidden) { -- keys = Object.getOwnPropertyNames(value); -- } -- -- // Some type of object without properties can be shortcutted. -- if (keys.length === 0) { -- if (isFunction(value)) { -- var name = value.name ? ': ' + value.name : ''; -- return ctx.stylize('[Function' + name + ']', 'special'); -- } -- if (isRegExp(value)) { -- return ctx.stylize(RegExp.prototype.toString.call(value), 'regexp'); -- } -- if (isDate(value)) { -- return ctx.stylize(Date.prototype.toString.call(value), 'date'); -- } -- if (isError(value)) { -- return formatError(value); -- } -- } -- -- var base = '', array = false, braces = ['{', '}']; -- -- // Make Array say that they are Array -- if (isArray(value)) { -- array = true; -- braces = ['[', ']']; -- } -- -- // Make functions say that they are functions -- if (isFunction(value)) { -- var n = value.name ? ': ' + value.name : ''; -- base = ' [Function' + n + ']'; -- } -- -- // Make RegExps say that they are RegExps -- if (isRegExp(value)) { -- base = ' ' + RegExp.prototype.toString.call(value); -- } -- -- // Make dates with properties first say the date -- if (isDate(value)) { -- base = ' ' + Date.prototype.toUTCString.call(value); -- } -- -- // Make error with message first say the error -- if (isError(value)) { -- base = ' ' + formatError(value); -- } -- -- if (keys.length === 0 && (!array || value.length == 0)) { -- return braces[0] + base + braces[1]; -- } -- -- if (recurseTimes < 0) { -- if (isRegExp(value)) { -- return ctx.stylize(RegExp.prototype.toString.call(value), 'regexp'); -- } else { -- return ctx.stylize('[Object]', 'special'); -- } -- } -- -- ctx.seen.push(value); -- -- var output; -- if (array) { -- output = formatArray(ctx, value, recurseTimes, visibleKeys, keys); -- } else { -- output = keys.map(function(key) { -- return formatProperty(ctx, value, recurseTimes, visibleKeys, key, array); -- }); -- } -- -- ctx.seen.pop(); -- -- return reduceToSingleString(output, base, braces); --} -- -- --function formatPrimitive(ctx, value) { -- if (isUndefined(value)) -- return ctx.stylize('undefined', 'undefined'); -- if (isString(value)) { -- var simple = '\'' + JSON.stringify(value).replace(/^"|"$/g, '') -- .replace(/'/g, "\\'") -- .replace(/\\"/g, '"') + '\''; -- return ctx.stylize(simple, 'string'); -- } -- if (isNumber(value)) { -- // Format -0 as '-0'. Strict equality won't distinguish 0 from -0, -- // so instead we use the fact that 1 / -0 < 0 whereas 1 / 0 > 0 . -- if (value === 0 && 1 / value < 0) -- return ctx.stylize('-0', 'number'); -- return ctx.stylize('' + value, 'number'); -- } -- if (isBoolean(value)) -- return ctx.stylize('' + value, 'boolean'); -- // For some reason typeof null is "object", so special case here. -- if (isNull(value)) -- return ctx.stylize('null', 'null'); --} -- -- --function formatError(value) { -- return '[' + Error.prototype.toString.call(value) + ']'; --} -- -- --function formatArray(ctx, value, recurseTimes, visibleKeys, keys) { -- var output = []; -- for (var i = 0, l = value.length; i < l; ++i) { -- if (hasOwnProperty(value, String(i))) { -- output.push(formatProperty(ctx, value, recurseTimes, visibleKeys, -- String(i), true)); -- } else { -- output.push(''); -- } -- } -- keys.forEach(function(key) { -- if (!key.match(/^\d+$/)) { -- output.push(formatProperty(ctx, value, recurseTimes, visibleKeys, -- key, true)); -- } -- }); -- return output; --} -- -- --function formatProperty(ctx, value, recurseTimes, visibleKeys, key, array) { -- var name, str, desc; -- desc = Object.getOwnPropertyDescriptor(value, key) || { value: value[key] }; -- if (desc.get) { -- if (desc.set) { -- str = ctx.stylize('[Getter/Setter]', 'special'); -- } else { -- str = ctx.stylize('[Getter]', 'special'); -- } -- } else { -- if (desc.set) { -- str = ctx.stylize('[Setter]', 'special'); -- } -- } -- if (!hasOwnProperty(visibleKeys, key)) { -- name = '[' + key + ']'; -- } -- if (!str) { -- if (ctx.seen.indexOf(desc.value) < 0) { -- if (isNull(recurseTimes)) { -- str = formatValue(ctx, desc.value, null); -- } else { -- str = formatValue(ctx, desc.value, recurseTimes - 1); -- } -- if (str.indexOf('\n') > -1) { -- if (array) { -- str = str.split('\n').map(function(line) { -- return ' ' + line; -- }).join('\n').substr(2); -- } else { -- str = '\n' + str.split('\n').map(function(line) { -- return ' ' + line; -- }).join('\n'); -- } -- } -- } else { -- str = ctx.stylize('[Circular]', 'special'); -- } -- } -- if (isUndefined(name)) { -- if (array && key.match(/^\d+$/)) { -- return str; -- } -- name = JSON.stringify('' + key); -- if (name.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)) { -- name = name.substr(1, name.length - 2); -- name = ctx.stylize(name, 'name'); -- } else { -- name = name.replace(/'/g, "\\'") -- .replace(/\\"/g, '"') -- .replace(/(^"|"$)/g, "'"); -- name = ctx.stylize(name, 'string'); -- } -- } -- -- return name + ': ' + str; --} -- -- --function reduceToSingleString(output, base, braces) { -- var numLinesEst = 0; -- var length = output.reduce(function(prev, cur) { -- numLinesEst++; -- if (cur.indexOf('\n') >= 0) numLinesEst++; -- return prev + cur.replace(/\u001b\[\d\d?m/g, '').length + 1; -- }, 0); -- -- if (length > 60) { -- return braces[0] + -- (base === '' ? '' : base + '\n ') + -- ' ' + -- output.join(',\n ') + -- ' ' + -- braces[1]; -- } -- -- return braces[0] + base + ' ' + output.join(', ') + ' ' + braces[1]; --} -- -- - // NOTE: These type checking functions intentionally don't use `instanceof` - // because it is fragile and can be easily faked with `Object.create()`. - function isArray(ar) { -@@ -522,166 +98,10 @@ function isPrimitive(arg) { - exports.isPrimitive = isPrimitive; - - function isBuffer(arg) { -- return arg instanceof Buffer; -+ return Buffer.isBuffer(arg); - } - exports.isBuffer = isBuffer; - - function objectToString(o) { - return Object.prototype.toString.call(o); --} -- -- --function pad(n) { -- return n < 10 ? '0' + n.toString(10) : n.toString(10); --} -- -- --var months = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', -- 'Oct', 'Nov', 'Dec']; -- --// 26 Feb 16:19:34 --function timestamp() { -- var d = new Date(); -- var time = [pad(d.getHours()), -- pad(d.getMinutes()), -- pad(d.getSeconds())].join(':'); -- return [d.getDate(), months[d.getMonth()], time].join(' '); --} -- -- --// log is just a thin wrapper to console.log that prepends a timestamp --exports.log = function() { -- console.log('%s - %s', timestamp(), exports.format.apply(exports, arguments)); --}; -- -- --/** -- * Inherit the prototype methods from one constructor into another. -- * -- * The Function.prototype.inherits from lang.js rewritten as a standalone -- * function (not on Function.prototype). NOTE: If this file is to be loaded -- * during bootstrapping this function needs to be rewritten using some native -- * functions as prototype setup using normal JavaScript does not work as -- * expected during bootstrapping (see mirror.js in r114903). -- * -- * @param {function} ctor Constructor function which needs to inherit the -- * prototype. -- * @param {function} superCtor Constructor function to inherit prototype from. -- */ --exports.inherits = function(ctor, superCtor) { -- ctor.super_ = superCtor; -- ctor.prototype = Object.create(superCtor.prototype, { -- constructor: { -- value: ctor, -- enumerable: false, -- writable: true, -- configurable: true -- } -- }); --}; -- --exports._extend = function(origin, add) { -- // Don't do anything if add isn't an object -- if (!add || !isObject(add)) return origin; -- -- var keys = Object.keys(add); -- var i = keys.length; -- while (i--) { -- origin[keys[i]] = add[keys[i]]; -- } -- return origin; --}; -- --function hasOwnProperty(obj, prop) { -- return Object.prototype.hasOwnProperty.call(obj, prop); --} -- -- --// Deprecated old stuff. -- --exports.p = exports.deprecate(function() { -- for (var i = 0, len = arguments.length; i < len; ++i) { -- console.error(exports.inspect(arguments[i])); -- } --}, 'util.p: Use console.error() instead'); -- -- --exports.exec = exports.deprecate(function() { -- return require('child_process').exec.apply(this, arguments); --}, 'util.exec is now called `child_process.exec`.'); -- -- --exports.print = exports.deprecate(function() { -- for (var i = 0, len = arguments.length; i < len; ++i) { -- process.stdout.write(String(arguments[i])); -- } --}, 'util.print: Use console.log instead'); -- -- --exports.puts = exports.deprecate(function() { -- for (var i = 0, len = arguments.length; i < len; ++i) { -- process.stdout.write(arguments[i] + '\n'); -- } --}, 'util.puts: Use console.log instead'); -- -- --exports.debug = exports.deprecate(function(x) { -- process.stderr.write('DEBUG: ' + x + '\n'); --}, 'util.debug: Use console.error instead'); -- -- --exports.error = exports.deprecate(function(x) { -- for (var i = 0, len = arguments.length; i < len; ++i) { -- process.stderr.write(arguments[i] + '\n'); -- } --}, 'util.error: Use console.error instead'); -- -- --exports.pump = exports.deprecate(function(readStream, writeStream, callback) { -- var callbackCalled = false; -- -- function call(a, b, c) { -- if (callback && !callbackCalled) { -- callback(a, b, c); -- callbackCalled = true; -- } -- } -- -- readStream.addListener('data', function(chunk) { -- if (writeStream.write(chunk) === false) readStream.pause(); -- }); -- -- writeStream.addListener('drain', function() { -- readStream.resume(); -- }); -- -- readStream.addListener('end', function() { -- writeStream.end(); -- }); -- -- readStream.addListener('close', function() { -- call(); -- }); -- -- readStream.addListener('error', function(err) { -- writeStream.end(); -- call(err); -- }); -- -- writeStream.addListener('error', function(err) { -- readStream.destroy(); -- call(err); -- }); --}, 'util.pump(): Use readableStream.pipe() instead'); -- -- --var uv; --exports._errnoException = function(err, syscall) { -- if (isUndefined(uv)) uv = process.binding('uv'); -- var errname = uv.errname(err); -- var e = new Error(syscall + ' ' + errname); -- e.code = errname; -- e.errno = errname; -- e.syscall = syscall; -- return e; --}; -+} \ No newline at end of file diff --git a/node_modules/browserify/node_modules/readable-stream/node_modules/core-util-is/lib/util.js b/node_modules/browserify/node_modules/readable-stream/node_modules/core-util-is/lib/util.js deleted file mode 100644 index ff4c851c..00000000 --- a/node_modules/browserify/node_modules/readable-stream/node_modules/core-util-is/lib/util.js +++ /dev/null @@ -1,107 +0,0 @@ -// Copyright Joyent, Inc. and other Node contributors. -// -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to permit -// persons to whom the Software is furnished to do so, subject to the -// following conditions: -// -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -// USE OR OTHER DEALINGS IN THE SOFTWARE. - -// NOTE: These type checking functions intentionally don't use `instanceof` -// because it is fragile and can be easily faked with `Object.create()`. - -function isArray(arg) { - if (Array.isArray) { - return Array.isArray(arg); - } - return objectToString(arg) === '[object Array]'; -} -exports.isArray = isArray; - -function isBoolean(arg) { - return typeof arg === 'boolean'; -} -exports.isBoolean = isBoolean; - -function isNull(arg) { - return arg === null; -} -exports.isNull = isNull; - -function isNullOrUndefined(arg) { - return arg == null; -} -exports.isNullOrUndefined = isNullOrUndefined; - -function isNumber(arg) { - return typeof arg === 'number'; -} -exports.isNumber = isNumber; - -function isString(arg) { - return typeof arg === 'string'; -} -exports.isString = isString; - -function isSymbol(arg) { - return typeof arg === 'symbol'; -} -exports.isSymbol = isSymbol; - -function isUndefined(arg) { - return arg === void 0; -} -exports.isUndefined = isUndefined; - -function isRegExp(re) { - return objectToString(re) === '[object RegExp]'; -} -exports.isRegExp = isRegExp; - -function isObject(arg) { - return typeof arg === 'object' && arg !== null; -} -exports.isObject = isObject; - -function isDate(d) { - return objectToString(d) === '[object Date]'; -} -exports.isDate = isDate; - -function isError(e) { - return (objectToString(e) === '[object Error]' || e instanceof Error); -} -exports.isError = isError; - -function isFunction(arg) { - return typeof arg === 'function'; -} -exports.isFunction = isFunction; - -function isPrimitive(arg) { - return arg === null || - typeof arg === 'boolean' || - typeof arg === 'number' || - typeof arg === 'string' || - typeof arg === 'symbol' || // ES6 symbol - typeof arg === 'undefined'; -} -exports.isPrimitive = isPrimitive; - -exports.isBuffer = Buffer.isBuffer; - -function objectToString(o) { - return Object.prototype.toString.call(o); -} diff --git a/node_modules/browserify/node_modules/readable-stream/node_modules/core-util-is/package.json b/node_modules/browserify/node_modules/readable-stream/node_modules/core-util-is/package.json deleted file mode 100644 index ddd227e6..00000000 --- a/node_modules/browserify/node_modules/readable-stream/node_modules/core-util-is/package.json +++ /dev/null @@ -1,60 +0,0 @@ -{ - "name": "core-util-is", - "version": "1.0.2", - "description": "The `util.is*` functions introduced in Node v0.12.", - "main": "lib/util.js", - "repository": { - "type": "git", - "url": "git://github.com/isaacs/core-util-is.git" - }, - "keywords": [ - "util", - "isBuffer", - "isArray", - "isNumber", - "isString", - "isRegExp", - "isThis", - "isThat", - "polyfill" - ], - "author": { - "name": "Isaac Z. Schlueter", - "email": "i@izs.me", - "url": "http://blog.izs.me/" - }, - "license": "MIT", - "bugs": { - "url": "https://github.com/isaacs/core-util-is/issues" - }, - "scripts": { - "test": "tap test.js" - }, - "devDependencies": { - "tap": "^2.3.0" - }, - "gitHead": "a177da234df5638b363ddc15fa324619a38577c8", - "homepage": "https://github.com/isaacs/core-util-is#readme", - "_id": "core-util-is@1.0.2", - "_shasum": "b5fd54220aa2bc5ab57aab7140c940754503c1a7", - "_from": "core-util-is@>=1.0.0 <1.1.0", - "_npmVersion": "3.3.2", - "_nodeVersion": "4.0.0", - "_npmUser": { - "name": "isaacs", - "email": "i@izs.me" - }, - "dist": { - "shasum": "b5fd54220aa2bc5ab57aab7140c940754503c1a7", - "tarball": "http://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz" - }, - "maintainers": [ - { - "name": "isaacs", - "email": "i@izs.me" - } - ], - "directories": {}, - "_resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", - "readme": "ERROR: No README data found!" -} diff --git a/node_modules/browserify/node_modules/readable-stream/node_modules/core-util-is/test.js b/node_modules/browserify/node_modules/readable-stream/node_modules/core-util-is/test.js deleted file mode 100644 index 1a490c65..00000000 --- a/node_modules/browserify/node_modules/readable-stream/node_modules/core-util-is/test.js +++ /dev/null @@ -1,68 +0,0 @@ -var assert = require('tap'); - -var t = require('./lib/util'); - -assert.equal(t.isArray([]), true); -assert.equal(t.isArray({}), false); - -assert.equal(t.isBoolean(null), false); -assert.equal(t.isBoolean(true), true); -assert.equal(t.isBoolean(false), true); - -assert.equal(t.isNull(null), true); -assert.equal(t.isNull(undefined), false); -assert.equal(t.isNull(false), false); -assert.equal(t.isNull(), false); - -assert.equal(t.isNullOrUndefined(null), true); -assert.equal(t.isNullOrUndefined(undefined), true); -assert.equal(t.isNullOrUndefined(false), false); -assert.equal(t.isNullOrUndefined(), true); - -assert.equal(t.isNumber(null), false); -assert.equal(t.isNumber('1'), false); -assert.equal(t.isNumber(1), true); - -assert.equal(t.isString(null), false); -assert.equal(t.isString('1'), true); -assert.equal(t.isString(1), false); - -assert.equal(t.isSymbol(null), false); -assert.equal(t.isSymbol('1'), false); -assert.equal(t.isSymbol(1), false); -assert.equal(t.isSymbol(Symbol()), true); - -assert.equal(t.isUndefined(null), false); -assert.equal(t.isUndefined(undefined), true); -assert.equal(t.isUndefined(false), false); -assert.equal(t.isUndefined(), true); - -assert.equal(t.isRegExp(null), false); -assert.equal(t.isRegExp('1'), false); -assert.equal(t.isRegExp(new RegExp()), true); - -assert.equal(t.isObject({}), true); -assert.equal(t.isObject([]), true); -assert.equal(t.isObject(new RegExp()), true); -assert.equal(t.isObject(new Date()), true); - -assert.equal(t.isDate(null), false); -assert.equal(t.isDate('1'), false); -assert.equal(t.isDate(new Date()), true); - -assert.equal(t.isError(null), false); -assert.equal(t.isError({ err: true }), false); -assert.equal(t.isError(new Error()), true); - -assert.equal(t.isFunction(null), false); -assert.equal(t.isFunction({ }), false); -assert.equal(t.isFunction(function() {}), true); - -assert.equal(t.isPrimitive(null), true); -assert.equal(t.isPrimitive(''), true); -assert.equal(t.isPrimitive(0), true); -assert.equal(t.isPrimitive(new Date()), false); - -assert.equal(t.isBuffer(null), false); -assert.equal(t.isBuffer({}), false); -assert.equal(t.isBuffer(new Buffer(0)), true); diff --git a/node_modules/browserify/node_modules/readable-stream/package.json b/node_modules/browserify/node_modules/readable-stream/package.json deleted file mode 100644 index db116356..00000000 --- a/node_modules/browserify/node_modules/readable-stream/package.json +++ /dev/null @@ -1,79 +0,0 @@ -{ - "name": "readable-stream", - "version": "1.1.14", - "description": "Streams3, a user-land copy of the stream library from Node.js v0.11.x", - "main": "readable.js", - "dependencies": { - "core-util-is": "~1.0.0", - "isarray": "0.0.1", - "string_decoder": "~0.10.x", - "inherits": "~2.0.1" - }, - "devDependencies": { - "tap": "~0.2.6" - }, - "scripts": { - "test": "tap test/simple/*.js" - }, - "repository": { - "type": "git", - "url": "git://github.com/isaacs/readable-stream" - }, - "keywords": [ - "readable", - "stream", - "pipe" - ], - "browser": { - "util": false - }, - "author": { - "name": "Isaac Z. Schlueter", - "email": "i@izs.me", - "url": "http://blog.izs.me/" - }, - "license": "MIT", - "gitHead": "52550840cb1d6e8a98ef9a909a4bea360bc6f7da", - "bugs": { - "url": "https://github.com/isaacs/readable-stream/issues" - }, - "_id": "readable-stream@1.1.14", - "_shasum": "7cf4c54ef648e3813084c636dd2079e166c081d9", - "_from": "readable-stream@>=1.1.13 <2.0.0", - "_npmVersion": "3.8.3", - "_nodeVersion": "5.10.1", - "_npmUser": { - "name": "cwmma", - "email": "calvin.metcalf@gmail.com" - }, - "dist": { - "shasum": "7cf4c54ef648e3813084c636dd2079e166c081d9", - "tarball": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.1.14.tgz" - }, - "maintainers": [ - { - "name": "isaacs", - "email": "isaacs@npmjs.com" - }, - { - "name": "tootallnate", - "email": "nathan@tootallnate.net" - }, - { - "name": "rvagg", - "email": "rod@vagg.org" - }, - { - "name": "cwmma", - "email": "calvin.metcalf@gmail.com" - } - ], - "_npmOperationalInternal": { - "host": "packages-16-east.internal.npmjs.com", - "tmp": "tmp/readable-stream-1.1.14.tgz_1460563293219_0.5682175166439265" - }, - "directories": {}, - "_resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.1.14.tgz", - "readme": "ERROR: No README data found!", - "homepage": "https://github.com/isaacs/readable-stream" -} diff --git a/node_modules/browserify/node_modules/readable-stream/passthrough.js b/node_modules/browserify/node_modules/readable-stream/passthrough.js deleted file mode 100644 index 27e8d8a5..00000000 --- a/node_modules/browserify/node_modules/readable-stream/passthrough.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require("./lib/_stream_passthrough.js") diff --git a/node_modules/browserify/node_modules/readable-stream/readable.js b/node_modules/browserify/node_modules/readable-stream/readable.js deleted file mode 100644 index 2a8b5c6b..00000000 --- a/node_modules/browserify/node_modules/readable-stream/readable.js +++ /dev/null @@ -1,10 +0,0 @@ -exports = module.exports = require('./lib/_stream_readable.js'); -exports.Stream = require('stream'); -exports.Readable = exports; -exports.Writable = require('./lib/_stream_writable.js'); -exports.Duplex = require('./lib/_stream_duplex.js'); -exports.Transform = require('./lib/_stream_transform.js'); -exports.PassThrough = require('./lib/_stream_passthrough.js'); -if (!process.browser && process.env.READABLE_STREAM === 'disable') { - module.exports = require('stream'); -} diff --git a/node_modules/browserify/node_modules/readable-stream/transform.js b/node_modules/browserify/node_modules/readable-stream/transform.js deleted file mode 100644 index 5d482f07..00000000 --- a/node_modules/browserify/node_modules/readable-stream/transform.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require("./lib/_stream_transform.js") diff --git a/node_modules/browserify/node_modules/readable-stream/writable.js b/node_modules/browserify/node_modules/readable-stream/writable.js deleted file mode 100644 index e1e9efdf..00000000 --- a/node_modules/browserify/node_modules/readable-stream/writable.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require("./lib/_stream_writable.js") diff --git a/node_modules/browserify/node_modules/resolve/.npmignore b/node_modules/browserify/node_modules/resolve/.npmignore deleted file mode 100644 index 3c3629e6..00000000 --- a/node_modules/browserify/node_modules/resolve/.npmignore +++ /dev/null @@ -1 +0,0 @@ -node_modules diff --git a/node_modules/browserify/node_modules/resolve/.travis.yml b/node_modules/browserify/node_modules/resolve/.travis.yml deleted file mode 100644 index eb3bea97..00000000 --- a/node_modules/browserify/node_modules/resolve/.travis.yml +++ /dev/null @@ -1,123 +0,0 @@ -language: node_js -node_js: - - "7.2" - - "7.1" - - "7.0" - - "6.9" - - "6.8" - - "6.7" - - "6.6" - - "6.5" - - "6.4" - - "6.3" - - "6.2" - - "6.1" - - "6.0" - - "5.12" - - "5.11" - - "5.10" - - "5.9" - - "5.8" - - "5.7" - - "5.6" - - "5.5" - - "5.4" - - "5.3" - - "5.2" - - "5.1" - - "5.0" - - "4.6" - - "4.5" - - "4.4" - - "4.3" - - "4.2" - - "4.1" - - "4.0" - - "iojs-v3.3" - - "iojs-v3.2" - - "iojs-v3.1" - - "iojs-v3.0" - - "iojs-v2.5" - - "iojs-v2.4" - - "iojs-v2.3" - - "iojs-v2.2" - - "iojs-v2.1" - - "iojs-v2.0" - - "iojs-v1.8" - - "iojs-v1.7" - - "iojs-v1.6" - - "iojs-v1.5" - - "iojs-v1.4" - - "iojs-v1.3" - - "iojs-v1.2" - - "iojs-v1.1" - - "iojs-v1.0" - - "0.12" - - "0.11" - - "0.10" - - "0.9" - - "0.8" - - "0.6" - - "0.4" -before_install: - - 'if [ "${TRAVIS_NODE_VERSION}" = "0.6" ]; then npm install -g npm@1.3 ; elif [ "${TRAVIS_NODE_VERSION}" != "0.9" ]; then case "$(npm --version)" in 1.*) npm install -g npm@1.4.28 ;; 2.*) npm install -g npm@2 ;; esac ; fi' - - 'if [ "${TRAVIS_NODE_VERSION}" != "0.6" ] && [ "${TRAVIS_NODE_VERSION}" != "0.9" ]; then npm install -g npm; fi' -script: - - 'if [ -n "${PRETEST-}" ]; then npm run pretest ; fi' - - 'if [ -n "${POSTTEST-}" ]; then npm run posttest ; fi' - - 'if [ -n "${COVERAGE-}" ]; then npm run coverage ; fi' - - 'if [ -n "${TEST-}" ]; then npm run tests-only ; fi' -sudo: false -env: - - TEST=true -matrix: - fast_finish: true - include: - allow_failures: - - node_js: "7.1" - - node_js: "7.0" - - node_js: "6.8" - - node_js: "6.7" - - node_js: "6.6" - - node_js: "6.5" - - node_js: "6.4" - - node_js: "6.3" - - node_js: "6.2" - - node_js: "6.1" - - node_js: "6.0" - - node_js: "5.11" - - node_js: "5.10" - - node_js: "5.9" - - node_js: "5.8" - - node_js: "5.7" - - node_js: "5.6" - - node_js: "5.5" - - node_js: "5.4" - - node_js: "5.3" - - node_js: "5.2" - - node_js: "5.1" - - node_js: "5.0" - - node_js: "4.5" - - node_js: "4.4" - - node_js: "4.3" - - node_js: "4.2" - - node_js: "4.1" - - node_js: "4.0" - - node_js: "iojs-v3.2" - - node_js: "iojs-v3.1" - - node_js: "iojs-v3.0" - - node_js: "iojs-v2.4" - - node_js: "iojs-v2.3" - - node_js: "iojs-v2.2" - - node_js: "iojs-v2.1" - - node_js: "iojs-v2.0" - - node_js: "iojs-v1.7" - - node_js: "iojs-v1.6" - - node_js: "iojs-v1.5" - - node_js: "iojs-v1.4" - - node_js: "iojs-v1.3" - - node_js: "iojs-v1.2" - - node_js: "iojs-v1.1" - - node_js: "iojs-v1.0" - - node_js: "0.9" - - node_js: "0.4" diff --git a/node_modules/browserify/node_modules/resolve/LICENSE b/node_modules/browserify/node_modules/resolve/LICENSE deleted file mode 100644 index ee27ba4b..00000000 --- a/node_modules/browserify/node_modules/resolve/LICENSE +++ /dev/null @@ -1,18 +0,0 @@ -This software is released under the MIT license: - -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/node_modules/browserify/node_modules/resolve/example/async.js b/node_modules/browserify/node_modules/resolve/example/async.js deleted file mode 100644 index 6624ff72..00000000 --- a/node_modules/browserify/node_modules/resolve/example/async.js +++ /dev/null @@ -1,5 +0,0 @@ -var resolve = require('../'); -resolve('tap', { basedir: __dirname }, function (err, res) { - if (err) console.error(err) - else console.log(res) -}); diff --git a/node_modules/browserify/node_modules/resolve/example/sync.js b/node_modules/browserify/node_modules/resolve/example/sync.js deleted file mode 100644 index 54b2cc10..00000000 --- a/node_modules/browserify/node_modules/resolve/example/sync.js +++ /dev/null @@ -1,3 +0,0 @@ -var resolve = require('../'); -var res = resolve.sync('tap', { basedir: __dirname }); -console.log(res); diff --git a/node_modules/browserify/node_modules/resolve/index.js b/node_modules/browserify/node_modules/resolve/index.js deleted file mode 100644 index 51f194b4..00000000 --- a/node_modules/browserify/node_modules/resolve/index.js +++ /dev/null @@ -1,5 +0,0 @@ -var core = require('./lib/core'); -exports = module.exports = require('./lib/async'); -exports.core = core; -exports.isCore = function (x) { return core[x] }; -exports.sync = require('./lib/sync'); diff --git a/node_modules/browserify/node_modules/resolve/lib/async.js b/node_modules/browserify/node_modules/resolve/lib/async.js deleted file mode 100644 index ef99946f..00000000 --- a/node_modules/browserify/node_modules/resolve/lib/async.js +++ /dev/null @@ -1,193 +0,0 @@ -var core = require('./core'); -var fs = require('fs'); -var path = require('path'); -var caller = require('./caller.js'); -var nodeModulesPaths = require('./node-modules-paths.js'); -var splitRe = process.platform === 'win32' ? /[\/\\]/ : /\//; - -module.exports = function resolve (x, opts, cb) { - if (typeof opts === 'function') { - cb = opts; - opts = {}; - } - if (!opts) opts = {}; - if (typeof x !== 'string') { - var err = new TypeError('path must be a string'); - return process.nextTick(function () { - cb(err); - }); - } - - var isFile = opts.isFile || function (file, cb) { - fs.stat(file, function (err, stat) { - if (err && err.code === 'ENOENT') cb(null, false) - else if (err) cb(err) - else cb(null, stat.isFile() || stat.isFIFO()) - }); - }; - var readFile = opts.readFile || fs.readFile; - - var extensions = opts.extensions || [ '.js' ]; - var y = opts.basedir || path.dirname(caller()); - - opts.paths = opts.paths || []; - - if (/^(?:\.\.?(?:\/|$)|\/|([A-Za-z]:)?[\\\/])/.test(x)) { - var res = path.resolve(y, x); - if (x === '..') res += '/'; - if (/\/$/.test(x) && res === y) { - loadAsDirectory(res, opts.package, onfile); - } - else loadAsFile(res, opts.package, onfile); - } - else loadNodeModules(x, y, function (err, n, pkg) { - if (err) cb(err) - else if (n) cb(null, n, pkg) - else if (core[x]) return cb(null, x); - else cb(new Error("Cannot find module '" + x + "' from '" + y + "'")) - }); - - function onfile (err, m, pkg) { - if (err) cb(err) - else if (m) cb(null, m, pkg) - else loadAsDirectory(res, function (err, d, pkg) { - if (err) cb(err) - else if (d) cb(null, d, pkg) - else cb(new Error("Cannot find module '" + x + "' from '" + y + "'")) - }) - } - - function loadAsFile (x, pkg, cb) { - if (typeof pkg === 'function') { - cb = pkg; - pkg = undefined; - } - - var exts = [''].concat(extensions); - load(exts, x, pkg) - - function load (exts, x, pkg) { - if (exts.length === 0) return cb(null, undefined, pkg); - var file = x + exts[0]; - - if (pkg) onpkg(null, pkg) - else loadpkg(path.dirname(file), onpkg); - - function onpkg (err, pkg_, dir) { - pkg = pkg_; - if (err) return cb(err) - if (dir && pkg && opts.pathFilter) { - var rfile = path.relative(dir, file); - var rel = rfile.slice(0, rfile.length - exts[0].length); - var r = opts.pathFilter(pkg, x, rel); - if (r) return load( - [''].concat(extensions.slice()), - path.resolve(dir, r), - pkg - ); - } - isFile(file, onex); - } - function onex (err, ex) { - if (err) cb(err) - else if (!ex) load(exts.slice(1), x, pkg) - else cb(null, file, pkg) - } - } - } - - function loadpkg (dir, cb) { - if (dir === '' || dir === '/') return cb(null); - if (process.platform === 'win32' && /^\w:[\\\/]*$/.test(dir)) { - return cb(null); - } - if (/[\\\/]node_modules[\\\/]*$/.test(dir)) return cb(null); - - var pkgfile = path.join(dir, 'package.json'); - isFile(pkgfile, function (err, ex) { - // on err, ex is false - if (!ex) return loadpkg( - path.dirname(dir), cb - ); - - readFile(pkgfile, function (err, body) { - if (err) cb(err); - try { var pkg = JSON.parse(body) } - catch (err) {} - - if (pkg && opts.packageFilter) { - pkg = opts.packageFilter(pkg, pkgfile); - } - cb(null, pkg, dir); - }); - }); - } - - function loadAsDirectory (x, fpkg, cb) { - if (typeof fpkg === 'function') { - cb = fpkg; - fpkg = opts.package; - } - - var pkgfile = path.join(x, '/package.json'); - isFile(pkgfile, function (err, ex) { - if (err) return cb(err); - if (!ex) return loadAsFile(path.join(x, '/index'), fpkg, cb); - - readFile(pkgfile, function (err, body) { - if (err) return cb(err); - try { - var pkg = JSON.parse(body); - } - catch (err) {} - - if (opts.packageFilter) { - pkg = opts.packageFilter(pkg, pkgfile); - } - - if (pkg.main) { - if (pkg.main === '.' || pkg.main === './'){ - pkg.main = 'index' - } - loadAsFile(path.resolve(x, pkg.main), pkg, function (err, m, pkg) { - if (err) return cb(err); - if (m) return cb(null, m, pkg); - if (!pkg) return loadAsFile(path.join(x, '/index'), pkg, cb); - - var dir = path.resolve(x, pkg.main); - loadAsDirectory(dir, pkg, function (err, n, pkg) { - if (err) return cb(err); - if (n) return cb(null, n, pkg); - loadAsFile(path.join(x, '/index'), pkg, cb); - }); - }); - return; - } - - loadAsFile(path.join(x, '/index'), pkg, cb); - }); - }); - } - - function loadNodeModules (x, start, cb) { - (function process (dirs) { - if (dirs.length === 0) return cb(null, undefined); - var dir = dirs[0]; - - var file = path.join(dir, '/', x); - loadAsFile(file, undefined, onfile); - - function onfile (err, m, pkg) { - if (err) return cb(err); - if (m) return cb(null, m, pkg); - loadAsDirectory(path.join(dir, '/', x), undefined, ondir); - } - - function ondir (err, n, pkg) { - if (err) return cb(err); - if (n) return cb(null, n, pkg); - process(dirs.slice(1)); - } - })(nodeModulesPaths(start, opts)); - } -}; diff --git a/node_modules/browserify/node_modules/resolve/lib/caller.js b/node_modules/browserify/node_modules/resolve/lib/caller.js deleted file mode 100644 index 5536549b..00000000 --- a/node_modules/browserify/node_modules/resolve/lib/caller.js +++ /dev/null @@ -1,8 +0,0 @@ -module.exports = function () { - // see https://code.google.com/p/v8/wiki/JavaScriptStackTraceApi - var origPrepareStackTrace = Error.prepareStackTrace; - Error.prepareStackTrace = function (_, stack) { return stack }; - var stack = (new Error()).stack; - Error.prepareStackTrace = origPrepareStackTrace; - return stack[2].getFileName(); -}; diff --git a/node_modules/browserify/node_modules/resolve/lib/core.js b/node_modules/browserify/node_modules/resolve/lib/core.js deleted file mode 100644 index 6adbbce9..00000000 --- a/node_modules/browserify/node_modules/resolve/lib/core.js +++ /dev/null @@ -1,22 +0,0 @@ -var current = process.versions.node.split('.'); - -function versionIncluded(version) { - if (version === '*') return true; - var versionParts = version.split('.'); - for (var i = 0; i < 3; ++i) { - if ((current[i] || 0) >= (versionParts[i] || 0)) return true; - } - return false; -} - -var data = require('./core.json'); - -var core = {}; -for (var version in data) { - if (Object.prototype.hasOwnProperty.call(data, version) && versionIncluded(version)) { - for (var i = 0; i < data[version].length; ++i) { - core[data[version][i]] = true; - } - } -} -module.exports = core; diff --git a/node_modules/browserify/node_modules/resolve/lib/core.json b/node_modules/browserify/node_modules/resolve/lib/core.json deleted file mode 100644 index 843844eb..00000000 --- a/node_modules/browserify/node_modules/resolve/lib/core.json +++ /dev/null @@ -1,47 +0,0 @@ -{ - "*": [ - "assert", - "buffer_ieee754", - "buffer", - "child_process", - "cluster", - "console", - "constants", - "crypto", - "_debugger", - "dgram", - "dns", - "domain", - "events", - "freelist", - "fs", - "http", - "https", - "_linklist", - "module", - "net", - "os", - "path", - "punycode", - "querystring", - "readline", - "repl", - "stream", - "string_decoder", - "sys", - "timers", - "tls", - "tty", - "url", - "util", - "vm", - "zlib" - ], - "0.11": [ - "_http_server" - ], - "1.0": [ - "process", - "v8" - ] -} diff --git a/node_modules/browserify/node_modules/resolve/lib/node-modules-paths.js b/node_modules/browserify/node_modules/resolve/lib/node-modules-paths.js deleted file mode 100644 index ce0a0d9f..00000000 --- a/node_modules/browserify/node_modules/resolve/lib/node-modules-paths.js +++ /dev/null @@ -1,38 +0,0 @@ -var path = require('path'); - -module.exports = function (start, opts) { - var modules = opts.moduleDirectory - ? [].concat(opts.moduleDirectory) - : ['node_modules'] - ; - - // ensure that `start` is an absolute path at this point, - // resolving against the process' current working directory - start = path.resolve(start); - - var prefix = '/'; - if (/^([A-Za-z]:)/.test(start)) { - prefix = ''; - } else if (/^\\\\/.test(start)) { - prefix = '\\\\'; - } - - var splitRe = process.platform === 'win32' ? /[\/\\]/ : /\/+/; - - var parts = start.split(splitRe); - - var dirs = []; - for (var i = parts.length - 1; i >= 0; i--) { - if (modules.indexOf(parts[i]) !== -1) continue; - dirs = dirs.concat(modules.map(function(module_dir) { - return prefix + path.join( - path.join.apply(path, parts.slice(0, i + 1)), - module_dir - ); - })); - } - if (process.platform === 'win32'){ - dirs[dirs.length-1] = dirs[dirs.length-1].replace(":", ":\\"); - } - return dirs.concat(opts.paths); -} diff --git a/node_modules/browserify/node_modules/resolve/lib/sync.js b/node_modules/browserify/node_modules/resolve/lib/sync.js deleted file mode 100644 index 71ae939c..00000000 --- a/node_modules/browserify/node_modules/resolve/lib/sync.js +++ /dev/null @@ -1,84 +0,0 @@ -var core = require('./core'); -var fs = require('fs'); -var path = require('path'); -var caller = require('./caller.js'); -var nodeModulesPaths = require('./node-modules-paths.js'); - -module.exports = function (x, opts) { - if (!opts) opts = {}; - var isFile = opts.isFile || function (file) { - try { var stat = fs.statSync(file) } - catch (err) { - if (err && err.code === 'ENOENT') return false; - throw err; - } - return stat.isFile() || stat.isFIFO(); - }; - var readFileSync = opts.readFileSync || fs.readFileSync; - - var extensions = opts.extensions || [ '.js' ]; - var y = opts.basedir || path.dirname(caller()); - - opts.paths = opts.paths || []; - - if (/^(?:\.\.?(?:\/|$)|\/|([A-Za-z]:)?[\\\/])/.test(x)) { - var res = path.resolve(y, x); - if (x === '..') res += '/'; - var m = loadAsFileSync(res) || loadAsDirectorySync(res); - if (m) return m; - } else { - var n = loadNodeModulesSync(x, y); - if (n) return n; - } - - if (core[x]) return x; - - throw new Error("Cannot find module '" + x + "' from '" + y + "'"); - - function loadAsFileSync (x) { - if (isFile(x)) { - return x; - } - - for (var i = 0; i < extensions.length; i++) { - var file = x + extensions[i]; - if (isFile(file)) { - return file; - } - } - } - - function loadAsDirectorySync (x) { - var pkgfile = path.join(x, '/package.json'); - if (isFile(pkgfile)) { - var body = readFileSync(pkgfile, 'utf8'); - try { - var pkg = JSON.parse(body); - if (opts.packageFilter) { - pkg = opts.packageFilter(pkg, x); - } - - if (pkg.main) { - var m = loadAsFileSync(path.resolve(x, pkg.main)); - if (m) return m; - var n = loadAsDirectorySync(path.resolve(x, pkg.main)); - if (n) return n; - } - } - catch (err) {} - } - - return loadAsFileSync(path.join( x, '/index')); - } - - function loadNodeModulesSync (x, start) { - var dirs = nodeModulesPaths(start, opts); - for (var i = 0; i < dirs.length; i++) { - var dir = dirs[i]; - var m = loadAsFileSync(path.join( dir, '/', x)); - if (m) return m; - var n = loadAsDirectorySync(path.join( dir, '/', x )); - if (n) return n; - } - } -}; diff --git a/node_modules/browserify/node_modules/resolve/package.json b/node_modules/browserify/node_modules/resolve/package.json deleted file mode 100644 index a7fbb15c..00000000 --- a/node_modules/browserify/node_modules/resolve/package.json +++ /dev/null @@ -1,67 +0,0 @@ -{ - "name": "resolve", - "description": "resolve like require.resolve() on behalf of files asynchronously and synchronously", - "version": "1.2.0", - "repository": { - "type": "git", - "url": "git://github.com/substack/node-resolve.git" - }, - "main": "index.js", - "keywords": [ - "resolve", - "require", - "node", - "module" - ], - "scripts": { - "prepublish": "! type safe-publish-latest >/dev/null 2>&1 || safe-publish-latest", - "tests-only": "tape test/*.js", - "test": "npm run --silent tests-only" - }, - "devDependencies": { - "tape": "^4.6.3", - "tap": "0.4.13", - "safe-publish-latest": "^1.1.1" - }, - "license": "MIT", - "author": { - "name": "James Halliday", - "email": "mail@substack.net", - "url": "http://substack.net" - }, - "gitHead": "8e4a4659f4120c145e2f12bb01cf4ddad61730b3", - "bugs": { - "url": "https://github.com/substack/node-resolve/issues" - }, - "homepage": "https://github.com/substack/node-resolve#readme", - "_id": "resolve@1.2.0", - "_shasum": "9589c3f2f6149d1417a40becc1663db6ec6bc26c", - "_from": "resolve@>=1.1.4 <2.0.0", - "_npmVersion": "3.10.9", - "_nodeVersion": "7.2.0", - "_npmUser": { - "name": "ljharb", - "email": "ljharb@gmail.com" - }, - "dist": { - "shasum": "9589c3f2f6149d1417a40becc1663db6ec6bc26c", - "tarball": "https://registry.npmjs.org/resolve/-/resolve-1.2.0.tgz" - }, - "maintainers": [ - { - "name": "ljharb", - "email": "ljharb@gmail.com" - }, - { - "name": "substack", - "email": "substack@gmail.com" - } - ], - "_npmOperationalInternal": { - "host": "packages-12-west.internal.npmjs.com", - "tmp": "tmp/resolve-1.2.0.tgz_1481676943045_0.8319015400484204" - }, - "directories": {}, - "_resolved": "https://registry.npmjs.org/resolve/-/resolve-1.2.0.tgz", - "readme": "ERROR: No README data found!" -} diff --git a/node_modules/browserify/node_modules/resolve/readme.markdown b/node_modules/browserify/node_modules/resolve/readme.markdown deleted file mode 100644 index db0d69f8..00000000 --- a/node_modules/browserify/node_modules/resolve/readme.markdown +++ /dev/null @@ -1,148 +0,0 @@ -# resolve - -implements the [node `require.resolve()` -algorithm](https://nodejs.org/api/modules.html#modules_all_together) -such that you can `require.resolve()` on behalf of a file asynchronously and -synchronously - -[![build status](https://secure.travis-ci.org/substack/node-resolve.png)](http://travis-ci.org/substack/node-resolve) - -# example - -asynchronously resolve: - -``` js -var resolve = require('resolve'); -resolve('tap', { basedir: __dirname }, function (err, res) { - if (err) console.error(err) - else console.log(res) -}); -``` - -``` -$ node example/async.js -/home/substack/projects/node-resolve/node_modules/tap/lib/main.js -``` - -synchronously resolve: - -``` js -var resolve = require('resolve'); -var res = resolve.sync('tap', { basedir: __dirname }); -console.log(res); -``` - -``` -$ node example/sync.js -/home/substack/projects/node-resolve/node_modules/tap/lib/main.js -``` - -# methods - -``` js -var resolve = require('resolve') -``` - -## resolve(id, opts={}, cb) - -Asynchronously resolve the module path string `id` into `cb(err, res [, pkg])`, where `pkg` (if defined) is the data from `package.json`. - -options are: - -* opts.basedir - directory to begin resolving from - -* opts.package - `package.json` data applicable to the module being loaded - -* opts.extensions - array of file extensions to search in order - -* opts.readFile - how to read files asynchronously - -* opts.isFile - function to asynchronously test whether a file exists - -* opts.packageFilter - transform the parsed package.json contents before looking -at the "main" field - -* opts.pathFilter(pkg, path, relativePath) - transform a path within a package - * pkg - package data - * path - the path being resolved - * relativePath - the path relative from the package.json location - * returns - a relative path that will be joined from the package.json location - -* opts.paths - require.paths array to use if nothing is found on the normal -node_modules recursive walk (probably don't use this) - -* opts.moduleDirectory - directory (or directories) in which to recursively look for modules. default: `"node_modules"` - -default `opts` values: - -``` javascript -{ - paths: [], - basedir: __dirname, - extensions: [ '.js' ], - readFile: fs.readFile, - isFile: function (file, cb) { - fs.stat(file, function (err, stat) { - if (err && err.code === 'ENOENT') cb(null, false) - else if (err) cb(err) - else cb(null, stat.isFile()) - }); - }, - moduleDirectory: 'node_modules' -} -``` - -## resolve.sync(id, opts) - -Synchronously resolve the module path string `id`, returning the result and -throwing an error when `id` can't be resolved. - -options are: - -* opts.basedir - directory to begin resolving from - -* opts.extensions - array of file extensions to search in order - -* opts.readFile - how to read files synchronously - -* opts.isFile - function to synchronously test whether a file exists - -* `opts.packageFilter(pkg, pkgfile)` - transform the parsed package.json -* contents before looking at the "main" field - -* opts.paths - require.paths array to use if nothing is found on the normal -node_modules recursive walk (probably don't use this) - -* opts.moduleDirectory - directory (or directories) in which to recursively look for modules. default: `"node_modules"` - -default `opts` values: - -``` javascript -{ - paths: [], - basedir: __dirname, - extensions: [ '.js' ], - readFileSync: fs.readFileSync, - isFile: function (file) { - try { return fs.statSync(file).isFile() } - catch (e) { return false } - }, - moduleDirectory: 'node_modules' -} -```` - -## resolve.isCore(pkg) - -Return whether a package is in core. - -# install - -With [npm](https://npmjs.org) do: - -``` -npm install resolve -``` - -# license - -MIT diff --git a/node_modules/browserify/node_modules/resolve/test/core.js b/node_modules/browserify/node_modules/resolve/test/core.js deleted file mode 100644 index 1bd00341..00000000 --- a/node_modules/browserify/node_modules/resolve/test/core.js +++ /dev/null @@ -1,29 +0,0 @@ -var test = require('tape'); -var resolve = require('../'); - -test('core modules', function (t) { - t.test('isCore()', function (st) { - st.ok(resolve.isCore('fs')); - st.ok(resolve.isCore('net')); - st.ok(resolve.isCore('http')); - - st.ok(!resolve.isCore('seq')); - st.ok(!resolve.isCore('../')); - st.end(); - }); - - t.test('core list', function (st) { - st.plan(resolve.core.length); - - for (var i = 0; i < resolve.core.length; ++i) { - st.doesNotThrow( - function () { require(resolve.core[i]); }, - 'requiring ' + resolve.core[i] + ' does not throw' - ); - } - - st.end(); - }); - - t.end(); -}); diff --git a/node_modules/browserify/node_modules/resolve/test/dotdot.js b/node_modules/browserify/node_modules/resolve/test/dotdot.js deleted file mode 100644 index b8767727..00000000 --- a/node_modules/browserify/node_modules/resolve/test/dotdot.js +++ /dev/null @@ -1,29 +0,0 @@ -var path = require('path'); -var test = require('tape'); -var resolve = require('../'); - -test('dotdot', function (t) { - t.plan(4); - var dir = __dirname + '/dotdot/abc'; - - resolve('..', { basedir : dir }, function (err, res, pkg) { - t.ifError(err); - t.equal(res, __dirname + '/dotdot/index.js'); - }); - - resolve('.', { basedir : dir }, function (err, res, pkg) { - t.ifError(err); - t.equal(res, dir + '/index.js'); - }); -}); - -test('dotdot sync', function (t) { - t.plan(2); - var dir = __dirname + '/dotdot/abc'; - - var a = resolve.sync('..', { basedir : dir }); - t.equal(a, __dirname + '/dotdot/index.js'); - - var b = resolve.sync('.', { basedir : dir }); - t.equal(b, dir + '/index.js'); -}); diff --git a/node_modules/browserify/node_modules/resolve/test/dotdot/abc/index.js b/node_modules/browserify/node_modules/resolve/test/dotdot/abc/index.js deleted file mode 100644 index 67f2534e..00000000 --- a/node_modules/browserify/node_modules/resolve/test/dotdot/abc/index.js +++ /dev/null @@ -1,2 +0,0 @@ -var x = require('..'); -console.log(x); diff --git a/node_modules/browserify/node_modules/resolve/test/dotdot/index.js b/node_modules/browserify/node_modules/resolve/test/dotdot/index.js deleted file mode 100644 index afec7360..00000000 --- a/node_modules/browserify/node_modules/resolve/test/dotdot/index.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = 'whatever' diff --git a/node_modules/browserify/node_modules/resolve/test/faulty_basedir.js b/node_modules/browserify/node_modules/resolve/test/faulty_basedir.js deleted file mode 100644 index 24408188..00000000 --- a/node_modules/browserify/node_modules/resolve/test/faulty_basedir.js +++ /dev/null @@ -1,17 +0,0 @@ -var path = require('path'); -var test = require('tape'); -var resolve = require('../'); - -// not sure what's up with this test anymore -if (process.platform !== 'win32') return; - -test('faulty basedir must produce error in windows', function (t) { - t.plan(1); - - var resolverDir = 'C:\\a\\b\\c\\d'; - - resolve('tape/lib/test.js', { basedir : resolverDir }, function (err, res, pkg) { - t.equal(true, !!err); - }); - -}); diff --git a/node_modules/browserify/node_modules/resolve/test/filter.js b/node_modules/browserify/node_modules/resolve/test/filter.js deleted file mode 100644 index 07c38f34..00000000 --- a/node_modules/browserify/node_modules/resolve/test/filter.js +++ /dev/null @@ -1,18 +0,0 @@ -var test = require('tape'); -var resolve = require('../'); - -test('filter', function (t) { - t.plan(2); - var dir = __dirname + '/resolver'; - resolve('./baz', { - basedir : dir, - packageFilter : function (pkg) { - pkg.main = 'doom'; - return pkg; - } - }, function (err, res, pkg) { - if (err) t.fail(err); - t.equal(res, dir + '/baz/doom.js'); - t.equal(pkg.main, 'doom'); - }); -}); diff --git a/node_modules/browserify/node_modules/resolve/test/filter_sync.js b/node_modules/browserify/node_modules/resolve/test/filter_sync.js deleted file mode 100644 index 3f89b794..00000000 --- a/node_modules/browserify/node_modules/resolve/test/filter_sync.js +++ /dev/null @@ -1,15 +0,0 @@ -var test = require('tape'); -var resolve = require('../'); - -test('filter', function (t) { - var dir = __dirname + '/resolver'; - var res = resolve.sync('./baz', { - basedir : dir, - packageFilter : function (pkg) { - pkg.main = 'doom' - return pkg; - } - }); - t.equal(res, dir + '/baz/doom.js'); - t.end(); -}); diff --git a/node_modules/browserify/node_modules/resolve/test/mock.js b/node_modules/browserify/node_modules/resolve/test/mock.js deleted file mode 100644 index 1cf3b124..00000000 --- a/node_modules/browserify/node_modules/resolve/test/mock.js +++ /dev/null @@ -1,142 +0,0 @@ -var test = require('tape'); -var resolve = require('../'); - -test('mock', function (t) { - t.plan(6); - - var files = { - '/foo/bar/baz.js' : 'beep' - }; - - function opts (basedir) { - return { - basedir : basedir, - isFile : function (file, cb) { - cb(null, files.hasOwnProperty(file)); - }, - readFile : function (file, cb) { - cb(null, files[file]); - } - } - } - - resolve('./baz', opts('/foo/bar'), function (err, res, pkg) { - if (err) t.fail(err); - t.equal(res, '/foo/bar/baz.js'); - t.equal(pkg, undefined); - }); - - resolve('./baz.js', opts('/foo/bar'), function (err, res, pkg) { - if (err) t.fail(err); - t.equal(res, '/foo/bar/baz.js'); - t.equal(pkg, undefined); - }); - - resolve('baz', opts('/foo/bar'), function (err, res) { - t.equal(err.message, "Cannot find module 'baz' from '/foo/bar'"); - }); - - resolve('../baz', opts('/foo/bar'), function (err, res) { - t.equal(err.message, "Cannot find module '../baz' from '/foo/bar'"); - }); -}); - -test('mock from package', function (t) { - t.plan(6); - - var files = { - '/foo/bar/baz.js' : 'beep' - }; - - function opts (basedir) { - return { - basedir : basedir, - package : { main: 'bar' }, - isFile : function (file, cb) { - cb(null, files.hasOwnProperty(file)); - }, - readFile : function (file, cb) { - cb(null, files[file]); - } - } - } - - resolve('./baz', opts('/foo/bar'), function (err, res, pkg) { - if (err) t.fail(err); - t.equal(res, '/foo/bar/baz.js'); - t.equal(pkg.main, 'bar'); - }); - - resolve('./baz.js', opts('/foo/bar'), function (err, res, pkg) { - if (err) t.fail(err); - t.equal(res, '/foo/bar/baz.js'); - t.equal(pkg.main, 'bar'); - }); - - resolve('baz', opts('/foo/bar'), function (err, res) { - t.equal(err.message, "Cannot find module 'baz' from '/foo/bar'"); - }); - - resolve('../baz', opts('/foo/bar'), function (err, res) { - t.equal(err.message, "Cannot find module '../baz' from '/foo/bar'"); - }); -}); - -test('mock package', function (t) { - t.plan(2); - - var files = { - '/foo/node_modules/bar/baz.js' : 'beep', - '/foo/node_modules/bar/package.json' : JSON.stringify({ - main : './baz.js' - }) - }; - - function opts (basedir) { - return { - basedir : basedir, - isFile : function (file, cb) { - cb(null, files.hasOwnProperty(file)); - }, - readFile : function (file, cb) { - cb(null, files[file]); - } - } - } - - resolve('bar', opts('/foo'), function (err, res, pkg) { - if (err) t.fail(err); - t.equal(res, '/foo/node_modules/bar/baz.js'); - t.equal(pkg.main, './baz.js'); - }); -}); - -test('mock package from package', function (t) { - t.plan(2); - - var files = { - '/foo/node_modules/bar/baz.js' : 'beep', - '/foo/node_modules/bar/package.json' : JSON.stringify({ - main : './baz.js' - }) - }; - - function opts (basedir) { - return { - basedir : basedir, - package : { main: 'bar' }, - isFile : function (file, cb) { - cb(null, files.hasOwnProperty(file)); - }, - readFile : function (file, cb) { - cb(null, files[file]); - } - } - } - - resolve('bar', opts('/foo'), function (err, res, pkg) { - if (err) t.fail(err); - t.equal(res, '/foo/node_modules/bar/baz.js'); - t.equal(pkg.main, './baz.js'); - }); -}); diff --git a/node_modules/browserify/node_modules/resolve/test/mock_sync.js b/node_modules/browserify/node_modules/resolve/test/mock_sync.js deleted file mode 100644 index abfd2893..00000000 --- a/node_modules/browserify/node_modules/resolve/test/mock_sync.js +++ /dev/null @@ -1,68 +0,0 @@ -var test = require('tape'); -var resolve = require('../'); - -test('mock', function (t) { - t.plan(4); - - var files = { - '/foo/bar/baz.js' : 'beep' - }; - - function opts (basedir) { - return { - basedir : basedir, - isFile : function (file) { - return files.hasOwnProperty(file) - }, - readFileSync : function (file) { - return files[file] - } - } - } - - t.equal( - resolve.sync('./baz', opts('/foo/bar')), - '/foo/bar/baz.js' - ); - - t.equal( - resolve.sync('./baz.js', opts('/foo/bar')), - '/foo/bar/baz.js' - ); - - t.throws(function () { - resolve.sync('baz', opts('/foo/bar')); - }); - - t.throws(function () { - resolve.sync('../baz', opts('/foo/bar')); - }); -}); - -test('mock package', function (t) { - t.plan(1); - - var files = { - '/foo/node_modules/bar/baz.js' : 'beep', - '/foo/node_modules/bar/package.json' : JSON.stringify({ - main : './baz.js' - }) - }; - - function opts (basedir) { - return { - basedir : basedir, - isFile : function (file) { - return files.hasOwnProperty(file) - }, - readFileSync : function (file) { - return files[file] - } - } - } - - t.equal( - resolve.sync('bar', opts('/foo')), - '/foo/node_modules/bar/baz.js' - ); -}); diff --git a/node_modules/browserify/node_modules/resolve/test/module_dir.js b/node_modules/browserify/node_modules/resolve/test/module_dir.js deleted file mode 100644 index 06395d8c..00000000 --- a/node_modules/browserify/node_modules/resolve/test/module_dir.js +++ /dev/null @@ -1,56 +0,0 @@ -var path = require('path'); -var test = require('tape'); -var resolve = require('../'); - -test('moduleDirectory strings', function (t) { - t.plan(4); - var dir = __dirname + '/module_dir'; - var xopts = { - basedir : dir, - moduleDirectory: 'xmodules' - }; - resolve('aaa', xopts, function (err, res, pkg) { - t.ifError(err); - t.equal(res, dir + '/xmodules/aaa/index.js'); - }); - - var yopts = { - basedir : dir, - moduleDirectory: 'ymodules' - }; - resolve('aaa', yopts, function (err, res, pkg) { - t.ifError(err); - t.equal(res, dir + '/ymodules/aaa/index.js'); - }); -}); - -test('moduleDirectory array', function (t) { - t.plan(6); - var dir = __dirname + '/module_dir'; - var aopts = { - basedir : dir, - moduleDirectory: [ 'xmodules', 'ymodules', 'zmodules' ] - }; - resolve('aaa', aopts, function (err, res, pkg) { - t.ifError(err); - t.equal(res, dir + '/xmodules/aaa/index.js'); - }); - - var bopts = { - basedir : dir, - moduleDirectory: [ 'zmodules', 'ymodules', 'xmodules' ] - }; - resolve('aaa', bopts, function (err, res, pkg) { - t.ifError(err); - t.equal(res, dir + '/ymodules/aaa/index.js'); - }); - - var copts = { - basedir : dir, - moduleDirectory: [ 'xmodules', 'ymodules', 'zmodules' ] - }; - resolve('bbb', copts, function (err, res, pkg) { - t.ifError(err); - t.equal(res, dir + '/zmodules/bbb/main.js'); - }); -}); diff --git a/node_modules/browserify/node_modules/resolve/test/module_dir/xmodules/aaa/index.js b/node_modules/browserify/node_modules/resolve/test/module_dir/xmodules/aaa/index.js deleted file mode 100644 index 55cd18ca..00000000 --- a/node_modules/browserify/node_modules/resolve/test/module_dir/xmodules/aaa/index.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = function (x) { return x * 100 } diff --git a/node_modules/browserify/node_modules/resolve/test/module_dir/ymodules/aaa/index.js b/node_modules/browserify/node_modules/resolve/test/module_dir/ymodules/aaa/index.js deleted file mode 100644 index 651aca86..00000000 --- a/node_modules/browserify/node_modules/resolve/test/module_dir/ymodules/aaa/index.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = function (x) { return x + 100 } diff --git a/node_modules/browserify/node_modules/resolve/test/module_dir/zmodules/bbb/main.js b/node_modules/browserify/node_modules/resolve/test/module_dir/zmodules/bbb/main.js deleted file mode 100644 index 4325a0bd..00000000 --- a/node_modules/browserify/node_modules/resolve/test/module_dir/zmodules/bbb/main.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = function (n) { return n * 111 } diff --git a/node_modules/browserify/node_modules/resolve/test/module_dir/zmodules/bbb/package.json b/node_modules/browserify/node_modules/resolve/test/module_dir/zmodules/bbb/package.json deleted file mode 100644 index c13b8cf6..00000000 --- a/node_modules/browserify/node_modules/resolve/test/module_dir/zmodules/bbb/package.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "main": "main.js" -} diff --git a/node_modules/browserify/node_modules/resolve/test/node_path.js b/node_modules/browserify/node_modules/resolve/test/node_path.js deleted file mode 100644 index 2407189b..00000000 --- a/node_modules/browserify/node_modules/resolve/test/node_path.js +++ /dev/null @@ -1,48 +0,0 @@ -var path = require('path'); -var test = require('tape'); -var resolve = require('../'); - -test('$NODE_PATH', function (t) { - t.plan(4); - - resolve('aaa', { - paths: [ - __dirname + '/node_path/x', - __dirname + '/node_path/y' - ], - basedir: __dirname, - }, function (err, res) { - t.equal(res, __dirname + '/node_path/x/aaa/index.js'); - }); - - resolve('bbb', { - paths: [ - __dirname + '/node_path/x', - __dirname + '/node_path/y' - ], - basedir: __dirname, - }, function (err, res) { - t.equal(res, __dirname + '/node_path/y/bbb/index.js'); - }); - - resolve('ccc', { - paths: [ - __dirname + '/node_path/x', - __dirname + '/node_path/y' - ], - basedir: __dirname, - }, function (err, res) { - t.equal(res, __dirname + '/node_path/x/ccc/index.js'); - }); - - // ensure that relative paths still resolve against the - // regular `node_modules` correctly - resolve('tap', { - paths: [ - 'node_path', - ], - basedir: 'node_path/x', - }, function (err, res) { - t.equal(res, path.resolve(__dirname, '..', 'node_modules/tap/lib/main.js')); - }); -}); diff --git a/node_modules/browserify/node_modules/resolve/test/node_path/x/aaa/index.js b/node_modules/browserify/node_modules/resolve/test/node_path/x/aaa/index.js deleted file mode 100644 index 1ea59138..00000000 --- a/node_modules/browserify/node_modules/resolve/test/node_path/x/aaa/index.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = 'A' diff --git a/node_modules/browserify/node_modules/resolve/test/node_path/x/ccc/index.js b/node_modules/browserify/node_modules/resolve/test/node_path/x/ccc/index.js deleted file mode 100644 index f186fa75..00000000 --- a/node_modules/browserify/node_modules/resolve/test/node_path/x/ccc/index.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = 'C' diff --git a/node_modules/browserify/node_modules/resolve/test/node_path/y/bbb/index.js b/node_modules/browserify/node_modules/resolve/test/node_path/y/bbb/index.js deleted file mode 100644 index e22dd83c..00000000 --- a/node_modules/browserify/node_modules/resolve/test/node_path/y/bbb/index.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = 'B' diff --git a/node_modules/browserify/node_modules/resolve/test/node_path/y/ccc/index.js b/node_modules/browserify/node_modules/resolve/test/node_path/y/ccc/index.js deleted file mode 100644 index d0043d1e..00000000 --- a/node_modules/browserify/node_modules/resolve/test/node_path/y/ccc/index.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = 'CY' diff --git a/node_modules/browserify/node_modules/resolve/test/nonstring.js b/node_modules/browserify/node_modules/resolve/test/nonstring.js deleted file mode 100644 index ef63c40f..00000000 --- a/node_modules/browserify/node_modules/resolve/test/nonstring.js +++ /dev/null @@ -1,9 +0,0 @@ -var test = require('tape'); -var resolve = require('../'); - -test('nonstring', function (t) { - t.plan(1); - resolve(555, function (err, res, pkg) { - t.ok(err); - }); -}); diff --git a/node_modules/browserify/node_modules/resolve/test/pathfilter.js b/node_modules/browserify/node_modules/resolve/test/pathfilter.js deleted file mode 100644 index 96950ec0..00000000 --- a/node_modules/browserify/node_modules/resolve/test/pathfilter.js +++ /dev/null @@ -1,35 +0,0 @@ -var test = require('tape'); -var resolve = require('../'); - -test('#62: deep module references and the pathFilter', function(t){ - t.plan(9); - - var resolverDir = __dirname + '/pathfilter/deep_ref'; - var pathFilter = function(pkg, x, remainder){ - t.equal(pkg.version, "1.2.3"); - t.equal(x, resolverDir + '/node_modules/deep/ref'); - t.equal(remainder, "ref"); - return "alt"; - }; - - resolve('deep/ref', { basedir : resolverDir }, function (err, res, pkg) { - if (err) t.fail(err); - - t.equal(pkg.version, "1.2.3"); - t.equal(res, resolverDir + '/node_modules/deep/ref.js'); - }); - - resolve('deep/deeper/ref', { basedir: resolverDir }, - function(err, res, pkg) { - if(err) t.fail(err); - t.notEqual(pkg, undefined); - t.equal(pkg.version, "1.2.3"); - t.equal(res, resolverDir + '/node_modules/deep/deeper/ref.js'); - }); - - resolve('deep/ref', { basedir : resolverDir, pathFilter : pathFilter }, - function (err, res, pkg) { - if (err) t.fail(err); - t.equal(res, resolverDir + '/node_modules/deep/alt.js'); - }); -}); diff --git a/node_modules/browserify/node_modules/resolve/test/pathfilter/deep_ref/main.js b/node_modules/browserify/node_modules/resolve/test/pathfilter/deep_ref/main.js deleted file mode 100644 index e69de29b..00000000 diff --git a/node_modules/browserify/node_modules/resolve/test/precedence.js b/node_modules/browserify/node_modules/resolve/test/precedence.js deleted file mode 100644 index c716f0e9..00000000 --- a/node_modules/browserify/node_modules/resolve/test/precedence.js +++ /dev/null @@ -1,23 +0,0 @@ -var path = require('path'); -var test = require('tape'); -var resolve = require('../'); - -test('precedence', function (t) { - t.plan(3); - var dir = path.join(__dirname, 'precedence/aaa'); - - resolve('./', { basedir : dir }, function (err, res, pkg) { - t.ifError(err); - t.equal(res, path.join(dir, 'index.js')); - t.equal(pkg.name, 'resolve'); - }); -}); - -test('./ should not load ${dir}.js', function (t) { - t.plan(1); - var dir = path.join(__dirname, 'precedence/bbb'); - - resolve('./', { basedir : dir }, function (err, res, pkg) { - t.ok(err); - }); -}); diff --git a/node_modules/browserify/node_modules/resolve/test/precedence/aaa.js b/node_modules/browserify/node_modules/resolve/test/precedence/aaa.js deleted file mode 100644 index a182397c..00000000 --- a/node_modules/browserify/node_modules/resolve/test/precedence/aaa.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = 'wtf' diff --git a/node_modules/browserify/node_modules/resolve/test/precedence/aaa/index.js b/node_modules/browserify/node_modules/resolve/test/precedence/aaa/index.js deleted file mode 100644 index 993b03c2..00000000 --- a/node_modules/browserify/node_modules/resolve/test/precedence/aaa/index.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = 'okok' diff --git a/node_modules/browserify/node_modules/resolve/test/precedence/aaa/main.js b/node_modules/browserify/node_modules/resolve/test/precedence/aaa/main.js deleted file mode 100644 index db38959d..00000000 --- a/node_modules/browserify/node_modules/resolve/test/precedence/aaa/main.js +++ /dev/null @@ -1 +0,0 @@ -console.log(require('./')) diff --git a/node_modules/browserify/node_modules/resolve/test/precedence/bbb.js b/node_modules/browserify/node_modules/resolve/test/precedence/bbb.js deleted file mode 100644 index c8a9996b..00000000 --- a/node_modules/browserify/node_modules/resolve/test/precedence/bbb.js +++ /dev/null @@ -1 +0,0 @@ -module.exports '>_<' diff --git a/node_modules/browserify/node_modules/resolve/test/precedence/bbb/main.js b/node_modules/browserify/node_modules/resolve/test/precedence/bbb/main.js deleted file mode 100644 index 716b81d4..00000000 --- a/node_modules/browserify/node_modules/resolve/test/precedence/bbb/main.js +++ /dev/null @@ -1 +0,0 @@ -console.log(require('./')); // should throw diff --git a/node_modules/browserify/node_modules/resolve/test/resolver.js b/node_modules/browserify/node_modules/resolve/test/resolver.js deleted file mode 100644 index 3b994396..00000000 --- a/node_modules/browserify/node_modules/resolve/test/resolver.js +++ /dev/null @@ -1,281 +0,0 @@ -var path = require('path'); -var test = require('tape'); -var resolve = require('../'); - -test('async foo', function (t) { - t.plan(9); - var dir = __dirname + '/resolver'; - - resolve('./foo', { basedir : dir }, function (err, res, pkg) { - if (err) t.fail(err); - t.equal(res, dir + '/foo.js'); - t.equal(pkg.name, 'resolve'); - }); - - resolve('./foo.js', { basedir : dir }, function (err, res, pkg) { - if (err) t.fail(err); - t.equal(res, dir + '/foo.js'); - t.equal(pkg.name, 'resolve'); - }); - - resolve('./foo', { basedir : dir, package: { main: 'resolver' } }, function (err, res, pkg) { - if (err) t.fail(err); - t.equal(res, dir + '/foo.js'); - t.equal(pkg.main, 'resolver'); - }); - - resolve('./foo.js', { basedir : dir, package: { main: 'resolver' } }, function (err, res, pkg) { - if (err) t.fail(err); - t.equal(res, dir + '/foo.js'); - t.equal(pkg.main, 'resolver'); - }); - - resolve('foo', { basedir : dir }, function (err) { - t.equal(err.message, "Cannot find module 'foo' from '" + path.resolve(dir) + "'"); - }); -}); - -test('bar', function (t) { - t.plan(6); - var dir = __dirname + '/resolver'; - - resolve('foo', { basedir : dir + '/bar' }, function (err, res, pkg) { - if (err) t.fail(err); - t.equal(res, dir + '/bar/node_modules/foo/index.js'); - t.equal(pkg, undefined); - }); - - resolve('foo', { basedir : dir + '/bar' }, function (err, res, pkg) { - if (err) t.fail(err); - t.equal(res, dir + '/bar/node_modules/foo/index.js'); - t.equal(pkg, undefined); - }); - - resolve('foo', { basedir : dir + '/bar', package: { main: 'bar' } }, function (err, res, pkg) { - if (err) t.fail(err); - t.equal(res, dir + '/bar/node_modules/foo/index.js'); - t.equal(pkg, undefined); - }); -}); - -test('baz', function (t) { - t.plan(4); - var dir = __dirname + '/resolver'; - - resolve('./baz', { basedir : dir }, function (err, res, pkg) { - if (err) t.fail(err); - t.equal(res, dir + '/baz/quux.js'); - t.equal(pkg.main, 'quux.js'); - }); - - resolve('./baz', { basedir : dir, package: { main: 'resolver' } }, function (err, res, pkg) { - if (err) t.fail(err); - t.equal(res, dir + '/baz/quux.js'); - t.equal(pkg.main, 'quux.js'); - }); -}); - -test('biz', function (t) { - t.plan(24); - var dir = __dirname + '/resolver/biz/node_modules'; - - resolve('./grux', { basedir : dir }, function (err, res, pkg) { - if (err) t.fail(err); - t.equal(res, dir + '/grux/index.js'); - t.equal(pkg, undefined); - }); - - resolve('./grux', { basedir : dir, package: { main: 'biz' } }, function (err, res, pkg) { - if (err) t.fail(err); - t.equal(res, dir + '/grux/index.js'); - t.equal(pkg.main, 'biz'); - }); - - resolve('./garply', { basedir : dir }, function (err, res, pkg) { - if (err) t.fail(err); - t.equal(res, dir + '/garply/lib/index.js'); - t.equal(pkg.main, './lib'); - }); - - resolve('./garply', { basedir : dir, package: { main: 'biz' } }, function (err, res, pkg) { - if (err) t.fail(err); - t.equal(res, dir + '/garply/lib/index.js'); - t.equal(pkg.main, './lib'); - }); - - resolve('tiv', { basedir : dir + '/grux' }, function (err, res, pkg) { - if (err) t.fail(err); - t.equal(res, dir + '/tiv/index.js'); - t.equal(pkg, undefined); - }); - - resolve('tiv', { basedir : dir + '/grux', package: { main: 'grux' } }, function (err, res, pkg) { - if (err) t.fail(err); - t.equal(res, dir + '/tiv/index.js'); - t.equal(pkg, undefined); - }); - - resolve('tiv', { basedir : dir + '/garply' }, function (err, res, pkg) { - if (err) t.fail(err); - t.equal(res, dir + '/tiv/index.js'); - t.equal(pkg, undefined); - }); - - resolve('tiv', { basedir : dir + '/garply', package: { main: './lib' } }, function (err, res, pkg) { - if (err) t.fail(err); - t.equal(res, dir + '/tiv/index.js'); - t.equal(pkg, undefined); - }); - - resolve('grux', { basedir : dir + '/tiv' }, function (err, res, pkg) { - if (err) t.fail(err); - t.equal(res, dir + '/grux/index.js'); - t.equal(pkg, undefined); - }); - - resolve('grux', { basedir : dir + '/tiv', package: { main: 'tiv' } }, function (err, res, pkg) { - if (err) t.fail(err); - t.equal(res, dir + '/grux/index.js'); - t.equal(pkg, undefined); - }); - - resolve('garply', { basedir : dir + '/tiv' }, function (err, res, pkg) { - if (err) t.fail(err); - t.equal(res, dir + '/garply/lib/index.js'); - t.equal(pkg.main, './lib'); - }); - - resolve('garply', { basedir : dir + '/tiv', package: { main: 'tiv' } }, function (err, res, pkg) { - if (err) t.fail(err); - t.equal(res, dir + '/garply/lib/index.js'); - t.equal(pkg.main, './lib'); - }); -}); - -test('quux', function (t) { - t.plan(2); - var dir = __dirname + '/resolver/quux'; - - resolve('./foo', { basedir : dir, package: { main: 'quux' } }, function (err, res, pkg) { - if (err) t.fail(err); - t.equal(res, dir + '/foo/index.js'); - t.equal(pkg.main, 'quux'); - }); -}); - -test('normalize', function (t) { - t.plan(2); - var dir = __dirname + '/resolver/biz/node_modules/grux'; - - resolve('../grux', { basedir : dir }, function (err, res, pkg) { - if (err) t.fail(err); - t.equal(res, dir + '/index.js'); - t.equal(pkg, undefined); - }); -}); - -test('cup', function (t) { - t.plan(3); - var dir = __dirname + '/resolver'; - - resolve('./cup', { basedir : dir, extensions : [ '.js', '.coffee' ] }, - function (err, res) { - if (err) t.fail(err); - t.equal(res, dir + '/cup.coffee'); - }); - - resolve('./cup.coffee', { basedir : dir }, function (err, res) { - if (err) t.fail(err); - t.equal(res, dir + '/cup.coffee'); - }); - - resolve('./cup', { basedir : dir, extensions : [ '.js' ] }, - function (err, res) { - t.equal(err.message, "Cannot find module './cup' from '" + path.resolve(dir) + "'"); - }); -}); - -test('mug', function (t) { - t.plan(3); - var dir = __dirname + '/resolver'; - - resolve('./mug', { basedir : dir }, function (err, res) { - if (err) t.fail(err); - t.equal(res, dir + '/mug.js'); - }); - - resolve('./mug', { basedir : dir, extensions : [ '.coffee', '.js' ] }, - function (err, res) { - if (err) t.fail(err); - t.equal(res, dir + '/mug.coffee'); - }); - - resolve('./mug', { basedir : dir, extensions : [ '.js', '.coffee' ] }, - function (err, res) { - t.equal(res, dir + '/mug.js'); - }); -}); - -test('other path', function (t) { - t.plan(4); - var resolverDir = __dirname + '/resolver'; - var dir = resolverDir + '/bar'; - var otherDir = resolverDir + '/other_path'; - - resolve('root', { basedir : dir, paths: [otherDir] }, function (err, res) { - if (err) t.fail(err); - t.equal(res, resolverDir + '/other_path/root.js'); - }); - - resolve('lib/other-lib', { basedir : dir, paths: [otherDir] }, - function (err, res) { - if (err) t.fail(err); - t.equal(res, resolverDir + '/other_path/lib/other-lib.js'); - }); - - resolve('root', { basedir : dir, }, function (err, res) { - t.equal(err.message, "Cannot find module 'root' from '" + path.resolve(dir) + "'"); - }); - - resolve('zzz', { basedir : dir, paths: [otherDir] }, function (err, res) { - t.equal(err.message, "Cannot find module 'zzz' from '" + path.resolve(dir) + "'"); - }); -}); - -test('incorrect main', function (t) { - t.plan(1) - - var resolverDir = __dirname + '/resolver'; - var dir = resolverDir + '/incorrect_main'; - - resolve('./incorrect_main', { basedir : resolverDir }, function (err, res, pkg) { - if (err) t.fail(err); - t.equal(res, dir + '/index.js'); - }); -}); - -test('without basedir', function (t) { - t.plan(1); - - var dir = __dirname + '/resolver/without_basedir'; - var tester = require(dir + '/main.js'); - - tester(t, function (err, res, pkg){ - if (err) { - t.fail(err); - } else { - t.equal(res, dir + '/node_modules/mymodule.js'); - } - }); -}); - -test('#25: node modules with the same name as node stdlib modules', function (t) { - t.plan(1); - - var resolverDir = __dirname + '/resolver/punycode'; - - resolve('punycode', { basedir : resolverDir }, function (err, res, pkg) { - if (err) t.fail(err); - t.equal(res, resolverDir + '/node_modules/punycode/index.js'); - }); -}); diff --git a/node_modules/browserify/node_modules/resolve/test/resolver/baz/doom.js b/node_modules/browserify/node_modules/resolve/test/resolver/baz/doom.js deleted file mode 100644 index e69de29b..00000000 diff --git a/node_modules/browserify/node_modules/resolve/test/resolver/baz/package.json b/node_modules/browserify/node_modules/resolve/test/resolver/baz/package.json deleted file mode 100644 index 6b81dcdd..00000000 --- a/node_modules/browserify/node_modules/resolve/test/resolver/baz/package.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "main" : "quux.js" -} diff --git a/node_modules/browserify/node_modules/resolve/test/resolver/baz/quux.js b/node_modules/browserify/node_modules/resolve/test/resolver/baz/quux.js deleted file mode 100644 index bd816eab..00000000 --- a/node_modules/browserify/node_modules/resolve/test/resolver/baz/quux.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = 1; diff --git a/node_modules/browserify/node_modules/resolve/test/resolver/cup.coffee b/node_modules/browserify/node_modules/resolve/test/resolver/cup.coffee deleted file mode 100644 index 8b137891..00000000 --- a/node_modules/browserify/node_modules/resolve/test/resolver/cup.coffee +++ /dev/null @@ -1 +0,0 @@ - diff --git a/node_modules/browserify/node_modules/resolve/test/resolver/foo.js b/node_modules/browserify/node_modules/resolve/test/resolver/foo.js deleted file mode 100644 index bd816eab..00000000 --- a/node_modules/browserify/node_modules/resolve/test/resolver/foo.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = 1; diff --git a/node_modules/browserify/node_modules/resolve/test/resolver/incorrect_main/index.js b/node_modules/browserify/node_modules/resolve/test/resolver/incorrect_main/index.js deleted file mode 100644 index bc1fb0a6..00000000 --- a/node_modules/browserify/node_modules/resolve/test/resolver/incorrect_main/index.js +++ /dev/null @@ -1,2 +0,0 @@ -// this is the actual main file 'index.js', not 'wrong.js' like the package.json would indicate -module.exports = 1; diff --git a/node_modules/browserify/node_modules/resolve/test/resolver/incorrect_main/package.json b/node_modules/browserify/node_modules/resolve/test/resolver/incorrect_main/package.json deleted file mode 100644 index 1592ed39..00000000 --- a/node_modules/browserify/node_modules/resolve/test/resolver/incorrect_main/package.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "main" : "wrong.js" -} diff --git a/node_modules/browserify/node_modules/resolve/test/resolver/mug.coffee b/node_modules/browserify/node_modules/resolve/test/resolver/mug.coffee deleted file mode 100644 index e69de29b..00000000 diff --git a/node_modules/browserify/node_modules/resolve/test/resolver/mug.js b/node_modules/browserify/node_modules/resolve/test/resolver/mug.js deleted file mode 100644 index e69de29b..00000000 diff --git a/node_modules/browserify/node_modules/resolve/test/resolver/other_path/lib/other-lib.js b/node_modules/browserify/node_modules/resolve/test/resolver/other_path/lib/other-lib.js deleted file mode 100644 index e69de29b..00000000 diff --git a/node_modules/browserify/node_modules/resolve/test/resolver/other_path/root.js b/node_modules/browserify/node_modules/resolve/test/resolver/other_path/root.js deleted file mode 100644 index e69de29b..00000000 diff --git a/node_modules/browserify/node_modules/resolve/test/resolver/quux/foo/index.js b/node_modules/browserify/node_modules/resolve/test/resolver/quux/foo/index.js deleted file mode 100644 index bd816eab..00000000 --- a/node_modules/browserify/node_modules/resolve/test/resolver/quux/foo/index.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = 1; diff --git a/node_modules/browserify/node_modules/resolve/test/resolver/without_basedir/main.js b/node_modules/browserify/node_modules/resolve/test/resolver/without_basedir/main.js deleted file mode 100644 index 5f211e9c..00000000 --- a/node_modules/browserify/node_modules/resolve/test/resolver/without_basedir/main.js +++ /dev/null @@ -1,6 +0,0 @@ -resolve = require('../../../'); - -module.exports = function(t, cb) { - resolve('mymodule', null, cb); -} - diff --git a/node_modules/browserify/node_modules/resolve/test/resolver_sync.js b/node_modules/browserify/node_modules/resolve/test/resolver_sync.js deleted file mode 100644 index c5d3920f..00000000 --- a/node_modules/browserify/node_modules/resolve/test/resolver_sync.js +++ /dev/null @@ -1,206 +0,0 @@ -var test = require('tape'); -var resolve = require('../'); - -test('foo', function (t) { - var dir = __dirname + '/resolver'; - - t.equal( - resolve.sync('./foo', { basedir : dir }), - dir + '/foo.js' - ); - - t.equal( - resolve.sync('./foo.js', { basedir : dir }), - dir + '/foo.js' - ); - - t.throws(function () { - resolve.sync('foo', { basedir : dir }); - }); - - t.end(); -}); - -test('bar', function (t) { - var dir = __dirname + '/resolver'; - - t.equal( - resolve.sync('foo', { basedir : dir + '/bar' }), - dir + '/bar/node_modules/foo/index.js' - ); - t.end(); -}); - -test('baz', function (t) { - var dir = __dirname + '/resolver'; - - t.equal( - resolve.sync('./baz', { basedir : dir }), - dir + '/baz/quux.js' - ); - t.end(); -}); - -test('biz', function (t) { - var dir = __dirname + '/resolver/biz/node_modules'; - t.equal( - resolve.sync('./grux', { basedir : dir }), - dir + '/grux/index.js' - ); - - t.equal( - resolve.sync('tiv', { basedir : dir + '/grux' }), - dir + '/tiv/index.js' - ); - - t.equal( - resolve.sync('grux', { basedir : dir + '/tiv' }), - dir + '/grux/index.js' - ); - t.end(); -}); - -test('normalize', function (t) { - var dir = __dirname + '/resolver/biz/node_modules/grux'; - t.equal( - resolve.sync('../grux', { basedir : dir }), - dir + '/index.js' - ); - t.end(); -}); - -test('cup', function (t) { - var dir = __dirname + '/resolver'; - t.equal( - resolve.sync('./cup', { - basedir : dir, - extensions : [ '.js', '.coffee' ] - }), - dir + '/cup.coffee' - ); - - t.equal( - resolve.sync('./cup.coffee', { - basedir : dir - }), - dir + '/cup.coffee' - ); - - t.throws(function () { - resolve.sync('./cup', { - basedir : dir, - extensions : [ '.js' ] - }) - }); - - t.end(); -}); - -test('mug', function (t) { - var dir = __dirname + '/resolver'; - t.equal( - resolve.sync('./mug', { basedir : dir }), - dir + '/mug.js' - ); - - t.equal( - resolve.sync('./mug', { - basedir : dir, - extensions : [ '.coffee', '.js' ] - }), - dir + '/mug.coffee' - ); - - t.equal( - resolve.sync('./mug', { - basedir : dir, - extensions : [ '.js', '.coffee' ] - }), - dir + '/mug.js' - ); - - t.end(); -}); - -test('other path', function (t) { - var resolverDir = __dirname + '/resolver'; - var dir = resolverDir + '/bar'; - var otherDir = resolverDir + '/other_path'; - - var path = require('path'); - - t.equal( - resolve.sync('root', { - basedir : dir, - paths: [otherDir] }), - resolverDir + '/other_path/root.js' - ); - - t.equal( - resolve.sync('lib/other-lib', { - basedir : dir, - paths: [otherDir] }), - resolverDir + '/other_path/lib/other-lib.js' - ); - - t.throws(function () { - resolve.sync('root', { basedir : dir, }); - }); - - t.throws(function () { - resolve.sync('zzz', { - basedir : dir, - paths: [otherDir] }); - }); - - t.end(); -}); - -test('incorrect main', function (t) { - var resolverDir = __dirname + '/resolver'; - var dir = resolverDir + '/incorrect_main'; - - t.equal( - resolve.sync('./incorrect_main', { basedir : resolverDir }), - dir + '/index.js' - ) - - t.end() -}); - -test('#25: node modules with the same name as node stdlib modules', function (t) { - var resolverDir = __dirname + '/resolver/punycode'; - - t.equal( - resolve.sync('punycode', { basedir : resolverDir }), - resolverDir + '/node_modules/punycode/index.js' - ) - - t.end() -}); - -function stubStatSync(fn) { - var fs = require('fs') - var statSync = fs.statSync; - try { - fs.statSync = function () { - throw new EvalError('Unknown Error'); - }; - return fn(); - } finally { - fs.statSync = statSync; - } -} - -test('#79 - re-throw non ENOENT errors from stat', function (t) { - var dir = __dirname + '/resolver'; - - stubStatSync(function () { - t.throws(function () { - resolve.sync('foo', { basedir : dir }); - }, /Unknown Error/); - }) - - t.end() -}); - diff --git a/node_modules/browserify/node_modules/resolve/test/subdirs.js b/node_modules/browserify/node_modules/resolve/test/subdirs.js deleted file mode 100644 index 957abfe0..00000000 --- a/node_modules/browserify/node_modules/resolve/test/subdirs.js +++ /dev/null @@ -1,13 +0,0 @@ -var test = require('tape'); -var resolve = require('../'); -var path = require('path'); - -test('subdirs', function (t) { - t.plan(2); - - var dir = path.join(__dirname, '/subdirs'); - resolve('a/b/c/x.json', { basedir: dir }, function (err, res) { - t.ifError(err); - t.equal(res, path.join(dir, 'node_modules/a/b/c/x.json')); - }); -}); diff --git a/node_modules/browserify/node_modules/shasum/.npmignore b/node_modules/browserify/node_modules/shasum/.npmignore deleted file mode 100644 index 13abef4f..00000000 --- a/node_modules/browserify/node_modules/shasum/.npmignore +++ /dev/null @@ -1,3 +0,0 @@ -node_modules -node_modules/* -npm_debug.log diff --git a/node_modules/browserify/node_modules/shasum/.travis.yml b/node_modules/browserify/node_modules/shasum/.travis.yml deleted file mode 100644 index 895dbd36..00000000 --- a/node_modules/browserify/node_modules/shasum/.travis.yml +++ /dev/null @@ -1,4 +0,0 @@ -language: node_js -node_js: - - 0.6 - - 0.8 diff --git a/node_modules/browserify/node_modules/shasum/LICENSE b/node_modules/browserify/node_modules/shasum/LICENSE deleted file mode 100644 index 6d03581f..00000000 --- a/node_modules/browserify/node_modules/shasum/LICENSE +++ /dev/null @@ -1,22 +0,0 @@ -Copyright (c) 2012 'Dominic Tarr' - -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/node_modules/browserify/node_modules/shasum/README.md b/node_modules/browserify/node_modules/shasum/README.md deleted file mode 100644 index e0a187d7..00000000 --- a/node_modules/browserify/node_modules/shasum/README.md +++ /dev/null @@ -1,15 +0,0 @@ -# shasum - -Single function that return the sha1sum. -Installing this is just a little bit quicker than reading the crypto documentation. - -``` js -var shasum = require('shasum') -shasum(string || buffer || object) -``` - -Oh yeah, it works in the browser too, with [browserify](https://npmjs.org/package/browserify) - -## License - -MIT diff --git a/node_modules/browserify/node_modules/shasum/browser.js b/node_modules/browserify/node_modules/shasum/browser.js deleted file mode 100644 index 848a1dd3..00000000 --- a/node_modules/browserify/node_modules/shasum/browser.js +++ /dev/null @@ -1,13 +0,0 @@ - -var createHash = require('sha.js') -var Buffer = require('buffer').Buffer -var stringify = require('json-stable-stringify') - -module.exports = function hash (str, alg, format) { - str = 'string' === typeof str ? str - : Buffer.isBuffer(str) ? str - : stringify(str) - return createHash(alg || 'sha1') - .update(str, Buffer.isBuffer(str) ? null : 'utf8').digest(format || 'hex') -} - diff --git a/node_modules/browserify/node_modules/shasum/index.js b/node_modules/browserify/node_modules/shasum/index.js deleted file mode 100644 index 4cf08e56..00000000 --- a/node_modules/browserify/node_modules/shasum/index.js +++ /dev/null @@ -1,13 +0,0 @@ - -var createHash = require('crypto').createHash -var Buffer = require('buffer').Buffer -var stringify = require('json-stable-stringify') - -module.exports = function hash (str, alg, format) { - str = 'string' === typeof str ? str - : Buffer.isBuffer(str) ? str - : stringify(str) - return createHash(alg || 'sha1') - .update(str, Buffer.isBuffer(str) ? null : 'utf8').digest(format || 'hex') -} - diff --git a/node_modules/browserify/node_modules/shasum/node_modules/.bin/sha.js b/node_modules/browserify/node_modules/shasum/node_modules/.bin/sha.js deleted file mode 120000 index 3c761051..00000000 --- a/node_modules/browserify/node_modules/shasum/node_modules/.bin/sha.js +++ /dev/null @@ -1 +0,0 @@ -../sha.js/bin.js \ No newline at end of file diff --git a/node_modules/browserify/node_modules/shasum/node_modules/json-stable-stringify/.travis.yml b/node_modules/browserify/node_modules/shasum/node_modules/json-stable-stringify/.travis.yml deleted file mode 100644 index cc4dba29..00000000 --- a/node_modules/browserify/node_modules/shasum/node_modules/json-stable-stringify/.travis.yml +++ /dev/null @@ -1,4 +0,0 @@ -language: node_js -node_js: - - "0.8" - - "0.10" diff --git a/node_modules/browserify/node_modules/shasum/node_modules/json-stable-stringify/LICENSE b/node_modules/browserify/node_modules/shasum/node_modules/json-stable-stringify/LICENSE deleted file mode 100644 index ee27ba4b..00000000 --- a/node_modules/browserify/node_modules/shasum/node_modules/json-stable-stringify/LICENSE +++ /dev/null @@ -1,18 +0,0 @@ -This software is released under the MIT license: - -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/node_modules/browserify/node_modules/shasum/node_modules/json-stable-stringify/example/key_cmp.js b/node_modules/browserify/node_modules/shasum/node_modules/json-stable-stringify/example/key_cmp.js deleted file mode 100644 index d5f66752..00000000 --- a/node_modules/browserify/node_modules/shasum/node_modules/json-stable-stringify/example/key_cmp.js +++ /dev/null @@ -1,7 +0,0 @@ -var stringify = require('../'); - -var obj = { c: 8, b: [{z:6,y:5,x:4},7], a: 3 }; -var s = stringify(obj, function (a, b) { - return a.key < b.key ? 1 : -1; -}); -console.log(s); diff --git a/node_modules/browserify/node_modules/shasum/node_modules/json-stable-stringify/example/nested.js b/node_modules/browserify/node_modules/shasum/node_modules/json-stable-stringify/example/nested.js deleted file mode 100644 index 9a672fc6..00000000 --- a/node_modules/browserify/node_modules/shasum/node_modules/json-stable-stringify/example/nested.js +++ /dev/null @@ -1,3 +0,0 @@ -var stringify = require('../'); -var obj = { c: 8, b: [{z:6,y:5,x:4},7], a: 3 }; -console.log(stringify(obj)); diff --git a/node_modules/browserify/node_modules/shasum/node_modules/json-stable-stringify/example/str.js b/node_modules/browserify/node_modules/shasum/node_modules/json-stable-stringify/example/str.js deleted file mode 100644 index 9b4b3cd2..00000000 --- a/node_modules/browserify/node_modules/shasum/node_modules/json-stable-stringify/example/str.js +++ /dev/null @@ -1,3 +0,0 @@ -var stringify = require('../'); -var obj = { c: 6, b: [4,5], a: 3 }; -console.log(stringify(obj)); diff --git a/node_modules/browserify/node_modules/shasum/node_modules/json-stable-stringify/example/value_cmp.js b/node_modules/browserify/node_modules/shasum/node_modules/json-stable-stringify/example/value_cmp.js deleted file mode 100644 index 09f1c5f7..00000000 --- a/node_modules/browserify/node_modules/shasum/node_modules/json-stable-stringify/example/value_cmp.js +++ /dev/null @@ -1,7 +0,0 @@ -var stringify = require('../'); - -var obj = { d: 6, c: 5, b: [{z:3,y:2,x:1},9], a: 10 }; -var s = stringify(obj, function (a, b) { - return a.value < b.value ? 1 : -1; -}); -console.log(s); diff --git a/node_modules/browserify/node_modules/shasum/node_modules/json-stable-stringify/index.js b/node_modules/browserify/node_modules/shasum/node_modules/json-stable-stringify/index.js deleted file mode 100644 index 1d609bf5..00000000 --- a/node_modules/browserify/node_modules/shasum/node_modules/json-stable-stringify/index.js +++ /dev/null @@ -1,50 +0,0 @@ -var json = typeof JSON !== 'undefined' ? JSON : require('jsonify'); - -module.exports = function (obj, opts) { - if (!opts) opts = {}; - if (typeof opts === 'function') opts = { cmp: opts }; - var cmp = opts.cmp && (function (f) { - return function (node) { - return function (a, b) { - var aobj = { key: a, value: node[a] }; - var bobj = { key: b, value: node[b] }; - return f(aobj, bobj); - }; - }; - })(opts.cmp); - - return (function stringify (node) { - if (typeof node !== 'object' || node === null) { - return json.stringify(node); - } - if (isArray(node)) { - var out = []; - for (var i = 0; i < node.length; i++) { - out.push(stringify(node[i])); - } - return '[' + out.join(',') + ']'; - } - else { - var keys = objectKeys(node).sort(cmp && cmp(node)); - var out = []; - for (var i = 0; i < keys.length; i++) { - var key = keys[i]; - out.push(stringify(key) + ':' + stringify(node[key])); - } - return '{' + out.join(',') + '}'; - } - })(obj); -}; - -var isArray = Array.isArray || function (x) { - return {}.toString.call(x) === '[object Array]'; -}; - -var objectKeys = Object.keys || function (obj) { - var has = Object.prototype.hasOwnProperty || function () { return true }; - var keys = []; - for (var key in obj) { - if (has.call(obj, key)) keys.push(key); - } - return keys; -}; diff --git a/node_modules/browserify/node_modules/shasum/node_modules/json-stable-stringify/node_modules/jsonify/README.markdown b/node_modules/browserify/node_modules/shasum/node_modules/json-stable-stringify/node_modules/jsonify/README.markdown deleted file mode 100644 index 71d9a93b..00000000 --- a/node_modules/browserify/node_modules/shasum/node_modules/json-stable-stringify/node_modules/jsonify/README.markdown +++ /dev/null @@ -1,34 +0,0 @@ -jsonify -======= - -This module provides Douglas Crockford's JSON implementation without modifying -any globals. - -`stringify` and `parse` are merely exported without respect to whether or not a -global `JSON` object exists. - -methods -======= - -var json = require('jsonify'); - -json.parse(source, reviver) ---------------------------- - -Return a new javascript object from a parse of the `source` string. - -If a `reviver` function is specified, walk the structure passing each name/value -pair to `reviver.call(parent, key, value)` to transform the `value` before -parsing it. - -json.stringify(value, replacer, space) --------------------------------------- - -Return a string representation for `value`. - -If `replacer` is specified, walk the structure passing each name/value pair to -`replacer.call(parent, key, value)` to transform the `value` before stringifying -it. - -If `space` is a number, indent the result by that many spaces. -If `space` is a string, use `space` as the indentation. diff --git a/node_modules/browserify/node_modules/shasum/node_modules/json-stable-stringify/node_modules/jsonify/index.js b/node_modules/browserify/node_modules/shasum/node_modules/json-stable-stringify/node_modules/jsonify/index.js deleted file mode 100644 index f728a160..00000000 --- a/node_modules/browserify/node_modules/shasum/node_modules/json-stable-stringify/node_modules/jsonify/index.js +++ /dev/null @@ -1,2 +0,0 @@ -exports.parse = require('./lib/parse'); -exports.stringify = require('./lib/stringify'); diff --git a/node_modules/browserify/node_modules/shasum/node_modules/json-stable-stringify/node_modules/jsonify/lib/parse.js b/node_modules/browserify/node_modules/shasum/node_modules/json-stable-stringify/node_modules/jsonify/lib/parse.js deleted file mode 100644 index 30e2f014..00000000 --- a/node_modules/browserify/node_modules/shasum/node_modules/json-stable-stringify/node_modules/jsonify/lib/parse.js +++ /dev/null @@ -1,273 +0,0 @@ -var at, // The index of the current character - ch, // The current character - escapee = { - '"': '"', - '\\': '\\', - '/': '/', - b: '\b', - f: '\f', - n: '\n', - r: '\r', - t: '\t' - }, - text, - - error = function (m) { - // Call error when something is wrong. - throw { - name: 'SyntaxError', - message: m, - at: at, - text: text - }; - }, - - next = function (c) { - // If a c parameter is provided, verify that it matches the current character. - if (c && c !== ch) { - error("Expected '" + c + "' instead of '" + ch + "'"); - } - - // Get the next character. When there are no more characters, - // return the empty string. - - ch = text.charAt(at); - at += 1; - return ch; - }, - - number = function () { - // Parse a number value. - var number, - string = ''; - - if (ch === '-') { - string = '-'; - next('-'); - } - while (ch >= '0' && ch <= '9') { - string += ch; - next(); - } - if (ch === '.') { - string += '.'; - while (next() && ch >= '0' && ch <= '9') { - string += ch; - } - } - if (ch === 'e' || ch === 'E') { - string += ch; - next(); - if (ch === '-' || ch === '+') { - string += ch; - next(); - } - while (ch >= '0' && ch <= '9') { - string += ch; - next(); - } - } - number = +string; - if (!isFinite(number)) { - error("Bad number"); - } else { - return number; - } - }, - - string = function () { - // Parse a string value. - var hex, - i, - string = '', - uffff; - - // When parsing for string values, we must look for " and \ characters. - if (ch === '"') { - while (next()) { - if (ch === '"') { - next(); - return string; - } else if (ch === '\\') { - next(); - if (ch === 'u') { - uffff = 0; - for (i = 0; i < 4; i += 1) { - hex = parseInt(next(), 16); - if (!isFinite(hex)) { - break; - } - uffff = uffff * 16 + hex; - } - string += String.fromCharCode(uffff); - } else if (typeof escapee[ch] === 'string') { - string += escapee[ch]; - } else { - break; - } - } else { - string += ch; - } - } - } - error("Bad string"); - }, - - white = function () { - -// Skip whitespace. - - while (ch && ch <= ' ') { - next(); - } - }, - - word = function () { - -// true, false, or null. - - switch (ch) { - case 't': - next('t'); - next('r'); - next('u'); - next('e'); - return true; - case 'f': - next('f'); - next('a'); - next('l'); - next('s'); - next('e'); - return false; - case 'n': - next('n'); - next('u'); - next('l'); - next('l'); - return null; - } - error("Unexpected '" + ch + "'"); - }, - - value, // Place holder for the value function. - - array = function () { - -// Parse an array value. - - var array = []; - - if (ch === '[') { - next('['); - white(); - if (ch === ']') { - next(']'); - return array; // empty array - } - while (ch) { - array.push(value()); - white(); - if (ch === ']') { - next(']'); - return array; - } - next(','); - white(); - } - } - error("Bad array"); - }, - - object = function () { - -// Parse an object value. - - var key, - object = {}; - - if (ch === '{') { - next('{'); - white(); - if (ch === '}') { - next('}'); - return object; // empty object - } - while (ch) { - key = string(); - white(); - next(':'); - if (Object.hasOwnProperty.call(object, key)) { - error('Duplicate key "' + key + '"'); - } - object[key] = value(); - white(); - if (ch === '}') { - next('}'); - return object; - } - next(','); - white(); - } - } - error("Bad object"); - }; - -value = function () { - -// Parse a JSON value. It could be an object, an array, a string, a number, -// or a word. - - white(); - switch (ch) { - case '{': - return object(); - case '[': - return array(); - case '"': - return string(); - case '-': - return number(); - default: - return ch >= '0' && ch <= '9' ? number() : word(); - } -}; - -// Return the json_parse function. It will have access to all of the above -// functions and variables. - -module.exports = function (source, reviver) { - var result; - - text = source; - at = 0; - ch = ' '; - result = value(); - white(); - if (ch) { - error("Syntax error"); - } - - // If there is a reviver function, we recursively walk the new structure, - // passing each name/value pair to the reviver function for possible - // transformation, starting with a temporary root object that holds the result - // in an empty key. If there is not a reviver function, we simply return the - // result. - - return typeof reviver === 'function' ? (function walk(holder, key) { - var k, v, value = holder[key]; - if (value && typeof value === 'object') { - for (k in value) { - if (Object.prototype.hasOwnProperty.call(value, k)) { - v = walk(value, k); - if (v !== undefined) { - value[k] = v; - } else { - delete value[k]; - } - } - } - } - return reviver.call(holder, key, value); - }({'': result}, '')) : result; -}; diff --git a/node_modules/browserify/node_modules/shasum/node_modules/json-stable-stringify/node_modules/jsonify/lib/stringify.js b/node_modules/browserify/node_modules/shasum/node_modules/json-stable-stringify/node_modules/jsonify/lib/stringify.js deleted file mode 100644 index 13458708..00000000 --- a/node_modules/browserify/node_modules/shasum/node_modules/json-stable-stringify/node_modules/jsonify/lib/stringify.js +++ /dev/null @@ -1,154 +0,0 @@ -var cx = /[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g, - escapable = /[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g, - gap, - indent, - meta = { // table of character substitutions - '\b': '\\b', - '\t': '\\t', - '\n': '\\n', - '\f': '\\f', - '\r': '\\r', - '"' : '\\"', - '\\': '\\\\' - }, - rep; - -function quote(string) { - // If the string contains no control characters, no quote characters, and no - // backslash characters, then we can safely slap some quotes around it. - // Otherwise we must also replace the offending characters with safe escape - // sequences. - - escapable.lastIndex = 0; - return escapable.test(string) ? '"' + string.replace(escapable, function (a) { - var c = meta[a]; - return typeof c === 'string' ? c : - '\\u' + ('0000' + a.charCodeAt(0).toString(16)).slice(-4); - }) + '"' : '"' + string + '"'; -} - -function str(key, holder) { - // Produce a string from holder[key]. - var i, // The loop counter. - k, // The member key. - v, // The member value. - length, - mind = gap, - partial, - value = holder[key]; - - // If the value has a toJSON method, call it to obtain a replacement value. - if (value && typeof value === 'object' && - typeof value.toJSON === 'function') { - value = value.toJSON(key); - } - - // If we were called with a replacer function, then call the replacer to - // obtain a replacement value. - if (typeof rep === 'function') { - value = rep.call(holder, key, value); - } - - // What happens next depends on the value's type. - switch (typeof value) { - case 'string': - return quote(value); - - case 'number': - // JSON numbers must be finite. Encode non-finite numbers as null. - return isFinite(value) ? String(value) : 'null'; - - case 'boolean': - case 'null': - // If the value is a boolean or null, convert it to a string. Note: - // typeof null does not produce 'null'. The case is included here in - // the remote chance that this gets fixed someday. - return String(value); - - case 'object': - if (!value) return 'null'; - gap += indent; - partial = []; - - // Array.isArray - if (Object.prototype.toString.apply(value) === '[object Array]') { - length = value.length; - for (i = 0; i < length; i += 1) { - partial[i] = str(i, value) || 'null'; - } - - // Join all of the elements together, separated with commas, and - // wrap them in brackets. - v = partial.length === 0 ? '[]' : gap ? - '[\n' + gap + partial.join(',\n' + gap) + '\n' + mind + ']' : - '[' + partial.join(',') + ']'; - gap = mind; - return v; - } - - // If the replacer is an array, use it to select the members to be - // stringified. - if (rep && typeof rep === 'object') { - length = rep.length; - for (i = 0; i < length; i += 1) { - k = rep[i]; - if (typeof k === 'string') { - v = str(k, value); - if (v) { - partial.push(quote(k) + (gap ? ': ' : ':') + v); - } - } - } - } - else { - // Otherwise, iterate through all of the keys in the object. - for (k in value) { - if (Object.prototype.hasOwnProperty.call(value, k)) { - v = str(k, value); - if (v) { - partial.push(quote(k) + (gap ? ': ' : ':') + v); - } - } - } - } - - // Join all of the member texts together, separated with commas, - // and wrap them in braces. - - v = partial.length === 0 ? '{}' : gap ? - '{\n' + gap + partial.join(',\n' + gap) + '\n' + mind + '}' : - '{' + partial.join(',') + '}'; - gap = mind; - return v; - } -} - -module.exports = function (value, replacer, space) { - var i; - gap = ''; - indent = ''; - - // If the space parameter is a number, make an indent string containing that - // many spaces. - if (typeof space === 'number') { - for (i = 0; i < space; i += 1) { - indent += ' '; - } - } - // If the space parameter is a string, it will be used as the indent string. - else if (typeof space === 'string') { - indent = space; - } - - // If there is a replacer, it must be a function or an array. - // Otherwise, throw an error. - rep = replacer; - if (replacer && typeof replacer !== 'function' - && (typeof replacer !== 'object' || typeof replacer.length !== 'number')) { - throw new Error('JSON.stringify'); - } - - // Make a fake root object containing our value under the key of ''. - // Return the result of stringifying the value. - return str('', {'': value}); -}; diff --git a/node_modules/browserify/node_modules/shasum/node_modules/json-stable-stringify/node_modules/jsonify/package.json b/node_modules/browserify/node_modules/shasum/node_modules/json-stable-stringify/node_modules/jsonify/package.json deleted file mode 100644 index 27780b62..00000000 --- a/node_modules/browserify/node_modules/shasum/node_modules/json-stable-stringify/node_modules/jsonify/package.json +++ /dev/null @@ -1,57 +0,0 @@ -{ - "name": "jsonify", - "version": "0.0.0", - "description": "JSON without touching any globals", - "main": "index.js", - "directories": { - "lib": ".", - "test": "test" - }, - "devDependencies": { - "tap": "0.0.x", - "garbage": "0.0.x" - }, - "scripts": { - "test": "tap test" - }, - "repository": { - "type": "git", - "url": "git://github.com/substack/jsonify.git" - }, - "keywords": [ - "json", - "browser" - ], - "author": { - "name": "Douglas Crockford", - "url": "http://crockford.com/" - }, - "license": "Public Domain", - "_id": "jsonify@0.0.0", - "dependencies": {}, - "engines": { - "node": "*" - }, - "_engineSupported": true, - "_npmVersion": "1.0.10", - "_nodeVersion": "v0.5.0-pre", - "_defaultsLoaded": true, - "dist": { - "shasum": "2c74b6ee41d93ca51b7b5aaee8f503631d252a73", - "tarball": "http://registry.npmjs.org/jsonify/-/jsonify-0.0.0.tgz" - }, - "maintainers": [ - { - "name": "substack", - "email": "mail@substack.net" - } - ], - "_shasum": "2c74b6ee41d93ca51b7b5aaee8f503631d252a73", - "_resolved": "https://registry.npmjs.org/jsonify/-/jsonify-0.0.0.tgz", - "_from": "jsonify@>=0.0.0 <0.1.0", - "bugs": { - "url": "https://github.com/substack/jsonify/issues" - }, - "readme": "ERROR: No README data found!", - "homepage": "https://github.com/substack/jsonify" -} diff --git a/node_modules/browserify/node_modules/shasum/node_modules/json-stable-stringify/node_modules/jsonify/test/parse.js b/node_modules/browserify/node_modules/shasum/node_modules/json-stable-stringify/node_modules/jsonify/test/parse.js deleted file mode 100644 index e2313f55..00000000 --- a/node_modules/browserify/node_modules/shasum/node_modules/json-stable-stringify/node_modules/jsonify/test/parse.js +++ /dev/null @@ -1,16 +0,0 @@ -var test = require('tap').test; -var json = require('../'); -var garbage = require('garbage'); - -test('parse', function (t) { - for (var i = 0; i < 50; i++) { - var s = JSON.stringify(garbage(50)); - - t.deepEqual( - json.parse(s), - JSON.parse(s) - ); - } - - t.end(); -}); diff --git a/node_modules/browserify/node_modules/shasum/node_modules/json-stable-stringify/node_modules/jsonify/test/stringify.js b/node_modules/browserify/node_modules/shasum/node_modules/json-stable-stringify/node_modules/jsonify/test/stringify.js deleted file mode 100644 index 89b0b670..00000000 --- a/node_modules/browserify/node_modules/shasum/node_modules/json-stable-stringify/node_modules/jsonify/test/stringify.js +++ /dev/null @@ -1,15 +0,0 @@ -var test = require('tap').test; -var json = require('../'); -var garbage = require('garbage'); - -test('stringify', function (t) { - for (var i = 0; i < 50; i++) { - var obj = garbage(50); - t.equal( - json.stringify(obj), - JSON.stringify(obj) - ); - } - - t.end(); -}); diff --git a/node_modules/browserify/node_modules/shasum/node_modules/json-stable-stringify/package.json b/node_modules/browserify/node_modules/shasum/node_modules/json-stable-stringify/package.json deleted file mode 100644 index 7b83dd51..00000000 --- a/node_modules/browserify/node_modules/shasum/node_modules/json-stable-stringify/package.json +++ /dev/null @@ -1,70 +0,0 @@ -{ - "name": "json-stable-stringify", - "version": "0.0.1", - "description": "deterministic JSON.stringify() with custom sorting to get deterministic hashes from stringified results", - "main": "index.js", - "dependencies": { - "jsonify": "~0.0.0" - }, - "devDependencies": { - "tape": "~1.0.4" - }, - "scripts": { - "test": "tape test/*.js" - }, - "testling": { - "files": "test/*.js", - "browsers": [ - "ie/8..latest", - "ff/5", - "ff/latest", - "chrome/15", - "chrome/latest", - "safari/latest", - "opera/latest" - ] - }, - "repository": { - "type": "git", - "url": "git://github.com/substack/json-stable-stringify.git" - }, - "homepage": "https://github.com/substack/json-stable-stringify", - "keywords": [ - "json", - "stringify", - "deterministic", - "hash", - "sort", - "stable" - ], - "author": { - "name": "James Halliday", - "email": "mail@substack.net", - "url": "http://substack.net" - }, - "license": "MIT", - "bugs": { - "url": "https://github.com/substack/json-stable-stringify/issues" - }, - "_id": "json-stable-stringify@0.0.1", - "dist": { - "shasum": "611c23e814db375527df851193db59dd2af27f45", - "tarball": "https://registry.npmjs.org/json-stable-stringify/-/json-stable-stringify-0.0.1.tgz" - }, - "_from": "json-stable-stringify@>=0.0.0 <0.1.0", - "_npmVersion": "1.3.0", - "_npmUser": { - "name": "substack", - "email": "mail@substack.net" - }, - "maintainers": [ - { - "name": "substack", - "email": "mail@substack.net" - } - ], - "directories": {}, - "_shasum": "611c23e814db375527df851193db59dd2af27f45", - "_resolved": "https://registry.npmjs.org/json-stable-stringify/-/json-stable-stringify-0.0.1.tgz", - "readme": "ERROR: No README data found!" -} diff --git a/node_modules/browserify/node_modules/shasum/node_modules/json-stable-stringify/readme.markdown b/node_modules/browserify/node_modules/shasum/node_modules/json-stable-stringify/readme.markdown deleted file mode 100644 index 3a3d00c7..00000000 --- a/node_modules/browserify/node_modules/shasum/node_modules/json-stable-stringify/readme.markdown +++ /dev/null @@ -1,90 +0,0 @@ -# json-stable-stringify - -deterministic version of `JSON.stringify()` so you can get a consistent hash -from stringified results - -You can also pass in a custom comparison function. - -[![browser support](https://ci.testling.com/substack/json-stable-stringify.png)](https://ci.testling.com/substack/json-stable-stringify) - -[![build status](https://secure.travis-ci.org/substack/json-stable-stringify.png)](http://travis-ci.org/substack/json-stable-stringify) - -# example - -``` js -var stringify = require('json-stable-stringify'); -var obj = { c: 8, b: [{z:6,y:5,x:4},7], a: 3 }; -console.log(stringify(obj)); -``` - -output: - -``` -{"a":3,"b":[{"x":4,"y":5,"z":6},7],"c":8} -``` - -# methods - -``` js -var stringify = require('json-stable-stringify') -``` - -## var str = stringify(obj, opts) - -Return a deterministic stringified string `str` from the object `obj`. - -If `opts` is given, you can supply an `opts.cmp` to have a custom comparison -function for object keys. Your function `opts.cmp` is called with these -parameters: - -``` js -opts.cmp({ key: akey, value: avalue }, { key: bkey, value: bvalue }) -``` - -For example, to sort on the object key names in reverse order you could write: - -``` js -var stringify = require('json-stable-stringify'); - -var obj = { c: 8, b: [{z:6,y:5,x:4},7], a: 3 }; -var s = stringify(obj, function (a, b) { - return a.key < b.key ? 1 : -1; -}); -console.log(s); -``` - -which results in the output string: - -``` -{"c":8,"b":[{"z":6,"y":5,"x":4},7],"a":3} -``` - -Or if you wanted to sort on the object values in reverse order, you could write: - -``` -var stringify = require('json-stable-stringify'); - -var obj = { d: 6, c: 5, b: [{z:3,y:2,x:1},9], a: 10 }; -var s = stringify(obj, function (a, b) { - return a.value < b.value ? 1 : -1; -}); -console.log(s); -``` - -which outputs: - -``` -{"d":6,"c":5,"b":[{"z":3,"y":2,"x":1},9],"a":10} -``` - -# install - -With [npm](https://npmjs.org) do: - -``` -npm install json-stable-stringify -``` - -# license - -MIT diff --git a/node_modules/browserify/node_modules/shasum/node_modules/json-stable-stringify/test/cmp.js b/node_modules/browserify/node_modules/shasum/node_modules/json-stable-stringify/test/cmp.js deleted file mode 100644 index 2dbb3935..00000000 --- a/node_modules/browserify/node_modules/shasum/node_modules/json-stable-stringify/test/cmp.js +++ /dev/null @@ -1,11 +0,0 @@ -var test = require('tape'); -var stringify = require('../'); - -test('custom comparison function', function (t) { - t.plan(1); - var obj = { c: 8, b: [{z:6,y:5,x:4},7], a: 3 }; - var s = stringify(obj, function (a, b) { - return a.key < b.key ? 1 : -1; - }); - t.equal(s, '{"c":8,"b":[{"z":6,"y":5,"x":4},7],"a":3}'); -}); diff --git a/node_modules/browserify/node_modules/shasum/node_modules/json-stable-stringify/test/nested.js b/node_modules/browserify/node_modules/shasum/node_modules/json-stable-stringify/test/nested.js deleted file mode 100644 index 43459f2b..00000000 --- a/node_modules/browserify/node_modules/shasum/node_modules/json-stable-stringify/test/nested.js +++ /dev/null @@ -1,8 +0,0 @@ -var test = require('tape'); -var stringify = require('../'); - -test('nested', function (t) { - t.plan(1); - var obj = { c: 8, b: [{z:6,y:5,x:4},7], a: 3 }; - t.equal(stringify(obj), '{"a":3,"b":[{"x":4,"y":5,"z":6},7],"c":8}'); -}); diff --git a/node_modules/browserify/node_modules/shasum/node_modules/json-stable-stringify/test/str.js b/node_modules/browserify/node_modules/shasum/node_modules/json-stable-stringify/test/str.js deleted file mode 100644 index d0e91593..00000000 --- a/node_modules/browserify/node_modules/shasum/node_modules/json-stable-stringify/test/str.js +++ /dev/null @@ -1,8 +0,0 @@ -var test = require('tape'); -var stringify = require('../'); - -test('simple object', function (t) { - t.plan(1); - var obj = { c: 6, b: [4,5], a: 3, z: null }; - t.equal(stringify(obj), '{"a":3,"b":[4,5],"c":6,"z":null}'); -}); diff --git a/node_modules/browserify/node_modules/shasum/node_modules/sha.js/.npmignore b/node_modules/browserify/node_modules/shasum/node_modules/sha.js/.npmignore deleted file mode 100644 index 3c3629e6..00000000 --- a/node_modules/browserify/node_modules/shasum/node_modules/sha.js/.npmignore +++ /dev/null @@ -1 +0,0 @@ -node_modules diff --git a/node_modules/browserify/node_modules/shasum/node_modules/sha.js/.travis.yml b/node_modules/browserify/node_modules/shasum/node_modules/sha.js/.travis.yml deleted file mode 100644 index cbc0adb7..00000000 --- a/node_modules/browserify/node_modules/shasum/node_modules/sha.js/.travis.yml +++ /dev/null @@ -1,19 +0,0 @@ -sudo: false -os: - - linux -language: node_js -node_js: - - "0.10" - - "0.11" - - "0.12" - - "4" - - "5" - - "6" -env: - matrix: - - TEST_SUITE=unit -matrix: - include: - - node_js: "4" - env: TEST_SUITE=lint -script: npm run $TEST_SUITE diff --git a/node_modules/browserify/node_modules/shasum/node_modules/sha.js/LICENSE b/node_modules/browserify/node_modules/shasum/node_modules/sha.js/LICENSE deleted file mode 100644 index 92ba9d30..00000000 --- a/node_modules/browserify/node_modules/shasum/node_modules/sha.js/LICENSE +++ /dev/null @@ -1,22 +0,0 @@ -Copyright (c) 2013-2014 sha.js contributors - -Permission is hereby granted, free of charge, -to any person obtaining a copy of this software and -associated documentation files (the "Software"), to -deal in the Software without restriction, including -without limitation the rights to use, copy, modify, -merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom -the Software is furnished to do so, -subject to the following conditions: - -The above copyright notice and this permission notice -shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES -OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR -ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/browserify/node_modules/shasum/node_modules/sha.js/README.md b/node_modules/browserify/node_modules/shasum/node_modules/sha.js/README.md deleted file mode 100644 index fbce2319..00000000 --- a/node_modules/browserify/node_modules/shasum/node_modules/sha.js/README.md +++ /dev/null @@ -1,54 +0,0 @@ -# sha.js - -Streamable SHA hashes in pure javascript. - -[![build status](https://secure.travis-ci.org/crypto-browserify/sha.js.png)](http://travis-ci.org/crypto-browserify/sha.js) -[![NPM](http://img.shields.io/npm/v/sha.js.svg)](https://www.npmjs.org/package/sha.js) - - -## Example - -``` js -var createHash = require('sha.js') - -var sha256 = createHash('sha256') -var sha512 = createHash('sha512') - -var h = sha256.update('abc', 'utf8').digest('hex') -console.log(h) //ba7816bf8f01cfea414140de5dae2223b00361a396177a9cb410ff61f20015ad - -//LEGACY, do not use in new systems: -var sha0 = createHash('sha') -var sha1 = createHash('sha1') - - -``` - -## supported hashes - -sha.js currently implements: - - -* sha256 -* sha512 -* sha1 (legacy, no not use in new systems) -* sha (legacy, no not use in new systems) - -## Note - -Note, this doesn't actually implement a stream, but wrapping this in a stream is trivial. -but is does update incrementally, so you can hash things larger than ram, and also, since it reuses -the typedarrays, it uses a constant amount of memory (except when using base64 or utf8 encoding, -see code comments) - - -## Acknowledgements - -This work is derived from Paul Johnston's ["A JavaScript implementation of the Secure Hash Algorithm"] -(http://pajhome.org.uk/crypt/md5/sha1.html) - - - -## License - -MIT diff --git a/node_modules/browserify/node_modules/shasum/node_modules/sha.js/bin.js b/node_modules/browserify/node_modules/shasum/node_modules/sha.js/bin.js deleted file mode 100755 index 0a4e95bf..00000000 --- a/node_modules/browserify/node_modules/shasum/node_modules/sha.js/bin.js +++ /dev/null @@ -1,43 +0,0 @@ -#! /usr/bin/env node - -var createHash = require('./browserify') -var argv = process.argv.slice(2) - -function pipe (algorithm, s) { - var start = Date.now() - var hash = createHash(algorithm || 'sha1') - - s.on('data', function (data) { - hash.update(data) - }) - - s.on('end', function () { - if (process.env.DEBUG) { - return console.log(hash.digest('hex'), Date.now() - start) - } - - console.log(hash.digest('hex')) - }) -} - -function usage () { - console.error('sha.js [algorithm=sha1] [filename] # hash filename with algorithm') - console.error('input | sha.js [algorithm=sha1] # hash stdin with algorithm') - console.error('sha.js --help # display this message') -} - -if (!process.stdin.isTTY) { - pipe(argv[0], process.stdin) - -} else if (argv.length) { - if (/--help|-h/.test(argv[0])) { - usage() - - } else { - var filename = argv.pop() - var algorithm = argv.pop() - pipe(algorithm, require('fs').createReadStream(filename)) - } -} else { - usage() -} diff --git a/node_modules/browserify/node_modules/shasum/node_modules/sha.js/hash.js b/node_modules/browserify/node_modules/shasum/node_modules/sha.js/hash.js deleted file mode 100644 index 09579d2d..00000000 --- a/node_modules/browserify/node_modules/shasum/node_modules/sha.js/hash.js +++ /dev/null @@ -1,69 +0,0 @@ -// prototype class for hash functions -function Hash (blockSize, finalSize) { - this._block = new Buffer(blockSize) - this._finalSize = finalSize - this._blockSize = blockSize - this._len = 0 - this._s = 0 -} - -Hash.prototype.update = function (data, enc) { - if (typeof data === 'string') { - enc = enc || 'utf8' - data = new Buffer(data, enc) - } - - var l = this._len += data.length - var s = this._s || 0 - var f = 0 - var buffer = this._block - - while (s < l) { - var t = Math.min(data.length, f + this._blockSize - (s % this._blockSize)) - var ch = (t - f) - - for (var i = 0; i < ch; i++) { - buffer[(s % this._blockSize) + i] = data[i + f] - } - - s += ch - f += ch - - if ((s % this._blockSize) === 0) { - this._update(buffer) - } - } - this._s = s - - return this -} - -Hash.prototype.digest = function (enc) { - // Suppose the length of the message M, in bits, is l - var l = this._len * 8 - - // Append the bit 1 to the end of the message - this._block[this._len % this._blockSize] = 0x80 - - // and then k zero bits, where k is the smallest non-negative solution to the equation (l + 1 + k) === finalSize mod blockSize - this._block.fill(0, this._len % this._blockSize + 1) - - if (l % (this._blockSize * 8) >= this._finalSize * 8) { - this._update(this._block) - this._block.fill(0) - } - - // to this append the block which is equal to the number l written in binary - // TODO: handle case where l is > Math.pow(2, 29) - this._block.writeInt32BE(l, this._blockSize - 4) - - var hash = this._update(this._block) || this._hash() - - return enc ? hash.toString(enc) : hash -} - -Hash.prototype._update = function () { - throw new Error('_update must be implemented by subclass') -} - -module.exports = Hash diff --git a/node_modules/browserify/node_modules/shasum/node_modules/sha.js/hexpp.js b/node_modules/browserify/node_modules/shasum/node_modules/sha.js/hexpp.js deleted file mode 100644 index 4f1e9219..00000000 --- a/node_modules/browserify/node_modules/shasum/node_modules/sha.js/hexpp.js +++ /dev/null @@ -1,26 +0,0 @@ -function toHex (buf, group, wrap, LE) { - buf = buf.buffer || buf - var s = '' - var l = buf.byteLength || buf.length - for (var i = 0; i < l ; i++) { - var byteParam = (i & 0xfffffffc) | (!LE ? i % 4 : 3 - i % 4) - s += ((buf[byteParam] >> 4).toString(16)) + - ((buf[byteParam] & 0xf).toString(16)) + - (group - 1 === i % group ? ' ' : '') + - (wrap - 1 === i % wrap ? '\n' : '') - } - return s -} - -var hexpp = module.exports = function hexpp (buffer, opts) { - opts = opts || {} - opts.groups = opts.groups || 4 - opts.wrap = opts.wrap || 16 - return toHex(buffer, opts.groups, opts.wrap, opts.bigendian, opts.ints) -} - -hexpp.defaults = function (opts) { - return function (b) { - return hexpp(b, opts) - } -} diff --git a/node_modules/browserify/node_modules/shasum/node_modules/sha.js/index.js b/node_modules/browserify/node_modules/shasum/node_modules/sha.js/index.js deleted file mode 100644 index 87cdf493..00000000 --- a/node_modules/browserify/node_modules/shasum/node_modules/sha.js/index.js +++ /dev/null @@ -1,15 +0,0 @@ -var exports = module.exports = function SHA (algorithm) { - algorithm = algorithm.toLowerCase() - - var Algorithm = exports[algorithm] - if (!Algorithm) throw new Error(algorithm + ' is not supported (we accept pull requests)') - - return new Algorithm() -} - -exports.sha = require('./sha') -exports.sha1 = require('./sha1') -exports.sha224 = require('./sha224') -exports.sha256 = require('./sha256') -exports.sha384 = require('./sha384') -exports.sha512 = require('./sha512') diff --git a/node_modules/browserify/node_modules/shasum/node_modules/sha.js/package.json b/node_modules/browserify/node_modules/shasum/node_modules/sha.js/package.json deleted file mode 100644 index 2e625b14..00000000 --- a/node_modules/browserify/node_modules/shasum/node_modules/sha.js/package.json +++ /dev/null @@ -1,69 +0,0 @@ -{ - "name": "sha.js", - "description": "Streamable SHA hashes in pure javascript", - "version": "2.4.8", - "homepage": "https://github.com/crypto-browserify/sha.js", - "repository": { - "type": "git", - "url": "git://github.com/crypto-browserify/sha.js.git" - }, - "dependencies": { - "inherits": "^2.0.1" - }, - "devDependencies": { - "buffer": "~2.3.2", - "hash-test-vectors": "^1.3.1", - "standard": "^4.0.0", - "tape": "~2.3.2", - "typedarray": "0.0.6" - }, - "bin": { - "sha.js": "./bin.js" - }, - "scripts": { - "prepublish": "npm ls && npm run unit", - "lint": "standard", - "test": "npm run lint && npm run unit", - "unit": "set -e; for t in test/*.js; do node $t; done;" - }, - "author": { - "name": "Dominic Tarr", - "email": "dominic.tarr@gmail.com", - "url": "dominictarr.com" - }, - "license": "MIT", - "gitHead": "c233442bbd5695863d03155511d61bc8dcc63652", - "bugs": { - "url": "https://github.com/crypto-browserify/sha.js/issues" - }, - "_id": "sha.js@2.4.8", - "_shasum": "37068c2c476b6baf402d14a49c67f597921f634f", - "_from": "sha.js@>=2.4.4 <2.5.0", - "_npmVersion": "3.10.9", - "_nodeVersion": "7.1.0", - "_npmUser": { - "name": "dcousens", - "email": "email@dcousens.com" - }, - "dist": { - "shasum": "37068c2c476b6baf402d14a49c67f597921f634f", - "tarball": "https://registry.npmjs.org/sha.js/-/sha.js-2.4.8.tgz" - }, - "maintainers": [ - { - "name": "dominictarr", - "email": "dominic.tarr@gmail.com" - }, - { - "name": "dcousens", - "email": "email@dcousens.com" - } - ], - "_npmOperationalInternal": { - "host": "packages-18-east.internal.npmjs.com", - "tmp": "tmp/sha.js-2.4.8.tgz_1478821351146_0.4951752780470997" - }, - "directories": {}, - "_resolved": "https://registry.npmjs.org/sha.js/-/sha.js-2.4.8.tgz", - "readme": "ERROR: No README data found!" -} diff --git a/node_modules/browserify/node_modules/shasum/node_modules/sha.js/sha.js b/node_modules/browserify/node_modules/shasum/node_modules/sha.js/sha.js deleted file mode 100644 index 7cde1b0c..00000000 --- a/node_modules/browserify/node_modules/shasum/node_modules/sha.js/sha.js +++ /dev/null @@ -1,93 +0,0 @@ -/* - * A JavaScript implementation of the Secure Hash Algorithm, SHA-0, as defined - * in FIPS PUB 180-1 - * This source code is derived from sha1.js of the same repository. - * The difference between SHA-0 and SHA-1 is just a bitwise rotate left - * operation was added. - */ - -var inherits = require('inherits') -var Hash = require('./hash') - -var K = [ - 0x5a827999, 0x6ed9eba1, 0x8f1bbcdc | 0, 0xca62c1d6 | 0 -] - -var W = new Array(80) - -function Sha () { - this.init() - this._w = W - - Hash.call(this, 64, 56) -} - -inherits(Sha, Hash) - -Sha.prototype.init = function () { - this._a = 0x67452301 - this._b = 0xefcdab89 - this._c = 0x98badcfe - this._d = 0x10325476 - this._e = 0xc3d2e1f0 - - return this -} - -function rotl5 (num) { - return (num << 5) | (num >>> 27) -} - -function rotl30 (num) { - return (num << 30) | (num >>> 2) -} - -function ft (s, b, c, d) { - if (s === 0) return (b & c) | ((~b) & d) - if (s === 2) return (b & c) | (b & d) | (c & d) - return b ^ c ^ d -} - -Sha.prototype._update = function (M) { - var W = this._w - - var a = this._a | 0 - var b = this._b | 0 - var c = this._c | 0 - var d = this._d | 0 - var e = this._e | 0 - - for (var i = 0; i < 16; ++i) W[i] = M.readInt32BE(i * 4) - for (; i < 80; ++i) W[i] = W[i - 3] ^ W[i - 8] ^ W[i - 14] ^ W[i - 16] - - for (var j = 0; j < 80; ++j) { - var s = ~~(j / 20) - var t = (rotl5(a) + ft(s, b, c, d) + e + W[j] + K[s]) | 0 - - e = d - d = c - c = rotl30(b) - b = a - a = t - } - - this._a = (a + this._a) | 0 - this._b = (b + this._b) | 0 - this._c = (c + this._c) | 0 - this._d = (d + this._d) | 0 - this._e = (e + this._e) | 0 -} - -Sha.prototype._hash = function () { - var H = new Buffer(20) - - H.writeInt32BE(this._a | 0, 0) - H.writeInt32BE(this._b | 0, 4) - H.writeInt32BE(this._c | 0, 8) - H.writeInt32BE(this._d | 0, 12) - H.writeInt32BE(this._e | 0, 16) - - return H -} - -module.exports = Sha diff --git a/node_modules/browserify/node_modules/shasum/node_modules/sha.js/sha1.js b/node_modules/browserify/node_modules/shasum/node_modules/sha.js/sha1.js deleted file mode 100644 index 97f6b142..00000000 --- a/node_modules/browserify/node_modules/shasum/node_modules/sha.js/sha1.js +++ /dev/null @@ -1,98 +0,0 @@ -/* - * A JavaScript implementation of the Secure Hash Algorithm, SHA-1, as defined - * in FIPS PUB 180-1 - * Version 2.1a Copyright Paul Johnston 2000 - 2002. - * Other contributors: Greg Holt, Andrew Kepert, Ydnar, Lostinet - * Distributed under the BSD License - * See http://pajhome.org.uk/crypt/md5 for details. - */ - -var inherits = require('inherits') -var Hash = require('./hash') - -var K = [ - 0x5a827999, 0x6ed9eba1, 0x8f1bbcdc | 0, 0xca62c1d6 | 0 -] - -var W = new Array(80) - -function Sha1 () { - this.init() - this._w = W - - Hash.call(this, 64, 56) -} - -inherits(Sha1, Hash) - -Sha1.prototype.init = function () { - this._a = 0x67452301 - this._b = 0xefcdab89 - this._c = 0x98badcfe - this._d = 0x10325476 - this._e = 0xc3d2e1f0 - - return this -} - -function rotl1 (num) { - return (num << 1) | (num >>> 31) -} - -function rotl5 (num) { - return (num << 5) | (num >>> 27) -} - -function rotl30 (num) { - return (num << 30) | (num >>> 2) -} - -function ft (s, b, c, d) { - if (s === 0) return (b & c) | ((~b) & d) - if (s === 2) return (b & c) | (b & d) | (c & d) - return b ^ c ^ d -} - -Sha1.prototype._update = function (M) { - var W = this._w - - var a = this._a | 0 - var b = this._b | 0 - var c = this._c | 0 - var d = this._d | 0 - var e = this._e | 0 - - for (var i = 0; i < 16; ++i) W[i] = M.readInt32BE(i * 4) - for (; i < 80; ++i) W[i] = rotl1(W[i - 3] ^ W[i - 8] ^ W[i - 14] ^ W[i - 16]) - - for (var j = 0; j < 80; ++j) { - var s = ~~(j / 20) - var t = (rotl5(a) + ft(s, b, c, d) + e + W[j] + K[s]) | 0 - - e = d - d = c - c = rotl30(b) - b = a - a = t - } - - this._a = (a + this._a) | 0 - this._b = (b + this._b) | 0 - this._c = (c + this._c) | 0 - this._d = (d + this._d) | 0 - this._e = (e + this._e) | 0 -} - -Sha1.prototype._hash = function () { - var H = new Buffer(20) - - H.writeInt32BE(this._a | 0, 0) - H.writeInt32BE(this._b | 0, 4) - H.writeInt32BE(this._c | 0, 8) - H.writeInt32BE(this._d | 0, 12) - H.writeInt32BE(this._e | 0, 16) - - return H -} - -module.exports = Sha1 diff --git a/node_modules/browserify/node_modules/shasum/node_modules/sha.js/sha224.js b/node_modules/browserify/node_modules/shasum/node_modules/sha.js/sha224.js deleted file mode 100644 index 31899ef4..00000000 --- a/node_modules/browserify/node_modules/shasum/node_modules/sha.js/sha224.js +++ /dev/null @@ -1,52 +0,0 @@ -/** - * A JavaScript implementation of the Secure Hash Algorithm, SHA-256, as defined - * in FIPS 180-2 - * Version 2.2-beta Copyright Angel Marin, Paul Johnston 2000 - 2009. - * Other contributors: Greg Holt, Andrew Kepert, Ydnar, Lostinet - * - */ - -var inherits = require('inherits') -var Sha256 = require('./sha256') -var Hash = require('./hash') - -var W = new Array(64) - -function Sha224 () { - this.init() - - this._w = W // new Array(64) - - Hash.call(this, 64, 56) -} - -inherits(Sha224, Sha256) - -Sha224.prototype.init = function () { - this._a = 0xc1059ed8 - this._b = 0x367cd507 - this._c = 0x3070dd17 - this._d = 0xf70e5939 - this._e = 0xffc00b31 - this._f = 0x68581511 - this._g = 0x64f98fa7 - this._h = 0xbefa4fa4 - - return this -} - -Sha224.prototype._hash = function () { - var H = new Buffer(28) - - H.writeInt32BE(this._a, 0) - H.writeInt32BE(this._b, 4) - H.writeInt32BE(this._c, 8) - H.writeInt32BE(this._d, 12) - H.writeInt32BE(this._e, 16) - H.writeInt32BE(this._f, 20) - H.writeInt32BE(this._g, 24) - - return H -} - -module.exports = Sha224 diff --git a/node_modules/browserify/node_modules/shasum/node_modules/sha.js/sha256.js b/node_modules/browserify/node_modules/shasum/node_modules/sha.js/sha256.js deleted file mode 100644 index 69b60fef..00000000 --- a/node_modules/browserify/node_modules/shasum/node_modules/sha.js/sha256.js +++ /dev/null @@ -1,134 +0,0 @@ -/** - * A JavaScript implementation of the Secure Hash Algorithm, SHA-256, as defined - * in FIPS 180-2 - * Version 2.2-beta Copyright Angel Marin, Paul Johnston 2000 - 2009. - * Other contributors: Greg Holt, Andrew Kepert, Ydnar, Lostinet - * - */ - -var inherits = require('inherits') -var Hash = require('./hash') - -var K = [ - 0x428A2F98, 0x71374491, 0xB5C0FBCF, 0xE9B5DBA5, - 0x3956C25B, 0x59F111F1, 0x923F82A4, 0xAB1C5ED5, - 0xD807AA98, 0x12835B01, 0x243185BE, 0x550C7DC3, - 0x72BE5D74, 0x80DEB1FE, 0x9BDC06A7, 0xC19BF174, - 0xE49B69C1, 0xEFBE4786, 0x0FC19DC6, 0x240CA1CC, - 0x2DE92C6F, 0x4A7484AA, 0x5CB0A9DC, 0x76F988DA, - 0x983E5152, 0xA831C66D, 0xB00327C8, 0xBF597FC7, - 0xC6E00BF3, 0xD5A79147, 0x06CA6351, 0x14292967, - 0x27B70A85, 0x2E1B2138, 0x4D2C6DFC, 0x53380D13, - 0x650A7354, 0x766A0ABB, 0x81C2C92E, 0x92722C85, - 0xA2BFE8A1, 0xA81A664B, 0xC24B8B70, 0xC76C51A3, - 0xD192E819, 0xD6990624, 0xF40E3585, 0x106AA070, - 0x19A4C116, 0x1E376C08, 0x2748774C, 0x34B0BCB5, - 0x391C0CB3, 0x4ED8AA4A, 0x5B9CCA4F, 0x682E6FF3, - 0x748F82EE, 0x78A5636F, 0x84C87814, 0x8CC70208, - 0x90BEFFFA, 0xA4506CEB, 0xBEF9A3F7, 0xC67178F2 -] - -var W = new Array(64) - -function Sha256 () { - this.init() - - this._w = W // new Array(64) - - Hash.call(this, 64, 56) -} - -inherits(Sha256, Hash) - -Sha256.prototype.init = function () { - this._a = 0x6a09e667 - this._b = 0xbb67ae85 - this._c = 0x3c6ef372 - this._d = 0xa54ff53a - this._e = 0x510e527f - this._f = 0x9b05688c - this._g = 0x1f83d9ab - this._h = 0x5be0cd19 - - return this -} - -function ch (x, y, z) { - return z ^ (x & (y ^ z)) -} - -function maj (x, y, z) { - return (x & y) | (z & (x | y)) -} - -function sigma0 (x) { - return (x >>> 2 | x << 30) ^ (x >>> 13 | x << 19) ^ (x >>> 22 | x << 10) -} - -function sigma1 (x) { - return (x >>> 6 | x << 26) ^ (x >>> 11 | x << 21) ^ (x >>> 25 | x << 7) -} - -function gamma0 (x) { - return (x >>> 7 | x << 25) ^ (x >>> 18 | x << 14) ^ (x >>> 3) -} - -function gamma1 (x) { - return (x >>> 17 | x << 15) ^ (x >>> 19 | x << 13) ^ (x >>> 10) -} - -Sha256.prototype._update = function (M) { - var W = this._w - - var a = this._a | 0 - var b = this._b | 0 - var c = this._c | 0 - var d = this._d | 0 - var e = this._e | 0 - var f = this._f | 0 - var g = this._g | 0 - var h = this._h | 0 - - for (var i = 0; i < 16; ++i) W[i] = M.readInt32BE(i * 4) - for (; i < 64; ++i) W[i] = (gamma1(W[i - 2]) + W[i - 7] + gamma0(W[i - 15]) + W[i - 16]) | 0 - - for (var j = 0; j < 64; ++j) { - var T1 = (h + sigma1(e) + ch(e, f, g) + K[j] + W[j]) | 0 - var T2 = (sigma0(a) + maj(a, b, c)) | 0 - - h = g - g = f - f = e - e = (d + T1) | 0 - d = c - c = b - b = a - a = (T1 + T2) | 0 - } - - this._a = (a + this._a) | 0 - this._b = (b + this._b) | 0 - this._c = (c + this._c) | 0 - this._d = (d + this._d) | 0 - this._e = (e + this._e) | 0 - this._f = (f + this._f) | 0 - this._g = (g + this._g) | 0 - this._h = (h + this._h) | 0 -} - -Sha256.prototype._hash = function () { - var H = new Buffer(32) - - H.writeInt32BE(this._a, 0) - H.writeInt32BE(this._b, 4) - H.writeInt32BE(this._c, 8) - H.writeInt32BE(this._d, 12) - H.writeInt32BE(this._e, 16) - H.writeInt32BE(this._f, 20) - H.writeInt32BE(this._g, 24) - H.writeInt32BE(this._h, 28) - - return H -} - -module.exports = Sha256 diff --git a/node_modules/browserify/node_modules/shasum/node_modules/sha.js/sha384.js b/node_modules/browserify/node_modules/shasum/node_modules/sha.js/sha384.js deleted file mode 100644 index dc483120..00000000 --- a/node_modules/browserify/node_modules/shasum/node_modules/sha.js/sha384.js +++ /dev/null @@ -1,56 +0,0 @@ -var inherits = require('inherits') -var SHA512 = require('./sha512') -var Hash = require('./hash') - -var W = new Array(160) - -function Sha384 () { - this.init() - this._w = W - - Hash.call(this, 128, 112) -} - -inherits(Sha384, SHA512) - -Sha384.prototype.init = function () { - this._ah = 0xcbbb9d5d - this._bh = 0x629a292a - this._ch = 0x9159015a - this._dh = 0x152fecd8 - this._eh = 0x67332667 - this._fh = 0x8eb44a87 - this._gh = 0xdb0c2e0d - this._hh = 0x47b5481d - - this._al = 0xc1059ed8 - this._bl = 0x367cd507 - this._cl = 0x3070dd17 - this._dl = 0xf70e5939 - this._el = 0xffc00b31 - this._fl = 0x68581511 - this._gl = 0x64f98fa7 - this._hl = 0xbefa4fa4 - - return this -} - -Sha384.prototype._hash = function () { - var H = new Buffer(48) - - function writeInt64BE (h, l, offset) { - H.writeInt32BE(h, offset) - H.writeInt32BE(l, offset + 4) - } - - writeInt64BE(this._ah, this._al, 0) - writeInt64BE(this._bh, this._bl, 8) - writeInt64BE(this._ch, this._cl, 16) - writeInt64BE(this._dh, this._dl, 24) - writeInt64BE(this._eh, this._el, 32) - writeInt64BE(this._fh, this._fl, 40) - - return H -} - -module.exports = Sha384 diff --git a/node_modules/browserify/node_modules/shasum/node_modules/sha.js/sha512.js b/node_modules/browserify/node_modules/shasum/node_modules/sha.js/sha512.js deleted file mode 100644 index 204a7b83..00000000 --- a/node_modules/browserify/node_modules/shasum/node_modules/sha.js/sha512.js +++ /dev/null @@ -1,259 +0,0 @@ -var inherits = require('inherits') -var Hash = require('./hash') - -var K = [ - 0x428a2f98, 0xd728ae22, 0x71374491, 0x23ef65cd, - 0xb5c0fbcf, 0xec4d3b2f, 0xe9b5dba5, 0x8189dbbc, - 0x3956c25b, 0xf348b538, 0x59f111f1, 0xb605d019, - 0x923f82a4, 0xaf194f9b, 0xab1c5ed5, 0xda6d8118, - 0xd807aa98, 0xa3030242, 0x12835b01, 0x45706fbe, - 0x243185be, 0x4ee4b28c, 0x550c7dc3, 0xd5ffb4e2, - 0x72be5d74, 0xf27b896f, 0x80deb1fe, 0x3b1696b1, - 0x9bdc06a7, 0x25c71235, 0xc19bf174, 0xcf692694, - 0xe49b69c1, 0x9ef14ad2, 0xefbe4786, 0x384f25e3, - 0x0fc19dc6, 0x8b8cd5b5, 0x240ca1cc, 0x77ac9c65, - 0x2de92c6f, 0x592b0275, 0x4a7484aa, 0x6ea6e483, - 0x5cb0a9dc, 0xbd41fbd4, 0x76f988da, 0x831153b5, - 0x983e5152, 0xee66dfab, 0xa831c66d, 0x2db43210, - 0xb00327c8, 0x98fb213f, 0xbf597fc7, 0xbeef0ee4, - 0xc6e00bf3, 0x3da88fc2, 0xd5a79147, 0x930aa725, - 0x06ca6351, 0xe003826f, 0x14292967, 0x0a0e6e70, - 0x27b70a85, 0x46d22ffc, 0x2e1b2138, 0x5c26c926, - 0x4d2c6dfc, 0x5ac42aed, 0x53380d13, 0x9d95b3df, - 0x650a7354, 0x8baf63de, 0x766a0abb, 0x3c77b2a8, - 0x81c2c92e, 0x47edaee6, 0x92722c85, 0x1482353b, - 0xa2bfe8a1, 0x4cf10364, 0xa81a664b, 0xbc423001, - 0xc24b8b70, 0xd0f89791, 0xc76c51a3, 0x0654be30, - 0xd192e819, 0xd6ef5218, 0xd6990624, 0x5565a910, - 0xf40e3585, 0x5771202a, 0x106aa070, 0x32bbd1b8, - 0x19a4c116, 0xb8d2d0c8, 0x1e376c08, 0x5141ab53, - 0x2748774c, 0xdf8eeb99, 0x34b0bcb5, 0xe19b48a8, - 0x391c0cb3, 0xc5c95a63, 0x4ed8aa4a, 0xe3418acb, - 0x5b9cca4f, 0x7763e373, 0x682e6ff3, 0xd6b2b8a3, - 0x748f82ee, 0x5defb2fc, 0x78a5636f, 0x43172f60, - 0x84c87814, 0xa1f0ab72, 0x8cc70208, 0x1a6439ec, - 0x90befffa, 0x23631e28, 0xa4506ceb, 0xde82bde9, - 0xbef9a3f7, 0xb2c67915, 0xc67178f2, 0xe372532b, - 0xca273ece, 0xea26619c, 0xd186b8c7, 0x21c0c207, - 0xeada7dd6, 0xcde0eb1e, 0xf57d4f7f, 0xee6ed178, - 0x06f067aa, 0x72176fba, 0x0a637dc5, 0xa2c898a6, - 0x113f9804, 0xbef90dae, 0x1b710b35, 0x131c471b, - 0x28db77f5, 0x23047d84, 0x32caab7b, 0x40c72493, - 0x3c9ebe0a, 0x15c9bebc, 0x431d67c4, 0x9c100d4c, - 0x4cc5d4be, 0xcb3e42b6, 0x597f299c, 0xfc657e2a, - 0x5fcb6fab, 0x3ad6faec, 0x6c44198c, 0x4a475817 -] - -var W = new Array(160) - -function Sha512 () { - this.init() - this._w = W - - Hash.call(this, 128, 112) -} - -inherits(Sha512, Hash) - -Sha512.prototype.init = function () { - this._ah = 0x6a09e667 - this._bh = 0xbb67ae85 - this._ch = 0x3c6ef372 - this._dh = 0xa54ff53a - this._eh = 0x510e527f - this._fh = 0x9b05688c - this._gh = 0x1f83d9ab - this._hh = 0x5be0cd19 - - this._al = 0xf3bcc908 - this._bl = 0x84caa73b - this._cl = 0xfe94f82b - this._dl = 0x5f1d36f1 - this._el = 0xade682d1 - this._fl = 0x2b3e6c1f - this._gl = 0xfb41bd6b - this._hl = 0x137e2179 - - return this -} - -function Ch (x, y, z) { - return z ^ (x & (y ^ z)) -} - -function maj (x, y, z) { - return (x & y) | (z & (x | y)) -} - -function sigma0 (x, xl) { - return (x >>> 28 | xl << 4) ^ (xl >>> 2 | x << 30) ^ (xl >>> 7 | x << 25) -} - -function sigma1 (x, xl) { - return (x >>> 14 | xl << 18) ^ (x >>> 18 | xl << 14) ^ (xl >>> 9 | x << 23) -} - -function Gamma0 (x, xl) { - return (x >>> 1 | xl << 31) ^ (x >>> 8 | xl << 24) ^ (x >>> 7) -} - -function Gamma0l (x, xl) { - return (x >>> 1 | xl << 31) ^ (x >>> 8 | xl << 24) ^ (x >>> 7 | xl << 25) -} - -function Gamma1 (x, xl) { - return (x >>> 19 | xl << 13) ^ (xl >>> 29 | x << 3) ^ (x >>> 6) -} - -function Gamma1l (x, xl) { - return (x >>> 19 | xl << 13) ^ (xl >>> 29 | x << 3) ^ (x >>> 6 | xl << 26) -} - -function getCarry (a, b) { - return (a >>> 0) < (b >>> 0) ? 1 : 0 -} - -Sha512.prototype._update = function (M) { - var W = this._w - - var ah = this._ah | 0 - var bh = this._bh | 0 - var ch = this._ch | 0 - var dh = this._dh | 0 - var eh = this._eh | 0 - var fh = this._fh | 0 - var gh = this._gh | 0 - var hh = this._hh | 0 - - var al = this._al | 0 - var bl = this._bl | 0 - var cl = this._cl | 0 - var dl = this._dl | 0 - var el = this._el | 0 - var fl = this._fl | 0 - var gl = this._gl | 0 - var hl = this._hl | 0 - - for (var i = 0; i < 32; i += 2) { - W[i] = M.readInt32BE(i * 4) - W[i + 1] = M.readInt32BE(i * 4 + 4) - } - for (; i < 160; i += 2) { - var xh = W[i - 15 * 2] - var xl = W[i - 15 * 2 + 1] - var gamma0 = Gamma0(xh, xl) - var gamma0l = Gamma0l(xl, xh) - - xh = W[i - 2 * 2] - xl = W[i - 2 * 2 + 1] - var gamma1 = Gamma1(xh, xl) - var gamma1l = Gamma1l(xl, xh) - - // W[i] = gamma0 + W[i - 7] + gamma1 + W[i - 16] - var Wi7h = W[i - 7 * 2] - var Wi7l = W[i - 7 * 2 + 1] - - var Wi16h = W[i - 16 * 2] - var Wi16l = W[i - 16 * 2 + 1] - - var Wil = (gamma0l + Wi7l) | 0 - var Wih = (gamma0 + Wi7h + getCarry(Wil, gamma0l)) | 0 - Wil = (Wil + gamma1l) | 0 - Wih = (Wih + gamma1 + getCarry(Wil, gamma1l)) | 0 - Wil = (Wil + Wi16l) | 0 - Wih = (Wih + Wi16h + getCarry(Wil, Wi16l)) | 0 - - W[i] = Wih - W[i + 1] = Wil - } - - for (var j = 0; j < 160; j += 2) { - Wih = W[j] - Wil = W[j + 1] - - var majh = maj(ah, bh, ch) - var majl = maj(al, bl, cl) - - var sigma0h = sigma0(ah, al) - var sigma0l = sigma0(al, ah) - var sigma1h = sigma1(eh, el) - var sigma1l = sigma1(el, eh) - - // t1 = h + sigma1 + ch + K[j] + W[j] - var Kih = K[j] - var Kil = K[j + 1] - - var chh = Ch(eh, fh, gh) - var chl = Ch(el, fl, gl) - - var t1l = (hl + sigma1l) | 0 - var t1h = (hh + sigma1h + getCarry(t1l, hl)) | 0 - t1l = (t1l + chl) | 0 - t1h = (t1h + chh + getCarry(t1l, chl)) | 0 - t1l = (t1l + Kil) | 0 - t1h = (t1h + Kih + getCarry(t1l, Kil)) | 0 - t1l = (t1l + Wil) | 0 - t1h = (t1h + Wih + getCarry(t1l, Wil)) | 0 - - // t2 = sigma0 + maj - var t2l = (sigma0l + majl) | 0 - var t2h = (sigma0h + majh + getCarry(t2l, sigma0l)) | 0 - - hh = gh - hl = gl - gh = fh - gl = fl - fh = eh - fl = el - el = (dl + t1l) | 0 - eh = (dh + t1h + getCarry(el, dl)) | 0 - dh = ch - dl = cl - ch = bh - cl = bl - bh = ah - bl = al - al = (t1l + t2l) | 0 - ah = (t1h + t2h + getCarry(al, t1l)) | 0 - } - - this._al = (this._al + al) | 0 - this._bl = (this._bl + bl) | 0 - this._cl = (this._cl + cl) | 0 - this._dl = (this._dl + dl) | 0 - this._el = (this._el + el) | 0 - this._fl = (this._fl + fl) | 0 - this._gl = (this._gl + gl) | 0 - this._hl = (this._hl + hl) | 0 - - this._ah = (this._ah + ah + getCarry(this._al, al)) | 0 - this._bh = (this._bh + bh + getCarry(this._bl, bl)) | 0 - this._ch = (this._ch + ch + getCarry(this._cl, cl)) | 0 - this._dh = (this._dh + dh + getCarry(this._dl, dl)) | 0 - this._eh = (this._eh + eh + getCarry(this._el, el)) | 0 - this._fh = (this._fh + fh + getCarry(this._fl, fl)) | 0 - this._gh = (this._gh + gh + getCarry(this._gl, gl)) | 0 - this._hh = (this._hh + hh + getCarry(this._hl, hl)) | 0 -} - -Sha512.prototype._hash = function () { - var H = new Buffer(64) - - function writeInt64BE (h, l, offset) { - H.writeInt32BE(h, offset) - H.writeInt32BE(l, offset + 4) - } - - writeInt64BE(this._ah, this._al, 0) - writeInt64BE(this._bh, this._bl, 8) - writeInt64BE(this._ch, this._cl, 16) - writeInt64BE(this._dh, this._dl, 24) - writeInt64BE(this._eh, this._el, 32) - writeInt64BE(this._fh, this._fl, 40) - writeInt64BE(this._gh, this._gl, 48) - writeInt64BE(this._hh, this._hl, 56) - - return H -} - -module.exports = Sha512 diff --git a/node_modules/browserify/node_modules/shasum/node_modules/sha.js/test/hash.js b/node_modules/browserify/node_modules/shasum/node_modules/sha.js/test/hash.js deleted file mode 100644 index 2f376b4d..00000000 --- a/node_modules/browserify/node_modules/shasum/node_modules/sha.js/test/hash.js +++ /dev/null @@ -1,86 +0,0 @@ -var hexpp = require('../hexpp').defaults({ bigendian: false }) -var tape = require('tape') -var Hash = require('../hash') - -var hex = '0A1B2C3D4E5F6G7H' - -function equal (t, a, b) { - t.equal(a.length, b.length) - - for (var i = 0; i < a.length; i++) { - t.equal(a[i], b[i]) - } -} - -var hexBuf = new Buffer([48, 65, 49, 66, 50, 67, 51, 68, 52, 69, 53, 70, 54, 71, 55, 72]) -var count16 = { - strings: ['0A1B2C3D4E5F6G7H'], - buffers: [ - hexBuf, - new Buffer([ 128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 128]) - ] -} - -var empty = { - strings: [''], - buffers: [ - new Buffer([ 128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]) - ] -} - -var multi = { - strings: ['abcd', 'efhijk', 'lmnopq'], - buffers: [ - new Buffer('abcdefhijklmnopq', 'ascii'), - new Buffer([128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 128]) - ] - } - -var long = { - strings: [hex + hex], - buffers: [ - hexBuf, - hexBuf, - new Buffer([128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0]) - ] -} - -function makeTest (name, data) { - tape(name, function (t) { - - var h = new Hash(16, 8) - var hash = new Buffer(20) - var n = 2 - var expected = data.buffers.slice() - // t.plan(expected.length + 1) - - h._update = function (block) { - var e = expected.shift() - - console.log('---block---') - console.log(hexpp(block), block.length) - console.log('---e---') - console.log(hexpp(e), block.length) - console.log(block) - equal(t, block, e) - - if (n < 0) { - throw new Error('expecting only 2 calls to _update') - } - - return hash - } - - data.strings.forEach(function (string) { - h.update(string, 'ascii') - }) - - equal(t, h.digest(), hash) - t.end() - }) -} - -makeTest('Hash#update 1 in 1', count16) -makeTest('empty Hash#update', empty) -makeTest('Hash#update 1 in 3', multi) -makeTest('Hash#update 2 in 1', long) diff --git a/node_modules/browserify/node_modules/shasum/node_modules/sha.js/test/test.js b/node_modules/browserify/node_modules/shasum/node_modules/sha.js/test/test.js deleted file mode 100644 index 0a46e44b..00000000 --- a/node_modules/browserify/node_modules/shasum/node_modules/sha.js/test/test.js +++ /dev/null @@ -1,85 +0,0 @@ -var crypto = require('crypto') -var tape = require('tape') -var Sha1 = require('../').sha1 - -var inputs = [ - ['', 'ascii'], - ['abc', 'ascii'], - ['123', 'ascii'], - ['123456789abcdef123456789abcdef123456789abcdef123456789abcdef', 'ascii'], - ['123456789abcdef123456789abcdef123456789abcdef123456789abc', 'ascii'], - ['123456789abcdef123456789abcdef123456789abcdef123456789ab', 'ascii'], - ['0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcde', 'ascii'], - ['0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef', 'ascii'], - ['foobarbaz', 'ascii'] -] - -tape("hash is the same as node's crypto", function (t) { - inputs.forEach(function (v) { - var a = new Sha1().update(v[0], v[1]).digest('hex') - var e = crypto.createHash('sha1').update(v[0], v[1]).digest('hex') - console.log(a, '==', e) - t.equal(a, e) - }) - - t.end() -}) - -tape('call update multiple times', function (t) { - inputs.forEach(function (v) { - var hash = new Sha1() - var _hash = crypto.createHash('sha1') - - for (var i = 0; i < v[0].length; i = (i + 1) * 2) { - var s = v[0].substring(i, (i + 1) * 2) - hash.update(s, v[1]) - _hash.update(s, v[1]) - } - - var a = hash.digest('hex') - var e = _hash.digest('hex') - console.log(a, '==', e) - t.equal(a, e) - }) - t.end() -}) - -tape('call update twice', function (t) { - var _hash = crypto.createHash('sha1') - var hash = new Sha1() - - _hash.update('foo', 'ascii') - hash.update('foo', 'ascii') - - _hash.update('bar', 'ascii') - hash.update('bar', 'ascii') - - _hash.update('baz', 'ascii') - hash.update('baz', 'ascii') - - var a = hash.digest('hex') - var e = _hash.digest('hex') - - t.equal(a, e) - t.end() -}) - -tape('hex encoding', function (t) { - inputs.forEach(function (v) { - var hash = new Sha1() - var _hash = crypto.createHash('sha1') - - for (var i = 0; i < v[0].length; i = (i + 1) * 2) { - var s = v[0].substring(i, (i + 1) * 2) - hash.update(new Buffer(s, 'ascii').toString('hex'), 'hex') - _hash.update(new Buffer(s, 'ascii').toString('hex'), 'hex') - } - var a = hash.digest('hex') - var e = _hash.digest('hex') - - console.log(a, '==', e) - t.equal(a, e) - }) - - t.end() -}) diff --git a/node_modules/browserify/node_modules/shasum/node_modules/sha.js/test/vectors.js b/node_modules/browserify/node_modules/shasum/node_modules/sha.js/test/vectors.js deleted file mode 100644 index 4aef39cc..00000000 --- a/node_modules/browserify/node_modules/shasum/node_modules/sha.js/test/vectors.js +++ /dev/null @@ -1,76 +0,0 @@ -var tape = require('tape') -var vectors = require('hash-test-vectors') -// var from = require('bops/typedarray/from') -var Buffer = require('buffer').Buffer -var hexpp = require('../hexpp') - -var createHash = require('../') - -function makeTest (alg, i, verbose) { - var v = vectors[i] - - tape(alg + ': NIST vector ' + i, function (t) { - if (verbose) { - console.log(v) - console.log('VECTOR', i) - console.log('INPUT', v.input) - console.log(hexpp(new Buffer(v.input, 'base64'))) - console.log(new Buffer(v.input, 'base64').toString('hex')) - } - - var buf = new Buffer(v.input, 'base64') - t.equal(createHash(alg).update(buf).digest('hex'), v[alg]) - - i = ~~(buf.length / 2) - var buf1 = buf.slice(0, i) - var buf2 = buf.slice(i, buf.length) - - console.log(buf1.length, buf2.length, buf.length) - console.log(createHash(alg)._block.length) - - t.equal( - createHash(alg) - .update(buf1) - .update(buf2) - .digest('hex'), - v[alg] - ) - - var j, buf3 - - i = ~~(buf.length / 3) - j = ~~(buf.length * 2 / 3) - buf1 = buf.slice(0, i) - buf2 = buf.slice(i, j) - buf3 = buf.slice(j, buf.length) - - t.equal( - createHash(alg) - .update(buf1) - .update(buf2) - .update(buf3) - .digest('hex'), - v[alg] - ) - - setTimeout(function () { - // avoid "too much recursion" errors in tape in firefox - t.end() - }) - }) - -} - -if (process.argv[2]) { - makeTest(process.argv[2], parseInt(process.argv[3], 10), true) - -} else { - vectors.forEach(function (v, i) { - makeTest('sha', i) - makeTest('sha1', i) - makeTest('sha224', i) - makeTest('sha256', i) - makeTest('sha384', i) - makeTest('sha512', i) - }) -} diff --git a/node_modules/browserify/node_modules/shasum/package.json b/node_modules/browserify/node_modules/shasum/package.json deleted file mode 100644 index ea5753a5..00000000 --- a/node_modules/browserify/node_modules/shasum/package.json +++ /dev/null @@ -1,53 +0,0 @@ -{ - "name": "shasum", - "version": "1.0.2", - "homepage": "https://github.com/dominictarr/shasum", - "repository": { - "type": "git", - "url": "git://github.com/dominictarr/shasum.git" - }, - "dependencies": { - "json-stable-stringify": "~0.0.0", - "sha.js": "~2.4.4" - }, - "devDependencies": {}, - "browser": { - "./index.js": "./browser.js" - }, - "scripts": { - "test": "node test/index.js && node test/index.js browser" - }, - "author": { - "name": "'Dominic Tarr'", - "email": "dominic.tarr@gmail.com", - "url": "http://dominictarr.com" - }, - "license": "MIT", - "gitHead": "7cf9cac58f72da0a85d184162ae3dd1176d8e86b", - "description": "Single function that return the sha1sum. Installing this is just a little bit quicker than reading the crypto documentation.", - "bugs": { - "url": "https://github.com/dominictarr/shasum/issues" - }, - "_id": "shasum@1.0.2", - "_shasum": "e7012310d8f417f4deb5712150e5678b87ae565f", - "_from": "shasum@>=1.0.0 <2.0.0", - "_npmVersion": "3.3.1", - "_nodeVersion": "2.3.1", - "_npmUser": { - "name": "dominictarr", - "email": "dominic.tarr@gmail.com" - }, - "maintainers": [ - { - "name": "dominictarr", - "email": "dominic.tarr@gmail.com" - } - ], - "dist": { - "shasum": "e7012310d8f417f4deb5712150e5678b87ae565f", - "tarball": "https://registry.npmjs.org/shasum/-/shasum-1.0.2.tgz" - }, - "directories": {}, - "_resolved": "https://registry.npmjs.org/shasum/-/shasum-1.0.2.tgz", - "readme": "ERROR: No README data found!" -} diff --git a/node_modules/browserify/node_modules/shasum/test/index.js b/node_modules/browserify/node_modules/shasum/test/index.js deleted file mode 100644 index 990e7b22..00000000 --- a/node_modules/browserify/node_modules/shasum/test/index.js +++ /dev/null @@ -1,18 +0,0 @@ -var equal = require('assert').equal -var hash = require(process.argv[2] === 'browser' ? '../browser.js' : '..') - - -equal(hash('abc'), 'a9993e364706816aba3e25717850c26c9cd0d89d') -equal(hash('abce'), '0a431a7631cabf6b11b984a943127b5e0aa9d687') -equal(hash({}), 'bf21a9e8fbc5a3846fb05b4fa0859e0917b2202f') -equal(hash([]), '97d170e1550eee4afc0af065b78cda302a97674c') -equal(hash(new Buffer('abc')), - 'a9993e364706816aba3e25717850c26c9cd0d89d') -equal(hash('ab\xff'),'ba5142a8207bd61baddf325088732e71cbfe8eb6') -equal(hash(new Buffer('ab\xff').toString()), - 'ba5142a8207bd61baddf325088732e71cbfe8eb6') -equal(hash({a:1,b:2,c:3}), hash({c:3,b:2,a:1})) -equal(hash({a:1,b:2,c:3}), hash({c:3,b:2,a:1})) -equal(hash({a:1,b:[2,3],c:4}), hash({c:4,b:[2,3],a:1})) -equal(hash({a:1,b:[2,{c:3,d:4}],e:5}), hash({e:5,b:[2,{d:4,c:3}],a:1})) - diff --git a/node_modules/browserify/node_modules/shell-quote/.travis.yml b/node_modules/browserify/node_modules/shell-quote/.travis.yml deleted file mode 100644 index f1d0f13c..00000000 --- a/node_modules/browserify/node_modules/shell-quote/.travis.yml +++ /dev/null @@ -1,4 +0,0 @@ -language: node_js -node_js: - - 0.4 - - 0.6 diff --git a/node_modules/browserify/node_modules/shell-quote/README.markdown b/node_modules/browserify/node_modules/shell-quote/README.markdown deleted file mode 100644 index 2d185935..00000000 --- a/node_modules/browserify/node_modules/shell-quote/README.markdown +++ /dev/null @@ -1,72 +0,0 @@ -shell-quote -=========== - -Parse and quote shell commands. - -[![build status](https://secure.travis-ci.org/substack/node-shell-quote.png)](http://travis-ci.org/substack/node-shell-quote) - -example -======= - -quote ------ - -``` js -var quote = require('shell-quote').quote; -var s = quote([ 'a', 'b c d', '$f', '"g"' ]); -console.log(s); -``` - -output - -``` -a 'b c d' \$f '"g"' -``` - -parse ------ - -``` js` -var parse = require('shell-quote').parse; -var xs = parse('a "b c" \\$def \'it\\\'s great\''); -console.dir(xs); -``` - -output - -``` -[ 'a', 'b c', '\\$def', 'it\'s great' ] -``` - -methods -======= - -``` js -var quote = require('shell-quote').quote; -var parse = require('shell-quote').parse; -``` - -quote(args) ------------ - -Return a quoted string for the array `args` suitable for using in shell -commands. - -parse(cmd) ----------- - -Return an array of arguments from the quoted string `cmd`. - -install -======= - -With [npm](http://npmjs.org) do: - -``` -npm install shell-quote -``` - -license -======= - -MIT diff --git a/node_modules/browserify/node_modules/shell-quote/example/parse.js b/node_modules/browserify/node_modules/shell-quote/example/parse.js deleted file mode 100644 index 4b3be5fb..00000000 --- a/node_modules/browserify/node_modules/shell-quote/example/parse.js +++ /dev/null @@ -1,3 +0,0 @@ -var parse = require('../').parse; -var xs = parse('a "b c" \\$def \'it\\\'s great\''); -console.dir(xs); diff --git a/node_modules/browserify/node_modules/shell-quote/example/quote.js b/node_modules/browserify/node_modules/shell-quote/example/quote.js deleted file mode 100644 index 434bf8a1..00000000 --- a/node_modules/browserify/node_modules/shell-quote/example/quote.js +++ /dev/null @@ -1,3 +0,0 @@ -var quote = require('../').quote; -var s = quote([ 'a', 'b c d', '$f', '"g"' ]); -console.log(s); diff --git a/node_modules/browserify/node_modules/shell-quote/index.js b/node_modules/browserify/node_modules/shell-quote/index.js deleted file mode 100644 index d18d614b..00000000 --- a/node_modules/browserify/node_modules/shell-quote/index.js +++ /dev/null @@ -1,33 +0,0 @@ -exports.quote = function (xs) { - return xs.map(function (s) { - if (/["\s]/.test(s) && !/'/.test(s)) { - return "'" + s.replace(/(['\\])/g, '\\$1') + "'"; - } - else if (/["'\s]/.test(s)) { - return '"' + s.replace(/(["\\$`(){}!#&*|])/g, '\\$1') + '"'; - } - else { - return s.replace(/([\\$`(){}!#&*|])/g, '\\$1'); - } - }).join(' '); -}; - -exports.parse = function (s) { - return s.match(/(['"])((\\\1|[^\1])*?)\1|(\\ |\S)+/g) - .map(function (s) { - if (/^'/.test(s)) { - return s - .replace(/^'|'$/g, '') - .replace(/\\(["'\\$`(){}!#&*|])/g, '$1'); - ; - } - else if (/^"/.test(s)) { - return s - .replace(/^"|"$/g, '') - .replace(/\\(["'\\$`(){}!#&*|])/g, '$1'); - ; - } - else return s.replace(/\\([ "'\\$`(){}!#&*|])/g, '$1'); - }) - ; -}; diff --git a/node_modules/browserify/node_modules/shell-quote/package.json b/node_modules/browserify/node_modules/shell-quote/package.json deleted file mode 100644 index dd9d4598..00000000 --- a/node_modules/browserify/node_modules/shell-quote/package.json +++ /dev/null @@ -1,67 +0,0 @@ -{ - "name": "shell-quote", - "version": "0.0.1", - "description": "quote and parse shell commands", - "main": "index.js", - "directories": { - "example": "example", - "test": "test" - }, - "devDependencies": { - "tap": "~0.2.5" - }, - "scripts": { - "test": "tap test" - }, - "repository": { - "type": "git", - "url": "git://github.com/substack/node-shell-quote.git" - }, - "keywords": [ - "shell", - "command", - "quote", - "parse" - ], - "author": { - "name": "James Halliday", - "email": "mail@substack.net", - "url": "http://substack.net" - }, - "license": "MIT", - "engine": { - "node": ">=0.4" - }, - "_npmUser": { - "name": "substack", - "email": "mail@substack.net" - }, - "_id": "shell-quote@0.0.1", - "dependencies": {}, - "optionalDependencies": {}, - "engines": { - "node": "*" - }, - "_engineSupported": true, - "_npmVersion": "1.1.19", - "_nodeVersion": "v0.6.11", - "_defaultsLoaded": true, - "dist": { - "shasum": "1a41196f3c0333c482323593d6886ecf153dd986", - "tarball": "https://registry.npmjs.org/shell-quote/-/shell-quote-0.0.1.tgz" - }, - "maintainers": [ - { - "name": "substack", - "email": "mail@substack.net" - } - ], - "_shasum": "1a41196f3c0333c482323593d6886ecf153dd986", - "_resolved": "https://registry.npmjs.org/shell-quote/-/shell-quote-0.0.1.tgz", - "_from": "shell-quote@>=0.0.1 <0.1.0", - "bugs": { - "url": "https://github.com/substack/node-shell-quote/issues" - }, - "readme": "ERROR: No README data found!", - "homepage": "https://github.com/substack/node-shell-quote" -} diff --git a/node_modules/browserify/node_modules/shell-quote/test/parse.js b/node_modules/browserify/node_modules/shell-quote/test/parse.js deleted file mode 100644 index 63cd0016..00000000 --- a/node_modules/browserify/node_modules/shell-quote/test/parse.js +++ /dev/null @@ -1,14 +0,0 @@ -var test = require('tap').test; -var parse = require('../').parse; - -test('parse shell commands', function (t) { - t.same(parse('a \'b\' "c"'), [ 'a', 'b', 'c' ]); - t.same( - parse('beep "boop" \'foo bar baz\' "it\'s \\"so\\" groovy"'), - [ 'beep', 'boop', 'foo bar baz', 'it\'s "so" groovy' ] - ); - t.same(parse('a b\\ c d'), [ 'a', 'b c', 'd' ]); - t.same(parse('\\$beep bo\\`op'), [ '$beep', 'bo`op' ]); - - t.end(); -}); diff --git a/node_modules/browserify/node_modules/shell-quote/test/quote.js b/node_modules/browserify/node_modules/shell-quote/test/quote.js deleted file mode 100644 index 0e61b886..00000000 --- a/node_modules/browserify/node_modules/shell-quote/test/quote.js +++ /dev/null @@ -1,15 +0,0 @@ -var test = require('tap').test; -var quote = require('../').quote; - -test('quote', function (t) { - t.equal(quote([ 'a', 'b', 'c d' ]), 'a b \'c d\''); - t.equal( - quote([ 'a', 'b', "it's a \"neat thing\"" ]), - 'a b "it\'s a \\"neat thing\\""' - ); - t.equal( - quote([ '$', '`', '\'' ]), - '\\$ \\` "\'"' - ); - t.end(); -}); diff --git a/node_modules/browserify/node_modules/stream-browserify/.travis.yml b/node_modules/browserify/node_modules/stream-browserify/.travis.yml deleted file mode 100644 index cc4dba29..00000000 --- a/node_modules/browserify/node_modules/stream-browserify/.travis.yml +++ /dev/null @@ -1,4 +0,0 @@ -language: node_js -node_js: - - "0.8" - - "0.10" diff --git a/node_modules/browserify/node_modules/stream-browserify/LICENSE b/node_modules/browserify/node_modules/stream-browserify/LICENSE deleted file mode 100644 index ee27ba4b..00000000 --- a/node_modules/browserify/node_modules/stream-browserify/LICENSE +++ /dev/null @@ -1,18 +0,0 @@ -This software is released under the MIT license: - -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/node_modules/browserify/node_modules/stream-browserify/index.js b/node_modules/browserify/node_modules/stream-browserify/index.js deleted file mode 100644 index 8d6a13ab..00000000 --- a/node_modules/browserify/node_modules/stream-browserify/index.js +++ /dev/null @@ -1,127 +0,0 @@ -// Copyright Joyent, Inc. and other Node contributors. -// -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to permit -// persons to whom the Software is furnished to do so, subject to the -// following conditions: -// -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -// USE OR OTHER DEALINGS IN THE SOFTWARE. - -module.exports = Stream; - -var EE = require('events').EventEmitter; -var inherits = require('inherits'); - -inherits(Stream, EE); -Stream.Readable = require('readable-stream/readable.js'); -Stream.Writable = require('readable-stream/writable.js'); -Stream.Duplex = require('readable-stream/duplex.js'); -Stream.Transform = require('readable-stream/transform.js'); -Stream.PassThrough = require('readable-stream/passthrough.js'); - -// Backwards-compat with node 0.4.x -Stream.Stream = Stream; - - - -// old-style streams. Note that the pipe method (the only relevant -// part of this class) is overridden in the Readable class. - -function Stream() { - EE.call(this); -} - -Stream.prototype.pipe = function(dest, options) { - var source = this; - - function ondata(chunk) { - if (dest.writable) { - if (false === dest.write(chunk) && source.pause) { - source.pause(); - } - } - } - - source.on('data', ondata); - - function ondrain() { - if (source.readable && source.resume) { - source.resume(); - } - } - - dest.on('drain', ondrain); - - // If the 'end' option is not supplied, dest.end() will be called when - // source gets the 'end' or 'close' events. Only dest.end() once. - if (!dest._isStdio && (!options || options.end !== false)) { - source.on('end', onend); - source.on('close', onclose); - } - - var didOnEnd = false; - function onend() { - if (didOnEnd) return; - didOnEnd = true; - - dest.end(); - } - - - function onclose() { - if (didOnEnd) return; - didOnEnd = true; - - if (typeof dest.destroy === 'function') dest.destroy(); - } - - // don't leave dangling pipes when there are errors. - function onerror(er) { - cleanup(); - if (EE.listenerCount(this, 'error') === 0) { - throw er; // Unhandled stream error in pipe. - } - } - - source.on('error', onerror); - dest.on('error', onerror); - - // remove all the event listeners that were added. - function cleanup() { - source.removeListener('data', ondata); - dest.removeListener('drain', ondrain); - - source.removeListener('end', onend); - source.removeListener('close', onclose); - - source.removeListener('error', onerror); - dest.removeListener('error', onerror); - - source.removeListener('end', cleanup); - source.removeListener('close', cleanup); - - dest.removeListener('close', cleanup); - } - - source.on('end', cleanup); - source.on('close', cleanup); - - dest.on('close', cleanup); - - dest.emit('pipe', source); - - // Allow for unix-like usage: A.pipe(B).pipe(C) - return dest; -}; diff --git a/node_modules/browserify/node_modules/stream-browserify/package.json b/node_modules/browserify/node_modules/stream-browserify/package.json deleted file mode 100644 index f051ddd8..00000000 --- a/node_modules/browserify/node_modules/stream-browserify/package.json +++ /dev/null @@ -1,75 +0,0 @@ -{ - "name": "stream-browserify", - "version": "1.0.0", - "description": "the stream module from node core for browsers", - "main": "index.js", - "dependencies": { - "inherits": "~2.0.1", - "readable-stream": "^1.0.27-1" - }, - "devDependencies": { - "typedarray": "~0.0.5", - "tape": "~2.3.2" - }, - "scripts": { - "test": "tape test/*.js" - }, - "repository": { - "type": "git", - "url": "git://github.com/substack/stream-browserify.git" - }, - "homepage": "https://github.com/substack/stream-browserify", - "keywords": [ - "stream", - "browser", - "browserify" - ], - "author": { - "name": "James Halliday", - "email": "mail@substack.net", - "url": "http://substack.net" - }, - "license": "MIT", - "testling": { - "files": "test/*.js", - "browsers": [ - "ie/8..latest", - "firefox/3.5", - "firefox/10", - "firefox/nightly", - "chrome/10", - "chrome/latest", - "chrome/canary", - "opera/12..latest", - "opera/next", - "safari/5.1..latest", - "ipad/6.0..latest", - "iphone/6.0..latest", - "android-browser/4.2..latest" - ] - }, - "bugs": { - "url": "https://github.com/substack/stream-browserify/issues" - }, - "_id": "stream-browserify@1.0.0", - "dist": { - "shasum": "bf9b4abfb42b274d751479e44e0ff2656b6f1193", - "tarball": "https://registry.npmjs.org/stream-browserify/-/stream-browserify-1.0.0.tgz" - }, - "_from": "stream-browserify@>=1.0.0 <2.0.0", - "_npmVersion": "1.4.3", - "_npmUser": { - "name": "substack", - "email": "mail@substack.net" - }, - "maintainers": [ - { - "name": "substack", - "email": "mail@substack.net" - } - ], - "directories": {}, - "_shasum": "bf9b4abfb42b274d751479e44e0ff2656b6f1193", - "_resolved": "https://registry.npmjs.org/stream-browserify/-/stream-browserify-1.0.0.tgz", - "readme": "ERROR: No README data found!" -} diff --git a/node_modules/browserify/node_modules/stream-browserify/readme.markdown b/node_modules/browserify/node_modules/stream-browserify/readme.markdown deleted file mode 100644 index 9f55b942..00000000 --- a/node_modules/browserify/node_modules/stream-browserify/readme.markdown +++ /dev/null @@ -1,27 +0,0 @@ -# stream-browserify - -the stream module from node core, for browsers! - -[![build status](https://secure.travis-ci.org/substack/stream-browserify.png)](http://travis-ci.org/substack/stream-browserify) - -[![testling badge](https://ci.testling.com/substack/stream-browserify.png)](https://ci.testling.com/substack/stream-browserify) - -# methods - -Consult the node core -[documentation on streams](http://nodejs.org/docs/latest/api/stream.html). - -# install - -With [npm](https://npmjs.org) do: - -``` -npm install stream-browserify -``` - -but if you are using browserify you will get this module automatically when you -do `require('stream')`. - -# license - -MIT diff --git a/node_modules/browserify/node_modules/stream-browserify/test/buf.js b/node_modules/browserify/node_modules/stream-browserify/test/buf.js deleted file mode 100644 index 82178199..00000000 --- a/node_modules/browserify/node_modules/stream-browserify/test/buf.js +++ /dev/null @@ -1,32 +0,0 @@ -var path = require('path'); -var test = require('tape'); - -var Writable = require('../').Writable; -var inherits = require('inherits'); - -inherits(TestWritable, Writable); - -function TestWritable(opt) { - if (!(this instanceof TestWritable)) - return new TestWritable(opt); - Writable.call(this, opt); - this._written = []; -} - -TestWritable.prototype._write = function(chunk, encoding, cb) { - this._written.push(chunk); - cb(); -}; - -var buf = Buffer([ 88 ]); - -test('.writable writing ArrayBuffer', function(t) { - var writable = new TestWritable(); - - writable.write(buf); - writable.end(); - - t.equal(writable._written.length, 1); - t.equal(writable._written[0].toString(), 'X') - t.end() -}); diff --git a/node_modules/browserify/node_modules/string_decoder/.npmignore b/node_modules/browserify/node_modules/string_decoder/.npmignore deleted file mode 100644 index 206320cc..00000000 --- a/node_modules/browserify/node_modules/string_decoder/.npmignore +++ /dev/null @@ -1,2 +0,0 @@ -build -test diff --git a/node_modules/browserify/node_modules/string_decoder/LICENSE b/node_modules/browserify/node_modules/string_decoder/LICENSE deleted file mode 100644 index 6de584a4..00000000 --- a/node_modules/browserify/node_modules/string_decoder/LICENSE +++ /dev/null @@ -1,20 +0,0 @@ -Copyright Joyent, Inc. and other Node contributors. - -Permission is hereby granted, free of charge, to any person obtaining a -copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to permit -persons to whom the Software is furnished to do so, subject to the -following conditions: - -The above copyright notice and this permission notice shall be included -in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/browserify/node_modules/string_decoder/README.md b/node_modules/browserify/node_modules/string_decoder/README.md deleted file mode 100644 index 4d2aa001..00000000 --- a/node_modules/browserify/node_modules/string_decoder/README.md +++ /dev/null @@ -1,7 +0,0 @@ -**string_decoder.js** (`require('string_decoder')`) from Node.js core - -Copyright Joyent, Inc. and other Node contributors. See LICENCE file for details. - -Version numbers match the versions found in Node core, e.g. 0.10.24 matches Node 0.10.24, likewise 0.11.10 matches Node 0.11.10. **Prefer the stable version over the unstable.** - -The *build/* directory contains a build script that will scrape the source from the [joyent/node](https://github.com/joyent/node) repo given a specific Node version. \ No newline at end of file diff --git a/node_modules/browserify/node_modules/string_decoder/index.js b/node_modules/browserify/node_modules/string_decoder/index.js deleted file mode 100644 index b00e54fb..00000000 --- a/node_modules/browserify/node_modules/string_decoder/index.js +++ /dev/null @@ -1,221 +0,0 @@ -// Copyright Joyent, Inc. and other Node contributors. -// -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to permit -// persons to whom the Software is furnished to do so, subject to the -// following conditions: -// -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -// USE OR OTHER DEALINGS IN THE SOFTWARE. - -var Buffer = require('buffer').Buffer; - -var isBufferEncoding = Buffer.isEncoding - || function(encoding) { - switch (encoding && encoding.toLowerCase()) { - case 'hex': case 'utf8': case 'utf-8': case 'ascii': case 'binary': case 'base64': case 'ucs2': case 'ucs-2': case 'utf16le': case 'utf-16le': case 'raw': return true; - default: return false; - } - } - - -function assertEncoding(encoding) { - if (encoding && !isBufferEncoding(encoding)) { - throw new Error('Unknown encoding: ' + encoding); - } -} - -// StringDecoder provides an interface for efficiently splitting a series of -// buffers into a series of JS strings without breaking apart multi-byte -// characters. CESU-8 is handled as part of the UTF-8 encoding. -// -// @TODO Handling all encodings inside a single object makes it very difficult -// to reason about this code, so it should be split up in the future. -// @TODO There should be a utf8-strict encoding that rejects invalid UTF-8 code -// points as used by CESU-8. -var StringDecoder = exports.StringDecoder = function(encoding) { - this.encoding = (encoding || 'utf8').toLowerCase().replace(/[-_]/, ''); - assertEncoding(encoding); - switch (this.encoding) { - case 'utf8': - // CESU-8 represents each of Surrogate Pair by 3-bytes - this.surrogateSize = 3; - break; - case 'ucs2': - case 'utf16le': - // UTF-16 represents each of Surrogate Pair by 2-bytes - this.surrogateSize = 2; - this.detectIncompleteChar = utf16DetectIncompleteChar; - break; - case 'base64': - // Base-64 stores 3 bytes in 4 chars, and pads the remainder. - this.surrogateSize = 3; - this.detectIncompleteChar = base64DetectIncompleteChar; - break; - default: - this.write = passThroughWrite; - return; - } - - // Enough space to store all bytes of a single character. UTF-8 needs 4 - // bytes, but CESU-8 may require up to 6 (3 bytes per surrogate). - this.charBuffer = new Buffer(6); - // Number of bytes received for the current incomplete multi-byte character. - this.charReceived = 0; - // Number of bytes expected for the current incomplete multi-byte character. - this.charLength = 0; -}; - - -// write decodes the given buffer and returns it as JS string that is -// guaranteed to not contain any partial multi-byte characters. Any partial -// character found at the end of the buffer is buffered up, and will be -// returned when calling write again with the remaining bytes. -// -// Note: Converting a Buffer containing an orphan surrogate to a String -// currently works, but converting a String to a Buffer (via `new Buffer`, or -// Buffer#write) will replace incomplete surrogates with the unicode -// replacement character. See https://codereview.chromium.org/121173009/ . -StringDecoder.prototype.write = function(buffer) { - var charStr = ''; - // if our last write ended with an incomplete multibyte character - while (this.charLength) { - // determine how many remaining bytes this buffer has to offer for this char - var available = (buffer.length >= this.charLength - this.charReceived) ? - this.charLength - this.charReceived : - buffer.length; - - // add the new bytes to the char buffer - buffer.copy(this.charBuffer, this.charReceived, 0, available); - this.charReceived += available; - - if (this.charReceived < this.charLength) { - // still not enough chars in this buffer? wait for more ... - return ''; - } - - // remove bytes belonging to the current character from the buffer - buffer = buffer.slice(available, buffer.length); - - // get the character that was split - charStr = this.charBuffer.slice(0, this.charLength).toString(this.encoding); - - // CESU-8: lead surrogate (D800-DBFF) is also the incomplete character - var charCode = charStr.charCodeAt(charStr.length - 1); - if (charCode >= 0xD800 && charCode <= 0xDBFF) { - this.charLength += this.surrogateSize; - charStr = ''; - continue; - } - this.charReceived = this.charLength = 0; - - // if there are no more bytes in this buffer, just emit our char - if (buffer.length === 0) { - return charStr; - } - break; - } - - // determine and set charLength / charReceived - this.detectIncompleteChar(buffer); - - var end = buffer.length; - if (this.charLength) { - // buffer the incomplete character bytes we got - buffer.copy(this.charBuffer, 0, buffer.length - this.charReceived, end); - end -= this.charReceived; - } - - charStr += buffer.toString(this.encoding, 0, end); - - var end = charStr.length - 1; - var charCode = charStr.charCodeAt(end); - // CESU-8: lead surrogate (D800-DBFF) is also the incomplete character - if (charCode >= 0xD800 && charCode <= 0xDBFF) { - var size = this.surrogateSize; - this.charLength += size; - this.charReceived += size; - this.charBuffer.copy(this.charBuffer, size, 0, size); - buffer.copy(this.charBuffer, 0, 0, size); - return charStr.substring(0, end); - } - - // or just emit the charStr - return charStr; -}; - -// detectIncompleteChar determines if there is an incomplete UTF-8 character at -// the end of the given buffer. If so, it sets this.charLength to the byte -// length that character, and sets this.charReceived to the number of bytes -// that are available for this character. -StringDecoder.prototype.detectIncompleteChar = function(buffer) { - // determine how many bytes we have to check at the end of this buffer - var i = (buffer.length >= 3) ? 3 : buffer.length; - - // Figure out if one of the last i bytes of our buffer announces an - // incomplete char. - for (; i > 0; i--) { - var c = buffer[buffer.length - i]; - - // See http://en.wikipedia.org/wiki/UTF-8#Description - - // 110XXXXX - if (i == 1 && c >> 5 == 0x06) { - this.charLength = 2; - break; - } - - // 1110XXXX - if (i <= 2 && c >> 4 == 0x0E) { - this.charLength = 3; - break; - } - - // 11110XXX - if (i <= 3 && c >> 3 == 0x1E) { - this.charLength = 4; - break; - } - } - this.charReceived = i; -}; - -StringDecoder.prototype.end = function(buffer) { - var res = ''; - if (buffer && buffer.length) - res = this.write(buffer); - - if (this.charReceived) { - var cr = this.charReceived; - var buf = this.charBuffer; - var enc = this.encoding; - res += buf.slice(0, cr).toString(enc); - } - - return res; -}; - -function passThroughWrite(buffer) { - return buffer.toString(this.encoding); -} - -function utf16DetectIncompleteChar(buffer) { - this.charReceived = buffer.length % 2; - this.charLength = this.charReceived ? 2 : 0; -} - -function base64DetectIncompleteChar(buffer) { - this.charReceived = buffer.length % 3; - this.charLength = this.charReceived ? 3 : 0; -} diff --git a/node_modules/browserify/node_modules/string_decoder/package.json b/node_modules/browserify/node_modules/string_decoder/package.json deleted file mode 100644 index 0364d54b..00000000 --- a/node_modules/browserify/node_modules/string_decoder/package.json +++ /dev/null @@ -1,54 +0,0 @@ -{ - "name": "string_decoder", - "version": "0.10.31", - "description": "The string_decoder module from Node core", - "main": "index.js", - "dependencies": {}, - "devDependencies": { - "tap": "~0.4.8" - }, - "scripts": { - "test": "tap test/simple/*.js" - }, - "repository": { - "type": "git", - "url": "git://github.com/rvagg/string_decoder.git" - }, - "homepage": "https://github.com/rvagg/string_decoder", - "keywords": [ - "string", - "decoder", - "browser", - "browserify" - ], - "license": "MIT", - "gitHead": "d46d4fd87cf1d06e031c23f1ba170ca7d4ade9a0", - "bugs": { - "url": "https://github.com/rvagg/string_decoder/issues" - }, - "_id": "string_decoder@0.10.31", - "_shasum": "62e203bc41766c6c28c9fc84301dab1c5310fa94", - "_from": "string_decoder@>=0.10.0 <0.11.0", - "_npmVersion": "1.4.23", - "_npmUser": { - "name": "rvagg", - "email": "rod@vagg.org" - }, - "maintainers": [ - { - "name": "substack", - "email": "mail@substack.net" - }, - { - "name": "rvagg", - "email": "rod@vagg.org" - } - ], - "dist": { - "shasum": "62e203bc41766c6c28c9fc84301dab1c5310fa94", - "tarball": "http://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz" - }, - "directories": {}, - "_resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", - "readme": "ERROR: No README data found!" -} diff --git a/node_modules/browserify/node_modules/subarg/.travis.yml b/node_modules/browserify/node_modules/subarg/.travis.yml deleted file mode 100644 index cc4dba29..00000000 --- a/node_modules/browserify/node_modules/subarg/.travis.yml +++ /dev/null @@ -1,4 +0,0 @@ -language: node_js -node_js: - - "0.8" - - "0.10" diff --git a/node_modules/browserify/node_modules/subarg/LICENSE b/node_modules/browserify/node_modules/subarg/LICENSE deleted file mode 100644 index ee27ba4b..00000000 --- a/node_modules/browserify/node_modules/subarg/LICENSE +++ /dev/null @@ -1,18 +0,0 @@ -This software is released under the MIT license: - -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/node_modules/browserify/node_modules/subarg/example/show.js b/node_modules/browserify/node_modules/subarg/example/show.js deleted file mode 100644 index f2a73ee7..00000000 --- a/node_modules/browserify/node_modules/subarg/example/show.js +++ /dev/null @@ -1,3 +0,0 @@ -var subarg = require('../'); -var argv = subarg(process.argv.slice(2)); -console.log(argv); diff --git a/node_modules/browserify/node_modules/subarg/index.js b/node_modules/browserify/node_modules/subarg/index.js deleted file mode 100644 index ca2c99d4..00000000 --- a/node_modules/browserify/node_modules/subarg/index.js +++ /dev/null @@ -1,35 +0,0 @@ -var minimist = require('minimist'); - -module.exports = function parse (args, opts) { - var level = 0, index; - var args_ = []; - - for (var i = 0; i < args.length; i++) { - if (typeof args[i] === 'string' && /^\[/.test(args[i])) { - if (level ++ === 0) { - index = i; - } - } - if (typeof args[i] === 'string' && /\]$/.test(args[i])) { - if (-- level > 0) continue; - - var sub = args.slice(index, i + 1); - if (typeof sub[0] === 'string') { - sub[0] = sub[0].replace(/^\[/, ''); - } - if (sub[0] === '') sub.shift(); - - var n = sub.length - 1; - if (typeof sub[n] === 'string') { - sub[n] = sub[n].replace(/\]$/, ''); - } - if (sub[n] === '') sub.pop(); - - args_.push(parse(sub)); - } - else if (level === 0) args_.push(args[i]); - } - - var argv = minimist(args_, opts); - return argv; -}; diff --git a/node_modules/browserify/node_modules/subarg/node_modules/minimist/.travis.yml b/node_modules/browserify/node_modules/subarg/node_modules/minimist/.travis.yml deleted file mode 100644 index 74c57bf1..00000000 --- a/node_modules/browserify/node_modules/subarg/node_modules/minimist/.travis.yml +++ /dev/null @@ -1,8 +0,0 @@ -language: node_js -node_js: - - "0.8" - - "0.10" - - "0.12" - - "iojs" -before_install: - - npm install -g npm@~1.4.6 diff --git a/node_modules/browserify/node_modules/subarg/node_modules/minimist/LICENSE b/node_modules/browserify/node_modules/subarg/node_modules/minimist/LICENSE deleted file mode 100644 index ee27ba4b..00000000 --- a/node_modules/browserify/node_modules/subarg/node_modules/minimist/LICENSE +++ /dev/null @@ -1,18 +0,0 @@ -This software is released under the MIT license: - -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/node_modules/browserify/node_modules/subarg/node_modules/minimist/example/parse.js b/node_modules/browserify/node_modules/subarg/node_modules/minimist/example/parse.js deleted file mode 100644 index abff3e8e..00000000 --- a/node_modules/browserify/node_modules/subarg/node_modules/minimist/example/parse.js +++ /dev/null @@ -1,2 +0,0 @@ -var argv = require('../')(process.argv.slice(2)); -console.dir(argv); diff --git a/node_modules/browserify/node_modules/subarg/node_modules/minimist/index.js b/node_modules/browserify/node_modules/subarg/node_modules/minimist/index.js deleted file mode 100644 index 6a0559d5..00000000 --- a/node_modules/browserify/node_modules/subarg/node_modules/minimist/index.js +++ /dev/null @@ -1,236 +0,0 @@ -module.exports = function (args, opts) { - if (!opts) opts = {}; - - var flags = { bools : {}, strings : {}, unknownFn: null }; - - if (typeof opts['unknown'] === 'function') { - flags.unknownFn = opts['unknown']; - } - - if (typeof opts['boolean'] === 'boolean' && opts['boolean']) { - flags.allBools = true; - } else { - [].concat(opts['boolean']).filter(Boolean).forEach(function (key) { - flags.bools[key] = true; - }); - } - - var aliases = {}; - Object.keys(opts.alias || {}).forEach(function (key) { - aliases[key] = [].concat(opts.alias[key]); - aliases[key].forEach(function (x) { - aliases[x] = [key].concat(aliases[key].filter(function (y) { - return x !== y; - })); - }); - }); - - [].concat(opts.string).filter(Boolean).forEach(function (key) { - flags.strings[key] = true; - if (aliases[key]) { - flags.strings[aliases[key]] = true; - } - }); - - var defaults = opts['default'] || {}; - - var argv = { _ : [] }; - Object.keys(flags.bools).forEach(function (key) { - setArg(key, defaults[key] === undefined ? false : defaults[key]); - }); - - var notFlags = []; - - if (args.indexOf('--') !== -1) { - notFlags = args.slice(args.indexOf('--')+1); - args = args.slice(0, args.indexOf('--')); - } - - function argDefined(key, arg) { - return (flags.allBools && /^--[^=]+$/.test(arg)) || - flags.strings[key] || flags.bools[key] || aliases[key]; - } - - function setArg (key, val, arg) { - if (arg && flags.unknownFn && !argDefined(key, arg)) { - if (flags.unknownFn(arg) === false) return; - } - - var value = !flags.strings[key] && isNumber(val) - ? Number(val) : val - ; - setKey(argv, key.split('.'), value); - - (aliases[key] || []).forEach(function (x) { - setKey(argv, x.split('.'), value); - }); - } - - function setKey (obj, keys, value) { - var o = obj; - keys.slice(0,-1).forEach(function (key) { - if (o[key] === undefined) o[key] = {}; - o = o[key]; - }); - - var key = keys[keys.length - 1]; - if (o[key] === undefined || flags.bools[key] || typeof o[key] === 'boolean') { - o[key] = value; - } - else if (Array.isArray(o[key])) { - o[key].push(value); - } - else { - o[key] = [ o[key], value ]; - } - } - - function aliasIsBoolean(key) { - return aliases[key].some(function (x) { - return flags.bools[x]; - }); - } - - for (var i = 0; i < args.length; i++) { - var arg = args[i]; - - if (/^--.+=/.test(arg)) { - // Using [\s\S] instead of . because js doesn't support the - // 'dotall' regex modifier. See: - // http://stackoverflow.com/a/1068308/13216 - var m = arg.match(/^--([^=]+)=([\s\S]*)$/); - var key = m[1]; - var value = m[2]; - if (flags.bools[key]) { - value = value !== 'false'; - } - setArg(key, value, arg); - } - else if (/^--no-.+/.test(arg)) { - var key = arg.match(/^--no-(.+)/)[1]; - setArg(key, false, arg); - } - else if (/^--.+/.test(arg)) { - var key = arg.match(/^--(.+)/)[1]; - var next = args[i + 1]; - if (next !== undefined && !/^-/.test(next) - && !flags.bools[key] - && !flags.allBools - && (aliases[key] ? !aliasIsBoolean(key) : true)) { - setArg(key, next, arg); - i++; - } - else if (/^(true|false)$/.test(next)) { - setArg(key, next === 'true', arg); - i++; - } - else { - setArg(key, flags.strings[key] ? '' : true, arg); - } - } - else if (/^-[^-]+/.test(arg)) { - var letters = arg.slice(1,-1).split(''); - - var broken = false; - for (var j = 0; j < letters.length; j++) { - var next = arg.slice(j+2); - - if (next === '-') { - setArg(letters[j], next, arg) - continue; - } - - if (/[A-Za-z]/.test(letters[j]) && /=/.test(next)) { - setArg(letters[j], next.split('=')[1], arg); - broken = true; - break; - } - - if (/[A-Za-z]/.test(letters[j]) - && /-?\d+(\.\d*)?(e-?\d+)?$/.test(next)) { - setArg(letters[j], next, arg); - broken = true; - break; - } - - if (letters[j+1] && letters[j+1].match(/\W/)) { - setArg(letters[j], arg.slice(j+2), arg); - broken = true; - break; - } - else { - setArg(letters[j], flags.strings[letters[j]] ? '' : true, arg); - } - } - - var key = arg.slice(-1)[0]; - if (!broken && key !== '-') { - if (args[i+1] && !/^(-|--)[^-]/.test(args[i+1]) - && !flags.bools[key] - && (aliases[key] ? !aliasIsBoolean(key) : true)) { - setArg(key, args[i+1], arg); - i++; - } - else if (args[i+1] && /true|false/.test(args[i+1])) { - setArg(key, args[i+1] === 'true', arg); - i++; - } - else { - setArg(key, flags.strings[key] ? '' : true, arg); - } - } - } - else { - if (!flags.unknownFn || flags.unknownFn(arg) !== false) { - argv._.push( - flags.strings['_'] || !isNumber(arg) ? arg : Number(arg) - ); - } - if (opts.stopEarly) { - argv._.push.apply(argv._, args.slice(i + 1)); - break; - } - } - } - - Object.keys(defaults).forEach(function (key) { - if (!hasKey(argv, key.split('.'))) { - setKey(argv, key.split('.'), defaults[key]); - - (aliases[key] || []).forEach(function (x) { - setKey(argv, x.split('.'), defaults[key]); - }); - } - }); - - if (opts['--']) { - argv['--'] = new Array(); - notFlags.forEach(function(key) { - argv['--'].push(key); - }); - } - else { - notFlags.forEach(function(key) { - argv._.push(key); - }); - } - - return argv; -}; - -function hasKey (obj, keys) { - var o = obj; - keys.slice(0,-1).forEach(function (key) { - o = (o[key] || {}); - }); - - var key = keys[keys.length - 1]; - return key in o; -} - -function isNumber (x) { - if (typeof x === 'number') return true; - if (/^0x[0-9a-f]+$/i.test(x)) return true; - return /^[-+]?(?:\d+(?:\.\d*)?|\.\d+)(e[-+]?\d+)?$/.test(x); -} - diff --git a/node_modules/browserify/node_modules/subarg/node_modules/minimist/package.json b/node_modules/browserify/node_modules/subarg/node_modules/minimist/package.json deleted file mode 100644 index a83aca9a..00000000 --- a/node_modules/browserify/node_modules/subarg/node_modules/minimist/package.json +++ /dev/null @@ -1,71 +0,0 @@ -{ - "name": "minimist", - "version": "1.2.0", - "description": "parse argument options", - "main": "index.js", - "devDependencies": { - "covert": "^1.0.0", - "tap": "~0.4.0", - "tape": "^3.5.0" - }, - "scripts": { - "test": "tap test/*.js", - "coverage": "covert test/*.js" - }, - "testling": { - "files": "test/*.js", - "browsers": [ - "ie/6..latest", - "ff/5", - "firefox/latest", - "chrome/10", - "chrome/latest", - "safari/5.1", - "safari/latest", - "opera/12" - ] - }, - "repository": { - "type": "git", - "url": "git://github.com/substack/minimist.git" - }, - "homepage": "https://github.com/substack/minimist", - "keywords": [ - "argv", - "getopt", - "parser", - "optimist" - ], - "author": { - "name": "James Halliday", - "email": "mail@substack.net", - "url": "http://substack.net" - }, - "license": "MIT", - "gitHead": "dc624482fcfec5bc669c68cdb861f00573ed4e64", - "bugs": { - "url": "https://github.com/substack/minimist/issues" - }, - "_id": "minimist@1.2.0", - "_shasum": "a35008b20f41383eec1fb914f4cd5df79a264284", - "_from": "minimist@>=1.1.0 <2.0.0", - "_npmVersion": "3.2.2", - "_nodeVersion": "2.4.0", - "_npmUser": { - "name": "substack", - "email": "substack@gmail.com" - }, - "dist": { - "shasum": "a35008b20f41383eec1fb914f4cd5df79a264284", - "tarball": "http://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz" - }, - "maintainers": [ - { - "name": "substack", - "email": "mail@substack.net" - } - ], - "directories": {}, - "_resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", - "readme": "ERROR: No README data found!" -} diff --git a/node_modules/browserify/node_modules/subarg/node_modules/minimist/readme.markdown b/node_modules/browserify/node_modules/subarg/node_modules/minimist/readme.markdown deleted file mode 100644 index 30a74cf8..00000000 --- a/node_modules/browserify/node_modules/subarg/node_modules/minimist/readme.markdown +++ /dev/null @@ -1,91 +0,0 @@ -# minimist - -parse argument options - -This module is the guts of optimist's argument parser without all the -fanciful decoration. - -[![browser support](https://ci.testling.com/substack/minimist.png)](http://ci.testling.com/substack/minimist) - -[![build status](https://secure.travis-ci.org/substack/minimist.png)](http://travis-ci.org/substack/minimist) - -# example - -``` js -var argv = require('minimist')(process.argv.slice(2)); -console.dir(argv); -``` - -``` -$ node example/parse.js -a beep -b boop -{ _: [], a: 'beep', b: 'boop' } -``` - -``` -$ node example/parse.js -x 3 -y 4 -n5 -abc --beep=boop foo bar baz -{ _: [ 'foo', 'bar', 'baz' ], - x: 3, - y: 4, - n: 5, - a: true, - b: true, - c: true, - beep: 'boop' } -``` - -# methods - -``` js -var parseArgs = require('minimist') -``` - -## var argv = parseArgs(args, opts={}) - -Return an argument object `argv` populated with the array arguments from `args`. - -`argv._` contains all the arguments that didn't have an option associated with -them. - -Numeric-looking arguments will be returned as numbers unless `opts.string` or -`opts.boolean` is set for that argument name. - -Any arguments after `'--'` will not be parsed and will end up in `argv._`. - -options can be: - -* `opts.string` - a string or array of strings argument names to always treat as -strings -* `opts.boolean` - a boolean, string or array of strings to always treat as -booleans. if `true` will treat all double hyphenated arguments without equal signs -as boolean (e.g. affects `--foo`, not `-f` or `--foo=bar`) -* `opts.alias` - an object mapping string names to strings or arrays of string -argument names to use as aliases -* `opts.default` - an object mapping string argument names to default values -* `opts.stopEarly` - when true, populate `argv._` with everything after the -first non-option -* `opts['--']` - when true, populate `argv._` with everything before the `--` -and `argv['--']` with everything after the `--`. Here's an example: -* `opts.unknown` - a function which is invoked with a command line parameter not -defined in the `opts` configuration object. If the function returns `false`, the -unknown option is not added to `argv`. - -``` -> require('./')('one two three -- four five --six'.split(' '), { '--': true }) -{ _: [ 'one', 'two', 'three' ], - '--': [ 'four', 'five', '--six' ] } -``` - -Note that with `opts['--']` set, parsing for arguments still stops after the -`--`. - -# install - -With [npm](https://npmjs.org) do: - -``` -npm install minimist -``` - -# license - -MIT diff --git a/node_modules/browserify/node_modules/subarg/node_modules/minimist/test/all_bool.js b/node_modules/browserify/node_modules/subarg/node_modules/minimist/test/all_bool.js deleted file mode 100644 index ac835483..00000000 --- a/node_modules/browserify/node_modules/subarg/node_modules/minimist/test/all_bool.js +++ /dev/null @@ -1,32 +0,0 @@ -var parse = require('../'); -var test = require('tape'); - -test('flag boolean true (default all --args to boolean)', function (t) { - var argv = parse(['moo', '--honk', 'cow'], { - boolean: true - }); - - t.deepEqual(argv, { - honk: true, - _: ['moo', 'cow'] - }); - - t.deepEqual(typeof argv.honk, 'boolean'); - t.end(); -}); - -test('flag boolean true only affects double hyphen arguments without equals signs', function (t) { - var argv = parse(['moo', '--honk', 'cow', '-p', '55', '--tacos=good'], { - boolean: true - }); - - t.deepEqual(argv, { - honk: true, - tacos: 'good', - p: 55, - _: ['moo', 'cow'] - }); - - t.deepEqual(typeof argv.honk, 'boolean'); - t.end(); -}); diff --git a/node_modules/browserify/node_modules/subarg/node_modules/minimist/test/bool.js b/node_modules/browserify/node_modules/subarg/node_modules/minimist/test/bool.js deleted file mode 100644 index 14b0717c..00000000 --- a/node_modules/browserify/node_modules/subarg/node_modules/minimist/test/bool.js +++ /dev/null @@ -1,166 +0,0 @@ -var parse = require('../'); -var test = require('tape'); - -test('flag boolean default false', function (t) { - var argv = parse(['moo'], { - boolean: ['t', 'verbose'], - default: { verbose: false, t: false } - }); - - t.deepEqual(argv, { - verbose: false, - t: false, - _: ['moo'] - }); - - t.deepEqual(typeof argv.verbose, 'boolean'); - t.deepEqual(typeof argv.t, 'boolean'); - t.end(); - -}); - -test('boolean groups', function (t) { - var argv = parse([ '-x', '-z', 'one', 'two', 'three' ], { - boolean: ['x','y','z'] - }); - - t.deepEqual(argv, { - x : true, - y : false, - z : true, - _ : [ 'one', 'two', 'three' ] - }); - - t.deepEqual(typeof argv.x, 'boolean'); - t.deepEqual(typeof argv.y, 'boolean'); - t.deepEqual(typeof argv.z, 'boolean'); - t.end(); -}); -test('boolean and alias with chainable api', function (t) { - var aliased = [ '-h', 'derp' ]; - var regular = [ '--herp', 'derp' ]; - var opts = { - herp: { alias: 'h', boolean: true } - }; - var aliasedArgv = parse(aliased, { - boolean: 'herp', - alias: { h: 'herp' } - }); - var propertyArgv = parse(regular, { - boolean: 'herp', - alias: { h: 'herp' } - }); - var expected = { - herp: true, - h: true, - '_': [ 'derp' ] - }; - - t.same(aliasedArgv, expected); - t.same(propertyArgv, expected); - t.end(); -}); - -test('boolean and alias with options hash', function (t) { - var aliased = [ '-h', 'derp' ]; - var regular = [ '--herp', 'derp' ]; - var opts = { - alias: { 'h': 'herp' }, - boolean: 'herp' - }; - var aliasedArgv = parse(aliased, opts); - var propertyArgv = parse(regular, opts); - var expected = { - herp: true, - h: true, - '_': [ 'derp' ] - }; - t.same(aliasedArgv, expected); - t.same(propertyArgv, expected); - t.end(); -}); - -test('boolean and alias array with options hash', function (t) { - var aliased = [ '-h', 'derp' ]; - var regular = [ '--herp', 'derp' ]; - var alt = [ '--harp', 'derp' ]; - var opts = { - alias: { 'h': ['herp', 'harp'] }, - boolean: 'h' - }; - var aliasedArgv = parse(aliased, opts); - var propertyArgv = parse(regular, opts); - var altPropertyArgv = parse(alt, opts); - var expected = { - harp: true, - herp: true, - h: true, - '_': [ 'derp' ] - }; - t.same(aliasedArgv, expected); - t.same(propertyArgv, expected); - t.same(altPropertyArgv, expected); - t.end(); -}); - -test('boolean and alias using explicit true', function (t) { - var aliased = [ '-h', 'true' ]; - var regular = [ '--herp', 'true' ]; - var opts = { - alias: { h: 'herp' }, - boolean: 'h' - }; - var aliasedArgv = parse(aliased, opts); - var propertyArgv = parse(regular, opts); - var expected = { - herp: true, - h: true, - '_': [ ] - }; - - t.same(aliasedArgv, expected); - t.same(propertyArgv, expected); - t.end(); -}); - -// regression, see https://github.com/substack/node-optimist/issues/71 -test('boolean and --x=true', function(t) { - var parsed = parse(['--boool', '--other=true'], { - boolean: 'boool' - }); - - t.same(parsed.boool, true); - t.same(parsed.other, 'true'); - - parsed = parse(['--boool', '--other=false'], { - boolean: 'boool' - }); - - t.same(parsed.boool, true); - t.same(parsed.other, 'false'); - t.end(); -}); - -test('boolean --boool=true', function (t) { - var parsed = parse(['--boool=true'], { - default: { - boool: false - }, - boolean: ['boool'] - }); - - t.same(parsed.boool, true); - t.end(); -}); - -test('boolean --boool=false', function (t) { - var parsed = parse(['--boool=false'], { - default: { - boool: true - }, - boolean: ['boool'] - }); - - t.same(parsed.boool, false); - t.end(); -}); diff --git a/node_modules/browserify/node_modules/subarg/node_modules/minimist/test/dash.js b/node_modules/browserify/node_modules/subarg/node_modules/minimist/test/dash.js deleted file mode 100644 index 5a4fa5be..00000000 --- a/node_modules/browserify/node_modules/subarg/node_modules/minimist/test/dash.js +++ /dev/null @@ -1,31 +0,0 @@ -var parse = require('../'); -var test = require('tape'); - -test('-', function (t) { - t.plan(5); - t.deepEqual(parse([ '-n', '-' ]), { n: '-', _: [] }); - t.deepEqual(parse([ '-' ]), { _: [ '-' ] }); - t.deepEqual(parse([ '-f-' ]), { f: '-', _: [] }); - t.deepEqual( - parse([ '-b', '-' ], { boolean: 'b' }), - { b: true, _: [ '-' ] } - ); - t.deepEqual( - parse([ '-s', '-' ], { string: 's' }), - { s: '-', _: [] } - ); -}); - -test('-a -- b', function (t) { - t.plan(3); - t.deepEqual(parse([ '-a', '--', 'b' ]), { a: true, _: [ 'b' ] }); - t.deepEqual(parse([ '--a', '--', 'b' ]), { a: true, _: [ 'b' ] }); - t.deepEqual(parse([ '--a', '--', 'b' ]), { a: true, _: [ 'b' ] }); -}); - -test('move arguments after the -- into their own `--` array', function(t) { - t.plan(1); - t.deepEqual( - parse([ '--name', 'John', 'before', '--', 'after' ], { '--': true }), - { name: 'John', _: [ 'before' ], '--': [ 'after' ] }); -}); diff --git a/node_modules/browserify/node_modules/subarg/node_modules/minimist/test/default_bool.js b/node_modules/browserify/node_modules/subarg/node_modules/minimist/test/default_bool.js deleted file mode 100644 index 780a3112..00000000 --- a/node_modules/browserify/node_modules/subarg/node_modules/minimist/test/default_bool.js +++ /dev/null @@ -1,35 +0,0 @@ -var test = require('tape'); -var parse = require('../'); - -test('boolean default true', function (t) { - var argv = parse([], { - boolean: 'sometrue', - default: { sometrue: true } - }); - t.equal(argv.sometrue, true); - t.end(); -}); - -test('boolean default false', function (t) { - var argv = parse([], { - boolean: 'somefalse', - default: { somefalse: false } - }); - t.equal(argv.somefalse, false); - t.end(); -}); - -test('boolean default to null', function (t) { - var argv = parse([], { - boolean: 'maybe', - default: { maybe: null } - }); - t.equal(argv.maybe, null); - var argv = parse(['--maybe'], { - boolean: 'maybe', - default: { maybe: null } - }); - t.equal(argv.maybe, true); - t.end(); - -}) diff --git a/node_modules/browserify/node_modules/subarg/node_modules/minimist/test/dotted.js b/node_modules/browserify/node_modules/subarg/node_modules/minimist/test/dotted.js deleted file mode 100644 index d8b3e856..00000000 --- a/node_modules/browserify/node_modules/subarg/node_modules/minimist/test/dotted.js +++ /dev/null @@ -1,22 +0,0 @@ -var parse = require('../'); -var test = require('tape'); - -test('dotted alias', function (t) { - var argv = parse(['--a.b', '22'], {default: {'a.b': 11}, alias: {'a.b': 'aa.bb'}}); - t.equal(argv.a.b, 22); - t.equal(argv.aa.bb, 22); - t.end(); -}); - -test('dotted default', function (t) { - var argv = parse('', {default: {'a.b': 11}, alias: {'a.b': 'aa.bb'}}); - t.equal(argv.a.b, 11); - t.equal(argv.aa.bb, 11); - t.end(); -}); - -test('dotted default with no alias', function (t) { - var argv = parse('', {default: {'a.b': 11}}); - t.equal(argv.a.b, 11); - t.end(); -}); diff --git a/node_modules/browserify/node_modules/subarg/node_modules/minimist/test/kv_short.js b/node_modules/browserify/node_modules/subarg/node_modules/minimist/test/kv_short.js deleted file mode 100644 index f813b305..00000000 --- a/node_modules/browserify/node_modules/subarg/node_modules/minimist/test/kv_short.js +++ /dev/null @@ -1,16 +0,0 @@ -var parse = require('../'); -var test = require('tape'); - -test('short -k=v' , function (t) { - t.plan(1); - - var argv = parse([ '-b=123' ]); - t.deepEqual(argv, { b: 123, _: [] }); -}); - -test('multi short -k=v' , function (t) { - t.plan(1); - - var argv = parse([ '-a=whatever', '-b=robots' ]); - t.deepEqual(argv, { a: 'whatever', b: 'robots', _: [] }); -}); diff --git a/node_modules/browserify/node_modules/subarg/node_modules/minimist/test/long.js b/node_modules/browserify/node_modules/subarg/node_modules/minimist/test/long.js deleted file mode 100644 index 5d3a1e09..00000000 --- a/node_modules/browserify/node_modules/subarg/node_modules/minimist/test/long.js +++ /dev/null @@ -1,31 +0,0 @@ -var test = require('tape'); -var parse = require('../'); - -test('long opts', function (t) { - t.deepEqual( - parse([ '--bool' ]), - { bool : true, _ : [] }, - 'long boolean' - ); - t.deepEqual( - parse([ '--pow', 'xixxle' ]), - { pow : 'xixxle', _ : [] }, - 'long capture sp' - ); - t.deepEqual( - parse([ '--pow=xixxle' ]), - { pow : 'xixxle', _ : [] }, - 'long capture eq' - ); - t.deepEqual( - parse([ '--host', 'localhost', '--port', '555' ]), - { host : 'localhost', port : 555, _ : [] }, - 'long captures sp' - ); - t.deepEqual( - parse([ '--host=localhost', '--port=555' ]), - { host : 'localhost', port : 555, _ : [] }, - 'long captures eq' - ); - t.end(); -}); diff --git a/node_modules/browserify/node_modules/subarg/node_modules/minimist/test/num.js b/node_modules/browserify/node_modules/subarg/node_modules/minimist/test/num.js deleted file mode 100644 index 2cc77f4d..00000000 --- a/node_modules/browserify/node_modules/subarg/node_modules/minimist/test/num.js +++ /dev/null @@ -1,36 +0,0 @@ -var parse = require('../'); -var test = require('tape'); - -test('nums', function (t) { - var argv = parse([ - '-x', '1234', - '-y', '5.67', - '-z', '1e7', - '-w', '10f', - '--hex', '0xdeadbeef', - '789' - ]); - t.deepEqual(argv, { - x : 1234, - y : 5.67, - z : 1e7, - w : '10f', - hex : 0xdeadbeef, - _ : [ 789 ] - }); - t.deepEqual(typeof argv.x, 'number'); - t.deepEqual(typeof argv.y, 'number'); - t.deepEqual(typeof argv.z, 'number'); - t.deepEqual(typeof argv.w, 'string'); - t.deepEqual(typeof argv.hex, 'number'); - t.deepEqual(typeof argv._[0], 'number'); - t.end(); -}); - -test('already a number', function (t) { - var argv = parse([ '-x', 1234, 789 ]); - t.deepEqual(argv, { x : 1234, _ : [ 789 ] }); - t.deepEqual(typeof argv.x, 'number'); - t.deepEqual(typeof argv._[0], 'number'); - t.end(); -}); diff --git a/node_modules/browserify/node_modules/subarg/node_modules/minimist/test/parse.js b/node_modules/browserify/node_modules/subarg/node_modules/minimist/test/parse.js deleted file mode 100644 index 7b4a2a17..00000000 --- a/node_modules/browserify/node_modules/subarg/node_modules/minimist/test/parse.js +++ /dev/null @@ -1,197 +0,0 @@ -var parse = require('../'); -var test = require('tape'); - -test('parse args', function (t) { - t.deepEqual( - parse([ '--no-moo' ]), - { moo : false, _ : [] }, - 'no' - ); - t.deepEqual( - parse([ '-v', 'a', '-v', 'b', '-v', 'c' ]), - { v : ['a','b','c'], _ : [] }, - 'multi' - ); - t.end(); -}); - -test('comprehensive', function (t) { - t.deepEqual( - parse([ - '--name=meowmers', 'bare', '-cats', 'woo', - '-h', 'awesome', '--multi=quux', - '--key', 'value', - '-b', '--bool', '--no-meep', '--multi=baz', - '--', '--not-a-flag', 'eek' - ]), - { - c : true, - a : true, - t : true, - s : 'woo', - h : 'awesome', - b : true, - bool : true, - key : 'value', - multi : [ 'quux', 'baz' ], - meep : false, - name : 'meowmers', - _ : [ 'bare', '--not-a-flag', 'eek' ] - } - ); - t.end(); -}); - -test('flag boolean', function (t) { - var argv = parse([ '-t', 'moo' ], { boolean: 't' }); - t.deepEqual(argv, { t : true, _ : [ 'moo' ] }); - t.deepEqual(typeof argv.t, 'boolean'); - t.end(); -}); - -test('flag boolean value', function (t) { - var argv = parse(['--verbose', 'false', 'moo', '-t', 'true'], { - boolean: [ 't', 'verbose' ], - default: { verbose: true } - }); - - t.deepEqual(argv, { - verbose: false, - t: true, - _: ['moo'] - }); - - t.deepEqual(typeof argv.verbose, 'boolean'); - t.deepEqual(typeof argv.t, 'boolean'); - t.end(); -}); - -test('newlines in params' , function (t) { - var args = parse([ '-s', "X\nX" ]) - t.deepEqual(args, { _ : [], s : "X\nX" }); - - // reproduce in bash: - // VALUE="new - // line" - // node program.js --s="$VALUE" - args = parse([ "--s=X\nX" ]) - t.deepEqual(args, { _ : [], s : "X\nX" }); - t.end(); -}); - -test('strings' , function (t) { - var s = parse([ '-s', '0001234' ], { string: 's' }).s; - t.equal(s, '0001234'); - t.equal(typeof s, 'string'); - - var x = parse([ '-x', '56' ], { string: 'x' }).x; - t.equal(x, '56'); - t.equal(typeof x, 'string'); - t.end(); -}); - -test('stringArgs', function (t) { - var s = parse([ ' ', ' ' ], { string: '_' })._; - t.same(s.length, 2); - t.same(typeof s[0], 'string'); - t.same(s[0], ' '); - t.same(typeof s[1], 'string'); - t.same(s[1], ' '); - t.end(); -}); - -test('empty strings', function(t) { - var s = parse([ '-s' ], { string: 's' }).s; - t.equal(s, ''); - t.equal(typeof s, 'string'); - - var str = parse([ '--str' ], { string: 'str' }).str; - t.equal(str, ''); - t.equal(typeof str, 'string'); - - var letters = parse([ '-art' ], { - string: [ 'a', 't' ] - }); - - t.equal(letters.a, ''); - t.equal(letters.r, true); - t.equal(letters.t, ''); - - t.end(); -}); - - -test('string and alias', function(t) { - var x = parse([ '--str', '000123' ], { - string: 's', - alias: { s: 'str' } - }); - - t.equal(x.str, '000123'); - t.equal(typeof x.str, 'string'); - t.equal(x.s, '000123'); - t.equal(typeof x.s, 'string'); - - var y = parse([ '-s', '000123' ], { - string: 'str', - alias: { str: 's' } - }); - - t.equal(y.str, '000123'); - t.equal(typeof y.str, 'string'); - t.equal(y.s, '000123'); - t.equal(typeof y.s, 'string'); - t.end(); -}); - -test('slashBreak', function (t) { - t.same( - parse([ '-I/foo/bar/baz' ]), - { I : '/foo/bar/baz', _ : [] } - ); - t.same( - parse([ '-xyz/foo/bar/baz' ]), - { x : true, y : true, z : '/foo/bar/baz', _ : [] } - ); - t.end(); -}); - -test('alias', function (t) { - var argv = parse([ '-f', '11', '--zoom', '55' ], { - alias: { z: 'zoom' } - }); - t.equal(argv.zoom, 55); - t.equal(argv.z, argv.zoom); - t.equal(argv.f, 11); - t.end(); -}); - -test('multiAlias', function (t) { - var argv = parse([ '-f', '11', '--zoom', '55' ], { - alias: { z: [ 'zm', 'zoom' ] } - }); - t.equal(argv.zoom, 55); - t.equal(argv.z, argv.zoom); - t.equal(argv.z, argv.zm); - t.equal(argv.f, 11); - t.end(); -}); - -test('nested dotted objects', function (t) { - var argv = parse([ - '--foo.bar', '3', '--foo.baz', '4', - '--foo.quux.quibble', '5', '--foo.quux.o_O', - '--beep.boop' - ]); - - t.same(argv.foo, { - bar : 3, - baz : 4, - quux : { - quibble : 5, - o_O : true - } - }); - t.same(argv.beep, { boop : true }); - t.end(); -}); diff --git a/node_modules/browserify/node_modules/subarg/node_modules/minimist/test/parse_modified.js b/node_modules/browserify/node_modules/subarg/node_modules/minimist/test/parse_modified.js deleted file mode 100644 index ab620dc5..00000000 --- a/node_modules/browserify/node_modules/subarg/node_modules/minimist/test/parse_modified.js +++ /dev/null @@ -1,9 +0,0 @@ -var parse = require('../'); -var test = require('tape'); - -test('parse with modifier functions' , function (t) { - t.plan(1); - - var argv = parse([ '-b', '123' ], { boolean: 'b' }); - t.deepEqual(argv, { b: true, _: [123] }); -}); diff --git a/node_modules/browserify/node_modules/subarg/node_modules/minimist/test/short.js b/node_modules/browserify/node_modules/subarg/node_modules/minimist/test/short.js deleted file mode 100644 index d513a1c2..00000000 --- a/node_modules/browserify/node_modules/subarg/node_modules/minimist/test/short.js +++ /dev/null @@ -1,67 +0,0 @@ -var parse = require('../'); -var test = require('tape'); - -test('numeric short args', function (t) { - t.plan(2); - t.deepEqual(parse([ '-n123' ]), { n: 123, _: [] }); - t.deepEqual( - parse([ '-123', '456' ]), - { 1: true, 2: true, 3: 456, _: [] } - ); -}); - -test('short', function (t) { - t.deepEqual( - parse([ '-b' ]), - { b : true, _ : [] }, - 'short boolean' - ); - t.deepEqual( - parse([ 'foo', 'bar', 'baz' ]), - { _ : [ 'foo', 'bar', 'baz' ] }, - 'bare' - ); - t.deepEqual( - parse([ '-cats' ]), - { c : true, a : true, t : true, s : true, _ : [] }, - 'group' - ); - t.deepEqual( - parse([ '-cats', 'meow' ]), - { c : true, a : true, t : true, s : 'meow', _ : [] }, - 'short group next' - ); - t.deepEqual( - parse([ '-h', 'localhost' ]), - { h : 'localhost', _ : [] }, - 'short capture' - ); - t.deepEqual( - parse([ '-h', 'localhost', '-p', '555' ]), - { h : 'localhost', p : 555, _ : [] }, - 'short captures' - ); - t.end(); -}); - -test('mixed short bool and capture', function (t) { - t.same( - parse([ '-h', 'localhost', '-fp', '555', 'script.js' ]), - { - f : true, p : 555, h : 'localhost', - _ : [ 'script.js' ] - } - ); - t.end(); -}); - -test('short and long', function (t) { - t.deepEqual( - parse([ '-h', 'localhost', '-fp', '555', 'script.js' ]), - { - f : true, p : 555, h : 'localhost', - _ : [ 'script.js' ] - } - ); - t.end(); -}); diff --git a/node_modules/browserify/node_modules/subarg/node_modules/minimist/test/stop_early.js b/node_modules/browserify/node_modules/subarg/node_modules/minimist/test/stop_early.js deleted file mode 100644 index bdf9fbcb..00000000 --- a/node_modules/browserify/node_modules/subarg/node_modules/minimist/test/stop_early.js +++ /dev/null @@ -1,15 +0,0 @@ -var parse = require('../'); -var test = require('tape'); - -test('stops parsing on the first non-option when stopEarly is set', function (t) { - var argv = parse(['--aaa', 'bbb', 'ccc', '--ddd'], { - stopEarly: true - }); - - t.deepEqual(argv, { - aaa: 'bbb', - _: ['ccc', '--ddd'] - }); - - t.end(); -}); diff --git a/node_modules/browserify/node_modules/subarg/node_modules/minimist/test/unknown.js b/node_modules/browserify/node_modules/subarg/node_modules/minimist/test/unknown.js deleted file mode 100644 index 462a36bd..00000000 --- a/node_modules/browserify/node_modules/subarg/node_modules/minimist/test/unknown.js +++ /dev/null @@ -1,102 +0,0 @@ -var parse = require('../'); -var test = require('tape'); - -test('boolean and alias is not unknown', function (t) { - var unknown = []; - function unknownFn(arg) { - unknown.push(arg); - return false; - } - var aliased = [ '-h', 'true', '--derp', 'true' ]; - var regular = [ '--herp', 'true', '-d', 'true' ]; - var opts = { - alias: { h: 'herp' }, - boolean: 'h', - unknown: unknownFn - }; - var aliasedArgv = parse(aliased, opts); - var propertyArgv = parse(regular, opts); - - t.same(unknown, ['--derp', '-d']); - t.end(); -}); - -test('flag boolean true any double hyphen argument is not unknown', function (t) { - var unknown = []; - function unknownFn(arg) { - unknown.push(arg); - return false; - } - var argv = parse(['--honk', '--tacos=good', 'cow', '-p', '55'], { - boolean: true, - unknown: unknownFn - }); - t.same(unknown, ['--tacos=good', 'cow', '-p']); - t.same(argv, { - honk: true, - _: [] - }); - t.end(); -}); - -test('string and alias is not unknown', function (t) { - var unknown = []; - function unknownFn(arg) { - unknown.push(arg); - return false; - } - var aliased = [ '-h', 'hello', '--derp', 'goodbye' ]; - var regular = [ '--herp', 'hello', '-d', 'moon' ]; - var opts = { - alias: { h: 'herp' }, - string: 'h', - unknown: unknownFn - }; - var aliasedArgv = parse(aliased, opts); - var propertyArgv = parse(regular, opts); - - t.same(unknown, ['--derp', '-d']); - t.end(); -}); - -test('default and alias is not unknown', function (t) { - var unknown = []; - function unknownFn(arg) { - unknown.push(arg); - return false; - } - var aliased = [ '-h', 'hello' ]; - var regular = [ '--herp', 'hello' ]; - var opts = { - default: { 'h': 'bar' }, - alias: { 'h': 'herp' }, - unknown: unknownFn - }; - var aliasedArgv = parse(aliased, opts); - var propertyArgv = parse(regular, opts); - - t.same(unknown, []); - t.end(); - unknownFn(); // exercise fn for 100% coverage -}); - -test('value following -- is not unknown', function (t) { - var unknown = []; - function unknownFn(arg) { - unknown.push(arg); - return false; - } - var aliased = [ '--bad', '--', 'good', 'arg' ]; - var opts = { - '--': true, - unknown: unknownFn - }; - var argv = parse(aliased, opts); - - t.same(unknown, ['--bad']); - t.same(argv, { - '--': ['good', 'arg'], - '_': [] - }) - t.end(); -}); diff --git a/node_modules/browserify/node_modules/subarg/node_modules/minimist/test/whitespace.js b/node_modules/browserify/node_modules/subarg/node_modules/minimist/test/whitespace.js deleted file mode 100644 index 8a52a58c..00000000 --- a/node_modules/browserify/node_modules/subarg/node_modules/minimist/test/whitespace.js +++ /dev/null @@ -1,8 +0,0 @@ -var parse = require('../'); -var test = require('tape'); - -test('whitespace should be whitespace' , function (t) { - t.plan(1); - var x = parse([ '-x', '\t' ]).x; - t.equal(x, '\t'); -}); diff --git a/node_modules/browserify/node_modules/subarg/package.json b/node_modules/browserify/node_modules/subarg/package.json deleted file mode 100644 index aad1a53e..00000000 --- a/node_modules/browserify/node_modules/subarg/package.json +++ /dev/null @@ -1,78 +0,0 @@ -{ - "name": "subarg", - "version": "1.0.0", - "description": "parse arguments with recursive contexts", - "main": "index.js", - "dependencies": { - "minimist": "^1.1.0" - }, - "devDependencies": { - "tape": "^3.0.0" - }, - "scripts": { - "test": "tape test/*.js" - }, - "repository": { - "type": "git", - "url": "git://github.com/substack/subarg.git" - }, - "homepage": "https://github.com/substack/subarg", - "keywords": [ - "argument", - "option", - "parser", - "parsing", - "flags", - "command-line", - "cli", - "recursive", - "minimist" - ], - "author": { - "name": "James Halliday", - "email": "mail@substack.net", - "url": "http://substack.net" - }, - "license": "MIT", - "testling": { - "files": "test/*.js", - "browsers": [ - "ie/8..latest", - "firefox/16", - "firefox/latest", - "firefox/nightly", - "chrome/22", - "chrome/latest", - "chrome/canary", - "opera/12..latest", - "opera/next", - "safari/5.1..latest" - ] - }, - "gitHead": "249bde03606850fac7d89d67e79782f56cd41cce", - "bugs": { - "url": "https://github.com/substack/subarg/issues" - }, - "_id": "subarg@1.0.0", - "_shasum": "f62cf17581e996b48fc965699f54c06ae268b8d2", - "_from": "subarg@>=1.0.0 <2.0.0", - "_npmVersion": "2.0.2", - "_nodeVersion": "0.10.31", - "_npmUser": { - "name": "substack", - "email": "mail@substack.net" - }, - "maintainers": [ - { - "name": "substack", - "email": "mail@substack.net" - } - ], - "dist": { - "shasum": "f62cf17581e996b48fc965699f54c06ae268b8d2", - "tarball": "https://registry.npmjs.org/subarg/-/subarg-1.0.0.tgz" - }, - "directories": {}, - "_resolved": "https://registry.npmjs.org/subarg/-/subarg-1.0.0.tgz", - "readme": "ERROR: No README data found!" -} diff --git a/node_modules/browserify/node_modules/subarg/readme.markdown b/node_modules/browserify/node_modules/subarg/readme.markdown deleted file mode 100644 index e77a4d94..00000000 --- a/node_modules/browserify/node_modules/subarg/readme.markdown +++ /dev/null @@ -1,55 +0,0 @@ -# subarg - -parse arguments with recursive contexts using -[minimist](https://npmjs.org/package/minimist) - -[![testling badge](https://ci.testling.com/substack/subarg.png)](https://ci.testling.com/substack/subarg) - -[![build status](https://secure.travis-ci.org/substack/subarg.png)](http://travis-ci.org/substack/subarg) - -This module is useful if you need to pass arguments into a piece of code without -coordinating ahead of time with the main program, like with a plugin system. - -# example - -``` js -var subarg = require('subarg'); -var argv = subarg(process.argv.slice(2)); -console.log(argv); -``` - -Contexts are denoted with square brackets: - -``` -$ node example/show.js rawr --beep [ boop -a 3 ] -n4 --robots [ -x 8 -y 6 ] -{ _: [ 'rawr' ], - beep: { _: [ 'boop' ], a: 3 }, - n: 4, - robots: { _: [], x: 8, y: 6 } } -``` - -# methods - -``` js -var subarg = require('subarg') -``` - -## var argv = subarg(args, opts) - -Parse the arguments array `args`, passing `opts` to -[minimist](https://npmjs.org/package/minimist). - -An opening `[` in the `args` array creates a new context and a `]` closes a -context. Contexts may be nested. - -# install - -With [npm](https://npmjs.org) do: - -``` -npm install subarg -``` - -# license - -MIT diff --git a/node_modules/browserify/node_modules/subarg/test/arg.js b/node_modules/browserify/node_modules/subarg/test/arg.js deleted file mode 100644 index d6f91baa..00000000 --- a/node_modules/browserify/node_modules/subarg/test/arg.js +++ /dev/null @@ -1,31 +0,0 @@ -var subarg = require('../'); -var test = require('tape'); - -test('spaced multi sub-args', function (t) { - t.plan(2); - - t.deepEqual( - subarg('beep -t [ boop -o a.txt -o b.txt -q ] -v'.split(/\s+/)), - { - _: [ 'beep'], - t: { - _: [ 'boop' ], - o: [ 'a.txt', 'b.txt' ], - q: true - }, - v: true - } - ); - t.deepEqual( - subarg('beep -t [boop -o a.txt -o b.txt -q] -v'.split(/\s+/)), - { - _: [ 'beep'], - t: { - _: [ 'boop' ], - o: [ 'a.txt', 'b.txt' ], - q: true - }, - v: true - } - ); -}); diff --git a/node_modules/browserify/node_modules/subarg/test/recursive.js b/node_modules/browserify/node_modules/subarg/test/recursive.js deleted file mode 100644 index ab94c7a2..00000000 --- a/node_modules/browserify/node_modules/subarg/test/recursive.js +++ /dev/null @@ -1,24 +0,0 @@ -var subarg = require('../'); -var test = require('tape'); - -test('recursive', function (t) { - t.plan(1); - - t.deepEqual( - subarg('-a [ -b [ -c [ -d 5 ] ] ] -e 3'.split(/\s+/)), - { - _: [], - a: { - _: [], - b: { - _: [], - c: { - _: [], - d: 5 - } - } - }, - e: 3 - } - ); -}); diff --git a/node_modules/browserify/node_modules/syntax-error/.travis.yml b/node_modules/browserify/node_modules/syntax-error/.travis.yml deleted file mode 100644 index 74c57bf1..00000000 --- a/node_modules/browserify/node_modules/syntax-error/.travis.yml +++ /dev/null @@ -1,8 +0,0 @@ -language: node_js -node_js: - - "0.8" - - "0.10" - - "0.12" - - "iojs" -before_install: - - npm install -g npm@~1.4.6 diff --git a/node_modules/browserify/node_modules/syntax-error/LICENSE b/node_modules/browserify/node_modules/syntax-error/LICENSE deleted file mode 100644 index ee27ba4b..00000000 --- a/node_modules/browserify/node_modules/syntax-error/LICENSE +++ /dev/null @@ -1,18 +0,0 @@ -This software is released under the MIT license: - -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/node_modules/browserify/node_modules/syntax-error/example/check.js b/node_modules/browserify/node_modules/syntax-error/example/check.js deleted file mode 100644 index a6d51fc0..00000000 --- a/node_modules/browserify/node_modules/syntax-error/example/check.js +++ /dev/null @@ -1,12 +0,0 @@ -var fs = require('fs'); -var check = require('../'); - -var file = __dirname + '/src.js'; -var src = fs.readFileSync(file); - -var err = check(src, file); -if (err) { - console.error('ERROR DETECTED' + Array(62).join('!')); - console.error(err); - console.error(Array(76).join('-')); -} diff --git a/node_modules/browserify/node_modules/syntax-error/example/src.js b/node_modules/browserify/node_modules/syntax-error/example/src.js deleted file mode 100644 index 51a63e78..00000000 --- a/node_modules/browserify/node_modules/syntax-error/example/src.js +++ /dev/null @@ -1,9 +0,0 @@ -module.exports = function (xs, fn) { - var res = []; - for (var i = 0; i < xs.length; i++) { - var x = fn(xs[i], i); - if (Array.isArray(x) res.push.apply(res, x); - else res.push(x); - } - return res; -}; diff --git a/node_modules/browserify/node_modules/syntax-error/index.js b/node_modules/browserify/node_modules/syntax-error/index.js deleted file mode 100644 index 9048d77f..00000000 --- a/node_modules/browserify/node_modules/syntax-error/index.js +++ /dev/null @@ -1,59 +0,0 @@ -var aparse = require('acorn').parse; -function parse (src) { - return aparse(src, { - ecmaVersion: 6, - allowHashBang: true - }); -} - -module.exports = function (src, file) { - if (typeof src !== 'string') src = String(src); - - try { - eval('throw "STOP"; (function () { ' + src + '})()'); - return; - } - catch (err) { - if (err === 'STOP') return undefined; - if (err.constructor.name !== 'SyntaxError') return err; - return errorInfo(src, file); - } -}; - -function errorInfo (src, file) { - try { parse(src) } - catch (err) { - return new ParseError(err, src, file); - } - return undefined; -} - -function ParseError (err, src, file) { - SyntaxError.call(this); - - this.message = err.message.replace(/\s+\(\d+:\d+\)$/, ''); - - this.line = err.loc.line; - this.column = err.loc.column + 1; - - this.annotated = '\n' - + (file || '(anonymous file)') - + ':' + this.line - + '\n' - + src.split('\n')[this.line - 1] - + '\n' - + Array(this.column).join(' ') + '^' - + '\n' - + 'ParseError: ' + this.message - ; -} - -ParseError.prototype = Object.create(SyntaxError.prototype); - -ParseError.prototype.toString = function () { - return this.annotated; -}; - -ParseError.prototype.inspect = function () { - return this.annotated; -}; diff --git a/node_modules/browserify/node_modules/syntax-error/node_modules/.bin/acorn b/node_modules/browserify/node_modules/syntax-error/node_modules/.bin/acorn deleted file mode 120000 index cf767603..00000000 --- a/node_modules/browserify/node_modules/syntax-error/node_modules/.bin/acorn +++ /dev/null @@ -1 +0,0 @@ -../acorn/bin/acorn \ No newline at end of file diff --git a/node_modules/browserify/node_modules/syntax-error/node_modules/acorn/.editorconfig b/node_modules/browserify/node_modules/syntax-error/node_modules/acorn/.editorconfig deleted file mode 100644 index c14d5c67..00000000 --- a/node_modules/browserify/node_modules/syntax-error/node_modules/acorn/.editorconfig +++ /dev/null @@ -1,7 +0,0 @@ -root = true - -[*] -indent_style = space -indent_size = 2 -end_of_line = lf -insert_final_newline = true diff --git a/node_modules/browserify/node_modules/syntax-error/node_modules/acorn/.gitattributes b/node_modules/browserify/node_modules/syntax-error/node_modules/acorn/.gitattributes deleted file mode 100644 index fcadb2cf..00000000 --- a/node_modules/browserify/node_modules/syntax-error/node_modules/acorn/.gitattributes +++ /dev/null @@ -1 +0,0 @@ -* text eol=lf diff --git a/node_modules/browserify/node_modules/syntax-error/node_modules/acorn/.npmignore b/node_modules/browserify/node_modules/syntax-error/node_modules/acorn/.npmignore deleted file mode 100644 index ecba2911..00000000 --- a/node_modules/browserify/node_modules/syntax-error/node_modules/acorn/.npmignore +++ /dev/null @@ -1,3 +0,0 @@ -/.tern-port -/test -/local diff --git a/node_modules/browserify/node_modules/syntax-error/node_modules/acorn/.tern-project b/node_modules/browserify/node_modules/syntax-error/node_modules/acorn/.tern-project deleted file mode 100644 index 6718ce07..00000000 --- a/node_modules/browserify/node_modules/syntax-error/node_modules/acorn/.tern-project +++ /dev/null @@ -1,6 +0,0 @@ -{ - "plugins": { - "node": true, - "es_modules": true - } -} \ No newline at end of file diff --git a/node_modules/browserify/node_modules/syntax-error/node_modules/acorn/.travis.yml b/node_modules/browserify/node_modules/syntax-error/node_modules/acorn/.travis.yml deleted file mode 100644 index f50c379b..00000000 --- a/node_modules/browserify/node_modules/syntax-error/node_modules/acorn/.travis.yml +++ /dev/null @@ -1,6 +0,0 @@ -language: node_js -sudo: false -node_js: - - '0.10' - - '0.12' - - '4' diff --git a/node_modules/browserify/node_modules/syntax-error/node_modules/acorn/AUTHORS b/node_modules/browserify/node_modules/syntax-error/node_modules/acorn/AUTHORS deleted file mode 100644 index 0e8f48b6..00000000 --- a/node_modules/browserify/node_modules/syntax-error/node_modules/acorn/AUTHORS +++ /dev/null @@ -1,43 +0,0 @@ -List of Acorn contributors. Updated before every release. - -Adrian Rakovsky -Alistair Braidwood -Andres Suarez -Aparajita Fishman -Arian Stolwijk -Artem Govorov -Brandon Mills -Charles Hughes -Conrad Irwin -David Bonnet -ForbesLindesay -Forbes Lindesay -Gilad Peleg -impinball -Ingvar Stepanyan -Jesse McCarthy -Jiaxing Wang -Joel Kemp -Johannes Herr -Jürg Lehni -keeyipchan -Kevin Kwok -krator -Marijn Haverbeke -Martin Carlberg -Mathias Bynens -Mathieu 'p01' Henri -Max Schaefer -Max Zerzouri -Mihai Bazon -Mike Rennie -Nick Fitzgerald -Oskar Schöldström -Paul Harper -Peter Rust -PlNG -r-e-d -Rich Harris -Sebastian McKenzie -Timothy Gu -zsjforcn diff --git a/node_modules/browserify/node_modules/syntax-error/node_modules/acorn/LICENSE b/node_modules/browserify/node_modules/syntax-error/node_modules/acorn/LICENSE deleted file mode 100644 index d4c7fc58..00000000 --- a/node_modules/browserify/node_modules/syntax-error/node_modules/acorn/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (C) 2012-2014 by various contributors (see AUTHORS) - -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/node_modules/browserify/node_modules/syntax-error/node_modules/acorn/README.md b/node_modules/browserify/node_modules/syntax-error/node_modules/acorn/README.md deleted file mode 100644 index acd39a8e..00000000 --- a/node_modules/browserify/node_modules/syntax-error/node_modules/acorn/README.md +++ /dev/null @@ -1,396 +0,0 @@ -# Acorn - -[![Build Status](https://travis-ci.org/ternjs/acorn.svg?branch=master)](https://travis-ci.org/ternjs/acorn) -[![NPM version](https://img.shields.io/npm/v/acorn.svg)](https://www.npmjs.com/package/acorn) -[Author funding status: ![maintainer happiness](https://marijnhaverbeke.nl/fund/status_s.png?force)](https://marijnhaverbeke.nl/fund/) - -A tiny, fast JavaScript parser, written completely in JavaScript. - -## Community - -Acorn is open source software released under an -[MIT license](https://github.com/ternjs/acorn/blob/master/LICENSE). - -You are welcome to -[report bugs](https://github.com/ternjs/acorn/issues) or create pull -requests on [github](https://github.com/ternjs/acorn). For questions -and discussion, please use the -[Tern discussion forum](https://discuss.ternjs.net). - -## Installation - -The easiest way to install acorn is with [`npm`][npm]. - -[npm]: https://www.npmjs.com/ - -```sh -npm install acorn -``` - -Alternately, download the source. - -```sh -git clone https://github.com/ternjs/acorn.git -``` - -## Components - -When run in a CommonJS (node.js) or AMD environment, exported values -appear in the interfaces exposed by the individual files, as usual. -When loaded in the browser (Acorn works in any JS-enabled browser more -recent than IE5) without any kind of module management, a single -global object `acorn` will be defined, and all the exported properties -will be added to that. - -### Main parser - -This is implemented in `dist/acorn.js`, and is what you get when you -`require("acorn")` in node.js. - -**parse**`(input, options)` is used to parse a JavaScript program. -The `input` parameter is a string, `options` can be undefined or an -object setting some of the options listed below. The return value will -be an abstract syntax tree object as specified by the -[ESTree spec][estree]. - -When encountering a syntax error, the parser will raise a -`SyntaxError` object with a meaningful message. The error object will -have a `pos` property that indicates the character offset at which the -error occurred, and a `loc` object that contains a `{line, column}` -object referring to that same position. - -[estree]: https://github.com/estree/estree - -- **ecmaVersion**: Indicates the ECMAScript version to parse. Must be - either 3, 5, or 6. This influences support for strict mode, the set - of reserved words, and support for new syntax features. Default is 5. - -- **sourceType**: Indicate the mode the code should be parsed in. Can be - either `"script"` or `"module"`. - -- **onInsertedSemicolon**: If given a callback, that callback will be - called whenever a missing semicolon is inserted by the parser. The - callback will be given the character offset of the point where the - semicolon is inserted as argument, and if `locations` is on, also a - `{line, column}` object representing this position. - -- **onTrailingComma**: Like `onInsertedSemicolon`, but for trailing - commas. - -- **allowReserved**: If `false`, using a reserved word will generate - an error. Defaults to `true` for `ecmaVersion` 3, `false` for higher - versions. When given the value `"never"`, reserved words and - keywords can also not be used as property names (as in Internet - Explorer's old parser). - -- **allowReturnOutsideFunction**: By default, a return statement at - the top level raises an error. Set this to `true` to accept such - code. - -- **allowImportExportEverywhere**: By default, `import` and `export` - declarations can only appear at a program's top level. Setting this - option to `true` allows them anywhere where a statement is allowed. - -- **allowHashBang**: When this is enabled (off by default), if the - code starts with the characters `#!` (as in a shellscript), the - first line will be treated as a comment. - -- **locations**: When `true`, each node has a `loc` object attached - with `start` and `end` subobjects, each of which contains the - one-based line and zero-based column numbers in `{line, column}` - form. Default is `false`. - -- **onToken**: If a function is passed for this option, each found - token will be passed in same format as tokens returned from - `tokenizer().getToken()`. - - If array is passed, each found token is pushed to it. - - Note that you are not allowed to call the parser from the - callback—that will corrupt its internal state. - -- **onComment**: If a function is passed for this option, whenever a - comment is encountered the function will be called with the - following parameters: - - - `block`: `true` if the comment is a block comment, false if it - is a line comment. - - `text`: The content of the comment. - - `start`: Character offset of the start of the comment. - - `end`: Character offset of the end of the comment. - - When the `locations` options is on, the `{line, column}` locations - of the comment’s start and end are passed as two additional - parameters. - - If array is passed for this option, each found comment is pushed - to it as object in Esprima format: - - ```javascript - { - "type": "Line" | "Block", - "value": "comment text", - "start": Number, - "end": Number, - // If `locations` option is on: - "loc": { - "start": {line: Number, column: Number} - "end": {line: Number, column: Number} - }, - // If `ranges` option is on: - "range": [Number, Number] - } - ``` - - Note that you are not allowed to call the parser from the - callback—that will corrupt its internal state. - -- **ranges**: Nodes have their start and end characters offsets - recorded in `start` and `end` properties (directly on the node, - rather than the `loc` object, which holds line/column data. To also - add a [semi-standardized][range] `range` property holding a - `[start, end]` array with the same numbers, set the `ranges` option - to `true`. - -- **program**: It is possible to parse multiple files into a single - AST by passing the tree produced by parsing the first file as the - `program` option in subsequent parses. This will add the toplevel - forms of the parsed file to the "Program" (top) node of an existing - parse tree. - -- **sourceFile**: When the `locations` option is `true`, you can pass - this option to add a `source` attribute in every node’s `loc` - object. Note that the contents of this option are not examined or - processed in any way; you are free to use whatever format you - choose. - -- **directSourceFile**: Like `sourceFile`, but a `sourceFile` property - will be added directly to the nodes, rather than the `loc` object. - -- **preserveParens**: If this option is `true`, parenthesized expressions - are represented by (non-standard) `ParenthesizedExpression` nodes - that have a single `expression` property containing the expression - inside parentheses. - -[range]: https://bugzilla.mozilla.org/show_bug.cgi?id=745678 - -**parseExpressionAt**`(input, offset, options)` will parse a single -expression in a string, and return its AST. It will not complain if -there is more of the string left after the expression. - -**getLineInfo**`(input, offset)` can be used to get a `{line, -column}` object for a given program string and character offset. - -**tokenizer**`(input, options)` returns an object with a `getToken` -method that can be called repeatedly to get the next token, a `{start, -end, type, value}` object (with added `loc` property when the -`locations` option is enabled and `range` property when the `ranges` -option is enabled). When the token's type is `tokTypes.eof`, you -should stop calling the method, since it will keep returning that same -token forever. - -In ES6 environment, returned result can be used as any other -protocol-compliant iterable: - -```javascript -for (let token of acorn.tokenizer(str)) { - // iterate over the tokens -} - -// transform code to array of tokens: -var tokens = [...acorn.tokenizer(str)]; -``` - -**tokTypes** holds an object mapping names to the token type objects -that end up in the `type` properties of tokens. - -#### Note on using with [Escodegen][escodegen] - -Escodegen supports generating comments from AST, attached in -Esprima-specific format. In order to simulate same format in -Acorn, consider following example: - -```javascript -var comments = [], tokens = []; - -var ast = acorn.parse('var x = 42; // answer', { - // collect ranges for each node - ranges: true, - // collect comments in Esprima's format - onComment: comments, - // collect token ranges - onToken: tokens -}); - -// attach comments using collected information -escodegen.attachComments(ast, comments, tokens); - -// generate code -console.log(escodegen.generate(ast, {comment: true})); -// > 'var x = 42; // answer' -``` - -[escodegen]: https://github.com/estools/escodegen - -### dist/acorn_loose.js ### - -This file implements an error-tolerant parser. It exposes a single -function. The loose parser is accessible in node.js via `require("acorn/dist/acorn_loose")`. - -**parse_dammit**`(input, options)` takes the same arguments and -returns the same syntax tree as the `parse` function in `acorn.js`, -but never raises an error, and will do its best to parse syntactically -invalid code in as meaningful a way as it can. It'll insert identifier -nodes with name `"✖"` as placeholders in places where it can't make -sense of the input. Depends on `acorn.js`, because it uses the same -tokenizer. - -### dist/walk.js ### - -Implements an abstract syntax tree walker. Will store its interface in -`acorn.walk` when loaded without a module system. - -**simple**`(node, visitors, base, state)` does a 'simple' walk over -a tree. `node` should be the AST node to walk, and `visitors` an -object with properties whose names correspond to node types in the -[ESTree spec][estree]. The properties should contain functions -that will be called with the node object and, if applicable the state -at that point. The last two arguments are optional. `base` is a walker -algorithm, and `state` is a start state. The default walker will -simply visit all statements and expressions and not produce a -meaningful state. (An example of a use of state is to track scope at -each point in the tree.) - -**ancestor**`(node, visitors, base, state)` does a 'simple' walk over -a tree, building up an array of ancestor nodes (including the current node) -and passing the array to callbacks in the `state` parameter. - -**recursive**`(node, state, functions, base)` does a 'recursive' -walk, where the walker functions are responsible for continuing the -walk on the child nodes of their target node. `state` is the start -state, and `functions` should contain an object that maps node types -to walker functions. Such functions are called with `(node, state, c)` -arguments, and can cause the walk to continue on a sub-node by calling -the `c` argument on it with `(node, state)` arguments. The optional -`base` argument provides the fallback walker functions for node types -that aren't handled in the `functions` object. If not given, the -default walkers will be used. - -**make**`(functions, base)` builds a new walker object by using the -walker functions in `functions` and filling in the missing ones by -taking defaults from `base`. - -**findNodeAt**`(node, start, end, test, base, state)` tries to -locate a node in a tree at the given start and/or end offsets, which -satisfies the predicate `test`. `start` and `end` can be either `null` -(as wildcard) or a number. `test` may be a string (indicating a node -type) or a function that takes `(nodeType, node)` arguments and -returns a boolean indicating whether this node is interesting. `base` -and `state` are optional, and can be used to specify a custom walker. -Nodes are tested from inner to outer, so if two nodes match the -boundaries, the inner one will be preferred. - -**findNodeAround**`(node, pos, test, base, state)` is a lot like -`findNodeAt`, but will match any node that exists 'around' (spanning) -the given position. - -**findNodeAfter**`(node, pos, test, base, state)` is similar to -`findNodeAround`, but will match all nodes *after* the given position -(testing outer nodes before inner nodes). - -## Command line interface - -The `bin/acorn` utility can be used to parse a file from the command -line. It accepts as arguments its input file and the following -options: - -- `--ecma3|--ecma5|--ecma6`: Sets the ECMAScript version to parse. Default is - version 5. - -- `--module`: Sets the parsing mode to `"module"`. Is set to `"script"` otherwise. - -- `--locations`: Attaches a "loc" object to each node with "start" and - "end" subobjects, each of which contains the one-based line and - zero-based column numbers in `{line, column}` form. - -- `--allow-hash-bang`: If the code starts with the characters #! (as in a shellscript), the first line will be treated as a comment. - -- `--compact`: No whitespace is used in the AST output. - -- `--silent`: Do not output the AST, just return the exit status. - -- `--help`: Print the usage information and quit. - -The utility spits out the syntax tree as JSON data. - -## Build system - -Acorn is written in ECMAScript 6, as a set of small modules, in the -project's `src` directory, and compiled down to bigger ECMAScript 3 -files in `dist` using [Browserify](http://browserify.org) and -[Babel](http://babeljs.io/). If you are already using Babel, you can -consider including the modules directly. - -The command-line test runner (`npm test`) uses the ES6 modules. The -browser-based test page (`test/index.html`) uses the compiled modules. -The `bin/build-acorn.js` script builds the latter from the former. - -If you are working on Acorn, you'll probably want to try the code out -directly, without an intermediate build step. In your scripts, you can -register the Babel require shim like this: - - require("babel-core/register") - -That will allow you to directly `require` the ES6 modules. - -## Plugins - -Acorn is designed support allow plugins which, within reasonable -bounds, redefine the way the parser works. Plugins can add new token -types and new tokenizer contexts (if necessary), and extend methods in -the parser object. This is not a clean, elegant API—using it requires -an understanding of Acorn's internals, and plugins are likely to break -whenever those internals are significantly changed. But still, it is -_possible_, in this way, to create parsers for JavaScript dialects -without forking all of Acorn. And in principle it is even possible to -combine such plugins, so that if you have, for example, a plugin for -parsing types and a plugin for parsing JSX-style XML literals, you -could load them both and parse code with both JSX tags and types. - -A plugin should register itself by adding a property to -`acorn.plugins`, which holds a function. Calling `acorn.parse`, a -`plugins` option can be passed, holding an object mapping plugin names -to configuration values (or just `true` for plugins that don't take -options). After the parser object has been created, the initialization -functions for the chosen plugins are called with `(parser, -configValue)` arguments. They are expected to use the `parser.extend` -method to extend parser methods. For example, the `readToken` method -could be extended like this: - -```javascript -parser.extend("readToken", function(nextMethod) { - return function(code) { - console.log("Reading a token!") - return nextMethod.call(this, code) - } -}) -``` - -The `nextMethod` argument passed to `extend`'s second argument is the -previous value of this method, and should usually be called through to -whenever the extended method does not handle the call itself. - -Similarly, the loose parser allows plugins to register themselves via -`acorn.pluginsLoose`. The extension mechanism is the same as for the -normal parser: - -```javascript -looseParser.extend("readToken", function(nextMethod) { - return function() { - console.log("Reading a token in the loose parser!") - return nextMethod.call(this) - } -}) -``` - -There is a proof-of-concept JSX plugin in the [`acorn-jsx`](https://github.com/RReverser/acorn-jsx) project. diff --git a/node_modules/browserify/node_modules/syntax-error/node_modules/acorn/bin/acorn b/node_modules/browserify/node_modules/syntax-error/node_modules/acorn/bin/acorn deleted file mode 100755 index db079096..00000000 --- a/node_modules/browserify/node_modules/syntax-error/node_modules/acorn/bin/acorn +++ /dev/null @@ -1,71 +0,0 @@ -#!/usr/bin/env node -"use strict"; - -function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj["default"] = obj; return newObj; } } - -var _path = require("path"); - -var _fs = require("fs"); - -var _distAcornJs = require("../dist/acorn.js"); - -var acorn = _interopRequireWildcard(_distAcornJs); - -var infile = undefined, - forceFile = undefined, - silent = false, - compact = false, - tokenize = false; -var options = {}; - -function help(status) { - var print = status == 0 ? console.log : console.error; - print("usage: " + (0, _path.basename)(process.argv[1]) + " [--ecma3|--ecma5|--ecma6]"); - print(" [--tokenize] [--locations] [---allow-hash-bang] [--compact] [--silent] [--module] [--help] [--] [infile]"); - process.exit(status); -} - -for (var i = 2; i < process.argv.length; ++i) { - var arg = process.argv[i]; - if ((arg == "-" || arg[0] != "-") && !infile) infile = arg;else if (arg == "--" && !infile && i + 2 == process.argv.length) forceFile = infile = process.argv[++i];else if (arg == "--ecma3") options.ecmaVersion = 3;else if (arg == "--ecma5") options.ecmaVersion = 5;else if (arg == "--ecma6") options.ecmaVersion = 6;else if (arg == "--locations") options.locations = true;else if (arg == "--allow-hash-bang") options.allowHashBang = true;else if (arg == "--silent") silent = true;else if (arg == "--compact") compact = true;else if (arg == "--help") help(0);else if (arg == "--tokenize") tokenize = true;else if (arg == "--module") options.sourceType = 'module';else help(1); -} - -function run(code) { - var result = undefined; - if (!tokenize) { - try { - result = acorn.parse(code, options); - } catch (e) { - console.error(e.message);process.exit(1); - } - } else { - result = []; - var tokenizer = acorn.tokenizer(code, options), - token = undefined; - while (true) { - try { - token = tokenizer.getToken(); - } catch (e) { - console.error(e.message);process.exit(1); - } - result.push(token); - if (token.type == acorn.tokTypes.eof) break; - } - } - if (!silent) console.log(JSON.stringify(result, null, compact ? null : 2)); -} - -if (forceFile || infile && infile != "-") { - run((0, _fs.readFileSync)(infile, "utf8")); -} else { - (function () { - var code = ""; - process.stdin.resume(); - process.stdin.on("data", function (chunk) { - return code += chunk; - }); - process.stdin.on("end", function () { - return run(code); - }); - })(); -} \ No newline at end of file diff --git a/node_modules/browserify/node_modules/syntax-error/node_modules/acorn/bin/build-acorn.js b/node_modules/browserify/node_modules/syntax-error/node_modules/acorn/bin/build-acorn.js deleted file mode 100644 index 71f2cf94..00000000 --- a/node_modules/browserify/node_modules/syntax-error/node_modules/acorn/bin/build-acorn.js +++ /dev/null @@ -1,82 +0,0 @@ -var fs = require("fs"), path = require("path") -var stream = require("stream") - -var browserify = require("browserify") -var babel = require('babel-core') -var babelify = require("babelify").configure({loose: "all"}) - -process.chdir(path.resolve(__dirname, "..")) - -browserify({standalone: "acorn"}) - .plugin(require('browserify-derequire')) - .transform(babelify) - .require("./src/index.js", {entry: true}) - .bundle() - .on("error", function (err) { console.log("Error: " + err.message) }) - .pipe(fs.createWriteStream("dist/acorn.js")) - -var ACORN_PLACEHOLDER = "this_function_call_should_be_replaced_with_a_call_to_load_acorn()"; -function acornShimPrepare(file) { - var tr = new stream.Transform - if (file == path.resolve(__dirname, "../src/index.js")) { - var sent = false - tr._transform = function(chunk, _, callback) { - if (!sent) { - sent = true - callback(null, ACORN_PLACEHOLDER); - } else { - callback() - } - } - } else { - tr._transform = function(chunk, _, callback) { callback(null, chunk) } - } - return tr -} -function acornShimComplete() { - var tr = new stream.Transform - var buffer = ""; - tr._transform = function(chunk, _, callback) { - buffer += chunk.toString("utf8"); - callback(); - }; - tr._flush = function (callback) { - tr.push(buffer.replace(ACORN_PLACEHOLDER, "module.exports = typeof acorn != 'undefined' ? acorn : require(\"./acorn\")")); - callback(null); - }; - return tr; -} - -browserify({standalone: "acorn.loose"}) - .plugin(require('browserify-derequire')) - .transform(acornShimPrepare) - .transform(babelify) - .require("./src/loose/index.js", {entry: true}) - .bundle() - .on("error", function (err) { console.log("Error: " + err.message) }) - .pipe(acornShimComplete()) - .pipe(fs.createWriteStream("dist/acorn_loose.js")) - -browserify({standalone: "acorn.walk"}) - .plugin(require('browserify-derequire')) - .transform(acornShimPrepare) - .transform(babelify) - .require("./src/walk/index.js", {entry: true}) - .bundle() - .on("error", function (err) { console.log("Error: " + err.message) }) - .pipe(acornShimComplete()) - .pipe(fs.createWriteStream("dist/walk.js")) - -babel.transformFile("./src/bin/acorn.js", function (err, result) { - if (err) return console.log("Error: " + err.message) - fs.writeFile("bin/acorn", result.code, function (err) { - if (err) return console.log("Error: " + err.message) - - // Make bin/acorn executable - if (process.platform === 'win32') - return - var stat = fs.statSync("bin/acorn") - var newPerm = stat.mode | parseInt('111', 8) - fs.chmodSync("bin/acorn", newPerm) - }) -}) diff --git a/node_modules/browserify/node_modules/syntax-error/node_modules/acorn/bin/generate-identifier-regex.js b/node_modules/browserify/node_modules/syntax-error/node_modules/acorn/bin/generate-identifier-regex.js deleted file mode 100644 index 0d7c50fc..00000000 --- a/node_modules/browserify/node_modules/syntax-error/node_modules/acorn/bin/generate-identifier-regex.js +++ /dev/null @@ -1,47 +0,0 @@ -// Note: run `npm install unicode-7.0.0` first. - -// Which Unicode version should be used? -var version = '7.0.0'; - -var start = require('unicode-' + version + '/properties/ID_Start/code-points') - .filter(function(ch) { return ch > 127; }); -var cont = [0x200c, 0x200d].concat(require('unicode-' + version + '/properties/ID_Continue/code-points') - .filter(function(ch) { return ch > 127 && start.indexOf(ch) == -1; })); - -function pad(str, width) { - while (str.length < width) str = "0" + str; - return str; -} - -function esc(code) { - var hex = code.toString(16); - if (hex.length <= 2) return "\\x" + pad(hex, 2); - else return "\\u" + pad(hex, 4); -} - -function generate(chars) { - var astral = [], re = ""; - for (var i = 0, at = 0x10000; i < chars.length; i++) { - var from = chars[i], to = from; - while (i < chars.length - 1 && chars[i + 1] == to + 1) { - i++; - to++; - } - if (to <= 0xffff) { - if (from == to) re += esc(from); - else if (from + 1 == to) re += esc(from) + esc(to); - else re += esc(from) + "-" + esc(to); - } else { - astral.push(from - at, to - from); - at = to; - } - } - return {nonASCII: re, astral: astral}; -} - -var startData = generate(start), contData = generate(cont); - -console.log(" var nonASCIIidentifierStartChars = \"" + startData.nonASCII + "\";"); -console.log(" var nonASCIIidentifierChars = \"" + contData.nonASCII + "\";"); -console.log(" var astralIdentifierStartCodes = " + JSON.stringify(startData.astral) + ";"); -console.log(" var astralIdentifierCodes = " + JSON.stringify(contData.astral) + ";"); diff --git a/node_modules/browserify/node_modules/syntax-error/node_modules/acorn/bin/update_authors.sh b/node_modules/browserify/node_modules/syntax-error/node_modules/acorn/bin/update_authors.sh deleted file mode 100755 index 466c8db5..00000000 --- a/node_modules/browserify/node_modules/syntax-error/node_modules/acorn/bin/update_authors.sh +++ /dev/null @@ -1,6 +0,0 @@ -# Combine existing list of authors with everyone known in git, sort, add header. -tail --lines=+3 AUTHORS > AUTHORS.tmp -git log --format='%aN' | grep -v abraidwood >> AUTHORS.tmp -echo -e "List of Acorn contributors. Updated before every release.\n" > AUTHORS -sort -u AUTHORS.tmp >> AUTHORS -rm -f AUTHORS.tmp diff --git a/node_modules/browserify/node_modules/syntax-error/node_modules/acorn/dist/.keep b/node_modules/browserify/node_modules/syntax-error/node_modules/acorn/dist/.keep deleted file mode 100644 index e69de29b..00000000 diff --git a/node_modules/browserify/node_modules/syntax-error/node_modules/acorn/dist/acorn.js b/node_modules/browserify/node_modules/syntax-error/node_modules/acorn/dist/acorn.js deleted file mode 100644 index 9419f862..00000000 --- a/node_modules/browserify/node_modules/syntax-error/node_modules/acorn/dist/acorn.js +++ /dev/null @@ -1,3340 +0,0 @@ -(function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.acorn = f()}})(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o= 6 && (prop.computed || prop.method || prop.shorthand)) return; - var key = prop.key;var name = undefined; - switch (key.type) { - case "Identifier": - name = key.name;break; - case "Literal": - name = String(key.value);break; - default: - return; - } - var kind = prop.kind; - - if (this.options.ecmaVersion >= 6) { - if (name === "__proto__" && kind === "init") { - if (propHash.proto) this.raise(key.start, "Redefinition of __proto__ property"); - propHash.proto = true; - } - return; - } - name = "$" + name; - var other = propHash[name]; - if (other) { - var isGetSet = kind !== "init"; - if ((this.strict || isGetSet) && other[kind] || !(isGetSet ^ other.init)) this.raise(key.start, "Redefinition of property"); - } else { - other = propHash[name] = { - init: false, - get: false, - set: false - }; - } - other[kind] = true; -}; - -// ### Expression parsing - -// These nest, from the most general expression type at the top to -// 'atomic', nondivisible expression types at the bottom. Most of -// the functions will simply let the function(s) below them parse, -// and, *if* the syntactic construct they handle is present, wrap -// the AST node that the inner parser gave them in another node. - -// Parse a full expression. The optional arguments are used to -// forbid the `in` operator (in for loops initalization expressions) -// and provide reference for storing '=' operator inside shorthand -// property assignment in contexts where both object expression -// and object pattern might appear (so it's possible to raise -// delayed syntax error at correct position). - -pp.parseExpression = function (noIn, refDestructuringErrors) { - var startPos = this.start, - startLoc = this.startLoc; - var expr = this.parseMaybeAssign(noIn, refDestructuringErrors); - if (this.type === _tokentype.types.comma) { - var node = this.startNodeAt(startPos, startLoc); - node.expressions = [expr]; - while (this.eat(_tokentype.types.comma)) node.expressions.push(this.parseMaybeAssign(noIn, refDestructuringErrors)); - return this.finishNode(node, "SequenceExpression"); - } - return expr; -}; - -// Parse an assignment expression. This includes applications of -// operators like `+=`. - -pp.parseMaybeAssign = function (noIn, refDestructuringErrors, afterLeftParse) { - if (this.type == _tokentype.types._yield && this.inGenerator) return this.parseYield(); - - var validateDestructuring = false; - if (!refDestructuringErrors) { - refDestructuringErrors = { shorthandAssign: 0, trailingComma: 0 }; - validateDestructuring = true; - } - var startPos = this.start, - startLoc = this.startLoc; - if (this.type == _tokentype.types.parenL || this.type == _tokentype.types.name) this.potentialArrowAt = this.start; - var left = this.parseMaybeConditional(noIn, refDestructuringErrors); - if (afterLeftParse) left = afterLeftParse.call(this, left, startPos, startLoc); - if (this.type.isAssign) { - if (validateDestructuring) this.checkPatternErrors(refDestructuringErrors, true); - var node = this.startNodeAt(startPos, startLoc); - node.operator = this.value; - node.left = this.type === _tokentype.types.eq ? this.toAssignable(left) : left; - refDestructuringErrors.shorthandAssign = 0; // reset because shorthand default was used correctly - this.checkLVal(left); - this.next(); - node.right = this.parseMaybeAssign(noIn); - return this.finishNode(node, "AssignmentExpression"); - } else { - if (validateDestructuring) this.checkExpressionErrors(refDestructuringErrors, true); - } - return left; -}; - -// Parse a ternary conditional (`?:`) operator. - -pp.parseMaybeConditional = function (noIn, refDestructuringErrors) { - var startPos = this.start, - startLoc = this.startLoc; - var expr = this.parseExprOps(noIn, refDestructuringErrors); - if (this.checkExpressionErrors(refDestructuringErrors)) return expr; - if (this.eat(_tokentype.types.question)) { - var node = this.startNodeAt(startPos, startLoc); - node.test = expr; - node.consequent = this.parseMaybeAssign(); - this.expect(_tokentype.types.colon); - node.alternate = this.parseMaybeAssign(noIn); - return this.finishNode(node, "ConditionalExpression"); - } - return expr; -}; - -// Start the precedence parser. - -pp.parseExprOps = function (noIn, refDestructuringErrors) { - var startPos = this.start, - startLoc = this.startLoc; - var expr = this.parseMaybeUnary(refDestructuringErrors); - if (this.checkExpressionErrors(refDestructuringErrors)) return expr; - return this.parseExprOp(expr, startPos, startLoc, -1, noIn); -}; - -// Parse binary operators with the operator precedence parsing -// algorithm. `left` is the left-hand side of the operator. -// `minPrec` provides context that allows the function to stop and -// defer further parser to one of its callers when it encounters an -// operator that has a lower precedence than the set it is parsing. - -pp.parseExprOp = function (left, leftStartPos, leftStartLoc, minPrec, noIn) { - var prec = this.type.binop; - if (prec != null && (!noIn || this.type !== _tokentype.types._in)) { - if (prec > minPrec) { - var node = this.startNodeAt(leftStartPos, leftStartLoc); - node.left = left; - node.operator = this.value; - var op = this.type; - this.next(); - var startPos = this.start, - startLoc = this.startLoc; - node.right = this.parseExprOp(this.parseMaybeUnary(), startPos, startLoc, prec, noIn); - this.finishNode(node, op === _tokentype.types.logicalOR || op === _tokentype.types.logicalAND ? "LogicalExpression" : "BinaryExpression"); - return this.parseExprOp(node, leftStartPos, leftStartLoc, minPrec, noIn); - } - } - return left; -}; - -// Parse unary operators, both prefix and postfix. - -pp.parseMaybeUnary = function (refDestructuringErrors) { - if (this.type.prefix) { - var node = this.startNode(), - update = this.type === _tokentype.types.incDec; - node.operator = this.value; - node.prefix = true; - this.next(); - node.argument = this.parseMaybeUnary(); - this.checkExpressionErrors(refDestructuringErrors, true); - if (update) this.checkLVal(node.argument);else if (this.strict && node.operator === "delete" && node.argument.type === "Identifier") this.raise(node.start, "Deleting local variable in strict mode"); - return this.finishNode(node, update ? "UpdateExpression" : "UnaryExpression"); - } - var startPos = this.start, - startLoc = this.startLoc; - var expr = this.parseExprSubscripts(refDestructuringErrors); - if (this.checkExpressionErrors(refDestructuringErrors)) return expr; - while (this.type.postfix && !this.canInsertSemicolon()) { - var node = this.startNodeAt(startPos, startLoc); - node.operator = this.value; - node.prefix = false; - node.argument = expr; - this.checkLVal(expr); - this.next(); - expr = this.finishNode(node, "UpdateExpression"); - } - return expr; -}; - -// Parse call, dot, and `[]`-subscript expressions. - -pp.parseExprSubscripts = function (refDestructuringErrors) { - var startPos = this.start, - startLoc = this.startLoc; - var expr = this.parseExprAtom(refDestructuringErrors); - var skipArrowSubscripts = expr.type === "ArrowFunctionExpression" && this.input.slice(this.lastTokStart, this.lastTokEnd) !== ")"; - if (this.checkExpressionErrors(refDestructuringErrors) || skipArrowSubscripts) return expr; - return this.parseSubscripts(expr, startPos, startLoc); -}; - -pp.parseSubscripts = function (base, startPos, startLoc, noCalls) { - for (;;) { - if (this.eat(_tokentype.types.dot)) { - var node = this.startNodeAt(startPos, startLoc); - node.object = base; - node.property = this.parseIdent(true); - node.computed = false; - base = this.finishNode(node, "MemberExpression"); - } else if (this.eat(_tokentype.types.bracketL)) { - var node = this.startNodeAt(startPos, startLoc); - node.object = base; - node.property = this.parseExpression(); - node.computed = true; - this.expect(_tokentype.types.bracketR); - base = this.finishNode(node, "MemberExpression"); - } else if (!noCalls && this.eat(_tokentype.types.parenL)) { - var node = this.startNodeAt(startPos, startLoc); - node.callee = base; - node.arguments = this.parseExprList(_tokentype.types.parenR, false); - base = this.finishNode(node, "CallExpression"); - } else if (this.type === _tokentype.types.backQuote) { - var node = this.startNodeAt(startPos, startLoc); - node.tag = base; - node.quasi = this.parseTemplate(); - base = this.finishNode(node, "TaggedTemplateExpression"); - } else { - return base; - } - } -}; - -// Parse an atomic expression — either a single token that is an -// expression, an expression started by a keyword like `function` or -// `new`, or an expression wrapped in punctuation like `()`, `[]`, -// or `{}`. - -pp.parseExprAtom = function (refDestructuringErrors) { - var node = undefined, - canBeArrow = this.potentialArrowAt == this.start; - switch (this.type) { - case _tokentype.types._super: - if (!this.inFunction) this.raise(this.start, "'super' outside of function or class"); - case _tokentype.types._this: - var type = this.type === _tokentype.types._this ? "ThisExpression" : "Super"; - node = this.startNode(); - this.next(); - return this.finishNode(node, type); - - case _tokentype.types._yield: - if (this.inGenerator) this.unexpected(); - - case _tokentype.types.name: - var startPos = this.start, - startLoc = this.startLoc; - var id = this.parseIdent(this.type !== _tokentype.types.name); - if (canBeArrow && !this.canInsertSemicolon() && this.eat(_tokentype.types.arrow)) return this.parseArrowExpression(this.startNodeAt(startPos, startLoc), [id]); - return id; - - case _tokentype.types.regexp: - var value = this.value; - node = this.parseLiteral(value.value); - node.regex = { pattern: value.pattern, flags: value.flags }; - return node; - - case _tokentype.types.num:case _tokentype.types.string: - return this.parseLiteral(this.value); - - case _tokentype.types._null:case _tokentype.types._true:case _tokentype.types._false: - node = this.startNode(); - node.value = this.type === _tokentype.types._null ? null : this.type === _tokentype.types._true; - node.raw = this.type.keyword; - this.next(); - return this.finishNode(node, "Literal"); - - case _tokentype.types.parenL: - return this.parseParenAndDistinguishExpression(canBeArrow); - - case _tokentype.types.bracketL: - node = this.startNode(); - this.next(); - // check whether this is array comprehension or regular array - if (this.options.ecmaVersion >= 7 && this.type === _tokentype.types._for) { - return this.parseComprehension(node, false); - } - node.elements = this.parseExprList(_tokentype.types.bracketR, true, true, refDestructuringErrors); - return this.finishNode(node, "ArrayExpression"); - - case _tokentype.types.braceL: - return this.parseObj(false, refDestructuringErrors); - - case _tokentype.types._function: - node = this.startNode(); - this.next(); - return this.parseFunction(node, false); - - case _tokentype.types._class: - return this.parseClass(this.startNode(), false); - - case _tokentype.types._new: - return this.parseNew(); - - case _tokentype.types.backQuote: - return this.parseTemplate(); - - default: - this.unexpected(); - } -}; - -pp.parseLiteral = function (value) { - var node = this.startNode(); - node.value = value; - node.raw = this.input.slice(this.start, this.end); - this.next(); - return this.finishNode(node, "Literal"); -}; - -pp.parseParenExpression = function () { - this.expect(_tokentype.types.parenL); - var val = this.parseExpression(); - this.expect(_tokentype.types.parenR); - return val; -}; - -pp.parseParenAndDistinguishExpression = function (canBeArrow) { - var startPos = this.start, - startLoc = this.startLoc, - val = undefined; - if (this.options.ecmaVersion >= 6) { - this.next(); - - if (this.options.ecmaVersion >= 7 && this.type === _tokentype.types._for) { - return this.parseComprehension(this.startNodeAt(startPos, startLoc), true); - } - - var innerStartPos = this.start, - innerStartLoc = this.startLoc; - var exprList = [], - first = true; - var refDestructuringErrors = { shorthandAssign: 0, trailingComma: 0 }, - spreadStart = undefined, - innerParenStart = undefined; - while (this.type !== _tokentype.types.parenR) { - first ? first = false : this.expect(_tokentype.types.comma); - if (this.type === _tokentype.types.ellipsis) { - spreadStart = this.start; - exprList.push(this.parseParenItem(this.parseRest())); - break; - } else { - if (this.type === _tokentype.types.parenL && !innerParenStart) { - innerParenStart = this.start; - } - exprList.push(this.parseMaybeAssign(false, refDestructuringErrors, this.parseParenItem)); - } - } - var innerEndPos = this.start, - innerEndLoc = this.startLoc; - this.expect(_tokentype.types.parenR); - - if (canBeArrow && !this.canInsertSemicolon() && this.eat(_tokentype.types.arrow)) { - this.checkPatternErrors(refDestructuringErrors, true); - if (innerParenStart) this.unexpected(innerParenStart); - return this.parseParenArrowList(startPos, startLoc, exprList); - } - - if (!exprList.length) this.unexpected(this.lastTokStart); - if (spreadStart) this.unexpected(spreadStart); - this.checkExpressionErrors(refDestructuringErrors, true); - - if (exprList.length > 1) { - val = this.startNodeAt(innerStartPos, innerStartLoc); - val.expressions = exprList; - this.finishNodeAt(val, "SequenceExpression", innerEndPos, innerEndLoc); - } else { - val = exprList[0]; - } - } else { - val = this.parseParenExpression(); - } - - if (this.options.preserveParens) { - var par = this.startNodeAt(startPos, startLoc); - par.expression = val; - return this.finishNode(par, "ParenthesizedExpression"); - } else { - return val; - } -}; - -pp.parseParenItem = function (item) { - return item; -}; - -pp.parseParenArrowList = function (startPos, startLoc, exprList) { - return this.parseArrowExpression(this.startNodeAt(startPos, startLoc), exprList); -}; - -// New's precedence is slightly tricky. It must allow its argument to -// be a `[]` or dot subscript expression, but not a call — at least, -// not without wrapping it in parentheses. Thus, it uses the noCalls -// argument to parseSubscripts to prevent it from consuming the -// argument list. - -var empty = []; - -pp.parseNew = function () { - var node = this.startNode(); - var meta = this.parseIdent(true); - if (this.options.ecmaVersion >= 6 && this.eat(_tokentype.types.dot)) { - node.meta = meta; - node.property = this.parseIdent(true); - if (node.property.name !== "target") this.raise(node.property.start, "The only valid meta property for new is new.target"); - if (!this.inFunction) this.raise(node.start, "new.target can only be used in functions"); - return this.finishNode(node, "MetaProperty"); - } - var startPos = this.start, - startLoc = this.startLoc; - node.callee = this.parseSubscripts(this.parseExprAtom(), startPos, startLoc, true); - if (this.eat(_tokentype.types.parenL)) node.arguments = this.parseExprList(_tokentype.types.parenR, false);else node.arguments = empty; - return this.finishNode(node, "NewExpression"); -}; - -// Parse template expression. - -pp.parseTemplateElement = function () { - var elem = this.startNode(); - elem.value = { - raw: this.input.slice(this.start, this.end).replace(/\r\n?/g, '\n'), - cooked: this.value - }; - this.next(); - elem.tail = this.type === _tokentype.types.backQuote; - return this.finishNode(elem, "TemplateElement"); -}; - -pp.parseTemplate = function () { - var node = this.startNode(); - this.next(); - node.expressions = []; - var curElt = this.parseTemplateElement(); - node.quasis = [curElt]; - while (!curElt.tail) { - this.expect(_tokentype.types.dollarBraceL); - node.expressions.push(this.parseExpression()); - this.expect(_tokentype.types.braceR); - node.quasis.push(curElt = this.parseTemplateElement()); - } - this.next(); - return this.finishNode(node, "TemplateLiteral"); -}; - -// Parse an object literal or binding pattern. - -pp.parseObj = function (isPattern, refDestructuringErrors) { - var node = this.startNode(), - first = true, - propHash = {}; - node.properties = []; - this.next(); - while (!this.eat(_tokentype.types.braceR)) { - if (!first) { - this.expect(_tokentype.types.comma); - if (this.afterTrailingComma(_tokentype.types.braceR)) break; - } else first = false; - - var prop = this.startNode(), - isGenerator = undefined, - startPos = undefined, - startLoc = undefined; - if (this.options.ecmaVersion >= 6) { - prop.method = false; - prop.shorthand = false; - if (isPattern || refDestructuringErrors) { - startPos = this.start; - startLoc = this.startLoc; - } - if (!isPattern) isGenerator = this.eat(_tokentype.types.star); - } - this.parsePropertyName(prop); - this.parsePropertyValue(prop, isPattern, isGenerator, startPos, startLoc, refDestructuringErrors); - this.checkPropClash(prop, propHash); - node.properties.push(this.finishNode(prop, "Property")); - } - return this.finishNode(node, isPattern ? "ObjectPattern" : "ObjectExpression"); -}; - -pp.parsePropertyValue = function (prop, isPattern, isGenerator, startPos, startLoc, refDestructuringErrors) { - if (this.eat(_tokentype.types.colon)) { - prop.value = isPattern ? this.parseMaybeDefault(this.start, this.startLoc) : this.parseMaybeAssign(false, refDestructuringErrors); - prop.kind = "init"; - } else if (this.options.ecmaVersion >= 6 && this.type === _tokentype.types.parenL) { - if (isPattern) this.unexpected(); - prop.kind = "init"; - prop.method = true; - prop.value = this.parseMethod(isGenerator); - } else if (this.options.ecmaVersion >= 5 && !prop.computed && prop.key.type === "Identifier" && (prop.key.name === "get" || prop.key.name === "set") && (this.type != _tokentype.types.comma && this.type != _tokentype.types.braceR)) { - if (isGenerator || isPattern) this.unexpected(); - prop.kind = prop.key.name; - this.parsePropertyName(prop); - prop.value = this.parseMethod(false); - var paramCount = prop.kind === "get" ? 0 : 1; - if (prop.value.params.length !== paramCount) { - var start = prop.value.start; - if (prop.kind === "get") this.raise(start, "getter should have no params");else this.raise(start, "setter should have exactly one param"); - } - if (prop.kind === "set" && prop.value.params[0].type === "RestElement") this.raise(prop.value.params[0].start, "Setter cannot use rest params"); - } else if (this.options.ecmaVersion >= 6 && !prop.computed && prop.key.type === "Identifier") { - prop.kind = "init"; - if (isPattern) { - if (this.keywords.test(prop.key.name) || (this.strict ? this.reservedWordsStrictBind : this.reservedWords).test(prop.key.name)) this.raise(prop.key.start, "Binding " + prop.key.name); - prop.value = this.parseMaybeDefault(startPos, startLoc, prop.key); - } else if (this.type === _tokentype.types.eq && refDestructuringErrors) { - if (!refDestructuringErrors.shorthandAssign) refDestructuringErrors.shorthandAssign = this.start; - prop.value = this.parseMaybeDefault(startPos, startLoc, prop.key); - } else { - prop.value = prop.key; - } - prop.shorthand = true; - } else this.unexpected(); -}; - -pp.parsePropertyName = function (prop) { - if (this.options.ecmaVersion >= 6) { - if (this.eat(_tokentype.types.bracketL)) { - prop.computed = true; - prop.key = this.parseMaybeAssign(); - this.expect(_tokentype.types.bracketR); - return prop.key; - } else { - prop.computed = false; - } - } - return prop.key = this.type === _tokentype.types.num || this.type === _tokentype.types.string ? this.parseExprAtom() : this.parseIdent(true); -}; - -// Initialize empty function node. - -pp.initFunction = function (node) { - node.id = null; - if (this.options.ecmaVersion >= 6) { - node.generator = false; - node.expression = false; - } -}; - -// Parse object or class method. - -pp.parseMethod = function (isGenerator) { - var node = this.startNode(); - this.initFunction(node); - this.expect(_tokentype.types.parenL); - node.params = this.parseBindingList(_tokentype.types.parenR, false, false); - if (this.options.ecmaVersion >= 6) node.generator = isGenerator; - this.parseFunctionBody(node, false); - return this.finishNode(node, "FunctionExpression"); -}; - -// Parse arrow function expression with given parameters. - -pp.parseArrowExpression = function (node, params) { - this.initFunction(node); - node.params = this.toAssignableList(params, true); - this.parseFunctionBody(node, true); - return this.finishNode(node, "ArrowFunctionExpression"); -}; - -// Parse function body and check parameters. - -pp.parseFunctionBody = function (node, isArrowFunction) { - var isExpression = isArrowFunction && this.type !== _tokentype.types.braceL; - - if (isExpression) { - node.body = this.parseMaybeAssign(); - node.expression = true; - } else { - // Start a new scope with regard to labels and the `inFunction` - // flag (restore them to their old value afterwards). - var oldInFunc = this.inFunction, - oldInGen = this.inGenerator, - oldLabels = this.labels; - this.inFunction = true;this.inGenerator = node.generator;this.labels = []; - node.body = this.parseBlock(true); - node.expression = false; - this.inFunction = oldInFunc;this.inGenerator = oldInGen;this.labels = oldLabels; - } - - // If this is a strict mode function, verify that argument names - // are not repeated, and it does not try to bind the words `eval` - // or `arguments`. - if (this.strict || !isExpression && node.body.body.length && this.isUseStrict(node.body.body[0])) { - var oldStrict = this.strict; - this.strict = true; - if (node.id) this.checkLVal(node.id, true); - this.checkParams(node); - this.strict = oldStrict; - } else if (isArrowFunction) { - this.checkParams(node); - } -}; - -// Checks function params for various disallowed patterns such as using "eval" -// or "arguments" and duplicate parameters. - -pp.checkParams = function (node) { - var nameHash = {}; - for (var i = 0; i < node.params.length; i++) { - this.checkLVal(node.params[i], true, nameHash); - } -}; - -// Parses a comma-separated list of expressions, and returns them as -// an array. `close` is the token type that ends the list, and -// `allowEmpty` can be turned on to allow subsequent commas with -// nothing in between them to be parsed as `null` (which is needed -// for array literals). - -pp.parseExprList = function (close, allowTrailingComma, allowEmpty, refDestructuringErrors) { - var elts = [], - first = true; - while (!this.eat(close)) { - if (!first) { - this.expect(_tokentype.types.comma); - if (this.type === close && refDestructuringErrors && !refDestructuringErrors.trailingComma) { - refDestructuringErrors.trailingComma = this.lastTokStart; - } - if (allowTrailingComma && this.afterTrailingComma(close)) break; - } else first = false; - - var elt = undefined; - if (allowEmpty && this.type === _tokentype.types.comma) elt = null;else if (this.type === _tokentype.types.ellipsis) elt = this.parseSpread(refDestructuringErrors);else elt = this.parseMaybeAssign(false, refDestructuringErrors); - elts.push(elt); - } - return elts; -}; - -// Parse the next token as an identifier. If `liberal` is true (used -// when parsing properties), it will also convert keywords into -// identifiers. - -pp.parseIdent = function (liberal) { - var node = this.startNode(); - if (liberal && this.options.allowReserved == "never") liberal = false; - if (this.type === _tokentype.types.name) { - if (!liberal && (this.strict ? this.reservedWordsStrict : this.reservedWords).test(this.value) && (this.options.ecmaVersion >= 6 || this.input.slice(this.start, this.end).indexOf("\\") == -1)) this.raise(this.start, "The keyword '" + this.value + "' is reserved"); - node.name = this.value; - } else if (liberal && this.type.keyword) { - node.name = this.type.keyword; - } else { - this.unexpected(); - } - this.next(); - return this.finishNode(node, "Identifier"); -}; - -// Parses yield expression inside generator. - -pp.parseYield = function () { - var node = this.startNode(); - this.next(); - if (this.type == _tokentype.types.semi || this.canInsertSemicolon() || this.type != _tokentype.types.star && !this.type.startsExpr) { - node.delegate = false; - node.argument = null; - } else { - node.delegate = this.eat(_tokentype.types.star); - node.argument = this.parseMaybeAssign(); - } - return this.finishNode(node, "YieldExpression"); -}; - -// Parses array and generator comprehensions. - -pp.parseComprehension = function (node, isGenerator) { - node.blocks = []; - while (this.type === _tokentype.types._for) { - var block = this.startNode(); - this.next(); - this.expect(_tokentype.types.parenL); - block.left = this.parseBindingAtom(); - this.checkLVal(block.left, true); - this.expectContextual("of"); - block.right = this.parseExpression(); - this.expect(_tokentype.types.parenR); - node.blocks.push(this.finishNode(block, "ComprehensionBlock")); - } - node.filter = this.eat(_tokentype.types._if) ? this.parseParenExpression() : null; - node.body = this.parseExpression(); - this.expect(isGenerator ? _tokentype.types.parenR : _tokentype.types.bracketR); - node.generator = isGenerator; - return this.finishNode(node, "ComprehensionExpression"); -}; - -},{"./state":10,"./tokentype":14}],2:[function(_dereq_,module,exports){ -// This is a trick taken from Esprima. It turns out that, on -// non-Chrome browsers, to check whether a string is in a set, a -// predicate containing a big ugly `switch` statement is faster than -// a regular expression, and on Chrome the two are about on par. -// This function uses `eval` (non-lexical) to produce such a -// predicate from a space-separated string of words. -// -// It starts by sorting the words by length. - -// Reserved word lists for various dialects of the language - -"use strict"; - -exports.__esModule = true; -exports.isIdentifierStart = isIdentifierStart; -exports.isIdentifierChar = isIdentifierChar; -var reservedWords = { - 3: "abstract boolean byte char class double enum export extends final float goto implements import int interface long native package private protected public short static super synchronized throws transient volatile", - 5: "class enum extends super const export import", - 6: "enum", - strict: "implements interface let package private protected public static yield", - strictBind: "eval arguments" -}; - -exports.reservedWords = reservedWords; -// And the keywords - -var ecma5AndLessKeywords = "break case catch continue debugger default do else finally for function if return switch throw try var while with null true false instanceof typeof void delete new in this"; - -var keywords = { - 5: ecma5AndLessKeywords, - 6: ecma5AndLessKeywords + " let const class extends export import yield super" -}; - -exports.keywords = keywords; -// ## Character categories - -// Big ugly regular expressions that match characters in the -// whitespace, identifier, and identifier-start categories. These -// are only applied when a character is found to actually have a -// code point above 128. -// Generated by `bin/generate-identifier-regex.js`. - -var nonASCIIidentifierStartChars = "ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽͿΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԯԱ-Ֆՙա-ևא-תװ-ײؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘࢠ-ࢲऄ-हऽॐक़-ॡॱ-ঀঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-హఽౘౙౠౡಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽೞೠೡೱೲഅ-ഌഎ-ഐഒ-ഺഽൎൠൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะาำเ-ๆກຂຄງຈຊຍດ-ທນ-ຟມ-ຣລວສຫອ-ະາຳຽເ-ໄໆໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿၐ-ၕၚ-ၝၡၥၦၮ-ၰၵ-ႁႎႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏼᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛸᜀ-ᜌᜎ-ᜑᜠ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៗៜᠠ-ᡷᢀ-ᢨᢪᢰ-ᣵᤀ-ᤞᥐ-ᥭᥰ-ᥴᦀ-ᦫᧁ-ᧇᨀ-ᨖᨠ-ᩔᪧᬅ-ᬳᭅ-ᭋᮃ-ᮠᮮᮯᮺ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᳩ-ᳬᳮ-ᳱᳵᳶᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕ℘-ℝℤΩℨK-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-Ⱞⰰ-ⱞⱠ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞ々-〇〡-〩〱-〵〸-〼ぁ-ゖ゛-ゟァ-ヺー-ヿㄅ-ㄭㄱ-ㆎㆠ-ㆺㇰ-ㇿ㐀-䶵一-鿌ꀀ-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚝꚠ-ꛯꜗ-ꜟꜢ-ꞈꞋ-ꞎꞐ-ꞭꞰꞱꟷ-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꧠ-ꧤꧦ-ꧯꧺ-ꧾꨀ-ꨨꩀ-ꩂꩄ-ꩋꩠ-ꩶꩺꩾ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛ-ꫝꫠ-ꫪꫲ-ꫴꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꬰ-ꭚꭜ-ꭟꭤꭥꯀ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA-Za-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ"; -var nonASCIIidentifierChars = "‌‍·̀-ͯ·҃-֑҇-ׇֽֿׁׂׅׄؐ-ًؚ-٩ٰۖ-ۜ۟-۪ۤۧۨ-ۭ۰-۹ܑܰ-݊ަ-ް߀-߉߫-߳ࠖ-࠙ࠛ-ࠣࠥ-ࠧࠩ-࡙࠭-࡛ࣤ-ःऺ-़ा-ॏ॑-ॗॢॣ०-९ঁ-ঃ়া-ৄেৈো-্ৗৢৣ০-৯ਁ-ਃ਼ਾ-ੂੇੈੋ-੍ੑ੦-ੱੵઁ-ઃ઼ા-ૅે-ૉો-્ૢૣ૦-૯ଁ-ଃ଼ା-ୄେୈୋ-୍ୖୗୢୣ୦-୯ஂா-ூெ-ைொ-்ௗ௦-௯ఀ-ఃా-ౄె-ైొ-్ౕౖౢౣ౦-౯ಁ-ಃ಼ಾ-ೄೆ-ೈೊ-್ೕೖೢೣ೦-೯ഁ-ഃാ-ൄെ-ൈൊ-്ൗൢൣ൦-൯ංඃ්ා-ුූෘ-ෟ෦-෯ෲෳัิ-ฺ็-๎๐-๙ັິ-ູົຼ່-ໍ໐-໙༘༙༠-༩༹༵༷༾༿ཱ-྄྆྇ྍ-ྗྙ-ྼ࿆ါ-ှ၀-၉ၖ-ၙၞ-ၠၢ-ၤၧ-ၭၱ-ၴႂ-ႍႏ-ႝ፝-፟፩-፱ᜒ-᜔ᜲ-᜴ᝒᝓᝲᝳ឴-៓៝០-៩᠋-᠍᠐-᠙ᢩᤠ-ᤫᤰ-᤻᥆-᥏ᦰ-ᧀᧈᧉ᧐-᧚ᨗ-ᨛᩕ-ᩞ᩠-᩿᩼-᪉᪐-᪙᪰-᪽ᬀ-ᬄ᬴-᭄᭐-᭙᭫-᭳ᮀ-ᮂᮡ-ᮭ᮰-᮹᯦-᯳ᰤ-᰷᱀-᱉᱐-᱙᳐-᳔᳒-᳨᳭ᳲ-᳴᳸᳹᷀-᷵᷼-᷿‿⁀⁔⃐-⃥⃜⃡-⃰⳯-⵿⳱ⷠ-〪ⷿ-゙゚〯꘠-꘩꙯ꙴ-꙽ꚟ꛰꛱ꠂ꠆ꠋꠣ-ꠧꢀꢁꢴ-꣄꣐-꣙꣠-꣱꤀-꤉ꤦ-꤭ꥇ-꥓ꦀ-ꦃ꦳-꧀꧐-꧙ꧥ꧰-꧹ꨩ-ꨶꩃꩌꩍ꩐-꩙ꩻ-ꩽꪰꪲ-ꪴꪷꪸꪾ꪿꫁ꫫ-ꫯꫵ꫶ꯣ-ꯪ꯬꯭꯰-꯹ﬞ︀-️︠-︭︳︴﹍-﹏0-9_"; - -var nonASCIIidentifierStart = new RegExp("[" + nonASCIIidentifierStartChars + "]"); -var nonASCIIidentifier = new RegExp("[" + nonASCIIidentifierStartChars + nonASCIIidentifierChars + "]"); - -nonASCIIidentifierStartChars = nonASCIIidentifierChars = null; - -// These are a run-length and offset encoded representation of the -// >0xffff code points that are a valid part of identifiers. The -// offset starts at 0x10000, and each pair of numbers represents an -// offset to the next range, and then a size of the range. They were -// generated by tools/generate-identifier-regex.js -var astralIdentifierStartCodes = [0, 11, 2, 25, 2, 18, 2, 1, 2, 14, 3, 13, 35, 122, 70, 52, 268, 28, 4, 48, 48, 31, 17, 26, 6, 37, 11, 29, 3, 35, 5, 7, 2, 4, 43, 157, 99, 39, 9, 51, 157, 310, 10, 21, 11, 7, 153, 5, 3, 0, 2, 43, 2, 1, 4, 0, 3, 22, 11, 22, 10, 30, 98, 21, 11, 25, 71, 55, 7, 1, 65, 0, 16, 3, 2, 2, 2, 26, 45, 28, 4, 28, 36, 7, 2, 27, 28, 53, 11, 21, 11, 18, 14, 17, 111, 72, 955, 52, 76, 44, 33, 24, 27, 35, 42, 34, 4, 0, 13, 47, 15, 3, 22, 0, 38, 17, 2, 24, 133, 46, 39, 7, 3, 1, 3, 21, 2, 6, 2, 1, 2, 4, 4, 0, 32, 4, 287, 47, 21, 1, 2, 0, 185, 46, 82, 47, 21, 0, 60, 42, 502, 63, 32, 0, 449, 56, 1288, 920, 104, 110, 2962, 1070, 13266, 568, 8, 30, 114, 29, 19, 47, 17, 3, 32, 20, 6, 18, 881, 68, 12, 0, 67, 12, 16481, 1, 3071, 106, 6, 12, 4, 8, 8, 9, 5991, 84, 2, 70, 2, 1, 3, 0, 3, 1, 3, 3, 2, 11, 2, 0, 2, 6, 2, 64, 2, 3, 3, 7, 2, 6, 2, 27, 2, 3, 2, 4, 2, 0, 4, 6, 2, 339, 3, 24, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 7, 4149, 196, 1340, 3, 2, 26, 2, 1, 2, 0, 3, 0, 2, 9, 2, 3, 2, 0, 2, 0, 7, 0, 5, 0, 2, 0, 2, 0, 2, 2, 2, 1, 2, 0, 3, 0, 2, 0, 2, 0, 2, 0, 2, 0, 2, 1, 2, 0, 3, 3, 2, 6, 2, 3, 2, 3, 2, 0, 2, 9, 2, 16, 6, 2, 2, 4, 2, 16, 4421, 42710, 42, 4148, 12, 221, 16355, 541]; -var astralIdentifierCodes = [509, 0, 227, 0, 150, 4, 294, 9, 1368, 2, 2, 1, 6, 3, 41, 2, 5, 0, 166, 1, 1306, 2, 54, 14, 32, 9, 16, 3, 46, 10, 54, 9, 7, 2, 37, 13, 2, 9, 52, 0, 13, 2, 49, 13, 16, 9, 83, 11, 168, 11, 6, 9, 8, 2, 57, 0, 2, 6, 3, 1, 3, 2, 10, 0, 11, 1, 3, 6, 4, 4, 316, 19, 13, 9, 214, 6, 3, 8, 112, 16, 16, 9, 82, 12, 9, 9, 535, 9, 20855, 9, 135, 4, 60, 6, 26, 9, 1016, 45, 17, 3, 19723, 1, 5319, 4, 4, 5, 9, 7, 3, 6, 31, 3, 149, 2, 1418, 49, 4305, 6, 792618, 239]; - -// This has a complexity linear to the value of the code. The -// assumption is that looking up astral identifier characters is -// rare. -function isInAstralSet(code, set) { - var pos = 0x10000; - for (var i = 0; i < set.length; i += 2) { - pos += set[i]; - if (pos > code) return false; - pos += set[i + 1]; - if (pos >= code) return true; - } -} - -// Test whether a given character code starts an identifier. - -function isIdentifierStart(code, astral) { - if (code < 65) return code === 36; - if (code < 91) return true; - if (code < 97) return code === 95; - if (code < 123) return true; - if (code <= 0xffff) return code >= 0xaa && nonASCIIidentifierStart.test(String.fromCharCode(code)); - if (astral === false) return false; - return isInAstralSet(code, astralIdentifierStartCodes); -} - -// Test whether a given character is part of an identifier. - -function isIdentifierChar(code, astral) { - if (code < 48) return code === 36; - if (code < 58) return true; - if (code < 65) return false; - if (code < 91) return true; - if (code < 97) return code === 95; - if (code < 123) return true; - if (code <= 0xffff) return code >= 0xaa && nonASCIIidentifier.test(String.fromCharCode(code)); - if (astral === false) return false; - return isInAstralSet(code, astralIdentifierStartCodes) || isInAstralSet(code, astralIdentifierCodes); -} - -},{}],3:[function(_dereq_,module,exports){ -// Acorn is a tiny, fast JavaScript parser written in JavaScript. -// -// Acorn was written by Marijn Haverbeke, Ingvar Stepanyan, and -// various contributors and released under an MIT license. -// -// Git repositories for Acorn are available at -// -// http://marijnhaverbeke.nl/git/acorn -// https://github.com/ternjs/acorn.git -// -// Please use the [github bug tracker][ghbt] to report issues. -// -// [ghbt]: https://github.com/ternjs/acorn/issues -// -// This file defines the main parser interface. The library also comes -// with a [error-tolerant parser][dammit] and an -// [abstract syntax tree walker][walk], defined in other files. -// -// [dammit]: acorn_loose.js -// [walk]: util/walk.js - -"use strict"; - -exports.__esModule = true; -exports.parse = parse; -exports.parseExpressionAt = parseExpressionAt; -exports.tokenizer = tokenizer; - -var _state = _dereq_("./state"); - -_dereq_("./parseutil"); - -_dereq_("./statement"); - -_dereq_("./lval"); - -_dereq_("./expression"); - -_dereq_("./location"); - -exports.Parser = _state.Parser; -exports.plugins = _state.plugins; - -var _options = _dereq_("./options"); - -exports.defaultOptions = _options.defaultOptions; - -var _locutil = _dereq_("./locutil"); - -exports.Position = _locutil.Position; -exports.SourceLocation = _locutil.SourceLocation; -exports.getLineInfo = _locutil.getLineInfo; - -var _node = _dereq_("./node"); - -exports.Node = _node.Node; - -var _tokentype = _dereq_("./tokentype"); - -exports.TokenType = _tokentype.TokenType; -exports.tokTypes = _tokentype.types; - -var _tokencontext = _dereq_("./tokencontext"); - -exports.TokContext = _tokencontext.TokContext; -exports.tokContexts = _tokencontext.types; - -var _identifier = _dereq_("./identifier"); - -exports.isIdentifierChar = _identifier.isIdentifierChar; -exports.isIdentifierStart = _identifier.isIdentifierStart; - -var _tokenize = _dereq_("./tokenize"); - -exports.Token = _tokenize.Token; - -var _whitespace = _dereq_("./whitespace"); - -exports.isNewLine = _whitespace.isNewLine; -exports.lineBreak = _whitespace.lineBreak; -exports.lineBreakG = _whitespace.lineBreakG; -var version = "2.7.0"; - -exports.version = version; -// The main exported interface (under `self.acorn` when in the -// browser) is a `parse` function that takes a code string and -// returns an abstract syntax tree as specified by [Mozilla parser -// API][api]. -// -// [api]: https://developer.mozilla.org/en-US/docs/SpiderMonkey/Parser_API - -function parse(input, options) { - return new _state.Parser(options, input).parse(); -} - -// This function tries to parse a single expression at a given -// offset in a string. Useful for parsing mixed-language formats -// that embed JavaScript expressions. - -function parseExpressionAt(input, pos, options) { - var p = new _state.Parser(options, input, pos); - p.nextToken(); - return p.parseExpression(); -} - -// Acorn is organized as a tokenizer and a recursive-descent parser. -// The `tokenizer` export provides an interface to the tokenizer. - -function tokenizer(input, options) { - return new _state.Parser(options, input); -} - -},{"./expression":1,"./identifier":2,"./location":4,"./locutil":5,"./lval":6,"./node":7,"./options":8,"./parseutil":9,"./state":10,"./statement":11,"./tokencontext":12,"./tokenize":13,"./tokentype":14,"./whitespace":16}],4:[function(_dereq_,module,exports){ -"use strict"; - -var _state = _dereq_("./state"); - -var _locutil = _dereq_("./locutil"); - -var pp = _state.Parser.prototype; - -// This function is used to raise exceptions on parse errors. It -// takes an offset integer (into the current `input`) to indicate -// the location of the error, attaches the position to the end -// of the error message, and then raises a `SyntaxError` with that -// message. - -pp.raise = function (pos, message) { - var loc = _locutil.getLineInfo(this.input, pos); - message += " (" + loc.line + ":" + loc.column + ")"; - var err = new SyntaxError(message); - err.pos = pos;err.loc = loc;err.raisedAt = this.pos; - throw err; -}; - -pp.curPosition = function () { - if (this.options.locations) { - return new _locutil.Position(this.curLine, this.pos - this.lineStart); - } -}; - -},{"./locutil":5,"./state":10}],5:[function(_dereq_,module,exports){ -"use strict"; - -exports.__esModule = true; -exports.getLineInfo = getLineInfo; - -function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } - -var _whitespace = _dereq_("./whitespace"); - -// These are used when `options.locations` is on, for the -// `startLoc` and `endLoc` properties. - -var Position = (function () { - function Position(line, col) { - _classCallCheck(this, Position); - - this.line = line; - this.column = col; - } - - Position.prototype.offset = function offset(n) { - return new Position(this.line, this.column + n); - }; - - return Position; -})(); - -exports.Position = Position; - -var SourceLocation = function SourceLocation(p, start, end) { - _classCallCheck(this, SourceLocation); - - this.start = start; - this.end = end; - if (p.sourceFile !== null) this.source = p.sourceFile; -} - -// The `getLineInfo` function is mostly useful when the -// `locations` option is off (for performance reasons) and you -// want to find the line/column position for a given character -// offset. `input` should be the code string that the offset refers -// into. - -; - -exports.SourceLocation = SourceLocation; - -function getLineInfo(input, offset) { - for (var line = 1, cur = 0;;) { - _whitespace.lineBreakG.lastIndex = cur; - var match = _whitespace.lineBreakG.exec(input); - if (match && match.index < offset) { - ++line; - cur = match.index + match[0].length; - } else { - return new Position(line, offset - cur); - } - } -} - -},{"./whitespace":16}],6:[function(_dereq_,module,exports){ -"use strict"; - -var _tokentype = _dereq_("./tokentype"); - -var _state = _dereq_("./state"); - -var _util = _dereq_("./util"); - -var pp = _state.Parser.prototype; - -// Convert existing expression atom to assignable pattern -// if possible. - -pp.toAssignable = function (node, isBinding) { - if (this.options.ecmaVersion >= 6 && node) { - switch (node.type) { - case "Identifier": - case "ObjectPattern": - case "ArrayPattern": - break; - - case "ObjectExpression": - node.type = "ObjectPattern"; - for (var i = 0; i < node.properties.length; i++) { - var prop = node.properties[i]; - if (prop.kind !== "init") this.raise(prop.key.start, "Object pattern can't contain getter or setter"); - this.toAssignable(prop.value, isBinding); - } - break; - - case "ArrayExpression": - node.type = "ArrayPattern"; - this.toAssignableList(node.elements, isBinding); - break; - - case "AssignmentExpression": - if (node.operator === "=") { - node.type = "AssignmentPattern"; - delete node.operator; - // falls through to AssignmentPattern - } else { - this.raise(node.left.end, "Only '=' operator can be used for specifying default value."); - break; - } - - case "AssignmentPattern": - if (node.right.type === "YieldExpression") this.raise(node.right.start, "Yield expression cannot be a default value"); - break; - - case "ParenthesizedExpression": - node.expression = this.toAssignable(node.expression, isBinding); - break; - - case "MemberExpression": - if (!isBinding) break; - - default: - this.raise(node.start, "Assigning to rvalue"); - } - } - return node; -}; - -// Convert list of expression atoms to binding list. - -pp.toAssignableList = function (exprList, isBinding) { - var end = exprList.length; - if (end) { - var last = exprList[end - 1]; - if (last && last.type == "RestElement") { - --end; - } else if (last && last.type == "SpreadElement") { - last.type = "RestElement"; - var arg = last.argument; - this.toAssignable(arg, isBinding); - if (arg.type !== "Identifier" && arg.type !== "MemberExpression" && arg.type !== "ArrayPattern") this.unexpected(arg.start); - --end; - } - - if (isBinding && last.type === "RestElement" && last.argument.type !== "Identifier") this.unexpected(last.argument.start); - } - for (var i = 0; i < end; i++) { - var elt = exprList[i]; - if (elt) this.toAssignable(elt, isBinding); - } - return exprList; -}; - -// Parses spread element. - -pp.parseSpread = function (refDestructuringErrors) { - var node = this.startNode(); - this.next(); - node.argument = this.parseMaybeAssign(refDestructuringErrors); - return this.finishNode(node, "SpreadElement"); -}; - -pp.parseRest = function (allowNonIdent) { - var node = this.startNode(); - this.next(); - - // RestElement inside of a function parameter must be an identifier - if (allowNonIdent) node.argument = this.type === _tokentype.types.name ? this.parseIdent() : this.unexpected();else node.argument = this.type === _tokentype.types.name || this.type === _tokentype.types.bracketL ? this.parseBindingAtom() : this.unexpected(); - - return this.finishNode(node, "RestElement"); -}; - -// Parses lvalue (assignable) atom. - -pp.parseBindingAtom = function () { - if (this.options.ecmaVersion < 6) return this.parseIdent(); - switch (this.type) { - case _tokentype.types.name: - return this.parseIdent(); - - case _tokentype.types.bracketL: - var node = this.startNode(); - this.next(); - node.elements = this.parseBindingList(_tokentype.types.bracketR, true, true); - return this.finishNode(node, "ArrayPattern"); - - case _tokentype.types.braceL: - return this.parseObj(true); - - default: - this.unexpected(); - } -}; - -pp.parseBindingList = function (close, allowEmpty, allowTrailingComma, allowNonIdent) { - var elts = [], - first = true; - while (!this.eat(close)) { - if (first) first = false;else this.expect(_tokentype.types.comma); - if (allowEmpty && this.type === _tokentype.types.comma) { - elts.push(null); - } else if (allowTrailingComma && this.afterTrailingComma(close)) { - break; - } else if (this.type === _tokentype.types.ellipsis) { - var rest = this.parseRest(allowNonIdent); - this.parseBindingListItem(rest); - elts.push(rest); - this.expect(close); - break; - } else { - var elem = this.parseMaybeDefault(this.start, this.startLoc); - this.parseBindingListItem(elem); - elts.push(elem); - } - } - return elts; -}; - -pp.parseBindingListItem = function (param) { - return param; -}; - -// Parses assignment pattern around given atom if possible. - -pp.parseMaybeDefault = function (startPos, startLoc, left) { - left = left || this.parseBindingAtom(); - if (this.options.ecmaVersion < 6 || !this.eat(_tokentype.types.eq)) return left; - var node = this.startNodeAt(startPos, startLoc); - node.left = left; - node.right = this.parseMaybeAssign(); - return this.finishNode(node, "AssignmentPattern"); -}; - -// Verify that a node is an lval — something that can be assigned -// to. - -pp.checkLVal = function (expr, isBinding, checkClashes) { - switch (expr.type) { - case "Identifier": - if (this.strict && this.reservedWordsStrictBind.test(expr.name)) this.raise(expr.start, (isBinding ? "Binding " : "Assigning to ") + expr.name + " in strict mode"); - if (checkClashes) { - if (_util.has(checkClashes, expr.name)) this.raise(expr.start, "Argument name clash"); - checkClashes[expr.name] = true; - } - break; - - case "MemberExpression": - if (isBinding) this.raise(expr.start, (isBinding ? "Binding" : "Assigning to") + " member expression"); - break; - - case "ObjectPattern": - for (var i = 0; i < expr.properties.length; i++) { - this.checkLVal(expr.properties[i].value, isBinding, checkClashes); - }break; - - case "ArrayPattern": - for (var i = 0; i < expr.elements.length; i++) { - var elem = expr.elements[i]; - if (elem) this.checkLVal(elem, isBinding, checkClashes); - } - break; - - case "AssignmentPattern": - this.checkLVal(expr.left, isBinding, checkClashes); - break; - - case "RestElement": - this.checkLVal(expr.argument, isBinding, checkClashes); - break; - - case "ParenthesizedExpression": - this.checkLVal(expr.expression, isBinding, checkClashes); - break; - - default: - this.raise(expr.start, (isBinding ? "Binding" : "Assigning to") + " rvalue"); - } -}; - -},{"./state":10,"./tokentype":14,"./util":15}],7:[function(_dereq_,module,exports){ -"use strict"; - -exports.__esModule = true; - -function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } - -var _state = _dereq_("./state"); - -var _locutil = _dereq_("./locutil"); - -var Node = function Node(parser, pos, loc) { - _classCallCheck(this, Node); - - this.type = ""; - this.start = pos; - this.end = 0; - if (parser.options.locations) this.loc = new _locutil.SourceLocation(parser, loc); - if (parser.options.directSourceFile) this.sourceFile = parser.options.directSourceFile; - if (parser.options.ranges) this.range = [pos, 0]; -} - -// Start an AST node, attaching a start offset. - -; - -exports.Node = Node; -var pp = _state.Parser.prototype; - -pp.startNode = function () { - return new Node(this, this.start, this.startLoc); -}; - -pp.startNodeAt = function (pos, loc) { - return new Node(this, pos, loc); -}; - -// Finish an AST node, adding `type` and `end` properties. - -function finishNodeAt(node, type, pos, loc) { - node.type = type; - node.end = pos; - if (this.options.locations) node.loc.end = loc; - if (this.options.ranges) node.range[1] = pos; - return node; -} - -pp.finishNode = function (node, type) { - return finishNodeAt.call(this, node, type, this.lastTokEnd, this.lastTokEndLoc); -}; - -// Finish node at given position - -pp.finishNodeAt = function (node, type, pos, loc) { - return finishNodeAt.call(this, node, type, pos, loc); -}; - -},{"./locutil":5,"./state":10}],8:[function(_dereq_,module,exports){ -"use strict"; - -exports.__esModule = true; -exports.getOptions = getOptions; - -var _util = _dereq_("./util"); - -var _locutil = _dereq_("./locutil"); - -// A second optional argument can be given to further configure -// the parser process. These options are recognized: - -var defaultOptions = { - // `ecmaVersion` indicates the ECMAScript version to parse. Must - // be either 3, or 5, or 6. This influences support for strict - // mode, the set of reserved words, support for getters and - // setters and other features. - ecmaVersion: 5, - // Source type ("script" or "module") for different semantics - sourceType: "script", - // `onInsertedSemicolon` can be a callback that will be called - // when a semicolon is automatically inserted. It will be passed - // th position of the comma as an offset, and if `locations` is - // enabled, it is given the location as a `{line, column}` object - // as second argument. - onInsertedSemicolon: null, - // `onTrailingComma` is similar to `onInsertedSemicolon`, but for - // trailing commas. - onTrailingComma: null, - // By default, reserved words are only enforced if ecmaVersion >= 5. - // Set `allowReserved` to a boolean value to explicitly turn this on - // an off. When this option has the value "never", reserved words - // and keywords can also not be used as property names. - allowReserved: null, - // When enabled, a return at the top level is not considered an - // error. - allowReturnOutsideFunction: false, - // When enabled, import/export statements are not constrained to - // appearing at the top of the program. - allowImportExportEverywhere: false, - // When enabled, hashbang directive in the beginning of file - // is allowed and treated as a line comment. - allowHashBang: false, - // When `locations` is on, `loc` properties holding objects with - // `start` and `end` properties in `{line, column}` form (with - // line being 1-based and column 0-based) will be attached to the - // nodes. - locations: false, - // A function can be passed as `onToken` option, which will - // cause Acorn to call that function with object in the same - // format as tokens returned from `tokenizer().getToken()`. Note - // that you are not allowed to call the parser from the - // callback—that will corrupt its internal state. - onToken: null, - // A function can be passed as `onComment` option, which will - // cause Acorn to call that function with `(block, text, start, - // end)` parameters whenever a comment is skipped. `block` is a - // boolean indicating whether this is a block (`/* */`) comment, - // `text` is the content of the comment, and `start` and `end` are - // character offsets that denote the start and end of the comment. - // When the `locations` option is on, two more parameters are - // passed, the full `{line, column}` locations of the start and - // end of the comments. Note that you are not allowed to call the - // parser from the callback—that will corrupt its internal state. - onComment: null, - // Nodes have their start and end characters offsets recorded in - // `start` and `end` properties (directly on the node, rather than - // the `loc` object, which holds line/column data. To also add a - // [semi-standardized][range] `range` property holding a `[start, - // end]` array with the same numbers, set the `ranges` option to - // `true`. - // - // [range]: https://bugzilla.mozilla.org/show_bug.cgi?id=745678 - ranges: false, - // It is possible to parse multiple files into a single AST by - // passing the tree produced by parsing the first file as - // `program` option in subsequent parses. This will add the - // toplevel forms of the parsed file to the `Program` (top) node - // of an existing parse tree. - program: null, - // When `locations` is on, you can pass this to record the source - // file in every node's `loc` object. - sourceFile: null, - // This value, if given, is stored in every node, whether - // `locations` is on or off. - directSourceFile: null, - // When enabled, parenthesized expressions are represented by - // (non-standard) ParenthesizedExpression nodes - preserveParens: false, - plugins: {} -}; - -exports.defaultOptions = defaultOptions; -// Interpret and default an options object - -function getOptions(opts) { - var options = {}; - for (var opt in defaultOptions) { - options[opt] = opts && _util.has(opts, opt) ? opts[opt] : defaultOptions[opt]; - }if (options.allowReserved == null) options.allowReserved = options.ecmaVersion < 5; - - if (_util.isArray(options.onToken)) { - (function () { - var tokens = options.onToken; - options.onToken = function (token) { - return tokens.push(token); - }; - })(); - } - if (_util.isArray(options.onComment)) options.onComment = pushComment(options, options.onComment); - - return options; -} - -function pushComment(options, array) { - return function (block, text, start, end, startLoc, endLoc) { - var comment = { - type: block ? 'Block' : 'Line', - value: text, - start: start, - end: end - }; - if (options.locations) comment.loc = new _locutil.SourceLocation(this, startLoc, endLoc); - if (options.ranges) comment.range = [start, end]; - array.push(comment); - }; -} - -},{"./locutil":5,"./util":15}],9:[function(_dereq_,module,exports){ -"use strict"; - -var _tokentype = _dereq_("./tokentype"); - -var _state = _dereq_("./state"); - -var _whitespace = _dereq_("./whitespace"); - -var pp = _state.Parser.prototype; - -// ## Parser utilities - -// Test whether a statement node is the string literal `"use strict"`. - -pp.isUseStrict = function (stmt) { - return this.options.ecmaVersion >= 5 && stmt.type === "ExpressionStatement" && stmt.expression.type === "Literal" && stmt.expression.raw.slice(1, -1) === "use strict"; -}; - -// Predicate that tests whether the next token is of the given -// type, and if yes, consumes it as a side effect. - -pp.eat = function (type) { - if (this.type === type) { - this.next(); - return true; - } else { - return false; - } -}; - -// Tests whether parsed token is a contextual keyword. - -pp.isContextual = function (name) { - return this.type === _tokentype.types.name && this.value === name; -}; - -// Consumes contextual keyword if possible. - -pp.eatContextual = function (name) { - return this.value === name && this.eat(_tokentype.types.name); -}; - -// Asserts that following token is given contextual keyword. - -pp.expectContextual = function (name) { - if (!this.eatContextual(name)) this.unexpected(); -}; - -// Test whether a semicolon can be inserted at the current position. - -pp.canInsertSemicolon = function () { - return this.type === _tokentype.types.eof || this.type === _tokentype.types.braceR || _whitespace.lineBreak.test(this.input.slice(this.lastTokEnd, this.start)); -}; - -pp.insertSemicolon = function () { - if (this.canInsertSemicolon()) { - if (this.options.onInsertedSemicolon) this.options.onInsertedSemicolon(this.lastTokEnd, this.lastTokEndLoc); - return true; - } -}; - -// Consume a semicolon, or, failing that, see if we are allowed to -// pretend that there is a semicolon at this position. - -pp.semicolon = function () { - if (!this.eat(_tokentype.types.semi) && !this.insertSemicolon()) this.unexpected(); -}; - -pp.afterTrailingComma = function (tokType) { - if (this.type == tokType) { - if (this.options.onTrailingComma) this.options.onTrailingComma(this.lastTokStart, this.lastTokStartLoc); - this.next(); - return true; - } -}; - -// Expect a token of a given type. If found, consume it, otherwise, -// raise an unexpected token error. - -pp.expect = function (type) { - this.eat(type) || this.unexpected(); -}; - -// Raise an unexpected token error. - -pp.unexpected = function (pos) { - this.raise(pos != null ? pos : this.start, "Unexpected token"); -}; - -pp.checkPatternErrors = function (refDestructuringErrors, andThrow) { - var pos = refDestructuringErrors && refDestructuringErrors.trailingComma; - if (!andThrow) return !!pos; - if (pos) this.raise(pos, "Trailing comma is not permitted in destructuring patterns"); -}; - -pp.checkExpressionErrors = function (refDestructuringErrors, andThrow) { - var pos = refDestructuringErrors && refDestructuringErrors.shorthandAssign; - if (!andThrow) return !!pos; - if (pos) this.raise(pos, "Shorthand property assignments are valid only in destructuring patterns"); -}; - -},{"./state":10,"./tokentype":14,"./whitespace":16}],10:[function(_dereq_,module,exports){ -"use strict"; - -exports.__esModule = true; - -function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } - -var _identifier = _dereq_("./identifier"); - -var _tokentype = _dereq_("./tokentype"); - -var _whitespace = _dereq_("./whitespace"); - -var _options = _dereq_("./options"); - -// Registered plugins -var plugins = {}; - -exports.plugins = plugins; -function keywordRegexp(words) { - return new RegExp("^(" + words.replace(/ /g, "|") + ")$"); -} - -var Parser = (function () { - function Parser(options, input, startPos) { - _classCallCheck(this, Parser); - - this.options = options = _options.getOptions(options); - this.sourceFile = options.sourceFile; - this.keywords = keywordRegexp(_identifier.keywords[options.ecmaVersion >= 6 ? 6 : 5]); - var reserved = options.allowReserved ? "" : _identifier.reservedWords[options.ecmaVersion] + (options.sourceType == "module" ? " await" : ""); - this.reservedWords = keywordRegexp(reserved); - var reservedStrict = (reserved ? reserved + " " : "") + _identifier.reservedWords.strict; - this.reservedWordsStrict = keywordRegexp(reservedStrict); - this.reservedWordsStrictBind = keywordRegexp(reservedStrict + " " + _identifier.reservedWords.strictBind); - this.input = String(input); - - // Used to signal to callers of `readWord1` whether the word - // contained any escape sequences. This is needed because words with - // escape sequences must not be interpreted as keywords. - this.containsEsc = false; - - // Load plugins - this.loadPlugins(options.plugins); - - // Set up token state - - // The current position of the tokenizer in the input. - if (startPos) { - this.pos = startPos; - this.lineStart = Math.max(0, this.input.lastIndexOf("\n", startPos)); - this.curLine = this.input.slice(0, this.lineStart).split(_whitespace.lineBreak).length; - } else { - this.pos = this.lineStart = 0; - this.curLine = 1; - } - - // Properties of the current token: - // Its type - this.type = _tokentype.types.eof; - // For tokens that include more information than their type, the value - this.value = null; - // Its start and end offset - this.start = this.end = this.pos; - // And, if locations are used, the {line, column} object - // corresponding to those offsets - this.startLoc = this.endLoc = this.curPosition(); - - // Position information for the previous token - this.lastTokEndLoc = this.lastTokStartLoc = null; - this.lastTokStart = this.lastTokEnd = this.pos; - - // The context stack is used to superficially track syntactic - // context to predict whether a regular expression is allowed in a - // given position. - this.context = this.initialContext(); - this.exprAllowed = true; - - // Figure out if it's a module code. - this.strict = this.inModule = options.sourceType === "module"; - - // Used to signify the start of a potential arrow function - this.potentialArrowAt = -1; - - // Flags to track whether we are in a function, a generator. - this.inFunction = this.inGenerator = false; - // Labels in scope. - this.labels = []; - - // If enabled, skip leading hashbang line. - if (this.pos === 0 && options.allowHashBang && this.input.slice(0, 2) === '#!') this.skipLineComment(2); - } - - // DEPRECATED Kept for backwards compatibility until 3.0 in case a plugin uses them - - Parser.prototype.isKeyword = function isKeyword(word) { - return this.keywords.test(word); - }; - - Parser.prototype.isReservedWord = function isReservedWord(word) { - return this.reservedWords.test(word); - }; - - Parser.prototype.extend = function extend(name, f) { - this[name] = f(this[name]); - }; - - Parser.prototype.loadPlugins = function loadPlugins(pluginConfigs) { - for (var _name in pluginConfigs) { - var plugin = plugins[_name]; - if (!plugin) throw new Error("Plugin '" + _name + "' not found"); - plugin(this, pluginConfigs[_name]); - } - }; - - Parser.prototype.parse = function parse() { - var node = this.options.program || this.startNode(); - this.nextToken(); - return this.parseTopLevel(node); - }; - - return Parser; -})(); - -exports.Parser = Parser; - -},{"./identifier":2,"./options":8,"./tokentype":14,"./whitespace":16}],11:[function(_dereq_,module,exports){ -"use strict"; - -var _tokentype = _dereq_("./tokentype"); - -var _state = _dereq_("./state"); - -var _whitespace = _dereq_("./whitespace"); - -var pp = _state.Parser.prototype; - -// ### Statement parsing - -// Parse a program. Initializes the parser, reads any number of -// statements, and wraps them in a Program node. Optionally takes a -// `program` argument. If present, the statements will be appended -// to its body instead of creating a new node. - -pp.parseTopLevel = function (node) { - var first = true; - if (!node.body) node.body = []; - while (this.type !== _tokentype.types.eof) { - var stmt = this.parseStatement(true, true); - node.body.push(stmt); - if (first) { - if (this.isUseStrict(stmt)) this.setStrict(true); - first = false; - } - } - this.next(); - if (this.options.ecmaVersion >= 6) { - node.sourceType = this.options.sourceType; - } - return this.finishNode(node, "Program"); -}; - -var loopLabel = { kind: "loop" }, - switchLabel = { kind: "switch" }; - -// Parse a single statement. -// -// If expecting a statement and finding a slash operator, parse a -// regular expression literal. This is to handle cases like -// `if (foo) /blah/.exec(foo)`, where looking at the previous token -// does not help. - -pp.parseStatement = function (declaration, topLevel) { - var starttype = this.type, - node = this.startNode(); - - // Most types of statements are recognized by the keyword they - // start with. Many are trivial to parse, some require a bit of - // complexity. - - switch (starttype) { - case _tokentype.types._break:case _tokentype.types._continue: - return this.parseBreakContinueStatement(node, starttype.keyword); - case _tokentype.types._debugger: - return this.parseDebuggerStatement(node); - case _tokentype.types._do: - return this.parseDoStatement(node); - case _tokentype.types._for: - return this.parseForStatement(node); - case _tokentype.types._function: - if (!declaration && this.options.ecmaVersion >= 6) this.unexpected(); - return this.parseFunctionStatement(node); - case _tokentype.types._class: - if (!declaration) this.unexpected(); - return this.parseClass(node, true); - case _tokentype.types._if: - return this.parseIfStatement(node); - case _tokentype.types._return: - return this.parseReturnStatement(node); - case _tokentype.types._switch: - return this.parseSwitchStatement(node); - case _tokentype.types._throw: - return this.parseThrowStatement(node); - case _tokentype.types._try: - return this.parseTryStatement(node); - case _tokentype.types._let:case _tokentype.types._const: - if (!declaration) this.unexpected(); // NOTE: falls through to _var - case _tokentype.types._var: - return this.parseVarStatement(node, starttype); - case _tokentype.types._while: - return this.parseWhileStatement(node); - case _tokentype.types._with: - return this.parseWithStatement(node); - case _tokentype.types.braceL: - return this.parseBlock(); - case _tokentype.types.semi: - return this.parseEmptyStatement(node); - case _tokentype.types._export: - case _tokentype.types._import: - if (!this.options.allowImportExportEverywhere) { - if (!topLevel) this.raise(this.start, "'import' and 'export' may only appear at the top level"); - if (!this.inModule) this.raise(this.start, "'import' and 'export' may appear only with 'sourceType: module'"); - } - return starttype === _tokentype.types._import ? this.parseImport(node) : this.parseExport(node); - - // If the statement does not start with a statement keyword or a - // brace, it's an ExpressionStatement or LabeledStatement. We - // simply start parsing an expression, and afterwards, if the - // next token is a colon and the expression was a simple - // Identifier node, we switch to interpreting it as a label. - default: - var maybeName = this.value, - expr = this.parseExpression(); - if (starttype === _tokentype.types.name && expr.type === "Identifier" && this.eat(_tokentype.types.colon)) return this.parseLabeledStatement(node, maybeName, expr);else return this.parseExpressionStatement(node, expr); - } -}; - -pp.parseBreakContinueStatement = function (node, keyword) { - var isBreak = keyword == "break"; - this.next(); - if (this.eat(_tokentype.types.semi) || this.insertSemicolon()) node.label = null;else if (this.type !== _tokentype.types.name) this.unexpected();else { - node.label = this.parseIdent(); - this.semicolon(); - } - - // Verify that there is an actual destination to break or - // continue to. - for (var i = 0; i < this.labels.length; ++i) { - var lab = this.labels[i]; - if (node.label == null || lab.name === node.label.name) { - if (lab.kind != null && (isBreak || lab.kind === "loop")) break; - if (node.label && isBreak) break; - } - } - if (i === this.labels.length) this.raise(node.start, "Unsyntactic " + keyword); - return this.finishNode(node, isBreak ? "BreakStatement" : "ContinueStatement"); -}; - -pp.parseDebuggerStatement = function (node) { - this.next(); - this.semicolon(); - return this.finishNode(node, "DebuggerStatement"); -}; - -pp.parseDoStatement = function (node) { - this.next(); - this.labels.push(loopLabel); - node.body = this.parseStatement(false); - this.labels.pop(); - this.expect(_tokentype.types._while); - node.test = this.parseParenExpression(); - if (this.options.ecmaVersion >= 6) this.eat(_tokentype.types.semi);else this.semicolon(); - return this.finishNode(node, "DoWhileStatement"); -}; - -// Disambiguating between a `for` and a `for`/`in` or `for`/`of` -// loop is non-trivial. Basically, we have to parse the init `var` -// statement or expression, disallowing the `in` operator (see -// the second parameter to `parseExpression`), and then check -// whether the next token is `in` or `of`. When there is no init -// part (semicolon immediately after the opening parenthesis), it -// is a regular `for` loop. - -pp.parseForStatement = function (node) { - this.next(); - this.labels.push(loopLabel); - this.expect(_tokentype.types.parenL); - if (this.type === _tokentype.types.semi) return this.parseFor(node, null); - if (this.type === _tokentype.types._var || this.type === _tokentype.types._let || this.type === _tokentype.types._const) { - var _init = this.startNode(), - varKind = this.type; - this.next(); - this.parseVar(_init, true, varKind); - this.finishNode(_init, "VariableDeclaration"); - if ((this.type === _tokentype.types._in || this.options.ecmaVersion >= 6 && this.isContextual("of")) && _init.declarations.length === 1 && !(varKind !== _tokentype.types._var && _init.declarations[0].init)) return this.parseForIn(node, _init); - return this.parseFor(node, _init); - } - var refDestructuringErrors = { shorthandAssign: 0, trailingComma: 0 }; - var init = this.parseExpression(true, refDestructuringErrors); - if (this.type === _tokentype.types._in || this.options.ecmaVersion >= 6 && this.isContextual("of")) { - this.checkPatternErrors(refDestructuringErrors, true); - this.toAssignable(init); - this.checkLVal(init); - return this.parseForIn(node, init); - } else { - this.checkExpressionErrors(refDestructuringErrors, true); - } - return this.parseFor(node, init); -}; - -pp.parseFunctionStatement = function (node) { - this.next(); - return this.parseFunction(node, true); -}; - -pp.parseIfStatement = function (node) { - this.next(); - node.test = this.parseParenExpression(); - node.consequent = this.parseStatement(false); - node.alternate = this.eat(_tokentype.types._else) ? this.parseStatement(false) : null; - return this.finishNode(node, "IfStatement"); -}; - -pp.parseReturnStatement = function (node) { - if (!this.inFunction && !this.options.allowReturnOutsideFunction) this.raise(this.start, "'return' outside of function"); - this.next(); - - // In `return` (and `break`/`continue`), the keywords with - // optional arguments, we eagerly look for a semicolon or the - // possibility to insert one. - - if (this.eat(_tokentype.types.semi) || this.insertSemicolon()) node.argument = null;else { - node.argument = this.parseExpression();this.semicolon(); - } - return this.finishNode(node, "ReturnStatement"); -}; - -pp.parseSwitchStatement = function (node) { - this.next(); - node.discriminant = this.parseParenExpression(); - node.cases = []; - this.expect(_tokentype.types.braceL); - this.labels.push(switchLabel); - - // Statements under must be grouped (by label) in SwitchCase - // nodes. `cur` is used to keep the node that we are currently - // adding statements to. - - for (var cur, sawDefault = false; this.type != _tokentype.types.braceR;) { - if (this.type === _tokentype.types._case || this.type === _tokentype.types._default) { - var isCase = this.type === _tokentype.types._case; - if (cur) this.finishNode(cur, "SwitchCase"); - node.cases.push(cur = this.startNode()); - cur.consequent = []; - this.next(); - if (isCase) { - cur.test = this.parseExpression(); - } else { - if (sawDefault) this.raise(this.lastTokStart, "Multiple default clauses"); - sawDefault = true; - cur.test = null; - } - this.expect(_tokentype.types.colon); - } else { - if (!cur) this.unexpected(); - cur.consequent.push(this.parseStatement(true)); - } - } - if (cur) this.finishNode(cur, "SwitchCase"); - this.next(); // Closing brace - this.labels.pop(); - return this.finishNode(node, "SwitchStatement"); -}; - -pp.parseThrowStatement = function (node) { - this.next(); - if (_whitespace.lineBreak.test(this.input.slice(this.lastTokEnd, this.start))) this.raise(this.lastTokEnd, "Illegal newline after throw"); - node.argument = this.parseExpression(); - this.semicolon(); - return this.finishNode(node, "ThrowStatement"); -}; - -// Reused empty array added for node fields that are always empty. - -var empty = []; - -pp.parseTryStatement = function (node) { - this.next(); - node.block = this.parseBlock(); - node.handler = null; - if (this.type === _tokentype.types._catch) { - var clause = this.startNode(); - this.next(); - this.expect(_tokentype.types.parenL); - clause.param = this.parseBindingAtom(); - this.checkLVal(clause.param, true); - this.expect(_tokentype.types.parenR); - clause.body = this.parseBlock(); - node.handler = this.finishNode(clause, "CatchClause"); - } - node.finalizer = this.eat(_tokentype.types._finally) ? this.parseBlock() : null; - if (!node.handler && !node.finalizer) this.raise(node.start, "Missing catch or finally clause"); - return this.finishNode(node, "TryStatement"); -}; - -pp.parseVarStatement = function (node, kind) { - this.next(); - this.parseVar(node, false, kind); - this.semicolon(); - return this.finishNode(node, "VariableDeclaration"); -}; - -pp.parseWhileStatement = function (node) { - this.next(); - node.test = this.parseParenExpression(); - this.labels.push(loopLabel); - node.body = this.parseStatement(false); - this.labels.pop(); - return this.finishNode(node, "WhileStatement"); -}; - -pp.parseWithStatement = function (node) { - if (this.strict) this.raise(this.start, "'with' in strict mode"); - this.next(); - node.object = this.parseParenExpression(); - node.body = this.parseStatement(false); - return this.finishNode(node, "WithStatement"); -}; - -pp.parseEmptyStatement = function (node) { - this.next(); - return this.finishNode(node, "EmptyStatement"); -}; - -pp.parseLabeledStatement = function (node, maybeName, expr) { - for (var i = 0; i < this.labels.length; ++i) { - if (this.labels[i].name === maybeName) this.raise(expr.start, "Label '" + maybeName + "' is already declared"); - }var kind = this.type.isLoop ? "loop" : this.type === _tokentype.types._switch ? "switch" : null; - for (var i = this.labels.length - 1; i >= 0; i--) { - var label = this.labels[i]; - if (label.statementStart == node.start) { - label.statementStart = this.start; - label.kind = kind; - } else break; - } - this.labels.push({ name: maybeName, kind: kind, statementStart: this.start }); - node.body = this.parseStatement(true); - this.labels.pop(); - node.label = expr; - return this.finishNode(node, "LabeledStatement"); -}; - -pp.parseExpressionStatement = function (node, expr) { - node.expression = expr; - this.semicolon(); - return this.finishNode(node, "ExpressionStatement"); -}; - -// Parse a semicolon-enclosed block of statements, handling `"use -// strict"` declarations when `allowStrict` is true (used for -// function bodies). - -pp.parseBlock = function (allowStrict) { - var node = this.startNode(), - first = true, - oldStrict = undefined; - node.body = []; - this.expect(_tokentype.types.braceL); - while (!this.eat(_tokentype.types.braceR)) { - var stmt = this.parseStatement(true); - node.body.push(stmt); - if (first && allowStrict && this.isUseStrict(stmt)) { - oldStrict = this.strict; - this.setStrict(this.strict = true); - } - first = false; - } - if (oldStrict === false) this.setStrict(false); - return this.finishNode(node, "BlockStatement"); -}; - -// Parse a regular `for` loop. The disambiguation code in -// `parseStatement` will already have parsed the init statement or -// expression. - -pp.parseFor = function (node, init) { - node.init = init; - this.expect(_tokentype.types.semi); - node.test = this.type === _tokentype.types.semi ? null : this.parseExpression(); - this.expect(_tokentype.types.semi); - node.update = this.type === _tokentype.types.parenR ? null : this.parseExpression(); - this.expect(_tokentype.types.parenR); - node.body = this.parseStatement(false); - this.labels.pop(); - return this.finishNode(node, "ForStatement"); -}; - -// Parse a `for`/`in` and `for`/`of` loop, which are almost -// same from parser's perspective. - -pp.parseForIn = function (node, init) { - var type = this.type === _tokentype.types._in ? "ForInStatement" : "ForOfStatement"; - this.next(); - node.left = init; - node.right = this.parseExpression(); - this.expect(_tokentype.types.parenR); - node.body = this.parseStatement(false); - this.labels.pop(); - return this.finishNode(node, type); -}; - -// Parse a list of variable declarations. - -pp.parseVar = function (node, isFor, kind) { - node.declarations = []; - node.kind = kind.keyword; - for (;;) { - var decl = this.startNode(); - this.parseVarId(decl); - if (this.eat(_tokentype.types.eq)) { - decl.init = this.parseMaybeAssign(isFor); - } else if (kind === _tokentype.types._const && !(this.type === _tokentype.types._in || this.options.ecmaVersion >= 6 && this.isContextual("of"))) { - this.unexpected(); - } else if (decl.id.type != "Identifier" && !(isFor && (this.type === _tokentype.types._in || this.isContextual("of")))) { - this.raise(this.lastTokEnd, "Complex binding patterns require an initialization value"); - } else { - decl.init = null; - } - node.declarations.push(this.finishNode(decl, "VariableDeclarator")); - if (!this.eat(_tokentype.types.comma)) break; - } - return node; -}; - -pp.parseVarId = function (decl) { - decl.id = this.parseBindingAtom(); - this.checkLVal(decl.id, true); -}; - -// Parse a function declaration or literal (depending on the -// `isStatement` parameter). - -pp.parseFunction = function (node, isStatement, allowExpressionBody) { - this.initFunction(node); - if (this.options.ecmaVersion >= 6) node.generator = this.eat(_tokentype.types.star); - if (isStatement || this.type === _tokentype.types.name) node.id = this.parseIdent(); - this.parseFunctionParams(node); - this.parseFunctionBody(node, allowExpressionBody); - return this.finishNode(node, isStatement ? "FunctionDeclaration" : "FunctionExpression"); -}; - -pp.parseFunctionParams = function (node) { - this.expect(_tokentype.types.parenL); - node.params = this.parseBindingList(_tokentype.types.parenR, false, false, true); -}; - -// Parse a class declaration or literal (depending on the -// `isStatement` parameter). - -pp.parseClass = function (node, isStatement) { - this.next(); - this.parseClassId(node, isStatement); - this.parseClassSuper(node); - var classBody = this.startNode(); - var hadConstructor = false; - classBody.body = []; - this.expect(_tokentype.types.braceL); - while (!this.eat(_tokentype.types.braceR)) { - if (this.eat(_tokentype.types.semi)) continue; - var method = this.startNode(); - var isGenerator = this.eat(_tokentype.types.star); - var isMaybeStatic = this.type === _tokentype.types.name && this.value === "static"; - this.parsePropertyName(method); - method["static"] = isMaybeStatic && this.type !== _tokentype.types.parenL; - if (method["static"]) { - if (isGenerator) this.unexpected(); - isGenerator = this.eat(_tokentype.types.star); - this.parsePropertyName(method); - } - method.kind = "method"; - var isGetSet = false; - if (!method.computed) { - var key = method.key; - - if (!isGenerator && key.type === "Identifier" && this.type !== _tokentype.types.parenL && (key.name === "get" || key.name === "set")) { - isGetSet = true; - method.kind = key.name; - key = this.parsePropertyName(method); - } - if (!method["static"] && (key.type === "Identifier" && key.name === "constructor" || key.type === "Literal" && key.value === "constructor")) { - if (hadConstructor) this.raise(key.start, "Duplicate constructor in the same class"); - if (isGetSet) this.raise(key.start, "Constructor can't have get/set modifier"); - if (isGenerator) this.raise(key.start, "Constructor can't be a generator"); - method.kind = "constructor"; - hadConstructor = true; - } - } - this.parseClassMethod(classBody, method, isGenerator); - if (isGetSet) { - var paramCount = method.kind === "get" ? 0 : 1; - if (method.value.params.length !== paramCount) { - var start = method.value.start; - if (method.kind === "get") this.raise(start, "getter should have no params");else this.raise(start, "setter should have exactly one param"); - } - if (method.kind === "set" && method.value.params[0].type === "RestElement") this.raise(method.value.params[0].start, "Setter cannot use rest params"); - } - } - node.body = this.finishNode(classBody, "ClassBody"); - return this.finishNode(node, isStatement ? "ClassDeclaration" : "ClassExpression"); -}; - -pp.parseClassMethod = function (classBody, method, isGenerator) { - method.value = this.parseMethod(isGenerator); - classBody.body.push(this.finishNode(method, "MethodDefinition")); -}; - -pp.parseClassId = function (node, isStatement) { - node.id = this.type === _tokentype.types.name ? this.parseIdent() : isStatement ? this.unexpected() : null; -}; - -pp.parseClassSuper = function (node) { - node.superClass = this.eat(_tokentype.types._extends) ? this.parseExprSubscripts() : null; -}; - -// Parses module export declaration. - -pp.parseExport = function (node) { - this.next(); - // export * from '...' - if (this.eat(_tokentype.types.star)) { - this.expectContextual("from"); - node.source = this.type === _tokentype.types.string ? this.parseExprAtom() : this.unexpected(); - this.semicolon(); - return this.finishNode(node, "ExportAllDeclaration"); - } - if (this.eat(_tokentype.types._default)) { - // export default ... - var expr = this.parseMaybeAssign(); - var needsSemi = true; - if (expr.type == "FunctionExpression" || expr.type == "ClassExpression") { - needsSemi = false; - if (expr.id) { - expr.type = expr.type == "FunctionExpression" ? "FunctionDeclaration" : "ClassDeclaration"; - } - } - node.declaration = expr; - if (needsSemi) this.semicolon(); - return this.finishNode(node, "ExportDefaultDeclaration"); - } - // export var|const|let|function|class ... - if (this.shouldParseExportStatement()) { - node.declaration = this.parseStatement(true); - node.specifiers = []; - node.source = null; - } else { - // export { x, y as z } [from '...'] - node.declaration = null; - node.specifiers = this.parseExportSpecifiers(); - if (this.eatContextual("from")) { - node.source = this.type === _tokentype.types.string ? this.parseExprAtom() : this.unexpected(); - } else { - // check for keywords used as local names - for (var i = 0; i < node.specifiers.length; i++) { - if (this.keywords.test(node.specifiers[i].local.name) || this.reservedWords.test(node.specifiers[i].local.name)) { - this.unexpected(node.specifiers[i].local.start); - } - } - - node.source = null; - } - this.semicolon(); - } - return this.finishNode(node, "ExportNamedDeclaration"); -}; - -pp.shouldParseExportStatement = function () { - return this.type.keyword; -}; - -// Parses a comma-separated list of module exports. - -pp.parseExportSpecifiers = function () { - var nodes = [], - first = true; - // export { x, y as z } [from '...'] - this.expect(_tokentype.types.braceL); - while (!this.eat(_tokentype.types.braceR)) { - if (!first) { - this.expect(_tokentype.types.comma); - if (this.afterTrailingComma(_tokentype.types.braceR)) break; - } else first = false; - - var node = this.startNode(); - node.local = this.parseIdent(this.type === _tokentype.types._default); - node.exported = this.eatContextual("as") ? this.parseIdent(true) : node.local; - nodes.push(this.finishNode(node, "ExportSpecifier")); - } - return nodes; -}; - -// Parses import declaration. - -pp.parseImport = function (node) { - this.next(); - // import '...' - if (this.type === _tokentype.types.string) { - node.specifiers = empty; - node.source = this.parseExprAtom(); - } else { - node.specifiers = this.parseImportSpecifiers(); - this.expectContextual("from"); - node.source = this.type === _tokentype.types.string ? this.parseExprAtom() : this.unexpected(); - } - this.semicolon(); - return this.finishNode(node, "ImportDeclaration"); -}; - -// Parses a comma-separated list of module imports. - -pp.parseImportSpecifiers = function () { - var nodes = [], - first = true; - if (this.type === _tokentype.types.name) { - // import defaultObj, { x, y as z } from '...' - var node = this.startNode(); - node.local = this.parseIdent(); - this.checkLVal(node.local, true); - nodes.push(this.finishNode(node, "ImportDefaultSpecifier")); - if (!this.eat(_tokentype.types.comma)) return nodes; - } - if (this.type === _tokentype.types.star) { - var node = this.startNode(); - this.next(); - this.expectContextual("as"); - node.local = this.parseIdent(); - this.checkLVal(node.local, true); - nodes.push(this.finishNode(node, "ImportNamespaceSpecifier")); - return nodes; - } - this.expect(_tokentype.types.braceL); - while (!this.eat(_tokentype.types.braceR)) { - if (!first) { - this.expect(_tokentype.types.comma); - if (this.afterTrailingComma(_tokentype.types.braceR)) break; - } else first = false; - - var node = this.startNode(); - node.imported = this.parseIdent(true); - if (this.eatContextual("as")) { - node.local = this.parseIdent(); - } else { - node.local = node.imported; - if (this.isKeyword(node.local.name)) this.unexpected(node.local.start); - if (this.reservedWordsStrict.test(node.local.name)) this.raise(node.local.start, "The keyword '" + node.local.name + "' is reserved"); - } - this.checkLVal(node.local, true); - nodes.push(this.finishNode(node, "ImportSpecifier")); - } - return nodes; -}; - -},{"./state":10,"./tokentype":14,"./whitespace":16}],12:[function(_dereq_,module,exports){ -// The algorithm used to determine whether a regexp can appear at a -// given point in the program is loosely based on sweet.js' approach. -// See https://github.com/mozilla/sweet.js/wiki/design - -"use strict"; - -exports.__esModule = true; - -function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } - -var _state = _dereq_("./state"); - -var _tokentype = _dereq_("./tokentype"); - -var _whitespace = _dereq_("./whitespace"); - -var TokContext = function TokContext(token, isExpr, preserveSpace, override) { - _classCallCheck(this, TokContext); - - this.token = token; - this.isExpr = !!isExpr; - this.preserveSpace = !!preserveSpace; - this.override = override; -}; - -exports.TokContext = TokContext; -var types = { - b_stat: new TokContext("{", false), - b_expr: new TokContext("{", true), - b_tmpl: new TokContext("${", true), - p_stat: new TokContext("(", false), - p_expr: new TokContext("(", true), - q_tmpl: new TokContext("`", true, true, function (p) { - return p.readTmplToken(); - }), - f_expr: new TokContext("function", true) -}; - -exports.types = types; -var pp = _state.Parser.prototype; - -pp.initialContext = function () { - return [types.b_stat]; -}; - -pp.braceIsBlock = function (prevType) { - if (prevType === _tokentype.types.colon) { - var _parent = this.curContext(); - if (_parent === types.b_stat || _parent === types.b_expr) return !_parent.isExpr; - } - if (prevType === _tokentype.types._return) return _whitespace.lineBreak.test(this.input.slice(this.lastTokEnd, this.start)); - if (prevType === _tokentype.types._else || prevType === _tokentype.types.semi || prevType === _tokentype.types.eof || prevType === _tokentype.types.parenR) return true; - if (prevType == _tokentype.types.braceL) return this.curContext() === types.b_stat; - return !this.exprAllowed; -}; - -pp.updateContext = function (prevType) { - var update = undefined, - type = this.type; - if (type.keyword && prevType == _tokentype.types.dot) this.exprAllowed = false;else if (update = type.updateContext) update.call(this, prevType);else this.exprAllowed = type.beforeExpr; -}; - -// Token-specific context update code - -_tokentype.types.parenR.updateContext = _tokentype.types.braceR.updateContext = function () { - if (this.context.length == 1) { - this.exprAllowed = true; - return; - } - var out = this.context.pop(); - if (out === types.b_stat && this.curContext() === types.f_expr) { - this.context.pop(); - this.exprAllowed = false; - } else if (out === types.b_tmpl) { - this.exprAllowed = true; - } else { - this.exprAllowed = !out.isExpr; - } -}; - -_tokentype.types.braceL.updateContext = function (prevType) { - this.context.push(this.braceIsBlock(prevType) ? types.b_stat : types.b_expr); - this.exprAllowed = true; -}; - -_tokentype.types.dollarBraceL.updateContext = function () { - this.context.push(types.b_tmpl); - this.exprAllowed = true; -}; - -_tokentype.types.parenL.updateContext = function (prevType) { - var statementParens = prevType === _tokentype.types._if || prevType === _tokentype.types._for || prevType === _tokentype.types._with || prevType === _tokentype.types._while; - this.context.push(statementParens ? types.p_stat : types.p_expr); - this.exprAllowed = true; -}; - -_tokentype.types.incDec.updateContext = function () { - // tokExprAllowed stays unchanged -}; - -_tokentype.types._function.updateContext = function () { - if (this.curContext() !== types.b_stat) this.context.push(types.f_expr); - this.exprAllowed = false; -}; - -_tokentype.types.backQuote.updateContext = function () { - if (this.curContext() === types.q_tmpl) this.context.pop();else this.context.push(types.q_tmpl); - this.exprAllowed = false; -}; - -},{"./state":10,"./tokentype":14,"./whitespace":16}],13:[function(_dereq_,module,exports){ -"use strict"; - -exports.__esModule = true; - -function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } - -var _identifier = _dereq_("./identifier"); - -var _tokentype = _dereq_("./tokentype"); - -var _state = _dereq_("./state"); - -var _locutil = _dereq_("./locutil"); - -var _whitespace = _dereq_("./whitespace"); - -// Object type used to represent tokens. Note that normally, tokens -// simply exist as properties on the parser object. This is only -// used for the onToken callback and the external tokenizer. - -var Token = function Token(p) { - _classCallCheck(this, Token); - - this.type = p.type; - this.value = p.value; - this.start = p.start; - this.end = p.end; - if (p.options.locations) this.loc = new _locutil.SourceLocation(p, p.startLoc, p.endLoc); - if (p.options.ranges) this.range = [p.start, p.end]; -} - -// ## Tokenizer - -; - -exports.Token = Token; -var pp = _state.Parser.prototype; - -// Are we running under Rhino? -var isRhino = typeof Packages == "object" && Object.prototype.toString.call(Packages) == "[object JavaPackage]"; - -// Move to the next token - -pp.next = function () { - if (this.options.onToken) this.options.onToken(new Token(this)); - - this.lastTokEnd = this.end; - this.lastTokStart = this.start; - this.lastTokEndLoc = this.endLoc; - this.lastTokStartLoc = this.startLoc; - this.nextToken(); -}; - -pp.getToken = function () { - this.next(); - return new Token(this); -}; - -// If we're in an ES6 environment, make parsers iterable -if (typeof Symbol !== "undefined") pp[Symbol.iterator] = function () { - var self = this; - return { next: function next() { - var token = self.getToken(); - return { - done: token.type === _tokentype.types.eof, - value: token - }; - } }; -}; - -// Toggle strict mode. Re-reads the next number or string to please -// pedantic tests (`"use strict"; 010;` should fail). - -pp.setStrict = function (strict) { - this.strict = strict; - if (this.type !== _tokentype.types.num && this.type !== _tokentype.types.string) return; - this.pos = this.start; - if (this.options.locations) { - while (this.pos < this.lineStart) { - this.lineStart = this.input.lastIndexOf("\n", this.lineStart - 2) + 1; - --this.curLine; - } - } - this.nextToken(); -}; - -pp.curContext = function () { - return this.context[this.context.length - 1]; -}; - -// Read a single token, updating the parser object's token-related -// properties. - -pp.nextToken = function () { - var curContext = this.curContext(); - if (!curContext || !curContext.preserveSpace) this.skipSpace(); - - this.start = this.pos; - if (this.options.locations) this.startLoc = this.curPosition(); - if (this.pos >= this.input.length) return this.finishToken(_tokentype.types.eof); - - if (curContext.override) return curContext.override(this);else this.readToken(this.fullCharCodeAtPos()); -}; - -pp.readToken = function (code) { - // Identifier or keyword. '\uXXXX' sequences are allowed in - // identifiers, so '\' also dispatches to that. - if (_identifier.isIdentifierStart(code, this.options.ecmaVersion >= 6) || code === 92 /* '\' */) return this.readWord(); - - return this.getTokenFromCode(code); -}; - -pp.fullCharCodeAtPos = function () { - var code = this.input.charCodeAt(this.pos); - if (code <= 0xd7ff || code >= 0xe000) return code; - var next = this.input.charCodeAt(this.pos + 1); - return (code << 10) + next - 0x35fdc00; -}; - -pp.skipBlockComment = function () { - var startLoc = this.options.onComment && this.curPosition(); - var start = this.pos, - end = this.input.indexOf("*/", this.pos += 2); - if (end === -1) this.raise(this.pos - 2, "Unterminated comment"); - this.pos = end + 2; - if (this.options.locations) { - _whitespace.lineBreakG.lastIndex = start; - var match = undefined; - while ((match = _whitespace.lineBreakG.exec(this.input)) && match.index < this.pos) { - ++this.curLine; - this.lineStart = match.index + match[0].length; - } - } - if (this.options.onComment) this.options.onComment(true, this.input.slice(start + 2, end), start, this.pos, startLoc, this.curPosition()); -}; - -pp.skipLineComment = function (startSkip) { - var start = this.pos; - var startLoc = this.options.onComment && this.curPosition(); - var ch = this.input.charCodeAt(this.pos += startSkip); - while (this.pos < this.input.length && ch !== 10 && ch !== 13 && ch !== 8232 && ch !== 8233) { - ++this.pos; - ch = this.input.charCodeAt(this.pos); - } - if (this.options.onComment) this.options.onComment(false, this.input.slice(start + startSkip, this.pos), start, this.pos, startLoc, this.curPosition()); -}; - -// Called at the start of the parse and after every token. Skips -// whitespace and comments, and. - -pp.skipSpace = function () { - loop: while (this.pos < this.input.length) { - var ch = this.input.charCodeAt(this.pos); - switch (ch) { - case 32:case 160: - // ' ' - ++this.pos; - break; - case 13: - if (this.input.charCodeAt(this.pos + 1) === 10) { - ++this.pos; - } - case 10:case 8232:case 8233: - ++this.pos; - if (this.options.locations) { - ++this.curLine; - this.lineStart = this.pos; - } - break; - case 47: - // '/' - switch (this.input.charCodeAt(this.pos + 1)) { - case 42: - // '*' - this.skipBlockComment(); - break; - case 47: - this.skipLineComment(2); - break; - default: - break loop; - } - break; - default: - if (ch > 8 && ch < 14 || ch >= 5760 && _whitespace.nonASCIIwhitespace.test(String.fromCharCode(ch))) { - ++this.pos; - } else { - break loop; - } - } - } -}; - -// Called at the end of every token. Sets `end`, `val`, and -// maintains `context` and `exprAllowed`, and skips the space after -// the token, so that the next one's `start` will point at the -// right position. - -pp.finishToken = function (type, val) { - this.end = this.pos; - if (this.options.locations) this.endLoc = this.curPosition(); - var prevType = this.type; - this.type = type; - this.value = val; - - this.updateContext(prevType); -}; - -// ### Token reading - -// This is the function that is called to fetch the next token. It -// is somewhat obscure, because it works in character codes rather -// than characters, and because operator parsing has been inlined -// into it. -// -// All in the name of speed. -// -pp.readToken_dot = function () { - var next = this.input.charCodeAt(this.pos + 1); - if (next >= 48 && next <= 57) return this.readNumber(true); - var next2 = this.input.charCodeAt(this.pos + 2); - if (this.options.ecmaVersion >= 6 && next === 46 && next2 === 46) { - // 46 = dot '.' - this.pos += 3; - return this.finishToken(_tokentype.types.ellipsis); - } else { - ++this.pos; - return this.finishToken(_tokentype.types.dot); - } -}; - -pp.readToken_slash = function () { - // '/' - var next = this.input.charCodeAt(this.pos + 1); - if (this.exprAllowed) { - ++this.pos;return this.readRegexp(); - } - if (next === 61) return this.finishOp(_tokentype.types.assign, 2); - return this.finishOp(_tokentype.types.slash, 1); -}; - -pp.readToken_mult_modulo = function (code) { - // '%*' - var next = this.input.charCodeAt(this.pos + 1); - if (next === 61) return this.finishOp(_tokentype.types.assign, 2); - return this.finishOp(code === 42 ? _tokentype.types.star : _tokentype.types.modulo, 1); -}; - -pp.readToken_pipe_amp = function (code) { - // '|&' - var next = this.input.charCodeAt(this.pos + 1); - if (next === code) return this.finishOp(code === 124 ? _tokentype.types.logicalOR : _tokentype.types.logicalAND, 2); - if (next === 61) return this.finishOp(_tokentype.types.assign, 2); - return this.finishOp(code === 124 ? _tokentype.types.bitwiseOR : _tokentype.types.bitwiseAND, 1); -}; - -pp.readToken_caret = function () { - // '^' - var next = this.input.charCodeAt(this.pos + 1); - if (next === 61) return this.finishOp(_tokentype.types.assign, 2); - return this.finishOp(_tokentype.types.bitwiseXOR, 1); -}; - -pp.readToken_plus_min = function (code) { - // '+-' - var next = this.input.charCodeAt(this.pos + 1); - if (next === code) { - if (next == 45 && this.input.charCodeAt(this.pos + 2) == 62 && _whitespace.lineBreak.test(this.input.slice(this.lastTokEnd, this.pos))) { - // A `-->` line comment - this.skipLineComment(3); - this.skipSpace(); - return this.nextToken(); - } - return this.finishOp(_tokentype.types.incDec, 2); - } - if (next === 61) return this.finishOp(_tokentype.types.assign, 2); - return this.finishOp(_tokentype.types.plusMin, 1); -}; - -pp.readToken_lt_gt = function (code) { - // '<>' - var next = this.input.charCodeAt(this.pos + 1); - var size = 1; - if (next === code) { - size = code === 62 && this.input.charCodeAt(this.pos + 2) === 62 ? 3 : 2; - if (this.input.charCodeAt(this.pos + size) === 61) return this.finishOp(_tokentype.types.assign, size + 1); - return this.finishOp(_tokentype.types.bitShift, size); - } - if (next == 33 && code == 60 && this.input.charCodeAt(this.pos + 2) == 45 && this.input.charCodeAt(this.pos + 3) == 45) { - if (this.inModule) this.unexpected(); - // `` line comment - this.skipLineComment(3) - this.skipSpace() - return this.nextToken() - } - return this.finishOp(tt.incDec, 2) - } - if (next === 61) return this.finishOp(tt.assign, 2) - return this.finishOp(tt.plusMin, 1) -} - -pp.readToken_lt_gt = function(code) { // '<>' - let next = this.input.charCodeAt(this.pos + 1) - let size = 1 - if (next === code) { - size = code === 62 && this.input.charCodeAt(this.pos + 2) === 62 ? 3 : 2 - if (this.input.charCodeAt(this.pos + size) === 61) return this.finishOp(tt.assign, size + 1) - return this.finishOp(tt.bitShift, size) - } - if (next == 33 && code == 60 && this.input.charCodeAt(this.pos + 2) == 45 && - this.input.charCodeAt(this.pos + 3) == 45) { - if (this.inModule) this.unexpected() - // ` - -[![NPM](https://nodei.co/npm/through2.png?compact=true)](https://nodei.co/npm/through2/) - - - -**A tiny wrapper around Node streams.Transform (Streams2) to avoid explicit subclassing noise** - -Inspired by [Dominic Tarr](https://github.com/dominictarr)'s [through](https://github.com/dominictarr/through) in that it's so much easier to make a stream out of a function than it is to set up the prototype chain properly: `through(function (chunk) { ... })`. - -Note: A **Streams3** version of through2 is available in npm with the tag `"1.0"` rather than `"latest"` so an `npm install through2` will get you the current Streams2 version (version number is 0.x.x). To use a Streams3 version use `npm install through2@1` to fetch the latest version 1.x.x. More information about Streams2 vs Streams3 and recommendations [here](http://www.nearform.com/nodecrunch/dont-use-nodes-core-stream-module). - -```js -fs.createReadStream('ex.txt') - .pipe(through2(function (chunk, enc, callback) { - - for (var i = 0; i < chunk.length; i++) - if (chunk[i] == 97) - chunk[i] = 122 // swap 'a' for 'z' - - this.push(chunk) - - callback() - - })) - .pipe(fs.createWriteStream('out.txt')) -``` - -Or object streams: - -```js -var all = [] - -fs.createReadStream('data.csv') - .pipe(csv2()) - .pipe(through2.obj(function (chunk, enc, callback) { - - var data = { - name : chunk[0] - , address : chunk[3] - , phone : chunk[10] - } - - this.push(data) - - callback() - - })) - .on('data', function (data) { - all.push(data) - }) - .on('end', function () { - doSomethingSpecial(all) - }) -``` - -Note that `through2.obj(fn)` is a convenience wrapper around `through2({ objectMode: true }, fn)`. - -## API - -through2([ options, ] [ transformFunction ] [, flushFunction ]) - -Consult the **[stream.Transform](http://nodejs.org/docs/latest/api/stream.html#stream_class_stream_transform)** documentation for the exact rules of the `transformFunction` (i.e. `this._transform`) and the optional `flushFunction` (i.e. `this._flush`). - -### options - -The options argument is optional and is passed straight through to `stream.Transform`. So you can use `objectMode:true` if you are processing non-binary streams (or just use `through2.obj()`). - -The `options` argument is first, unlike standard convention, because if I'm passing in an anonymous function then I'd prefer for the options argument to not get lost at the end of the call: - -```js -fs.createReadStream('/tmp/important.dat') - .pipe(through2({ objectMode: true, allowHalfOpen: false }, function (chunk, enc, cb) { - - this.push(new Buffer('wut?')) - cb() - - }) - .pipe(fs.createWriteStream('/tmp/wut.txt')) -``` - -### transformFunction - -The `transformFunction` must have the following signature: `function (chunk, encoding, callback) {}`. A minimal implementation should call the `callback` function to indicate that the transformation is done, even if that transformation means discarding the chunk. - -To queue a new chunk, call `this.push(chunk)`—this can be called as many times as required before the `callback()` if you have multiple pieces to send on. - -Alternatively, you may use `callback(err, chunk)` as shorthand for emitting a single chunk or an error. - -If you **do not provide a `transformFunction`** then you will get a simple pass-through stream. - -### flushFunction - -The optional `flushFunction` is provided as the last argument (2nd or 3rd, depending on whether you've supplied options) is called just prior to the stream ending. Can be used to finish up any processing that may be in progress. - -through2.ctor([ options, ] transformFunction[, flushFunction ]) - -Instead of returning a `stream.Transform` instance, `through2.ctor()` returns a **constructor** for a custom Transform. This is useful when you want to use the same transform logic in multiple instances. - -```js -var FToC = through2.ctor({objectMode: true}, function (record, encoding, callback) { - if (record.temp != null && record.unit = "F") { - record.temp = ( ( record.temp - 32 ) * 5 ) / 9 - record.unit = "C" - } - this.push(record) - callback() -}) - -// Create instances of FToC like so: -var converter = new FToC() -// Or: -var converter = FToC() -// Or specify/override options when you instantiate, if you prefer: -var converter = FToC({objectMode: true}) -``` - -## See Also - - - [through2-map](https://github.com/brycebaril/through2-map) - Array.prototype.map analog for streams. - - [through2-filter](https://github.com/brycebaril/through2-filter) - Array.prototype.filter analog for streams. - - [through2-reduce](https://github.com/brycebaril/through2-reduce) - Array.prototype.reduce analog for streams. - - [through2-spy](https://github.com/brycebaril/through2-spy) - Wrapper for simple stream.PassThrough spies. - -## License - -**through2** is Copyright (c) 2013 Rod Vagg [@rvagg](https://twitter.com/rvagg) and licenced under the MIT licence. All rights not explicitly granted in the MIT license are reserved. See the included LICENSE file for more details. diff --git a/node_modules/browserify/node_modules/through2/package.json b/node_modules/browserify/node_modules/through2/package.json deleted file mode 100644 index 06e4463c..00000000 --- a/node_modules/browserify/node_modules/through2/package.json +++ /dev/null @@ -1,68 +0,0 @@ -{ - "name": "through2", - "version": "1.1.1", - "description": "A tiny wrapper around Node streams2 Transform to avoid explicit subclassing noise", - "main": "through2.js", - "scripts": { - "test": "node test/test.js", - "test-local": "brtapsauce-local test/basic-test.js" - }, - "repository": { - "type": "git", - "url": "https://github.com/rvagg/through2.git" - }, - "keywords": [ - "stream", - "streams2", - "through", - "transform" - ], - "author": { - "name": "Rod Vagg", - "email": "r@va.gg", - "url": "https://github.com/rvagg" - }, - "license": "MIT", - "dependencies": { - "readable-stream": ">=1.1.13-1 <1.2.0-0", - "xtend": ">=4.0.0 <4.1.0-0" - }, - "devDependencies": { - "bl": ">=0.9.0 <0.10.0-0", - "stream-spigot": ">=3.0.4 <3.1.0-0", - "tape": ">=2.14.0 <2.15.0-0" - }, - "publishConfig": { - "tag": "1.0" - }, - "gitHead": "05618510052dcb4ec970c47c1234e0fcad8566de", - "bugs": { - "url": "https://github.com/rvagg/through2/issues" - }, - "homepage": "https://github.com/rvagg/through2", - "_id": "through2@1.1.1", - "_shasum": "0847cbc4449f3405574dbdccd9bb841b83ac3545", - "_from": "through2@>=1.0.0 <2.0.0", - "_npmVersion": "1.4.21", - "_npmUser": { - "name": "rvagg", - "email": "rod@vagg.org" - }, - "maintainers": [ - { - "name": "rvagg", - "email": "rod@vagg.org" - }, - { - "name": "bryce", - "email": "bryce@ravenwall.com" - } - ], - "dist": { - "shasum": "0847cbc4449f3405574dbdccd9bb841b83ac3545", - "tarball": "https://registry.npmjs.org/through2/-/through2-1.1.1.tgz" - }, - "directories": {}, - "_resolved": "https://registry.npmjs.org/through2/-/through2-1.1.1.tgz", - "readme": "ERROR: No README data found!" -} diff --git a/node_modules/browserify/node_modules/through2/through2.js b/node_modules/browserify/node_modules/through2/through2.js deleted file mode 100644 index 5b7a880e..00000000 --- a/node_modules/browserify/node_modules/through2/through2.js +++ /dev/null @@ -1,96 +0,0 @@ -var Transform = require('readable-stream/transform') - , inherits = require('util').inherits - , xtend = require('xtend') - -function DestroyableTransform(opts) { - Transform.call(this, opts) - this._destroyed = false -} - -inherits(DestroyableTransform, Transform) - -DestroyableTransform.prototype.destroy = function(err) { - if (this._destroyed) return - this._destroyed = true - - var self = this - process.nextTick(function() { - if (err) - self.emit('error', err) - self.emit('close') - }) -} - -// a noop _transform function -function noop (chunk, enc, callback) { - callback(null, chunk) -} - - -// create a new export function, used by both the main export and -// the .ctor export, contains common logic for dealing with arguments -function through2 (construct) { - return function (options, transform, flush) { - if (typeof options == 'function') { - flush = transform - transform = options - options = {} - } - - if (typeof transform != 'function') - transform = noop - - if (typeof flush != 'function') - flush = null - - return construct(options, transform, flush) - } -} - - -// main export, just make me a transform stream! -module.exports = through2(function (options, transform, flush) { - var t2 = new DestroyableTransform(options) - - t2._transform = transform - - if (flush) - t2._flush = flush - - return t2 -}) - - -// make me a reusable prototype that I can `new`, or implicitly `new` -// with a constructor call -module.exports.ctor = through2(function (options, transform, flush) { - function Through2 (override) { - if (!(this instanceof Through2)) - return new Through2(override) - - this.options = xtend(options, override) - - DestroyableTransform.call(this, this.options) - } - - inherits(Through2, DestroyableTransform) - - Through2.prototype._transform = transform - - if (flush) - Through2.prototype._flush = flush - - return Through2 -}) - - -module.exports.obj = through2(function (options, transform, flush) { - var t2 = new DestroyableTransform(xtend({ objectMode: true, highWaterMark: 16 }, options)) - - t2._transform = transform - - if (flush) - t2._flush = flush - - return t2 -}) diff --git a/node_modules/browserify/node_modules/timers-browserify/.npmignore b/node_modules/browserify/node_modules/timers-browserify/.npmignore deleted file mode 100644 index 03e05e4c..00000000 --- a/node_modules/browserify/node_modules/timers-browserify/.npmignore +++ /dev/null @@ -1,2 +0,0 @@ -.DS_Store -/node_modules diff --git a/node_modules/browserify/node_modules/timers-browserify/CHANGELOG.md b/node_modules/browserify/node_modules/timers-browserify/CHANGELOG.md deleted file mode 100644 index a7cd8bc8..00000000 --- a/node_modules/browserify/node_modules/timers-browserify/CHANGELOG.md +++ /dev/null @@ -1,58 +0,0 @@ -# Change Log -All notable changes to this project will be documented in this file. -This project adheres to [Semantic Versioning](http://semver.org/). - -## 1.4.0 - 2015-02-23 - -### Added -* Link to `timers-browserify-full`, which offers a larger, but much more exact, - version of Node's `timers` library - -### Changed -* `setTimeout` and `setInterval` return objects with the same API as the Node - implementation, instead of just IDs - -### Fixed -* `active` implementation actually has an effect, as in Node -* Replaced usages of `apply` that break in IE 8 - -## 1.3.0 - 2015-02-04 - -### Changed -* Prefer native versions of `setImmediate` and `clearImmediate` if they exist - -## 1.2.0 - 2015-01-02 - -### Changed -* Update `process` dependency - -## 1.1.0 - 2014-08-26 - -### Added -* `clearImmediate` available to undo `setImmediate` - -## 1.0.3 - 2014-06-30 - -### Fixed -* Resume returning opaque IDs from `setTimeout` and `setInterval` - -## 1.0.2 - 2014-06-30 - -### Fixed -* Pass `window` explicitly to `setTimeout` and others to resolve an error in - Chrome - -## 1.0.1 - 2013-12-28 - -### Changed -* Replaced `setimmediate` dependency with `process` for the `nextTick` shim - -## 1.0.0 - 2013-12-10 - -### Added -* Guard against undefined globals like `setTimeout` in some environments - -## 0.0.0 - 2012-05-30 - -### Added -* Basic functionality for initial release diff --git a/node_modules/browserify/node_modules/timers-browserify/LICENSE.md b/node_modules/browserify/node_modules/timers-browserify/LICENSE.md deleted file mode 100644 index 940ec90a..00000000 --- a/node_modules/browserify/node_modules/timers-browserify/LICENSE.md +++ /dev/null @@ -1,46 +0,0 @@ -# timers-browserify - -This project uses the [MIT](http://jryans.mit-license.org/) license: - - Copyright © 2012 J. Ryan Stinnett - - 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. - -# lib/node - -The `lib/node` directory borrows files from joyent/node which uses the following license: - - Copyright Joyent, Inc. and other Node contributors. All rights reserved. - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to - deal in the Software without restriction, including without limitation the - rights to use, copy, modify, merge, publish, distribute, sublicense, and/or - sell copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS - IN THE SOFTWARE. diff --git a/node_modules/browserify/node_modules/timers-browserify/README.md b/node_modules/browserify/node_modules/timers-browserify/README.md deleted file mode 100644 index c7efa192..00000000 --- a/node_modules/browserify/node_modules/timers-browserify/README.md +++ /dev/null @@ -1,40 +0,0 @@ -# Overview - -Adds support for the `timers` module to browserify. - -## Wait, isn't it already supported in the browser? - -The public methods of the `timers` module are: - -* `setTimeout(callback, delay, [arg], [...])` -* `clearTimeout(timeoutId)` -* `setInterval(callback, delay, [arg], [...])` -* `clearInterval(intervalId)` - -and indeed, browsers support these already. - -## So, why does this exist? - -The `timers` module also includes some private methods used in other built-in -Node.js modules: - -* `enroll(item, delay)` -* `unenroll(item)` -* `active(item)` - -These are used to efficiently support a large quantity of timers with the same -timeouts by creating only a few timers under the covers. - -Node.js also offers the `immediate` APIs, which aren't yet available cross-browser, so we polyfill those: - -* `setImmediate(callback, [arg], [...])` -* `clearImmediate(immediateId)` - -## I need lots of timers and want to use linked list timers as Node.js does. - -Linked lists are efficient when you have thousands (millions?) of timers with the same delay. -Take a look at [timers-browserify-full](https://www.npmjs.com/package/timers-browserify-full) in this case. - -# License - -[MIT](http://jryans.mit-license.org/) diff --git a/node_modules/browserify/node_modules/timers-browserify/example/enroll/build.sh b/node_modules/browserify/node_modules/timers-browserify/example/enroll/build.sh deleted file mode 100755 index d276735d..00000000 --- a/node_modules/browserify/node_modules/timers-browserify/example/enroll/build.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/bash - -browserify --debug -o js/browserify.js js/main.js diff --git a/node_modules/browserify/node_modules/timers-browserify/example/enroll/index.html b/node_modules/browserify/node_modules/timers-browserify/example/enroll/index.html deleted file mode 100644 index 9cc11401..00000000 --- a/node_modules/browserify/node_modules/timers-browserify/example/enroll/index.html +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - - diff --git a/node_modules/browserify/node_modules/timers-browserify/example/enroll/js/browserify.js b/node_modules/browserify/node_modules/timers-browserify/example/enroll/js/browserify.js deleted file mode 100644 index c2d08210..00000000 --- a/node_modules/browserify/node_modules/timers-browserify/example/enroll/js/browserify.js +++ /dev/null @@ -1,233 +0,0 @@ -var require = function (file, cwd) { - var resolved = require.resolve(file, cwd || '/'); - var mod = require.modules[resolved]; - if (!mod) throw new Error( - 'Failed to resolve module ' + file + ', tried ' + resolved - ); - var res = mod._cached ? mod._cached : mod(); - return res; -} - -require.paths = []; -require.modules = {}; -require.extensions = [".js",".coffee"]; - -require._core = { - 'assert': true, - 'events': true, - 'fs': true, - 'path': true, - 'vm': true -}; - -require.resolve = (function () { - return function (x, cwd) { - if (!cwd) cwd = '/'; - - if (require._core[x]) return x; - var path = require.modules.path(); - cwd = path.resolve('/', cwd); - var y = cwd || '/'; - - if (x.match(/^(?:\.\.?\/|\/)/)) { - var m = loadAsFileSync(path.resolve(y, x)) - || loadAsDirectorySync(path.resolve(y, x)); - if (m) return m; - } - - var n = loadNodeModulesSync(x, y); - if (n) return n; - - throw new Error("Cannot find module '" + x + "'"); - - function loadAsFileSync (x) { - if (require.modules[x]) { - return x; - } - - for (var i = 0; i < require.extensions.length; i++) { - var ext = require.extensions[i]; - if (require.modules[x + ext]) return x + ext; - } - } - - function loadAsDirectorySync (x) { - x = x.replace(/\/+$/, ''); - var pkgfile = x + '/package.json'; - if (require.modules[pkgfile]) { - var pkg = require.modules[pkgfile](); - var b = pkg.browserify; - if (typeof b === 'object' && b.main) { - var m = loadAsFileSync(path.resolve(x, b.main)); - if (m) return m; - } - else if (typeof b === 'string') { - var m = loadAsFileSync(path.resolve(x, b)); - if (m) return m; - } - else if (pkg.main) { - var m = loadAsFileSync(path.resolve(x, pkg.main)); - if (m) return m; - } - } - - return loadAsFileSync(x + '/index'); - } - - function loadNodeModulesSync (x, start) { - var dirs = nodeModulesPathsSync(start); - for (var i = 0; i < dirs.length; i++) { - var dir = dirs[i]; - var m = loadAsFileSync(dir + '/' + x); - if (m) return m; - var n = loadAsDirectorySync(dir + '/' + x); - if (n) return n; - } - - var m = loadAsFileSync(x); - if (m) return m; - } - - function nodeModulesPathsSync (start) { - var parts; - if (start === '/') parts = [ '' ]; - else parts = path.normalize(start).split('/'); - - var dirs = []; - for (var i = parts.length - 1; i >= 0; i--) { - if (parts[i] === 'node_modules') continue; - var dir = parts.slice(0, i + 1).join('/') + '/node_modules'; - dirs.push(dir); - } - - return dirs; - } - }; -})(); - -require.alias = function (from, to) { - var path = require.modules.path(); - var res = null; - try { - res = require.resolve(from + '/package.json', '/'); - } - catch (err) { - res = require.resolve(from, '/'); - } - var basedir = path.dirname(res); - - var keys = (Object.keys || function (obj) { - var res = []; - for (var key in obj) res.push(key) - return res; - })(require.modules); - - for (var i = 0; i < keys.length; i++) { - var key = keys[i]; - if (key.slice(0, basedir.length + 1) === basedir + '/') { - var f = key.slice(basedir.length); - require.modules[to + f] = require.modules[basedir + f]; - } - else if (key === basedir) { - require.modules[to] = require.modules[basedir]; - } - } -}; - -require.define = function (filename, fn) { - var dirname = require._core[filename] - ? '' - : require.modules.path().dirname(filename) - ; - - var require_ = function (file) { - return require(file, dirname) - }; - require_.resolve = function (name) { - return require.resolve(name, dirname); - }; - require_.modules = require.modules; - require_.define = require.define; - var module_ = { exports : {} }; - - require.modules[filename] = function () { - require.modules[filename]._cached = module_.exports; - fn.call( - module_.exports, - require_, - module_, - module_.exports, - dirname, - filename - ); - require.modules[filename]._cached = module_.exports; - return module_.exports; - }; -}; - -if (typeof process === 'undefined') process = {}; - -if (!process.nextTick) process.nextTick = (function () { - var queue = []; - var canPost = typeof window !== 'undefined' - && window.postMessage && window.addEventListener - ; - - if (canPost) { - window.addEventListener('message', function (ev) { - if (ev.source === window && ev.data === 'browserify-tick') { - ev.stopPropagation(); - if (queue.length > 0) { - var fn = queue.shift(); - fn(); - } - } - }, true); - } - - return function (fn) { - if (canPost) { - queue.push(fn); - window.postMessage('browserify-tick', '*'); - } - else setTimeout(fn, 0); - }; -})(); - -if (!process.title) process.title = 'browser'; - -if (!process.binding) process.binding = function (name) { - if (name === 'evals') return require('vm') - else throw new Error('No such module') -}; - -if (!process.cwd) process.cwd = function () { return '.' }; - -if (!process.env) process.env = {}; -if (!process.argv) process.argv = []; - -require.define("path", Function( - [ 'require', 'module', 'exports', '__dirname', '__filename' ], - "function filter (xs, fn) {\n var res = [];\n for (var i = 0; i < xs.length; i++) {\n if (fn(xs[i], i, xs)) res.push(xs[i]);\n }\n return res;\n}\n\n// resolves . and .. elements in a path array with directory names there\n// must be no slashes, empty elements, or device names (c:\\) in the array\n// (so also no leading and trailing slashes - it does not distinguish\n// relative and absolute paths)\nfunction normalizeArray(parts, allowAboveRoot) {\n // if the path tries to go above the root, `up` ends up > 0\n var up = 0;\n for (var i = parts.length; i >= 0; i--) {\n var last = parts[i];\n if (last == '.') {\n parts.splice(i, 1);\n } else if (last === '..') {\n parts.splice(i, 1);\n up++;\n } else if (up) {\n parts.splice(i, 1);\n up--;\n }\n }\n\n // if the path is allowed to go above the root, restore leading ..s\n if (allowAboveRoot) {\n for (; up--; up) {\n parts.unshift('..');\n }\n }\n\n return parts;\n}\n\n// Regex to split a filename into [*, dir, basename, ext]\n// posix version\nvar splitPathRe = /^(.+\\/(?!$)|\\/)?((?:.+?)?(\\.[^.]*)?)$/;\n\n// path.resolve([from ...], to)\n// posix version\nexports.resolve = function() {\nvar resolvedPath = '',\n resolvedAbsolute = false;\n\nfor (var i = arguments.length; i >= -1 && !resolvedAbsolute; i--) {\n var path = (i >= 0)\n ? arguments[i]\n : process.cwd();\n\n // Skip empty and invalid entries\n if (typeof path !== 'string' || !path) {\n continue;\n }\n\n resolvedPath = path + '/' + resolvedPath;\n resolvedAbsolute = path.charAt(0) === '/';\n}\n\n// At this point the path should be resolved to a full absolute path, but\n// handle relative paths to be safe (might happen when process.cwd() fails)\n\n// Normalize the path\nresolvedPath = normalizeArray(filter(resolvedPath.split('/'), function(p) {\n return !!p;\n }), !resolvedAbsolute).join('/');\n\n return ((resolvedAbsolute ? '/' : '') + resolvedPath) || '.';\n};\n\n// path.normalize(path)\n// posix version\nexports.normalize = function(path) {\nvar isAbsolute = path.charAt(0) === '/',\n trailingSlash = path.slice(-1) === '/';\n\n// Normalize the path\npath = normalizeArray(filter(path.split('/'), function(p) {\n return !!p;\n }), !isAbsolute).join('/');\n\n if (!path && !isAbsolute) {\n path = '.';\n }\n if (path && trailingSlash) {\n path += '/';\n }\n \n return (isAbsolute ? '/' : '') + path;\n};\n\n\n// posix version\nexports.join = function() {\n var paths = Array.prototype.slice.call(arguments, 0);\n return exports.normalize(filter(paths, function(p, index) {\n return p && typeof p === 'string';\n }).join('/'));\n};\n\n\nexports.dirname = function(path) {\n var dir = splitPathRe.exec(path)[1] || '';\n var isWindows = false;\n if (!dir) {\n // No dirname\n return '.';\n } else if (dir.length === 1 ||\n (isWindows && dir.length <= 3 && dir.charAt(1) === ':')) {\n // It is just a slash or a drive letter with a slash\n return dir;\n } else {\n // It is a full dirname, strip trailing slash\n return dir.substring(0, dir.length - 1);\n }\n};\n\n\nexports.basename = function(path, ext) {\n var f = splitPathRe.exec(path)[2] || '';\n // TODO: make this comparison case-insensitive on windows?\n if (ext && f.substr(-1 * ext.length) === ext) {\n f = f.substr(0, f.length - ext.length);\n }\n return f;\n};\n\n\nexports.extname = function(path) {\n return splitPathRe.exec(path)[3] || '';\n};\n\n//@ sourceURL=path" -)); - -require.define("timers", Function( - [ 'require', 'module', 'exports', '__dirname', '__filename' ], - "module.exports = require(\"timers-browserify\")\n//@ sourceURL=timers" -)); - -require.define("/node_modules/timers-browserify/package.json", Function( - [ 'require', 'module', 'exports', '__dirname', '__filename' ], - "module.exports = {\"main\":\"main.js\"}\n//@ sourceURL=/node_modules/timers-browserify/package.json" -)); - -require.define("/node_modules/timers-browserify/main.js", Function( - [ 'require', 'module', 'exports', '__dirname', '__filename' ], - "// DOM APIs, for completeness\n\nexports.setTimeout = setTimeout;\nexports.clearTimeout = clearTimeout;\nexports.setInterval = setInterval;\nexports.clearInterval = clearInterval;\n\n// TODO: Change to more effiecient list approach used in Node.js\n// For now, we just implement the APIs using the primitives above.\n\nexports.enroll = function(item, delay) {\n item._timeoutID = setTimeout(item._onTimeout, delay);\n};\n\nexports.unenroll = function(item) {\n clearTimeout(item._timeoutID);\n};\n\nexports.active = function(item) {\n // our naive impl doesn't care (correctness is still preserved)\n};\n\n//@ sourceURL=/node_modules/timers-browserify/main.js" -)); - -require.define("/main.js", Function( - [ 'require', 'module', 'exports', '__dirname', '__filename' ], - "var timers = require('timers');\n\nvar obj = {\n _onTimeout: function() {\n console.log('Timer ran for: ' + (new Date().getTime() - obj.now) + ' ms');\n },\n start: function() {\n console.log('Timer should run for 100 ms');\n this.now = new Date().getTime();\n timers.enroll(this, 100);\n }\n};\n\nobj.start();\n\n//@ sourceURL=/main.js" -)); -require("/main.js"); diff --git a/node_modules/browserify/node_modules/timers-browserify/example/enroll/js/main.js b/node_modules/browserify/node_modules/timers-browserify/example/enroll/js/main.js deleted file mode 100644 index 0007df85..00000000 --- a/node_modules/browserify/node_modules/timers-browserify/example/enroll/js/main.js +++ /dev/null @@ -1,14 +0,0 @@ -var timers = require('timers'); - -var obj = { - _onTimeout: function() { - console.log('Timer ran for: ' + (new Date().getTime() - obj.now) + ' ms'); - }, - start: function() { - console.log('Timer should run for 100 ms'); - this.now = new Date().getTime(); - timers.enroll(this, 100); - } -}; - -obj.start(); diff --git a/node_modules/browserify/node_modules/timers-browserify/example/enroll/server.js b/node_modules/browserify/node_modules/timers-browserify/example/enroll/server.js deleted file mode 100644 index 37b1a0ad..00000000 --- a/node_modules/browserify/node_modules/timers-browserify/example/enroll/server.js +++ /dev/null @@ -1,11 +0,0 @@ -var connect = require('connect'); -var server = connect.createServer(); -server.use(connect.static(__dirname)); - -var browserify = require('browserify'); -var bundle = browserify(__dirname + '/js/main.js', { mount: '/js/browserify.js' }); -server.use(bundle); - -var port = parseInt(process.argv[2] || 8080, 10); -server.listen(port); -console.log('Listening on :' + port); diff --git a/node_modules/browserify/node_modules/timers-browserify/main.js b/node_modules/browserify/node_modules/timers-browserify/main.js deleted file mode 100644 index 38c058f1..00000000 --- a/node_modules/browserify/node_modules/timers-browserify/main.js +++ /dev/null @@ -1,76 +0,0 @@ -var nextTick = require('process/browser.js').nextTick; -var apply = Function.prototype.apply; -var slice = Array.prototype.slice; -var immediateIds = {}; -var nextImmediateId = 0; - -// DOM APIs, for completeness - -exports.setTimeout = function() { - return new Timeout(apply.call(setTimeout, window, arguments), clearTimeout); -}; -exports.setInterval = function() { - return new Timeout(apply.call(setInterval, window, arguments), clearInterval); -}; -exports.clearTimeout = -exports.clearInterval = function(timeout) { timeout.close(); }; - -function Timeout(id, clearFn) { - this._id = id; - this._clearFn = clearFn; -} -Timeout.prototype.unref = Timeout.prototype.ref = function() {}; -Timeout.prototype.close = function() { - this._clearFn.call(window, this._id); -}; - -// Does not start the time, just sets up the members needed. -exports.enroll = function(item, msecs) { - clearTimeout(item._idleTimeoutId); - item._idleTimeout = msecs; -}; - -exports.unenroll = function(item) { - clearTimeout(item._idleTimeoutId); - item._idleTimeout = -1; -}; - -exports._unrefActive = exports.active = function(item) { - clearTimeout(item._idleTimeoutId); - - var msecs = item._idleTimeout; - if (msecs >= 0) { - item._idleTimeoutId = setTimeout(function onTimeout() { - if (item._onTimeout) - item._onTimeout(); - }, msecs); - } -}; - -// That's not how node.js implements it but the exposed api is the same. -exports.setImmediate = typeof setImmediate === "function" ? setImmediate : function(fn) { - var id = nextImmediateId++; - var args = arguments.length < 2 ? false : slice.call(arguments, 1); - - immediateIds[id] = true; - - nextTick(function onNextTick() { - if (immediateIds[id]) { - // fn.call() is faster so we optimize for the common use-case - // @see http://jsperf.com/call-apply-segu - if (args) { - fn.apply(null, args); - } else { - fn.call(null); - } - // Prevent ids from leaking - exports.clearImmediate(id); - } - }); - - return id; -}; - -exports.clearImmediate = typeof clearImmediate === "function" ? clearImmediate : function(id) { - delete immediateIds[id]; -}; \ No newline at end of file diff --git a/node_modules/browserify/node_modules/timers-browserify/package.json b/node_modules/browserify/node_modules/timers-browserify/package.json deleted file mode 100644 index c259fd61..00000000 --- a/node_modules/browserify/node_modules/timers-browserify/package.json +++ /dev/null @@ -1,102 +0,0 @@ -{ - "author": { - "name": "J. Ryan Stinnett", - "email": "jryans@gmail.com", - "url": "http://convolv.es/" - }, - "name": "timers-browserify", - "description": "timers module for browserify", - "version": "1.4.2", - "homepage": "https://github.com/jryans/timers-browserify", - "bugs": { - "url": "https://github.com/jryans/timers-browserify/issues" - }, - "repository": { - "type": "git", - "url": "git://github.com/jryans/timers-browserify.git" - }, - "contributors": [ - { - "name": "Guy Bedford", - "email": "guybedford@gmail.com" - }, - { - "name": "Ionut-Cristian Florescu", - "email": "ionut.florescu@gmail.com" - }, - { - "name": "James Halliday", - "email": "mail@substack.net" - }, - { - "name": "Jan Schär", - "email": "jscissr@gmail.com" - }, - { - "name": "Johannes Ewald", - "email": "johannes.ewald@peerigon.com" - }, - { - "name": "Jonathan Prins", - "email": "jon@blip.tv" - }, - { - "name": "Matt Esch", - "email": "matt@mattesch.info" - } - ], - "main": "main.js", - "dependencies": { - "process": "~0.11.0" - }, - "devDependencies": { - "connect": "~2.3.0", - "browserify": "~1.10.16" - }, - "optionalDependencies": {}, - "engines": { - "node": ">=0.6.0" - }, - "keywords": [ - "timers", - "browserify", - "browser" - ], - "licenses": [ - { - "type": "MIT", - "url": "https://github.com/jryans/timers-browserify/blob/master/LICENSE.md" - } - ], - "jspm": { - "map": { - "./main.js": { - "node": "@node/timers" - } - } - }, - "gitHead": "762af88b6ed1d9b2ac97110649b723391ddd6bdd", - "_id": "timers-browserify@1.4.2", - "scripts": {}, - "_shasum": "c9c58b575be8407375cb5e2462dacee74359f41d", - "_from": "timers-browserify@>=1.0.1 <2.0.0", - "_npmVersion": "2.14.7", - "_nodeVersion": "4.2.2", - "_npmUser": { - "name": "jryans", - "email": "jryans@gmail.com" - }, - "maintainers": [ - { - "name": "jryans", - "email": "jryans@gmail.com" - } - ], - "dist": { - "shasum": "c9c58b575be8407375cb5e2462dacee74359f41d", - "tarball": "https://registry.npmjs.org/timers-browserify/-/timers-browserify-1.4.2.tgz" - }, - "directories": {}, - "_resolved": "https://registry.npmjs.org/timers-browserify/-/timers-browserify-1.4.2.tgz", - "readme": "ERROR: No README data found!" -} diff --git a/node_modules/browserify/node_modules/tty-browserify/LICENSE b/node_modules/browserify/node_modules/tty-browserify/LICENSE deleted file mode 100644 index ee27ba4b..00000000 --- a/node_modules/browserify/node_modules/tty-browserify/LICENSE +++ /dev/null @@ -1,18 +0,0 @@ -This software is released under the MIT license: - -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/node_modules/browserify/node_modules/tty-browserify/index.js b/node_modules/browserify/node_modules/tty-browserify/index.js deleted file mode 100644 index 2b5f04c1..00000000 --- a/node_modules/browserify/node_modules/tty-browserify/index.js +++ /dev/null @@ -1,11 +0,0 @@ -exports.isatty = function () { return false; }; - -function ReadStream() { - throw new Error('tty.ReadStream is not implemented'); -} -exports.ReadStream = ReadStream; - -function WriteStream() { - throw new Error('tty.ReadStream is not implemented'); -} -exports.WriteStream = WriteStream; diff --git a/node_modules/browserify/node_modules/tty-browserify/package.json b/node_modules/browserify/node_modules/tty-browserify/package.json deleted file mode 100644 index b30918d7..00000000 --- a/node_modules/browserify/node_modules/tty-browserify/package.json +++ /dev/null @@ -1,53 +0,0 @@ -{ - "name": "tty-browserify", - "version": "0.0.0", - "description": "the tty module from node core for browsers", - "main": "index.js", - "dependencies": {}, - "devDependencies": { - "tape": "~1.0.4" - }, - "scripts": { - "test": "tape test/*.js" - }, - "repository": { - "type": "git", - "url": "git://github.com/substack/tty-browserify.git" - }, - "homepage": "https://github.com/substack/tty-browserify", - "keywords": [ - "tty", - "browser", - "browserify" - ], - "author": { - "name": "James Halliday", - "email": "mail@substack.net", - "url": "http://substack.net" - }, - "license": "MIT", - "bugs": { - "url": "https://github.com/substack/tty-browserify/issues" - }, - "_id": "tty-browserify@0.0.0", - "dist": { - "shasum": "a157ba402da24e9bf957f9aa69d524eed42901a6", - "tarball": "https://registry.npmjs.org/tty-browserify/-/tty-browserify-0.0.0.tgz" - }, - "_from": "tty-browserify@>=0.0.0 <0.1.0", - "_npmVersion": "1.3.14", - "_npmUser": { - "name": "substack", - "email": "mail@substack.net" - }, - "maintainers": [ - { - "name": "substack", - "email": "mail@substack.net" - } - ], - "directories": {}, - "_shasum": "a157ba402da24e9bf957f9aa69d524eed42901a6", - "_resolved": "https://registry.npmjs.org/tty-browserify/-/tty-browserify-0.0.0.tgz", - "readme": "ERROR: No README data found!" -} diff --git a/node_modules/browserify/node_modules/tty-browserify/readme.markdown b/node_modules/browserify/node_modules/tty-browserify/readme.markdown deleted file mode 100644 index 91a2051a..00000000 --- a/node_modules/browserify/node_modules/tty-browserify/readme.markdown +++ /dev/null @@ -1 +0,0 @@ -# tty-browserify diff --git a/node_modules/browserify/node_modules/url/.npmignore b/node_modules/browserify/node_modules/url/.npmignore deleted file mode 100644 index ba114713..00000000 --- a/node_modules/browserify/node_modules/url/.npmignore +++ /dev/null @@ -1 +0,0 @@ -test-url.js diff --git a/node_modules/browserify/node_modules/url/.travis.yml b/node_modules/browserify/node_modules/url/.travis.yml deleted file mode 100644 index 16ed3015..00000000 --- a/node_modules/browserify/node_modules/url/.travis.yml +++ /dev/null @@ -1,7 +0,0 @@ -language: node_js -node_js: - - "0.10" -env: - global: - - secure: OgPRLCzHFh5WbjHEKlghHFW1oOreSF2JVUr3CMaFDi03ngTS2WONSw8mRn8SA6FTldiGGBx1n8orDzUw6cdkB7+tkU3G5B0M0V3vl823NaUFKgxsCM3UGDYfJb3yfAG5cj72rVZoX/ABd1fVuG4vBIlDLxsSlKQFMzUCFoyttr8= - - secure: AiZP8GHbyx83ZBhOvOxxtpNcgNHoP+vo5G1a1OYU78EHCgHg8NRyHKyCdrBnPvw6mV2BI/8frZaXAEicsHMtHMofBYn7nibNlaajBPI8AkHtYfNSc+zO+71Kwv7VOTOKKnkMEIkqhHlc6njFoH3QaBNHsgNlzzplPxaIt8vdUVk= diff --git a/node_modules/browserify/node_modules/url/.zuul.yml b/node_modules/browserify/node_modules/url/.zuul.yml deleted file mode 100644 index feea8b60..00000000 --- a/node_modules/browserify/node_modules/url/.zuul.yml +++ /dev/null @@ -1,16 +0,0 @@ -ui: mocha-tdd -browsers: - - name: chrome - version: latest - - name: firefox - version: 24..latest - - name: safari - version: latest - - name: ie - version: 9..latest - - name: iphone - version: oldest..latest - - name: ipad - version: oldest..latest - - name: android - version: oldest..latest diff --git a/node_modules/browserify/node_modules/url/LICENSE b/node_modules/browserify/node_modules/url/LICENSE deleted file mode 100644 index f45bc118..00000000 --- a/node_modules/browserify/node_modules/url/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright Joyent, Inc. and other Node contributors. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/node_modules/browserify/node_modules/url/README.md b/node_modules/browserify/node_modules/url/README.md deleted file mode 100644 index 8b354602..00000000 --- a/node_modules/browserify/node_modules/url/README.md +++ /dev/null @@ -1,108 +0,0 @@ -# node-url - -[![Build Status](https://travis-ci.org/defunctzombie/node-url.svg?branch=master)](https://travis-ci.org/defunctzombie/node-url) - -This module has utilities for URL resolution and parsing meant to have feature parity with node.js core [url](http://nodejs.org/api/url.html) module. - -```js -var url = require('url'); -``` - -## api - -Parsed URL objects have some or all of the following fields, depending on -whether or not they exist in the URL string. Any parts that are not in the URL -string will not be in the parsed object. Examples are shown for the URL - -`'http://user:pass@host.com:8080/p/a/t/h?query=string#hash'` - -* `href`: The full URL that was originally parsed. Both the protocol and host are lowercased. - - Example: `'http://user:pass@host.com:8080/p/a/t/h?query=string#hash'` - -* `protocol`: The request protocol, lowercased. - - Example: `'http:'` - -* `host`: The full lowercased host portion of the URL, including port - information. - - Example: `'host.com:8080'` - -* `auth`: The authentication information portion of a URL. - - Example: `'user:pass'` - -* `hostname`: Just the lowercased hostname portion of the host. - - Example: `'host.com'` - -* `port`: The port number portion of the host. - - Example: `'8080'` - -* `pathname`: The path section of the URL, that comes after the host and - before the query, including the initial slash if present. - - Example: `'/p/a/t/h'` - -* `search`: The 'query string' portion of the URL, including the leading - question mark. - - Example: `'?query=string'` - -* `path`: Concatenation of `pathname` and `search`. - - Example: `'/p/a/t/h?query=string'` - -* `query`: Either the 'params' portion of the query string, or a - querystring-parsed object. - - Example: `'query=string'` or `{'query':'string'}` - -* `hash`: The 'fragment' portion of the URL including the pound-sign. - - Example: `'#hash'` - -The following methods are provided by the URL module: - -### url.parse(urlStr, [parseQueryString], [slashesDenoteHost]) - -Take a URL string, and return an object. - -Pass `true` as the second argument to also parse -the query string using the `querystring` module. -Defaults to `false`. - -Pass `true` as the third argument to treat `//foo/bar` as -`{ host: 'foo', pathname: '/bar' }` rather than -`{ pathname: '//foo/bar' }`. Defaults to `false`. - -### url.format(urlObj) - -Take a parsed URL object, and return a formatted URL string. - -* `href` will be ignored. -* `protocol` is treated the same with or without the trailing `:` (colon). - * The protocols `http`, `https`, `ftp`, `gopher`, `file` will be - postfixed with `://` (colon-slash-slash). - * All other protocols `mailto`, `xmpp`, `aim`, `sftp`, `foo`, etc will - be postfixed with `:` (colon) -* `auth` will be used if present. -* `hostname` will only be used if `host` is absent. -* `port` will only be used if `host` is absent. -* `host` will be used in place of `hostname` and `port` -* `pathname` is treated the same with or without the leading `/` (slash) -* `search` will be used in place of `query` -* `query` (object; see `querystring`) will only be used if `search` is absent. -* `search` is treated the same with or without the leading `?` (question mark) -* `hash` is treated the same with or without the leading `#` (pound sign, anchor) - -### url.resolve(from, to) - -Take a base URL, and a href URL, and resolve them as a browser would for -an anchor tag. Examples: - - url.resolve('/one/two/three', 'four') // '/one/two/four' - url.resolve('http://example.com/', '/one') // 'http://example.com/one' - url.resolve('http://example.com/one', '/two') // 'http://example.com/two' diff --git a/node_modules/browserify/node_modules/url/node_modules/punycode/LICENSE-MIT.txt b/node_modules/browserify/node_modules/url/node_modules/punycode/LICENSE-MIT.txt deleted file mode 100644 index a41e0a7e..00000000 --- a/node_modules/browserify/node_modules/url/node_modules/punycode/LICENSE-MIT.txt +++ /dev/null @@ -1,20 +0,0 @@ -Copyright Mathias Bynens - -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/node_modules/browserify/node_modules/url/node_modules/punycode/README.md b/node_modules/browserify/node_modules/url/node_modules/punycode/README.md deleted file mode 100644 index 831e6379..00000000 --- a/node_modules/browserify/node_modules/url/node_modules/punycode/README.md +++ /dev/null @@ -1,176 +0,0 @@ -# Punycode.js [![Build status](https://travis-ci.org/bestiejs/punycode.js.svg?branch=master)](https://travis-ci.org/bestiejs/punycode.js) [![Code coverage status](http://img.shields.io/coveralls/bestiejs/punycode.js/master.svg)](https://coveralls.io/r/bestiejs/punycode.js) [![Dependency status](https://gemnasium.com/bestiejs/punycode.js.svg)](https://gemnasium.com/bestiejs/punycode.js) - -A robust Punycode converter that fully complies to [RFC 3492](http://tools.ietf.org/html/rfc3492) and [RFC 5891](http://tools.ietf.org/html/rfc5891), and works on nearly all JavaScript platforms. - -This JavaScript library is the result of comparing, optimizing and documenting different open-source implementations of the Punycode algorithm: - -* [The C example code from RFC 3492](http://tools.ietf.org/html/rfc3492#appendix-C) -* [`punycode.c` by _Markus W. Scherer_ (IBM)](http://opensource.apple.com/source/ICU/ICU-400.42/icuSources/common/punycode.c) -* [`punycode.c` by _Ben Noordhuis_](https://github.com/bnoordhuis/punycode/blob/master/punycode.c) -* [JavaScript implementation by _some_](http://stackoverflow.com/questions/183485/can-anyone-recommend-a-good-free-javascript-for-punycode-to-unicode-conversion/301287#301287) -* [`punycode.js` by _Ben Noordhuis_](https://github.com/joyent/node/blob/426298c8c1c0d5b5224ac3658c41e7c2a3fe9377/lib/punycode.js) (note: [not fully compliant](https://github.com/joyent/node/issues/2072)) - -This project is [bundled](https://github.com/joyent/node/blob/master/lib/punycode.js) with [Node.js v0.6.2+](https://github.com/joyent/node/compare/975f1930b1...61e796decc). - -## Installation - -Via [npm](http://npmjs.org/) (only required for Node.js releases older than v0.6.2): - -```bash -npm install punycode -``` - -Via [Bower](http://bower.io/): - -```bash -bower install punycode -``` - -Via [Component](https://github.com/component/component): - -```bash -component install bestiejs/punycode.js -``` - -In a browser: - -```html - -``` - -In [Narwhal](http://narwhaljs.org/), [Node.js](http://nodejs.org/), and [RingoJS](http://ringojs.org/): - -```js -var punycode = require('punycode'); -``` - -In [Rhino](http://www.mozilla.org/rhino/): - -```js -load('punycode.js'); -``` - -Using an AMD loader like [RequireJS](http://requirejs.org/): - -```js -require( - { - 'paths': { - 'punycode': 'path/to/punycode' - } - }, - ['punycode'], - function(punycode) { - console.log(punycode); - } -); -``` - -## API - -### `punycode.decode(string)` - -Converts a Punycode string of ASCII symbols to a string of Unicode symbols. - -```js -// decode domain name parts -punycode.decode('maana-pta'); // 'mañana' -punycode.decode('--dqo34k'); // '☃-⌘' -``` - -### `punycode.encode(string)` - -Converts a string of Unicode symbols to a Punycode string of ASCII symbols. - -```js -// encode domain name parts -punycode.encode('mañana'); // 'maana-pta' -punycode.encode('☃-⌘'); // '--dqo34k' -``` - -### `punycode.toUnicode(input)` - -Converts a Punycode string representing a domain name or an email address to Unicode. Only the Punycoded parts of the input will be converted, i.e. it doesn’t matter if you call it on a string that has already been converted to Unicode. - -```js -// decode domain names -punycode.toUnicode('xn--maana-pta.com'); -// → 'mañana.com' -punycode.toUnicode('xn----dqo34k.com'); -// → '☃-⌘.com' - -// decode email addresses -punycode.toUnicode('джумла@xn--p-8sbkgc5ag7bhce.xn--ba-lmcq'); -// → 'джумла@джpумлатест.bрфa' -``` - -### `punycode.toASCII(input)` - -Converts a Unicode string representing a domain name or an email address to Punycode. Only the non-ASCII parts of the input will be converted, i.e. it doesn’t matter if you call it with a domain that's already in ASCII. - -```js -// encode domain names -punycode.toASCII('mañana.com'); -// → 'xn--maana-pta.com' -punycode.toASCII('☃-⌘.com'); -// → 'xn----dqo34k.com' - -// encode email addresses -punycode.toASCII('джумла@джpумлатест.bрфa'); -// → 'джумла@xn--p-8sbkgc5ag7bhce.xn--ba-lmcq' -``` - -### `punycode.ucs2` - -#### `punycode.ucs2.decode(string)` - -Creates an array containing the numeric code point values of each Unicode symbol in the string. While [JavaScript uses UCS-2 internally](https://mathiasbynens.be/notes/javascript-encoding), this function will convert a pair of surrogate halves (each of which UCS-2 exposes as separate characters) into a single code point, matching UTF-16. - -```js -punycode.ucs2.decode('abc'); -// → [0x61, 0x62, 0x63] -// surrogate pair for U+1D306 TETRAGRAM FOR CENTRE: -punycode.ucs2.decode('\uD834\uDF06'); -// → [0x1D306] -``` - -#### `punycode.ucs2.encode(codePoints)` - -Creates a string based on an array of numeric code point values. - -```js -punycode.ucs2.encode([0x61, 0x62, 0x63]); -// → 'abc' -punycode.ucs2.encode([0x1D306]); -// → '\uD834\uDF06' -``` - -### `punycode.version` - -A string representing the current Punycode.js version number. - -## Unit tests & code coverage - -After cloning this repository, run `npm install --dev` to install the dependencies needed for Punycode.js development and testing. You may want to install Istanbul _globally_ using `npm install istanbul -g`. - -Once that’s done, you can run the unit tests in Node using `npm test` or `node tests/tests.js`. To run the tests in Rhino, Ringo, Narwhal, PhantomJS, and web browsers as well, use `grunt test`. - -To generate the code coverage report, use `grunt cover`. - -Feel free to fork if you see possible improvements! - -## Author - -| [![twitter/mathias](https://gravatar.com/avatar/24e08a9ea84deb17ae121074d0f17125?s=70)](https://twitter.com/mathias "Follow @mathias on Twitter") | -|---| -| [Mathias Bynens](https://mathiasbynens.be/) | - -## Contributors - -| [![twitter/jdalton](https://gravatar.com/avatar/299a3d891ff1920b69c364d061007043?s=70)](https://twitter.com/jdalton "Follow @jdalton on Twitter") | -|---| -| [John-David Dalton](http://allyoucanleet.com/) | - -## License - -Punycode.js is available under the [MIT](https://mths.be/mit) license. diff --git a/node_modules/browserify/node_modules/url/node_modules/punycode/package.json b/node_modules/browserify/node_modules/url/node_modules/punycode/package.json deleted file mode 100644 index 05969d37..00000000 --- a/node_modules/browserify/node_modules/url/node_modules/punycode/package.json +++ /dev/null @@ -1,81 +0,0 @@ -{ - "name": "punycode", - "version": "1.3.2", - "description": "A robust Punycode converter that fully complies to RFC 3492 and RFC 5891, and works on nearly all JavaScript platforms.", - "homepage": "https://mths.be/punycode", - "main": "punycode.js", - "keywords": [ - "punycode", - "unicode", - "idn", - "idna", - "dns", - "url", - "domain" - ], - "license": "MIT", - "author": { - "name": "Mathias Bynens", - "url": "https://mathiasbynens.be/" - }, - "contributors": [ - { - "name": "Mathias Bynens", - "url": "https://mathiasbynens.be/" - }, - { - "name": "John-David Dalton", - "url": "http://allyoucanleet.com/" - } - ], - "repository": { - "type": "git", - "url": "https://github.com/bestiejs/punycode.js.git" - }, - "bugs": { - "url": "https://github.com/bestiejs/punycode.js/issues" - }, - "files": [ - "LICENSE-MIT.txt", - "punycode.js" - ], - "scripts": { - "test": "node tests/tests.js" - }, - "devDependencies": { - "coveralls": "^2.10.1", - "grunt": "^0.4.5", - "grunt-contrib-uglify": "^0.5.0", - "grunt-shell": "^0.7.0", - "istanbul": "^0.2.13", - "qunit-extras": "^1.2.0", - "qunitjs": "~1.11.0", - "requirejs": "^2.1.14" - }, - "gitHead": "38c8d3131a82567bfef18da09f7f4db68c84f8a3", - "_id": "punycode@1.3.2", - "_shasum": "9653a036fb7c1ee42342f2325cceefea3926c48d", - "_from": "punycode@1.3.2", - "_npmVersion": "1.4.28", - "_npmUser": { - "name": "mathias", - "email": "mathias@qiwi.be" - }, - "maintainers": [ - { - "name": "mathias", - "email": "mathias@qiwi.be" - }, - { - "name": "reconbot", - "email": "wizard@roborooter.com" - } - ], - "dist": { - "shasum": "9653a036fb7c1ee42342f2325cceefea3926c48d", - "tarball": "http://registry.npmjs.org/punycode/-/punycode-1.3.2.tgz" - }, - "directories": {}, - "_resolved": "https://registry.npmjs.org/punycode/-/punycode-1.3.2.tgz", - "readme": "ERROR: No README data found!" -} diff --git a/node_modules/browserify/node_modules/url/node_modules/punycode/punycode.js b/node_modules/browserify/node_modules/url/node_modules/punycode/punycode.js deleted file mode 100644 index ac685973..00000000 --- a/node_modules/browserify/node_modules/url/node_modules/punycode/punycode.js +++ /dev/null @@ -1,530 +0,0 @@ -/*! https://mths.be/punycode v1.3.2 by @mathias */ -;(function(root) { - - /** Detect free variables */ - var freeExports = typeof exports == 'object' && exports && - !exports.nodeType && exports; - var freeModule = typeof module == 'object' && module && - !module.nodeType && module; - var freeGlobal = typeof global == 'object' && global; - if ( - freeGlobal.global === freeGlobal || - freeGlobal.window === freeGlobal || - freeGlobal.self === freeGlobal - ) { - root = freeGlobal; - } - - /** - * The `punycode` object. - * @name punycode - * @type Object - */ - var punycode, - - /** Highest positive signed 32-bit float value */ - maxInt = 2147483647, // aka. 0x7FFFFFFF or 2^31-1 - - /** Bootstring parameters */ - base = 36, - tMin = 1, - tMax = 26, - skew = 38, - damp = 700, - initialBias = 72, - initialN = 128, // 0x80 - delimiter = '-', // '\x2D' - - /** Regular expressions */ - regexPunycode = /^xn--/, - regexNonASCII = /[^\x20-\x7E]/, // unprintable ASCII chars + non-ASCII chars - regexSeparators = /[\x2E\u3002\uFF0E\uFF61]/g, // RFC 3490 separators - - /** Error messages */ - errors = { - 'overflow': 'Overflow: input needs wider integers to process', - 'not-basic': 'Illegal input >= 0x80 (not a basic code point)', - 'invalid-input': 'Invalid input' - }, - - /** Convenience shortcuts */ - baseMinusTMin = base - tMin, - floor = Math.floor, - stringFromCharCode = String.fromCharCode, - - /** Temporary variable */ - key; - - /*--------------------------------------------------------------------------*/ - - /** - * A generic error utility function. - * @private - * @param {String} type The error type. - * @returns {Error} Throws a `RangeError` with the applicable error message. - */ - function error(type) { - throw RangeError(errors[type]); - } - - /** - * A generic `Array#map` utility function. - * @private - * @param {Array} array The array to iterate over. - * @param {Function} callback The function that gets called for every array - * item. - * @returns {Array} A new array of values returned by the callback function. - */ - function map(array, fn) { - var length = array.length; - var result = []; - while (length--) { - result[length] = fn(array[length]); - } - return result; - } - - /** - * A simple `Array#map`-like wrapper to work with domain name strings or email - * addresses. - * @private - * @param {String} domain The domain name or email address. - * @param {Function} callback The function that gets called for every - * character. - * @returns {Array} A new string of characters returned by the callback - * function. - */ - function mapDomain(string, fn) { - var parts = string.split('@'); - var result = ''; - if (parts.length > 1) { - // In email addresses, only the domain name should be punycoded. Leave - // the local part (i.e. everything up to `@`) intact. - result = parts[0] + '@'; - string = parts[1]; - } - // Avoid `split(regex)` for IE8 compatibility. See #17. - string = string.replace(regexSeparators, '\x2E'); - var labels = string.split('.'); - var encoded = map(labels, fn).join('.'); - return result + encoded; - } - - /** - * Creates an array containing the numeric code points of each Unicode - * character in the string. While JavaScript uses UCS-2 internally, - * this function will convert a pair of surrogate halves (each of which - * UCS-2 exposes as separate characters) into a single code point, - * matching UTF-16. - * @see `punycode.ucs2.encode` - * @see - * @memberOf punycode.ucs2 - * @name decode - * @param {String} string The Unicode input string (UCS-2). - * @returns {Array} The new array of code points. - */ - function ucs2decode(string) { - var output = [], - counter = 0, - length = string.length, - value, - extra; - while (counter < length) { - value = string.charCodeAt(counter++); - if (value >= 0xD800 && value <= 0xDBFF && counter < length) { - // high surrogate, and there is a next character - extra = string.charCodeAt(counter++); - if ((extra & 0xFC00) == 0xDC00) { // low surrogate - output.push(((value & 0x3FF) << 10) + (extra & 0x3FF) + 0x10000); - } else { - // unmatched surrogate; only append this code unit, in case the next - // code unit is the high surrogate of a surrogate pair - output.push(value); - counter--; - } - } else { - output.push(value); - } - } - return output; - } - - /** - * Creates a string based on an array of numeric code points. - * @see `punycode.ucs2.decode` - * @memberOf punycode.ucs2 - * @name encode - * @param {Array} codePoints The array of numeric code points. - * @returns {String} The new Unicode string (UCS-2). - */ - function ucs2encode(array) { - return map(array, function(value) { - var output = ''; - if (value > 0xFFFF) { - value -= 0x10000; - output += stringFromCharCode(value >>> 10 & 0x3FF | 0xD800); - value = 0xDC00 | value & 0x3FF; - } - output += stringFromCharCode(value); - return output; - }).join(''); - } - - /** - * Converts a basic code point into a digit/integer. - * @see `digitToBasic()` - * @private - * @param {Number} codePoint The basic numeric code point value. - * @returns {Number} The numeric value of a basic code point (for use in - * representing integers) in the range `0` to `base - 1`, or `base` if - * the code point does not represent a value. - */ - function basicToDigit(codePoint) { - if (codePoint - 48 < 10) { - return codePoint - 22; - } - if (codePoint - 65 < 26) { - return codePoint - 65; - } - if (codePoint - 97 < 26) { - return codePoint - 97; - } - return base; - } - - /** - * Converts a digit/integer into a basic code point. - * @see `basicToDigit()` - * @private - * @param {Number} digit The numeric value of a basic code point. - * @returns {Number} The basic code point whose value (when used for - * representing integers) is `digit`, which needs to be in the range - * `0` to `base - 1`. If `flag` is non-zero, the uppercase form is - * used; else, the lowercase form is used. The behavior is undefined - * if `flag` is non-zero and `digit` has no uppercase form. - */ - function digitToBasic(digit, flag) { - // 0..25 map to ASCII a..z or A..Z - // 26..35 map to ASCII 0..9 - return digit + 22 + 75 * (digit < 26) - ((flag != 0) << 5); - } - - /** - * Bias adaptation function as per section 3.4 of RFC 3492. - * http://tools.ietf.org/html/rfc3492#section-3.4 - * @private - */ - function adapt(delta, numPoints, firstTime) { - var k = 0; - delta = firstTime ? floor(delta / damp) : delta >> 1; - delta += floor(delta / numPoints); - for (/* no initialization */; delta > baseMinusTMin * tMax >> 1; k += base) { - delta = floor(delta / baseMinusTMin); - } - return floor(k + (baseMinusTMin + 1) * delta / (delta + skew)); - } - - /** - * Converts a Punycode string of ASCII-only symbols to a string of Unicode - * symbols. - * @memberOf punycode - * @param {String} input The Punycode string of ASCII-only symbols. - * @returns {String} The resulting string of Unicode symbols. - */ - function decode(input) { - // Don't use UCS-2 - var output = [], - inputLength = input.length, - out, - i = 0, - n = initialN, - bias = initialBias, - basic, - j, - index, - oldi, - w, - k, - digit, - t, - /** Cached calculation results */ - baseMinusT; - - // Handle the basic code points: let `basic` be the number of input code - // points before the last delimiter, or `0` if there is none, then copy - // the first basic code points to the output. - - basic = input.lastIndexOf(delimiter); - if (basic < 0) { - basic = 0; - } - - for (j = 0; j < basic; ++j) { - // if it's not a basic code point - if (input.charCodeAt(j) >= 0x80) { - error('not-basic'); - } - output.push(input.charCodeAt(j)); - } - - // Main decoding loop: start just after the last delimiter if any basic code - // points were copied; start at the beginning otherwise. - - for (index = basic > 0 ? basic + 1 : 0; index < inputLength; /* no final expression */) { - - // `index` is the index of the next character to be consumed. - // Decode a generalized variable-length integer into `delta`, - // which gets added to `i`. The overflow checking is easier - // if we increase `i` as we go, then subtract off its starting - // value at the end to obtain `delta`. - for (oldi = i, w = 1, k = base; /* no condition */; k += base) { - - if (index >= inputLength) { - error('invalid-input'); - } - - digit = basicToDigit(input.charCodeAt(index++)); - - if (digit >= base || digit > floor((maxInt - i) / w)) { - error('overflow'); - } - - i += digit * w; - t = k <= bias ? tMin : (k >= bias + tMax ? tMax : k - bias); - - if (digit < t) { - break; - } - - baseMinusT = base - t; - if (w > floor(maxInt / baseMinusT)) { - error('overflow'); - } - - w *= baseMinusT; - - } - - out = output.length + 1; - bias = adapt(i - oldi, out, oldi == 0); - - // `i` was supposed to wrap around from `out` to `0`, - // incrementing `n` each time, so we'll fix that now: - if (floor(i / out) > maxInt - n) { - error('overflow'); - } - - n += floor(i / out); - i %= out; - - // Insert `n` at position `i` of the output - output.splice(i++, 0, n); - - } - - return ucs2encode(output); - } - - /** - * Converts a string of Unicode symbols (e.g. a domain name label) to a - * Punycode string of ASCII-only symbols. - * @memberOf punycode - * @param {String} input The string of Unicode symbols. - * @returns {String} The resulting Punycode string of ASCII-only symbols. - */ - function encode(input) { - var n, - delta, - handledCPCount, - basicLength, - bias, - j, - m, - q, - k, - t, - currentValue, - output = [], - /** `inputLength` will hold the number of code points in `input`. */ - inputLength, - /** Cached calculation results */ - handledCPCountPlusOne, - baseMinusT, - qMinusT; - - // Convert the input in UCS-2 to Unicode - input = ucs2decode(input); - - // Cache the length - inputLength = input.length; - - // Initialize the state - n = initialN; - delta = 0; - bias = initialBias; - - // Handle the basic code points - for (j = 0; j < inputLength; ++j) { - currentValue = input[j]; - if (currentValue < 0x80) { - output.push(stringFromCharCode(currentValue)); - } - } - - handledCPCount = basicLength = output.length; - - // `handledCPCount` is the number of code points that have been handled; - // `basicLength` is the number of basic code points. - - // Finish the basic string - if it is not empty - with a delimiter - if (basicLength) { - output.push(delimiter); - } - - // Main encoding loop: - while (handledCPCount < inputLength) { - - // All non-basic code points < n have been handled already. Find the next - // larger one: - for (m = maxInt, j = 0; j < inputLength; ++j) { - currentValue = input[j]; - if (currentValue >= n && currentValue < m) { - m = currentValue; - } - } - - // Increase `delta` enough to advance the decoder's state to , - // but guard against overflow - handledCPCountPlusOne = handledCPCount + 1; - if (m - n > floor((maxInt - delta) / handledCPCountPlusOne)) { - error('overflow'); - } - - delta += (m - n) * handledCPCountPlusOne; - n = m; - - for (j = 0; j < inputLength; ++j) { - currentValue = input[j]; - - if (currentValue < n && ++delta > maxInt) { - error('overflow'); - } - - if (currentValue == n) { - // Represent delta as a generalized variable-length integer - for (q = delta, k = base; /* no condition */; k += base) { - t = k <= bias ? tMin : (k >= bias + tMax ? tMax : k - bias); - if (q < t) { - break; - } - qMinusT = q - t; - baseMinusT = base - t; - output.push( - stringFromCharCode(digitToBasic(t + qMinusT % baseMinusT, 0)) - ); - q = floor(qMinusT / baseMinusT); - } - - output.push(stringFromCharCode(digitToBasic(q, 0))); - bias = adapt(delta, handledCPCountPlusOne, handledCPCount == basicLength); - delta = 0; - ++handledCPCount; - } - } - - ++delta; - ++n; - - } - return output.join(''); - } - - /** - * Converts a Punycode string representing a domain name or an email address - * to Unicode. Only the Punycoded parts of the input will be converted, i.e. - * it doesn't matter if you call it on a string that has already been - * converted to Unicode. - * @memberOf punycode - * @param {String} input The Punycoded domain name or email address to - * convert to Unicode. - * @returns {String} The Unicode representation of the given Punycode - * string. - */ - function toUnicode(input) { - return mapDomain(input, function(string) { - return regexPunycode.test(string) - ? decode(string.slice(4).toLowerCase()) - : string; - }); - } - - /** - * Converts a Unicode string representing a domain name or an email address to - * Punycode. Only the non-ASCII parts of the domain name will be converted, - * i.e. it doesn't matter if you call it with a domain that's already in - * ASCII. - * @memberOf punycode - * @param {String} input The domain name or email address to convert, as a - * Unicode string. - * @returns {String} The Punycode representation of the given domain name or - * email address. - */ - function toASCII(input) { - return mapDomain(input, function(string) { - return regexNonASCII.test(string) - ? 'xn--' + encode(string) - : string; - }); - } - - /*--------------------------------------------------------------------------*/ - - /** Define the public API */ - punycode = { - /** - * A string representing the current Punycode.js version number. - * @memberOf punycode - * @type String - */ - 'version': '1.3.2', - /** - * An object of methods to convert from JavaScript's internal character - * representation (UCS-2) to Unicode code points, and back. - * @see - * @memberOf punycode - * @type Object - */ - 'ucs2': { - 'decode': ucs2decode, - 'encode': ucs2encode - }, - 'decode': decode, - 'encode': encode, - 'toASCII': toASCII, - 'toUnicode': toUnicode - }; - - /** Expose `punycode` */ - // Some AMD build optimizers, like r.js, check for specific condition patterns - // like the following: - if ( - typeof define == 'function' && - typeof define.amd == 'object' && - define.amd - ) { - define('punycode', function() { - return punycode; - }); - } else if (freeExports && freeModule) { - if (module.exports == freeExports) { // in Node.js or RingoJS v0.8.0+ - freeModule.exports = punycode; - } else { // in Narwhal or RingoJS v0.7.0- - for (key in punycode) { - punycode.hasOwnProperty(key) && (freeExports[key] = punycode[key]); - } - } - } else { // in Rhino or a web browser - root.punycode = punycode; - } - -}(this)); diff --git a/node_modules/browserify/node_modules/url/node_modules/querystring/.History.md.un~ b/node_modules/browserify/node_modules/url/node_modules/querystring/.History.md.un~ deleted file mode 100644 index c96a7dd8..00000000 Binary files a/node_modules/browserify/node_modules/url/node_modules/querystring/.History.md.un~ and /dev/null differ diff --git a/node_modules/browserify/node_modules/url/node_modules/querystring/.Readme.md.un~ b/node_modules/browserify/node_modules/url/node_modules/querystring/.Readme.md.un~ deleted file mode 100644 index 71613b59..00000000 Binary files a/node_modules/browserify/node_modules/url/node_modules/querystring/.Readme.md.un~ and /dev/null differ diff --git a/node_modules/browserify/node_modules/url/node_modules/querystring/.package.json.un~ b/node_modules/browserify/node_modules/url/node_modules/querystring/.package.json.un~ deleted file mode 100644 index d86fe314..00000000 Binary files a/node_modules/browserify/node_modules/url/node_modules/querystring/.package.json.un~ and /dev/null differ diff --git a/node_modules/browserify/node_modules/url/node_modules/querystring/.travis.yml b/node_modules/browserify/node_modules/url/node_modules/querystring/.travis.yml deleted file mode 100644 index 895dbd36..00000000 --- a/node_modules/browserify/node_modules/url/node_modules/querystring/.travis.yml +++ /dev/null @@ -1,4 +0,0 @@ -language: node_js -node_js: - - 0.6 - - 0.8 diff --git a/node_modules/browserify/node_modules/url/node_modules/querystring/History.md b/node_modules/browserify/node_modules/url/node_modules/querystring/History.md deleted file mode 100644 index 4fddbaf7..00000000 --- a/node_modules/browserify/node_modules/url/node_modules/querystring/History.md +++ /dev/null @@ -1,20 +0,0 @@ -# 0.2.0 / 2013-02-21 - - - Refactor into function per-module idiomatic style. - - Improved test coverage. - -# 0.1.0 / 2011-12-13 - - - Minor project reorganization - -# 0.0.3 / 2011-04-16 - - Support for AMD module loaders - -# 0.0.2 / 2011-04-16 - - - Ported unit tests - - Removed functionality that depended on Buffers - -# 0.0.1 / 2011-04-15 - - - Initial release diff --git a/node_modules/browserify/node_modules/url/node_modules/querystring/License.md b/node_modules/browserify/node_modules/url/node_modules/querystring/License.md deleted file mode 100644 index fc80e85f..00000000 --- a/node_modules/browserify/node_modules/url/node_modules/querystring/License.md +++ /dev/null @@ -1,19 +0,0 @@ - -Copyright 2012 Irakli Gozalishvili. All rights reserved. -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to -deal in the Software without restriction, including without limitation the -rights to use, copy, modify, merge, publish, distribute, sublicense, and/or -sell copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS -IN THE SOFTWARE. diff --git a/node_modules/browserify/node_modules/url/node_modules/querystring/Readme.md b/node_modules/browserify/node_modules/url/node_modules/querystring/Readme.md deleted file mode 100644 index a4fe2520..00000000 --- a/node_modules/browserify/node_modules/url/node_modules/querystring/Readme.md +++ /dev/null @@ -1,15 +0,0 @@ -# querystring - -[![Build Status](https://secure.travis-ci.org/Gozala/querystring.png)](http://travis-ci.org/Gozala/querystring) - - -[![Browser support](http://ci.testling.com/Gozala/querystring.png)](http://ci.testling.com/Gozala/querystring) - - - -Node's querystring module for all engines. - -## Install ## - - npm install querystring - diff --git a/node_modules/browserify/node_modules/url/node_modules/querystring/decode.js b/node_modules/browserify/node_modules/url/node_modules/querystring/decode.js deleted file mode 100644 index a6518b8f..00000000 --- a/node_modules/browserify/node_modules/url/node_modules/querystring/decode.js +++ /dev/null @@ -1,80 +0,0 @@ -// Copyright Joyent, Inc. and other Node contributors. -// -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to permit -// persons to whom the Software is furnished to do so, subject to the -// following conditions: -// -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -// USE OR OTHER DEALINGS IN THE SOFTWARE. - -'use strict'; - -// If obj.hasOwnProperty has been overridden, then calling -// obj.hasOwnProperty(prop) will break. -// See: https://github.com/joyent/node/issues/1707 -function hasOwnProperty(obj, prop) { - return Object.prototype.hasOwnProperty.call(obj, prop); -} - -module.exports = function(qs, sep, eq, options) { - sep = sep || '&'; - eq = eq || '='; - var obj = {}; - - if (typeof qs !== 'string' || qs.length === 0) { - return obj; - } - - var regexp = /\+/g; - qs = qs.split(sep); - - var maxKeys = 1000; - if (options && typeof options.maxKeys === 'number') { - maxKeys = options.maxKeys; - } - - var len = qs.length; - // maxKeys <= 0 means that we should not limit keys count - if (maxKeys > 0 && len > maxKeys) { - len = maxKeys; - } - - for (var i = 0; i < len; ++i) { - var x = qs[i].replace(regexp, '%20'), - idx = x.indexOf(eq), - kstr, vstr, k, v; - - if (idx >= 0) { - kstr = x.substr(0, idx); - vstr = x.substr(idx + 1); - } else { - kstr = x; - vstr = ''; - } - - k = decodeURIComponent(kstr); - v = decodeURIComponent(vstr); - - if (!hasOwnProperty(obj, k)) { - obj[k] = v; - } else if (Array.isArray(obj[k])) { - obj[k].push(v); - } else { - obj[k] = [obj[k], v]; - } - } - - return obj; -}; diff --git a/node_modules/browserify/node_modules/url/node_modules/querystring/encode.js b/node_modules/browserify/node_modules/url/node_modules/querystring/encode.js deleted file mode 100644 index 4f2b561b..00000000 --- a/node_modules/browserify/node_modules/url/node_modules/querystring/encode.js +++ /dev/null @@ -1,64 +0,0 @@ -// Copyright Joyent, Inc. and other Node contributors. -// -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to permit -// persons to whom the Software is furnished to do so, subject to the -// following conditions: -// -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -// USE OR OTHER DEALINGS IN THE SOFTWARE. - -'use strict'; - -var stringifyPrimitive = function(v) { - switch (typeof v) { - case 'string': - return v; - - case 'boolean': - return v ? 'true' : 'false'; - - case 'number': - return isFinite(v) ? v : ''; - - default: - return ''; - } -}; - -module.exports = function(obj, sep, eq, name) { - sep = sep || '&'; - eq = eq || '='; - if (obj === null) { - obj = undefined; - } - - if (typeof obj === 'object') { - return Object.keys(obj).map(function(k) { - var ks = encodeURIComponent(stringifyPrimitive(k)) + eq; - if (Array.isArray(obj[k])) { - return obj[k].map(function(v) { - return ks + encodeURIComponent(stringifyPrimitive(v)); - }).join(sep); - } else { - return ks + encodeURIComponent(stringifyPrimitive(obj[k])); - } - }).join(sep); - - } - - if (!name) return ''; - return encodeURIComponent(stringifyPrimitive(name)) + eq + - encodeURIComponent(stringifyPrimitive(obj)); -}; diff --git a/node_modules/browserify/node_modules/url/node_modules/querystring/index.js b/node_modules/browserify/node_modules/url/node_modules/querystring/index.js deleted file mode 100644 index 99826ea8..00000000 --- a/node_modules/browserify/node_modules/url/node_modules/querystring/index.js +++ /dev/null @@ -1,4 +0,0 @@ -'use strict'; - -exports.decode = exports.parse = require('./decode'); -exports.encode = exports.stringify = require('./encode'); diff --git a/node_modules/browserify/node_modules/url/node_modules/querystring/package.json b/node_modules/browserify/node_modules/url/node_modules/querystring/package.json deleted file mode 100644 index 3ad0114a..00000000 --- a/node_modules/browserify/node_modules/url/node_modules/querystring/package.json +++ /dev/null @@ -1,96 +0,0 @@ -{ - "name": "querystring", - "id": "querystring", - "version": "0.2.0", - "description": "Node's querystring module for all engines.", - "keywords": [ - "commonjs", - "query", - "querystring" - ], - "author": { - "name": "Irakli Gozalishvili", - "email": "rfobic@gmail.com" - }, - "repository": { - "type": "git", - "url": "git://github.com/Gozala/querystring.git", - "web": "https://github.com/Gozala/querystring" - }, - "bugs": { - "url": "http://github.com/Gozala/querystring/issues/" - }, - "devDependencies": { - "test": "~0.x.0", - "phantomify": "~0.x.0", - "retape": "~0.x.0", - "tape": "~0.1.5" - }, - "engines": { - "node": ">=0.4.x" - }, - "scripts": { - "test": "npm run test-node && npm run test-browser && npm run test-tap", - "test-browser": "node ./node_modules/phantomify/bin/cmd.js ./test/common-index.js", - "test-node": "node ./test/common-index.js", - "test-tap": "node ./test/tap-index.js" - }, - "testling": { - "files": "test/tap-index.js", - "browsers": { - "iexplore": [ - 9, - 10 - ], - "chrome": [ - 16, - 20, - 25, - "canary" - ], - "firefox": [ - 10, - 15, - 16, - 17, - 18, - "nightly" - ], - "safari": [ - 5, - 6 - ], - "opera": [ - 12 - ] - } - }, - "licenses": [ - { - "type": "MIT", - "url": "https://github.com/Gozala/enchain/License.md" - } - ], - "_id": "querystring@0.2.0", - "dist": { - "shasum": "b209849203bb25df820da756e747005878521620", - "tarball": "https://registry.npmjs.org/querystring/-/querystring-0.2.0.tgz" - }, - "_npmVersion": "1.1.65", - "_npmUser": { - "name": "gozala", - "email": "rfobic@gmail.com" - }, - "maintainers": [ - { - "name": "gozala", - "email": "rfobic@gmail.com" - } - ], - "directories": {}, - "_shasum": "b209849203bb25df820da756e747005878521620", - "_resolved": "https://registry.npmjs.org/querystring/-/querystring-0.2.0.tgz", - "_from": "querystring@0.2.0", - "readme": "ERROR: No README data found!", - "homepage": "https://github.com/Gozala/querystring" -} diff --git a/node_modules/browserify/node_modules/url/node_modules/querystring/test/.index.js.un~ b/node_modules/browserify/node_modules/url/node_modules/querystring/test/.index.js.un~ deleted file mode 100644 index 898ecedd..00000000 Binary files a/node_modules/browserify/node_modules/url/node_modules/querystring/test/.index.js.un~ and /dev/null differ diff --git a/node_modules/browserify/node_modules/url/node_modules/querystring/test/common-index.js b/node_modules/browserify/node_modules/url/node_modules/querystring/test/common-index.js deleted file mode 100644 index f356f987..00000000 --- a/node_modules/browserify/node_modules/url/node_modules/querystring/test/common-index.js +++ /dev/null @@ -1,3 +0,0 @@ -"use strict"; - -require("test").run(require("./index")) \ No newline at end of file diff --git a/node_modules/browserify/node_modules/url/node_modules/querystring/test/index.js b/node_modules/browserify/node_modules/url/node_modules/querystring/test/index.js deleted file mode 100644 index 62eb2ac8..00000000 --- a/node_modules/browserify/node_modules/url/node_modules/querystring/test/index.js +++ /dev/null @@ -1,210 +0,0 @@ -// Copyright Joyent, Inc. and other Node contributors. -// -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to permit -// persons to whom the Software is furnished to do so, subject to the -// following conditions: -// -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -// USE OR OTHER DEALINGS IN THE SOFTWARE. - -"use strict"; - -// test using assert -var qs = require('../'); - -// folding block, commented to pass gjslint -// {{{ -// [ wonkyQS, canonicalQS, obj ] -var qsTestCases = [ - ['foo=918854443121279438895193', - 'foo=918854443121279438895193', - {'foo': '918854443121279438895193'}], - ['foo=bar', 'foo=bar', {'foo': 'bar'}], - ['foo=bar&foo=quux', 'foo=bar&foo=quux', {'foo': ['bar', 'quux']}], - ['foo=1&bar=2', 'foo=1&bar=2', {'foo': '1', 'bar': '2'}], - ['my+weird+field=q1%212%22%27w%245%267%2Fz8%29%3F', - 'my%20weird%20field=q1!2%22\'w%245%267%2Fz8)%3F', - {'my weird field': 'q1!2"\'w$5&7/z8)?' }], - ['foo%3Dbaz=bar', 'foo%3Dbaz=bar', {'foo=baz': 'bar'}], - ['foo=baz=bar', 'foo=baz%3Dbar', {'foo': 'baz=bar'}], - ['str=foo&arr=1&arr=2&arr=3&somenull=&undef=', - 'str=foo&arr=1&arr=2&arr=3&somenull=&undef=', - { 'str': 'foo', - 'arr': ['1', '2', '3'], - 'somenull': '', - 'undef': ''}], - [' foo = bar ', '%20foo%20=%20bar%20', {' foo ': ' bar '}], - // disable test that fails ['foo=%zx', 'foo=%25zx', {'foo': '%zx'}], - ['foo=%EF%BF%BD', 'foo=%EF%BF%BD', {'foo': '\ufffd' }], - // See: https://github.com/joyent/node/issues/1707 - ['hasOwnProperty=x&toString=foo&valueOf=bar&__defineGetter__=baz', - 'hasOwnProperty=x&toString=foo&valueOf=bar&__defineGetter__=baz', - { hasOwnProperty: 'x', - toString: 'foo', - valueOf: 'bar', - __defineGetter__: 'baz' }], - // See: https://github.com/joyent/node/issues/3058 - ['foo&bar=baz', 'foo=&bar=baz', { foo: '', bar: 'baz' }] -]; - -// [ wonkyQS, canonicalQS, obj ] -var qsColonTestCases = [ - ['foo:bar', 'foo:bar', {'foo': 'bar'}], - ['foo:bar;foo:quux', 'foo:bar;foo:quux', {'foo': ['bar', 'quux']}], - ['foo:1&bar:2;baz:quux', - 'foo:1%26bar%3A2;baz:quux', - {'foo': '1&bar:2', 'baz': 'quux'}], - ['foo%3Abaz:bar', 'foo%3Abaz:bar', {'foo:baz': 'bar'}], - ['foo:baz:bar', 'foo:baz%3Abar', {'foo': 'baz:bar'}] -]; - -// [wonkyObj, qs, canonicalObj] -var extendedFunction = function() {}; -extendedFunction.prototype = {a: 'b'}; -var qsWeirdObjects = [ - [{regexp: /./g}, 'regexp=', {'regexp': ''}], - [{regexp: new RegExp('.', 'g')}, 'regexp=', {'regexp': ''}], - [{fn: function() {}}, 'fn=', {'fn': ''}], - [{fn: new Function('')}, 'fn=', {'fn': ''}], - [{math: Math}, 'math=', {'math': ''}], - [{e: extendedFunction}, 'e=', {'e': ''}], - [{d: new Date()}, 'd=', {'d': ''}], - [{d: Date}, 'd=', {'d': ''}], - [{f: new Boolean(false), t: new Boolean(true)}, 'f=&t=', {'f': '', 't': ''}], - [{f: false, t: true}, 'f=false&t=true', {'f': 'false', 't': 'true'}], - [{n: null}, 'n=', {'n': ''}], - [{nan: NaN}, 'nan=', {'nan': ''}], - [{inf: Infinity}, 'inf=', {'inf': ''}] -]; -// }}} - -var qsNoMungeTestCases = [ - ['', {}], - ['foo=bar&foo=baz', {'foo': ['bar', 'baz']}], - ['blah=burp', {'blah': 'burp'}], - ['gragh=1&gragh=3&goo=2', {'gragh': ['1', '3'], 'goo': '2'}], - ['frappucino=muffin&goat%5B%5D=scone&pond=moose', - {'frappucino': 'muffin', 'goat[]': 'scone', 'pond': 'moose'}], - ['trololol=yes&lololo=no', {'trololol': 'yes', 'lololo': 'no'}] -]; - -exports['test basic'] = function(assert) { - assert.strictEqual('918854443121279438895193', - qs.parse('id=918854443121279438895193').id, - 'prase id=918854443121279438895193'); -}; - -exports['test that the canonical qs is parsed properly'] = function(assert) { - qsTestCases.forEach(function(testCase) { - assert.deepEqual(testCase[2], qs.parse(testCase[0]), - 'parse ' + testCase[0]); - }); -}; - - -exports['test that the colon test cases can do the same'] = function(assert) { - qsColonTestCases.forEach(function(testCase) { - assert.deepEqual(testCase[2], qs.parse(testCase[0], ';', ':'), - 'parse ' + testCase[0] + ' -> ; :'); - }); -}; - -exports['test the weird objects, that they get parsed properly'] = function(assert) { - qsWeirdObjects.forEach(function(testCase) { - assert.deepEqual(testCase[2], qs.parse(testCase[1]), - 'parse ' + testCase[1]); - }); -}; - -exports['test non munge test cases'] = function(assert) { - qsNoMungeTestCases.forEach(function(testCase) { - assert.deepEqual(testCase[0], qs.stringify(testCase[1], '&', '=', false), - 'stringify ' + JSON.stringify(testCase[1]) + ' -> & ='); - }); -}; - -exports['test the nested qs-in-qs case'] = function(assert) { - var f = qs.parse('a=b&q=x%3Dy%26y%3Dz'); - f.q = qs.parse(f.q); - assert.deepEqual(f, { a: 'b', q: { x: 'y', y: 'z' } }, - 'parse a=b&q=x%3Dy%26y%3Dz'); -}; - -exports['test nested in colon'] = function(assert) { - var f = qs.parse('a:b;q:x%3Ay%3By%3Az', ';', ':'); - f.q = qs.parse(f.q, ';', ':'); - assert.deepEqual(f, { a: 'b', q: { x: 'y', y: 'z' } }, - 'parse a:b;q:x%3Ay%3By%3Az -> ; :'); -}; - -exports['test stringifying'] = function(assert) { - qsTestCases.forEach(function(testCase) { - assert.equal(testCase[1], qs.stringify(testCase[2]), - 'stringify ' + JSON.stringify(testCase[2])); - }); - - qsColonTestCases.forEach(function(testCase) { - assert.equal(testCase[1], qs.stringify(testCase[2], ';', ':'), - 'stringify ' + JSON.stringify(testCase[2]) + ' -> ; :'); - }); - - qsWeirdObjects.forEach(function(testCase) { - assert.equal(testCase[1], qs.stringify(testCase[0]), - 'stringify ' + JSON.stringify(testCase[0])); - }); -}; - -exports['test stringifying nested'] = function(assert) { - var f = qs.stringify({ - a: 'b', - q: qs.stringify({ - x: 'y', - y: 'z' - }) - }); - assert.equal(f, 'a=b&q=x%3Dy%26y%3Dz', - JSON.stringify({ - a: 'b', - 'qs.stringify -> q': { - x: 'y', - y: 'z' - } - })); - - var threw = false; - try { qs.parse(undefined); } catch(error) { threw = true; } - assert.ok(!threw, "does not throws on undefined"); -}; - -exports['test nested in colon'] = function(assert) { - var f = qs.stringify({ - a: 'b', - q: qs.stringify({ - x: 'y', - y: 'z' - }, ';', ':') - }, ';', ':'); - assert.equal(f, 'a:b;q:x%3Ay%3By%3Az', - 'stringify ' + JSON.stringify({ - a: 'b', - 'qs.stringify -> q': { - x: 'y', - y: 'z' - } - }) + ' -> ; : '); - - - assert.deepEqual({}, qs.parse(), 'parse undefined'); -}; diff --git a/node_modules/browserify/node_modules/url/node_modules/querystring/test/tap-index.js b/node_modules/browserify/node_modules/url/node_modules/querystring/test/tap-index.js deleted file mode 100644 index 70679b3f..00000000 --- a/node_modules/browserify/node_modules/url/node_modules/querystring/test/tap-index.js +++ /dev/null @@ -1,3 +0,0 @@ -"use strict"; - -require("retape")(require("./index")) \ No newline at end of file diff --git a/node_modules/browserify/node_modules/url/package.json b/node_modules/browserify/node_modules/url/package.json deleted file mode 100644 index 9172430c..00000000 --- a/node_modules/browserify/node_modules/url/package.json +++ /dev/null @@ -1,55 +0,0 @@ -{ - "name": "url", - "description": "The core `url` packaged standalone for use with Browserify.", - "version": "0.10.3", - "dependencies": { - "punycode": "1.3.2", - "querystring": "0.2.0" - }, - "main": "./url.js", - "devDependencies": { - "assert": "1.1.1", - "mocha": "1.18.2", - "zuul": "2.0.0" - }, - "scripts": { - "test": "mocha --ui qunit test.js && zuul -- test.js", - "test-local": "zuul --local -- test.js" - }, - "repository": { - "type": "git", - "url": "https://github.com/defunctzombie/node-url.git" - }, - "license": "MIT", - "gitHead": "575b428ae37eb43f243d0228dea1b44ecf744f3d", - "bugs": { - "url": "https://github.com/defunctzombie/node-url/issues" - }, - "homepage": "https://github.com/defunctzombie/node-url", - "_id": "url@0.10.3", - "_shasum": "021e4d9c7705f21bbf37d03ceb58767402774c64", - "_from": "url@>=0.10.1 <0.11.0", - "_npmVersion": "2.2.0", - "_nodeVersion": "0.10.35", - "_npmUser": { - "name": "shtylman", - "email": "shtylman@gmail.com" - }, - "maintainers": [ - { - "name": "coolaj86", - "email": "coolaj86@gmail.com" - }, - { - "name": "shtylman", - "email": "shtylman@gmail.com" - } - ], - "dist": { - "shasum": "021e4d9c7705f21bbf37d03ceb58767402774c64", - "tarball": "https://registry.npmjs.org/url/-/url-0.10.3.tgz" - }, - "directories": {}, - "_resolved": "https://registry.npmjs.org/url/-/url-0.10.3.tgz", - "readme": "ERROR: No README data found!" -} diff --git a/node_modules/browserify/node_modules/url/test.js b/node_modules/browserify/node_modules/url/test.js deleted file mode 100644 index b9663c73..00000000 --- a/node_modules/browserify/node_modules/url/test.js +++ /dev/null @@ -1,1461 +0,0 @@ -// Copyright Joyent, Inc. and other Node contributors. -// -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to permit -// persons to whom the Software is furnished to do so, subject to the -// following conditions: -// -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -// USE OR OTHER DEALINGS IN THE SOFTWARE. - -var assert = require('assert'); -var util = require('util'); - -var url = require('./url'); - -test('god', function() { - -// URLs to parse, and expected data -// { url : parsed } -var parseTests = { - '//some_path' : { - 'href': '//some_path', - 'pathname': '//some_path', - 'path': '//some_path' - }, - - 'HTTP://www.example.com/' : { - 'href': 'http://www.example.com/', - 'protocol': 'http:', - 'slashes': true, - 'host': 'www.example.com', - 'hostname': 'www.example.com', - 'pathname': '/', - 'path': '/' - }, - - 'HTTP://www.example.com' : { - 'href': 'http://www.example.com/', - 'protocol': 'http:', - 'slashes': true, - 'host': 'www.example.com', - 'hostname': 'www.example.com', - 'pathname': '/', - 'path': '/' - }, - - 'http://www.ExAmPlE.com/' : { - 'href': 'http://www.example.com/', - 'protocol': 'http:', - 'slashes': true, - 'host': 'www.example.com', - 'hostname': 'www.example.com', - 'pathname': '/', - 'path': '/' - }, - - 'http://user:pw@www.ExAmPlE.com/' : { - 'href': 'http://user:pw@www.example.com/', - 'protocol': 'http:', - 'slashes': true, - 'auth': 'user:pw', - 'host': 'www.example.com', - 'hostname': 'www.example.com', - 'pathname': '/', - 'path': '/' - }, - - 'http://USER:PW@www.ExAmPlE.com/' : { - 'href': 'http://USER:PW@www.example.com/', - 'protocol': 'http:', - 'slashes': true, - 'auth': 'USER:PW', - 'host': 'www.example.com', - 'hostname': 'www.example.com', - 'pathname': '/', - 'path': '/' - }, - - 'http://user@www.example.com/' : { - 'href': 'http://user@www.example.com/', - 'protocol': 'http:', - 'slashes': true, - 'auth': 'user', - 'host': 'www.example.com', - 'hostname': 'www.example.com', - 'pathname': '/', - 'path': '/' - }, - - 'http://user%3Apw@www.example.com/' : { - 'href': 'http://user:pw@www.example.com/', - 'protocol': 'http:', - 'slashes': true, - 'auth': 'user:pw', - 'host': 'www.example.com', - 'hostname': 'www.example.com', - 'pathname': '/', - 'path': '/' - }, - - 'http://x.com/path?that\'s#all, folks' : { - 'href': 'http://x.com/path?that%27s#all,%20folks', - 'protocol': 'http:', - 'slashes': true, - 'host': 'x.com', - 'hostname': 'x.com', - 'search': '?that%27s', - 'query': 'that%27s', - 'pathname': '/path', - 'hash': '#all,%20folks', - 'path': '/path?that%27s' - }, - - 'HTTP://X.COM/Y' : { - 'href': 'http://x.com/Y', - 'protocol': 'http:', - 'slashes': true, - 'host': 'x.com', - 'hostname': 'x.com', - 'pathname': '/Y', - 'path': '/Y' - }, - - // an unexpected invalid char in the hostname. - 'HtTp://x.y.cOm*a/b/c?d=e#f gi' : { - 'href': 'http://x.y.com/*a/b/c?d=e#f%20g%3Ch%3Ei', - 'protocol': 'http:', - 'slashes': true, - 'host': 'x.y.com', - 'hostname': 'x.y.com', - 'pathname': '/*a/b/c', - 'search': '?d=e', - 'query': 'd=e', - 'hash': '#f%20g%3Ch%3Ei', - 'path': '/*a/b/c?d=e' - }, - - // make sure that we don't accidentally lcast the path parts. - 'HtTp://x.y.cOm*A/b/c?d=e#f gi' : { - 'href': 'http://x.y.com/*A/b/c?d=e#f%20g%3Ch%3Ei', - 'protocol': 'http:', - 'slashes': true, - 'host': 'x.y.com', - 'hostname': 'x.y.com', - 'pathname': '/*A/b/c', - 'search': '?d=e', - 'query': 'd=e', - 'hash': '#f%20g%3Ch%3Ei', - 'path': '/*A/b/c?d=e' - }, - - 'http://x...y...#p': { - 'href': 'http://x...y.../#p', - 'protocol': 'http:', - 'slashes': true, - 'host': 'x...y...', - 'hostname': 'x...y...', - 'hash': '#p', - 'pathname': '/', - 'path': '/' - }, - - 'http://x/p/"quoted"': { - 'href': 'http://x/p/%22quoted%22', - 'protocol': 'http:', - 'slashes': true, - 'host': 'x', - 'hostname': 'x', - 'pathname': '/p/%22quoted%22', - 'path': '/p/%22quoted%22' - }, - - ' Is a URL!': { - 'href': '%3Chttp://goo.corn/bread%3E%20Is%20a%20URL!', - 'pathname': '%3Chttp://goo.corn/bread%3E%20Is%20a%20URL!', - 'path': '%3Chttp://goo.corn/bread%3E%20Is%20a%20URL!' - }, - - 'http://www.narwhaljs.org/blog/categories?id=news' : { - 'href': 'http://www.narwhaljs.org/blog/categories?id=news', - 'protocol': 'http:', - 'slashes': true, - 'host': 'www.narwhaljs.org', - 'hostname': 'www.narwhaljs.org', - 'search': '?id=news', - 'query': 'id=news', - 'pathname': '/blog/categories', - 'path': '/blog/categories?id=news' - }, - - 'http://mt0.google.com/vt/lyrs=m@114&hl=en&src=api&x=2&y=2&z=3&s=' : { - 'href': 'http://mt0.google.com/vt/lyrs=m@114&hl=en&src=api&x=2&y=2&z=3&s=', - 'protocol': 'http:', - 'slashes': true, - 'host': 'mt0.google.com', - 'hostname': 'mt0.google.com', - 'pathname': '/vt/lyrs=m@114&hl=en&src=api&x=2&y=2&z=3&s=', - 'path': '/vt/lyrs=m@114&hl=en&src=api&x=2&y=2&z=3&s=' - }, - - 'http://mt0.google.com/vt/lyrs=m@114???&hl=en&src=api&x=2&y=2&z=3&s=' : { - 'href': 'http://mt0.google.com/vt/lyrs=m@114???&hl=en&src=api' + - '&x=2&y=2&z=3&s=', - 'protocol': 'http:', - 'slashes': true, - 'host': 'mt0.google.com', - 'hostname': 'mt0.google.com', - 'search': '???&hl=en&src=api&x=2&y=2&z=3&s=', - 'query': '??&hl=en&src=api&x=2&y=2&z=3&s=', - 'pathname': '/vt/lyrs=m@114', - 'path': '/vt/lyrs=m@114???&hl=en&src=api&x=2&y=2&z=3&s=' - }, - - 'http://user:pass@mt0.google.com/vt/lyrs=m@114???&hl=en&src=api&x=2&y=2&z=3&s=': - { - 'href': 'http://user:pass@mt0.google.com/vt/lyrs=m@114???' + - '&hl=en&src=api&x=2&y=2&z=3&s=', - 'protocol': 'http:', - 'slashes': true, - 'host': 'mt0.google.com', - 'auth': 'user:pass', - 'hostname': 'mt0.google.com', - 'search': '???&hl=en&src=api&x=2&y=2&z=3&s=', - 'query': '??&hl=en&src=api&x=2&y=2&z=3&s=', - 'pathname': '/vt/lyrs=m@114', - 'path': '/vt/lyrs=m@114???&hl=en&src=api&x=2&y=2&z=3&s=' - }, - - 'file:///etc/passwd' : { - 'href': 'file:///etc/passwd', - 'slashes': true, - 'protocol': 'file:', - 'pathname': '/etc/passwd', - 'hostname': '', - 'host': '', - 'path': '/etc/passwd' - }, - - 'file://localhost/etc/passwd' : { - 'href': 'file://localhost/etc/passwd', - 'protocol': 'file:', - 'slashes': true, - 'pathname': '/etc/passwd', - 'hostname': 'localhost', - 'host': 'localhost', - 'path': '/etc/passwd' - }, - - 'file://foo/etc/passwd' : { - 'href': 'file://foo/etc/passwd', - 'protocol': 'file:', - 'slashes': true, - 'pathname': '/etc/passwd', - 'hostname': 'foo', - 'host': 'foo', - 'path': '/etc/passwd' - }, - - 'file:///etc/node/' : { - 'href': 'file:///etc/node/', - 'slashes': true, - 'protocol': 'file:', - 'pathname': '/etc/node/', - 'hostname': '', - 'host': '', - 'path': '/etc/node/' - }, - - 'file://localhost/etc/node/' : { - 'href': 'file://localhost/etc/node/', - 'protocol': 'file:', - 'slashes': true, - 'pathname': '/etc/node/', - 'hostname': 'localhost', - 'host': 'localhost', - 'path': '/etc/node/' - }, - - 'file://foo/etc/node/' : { - 'href': 'file://foo/etc/node/', - 'protocol': 'file:', - 'slashes': true, - 'pathname': '/etc/node/', - 'hostname': 'foo', - 'host': 'foo', - 'path': '/etc/node/' - }, - - 'http:/baz/../foo/bar' : { - 'href': 'http:/baz/../foo/bar', - 'protocol': 'http:', - 'pathname': '/baz/../foo/bar', - 'path': '/baz/../foo/bar' - }, - - 'http://user:pass@example.com:8000/foo/bar?baz=quux#frag' : { - 'href': 'http://user:pass@example.com:8000/foo/bar?baz=quux#frag', - 'protocol': 'http:', - 'slashes': true, - 'host': 'example.com:8000', - 'auth': 'user:pass', - 'port': '8000', - 'hostname': 'example.com', - 'hash': '#frag', - 'search': '?baz=quux', - 'query': 'baz=quux', - 'pathname': '/foo/bar', - 'path': '/foo/bar?baz=quux' - }, - - '//user:pass@example.com:8000/foo/bar?baz=quux#frag' : { - 'href': '//user:pass@example.com:8000/foo/bar?baz=quux#frag', - 'slashes': true, - 'host': 'example.com:8000', - 'auth': 'user:pass', - 'port': '8000', - 'hostname': 'example.com', - 'hash': '#frag', - 'search': '?baz=quux', - 'query': 'baz=quux', - 'pathname': '/foo/bar', - 'path': '/foo/bar?baz=quux' - }, - - '/foo/bar?baz=quux#frag' : { - 'href': '/foo/bar?baz=quux#frag', - 'hash': '#frag', - 'search': '?baz=quux', - 'query': 'baz=quux', - 'pathname': '/foo/bar', - 'path': '/foo/bar?baz=quux' - }, - - 'http:/foo/bar?baz=quux#frag' : { - 'href': 'http:/foo/bar?baz=quux#frag', - 'protocol': 'http:', - 'hash': '#frag', - 'search': '?baz=quux', - 'query': 'baz=quux', - 'pathname': '/foo/bar', - 'path': '/foo/bar?baz=quux' - }, - - 'mailto:foo@bar.com?subject=hello' : { - 'href': 'mailto:foo@bar.com?subject=hello', - 'protocol': 'mailto:', - 'host': 'bar.com', - 'auth' : 'foo', - 'hostname' : 'bar.com', - 'search': '?subject=hello', - 'query': 'subject=hello', - 'path': '?subject=hello' - }, - - 'javascript:alert(\'hello\');' : { - 'href': 'javascript:alert(\'hello\');', - 'protocol': 'javascript:', - 'pathname': 'alert(\'hello\');', - 'path': 'alert(\'hello\');' - }, - - 'xmpp:isaacschlueter@jabber.org' : { - 'href': 'xmpp:isaacschlueter@jabber.org', - 'protocol': 'xmpp:', - 'host': 'jabber.org', - 'auth': 'isaacschlueter', - 'hostname': 'jabber.org' - }, - - 'http://atpass:foo%40bar@127.0.0.1:8080/path?search=foo#bar' : { - 'href' : 'http://atpass:foo%40bar@127.0.0.1:8080/path?search=foo#bar', - 'protocol' : 'http:', - 'slashes': true, - 'host' : '127.0.0.1:8080', - 'auth' : 'atpass:foo@bar', - 'hostname' : '127.0.0.1', - 'port' : '8080', - 'pathname': '/path', - 'search' : '?search=foo', - 'query' : 'search=foo', - 'hash' : '#bar', - 'path': '/path?search=foo' - }, - - 'svn+ssh://foo/bar': { - 'href': 'svn+ssh://foo/bar', - 'host': 'foo', - 'hostname': 'foo', - 'protocol': 'svn+ssh:', - 'pathname': '/bar', - 'path': '/bar', - 'slashes': true - }, - - 'dash-test://foo/bar': { - 'href': 'dash-test://foo/bar', - 'host': 'foo', - 'hostname': 'foo', - 'protocol': 'dash-test:', - 'pathname': '/bar', - 'path': '/bar', - 'slashes': true - }, - - 'dash-test:foo/bar': { - 'href': 'dash-test:foo/bar', - 'host': 'foo', - 'hostname': 'foo', - 'protocol': 'dash-test:', - 'pathname': '/bar', - 'path': '/bar' - }, - - 'dot.test://foo/bar': { - 'href': 'dot.test://foo/bar', - 'host': 'foo', - 'hostname': 'foo', - 'protocol': 'dot.test:', - 'pathname': '/bar', - 'path': '/bar', - 'slashes': true - }, - - 'dot.test:foo/bar': { - 'href': 'dot.test:foo/bar', - 'host': 'foo', - 'hostname': 'foo', - 'protocol': 'dot.test:', - 'pathname': '/bar', - 'path': '/bar' - }, - - // IDNA tests - 'http://www.日本語.com/' : { - 'href': 'http://www.xn--wgv71a119e.com/', - 'protocol': 'http:', - 'slashes': true, - 'host': 'www.xn--wgv71a119e.com', - 'hostname': 'www.xn--wgv71a119e.com', - 'pathname': '/', - 'path': '/' - }, - - 'http://example.Bücher.com/' : { - 'href': 'http://example.xn--bcher-kva.com/', - 'protocol': 'http:', - 'slashes': true, - 'host': 'example.xn--bcher-kva.com', - 'hostname': 'example.xn--bcher-kva.com', - 'pathname': '/', - 'path': '/' - }, - - 'http://www.Äffchen.com/' : { - 'href': 'http://www.xn--ffchen-9ta.com/', - 'protocol': 'http:', - 'slashes': true, - 'host': 'www.xn--ffchen-9ta.com', - 'hostname': 'www.xn--ffchen-9ta.com', - 'pathname': '/', - 'path': '/' - }, - - 'http://www.Äffchen.cOm*A/b/c?d=e#f gi' : { - 'href': 'http://www.xn--ffchen-9ta.com/*A/b/c?d=e#f%20g%3Ch%3Ei', - 'protocol': 'http:', - 'slashes': true, - 'host': 'www.xn--ffchen-9ta.com', - 'hostname': 'www.xn--ffchen-9ta.com', - 'pathname': '/*A/b/c', - 'search': '?d=e', - 'query': 'd=e', - 'hash': '#f%20g%3Ch%3Ei', - 'path': '/*A/b/c?d=e' - }, - - 'http://SÉLIER.COM/' : { - 'href': 'http://xn--slier-bsa.com/', - 'protocol': 'http:', - 'slashes': true, - 'host': 'xn--slier-bsa.com', - 'hostname': 'xn--slier-bsa.com', - 'pathname': '/', - 'path': '/' - }, - - 'http://ليهمابتكلموشعربي؟.ي؟/' : { - 'href': 'http://xn--egbpdaj6bu4bxfgehfvwxn.xn--egb9f/', - 'protocol': 'http:', - 'slashes': true, - 'host': 'xn--egbpdaj6bu4bxfgehfvwxn.xn--egb9f', - 'hostname': 'xn--egbpdaj6bu4bxfgehfvwxn.xn--egb9f', - 'pathname': '/', - 'path': '/' - }, - - 'http://➡.ws/➡' : { - 'href': 'http://xn--hgi.ws/➡', - 'protocol': 'http:', - 'slashes': true, - 'host': 'xn--hgi.ws', - 'hostname': 'xn--hgi.ws', - 'pathname': '/➡', - 'path': '/➡' - }, - - 'http://bucket_name.s3.amazonaws.com/image.jpg': { - protocol: 'http:', - slashes: true, - host: 'bucket_name.s3.amazonaws.com', - hostname: 'bucket_name.s3.amazonaws.com', - pathname: '/image.jpg', - href: 'http://bucket_name.s3.amazonaws.com/image.jpg', - 'path': '/image.jpg' - }, - - 'git+http://github.com/joyent/node.git': { - protocol: 'git+http:', - slashes: true, - host: 'github.com', - hostname: 'github.com', - pathname: '/joyent/node.git', - path: '/joyent/node.git', - href: 'git+http://github.com/joyent/node.git' - }, - - //if local1@domain1 is uses as a relative URL it may - //be parse into auth@hostname, but here there is no - //way to make it work in url.parse, I add the test to be explicit - 'local1@domain1': { - 'pathname': 'local1@domain1', - 'path': 'local1@domain1', - 'href': 'local1@domain1' - }, - - //While this may seem counter-intuitive, a browser will parse - // as a path. - 'www.example.com' : { - 'href': 'www.example.com', - 'pathname': 'www.example.com', - 'path': 'www.example.com' - }, - - // ipv6 support - '[fe80::1]': { - 'href': '[fe80::1]', - 'pathname': '[fe80::1]', - 'path': '[fe80::1]' - }, - - 'coap://[FEDC:BA98:7654:3210:FEDC:BA98:7654:3210]': { - 'protocol': 'coap:', - 'slashes': true, - 'host': '[fedc:ba98:7654:3210:fedc:ba98:7654:3210]', - 'hostname': 'fedc:ba98:7654:3210:fedc:ba98:7654:3210', - 'href': 'coap://[fedc:ba98:7654:3210:fedc:ba98:7654:3210]/', - 'pathname': '/', - 'path': '/' - }, - - 'coap://[1080:0:0:0:8:800:200C:417A]:61616/': { - 'protocol': 'coap:', - 'slashes': true, - 'host': '[1080:0:0:0:8:800:200c:417a]:61616', - 'port': '61616', - 'hostname': '1080:0:0:0:8:800:200c:417a', - 'href': 'coap://[1080:0:0:0:8:800:200c:417a]:61616/', - 'pathname': '/', - 'path': '/' - }, - - 'http://user:password@[3ffe:2a00:100:7031::1]:8080': { - 'protocol': 'http:', - 'slashes': true, - 'auth': 'user:password', - 'host': '[3ffe:2a00:100:7031::1]:8080', - 'port': '8080', - 'hostname': '3ffe:2a00:100:7031::1', - 'href': 'http://user:password@[3ffe:2a00:100:7031::1]:8080/', - 'pathname': '/', - 'path': '/' - }, - - 'coap://u:p@[::192.9.5.5]:61616/.well-known/r?n=Temperature': { - 'protocol': 'coap:', - 'slashes': true, - 'auth': 'u:p', - 'host': '[::192.9.5.5]:61616', - 'port': '61616', - 'hostname': '::192.9.5.5', - 'href': 'coap://u:p@[::192.9.5.5]:61616/.well-known/r?n=Temperature', - 'search': '?n=Temperature', - 'query': 'n=Temperature', - 'pathname': '/.well-known/r', - 'path': '/.well-known/r?n=Temperature' - }, - - // empty port - 'http://example.com:': { - 'protocol': 'http:', - 'slashes': true, - 'host': 'example.com', - 'hostname': 'example.com', - 'href': 'http://example.com/', - 'pathname': '/', - 'path': '/' - }, - - 'http://example.com:/a/b.html': { - 'protocol': 'http:', - 'slashes': true, - 'host': 'example.com', - 'hostname': 'example.com', - 'href': 'http://example.com/a/b.html', - 'pathname': '/a/b.html', - 'path': '/a/b.html' - }, - - 'http://example.com:?a=b': { - 'protocol': 'http:', - 'slashes': true, - 'host': 'example.com', - 'hostname': 'example.com', - 'href': 'http://example.com/?a=b', - 'search': '?a=b', - 'query': 'a=b', - 'pathname': '/', - 'path': '/?a=b' - }, - - 'http://example.com:#abc': { - 'protocol': 'http:', - 'slashes': true, - 'host': 'example.com', - 'hostname': 'example.com', - 'href': 'http://example.com/#abc', - 'hash': '#abc', - 'pathname': '/', - 'path': '/' - }, - - 'http://[fe80::1]:/a/b?a=b#abc': { - 'protocol': 'http:', - 'slashes': true, - 'host': '[fe80::1]', - 'hostname': 'fe80::1', - 'href': 'http://[fe80::1]/a/b?a=b#abc', - 'search': '?a=b', - 'query': 'a=b', - 'hash': '#abc', - 'pathname': '/a/b', - 'path': '/a/b?a=b' - }, - - 'http://-lovemonsterz.tumblr.com/rss': { - 'protocol': 'http:', - 'slashes': true, - 'host': '-lovemonsterz.tumblr.com', - 'hostname': '-lovemonsterz.tumblr.com', - 'href': 'http://-lovemonsterz.tumblr.com/rss', - 'pathname': '/rss', - 'path': '/rss', - }, - - 'http://-lovemonsterz.tumblr.com:80/rss': { - 'protocol': 'http:', - 'slashes': true, - 'port': '80', - 'host': '-lovemonsterz.tumblr.com:80', - 'hostname': '-lovemonsterz.tumblr.com', - 'href': 'http://-lovemonsterz.tumblr.com:80/rss', - 'pathname': '/rss', - 'path': '/rss', - }, - - 'http://user:pass@-lovemonsterz.tumblr.com/rss': { - 'protocol': 'http:', - 'slashes': true, - 'auth': 'user:pass', - 'host': '-lovemonsterz.tumblr.com', - 'hostname': '-lovemonsterz.tumblr.com', - 'href': 'http://user:pass@-lovemonsterz.tumblr.com/rss', - 'pathname': '/rss', - 'path': '/rss', - }, - - 'http://user:pass@-lovemonsterz.tumblr.com:80/rss': { - 'protocol': 'http:', - 'slashes': true, - 'auth': 'user:pass', - 'port': '80', - 'host': '-lovemonsterz.tumblr.com:80', - 'hostname': '-lovemonsterz.tumblr.com', - 'href': 'http://user:pass@-lovemonsterz.tumblr.com:80/rss', - 'pathname': '/rss', - 'path': '/rss', - }, - - 'http://_jabber._tcp.google.com/test': { - 'protocol': 'http:', - 'slashes': true, - 'host': '_jabber._tcp.google.com', - 'hostname': '_jabber._tcp.google.com', - 'href': 'http://_jabber._tcp.google.com/test', - 'pathname': '/test', - 'path': '/test', - }, - - 'http://user:pass@_jabber._tcp.google.com/test': { - 'protocol': 'http:', - 'slashes': true, - 'auth': 'user:pass', - 'host': '_jabber._tcp.google.com', - 'hostname': '_jabber._tcp.google.com', - 'href': 'http://user:pass@_jabber._tcp.google.com/test', - 'pathname': '/test', - 'path': '/test', - }, - - 'http://_jabber._tcp.google.com:80/test': { - 'protocol': 'http:', - 'slashes': true, - 'port': '80', - 'host': '_jabber._tcp.google.com:80', - 'hostname': '_jabber._tcp.google.com', - 'href': 'http://_jabber._tcp.google.com:80/test', - 'pathname': '/test', - 'path': '/test', - }, - - 'http://user:pass@_jabber._tcp.google.com:80/test': { - 'protocol': 'http:', - 'slashes': true, - 'auth': 'user:pass', - 'port': '80', - 'host': '_jabber._tcp.google.com:80', - 'hostname': '_jabber._tcp.google.com', - 'href': 'http://user:pass@_jabber._tcp.google.com:80/test', - 'pathname': '/test', - 'path': '/test', - }, - - 'http://a@b@c/': { - protocol: 'http:', - slashes: true, - auth: 'a@b', - host: 'c', - hostname: 'c', - href: 'http://a%40b@c/', - path: '/', - pathname: '/' - }, - - 'http://a@b?@c': { - protocol: 'http:', - slashes: true, - auth: 'a', - host: 'b', - hostname: 'b', - href: 'http://a@b/?@c', - path: '/?@c', - pathname: '/', - search: '?@c', - query: '@c' - }, - - 'http://a\r" \t\n<\'b:b@c\r\nd/e?f':{ - protocol: 'http:', - slashes: true, - auth: 'a\r" \t\n<\'b:b', - host: 'c', - port: null, - hostname: 'c', - hash: null, - search: '?f', - query: 'f', - pathname: '%0D%0Ad/e', - path: '%0D%0Ad/e?f', - href: 'http://a%0D%22%20%09%0A%3C\'b:b@c/%0D%0Ad/e?f' - } - -}; - -for (var u in parseTests) { - var actual = url.parse(u), - spaced = url.parse(' \t ' + u + '\n\t'); - expected = parseTests[u]; - - Object.keys(actual).forEach(function (i) { - if (expected[i] === undefined && actual[i] === null) { - expected[i] = null; - } - }); - - assert.deepEqual(actual, expected); - assert.deepEqual(spaced, expected); - - var expected = parseTests[u].href, - actual = url.format(parseTests[u]); - - assert.equal(actual, expected, - 'format(' + u + ') == ' + u + '\nactual:' + actual); -} - -var parseTestsWithQueryString = { - '/foo/bar?baz=quux#frag' : { - 'href': '/foo/bar?baz=quux#frag', - 'hash': '#frag', - 'search': '?baz=quux', - 'query': { - 'baz': 'quux' - }, - 'pathname': '/foo/bar', - 'path': '/foo/bar?baz=quux' - }, - 'http://example.com' : { - 'href': 'http://example.com/', - 'protocol': 'http:', - 'slashes': true, - 'host': 'example.com', - 'hostname': 'example.com', - 'query': {}, - 'search': '', - 'pathname': '/', - 'path': '/' - } -}; -for (var u in parseTestsWithQueryString) { - var actual = url.parse(u, true); - var expected = parseTestsWithQueryString[u]; - for (var i in actual) { - if (actual[i] === null && expected[i] === undefined) { - expected[i] = null; - } - } - - assert.deepEqual(actual, expected); -} - -// some extra formatting tests, just to verify -// that it'll format slightly wonky content to a valid url. -var formatTests = { - 'http://example.com?' : { - 'href': 'http://example.com/?', - 'protocol': 'http:', - 'slashes': true, - 'host': 'example.com', - 'hostname': 'example.com', - 'search': '?', - 'query': {}, - 'pathname': '/' - }, - 'http://example.com?foo=bar#frag' : { - 'href': 'http://example.com/?foo=bar#frag', - 'protocol': 'http:', - 'host': 'example.com', - 'hostname': 'example.com', - 'hash': '#frag', - 'search': '?foo=bar', - 'query': 'foo=bar', - 'pathname': '/' - }, - 'http://example.com?foo=@bar#frag' : { - 'href': 'http://example.com/?foo=@bar#frag', - 'protocol': 'http:', - 'host': 'example.com', - 'hostname': 'example.com', - 'hash': '#frag', - 'search': '?foo=@bar', - 'query': 'foo=@bar', - 'pathname': '/' - }, - 'http://example.com?foo=/bar/#frag' : { - 'href': 'http://example.com/?foo=/bar/#frag', - 'protocol': 'http:', - 'host': 'example.com', - 'hostname': 'example.com', - 'hash': '#frag', - 'search': '?foo=/bar/', - 'query': 'foo=/bar/', - 'pathname': '/' - }, - 'http://example.com?foo=?bar/#frag' : { - 'href': 'http://example.com/?foo=?bar/#frag', - 'protocol': 'http:', - 'host': 'example.com', - 'hostname': 'example.com', - 'hash': '#frag', - 'search': '?foo=?bar/', - 'query': 'foo=?bar/', - 'pathname': '/' - }, - 'http://example.com#frag=?bar/#frag' : { - 'href': 'http://example.com/#frag=?bar/#frag', - 'protocol': 'http:', - 'host': 'example.com', - 'hostname': 'example.com', - 'hash': '#frag=?bar/#frag', - 'pathname': '/' - }, - 'http://google.com" onload="alert(42)/' : { - 'href': 'http://google.com/%22%20onload=%22alert(42)/', - 'protocol': 'http:', - 'host': 'google.com', - 'pathname': '/%22%20onload=%22alert(42)/' - }, - 'http://a.com/a/b/c?s#h' : { - 'href': 'http://a.com/a/b/c?s#h', - 'protocol': 'http', - 'host': 'a.com', - 'pathname': 'a/b/c', - 'hash': 'h', - 'search': 's' - }, - 'xmpp:isaacschlueter@jabber.org' : { - 'href': 'xmpp:isaacschlueter@jabber.org', - 'protocol': 'xmpp:', - 'host': 'jabber.org', - 'auth': 'isaacschlueter', - 'hostname': 'jabber.org' - }, - 'http://atpass:foo%40bar@127.0.0.1/' : { - 'href': 'http://atpass:foo%40bar@127.0.0.1/', - 'auth': 'atpass:foo@bar', - 'hostname': '127.0.0.1', - 'protocol': 'http:', - 'pathname': '/' - }, - 'http://atslash%2F%40:%2F%40@foo/' : { - 'href': 'http://atslash%2F%40:%2F%40@foo/', - 'auth': 'atslash/@:/@', - 'hostname': 'foo', - 'protocol': 'http:', - 'pathname': '/' - }, - 'svn+ssh://foo/bar': { - 'href': 'svn+ssh://foo/bar', - 'hostname': 'foo', - 'protocol': 'svn+ssh:', - 'pathname': '/bar', - 'slashes': true - }, - 'dash-test://foo/bar': { - 'href': 'dash-test://foo/bar', - 'hostname': 'foo', - 'protocol': 'dash-test:', - 'pathname': '/bar', - 'slashes': true - }, - 'dash-test:foo/bar': { - 'href': 'dash-test:foo/bar', - 'hostname': 'foo', - 'protocol': 'dash-test:', - 'pathname': '/bar' - }, - 'dot.test://foo/bar': { - 'href': 'dot.test://foo/bar', - 'hostname': 'foo', - 'protocol': 'dot.test:', - 'pathname': '/bar', - 'slashes': true - }, - 'dot.test:foo/bar': { - 'href': 'dot.test:foo/bar', - 'hostname': 'foo', - 'protocol': 'dot.test:', - 'pathname': '/bar' - }, - // ipv6 support - 'coap:u:p@[::1]:61616/.well-known/r?n=Temperature': { - 'href': 'coap:u:p@[::1]:61616/.well-known/r?n=Temperature', - 'protocol': 'coap:', - 'auth': 'u:p', - 'hostname': '::1', - 'port': '61616', - 'pathname': '/.well-known/r', - 'search': 'n=Temperature' - }, - 'coap:[fedc:ba98:7654:3210:fedc:ba98:7654:3210]:61616/s/stopButton': { - 'href': 'coap:[fedc:ba98:7654:3210:fedc:ba98:7654:3210]:61616/s/stopButton', - 'protocol': 'coap', - 'host': '[fedc:ba98:7654:3210:fedc:ba98:7654:3210]:61616', - 'pathname': '/s/stopButton' - }, - - // encode context-specific delimiters in path and query, but do not touch - // other non-delimiter chars like `%`. - // - - // `#`,`?` in path - '/path/to/%%23%3F+=&.txt?foo=theA1#bar' : { - href : '/path/to/%%23%3F+=&.txt?foo=theA1#bar', - pathname: '/path/to/%#?+=&.txt', - query: { - foo: 'theA1' - }, - hash: "#bar" - }, - - // `#`,`?` in path + `#` in query - '/path/to/%%23%3F+=&.txt?foo=the%231#bar' : { - href : '/path/to/%%23%3F+=&.txt?foo=the%231#bar', - pathname: '/path/to/%#?+=&.txt', - query: { - foo: 'the#1' - }, - hash: "#bar" - }, - - // `?` and `#` in path and search - 'http://ex.com/foo%3F100%m%23r?abc=the%231?&foo=bar#frag': { - href: 'http://ex.com/foo%3F100%m%23r?abc=the%231?&foo=bar#frag', - protocol: 'http:', - hostname: 'ex.com', - hash: '#frag', - search: '?abc=the#1?&foo=bar', - pathname: '/foo?100%m#r', - }, - - // `?` and `#` in search only - 'http://ex.com/fooA100%mBr?abc=the%231?&foo=bar#frag': { - href: 'http://ex.com/fooA100%mBr?abc=the%231?&foo=bar#frag', - protocol: 'http:', - hostname: 'ex.com', - hash: '#frag', - search: '?abc=the#1?&foo=bar', - pathname: '/fooA100%mBr', - } -}; -for (var u in formatTests) { - var expect = formatTests[u].href; - delete formatTests[u].href; - var actual = url.format(u); - var actualObj = url.format(formatTests[u]); - assert.equal(actual, expect, - 'wonky format(' + u + ') == ' + expect + - '\nactual:' + actual); - assert.equal(actualObj, expect, - 'wonky format(' + JSON.stringify(formatTests[u]) + - ') == ' + expect + - '\nactual: ' + actualObj); -} - -/* - [from, path, expected] -*/ -var relativeTests = [ - ['/foo/bar/baz', 'quux', '/foo/bar/quux'], - ['/foo/bar/baz', 'quux/asdf', '/foo/bar/quux/asdf'], - ['/foo/bar/baz', 'quux/baz', '/foo/bar/quux/baz'], - ['/foo/bar/baz', '../quux/baz', '/foo/quux/baz'], - ['/foo/bar/baz', '/bar', '/bar'], - ['/foo/bar/baz/', 'quux', '/foo/bar/baz/quux'], - ['/foo/bar/baz/', 'quux/baz', '/foo/bar/baz/quux/baz'], - ['/foo/bar/baz', '../../../../../../../../quux/baz', '/quux/baz'], - ['/foo/bar/baz', '../../../../../../../quux/baz', '/quux/baz'], - ['foo/bar', '../../../baz', '../../baz'], - ['foo/bar/', '../../../baz', '../baz'], - ['http://example.com/b//c//d;p?q#blarg', 'https:#hash2', 'https:///#hash2'], - ['http://example.com/b//c//d;p?q#blarg', - 'https:/p/a/t/h?s#hash2', - 'https://p/a/t/h?s#hash2'], - ['http://example.com/b//c//d;p?q#blarg', - 'https://u:p@h.com/p/a/t/h?s#hash2', - 'https://u:p@h.com/p/a/t/h?s#hash2'], - ['http://example.com/b//c//d;p?q#blarg', - 'https:/a/b/c/d', - 'https://a/b/c/d'], - ['http://example.com/b//c//d;p?q#blarg', - 'http:#hash2', - 'http://example.com/b//c//d;p?q#hash2'], - ['http://example.com/b//c//d;p?q#blarg', - 'http:/p/a/t/h?s#hash2', - 'http://example.com/p/a/t/h?s#hash2'], - ['http://example.com/b//c//d;p?q#blarg', - 'http://u:p@h.com/p/a/t/h?s#hash2', - 'http://u:p@h.com/p/a/t/h?s#hash2'], - ['http://example.com/b//c//d;p?q#blarg', - 'http:/a/b/c/d', - 'http://example.com/a/b/c/d'], - ['/foo/bar/baz', '/../etc/passwd', '/etc/passwd'] -]; -relativeTests.forEach(function(relativeTest) { - var a = url.resolve(relativeTest[0], relativeTest[1]), - e = relativeTest[2]; - assert.equal(a, e, - 'resolve(' + [relativeTest[0], relativeTest[1]] + ') == ' + e + - '\n actual=' + a); -}); - - -// https://github.com/joyent/node/issues/568 -[ - undefined, - null, - true, - false, - 0.0, - 0, - [], - {} -].forEach(function(val) { - assert.throws(function() { url.parse(val); }, TypeError); -}); - - -// -// Tests below taken from Chiron -// http://code.google.com/p/chironjs/source/browse/trunk/src/test/http/url.js -// -// Copyright (c) 2002-2008 Kris Kowal -// used with permission under MIT License -// -// Changes marked with @isaacs - -var bases = [ - 'http://a/b/c/d;p?q', - 'http://a/b/c/d;p?q=1/2', - 'http://a/b/c/d;p=1/2?q', - 'fred:///s//a/b/c', - 'http:///s//a/b/c' -]; - -//[to, from, result] -var relativeTests2 = [ - // http://lists.w3.org/Archives/Public/uri/2004Feb/0114.html - ['../c', 'foo:a/b', 'foo:c'], - ['foo:.', 'foo:a', 'foo:'], - ['/foo/../../../bar', 'zz:abc', 'zz:/bar'], - ['/foo/../bar', 'zz:abc', 'zz:/bar'], - // @isaacs Disagree. Not how web browsers resolve this. - ['foo/../../../bar', 'zz:abc', 'zz:bar'], - // ['foo/../../../bar', 'zz:abc', 'zz:../../bar'], // @isaacs Added - ['foo/../bar', 'zz:abc', 'zz:bar'], - ['zz:.', 'zz:abc', 'zz:'], - ['/.', bases[0], 'http://a/'], - ['/.foo', bases[0], 'http://a/.foo'], - ['.foo', bases[0], 'http://a/b/c/.foo'], - - // http://gbiv.com/protocols/uri/test/rel_examples1.html - // examples from RFC 2396 - ['g:h', bases[0], 'g:h'], - ['g', bases[0], 'http://a/b/c/g'], - ['./g', bases[0], 'http://a/b/c/g'], - ['g/', bases[0], 'http://a/b/c/g/'], - ['/g', bases[0], 'http://a/g'], - ['//g', bases[0], 'http://g/'], - // changed with RFC 2396bis - //('?y', bases[0], 'http://a/b/c/d;p?y'], - ['?y', bases[0], 'http://a/b/c/d;p?y'], - ['g?y', bases[0], 'http://a/b/c/g?y'], - // changed with RFC 2396bis - //('#s', bases[0], CURRENT_DOC_URI + '#s'], - ['#s', bases[0], 'http://a/b/c/d;p?q#s'], - ['g#s', bases[0], 'http://a/b/c/g#s'], - ['g?y#s', bases[0], 'http://a/b/c/g?y#s'], - [';x', bases[0], 'http://a/b/c/;x'], - ['g;x', bases[0], 'http://a/b/c/g;x'], - ['g;x?y#s', bases[0], 'http://a/b/c/g;x?y#s'], - // changed with RFC 2396bis - //('', bases[0], CURRENT_DOC_URI], - ['', bases[0], 'http://a/b/c/d;p?q'], - ['.', bases[0], 'http://a/b/c/'], - ['./', bases[0], 'http://a/b/c/'], - ['..', bases[0], 'http://a/b/'], - ['../', bases[0], 'http://a/b/'], - ['../g', bases[0], 'http://a/b/g'], - ['../..', bases[0], 'http://a/'], - ['../../', bases[0], 'http://a/'], - ['../../g', bases[0], 'http://a/g'], - ['../../../g', bases[0], ('http://a/../g', 'http://a/g')], - ['../../../../g', bases[0], ('http://a/../../g', 'http://a/g')], - // changed with RFC 2396bis - //('/./g', bases[0], 'http://a/./g'], - ['/./g', bases[0], 'http://a/g'], - // changed with RFC 2396bis - //('/../g', bases[0], 'http://a/../g'], - ['/../g', bases[0], 'http://a/g'], - ['g.', bases[0], 'http://a/b/c/g.'], - ['.g', bases[0], 'http://a/b/c/.g'], - ['g..', bases[0], 'http://a/b/c/g..'], - ['..g', bases[0], 'http://a/b/c/..g'], - ['./../g', bases[0], 'http://a/b/g'], - ['./g/.', bases[0], 'http://a/b/c/g/'], - ['g/./h', bases[0], 'http://a/b/c/g/h'], - ['g/../h', bases[0], 'http://a/b/c/h'], - ['g;x=1/./y', bases[0], 'http://a/b/c/g;x=1/y'], - ['g;x=1/../y', bases[0], 'http://a/b/c/y'], - ['g?y/./x', bases[0], 'http://a/b/c/g?y/./x'], - ['g?y/../x', bases[0], 'http://a/b/c/g?y/../x'], - ['g#s/./x', bases[0], 'http://a/b/c/g#s/./x'], - ['g#s/../x', bases[0], 'http://a/b/c/g#s/../x'], - ['http:g', bases[0], ('http:g', 'http://a/b/c/g')], - ['http:', bases[0], ('http:', bases[0])], - // not sure where this one originated - ['/a/b/c/./../../g', bases[0], 'http://a/a/g'], - - // http://gbiv.com/protocols/uri/test/rel_examples2.html - // slashes in base URI's query args - ['g', bases[1], 'http://a/b/c/g'], - ['./g', bases[1], 'http://a/b/c/g'], - ['g/', bases[1], 'http://a/b/c/g/'], - ['/g', bases[1], 'http://a/g'], - ['//g', bases[1], 'http://g/'], - // changed in RFC 2396bis - //('?y', bases[1], 'http://a/b/c/?y'], - ['?y', bases[1], 'http://a/b/c/d;p?y'], - ['g?y', bases[1], 'http://a/b/c/g?y'], - ['g?y/./x', bases[1], 'http://a/b/c/g?y/./x'], - ['g?y/../x', bases[1], 'http://a/b/c/g?y/../x'], - ['g#s', bases[1], 'http://a/b/c/g#s'], - ['g#s/./x', bases[1], 'http://a/b/c/g#s/./x'], - ['g#s/../x', bases[1], 'http://a/b/c/g#s/../x'], - ['./', bases[1], 'http://a/b/c/'], - ['../', bases[1], 'http://a/b/'], - ['../g', bases[1], 'http://a/b/g'], - ['../../', bases[1], 'http://a/'], - ['../../g', bases[1], 'http://a/g'], - - // http://gbiv.com/protocols/uri/test/rel_examples3.html - // slashes in path params - // all of these changed in RFC 2396bis - ['g', bases[2], 'http://a/b/c/d;p=1/g'], - ['./g', bases[2], 'http://a/b/c/d;p=1/g'], - ['g/', bases[2], 'http://a/b/c/d;p=1/g/'], - ['g?y', bases[2], 'http://a/b/c/d;p=1/g?y'], - [';x', bases[2], 'http://a/b/c/d;p=1/;x'], - ['g;x', bases[2], 'http://a/b/c/d;p=1/g;x'], - ['g;x=1/./y', bases[2], 'http://a/b/c/d;p=1/g;x=1/y'], - ['g;x=1/../y', bases[2], 'http://a/b/c/d;p=1/y'], - ['./', bases[2], 'http://a/b/c/d;p=1/'], - ['../', bases[2], 'http://a/b/c/'], - ['../g', bases[2], 'http://a/b/c/g'], - ['../../', bases[2], 'http://a/b/'], - ['../../g', bases[2], 'http://a/b/g'], - - // http://gbiv.com/protocols/uri/test/rel_examples4.html - // double and triple slash, unknown scheme - ['g:h', bases[3], 'g:h'], - ['g', bases[3], 'fred:///s//a/b/g'], - ['./g', bases[3], 'fred:///s//a/b/g'], - ['g/', bases[3], 'fred:///s//a/b/g/'], - ['/g', bases[3], 'fred:///g'], // may change to fred:///s//a/g - ['//g', bases[3], 'fred://g'], // may change to fred:///s//g - ['//g/x', bases[3], 'fred://g/x'], // may change to fred:///s//g/x - ['///g', bases[3], 'fred:///g'], - ['./', bases[3], 'fred:///s//a/b/'], - ['../', bases[3], 'fred:///s//a/'], - ['../g', bases[3], 'fred:///s//a/g'], - - ['../../', bases[3], 'fred:///s//'], - ['../../g', bases[3], 'fred:///s//g'], - ['../../../g', bases[3], 'fred:///s/g'], - // may change to fred:///s//a/../../../g - ['../../../../g', bases[3], 'fred:///g'], - - // http://gbiv.com/protocols/uri/test/rel_examples5.html - // double and triple slash, well-known scheme - ['g:h', bases[4], 'g:h'], - ['g', bases[4], 'http:///s//a/b/g'], - ['./g', bases[4], 'http:///s//a/b/g'], - ['g/', bases[4], 'http:///s//a/b/g/'], - ['/g', bases[4], 'http:///g'], // may change to http:///s//a/g - ['//g', bases[4], 'http://g/'], // may change to http:///s//g - ['//g/x', bases[4], 'http://g/x'], // may change to http:///s//g/x - ['///g', bases[4], 'http:///g'], - ['./', bases[4], 'http:///s//a/b/'], - ['../', bases[4], 'http:///s//a/'], - ['../g', bases[4], 'http:///s//a/g'], - ['../../', bases[4], 'http:///s//'], - ['../../g', bases[4], 'http:///s//g'], - // may change to http:///s//a/../../g - ['../../../g', bases[4], 'http:///s/g'], - // may change to http:///s//a/../../../g - ['../../../../g', bases[4], 'http:///g'], - - // from Dan Connelly's tests in http://www.w3.org/2000/10/swap/uripath.py - ['bar:abc', 'foo:xyz', 'bar:abc'], - ['../abc', 'http://example/x/y/z', 'http://example/x/abc'], - ['http://example/x/abc', 'http://example2/x/y/z', 'http://example/x/abc'], - ['../r', 'http://ex/x/y/z', 'http://ex/x/r'], - ['q/r', 'http://ex/x/y', 'http://ex/x/q/r'], - ['q/r#s', 'http://ex/x/y', 'http://ex/x/q/r#s'], - ['q/r#s/t', 'http://ex/x/y', 'http://ex/x/q/r#s/t'], - ['ftp://ex/x/q/r', 'http://ex/x/y', 'ftp://ex/x/q/r'], - ['', 'http://ex/x/y', 'http://ex/x/y'], - ['', 'http://ex/x/y/', 'http://ex/x/y/'], - ['', 'http://ex/x/y/pdq', 'http://ex/x/y/pdq'], - ['z/', 'http://ex/x/y/', 'http://ex/x/y/z/'], - ['#Animal', - 'file:/swap/test/animal.rdf', - 'file:/swap/test/animal.rdf#Animal'], - ['../abc', 'file:/e/x/y/z', 'file:/e/x/abc'], - ['/example/x/abc', 'file:/example2/x/y/z', 'file:/example/x/abc'], - ['../r', 'file:/ex/x/y/z', 'file:/ex/x/r'], - ['/r', 'file:/ex/x/y/z', 'file:/r'], - ['q/r', 'file:/ex/x/y', 'file:/ex/x/q/r'], - ['q/r#s', 'file:/ex/x/y', 'file:/ex/x/q/r#s'], - ['q/r#', 'file:/ex/x/y', 'file:/ex/x/q/r#'], - ['q/r#s/t', 'file:/ex/x/y', 'file:/ex/x/q/r#s/t'], - ['ftp://ex/x/q/r', 'file:/ex/x/y', 'ftp://ex/x/q/r'], - ['', 'file:/ex/x/y', 'file:/ex/x/y'], - ['', 'file:/ex/x/y/', 'file:/ex/x/y/'], - ['', 'file:/ex/x/y/pdq', 'file:/ex/x/y/pdq'], - ['z/', 'file:/ex/x/y/', 'file:/ex/x/y/z/'], - ['file://meetings.example.com/cal#m1', - 'file:/devel/WWW/2000/10/swap/test/reluri-1.n3', - 'file://meetings.example.com/cal#m1'], - ['file://meetings.example.com/cal#m1', - 'file:/home/connolly/w3ccvs/WWW/2000/10/swap/test/reluri-1.n3', - 'file://meetings.example.com/cal#m1'], - ['./#blort', 'file:/some/dir/foo', 'file:/some/dir/#blort'], - ['./#', 'file:/some/dir/foo', 'file:/some/dir/#'], - // Ryan Lee - ['./', 'http://example/x/abc.efg', 'http://example/x/'], - - - // Graham Klyne's tests - // http://www.ninebynine.org/Software/HaskellUtils/Network/UriTest.xls - // 01-31 are from Connelly's cases - - // 32-49 - ['./q:r', 'http://ex/x/y', 'http://ex/x/q:r'], - ['./p=q:r', 'http://ex/x/y', 'http://ex/x/p=q:r'], - ['?pp/rr', 'http://ex/x/y?pp/qq', 'http://ex/x/y?pp/rr'], - ['y/z', 'http://ex/x/y?pp/qq', 'http://ex/x/y/z'], - ['local/qual@domain.org#frag', - 'mailto:local', - 'mailto:local/qual@domain.org#frag'], - ['more/qual2@domain2.org#frag', - 'mailto:local/qual1@domain1.org', - 'mailto:local/more/qual2@domain2.org#frag'], - ['y?q', 'http://ex/x/y?q', 'http://ex/x/y?q'], - ['/x/y?q', 'http://ex?p', 'http://ex/x/y?q'], - ['c/d', 'foo:a/b', 'foo:a/c/d'], - ['/c/d', 'foo:a/b', 'foo:/c/d'], - ['', 'foo:a/b?c#d', 'foo:a/b?c'], - ['b/c', 'foo:a', 'foo:b/c'], - ['../b/c', 'foo:/a/y/z', 'foo:/a/b/c'], - ['./b/c', 'foo:a', 'foo:b/c'], - ['/./b/c', 'foo:a', 'foo:/b/c'], - ['../../d', 'foo://a//b/c', 'foo://a/d'], - ['.', 'foo:a', 'foo:'], - ['..', 'foo:a', 'foo:'], - - // 50-57[cf. TimBL comments -- - // http://lists.w3.org/Archives/Public/uri/2003Feb/0028.html, - // http://lists.w3.org/Archives/Public/uri/2003Jan/0008.html) - ['abc', 'http://example/x/y%2Fz', 'http://example/x/abc'], - ['../../x%2Fabc', 'http://example/a/x/y/z', 'http://example/a/x%2Fabc'], - ['../x%2Fabc', 'http://example/a/x/y%2Fz', 'http://example/a/x%2Fabc'], - ['abc', 'http://example/x%2Fy/z', 'http://example/x%2Fy/abc'], - ['q%3Ar', 'http://ex/x/y', 'http://ex/x/q%3Ar'], - ['/x%2Fabc', 'http://example/x/y%2Fz', 'http://example/x%2Fabc'], - ['/x%2Fabc', 'http://example/x/y/z', 'http://example/x%2Fabc'], - ['/x%2Fabc', 'http://example/x/y%2Fz', 'http://example/x%2Fabc'], - - // 70-77 - ['local2@domain2', 'mailto:local1@domain1?query1', 'mailto:local2@domain2'], - ['local2@domain2?query2', - 'mailto:local1@domain1', - 'mailto:local2@domain2?query2'], - ['local2@domain2?query2', - 'mailto:local1@domain1?query1', - 'mailto:local2@domain2?query2'], - ['?query2', 'mailto:local@domain?query1', 'mailto:local@domain?query2'], - ['local@domain?query2', 'mailto:?query1', 'mailto:local@domain?query2'], - ['?query2', 'mailto:local@domain?query1', 'mailto:local@domain?query2'], - ['http://example/a/b?c/../d', 'foo:bar', 'http://example/a/b?c/../d'], - ['http://example/a/b#c/../d', 'foo:bar', 'http://example/a/b#c/../d'], - - // 82-88 - // @isaacs Disagree. Not how browsers do it. - // ['http:this', 'http://example.org/base/uri', 'http:this'], - // @isaacs Added - ['http:this', 'http://example.org/base/uri', 'http://example.org/base/this'], - ['http:this', 'http:base', 'http:this'], - ['.//g', 'f:/a', 'f://g'], - ['b/c//d/e', 'f://example.org/base/a', 'f://example.org/base/b/c//d/e'], - ['m2@example.ord/c2@example.org', - 'mid:m@example.ord/c@example.org', - 'mid:m@example.ord/m2@example.ord/c2@example.org'], - ['mini1.xml', - 'file:///C:/DEV/Haskell/lib/HXmlToolbox-3.01/examples/', - 'file:///C:/DEV/Haskell/lib/HXmlToolbox-3.01/examples/mini1.xml'], - ['../b/c', 'foo:a/y/z', 'foo:a/b/c'], - - //changeing auth - ['http://diff:auth@www.example.com', - 'http://asdf:qwer@www.example.com', - 'http://diff:auth@www.example.com/'] -]; -relativeTests2.forEach(function(relativeTest) { - var a = url.resolve(relativeTest[1], relativeTest[0]), - e = relativeTest[2]; - assert.equal(a, e, - 'resolve(' + [relativeTest[1], relativeTest[0]] + ') == ' + e + - '\n actual=' + a); -}); - -//if format and parse are inverse operations then -//resolveObject(parse(x), y) == parse(resolve(x, y)) - -//host and hostname are special, in this case a '' value is important -var emptyIsImportant = {'host': true, 'hostname': ''}; - -//format: [from, path, expected] -relativeTests.forEach(function(relativeTest) { - var actual = url.resolveObject(url.parse(relativeTest[0]), relativeTest[1]), - expected = url.parse(relativeTest[2]); - - - assert.deepEqual(actual, expected); - - expected = relativeTest[2]; - actual = url.format(actual); - - assert.equal(actual, expected, - 'format(' + actual + ') == ' + expected + '\nactual:' + actual); -}); - -//format: [to, from, result] -// the test: ['.//g', 'f:/a', 'f://g'] is a fundimental problem -// url.parse('f:/a') does not have a host -// url.resolve('f:/a', './/g') does not have a host becuase you have moved -// down to the g directory. i.e. f: //g, however when this url is parsed -// f:// will indicate that the host is g which is not the case. -// it is unclear to me how to keep this information from being lost -// it may be that a pathname of ////g should colapse to /g but this seems -// to be a lot of work for an edge case. Right now I remove the test -if (relativeTests2[181][0] === './/g' && - relativeTests2[181][1] === 'f:/a' && - relativeTests2[181][2] === 'f://g') { - relativeTests2.splice(181, 1); -} -relativeTests2.forEach(function(relativeTest) { - var actual = url.resolveObject(url.parse(relativeTest[1]), relativeTest[0]), - expected = url.parse(relativeTest[2]); - - assert.deepEqual(actual, expected); - - var expected = relativeTest[2], - actual = url.format(actual); - - assert.equal(actual, expected, - 'format(' + relativeTest[1] + ') == ' + expected + - '\nactual:' + actual); -}); - -}); diff --git a/node_modules/browserify/node_modules/url/url.js b/node_modules/browserify/node_modules/url/url.js deleted file mode 100644 index ddc4ade0..00000000 --- a/node_modules/browserify/node_modules/url/url.js +++ /dev/null @@ -1,707 +0,0 @@ -// Copyright Joyent, Inc. and other Node contributors. -// -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to permit -// persons to whom the Software is furnished to do so, subject to the -// following conditions: -// -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -// USE OR OTHER DEALINGS IN THE SOFTWARE. - -var punycode = require('punycode'); - -exports.parse = urlParse; -exports.resolve = urlResolve; -exports.resolveObject = urlResolveObject; -exports.format = urlFormat; - -exports.Url = Url; - -function Url() { - this.protocol = null; - this.slashes = null; - this.auth = null; - this.host = null; - this.port = null; - this.hostname = null; - this.hash = null; - this.search = null; - this.query = null; - this.pathname = null; - this.path = null; - this.href = null; -} - -// Reference: RFC 3986, RFC 1808, RFC 2396 - -// define these here so at least they only have to be -// compiled once on the first module load. -var protocolPattern = /^([a-z0-9.+-]+:)/i, - portPattern = /:[0-9]*$/, - - // RFC 2396: characters reserved for delimiting URLs. - // We actually just auto-escape these. - delims = ['<', '>', '"', '`', ' ', '\r', '\n', '\t'], - - // RFC 2396: characters not allowed for various reasons. - unwise = ['{', '}', '|', '\\', '^', '`'].concat(delims), - - // Allowed by RFCs, but cause of XSS attacks. Always escape these. - autoEscape = ['\''].concat(unwise), - // Characters that are never ever allowed in a hostname. - // Note that any invalid chars are also handled, but these - // are the ones that are *expected* to be seen, so we fast-path - // them. - nonHostChars = ['%', '/', '?', ';', '#'].concat(autoEscape), - hostEndingChars = ['/', '?', '#'], - hostnameMaxLen = 255, - hostnamePartPattern = /^[a-z0-9A-Z_-]{0,63}$/, - hostnamePartStart = /^([a-z0-9A-Z_-]{0,63})(.*)$/, - // protocols that can allow "unsafe" and "unwise" chars. - unsafeProtocol = { - 'javascript': true, - 'javascript:': true - }, - // protocols that never have a hostname. - hostlessProtocol = { - 'javascript': true, - 'javascript:': true - }, - // protocols that always contain a // bit. - slashedProtocol = { - 'http': true, - 'https': true, - 'ftp': true, - 'gopher': true, - 'file': true, - 'http:': true, - 'https:': true, - 'ftp:': true, - 'gopher:': true, - 'file:': true - }, - querystring = require('querystring'); - -function urlParse(url, parseQueryString, slashesDenoteHost) { - if (url && isObject(url) && url instanceof Url) return url; - - var u = new Url; - u.parse(url, parseQueryString, slashesDenoteHost); - return u; -} - -Url.prototype.parse = function(url, parseQueryString, slashesDenoteHost) { - if (!isString(url)) { - throw new TypeError("Parameter 'url' must be a string, not " + typeof url); - } - - var rest = url; - - // trim before proceeding. - // This is to support parse stuff like " http://foo.com \n" - rest = rest.trim(); - - var proto = protocolPattern.exec(rest); - if (proto) { - proto = proto[0]; - var lowerProto = proto.toLowerCase(); - this.protocol = lowerProto; - rest = rest.substr(proto.length); - } - - // figure out if it's got a host - // user@server is *always* interpreted as a hostname, and url - // resolution will treat //foo/bar as host=foo,path=bar because that's - // how the browser resolves relative URLs. - if (slashesDenoteHost || proto || rest.match(/^\/\/[^@\/]+@[^@\/]+/)) { - var slashes = rest.substr(0, 2) === '//'; - if (slashes && !(proto && hostlessProtocol[proto])) { - rest = rest.substr(2); - this.slashes = true; - } - } - - if (!hostlessProtocol[proto] && - (slashes || (proto && !slashedProtocol[proto]))) { - - // there's a hostname. - // the first instance of /, ?, ;, or # ends the host. - // - // If there is an @ in the hostname, then non-host chars *are* allowed - // to the left of the last @ sign, unless some host-ending character - // comes *before* the @-sign. - // URLs are obnoxious. - // - // ex: - // http://a@b@c/ => user:a@b host:c - // http://a@b?@c => user:a host:c path:/?@c - - // v0.12 TODO(isaacs): This is not quite how Chrome does things. - // Review our test case against browsers more comprehensively. - - // find the first instance of any hostEndingChars - var hostEnd = -1; - for (var i = 0; i < hostEndingChars.length; i++) { - var hec = rest.indexOf(hostEndingChars[i]); - if (hec !== -1 && (hostEnd === -1 || hec < hostEnd)) - hostEnd = hec; - } - - // at this point, either we have an explicit point where the - // auth portion cannot go past, or the last @ char is the decider. - var auth, atSign; - if (hostEnd === -1) { - // atSign can be anywhere. - atSign = rest.lastIndexOf('@'); - } else { - // atSign must be in auth portion. - // http://a@b/c@d => host:b auth:a path:/c@d - atSign = rest.lastIndexOf('@', hostEnd); - } - - // Now we have a portion which is definitely the auth. - // Pull that off. - if (atSign !== -1) { - auth = rest.slice(0, atSign); - rest = rest.slice(atSign + 1); - this.auth = decodeURIComponent(auth); - } - - // the host is the remaining to the left of the first non-host char - hostEnd = -1; - for (var i = 0; i < nonHostChars.length; i++) { - var hec = rest.indexOf(nonHostChars[i]); - if (hec !== -1 && (hostEnd === -1 || hec < hostEnd)) - hostEnd = hec; - } - // if we still have not hit it, then the entire thing is a host. - if (hostEnd === -1) - hostEnd = rest.length; - - this.host = rest.slice(0, hostEnd); - rest = rest.slice(hostEnd); - - // pull out port. - this.parseHost(); - - // we've indicated that there is a hostname, - // so even if it's empty, it has to be present. - this.hostname = this.hostname || ''; - - // if hostname begins with [ and ends with ] - // assume that it's an IPv6 address. - var ipv6Hostname = this.hostname[0] === '[' && - this.hostname[this.hostname.length - 1] === ']'; - - // validate a little. - if (!ipv6Hostname) { - var hostparts = this.hostname.split(/\./); - for (var i = 0, l = hostparts.length; i < l; i++) { - var part = hostparts[i]; - if (!part) continue; - if (!part.match(hostnamePartPattern)) { - var newpart = ''; - for (var j = 0, k = part.length; j < k; j++) { - if (part.charCodeAt(j) > 127) { - // we replace non-ASCII char with a temporary placeholder - // we need this to make sure size of hostname is not - // broken by replacing non-ASCII by nothing - newpart += 'x'; - } else { - newpart += part[j]; - } - } - // we test again with ASCII char only - if (!newpart.match(hostnamePartPattern)) { - var validParts = hostparts.slice(0, i); - var notHost = hostparts.slice(i + 1); - var bit = part.match(hostnamePartStart); - if (bit) { - validParts.push(bit[1]); - notHost.unshift(bit[2]); - } - if (notHost.length) { - rest = '/' + notHost.join('.') + rest; - } - this.hostname = validParts.join('.'); - break; - } - } - } - } - - if (this.hostname.length > hostnameMaxLen) { - this.hostname = ''; - } else { - // hostnames are always lower case. - this.hostname = this.hostname.toLowerCase(); - } - - if (!ipv6Hostname) { - // IDNA Support: Returns a puny coded representation of "domain". - // It only converts the part of the domain name that - // has non ASCII characters. I.e. it dosent matter if - // you call it with a domain that already is in ASCII. - var domainArray = this.hostname.split('.'); - var newOut = []; - for (var i = 0; i < domainArray.length; ++i) { - var s = domainArray[i]; - newOut.push(s.match(/[^A-Za-z0-9_-]/) ? - 'xn--' + punycode.encode(s) : s); - } - this.hostname = newOut.join('.'); - } - - var p = this.port ? ':' + this.port : ''; - var h = this.hostname || ''; - this.host = h + p; - this.href += this.host; - - // strip [ and ] from the hostname - // the host field still retains them, though - if (ipv6Hostname) { - this.hostname = this.hostname.substr(1, this.hostname.length - 2); - if (rest[0] !== '/') { - rest = '/' + rest; - } - } - } - - // now rest is set to the post-host stuff. - // chop off any delim chars. - if (!unsafeProtocol[lowerProto]) { - - // First, make 100% sure that any "autoEscape" chars get - // escaped, even if encodeURIComponent doesn't think they - // need to be. - for (var i = 0, l = autoEscape.length; i < l; i++) { - var ae = autoEscape[i]; - var esc = encodeURIComponent(ae); - if (esc === ae) { - esc = escape(ae); - } - rest = rest.split(ae).join(esc); - } - } - - - // chop off from the tail first. - var hash = rest.indexOf('#'); - if (hash !== -1) { - // got a fragment string. - this.hash = rest.substr(hash); - rest = rest.slice(0, hash); - } - var qm = rest.indexOf('?'); - if (qm !== -1) { - this.search = rest.substr(qm); - this.query = rest.substr(qm + 1); - if (parseQueryString) { - this.query = querystring.parse(this.query); - } - rest = rest.slice(0, qm); - } else if (parseQueryString) { - // no query string, but parseQueryString still requested - this.search = ''; - this.query = {}; - } - if (rest) this.pathname = rest; - if (slashedProtocol[lowerProto] && - this.hostname && !this.pathname) { - this.pathname = '/'; - } - - //to support http.request - if (this.pathname || this.search) { - var p = this.pathname || ''; - var s = this.search || ''; - this.path = p + s; - } - - // finally, reconstruct the href based on what has been validated. - this.href = this.format(); - return this; -}; - -// format a parsed object into a url string -function urlFormat(obj) { - // ensure it's an object, and not a string url. - // If it's an obj, this is a no-op. - // this way, you can call url_format() on strings - // to clean up potentially wonky urls. - if (isString(obj)) obj = urlParse(obj); - if (!(obj instanceof Url)) return Url.prototype.format.call(obj); - return obj.format(); -} - -Url.prototype.format = function() { - var auth = this.auth || ''; - if (auth) { - auth = encodeURIComponent(auth); - auth = auth.replace(/%3A/i, ':'); - auth += '@'; - } - - var protocol = this.protocol || '', - pathname = this.pathname || '', - hash = this.hash || '', - host = false, - query = ''; - - if (this.host) { - host = auth + this.host; - } else if (this.hostname) { - host = auth + (this.hostname.indexOf(':') === -1 ? - this.hostname : - '[' + this.hostname + ']'); - if (this.port) { - host += ':' + this.port; - } - } - - if (this.query && - isObject(this.query) && - Object.keys(this.query).length) { - query = querystring.stringify(this.query); - } - - var search = this.search || (query && ('?' + query)) || ''; - - if (protocol && protocol.substr(-1) !== ':') protocol += ':'; - - // only the slashedProtocols get the //. Not mailto:, xmpp:, etc. - // unless they had them to begin with. - if (this.slashes || - (!protocol || slashedProtocol[protocol]) && host !== false) { - host = '//' + (host || ''); - if (pathname && pathname.charAt(0) !== '/') pathname = '/' + pathname; - } else if (!host) { - host = ''; - } - - if (hash && hash.charAt(0) !== '#') hash = '#' + hash; - if (search && search.charAt(0) !== '?') search = '?' + search; - - pathname = pathname.replace(/[?#]/g, function(match) { - return encodeURIComponent(match); - }); - search = search.replace('#', '%23'); - - return protocol + host + pathname + search + hash; -}; - -function urlResolve(source, relative) { - return urlParse(source, false, true).resolve(relative); -} - -Url.prototype.resolve = function(relative) { - return this.resolveObject(urlParse(relative, false, true)).format(); -}; - -function urlResolveObject(source, relative) { - if (!source) return relative; - return urlParse(source, false, true).resolveObject(relative); -} - -Url.prototype.resolveObject = function(relative) { - if (isString(relative)) { - var rel = new Url(); - rel.parse(relative, false, true); - relative = rel; - } - - var result = new Url(); - Object.keys(this).forEach(function(k) { - result[k] = this[k]; - }, this); - - // hash is always overridden, no matter what. - // even href="" will remove it. - result.hash = relative.hash; - - // if the relative url is empty, then there's nothing left to do here. - if (relative.href === '') { - result.href = result.format(); - return result; - } - - // hrefs like //foo/bar always cut to the protocol. - if (relative.slashes && !relative.protocol) { - // take everything except the protocol from relative - Object.keys(relative).forEach(function(k) { - if (k !== 'protocol') - result[k] = relative[k]; - }); - - //urlParse appends trailing / to urls like http://www.example.com - if (slashedProtocol[result.protocol] && - result.hostname && !result.pathname) { - result.path = result.pathname = '/'; - } - - result.href = result.format(); - return result; - } - - if (relative.protocol && relative.protocol !== result.protocol) { - // if it's a known url protocol, then changing - // the protocol does weird things - // first, if it's not file:, then we MUST have a host, - // and if there was a path - // to begin with, then we MUST have a path. - // if it is file:, then the host is dropped, - // because that's known to be hostless. - // anything else is assumed to be absolute. - if (!slashedProtocol[relative.protocol]) { - Object.keys(relative).forEach(function(k) { - result[k] = relative[k]; - }); - result.href = result.format(); - return result; - } - - result.protocol = relative.protocol; - if (!relative.host && !hostlessProtocol[relative.protocol]) { - var relPath = (relative.pathname || '').split('/'); - while (relPath.length && !(relative.host = relPath.shift())); - if (!relative.host) relative.host = ''; - if (!relative.hostname) relative.hostname = ''; - if (relPath[0] !== '') relPath.unshift(''); - if (relPath.length < 2) relPath.unshift(''); - result.pathname = relPath.join('/'); - } else { - result.pathname = relative.pathname; - } - result.search = relative.search; - result.query = relative.query; - result.host = relative.host || ''; - result.auth = relative.auth; - result.hostname = relative.hostname || relative.host; - result.port = relative.port; - // to support http.request - if (result.pathname || result.search) { - var p = result.pathname || ''; - var s = result.search || ''; - result.path = p + s; - } - result.slashes = result.slashes || relative.slashes; - result.href = result.format(); - return result; - } - - var isSourceAbs = (result.pathname && result.pathname.charAt(0) === '/'), - isRelAbs = ( - relative.host || - relative.pathname && relative.pathname.charAt(0) === '/' - ), - mustEndAbs = (isRelAbs || isSourceAbs || - (result.host && relative.pathname)), - removeAllDots = mustEndAbs, - srcPath = result.pathname && result.pathname.split('/') || [], - relPath = relative.pathname && relative.pathname.split('/') || [], - psychotic = result.protocol && !slashedProtocol[result.protocol]; - - // if the url is a non-slashed url, then relative - // links like ../.. should be able - // to crawl up to the hostname, as well. This is strange. - // result.protocol has already been set by now. - // Later on, put the first path part into the host field. - if (psychotic) { - result.hostname = ''; - result.port = null; - if (result.host) { - if (srcPath[0] === '') srcPath[0] = result.host; - else srcPath.unshift(result.host); - } - result.host = ''; - if (relative.protocol) { - relative.hostname = null; - relative.port = null; - if (relative.host) { - if (relPath[0] === '') relPath[0] = relative.host; - else relPath.unshift(relative.host); - } - relative.host = null; - } - mustEndAbs = mustEndAbs && (relPath[0] === '' || srcPath[0] === ''); - } - - if (isRelAbs) { - // it's absolute. - result.host = (relative.host || relative.host === '') ? - relative.host : result.host; - result.hostname = (relative.hostname || relative.hostname === '') ? - relative.hostname : result.hostname; - result.search = relative.search; - result.query = relative.query; - srcPath = relPath; - // fall through to the dot-handling below. - } else if (relPath.length) { - // it's relative - // throw away the existing file, and take the new path instead. - if (!srcPath) srcPath = []; - srcPath.pop(); - srcPath = srcPath.concat(relPath); - result.search = relative.search; - result.query = relative.query; - } else if (!isNullOrUndefined(relative.search)) { - // just pull out the search. - // like href='?foo'. - // Put this after the other two cases because it simplifies the booleans - if (psychotic) { - result.hostname = result.host = srcPath.shift(); - //occationaly the auth can get stuck only in host - //this especialy happens in cases like - //url.resolveObject('mailto:local1@domain1', 'local2@domain2') - var authInHost = result.host && result.host.indexOf('@') > 0 ? - result.host.split('@') : false; - if (authInHost) { - result.auth = authInHost.shift(); - result.host = result.hostname = authInHost.shift(); - } - } - result.search = relative.search; - result.query = relative.query; - //to support http.request - if (!isNull(result.pathname) || !isNull(result.search)) { - result.path = (result.pathname ? result.pathname : '') + - (result.search ? result.search : ''); - } - result.href = result.format(); - return result; - } - - if (!srcPath.length) { - // no path at all. easy. - // we've already handled the other stuff above. - result.pathname = null; - //to support http.request - if (result.search) { - result.path = '/' + result.search; - } else { - result.path = null; - } - result.href = result.format(); - return result; - } - - // if a url ENDs in . or .., then it must get a trailing slash. - // however, if it ends in anything else non-slashy, - // then it must NOT get a trailing slash. - var last = srcPath.slice(-1)[0]; - var hasTrailingSlash = ( - (result.host || relative.host) && (last === '.' || last === '..') || - last === ''); - - // strip single dots, resolve double dots to parent dir - // if the path tries to go above the root, `up` ends up > 0 - var up = 0; - for (var i = srcPath.length; i >= 0; i--) { - last = srcPath[i]; - if (last == '.') { - srcPath.splice(i, 1); - } else if (last === '..') { - srcPath.splice(i, 1); - up++; - } else if (up) { - srcPath.splice(i, 1); - up--; - } - } - - // if the path is allowed to go above the root, restore leading ..s - if (!mustEndAbs && !removeAllDots) { - for (; up--; up) { - srcPath.unshift('..'); - } - } - - if (mustEndAbs && srcPath[0] !== '' && - (!srcPath[0] || srcPath[0].charAt(0) !== '/')) { - srcPath.unshift(''); - } - - if (hasTrailingSlash && (srcPath.join('/').substr(-1) !== '/')) { - srcPath.push(''); - } - - var isAbsolute = srcPath[0] === '' || - (srcPath[0] && srcPath[0].charAt(0) === '/'); - - // put the host back - if (psychotic) { - result.hostname = result.host = isAbsolute ? '' : - srcPath.length ? srcPath.shift() : ''; - //occationaly the auth can get stuck only in host - //this especialy happens in cases like - //url.resolveObject('mailto:local1@domain1', 'local2@domain2') - var authInHost = result.host && result.host.indexOf('@') > 0 ? - result.host.split('@') : false; - if (authInHost) { - result.auth = authInHost.shift(); - result.host = result.hostname = authInHost.shift(); - } - } - - mustEndAbs = mustEndAbs || (result.host && srcPath.length); - - if (mustEndAbs && !isAbsolute) { - srcPath.unshift(''); - } - - if (!srcPath.length) { - result.pathname = null; - result.path = null; - } else { - result.pathname = srcPath.join('/'); - } - - //to support request.http - if (!isNull(result.pathname) || !isNull(result.search)) { - result.path = (result.pathname ? result.pathname : '') + - (result.search ? result.search : ''); - } - result.auth = relative.auth || result.auth; - result.slashes = result.slashes || relative.slashes; - result.href = result.format(); - return result; -}; - -Url.prototype.parseHost = function() { - var host = this.host; - var port = portPattern.exec(host); - if (port) { - port = port[0]; - if (port !== ':') { - this.port = port.substr(1); - } - host = host.substr(0, host.length - port.length); - } - if (host) this.hostname = host; -}; - -function isString(arg) { - return typeof arg === "string"; -} - -function isObject(arg) { - return typeof arg === 'object' && arg !== null; -} - -function isNull(arg) { - return arg === null; -} -function isNullOrUndefined(arg) { - return arg == null; -} diff --git a/node_modules/browserify/node_modules/util/.npmignore b/node_modules/browserify/node_modules/util/.npmignore deleted file mode 100644 index 3c3629e6..00000000 --- a/node_modules/browserify/node_modules/util/.npmignore +++ /dev/null @@ -1 +0,0 @@ -node_modules diff --git a/node_modules/browserify/node_modules/util/.travis.yml b/node_modules/browserify/node_modules/util/.travis.yml deleted file mode 100644 index ded625ce..00000000 --- a/node_modules/browserify/node_modules/util/.travis.yml +++ /dev/null @@ -1,8 +0,0 @@ -language: node_js -node_js: -- '0.8' -- '0.10' -env: - global: - - secure: AdUubswCR68/eGD+WWjwTHgFbelwQGnNo81j1IOaUxKw+zgFPzSnFEEtDw7z98pWgg7p9DpCnyzzSnSllP40wq6AG19OwyUJjSLoZK57fp+r8zwTQwWiSqUgMu2YSMmKJPIO/aoSGpRQXT+L1nRrHoUJXgFodyIZgz40qzJeZjc= - - secure: heQuxPVsQ7jBbssoVKimXDpqGjQFiucm6W5spoujmspjDG7oEcHD9ANo9++LoRPrsAmNx56SpMK5fNfVmYediw6SvhXm4Mxt56/fYCrLDBtgGG+1neCeffAi8z1rO8x48m77hcQ6YhbUL5R9uBimUjMX92fZcygAt8Rg804zjFo= diff --git a/node_modules/browserify/node_modules/util/.zuul.yml b/node_modules/browserify/node_modules/util/.zuul.yml deleted file mode 100644 index 21050105..00000000 --- a/node_modules/browserify/node_modules/util/.zuul.yml +++ /dev/null @@ -1,10 +0,0 @@ -ui: mocha-qunit -browsers: - - name: chrome - version: 27..latest - - name: firefox - version: latest - - name: safari - version: latest - - name: ie - version: 9..latest diff --git a/node_modules/browserify/node_modules/util/LICENSE b/node_modules/browserify/node_modules/util/LICENSE deleted file mode 100644 index e3d4e695..00000000 --- a/node_modules/browserify/node_modules/util/LICENSE +++ /dev/null @@ -1,18 +0,0 @@ -Copyright Joyent, Inc. and other Node contributors. All rights reserved. -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to -deal in the Software without restriction, including without limitation the -rights to use, copy, modify, merge, publish, distribute, sublicense, and/or -sell copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS -IN THE SOFTWARE. diff --git a/node_modules/browserify/node_modules/util/README.md b/node_modules/browserify/node_modules/util/README.md deleted file mode 100644 index 1c473d2c..00000000 --- a/node_modules/browserify/node_modules/util/README.md +++ /dev/null @@ -1,15 +0,0 @@ -# util - -[![Build Status](https://travis-ci.org/defunctzombie/node-util.png?branch=master)](https://travis-ci.org/defunctzombie/node-util) - -node.js [util](http://nodejs.org/api/util.html) module as a module - -## install via [npm](npmjs.org) - -```shell -npm install util -``` - -## browser support - -This module also works in modern browsers. If you need legacy browser support you will need to polyfill ES5 features. diff --git a/node_modules/browserify/node_modules/util/node_modules/inherits/LICENSE b/node_modules/browserify/node_modules/util/node_modules/inherits/LICENSE deleted file mode 100644 index dea3013d..00000000 --- a/node_modules/browserify/node_modules/util/node_modules/inherits/LICENSE +++ /dev/null @@ -1,16 +0,0 @@ -The ISC License - -Copyright (c) Isaac Z. Schlueter - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH -REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND -FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, -INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM -LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR -OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR -PERFORMANCE OF THIS SOFTWARE. - diff --git a/node_modules/browserify/node_modules/util/node_modules/inherits/README.md b/node_modules/browserify/node_modules/util/node_modules/inherits/README.md deleted file mode 100644 index b1c56658..00000000 --- a/node_modules/browserify/node_modules/util/node_modules/inherits/README.md +++ /dev/null @@ -1,42 +0,0 @@ -Browser-friendly inheritance fully compatible with standard node.js -[inherits](http://nodejs.org/api/util.html#util_util_inherits_constructor_superconstructor). - -This package exports standard `inherits` from node.js `util` module in -node environment, but also provides alternative browser-friendly -implementation through [browser -field](https://gist.github.com/shtylman/4339901). Alternative -implementation is a literal copy of standard one located in standalone -module to avoid requiring of `util`. It also has a shim for old -browsers with no `Object.create` support. - -While keeping you sure you are using standard `inherits` -implementation in node.js environment, it allows bundlers such as -[browserify](https://github.com/substack/node-browserify) to not -include full `util` package to your client code if all you need is -just `inherits` function. It worth, because browser shim for `util` -package is large and `inherits` is often the single function you need -from it. - -It's recommended to use this package instead of -`require('util').inherits` for any code that has chances to be used -not only in node.js but in browser too. - -## usage - -```js -var inherits = require('inherits'); -// then use exactly as the standard one -``` - -## note on version ~1.0 - -Version ~1.0 had completely different motivation and is not compatible -neither with 2.0 nor with standard node.js `inherits`. - -If you are using version ~1.0 and planning to switch to ~2.0, be -careful: - -* new version uses `super_` instead of `super` for referencing - superclass -* new version overwrites current prototype while old one preserves any - existing fields on it diff --git a/node_modules/browserify/node_modules/util/node_modules/inherits/inherits.js b/node_modules/browserify/node_modules/util/node_modules/inherits/inherits.js deleted file mode 100644 index 29f5e24f..00000000 --- a/node_modules/browserify/node_modules/util/node_modules/inherits/inherits.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('util').inherits diff --git a/node_modules/browserify/node_modules/util/node_modules/inherits/inherits_browser.js b/node_modules/browserify/node_modules/util/node_modules/inherits/inherits_browser.js deleted file mode 100644 index c1e78a75..00000000 --- a/node_modules/browserify/node_modules/util/node_modules/inherits/inherits_browser.js +++ /dev/null @@ -1,23 +0,0 @@ -if (typeof Object.create === 'function') { - // implementation from standard node.js 'util' module - module.exports = function inherits(ctor, superCtor) { - ctor.super_ = superCtor - ctor.prototype = Object.create(superCtor.prototype, { - constructor: { - value: ctor, - enumerable: false, - writable: true, - configurable: true - } - }); - }; -} else { - // old school shim for old browsers - module.exports = function inherits(ctor, superCtor) { - ctor.super_ = superCtor - var TempCtor = function () {} - TempCtor.prototype = superCtor.prototype - ctor.prototype = new TempCtor() - ctor.prototype.constructor = ctor - } -} diff --git a/node_modules/browserify/node_modules/util/node_modules/inherits/package.json b/node_modules/browserify/node_modules/util/node_modules/inherits/package.json deleted file mode 100644 index d6435d08..00000000 --- a/node_modules/browserify/node_modules/util/node_modules/inherits/package.json +++ /dev/null @@ -1,50 +0,0 @@ -{ - "name": "inherits", - "description": "Browser-friendly inheritance fully compatible with standard node.js inherits()", - "version": "2.0.1", - "keywords": [ - "inheritance", - "class", - "klass", - "oop", - "object-oriented", - "inherits", - "browser", - "browserify" - ], - "main": "./inherits.js", - "browser": "./inherits_browser.js", - "repository": { - "type": "git", - "url": "git://github.com/isaacs/inherits.git" - }, - "license": "ISC", - "scripts": { - "test": "node test" - }, - "bugs": { - "url": "https://github.com/isaacs/inherits/issues" - }, - "_id": "inherits@2.0.1", - "dist": { - "shasum": "b17d08d326b4423e568eff719f91b0b1cbdf69f1", - "tarball": "http://registry.npmjs.org/inherits/-/inherits-2.0.1.tgz" - }, - "_from": "inherits@2.0.1", - "_npmVersion": "1.3.8", - "_npmUser": { - "name": "isaacs", - "email": "i@izs.me" - }, - "maintainers": [ - { - "name": "isaacs", - "email": "i@izs.me" - } - ], - "directories": {}, - "_shasum": "b17d08d326b4423e568eff719f91b0b1cbdf69f1", - "_resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.1.tgz", - "readme": "ERROR: No README data found!", - "homepage": "https://github.com/isaacs/inherits#readme" -} diff --git a/node_modules/browserify/node_modules/util/node_modules/inherits/test.js b/node_modules/browserify/node_modules/util/node_modules/inherits/test.js deleted file mode 100644 index fc53012d..00000000 --- a/node_modules/browserify/node_modules/util/node_modules/inherits/test.js +++ /dev/null @@ -1,25 +0,0 @@ -var inherits = require('./inherits.js') -var assert = require('assert') - -function test(c) { - assert(c.constructor === Child) - assert(c.constructor.super_ === Parent) - assert(Object.getPrototypeOf(c) === Child.prototype) - assert(Object.getPrototypeOf(Object.getPrototypeOf(c)) === Parent.prototype) - assert(c instanceof Child) - assert(c instanceof Parent) -} - -function Child() { - Parent.call(this) - test(this) -} - -function Parent() {} - -inherits(Child, Parent) - -var c = new Child -test(c) - -console.log('ok') diff --git a/node_modules/browserify/node_modules/util/package.json b/node_modules/browserify/node_modules/util/package.json deleted file mode 100644 index 0a563ace..00000000 --- a/node_modules/browserify/node_modules/util/package.json +++ /dev/null @@ -1,55 +0,0 @@ -{ - "author": { - "name": "Joyent", - "url": "http://www.joyent.com" - }, - "name": "util", - "description": "Node.JS util module", - "keywords": [ - "util" - ], - "version": "0.10.3", - "homepage": "https://github.com/defunctzombie/node-util", - "repository": { - "type": "git", - "url": "git://github.com/defunctzombie/node-util" - }, - "main": "./util.js", - "scripts": { - "test": "node test/node/*.js && zuul test/browser/*.js" - }, - "dependencies": { - "inherits": "2.0.1" - }, - "license": "MIT", - "devDependencies": { - "zuul": "~1.0.9" - }, - "browser": { - "./support/isBuffer.js": "./support/isBufferBrowser.js" - }, - "bugs": { - "url": "https://github.com/defunctzombie/node-util/issues" - }, - "_id": "util@0.10.3", - "dist": { - "shasum": "7afb1afe50805246489e3db7fe0ed379336ac0f9", - "tarball": "https://registry.npmjs.org/util/-/util-0.10.3.tgz" - }, - "_from": "util@>=0.10.1 <0.11.0", - "_npmVersion": "1.3.24", - "_npmUser": { - "name": "shtylman", - "email": "shtylman@gmail.com" - }, - "maintainers": [ - { - "name": "shtylman", - "email": "shtylman@gmail.com" - } - ], - "directories": {}, - "_shasum": "7afb1afe50805246489e3db7fe0ed379336ac0f9", - "_resolved": "https://registry.npmjs.org/util/-/util-0.10.3.tgz", - "readme": "ERROR: No README data found!" -} diff --git a/node_modules/browserify/node_modules/util/support/isBuffer.js b/node_modules/browserify/node_modules/util/support/isBuffer.js deleted file mode 100644 index ace9ac00..00000000 --- a/node_modules/browserify/node_modules/util/support/isBuffer.js +++ /dev/null @@ -1,3 +0,0 @@ -module.exports = function isBuffer(arg) { - return arg instanceof Buffer; -} diff --git a/node_modules/browserify/node_modules/util/support/isBufferBrowser.js b/node_modules/browserify/node_modules/util/support/isBufferBrowser.js deleted file mode 100644 index 0e1bee1e..00000000 --- a/node_modules/browserify/node_modules/util/support/isBufferBrowser.js +++ /dev/null @@ -1,6 +0,0 @@ -module.exports = function isBuffer(arg) { - return arg && typeof arg === 'object' - && typeof arg.copy === 'function' - && typeof arg.fill === 'function' - && typeof arg.readUInt8 === 'function'; -} \ No newline at end of file diff --git a/node_modules/browserify/node_modules/util/test/browser/inspect.js b/node_modules/browserify/node_modules/util/test/browser/inspect.js deleted file mode 100644 index 91af3b02..00000000 --- a/node_modules/browserify/node_modules/util/test/browser/inspect.js +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright Joyent, Inc. and other Node contributors. -// -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to permit -// persons to whom the Software is furnished to do so, subject to the -// following conditions: -// -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -// USE OR OTHER DEALINGS IN THE SOFTWARE. - -var assert = require('assert'); -var util = require('../../'); - -suite('inspect'); - -test('util.inspect - test for sparse array', function () { - var a = ['foo', 'bar', 'baz']; - assert.equal(util.inspect(a), '[ \'foo\', \'bar\', \'baz\' ]'); - delete a[1]; - assert.equal(util.inspect(a), '[ \'foo\', , \'baz\' ]'); - assert.equal(util.inspect(a, true), '[ \'foo\', , \'baz\', [length]: 3 ]'); - assert.equal(util.inspect(new Array(5)), '[ , , , , ]'); -}); - -test('util.inspect - exceptions should print the error message, not \'{}\'', function () { - assert.equal(util.inspect(new Error()), '[Error]'); - assert.equal(util.inspect(new Error('FAIL')), '[Error: FAIL]'); - assert.equal(util.inspect(new TypeError('FAIL')), '[TypeError: FAIL]'); - assert.equal(util.inspect(new SyntaxError('FAIL')), '[SyntaxError: FAIL]'); -}); diff --git a/node_modules/browserify/node_modules/util/test/browser/is.js b/node_modules/browserify/node_modules/util/test/browser/is.js deleted file mode 100644 index f63bff9a..00000000 --- a/node_modules/browserify/node_modules/util/test/browser/is.js +++ /dev/null @@ -1,91 +0,0 @@ -// Copyright Joyent, Inc. and other Node contributors. -// -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to permit -// persons to whom the Software is furnished to do so, subject to the -// following conditions: -// -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -// USE OR OTHER DEALINGS IN THE SOFTWARE. - -var assert = require('assert'); - -var util = require('../../'); - -suite('is'); - -test('util.isArray', function () { - assert.equal(true, util.isArray([])); - assert.equal(true, util.isArray(Array())); - assert.equal(true, util.isArray(new Array())); - assert.equal(true, util.isArray(new Array(5))); - assert.equal(true, util.isArray(new Array('with', 'some', 'entries'))); - assert.equal(false, util.isArray({})); - assert.equal(false, util.isArray({ push: function() {} })); - assert.equal(false, util.isArray(/regexp/)); - assert.equal(false, util.isArray(new Error())); - assert.equal(false, util.isArray(Object.create(Array.prototype))); -}); - -test('util.isRegExp', function () { - assert.equal(true, util.isRegExp(/regexp/)); - assert.equal(true, util.isRegExp(RegExp())); - assert.equal(true, util.isRegExp(new RegExp())); - assert.equal(false, util.isRegExp({})); - assert.equal(false, util.isRegExp([])); - assert.equal(false, util.isRegExp(new Date())); - assert.equal(false, util.isRegExp(Object.create(RegExp.prototype))); -}); - -test('util.isDate', function () { - assert.equal(true, util.isDate(new Date())); - assert.equal(true, util.isDate(new Date(0))); - assert.equal(false, util.isDate(Date())); - assert.equal(false, util.isDate({})); - assert.equal(false, util.isDate([])); - assert.equal(false, util.isDate(new Error())); - assert.equal(false, util.isDate(Object.create(Date.prototype))); -}); - -test('util.isError', function () { - assert.equal(true, util.isError(new Error())); - assert.equal(true, util.isError(new TypeError())); - assert.equal(true, util.isError(new SyntaxError())); - assert.equal(false, util.isError({})); - assert.equal(false, util.isError({ name: 'Error', message: '' })); - assert.equal(false, util.isError([])); - assert.equal(true, util.isError(Object.create(Error.prototype))); -}); - -test('util._extend', function () { - assert.deepEqual(util._extend({a:1}), {a:1}); - assert.deepEqual(util._extend({a:1}, []), {a:1}); - assert.deepEqual(util._extend({a:1}, null), {a:1}); - assert.deepEqual(util._extend({a:1}, true), {a:1}); - assert.deepEqual(util._extend({a:1}, false), {a:1}); - assert.deepEqual(util._extend({a:1}, {b:2}), {a:1, b:2}); - assert.deepEqual(util._extend({a:1, b:2}, {b:3}), {a:1, b:3}); -}); - -test('util.isBuffer', function () { - assert.equal(true, util.isBuffer(new Buffer(4))); - assert.equal(true, util.isBuffer(Buffer(4))); - assert.equal(true, util.isBuffer(new Buffer(4))); - assert.equal(true, util.isBuffer(new Buffer([1, 2, 3, 4]))); - assert.equal(false, util.isBuffer({})); - assert.equal(false, util.isBuffer([])); - assert.equal(false, util.isBuffer(new Error())); - assert.equal(false, util.isRegExp(new Date())); - assert.equal(true, util.isBuffer(Object.create(Buffer.prototype))); -}); diff --git a/node_modules/browserify/node_modules/util/test/node/debug.js b/node_modules/browserify/node_modules/util/test/node/debug.js deleted file mode 100644 index ef5f69fb..00000000 --- a/node_modules/browserify/node_modules/util/test/node/debug.js +++ /dev/null @@ -1,86 +0,0 @@ -// Copyright Joyent, Inc. and other Node contributors. -// -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to permit -// persons to whom the Software is furnished to do so, subject to the -// following conditions: -// -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -// USE OR OTHER DEALINGS IN THE SOFTWARE. - -var assert = require('assert'); -var util = require('../../'); - -if (process.argv[2] === 'child') - child(); -else - parent(); - -function parent() { - test('foo,tud,bar', true); - test('foo,tud', true); - test('tud,bar', true); - test('tud', true); - test('foo,bar', false); - test('', false); -} - -function test(environ, shouldWrite) { - var expectErr = ''; - if (shouldWrite) { - expectErr = 'TUD %PID%: this { is: \'a\' } /debugging/\n' + - 'TUD %PID%: number=1234 string=asdf obj={"foo":"bar"}\n'; - } - var expectOut = 'ok\n'; - var didTest = false; - - var spawn = require('child_process').spawn; - var child = spawn(process.execPath, [__filename, 'child'], { - env: { NODE_DEBUG: environ } - }); - - expectErr = expectErr.split('%PID%').join(child.pid); - - var err = ''; - child.stderr.setEncoding('utf8'); - child.stderr.on('data', function(c) { - err += c; - }); - - var out = ''; - child.stdout.setEncoding('utf8'); - child.stdout.on('data', function(c) { - out += c; - }); - - child.on('close', function(c) { - assert(!c); - assert.equal(err, expectErr); - assert.equal(out, expectOut); - didTest = true; - console.log('ok %j %j', environ, shouldWrite); - }); - - process.on('exit', function() { - assert(didTest); - }); -} - - -function child() { - var debug = util.debuglog('tud'); - debug('this', { is: 'a' }, /debugging/); - debug('number=%d string=%s obj=%j', 1234, 'asdf', { foo: 'bar' }); - console.log('ok'); -} diff --git a/node_modules/browserify/node_modules/util/test/node/format.js b/node_modules/browserify/node_modules/util/test/node/format.js deleted file mode 100644 index f2d18621..00000000 --- a/node_modules/browserify/node_modules/util/test/node/format.js +++ /dev/null @@ -1,77 +0,0 @@ -// Copyright Joyent, Inc. and other Node contributors. -// -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to permit -// persons to whom the Software is furnished to do so, subject to the -// following conditions: -// -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -// USE OR OTHER DEALINGS IN THE SOFTWARE. - - - - -var assert = require('assert'); -var util = require('../../'); - -assert.equal(util.format(), ''); -assert.equal(util.format(''), ''); -assert.equal(util.format([]), '[]'); -assert.equal(util.format({}), '{}'); -assert.equal(util.format(null), 'null'); -assert.equal(util.format(true), 'true'); -assert.equal(util.format(false), 'false'); -assert.equal(util.format('test'), 'test'); - -// CHECKME this is for console.log() compatibility - but is it *right*? -assert.equal(util.format('foo', 'bar', 'baz'), 'foo bar baz'); - -assert.equal(util.format('%d', 42.0), '42'); -assert.equal(util.format('%d', 42), '42'); -assert.equal(util.format('%s', 42), '42'); -assert.equal(util.format('%j', 42), '42'); - -assert.equal(util.format('%d', '42.0'), '42'); -assert.equal(util.format('%d', '42'), '42'); -assert.equal(util.format('%s', '42'), '42'); -assert.equal(util.format('%j', '42'), '"42"'); - -assert.equal(util.format('%%s%s', 'foo'), '%sfoo'); - -assert.equal(util.format('%s'), '%s'); -assert.equal(util.format('%s', undefined), 'undefined'); -assert.equal(util.format('%s', 'foo'), 'foo'); -assert.equal(util.format('%s:%s'), '%s:%s'); -assert.equal(util.format('%s:%s', undefined), 'undefined:%s'); -assert.equal(util.format('%s:%s', 'foo'), 'foo:%s'); -assert.equal(util.format('%s:%s', 'foo', 'bar'), 'foo:bar'); -assert.equal(util.format('%s:%s', 'foo', 'bar', 'baz'), 'foo:bar baz'); -assert.equal(util.format('%%%s%%', 'hi'), '%hi%'); -assert.equal(util.format('%%%s%%%%', 'hi'), '%hi%%'); - -(function() { - var o = {}; - o.o = o; - assert.equal(util.format('%j', o), '[Circular]'); -})(); - -// Errors -assert.equal(util.format(new Error('foo')), '[Error: foo]'); -function CustomError(msg) { - Error.call(this); - Object.defineProperty(this, 'message', { value: msg, enumerable: false }); - Object.defineProperty(this, 'name', { value: 'CustomError', enumerable: false }); -} -util.inherits(CustomError, Error); -assert.equal(util.format(new CustomError('bar')), '[CustomError: bar]'); diff --git a/node_modules/browserify/node_modules/util/test/node/inspect.js b/node_modules/browserify/node_modules/util/test/node/inspect.js deleted file mode 100644 index f766d117..00000000 --- a/node_modules/browserify/node_modules/util/test/node/inspect.js +++ /dev/null @@ -1,195 +0,0 @@ -// Copyright Joyent, Inc. and other Node contributors. -// -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to permit -// persons to whom the Software is furnished to do so, subject to the -// following conditions: -// -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -// USE OR OTHER DEALINGS IN THE SOFTWARE. - - - - -var assert = require('assert'); -var util = require('../../'); - -// test the internal isDate implementation -var Date2 = require('vm').runInNewContext('Date'); -var d = new Date2(); -var orig = util.inspect(d); -Date2.prototype.foo = 'bar'; -var after = util.inspect(d); -assert.equal(orig, after); - -// test for sparse array -var a = ['foo', 'bar', 'baz']; -assert.equal(util.inspect(a), '[ \'foo\', \'bar\', \'baz\' ]'); -delete a[1]; -assert.equal(util.inspect(a), '[ \'foo\', , \'baz\' ]'); -assert.equal(util.inspect(a, true), '[ \'foo\', , \'baz\', [length]: 3 ]'); -assert.equal(util.inspect(new Array(5)), '[ , , , , ]'); - -// test for property descriptors -var getter = Object.create(null, { - a: { - get: function() { return 'aaa'; } - } -}); -var setter = Object.create(null, { - b: { - set: function() {} - } -}); -var getterAndSetter = Object.create(null, { - c: { - get: function() { return 'ccc'; }, - set: function() {} - } -}); -assert.equal(util.inspect(getter, true), '{ [a]: [Getter] }'); -assert.equal(util.inspect(setter, true), '{ [b]: [Setter] }'); -assert.equal(util.inspect(getterAndSetter, true), '{ [c]: [Getter/Setter] }'); - -// exceptions should print the error message, not '{}' -assert.equal(util.inspect(new Error()), '[Error]'); -assert.equal(util.inspect(new Error('FAIL')), '[Error: FAIL]'); -assert.equal(util.inspect(new TypeError('FAIL')), '[TypeError: FAIL]'); -assert.equal(util.inspect(new SyntaxError('FAIL')), '[SyntaxError: FAIL]'); -try { - undef(); -} catch (e) { - assert.equal(util.inspect(e), '[ReferenceError: undef is not defined]'); -} -var ex = util.inspect(new Error('FAIL'), true); -assert.ok(ex.indexOf('[Error: FAIL]') != -1); -assert.ok(ex.indexOf('[stack]') != -1); -assert.ok(ex.indexOf('[message]') != -1); - -// GH-1941 -// should not throw: -assert.equal(util.inspect(Object.create(Date.prototype)), '{}'); - -// GH-1944 -assert.doesNotThrow(function() { - var d = new Date(); - d.toUTCString = null; - util.inspect(d); -}); - -assert.doesNotThrow(function() { - var r = /regexp/; - r.toString = null; - util.inspect(r); -}); - -// bug with user-supplied inspect function returns non-string -assert.doesNotThrow(function() { - util.inspect([{ - inspect: function() { return 123; } - }]); -}); - -// GH-2225 -var x = { inspect: util.inspect }; -assert.ok(util.inspect(x).indexOf('inspect') != -1); - -// util.inspect.styles and util.inspect.colors -function test_color_style(style, input, implicit) { - var color_name = util.inspect.styles[style]; - var color = ['', '']; - if(util.inspect.colors[color_name]) - color = util.inspect.colors[color_name]; - - var without_color = util.inspect(input, false, 0, false); - var with_color = util.inspect(input, false, 0, true); - var expect = '\u001b[' + color[0] + 'm' + without_color + - '\u001b[' + color[1] + 'm'; - assert.equal(with_color, expect, 'util.inspect color for style '+style); -} - -test_color_style('special', function(){}); -test_color_style('number', 123.456); -test_color_style('boolean', true); -test_color_style('undefined', undefined); -test_color_style('null', null); -test_color_style('string', 'test string'); -test_color_style('date', new Date); -test_color_style('regexp', /regexp/); - -// an object with "hasOwnProperty" overwritten should not throw -assert.doesNotThrow(function() { - util.inspect({ - hasOwnProperty: null - }); -}); - -// new API, accepts an "options" object -var subject = { foo: 'bar', hello: 31, a: { b: { c: { d: 0 } } } }; -Object.defineProperty(subject, 'hidden', { enumerable: false, value: null }); - -assert(util.inspect(subject, { showHidden: false }).indexOf('hidden') === -1); -assert(util.inspect(subject, { showHidden: true }).indexOf('hidden') !== -1); -assert(util.inspect(subject, { colors: false }).indexOf('\u001b[32m') === -1); -assert(util.inspect(subject, { colors: true }).indexOf('\u001b[32m') !== -1); -assert(util.inspect(subject, { depth: 2 }).indexOf('c: [Object]') !== -1); -assert(util.inspect(subject, { depth: 0 }).indexOf('a: [Object]') !== -1); -assert(util.inspect(subject, { depth: null }).indexOf('{ d: 0 }') !== -1); - -// "customInspect" option can enable/disable calling inspect() on objects -subject = { inspect: function() { return 123; } }; - -assert(util.inspect(subject, { customInspect: true }).indexOf('123') !== -1); -assert(util.inspect(subject, { customInspect: true }).indexOf('inspect') === -1); -assert(util.inspect(subject, { customInspect: false }).indexOf('123') === -1); -assert(util.inspect(subject, { customInspect: false }).indexOf('inspect') !== -1); - -// custom inspect() functions should be able to return other Objects -subject.inspect = function() { return { foo: 'bar' }; }; - -assert.equal(util.inspect(subject), '{ foo: \'bar\' }'); - -subject.inspect = function(depth, opts) { - assert.strictEqual(opts.customInspectOptions, true); -}; - -util.inspect(subject, { customInspectOptions: true }); - -// util.inspect with "colors" option should produce as many lines as without it -function test_lines(input) { - var count_lines = function(str) { - return (str.match(/\n/g) || []).length; - } - - var without_color = util.inspect(input); - var with_color = util.inspect(input, {colors: true}); - assert.equal(count_lines(without_color), count_lines(with_color)); -} - -test_lines([1, 2, 3, 4, 5, 6, 7]); -test_lines(function() { - var big_array = []; - for (var i = 0; i < 100; i++) { - big_array.push(i); - } - return big_array; -}()); -test_lines({foo: 'bar', baz: 35, b: {a: 35}}); -test_lines({ - foo: 'bar', - baz: 35, - b: {a: 35}, - very_long_key: 'very_long_value', - even_longer_key: ['with even longer value in array'] -}); diff --git a/node_modules/browserify/node_modules/util/test/node/log.js b/node_modules/browserify/node_modules/util/test/node/log.js deleted file mode 100644 index 6bd96d1f..00000000 --- a/node_modules/browserify/node_modules/util/test/node/log.js +++ /dev/null @@ -1,58 +0,0 @@ -// Copyright Joyent, Inc. and other Node contributors. -// -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to permit -// persons to whom the Software is furnished to do so, subject to the -// following conditions: -// -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -// USE OR OTHER DEALINGS IN THE SOFTWARE. - - -var assert = require('assert'); -var util = require('../../'); - -assert.ok(process.stdout.writable); -assert.ok(process.stderr.writable); - -var stdout_write = global.process.stdout.write; -var strings = []; -global.process.stdout.write = function(string) { - strings.push(string); -}; -console._stderr = process.stdout; - -var tests = [ - {input: 'foo', output: 'foo'}, - {input: undefined, output: 'undefined'}, - {input: null, output: 'null'}, - {input: false, output: 'false'}, - {input: 42, output: '42'}, - {input: function(){}, output: '[Function]'}, - {input: parseInt('not a number', 10), output: 'NaN'}, - {input: {answer: 42}, output: '{ answer: 42 }'}, - {input: [1,2,3], output: '[ 1, 2, 3 ]'} -]; - -// test util.log() -tests.forEach(function(test) { - util.log(test.input); - var result = strings.shift().trim(), - re = (/[0-9]{1,2} [A-Z][a-z]{2} [0-9]{2}:[0-9]{2}:[0-9]{2} - (.+)$/), - match = re.exec(result); - assert.ok(match); - assert.equal(match[1], test.output); -}); - -global.process.stdout.write = stdout_write; diff --git a/node_modules/browserify/node_modules/util/test/node/util.js b/node_modules/browserify/node_modules/util/test/node/util.js deleted file mode 100644 index 633ba690..00000000 --- a/node_modules/browserify/node_modules/util/test/node/util.js +++ /dev/null @@ -1,83 +0,0 @@ -// Copyright Joyent, Inc. and other Node contributors. -// -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to permit -// persons to whom the Software is furnished to do so, subject to the -// following conditions: -// -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -// USE OR OTHER DEALINGS IN THE SOFTWARE. - - -var assert = require('assert'); -var context = require('vm').runInNewContext; - -var util = require('../../'); - -// isArray -assert.equal(true, util.isArray([])); -assert.equal(true, util.isArray(Array())); -assert.equal(true, util.isArray(new Array())); -assert.equal(true, util.isArray(new Array(5))); -assert.equal(true, util.isArray(new Array('with', 'some', 'entries'))); -assert.equal(true, util.isArray(context('Array')())); -assert.equal(false, util.isArray({})); -assert.equal(false, util.isArray({ push: function() {} })); -assert.equal(false, util.isArray(/regexp/)); -assert.equal(false, util.isArray(new Error)); -assert.equal(false, util.isArray(Object.create(Array.prototype))); - -// isRegExp -assert.equal(true, util.isRegExp(/regexp/)); -assert.equal(true, util.isRegExp(RegExp())); -assert.equal(true, util.isRegExp(new RegExp())); -assert.equal(true, util.isRegExp(context('RegExp')())); -assert.equal(false, util.isRegExp({})); -assert.equal(false, util.isRegExp([])); -assert.equal(false, util.isRegExp(new Date())); -assert.equal(false, util.isRegExp(Object.create(RegExp.prototype))); - -// isDate -assert.equal(true, util.isDate(new Date())); -assert.equal(true, util.isDate(new Date(0))); -assert.equal(true, util.isDate(new (context('Date')))); -assert.equal(false, util.isDate(Date())); -assert.equal(false, util.isDate({})); -assert.equal(false, util.isDate([])); -assert.equal(false, util.isDate(new Error)); -assert.equal(false, util.isDate(Object.create(Date.prototype))); - -// isError -assert.equal(true, util.isError(new Error)); -assert.equal(true, util.isError(new TypeError)); -assert.equal(true, util.isError(new SyntaxError)); -assert.equal(true, util.isError(new (context('Error')))); -assert.equal(true, util.isError(new (context('TypeError')))); -assert.equal(true, util.isError(new (context('SyntaxError')))); -assert.equal(false, util.isError({})); -assert.equal(false, util.isError({ name: 'Error', message: '' })); -assert.equal(false, util.isError([])); -assert.equal(true, util.isError(Object.create(Error.prototype))); - -// isObject -assert.ok(util.isObject({}) === true); - -// _extend -assert.deepEqual(util._extend({a:1}), {a:1}); -assert.deepEqual(util._extend({a:1}, []), {a:1}); -assert.deepEqual(util._extend({a:1}, null), {a:1}); -assert.deepEqual(util._extend({a:1}, true), {a:1}); -assert.deepEqual(util._extend({a:1}, false), {a:1}); -assert.deepEqual(util._extend({a:1}, {b:2}), {a:1, b:2}); -assert.deepEqual(util._extend({a:1, b:2}, {b:3}), {a:1, b:3}); diff --git a/node_modules/browserify/node_modules/util/util.js b/node_modules/browserify/node_modules/util/util.js deleted file mode 100644 index e0ea321d..00000000 --- a/node_modules/browserify/node_modules/util/util.js +++ /dev/null @@ -1,586 +0,0 @@ -// Copyright Joyent, Inc. and other Node contributors. -// -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to permit -// persons to whom the Software is furnished to do so, subject to the -// following conditions: -// -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -// USE OR OTHER DEALINGS IN THE SOFTWARE. - -var formatRegExp = /%[sdj%]/g; -exports.format = function(f) { - if (!isString(f)) { - var objects = []; - for (var i = 0; i < arguments.length; i++) { - objects.push(inspect(arguments[i])); - } - return objects.join(' '); - } - - var i = 1; - var args = arguments; - var len = args.length; - var str = String(f).replace(formatRegExp, function(x) { - if (x === '%%') return '%'; - if (i >= len) return x; - switch (x) { - case '%s': return String(args[i++]); - case '%d': return Number(args[i++]); - case '%j': - try { - return JSON.stringify(args[i++]); - } catch (_) { - return '[Circular]'; - } - default: - return x; - } - }); - for (var x = args[i]; i < len; x = args[++i]) { - if (isNull(x) || !isObject(x)) { - str += ' ' + x; - } else { - str += ' ' + inspect(x); - } - } - return str; -}; - - -// Mark that a method should not be used. -// Returns a modified function which warns once by default. -// If --no-deprecation is set, then it is a no-op. -exports.deprecate = function(fn, msg) { - // Allow for deprecating things in the process of starting up. - if (isUndefined(global.process)) { - return function() { - return exports.deprecate(fn, msg).apply(this, arguments); - }; - } - - if (process.noDeprecation === true) { - return fn; - } - - var warned = false; - function deprecated() { - if (!warned) { - if (process.throwDeprecation) { - throw new Error(msg); - } else if (process.traceDeprecation) { - console.trace(msg); - } else { - console.error(msg); - } - warned = true; - } - return fn.apply(this, arguments); - } - - return deprecated; -}; - - -var debugs = {}; -var debugEnviron; -exports.debuglog = function(set) { - if (isUndefined(debugEnviron)) - debugEnviron = process.env.NODE_DEBUG || ''; - set = set.toUpperCase(); - if (!debugs[set]) { - if (new RegExp('\\b' + set + '\\b', 'i').test(debugEnviron)) { - var pid = process.pid; - debugs[set] = function() { - var msg = exports.format.apply(exports, arguments); - console.error('%s %d: %s', set, pid, msg); - }; - } else { - debugs[set] = function() {}; - } - } - return debugs[set]; -}; - - -/** - * Echos the value of a value. Trys to print the value out - * in the best way possible given the different types. - * - * @param {Object} obj The object to print out. - * @param {Object} opts Optional options object that alters the output. - */ -/* legacy: obj, showHidden, depth, colors*/ -function inspect(obj, opts) { - // default options - var ctx = { - seen: [], - stylize: stylizeNoColor - }; - // legacy... - if (arguments.length >= 3) ctx.depth = arguments[2]; - if (arguments.length >= 4) ctx.colors = arguments[3]; - if (isBoolean(opts)) { - // legacy... - ctx.showHidden = opts; - } else if (opts) { - // got an "options" object - exports._extend(ctx, opts); - } - // set default options - if (isUndefined(ctx.showHidden)) ctx.showHidden = false; - if (isUndefined(ctx.depth)) ctx.depth = 2; - if (isUndefined(ctx.colors)) ctx.colors = false; - if (isUndefined(ctx.customInspect)) ctx.customInspect = true; - if (ctx.colors) ctx.stylize = stylizeWithColor; - return formatValue(ctx, obj, ctx.depth); -} -exports.inspect = inspect; - - -// http://en.wikipedia.org/wiki/ANSI_escape_code#graphics -inspect.colors = { - 'bold' : [1, 22], - 'italic' : [3, 23], - 'underline' : [4, 24], - 'inverse' : [7, 27], - 'white' : [37, 39], - 'grey' : [90, 39], - 'black' : [30, 39], - 'blue' : [34, 39], - 'cyan' : [36, 39], - 'green' : [32, 39], - 'magenta' : [35, 39], - 'red' : [31, 39], - 'yellow' : [33, 39] -}; - -// Don't use 'blue' not visible on cmd.exe -inspect.styles = { - 'special': 'cyan', - 'number': 'yellow', - 'boolean': 'yellow', - 'undefined': 'grey', - 'null': 'bold', - 'string': 'green', - 'date': 'magenta', - // "name": intentionally not styling - 'regexp': 'red' -}; - - -function stylizeWithColor(str, styleType) { - var style = inspect.styles[styleType]; - - if (style) { - return '\u001b[' + inspect.colors[style][0] + 'm' + str + - '\u001b[' + inspect.colors[style][1] + 'm'; - } else { - return str; - } -} - - -function stylizeNoColor(str, styleType) { - return str; -} - - -function arrayToHash(array) { - var hash = {}; - - array.forEach(function(val, idx) { - hash[val] = true; - }); - - return hash; -} - - -function formatValue(ctx, value, recurseTimes) { - // Provide a hook for user-specified inspect functions. - // Check that value is an object with an inspect function on it - if (ctx.customInspect && - value && - isFunction(value.inspect) && - // Filter out the util module, it's inspect function is special - value.inspect !== exports.inspect && - // Also filter out any prototype objects using the circular check. - !(value.constructor && value.constructor.prototype === value)) { - var ret = value.inspect(recurseTimes, ctx); - if (!isString(ret)) { - ret = formatValue(ctx, ret, recurseTimes); - } - return ret; - } - - // Primitive types cannot have properties - var primitive = formatPrimitive(ctx, value); - if (primitive) { - return primitive; - } - - // Look up the keys of the object. - var keys = Object.keys(value); - var visibleKeys = arrayToHash(keys); - - if (ctx.showHidden) { - keys = Object.getOwnPropertyNames(value); - } - - // IE doesn't make error fields non-enumerable - // http://msdn.microsoft.com/en-us/library/ie/dww52sbt(v=vs.94).aspx - if (isError(value) - && (keys.indexOf('message') >= 0 || keys.indexOf('description') >= 0)) { - return formatError(value); - } - - // Some type of object without properties can be shortcutted. - if (keys.length === 0) { - if (isFunction(value)) { - var name = value.name ? ': ' + value.name : ''; - return ctx.stylize('[Function' + name + ']', 'special'); - } - if (isRegExp(value)) { - return ctx.stylize(RegExp.prototype.toString.call(value), 'regexp'); - } - if (isDate(value)) { - return ctx.stylize(Date.prototype.toString.call(value), 'date'); - } - if (isError(value)) { - return formatError(value); - } - } - - var base = '', array = false, braces = ['{', '}']; - - // Make Array say that they are Array - if (isArray(value)) { - array = true; - braces = ['[', ']']; - } - - // Make functions say that they are functions - if (isFunction(value)) { - var n = value.name ? ': ' + value.name : ''; - base = ' [Function' + n + ']'; - } - - // Make RegExps say that they are RegExps - if (isRegExp(value)) { - base = ' ' + RegExp.prototype.toString.call(value); - } - - // Make dates with properties first say the date - if (isDate(value)) { - base = ' ' + Date.prototype.toUTCString.call(value); - } - - // Make error with message first say the error - if (isError(value)) { - base = ' ' + formatError(value); - } - - if (keys.length === 0 && (!array || value.length == 0)) { - return braces[0] + base + braces[1]; - } - - if (recurseTimes < 0) { - if (isRegExp(value)) { - return ctx.stylize(RegExp.prototype.toString.call(value), 'regexp'); - } else { - return ctx.stylize('[Object]', 'special'); - } - } - - ctx.seen.push(value); - - var output; - if (array) { - output = formatArray(ctx, value, recurseTimes, visibleKeys, keys); - } else { - output = keys.map(function(key) { - return formatProperty(ctx, value, recurseTimes, visibleKeys, key, array); - }); - } - - ctx.seen.pop(); - - return reduceToSingleString(output, base, braces); -} - - -function formatPrimitive(ctx, value) { - if (isUndefined(value)) - return ctx.stylize('undefined', 'undefined'); - if (isString(value)) { - var simple = '\'' + JSON.stringify(value).replace(/^"|"$/g, '') - .replace(/'/g, "\\'") - .replace(/\\"/g, '"') + '\''; - return ctx.stylize(simple, 'string'); - } - if (isNumber(value)) - return ctx.stylize('' + value, 'number'); - if (isBoolean(value)) - return ctx.stylize('' + value, 'boolean'); - // For some reason typeof null is "object", so special case here. - if (isNull(value)) - return ctx.stylize('null', 'null'); -} - - -function formatError(value) { - return '[' + Error.prototype.toString.call(value) + ']'; -} - - -function formatArray(ctx, value, recurseTimes, visibleKeys, keys) { - var output = []; - for (var i = 0, l = value.length; i < l; ++i) { - if (hasOwnProperty(value, String(i))) { - output.push(formatProperty(ctx, value, recurseTimes, visibleKeys, - String(i), true)); - } else { - output.push(''); - } - } - keys.forEach(function(key) { - if (!key.match(/^\d+$/)) { - output.push(formatProperty(ctx, value, recurseTimes, visibleKeys, - key, true)); - } - }); - return output; -} - - -function formatProperty(ctx, value, recurseTimes, visibleKeys, key, array) { - var name, str, desc; - desc = Object.getOwnPropertyDescriptor(value, key) || { value: value[key] }; - if (desc.get) { - if (desc.set) { - str = ctx.stylize('[Getter/Setter]', 'special'); - } else { - str = ctx.stylize('[Getter]', 'special'); - } - } else { - if (desc.set) { - str = ctx.stylize('[Setter]', 'special'); - } - } - if (!hasOwnProperty(visibleKeys, key)) { - name = '[' + key + ']'; - } - if (!str) { - if (ctx.seen.indexOf(desc.value) < 0) { - if (isNull(recurseTimes)) { - str = formatValue(ctx, desc.value, null); - } else { - str = formatValue(ctx, desc.value, recurseTimes - 1); - } - if (str.indexOf('\n') > -1) { - if (array) { - str = str.split('\n').map(function(line) { - return ' ' + line; - }).join('\n').substr(2); - } else { - str = '\n' + str.split('\n').map(function(line) { - return ' ' + line; - }).join('\n'); - } - } - } else { - str = ctx.stylize('[Circular]', 'special'); - } - } - if (isUndefined(name)) { - if (array && key.match(/^\d+$/)) { - return str; - } - name = JSON.stringify('' + key); - if (name.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)) { - name = name.substr(1, name.length - 2); - name = ctx.stylize(name, 'name'); - } else { - name = name.replace(/'/g, "\\'") - .replace(/\\"/g, '"') - .replace(/(^"|"$)/g, "'"); - name = ctx.stylize(name, 'string'); - } - } - - return name + ': ' + str; -} - - -function reduceToSingleString(output, base, braces) { - var numLinesEst = 0; - var length = output.reduce(function(prev, cur) { - numLinesEst++; - if (cur.indexOf('\n') >= 0) numLinesEst++; - return prev + cur.replace(/\u001b\[\d\d?m/g, '').length + 1; - }, 0); - - if (length > 60) { - return braces[0] + - (base === '' ? '' : base + '\n ') + - ' ' + - output.join(',\n ') + - ' ' + - braces[1]; - } - - return braces[0] + base + ' ' + output.join(', ') + ' ' + braces[1]; -} - - -// NOTE: These type checking functions intentionally don't use `instanceof` -// because it is fragile and can be easily faked with `Object.create()`. -function isArray(ar) { - return Array.isArray(ar); -} -exports.isArray = isArray; - -function isBoolean(arg) { - return typeof arg === 'boolean'; -} -exports.isBoolean = isBoolean; - -function isNull(arg) { - return arg === null; -} -exports.isNull = isNull; - -function isNullOrUndefined(arg) { - return arg == null; -} -exports.isNullOrUndefined = isNullOrUndefined; - -function isNumber(arg) { - return typeof arg === 'number'; -} -exports.isNumber = isNumber; - -function isString(arg) { - return typeof arg === 'string'; -} -exports.isString = isString; - -function isSymbol(arg) { - return typeof arg === 'symbol'; -} -exports.isSymbol = isSymbol; - -function isUndefined(arg) { - return arg === void 0; -} -exports.isUndefined = isUndefined; - -function isRegExp(re) { - return isObject(re) && objectToString(re) === '[object RegExp]'; -} -exports.isRegExp = isRegExp; - -function isObject(arg) { - return typeof arg === 'object' && arg !== null; -} -exports.isObject = isObject; - -function isDate(d) { - return isObject(d) && objectToString(d) === '[object Date]'; -} -exports.isDate = isDate; - -function isError(e) { - return isObject(e) && - (objectToString(e) === '[object Error]' || e instanceof Error); -} -exports.isError = isError; - -function isFunction(arg) { - return typeof arg === 'function'; -} -exports.isFunction = isFunction; - -function isPrimitive(arg) { - return arg === null || - typeof arg === 'boolean' || - typeof arg === 'number' || - typeof arg === 'string' || - typeof arg === 'symbol' || // ES6 symbol - typeof arg === 'undefined'; -} -exports.isPrimitive = isPrimitive; - -exports.isBuffer = require('./support/isBuffer'); - -function objectToString(o) { - return Object.prototype.toString.call(o); -} - - -function pad(n) { - return n < 10 ? '0' + n.toString(10) : n.toString(10); -} - - -var months = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', - 'Oct', 'Nov', 'Dec']; - -// 26 Feb 16:19:34 -function timestamp() { - var d = new Date(); - var time = [pad(d.getHours()), - pad(d.getMinutes()), - pad(d.getSeconds())].join(':'); - return [d.getDate(), months[d.getMonth()], time].join(' '); -} - - -// log is just a thin wrapper to console.log that prepends a timestamp -exports.log = function() { - console.log('%s - %s', timestamp(), exports.format.apply(exports, arguments)); -}; - - -/** - * Inherit the prototype methods from one constructor into another. - * - * The Function.prototype.inherits from lang.js rewritten as a standalone - * function (not on Function.prototype). NOTE: If this file is to be loaded - * during bootstrapping this function needs to be rewritten using some native - * functions as prototype setup using normal JavaScript does not work as - * expected during bootstrapping (see mirror.js in r114903). - * - * @param {function} ctor Constructor function which needs to inherit the - * prototype. - * @param {function} superCtor Constructor function to inherit prototype from. - */ -exports.inherits = require('inherits'); - -exports._extend = function(origin, add) { - // Don't do anything if add isn't an object - if (!add || !isObject(add)) return origin; - - var keys = Object.keys(add); - var i = keys.length; - while (i--) { - origin[keys[i]] = add[keys[i]]; - } - return origin; -}; - -function hasOwnProperty(obj, prop) { - return Object.prototype.hasOwnProperty.call(obj, prop); -} diff --git a/node_modules/browserify/node_modules/vm-browserify/LICENSE b/node_modules/browserify/node_modules/vm-browserify/LICENSE deleted file mode 100644 index ee27ba4b..00000000 --- a/node_modules/browserify/node_modules/vm-browserify/LICENSE +++ /dev/null @@ -1,18 +0,0 @@ -This software is released under the MIT license: - -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/node_modules/browserify/node_modules/vm-browserify/example/run/bundle.js b/node_modules/browserify/node_modules/vm-browserify/example/run/bundle.js deleted file mode 100644 index 5dbc43f4..00000000 --- a/node_modules/browserify/node_modules/vm-browserify/example/run/bundle.js +++ /dev/null @@ -1,473 +0,0 @@ -var require = function (file, cwd) { - var resolved = require.resolve(file, cwd || '/'); - var mod = require.modules[resolved]; - if (!mod) throw new Error( - 'Failed to resolve module ' + file + ', tried ' + resolved - ); - var res = mod._cached ? mod._cached : mod(); - return res; -} - -require.paths = []; -require.modules = {}; -require.extensions = [".js",".coffee"]; - -require._core = { - 'assert': true, - 'events': true, - 'fs': true, - 'path': true, - 'vm': true -}; - -require.resolve = (function () { - return function (x, cwd) { - if (!cwd) cwd = '/'; - - if (require._core[x]) return x; - var path = require.modules.path(); - var y = cwd || '.'; - - if (x.match(/^(?:\.\.?\/|\/)/)) { - var m = loadAsFileSync(path.resolve(y, x)) - || loadAsDirectorySync(path.resolve(y, x)); - if (m) return m; - } - - var n = loadNodeModulesSync(x, y); - if (n) return n; - - throw new Error("Cannot find module '" + x + "'"); - - function loadAsFileSync (x) { - if (require.modules[x]) { - return x; - } - - for (var i = 0; i < require.extensions.length; i++) { - var ext = require.extensions[i]; - if (require.modules[x + ext]) return x + ext; - } - } - - function loadAsDirectorySync (x) { - x = x.replace(/\/+$/, ''); - var pkgfile = x + '/package.json'; - if (require.modules[pkgfile]) { - var pkg = require.modules[pkgfile](); - var b = pkg.browserify; - if (typeof b === 'object' && b.main) { - var m = loadAsFileSync(path.resolve(x, b.main)); - if (m) return m; - } - else if (typeof b === 'string') { - var m = loadAsFileSync(path.resolve(x, b)); - if (m) return m; - } - else if (pkg.main) { - var m = loadAsFileSync(path.resolve(x, pkg.main)); - if (m) return m; - } - } - - return loadAsFileSync(x + '/index'); - } - - function loadNodeModulesSync (x, start) { - var dirs = nodeModulesPathsSync(start); - for (var i = 0; i < dirs.length; i++) { - var dir = dirs[i]; - var m = loadAsFileSync(dir + '/' + x); - if (m) return m; - var n = loadAsDirectorySync(dir + '/' + x); - if (n) return n; - } - - var m = loadAsFileSync(x); - if (m) return m; - } - - function nodeModulesPathsSync (start) { - var parts; - if (start === '/') parts = [ '' ]; - else parts = path.normalize(start).split('/'); - - var dirs = []; - for (var i = parts.length - 1; i >= 0; i--) { - if (parts[i] === 'node_modules') continue; - var dir = parts.slice(0, i + 1).join('/') + '/node_modules'; - dirs.push(dir); - } - - return dirs; - } - }; -})(); - -require.alias = function (from, to) { - var path = require.modules.path(); - var res = null; - try { - res = require.resolve(from + '/package.json', '/'); - } - catch (err) { - res = require.resolve(from, '/'); - } - var basedir = path.dirname(res); - - var keys = (Object.keys || function (obj) { - var res = []; - for (var key in obj) res.push(key) - return res; - })(require.modules); - - for (var i = 0; i < keys.length; i++) { - var key = keys[i]; - if (key.slice(0, basedir.length + 1) === basedir + '/') { - var f = key.slice(basedir.length); - require.modules[to + f] = require.modules[basedir + f]; - } - else if (key === basedir) { - require.modules[to] = require.modules[basedir]; - } - } -}; - -require.define = function (filename, fn) { - var dirname = require._core[filename] - ? '' - : require.modules.path().dirname(filename) - ; - - var require_ = function (file) { - return require(file, dirname) - }; - require_.resolve = function (name) { - return require.resolve(name, dirname); - }; - require_.modules = require.modules; - require_.define = require.define; - var module_ = { exports : {} }; - - require.modules[filename] = function () { - require.modules[filename]._cached = module_.exports; - fn.call( - module_.exports, - require_, - module_, - module_.exports, - dirname, - filename - ); - require.modules[filename]._cached = module_.exports; - return module_.exports; - }; -}; - -if (typeof process === 'undefined') process = {}; - -if (!process.nextTick) process.nextTick = (function () { - var queue = []; - var canPost = typeof window !== 'undefined' - && window.postMessage && window.addEventListener - ; - - if (canPost) { - window.addEventListener('message', function (ev) { - if (ev.source === window && ev.data === 'browserify-tick') { - ev.stopPropagation(); - if (queue.length > 0) { - var fn = queue.shift(); - fn(); - } - } - }, true); - } - - return function (fn) { - if (canPost) { - queue.push(fn); - window.postMessage('browserify-tick', '*'); - } - else setTimeout(fn, 0); - }; -})(); - -if (!process.title) process.title = 'browser'; - -if (!process.binding) process.binding = function (name) { - if (name === 'evals') return require('vm') - else throw new Error('No such module') -}; - -if (!process.cwd) process.cwd = function () { return '.' }; - -require.define("path", function (require, module, exports, __dirname, __filename) { -function filter (xs, fn) { - var res = []; - for (var i = 0; i < xs.length; i++) { - if (fn(xs[i], i, xs)) res.push(xs[i]); - } - return res; -} - -// resolves . and .. elements in a path array with directory names there -// must be no slashes, empty elements, or device names (c:\) in the array -// (so also no leading and trailing slashes - it does not distinguish -// relative and absolute paths) -function normalizeArray(parts, allowAboveRoot) { - // if the path tries to go above the root, `up` ends up > 0 - var up = 0; - for (var i = parts.length; i >= 0; i--) { - var last = parts[i]; - if (last == '.') { - parts.splice(i, 1); - } else if (last === '..') { - parts.splice(i, 1); - up++; - } else if (up) { - parts.splice(i, 1); - up--; - } - } - - // if the path is allowed to go above the root, restore leading ..s - if (allowAboveRoot) { - for (; up--; up) { - parts.unshift('..'); - } - } - - return parts; -} - -// Regex to split a filename into [*, dir, basename, ext] -// posix version -var splitPathRe = /^(.+\/(?!$)|\/)?((?:.+?)?(\.[^.]*)?)$/; - -// path.resolve([from ...], to) -// posix version -exports.resolve = function() { -var resolvedPath = '', - resolvedAbsolute = false; - -for (var i = arguments.length; i >= -1 && !resolvedAbsolute; i--) { - var path = (i >= 0) - ? arguments[i] - : process.cwd(); - - // Skip empty and invalid entries - if (typeof path !== 'string' || !path) { - continue; - } - - resolvedPath = path + '/' + resolvedPath; - resolvedAbsolute = path.charAt(0) === '/'; -} - -// At this point the path should be resolved to a full absolute path, but -// handle relative paths to be safe (might happen when process.cwd() fails) - -// Normalize the path -resolvedPath = normalizeArray(filter(resolvedPath.split('/'), function(p) { - return !!p; - }), !resolvedAbsolute).join('/'); - - return ((resolvedAbsolute ? '/' : '') + resolvedPath) || '.'; -}; - -// path.normalize(path) -// posix version -exports.normalize = function(path) { -var isAbsolute = path.charAt(0) === '/', - trailingSlash = path.slice(-1) === '/'; - -// Normalize the path -path = normalizeArray(filter(path.split('/'), function(p) { - return !!p; - }), !isAbsolute).join('/'); - - if (!path && !isAbsolute) { - path = '.'; - } - if (path && trailingSlash) { - path += '/'; - } - - return (isAbsolute ? '/' : '') + path; -}; - - -// posix version -exports.join = function() { - var paths = Array.prototype.slice.call(arguments, 0); - return exports.normalize(filter(paths, function(p, index) { - return p && typeof p === 'string'; - }).join('/')); -}; - - -exports.dirname = function(path) { - var dir = splitPathRe.exec(path)[1] || ''; - var isWindows = false; - if (!dir) { - // No dirname - return '.'; - } else if (dir.length === 1 || - (isWindows && dir.length <= 3 && dir.charAt(1) === ':')) { - // It is just a slash or a drive letter with a slash - return dir; - } else { - // It is a full dirname, strip trailing slash - return dir.substring(0, dir.length - 1); - } -}; - - -exports.basename = function(path, ext) { - var f = splitPathRe.exec(path)[2] || ''; - // TODO: make this comparison case-insensitive on windows? - if (ext && f.substr(-1 * ext.length) === ext) { - f = f.substr(0, f.length - ext.length); - } - return f; -}; - - -exports.extname = function(path) { - return splitPathRe.exec(path)[3] || ''; -}; - -}); - -require.define("vm", function (require, module, exports, __dirname, __filename) { -var Object_keys = function (obj) { - if (Object.keys) return Object.keys(obj) - else { - var res = []; - for (var key in obj) res.push(key) - return res; - } -}; - -var forEach = function (xs, fn) { - if (xs.forEach) return xs.forEach(fn) - else for (var i = 0; i < xs.length; i++) { - fn(xs[i], i, xs); - } -}; - -var Script = exports.Script = function NodeScript (code) { - if (!(this instanceof Script)) return new Script(code); - this.code = code; -}; - -var iframe = document.createElement('iframe'); -if (!iframe.style) iframe.style = {}; -iframe.style.display = 'none'; - -var iframeCapable = true; // until proven otherwise -if (navigator.appName === 'Microsoft Internet Explorer') { - var m = navigator.appVersion.match(/\bMSIE (\d+\.\d+);/); - if (m && parseFloat(m[1]) <= 9.0) { - iframeCapable = false; - } -} - -Script.prototype.runInNewContext = function (context) { - if (!context) context = {}; - - if (!iframeCapable) { - var keys = Object_keys(context); - var args = []; - for (var i = 0; i < keys.length; i++) { - args.push(context[keys[i]]); - } - - var fn = new Function(keys, 'return ' + this.code); - return fn.apply(null, args); - } - - document.body.appendChild(iframe); - - var win = iframe.contentWindow - || (window.frames && window.frames[window.frames.length - 1]) - || window[window.length - 1] - ; - - forEach(Object_keys(context), function (key) { - win[key] = context[key]; - iframe[key] = context[key]; - }); - - if (win.eval) { - // chrome and ff can just .eval() - var res = win.eval(this.code); - } - else { - // this works in IE9 but not anything newer - iframe.setAttribute('src', - 'javascript:__browserifyVmResult=(' + this.code + ')' - ); - if ('__browserifyVmResult' in win) { - var res = win.__browserifyVmResult; - } - else { - iframeCapable = false; - res = this.runInThisContext(context); - } - } - - forEach(Object_keys(win), function (key) { - context[key] = win[key]; - }); - - document.body.removeChild(iframe); - - return res; -}; - -Script.prototype.runInThisContext = function () { - return eval(this.code); // maybe... -}; - -Script.prototype.runInContext = function (context) { - // seems to be just runInNewContext on magical context objects which are - // otherwise indistinguishable from objects except plain old objects - // for the parameter segfaults node - return this.runInNewContext(context); -}; - -forEach(Object_keys(Script.prototype), function (name) { - exports[name] = Script[name] = function (code) { - var s = Script(code); - return s[name].apply(s, [].slice.call(arguments, 1)); - }; -}); - -exports.createScript = function (code) { - return exports.Script(code); -}; - -exports.createContext = Script.createContext = function (context) { - // not really sure what this one does - // seems to just make a shallow copy - var copy = {}; - forEach(Object_keys(context), function (key) { - copy[key] = context[key]; - }); - return copy; -}; - -}); - -require.define("/entry.js", function (require, module, exports, __dirname, __filename) { - var vm = require('vm'); - -$(function () { - var res = vm.runInNewContext('a + 5', { a : 100 }); - $('#res').text(res); -}); - -}); -require("/entry.js"); diff --git a/node_modules/browserify/node_modules/vm-browserify/example/run/entry.js b/node_modules/browserify/node_modules/vm-browserify/example/run/entry.js deleted file mode 100644 index c7d38918..00000000 --- a/node_modules/browserify/node_modules/vm-browserify/example/run/entry.js +++ /dev/null @@ -1,6 +0,0 @@ -var vm = require('vm'); - -$(function () { - var res = vm.runInNewContext('a + 5', { a : 100 }); - $('#res').text(res); -}); diff --git a/node_modules/browserify/node_modules/vm-browserify/example/run/index.html b/node_modules/browserify/node_modules/vm-browserify/example/run/index.html deleted file mode 100644 index 1ea09423..00000000 --- a/node_modules/browserify/node_modules/vm-browserify/example/run/index.html +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - - result = - - diff --git a/node_modules/browserify/node_modules/vm-browserify/example/run/server.js b/node_modules/browserify/node_modules/vm-browserify/example/run/server.js deleted file mode 100644 index 339d3eea..00000000 --- a/node_modules/browserify/node_modules/vm-browserify/example/run/server.js +++ /dev/null @@ -1,6 +0,0 @@ -var ecstatic = require('ecstatic')(__dirname); -var http = require('http'); -http.createServer(ecstatic).listen(8000); - -console.log('listening on :8000'); -console.log('# remember to run browserify entry.js -o bundle.js'); diff --git a/node_modules/browserify/node_modules/vm-browserify/index.js b/node_modules/browserify/node_modules/vm-browserify/index.js deleted file mode 100644 index 644efd1b..00000000 --- a/node_modules/browserify/node_modules/vm-browserify/index.js +++ /dev/null @@ -1,138 +0,0 @@ -var indexOf = require('indexof'); - -var Object_keys = function (obj) { - if (Object.keys) return Object.keys(obj) - else { - var res = []; - for (var key in obj) res.push(key) - return res; - } -}; - -var forEach = function (xs, fn) { - if (xs.forEach) return xs.forEach(fn) - else for (var i = 0; i < xs.length; i++) { - fn(xs[i], i, xs); - } -}; - -var defineProp = (function() { - try { - Object.defineProperty({}, '_', {}); - return function(obj, name, value) { - Object.defineProperty(obj, name, { - writable: true, - enumerable: false, - configurable: true, - value: value - }) - }; - } catch(e) { - return function(obj, name, value) { - obj[name] = value; - }; - } -}()); - -var globals = ['Array', 'Boolean', 'Date', 'Error', 'EvalError', 'Function', -'Infinity', 'JSON', 'Math', 'NaN', 'Number', 'Object', 'RangeError', -'ReferenceError', 'RegExp', 'String', 'SyntaxError', 'TypeError', 'URIError', -'decodeURI', 'decodeURIComponent', 'encodeURI', 'encodeURIComponent', 'escape', -'eval', 'isFinite', 'isNaN', 'parseFloat', 'parseInt', 'undefined', 'unescape']; - -function Context() {} -Context.prototype = {}; - -var Script = exports.Script = function NodeScript (code) { - if (!(this instanceof Script)) return new Script(code); - this.code = code; -}; - -Script.prototype.runInContext = function (context) { - if (!(context instanceof Context)) { - throw new TypeError("needs a 'context' argument."); - } - - var iframe = document.createElement('iframe'); - if (!iframe.style) iframe.style = {}; - iframe.style.display = 'none'; - - document.body.appendChild(iframe); - - var win = iframe.contentWindow; - var wEval = win.eval, wExecScript = win.execScript; - - if (!wEval && wExecScript) { - // win.eval() magically appears when this is called in IE: - wExecScript.call(win, 'null'); - wEval = win.eval; - } - - forEach(Object_keys(context), function (key) { - win[key] = context[key]; - }); - forEach(globals, function (key) { - if (context[key]) { - win[key] = context[key]; - } - }); - - var winKeys = Object_keys(win); - - var res = wEval.call(win, this.code); - - forEach(Object_keys(win), function (key) { - // Avoid copying circular objects like `top` and `window` by only - // updating existing context properties or new properties in the `win` - // that was only introduced after the eval. - if (key in context || indexOf(winKeys, key) === -1) { - context[key] = win[key]; - } - }); - - forEach(globals, function (key) { - if (!(key in context)) { - defineProp(context, key, win[key]); - } - }); - - document.body.removeChild(iframe); - - return res; -}; - -Script.prototype.runInThisContext = function () { - return eval(this.code); // maybe... -}; - -Script.prototype.runInNewContext = function (context) { - var ctx = Script.createContext(context); - var res = this.runInContext(ctx); - - forEach(Object_keys(ctx), function (key) { - context[key] = ctx[key]; - }); - - return res; -}; - -forEach(Object_keys(Script.prototype), function (name) { - exports[name] = Script[name] = function (code) { - var s = Script(code); - return s[name].apply(s, [].slice.call(arguments, 1)); - }; -}); - -exports.createScript = function (code) { - return exports.Script(code); -}; - -exports.createContext = Script.createContext = function (context) { - var copy = new Context(); - if(typeof context === 'object') { - forEach(Object_keys(context), function (key) { - copy[key] = context[key]; - }); - } - return copy; -}; diff --git a/node_modules/browserify/node_modules/vm-browserify/node_modules/indexof/.npmignore b/node_modules/browserify/node_modules/vm-browserify/node_modules/indexof/.npmignore deleted file mode 100644 index 48a2e246..00000000 --- a/node_modules/browserify/node_modules/vm-browserify/node_modules/indexof/.npmignore +++ /dev/null @@ -1,2 +0,0 @@ -components -build diff --git a/node_modules/browserify/node_modules/vm-browserify/node_modules/indexof/Makefile b/node_modules/browserify/node_modules/vm-browserify/node_modules/indexof/Makefile deleted file mode 100644 index 3f6119d2..00000000 --- a/node_modules/browserify/node_modules/vm-browserify/node_modules/indexof/Makefile +++ /dev/null @@ -1,11 +0,0 @@ - -build: components index.js - @component build - -components: - @Component install - -clean: - rm -fr build components template.js - -.PHONY: clean diff --git a/node_modules/browserify/node_modules/vm-browserify/node_modules/indexof/Readme.md b/node_modules/browserify/node_modules/vm-browserify/node_modules/indexof/Readme.md deleted file mode 100644 index 99c8dfc8..00000000 --- a/node_modules/browserify/node_modules/vm-browserify/node_modules/indexof/Readme.md +++ /dev/null @@ -1,15 +0,0 @@ - -# indexOf - - Lame indexOf thing, thanks microsoft - -## Example - -```js -var index = require('indexof'); -index(arr, obj); -``` - -## License - - MIT \ No newline at end of file diff --git a/node_modules/browserify/node_modules/vm-browserify/node_modules/indexof/component.json b/node_modules/browserify/node_modules/vm-browserify/node_modules/indexof/component.json deleted file mode 100644 index e3430d75..00000000 --- a/node_modules/browserify/node_modules/vm-browserify/node_modules/indexof/component.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "name": "indexof", - "description": "Microsoft sucks", - "version": "0.0.1", - "keywords": ["index", "array", "indexOf"], - "dependencies": {}, - "scripts": [ - "index.js" - ] -} \ No newline at end of file diff --git a/node_modules/browserify/node_modules/vm-browserify/node_modules/indexof/index.js b/node_modules/browserify/node_modules/vm-browserify/node_modules/indexof/index.js deleted file mode 100644 index 9d9667b2..00000000 --- a/node_modules/browserify/node_modules/vm-browserify/node_modules/indexof/index.js +++ /dev/null @@ -1,10 +0,0 @@ - -var indexOf = [].indexOf; - -module.exports = function(arr, obj){ - if (indexOf) return arr.indexOf(obj); - for (var i = 0; i < arr.length; ++i) { - if (arr[i] === obj) return i; - } - return -1; -}; \ No newline at end of file diff --git a/node_modules/browserify/node_modules/vm-browserify/node_modules/indexof/package.json b/node_modules/browserify/node_modules/vm-browserify/node_modules/indexof/package.json deleted file mode 100644 index f5e9e122..00000000 --- a/node_modules/browserify/node_modules/vm-browserify/node_modules/indexof/package.json +++ /dev/null @@ -1,33 +0,0 @@ -{ - "name": "indexof", - "description": "Microsoft sucks", - "version": "0.0.1", - "keywords": [ - "index", - "array", - "indexOf" - ], - "dependencies": {}, - "component": { - "scripts": { - "indexof/index.js": "index.js" - } - }, - "_id": "indexof@0.0.1", - "dist": { - "shasum": "82dc336d232b9062179d05ab3293a66059fd435d", - "tarball": "http://registry.npmjs.org/indexof/-/indexof-0.0.1.tgz" - }, - "maintainers": [ - { - "name": "tjholowaychuk", - "email": "tj@vision-media.ca" - } - ], - "directories": {}, - "_shasum": "82dc336d232b9062179d05ab3293a66059fd435d", - "_resolved": "https://registry.npmjs.org/indexof/-/indexof-0.0.1.tgz", - "_from": "indexof@0.0.1", - "readme": "ERROR: No README data found!", - "scripts": {} -} diff --git a/node_modules/browserify/node_modules/vm-browserify/package.json b/node_modules/browserify/node_modules/vm-browserify/package.json deleted file mode 100644 index f88a41b4..00000000 --- a/node_modules/browserify/node_modules/vm-browserify/package.json +++ /dev/null @@ -1,71 +0,0 @@ -{ - "name": "vm-browserify", - "version": "0.0.4", - "description": "vm module for the browser", - "main": "index.js", - "repository": { - "type": "git", - "url": "http://github.com/substack/vm-browserify.git" - }, - "keywords": [ - "vm", - "browser", - "eval" - ], - "dependencies": { - "indexof": "0.0.1" - }, - "devDependencies": { - "tape": "~2.3.2" - }, - "author": { - "name": "James Halliday", - "email": "mail@substack.net", - "url": "http://substack.net" - }, - "scripts": { - "test": "tap test/*.js" - }, - "license": "MIT", - "testling": { - "files": "test/*.js", - "browsers": [ - "ie/6..latest", - "firefox/16..latest", - "firefox/nightly", - "chrome/22..latest", - "chrome/canary", - "opera/12..latest", - "opera/next", - "safari/5.1..latest", - "ipad/6.0..latest", - "iphone/6.0..latest", - "android-browser/4.2..latest" - ] - }, - "bugs": { - "url": "https://github.com/substack/vm-browserify/issues" - }, - "homepage": "https://github.com/substack/vm-browserify", - "_id": "vm-browserify@0.0.4", - "dist": { - "shasum": "5d7ea45bbef9e4a6ff65f95438e0a87c357d5a73", - "tarball": "https://registry.npmjs.org/vm-browserify/-/vm-browserify-0.0.4.tgz" - }, - "_from": "vm-browserify@>=0.0.1 <0.1.0", - "_npmVersion": "1.3.21", - "_npmUser": { - "name": "substack", - "email": "mail@substack.net" - }, - "maintainers": [ - { - "name": "substack", - "email": "mail@substack.net" - } - ], - "directories": {}, - "_shasum": "5d7ea45bbef9e4a6ff65f95438e0a87c357d5a73", - "_resolved": "https://registry.npmjs.org/vm-browserify/-/vm-browserify-0.0.4.tgz", - "readme": "ERROR: No README data found!" -} diff --git a/node_modules/browserify/node_modules/vm-browserify/readme.markdown b/node_modules/browserify/node_modules/vm-browserify/readme.markdown deleted file mode 100644 index 1ad139b6..00000000 --- a/node_modules/browserify/node_modules/vm-browserify/readme.markdown +++ /dev/null @@ -1,67 +0,0 @@ -# vm-browserify - -emulate node's vm module for the browser - -[![testling badge](https://ci.testling.com/substack/vm-browserify.png)](https://ci.testling.com/substack/vm-browserify) - -# example - -Just write some client-side javascript: - -``` js -var vm = require('vm'); - -$(function () { - var res = vm.runInNewContext('a + 5', { a : 100 }); - $('#res').text(res); -}); -``` - -compile it with [browserify](http://github.com/substack/node-browserify): - -``` -browserify entry.js -o bundle.js -``` - -then whip up some html: - -``` html - - - - - - - result = - - -``` - -and when you load the page you should see: - -``` -result = 105 -``` - -# methods - -## vm.runInNewContext(code, context={}) - -Evaluate some `code` in a new iframe with a `context`. - -Contexts are like wrapping your code in a `with()` except slightly less terrible -because the code is sandboxed into a new iframe. - -# install - -This module is depended upon by browserify, so you should just be able to -`require('vm')` and it will just work. However if you want to use this module -directly you can install it with [npm](http://npmjs.org): - -``` -npm install vm-browserify -``` - -# license - -MIT diff --git a/node_modules/browserify/node_modules/vm-browserify/test/vm.js b/node_modules/browserify/node_modules/vm-browserify/test/vm.js deleted file mode 100644 index ea8cd31b..00000000 --- a/node_modules/browserify/node_modules/vm-browserify/test/vm.js +++ /dev/null @@ -1,35 +0,0 @@ -var test = require('tape'); -var vm = require('../'); - -test('vmRunInNewContext', function (t) { - t.plan(6); - - t.equal(vm.runInNewContext('a + 5', { a : 100 }), 105); - - (function () { - var vars = { x : 10 }; - t.equal(vm.runInNewContext('x++', vars), 10); - t.equal(vars.x, 11); - })(); - - (function () { - var vars = { x : 10 }; - t.equal(vm.runInNewContext('var y = 3; y + x++', vars), 13); - t.equal(vars.x, 11); - t.equal(vars.y, 3); - })(); - - t.end(); -}); - -test('vmRunInContext', function (t) { - t.plan(2); - - var context = vm.createContext({ foo: 1 }); - - vm.runInContext('var x = 1', context); - t.deepEqual(context, { foo: 1, x: 1 }); - - vm.runInContext('var y = 1', context); - t.deepEqual(context, { foo: 1, x: 1, y: 1 }); -}); diff --git a/node_modules/browserify/node_modules/xtend/.jshintrc b/node_modules/browserify/node_modules/xtend/.jshintrc deleted file mode 100644 index 77887b5f..00000000 --- a/node_modules/browserify/node_modules/xtend/.jshintrc +++ /dev/null @@ -1,30 +0,0 @@ -{ - "maxdepth": 4, - "maxstatements": 200, - "maxcomplexity": 12, - "maxlen": 80, - "maxparams": 5, - - "curly": true, - "eqeqeq": true, - "immed": true, - "latedef": false, - "noarg": true, - "noempty": true, - "nonew": true, - "undef": true, - "unused": "vars", - "trailing": true, - - "quotmark": true, - "expr": true, - "asi": true, - - "browser": false, - "esnext": true, - "devel": false, - "node": false, - "nonstandard": false, - - "predef": ["require", "module", "__dirname", "__filename"] -} diff --git a/node_modules/browserify/node_modules/xtend/.npmignore b/node_modules/browserify/node_modules/xtend/.npmignore deleted file mode 100644 index 3c3629e6..00000000 --- a/node_modules/browserify/node_modules/xtend/.npmignore +++ /dev/null @@ -1 +0,0 @@ -node_modules diff --git a/node_modules/browserify/node_modules/xtend/LICENCE b/node_modules/browserify/node_modules/xtend/LICENCE deleted file mode 100644 index 1a14b437..00000000 --- a/node_modules/browserify/node_modules/xtend/LICENCE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (c) 2012-2014 Raynos. - -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/node_modules/browserify/node_modules/xtend/Makefile b/node_modules/browserify/node_modules/xtend/Makefile deleted file mode 100644 index d583fcf4..00000000 --- a/node_modules/browserify/node_modules/xtend/Makefile +++ /dev/null @@ -1,4 +0,0 @@ -browser: - node ./support/compile - -.PHONY: browser \ No newline at end of file diff --git a/node_modules/browserify/node_modules/xtend/README.md b/node_modules/browserify/node_modules/xtend/README.md deleted file mode 100644 index 093cb297..00000000 --- a/node_modules/browserify/node_modules/xtend/README.md +++ /dev/null @@ -1,32 +0,0 @@ -# xtend - -[![browser support][3]][4] - -[![locked](http://badges.github.io/stability-badges/dist/locked.svg)](http://github.com/badges/stability-badges) - -Extend like a boss - -xtend is a basic utility library which allows you to extend an object by appending all of the properties from each object in a list. When there are identical properties, the right-most property takes precedence. - -## Examples - -```js -var extend = require("xtend") - -// extend returns a new object. Does not mutate arguments -var combination = extend({ - a: "a", - b: 'c' -}, { - b: "b" -}) -// { a: "a", b: "b" } -``` - -## Stability status: Locked - -## MIT Licenced - - - [3]: http://ci.testling.com/Raynos/xtend.png - [4]: http://ci.testling.com/Raynos/xtend diff --git a/node_modules/browserify/node_modules/xtend/immutable.js b/node_modules/browserify/node_modules/xtend/immutable.js deleted file mode 100644 index 94889c9d..00000000 --- a/node_modules/browserify/node_modules/xtend/immutable.js +++ /dev/null @@ -1,19 +0,0 @@ -module.exports = extend - -var hasOwnProperty = Object.prototype.hasOwnProperty; - -function extend() { - var target = {} - - for (var i = 0; i < arguments.length; i++) { - var source = arguments[i] - - for (var key in source) { - if (hasOwnProperty.call(source, key)) { - target[key] = source[key] - } - } - } - - return target -} diff --git a/node_modules/browserify/node_modules/xtend/mutable.js b/node_modules/browserify/node_modules/xtend/mutable.js deleted file mode 100644 index 72debede..00000000 --- a/node_modules/browserify/node_modules/xtend/mutable.js +++ /dev/null @@ -1,17 +0,0 @@ -module.exports = extend - -var hasOwnProperty = Object.prototype.hasOwnProperty; - -function extend(target) { - for (var i = 1; i < arguments.length; i++) { - var source = arguments[i] - - for (var key in source) { - if (hasOwnProperty.call(source, key)) { - target[key] = source[key] - } - } - } - - return target -} diff --git a/node_modules/browserify/node_modules/xtend/package.json b/node_modules/browserify/node_modules/xtend/package.json deleted file mode 100644 index 6f380f07..00000000 --- a/node_modules/browserify/node_modules/xtend/package.json +++ /dev/null @@ -1,84 +0,0 @@ -{ - "name": "xtend", - "version": "4.0.1", - "description": "extend like a boss", - "keywords": [ - "extend", - "merge", - "options", - "opts", - "object", - "array" - ], - "author": { - "name": "Raynos", - "email": "raynos2@gmail.com" - }, - "repository": { - "type": "git", - "url": "git://github.com/Raynos/xtend.git" - }, - "main": "immutable", - "scripts": { - "test": "node test" - }, - "dependencies": {}, - "devDependencies": { - "tape": "~1.1.0" - }, - "homepage": "https://github.com/Raynos/xtend", - "contributors": [ - { - "name": "Jake Verbaten" - }, - { - "name": "Matt Esch" - } - ], - "bugs": { - "url": "https://github.com/Raynos/xtend/issues", - "email": "raynos2@gmail.com" - }, - "license": "MIT", - "testling": { - "files": "test.js", - "browsers": [ - "ie/7..latest", - "firefox/16..latest", - "firefox/nightly", - "chrome/22..latest", - "chrome/canary", - "opera/12..latest", - "opera/next", - "safari/5.1..latest", - "ipad/6.0..latest", - "iphone/6.0..latest" - ] - }, - "engines": { - "node": ">=0.4" - }, - "gitHead": "23dc302a89756da89c1897bc732a752317e35390", - "_id": "xtend@4.0.1", - "_shasum": "a5c6d532be656e23db820efb943a1f04998d63af", - "_from": "xtend@>=4.0.0 <5.0.0", - "_npmVersion": "2.14.1", - "_nodeVersion": "0.10.32", - "_npmUser": { - "name": "raynos", - "email": "raynos2@gmail.com" - }, - "dist": { - "shasum": "a5c6d532be656e23db820efb943a1f04998d63af", - "tarball": "http://registry.npmjs.org/xtend/-/xtend-4.0.1.tgz" - }, - "maintainers": [ - { - "name": "raynos", - "email": "raynos2@gmail.com" - } - ], - "directories": {}, - "_resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.1.tgz", - "readme": "ERROR: No README data found!" -} diff --git a/node_modules/browserify/node_modules/xtend/test.js b/node_modules/browserify/node_modules/xtend/test.js deleted file mode 100644 index 093a2b06..00000000 --- a/node_modules/browserify/node_modules/xtend/test.js +++ /dev/null @@ -1,83 +0,0 @@ -var test = require("tape") -var extend = require("./") -var mutableExtend = require("./mutable") - -test("merge", function(assert) { - var a = { a: "foo" } - var b = { b: "bar" } - - assert.deepEqual(extend(a, b), { a: "foo", b: "bar" }) - assert.end() -}) - -test("replace", function(assert) { - var a = { a: "foo" } - var b = { a: "bar" } - - assert.deepEqual(extend(a, b), { a: "bar" }) - assert.end() -}) - -test("undefined", function(assert) { - var a = { a: undefined } - var b = { b: "foo" } - - assert.deepEqual(extend(a, b), { a: undefined, b: "foo" }) - assert.deepEqual(extend(b, a), { a: undefined, b: "foo" }) - assert.end() -}) - -test("handle 0", function(assert) { - var a = { a: "default" } - var b = { a: 0 } - - assert.deepEqual(extend(a, b), { a: 0 }) - assert.deepEqual(extend(b, a), { a: "default" }) - assert.end() -}) - -test("is immutable", function (assert) { - var record = {} - - extend(record, { foo: "bar" }) - assert.equal(record.foo, undefined) - assert.end() -}) - -test("null as argument", function (assert) { - var a = { foo: "bar" } - var b = null - var c = void 0 - - assert.deepEqual(extend(b, a, c), { foo: "bar" }) - assert.end() -}) - -test("mutable", function (assert) { - var a = { foo: "bar" } - - mutableExtend(a, { bar: "baz" }) - - assert.equal(a.bar, "baz") - assert.end() -}) - -test("null prototype", function(assert) { - var a = { a: "foo" } - var b = Object.create(null) - b.b = "bar"; - - assert.deepEqual(extend(a, b), { a: "foo", b: "bar" }) - assert.end() -}) - -test("null prototype mutable", function (assert) { - var a = { foo: "bar" } - var b = Object.create(null) - b.bar = "baz"; - - mutableExtend(a, b) - - assert.equal(a.bar, "baz") - assert.end() -}) diff --git a/node_modules/browserify/package.json b/node_modules/browserify/package.json deleted file mode 100644 index b4198646..00000000 --- a/node_modules/browserify/package.json +++ /dev/null @@ -1,157 +0,0 @@ -{ - "name": "browserify", - "version": "10.2.6", - "description": "browser-side require() the node way", - "main": "index.js", - "bin": { - "browserify": "bin/cmd.js" - }, - "repository": { - "type": "git", - "url": "git+ssh://git@github.com/substack/node-browserify.git" - }, - "keywords": [ - "browser", - "require", - "commonjs", - "commonj-esque", - "bundle", - "npm", - "javascript" - ], - "dependencies": { - "JSONStream": "^1.0.3", - "assert": "~1.3.0", - "browser-pack": "^5.0.0", - "browser-resolve": "^1.7.1", - "browserify-zlib": "~0.1.2", - "buffer": "^3.0.0", - "builtins": "~0.0.3", - "commondir": "0.0.1", - "concat-stream": "~1.4.1", - "console-browserify": "^1.1.0", - "constants-browserify": "~0.0.1", - "crypto-browserify": "^3.0.0", - "defined": "^1.0.0", - "deps-sort": "^1.3.7", - "domain-browser": "~1.1.0", - "duplexer2": "~0.0.2", - "events": "~1.0.0", - "glob": "^4.0.5", - "has": "^1.0.0", - "htmlescape": "^1.1.0", - "http-browserify": "^1.4.0", - "https-browserify": "~0.0.0", - "inherits": "~2.0.1", - "insert-module-globals": "^6.4.1", - "isarray": "0.0.1", - "labeled-stream-splicer": "^1.0.0", - "module-deps": "^3.7.11", - "os-browserify": "~0.1.1", - "parents": "^1.0.1", - "path-browserify": "~0.0.0", - "process": "~0.11.0", - "punycode": "^1.3.2", - "querystring-es3": "~0.2.0", - "read-only-stream": "^1.1.1", - "readable-stream": "^1.1.13", - "resolve": "^1.1.4", - "shasum": "^1.0.0", - "shell-quote": "~0.0.1", - "stream-browserify": "^1.0.0", - "string_decoder": "~0.10.0", - "subarg": "^1.0.0", - "syntax-error": "^1.1.1", - "through2": "^1.0.0", - "timers-browserify": "^1.0.1", - "tty-browserify": "~0.0.0", - "url": "~0.10.1", - "util": "~0.10.1", - "vm-browserify": "~0.0.1", - "xtend": "^4.0.0" - }, - "devDependencies": { - "backbone": "~0.9.2", - "browser-unpack": "~0.0.0", - "coffee-script": "~1.5.0", - "coffeeify": "~0.6.0", - "es6ify": "~0.4.8", - "isstream": "^0.1.2", - "seq": "0.3.3", - "tap": "^1.1.0", - "temp": "^0.8.1", - "through": "^2.3.4" - }, - "author": { - "name": "James Halliday", - "email": "mail@substack.net", - "url": "http://substack.net" - }, - "scripts": { - "test": "tap test/*.js" - }, - "license": "MIT", - "gitHead": "2462712ef368ffd1acbd5914aac7a128ea55defc", - "bugs": { - "url": "https://github.com/substack/node-browserify/issues" - }, - "homepage": "https://github.com/substack/node-browserify#readme", - "_id": "browserify@10.2.6", - "_shasum": "dcbfef794f548f5f8498214814f697a5c50c0896", - "_from": "browserify@>=10.2.4 <10.3.0", - "_npmVersion": "3.0.0", - "_nodeVersion": "2.0.0", - "_npmUser": { - "name": "substack", - "email": "substack@gmail.com" - }, - "dist": { - "shasum": "dcbfef794f548f5f8498214814f697a5c50c0896", - "tarball": "https://registry.npmjs.org/browserify/-/browserify-10.2.6.tgz" - }, - "maintainers": [ - { - "name": "substack", - "email": "substack@gmail.com" - }, - { - "name": "maxogden", - "email": "max@maxogden.com" - }, - { - "name": "mafintosh", - "email": "mathiasbuus@gmail.com" - }, - { - "name": "domenic", - "email": "d@domenic.me" - }, - { - "name": "dominictarr", - "email": "dominic.tarr@gmail.com" - }, - { - "name": "terinjokes", - "email": "terinjokes@gmail.com" - }, - { - "name": "feross", - "email": "feross@feross.org" - }, - { - "name": "jmm", - "email": "npm-public@jessemccarthy.net" - }, - { - "name": "thlorenz", - "email": "thlorenz@gmx.de" - }, - { - "name": "zertosh", - "email": "zertosh@gmail.com" - } - ], - "directories": {}, - "_resolved": "https://registry.npmjs.org/browserify/-/browserify-10.2.6.tgz", - "readme": "ERROR: No README data found!" -} diff --git a/node_modules/browserify/readme.markdown b/node_modules/browserify/readme.markdown deleted file mode 100644 index 18d0c50a..00000000 --- a/node_modules/browserify/readme.markdown +++ /dev/null @@ -1,783 +0,0 @@ -# browserify - -`require('modules')` in the browser - -Use a [node](http://nodejs.org)-style `require()` to organize your browser code -and load modules installed by [npm](https://www.npmjs.com). - -browserify will recursively analyze all the `require()` calls in your app in -order to build a bundle you can serve up to the browser in a single `` into your -html! - -# install - -With [npm](http://npmjs.org) do: - -``` -npm install -g browserify -``` - -# usage - -``` -Usage: browserify [entry files] {OPTIONS} - -Standard Options: - - --outfile, -o Write the browserify bundle to this file. - If unspecified, browserify prints to stdout. - - --require, -r A module name or file to bundle.require() - Optionally use a colon separator to set the target. - - --entry, -e An entry point of your app - - --ignore, -i Replace a file with an empty stub. Files can be globs. - - --exclude, -u Omit a file from the output bundle. Files can be globs. - - --external, -x Reference a file from another bundle. Files can be globs. - - --transform, -t Use a transform module on top-level files. - - --command, -c Use a transform command on top-level files. - - --standalone -s Generate a UMD bundle for the supplied export name. - This bundle works with other module systems and sets the name - given as a window global if no module system is found. - - --debug -d Enable source maps that allow you to debug your files - separately. - - --help, -h Show this message - -For advanced options, type `browserify --help advanced`. - -Specify a parameter. -``` - -``` -Advanced Options: - - --insert-globals, --ig, --fast [default: false] - - Skip detection and always insert definitions for process, global, - __filename, and __dirname. - - benefit: faster builds - cost: extra bytes - - --insert-global-vars, --igv - - Comma-separated list of global variables to detect and define. - Default: __filename,__dirname,process,Buffer,global - - --detect-globals, --dg [default: true] - - Detect the presence of process, global, __filename, and __dirname and define - these values when present. - - benefit: npm modules more likely to work - cost: slower builds - - --ignore-missing, --im [default: false] - - Ignore `require()` statements that don't resolve to anything. - - --noparse=FILE - - Don't parse FILE at all. This will make bundling much, much faster for giant - libs like jquery or threejs. - - --no-builtins - - Turn off builtins. This is handy when you want to run a bundle in node which - provides the core builtins. - - --no-commondir - - Turn off setting a commondir. This is useful if you want to preserve the - original paths that a bundle was generated with. - - --no-bundle-external - - Turn off bundling of all external modules. This is useful if you only want - to bundle your local files. - - --bare - - Alias for both --no-builtins, --no-commondir, and sets --insert-global-vars - to just "__filename,__dirname". This is handy if you want to run bundles in - node. - - --no-browser-field, --no-bf - - Turn off package.json browser field resolution. This is also handy if you - need to run a bundle in node. - - --node - - Alias for --bare and --no-browser-field. - - --full-paths - - Turn off converting module ids into numerical indexes. This is useful for - preserving the original paths that a bundle was generated with. - - --deps - - Instead of standard bundle output, print the dependency array generated by - module-deps. - - --list - - Print each file in the dependency graph. Useful for makefiles. - - --extension=EXTENSION - - Consider files with specified EXTENSION as modules, this option can used - multiple times. - - --global-transform=MODULE, -g MODULE - - Use a transform module on all files after any ordinary transforms have run. - - --plugin=MODULE, -p MODULE - - Register MODULE as a plugin. - -Passing arguments to transforms and plugins: - - For -t, -g, and -p, you may use subarg syntax to pass options to the - transforms or plugin function as the second parameter. For example: - - -t [ foo -x 3 --beep ] - - will call the `foo` transform for each applicable file by calling: - - foo(file, { x: 3, beep: true }) - -``` - -# compatibility - -Many [npm](http://npmjs.org) modules that don't do IO will just work after being -browserified. Others take more work. - -Many node built-in modules have been wrapped to work in the browser, but only -when you explicitly `require()` or use their functionality. - -When you `require()` any of these modules, you will get a browser-specific shim: - -* [assert](https://www.npmjs.com/package/assert) -* [buffer](https://www.npmjs.com/package/buffer) -* [console](https://www.npmjs.com/package/console-browserify) -* [constants](https://www.npmjs.com/package/constants-browserify) -* [crypto](https://www.npmjs.com/package/crypto-browserify) -* [domain](https://www.npmjs.com/package/domain-browser) -* [events](https://www.npmjs.com/package/events) -* [http](https://www.npmjs.com/package/http-browserify) -* [https](https://www.npmjs.com/package/https-browserify) -* [os](https://www.npmjs.com/package/os-browserify) -* [path](https://www.npmjs.com/package/path-browserify) -* [punycode](https://www.npmjs.com/package/punycode) -* [querystring](https://www.npmjs.com/package/querystring) -* [stream](https://www.npmjs.com/package/stream-browserify) -* [string_decoder](https://www.npmjs.com/package/string_decoder) -* [timers](https://www.npmjs.com/package/timers-browserify) -* [tty](https://www.npmjs.com/package/tty-browserify) -* [url](https://www.npmjs.com/package/url) -* [util](https://www.npmjs.com/package/util) -* [vm](https://www.npmjs.com/package/vm-browserify) -* [zlib](https://www.npmjs.com/package/browserify-zlib) - -Additionally, if you use any of these variables, they -[will be defined](https://github.com/substack/insert-module-globals) -in the bundled output in a browser-appropriate way: - -* [process](https://www.npmjs.com/package/process) -* [Buffer](https://www.npmjs.com/package/buffer) -* global - top-level scope object (window) -* __filename - file path of the currently executing file -* __dirname - directory path of the currently executing file - -# more examples - -## external requires - -You can just as easily create a bundle that will export a `require()` function so -you can `require()` modules from another script tag. Here we'll create a -`bundle.js` with the [through](https://www.npmjs.com/package/through) -and [duplexer](https://www.npmjs.com/package/duplexer) modules. - -``` -$ browserify -r through -r duplexer -r ./my-file.js:my-module > bundle.js -``` - -Then in your page you can do: - -``` html - - -``` - -## external source maps - -If you prefer the source maps be saved to a separate `.js.map` source map file, you may use -[exorcist](https://github.com/thlorenz/exorcist) in order to achieve that. It's as simple as: - -``` -$ browserify main.js --debug | exorcist bundle.js.map > bundle.js -``` - -Learn about additional options [here](https://github.com/thlorenz/exorcist#usage). - -## multiple bundles - -If browserify finds a `require`d function already defined in the page scope, it -will fall back to that function if it didn't find any matches in its own set of -bundled modules. - -In this way, you can use browserify to split up bundles among multiple pages to -get the benefit of caching for shared, infrequently-changing modules, while -still being able to use `require()`. Just use a combination of `--external` and -`--require` to factor out common dependencies. - -For example, if a website with 2 pages, `beep.js`: - -``` js -var robot = require('./robot.js'); -console.log(robot('beep')); -``` - -and `boop.js`: - -``` js -var robot = require('./robot.js'); -console.log(robot('boop')); -``` - -both depend on `robot.js`: - -``` js -module.exports = function (s) { return s.toUpperCase() + '!' }; -``` - -``` -$ browserify -r ./robot.js > static/common.js -$ browserify -x ./robot.js beep.js > static/beep.js -$ browserify -x ./robot.js boop.js > static/boop.js -``` - -Then on the beep page you can have: - -``` html - - -``` - -while the boop page can have: - -``` html - - -``` - -This approach using `-r` and `-x` works fine for a small number of split assets, -but there are plugins for automatically factoring out components which are -described in the -[partitioning section of the browserify handbook](https://github.com/substack/browserify-handbook#partitioning). - -## api example - -You can use the API directly too: - -``` js -var browserify = require('browserify'); -var b = browserify(); -b.add('./browser/main.js'); -b.bundle().pipe(process.stdout); -``` - -# methods - -``` js -var browserify = require('browserify') -``` - -## `browserify([files] [, opts])` - -Returns a new browserify instance. - -
    -
    -files -
    - -
    -String, file object, or array of those types (they may be mixed) specifying entry file(s). -
    - -
    -opts -
    - -
    -Object. -
    -
    - -`files` and `opts` are both optional, but must be in the order shown if both are -passed. - -Entry files may be passed in `files` and / or `opts.entries`. - -If an entry file is a stream, its contents will be used. You should pass -`opts.basedir` when using streaming files so that relative requires can be -resolved. - -`opts.entries` has the same definition as `files`. - -`opts.noParse` is an array which will skip all require() and global parsing for -each file in the array. Use this for giant libs like jquery or threejs that -don't have any requires or node-style globals but take forever to parse. - -`opts.extensions` is an array of optional extra extensions for the module lookup -machinery to use when the extension has not been specified. -By default browserify considers only `.js` and `.json` files in such cases. - -`opts.basedir` is the directory that browserify starts bundling from for -filenames that start with `.`. - -`opts.paths` is an array of directories that browserify searches when looking -for modules which are not referenced using relative path. Can be absolute or -relative to `basedir`. Equivalent of setting `NODE_PATH` environmental variable -when calling `browserify` command. - -`opts.commondir` sets the algorithm used to parse out the common paths. Use -`false` to turn this off, otherwise it uses the -[commondir](https://www.npmjs.com/package/commondir) module. - -`opts.fullPaths` disables converting module ids into numerical indexes. This is -useful for preserving the original paths that a bundle was generated with. - -`opts.builtins` sets the list of built-ins to use, which by default is set in -`lib/builtins.js` in this distribution. - -`opts.bundleExternal` boolean option to set if external modules should be -bundled. Defaults to true. - -When `opts.insertGlobals` is true, always insert `process`, `global`, -`__filename`, and `__dirname` without analyzing the AST for faster builds but -larger output bundles. Default false. - -When `opts.detectGlobals` is true, scan all files for `process`, `global`, -`__filename`, and `__dirname`, defining as necessary. With this option npm -modules are more likely to work but bundling takes longer. Default true. - -When `opts.debug` is true, add a source map inline to the end of the bundle. -This makes debugging easier because you can see all the original files if -you are in a modern enough browser. - -When `opts.standalone` is a non-empty string, a standalone module is created -with that name and a [umd](https://github.com/forbeslindesay/umd) wrapper. -You can use namespaces in the standalone global export using a `.` in the string -name as a separator, for example `'A.B.C'`. The global export will be [sanitized -and camel cased](https://github.com/ForbesLindesay/umd#name-casing-and-characters). - -Note that in standalone mode the `require()` calls from the original source will -still be around, which may trip up AMD loaders scanning for `require()` calls. -You can remove these calls with -[derequire](https://www.npmjs.com/package/derequire): - -``` -$ npm install -g derequire -$ browserify main.js --standalone Foo | derequire > bundle.js -``` - -`opts.insertGlobalVars` will be passed to -[insert-module-globals](http://npmjs.org/package/insert-module-globals) -as the `opts.vars` parameter. - -`opts.externalRequireName` defaults to `'require'` in `expose` mode but you can -use another name. - -Note that if files do not contain javascript source code then you also need to -specify a corresponding transform for them. - -All other options are forwarded along to -[module-deps](https://www.npmjs.com/package/module-deps) -and [browser-pack](https://www.npmjs.com/package/browser-pack) directly. - -## b.add(file, opts) - -Add an entry file from `file` that will be executed when the bundle loads. - -If `file` is an array, each item in `file` will be added as an entry file. - -## b.require(file, opts) - -Make `file` available from outside the bundle with `require(file)`. - -The `file` param is anything that can be resolved by `require.resolve()`. - -`file` can also be a stream, but you should also use `opts.basedir` so that -relative requires will be resolvable. - -If `file` is an array, each item in `file` will be required. -In `file` array form, you can use a string or object for each item. Object items -should have a `file` property and the rest of the parameters will be used for -the `opts`. - -Use the `expose` property of opts to specify a custom dependency name. -`require('./vendor/angular/angular.js', {expose: 'angular'})` enables `require('angular')` - -## b.bundle(cb) - -Bundle the files and their dependencies into a single javascript file. - -Return a readable stream with the javascript file contents or -optionally specify a `cb(err, buf)` to get the buffered results. - -## b.external(file) - -Prevent `file` from being loaded into the current bundle, instead referencing -from another bundle. - -If `file` is an array, each item in `file` will be externalized. - -If `file` is another bundle, that bundle's contents will be read and excluded -from the current bundle as the bundle in `file` gets bundled. - -## b.ignore(file) - -Prevent the module name or file at `file` from showing up in the output bundle. - -Instead you will get a file with `module.exports = {}`. - -## b.exclude(file) - -Prevent the module name or file at `file` from showing up in the output bundle. - -If your code tries to `require()` that file it will throw unless you've provided -another mechanism for loading it. - -## b.transform(tr, opts={}) - -Transform source code before parsing it for `require()` calls with the transform -function or module name `tr`. - -If `tr` is a function, it will be called with `tr(file)` and it should return a -[through-stream](https://github.com/substack/stream-handbook#through) -that takes the raw file contents and produces the transformed source. - -If `tr` is a string, it should be a module name or file path of a -[transform module](https://github.com/substack/module-deps#transforms) -with a signature of: - -``` js -var through = require('through'); -module.exports = function (file) { return through() }; -``` - -You don't need to necessarily use the -[through](https://www.npmjs.com/package/through) module. Browserify is compatible with the newer, more verbose [Transform streams](http://nodejs.org/api/stream.html#stream_class_stream_transform_1) built into Node v0.10. - -Here's how you might compile coffee script on the fly using `.transform()`: - -``` js -var coffee = require('coffee-script'); -var through = require('through'); - -b.transform(function (file) { - var data = ''; - return through(write, end); - - function write (buf) { data += buf } - function end () { - this.queue(coffee.compile(data)); - this.queue(null); - } -}); -``` - -Note that on the command-line with the `-c` flag you can just do: - -``` -$ browserify -c 'coffee -sc' main.coffee > bundle.js -``` - -Or better still, use the [coffeeify](https://github.com/jnordberg/coffeeify) -module: - -``` -$ npm install coffeeify -$ browserify -t coffeeify main.coffee > bundle.js -``` - -If `opts.global` is `true`, the transform will operate on ALL files, despite -whether they exist up a level in a `node_modules/` directory. Use global -transforms cautiously and sparingly, since most of the time an ordinary -transform will suffice. You can also not configure global transforms in a -`package.json` like you can with ordinary transforms. - -Global transforms always run after any ordinary transforms have run. - -Transforms may obtain options from the command-line with -[subarg](https://www.npmjs.com/package/subarg) syntax: - -``` -$ browserify -t [ foo --bar=555 ] main.js -``` - -or from the api: - -``` -b.transform('foo', { bar: 555 }) -``` - -In both cases, these options are provided as the second argument to the -transform function: - -``` -module.exports = function (file, opts) { /* opts.bar === 555 */ } -``` - -Options sent to the browserify constructor are also provided under -`opts._flags`. These browserify options are sometimes required if your transform -needs to do something different when browserify is run in debug mode, for -example. - -## b.plugin(plugin, opts) - -Register a `plugin` with `opts`. Plugins can be a string module name or a -function the same as transforms. - -`plugin(b, opts)` is called with the browserify instance `b`. - -For more information, consult the plugins section below. - -## b.pipeline - -There is an internal -[labeled-stream-splicer](https://www.npmjs.com/package/labeled-stream-splicer) -pipeline with these labels: - -* `'record'` - save inputs to play back later on subsequent `bundle()` calls -* `'deps'` - [module-deps](https://www.npmjs.com/package/module-deps) -* `'json'` - adds `module.exports=` to the beginning of json files -* `'unbom'` - remove byte-order markers -* `'unshebang'` - remove #! labels on the first line -* `'syntax'` - check for syntax errors -* `'sort'` - sort the dependencies for deterministic bundles -* `'dedupe'` - remove duplicate source contents -* `'label'` - apply integer labels to files -* `'emit-deps'` - emit `'dep'` event -* `'debug'` - apply source maps -* `'pack'` - [browser-pack](https://www.npmjs.com/package/browser-pack) -* `'wrap'` - apply final wrapping, `require=` and a newline and semicolon - -You can call `b.get()` with a label name to get a handle on a stream pipeline -that you can `push()`, `unshift()`, or `splice()` to insert your own transform -streams. - -# b.reset(opts) - -Reset the pipeline back to a normal state. This function is called automatically -when `bundle()` is called multiple times. - -This function triggers a 'reset' event. - -# package.json - -browserify uses the `package.json` in its module resolution algorithm, just like -node. If there is a `"main"` field, browserify will start resolving the package -at that point. If there is no `"main"` field, browserify will look for an -`"index.js"` file in the module root directory. Here are some more -sophisticated things you can do in the package.json: - -## browser field - -There is a special "[browser](https://gist.github.com/4339901)" field you can -set in your package.json on a per-module basis to override file resolution for -browser-specific versions of files. - -For example, if you want to have a browser-specific module entry point for your -`"main"` field you can just set the `"browser"` field to a string: - -``` json -"browser": "./browser.js" -``` - -or you can have overrides on a per-file basis: - -``` json -"browser": { - "fs": "level-fs", - "./lib/ops.js": "./browser/opts.js" -} -``` - -Note that the browser field only applies to files in the local module, and like -transforms, it doesn't apply into `node_modules` directories. - -## browserify.transform - -You can specify source transforms in the package.json in the -`browserify.transform` field. There is more information about how source -transforms work in package.json on the -[module-deps readme](https://github.com/substack/module-deps#transforms). - -For example, if your module requires [brfs](https://www.npmjs.com/package/brfs), you -can add - -``` json -"browserify": { "transform": [ "brfs" ] } -``` - -to your package.json. Now when somebody `require()`s your module, brfs will -automatically be applied to the files in your module without explicit -intervention by the person using your module. Make sure to add transforms to -your package.json dependencies field. - -# events - -## b.on('file', function (file, id, parent) {}) -## b.pipeline.on('file', function (file, id, parent) {}) - -When a file is resolved for the bundle, the bundle emits a `'file'` event with -the full `file` path, the `id` string passed to `require()`, and the `parent` -object used by -[browser-resolve](https://github.com/defunctzombie/node-browser-resolve). - -You could use the `file` event to implement a file watcher to regenerate bundles -when files change. - -## b.on('package', function (pkg) {}) -## b.pipeline.on('package', function (pkg) {}) - -When a package file is read, this event fires with the contents. The package -directory is available at `pkg.__dirname`. - -## b.on('bundle', function (bundle) {}) - -When `.bundle()` is called, this event fires with the `bundle` output stream. - -## b.on('reset', function () {}) - -When the `.reset()` method is called or implicitly called by another call to -`.bundle()`, this event fires. - -## b.on('transform', function (tr, file) {}) -## b.pipeline.on('transform', function (tr, file) {}) - -When a transform is applied to a file, the `'transform'` event fires on the -bundle stream with the transform stream `tr` and the `file` that the transform -is being applied to. - -# plugins - -For some more advanced use-cases, a transform is not sufficiently extensible. -Plugins are modules that take the bundle instance as their first parameter and -an option hash as their second. - -Plugins can be used to do perform some fancy features that transforms can't do. -For example, [factor-bundle](https://www.npmjs.com/package/factor-bundle) is a -plugin that can factor out common dependencies from multiple entry-points into a -common bundle. Use plugins with `-p` and pass options to plugins with -[subarg](https://www.npmjs.com/package/subarg) syntax: - -``` -browserify x.js y.js -p [ factor-bundle -o bundle/x.js -o bundle/y.js ] \ - > bundle/common.js -``` - -For a list of plugins, consult the -[browserify-plugin tag](https://www.npmjs.com/browse/keyword/browserify-plugin) -on npm. - -# list of source transforms - -There is a [wiki page that lists the known browserify -transforms](https://github.com/substack/node-browserify/wiki/list-of-transforms). - -If you write a transform, make sure to add your transform to that wiki page and -add a package.json keyword of `browserify-transform` so that -[people can browse for all the browserify -transforms](https://www.npmjs.com/browse/keyword/browserify-transform) on npmjs.org. - -# third-party tools - -There is a [wiki page that lists the known browserify -tools](https://github.com/substack/node-browserify/wiki/browserify-tools). - -If you write a tool, make sure to add it to that wiki page and -add a package.json keyword of `browserify-tool` so that -[people can browse for all the browserify -tools](https://www.npmjs.com/browse/keyword/browserify-tool) on npmjs.org. - -# changelog - -Releases are documented in -[changelog.markdown](changelog.markdown) and on the -[browserify twitter feed](https://twitter.com/browserify). - -# license - -MIT - -![browserify!](http://substack.net/images/browserify/browserify.png) diff --git a/node_modules/browserify/test/args.js b/node_modules/browserify/test/args.js deleted file mode 100644 index 6f8cb021..00000000 --- a/node_modules/browserify/test/args.js +++ /dev/null @@ -1,72 +0,0 @@ -var test = require('tap').test; -var fromArgs = require('../bin/args.js'); -var path = require('path'); -var vm = require('vm'); - -test('bundle from an arguments array', function (t) { - t.plan(2); - - var b = fromArgs([ __dirname + '/entry/two.js', '-s', 'XYZ' ]); - b.bundle(function (err, src) { - t.ifError(err); - var c = { window: {} }; - vm.runInNewContext(src, c); - t.equal(c.window.XYZ, 2); - }); -}); - -test('external flag for node modules', function(t) { - t.plan(2); - - var b = fromArgs([ __dirname + '/external_args/main.js', '-x', 'backbone' ]); - b.bundle(function (err, src) { - t.ifError(err); - vm.runInNewContext(src, {t: t}); - }); -}); - -test('bundle from an arguments with --insert-global-vars', function (t) { - t.plan(4); - - var b = fromArgs([ - __dirname + '/global/filename.js', - '--insert-global-vars=__filename,__dirname', - '--basedir', __dirname - ]); - b.require(__dirname + '/global/filename.js', { expose: 'x' }); - b.bundle(function (err, src) { - t.ifError(err, 'b.bundle()'); - var c = {}, x; - vm.runInNewContext(src, c); - t.doesNotThrow(function() { - x = c.require('x'); - }, 'x = c.require(\'x\')'); - t.equal(x && x.filename, '/global/filename.js', 'x.filename'); - t.equal(x && x.dirname, '/global', 'x.dirname'); - }) -}); - -test('numeric module names', function(t) { - t.plan(1); - - var b = fromArgs([ '-x', '1337' ]); - b.bundle(function (err, src) { - t.ifError(err); - }); -}); - -test('entry expose', function (t) { - t.plan(3) - - var b = fromArgs([ - path.join(__dirname, '/entry_expose/main.js'), - '--require', path.join(__dirname, '/entry_expose/main.js') + ':x', - ]); - b.bundle(function (err, src) { - t.ifError(err); - var c = { console: { log: log } }; - function log (msg) { t.equal(msg, 'wow') } - vm.runInNewContext(src, c); - t.equal(c.require('x'), 555); - }) -}); diff --git a/node_modules/browserify/test/array.js b/node_modules/browserify/test/array.js deleted file mode 100644 index 990bc650..00000000 --- a/node_modules/browserify/test/array.js +++ /dev/null @@ -1,74 +0,0 @@ -var browserify = require('../'); -var vm = require('vm'); -var test = require('tap').test; - -test('array add', function (t) { - var expected = [ 'ONE', 'TWO', 'THREE' ]; - t.plan(expected.length); - - var b = browserify(); - var files = [ - __dirname + '/array/one.js', - __dirname + '/array/two.js', - __dirname + '/array/three.js' - ]; - b.add(files); - b.bundle(function (err, src) { - vm.runInNewContext(src, { console: { log: log } }); - function log (msg) { - t.equal(msg, expected.shift()); - } - }); -}); - -test('array require', function (t) { - t.plan(3); - - var b = browserify(); - var files = [ 'isarray', 'subarg' ]; - b.require(files); - b.bundle(function (err, src) { - var c = {}; - vm.runInNewContext(src, c); - - t.equal(c.require('isarray')([]), true); - t.equal(c.require('isarray')({}), false); - t.deepEqual(c.require('subarg')(['-x', '3']), { x: 3, _: [] }); - }); -}); - -test('array require opts', function (t) { - t.plan(3); - - var b = browserify(); - var files = [ - { file: require.resolve('isarray'), expose: 'abc' }, - { file: require.resolve('subarg'), expose: 'def' } - ]; - b.require(files); - b.bundle(function (err, src) { - var c = {}; - vm.runInNewContext(src, c); - - t.equal(c.require('abc')([]), true); - t.equal(c.require('abc')({}), false); - t.deepEqual(c.require('def')(['-x', '3']), { x: 3, _: [] }); - }); -}); - -test('array external', function (t) { - t.plan(2); - - var b = browserify(__dirname + '/external/main.js'); - b.external(['util','freelist']); - b.bundle(function (err, src) { - if (err) return t.fail(err); - vm.runInNewContext( - 'function require (x) {' - + 'if (x==="freelist") return function (n) { return n + 1000 }' - + '}' - + src, - { t: t } - ); - }); -}); diff --git a/node_modules/browserify/test/array/one.js b/node_modules/browserify/test/array/one.js deleted file mode 100644 index c6312fd4..00000000 --- a/node_modules/browserify/test/array/one.js +++ /dev/null @@ -1 +0,0 @@ -console.log('ONE'); diff --git a/node_modules/browserify/test/array/three.js b/node_modules/browserify/test/array/three.js deleted file mode 100644 index 77a6c3af..00000000 --- a/node_modules/browserify/test/array/three.js +++ /dev/null @@ -1 +0,0 @@ -console.log('THREE'); diff --git a/node_modules/browserify/test/array/two.js b/node_modules/browserify/test/array/two.js deleted file mode 100644 index fa60b5ad..00000000 --- a/node_modules/browserify/test/array/two.js +++ /dev/null @@ -1 +0,0 @@ -console.log('TWO'); diff --git a/node_modules/browserify/test/backbone.js b/node_modules/browserify/test/backbone.js deleted file mode 100644 index 03e6f690..00000000 --- a/node_modules/browserify/test/backbone.js +++ /dev/null @@ -1,23 +0,0 @@ -var browserify = require('../'); -var vm = require('vm'); -var backbone = require('backbone'); -var test = require('tap').test; - -test('backbone', function (t) { - t.plan(3); - var b = browserify(); - b.require('backbone'); - b.bundle(function (err, buf) { - t.ok(Buffer.isBuffer(buf)); - var src = buf.toString('utf8'); - t.ok(src.length > 0); - - var c = { console: console }; - vm.runInNewContext(src, c); - t.deepEqual( - Object.keys(backbone).sort(), - Object.keys(c.require('backbone')).sort() - ); - t.end(); - }); -}); diff --git a/node_modules/browserify/test/bare.js b/node_modules/browserify/test/bare.js deleted file mode 100644 index 2ef1031b..00000000 --- a/node_modules/browserify/test/bare.js +++ /dev/null @@ -1,39 +0,0 @@ -var test = require('tap').test; -var spawn = require('child_process').spawn; -var path = require('path'); -var concat = require('concat-stream'); -var vm = require('vm'); - -test('bare', function (t) { - t.plan(4); - - var cwd = process.cwd(); - process.chdir(__dirname); - - var ps = spawn(process.execPath, [ - path.resolve(__dirname, '../bin/cmd.js'), - '-', '--bare' - ]); - ps.stdout.pipe(concat(function (body) { - vm.runInNewContext(body, { - Buffer: function (s) { return s.toLowerCase() }, - console: { - log: function (msg) { t.equal(msg, 'abc') } - } - }); - vm.runInNewContext(body, { - Buffer: Buffer, - console: { - log: function (msg) { - t.ok(Buffer.isBuffer(msg)); - t.equal(msg.toString('utf8'), 'ABC') - } - } - }); - })); - ps.stdin.end('console.log(Buffer("ABC"))'); - - ps.on('exit', function (code) { - t.equal(code, 0); - }); -}); diff --git a/node_modules/browserify/test/bare_shebang.js b/node_modules/browserify/test/bare_shebang.js deleted file mode 100644 index c47bf44d..00000000 --- a/node_modules/browserify/test/bare_shebang.js +++ /dev/null @@ -1,37 +0,0 @@ -var test = require('tap').test; -var spawn = require('child_process').spawn; -var path = require('path'); -var concat = require('concat-stream'); -var vm = require('vm'); - -test('bare shebang', function (t) { - t.plan(4); - - var ps = spawn(process.execPath, [ - path.resolve(__dirname, '../bin/cmd.js'), - '-', '--bare' - ]); - ps.stderr.pipe(process.stderr); - ps.stdout.pipe(concat(function (body) { - vm.runInNewContext(body, { - Buffer: function (s) { return s.toLowerCase() }, - console: { - log: function (msg) { t.equal(msg, 'woo') } - } - }); - vm.runInNewContext(body, { - Buffer: Buffer, - console: { - log: function (msg) { - t.ok(Buffer.isBuffer(msg)); - t.equal(msg.toString('utf8'), 'WOO') - } - } - }); - })); - ps.stdin.end('#!/usr/bin/env node\nconsole.log(Buffer("WOO"))'); - - ps.on('exit', function (code) { - t.equal(code, 0); - }); -}); diff --git a/node_modules/browserify/test/bin.js b/node_modules/browserify/test/bin.js deleted file mode 100644 index cb7b17aa..00000000 --- a/node_modules/browserify/test/bin.js +++ /dev/null @@ -1,31 +0,0 @@ -var test = require('tap').test; -var spawn = require('child_process').spawn; -var path = require('path'); -var vm = require('vm'); - -test('bin', function (t) { - t.plan(3); - - var cwd = process.cwd(); - process.chdir(__dirname); - - var ps = spawn(process.execPath, [ - path.resolve(__dirname, '../bin/cmd.js'), - 'entry/main.js' - ]); - var src = ''; - var err = ''; - ps.stdout.on('data', function (buf) { src += buf }); - ps.stderr.on('data', function (buf) { err += buf }); - - ps.on('exit', function (code) { - t.equal(code, 0); - t.equal(err, ''); - - var allDone = false; - var c = { done : function () { allDone = true } }; - - vm.runInNewContext(src, c); - t.ok(allDone); - }); -}); diff --git a/node_modules/browserify/test/bin_entry.js b/node_modules/browserify/test/bin_entry.js deleted file mode 100644 index f7e9af32..00000000 --- a/node_modules/browserify/test/bin_entry.js +++ /dev/null @@ -1,31 +0,0 @@ -var test = require('tap').test; -var spawn = require('child_process').spawn; -var path = require('path'); -var vm = require('vm'); - -test('bin --entry', function (t) { - t.plan(3); - - var cwd = process.cwd(); - process.chdir(__dirname); - - var ps = spawn(process.execPath, [ - path.resolve(__dirname, '../bin/cmd.js'), - '--entry', 'entry/main.js' - ]); - var src = ''; - var err = ''; - ps.stdout.on('data', function (buf) { src += buf }); - ps.stderr.on('data', function (buf) { err += buf }); - - ps.on('exit', function (code) { - t.equal(code, 0); - t.equal(err, ''); - - var allDone = false; - var c = { done : function () { allDone = true } }; - - vm.runInNewContext(src, c); - t.ok(allDone); - }); -}); diff --git a/node_modules/browserify/test/bin_tr_error.js b/node_modules/browserify/test/bin_tr_error.js deleted file mode 100644 index 039704cc..00000000 --- a/node_modules/browserify/test/bin_tr_error.js +++ /dev/null @@ -1,23 +0,0 @@ -var browserify = require('../'); -var spawn = require('child_process').spawn; -var test = require('tap').test; -var path = require('path') - -test('function transform', function (t) { - t.plan(3); - var ps = spawn(process.execPath, [ - path.resolve(__dirname, '../bin/cmd.js'), - '-t', './tr.js', './main.js' - ], {cwd: path.resolve(__dirname, 'bin_tr_error')}); - var src = ''; - var err = ''; - ps.stdout.on('data', function (buf) { src += buf }); - ps.stderr.on('data', function (buf) { err += buf }); - - ps.on('exit', function (code) { - t.notEqual(code, 0); - var errorFile = path.resolve(__dirname, 'bin_tr_error', 'tr.js'); - t.notEqual(err.indexOf('there was error'), -1, 'Error should contain error message') - t.notEqual(err.indexOf(errorFile), -1, 'Error should contain stack trace') - }); -}); diff --git a/node_modules/browserify/test/bin_tr_error/main.js b/node_modules/browserify/test/bin_tr_error/main.js deleted file mode 100644 index ec448ae8..00000000 --- a/node_modules/browserify/test/bin_tr_error/main.js +++ /dev/null @@ -1 +0,0 @@ -t.equal(XXX * 5, 555); diff --git a/node_modules/browserify/test/bin_tr_error/tr.js b/node_modules/browserify/test/bin_tr_error/tr.js deleted file mode 100644 index c4e537e1..00000000 --- a/node_modules/browserify/test/bin_tr_error/tr.js +++ /dev/null @@ -1,12 +0,0 @@ -var through = require('through2'); - -module.exports = function (file, opts) { - var data = ''; - return through(write, end); - - function write (buf, enc, next) { data += buf; next() } - function end () { - this.emit('error', new Error('there was error')) - this.push(null); - } -}; diff --git a/node_modules/browserify/test/bom.js b/node_modules/browserify/test/bom.js deleted file mode 100644 index 78cca51e..00000000 --- a/node_modules/browserify/test/bom.js +++ /dev/null @@ -1,19 +0,0 @@ -var browserify = require('../'); -var vm = require('vm'); -var test = require('tap').test; - -test('byte order marker', function (t) { - t.plan(2); - - var b = browserify(__dirname + '/bom/hello.js'); - b.bundle(function (err, src) { - if (err) t.fail(err); - var c = { - console: { log: function (msg) { - t.equal(msg, 'hello'); - } } - }; - vm.runInNewContext(src, c); - t.notOk(/\ufeff/.test(src.toString('utf8'))); - }); -}); diff --git a/node_modules/browserify/test/bom/hello.js b/node_modules/browserify/test/bom/hello.js deleted file mode 100644 index 03b374a1..00000000 --- a/node_modules/browserify/test/bom/hello.js +++ /dev/null @@ -1 +0,0 @@ -console.log('hello') diff --git a/node_modules/browserify/test/browser_field_file.js b/node_modules/browserify/test/browser_field_file.js deleted file mode 100644 index cecaef22..00000000 --- a/node_modules/browserify/test/browser_field_file.js +++ /dev/null @@ -1,13 +0,0 @@ -var test = require('tap').test; -var vm = require('vm'); -var browserify = require('../'); - -test('browser field file no ext', function (t) { - t.plan(2); - var b = browserify(__dirname + '/browser_field_file/xyz'); - b.bundle(function (err, src) { - t.ifError(err); - vm.runInNewContext(src, { console: { log: log } }); - function log (msg) { t.equal(msg, 'cool beans') } - }); -}); diff --git a/node_modules/browserify/test/browser_field_file/package.json b/node_modules/browserify/test/browser_field_file/package.json deleted file mode 100644 index f146bccd..00000000 --- a/node_modules/browserify/test/browser_field_file/package.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "browser": { - "./xyz": "wow.js" - } -} diff --git a/node_modules/browserify/test/browser_field_file/wow.js b/node_modules/browserify/test/browser_field_file/wow.js deleted file mode 100644 index eca0d759..00000000 --- a/node_modules/browserify/test/browser_field_file/wow.js +++ /dev/null @@ -1 +0,0 @@ -console.log('cool beans'); diff --git a/node_modules/browserify/test/buffer.js b/node_modules/browserify/test/buffer.js deleted file mode 100644 index 5a2747f7..00000000 --- a/node_modules/browserify/test/buffer.js +++ /dev/null @@ -1,142 +0,0 @@ -var browserify = require('../'); -var test = require('tap').test; -var vm = require('vm'); - -test('utf8 buffer to base64', function (t) { - t.plan(1); - var b = browserify(); - b.require('buffer'); - b.bundle(function (err, src) { - if (err) return t.fail(err); - var c = context(); - vm.runInNewContext(src, c); - t.equal( - new c.require('buffer').Buffer("Ձאab", "utf8").toString("base64"), - new Buffer("Ձאab", "utf8").toString("base64") - ); - }); -}); - -test('utf8 buffer to hex', function (t) { - t.plan(1); - var b = browserify(); - b.require('buffer'); - b.bundle(function (err, src) { - var c = context(); - vm.runInNewContext(src, c); - t.equal( - new c.require('buffer').Buffer("Ձאab", "utf8").toString("hex"), - new Buffer("Ձאab", "utf8").toString("hex") - ); - }); -}); - -test('ascii buffer to base64', function (t) { - t.plan(1); - var b = browserify(); - b.require('buffer'); - - b.bundle(function (err, src) { - var c = context(); - vm.runInNewContext(src, c); - t.equal( - new c.require('buffer').Buffer("123456!@#$%^", "ascii").toString("base64"), - new Buffer("123456!@#$%^", "ascii").toString("base64") - ); - }); -}); - -test('ascii buffer to hex', function (t) { - t.plan(1); - var b = browserify(); - b.require('buffer'); - b.bundle(function (err, src) { - var c = context(); - vm.runInNewContext(src, c); - t.equal( - new c.require('buffer').Buffer("123456!@#$%^", "ascii").toString("hex"), - new Buffer("123456!@#$%^", "ascii").toString("hex") - ); - }); -}); - -test('base64 buffer to utf8', function (t) { - t.plan(1); - var b = browserify(); - b.require('buffer'); - b.bundle(function (err, src) { - var c = context(); - vm.runInNewContext(src, c); - t.equal( - new c.require('buffer').Buffer("1YHXkGFi", "base64").toString("utf8"), - new Buffer("1YHXkGFi", "base64").toString("utf8") - ); - }); -}); - -test('hex buffer to utf8', function (t) { - t.plan(1); - var b = browserify(); - b.require('buffer'); - b.bundle(function (err, src) { - var c = context(); - vm.runInNewContext(src, c); - var B = c.require('buffer'); - t.equal( - new B.Buffer("d581d7906162", "hex").toString("utf8"), - new Buffer("d581d7906162", "hex").toString("utf8") - ); - }); -}); - -test('base64 buffer to ascii', function (t) { - t.plan(1); - var b = browserify(); - b.require('buffer'); - b.bundle(function (err, src) { - var c = context(); - vm.runInNewContext(src, c); - t.equal( - new c.require('buffer').Buffer("MTIzNDU2IUAjJCVe", "base64").toString("ascii"), - new Buffer("MTIzNDU2IUAjJCVe", "base64").toString("ascii") - ); - }); -}); - -test('hex buffer to ascii', function (t) { - t.plan(1); - var b = browserify(); - b.require('buffer'); - b.bundle(function (err, src) { - var c = context(); - vm.runInNewContext(src, c); - t.equal( - new c.require('buffer').Buffer("31323334353621402324255e", "hex").toString("ascii"), - new Buffer("31323334353621402324255e", "hex").toString("ascii") - ); - }); -}); - -test('indexing a buffer', function (t) { - t.plan(5); - var b = browserify(); - b.require('buffer'); - b.bundle(function (err, src) { - var c = context(); - vm.runInNewContext(src, c); - var buf = c.require('buffer').Buffer('abc'); - t.equal(buf[0], 97); - t.equal(buf[1], 98); - t.equal(buf[2], 99); - t.equal(buf[3], undefined); - t.equal(buf.toString('utf8'), 'abc'); - }); -}); - -function context () { - return { - ArrayBuffer: ArrayBuffer, - Uint8Array: Uint8Array, - DataView: DataView - }; -} diff --git a/node_modules/browserify/test/bundle-bundle-external.js b/node_modules/browserify/test/bundle-bundle-external.js deleted file mode 100644 index 559e7f1f..00000000 --- a/node_modules/browserify/test/bundle-bundle-external.js +++ /dev/null @@ -1,31 +0,0 @@ -var browserify = require('../'); -var test = require('tap').test; - -var pubdir = __dirname; -var dir = pubdir + '/bundle-bundle-external'; - -var opt = { - debug: true, - basedir: pubdir, - exposeAll: true -}; - -test('bundle bundle external', function (t) { - t.plan(1); - var bundle1 = browserify(opt); - var name = dir + '/foo.js'; - bundle1.require(name, { entry: true, expose: name, basedir: pubdir }); - - var bundle2 = browserify({ - debug: true, - basedir: pubdir, - entries: [ dir + '/baz.js' ] - }); - - // adding and removing this line causes failure // - //bundle2.external(bundle1); - - bundle2.bundle(function(err, src) { - t.ifError(err); - }); -}); diff --git a/node_modules/browserify/test/bundle-bundle-external/bar.js b/node_modules/browserify/test/bundle-bundle-external/bar.js deleted file mode 100644 index 8079379c..00000000 --- a/node_modules/browserify/test/bundle-bundle-external/bar.js +++ /dev/null @@ -1,2 +0,0 @@ -module.exports = 'bar'; -done(); diff --git a/node_modules/browserify/test/bundle-bundle-external/baz.js b/node_modules/browserify/test/bundle-bundle-external/baz.js deleted file mode 100644 index 1dda5de3..00000000 --- a/node_modules/browserify/test/bundle-bundle-external/baz.js +++ /dev/null @@ -1,3 +0,0 @@ -var foo = require('./foo'); -assert.equal(foo, 'foo'); -done(); diff --git a/node_modules/browserify/test/bundle-bundle-external/foo.js b/node_modules/browserify/test/bundle-bundle-external/foo.js deleted file mode 100644 index 99cf946d..00000000 --- a/node_modules/browserify/test/bundle-bundle-external/foo.js +++ /dev/null @@ -1,5 +0,0 @@ -var bar = require('./bar'); -assert.equal(bar, 'bar'); - -module.exports = 'foo'; -done(); diff --git a/node_modules/browserify/test/bundle-stream.js b/node_modules/browserify/test/bundle-stream.js deleted file mode 100644 index 4193b334..00000000 --- a/node_modules/browserify/test/bundle-stream.js +++ /dev/null @@ -1,18 +0,0 @@ -var browserify = require('../'); -var test = require('tap').test; - -var isReadable = require('isstream').isReadable; -var isWritable = require('isstream').isWritable; - -test('bundle is readable stream', function (t) { - t.plan(4); - var b = browserify(__dirname + '/entry/main.js'); - b.on('bundle', function(bundle) { - t.ok(isReadable(bundle)); - t.notok(isWritable(bundle)); - }); - - var stream = b.bundle(); - t.ok(isReadable(stream)); - t.notok(isWritable(stream)); -}); diff --git a/node_modules/browserify/test/bundle.js b/node_modules/browserify/test/bundle.js deleted file mode 100644 index 115317a6..00000000 --- a/node_modules/browserify/test/bundle.js +++ /dev/null @@ -1,33 +0,0 @@ -var browserify = require('../'); -var vm = require('vm'); -var test = require('tap').test; - -test('bundle', function (t) { - var b = browserify(); - b.require('seq'); - b.bundle(function (err, src) { - t.plan(3); - - t.ifError(err); - t.ok(src.length > 0); - - var c = { - setTimeout : setTimeout, - clearTimeout : clearTimeout, - console : console - }; - vm.runInNewContext(src, c); - - c.require('seq')([1,2,3]) - .parMap_(function (next, x) { - setTimeout(function () { - next.ok(x * 100) - }, 10) - }) - .seq(function (x,y,z) { - t.deepEqual([x,y,z], [100,200,300]); - t.end(); - }) - ; - }); -}); diff --git a/node_modules/browserify/test/bundle_external.js b/node_modules/browserify/test/bundle_external.js deleted file mode 100644 index 05a0ac27..00000000 --- a/node_modules/browserify/test/bundle_external.js +++ /dev/null @@ -1,26 +0,0 @@ -var test = require('tap').test; -var browserify = require('../'); -var vm = require('vm'); - -test('bundle external', function (t) { - t.plan(3); - - var expected = [ - { name: 'beep', value: 111 }, - { name: 't-rex', value: 5 } - ]; - - var b = browserify({ bundleExternal: false }); - b.add(__dirname + '/bundle_external/main.js'); - b.bundle(function (err, src) { - var c = { - t: t, - require: function (name) { - var r = expected.shift(); - t.equal(name, r.name); - return r.value; - } - }; - vm.runInNewContext(src, c); - }); -}); diff --git a/node_modules/browserify/test/bundle_external/boop.js b/node_modules/browserify/test/bundle_external/boop.js deleted file mode 100644 index e785264e..00000000 --- a/node_modules/browserify/test/bundle_external/boop.js +++ /dev/null @@ -1,4 +0,0 @@ -var robot = require('./robot.js'); -var trex = require('t-rex'); - -module.exports = function (n) { return robot(n) * trex }; diff --git a/node_modules/browserify/test/bundle_external/main.js b/node_modules/browserify/test/bundle_external/main.js deleted file mode 100644 index 88e3f1d7..00000000 --- a/node_modules/browserify/test/bundle_external/main.js +++ /dev/null @@ -1,4 +0,0 @@ -var beep = require('beep'); -var boop = require('./boop.js'); - -t.equal(boop(beep), 560); diff --git a/node_modules/browserify/test/bundle_external/robot.js b/node_modules/browserify/test/bundle_external/robot.js deleted file mode 100644 index 2a569dd9..00000000 --- a/node_modules/browserify/test/bundle_external/robot.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = function (n) { return n + 1 }; diff --git a/node_modules/browserify/test/bundle_external_global.js b/node_modules/browserify/test/bundle_external_global.js deleted file mode 100644 index 47a9c943..00000000 --- a/node_modules/browserify/test/bundle_external_global.js +++ /dev/null @@ -1,24 +0,0 @@ -var test = require('tap').test; -var browserify = require('../'); -var through = require('through2'); -var vm = require('vm'); - -test('bundle external global', function (t) { - t.plan(1); - - var stream = through(); - stream.push('console.log(process)'); - stream.push(null); - - var b = browserify({ bundleExternal: false }); - b.add(stream); - b.bundle(function (err, src) { - vm.runInNewContext(src, { - console: { log: log }, - process: process - }); - function log (msg) { - t.equal(typeof msg.nextTick, 'function'); - } - }); -}); diff --git a/node_modules/browserify/test/bundle_sourcemap.js b/node_modules/browserify/test/bundle_sourcemap.js deleted file mode 100644 index 02b8f432..00000000 --- a/node_modules/browserify/test/bundle_sourcemap.js +++ /dev/null @@ -1,32 +0,0 @@ -var browserify = require('../'); -var test = require('tap').test; - -test('bundle in debug mode', function (t) { - t.plan(3); - - var b = browserify({ debug: true }); - b.require('seq'); - b.bundle(function (err, buf) { - var src = buf.toString('utf8'); - var secondtolastLine = src.split('\n').slice(-2); - - t.ok(typeof src === 'string'); - t.ok(src.length > 0); - t.ok(/^\/\/# sourceMappingURL=/.test(secondtolastLine), 'includes sourcemap'); - }); -}); - -test('bundle in non debug mode', function (t) { - t.plan(3); - - var b = browserify(); - b.require('seq'); - b.bundle(function (err, buf) { - var src = buf.toString('utf8'); - var secondtolastLine = src.split('\n').slice(-2); - - t.ok(typeof src === 'string'); - t.ok(src.length > 0); - t.notOk(/^\/\/# sourceMappingURL=/.test(secondtolastLine), 'includes no sourcemap'); - }); -}); diff --git a/node_modules/browserify/test/catch.js b/node_modules/browserify/test/catch.js deleted file mode 100644 index f85b67ba..00000000 --- a/node_modules/browserify/test/catch.js +++ /dev/null @@ -1,22 +0,0 @@ -var browserify = require('../'); -var test = require('tap').test; - -test('catch pipeline errors with a callback', function (t) { - t.plan(2); - - var b = browserify(__dirname + '/catch/main.js'); - b.bundle(function (err, src) { - t.ok(err); - t.ok(/no_such_file/.test(err)); - }); -}); - -test('catch pipeline errors with an event', function (t) { - t.plan(2); - - var b = browserify(__dirname + '/catch/main.js').bundle(); - b.on('error', function (err) { - t.ok(err); - t.ok(/no_such_file/.test(err)); - }); -}); diff --git a/node_modules/browserify/test/catch/main.js b/node_modules/browserify/test/catch/main.js deleted file mode 100644 index a522a65c..00000000 --- a/node_modules/browserify/test/catch/main.js +++ /dev/null @@ -1 +0,0 @@ -require('./no_such_file'); diff --git a/node_modules/browserify/test/circular.js b/node_modules/browserify/test/circular.js deleted file mode 100644 index 92efadee..00000000 --- a/node_modules/browserify/test/circular.js +++ /dev/null @@ -1,34 +0,0 @@ -var browserify = require('../'); -var vm = require('vm'); -var test = require('tap').test; - -test('circular', function (t) { - t.plan(1); - - var b = browserify(__dirname + '/circular/main.js'); - b.bundle(function (err, src) { - vm.runInNewContext(src, { t: t }); - }); -}); - -test('circular expose', function (t) { - t.plan(1); - - var b = browserify(__dirname + '/circular/main.js'); - b.require(__dirname + '/circular/a.js', { expose: './a.js' }); - b.require(__dirname + '/circular/b.js', { expose: './b.js' }); - b.bundle(function (err, src) { - vm.runInNewContext(src, { t: t }); - }); -}); - -test('circular require', function (t) { - t.plan(1); - - var b = browserify(__dirname + '/circular/main.js'); - b.require(__dirname + '/circular/a.js'); - b.require(__dirname + '/circular/b.js'); - b.bundle(function (err, src) { - vm.runInNewContext(src, { t: t }); - }); -}); diff --git a/node_modules/browserify/test/circular/a.js b/node_modules/browserify/test/circular/a.js deleted file mode 100644 index f3adf1da..00000000 --- a/node_modules/browserify/test/circular/a.js +++ /dev/null @@ -1,3 +0,0 @@ -exports.a = 1; -exports.b = require('./b'); -exports.a = 5; diff --git a/node_modules/browserify/test/circular/b.js b/node_modules/browserify/test/circular/b.js deleted file mode 100644 index f342a842..00000000 --- a/node_modules/browserify/test/circular/b.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = 2 + require('./a').a diff --git a/node_modules/browserify/test/circular/main.js b/node_modules/browserify/test/circular/main.js deleted file mode 100644 index cbabf971..00000000 --- a/node_modules/browserify/test/circular/main.js +++ /dev/null @@ -1 +0,0 @@ -t.deepEqual(require('./a.js'), { a: 5, b: 3 }); diff --git a/node_modules/browserify/test/coffee_bin.js b/node_modules/browserify/test/coffee_bin.js deleted file mode 100644 index e5056923..00000000 --- a/node_modules/browserify/test/coffee_bin.js +++ /dev/null @@ -1,36 +0,0 @@ -var test = require('tap').test; -var spawn = require('child_process').spawn; -var path = require('path'); -var vm = require('vm'); - -test('compiling coffee with -c', function (t) { - t.plan(4); - - var cwd = process.cwd(); - process.chdir(__dirname); - - var ps = spawn(process.execPath, [ - path.resolve(__dirname, '../bin/cmd.js'), - '-c', '"' + process.execPath + '" "' + __dirname + '/../node_modules/coffee-script/bin/coffee" -sc', - 'coffee_bin/main.coffee' - ]); - var src = ''; - var err = ''; - ps.stdout.on('data', function (buf) { src += buf }); - ps.stderr.on('data', function (buf) { err += buf }); - - ps.on('exit', function (code) { - t.equal(code, 0); - t.equal(err, ''); - - var msgs = [ 'hello world!', 'from x!' ]; - var c = { - console: { - log: function (msg) { - t.equal(msg, msgs.shift()); - } - } - }; - vm.runInNewContext(src, c); - }); -}); diff --git a/node_modules/browserify/test/coffee_bin/main.coffee b/node_modules/browserify/test/coffee_bin/main.coffee deleted file mode 100644 index e9b9dc92..00000000 --- a/node_modules/browserify/test/coffee_bin/main.coffee +++ /dev/null @@ -1,2 +0,0 @@ -console.log "hello world!" -require './x.coffee' diff --git a/node_modules/browserify/test/coffee_bin/x.coffee b/node_modules/browserify/test/coffee_bin/x.coffee deleted file mode 100644 index 3bbf3ca3..00000000 --- a/node_modules/browserify/test/coffee_bin/x.coffee +++ /dev/null @@ -1 +0,0 @@ -console.log "from x!" diff --git a/node_modules/browserify/test/coffeeify.js b/node_modules/browserify/test/coffeeify.js deleted file mode 100644 index 176008c0..00000000 --- a/node_modules/browserify/test/coffeeify.js +++ /dev/null @@ -1,19 +0,0 @@ -var test = require('tap').test; -var browserify = require('../'); -var vm = require('vm'); - -test('coffeeify with an implicit global', function (t) { - t.plan(1); - - var b = browserify(__dirname + '/coffeeify/main.coffee'); - b.transform('coffeeify'); - b.bundle(function (err, src) { - if (err) t.fail(err); - vm.runInNewContext(src, { - console: { log: log }, - setTimeout: setTimeout, - clearTimeout: clearTimeout - }); - function log (msg) { t.equal(msg, 'eyo') } - }); -}); diff --git a/node_modules/browserify/test/coffeeify/main.coffee b/node_modules/browserify/test/coffeeify/main.coffee deleted file mode 100644 index 3e6a9e82..00000000 --- a/node_modules/browserify/test/coffeeify/main.coffee +++ /dev/null @@ -1,2 +0,0 @@ -process.nextTick -> - console.log 'eyo' diff --git a/node_modules/browserify/test/comment.js b/node_modules/browserify/test/comment.js deleted file mode 100644 index f22278f4..00000000 --- a/node_modules/browserify/test/comment.js +++ /dev/null @@ -1,16 +0,0 @@ -var browserify = require('../'); -var vm = require('vm'); -var test = require('tap').test; - -test('trailing comment', function (t) { - t.plan(1); - var b = browserify(__dirname + '/comment/main.js'); - b.bundle(function (err, src) { - var c = { - ex : function (obj) { - t.same(obj, 1234); - } - }; - vm.runInNewContext(src, c); - }); -}); diff --git a/node_modules/browserify/test/comment/main.js b/node_modules/browserify/test/comment/main.js deleted file mode 100644 index 2eca5264..00000000 --- a/node_modules/browserify/test/comment/main.js +++ /dev/null @@ -1,2 +0,0 @@ -ex(1234) -// test \ No newline at end of file diff --git a/node_modules/browserify/test/constants.js b/node_modules/browserify/test/constants.js deleted file mode 100644 index 0efbc6d2..00000000 --- a/node_modules/browserify/test/constants.js +++ /dev/null @@ -1,18 +0,0 @@ -var browserify = require('../'); -var test = require('tap').test; -var vm = require('vm'); -var through = require('through2'); - -test('constants', function (t) { - t.plan(2); - var stream = through(); - stream.push('console.log(require("constants").ENOENT)'); - stream.push(null); - var b = browserify(stream); - - b.bundle(function (err, src) { - t.ifError(err); - vm.runInNewContext(src, { console: { log: log } }); - function log (msg) { t.equal(msg, 2) } - }); -}); diff --git a/node_modules/browserify/test/crypto.js b/node_modules/browserify/test/crypto.js deleted file mode 100644 index 23d77cb0..00000000 --- a/node_modules/browserify/test/crypto.js +++ /dev/null @@ -1,39 +0,0 @@ -var test = require('tap').test; -var spawn = require('child_process').spawn; -var path = require('path'); -var fs = require('fs'); -var vm = require('vm'); -var concat = require('concat-stream'); - -var temp = require('temp'); -temp.track(); -var tmpdir = temp.mkdirSync({prefix: 'browserify-test'}); - -fs.writeFileSync(tmpdir + '/main.js', 'beep(require("crypto"))\n'); - -test('*-browserify libs from node_modules/', function (t) { - t.plan(2); - - var bin = __dirname + '/../bin/cmd.js'; - var ps = spawn(process.execPath, [ bin, 'main.js' ], { cwd : tmpdir }); - - ps.stderr.pipe(process.stderr, { end : false }); - - ps.on('exit', function (code) { - t.equal(code, 0); - }); - - ps.stdout.pipe(concat(function (src) { - var c = { - Int32Array: Int32Array, - ArrayBuffer: ArrayBuffer, - Uint8Array: Uint8Array, - DataView: DataView, - beep : function (c) { - t.equal(typeof c.createHash, 'function'); - }, - require: function () {} - }; - vm.runInNewContext(src.toString('utf8'), c); - })); -}); diff --git a/node_modules/browserify/test/crypto_ig.js b/node_modules/browserify/test/crypto_ig.js deleted file mode 100644 index 67965fcd..00000000 --- a/node_modules/browserify/test/crypto_ig.js +++ /dev/null @@ -1,39 +0,0 @@ -var test = require('tap').test; -var spawn = require('child_process').spawn; -var path = require('path'); -var fs = require('fs'); -var vm = require('vm'); -var concat = require('concat-stream'); - -var temp = require('temp'); -temp.track(); -var tmpdir = temp.mkdirSync({prefix: 'browserify-test'}); - -fs.writeFileSync(tmpdir + '/main.js', 'beep(require("crypto"))\n'); - -test('crypto --insertGlobals', function (t) { - t.plan(2); - - var bin = __dirname + '/../bin/cmd.js'; - var ps = spawn(process.execPath, [ bin, 'main.js', '--ig' ], { cwd : tmpdir }); - - ps.stderr.pipe(process.stderr, { end : false }); - - ps.on('exit', function (code) { - t.equal(code, 0); - }); - - ps.stdout.pipe(concat(function (src) { - var c = { - Int32Array: Int32Array, - ArrayBuffer: ArrayBuffer, - Uint8Array: Uint8Array, - DataView: DataView, - beep : function (c) { - t.equal(typeof c.createHash, 'function'); - }, - require: function () {} - }; - vm.runInNewContext(src.toString('utf8'), c); - })); -}); diff --git a/node_modules/browserify/test/cycle.js b/node_modules/browserify/test/cycle.js deleted file mode 100644 index 6cfd3c25..00000000 --- a/node_modules/browserify/test/cycle.js +++ /dev/null @@ -1,13 +0,0 @@ -var test = require('tap').test; -var browserify = require('../'); -var vm = require('vm'); - -test('cycle', function (t) { - t.plan(2); - var b = browserify(__dirname + '/cycle/entry.js'); - b.bundle(function (err, body) { - t.ifError(err); - vm.runInNewContext(body); - t.ok(true); - }); -}); diff --git a/node_modules/browserify/test/cycle/README.md b/node_modules/browserify/test/cycle/README.md deleted file mode 100644 index d41c3973..00000000 --- a/node_modules/browserify/test/cycle/README.md +++ /dev/null @@ -1,16 +0,0 @@ -browserify-bug-713 -================== - -substack/node-browserify#713 breaks resolving an identical module multiple time from different locations when the module has a circular require. - -## Reproduce - -Module requires two copies of the same module (identical apart from path) and the sub module has a circular require. - -## Example - -This is the case with [readable-stream](https://github.com/isaacs/readable-stream). If two different modules depend on the same version readable-stream (and no npm dedupe), then both of those modules are required in the same project, browserify throws a `RangeError: Maximum call stack size exceeded` - -See https://github.com/isaacs/readable-stream/blob/master/lib/_stream_writable.js#L134 and https://github.com/isaacs/readable-stream/blob/master/lib/_stream_duplex.js#L44 - -This issue is most likely related: substack/node-browserify#735 diff --git a/node_modules/browserify/test/cycle/entry.js b/node_modules/browserify/test/cycle/entry.js deleted file mode 100644 index 6a8dd8eb..00000000 --- a/node_modules/browserify/test/cycle/entry.js +++ /dev/null @@ -1,15 +0,0 @@ -// RE: substack/node-browserify#713 - -// https://github.com/substack/node-browserify/pull/713 breaks resolving -// an identical module multiple time from different locations when the -// module has a circular require. - -// other than path, mod1 and mod2 are identical - -require('./mod1/a') -require('./mod2/a') - -// browserify entry.js - -// works in 3.37.2 -// >= 3.38 throws RangeError: Maximum call stack size exceeded \ No newline at end of file diff --git a/node_modules/browserify/test/cycle/mod1/a.js b/node_modules/browserify/test/cycle/mod1/a.js deleted file mode 100644 index c40d2fed..00000000 --- a/node_modules/browserify/test/cycle/mod1/a.js +++ /dev/null @@ -1 +0,0 @@ -require('./b') \ No newline at end of file diff --git a/node_modules/browserify/test/cycle/mod1/b.js b/node_modules/browserify/test/cycle/mod1/b.js deleted file mode 100644 index 54c7b9c1..00000000 --- a/node_modules/browserify/test/cycle/mod1/b.js +++ /dev/null @@ -1 +0,0 @@ -require('./a') \ No newline at end of file diff --git a/node_modules/browserify/test/cycle/mod2/a.js b/node_modules/browserify/test/cycle/mod2/a.js deleted file mode 100644 index c40d2fed..00000000 --- a/node_modules/browserify/test/cycle/mod2/a.js +++ /dev/null @@ -1 +0,0 @@ -require('./b') \ No newline at end of file diff --git a/node_modules/browserify/test/cycle/mod2/b.js b/node_modules/browserify/test/cycle/mod2/b.js deleted file mode 100644 index 54c7b9c1..00000000 --- a/node_modules/browserify/test/cycle/mod2/b.js +++ /dev/null @@ -1 +0,0 @@ -require('./a') \ No newline at end of file diff --git a/node_modules/browserify/test/debug_standalone.js b/node_modules/browserify/test/debug_standalone.js deleted file mode 100644 index 23a06cc3..00000000 --- a/node_modules/browserify/test/debug_standalone.js +++ /dev/null @@ -1,64 +0,0 @@ -var test = require('tap').test; -var browserify = require('../'); -var through = require('through2'); -var vm = require('vm'); - -test('ordinary debug', function (t) { - t.plan(1); - - var stream = through(); - stream.push('console.log(1+2)'); - stream.push(null); - - var b = browserify({ debug: true }); - b.add(stream); - b.bundle(function (err, buf) { - var src = buf.toString('utf8'); - var last = src.split('\n').slice(-2)[0]; - t.ok( - /\/\/# sourceMappingURL=data:application\/json;charset:utf-8;base64,[\w+\/=]+$/ - .test(last) - ); - }); -}); - -test('debug standalone', function (t) { - t.plan(1); - - var stream = through(); - stream.push('console.log(1+2)'); - stream.push(null); - - var b = browserify({ debug: true, standalone: 'xyz' }); - b.add(stream); - b.bundle(function (err, buf) { - var src = buf.toString('utf8'); - var last = src.split('\n').slice(-2)[0]; - t.ok( - /\/\/# sourceMappingURL=data:application\/json;charset:utf-8;base64,[\w+\/=]+$/ - .test(last) - ); - }); -}); - -test('debug standalone exposed', function (t) { - t.plan(2); - - var stream = through(); - stream.push('console.log(1+2)'); - stream.push(null); - - var b = browserify({ debug: true, standalone: 'xyz' }); - b.require(__dirname + '/debug_standalone/x.js', { expose: 'xxx' }); - b.bundle(function (err, buf) { - var src = buf.toString('utf8'); - var last = src.split('\n').slice(-2)[0]; - t.ok( - /\/\/# sourceMappingURL=data:application\/json;charset:utf-8;base64,[\w+\/=]+$/ - .test(last) - ); - var c = { window: {} }; - vm.runInNewContext(src, c); - t.equal(c.window.xyz, 555); - }); -}); diff --git a/node_modules/browserify/test/debug_standalone/x.js b/node_modules/browserify/test/debug_standalone/x.js deleted file mode 100644 index 3e842e73..00000000 --- a/node_modules/browserify/test/debug_standalone/x.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = 555 diff --git a/node_modules/browserify/test/dedupe-deps.js b/node_modules/browserify/test/dedupe-deps.js deleted file mode 100644 index 4fab4dae..00000000 --- a/node_modules/browserify/test/dedupe-deps.js +++ /dev/null @@ -1,43 +0,0 @@ -var browserify = require('../'); -var test = require('tap').test; - -test('identical content gets deduped and the row gets an implicit dep on the original source', function (t) { - t.plan(1) - - var rows = []; - browserify() - .on('dep', [].push.bind(rows)) - .require(require.resolve('./dup'), { entry: true }) - .bundle(check); - - function check(err, src) { - if (err) return t.fail(err); - var deduped = rows.filter(function (x) { return x.dedupeIndex }); - var d = deduped[0]; - - t.deepEqual(d.deps, { 'dup': d.dedupeIndex }, "adds implicit dep"); - } -}) - -test('identical content gets deduped with fullPaths', function (t) { - t.plan(1) - - var rows = []; - browserify({fullPaths: true}) - .on('dep', [].push.bind(rows)) - .require(require.resolve('./dup'), { entry: true }) - .bundle(check); - - function check(err, src) { - if (err) return t.fail(err); - var deduped = rows.filter(function (x) { return x.dedupe }); - var d = deduped[0]; - - t.deepEqual( - d.source, - 'arguments[4]['+ JSON.stringify(d.dedupe) + '][0]' - + '.apply(exports,arguments)', - "dedupes content" - ); - } -}) diff --git a/node_modules/browserify/test/dedupe-nomap.js b/node_modules/browserify/test/dedupe-nomap.js deleted file mode 100644 index 906fadc0..00000000 --- a/node_modules/browserify/test/dedupe-nomap.js +++ /dev/null @@ -1,64 +0,0 @@ -var browserify = require('../'); -var test = require('tap').test; - -test('identical content gets deduped and the row gets a "nomap" flag set when sourcemaps are turned on', function (t) { - t.plan(4) - - var rows = []; - browserify({ debug: true }) - .on('dep', [].push.bind(rows)) - .require(require.resolve('./dup'), { entry: true }) - .bundle(check); - - function check(err, src) { - if (err) return t.fail(err); - var nomappeds = rows.filter(function (x) { return x.nomap }); - var nm = nomappeds[0]; - - t.equal(rows.length, 3, 'packs 3 rows'); - t.equal(nomappeds.length, 1, 'one of has nomapped flag set'); - t.equal( - rows.filter(function (x) { - return x.id == nm.dedupeIndex - }).length, - 1, - '2 rows with the same hash as the duplicate exist' - ); - t.similar( - nm.source, - /arguments\[4\]\[.+\]\[0\]\.apply\(exports,arguments\)$/, - 'redirects duplicate to original via require call' - ); - } -}) - -test('identical content gets deduped and the row gets a "nomap" flag set when sourcemaps are turned off', function (t) { - t.plan(4) - - var rows = []; - browserify({ debug: false }) - .on('dep', [].push.bind(rows)) - .require(require.resolve('./dup'), { entry: true }) - .bundle(check); - - function check(err, src) { - if (err) return t.fail(err); - var nomappeds = rows.filter(function (x) { return x.nomap }); - var nm = nomappeds[0]; - - t.equal(rows.length, 3, 'packs 3 rows'); - t.equal(nomappeds.length, 1, 'one of has nomapped flag set'); - t.equal( - rows.filter(function (x) { - return x.id == nm.dedupeIndex - }).length, - 1, - '2 rows with the same hash as the duplicate exist' - ); - t.similar( - nm.source, - /arguments\[4\]\[.+\]\[0\]\.apply\(exports,arguments\)$/, - 'redirects duplicate to original via require call' - ); - } -}) diff --git a/node_modules/browserify/test/delay.js b/node_modules/browserify/test/delay.js deleted file mode 100644 index 6335ee83..00000000 --- a/node_modules/browserify/test/delay.js +++ /dev/null @@ -1,24 +0,0 @@ -var browserify = require('../'); -var vm = require('vm'); -var test = require('tap').test; -var through = require('through2'); - -test('delay for pipelines', function (t) { - t.plan(3); - - var b = browserify(__dirname + '/delay/main.js'); - b.pipeline.get('record').push(through.obj(function (row, enc, next) { - if (row.file) { - t.equal(row.file, __dirname + '/delay/main.js'); - row.file = __dirname + '/delay/diverted.js'; - } - this.push(row); - next(); - })); - - b.bundle(function (err, src) { - t.ifError(err); - vm.runInNewContext(src, { console: { log: log } }); - function log (msg) { t.equal(msg, 900) } - }); -}); diff --git a/node_modules/browserify/test/delay/diverted.js b/node_modules/browserify/test/delay/diverted.js deleted file mode 100644 index 3037cd95..00000000 --- a/node_modules/browserify/test/delay/diverted.js +++ /dev/null @@ -1 +0,0 @@ -console.log(900) diff --git a/node_modules/browserify/test/delay/main.js b/node_modules/browserify/test/delay/main.js deleted file mode 100644 index 67eaa257..00000000 --- a/node_modules/browserify/test/delay/main.js +++ /dev/null @@ -1 +0,0 @@ -console.log(500) diff --git a/node_modules/browserify/test/dep.js b/node_modules/browserify/test/dep.js deleted file mode 100644 index 13ee026e..00000000 --- a/node_modules/browserify/test/dep.js +++ /dev/null @@ -1,25 +0,0 @@ -var browserify = require('../'); -var vm = require('vm'); -var test = require('tap').test; - -test('dependency events', function (t) { - t.plan(4); - var b = browserify(__dirname + '/entry/main.js'); - var deps = []; - b.on('dep', function (row) { - deps.push({ id: row.id, deps: row.deps }); - t.equal(typeof row.source, 'string'); - }); - - b.bundle(function (err, src) { - t.deepEqual(deps.sort(cmp), [ - { id: 1, deps: { './one': 2, './two': 3 } }, - { id: 2, deps: {} }, - { id: 3, deps: {} } - ]); - }); - - function cmp (a, b) { - return a.id < b.id ? -1 : 1; - } -}); diff --git a/node_modules/browserify/test/dollar.js b/node_modules/browserify/test/dollar.js deleted file mode 100644 index 872cee53..00000000 --- a/node_modules/browserify/test/dollar.js +++ /dev/null @@ -1,17 +0,0 @@ -var browserify = require('../'); -var vm = require('vm'); -var test = require('tap').test; - -test('dollar', function (t) { - t.plan(2); - var b = browserify(); - b.require(__dirname + '/dollar/dollar/index.js', { expose: 'dollar' }); - b.bundle(function (err, src) { - t.ok(src.length > 0); - - var c = {}; - vm.runInNewContext(src, c); - var res = vm.runInNewContext('require("dollar")(100)', c); - t.equal(res, 10000); - }); -}); diff --git a/node_modules/browserify/test/dollar/dollar/index.js b/node_modules/browserify/test/dollar/dollar/index.js deleted file mode 100644 index a6012aa6..00000000 --- a/node_modules/browserify/test/dollar/dollar/index.js +++ /dev/null @@ -1,7 +0,0 @@ -// foo $ bar $ baz - -var $ = function (x) { - return x * 100; -}; - -module.exports = $; diff --git a/node_modules/browserify/test/double_buffer.js b/node_modules/browserify/test/double_buffer.js deleted file mode 100644 index 1535eb9b..00000000 --- a/node_modules/browserify/test/double_buffer.js +++ /dev/null @@ -1,14 +0,0 @@ -var browserify = require('../'); -var test = require('tap').test; -var vm = require('vm'); - -test('double buffer', function (t) { - t.plan(1); - - var b = browserify(__dirname + '/double_buffer/main.js'); - b.require('buffer'); - b.bundle(function (err, src) { - if (err) return t.fail(err); - vm.runInNewContext(src, { t: t }); - }); -}); diff --git a/node_modules/browserify/test/double_buffer/explicit.js b/node_modules/browserify/test/double_buffer/explicit.js deleted file mode 100644 index fa76b1f4..00000000 --- a/node_modules/browserify/test/double_buffer/explicit.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('buffer').Buffer diff --git a/node_modules/browserify/test/double_buffer/implicit.js b/node_modules/browserify/test/double_buffer/implicit.js deleted file mode 100644 index 70c9e753..00000000 --- a/node_modules/browserify/test/double_buffer/implicit.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = Buffer diff --git a/node_modules/browserify/test/double_buffer/main.js b/node_modules/browserify/test/double_buffer/main.js deleted file mode 100644 index bf124fd8..00000000 --- a/node_modules/browserify/test/double_buffer/main.js +++ /dev/null @@ -1,4 +0,0 @@ -var implicit = require('./implicit.js'); -var explicit = require('./explicit.js'); - -t.equal(implicit, explicit); diff --git a/node_modules/browserify/test/double_bundle.js b/node_modules/browserify/test/double_bundle.js deleted file mode 100644 index d5b9a1b4..00000000 --- a/node_modules/browserify/test/double_bundle.js +++ /dev/null @@ -1,24 +0,0 @@ -var browserify = require('../'); -var vm = require('vm'); -var test = require('tap').test; - -test('double bundle', function (t) { - t.plan(5); - - var b = browserify(__dirname + '/entry/main.js'); - b.bundle(function (err, src0) { - t.ifError(err); - var c = { - done : function (one, two) { - t.equal(one, 1); - t.equal(two, 2); - } - }; - vm.runInNewContext(src0, c); - - b.bundle(function (err, src1) { - t.ifError(err); - t.equal(src1.toString('utf8'), src0.toString('utf8')); - }); - }); -}); diff --git a/node_modules/browserify/test/double_bundle_error.js b/node_modules/browserify/test/double_bundle_error.js deleted file mode 100644 index 02ff015e..00000000 --- a/node_modules/browserify/test/double_bundle_error.js +++ /dev/null @@ -1,17 +0,0 @@ -var browserify = require('../'); -var vm = require('vm'); -var test = require('tap').test; - -test('double bundle error', function (t) { - t.plan(2); - - var b = browserify(__dirname + '/double_bundle_error/main.js'); - var x = b.bundle(); - x.on('error', function (err) { - t.ok(err); - var y = b.bundle(); - y.on('error', function (err) { - t.ok(err); - }); - }); -}); diff --git a/node_modules/browserify/test/double_bundle_error/main.js b/node_modules/browserify/test/double_bundle_error/main.js deleted file mode 100644 index 89bb8a03..00000000 --- a/node_modules/browserify/test/double_bundle_error/main.js +++ /dev/null @@ -1 +0,0 @@ -done(require('./one'), require('./two')); \ No newline at end of file diff --git a/node_modules/browserify/test/double_bundle_error/needs_three.js b/node_modules/browserify/test/double_bundle_error/needs_three.js deleted file mode 100644 index 9def415e..00000000 --- a/node_modules/browserify/test/double_bundle_error/needs_three.js +++ /dev/null @@ -1 +0,0 @@ -require("three"); diff --git a/node_modules/browserify/test/double_bundle_error/one.js b/node_modules/browserify/test/double_bundle_error/one.js deleted file mode 100644 index bd816eab..00000000 --- a/node_modules/browserify/test/double_bundle_error/one.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = 1; diff --git a/node_modules/browserify/test/double_bundle_error/package.json b/node_modules/browserify/test/double_bundle_error/package.json deleted file mode 100644 index ad2f4038..00000000 --- a/node_modules/browserify/test/double_bundle_error/package.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "browser": { - "three": "./three.js" - } -} diff --git a/node_modules/browserify/test/double_bundle_error/three.js b/node_modules/browserify/test/double_bundle_error/three.js deleted file mode 100644 index b15da272..00000000 --- a/node_modules/browserify/test/double_bundle_error/three.js +++ /dev/null @@ -1,3 +0,0 @@ -require('./nosuchfile.js'); - -module.exports = 3; diff --git a/node_modules/browserify/test/double_bundle_error/two.js b/node_modules/browserify/test/double_bundle_error/two.js deleted file mode 100644 index 72461a5d..00000000 --- a/node_modules/browserify/test/double_bundle_error/two.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('./three.js') - 1; diff --git a/node_modules/browserify/test/double_bundle_json.js b/node_modules/browserify/test/double_bundle_json.js deleted file mode 100644 index ac72709b..00000000 --- a/node_modules/browserify/test/double_bundle_json.js +++ /dev/null @@ -1,37 +0,0 @@ -var browserify = require('../'); -var vm = require('vm'); -var test = require('tap').test; -var through = require('through2'); -var xtend = require('xtend'); - -test('double bundle json', function (t) { - t.plan(6); - var expected0 = [ 'a=500', 'b=500' ]; - var expected1 = [ 'a=500', 'b=500' ]; - - function log0 (msg) { t.equal(msg, expected0.shift()) } - function log1 (msg) { t.equal(msg, expected1.shift()) } - - var cache = {}; - var b = browserify(__dirname + '/double_bundle_json/index.js', { - cache: cache - }); - b.pipeline.get('deps').push(through.obj(function(row, enc, next) { - cache[row.file] = { - source: row.source, - deps: xtend(row.deps) - }; - this.push(row); - next(); - })); - b.bundle(function (err, src0) { - t.ifError(err); - vm.runInNewContext(src0, { console: { log: log0 } }); - delete cache[__dirname + '/double_bundle_json/index.js']; - - b.bundle(function (err, src1) { - t.ifError(err); - vm.runInNewContext(src1, { console: { log: log1 } }); - }); - }); -}); diff --git a/node_modules/browserify/test/double_bundle_json/a.json b/node_modules/browserify/test/double_bundle_json/a.json deleted file mode 100644 index bf0cf63b..00000000 --- a/node_modules/browserify/test/double_bundle_json/a.json +++ /dev/null @@ -1 +0,0 @@ -{"x":500} diff --git a/node_modules/browserify/test/double_bundle_json/b.json b/node_modules/browserify/test/double_bundle_json/b.json deleted file mode 100644 index bf0cf63b..00000000 --- a/node_modules/browserify/test/double_bundle_json/b.json +++ /dev/null @@ -1 +0,0 @@ -{"x":500} diff --git a/node_modules/browserify/test/double_bundle_json/index.js b/node_modules/browserify/test/double_bundle_json/index.js deleted file mode 100644 index fd8f6820..00000000 --- a/node_modules/browserify/test/double_bundle_json/index.js +++ /dev/null @@ -1,5 +0,0 @@ -var a = require('./a.json'); -var b = require('./b.json'); - -console.log('a=' + a.x); -console.log('b=' + b.x); diff --git a/node_modules/browserify/test/double_bundle_parallel.js b/node_modules/browserify/test/double_bundle_parallel.js deleted file mode 100644 index ffeed20a..00000000 --- a/node_modules/browserify/test/double_bundle_parallel.js +++ /dev/null @@ -1,33 +0,0 @@ -var browserify = require('../'); -var vm = require('vm'); -var test = require('tap').test; - -test('double bundle parallel', function (t) { - t.plan(7); - - var sources = []; - var b = browserify(__dirname + '/entry/main.js'); - - var pending = 2; - b.bundle(check(0)); - b.bundle(check(1)); - - function check (index) { - return function (err, src) { - t.ifError(err); - var c = { - done : function (one, two) { - t.equal(one, 1); - t.equal(two, 2); - } - }; - vm.runInNewContext(src, c); - sources[index] = src.toString('utf8'); - if (--pending === 0) done(); - }; - } - - function done () { - t.equal(sources[0], sources[1]); - } -}); diff --git a/node_modules/browserify/test/double_bundle_parallel_cache.js b/node_modules/browserify/test/double_bundle_parallel_cache.js deleted file mode 100644 index 521eda4d..00000000 --- a/node_modules/browserify/test/double_bundle_parallel_cache.js +++ /dev/null @@ -1,35 +0,0 @@ -var browserify = require('../'); -var vm = require('vm'); -var test = require('tap').test; - -test('double bundle parallel cached', function (t) { - t.plan(7); - - var sources = []; - var b = browserify(__dirname + '/entry/main.js', { - cache: {} - }); - - var pending = 2; - b.bundle(check(0)); - b.bundle(check(1)); - - function check (index) { - return function (err, src) { - t.ifError(err); - var c = { - done : function (one, two) { - t.equal(one, 1); - t.equal(two, 2); - } - }; - vm.runInNewContext(src, c); - sources[index] = src.toString('utf8'); - if (--pending === 0) done(); - }; - } - - function done () { - t.equal(sources[0], sources[1]); - } -}); diff --git a/node_modules/browserify/test/dup/foo-dup.js b/node_modules/browserify/test/dup/foo-dup.js deleted file mode 100644 index 8fadf889..00000000 --- a/node_modules/browserify/test/dup/foo-dup.js +++ /dev/null @@ -1,4 +0,0 @@ -// something on first line -module.exports = function () { - console.log('I like to duplicate myself'); -}; diff --git a/node_modules/browserify/test/dup/foo.js b/node_modules/browserify/test/dup/foo.js deleted file mode 100644 index 8fadf889..00000000 --- a/node_modules/browserify/test/dup/foo.js +++ /dev/null @@ -1,4 +0,0 @@ -// something on first line -module.exports = function () { - console.log('I like to duplicate myself'); -}; diff --git a/node_modules/browserify/test/dup/index.js b/node_modules/browserify/test/dup/index.js deleted file mode 100644 index ea442887..00000000 --- a/node_modules/browserify/test/dup/index.js +++ /dev/null @@ -1,5 +0,0 @@ -var foo = require('./foo'); -var foodup = require('./foo-dup'); - -foo(); -foodup(); diff --git a/node_modules/browserify/test/entry.js b/node_modules/browserify/test/entry.js deleted file mode 100644 index 34d91e9f..00000000 --- a/node_modules/browserify/test/entry.js +++ /dev/null @@ -1,42 +0,0 @@ -var browserify = require('../'); -var vm = require('vm'); -var test = require('tap').test; - -test('entry', function (t) { - t.plan(3); - - var b = browserify(__dirname + '/entry/main.js'); - b.on('dep', function(row) { - if (row.entry) t.equal(row.file, __dirname + '/entry/main.js'); - }); - b.bundle(function (err, src) { - var c = { - done : function (one, two) { - t.equal(one, 1); - t.equal(two, 2); - t.end(); - } - }; - vm.runInNewContext(src, c); - }); -}); - -test('entry via add', function (t) { - t.plan(3); - - var b = browserify(); - b.add(__dirname + '/entry/main.js'); - b.on('dep', function(row) { - if (row.entry) t.equal(row.file, __dirname + '/entry/main.js'); - }); - b.bundle(function (err, src) { - var c = { - done : function (one, two) { - t.equal(one, 1); - t.equal(two, 2); - t.end(); - } - }; - vm.runInNewContext(src, c); - }); -}); diff --git a/node_modules/browserify/test/entry/main.js b/node_modules/browserify/test/entry/main.js deleted file mode 100644 index 89bb8a03..00000000 --- a/node_modules/browserify/test/entry/main.js +++ /dev/null @@ -1 +0,0 @@ -done(require('./one'), require('./two')); \ No newline at end of file diff --git a/node_modules/browserify/test/entry/needs_three.js b/node_modules/browserify/test/entry/needs_three.js deleted file mode 100644 index 9def415e..00000000 --- a/node_modules/browserify/test/entry/needs_three.js +++ /dev/null @@ -1 +0,0 @@ -require("three"); diff --git a/node_modules/browserify/test/entry/one.js b/node_modules/browserify/test/entry/one.js deleted file mode 100644 index bd816eab..00000000 --- a/node_modules/browserify/test/entry/one.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = 1; diff --git a/node_modules/browserify/test/entry/package.json b/node_modules/browserify/test/entry/package.json deleted file mode 100644 index ad2f4038..00000000 --- a/node_modules/browserify/test/entry/package.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "browser": { - "three": "./three.js" - } -} diff --git a/node_modules/browserify/test/entry/three.js b/node_modules/browserify/test/entry/three.js deleted file mode 100644 index 690aad34..00000000 --- a/node_modules/browserify/test/entry/three.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = 3; diff --git a/node_modules/browserify/test/entry/two.js b/node_modules/browserify/test/entry/two.js deleted file mode 100644 index 4bbffde1..00000000 --- a/node_modules/browserify/test/entry/two.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = 2; diff --git a/node_modules/browserify/test/entry_exec.js b/node_modules/browserify/test/entry_exec.js deleted file mode 100644 index c70281e5..00000000 --- a/node_modules/browserify/test/entry_exec.js +++ /dev/null @@ -1,15 +0,0 @@ -var browserify = require('../'); -var vm = require('vm'); -var test = require('tap').test; - -test('only execute entry files', function (t) { - t.plan(1); - - var b = browserify(); - b.add(__dirname + '/entry_exec/main.js'); - b.require(__dirname + '/entry_exec/fail.js'); - b.bundle(function (err, src) { - var c = { t: t }; - vm.runInNewContext(src, c); - }); -}); diff --git a/node_modules/browserify/test/entry_exec/fail.js b/node_modules/browserify/test/entry_exec/fail.js deleted file mode 100644 index 8da5557b..00000000 --- a/node_modules/browserify/test/entry_exec/fail.js +++ /dev/null @@ -1 +0,0 @@ -t.fail('only entry files should get executed right away'); diff --git a/node_modules/browserify/test/entry_exec/main.js b/node_modules/browserify/test/entry_exec/main.js deleted file mode 100644 index 98331f47..00000000 --- a/node_modules/browserify/test/entry_exec/main.js +++ /dev/null @@ -1 +0,0 @@ -t.ok(true); diff --git a/node_modules/browserify/test/entry_expose.js b/node_modules/browserify/test/entry_expose.js deleted file mode 100644 index 2323c2cb..00000000 --- a/node_modules/browserify/test/entry_expose.js +++ /dev/null @@ -1,19 +0,0 @@ -var test = require('tap').test; -var browserify = require('../'); -var path = require('path'); -var vm = require('vm'); - -test('entry expose', function (t) { - t.plan(3) - - var b = browserify(); - b.add(__dirname + '/entry_expose/main.js'); - b.require(__dirname + '/entry_expose/main.js', { expose: 'x' }); - b.bundle(function (err, src) { - t.ifError(err); - var c = { console: { log: log } }; - function log (msg) { t.equal(msg, 'wow') } - vm.runInNewContext(src, c); - t.equal(c.require('x'), 555); - }) -}); diff --git a/node_modules/browserify/test/entry_expose/main.js b/node_modules/browserify/test/entry_expose/main.js deleted file mode 100644 index bf2b2d6f..00000000 --- a/node_modules/browserify/test/entry_expose/main.js +++ /dev/null @@ -1,2 +0,0 @@ -console.log('wow'); -module.exports = 555; diff --git a/node_modules/browserify/test/entry_relative.js b/node_modules/browserify/test/entry_relative.js deleted file mode 100644 index f1ae37f2..00000000 --- a/node_modules/browserify/test/entry_relative.js +++ /dev/null @@ -1,44 +0,0 @@ -var browserify = require('../'); -var vm = require('vm'); -var test = require('tap').test; - -test('entry - relative path', function (t) { - process.chdir(__dirname); - - t.plan(3); - - var b = browserify('entry/main.js'); - b.on('dep', function(row) { - if (row.entry) t.equal(row.file, __dirname + '/entry/main.js'); - }); - b.bundle(function (err, src) { - var c = { - done : function (one, two) { - t.equal(one, 1); - t.equal(two, 2); - t.end(); - } - }; - vm.runInNewContext(src, c); - }); -}); - -test('entry - relative path via add', function (t) { - t.plan(3); - - var b = browserify({basedir: __dirname}); - b.add('entry/main.js'); - b.on('dep', function(row) { - if (row.entry) t.equal(row.file, __dirname + '/entry/main.js'); - }); - b.bundle(function (err, src) { - var c = { - done : function (one, two) { - t.equal(one, 1); - t.equal(two, 2); - t.end(); - } - }; - vm.runInNewContext(src, c); - }); -}); diff --git a/node_modules/browserify/test/error_code.js b/node_modules/browserify/test/error_code.js deleted file mode 100644 index 2f3734c2..00000000 --- a/node_modules/browserify/test/error_code.js +++ /dev/null @@ -1,24 +0,0 @@ -var test = require('tap').test; -var spawn = require('child_process').spawn; -var path = require('path'); - -test('error code', function (t) { - t.plan(2); - - var cwd = process.cwd(); - process.chdir(__dirname); - - var ps = spawn(process.execPath, [ - path.resolve(__dirname, '../bin/cmd.js'), - path.resolve(__dirname, 'error_code/src.js') - ]); - var err = ''; - ps.stderr.on('data', function (buf) { err += buf }); - ps.stderr.on('end', function () { - t.ok(/^(Syntax|Parse)Error:/m.test(err)); - }); - - ps.on('exit', function (code) { - t.notEqual(code, 0); - }); -}); diff --git a/node_modules/browserify/test/error_code/src.js b/node_modules/browserify/test/error_code/src.js deleted file mode 100644 index e85c07cc..00000000 --- a/node_modules/browserify/test/error_code/src.js +++ /dev/null @@ -1,2 +0,0 @@ -var x = { -var y = 6; diff --git a/node_modules/browserify/test/export.js b/node_modules/browserify/test/export.js deleted file mode 100644 index def4dfd8..00000000 --- a/node_modules/browserify/test/export.js +++ /dev/null @@ -1,35 +0,0 @@ -var browserify = require('../'); -var vm = require('vm'); -var test = require('tap').test; - -test('no exports when no files are loaded', function (t) { - t.plan(1); - var b = browserify(); - b.bundle(function (err, src) { - var c = {}; - vm.runInNewContext(src, c); - t.same(Object.keys(c), []); - }); -}); - -test('no exports when entries are defined', function (t) { - t.plan(1); - var b = browserify(); - b.add(__dirname + '/export/entry.js'); - b.bundle(function (err, src) { - var c = {}; - vm.runInNewContext(src, c); - t.same(c, {}); - }); -}); - -test('require export when files are required', function (t) { - t.plan(1); - var b = browserify(); - b.require(__dirname + '/export/entry.js'); - b.bundle(function (err, src) { - var c = {}; - vm.runInNewContext(src, c); - t.same(Object.keys(c), [ 'require' ]); - }); -}); diff --git a/node_modules/browserify/test/export/entry.js b/node_modules/browserify/test/export/entry.js deleted file mode 100644 index 6f037f8a..00000000 --- a/node_modules/browserify/test/export/entry.js +++ /dev/null @@ -1 +0,0 @@ -// nop diff --git a/node_modules/browserify/test/external.js b/node_modules/browserify/test/external.js deleted file mode 100644 index a107a4cf..00000000 --- a/node_modules/browserify/test/external.js +++ /dev/null @@ -1,20 +0,0 @@ -var browserify = require('../'); -var vm = require('vm'); -var test = require('tap').test; - -test('external', function (t) { - t.plan(2); - - var b = browserify(__dirname + '/external/main.js'); - b.external('freelist'); - b.bundle(function (err, src) { - if (err) return t.fail(err); - vm.runInNewContext( - 'function require (x) {' - + 'if (x==="freelist") return function (n) { return n + 1000 }' - + '}' - + src, - { t: t } - ); - }); -}); diff --git a/node_modules/browserify/test/external/main.js b/node_modules/browserify/test/external/main.js deleted file mode 100644 index 82ceeda8..00000000 --- a/node_modules/browserify/test/external/main.js +++ /dev/null @@ -1,2 +0,0 @@ -t.equal(require('freelist')(5), 1005); -t.equal(require('./x.js')(6), 1016); diff --git a/node_modules/browserify/test/external/x.js b/node_modules/browserify/test/external/x.js deleted file mode 100644 index a587ef44..00000000 --- a/node_modules/browserify/test/external/x.js +++ /dev/null @@ -1,3 +0,0 @@ -var fl = require('freelist'); - -module.exports = function (n) { return fl(n) + 10 }; diff --git a/node_modules/browserify/test/external_args/main.js b/node_modules/browserify/test/external_args/main.js deleted file mode 100644 index b19e6c11..00000000 --- a/node_modules/browserify/test/external_args/main.js +++ /dev/null @@ -1,10 +0,0 @@ -try { - var Backbone = require('backbone'); - throw new Error('module included'); -} catch (e) { - if (e.message === 'module included') { - throw e; - } else { - t.ok(true); - } -} \ No newline at end of file diff --git a/node_modules/browserify/test/external_shim.js b/node_modules/browserify/test/external_shim.js deleted file mode 100644 index 63739c00..00000000 --- a/node_modules/browserify/test/external_shim.js +++ /dev/null @@ -1,27 +0,0 @@ -var browserify = require('../'); -var vm = require('vm'); -var test = require('tap').test; - -test('requiring a shimmed module name from an external bundle', function (t) { - var b1 = browserify(); - var b2 = browserify(); - - b1.require(__dirname + '/external_shim/bundle1.js', { expose: 'bundle1' }); - b2.external(b1); - b2.require(__dirname + '/external_shim/bundle2.js', { expose: 'bundle2' }); - - b1.bundle(function (err, src1) { - b2.bundle(function (err, src2) { - t.plan(1); - - var c = { - console: console, - setTimeout: setTimeout, - clearTimeout: clearTimeout - }; - vm.runInNewContext(src1 + src2, c); - - t.ok(c.require('bundle1').shim === c.require('bundle2').shim); - }); - }); -}); diff --git a/node_modules/browserify/test/external_shim/bundle1.js b/node_modules/browserify/test/external_shim/bundle1.js deleted file mode 100644 index 4753f09b..00000000 --- a/node_modules/browserify/test/external_shim/bundle1.js +++ /dev/null @@ -1 +0,0 @@ -exports.shim = require('shim'); diff --git a/node_modules/browserify/test/external_shim/bundle2.js b/node_modules/browserify/test/external_shim/bundle2.js deleted file mode 100644 index 4753f09b..00000000 --- a/node_modules/browserify/test/external_shim/bundle2.js +++ /dev/null @@ -1 +0,0 @@ -exports.shim = require('shim'); diff --git a/node_modules/browserify/test/external_shim/package.json b/node_modules/browserify/test/external_shim/package.json deleted file mode 100644 index 2047ac69..00000000 --- a/node_modules/browserify/test/external_shim/package.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "browser": { - "shim": "./shim.js" - } -} \ No newline at end of file diff --git a/node_modules/browserify/test/external_shim/shim.js b/node_modules/browserify/test/external_shim/shim.js deleted file mode 100644 index e69de29b..00000000 diff --git a/node_modules/browserify/test/externalize.js b/node_modules/browserify/test/externalize.js deleted file mode 100644 index b290a3a8..00000000 --- a/node_modules/browserify/test/externalize.js +++ /dev/null @@ -1,59 +0,0 @@ -var test = require('tap').test; -var spawn = require('child_process').spawn; -var concat = require('concat-stream'); -var path = require('path'); -var fs = require('fs'); -var vm = require('vm'); - -var temp = require('temp'); -temp.track(); -var tmpdir = temp.mkdirSync({prefix: 'browserify-test'}); -var pubdir = path.join(tmpdir, 'public'); - -fs.mkdirSync(pubdir); -fs.writeFileSync( - path.join(tmpdir, 'robot.js'), - fs.readFileSync(path.join(__dirname, 'externalize/robot.js')) -); -fs.writeFileSync( - path.join(tmpdir, 'beep.js'), - fs.readFileSync(path.join(__dirname, 'externalize/beep.js')) -); -fs.writeFileSync( - path.join(tmpdir, 'boop.js'), - fs.readFileSync(path.join(__dirname, 'externalize/boop.js')) -); - -test('externalize bin', function (t) { - t.plan(5); - - var commands = [ - [ '-r', './robot.js', '-o', path.join(pubdir, 'common.js') ], - [ '-x', './robot.js', 'beep.js', '-o', path.join(pubdir, 'beep.js') ], - [ '-x', './robot.js', 'boop.js', '-o', path.join(pubdir, 'boop.js') ] - ]; - (function next () { - if (commands.length === 0) { - var common = fs.readFileSync(path.join(pubdir, 'common.js')); - var beep = fs.readFileSync(path.join(pubdir, 'beep.js')); - var boop = fs.readFileSync(path.join(pubdir, 'boop.js')); - - vm.runInNewContext(common + beep, { - console: { log: function (msg) { t.equal(msg, 'BEEP!') } } - }); - vm.runInNewContext(common + boop, { - console: { log: function (msg) { t.equal(msg, 'BOOP!') } } - }); - } - else { - var args = commands.shift(); - args.unshift(path.join(__dirname, '../bin/cmd.js')); - var ps = spawn(process.execPath, args, { cwd: tmpdir }); - ps.stderr.pipe(process.stderr); - ps.on('exit', function (code) { - t.equal(code, 0, 'exit code'); - next() - }); - } - })(); -}); diff --git a/node_modules/browserify/test/externalize/beep.js b/node_modules/browserify/test/externalize/beep.js deleted file mode 100644 index 4daf2bdd..00000000 --- a/node_modules/browserify/test/externalize/beep.js +++ /dev/null @@ -1,2 +0,0 @@ -var robot = require('./robot.js'); -console.log(robot('beep')); \ No newline at end of file diff --git a/node_modules/browserify/test/externalize/boop.js b/node_modules/browserify/test/externalize/boop.js deleted file mode 100644 index 586e87fc..00000000 --- a/node_modules/browserify/test/externalize/boop.js +++ /dev/null @@ -1,2 +0,0 @@ -var robot = require('./robot.js'); -console.log(robot('boop')); \ No newline at end of file diff --git a/node_modules/browserify/test/externalize/robot.js b/node_modules/browserify/test/externalize/robot.js deleted file mode 100644 index 8a7ccd88..00000000 --- a/node_modules/browserify/test/externalize/robot.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = function (s) { return s.toUpperCase() + '!' }; \ No newline at end of file diff --git a/node_modules/browserify/test/fake.js b/node_modules/browserify/test/fake.js deleted file mode 100644 index a62fb933..00000000 --- a/node_modules/browserify/test/fake.js +++ /dev/null @@ -1,15 +0,0 @@ -var browserify = require('../'); -var vm = require('vm'); -var test = require('tap').test; - -test('fake', function (t) { - t.plan(1); - - var b = browserify(); - b.require(__dirname + '/fake/fake_fs.js', { expose: 'fs' }); - b.add(__dirname + '/fake/main.js'); - b.bundle(function (err, src) { - var c = { t: t }; - vm.runInNewContext(src, c); - }); -}); diff --git a/node_modules/browserify/test/fake/fake_fs.js b/node_modules/browserify/test/fake/fake_fs.js deleted file mode 100644 index 1ebc261c..00000000 --- a/node_modules/browserify/test/fake/fake_fs.js +++ /dev/null @@ -1 +0,0 @@ -exports.party = function () { return 'PaRtY!1!1!' }; diff --git a/node_modules/browserify/test/fake/main.js b/node_modules/browserify/test/fake/main.js deleted file mode 100644 index fd4339a0..00000000 --- a/node_modules/browserify/test/fake/main.js +++ /dev/null @@ -1,2 +0,0 @@ -var fs = require('fs'); -t.equal(fs.party(), 'PaRtY!1!1!'); diff --git a/node_modules/browserify/test/field.js b/node_modules/browserify/test/field.js deleted file mode 100644 index 83535046..00000000 --- a/node_modules/browserify/test/field.js +++ /dev/null @@ -1,72 +0,0 @@ -var assert = require('assert'); -var browserify = require('../'); -var vm = require('vm'); -var test = require('tap').test; - -test('fieldString', function (t) { - t.plan(1); - - var b = browserify(); - b.require(__dirname + '/field/string.js', { expose: './string.js' }); - b.bundle(function (err, src) { - if (err) return t.fail(err); - - var c = {}; - vm.runInNewContext(src, c); - t.equal( - c.require('./string.js'), - 'browser' - ); - }); -}); - -test('fieldObject', function (t) { - t.plan(1); - - var b = browserify(); - b.require(__dirname + '/field/object.js', { expose: './object.js' }); - b.bundle(function (err, src) { - if (err) return t.fail(err); - - var c = {}; - vm.runInNewContext(src, c); - t.equal( - c.require('./object.js'), - '!browser' - ); - }); -}); - -test('missObject', function (t) { - t.plan(1); - - var b = browserify(); - b.require(__dirname + '/field/miss.js', { expose: './miss.js' }); - b.bundle(function (err, src) { - if (err) return t.fail(err); - - var c = {}; - vm.runInNewContext(src, c); - t.equal( - c.require('./miss.js'), - '!browser' - ); - }); -}); - -test('fieldSub', function (t) { - t.plan(1); - - var b = browserify(); - b.require(__dirname + '/field/sub.js', { expose: './sub.js' }); - b.bundle(function (err, src) { - if (err) return t.fail(err); - - var c = {}; - vm.runInNewContext(src, c); - t.equal( - c.require('./sub.js'), - 'browser' - ); - }); -}); diff --git a/node_modules/browserify/test/field/miss.js b/node_modules/browserify/test/field/miss.js deleted file mode 100644 index 36199904..00000000 --- a/node_modules/browserify/test/field/miss.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('z-miss') diff --git a/node_modules/browserify/test/field/object.js b/node_modules/browserify/test/field/object.js deleted file mode 100644 index c373dc9e..00000000 --- a/node_modules/browserify/test/field/object.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('z-object') diff --git a/node_modules/browserify/test/field/string.js b/node_modules/browserify/test/field/string.js deleted file mode 100644 index ee4c65d3..00000000 --- a/node_modules/browserify/test/field/string.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('z-string') diff --git a/node_modules/browserify/test/field/sub.js b/node_modules/browserify/test/field/sub.js deleted file mode 100644 index 8c662a97..00000000 --- a/node_modules/browserify/test/field/sub.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('z-sub') diff --git a/node_modules/browserify/test/file_event.js b/node_modules/browserify/test/file_event.js deleted file mode 100644 index 285ccafa..00000000 --- a/node_modules/browserify/test/file_event.js +++ /dev/null @@ -1,33 +0,0 @@ -var browserify = require('../'); -var vm = require('vm'); -var test = require('tap').test; -var path = require('path'); - -test('file event', function (t) { - t.plan(8); - - var b = browserify(__dirname + '/entry/main.js'); - var files = { - 'main.js': __dirname + '/entry/main.js', - 'one.js': './one', - 'two.js': './two' - }; - - b.on('file', function (file, id) { - var key = path.basename(file); - t.equal(file, path.join(__dirname, 'entry', key)); - t.equal(id, files[key]); - delete files[key]; - }); - - b.bundle(function (err, src) { - var c = { - done : function (one, two) { - t.equal(one, 1); - t.equal(two, 2); - t.end(); - } - }; - vm.runInNewContext(src, c); - }); -}); diff --git a/node_modules/browserify/test/five_bundle.js b/node_modules/browserify/test/five_bundle.js deleted file mode 100644 index 473f037d..00000000 --- a/node_modules/browserify/test/five_bundle.js +++ /dev/null @@ -1,30 +0,0 @@ -var browserify = require('../'); -var vm = require('vm'); -var test = require('tap').test; - -test('five bundle', function (t) { - t.plan(3+4*2); - - var b = browserify(__dirname + '/entry/main.js'); - var source; - - b.bundle(function (err, src0) { - t.ifError(err); - var c = { - done : function (one, two) { - t.equal(one, 1); - t.equal(two, 2); - } - }; - vm.runInNewContext(src0, c); - - (function next (count) { - if (count === 5) return; - b.bundle(function (err, src1) { - t.ifError(err); - t.equal(src1.toString('utf8'), src0.toString('utf8')); - next(count+1); - }); - })(1); - }); -}); diff --git a/node_modules/browserify/test/full_paths.js b/node_modules/browserify/test/full_paths.js deleted file mode 100644 index 11431beb..00000000 --- a/node_modules/browserify/test/full_paths.js +++ /dev/null @@ -1,58 +0,0 @@ -var unpack = require('browser-unpack'); -var browserify = require('../'); -var test = require('tap').test; -var vm = require('vm'); -var path = require('path'); - -var deps = [ - path.join(__dirname, '/entry/main.js'), - path.join(__dirname, '/entry/one.js'), - path.join(__dirname, '/entry/two.js') -]; - -test('fullPaths enabled', function (t) { - t.plan(3); - - var b = browserify({ - entries: [ deps[0] ], - fullPaths: true - }); - - b.bundle(function (err, src) { - unpack(src).forEach(function(dep) { - t.notEqual(deps.indexOf(dep.id), -1, 'full path name for dep.id'); - }); - }); -}); - -test('fullPaths disabled', function (t) { - t.plan(3); - - var b = browserify({ - entries: [ deps[0] ], - fullPaths: false - }); - - b.bundle(function (err, src) { - unpack(src).forEach(function(dep) { - t.equal(deps.indexOf(dep.id), -1, 'full path name no longer available'); - }); - }); -}); - -test('fullPaths enabled, with custom exposed dependency name', function (t) { - t.plan(1); - - var b = browserify({ - entries: [__dirname + '/entry/needs_three.js'], - fullPaths: true - }); - - b.require(__dirname + '/entry/three.js', { expose: 'three' }); - - b.bundle(function (err, src) { - t.doesNotThrow(function () { - vm.runInNewContext(src, { console: console, t: t }); - }); - }); -}); diff --git a/node_modules/browserify/test/glob.js b/node_modules/browserify/test/glob.js deleted file mode 100644 index 4ac8093c..00000000 --- a/node_modules/browserify/test/glob.js +++ /dev/null @@ -1,29 +0,0 @@ -var test = require('tap').test; -var spawn = require('child_process').spawn; -var path = require('path'); -var concat = require('concat-stream'); -var vm = require('vm'); - -test('glob', function (t) { - var expected = [ 'a', '!x', 'z', 'b', '!y' ]; - t.plan(expected.length + 1); - - var cwd = process.cwd(); - process.chdir(__dirname); - - var ps = spawn(process.execPath, [ - path.resolve(__dirname, '../bin/cmd.js'), - 'a.js', 'b.js', - '-u', 'vendor/*.js' - ], { cwd: __dirname + '/glob' }); - ps.stderr.pipe(process.stderr); - ps.stdout.pipe(concat(function (body) { - var c = { console: { log: log } }; - vm.runInNewContext(body.toString('utf8'), c); - function log (msg) { t.equal(msg, expected.shift()) } - })); - - ps.on('exit', function (code) { - t.equal(code, 0); - }); -}); diff --git a/node_modules/browserify/test/glob/a.js b/node_modules/browserify/test/glob/a.js deleted file mode 100644 index 97fe11aa..00000000 --- a/node_modules/browserify/test/glob/a.js +++ /dev/null @@ -1,6 +0,0 @@ -console.log('a'); - -try { require('./vendor/x.js') } -catch (err) { console.log('!x') } - -require('./lib/z.js') diff --git a/node_modules/browserify/test/glob/b.js b/node_modules/browserify/test/glob/b.js deleted file mode 100644 index fedd5f44..00000000 --- a/node_modules/browserify/test/glob/b.js +++ /dev/null @@ -1,5 +0,0 @@ -console.log('b'); - -try { require('./vendor/y.js') } -catch (err) { console.log('!y') } - diff --git a/node_modules/browserify/test/glob/lib/z.js b/node_modules/browserify/test/glob/lib/z.js deleted file mode 100644 index 0475609d..00000000 --- a/node_modules/browserify/test/glob/lib/z.js +++ /dev/null @@ -1 +0,0 @@ -console.log('z'); diff --git a/node_modules/browserify/test/glob/vendor/x.js b/node_modules/browserify/test/glob/vendor/x.js deleted file mode 100644 index 5eee8647..00000000 --- a/node_modules/browserify/test/glob/vendor/x.js +++ /dev/null @@ -1 +0,0 @@ -console.log('x'); diff --git a/node_modules/browserify/test/glob/vendor/y.js b/node_modules/browserify/test/glob/vendor/y.js deleted file mode 100644 index 78a89b3a..00000000 --- a/node_modules/browserify/test/glob/vendor/y.js +++ /dev/null @@ -1 +0,0 @@ -console.log('y'); diff --git a/node_modules/browserify/test/global.js b/node_modules/browserify/test/global.js deleted file mode 100644 index b860abb8..00000000 --- a/node_modules/browserify/test/global.js +++ /dev/null @@ -1,90 +0,0 @@ -var browserify = require('../'); -var vm = require('vm'); -var test = require('tap').test; - -test('global', function (t) { - t.plan(2); - - var b = browserify(); - b.add(__dirname + '/global/main.js'); - b.bundle(function (err, src) { - var c = { - t : t, - a : 555, - }; - c.self = c; - vm.runInNewContext(src, c); - }); -}); - -test('__filename and __dirname with insertGlobals: true', function (t) { - t.plan(2); - - var b = browserify({ - insertGlobals: true, - basedir: __dirname + '/global' - }); - b.require(__dirname + '/global/filename.js', { expose: 'x' }); - b.bundle(function (err, src) { - var c = {}; - c.self = c; - vm.runInNewContext(src, c); - var x = c.require('x'); - t.equal(x.filename, '/filename.js'); - t.equal(x.dirname, '/'); - }); -}); - -test('__filename and __dirname', function (t) { - t.plan(2); - - var b = browserify({ basedir: __dirname + '/global' }); - b.require(__dirname + '/global/filename.js', { expose: 'x' }); - b.bundle(function (err, src) { - var c = {}; - vm.runInNewContext(src, c); - var x = c.require('x'); - t.equal(x.filename, '/filename.js'); - t.equal(x.dirname, '/'); - }); -}); - -test('__filename and __dirname with basedir', function (t) { - t.plan(2); - - var b = browserify({ basedir: __dirname }); - b.require(__dirname + '/global/filename.js', { expose: 'x' }); - b.bundle(function (err, src) { - var c = {}; - vm.runInNewContext(src, c); - var x = c.require('x'); - t.equal(x.filename, '/global/filename.js'); - t.equal(x.dirname, '/global'); - }); -}); - -test('process.nextTick', function (t) { - t.plan(1); - - var b = browserify(); - b.add(__dirname + '/global/tick.js'); - b.bundle(function (err, src) { - var c = { t: t, setTimeout: setTimeout, clearTimeout: clearTimeout }; - vm.runInNewContext(src, c); - }); -}); - -test('Buffer', function (t) { - t.plan(2); - - var b = browserify(); - b.add(__dirname + '/global/buffer.js'); - b.bundle(function (err, src) { - var c = { - t: t, - Uint8Array: Uint8Array, - DataView: DataView - }; - vm.runInNewContext(src, c); - }); -}); diff --git a/node_modules/browserify/test/global/buffer.js b/node_modules/browserify/test/global/buffer.js deleted file mode 100644 index fec6eeb8..00000000 --- a/node_modules/browserify/test/global/buffer.js +++ /dev/null @@ -1,2 +0,0 @@ -t.equal(Buffer('xyz').toString('base64'), 'eHl6'); -t.equal(Buffer('eHl6', 'base64').toString(), 'xyz'); diff --git a/node_modules/browserify/test/global/filename.js b/node_modules/browserify/test/global/filename.js deleted file mode 100644 index 85dc112b..00000000 --- a/node_modules/browserify/test/global/filename.js +++ /dev/null @@ -1,2 +0,0 @@ -exports.filename = __filename; -exports.dirname = __dirname; diff --git a/node_modules/browserify/test/global/main.js b/node_modules/browserify/test/global/main.js deleted file mode 100644 index d77852b2..00000000 --- a/node_modules/browserify/test/global/main.js +++ /dev/null @@ -1,2 +0,0 @@ -t.equal(a, 555); -t.equal(a, global.a); diff --git a/node_modules/browserify/test/global/tick.js b/node_modules/browserify/test/global/tick.js deleted file mode 100644 index 428f3efc..00000000 --- a/node_modules/browserify/test/global/tick.js +++ /dev/null @@ -1,3 +0,0 @@ -process.nextTick(function () { - t.ok(true); -}); diff --git a/node_modules/browserify/test/global_coffeeify.js b/node_modules/browserify/test/global_coffeeify.js deleted file mode 100644 index 00aa54a1..00000000 --- a/node_modules/browserify/test/global_coffeeify.js +++ /dev/null @@ -1,19 +0,0 @@ -var test = require('tap').test; -var browserify = require('../'); -var vm = require('vm'); - -test('coffeeify globally', function (t) { - t.plan(1); - - var b = browserify(__dirname + '/coffeeify/main.coffee'); - b.transform('coffeeify', { global: true }); - b.bundle(function (err, src) { - if (err) t.fail(err); - vm.runInNewContext(src, { - console: { log: log }, - setTimeout: setTimeout, - clearTimeout: clearTimeout - }); - function log (msg) { t.equal(msg, 'eyo') } - }); -}); diff --git a/node_modules/browserify/test/global_noparse.js b/node_modules/browserify/test/global_noparse.js deleted file mode 100644 index decd772d..00000000 --- a/node_modules/browserify/test/global_noparse.js +++ /dev/null @@ -1,101 +0,0 @@ -var browserify = require('../'); -var vm = require('vm'); -var test = require('tap').test; - -test('global noparse module', function (t) { - t.plan(2); - - var b = browserify({ - noParse: 'aaa' - }); - b.require(__dirname + '/global/node_modules/aaa', { expose: 'x' }); - b.bundle(function (err, src) { - var c = { - __filename: __filename, - __dirname: __dirname - }; - vm.runInNewContext(src, c); - var x = c.require('x'); - t.equal(x.filename, __filename); - t.equal(x.dirname, __dirname); - }); -}); - -test('global noparse module file', function (t) { - t.plan(2); - - var b = browserify({ - noParse: 'aaa/index.js' - }); - b.require(__dirname + '/global/node_modules/aaa', { expose: 'x' }); - b.bundle(function (err, src) { - var c = { - __filename: __filename, - __dirname: __dirname - }; - vm.runInNewContext(src, c); - var x = c.require('x'); - t.equal(x.filename, __filename); - t.equal(x.dirname, __dirname); - }); -}); - -test('global noparse module deep file', function (t) { - t.plan(2); - - var b = browserify({ - noParse: 'robot/lib/beep.js' - }); - b.require(__dirname + '/global/node_modules/robot', { expose: 'x' }); - b.bundle(function (err, src) { - var c = { - __filename: __filename, - __dirname: __dirname - }; - vm.runInNewContext(src, c); - var x = c.require('x'); - t.equal(x.filename, __filename); - t.equal(x.dirname, __dirname); - }); -}); - -test('global noparse basedir', function (t) { - t.plan(2); - - var b = browserify({ - basedir: __dirname + '/global', - noParse: 'filename.js' - }); - b.require(__dirname + '/global/filename.js', { expose: 'x' }); - b.bundle(function (err, src) { - var c = { - __filename: __filename, - __dirname: __dirname - }; - vm.runInNewContext(src, c); - var x = c.require('x'); - t.equal(x.filename, __filename); - t.equal(x.dirname, __dirname); - }); -}); - -test('global noparse function', function (t) { - t.plan(2); - - var b = browserify({ - noParse: function(file) { - return file === __dirname + '/global/filename.js'; - } - }); - b.require(__dirname + '/global/filename.js', { expose: 'x' }); - b.bundle(function (err, src) { - var c = { - __filename: __filename, - __dirname: __dirname - }; - vm.runInNewContext(src, c); - var x = c.require('x'); - t.equal(x.filename, __filename); - t.equal(x.dirname, __dirname); - }); -}); diff --git a/node_modules/browserify/test/global_recorder.js b/node_modules/browserify/test/global_recorder.js deleted file mode 100644 index 7fdc07fb..00000000 --- a/node_modules/browserify/test/global_recorder.js +++ /dev/null @@ -1,22 +0,0 @@ -var browserify = require('../'); -var vm = require('vm'); -var test = require('tap').test; - -test('recorded global tr', function (t) { - t.plan(6); - - var b = browserify(__dirname + '/global_recorder/main.js'); - var context = { - console: { log: function (msg) { t.equal(msg, 'wow') } } - }; - b.bundle(function (err, src) { - t.ifError(err); - vm.runInNewContext(src, context); - t.equal(b._recorded.length, 2); - b.bundle(function (err, src) { - t.ifError(err); - vm.runInNewContext(src, context); - t.equal(b._recorded.length, 2); - }); - }); -}); diff --git a/node_modules/browserify/test/global_recorder/main.js b/node_modules/browserify/test/global_recorder/main.js deleted file mode 100644 index 6036bec6..00000000 --- a/node_modules/browserify/test/global_recorder/main.js +++ /dev/null @@ -1 +0,0 @@ -console.log('wow'); diff --git a/node_modules/browserify/test/hash.js b/node_modules/browserify/test/hash.js deleted file mode 100644 index a459a40a..00000000 --- a/node_modules/browserify/test/hash.js +++ /dev/null @@ -1,15 +0,0 @@ -var browserify = require('../'); -var vm = require('vm'); -var test = require('tap').test; - -test('hash', function (t) { - t.plan(3); - - var b = browserify(__dirname + '/hash/main.js'); - b.bundle(function (err, buf) { - var c = { t: t }; - var src = buf.toString('utf8'); - t.equal(src.match(RegExp('// FILE CONTENTS', 'g')).length, 1); - vm.runInNewContext(src, c); - }); -}); diff --git a/node_modules/browserify/test/hash/foo/other.js b/node_modules/browserify/test/hash/foo/other.js deleted file mode 100644 index f4e8d9d2..00000000 --- a/node_modules/browserify/test/hash/foo/other.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = 5; diff --git a/node_modules/browserify/test/hash/foo/two.js b/node_modules/browserify/test/hash/foo/two.js deleted file mode 100644 index 86c05b92..00000000 --- a/node_modules/browserify/test/hash/foo/two.js +++ /dev/null @@ -1,2 +0,0 @@ -// FILE CONTENTS -module.exports = 111 * require('./other.js'); diff --git a/node_modules/browserify/test/hash/main.js b/node_modules/browserify/test/hash/main.js deleted file mode 100644 index b37dd883..00000000 --- a/node_modules/browserify/test/hash/main.js +++ /dev/null @@ -1,2 +0,0 @@ -t.equal(require('./foo/two.js'), 555); -t.equal(require('./one.js'), 333); diff --git a/node_modules/browserify/test/hash/one.js b/node_modules/browserify/test/hash/one.js deleted file mode 100644 index 86c05b92..00000000 --- a/node_modules/browserify/test/hash/one.js +++ /dev/null @@ -1,2 +0,0 @@ -// FILE CONTENTS -module.exports = 111 * require('./other.js'); diff --git a/node_modules/browserify/test/hash/other.js b/node_modules/browserify/test/hash/other.js deleted file mode 100644 index 690aad34..00000000 --- a/node_modules/browserify/test/hash/other.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = 3; diff --git a/node_modules/browserify/test/hash_instance_context.js b/node_modules/browserify/test/hash_instance_context.js deleted file mode 100644 index dda45aa4..00000000 --- a/node_modules/browserify/test/hash_instance_context.js +++ /dev/null @@ -1,25 +0,0 @@ -var browserify = require('../'); -var vm = require('vm'); -var test = require('tap').test; - -test('hash instances with hashed contexts', function (t) { - t.plan(17); - - var b = browserify(__dirname + '/hash_instance_context/main.js'); - b.bundle(function (err, buf) { - var c = { t: t }; - var src = buf.toString('utf8'); - t.equal(src.match(RegExp('// FILE F ONE', 'g')).length, 1); - t.equal(src.match(RegExp('// FILE G ONE', 'g')).length, 2); - - t.equal(src.match(RegExp('// FILE F TWO', 'g')).length, 1); - t.equal(src.match(RegExp('// FILE G TWO', 'g')).length, 1); - t.equal(src.match(RegExp('// FILE H TWO', 'g')).length, 2); - - t.equal(src.match(RegExp('// FILE F THREE', 'g')).length, 1); - t.equal(src.match(RegExp('// FILE G THREE', 'g')).length, 1); - t.equal(src.match(RegExp('// FILE H THREE', 'g')).length, 1); - - vm.runInNewContext(src, c); - }); -}); diff --git a/node_modules/browserify/test/hash_instance_context/main.js b/node_modules/browserify/test/hash_instance_context/main.js deleted file mode 100644 index db1e23e9..00000000 --- a/node_modules/browserify/test/hash_instance_context/main.js +++ /dev/null @@ -1,17 +0,0 @@ -var A = require('./one/f.js'); -var B = require('./one/dir/f.js'); -t.notEqual(A, B); -t.equal(A(), 555); -t.equal(B(), 333); - -var C = require('./two/f.js'); -var D = require('./two/dir/f.js'); -t.notEqual(C, D); -t.equal(C(), 555); -t.equal(D(), 333); - -var E = require('./three/f.js'); -var F = require('./three/dir/f.js'); -t.notEqual(E, F); -t.equal(E(), 555); -t.equal(F(), 555); diff --git a/node_modules/browserify/test/hash_instance_context/one/dir/f.js b/node_modules/browserify/test/hash_instance_context/one/dir/f.js deleted file mode 100644 index a315c1e7..00000000 --- a/node_modules/browserify/test/hash_instance_context/one/dir/f.js +++ /dev/null @@ -1,3 +0,0 @@ -// FILE F ONE -var G = require('./g.js'); -module.exports = function () { return 111 * G }; diff --git a/node_modules/browserify/test/hash_instance_context/one/dir/g.js b/node_modules/browserify/test/hash_instance_context/one/dir/g.js deleted file mode 100644 index 9cab61b8..00000000 --- a/node_modules/browserify/test/hash_instance_context/one/dir/g.js +++ /dev/null @@ -1,2 +0,0 @@ -// FILE G ONE -module.exports = 3 diff --git a/node_modules/browserify/test/hash_instance_context/one/f.js b/node_modules/browserify/test/hash_instance_context/one/f.js deleted file mode 100644 index a315c1e7..00000000 --- a/node_modules/browserify/test/hash_instance_context/one/f.js +++ /dev/null @@ -1,3 +0,0 @@ -// FILE F ONE -var G = require('./g.js'); -module.exports = function () { return 111 * G }; diff --git a/node_modules/browserify/test/hash_instance_context/one/g.js b/node_modules/browserify/test/hash_instance_context/one/g.js deleted file mode 100644 index 83730320..00000000 --- a/node_modules/browserify/test/hash_instance_context/one/g.js +++ /dev/null @@ -1,2 +0,0 @@ -// FILE G ONE -module.exports = 5 diff --git a/node_modules/browserify/test/hash_instance_context/three/dir/f.js b/node_modules/browserify/test/hash_instance_context/three/dir/f.js deleted file mode 100644 index 51b1e732..00000000 --- a/node_modules/browserify/test/hash_instance_context/three/dir/f.js +++ /dev/null @@ -1,3 +0,0 @@ -// FILE F THREE -var G = require('./g.js'); -module.exports = function () { return 111 * G }; diff --git a/node_modules/browserify/test/hash_instance_context/three/dir/g.js b/node_modules/browserify/test/hash_instance_context/three/dir/g.js deleted file mode 100644 index 654f021c..00000000 --- a/node_modules/browserify/test/hash_instance_context/three/dir/g.js +++ /dev/null @@ -1,2 +0,0 @@ -// FILE G THREE -module.exports = require('./h.js') + 1; diff --git a/node_modules/browserify/test/hash_instance_context/three/dir/h.js b/node_modules/browserify/test/hash_instance_context/three/dir/h.js deleted file mode 100644 index afcc80fd..00000000 --- a/node_modules/browserify/test/hash_instance_context/three/dir/h.js +++ /dev/null @@ -1,2 +0,0 @@ -// FILE H THREE -module.exports = 4 diff --git a/node_modules/browserify/test/hash_instance_context/three/f.js b/node_modules/browserify/test/hash_instance_context/three/f.js deleted file mode 100644 index 51b1e732..00000000 --- a/node_modules/browserify/test/hash_instance_context/three/f.js +++ /dev/null @@ -1,3 +0,0 @@ -// FILE F THREE -var G = require('./g.js'); -module.exports = function () { return 111 * G }; diff --git a/node_modules/browserify/test/hash_instance_context/three/g.js b/node_modules/browserify/test/hash_instance_context/three/g.js deleted file mode 100644 index 654f021c..00000000 --- a/node_modules/browserify/test/hash_instance_context/three/g.js +++ /dev/null @@ -1,2 +0,0 @@ -// FILE G THREE -module.exports = require('./h.js') + 1; diff --git a/node_modules/browserify/test/hash_instance_context/three/h.js b/node_modules/browserify/test/hash_instance_context/three/h.js deleted file mode 100644 index afcc80fd..00000000 --- a/node_modules/browserify/test/hash_instance_context/three/h.js +++ /dev/null @@ -1,2 +0,0 @@ -// FILE H THREE -module.exports = 4 diff --git a/node_modules/browserify/test/hash_instance_context/two/dir/f.js b/node_modules/browserify/test/hash_instance_context/two/dir/f.js deleted file mode 100644 index 1178f93f..00000000 --- a/node_modules/browserify/test/hash_instance_context/two/dir/f.js +++ /dev/null @@ -1,3 +0,0 @@ -// FILE F TWO -var G = require('./g.js'); -module.exports = function () { return 111 * G }; diff --git a/node_modules/browserify/test/hash_instance_context/two/dir/g.js b/node_modules/browserify/test/hash_instance_context/two/dir/g.js deleted file mode 100644 index b940ee76..00000000 --- a/node_modules/browserify/test/hash_instance_context/two/dir/g.js +++ /dev/null @@ -1,2 +0,0 @@ -// FILE G TWO -module.exports = require('./h.js') + 1; diff --git a/node_modules/browserify/test/hash_instance_context/two/dir/h.js b/node_modules/browserify/test/hash_instance_context/two/dir/h.js deleted file mode 100644 index 74a8a7a4..00000000 --- a/node_modules/browserify/test/hash_instance_context/two/dir/h.js +++ /dev/null @@ -1,2 +0,0 @@ -// FILE H TWO -module.exports = 2 diff --git a/node_modules/browserify/test/hash_instance_context/two/f.js b/node_modules/browserify/test/hash_instance_context/two/f.js deleted file mode 100644 index 1178f93f..00000000 --- a/node_modules/browserify/test/hash_instance_context/two/f.js +++ /dev/null @@ -1,3 +0,0 @@ -// FILE F TWO -var G = require('./g.js'); -module.exports = function () { return 111 * G }; diff --git a/node_modules/browserify/test/hash_instance_context/two/g.js b/node_modules/browserify/test/hash_instance_context/two/g.js deleted file mode 100644 index b940ee76..00000000 --- a/node_modules/browserify/test/hash_instance_context/two/g.js +++ /dev/null @@ -1,2 +0,0 @@ -// FILE G TWO -module.exports = require('./h.js') + 1; diff --git a/node_modules/browserify/test/hash_instance_context/two/h.js b/node_modules/browserify/test/hash_instance_context/two/h.js deleted file mode 100644 index 42684f03..00000000 --- a/node_modules/browserify/test/hash_instance_context/two/h.js +++ /dev/null @@ -1,2 +0,0 @@ -// FILE H TWO -module.exports = 4 diff --git a/node_modules/browserify/test/identical.js b/node_modules/browserify/test/identical.js deleted file mode 100644 index 7d0deaeb..00000000 --- a/node_modules/browserify/test/identical.js +++ /dev/null @@ -1,19 +0,0 @@ -var browserify = require('../'); -var test = require('tap').test; -var vm = require('vm'); - -test('identical', function (t) { - var expected = [ 0, 1, 0, 1 ]; - t.plan(expected.length + 1); - - var b = browserify(__dirname + '/identical/main.js'); - b.bundle(function (err, src) { - t.ifError(err); - vm.runInNewContext(src.toString('utf8'), { - console: { log: log } - }); - function log (msg) { - t.equal(msg, expected.shift()); - } - }); -}); diff --git a/node_modules/browserify/test/identical/main.js b/node_modules/browserify/test/identical/main.js deleted file mode 100644 index c2e83ed2..00000000 --- a/node_modules/browserify/test/identical/main.js +++ /dev/null @@ -1,6 +0,0 @@ -var x = require('./x'); -var y = require('./y'); -console.log(x()); -console.log(x()); -console.log(y()); -console.log(y()); diff --git a/node_modules/browserify/test/identical/x.js b/node_modules/browserify/test/identical/x.js deleted file mode 100644 index 13c441d7..00000000 --- a/node_modules/browserify/test/identical/x.js +++ /dev/null @@ -1,2 +0,0 @@ -var i = 0; -module.exports = function () { return i++ }; diff --git a/node_modules/browserify/test/identical/y.js b/node_modules/browserify/test/identical/y.js deleted file mode 100644 index 13c441d7..00000000 --- a/node_modules/browserify/test/identical/y.js +++ /dev/null @@ -1,2 +0,0 @@ -var i = 0; -module.exports = function () { return i++ }; diff --git a/node_modules/browserify/test/identical_different.js b/node_modules/browserify/test/identical_different.js deleted file mode 100644 index a2e7911d..00000000 --- a/node_modules/browserify/test/identical_different.js +++ /dev/null @@ -1,19 +0,0 @@ -var browserify = require('../'); -var test = require('tap').test; -var vm = require('vm'); - -test('identical', function (t) { - var expected = [ 1, 2, 10, 110 ]; - t.plan(expected.length + 1); - - var b = browserify(__dirname + '/identical_different/main.js'); - b.bundle(function (err, src) { - t.ifError(err); - vm.runInNewContext(src.toString('utf8'), { - console: { log: log } - }); - function log (msg) { - t.equal(msg, expected.shift()); - } - }); -}); diff --git a/node_modules/browserify/test/identical_different/main.js b/node_modules/browserify/test/identical_different/main.js deleted file mode 100644 index 5a4154b1..00000000 --- a/node_modules/browserify/test/identical_different/main.js +++ /dev/null @@ -1,6 +0,0 @@ -var x = require('./x'); -var y = require('./wow/y'); -console.log(x()); -console.log(x()); -console.log(y()); -console.log(y()); diff --git a/node_modules/browserify/test/identical_different/wow/y.js b/node_modules/browserify/test/identical_different/wow/y.js deleted file mode 100644 index 0b8636f5..00000000 --- a/node_modules/browserify/test/identical_different/wow/y.js +++ /dev/null @@ -1,3 +0,0 @@ -var op = require('op'); -var i = 0; -module.exports = function () { i = op(i); return i }; diff --git a/node_modules/browserify/test/identical_different/x.js b/node_modules/browserify/test/identical_different/x.js deleted file mode 100644 index 0b8636f5..00000000 --- a/node_modules/browserify/test/identical_different/x.js +++ /dev/null @@ -1,3 +0,0 @@ -var op = require('op'); -var i = 0; -module.exports = function () { i = op(i); return i }; diff --git a/node_modules/browserify/test/ignore.js b/node_modules/browserify/test/ignore.js deleted file mode 100644 index e4ad9775..00000000 --- a/node_modules/browserify/test/ignore.js +++ /dev/null @@ -1,72 +0,0 @@ -var browserify = require('../'); -var test = require('tap').test; -var vm = require('vm'); - -test('ignore', function (t) { - t.plan(1); - - var b = browserify(); - b.add(__dirname + '/ignore/main.js'); - b.ignore( __dirname + '/ignore/skip.js'); - - b.bundle(function (err, src) { - if (err) t.fail(err); - vm.runInNewContext(src, { t: t }); - }); -}); - -test('ignore by package or id', function (t) { - t.plan(3); - - var b = browserify(); - b.add(__dirname + '/ignore/by-id.js'); - b.ignore('events'); - b.ignore('beep'); - b.ignore('bad id'); - - b.bundle(function (err, src) { - if (err) t.fail(err); - vm.runInNewContext(src, { t: t }); - }); -}); - -test('ignore files referenced by relative path', function (t) { - // Change the current working directory relative to this file - var cwd = process.cwd(); - process.chdir(__dirname); - - t.plan(1); - - var b = browserify(); - b.add(__dirname + '/ignore/by-relative.js'); - b.ignore('./ignore/ignored/skip.js'); - - b.bundle(function (err, src) { - if (err) t.fail(err); - vm.runInNewContext(src, { t: t }); - }); - - // Revert CWD - process.chdir(cwd); -}); - -test('do not ignore files with relative paths that do not resolve', function (t) { - // Change the current working directory to the ignore folder - var cwd = process.cwd(); - process.chdir(__dirname + '/ignore'); - - t.plan(2); - - var b = browserify(); - b.add(__dirname + '/ignore/double-skip.js'); - - b.ignore('./skip.js'); - - b.bundle(function (err, src) { - if (err) t.fail(err); - vm.runInNewContext(src, { t: t }); - }); - - // Revert CWD - process.chdir(cwd); -}); diff --git a/node_modules/browserify/test/ignore/by-id.js b/node_modules/browserify/test/ignore/by-id.js deleted file mode 100644 index 61c0baab..00000000 --- a/node_modules/browserify/test/ignore/by-id.js +++ /dev/null @@ -1,3 +0,0 @@ -t.deepEqual(require('events'), {}); -t.deepEqual(require('bad id'), {}); -t.deepEqual(require('beep'), {}); \ No newline at end of file diff --git a/node_modules/browserify/test/ignore/by-relative.js b/node_modules/browserify/test/ignore/by-relative.js deleted file mode 100644 index e50676ef..00000000 --- a/node_modules/browserify/test/ignore/by-relative.js +++ /dev/null @@ -1,5 +0,0 @@ -/** - * This test is to check to make sure that files that are ignored do not get - * bundled when referenced with a nested relative path. - */ -t.deepEqual(require('./relative'), {}); diff --git a/node_modules/browserify/test/ignore/double-skip.js b/node_modules/browserify/test/ignore/double-skip.js deleted file mode 100644 index ad61cce9..00000000 --- a/node_modules/browserify/test/ignore/double-skip.js +++ /dev/null @@ -1,2 +0,0 @@ -t.deepEqual(require('./skip.js'), {}); -t.deepEqual(require('./double-skip/index'), {foo: 'bar'}); \ No newline at end of file diff --git a/node_modules/browserify/test/ignore/double-skip/index.js b/node_modules/browserify/test/ignore/double-skip/index.js deleted file mode 100644 index affe2f2d..00000000 --- a/node_modules/browserify/test/ignore/double-skip/index.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('./skip.js'); \ No newline at end of file diff --git a/node_modules/browserify/test/ignore/double-skip/skip.js b/node_modules/browserify/test/ignore/double-skip/skip.js deleted file mode 100644 index 1922194b..00000000 --- a/node_modules/browserify/test/ignore/double-skip/skip.js +++ /dev/null @@ -1,5 +0,0 @@ -// this module should return something - -module.exports = { - foo: 'bar' -}; diff --git a/node_modules/browserify/test/ignore/ignored/skip.js b/node_modules/browserify/test/ignore/ignored/skip.js deleted file mode 100644 index 006521e5..00000000 --- a/node_modules/browserify/test/ignore/ignored/skip.js +++ /dev/null @@ -1 +0,0 @@ -t.fail('this file should have been skipped'); diff --git a/node_modules/browserify/test/ignore/main.js b/node_modules/browserify/test/ignore/main.js deleted file mode 100644 index 0149b755..00000000 --- a/node_modules/browserify/test/ignore/main.js +++ /dev/null @@ -1 +0,0 @@ -t.deepEqual(require('./skip.js'), {}); diff --git a/node_modules/browserify/test/ignore/relative/index.js b/node_modules/browserify/test/ignore/relative/index.js deleted file mode 100644 index 3f73c326..00000000 --- a/node_modules/browserify/test/ignore/relative/index.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('../ignored/skip.js'); \ No newline at end of file diff --git a/node_modules/browserify/test/ignore/skip.js b/node_modules/browserify/test/ignore/skip.js deleted file mode 100644 index 006521e5..00000000 --- a/node_modules/browserify/test/ignore/skip.js +++ /dev/null @@ -1 +0,0 @@ -t.fail('this file should have been skipped'); diff --git a/node_modules/browserify/test/ignore_browser_field.js b/node_modules/browserify/test/ignore_browser_field.js deleted file mode 100644 index a925f2e6..00000000 --- a/node_modules/browserify/test/ignore_browser_field.js +++ /dev/null @@ -1,21 +0,0 @@ -var test = require('tap').test; -var browserify = require('../'); -var path = require('path'); -var mainfile = path.join(__dirname, 'ignore_browser_field/main.js'); -var vm = require('vm'); - -test('ignore browser field', function (t) { - t.plan(3); - var b = browserify(mainfile, { browserField: false }); - var expected = [ 'A:NODE', 'B:X.JS' ]; - - b.bundle(function (err, src) { - t.ifError(err); - var c = { console: { log: log } }; - vm.runInNewContext(src, c); - - function log (msg) { - t.equal(msg, expected.shift()); - } - }); -}); diff --git a/node_modules/browserify/test/ignore_browser_field/main.js b/node_modules/browserify/test/ignore_browser_field/main.js deleted file mode 100644 index bae4a229..00000000 --- a/node_modules/browserify/test/ignore_browser_field/main.js +++ /dev/null @@ -1,2 +0,0 @@ -console.log(require('a')); -console.log(require('b')); diff --git a/node_modules/browserify/test/ignore_missing.js b/node_modules/browserify/test/ignore_missing.js deleted file mode 100644 index ddf72ed2..00000000 --- a/node_modules/browserify/test/ignore_missing.js +++ /dev/null @@ -1,41 +0,0 @@ -var browserify = require('../'); -var test = require('tap').test; - -test('ignoreMissing option', function (t) { - t.test('on browserify', function(t) { - t.plan(1); - - var ignored = browserify({ - entries: [__dirname + '/ignore_missing/main.js'], - ignoreMissing: true - }); - - ignored.bundle(function(err) { - t.ok(!err, "bundle completed with missing file ignored"); - }); - }); - - t.test('on .bundle', function(t) { - t.plan(1); - - var ignored = browserify(__dirname + '/ignore_missing/main.js', { - ignoreMissing: true - }); - - ignored.bundle(function(err) { - t.ok(!err, "bundle completed with missing file ignored"); - }); - }); - - t.test('defaults to false', function (t) { - t.plan(1); - - var expected = browserify(__dirname + '/ignore_missing/main.js'); - - expected.bundle(function(err) { - t.ok(err, 'ignoreMissing was false, an error was raised'); - }); - }); - - t.end(); -}); diff --git a/node_modules/browserify/test/ignore_missing/main.js b/node_modules/browserify/test/ignore_missing/main.js deleted file mode 100644 index a522a65c..00000000 --- a/node_modules/browserify/test/ignore_missing/main.js +++ /dev/null @@ -1 +0,0 @@ -require('./no_such_file'); diff --git a/node_modules/browserify/test/json.js b/node_modules/browserify/test/json.js deleted file mode 100644 index ffa5333f..00000000 --- a/node_modules/browserify/test/json.js +++ /dev/null @@ -1,44 +0,0 @@ -var browserify = require('../'); -var fs = require('fs'); -var vm = require('vm'); -var test = require('tap').test; - -test('json', function (t) { - t.plan(2); - var b = browserify(); - b.add(__dirname + '/json/main.js'); - b.bundle(function (err, src) { - if (err) t.fail(err); - var c = { - ex : function (obj) { - t.same(obj, { beep : 'boop', x : 555 }); - } - }; - vm.runInNewContext(src, c); - }); -}); - -test('verify evil json', function(t) { - t.plan(1); - fs.readFile(__dirname + '/json/evil-chars.json', function(err, data) { - if (err) t.fail(err); - t.throws(function() { - vm.runInNewContext('(' + data.toString() + ')'); - }); - }); -}); - -test('evil json', function (t) { - t.plan(2); - var b = browserify(); - b.add(__dirname + '/json/evil.js'); - b.bundle(function (err, src) { - if (err) t.fail(err); - var c = { - ex : function (obj) { - t.same(obj, { evil : '\u2028\u2029' }); - } - }; - vm.runInNewContext(src, c); - }); -}); diff --git a/node_modules/browserify/test/json/beep.json b/node_modules/browserify/test/json/beep.json deleted file mode 100644 index d85cfe56..00000000 --- a/node_modules/browserify/test/json/beep.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "beep" : "boop", - "x" : 555 -} diff --git a/node_modules/browserify/test/json/evil-chars.json b/node_modules/browserify/test/json/evil-chars.json deleted file mode 100644 index 4a5851bb..00000000 --- a/node_modules/browserify/test/json/evil-chars.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "evil": "

" -} diff --git a/node_modules/browserify/test/json/evil.js b/node_modules/browserify/test/json/evil.js deleted file mode 100644 index 767e9cb2..00000000 --- a/node_modules/browserify/test/json/evil.js +++ /dev/null @@ -1,2 +0,0 @@ -ex(require('./evil-chars.json')); -ex(require('./evil-chars')); diff --git a/node_modules/browserify/test/json/main.js b/node_modules/browserify/test/json/main.js deleted file mode 100644 index f459f30f..00000000 --- a/node_modules/browserify/test/json/main.js +++ /dev/null @@ -1,2 +0,0 @@ -ex(require('./beep.json')); -ex(require('./beep')); diff --git a/node_modules/browserify/test/leak.js b/node_modules/browserify/test/leak.js deleted file mode 100644 index 7479640c..00000000 --- a/node_modules/browserify/test/leak.js +++ /dev/null @@ -1,57 +0,0 @@ -var browserify = require('../'); -var vm = require('vm'); -var test = require('tap').test; -var path = require('path'); -var through = require('through2'); - -var os = require('os'); -var tmpdir = (os.tmpdir || os.tmpDir)(); -var dir = path.join( - tmpdir, - 'browserify-test-' + Math.random(), - 'aaabbbzzz' -); -var dirstring = dir.split(path.sep).slice(-2).join(path.sep); - -test('leaking information about system paths (process)', function (t) { - t.plan(4); - - var b = browserify({ basedir: dir }); - var stream = through(); - stream.push('process.nextTick(function () {' - + 't.ok(true)' - + '})' - ); - stream.push(null); - b.add(stream); - - b.bundle(function (err, buf) { - var src = buf.toString('utf8'); - t.equal(src.indexOf(dirstring), -1, 'temp directory visible'); - t.equal(src.indexOf(process.cwd()), -1, 'cwd directory visible'); - t.equal(src.indexOf('/home'), -1, 'home directory visible'); - vm.runInNewContext(src, { - t: t, - setTimeout: setTimeout, - clearTimeout: clearTimeout - }); - }); -}); - -test('leaking information about system paths (Buffer)', function (t) { - t.plan(4); - - var b = browserify({ basedir: dir }); - var stream = through(); - stream.push('t.equal(Buffer("eHl6", "base64").toString(), "xyz")'); - stream.push(null); - b.add(stream); - - b.bundle(function (err, buf) { - var src = buf.toString('utf8'); - t.equal(src.indexOf(dirstring), -1, 'temp directory visible'); - t.equal(src.indexOf(process.cwd()), -1, 'cwd directory visible'); - t.equal(src.indexOf('/home'), -1, 'home directory visible'); - vm.runInNewContext(src, { t: t, setTimeout: setTimeout }); - }); -}); diff --git a/node_modules/browserify/test/maxlisteners.js b/node_modules/browserify/test/maxlisteners.js deleted file mode 100644 index 11cfd825..00000000 --- a/node_modules/browserify/test/maxlisteners.js +++ /dev/null @@ -1,13 +0,0 @@ -var test = require('tap').test; -var browserify = require('../'); -var vm = require('vm'); - -test('setMaxListener', function (t) { - t.plan(1); - var b = browserify(); - b.add(__dirname + '/maxlisteners/main.js'); - b.bundle(function (err, src) { - vm.runInNewContext(src); - t.ok(true); // didn't crash - }); -}); diff --git a/node_modules/browserify/test/maxlisteners/main.js b/node_modules/browserify/test/maxlisteners/main.js deleted file mode 100644 index a5496a61..00000000 --- a/node_modules/browserify/test/maxlisteners/main.js +++ /dev/null @@ -1,3 +0,0 @@ -var EventEmitter = require('events').EventEmitter -var ee = new EventEmitter; -ee.setMaxListeners(5); diff --git a/node_modules/browserify/test/multi_bundle.js b/node_modules/browserify/test/multi_bundle.js deleted file mode 100644 index 05411d32..00000000 --- a/node_modules/browserify/test/multi_bundle.js +++ /dev/null @@ -1,86 +0,0 @@ -var browserify = require('../'); -var vm = require('vm'); -var test = require('tap').test; - -test('multi bundle', function (t) { - t.plan(5); - - var core = browserify(); - core.require(__dirname + '/multi_bundle/b.js', { expose: true }); - - var app = browserify([__dirname + '/multi_bundle/a.js']); - // inform this bundle that b exists in another bundle - app.external(__dirname + '/multi_bundle/b.js'); - - core.bundle(function (err, src) { - var c = { - console: console, - t : t, - baton: { - times: 0 - } - }; - - // loading core will cause no require to run - vm.runInNewContext(src, c); - t.equal(c.baton.times, 0); - - // loading the app will require - app.bundle(function (err, src) { - vm.runInNewContext(src, c); - - // b required for the first time - t.equal(c.baton.times, 1); - - // running the file again - // because it is using the same b, no reloading - vm.runInNewContext(src, c); - - // b should not have been required again - // because it was part of the core bundle - t.equal(c.baton.times, 1); - }); - }); -}); - -// re-enable this in future releases -test('multi bundle', function (t) { - t.plan(8); - - var core = browserify({ exposeAll: true }); - core.require(__dirname + '/multi_bundle/a.js', { expose: true }); - - var app = browserify([__dirname + '/multi_bundle/c.js']); - // inform this bundle that b exists in another bundle - app.external(core); - - core.bundle(function (err, src) { - var c = { - console: console, - t : t, - baton: { - times: 0 - } - }; - - // loading core will cause no require to run - vm.runInNewContext(src, c); - t.equal(c.baton.times, 0); - - // loading the app will require - app.bundle(function (err, src) { - vm.runInNewContext(src, c); - - // b required for the first time - t.equal(c.baton.times, 1); - - // running the file again - // because it is using the same b, no reloading - vm.runInNewContext(src, c); - - // b should not have been required again - // because it was part of the core bundle - t.equal(c.baton.times, 1); - }); - }); -}); diff --git a/node_modules/browserify/test/multi_bundle/_prelude.js b/node_modules/browserify/test/multi_bundle/_prelude.js deleted file mode 100644 index 95eb4bc8..00000000 --- a/node_modules/browserify/test/multi_bundle/_prelude.js +++ /dev/null @@ -1 +0,0 @@ -(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof unique_require=="function"&&unique_require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);throw new Error("Cannot find module '"+o+"'")}var f=n[o]={exports:{}};t[o][0].call(f.exports,function(e){var n=t[o][1][e];return s(n?n:e)},f,f.exports,e,t,n,r)}return n[o].exports}var i=typeof unique_require=="function"&&unique_require;for(var o=0;o -1, 'should contain full entry path'); - } - }); - - b.bundle(function (err, src) { - var c = { - times : 0, - t : t - }; - vm.runInNewContext(src, c); - }); -}); - -test('multi entry relative', function (t) { - t.plan(6); - - var rTestFiles = testFiles.map(function(x) { - return x.replace(__dirname + '/', ''); - }); - - var b = browserify({ - entries: [rTestFiles[0], rTestFiles[1]], - basedir: __dirname - }); - b.add(rTestFiles[2]); - - b.on('dep', function(row) { - if (row.entry) { - t.ok(testFiles.indexOf(row.file) > -1, 'should contain full entry path'); - } - }); - - b.bundle(function (err, src) { - var c = { - times : 0, - t : t - }; - vm.runInNewContext(src, c); - }); -}); - -test('multi entry relative cwd', function (t) { - t.plan(6); - - var rTestFiles = testFiles.map(function(x) { - return x.replace(__dirname + '/', './'); - }); - - var b = browserify({ - entries: [rTestFiles[0], rTestFiles[1]], - basedir: __dirname - }); - b.add(rTestFiles[2]); - - b.on('dep', function(row) { - if (row.entry) { - t.ok(testFiles.indexOf(row.file) > -1, 'should contain full entry path'); - } - }); - - b.bundle(function (err, src) { - var c = { - times : 0, - t : t - }; - vm.runInNewContext(src, c); - }); -}); - -test('entries as streams', function (t) { - t.plan(6); - - // commondir blows up with streams and without basedir - var opts = { basedir: __dirname + '/multi_entry' }; - - var b = browserify([ - fs.createReadStream(testFiles[0]), - fs.createReadStream(testFiles[1]) - ], opts); - b.add(fs.createReadStream(testFiles[2])); - - b.on('dep', function(row) { - if (row.entry) { - t.similar( - row.file, - RegExp(__dirname + '/multi_entry/_stream_[\\d].js'), - 'should be full entry path' - ); - } - }); - - b.bundle(function (err, src) { - var c = { - times : 0, - t : t - }; - vm.runInNewContext(src, c); - }); -}); diff --git a/node_modules/browserify/test/multi_entry/a.js b/node_modules/browserify/test/multi_entry/a.js deleted file mode 100644 index d4e250ee..00000000 --- a/node_modules/browserify/test/multi_entry/a.js +++ /dev/null @@ -1,2 +0,0 @@ -times ++; -t.equal(times, 1); diff --git a/node_modules/browserify/test/multi_entry/b.js b/node_modules/browserify/test/multi_entry/b.js deleted file mode 100644 index bed7bbba..00000000 --- a/node_modules/browserify/test/multi_entry/b.js +++ /dev/null @@ -1,2 +0,0 @@ -times ++; -t.equal(times, 2); diff --git a/node_modules/browserify/test/multi_entry/c.js b/node_modules/browserify/test/multi_entry/c.js deleted file mode 100644 index ac3c174d..00000000 --- a/node_modules/browserify/test/multi_entry/c.js +++ /dev/null @@ -1,2 +0,0 @@ -times ++; -t.equal(times, 3); diff --git a/node_modules/browserify/test/multi_entry_cross_require.js b/node_modules/browserify/test/multi_entry_cross_require.js deleted file mode 100644 index 0cc1a882..00000000 --- a/node_modules/browserify/test/multi_entry_cross_require.js +++ /dev/null @@ -1,92 +0,0 @@ -var browserify = require('../'); -var vm = require('vm'); -var test = require('tap').test; - -var testFiles = [ - __dirname + '/multi_entry_cross_require/a.js', - __dirname + '/multi_entry_cross_require/lib/b.js', - __dirname + '/multi_entry_cross_require/c.js' -]; - -test('multi entry cross require', function (t) { - t.plan(8); - - var b = browserify([ - testFiles[0], - testFiles[1] - ]); - b.add(testFiles[2]); - - b.on('dep', function(row) { - if (row.entry) { - t.ok(testFiles.indexOf(row.file) > -1, 'should contain full entry path'); - } - }); - - b.bundle(function (err, src) { - if (err) throw err; - var c = { - times : 0, - t : t - }; - vm.runInNewContext(src, c); - }); -}); - -test('multi entry cross require - relative cwd', function (t) { - t.plan(8); - - var dsTestFiles = testFiles.map(function(x) { - return x.replace(__dirname + '/', './'); - }); - - var b = browserify({ - entries: [dsTestFiles[0], dsTestFiles[1]], - basedir: __dirname - }); - b.add(dsTestFiles[2]); - - b.on('dep', function(row) { - if (row.entry) { - t.ok(testFiles.indexOf(row.file) > -1, 'should contain full entry path'); - } - }); - - b.bundle(function (err, src) { - if (err) throw err; - var c = { - times : 0, - t : t - }; - vm.runInNewContext(src, c); - }); -}); - -test('multi entry cross require - relative', function (t) { - t.plan(8); - - var rTestFiles = testFiles.map(function(x) { - return x.replace(__dirname + '/', ''); - }); - - var b = browserify({ - entries: [rTestFiles[0], rTestFiles[1]], - basedir: __dirname - }); - b.add(rTestFiles[2]); - - b.on('dep', function(row) { - if (row.entry) { - t.ok(testFiles.indexOf(row.file) > -1, 'should contain full entry path'); - } - }); - - b.bundle(function (err, src) { - if (err) throw err; - var c = { - times : 0, - t : t - }; - vm.runInNewContext(src, c); - }); -}); diff --git a/node_modules/browserify/test/multi_entry_cross_require/a.js b/node_modules/browserify/test/multi_entry_cross_require/a.js deleted file mode 100644 index 0223dafc..00000000 --- a/node_modules/browserify/test/multi_entry_cross_require/a.js +++ /dev/null @@ -1,8 +0,0 @@ -times ++; -t.equal(times, 1); - -var b = require('./lib/b'); -t.equal(times, 2); - -b.foo(); -t.equal(times, 3); diff --git a/node_modules/browserify/test/multi_entry_cross_require/c.js b/node_modules/browserify/test/multi_entry_cross_require/c.js deleted file mode 100644 index e1918384..00000000 --- a/node_modules/browserify/test/multi_entry_cross_require/c.js +++ /dev/null @@ -1,7 +0,0 @@ -times++; -t.equal(times, 4); - -var b = require('./lib/b'); -b.foo(); - -t.equal(times, 5); diff --git a/node_modules/browserify/test/multi_entry_cross_require/lib/b.js b/node_modules/browserify/test/multi_entry_cross_require/lib/b.js deleted file mode 100644 index e7d2dad1..00000000 --- a/node_modules/browserify/test/multi_entry_cross_require/lib/b.js +++ /dev/null @@ -1,5 +0,0 @@ -times++; - -module.exports.foo = function() { - times++; -}; diff --git a/node_modules/browserify/test/multi_require.js b/node_modules/browserify/test/multi_require.js deleted file mode 100644 index a1b3f64e..00000000 --- a/node_modules/browserify/test/multi_require.js +++ /dev/null @@ -1,18 +0,0 @@ -var browserify = require('../'); -var test = require('tap').test; -var vm = require('vm'); - -test('require same file locally and globally', function (t) { - t.plan(2); - - var b = browserify(__dirname + '/multi_require/main.js', { - basedir: __dirname - }); - b.require('./multi_require/a.js', {expose: 'a'}); - - b.bundle(function (err, src) { - t.ifError(err); - var c = {t: t}; - vm.runInNewContext(src, c); - }); -}); diff --git a/node_modules/browserify/test/multi_require/a.js b/node_modules/browserify/test/multi_require/a.js deleted file mode 100644 index 18dea674..00000000 --- a/node_modules/browserify/test/multi_require/a.js +++ /dev/null @@ -1,3 +0,0 @@ -module.exports = function() { - return 'a'; -} diff --git a/node_modules/browserify/test/multi_require/main.js b/node_modules/browserify/test/multi_require/main.js deleted file mode 100644 index 6f548ec9..00000000 --- a/node_modules/browserify/test/multi_require/main.js +++ /dev/null @@ -1,4 +0,0 @@ -var localA = require('./a.js'); -var globalA = require('a'); - -t.equal(localA, globalA); diff --git a/node_modules/browserify/test/multi_symlink.js b/node_modules/browserify/test/multi_symlink.js deleted file mode 100644 index 913c7a3b..00000000 --- a/node_modules/browserify/test/multi_symlink.js +++ /dev/null @@ -1,13 +0,0 @@ -var browserify = require('../'); -var vm = require('vm'); -var test = require('tap').test; - -test('multiple symlink execution', function (t) { - t.plan(1); - var b = browserify(__dirname + '/multi_symlink/main.js'); - b.bundle(function (err, src) { - var c = { console: { log: log } }; - vm.runInNewContext(src, c); - function log (msg) { t.equal(msg, 'X') } - }); -}); diff --git a/node_modules/browserify/test/multi_symlink/main.js b/node_modules/browserify/test/multi_symlink/main.js deleted file mode 100644 index 0f904dc9..00000000 --- a/node_modules/browserify/test/multi_symlink/main.js +++ /dev/null @@ -1,2 +0,0 @@ -require('./x.js'); -require('./y.js'); diff --git a/node_modules/browserify/test/multi_symlink/x.js b/node_modules/browserify/test/multi_symlink/x.js deleted file mode 100644 index e894542c..00000000 --- a/node_modules/browserify/test/multi_symlink/x.js +++ /dev/null @@ -1 +0,0 @@ -console.log('X'); diff --git a/node_modules/browserify/test/no_builtins.js b/node_modules/browserify/test/no_builtins.js deleted file mode 100644 index 900754a0..00000000 --- a/node_modules/browserify/test/no_builtins.js +++ /dev/null @@ -1,63 +0,0 @@ -var browserify = require('../'); -var test = require('tap').test; -var vm = require('vm'); - -test('builtins false', function (t) { - t.plan(1); - - var b = browserify({ - entries: [ __dirname + '/no_builtins/main.js' ], - commondir: false, - builtins: false - }); - b.bundle(function (err, src) { - var c = { - console: { log: function (msg) { - t.equal(msg, 'beep boop\n'); - } }, - require: require - }; - vm.runInNewContext(src, c); - }); -}); - -test('builtins []', function (t) { - t.plan(1); - var b = browserify({ - entries: [ __dirname + '/no_builtins/main.js' ], - commondir: false, - builtins: [] - }); - b.bundle(function (err, src) { - var c = { - console: { log: function (msg) { - t.equal(msg, 'beep boop\n'); - } }, - require: require - }; - vm.runInNewContext(src, c); - }); -}); - -test('builtins object', function (t) { - t.plan(2); - var b = browserify({ - entries: [ __dirname + '/no_builtins/main.js' ], - commondir: false, - builtins: { - fs: require.resolve('./no_builtins/extra/fs.js'), - tls: require.resolve('./no_builtins/extra/tls.js') - } - }); - var expected = [ - 'WRITE CODE EVERY DAY', - 'WHATEVER' - ]; - b.bundle(function (err, src) { - var c = { console: { log: log }, require: require }; - function log (msg) { - t.equal(msg, expected.shift()); - } - vm.runInNewContext(src, c); - }); -}); diff --git a/node_modules/browserify/test/no_builtins/extra/fs.js b/node_modules/browserify/test/no_builtins/extra/fs.js deleted file mode 100644 index b8bdd44e..00000000 --- a/node_modules/browserify/test/no_builtins/extra/fs.js +++ /dev/null @@ -1 +0,0 @@ -exports.readFileSync = function () { return 'WHATEVER' }; diff --git a/node_modules/browserify/test/no_builtins/extra/tls.js b/node_modules/browserify/test/no_builtins/extra/tls.js deleted file mode 100644 index ceea2a64..00000000 --- a/node_modules/browserify/test/no_builtins/extra/tls.js +++ /dev/null @@ -1 +0,0 @@ -console.log('WRITE CODE EVERY DAY'); diff --git a/node_modules/browserify/test/no_builtins/main.js b/node_modules/browserify/test/no_builtins/main.js deleted file mode 100644 index f2dadc65..00000000 --- a/node_modules/browserify/test/no_builtins/main.js +++ /dev/null @@ -1,4 +0,0 @@ -var fs = require('fs'); -var tls = require('tls'); - -console.log(fs.readFileSync(__dirname + '/x.txt', 'utf8')); diff --git a/node_modules/browserify/test/no_builtins/x.txt b/node_modules/browserify/test/no_builtins/x.txt deleted file mode 100644 index fae06e34..00000000 --- a/node_modules/browserify/test/no_builtins/x.txt +++ /dev/null @@ -1 +0,0 @@ -beep boop diff --git a/node_modules/browserify/test/noparse.js b/node_modules/browserify/test/noparse.js deleted file mode 100644 index 7d0b3b27..00000000 --- a/node_modules/browserify/test/noparse.js +++ /dev/null @@ -1,31 +0,0 @@ -var browserify = require('../'); -var test = require('tap').test; -var path = require('path'); - -test('noParse array', function (t) { - process.chdir(__dirname); - - t.plan(2); - - var actual = []; - var expected = [ - 'noparse/a.js', - 'noparse/b.js', - 'noparse/dir1/1.js', - 'noparse/node_modules/robot/main.js' - ].map(function (x) {return path.resolve(x);}).sort(); - - var b = browserify({ - entries: [ __dirname + '/noparse/a.js' ], - noParse: [ - __dirname + '/noparse/dir1/1.js', - __dirname + '/noparse/node_modules/robot/main.js' - ] - }); - b.on('dep', function(dep) { actual.push(dep.file); }); - b.bundle(function (err, src) { - actual.sort(); - t.ifError(err); - t.deepEqual(actual, expected); - }); -}); diff --git a/node_modules/browserify/test/noparse/a.js b/node_modules/browserify/test/noparse/a.js deleted file mode 100644 index 076812a6..00000000 --- a/node_modules/browserify/test/noparse/a.js +++ /dev/null @@ -1,4 +0,0 @@ -module.exports = { - a: true, - b: require('./b') -}; diff --git a/node_modules/browserify/test/noparse/b.js b/node_modules/browserify/test/noparse/b.js deleted file mode 100644 index de0ba559..00000000 --- a/node_modules/browserify/test/noparse/b.js +++ /dev/null @@ -1,5 +0,0 @@ -module.exports = { - b: true, - 1: require('./dir1/1'), - robot: require('robot') -}; diff --git a/node_modules/browserify/test/noparse/dir1/1.js b/node_modules/browserify/test/noparse/dir1/1.js deleted file mode 100644 index 960968b0..00000000 --- a/node_modules/browserify/test/noparse/dir1/1.js +++ /dev/null @@ -1,4 +0,0 @@ -module.exports = { - 1: true, - 2: require('./dir2/2') -}; diff --git a/node_modules/browserify/test/noparse/dir1/dir2/2.js b/node_modules/browserify/test/noparse/dir1/dir2/2.js deleted file mode 100644 index ef4ba196..00000000 --- a/node_modules/browserify/test/noparse/dir1/dir2/2.js +++ /dev/null @@ -1,3 +0,0 @@ -module.exports = { - 2: true -}; diff --git a/node_modules/browserify/test/pack.js b/node_modules/browserify/test/pack.js deleted file mode 100644 index 68a6e2c6..00000000 --- a/node_modules/browserify/test/pack.js +++ /dev/null @@ -1,33 +0,0 @@ -var browserify = require('../'); -var vm = require('vm'); -var through = require('through2'); -var test = require('tap').test; - -var fs = require('fs'); -var sources = { - 1: fs.readFileSync(__dirname + '/entry/main.js', 'utf8'), - 2: fs.readFileSync(__dirname + '/entry/one.js', 'utf8'), - 3: fs.readFileSync(__dirname + '/entry/two.js', 'utf8') -}; - -var deps = { - 1: { './two': 3, './one': 2 }, - 2: {}, - 3: {} -}; - -test('custom packer', function (t) { - t.plan(7); - - var b = browserify(__dirname + '/entry/main.js'); - b.pipeline.get('pack').splice(0,1, through.obj(function (row, enc, next) { - t.equal(sources[row.id], row.source); - t.deepEqual(deps[row.id], row.deps); - this.push(row.id + '\n'); - next(); - })); - b.pipeline.get('wrap').splice(0); - b.bundle(function (err, src) { - t.equal(src.toString('utf8'), '1\n2\n3\n'); - }); -}); diff --git a/node_modules/browserify/test/paths.js b/node_modules/browserify/test/paths.js deleted file mode 100644 index c3d5728f..00000000 --- a/node_modules/browserify/test/paths.js +++ /dev/null @@ -1,32 +0,0 @@ -var browserify = require('../'); -var vm = require('vm'); -var test = require('tap').test; - -test('$NODE_PATHS', function (t) { - t.plan(3); - var paths = [ __dirname + '/paths/x', __dirname + '/paths/y' ]; - var sep = /^win/i.test(process.platform) ? ';' : ':'; - - process.env.NODE_PATH = (process.env.NODE_PATHS || '') - .split(sep).concat(paths).join(sep) - ; - - var b = browserify(__dirname + '/paths/main.js'); - b.bundle(function (err, src) { - if (err) t.fail(err); - vm.runInNewContext(src, { t: t }); - }); -}); - -test('opts.paths', function (t) { - t.plan(3); - - var b = browserify({ - paths: [ __dirname + '/paths/x', __dirname + '/paths/y' ], - entries: __dirname + '/paths/main.js' - }); - b.bundle(function (err, src) { - if (err) t.fail(err); - vm.runInNewContext(src, { t: t }); - }); -}); diff --git a/node_modules/browserify/test/paths/main.js b/node_modules/browserify/test/paths/main.js deleted file mode 100644 index ec0d8a18..00000000 --- a/node_modules/browserify/test/paths/main.js +++ /dev/null @@ -1,3 +0,0 @@ -t.equal(require('aaa'), 'AX'); -t.equal(require('bbb'), 'BY'); -t.equal(require('ccc'), 'CX'); diff --git a/node_modules/browserify/test/paths/x/aaa/index.js b/node_modules/browserify/test/paths/x/aaa/index.js deleted file mode 100644 index b76ce87e..00000000 --- a/node_modules/browserify/test/paths/x/aaa/index.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = 'AX' diff --git a/node_modules/browserify/test/paths/x/ccc/index.js b/node_modules/browserify/test/paths/x/ccc/index.js deleted file mode 100644 index 882058e3..00000000 --- a/node_modules/browserify/test/paths/x/ccc/index.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = 'CX' diff --git a/node_modules/browserify/test/paths/y/bbb/index.js b/node_modules/browserify/test/paths/y/bbb/index.js deleted file mode 100644 index 5dbca447..00000000 --- a/node_modules/browserify/test/paths/y/bbb/index.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = 'BY' diff --git a/node_modules/browserify/test/paths/y/ccc/index.js b/node_modules/browserify/test/paths/y/ccc/index.js deleted file mode 100644 index d0043d1e..00000000 --- a/node_modules/browserify/test/paths/y/ccc/index.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = 'CY' diff --git a/node_modules/browserify/test/paths_transform.js b/node_modules/browserify/test/paths_transform.js deleted file mode 100644 index bd060705..00000000 --- a/node_modules/browserify/test/paths_transform.js +++ /dev/null @@ -1,76 +0,0 @@ -var browserify = require('../'); -var vm = require('vm'); -var test = require('tap').test; - -function ensureTransform(t, buf) { - var srcAsString = (buf||'').toString('utf-8'), - containsAX = srcAsString.indexOf('AX') > -1, - containsAZ = srcAsString.indexOf('AZ') > -1; - t.notOk(containsAX,"should not contain AX's"); - t.ok(containsAZ,"should contain AZ's"); -} - -test('absolute paths with transform property', function (t) { - t.plan(6); - - var b = browserify({ - transform: ['tr'], - basedir: __dirname, - paths: [ __dirname + '/paths/x', __dirname + '/paths/y' ], - entries: __dirname + '/paths/main.js' - }); - b.bundle(function (err, src) { - t.ifError(err); - ensureTransform(t,src); - vm.runInNewContext(src, { t: t }); - }); -}); - -test('relative paths with transform property', function (t) { - t.plan(6); - - var b = browserify({ - transform: ['tr'], - basedir: __dirname, - paths: [ './paths/x', './paths/y' ], - entries: __dirname + '/paths/main.js' - }); - b.bundle(function (err, src) { - t.ifError(err); - ensureTransform(t,src); - vm.runInNewContext(src, { t: t }); - }); -}); - - -test('absolute paths with transform method', function (t) { - t.plan(6); - - var b = browserify({ - basedir: __dirname, - paths: [ __dirname + '/paths/x', __dirname + '/paths/y' ], - entries: __dirname + '/paths/main.js' - }); - b.transform('tr'); - b.bundle(function (err, src) { - t.ifError(err); - ensureTransform(t,src); - vm.runInNewContext(src, { t: t }); - }); -}); - - -test('relative paths with transform method', function (t) { - t.plan(6); - var b = browserify({ - basedir: __dirname, - paths: ['./paths/x', './paths/y' ], - entries: __dirname + '/paths/main.js' - }); - b.transform('tr'); - b.bundle(function (err, src) { - t.ifError(err); - ensureTransform(t,src); - vm.runInNewContext(src, { t: t }); - }); -}); diff --git a/node_modules/browserify/test/pipeline_deps.js b/node_modules/browserify/test/pipeline_deps.js deleted file mode 100644 index 8f847a75..00000000 --- a/node_modules/browserify/test/pipeline_deps.js +++ /dev/null @@ -1,22 +0,0 @@ -var browserify = require('../'); -var vm = require('vm'); -var test = require('tap').test; -var through = require('through2'); - -test('deps pipeline', function (t) { - t.plan(1); - - var b = browserify(__dirname + '/pipeline_deps/main.js'); - b.pipeline.get('deps').push(through.obj(function (row, enc, next) { - row.source = row.source.replace(/111/g, '11111'); - this.push(row); - next(); - })); - - b.bundle(function (err, src) { - Function([ 'console' ], src)({ log: log }); - function log (msg) { - t.equal(msg, 'main: 56055'); - } - }); -}); diff --git a/node_modules/browserify/test/pipeline_deps/bar.js b/node_modules/browserify/test/pipeline_deps/bar.js deleted file mode 100644 index c57fa530..00000000 --- a/node_modules/browserify/test/pipeline_deps/bar.js +++ /dev/null @@ -1,3 +0,0 @@ -module.exports = function (n) { - return n * 100; -}; diff --git a/node_modules/browserify/test/pipeline_deps/foo.js b/node_modules/browserify/test/pipeline_deps/foo.js deleted file mode 100644 index c62e6385..00000000 --- a/node_modules/browserify/test/pipeline_deps/foo.js +++ /dev/null @@ -1,5 +0,0 @@ -var bar = require('./bar'); - -module.exports = function (n) { - return n * 111 + bar(n); -}; diff --git a/node_modules/browserify/test/pipeline_deps/main.js b/node_modules/browserify/test/pipeline_deps/main.js deleted file mode 100644 index 8c71d799..00000000 --- a/node_modules/browserify/test/pipeline_deps/main.js +++ /dev/null @@ -1,2 +0,0 @@ -var foo = require('./foo'); -console.log('main: ' + foo(5)); diff --git a/node_modules/browserify/test/pipeline_deps/xyz.js b/node_modules/browserify/test/pipeline_deps/xyz.js deleted file mode 100644 index dff6877a..00000000 --- a/node_modules/browserify/test/pipeline_deps/xyz.js +++ /dev/null @@ -1,2 +0,0 @@ -var foo = require('./foo'); -console.log('xyz: ' + foo(6)); diff --git a/node_modules/browserify/test/pkg.js b/node_modules/browserify/test/pkg.js deleted file mode 100644 index 753e6d8c..00000000 --- a/node_modules/browserify/test/pkg.js +++ /dev/null @@ -1,20 +0,0 @@ -var browserify = require('../'); -var vm = require('vm'); -var test = require('tap').test; -var path = require('path'); - -var pkg = require('./pkg/package.json'); -pkg.__dirname = path.join(__dirname, 'pkg'); - -test('package', function (t) { - t.plan(2); - - var b = browserify(__dirname + '/pkg/main.js'); - b.on('package', function (pkg_) { - t.deepEqual(pkg_, pkg); - }); - - b.bundle(function (err) { - t.ifError(err); - }); -}); diff --git a/node_modules/browserify/test/pkg/main.js b/node_modules/browserify/test/pkg/main.js deleted file mode 100644 index 07a8fbf2..00000000 --- a/node_modules/browserify/test/pkg/main.js +++ /dev/null @@ -1 +0,0 @@ -console.log(555) diff --git a/node_modules/browserify/test/pkg/package.json b/node_modules/browserify/test/pkg/package.json deleted file mode 100644 index cc806a70..00000000 --- a/node_modules/browserify/test/pkg/package.json +++ /dev/null @@ -1 +0,0 @@ -{ "beep": "boop" } diff --git a/node_modules/browserify/test/pkg_event.js b/node_modules/browserify/test/pkg_event.js deleted file mode 100644 index 77ada96b..00000000 --- a/node_modules/browserify/test/pkg_event.js +++ /dev/null @@ -1,31 +0,0 @@ -var browserify = require('../'); -var path = require('path'); -var vm = require('vm'); -var test = require('tap').test; - -var expected = [ - readpkg('pkg_event'), - readpkg('pkg_event/node_modules/aaa'), - readpkg('pkg_event/node_modules/aaa/lib') -]; - -test('package event', function (t) { - t.plan(2 + expected.length); - - var b = browserify(__dirname + '/pkg_event/main.js'); - b.on('package', function (pkg) { - t.deepEqual(pkg, expected.shift()); - }); - - b.bundle(function (err, src) { - t.ifError(err); - vm.runInNewContext(src, { console: { log: log } }); - function log (msg) { t.equal(msg, 555) } - }); -}); - -function readpkg (dir) { - var pkg = require(path.join(__dirname, dir, 'package.json')); - pkg.__dirname = path.join(__dirname, dir); - return pkg; -} diff --git a/node_modules/browserify/test/pkg_event/main.js b/node_modules/browserify/test/pkg_event/main.js deleted file mode 100644 index bef366ae..00000000 --- a/node_modules/browserify/test/pkg_event/main.js +++ /dev/null @@ -1 +0,0 @@ -console.log(require('aaa')) diff --git a/node_modules/browserify/test/pkg_event/package.json b/node_modules/browserify/test/pkg_event/package.json deleted file mode 100644 index 21d82d8e..00000000 --- a/node_modules/browserify/test/pkg_event/package.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "name": "pkg_event" -} diff --git a/node_modules/browserify/test/plugin.js b/node_modules/browserify/test/plugin.js deleted file mode 100644 index be143a3e..00000000 --- a/node_modules/browserify/test/plugin.js +++ /dev/null @@ -1,28 +0,0 @@ -var browserify = require('../'); -var vm = require('vm'); -var test = require('tap').test; - -test('plugin fn', function (t) { - t.plan(2); - - var b = browserify(__dirname + '/plugin/main.js', { basedir: __dirname }); - b.plugin(function (b_) { - t.equal(b, b_); - }); - - b.bundle(function (err, src) { - t.ifError(err); - }); -}); - -test('plugin module', function (t) { - t.plan(2); - - var b = browserify(__dirname + '/plugin/main.js', { basedir: __dirname }); - b.plugin('plugin-foo', { msg: 'beep boop' }); - - b.bundle(function (err, src) { - t.ifError(err); - t.equal(src.toString('utf8'), 'beep boop'); - }); -}); diff --git a/node_modules/browserify/test/plugin/main.js b/node_modules/browserify/test/plugin/main.js deleted file mode 100644 index 3e842e73..00000000 --- a/node_modules/browserify/test/plugin/main.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = 555 diff --git a/node_modules/browserify/test/process.js b/node_modules/browserify/test/process.js deleted file mode 100644 index 83ffa14f..00000000 --- a/node_modules/browserify/test/process.js +++ /dev/null @@ -1,21 +0,0 @@ -var browserify = require('../'); -var vm = require('vm'); -var test = require('tap').test; - -test('implicit process global', function (t) { - t.plan(2); - - var b = browserify(__dirname + '/process/main.js'); - b.bundle(function (err, src) { - var c = { - done : function (one, two) { - t.equal(one, 1); - t.equal(two, 2); - t.end(); - }, - setTimeout: setTimeout, - clearTimeout: clearTimeout - }; - vm.runInNewContext(src, c); - }); -}); diff --git a/node_modules/browserify/test/process/main.js b/node_modules/browserify/test/process/main.js deleted file mode 100644 index 08955791..00000000 --- a/node_modules/browserify/test/process/main.js +++ /dev/null @@ -1,3 +0,0 @@ -process.nextTick(function () { - done(require('./one'), require('./two')); -}); diff --git a/node_modules/browserify/test/process/one.js b/node_modules/browserify/test/process/one.js deleted file mode 100644 index bd816eab..00000000 --- a/node_modules/browserify/test/process/one.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = 1; diff --git a/node_modules/browserify/test/process/two.js b/node_modules/browserify/test/process/two.js deleted file mode 100644 index 4bbffde1..00000000 --- a/node_modules/browserify/test/process/two.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = 2; diff --git a/node_modules/browserify/test/relative_dedupe.js b/node_modules/browserify/test/relative_dedupe.js deleted file mode 100644 index 5a4a2525..00000000 --- a/node_modules/browserify/test/relative_dedupe.js +++ /dev/null @@ -1,17 +0,0 @@ -var browserify = require('../'); -var vm = require('vm'); -var test = require('tap').test; - -test('relative dedupe', function (t) { - var expected = [ 'a a', 'a b', 'b a', 'b b' ]; - t.plan(expected.length + 1); - - var b = browserify(__dirname + '/relative_dedupe/main.js'); - b.bundle(function (err, src) { - t.ifError(err); - var c = { console: { log: log } }; - vm.runInNewContext(src, c); - }); - - function log (msg) { t.equal(msg, expected.shift()) } -}); diff --git a/node_modules/browserify/test/relative_dedupe/a/a.js b/node_modules/browserify/test/relative_dedupe/a/a.js deleted file mode 100644 index fd6bd949..00000000 --- a/node_modules/browserify/test/relative_dedupe/a/a.js +++ /dev/null @@ -1,3 +0,0 @@ -module.exports = function() { - console.log("a a") -}; diff --git a/node_modules/browserify/test/relative_dedupe/a/b.js b/node_modules/browserify/test/relative_dedupe/a/b.js deleted file mode 100644 index 3bdfe50d..00000000 --- a/node_modules/browserify/test/relative_dedupe/a/b.js +++ /dev/null @@ -1,3 +0,0 @@ -module.exports = function() { - console.log("a b") -}; diff --git a/node_modules/browserify/test/relative_dedupe/a/index.js b/node_modules/browserify/test/relative_dedupe/a/index.js deleted file mode 100644 index 5002ffcb..00000000 --- a/node_modules/browserify/test/relative_dedupe/a/index.js +++ /dev/null @@ -1,4 +0,0 @@ -module.exports = { - a: require("./a"), - b: require("./b") -}; diff --git a/node_modules/browserify/test/relative_dedupe/b/a.js b/node_modules/browserify/test/relative_dedupe/b/a.js deleted file mode 100644 index eb66e54b..00000000 --- a/node_modules/browserify/test/relative_dedupe/b/a.js +++ /dev/null @@ -1,3 +0,0 @@ -module.exports = function() { - console.log("b a") -}; diff --git a/node_modules/browserify/test/relative_dedupe/b/b.js b/node_modules/browserify/test/relative_dedupe/b/b.js deleted file mode 100644 index 94faa628..00000000 --- a/node_modules/browserify/test/relative_dedupe/b/b.js +++ /dev/null @@ -1,3 +0,0 @@ -module.exports = function() { - console.log("b b") -}; diff --git a/node_modules/browserify/test/relative_dedupe/b/index.js b/node_modules/browserify/test/relative_dedupe/b/index.js deleted file mode 100644 index 5002ffcb..00000000 --- a/node_modules/browserify/test/relative_dedupe/b/index.js +++ /dev/null @@ -1,4 +0,0 @@ -module.exports = { - a: require("./a"), - b: require("./b") -}; diff --git a/node_modules/browserify/test/relative_dedupe/index.js b/node_modules/browserify/test/relative_dedupe/index.js deleted file mode 100644 index 69ce41bf..00000000 --- a/node_modules/browserify/test/relative_dedupe/index.js +++ /dev/null @@ -1,4 +0,0 @@ -module.exports = { - a: require("./a"), - b: require("./b") -}; diff --git a/node_modules/browserify/test/relative_dedupe/main.js b/node_modules/browserify/test/relative_dedupe/main.js deleted file mode 100644 index deb93704..00000000 --- a/node_modules/browserify/test/relative_dedupe/main.js +++ /dev/null @@ -1,5 +0,0 @@ -var ix = require('./'); -ix.a.a(); -ix.a.b(); -ix.b.a(); -ix.b.b(); diff --git a/node_modules/browserify/test/require_cache.js b/node_modules/browserify/test/require_cache.js deleted file mode 100644 index 871e0550..00000000 --- a/node_modules/browserify/test/require_cache.js +++ /dev/null @@ -1,19 +0,0 @@ -var vm = require('vm'); -var browserify = require('../'); -var test = require('tap').test; - -test('cached require results', function (t) { - t.plan(1); - - var b = browserify(); - b.require('seq'); - b.bundle(function (err, src) { - var c = {}; - vm.runInNewContext(src, c); - - var seq0 = c.require('seq'); - var seq1 = c.require('seq'); - - t.ok(seq0 === seq1); - }); -}); diff --git a/node_modules/browserify/test/require_expose.js b/node_modules/browserify/test/require_expose.js deleted file mode 100644 index 60f9383f..00000000 --- a/node_modules/browserify/test/require_expose.js +++ /dev/null @@ -1,53 +0,0 @@ -var browserify = require('../'); -var test = require('tap').test; -var vm = require('vm'); - -test('require expose external module', function (t) { - t.plan(2); - - var b = browserify({ basedir: __dirname }); - b.require('beep', { expose: 'bip' }); - b.bundle(function (err, src) { - t.ifError(err); - var c = { }; - vm.runInNewContext(src, c); - t.equal(c.require('bip'), 'boop'); - }) -}); - -test('renaming builtin', function (t) { - t.plan(2); - - var b = browserify({ basedir: __dirname }); - b.require('os', { expose: 'bone' }); - b.bundle(function (err, src) { - t.ifError(err); - var c = { }; - vm.runInNewContext(src, c); - t.equal(c.require('bone').platform(), 'browser'); - }) -}); - -test('exposed modules do not leak across bundles', function (t) { - var bundle1, bundle2; - - bundle1 = browserify(); - bundle1.add(__dirname + '/require_expose/main.js'); - bundle1.require(__dirname + '/require_expose/some_dep.js', { expose: 'foo' }); - - bundle1.bundle(function (err, src) { - if (err) t.fail(err); - - var c = {}; - vm.runInNewContext(src, c); - t.equal(c.foo, 'some_dep'); - - bundle2 = browserify(); - bundle2.add(__dirname + '/require_expose/main.js'); - - bundle2.bundle(function (err) { - t.ok(err && err.message.match(/Cannot find module 'foo'/), 'should fail with missing module'); - t.end(); - }); - }); -}); diff --git a/node_modules/browserify/test/require_expose/main.js b/node_modules/browserify/test/require_expose/main.js deleted file mode 100644 index f99908f6..00000000 --- a/node_modules/browserify/test/require_expose/main.js +++ /dev/null @@ -1 +0,0 @@ -foo = require('foo'); diff --git a/node_modules/browserify/test/require_expose/some_dep.js b/node_modules/browserify/test/require_expose/some_dep.js deleted file mode 100644 index 353c90db..00000000 --- a/node_modules/browserify/test/require_expose/some_dep.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = 'some_dep'; diff --git a/node_modules/browserify/test/reset.js b/node_modules/browserify/test/reset.js deleted file mode 100644 index dad18b3a..00000000 --- a/node_modules/browserify/test/reset.js +++ /dev/null @@ -1,31 +0,0 @@ -var browserify = require('../'); -var vm = require('vm'); -var test = require('tap').test; - -test('reset', function (t) { - t.plan(4); - - var b = browserify(); - b.require('path'); - b.bundle(function (err, src) { - check(err, src); - b.bundle(function (err, src) { - check(err, src); - }); - }); - - function check (err, src) { - t.ifError(err); - var c = { - setTimeout : setTimeout, - clearTimeout : clearTimeout, - console : console - }; - vm.runInNewContext(src, c); - - t.equal( - c.require('path').join('/a', 'b'), - '/a/b' - ); - } -}); diff --git a/node_modules/browserify/test/resolve_exposed.js b/node_modules/browserify/test/resolve_exposed.js deleted file mode 100644 index 0d3efc24..00000000 --- a/node_modules/browserify/test/resolve_exposed.js +++ /dev/null @@ -1,20 +0,0 @@ -var browserify = require('../'); -var vm = require('vm'); -var test = require('tap').test; - -test('resolve exposed files', function (t) { - t.plan(2); - - var b = browserify(__dirname + '/resolve_exposed/main.js', { - basedir: __dirname + '/resolve_exposed' - }); - b.require('./x.js', { expose: 'xyz' }); - b.bundle(function (err, src) { - t.ifError(err); - var c = { console: { log: log } }; - vm.runInNewContext(src, c); - function log (x) { - t.equal(x, 333); - } - }); -}); diff --git a/node_modules/browserify/test/resolve_exposed/main.js b/node_modules/browserify/test/resolve_exposed/main.js deleted file mode 100644 index 08a137dc..00000000 --- a/node_modules/browserify/test/resolve_exposed/main.js +++ /dev/null @@ -1,2 +0,0 @@ -var xyz = require('xyz'); -console.log(xyz * 111); diff --git a/node_modules/browserify/test/resolve_exposed/x.js b/node_modules/browserify/test/resolve_exposed/x.js deleted file mode 100644 index 6887896a..00000000 --- a/node_modules/browserify/test/resolve_exposed/x.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = 3 diff --git a/node_modules/browserify/test/retarget.js b/node_modules/browserify/test/retarget.js deleted file mode 100644 index 7670bc09..00000000 --- a/node_modules/browserify/test/retarget.js +++ /dev/null @@ -1,25 +0,0 @@ -var test = require('tap').test; -var spawn = require('child_process').spawn; -var path = require('path'); -var vm = require('vm'); - -test('retarget with -r', function (t) { - t.plan(2); - - var ps = spawn(process.execPath, [ - path.resolve(__dirname, '../bin/cmd.js'), - '-r', 'beep' - ], { cwd: __dirname }); - var src = ''; - ps.stdout.on('data', function (buf) { src += buf }); - ps.stderr.pipe(process.stderr); - - ps.on('exit', function (code) { - t.equal(code, 0); - - var c = {}; - vm.runInNewContext(src, c); - t.equal(c.require('beep'), 'boop'); - }); - ps.stdin.end(); -}); diff --git a/node_modules/browserify/test/reverse_multi_bundle.js b/node_modules/browserify/test/reverse_multi_bundle.js deleted file mode 100644 index 8d9f8325..00000000 --- a/node_modules/browserify/test/reverse_multi_bundle.js +++ /dev/null @@ -1,47 +0,0 @@ -/** - * To be able to lazy load bundles with script loaders the loaded bundles - * must have access to modules exposed by previous bundles. - * - * In effect this is the same as adding the bundles in reverse order - **/ - -var browserify = require('../'); -var vm = require('vm'); -var test = require('tap').test; - -test('reverse multi bundle', function (t) { - t.plan(5); - - // Main app bundle has the main app code and the shared libarary code - var app = browserify([__dirname + '/reverse_multi_bundle/app.js']) - .external(__dirname + '/reverse_multi_bundle/lazy.js') - .require(__dirname + '/reverse_multi_bundle/shared.js', { expose: true }) - .require(__dirname + '/reverse_multi_bundle/arbitrary.js', {expose: 'not/real'}); - - // Lazily loaded bundle has only its own code even it uses code from the - // shared library. - var lazy = browserify({ - filter: function (id) { - return id !== 'not/real'; - } - }) - .require(__dirname + '/reverse_multi_bundle/lazy.js', { expose: true }) - .external(__dirname + '/reverse_multi_bundle/shared.js') - .external('not/real'); - - - app.bundle(function (err, appSrc) { - if (err) throw err; - lazy.bundle(function(err, lazySrc) { - if (err) throw err; - - var src = appSrc + ';' + lazySrc; - var c = { - setTimeout: setTimeout, - clearTimeout: clearTimeout, - t: t - }; - vm.runInNewContext(src, c); - }); - }); -}); diff --git a/node_modules/browserify/test/reverse_multi_bundle/app.js b/node_modules/browserify/test/reverse_multi_bundle/app.js deleted file mode 100644 index ab6b1014..00000000 --- a/node_modules/browserify/test/reverse_multi_bundle/app.js +++ /dev/null @@ -1,22 +0,0 @@ - -t.equal( - require("./shared")(), 1, - "the main app bundle can already use the shared library" -); - -t.throws(function() { - require("./lazy"); -}, "lazy bundle is not executed yet so the lazy module cannot be required yet"); - -// Use setTimeout as script loader simulator as in real use case this would be -// a call to one. Now we just let the rest of the source code string we build -// to execute. -setTimeout(function() { - // After lazy bundle is executed we can require the lazy.js module - require("./lazy"); - t.equal( - require("./shared")(),3, - "lazy module was able to use shared code" - ); -}, 1); - diff --git a/node_modules/browserify/test/reverse_multi_bundle/arbitrary.js b/node_modules/browserify/test/reverse_multi_bundle/arbitrary.js deleted file mode 100644 index ba7d8721..00000000 --- a/node_modules/browserify/test/reverse_multi_bundle/arbitrary.js +++ /dev/null @@ -1,6 +0,0 @@ -var i = 0; -module.exports = function() { - return ++i; -}; - -// 175e62 diff --git a/node_modules/browserify/test/reverse_multi_bundle/lazy.js b/node_modules/browserify/test/reverse_multi_bundle/lazy.js deleted file mode 100644 index 012cdeb7..00000000 --- a/node_modules/browserify/test/reverse_multi_bundle/lazy.js +++ /dev/null @@ -1,9 +0,0 @@ -t.equal( - require("./shared")(),2, - "lazy.js can use the shared library" -); -t.equal( - require("not/real")(),1, - "lazy.js can use library code with arbitrary names" -); - diff --git a/node_modules/browserify/test/reverse_multi_bundle/shared.js b/node_modules/browserify/test/reverse_multi_bundle/shared.js deleted file mode 100644 index 6bb03fbb..00000000 --- a/node_modules/browserify/test/reverse_multi_bundle/shared.js +++ /dev/null @@ -1,6 +0,0 @@ -var i = 0; -module.exports = function() { - return ++i; -}; - -// 77aa70 diff --git a/node_modules/browserify/test/shebang.js b/node_modules/browserify/test/shebang.js deleted file mode 100644 index 5965ac94..00000000 --- a/node_modules/browserify/test/shebang.js +++ /dev/null @@ -1,11 +0,0 @@ -var browserify = require('../'); -var vm = require('vm'); -var test = require('tap').test; - -test('files with shebangs', function (t) { - t.plan(1); - var b = browserify(__dirname + '/shebang/main.js'); - b.bundle(function (err, src) { - vm.runInNewContext(src, { t: t }); - }); -}); diff --git a/node_modules/browserify/test/shebang/foo.js b/node_modules/browserify/test/shebang/foo.js deleted file mode 100644 index 3ec10cd5..00000000 --- a/node_modules/browserify/test/shebang/foo.js +++ /dev/null @@ -1,2 +0,0 @@ -#!/blah -module.exports = 1234; diff --git a/node_modules/browserify/test/shebang/main.js b/node_modules/browserify/test/shebang/main.js deleted file mode 100644 index eb41711b..00000000 --- a/node_modules/browserify/test/shebang/main.js +++ /dev/null @@ -1,4 +0,0 @@ -#!/usr/bin/env node - -var foo = require('./foo'); -t.equal(foo, 1234); diff --git a/node_modules/browserify/test/standalone.js b/node_modules/browserify/test/standalone.js deleted file mode 100644 index 16c105a7..00000000 --- a/node_modules/browserify/test/standalone.js +++ /dev/null @@ -1,85 +0,0 @@ -var browserify = require('../'); -var vm = require('vm'); -var test = require('tap').test; - -test('standalone', function (t) { - t.plan(3); - - var b = browserify(__dirname + '/standalone/main.js', { - standalone: 'stand-test' - }); - b.bundle(function (err, src) { - t.test('window global', function (t) { - t.plan(2); - var c = { - window: {}, - done : done(t) - }; - vm.runInNewContext(src + 'window.standTest(done)', c); - }); - t.test('CommonJS', function (t) { - t.plan(2); - var exp = {}; - var c = { - module: { exports: exp }, - exports: exp, - done : done(t) - }; - vm.runInNewContext(src + 'module.exports(done)', c); - }); - t.test('RequireJS', function (t) { - t.plan(2); - var c = { - define: function (dependencies, fn) { - fn()(done(t)); - } - }; - c.define.amd = true; - vm.runInNewContext(src, c); - }); - }); -}); - -test('A.B.C standalone', function (t) { - t.plan(3); - - var b = browserify(__dirname + '/standalone/main.js', { - standalone: 'A.B.C' - }); - b.bundle(function (err, src) { - t.test('window global', function (t) { - t.plan(2); - var c = { window: {} }; - vm.runInNewContext(src, c); - c.window.A.B.C(done(t)); - }); - t.test('CommonJS', function (t) { - t.plan(2); - var exp = {}; - var c = { - module: { exports: exp }, - exports: exp - }; - vm.runInNewContext(src, c); - c.module.exports(done(t)); - }); - t.test('RequireJS', function (t) { - t.plan(2); - var c = { - define: function (dependencies, fn) { - fn()(done(t)); - } - }; - c.define.amd = true; - vm.runInNewContext(src, c); - }); - }); -}); - -function done(t) { - return function (one, two) { - t.equal(one, 1); - t.equal(two, 2); - t.end(); - }; -} diff --git a/node_modules/browserify/test/standalone/main.js b/node_modules/browserify/test/standalone/main.js deleted file mode 100644 index 400038d6..00000000 --- a/node_modules/browserify/test/standalone/main.js +++ /dev/null @@ -1,3 +0,0 @@ -module.exports = function (cb) { - cb(require('./one'), require('./two')); -}; \ No newline at end of file diff --git a/node_modules/browserify/test/standalone/one.js b/node_modules/browserify/test/standalone/one.js deleted file mode 100644 index bd816eab..00000000 --- a/node_modules/browserify/test/standalone/one.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = 1; diff --git a/node_modules/browserify/test/standalone/two.js b/node_modules/browserify/test/standalone/two.js deleted file mode 100644 index 4bbffde1..00000000 --- a/node_modules/browserify/test/standalone/two.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = 2; diff --git a/node_modules/browserify/test/standalone_events.js b/node_modules/browserify/test/standalone_events.js deleted file mode 100644 index eb42afb4..00000000 --- a/node_modules/browserify/test/standalone_events.js +++ /dev/null @@ -1,19 +0,0 @@ -var browserify = require('../'); -var test = require('tap').test; - -test('standalone bundle close event', {timeout: 1000}, function (t) { - t.plan(1); - - var ended = false; - - var b = browserify(__dirname + '/standalone/main.js', { - standalone: 'stand-test' - }); - var r = b.bundle(); - r.resume(); - r.on('end', function() { - t.ok(!ended); - ended = true; - t.end(); - }); -}); diff --git a/node_modules/browserify/test/standalone_sourcemap.js b/node_modules/browserify/test/standalone_sourcemap.js deleted file mode 100644 index a11c4542..00000000 --- a/node_modules/browserify/test/standalone_sourcemap.js +++ /dev/null @@ -1,55 +0,0 @@ -var browserify = require('../'); -var fs = require('fs'); -var vm = require('vm'); -var test = require('tap').test; - -test('standalone in debug mode', function (t) { - t.plan(3); - - var main = fs.readFileSync(__dirname + '/standalone/main.js'); - - var b = browserify(__dirname + '/standalone/main.js', { - standalone: 'stand-test', - debug: true - }); - b.bundle(function (err, buf) { - var src = buf.toString('utf8'); - t.test('window global', function (t) { - t.plan(2); - var c = { - window: {}, - done : done(t) - }; - vm.runInNewContext(src + '\nwindow.standTest(done)', c); - }); - t.test('CommonJS', function (t) { - t.plan(2); - var exp = {}; - var c = { - module: { exports: exp }, - exports: exp, - done : done(t) - }; - vm.runInNewContext(src + '\nmodule.exports(done)', c); - }); - t.test('RequireJS', function (t) { - t.plan(2); - var c = { - define: function (dependencies, fn) { - fn()(done(t)); - } - }; - c.define.amd = true; - vm.runInNewContext(src, c); - }); - }); -}); - -function done(t) { - return function (one, two) { - t.equal(one, 1); - t.equal(two, 2); - t.end(); - }; -} - diff --git a/node_modules/browserify/test/stdin.js b/node_modules/browserify/test/stdin.js deleted file mode 100644 index da5415d4..00000000 --- a/node_modules/browserify/test/stdin.js +++ /dev/null @@ -1,35 +0,0 @@ -var test = require('tap').test; -var spawn = require('child_process').spawn; -var concat = require('concat-stream'); -var path = require('path'); -var vm = require('vm'); - -test('stdin', function (t) { - t.plan(2); - - var cwd = process.cwd(); - process.chdir(__dirname); - - var ps = spawn(process.execPath, [ - path.resolve(__dirname, '../bin/cmd.js'), - '-' - ]); - - ps.stdout.pipe(concat(function (body) { - var c = { console: { - log: function (msg) { - t.equal(msg, 'hello'); - } - } }; - vm.runInNewContext(body, c); - })); - ps.stderr.pipe(process.stderr); - - ps.on('exit', function (code) { - t.equal(code, 0); - }); - - ps.stdin.write("console.log('hello')"); - ps.stdin.end(); - -}); diff --git a/node_modules/browserify/test/stream.js b/node_modules/browserify/test/stream.js deleted file mode 100644 index a15a5ee9..00000000 --- a/node_modules/browserify/test/stream.js +++ /dev/null @@ -1,15 +0,0 @@ -var browserify = require('../'); -var vm = require('vm'); -var test = require('tap').test; -var fs = require('fs'); - -test('stream', function (t) { - t.plan(2); - - var stream = fs.createReadStream(__dirname + '/stream/main.js'); - var b = browserify(stream, { basedir: __dirname + '/stream' }); - - b.bundle(function (err, src) { - vm.runInNewContext(src, { t: t }); - }); -}); diff --git a/node_modules/browserify/test/stream/bar.js b/node_modules/browserify/test/stream/bar.js deleted file mode 100644 index 5828b13e..00000000 --- a/node_modules/browserify/test/stream/bar.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('./foo.js') * 4 / 3 diff --git a/node_modules/browserify/test/stream/foo.js b/node_modules/browserify/test/stream/foo.js deleted file mode 100644 index 91238822..00000000 --- a/node_modules/browserify/test/stream/foo.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = 333 diff --git a/node_modules/browserify/test/stream/main.js b/node_modules/browserify/test/stream/main.js deleted file mode 100644 index 33063b27..00000000 --- a/node_modules/browserify/test/stream/main.js +++ /dev/null @@ -1,2 +0,0 @@ -t.equal(require('./foo.js'), 333); -t.equal(require('./bar.js'), 444); diff --git a/node_modules/browserify/test/stream_file.js b/node_modules/browserify/test/stream_file.js deleted file mode 100644 index 100471ce..00000000 --- a/node_modules/browserify/test/stream_file.js +++ /dev/null @@ -1,29 +0,0 @@ -var browserify = require('../'); -var vm = require('vm'); -var test = require('tap').test; -var fs = require('fs'); -var through = require('through2'); -var path = require('path'); - -test('stream file', function (t) { - var expected = {}; - expected[ path.join(__dirname, 'stream/fake.js') ] = true; - expected[ path.join(__dirname, 'stream/bar.js' ) ] = true; - expected[ path.join(__dirname, 'stream/foo.js' ) ] = true; - - t.plan(5); - - var stream = fs.createReadStream(__dirname + '/stream/main.js'); - stream.file = path.join(__dirname, '/stream/fake.js'); - - var b = browserify(stream, { basedir: __dirname + '/stream' }); - b.transform(function (file) { - t.ok(expected[file]); - delete expected[file]; - return through(); - }); - - b.bundle(function (err, src) { - vm.runInNewContext(src, { t: t }); - }); -}); diff --git a/node_modules/browserify/test/subdep.js b/node_modules/browserify/test/subdep.js deleted file mode 100644 index fd58d6ec..00000000 --- a/node_modules/browserify/test/subdep.js +++ /dev/null @@ -1,16 +0,0 @@ -var browserify = require('../'); -var vm = require('vm'); -var test = require('tap').test; - -test('subdep', function (t) { - t.plan(1); - - var b = browserify(); - b.require(__dirname + '/subdep/index.js', { expose: 'subdep' }); - - b.bundle(function (err, src) { - var c = {}; - vm.runInNewContext(src, c); - t.equal(c.require('subdep'), 'zzz'); - }); -}); diff --git a/node_modules/browserify/test/subdep/index.js b/node_modules/browserify/test/subdep/index.js deleted file mode 100644 index f05301b7..00000000 --- a/node_modules/browserify/test/subdep/index.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('qq'); diff --git a/node_modules/browserify/test/subdep/package.json b/node_modules/browserify/test/subdep/package.json deleted file mode 100644 index 518d22aa..00000000 --- a/node_modules/browserify/test/subdep/package.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "dependencies" : { - "qq" : "*" - }, - "main" : "index.js" -} diff --git a/node_modules/browserify/test/symlink_dedupe.js b/node_modules/browserify/test/symlink_dedupe.js deleted file mode 100644 index 00d21d15..00000000 --- a/node_modules/browserify/test/symlink_dedupe.js +++ /dev/null @@ -1,16 +0,0 @@ -var browserify = require('../'); -var vm = require('vm'); -var test = require('tap').test; - -test('hash instances with hashed contexts', function (t) { - t.plan(5); - - var b = browserify(__dirname + '/symlink_dedupe/main.js'); - b.bundle(function (err, buf) { - var c = { t: t }; - var src = buf.toString('utf8'); - t.equal(src.match(RegExp('// FILE F ONE', 'g')).length, 1); - t.equal(src.match(RegExp('// FILE G ONE', 'g')).length, 1); - vm.runInNewContext(src, c); - }); -}); diff --git a/node_modules/browserify/test/symlink_dedupe/main.js b/node_modules/browserify/test/symlink_dedupe/main.js deleted file mode 100644 index 92ff18df..00000000 --- a/node_modules/browserify/test/symlink_dedupe/main.js +++ /dev/null @@ -1,6 +0,0 @@ -var A = require('./one/f.js'); -var B = require('./one/dir/f.js'); -t.equal(A, B); -t.equal(A(), 555); -t.equal(B(), 555); - diff --git a/node_modules/browserify/test/symlink_dedupe/one/f.js b/node_modules/browserify/test/symlink_dedupe/one/f.js deleted file mode 100644 index a315c1e7..00000000 --- a/node_modules/browserify/test/symlink_dedupe/one/f.js +++ /dev/null @@ -1,3 +0,0 @@ -// FILE F ONE -var G = require('./g.js'); -module.exports = function () { return 111 * G }; diff --git a/node_modules/browserify/test/symlink_dedupe/one/g.js b/node_modules/browserify/test/symlink_dedupe/one/g.js deleted file mode 100644 index 83730320..00000000 --- a/node_modules/browserify/test/symlink_dedupe/one/g.js +++ /dev/null @@ -1,2 +0,0 @@ -// FILE G ONE -module.exports = 5 diff --git a/node_modules/browserify/test/syntax_cache.js b/node_modules/browserify/test/syntax_cache.js deleted file mode 100644 index ff2a5dee..00000000 --- a/node_modules/browserify/test/syntax_cache.js +++ /dev/null @@ -1,47 +0,0 @@ -var Seq = require('seq'); -var browserify = require('../'); -var test = require('tap').test; -var shasum = require('shasum'); - -test('syntax cache - valid', function (t) { - t.plan(2); - - var expectedCache = {} - var cacheKey; - - var b = browserify(__dirname + '/syntax_cache/valid.js'); - b.once('dep', function(row) { - cacheKey = shasum(row.source); - expectedCache[cacheKey] = true; - }); - - Seq() - .seq(function() { b.bundle(this); }) - .seq(function() { - t.deepEqual(b._syntaxCache, expectedCache); - b._syntaxCache[cacheKey] = expectedCache[cacheKey] = 'beep'; - b.bundle(function(err, src) { - // if the cache worked, the "cacheKey" - // should not be reset to "true" - t.deepEqual(b._syntaxCache, expectedCache); - }); - }); -}); - -test('syntax cache - skip invalid', function (t) { - t.plan(5); - - var b = browserify(__dirname + '/syntax_cache/invalid.js'); - - Seq() - .seq(function() { b.bundle(this); }) - .catch(function(lastErr) { - t.deepEqual(b._syntaxCache, {}); - t.similar(String(lastErr), /ParseError/); - b.bundle(function(err, src) { - t.deepEqual(b._syntaxCache, {}); - t.similar(String(err), /ParseError/); - t.notEqual(lastErr, err, 'errors should be unique'); - }); - }); -}); diff --git a/node_modules/browserify/test/syntax_cache/invalid.js b/node_modules/browserify/test/syntax_cache/invalid.js deleted file mode 100644 index e85c07cc..00000000 --- a/node_modules/browserify/test/syntax_cache/invalid.js +++ /dev/null @@ -1,2 +0,0 @@ -var x = { -var y = 6; diff --git a/node_modules/browserify/test/syntax_cache/valid.js b/node_modules/browserify/test/syntax_cache/valid.js deleted file mode 100644 index cf4f426f..00000000 --- a/node_modules/browserify/test/syntax_cache/valid.js +++ /dev/null @@ -1,2 +0,0 @@ -var x = {}; -var y = 6; diff --git a/node_modules/browserify/test/tr.js b/node_modules/browserify/test/tr.js deleted file mode 100644 index 69c72488..00000000 --- a/node_modules/browserify/test/tr.js +++ /dev/null @@ -1,28 +0,0 @@ -var browserify = require('../'); -var vm = require('vm'); -var test = require('tap').test; -var through = require('through2'); - -test('function transform', function (t) { - t.plan(7); - - var b = browserify(__dirname + '/tr/main.js'); - b.transform({ global: true }, function (file) { - return through(function (buf, enc, next) { - this.push(String(buf).replace(/ZZZ/g, '1')); - next(); - }); - }); - b.transform(function (file) { - return through(function (buf, enc, next) { - this.push(String(buf) - .replace(/AAA/g, '5') - .replace(/BBB/g, '50') - ); - next(); - }) - }); - b.bundle(function (err, src) { - vm.runInNewContext(src, { t: t }); - }); -}); diff --git a/node_modules/browserify/test/tr/f.js b/node_modules/browserify/test/tr/f.js deleted file mode 100644 index a56a0975..00000000 --- a/node_modules/browserify/test/tr/f.js +++ /dev/null @@ -1,2 +0,0 @@ -t.equal(XYZ, 909); -module.exports = function (x) { return x + BBB } diff --git a/node_modules/browserify/test/tr/main.js b/node_modules/browserify/test/tr/main.js deleted file mode 100644 index 8503c470..00000000 --- a/node_modules/browserify/test/tr/main.js +++ /dev/null @@ -1,9 +0,0 @@ -var f = require('./f.js'); -var m = require('m'); -var g = require('g'); -t.equal(require('./subdir/g.js'), 999); - -t.equal(m(f(AAA)), 555, 'transformation scope'); -t.equal(g(3), 332, 'sub-transformation applied'); -t.equal(typeof GGG, 'undefined', 'GGG leak'); -t.equal(XYZ, 909); diff --git a/node_modules/browserify/test/tr/package.json b/node_modules/browserify/test/tr/package.json deleted file mode 100644 index 6687fa11..00000000 --- a/node_modules/browserify/test/tr/package.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "browserify": { - "transform": [ "xyz" ] - } -} diff --git a/node_modules/browserify/test/tr/subdir/g.js b/node_modules/browserify/test/tr/subdir/g.js deleted file mode 100644 index 047280d0..00000000 --- a/node_modules/browserify/test/tr/subdir/g.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = XYZ + 90; diff --git a/node_modules/browserify/test/tr_args.js b/node_modules/browserify/test/tr_args.js deleted file mode 100644 index ace45304..00000000 --- a/node_modules/browserify/test/tr_args.js +++ /dev/null @@ -1,24 +0,0 @@ -var test = require('tap').test; -var spawn = require('child_process').spawn; -var path = require('path'); -var concat = require('concat-stream'); -var vm = require('vm'); - -test('transform arguments', function (t) { - t.plan(2); - - var ps = spawn(process.execPath, [ - path.resolve(__dirname, '../bin/cmd.js'), - __dirname + '/tr_args/main.js', - '-t', '[', __dirname + '/tr_args/tr.js', '-x', '1', ']' - ]); - - ps.stderr.pipe(process.stderr); - ps.stdout.pipe(concat(function (body) { - vm.runInNewContext(body.toString('utf8'), { t: t }); - })); - - ps.on('exit', function (code) { - t.equal(code, 0); - }); -}); diff --git a/node_modules/browserify/test/tr_args/main.js b/node_modules/browserify/test/tr_args/main.js deleted file mode 100644 index ec448ae8..00000000 --- a/node_modules/browserify/test/tr_args/main.js +++ /dev/null @@ -1 +0,0 @@ -t.equal(XXX * 5, 555); diff --git a/node_modules/browserify/test/tr_args/tr.js b/node_modules/browserify/test/tr_args/tr.js deleted file mode 100644 index 6d0a1a87..00000000 --- a/node_modules/browserify/test/tr_args/tr.js +++ /dev/null @@ -1,12 +0,0 @@ -var through = require('through2'); - -module.exports = function (file, opts) { - var data = ''; - return through(write, end); - - function write (buf, enc, next) { data += buf; next() } - function end () { - this.push(data.replace(/X/g, opts.x)); - this.push(null); - } -}; diff --git a/node_modules/browserify/test/tr_error.js b/node_modules/browserify/test/tr_error.js deleted file mode 100644 index e7d857c0..00000000 --- a/node_modules/browserify/test/tr_error.js +++ /dev/null @@ -1,33 +0,0 @@ -var browserify = require('../'); -var vm = require('vm'); -var test = require('tap').test; -var through = require('through2'); - -test('transform errors errback', function (t) { - t.plan(2); - - var b = browserify(__dirname + '/tr/main.js'); - b.transform(function (file) { - return through(function (buf) { - this.emit('error', new Error('blah')); - }) - }); - b.bundle(function (err, src) { - t.ok(/^blah/.test(err.message)); - t.equal(src, undefined); - }); -}); - -test('transform errors propagate', function (t) { - t.plan(1); - - var b = browserify(__dirname + '/tr/main.js'); - b.transform(function (file) { - return through(function (buf) { - this.emit('error', new Error('blah')); - }); - }); - b.bundle().on('error', function (err) { - t.ok(/^blah/.test(err.message)); - }); -}); diff --git a/node_modules/browserify/test/tr_flags.js b/node_modules/browserify/test/tr_flags.js deleted file mode 100644 index b6bff920..00000000 --- a/node_modules/browserify/test/tr_flags.js +++ /dev/null @@ -1,36 +0,0 @@ -var through = require('through2'); -var browserify = require('../'); -var test = require('tap').test; -var vm = require('vm'); - -test('--debug passed to transforms', function (t) { - var empty = require.resolve('../lib/_empty'); - - t.plan(3); - - [true, false].forEach(function(debug) { - var b = browserify(empty, { debug: debug }); - - b.transform(function(file, opts) { - t.equal(opts._flags.debug, debug, 'debug: ' + debug); - return through(); - }); - - b.bundle(function (err, src) { - if (err) return t.fail(err.message); - }); - }); - - var b = browserify(empty, { debug: true }); - - b.transform({ - _flags: Infinity - }, function(file, opts) { - t.equal(opts._flags, Infinity, 'transform arguents are preserved'); - return through(); - }); - - b.bundle(function(err, src) { - if (err) return t.fail(err.message); - }); -}); diff --git a/node_modules/browserify/test/tr_global.js b/node_modules/browserify/test/tr_global.js deleted file mode 100644 index 941eaf4f..00000000 --- a/node_modules/browserify/test/tr_global.js +++ /dev/null @@ -1,17 +0,0 @@ -var browserify = require('../'); -var vm = require('vm'); -var test = require('tap').test; -var through = require('through2'); - -test('global transform precedence', function (t) { - t.plan(1); - - var b = browserify(__dirname + '/tr_global/main.js', { - basedir: __dirname + '/tr_global' - }); - b.transform('tr', { global: true }); - b.bundle(function (err, src) { - vm.runInNewContext(src, { console: { log: log } }); - function log (msg) { t.equal(msg, 444) } - }); -}); diff --git a/node_modules/browserify/test/tr_global/main.js b/node_modules/browserify/test/tr_global/main.js deleted file mode 100644 index 208d369b..00000000 --- a/node_modules/browserify/test/tr_global/main.js +++ /dev/null @@ -1 +0,0 @@ -console.log(require('x')); diff --git a/node_modules/browserify/test/tr_no_entry.js b/node_modules/browserify/test/tr_no_entry.js deleted file mode 100644 index f41d9ceb..00000000 --- a/node_modules/browserify/test/tr_no_entry.js +++ /dev/null @@ -1,20 +0,0 @@ -var browserify = require('../'); -var test = require('tap').test; -var path = require('path') - -test('transform with no entry files', function (t) { - process.chdir(__dirname); - - t.plan(2); - var b = browserify(); - b.transform('tr'); - b.require(path.join(__dirname, 'tr_no_entry/main.js'), { - expose: 'yoyo' - }); - b.bundle(function (err, body) { - t.ifError(err); - var src = body.toString('utf8') + 'require("yoyo")'; - var con = { log: function (msg) { t.equal(msg, 'ZZZ') } }; - Function('console', src)(con); - }); -}); diff --git a/node_modules/browserify/test/tr_no_entry/main.js b/node_modules/browserify/test/tr_no_entry/main.js deleted file mode 100644 index 3dce9089..00000000 --- a/node_modules/browserify/test/tr_no_entry/main.js +++ /dev/null @@ -1 +0,0 @@ -console.log('XXX'); diff --git a/node_modules/browserify/test/tr_once.js b/node_modules/browserify/test/tr_once.js deleted file mode 100644 index a892189e..00000000 --- a/node_modules/browserify/test/tr_once.js +++ /dev/null @@ -1,21 +0,0 @@ -var browserify = require('../'); -var vm = require('vm'); -var test = require('tap').test; -var through = require('through2'); -var path = require('path'); - -test('transform exactly once', function (t) { - t.plan(3); - - var b = browserify(__dirname + '/tr_once/main.js', { - transform: function (file) { - t.equal(file, path.join(__dirname, 'tr_once/main.js') ); - return through(); - } - }); - b.bundle(function (err, src) { - t.ifError(err); - vm.runInNewContext(src, { console: { log: log } }); - function log (msg) { t.equal(msg, 'wow') } - }); -}); diff --git a/node_modules/browserify/test/tr_once/main.js b/node_modules/browserify/test/tr_once/main.js deleted file mode 100644 index 6036bec6..00000000 --- a/node_modules/browserify/test/tr_once/main.js +++ /dev/null @@ -1 +0,0 @@ -console.log('wow'); diff --git a/node_modules/browserify/test/tr_order.js b/node_modules/browserify/test/tr_order.js deleted file mode 100644 index 020b86e3..00000000 --- a/node_modules/browserify/test/tr_order.js +++ /dev/null @@ -1,23 +0,0 @@ -var browserify = require('../'); -var vm = require('vm'); -var test = require('tap').test; -var through = require('through2'); - -test('function transform', function (t) { - debugger; - t.plan(8); - - var b = browserify(__dirname + '/tr/main.js'); - b.transform({ global: true }, function (file) { - return through(function (buf, enc, next) { - this.push(String(buf).replace(/ZZZ/g, '1')); - next(); - }); - }); - b.transform(__dirname + '/tr_order/replace_aaa'); - b.transform(__dirname + '/tr_order/replace_bbb.js'); - b.bundle(function (err, src) { - t.ifError(err); - vm.runInNewContext(src, { t: t }); - }); -}); diff --git a/node_modules/browserify/test/tr_order/replace_aaa.js b/node_modules/browserify/test/tr_order/replace_aaa.js deleted file mode 100644 index f1af976c..00000000 --- a/node_modules/browserify/test/tr_order/replace_aaa.js +++ /dev/null @@ -1,10 +0,0 @@ -var through = require('through2'); - -module.exports = function(file) { - return through(function (buf, enc, next) { - this.push(String(buf) - .replace(/AAA/g, '5') - ); - next(); - }) -} diff --git a/node_modules/browserify/test/tr_order/replace_bbb.js b/node_modules/browserify/test/tr_order/replace_bbb.js deleted file mode 100644 index cf57725c..00000000 --- a/node_modules/browserify/test/tr_order/replace_bbb.js +++ /dev/null @@ -1,11 +0,0 @@ -var through = require('through2'); - -module.exports = function(file) { - return through(function (buf, enc, next) { - this.push(String(buf) - .replace(/AAA/g, '6') - .replace(/BBB/g, '50') - ); - next(); - }) -} diff --git a/node_modules/browserify/test/tr_symlink.js b/node_modules/browserify/test/tr_symlink.js deleted file mode 100644 index c02d9c44..00000000 --- a/node_modules/browserify/test/tr_symlink.js +++ /dev/null @@ -1,21 +0,0 @@ -// based on this scenario: -// https://github.com/substack/node-browserify/pull/831#issuecomment-49546902 - -var browserify = require('../'); -var vm = require('vm'); -var test = require('tap').test; -var through = require('through2'); - -test('transform symlink', function (t) { - t.plan(3); - var expected = [ 9, 555 ]; - var b = browserify(__dirname + '/tr_symlink/app/main.js', { - basedir: __dirname + '/tr_symlink/app' - }); - b.bundle(function (err, src) { - t.ifError(err); - var c = { console: { log: log } }; - vm.runInNewContext(src, c); - function log (msg) { t.equal(msg, expected.shift()) } - }); -}); diff --git a/node_modules/browserify/test/tr_symlink/a-module/index.js b/node_modules/browserify/test/tr_symlink/a-module/index.js deleted file mode 100644 index 3e842e73..00000000 --- a/node_modules/browserify/test/tr_symlink/a-module/index.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = 555 diff --git a/node_modules/browserify/test/tr_symlink/app/main.js b/node_modules/browserify/test/tr_symlink/app/main.js deleted file mode 100644 index 196452e5..00000000 --- a/node_modules/browserify/test/tr_symlink/app/main.js +++ /dev/null @@ -1,4 +0,0 @@ -var a = require('aaa'); - -console.log(5); -console.log(a); diff --git a/node_modules/browserify/test/tr_symlink/app/package.json b/node_modules/browserify/test/tr_symlink/app/package.json deleted file mode 100644 index 2f2bbfff..00000000 --- a/node_modules/browserify/test/tr_symlink/app/package.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "browserify": { - "transform": [ "tr" ] - } -} diff --git a/node_modules/browserify/test/unicode.js b/node_modules/browserify/test/unicode.js deleted file mode 100644 index 2b68515e..00000000 --- a/node_modules/browserify/test/unicode.js +++ /dev/null @@ -1,19 +0,0 @@ -var browserify = require('../'); -var vm = require('vm'); -var test = require('tap').test; - -test('unicode entry', function (t) { - t.plan(2); - - var b = browserify(__dirname + '/unicode/main.js'); - b.bundle(function (err, src) { - var c = { - done : function (one, two) { - t.equal(one, 1); - t.equal(two, 2); - t.end(); - } - }; - vm.runInNewContext(src, c); - }); -}); diff --git a/node_modules/browserify/test/unicode/main.js b/node_modules/browserify/test/unicode/main.js deleted file mode 100644 index 89bb8a03..00000000 --- a/node_modules/browserify/test/unicode/main.js +++ /dev/null @@ -1 +0,0 @@ -done(require('./one'), require('./two')); \ No newline at end of file diff --git a/node_modules/browserify/test/unicode/one.js b/node_modules/browserify/test/unicode/one.js deleted file mode 100644 index bd816eab..00000000 --- a/node_modules/browserify/test/unicode/one.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = 1; diff --git a/node_modules/browserify/test/unicode/two.js b/node_modules/browserify/test/unicode/two.js deleted file mode 100644 index 4bbffde1..00000000 --- a/node_modules/browserify/test/unicode/two.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = 2; diff --git a/node_modules/browserify/test/util.js b/node_modules/browserify/test/util.js deleted file mode 100644 index 760acf1e..00000000 --- a/node_modules/browserify/test/util.js +++ /dev/null @@ -1,62 +0,0 @@ -var browserify = require('../'); -var test = require('tap').test; -var util = require('util'); -var vm = require('vm'); - -test('util.inspect', function (t) { - t.plan(1); - - var b = browserify(); - b.require('util'); - b.bundle(function (err ,src) { - var c = {}; - vm.runInNewContext(src, c); - t.equal( - c.require('util').inspect([1,2,3]), - util.inspect([1,2,3]) - ); - }); -}); - -test('util.inherits', function (t) { - t.plan(2); - - var b = browserify(); - b.require('util'); - b.require('events'); - - b.bundle(function (err, src) { - var c = {}; - vm.runInNewContext(src, c); - var EE = c.require('events').EventEmitter; - - function Beep () {} - c.require('util').inherits(Beep, EE); - var beep = new Beep; - - t.ok(beep instanceof Beep); - t.ok(beep instanceof EE); - }); -}); - -test('util.inherits without Object.create', function (t) { - t.plan(2); - var b = browserify(); - b.require('util'); - b.require('events'); - - b.bundle(function (err, src) { - var c = { Object : { prototype: Object.prototype } }; - vm.runInNewContext(src, c); - var EE = c.require('events').EventEmitter; - - function Beep () {} - Beep.prototype = {}; - - c.require('util').inherits(Beep, EE); - var beep = new Beep; - - t.ok(beep instanceof Beep); - t.ok(beep instanceof EE); - }); -}); diff --git a/node_modules/browserify/test/yield.js b/node_modules/browserify/test/yield.js deleted file mode 100644 index 666c0e28..00000000 --- a/node_modules/browserify/test/yield.js +++ /dev/null @@ -1,20 +0,0 @@ -var browserify = require('../'); -var test = require('tap').test; -var vm = require('vm'); - -test('yield', function (t) { - t.plan(6); - var b = browserify(__dirname + '/yield/main.js'); - b.transform('es6ify'); - - b.bundle(function (err, src) { - t.error(err); - var c = { console: { log: log } }; - var index = 0; - vm.runInNewContext(src, c); - - function log (msg) { - t.equal(index++, msg); - } - }); -}); diff --git a/node_modules/browserify/test/yield/f.js b/node_modules/browserify/test/yield/f.js deleted file mode 100644 index 8bb123b8..00000000 --- a/node_modules/browserify/test/yield/f.js +++ /dev/null @@ -1,5 +0,0 @@ -module.exports = function *() { - for (var i = 0; i < 5; i++) { - yield i; - } -} diff --git a/node_modules/browserify/test/yield/main.js b/node_modules/browserify/test/yield/main.js deleted file mode 100644 index 5a2e6bbb..00000000 --- a/node_modules/browserify/test/yield/main.js +++ /dev/null @@ -1,4 +0,0 @@ -var f = require('./f.js')(); -for (var r = f.next(); !r.done; r = f.next()) { - console.log(r.value); -} diff --git a/node_modules/buffer-equal-constant-time/.npmignore b/node_modules/buffer-equal-constant-time/.npmignore deleted file mode 100644 index 34e4f5c2..00000000 --- a/node_modules/buffer-equal-constant-time/.npmignore +++ /dev/null @@ -1,2 +0,0 @@ -.*.sw[mnop] -node_modules/ diff --git a/node_modules/buffer-equal-constant-time/.travis.yml b/node_modules/buffer-equal-constant-time/.travis.yml deleted file mode 100644 index 78e1c014..00000000 --- a/node_modules/buffer-equal-constant-time/.travis.yml +++ /dev/null @@ -1,4 +0,0 @@ -language: node_js -node_js: -- "0.11" -- "0.10" diff --git a/node_modules/buffer-equal-constant-time/LICENSE.txt b/node_modules/buffer-equal-constant-time/LICENSE.txt deleted file mode 100644 index 9a064f3f..00000000 --- a/node_modules/buffer-equal-constant-time/LICENSE.txt +++ /dev/null @@ -1,12 +0,0 @@ -Copyright (c) 2013, GoInstant Inc., a salesforce.com company -All rights reserved. - -Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - -* Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. - -* Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. - -* Neither the name of salesforce.com, nor GoInstant, nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/node_modules/buffer-equal-constant-time/README.md b/node_modules/buffer-equal-constant-time/README.md deleted file mode 100644 index 4f227f58..00000000 --- a/node_modules/buffer-equal-constant-time/README.md +++ /dev/null @@ -1,50 +0,0 @@ -# buffer-equal-constant-time - -Constant-time `Buffer` comparison for node.js. Should work with browserify too. - -[![Build Status](https://travis-ci.org/goinstant/buffer-equal-constant-time.png?branch=master)](https://travis-ci.org/goinstant/buffer-equal-constant-time) - -```sh - npm install buffer-equal-constant-time -``` - -# Usage - -```js - var bufferEq = require('buffer-equal-constant-time'); - - var a = new Buffer('asdf'); - var b = new Buffer('asdf'); - if (bufferEq(a,b)) { - // the same! - } else { - // different in at least one byte! - } -``` - -If you'd like to install an `.equal()` method onto the node.js `Buffer` and -`SlowBuffer` prototypes: - -```js - require('buffer-equal-constant-time').install(); - - var a = new Buffer('asdf'); - var b = new Buffer('asdf'); - if (a.equal(b)) { - // the same! - } else { - // different in at least one byte! - } -``` - -To get rid of the installed `.equal()` method, call `.restore()`: - -```js - require('buffer-equal-constant-time').restore(); -``` - -# Legal - -© 2013 GoInstant Inc., a salesforce.com company - -Licensed under the BSD 3-clause license. diff --git a/node_modules/buffer-equal-constant-time/index.js b/node_modules/buffer-equal-constant-time/index.js deleted file mode 100644 index 5462c1f8..00000000 --- a/node_modules/buffer-equal-constant-time/index.js +++ /dev/null @@ -1,41 +0,0 @@ -/*jshint node:true */ -'use strict'; -var Buffer = require('buffer').Buffer; // browserify -var SlowBuffer = require('buffer').SlowBuffer; - -module.exports = bufferEq; - -function bufferEq(a, b) { - - // shortcutting on type is necessary for correctness - if (!Buffer.isBuffer(a) || !Buffer.isBuffer(b)) { - return false; - } - - // buffer sizes should be well-known information, so despite this - // shortcutting, it doesn't leak any information about the *contents* of the - // buffers. - if (a.length !== b.length) { - return false; - } - - var c = 0; - for (var i = 0; i < a.length; i++) { - /*jshint bitwise:false */ - c |= a[i] ^ b[i]; // XOR - } - return c === 0; -} - -bufferEq.install = function() { - Buffer.prototype.equal = SlowBuffer.prototype.equal = function equal(that) { - return bufferEq(this, that); - }; -}; - -var origBufEqual = Buffer.prototype.equal; -var origSlowBufEqual = SlowBuffer.prototype.equal; -bufferEq.restore = function() { - Buffer.prototype.equal = origBufEqual; - SlowBuffer.prototype.equal = origSlowBufEqual; -}; diff --git a/node_modules/buffer-equal-constant-time/package.json b/node_modules/buffer-equal-constant-time/package.json deleted file mode 100644 index 472deb0b..00000000 --- a/node_modules/buffer-equal-constant-time/package.json +++ /dev/null @@ -1,87 +0,0 @@ -{ - "_args": [ - [ - { - "raw": "buffer-equal-constant-time@^1.0.1", - "scope": null, - "escapedName": "buffer-equal-constant-time", - "name": "buffer-equal-constant-time", - "rawSpec": "^1.0.1", - "spec": ">=1.0.1 <2.0.0", - "type": "range" - }, - "/Users/benjaminarias/Desktop/poly/node_modules/jwa" - ] - ], - "_from": "buffer-equal-constant-time@>=1.0.1 <2.0.0", - "_id": "buffer-equal-constant-time@1.0.1", - "_inCache": true, - "_installable": true, - "_location": "/buffer-equal-constant-time", - "_npmUser": { - "name": "goinstant", - "email": "support@goinstant.com" - }, - "_npmVersion": "1.3.11", - "_phantomChildren": {}, - "_requested": { - "raw": "buffer-equal-constant-time@^1.0.1", - "scope": null, - "escapedName": "buffer-equal-constant-time", - "name": "buffer-equal-constant-time", - "rawSpec": "^1.0.1", - "spec": ">=1.0.1 <2.0.0", - "type": "range" - }, - "_requiredBy": [ - "/jwa" - ], - "_resolved": "https://registry.npmjs.org/buffer-equal-constant-time/-/buffer-equal-constant-time-1.0.1.tgz", - "_shasum": "f8e71132f7ffe6e01a5c9697a4c6f3e48d5cc819", - "_shrinkwrap": null, - "_spec": "buffer-equal-constant-time@^1.0.1", - "_where": "/Users/benjaminarias/Desktop/poly/node_modules/jwa", - "author": { - "name": "GoInstant Inc., a salesforce.com company" - }, - "bugs": { - "url": "https://github.com/goinstant/buffer-equal-constant-time/issues" - }, - "dependencies": {}, - "description": "Constant-time comparison of Buffers", - "devDependencies": { - "mocha": "~1.15.1" - }, - "directories": {}, - "dist": { - "shasum": "f8e71132f7ffe6e01a5c9697a4c6f3e48d5cc819", - "tarball": "https://registry.npmjs.org/buffer-equal-constant-time/-/buffer-equal-constant-time-1.0.1.tgz" - }, - "homepage": "https://github.com/goinstant/buffer-equal-constant-time#readme", - "keywords": [ - "buffer", - "equal", - "constant-time", - "crypto" - ], - "license": "BSD-3-Clause", - "main": "index.js", - "maintainers": [ - { - "name": "goinstant", - "email": "support@goinstant.com" - } - ], - "name": "buffer-equal-constant-time", - "optionalDependencies": {}, - "readme": "# buffer-equal-constant-time\n\nConstant-time `Buffer` comparison for node.js. Should work with browserify too.\n\n[![Build Status](https://travis-ci.org/goinstant/buffer-equal-constant-time.png?branch=master)](https://travis-ci.org/goinstant/buffer-equal-constant-time)\n\n```sh\n npm install buffer-equal-constant-time\n```\n\n# Usage\n\n```js\n var bufferEq = require('buffer-equal-constant-time');\n\n var a = new Buffer('asdf');\n var b = new Buffer('asdf');\n if (bufferEq(a,b)) {\n // the same!\n } else {\n // different in at least one byte!\n }\n```\n\nIf you'd like to install an `.equal()` method onto the node.js `Buffer` and\n`SlowBuffer` prototypes:\n\n```js\n require('buffer-equal-constant-time').install();\n\n var a = new Buffer('asdf');\n var b = new Buffer('asdf');\n if (a.equal(b)) {\n // the same!\n } else {\n // different in at least one byte!\n }\n```\n\nTo get rid of the installed `.equal()` method, call `.restore()`:\n\n```js\n require('buffer-equal-constant-time').restore();\n```\n\n# Legal\n\n© 2013 GoInstant Inc., a salesforce.com company\n\nLicensed under the BSD 3-clause license.\n", - "readmeFilename": "README.md", - "repository": { - "type": "git", - "url": "git+ssh://git@github.com/goinstant/buffer-equal-constant-time.git" - }, - "scripts": { - "test": "mocha test.js" - }, - "version": "1.0.1" -} diff --git a/node_modules/buffer-equal-constant-time/test.js b/node_modules/buffer-equal-constant-time/test.js deleted file mode 100644 index 0bc972d8..00000000 --- a/node_modules/buffer-equal-constant-time/test.js +++ /dev/null @@ -1,42 +0,0 @@ -/*jshint node:true */ -'use strict'; - -var bufferEq = require('./index'); -var assert = require('assert'); - -describe('buffer-equal-constant-time', function() { - var a = new Buffer('asdfasdf123456'); - var b = new Buffer('asdfasdf123456'); - var c = new Buffer('asdfasdf'); - - describe('bufferEq', function() { - it('says a == b', function() { - assert.strictEqual(bufferEq(a, b), true); - }); - - it('says a != c', function() { - assert.strictEqual(bufferEq(a, c), false); - }); - }); - - describe('install/restore', function() { - before(function() { - bufferEq.install(); - }); - after(function() { - bufferEq.restore(); - }); - - it('installed an .equal method', function() { - var SlowBuffer = require('buffer').SlowBuffer; - assert.ok(Buffer.prototype.equal); - assert.ok(SlowBuffer.prototype.equal); - }); - - it('infected existing Buffers', function() { - assert.strictEqual(a.equal(b), true); - assert.strictEqual(a.equal(c), false); - }); - }); - -}); diff --git a/node_modules/buffer-xor/.npmignore b/node_modules/buffer-xor/.npmignore deleted file mode 100644 index 3c3629e6..00000000 --- a/node_modules/buffer-xor/.npmignore +++ /dev/null @@ -1 +0,0 @@ -node_modules diff --git a/node_modules/buffer-xor/.travis.yml b/node_modules/buffer-xor/.travis.yml deleted file mode 100644 index d9f695b7..00000000 --- a/node_modules/buffer-xor/.travis.yml +++ /dev/null @@ -1,9 +0,0 @@ -language: node_js -before_install: - - "npm install npm -g" -node_js: - - "0.12" -env: - - TEST_SUITE=standard - - TEST_SUITE=unit -script: "npm run-script $TEST_SUITE" diff --git a/node_modules/buffer-xor/LICENSE b/node_modules/buffer-xor/LICENSE deleted file mode 100644 index bba52181..00000000 --- a/node_modules/buffer-xor/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2015 Daniel Cousens - -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/node_modules/buffer-xor/README.md b/node_modules/buffer-xor/README.md deleted file mode 100644 index 007f0582..00000000 --- a/node_modules/buffer-xor/README.md +++ /dev/null @@ -1,41 +0,0 @@ -# buffer-xor - -[![TRAVIS](https://secure.travis-ci.org/crypto-browserify/buffer-xor.png)](http://travis-ci.org/crypto-browserify/buffer-xor) -[![NPM](http://img.shields.io/npm/v/buffer-xor.svg)](https://www.npmjs.org/package/buffer-xor) - -[![js-standard-style](https://cdn.rawgit.com/feross/standard/master/badge.svg)](https://github.com/feross/standard) - -A simple module for bitwise-xor on buffers. - - -## Examples - -``` javascript -var xor = require("buffer-xor") -var a = new Buffer('00ff0f', 'hex') -var b = new Buffer('f0f0', 'hex') - -console.log(xor(a, b)) -// => -``` - - -Or for those seeking those few extra cycles, perform the operation in place: - -``` javascript -var xorInplace = require("buffer-xor/inplace") -var a = new Buffer('00ff0f', 'hex') -var b = new Buffer('f0f0', 'hex') - -console.log(xorInplace(a, b)) -// => -// NOTE: xorInplace will return the shorter slice of its parameters - -// See that a has been mutated -console.log(a) -// => -``` - - -## License [MIT](LICENSE) - diff --git a/node_modules/buffer-xor/index.js b/node_modules/buffer-xor/index.js deleted file mode 100644 index 85ee6f63..00000000 --- a/node_modules/buffer-xor/index.js +++ /dev/null @@ -1,10 +0,0 @@ -module.exports = function xor (a, b) { - var length = Math.min(a.length, b.length) - var buffer = new Buffer(length) - - for (var i = 0; i < length; ++i) { - buffer[i] = a[i] ^ b[i] - } - - return buffer -} diff --git a/node_modules/buffer-xor/inline.js b/node_modules/buffer-xor/inline.js deleted file mode 100644 index 87975703..00000000 --- a/node_modules/buffer-xor/inline.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('./inplace') diff --git a/node_modules/buffer-xor/inplace.js b/node_modules/buffer-xor/inplace.js deleted file mode 100644 index d71c172c..00000000 --- a/node_modules/buffer-xor/inplace.js +++ /dev/null @@ -1,9 +0,0 @@ -module.exports = function xorInplace (a, b) { - var length = Math.min(a.length, b.length) - - for (var i = 0; i < length; ++i) { - a[i] = a[i] ^ b[i] - } - - return a.slice(0, length) -} diff --git a/node_modules/buffer-xor/package.json b/node_modules/buffer-xor/package.json deleted file mode 100644 index bd0aa7b2..00000000 --- a/node_modules/buffer-xor/package.json +++ /dev/null @@ -1,97 +0,0 @@ -{ - "_args": [ - [ - { - "raw": "buffer-xor@^1.0.2", - "scope": null, - "escapedName": "buffer-xor", - "name": "buffer-xor", - "rawSpec": "^1.0.2", - "spec": ">=1.0.2 <2.0.0", - "type": "range" - }, - "/Users/benjaminarias/Desktop/poly/node_modules/browserify-aes" - ] - ], - "_from": "buffer-xor@>=1.0.2 <2.0.0", - "_id": "buffer-xor@1.0.3", - "_inCache": true, - "_installable": true, - "_location": "/buffer-xor", - "_nodeVersion": "4.1.1", - "_npmUser": { - "name": "dcousens", - "email": "email@dcousens.com" - }, - "_npmVersion": "3.3.3", - "_phantomChildren": {}, - "_requested": { - "raw": "buffer-xor@^1.0.2", - "scope": null, - "escapedName": "buffer-xor", - "name": "buffer-xor", - "rawSpec": "^1.0.2", - "spec": ">=1.0.2 <2.0.0", - "type": "range" - }, - "_requiredBy": [ - "/browserify-aes" - ], - "_resolved": "https://registry.npmjs.org/buffer-xor/-/buffer-xor-1.0.3.tgz", - "_shasum": "26e61ed1422fb70dd42e6e36729ed51d855fe8d9", - "_shrinkwrap": null, - "_spec": "buffer-xor@^1.0.2", - "_where": "/Users/benjaminarias/Desktop/poly/node_modules/browserify-aes", - "author": { - "name": "Daniel Cousens" - }, - "bugs": { - "url": "https://github.com/crypto-browserify/buffer-xor/issues" - }, - "dependencies": {}, - "description": "A simple module for bitwise-xor on buffers", - "devDependencies": { - "mocha": "*", - "standard": "*" - }, - "directories": {}, - "dist": { - "shasum": "26e61ed1422fb70dd42e6e36729ed51d855fe8d9", - "tarball": "https://registry.npmjs.org/buffer-xor/-/buffer-xor-1.0.3.tgz" - }, - "gitHead": "8f92b79a8b8133c26a7ae1af09b2c84ec6e3f426", - "homepage": "https://github.com/crypto-browserify/buffer-xor", - "keywords": [ - "bits", - "bitwise", - "buffer", - "buffer-xor", - "crypto", - "inline", - "math", - "memory", - "performance", - "xor" - ], - "license": "MIT", - "main": "index.js", - "maintainers": [ - { - "name": "dcousens", - "email": "email@dcousens.com" - } - ], - "name": "buffer-xor", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git+https://github.com/crypto-browserify/buffer-xor.git" - }, - "scripts": { - "standard": "standard", - "test": "npm run-script unit", - "unit": "mocha" - }, - "version": "1.0.3" -} diff --git a/node_modules/buffer-xor/test/fixtures.json b/node_modules/buffer-xor/test/fixtures.json deleted file mode 100644 index 6f3431ef..00000000 --- a/node_modules/buffer-xor/test/fixtures.json +++ /dev/null @@ -1,23 +0,0 @@ -[ - { - "a": "000f", - "b": "f0ff", - "expected": "f0f0" - }, - { - "a": "000f0f", - "b": "f0ff", - "mutated": "f0f00f", - "expected": "f0f0" - }, - { - "a": "000f", - "b": "f0ffff", - "expected": "f0f0" - }, - { - "a": "000000", - "b": "000000", - "expected": "000000" - } -] diff --git a/node_modules/buffer-xor/test/index.js b/node_modules/buffer-xor/test/index.js deleted file mode 100644 index 06eacab4..00000000 --- a/node_modules/buffer-xor/test/index.js +++ /dev/null @@ -1,38 +0,0 @@ -/* global describe, it */ - -var assert = require('assert') -var xor = require('../') -var xorInplace = require('../inplace') -var fixtures = require('./fixtures') - -describe('xor', function () { - fixtures.forEach(function (f) { - it('returns ' + f.expected + ' for ' + f.a + '/' + f.b, function () { - var a = new Buffer(f.a, 'hex') - var b = new Buffer(f.b, 'hex') - var actual = xor(a, b) - - assert.equal(actual.toString('hex'), f.expected) - - // a/b unchanged - assert.equal(a.toString('hex'), f.a) - assert.equal(b.toString('hex'), f.b) - }) - }) -}) - -describe('xor/inplace', function () { - fixtures.forEach(function (f) { - it('returns ' + f.expected + ' for ' + f.a + '/' + f.b, function () { - var a = new Buffer(f.a, 'hex') - var b = new Buffer(f.b, 'hex') - var actual = xorInplace(a, b) - - assert.equal(actual.toString('hex'), f.expected) - - // a mutated, b unchanged - assert.equal(a.toString('hex'), f.mutated || f.expected) - assert.equal(b.toString('hex'), f.b) - }) - }) -}) diff --git a/node_modules/buffer/.npmignore b/node_modules/buffer/.npmignore deleted file mode 100644 index 4cea1824..00000000 --- a/node_modules/buffer/.npmignore +++ /dev/null @@ -1 +0,0 @@ -perf/ diff --git a/node_modules/buffer/.travis.yml b/node_modules/buffer/.travis.yml deleted file mode 100644 index abf846f5..00000000 --- a/node_modules/buffer/.travis.yml +++ /dev/null @@ -1,8 +0,0 @@ -language: node_js -node_js: - - '4' -sudo: false -env: - global: - - secure: AUsK+8fYSpwIMHcVt8Mu9SpG9RPHp4XDAwCQfpU3d5U65q8OVVC6C+XjvnNmEd2PoEJRHem8ZXEyRVfGM1sttKZLZP70TEKZOpOiRQnZiTQCAJ92TfGsDj/F4LoWSjUZUpfeg9b3iSp8G5dVw3+q9QZPIu6eykASK6bfcg//Cyg= - - secure: eQBKJWu7XbhAN4ZvOOhMenC0IPpoYj+wZVVzzsLwUppfJqlrHV0CUW8rJdvZNiaGhYhoyHTnAcynpTE5kZfg3XjevOvF8PGY5wUYCki9BI+rp+pvVPZE/DNUAQpFR2gd2nxMJ4kYv7GVb6i/DfuqJa0h8IuY4zcMuKWwbQd3Az8= diff --git a/node_modules/buffer/.zuul.yml b/node_modules/buffer/.zuul.yml deleted file mode 100644 index a0b4b39a..00000000 --- a/node_modules/buffer/.zuul.yml +++ /dev/null @@ -1,22 +0,0 @@ -ui: tape -scripts: - - "./test/_polyfill.js" -browsers: - - name: chrome - version: -2..latest - - name: firefox - version: -2..latest - - name: safari - version: [6, 7, 8, 9..latest] - - name: ie - version: 8..latest - - name: microsoftedge - version: 20..latest - - name: opera - version: 11..latest - - name: iphone - version: [5.1, 6.1, 7.1, 8.4, 9.1..latest] - - name: ipad - version: [5.1, 6.1, 7.1, 8.4, 9.1..latest] - - name: android - version: 4.0..latest diff --git a/node_modules/buffer/LICENSE b/node_modules/buffer/LICENSE deleted file mode 100644 index d6bf75dc..00000000 --- a/node_modules/buffer/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) Feross Aboukhadijeh, and other contributors. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/node_modules/buffer/README.md b/node_modules/buffer/README.md deleted file mode 100644 index 671607f3..00000000 --- a/node_modules/buffer/README.md +++ /dev/null @@ -1,364 +0,0 @@ -# buffer [![travis][travis-image]][travis-url] [![npm][npm-image]][npm-url] [![downloads][downloads-image]][npm-url] - -#### The buffer module from [node.js](http://nodejs.org/), for the browser. - -[![saucelabs][saucelabs-image]][saucelabs-url] - -[travis-image]: https://img.shields.io/travis/feross/buffer.svg?style=flat -[travis-url]: https://travis-ci.org/feross/buffer -[npm-image]: https://img.shields.io/npm/v/buffer.svg?style=flat -[npm-url]: https://npmjs.org/package/buffer -[downloads-image]: https://img.shields.io/npm/dm/buffer.svg?style=flat -[saucelabs-image]: https://saucelabs.com/browser-matrix/buffer.svg -[saucelabs-url]: https://saucelabs.com/u/buffer - -With [browserify](http://browserify.org), simply `require('buffer')` or use the `Buffer` global and you will get this module. - -The goal is to provide an API that is 100% identical to -[node's Buffer API](http://iojs.org/api/buffer.html). Read the -[official docs](http://iojs.org/api/buffer.html) for the full list of properties, -instance methods, and class methods that are supported. - -## features - -- Manipulate binary data like a boss, in all browsers -- even IE6! -- Super fast. Backed by Typed Arrays (`Uint8Array`/`ArrayBuffer`, not `Object`) -- Extremely small bundle size (**5.04KB minified + gzipped**, 35.5KB with comments) -- Excellent browser support (IE 6+, Chrome 4+, Firefox 3+, Safari 5.1+, Opera 11+, iOS, etc.) -- Preserves Node API exactly, with one important difference (see below) -- `.slice()` returns instances of the same type (Buffer) -- Square-bracket `buf[4]` notation works, even in old browsers like IE6! -- Does not modify any browser prototypes or put anything on `window` -- Comprehensive test suite (including all buffer tests from node.js core) - - -## install - -To use this module directly (without browserify), install it: - -```bash -npm install buffer -``` - -This module was previously called **native-buffer-browserify**, but please use **buffer** -from now on. - -A standalone bundle is available [here](https://wzrd.in/standalone/buffer), for non-browserify users. - - -## usage - -The module's API is identical to node's `Buffer` API. Read the -[official docs](http://iojs.org/api/buffer.html) for the full list of properties, -instance methods, and class methods that are supported. - -As mentioned above, `require('buffer')` or use the `Buffer` global with -[browserify](http://browserify.org) and this module will automatically be included -in your bundle. Almost any npm module will work in the browser, even if it assumes that -the node `Buffer` API will be available. - -To depend on this module explicitly (without browserify), require it like this: - -```js -var Buffer = require('buffer/').Buffer // note: the trailing slash is important! -``` - -To require this module explicitly, use `require('buffer/')` which tells the node.js module -lookup algorithm (also used by browserify) to use the **npm module** named `buffer` -instead of the **node.js core** module named `buffer`! - - -## how does it work? - -`Buffer` is a subclass of `Uint8Array` augmented with all the `Buffer` API methods. -The `Uint8Array` prototype is not modified. - - -## one minor difference - -#### In old browsers, `buf.slice()` does not modify parent buffer's memory - -If you only support modern browsers (specifically, those with typed array support), -then this issue does not affect you. If you support super old browsers, then read on. - -In node, the `slice()` method returns a new `Buffer` that shares underlying memory -with the original Buffer. When you modify one buffer, you modify the other. -[Read more.](http://iojs.org/api/buffer.html#buffer_buf_slice_start_end) - -In browsers with typed array support, this `Buffer` implementation supports this -behavior. In browsers without typed arrays, an alternate buffer implementation is -used that is based on `Object` which has no mechanism to point separate -`Buffer`s to the same underlying slab of memory. - -You can see which browser versions lack typed array support -[here](https://github.com/feross/buffer/blob/master/index.js#L20-L46). - - -## tracking the latest node api - -This module tracks the Buffer API in the latest (unstable) version of node.js. The Buffer -API is considered **stable** in the -[node stability index](http://nodejs.org/docs/latest/api/documentation.html#documentation_stability_index), -so it is unlikely that there will ever be breaking changes. -Nonetheless, when/if the Buffer API changes in node, this module's API will change -accordingly. - -## performance - -See perf tests in `/perf`. - -`BrowserBuffer` is the browser `buffer` module (this repo). `Uint8Array` is included as a -sanity check (since `BrowserBuffer` uses `Uint8Array` under the hood, `Uint8Array` will -always be at least a bit faster). Finally, `NodeBuffer` is the node.js buffer module, -which is included to compare against. - -### Chrome 38 - -| Method | Operations | Accuracy | Sampled | Fastest | -|:-------|:-----------|:---------|:--------|:-------:| -| BrowserBuffer#bracket-notation | 11,457,464 ops/sec | ±0.86% | 66 | ✓ | -| Uint8Array#bracket-notation | 10,824,332 ops/sec | ±0.74% | 65 | | -| | | | | -| BrowserBuffer#concat | 450,532 ops/sec | ±0.76% | 68 | | -| Uint8Array#concat | 1,368,911 ops/sec | ±1.50% | 62 | ✓ | -| | | | | -| BrowserBuffer#copy(16000) | 903,001 ops/sec | ±0.96% | 67 | | -| Uint8Array#copy(16000) | 1,422,441 ops/sec | ±1.04% | 66 | ✓ | -| | | | | -| BrowserBuffer#copy(16) | 11,431,358 ops/sec | ±0.46% | 69 | | -| Uint8Array#copy(16) | 13,944,163 ops/sec | ±1.12% | 68 | ✓ | -| | | | | -| BrowserBuffer#new(16000) | 106,329 ops/sec | ±6.70% | 44 | | -| Uint8Array#new(16000) | 131,001 ops/sec | ±2.85% | 31 | ✓ | -| | | | | -| BrowserBuffer#new(16) | 1,554,491 ops/sec | ±1.60% | 65 | | -| Uint8Array#new(16) | 6,623,930 ops/sec | ±1.66% | 65 | ✓ | -| | | | | -| BrowserBuffer#readDoubleBE | 112,830 ops/sec | ±0.51% | 69 | ✓ | -| DataView#getFloat64 | 93,500 ops/sec | ±0.57% | 68 | | -| | | | | -| BrowserBuffer#readFloatBE | 146,678 ops/sec | ±0.95% | 68 | ✓ | -| DataView#getFloat32 | 99,311 ops/sec | ±0.41% | 67 | | -| | | | | -| BrowserBuffer#readUInt32LE | 843,214 ops/sec | ±0.70% | 69 | ✓ | -| DataView#getUint32 | 103,024 ops/sec | ±0.64% | 67 | | -| | | | | -| BrowserBuffer#slice | 1,013,941 ops/sec | ±0.75% | 67 | | -| Uint8Array#subarray | 1,903,928 ops/sec | ±0.53% | 67 | ✓ | -| | | | | -| BrowserBuffer#writeFloatBE | 61,387 ops/sec | ±0.90% | 67 | | -| DataView#setFloat32 | 141,249 ops/sec | ±0.40% | 66 | ✓ | - - -### Firefox 33 - -| Method | Operations | Accuracy | Sampled | Fastest | -|:-------|:-----------|:---------|:--------|:-------:| -| BrowserBuffer#bracket-notation | 20,800,421 ops/sec | ±1.84% | 60 | | -| Uint8Array#bracket-notation | 20,826,235 ops/sec | ±2.02% | 61 | ✓ | -| | | | | -| BrowserBuffer#concat | 153,076 ops/sec | ±2.32% | 61 | | -| Uint8Array#concat | 1,255,674 ops/sec | ±8.65% | 52 | ✓ | -| | | | | -| BrowserBuffer#copy(16000) | 1,105,312 ops/sec | ±1.16% | 63 | | -| Uint8Array#copy(16000) | 1,615,911 ops/sec | ±0.55% | 66 | ✓ | -| | | | | -| BrowserBuffer#copy(16) | 16,357,599 ops/sec | ±0.73% | 68 | | -| Uint8Array#copy(16) | 31,436,281 ops/sec | ±1.05% | 68 | ✓ | -| | | | | -| BrowserBuffer#new(16000) | 52,995 ops/sec | ±6.01% | 35 | | -| Uint8Array#new(16000) | 87,686 ops/sec | ±5.68% | 45 | ✓ | -| | | | | -| BrowserBuffer#new(16) | 252,031 ops/sec | ±1.61% | 66 | | -| Uint8Array#new(16) | 8,477,026 ops/sec | ±0.49% | 68 | ✓ | -| | | | | -| BrowserBuffer#readDoubleBE | 99,871 ops/sec | ±0.41% | 69 | | -| DataView#getFloat64 | 285,663 ops/sec | ±0.70% | 68 | ✓ | -| | | | | -| BrowserBuffer#readFloatBE | 115,540 ops/sec | ±0.42% | 69 | | -| DataView#getFloat32 | 288,722 ops/sec | ±0.82% | 68 | ✓ | -| | | | | -| BrowserBuffer#readUInt32LE | 633,926 ops/sec | ±1.08% | 67 | ✓ | -| DataView#getUint32 | 294,808 ops/sec | ±0.79% | 64 | | -| | | | | -| BrowserBuffer#slice | 349,425 ops/sec | ±0.46% | 69 | | -| Uint8Array#subarray | 5,965,819 ops/sec | ±0.60% | 65 | ✓ | -| | | | | -| BrowserBuffer#writeFloatBE | 59,980 ops/sec | ±0.41% | 67 | | -| DataView#setFloat32 | 317,634 ops/sec | ±0.63% | 68 | ✓ | - -### Safari 8 - -| Method | Operations | Accuracy | Sampled | Fastest | -|:-------|:-----------|:---------|:--------|:-------:| -| BrowserBuffer#bracket-notation | 10,279,729 ops/sec | ±2.25% | 56 | ✓ | -| Uint8Array#bracket-notation | 10,030,767 ops/sec | ±2.23% | 59 | | -| | | | | -| BrowserBuffer#concat | 144,138 ops/sec | ±1.38% | 65 | | -| Uint8Array#concat | 4,950,764 ops/sec | ±1.70% | 63 | ✓ | -| | | | | -| BrowserBuffer#copy(16000) | 1,058,548 ops/sec | ±1.51% | 64 | | -| Uint8Array#copy(16000) | 1,409,666 ops/sec | ±1.17% | 65 | ✓ | -| | | | | -| BrowserBuffer#copy(16) | 6,282,529 ops/sec | ±1.88% | 58 | | -| Uint8Array#copy(16) | 11,907,128 ops/sec | ±2.87% | 58 | ✓ | -| | | | | -| BrowserBuffer#new(16000) | 101,663 ops/sec | ±3.89% | 57 | | -| Uint8Array#new(16000) | 22,050,818 ops/sec | ±6.51% | 46 | ✓ | -| | | | | -| BrowserBuffer#new(16) | 176,072 ops/sec | ±2.13% | 64 | | -| Uint8Array#new(16) | 24,385,731 ops/sec | ±5.01% | 51 | ✓ | -| | | | | -| BrowserBuffer#readDoubleBE | 41,341 ops/sec | ±1.06% | 67 | | -| DataView#getFloat64 | 322,280 ops/sec | ±0.84% | 68 | ✓ | -| | | | | -| BrowserBuffer#readFloatBE | 46,141 ops/sec | ±1.06% | 65 | | -| DataView#getFloat32 | 337,025 ops/sec | ±0.43% | 69 | ✓ | -| | | | | -| BrowserBuffer#readUInt32LE | 151,551 ops/sec | ±1.02% | 66 | | -| DataView#getUint32 | 308,278 ops/sec | ±0.94% | 67 | ✓ | -| | | | | -| BrowserBuffer#slice | 197,365 ops/sec | ±0.95% | 66 | | -| Uint8Array#subarray | 9,558,024 ops/sec | ±3.08% | 58 | ✓ | -| | | | | -| BrowserBuffer#writeFloatBE | 17,518 ops/sec | ±1.03% | 63 | | -| DataView#setFloat32 | 319,751 ops/sec | ±0.48% | 68 | ✓ | - - -### Node 0.11.14 - -| Method | Operations | Accuracy | Sampled | Fastest | -|:-------|:-----------|:---------|:--------|:-------:| -| BrowserBuffer#bracket-notation | 10,489,828 ops/sec | ±3.25% | 90 | | -| Uint8Array#bracket-notation | 10,534,884 ops/sec | ±0.81% | 92 | ✓ | -| NodeBuffer#bracket-notation | 10,389,910 ops/sec | ±0.97% | 87 | | -| | | | | -| BrowserBuffer#concat | 487,830 ops/sec | ±2.58% | 88 | | -| Uint8Array#concat | 1,814,327 ops/sec | ±1.28% | 88 | ✓ | -| NodeBuffer#concat | 1,636,523 ops/sec | ±1.88% | 73 | | -| | | | | -| BrowserBuffer#copy(16000) | 1,073,665 ops/sec | ±0.77% | 90 | | -| Uint8Array#copy(16000) | 1,348,517 ops/sec | ±0.84% | 89 | ✓ | -| NodeBuffer#copy(16000) | 1,289,533 ops/sec | ±0.82% | 93 | | -| | | | | -| BrowserBuffer#copy(16) | 12,782,706 ops/sec | ±0.74% | 85 | | -| Uint8Array#copy(16) | 14,180,427 ops/sec | ±0.93% | 92 | ✓ | -| NodeBuffer#copy(16) | 11,083,134 ops/sec | ±1.06% | 89 | | -| | | | | -| BrowserBuffer#new(16000) | 141,678 ops/sec | ±3.30% | 67 | | -| Uint8Array#new(16000) | 161,491 ops/sec | ±2.96% | 60 | | -| NodeBuffer#new(16000) | 292,699 ops/sec | ±3.20% | 55 | ✓ | -| | | | | -| BrowserBuffer#new(16) | 1,655,466 ops/sec | ±2.41% | 82 | | -| Uint8Array#new(16) | 14,399,926 ops/sec | ±0.91% | 94 | ✓ | -| NodeBuffer#new(16) | 3,894,696 ops/sec | ±0.88% | 92 | | -| | | | | -| BrowserBuffer#readDoubleBE | 109,582 ops/sec | ±0.75% | 93 | ✓ | -| DataView#getFloat64 | 91,235 ops/sec | ±0.81% | 90 | | -| NodeBuffer#readDoubleBE | 88,593 ops/sec | ±0.96% | 81 | | -| | | | | -| BrowserBuffer#readFloatBE | 139,854 ops/sec | ±1.03% | 85 | ✓ | -| DataView#getFloat32 | 98,744 ops/sec | ±0.80% | 89 | | -| NodeBuffer#readFloatBE | 92,769 ops/sec | ±0.94% | 93 | | -| | | | | -| BrowserBuffer#readUInt32LE | 710,861 ops/sec | ±0.82% | 92 | | -| DataView#getUint32 | 117,893 ops/sec | ±0.84% | 91 | | -| NodeBuffer#readUInt32LE | 851,412 ops/sec | ±0.72% | 93 | ✓ | -| | | | | -| BrowserBuffer#slice | 1,673,877 ops/sec | ±0.73% | 94 | | -| Uint8Array#subarray | 6,919,243 ops/sec | ±0.67% | 90 | ✓ | -| NodeBuffer#slice | 4,617,604 ops/sec | ±0.79% | 93 | | -| | | | | -| BrowserBuffer#writeFloatBE | 66,011 ops/sec | ±0.75% | 93 | | -| DataView#setFloat32 | 127,760 ops/sec | ±0.72% | 93 | ✓ | -| NodeBuffer#writeFloatBE | 103,352 ops/sec | ±0.83% | 93 | | - -### iojs 1.8.1 - -| Method | Operations | Accuracy | Sampled | Fastest | -|:-------|:-----------|:---------|:--------|:-------:| -| BrowserBuffer#bracket-notation | 10,990,488 ops/sec | ±1.11% | 91 | | -| Uint8Array#bracket-notation | 11,268,757 ops/sec | ±0.65% | 97 | | -| NodeBuffer#bracket-notation | 11,353,260 ops/sec | ±0.83% | 94 | ✓ | -| | | | | -| BrowserBuffer#concat | 378,954 ops/sec | ±0.74% | 94 | | -| Uint8Array#concat | 1,358,288 ops/sec | ±0.97% | 87 | | -| NodeBuffer#concat | 1,934,050 ops/sec | ±1.11% | 78 | ✓ | -| | | | | -| BrowserBuffer#copy(16000) | 894,538 ops/sec | ±0.56% | 84 | | -| Uint8Array#copy(16000) | 1,442,656 ops/sec | ±0.71% | 96 | | -| NodeBuffer#copy(16000) | 1,457,898 ops/sec | ±0.53% | 92 | ✓ | -| | | | | -| BrowserBuffer#copy(16) | 12,870,457 ops/sec | ±0.67% | 95 | | -| Uint8Array#copy(16) | 16,643,989 ops/sec | ±0.61% | 93 | ✓ | -| NodeBuffer#copy(16) | 14,885,848 ops/sec | ±0.74% | 94 | | -| | | | | -| BrowserBuffer#new(16000) | 109,264 ops/sec | ±4.21% | 63 | | -| Uint8Array#new(16000) | 138,916 ops/sec | ±1.87% | 61 | | -| NodeBuffer#new(16000) | 281,449 ops/sec | ±3.58% | 51 | ✓ | -| | | | | -| BrowserBuffer#new(16) | 1,362,935 ops/sec | ±0.56% | 99 | | -| Uint8Array#new(16) | 6,193,090 ops/sec | ±0.64% | 95 | ✓ | -| NodeBuffer#new(16) | 4,745,425 ops/sec | ±1.56% | 90 | | -| | | | | -| BrowserBuffer#readDoubleBE | 118,127 ops/sec | ±0.59% | 93 | ✓ | -| DataView#getFloat64 | 107,332 ops/sec | ±0.65% | 91 | | -| NodeBuffer#readDoubleBE | 116,274 ops/sec | ±0.94% | 95 | | -| | | | | -| BrowserBuffer#readFloatBE | 150,326 ops/sec | ±0.58% | 95 | ✓ | -| DataView#getFloat32 | 110,541 ops/sec | ±0.57% | 98 | | -| NodeBuffer#readFloatBE | 121,599 ops/sec | ±0.60% | 87 | | -| | | | | -| BrowserBuffer#readUInt32LE | 814,147 ops/sec | ±0.62% | 93 | | -| DataView#getUint32 | 137,592 ops/sec | ±0.64% | 90 | | -| NodeBuffer#readUInt32LE | 931,650 ops/sec | ±0.71% | 96 | ✓ | -| | | | | -| BrowserBuffer#slice | 878,590 ops/sec | ±0.68% | 93 | | -| Uint8Array#subarray | 2,843,308 ops/sec | ±1.02% | 90 | | -| NodeBuffer#slice | 4,998,316 ops/sec | ±0.68% | 90 | ✓ | -| | | | | -| BrowserBuffer#writeFloatBE | 65,927 ops/sec | ±0.74% | 93 | | -| DataView#setFloat32 | 139,823 ops/sec | ±0.97% | 89 | ✓ | -| NodeBuffer#writeFloatBE | 135,763 ops/sec | ±0.65% | 96 | | -| | | | | - -## Testing the project - -First, install the project: - - npm install - -Then, to run tests in Node.js, run: - - npm run test-node - -To test locally in a browser, you can run: - - npm run test-browser-local - -This will print out a URL that you can then open in a browser to run the tests, using [Zuul](https://github.com/defunctzombie/zuul). - -To run automated browser tests using Saucelabs, ensure that your `SAUCE_USERNAME` and `SAUCE_ACCESS_KEY` environment variables are set, then run: - - npm test - -This is what's run in Travis, to check against various browsers. The list of browsers is kept in the `.zuul.yml` file. - -## JavaScript Standard Style - -This module uses [JavaScript Standard Style](https://github.com/feross/standard). - -[![js-standard-style](https://raw.githubusercontent.com/feross/standard/master/badge.png)](https://github.com/feross/standard) - -To test that the code conforms to the style, `npm install` and run: - - ./node_modules/.bin/standard - -## credit - -This was originally forked from [buffer-browserify](https://github.com/toots/buffer-browserify). - - -## license - -MIT. Copyright (C) [Feross Aboukhadijeh](http://feross.org), and other contributors. Originally forked from an MIT-licensed module by Romain Beauxis. diff --git a/node_modules/buffer/bin/download-node-tests.js b/node_modules/buffer/bin/download-node-tests.js deleted file mode 100755 index c1a88467..00000000 --- a/node_modules/buffer/bin/download-node-tests.js +++ /dev/null @@ -1,126 +0,0 @@ -#!/usr/bin/env node - -var concat = require('concat-stream') -var fs = require('fs') -var hyperquest = require('hyperquest') -var cp = require('child_process') -var split = require('split') -var through = require('through2') - -var url = 'https://api.github.com/repos/nodejs/io.js/contents' -var dirs = [ - '/test/parallel', - '/test/pummel' -] - -cp.execSync('rm -rf node/*.js', { cwd: __dirname + '/../test' }) -cp.execSync('rm -rf node-es6/*.js', { cwd: __dirname + '/../test' }) - -var httpOpts = { - headers: { - 'User-Agent': null - // auth if github rate-limits you... - // 'Authorization': 'Basic ' + Buffer('username:password').toString('base64'), - } -} - -dirs.forEach(function (dir) { - var req = hyperquest(url + dir, httpOpts) - req.pipe(concat(function (data) { - if (req.response.statusCode !== 200) { - throw new Error(url + dir + ': ' + data.toString()) - } - downloadBufferTests(dir, JSON.parse(data)) - })) -}) - -function downloadBufferTests (dir, files) { - files.forEach(function (file) { - if (!/test-buffer.*/.test(file.name)) return - - var path - if (file.name === 'test-buffer-iterator.js' || - file.name === 'test-buffer-arraybuffer.js') { - path = __dirname + '/../test/node-es6/' + file.name - } else if (file.name === 'test-buffer-fakes.js') { - // These teses only apply to node, where they're calling into C++ and need to - // ensure the prototype can't be faked, or else there will be a segfault. - return - } else { - path = __dirname + '/../test/node/' + file.name - } - - console.log(file.download_url) - hyperquest(file.download_url, httpOpts) - .pipe(split()) - .pipe(testfixer(file.name)) - .pipe(fs.createWriteStream(path)) - .on('finish', function () { - console.log('wrote ' + file.name) - }) - }) -} - -function testfixer (filename) { - var firstline = true - - return through(function (line, enc, cb) { - line = line.toString() - - if (firstline) { - // require buffer explicitly - var preamble = 'if (process.env.OBJECT_IMPL) global.TYPED_ARRAY_SUPPORT = false;\n' + - 'var Buffer = require(\'../../\').Buffer;' - if (/use strict/.test(line)) line += '\n' + preamble - else line + preamble + '\n' + line - firstline = false - } - - // use `var` instead of `const`/`let` - line = line.replace(/(const|let) /g, 'var ') - - // make `require('common')` work - line = line.replace(/(var common = require.*)/g, 'var common = {};') - - // use `Buffer.isBuffer` instead of `instanceof Buffer` - line = line.replace(/buf instanceof Buffer/g, 'Buffer.isBuffer(buf)') - - // require browser buffer - line = line.replace(/(.*)require\('buffer'\)(.*)/g, '$1require(\'../../\')$2') - - // smalloc is only used for kMaxLength - line = line.replace( - /require\('smalloc'\)/g, - '{ kMaxLength: process.env.OBJECT_IMPL ? 0x3fffffff : 0x7fffffff }' - ) - - // comment out console logs - line = line.replace(/(.*console\..*)/g, '// $1') - - // we can't reliably test typed array max-sizes in the browser - if (filename === 'test-buffer-big.js') { - line = line.replace(/(.*new Int8Array.*RangeError.*)/, '// $1') - line = line.replace(/(.*new ArrayBuffer.*RangeError.*)/, '// $1') - line = line.replace(/(.*new Float64Array.*RangeError.*)/, '// $1') - } - - // https://github.com/iojs/io.js/blob/v0.12/test/parallel/test-buffer.js#L38 - // we can't run this because we need to support - // browsers that don't have typed arrays - if (filename === 'test-buffer.js') { - line = line.replace(/b\[0\] = -1;/, 'b[0] = 255;') - } - - // https://github.com/iojs/io.js/blob/v0.12/test/parallel/test-buffer.js#L1138 - // unfortunately we can't run this as it touches - // node streams which do an instanceof check - // and crypto-browserify doesn't work in old - // versions of ie - if (filename === 'test-buffer.js') { - line = line.replace(/^(\s*)(var crypto = require.*)/, '$1// $2') - line = line.replace(/(crypto.createHash.*\))/, '1 /*$1*/') - } - - cb(null, line + '\n') - }) -} diff --git a/node_modules/buffer/bin/test.js b/node_modules/buffer/bin/test.js deleted file mode 100644 index 2fc368b9..00000000 --- a/node_modules/buffer/bin/test.js +++ /dev/null @@ -1,18 +0,0 @@ -#!/usr/bin/env node - -var cp = require('child_process') - -var runBrowserTests = !process.env.TRAVIS_PULL_REQUEST || - process.env.TRAVIS_PULL_REQUEST === 'false' - -var node = cp.spawn('npm', ['run', 'test-node'], { stdio: 'inherit' }) -node.on('close', function (code) { - if (code === 0 && runBrowserTests) { - var browser = cp.spawn('npm', ['run', 'test-browser'], { stdio: 'inherit' }) - browser.on('close', function (code) { - process.exit(code) - }) - } else { - process.exit(code) - } -}) diff --git a/node_modules/buffer/index.js b/node_modules/buffer/index.js deleted file mode 100644 index 0dc9007d..00000000 --- a/node_modules/buffer/index.js +++ /dev/null @@ -1,1548 +0,0 @@ -/*! - * The buffer module from node.js, for the browser. - * - * @author Feross Aboukhadijeh - * @license MIT - */ -/* eslint-disable no-proto */ - -'use strict' - -var base64 = require('base64-js') -var ieee754 = require('ieee754') -var isArray = require('isarray') - -exports.Buffer = Buffer -exports.SlowBuffer = SlowBuffer -exports.INSPECT_MAX_BYTES = 50 -Buffer.poolSize = 8192 // not used by this implementation - -var rootParent = {} - -/** - * If `Buffer.TYPED_ARRAY_SUPPORT`: - * === true Use Uint8Array implementation (fastest) - * === false Use Object implementation (most compatible, even IE6) - * - * Browsers that support typed arrays are IE 10+, Firefox 4+, Chrome 7+, Safari 5.1+, - * Opera 11.6+, iOS 4.2+. - * - * Due to various browser bugs, sometimes the Object implementation will be used even - * when the browser supports typed arrays. - * - * Note: - * - * - Firefox 4-29 lacks support for adding new properties to `Uint8Array` instances, - * See: https://bugzilla.mozilla.org/show_bug.cgi?id=695438. - * - * - Safari 5-7 lacks support for changing the `Object.prototype.constructor` property - * on objects. - * - * - Chrome 9-10 is missing the `TypedArray.prototype.subarray` function. - * - * - IE10 has a broken `TypedArray.prototype.subarray` function which returns arrays of - * incorrect length in some situations. - - * We detect these buggy browsers and set `Buffer.TYPED_ARRAY_SUPPORT` to `false` so they - * get the Object implementation, which is slower but behaves correctly. - */ -Buffer.TYPED_ARRAY_SUPPORT = global.TYPED_ARRAY_SUPPORT !== undefined - ? global.TYPED_ARRAY_SUPPORT - : typedArraySupport() - -function typedArraySupport () { - function Bar () {} - try { - var arr = new Uint8Array(1) - arr.foo = function () { return 42 } - arr.constructor = Bar - return arr.foo() === 42 && // typed array instances can be augmented - arr.constructor === Bar && // constructor can be set - typeof arr.subarray === 'function' && // chrome 9-10 lack `subarray` - arr.subarray(1, 1).byteLength === 0 // ie10 has broken `subarray` - } catch (e) { - return false - } -} - -function kMaxLength () { - return Buffer.TYPED_ARRAY_SUPPORT - ? 0x7fffffff - : 0x3fffffff -} - -/** - * Class: Buffer - * ============= - * - * The Buffer constructor returns instances of `Uint8Array` that are augmented - * with function properties for all the node `Buffer` API functions. We use - * `Uint8Array` so that square bracket notation works as expected -- it returns - * a single octet. - * - * By augmenting the instances, we can avoid modifying the `Uint8Array` - * prototype. - */ -function Buffer (arg) { - if (!(this instanceof Buffer)) { - // Avoid going through an ArgumentsAdaptorTrampoline in the common case. - if (arguments.length > 1) return new Buffer(arg, arguments[1]) - return new Buffer(arg) - } - - if (!Buffer.TYPED_ARRAY_SUPPORT) { - this.length = 0 - this.parent = undefined - } - - // Common case. - if (typeof arg === 'number') { - return fromNumber(this, arg) - } - - // Slightly less common case. - if (typeof arg === 'string') { - return fromString(this, arg, arguments.length > 1 ? arguments[1] : 'utf8') - } - - // Unusual. - return fromObject(this, arg) -} - -function fromNumber (that, length) { - that = allocate(that, length < 0 ? 0 : checked(length) | 0) - if (!Buffer.TYPED_ARRAY_SUPPORT) { - for (var i = 0; i < length; i++) { - that[i] = 0 - } - } - return that -} - -function fromString (that, string, encoding) { - if (typeof encoding !== 'string' || encoding === '') encoding = 'utf8' - - // Assumption: byteLength() return value is always < kMaxLength. - var length = byteLength(string, encoding) | 0 - that = allocate(that, length) - - that.write(string, encoding) - return that -} - -function fromObject (that, object) { - if (Buffer.isBuffer(object)) return fromBuffer(that, object) - - if (isArray(object)) return fromArray(that, object) - - if (object == null) { - throw new TypeError('must start with number, buffer, array or string') - } - - if (typeof ArrayBuffer !== 'undefined') { - if (object.buffer instanceof ArrayBuffer) { - return fromTypedArray(that, object) - } - if (object instanceof ArrayBuffer) { - return fromArrayBuffer(that, object) - } - } - - if (object.length) return fromArrayLike(that, object) - - return fromJsonObject(that, object) -} - -function fromBuffer (that, buffer) { - var length = checked(buffer.length) | 0 - that = allocate(that, length) - buffer.copy(that, 0, 0, length) - return that -} - -function fromArray (that, array) { - var length = checked(array.length) | 0 - that = allocate(that, length) - for (var i = 0; i < length; i += 1) { - that[i] = array[i] & 255 - } - return that -} - -// Duplicate of fromArray() to keep fromArray() monomorphic. -function fromTypedArray (that, array) { - var length = checked(array.length) | 0 - that = allocate(that, length) - // Truncating the elements is probably not what people expect from typed - // arrays with BYTES_PER_ELEMENT > 1 but it's compatible with the behavior - // of the old Buffer constructor. - for (var i = 0; i < length; i += 1) { - that[i] = array[i] & 255 - } - return that -} - -function fromArrayBuffer (that, array) { - if (Buffer.TYPED_ARRAY_SUPPORT) { - // Return an augmented `Uint8Array` instance, for best performance - array.byteLength - that = Buffer._augment(new Uint8Array(array)) - } else { - // Fallback: Return an object instance of the Buffer class - that = fromTypedArray(that, new Uint8Array(array)) - } - return that -} - -function fromArrayLike (that, array) { - var length = checked(array.length) | 0 - that = allocate(that, length) - for (var i = 0; i < length; i += 1) { - that[i] = array[i] & 255 - } - return that -} - -// Deserialize { type: 'Buffer', data: [1,2,3,...] } into a Buffer object. -// Returns a zero-length buffer for inputs that don't conform to the spec. -function fromJsonObject (that, object) { - var array - var length = 0 - - if (object.type === 'Buffer' && isArray(object.data)) { - array = object.data - length = checked(array.length) | 0 - } - that = allocate(that, length) - - for (var i = 0; i < length; i += 1) { - that[i] = array[i] & 255 - } - return that -} - -if (Buffer.TYPED_ARRAY_SUPPORT) { - Buffer.prototype.__proto__ = Uint8Array.prototype - Buffer.__proto__ = Uint8Array -} else { - // pre-set for values that may exist in the future - Buffer.prototype.length = undefined - Buffer.prototype.parent = undefined -} - -function allocate (that, length) { - if (Buffer.TYPED_ARRAY_SUPPORT) { - // Return an augmented `Uint8Array` instance, for best performance - that = Buffer._augment(new Uint8Array(length)) - that.__proto__ = Buffer.prototype - } else { - // Fallback: Return an object instance of the Buffer class - that.length = length - that._isBuffer = true - } - - var fromPool = length !== 0 && length <= Buffer.poolSize >>> 1 - if (fromPool) that.parent = rootParent - - return that -} - -function checked (length) { - // Note: cannot use `length < kMaxLength` here because that fails when - // length is NaN (which is otherwise coerced to zero.) - if (length >= kMaxLength()) { - throw new RangeError('Attempt to allocate Buffer larger than maximum ' + - 'size: 0x' + kMaxLength().toString(16) + ' bytes') - } - return length | 0 -} - -function SlowBuffer (subject, encoding) { - if (!(this instanceof SlowBuffer)) return new SlowBuffer(subject, encoding) - - var buf = new Buffer(subject, encoding) - delete buf.parent - return buf -} - -Buffer.isBuffer = function isBuffer (b) { - return !!(b != null && b._isBuffer) -} - -Buffer.compare = function compare (a, b) { - if (!Buffer.isBuffer(a) || !Buffer.isBuffer(b)) { - throw new TypeError('Arguments must be Buffers') - } - - if (a === b) return 0 - - var x = a.length - var y = b.length - - var i = 0 - var len = Math.min(x, y) - while (i < len) { - if (a[i] !== b[i]) break - - ++i - } - - if (i !== len) { - x = a[i] - y = b[i] - } - - if (x < y) return -1 - if (y < x) return 1 - return 0 -} - -Buffer.isEncoding = function isEncoding (encoding) { - switch (String(encoding).toLowerCase()) { - case 'hex': - case 'utf8': - case 'utf-8': - case 'ascii': - case 'binary': - case 'base64': - case 'raw': - case 'ucs2': - case 'ucs-2': - case 'utf16le': - case 'utf-16le': - return true - default: - return false - } -} - -Buffer.concat = function concat (list, length) { - if (!isArray(list)) throw new TypeError('list argument must be an Array of Buffers.') - - if (list.length === 0) { - return new Buffer(0) - } - - var i - if (length === undefined) { - length = 0 - for (i = 0; i < list.length; i++) { - length += list[i].length - } - } - - var buf = new Buffer(length) - var pos = 0 - for (i = 0; i < list.length; i++) { - var item = list[i] - item.copy(buf, pos) - pos += item.length - } - return buf -} - -function byteLength (string, encoding) { - if (typeof string !== 'string') string = '' + string - - var len = string.length - if (len === 0) return 0 - - // Use a for loop to avoid recursion - var loweredCase = false - for (;;) { - switch (encoding) { - case 'ascii': - case 'binary': - // Deprecated - case 'raw': - case 'raws': - return len - case 'utf8': - case 'utf-8': - return utf8ToBytes(string).length - case 'ucs2': - case 'ucs-2': - case 'utf16le': - case 'utf-16le': - return len * 2 - case 'hex': - return len >>> 1 - case 'base64': - return base64ToBytes(string).length - default: - if (loweredCase) return utf8ToBytes(string).length // assume utf8 - encoding = ('' + encoding).toLowerCase() - loweredCase = true - } - } -} -Buffer.byteLength = byteLength - -function slowToString (encoding, start, end) { - var loweredCase = false - - start = start | 0 - end = end === undefined || end === Infinity ? this.length : end | 0 - - if (!encoding) encoding = 'utf8' - if (start < 0) start = 0 - if (end > this.length) end = this.length - if (end <= start) return '' - - while (true) { - switch (encoding) { - case 'hex': - return hexSlice(this, start, end) - - case 'utf8': - case 'utf-8': - return utf8Slice(this, start, end) - - case 'ascii': - return asciiSlice(this, start, end) - - case 'binary': - return binarySlice(this, start, end) - - case 'base64': - return base64Slice(this, start, end) - - case 'ucs2': - case 'ucs-2': - case 'utf16le': - case 'utf-16le': - return utf16leSlice(this, start, end) - - default: - if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding) - encoding = (encoding + '').toLowerCase() - loweredCase = true - } - } -} - -Buffer.prototype.toString = function toString () { - var length = this.length | 0 - if (length === 0) return '' - if (arguments.length === 0) return utf8Slice(this, 0, length) - return slowToString.apply(this, arguments) -} - -Buffer.prototype.equals = function equals (b) { - if (!Buffer.isBuffer(b)) throw new TypeError('Argument must be a Buffer') - if (this === b) return true - return Buffer.compare(this, b) === 0 -} - -Buffer.prototype.inspect = function inspect () { - var str = '' - var max = exports.INSPECT_MAX_BYTES - if (this.length > 0) { - str = this.toString('hex', 0, max).match(/.{2}/g).join(' ') - if (this.length > max) str += ' ... ' - } - return '' -} - -Buffer.prototype.compare = function compare (b) { - if (!Buffer.isBuffer(b)) throw new TypeError('Argument must be a Buffer') - if (this === b) return 0 - return Buffer.compare(this, b) -} - -Buffer.prototype.indexOf = function indexOf (val, byteOffset) { - if (byteOffset > 0x7fffffff) byteOffset = 0x7fffffff - else if (byteOffset < -0x80000000) byteOffset = -0x80000000 - byteOffset >>= 0 - - if (this.length === 0) return -1 - if (byteOffset >= this.length) return -1 - - // Negative offsets start from the end of the buffer - if (byteOffset < 0) byteOffset = Math.max(this.length + byteOffset, 0) - - if (typeof val === 'string') { - if (val.length === 0) return -1 // special case: looking for empty string always fails - return String.prototype.indexOf.call(this, val, byteOffset) - } - if (Buffer.isBuffer(val)) { - return arrayIndexOf(this, val, byteOffset) - } - if (typeof val === 'number') { - if (Buffer.TYPED_ARRAY_SUPPORT && Uint8Array.prototype.indexOf === 'function') { - return Uint8Array.prototype.indexOf.call(this, val, byteOffset) - } - return arrayIndexOf(this, [ val ], byteOffset) - } - - function arrayIndexOf (arr, val, byteOffset) { - var foundIndex = -1 - for (var i = 0; byteOffset + i < arr.length; i++) { - if (arr[byteOffset + i] === val[foundIndex === -1 ? 0 : i - foundIndex]) { - if (foundIndex === -1) foundIndex = i - if (i - foundIndex + 1 === val.length) return byteOffset + foundIndex - } else { - foundIndex = -1 - } - } - return -1 - } - - throw new TypeError('val must be string, number or Buffer') -} - -// `get` is deprecated -Buffer.prototype.get = function get (offset) { - console.log('.get() is deprecated. Access using array indexes instead.') - return this.readUInt8(offset) -} - -// `set` is deprecated -Buffer.prototype.set = function set (v, offset) { - console.log('.set() is deprecated. Access using array indexes instead.') - return this.writeUInt8(v, offset) -} - -function hexWrite (buf, string, offset, length) { - offset = Number(offset) || 0 - var remaining = buf.length - offset - if (!length) { - length = remaining - } else { - length = Number(length) - if (length > remaining) { - length = remaining - } - } - - // must be an even number of digits - var strLen = string.length - if (strLen % 2 !== 0) throw new Error('Invalid hex string') - - if (length > strLen / 2) { - length = strLen / 2 - } - for (var i = 0; i < length; i++) { - var parsed = parseInt(string.substr(i * 2, 2), 16) - if (isNaN(parsed)) throw new Error('Invalid hex string') - buf[offset + i] = parsed - } - return i -} - -function utf8Write (buf, string, offset, length) { - return blitBuffer(utf8ToBytes(string, buf.length - offset), buf, offset, length) -} - -function asciiWrite (buf, string, offset, length) { - return blitBuffer(asciiToBytes(string), buf, offset, length) -} - -function binaryWrite (buf, string, offset, length) { - return asciiWrite(buf, string, offset, length) -} - -function base64Write (buf, string, offset, length) { - return blitBuffer(base64ToBytes(string), buf, offset, length) -} - -function ucs2Write (buf, string, offset, length) { - return blitBuffer(utf16leToBytes(string, buf.length - offset), buf, offset, length) -} - -Buffer.prototype.write = function write (string, offset, length, encoding) { - // Buffer#write(string) - if (offset === undefined) { - encoding = 'utf8' - length = this.length - offset = 0 - // Buffer#write(string, encoding) - } else if (length === undefined && typeof offset === 'string') { - encoding = offset - length = this.length - offset = 0 - // Buffer#write(string, offset[, length][, encoding]) - } else if (isFinite(offset)) { - offset = offset | 0 - if (isFinite(length)) { - length = length | 0 - if (encoding === undefined) encoding = 'utf8' - } else { - encoding = length - length = undefined - } - // legacy write(string, encoding, offset, length) - remove in v0.13 - } else { - var swap = encoding - encoding = offset - offset = length | 0 - length = swap - } - - var remaining = this.length - offset - if (length === undefined || length > remaining) length = remaining - - if ((string.length > 0 && (length < 0 || offset < 0)) || offset > this.length) { - throw new RangeError('attempt to write outside buffer bounds') - } - - if (!encoding) encoding = 'utf8' - - var loweredCase = false - for (;;) { - switch (encoding) { - case 'hex': - return hexWrite(this, string, offset, length) - - case 'utf8': - case 'utf-8': - return utf8Write(this, string, offset, length) - - case 'ascii': - return asciiWrite(this, string, offset, length) - - case 'binary': - return binaryWrite(this, string, offset, length) - - case 'base64': - // Warning: maxLength not taken into account in base64Write - return base64Write(this, string, offset, length) - - case 'ucs2': - case 'ucs-2': - case 'utf16le': - case 'utf-16le': - return ucs2Write(this, string, offset, length) - - default: - if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding) - encoding = ('' + encoding).toLowerCase() - loweredCase = true - } - } -} - -Buffer.prototype.toJSON = function toJSON () { - return { - type: 'Buffer', - data: Array.prototype.slice.call(this._arr || this, 0) - } -} - -function base64Slice (buf, start, end) { - if (start === 0 && end === buf.length) { - return base64.fromByteArray(buf) - } else { - return base64.fromByteArray(buf.slice(start, end)) - } -} - -function utf8Slice (buf, start, end) { - end = Math.min(buf.length, end) - var res = [] - - var i = start - while (i < end) { - var firstByte = buf[i] - var codePoint = null - var bytesPerSequence = (firstByte > 0xEF) ? 4 - : (firstByte > 0xDF) ? 3 - : (firstByte > 0xBF) ? 2 - : 1 - - if (i + bytesPerSequence <= end) { - var secondByte, thirdByte, fourthByte, tempCodePoint - - switch (bytesPerSequence) { - case 1: - if (firstByte < 0x80) { - codePoint = firstByte - } - break - case 2: - secondByte = buf[i + 1] - if ((secondByte & 0xC0) === 0x80) { - tempCodePoint = (firstByte & 0x1F) << 0x6 | (secondByte & 0x3F) - if (tempCodePoint > 0x7F) { - codePoint = tempCodePoint - } - } - break - case 3: - secondByte = buf[i + 1] - thirdByte = buf[i + 2] - if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80) { - tempCodePoint = (firstByte & 0xF) << 0xC | (secondByte & 0x3F) << 0x6 | (thirdByte & 0x3F) - if (tempCodePoint > 0x7FF && (tempCodePoint < 0xD800 || tempCodePoint > 0xDFFF)) { - codePoint = tempCodePoint - } - } - break - case 4: - secondByte = buf[i + 1] - thirdByte = buf[i + 2] - fourthByte = buf[i + 3] - if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80 && (fourthByte & 0xC0) === 0x80) { - tempCodePoint = (firstByte & 0xF) << 0x12 | (secondByte & 0x3F) << 0xC | (thirdByte & 0x3F) << 0x6 | (fourthByte & 0x3F) - if (tempCodePoint > 0xFFFF && tempCodePoint < 0x110000) { - codePoint = tempCodePoint - } - } - } - } - - if (codePoint === null) { - // we did not generate a valid codePoint so insert a - // replacement char (U+FFFD) and advance only 1 byte - codePoint = 0xFFFD - bytesPerSequence = 1 - } else if (codePoint > 0xFFFF) { - // encode to utf16 (surrogate pair dance) - codePoint -= 0x10000 - res.push(codePoint >>> 10 & 0x3FF | 0xD800) - codePoint = 0xDC00 | codePoint & 0x3FF - } - - res.push(codePoint) - i += bytesPerSequence - } - - return decodeCodePointsArray(res) -} - -// Based on http://stackoverflow.com/a/22747272/680742, the browser with -// the lowest limit is Chrome, with 0x10000 args. -// We go 1 magnitude less, for safety -var MAX_ARGUMENTS_LENGTH = 0x1000 - -function decodeCodePointsArray (codePoints) { - var len = codePoints.length - if (len <= MAX_ARGUMENTS_LENGTH) { - return String.fromCharCode.apply(String, codePoints) // avoid extra slice() - } - - // Decode in chunks to avoid "call stack size exceeded". - var res = '' - var i = 0 - while (i < len) { - res += String.fromCharCode.apply( - String, - codePoints.slice(i, i += MAX_ARGUMENTS_LENGTH) - ) - } - return res -} - -function asciiSlice (buf, start, end) { - var ret = '' - end = Math.min(buf.length, end) - - for (var i = start; i < end; i++) { - ret += String.fromCharCode(buf[i] & 0x7F) - } - return ret -} - -function binarySlice (buf, start, end) { - var ret = '' - end = Math.min(buf.length, end) - - for (var i = start; i < end; i++) { - ret += String.fromCharCode(buf[i]) - } - return ret -} - -function hexSlice (buf, start, end) { - var len = buf.length - - if (!start || start < 0) start = 0 - if (!end || end < 0 || end > len) end = len - - var out = '' - for (var i = start; i < end; i++) { - out += toHex(buf[i]) - } - return out -} - -function utf16leSlice (buf, start, end) { - var bytes = buf.slice(start, end) - var res = '' - for (var i = 0; i < bytes.length; i += 2) { - res += String.fromCharCode(bytes[i] + bytes[i + 1] * 256) - } - return res -} - -Buffer.prototype.slice = function slice (start, end) { - var len = this.length - start = ~~start - end = end === undefined ? len : ~~end - - if (start < 0) { - start += len - if (start < 0) start = 0 - } else if (start > len) { - start = len - } - - if (end < 0) { - end += len - if (end < 0) end = 0 - } else if (end > len) { - end = len - } - - if (end < start) end = start - - var newBuf - if (Buffer.TYPED_ARRAY_SUPPORT) { - newBuf = Buffer._augment(this.subarray(start, end)) - } else { - var sliceLen = end - start - newBuf = new Buffer(sliceLen, undefined) - for (var i = 0; i < sliceLen; i++) { - newBuf[i] = this[i + start] - } - } - - if (newBuf.length) newBuf.parent = this.parent || this - - return newBuf -} - -/* - * Need to make sure that buffer isn't trying to write out of bounds. - */ -function checkOffset (offset, ext, length) { - if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint') - if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length') -} - -Buffer.prototype.readUIntLE = function readUIntLE (offset, byteLength, noAssert) { - offset = offset | 0 - byteLength = byteLength | 0 - if (!noAssert) checkOffset(offset, byteLength, this.length) - - var val = this[offset] - var mul = 1 - var i = 0 - while (++i < byteLength && (mul *= 0x100)) { - val += this[offset + i] * mul - } - - return val -} - -Buffer.prototype.readUIntBE = function readUIntBE (offset, byteLength, noAssert) { - offset = offset | 0 - byteLength = byteLength | 0 - if (!noAssert) { - checkOffset(offset, byteLength, this.length) - } - - var val = this[offset + --byteLength] - var mul = 1 - while (byteLength > 0 && (mul *= 0x100)) { - val += this[offset + --byteLength] * mul - } - - return val -} - -Buffer.prototype.readUInt8 = function readUInt8 (offset, noAssert) { - if (!noAssert) checkOffset(offset, 1, this.length) - return this[offset] -} - -Buffer.prototype.readUInt16LE = function readUInt16LE (offset, noAssert) { - if (!noAssert) checkOffset(offset, 2, this.length) - return this[offset] | (this[offset + 1] << 8) -} - -Buffer.prototype.readUInt16BE = function readUInt16BE (offset, noAssert) { - if (!noAssert) checkOffset(offset, 2, this.length) - return (this[offset] << 8) | this[offset + 1] -} - -Buffer.prototype.readUInt32LE = function readUInt32LE (offset, noAssert) { - if (!noAssert) checkOffset(offset, 4, this.length) - - return ((this[offset]) | - (this[offset + 1] << 8) | - (this[offset + 2] << 16)) + - (this[offset + 3] * 0x1000000) -} - -Buffer.prototype.readUInt32BE = function readUInt32BE (offset, noAssert) { - if (!noAssert) checkOffset(offset, 4, this.length) - - return (this[offset] * 0x1000000) + - ((this[offset + 1] << 16) | - (this[offset + 2] << 8) | - this[offset + 3]) -} - -Buffer.prototype.readIntLE = function readIntLE (offset, byteLength, noAssert) { - offset = offset | 0 - byteLength = byteLength | 0 - if (!noAssert) checkOffset(offset, byteLength, this.length) - - var val = this[offset] - var mul = 1 - var i = 0 - while (++i < byteLength && (mul *= 0x100)) { - val += this[offset + i] * mul - } - mul *= 0x80 - - if (val >= mul) val -= Math.pow(2, 8 * byteLength) - - return val -} - -Buffer.prototype.readIntBE = function readIntBE (offset, byteLength, noAssert) { - offset = offset | 0 - byteLength = byteLength | 0 - if (!noAssert) checkOffset(offset, byteLength, this.length) - - var i = byteLength - var mul = 1 - var val = this[offset + --i] - while (i > 0 && (mul *= 0x100)) { - val += this[offset + --i] * mul - } - mul *= 0x80 - - if (val >= mul) val -= Math.pow(2, 8 * byteLength) - - return val -} - -Buffer.prototype.readInt8 = function readInt8 (offset, noAssert) { - if (!noAssert) checkOffset(offset, 1, this.length) - if (!(this[offset] & 0x80)) return (this[offset]) - return ((0xff - this[offset] + 1) * -1) -} - -Buffer.prototype.readInt16LE = function readInt16LE (offset, noAssert) { - if (!noAssert) checkOffset(offset, 2, this.length) - var val = this[offset] | (this[offset + 1] << 8) - return (val & 0x8000) ? val | 0xFFFF0000 : val -} - -Buffer.prototype.readInt16BE = function readInt16BE (offset, noAssert) { - if (!noAssert) checkOffset(offset, 2, this.length) - var val = this[offset + 1] | (this[offset] << 8) - return (val & 0x8000) ? val | 0xFFFF0000 : val -} - -Buffer.prototype.readInt32LE = function readInt32LE (offset, noAssert) { - if (!noAssert) checkOffset(offset, 4, this.length) - - return (this[offset]) | - (this[offset + 1] << 8) | - (this[offset + 2] << 16) | - (this[offset + 3] << 24) -} - -Buffer.prototype.readInt32BE = function readInt32BE (offset, noAssert) { - if (!noAssert) checkOffset(offset, 4, this.length) - - return (this[offset] << 24) | - (this[offset + 1] << 16) | - (this[offset + 2] << 8) | - (this[offset + 3]) -} - -Buffer.prototype.readFloatLE = function readFloatLE (offset, noAssert) { - if (!noAssert) checkOffset(offset, 4, this.length) - return ieee754.read(this, offset, true, 23, 4) -} - -Buffer.prototype.readFloatBE = function readFloatBE (offset, noAssert) { - if (!noAssert) checkOffset(offset, 4, this.length) - return ieee754.read(this, offset, false, 23, 4) -} - -Buffer.prototype.readDoubleLE = function readDoubleLE (offset, noAssert) { - if (!noAssert) checkOffset(offset, 8, this.length) - return ieee754.read(this, offset, true, 52, 8) -} - -Buffer.prototype.readDoubleBE = function readDoubleBE (offset, noAssert) { - if (!noAssert) checkOffset(offset, 8, this.length) - return ieee754.read(this, offset, false, 52, 8) -} - -function checkInt (buf, value, offset, ext, max, min) { - if (!Buffer.isBuffer(buf)) throw new TypeError('buffer must be a Buffer instance') - if (value > max || value < min) throw new RangeError('value is out of bounds') - if (offset + ext > buf.length) throw new RangeError('index out of range') -} - -Buffer.prototype.writeUIntLE = function writeUIntLE (value, offset, byteLength, noAssert) { - value = +value - offset = offset | 0 - byteLength = byteLength | 0 - if (!noAssert) checkInt(this, value, offset, byteLength, Math.pow(2, 8 * byteLength), 0) - - var mul = 1 - var i = 0 - this[offset] = value & 0xFF - while (++i < byteLength && (mul *= 0x100)) { - this[offset + i] = (value / mul) & 0xFF - } - - return offset + byteLength -} - -Buffer.prototype.writeUIntBE = function writeUIntBE (value, offset, byteLength, noAssert) { - value = +value - offset = offset | 0 - byteLength = byteLength | 0 - if (!noAssert) checkInt(this, value, offset, byteLength, Math.pow(2, 8 * byteLength), 0) - - var i = byteLength - 1 - var mul = 1 - this[offset + i] = value & 0xFF - while (--i >= 0 && (mul *= 0x100)) { - this[offset + i] = (value / mul) & 0xFF - } - - return offset + byteLength -} - -Buffer.prototype.writeUInt8 = function writeUInt8 (value, offset, noAssert) { - value = +value - offset = offset | 0 - if (!noAssert) checkInt(this, value, offset, 1, 0xff, 0) - if (!Buffer.TYPED_ARRAY_SUPPORT) value = Math.floor(value) - this[offset] = (value & 0xff) - return offset + 1 -} - -function objectWriteUInt16 (buf, value, offset, littleEndian) { - if (value < 0) value = 0xffff + value + 1 - for (var i = 0, j = Math.min(buf.length - offset, 2); i < j; i++) { - buf[offset + i] = (value & (0xff << (8 * (littleEndian ? i : 1 - i)))) >>> - (littleEndian ? i : 1 - i) * 8 - } -} - -Buffer.prototype.writeUInt16LE = function writeUInt16LE (value, offset, noAssert) { - value = +value - offset = offset | 0 - if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0) - if (Buffer.TYPED_ARRAY_SUPPORT) { - this[offset] = (value & 0xff) - this[offset + 1] = (value >>> 8) - } else { - objectWriteUInt16(this, value, offset, true) - } - return offset + 2 -} - -Buffer.prototype.writeUInt16BE = function writeUInt16BE (value, offset, noAssert) { - value = +value - offset = offset | 0 - if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0) - if (Buffer.TYPED_ARRAY_SUPPORT) { - this[offset] = (value >>> 8) - this[offset + 1] = (value & 0xff) - } else { - objectWriteUInt16(this, value, offset, false) - } - return offset + 2 -} - -function objectWriteUInt32 (buf, value, offset, littleEndian) { - if (value < 0) value = 0xffffffff + value + 1 - for (var i = 0, j = Math.min(buf.length - offset, 4); i < j; i++) { - buf[offset + i] = (value >>> (littleEndian ? i : 3 - i) * 8) & 0xff - } -} - -Buffer.prototype.writeUInt32LE = function writeUInt32LE (value, offset, noAssert) { - value = +value - offset = offset | 0 - if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0) - if (Buffer.TYPED_ARRAY_SUPPORT) { - this[offset + 3] = (value >>> 24) - this[offset + 2] = (value >>> 16) - this[offset + 1] = (value >>> 8) - this[offset] = (value & 0xff) - } else { - objectWriteUInt32(this, value, offset, true) - } - return offset + 4 -} - -Buffer.prototype.writeUInt32BE = function writeUInt32BE (value, offset, noAssert) { - value = +value - offset = offset | 0 - if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0) - if (Buffer.TYPED_ARRAY_SUPPORT) { - this[offset] = (value >>> 24) - this[offset + 1] = (value >>> 16) - this[offset + 2] = (value >>> 8) - this[offset + 3] = (value & 0xff) - } else { - objectWriteUInt32(this, value, offset, false) - } - return offset + 4 -} - -Buffer.prototype.writeIntLE = function writeIntLE (value, offset, byteLength, noAssert) { - value = +value - offset = offset | 0 - if (!noAssert) { - var limit = Math.pow(2, 8 * byteLength - 1) - - checkInt(this, value, offset, byteLength, limit - 1, -limit) - } - - var i = 0 - var mul = 1 - var sub = value < 0 ? 1 : 0 - this[offset] = value & 0xFF - while (++i < byteLength && (mul *= 0x100)) { - this[offset + i] = ((value / mul) >> 0) - sub & 0xFF - } - - return offset + byteLength -} - -Buffer.prototype.writeIntBE = function writeIntBE (value, offset, byteLength, noAssert) { - value = +value - offset = offset | 0 - if (!noAssert) { - var limit = Math.pow(2, 8 * byteLength - 1) - - checkInt(this, value, offset, byteLength, limit - 1, -limit) - } - - var i = byteLength - 1 - var mul = 1 - var sub = value < 0 ? 1 : 0 - this[offset + i] = value & 0xFF - while (--i >= 0 && (mul *= 0x100)) { - this[offset + i] = ((value / mul) >> 0) - sub & 0xFF - } - - return offset + byteLength -} - -Buffer.prototype.writeInt8 = function writeInt8 (value, offset, noAssert) { - value = +value - offset = offset | 0 - if (!noAssert) checkInt(this, value, offset, 1, 0x7f, -0x80) - if (!Buffer.TYPED_ARRAY_SUPPORT) value = Math.floor(value) - if (value < 0) value = 0xff + value + 1 - this[offset] = (value & 0xff) - return offset + 1 -} - -Buffer.prototype.writeInt16LE = function writeInt16LE (value, offset, noAssert) { - value = +value - offset = offset | 0 - if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000) - if (Buffer.TYPED_ARRAY_SUPPORT) { - this[offset] = (value & 0xff) - this[offset + 1] = (value >>> 8) - } else { - objectWriteUInt16(this, value, offset, true) - } - return offset + 2 -} - -Buffer.prototype.writeInt16BE = function writeInt16BE (value, offset, noAssert) { - value = +value - offset = offset | 0 - if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000) - if (Buffer.TYPED_ARRAY_SUPPORT) { - this[offset] = (value >>> 8) - this[offset + 1] = (value & 0xff) - } else { - objectWriteUInt16(this, value, offset, false) - } - return offset + 2 -} - -Buffer.prototype.writeInt32LE = function writeInt32LE (value, offset, noAssert) { - value = +value - offset = offset | 0 - if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000) - if (Buffer.TYPED_ARRAY_SUPPORT) { - this[offset] = (value & 0xff) - this[offset + 1] = (value >>> 8) - this[offset + 2] = (value >>> 16) - this[offset + 3] = (value >>> 24) - } else { - objectWriteUInt32(this, value, offset, true) - } - return offset + 4 -} - -Buffer.prototype.writeInt32BE = function writeInt32BE (value, offset, noAssert) { - value = +value - offset = offset | 0 - if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000) - if (value < 0) value = 0xffffffff + value + 1 - if (Buffer.TYPED_ARRAY_SUPPORT) { - this[offset] = (value >>> 24) - this[offset + 1] = (value >>> 16) - this[offset + 2] = (value >>> 8) - this[offset + 3] = (value & 0xff) - } else { - objectWriteUInt32(this, value, offset, false) - } - return offset + 4 -} - -function checkIEEE754 (buf, value, offset, ext, max, min) { - if (value > max || value < min) throw new RangeError('value is out of bounds') - if (offset + ext > buf.length) throw new RangeError('index out of range') - if (offset < 0) throw new RangeError('index out of range') -} - -function writeFloat (buf, value, offset, littleEndian, noAssert) { - if (!noAssert) { - checkIEEE754(buf, value, offset, 4, 3.4028234663852886e+38, -3.4028234663852886e+38) - } - ieee754.write(buf, value, offset, littleEndian, 23, 4) - return offset + 4 -} - -Buffer.prototype.writeFloatLE = function writeFloatLE (value, offset, noAssert) { - return writeFloat(this, value, offset, true, noAssert) -} - -Buffer.prototype.writeFloatBE = function writeFloatBE (value, offset, noAssert) { - return writeFloat(this, value, offset, false, noAssert) -} - -function writeDouble (buf, value, offset, littleEndian, noAssert) { - if (!noAssert) { - checkIEEE754(buf, value, offset, 8, 1.7976931348623157E+308, -1.7976931348623157E+308) - } - ieee754.write(buf, value, offset, littleEndian, 52, 8) - return offset + 8 -} - -Buffer.prototype.writeDoubleLE = function writeDoubleLE (value, offset, noAssert) { - return writeDouble(this, value, offset, true, noAssert) -} - -Buffer.prototype.writeDoubleBE = function writeDoubleBE (value, offset, noAssert) { - return writeDouble(this, value, offset, false, noAssert) -} - -// copy(targetBuffer, targetStart=0, sourceStart=0, sourceEnd=buffer.length) -Buffer.prototype.copy = function copy (target, targetStart, start, end) { - if (!start) start = 0 - if (!end && end !== 0) end = this.length - if (targetStart >= target.length) targetStart = target.length - if (!targetStart) targetStart = 0 - if (end > 0 && end < start) end = start - - // Copy 0 bytes; we're done - if (end === start) return 0 - if (target.length === 0 || this.length === 0) return 0 - - // Fatal error conditions - if (targetStart < 0) { - throw new RangeError('targetStart out of bounds') - } - if (start < 0 || start >= this.length) throw new RangeError('sourceStart out of bounds') - if (end < 0) throw new RangeError('sourceEnd out of bounds') - - // Are we oob? - if (end > this.length) end = this.length - if (target.length - targetStart < end - start) { - end = target.length - targetStart + start - } - - var len = end - start - var i - - if (this === target && start < targetStart && targetStart < end) { - // descending copy from end - for (i = len - 1; i >= 0; i--) { - target[i + targetStart] = this[i + start] - } - } else if (len < 1000 || !Buffer.TYPED_ARRAY_SUPPORT) { - // ascending copy from start - for (i = 0; i < len; i++) { - target[i + targetStart] = this[i + start] - } - } else { - target._set(this.subarray(start, start + len), targetStart) - } - - return len -} - -// fill(value, start=0, end=buffer.length) -Buffer.prototype.fill = function fill (value, start, end) { - if (!value) value = 0 - if (!start) start = 0 - if (!end) end = this.length - - if (end < start) throw new RangeError('end < start') - - // Fill 0 bytes; we're done - if (end === start) return - if (this.length === 0) return - - if (start < 0 || start >= this.length) throw new RangeError('start out of bounds') - if (end < 0 || end > this.length) throw new RangeError('end out of bounds') - - var i - if (typeof value === 'number') { - for (i = start; i < end; i++) { - this[i] = value - } - } else { - var bytes = utf8ToBytes(value.toString()) - var len = bytes.length - for (i = start; i < end; i++) { - this[i] = bytes[i % len] - } - } - - return this -} - -/** - * Creates a new `ArrayBuffer` with the *copied* memory of the buffer instance. - * Added in Node 0.12. Only available in browsers that support ArrayBuffer. - */ -Buffer.prototype.toArrayBuffer = function toArrayBuffer () { - if (typeof Uint8Array !== 'undefined') { - if (Buffer.TYPED_ARRAY_SUPPORT) { - return (new Buffer(this)).buffer - } else { - var buf = new Uint8Array(this.length) - for (var i = 0, len = buf.length; i < len; i += 1) { - buf[i] = this[i] - } - return buf.buffer - } - } else { - throw new TypeError('Buffer.toArrayBuffer not supported in this browser') - } -} - -// HELPER FUNCTIONS -// ================ - -var BP = Buffer.prototype - -/** - * Augment a Uint8Array *instance* (not the Uint8Array class!) with Buffer methods - */ -Buffer._augment = function _augment (arr) { - arr.constructor = Buffer - arr._isBuffer = true - - // save reference to original Uint8Array set method before overwriting - arr._set = arr.set - - // deprecated - arr.get = BP.get - arr.set = BP.set - - arr.write = BP.write - arr.toString = BP.toString - arr.toLocaleString = BP.toString - arr.toJSON = BP.toJSON - arr.equals = BP.equals - arr.compare = BP.compare - arr.indexOf = BP.indexOf - arr.copy = BP.copy - arr.slice = BP.slice - arr.readUIntLE = BP.readUIntLE - arr.readUIntBE = BP.readUIntBE - arr.readUInt8 = BP.readUInt8 - arr.readUInt16LE = BP.readUInt16LE - arr.readUInt16BE = BP.readUInt16BE - arr.readUInt32LE = BP.readUInt32LE - arr.readUInt32BE = BP.readUInt32BE - arr.readIntLE = BP.readIntLE - arr.readIntBE = BP.readIntBE - arr.readInt8 = BP.readInt8 - arr.readInt16LE = BP.readInt16LE - arr.readInt16BE = BP.readInt16BE - arr.readInt32LE = BP.readInt32LE - arr.readInt32BE = BP.readInt32BE - arr.readFloatLE = BP.readFloatLE - arr.readFloatBE = BP.readFloatBE - arr.readDoubleLE = BP.readDoubleLE - arr.readDoubleBE = BP.readDoubleBE - arr.writeUInt8 = BP.writeUInt8 - arr.writeUIntLE = BP.writeUIntLE - arr.writeUIntBE = BP.writeUIntBE - arr.writeUInt16LE = BP.writeUInt16LE - arr.writeUInt16BE = BP.writeUInt16BE - arr.writeUInt32LE = BP.writeUInt32LE - arr.writeUInt32BE = BP.writeUInt32BE - arr.writeIntLE = BP.writeIntLE - arr.writeIntBE = BP.writeIntBE - arr.writeInt8 = BP.writeInt8 - arr.writeInt16LE = BP.writeInt16LE - arr.writeInt16BE = BP.writeInt16BE - arr.writeInt32LE = BP.writeInt32LE - arr.writeInt32BE = BP.writeInt32BE - arr.writeFloatLE = BP.writeFloatLE - arr.writeFloatBE = BP.writeFloatBE - arr.writeDoubleLE = BP.writeDoubleLE - arr.writeDoubleBE = BP.writeDoubleBE - arr.fill = BP.fill - arr.inspect = BP.inspect - arr.toArrayBuffer = BP.toArrayBuffer - - return arr -} - -var INVALID_BASE64_RE = /[^+\/0-9A-Za-z-_]/g - -function base64clean (str) { - // Node strips out invalid characters like \n and \t from the string, base64-js does not - str = stringtrim(str).replace(INVALID_BASE64_RE, '') - // Node converts strings with length < 2 to '' - if (str.length < 2) return '' - // Node allows for non-padded base64 strings (missing trailing ===), base64-js does not - while (str.length % 4 !== 0) { - str = str + '=' - } - return str -} - -function stringtrim (str) { - if (str.trim) return str.trim() - return str.replace(/^\s+|\s+$/g, '') -} - -function toHex (n) { - if (n < 16) return '0' + n.toString(16) - return n.toString(16) -} - -function utf8ToBytes (string, units) { - units = units || Infinity - var codePoint - var length = string.length - var leadSurrogate = null - var bytes = [] - - for (var i = 0; i < length; i++) { - codePoint = string.charCodeAt(i) - - // is surrogate component - if (codePoint > 0xD7FF && codePoint < 0xE000) { - // last char was a lead - if (!leadSurrogate) { - // no lead yet - if (codePoint > 0xDBFF) { - // unexpected trail - if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD) - continue - } else if (i + 1 === length) { - // unpaired lead - if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD) - continue - } - - // valid lead - leadSurrogate = codePoint - - continue - } - - // 2 leads in a row - if (codePoint < 0xDC00) { - if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD) - leadSurrogate = codePoint - continue - } - - // valid surrogate pair - codePoint = (leadSurrogate - 0xD800 << 10 | codePoint - 0xDC00) + 0x10000 - } else if (leadSurrogate) { - // valid bmp char, but last char was a lead - if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD) - } - - leadSurrogate = null - - // encode utf8 - if (codePoint < 0x80) { - if ((units -= 1) < 0) break - bytes.push(codePoint) - } else if (codePoint < 0x800) { - if ((units -= 2) < 0) break - bytes.push( - codePoint >> 0x6 | 0xC0, - codePoint & 0x3F | 0x80 - ) - } else if (codePoint < 0x10000) { - if ((units -= 3) < 0) break - bytes.push( - codePoint >> 0xC | 0xE0, - codePoint >> 0x6 & 0x3F | 0x80, - codePoint & 0x3F | 0x80 - ) - } else if (codePoint < 0x110000) { - if ((units -= 4) < 0) break - bytes.push( - codePoint >> 0x12 | 0xF0, - codePoint >> 0xC & 0x3F | 0x80, - codePoint >> 0x6 & 0x3F | 0x80, - codePoint & 0x3F | 0x80 - ) - } else { - throw new Error('Invalid code point') - } - } - - return bytes -} - -function asciiToBytes (str) { - var byteArray = [] - for (var i = 0; i < str.length; i++) { - // Node's code seems to be doing this and not & 0x7F.. - byteArray.push(str.charCodeAt(i) & 0xFF) - } - return byteArray -} - -function utf16leToBytes (str, units) { - var c, hi, lo - var byteArray = [] - for (var i = 0; i < str.length; i++) { - if ((units -= 2) < 0) break - - c = str.charCodeAt(i) - hi = c >> 8 - lo = c % 256 - byteArray.push(lo) - byteArray.push(hi) - } - - return byteArray -} - -function base64ToBytes (str) { - return base64.toByteArray(base64clean(str)) -} - -function blitBuffer (src, dst, offset, length) { - for (var i = 0; i < length; i++) { - if ((i + offset >= dst.length) || (i >= src.length)) break - dst[i + offset] = src[i] - } - return i -} diff --git a/node_modules/buffer/node_modules/isarray/.npmignore b/node_modules/buffer/node_modules/isarray/.npmignore deleted file mode 100644 index 3c3629e6..00000000 --- a/node_modules/buffer/node_modules/isarray/.npmignore +++ /dev/null @@ -1 +0,0 @@ -node_modules diff --git a/node_modules/buffer/node_modules/isarray/.travis.yml b/node_modules/buffer/node_modules/isarray/.travis.yml deleted file mode 100644 index cc4dba29..00000000 --- a/node_modules/buffer/node_modules/isarray/.travis.yml +++ /dev/null @@ -1,4 +0,0 @@ -language: node_js -node_js: - - "0.8" - - "0.10" diff --git a/node_modules/buffer/node_modules/isarray/Makefile b/node_modules/buffer/node_modules/isarray/Makefile deleted file mode 100644 index 787d56e1..00000000 --- a/node_modules/buffer/node_modules/isarray/Makefile +++ /dev/null @@ -1,6 +0,0 @@ - -test: - @node_modules/.bin/tape test.js - -.PHONY: test - diff --git a/node_modules/buffer/node_modules/isarray/README.md b/node_modules/buffer/node_modules/isarray/README.md deleted file mode 100644 index 16d2c59c..00000000 --- a/node_modules/buffer/node_modules/isarray/README.md +++ /dev/null @@ -1,60 +0,0 @@ - -# isarray - -`Array#isArray` for older browsers. - -[![build status](https://secure.travis-ci.org/juliangruber/isarray.svg)](http://travis-ci.org/juliangruber/isarray) -[![downloads](https://img.shields.io/npm/dm/isarray.svg)](https://www.npmjs.org/package/isarray) - -[![browser support](https://ci.testling.com/juliangruber/isarray.png) -](https://ci.testling.com/juliangruber/isarray) - -## Usage - -```js -var isArray = require('isarray'); - -console.log(isArray([])); // => true -console.log(isArray({})); // => false -``` - -## Installation - -With [npm](http://npmjs.org) do - -```bash -$ npm install isarray -``` - -Then bundle for the browser with -[browserify](https://github.com/substack/browserify). - -With [component](http://component.io) do - -```bash -$ component install juliangruber/isarray -``` - -## License - -(MIT) - -Copyright (c) 2013 Julian Gruber <julian@juliangruber.com> - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies -of the Software, and to permit persons to whom the Software is furnished to do -so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/node_modules/buffer/node_modules/isarray/component.json b/node_modules/buffer/node_modules/isarray/component.json deleted file mode 100644 index 9e31b683..00000000 --- a/node_modules/buffer/node_modules/isarray/component.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "name" : "isarray", - "description" : "Array#isArray for older browsers", - "version" : "0.0.1", - "repository" : "juliangruber/isarray", - "homepage": "https://github.com/juliangruber/isarray", - "main" : "index.js", - "scripts" : [ - "index.js" - ], - "dependencies" : {}, - "keywords": ["browser","isarray","array"], - "author": { - "name": "Julian Gruber", - "email": "mail@juliangruber.com", - "url": "http://juliangruber.com" - }, - "license": "MIT" -} diff --git a/node_modules/buffer/node_modules/isarray/index.js b/node_modules/buffer/node_modules/isarray/index.js deleted file mode 100644 index a57f6349..00000000 --- a/node_modules/buffer/node_modules/isarray/index.js +++ /dev/null @@ -1,5 +0,0 @@ -var toString = {}.toString; - -module.exports = Array.isArray || function (arr) { - return toString.call(arr) == '[object Array]'; -}; diff --git a/node_modules/buffer/node_modules/isarray/package.json b/node_modules/buffer/node_modules/isarray/package.json deleted file mode 100644 index 7968d942..00000000 --- a/node_modules/buffer/node_modules/isarray/package.json +++ /dev/null @@ -1,105 +0,0 @@ -{ - "_args": [ - [ - { - "raw": "isarray@^1.0.0", - "scope": null, - "escapedName": "isarray", - "name": "isarray", - "rawSpec": "^1.0.0", - "spec": ">=1.0.0 <2.0.0", - "type": "range" - }, - "/Users/benjaminarias/Desktop/poly/node_modules/buffer" - ] - ], - "_from": "isarray@>=1.0.0 <2.0.0", - "_id": "isarray@1.0.0", - "_inCache": true, - "_installable": true, - "_location": "/buffer/isarray", - "_nodeVersion": "5.1.0", - "_npmUser": { - "name": "juliangruber", - "email": "julian@juliangruber.com" - }, - "_npmVersion": "3.3.12", - "_phantomChildren": {}, - "_requested": { - "raw": "isarray@^1.0.0", - "scope": null, - "escapedName": "isarray", - "name": "isarray", - "rawSpec": "^1.0.0", - "spec": ">=1.0.0 <2.0.0", - "type": "range" - }, - "_requiredBy": [ - "/buffer" - ], - "_resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", - "_shasum": "bb935d48582cba168c06834957a54a3e07124f11", - "_shrinkwrap": null, - "_spec": "isarray@^1.0.0", - "_where": "/Users/benjaminarias/Desktop/poly/node_modules/buffer", - "author": { - "name": "Julian Gruber", - "email": "mail@juliangruber.com", - "url": "http://juliangruber.com" - }, - "bugs": { - "url": "https://github.com/juliangruber/isarray/issues" - }, - "dependencies": {}, - "description": "Array#isArray for older browsers", - "devDependencies": { - "tape": "~2.13.4" - }, - "directories": {}, - "dist": { - "shasum": "bb935d48582cba168c06834957a54a3e07124f11", - "tarball": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz" - }, - "gitHead": "2a23a281f369e9ae06394c0fb4d2381355a6ba33", - "homepage": "https://github.com/juliangruber/isarray", - "keywords": [ - "browser", - "isarray", - "array" - ], - "license": "MIT", - "main": "index.js", - "maintainers": [ - { - "name": "juliangruber", - "email": "julian@juliangruber.com" - } - ], - "name": "isarray", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git://github.com/juliangruber/isarray.git" - }, - "scripts": { - "test": "tape test.js" - }, - "testling": { - "files": "test.js", - "browsers": [ - "ie/8..latest", - "firefox/17..latest", - "firefox/nightly", - "chrome/22..latest", - "chrome/canary", - "opera/12..latest", - "opera/next", - "safari/5.1..latest", - "ipad/6.0..latest", - "iphone/6.0..latest", - "android-browser/4.2..latest" - ] - }, - "version": "1.0.0" -} diff --git a/node_modules/buffer/node_modules/isarray/test.js b/node_modules/buffer/node_modules/isarray/test.js deleted file mode 100644 index e0c3444d..00000000 --- a/node_modules/buffer/node_modules/isarray/test.js +++ /dev/null @@ -1,20 +0,0 @@ -var isArray = require('./'); -var test = require('tape'); - -test('is array', function(t){ - t.ok(isArray([])); - t.notOk(isArray({})); - t.notOk(isArray(null)); - t.notOk(isArray(false)); - - var obj = {}; - obj[0] = true; - t.notOk(isArray(obj)); - - var arr = []; - arr.foo = 'bar'; - t.ok(isArray(arr)); - - t.end(); -}); - diff --git a/node_modules/buffer/package.json b/node_modules/buffer/package.json deleted file mode 100644 index b577d26d..00000000 --- a/node_modules/buffer/package.json +++ /dev/null @@ -1,137 +0,0 @@ -{ - "_args": [ - [ - { - "raw": "buffer@^3.0.0", - "scope": null, - "escapedName": "buffer", - "name": "buffer", - "rawSpec": "^3.0.0", - "spec": ">=3.0.0 <4.0.0", - "type": "range" - }, - "/Users/benjaminarias/Desktop/poly/node_modules/browserify" - ] - ], - "_from": "buffer@>=3.0.0 <4.0.0", - "_id": "buffer@3.6.0", - "_inCache": true, - "_installable": true, - "_location": "/buffer", - "_nodeVersion": "4.2.3", - "_npmUser": { - "name": "feross", - "email": "feross@feross.org" - }, - "_npmVersion": "2.14.7", - "_phantomChildren": {}, - "_requested": { - "raw": "buffer@^3.0.0", - "scope": null, - "escapedName": "buffer", - "name": "buffer", - "rawSpec": "^3.0.0", - "spec": ">=3.0.0 <4.0.0", - "type": "range" - }, - "_requiredBy": [ - "/browserify" - ], - "_resolved": "https://registry.npmjs.org/buffer/-/buffer-3.6.0.tgz", - "_shasum": "a72c936f77b96bf52f5f7e7b467180628551defb", - "_shrinkwrap": null, - "_spec": "buffer@^3.0.0", - "_where": "/Users/benjaminarias/Desktop/poly/node_modules/browserify", - "author": { - "name": "Feross Aboukhadijeh", - "email": "feross@feross.org", - "url": "http://feross.org" - }, - "bugs": { - "url": "https://github.com/feross/buffer/issues" - }, - "contributors": [ - { - "name": "Romain Beauxis", - "email": "toots@rastageeks.org" - }, - { - "name": "James Halliday", - "email": "mail@substack.net" - } - ], - "dependencies": { - "base64-js": "0.0.8", - "ieee754": "^1.1.4", - "isarray": "^1.0.0" - }, - "description": "Node.js Buffer API, for the browser", - "devDependencies": { - "benchmark": "^1.0.0", - "browserify": "^12.0.1", - "concat-stream": "^1.4.7", - "hyperquest": "^1.0.1", - "is-nan": "^1.0.1", - "split": "^1.0.0", - "standard": "^5.0.0", - "tape": "^4.0.0", - "through2": "^2.0.0", - "zuul": "^3.0.0" - }, - "directories": {}, - "dist": { - "shasum": "a72c936f77b96bf52f5f7e7b467180628551defb", - "tarball": "https://registry.npmjs.org/buffer/-/buffer-3.6.0.tgz" - }, - "gitHead": "73e77e481f6ebc7a97be87468ddf9e8daf72a93c", - "homepage": "https://github.com/feross/buffer", - "jspm": { - "map": { - "./index.js": { - "node": "@node/buffer" - } - } - }, - "keywords": [ - "buffer", - "browserify", - "compatible", - "browser", - "arraybuffer", - "uint8array", - "dataview" - ], - "license": "MIT", - "main": "index.js", - "maintainers": [ - { - "name": "feross", - "email": "feross@feross.org" - } - ], - "name": "buffer", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git://github.com/feross/buffer.git" - }, - "scripts": { - "perf": "browserify --debug perf/bracket-notation.js > perf/bundle.js && open perf/index.html", - "perf-node": "node perf/bracket-notation.js && node perf/concat.js && node perf/copy-big.js && node perf/copy.js && node perf/new-big.js && node perf/new.js && node perf/readDoubleBE.js && node perf/readFloatBE.js && node perf/readUInt32LE.js && node perf/slice.js && node perf/writeFloatBE.js", - "size": "browserify -r ./ | uglifyjs -c -m | gzip | wc -c", - "test": "standard && node ./bin/test.js", - "test-browser": "zuul -- test/*.js test/node/*.js", - "test-browser-local": "zuul --local -- test/*.js test/node/*.js", - "test-node": "tape test/*.js test/node/*.js test/node-es6/*.js && OBJECT_IMPL=true tape test/*.js test/node/*.js" - }, - "standard": { - "ignore": [ - "test/node/*.js", - "test/node-es6/*.js", - "test/_polyfill.js", - "perf/*.js" - ] - }, - "version": "3.6.0" -} diff --git a/node_modules/buffer/test/_polyfill.js b/node_modules/buffer/test/_polyfill.js deleted file mode 100644 index 61f9c180..00000000 --- a/node_modules/buffer/test/_polyfill.js +++ /dev/null @@ -1,150 +0,0 @@ -if (!Array.prototype.forEach) { - - Array.prototype.forEach = function(callback, thisArg) { - - var T, k; - - if (this == null) { - throw new TypeError(' this is null or not defined'); - } - - // 1. Let O be the result of calling ToObject passing the |this| value as the argument. - var O = Object(this); - - // 2. Let lenValue be the result of calling the Get internal method of O with the argument "length". - // 3. Let len be ToUint32(lenValue). - var len = O.length >>> 0; - - // 4. If IsCallable(callback) is false, throw a TypeError exception. - // See: http://es5.github.com/#x9.11 - if (typeof callback !== "function") { - throw new TypeError(callback + ' is not a function'); - } - - // 5. If thisArg was supplied, let T be thisArg; else let T be undefined. - if (arguments.length > 1) { - T = thisArg; - } - - // 6. Let k be 0 - k = 0; - - // 7. Repeat, while k < len - while (k < len) { - - var kValue; - - // a. Let Pk be ToString(k). - // This is implicit for LHS operands of the in operator - // b. Let kPresent be the result of calling the HasProperty internal method of O with argument Pk. - // This step can be combined with c - // c. If kPresent is true, then - if (k in O) { - - // i. Let kValue be the result of calling the Get internal method of O with argument Pk. - kValue = O[k]; - - // ii. Call the Call internal method of callback with T as the this value and - // argument list containing kValue, k, and O. - callback.call(T, kValue, k, O); - } - // d. Increase k by 1. - k++; - } - // 8. return undefined - }; -} - -if (!Array.isArray) { - Array.isArray = function(arg) { - return Object.prototype.toString.call(arg) === '[object Array]'; - }; -} - -if (!Array.prototype.map) { - - Array.prototype.map = function(callback, thisArg) { - - var T, A, k; - - if (this == null) { - throw new TypeError(' this is null or not defined'); - } - - // 1. Let O be the result of calling ToObject passing the |this| - // value as the argument. - var O = Object(this); - - // 2. Let lenValue be the result of calling the Get internal - // method of O with the argument "length". - // 3. Let len be ToUint32(lenValue). - var len = O.length >>> 0; - - // 4. If IsCallable(callback) is false, throw a TypeError exception. - // See: http://es5.github.com/#x9.11 - if (typeof callback !== 'function') { - throw new TypeError(callback + ' is not a function'); - } - - // 5. If thisArg was supplied, let T be thisArg; else let T be undefined. - if (arguments.length > 1) { - T = thisArg; - } - - // 6. Let A be a new array created as if by the expression new Array(len) - // where Array is the standard built-in constructor with that name and - // len is the value of len. - A = new Array(len); - - // 7. Let k be 0 - k = 0; - - // 8. Repeat, while k < len - while (k < len) { - - var kValue, mappedValue; - - // a. Let Pk be ToString(k). - // This is implicit for LHS operands of the in operator - // b. Let kPresent be the result of calling the HasProperty internal - // method of O with argument Pk. - // This step can be combined with c - // c. If kPresent is true, then - if (k in O) { - - // i. Let kValue be the result of calling the Get internal - // method of O with argument Pk. - kValue = O[k]; - - // ii. Let mappedValue be the result of calling the Call internal - // method of callback with T as the this value and argument - // list containing kValue, k, and O. - mappedValue = callback.call(T, kValue, k, O); - - // iii. Call the DefineOwnProperty internal method of A with arguments - // Pk, Property Descriptor - // { Value: mappedValue, - // Writable: true, - // Enumerable: true, - // Configurable: true }, - // and false. - - // In browsers that support Object.defineProperty, use the following: - // Object.defineProperty(A, k, { - // value: mappedValue, - // writable: true, - // enumerable: true, - // configurable: true - // }); - - // For best browser support, use the following: - A[k] = mappedValue; - } - // d. Increase k by 1. - k++; - } - - // 9. return A - return A; - }; -} diff --git a/node_modules/buffer/test/base64.js b/node_modules/buffer/test/base64.js deleted file mode 100644 index e4ecc56a..00000000 --- a/node_modules/buffer/test/base64.js +++ /dev/null @@ -1,47 +0,0 @@ -if (process.env.OBJECT_IMPL) global.TYPED_ARRAY_SUPPORT = false -var B = require('../').Buffer -var test = require('tape') - -test('base64: ignore whitespace', function (t) { - var text = '\n YW9ldQ== ' - var buf = new B(text, 'base64') - t.equal(buf.toString(), 'aoeu') - t.end() -}) - -test('base64: strings without padding', function (t) { - t.equal((new B('YW9ldQ', 'base64').toString()), 'aoeu') - t.end() -}) - -test('base64: newline in utf8 -- should not be an issue', function (t) { - t.equal( - new B('LS0tCnRpdGxlOiBUaHJlZSBkYXNoZXMgbWFya3MgdGhlIHNwb3QKdGFnczoK', 'base64').toString('utf8'), - '---\ntitle: Three dashes marks the spot\ntags:\n' - ) - t.end() -}) - -test('base64: newline in base64 -- should get stripped', function (t) { - t.equal( - new B('LS0tCnRpdGxlOiBUaHJlZSBkYXNoZXMgbWFya3MgdGhlIHNwb3QKdGFnczoK\nICAtIHlhbWwKICAtIGZyb250LW1hdHRlcgogIC0gZGFzaGVzCmV4cGFuZWQt', 'base64').toString('utf8'), - '---\ntitle: Three dashes marks the spot\ntags:\n - yaml\n - front-matter\n - dashes\nexpaned-' - ) - t.end() -}) - -test('base64: tab characters in base64 - should get stripped', function (t) { - t.equal( - new B('LS0tCnRpdGxlOiBUaHJlZSBkYXNoZXMgbWFya3MgdGhlIHNwb3QKdGFnczoK\t\t\t\tICAtIHlhbWwKICAtIGZyb250LW1hdHRlcgogIC0gZGFzaGVzCmV4cGFuZWQt', 'base64').toString('utf8'), - '---\ntitle: Three dashes marks the spot\ntags:\n - yaml\n - front-matter\n - dashes\nexpaned-' - ) - t.end() -}) - -test('base64: invalid non-alphanumeric characters -- should be stripped', function (t) { - t.equal( - new B('!"#$%&\'()*,.:;<=>?@[\\]^`{|}~', 'base64').toString('utf8'), - '' - ) - t.end() -}) diff --git a/node_modules/buffer/test/basic.js b/node_modules/buffer/test/basic.js deleted file mode 100644 index d2fac762..00000000 --- a/node_modules/buffer/test/basic.js +++ /dev/null @@ -1,91 +0,0 @@ -if (process.env.OBJECT_IMPL) global.TYPED_ARRAY_SUPPORT = false -var B = require('../').Buffer -var test = require('tape') - -test('buf.constructor is Buffer', function (t) { - var buf = new B([1, 2]) - t.strictEqual(buf.constructor, B) - t.end() -}) - -test('instanceof Buffer', function (t) { - var buf = new B([1, 2]) - t.ok(buf instanceof B) - t.end() -}) - -test('convert to Uint8Array in modern browsers', function (t) { - if (B.TYPED_ARRAY_SUPPORT) { - var buf = new B([1, 2]) - var uint8array = new Uint8Array(buf.buffer) - t.ok(uint8array instanceof Uint8Array) - t.equal(uint8array[0], 1) - t.equal(uint8array[1], 2) - } else { - t.pass('object impl: skipping test') - } - t.end() -}) - -test('indexes from a string', function (t) { - var buf = new B('abc') - t.equal(buf[0], 97) - t.equal(buf[1], 98) - t.equal(buf[2], 99) - t.end() -}) - -test('indexes from an array', function (t) { - var buf = new B([ 97, 98, 99 ]) - t.equal(buf[0], 97) - t.equal(buf[1], 98) - t.equal(buf[2], 99) - t.end() -}) - -test('setting index value should modify buffer contents', function (t) { - var buf = new B([ 97, 98, 99 ]) - t.equal(buf[2], 99) - t.equal(buf.toString(), 'abc') - - buf[2] += 10 - t.equal(buf[2], 109) - t.equal(buf.toString(), 'abm') - t.end() -}) - -test('storing negative number should cast to unsigned', function (t) { - var buf = new B(1) - - if (B.TYPED_ARRAY_SUPPORT) { - // This does not work with the object implementation -- nothing we can do! - buf[0] = -3 - t.equal(buf[0], 253) - } - - buf = new B(1) - buf.writeInt8(-3, 0) - t.equal(buf[0], 253) - - t.end() -}) - -test('test that memory is copied from array-like', function (t) { - if (B.TYPED_ARRAY_SUPPORT) { - var u = new Uint8Array(4) - var b = new B(u) - b[0] = 1 - b[1] = 2 - b[2] = 3 - b[3] = 4 - - t.equal(u[0], 0) - t.equal(u[1], 0) - t.equal(u[2], 0) - t.equal(u[3], 0) - } else { - t.pass('object impl: skipping test') - } - - t.end() -}) diff --git a/node_modules/buffer/test/compare.js b/node_modules/buffer/test/compare.js deleted file mode 100644 index 62b478c7..00000000 --- a/node_modules/buffer/test/compare.js +++ /dev/null @@ -1,59 +0,0 @@ -if (process.env.OBJECT_IMPL) global.TYPED_ARRAY_SUPPORT = false -var B = require('../').Buffer -var test = require('tape') - -test('buffer.compare', function (t) { - var b = new B(1).fill('a') - var c = new B(1).fill('c') - var d = new B(2).fill('aa') - - t.equal(b.compare(c), -1) - t.equal(c.compare(d), 1) - t.equal(d.compare(b), 1) - t.equal(b.compare(d), -1) - - // static method - t.equal(B.compare(b, c), -1) - t.equal(B.compare(c, d), 1) - t.equal(B.compare(d, b), 1) - t.equal(B.compare(b, d), -1) - t.end() -}) - -test('buffer.compare argument validation', function (t) { - t.throws(function () { - var b = new B(1) - B.compare(b, 'abc') - }) - - t.throws(function () { - var b = new B(1) - B.compare('abc', b) - }) - - t.throws(function () { - var b = new B(1) - b.compare('abc') - }) - t.end() -}) - -test('buffer.equals', function (t) { - var b = new B(5).fill('abcdf') - var c = new B(5).fill('abcdf') - var d = new B(5).fill('abcde') - var e = new B(6).fill('abcdef') - - t.ok(b.equals(c)) - t.ok(!c.equals(d)) - t.ok(!d.equals(e)) - t.end() -}) - -test('buffer.equals argument validation', function (t) { - t.throws(function () { - var b = new B(1) - b.equals('abc') - }) - t.end() -}) diff --git a/node_modules/buffer/test/constructor.js b/node_modules/buffer/test/constructor.js deleted file mode 100644 index 1661c25d..00000000 --- a/node_modules/buffer/test/constructor.js +++ /dev/null @@ -1,154 +0,0 @@ -if (process.env.OBJECT_IMPL) global.TYPED_ARRAY_SUPPORT = false -var B = require('../').Buffer -var test = require('tape') - -test('new buffer from array', function (t) { - t.equal( - new B([1, 2, 3]).toString(), - '\u0001\u0002\u0003' - ) - t.end() -}) - -test('new buffer from array w/ negatives', function (t) { - t.equal( - new B([-1, -2, -3]).toString('hex'), - 'fffefd' - ) - t.end() -}) - -test('new buffer from array with mixed signed input', function (t) { - t.equal( - new B([-255, 255, -128, 128, 512, -512, 511, -511]).toString('hex'), - '01ff80800000ff01' - ) - t.end() -}) - -test('new buffer from string', function (t) { - t.equal( - new B('hey', 'utf8').toString(), - 'hey' - ) - t.end() -}) - -test('new buffer from buffer', function (t) { - var b1 = new B('asdf') - var b2 = new B(b1) - t.equal(b1.toString('hex'), b2.toString('hex')) - t.end() -}) - -test('new buffer from Uint8Array', function (t) { - if (typeof Uint8Array !== 'undefined') { - var b1 = new Uint8Array([0, 1, 2, 3]) - var b2 = new B(b1) - t.equal(b1.length, b2.length) - t.equal(b1[0], 0) - t.equal(b1[1], 1) - t.equal(b1[2], 2) - t.equal(b1[3], 3) - t.equal(b1[4], undefined) - } - t.end() -}) - -test('new buffer from Uint16Array', function (t) { - if (typeof Uint16Array !== 'undefined') { - var b1 = new Uint16Array([0, 1, 2, 3]) - var b2 = new B(b1) - t.equal(b1.length, b2.length) - t.equal(b1[0], 0) - t.equal(b1[1], 1) - t.equal(b1[2], 2) - t.equal(b1[3], 3) - t.equal(b1[4], undefined) - } - t.end() -}) - -test('new buffer from Uint32Array', function (t) { - if (typeof Uint32Array !== 'undefined') { - var b1 = new Uint32Array([0, 1, 2, 3]) - var b2 = new B(b1) - t.equal(b1.length, b2.length) - t.equal(b1[0], 0) - t.equal(b1[1], 1) - t.equal(b1[2], 2) - t.equal(b1[3], 3) - t.equal(b1[4], undefined) - } - t.end() -}) - -test('new buffer from Int16Array', function (t) { - if (typeof Int16Array !== 'undefined') { - var b1 = new Int16Array([0, 1, 2, 3]) - var b2 = new B(b1) - t.equal(b1.length, b2.length) - t.equal(b1[0], 0) - t.equal(b1[1], 1) - t.equal(b1[2], 2) - t.equal(b1[3], 3) - t.equal(b1[4], undefined) - } - t.end() -}) - -test('new buffer from Int32Array', function (t) { - if (typeof Int32Array !== 'undefined') { - var b1 = new Int32Array([0, 1, 2, 3]) - var b2 = new B(b1) - t.equal(b1.length, b2.length) - t.equal(b1[0], 0) - t.equal(b1[1], 1) - t.equal(b1[2], 2) - t.equal(b1[3], 3) - t.equal(b1[4], undefined) - } - t.end() -}) - -test('new buffer from Float32Array', function (t) { - if (typeof Float32Array !== 'undefined') { - var b1 = new Float32Array([0, 1, 2, 3]) - var b2 = new B(b1) - t.equal(b1.length, b2.length) - t.equal(b1[0], 0) - t.equal(b1[1], 1) - t.equal(b1[2], 2) - t.equal(b1[3], 3) - t.equal(b1[4], undefined) - } - t.end() -}) - -test('new buffer from Float64Array', function (t) { - if (typeof Float64Array !== 'undefined') { - var b1 = new Float64Array([0, 1, 2, 3]) - var b2 = new B(b1) - t.equal(b1.length, b2.length) - t.equal(b1[0], 0) - t.equal(b1[1], 1) - t.equal(b1[2], 2) - t.equal(b1[3], 3) - t.equal(b1[4], undefined) - } - t.end() -}) - -test('new buffer from buffer.toJSON() output', function (t) { - if (typeof JSON === 'undefined') { - // ie6, ie7 lack support - t.end() - return - } - var buf = new B('test') - var json = JSON.stringify(buf) - var obj = JSON.parse(json) - var copy = new B(obj) - t.ok(buf.equals(copy)) - t.end() -}) diff --git a/node_modules/buffer/test/deprecated.js b/node_modules/buffer/test/deprecated.js deleted file mode 100644 index 991d6142..00000000 --- a/node_modules/buffer/test/deprecated.js +++ /dev/null @@ -1,19 +0,0 @@ -if (process.env.OBJECT_IMPL) global.TYPED_ARRAY_SUPPORT = false -var B = require('../').Buffer -var test = require('tape') - -test('.get (deprecated)', function (t) { - var b = new B([7, 42]) - t.equal(b.get(0), 7) - t.equal(b.get(1), 42) - t.end() -}) - -test('.set (deprecated)', function (t) { - var b = new B(2) - b.set(7, 0) - b.set(42, 1) - t.equal(b[0], 7) - t.equal(b[1], 42) - t.end() -}) diff --git a/node_modules/buffer/test/from-string.js b/node_modules/buffer/test/from-string.js deleted file mode 100644 index e25db269..00000000 --- a/node_modules/buffer/test/from-string.js +++ /dev/null @@ -1,132 +0,0 @@ -if (process.env.OBJECT_IMPL) global.TYPED_ARRAY_SUPPORT = false -var B = require('../').Buffer -var test = require('tape') - -test('detect utf16 surrogate pairs', function (t) { - var text = '\uD83D\uDE38' + '\uD83D\uDCAD' + '\uD83D\uDC4D' - var buf = new B(text) - t.equal(text, buf.toString()) - t.end() -}) - -test('detect utf16 surrogate pairs over U+20000 until U+10FFFF', function (t) { - var text = '\uD842\uDFB7' + '\uD93D\uDCAD' + '\uDBFF\uDFFF' - var buf = new B(text) - t.equal(text, buf.toString()) - t.end() -}) - -test('replace orphaned utf16 surrogate lead code point', function (t) { - var text = '\uD83D\uDE38' + '\uD83D' + '\uD83D\uDC4D' - var buf = new B(text) - t.deepEqual(buf, new B([ 0xf0, 0x9f, 0x98, 0xb8, 0xef, 0xbf, 0xbd, 0xf0, 0x9f, 0x91, 0x8d ])) - t.end() -}) - -test('replace orphaned utf16 surrogate trail code point', function (t) { - var text = '\uD83D\uDE38' + '\uDCAD' + '\uD83D\uDC4D' - var buf = new B(text) - t.deepEqual(buf, new B([ 0xf0, 0x9f, 0x98, 0xb8, 0xef, 0xbf, 0xbd, 0xf0, 0x9f, 0x91, 0x8d ])) - t.end() -}) - -test('do not write partial utf16 code units', function (t) { - var f = new B([0, 0, 0, 0, 0]) - t.equal(f.length, 5) - var size = f.write('あいうえお', 'utf16le') - t.equal(size, 4) - t.deepEqual(f, new B([0x42, 0x30, 0x44, 0x30, 0x00])) - t.end() -}) - -test('handle partial utf16 code points when encoding to utf8 the way node does', function (t) { - var text = '\uD83D\uDE38' + '\uD83D\uDC4D' - - var buf = new B(8) - buf.fill(0) - buf.write(text) - t.deepEqual(buf, new B([ 0xf0, 0x9f, 0x98, 0xb8, 0xf0, 0x9f, 0x91, 0x8d ])) - - buf = new B(7) - buf.fill(0) - buf.write(text) - t.deepEqual(buf, new B([ 0xf0, 0x9f, 0x98, 0xb8, 0x00, 0x00, 0x00 ])) - - buf = new B(6) - buf.fill(0) - buf.write(text) - t.deepEqual(buf, new B([ 0xf0, 0x9f, 0x98, 0xb8, 0x00, 0x00 ])) - - buf = new B(5) - buf.fill(0) - buf.write(text) - t.deepEqual(buf, new B([ 0xf0, 0x9f, 0x98, 0xb8, 0x00 ])) - - buf = new B(4) - buf.fill(0) - buf.write(text) - t.deepEqual(buf, new B([ 0xf0, 0x9f, 0x98, 0xb8 ])) - - buf = new B(3) - buf.fill(0) - buf.write(text) - t.deepEqual(buf, new B([ 0x00, 0x00, 0x00 ])) - - buf = new B(2) - buf.fill(0) - buf.write(text) - t.deepEqual(buf, new B([ 0x00, 0x00 ])) - - buf = new B(1) - buf.fill(0) - buf.write(text) - t.deepEqual(buf, new B([ 0x00 ])) - - t.end() -}) - -test('handle invalid utf16 code points when encoding to utf8 the way node does', function (t) { - var text = 'a' + '\uDE38\uD83D' + 'b' - - var buf = new B(8) - buf.fill(0) - buf.write(text) - t.deepEqual(buf, new B([ 0x61, 0xef, 0xbf, 0xbd, 0xef, 0xbf, 0xbd, 0x62 ])) - - buf = new B(7) - buf.fill(0) - buf.write(text) - t.deepEqual(buf, new B([ 0x61, 0xef, 0xbf, 0xbd, 0xef, 0xbf, 0xbd ])) - - buf = new B(6) - buf.fill(0) - buf.write(text) - t.deepEqual(buf, new B([ 0x61, 0xef, 0xbf, 0xbd, 0x00, 0x00 ])) - - buf = new B(5) - buf.fill(0) - buf.write(text) - t.deepEqual(buf, new B([ 0x61, 0xef, 0xbf, 0xbd, 0x00 ])) - - buf = new B(4) - buf.fill(0) - buf.write(text) - t.deepEqual(buf, new B([ 0x61, 0xef, 0xbf, 0xbd ])) - - buf = new B(3) - buf.fill(0) - buf.write(text) - t.deepEqual(buf, new B([ 0x61, 0x00, 0x00 ])) - - buf = new B(2) - buf.fill(0) - buf.write(text) - t.deepEqual(buf, new B([ 0x61, 0x00 ])) - - buf = new B(1) - buf.fill(0) - buf.write(text) - t.deepEqual(buf, new B([ 0x61 ])) - - t.end() -}) diff --git a/node_modules/buffer/test/methods.js b/node_modules/buffer/test/methods.js deleted file mode 100644 index f4bd3f21..00000000 --- a/node_modules/buffer/test/methods.js +++ /dev/null @@ -1,127 +0,0 @@ -if (process.env.OBJECT_IMPL) global.TYPED_ARRAY_SUPPORT = false -var B = require('../').Buffer -var test = require('tape') - -test('buffer.toJSON', function (t) { - var data = [1, 2, 3, 4] - t.deepEqual( - new B(data).toJSON(), - { type: 'Buffer', data: [ 1, 2, 3, 4 ] } - ) - t.end() -}) - -test('buffer.copy', function (t) { - // copied from nodejs.org example - var buf1 = new B(26) - var buf2 = new B(26) - - for (var i = 0; i < 26; i++) { - buf1[i] = i + 97 // 97 is ASCII a - buf2[i] = 33 // ASCII ! - } - - buf1.copy(buf2, 8, 16, 20) - - t.equal( - buf2.toString('ascii', 0, 25), - '!!!!!!!!qrst!!!!!!!!!!!!!' - ) - t.end() -}) - -test('test offset returns are correct', function (t) { - var b = new B(16) - t.equal(4, b.writeUInt32LE(0, 0)) - t.equal(6, b.writeUInt16LE(0, 4)) - t.equal(7, b.writeUInt8(0, 6)) - t.equal(8, b.writeInt8(0, 7)) - t.equal(16, b.writeDoubleLE(0, 8)) - t.end() -}) - -test('concat() a varying number of buffers', function (t) { - var zero = [] - var one = [ new B('asdf') ] - var long = [] - for (var i = 0; i < 10; i++) { - long.push(new B('asdf')) - } - - var flatZero = B.concat(zero) - var flatOne = B.concat(one) - var flatLong = B.concat(long) - var flatLongLen = B.concat(long, 40) - - t.equal(flatZero.length, 0) - t.equal(flatOne.toString(), 'asdf') - t.deepEqual(flatOne, one[0]) - t.equal(flatLong.toString(), (new Array(10 + 1).join('asdf'))) - t.equal(flatLongLen.toString(), (new Array(10 + 1).join('asdf'))) - t.end() -}) - -test('fill', function (t) { - var b = new B(10) - b.fill(2) - t.equal(b.toString('hex'), '02020202020202020202') - t.end() -}) - -test('fill (string)', function (t) { - var b = new B(10) - b.fill('abc') - t.equal(b.toString(), 'abcabcabca') - b.fill('է') - t.equal(b.toString(), 'էէէէէ') - t.end() -}) - -test('copy() empty buffer with sourceEnd=0', function (t) { - var source = new B([42]) - var destination = new B([43]) - source.copy(destination, 0, 0, 0) - t.equal(destination.readUInt8(0), 43) - t.end() -}) - -test('copy() after slice()', function (t) { - var source = new B(200) - var dest = new B(200) - var expected = new B(200) - for (var i = 0; i < 200; i++) { - source[i] = i - dest[i] = 0 - } - - source.slice(2).copy(dest) - source.copy(expected, 0, 2) - t.deepEqual(dest, expected) - t.end() -}) - -test('copy() ascending', function (t) { - var b = new B('abcdefghij') - b.copy(b, 0, 3, 10) - t.equal(b.toString(), 'defghijhij') - t.end() -}) - -test('copy() descending', function (t) { - var b = new B('abcdefghij') - b.copy(b, 3, 0, 7) - t.equal(b.toString(), 'abcabcdefg') - t.end() -}) - -test('buffer.slice sets indexes', function (t) { - t.equal((new B('hallo')).slice(0, 5).toString(), 'hallo') - t.end() -}) - -test('buffer.slice out of range', function (t) { - t.plan(2) - t.equal((new B('hallo')).slice(0, 10).toString(), 'hallo') - t.equal((new B('hallo')).slice(10, 2).toString(), '') - t.end() -}) diff --git a/node_modules/buffer/test/node-es6/README.txt b/node_modules/buffer/test/node-es6/README.txt deleted file mode 100644 index 94199ff3..00000000 --- a/node_modules/buffer/test/node-es6/README.txt +++ /dev/null @@ -1 +0,0 @@ -node buffer tests that require ES6 (e.g. "for..of" construct) diff --git a/node_modules/buffer/test/node-es6/test-buffer-arraybuffer.js b/node_modules/buffer/test/node-es6/test-buffer-arraybuffer.js deleted file mode 100644 index f0eb57c7..00000000 --- a/node_modules/buffer/test/node-es6/test-buffer-arraybuffer.js +++ /dev/null @@ -1,49 +0,0 @@ -'use strict'; -if (process.env.OBJECT_IMPL) global.TYPED_ARRAY_SUPPORT = false; -var Buffer = require('../../').Buffer; - -var common = {}; -var assert = require('assert'); - -var Buffer = require('../../').Buffer; -var LENGTH = 16; - -var ab = new ArrayBuffer(LENGTH); -var dv = new DataView(ab); -var ui = new Uint8Array(ab); -var buf = new Buffer(ab); - - -assert.ok(Buffer.isBuffer(buf)); -// For backwards compatibility of old .parent property test that if buf is not -// a slice then .parent should be undefined. -assert.equal(buf.parent, undefined); -assert.equal(buf.buffer, ab); -assert.equal(buf.length, ab.byteLength); - - -buf.fill(0xC); -for (var i = 0; i < LENGTH; i++) { - assert.equal(ui[i], 0xC); - ui[i] = 0xF; - assert.equal(buf[i], 0xF); -} - -buf.writeUInt32LE(0xF00, 0); -buf.writeUInt32BE(0xB47, 4); -buf.writeDoubleLE(3.1415, 8); - -assert.equal(dv.getUint32(0, true), 0xF00); -assert.equal(dv.getUint32(4), 0xB47); -assert.equal(dv.getFloat64(8, true), 3.1415); - - -// Now test protecting users from doing stupid things - -assert.throws(function() { - function AB() { } - AB.__proto__ = ArrayBuffer; - AB.prototype.__proto__ = ArrayBuffer.prototype; - new Buffer(new AB()); -}, TypeError); - diff --git a/node_modules/buffer/test/node-es6/test-buffer-iterator.js b/node_modules/buffer/test/node-es6/test-buffer-iterator.js deleted file mode 100644 index 3aa3fbf0..00000000 --- a/node_modules/buffer/test/node-es6/test-buffer-iterator.js +++ /dev/null @@ -1,65 +0,0 @@ -'use strict'; -if (process.env.OBJECT_IMPL) global.TYPED_ARRAY_SUPPORT = false; -var Buffer = require('../../').Buffer; -var common = {}; -var assert = require('assert'); - -var buffer = new Buffer([1, 2, 3, 4, 5]); -var arr; -var b; - -// buffers should be iterable - -arr = []; - -for (b of buffer) - arr.push(b); - -assert.deepEqual(arr, [1, 2, 3, 4, 5]); - - -// buffer iterators should be iterable - -arr = []; - -for (b of buffer[Symbol.iterator]()) - arr.push(b); - -assert.deepEqual(arr, [1, 2, 3, 4, 5]); - - -// buffer#values() should return iterator for values - -arr = []; - -for (b of buffer.values()) - arr.push(b); - -assert.deepEqual(arr, [1, 2, 3, 4, 5]); - - -// buffer#keys() should return iterator for keys - -arr = []; - -for (b of buffer.keys()) - arr.push(b); - -assert.deepEqual(arr, [0, 1, 2, 3, 4]); - - -// buffer#entries() should return iterator for entries - -arr = []; - -for (var b of buffer.entries()) - arr.push(b); - -assert.deepEqual(arr, [ - [0, 1], - [1, 2], - [2, 3], - [3, 4], - [4, 5] -]); - diff --git a/node_modules/buffer/test/node/README.txt b/node_modules/buffer/test/node/README.txt deleted file mode 100644 index a0fd927f..00000000 --- a/node_modules/buffer/test/node/README.txt +++ /dev/null @@ -1 +0,0 @@ -node core buffer tests diff --git a/node_modules/buffer/test/node/test-buffer-ascii.js b/node_modules/buffer/test/node/test-buffer-ascii.js deleted file mode 100644 index 633a6779..00000000 --- a/node_modules/buffer/test/node/test-buffer-ascii.js +++ /dev/null @@ -1,28 +0,0 @@ -'use strict'; -if (process.env.OBJECT_IMPL) global.TYPED_ARRAY_SUPPORT = false; -var Buffer = require('../../').Buffer; -var common = {}; -var assert = require('assert'); - -// ASCII conversion in node.js simply masks off the high bits, -// it doesn't do transliteration. -assert.equal(Buffer('hérité').toString('ascii'), 'hC)ritC)'); - -// 71 characters, 78 bytes. The ’ character is a triple-byte sequence. -var input = 'C’est, graphiquement, la réunion d’un accent aigu ' + - 'et d’un accent grave.'; - -var expected = 'Cb\u0000\u0019est, graphiquement, la rC)union ' + - 'db\u0000\u0019un accent aigu et db\u0000\u0019un ' + - 'accent grave.'; - -var buf = Buffer(input); - -for (var i = 0; i < expected.length; ++i) { - assert.equal(buf.slice(i).toString('ascii'), expected.slice(i)); - - // Skip remainder of multi-byte sequence. - if (input.charCodeAt(i) > 65535) ++i; - if (input.charCodeAt(i) > 127) ++i; -} - diff --git a/node_modules/buffer/test/node/test-buffer-bytelength.js b/node_modules/buffer/test/node/test-buffer-bytelength.js deleted file mode 100644 index d63922e9..00000000 --- a/node_modules/buffer/test/node/test-buffer-bytelength.js +++ /dev/null @@ -1,49 +0,0 @@ -'use strict'; -if (process.env.OBJECT_IMPL) global.TYPED_ARRAY_SUPPORT = false; -var Buffer = require('../../').Buffer; - -var common = {}; -var assert = require('assert'); -var Buffer = require('../../').Buffer; - -// coerce values to string -assert.equal(Buffer.byteLength(32, 'raw'), 2); -assert.equal(Buffer.byteLength(NaN, 'utf8'), 3); -assert.equal(Buffer.byteLength({}, 'raws'), 15); -assert.equal(Buffer.byteLength(), 9); - -// special case: zero length string -assert.equal(Buffer.byteLength('', 'ascii'), 0); -assert.equal(Buffer.byteLength('', 'HeX'), 0); - -// utf8 -assert.equal(Buffer.byteLength('∑éllö wørl∂!', 'utf-8'), 19); -assert.equal(Buffer.byteLength('κλμνξο', 'utf8'), 12); -assert.equal(Buffer.byteLength('挵挶挷挸挹', 'utf-8'), 15); -assert.equal(Buffer.byteLength('𠝹𠱓𠱸', 'UTF8'), 12); -// without an encoding, utf8 should be assumed -assert.equal(Buffer.byteLength('hey there'), 9); -assert.equal(Buffer.byteLength('𠱸挶νξ#xx :)'), 17); -assert.equal(Buffer.byteLength('hello world', ''), 11); -// it should also be assumed with unrecognized encoding -assert.equal(Buffer.byteLength('hello world', 'abc'), 11); -assert.equal(Buffer.byteLength('ßœ∑≈', 'unkn0wn enc0ding'), 10); - -// base64 -assert.equal(Buffer.byteLength('aGVsbG8gd29ybGQ=', 'base64'), 11); -assert.equal(Buffer.byteLength('bm9kZS5qcyByb2NrcyE=', 'base64'), 14); -assert.equal(Buffer.byteLength('aGkk', 'base64'), 3); -assert.equal(Buffer.byteLength('bHNrZGZsa3NqZmtsc2xrZmFqc2RsZmtqcw==', - 'base64'), 25); -// special padding -assert.equal(Buffer.byteLength('aaa=', 'base64'), 2); -assert.equal(Buffer.byteLength('aaaa==', 'base64'), 3); - -assert.equal(Buffer.byteLength('Il était tué'), 14); -assert.equal(Buffer.byteLength('Il était tué', 'utf8'), 14); -assert.equal(Buffer.byteLength('Il était tué', 'ascii'), 12); -assert.equal(Buffer.byteLength('Il était tué', 'binary'), 12); -['ucs2', 'ucs-2', 'utf16le', 'utf-16le'].forEach(function(encoding) { - assert.equal(24, Buffer.byteLength('Il était tué', encoding)); -}); - diff --git a/node_modules/buffer/test/node/test-buffer-concat.js b/node_modules/buffer/test/node/test-buffer-concat.js deleted file mode 100644 index f6b60ae8..00000000 --- a/node_modules/buffer/test/node/test-buffer-concat.js +++ /dev/null @@ -1,30 +0,0 @@ -'use strict'; -if (process.env.OBJECT_IMPL) global.TYPED_ARRAY_SUPPORT = false; -var Buffer = require('../../').Buffer; -var common = {}; -var assert = require('assert'); - -var zero = []; -var one = [ new Buffer('asdf') ]; -var long = []; -for (var i = 0; i < 10; i++) long.push(new Buffer('asdf')); - -var flatZero = Buffer.concat(zero); -var flatOne = Buffer.concat(one); -var flatLong = Buffer.concat(long); -var flatLongLen = Buffer.concat(long, 40); - -assert(flatZero.length === 0); -assert(flatOne.toString() === 'asdf'); -// A special case where concat used to return the first item, -// if the length is one. This check is to make sure that we don't do that. -assert(flatOne !== one[0]); -assert(flatLong.toString() === (new Array(10 + 1).join('asdf'))); -assert(flatLongLen.toString() === (new Array(10 + 1).join('asdf'))); - -assert.throws(function() { - Buffer.concat([42]); -}, TypeError); - -// console.log('ok'); - diff --git a/node_modules/buffer/test/node/test-buffer-indexof.js b/node_modules/buffer/test/node/test-buffer-indexof.js deleted file mode 100644 index 283b9c8b..00000000 --- a/node_modules/buffer/test/node/test-buffer-indexof.js +++ /dev/null @@ -1,79 +0,0 @@ -'use strict'; -if (process.env.OBJECT_IMPL) global.TYPED_ARRAY_SUPPORT = false; -var Buffer = require('../../').Buffer; -var common = {}; -var assert = require('assert'); - -var Buffer = require('../../').Buffer; - -var b = new Buffer('abcdef'); -var buf_a = new Buffer('a'); -var buf_bc = new Buffer('bc'); -var buf_f = new Buffer('f'); -var buf_z = new Buffer('z'); -var buf_empty = new Buffer(''); - -assert.equal(b.indexOf('a'), 0); -assert.equal(b.indexOf('a', 1), -1); -assert.equal(b.indexOf('a', -1), -1); -assert.equal(b.indexOf('a', -4), -1); -assert.equal(b.indexOf('a', -b.length), 0); -assert.equal(b.indexOf('a', NaN), 0); -assert.equal(b.indexOf('a', -Infinity), 0); -assert.equal(b.indexOf('a', Infinity), -1); -assert.equal(b.indexOf('bc'), 1); -assert.equal(b.indexOf('bc', 2), -1); -assert.equal(b.indexOf('bc', -1), -1); -assert.equal(b.indexOf('bc', -3), -1); -assert.equal(b.indexOf('bc', -5), 1); -assert.equal(b.indexOf('bc', NaN), 1); -assert.equal(b.indexOf('bc', -Infinity), 1); -assert.equal(b.indexOf('bc', Infinity), -1); -assert.equal(b.indexOf('f'), b.length - 1); -assert.equal(b.indexOf('z'), -1); -assert.equal(b.indexOf(''), -1); -assert.equal(b.indexOf('', 1), -1); -assert.equal(b.indexOf('', b.length + 1), -1); -assert.equal(b.indexOf('', Infinity), -1); -assert.equal(b.indexOf(buf_a), 0); -assert.equal(b.indexOf(buf_a, 1), -1); -assert.equal(b.indexOf(buf_a, -1), -1); -assert.equal(b.indexOf(buf_a, -4), -1); -assert.equal(b.indexOf(buf_a, -b.length), 0); -assert.equal(b.indexOf(buf_a, NaN), 0); -assert.equal(b.indexOf(buf_a, -Infinity), 0); -assert.equal(b.indexOf(buf_a, Infinity), -1); -assert.equal(b.indexOf(buf_bc), 1); -assert.equal(b.indexOf(buf_bc, 2), -1); -assert.equal(b.indexOf(buf_bc, -1), -1); -assert.equal(b.indexOf(buf_bc, -3), -1); -assert.equal(b.indexOf(buf_bc, -5), 1); -assert.equal(b.indexOf(buf_bc, NaN), 1); -assert.equal(b.indexOf(buf_bc, -Infinity), 1); -assert.equal(b.indexOf(buf_bc, Infinity), -1); -assert.equal(b.indexOf(buf_f), b.length - 1); -assert.equal(b.indexOf(buf_z), -1); -assert.equal(b.indexOf(buf_empty), -1); -assert.equal(b.indexOf(buf_empty, 1), -1); -assert.equal(b.indexOf(buf_empty, b.length + 1), -1); -assert.equal(b.indexOf(buf_empty, Infinity), -1); -assert.equal(b.indexOf(0x61), 0); -assert.equal(b.indexOf(0x61, 1), -1); -assert.equal(b.indexOf(0x61, -1), -1); -assert.equal(b.indexOf(0x61, -4), -1); -assert.equal(b.indexOf(0x61, -b.length), 0); -assert.equal(b.indexOf(0x61, NaN), 0); -assert.equal(b.indexOf(0x61, -Infinity), 0); -assert.equal(b.indexOf(0x61, Infinity), -1); -assert.equal(b.indexOf(0x0), -1); - -assert.throws(function() { - b.indexOf(function() { }); -}); -assert.throws(function() { - b.indexOf({}); -}); -assert.throws(function() { - b.indexOf([]); -}); - diff --git a/node_modules/buffer/test/node/test-buffer-inspect.js b/node_modules/buffer/test/node/test-buffer-inspect.js deleted file mode 100644 index 719444f3..00000000 --- a/node_modules/buffer/test/node/test-buffer-inspect.js +++ /dev/null @@ -1,41 +0,0 @@ -'use strict'; -if (process.env.OBJECT_IMPL) global.TYPED_ARRAY_SUPPORT = false; -var Buffer = require('../../').Buffer; -var common = {}; -var assert = require('assert'); - -var util = require('util'); - -var buffer = require('../../'); - -buffer.INSPECT_MAX_BYTES = 2; - -var b = new Buffer(4); -b.fill('1234'); - -var s = new buffer.SlowBuffer(4); -s.fill('1234'); - -var expected = ''; - -assert.strictEqual(util.inspect(b), expected); -assert.strictEqual(util.inspect(s), expected); - -b = new Buffer(2); -b.fill('12'); - -s = new buffer.SlowBuffer(2); -s.fill('12'); - -expected = ''; - -assert.strictEqual(util.inspect(b), expected); -assert.strictEqual(util.inspect(s), expected); - -buffer.INSPECT_MAX_BYTES = Infinity; - -assert.doesNotThrow(function() { - assert.strictEqual(util.inspect(b), expected); - assert.strictEqual(util.inspect(s), expected); -}); - diff --git a/node_modules/buffer/test/node/test-buffer.js b/node_modules/buffer/test/node/test-buffer.js deleted file mode 100644 index d6468f6a..00000000 --- a/node_modules/buffer/test/node/test-buffer.js +++ /dev/null @@ -1,1194 +0,0 @@ -'use strict'; -if (process.env.OBJECT_IMPL) global.TYPED_ARRAY_SUPPORT = false; -var Buffer = require('../../').Buffer; -var common = {}; -var assert = require('assert'); - -var Buffer = require('../../').Buffer; -var SlowBuffer = require('../../').SlowBuffer; - -// counter to ensure unique value is always copied -var cntr = 0; - -var b = Buffer(1024); // safe constructor - -// console.log('b.length == %d', b.length); -assert.strictEqual(1024, b.length); - -b[0] = 255; -assert.strictEqual(b[0], 255); - -for (var i = 0; i < 1024; i++) { - b[i] = i % 256; -} - -for (var i = 0; i < 1024; i++) { - assert.strictEqual(i % 256, b[i]); -} - -var c = new Buffer(512); -// console.log('c.length == %d', c.length); -assert.strictEqual(512, c.length); - -// First check Buffer#fill() works as expected. - -assert.throws(function() { - Buffer(8).fill('a', -1); -}); - -assert.throws(function() { - Buffer(8).fill('a', 0, 9); -}); - -// Make sure this doesn't hang indefinitely. -Buffer(8).fill(''); - -var buf = new Buffer(64); -buf.fill(10); -for (var i = 0; i < buf.length; i++) - assert.equal(buf[i], 10); - -buf.fill(11, 0, buf.length >> 1); -for (var i = 0; i < buf.length >> 1; i++) - assert.equal(buf[i], 11); -for (var i = (buf.length >> 1) + 1; i < buf.length; i++) - assert.equal(buf[i], 10); - -buf.fill('h'); -for (var i = 0; i < buf.length; i++) - assert.equal('h'.charCodeAt(0), buf[i]); - -buf.fill(0); -for (var i = 0; i < buf.length; i++) - assert.equal(0, buf[i]); - -buf.fill(null); -for (var i = 0; i < buf.length; i++) - assert.equal(0, buf[i]); - -buf.fill(1, 16, 32); -for (var i = 0; i < 16; i++) - assert.equal(0, buf[i]); -for (; i < 32; i++) - assert.equal(1, buf[i]); -for (; i < buf.length; i++) - assert.equal(0, buf[i]); - -var buf = new Buffer(10); -buf.fill('abc'); -assert.equal(buf.toString(), 'abcabcabca'); -buf.fill('է'); -assert.equal(buf.toString(), 'էէէէէ'); - -// copy 512 bytes, from 0 to 512. -b.fill(++cntr); -c.fill(++cntr); -var copied = b.copy(c, 0, 0, 512); -// console.log('copied %d bytes from b into c', copied); -assert.strictEqual(512, copied); -for (var i = 0; i < c.length; i++) { - assert.strictEqual(b[i], c[i]); -} - -// copy c into b, without specifying sourceEnd -b.fill(++cntr); -c.fill(++cntr); -var copied = c.copy(b, 0, 0); -// console.log('copied %d bytes from c into b w/o sourceEnd', copied); -assert.strictEqual(c.length, copied); -for (var i = 0; i < c.length; i++) { - assert.strictEqual(c[i], b[i]); -} - -// copy c into b, without specifying sourceStart -b.fill(++cntr); -c.fill(++cntr); -var copied = c.copy(b, 0); -// console.log('copied %d bytes from c into b w/o sourceStart', copied); -assert.strictEqual(c.length, copied); -for (var i = 0; i < c.length; i++) { - assert.strictEqual(c[i], b[i]); -} - -// copy longer buffer b to shorter c without targetStart -b.fill(++cntr); -c.fill(++cntr); -var copied = b.copy(c); -// console.log('copied %d bytes from b into c w/o targetStart', copied); -assert.strictEqual(c.length, copied); -for (var i = 0; i < c.length; i++) { - assert.strictEqual(b[i], c[i]); -} - -// copy starting near end of b to c -b.fill(++cntr); -c.fill(++cntr); -var copied = b.copy(c, 0, b.length - Math.floor(c.length / 2)); -// console.log('copied %d bytes from end of b into beginning of c', copied); -assert.strictEqual(Math.floor(c.length / 2), copied); -for (var i = 0; i < Math.floor(c.length / 2); i++) { - assert.strictEqual(b[b.length - Math.floor(c.length / 2) + i], c[i]); -} -for (var i = Math.floor(c.length / 2) + 1; i < c.length; i++) { - assert.strictEqual(c[c.length - 1], c[i]); -} - -// try to copy 513 bytes, and check we don't overrun c -b.fill(++cntr); -c.fill(++cntr); -var copied = b.copy(c, 0, 0, 513); -// console.log('copied %d bytes from b trying to overrun c', copied); -assert.strictEqual(c.length, copied); -for (var i = 0; i < c.length; i++) { - assert.strictEqual(b[i], c[i]); -} - -// copy 768 bytes from b into b -b.fill(++cntr); -b.fill(++cntr, 256); -var copied = b.copy(b, 0, 256, 1024); -// console.log('copied %d bytes from b into b', copied); -assert.strictEqual(768, copied); -for (var i = 0; i < b.length; i++) { - assert.strictEqual(cntr, b[i]); -} - -// copy string longer than buffer length (failure will segfault) -var bb = new Buffer(10); -bb.fill('hello crazy world'); - - -var caught_error = null; - -// try to copy from before the beginning of b -caught_error = null; -try { - var copied = b.copy(c, 0, 100, 10); -} catch (err) { - caught_error = err; -} - -// copy throws at negative sourceStart -assert.throws(function() { - Buffer(5).copy(Buffer(5), 0, -1); -}, RangeError); - -// check sourceEnd resets to targetEnd if former is greater than the latter -b.fill(++cntr); -c.fill(++cntr); -var copied = b.copy(c, 0, 0, 1025); -// console.log('copied %d bytes from b into c', copied); -for (var i = 0; i < c.length; i++) { - assert.strictEqual(b[i], c[i]); -} - -// throw with negative sourceEnd -// console.log('test copy at negative sourceEnd'); -assert.throws(function() { - b.copy(c, 0, 0, -1); -}, RangeError); - -// when sourceStart is greater than sourceEnd, zero copied -assert.equal(b.copy(c, 0, 100, 10), 0); - -// when targetStart > targetLength, zero copied -assert.equal(b.copy(c, 512, 0, 10), 0); - -var caught_error; - -// invalid encoding for Buffer.toString -caught_error = null; -try { - var copied = b.toString('invalid'); -} catch (err) { - caught_error = err; -} -assert.strictEqual('Unknown encoding: invalid', caught_error.message); - -// invalid encoding for Buffer.write -caught_error = null; -try { - var copied = b.write('test string', 0, 5, 'invalid'); -} catch (err) { - caught_error = err; -} -assert.strictEqual('Unknown encoding: invalid', caught_error.message); - -// try to create 0-length buffers -new Buffer(''); -new Buffer('', 'ascii'); -new Buffer('', 'binary'); -new Buffer(0); - -// try to write a 0-length string beyond the end of b -assert.throws(function() { - b.write('', 2048); -}, RangeError); - -// throw when writing to negative offset -assert.throws(function() { - b.write('a', -1); -}, RangeError); - -// throw when writing past bounds from the pool -assert.throws(function() { - b.write('a', 2048); -}, RangeError); - -// throw when writing to negative offset -assert.throws(function() { - b.write('a', -1); -}, RangeError); - -// try to copy 0 bytes worth of data into an empty buffer -b.copy(new Buffer(0), 0, 0, 0); - -// try to copy 0 bytes past the end of the target buffer -b.copy(new Buffer(0), 1, 1, 1); -b.copy(new Buffer(1), 1, 1, 1); - -// try to copy 0 bytes from past the end of the source buffer -b.copy(new Buffer(1), 0, 2048, 2048); - -// try to toString() a 0-length slice of a buffer, both within and without the -// valid buffer range -assert.equal(new Buffer('abc').toString('ascii', 0, 0), ''); -assert.equal(new Buffer('abc').toString('ascii', -100, -100), ''); -assert.equal(new Buffer('abc').toString('ascii', 100, 100), ''); - -// try toString() with a object as a encoding -assert.equal(new Buffer('abc').toString({toString: function() { - return 'ascii'; -}}), 'abc'); - -// testing for smart defaults and ability to pass string values as offset -var writeTest = new Buffer('abcdes'); -writeTest.write('n', 'ascii'); -writeTest.write('o', 'ascii', '1'); -writeTest.write('d', '2', 'ascii'); -writeTest.write('e', 3, 'ascii'); -writeTest.write('j', 'ascii', 4); -assert.equal(writeTest.toString(), 'nodejs'); - -// ASCII slice test - -var asciiString = 'hello world'; -var offset = 100; - -for (var i = 0; i < asciiString.length; i++) { - b[i] = asciiString.charCodeAt(i); -} -var asciiSlice = b.toString('ascii', 0, asciiString.length); -assert.equal(asciiString, asciiSlice); - -var written = b.write(asciiString, offset, 'ascii'); -assert.equal(asciiString.length, written); -var asciiSlice = b.toString('ascii', offset, offset + asciiString.length); -assert.equal(asciiString, asciiSlice); - -var sliceA = b.slice(offset, offset + asciiString.length); -var sliceB = b.slice(offset, offset + asciiString.length); -for (var i = 0; i < asciiString.length; i++) { - assert.equal(sliceA[i], sliceB[i]); -} - -// UTF-8 slice test - -var utf8String = '¡hέlló wôrld!'; -var offset = 100; - -b.write(utf8String, 0, Buffer.byteLength(utf8String), 'utf8'); -var utf8Slice = b.toString('utf8', 0, Buffer.byteLength(utf8String)); -assert.equal(utf8String, utf8Slice); - -var written = b.write(utf8String, offset, 'utf8'); -assert.equal(Buffer.byteLength(utf8String), written); -utf8Slice = b.toString('utf8', offset, offset + Buffer.byteLength(utf8String)); -assert.equal(utf8String, utf8Slice); - -var sliceA = b.slice(offset, offset + Buffer.byteLength(utf8String)); -var sliceB = b.slice(offset, offset + Buffer.byteLength(utf8String)); -for (var i = 0; i < Buffer.byteLength(utf8String); i++) { - assert.equal(sliceA[i], sliceB[i]); -} - -var slice = b.slice(100, 150); -assert.equal(50, slice.length); -for (var i = 0; i < 50; i++) { - assert.equal(b[100 + i], slice[i]); -} - - -// make sure only top level parent propagates from allocPool -var b = new Buffer(5); -var c = b.slice(0, 4); -var d = c.slice(0, 2); -assert.equal(b.parent, c.parent); -assert.equal(b.parent, d.parent); - -// also from a non-pooled instance -var b = new SlowBuffer(5); -var c = b.slice(0, 4); -var d = c.slice(0, 2); - - -// Bug regression test -var testValue = '\u00F6\u65E5\u672C\u8A9E'; // ö日本語 -var buffer = new Buffer(32); -var size = buffer.write(testValue, 0, 'utf8'); -// console.log('bytes written to buffer: ' + size); -var slice = buffer.toString('utf8', 0, size); -assert.equal(slice, testValue); - - -// Test triple slice -var a = new Buffer(8); -for (var i = 0; i < 8; i++) a[i] = i; -var b = a.slice(4, 8); -assert.equal(4, b[0]); -assert.equal(5, b[1]); -assert.equal(6, b[2]); -assert.equal(7, b[3]); -var c = b.slice(2, 4); -assert.equal(6, c[0]); -assert.equal(7, c[1]); - - -var d = new Buffer([23, 42, 255]); -assert.equal(d.length, 3); -assert.equal(d[0], 23); -assert.equal(d[1], 42); -assert.equal(d[2], 255); -assert.deepEqual(d, new Buffer(d)); - -var e = new Buffer('über'); -// console.error('uber: \'%s\'', e.toString()); -assert.deepEqual(e, new Buffer([195, 188, 98, 101, 114])); - -var f = new Buffer('über', 'ascii'); -// console.error('f.length: %d (should be 4)', f.length); -assert.deepEqual(f, new Buffer([252, 98, 101, 114])); - -['ucs2', 'ucs-2', 'utf16le', 'utf-16le'].forEach(function(encoding) { - var f = new Buffer('über', encoding); -// console.error('f.length: %d (should be 8)', f.length); - assert.deepEqual(f, new Buffer([252, 0, 98, 0, 101, 0, 114, 0])); - - var f = new Buffer('привет', encoding); -// console.error('f.length: %d (should be 12)', f.length); - assert.deepEqual(f, new Buffer([63, 4, 64, 4, 56, 4, 50, 4, 53, 4, 66, 4])); - assert.equal(f.toString(encoding), 'привет'); - - var f = new Buffer([0, 0, 0, 0, 0]); - assert.equal(f.length, 5); - var size = f.write('あいうえお', encoding); -// console.error('bytes written to buffer: %d (should be 4)', size); - assert.equal(size, 4); - assert.deepEqual(f, new Buffer([0x42, 0x30, 0x44, 0x30, 0x00])); -}); - -var f = new Buffer('\uD83D\uDC4D', 'utf-16le'); // THUMBS UP SIGN (U+1F44D) -assert.equal(f.length, 4); -assert.deepEqual(f, new Buffer('3DD84DDC', 'hex')); - - -var arrayIsh = {0: 0, 1: 1, 2: 2, 3: 3, length: 4}; -var g = new Buffer(arrayIsh); -assert.deepEqual(g, new Buffer([0, 1, 2, 3])); -var strArrayIsh = {0: '0', 1: '1', 2: '2', 3: '3', length: 4}; -g = new Buffer(strArrayIsh); -assert.deepEqual(g, new Buffer([0, 1, 2, 3])); - - -// -// Test toString('base64') -// -assert.equal('TWFu', (new Buffer('Man')).toString('base64')); - -// test that regular and URL-safe base64 both work -var expected = [0xff, 0xff, 0xbe, 0xff, 0xef, 0xbf, 0xfb, 0xef, 0xff]; -assert.deepEqual(Buffer('//++/++/++//', 'base64'), Buffer(expected)); -assert.deepEqual(Buffer('__--_--_--__', 'base64'), Buffer(expected)); - -// big example -var quote = 'Man is distinguished, not only by his reason, but by this ' + - 'singular passion from other animals, which is a lust ' + - 'of the mind, that by a perseverance of delight in the continued ' + - 'and indefatigable generation of knowledge, exceeds the short ' + - 'vehemence of any carnal pleasure.'; -var expected = 'TWFuIGlzIGRpc3Rpbmd1aXNoZWQsIG5vdCBvbmx5IGJ5IGhpcyByZWFzb24s' + - 'IGJ1dCBieSB0aGlzIHNpbmd1bGFyIHBhc3Npb24gZnJvbSBvdGhlciBhbmltY' + - 'WxzLCB3aGljaCBpcyBhIGx1c3Qgb2YgdGhlIG1pbmQsIHRoYXQgYnkgYSBwZX' + - 'JzZXZlcmFuY2Ugb2YgZGVsaWdodCBpbiB0aGUgY29udGludWVkIGFuZCBpbmR' + - 'lZmF0aWdhYmxlIGdlbmVyYXRpb24gb2Yga25vd2xlZGdlLCBleGNlZWRzIHRo' + - 'ZSBzaG9ydCB2ZWhlbWVuY2Ugb2YgYW55IGNhcm5hbCBwbGVhc3VyZS4='; -assert.equal(expected, (new Buffer(quote)).toString('base64')); - - -b = new Buffer(1024); -var bytesWritten = b.write(expected, 0, 'base64'); -assert.equal(quote.length, bytesWritten); -assert.equal(quote, b.toString('ascii', 0, quote.length)); - -// check that the base64 decoder ignores whitespace -var expectedWhite = expected.slice(0, 60) + ' \n' + - expected.slice(60, 120) + ' \n' + - expected.slice(120, 180) + ' \n' + - expected.slice(180, 240) + ' \n' + - expected.slice(240, 300) + '\n' + - expected.slice(300, 360) + '\n'; -b = new Buffer(1024); -bytesWritten = b.write(expectedWhite, 0, 'base64'); -assert.equal(quote.length, bytesWritten); -assert.equal(quote, b.toString('ascii', 0, quote.length)); - -// check that the base64 decoder on the constructor works -// even in the presence of whitespace. -b = new Buffer(expectedWhite, 'base64'); -assert.equal(quote.length, b.length); -assert.equal(quote, b.toString('ascii', 0, quote.length)); - -// check that the base64 decoder ignores illegal chars -var expectedIllegal = expected.slice(0, 60) + ' \x80' + - expected.slice(60, 120) + ' \xff' + - expected.slice(120, 180) + ' \x00' + - expected.slice(180, 240) + ' \x98' + - expected.slice(240, 300) + '\x03' + - expected.slice(300, 360); -b = new Buffer(expectedIllegal, 'base64'); -assert.equal(quote.length, b.length); -assert.equal(quote, b.toString('ascii', 0, quote.length)); - - -assert.equal(new Buffer('', 'base64').toString(), ''); -assert.equal(new Buffer('K', 'base64').toString(), ''); - -// multiple-of-4 with padding -assert.equal(new Buffer('Kg==', 'base64').toString(), '*'); -assert.equal(new Buffer('Kio=', 'base64').toString(), '**'); -assert.equal(new Buffer('Kioq', 'base64').toString(), '***'); -assert.equal(new Buffer('KioqKg==', 'base64').toString(), '****'); -assert.equal(new Buffer('KioqKio=', 'base64').toString(), '*****'); -assert.equal(new Buffer('KioqKioq', 'base64').toString(), '******'); -assert.equal(new Buffer('KioqKioqKg==', 'base64').toString(), '*******'); -assert.equal(new Buffer('KioqKioqKio=', 'base64').toString(), '********'); -assert.equal(new Buffer('KioqKioqKioq', 'base64').toString(), '*********'); -assert.equal(new Buffer('KioqKioqKioqKg==', 'base64').toString(), - '**********'); -assert.equal(new Buffer('KioqKioqKioqKio=', 'base64').toString(), - '***********'); -assert.equal(new Buffer('KioqKioqKioqKioq', 'base64').toString(), - '************'); -assert.equal(new Buffer('KioqKioqKioqKioqKg==', 'base64').toString(), - '*************'); -assert.equal(new Buffer('KioqKioqKioqKioqKio=', 'base64').toString(), - '**************'); -assert.equal(new Buffer('KioqKioqKioqKioqKioq', 'base64').toString(), - '***************'); -assert.equal(new Buffer('KioqKioqKioqKioqKioqKg==', 'base64').toString(), - '****************'); -assert.equal(new Buffer('KioqKioqKioqKioqKioqKio=', 'base64').toString(), - '*****************'); -assert.equal(new Buffer('KioqKioqKioqKioqKioqKioq', 'base64').toString(), - '******************'); -assert.equal(new Buffer('KioqKioqKioqKioqKioqKioqKg==', 'base64').toString(), - '*******************'); -assert.equal(new Buffer('KioqKioqKioqKioqKioqKioqKio=', 'base64').toString(), - '********************'); - -// no padding, not a multiple of 4 -assert.equal(new Buffer('Kg', 'base64').toString(), '*'); -assert.equal(new Buffer('Kio', 'base64').toString(), '**'); -assert.equal(new Buffer('KioqKg', 'base64').toString(), '****'); -assert.equal(new Buffer('KioqKio', 'base64').toString(), '*****'); -assert.equal(new Buffer('KioqKioqKg', 'base64').toString(), '*******'); -assert.equal(new Buffer('KioqKioqKio', 'base64').toString(), '********'); -assert.equal(new Buffer('KioqKioqKioqKg', 'base64').toString(), '**********'); -assert.equal(new Buffer('KioqKioqKioqKio', 'base64').toString(), '***********'); -assert.equal(new Buffer('KioqKioqKioqKioqKg', 'base64').toString(), - '*************'); -assert.equal(new Buffer('KioqKioqKioqKioqKio', 'base64').toString(), - '**************'); -assert.equal(new Buffer('KioqKioqKioqKioqKioqKg', 'base64').toString(), - '****************'); -assert.equal(new Buffer('KioqKioqKioqKioqKioqKio', 'base64').toString(), - '*****************'); -assert.equal(new Buffer('KioqKioqKioqKioqKioqKioqKg', 'base64').toString(), - '*******************'); -assert.equal(new Buffer('KioqKioqKioqKioqKioqKioqKio', 'base64').toString(), - '********************'); - -// handle padding graciously, multiple-of-4 or not -assert.equal(new Buffer('72INjkR5fchcxk9+VgdGPFJDxUBFR5/rMFsghgxADiw==', - 'base64').length, 32); -assert.equal(new Buffer('72INjkR5fchcxk9+VgdGPFJDxUBFR5/rMFsghgxADiw=', - 'base64').length, 32); -assert.equal(new Buffer('72INjkR5fchcxk9+VgdGPFJDxUBFR5/rMFsghgxADiw', - 'base64').length, 32); -assert.equal(new Buffer('w69jACy6BgZmaFvv96HG6MYksWytuZu3T1FvGnulPg==', - 'base64').length, 31); -assert.equal(new Buffer('w69jACy6BgZmaFvv96HG6MYksWytuZu3T1FvGnulPg=', - 'base64').length, 31); -assert.equal(new Buffer('w69jACy6BgZmaFvv96HG6MYksWytuZu3T1FvGnulPg', - 'base64').length, 31); - -// This string encodes single '.' character in UTF-16 -var dot = new Buffer('//4uAA==', 'base64'); -assert.equal(dot[0], 0xff); -assert.equal(dot[1], 0xfe); -assert.equal(dot[2], 0x2e); -assert.equal(dot[3], 0x00); -assert.equal(dot.toString('base64'), '//4uAA=='); - -// Writing base64 at a position > 0 should not mangle the result. -// -// https://github.com/joyent/node/issues/402 -var segments = ['TWFkbmVzcz8h', 'IFRoaXM=', 'IGlz', 'IG5vZGUuanMh']; -var buf = new Buffer(64); -var pos = 0; - -for (var i = 0; i < segments.length; ++i) { - pos += b.write(segments[i], pos, 'base64'); -} -assert.equal(b.toString('binary', 0, pos), 'Madness?! This is node.js!'); - -// Creating buffers larger than pool size. -var l = Buffer.poolSize + 5; -var s = ''; -for (i = 0; i < l; i++) { - s += 'h'; -} - -var b = new Buffer(s); - -for (i = 0; i < l; i++) { - assert.equal('h'.charCodeAt(0), b[i]); -} - -var sb = b.toString(); -assert.equal(sb.length, s.length); -assert.equal(sb, s); - - -// Single argument slice -b = new Buffer('abcde'); -assert.equal('bcde', b.slice(1).toString()); - -// slice(0,0).length === 0 -assert.equal(0, Buffer('hello').slice(0, 0).length); - -// test hex toString -// console.log('Create hex string from buffer'); -var hexb = new Buffer(256); -for (var i = 0; i < 256; i++) { - hexb[i] = i; -} -var hexStr = hexb.toString('hex'); -assert.equal(hexStr, - '000102030405060708090a0b0c0d0e0f' + - '101112131415161718191a1b1c1d1e1f' + - '202122232425262728292a2b2c2d2e2f' + - '303132333435363738393a3b3c3d3e3f' + - '404142434445464748494a4b4c4d4e4f' + - '505152535455565758595a5b5c5d5e5f' + - '606162636465666768696a6b6c6d6e6f' + - '707172737475767778797a7b7c7d7e7f' + - '808182838485868788898a8b8c8d8e8f' + - '909192939495969798999a9b9c9d9e9f' + - 'a0a1a2a3a4a5a6a7a8a9aaabacadaeaf' + - 'b0b1b2b3b4b5b6b7b8b9babbbcbdbebf' + - 'c0c1c2c3c4c5c6c7c8c9cacbcccdcecf' + - 'd0d1d2d3d4d5d6d7d8d9dadbdcdddedf' + - 'e0e1e2e3e4e5e6e7e8e9eaebecedeeef' + - 'f0f1f2f3f4f5f6f7f8f9fafbfcfdfeff'); - -// console.log('Create buffer from hex string'); -var hexb2 = new Buffer(hexStr, 'hex'); -for (var i = 0; i < 256; i++) { - assert.equal(hexb2[i], hexb[i]); -} - -// test an invalid slice end. -// console.log('Try to slice off the end of the buffer'); -var b = new Buffer([1, 2, 3, 4, 5]); -var b2 = b.toString('hex', 1, 10000); -var b3 = b.toString('hex', 1, 5); -var b4 = b.toString('hex', 1); -assert.equal(b2, b3); -assert.equal(b2, b4); - - -function buildBuffer(data) { - if (Array.isArray(data)) { - var buffer = new Buffer(data.length); - data.forEach(function(v, k) { - buffer[k] = v; - }); - return buffer; - } - return null; -} - -var x = buildBuffer([0x81, 0xa3, 0x66, 0x6f, 0x6f, 0xa3, 0x62, 0x61, 0x72]); - -// console.log(x.inspect()); -assert.equal('', x.inspect()); - -var z = x.slice(4); -// console.log(z.inspect()); -// console.log(z.length); -assert.equal(5, z.length); -assert.equal(0x6f, z[0]); -assert.equal(0xa3, z[1]); -assert.equal(0x62, z[2]); -assert.equal(0x61, z[3]); -assert.equal(0x72, z[4]); - -var z = x.slice(0); -// console.log(z.inspect()); -// console.log(z.length); -assert.equal(z.length, x.length); - -var z = x.slice(0, 4); -// console.log(z.inspect()); -// console.log(z.length); -assert.equal(4, z.length); -assert.equal(0x81, z[0]); -assert.equal(0xa3, z[1]); - -var z = x.slice(0, 9); -// console.log(z.inspect()); -// console.log(z.length); -assert.equal(9, z.length); - -var z = x.slice(1, 4); -// console.log(z.inspect()); -// console.log(z.length); -assert.equal(3, z.length); -assert.equal(0xa3, z[0]); - -var z = x.slice(2, 4); -// console.log(z.inspect()); -// console.log(z.length); -assert.equal(2, z.length); -assert.equal(0x66, z[0]); -assert.equal(0x6f, z[1]); - -assert.equal(0, Buffer('hello').slice(0, 0).length); - -['ucs2', 'ucs-2', 'utf16le', 'utf-16le'].forEach(function(encoding) { - var b = new Buffer(10); - b.write('あいうえお', encoding); - assert.equal(b.toString(encoding), 'あいうえお'); -}); - -// Binary encoding should write only one byte per character. -var b = Buffer([0xde, 0xad, 0xbe, 0xef]); -var s = String.fromCharCode(0xffff); -b.write(s, 0, 'binary'); -assert.equal(0xff, b[0]); -assert.equal(0xad, b[1]); -assert.equal(0xbe, b[2]); -assert.equal(0xef, b[3]); -s = String.fromCharCode(0xaaee); -b.write(s, 0, 'binary'); -assert.equal(0xee, b[0]); -assert.equal(0xad, b[1]); -assert.equal(0xbe, b[2]); -assert.equal(0xef, b[3]); - -// #1210 Test UTF-8 string includes null character -var buf = new Buffer('\0'); -assert.equal(buf.length, 1); -buf = new Buffer('\0\0'); -assert.equal(buf.length, 2); - -buf = new Buffer(2); -var written = buf.write(''); // 0byte -assert.equal(written, 0); -written = buf.write('\0'); // 1byte (v8 adds null terminator) -assert.equal(written, 1); -written = buf.write('a\0'); // 1byte * 2 -assert.equal(written, 2); -written = buf.write('あ'); // 3bytes -assert.equal(written, 0); -written = buf.write('\0あ'); // 1byte + 3bytes -assert.equal(written, 1); -written = buf.write('\0\0あ'); // 1byte * 2 + 3bytes -assert.equal(written, 2); - -buf = new Buffer(10); -written = buf.write('あいう'); // 3bytes * 3 (v8 adds null terminator) -assert.equal(written, 9); -written = buf.write('あいう\0'); // 3bytes * 3 + 1byte -assert.equal(written, 10); - -// #243 Test write() with maxLength -var buf = new Buffer(4); -buf.fill(0xFF); -var written = buf.write('abcd', 1, 2, 'utf8'); -// console.log(buf); -assert.equal(written, 2); -assert.equal(buf[0], 0xFF); -assert.equal(buf[1], 0x61); -assert.equal(buf[2], 0x62); -assert.equal(buf[3], 0xFF); - -buf.fill(0xFF); -written = buf.write('abcd', 1, 4); -// console.log(buf); -assert.equal(written, 3); -assert.equal(buf[0], 0xFF); -assert.equal(buf[1], 0x61); -assert.equal(buf[2], 0x62); -assert.equal(buf[3], 0x63); - -buf.fill(0xFF); -written = buf.write('abcd', 'utf8', 1, 2); // legacy style -// console.log(buf); -assert.equal(written, 2); -assert.equal(buf[0], 0xFF); -assert.equal(buf[1], 0x61); -assert.equal(buf[2], 0x62); -assert.equal(buf[3], 0xFF); - -buf.fill(0xFF); -written = buf.write('abcdef', 1, 2, 'hex'); -// console.log(buf); -assert.equal(written, 2); -assert.equal(buf[0], 0xFF); -assert.equal(buf[1], 0xAB); -assert.equal(buf[2], 0xCD); -assert.equal(buf[3], 0xFF); - -['ucs2', 'ucs-2', 'utf16le', 'utf-16le'].forEach(function(encoding) { - buf.fill(0xFF); - written = buf.write('abcd', 0, 2, encoding); -// console.log(buf); - assert.equal(written, 2); - assert.equal(buf[0], 0x61); - assert.equal(buf[1], 0x00); - assert.equal(buf[2], 0xFF); - assert.equal(buf[3], 0xFF); -}); - -// test offset returns are correct -var b = new Buffer(16); -assert.equal(4, b.writeUInt32LE(0, 0)); -assert.equal(6, b.writeUInt16LE(0, 4)); -assert.equal(7, b.writeUInt8(0, 6)); -assert.equal(8, b.writeInt8(0, 7)); -assert.equal(16, b.writeDoubleLE(0, 8)); - -// test unmatched surrogates not producing invalid utf8 output -// ef bf bd = utf-8 representation of unicode replacement character -// see https://codereview.chromium.org/121173009/ -buf = new Buffer('ab\ud800cd', 'utf8'); -assert.equal(buf[0], 0x61); -assert.equal(buf[1], 0x62); -assert.equal(buf[2], 0xef); -assert.equal(buf[3], 0xbf); -assert.equal(buf[4], 0xbd); -assert.equal(buf[5], 0x63); -assert.equal(buf[6], 0x64); - -// test for buffer overrun -buf = new Buffer([0, 0, 0, 0, 0]); // length: 5 -var sub = buf.slice(0, 4); // length: 4 -written = sub.write('12345', 'binary'); -assert.equal(written, 4); -assert.equal(buf[4], 0); - -// Check for fractional length args, junk length args, etc. -// https://github.com/joyent/node/issues/1758 - -// Call .fill() first, stops valgrind warning about uninitialized memory reads. -Buffer(3.3).fill().toString(); // throws bad argument error in commit 43cb4ec -assert.equal(Buffer(-1).length, 0); -assert.equal(Buffer(NaN).length, 0); -assert.equal(Buffer(3.3).length, 3); -assert.equal(Buffer({length: 3.3}).length, 3); -assert.equal(Buffer({length: 'BAM'}).length, 0); - -// Make sure that strings are not coerced to numbers. -assert.equal(Buffer('99').length, 2); -assert.equal(Buffer('13.37').length, 5); - -// Ensure that the length argument is respected. -'ascii utf8 hex base64 binary'.split(' ').forEach(function(enc) { - assert.equal(Buffer(1).write('aaaaaa', 0, 1, enc), 1); -}); - -// Regression test, guard against buffer overrun in the base64 decoder. -var a = Buffer(3); -var b = Buffer('xxx'); -a.write('aaaaaaaa', 'base64'); -assert.equal(b.toString(), 'xxx'); - -// issue GH-3416 -Buffer(Buffer(0), 0, 0); - -[ 'hex', - 'utf8', - 'utf-8', - 'ascii', - 'binary', - 'base64', - 'ucs2', - 'ucs-2', - 'utf16le', - 'utf-16le' ].forEach(function(enc) { - assert.equal(Buffer.isEncoding(enc), true); - }); - -[ 'utf9', - 'utf-7', - 'Unicode-FTW', - 'new gnu gun' ].forEach(function(enc) { - assert.equal(Buffer.isEncoding(enc), false); - }); - - -// GH-5110 -(function() { - var buffer = new Buffer('test'), - string = JSON.stringify(buffer); - - assert.equal(string, '{"type":"Buffer","data":[116,101,115,116]}'); - - assert.deepEqual(buffer, JSON.parse(string, function(key, value) { - return value && value.type === 'Buffer' - ? new Buffer(value.data) - : value; - })); -})(); - -// issue GH-7849 -(function() { - var buf = new Buffer('test'); - var json = JSON.stringify(buf); - var obj = JSON.parse(json); - var copy = new Buffer(obj); - - assert(buf.equals(copy)); -})(); - -// issue GH-4331 -assert.throws(function() { - new Buffer(0xFFFFFFFF); -}, RangeError); -assert.throws(function() { - new Buffer(0xFFFFFFFFF); -}, RangeError); - - -// attempt to overflow buffers, similar to previous bug in array buffers -assert.throws(function() { - var buf = new Buffer(8); - buf.readFloatLE(0xffffffff); -}, RangeError); - -assert.throws(function() { - var buf = new Buffer(8); - buf.writeFloatLE(0.0, 0xffffffff); -}, RangeError); - -assert.throws(function() { - var buf = new Buffer(8); - buf.readFloatLE(0xffffffff); -}, RangeError); - -assert.throws(function() { - var buf = new Buffer(8); - buf.writeFloatLE(0.0, 0xffffffff); -}, RangeError); - - -// ensure negative values can't get past offset -assert.throws(function() { - var buf = new Buffer(8); - buf.readFloatLE(-1); -}, RangeError); - -assert.throws(function() { - var buf = new Buffer(8); - buf.writeFloatLE(0.0, -1); -}, RangeError); - -assert.throws(function() { - var buf = new Buffer(8); - buf.readFloatLE(-1); -}, RangeError); - -assert.throws(function() { - var buf = new Buffer(8); - buf.writeFloatLE(0.0, -1); -}, RangeError); - -// offset checks -var buf = new Buffer(0); - -assert.throws(function() { buf.readUInt8(0); }, RangeError); -assert.throws(function() { buf.readInt8(0); }, RangeError); - -var buf = new Buffer([0xFF]); - -assert.equal(buf.readUInt8(0), 255); -assert.equal(buf.readInt8(0), -1); - -[16, 32].forEach(function(bits) { - var buf = new Buffer(bits / 8 - 1); - - assert.throws(function() { buf['readUInt' + bits + 'BE'](0); }, - RangeError, - 'readUInt' + bits + 'BE'); - - assert.throws(function() { buf['readUInt' + bits + 'LE'](0); }, - RangeError, - 'readUInt' + bits + 'LE'); - - assert.throws(function() { buf['readInt' + bits + 'BE'](0); }, - RangeError, - 'readInt' + bits + 'BE()'); - - assert.throws(function() { buf['readInt' + bits + 'LE'](0); }, - RangeError, - 'readInt' + bits + 'LE()'); -}); - -[16, 32].forEach(function(bits) { - var buf = new Buffer([0xFF, 0xFF, 0xFF, 0xFF]); - - assert.equal(buf['readUInt' + bits + 'BE'](0), - (0xFFFFFFFF >>> (32 - bits))); - - assert.equal(buf['readUInt' + bits + 'LE'](0), - (0xFFFFFFFF >>> (32 - bits))); - - assert.equal(buf['readInt' + bits + 'BE'](0), - (0xFFFFFFFF >> (32 - bits))); - - assert.equal(buf['readInt' + bits + 'LE'](0), - (0xFFFFFFFF >> (32 - bits))); -}); - -// test for common read(U)IntLE/BE -(function() { - var buf = new Buffer([0x01, 0x02, 0x03, 0x04, 0x05, 0x06]); - - assert.equal(buf.readUIntLE(0, 1), 0x01); - assert.equal(buf.readUIntBE(0, 1), 0x01); - assert.equal(buf.readUIntLE(0, 3), 0x030201); - assert.equal(buf.readUIntBE(0, 3), 0x010203); - assert.equal(buf.readUIntLE(0, 5), 0x0504030201); - assert.equal(buf.readUIntBE(0, 5), 0x0102030405); - assert.equal(buf.readUIntLE(0, 6), 0x060504030201); - assert.equal(buf.readUIntBE(0, 6), 0x010203040506); - assert.equal(buf.readIntLE(0, 1), 0x01); - assert.equal(buf.readIntBE(0, 1), 0x01); - assert.equal(buf.readIntLE(0, 3), 0x030201); - assert.equal(buf.readIntBE(0, 3), 0x010203); - assert.equal(buf.readIntLE(0, 5), 0x0504030201); - assert.equal(buf.readIntBE(0, 5), 0x0102030405); - assert.equal(buf.readIntLE(0, 6), 0x060504030201); - assert.equal(buf.readIntBE(0, 6), 0x010203040506); -})(); - -// test for common write(U)IntLE/BE -(function() { - var buf = new Buffer(3); - buf.writeUIntLE(0x123456, 0, 3); - assert.deepEqual(buf.toJSON().data, [0x56, 0x34, 0x12]); - assert.equal(buf.readUIntLE(0, 3), 0x123456); - - buf = new Buffer(3); - buf.writeUIntBE(0x123456, 0, 3); - assert.deepEqual(buf.toJSON().data, [0x12, 0x34, 0x56]); - assert.equal(buf.readUIntBE(0, 3), 0x123456); - - buf = new Buffer(3); - buf.writeIntLE(0x123456, 0, 3); - assert.deepEqual(buf.toJSON().data, [0x56, 0x34, 0x12]); - assert.equal(buf.readIntLE(0, 3), 0x123456); - - buf = new Buffer(3); - buf.writeIntBE(0x123456, 0, 3); - assert.deepEqual(buf.toJSON().data, [0x12, 0x34, 0x56]); - assert.equal(buf.readIntBE(0, 3), 0x123456); - - buf = new Buffer(3); - buf.writeIntLE(-0x123456, 0, 3); - assert.deepEqual(buf.toJSON().data, [0xaa, 0xcb, 0xed]); - assert.equal(buf.readIntLE(0, 3), -0x123456); - - buf = new Buffer(3); - buf.writeIntBE(-0x123456, 0, 3); - assert.deepEqual(buf.toJSON().data, [0xed, 0xcb, 0xaa]); - assert.equal(buf.readIntBE(0, 3), -0x123456); - - buf = new Buffer(5); - buf.writeUIntLE(0x1234567890, 0, 5); - assert.deepEqual(buf.toJSON().data, [0x90, 0x78, 0x56, 0x34, 0x12]); - assert.equal(buf.readUIntLE(0, 5), 0x1234567890); - - buf = new Buffer(5); - buf.writeUIntBE(0x1234567890, 0, 5); - assert.deepEqual(buf.toJSON().data, [0x12, 0x34, 0x56, 0x78, 0x90]); - assert.equal(buf.readUIntBE(0, 5), 0x1234567890); - - buf = new Buffer(5); - buf.writeIntLE(0x1234567890, 0, 5); - assert.deepEqual(buf.toJSON().data, [0x90, 0x78, 0x56, 0x34, 0x12]); - assert.equal(buf.readIntLE(0, 5), 0x1234567890); - - buf = new Buffer(5); - buf.writeIntBE(0x1234567890, 0, 5); - assert.deepEqual(buf.toJSON().data, [0x12, 0x34, 0x56, 0x78, 0x90]); - assert.equal(buf.readIntBE(0, 5), 0x1234567890); - - buf = new Buffer(5); - buf.writeIntLE(-0x1234567890, 0, 5); - assert.deepEqual(buf.toJSON().data, [0x70, 0x87, 0xa9, 0xcb, 0xed]); - assert.equal(buf.readIntLE(0, 5), -0x1234567890); - - buf = new Buffer(5); - buf.writeIntBE(-0x1234567890, 0, 5); - assert.deepEqual(buf.toJSON().data, [0xed, 0xcb, 0xa9, 0x87, 0x70]); - assert.equal(buf.readIntBE(0, 5), -0x1234567890); -})(); - -// test Buffer slice -(function() { - var buf = new Buffer('0123456789'); - assert.equal(buf.slice(-10, 10), '0123456789'); - assert.equal(buf.slice(-20, 10), '0123456789'); - assert.equal(buf.slice(-20, -10), ''); - assert.equal(buf.slice(0, -1), '012345678'); - assert.equal(buf.slice(2, -2), '234567'); - assert.equal(buf.slice(0, 65536), '0123456789'); - assert.equal(buf.slice(65536, 0), ''); - for (var i = 0, s = buf.toString(); i < buf.length; ++i) { - assert.equal(buf.slice(-i), s.slice(-i)); - assert.equal(buf.slice(0, -i), s.slice(0, -i)); - } - // try to slice a zero length Buffer - // see https://github.com/joyent/node/issues/5881 - SlowBuffer(0).slice(0, 1); -})(); - -// Regression test for #5482: should throw but not assert in C++ land. -assert.throws(function() { - Buffer('', 'buffer'); -}, TypeError); - -// Regression test for #6111. Constructing a buffer from another buffer -// should a) work, and b) not corrupt the source buffer. -(function() { - var a = [0]; - for (var i = 0; i < 7; ++i) a = a.concat(a); - a = a.map(function(_, i) { return i; }); - var b = Buffer(a); - var c = Buffer(b); - assert.equal(b.length, a.length); - assert.equal(c.length, a.length); - for (var i = 0, k = a.length; i < k; ++i) { - assert.equal(a[i], i); - assert.equal(b[i], i); - assert.equal(c[i], i); - } -})(); - - -assert.throws(function() { - new Buffer((-1 >>> 0) + 1); -}, RangeError); - -assert.throws(function() { - new SlowBuffer((-1 >>> 0) + 1); -}, RangeError); - -if (common.hasCrypto) { - // Test truncation after decode - // var crypto = require('crypto'); - - var b1 = new Buffer('YW55=======', 'base64'); - var b2 = new Buffer('YW55', 'base64'); - - assert.equal( - 1 /*crypto.createHash('sha1').update(b1).digest('hex')*/, - 1 /*crypto.createHash('sha1').update(b2).digest('hex')*/ - ); -} else { -// console.log('1..0 # Skipped: missing crypto'); -} - -// Test Compare -var b = new Buffer(1).fill('a'); -var c = new Buffer(1).fill('c'); -var d = new Buffer(2).fill('aa'); - -assert.equal(b.compare(c), -1); -assert.equal(c.compare(d), 1); -assert.equal(d.compare(b), 1); -assert.equal(b.compare(d), -1); -assert.equal(b.compare(b), 0); - -assert.equal(Buffer.compare(b, c), -1); -assert.equal(Buffer.compare(c, d), 1); -assert.equal(Buffer.compare(d, b), 1); -assert.equal(Buffer.compare(b, d), -1); -assert.equal(Buffer.compare(c, c), 0); - - -assert.throws(function() { - var b = new Buffer(1); - Buffer.compare(b, 'abc'); -}); - -assert.throws(function() { - var b = new Buffer(1); - Buffer.compare('abc', b); -}); - -assert.throws(function() { - var b = new Buffer(1); - b.compare('abc'); -}); - -// Test Equals -var b = new Buffer(5).fill('abcdf'); -var c = new Buffer(5).fill('abcdf'); -var d = new Buffer(5).fill('abcde'); -var e = new Buffer(6).fill('abcdef'); - -assert.ok(b.equals(c)); -assert.ok(!c.equals(d)); -assert.ok(!d.equals(e)); -assert.ok(d.equals(d)); - -assert.throws(function() { - var b = new Buffer(1); - b.equals('abc'); -}); - -// Regression test for https://github.com/nodejs/io.js/issues/649. -assert.throws(function() { Buffer(1422561062959).toString('utf8'); }); - -var ps = Buffer.poolSize; -Buffer.poolSize = 0; -assert.equal(Buffer(1).parent, undefined); -Buffer.poolSize = ps; - -// Test Buffer.copy() segfault -assert.throws(function() { - Buffer(10).copy(); -}); - -assert.throws(function() { - new Buffer(); -}, /must start with number, buffer, array or string/); - -assert.throws(function() { - new Buffer(null); -}, /must start with number, buffer, array or string/); - diff --git a/node_modules/buffer/test/slice.js b/node_modules/buffer/test/slice.js deleted file mode 100644 index 25c111c8..00000000 --- a/node_modules/buffer/test/slice.js +++ /dev/null @@ -1,37 +0,0 @@ -if (process.env.OBJECT_IMPL) global.TYPED_ARRAY_SUPPORT = false -var B = require('../').Buffer -var test = require('tape') - -test('modifying buffer created by .slice() modifies original memory', function (t) { - if (!B.TYPED_ARRAY_SUPPORT) return t.end() - - var buf1 = new B(26) - for (var i = 0; i < 26; i++) { - buf1[i] = i + 97 // 97 is ASCII a - } - - var buf2 = buf1.slice(0, 3) - t.equal(buf2.toString('ascii', 0, buf2.length), 'abc') - - buf2[0] = '!'.charCodeAt(0) - t.equal(buf1.toString('ascii', 0, buf2.length), '!bc') - - t.end() -}) - -test('modifying parent buffer modifies .slice() buffer\'s memory', function (t) { - if (!B.TYPED_ARRAY_SUPPORT) return t.end() - - var buf1 = new B(26) - for (var i = 0; i < 26; i++) { - buf1[i] = i + 97 // 97 is ASCII a - } - - var buf2 = buf1.slice(0, 3) - t.equal(buf2.toString('ascii', 0, buf2.length), 'abc') - - buf1[0] = '!'.charCodeAt(0) - t.equal(buf2.toString('ascii', 0, buf2.length), '!bc') - - t.end() -}) diff --git a/node_modules/buffer/test/static.js b/node_modules/buffer/test/static.js deleted file mode 100644 index 68faa005..00000000 --- a/node_modules/buffer/test/static.js +++ /dev/null @@ -1,31 +0,0 @@ -if (process.env.OBJECT_IMPL) global.TYPED_ARRAY_SUPPORT = false -var B = require('../').Buffer -var test = require('tape') - -test('Buffer.isEncoding', function (t) { - t.equal(B.isEncoding('HEX'), true) - t.equal(B.isEncoding('hex'), true) - t.equal(B.isEncoding('bad'), false) - t.end() -}) - -test('Buffer.isBuffer', function (t) { - t.equal(B.isBuffer(new B('hey', 'utf8')), true) - t.equal(B.isBuffer(new B([1, 2, 3], 'utf8')), true) - t.equal(B.isBuffer('hey'), false) - t.end() -}) - -test('Buffer.toArrayBuffer', function (t) { - var data = [1, 2, 3, 4, 5, 6, 7, 8] - if (typeof Uint8Array !== 'undefined') { - var result = new B(data).toArrayBuffer() - var expected = new Uint8Array(data).buffer - for (var i = 0; i < expected.byteLength; i++) { - t.equal(result[i], expected[i]) - } - } else { - t.pass('No toArrayBuffer() method provided in old browsers') - } - t.end() -}) diff --git a/node_modules/buffer/test/to-string.js b/node_modules/buffer/test/to-string.js deleted file mode 100644 index 2950d4d0..00000000 --- a/node_modules/buffer/test/to-string.js +++ /dev/null @@ -1,233 +0,0 @@ -if (process.env.OBJECT_IMPL) global.TYPED_ARRAY_SUPPORT = false -var B = require('../').Buffer -var test = require('tape') - -test('utf8 buffer to base64', function (t) { - t.equal( - new B('Ձאab', 'utf8').toString('base64'), - '1YHXkGFi' - ) - t.end() -}) - -test('utf8 buffer to hex', function (t) { - t.equal( - new B('Ձאab', 'utf8').toString('hex'), - 'd581d7906162' - ) - t.end() -}) - -test('utf8 to utf8', function (t) { - t.equal( - new B('öäüõÖÄÜÕ', 'utf8').toString('utf8'), - 'öäüõÖÄÜÕ' - ) - t.end() -}) - -test('utf16le to utf16', function (t) { - t.equal( - new B(new B('abcd', 'utf8').toString('utf16le'), 'utf16le').toString('utf8'), - 'abcd' - ) - t.end() -}) - -test('utf16le to hex', function (t) { - t.equal( - new B('abcd', 'utf16le').toString('hex'), - '6100620063006400' - ) - t.end() -}) - -test('ascii buffer to base64', function (t) { - t.equal( - new B('123456!@#$%^', 'ascii').toString('base64'), - 'MTIzNDU2IUAjJCVe' - ) - t.end() -}) - -test('ascii buffer to hex', function (t) { - t.equal( - new B('123456!@#$%^', 'ascii').toString('hex'), - '31323334353621402324255e' - ) - t.end() -}) - -test('base64 buffer to utf8', function (t) { - t.equal( - new B('1YHXkGFi', 'base64').toString('utf8'), - 'Ձאab' - ) - t.end() -}) - -test('hex buffer to utf8', function (t) { - t.equal( - new B('d581d7906162', 'hex').toString('utf8'), - 'Ձאab' - ) - t.end() -}) - -test('base64 buffer to ascii', function (t) { - t.equal( - new B('MTIzNDU2IUAjJCVe', 'base64').toString('ascii'), - '123456!@#$%^' - ) - t.end() -}) - -test('hex buffer to ascii', function (t) { - t.equal( - new B('31323334353621402324255e', 'hex').toString('ascii'), - '123456!@#$%^' - ) - t.end() -}) - -test('base64 buffer to binary', function (t) { - t.equal( - new B('MTIzNDU2IUAjJCVe', 'base64').toString('binary'), - '123456!@#$%^' - ) - t.end() -}) - -test('hex buffer to binary', function (t) { - t.equal( - new B('31323334353621402324255e', 'hex').toString('binary'), - '123456!@#$%^' - ) - t.end() -}) - -test('utf8 to binary', function (t) { - /* jshint -W100 */ - t.equal( - new B('öäüõÖÄÜÕ', 'utf8').toString('binary'), - 'öäüõÖÄÜÕ' - ) - /* jshint +W100 */ - t.end() -}) - -test('utf8 replacement chars (1 byte sequence)', function (t) { - t.equal( - new B([ 0x80 ]).toString(), - '\uFFFD' - ) - t.equal( - new B([ 0x7F ]).toString(), - '\u007F' - ) - t.end() -}) - -test('utf8 replacement chars (2 byte sequences)', function (t) { - t.equal( - new B([ 0xC7 ]).toString(), - '\uFFFD' - ) - t.equal( - new B([ 0xC7, 0xB1 ]).toString(), - '\u01F1' - ) - t.equal( - new B([ 0xC0, 0xB1 ]).toString(), - '\uFFFD\uFFFD' - ) - t.equal( - new B([ 0xC1, 0xB1 ]).toString(), - '\uFFFD\uFFFD' - ) - t.end() -}) - -test('utf8 replacement chars (3 byte sequences)', function (t) { - t.equal( - new B([ 0xE0 ]).toString(), - '\uFFFD' - ) - t.equal( - new B([ 0xE0, 0xAC ]).toString(), - '\uFFFD\uFFFD' - ) - t.equal( - new B([ 0xE0, 0xAC, 0xB9 ]).toString(), - '\u0B39' - ) - t.end() -}) - -test('utf8 replacement chars (4 byte sequences)', function (t) { - t.equal( - new B([ 0xF4 ]).toString(), - '\uFFFD' - ) - t.equal( - new B([ 0xF4, 0x8F ]).toString(), - '\uFFFD\uFFFD' - ) - t.equal( - new B([ 0xF4, 0x8F, 0x80 ]).toString(), - '\uFFFD\uFFFD\uFFFD' - ) - t.equal( - new B([ 0xF4, 0x8F, 0x80, 0x84 ]).toString(), - '\uDBFC\uDC04' - ) - t.equal( - new B([ 0xFF ]).toString(), - '\uFFFD' - ) - t.equal( - new B([ 0xFF, 0x8F, 0x80, 0x84 ]).toString(), - '\uFFFD\uFFFD\uFFFD\uFFFD' - ) - t.end() -}) - -test('utf8 replacement chars on 256 random bytes', function (t) { - t.equal( - new B([ 152, 130, 206, 23, 243, 238, 197, 44, 27, 86, 208, 36, 163, 184, 164, 21, 94, 242, 178, 46, 25, 26, 253, 178, 72, 147, 207, 112, 236, 68, 179, 190, 29, 83, 239, 147, 125, 55, 143, 19, 157, 68, 157, 58, 212, 224, 150, 39, 128, 24, 94, 225, 120, 121, 75, 192, 112, 19, 184, 142, 203, 36, 43, 85, 26, 147, 227, 139, 242, 186, 57, 78, 11, 102, 136, 117, 180, 210, 241, 92, 3, 215, 54, 167, 249, 1, 44, 225, 146, 86, 2, 42, 68, 21, 47, 238, 204, 153, 216, 252, 183, 66, 222, 255, 15, 202, 16, 51, 134, 1, 17, 19, 209, 76, 238, 38, 76, 19, 7, 103, 249, 5, 107, 137, 64, 62, 170, 57, 16, 85, 179, 193, 97, 86, 166, 196, 36, 148, 138, 193, 210, 69, 187, 38, 242, 97, 195, 219, 252, 244, 38, 1, 197, 18, 31, 246, 53, 47, 134, 52, 105, 72, 43, 239, 128, 203, 73, 93, 199, 75, 222, 220, 166, 34, 63, 236, 11, 212, 76, 243, 171, 110, 78, 39, 205, 204, 6, 177, 233, 212, 243, 0, 33, 41, 122, 118, 92, 252, 0, 157, 108, 120, 70, 137, 100, 223, 243, 171, 232, 66, 126, 111, 142, 33, 3, 39, 117, 27, 107, 54, 1, 217, 227, 132, 13, 166, 3, 73, 53, 127, 225, 236, 134, 219, 98, 214, 125, 148, 24, 64, 142, 111, 231, 194, 42, 150, 185, 10, 182, 163, 244, 19, 4, 59, 135, 16 ]).toString(), - '\uFFFD\uFFFD\uFFFD\u0017\uFFFD\uFFFD\uFFFD\u002C\u001B\u0056\uFFFD\u0024\uFFFD\uFFFD\uFFFD\u0015\u005E\uFFFD\uFFFD\u002E\u0019\u001A\uFFFD\uFFFD\u0048\uFFFD\uFFFD\u0070\uFFFD\u0044\uFFFD\uFFFD\u001D\u0053\uFFFD\uFFFD\u007D\u0037\uFFFD\u0013\uFFFD\u0044\uFFFD\u003A\uFFFD\uFFFD\uFFFD\u0027\uFFFD\u0018\u005E\uFFFD\u0078\u0079\u004B\uFFFD\u0070\u0013\uFFFD\uFFFD\uFFFD\u0024\u002B\u0055\u001A\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\u0039\u004E\u000B\u0066\uFFFD\u0075\uFFFD\uFFFD\uFFFD\u005C\u0003\uFFFD\u0036\uFFFD\uFFFD\u0001\u002C\uFFFD\uFFFD\u0056\u0002\u002A\u0044\u0015\u002F\uFFFD\u0319\uFFFD\uFFFD\uFFFD\u0042\uFFFD\uFFFD\u000F\uFFFD\u0010\u0033\uFFFD\u0001\u0011\u0013\uFFFD\u004C\uFFFD\u0026\u004C\u0013\u0007\u0067\uFFFD\u0005\u006B\uFFFD\u0040\u003E\uFFFD\u0039\u0010\u0055\uFFFD\uFFFD\u0061\u0056\uFFFD\uFFFD\u0024\uFFFD\uFFFD\uFFFD\uFFFD\u0045\uFFFD\u0026\uFFFD\u0061\uFFFD\uFFFD\uFFFD\uFFFD\u0026\u0001\uFFFD\u0012\u001F\uFFFD\u0035\u002F\uFFFD\u0034\u0069\u0048\u002B\uFFFD\uFFFD\uFFFD\u0049\u005D\uFFFD\u004B\uFFFD\u0726\u0022\u003F\uFFFD\u000B\uFFFD\u004C\uFFFD\uFFFD\u006E\u004E\u0027\uFFFD\uFFFD\u0006\uFFFD\uFFFD\uFFFD\uFFFD\u0000\u0021\u0029\u007A\u0076\u005C\uFFFD\u0000\uFFFD\u006C\u0078\u0046\uFFFD\u0064\uFFFD\uFFFD\uFFFD\uFFFD\u0042\u007E\u006F\uFFFD\u0021\u0003\u0027\u0075\u001B\u006B\u0036\u0001\uFFFD\uFFFD\uFFFD\u000D\uFFFD\u0003\u0049\u0035\u007F\uFFFD\uFFFD\uFFFD\uFFFD\u0062\uFFFD\u007D\uFFFD\u0018\u0040\uFFFD\u006F\uFFFD\uFFFD\u002A\uFFFD\uFFFD\u000A\uFFFD\uFFFD\uFFFD\u0013\u0004\u003B\uFFFD\u0010' - ) - t.end() -}) - -test('utf8 replacement chars for anything in the surrogate pair range', function (t) { - t.equal( - new B([ 0xED, 0x9F, 0xBF ]).toString(), - '\uD7FF' - ) - t.equal( - new B([ 0xED, 0xA0, 0x80 ]).toString(), - '\uFFFD\uFFFD\uFFFD' - ) - t.equal( - new B([ 0xED, 0xBE, 0x8B ]).toString(), - '\uFFFD\uFFFD\uFFFD' - ) - t.equal( - new B([ 0xED, 0xBF, 0xBF ]).toString(), - '\uFFFD\uFFFD\uFFFD' - ) - t.equal( - new B([ 0xEE, 0x80, 0x80 ]).toString(), - '\uE000' - ) - t.end() -}) - -test('utf8 don\'t replace the replacement char', function (t) { - t.equal( - new B('\uFFFD').toString(), - '\uFFFD' - ) - t.end() -}) diff --git a/node_modules/buffer/test/write.js b/node_modules/buffer/test/write.js deleted file mode 100644 index 4039d192..00000000 --- a/node_modules/buffer/test/write.js +++ /dev/null @@ -1,131 +0,0 @@ -if (process.env.OBJECT_IMPL) global.TYPED_ARRAY_SUPPORT = false -var B = require('../').Buffer -var test = require('tape') -var isnan = require('is-nan') - -test('buffer.write string should get parsed as number', function (t) { - var b = new B(64) - b.writeUInt16LE('1003', 0) - t.equal(b.readUInt16LE(0), 1003) - t.end() -}) - -test('buffer.writeUInt8 a fractional number will get Math.floored', function (t) { - // Some extra work is necessary to make this test pass with the Object implementation - - var b = new B(1) - b.writeInt8(5.5, 0) - t.equal(b[0], 5) - t.end() -}) - -test('writeUint8 with a negative number throws', function (t) { - var buf = new B(1) - - t.throws(function () { - buf.writeUInt8(-3, 0) - }) - - t.end() -}) - -test('hex of write{Uint,Int}{8,16,32}{LE,BE}', function (t) { - t.plan(2 * (2 * 2 * 2 + 2)) - var hex = [ - '03', '0300', '0003', '03000000', '00000003', - 'fd', 'fdff', 'fffd', 'fdffffff', 'fffffffd' - ] - var reads = [ 3, 3, 3, 3, 3, -3, -3, -3, -3, -3 ] - var xs = ['UInt', 'Int'] - var ys = [8, 16, 32] - for (var i = 0; i < xs.length; i++) { - var x = xs[i] - for (var j = 0; j < ys.length; j++) { - var y = ys[j] - var endianesses = (y === 8) ? [''] : ['LE', 'BE'] - for (var k = 0; k < endianesses.length; k++) { - var z = endianesses[k] - - var v1 = new B(y / 8) - var writefn = 'write' + x + y + z - var val = (x === 'Int') ? -3 : 3 - v1[writefn](val, 0) - t.equal( - v1.toString('hex'), - hex.shift() - ) - var readfn = 'read' + x + y + z - t.equal( - v1[readfn](0), - reads.shift() - ) - } - } - } - t.end() -}) - -test('hex of write{Uint,Int}{8,16,32}{LE,BE} with overflow', function (t) { - if (!B.TYPED_ARRAY_SUPPORT) { - t.pass('object impl: skipping overflow test') - t.end() - return - } - - t.plan(3 * (2 * 2 * 2 + 2)) - var hex = [ - '', '03', '00', '030000', '000000', - '', 'fd', 'ff', 'fdffff', 'ffffff' - ] - var reads = [ - undefined, 3, 0, NaN, 0, - undefined, 253, -256, 16777213, -256 - ] - var xs = ['UInt', 'Int'] - var ys = [8, 16, 32] - for (var i = 0; i < xs.length; i++) { - var x = xs[i] - for (var j = 0; j < ys.length; j++) { - var y = ys[j] - var endianesses = (y === 8) ? [''] : ['LE', 'BE'] - for (var k = 0; k < endianesses.length; k++) { - var z = endianesses[k] - - var v1 = new B(y / 8 - 1) - var next = new B(4) - next.writeUInt32BE(0, 0) - var writefn = 'write' + x + y + z - var val = (x === 'Int') ? -3 : 3 - v1[writefn](val, 0, true) - t.equal( - v1.toString('hex'), - hex.shift() - ) - // check that nothing leaked to next buffer. - t.equal(next.readUInt32BE(0), 0) - // check that no bytes are read from next buffer. - next.writeInt32BE(~0, 0) - var readfn = 'read' + x + y + z - var r = reads.shift() - if (isnan(r)) t.pass('equal') - else t.equal(v1[readfn](0, true), r) - } - } - } - t.end() -}) -test('large values do not imporoperly roll over (ref #80)', function (t) { - var nums = [-25589992, -633756690, -898146932] - var out = new B(12) - out.fill(0) - out.writeInt32BE(nums[0], 0) - var newNum = out.readInt32BE(0) - t.equal(nums[0], newNum) - out.writeInt32BE(nums[1], 4) - newNum = out.readInt32BE(4) - t.equal(nums[1], newNum) - out.writeInt32BE(nums[2], 8) - newNum = out.readInt32BE(8) - t.equal(nums[2], newNum) - t.end() -}) diff --git a/node_modules/builtins/.travis.yml b/node_modules/builtins/.travis.yml deleted file mode 100644 index cc4dba29..00000000 --- a/node_modules/builtins/.travis.yml +++ /dev/null @@ -1,4 +0,0 @@ -language: node_js -node_js: - - "0.8" - - "0.10" diff --git a/node_modules/builtins/History.md b/node_modules/builtins/History.md deleted file mode 100644 index 0eb45c42..00000000 --- a/node_modules/builtins/History.md +++ /dev/null @@ -1,39 +0,0 @@ - -0.0.7 / 2014-09-01 -================== - - * update .repository - -0.0.6 / 2014-09-01 -================== - - * add travis - * add test script - * add constants - -0.0.5 / 2014-06-27 -================== - - * add module - * publish to public npm - -0.0.4 / 2014-04-25 -================== - - * add timers - -0.0.3 / 2014-02-22 -================== - - * add buffer - -0.0.2 / 2014-02-11 -================== - - * add assert - -0.0.1 / 2014-02-11 -================== - - * add main - * initial commit diff --git a/node_modules/builtins/Readme.md b/node_modules/builtins/Readme.md deleted file mode 100644 index 96f4b1f6..00000000 --- a/node_modules/builtins/Readme.md +++ /dev/null @@ -1,18 +0,0 @@ - -# builtins - - List of node.js [builtin modules](http://nodejs.org/api/). - - [![build status](https://secure.travis-ci.org/juliangruber/builtins.svg)](http://travis-ci.org/juliangruber/builtins) - -## Example - -```js -var builtins = require('builtins'); - -assert(builtins.indexOf('http') > -1); -``` - -## License - - MIT diff --git a/node_modules/builtins/builtins.json b/node_modules/builtins/builtins.json deleted file mode 100644 index c52221d7..00000000 --- a/node_modules/builtins/builtins.json +++ /dev/null @@ -1,31 +0,0 @@ -[ - "assert", - "buffer", - "child_process", - "cluster", - "constants", - "crypto", - "dns", - "domain", - "events", - "fs", - "http", - "https", - "module", - "net", - "os", - "path", - "punycode", - "querystring", - "repl", - "stream", - "string_decoder", - "timers", - "tls", - "tty", - "dgram", - "url", - "util", - "vm", - "zlib" -] diff --git a/node_modules/builtins/package.json b/node_modules/builtins/package.json deleted file mode 100644 index 7e988548..00000000 --- a/node_modules/builtins/package.json +++ /dev/null @@ -1,82 +0,0 @@ -{ - "_args": [ - [ - { - "raw": "builtins@~0.0.3", - "scope": null, - "escapedName": "builtins", - "name": "builtins", - "rawSpec": "~0.0.3", - "spec": ">=0.0.3 <0.1.0", - "type": "range" - }, - "/Users/benjaminarias/Desktop/poly/node_modules/browserify" - ] - ], - "_from": "builtins@>=0.0.3 <0.1.0", - "_id": "builtins@0.0.7", - "_inCache": true, - "_installable": true, - "_location": "/builtins", - "_npmUser": { - "name": "juliangruber", - "email": "julian@juliangruber.com" - }, - "_npmVersion": "1.3.22", - "_phantomChildren": {}, - "_requested": { - "raw": "builtins@~0.0.3", - "scope": null, - "escapedName": "builtins", - "name": "builtins", - "rawSpec": "~0.0.3", - "spec": ">=0.0.3 <0.1.0", - "type": "range" - }, - "_requiredBy": [ - "/browserify" - ], - "_resolved": "https://registry.npmjs.org/builtins/-/builtins-0.0.7.tgz", - "_shasum": "355219cd6cf18dbe7c01cc7fd2dce765cfdc549a", - "_shrinkwrap": null, - "_spec": "builtins@~0.0.3", - "_where": "/Users/benjaminarias/Desktop/poly/node_modules/browserify", - "bugs": { - "url": "https://github.com/juliangruber/builtins/issues" - }, - "dependencies": {}, - "description": "List of node.js builtin modules", - "devDependencies": {}, - "directories": {}, - "dist": { - "shasum": "355219cd6cf18dbe7c01cc7fd2dce765cfdc549a", - "tarball": "https://registry.npmjs.org/builtins/-/builtins-0.0.7.tgz" - }, - "homepage": "https://github.com/juliangruber/builtins", - "license": "MIT", - "main": "builtins.json", - "maintainers": [ - { - "name": "juliangruber", - "email": "julian@juliangruber.com" - }, - { - "name": "segment", - "email": "tj@segment.io" - } - ], - "name": "builtins", - "optionalDependencies": {}, - "publishConfig": { - "registry": "https://registry.npmjs.org" - }, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git://github.com/juliangruber/builtins.git" - }, - "scripts": { - "test": "node -e \"require('./builtins.json')\"" - }, - "version": "0.0.7" -} diff --git a/node_modules/camelcase-keys/index.js b/node_modules/camelcase-keys/index.js deleted file mode 100644 index cd081eee..00000000 --- a/node_modules/camelcase-keys/index.js +++ /dev/null @@ -1,9 +0,0 @@ -'use strict'; -var mapObj = require('map-obj'); -var camelCase = require('camelcase'); - -module.exports = function (obj) { - return mapObj(obj, function (key, val) { - return [camelCase(key), val]; - }); -}; diff --git a/node_modules/camelcase-keys/package.json b/node_modules/camelcase-keys/package.json deleted file mode 100644 index f3ddbf42..00000000 --- a/node_modules/camelcase-keys/package.json +++ /dev/null @@ -1,115 +0,0 @@ -{ - "_args": [ - [ - { - "raw": "camelcase-keys@^1.0.0", - "scope": null, - "escapedName": "camelcase-keys", - "name": "camelcase-keys", - "rawSpec": "^1.0.0", - "spec": ">=1.0.0 <2.0.0", - "type": "range" - }, - "/Users/benjaminarias/Desktop/poly/node_modules/meow" - ] - ], - "_from": "camelcase-keys@>=1.0.0 <2.0.0", - "_id": "camelcase-keys@1.0.0", - "_inCache": true, - "_installable": true, - "_location": "/camelcase-keys", - "_nodeVersion": "0.10.32", - "_npmUser": { - "name": "sindresorhus", - "email": "sindresorhus@gmail.com" - }, - "_npmVersion": "2.1.2", - "_phantomChildren": {}, - "_requested": { - "raw": "camelcase-keys@^1.0.0", - "scope": null, - "escapedName": "camelcase-keys", - "name": "camelcase-keys", - "rawSpec": "^1.0.0", - "spec": ">=1.0.0 <2.0.0", - "type": "range" - }, - "_requiredBy": [ - "/meow" - ], - "_resolved": "https://registry.npmjs.org/camelcase-keys/-/camelcase-keys-1.0.0.tgz", - "_shasum": "bd1a11bf9b31a1ce493493a930de1a0baf4ad7ec", - "_shrinkwrap": null, - "_spec": "camelcase-keys@^1.0.0", - "_where": "/Users/benjaminarias/Desktop/poly/node_modules/meow", - "author": { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "http://sindresorhus.com" - }, - "bugs": { - "url": "https://github.com/sindresorhus/camelcase-keys/issues" - }, - "dependencies": { - "camelcase": "^1.0.1", - "map-obj": "^1.0.0" - }, - "description": "Convert object keys to camelCase", - "devDependencies": { - "ava": "0.0.4" - }, - "directories": {}, - "dist": { - "shasum": "bd1a11bf9b31a1ce493493a930de1a0baf4ad7ec", - "tarball": "https://registry.npmjs.org/camelcase-keys/-/camelcase-keys-1.0.0.tgz" - }, - "engines": { - "node": ">=0.10.0" - }, - "files": [ - "index.js" - ], - "gitHead": "fbb9ff793a80f990e8e3c8963ba36e2c14d569d7", - "homepage": "https://github.com/sindresorhus/camelcase-keys", - "keywords": [ - "map", - "obj", - "object", - "key", - "keys", - "value", - "values", - "val", - "iterate", - "camelcase", - "camel-case", - "camel", - "case", - "dash", - "hyphen", - "dot", - "underscore", - "separator", - "string", - "text", - "convert" - ], - "license": "MIT", - "maintainers": [ - { - "name": "sindresorhus", - "email": "sindresorhus@gmail.com" - } - ], - "name": "camelcase-keys", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git+https://github.com/sindresorhus/camelcase-keys.git" - }, - "scripts": { - "test": "node test.js" - }, - "version": "1.0.0" -} diff --git a/node_modules/camelcase-keys/readme.md b/node_modules/camelcase-keys/readme.md deleted file mode 100644 index 97a200b1..00000000 --- a/node_modules/camelcase-keys/readme.md +++ /dev/null @@ -1,32 +0,0 @@ -# camelcase-keys [![Build Status](https://travis-ci.org/sindresorhus/camelcase-keys.svg?branch=master)](https://travis-ci.org/sindresorhus/camelcase-keys) - -> Convert object keys to camelCase using [`camelcase`](https://github.com/sindresorhus/camelcase) - - -## Install - -```sh -$ npm install --save camelcase-keys -``` - - -## Usage - -```js -var camelcaseKeys = require('camelcase-keys'); - -camelcaseKeys({'foo-bar': true}); -//=> {fooBar: true} - - -var argv = require('minimist')(process.argv.slice(2)); -//=> {_: [], 'foo-bar': true} - -camelcaseKeys(argv); -//=> {_: [], fooBar: true} -``` - - -## License - -MIT © [Sindre Sorhus](http://sindresorhus.com) diff --git a/node_modules/camelcase/index.js b/node_modules/camelcase/index.js deleted file mode 100644 index b46e1009..00000000 --- a/node_modules/camelcase/index.js +++ /dev/null @@ -1,27 +0,0 @@ -'use strict'; -module.exports = function () { - var str = [].map.call(arguments, function (str) { - return str.trim(); - }).filter(function (str) { - return str.length; - }).join('-'); - - if (!str.length) { - return ''; - } - - if (str.length === 1 || !(/[_.\- ]+/).test(str) ) { - if (str[0] === str[0].toLowerCase() && str.slice(1) !== str.slice(1).toLowerCase()) { - return str; - } - - return str.toLowerCase(); - } - - return str - .replace(/^[_.\- ]+/, '') - .toLowerCase() - .replace(/[_.\- ]+(\w|$)/g, function (m, p1) { - return p1.toUpperCase(); - }); -}; diff --git a/node_modules/camelcase/license b/node_modules/camelcase/license deleted file mode 100644 index 654d0bfe..00000000 --- a/node_modules/camelcase/license +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) Sindre Sorhus (sindresorhus.com) - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/node_modules/camelcase/package.json b/node_modules/camelcase/package.json deleted file mode 100644 index 115dab48..00000000 --- a/node_modules/camelcase/package.json +++ /dev/null @@ -1,103 +0,0 @@ -{ - "_args": [ - [ - { - "raw": "camelcase@^1.0.1", - "scope": null, - "escapedName": "camelcase", - "name": "camelcase", - "rawSpec": "^1.0.1", - "spec": ">=1.0.1 <2.0.0", - "type": "range" - }, - "/Users/benjaminarias/Desktop/poly/node_modules/camelcase-keys" - ] - ], - "_from": "camelcase@>=1.0.1 <2.0.0", - "_id": "camelcase@1.2.1", - "_inCache": true, - "_installable": true, - "_location": "/camelcase", - "_nodeVersion": "0.12.5", - "_npmUser": { - "name": "sindresorhus", - "email": "sindresorhus@gmail.com" - }, - "_npmVersion": "2.11.2", - "_phantomChildren": {}, - "_requested": { - "raw": "camelcase@^1.0.1", - "scope": null, - "escapedName": "camelcase", - "name": "camelcase", - "rawSpec": "^1.0.1", - "spec": ">=1.0.1 <2.0.0", - "type": "range" - }, - "_requiredBy": [ - "/camelcase-keys" - ], - "_resolved": "https://registry.npmjs.org/camelcase/-/camelcase-1.2.1.tgz", - "_shasum": "9bb5304d2e0b56698b2c758b08a3eaa9daa58a39", - "_shrinkwrap": null, - "_spec": "camelcase@^1.0.1", - "_where": "/Users/benjaminarias/Desktop/poly/node_modules/camelcase-keys", - "author": { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "http://sindresorhus.com" - }, - "bugs": { - "url": "https://github.com/sindresorhus/camelcase/issues" - }, - "dependencies": {}, - "description": "Convert a dash/dot/underscore/space separated string to camelCase: foo-bar → fooBar", - "devDependencies": { - "ava": "0.0.4" - }, - "directories": {}, - "dist": { - "shasum": "9bb5304d2e0b56698b2c758b08a3eaa9daa58a39", - "tarball": "https://registry.npmjs.org/camelcase/-/camelcase-1.2.1.tgz" - }, - "engines": { - "node": ">=0.10.0" - }, - "files": [ - "index.js" - ], - "gitHead": "185ba12da723be9c1ee986cc2956bdc4c517a141", - "homepage": "https://github.com/sindresorhus/camelcase", - "keywords": [ - "camelcase", - "camel-case", - "camel", - "case", - "dash", - "hyphen", - "dot", - "underscore", - "separator", - "string", - "text", - "convert" - ], - "license": "MIT", - "maintainers": [ - { - "name": "sindresorhus", - "email": "sindresorhus@gmail.com" - } - ], - "name": "camelcase", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git+https://github.com/sindresorhus/camelcase.git" - }, - "scripts": { - "test": "node test.js" - }, - "version": "1.2.1" -} diff --git a/node_modules/camelcase/readme.md b/node_modules/camelcase/readme.md deleted file mode 100644 index 516dc398..00000000 --- a/node_modules/camelcase/readme.md +++ /dev/null @@ -1,56 +0,0 @@ -# camelcase [![Build Status](https://travis-ci.org/sindresorhus/camelcase.svg?branch=master)](https://travis-ci.org/sindresorhus/camelcase) - -> Convert a dash/dot/underscore/space separated string to camelCase: `foo-bar` → `fooBar` - - -## Install - -```sh -$ npm install --save camelcase -``` - - -## Usage - -```js -var camelCase = require('camelcase'); - -camelCase('foo-bar'); -//=> fooBar - -camelCase('foo_bar'); -//=> fooBar - -camelCase('Foo-Bar'); -//=> fooBar - -camelCase('--foo.bar'); -//=> fooBar - -camelCase('__foo__bar__'); -//=> fooBar - -camelCase('foo bar'); -//=> fooBar - -console.log(process.argv[3]); -//=> --foo-bar -camelCase(process.argv[3]); -//=> fooBar - -camelCase('foo', 'bar'); -//=> fooBar - -camelCase('__foo__', '--bar'); -//=> fooBar -``` - - -## Related - -See [`decamelize`](https://github.com/sindresorhus/decamelize) for the inverse. - - -## License - -MIT © [Sindre Sorhus](http://sindresorhus.com) diff --git a/node_modules/caseless/LICENSE b/node_modules/caseless/LICENSE deleted file mode 100644 index 61789f4a..00000000 --- a/node_modules/caseless/LICENSE +++ /dev/null @@ -1,28 +0,0 @@ -Apache License -Version 2.0, January 2004 -http://www.apache.org/licenses/ -TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION -1. Definitions. -"License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. -"Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. -"Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. -"You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. -"Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. -"Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. -"Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). -"Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. -"Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." -"Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. -2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. -3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. -4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: -You must give any other recipients of the Work or Derivative Works a copy of this License; and -You must cause any modified files to carry prominent notices stating that You changed the files; and -You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and -If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. -5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. -6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. -7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. -8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. -9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. -END OF TERMS AND CONDITIONS \ No newline at end of file diff --git a/node_modules/caseless/README.md b/node_modules/caseless/README.md deleted file mode 100644 index e5077a21..00000000 --- a/node_modules/caseless/README.md +++ /dev/null @@ -1,45 +0,0 @@ -## Caseless -- wrap an object to set and get property with caseless semantics but also preserve caseing. - -This library is incredibly useful when working with HTTP headers. It allows you to get/set/check for headers in a caseless manner while also preserving the caseing of headers the first time they are set. - -## Usage - -```javascript -var headers = {} - , c = caseless(headers) - ; -c.set('a-Header', 'asdf') -c.get('a-header') === 'asdf' -``` - -## has(key) - -Has takes a name and if it finds a matching header will return that header name with the preserved caseing it was set with. - -```javascript -c.has('a-header') === 'a-Header' -``` - -## set(key, value[, clobber=true]) - -Set is fairly straight forward except that if the header exists and clobber is disabled it will add `','+value` to the existing header. - -```javascript -c.set('a-Header', 'fdas') -c.set('a-HEADER', 'more', false) -c.get('a-header') === 'fdsa,more' -``` - -## swap(key) - -Swaps the casing of a header with the new one that is passed in. - -```javascript -var headers = {} - , c = caseless(headers) - ; -c.set('a-Header', 'fdas') -c.swap('a-HEADER') -c.has('a-header') === 'a-HEADER' -headers === {'a-HEADER': 'fdas'} -``` diff --git a/node_modules/caseless/index.js b/node_modules/caseless/index.js deleted file mode 100644 index d86a70ec..00000000 --- a/node_modules/caseless/index.js +++ /dev/null @@ -1,66 +0,0 @@ -function Caseless (dict) { - this.dict = dict || {} -} -Caseless.prototype.set = function (name, value, clobber) { - if (typeof name === 'object') { - for (var i in name) { - this.set(i, name[i], value) - } - } else { - if (typeof clobber === 'undefined') clobber = true - var has = this.has(name) - - if (!clobber && has) this.dict[has] = this.dict[has] + ',' + value - else this.dict[has || name] = value - return has - } -} -Caseless.prototype.has = function (name) { - var keys = Object.keys(this.dict) - , name = name.toLowerCase() - ; - for (var i=0;i=0.11.0 <0.12.0", - "type": "range" - }, - "/Users/benjaminarias/Desktop/poly/node_modules/request" - ] - ], - "_from": "caseless@>=0.11.0 <0.12.0", - "_id": "caseless@0.11.0", - "_inCache": true, - "_installable": true, - "_location": "/caseless", - "_nodeVersion": "1.8.1", - "_npmUser": { - "name": "mikeal", - "email": "mikeal.rogers@gmail.com" - }, - "_npmVersion": "2.8.3", - "_phantomChildren": {}, - "_requested": { - "raw": "caseless@~0.11.0", - "scope": null, - "escapedName": "caseless", - "name": "caseless", - "rawSpec": "~0.11.0", - "spec": ">=0.11.0 <0.12.0", - "type": "range" - }, - "_requiredBy": [ - "/google-auth-library/request", - "/request" - ], - "_resolved": "https://registry.npmjs.org/caseless/-/caseless-0.11.0.tgz", - "_shasum": "715b96ea9841593cc33067923f5ec60ebda4f7d7", - "_shrinkwrap": null, - "_spec": "caseless@~0.11.0", - "_where": "/Users/benjaminarias/Desktop/poly/node_modules/request", - "author": { - "name": "Mikeal Rogers", - "email": "mikeal.rogers@gmail.com" - }, - "bugs": { - "url": "https://github.com/mikeal/caseless/issues" - }, - "dependencies": {}, - "description": "Caseless object set/get/has, very useful when working with HTTP headers.", - "devDependencies": { - "tape": "^2.10.2" - }, - "directories": {}, - "dist": { - "shasum": "715b96ea9841593cc33067923f5ec60ebda4f7d7", - "tarball": "https://registry.npmjs.org/caseless/-/caseless-0.11.0.tgz" - }, - "gitHead": "c578232a02cc2b46b6da8851caf57fdbfac89ff5", - "homepage": "https://github.com/mikeal/caseless#readme", - "keywords": [ - "headers", - "http", - "caseless" - ], - "license": "Apache-2.0", - "main": "index.js", - "maintainers": [ - { - "name": "mikeal", - "email": "mikeal.rogers@gmail.com" - }, - { - "name": "nylen", - "email": "jnylen@gmail.com" - }, - { - "name": "simov", - "email": "simeonvelichkov@gmail.com" - } - ], - "name": "caseless", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git+https://github.com/mikeal/caseless.git" - }, - "scripts": { - "test": "node test.js" - }, - "test": "node test.js", - "version": "0.11.0" -} diff --git a/node_modules/caseless/test.js b/node_modules/caseless/test.js deleted file mode 100644 index 084bbaf5..00000000 --- a/node_modules/caseless/test.js +++ /dev/null @@ -1,40 +0,0 @@ -var tape = require('tape') - , caseless = require('./') - ; - -tape('set get has', function (t) { - var headers = {} - , c = caseless(headers) - ; - t.plan(17) - c.set('a-Header', 'asdf') - t.equal(c.get('a-header'), 'asdf') - t.equal(c.has('a-header'), 'a-Header') - t.ok(!c.has('nothing')) - // old bug where we used the wrong regex - t.ok(!c.has('a-hea')) - c.set('a-header', 'fdsa') - t.equal(c.get('a-header'), 'fdsa') - t.equal(c.get('a-Header'), 'fdsa') - c.set('a-HEADER', 'more', false) - t.equal(c.get('a-header'), 'fdsa,more') - - t.deepEqual(headers, {'a-Header': 'fdsa,more'}) - c.swap('a-HEADER') - t.deepEqual(headers, {'a-HEADER': 'fdsa,more'}) - - c.set('deleteme', 'foobar') - t.ok(c.has('deleteme')) - t.ok(c.del('deleteme')) - t.notOk(c.has('deleteme')) - t.notOk(c.has('idonotexist')) - t.ok(c.del('idonotexist')) - - c.set('tva', 'test1') - c.set('tva-header', 'test2') - t.equal(c.has('tva'), 'tva') - t.notOk(c.has('header')) - - t.equal(c.get('tva'), 'test1') - -}) diff --git a/node_modules/chalk/index.js b/node_modules/chalk/index.js deleted file mode 100644 index 2d85a917..00000000 --- a/node_modules/chalk/index.js +++ /dev/null @@ -1,116 +0,0 @@ -'use strict'; -var escapeStringRegexp = require('escape-string-regexp'); -var ansiStyles = require('ansi-styles'); -var stripAnsi = require('strip-ansi'); -var hasAnsi = require('has-ansi'); -var supportsColor = require('supports-color'); -var defineProps = Object.defineProperties; -var isSimpleWindowsTerm = process.platform === 'win32' && !/^xterm/i.test(process.env.TERM); - -function Chalk(options) { - // detect mode if not set manually - this.enabled = !options || options.enabled === undefined ? supportsColor : options.enabled; -} - -// use bright blue on Windows as the normal blue color is illegible -if (isSimpleWindowsTerm) { - ansiStyles.blue.open = '\u001b[94m'; -} - -var styles = (function () { - var ret = {}; - - Object.keys(ansiStyles).forEach(function (key) { - ansiStyles[key].closeRe = new RegExp(escapeStringRegexp(ansiStyles[key].close), 'g'); - - ret[key] = { - get: function () { - return build.call(this, this._styles.concat(key)); - } - }; - }); - - return ret; -})(); - -var proto = defineProps(function chalk() {}, styles); - -function build(_styles) { - var builder = function () { - return applyStyle.apply(builder, arguments); - }; - - builder._styles = _styles; - builder.enabled = this.enabled; - // __proto__ is used because we must return a function, but there is - // no way to create a function with a different prototype. - /* eslint-disable no-proto */ - builder.__proto__ = proto; - - return builder; -} - -function applyStyle() { - // support varags, but simply cast to string in case there's only one arg - var args = arguments; - var argsLen = args.length; - var str = argsLen !== 0 && String(arguments[0]); - - if (argsLen > 1) { - // don't slice `arguments`, it prevents v8 optimizations - for (var a = 1; a < argsLen; a++) { - str += ' ' + args[a]; - } - } - - if (!this.enabled || !str) { - return str; - } - - var nestedStyles = this._styles; - var i = nestedStyles.length; - - // Turns out that on Windows dimmed gray text becomes invisible in cmd.exe, - // see https://github.com/chalk/chalk/issues/58 - // If we're on Windows and we're dealing with a gray color, temporarily make 'dim' a noop. - var originalDim = ansiStyles.dim.open; - if (isSimpleWindowsTerm && (nestedStyles.indexOf('gray') !== -1 || nestedStyles.indexOf('grey') !== -1)) { - ansiStyles.dim.open = ''; - } - - while (i--) { - var code = ansiStyles[nestedStyles[i]]; - - // Replace any instances already present with a re-opening code - // otherwise only the part of the string until said closing code - // will be colored, and the rest will simply be 'plain'. - str = code.open + str.replace(code.closeRe, code.open) + code.close; - } - - // Reset the original 'dim' if we changed it to work around the Windows dimmed gray issue. - ansiStyles.dim.open = originalDim; - - return str; -} - -function init() { - var ret = {}; - - Object.keys(styles).forEach(function (name) { - ret[name] = { - get: function () { - return build.call(this, [name]); - } - }; - }); - - return ret; -} - -defineProps(Chalk.prototype, init()); - -module.exports = new Chalk(); -module.exports.styles = ansiStyles; -module.exports.hasColor = hasAnsi; -module.exports.stripColor = stripAnsi; -module.exports.supportsColor = supportsColor; diff --git a/node_modules/chalk/license b/node_modules/chalk/license deleted file mode 100644 index 654d0bfe..00000000 --- a/node_modules/chalk/license +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) Sindre Sorhus (sindresorhus.com) - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/node_modules/chalk/package.json b/node_modules/chalk/package.json deleted file mode 100644 index 5941b08c..00000000 --- a/node_modules/chalk/package.json +++ /dev/null @@ -1,142 +0,0 @@ -{ - "_args": [ - [ - { - "raw": "chalk@^1.1.1", - "scope": null, - "escapedName": "chalk", - "name": "chalk", - "rawSpec": "^1.1.1", - "spec": ">=1.1.1 <2.0.0", - "type": "range" - }, - "/Users/benjaminarias/Desktop/poly/node_modules/har-validator" - ] - ], - "_from": "chalk@>=1.1.1 <2.0.0", - "_id": "chalk@1.1.3", - "_inCache": true, - "_installable": true, - "_location": "/chalk", - "_nodeVersion": "0.10.32", - "_npmOperationalInternal": { - "host": "packages-12-west.internal.npmjs.com", - "tmp": "tmp/chalk-1.1.3.tgz_1459210604109_0.3892582862172276" - }, - "_npmUser": { - "name": "qix", - "email": "i.am.qix@gmail.com" - }, - "_npmVersion": "2.14.2", - "_phantomChildren": {}, - "_requested": { - "raw": "chalk@^1.1.1", - "scope": null, - "escapedName": "chalk", - "name": "chalk", - "rawSpec": "^1.1.1", - "spec": ">=1.1.1 <2.0.0", - "type": "range" - }, - "_requiredBy": [ - "/google-auth-library/har-validator", - "/har-validator" - ], - "_resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", - "_shasum": "a8115c55e4a702fe4d150abd3872822a7e09fc98", - "_shrinkwrap": null, - "_spec": "chalk@^1.1.1", - "_where": "/Users/benjaminarias/Desktop/poly/node_modules/har-validator", - "bugs": { - "url": "https://github.com/chalk/chalk/issues" - }, - "dependencies": { - "ansi-styles": "^2.2.1", - "escape-string-regexp": "^1.0.2", - "has-ansi": "^2.0.0", - "strip-ansi": "^3.0.0", - "supports-color": "^2.0.0" - }, - "description": "Terminal string styling done right. Much color.", - "devDependencies": { - "coveralls": "^2.11.2", - "matcha": "^0.6.0", - "mocha": "*", - "nyc": "^3.0.0", - "require-uncached": "^1.0.2", - "resolve-from": "^1.0.0", - "semver": "^4.3.3", - "xo": "*" - }, - "directories": {}, - "dist": { - "shasum": "a8115c55e4a702fe4d150abd3872822a7e09fc98", - "tarball": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz" - }, - "engines": { - "node": ">=0.10.0" - }, - "files": [ - "index.js" - ], - "gitHead": "0d8d8c204eb87a4038219131ad4d8369c9f59d24", - "homepage": "https://github.com/chalk/chalk#readme", - "keywords": [ - "color", - "colour", - "colors", - "terminal", - "console", - "cli", - "string", - "str", - "ansi", - "style", - "styles", - "tty", - "formatting", - "rgb", - "256", - "shell", - "xterm", - "log", - "logging", - "command-line", - "text" - ], - "license": "MIT", - "maintainers": [ - { - "name": "qix", - "email": "i.am.qix@gmail.com" - }, - { - "name": "sindresorhus", - "email": "sindresorhus@gmail.com" - }, - { - "name": "unicorn", - "email": "sindresorhus+unicorn@gmail.com" - } - ], - "name": "chalk", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git+https://github.com/chalk/chalk.git" - }, - "scripts": { - "bench": "matcha benchmark.js", - "coverage": "nyc npm test && nyc report", - "coveralls": "nyc npm test && nyc report --reporter=text-lcov | coveralls", - "test": "xo && mocha" - }, - "version": "1.1.3", - "xo": { - "envs": [ - "node", - "mocha" - ] - } -} diff --git a/node_modules/chalk/readme.md b/node_modules/chalk/readme.md deleted file mode 100644 index 5cf111e3..00000000 --- a/node_modules/chalk/readme.md +++ /dev/null @@ -1,213 +0,0 @@ -

    -
    -
    - chalk -
    -
    -
    -

    - -> Terminal string styling done right - -[![Build Status](https://travis-ci.org/chalk/chalk.svg?branch=master)](https://travis-ci.org/chalk/chalk) -[![Coverage Status](https://coveralls.io/repos/chalk/chalk/badge.svg?branch=master)](https://coveralls.io/r/chalk/chalk?branch=master) -[![](http://img.shields.io/badge/unicorn-approved-ff69b4.svg)](https://www.youtube.com/watch?v=9auOCbH5Ns4) - - -[colors.js](https://github.com/Marak/colors.js) used to be the most popular string styling module, but it has serious deficiencies like extending `String.prototype` which causes all kinds of [problems](https://github.com/yeoman/yo/issues/68). Although there are other ones, they either do too much or not enough. - -**Chalk is a clean and focused alternative.** - -![](https://github.com/chalk/ansi-styles/raw/master/screenshot.png) - - -## Why - -- Highly performant -- Doesn't extend `String.prototype` -- Expressive API -- Ability to nest styles -- Clean and focused -- Auto-detects color support -- Actively maintained -- [Used by ~4500 modules](https://www.npmjs.com/browse/depended/chalk) as of July 15, 2015 - - -## Install - -``` -$ npm install --save chalk -``` - - -## Usage - -Chalk comes with an easy to use composable API where you just chain and nest the styles you want. - -```js -var chalk = require('chalk'); - -// style a string -chalk.blue('Hello world!'); - -// combine styled and normal strings -chalk.blue('Hello') + 'World' + chalk.red('!'); - -// compose multiple styles using the chainable API -chalk.blue.bgRed.bold('Hello world!'); - -// pass in multiple arguments -chalk.blue('Hello', 'World!', 'Foo', 'bar', 'biz', 'baz'); - -// nest styles -chalk.red('Hello', chalk.underline.bgBlue('world') + '!'); - -// nest styles of the same type even (color, underline, background) -chalk.green( - 'I am a green line ' + - chalk.blue.underline.bold('with a blue substring') + - ' that becomes green again!' -); -``` - -Easily define your own themes. - -```js -var chalk = require('chalk'); -var error = chalk.bold.red; -console.log(error('Error!')); -``` - -Take advantage of console.log [string substitution](http://nodejs.org/docs/latest/api/console.html#console_console_log_data). - -```js -var name = 'Sindre'; -console.log(chalk.green('Hello %s'), name); -//=> Hello Sindre -``` - - -## API - -### chalk.` - - -
    - -
    -

    Common Tests

    -
    - -
    - -
    -
      -
    • Test various Forge components.
    • -
    • See JavaScript console for more detailed output.
    • -
    -
    - -
    -Control - - -
    - Scroll Tests -
    - - - bits -
    - -
    -Progress -Status: ?
    -Pass: ?/?
    -Fail: ? -
    - -
    -Tests -
    -
    - -
    - - - diff --git a/node_modules/node-forge/tests/common.js b/node_modules/node-forge/tests/common.js deleted file mode 100644 index 57dfbc4b..00000000 --- a/node_modules/node-forge/tests/common.js +++ /dev/null @@ -1,2199 +0,0 @@ -/** - * Forge Common Tests - * - * @author Dave Longley - * - * Copyright (c) 2009-2012 Digital Bazaar, Inc. All rights reserved. - */ -jQuery(function($) -{ - // logging category - var cat = 'forge.tests.common'; - - // local alias - var forge = window.forge; - - var tests = []; - var passed = 0; - var failed = 0; - - var init = function() - { - passed = failed = 0; - $('.ready,.testing,.pass,.fail') - .removeClass('ready testing pass fail'); - $('#status') - .text('Ready.') - .addClass('ready'); - $('#total').text(tests.length); - $('#pass').text(passed); - $('#fail').text(failed); - $('.expect').empty(); - $('.result').empty(); - $('.time').empty(); - $('.timePer').empty(); - $('#start').attr('disabled', ''); - }; - - var start = function() - { - $('#start').attr('disabled', 'true'); - // meta! use tasks to run the task tests - forge.task.start({ - type: 'test', - run: function(task) { - task.next('starting', function(task) { - forge.log.debug(cat, 'start'); - $('#status') - .text('Testing...') - .addClass('testing') - .removeClass('idle'); - }); - $.each(tests, function(i, test) { - task.next('test', function(task) { - var title = $('li:first', test.container); - if($('#scroll:checked').length === 1) - { - $('html,body').animate({scrollTop: title.offset().top}); - } - title.addClass('testing'); - test.run(task, test); - }); - task.next('test', function(task) { - $('li:first', test.container).removeClass('testing'); - }); - }); - task.next('success', function(task) { - forge.log.debug(cat, 'done'); - if(failed === 0) { - $('#status') - .text('PASS') - .addClass('pass') - .removeClass('testing'); - } else { - // FIXME: should just be hitting failure() below - $('#status') - .text('FAIL') - .addClass('fail') - .removeClass('testing'); - } - }); - }, - failure: function() { - $('#status') - .text('FAIL') - .addClass('fail') - .removeClass('testing'); - } - }); - }; - - $('#start').click(function() { - start(); - }); - - $('#reset').click(function() { - init(); - }); - - $('#keygen').click(function() { - var bits = $('#bits')[0].value; - var keys = forge.pki.rsa.generateKeyPair(bits); - forge.log.debug(cat, 'generating ' + bits + '-bit RSA key-pair...'); - setTimeout(function() - { - forge.log.debug(cat, 'private key:', keys.privateKey); - forge.log.debug(cat, forge.pki.privateKeyToPem(keys.privateKey)); - forge.log.debug(cat, 'public key:', keys.publicKey); - forge.log.debug(cat, forge.pki.publicKeyToPem(keys.publicKey)); - - forge.log.debug(cat, 'testing sign/verify...'); - setTimeout(function() - { - // do sign/verify test - try - { - var md = forge.md.sha1.create(); - md.update('foo'); - var signature = keys.privateKey.sign(md); - keys.publicKey.verify(md.digest().getBytes(), signature); - forge.log.debug(cat, 'sign/verify success'); - } - catch(ex) - { - forge.log.error(cat, 'sign/verify failure', ex); - } - }, 0); - }, 0); - }); - - $('#certgen').click(function() { - var bits = $('#bits')[0].value; - forge.log.debug(cat, 'generating ' + bits + - '-bit RSA key-pair and certificate...'); - setTimeout(function() - { - try - { - var keys = forge.pki.rsa.generateKeyPair(bits); - var cert = forge.pki.createCertificate(); - cert.serialNumber = '01'; - cert.validity.notBefore = new Date(); - cert.validity.notAfter = new Date(); - cert.validity.notAfter.setFullYear( - cert.validity.notBefore.getFullYear() + 1); - var attrs = [{ - name: 'commonName', - value: 'mycert' - }, { - name: 'countryName', - value: 'US' - }, { - shortName: 'ST', - value: 'Virginia' - }, { - name: 'localityName', - value: 'Blacksburg' - }, { - name: 'organizationName', - value: 'Test' - }, { - shortName: 'OU', - value: 'Test' - }]; - cert.setSubject(attrs); - cert.setIssuer(attrs); - cert.setExtensions([{ - name: 'basicConstraints', - cA: true - }, { - name: 'keyUsage', - keyCertSign: true - }, { - name: 'subjectAltName', - altNames: [{ - type: 6, // URI - value: 'http://localhost/dataspace/person/myname#this' - }] - }]); - // FIXME: add subjectKeyIdentifier extension - // FIXME: add authorityKeyIdentifier extension - cert.publicKey = keys.publicKey; - - // self-sign certificate - cert.sign(keys.privateKey); - - forge.log.debug(cat, 'certificate:', cert); - //forge.log.debug(cat, - // forge.asn1.prettyPrint(forge.pki.certificateToAsn1(cert))); - forge.log.debug(cat, forge.pki.certificateToPem(cert)); - - // verify certificate - forge.log.debug(cat, 'verified', cert.verify(cert)); - } - catch(ex) - { - forge.log.error(cat, ex, ex.message ? ex.message : ''); - } - }, 0); - }); - - var addTest = function(name, run) - { - var container = $('
    • Test ' + name + '
      • '); - var expect = $('
      • Expect:
      • '); - var result = $('
      • Result:
      • '); - var time = $('
      • Time:
      • '); - var timePer = $('
      • Time Per Iteration:
      • '); - $('ul', container) - .append(expect) - .append(result) - .append(time) - .append(timePer); - $('#tests').append(container); - var test = { - container: container, - startTime: null, - run: function(task, test) { - test.startTime = new Date(); - run(task, test); - }, - expect: $('span', expect), - result: $('span', result), - check: function() { - var e = test.expect.text(); - var r = test.result.text(); - (e == r) ? test.pass() : test.fail(); - }, - pass: function(iterations) { - var dt = new Date() - test.startTime; - if(!iterations) - { - iterations = 1; - } - var dti = (dt / iterations); - passed += 1; - $('#pass').text(passed); - $('li:first', container).addClass('pass'); - $('span.time', container).html(dt + 'ms'); - $('span.timePer', container).html(dti + 'ms'); - }, - fail: function(iterations) { - var dt = new Date() - test.startTime; - if(!iterations) - { - iterations = 1; - } - var dti = (dt / iterations); - failed += 1; - $('#fail').text(failed); - $('li:first', container).addClass('fail'); - $('span.time', container).html(dt + 'ms'); - $('span.timePer', container).html(dti + 'ms'); - } - }; - tests.push(test); - }; - - addTest('buffer put bytes', function(task, test) - { - ba = forge.util.createBuffer(); - ba.putByte(1); - ba.putByte(2); - ba.putByte(3); - ba.putByte(4); - ba.putInt32(4); - ba.putByte(1); - ba.putByte(2); - ba.putByte(3); - ba.putInt32(4294967295); - var hex = ba.toHex(); - var bytes = []; - while(ba.length() > 0) - { - bytes.push(ba.getByte()); - } - var expect = [1, 2, 3, 4, 0, 0, 0, 4, 1, 2, 3, 255, 255, 255, 255]; - var exHex = '0102030400000004010203ffffffff'; - test.expect.html(exHex); - test.result.html(hex); - - test.check(); - }); - - addTest('buffer from hex', function(task, test) - { - var exHex = '0102030400000004010203ffffffff'; - test.expect.html(exHex); - - var buf = forge.util.createBuffer(); - buf.putBytes(forge.util.hexToBytes(exHex)); - test.result.html(buf.toHex()); - - test.check(); - }); - - addTest('base64 encode', function(task, test) - { - var s1 = '00010203050607080A0B0C0D0F1011121415161719'; - var s2 = 'MDAwMTAyMDMwNTA2MDcwODBBMEIwQzBEMEYxMDExMTIxNDE1MTYxNzE5'; - test.expect.html(s2); - - var out = forge.util.encode64(s1); - test.result.html(out); - - test.check(); - }); - - addTest('base64 decode', function(task, test) - { - var s1 = '00010203050607080A0B0C0D0F1011121415161719'; - var s2 = 'MDAwMTAyMDMwNTA2MDcwODBBMEIwQzBEMEYxMDExMTIxNDE1MTYxNzE5'; - test.expect.html(s1); - - var out = forge.util.decode64(s2); - test.result.html(out); - - test.check(); - }); - - addTest('md5 empty', function(task, test) - { - var expect = 'd41d8cd98f00b204e9800998ecf8427e'; - test.expect.html(expect); - var md = forge.md.md5.create(); - test.result.html(md.digest().toHex()); - test.check(); - }); - - addTest('md5 "abc"', function(task, test) - { - var expect = '900150983cd24fb0d6963f7d28e17f72'; - test.expect.html(expect); - var md = forge.md.md5.create(); - md.update('abc'); - test.result.html(md.digest().toHex()); - test.check(); - }); - - addTest('md5 "The quick brown fox jumps over the lazy dog"', - function(task, test) - { - var expect = '9e107d9d372bb6826bd81d3542a419d6'; - test.expect.html(expect); - var md = forge.md.md5.create(); - md.start(); - md.update('The quick brown fox jumps over the lazy dog'); - test.result.html(md.digest().toHex()); - test.check(); - }); - - // c'è - addTest('md5 "c\'\u00e8"', function(task, test) - { - var expect = '8ef7c2941d78fe89f31e614437c9db59'; - test.expect.html(expect); - var md = forge.md.md5.create(); - md.update("c'\u00e8", 'utf8'); - test.result.html(md.digest().toHex()); - test.check(); - }); - - addTest('md5 "THIS IS A MESSAGE"', - function(task, test) - { - var expect = '78eebfd9d42958e3f31244f116ab7bbe'; - test.expect.html(expect); - var md = forge.md.md5.create(); - md.start(); - md.update('THIS IS '); - md.update('A MESSAGE'); - // do twice to check continuing digest - test.result.html(md.digest().toHex()); - test.result.html(md.digest().toHex()); - test.check(); - }); - - addTest('md5 long message', - function(task, test) - { - var input = forge.util.createBuffer(); - input.putBytes(forge.util.hexToBytes( - '0100002903018d32e9c6dc423774c4c39a5a1b78f44cc2cab5f676d39' + - 'f703d29bfa27dfeb870000002002f0100')); - input.putBytes(forge.util.hexToBytes( - '0200004603014c2c1e835d39da71bc0857eb04c2b50fe90dbb2a8477f' + - 'e7364598d6f0575999c20a6c7248c5174da6d03ac711888f762fc4ed5' + - '4f7254b32273690de849c843073d002f00')); - input.putBytes(forge.util.hexToBytes( - '0b0003d20003cf0003cc308203c8308202b0a003020102020100300d0' + - '6092a864886f70d0101050500308186310b3009060355040613025553' + - '311d301b060355040a13144469676974616c2042617a6161722c20496' + - 'e632e31443042060355040b133b4269746d756e6b206c6f63616c686f' + - '73742d6f6e6c7920436572746966696361746573202d20417574686f7' + - '2697a6174696f6e207669612042545031123010060355040313096c6f' + - '63616c686f7374301e170d3130303231343137303931395a170d32303' + - '03231333137303931395a308186310b3009060355040613025553311d' + - '301b060355040a13144469676974616c2042617a6161722c20496e632' + - 'e31443042060355040b133b4269746d756e6b206c6f63616c686f7374' + - '2d6f6e6c7920436572746966696361746573202d20417574686f72697' + - 'a6174696f6e207669612042545031123010060355040313096c6f6361' + - '6c686f737430820122300d06092a864886f70d01010105000382010f0' + - '03082010a0282010100dc436f17d6909d8a9d6186ea218eb5c86b848b' + - 'ae02219bd56a71203daf07e81bc19e7e98134136bcb012881864bf03b' + - '3774652ad5eab85dba411a5114ffeac09babce75f31314345512cd87c' + - '91318b2e77433270a52185fc16f428c3ca412ad6e9484bc2fb87abb4e' + - '8fb71bf0f619e31a42340b35967f06c24a741a31c979c0bb8921a90a4' + - '7025fbeb8adca576979e70a56830c61170c9647c18c0794d68c0df38f' + - '3aac5fc3b530e016ea5659715339f3f3c209cdee9dbe794b5af92530c' + - '5754c1d874b78974bfad994e0dfc582275e79feb522f6e4bcc2b2945b' + - 'aedfb0dbdaebb605f9483ff0bea29ecd5f4d6f2769965d1b3e04f8422' + - '716042680011ff676f0203010001a33f303d300c0603551d130101ff0' + - '4023000300e0603551d0f0101ff0404030204f0301d0603551d250416' + - '301406082b0601050507030106082b06010505070302300d06092a864' + - '886f70d010105050003820101009c4562be3f2d8d8e388085a697f2f1' + - '06eaeff4992a43f198fe3dcf15c8229cf1043f061a38204f73d86f4fb' + - '6348048cc5279ed719873aa10e3773d92b629c2c3fcce04012c81ba3b' + - '4ec451e9644ec5191078402d845e05d02c7b4d974b4588276e5037aba' + - '7ef26a8bddeb21e10698c82f425e767dc401adf722fa73ab78cfa069b' + - 'd69052d7ca6a75cc9225550e315d71c5f8764362ea4dbc6ecb837a847' + - '1043c5a7f826a71af145a053090bd4bccca6a2c552841cdb1908a8352' + - 'f49283d2e641acdef667c7543af441a16f8294251e2ac376fa507b53a' + - 'e418dd038cd20cef1e7bfbf5ae03a7c88d93d843abaabbdc5f3431132' + - 'f3e559d2dd414c3eda38a210b8')); - input.putBytes(forge.util.hexToBytes('0e000000')); - input.putBytes(forge.util.hexToBytes( - '10000102010026a220b7be857402819b78d81080d01a682599bbd0090' + - '2985cc64edf8e520e4111eb0e1729a14ffa3498ca259cc9ad6fc78fa1' + - '30d968ebdb78dc0b950c0aa44355f13ba678419185d7e4608fe178ca6' + - 'b2cef33e4193778d1a70fe4d0dfcb110be4bbb4dbaa712177655728f9' + - '14ab4c0f6c4aef79a46b3d996c82b2ebe9ed1748eb5cace7dc44fb67e' + - '73f452a047f2ed199b3d50d5db960acf03244dc8efa4fc129faf8b65f' + - '9e52e62b5544722bd17d2358e817a777618a4265a3db277fc04851a82' + - 'a91fe6cdcb8127f156e0b4a5d1f54ce2742eb70c895f5f8b85f5febe6' + - '9bc73e891f9280826860a0c2ef94c7935e6215c3c4cd6b0e43e80cca3' + - '96d913d36be')); - - var expect = 'd15a2da0e92c3da55dc573f885b6e653'; - test.expect.html(expect); - - var md = forge.md.md5.create(); - md.start(); - md.update(input.getBytes()); - test.result.html(md.digest().toHex()); - - test.check(); - }); - - addTest('sha-1 empty', function(task, test) - { - var expect = 'da39a3ee5e6b4b0d3255bfef95601890afd80709'; - test.expect.html(expect); - var md = forge.md.sha1.create(); - test.result.html(md.digest().toHex()); - test.check(); - }); - - addTest('sha-1 "abc"', function(task, test) - { - var expect = 'a9993e364706816aba3e25717850c26c9cd0d89d'; - test.expect.html(expect); - var md = forge.md.sha1.create(); - md.update('abc'); - test.result.html(md.digest().toHex()); - test.check(); - }); - - addTest('sha-1 "The quick brown fox jumps over the lazy dog"', - function(task, test) - { - var expect = '2fd4e1c67a2d28fced849ee1bb76e7391b93eb12'; - test.expect.html(expect); - var md = forge.md.sha1.create(); - md.start(); - md.update('The quick brown fox jumps over the lazy dog'); - test.result.html(md.digest().toHex()); - test.check(); - }); - - // c'è - addTest('sha-1 "c\'\u00e8"', function(task, test) - { - var expect = '98c9a3f804daa73b68a5660d032499a447350c0d'; - test.expect.html(expect); - var md = forge.md.sha1.create(); - md.update("c'\u00e8", 'utf8'); - test.result.html(md.digest().toHex()); - test.check(); - }); - - addTest('sha-1 "THIS IS A MESSAGE"', - function(task, test) - { - var expect = '5f24f4d6499fd2d44df6c6e94be8b14a796c071d'; - test.expect.html(expect); - var md = forge.md.sha1.create(); - md.start(); - md.update('THIS IS '); - md.update('A MESSAGE'); - // do twice to check continuing digest - test.result.html(md.digest().toHex()); - test.result.html(md.digest().toHex()); - test.check(); - }); - - // other browsers too slow for this test - if($.browser.webkit) - { - addTest('sha-1 long message', - function(task, test) - { - var expect = '34aa973cd4c4daa4f61eeb2bdbad27316534016f'; - test.expect.html(expect); - var md = forge.md.sha1.create(); - md.start(); - md.update(forge.util.fillString('a', 1000000)); - // do twice to check continuing digest - test.result.html(md.digest().toHex()); - test.result.html(md.digest().toHex()); - test.check(); - }); - } - - addTest('sha-256 "abc"', function(task, test) - { - var expect = - 'ba7816bf8f01cfea414140de5dae2223b00361a396177a9cb410ff61f20015ad'; - test.expect.html(expect); - var md = forge.md.sha256.create(); - md.update('abc'); - test.result.html(md.digest().toHex()); - test.check(); - }); - - // c'è - addTest('sha-256 "c\'\u00e8"', function(task, test) - { - var expect = - '1aa15c717afffd312acce2217ce1c2e5dabca53c92165999132ec9ca5decdaca'; - test.expect.html(expect); - var md = forge.md.sha256.create(); - md.update("c'\u00e8", 'utf8'); - test.result.html(md.digest().toHex()); - test.check(); - }); - - addTest('sha-256 "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq"', - function(task, test) - { - var expect = - '248d6a61d20638b8e5c026930c3e6039a33ce45964ff2167f6ecedd419db06c1'; - test.expect.html(expect); - var md = forge.md.sha256.create(); - md.start(); - md.update('abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq'); - test.result.html(md.digest().toHex()); - test.check(); - }); - - // other browsers too slow for this test - if($.browser.webkit) - { - addTest('sha-256 long message', - function(task, test) - { - var expect = - 'cdc76e5c9914fb9281a1c7e284d73e67f1809a48a497200e046d39ccc7112cd0'; - test.expect.html(expect); - var md = forge.md.sha256.create(); - md.start(); - md.update(forge.util.fillString('a', 1000000)); - // do twice to check continuing digest - test.result.html(md.digest().toHex()); - test.result.html(md.digest().toHex()); - test.check(); - }); - } - - addTest('hmac md5 "Hi There", 16-byte key', function(task, test) - { - var expect = '9294727a3638bb1c13f48ef8158bfc9d'; - test.expect.html(expect); - var key = forge.util.hexToBytes( - '0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b'); - var hmac = forge.hmac.create(); - hmac.start('MD5', key); - hmac.update('Hi There'); - test.result.html(hmac.digest().toHex()); - test.check(); - }); - - addTest('hmac md5 "what do ya want for nothing?", "Jefe" key', - function(task, test) - { - var expect = '750c783e6ab0b503eaa86e310a5db738'; - test.expect.html(expect); - var hmac = forge.hmac.create(); - hmac.start('MD5', 'Jefe'); - hmac.update('what do ya want for nothing?'); - test.result.html(hmac.digest().toHex()); - test.check(); - }); - - addTest('hmac md5 "Test Using Larger Than Block-Size Key - ' + - 'Hash Key First", 80-byte key', function(task, test) - { - var expect = '6b1ab7fe4bd7bf8f0b62e6ce61b9d0cd'; - test.expect.html(expect); - var key = forge.util.hexToBytes( - 'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa' + - 'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa' + - 'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa' + - 'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa'); - var hmac = forge.hmac.create(); - hmac.start('MD5', key); - hmac.update('Test Using Larger Than Block-Size Key - Hash Key First'); - test.result.html(hmac.digest().toHex()); - test.check(); - }); - - addTest('hmac sha-1 "Hi There", 20-byte key', function(task, test) - { - var expect = 'b617318655057264e28bc0b6fb378c8ef146be00'; - test.expect.html(expect); - var key = forge.util.hexToBytes( - '0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b'); - var hmac = forge.hmac.create(); - hmac.start('SHA1', key); - hmac.update('Hi There'); - test.result.html(hmac.digest().toHex()); - test.check(); - }); - - addTest('hmac sha-1 "what do ya want for nothing?", "Jefe" key', - function(task, test) - { - var expect = 'effcdf6ae5eb2fa2d27416d5f184df9c259a7c79'; - test.expect.html(expect); - var hmac = forge.hmac.create(); - hmac.start('SHA1', 'Jefe'); - hmac.update('what do ya want for nothing?'); - test.result.html(hmac.digest().toHex()); - test.check(); - }); - - addTest('hmac sha-1 "Test Using Larger Than Block-Size Key - ' + - 'Hash Key First", 80-byte key', function(task, test) - { - var expect = 'aa4ae5e15272d00e95705637ce8a3b55ed402112'; - test.expect.html(expect); - var key = forge.util.hexToBytes( - 'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa' + - 'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa' + - 'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa' + - 'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa'); - var hmac = forge.hmac.create(); - hmac.start('SHA1', key); - hmac.update('Test Using Larger Than Block-Size Key - Hash Key First'); - test.result.html(hmac.digest().toHex()); - test.check(); - }); - - addTest('pbkdf2 hmac-sha-1 c=1', function(task, test) - { - var expect = '0c60c80f961f0e71f3a9b524af6012062fe037a6'; - var dk = forge.pkcs5.pbkdf2('password', 'salt', 1, 20); - test.expect.html(expect); - test.result.html(forge.util.bytesToHex(dk)); - test.check(); - }); - - addTest('pbkdf2 hmac-sha-1 c=2', function(task, test) - { - var expect = 'ea6c014dc72d6f8ccd1ed92ace1d41f0d8de8957'; - var dk = forge.pkcs5.pbkdf2('password', 'salt', 2, 20); - test.expect.html(expect); - test.result.html(forge.util.bytesToHex(dk)); - test.check(); - }); - - addTest('pbkdf2 hmac-sha-1 c=2', function(task, test) - { - var expect = 'ea6c014dc72d6f8ccd1ed92ace1d41f0d8de8957'; - var dk = forge.pkcs5.pbkdf2('password', 'salt', 2, 20); - test.expect.html(expect); - test.result.html(forge.util.bytesToHex(dk)); - test.check(); - }); - - addTest('pbkdf2 hmac-sha-1 c=5 keylen=8', function(task, test) - { - var expect = 'd1daa78615f287e6'; - var salt = forge.util.hexToBytes('1234567878563412'); - var dk = forge.pkcs5.pbkdf2('password', salt, 5, 8); - test.expect.html(expect); - test.result.html(forge.util.bytesToHex(dk)); - test.check(); - }); - - // other browsers too slow for this test - if($.browser.webkit) - { - addTest('pbkdf2 hmac-sha-1 c=4096', function(task, test) - { - var expect = '4b007901b765489abead49d926f721d065a429c1'; - var dk = forge.pkcs5.pbkdf2('password', 'salt', 4096, 20); - test.expect.html(expect); - test.result.html(forge.util.bytesToHex(dk)); - test.check(); - }); - } - - /* too slow for javascript - addTest('pbkdf2 hmac-sha-1 c=16777216', function(task, test) - { - var expect = 'eefe3d61cd4da4e4e9945b3d6ba2158c2634e984'; - var dk = forge.pkcs5.pbkdf2('password', 'salt', 16777216, 20); - test.expect.html(expect); - test.result.html(forge.util.bytesToHex(dk)); - test.check(); - });*/ - - addTest('aes-128 encrypt', function(task, test) - { - var block = []; - block.push(0x00112233); - block.push(0x44556677); - block.push(0x8899aabb); - block.push(0xccddeeff); - var plain = block; - - var key = []; - key.push(0x00010203); - key.push(0x04050607); - key.push(0x08090a0b); - key.push(0x0c0d0e0f); - - var expect = []; - expect.push(0x69c4e0d8); - expect.push(0x6a7b0430); - expect.push(0xd8cdb780); - expect.push(0x70b4c55a); - - test.expect.html('69c4e0d86a7b0430d8cdb78070b4c55a'); - - var output = []; - var w = forge.aes._expandKey(key, false); - forge.aes._updateBlock(w, block, output, false); - - var out = forge.util.createBuffer(); - out.putInt32(output[0]); - out.putInt32(output[1]); - out.putInt32(output[2]); - out.putInt32(output[3]); - test.result.html(out.toHex()); - - test.check(); - }); - - addTest('aes-128 decrypt', function(task, test) - { - var block = []; - block.push(0x69c4e0d8); - block.push(0x6a7b0430); - block.push(0xd8cdb780); - block.push(0x70b4c55a); - - var key = []; - key.push(0x00010203); - key.push(0x04050607); - key.push(0x08090a0b); - key.push(0x0c0d0e0f); - - var expect = []; - expect.push(0x00112233); - expect.push(0x44556677); - expect.push(0x8899aabb); - expect.push(0xccddeeff); - - test.expect.html('00112233445566778899aabbccddeeff'); - - var output = []; - w = forge.aes._expandKey(key, true); - forge.aes._updateBlock(w, block, output, true); - - var out = forge.util.createBuffer(); - out.putInt32(output[0]); - out.putInt32(output[1]); - out.putInt32(output[2]); - out.putInt32(output[3]); - test.result.html(out.toHex()); - - test.check(); - }); - - addTest('aes-192 encrypt', function(task, test) - { - var block = []; - block.push(0x00112233); - block.push(0x44556677); - block.push(0x8899aabb); - block.push(0xccddeeff); - var plain = block; - - var key = []; - key.push(0x00010203); - key.push(0x04050607); - key.push(0x08090a0b); - key.push(0x0c0d0e0f); - key.push(0x10111213); - key.push(0x14151617); - - var expect = []; - expect.push(0xdda97ca4); - expect.push(0x864cdfe0); - expect.push(0x6eaf70a0); - expect.push(0xec0d7191); - - test.expect.html('dda97ca4864cdfe06eaf70a0ec0d7191'); - - var output = []; - var w = forge.aes._expandKey(key, false); - forge.aes._updateBlock(w, block, output, false); - - var out = forge.util.createBuffer(); - out.putInt32(output[0]); - out.putInt32(output[1]); - out.putInt32(output[2]); - out.putInt32(output[3]); - test.result.html(out.toHex()); - - test.check(); - }); - - addTest('aes-192 decrypt', function(task, test) - { - var block = []; - block.push(0xdda97ca4); - block.push(0x864cdfe0); - block.push(0x6eaf70a0); - block.push(0xec0d7191); - - var key = []; - key.push(0x00010203); - key.push(0x04050607); - key.push(0x08090a0b); - key.push(0x0c0d0e0f); - key.push(0x10111213); - key.push(0x14151617); - - var expect = []; - expect.push(0x00112233); - expect.push(0x44556677); - expect.push(0x8899aabb); - expect.push(0xccddeeff); - - test.expect.html('00112233445566778899aabbccddeeff'); - - var output = []; - w = forge.aes._expandKey(key, true); - forge.aes._updateBlock(w, block, output, true); - - var out = forge.util.createBuffer(); - out.putInt32(output[0]); - out.putInt32(output[1]); - out.putInt32(output[2]); - out.putInt32(output[3]); - test.result.html(out.toHex()); - - test.check(); - }); - - addTest('aes-256 encrypt', function(task, test) - { - var block = []; - block.push(0x00112233); - block.push(0x44556677); - block.push(0x8899aabb); - block.push(0xccddeeff); - var plain = block; - - var key = []; - key.push(0x00010203); - key.push(0x04050607); - key.push(0x08090a0b); - key.push(0x0c0d0e0f); - key.push(0x10111213); - key.push(0x14151617); - key.push(0x18191a1b); - key.push(0x1c1d1e1f); - - var expect = []; - expect.push(0x8ea2b7ca); - expect.push(0x516745bf); - expect.push(0xeafc4990); - expect.push(0x4b496089); - - test.expect.html('8ea2b7ca516745bfeafc49904b496089'); - - var output = []; - var w = forge.aes._expandKey(key, false); - forge.aes._updateBlock(w, block, output, false); - - var out = forge.util.createBuffer(); - out.putInt32(output[0]); - out.putInt32(output[1]); - out.putInt32(output[2]); - out.putInt32(output[3]); - test.result.html(out.toHex()); - - test.check(); - }); - - addTest('aes-256 decrypt', function(task, test) - { - var block = []; - block.push(0x8ea2b7ca); - block.push(0x516745bf); - block.push(0xeafc4990); - block.push(0x4b496089); - - var key = []; - key.push(0x00010203); - key.push(0x04050607); - key.push(0x08090a0b); - key.push(0x0c0d0e0f); - key.push(0x10111213); - key.push(0x14151617); - key.push(0x18191a1b); - key.push(0x1c1d1e1f); - - var expect = []; - expect.push(0x00112233); - expect.push(0x44556677); - expect.push(0x8899aabb); - expect.push(0xccddeeff); - - test.expect.html('00112233445566778899aabbccddeeff'); - - var output = []; - w = forge.aes._expandKey(key, true); - forge.aes._updateBlock(w, block, output, true); - - var out = forge.util.createBuffer(); - out.putInt32(output[0]); - out.putInt32(output[1]); - out.putInt32(output[2]); - out.putInt32(output[3]); - test.result.html(out.toHex()); - - test.check(); - }); - - (function() - { - var keys = [ - '06a9214036b8a15b512e03d534120006', - 'c286696d887c9aa0611bbb3e2025a45a', - '6c3ea0477630ce21a2ce334aa746c2cd', - '56e47a38c5598974bc46903dba290349' - ]; - - var ivs = [ - '3dafba429d9eb430b422da802c9fac41', - '562e17996d093d28ddb3ba695a2e6f58', - 'c782dc4c098c66cbd9cd27d825682c81', - '8ce82eefbea0da3c44699ed7db51b7d9' - ]; - - var inputs = [ - 'Single block msg', - '000102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f', - 'This is a 48-byte message (exactly 3 AES blocks)', - 'a0a1a2a3a4a5a6a7a8a9aaabacadaeaf' + - 'b0b1b2b3b4b5b6b7b8b9babbbcbdbebf' + - 'c0c1c2c3c4c5c6c7c8c9cacbcccdcecf' + - 'd0d1d2d3d4d5d6d7d8d9dadbdcdddedf' - ]; - - var outputs = [ - 'e353779c1079aeb82708942dbe77181a', - 'd296cd94c2cccf8a3a863028b5e1dc0a7586602d253cfff91b8266bea6d61ab1', - 'd0a02b3836451753d493665d33f0e886' + - '2dea54cdb293abc7506939276772f8d5' + - '021c19216bad525c8579695d83ba2684', - 'c30e32ffedc0774e6aff6af0869f71aa' + - '0f3af07a9a31a9c684db207eb0ef8e4e' + - '35907aa632c3ffdf868bb7b29d3d46ad' + - '83ce9f9a102ee99d49a53e87f4c3da55' - ]; - - for(var i = 0; i < keys.length; ++i) - { - (function(i) - { - var key = forge.util.hexToBytes(keys[i]); - var iv = forge.util.hexToBytes(ivs[i]); - var input = (i & 1) ? forge.util.hexToBytes(inputs[i]) : inputs[i]; - var output = forge.util.hexToBytes(outputs[i]); - - addTest('aes-128 cbc encrypt', function(task, test) - { - // encrypt w/no padding - test.expect.html(outputs[i]); - var cipher = forge.aes.createEncryptionCipher(key); - cipher.start(iv); - cipher.update(forge.util.createBuffer(input)); - cipher.finish(function(){return true;}); - test.result.html(cipher.output.toHex()); - test.check(); - }); - - addTest('aes-128 cbc decrypt', function(task, test) - { - // decrypt w/no padding - test.expect.html(inputs[i]); - var cipher = forge.aes.createDecryptionCipher(key); - cipher.start(iv); - cipher.update(forge.util.createBuffer(output)); - cipher.finish(function(){return true;}); - var out = (i & 1) ? - cipher.output.toHex() : cipher.output.bytes(); - test.result.html(out); - test.check(); - }); - })(i); - } - })(); - - (function() - { - var keys = [ - '00000000000000000000000000000000', - '2b7e151628aed2a6abf7158809cf4f3c', - '2b7e151628aed2a6abf7158809cf4f3c', - '2b7e151628aed2a6abf7158809cf4f3c', - '2b7e151628aed2a6abf7158809cf4f3c', - '00000000000000000000000000000000' - ]; - - var ivs = [ - '80000000000000000000000000000000', - '000102030405060708090a0b0c0d0e0f', - '3B3FD92EB72DAD20333449F8E83CFB4A', - 'C8A64537A0B3A93FCDE3CDAD9F1CE58B', - '26751F67A3CBB140B1808CF187A4F4DF', - '60f9ff04fac1a25657bf5b36b5efaf75' - ]; - - var inputs = [ - '00000000000000000000000000000000', - '6bc1bee22e409f96e93d7e117393172a', - 'ae2d8a571e03ac9c9eb76fac45af8e51', - '30c81c46a35ce411e5fbc1191a0a52ef', - 'f69f2445df4f9b17ad2b417be66c3710', - 'This is a 48-byte message (exactly 3 AES blocks)' - ]; - - var outputs = [ - '3ad78e726c1ec02b7ebfe92b23d9ec34', - '3b3fd92eb72dad20333449f8e83cfb4a', - 'c8a64537a0b3a93fcde3cdad9f1ce58b', - '26751f67a3cbb140b1808cf187a4f4df', - 'c04b05357c5d1c0eeac4c66f9ff7f2e6', - '52396a2ba1ba420c5e5b699a814944d8' + - 'f4e7fbf984a038319fbc0b4ee45cfa6f' + - '07b2564beab5b5e92dbd44cb345f49b4' - ]; - - for(var i = 0; i < keys.length; ++i) - { - (function(i) - { - var key = forge.util.hexToBytes(keys[i]); - var iv = forge.util.hexToBytes(ivs[i]); - var input = (i !== 5) ? - forge.util.hexToBytes(inputs[i]) : inputs[i]; - var output = forge.util.hexToBytes(outputs[i]); - - addTest('aes-128 cfb encrypt', function(task, test) - { - // encrypt - test.expect.html(outputs[i]); - var cipher = forge.aes.createEncryptionCipher(key, 'CFB'); - cipher.start(iv); - cipher.update(forge.util.createBuffer(input)); - cipher.finish(); - test.result.html(cipher.output.toHex()); - test.check(); - }); - - addTest('aes-128 cfb decrypt', function(task, test) - { - // decrypt - test.expect.html(inputs[i]); - var cipher = forge.aes.createDecryptionCipher(key, 'CFB'); - cipher.start(iv); - cipher.update(forge.util.createBuffer(output)); - cipher.finish(); - var out = (i !== 5) ? - cipher.output.toHex() : cipher.output.getBytes(); - test.result.html(out); - test.check(); - }); - })(i); - } - })(); - - (function() - { - var keys = [ - '861009ec4d599fab1f40abc76e6f89880cff5833c79c548c99f9045f191cd90b' - ]; - - var ivs = [ - 'd927ad81199aa7dcadfdb4e47b6dc694' - ]; - - var inputs = [ - 'MY-DATA-AND-HERE-IS-MORE-DATA' - ]; - - var outputs = [ - '80eb666a9fc9e263faf71e87ffc94451d7d8df7cfcf2606470351dd5ac' - ]; - - for(var i = 0; i < keys.length; ++i) - { - (function(i) - { - var key = forge.util.hexToBytes(keys[i]); - var iv = forge.util.hexToBytes(ivs[i]); - var input = inputs[i]; - var output = forge.util.hexToBytes(outputs[i]); - - addTest('aes-256 cfb encrypt', function(task, test) - { - // encrypt - test.expect.html(outputs[i]); - var cipher = forge.aes.createEncryptionCipher(key, 'CFB'); - cipher.start(iv); - cipher.update(forge.util.createBuffer(input)); - cipher.finish(); - test.result.html(cipher.output.toHex()); - test.check(); - }); - - addTest('aes-256 cfb decrypt', function(task, test) - { - // decrypt - test.expect.html(inputs[i]); - var cipher = forge.aes.createDecryptionCipher(key, 'CFB'); - cipher.start(iv); - cipher.update(forge.util.createBuffer(output)); - cipher.finish(); - var out = cipher.output.getBytes(); - test.result.html(out); - test.check(); - }); - })(i); - } - })(); - - (function() - { - var keys = [ - '00000000000000000000000000000000', - '00000000000000000000000000000000' - ]; - - var ivs = [ - '80000000000000000000000000000000', - 'c8ca0d6a35dbeac776e911ee16bea7d3' - ]; - - var inputs = [ - '00000000000000000000000000000000', - 'This is a 48-byte message (exactly 3 AES blocks)' - ]; - - var outputs = [ - '3ad78e726c1ec02b7ebfe92b23d9ec34', - '39c0190727a76b2a90963426f63689cf' + - 'cdb8a2be8e20c5e877a81a724e3611f6' + - '2ecc386f2e941b2441c838906002be19' - ]; - - for(var i = 0; i < keys.length; ++i) - { - (function(i) - { - var key = forge.util.hexToBytes(keys[i]); - var iv = forge.util.hexToBytes(ivs[i]); - var input = (i !== 1) ? - forge.util.hexToBytes(inputs[i]) : inputs[i]; - var output = forge.util.hexToBytes(outputs[i]); - - addTest('aes-128 ofb encrypt', function(task, test) - { - // encrypt w/no padding - test.expect.html(outputs[i]); - var cipher = forge.aes.createEncryptionCipher(key, 'OFB'); - cipher.start(iv); - cipher.update(forge.util.createBuffer(input)); - cipher.finish(function(){return true;}); - test.result.html(cipher.output.toHex()); - test.check(); - }); - - addTest('aes-128 ofb decrypt', function(task, test) - { - // decrypt w/no padding - test.expect.html(inputs[i]); - var cipher = forge.aes.createDecryptionCipher(key, 'OFB'); - cipher.start(iv); - cipher.update(forge.util.createBuffer(output)); - cipher.finish(function(){return true;}); - var out = (i !== 1) ? - cipher.output.toHex() : cipher.output.getBytes(); - test.result.html(out); - test.check(); - }); - })(i); - } - })(); - - (function() - { - var keys = [ - '00000000000000000000000000000000', - '2b7e151628aed2a6abf7158809cf4f3c' - ]; - - var ivs = [ - '650cdb80ff9fc758342d2bd99ee2abcf', - 'f0f1f2f3f4f5f6f7f8f9fafbfcfdfeff' - ]; - - var inputs = [ - 'This is a 48-byte message (exactly 3 AES blocks)', - '6bc1bee22e409f96e93d7e117393172a' - ]; - - var outputs = [ - '5ede11d00e9a76ec1d5e7e811ea3dd1c' + - 'e09ee941210f825d35718d3282796f1c' + - '07c3f1cb424f2b365766ab5229f5b5a4', - '874d6191b620e3261bef6864990db6ce' - ]; - - for(var i = 0; i < keys.length; ++i) - { - (function(i) - { - var key = forge.util.hexToBytes(keys[i]); - var iv = forge.util.hexToBytes(ivs[i]); - var input = (i !== 0) ? - forge.util.hexToBytes(inputs[i]) : inputs[i]; - var output = forge.util.hexToBytes(outputs[i]); - - addTest('aes-128 ctr encrypt', function(task, test) - { - // encrypt w/no padding - test.expect.html(outputs[i]); - var cipher = forge.aes.createEncryptionCipher(key, 'CTR'); - cipher.start(iv); - cipher.update(forge.util.createBuffer(input)); - cipher.finish(function(){return true;}); - test.result.html(cipher.output.toHex()); - test.check(); - }); - - addTest('aes-128 ctr decrypt', function(task, test) - { - // decrypt w/no padding - test.expect.html(inputs[i]); - var cipher = forge.aes.createDecryptionCipher(key, 'CTR'); - cipher.start(iv); - cipher.update(forge.util.createBuffer(output)); - cipher.finish(function(){return true;}); - var out = (i !== 0) ? - cipher.output.toHex() : cipher.output.getBytes(); - test.result.html(out); - test.check(); - }); - })(i); - } - })(); - - addTest('private key encryption', function(task, test) - { - var _privateKey = - '-----BEGIN RSA PRIVATE KEY-----\r\n' + - 'MIICXQIBAAKBgQDL0EugUiNGMWscLAVM0VoMdhDZEJOqdsUMpx9U0YZI7szokJqQ\r\n' + - 'NIwokiQ6EonNnWSMlIvy46AhnlRYn+ezeTeU7eMGTkP3VF29vXBo+dLq5e+8VyAy\r\n' + - 'Q3FzM1wI4ts4hRACF8w6mqygXQ7i/SDu8/rXqRGtvnM+z0MYDdKo80efzwIDAQAB\r\n' + - 'AoGAIzkGONi5G+JifmXlLJdplom486p3upf4Ce2/7mqfaG9MnkyPSairKD/JXvfh\r\n' + - 'NNWkkN8DKKDKBcVVElPgORYT0qwrWc7ueLBMUCbRXb1ZyfEulimG0R3kjUh7NYau\r\n' + - 'DaIkVgfykXGSQMZx8FoaT6L080zd+0emKDDYRrb+/kgJNJECQQDoUZoiC2K/DWNY\r\n' + - 'h3/ppZ0ane2y4SBmJUHJVMPQ2CEgxsrJTxet668ckNCKaOP/3VFPoWC41f17DvKq\r\n' + - 'noYINNntAkEA4JbZBZBVUrQFhHlrpXT4jzqtO2RlKZzEq8qmFZfEErxOT1WMyyCi\r\n' + - 'lAQ5gUKardo1Kf0omC8Xq/uO9ZYdED55KwJBALs6cJ65UFaq4oLJiQPzLd7yokuE\r\n' + - 'dcj8g71PLBTW6jPxIiMFNA89nz3FU9wIVp+xbMNhSoMMKqIPVPC+m0Rn260CQQDA\r\n' + - 'I83fWK/mZWUjBM33a68KumRiH238v8XyQxj7+C8i6D8G2GXvkigFAehAkb7LZZd+\r\n' + - 'KLuGFyPlWv3fVWHf99KpAkBQFKk3MRMl6IGJZUEFQe4l5whm8LkGU4acSqv9B3xt\r\n' + - 'qROkCrsFrMPqjuuzEmyHoQZ64r2PLJg7FOuyhBnQUOt4\r\n' + - '-----END RSA PRIVATE KEY-----'; - var pk = forge.pki.privateKeyFromPem(_privateKey); - var pem1 = forge.pki.privateKeyToPem(pk); - var pem2 = forge.pki.encryptRsaPrivateKey( - pk, 'password', {'encAlg': 'aes128'}); - var privateKey = forge.pki.decryptRsaPrivateKey(pem2, 'password'); - var pem3 = forge.pki.privateKeyToPem(privateKey); - if(pem1 === pem3) - { - test.pass(); - } - else - { - test.fail(); - } - }); - - addTest('random', function(task, test) - { - forge.random.getBytes(16); - forge.random.getBytes(24); - forge.random.getBytes(32); - - var b = forge.random.getBytes(10); - test.result.html(forge.util.bytesToHex(b)); - if(b.length === 10) - { - test.pass(); - } - else - { - test.fail(); - } - }); - - addTest('asn.1 oid => der', function(task, test) - { - test.expect.html('2a864886f70d'); - test.result.html(forge.asn1.oidToDer('1.2.840.113549').toHex()); - test.check(); - }); - - addTest('asn.1 der => oid', function(task, test) - { - var der = '2a864886f70d'; - test.expect.html('1.2.840.113549'); - test.result.html(forge.asn1.derToOid(forge.util.hexToBytes(der))); - test.check(); - }); - - (function() - { - var _privateKey = - '-----BEGIN RSA PRIVATE KEY-----\r\n' + - 'MIICXQIBAAKBgQDL0EugUiNGMWscLAVM0VoMdhDZEJOqdsUMpx9U0YZI7szokJqQ\r\n' + - 'NIwokiQ6EonNnWSMlIvy46AhnlRYn+ezeTeU7eMGTkP3VF29vXBo+dLq5e+8VyAy\r\n' + - 'Q3FzM1wI4ts4hRACF8w6mqygXQ7i/SDu8/rXqRGtvnM+z0MYDdKo80efzwIDAQAB\r\n' + - 'AoGAIzkGONi5G+JifmXlLJdplom486p3upf4Ce2/7mqfaG9MnkyPSairKD/JXvfh\r\n' + - 'NNWkkN8DKKDKBcVVElPgORYT0qwrWc7ueLBMUCbRXb1ZyfEulimG0R3kjUh7NYau\r\n' + - 'DaIkVgfykXGSQMZx8FoaT6L080zd+0emKDDYRrb+/kgJNJECQQDoUZoiC2K/DWNY\r\n' + - 'h3/ppZ0ane2y4SBmJUHJVMPQ2CEgxsrJTxet668ckNCKaOP/3VFPoWC41f17DvKq\r\n' + - 'noYINNntAkEA4JbZBZBVUrQFhHlrpXT4jzqtO2RlKZzEq8qmFZfEErxOT1WMyyCi\r\n' + - 'lAQ5gUKardo1Kf0omC8Xq/uO9ZYdED55KwJBALs6cJ65UFaq4oLJiQPzLd7yokuE\r\n' + - 'dcj8g71PLBTW6jPxIiMFNA89nz3FU9wIVp+xbMNhSoMMKqIPVPC+m0Rn260CQQDA\r\n' + - 'I83fWK/mZWUjBM33a68KumRiH238v8XyQxj7+C8i6D8G2GXvkigFAehAkb7LZZd+\r\n' + - 'KLuGFyPlWv3fVWHf99KpAkBQFKk3MRMl6IGJZUEFQe4l5whm8LkGU4acSqv9B3xt\r\n' + - 'qROkCrsFrMPqjuuzEmyHoQZ64r2PLJg7FOuyhBnQUOt4\r\n' + - '-----END RSA PRIVATE KEY-----\r\n'; - - var _publicKey = - '-----BEGIN PUBLIC KEY-----\r\n' + - 'MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDL0EugUiNGMWscLAVM0VoMdhDZ\r\n' + - 'EJOqdsUMpx9U0YZI7szokJqQNIwokiQ6EonNnWSMlIvy46AhnlRYn+ezeTeU7eMG\r\n' + - 'TkP3VF29vXBo+dLq5e+8VyAyQ3FzM1wI4ts4hRACF8w6mqygXQ7i/SDu8/rXqRGt\r\n' + - 'vnM+z0MYDdKo80efzwIDAQAB\r\n' + - '-----END PUBLIC KEY-----\r\n'; - - var _certificate = - '-----BEGIN CERTIFICATE-----\r\n' + - 'MIIDIjCCAougAwIBAgIJANE2aHSbwpaRMA0GCSqGSIb3DQEBBQUAMGoxCzAJBgNV\r\n' + - 'BAYTAlVTMREwDwYDVQQIEwhWaXJnaW5pYTETMBEGA1UEBxMKQmxhY2tzYnVyZzEN\r\n' + - 'MAsGA1UEChMEVGVzdDENMAsGA1UECxMEVGVzdDEVMBMGA1UEAxMMbXlzZXJ2ZXIu\r\n' + - 'Y29tMB4XDTEwMDYxOTE3MzYyOFoXDTExMDYxOTE3MzYyOFowajELMAkGA1UEBhMC\r\n' + - 'VVMxETAPBgNVBAgTCFZpcmdpbmlhMRMwEQYDVQQHEwpCbGFja3NidXJnMQ0wCwYD\r\n' + - 'VQQKEwRUZXN0MQ0wCwYDVQQLEwRUZXN0MRUwEwYDVQQDEwxteXNlcnZlci5jb20w\r\n' + - 'gZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBAMvQS6BSI0YxaxwsBUzRWgx2ENkQ\r\n' + - 'k6p2xQynH1TRhkjuzOiQmpA0jCiSJDoSic2dZIyUi/LjoCGeVFif57N5N5Tt4wZO\r\n' + - 'Q/dUXb29cGj50url77xXIDJDcXMzXAji2ziFEAIXzDqarKBdDuL9IO7z+tepEa2+\r\n' + - 'cz7PQxgN0qjzR5/PAgMBAAGjgc8wgcwwHQYDVR0OBBYEFPV1Y+DHXW6bA/r9sv1y\r\n' + - 'NJ8jAwMAMIGcBgNVHSMEgZQwgZGAFPV1Y+DHXW6bA/r9sv1yNJ8jAwMAoW6kbDBq\r\n' + - 'MQswCQYDVQQGEwJVUzERMA8GA1UECBMIVmlyZ2luaWExEzARBgNVBAcTCkJsYWNr\r\n' + - 'c2J1cmcxDTALBgNVBAoTBFRlc3QxDTALBgNVBAsTBFRlc3QxFTATBgNVBAMTDG15\r\n' + - 'c2VydmVyLmNvbYIJANE2aHSbwpaRMAwGA1UdEwQFMAMBAf8wDQYJKoZIhvcNAQEF\r\n' + - 'BQADgYEARdH2KOlJWTC1CS2y/PAvg4uiM31PXMC1hqSdJlnLM1MY4hRfuf9VyTeX\r\n' + - 'Y6FdybcyDLSxKn9id+g9229ci9/s9PI+QmD5vXd8yZyScLc2JkYB4GC6+9D1+/+x\r\n' + - 's2hzMxuK6kzZlP+0l9LGcraMQPGRydjCARZZm4Uegln9rh85XFQ=\r\n' + - '-----END CERTIFICATE-----\r\n'; - - var _signature = - '9200ece65cdaed36bcc20b94c65af852e4f88f0b4fe5b249d54665f815992ac4' + - '3a1399e65d938c6a7f16dd39d971a53ca66523209dbbfbcb67afa579dbb0c220' + - '672813d9e6f4818f29b9becbb29da2032c5e422da97e0c39bfb7a2e7d568615a' + - '5073af0337ff215a8e1b2332d668691f4fb731440055420c24ac451dd3c913f4'; - - addTest('private key from pem/to pem', function(task, test) - { - try - { - // convert from pem - var key = forge.pki.privateKeyFromPem(_privateKey); - //forge.log.debug(cat, 'privateKey', key); - - // convert back to pem - var pem = forge.pki.privateKeyToPem(key); - test.expect.html(_privateKey); - test.result.html(pem); - test.check(); - } - catch(ex) - { - forge.log.error('test', ex); - test.fail(); - } - }); - - addTest('public key from pem/to pem', function(task, test) - { - try - { - // convert from pem - var key = forge.pki.publicKeyFromPem(_publicKey); - //forge.log.debug(cat, 'publicKey', key); - - // convert back to pem - var pem = forge.pki.publicKeyToPem(key); - test.expect.html(_publicKey); - test.result.html(pem); - test.check(); - } - catch(ex) - { - forge.log.error('test', ex); - test.fail(); - } - }); - - addTest('certificate key from pem/to pem', function(task, test) - { - try - { - var cert = forge.pki.certificateFromPem(_certificate); - /* - forge.log.debug(cat, 'cert', cert); - forge.log.debug(cat, 'CN', cert.subject.getField('CN').value); - forge.log.debug(cat, 'C', - cert.subject.getField({shortName: 'C'}).value); - forge.log.debug(cat, 'stateOrProvinceName', - cert.subject.getField({name: 'stateOrProvinceName'}).value); - forge.log.debug(cat, '2.5.4.7', - cert.subject.getField({type: '2.5.4.7'}).value); - */ - // convert back to pem - var pem = forge.pki.certificateToPem(cert); - test.expect.html(_certificate); - test.result.html(pem); - test.check(); - } - catch(ex) - { - forge.log.error('test', ex); - test.fail(); - } - }); - - addTest('verify signature', function(task, test) - { - try - { - var key = forge.pki.publicKeyFromPem(_publicKey); - var md = forge.md.sha1.create(); - md.update('0123456789abcdef'); - var signature = forge.util.hexToBytes(_signature); - var success = key.verify(md.digest().getBytes(), signature); - if(success) - { - test.pass(); - } - else - { - test.fail(); - } - } - catch(ex) - { - forge.log.error('test', ex); - test.fail(); - } - }); - - addTest('sign and verify', function(task, test) - { - try - { - var privateKey = forge.pki.privateKeyFromPem(_privateKey); - var publicKey = forge.pki.publicKeyFromPem(_publicKey); - - // do sign - var md = forge.md.sha1.create(); - md.update('0123456789abcdef'); - var st = +new Date(); - var signature = privateKey.sign(md); - var et = +new Date(); - //forge.log.debug(cat, 'sign time', (et - st) + 'ms'); - - // do verify - st = +new Date(); - var success = publicKey.verify(md.digest().getBytes(), signature); - et = +new Date(); - //forge.log.debug(cat, 'verify time', (et - st) + 'ms'); - if(success) - { - test.pass(); - } - else - { - test.fail(); - } - } - catch(ex) - { - forge.log.error('test', ex); - test.fail(); - } - }); - - addTest('certificate verify', function(task, test) - { - try - { - var cert = forge.pki.certificateFromPem(_certificate, true); - //forge.log.debug(cat, 'cert', cert); - var success = cert.verify(cert); - if(success) - { - test.pass(); - } - else - { - test.fail(); - } - } - catch(ex) - { - forge.log.error('test', ex); - test.fail(); - } - }); - })(); - - addTest('TLS prf', function(task, test) - { - // Note: This test vector is originally from: - // http://www.imc.org/ietf-tls/mail-archive/msg01589.html - // But that link is now dead. - var secret = forge.util.createBuffer(); - for(var i = 0; i < 48; ++i) - { - secret.putByte(0xAB); - } - secret = secret.getBytes(); - var seed = forge.util.createBuffer(); - for(var i = 0; i < 64; ++i) - { - seed.putByte(0xCD); - } - seed = seed.getBytes(); - - var bytes = forge.tls.prf_tls1(secret, 'PRF Testvector', seed, 104); - var expect = - 'd3d4d1e349b5d515044666d51de32bab258cb521' + - 'b6b053463e354832fd976754443bcf9a296519bc' + - '289abcbc1187e4ebd31e602353776c408aafb74c' + - 'bc85eff69255f9788faa184cbb957a9819d84a5d' + - '7eb006eb459d3ae8de9810454b8b2d8f1afbc655' + - 'a8c9a013'; - test.expect.html(expect); - test.result.html(bytes.toHex()); - test.check(); - }); - - // function to create certificate - var createCert = function(keys, cn, data) - { - var cert = forge.pki.createCertificate(); - cert.serialNumber = '01'; - cert.validity.notBefore = new Date(); - cert.validity.notAfter = new Date(); - cert.validity.notAfter.setFullYear( - cert.validity.notBefore.getFullYear() + 1); - var attrs = [{ - name: 'commonName', - value: cn - }, { - name: 'countryName', - value: 'US' - }, { - shortName: 'ST', - value: 'Virginia' - }, { - name: 'localityName', - value: 'Blacksburg' - }, { - name: 'organizationName', - value: 'Test' - }, { - shortName: 'OU', - value: 'Test' - }]; - cert.setSubject(attrs); - cert.setIssuer(attrs); - cert.setExtensions([{ - name: 'basicConstraints', - cA: true - }, { - name: 'keyUsage', - keyCertSign: true, - digitalSignature: true, - nonRepudiation: true, - keyEncipherment: true, - dataEncipherment: true - }, { - name: 'subjectAltName', - altNames: [{ - type: 6, // URI - value: 'http://myuri.com/webid#me' - }] - }]); - // FIXME: add subjectKeyIdentifier extension - // FIXME: add authorityKeyIdentifier extension - cert.publicKey = keys.publicKey; - - // self-sign certificate - cert.sign(keys.privateKey); - - // save data - data[cn] = { - cert: forge.pki.certificateToPem(cert), - privateKey: forge.pki.privateKeyToPem(keys.privateKey) - }; - }; - - var generateCert = function(task, test, cn, data) - { - task.block(); - - // create key-generation state and function to step algorithm - test.result.html( - 'Generating 512-bit key-pair and certificate for \"' + cn + '\".'); - var state = forge.pki.rsa.createKeyPairGenerationState(512); - var kgTime = +new Date(); - var step = function() - { - // step key-generation - if(!forge.pki.rsa.stepKeyPairGenerationState(state, 1000)) - { - test.result.html(test.result.html() + '.'); - setTimeout(step, 1); - } - // key-generation complete - else - { - kgTime = +new Date() - kgTime; - forge.log.debug(cat, 'Total key-gen time', kgTime + 'ms'); - try - { - createCert(state.keys, cn, data); - test.result.html( - test.result.html() + 'done. Time=' + kgTime + 'ms. '); - task.unblock(); - } - catch(ex) - { - forge.log.error(cat, ex, ex.message ? ex.message : ''); - test.result.html(ex.message); - test.fail(); - task.fail(); - } - } - }; - - // run key-gen algorithm - setTimeout(step, 0); - }; - - var clientSessionCache1 = forge.tls.createSessionCache(); - var serverSessionCache1 = forge.tls.createSessionCache(); - addTest('TLS connection, w/o client-certificate', function(task, test) - { - var data = {}; - - task.next('generate server certifcate', function(task) - { - generateCert(task, test, 'server', data); - }); - - task.next('starttls', function(task) - { - test.result.html(test.result.html() + 'Starting TLS...'); - - var end = - { - client: null, - server: null - }; - var success = false; - - // create client - end.client = forge.tls.createConnection( - { - server: false, - caStore: [data.server.cert], - sessionCache: clientSessionCache1, - // optional cipher suites in order of preference - cipherSuites: [ - forge.tls.CipherSuites.TLS_RSA_WITH_AES_128_CBC_SHA, - forge.tls.CipherSuites.TLS_RSA_WITH_AES_256_CBC_SHA], - virtualHost: 'server', - verify: function(c, verified, depth, certs) - { - test.result.html(test.result.html() + - 'Client verifying certificate w/CN: \"' + - certs[0].subject.getField('CN').value + - '\", verified: ' + verified + '...'); - if(verified !== true) - { - test.fail(); - task.fail(); - } - return verified; - }, - connected: function(c) - { - test.result.html(test.result.html() + 'Client connected...'); - - // send message to server - setTimeout(function() - { - c.prepare('Hello Server'); - }, 1); - }, - tlsDataReady: function(c) - { - // send TLS data to server - end.server.process(c.tlsData.getBytes()); - }, - dataReady: function(c) - { - var response = c.data.getBytes(); - test.result.html(test.result.html() + - 'Client received \"' + response + '\"'); - success = (response === 'Hello Client'); - c.close(); - }, - closed: function(c) - { - test.result.html(test.result.html() + 'Client disconnected.'); - test.result.html(success ? 'Success' : 'Failure'); - if(success) - { - test.expect.html('Success'); - task.unblock(); - test.pass(); - } - else - { - console.log('closed fail'); - test.fail(); - task.fail(); - } - }, - error: function(c, error) - { - test.result.html(test.result.html() + 'Error: ' + error.message); - test.fail(); - task.fail(); - } - }); - - // create server - end.server = forge.tls.createConnection( - { - server: true, - sessionCache: serverSessionCache1, - // optional cipher suites in order of preference - cipherSuites: [ - forge.tls.CipherSuites.TLS_RSA_WITH_AES_128_CBC_SHA, - forge.tls.CipherSuites.TLS_RSA_WITH_AES_256_CBC_SHA], - connected: function(c) - { - test.result.html(test.result.html() + 'Server connected...'); - }, - getCertificate: function(c, hint) - { - test.result.html(test.result.html() + - 'Server getting certificate for \"' + hint[0] + '\"...'); - return data.server.cert; - }, - getPrivateKey: function(c, cert) - { - return data.server.privateKey; - }, - tlsDataReady: function(c) - { - // send TLS data to client - end.client.process(c.tlsData.getBytes()); - }, - dataReady: function(c) - { - test.result.html(test.result.html() + - 'Server received \"' + c.data.getBytes() + '\"'); - - // send response - c.prepare('Hello Client'); - c.close(); - }, - closed: function(c) - { - test.result.html(test.result.html() + 'Server disconnected.'); - }, - error: function(c, error) - { - test.result.html(test.result.html() + 'Error: ' + error.message); - test.fail(); - task.fail(); - } - }); - - // start handshake - task.block(); - end.client.handshake(); - }); - }); - - var clientSessionCache2 = forge.tls.createSessionCache(); - var serverSessionCache2 = forge.tls.createSessionCache(); - addTest('TLS connection, w/optional client-certificate', function(task, test) - { - var data = {}; - - task.next('generate server certifcate', function(task) - { - generateCert(task, test, 'server', data); - }); - - // client-cert generated but not sent in this test - task.next('generate client certifcate', function(task) - { - generateCert(task, test, 'client', data); - }); - - task.next('starttls', function(task) - { - test.result.html(test.result.html() + 'Starting TLS...'); - - var end = - { - client: null, - server: null - }; - var success = false; - - // create client - end.client = forge.tls.createConnection( - { - server: false, - caStore: [data.server.cert], - sessionCache: clientSessionCache2, - // supported cipher suites in order of preference - cipherSuites: [ - forge.tls.CipherSuites.TLS_RSA_WITH_AES_128_CBC_SHA, - forge.tls.CipherSuites.TLS_RSA_WITH_AES_256_CBC_SHA], - virtualHost: 'server', - verify: function(c, verified, depth, certs) - { - test.result.html(test.result.html() + - 'Client verifying certificate w/CN: \"' + - certs[0].subject.getField('CN').value + - '\", verified: ' + verified + '...'); - if(verified !== true) - { - test.fail(); - task.fail(); - } - return verified; - }, - connected: function(c) - { - test.result.html(test.result.html() + 'Client connected...'); - - // send message to server - setTimeout(function() - { - c.prepare('Hello Server'); - }, 1); - }, - tlsDataReady: function(c) - { - // send TLS data to server - end.server.process(c.tlsData.getBytes()); - }, - dataReady: function(c) - { - var response = c.data.getBytes(); - test.result.html(test.result.html() + - 'Client received \"' + response + '\"'); - success = (response === 'Hello Client'); - c.close(); - }, - closed: function(c) - { - test.result.html(test.result.html() + 'Client disconnected.'); - test.result.html(success ? 'Success' : 'Failure'); - if(success) - { - test.expect.html('Success'); - task.unblock(); - test.pass(); - } - else - { - console.log('closed fail'); - test.fail(); - task.fail(); - } - }, - error: function(c, error) - { - test.result.html(test.result.html() + 'Error: ' + error.message); - test.fail(); - task.fail(); - } - }); - - // create server - end.server = forge.tls.createConnection( - { - server: true, - caStore: [data.client.cert], - sessionCache: serverSessionCache2, - // supported cipher suites in order of preference - cipherSuites: [ - forge.tls.CipherSuites.TLS_RSA_WITH_AES_128_CBC_SHA, - forge.tls.CipherSuites.TLS_RSA_WITH_AES_256_CBC_SHA], - connected: function(c) - { - test.result.html(test.result.html() + 'Server connected...'); - }, - verifyClient: 'optional', - verify: function(c, verified, depth, certs) - { - test.result.html(test.result.html() + - 'Server verifying certificate w/CN: \"' + - certs[0].subject.getField('CN').value + - '\", verified: ' + verified + '...'); - if(verified !== true) - { - test.fail(); - task.fail(); - } - return verified; - }, - getCertificate: function(c, hint) - { - test.result.html(test.result.html() + - 'Server getting certificate for \"' + hint[0] + '\"...'); - return data.server.cert; - }, - getPrivateKey: function(c, cert) - { - return data.server.privateKey; - }, - tlsDataReady: function(c) - { - // send TLS data to client - end.client.process(c.tlsData.getBytes()); - }, - dataReady: function(c) - { - test.result.html(test.result.html() + - 'Server received \"' + c.data.getBytes() + '\"'); - - // send response - c.prepare('Hello Client'); - c.close(); - }, - closed: function(c) - { - test.result.html(test.result.html() + 'Server disconnected.'); - }, - error: function(c, error) - { - test.result.html(test.result.html() + 'Error: ' + error.message); - test.fail(); - task.fail(); - } - }); - - // start handshake - task.block(); - end.client.handshake(); - }); - }); - - var clientSessionCache3 = forge.tls.createSessionCache(); - var serverSessionCache3 = forge.tls.createSessionCache(); - addTest('TLS connection, w/client-certificate', function(task, test) - { - var data = {}; - - task.next('generate server certifcate', function(task) - { - generateCert(task, test, 'server', data); - }); - - task.next('generate client certifcate', function(task) - { - generateCert(task, test, 'client', data); - }); - - task.next('starttls', function(task) - { - test.result.html(test.result.html() + 'Starting TLS...'); - - var end = - { - client: null, - server: null - }; - var success = false; - - // create client - end.client = forge.tls.createConnection( - { - server: false, - caStore: [data.server.cert], - sessionCache: clientSessionCache3, - // supported cipher suites in order of preference - cipherSuites: [ - forge.tls.CipherSuites.TLS_RSA_WITH_AES_128_CBC_SHA, - forge.tls.CipherSuites.TLS_RSA_WITH_AES_256_CBC_SHA], - virtualHost: 'server', - verify: function(c, verified, depth, certs) - { - test.result.html(test.result.html() + - 'Client verifying certificate w/CN: \"' + - certs[0].subject.getField('CN').value + - '\", verified: ' + verified + '...'); - if(verified !== true) - { - test.fail(); - task.fail(); - } - return verified; - }, - connected: function(c) - { - test.result.html(test.result.html() + 'Client connected...'); - - // send message to server - setTimeout(function() - { - c.prepare('Hello Server'); - }, 1); - }, - getCertificate: function(c, hint) - { - test.result.html(test.result.html() + - 'Client getting certificate ...'); - return data.client.cert; - }, - getPrivateKey: function(c, cert) - { - return data.client.privateKey; - }, - tlsDataReady: function(c) - { - // send TLS data to server - end.server.process(c.tlsData.getBytes()); - }, - dataReady: function(c) - { - var response = c.data.getBytes(); - test.result.html(test.result.html() + - 'Client received \"' + response + '\"'); - success = (response === 'Hello Client'); - c.close(); - }, - closed: function(c) - { - test.result.html(test.result.html() + 'Client disconnected.'); - test.result.html(success ? 'Success' : 'Failure'); - if(success) - { - test.expect.html('Success'); - task.unblock(); - test.pass(); - } - else - { - console.log('closed fail'); - test.fail(); - task.fail(); - } - }, - error: function(c, error) - { - test.result.html(test.result.html() + 'Error: ' + error.message); - test.fail(); - task.fail(); - } - }); - - // create server - end.server = forge.tls.createConnection( - { - server: true, - caStore: [data.client.cert], - sessionCache: serverSessionCache3, - // supported cipher suites in order of preference - cipherSuites: [ - forge.tls.CipherSuites.TLS_RSA_WITH_AES_128_CBC_SHA, - forge.tls.CipherSuites.TLS_RSA_WITH_AES_256_CBC_SHA], - connected: function(c) - { - test.result.html(test.result.html() + 'Server connected...'); - }, - verifyClient: true, // use 'optional' to request but not require - verify: function(c, verified, depth, certs) - { - test.result.html(test.result.html() + - 'Server verifying certificate w/CN: \"' + - certs[0].subject.getField('CN').value + - '\", verified: ' + verified + '...'); - if(verified !== true) - { - test.fail(); - task.fail(); - } - return verified; - }, - getCertificate: function(c, hint) - { - test.result.html(test.result.html() + - 'Server getting certificate for \"' + hint[0] + '\"...'); - return data.server.cert; - }, - getPrivateKey: function(c, cert) - { - return data.server.privateKey; - }, - tlsDataReady: function(c) - { - // send TLS data to client - end.client.process(c.tlsData.getBytes()); - }, - dataReady: function(c) - { - test.result.html(test.result.html() + - 'Server received \"' + c.data.getBytes() + '\"'); - - // send response - c.prepare('Hello Client'); - c.close(); - }, - closed: function(c) - { - test.result.html(test.result.html() + 'Server disconnected.'); - }, - error: function(c, error) - { - test.result.html(test.result.html() + 'Error: ' + error.message); - test.fail(); - task.fail(); - } - }); - - // start handshake - task.block(); - end.client.handshake(); - }); - }); - - init(); -}); diff --git a/node_modules/node-forge/tests/favicon.ico b/node_modules/node-forge/tests/favicon.ico deleted file mode 100644 index e69de29b..00000000 diff --git a/node_modules/node-forge/tests/flash/Test.as b/node_modules/node-forge/tests/flash/Test.as deleted file mode 100644 index 7c03727b..00000000 --- a/node_modules/node-forge/tests/flash/Test.as +++ /dev/null @@ -1,96 +0,0 @@ -/* - * Copyright (c) 2010 Digital Bazaar, Inc. All rights reserved. - * - * @author Dave Longley - */ -package -{ - import flash.display.Sprite; - - public class Test extends Sprite - { - import flash.events.*; - import flash.net.*; - - import flash.external.ExternalInterface; - import flash.system.Security; - - public function Test() - { - try - { - // FIXME: replace 'localhost' with cross-domain host to hit - var xhost:String = "localhost"; - Security.loadPolicyFile("xmlsocket://" + xhost + ":80"); - - var loader:URLLoader = new URLLoader(); - loader.addEventListener( - Event.COMPLETE, completeHandler); - loader.addEventListener( - Event.OPEN, openHandler); - loader.addEventListener( - ProgressEvent.PROGRESS, progressHandler); - loader.addEventListener( - SecurityErrorEvent.SECURITY_ERROR, securityErrorHandler); - loader.addEventListener( - HTTPStatusEvent.HTTP_STATUS, httpStatusHandler); - loader.addEventListener( - IOErrorEvent.IO_ERROR, ioErrorHandler); - - var request:URLRequest = new URLRequest( - "http://" + xhost + "/index.html"); - loader.load(request); - } - catch(e:Error) - { - log("error=" + e.errorID + "," + e.name + "," + e.message); - throw e; - } - } - - private function log(obj:Object):void - { - if(obj is String) - { - var str:String = obj as String; - ExternalInterface.call("console.log", "Test", str); - } - else if(obj is Error) - { - var e:Error = obj as Error; - log("error=" + e.errorID + "," + e.name + "," + e.message); - } - } - - private function completeHandler(event:Event):void - { - var loader:URLLoader = URLLoader(event.target); - log("complete: " + loader.data); - } - - private function openHandler(event:Event):void - { - log("open: " + event); - } - - private function progressHandler(event:ProgressEvent):void - { - log("progress:" + event.bytesLoaded + " total: " + event.bytesTotal); - } - - private function securityErrorHandler(event:SecurityErrorEvent):void - { - log("securityError: " + event); - } - - private function httpStatusHandler(event:HTTPStatusEvent):void - { - log("httpStatus: " + event); - } - - private function ioErrorHandler(event:IOErrorEvent):void - { - log("ioError: " + event); - } - } -} diff --git a/node_modules/node-forge/tests/flash/build-flash.xml b/node_modules/node-forge/tests/flash/build-flash.xml deleted file mode 100644 index f037c580..00000000 --- a/node_modules/node-forge/tests/flash/build-flash.xml +++ /dev/null @@ -1,7 +0,0 @@ - - - - . - - - diff --git a/node_modules/node-forge/tests/flash/index.html b/node_modules/node-forge/tests/flash/index.html deleted file mode 100644 index 26a10b80..00000000 --- a/node_modules/node-forge/tests/flash/index.html +++ /dev/null @@ -1,27 +0,0 @@ - - - - - - - - -
        -

        Flash Cross-Domain URLLoader Test

        -
        - -
        - -
        -

        Could not load the flash test.

        -
        - -
        - - diff --git a/node_modules/node-forge/tests/forge_ssl/forge/__init__.py b/node_modules/node-forge/tests/forge_ssl/forge/__init__.py deleted file mode 100644 index e69de29b..00000000 diff --git a/node_modules/node-forge/tests/forge_ssl/forge/_ssl.c b/node_modules/node-forge/tests/forge_ssl/forge/_ssl.c deleted file mode 100644 index bdef8c9f..00000000 --- a/node_modules/node-forge/tests/forge_ssl/forge/_ssl.c +++ /dev/null @@ -1,1770 +0,0 @@ -/* SSL socket module - - SSL support based on patches by Brian E Gallew and Laszlo Kovacs. - Re-worked a bit by Bill Janssen to add server-side support and - certificate decoding. Chris Stawarz contributed some non-blocking - patches. - - This module is imported by ssl.py. It should *not* be used - directly. - - XXX should partial writes be enabled, SSL_MODE_ENABLE_PARTIAL_WRITE? - - XXX integrate several "shutdown modes" as suggested in - http://bugs.python.org/issue8108#msg102867 ? -*/ - -#include "Python.h" - -#ifdef WITH_THREAD -#include "pythread.h" -#define PySSL_BEGIN_ALLOW_THREADS { \ - PyThreadState *_save = NULL; \ - if (_ssl_locks_count>0) {_save = PyEval_SaveThread();} -#define PySSL_BLOCK_THREADS if (_ssl_locks_count>0){PyEval_RestoreThread(_save)}; -#define PySSL_UNBLOCK_THREADS if (_ssl_locks_count>0){_save = PyEval_SaveThread()}; -#define PySSL_END_ALLOW_THREADS if (_ssl_locks_count>0){PyEval_RestoreThread(_save);} \ - } - -#else /* no WITH_THREAD */ - -#define PySSL_BEGIN_ALLOW_THREADS -#define PySSL_BLOCK_THREADS -#define PySSL_UNBLOCK_THREADS -#define PySSL_END_ALLOW_THREADS - -#endif - -enum py_ssl_error { - /* these mirror ssl.h */ - PY_SSL_ERROR_NONE, - PY_SSL_ERROR_SSL, - PY_SSL_ERROR_WANT_READ, - PY_SSL_ERROR_WANT_WRITE, - PY_SSL_ERROR_WANT_X509_LOOKUP, - PY_SSL_ERROR_SYSCALL, /* look at error stack/return value/errno */ - PY_SSL_ERROR_ZERO_RETURN, - PY_SSL_ERROR_WANT_CONNECT, - /* start of non ssl.h errorcodes */ - PY_SSL_ERROR_EOF, /* special case of SSL_ERROR_SYSCALL */ - PY_SSL_ERROR_INVALID_ERROR_CODE -}; - -enum py_ssl_server_or_client { - PY_SSL_CLIENT, - PY_SSL_SERVER -}; - -enum py_ssl_cert_requirements { - PY_SSL_CERT_NONE, - PY_SSL_CERT_OPTIONAL, - PY_SSL_CERT_REQUIRED -}; - -enum py_ssl_version { - PY_SSL_VERSION_SSL2, - PY_SSL_VERSION_SSL3, - PY_SSL_VERSION_SSL23, - PY_SSL_VERSION_TLS1 -}; - -enum py_ssl_sess_cache_mode { - PY_SSL_SESS_CACHE_OFF, - PY_SSL_SESS_CACHE_CLIENT, - PY_SSL_SESS_CACHE_SERVER, - PY_SSL_SESS_CACHE_BOTH -}; - -/* Include symbols from _socket module */ -#include "socketmodule.h" - -#if defined(HAVE_POLL_H) -#include -#elif defined(HAVE_SYS_POLL_H) -#include -#endif - -/* Include OpenSSL header files */ -#include "openssl/rsa.h" -#include "openssl/crypto.h" -#include "openssl/x509.h" -#include "openssl/x509v3.h" -#include "openssl/pem.h" -#include "openssl/ssl.h" -#include "openssl/err.h" -#include "openssl/rand.h" - -/* SSL error object */ -static PyObject *PySSLErrorObject; - -#ifdef WITH_THREAD - -/* serves as a flag to see whether we've initialized the SSL thread support. */ -/* 0 means no, greater than 0 means yes */ - -static unsigned int _ssl_locks_count = 0; - -#endif /* def WITH_THREAD */ - -/* SSL socket object */ - -#define X509_NAME_MAXLEN 256 - -/* RAND_* APIs got added to OpenSSL in 0.9.5 */ -#if OPENSSL_VERSION_NUMBER >= 0x0090500fL -# define HAVE_OPENSSL_RAND 1 -#else -# undef HAVE_OPENSSL_RAND -#endif - -typedef struct { - PyObject_HEAD - PySocketSockObject *Socket; /* Socket on which we're layered */ - int inherited; - SSL_CTX* ctx; - SSL* ssl; - X509* peer_cert; - char server[X509_NAME_MAXLEN]; - char issuer[X509_NAME_MAXLEN]; - int shutdown_seen_zero; - -} PySSLObject; - -static PyTypeObject PySSL_Type; -static PyObject *PySSL_SSLwrite(PySSLObject *self, PyObject *args); -static PyObject *PySSL_SSLread(PySSLObject *self, PyObject *args); -static int check_socket_and_wait_for_timeout(PySocketSockObject *s, - int writing); -static PyObject *PySSL_peercert(PySSLObject *self, PyObject *args); -static PyObject *PySSL_cipher(PySSLObject *self); - -#define PySSLObject_Check(v) (Py_TYPE(v) == &PySSL_Type) - -typedef enum { - SOCKET_IS_NONBLOCKING, - SOCKET_IS_BLOCKING, - SOCKET_HAS_TIMED_OUT, - SOCKET_HAS_BEEN_CLOSED, - SOCKET_TOO_LARGE_FOR_SELECT, - SOCKET_OPERATION_OK -} timeout_state; - -/* Wrap error strings with filename and line # */ -#define STRINGIFY1(x) #x -#define STRINGIFY2(x) STRINGIFY1(x) -#define ERRSTR1(x,y,z) (x ":" y ": " z) -#define ERRSTR(x) ERRSTR1("_ssl.c", STRINGIFY2(__LINE__), x) - -/* XXX It might be helpful to augment the error message generated - below with the name of the SSL function that generated the error. - I expect it's obvious most of the time. -*/ - -static PyObject * -PySSL_SetError(PySSLObject *obj, int ret, char *filename, int lineno) -{ - PyObject *v; - char buf[2048]; - char *errstr; - int err; - enum py_ssl_error p = PY_SSL_ERROR_NONE; - - assert(ret <= 0); - - if (obj->ssl != NULL) { - err = SSL_get_error(obj->ssl, ret); - - switch (err) { - case SSL_ERROR_ZERO_RETURN: - errstr = "TLS/SSL connection has been closed"; - p = PY_SSL_ERROR_ZERO_RETURN; - break; - case SSL_ERROR_WANT_READ: - errstr = "The operation did not complete (read)"; - p = PY_SSL_ERROR_WANT_READ; - break; - case SSL_ERROR_WANT_WRITE: - p = PY_SSL_ERROR_WANT_WRITE; - errstr = "The operation did not complete (write)"; - break; - case SSL_ERROR_WANT_X509_LOOKUP: - p = PY_SSL_ERROR_WANT_X509_LOOKUP; - errstr = "The operation did not complete (X509 lookup)"; - break; - case SSL_ERROR_WANT_CONNECT: - p = PY_SSL_ERROR_WANT_CONNECT; - errstr = "The operation did not complete (connect)"; - break; - case SSL_ERROR_SYSCALL: - { - unsigned long e = ERR_get_error(); - if (e == 0) { - if (ret == 0 || !obj->Socket) { - p = PY_SSL_ERROR_EOF; - errstr = "EOF occurred in violation of protocol"; - } else if (ret == -1) { - /* underlying BIO reported an I/O error */ - ERR_clear_error(); - return obj->Socket->errorhandler(); - } else { /* possible? */ - p = PY_SSL_ERROR_SYSCALL; - errstr = "Some I/O error occurred"; - } - } else { - p = PY_SSL_ERROR_SYSCALL; - /* XXX Protected by global interpreter lock */ - errstr = ERR_error_string(e, NULL); - } - break; - } - case SSL_ERROR_SSL: - { - unsigned long e = ERR_get_error(); - p = PY_SSL_ERROR_SSL; - if (e != 0) - /* XXX Protected by global interpreter lock */ - errstr = ERR_error_string(e, NULL); - else { /* possible? */ - errstr = "A failure in the SSL library occurred"; - } - break; - } - default: - p = PY_SSL_ERROR_INVALID_ERROR_CODE; - errstr = "Invalid error code"; - } - } else { - errstr = ERR_error_string(ERR_peek_last_error(), NULL); - } - PyOS_snprintf(buf, sizeof(buf), "_ssl.c:%d: %s", lineno, errstr); - ERR_clear_error(); - v = Py_BuildValue("(is)", p, buf); - if (v != NULL) { - PyErr_SetObject(PySSLErrorObject, v); - Py_DECREF(v); - } - return NULL; -} - -static PyObject * -_setSSLError (char *errstr, int errcode, char *filename, int lineno) { - - char buf[2048]; - PyObject *v; - - if (errstr == NULL) { - errcode = ERR_peek_last_error(); - errstr = ERR_error_string(errcode, NULL); - } - PyOS_snprintf(buf, sizeof(buf), "_ssl.c:%d: %s", lineno, errstr); - ERR_clear_error(); - v = Py_BuildValue("(is)", errcode, buf); - if (v != NULL) { - PyErr_SetObject(PySSLErrorObject, v); - Py_DECREF(v); - } - return NULL; -} - -static PySSLObject * -newPySSLObject(PySSLObject *ssl_object, PySocketSockObject *Sock, - char *key_file, char *cert_file, - enum py_ssl_server_or_client socket_type, - enum py_ssl_cert_requirements certreq, - enum py_ssl_version proto_version, - enum py_ssl_sess_cache_mode cache_mode, - char *sess_id_ctx, - char *cacerts_file) -{ - PySSLObject *self; - char *errstr = NULL; - int ret; - int verification_mode; - int sess_cache_mode; - - self = PyObject_New(PySSLObject, &PySSL_Type); /* Create new object */ - if (self == NULL) - return NULL; - memset(self->server, '\0', sizeof(char) * X509_NAME_MAXLEN); - memset(self->issuer, '\0', sizeof(char) * X509_NAME_MAXLEN); - self->peer_cert = NULL; - self->inherited = 0; - self->ssl = NULL; - self->ctx = NULL; - self->Socket = NULL; - - /* Make sure the SSL error state is initialized */ - (void) ERR_get_state(); - ERR_clear_error(); - - if ((key_file && !cert_file) || (!key_file && cert_file)) { - errstr = ERRSTR("Both the key & certificate files " - "must be specified"); - goto fail; - } - - if ((socket_type == PY_SSL_SERVER) && (ssl_object == NULL) && - ((key_file == NULL) || (cert_file == NULL))) { - errstr = ERRSTR("Both the key & certificate files " - "must be specified for server-side operation"); - goto fail; - } - - if (ssl_object != NULL) { - self->inherited = 1; - self->ctx = ssl_object->ctx; - } else { - self->inherited = 0; - - PySSL_BEGIN_ALLOW_THREADS - if (proto_version == PY_SSL_VERSION_TLS1) - self->ctx = SSL_CTX_new(TLSv1_method()); /* Set up context */ - else if (proto_version == PY_SSL_VERSION_SSL3) - self->ctx = SSL_CTX_new(SSLv3_method()); /* Set up context */ - else if (proto_version == PY_SSL_VERSION_SSL2) - self->ctx = SSL_CTX_new(SSLv2_method()); /* Set up context */ - else if (proto_version == PY_SSL_VERSION_SSL23) - self->ctx = SSL_CTX_new(SSLv23_method()); /* Set up context */ - PySSL_END_ALLOW_THREADS - } - - if (self->ctx == NULL) { - errstr = ERRSTR("Invalid SSL protocol variant specified."); - goto fail; - } - - if (self->inherited == 0 && certreq != PY_SSL_CERT_NONE) { - if (cacerts_file == NULL) { - errstr = ERRSTR("No root certificates specified for " - "verification of other-side certificates."); - goto fail; - } else { - PySSL_BEGIN_ALLOW_THREADS - ret = SSL_CTX_load_verify_locations(self->ctx, - cacerts_file, - NULL); - PySSL_END_ALLOW_THREADS - if (ret != 1) { - _setSSLError(NULL, 0, __FILE__, __LINE__); - goto fail; - } - } - } - if (self->inherited == 0 && key_file) { - PySSL_BEGIN_ALLOW_THREADS - ret = SSL_CTX_use_PrivateKey_file(self->ctx, key_file, - SSL_FILETYPE_PEM); - PySSL_END_ALLOW_THREADS - if (ret != 1) { - _setSSLError(NULL, ret, __FILE__, __LINE__); - goto fail; - } - - PySSL_BEGIN_ALLOW_THREADS - ret = SSL_CTX_use_certificate_chain_file(self->ctx, - cert_file); - PySSL_END_ALLOW_THREADS - if (ret != 1) { - /* - fprintf(stderr, "ret is %d, errcode is %lu, %lu, with file \"%s\"\n", - ret, ERR_peek_error(), ERR_peek_last_error(), cert_file); - */ - if (ERR_peek_last_error() != 0) { - _setSSLError(NULL, ret, __FILE__, __LINE__); - goto fail; - } - } - } - - if (self->inherited == 0) { - /* ssl compatibility */ - SSL_CTX_set_options(self->ctx, SSL_OP_ALL); - - /* session cache mode */ - PySSL_BEGIN_ALLOW_THREADS - sess_cache_mode = SSL_SESS_CACHE_SERVER; - if (cache_mode == PY_SSL_SESS_CACHE_OFF) - sess_cache_mode = SSL_SESS_CACHE_OFF; - else if (cache_mode == PY_SSL_SESS_CACHE_CLIENT) - sess_cache_mode = SSL_SESS_CACHE_CLIENT; - else if (cache_mode == PY_SSL_SESS_CACHE_SERVER) - sess_cache_mode = SSL_SESS_CACHE_SERVER; - else if (cache_mode == PY_SSL_SESS_CACHE_BOTH) - sess_cache_mode = SSL_SESS_CACHE_BOTH; - SSL_CTX_set_session_cache_mode(self->ctx, sess_cache_mode); - - /* session id context */ - if (sess_id_ctx != NULL) - SSL_CTX_set_session_id_context(self->ctx, - (const unsigned char*)sess_id_ctx, - strlen(sess_id_ctx)); - PySSL_END_ALLOW_THREADS - - verification_mode = SSL_VERIFY_NONE; - if (certreq == PY_SSL_CERT_OPTIONAL) - verification_mode = SSL_VERIFY_PEER; - else if (certreq == PY_SSL_CERT_REQUIRED) - verification_mode = (SSL_VERIFY_PEER | - SSL_VERIFY_FAIL_IF_NO_PEER_CERT); - SSL_CTX_set_verify(self->ctx, verification_mode, - NULL); /* set verify lvl */ - } - - self->ssl = SSL_new(self->ctx); /* New ssl struct */ - SSL_set_fd(self->ssl, Sock->sock_fd); /* Set the socket for SSL */ -#ifdef SSL_MODE_AUTO_RETRY - SSL_set_mode(self->ssl, SSL_MODE_AUTO_RETRY); -#endif - - /* If the socket is in non-blocking mode or timeout mode, set the BIO - * to non-blocking mode (blocking is the default) - */ - if (Sock->sock_timeout >= 0.0) { - /* Set both the read and write BIO's to non-blocking mode */ - BIO_set_nbio(SSL_get_rbio(self->ssl), 1); - BIO_set_nbio(SSL_get_wbio(self->ssl), 1); - } - - PySSL_BEGIN_ALLOW_THREADS - if (socket_type == PY_SSL_CLIENT) - SSL_set_connect_state(self->ssl); - else - SSL_set_accept_state(self->ssl); - PySSL_END_ALLOW_THREADS - - self->Socket = Sock; - Py_INCREF(self->Socket); - return self; - fail: - if (errstr) - PyErr_SetString(PySSLErrorObject, errstr); - Py_DECREF(self); - return NULL; -} - -static PyObject * -PySSL_sslwrap(PyObject *self, PyObject *args) -{ - PySocketSockObject *Sock; - int server_side = 0; - int verification_mode = PY_SSL_CERT_NONE; - int protocol = PY_SSL_VERSION_SSL23; - int sess_cache_mode = PY_SSL_SESS_CACHE_SERVER; - char *sess_id_ctx = NULL; - char *key_file = NULL; - char *cert_file = NULL; - char *cacerts_file = NULL; - - if (!PyArg_ParseTuple(args, "O!i|zziiizz:sslwrap", - PySocketModule.Sock_Type, - &Sock, - &server_side, - &key_file, &cert_file, - &verification_mode, &protocol, - &sess_cache_mode, &sess_id_ctx, - &cacerts_file)) - return NULL; - - /* - fprintf(stderr, - "server_side is %d, keyfile %p, certfile %p, verify_mode %d, " - "protocol %d, sess_cache_mode %d, sess_id_ctx %p, certs %p\n", - server_side, key_file, cert_file, verification_mode, - protocol, sess_cache_mode, sess_id_ctx, cacerts_file); - */ - - return (PyObject *) newPySSLObject(NULL, Sock, key_file, cert_file, - server_side, verification_mode, - protocol, sess_cache_mode, sess_id_ctx, - cacerts_file); -} - -PyDoc_STRVAR(sslwrap_doc, -"sslwrap(socket, server_side, [keyfile, certfile, certs_mode, protocol,\n" -" sess_cache_mode, sess_id_ctx, cacertsfile]) -> sslobject"); - -/* SSL object methods */ - -static PyObject * -PySSL_SSLwrap_accepted(PySSLObject *self, PyObject *args) -{ - PySocketSockObject *Sock; - - if (!PyArg_ParseTuple(args, "O!:sslwrap", - PySocketModule.Sock_Type, - &Sock)) - return NULL; - - return (PyObject *) newPySSLObject(self, Sock, NULL, NULL, - PY_SSL_SERVER, 0, 0, 0, NULL, NULL); -} - -PyDoc_STRVAR(PySSL_SSLwrap_accepted_doc, -"wrap_accepted(socket) -> sslobject"); - -static PyObject *PySSL_SSLdo_handshake(PySSLObject *self) -{ - int ret; - int err; - int sockstate, nonblocking; - - /* just in case the blocking state of the socket has been changed */ - nonblocking = (self->Socket->sock_timeout >= 0.0); - BIO_set_nbio(SSL_get_rbio(self->ssl), nonblocking); - BIO_set_nbio(SSL_get_wbio(self->ssl), nonblocking); - - /* Actually negotiate SSL connection */ - /* XXX If SSL_do_handshake() returns 0, it's also a failure. */ - sockstate = 0; - do { - PySSL_BEGIN_ALLOW_THREADS - ret = SSL_do_handshake(self->ssl); - err = SSL_get_error(self->ssl, ret); - PySSL_END_ALLOW_THREADS - if(PyErr_CheckSignals()) { - return NULL; - } - if (err == SSL_ERROR_WANT_READ) { - sockstate = check_socket_and_wait_for_timeout(self->Socket, 0); - } else if (err == SSL_ERROR_WANT_WRITE) { - sockstate = check_socket_and_wait_for_timeout(self->Socket, 1); - } else { - sockstate = SOCKET_OPERATION_OK; - } - if (sockstate == SOCKET_HAS_TIMED_OUT) { - PyErr_SetString(PySSLErrorObject, - ERRSTR("The handshake operation timed out")); - return NULL; - } else if (sockstate == SOCKET_HAS_BEEN_CLOSED) { - PyErr_SetString(PySSLErrorObject, - ERRSTR("Underlying socket has been closed.")); - return NULL; - } else if (sockstate == SOCKET_TOO_LARGE_FOR_SELECT) { - PyErr_SetString(PySSLErrorObject, - ERRSTR("Underlying socket too large for select().")); - return NULL; - } else if (sockstate == SOCKET_IS_NONBLOCKING) { - break; - } - } while (err == SSL_ERROR_WANT_READ || err == SSL_ERROR_WANT_WRITE); - if (ret < 1) - return PySSL_SetError(self, ret, __FILE__, __LINE__); - - if (self->peer_cert) - X509_free (self->peer_cert); - PySSL_BEGIN_ALLOW_THREADS - if ((self->peer_cert = SSL_get_peer_certificate(self->ssl))) { - X509_NAME_oneline(X509_get_subject_name(self->peer_cert), - self->server, X509_NAME_MAXLEN); - X509_NAME_oneline(X509_get_issuer_name(self->peer_cert), - self->issuer, X509_NAME_MAXLEN); - } - PySSL_END_ALLOW_THREADS - - Py_INCREF(Py_None); - return Py_None; -} - -static PyObject * -PySSL_server(PySSLObject *self) -{ - return PyString_FromString(self->server); -} - -static PyObject * -PySSL_issuer(PySSLObject *self) -{ - return PyString_FromString(self->issuer); -} - -static PyObject * -_create_tuple_for_attribute (ASN1_OBJECT *name, ASN1_STRING *value) { - - char namebuf[X509_NAME_MAXLEN]; - int buflen; - PyObject *name_obj; - PyObject *value_obj; - PyObject *attr; - unsigned char *valuebuf = NULL; - - buflen = OBJ_obj2txt(namebuf, sizeof(namebuf), name, 0); - if (buflen < 0) { - _setSSLError(NULL, 0, __FILE__, __LINE__); - goto fail; - } - name_obj = PyString_FromStringAndSize(namebuf, buflen); - if (name_obj == NULL) - goto fail; - - buflen = ASN1_STRING_to_UTF8(&valuebuf, value); - if (buflen < 0) { - _setSSLError(NULL, 0, __FILE__, __LINE__); - Py_DECREF(name_obj); - goto fail; - } - value_obj = PyUnicode_DecodeUTF8((char *) valuebuf, - buflen, "strict"); - OPENSSL_free(valuebuf); - if (value_obj == NULL) { - Py_DECREF(name_obj); - goto fail; - } - attr = PyTuple_New(2); - if (attr == NULL) { - Py_DECREF(name_obj); - Py_DECREF(value_obj); - goto fail; - } - PyTuple_SET_ITEM(attr, 0, name_obj); - PyTuple_SET_ITEM(attr, 1, value_obj); - return attr; - - fail: - return NULL; -} - -static PyObject * -_create_tuple_for_X509_NAME (X509_NAME *xname) -{ - PyObject *dn = NULL; /* tuple which represents the "distinguished name" */ - PyObject *rdn = NULL; /* tuple to hold a "relative distinguished name" */ - PyObject *rdnt; - PyObject *attr = NULL; /* tuple to hold an attribute */ - int entry_count = X509_NAME_entry_count(xname); - X509_NAME_ENTRY *entry; - ASN1_OBJECT *name; - ASN1_STRING *value; - int index_counter; - int rdn_level = -1; - int retcode; - - dn = PyList_New(0); - if (dn == NULL) - return NULL; - /* now create another tuple to hold the top-level RDN */ - rdn = PyList_New(0); - if (rdn == NULL) - goto fail0; - - for (index_counter = 0; - index_counter < entry_count; - index_counter++) - { - entry = X509_NAME_get_entry(xname, index_counter); - - /* check to see if we've gotten to a new RDN */ - if (rdn_level >= 0) { - if (rdn_level != entry->set) { - /* yes, new RDN */ - /* add old RDN to DN */ - rdnt = PyList_AsTuple(rdn); - Py_DECREF(rdn); - if (rdnt == NULL) - goto fail0; - retcode = PyList_Append(dn, rdnt); - Py_DECREF(rdnt); - if (retcode < 0) - goto fail0; - /* create new RDN */ - rdn = PyList_New(0); - if (rdn == NULL) - goto fail0; - } - } - rdn_level = entry->set; - - /* now add this attribute to the current RDN */ - name = X509_NAME_ENTRY_get_object(entry); - value = X509_NAME_ENTRY_get_data(entry); - attr = _create_tuple_for_attribute(name, value); - /* - fprintf(stderr, "RDN level %d, attribute %s: %s\n", - entry->set, - PyString_AS_STRING(PyTuple_GET_ITEM(attr, 0)), - PyString_AS_STRING(PyTuple_GET_ITEM(attr, 1))); - */ - if (attr == NULL) - goto fail1; - retcode = PyList_Append(rdn, attr); - Py_DECREF(attr); - if (retcode < 0) - goto fail1; - } - /* now, there's typically a dangling RDN */ - if ((rdn != NULL) && (PyList_Size(rdn) > 0)) { - rdnt = PyList_AsTuple(rdn); - Py_DECREF(rdn); - if (rdnt == NULL) - goto fail0; - retcode = PyList_Append(dn, rdnt); - Py_DECREF(rdnt); - if (retcode < 0) - goto fail0; - } - - /* convert list to tuple */ - rdnt = PyList_AsTuple(dn); - Py_DECREF(dn); - if (rdnt == NULL) - return NULL; - return rdnt; - - fail1: - Py_XDECREF(rdn); - - fail0: - Py_XDECREF(dn); - return NULL; -} - -static PyObject * -_get_peer_alt_names (X509 *certificate) { - - /* this code follows the procedure outlined in - OpenSSL's crypto/x509v3/v3_prn.c:X509v3_EXT_print() - function to extract the STACK_OF(GENERAL_NAME), - then iterates through the stack to add the - names. */ - - int i, j; - PyObject *peer_alt_names = Py_None; - PyObject *v, *t; - X509_EXTENSION *ext = NULL; - GENERAL_NAMES *names = NULL; - GENERAL_NAME *name; - X509V3_EXT_METHOD *method; - BIO *biobuf = NULL; - char buf[2048]; - char *vptr; - int len; - const unsigned char *p; - - if (certificate == NULL) - return peer_alt_names; - - /* get a memory buffer */ - biobuf = BIO_new(BIO_s_mem()); - - i = 0; - while ((i = X509_get_ext_by_NID( - certificate, NID_subject_alt_name, i)) >= 0) { - - if (peer_alt_names == Py_None) { - peer_alt_names = PyList_New(0); - if (peer_alt_names == NULL) - goto fail; - } - - /* now decode the altName */ - ext = X509_get_ext(certificate, i); - if(!(method = X509V3_EXT_get(ext))) { - PyErr_SetString(PySSLErrorObject, - ERRSTR("No method for internalizing subjectAltName!")); - goto fail; - } - - p = ext->value->data; - if (method->it) - names = (GENERAL_NAMES*) (ASN1_item_d2i(NULL, - &p, - ext->value->length, - ASN1_ITEM_ptr(method->it))); - else - names = (GENERAL_NAMES*) (method->d2i(NULL, - &p, - ext->value->length)); - - for(j = 0; j < sk_GENERAL_NAME_num(names); j++) { - - /* get a rendering of each name in the set of names */ - - name = sk_GENERAL_NAME_value(names, j); - if (name->type == GEN_DIRNAME) { - - /* we special-case DirName as a tuple of tuples of attributes */ - - t = PyTuple_New(2); - if (t == NULL) { - goto fail; - } - - v = PyString_FromString("DirName"); - if (v == NULL) { - Py_DECREF(t); - goto fail; - } - PyTuple_SET_ITEM(t, 0, v); - - v = _create_tuple_for_X509_NAME (name->d.dirn); - if (v == NULL) { - Py_DECREF(t); - goto fail; - } - PyTuple_SET_ITEM(t, 1, v); - - } else { - - /* for everything else, we use the OpenSSL print form */ - - (void) BIO_reset(biobuf); - GENERAL_NAME_print(biobuf, name); - len = BIO_gets(biobuf, buf, sizeof(buf)-1); - if (len < 0) { - _setSSLError(NULL, 0, __FILE__, __LINE__); - goto fail; - } - vptr = strchr(buf, ':'); - if (vptr == NULL) - goto fail; - t = PyTuple_New(2); - if (t == NULL) - goto fail; - v = PyString_FromStringAndSize(buf, (vptr - buf)); - if (v == NULL) { - Py_DECREF(t); - goto fail; - } - PyTuple_SET_ITEM(t, 0, v); - v = PyString_FromStringAndSize((vptr + 1), (len - (vptr - buf + 1))); - if (v == NULL) { - Py_DECREF(t); - goto fail; - } - PyTuple_SET_ITEM(t, 1, v); - } - - /* and add that rendering to the list */ - - if (PyList_Append(peer_alt_names, t) < 0) { - Py_DECREF(t); - goto fail; - } - Py_DECREF(t); - } - } - BIO_free(biobuf); - if (peer_alt_names != Py_None) { - v = PyList_AsTuple(peer_alt_names); - Py_DECREF(peer_alt_names); - return v; - } else { - return peer_alt_names; - } - - - fail: - if (biobuf != NULL) - BIO_free(biobuf); - - if (peer_alt_names != Py_None) { - Py_XDECREF(peer_alt_names); - } - - return NULL; -} - -static PyObject * -_decode_certificate (X509 *certificate, int verbose) { - - PyObject *retval = NULL; - BIO *biobuf = NULL; - PyObject *peer; - PyObject *peer_alt_names = NULL; - PyObject *issuer; - PyObject *version; - PyObject *sn_obj; - ASN1_INTEGER *serialNumber; - char buf[2048]; - int len; - ASN1_TIME *notBefore, *notAfter; - PyObject *pnotBefore, *pnotAfter; - - retval = PyDict_New(); - if (retval == NULL) - return NULL; - - peer = _create_tuple_for_X509_NAME( - X509_get_subject_name(certificate)); - if (peer == NULL) - goto fail0; - if (PyDict_SetItemString(retval, (const char *) "subject", peer) < 0) { - Py_DECREF(peer); - goto fail0; - } - Py_DECREF(peer); - - if (verbose) { - issuer = _create_tuple_for_X509_NAME( - X509_get_issuer_name(certificate)); - if (issuer == NULL) - goto fail0; - if (PyDict_SetItemString(retval, (const char *)"issuer", issuer) < 0) { - Py_DECREF(issuer); - goto fail0; - } - Py_DECREF(issuer); - - version = PyInt_FromLong(X509_get_version(certificate) + 1); - if (PyDict_SetItemString(retval, "version", version) < 0) { - Py_DECREF(version); - goto fail0; - } - Py_DECREF(version); - } - - /* get a memory buffer */ - biobuf = BIO_new(BIO_s_mem()); - - if (verbose) { - - (void) BIO_reset(biobuf); - serialNumber = X509_get_serialNumber(certificate); - /* should not exceed 20 octets, 160 bits, so buf is big enough */ - i2a_ASN1_INTEGER(biobuf, serialNumber); - len = BIO_gets(biobuf, buf, sizeof(buf)-1); - if (len < 0) { - _setSSLError(NULL, 0, __FILE__, __LINE__); - goto fail1; - } - sn_obj = PyString_FromStringAndSize(buf, len); - if (sn_obj == NULL) - goto fail1; - if (PyDict_SetItemString(retval, "serialNumber", sn_obj) < 0) { - Py_DECREF(sn_obj); - goto fail1; - } - Py_DECREF(sn_obj); - - (void) BIO_reset(biobuf); - notBefore = X509_get_notBefore(certificate); - ASN1_TIME_print(biobuf, notBefore); - len = BIO_gets(biobuf, buf, sizeof(buf)-1); - if (len < 0) { - _setSSLError(NULL, 0, __FILE__, __LINE__); - goto fail1; - } - pnotBefore = PyString_FromStringAndSize(buf, len); - if (pnotBefore == NULL) - goto fail1; - if (PyDict_SetItemString(retval, "notBefore", pnotBefore) < 0) { - Py_DECREF(pnotBefore); - goto fail1; - } - Py_DECREF(pnotBefore); - } - - (void) BIO_reset(biobuf); - notAfter = X509_get_notAfter(certificate); - ASN1_TIME_print(biobuf, notAfter); - len = BIO_gets(biobuf, buf, sizeof(buf)-1); - if (len < 0) { - _setSSLError(NULL, 0, __FILE__, __LINE__); - goto fail1; - } - pnotAfter = PyString_FromStringAndSize(buf, len); - if (pnotAfter == NULL) - goto fail1; - if (PyDict_SetItemString(retval, "notAfter", pnotAfter) < 0) { - Py_DECREF(pnotAfter); - goto fail1; - } - Py_DECREF(pnotAfter); - - /* Now look for subjectAltName */ - - peer_alt_names = _get_peer_alt_names(certificate); - if (peer_alt_names == NULL) - goto fail1; - else if (peer_alt_names != Py_None) { - if (PyDict_SetItemString(retval, "subjectAltName", - peer_alt_names) < 0) { - Py_DECREF(peer_alt_names); - goto fail1; - } - Py_DECREF(peer_alt_names); - } - - BIO_free(biobuf); - return retval; - - fail1: - if (biobuf != NULL) - BIO_free(biobuf); - fail0: - Py_XDECREF(retval); - return NULL; -} - - -static PyObject * -PySSL_test_decode_certificate (PyObject *mod, PyObject *args) { - - PyObject *retval = NULL; - char *filename = NULL; - X509 *x=NULL; - BIO *cert; - int verbose = 1; - - if (!PyArg_ParseTuple(args, "s|i:test_decode_certificate", &filename, &verbose)) - return NULL; - - if ((cert=BIO_new(BIO_s_file())) == NULL) { - PyErr_SetString(PySSLErrorObject, "Can't malloc memory to read file"); - goto fail0; - } - - if (BIO_read_filename(cert,filename) <= 0) { - PyErr_SetString(PySSLErrorObject, "Can't open file"); - goto fail0; - } - - x = PEM_read_bio_X509_AUX(cert,NULL, NULL, NULL); - if (x == NULL) { - PyErr_SetString(PySSLErrorObject, "Error decoding PEM-encoded file"); - goto fail0; - } - - retval = _decode_certificate(x, verbose); - - fail0: - - if (cert != NULL) BIO_free(cert); - return retval; -} - - -static PyObject * -PySSL_peercert(PySSLObject *self, PyObject *args) -{ - PyObject *retval = NULL; - int len; - int verification; - PyObject *binary_mode = Py_None; - - if (!PyArg_ParseTuple(args, "|O:peer_certificate", &binary_mode)) - return NULL; - - if (!self->peer_cert) - Py_RETURN_NONE; - - if (PyObject_IsTrue(binary_mode)) { - /* return cert in DER-encoded format */ - - unsigned char *bytes_buf = NULL; - - bytes_buf = NULL; - len = i2d_X509(self->peer_cert, &bytes_buf); - if (len < 0) { - PySSL_SetError(self, len, __FILE__, __LINE__); - return NULL; - } - retval = PyString_FromStringAndSize((const char *) bytes_buf, len); - OPENSSL_free(bytes_buf); - return retval; - - } else { - - verification = SSL_CTX_get_verify_mode(self->ctx); - if ((verification & SSL_VERIFY_PEER) == 0) - return PyDict_New(); - else - return _decode_certificate (self->peer_cert, 0); - } -} - -PyDoc_STRVAR(PySSL_peercert_doc, -"peer_certificate([der=False]) -> certificate\n\ -\n\ -Returns the certificate for the peer. If no certificate was provided,\n\ -returns None. If a certificate was provided, but not validated, returns\n\ -an empty dictionary. Otherwise returns a dict containing information\n\ -about the peer certificate.\n\ -\n\ -If the optional argument is True, returns a DER-encoded copy of the\n\ -peer certificate, or None if no certificate was provided. This will\n\ -return the certificate even if it wasn't validated."); - -static PyObject *PySSL_cipher (PySSLObject *self) { - - PyObject *retval, *v; - SSL_CIPHER *current; - char *cipher_name; - char *cipher_protocol; - - if (self->ssl == NULL) - return Py_None; - current = SSL_get_current_cipher(self->ssl); - if (current == NULL) - return Py_None; - - retval = PyTuple_New(3); - if (retval == NULL) - return NULL; - - cipher_name = (char *) SSL_CIPHER_get_name(current); - if (cipher_name == NULL) { - PyTuple_SET_ITEM(retval, 0, Py_None); - } else { - v = PyString_FromString(cipher_name); - if (v == NULL) - goto fail0; - PyTuple_SET_ITEM(retval, 0, v); - } - cipher_protocol = SSL_CIPHER_get_version(current); - if (cipher_protocol == NULL) { - PyTuple_SET_ITEM(retval, 1, Py_None); - } else { - v = PyString_FromString(cipher_protocol); - if (v == NULL) - goto fail0; - PyTuple_SET_ITEM(retval, 1, v); - } - v = PyInt_FromLong(SSL_CIPHER_get_bits(current, NULL)); - if (v == NULL) - goto fail0; - PyTuple_SET_ITEM(retval, 2, v); - return retval; - - fail0: - Py_DECREF(retval); - return NULL; -} - -static void PySSL_dealloc(PySSLObject *self) -{ - if (self->peer_cert) /* Possible not to have one? */ - X509_free (self->peer_cert); - if (self->ssl) - SSL_free(self->ssl); - if (self->ctx && self->inherited == 0) - SSL_CTX_free(self->ctx); - Py_XDECREF(self->Socket); - PyObject_Del(self); -} - -/* If the socket has a timeout, do a select()/poll() on the socket. - The argument writing indicates the direction. - Returns one of the possibilities in the timeout_state enum (above). - */ - -static int -check_socket_and_wait_for_timeout(PySocketSockObject *s, int writing) -{ - fd_set fds; - struct timeval tv; - int rc; - - /* Nothing to do unless we're in timeout mode (not non-blocking) */ - if (s->sock_timeout < 0.0) - return SOCKET_IS_BLOCKING; - else if (s->sock_timeout == 0.0) - return SOCKET_IS_NONBLOCKING; - - /* Guard against closed socket */ - if (s->sock_fd < 0) - return SOCKET_HAS_BEEN_CLOSED; - - /* Prefer poll, if available, since you can poll() any fd - * which can't be done with select(). */ -#ifdef HAVE_POLL - { - struct pollfd pollfd; - int timeout; - - pollfd.fd = s->sock_fd; - pollfd.events = writing ? POLLOUT : POLLIN; - - /* s->sock_timeout is in seconds, timeout in ms */ - timeout = (int)(s->sock_timeout * 1000 + 0.5); - PySSL_BEGIN_ALLOW_THREADS - rc = poll(&pollfd, 1, timeout); - PySSL_END_ALLOW_THREADS - - goto normal_return; - } -#endif - - /* Guard against socket too large for select*/ -#ifndef Py_SOCKET_FD_CAN_BE_GE_FD_SETSIZE - if (s->sock_fd >= FD_SETSIZE) - return SOCKET_TOO_LARGE_FOR_SELECT; -#endif - - /* Construct the arguments to select */ - tv.tv_sec = (int)s->sock_timeout; - tv.tv_usec = (int)((s->sock_timeout - tv.tv_sec) * 1e6); - FD_ZERO(&fds); - FD_SET(s->sock_fd, &fds); - - /* See if the socket is ready */ - PySSL_BEGIN_ALLOW_THREADS - if (writing) - rc = select(s->sock_fd+1, NULL, &fds, NULL, &tv); - else - rc = select(s->sock_fd+1, &fds, NULL, NULL, &tv); - PySSL_END_ALLOW_THREADS - -#ifdef HAVE_POLL -normal_return: -#endif - /* Return SOCKET_TIMED_OUT on timeout, SOCKET_OPERATION_OK otherwise - (when we are able to write or when there's something to read) */ - return rc == 0 ? SOCKET_HAS_TIMED_OUT : SOCKET_OPERATION_OK; -} - -static PyObject *PySSL_SSLwrite(PySSLObject *self, PyObject *args) -{ - char *data; - int len; - int count; - int sockstate; - int err; - int nonblocking; - - if (!PyArg_ParseTuple(args, "s#:write", &data, &count)) - return NULL; - - /* just in case the blocking state of the socket has been changed */ - nonblocking = (self->Socket->sock_timeout >= 0.0); - BIO_set_nbio(SSL_get_rbio(self->ssl), nonblocking); - BIO_set_nbio(SSL_get_wbio(self->ssl), nonblocking); - - sockstate = check_socket_and_wait_for_timeout(self->Socket, 1); - if (sockstate == SOCKET_HAS_TIMED_OUT) { - PyErr_SetString(PySSLErrorObject, - "The write operation timed out"); - return NULL; - } else if (sockstate == SOCKET_HAS_BEEN_CLOSED) { - PyErr_SetString(PySSLErrorObject, - "Underlying socket has been closed."); - return NULL; - } else if (sockstate == SOCKET_TOO_LARGE_FOR_SELECT) { - PyErr_SetString(PySSLErrorObject, - "Underlying socket too large for select()."); - return NULL; - } - do { - err = 0; - PySSL_BEGIN_ALLOW_THREADS - len = SSL_write(self->ssl, data, count); - err = SSL_get_error(self->ssl, len); - PySSL_END_ALLOW_THREADS - if(PyErr_CheckSignals()) { - return NULL; - } - if (err == SSL_ERROR_WANT_READ) { - sockstate = check_socket_and_wait_for_timeout(self->Socket, 0); - } else if (err == SSL_ERROR_WANT_WRITE) { - sockstate = check_socket_and_wait_for_timeout(self->Socket, 1); - } else { - sockstate = SOCKET_OPERATION_OK; - } - if (sockstate == SOCKET_HAS_TIMED_OUT) { - PyErr_SetString(PySSLErrorObject, - "The write operation timed out"); - return NULL; - } else if (sockstate == SOCKET_HAS_BEEN_CLOSED) { - PyErr_SetString(PySSLErrorObject, - "Underlying socket has been closed."); - return NULL; - } else if (sockstate == SOCKET_IS_NONBLOCKING) { - break; - } - } while (err == SSL_ERROR_WANT_READ || err == SSL_ERROR_WANT_WRITE); - if (len > 0) - return PyInt_FromLong(len); - else - return PySSL_SetError(self, len, __FILE__, __LINE__); -} - -PyDoc_STRVAR(PySSL_SSLwrite_doc, -"write(s) -> len\n\ -\n\ -Writes the string s into the SSL object. Returns the number\n\ -of bytes written."); - -static PyObject *PySSL_SSLpending(PySSLObject *self) -{ - int count = 0; - - PySSL_BEGIN_ALLOW_THREADS - count = SSL_pending(self->ssl); - PySSL_END_ALLOW_THREADS - if (count < 0) - return PySSL_SetError(self, count, __FILE__, __LINE__); - else - return PyInt_FromLong(count); -} - -PyDoc_STRVAR(PySSL_SSLpending_doc, -"pending() -> count\n\ -\n\ -Returns the number of already decrypted bytes available for read,\n\ -pending on the connection.\n"); - -static PyObject *PySSL_SSLread(PySSLObject *self, PyObject *args) -{ - PyObject *buf; - int count = 0; - int len = 1024; - int sockstate; - int err; - int nonblocking; - - if (!PyArg_ParseTuple(args, "|i:read", &len)) - return NULL; - - if (!(buf = PyString_FromStringAndSize((char *) 0, len))) - return NULL; - - /* just in case the blocking state of the socket has been changed */ - nonblocking = (self->Socket->sock_timeout >= 0.0); - BIO_set_nbio(SSL_get_rbio(self->ssl), nonblocking); - BIO_set_nbio(SSL_get_wbio(self->ssl), nonblocking); - - /* first check if there are bytes ready to be read */ - PySSL_BEGIN_ALLOW_THREADS - count = SSL_pending(self->ssl); - PySSL_END_ALLOW_THREADS - - if (!count) { - sockstate = check_socket_and_wait_for_timeout(self->Socket, 0); - if (sockstate == SOCKET_HAS_TIMED_OUT) { - PyErr_SetString(PySSLErrorObject, - "The read operation timed out"); - Py_DECREF(buf); - return NULL; - } else if (sockstate == SOCKET_TOO_LARGE_FOR_SELECT) { - PyErr_SetString(PySSLErrorObject, - "Underlying socket too large for select()."); - Py_DECREF(buf); - return NULL; - } else if (sockstate == SOCKET_HAS_BEEN_CLOSED) { - if (SSL_get_shutdown(self->ssl) != - SSL_RECEIVED_SHUTDOWN) - { - Py_DECREF(buf); - PyErr_SetString(PySSLErrorObject, - "Socket closed without SSL shutdown handshake"); - return NULL; - } else { - /* should contain a zero-length string */ - _PyString_Resize(&buf, 0); - return buf; - } - } - } - do { - err = 0; - PySSL_BEGIN_ALLOW_THREADS - count = SSL_read(self->ssl, PyString_AsString(buf), len); - err = SSL_get_error(self->ssl, count); - PySSL_END_ALLOW_THREADS - if(PyErr_CheckSignals()) { - Py_DECREF(buf); - return NULL; - } - if (err == SSL_ERROR_WANT_READ) { - sockstate = check_socket_and_wait_for_timeout(self->Socket, 0); - } else if (err == SSL_ERROR_WANT_WRITE) { - sockstate = check_socket_and_wait_for_timeout(self->Socket, 1); - } else if ((err == SSL_ERROR_ZERO_RETURN) && - (SSL_get_shutdown(self->ssl) == - SSL_RECEIVED_SHUTDOWN)) - { - _PyString_Resize(&buf, 0); - return buf; - } else { - sockstate = SOCKET_OPERATION_OK; - } - if (sockstate == SOCKET_HAS_TIMED_OUT) { - PyErr_SetString(PySSLErrorObject, - "The read operation timed out"); - Py_DECREF(buf); - return NULL; - } else if (sockstate == SOCKET_IS_NONBLOCKING) { - break; - } - } while (err == SSL_ERROR_WANT_READ || err == SSL_ERROR_WANT_WRITE); - if (count <= 0) { - Py_DECREF(buf); - return PySSL_SetError(self, count, __FILE__, __LINE__); - } - if (count != len) - _PyString_Resize(&buf, count); - return buf; -} - -PyDoc_STRVAR(PySSL_SSLread_doc, -"read([len]) -> string\n\ -\n\ -Read up to len bytes from the SSL socket."); - -static PyObject *PySSL_SSLshutdown(PySSLObject *self) -{ - int err, ssl_err, sockstate, nonblocking; - int zeros = 0; - - /* Guard against closed socket */ - if (self->Socket->sock_fd < 0) { - PyErr_SetString(PySSLErrorObject, - "Underlying socket has been closed."); - return NULL; - } - - /* Just in case the blocking state of the socket has been changed */ - nonblocking = (self->Socket->sock_timeout >= 0.0); - BIO_set_nbio(SSL_get_rbio(self->ssl), nonblocking); - BIO_set_nbio(SSL_get_wbio(self->ssl), nonblocking); - - while (1) { - PySSL_BEGIN_ALLOW_THREADS - /* Disable read-ahead so that unwrap can work correctly. - * Otherwise OpenSSL might read in too much data, - * eating clear text data that happens to be - * transmitted after the SSL shutdown. - * Should be safe to call repeatedly everytime this - * function is used and the shutdown_seen_zero != 0 - * condition is met. - */ - if (self->shutdown_seen_zero) - SSL_set_read_ahead(self->ssl, 0); - err = SSL_shutdown(self->ssl); - PySSL_END_ALLOW_THREADS - /* If err == 1, a secure shutdown with SSL_shutdown() is complete */ - if (err > 0) - break; - if (err == 0) { - /* Don't loop endlessly; instead preserve legacy - behaviour of trying SSL_shutdown() only twice. - This looks necessary for OpenSSL < 0.9.8m */ - if (++zeros > 1) - break; - /* Shutdown was sent, now try receiving */ - self->shutdown_seen_zero = 1; - continue; - } - - /* Possibly retry shutdown until timeout or failure */ - ssl_err = SSL_get_error(self->ssl, err); - if (ssl_err == SSL_ERROR_WANT_READ) - sockstate = check_socket_and_wait_for_timeout(self->Socket, 0); - else if (ssl_err == SSL_ERROR_WANT_WRITE) - sockstate = check_socket_and_wait_for_timeout(self->Socket, 1); - else - break; - if (sockstate == SOCKET_HAS_TIMED_OUT) { - if (ssl_err == SSL_ERROR_WANT_READ) - PyErr_SetString(PySSLErrorObject, - "The read operation timed out"); - else - PyErr_SetString(PySSLErrorObject, - "The write operation timed out"); - return NULL; - } - else if (sockstate == SOCKET_TOO_LARGE_FOR_SELECT) { - PyErr_SetString(PySSLErrorObject, - "Underlying socket too large for select()."); - return NULL; - } - else if (sockstate != SOCKET_OPERATION_OK) - /* Retain the SSL error code */ - break; - } - - if (err < 0) - return PySSL_SetError(self, err, __FILE__, __LINE__); - else { - Py_INCREF(self->Socket); - return (PyObject *) (self->Socket); - } -} - -PyDoc_STRVAR(PySSL_SSLshutdown_doc, -"shutdown(s) -> socket\n\ -\n\ -Does the SSL shutdown handshake with the remote end, and returns\n\ -the underlying socket object."); - -static PyMethodDef PySSLMethods[] = { - {"wrap_accepted", (PyCFunction)PySSL_SSLwrap_accepted, METH_VARARGS, - PySSL_SSLwrap_accepted_doc}, - {"do_handshake", (PyCFunction)PySSL_SSLdo_handshake, METH_NOARGS}, - {"write", (PyCFunction)PySSL_SSLwrite, METH_VARARGS, - PySSL_SSLwrite_doc}, - {"read", (PyCFunction)PySSL_SSLread, METH_VARARGS, - PySSL_SSLread_doc}, - {"pending", (PyCFunction)PySSL_SSLpending, METH_NOARGS, - PySSL_SSLpending_doc}, - {"server", (PyCFunction)PySSL_server, METH_NOARGS}, - {"issuer", (PyCFunction)PySSL_issuer, METH_NOARGS}, - {"peer_certificate", (PyCFunction)PySSL_peercert, METH_VARARGS, - PySSL_peercert_doc}, - {"cipher", (PyCFunction)PySSL_cipher, METH_NOARGS}, - {"shutdown", (PyCFunction)PySSL_SSLshutdown, METH_NOARGS, - PySSL_SSLshutdown_doc}, - {NULL, NULL} -}; - -static PyObject *PySSL_getattr(PySSLObject *self, char *name) -{ - return Py_FindMethod(PySSLMethods, (PyObject *)self, name); -} - -static PyTypeObject PySSL_Type = { - PyVarObject_HEAD_INIT(NULL, 0) - "ssl.SSLContext", /*tp_name*/ - sizeof(PySSLObject), /*tp_basicsize*/ - 0, /*tp_itemsize*/ - /* methods */ - (destructor)PySSL_dealloc, /*tp_dealloc*/ - 0, /*tp_print*/ - (getattrfunc)PySSL_getattr, /*tp_getattr*/ - 0, /*tp_setattr*/ - 0, /*tp_compare*/ - 0, /*tp_repr*/ - 0, /*tp_as_number*/ - 0, /*tp_as_sequence*/ - 0, /*tp_as_mapping*/ - 0, /*tp_hash*/ -}; - -#ifdef HAVE_OPENSSL_RAND - -/* helper routines for seeding the SSL PRNG */ -static PyObject * -PySSL_RAND_add(PyObject *self, PyObject *args) -{ - char *buf; - int len; - double entropy; - - if (!PyArg_ParseTuple(args, "s#d:RAND_add", &buf, &len, &entropy)) - return NULL; - RAND_add(buf, len, entropy); - Py_INCREF(Py_None); - return Py_None; -} - -PyDoc_STRVAR(PySSL_RAND_add_doc, -"RAND_add(string, entropy)\n\ -\n\ -Mix string into the OpenSSL PRNG state. entropy (a float) is a lower\n\ -bound on the entropy contained in string. See RFC 1750."); - -static PyObject * -PySSL_RAND_status(PyObject *self) -{ - return PyInt_FromLong(RAND_status()); -} - -PyDoc_STRVAR(PySSL_RAND_status_doc, -"RAND_status() -> 0 or 1\n\ -\n\ -Returns 1 if the OpenSSL PRNG has been seeded with enough data and 0 if not.\n\ -It is necessary to seed the PRNG with RAND_add() on some platforms before\n\ -using the ssl() function."); - -static PyObject * -PySSL_RAND_egd(PyObject *self, PyObject *arg) -{ - int bytes; - - if (!PyString_Check(arg)) - return PyErr_Format(PyExc_TypeError, - "RAND_egd() expected string, found %s", - Py_TYPE(arg)->tp_name); - bytes = RAND_egd(PyString_AS_STRING(arg)); - if (bytes == -1) { - PyErr_SetString(PySSLErrorObject, - "EGD connection failed or EGD did not return " - "enough data to seed the PRNG"); - return NULL; - } - return PyInt_FromLong(bytes); -} - -PyDoc_STRVAR(PySSL_RAND_egd_doc, -"RAND_egd(path) -> bytes\n\ -\n\ -Queries the entropy gather daemon (EGD) on the socket named by 'path'.\n\ -Returns number of bytes read. Raises SSLError if connection to EGD\n\ -fails or if it does provide enough data to seed PRNG."); - -#endif - -/* List of functions exported by this module. */ - -static PyMethodDef PySSL_methods[] = { - {"sslwrap", PySSL_sslwrap, - METH_VARARGS, sslwrap_doc}, - {"_test_decode_cert", PySSL_test_decode_certificate, - METH_VARARGS}, -#ifdef HAVE_OPENSSL_RAND - {"RAND_add", PySSL_RAND_add, METH_VARARGS, - PySSL_RAND_add_doc}, - {"RAND_egd", PySSL_RAND_egd, METH_O, - PySSL_RAND_egd_doc}, - {"RAND_status", (PyCFunction)PySSL_RAND_status, METH_NOARGS, - PySSL_RAND_status_doc}, -#endif - {NULL, NULL} /* Sentinel */ -}; - - -#ifdef WITH_THREAD - -/* an implementation of OpenSSL threading operations in terms - of the Python C thread library */ - -static PyThread_type_lock *_ssl_locks = NULL; - -static unsigned long _ssl_thread_id_function (void) { - return PyThread_get_thread_ident(); -} - -static void _ssl_thread_locking_function (int mode, int n, const char *file, int line) { - /* this function is needed to perform locking on shared data - structures. (Note that OpenSSL uses a number of global data - structures that will be implicitly shared whenever multiple threads - use OpenSSL.) Multi-threaded applications will crash at random if - it is not set. - - locking_function() must be able to handle up to CRYPTO_num_locks() - different mutex locks. It sets the n-th lock if mode & CRYPTO_LOCK, and - releases it otherwise. - - file and line are the file number of the function setting the - lock. They can be useful for debugging. - */ - - if ((_ssl_locks == NULL) || - (n < 0) || ((unsigned)n >= _ssl_locks_count)) - return; - - if (mode & CRYPTO_LOCK) { - PyThread_acquire_lock(_ssl_locks[n], 1); - } else { - PyThread_release_lock(_ssl_locks[n]); - } -} - -static int _setup_ssl_threads(void) { - - unsigned int i; - - if (_ssl_locks == NULL) { - _ssl_locks_count = CRYPTO_num_locks(); - _ssl_locks = (PyThread_type_lock *) - malloc(sizeof(PyThread_type_lock) * _ssl_locks_count); - if (_ssl_locks == NULL) - return 0; - memset(_ssl_locks, 0, sizeof(PyThread_type_lock) * _ssl_locks_count); - for (i = 0; i < _ssl_locks_count; i++) { - _ssl_locks[i] = PyThread_allocate_lock(); - if (_ssl_locks[i] == NULL) { - unsigned int j; - for (j = 0; j < i; j++) { - PyThread_free_lock(_ssl_locks[j]); - } - free(_ssl_locks); - return 0; - } - } - CRYPTO_set_locking_callback(_ssl_thread_locking_function); - CRYPTO_set_id_callback(_ssl_thread_id_function); - } - return 1; -} - -#endif /* def HAVE_THREAD */ - -PyDoc_STRVAR(module_doc, -"Implementation module for SSL socket operations. See the socket module\n\ -for documentation."); - -PyMODINIT_FUNC -init_forge_ssl(void) -{ - PyObject *m, *d; - - Py_TYPE(&PySSL_Type) = &PyType_Type; - - m = Py_InitModule3("_forge_ssl", PySSL_methods, module_doc); - if (m == NULL) - return; - d = PyModule_GetDict(m); - - /* Load _socket module and its C API */ - if (PySocketModule_ImportModuleAndAPI()) - return; - - /* Init OpenSSL */ - SSL_load_error_strings(); - SSL_library_init(); -#ifdef WITH_THREAD - /* note that this will start threading if not already started */ - if (!_setup_ssl_threads()) { - return; - } -#endif - OpenSSL_add_all_algorithms(); - - /* Add symbols to module dict */ - PySSLErrorObject = PyErr_NewException("ssl.SSLError", - PySocketModule.error, - NULL); - if (PySSLErrorObject == NULL) - return; - if (PyDict_SetItemString(d, "SSLError", PySSLErrorObject) != 0) - return; - if (PyDict_SetItemString(d, "SSLType", - (PyObject *)&PySSL_Type) != 0) - return; - PyModule_AddIntConstant(m, "SSL_ERROR_ZERO_RETURN", - PY_SSL_ERROR_ZERO_RETURN); - PyModule_AddIntConstant(m, "SSL_ERROR_WANT_READ", - PY_SSL_ERROR_WANT_READ); - PyModule_AddIntConstant(m, "SSL_ERROR_WANT_WRITE", - PY_SSL_ERROR_WANT_WRITE); - PyModule_AddIntConstant(m, "SSL_ERROR_WANT_X509_LOOKUP", - PY_SSL_ERROR_WANT_X509_LOOKUP); - PyModule_AddIntConstant(m, "SSL_ERROR_SYSCALL", - PY_SSL_ERROR_SYSCALL); - PyModule_AddIntConstant(m, "SSL_ERROR_SSL", - PY_SSL_ERROR_SSL); - PyModule_AddIntConstant(m, "SSL_ERROR_WANT_CONNECT", - PY_SSL_ERROR_WANT_CONNECT); - /* non ssl.h errorcodes */ - PyModule_AddIntConstant(m, "SSL_ERROR_EOF", - PY_SSL_ERROR_EOF); - PyModule_AddIntConstant(m, "SSL_ERROR_INVALID_ERROR_CODE", - PY_SSL_ERROR_INVALID_ERROR_CODE); - /* cert requirements */ - PyModule_AddIntConstant(m, "CERT_NONE", - PY_SSL_CERT_NONE); - PyModule_AddIntConstant(m, "CERT_OPTIONAL", - PY_SSL_CERT_OPTIONAL); - PyModule_AddIntConstant(m, "CERT_REQUIRED", - PY_SSL_CERT_REQUIRED); - - /* protocol versions */ - PyModule_AddIntConstant(m, "PROTOCOL_SSLv2", - PY_SSL_VERSION_SSL2); - PyModule_AddIntConstant(m, "PROTOCOL_SSLv3", - PY_SSL_VERSION_SSL3); - PyModule_AddIntConstant(m, "PROTOCOL_SSLv23", - PY_SSL_VERSION_SSL23); - PyModule_AddIntConstant(m, "PROTOCOL_TLSv1", - PY_SSL_VERSION_TLS1); - - /* session cache modes */ - PyModule_AddIntConstant(m, "SESS_CACHE_OFF", - PY_SSL_SESS_CACHE_OFF); - PyModule_AddIntConstant(m, "SESS_CACHE_CLIENT", - PY_SSL_SESS_CACHE_CLIENT); - PyModule_AddIntConstant(m, "SESS_CACHE_SERVER", - PY_SSL_SESS_CACHE_SERVER); - PyModule_AddIntConstant(m, "SESS_CACHE_BOTH", - PY_SSL_SESS_CACHE_BOTH); -} diff --git a/node_modules/node-forge/tests/forge_ssl/forge/socketmodule.h b/node_modules/node-forge/tests/forge_ssl/forge/socketmodule.h deleted file mode 100644 index a4415b54..00000000 --- a/node_modules/node-forge/tests/forge_ssl/forge/socketmodule.h +++ /dev/null @@ -1,268 +0,0 @@ -/* Socket module header file */ - -/* Includes needed for the sockaddr_* symbols below */ -#ifndef MS_WINDOWS -#ifdef __VMS -# include -# else -# include -# endif -# include -# if !(defined(__BEOS__) || defined(__CYGWIN__) || (defined(PYOS_OS2) && defined(PYCC_VACPP))) -# include -# endif - -#else /* MS_WINDOWS */ -# include -# include -/* VC6 is shipped with old platform headers, and does not have MSTcpIP.h - * Separate SDKs have all the functions we want, but older ones don't have - * any version information. - * I use SIO_GET_MULTICAST_FILTER to detect a decent SDK. - */ -# ifdef SIO_GET_MULTICAST_FILTER -# include /* for SIO_RCVALL */ -# define HAVE_ADDRINFO -# define HAVE_SOCKADDR_STORAGE -# define HAVE_GETADDRINFO -# define HAVE_GETNAMEINFO -# define ENABLE_IPV6 -# else -typedef int socklen_t; -# endif /* IPPROTO_IPV6 */ -#endif /* MS_WINDOWS */ - -#ifdef HAVE_SYS_UN_H -# include -#else -# undef AF_UNIX -#endif - -#ifdef HAVE_LINUX_NETLINK_H -# ifdef HAVE_ASM_TYPES_H -# include -# endif -# include -#else -# undef AF_NETLINK -#endif - -#ifdef HAVE_BLUETOOTH_BLUETOOTH_H -/* -#include -#include -#include -#include -#include -*/ -#endif - -#ifdef HAVE_BLUETOOTH_H -#include -#endif - -#ifdef HAVE_NETPACKET_PACKET_H -# include -# include -# include -#endif - -#ifdef HAVE_LINUX_TIPC_H -# include -#endif - -#ifndef Py__SOCKET_H -#define Py__SOCKET_H -#ifdef __cplusplus -extern "C" { -#endif - -/* Python module and C API name */ -#define PySocket_MODULE_NAME "_socket" -#define PySocket_CAPI_NAME "CAPI" - -/* Abstract the socket file descriptor type */ -#ifdef MS_WINDOWS -typedef SOCKET SOCKET_T; -# ifdef MS_WIN64 -# define SIZEOF_SOCKET_T 8 -# else -# define SIZEOF_SOCKET_T 4 -# endif -#else -typedef int SOCKET_T; -# define SIZEOF_SOCKET_T SIZEOF_INT -#endif - -/* Socket address */ -typedef union sock_addr { - struct sockaddr_in in; -#ifdef AF_UNIX - struct sockaddr_un un; -#endif -#ifdef AF_NETLINK - struct sockaddr_nl nl; -#endif -#ifdef ENABLE_IPV6 - struct sockaddr_in6 in6; - struct sockaddr_storage storage; -#endif -#ifdef HAVE_BLUETOOTH_BLUETOOTH_H -/* - struct sockaddr_l2 bt_l2; - struct sockaddr_rc bt_rc; - struct sockaddr_sco bt_sco; - struct sockaddr_hci bt_hci; -*/ -#endif -#ifdef HAVE_NETPACKET_PACKET_H - struct sockaddr_ll ll; -#endif -} sock_addr_t; - -/* The object holding a socket. It holds some extra information, - like the address family, which is used to decode socket address - arguments properly. */ - -typedef struct { - PyObject_HEAD - SOCKET_T sock_fd; /* Socket file descriptor */ - int sock_family; /* Address family, e.g., AF_INET */ - int sock_type; /* Socket type, e.g., SOCK_STREAM */ - int sock_proto; /* Protocol type, usually 0 */ - PyObject *(*errorhandler)(void); /* Error handler; checks - errno, returns NULL and - sets a Python exception */ - double sock_timeout; /* Operation timeout in seconds; - 0.0 means non-blocking */ -} PySocketSockObject; - -/* --- C API ----------------------------------------------------*/ - -/* Short explanation of what this C API export mechanism does - and how it works: - - The _ssl module needs access to the type object defined in - the _socket module. Since cross-DLL linking introduces a lot of - problems on many platforms, the "trick" is to wrap the - C API of a module in a struct which then gets exported to - other modules via a PyCObject. - - The code in socketmodule.c defines this struct (which currently - only contains the type object reference, but could very - well also include other C APIs needed by other modules) - and exports it as PyCObject via the module dictionary - under the name "CAPI". - - Other modules can now include the socketmodule.h file - which defines the needed C APIs to import and set up - a static copy of this struct in the importing module. - - After initialization, the importing module can then - access the C APIs from the _socket module by simply - referring to the static struct, e.g. - - Load _socket module and its C API; this sets up the global - PySocketModule: - - if (PySocketModule_ImportModuleAndAPI()) - return; - - - Now use the C API as if it were defined in the using - module: - - if (!PyArg_ParseTuple(args, "O!|zz:ssl", - - PySocketModule.Sock_Type, - - (PyObject*)&Sock, - &key_file, &cert_file)) - return NULL; - - Support could easily be extended to export more C APIs/symbols - this way. Currently, only the type object is exported, - other candidates would be socket constructors and socket - access functions. - -*/ - -/* C API for usage by other Python modules */ -typedef struct { - PyTypeObject *Sock_Type; - PyObject *error; -} PySocketModule_APIObject; - -/* XXX The net effect of the following appears to be to define a function - XXX named PySocketModule_APIObject in _ssl.c. It's unclear why it isn't - XXX defined there directly. - - >>> It's defined here because other modules might also want to use - >>> the C API. - -*/ -#ifndef PySocket_BUILDING_SOCKET - -/* --- C API ----------------------------------------------------*/ - -/* Interfacestructure to C API for other modules. - Call PySocketModule_ImportModuleAndAPI() to initialize this - structure. After that usage is simple: - - if (!PyArg_ParseTuple(args, "O!|zz:ssl", - &PySocketModule.Sock_Type, (PyObject*)&Sock, - &key_file, &cert_file)) - return NULL; - ... -*/ - -static -PySocketModule_APIObject PySocketModule; - -/* You *must* call this before using any of the functions in - PySocketModule and check its outcome; otherwise all accesses will - result in a segfault. Returns 0 on success. */ - -#ifndef DPRINTF -# define DPRINTF if (0) printf -#endif - -static -int PySocketModule_ImportModuleAndAPI(void) -{ - PyObject *mod = 0, *v = 0; - char *apimodule = PySocket_MODULE_NAME; - char *apiname = PySocket_CAPI_NAME; - void *api; - - DPRINTF("Importing the %s C API...\n", apimodule); - mod = PyImport_ImportModuleNoBlock(apimodule); - if (mod == NULL) - goto onError; - DPRINTF(" %s package found\n", apimodule); - v = PyObject_GetAttrString(mod, apiname); - if (v == NULL) - goto onError; - Py_DECREF(mod); - DPRINTF(" API object %s found\n", apiname); - api = PyCObject_AsVoidPtr(v); - if (api == NULL) - goto onError; - Py_DECREF(v); - memcpy(&PySocketModule, api, sizeof(PySocketModule)); - DPRINTF(" API object loaded and initialized.\n"); - return 0; - - onError: - DPRINTF(" not found.\n"); - Py_XDECREF(mod); - Py_XDECREF(v); - return -1; -} - -#endif /* !PySocket_BUILDING_SOCKET */ - -#ifdef __cplusplus -} -#endif -#endif /* !Py__SOCKET_H */ diff --git a/node_modules/node-forge/tests/forge_ssl/forge/ssl.py b/node_modules/node-forge/tests/forge_ssl/forge/ssl.py deleted file mode 100644 index aa9fc147..00000000 --- a/node_modules/node-forge/tests/forge_ssl/forge/ssl.py +++ /dev/null @@ -1,486 +0,0 @@ -# Wrapper module for _ssl, providing some additional facilities -# implemented in Python. Written by Bill Janssen. - -"""\ -This module provides some more Pythonic support for SSL. - -Object types: - - SSLSocket -- subtype of socket.socket which does SSL over the socket - -Exceptions: - - SSLError -- exception raised for I/O errors - -Functions: - - cert_time_to_seconds -- convert time string used for certificate - notBefore and notAfter functions to integer - seconds past the Epoch (the time values - returned from time.time()) - - fetch_server_certificate (HOST, PORT) -- fetch the certificate provided - by the server running on HOST at port PORT. No - validation of the certificate is performed. - -Integer constants: - -SSL_ERROR_ZERO_RETURN -SSL_ERROR_WANT_READ -SSL_ERROR_WANT_WRITE -SSL_ERROR_WANT_X509_LOOKUP -SSL_ERROR_SYSCALL -SSL_ERROR_SSL -SSL_ERROR_WANT_CONNECT - -SSL_ERROR_EOF -SSL_ERROR_INVALID_ERROR_CODE - -The following group define certificate requirements that one side is -allowing/requiring from the other side: - -CERT_NONE - no certificates from the other side are required (or will - be looked at if provided) -CERT_OPTIONAL - certificates are not required, but if provided will be - validated, and if validation fails, the connection will - also fail -CERT_REQUIRED - certificates are required, and will be validated, and - if validation fails, the connection will also fail - -The following constants identify various SSL protocol variants: - -PROTOCOL_SSLv2 -PROTOCOL_SSLv3 -PROTOCOL_SSLv23 -PROTOCOL_TLSv1 - -The following constants identify various SSL session caching modes: - -SESS_CACHE_OFF -SESS_CACHE_CLIENT -SESS_CACHE_SERVER -SESS_CACHE_BOTH -""" - -import textwrap - -import _forge_ssl # if we can't import it, let the error propagate - -from _forge_ssl import SSLError -from _forge_ssl import CERT_NONE, CERT_OPTIONAL, CERT_REQUIRED -from _forge_ssl import PROTOCOL_SSLv2, PROTOCOL_SSLv3, PROTOCOL_SSLv23, PROTOCOL_TLSv1 -from _forge_ssl import SESS_CACHE_OFF, SESS_CACHE_CLIENT, SESS_CACHE_SERVER, SESS_CACHE_BOTH -from _forge_ssl import RAND_status, RAND_egd, RAND_add -from _forge_ssl import \ - SSL_ERROR_ZERO_RETURN, \ - SSL_ERROR_WANT_READ, \ - SSL_ERROR_WANT_WRITE, \ - SSL_ERROR_WANT_X509_LOOKUP, \ - SSL_ERROR_SYSCALL, \ - SSL_ERROR_SSL, \ - SSL_ERROR_WANT_CONNECT, \ - SSL_ERROR_EOF, \ - SSL_ERROR_INVALID_ERROR_CODE - -from socket import socket, _fileobject, _delegate_methods -from socket import error as socket_error -from socket import getnameinfo as _getnameinfo -import base64 # for DER-to-PEM translation -import errno - -class SSLSocket(socket): - - """This class implements a subtype of socket.socket that wraps - the underlying OS socket in an SSL context when necessary, and - provides read and write methods over that channel.""" - - def __init__(self, parent_socket, sock, keyfile=None, certfile=None, - server_side=False, cert_reqs=CERT_NONE, - ssl_version=PROTOCOL_SSLv23, - sess_cache_mode=SESS_CACHE_SERVER, - sess_id_ctx=None, - ca_certs=None, - do_handshake_on_connect=True, - suppress_ragged_eofs=True): - socket.__init__(self, _sock=sock._sock) - # The initializer for socket overrides the methods send(), recv(), etc. - # in the instancce, which we don't need -- but we want to provide the - # methods defined in SSLSocket. - for attr in _delegate_methods: - try: - delattr(self, attr) - except AttributeError: - pass - - if certfile and not keyfile: - keyfile = certfile - - create = True - connected = False - if not server_side: - # see if it's connected - try: - socket.getpeername(self) - connected = True - except socket_error, e: - if e.errno != errno.ENOTCONN: - raise - # no, no connection yet - self._sslobj = None - create = False - if create: - # yes, create the SSL object - if parent_socket == None: - self._sslobj = _forge_ssl.sslwrap( - self._sock, - server_side, - keyfile, certfile, - cert_reqs, ssl_version, - sess_cache_mode, sess_id_ctx, - ca_certs) - else: - self._sslobj = parent_socket._sslobj.wrap_accepted(self._sock) - - if connected and do_handshake_on_connect: - self.do_handshake() - self.keyfile = keyfile - self.certfile = certfile - self.cert_reqs = cert_reqs - self.ssl_version = ssl_version - self.sess_cache_mode = sess_cache_mode - self.sess_id_ctx = sess_id_ctx - self.ca_certs = ca_certs - self.do_handshake_on_connect = do_handshake_on_connect - self.suppress_ragged_eofs = suppress_ragged_eofs - self._makefile_refs = 0 - - def read(self, len=1024): - - """Read up to LEN bytes and return them. - Return zero-length string on EOF.""" - - try: - return self._sslobj.read(len) - except SSLError, x: - if x.args[0] == SSL_ERROR_EOF and self.suppress_ragged_eofs: - return '' - else: - raise - - def write(self, data): - - """Write DATA to the underlying SSL channel. Returns - number of bytes of DATA actually transmitted.""" - - return self._sslobj.write(data) - - def getpeercert(self, binary_form=False): - - """Returns a formatted version of the data in the - certificate provided by the other end of the SSL channel. - Return None if no certificate was provided, {} if a - certificate was provided, but not validated.""" - - return self._sslobj.peer_certificate(binary_form) - - def cipher(self): - - if not self._sslobj: - return None - else: - return self._sslobj.cipher() - - def send(self, data, flags=0): - if self._sslobj: - if flags != 0: - raise ValueError( - "non-zero flags not allowed in calls to send() on %s" % - self.__class__) - while True: - try: - v = self._sslobj.write(data) - except SSLError, x: - if x.args[0] == SSL_ERROR_WANT_READ: - return 0 - elif x.args[0] == SSL_ERROR_WANT_WRITE: - return 0 - else: - raise - else: - return v - else: - return socket.send(self, data, flags) - - def sendto(self, data, addr, flags=0): - if self._sslobj: - raise ValueError("sendto not allowed on instances of %s" % - self.__class__) - else: - return socket.sendto(self, data, addr, flags) - - def sendall(self, data, flags=0): - if self._sslobj: - if flags != 0: - raise ValueError( - "non-zero flags not allowed in calls to sendall() on %s" % - self.__class__) - amount = len(data) - count = 0 - while (count < amount): - v = self.send(data[count:]) - count += v - return amount - else: - return socket.sendall(self, data, flags) - - def recv(self, buflen=1024, flags=0): - if self._sslobj: - if flags != 0: - raise ValueError( - "non-zero flags not allowed in calls to recv() on %s" % - self.__class__) - return self.read(buflen) - else: - return socket.recv(self, buflen, flags) - - def recv_into(self, buffer, nbytes=None, flags=0): - if buffer and (nbytes is None): - nbytes = len(buffer) - elif nbytes is None: - nbytes = 1024 - if self._sslobj: - if flags != 0: - raise ValueError( - "non-zero flags not allowed in calls to recv_into() on %s" % - self.__class__) - tmp_buffer = self.read(nbytes) - v = len(tmp_buffer) - buffer[:v] = tmp_buffer - return v - else: - return socket.recv_into(self, buffer, nbytes, flags) - - def recvfrom(self, addr, buflen=1024, flags=0): - if self._sslobj: - raise ValueError("recvfrom not allowed on instances of %s" % - self.__class__) - else: - return socket.recvfrom(self, addr, buflen, flags) - - def recvfrom_into(self, buffer, nbytes=None, flags=0): - if self._sslobj: - raise ValueError("recvfrom_into not allowed on instances of %s" % - self.__class__) - else: - return socket.recvfrom_into(self, buffer, nbytes, flags) - - def pending(self): - if self._sslobj: - return self._sslobj.pending() - else: - return 0 - - def unwrap(self): - if self._sslobj: - try: - # if connected then shutdown - self.getpeername() - s = self._sslobj.shutdown() - except: - s = self._sock - self._sslobj = None - return s - else: - raise ValueError("No SSL wrapper around " + str(self)) - - def shutdown(self, how): - self._sslobj = None - socket.shutdown(self, how) - - def close(self): - if self._makefile_refs < 1: - if self._sslobj: - self.unwrap() - socket.close(self) - else: - self._makefile_refs -= 1 - - def do_handshake(self): - - """Perform a TLS/SSL handshake.""" - - self._sslobj.do_handshake() - - def connect(self, addr): - - """Connects to remote ADDR, and then wraps the connection in - an SSL channel.""" - - # Here we assume that the socket is client-side, and not - # connected at the time of the call. We connect it, then wrap it. - if self._sslobj: - raise ValueError("attempt to connect already-connected SSLSocket!") - socket.connect(self, addr) - self._sslobj = _forge_ssl.sslwrap(self._sock, False, - self.keyfile, self.certfile, - self.cert_reqs, self.ssl_version, - self.sess_cache_mode, - self.sess_id_ctx, - self.ca_certs) - if self.do_handshake_on_connect: - self.do_handshake() - - def accept(self): - - """Accepts a new connection from a remote client, and returns - a tuple containing that new connection wrapped with a server-side - SSL channel, and the address of the remote client.""" - - newsock, addr = socket.accept(self) - return (SSLSocket(self, - newsock, - keyfile=self.keyfile, - certfile=self.certfile, - server_side=True, - cert_reqs=self.cert_reqs, - ssl_version=self.ssl_version, - sess_cache_mode=self.sess_cache_mode, - sess_id_ctx=self.sess_id_ctx, - ca_certs=self.ca_certs, - do_handshake_on_connect=self.do_handshake_on_connect, - suppress_ragged_eofs=self.suppress_ragged_eofs), - addr) - - def makefile(self, mode='r', bufsize=-1): - - """Make and return a file-like object that - works with the SSL connection. Just use the code - from the socket module.""" - - self._makefile_refs += 1 - # close=True so as to decrement the reference count when done with - # the file-like object. - return _fileobject(self, mode, bufsize, close=True) - - - -def wrap_socket(sock, parent_socket=None, keyfile=None, certfile=None, - server_side=False, cert_reqs=CERT_NONE, - ssl_version=PROTOCOL_SSLv23, - sess_cache_mode=SESS_CACHE_SERVER, - sess_id_ctx=None, - ca_certs=None, - do_handshake_on_connect=True, - suppress_ragged_eofs=True): - - return SSLSocket(parent_socket, - sock, keyfile=keyfile, certfile=certfile, - server_side=server_side, cert_reqs=cert_reqs, - ssl_version=ssl_version, - sess_cache_mode=sess_cache_mode, - sess_id_ctx=sess_id_ctx, - ca_certs=ca_certs, - do_handshake_on_connect=do_handshake_on_connect, - suppress_ragged_eofs=suppress_ragged_eofs) - - -# some utility functions - -def cert_time_to_seconds(cert_time): - - """Takes a date-time string in standard ASN1_print form - ("MON DAY 24HOUR:MINUTE:SEC YEAR TIMEZONE") and return - a Python time value in seconds past the epoch.""" - - import time - return time.mktime(time.strptime(cert_time, "%b %d %H:%M:%S %Y GMT")) - -PEM_HEADER = "-----BEGIN CERTIFICATE-----" -PEM_FOOTER = "-----END CERTIFICATE-----" - -def DER_cert_to_PEM_cert(der_cert_bytes): - - """Takes a certificate in binary DER format and returns the - PEM version of it as a string.""" - - if hasattr(base64, 'standard_b64encode'): - # preferred because older API gets line-length wrong - f = base64.standard_b64encode(der_cert_bytes) - return (PEM_HEADER + '\n' + - textwrap.fill(f, 64) + '\n' + - PEM_FOOTER + '\n') - else: - return (PEM_HEADER + '\n' + - base64.encodestring(der_cert_bytes) + - PEM_FOOTER + '\n') - -def PEM_cert_to_DER_cert(pem_cert_string): - - """Takes a certificate in ASCII PEM format and returns the - DER-encoded version of it as a byte sequence""" - - if not pem_cert_string.startswith(PEM_HEADER): - raise ValueError("Invalid PEM encoding; must start with %s" - % PEM_HEADER) - if not pem_cert_string.strip().endswith(PEM_FOOTER): - raise ValueError("Invalid PEM encoding; must end with %s" - % PEM_FOOTER) - d = pem_cert_string.strip()[len(PEM_HEADER):-len(PEM_FOOTER)] - return base64.decodestring(d) - -def get_server_certificate(addr, ssl_version=PROTOCOL_SSLv3, ca_certs=None): - - """Retrieve the certificate from the server at the specified address, - and return it as a PEM-encoded string. - If 'ca_certs' is specified, validate the server cert against it. - If 'ssl_version' is specified, use it in the connection attempt.""" - - host, port = addr - if (ca_certs is not None): - cert_reqs = CERT_REQUIRED - else: - cert_reqs = CERT_NONE - s = wrap_socket(socket(), ssl_version=ssl_version, - cert_reqs=cert_reqs, ca_certs=ca_certs) - s.connect(addr) - dercert = s.getpeercert(True) - s.close() - return DER_cert_to_PEM_cert(dercert) - -def get_protocol_name(protocol_code): - if protocol_code == PROTOCOL_TLSv1: - return "TLSv1" - elif protocol_code == PROTOCOL_SSLv23: - return "SSLv23" - elif protocol_code == PROTOCOL_SSLv2: - return "SSLv2" - elif protocol_code == PROTOCOL_SSLv3: - return "SSLv3" - else: - return "" - - -# a replacement for the old socket.ssl function - -def sslwrap_simple(sock, keyfile=None, certfile=None): - - """A replacement for the old socket.ssl function. Designed - for compability with Python 2.5 and earlier. Will disappear in - Python 3.0.""" - - if hasattr(sock, "_sock"): - sock = sock._sock - - ssl_sock = _forge_ssl.sslwrap(sock, 0, keyfile, certfile, - CERT_NONE, PROTOCOL_SSLv23, - SESS_CACHE_SERVER, None, None) - try: - sock.getpeername() - except: - # no, no connection yet - pass - else: - # yes, do the handshake - ssl_sock.do_handshake() - - return ssl_sock diff --git a/node_modules/node-forge/tests/forge_ssl/setup.py b/node_modules/node-forge/tests/forge_ssl/setup.py deleted file mode 100644 index 350ae37e..00000000 --- a/node_modules/node-forge/tests/forge_ssl/setup.py +++ /dev/null @@ -1,12 +0,0 @@ -#!/usr/bin/env python - -from distutils.core import setup, Extension - -ssl = Extension('_forge_ssl', - sources = ['forge/_ssl.c']) - -setup (name = 'Forge SSL', - version = '1.0', - description = 'Python SSL with session cache support.', - ext_modules = [ssl], - py_modules = ['forge.ssl']) diff --git a/node_modules/node-forge/tests/form.html b/node_modules/node-forge/tests/form.html deleted file mode 100644 index cfe9f94a..00000000 --- a/node_modules/node-forge/tests/form.html +++ /dev/null @@ -1,150 +0,0 @@ - - - - - Forge Form Test - - - - - - - - - - - - - -
        -

        Form Tests

        -
        - -
        - -
        -
        - Text - -

        - - - - - - - - - - - - - -

        - -

        - - -

        - -

        - - -

        -
        - -
        - Checkbox - -

        - - - -

        - -

        - - - - - -

        - -

        - - - - -

        -
        - -
        - Radio - -

        - - - - -

        - -

        - - - - -

        -
        - -
        - Select -

        - -

        - -

        - -

        -
        - -
        - Text Area - - -
        - -
        - Buttons - -

        - - -

        -
        - -
        - Input Buttons - -

        - - -

        -
        - - -

        Result:

        -
        - -
        - - - diff --git a/node_modules/node-forge/tests/form.js b/node_modules/node-forge/tests/form.js deleted file mode 100644 index abfbab02..00000000 --- a/node_modules/node-forge/tests/form.js +++ /dev/null @@ -1,40 +0,0 @@ -/** - * Forge Form Tests - * - * @author Dave Longley - * - * Copyright (c) 2011 Digital Bazaar, Inc. All rights reserved. - */ -(function($) { -$(document).ready(function() -{ - // logging category - var cat = 'forge.tests.form'; - - // local alias - var forge = window.forge; - - $('form.ajax').each(function(i, form) - { - $(form).submit(function() - { - try - { - var f = forge.form.serialize($(this)); - forge.log.debug(cat, 'result:', JSON.stringify(f)); - $('#result').html(JSON.stringify(f)); - - /* dictionary test - var f = forge.form.serialize($(this), '.', {'username':'user'}); - forge.log.debug(cat, 'result:', JSON.stringify(f)); - */ - } - catch(e) - { - console.log('exception', e.stack); - } - return false; - }); - }); -}); -})(jQuery); diff --git a/node_modules/node-forge/tests/heartbleed.js b/node_modules/node-forge/tests/heartbleed.js deleted file mode 100644 index b38869a9..00000000 --- a/node_modules/node-forge/tests/heartbleed.js +++ /dev/null @@ -1,55 +0,0 @@ -var forge = require('../js/forge'); -var net = require('net'); - -var socket = new net.Socket(); - -var client = forge.tls.createConnection({ - server: false, - verify: function(connection, verified, depth, certs) { - // skip verification for testing - return true; - }, - connected: function(connection) { - // heartbleeds 2k - console.log('[tls] connected'); - connection.prepareHeartbeatRequest('', 2048); - setTimeout(function() { - client.close(); - }, 1000); - }, - tlsDataReady: function(connection) { - // encrypted data is ready to be sent to the server - var data = connection.tlsData.getBytes(); - socket.write(data, 'binary'); - }, - dataReady: function(connection) { - // clear data from the server is ready - var data = connection.data.getBytes(); - console.log('[tls] received from the server: ' + data); - }, - heartbeatReceived: function(c, payload) { - console.log('Heartbleed:\n' + payload.toHex()); - client.close(); - }, - closed: function() { - console.log('[tls] disconnected'); - socket.end(); - }, - error: function(connection, error) { - console.log('[tls] error', error); - } -}); - -socket.on('connect', function() { - console.log('[socket] connected'); - client.handshake(); -}); -socket.on('data', function(data) { - client.process(data.toString('binary')); -}); -socket.on('end', function() { - console.log('[socket] disconnected'); -}); - -// connect -socket.connect(443, 'yahoo.com'); diff --git a/node_modules/node-forge/tests/http.html b/node_modules/node-forge/tests/http.html deleted file mode 100644 index 3bdf9419..00000000 --- a/node_modules/node-forge/tests/http.html +++ /dev/null @@ -1,229 +0,0 @@ - - - - - - - - - - - - - - -
        -

        HTTP Test

        -
        - -
        - -
        -

        Could not load the flash SocketPool.

        -
        - -
        -
          -
        • Use the controls below to test the HTTP client.
        • -
        • You currently need a JavaScript console to view the output.
        • -
        -
        - -
        - Controls - - - - - - - - - -
        - -
        - Feedback -

        Feedback from the flash SocketPool:

        -
        - None -
        - -
        - - diff --git a/node_modules/node-forge/tests/index.html b/node_modules/node-forge/tests/index.html deleted file mode 100644 index 2e27c8a6..00000000 --- a/node_modules/node-forge/tests/index.html +++ /dev/null @@ -1,64 +0,0 @@ - - - - - - - - Forge Tests - - - -
        -

        Forge Tests

        -
        -
        -
        -
          -
        • These are various tests of the Forge JavaScript libraries.
        • -
        • Please see the code and documentation for details.
        • -
        -
        -
        - Tests - -
        - 1: Test works over HTTP
        - 2: Test works over HTTPS -
        -
        -
        - - - diff --git a/node_modules/node-forge/tests/keygen.html b/node_modules/node-forge/tests/keygen.html deleted file mode 100644 index 9c75e965..00000000 --- a/node_modules/node-forge/tests/keygen.html +++ /dev/null @@ -1,64 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/node_modules/node-forge/tests/login.css b/node_modules/node-forge/tests/login.css deleted file mode 100644 index 3a1cb058..00000000 --- a/node_modules/node-forge/tests/login.css +++ /dev/null @@ -1,26 +0,0 @@ -/* WebID CSS */ - -* { -margin: 0; -padding: 0; -} - -p { -margin: 10px 0; -} - -body { -margin: 10px; -font-family: helvetica,arial,sans-serif; -font-size: 14px; -} - -#header { -padding: 5px; -background-color: #ddf; -border: 2px solid #000; -} - -#header h1 { -font-size: 20px; -} diff --git a/node_modules/node-forge/tests/loginDemo.html b/node_modules/node-forge/tests/loginDemo.html deleted file mode 100644 index a1aecd4b..00000000 --- a/node_modules/node-forge/tests/loginDemo.html +++ /dev/null @@ -1,56 +0,0 @@ - - - - - Web ID Login - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
        -

        Please select a Web ID to log in to this website.

        - -
        - -

        Do not select an identity if you do not trust this website.

        - - -
        -

        Could not load the flash SocketPool.

        -
        -
        - - - diff --git a/node_modules/node-forge/tests/loginDemo.js b/node_modules/node-forge/tests/loginDemo.js deleted file mode 100644 index 859e1f0c..00000000 --- a/node_modules/node-forge/tests/loginDemo.js +++ /dev/null @@ -1,149 +0,0 @@ -/** - * Forge Web ID Tests - * - * @author Dave Longley - * - * Copyright (c) 2010 Digital Bazaar, Inc. All rights reserved. - */ -(function($) -{ - // load flash socket pool - window.forge.socketPool = {}; - window.forge.socketPool.ready = function() - { - // init page - init($); - }; - swfobject.embedSWF( - 'forge/SocketPool.swf', 'socketPool', '0', '0', '9.0.0', - false, {}, {allowscriptaccess: 'always'}, {}); -})(jQuery); - -var init = function($) -{ - // logging category - var cat = 'forge.tests.loginDemo'; - - // local alias - var forge = window.forge; - try - { - // get query variables - var query = forge.util.getQueryVariables(); - var domain = query.domain || ''; - var auth = query.auth || ''; - var redirect = query.redirect || ''; - var pport = query.pport || 843; - redirect = 'https://' + domain + '/' + redirect; - if(domain) - { - $('#domain').html('`' + domain + '`'); - } - - // for chosen webid - var chosen = null; - - // init forge xhr - forge.xhr.init({ - flashId: 'socketPool', - msie: $.browser.msie, - url: 'https://' + domain, - policyPort: pport, - connections: 1, - caCerts: [], - verify: function(c, verified, depth, certs) - { - // don't care about cert verification for test - return true; - }, - getCertificate: function(c) - { - forge.log.debug(cat, 'using cert', chosen.certificate); - return chosen.certificate; - }, - getPrivateKey: function(c) - { - //forge.log.debug(cat, 'using private key', chosen.privateKey); - return chosen.privateKey; - } - }); - - // get flash API - var flashApi = document.getElementById('socketPool'); - - // get web ids collection - var webids = forge.util.getItem( - flashApi, 'forge.test.webid', 'webids'); - webids = webids || {}; - - var id = 0; - var list = $('
          '); - for(var key in webids) - { - (function(webid) - { - var cert = forge.pki.certificateFromPem(webid.certificate); - var item = $('
        • '); - var button = $(' - -
      - -
      - - -
      -
      - - -
      -
      - - - -
      -
      - - -
      - - - - diff --git a/node_modules/node-forge/tests/policyserver.py b/node_modules/node-forge/tests/policyserver.py deleted file mode 100755 index bda8afe5..00000000 --- a/node_modules/node-forge/tests/policyserver.py +++ /dev/null @@ -1,112 +0,0 @@ -#!/usr/bin/env python - -""" -Flash Socket Policy Server. - -- Starts Flash socket policy file server. -- Defaults to port 843. -- NOTE: Most operating systems require administrative privileges to use - ports under 1024. - - $ ./policyserver.py [options] -""" - -""" -Also consider Adobe's solutions: -http://www.adobe.com/devnet/flashplayer/articles/socket_policy_files.html -""" - -from multiprocessing import Process -from optparse import OptionParser -import SocketServer -import logging - -# Set address reuse for all TCPServers -SocketServer.TCPServer.allow_reuse_address = True - -# Static socket policy file string. -# NOTE: This format is very strict. Edit with care. -socket_policy_file = """\ -\ -\ -\ -\ -\0""" - - -class PolicyHandler(SocketServer.BaseRequestHandler): - """ - The RequestHandler class for our server. - - Returns a policy file when requested. - """ - - def handle(self): - """Send policy string if proper request string is received.""" - # get some data - # TODO: make this more robust (while loop, etc) - self.data = self.request.recv(1024).rstrip('\0') - logging.debug("%s wrote:%s" % (self.client_address[0], repr(self.data))) - # if policy file request, send the file. - if self.data == "": - logging.info("Policy server request from %s." % (self.client_address[0])) - self.request.send(socket_policy_file) - else: - logging.info("Policy server received junk from %s: \"%s\"" % \ - (self.client_address[0], repr(self.data))) - - -class ThreadedTCPServer(SocketServer.ThreadingMixIn, SocketServer.TCPServer): - def serve_forever(self): - """Handle one request at a time until shutdown or keyboard interrupt.""" - try: - SocketServer.BaseServer.serve_forever(self) - except KeyboardInterrupt: - return - - -def main(): - """Run socket policy file servers.""" - usage = "Usage: %prog [options]" - parser = OptionParser(usage=usage) - parser.add_option("", "--host", dest="host", metavar="HOST", - default="localhost", help="bind to HOST") - parser.add_option("-p", "--port", dest="port", metavar="PORT", - default=843, type="int", help="serve on PORT") - parser.add_option("-d", "--debug", dest="debug", action="store_true", - default=False, help="debugging output") - parser.add_option("-v", "--verbose", dest="verbose", action="store_true", - default=False, help="verbose output") - (options, args) = parser.parse_args() - - # setup logging - if options.debug: - lvl = logging.DEBUG - elif options.verbose: - lvl = logging.INFO - else: - lvl = logging.WARNING - logging.basicConfig(level=lvl, format="%(levelname)-8s %(message)s") - - # log basic info - logging.info("Flash Socket Policy Server. Use ctrl-c to exit.") - - # create policy server - logging.info("Socket policy serving on %s:%d." % (options.host, options.port)) - policyd = ThreadedTCPServer((options.host, options.port), PolicyHandler) - - # start server - policy_p = Process(target=policyd.serve_forever) - policy_p.start() - - while policy_p.is_alive(): - try: - policy_p.join(1) - except KeyboardInterrupt: - logging.info("Stopping test server...") - - -if __name__ == "__main__": - main() - diff --git a/node_modules/node-forge/tests/result.txt b/node_modules/node-forge/tests/result.txt deleted file mode 100644 index 7cb007c8..00000000 --- a/node_modules/node-forge/tests/result.txt +++ /dev/null @@ -1 +0,0 @@ -expected result diff --git a/node_modules/node-forge/tests/screen.css b/node_modules/node-forge/tests/screen.css deleted file mode 100644 index 365a39f7..00000000 --- a/node_modules/node-forge/tests/screen.css +++ /dev/null @@ -1,61 +0,0 @@ -/* CSS for Forge tests */ -body { - background: white; - color: black; - margin: 0; - padding: 0; -} -.warning { - border: thin solid red; - background: #7FF; -} -div.nav { - background: white; - border-bottom: thin solid black; - padding: .5em; - padding-top: .2em; - padding-bottom: .2em; -} -div.header { - border-bottom: thin solid black; - padding: .5em; -} -div.content { - padding: .5em; - background: #DDD; -} -div.footer { - border-top: thin solid black; - font-size: 80%; - padding: .5em; -} -canvas { - background: black; -} -table, td, th { - border: thin solid black; - border-collapse: collapse; -} -td, th { - padding: .2em; -} -span.sp-state-on { - font-weight: bold; -} -table#feedback { - width: 100%; -} -table#feedback th, table#feedback td { - width: 33%; -} -fieldset.section { - margin: .5em; - border: 2px solid black; - background: #FFF; -} -fieldset.section legend { - padding: .2em; - border: 2px solid black; - background: #DDF; - font-weight: bold; -} diff --git a/node_modules/node-forge/tests/server.crt b/node_modules/node-forge/tests/server.crt deleted file mode 100644 index 6952426a..00000000 --- a/node_modules/node-forge/tests/server.crt +++ /dev/null @@ -1,26 +0,0 @@ ------BEGIN CERTIFICATE----- -MIIEaDCCA1CgAwIBAgIJAJuj0AjEWncuMA0GCSqGSIb3DQEBBQUAMH8xCzAJBgNV -BAYTAlVTMREwDwYDVQQIEwhWaXJnaW5pYTETMBEGA1UEBxMKQmxhY2tzYnVyZzEd -MBsGA1UEChMURGlnaXRhbCBCYXphYXIsIEluYy4xGjAYBgNVBAsTEUZvcmdlIFRl -c3QgU2VydmVyMQ0wCwYDVQQDEwR0ZXN0MB4XDTEwMDcxMzE3MjAzN1oXDTMwMDcw -ODE3MjAzN1owfzELMAkGA1UEBhMCVVMxETAPBgNVBAgTCFZpcmdpbmlhMRMwEQYD -VQQHEwpCbGFja3NidXJnMR0wGwYDVQQKExREaWdpdGFsIEJhemFhciwgSW5jLjEa -MBgGA1UECxMRRm9yZ2UgVGVzdCBTZXJ2ZXIxDTALBgNVBAMTBHRlc3QwggEiMA0G -CSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCm/FobjqK8CVP/Xbnpyhf1tpoyaiFf -ShUOmlWqL5rLe0Q0dDR/Zur+sLMUv/1T4wOfFkjjxvZ0Sk5NIjK3Wy2UA41a+M3J -RTbCFrg4ujsovFaD4CDmV7Rek0qJB3m5Gp7hgu5vfL/v+WrwxnQObNq+IrTMSA15 -cO4LzNIPj9K1LN2dB+ucT7xTQFHAfvLLgLlCLiberoabF4rEhgTMTbmMtFVKSt+P -xgQIYPnhw1WuAvE9hFesRQFdfARLqIZk92FeHkgtHv9BAunktJemcidbowTCTBaM -/njcgi1Tei/LFkph/FCVyGER0pekJNHX626bAQSLo/srsWfmcll9rK6bAgMBAAGj -geYwgeMwHQYDVR0OBBYEFCau5k6jxezjULlLuo/liswJlBF8MIGzBgNVHSMEgasw -gaiAFCau5k6jxezjULlLuo/liswJlBF8oYGEpIGBMH8xCzAJBgNVBAYTAlVTMREw -DwYDVQQIEwhWaXJnaW5pYTETMBEGA1UEBxMKQmxhY2tzYnVyZzEdMBsGA1UEChMU -RGlnaXRhbCBCYXphYXIsIEluYy4xGjAYBgNVBAsTEUZvcmdlIFRlc3QgU2VydmVy -MQ0wCwYDVQQDEwR0ZXN0ggkAm6PQCMRady4wDAYDVR0TBAUwAwEB/zANBgkqhkiG -9w0BAQUFAAOCAQEAnP/2mzFWaoGx6+KAfY8pcgnF48IoyKPx5cAQyzpMo+uRwrln -INcDGwNx6p6rkjFbK27TME9ReCk+xQuVGaKOtqErKECXWDtD+0M35noyaOwWIFu2 -7gPZ0uGJ1n9ZMe/S9yZmmusaIrc66rX4o+fslUlH0g3SrH7yf83M8aOC2pEyCsG0 -mNNfwSFWfmu+1GMRHXJQ/qT8qBX8ZPhzRY2BAS6vr+eh3gwXR6yXLA8Xm1+e+iDU -gGTQoYkixDIL2nhvd4AFFlE977BiE+0sMS1eJKUUbQ36MLAWb5oOZKHrphEvqMKA -eGDO3qoDqB5TkZC3x38DXBDvAZ01d9s0fvveag== ------END CERTIFICATE----- diff --git a/node_modules/node-forge/tests/server.key b/node_modules/node-forge/tests/server.key deleted file mode 100644 index 40240976..00000000 --- a/node_modules/node-forge/tests/server.key +++ /dev/null @@ -1,27 +0,0 @@ ------BEGIN RSA PRIVATE KEY----- -MIIEowIBAAKCAQEApvxaG46ivAlT/1256coX9baaMmohX0oVDppVqi+ay3tENHQ0 -f2bq/rCzFL/9U+MDnxZI48b2dEpOTSIyt1stlAONWvjNyUU2wha4OLo7KLxWg+Ag -5le0XpNKiQd5uRqe4YLub3y/7/lq8MZ0DmzaviK0zEgNeXDuC8zSD4/StSzdnQfr -nE+8U0BRwH7yy4C5Qi4m3q6GmxeKxIYEzE25jLRVSkrfj8YECGD54cNVrgLxPYRX -rEUBXXwES6iGZPdhXh5ILR7/QQLp5LSXpnInW6MEwkwWjP543IItU3ovyxZKYfxQ -lchhEdKXpCTR1+tumwEEi6P7K7Fn5nJZfayumwIDAQABAoIBAFGPbEuNbXq+a6KN -GuNP7Ef9em8pW0d5nbNWOoU3XzoH6RZds86ObDUeBTobVBaHCRvI/K0UXwgJyxjt -nSvlguuKmJ5Ya9rkzYwbILvEamTJKNCcxjT7nYOcGYm4dwGsOPIYy3D006LYhh04 -MTNig6zessQcZUhtmjd1QRyMuPP4PaWVO79ic01jxZR/ip6tN/FjCYclPRi/FRi8 -bQVuGEVLW2qHgQbDKPpcXFyFjIqt7c9dL97/3eeIDp+SgdQ6bPi80J7v9p2MRyBP -7OPhX8ZDsAiZr4G4N0EbEzmWWpVSjAI3Nlmk8SLT4lu42KKyoZLtuKPjEOVI3/TR -0ktsc/ECgYEA27AHLnsv07Yqe7Z2bmv+GP8PKlwrPSHwqU/3Z5/1V590N+jo15N4 -lb7gvBUwwvXIxQQQVYJqRimqNQYVfT6+xRtQdtdqInxv2hvhc/cKPEiIHNpRh7OI -w7I59yNMlCnqLeRBiCOmd7ruCWoMGw+VLhsyArwUTXuqUK2oYN9qWm8CgYEAwpZF -XNm8xCFa+YeqP+WQzwK/0yUxHmYZs7ofh9ZIgHtqwHNKO/OA8+nGsZBaIl5xiyT4 -uZ/qZi2EkYzOmx0iSathiWQpSyc9kB+nOTdMHyhBOj8CgbTRRXIMjDQ6bz78Z09F -Nxenhwk2gSVr3oB2FG/BWc1rlmVlmGJIIX3QtJUCgYBfLhLOdpywExqw4srI6Iz8 -c3U0mx44rD3CfVzpTopTXkhR+Nz4mXIDHuHrWxr3PNmxUiNpiMlWgLK3ql0hGFA6 -wazI8GeRbWxgiPfS8FNE7v/Z0FTGgGhesRcgFfEVuFs3as9hlmCHOzvqZEG+b6/o -e+vc93OsZknSDosG/YTsjQKBgHrb7HGinLftI4a3rLvpU1QRNVK4gdnit0muM6hN -mLtesVlPschGh935ddW5Ad//Z4tmTZDOMm5PQQuxLuXrMDH5fn0D+7qSzSEJi0jp -7Csj/IMtM4T3yMYjK17+vwJsb2s/NsGBMupk28ARA5mZ3HQs15S+ybZM0Se0rjxP -Nw49AoGBAKrLTOtZta0DSGt7tURwQK1mERuGM8ZZdXjvIVTJIIknohD2u3/T+O4+ -ekFTUd6GQKOFd/hZ52t4wcRs7c7KE1Xen7vRHc8c6c3TkF9ldpLmK2AWT8WifQO6 -9Fjx2Wf8HM+CbrokQYH/OHSV9Xft8BRTOPHGUJlp1UsYikSwp4fW ------END RSA PRIVATE KEY----- diff --git a/node_modules/node-forge/tests/server.py b/node_modules/node-forge/tests/server.py deleted file mode 100755 index b5a5f06c..00000000 --- a/node_modules/node-forge/tests/server.py +++ /dev/null @@ -1,184 +0,0 @@ -#!/usr/bin/env python - -""" -SSL server for Forge tests. - -- The server changes to the directory of the server script. -- SSL uses "server.key" and "server.crt". -- Sever performs basic static file serving. -- Starts Flash cross domain policy file server. -- Defaults to HTTP/HTTPS port 19400. -- Defaults to Flash socket policy port 19945. - - $ ./server.py [options] - -If you just need a simple HTTP server, also consider: - $ python -m SimpleHTTPServer 19400 -""" - -from multiprocessing import Process -from optparse import OptionParser -import SimpleHTTPServer -import SocketServer -import os -import sys -import time - -# Try to import special Forge SSL module with session cache support -# Using the built directory directly -python_version = "python" + sys.version[:3] -sys.path.insert(0, os.path.join( - os.path.dirname(os.path.realpath(__file__)), - "..", "dist", "forge_ssl", "lib", python_version, "site-packages")) -try: - from forge import ssl - have_ssl_sessions = True - have_ssl = True -except ImportError: - have_ssl_sessions = False - try: - import ssl - have_ssl = True - except ImportError: - have_ssl = False - -# Set address reuse for all TCPServers -SocketServer.TCPServer.allow_reuse_address = True - -# The policy file -# NOTE: This format is very strict. Edit with care. -policy_file = """\ -\ -\ -\ -\ -\0""" - - -class PolicyHandler(SocketServer.BaseRequestHandler): - """ - The RequestHandler class for our server. - - Returns a policy file when requested. - """ - - def handle(self): - # get some data - # TODO: make this more robust (while loop, etc) - self.data = self.request.recv(1024).rstrip('\0') - #print "%s wrote:" % self.client_address[0] - #print repr(self.data) - # if policy file request, send the file. - if self.data == "": - print "Policy server request from %s." % (self.client_address[0]) - self.request.send(policy_file) - else: - print "Policy server received junk from %s: \"%s\"" % \ - (self.client_address[0], repr(self.data)) - - -def create_policy_server(options): - """Start a policy server""" - print "Policy serving from %d." % (options.policy_port) - policyd = SocketServer.TCPServer((options.host, options.policy_port), PolicyHandler) - return policyd - - -class ThreadedTCPServer(SocketServer.ThreadingMixIn, SocketServer.TCPServer): - pass - - -def create_http_server(options, script_dir): - """Start a static file server""" - # use UTF-8 encoding for javascript files - m = SimpleHTTPServer.SimpleHTTPRequestHandler.extensions_map - m['.js'] = 'application/javascript;charset=UTF-8' - - Handler = SimpleHTTPServer.SimpleHTTPRequestHandler -# httpd = SocketServer.TCPServer((options.host, options.port), Handler) - httpd = ThreadedTCPServer((options.host, options.port), Handler) - if options.tls: - if not have_ssl: - raise Exception("SSL support from Python 2.7 or later is required.") - - # setup session args if we session support - sess_args = {} - if have_ssl_sessions: - sess_args["sess_id_ctx"] = "forgetest" - else: - print "Forge SSL with session cache not available, using standard version." - - httpd.socket = ssl.wrap_socket( - httpd.socket, - keyfile="server.key", - certfile="server.crt", - server_side=True, - **sess_args) - - print "Serving from \"%s\"." % (script_dir) - print "%s://%s:%d/" % \ - (("https" if options.tls else "http"), - httpd.server_address[0], - options.port) - return httpd - - -def serve_forever(server): - """Serve until shutdown or keyboard interrupt.""" - try: - server.serve_forever() - except KeyboardInterrupt: - return - - -def main(): - """Start static file and policy servers""" - usage = "Usage: %prog [options]" - parser = OptionParser(usage=usage) - parser.add_option("", "--host", dest="host", metavar="HOST", - default="localhost", help="bind to HOST") - parser.add_option("-p", "--port", dest="port", type="int", - help="serve on PORT", metavar="PORT", default=19400) - parser.add_option("-P", "--policy-port", dest="policy_port", type="int", - help="serve policy file on PORT", metavar="PORT", default=19945) - parser.add_option("", "--tls", dest="tls", action="store_true", - help="serve HTTPS", default=False) - (options, args) = parser.parse_args() - - # Change to script dir so SSL and test files are in current dir. - script_dir = os.path.dirname(os.path.realpath(__file__)) - os.chdir(script_dir) - - print "Forge Test Server. Use ctrl-c to exit." - - # create policy and http servers - httpd = create_http_server(options, script_dir) - policyd = create_policy_server(options) - - # start servers - server_p = Process(target=serve_forever, args=(httpd,)) - policy_p = Process(target=serve_forever, args=(policyd,)) - server_p.start() - policy_p.start() - - processes = [server_p, policy_p] - - while len(processes) > 0: - try: - for p in processes: - if p.is_alive(): - p.join(1) - else: - processes.remove(p) - except KeyboardInterrupt: - print "\nStopping test server..." - # processes each receive interrupt - # so no need to shutdown - #httpd.shutdown(); - #policyd.shutdown(); - - -if __name__ == "__main__": - main() - diff --git a/node_modules/node-forge/tests/socketPool.html b/node_modules/node-forge/tests/socketPool.html deleted file mode 100644 index 33a095f2..00000000 --- a/node_modules/node-forge/tests/socketPool.html +++ /dev/null @@ -1,299 +0,0 @@ - - - - - - - - - - - - - - - -
      -

      SocketPool Test

      -
      - -
      - -
      -

      Could not load the flash SocketPool.

      -
      - -
      -
        -
      • This page tests a single socket connection to the local test server.
      • -
      • Note that the selected server must serve a Flash cross-domain policy file on the selected policy port.
      • -
      • Additional output available in the JavaScript console.
      • -
      -
      - -
      - State -

      State: - Ready » - Initialized » - Created » - Connected -

      -
      - -
      - Controls -
      -
      - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      ActionDescription
      Initialize SocketPool system.
      Cleanup SocketPool system.
      Create a new test socket.
      Destroy the test socket.
      Connect the socket to - host: - port: - policy port: -
      Check if socket is connected.
      Send a GET request for - path: -
      Close the test socket.
      - - - -
      - Feedback - - - - - - -
      UserSocketPoolSocket
      -
      - - - diff --git a/node_modules/node-forge/tests/tasks.html b/node_modules/node-forge/tests/tasks.html deleted file mode 100644 index eba0173b..00000000 --- a/node_modules/node-forge/tests/tasks.html +++ /dev/null @@ -1,53 +0,0 @@ - - - - - Forge Tasks Test - - - - - - - - - - - - -
      -

      Task Tests

      -
      - -
      - -
      -Control - - -
      - Scroll Tests -
      - -
      -Progress -Status: ?
      -Pass: ?/?
      -Fail: ? -
      - -
      -Tests -
      -
      - -
      - - - diff --git a/node_modules/node-forge/tests/tasks.js b/node_modules/node-forge/tests/tasks.js deleted file mode 100644 index dd3ffde9..00000000 --- a/node_modules/node-forge/tests/tasks.js +++ /dev/null @@ -1,378 +0,0 @@ -/** - * Forge Tasks Test - * - * @author David I. Lehn - * - * Copyright (c) 2009-2010 Digital Bazaar, Inc. All rights reserved. - */ -jQuery(function($) -{ - var cat = 'forge.tests.tasks'; - - var tests = []; - var passed = 0; - var failed = 0; - - var init = function() { - passed = failed = 0; - $('.ready,.testing,.pass,.fail') - .removeClass('ready testing pass fail'); - $('#status') - .text('Ready.') - .addClass('ready'); - $('#total').text(tests.length); - $('#pass').text(passed); - $('#fail').text(failed); - $('.expect').empty(); - $('.result').empty(); - $('.time').empty(); - $('#start').removeAttr('disabled'); - }; - - var start = function() - { - $('#start').attr('disabled', 'disabled'); - // meta! use tasks to run the task tests - forge.task.start({ - type: 'test', - run: function(task) { - task.next('starting', function(task) { - forge.log.debug(cat, 'start'); - $('#status') - .text('Testing...') - .addClass('testing') - .removeClass('idle'); - }); - $.each(tests, function(i, test) { - task.next('test', function(task) { - var title = $('li:first', test.container); - if($('#scroll:checked').length === 1) - { - $('html,body').animate({scrollTop: title.offset().top}); - } - title.addClass('testing'); - test.run(task, test); - }); - task.next('test', function(task) { - $('li:first', test.container).removeClass('testing'); - }); - }); - task.next('success', function(task) { - forge.log.debug(cat, 'done'); - if(failed === 0) { - $('#status') - .text('PASS') - .addClass('pass') - .removeClass('testing'); - } else { - // FIXME: should just be hitting failure() below - $('#status') - .text('FAIL') - .addClass('fail') - .removeClass('testing'); - } - }); - }, - failure: function() { - $('#status') - .text('FAIL') - .addClass('fail') - .removeClass('testing'); - } - }); - }; - - $('#start').click(function() { - start(); - }); - - $('#reset').click(function() { - init(); - }); - - var addTest = function(name, run) - { - var container = $('
      • Test ' + name + '
        • '); - var expect = $('
        • Expect:
        • '); - var result = $('
        • Result:
        • '); - var time = $('
        • Time:
        • '); - $('ul', container).append(expect).append(result).append(time); - $('#tests').append(container); - var test = { - container: container, - startTime: null, - run: function(task, test) { - test.startTime = new Date(); - run(task, test); - }, - expect: $('span', expect), - result: $('span', result), - check: function() { - var e = test.expect.text(); - var r = test.result.text(); - (e == r) ? test.pass() : test.fail(); - }, - pass: function() { - passed += 1; - $('#pass').text(passed); - $('li:first', container).addClass('pass'); - var dt = new Date() - test.startTime; - $('span.time', container).html(dt); - }, - fail: function() { - failed += 1; - $('#fail').text(failed); - $('li:first', container).addClass('fail'); - var dt = new Date() - test.startTime; - $('span.time', container).html(dt); - } - }; - tests.push(test); - }; - - addTest('pass', function(task, test) { - test.pass(); - }); - - addTest('check', function(task, test) { - test.check(); - }); - - addTest('task 1', function(task, test) { - task.next(function(task) { - test.pass(); - }); - }); - - addTest('task check()', function(task, test) { - test.expect.append('check'); - task.next(function(task) { - test.result.append('check'); - }); - task.next(function(task) { - test.check(); - }); - }); - - addTest('serial 20', function(task, test) { - // total - var n = 20; - // counter used in the tasks - var taskn = 0; - for(var i = 0; i < n; ++i) { - test.expect.append(i + ' '); - task.next(function(task) { - test.result.append(taskn++ + ' '); - }); - } - task.next(function(task) { - test.check(); - }); - }); - - addTest('ajax block', function(task, test) { - test.expect.append('.'); - task.next(function(task) { - task.parent.block(); - $.ajax({ - type: 'GET', - url: 'tasks.html', - success: function() { - test.result.append('.'); - task.parent.unblock(); - } - }); - }); - task.next(function(task) { - test.check(); - }); - }); - - addTest('serial ajax', function(task, test) { - var n = 10; - for(var i = 0; i < n; ++i) - { - test.expect.append(i + ' '); - } - task.next(function(task) { - // create parallel functions - task.parent.block(n); - for(var i = 0; i < n; ++i) - { - // pass value into closure - (function(i) - { - // serial tasks - task.next(function(ajaxTask) - { - $.ajax({ - type: 'GET', - url: 'tasks.html', - success: function() { - // results use top level task - test.result.append(i + ' '); - task.parent.unblock(); - } - }); - }); - })(i); - } - }); - task.next(function(task) { - test.check(); - }); - }); - - addTest('parallel ajax', function(task, test) { - task.next(function(task) { - var n = 10; - // create parallel functions - var tasks = []; - for(var i = 0; i < n; ++i) - { - // pass value into closure - (function(i) - { - tasks.push(function(ajaxTask) - { - $.ajax({ - type: 'GET', - url: 'tasks.html', - success: function() { - // results use top level task - test.result.append(i + ' '); - } - }); - }); - })(i); - } - // launch in parallel - task.parallel(tasks); - }); - task.next(function(task) { - test.pass(); - }); - }); - - addTest('linear empty tasks rate', function(task, test) { - test.expect.append('-'); - // total - var n = 100; - var start = new Date(); - for(var i = 0; i < n; ++i) { - // empty task - task.next(function(task) {}); - } - task.next(function(task) { - var dt = (new Date() - start) / 1000; - var res = $('
            ') - .append('
          • Tasks: ' + n + '
          • ') - .append('
          • Time: ' + dt + 's
          • ') - .append('
          • Rate: ' + n/dt + ' tasks/s
          • ') - .append('
          • Task Time: ' + 1000*dt/n + ' ms/tasks
          • '); - test.result.html(res); - test.pass(); - }); - }); - - addTest('sleep', function(task, test) { - test.expect.append('-'); - var st = 1000; - var start = new Date(); - task.next(function(task) { - task.sleep(st); - }); - task.next(function(task) { - var dt = new Date() - start; - var res = $('
              ') - .append('
            • Sleep Time : ' + st + 'ms
            • ') - .append('
            • Real Time: ' + dt + 'ms
            • ') - .append('
            • Diff: ' + (dt-st) + 'ms
            • '); - test.result.html(res); - test.pass(); - }); - }); - - addTest('serial 20 + sleep', function(task, test) { - // total - var n = 20; - // counter used in the tasks - var taskn = 0; - for(var i = 0; i < n; ++i) { - test.expect.append(i + ' '); - task.next(function(task) { - task.sleep(20); - test.result.append(taskn++ + ' '); - }); - } - task.next(function(task) { - test.check(); - }); - }); - - addTest('concurrent tasks', function(task, test) - { - var colors = [ - 'red', - 'green', - 'blue', - 'black', - 'purple', - 'goldenrod', - 'maroon', - 'gray', - 'teal', - 'magenta' - ]; - var count = colors.length; - task.next(function(task) - { - var main = task; - task.block(count); - - var tasks = []; - for(var i = 0; i < count; ++i) - { - var makefunction = function(index) - { - return function(task) - { - // total - var n = 20; - // counter used in the tasks - var taskn = 0; - for(var j = 0; j < n; j++) - { - task.next(function(task) - { - test.result.append( - '' + - taskn++ + ' '); - }); - } - task.next(function(task) - { - main.unblock(); - }); - }; - }; - tasks.push( - { - type: 'concurrent' + i, - run: makefunction(i) - }); - } - - for(var i = 0; i < count; ++i) - { - forge.task.start(tasks[i]); - } - }); - - task.next(function(task) { - test.pass(); - }); - }); - - init(); -}); diff --git a/node_modules/node-forge/tests/tls.html b/node_modules/node-forge/tests/tls.html deleted file mode 100644 index 92501b8d..00000000 --- a/node_modules/node-forge/tests/tls.html +++ /dev/null @@ -1,426 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
              -

              TLS Test

              -
              - -
              - - -
              -

              Could not load the flash SocketPool.

              -
              - -
              -
                -
              • Use the controls below to test the HTTP client over TLS.
              • -
              • You currently need a JavaScript console to view the output.
              • -
              • This test connects to a TLS server so you must have one running. The easiest way to run this test is to start the test server with --tls and load this page over HTTPS.
              • -
              -
              - -
              - Controls -
              - - - - - - - - - - -
              -
              - -
              - Feedback -

              Feedback from the flash SocketPool:

              -
              - None -
              -
              - -
              - - diff --git a/node_modules/node-forge/tests/webid.html b/node_modules/node-forge/tests/webid.html deleted file mode 100644 index 8c8d795b..00000000 --- a/node_modules/node-forge/tests/webid.html +++ /dev/null @@ -1,110 +0,0 @@ - - - - - Web ID Test - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
              -

              Web ID Tests

              -
              - -
              - - -
              -

              Could not load the flash SocketPool.

              -
              - -
              -
                -
              • Use the controls below to test Web ID.
              • -
              • Use 512 bits or less on slower JavaScript implementations.
              • -
              -
              - -
              -Control - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
              Bits
              URI
              Common Name
                
                
              URI
              -
              - -
              -Progress -
              -
              - -
              -Available Web IDs -
              -
              - -
              - - diff --git a/node_modules/node-forge/tests/webid.js b/node_modules/node-forge/tests/webid.js deleted file mode 100644 index 7c07ab97..00000000 --- a/node_modules/node-forge/tests/webid.js +++ /dev/null @@ -1,313 +0,0 @@ -/** - * Forge Web ID Tests - * - * @author Dave Longley - * - * Copyright (c) 2010 Digital Bazaar, Inc. All rights reserved. - */ -(function($) -{ - // load flash socket pool - window.forge.socketPool = {}; - window.forge.socketPool.ready = function() - { - // init forge xhr - forge.xhr.init({ - flashId: 'socketPool', - policyPort: 19945, - msie: $.browser.msie, - connections: 10, - caCerts: [], - verify: function(c, verified, depth, certs) - { - // don't care about cert verification for test - return true; - } - }); - }; - swfobject.embedSWF( - 'forge/SocketPool.swf', 'socketPool', '0', '0', '9.0.0', - false, {}, {allowscriptaccess: 'always'}, {}); -})(jQuery); - -jQuery(function($) -{ - var cat = 'forge.tests.webid'; - - // local alias - var forge = window.forge; - - $('#create').click(function() - { - var bits = $('#bits')[0].value; - var uri = $('#uri')[0].value; - var commonName = $('#commonName')[0].value; - forge.log.debug(cat, 'generating ' + bits + - '-bit RSA key-pair and certificate...'); - - // function to create cert - var createCert = function(keys) - { - try - { - var cert = forge.pki.createCertificate(); - cert.serialNumber = '01'; - cert.validity.notBefore = new Date(); - cert.validity.notAfter = new Date(); - cert.validity.notAfter.setFullYear( - cert.validity.notBefore.getFullYear() + 1); - var attrs = [{ - name: 'commonName', - value: commonName - }, { - name: 'countryName', - value: 'US' - }, { - shortName: 'ST', - value: 'Virginia' - }, { - name: 'localityName', - value: 'Blacksburg' - }, { - name: 'organizationName', - value: 'Test' - }, { - shortName: 'OU', - value: 'Test' - }]; - cert.setSubject(attrs); - cert.setIssuer(attrs); - cert.setExtensions([{ - name: 'basicConstraints', - cA: true - }, { - name: 'keyUsage', - keyCertSign: true, - digitalSignature: true, - nonRepudiation: true, - keyEncipherment: true, - dataEncipherment: true - }, { - name: 'subjectAltName', - altNames: [{ - type: 6, // URI - value: uri - }] - }]); - // FIXME: add subjectKeyIdentifier extension - // FIXME: add authorityKeyIdentifier extension - cert.publicKey = keys.publicKey; - - // self-sign certificate - cert.sign(keys.privateKey); - - // verify certificate - forge.log.debug('verified', cert.verify(cert)); - - forge.log.debug(cat, 'certificate:', cert); - //forge.log.debug(cat, - // forge.asn1.prettyPrint(forge.pki.certificateToAsn1(cert))); - var keyPem = forge.pki.privateKeyToPem(keys.privateKey); - var certPem = forge.pki.certificateToPem(cert); - forge.log.debug(cat, keyPem); - forge.log.debug(cat, certPem); - - forge.log.debug(cat, 'storing certificate and private key...'); - try - { - // get flash API - var flashApi = document.getElementById('socketPool'); - - // get web ids collection - var webids = forge.util.getItem( - flashApi, 'forge.test.webid', 'webids'); - webids = webids || {}; - - // add web id - webids[uri] = { - certificate: certPem, - privateKey: keyPem - }; - - // update web ids collection - forge.util.setItem( - flashApi, 'forge.test.webid', 'webids', webids); - - forge.log.debug(cat, 'certificate and private key stored'); - $('#show').click(); - } - catch(ex) - { - forge.log.error(cat, ex); - } - } - catch(ex) - { - forge.log.error(cat, ex, ex.message ? ex.message : ''); - } - }; - - // create key-generation state and function to step algorithm - var progress = $('#progress'); - progress.html('Generating ' + bits + '-bit key-pair.'); - var state = forge.pki.rsa.createKeyPairGenerationState(bits); - var kgTime = +new Date(); - var step = function() - { - // step key-generation - if(!forge.pki.rsa.stepKeyPairGenerationState(state, 1000)) - { - progress.html(progress.html() + '.'); - setTimeout(step, 1); - } - // key-generation complete - else - { - kgTime = +new Date() - kgTime; - forge.log.debug(cat, 'Total key-gen time', kgTime + 'ms'); - createCert(state.keys); - progress.html(progress.html() + 'done. Time=' + kgTime + 'ms'); - } - }; - - // run key-gen algorithm - setTimeout(step, 0); - }); - - $('#show').click(function() - { - forge.log.debug(cat, 'get stored web IDs...'); - try - { - // get flash API - var flashApi = document.getElementById('socketPool'); - - // get web ids collection - var webids = forge.util.getItem( - flashApi, 'forge.test.webid', 'webids'); - webids = webids || {}; - - var html = '
                '; - var webid, cert; - for(var key in webids) - { - webid = webids[key]; - cert = forge.pki.certificateFromPem(webid.certificate); - html += '
              • ' + key + '

                '; - - var attr; - for(var n = 0; n < cert.subject.attributes.length; ++n) - { - attr = cert.subject.attributes[n]; - html += attr.name + ': ' + attr.value + '
                '; - } - - //html += '

                ' + webid.certificate + '

              • '; - html += ''; - } - if(html === '
                  ') - { - html = 'None'; - } - else - { - html += '
                '; - } - - $('#webids').html(html); - - forge.log.debug(cat, 'Web IDs retrieved'); - } - catch(ex) - { - forge.log.error(cat, ex); - } - }); - - $('#clear').click(function() - { - forge.log.debug(cat, 'clearing all web IDs...'); - try - { - // get flash API - var flashApi = document.getElementById('socketPool'); - forge.util.clearItems(flashApi, 'forge.test.webid'); - $('#webids').html('None'); - forge.log.debug(cat, 'Web IDs cleared'); - } - catch(ex) - { - forge.log.error(cat, ex); - } - }); - - $('#authenticate').click(function() - { - forge.log.debug(cat, 'doing Web ID authentication...'); - - try - { - // get flash API - var flashApi = document.getElementById('socketPool'); - - // get web ids collection - var webids = forge.util.getItem( - flashApi, 'forge.test.webid', 'webids'); - webids = webids || {}; - - var uri = $('#webid')[0].value; - var webid = webids[uri]; - - $.ajax( - { - type: 'GET', - url: '/', - success: function(data, textStatus, xhr) - { - if(data !== '') - { - forge.log.debug(cat, 'authentication completed'); - forge.log.debug(cat, data); - } - else - { - forge.log.error(cat, 'authentication failed'); - } - }, - error: function(xhr, textStatus, errorThrown) - { - forge.log.error(cat, 'authentication failed'); - }, - xhr: function() - { - return forge.xhr.create({ - // FIXME: change URL - url: 'https://localhost:4433', - connections: 10, - caCerts: [], - verify: function(c, verified, depth, certs) - { - // don't care about cert verification for test - return true; - }, - getCertificate: function(c) - { - //forge.log.debug(cat, 'using cert', webid.certificate); - return webid.certificate; - }, - getPrivateKey: function(c) - { - //forge.log.debug(cat, - // 'using private key', webid.privateKey); - return webid.privateKey; - } - }); - } - }); - } - catch(ex) - { - forge.log.error(cat, ex); - } - }); -}); diff --git a/node_modules/node-forge/tests/ws-webid.js b/node_modules/node-forge/tests/ws-webid.js deleted file mode 100644 index 2ce58167..00000000 --- a/node_modules/node-forge/tests/ws-webid.js +++ /dev/null @@ -1,132 +0,0 @@ -var websocket_webid = function(host, port) -{ - var cat = 'ws'; - - // TODO: get private key and certificate from local storage - var privateKey = - '-----BEGIN RSA PRIVATE KEY-----\r\n' + -'MIICXAIBAAKBgQCTmE8QLARsC57Z1OrOaLM6AS3fn70N7BvlU7z7yw8UpcJA/jOl\r\n' + -'NWu7eS9uzuckdVZ9FE0+x3DRvhtDI6K+18dcrUWtl5ADWXcs1QS3/7bGh7IybFyY\r\n' + -'0xT4VzLHcx6K4PNmfkjAQdyOz/EsuRqZ/ngIQ2tdHdkkzdQPECbTvFeG2wIDAQAB\r\n' + -'AoGAds3l7l2QHaxo7GzfqNBMXEdwto2tLxS8C6eQ+pkkBXm72HcF+Vj75AcTMD2p\r\n' + -'fwZYXQxHdV4yqRI+fZeku7uTA/3yBAAvNobbEN5jtHnq0ZTO/HO8HuHkKrCvD8c3\r\n' + -'0rJV6lNIuaARI9jZFf6HVchW3PMjKUpYhTs/sFhRxmsMpTkCQQDu8TPzXRmN1aw8\r\n' + -'tSI2Nyn8QUy9bw/12tlVaZIhrcVCiJl7JHGqSCowTqZlwmJIjd4W0zWjTvS7tEeO\r\n' + -'FaZHtP8lAkEAniGvm8S9zyzmhWRRIuU6EE2dtTbeAa5aSOK3nBaaNu2cHUxWle+J\r\n' + -'8lE4uequ9wqDG1AfOLobPmHReccmOI6N/wJAIP/I1/RkohT/a4bsiaZGsyLlkUf0\r\n' + -'YVTvLP+ege44zv6Ei+A1nnnG8dL64hTdc/27zVUwFDTEUeQM+c99nmudzQJBAApY\r\n' + -'qeTHOqQTjAGuTqC53tKyQV9Z96yke8PJEbpkwDJX2Z8RH5kv0xbHua5wbII9bdab\r\n' + -'p29OvfmW7N3K6fVJXoECQHK8FDC0i8v1Ui8FoBmt+Z1c1+/9TCEE0abUQ6rfOUbm\r\n' + -'XHMMac/n4qDs0OoCjR4u46dpoK+WN7zcg56tToFPVow=\r\n' + -'-----END RSA PRIVATE KEY-----'; - var certificate = - '-----BEGIN CERTIFICATE-----\r\n' + -'MIICgDCCAemgAwIBAgIBATANBgkqhkiG9w0BAQUFADBYMRMwEQYDVQQDEwpKb2hu\r\n' + -'IFNtaXRoMRMwEQYDVQQHEwpCbGFja3NidXJnMREwDwYDVQQIEwhWaXJnaW5pYTEL\r\n' + -'MAkGA1UEBhMCVVMxDDAKBgNVBAoTA0ZvbzAeFw0xMDExMjYxNzUxMzJaFw0xMTEx\r\n' + -'MjYxNzUxMzJaMFgxEzARBgNVBAMTCkpvaG4gU21pdGgxEzARBgNVBAcTCkJsYWNr\r\n' + -'c2J1cmcxETAPBgNVBAgTCFZpcmdpbmlhMQswCQYDVQQGEwJVUzEMMAoGA1UEChMD\r\n' + -'Rm9vMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCTmE8QLARsC57Z1OrOaLM6\r\n' + -'AS3fn70N7BvlU7z7yw8UpcJA/jOlNWu7eS9uzuckdVZ9FE0+x3DRvhtDI6K+18dc\r\n' + -'rUWtl5ADWXcs1QS3/7bGh7IybFyY0xT4VzLHcx6K4PNmfkjAQdyOz/EsuRqZ/ngI\r\n' + -'Q2tdHdkkzdQPECbTvFeG2wIDAQABo1owWDAMBgNVHRMEBTADAQH/MAsGA1UdDwQE\r\n' + -'AwIC9DA7BgNVHREENDAyhjBodHRwOi8vd2ViaWQuZGlnaXRhbGJhemFhci5jb20v\r\n' + -'aWRzLzE1MzQ1NzI2NDcjbWUwDQYJKoZIhvcNAQEFBQADgYEAPNm8albI4w6anynw\r\n' + -'XE/+00sCVks9BbgTcIpRqZPGqSuTRwoYW35isNLDqFqIUdVREMvFrEn3nOlOyKi0\r\n' + -'29G8JtLHFSXZsqf38Zou/bGAhtEH1AVEbM2bRtEnG8IW24jL8hiciz4htxmjnkHN\r\n' + -'JnQ8SQtUSWplGnz0vMFEOv6JbnI=\r\n' + -'-----END CERTIFICATE-----'; - - // create websocket - var ws = new WebSocket('ws://' + host + ':' + port); - forge.log.debug(cat, 'Created WebSocket', ws); - - // create TLS client - var success = false; - var tls = forge.tls.createConnection( - { - server: false, - caStore: [], - sessionCache: {}, - // supported cipher suites in order of preference - cipherSuites: [ - forge.tls.CipherSuites.TLS_RSA_WITH_AES_128_CBC_SHA, - forge.tls.CipherSuites.TLS_RSA_WITH_AES_256_CBC_SHA], - virtualHost: host, - verify: function(c, verified, depth, certs) - { - forge.log.debug(cat, - 'TLS Client verifying certificate w/CN: \"' + - certs[0].subject.getField('CN').value + '\"'); - // accept any certificate from the server for this test - return true; - }, - connected: function(c) - { - forge.log.debug(cat, 'Client connected'); - }, - getCertificate: function(c, hint) - { - forge.log.debug(cat, 'Client using client-certificate'); - return certificate; - }, - getPrivateKey: function(c, cert) - { - return privateKey; - }, - tlsDataReady: function(c) - { - // send base64-encoded TLS data to server - ws.send(forge.util.encode64(c.tlsData.getBytes())); - }, - dataReady: function(c) - { - var response = c.data.getBytes(); - forge.log.debug(cat, 'Client received \"' + response + '\"'); - try - { - response = JSON.parse(response); - success = response.success; - - // TODO: call window.authenticate on response json, just like - // w/flash version - } - catch(ex) {} - c.close(); - }, - closed: function(c) - { - forge.log.debug(cat, 'Client disconnected'); - if(success) - { - forge.log.debug(cat, 'PASS'); - } - else - { - forge.log.debug(cat, 'FAIL'); - } - }, - error: function(c, error) - { - forge.log.debug(cat, 'Client error: ' + error.message); - } - }); - - ws.onopen = function(evt) - { - forge.log.debug(cat, 'WebSocket connected'); - - // do TLS handshake - tls.handshake(); - }; - ws.onmessage = function(evt) - { - // base64-decode data and process it - tls.process(forge.util.decode64(evt.data)); - }; - ws.onclose = function(evt) - { - forge.log.debug(cat, 'WebSocket closed'); - }; -}; - diff --git a/node_modules/node-forge/tests/ws.js b/node_modules/node-forge/tests/ws.js deleted file mode 100644 index ba0b39d7..00000000 --- a/node_modules/node-forge/tests/ws.js +++ /dev/null @@ -1,237 +0,0 @@ -// Github: http://github.com/ncr/node.ws.js -// Compatible with node v0.1.91 -// Author: Jacek Becela -// Contributors: -// Michael Stillwell http://github.com/ithinkihaveacat -// Nick Chapman http://github.com/nchapman -// Dmitriy Shalashov http://github.com/skaurus -// Johan Dahlberg -// Andreas Kompanez -// Samuel Cyprian http://github.com/samcyp -// License: MIT -// Based on: http://github.com/Guille/node.websocket.js - -function nano(template, data) { - return template.replace(/\{([\w\.]*)}/g, function (str, key) { - var keys = key.split("."), value = data[keys.shift()]; - keys.forEach(function (key) { value = value[key];}); - return value; - }); -} - -function pack(num) { - var result = ''; - result += String.fromCharCode(num >> 24 & 0xFF); - result += String.fromCharCode(num >> 16 & 0xFF); - result += String.fromCharCode(num >> 8 & 0xFF); - result += String.fromCharCode(num & 0xFF); - return result; -} - -var sys = require("sys"), - net = require("net"), - crypto = require("crypto"), - requiredHeaders = { - 'get': /^GET (\/[^\s]*)/, - 'upgrade': /^WebSocket$/, - 'connection': /^Upgrade$/, - 'host': /^(.+)$/, - 'origin': /^(.+)$/ - }, - handshakeTemplate75 = [ - 'HTTP/1.1 101 Web Socket Protocol Handshake', - 'Upgrade: WebSocket', - 'Connection: Upgrade', - 'WebSocket-Origin: {origin}', - 'WebSocket-Location: {protocol}://{host}{resource}', - '', - '' - ].join("\r\n"), - handshakeTemplate76 = [ - 'HTTP/1.1 101 WebSocket Protocol Handshake', // note a diff here - 'Upgrade: WebSocket', - 'Connection: Upgrade', - 'Sec-WebSocket-Origin: {origin}', - 'Sec-WebSocket-Location: {protocol}://{host}{resource}', - '', - '{data}' - ].join("\r\n"), - flashPolicy = ''; - - - -exports.createSecureServer = function (websocketListener, credentials, options) { - if (!options) options = {}; - options.secure = credentials; - return this.createServer(websocketListener, options); -}; - -exports.createServer = function (websocketListener, options) { - if (!options) options = {}; - if (!options.flashPolicy) options.flashPolicy = flashPolicy; - // The value should be a crypto credentials - if (!options.secure) options.secure = null; - - return net.createServer(function (socket) { - //Secure WebSockets - var wsProtocol = 'ws'; - if(options.secure) { - wsProtocol = 'wss'; - socket.setSecure(options.secure); - } - socket.setTimeout(0); - socket.setNoDelay(true); - socket.setKeepAlive(true, 0); - - var emitter = new process.EventEmitter(), - handshaked = false, - buffer = ""; - - function handle(data) { - buffer += data; - - var chunks = buffer.split("\ufffd"), - count = chunks.length - 1; // last is "" or a partial packet - - for(var i = 0; i < count; i++) { - var chunk = chunks[i]; - if(chunk[0] == "\u0000") { - emitter.emit("data", chunk.slice(1)); - } else { - socket.end(); - return; - } - } - - buffer = chunks[count]; - } - - function handshake(data) { - var _headers = data.split("\r\n"); - - if ( //.exec(_headers[0]) ) { - socket.write( options.flashPolicy ); - socket.end(); - return; - } - - // go to more convenient hash form - var headers = {}, upgradeHead, len = _headers.length; - if ( _headers[0].match(/^GET /) ) { - headers["get"] = _headers[0]; - } else { - socket.end(); - return; - } - if ( _headers[ _headers.length - 1 ] ) { - upgradeHead = _headers[ _headers.length - 1 ]; - len--; - } - while (--len) { // _headers[0] will be skipped - var header = _headers[len]; - if (!header) continue; - - var split = header.split(": ", 2); // second parameter actually seems to not work in node - headers[ split[0].toLowerCase() ] = split[1]; - } - - // check if we have all needed headers and fetch data from them - var data = {}, match; - for (var header in requiredHeaders) { - // regexp actual header value - if ( match = requiredHeaders[ header ].exec( headers[header] ) ) { - data[header] = match; - } else { - socket.end(); - return; - } - } - - // draft auto-sensing - if ( headers["sec-websocket-key1"] && headers["sec-websocket-key2"] && upgradeHead ) { // 76 - var strkey1 = headers["sec-websocket-key1"] - , strkey2 = headers["sec-websocket-key2"] - - , numkey1 = parseInt(strkey1.replace(/[^\d]/g, ""), 10) - , numkey2 = parseInt(strkey2.replace(/[^\d]/g, ""), 10) - - , spaces1 = strkey1.replace(/[^\ ]/g, "").length - , spaces2 = strkey2.replace(/[^\ ]/g, "").length; - - if (spaces1 == 0 || spaces2 == 0 || numkey1 % spaces1 != 0 || numkey2 % spaces2 != 0) { - socket.end(); - return; - } - - var hash = crypto.createHash("md5") - , key1 = pack(parseInt(numkey1/spaces1)) - , key2 = pack(parseInt(numkey2/spaces2)); - - hash.update(key1); - hash.update(key2); - hash.update(upgradeHead); - - socket.write(nano(handshakeTemplate76, { - protocol: wsProtocol, - resource: data.get[1], - host: data.host[1], - origin: data.origin[1], - data: hash.digest("binary") - }), "binary"); - - } else { // 75 - socket.write(nano(handshakeTemplate75, { - protocol: wsProtocol, - resource: data.get[1], - host: data.host[1], - origin: data.origin[1] - })); - - } - - handshaked = true; - emitter.emit("connect", data.get[1]); - } - - socket.addListener("data", function (data) { - if(handshaked) { - handle(data.toString("utf8")); - } else { - handshake(data.toString("binary")); // because of draft76 handshakes - } - }).addListener("end", function () { - socket.end(); - }).addListener("close", function () { - if (handshaked) { // don't emit close from policy-requests - emitter.emit("close"); - } - }).addListener("error", function (exception) { - if (emitter.listeners("error").length > 0) { - emitter.emit("error", exception); - } else { - throw exception; - } - }); - - emitter.remoteAddress = socket.remoteAddress; - - emitter.write = function (data) { - try { - socket.write('\u0000', 'binary'); - socket.write(data, 'utf8'); - socket.write('\uffff', 'binary'); - } catch(e) { - // Socket not open for writing, - // should get "close" event just before. - socket.end(); - } - }; - - emitter.end = function () { - socket.end(); - }; - - websocketListener(emitter); // emits: "connect", "data", "close", provides: write(data), end() - }); -}; - diff --git a/node_modules/node-forge/tests/xhr.html b/node_modules/node-forge/tests/xhr.html deleted file mode 100644 index aaa721c5..00000000 --- a/node_modules/node-forge/tests/xhr.html +++ /dev/null @@ -1,87 +0,0 @@ - - - - - Forge XmlHttpRequest Test - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
                -

                XmlHttpRequest Tests

                -
                - -
                - - -
                -

                Could not load the flash SocketPool.

                -
                - -
                -
                  -
                • Use the controls below to test the XHR wrapper.
                • -
                -
                - -
                -Control - - -
                - Scroll Tests -
                - -
                - -
                -Progress -Status: ?
                -Pass: ?/?
                -Fail: ? -
                - -
                -Tests -
                -
                - -
                - - diff --git a/node_modules/node-forge/tests/xhr.js b/node_modules/node-forge/tests/xhr.js deleted file mode 100644 index 78f91ad6..00000000 --- a/node_modules/node-forge/tests/xhr.js +++ /dev/null @@ -1,590 +0,0 @@ -/** - * Forge XmlHttpRequest Test - * - * @author Dave Longley - * @author David I. Lehn - * - * Copyright (c) 2009-2010 Digital Bazaar, Inc. All rights reserved. - */ -(function($) -{ - // load flash socket pool - window.forge.socketPool = {}; - window.forge.socketPool.ready = function() - { - // init forge xhr - forge.xhr.init({ - flashId: 'socketPool', - policyPort: 19945, - msie: $.browser.msie, - connections: 10, - caCerts: [], - verify: function(c, verified, depth, certs) - { - // don't care about cert verification for test - return true; - } - }); - }; - swfobject.embedSWF( - 'forge/SocketPool.swf', 'socketPool', '0', '0', '9.0.0', - false, {}, {allowscriptaccess: 'always'}, {}); -})(jQuery); - -jQuery(function($) -{ - var cat = 'forge.tests.xhr'; - - var tests = []; - var passed = 0; - var failed = 0; - - var init = function() { - passed = failed = 0; - $('.ready,.testing,.pass,.fail') - .removeClass('ready testing pass fail'); - $('#status') - .text('Ready.') - .addClass('ready'); - $('#total').text(tests.length); - $('#pass').text(passed); - $('#fail').text(failed); - $('.expect').empty(); - $('.result').empty(); - $('.time').empty(); - $('.timePer').empty(); - $('#start').removeAttr('disabled'); - }; - - var start = function() - { - $('#start').attr('disabled', 'disabled'); - // meta! use tasks to run the task tests - forge.task.start({ - type: 'test', - run: function(task) { - task.next('starting', function(task) { - forge.log.debug(cat, 'start'); - $('#status') - .text('Testing...') - .addClass('testing') - .removeClass('idle'); - }); - $.each(tests, function(i, test) { - task.next('test', function(task) { - var title = $('li:first', test.container); - if($('#scroll:checked').length === 1) - { - $('html,body').animate({scrollTop: title.offset().top}); - } - title.addClass('testing'); - test.run(task, test); - }); - task.next('test', function(task) { - $('li:first', test.container).removeClass('testing'); - }); - }); - task.next('success', function(task) { - forge.log.debug(cat, 'done'); - if(failed === 0) { - $('#status') - .text('PASS') - .addClass('pass') - .removeClass('testing'); - } else { - // FIXME: should just be hitting failure() below - $('#status') - .text('FAIL') - .addClass('fail') - .removeClass('testing'); - } - }); - }, - failure: function() { - $('#status') - .text('FAIL') - .addClass('fail') - .removeClass('testing'); - } - }); - }; - - $('#start').click(function() { - start(); - }); - - $('#reset').click(function() { - init(); - }); - - var stressStats = - { - sent: 0, - success: 0, - error: 0 - }; - var stressStatsMessage = function() - { - return 'received:' + (stressStats.success + stressStats.error) + '/' + - stressStats.sent + ' errors:' + stressStats.error; - }; - - $('#stress').click(function() { - for(var i = 1; i <= 100; ++i) - { - (function(seqnum) - { - setTimeout(function() - { - $.ajax( - { - type: 'GET', - url: '/result.txt?seq=' + seqnum, - beforeSend: function(xhr) - { - ++stressStats.sent; - xhr.setRequestHeader('Connection', 'close'); - }, - success: function(data, textStatus, xhr) - { - ++stressStats.success; - forge.log.debug(cat, 'xhr connection completed' + - ' seq:' + seqnum + - ' datalen:' + data.length + ' ' + - stressStatsMessage()); - }, - error: function(xhr, textStatus, errorThrown) - { - ++stressStats.error; - forge.log.error(cat, 'xhr connection failed' + - ' seq:' + seqnum + ' ' + - stressStatsMessage(), arguments); - }, - xhr: forge.xhr.create - }); - }, 0); - })(i); - } - return false; - }); - - /** - * Creates a simple XMLHttpRequest wrapper. For testing. - */ - var createWrapper = function() - { - var UNSENT = 0; - var OPENED = 1; - var HEADERS_RECEIVED = 2; - var LOADING = 3; - var DONE = 4; - - var toWrap = new XMLHttpRequest(); - - // create xhr wrapper object - var xhr = - { - // FIXME: an EventListener - onreadystatechange: null, - // FIXME: readonly - readyState: UNSENT, - // FIXME: a string - responseText: null, - // FIXME: a document - responseXML: null, - // FIXME: readonly, returns the HTTP status code - status: 0, - // FIXME: readonly, returns the HTTP status message - statusText: null, - - // FIXME: async, user, and password are optional - open: function(method, url, async, user, password) - { - toWrap.open(method, url, async, user, password); - }, - - setRequestHeader: function(header, value) - { - toWrap.setRequestHeader(header, value); - }, - - // FIXME: data can be a string or a document - send: function(data) - { - toWrap.send(data); - }, - - abort: function() - { - toWrap.abort(); - toWrap.onreadystatechange = null; - toWrap = null; - }, - - // FIXME: return all response headers as a string - getAllResponseHeaders: function() - { - return toWrap.getAllResponseHeaders(); - }, - - // FIXME: return header field value - getResponseHeader: function(header) - { - return toWrap.getResponseHeader(header); - } - }; - - toWrap.onreadystatechange = function() - { - // copy attributes - xhr.readyState = toWrap.readyState; - xhr.responseText = toWrap.responseText; - xhr.responseXML = toWrap.responseXML; - - if(toWrap.readyState == HEADERS_RECEIVED) - { - xhr.status = toWrap.status; - xhr.statusText = toWrap.statusText; - } - - if(xhr.onreadystatechange) - { - //forge.log.debug(cat, 'wrapper orsc', toWrap); - xhr.onreadystatechange(); - } - }; - - return xhr; - }; - - var addTest = function(name, run) - { - var container = $('
                • Test ' + name + '
                  • '); - var expect = $('
                  • Expect:
                  • '); - var result = $('
                  • Result:
                  • '); - var time = $('
                  • Time:
                  • '); - var timePer = $('
                  • Time Per Iteration:
                  • '); - $('ul', container) - .append(expect) - .append(result) - .append(time) - .append(timePer); - $('#tests').append(container); - var test = { - container: container, - startTime: null, - run: function(task, test) { - test.startTime = new Date(); - run(task, test); - }, - expect: $('span', expect), - result: $('span', result), - check: function() { - var e = test.expect.text(); - var r = test.result.text(); - (e == r) ? test.pass() : test.fail(); - }, - pass: function(iterations) { - var dt = new Date() - test.startTime; - if(!iterations) - { - iterations = 1; - } - var dti = (dt / iterations); - passed += 1; - $('#pass').text(passed); - $('li:first', container).addClass('pass'); - $('span.time', container).html(dt + 'ms'); - $('span.timePer', container).html(dti + 'ms'); - }, - fail: function(iterations) { - var dt = new Date() - test.startTime; - if(!iterations) - { - iterations = 1; - } - var dti = (dt / iterations); - failed += 1; - $('#fail').text(failed); - $('li:first', container).addClass('fail'); - $('span.time', container).html(dt + 'ms'); - $('span.timePer', container).html(dti + 'ms'); - } - }; - tests.push(test); - }; - - addTest('builtin xhr', function(task, test) - { - task.block(); - - $.ajax( - { - type: 'GET', - url: '/result.txt', - success: function(data) - { - test.expect.html('expected result'); - test.result.html(data); - task.unblock(); - }, - error: function() - { - task.fail(); - } - }); - - task.next(function(task) - { - test.pass(); - }); - }); - - addTest('builtin xhr (10 serial)', function(task, test) - { - var N = 10; - for(var i = 0; i < N; i++) - { - task.next(function(task) - { - task.parent.block(); - - $.ajax( - { - type: 'GET', - url: '/result.txt', - success: function(data, textStatus) - { - test.result.append('.'); - task.parent.unblock(); - }, - error: function(xhr, textStatus, errorThrown) - { - task.fail(N); - } - }); - }); - } - - task.next(function(task) - { - test.pass(N); - }); - }); - - addTest('builtin xhr (10 parallel)', function(task, test) - { - var N = 10; - task.block(N); - for(var i = 0; i < N; i++) - { - $.ajax( - { - type: 'GET', - url: '/result.txt', - success: function(data, textStatus) - { - test.result.append('.'); - task.unblock(); - }, - error: function(xhr, textStatus, errorThrown) - { - task.fail(N); - } - }); - } - - task.next(function(task) - { - test.pass(N); - }); - }); - - // test only works with non-IE - if(!$.browser.msie) - { - addTest('generic wrapper xhr', function(task, test) - { - task.block(); - - $.ajax( - { - type: 'GET', - url: '/result.txt', - success: function(data) - { - test.expect.html('expected result'); - test.result.html(data); - task.unblock(); - }, - error: function() - { - task.fail(); - }, - xhr: createWrapper - }); - - task.next(function(task) - { - test.pass(); - }); - }); - - addTest('generic wrapper xhr (10 serial)', function(task, test) - { - var N = 10; - for(var i = 0; i < N; i++) - { - task.next(function(task) - { - task.parent.block(); - - $.ajax( - { - type: 'GET', - url: '/result.txt', - success: function(data, textStatus) - { - test.result.append('.'); - task.parent.unblock(); - }, - error: function(xhr, textStatus, errorThrown) - { - task.fail(N); - }, - xhr: createWrapper - }); - }); - } - - task.next(function(task) - { - test.pass(N); - }); - }); - - addTest('generic wrapper xhr (10 parallel)', function(task, test) - { - var N = 10; - task.block(N); - for(var i = 0; i < N; i++) - { - $.ajax( - { - type: 'GET', - url: '/result.txt', - success: function(data, textStatus) - { - test.result.append('.'); - task.unblock(); - }, - error: function(xhr, textStatus, errorThrown) - { - task.fail(N); - }, - xhr: createWrapper - }); - } - - task.next(function(task) - { - test.pass(N); - }); - }); - } - - for(var i = 0; i < 3; i++) { - addTest('TLS xhr ' + i, function(task, test) - { - task.block(); - - $.ajax( - { - type: 'GET', - url: '/result.txt', - success: function(data, textStatus, xhr) - { - test.expect.html('expected result'); - test.result.html(data); - task.unblock(); - }, - error: function(xhr, textStatus, errorThrown) - { - task.fail(); - }, - xhr: forge.xhr.create - }); - - task.next(function(task) - { - test.pass(); - }); - }); - } - - addTest('TLS xhr (10 serial)', function(task, test) - { - var N = 10; - for(var i = 0; i < N; i++) - { - task.next(function(task) - { - task.parent.block(); - - $.ajax( - { - type: 'GET', - url: '/result.txt', - success: function(data, textStatus, xhr) - { - test.result.append('.'); - task.parent.unblock(); - }, - error: function(xhr, textStatus, errorThrown) - { - task.fail(N); - }, - xhr: forge.xhr.create - }); - }); - } - - task.next(function(task) - { - test.pass(N); - }); - }); - - addTest('TLS xhr (10 parallel) ' + - '(hit "Reset" then "Start" to speed up - uses SSL session cache)', - function(task, test) - { - var N = 10; - task.block(N); - for(var i = 0; i < N; i++) - { - $.ajax( - { - type: 'GET', - url: '/result.txt', - success: function(data, textStatus, xhr) - { - test.result.append('.'); - task.unblock(); - }, - error: function(xhr, textStatus, errorThrown) - { - task.fail(N); - }, - xhr: forge.xhr.create - }); - } - - task.next(function(task) - { - test.pass(N); - }); - }); - - init(); -}); diff --git a/node_modules/node-uuid/.npmignore b/node_modules/node-uuid/.npmignore deleted file mode 100644 index 88861393..00000000 --- a/node_modules/node-uuid/.npmignore +++ /dev/null @@ -1,4 +0,0 @@ -node_modules -.DS_Store -.nyc_output -coverage diff --git a/node_modules/node-uuid/LICENSE.md b/node_modules/node-uuid/LICENSE.md deleted file mode 100644 index 652609b3..00000000 --- a/node_modules/node-uuid/LICENSE.md +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2010-2012 Robert Kieffer - -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/node_modules/node-uuid/README.md b/node_modules/node-uuid/README.md deleted file mode 100644 index 5cd85550..00000000 --- a/node_modules/node-uuid/README.md +++ /dev/null @@ -1,254 +0,0 @@ -# node-uuid - -Simple, fast generation of [RFC4122](http://www.ietf.org/rfc/rfc4122.txt) UUIDS. - -Features: - -* Generate RFC4122 version 1 or version 4 UUIDs -* Runs in node.js and all browsers. -* Registered as a [ComponentJS](https://github.com/component/component) [component](https://github.com/component/component/wiki/Components) ('broofa/node-uuid'). -* Cryptographically strong random # generation - * `crypto.randomBytes(n)` in node.js - * `window.crypto.getRandomValues(ta)` in [supported browsers](https://developer.mozilla.org/en-US/docs/Web/API/RandomSource/getRandomValues#Browser_Compatibility) -* 1.1K minified and gzip'ed (Want something smaller? Check this [crazy shit](https://gist.github.com/982883) out! ) -* [Annotated source code](http://broofa.github.com/node-uuid/docs/uuid.html) -* Comes with a Command Line Interface for generating uuids on the command line - -## Getting Started - -Install it in your browser: - -```html - -``` - -Or in node.js: - -``` -npm install node-uuid -``` - -```javascript -var uuid = require('node-uuid'); -``` - -Then create some ids ... - -```javascript -// Generate a v1 (time-based) id -uuid.v1(); // -> '6c84fb90-12c4-11e1-840d-7b25c5ee775a' - -// Generate a v4 (random) id -uuid.v4(); // -> '110ec58a-a0f2-4ac4-8393-c866d813b8d1' -``` - -## API - -### uuid.v1([`options` [, `buffer` [, `offset`]]]) - -Generate and return a RFC4122 v1 (timestamp-based) UUID. - -* `options` - (Object) Optional uuid state to apply. Properties may include: - - * `node` - (Array) Node id as Array of 6 bytes (per 4.1.6). Default: Randomly generated ID. See note 1. - * `clockseq` - (Number between 0 - 0x3fff) RFC clock sequence. Default: An internally maintained clockseq is used. - * `msecs` - (Number | Date) Time in milliseconds since unix Epoch. Default: The current time is used. - * `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. - -* `buffer` - (Array | Buffer) Array or buffer where UUID bytes are to be written. -* `offset` - (Number) Starting index in `buffer` at which to begin writing. - -Returns `buffer`, if specified, otherwise the string form of the UUID - -Notes: - -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.) - -Example: Generate string UUID with fully-specified options - -```javascript -uuid.v1({ - node: [0x01, 0x23, 0x45, 0x67, 0x89, 0xab], - clockseq: 0x1234, - msecs: new Date('2011-11-01').getTime(), - nsecs: 5678 -}); // -> "710b962e-041c-11e1-9234-0123456789ab" -``` - -Example: In-place generation of two binary IDs - -```javascript -// Generate two ids in an array -var arr = new Array(32); // -> [] -uuid.v1(null, arr, 0); // -> [02 a2 ce 90 14 32 11 e1 85 58 0b 48 8e 4f c1 15] -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] - -// Optionally use uuid.unparse() to get stringify the ids -uuid.unparse(buffer); // -> '02a2ce90-1432-11e1-8558-0b488e4fc115' -uuid.unparse(buffer, 16) // -> '02a31cb0-1432-11e1-8558-0b488e4fc115' -``` - -### uuid.v4([`options` [, `buffer` [, `offset`]]]) - -Generate and return a RFC4122 v4 UUID. - -* `options` - (Object) Optional uuid state to apply. Properties may include: - - * `random` - (Number[16]) Array of 16 numbers (0-255) to use in place of randomly generated values - * `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. - -* `buffer` - (Array | Buffer) Array or buffer where UUID bytes are to be written. -* `offset` - (Number) Starting index in `buffer` at which to begin writing. - -Returns `buffer`, if specified, otherwise the string form of the UUID - -Example: Generate string UUID with fully-specified options - -```javascript -uuid.v4({ - random: [ - 0x10, 0x91, 0x56, 0xbe, 0xc4, 0xfb, 0xc1, 0xea, - 0x71, 0xb4, 0xef, 0xe1, 0x67, 0x1c, 0x58, 0x36 - ] -}); -// -> "109156be-c4fb-41ea-b1b4-efe1671c5836" -``` - -Example: Generate two IDs in a single buffer - -```javascript -var buffer = new Array(32); // (or 'new Buffer' in node.js) -uuid.v4(null, buffer, 0); -uuid.v4(null, buffer, 16); -``` - -### uuid.parse(id[, buffer[, offset]]) -### uuid.unparse(buffer[, offset]) - -Parse and unparse UUIDs - - * `id` - (String) UUID(-like) string - * `buffer` - (Array | Buffer) Array or buffer where UUID bytes are to be written. Default: A new Array or Buffer is used - * `offset` - (Number) Starting index in `buffer` at which to begin writing. Default: 0 - -Example parsing and unparsing a UUID string - -```javascript -var bytes = uuid.parse('797ff043-11eb-11e1-80d6-510998755d10'); // -> -var string = uuid.unparse(bytes); // -> '797ff043-11eb-11e1-80d6-510998755d10' -``` - -### uuid.noConflict() - -(Browsers only) Set `uuid` property back to it's previous value. - -Returns the node-uuid object. - -Example: - -```javascript -var myUuid = uuid.noConflict(); -myUuid.v1(); // -> '6c84fb90-12c4-11e1-840d-7b25c5ee775a' -``` - -## Deprecated APIs - -Support for the following v1.2 APIs is available in v1.3, but is deprecated and will be removed in the next major version. - -### uuid([format [, buffer [, offset]]]) - -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). - -### uuid.BufferClass - -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. - -## Command Line Interface - -To use the executable, it's probably best to install this library globally. - -`npm install -g node-uuid` - -Usage: - -``` -USAGE: uuid [version] [options] - - -options: - ---help Display this message and exit -``` - -`version` must be an RFC4122 version that is supported by this library, which is currently version 1 and version 4 (denoted by "v1" and "v4", respectively). `version` defaults to version 4 when not supplied. - -### Examples - -``` -> uuid -3a91f950-dec8-4688-ba14-5b7bbfc7a563 -``` - -``` -> uuid v1 -9d0b43e0-7696-11e3-964b-250efa37a98e -``` - -``` -> uuid v4 -6790ac7c-24ac-4f98-8464-42f6d98a53ae -``` - -## Testing - -In node.js - -``` -npm test -``` - -In Browser - -``` -open test/test.html -``` - -### Benchmarking - -Requires node.js - -``` -npm install uuid uuid-js -node benchmark/benchmark.js -``` - -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) - -For browser performance [checkout the JSPerf tests](http://jsperf.com/node-uuid-performance). - -## Release notes - -### 1.4.6 - -* Properly detect node crypto and whatwg crypto -* Workaround phantomjs/browserify bug -* Explicit check for `window` rather implicit this-global -* Issue warning if Math.random() is being used -* "use strict"; -* A few jshint / stylistic updates (=== and such) - -### 1.4.0 - -* Improved module context detection -* Removed public RNG functions - -### 1.3.2 - -* Improve tests and handling of v1() options (Issue #24) -* Expose RNG option to allow for perf testing with different generators - -### 1.3.0 - -* Support for version 1 ids, thanks to [@ctavan](https://github.com/ctavan)! -* Support for node.js crypto API -* De-emphasizing performance in favor of a) cryptographic quality PRNGs where available and b) more manageable code diff --git a/node_modules/node-uuid/benchmark/README.md b/node_modules/node-uuid/benchmark/README.md deleted file mode 100644 index aaeb2ea0..00000000 --- a/node_modules/node-uuid/benchmark/README.md +++ /dev/null @@ -1,53 +0,0 @@ -# node-uuid Benchmarks - -### Results - -To see the results of our benchmarks visit https://github.com/broofa/node-uuid/wiki/Benchmark - -### Run them yourself - -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`. - -To prepare and run the benchmark issue; - -``` -npm install uuid uuid-js -node benchmark/benchmark.js -``` - -You'll see an output like this one: - -``` -# v4 -nodeuuid.v4(): 854700 uuids/second -nodeuuid.v4('binary'): 788643 uuids/second -nodeuuid.v4('binary', buffer): 1336898 uuids/second -uuid(): 479386 uuids/second -uuid('binary'): 582072 uuids/second -uuidjs.create(4): 312304 uuids/second - -# v1 -nodeuuid.v1(): 938086 uuids/second -nodeuuid.v1('binary'): 683060 uuids/second -nodeuuid.v1('binary', buffer): 1644736 uuids/second -uuidjs.create(1): 190621 uuids/second -``` - -* The `uuid()` entries are for Nikhil Marathe's [uuid module](https://bitbucket.org/nikhilm/uuidjs) which is a wrapper around the native libuuid library. -* 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. - -If you want to get more reliable results you can run the benchmark multiple times and write the output into a log file: - -``` -for i in {0..9}; do node benchmark/benchmark.js >> benchmark/bench_0.4.12.log; done; -``` - -If you're interested in how performance varies between different node versions, you can issue the above command multiple times. - -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: - -``` -(cd benchmark/ && ./bench.sh) -``` - -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. diff --git a/node_modules/node-uuid/benchmark/bench.gnu b/node_modules/node-uuid/benchmark/bench.gnu deleted file mode 100644 index a342fbbe..00000000 --- a/node_modules/node-uuid/benchmark/bench.gnu +++ /dev/null @@ -1,174 +0,0 @@ -#!/opt/local/bin/gnuplot -persist -# -# -# G N U P L O T -# Version 4.4 patchlevel 3 -# last modified March 2011 -# System: Darwin 10.8.0 -# -# Copyright (C) 1986-1993, 1998, 2004, 2007-2010 -# Thomas Williams, Colin Kelley and many others -# -# gnuplot home: http://www.gnuplot.info -# faq, bugs, etc: type "help seeking-assistance" -# immediate help: type "help" -# plot window: hit 'h' -set terminal postscript eps noenhanced defaultplex \ - leveldefault color colortext \ - solid linewidth 1.2 butt noclip \ - palfuncparam 2000,0.003 \ - "Helvetica" 14 -set output 'bench.eps' -unset clip points -set clip one -unset clip two -set bar 1.000000 front -set border 31 front linetype -1 linewidth 1.000 -set xdata -set ydata -set zdata -set x2data -set y2data -set timefmt x "%d/%m/%y,%H:%M" -set timefmt y "%d/%m/%y,%H:%M" -set timefmt z "%d/%m/%y,%H:%M" -set timefmt x2 "%d/%m/%y,%H:%M" -set timefmt y2 "%d/%m/%y,%H:%M" -set timefmt cb "%d/%m/%y,%H:%M" -set boxwidth -set style fill empty border -set style rectangle back fc lt -3 fillstyle solid 1.00 border lt -1 -set style circle radius graph 0.02, first 0, 0 -set dummy x,y -set format x "% g" -set format y "% g" -set format x2 "% g" -set format y2 "% g" -set format z "% g" -set format cb "% g" -set angles radians -unset grid -set key title "" -set key outside left top horizontal Right noreverse enhanced autotitles columnhead nobox -set key noinvert samplen 4 spacing 1 width 0 height 0 -set key maxcolumns 2 maxrows 0 -unset label -unset arrow -set style increment default -unset style line -set style line 1 linetype 1 linewidth 2.000 pointtype 1 pointsize default pointinterval 0 -unset style arrow -set style histogram clustered gap 2 title offset character 0, 0, 0 -unset logscale -set offsets graph 0.05, 0.15, 0, 0 -set pointsize 1.5 -set pointintervalbox 1 -set encoding default -unset polar -unset parametric -unset decimalsign -set view 60, 30, 1, 1 -set samples 100, 100 -set isosamples 10, 10 -set surface -unset contour -set clabel '%8.3g' -set mapping cartesian -set datafile separator whitespace -unset hidden3d -set cntrparam order 4 -set cntrparam linear -set cntrparam levels auto 5 -set cntrparam points 5 -set size ratio 0 1,1 -set origin 0,0 -set style data points -set style function lines -set xzeroaxis linetype -2 linewidth 1.000 -set yzeroaxis linetype -2 linewidth 1.000 -set zzeroaxis linetype -2 linewidth 1.000 -set x2zeroaxis linetype -2 linewidth 1.000 -set y2zeroaxis linetype -2 linewidth 1.000 -set ticslevel 0.5 -set mxtics default -set mytics default -set mztics default -set mx2tics default -set my2tics default -set mcbtics default -set xtics border in scale 1,0.5 mirror norotate offset character 0, 0, 0 -set xtics norangelimit -set xtics () -set ytics border in scale 1,0.5 mirror norotate offset character 0, 0, 0 -set ytics autofreq norangelimit -set ztics border in scale 1,0.5 nomirror norotate offset character 0, 0, 0 -set ztics autofreq norangelimit -set nox2tics -set noy2tics -set cbtics border in scale 1,0.5 mirror norotate offset character 0, 0, 0 -set cbtics autofreq norangelimit -set title "" -set title offset character 0, 0, 0 font "" norotate -set timestamp bottom -set timestamp "" -set timestamp offset character 0, 0, 0 font "" norotate -set rrange [ * : * ] noreverse nowriteback # (currently [8.98847e+307:-8.98847e+307] ) -set autoscale rfixmin -set autoscale rfixmax -set trange [ * : * ] noreverse nowriteback # (currently [-5.00000:5.00000] ) -set autoscale tfixmin -set autoscale tfixmax -set urange [ * : * ] noreverse nowriteback # (currently [-10.0000:10.0000] ) -set autoscale ufixmin -set autoscale ufixmax -set vrange [ * : * ] noreverse nowriteback # (currently [-10.0000:10.0000] ) -set autoscale vfixmin -set autoscale vfixmax -set xlabel "" -set xlabel offset character 0, 0, 0 font "" textcolor lt -1 norotate -set x2label "" -set x2label offset character 0, 0, 0 font "" textcolor lt -1 norotate -set xrange [ * : * ] noreverse nowriteback # (currently [-0.150000:3.15000] ) -set autoscale xfixmin -set autoscale xfixmax -set x2range [ * : * ] noreverse nowriteback # (currently [0.00000:3.00000] ) -set autoscale x2fixmin -set autoscale x2fixmax -set ylabel "" -set ylabel offset character 0, 0, 0 font "" textcolor lt -1 rotate by -270 -set y2label "" -set y2label offset character 0, 0, 0 font "" textcolor lt -1 rotate by -270 -set yrange [ 0.00000 : 1.90000e+06 ] noreverse nowriteback # (currently [:] ) -set autoscale yfixmin -set autoscale yfixmax -set y2range [ * : * ] noreverse nowriteback # (currently [0.00000:1.90000e+06] ) -set autoscale y2fixmin -set autoscale y2fixmax -set zlabel "" -set zlabel offset character 0, 0, 0 font "" textcolor lt -1 norotate -set zrange [ * : * ] noreverse nowriteback # (currently [-10.0000:10.0000] ) -set autoscale zfixmin -set autoscale zfixmax -set cblabel "" -set cblabel offset character 0, 0, 0 font "" textcolor lt -1 rotate by -270 -set cbrange [ * : * ] noreverse nowriteback # (currently [8.98847e+307:-8.98847e+307] ) -set autoscale cbfixmin -set autoscale cbfixmax -set zero 1e-08 -set lmargin -1 -set bmargin -1 -set rmargin -1 -set tmargin -1 -set pm3d explicit at s -set pm3d scansautomatic -set pm3d interpolate 1,1 flush begin noftriangles nohidden3d corners2color mean -set palette positive nops_allcF maxcolors 0 gamma 1.5 color model RGB -set palette rgbformulae 7, 5, 15 -set colorbox default -set colorbox vertical origin screen 0.9, 0.2, 0 size screen 0.05, 0.6, 0 front bdefault -set loadpath -set fontpath -set fit noerrorvariables -GNUTERM = "aqua" -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 -# EOF diff --git a/node_modules/node-uuid/benchmark/bench.sh b/node_modules/node-uuid/benchmark/bench.sh deleted file mode 100755 index d870a0cb..00000000 --- a/node_modules/node-uuid/benchmark/bench.sh +++ /dev/null @@ -1,34 +0,0 @@ -#!/bin/bash - -# for a given node version run: -# for i in {0..9}; do node benchmark.js >> bench_0.6.2.log; done; - -PATTERNS=('nodeuuid.v1()' "nodeuuid.v1('binary'," 'nodeuuid.v4()' "nodeuuid.v4('binary'," "uuid()" "uuid('binary')" 'uuidjs.create(1)' 'uuidjs.create(4)' '140byte') -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) -INDICES=(2 3 2 3 2 2 2 2 2) -VERSIONS=$( ls bench_*.log | sed -e 's/^bench_\([0-9\.]*\)\.log/\1/' | tr "\\n" " " ) -TMPJOIN="tmp_join" -OUTPUT="bench_results.txt" - -for I in ${!FILES[*]}; do - F=${FILES[$I]} - P=${PATTERNS[$I]} - INDEX=${INDICES[$I]} - echo "version $F" > $F - for V in $VERSIONS; do - (VAL=$( grep "$P" bench_$V.log | LC_ALL=en_US awk '{ sum += $'$INDEX' } END { print sum/NR }' ); echo $V $VAL) >> $F - done - if [ $I == 0 ]; then - cat $F > $TMPJOIN - else - join $TMPJOIN $F > $OUTPUT - cp $OUTPUT $TMPJOIN - fi - rm $F -done - -rm $TMPJOIN - -gnuplot bench.gnu -convert -density 200 -resize 800x560 -flatten bench.eps bench.png -rm bench.eps diff --git a/node_modules/node-uuid/benchmark/benchmark-native.c b/node_modules/node-uuid/benchmark/benchmark-native.c deleted file mode 100644 index dbfc75f6..00000000 --- a/node_modules/node-uuid/benchmark/benchmark-native.c +++ /dev/null @@ -1,34 +0,0 @@ -/* -Test performance of native C UUID generation - -To Compile: cc -luuid benchmark-native.c -o benchmark-native -*/ - -#include -#include -#include -#include - -int main() { - uuid_t myid; - char buf[36+1]; - int i; - struct timeval t; - double start, finish; - - gettimeofday(&t, NULL); - start = t.tv_sec + t.tv_usec/1e6; - - int n = 2e5; - for (i = 0; i < n; i++) { - uuid_generate(myid); - uuid_unparse(myid, buf); - } - - gettimeofday(&t, NULL); - finish = t.tv_sec + t.tv_usec/1e6; - double dur = finish - start; - - printf("%d uuids/sec", (int)(n/dur)); - return 0; -} diff --git a/node_modules/node-uuid/benchmark/benchmark.js b/node_modules/node-uuid/benchmark/benchmark.js deleted file mode 100644 index 40e6efbe..00000000 --- a/node_modules/node-uuid/benchmark/benchmark.js +++ /dev/null @@ -1,84 +0,0 @@ -try { - var nodeuuid = require('../uuid'); -} catch (e) { - console.error('node-uuid require failed - skipping tests'); -} - -try { - var uuid = require('uuid'); -} catch (e) { - console.error('uuid require failed - skipping tests'); -} - -try { - var uuidjs = require('uuid-js'); -} catch (e) { - console.error('uuid-js require failed - skipping tests'); -} - -var N = 5e5; - -function rate(msg, t) { - console.log(msg + ': ' + - (N / (Date.now() - t) * 1e3 | 0) + - ' uuids/second'); -} - -console.log('# v4'); - -// node-uuid - string form -if (nodeuuid) { - for (var i = 0, t = Date.now(); i < N; i++) nodeuuid.v4(); - rate('nodeuuid.v4() - using node.js crypto RNG', t); - - for (var i = 0, t = Date.now(); i < N; i++) nodeuuid.v4({rng: nodeuuid.mathRNG}); - rate('nodeuuid.v4() - using Math.random() RNG', t); - - for (var i = 0, t = Date.now(); i < N; i++) nodeuuid.v4('binary'); - rate('nodeuuid.v4(\'binary\')', t); - - var buffer = new nodeuuid.BufferClass(16); - for (var i = 0, t = Date.now(); i < N; i++) nodeuuid.v4('binary', buffer); - rate('nodeuuid.v4(\'binary\', buffer)', t); -} - -// libuuid - string form -if (uuid) { - for (var i = 0, t = Date.now(); i < N; i++) uuid(); - rate('uuid()', t); - - for (var i = 0, t = Date.now(); i < N; i++) uuid('binary'); - rate('uuid(\'binary\')', t); -} - -// uuid-js - string form -if (uuidjs) { - for (var i = 0, t = Date.now(); i < N; i++) uuidjs.create(4); - rate('uuidjs.create(4)', t); -} - -// 140byte.es -for (var i = 0, t = Date.now(); i < N; i++) 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g,function(s,r){r=Math.random()*16|0;return (s=='x'?r:r&0x3|0x8).toString(16)}); -rate('140byte.es_v4', t); - -console.log(''); -console.log('# v1'); - -// node-uuid - v1 string form -if (nodeuuid) { - for (var i = 0, t = Date.now(); i < N; i++) nodeuuid.v1(); - rate('nodeuuid.v1()', t); - - for (var i = 0, t = Date.now(); i < N; i++) nodeuuid.v1('binary'); - rate('nodeuuid.v1(\'binary\')', t); - - var buffer = new nodeuuid.BufferClass(16); - for (var i = 0, t = Date.now(); i < N; i++) nodeuuid.v1('binary', buffer); - rate('nodeuuid.v1(\'binary\', buffer)', t); -} - -// uuid-js - v1 string form -if (uuidjs) { - for (var i = 0, t = Date.now(); i < N; i++) uuidjs.create(1); - rate('uuidjs.create(1)', t); -} diff --git a/node_modules/node-uuid/bin/uuid b/node_modules/node-uuid/bin/uuid deleted file mode 100755 index f732e991..00000000 --- a/node_modules/node-uuid/bin/uuid +++ /dev/null @@ -1,26 +0,0 @@ -#!/usr/bin/env node - -var path = require('path'); -var uuid = require(path.join(__dirname, '..')); - -var arg = process.argv[2]; - -if ('--help' === arg) { - console.log('\n USAGE: uuid [version] [options]\n\n'); - console.log(' options:\n'); - console.log(' --help Display this message and exit\n'); - process.exit(0); -} - -if (null == arg) { - console.log(uuid()); - process.exit(0); -} - -if ('v1' !== arg && 'v4' !== arg) { - console.error('Version must be RFC4122 version 1 or version 4, denoted as "v1" or "v4"'); - process.exit(1); -} - -console.log(uuid[arg]()); -process.exit(0); diff --git a/node_modules/node-uuid/component.json b/node_modules/node-uuid/component.json deleted file mode 100644 index 3ff46336..00000000 --- a/node_modules/node-uuid/component.json +++ /dev/null @@ -1,25 +0,0 @@ -{ - "name": "node-uuid", - "repo": "broofa/node-uuid", - "description": "Rigorous implementation of RFC4122 (v1 and v4) UUIDs.", - "version": "1.4.7", - "author": "Robert Kieffer ", - "contributors": [ - { - "name": "Christoph Tavan ", - "github": "https://github.com/ctavan" - } - ], - "keywords": [ - "uuid", - "guid", - "rfc4122" - ], - "dependencies": {}, - "development": {}, - "main": "uuid.js", - "scripts": [ - "uuid.js" - ], - "license": "MIT" -} \ No newline at end of file diff --git a/node_modules/node-uuid/package.json b/node_modules/node-uuid/package.json deleted file mode 100644 index 8a24fd24..00000000 --- a/node_modules/node-uuid/package.json +++ /dev/null @@ -1,115 +0,0 @@ -{ - "_args": [ - [ - { - "raw": "node-uuid@~1.4.7", - "scope": null, - "escapedName": "node-uuid", - "name": "node-uuid", - "rawSpec": "~1.4.7", - "spec": ">=1.4.7 <1.5.0", - "type": "range" - }, - "/Users/benjaminarias/Desktop/poly/node_modules/request" - ] - ], - "_from": "node-uuid@>=1.4.7 <1.5.0", - "_id": "node-uuid@1.4.7", - "_inCache": true, - "_installable": true, - "_location": "/node-uuid", - "_nodeVersion": "5.0.0", - "_npmUser": { - "name": "coolaj86", - "email": "coolaj86@gmail.com" - }, - "_npmVersion": "3.3.6", - "_phantomChildren": {}, - "_requested": { - "raw": "node-uuid@~1.4.7", - "scope": null, - "escapedName": "node-uuid", - "name": "node-uuid", - "rawSpec": "~1.4.7", - "spec": ">=1.4.7 <1.5.0", - "type": "range" - }, - "_requiredBy": [ - "/google-auth-library/request", - "/request" - ], - "_resolved": "https://registry.npmjs.org/node-uuid/-/node-uuid-1.4.7.tgz", - "_shasum": "6da5a17668c4b3dd59623bda11cf7fa4c1f60a6f", - "_shrinkwrap": null, - "_spec": "node-uuid@~1.4.7", - "_where": "/Users/benjaminarias/Desktop/poly/node_modules/request", - "author": { - "name": "Robert Kieffer", - "email": "robert@broofa.com" - }, - "bin": { - "uuid": "./bin/uuid" - }, - "bugs": { - "url": "https://github.com/broofa/node-uuid/issues" - }, - "contributors": [ - { - "name": "AJ ONeal", - "email": "coolaj86@gmail.com" - }, - { - "name": "Christoph Tavan", - "email": "dev@tavan.de" - } - ], - "dependencies": {}, - "description": "Rigorous implementation of RFC4122 (v1 and v4) UUIDs.", - "devDependencies": { - "nyc": "^2.2.0" - }, - "directories": {}, - "dist": { - "shasum": "6da5a17668c4b3dd59623bda11cf7fa4c1f60a6f", - "tarball": "https://registry.npmjs.org/node-uuid/-/node-uuid-1.4.7.tgz" - }, - "gitHead": "309512573ec1c60143c257157479a20f7f1f51cd", - "homepage": "https://github.com/broofa/node-uuid", - "installable": true, - "keywords": [ - "guid", - "rfc4122", - "uuid" - ], - "lib": ".", - "licenses": [ - { - "type": "MIT", - "url": "https://raw.github.com/broofa/node-uuid/master/LICENSE.md" - } - ], - "main": "./uuid.js", - "maintainers": [ - { - "name": "broofa", - "email": "robert@broofa.com" - }, - { - "name": "coolaj86", - "email": "coolaj86@gmail.com" - } - ], - "name": "node-uuid", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git+https://github.com/broofa/node-uuid.git" - }, - "scripts": { - "coverage": "nyc npm test && nyc report", - "test": "node test/test.js" - }, - "url": "http://github.com/broofa/node-uuid", - "version": "1.4.7" -} diff --git a/node_modules/node-uuid/test/compare_v1.js b/node_modules/node-uuid/test/compare_v1.js deleted file mode 100644 index 05af8221..00000000 --- a/node_modules/node-uuid/test/compare_v1.js +++ /dev/null @@ -1,63 +0,0 @@ -var assert = require('assert'), - nodeuuid = require('../uuid'), - uuidjs = require('uuid-js'), - libuuid = require('uuid').generate, - util = require('util'), - exec = require('child_process').exec, - os = require('os'); - -// On Mac Os X / macports there's only the ossp-uuid package that provides uuid -// On Linux there's uuid-runtime which provides uuidgen -var uuidCmd = os.type() === 'Darwin' ? 'uuid -1' : 'uuidgen -t'; - -function compare(ids) { - console.log(ids); - for (var i = 0; i < ids.length; i++) { - var id = ids[i].split('-'); - id = [id[2], id[1], id[0]].join(''); - ids[i] = id; - } - var sorted = ([].concat(ids)).sort(); - - if (sorted.toString() !== ids.toString()) { - console.log('Warning: sorted !== ids'); - } else { - console.log('everything in order!'); - } -} - -// Test time order of v1 uuids -var ids = []; -while (ids.length < 10e3) ids.push(nodeuuid.v1()); - -var max = 10; -console.log('node-uuid:'); -ids = []; -for (var i = 0; i < max; i++) ids.push(nodeuuid.v1()); -compare(ids); - -console.log(''); -console.log('uuidjs:'); -ids = []; -for (var i = 0; i < max; i++) ids.push(uuidjs.create(1).toString()); -compare(ids); - -console.log(''); -console.log('libuuid:'); -ids = []; -var count = 0; -var last = function() { - compare(ids); -} -var cb = function(err, stdout, stderr) { - ids.push(stdout.substring(0, stdout.length-1)); - count++; - if (count < max) { - return next(); - } - last(); -}; -var next = function() { - exec(uuidCmd, cb); -}; -next(); diff --git a/node_modules/node-uuid/test/test.html b/node_modules/node-uuid/test/test.html deleted file mode 100644 index d80326ec..00000000 --- a/node_modules/node-uuid/test/test.html +++ /dev/null @@ -1,17 +0,0 @@ - - - - - - - - - diff --git a/node_modules/node-uuid/test/test.js b/node_modules/node-uuid/test/test.js deleted file mode 100644 index 5f1113d8..00000000 --- a/node_modules/node-uuid/test/test.js +++ /dev/null @@ -1,231 +0,0 @@ -if (!this.uuid) { - // node.js - uuid = require('../uuid'); - if (!/_rb/.test(uuid._rng.toString())) { - throw new Error("should use crypto for node.js"); - } -} - -// -// x-platform log/assert shims -// - -function _log(msg, type) { - type = type || 'log'; - - if (typeof(document) != 'undefined') { - document.write('
                    ' + msg.replace(/\n/g, '
                    ') + '
                    '); - } - if (typeof(console) != 'undefined') { - var color = { - log: '\033[39m', - warn: '\033[33m', - error: '\033[31m' - }; - console[type](color[type] + msg + color.log); - } -} - -function log(msg) {_log(msg, 'log');} -function warn(msg) {_log(msg, 'warn');} -function error(msg) {_log(msg, 'error');} - -function assert(res, msg) { - if (!res) { - error('FAIL: ' + msg); - } else { - log('Pass: ' + msg); - } -} - -// -// Unit tests -// - -// Verify ordering of v1 ids created with explicit times -var TIME = 1321644961388; // 2011-11-18 11:36:01.388-08:00 - -function compare(name, ids) { - ids = ids.map(function(id) { - return id.split('-').reverse().join('-'); - }).sort(); - var sorted = ([].concat(ids)).sort(); - - assert(sorted.toString() == ids.toString(), name + ' have expected order'); -} - -// Verify ordering of v1 ids created using default behavior -compare('uuids with current time', [ - uuid.v1(), - uuid.v1(), - uuid.v1(), - uuid.v1(), - uuid.v1() -]); - -// Verify ordering of v1 ids created with explicit times -compare('uuids with time option', [ - uuid.v1({msecs: TIME - 10*3600*1000}), - uuid.v1({msecs: TIME - 1}), - uuid.v1({msecs: TIME}), - uuid.v1({msecs: TIME + 1}), - uuid.v1({msecs: TIME + 28*24*3600*1000}) -]); - -assert( - uuid.v1({msecs: TIME}) != uuid.v1({msecs: TIME}), - 'IDs created at same msec are different' -); - -// Verify throw if too many ids created -var thrown = false; -try { - uuid.v1({msecs: TIME, nsecs: 10000}); -} catch (e) { - thrown = true; -} -assert(thrown, 'Exception thrown when > 10K ids created in 1 ms'); - -// Verify clock regression bumps clockseq -var uidt = uuid.v1({msecs: TIME}); -var uidtb = uuid.v1({msecs: TIME - 1}); -assert( - parseInt(uidtb.split('-')[3], 16) - parseInt(uidt.split('-')[3], 16) === 1, - 'Clock regression by msec increments the clockseq' -); - -// Verify clock regression bumps clockseq -var uidtn = uuid.v1({msecs: TIME, nsecs: 10}); -var uidtnb = uuid.v1({msecs: TIME, nsecs: 9}); -assert( - parseInt(uidtnb.split('-')[3], 16) - parseInt(uidtn.split('-')[3], 16) === 1, - 'Clock regression by nsec increments the clockseq' -); - -// Verify explicit options produce expected id -var id = uuid.v1({ - msecs: 1321651533573, - nsecs: 5432, - clockseq: 0x385c, - node: [ 0x61, 0xcd, 0x3c, 0xbb, 0x32, 0x10 ] -}); -assert(id == 'd9428888-122b-11e1-b85c-61cd3cbb3210', 'Explicit options produce expected id'); - -// Verify adjacent ids across a msec boundary are 1 time unit apart -var u0 = uuid.v1({msecs: TIME, nsecs: 9999}); -var u1 = uuid.v1({msecs: TIME + 1, nsecs: 0}); - -var before = u0.split('-')[0], after = u1.split('-')[0]; -var dt = parseInt(after, 16) - parseInt(before, 16); -assert(dt === 1, 'Ids spanning 1ms boundary are 100ns apart'); - -// -// Test parse/unparse -// - -id = '00112233445566778899aabbccddeeff'; -assert(uuid.unparse(uuid.parse(id.substr(0,10))) == - '00112233-4400-0000-0000-000000000000', 'Short parse'); -assert(uuid.unparse(uuid.parse('(this is the uuid -> ' + id + id)) == - '00112233-4455-6677-8899-aabbccddeeff', 'Dirty parse'); - -// -// Perf tests -// - -var generators = { - v1: uuid.v1, - v4: uuid.v4 -}; - -var UUID_FORMAT = { - v1: /[0-9a-f]{8}-[0-9a-f]{4}-1[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}/i, - v4: /[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}/i -}; - -var N = 1e4; - -// Get %'age an actual value differs from the ideal value -function divergence(actual, ideal) { - return Math.round(100*100*(actual - ideal)/ideal)/100; -} - -function rate(msg, t) { - log(msg + ': ' + (N / (Date.now() - t) * 1e3 | 0) + ' uuids\/second'); -} - -for (var version in generators) { - var counts = {}, max = 0; - var generator = generators[version]; - var format = UUID_FORMAT[version]; - - log('\nSanity check ' + N + ' ' + version + ' uuids'); - for (var i = 0, ok = 0; i < N; i++) { - id = generator(); - if (!format.test(id)) { - throw Error(id + ' is not a valid UUID string'); - } - - if (id != uuid.unparse(uuid.parse(id))) { - assert(fail, id + ' is not a valid id'); - } - - // Count digits for our randomness check - if (version == 'v4') { - var digits = id.replace(/-/g, '').split(''); - for (var j = digits.length-1; j >= 0; j--) { - var c = digits[j]; - max = Math.max(max, counts[c] = (counts[c] || 0) + 1); - } - } - } - - // Check randomness for v4 UUIDs - if (version == 'v4') { - // Limit that we get worried about randomness. (Purely empirical choice, this!) - var limit = 2*100*Math.sqrt(1/N); - - log('\nChecking v4 randomness. Distribution of Hex Digits (% deviation from ideal)'); - - for (var i = 0; i < 16; i++) { - var c = i.toString(16); - var bar = '', n = counts[c], p = Math.round(n/max*100|0); - - // 1-3,5-8, and D-F: 1:16 odds over 30 digits - var ideal = N*30/16; - if (i == 4) { - // 4: 1:1 odds on 1 digit, plus 1:16 odds on 30 digits - ideal = N*(1 + 30/16); - } else if (i >= 8 && i <= 11) { - // 8-B: 1:4 odds on 1 digit, plus 1:16 odds on 30 digits - ideal = N*(1/4 + 30/16); - } else { - // Otherwise: 1:16 odds on 30 digits - ideal = N*30/16; - } - var d = divergence(n, ideal); - - // Draw bar using UTF squares (just for grins) - var s = n/max*50 | 0; - while (s--) bar += '='; - - assert(Math.abs(d) < limit, c + ' |' + bar + '| ' + counts[c] + ' (' + d + '% < ' + limit + '%)'); - } - } -} - -// Perf tests -for (var version in generators) { - log('\nPerformance testing ' + version + ' UUIDs'); - var generator = generators[version]; - var buf = new uuid.BufferClass(16); - - for (var i = 0, t = Date.now(); i < N; i++) generator(); - rate('uuid.' + version + '()', t); - - for (var i = 0, t = Date.now(); i < N; i++) generator('binary'); - rate('uuid.' + version + '(\'binary\')', t); - - for (var i = 0, t = Date.now(); i < N; i++) generator('binary', buf); - rate('uuid.' + version + '(\'binary\', buffer)', t); -} diff --git a/node_modules/node-uuid/uuid.js b/node_modules/node-uuid/uuid.js deleted file mode 100644 index 89c5b8fb..00000000 --- a/node_modules/node-uuid/uuid.js +++ /dev/null @@ -1,272 +0,0 @@ -// uuid.js -// -// Copyright (c) 2010-2012 Robert Kieffer -// MIT License - http://opensource.org/licenses/mit-license.php - -/*global window, require, define */ -(function(_window) { - 'use strict'; - - // Unique ID creation requires a high quality random # generator. We feature - // detect to determine the best RNG source, normalizing to a function that - // returns 128-bits of randomness, since that's what's usually required - var _rng, _mathRNG, _nodeRNG, _whatwgRNG, _previousRoot; - - function setupBrowser() { - // Allow for MSIE11 msCrypto - var _crypto = _window.crypto || _window.msCrypto; - - if (!_rng && _crypto && _crypto.getRandomValues) { - // WHATWG crypto-based RNG - http://wiki.whatwg.org/wiki/Crypto - // - // Moderately fast, high quality - try { - var _rnds8 = new Uint8Array(16); - _whatwgRNG = _rng = function whatwgRNG() { - _crypto.getRandomValues(_rnds8); - return _rnds8; - }; - _rng(); - } catch(e) {} - } - - if (!_rng) { - // Math.random()-based (RNG) - // - // If all else fails, use Math.random(). It's fast, but is of unspecified - // quality. - var _rnds = new Array(16); - _mathRNG = _rng = function() { - for (var i = 0, r; i < 16; i++) { - if ((i & 0x03) === 0) { r = Math.random() * 0x100000000; } - _rnds[i] = r >>> ((i & 0x03) << 3) & 0xff; - } - - return _rnds; - }; - if ('undefined' !== typeof console && console.warn) { - console.warn("[SECURITY] node-uuid: crypto not usable, falling back to insecure Math.random()"); - } - } - } - - function setupNode() { - // Node.js crypto-based RNG - http://nodejs.org/docs/v0.6.2/api/crypto.html - // - // Moderately fast, high quality - if ('function' === typeof require) { - try { - var _rb = require('crypto').randomBytes; - _nodeRNG = _rng = _rb && function() {return _rb(16);}; - _rng(); - } catch(e) {} - } - } - - if (_window) { - setupBrowser(); - } else { - setupNode(); - } - - // Buffer class to use - var BufferClass = ('function' === typeof Buffer) ? Buffer : Array; - - // Maps for number <-> hex string conversion - var _byteToHex = []; - var _hexToByte = {}; - for (var i = 0; i < 256; i++) { - _byteToHex[i] = (i + 0x100).toString(16).substr(1); - _hexToByte[_byteToHex[i]] = i; - } - - // **`parse()` - Parse a UUID into it's component bytes** - function parse(s, buf, offset) { - var i = (buf && offset) || 0, ii = 0; - - buf = buf || []; - s.toLowerCase().replace(/[0-9a-f]{2}/g, function(oct) { - if (ii < 16) { // Don't overflow! - buf[i + ii++] = _hexToByte[oct]; - } - }); - - // Zero out remaining bytes if string was short - while (ii < 16) { - buf[i + ii++] = 0; - } - - return buf; - } - - // **`unparse()` - Convert UUID byte array (ala parse()) into a string** - function unparse(buf, offset) { - var i = offset || 0, bth = _byteToHex; - return bth[buf[i++]] + bth[buf[i++]] + - bth[buf[i++]] + bth[buf[i++]] + '-' + - bth[buf[i++]] + bth[buf[i++]] + '-' + - bth[buf[i++]] + bth[buf[i++]] + '-' + - bth[buf[i++]] + bth[buf[i++]] + '-' + - bth[buf[i++]] + bth[buf[i++]] + - bth[buf[i++]] + bth[buf[i++]] + - bth[buf[i++]] + bth[buf[i++]]; - } - - // **`v1()` - Generate time-based UUID** - // - // Inspired by https://github.com/LiosK/UUID.js - // and http://docs.python.org/library/uuid.html - - // random #'s we need to init node and clockseq - var _seedBytes = _rng(); - - // Per 4.5, create and 48-bit node id, (47 random bits + multicast bit = 1) - var _nodeId = [ - _seedBytes[0] | 0x01, - _seedBytes[1], _seedBytes[2], _seedBytes[3], _seedBytes[4], _seedBytes[5] - ]; - - // Per 4.2.2, randomize (14 bit) clockseq - var _clockseq = (_seedBytes[6] << 8 | _seedBytes[7]) & 0x3fff; - - // Previous uuid creation time - var _lastMSecs = 0, _lastNSecs = 0; - - // See https://github.com/broofa/node-uuid for API details - function v1(options, buf, offset) { - var i = buf && offset || 0; - var b = buf || []; - - options = options || {}; - - var clockseq = (options.clockseq != null) ? options.clockseq : _clockseq; - - // UUID timestamps are 100 nano-second units since the Gregorian epoch, - // (1582-10-15 00:00). JSNumbers aren't precise enough for this, so - // time is handled internally as 'msecs' (integer milliseconds) and 'nsecs' - // (100-nanoseconds offset from msecs) since unix epoch, 1970-01-01 00:00. - var msecs = (options.msecs != null) ? options.msecs : new Date().getTime(); - - // Per 4.2.1.2, use count of uuid's generated during the current clock - // cycle to simulate higher resolution clock - var nsecs = (options.nsecs != null) ? options.nsecs : _lastNSecs + 1; - - // Time since last uuid creation (in msecs) - var dt = (msecs - _lastMSecs) + (nsecs - _lastNSecs)/10000; - - // Per 4.2.1.2, Bump clockseq on clock regression - if (dt < 0 && options.clockseq == null) { - clockseq = clockseq + 1 & 0x3fff; - } - - // Reset nsecs if clock regresses (new clockseq) or we've moved onto a new - // time interval - if ((dt < 0 || msecs > _lastMSecs) && options.nsecs == null) { - nsecs = 0; - } - - // Per 4.2.1.2 Throw error if too many uuids are requested - if (nsecs >= 10000) { - throw new Error('uuid.v1(): Can\'t create more than 10M uuids/sec'); - } - - _lastMSecs = msecs; - _lastNSecs = nsecs; - _clockseq = clockseq; - - // Per 4.1.4 - Convert from unix epoch to Gregorian epoch - msecs += 12219292800000; - - // `time_low` - var tl = ((msecs & 0xfffffff) * 10000 + nsecs) % 0x100000000; - b[i++] = tl >>> 24 & 0xff; - b[i++] = tl >>> 16 & 0xff; - b[i++] = tl >>> 8 & 0xff; - b[i++] = tl & 0xff; - - // `time_mid` - var tmh = (msecs / 0x100000000 * 10000) & 0xfffffff; - b[i++] = tmh >>> 8 & 0xff; - b[i++] = tmh & 0xff; - - // `time_high_and_version` - b[i++] = tmh >>> 24 & 0xf | 0x10; // include version - b[i++] = tmh >>> 16 & 0xff; - - // `clock_seq_hi_and_reserved` (Per 4.2.2 - include variant) - b[i++] = clockseq >>> 8 | 0x80; - - // `clock_seq_low` - b[i++] = clockseq & 0xff; - - // `node` - var node = options.node || _nodeId; - for (var n = 0; n < 6; n++) { - b[i + n] = node[n]; - } - - return buf ? buf : unparse(b); - } - - // **`v4()` - Generate random UUID** - - // See https://github.com/broofa/node-uuid for API details - function v4(options, buf, offset) { - // Deprecated - 'format' argument, as supported in v1.2 - var i = buf && offset || 0; - - if (typeof(options) === 'string') { - buf = (options === 'binary') ? new BufferClass(16) : null; - options = null; - } - options = options || {}; - - var rnds = options.random || (options.rng || _rng)(); - - // Per 4.4, set bits for version and `clock_seq_hi_and_reserved` - rnds[6] = (rnds[6] & 0x0f) | 0x40; - rnds[8] = (rnds[8] & 0x3f) | 0x80; - - // Copy bytes to buffer, if provided - if (buf) { - for (var ii = 0; ii < 16; ii++) { - buf[i + ii] = rnds[ii]; - } - } - - return buf || unparse(rnds); - } - - // Export public API - var uuid = v4; - uuid.v1 = v1; - uuid.v4 = v4; - uuid.parse = parse; - uuid.unparse = unparse; - uuid.BufferClass = BufferClass; - uuid._rng = _rng; - uuid._mathRNG = _mathRNG; - uuid._nodeRNG = _nodeRNG; - uuid._whatwgRNG = _whatwgRNG; - - if (('undefined' !== typeof module) && module.exports) { - // Publish as node.js module - module.exports = uuid; - } else if (typeof define === 'function' && define.amd) { - // Publish as AMD module - define(function() {return uuid;}); - - - } else { - // Publish as global (in browsers) - _previousRoot = _window.uuid; - - // **`noConflict()` - (browser only) to reset global 'uuid' var** - uuid.noConflict = function() { - _window.uuid = _previousRoot; - return uuid; - }; - - _window.uuid = uuid; - } -})('undefined' !== typeof window ? window : null); diff --git a/node_modules/number-is-nan/index.js b/node_modules/number-is-nan/index.js deleted file mode 100644 index 79be4b9c..00000000 --- a/node_modules/number-is-nan/index.js +++ /dev/null @@ -1,4 +0,0 @@ -'use strict'; -module.exports = Number.isNaN || function (x) { - return x !== x; -}; diff --git a/node_modules/number-is-nan/license b/node_modules/number-is-nan/license deleted file mode 100644 index 654d0bfe..00000000 --- a/node_modules/number-is-nan/license +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) Sindre Sorhus (sindresorhus.com) - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/node_modules/number-is-nan/package.json b/node_modules/number-is-nan/package.json deleted file mode 100644 index 07504f62..00000000 --- a/node_modules/number-is-nan/package.json +++ /dev/null @@ -1,104 +0,0 @@ -{ - "_args": [ - [ - { - "raw": "number-is-nan@^1.0.0", - "scope": null, - "escapedName": "number-is-nan", - "name": "number-is-nan", - "rawSpec": "^1.0.0", - "spec": ">=1.0.0 <2.0.0", - "type": "range" - }, - "/Users/benjaminarias/Desktop/poly/node_modules/is-finite" - ] - ], - "_from": "number-is-nan@>=1.0.0 <2.0.0", - "_id": "number-is-nan@1.0.1", - "_inCache": true, - "_installable": true, - "_location": "/number-is-nan", - "_nodeVersion": "4.5.0", - "_npmOperationalInternal": { - "host": "packages-12-west.internal.npmjs.com", - "tmp": "tmp/number-is-nan-1.0.1.tgz_1475212313367_0.9480371843092144" - }, - "_npmUser": { - "name": "sindresorhus", - "email": "sindresorhus@gmail.com" - }, - "_npmVersion": "2.15.9", - "_phantomChildren": {}, - "_requested": { - "raw": "number-is-nan@^1.0.0", - "scope": null, - "escapedName": "number-is-nan", - "name": "number-is-nan", - "rawSpec": "^1.0.0", - "spec": ">=1.0.0 <2.0.0", - "type": "range" - }, - "_requiredBy": [ - "/is-finite" - ], - "_resolved": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz", - "_shasum": "097b602b53422a522c1afb8790318336941a011d", - "_shrinkwrap": null, - "_spec": "number-is-nan@^1.0.0", - "_where": "/Users/benjaminarias/Desktop/poly/node_modules/is-finite", - "author": { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "sindresorhus.com" - }, - "bugs": { - "url": "https://github.com/sindresorhus/number-is-nan/issues" - }, - "dependencies": {}, - "description": "ES2015 Number.isNaN() ponyfill", - "devDependencies": { - "ava": "*" - }, - "directories": {}, - "dist": { - "shasum": "097b602b53422a522c1afb8790318336941a011d", - "tarball": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz" - }, - "engines": { - "node": ">=0.10.0" - }, - "files": [ - "index.js" - ], - "gitHead": "ed9cdac3f428cc929b61bb230da42c87477af4b9", - "homepage": "https://github.com/sindresorhus/number-is-nan#readme", - "keywords": [ - "es2015", - "ecmascript", - "ponyfill", - "polyfill", - "shim", - "number", - "is", - "nan", - "not" - ], - "license": "MIT", - "maintainers": [ - { - "name": "sindresorhus", - "email": "sindresorhus@gmail.com" - } - ], - "name": "number-is-nan", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git+https://github.com/sindresorhus/number-is-nan.git" - }, - "scripts": { - "test": "ava" - }, - "version": "1.0.1" -} diff --git a/node_modules/number-is-nan/readme.md b/node_modules/number-is-nan/readme.md deleted file mode 100644 index 24635087..00000000 --- a/node_modules/number-is-nan/readme.md +++ /dev/null @@ -1,28 +0,0 @@ -# number-is-nan [![Build Status](https://travis-ci.org/sindresorhus/number-is-nan.svg?branch=master)](https://travis-ci.org/sindresorhus/number-is-nan) - -> ES2015 [`Number.isNaN()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/isNaN) [ponyfill](https://ponyfill.com) - - -## Install - -``` -$ npm install --save number-is-nan -``` - - -## Usage - -```js -var numberIsNan = require('number-is-nan'); - -numberIsNan(NaN); -//=> true - -numberIsNan('unicorn'); -//=> false -``` - - -## License - -MIT © [Sindre Sorhus](http://sindresorhus.com) diff --git a/node_modules/oauth-sign/LICENSE b/node_modules/oauth-sign/LICENSE deleted file mode 100644 index a4a9aee0..00000000 --- a/node_modules/oauth-sign/LICENSE +++ /dev/null @@ -1,55 +0,0 @@ -Apache License - -Version 2.0, January 2004 - -http://www.apache.org/licenses/ - -TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - -1. Definitions. - -"License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. - -"Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. - -"Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. - -"You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. - -"Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. - -"Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. - -"Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). - -"Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. - -"Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." - -"Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. - -2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. - -3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. - -4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: - -You must give any other recipients of the Work or Derivative Works a copy of this License; and - -You must cause any modified files to carry prominent notices stating that You changed the files; and - -You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and - -If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. - -5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. - -6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. - -7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. - -8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. - -9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. - -END OF TERMS AND CONDITIONS \ No newline at end of file diff --git a/node_modules/oauth-sign/README.md b/node_modules/oauth-sign/README.md deleted file mode 100644 index 34c4a85d..00000000 --- a/node_modules/oauth-sign/README.md +++ /dev/null @@ -1,4 +0,0 @@ -oauth-sign -========== - -OAuth 1 signing. Formerly a vendor lib in mikeal/request, now a standalone module. diff --git a/node_modules/oauth-sign/index.js b/node_modules/oauth-sign/index.js deleted file mode 100644 index dadcba97..00000000 --- a/node_modules/oauth-sign/index.js +++ /dev/null @@ -1,136 +0,0 @@ -var crypto = require('crypto') - , qs = require('querystring') - ; - -function sha1 (key, body) { - return crypto.createHmac('sha1', key).update(body).digest('base64') -} - -function rsa (key, body) { - return crypto.createSign("RSA-SHA1").update(body).sign(key, 'base64'); -} - -function rfc3986 (str) { - return encodeURIComponent(str) - .replace(/!/g,'%21') - .replace(/\*/g,'%2A') - .replace(/\(/g,'%28') - .replace(/\)/g,'%29') - .replace(/'/g,'%27') - ; -} - -// Maps object to bi-dimensional array -// Converts { foo: 'A', bar: [ 'b', 'B' ]} to -// [ ['foo', 'A'], ['bar', 'b'], ['bar', 'B'] ] -function map (obj) { - var key, val, arr = [] - for (key in obj) { - val = obj[key] - if (Array.isArray(val)) - for (var i = 0; i < val.length; i++) - arr.push([key, val[i]]) - else if (typeof val === "object") - for (var prop in val) - arr.push([key + '[' + prop + ']', val[prop]]); - else - arr.push([key, val]) - } - return arr -} - -// Compare function for sort -function compare (a, b) { - return a > b ? 1 : a < b ? -1 : 0 -} - -function generateBase (httpMethod, base_uri, params) { - // adapted from https://dev.twitter.com/docs/auth/oauth and - // https://dev.twitter.com/docs/auth/creating-signature - - // Parameter normalization - // http://tools.ietf.org/html/rfc5849#section-3.4.1.3.2 - var normalized = map(params) - // 1. First, the name and value of each parameter are encoded - .map(function (p) { - return [ rfc3986(p[0]), rfc3986(p[1] || '') ] - }) - // 2. The parameters are sorted by name, using ascending byte value - // ordering. If two or more parameters share the same name, they - // are sorted by their value. - .sort(function (a, b) { - return compare(a[0], b[0]) || compare(a[1], b[1]) - }) - // 3. The name of each parameter is concatenated to its corresponding - // value using an "=" character (ASCII code 61) as a separator, even - // if the value is empty. - .map(function (p) { return p.join('=') }) - // 4. The sorted name/value pairs are concatenated together into a - // single string by using an "&" character (ASCII code 38) as - // separator. - .join('&') - - var base = [ - rfc3986(httpMethod ? httpMethod.toUpperCase() : 'GET'), - rfc3986(base_uri), - rfc3986(normalized) - ].join('&') - - return base -} - -function hmacsign (httpMethod, base_uri, params, consumer_secret, token_secret) { - var base = generateBase(httpMethod, base_uri, params) - var key = [ - consumer_secret || '', - token_secret || '' - ].map(rfc3986).join('&') - - return sha1(key, base) -} - -function rsasign (httpMethod, base_uri, params, private_key, token_secret) { - var base = generateBase(httpMethod, base_uri, params) - var key = private_key || '' - - return rsa(key, base) -} - -function plaintext (consumer_secret, token_secret) { - var key = [ - consumer_secret || '', - token_secret || '' - ].map(rfc3986).join('&') - - return key -} - -function sign (signMethod, httpMethod, base_uri, params, consumer_secret, token_secret) { - var method - var skipArgs = 1 - - switch (signMethod) { - case 'RSA-SHA1': - method = rsasign - break - case 'HMAC-SHA1': - method = hmacsign - break - case 'PLAINTEXT': - method = plaintext - skipArgs = 4 - break - default: - throw new Error("Signature method not supported: " + signMethod) - } - - return method.apply(null, [].slice.call(arguments, skipArgs)) -} - -exports.hmacsign = hmacsign -exports.rsasign = rsasign -exports.plaintext = plaintext -exports.sign = sign -exports.rfc3986 = rfc3986 -exports.generateBase = generateBase - diff --git a/node_modules/oauth-sign/package.json b/node_modules/oauth-sign/package.json deleted file mode 100644 index bcc8a6ff..00000000 --- a/node_modules/oauth-sign/package.json +++ /dev/null @@ -1,100 +0,0 @@ -{ - "_args": [ - [ - { - "raw": "oauth-sign@~0.8.1", - "scope": null, - "escapedName": "oauth-sign", - "name": "oauth-sign", - "rawSpec": "~0.8.1", - "spec": ">=0.8.1 <0.9.0", - "type": "range" - }, - "/Users/benjaminarias/Desktop/poly/node_modules/request" - ] - ], - "_from": "oauth-sign@>=0.8.1 <0.9.0", - "_id": "oauth-sign@0.8.2", - "_inCache": true, - "_installable": true, - "_location": "/oauth-sign", - "_nodeVersion": "5.9.0", - "_npmOperationalInternal": { - "host": "packages-12-west.internal.npmjs.com", - "tmp": "tmp/oauth-sign-0.8.2.tgz_1462396399020_0.8175400267355144" - }, - "_npmUser": { - "name": "simov", - "email": "simeonvelichkov@gmail.com" - }, - "_npmVersion": "2.15.3", - "_phantomChildren": {}, - "_requested": { - "raw": "oauth-sign@~0.8.1", - "scope": null, - "escapedName": "oauth-sign", - "name": "oauth-sign", - "rawSpec": "~0.8.1", - "spec": ">=0.8.1 <0.9.0", - "type": "range" - }, - "_requiredBy": [ - "/google-auth-library/request", - "/request" - ], - "_resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.8.2.tgz", - "_shasum": "46a6ab7f0aead8deae9ec0565780b7d4efeb9d43", - "_shrinkwrap": null, - "_spec": "oauth-sign@~0.8.1", - "_where": "/Users/benjaminarias/Desktop/poly/node_modules/request", - "author": { - "name": "Mikeal Rogers", - "email": "mikeal.rogers@gmail.com", - "url": "http://www.futurealoof.com" - }, - "bugs": { - "url": "https://github.com/mikeal/oauth-sign/issues" - }, - "dependencies": {}, - "description": "OAuth 1 signing. Formerly a vendor lib in mikeal/request, now a standalone module.", - "devDependencies": {}, - "directories": {}, - "dist": { - "shasum": "46a6ab7f0aead8deae9ec0565780b7d4efeb9d43", - "tarball": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.8.2.tgz" - }, - "engines": { - "node": "*" - }, - "files": [ - "index.js" - ], - "gitHead": "0b034206316132f57e26970152c2fb18e71bddd5", - "homepage": "https://github.com/mikeal/oauth-sign#readme", - "license": "Apache-2.0", - "main": "index.js", - "maintainers": [ - { - "name": "mikeal", - "email": "mikeal.rogers@gmail.com" - }, - { - "name": "nylen", - "email": "jnylen@gmail.com" - }, - { - "name": "simov", - "email": "simeonvelichkov@gmail.com" - } - ], - "name": "oauth-sign", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "url": "git+https://github.com/mikeal/oauth-sign.git" - }, - "scripts": { - "test": "node test.js" - }, - "version": "0.8.2" -} diff --git a/node_modules/object-assign/index.js b/node_modules/object-assign/index.js deleted file mode 100644 index 4885db70..00000000 --- a/node_modules/object-assign/index.js +++ /dev/null @@ -1,37 +0,0 @@ -'use strict'; - -function ToObject(val) { - if (val == null) { - throw new TypeError('Object.assign cannot be called with null or undefined'); - } - - return Object(val); -} - -module.exports = Object.assign || function (target, source) { - var pendingException; - var from; - var keys; - var to = ToObject(target); - - for (var s = 1; s < arguments.length; s++) { - from = arguments[s]; - keys = Object.keys(Object(from)); - - for (var i = 0; i < keys.length; i++) { - try { - to[keys[i]] = from[keys[i]]; - } catch (err) { - if (pendingException === undefined) { - pendingException = err; - } - } - } - } - - if (pendingException) { - throw pendingException; - } - - return to; -}; diff --git a/node_modules/object-assign/package.json b/node_modules/object-assign/package.json deleted file mode 100644 index 5ca53f6b..00000000 --- a/node_modules/object-assign/package.json +++ /dev/null @@ -1,102 +0,0 @@ -{ - "_args": [ - [ - { - "raw": "object-assign@^1.0.0", - "scope": null, - "escapedName": "object-assign", - "name": "object-assign", - "rawSpec": "^1.0.0", - "spec": ">=1.0.0 <2.0.0", - "type": "range" - }, - "/Users/benjaminarias/Desktop/poly/node_modules/meow" - ] - ], - "_from": "object-assign@>=1.0.0 <2.0.0", - "_id": "object-assign@1.0.0", - "_inCache": true, - "_installable": true, - "_location": "/object-assign", - "_npmUser": { - "name": "sindresorhus", - "email": "sindresorhus@gmail.com" - }, - "_npmVersion": "1.4.21", - "_phantomChildren": {}, - "_requested": { - "raw": "object-assign@^1.0.0", - "scope": null, - "escapedName": "object-assign", - "name": "object-assign", - "rawSpec": "^1.0.0", - "spec": ">=1.0.0 <2.0.0", - "type": "range" - }, - "_requiredBy": [ - "/meow" - ], - "_resolved": "https://registry.npmjs.org/object-assign/-/object-assign-1.0.0.tgz", - "_shasum": "e65dc8766d3b47b4b8307465c8311da030b070a6", - "_shrinkwrap": null, - "_spec": "object-assign@^1.0.0", - "_where": "/Users/benjaminarias/Desktop/poly/node_modules/meow", - "author": { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "http://sindresorhus.com" - }, - "bugs": { - "url": "https://github.com/sindresorhus/object-assign/issues" - }, - "dependencies": {}, - "description": "ES6 Object.assign() ponyfill", - "devDependencies": { - "mocha": "*" - }, - "directories": {}, - "dist": { - "shasum": "e65dc8766d3b47b4b8307465c8311da030b070a6", - "tarball": "https://registry.npmjs.org/object-assign/-/object-assign-1.0.0.tgz" - }, - "engines": { - "node": ">=0.10.0" - }, - "files": [ - "index.js" - ], - "gitHead": "a17eef6882cf3ffcee46f7d9d5a5ba0abc6b029c", - "homepage": "https://github.com/sindresorhus/object-assign", - "keywords": [ - "object", - "assign", - "extend", - "properties", - "es6", - "ecmascript", - "harmony", - "ponyfill", - "prollyfill", - "polyfill", - "shim", - "browser" - ], - "license": "MIT", - "maintainers": [ - { - "name": "sindresorhus", - "email": "sindresorhus@gmail.com" - } - ], - "name": "object-assign", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git+https://github.com/sindresorhus/object-assign.git" - }, - "scripts": { - "test": "mocha" - }, - "version": "1.0.0" -} diff --git a/node_modules/object-assign/readme.md b/node_modules/object-assign/readme.md deleted file mode 100644 index 24cdf762..00000000 --- a/node_modules/object-assign/readme.md +++ /dev/null @@ -1,47 +0,0 @@ -# object-assign [![Build Status](https://travis-ci.org/sindresorhus/object-assign.svg?branch=master)](https://travis-ci.org/sindresorhus/object-assign) - -> ES6 [`Object.assign()`](http://www.2ality.com/2014/01/object-assign.html) ponyfill - -> Ponyfill: A polyfill that doesn't overwrite the native method - - -## Install - -```sh -$ npm install --save object-assign -``` - - -## Usage - -```js -var objectAssign = require('object-assign'); - -objectAssign({foo: 0}, {bar: 1}); -//=> {foo: 0, bar: 1} - -// multiple sources -objectAssign({foo: 0}, {bar: 1}, {baz: 3}); -//=> {foo: 0, bar: 1, baz: 2} - -// ignores null and undefined sources -objectAssign({foo: 0}, null, {bar: 1}, undefined); -//=> {foo: 0, bar: 1, baz: 2} -``` - - -## API - -### objectAssign(target, source, [source, ...]) - -Assigns enumerable own properties of `source` objects to the `target` object and returns the `target` object. Additional `source` objects will overwrite previous ones. - - -## Resources - -- [ES6 spec - Object.assign](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-object.assign) - - -## License - -MIT © [Sindre Sorhus](http://sindresorhus.com) diff --git a/node_modules/object-keys/.npmignore b/node_modules/object-keys/.npmignore deleted file mode 100644 index 3c3629e6..00000000 --- a/node_modules/object-keys/.npmignore +++ /dev/null @@ -1 +0,0 @@ -node_modules diff --git a/node_modules/object-keys/.travis.yml b/node_modules/object-keys/.travis.yml deleted file mode 100644 index 8170a81f..00000000 --- a/node_modules/object-keys/.travis.yml +++ /dev/null @@ -1,4 +0,0 @@ -language: node_js -node_js: - - "0.8" - - "0.6" diff --git a/node_modules/object-keys/README.md b/node_modules/object-keys/README.md deleted file mode 100644 index c49e3a80..00000000 --- a/node_modules/object-keys/README.md +++ /dev/null @@ -1,38 +0,0 @@ -#object-keys [![Version Badge][2]][1] - -[![Build Status][3]][4] [![dependency status][5]][6] - -[![browser support][7]][8] - -An Object.keys shim. Uses Object.keys if available. - -## Example - -```js -var keys = require('object-keys'); -var assert = require('assert'); -var obj = { - a: true, - b: true, - c: true -}; - -assert.equal(keys(obj), ['a', 'b', 'c']); -``` - -## Source -Implementation taken directly from [9] - -## Tests -Tests currently use tape - which doesn't work in node 0.10, but works in browserify. Rest assured, they pass. - -[1]: https://npmjs.org/package/object-keys -[2]: http://vb.teelaun.ch/ljharb/object-keys.svg -[3]: https://travis-ci.org/ljharb/object-keys.png -[4]: https://travis-ci.org/ljharb/object-keys -[5]: https://david-dm.org/ljharb/object-keys.png -[6]: https://david-dm.org/ljharb/object-keys -[7]: https://ci.testling.com/ljharb/object-keys.png -[8]: https://ci.testling.com/ljharb/object-keys -[9]: https://github.com/kriskowal/es5-shim/blob/master/es5-shim.js#L542-589 - diff --git a/node_modules/object-keys/index.js b/node_modules/object-keys/index.js deleted file mode 100644 index f5b24b6d..00000000 --- a/node_modules/object-keys/index.js +++ /dev/null @@ -1,2 +0,0 @@ -module.exports = Object.keys || require('./shim'); - diff --git a/node_modules/object-keys/package.json b/node_modules/object-keys/package.json deleted file mode 100644 index 72036e32..00000000 --- a/node_modules/object-keys/package.json +++ /dev/null @@ -1,108 +0,0 @@ -{ - "_args": [ - [ - { - "raw": "object-keys@~0.2.0", - "scope": null, - "escapedName": "object-keys", - "name": "object-keys", - "rawSpec": "~0.2.0", - "spec": ">=0.2.0 <0.3.0", - "type": "range" - }, - "/Users/benjaminarias/Desktop/poly/node_modules/level-sublevel/node_modules/xtend" - ] - ], - "_from": "object-keys@>=0.2.0 <0.3.0", - "_id": "object-keys@0.2.0", - "_inCache": true, - "_installable": true, - "_location": "/object-keys", - "_npmUser": { - "name": "ljharb", - "email": "ljharb@gmail.com" - }, - "_npmVersion": "1.2.18", - "_phantomChildren": {}, - "_requested": { - "raw": "object-keys@~0.2.0", - "scope": null, - "escapedName": "object-keys", - "name": "object-keys", - "rawSpec": "~0.2.0", - "spec": ">=0.2.0 <0.3.0", - "type": "range" - }, - "_requiredBy": [ - "/level-sublevel/xtend" - ], - "_resolved": "https://registry.npmjs.org/object-keys/-/object-keys-0.2.0.tgz", - "_shasum": "cddec02998b091be42bf1035ae32e49f1cb6ea67", - "_shrinkwrap": null, - "_spec": "object-keys@~0.2.0", - "_where": "/Users/benjaminarias/Desktop/poly/node_modules/level-sublevel/node_modules/xtend", - "author": { - "name": "Jordan Harband" - }, - "bugs": { - "url": "https://github.com/ljharb/object-keys/issues" - }, - "dependencies": { - "foreach": "~2.0.1", - "indexof": "~0.0.1", - "is": "~0.2.6" - }, - "deprecated": "Please update to the latest object-keys", - "description": "An Object.keys replacement, in case Object.keys is not available. From https://github.com/kriskowal/es5-shim", - "devDependencies": { - "tape": "~1.0.2" - }, - "directories": {}, - "dist": { - "shasum": "cddec02998b091be42bf1035ae32e49f1cb6ea67", - "tarball": "https://registry.npmjs.org/object-keys/-/object-keys-0.2.0.tgz" - }, - "homepage": "https://github.com/ljharb/object-keys#readme", - "keywords": [ - "Object.keys", - "keys", - "ES5", - "shim" - ], - "license": "MIT", - "main": "index.js", - "maintainers": [ - { - "name": "ljharb", - "email": "ljharb@gmail.com" - } - ], - "name": "object-keys", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git://github.com/ljharb/object-keys.git" - }, - "scripts": { - "test": "node test.js" - }, - "testling": { - "files": "test.js", - "browsers": [ - "iexplore/6.0..latest", - "firefox/3.0..6.0", - "firefox/15.0..latest", - "firefox/nightly", - "chrome/4.0..10.0", - "chrome/20.0..latest", - "chrome/canary", - "opera/10.0..latest", - "opera/next", - "safari/4.0..latest", - "ipad/6.0..latest", - "iphone/6.0..latest" - ] - }, - "version": "0.2.0" -} diff --git a/node_modules/object-keys/shim.js b/node_modules/object-keys/shim.js deleted file mode 100644 index 0d13f4a5..00000000 --- a/node_modules/object-keys/shim.js +++ /dev/null @@ -1,44 +0,0 @@ -(function () { - "use strict"; - - // modified from https://github.com/kriskowal/es5-shim - var has = Object.prototype.hasOwnProperty, - is = require('is'), - forEach = require('foreach'), - hasDontEnumBug = !({'toString': null}).propertyIsEnumerable('toString'), - dontEnums = [ - "toString", - "toLocaleString", - "valueOf", - "hasOwnProperty", - "isPrototypeOf", - "propertyIsEnumerable", - "constructor" - ], - keysShim; - - keysShim = function keys(object) { - if (!is.object(object) && !is.array(object)) { - throw new TypeError("Object.keys called on a non-object"); - } - - var name, theKeys = []; - for (name in object) { - if (has.call(object, name)) { - theKeys.push(name); - } - } - - if (hasDontEnumBug) { - forEach(dontEnums, function (dontEnum) { - if (has.call(object, dontEnum)) { - theKeys.push(dontEnum); - } - }); - } - return theKeys; - }; - - module.exports = keysShim; -}()); - diff --git a/node_modules/object-keys/test.js b/node_modules/object-keys/test.js deleted file mode 100644 index 66737015..00000000 --- a/node_modules/object-keys/test.js +++ /dev/null @@ -1,88 +0,0 @@ -var test = require('tape'); -var shimmedKeys = require('./index.js'); -var is = require('is'); -var keys = require('./shim.js'); -var forEach = require('foreach'); -var indexOf = require('indexof'); - -test('works', function (t) { - var obj = { - "str": "boz", - "obj": {}, - "arr": [], - "bool": true, - "num": 42, - "aNull": null, - "undef": undefined - }; - var objKeys = ['str', 'obj', 'arr', 'bool', 'num', 'aNull', 'undef']; - - t.test('exports a function', function (st) { - if (Object.keys) { - st.equal(Object.keys, shimmedKeys, 'Object.keys is supported and exported'); - } else { - st.equal(keys, shimmedKeys, 'Object.keys is not supported; shim is exported'); - } - st.end(); - }); - - t.test('working with actual shim', function (st) { - st.notEqual(Object.keys, keys, 'keys shim is not native Object.keys'); - st.end(); - }); - - t.test('works with an object literal', function (st) { - var theKeys = keys(obj); - st.equal(is.array(theKeys), true, 'returns an array'); - st.deepEqual(theKeys, objKeys, 'Object has expected keys'); - st.end(); - }); - - t.test('works with an array', function (st) { - var arr = [1, 2, 3]; - var theKeys = keys(arr); - st.equal(is.array(theKeys), true, 'returns an array'); - st.deepEqual(theKeys, ['0', '1', '2'], 'Array has expected keys'); - st.end(); - }); - - t.test('returns names which are own properties', function (st) { - forEach(keys(obj), function (name) { - st.equal(obj.hasOwnProperty(name), true, name + ' should be returned'); - }); - st.end(); - }); - - t.test('returns names which are enumerable', function (st) { - var k, loopedValues = []; - for (k in obj) { - loopedValues.push(k); - } - forEach(keys(obj), function (name) { - st.notEqual(indexOf(loopedValues, name), -1, name + ' is not enumerable'); - }); - st.end(); - }); - - t.test('throws an error for a non-object', function (st) { - st.throws( - function () { return keys(42); }, - new TypeError('Object.keys called on a non-object'), - 'throws on a non-object' - ); - st.end(); - }); - t.end(); -}); - -test('works with an object instance', function (t) { - var Prototype = function () {}; - Prototype.prototype.foo = true; - var obj = new Prototype(); - obj.bar = true; - var theKeys = keys(obj); - t.equal(is.array(theKeys), true, 'returns an array'); - t.deepEqual(theKeys, ['bar'], 'Instance has expected keys'); - t.end(); -}); - diff --git a/node_modules/octal/.npmignore b/node_modules/octal/.npmignore deleted file mode 100644 index 3c3629e6..00000000 --- a/node_modules/octal/.npmignore +++ /dev/null @@ -1 +0,0 @@ -node_modules diff --git a/node_modules/octal/.travis.yml b/node_modules/octal/.travis.yml deleted file mode 100644 index ab2fee27..00000000 --- a/node_modules/octal/.travis.yml +++ /dev/null @@ -1,6 +0,0 @@ -language: node_js -node_js: - - '5' - - '4' - - '0.12' - - '0.10' diff --git a/node_modules/octal/LICENSE b/node_modules/octal/LICENSE deleted file mode 100644 index 66a4d2a1..00000000 --- a/node_modules/octal/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2015 Mathias Buus - -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/node_modules/octal/README.md b/node_modules/octal/README.md deleted file mode 100644 index 930fa8bd..00000000 --- a/node_modules/octal/README.md +++ /dev/null @@ -1,22 +0,0 @@ -# octal - -Interpret a number as base 8. - -Same as the `0` notation but works in strict mode / standard js. - -``` -npm install octal -``` - -[![build status](http://img.shields.io/travis/mafintosh/octal.svg?style=flat)](http://travis-ci.org/mafintosh/octal) - -## Usage - -``` js -var octal = require('octal') -console.log(octal(777)) // prints 511 which is 0777 -``` - -## License - -MIT diff --git a/node_modules/octal/index.js b/node_modules/octal/index.js deleted file mode 100644 index 7b0711b6..00000000 --- a/node_modules/octal/index.js +++ /dev/null @@ -1,3 +0,0 @@ -module.exports = function (num, base) { - return parseInt(num.toString(), base || 8) -} diff --git a/node_modules/octal/package.json b/node_modules/octal/package.json deleted file mode 100644 index ca8fcf8d..00000000 --- a/node_modules/octal/package.json +++ /dev/null @@ -1,81 +0,0 @@ -{ - "_args": [ - [ - { - "raw": "octal@^1.0.0", - "scope": null, - "escapedName": "octal", - "name": "octal", - "rawSpec": "^1.0.0", - "spec": ">=1.0.0 <2.0.0", - "type": "range" - }, - "/Users/benjaminarias/Desktop/poly/node_modules/level-filesystem" - ] - ], - "_from": "octal@>=1.0.0 <2.0.0", - "_id": "octal@1.0.0", - "_inCache": true, - "_installable": true, - "_location": "/octal", - "_nodeVersion": "4.2.2", - "_npmUser": { - "name": "mafintosh", - "email": "mathiasbuus@gmail.com" - }, - "_npmVersion": "2.14.7", - "_phantomChildren": {}, - "_requested": { - "raw": "octal@^1.0.0", - "scope": null, - "escapedName": "octal", - "name": "octal", - "rawSpec": "^1.0.0", - "spec": ">=1.0.0 <2.0.0", - "type": "range" - }, - "_requiredBy": [ - "/level-filesystem" - ], - "_resolved": "https://registry.npmjs.org/octal/-/octal-1.0.0.tgz", - "_shasum": "63e7162a68efbeb9e213588d58e989d1e5c4530b", - "_shrinkwrap": null, - "_spec": "octal@^1.0.0", - "_where": "/Users/benjaminarias/Desktop/poly/node_modules/level-filesystem", - "author": { - "name": "Mathias Buus", - "url": "@mafintosh" - }, - "bugs": { - "url": "https://github.com/mafintosh/octal/issues" - }, - "dependencies": {}, - "description": "Interpret a number as base 8", - "devDependencies": { - "tape": "^4.2.2" - }, - "directories": {}, - "dist": { - "shasum": "63e7162a68efbeb9e213588d58e989d1e5c4530b", - "tarball": "https://registry.npmjs.org/octal/-/octal-1.0.0.tgz" - }, - "gitHead": "4fd1af09d4e4f6954b13c324a98f26b0f2d2fa0a", - "homepage": "https://github.com/mafintosh/octal", - "license": "MIT", - "main": "index.js", - "maintainers": [ - { - "name": "mafintosh", - "email": "mathiasbuus@gmail.com" - } - ], - "name": "octal", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git+https://github.com/mafintosh/octal.git" - }, - "scripts": {}, - "version": "1.0.0" -} diff --git a/node_modules/octal/test.js b/node_modules/octal/test.js deleted file mode 100644 index c96b3c31..00000000 --- a/node_modules/octal/test.js +++ /dev/null @@ -1,10 +0,0 @@ -var tape = require('tape') -var octal = require('./') - -tape('parses', function (t) { - t.same(octal(0), 0, 'octal(0)') - t.same(octal(10), 8, 'octal(10)') - t.same(octal(100), 8 * 8, 'octal(100)') - t.same(octal(8).toString(), 'NaN', 'octal(8)') - t.end() -}) diff --git a/node_modules/once/LICENSE b/node_modules/once/LICENSE deleted file mode 100644 index 19129e31..00000000 --- a/node_modules/once/LICENSE +++ /dev/null @@ -1,15 +0,0 @@ -The ISC License - -Copyright (c) Isaac Z. Schlueter and Contributors - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR -IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/node_modules/once/README.md b/node_modules/once/README.md deleted file mode 100644 index 1f1ffca9..00000000 --- a/node_modules/once/README.md +++ /dev/null @@ -1,79 +0,0 @@ -# once - -Only call a function once. - -## usage - -```javascript -var once = require('once') - -function load (file, cb) { - cb = once(cb) - loader.load('file') - loader.once('load', cb) - loader.once('error', cb) -} -``` - -Or add to the Function.prototype in a responsible way: - -```javascript -// only has to be done once -require('once').proto() - -function load (file, cb) { - cb = cb.once() - loader.load('file') - loader.once('load', cb) - loader.once('error', cb) -} -``` - -Ironically, the prototype feature makes this module twice as -complicated as necessary. - -To check whether you function has been called, use `fn.called`. Once the -function is called for the first time the return value of the original -function is saved in `fn.value` and subsequent calls will continue to -return this value. - -```javascript -var once = require('once') - -function load (cb) { - cb = once(cb) - var stream = createStream() - stream.once('data', cb) - stream.once('end', function () { - if (!cb.called) cb(new Error('not found')) - }) -} -``` - -## `once.strict(func)` - -Throw an error if the function is called twice. - -Some functions are expected to be called only once. Using `once` for them would -potentially hide logical errors. - -In the example below, the `greet` function has to call the callback only once: - -```javascript -function greet (name, cb) { - // return is missing from the if statement - // when no name is passed, the callback is called twice - if (!name) cb('Hello anonymous') - cb('Hello ' + name) -} - -function log (msg) { - console.log(msg) -} - -// this will print 'Hello anonymous' but the logical error will be missed -greet(null, once(msg)) - -// once.strict will print 'Hello anonymous' and throw an error when the callback will be called the second time -greet(null, once.strict(msg)) -``` diff --git a/node_modules/once/once.js b/node_modules/once/once.js deleted file mode 100644 index 23540673..00000000 --- a/node_modules/once/once.js +++ /dev/null @@ -1,42 +0,0 @@ -var wrappy = require('wrappy') -module.exports = wrappy(once) -module.exports.strict = wrappy(onceStrict) - -once.proto = once(function () { - Object.defineProperty(Function.prototype, 'once', { - value: function () { - return once(this) - }, - configurable: true - }) - - Object.defineProperty(Function.prototype, 'onceStrict', { - value: function () { - return onceStrict(this) - }, - configurable: true - }) -}) - -function once (fn) { - var f = function () { - if (f.called) return f.value - f.called = true - return f.value = fn.apply(this, arguments) - } - f.called = false - return f -} - -function onceStrict (fn) { - var f = function () { - if (f.called) - throw new Error(f.onceError) - f.called = true - return f.value = fn.apply(this, arguments) - } - var name = fn.name || 'Function wrapped with `once`' - f.onceError = name + " shouldn't be called more than once" - f.called = false - return f -} diff --git a/node_modules/once/package.json b/node_modules/once/package.json deleted file mode 100644 index 9743960f..00000000 --- a/node_modules/once/package.json +++ /dev/null @@ -1,102 +0,0 @@ -{ - "_args": [ - [ - { - "raw": "once@^1.3.0", - "scope": null, - "escapedName": "once", - "name": "once", - "rawSpec": "^1.3.0", - "spec": ">=1.3.0 <2.0.0", - "type": "range" - }, - "/Users/benjaminarias/Desktop/poly/node_modules/glob" - ] - ], - "_from": "once@>=1.3.0 <2.0.0", - "_id": "once@1.4.0", - "_inCache": true, - "_installable": true, - "_location": "/once", - "_nodeVersion": "6.5.0", - "_npmOperationalInternal": { - "host": "packages-12-west.internal.npmjs.com", - "tmp": "tmp/once-1.4.0.tgz_1473196269128_0.537820661207661" - }, - "_npmUser": { - "name": "isaacs", - "email": "i@izs.me" - }, - "_npmVersion": "3.10.7", - "_phantomChildren": {}, - "_requested": { - "raw": "once@^1.3.0", - "scope": null, - "escapedName": "once", - "name": "once", - "rawSpec": "^1.3.0", - "spec": ">=1.3.0 <2.0.0", - "type": "range" - }, - "_requiredBy": [ - "/glob", - "/inflight" - ], - "_resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", - "_shasum": "583b1aa775961d4b113ac17d9c50baef9dd76bd1", - "_shrinkwrap": null, - "_spec": "once@^1.3.0", - "_where": "/Users/benjaminarias/Desktop/poly/node_modules/glob", - "author": { - "name": "Isaac Z. Schlueter", - "email": "i@izs.me", - "url": "http://blog.izs.me/" - }, - "bugs": { - "url": "https://github.com/isaacs/once/issues" - }, - "dependencies": { - "wrappy": "1" - }, - "description": "Run a function exactly one time", - "devDependencies": { - "tap": "^7.0.1" - }, - "directories": { - "test": "test" - }, - "dist": { - "shasum": "583b1aa775961d4b113ac17d9c50baef9dd76bd1", - "tarball": "https://registry.npmjs.org/once/-/once-1.4.0.tgz" - }, - "files": [ - "once.js" - ], - "gitHead": "0e614d9f5a7e6f0305c625f6b581f6d80b33b8a6", - "homepage": "https://github.com/isaacs/once#readme", - "keywords": [ - "once", - "function", - "one", - "single" - ], - "license": "ISC", - "main": "once.js", - "maintainers": [ - { - "name": "isaacs", - "email": "i@izs.me" - } - ], - "name": "once", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git://github.com/isaacs/once.git" - }, - "scripts": { - "test": "tap test/*.js" - }, - "version": "1.4.0" -} diff --git a/node_modules/os-browserify/.npmignore b/node_modules/os-browserify/.npmignore deleted file mode 100644 index f356293e..00000000 --- a/node_modules/os-browserify/.npmignore +++ /dev/null @@ -1,14 +0,0 @@ -lib-cov -*.seed -*.log -*.csv -*.dat -*.out -*.pid -*.gz - -pids -logs -results - -npm-debug.log diff --git a/node_modules/os-browserify/LICENSE b/node_modules/os-browserify/LICENSE deleted file mode 100644 index a52e9b89..00000000 --- a/node_modules/os-browserify/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2014 Drew Young - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. \ No newline at end of file diff --git a/node_modules/os-browserify/README.md b/node_modules/os-browserify/README.md deleted file mode 100644 index c772502d..00000000 --- a/node_modules/os-browserify/README.md +++ /dev/null @@ -1,2 +0,0 @@ -os-browserify -============= \ No newline at end of file diff --git a/node_modules/os-browserify/browser.js b/node_modules/os-browserify/browser.js deleted file mode 100644 index 6a1ecb07..00000000 --- a/node_modules/os-browserify/browser.js +++ /dev/null @@ -1,45 +0,0 @@ -exports.endianness = function () { return 'LE' }; - -exports.hostname = function () { - if (typeof location !== 'undefined') { - return location.hostname - } - else return ''; -}; - -exports.loadavg = function () { return [] }; - -exports.uptime = function () { return 0 }; - -exports.freemem = function () { - return Number.MAX_VALUE; -}; - -exports.totalmem = function () { - return Number.MAX_VALUE; -}; - -exports.cpus = function () { return [] }; - -exports.type = function () { return 'Browser' }; - -exports.release = function () { - if (typeof navigator !== 'undefined') { - return navigator.appVersion; - } - return ''; -}; - -exports.networkInterfaces -= exports.getNetworkInterfaces -= function () { return {} }; - -exports.arch = function () { return 'javascript' }; - -exports.platform = function () { return 'browser' }; - -exports.tmpdir = exports.tmpDir = function () { - return '/tmp'; -}; - -exports.EOL = '\n'; diff --git a/node_modules/os-browserify/main.js b/node_modules/os-browserify/main.js deleted file mode 100644 index 5910697d..00000000 --- a/node_modules/os-browserify/main.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('os'); diff --git a/node_modules/os-browserify/package.json b/node_modules/os-browserify/package.json deleted file mode 100644 index 9478d66a..00000000 --- a/node_modules/os-browserify/package.json +++ /dev/null @@ -1,76 +0,0 @@ -{ - "_args": [ - [ - { - "raw": "os-browserify@~0.1.1", - "scope": null, - "escapedName": "os-browserify", - "name": "os-browserify", - "rawSpec": "~0.1.1", - "spec": ">=0.1.1 <0.2.0", - "type": "range" - }, - "/Users/benjaminarias/Desktop/poly/node_modules/browserify" - ] - ], - "_from": "os-browserify@>=0.1.1 <0.2.0", - "_id": "os-browserify@0.1.2", - "_inCache": true, - "_installable": true, - "_location": "/os-browserify", - "_npmUser": { - "name": "drewyoung1", - "email": "drewyoung1@gmail.com" - }, - "_npmVersion": "1.3.25", - "_phantomChildren": {}, - "_requested": { - "raw": "os-browserify@~0.1.1", - "scope": null, - "escapedName": "os-browserify", - "name": "os-browserify", - "rawSpec": "~0.1.1", - "spec": ">=0.1.1 <0.2.0", - "type": "range" - }, - "_requiredBy": [ - "/browserify" - ], - "_resolved": "https://registry.npmjs.org/os-browserify/-/os-browserify-0.1.2.tgz", - "_shasum": "49ca0293e0b19590a5f5de10c7f265a617d8fe54", - "_shrinkwrap": null, - "_spec": "os-browserify@~0.1.1", - "_where": "/Users/benjaminarias/Desktop/poly/node_modules/browserify", - "author": { - "name": "Drew Young" - }, - "browser": "browser.js", - "bugs": { - "url": "https://github.com/drewyoung1/os-browserify/issues" - }, - "dependencies": {}, - "description": "os-browserify =============", - "devDependencies": {}, - "directories": {}, - "dist": { - "shasum": "49ca0293e0b19590a5f5de10c7f265a617d8fe54", - "tarball": "https://registry.npmjs.org/os-browserify/-/os-browserify-0.1.2.tgz" - }, - "homepage": "https://github.com/drewyoung1/os-browserify", - "license": "MIT", - "main": "main.js", - "maintainers": [ - { - "name": "drewyoung1", - "email": "drewyoung1@gmail.com" - } - ], - "name": "os-browserify", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git+ssh://git@github.com/drewyoung1/os-browserify.git" - }, - "version": "0.1.2" -} diff --git a/node_modules/pako/CHANGELOG.md b/node_modules/pako/CHANGELOG.md deleted file mode 100644 index f9859227..00000000 --- a/node_modules/pako/CHANGELOG.md +++ /dev/null @@ -1,90 +0,0 @@ -1.0.2 / 2016-07-21 ------------------- - -- Fixed nasty bug in deflate (wrong `d_buf` offset), which could cause - broken data in some rare cases. -- Also released as 0.2.9 to give chance to old dependents, not updated to 1.x - version. - - -1.0.1 / 2016-04-01 ------------------- - -- Added dictionary support. Thanks to @dignifiedquire. - - -1.0.0 / 2016-02-17 ------------------- - -- Maintenance release (semver, coding style). - - -0.2.8 / 2015-09-14 ------------------- - -- Fixed regression after 0.2.4 for edge conditions in inflate wrapper (#65). - Added more tests to cover possible cases. - - -0.2.7 / 2015-06-09 ------------------- - -- Added Z_SYNC_FLUSH support. Thanks to @TinoLange. - - -0.2.6 / 2015-03-24 ------------------- - -- Allow ArrayBuffer input. - - -0.2.5 / 2014-07-19 ------------------- - -- Workaround for Chrome 38.0.2096.0 script parser bug, #30. - - -0.2.4 / 2014-07-07 ------------------- - -- Fixed bug in inflate wrapper, #29 - - -0.2.3 / 2014-06-09 ------------------- - -- Maintenance release, dependencies update. - - -0.2.2 / 2014-06-04 ------------------- - -- Fixed iOS 5.1 Safary issue with `apply(typed_array)`, #26. - - -0.2.1 / 2014-05-01 ------------------- - -- Fixed collision on switch dynamic/fixed tables. - - -0.2.0 / 2014-04-18 ------------------- - -- Added custom gzip headers support. -- Added strings support. -- Improved memory allocations for small chunks. -- ZStream properties rename/cleanup. -- More coverage tests. - - -0.1.1 / 2014-03-20 ------------------- - -- Bugfixes for inflate/deflate. - - -0.1.0 / 2014-03-15 ------------------- - -- First release. diff --git a/node_modules/pako/LICENSE b/node_modules/pako/LICENSE deleted file mode 100644 index d082ae32..00000000 --- a/node_modules/pako/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -(The MIT License) - -Copyright (C) 2014-2016 by Vitaly Puzrin - -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/node_modules/pako/README.md b/node_modules/pako/README.md deleted file mode 100644 index ef121e78..00000000 --- a/node_modules/pako/README.md +++ /dev/null @@ -1,176 +0,0 @@ -pako - zlib port to javascript, very fast! -========================================== - -[![Build Status](https://travis-ci.org/nodeca/pako.svg?branch=master)](https://travis-ci.org/nodeca/pako) -[![NPM version](https://img.shields.io/npm/v/pako.svg)](https://www.npmjs.org/package/pako) - -__Why pako is cool:__ - -- Almost as fast in modern JS engines as C implementation (see benchmarks). -- Works in browsers, you can browserify any separate component. -- Chunking support for big blobs. -- Results are binary equal to well known [zlib](http://www.zlib.net/) (now v1.2.8 ported). - -This project was done to understand how fast JS can be and is it necessary to -develop native C modules for CPU-intensive tasks. Enjoy the result! - - -__Famous projects, using pako:__ - -- [browserify](http://browserify.org/) (via [browserify-zlib](https://github.com/devongovett/browserify-zlib)) -- [JSZip](http://stuk.github.io/jszip/) -- [mincer](https://github.com/nodeca/mincer) -- [JS-Git](https://github.com/creationix/js-git) and - [Tedit](https://chrome.google.com/webstore/detail/tedit-development-environ/ooekdijbnbbjdfjocaiflnjgoohnblgf) - by [@creatronix](https://github.com/creationix) - - -__Benchmarks:__ - -``` -node v0.10.26, 1mb sample: - - deflate-dankogai x 4.73 ops/sec ±0.82% (15 runs sampled) - deflate-gildas x 4.58 ops/sec ±2.33% (15 runs sampled) - deflate-imaya x 3.22 ops/sec ±3.95% (12 runs sampled) - ! deflate-pako x 6.99 ops/sec ±0.51% (21 runs sampled) - deflate-pako-string x 5.89 ops/sec ±0.77% (18 runs sampled) - deflate-pako-untyped x 4.39 ops/sec ±1.58% (14 runs sampled) - * deflate-zlib x 14.71 ops/sec ±4.23% (59 runs sampled) - inflate-dankogai x 32.16 ops/sec ±0.13% (56 runs sampled) - inflate-imaya x 30.35 ops/sec ±0.92% (53 runs sampled) - ! inflate-pako x 69.89 ops/sec ±1.46% (71 runs sampled) - inflate-pako-string x 19.22 ops/sec ±1.86% (49 runs sampled) - inflate-pako-untyped x 17.19 ops/sec ±0.85% (32 runs sampled) - * inflate-zlib x 70.03 ops/sec ±1.64% (81 runs sampled) - -node v0.11.12, 1mb sample: - - deflate-dankogai x 5.60 ops/sec ±0.49% (17 runs sampled) - deflate-gildas x 5.06 ops/sec ±6.00% (16 runs sampled) - deflate-imaya x 3.52 ops/sec ±3.71% (13 runs sampled) - ! deflate-pako x 11.52 ops/sec ±0.22% (32 runs sampled) - deflate-pako-string x 9.53 ops/sec ±1.12% (27 runs sampled) - deflate-pako-untyped x 5.44 ops/sec ±0.72% (17 runs sampled) - * deflate-zlib x 14.05 ops/sec ±3.34% (63 runs sampled) - inflate-dankogai x 42.19 ops/sec ±0.09% (56 runs sampled) - inflate-imaya x 79.68 ops/sec ±1.07% (68 runs sampled) - ! inflate-pako x 97.52 ops/sec ±0.83% (80 runs sampled) - inflate-pako-string x 45.19 ops/sec ±1.69% (57 runs sampled) - inflate-pako-untyped x 24.35 ops/sec ±2.59% (40 runs sampled) - * inflate-zlib x 60.32 ops/sec ±1.36% (69 runs sampled) -``` - -zlib's test is partialy afferted by marshling (that make sense for inflate only). -You can change deflate level to 0 in benchmark source, to investigate details. -For deflate level 6 results can be considered as correct. - -__Install:__ - -node.js: - -``` -npm install pako -``` - -browser: - -``` -bower install pako -``` - - -Example & API -------------- - -Full docs - http://nodeca.github.io/pako/ - -```javascript -var pako = require('pako'); - -// Deflate -// -var input = new Uint8Array(); -//... fill input data here -var output = pako.deflate(input); - -// Inflate (simple wrapper can throw exception on broken stream) -// -var compressed = new Uint8Array(); -//... fill data to uncompress here -try { - var result = pako.inflate(compressed); -} catch (err) { - console.log(err); -} - -// -// Alternate interface for chunking & without exceptions -// - -var inflator = new pako.Inflate(); - -inflator.push(chunk1, false); -inflator.push(chunk2, false); -... -inflator.push(chunkN, true); // true -> last chunk - -if (inflator.err) { - console.log(inflator.msg); -} - -var output = inflator.result; - -``` - -Sometime you can wish to work with strings. For example, to send -big objects as json to server. Pako detects input data type. You can -force output to be string with option `{ to: 'string' }`. - -```javascript -var pako = require('pako'); - -var test = { my: 'super', puper: [456, 567], awesome: 'pako' }; - -var binaryString = pako.deflate(JSON.stringify(test), { to: 'string' }); - -// -// Here you can do base64 encode, make xhr requests and so on. -// - -var restored = JSON.parse(pako.inflate(binaryString, { to: 'string' })); -``` - - -Notes ------ - -Pako does not contain some specific zlib functions: - -- __deflate__ - methods `deflateCopy`, `deflateBound`, `deflateParams`, - `deflatePending`, `deflatePrime`, `deflateTune`. -- __inflate__ - methods `inflateCopy`, `inflateMark`, - `inflatePrime`, `inflateGetDictionary`, `inflateSync`, `inflateSyncPoint`, `inflateUndermine`. -- High level inflate/deflate wrappers (classes) may not support some flush - modes. Those should work: Z_NO_FLUSH, Z_FINISH, Z_SYNC_FLUSH. - - -Authors -------- - -- Andrey Tupitsin [@anrd83](https://github.com/andr83) -- Vitaly Puzrin [@puzrin](https://github.com/puzrin) - -Personal thanks to: - -- Vyacheslav Egorov ([@mraleph](https://github.com/mraleph)) for his awesome - tutorials about optimising JS code for v8, [IRHydra](http://mrale.ph/irhydra/) - tool and his advices. -- David Duponchel ([@dduponchel](https://github.com/dduponchel)) for help with - testing. - - -License -------- - -MIT diff --git a/node_modules/pako/dist/pako.js b/node_modules/pako/dist/pako.js deleted file mode 100644 index 6d6db944..00000000 --- a/node_modules/pako/dist/pako.js +++ /dev/null @@ -1,6606 +0,0 @@ -/* pako 0.2.9 nodeca/pako */(function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.pako = f()}})(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o Array - * - * Chunks of output data, if [[Deflate#onData]] not overriden. - **/ - -/** - * Deflate.result -> Uint8Array|Array - * - * Compressed result, generated by default [[Deflate#onData]] - * and [[Deflate#onEnd]] handlers. Filled after you push last chunk - * (call [[Deflate#push]] with `Z_FINISH` / `true` param) or if you - * push a chunk with explicit flush (call [[Deflate#push]] with - * `Z_SYNC_FLUSH` param). - **/ - -/** - * Deflate.err -> Number - * - * Error code after deflate finished. 0 (Z_OK) on success. - * You will not need it in real life, because deflate errors - * are possible only on wrong options or bad `onData` / `onEnd` - * custom handlers. - **/ - -/** - * Deflate.msg -> String - * - * Error message, if [[Deflate.err]] != 0 - **/ - - -/** - * new Deflate(options) - * - options (Object): zlib deflate options. - * - * Creates new deflator instance with specified params. Throws exception - * on bad params. Supported options: - * - * - `level` - * - `windowBits` - * - `memLevel` - * - `strategy` - * - `dictionary` - * - * [http://zlib.net/manual.html#Advanced](http://zlib.net/manual.html#Advanced) - * for more information on these. - * - * Additional options, for internal needs: - * - * - `chunkSize` - size of generated data chunks (16K by default) - * - `raw` (Boolean) - do raw deflate - * - `gzip` (Boolean) - create gzip wrapper - * - `to` (String) - if equal to 'string', then result will be "binary string" - * (each char code [0..255]) - * - `header` (Object) - custom header for gzip - * - `text` (Boolean) - true if compressed data believed to be text - * - `time` (Number) - modification time, unix timestamp - * - `os` (Number) - operation system code - * - `extra` (Array) - array of bytes with extra data (max 65536) - * - `name` (String) - file name (binary string) - * - `comment` (String) - comment (binary string) - * - `hcrc` (Boolean) - true if header crc should be added - * - * ##### Example: - * - * ```javascript - * var pako = require('pako') - * , chunk1 = Uint8Array([1,2,3,4,5,6,7,8,9]) - * , chunk2 = Uint8Array([10,11,12,13,14,15,16,17,18,19]); - * - * var deflate = new pako.Deflate({ level: 3}); - * - * deflate.push(chunk1, false); - * deflate.push(chunk2, true); // true -> last chunk - * - * if (deflate.err) { throw new Error(deflate.err); } - * - * console.log(deflate.result); - * ``` - **/ -function Deflate(options) { - if (!(this instanceof Deflate)) return new Deflate(options); - - this.options = utils.assign({ - level: Z_DEFAULT_COMPRESSION, - method: Z_DEFLATED, - chunkSize: 16384, - windowBits: 15, - memLevel: 8, - strategy: Z_DEFAULT_STRATEGY, - to: '' - }, options || {}); - - var opt = this.options; - - if (opt.raw && (opt.windowBits > 0)) { - opt.windowBits = -opt.windowBits; - } - - else if (opt.gzip && (opt.windowBits > 0) && (opt.windowBits < 16)) { - opt.windowBits += 16; - } - - this.err = 0; // error code, if happens (0 = Z_OK) - this.msg = ''; // error message - this.ended = false; // used to avoid multiple onEnd() calls - this.chunks = []; // chunks of compressed data - - this.strm = new ZStream(); - this.strm.avail_out = 0; - - var status = zlib_deflate.deflateInit2( - this.strm, - opt.level, - opt.method, - opt.windowBits, - opt.memLevel, - opt.strategy - ); - - if (status !== Z_OK) { - throw new Error(msg[status]); - } - - if (opt.header) { - zlib_deflate.deflateSetHeader(this.strm, opt.header); - } - - if (opt.dictionary) { - var dict; - // Convert data if needed - if (typeof opt.dictionary === 'string') { - // If we need to compress text, change encoding to utf8. - dict = strings.string2buf(opt.dictionary); - } else if (toString.call(opt.dictionary) === '[object ArrayBuffer]') { - dict = new Uint8Array(opt.dictionary); - } else { - dict = opt.dictionary; - } - - status = zlib_deflate.deflateSetDictionary(this.strm, dict); - - if (status !== Z_OK) { - throw new Error(msg[status]); - } - - this._dict_set = true; - } -} - -/** - * Deflate#push(data[, mode]) -> Boolean - * - data (Uint8Array|Array|ArrayBuffer|String): input data. Strings will be - * converted to utf8 byte sequence. - * - mode (Number|Boolean): 0..6 for corresponding Z_NO_FLUSH..Z_TREE modes. - * See constants. Skipped or `false` means Z_NO_FLUSH, `true` meansh Z_FINISH. - * - * Sends input data to deflate pipe, generating [[Deflate#onData]] calls with - * new compressed chunks. Returns `true` on success. The last data block must have - * mode Z_FINISH (or `true`). That will flush internal pending buffers and call - * [[Deflate#onEnd]]. For interim explicit flushes (without ending the stream) you - * can use mode Z_SYNC_FLUSH, keeping the compression context. - * - * On fail call [[Deflate#onEnd]] with error code and return false. - * - * We strongly recommend to use `Uint8Array` on input for best speed (output - * array format is detected automatically). Also, don't skip last param and always - * use the same type in your code (boolean or number). That will improve JS speed. - * - * For regular `Array`-s make sure all elements are [0..255]. - * - * ##### Example - * - * ```javascript - * push(chunk, false); // push one of data chunks - * ... - * push(chunk, true); // push last chunk - * ``` - **/ -Deflate.prototype.push = function (data, mode) { - var strm = this.strm; - var chunkSize = this.options.chunkSize; - var status, _mode; - - if (this.ended) { return false; } - - _mode = (mode === ~~mode) ? mode : ((mode === true) ? Z_FINISH : Z_NO_FLUSH); - - // Convert data if needed - if (typeof data === 'string') { - // If we need to compress text, change encoding to utf8. - strm.input = strings.string2buf(data); - } else if (toString.call(data) === '[object ArrayBuffer]') { - strm.input = new Uint8Array(data); - } else { - strm.input = data; - } - - strm.next_in = 0; - strm.avail_in = strm.input.length; - - do { - if (strm.avail_out === 0) { - strm.output = new utils.Buf8(chunkSize); - strm.next_out = 0; - strm.avail_out = chunkSize; - } - status = zlib_deflate.deflate(strm, _mode); /* no bad return value */ - - if (status !== Z_STREAM_END && status !== Z_OK) { - this.onEnd(status); - this.ended = true; - return false; - } - if (strm.avail_out === 0 || (strm.avail_in === 0 && (_mode === Z_FINISH || _mode === Z_SYNC_FLUSH))) { - if (this.options.to === 'string') { - this.onData(strings.buf2binstring(utils.shrinkBuf(strm.output, strm.next_out))); - } else { - this.onData(utils.shrinkBuf(strm.output, strm.next_out)); - } - } - } while ((strm.avail_in > 0 || strm.avail_out === 0) && status !== Z_STREAM_END); - - // Finalize on the last chunk. - if (_mode === Z_FINISH) { - status = zlib_deflate.deflateEnd(this.strm); - this.onEnd(status); - this.ended = true; - return status === Z_OK; - } - - // callback interim results if Z_SYNC_FLUSH. - if (_mode === Z_SYNC_FLUSH) { - this.onEnd(Z_OK); - strm.avail_out = 0; - return true; - } - - return true; -}; - - -/** - * Deflate#onData(chunk) -> Void - * - chunk (Uint8Array|Array|String): ouput data. Type of array depends - * on js engine support. When string output requested, each chunk - * will be string. - * - * By default, stores data blocks in `chunks[]` property and glue - * those in `onEnd`. Override this handler, if you need another behaviour. - **/ -Deflate.prototype.onData = function (chunk) { - this.chunks.push(chunk); -}; - - -/** - * Deflate#onEnd(status) -> Void - * - status (Number): deflate status. 0 (Z_OK) on success, - * other if not. - * - * Called once after you tell deflate that the input stream is - * complete (Z_FINISH) or should be flushed (Z_SYNC_FLUSH) - * or if an error happened. By default - join collected chunks, - * free memory and fill `results` / `err` properties. - **/ -Deflate.prototype.onEnd = function (status) { - // On success - join - if (status === Z_OK) { - if (this.options.to === 'string') { - this.result = this.chunks.join(''); - } else { - this.result = utils.flattenChunks(this.chunks); - } - } - this.chunks = []; - this.err = status; - this.msg = this.strm.msg; -}; - - -/** - * deflate(data[, options]) -> Uint8Array|Array|String - * - data (Uint8Array|Array|String): input data to compress. - * - options (Object): zlib deflate options. - * - * Compress `data` with deflate algorithm and `options`. - * - * Supported options are: - * - * - level - * - windowBits - * - memLevel - * - strategy - * - dictionary - * - * [http://zlib.net/manual.html#Advanced](http://zlib.net/manual.html#Advanced) - * for more information on these. - * - * Sugar (options): - * - * - `raw` (Boolean) - say that we work with raw stream, if you don't wish to specify - * negative windowBits implicitly. - * - `to` (String) - if equal to 'string', then result will be "binary string" - * (each char code [0..255]) - * - * ##### Example: - * - * ```javascript - * var pako = require('pako') - * , data = Uint8Array([1,2,3,4,5,6,7,8,9]); - * - * console.log(pako.deflate(data)); - * ``` - **/ -function deflate(input, options) { - var deflator = new Deflate(options); - - deflator.push(input, true); - - // That will never happens, if you don't cheat with options :) - if (deflator.err) { throw deflator.msg; } - - return deflator.result; -} - - -/** - * deflateRaw(data[, options]) -> Uint8Array|Array|String - * - data (Uint8Array|Array|String): input data to compress. - * - options (Object): zlib deflate options. - * - * The same as [[deflate]], but creates raw data, without wrapper - * (header and adler32 crc). - **/ -function deflateRaw(input, options) { - options = options || {}; - options.raw = true; - return deflate(input, options); -} - - -/** - * gzip(data[, options]) -> Uint8Array|Array|String - * - data (Uint8Array|Array|String): input data to compress. - * - options (Object): zlib deflate options. - * - * The same as [[deflate]], but create gzip wrapper instead of - * deflate one. - **/ -function gzip(input, options) { - options = options || {}; - options.gzip = true; - return deflate(input, options); -} - - -exports.Deflate = Deflate; -exports.deflate = deflate; -exports.deflateRaw = deflateRaw; -exports.gzip = gzip; - -},{"./utils/common":3,"./utils/strings":4,"./zlib/deflate":8,"./zlib/messages":13,"./zlib/zstream":15}],2:[function(require,module,exports){ -'use strict'; - - -var zlib_inflate = require('./zlib/inflate'); -var utils = require('./utils/common'); -var strings = require('./utils/strings'); -var c = require('./zlib/constants'); -var msg = require('./zlib/messages'); -var ZStream = require('./zlib/zstream'); -var GZheader = require('./zlib/gzheader'); - -var toString = Object.prototype.toString; - -/** - * class Inflate - * - * Generic JS-style wrapper for zlib calls. If you don't need - * streaming behaviour - use more simple functions: [[inflate]] - * and [[inflateRaw]]. - **/ - -/* internal - * inflate.chunks -> Array - * - * Chunks of output data, if [[Inflate#onData]] not overriden. - **/ - -/** - * Inflate.result -> Uint8Array|Array|String - * - * Uncompressed result, generated by default [[Inflate#onData]] - * and [[Inflate#onEnd]] handlers. Filled after you push last chunk - * (call [[Inflate#push]] with `Z_FINISH` / `true` param) or if you - * push a chunk with explicit flush (call [[Inflate#push]] with - * `Z_SYNC_FLUSH` param). - **/ - -/** - * Inflate.err -> Number - * - * Error code after inflate finished. 0 (Z_OK) on success. - * Should be checked if broken data possible. - **/ - -/** - * Inflate.msg -> String - * - * Error message, if [[Inflate.err]] != 0 - **/ - - -/** - * new Inflate(options) - * - options (Object): zlib inflate options. - * - * Creates new inflator instance with specified params. Throws exception - * on bad params. Supported options: - * - * - `windowBits` - * - `dictionary` - * - * [http://zlib.net/manual.html#Advanced](http://zlib.net/manual.html#Advanced) - * for more information on these. - * - * Additional options, for internal needs: - * - * - `chunkSize` - size of generated data chunks (16K by default) - * - `raw` (Boolean) - do raw inflate - * - `to` (String) - if equal to 'string', then result will be converted - * from utf8 to utf16 (javascript) string. When string output requested, - * chunk length can differ from `chunkSize`, depending on content. - * - * By default, when no options set, autodetect deflate/gzip data format via - * wrapper header. - * - * ##### Example: - * - * ```javascript - * var pako = require('pako') - * , chunk1 = Uint8Array([1,2,3,4,5,6,7,8,9]) - * , chunk2 = Uint8Array([10,11,12,13,14,15,16,17,18,19]); - * - * var inflate = new pako.Inflate({ level: 3}); - * - * inflate.push(chunk1, false); - * inflate.push(chunk2, true); // true -> last chunk - * - * if (inflate.err) { throw new Error(inflate.err); } - * - * console.log(inflate.result); - * ``` - **/ -function Inflate(options) { - if (!(this instanceof Inflate)) return new Inflate(options); - - this.options = utils.assign({ - chunkSize: 16384, - windowBits: 0, - to: '' - }, options || {}); - - var opt = this.options; - - // Force window size for `raw` data, if not set directly, - // because we have no header for autodetect. - if (opt.raw && (opt.windowBits >= 0) && (opt.windowBits < 16)) { - opt.windowBits = -opt.windowBits; - if (opt.windowBits === 0) { opt.windowBits = -15; } - } - - // If `windowBits` not defined (and mode not raw) - set autodetect flag for gzip/deflate - if ((opt.windowBits >= 0) && (opt.windowBits < 16) && - !(options && options.windowBits)) { - opt.windowBits += 32; - } - - // Gzip header has no info about windows size, we can do autodetect only - // for deflate. So, if window size not set, force it to max when gzip possible - if ((opt.windowBits > 15) && (opt.windowBits < 48)) { - // bit 3 (16) -> gzipped data - // bit 4 (32) -> autodetect gzip/deflate - if ((opt.windowBits & 15) === 0) { - opt.windowBits |= 15; - } - } - - this.err = 0; // error code, if happens (0 = Z_OK) - this.msg = ''; // error message - this.ended = false; // used to avoid multiple onEnd() calls - this.chunks = []; // chunks of compressed data - - this.strm = new ZStream(); - this.strm.avail_out = 0; - - var status = zlib_inflate.inflateInit2( - this.strm, - opt.windowBits - ); - - if (status !== c.Z_OK) { - throw new Error(msg[status]); - } - - this.header = new GZheader(); - - zlib_inflate.inflateGetHeader(this.strm, this.header); -} - -/** - * Inflate#push(data[, mode]) -> Boolean - * - data (Uint8Array|Array|ArrayBuffer|String): input data - * - mode (Number|Boolean): 0..6 for corresponding Z_NO_FLUSH..Z_TREE modes. - * See constants. Skipped or `false` means Z_NO_FLUSH, `true` meansh Z_FINISH. - * - * Sends input data to inflate pipe, generating [[Inflate#onData]] calls with - * new output chunks. Returns `true` on success. The last data block must have - * mode Z_FINISH (or `true`). That will flush internal pending buffers and call - * [[Inflate#onEnd]]. For interim explicit flushes (without ending the stream) you - * can use mode Z_SYNC_FLUSH, keeping the decompression context. - * - * On fail call [[Inflate#onEnd]] with error code and return false. - * - * We strongly recommend to use `Uint8Array` on input for best speed (output - * format is detected automatically). Also, don't skip last param and always - * use the same type in your code (boolean or number). That will improve JS speed. - * - * For regular `Array`-s make sure all elements are [0..255]. - * - * ##### Example - * - * ```javascript - * push(chunk, false); // push one of data chunks - * ... - * push(chunk, true); // push last chunk - * ``` - **/ -Inflate.prototype.push = function (data, mode) { - var strm = this.strm; - var chunkSize = this.options.chunkSize; - var dictionary = this.options.dictionary; - var status, _mode; - var next_out_utf8, tail, utf8str; - var dict; - - // Flag to properly process Z_BUF_ERROR on testing inflate call - // when we check that all output data was flushed. - var allowBufError = false; - - if (this.ended) { return false; } - _mode = (mode === ~~mode) ? mode : ((mode === true) ? c.Z_FINISH : c.Z_NO_FLUSH); - - // Convert data if needed - if (typeof data === 'string') { - // Only binary strings can be decompressed on practice - strm.input = strings.binstring2buf(data); - } else if (toString.call(data) === '[object ArrayBuffer]') { - strm.input = new Uint8Array(data); - } else { - strm.input = data; - } - - strm.next_in = 0; - strm.avail_in = strm.input.length; - - do { - if (strm.avail_out === 0) { - strm.output = new utils.Buf8(chunkSize); - strm.next_out = 0; - strm.avail_out = chunkSize; - } - - status = zlib_inflate.inflate(strm, c.Z_NO_FLUSH); /* no bad return value */ - - if (status === c.Z_NEED_DICT && dictionary) { - // Convert data if needed - if (typeof dictionary === 'string') { - dict = strings.string2buf(dictionary); - } else if (toString.call(dictionary) === '[object ArrayBuffer]') { - dict = new Uint8Array(dictionary); - } else { - dict = dictionary; - } - - status = zlib_inflate.inflateSetDictionary(this.strm, dict); - - } - - if (status === c.Z_BUF_ERROR && allowBufError === true) { - status = c.Z_OK; - allowBufError = false; - } - - if (status !== c.Z_STREAM_END && status !== c.Z_OK) { - this.onEnd(status); - this.ended = true; - return false; - } - - if (strm.next_out) { - if (strm.avail_out === 0 || status === c.Z_STREAM_END || (strm.avail_in === 0 && (_mode === c.Z_FINISH || _mode === c.Z_SYNC_FLUSH))) { - - if (this.options.to === 'string') { - - next_out_utf8 = strings.utf8border(strm.output, strm.next_out); - - tail = strm.next_out - next_out_utf8; - utf8str = strings.buf2string(strm.output, next_out_utf8); - - // move tail - strm.next_out = tail; - strm.avail_out = chunkSize - tail; - if (tail) { utils.arraySet(strm.output, strm.output, next_out_utf8, tail, 0); } - - this.onData(utf8str); - - } else { - this.onData(utils.shrinkBuf(strm.output, strm.next_out)); - } - } - } - - // When no more input data, we should check that internal inflate buffers - // are flushed. The only way to do it when avail_out = 0 - run one more - // inflate pass. But if output data not exists, inflate return Z_BUF_ERROR. - // Here we set flag to process this error properly. - // - // NOTE. Deflate does not return error in this case and does not needs such - // logic. - if (strm.avail_in === 0 && strm.avail_out === 0) { - allowBufError = true; - } - - } while ((strm.avail_in > 0 || strm.avail_out === 0) && status !== c.Z_STREAM_END); - - if (status === c.Z_STREAM_END) { - _mode = c.Z_FINISH; - } - - // Finalize on the last chunk. - if (_mode === c.Z_FINISH) { - status = zlib_inflate.inflateEnd(this.strm); - this.onEnd(status); - this.ended = true; - return status === c.Z_OK; - } - - // callback interim results if Z_SYNC_FLUSH. - if (_mode === c.Z_SYNC_FLUSH) { - this.onEnd(c.Z_OK); - strm.avail_out = 0; - return true; - } - - return true; -}; - - -/** - * Inflate#onData(chunk) -> Void - * - chunk (Uint8Array|Array|String): ouput data. Type of array depends - * on js engine support. When string output requested, each chunk - * will be string. - * - * By default, stores data blocks in `chunks[]` property and glue - * those in `onEnd`. Override this handler, if you need another behaviour. - **/ -Inflate.prototype.onData = function (chunk) { - this.chunks.push(chunk); -}; - - -/** - * Inflate#onEnd(status) -> Void - * - status (Number): inflate status. 0 (Z_OK) on success, - * other if not. - * - * Called either after you tell inflate that the input stream is - * complete (Z_FINISH) or should be flushed (Z_SYNC_FLUSH) - * or if an error happened. By default - join collected chunks, - * free memory and fill `results` / `err` properties. - **/ -Inflate.prototype.onEnd = function (status) { - // On success - join - if (status === c.Z_OK) { - if (this.options.to === 'string') { - // Glue & convert here, until we teach pako to send - // utf8 alligned strings to onData - this.result = this.chunks.join(''); - } else { - this.result = utils.flattenChunks(this.chunks); - } - } - this.chunks = []; - this.err = status; - this.msg = this.strm.msg; -}; - - -/** - * inflate(data[, options]) -> Uint8Array|Array|String - * - data (Uint8Array|Array|String): input data to decompress. - * - options (Object): zlib inflate options. - * - * Decompress `data` with inflate/ungzip and `options`. Autodetect - * format via wrapper header by default. That's why we don't provide - * separate `ungzip` method. - * - * Supported options are: - * - * - windowBits - * - * [http://zlib.net/manual.html#Advanced](http://zlib.net/manual.html#Advanced) - * for more information. - * - * Sugar (options): - * - * - `raw` (Boolean) - say that we work with raw stream, if you don't wish to specify - * negative windowBits implicitly. - * - `to` (String) - if equal to 'string', then result will be converted - * from utf8 to utf16 (javascript) string. When string output requested, - * chunk length can differ from `chunkSize`, depending on content. - * - * - * ##### Example: - * - * ```javascript - * var pako = require('pako') - * , input = pako.deflate([1,2,3,4,5,6,7,8,9]) - * , output; - * - * try { - * output = pako.inflate(input); - * } catch (err) - * console.log(err); - * } - * ``` - **/ -function inflate(input, options) { - var inflator = new Inflate(options); - - inflator.push(input, true); - - // That will never happens, if you don't cheat with options :) - if (inflator.err) { throw inflator.msg; } - - return inflator.result; -} - - -/** - * inflateRaw(data[, options]) -> Uint8Array|Array|String - * - data (Uint8Array|Array|String): input data to decompress. - * - options (Object): zlib inflate options. - * - * The same as [[inflate]], but creates raw data, without wrapper - * (header and adler32 crc). - **/ -function inflateRaw(input, options) { - options = options || {}; - options.raw = true; - return inflate(input, options); -} - - -/** - * ungzip(data[, options]) -> Uint8Array|Array|String - * - data (Uint8Array|Array|String): input data to decompress. - * - options (Object): zlib inflate options. - * - * Just shortcut to [[inflate]], because it autodetects format - * by header.content. Done for convenience. - **/ - - -exports.Inflate = Inflate; -exports.inflate = inflate; -exports.inflateRaw = inflateRaw; -exports.ungzip = inflate; - -},{"./utils/common":3,"./utils/strings":4,"./zlib/constants":6,"./zlib/gzheader":9,"./zlib/inflate":11,"./zlib/messages":13,"./zlib/zstream":15}],3:[function(require,module,exports){ -'use strict'; - - -var TYPED_OK = (typeof Uint8Array !== 'undefined') && - (typeof Uint16Array !== 'undefined') && - (typeof Int32Array !== 'undefined'); - - -exports.assign = function (obj /*from1, from2, from3, ...*/) { - var sources = Array.prototype.slice.call(arguments, 1); - while (sources.length) { - var source = sources.shift(); - if (!source) { continue; } - - if (typeof source !== 'object') { - throw new TypeError(source + 'must be non-object'); - } - - for (var p in source) { - if (source.hasOwnProperty(p)) { - obj[p] = source[p]; - } - } - } - - return obj; -}; - - -// reduce buffer size, avoiding mem copy -exports.shrinkBuf = function (buf, size) { - if (buf.length === size) { return buf; } - if (buf.subarray) { return buf.subarray(0, size); } - buf.length = size; - return buf; -}; - - -var fnTyped = { - arraySet: function (dest, src, src_offs, len, dest_offs) { - if (src.subarray && dest.subarray) { - dest.set(src.subarray(src_offs, src_offs + len), dest_offs); - return; - } - // Fallback to ordinary array - for (var i = 0; i < len; i++) { - dest[dest_offs + i] = src[src_offs + i]; - } - }, - // Join array of chunks to single array. - flattenChunks: function (chunks) { - var i, l, len, pos, chunk, result; - - // calculate data length - len = 0; - for (i = 0, l = chunks.length; i < l; i++) { - len += chunks[i].length; - } - - // join chunks - result = new Uint8Array(len); - pos = 0; - for (i = 0, l = chunks.length; i < l; i++) { - chunk = chunks[i]; - result.set(chunk, pos); - pos += chunk.length; - } - - return result; - } -}; - -var fnUntyped = { - arraySet: function (dest, src, src_offs, len, dest_offs) { - for (var i = 0; i < len; i++) { - dest[dest_offs + i] = src[src_offs + i]; - } - }, - // Join array of chunks to single array. - flattenChunks: function (chunks) { - return [].concat.apply([], chunks); - } -}; - - -// Enable/Disable typed arrays use, for testing -// -exports.setTyped = function (on) { - if (on) { - exports.Buf8 = Uint8Array; - exports.Buf16 = Uint16Array; - exports.Buf32 = Int32Array; - exports.assign(exports, fnTyped); - } else { - exports.Buf8 = Array; - exports.Buf16 = Array; - exports.Buf32 = Array; - exports.assign(exports, fnUntyped); - } -}; - -exports.setTyped(TYPED_OK); - -},{}],4:[function(require,module,exports){ -// String encode/decode helpers -'use strict'; - - -var utils = require('./common'); - - -// Quick check if we can use fast array to bin string conversion -// -// - apply(Array) can fail on Android 2.2 -// - apply(Uint8Array) can fail on iOS 5.1 Safary -// -var STR_APPLY_OK = true; -var STR_APPLY_UIA_OK = true; - -try { String.fromCharCode.apply(null, [ 0 ]); } catch (__) { STR_APPLY_OK = false; } -try { String.fromCharCode.apply(null, new Uint8Array(1)); } catch (__) { STR_APPLY_UIA_OK = false; } - - -// Table with utf8 lengths (calculated by first byte of sequence) -// Note, that 5 & 6-byte values and some 4-byte values can not be represented in JS, -// because max possible codepoint is 0x10ffff -var _utf8len = new utils.Buf8(256); -for (var q = 0; q < 256; q++) { - _utf8len[q] = (q >= 252 ? 6 : q >= 248 ? 5 : q >= 240 ? 4 : q >= 224 ? 3 : q >= 192 ? 2 : 1); -} -_utf8len[254] = _utf8len[254] = 1; // Invalid sequence start - - -// convert string to array (typed, when possible) -exports.string2buf = function (str) { - var buf, c, c2, m_pos, i, str_len = str.length, buf_len = 0; - - // count binary size - for (m_pos = 0; m_pos < str_len; m_pos++) { - c = str.charCodeAt(m_pos); - if ((c & 0xfc00) === 0xd800 && (m_pos + 1 < str_len)) { - c2 = str.charCodeAt(m_pos + 1); - if ((c2 & 0xfc00) === 0xdc00) { - c = 0x10000 + ((c - 0xd800) << 10) + (c2 - 0xdc00); - m_pos++; - } - } - buf_len += c < 0x80 ? 1 : c < 0x800 ? 2 : c < 0x10000 ? 3 : 4; - } - - // allocate buffer - buf = new utils.Buf8(buf_len); - - // convert - for (i = 0, m_pos = 0; i < buf_len; m_pos++) { - c = str.charCodeAt(m_pos); - if ((c & 0xfc00) === 0xd800 && (m_pos + 1 < str_len)) { - c2 = str.charCodeAt(m_pos + 1); - if ((c2 & 0xfc00) === 0xdc00) { - c = 0x10000 + ((c - 0xd800) << 10) + (c2 - 0xdc00); - m_pos++; - } - } - if (c < 0x80) { - /* one byte */ - buf[i++] = c; - } else if (c < 0x800) { - /* two bytes */ - buf[i++] = 0xC0 | (c >>> 6); - buf[i++] = 0x80 | (c & 0x3f); - } else if (c < 0x10000) { - /* three bytes */ - buf[i++] = 0xE0 | (c >>> 12); - buf[i++] = 0x80 | (c >>> 6 & 0x3f); - buf[i++] = 0x80 | (c & 0x3f); - } else { - /* four bytes */ - buf[i++] = 0xf0 | (c >>> 18); - buf[i++] = 0x80 | (c >>> 12 & 0x3f); - buf[i++] = 0x80 | (c >>> 6 & 0x3f); - buf[i++] = 0x80 | (c & 0x3f); - } - } - - return buf; -}; - -// Helper (used in 2 places) -function buf2binstring(buf, len) { - // use fallback for big arrays to avoid stack overflow - if (len < 65537) { - if ((buf.subarray && STR_APPLY_UIA_OK) || (!buf.subarray && STR_APPLY_OK)) { - return String.fromCharCode.apply(null, utils.shrinkBuf(buf, len)); - } - } - - var result = ''; - for (var i = 0; i < len; i++) { - result += String.fromCharCode(buf[i]); - } - return result; -} - - -// Convert byte array to binary string -exports.buf2binstring = function (buf) { - return buf2binstring(buf, buf.length); -}; - - -// Convert binary string (typed, when possible) -exports.binstring2buf = function (str) { - var buf = new utils.Buf8(str.length); - for (var i = 0, len = buf.length; i < len; i++) { - buf[i] = str.charCodeAt(i); - } - return buf; -}; - - -// convert array to string -exports.buf2string = function (buf, max) { - var i, out, c, c_len; - var len = max || buf.length; - - // Reserve max possible length (2 words per char) - // NB: by unknown reasons, Array is significantly faster for - // String.fromCharCode.apply than Uint16Array. - var utf16buf = new Array(len * 2); - - for (out = 0, i = 0; i < len;) { - c = buf[i++]; - // quick process ascii - if (c < 0x80) { utf16buf[out++] = c; continue; } - - c_len = _utf8len[c]; - // skip 5 & 6 byte codes - if (c_len > 4) { utf16buf[out++] = 0xfffd; i += c_len - 1; continue; } - - // apply mask on first byte - c &= c_len === 2 ? 0x1f : c_len === 3 ? 0x0f : 0x07; - // join the rest - while (c_len > 1 && i < len) { - c = (c << 6) | (buf[i++] & 0x3f); - c_len--; - } - - // terminated by end of string? - if (c_len > 1) { utf16buf[out++] = 0xfffd; continue; } - - if (c < 0x10000) { - utf16buf[out++] = c; - } else { - c -= 0x10000; - utf16buf[out++] = 0xd800 | ((c >> 10) & 0x3ff); - utf16buf[out++] = 0xdc00 | (c & 0x3ff); - } - } - - return buf2binstring(utf16buf, out); -}; - - -// Calculate max possible position in utf8 buffer, -// that will not break sequence. If that's not possible -// - (very small limits) return max size as is. -// -// buf[] - utf8 bytes array -// max - length limit (mandatory); -exports.utf8border = function (buf, max) { - var pos; - - max = max || buf.length; - if (max > buf.length) { max = buf.length; } - - // go back from last position, until start of sequence found - pos = max - 1; - while (pos >= 0 && (buf[pos] & 0xC0) === 0x80) { pos--; } - - // Fuckup - very small and broken sequence, - // return max, because we should return something anyway. - if (pos < 0) { return max; } - - // If we came to start of buffer - that means vuffer is too small, - // return max too. - if (pos === 0) { return max; } - - return (pos + _utf8len[buf[pos]] > max) ? pos : max; -}; - -},{"./common":3}],5:[function(require,module,exports){ -'use strict'; - -// Note: adler32 takes 12% for level 0 and 2% for level 6. -// It doesn't worth to make additional optimizationa as in original. -// Small size is preferable. - -function adler32(adler, buf, len, pos) { - var s1 = (adler & 0xffff) |0, - s2 = ((adler >>> 16) & 0xffff) |0, - n = 0; - - while (len !== 0) { - // Set limit ~ twice less than 5552, to keep - // s2 in 31-bits, because we force signed ints. - // in other case %= will fail. - n = len > 2000 ? 2000 : len; - len -= n; - - do { - s1 = (s1 + buf[pos++]) |0; - s2 = (s2 + s1) |0; - } while (--n); - - s1 %= 65521; - s2 %= 65521; - } - - return (s1 | (s2 << 16)) |0; -} - - -module.exports = adler32; - -},{}],6:[function(require,module,exports){ -'use strict'; - - -module.exports = { - - /* Allowed flush values; see deflate() and inflate() below for details */ - Z_NO_FLUSH: 0, - Z_PARTIAL_FLUSH: 1, - Z_SYNC_FLUSH: 2, - Z_FULL_FLUSH: 3, - Z_FINISH: 4, - Z_BLOCK: 5, - Z_TREES: 6, - - /* Return codes for the compression/decompression functions. Negative values - * are errors, positive values are used for special but normal events. - */ - Z_OK: 0, - Z_STREAM_END: 1, - Z_NEED_DICT: 2, - Z_ERRNO: -1, - Z_STREAM_ERROR: -2, - Z_DATA_ERROR: -3, - //Z_MEM_ERROR: -4, - Z_BUF_ERROR: -5, - //Z_VERSION_ERROR: -6, - - /* compression levels */ - Z_NO_COMPRESSION: 0, - Z_BEST_SPEED: 1, - Z_BEST_COMPRESSION: 9, - Z_DEFAULT_COMPRESSION: -1, - - - Z_FILTERED: 1, - Z_HUFFMAN_ONLY: 2, - Z_RLE: 3, - Z_FIXED: 4, - Z_DEFAULT_STRATEGY: 0, - - /* Possible values of the data_type field (though see inflate()) */ - Z_BINARY: 0, - Z_TEXT: 1, - //Z_ASCII: 1, // = Z_TEXT (deprecated) - Z_UNKNOWN: 2, - - /* The deflate compression method */ - Z_DEFLATED: 8 - //Z_NULL: null // Use -1 or null inline, depending on var type -}; - -},{}],7:[function(require,module,exports){ -'use strict'; - -// Note: we can't get significant speed boost here. -// So write code to minimize size - no pregenerated tables -// and array tools dependencies. - - -// Use ordinary array, since untyped makes no boost here -function makeTable() { - var c, table = []; - - for (var n = 0; n < 256; n++) { - c = n; - for (var k = 0; k < 8; k++) { - c = ((c & 1) ? (0xEDB88320 ^ (c >>> 1)) : (c >>> 1)); - } - table[n] = c; - } - - return table; -} - -// Create table on load. Just 255 signed longs. Not a problem. -var crcTable = makeTable(); - - -function crc32(crc, buf, len, pos) { - var t = crcTable, - end = pos + len; - - crc ^= -1; - - for (var i = pos; i < end; i++) { - crc = (crc >>> 8) ^ t[(crc ^ buf[i]) & 0xFF]; - } - - return (crc ^ (-1)); // >>> 0; -} - - -module.exports = crc32; - -},{}],8:[function(require,module,exports){ -'use strict'; - -var utils = require('../utils/common'); -var trees = require('./trees'); -var adler32 = require('./adler32'); -var crc32 = require('./crc32'); -var msg = require('./messages'); - -/* Public constants ==========================================================*/ -/* ===========================================================================*/ - - -/* Allowed flush values; see deflate() and inflate() below for details */ -var Z_NO_FLUSH = 0; -var Z_PARTIAL_FLUSH = 1; -//var Z_SYNC_FLUSH = 2; -var Z_FULL_FLUSH = 3; -var Z_FINISH = 4; -var Z_BLOCK = 5; -//var Z_TREES = 6; - - -/* Return codes for the compression/decompression functions. Negative values - * are errors, positive values are used for special but normal events. - */ -var Z_OK = 0; -var Z_STREAM_END = 1; -//var Z_NEED_DICT = 2; -//var Z_ERRNO = -1; -var Z_STREAM_ERROR = -2; -var Z_DATA_ERROR = -3; -//var Z_MEM_ERROR = -4; -var Z_BUF_ERROR = -5; -//var Z_VERSION_ERROR = -6; - - -/* compression levels */ -//var Z_NO_COMPRESSION = 0; -//var Z_BEST_SPEED = 1; -//var Z_BEST_COMPRESSION = 9; -var Z_DEFAULT_COMPRESSION = -1; - - -var Z_FILTERED = 1; -var Z_HUFFMAN_ONLY = 2; -var Z_RLE = 3; -var Z_FIXED = 4; -var Z_DEFAULT_STRATEGY = 0; - -/* Possible values of the data_type field (though see inflate()) */ -//var Z_BINARY = 0; -//var Z_TEXT = 1; -//var Z_ASCII = 1; // = Z_TEXT -var Z_UNKNOWN = 2; - - -/* The deflate compression method */ -var Z_DEFLATED = 8; - -/*============================================================================*/ - - -var MAX_MEM_LEVEL = 9; -/* Maximum value for memLevel in deflateInit2 */ -var MAX_WBITS = 15; -/* 32K LZ77 window */ -var DEF_MEM_LEVEL = 8; - - -var LENGTH_CODES = 29; -/* number of length codes, not counting the special END_BLOCK code */ -var LITERALS = 256; -/* number of literal bytes 0..255 */ -var L_CODES = LITERALS + 1 + LENGTH_CODES; -/* number of Literal or Length codes, including the END_BLOCK code */ -var D_CODES = 30; -/* number of distance codes */ -var BL_CODES = 19; -/* number of codes used to transfer the bit lengths */ -var HEAP_SIZE = 2 * L_CODES + 1; -/* maximum heap size */ -var MAX_BITS = 15; -/* All codes must not exceed MAX_BITS bits */ - -var MIN_MATCH = 3; -var MAX_MATCH = 258; -var MIN_LOOKAHEAD = (MAX_MATCH + MIN_MATCH + 1); - -var PRESET_DICT = 0x20; - -var INIT_STATE = 42; -var EXTRA_STATE = 69; -var NAME_STATE = 73; -var COMMENT_STATE = 91; -var HCRC_STATE = 103; -var BUSY_STATE = 113; -var FINISH_STATE = 666; - -var BS_NEED_MORE = 1; /* block not completed, need more input or more output */ -var BS_BLOCK_DONE = 2; /* block flush performed */ -var BS_FINISH_STARTED = 3; /* finish started, need only more output at next deflate */ -var BS_FINISH_DONE = 4; /* finish done, accept no more input or output */ - -var OS_CODE = 0x03; // Unix :) . Don't detect, use this default. - -function err(strm, errorCode) { - strm.msg = msg[errorCode]; - return errorCode; -} - -function rank(f) { - return ((f) << 1) - ((f) > 4 ? 9 : 0); -} - -function zero(buf) { var len = buf.length; while (--len >= 0) { buf[len] = 0; } } - - -/* ========================================================================= - * Flush as much pending output as possible. All deflate() output goes - * through this function so some applications may wish to modify it - * to avoid allocating a large strm->output buffer and copying into it. - * (See also read_buf()). - */ -function flush_pending(strm) { - var s = strm.state; - - //_tr_flush_bits(s); - var len = s.pending; - if (len > strm.avail_out) { - len = strm.avail_out; - } - if (len === 0) { return; } - - utils.arraySet(strm.output, s.pending_buf, s.pending_out, len, strm.next_out); - strm.next_out += len; - s.pending_out += len; - strm.total_out += len; - strm.avail_out -= len; - s.pending -= len; - if (s.pending === 0) { - s.pending_out = 0; - } -} - - -function flush_block_only(s, last) { - trees._tr_flush_block(s, (s.block_start >= 0 ? s.block_start : -1), s.strstart - s.block_start, last); - s.block_start = s.strstart; - flush_pending(s.strm); -} - - -function put_byte(s, b) { - s.pending_buf[s.pending++] = b; -} - - -/* ========================================================================= - * Put a short in the pending buffer. The 16-bit value is put in MSB order. - * IN assertion: the stream state is correct and there is enough room in - * pending_buf. - */ -function putShortMSB(s, b) { -// put_byte(s, (Byte)(b >> 8)); -// put_byte(s, (Byte)(b & 0xff)); - s.pending_buf[s.pending++] = (b >>> 8) & 0xff; - s.pending_buf[s.pending++] = b & 0xff; -} - - -/* =========================================================================== - * Read a new buffer from the current input stream, update the adler32 - * and total number of bytes read. All deflate() input goes through - * this function so some applications may wish to modify it to avoid - * allocating a large strm->input buffer and copying from it. - * (See also flush_pending()). - */ -function read_buf(strm, buf, start, size) { - var len = strm.avail_in; - - if (len > size) { len = size; } - if (len === 0) { return 0; } - - strm.avail_in -= len; - - // zmemcpy(buf, strm->next_in, len); - utils.arraySet(buf, strm.input, strm.next_in, len, start); - if (strm.state.wrap === 1) { - strm.adler = adler32(strm.adler, buf, len, start); - } - - else if (strm.state.wrap === 2) { - strm.adler = crc32(strm.adler, buf, len, start); - } - - strm.next_in += len; - strm.total_in += len; - - return len; -} - - -/* =========================================================================== - * Set match_start to the longest match starting at the given string and - * return its length. Matches shorter or equal to prev_length are discarded, - * in which case the result is equal to prev_length and match_start is - * garbage. - * IN assertions: cur_match is the head of the hash chain for the current - * string (strstart) and its distance is <= MAX_DIST, and prev_length >= 1 - * OUT assertion: the match length is not greater than s->lookahead. - */ -function longest_match(s, cur_match) { - var chain_length = s.max_chain_length; /* max hash chain length */ - var scan = s.strstart; /* current string */ - var match; /* matched string */ - var len; /* length of current match */ - var best_len = s.prev_length; /* best match length so far */ - var nice_match = s.nice_match; /* stop if match long enough */ - var limit = (s.strstart > (s.w_size - MIN_LOOKAHEAD)) ? - s.strstart - (s.w_size - MIN_LOOKAHEAD) : 0/*NIL*/; - - var _win = s.window; // shortcut - - var wmask = s.w_mask; - var prev = s.prev; - - /* Stop when cur_match becomes <= limit. To simplify the code, - * we prevent matches with the string of window index 0. - */ - - var strend = s.strstart + MAX_MATCH; - var scan_end1 = _win[scan + best_len - 1]; - var scan_end = _win[scan + best_len]; - - /* The code is optimized for HASH_BITS >= 8 and MAX_MATCH-2 multiple of 16. - * It is easy to get rid of this optimization if necessary. - */ - // Assert(s->hash_bits >= 8 && MAX_MATCH == 258, "Code too clever"); - - /* Do not waste too much time if we already have a good match: */ - if (s.prev_length >= s.good_match) { - chain_length >>= 2; - } - /* Do not look for matches beyond the end of the input. This is necessary - * to make deflate deterministic. - */ - if (nice_match > s.lookahead) { nice_match = s.lookahead; } - - // Assert((ulg)s->strstart <= s->window_size-MIN_LOOKAHEAD, "need lookahead"); - - do { - // Assert(cur_match < s->strstart, "no future"); - match = cur_match; - - /* Skip to next match if the match length cannot increase - * or if the match length is less than 2. Note that the checks below - * for insufficient lookahead only occur occasionally for performance - * reasons. Therefore uninitialized memory will be accessed, and - * conditional jumps will be made that depend on those values. - * However the length of the match is limited to the lookahead, so - * the output of deflate is not affected by the uninitialized values. - */ - - if (_win[match + best_len] !== scan_end || - _win[match + best_len - 1] !== scan_end1 || - _win[match] !== _win[scan] || - _win[++match] !== _win[scan + 1]) { - continue; - } - - /* The check at best_len-1 can be removed because it will be made - * again later. (This heuristic is not always a win.) - * It is not necessary to compare scan[2] and match[2] since they - * are always equal when the other bytes match, given that - * the hash keys are equal and that HASH_BITS >= 8. - */ - scan += 2; - match++; - // Assert(*scan == *match, "match[2]?"); - - /* We check for insufficient lookahead only every 8th comparison; - * the 256th check will be made at strstart+258. - */ - do { - /*jshint noempty:false*/ - } while (_win[++scan] === _win[++match] && _win[++scan] === _win[++match] && - _win[++scan] === _win[++match] && _win[++scan] === _win[++match] && - _win[++scan] === _win[++match] && _win[++scan] === _win[++match] && - _win[++scan] === _win[++match] && _win[++scan] === _win[++match] && - scan < strend); - - // Assert(scan <= s->window+(unsigned)(s->window_size-1), "wild scan"); - - len = MAX_MATCH - (strend - scan); - scan = strend - MAX_MATCH; - - if (len > best_len) { - s.match_start = cur_match; - best_len = len; - if (len >= nice_match) { - break; - } - scan_end1 = _win[scan + best_len - 1]; - scan_end = _win[scan + best_len]; - } - } while ((cur_match = prev[cur_match & wmask]) > limit && --chain_length !== 0); - - if (best_len <= s.lookahead) { - return best_len; - } - return s.lookahead; -} - - -/* =========================================================================== - * Fill the window when the lookahead becomes insufficient. - * Updates strstart and lookahead. - * - * IN assertion: lookahead < MIN_LOOKAHEAD - * OUT assertions: strstart <= window_size-MIN_LOOKAHEAD - * At least one byte has been read, or avail_in == 0; reads are - * performed for at least two bytes (required for the zip translate_eol - * option -- not supported here). - */ -function fill_window(s) { - var _w_size = s.w_size; - var p, n, m, more, str; - - //Assert(s->lookahead < MIN_LOOKAHEAD, "already enough lookahead"); - - do { - more = s.window_size - s.lookahead - s.strstart; - - // JS ints have 32 bit, block below not needed - /* Deal with !@#$% 64K limit: */ - //if (sizeof(int) <= 2) { - // if (more == 0 && s->strstart == 0 && s->lookahead == 0) { - // more = wsize; - // - // } else if (more == (unsigned)(-1)) { - // /* Very unlikely, but possible on 16 bit machine if - // * strstart == 0 && lookahead == 1 (input done a byte at time) - // */ - // more--; - // } - //} - - - /* If the window is almost full and there is insufficient lookahead, - * move the upper half to the lower one to make room in the upper half. - */ - if (s.strstart >= _w_size + (_w_size - MIN_LOOKAHEAD)) { - - utils.arraySet(s.window, s.window, _w_size, _w_size, 0); - s.match_start -= _w_size; - s.strstart -= _w_size; - /* we now have strstart >= MAX_DIST */ - s.block_start -= _w_size; - - /* Slide the hash table (could be avoided with 32 bit values - at the expense of memory usage). We slide even when level == 0 - to keep the hash table consistent if we switch back to level > 0 - later. (Using level 0 permanently is not an optimal usage of - zlib, so we don't care about this pathological case.) - */ - - n = s.hash_size; - p = n; - do { - m = s.head[--p]; - s.head[p] = (m >= _w_size ? m - _w_size : 0); - } while (--n); - - n = _w_size; - p = n; - do { - m = s.prev[--p]; - s.prev[p] = (m >= _w_size ? m - _w_size : 0); - /* If n is not on any hash chain, prev[n] is garbage but - * its value will never be used. - */ - } while (--n); - - more += _w_size; - } - if (s.strm.avail_in === 0) { - break; - } - - /* If there was no sliding: - * strstart <= WSIZE+MAX_DIST-1 && lookahead <= MIN_LOOKAHEAD - 1 && - * more == window_size - lookahead - strstart - * => more >= window_size - (MIN_LOOKAHEAD-1 + WSIZE + MAX_DIST-1) - * => more >= window_size - 2*WSIZE + 2 - * In the BIG_MEM or MMAP case (not yet supported), - * window_size == input_size + MIN_LOOKAHEAD && - * strstart + s->lookahead <= input_size => more >= MIN_LOOKAHEAD. - * Otherwise, window_size == 2*WSIZE so more >= 2. - * If there was sliding, more >= WSIZE. So in all cases, more >= 2. - */ - //Assert(more >= 2, "more < 2"); - n = read_buf(s.strm, s.window, s.strstart + s.lookahead, more); - s.lookahead += n; - - /* Initialize the hash value now that we have some input: */ - if (s.lookahead + s.insert >= MIN_MATCH) { - str = s.strstart - s.insert; - s.ins_h = s.window[str]; - - /* UPDATE_HASH(s, s->ins_h, s->window[str + 1]); */ - s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[str + 1]) & s.hash_mask; -//#if MIN_MATCH != 3 -// Call update_hash() MIN_MATCH-3 more times -//#endif - while (s.insert) { - /* UPDATE_HASH(s, s->ins_h, s->window[str + MIN_MATCH-1]); */ - s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[str + MIN_MATCH - 1]) & s.hash_mask; - - s.prev[str & s.w_mask] = s.head[s.ins_h]; - s.head[s.ins_h] = str; - str++; - s.insert--; - if (s.lookahead + s.insert < MIN_MATCH) { - break; - } - } - } - /* If the whole input has less than MIN_MATCH bytes, ins_h is garbage, - * but this is not important since only literal bytes will be emitted. - */ - - } while (s.lookahead < MIN_LOOKAHEAD && s.strm.avail_in !== 0); - - /* If the WIN_INIT bytes after the end of the current data have never been - * written, then zero those bytes in order to avoid memory check reports of - * the use of uninitialized (or uninitialised as Julian writes) bytes by - * the longest match routines. Update the high water mark for the next - * time through here. WIN_INIT is set to MAX_MATCH since the longest match - * routines allow scanning to strstart + MAX_MATCH, ignoring lookahead. - */ -// if (s.high_water < s.window_size) { -// var curr = s.strstart + s.lookahead; -// var init = 0; -// -// if (s.high_water < curr) { -// /* Previous high water mark below current data -- zero WIN_INIT -// * bytes or up to end of window, whichever is less. -// */ -// init = s.window_size - curr; -// if (init > WIN_INIT) -// init = WIN_INIT; -// zmemzero(s->window + curr, (unsigned)init); -// s->high_water = curr + init; -// } -// else if (s->high_water < (ulg)curr + WIN_INIT) { -// /* High water mark at or above current data, but below current data -// * plus WIN_INIT -- zero out to current data plus WIN_INIT, or up -// * to end of window, whichever is less. -// */ -// init = (ulg)curr + WIN_INIT - s->high_water; -// if (init > s->window_size - s->high_water) -// init = s->window_size - s->high_water; -// zmemzero(s->window + s->high_water, (unsigned)init); -// s->high_water += init; -// } -// } -// -// Assert((ulg)s->strstart <= s->window_size - MIN_LOOKAHEAD, -// "not enough room for search"); -} - -/* =========================================================================== - * Copy without compression as much as possible from the input stream, return - * the current block state. - * This function does not insert new strings in the dictionary since - * uncompressible data is probably not useful. This function is used - * only for the level=0 compression option. - * NOTE: this function should be optimized to avoid extra copying from - * window to pending_buf. - */ -function deflate_stored(s, flush) { - /* Stored blocks are limited to 0xffff bytes, pending_buf is limited - * to pending_buf_size, and each stored block has a 5 byte header: - */ - var max_block_size = 0xffff; - - if (max_block_size > s.pending_buf_size - 5) { - max_block_size = s.pending_buf_size - 5; - } - - /* Copy as much as possible from input to output: */ - for (;;) { - /* Fill the window as much as possible: */ - if (s.lookahead <= 1) { - - //Assert(s->strstart < s->w_size+MAX_DIST(s) || - // s->block_start >= (long)s->w_size, "slide too late"); -// if (!(s.strstart < s.w_size + (s.w_size - MIN_LOOKAHEAD) || -// s.block_start >= s.w_size)) { -// throw new Error("slide too late"); -// } - - fill_window(s); - if (s.lookahead === 0 && flush === Z_NO_FLUSH) { - return BS_NEED_MORE; - } - - if (s.lookahead === 0) { - break; - } - /* flush the current block */ - } - //Assert(s->block_start >= 0L, "block gone"); -// if (s.block_start < 0) throw new Error("block gone"); - - s.strstart += s.lookahead; - s.lookahead = 0; - - /* Emit a stored block if pending_buf will be full: */ - var max_start = s.block_start + max_block_size; - - if (s.strstart === 0 || s.strstart >= max_start) { - /* strstart == 0 is possible when wraparound on 16-bit machine */ - s.lookahead = s.strstart - max_start; - s.strstart = max_start; - /*** FLUSH_BLOCK(s, 0); ***/ - flush_block_only(s, false); - if (s.strm.avail_out === 0) { - return BS_NEED_MORE; - } - /***/ - - - } - /* Flush if we may have to slide, otherwise block_start may become - * negative and the data will be gone: - */ - if (s.strstart - s.block_start >= (s.w_size - MIN_LOOKAHEAD)) { - /*** FLUSH_BLOCK(s, 0); ***/ - flush_block_only(s, false); - if (s.strm.avail_out === 0) { - return BS_NEED_MORE; - } - /***/ - } - } - - s.insert = 0; - - if (flush === Z_FINISH) { - /*** FLUSH_BLOCK(s, 1); ***/ - flush_block_only(s, true); - if (s.strm.avail_out === 0) { - return BS_FINISH_STARTED; - } - /***/ - return BS_FINISH_DONE; - } - - if (s.strstart > s.block_start) { - /*** FLUSH_BLOCK(s, 0); ***/ - flush_block_only(s, false); - if (s.strm.avail_out === 0) { - return BS_NEED_MORE; - } - /***/ - } - - return BS_NEED_MORE; -} - -/* =========================================================================== - * Compress as much as possible from the input stream, return the current - * block state. - * This function does not perform lazy evaluation of matches and inserts - * new strings in the dictionary only for unmatched strings or for short - * matches. It is used only for the fast compression options. - */ -function deflate_fast(s, flush) { - var hash_head; /* head of the hash chain */ - var bflush; /* set if current block must be flushed */ - - for (;;) { - /* Make sure that we always have enough lookahead, except - * at the end of the input file. We need MAX_MATCH bytes - * for the next match, plus MIN_MATCH bytes to insert the - * string following the next match. - */ - if (s.lookahead < MIN_LOOKAHEAD) { - fill_window(s); - if (s.lookahead < MIN_LOOKAHEAD && flush === Z_NO_FLUSH) { - return BS_NEED_MORE; - } - if (s.lookahead === 0) { - break; /* flush the current block */ - } - } - - /* Insert the string window[strstart .. strstart+2] in the - * dictionary, and set hash_head to the head of the hash chain: - */ - hash_head = 0/*NIL*/; - if (s.lookahead >= MIN_MATCH) { - /*** INSERT_STRING(s, s.strstart, hash_head); ***/ - s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[s.strstart + MIN_MATCH - 1]) & s.hash_mask; - hash_head = s.prev[s.strstart & s.w_mask] = s.head[s.ins_h]; - s.head[s.ins_h] = s.strstart; - /***/ - } - - /* Find the longest match, discarding those <= prev_length. - * At this point we have always match_length < MIN_MATCH - */ - if (hash_head !== 0/*NIL*/ && ((s.strstart - hash_head) <= (s.w_size - MIN_LOOKAHEAD))) { - /* To simplify the code, we prevent matches with the string - * of window index 0 (in particular we have to avoid a match - * of the string with itself at the start of the input file). - */ - s.match_length = longest_match(s, hash_head); - /* longest_match() sets match_start */ - } - if (s.match_length >= MIN_MATCH) { - // check_match(s, s.strstart, s.match_start, s.match_length); // for debug only - - /*** _tr_tally_dist(s, s.strstart - s.match_start, - s.match_length - MIN_MATCH, bflush); ***/ - bflush = trees._tr_tally(s, s.strstart - s.match_start, s.match_length - MIN_MATCH); - - s.lookahead -= s.match_length; - - /* Insert new strings in the hash table only if the match length - * is not too large. This saves time but degrades compression. - */ - if (s.match_length <= s.max_lazy_match/*max_insert_length*/ && s.lookahead >= MIN_MATCH) { - s.match_length--; /* string at strstart already in table */ - do { - s.strstart++; - /*** INSERT_STRING(s, s.strstart, hash_head); ***/ - s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[s.strstart + MIN_MATCH - 1]) & s.hash_mask; - hash_head = s.prev[s.strstart & s.w_mask] = s.head[s.ins_h]; - s.head[s.ins_h] = s.strstart; - /***/ - /* strstart never exceeds WSIZE-MAX_MATCH, so there are - * always MIN_MATCH bytes ahead. - */ - } while (--s.match_length !== 0); - s.strstart++; - } else - { - s.strstart += s.match_length; - s.match_length = 0; - s.ins_h = s.window[s.strstart]; - /* UPDATE_HASH(s, s.ins_h, s.window[s.strstart+1]); */ - s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[s.strstart + 1]) & s.hash_mask; - -//#if MIN_MATCH != 3 -// Call UPDATE_HASH() MIN_MATCH-3 more times -//#endif - /* If lookahead < MIN_MATCH, ins_h is garbage, but it does not - * matter since it will be recomputed at next deflate call. - */ - } - } else { - /* No match, output a literal byte */ - //Tracevv((stderr,"%c", s.window[s.strstart])); - /*** _tr_tally_lit(s, s.window[s.strstart], bflush); ***/ - bflush = trees._tr_tally(s, 0, s.window[s.strstart]); - - s.lookahead--; - s.strstart++; - } - if (bflush) { - /*** FLUSH_BLOCK(s, 0); ***/ - flush_block_only(s, false); - if (s.strm.avail_out === 0) { - return BS_NEED_MORE; - } - /***/ - } - } - s.insert = ((s.strstart < (MIN_MATCH - 1)) ? s.strstart : MIN_MATCH - 1); - if (flush === Z_FINISH) { - /*** FLUSH_BLOCK(s, 1); ***/ - flush_block_only(s, true); - if (s.strm.avail_out === 0) { - return BS_FINISH_STARTED; - } - /***/ - return BS_FINISH_DONE; - } - if (s.last_lit) { - /*** FLUSH_BLOCK(s, 0); ***/ - flush_block_only(s, false); - if (s.strm.avail_out === 0) { - return BS_NEED_MORE; - } - /***/ - } - return BS_BLOCK_DONE; -} - -/* =========================================================================== - * Same as above, but achieves better compression. We use a lazy - * evaluation for matches: a match is finally adopted only if there is - * no better match at the next window position. - */ -function deflate_slow(s, flush) { - var hash_head; /* head of hash chain */ - var bflush; /* set if current block must be flushed */ - - var max_insert; - - /* Process the input block. */ - for (;;) { - /* Make sure that we always have enough lookahead, except - * at the end of the input file. We need MAX_MATCH bytes - * for the next match, plus MIN_MATCH bytes to insert the - * string following the next match. - */ - if (s.lookahead < MIN_LOOKAHEAD) { - fill_window(s); - if (s.lookahead < MIN_LOOKAHEAD && flush === Z_NO_FLUSH) { - return BS_NEED_MORE; - } - if (s.lookahead === 0) { break; } /* flush the current block */ - } - - /* Insert the string window[strstart .. strstart+2] in the - * dictionary, and set hash_head to the head of the hash chain: - */ - hash_head = 0/*NIL*/; - if (s.lookahead >= MIN_MATCH) { - /*** INSERT_STRING(s, s.strstart, hash_head); ***/ - s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[s.strstart + MIN_MATCH - 1]) & s.hash_mask; - hash_head = s.prev[s.strstart & s.w_mask] = s.head[s.ins_h]; - s.head[s.ins_h] = s.strstart; - /***/ - } - - /* Find the longest match, discarding those <= prev_length. - */ - s.prev_length = s.match_length; - s.prev_match = s.match_start; - s.match_length = MIN_MATCH - 1; - - if (hash_head !== 0/*NIL*/ && s.prev_length < s.max_lazy_match && - s.strstart - hash_head <= (s.w_size - MIN_LOOKAHEAD)/*MAX_DIST(s)*/) { - /* To simplify the code, we prevent matches with the string - * of window index 0 (in particular we have to avoid a match - * of the string with itself at the start of the input file). - */ - s.match_length = longest_match(s, hash_head); - /* longest_match() sets match_start */ - - if (s.match_length <= 5 && - (s.strategy === Z_FILTERED || (s.match_length === MIN_MATCH && s.strstart - s.match_start > 4096/*TOO_FAR*/))) { - - /* If prev_match is also MIN_MATCH, match_start is garbage - * but we will ignore the current match anyway. - */ - s.match_length = MIN_MATCH - 1; - } - } - /* If there was a match at the previous step and the current - * match is not better, output the previous match: - */ - if (s.prev_length >= MIN_MATCH && s.match_length <= s.prev_length) { - max_insert = s.strstart + s.lookahead - MIN_MATCH; - /* Do not insert strings in hash table beyond this. */ - - //check_match(s, s.strstart-1, s.prev_match, s.prev_length); - - /***_tr_tally_dist(s, s.strstart - 1 - s.prev_match, - s.prev_length - MIN_MATCH, bflush);***/ - bflush = trees._tr_tally(s, s.strstart - 1 - s.prev_match, s.prev_length - MIN_MATCH); - /* Insert in hash table all strings up to the end of the match. - * strstart-1 and strstart are already inserted. If there is not - * enough lookahead, the last two strings are not inserted in - * the hash table. - */ - s.lookahead -= s.prev_length - 1; - s.prev_length -= 2; - do { - if (++s.strstart <= max_insert) { - /*** INSERT_STRING(s, s.strstart, hash_head); ***/ - s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[s.strstart + MIN_MATCH - 1]) & s.hash_mask; - hash_head = s.prev[s.strstart & s.w_mask] = s.head[s.ins_h]; - s.head[s.ins_h] = s.strstart; - /***/ - } - } while (--s.prev_length !== 0); - s.match_available = 0; - s.match_length = MIN_MATCH - 1; - s.strstart++; - - if (bflush) { - /*** FLUSH_BLOCK(s, 0); ***/ - flush_block_only(s, false); - if (s.strm.avail_out === 0) { - return BS_NEED_MORE; - } - /***/ - } - - } else if (s.match_available) { - /* If there was no match at the previous position, output a - * single literal. If there was a match but the current match - * is longer, truncate the previous match to a single literal. - */ - //Tracevv((stderr,"%c", s->window[s->strstart-1])); - /*** _tr_tally_lit(s, s.window[s.strstart-1], bflush); ***/ - bflush = trees._tr_tally(s, 0, s.window[s.strstart - 1]); - - if (bflush) { - /*** FLUSH_BLOCK_ONLY(s, 0) ***/ - flush_block_only(s, false); - /***/ - } - s.strstart++; - s.lookahead--; - if (s.strm.avail_out === 0) { - return BS_NEED_MORE; - } - } else { - /* There is no previous match to compare with, wait for - * the next step to decide. - */ - s.match_available = 1; - s.strstart++; - s.lookahead--; - } - } - //Assert (flush != Z_NO_FLUSH, "no flush?"); - if (s.match_available) { - //Tracevv((stderr,"%c", s->window[s->strstart-1])); - /*** _tr_tally_lit(s, s.window[s.strstart-1], bflush); ***/ - bflush = trees._tr_tally(s, 0, s.window[s.strstart - 1]); - - s.match_available = 0; - } - s.insert = s.strstart < MIN_MATCH - 1 ? s.strstart : MIN_MATCH - 1; - if (flush === Z_FINISH) { - /*** FLUSH_BLOCK(s, 1); ***/ - flush_block_only(s, true); - if (s.strm.avail_out === 0) { - return BS_FINISH_STARTED; - } - /***/ - return BS_FINISH_DONE; - } - if (s.last_lit) { - /*** FLUSH_BLOCK(s, 0); ***/ - flush_block_only(s, false); - if (s.strm.avail_out === 0) { - return BS_NEED_MORE; - } - /***/ - } - - return BS_BLOCK_DONE; -} - - -/* =========================================================================== - * For Z_RLE, simply look for runs of bytes, generate matches only of distance - * one. Do not maintain a hash table. (It will be regenerated if this run of - * deflate switches away from Z_RLE.) - */ -function deflate_rle(s, flush) { - var bflush; /* set if current block must be flushed */ - var prev; /* byte at distance one to match */ - var scan, strend; /* scan goes up to strend for length of run */ - - var _win = s.window; - - for (;;) { - /* Make sure that we always have enough lookahead, except - * at the end of the input file. We need MAX_MATCH bytes - * for the longest run, plus one for the unrolled loop. - */ - if (s.lookahead <= MAX_MATCH) { - fill_window(s); - if (s.lookahead <= MAX_MATCH && flush === Z_NO_FLUSH) { - return BS_NEED_MORE; - } - if (s.lookahead === 0) { break; } /* flush the current block */ - } - - /* See how many times the previous byte repeats */ - s.match_length = 0; - if (s.lookahead >= MIN_MATCH && s.strstart > 0) { - scan = s.strstart - 1; - prev = _win[scan]; - if (prev === _win[++scan] && prev === _win[++scan] && prev === _win[++scan]) { - strend = s.strstart + MAX_MATCH; - do { - /*jshint noempty:false*/ - } while (prev === _win[++scan] && prev === _win[++scan] && - prev === _win[++scan] && prev === _win[++scan] && - prev === _win[++scan] && prev === _win[++scan] && - prev === _win[++scan] && prev === _win[++scan] && - scan < strend); - s.match_length = MAX_MATCH - (strend - scan); - if (s.match_length > s.lookahead) { - s.match_length = s.lookahead; - } - } - //Assert(scan <= s->window+(uInt)(s->window_size-1), "wild scan"); - } - - /* Emit match if have run of MIN_MATCH or longer, else emit literal */ - if (s.match_length >= MIN_MATCH) { - //check_match(s, s.strstart, s.strstart - 1, s.match_length); - - /*** _tr_tally_dist(s, 1, s.match_length - MIN_MATCH, bflush); ***/ - bflush = trees._tr_tally(s, 1, s.match_length - MIN_MATCH); - - s.lookahead -= s.match_length; - s.strstart += s.match_length; - s.match_length = 0; - } else { - /* No match, output a literal byte */ - //Tracevv((stderr,"%c", s->window[s->strstart])); - /*** _tr_tally_lit(s, s.window[s.strstart], bflush); ***/ - bflush = trees._tr_tally(s, 0, s.window[s.strstart]); - - s.lookahead--; - s.strstart++; - } - if (bflush) { - /*** FLUSH_BLOCK(s, 0); ***/ - flush_block_only(s, false); - if (s.strm.avail_out === 0) { - return BS_NEED_MORE; - } - /***/ - } - } - s.insert = 0; - if (flush === Z_FINISH) { - /*** FLUSH_BLOCK(s, 1); ***/ - flush_block_only(s, true); - if (s.strm.avail_out === 0) { - return BS_FINISH_STARTED; - } - /***/ - return BS_FINISH_DONE; - } - if (s.last_lit) { - /*** FLUSH_BLOCK(s, 0); ***/ - flush_block_only(s, false); - if (s.strm.avail_out === 0) { - return BS_NEED_MORE; - } - /***/ - } - return BS_BLOCK_DONE; -} - -/* =========================================================================== - * For Z_HUFFMAN_ONLY, do not look for matches. Do not maintain a hash table. - * (It will be regenerated if this run of deflate switches away from Huffman.) - */ -function deflate_huff(s, flush) { - var bflush; /* set if current block must be flushed */ - - for (;;) { - /* Make sure that we have a literal to write. */ - if (s.lookahead === 0) { - fill_window(s); - if (s.lookahead === 0) { - if (flush === Z_NO_FLUSH) { - return BS_NEED_MORE; - } - break; /* flush the current block */ - } - } - - /* Output a literal byte */ - s.match_length = 0; - //Tracevv((stderr,"%c", s->window[s->strstart])); - /*** _tr_tally_lit(s, s.window[s.strstart], bflush); ***/ - bflush = trees._tr_tally(s, 0, s.window[s.strstart]); - s.lookahead--; - s.strstart++; - if (bflush) { - /*** FLUSH_BLOCK(s, 0); ***/ - flush_block_only(s, false); - if (s.strm.avail_out === 0) { - return BS_NEED_MORE; - } - /***/ - } - } - s.insert = 0; - if (flush === Z_FINISH) { - /*** FLUSH_BLOCK(s, 1); ***/ - flush_block_only(s, true); - if (s.strm.avail_out === 0) { - return BS_FINISH_STARTED; - } - /***/ - return BS_FINISH_DONE; - } - if (s.last_lit) { - /*** FLUSH_BLOCK(s, 0); ***/ - flush_block_only(s, false); - if (s.strm.avail_out === 0) { - return BS_NEED_MORE; - } - /***/ - } - return BS_BLOCK_DONE; -} - -/* Values for max_lazy_match, good_match and max_chain_length, depending on - * the desired pack level (0..9). The values given below have been tuned to - * exclude worst case performance for pathological files. Better values may be - * found for specific files. - */ -function Config(good_length, max_lazy, nice_length, max_chain, func) { - this.good_length = good_length; - this.max_lazy = max_lazy; - this.nice_length = nice_length; - this.max_chain = max_chain; - this.func = func; -} - -var configuration_table; - -configuration_table = [ - /* good lazy nice chain */ - new Config(0, 0, 0, 0, deflate_stored), /* 0 store only */ - new Config(4, 4, 8, 4, deflate_fast), /* 1 max speed, no lazy matches */ - new Config(4, 5, 16, 8, deflate_fast), /* 2 */ - new Config(4, 6, 32, 32, deflate_fast), /* 3 */ - - new Config(4, 4, 16, 16, deflate_slow), /* 4 lazy matches */ - new Config(8, 16, 32, 32, deflate_slow), /* 5 */ - new Config(8, 16, 128, 128, deflate_slow), /* 6 */ - new Config(8, 32, 128, 256, deflate_slow), /* 7 */ - new Config(32, 128, 258, 1024, deflate_slow), /* 8 */ - new Config(32, 258, 258, 4096, deflate_slow) /* 9 max compression */ -]; - - -/* =========================================================================== - * Initialize the "longest match" routines for a new zlib stream - */ -function lm_init(s) { - s.window_size = 2 * s.w_size; - - /*** CLEAR_HASH(s); ***/ - zero(s.head); // Fill with NIL (= 0); - - /* Set the default configuration parameters: - */ - s.max_lazy_match = configuration_table[s.level].max_lazy; - s.good_match = configuration_table[s.level].good_length; - s.nice_match = configuration_table[s.level].nice_length; - s.max_chain_length = configuration_table[s.level].max_chain; - - s.strstart = 0; - s.block_start = 0; - s.lookahead = 0; - s.insert = 0; - s.match_length = s.prev_length = MIN_MATCH - 1; - s.match_available = 0; - s.ins_h = 0; -} - - -function DeflateState() { - this.strm = null; /* pointer back to this zlib stream */ - this.status = 0; /* as the name implies */ - this.pending_buf = null; /* output still pending */ - this.pending_buf_size = 0; /* size of pending_buf */ - this.pending_out = 0; /* next pending byte to output to the stream */ - this.pending = 0; /* nb of bytes in the pending buffer */ - this.wrap = 0; /* bit 0 true for zlib, bit 1 true for gzip */ - this.gzhead = null; /* gzip header information to write */ - this.gzindex = 0; /* where in extra, name, or comment */ - this.method = Z_DEFLATED; /* can only be DEFLATED */ - this.last_flush = -1; /* value of flush param for previous deflate call */ - - this.w_size = 0; /* LZ77 window size (32K by default) */ - this.w_bits = 0; /* log2(w_size) (8..16) */ - this.w_mask = 0; /* w_size - 1 */ - - this.window = null; - /* Sliding window. Input bytes are read into the second half of the window, - * and move to the first half later to keep a dictionary of at least wSize - * bytes. With this organization, matches are limited to a distance of - * wSize-MAX_MATCH bytes, but this ensures that IO is always - * performed with a length multiple of the block size. - */ - - this.window_size = 0; - /* Actual size of window: 2*wSize, except when the user input buffer - * is directly used as sliding window. - */ - - this.prev = null; - /* Link to older string with same hash index. To limit the size of this - * array to 64K, this link is maintained only for the last 32K strings. - * An index in this array is thus a window index modulo 32K. - */ - - this.head = null; /* Heads of the hash chains or NIL. */ - - this.ins_h = 0; /* hash index of string to be inserted */ - this.hash_size = 0; /* number of elements in hash table */ - this.hash_bits = 0; /* log2(hash_size) */ - this.hash_mask = 0; /* hash_size-1 */ - - this.hash_shift = 0; - /* Number of bits by which ins_h must be shifted at each input - * step. It must be such that after MIN_MATCH steps, the oldest - * byte no longer takes part in the hash key, that is: - * hash_shift * MIN_MATCH >= hash_bits - */ - - this.block_start = 0; - /* Window position at the beginning of the current output block. Gets - * negative when the window is moved backwards. - */ - - this.match_length = 0; /* length of best match */ - this.prev_match = 0; /* previous match */ - this.match_available = 0; /* set if previous match exists */ - this.strstart = 0; /* start of string to insert */ - this.match_start = 0; /* start of matching string */ - this.lookahead = 0; /* number of valid bytes ahead in window */ - - this.prev_length = 0; - /* Length of the best match at previous step. Matches not greater than this - * are discarded. This is used in the lazy match evaluation. - */ - - this.max_chain_length = 0; - /* To speed up deflation, hash chains are never searched beyond this - * length. A higher limit improves compression ratio but degrades the - * speed. - */ - - this.max_lazy_match = 0; - /* Attempt to find a better match only when the current match is strictly - * smaller than this value. This mechanism is used only for compression - * levels >= 4. - */ - // That's alias to max_lazy_match, don't use directly - //this.max_insert_length = 0; - /* Insert new strings in the hash table only if the match length is not - * greater than this length. This saves time but degrades compression. - * max_insert_length is used only for compression levels <= 3. - */ - - this.level = 0; /* compression level (1..9) */ - this.strategy = 0; /* favor or force Huffman coding*/ - - this.good_match = 0; - /* Use a faster search when the previous match is longer than this */ - - this.nice_match = 0; /* Stop searching when current match exceeds this */ - - /* used by trees.c: */ - - /* Didn't use ct_data typedef below to suppress compiler warning */ - - // struct ct_data_s dyn_ltree[HEAP_SIZE]; /* literal and length tree */ - // struct ct_data_s dyn_dtree[2*D_CODES+1]; /* distance tree */ - // struct ct_data_s bl_tree[2*BL_CODES+1]; /* Huffman tree for bit lengths */ - - // Use flat array of DOUBLE size, with interleaved fata, - // because JS does not support effective - this.dyn_ltree = new utils.Buf16(HEAP_SIZE * 2); - this.dyn_dtree = new utils.Buf16((2 * D_CODES + 1) * 2); - this.bl_tree = new utils.Buf16((2 * BL_CODES + 1) * 2); - zero(this.dyn_ltree); - zero(this.dyn_dtree); - zero(this.bl_tree); - - this.l_desc = null; /* desc. for literal tree */ - this.d_desc = null; /* desc. for distance tree */ - this.bl_desc = null; /* desc. for bit length tree */ - - //ush bl_count[MAX_BITS+1]; - this.bl_count = new utils.Buf16(MAX_BITS + 1); - /* number of codes at each bit length for an optimal tree */ - - //int heap[2*L_CODES+1]; /* heap used to build the Huffman trees */ - this.heap = new utils.Buf16(2 * L_CODES + 1); /* heap used to build the Huffman trees */ - zero(this.heap); - - this.heap_len = 0; /* number of elements in the heap */ - this.heap_max = 0; /* element of largest frequency */ - /* The sons of heap[n] are heap[2*n] and heap[2*n+1]. heap[0] is not used. - * The same heap array is used to build all trees. - */ - - this.depth = new utils.Buf16(2 * L_CODES + 1); //uch depth[2*L_CODES+1]; - zero(this.depth); - /* Depth of each subtree used as tie breaker for trees of equal frequency - */ - - this.l_buf = 0; /* buffer index for literals or lengths */ - - this.lit_bufsize = 0; - /* Size of match buffer for literals/lengths. There are 4 reasons for - * limiting lit_bufsize to 64K: - * - frequencies can be kept in 16 bit counters - * - if compression is not successful for the first block, all input - * data is still in the window so we can still emit a stored block even - * when input comes from standard input. (This can also be done for - * all blocks if lit_bufsize is not greater than 32K.) - * - if compression is not successful for a file smaller than 64K, we can - * even emit a stored file instead of a stored block (saving 5 bytes). - * This is applicable only for zip (not gzip or zlib). - * - creating new Huffman trees less frequently may not provide fast - * adaptation to changes in the input data statistics. (Take for - * example a binary file with poorly compressible code followed by - * a highly compressible string table.) Smaller buffer sizes give - * fast adaptation but have of course the overhead of transmitting - * trees more frequently. - * - I can't count above 4 - */ - - this.last_lit = 0; /* running index in l_buf */ - - this.d_buf = 0; - /* Buffer index for distances. To simplify the code, d_buf and l_buf have - * the same number of elements. To use different lengths, an extra flag - * array would be necessary. - */ - - this.opt_len = 0; /* bit length of current block with optimal trees */ - this.static_len = 0; /* bit length of current block with static trees */ - this.matches = 0; /* number of string matches in current block */ - this.insert = 0; /* bytes at end of window left to insert */ - - - this.bi_buf = 0; - /* Output buffer. bits are inserted starting at the bottom (least - * significant bits). - */ - this.bi_valid = 0; - /* Number of valid bits in bi_buf. All bits above the last valid bit - * are always zero. - */ - - // Used for window memory init. We safely ignore it for JS. That makes - // sense only for pointers and memory check tools. - //this.high_water = 0; - /* High water mark offset in window for initialized bytes -- bytes above - * this are set to zero in order to avoid memory check warnings when - * longest match routines access bytes past the input. This is then - * updated to the new high water mark. - */ -} - - -function deflateResetKeep(strm) { - var s; - - if (!strm || !strm.state) { - return err(strm, Z_STREAM_ERROR); - } - - strm.total_in = strm.total_out = 0; - strm.data_type = Z_UNKNOWN; - - s = strm.state; - s.pending = 0; - s.pending_out = 0; - - if (s.wrap < 0) { - s.wrap = -s.wrap; - /* was made negative by deflate(..., Z_FINISH); */ - } - s.status = (s.wrap ? INIT_STATE : BUSY_STATE); - strm.adler = (s.wrap === 2) ? - 0 // crc32(0, Z_NULL, 0) - : - 1; // adler32(0, Z_NULL, 0) - s.last_flush = Z_NO_FLUSH; - trees._tr_init(s); - return Z_OK; -} - - -function deflateReset(strm) { - var ret = deflateResetKeep(strm); - if (ret === Z_OK) { - lm_init(strm.state); - } - return ret; -} - - -function deflateSetHeader(strm, head) { - if (!strm || !strm.state) { return Z_STREAM_ERROR; } - if (strm.state.wrap !== 2) { return Z_STREAM_ERROR; } - strm.state.gzhead = head; - return Z_OK; -} - - -function deflateInit2(strm, level, method, windowBits, memLevel, strategy) { - if (!strm) { // === Z_NULL - return Z_STREAM_ERROR; - } - var wrap = 1; - - if (level === Z_DEFAULT_COMPRESSION) { - level = 6; - } - - if (windowBits < 0) { /* suppress zlib wrapper */ - wrap = 0; - windowBits = -windowBits; - } - - else if (windowBits > 15) { - wrap = 2; /* write gzip wrapper instead */ - windowBits -= 16; - } - - - if (memLevel < 1 || memLevel > MAX_MEM_LEVEL || method !== Z_DEFLATED || - windowBits < 8 || windowBits > 15 || level < 0 || level > 9 || - strategy < 0 || strategy > Z_FIXED) { - return err(strm, Z_STREAM_ERROR); - } - - - if (windowBits === 8) { - windowBits = 9; - } - /* until 256-byte window bug fixed */ - - var s = new DeflateState(); - - strm.state = s; - s.strm = strm; - - s.wrap = wrap; - s.gzhead = null; - s.w_bits = windowBits; - s.w_size = 1 << s.w_bits; - s.w_mask = s.w_size - 1; - - s.hash_bits = memLevel + 7; - s.hash_size = 1 << s.hash_bits; - s.hash_mask = s.hash_size - 1; - s.hash_shift = ~~((s.hash_bits + MIN_MATCH - 1) / MIN_MATCH); - - s.window = new utils.Buf8(s.w_size * 2); - s.head = new utils.Buf16(s.hash_size); - s.prev = new utils.Buf16(s.w_size); - - // Don't need mem init magic for JS. - //s.high_water = 0; /* nothing written to s->window yet */ - - s.lit_bufsize = 1 << (memLevel + 6); /* 16K elements by default */ - - s.pending_buf_size = s.lit_bufsize * 4; - - //overlay = (ushf *) ZALLOC(strm, s->lit_bufsize, sizeof(ush)+2); - //s->pending_buf = (uchf *) overlay; - s.pending_buf = new utils.Buf8(s.pending_buf_size); - - // It is offset from `s.pending_buf` (size is `s.lit_bufsize * 2`) - //s->d_buf = overlay + s->lit_bufsize/sizeof(ush); - s.d_buf = 1 * s.lit_bufsize; - - //s->l_buf = s->pending_buf + (1+sizeof(ush))*s->lit_bufsize; - s.l_buf = (1 + 2) * s.lit_bufsize; - - s.level = level; - s.strategy = strategy; - s.method = method; - - return deflateReset(strm); -} - -function deflateInit(strm, level) { - return deflateInit2(strm, level, Z_DEFLATED, MAX_WBITS, DEF_MEM_LEVEL, Z_DEFAULT_STRATEGY); -} - - -function deflate(strm, flush) { - var old_flush, s; - var beg, val; // for gzip header write only - - if (!strm || !strm.state || - flush > Z_BLOCK || flush < 0) { - return strm ? err(strm, Z_STREAM_ERROR) : Z_STREAM_ERROR; - } - - s = strm.state; - - if (!strm.output || - (!strm.input && strm.avail_in !== 0) || - (s.status === FINISH_STATE && flush !== Z_FINISH)) { - return err(strm, (strm.avail_out === 0) ? Z_BUF_ERROR : Z_STREAM_ERROR); - } - - s.strm = strm; /* just in case */ - old_flush = s.last_flush; - s.last_flush = flush; - - /* Write the header */ - if (s.status === INIT_STATE) { - - if (s.wrap === 2) { // GZIP header - strm.adler = 0; //crc32(0L, Z_NULL, 0); - put_byte(s, 31); - put_byte(s, 139); - put_byte(s, 8); - if (!s.gzhead) { // s->gzhead == Z_NULL - put_byte(s, 0); - put_byte(s, 0); - put_byte(s, 0); - put_byte(s, 0); - put_byte(s, 0); - put_byte(s, s.level === 9 ? 2 : - (s.strategy >= Z_HUFFMAN_ONLY || s.level < 2 ? - 4 : 0)); - put_byte(s, OS_CODE); - s.status = BUSY_STATE; - } - else { - put_byte(s, (s.gzhead.text ? 1 : 0) + - (s.gzhead.hcrc ? 2 : 0) + - (!s.gzhead.extra ? 0 : 4) + - (!s.gzhead.name ? 0 : 8) + - (!s.gzhead.comment ? 0 : 16) - ); - put_byte(s, s.gzhead.time & 0xff); - put_byte(s, (s.gzhead.time >> 8) & 0xff); - put_byte(s, (s.gzhead.time >> 16) & 0xff); - put_byte(s, (s.gzhead.time >> 24) & 0xff); - put_byte(s, s.level === 9 ? 2 : - (s.strategy >= Z_HUFFMAN_ONLY || s.level < 2 ? - 4 : 0)); - put_byte(s, s.gzhead.os & 0xff); - if (s.gzhead.extra && s.gzhead.extra.length) { - put_byte(s, s.gzhead.extra.length & 0xff); - put_byte(s, (s.gzhead.extra.length >> 8) & 0xff); - } - if (s.gzhead.hcrc) { - strm.adler = crc32(strm.adler, s.pending_buf, s.pending, 0); - } - s.gzindex = 0; - s.status = EXTRA_STATE; - } - } - else // DEFLATE header - { - var header = (Z_DEFLATED + ((s.w_bits - 8) << 4)) << 8; - var level_flags = -1; - - if (s.strategy >= Z_HUFFMAN_ONLY || s.level < 2) { - level_flags = 0; - } else if (s.level < 6) { - level_flags = 1; - } else if (s.level === 6) { - level_flags = 2; - } else { - level_flags = 3; - } - header |= (level_flags << 6); - if (s.strstart !== 0) { header |= PRESET_DICT; } - header += 31 - (header % 31); - - s.status = BUSY_STATE; - putShortMSB(s, header); - - /* Save the adler32 of the preset dictionary: */ - if (s.strstart !== 0) { - putShortMSB(s, strm.adler >>> 16); - putShortMSB(s, strm.adler & 0xffff); - } - strm.adler = 1; // adler32(0L, Z_NULL, 0); - } - } - -//#ifdef GZIP - if (s.status === EXTRA_STATE) { - if (s.gzhead.extra/* != Z_NULL*/) { - beg = s.pending; /* start of bytes to update crc */ - - while (s.gzindex < (s.gzhead.extra.length & 0xffff)) { - if (s.pending === s.pending_buf_size) { - if (s.gzhead.hcrc && s.pending > beg) { - strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg); - } - flush_pending(strm); - beg = s.pending; - if (s.pending === s.pending_buf_size) { - break; - } - } - put_byte(s, s.gzhead.extra[s.gzindex] & 0xff); - s.gzindex++; - } - if (s.gzhead.hcrc && s.pending > beg) { - strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg); - } - if (s.gzindex === s.gzhead.extra.length) { - s.gzindex = 0; - s.status = NAME_STATE; - } - } - else { - s.status = NAME_STATE; - } - } - if (s.status === NAME_STATE) { - if (s.gzhead.name/* != Z_NULL*/) { - beg = s.pending; /* start of bytes to update crc */ - //int val; - - do { - if (s.pending === s.pending_buf_size) { - if (s.gzhead.hcrc && s.pending > beg) { - strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg); - } - flush_pending(strm); - beg = s.pending; - if (s.pending === s.pending_buf_size) { - val = 1; - break; - } - } - // JS specific: little magic to add zero terminator to end of string - if (s.gzindex < s.gzhead.name.length) { - val = s.gzhead.name.charCodeAt(s.gzindex++) & 0xff; - } else { - val = 0; - } - put_byte(s, val); - } while (val !== 0); - - if (s.gzhead.hcrc && s.pending > beg) { - strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg); - } - if (val === 0) { - s.gzindex = 0; - s.status = COMMENT_STATE; - } - } - else { - s.status = COMMENT_STATE; - } - } - if (s.status === COMMENT_STATE) { - if (s.gzhead.comment/* != Z_NULL*/) { - beg = s.pending; /* start of bytes to update crc */ - //int val; - - do { - if (s.pending === s.pending_buf_size) { - if (s.gzhead.hcrc && s.pending > beg) { - strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg); - } - flush_pending(strm); - beg = s.pending; - if (s.pending === s.pending_buf_size) { - val = 1; - break; - } - } - // JS specific: little magic to add zero terminator to end of string - if (s.gzindex < s.gzhead.comment.length) { - val = s.gzhead.comment.charCodeAt(s.gzindex++) & 0xff; - } else { - val = 0; - } - put_byte(s, val); - } while (val !== 0); - - if (s.gzhead.hcrc && s.pending > beg) { - strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg); - } - if (val === 0) { - s.status = HCRC_STATE; - } - } - else { - s.status = HCRC_STATE; - } - } - if (s.status === HCRC_STATE) { - if (s.gzhead.hcrc) { - if (s.pending + 2 > s.pending_buf_size) { - flush_pending(strm); - } - if (s.pending + 2 <= s.pending_buf_size) { - put_byte(s, strm.adler & 0xff); - put_byte(s, (strm.adler >> 8) & 0xff); - strm.adler = 0; //crc32(0L, Z_NULL, 0); - s.status = BUSY_STATE; - } - } - else { - s.status = BUSY_STATE; - } - } -//#endif - - /* Flush as much pending output as possible */ - if (s.pending !== 0) { - flush_pending(strm); - if (strm.avail_out === 0) { - /* Since avail_out is 0, deflate will be called again with - * more output space, but possibly with both pending and - * avail_in equal to zero. There won't be anything to do, - * but this is not an error situation so make sure we - * return OK instead of BUF_ERROR at next call of deflate: - */ - s.last_flush = -1; - return Z_OK; - } - - /* Make sure there is something to do and avoid duplicate consecutive - * flushes. For repeated and useless calls with Z_FINISH, we keep - * returning Z_STREAM_END instead of Z_BUF_ERROR. - */ - } else if (strm.avail_in === 0 && rank(flush) <= rank(old_flush) && - flush !== Z_FINISH) { - return err(strm, Z_BUF_ERROR); - } - - /* User must not provide more input after the first FINISH: */ - if (s.status === FINISH_STATE && strm.avail_in !== 0) { - return err(strm, Z_BUF_ERROR); - } - - /* Start a new block or continue the current one. - */ - if (strm.avail_in !== 0 || s.lookahead !== 0 || - (flush !== Z_NO_FLUSH && s.status !== FINISH_STATE)) { - var bstate = (s.strategy === Z_HUFFMAN_ONLY) ? deflate_huff(s, flush) : - (s.strategy === Z_RLE ? deflate_rle(s, flush) : - configuration_table[s.level].func(s, flush)); - - if (bstate === BS_FINISH_STARTED || bstate === BS_FINISH_DONE) { - s.status = FINISH_STATE; - } - if (bstate === BS_NEED_MORE || bstate === BS_FINISH_STARTED) { - if (strm.avail_out === 0) { - s.last_flush = -1; - /* avoid BUF_ERROR next call, see above */ - } - return Z_OK; - /* If flush != Z_NO_FLUSH && avail_out == 0, the next call - * of deflate should use the same flush parameter to make sure - * that the flush is complete. So we don't have to output an - * empty block here, this will be done at next call. This also - * ensures that for a very small output buffer, we emit at most - * one empty block. - */ - } - if (bstate === BS_BLOCK_DONE) { - if (flush === Z_PARTIAL_FLUSH) { - trees._tr_align(s); - } - else if (flush !== Z_BLOCK) { /* FULL_FLUSH or SYNC_FLUSH */ - - trees._tr_stored_block(s, 0, 0, false); - /* For a full flush, this empty block will be recognized - * as a special marker by inflate_sync(). - */ - if (flush === Z_FULL_FLUSH) { - /*** CLEAR_HASH(s); ***/ /* forget history */ - zero(s.head); // Fill with NIL (= 0); - - if (s.lookahead === 0) { - s.strstart = 0; - s.block_start = 0; - s.insert = 0; - } - } - } - flush_pending(strm); - if (strm.avail_out === 0) { - s.last_flush = -1; /* avoid BUF_ERROR at next call, see above */ - return Z_OK; - } - } - } - //Assert(strm->avail_out > 0, "bug2"); - //if (strm.avail_out <= 0) { throw new Error("bug2");} - - if (flush !== Z_FINISH) { return Z_OK; } - if (s.wrap <= 0) { return Z_STREAM_END; } - - /* Write the trailer */ - if (s.wrap === 2) { - put_byte(s, strm.adler & 0xff); - put_byte(s, (strm.adler >> 8) & 0xff); - put_byte(s, (strm.adler >> 16) & 0xff); - put_byte(s, (strm.adler >> 24) & 0xff); - put_byte(s, strm.total_in & 0xff); - put_byte(s, (strm.total_in >> 8) & 0xff); - put_byte(s, (strm.total_in >> 16) & 0xff); - put_byte(s, (strm.total_in >> 24) & 0xff); - } - else - { - putShortMSB(s, strm.adler >>> 16); - putShortMSB(s, strm.adler & 0xffff); - } - - flush_pending(strm); - /* If avail_out is zero, the application will call deflate again - * to flush the rest. - */ - if (s.wrap > 0) { s.wrap = -s.wrap; } - /* write the trailer only once! */ - return s.pending !== 0 ? Z_OK : Z_STREAM_END; -} - -function deflateEnd(strm) { - var status; - - if (!strm/*== Z_NULL*/ || !strm.state/*== Z_NULL*/) { - return Z_STREAM_ERROR; - } - - status = strm.state.status; - if (status !== INIT_STATE && - status !== EXTRA_STATE && - status !== NAME_STATE && - status !== COMMENT_STATE && - status !== HCRC_STATE && - status !== BUSY_STATE && - status !== FINISH_STATE - ) { - return err(strm, Z_STREAM_ERROR); - } - - strm.state = null; - - return status === BUSY_STATE ? err(strm, Z_DATA_ERROR) : Z_OK; -} - - -/* ========================================================================= - * Initializes the compression dictionary from the given byte - * sequence without producing any compressed output. - */ -function deflateSetDictionary(strm, dictionary) { - var dictLength = dictionary.length; - - var s; - var str, n; - var wrap; - var avail; - var next; - var input; - var tmpDict; - - if (!strm/*== Z_NULL*/ || !strm.state/*== Z_NULL*/) { - return Z_STREAM_ERROR; - } - - s = strm.state; - wrap = s.wrap; - - if (wrap === 2 || (wrap === 1 && s.status !== INIT_STATE) || s.lookahead) { - return Z_STREAM_ERROR; - } - - /* when using zlib wrappers, compute Adler-32 for provided dictionary */ - if (wrap === 1) { - /* adler32(strm->adler, dictionary, dictLength); */ - strm.adler = adler32(strm.adler, dictionary, dictLength, 0); - } - - s.wrap = 0; /* avoid computing Adler-32 in read_buf */ - - /* if dictionary would fill window, just replace the history */ - if (dictLength >= s.w_size) { - if (wrap === 0) { /* already empty otherwise */ - /*** CLEAR_HASH(s); ***/ - zero(s.head); // Fill with NIL (= 0); - s.strstart = 0; - s.block_start = 0; - s.insert = 0; - } - /* use the tail */ - // dictionary = dictionary.slice(dictLength - s.w_size); - tmpDict = new utils.Buf8(s.w_size); - utils.arraySet(tmpDict, dictionary, dictLength - s.w_size, s.w_size, 0); - dictionary = tmpDict; - dictLength = s.w_size; - } - /* insert dictionary into window and hash */ - avail = strm.avail_in; - next = strm.next_in; - input = strm.input; - strm.avail_in = dictLength; - strm.next_in = 0; - strm.input = dictionary; - fill_window(s); - while (s.lookahead >= MIN_MATCH) { - str = s.strstart; - n = s.lookahead - (MIN_MATCH - 1); - do { - /* UPDATE_HASH(s, s->ins_h, s->window[str + MIN_MATCH-1]); */ - s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[str + MIN_MATCH - 1]) & s.hash_mask; - - s.prev[str & s.w_mask] = s.head[s.ins_h]; - - s.head[s.ins_h] = str; - str++; - } while (--n); - s.strstart = str; - s.lookahead = MIN_MATCH - 1; - fill_window(s); - } - s.strstart += s.lookahead; - s.block_start = s.strstart; - s.insert = s.lookahead; - s.lookahead = 0; - s.match_length = s.prev_length = MIN_MATCH - 1; - s.match_available = 0; - strm.next_in = next; - strm.input = input; - strm.avail_in = avail; - s.wrap = wrap; - return Z_OK; -} - - -exports.deflateInit = deflateInit; -exports.deflateInit2 = deflateInit2; -exports.deflateReset = deflateReset; -exports.deflateResetKeep = deflateResetKeep; -exports.deflateSetHeader = deflateSetHeader; -exports.deflate = deflate; -exports.deflateEnd = deflateEnd; -exports.deflateSetDictionary = deflateSetDictionary; -exports.deflateInfo = 'pako deflate (from Nodeca project)'; - -/* Not implemented -exports.deflateBound = deflateBound; -exports.deflateCopy = deflateCopy; -exports.deflateParams = deflateParams; -exports.deflatePending = deflatePending; -exports.deflatePrime = deflatePrime; -exports.deflateTune = deflateTune; -*/ - -},{"../utils/common":3,"./adler32":5,"./crc32":7,"./messages":13,"./trees":14}],9:[function(require,module,exports){ -'use strict'; - - -function GZheader() { - /* true if compressed data believed to be text */ - this.text = 0; - /* modification time */ - this.time = 0; - /* extra flags (not used when writing a gzip file) */ - this.xflags = 0; - /* operating system */ - this.os = 0; - /* pointer to extra field or Z_NULL if none */ - this.extra = null; - /* extra field length (valid if extra != Z_NULL) */ - this.extra_len = 0; // Actually, we don't need it in JS, - // but leave for few code modifications - - // - // Setup limits is not necessary because in js we should not preallocate memory - // for inflate use constant limit in 65536 bytes - // - - /* space at extra (only when reading header) */ - // this.extra_max = 0; - /* pointer to zero-terminated file name or Z_NULL */ - this.name = ''; - /* space at name (only when reading header) */ - // this.name_max = 0; - /* pointer to zero-terminated comment or Z_NULL */ - this.comment = ''; - /* space at comment (only when reading header) */ - // this.comm_max = 0; - /* true if there was or will be a header crc */ - this.hcrc = 0; - /* true when done reading gzip header (not used when writing a gzip file) */ - this.done = false; -} - -module.exports = GZheader; - -},{}],10:[function(require,module,exports){ -'use strict'; - -// See state defs from inflate.js -var BAD = 30; /* got a data error -- remain here until reset */ -var TYPE = 12; /* i: waiting for type bits, including last-flag bit */ - -/* - Decode literal, length, and distance codes and write out the resulting - literal and match bytes until either not enough input or output is - available, an end-of-block is encountered, or a data error is encountered. - When large enough input and output buffers are supplied to inflate(), for - example, a 16K input buffer and a 64K output buffer, more than 95% of the - inflate execution time is spent in this routine. - - Entry assumptions: - - state.mode === LEN - strm.avail_in >= 6 - strm.avail_out >= 258 - start >= strm.avail_out - state.bits < 8 - - On return, state.mode is one of: - - LEN -- ran out of enough output space or enough available input - TYPE -- reached end of block code, inflate() to interpret next block - BAD -- error in block data - - Notes: - - - The maximum input bits used by a length/distance pair is 15 bits for the - length code, 5 bits for the length extra, 15 bits for the distance code, - and 13 bits for the distance extra. This totals 48 bits, or six bytes. - Therefore if strm.avail_in >= 6, then there is enough input to avoid - checking for available input while decoding. - - - The maximum bytes that a single length/distance pair can output is 258 - bytes, which is the maximum length that can be coded. inflate_fast() - requires strm.avail_out >= 258 for each loop to avoid checking for - output space. - */ -module.exports = function inflate_fast(strm, start) { - var state; - var _in; /* local strm.input */ - var last; /* have enough input while in < last */ - var _out; /* local strm.output */ - var beg; /* inflate()'s initial strm.output */ - var end; /* while out < end, enough space available */ -//#ifdef INFLATE_STRICT - var dmax; /* maximum distance from zlib header */ -//#endif - var wsize; /* window size or zero if not using window */ - var whave; /* valid bytes in the window */ - var wnext; /* window write index */ - // Use `s_window` instead `window`, avoid conflict with instrumentation tools - var s_window; /* allocated sliding window, if wsize != 0 */ - var hold; /* local strm.hold */ - var bits; /* local strm.bits */ - var lcode; /* local strm.lencode */ - var dcode; /* local strm.distcode */ - var lmask; /* mask for first level of length codes */ - var dmask; /* mask for first level of distance codes */ - var here; /* retrieved table entry */ - var op; /* code bits, operation, extra bits, or */ - /* window position, window bytes to copy */ - var len; /* match length, unused bytes */ - var dist; /* match distance */ - var from; /* where to copy match from */ - var from_source; - - - var input, output; // JS specific, because we have no pointers - - /* copy state to local variables */ - state = strm.state; - //here = state.here; - _in = strm.next_in; - input = strm.input; - last = _in + (strm.avail_in - 5); - _out = strm.next_out; - output = strm.output; - beg = _out - (start - strm.avail_out); - end = _out + (strm.avail_out - 257); -//#ifdef INFLATE_STRICT - dmax = state.dmax; -//#endif - wsize = state.wsize; - whave = state.whave; - wnext = state.wnext; - s_window = state.window; - hold = state.hold; - bits = state.bits; - lcode = state.lencode; - dcode = state.distcode; - lmask = (1 << state.lenbits) - 1; - dmask = (1 << state.distbits) - 1; - - - /* decode literals and length/distances until end-of-block or not enough - input data or output space */ - - top: - do { - if (bits < 15) { - hold += input[_in++] << bits; - bits += 8; - hold += input[_in++] << bits; - bits += 8; - } - - here = lcode[hold & lmask]; - - dolen: - for (;;) { // Goto emulation - op = here >>> 24/*here.bits*/; - hold >>>= op; - bits -= op; - op = (here >>> 16) & 0xff/*here.op*/; - if (op === 0) { /* literal */ - //Tracevv((stderr, here.val >= 0x20 && here.val < 0x7f ? - // "inflate: literal '%c'\n" : - // "inflate: literal 0x%02x\n", here.val)); - output[_out++] = here & 0xffff/*here.val*/; - } - else if (op & 16) { /* length base */ - len = here & 0xffff/*here.val*/; - op &= 15; /* number of extra bits */ - if (op) { - if (bits < op) { - hold += input[_in++] << bits; - bits += 8; - } - len += hold & ((1 << op) - 1); - hold >>>= op; - bits -= op; - } - //Tracevv((stderr, "inflate: length %u\n", len)); - if (bits < 15) { - hold += input[_in++] << bits; - bits += 8; - hold += input[_in++] << bits; - bits += 8; - } - here = dcode[hold & dmask]; - - dodist: - for (;;) { // goto emulation - op = here >>> 24/*here.bits*/; - hold >>>= op; - bits -= op; - op = (here >>> 16) & 0xff/*here.op*/; - - if (op & 16) { /* distance base */ - dist = here & 0xffff/*here.val*/; - op &= 15; /* number of extra bits */ - if (bits < op) { - hold += input[_in++] << bits; - bits += 8; - if (bits < op) { - hold += input[_in++] << bits; - bits += 8; - } - } - dist += hold & ((1 << op) - 1); -//#ifdef INFLATE_STRICT - if (dist > dmax) { - strm.msg = 'invalid distance too far back'; - state.mode = BAD; - break top; - } -//#endif - hold >>>= op; - bits -= op; - //Tracevv((stderr, "inflate: distance %u\n", dist)); - op = _out - beg; /* max distance in output */ - if (dist > op) { /* see if copy from window */ - op = dist - op; /* distance back in window */ - if (op > whave) { - if (state.sane) { - strm.msg = 'invalid distance too far back'; - state.mode = BAD; - break top; - } - -// (!) This block is disabled in zlib defailts, -// don't enable it for binary compatibility -//#ifdef INFLATE_ALLOW_INVALID_DISTANCE_TOOFAR_ARRR -// if (len <= op - whave) { -// do { -// output[_out++] = 0; -// } while (--len); -// continue top; -// } -// len -= op - whave; -// do { -// output[_out++] = 0; -// } while (--op > whave); -// if (op === 0) { -// from = _out - dist; -// do { -// output[_out++] = output[from++]; -// } while (--len); -// continue top; -// } -//#endif - } - from = 0; // window index - from_source = s_window; - if (wnext === 0) { /* very common case */ - from += wsize - op; - if (op < len) { /* some from window */ - len -= op; - do { - output[_out++] = s_window[from++]; - } while (--op); - from = _out - dist; /* rest from output */ - from_source = output; - } - } - else if (wnext < op) { /* wrap around window */ - from += wsize + wnext - op; - op -= wnext; - if (op < len) { /* some from end of window */ - len -= op; - do { - output[_out++] = s_window[from++]; - } while (--op); - from = 0; - if (wnext < len) { /* some from start of window */ - op = wnext; - len -= op; - do { - output[_out++] = s_window[from++]; - } while (--op); - from = _out - dist; /* rest from output */ - from_source = output; - } - } - } - else { /* contiguous in window */ - from += wnext - op; - if (op < len) { /* some from window */ - len -= op; - do { - output[_out++] = s_window[from++]; - } while (--op); - from = _out - dist; /* rest from output */ - from_source = output; - } - } - while (len > 2) { - output[_out++] = from_source[from++]; - output[_out++] = from_source[from++]; - output[_out++] = from_source[from++]; - len -= 3; - } - if (len) { - output[_out++] = from_source[from++]; - if (len > 1) { - output[_out++] = from_source[from++]; - } - } - } - else { - from = _out - dist; /* copy direct from output */ - do { /* minimum length is three */ - output[_out++] = output[from++]; - output[_out++] = output[from++]; - output[_out++] = output[from++]; - len -= 3; - } while (len > 2); - if (len) { - output[_out++] = output[from++]; - if (len > 1) { - output[_out++] = output[from++]; - } - } - } - } - else if ((op & 64) === 0) { /* 2nd level distance code */ - here = dcode[(here & 0xffff)/*here.val*/ + (hold & ((1 << op) - 1))]; - continue dodist; - } - else { - strm.msg = 'invalid distance code'; - state.mode = BAD; - break top; - } - - break; // need to emulate goto via "continue" - } - } - else if ((op & 64) === 0) { /* 2nd level length code */ - here = lcode[(here & 0xffff)/*here.val*/ + (hold & ((1 << op) - 1))]; - continue dolen; - } - else if (op & 32) { /* end-of-block */ - //Tracevv((stderr, "inflate: end of block\n")); - state.mode = TYPE; - break top; - } - else { - strm.msg = 'invalid literal/length code'; - state.mode = BAD; - break top; - } - - break; // need to emulate goto via "continue" - } - } while (_in < last && _out < end); - - /* return unused bytes (on entry, bits < 8, so in won't go too far back) */ - len = bits >> 3; - _in -= len; - bits -= len << 3; - hold &= (1 << bits) - 1; - - /* update state and return */ - strm.next_in = _in; - strm.next_out = _out; - strm.avail_in = (_in < last ? 5 + (last - _in) : 5 - (_in - last)); - strm.avail_out = (_out < end ? 257 + (end - _out) : 257 - (_out - end)); - state.hold = hold; - state.bits = bits; - return; -}; - -},{}],11:[function(require,module,exports){ -'use strict'; - - -var utils = require('../utils/common'); -var adler32 = require('./adler32'); -var crc32 = require('./crc32'); -var inflate_fast = require('./inffast'); -var inflate_table = require('./inftrees'); - -var CODES = 0; -var LENS = 1; -var DISTS = 2; - -/* Public constants ==========================================================*/ -/* ===========================================================================*/ - - -/* Allowed flush values; see deflate() and inflate() below for details */ -//var Z_NO_FLUSH = 0; -//var Z_PARTIAL_FLUSH = 1; -//var Z_SYNC_FLUSH = 2; -//var Z_FULL_FLUSH = 3; -var Z_FINISH = 4; -var Z_BLOCK = 5; -var Z_TREES = 6; - - -/* Return codes for the compression/decompression functions. Negative values - * are errors, positive values are used for special but normal events. - */ -var Z_OK = 0; -var Z_STREAM_END = 1; -var Z_NEED_DICT = 2; -//var Z_ERRNO = -1; -var Z_STREAM_ERROR = -2; -var Z_DATA_ERROR = -3; -var Z_MEM_ERROR = -4; -var Z_BUF_ERROR = -5; -//var Z_VERSION_ERROR = -6; - -/* The deflate compression method */ -var Z_DEFLATED = 8; - - -/* STATES ====================================================================*/ -/* ===========================================================================*/ - - -var HEAD = 1; /* i: waiting for magic header */ -var FLAGS = 2; /* i: waiting for method and flags (gzip) */ -var TIME = 3; /* i: waiting for modification time (gzip) */ -var OS = 4; /* i: waiting for extra flags and operating system (gzip) */ -var EXLEN = 5; /* i: waiting for extra length (gzip) */ -var EXTRA = 6; /* i: waiting for extra bytes (gzip) */ -var NAME = 7; /* i: waiting for end of file name (gzip) */ -var COMMENT = 8; /* i: waiting for end of comment (gzip) */ -var HCRC = 9; /* i: waiting for header crc (gzip) */ -var DICTID = 10; /* i: waiting for dictionary check value */ -var DICT = 11; /* waiting for inflateSetDictionary() call */ -var TYPE = 12; /* i: waiting for type bits, including last-flag bit */ -var TYPEDO = 13; /* i: same, but skip check to exit inflate on new block */ -var STORED = 14; /* i: waiting for stored size (length and complement) */ -var COPY_ = 15; /* i/o: same as COPY below, but only first time in */ -var COPY = 16; /* i/o: waiting for input or output to copy stored block */ -var TABLE = 17; /* i: waiting for dynamic block table lengths */ -var LENLENS = 18; /* i: waiting for code length code lengths */ -var CODELENS = 19; /* i: waiting for length/lit and distance code lengths */ -var LEN_ = 20; /* i: same as LEN below, but only first time in */ -var LEN = 21; /* i: waiting for length/lit/eob code */ -var LENEXT = 22; /* i: waiting for length extra bits */ -var DIST = 23; /* i: waiting for distance code */ -var DISTEXT = 24; /* i: waiting for distance extra bits */ -var MATCH = 25; /* o: waiting for output space to copy string */ -var LIT = 26; /* o: waiting for output space to write literal */ -var CHECK = 27; /* i: waiting for 32-bit check value */ -var LENGTH = 28; /* i: waiting for 32-bit length (gzip) */ -var DONE = 29; /* finished check, done -- remain here until reset */ -var BAD = 30; /* got a data error -- remain here until reset */ -var MEM = 31; /* got an inflate() memory error -- remain here until reset */ -var SYNC = 32; /* looking for synchronization bytes to restart inflate() */ - -/* ===========================================================================*/ - - - -var ENOUGH_LENS = 852; -var ENOUGH_DISTS = 592; -//var ENOUGH = (ENOUGH_LENS+ENOUGH_DISTS); - -var MAX_WBITS = 15; -/* 32K LZ77 window */ -var DEF_WBITS = MAX_WBITS; - - -function zswap32(q) { - return (((q >>> 24) & 0xff) + - ((q >>> 8) & 0xff00) + - ((q & 0xff00) << 8) + - ((q & 0xff) << 24)); -} - - -function InflateState() { - this.mode = 0; /* current inflate mode */ - this.last = false; /* true if processing last block */ - this.wrap = 0; /* bit 0 true for zlib, bit 1 true for gzip */ - this.havedict = false; /* true if dictionary provided */ - this.flags = 0; /* gzip header method and flags (0 if zlib) */ - this.dmax = 0; /* zlib header max distance (INFLATE_STRICT) */ - this.check = 0; /* protected copy of check value */ - this.total = 0; /* protected copy of output count */ - // TODO: may be {} - this.head = null; /* where to save gzip header information */ - - /* sliding window */ - this.wbits = 0; /* log base 2 of requested window size */ - this.wsize = 0; /* window size or zero if not using window */ - this.whave = 0; /* valid bytes in the window */ - this.wnext = 0; /* window write index */ - this.window = null; /* allocated sliding window, if needed */ - - /* bit accumulator */ - this.hold = 0; /* input bit accumulator */ - this.bits = 0; /* number of bits in "in" */ - - /* for string and stored block copying */ - this.length = 0; /* literal or length of data to copy */ - this.offset = 0; /* distance back to copy string from */ - - /* for table and code decoding */ - this.extra = 0; /* extra bits needed */ - - /* fixed and dynamic code tables */ - this.lencode = null; /* starting table for length/literal codes */ - this.distcode = null; /* starting table for distance codes */ - this.lenbits = 0; /* index bits for lencode */ - this.distbits = 0; /* index bits for distcode */ - - /* dynamic table building */ - this.ncode = 0; /* number of code length code lengths */ - this.nlen = 0; /* number of length code lengths */ - this.ndist = 0; /* number of distance code lengths */ - this.have = 0; /* number of code lengths in lens[] */ - this.next = null; /* next available space in codes[] */ - - this.lens = new utils.Buf16(320); /* temporary storage for code lengths */ - this.work = new utils.Buf16(288); /* work area for code table building */ - - /* - because we don't have pointers in js, we use lencode and distcode directly - as buffers so we don't need codes - */ - //this.codes = new utils.Buf32(ENOUGH); /* space for code tables */ - this.lendyn = null; /* dynamic table for length/literal codes (JS specific) */ - this.distdyn = null; /* dynamic table for distance codes (JS specific) */ - this.sane = 0; /* if false, allow invalid distance too far */ - this.back = 0; /* bits back of last unprocessed length/lit */ - this.was = 0; /* initial length of match */ -} - -function inflateResetKeep(strm) { - var state; - - if (!strm || !strm.state) { return Z_STREAM_ERROR; } - state = strm.state; - strm.total_in = strm.total_out = state.total = 0; - strm.msg = ''; /*Z_NULL*/ - if (state.wrap) { /* to support ill-conceived Java test suite */ - strm.adler = state.wrap & 1; - } - state.mode = HEAD; - state.last = 0; - state.havedict = 0; - state.dmax = 32768; - state.head = null/*Z_NULL*/; - state.hold = 0; - state.bits = 0; - //state.lencode = state.distcode = state.next = state.codes; - state.lencode = state.lendyn = new utils.Buf32(ENOUGH_LENS); - state.distcode = state.distdyn = new utils.Buf32(ENOUGH_DISTS); - - state.sane = 1; - state.back = -1; - //Tracev((stderr, "inflate: reset\n")); - return Z_OK; -} - -function inflateReset(strm) { - var state; - - if (!strm || !strm.state) { return Z_STREAM_ERROR; } - state = strm.state; - state.wsize = 0; - state.whave = 0; - state.wnext = 0; - return inflateResetKeep(strm); - -} - -function inflateReset2(strm, windowBits) { - var wrap; - var state; - - /* get the state */ - if (!strm || !strm.state) { return Z_STREAM_ERROR; } - state = strm.state; - - /* extract wrap request from windowBits parameter */ - if (windowBits < 0) { - wrap = 0; - windowBits = -windowBits; - } - else { - wrap = (windowBits >> 4) + 1; - if (windowBits < 48) { - windowBits &= 15; - } - } - - /* set number of window bits, free window if different */ - if (windowBits && (windowBits < 8 || windowBits > 15)) { - return Z_STREAM_ERROR; - } - if (state.window !== null && state.wbits !== windowBits) { - state.window = null; - } - - /* update state and reset the rest of it */ - state.wrap = wrap; - state.wbits = windowBits; - return inflateReset(strm); -} - -function inflateInit2(strm, windowBits) { - var ret; - var state; - - if (!strm) { return Z_STREAM_ERROR; } - //strm.msg = Z_NULL; /* in case we return an error */ - - state = new InflateState(); - - //if (state === Z_NULL) return Z_MEM_ERROR; - //Tracev((stderr, "inflate: allocated\n")); - strm.state = state; - state.window = null/*Z_NULL*/; - ret = inflateReset2(strm, windowBits); - if (ret !== Z_OK) { - strm.state = null/*Z_NULL*/; - } - return ret; -} - -function inflateInit(strm) { - return inflateInit2(strm, DEF_WBITS); -} - - -/* - Return state with length and distance decoding tables and index sizes set to - fixed code decoding. Normally this returns fixed tables from inffixed.h. - If BUILDFIXED is defined, then instead this routine builds the tables the - first time it's called, and returns those tables the first time and - thereafter. This reduces the size of the code by about 2K bytes, in - exchange for a little execution time. However, BUILDFIXED should not be - used for threaded applications, since the rewriting of the tables and virgin - may not be thread-safe. - */ -var virgin = true; - -var lenfix, distfix; // We have no pointers in JS, so keep tables separate - -function fixedtables(state) { - /* build fixed huffman tables if first call (may not be thread safe) */ - if (virgin) { - var sym; - - lenfix = new utils.Buf32(512); - distfix = new utils.Buf32(32); - - /* literal/length table */ - sym = 0; - while (sym < 144) { state.lens[sym++] = 8; } - while (sym < 256) { state.lens[sym++] = 9; } - while (sym < 280) { state.lens[sym++] = 7; } - while (sym < 288) { state.lens[sym++] = 8; } - - inflate_table(LENS, state.lens, 0, 288, lenfix, 0, state.work, { bits: 9 }); - - /* distance table */ - sym = 0; - while (sym < 32) { state.lens[sym++] = 5; } - - inflate_table(DISTS, state.lens, 0, 32, distfix, 0, state.work, { bits: 5 }); - - /* do this just once */ - virgin = false; - } - - state.lencode = lenfix; - state.lenbits = 9; - state.distcode = distfix; - state.distbits = 5; -} - - -/* - Update the window with the last wsize (normally 32K) bytes written before - returning. If window does not exist yet, create it. This is only called - when a window is already in use, or when output has been written during this - inflate call, but the end of the deflate stream has not been reached yet. - It is also called to create a window for dictionary data when a dictionary - is loaded. - - Providing output buffers larger than 32K to inflate() should provide a speed - advantage, since only the last 32K of output is copied to the sliding window - upon return from inflate(), and since all distances after the first 32K of - output will fall in the output data, making match copies simpler and faster. - The advantage may be dependent on the size of the processor's data caches. - */ -function updatewindow(strm, src, end, copy) { - var dist; - var state = strm.state; - - /* if it hasn't been done already, allocate space for the window */ - if (state.window === null) { - state.wsize = 1 << state.wbits; - state.wnext = 0; - state.whave = 0; - - state.window = new utils.Buf8(state.wsize); - } - - /* copy state->wsize or less output bytes into the circular window */ - if (copy >= state.wsize) { - utils.arraySet(state.window, src, end - state.wsize, state.wsize, 0); - state.wnext = 0; - state.whave = state.wsize; - } - else { - dist = state.wsize - state.wnext; - if (dist > copy) { - dist = copy; - } - //zmemcpy(state->window + state->wnext, end - copy, dist); - utils.arraySet(state.window, src, end - copy, dist, state.wnext); - copy -= dist; - if (copy) { - //zmemcpy(state->window, end - copy, copy); - utils.arraySet(state.window, src, end - copy, copy, 0); - state.wnext = copy; - state.whave = state.wsize; - } - else { - state.wnext += dist; - if (state.wnext === state.wsize) { state.wnext = 0; } - if (state.whave < state.wsize) { state.whave += dist; } - } - } - return 0; -} - -function inflate(strm, flush) { - var state; - var input, output; // input/output buffers - var next; /* next input INDEX */ - var put; /* next output INDEX */ - var have, left; /* available input and output */ - var hold; /* bit buffer */ - var bits; /* bits in bit buffer */ - var _in, _out; /* save starting available input and output */ - var copy; /* number of stored or match bytes to copy */ - var from; /* where to copy match bytes from */ - var from_source; - var here = 0; /* current decoding table entry */ - var here_bits, here_op, here_val; // paked "here" denormalized (JS specific) - //var last; /* parent table entry */ - var last_bits, last_op, last_val; // paked "last" denormalized (JS specific) - var len; /* length to copy for repeats, bits to drop */ - var ret; /* return code */ - var hbuf = new utils.Buf8(4); /* buffer for gzip header crc calculation */ - var opts; - - var n; // temporary var for NEED_BITS - - var order = /* permutation of code lengths */ - [ 16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15 ]; - - - if (!strm || !strm.state || !strm.output || - (!strm.input && strm.avail_in !== 0)) { - return Z_STREAM_ERROR; - } - - state = strm.state; - if (state.mode === TYPE) { state.mode = TYPEDO; } /* skip check */ - - - //--- LOAD() --- - put = strm.next_out; - output = strm.output; - left = strm.avail_out; - next = strm.next_in; - input = strm.input; - have = strm.avail_in; - hold = state.hold; - bits = state.bits; - //--- - - _in = have; - _out = left; - ret = Z_OK; - - inf_leave: // goto emulation - for (;;) { - switch (state.mode) { - case HEAD: - if (state.wrap === 0) { - state.mode = TYPEDO; - break; - } - //=== NEEDBITS(16); - while (bits < 16) { - if (have === 0) { break inf_leave; } - have--; - hold += input[next++] << bits; - bits += 8; - } - //===// - if ((state.wrap & 2) && hold === 0x8b1f) { /* gzip header */ - state.check = 0/*crc32(0L, Z_NULL, 0)*/; - //=== CRC2(state.check, hold); - hbuf[0] = hold & 0xff; - hbuf[1] = (hold >>> 8) & 0xff; - state.check = crc32(state.check, hbuf, 2, 0); - //===// - - //=== INITBITS(); - hold = 0; - bits = 0; - //===// - state.mode = FLAGS; - break; - } - state.flags = 0; /* expect zlib header */ - if (state.head) { - state.head.done = false; - } - if (!(state.wrap & 1) || /* check if zlib header allowed */ - (((hold & 0xff)/*BITS(8)*/ << 8) + (hold >> 8)) % 31) { - strm.msg = 'incorrect header check'; - state.mode = BAD; - break; - } - if ((hold & 0x0f)/*BITS(4)*/ !== Z_DEFLATED) { - strm.msg = 'unknown compression method'; - state.mode = BAD; - break; - } - //--- DROPBITS(4) ---// - hold >>>= 4; - bits -= 4; - //---// - len = (hold & 0x0f)/*BITS(4)*/ + 8; - if (state.wbits === 0) { - state.wbits = len; - } - else if (len > state.wbits) { - strm.msg = 'invalid window size'; - state.mode = BAD; - break; - } - state.dmax = 1 << len; - //Tracev((stderr, "inflate: zlib header ok\n")); - strm.adler = state.check = 1/*adler32(0L, Z_NULL, 0)*/; - state.mode = hold & 0x200 ? DICTID : TYPE; - //=== INITBITS(); - hold = 0; - bits = 0; - //===// - break; - case FLAGS: - //=== NEEDBITS(16); */ - while (bits < 16) { - if (have === 0) { break inf_leave; } - have--; - hold += input[next++] << bits; - bits += 8; - } - //===// - state.flags = hold; - if ((state.flags & 0xff) !== Z_DEFLATED) { - strm.msg = 'unknown compression method'; - state.mode = BAD; - break; - } - if (state.flags & 0xe000) { - strm.msg = 'unknown header flags set'; - state.mode = BAD; - break; - } - if (state.head) { - state.head.text = ((hold >> 8) & 1); - } - if (state.flags & 0x0200) { - //=== CRC2(state.check, hold); - hbuf[0] = hold & 0xff; - hbuf[1] = (hold >>> 8) & 0xff; - state.check = crc32(state.check, hbuf, 2, 0); - //===// - } - //=== INITBITS(); - hold = 0; - bits = 0; - //===// - state.mode = TIME; - /* falls through */ - case TIME: - //=== NEEDBITS(32); */ - while (bits < 32) { - if (have === 0) { break inf_leave; } - have--; - hold += input[next++] << bits; - bits += 8; - } - //===// - if (state.head) { - state.head.time = hold; - } - if (state.flags & 0x0200) { - //=== CRC4(state.check, hold) - hbuf[0] = hold & 0xff; - hbuf[1] = (hold >>> 8) & 0xff; - hbuf[2] = (hold >>> 16) & 0xff; - hbuf[3] = (hold >>> 24) & 0xff; - state.check = crc32(state.check, hbuf, 4, 0); - //=== - } - //=== INITBITS(); - hold = 0; - bits = 0; - //===// - state.mode = OS; - /* falls through */ - case OS: - //=== NEEDBITS(16); */ - while (bits < 16) { - if (have === 0) { break inf_leave; } - have--; - hold += input[next++] << bits; - bits += 8; - } - //===// - if (state.head) { - state.head.xflags = (hold & 0xff); - state.head.os = (hold >> 8); - } - if (state.flags & 0x0200) { - //=== CRC2(state.check, hold); - hbuf[0] = hold & 0xff; - hbuf[1] = (hold >>> 8) & 0xff; - state.check = crc32(state.check, hbuf, 2, 0); - //===// - } - //=== INITBITS(); - hold = 0; - bits = 0; - //===// - state.mode = EXLEN; - /* falls through */ - case EXLEN: - if (state.flags & 0x0400) { - //=== NEEDBITS(16); */ - while (bits < 16) { - if (have === 0) { break inf_leave; } - have--; - hold += input[next++] << bits; - bits += 8; - } - //===// - state.length = hold; - if (state.head) { - state.head.extra_len = hold; - } - if (state.flags & 0x0200) { - //=== CRC2(state.check, hold); - hbuf[0] = hold & 0xff; - hbuf[1] = (hold >>> 8) & 0xff; - state.check = crc32(state.check, hbuf, 2, 0); - //===// - } - //=== INITBITS(); - hold = 0; - bits = 0; - //===// - } - else if (state.head) { - state.head.extra = null/*Z_NULL*/; - } - state.mode = EXTRA; - /* falls through */ - case EXTRA: - if (state.flags & 0x0400) { - copy = state.length; - if (copy > have) { copy = have; } - if (copy) { - if (state.head) { - len = state.head.extra_len - state.length; - if (!state.head.extra) { - // Use untyped array for more conveniend processing later - state.head.extra = new Array(state.head.extra_len); - } - utils.arraySet( - state.head.extra, - input, - next, - // extra field is limited to 65536 bytes - // - no need for additional size check - copy, - /*len + copy > state.head.extra_max - len ? state.head.extra_max : copy,*/ - len - ); - //zmemcpy(state.head.extra + len, next, - // len + copy > state.head.extra_max ? - // state.head.extra_max - len : copy); - } - if (state.flags & 0x0200) { - state.check = crc32(state.check, input, copy, next); - } - have -= copy; - next += copy; - state.length -= copy; - } - if (state.length) { break inf_leave; } - } - state.length = 0; - state.mode = NAME; - /* falls through */ - case NAME: - if (state.flags & 0x0800) { - if (have === 0) { break inf_leave; } - copy = 0; - do { - // TODO: 2 or 1 bytes? - len = input[next + copy++]; - /* use constant limit because in js we should not preallocate memory */ - if (state.head && len && - (state.length < 65536 /*state.head.name_max*/)) { - state.head.name += String.fromCharCode(len); - } - } while (len && copy < have); - - if (state.flags & 0x0200) { - state.check = crc32(state.check, input, copy, next); - } - have -= copy; - next += copy; - if (len) { break inf_leave; } - } - else if (state.head) { - state.head.name = null; - } - state.length = 0; - state.mode = COMMENT; - /* falls through */ - case COMMENT: - if (state.flags & 0x1000) { - if (have === 0) { break inf_leave; } - copy = 0; - do { - len = input[next + copy++]; - /* use constant limit because in js we should not preallocate memory */ - if (state.head && len && - (state.length < 65536 /*state.head.comm_max*/)) { - state.head.comment += String.fromCharCode(len); - } - } while (len && copy < have); - if (state.flags & 0x0200) { - state.check = crc32(state.check, input, copy, next); - } - have -= copy; - next += copy; - if (len) { break inf_leave; } - } - else if (state.head) { - state.head.comment = null; - } - state.mode = HCRC; - /* falls through */ - case HCRC: - if (state.flags & 0x0200) { - //=== NEEDBITS(16); */ - while (bits < 16) { - if (have === 0) { break inf_leave; } - have--; - hold += input[next++] << bits; - bits += 8; - } - //===// - if (hold !== (state.check & 0xffff)) { - strm.msg = 'header crc mismatch'; - state.mode = BAD; - break; - } - //=== INITBITS(); - hold = 0; - bits = 0; - //===// - } - if (state.head) { - state.head.hcrc = ((state.flags >> 9) & 1); - state.head.done = true; - } - strm.adler = state.check = 0; - state.mode = TYPE; - break; - case DICTID: - //=== NEEDBITS(32); */ - while (bits < 32) { - if (have === 0) { break inf_leave; } - have--; - hold += input[next++] << bits; - bits += 8; - } - //===// - strm.adler = state.check = zswap32(hold); - //=== INITBITS(); - hold = 0; - bits = 0; - //===// - state.mode = DICT; - /* falls through */ - case DICT: - if (state.havedict === 0) { - //--- RESTORE() --- - strm.next_out = put; - strm.avail_out = left; - strm.next_in = next; - strm.avail_in = have; - state.hold = hold; - state.bits = bits; - //--- - return Z_NEED_DICT; - } - strm.adler = state.check = 1/*adler32(0L, Z_NULL, 0)*/; - state.mode = TYPE; - /* falls through */ - case TYPE: - if (flush === Z_BLOCK || flush === Z_TREES) { break inf_leave; } - /* falls through */ - case TYPEDO: - if (state.last) { - //--- BYTEBITS() ---// - hold >>>= bits & 7; - bits -= bits & 7; - //---// - state.mode = CHECK; - break; - } - //=== NEEDBITS(3); */ - while (bits < 3) { - if (have === 0) { break inf_leave; } - have--; - hold += input[next++] << bits; - bits += 8; - } - //===// - state.last = (hold & 0x01)/*BITS(1)*/; - //--- DROPBITS(1) ---// - hold >>>= 1; - bits -= 1; - //---// - - switch ((hold & 0x03)/*BITS(2)*/) { - case 0: /* stored block */ - //Tracev((stderr, "inflate: stored block%s\n", - // state.last ? " (last)" : "")); - state.mode = STORED; - break; - case 1: /* fixed block */ - fixedtables(state); - //Tracev((stderr, "inflate: fixed codes block%s\n", - // state.last ? " (last)" : "")); - state.mode = LEN_; /* decode codes */ - if (flush === Z_TREES) { - //--- DROPBITS(2) ---// - hold >>>= 2; - bits -= 2; - //---// - break inf_leave; - } - break; - case 2: /* dynamic block */ - //Tracev((stderr, "inflate: dynamic codes block%s\n", - // state.last ? " (last)" : "")); - state.mode = TABLE; - break; - case 3: - strm.msg = 'invalid block type'; - state.mode = BAD; - } - //--- DROPBITS(2) ---// - hold >>>= 2; - bits -= 2; - //---// - break; - case STORED: - //--- BYTEBITS() ---// /* go to byte boundary */ - hold >>>= bits & 7; - bits -= bits & 7; - //---// - //=== NEEDBITS(32); */ - while (bits < 32) { - if (have === 0) { break inf_leave; } - have--; - hold += input[next++] << bits; - bits += 8; - } - //===// - if ((hold & 0xffff) !== ((hold >>> 16) ^ 0xffff)) { - strm.msg = 'invalid stored block lengths'; - state.mode = BAD; - break; - } - state.length = hold & 0xffff; - //Tracev((stderr, "inflate: stored length %u\n", - // state.length)); - //=== INITBITS(); - hold = 0; - bits = 0; - //===// - state.mode = COPY_; - if (flush === Z_TREES) { break inf_leave; } - /* falls through */ - case COPY_: - state.mode = COPY; - /* falls through */ - case COPY: - copy = state.length; - if (copy) { - if (copy > have) { copy = have; } - if (copy > left) { copy = left; } - if (copy === 0) { break inf_leave; } - //--- zmemcpy(put, next, copy); --- - utils.arraySet(output, input, next, copy, put); - //---// - have -= copy; - next += copy; - left -= copy; - put += copy; - state.length -= copy; - break; - } - //Tracev((stderr, "inflate: stored end\n")); - state.mode = TYPE; - break; - case TABLE: - //=== NEEDBITS(14); */ - while (bits < 14) { - if (have === 0) { break inf_leave; } - have--; - hold += input[next++] << bits; - bits += 8; - } - //===// - state.nlen = (hold & 0x1f)/*BITS(5)*/ + 257; - //--- DROPBITS(5) ---// - hold >>>= 5; - bits -= 5; - //---// - state.ndist = (hold & 0x1f)/*BITS(5)*/ + 1; - //--- DROPBITS(5) ---// - hold >>>= 5; - bits -= 5; - //---// - state.ncode = (hold & 0x0f)/*BITS(4)*/ + 4; - //--- DROPBITS(4) ---// - hold >>>= 4; - bits -= 4; - //---// -//#ifndef PKZIP_BUG_WORKAROUND - if (state.nlen > 286 || state.ndist > 30) { - strm.msg = 'too many length or distance symbols'; - state.mode = BAD; - break; - } -//#endif - //Tracev((stderr, "inflate: table sizes ok\n")); - state.have = 0; - state.mode = LENLENS; - /* falls through */ - case LENLENS: - while (state.have < state.ncode) { - //=== NEEDBITS(3); - while (bits < 3) { - if (have === 0) { break inf_leave; } - have--; - hold += input[next++] << bits; - bits += 8; - } - //===// - state.lens[order[state.have++]] = (hold & 0x07);//BITS(3); - //--- DROPBITS(3) ---// - hold >>>= 3; - bits -= 3; - //---// - } - while (state.have < 19) { - state.lens[order[state.have++]] = 0; - } - // We have separate tables & no pointers. 2 commented lines below not needed. - //state.next = state.codes; - //state.lencode = state.next; - // Switch to use dynamic table - state.lencode = state.lendyn; - state.lenbits = 7; - - opts = { bits: state.lenbits }; - ret = inflate_table(CODES, state.lens, 0, 19, state.lencode, 0, state.work, opts); - state.lenbits = opts.bits; - - if (ret) { - strm.msg = 'invalid code lengths set'; - state.mode = BAD; - break; - } - //Tracev((stderr, "inflate: code lengths ok\n")); - state.have = 0; - state.mode = CODELENS; - /* falls through */ - case CODELENS: - while (state.have < state.nlen + state.ndist) { - for (;;) { - here = state.lencode[hold & ((1 << state.lenbits) - 1)];/*BITS(state.lenbits)*/ - here_bits = here >>> 24; - here_op = (here >>> 16) & 0xff; - here_val = here & 0xffff; - - if ((here_bits) <= bits) { break; } - //--- PULLBYTE() ---// - if (have === 0) { break inf_leave; } - have--; - hold += input[next++] << bits; - bits += 8; - //---// - } - if (here_val < 16) { - //--- DROPBITS(here.bits) ---// - hold >>>= here_bits; - bits -= here_bits; - //---// - state.lens[state.have++] = here_val; - } - else { - if (here_val === 16) { - //=== NEEDBITS(here.bits + 2); - n = here_bits + 2; - while (bits < n) { - if (have === 0) { break inf_leave; } - have--; - hold += input[next++] << bits; - bits += 8; - } - //===// - //--- DROPBITS(here.bits) ---// - hold >>>= here_bits; - bits -= here_bits; - //---// - if (state.have === 0) { - strm.msg = 'invalid bit length repeat'; - state.mode = BAD; - break; - } - len = state.lens[state.have - 1]; - copy = 3 + (hold & 0x03);//BITS(2); - //--- DROPBITS(2) ---// - hold >>>= 2; - bits -= 2; - //---// - } - else if (here_val === 17) { - //=== NEEDBITS(here.bits + 3); - n = here_bits + 3; - while (bits < n) { - if (have === 0) { break inf_leave; } - have--; - hold += input[next++] << bits; - bits += 8; - } - //===// - //--- DROPBITS(here.bits) ---// - hold >>>= here_bits; - bits -= here_bits; - //---// - len = 0; - copy = 3 + (hold & 0x07);//BITS(3); - //--- DROPBITS(3) ---// - hold >>>= 3; - bits -= 3; - //---// - } - else { - //=== NEEDBITS(here.bits + 7); - n = here_bits + 7; - while (bits < n) { - if (have === 0) { break inf_leave; } - have--; - hold += input[next++] << bits; - bits += 8; - } - //===// - //--- DROPBITS(here.bits) ---// - hold >>>= here_bits; - bits -= here_bits; - //---// - len = 0; - copy = 11 + (hold & 0x7f);//BITS(7); - //--- DROPBITS(7) ---// - hold >>>= 7; - bits -= 7; - //---// - } - if (state.have + copy > state.nlen + state.ndist) { - strm.msg = 'invalid bit length repeat'; - state.mode = BAD; - break; - } - while (copy--) { - state.lens[state.have++] = len; - } - } - } - - /* handle error breaks in while */ - if (state.mode === BAD) { break; } - - /* check for end-of-block code (better have one) */ - if (state.lens[256] === 0) { - strm.msg = 'invalid code -- missing end-of-block'; - state.mode = BAD; - break; - } - - /* build code tables -- note: do not change the lenbits or distbits - values here (9 and 6) without reading the comments in inftrees.h - concerning the ENOUGH constants, which depend on those values */ - state.lenbits = 9; - - opts = { bits: state.lenbits }; - ret = inflate_table(LENS, state.lens, 0, state.nlen, state.lencode, 0, state.work, opts); - // We have separate tables & no pointers. 2 commented lines below not needed. - // state.next_index = opts.table_index; - state.lenbits = opts.bits; - // state.lencode = state.next; - - if (ret) { - strm.msg = 'invalid literal/lengths set'; - state.mode = BAD; - break; - } - - state.distbits = 6; - //state.distcode.copy(state.codes); - // Switch to use dynamic table - state.distcode = state.distdyn; - opts = { bits: state.distbits }; - ret = inflate_table(DISTS, state.lens, state.nlen, state.ndist, state.distcode, 0, state.work, opts); - // We have separate tables & no pointers. 2 commented lines below not needed. - // state.next_index = opts.table_index; - state.distbits = opts.bits; - // state.distcode = state.next; - - if (ret) { - strm.msg = 'invalid distances set'; - state.mode = BAD; - break; - } - //Tracev((stderr, 'inflate: codes ok\n')); - state.mode = LEN_; - if (flush === Z_TREES) { break inf_leave; } - /* falls through */ - case LEN_: - state.mode = LEN; - /* falls through */ - case LEN: - if (have >= 6 && left >= 258) { - //--- RESTORE() --- - strm.next_out = put; - strm.avail_out = left; - strm.next_in = next; - strm.avail_in = have; - state.hold = hold; - state.bits = bits; - //--- - inflate_fast(strm, _out); - //--- LOAD() --- - put = strm.next_out; - output = strm.output; - left = strm.avail_out; - next = strm.next_in; - input = strm.input; - have = strm.avail_in; - hold = state.hold; - bits = state.bits; - //--- - - if (state.mode === TYPE) { - state.back = -1; - } - break; - } - state.back = 0; - for (;;) { - here = state.lencode[hold & ((1 << state.lenbits) - 1)]; /*BITS(state.lenbits)*/ - here_bits = here >>> 24; - here_op = (here >>> 16) & 0xff; - here_val = here & 0xffff; - - if (here_bits <= bits) { break; } - //--- PULLBYTE() ---// - if (have === 0) { break inf_leave; } - have--; - hold += input[next++] << bits; - bits += 8; - //---// - } - if (here_op && (here_op & 0xf0) === 0) { - last_bits = here_bits; - last_op = here_op; - last_val = here_val; - for (;;) { - here = state.lencode[last_val + - ((hold & ((1 << (last_bits + last_op)) - 1))/*BITS(last.bits + last.op)*/ >> last_bits)]; - here_bits = here >>> 24; - here_op = (here >>> 16) & 0xff; - here_val = here & 0xffff; - - if ((last_bits + here_bits) <= bits) { break; } - //--- PULLBYTE() ---// - if (have === 0) { break inf_leave; } - have--; - hold += input[next++] << bits; - bits += 8; - //---// - } - //--- DROPBITS(last.bits) ---// - hold >>>= last_bits; - bits -= last_bits; - //---// - state.back += last_bits; - } - //--- DROPBITS(here.bits) ---// - hold >>>= here_bits; - bits -= here_bits; - //---// - state.back += here_bits; - state.length = here_val; - if (here_op === 0) { - //Tracevv((stderr, here.val >= 0x20 && here.val < 0x7f ? - // "inflate: literal '%c'\n" : - // "inflate: literal 0x%02x\n", here.val)); - state.mode = LIT; - break; - } - if (here_op & 32) { - //Tracevv((stderr, "inflate: end of block\n")); - state.back = -1; - state.mode = TYPE; - break; - } - if (here_op & 64) { - strm.msg = 'invalid literal/length code'; - state.mode = BAD; - break; - } - state.extra = here_op & 15; - state.mode = LENEXT; - /* falls through */ - case LENEXT: - if (state.extra) { - //=== NEEDBITS(state.extra); - n = state.extra; - while (bits < n) { - if (have === 0) { break inf_leave; } - have--; - hold += input[next++] << bits; - bits += 8; - } - //===// - state.length += hold & ((1 << state.extra) - 1)/*BITS(state.extra)*/; - //--- DROPBITS(state.extra) ---// - hold >>>= state.extra; - bits -= state.extra; - //---// - state.back += state.extra; - } - //Tracevv((stderr, "inflate: length %u\n", state.length)); - state.was = state.length; - state.mode = DIST; - /* falls through */ - case DIST: - for (;;) { - here = state.distcode[hold & ((1 << state.distbits) - 1)];/*BITS(state.distbits)*/ - here_bits = here >>> 24; - here_op = (here >>> 16) & 0xff; - here_val = here & 0xffff; - - if ((here_bits) <= bits) { break; } - //--- PULLBYTE() ---// - if (have === 0) { break inf_leave; } - have--; - hold += input[next++] << bits; - bits += 8; - //---// - } - if ((here_op & 0xf0) === 0) { - last_bits = here_bits; - last_op = here_op; - last_val = here_val; - for (;;) { - here = state.distcode[last_val + - ((hold & ((1 << (last_bits + last_op)) - 1))/*BITS(last.bits + last.op)*/ >> last_bits)]; - here_bits = here >>> 24; - here_op = (here >>> 16) & 0xff; - here_val = here & 0xffff; - - if ((last_bits + here_bits) <= bits) { break; } - //--- PULLBYTE() ---// - if (have === 0) { break inf_leave; } - have--; - hold += input[next++] << bits; - bits += 8; - //---// - } - //--- DROPBITS(last.bits) ---// - hold >>>= last_bits; - bits -= last_bits; - //---// - state.back += last_bits; - } - //--- DROPBITS(here.bits) ---// - hold >>>= here_bits; - bits -= here_bits; - //---// - state.back += here_bits; - if (here_op & 64) { - strm.msg = 'invalid distance code'; - state.mode = BAD; - break; - } - state.offset = here_val; - state.extra = (here_op) & 15; - state.mode = DISTEXT; - /* falls through */ - case DISTEXT: - if (state.extra) { - //=== NEEDBITS(state.extra); - n = state.extra; - while (bits < n) { - if (have === 0) { break inf_leave; } - have--; - hold += input[next++] << bits; - bits += 8; - } - //===// - state.offset += hold & ((1 << state.extra) - 1)/*BITS(state.extra)*/; - //--- DROPBITS(state.extra) ---// - hold >>>= state.extra; - bits -= state.extra; - //---// - state.back += state.extra; - } -//#ifdef INFLATE_STRICT - if (state.offset > state.dmax) { - strm.msg = 'invalid distance too far back'; - state.mode = BAD; - break; - } -//#endif - //Tracevv((stderr, "inflate: distance %u\n", state.offset)); - state.mode = MATCH; - /* falls through */ - case MATCH: - if (left === 0) { break inf_leave; } - copy = _out - left; - if (state.offset > copy) { /* copy from window */ - copy = state.offset - copy; - if (copy > state.whave) { - if (state.sane) { - strm.msg = 'invalid distance too far back'; - state.mode = BAD; - break; - } -// (!) This block is disabled in zlib defailts, -// don't enable it for binary compatibility -//#ifdef INFLATE_ALLOW_INVALID_DISTANCE_TOOFAR_ARRR -// Trace((stderr, "inflate.c too far\n")); -// copy -= state.whave; -// if (copy > state.length) { copy = state.length; } -// if (copy > left) { copy = left; } -// left -= copy; -// state.length -= copy; -// do { -// output[put++] = 0; -// } while (--copy); -// if (state.length === 0) { state.mode = LEN; } -// break; -//#endif - } - if (copy > state.wnext) { - copy -= state.wnext; - from = state.wsize - copy; - } - else { - from = state.wnext - copy; - } - if (copy > state.length) { copy = state.length; } - from_source = state.window; - } - else { /* copy from output */ - from_source = output; - from = put - state.offset; - copy = state.length; - } - if (copy > left) { copy = left; } - left -= copy; - state.length -= copy; - do { - output[put++] = from_source[from++]; - } while (--copy); - if (state.length === 0) { state.mode = LEN; } - break; - case LIT: - if (left === 0) { break inf_leave; } - output[put++] = state.length; - left--; - state.mode = LEN; - break; - case CHECK: - if (state.wrap) { - //=== NEEDBITS(32); - while (bits < 32) { - if (have === 0) { break inf_leave; } - have--; - // Use '|' insdead of '+' to make sure that result is signed - hold |= input[next++] << bits; - bits += 8; - } - //===// - _out -= left; - strm.total_out += _out; - state.total += _out; - if (_out) { - strm.adler = state.check = - /*UPDATE(state.check, put - _out, _out);*/ - (state.flags ? crc32(state.check, output, _out, put - _out) : adler32(state.check, output, _out, put - _out)); - - } - _out = left; - // NB: crc32 stored as signed 32-bit int, zswap32 returns signed too - if ((state.flags ? hold : zswap32(hold)) !== state.check) { - strm.msg = 'incorrect data check'; - state.mode = BAD; - break; - } - //=== INITBITS(); - hold = 0; - bits = 0; - //===// - //Tracev((stderr, "inflate: check matches trailer\n")); - } - state.mode = LENGTH; - /* falls through */ - case LENGTH: - if (state.wrap && state.flags) { - //=== NEEDBITS(32); - while (bits < 32) { - if (have === 0) { break inf_leave; } - have--; - hold += input[next++] << bits; - bits += 8; - } - //===// - if (hold !== (state.total & 0xffffffff)) { - strm.msg = 'incorrect length check'; - state.mode = BAD; - break; - } - //=== INITBITS(); - hold = 0; - bits = 0; - //===// - //Tracev((stderr, "inflate: length matches trailer\n")); - } - state.mode = DONE; - /* falls through */ - case DONE: - ret = Z_STREAM_END; - break inf_leave; - case BAD: - ret = Z_DATA_ERROR; - break inf_leave; - case MEM: - return Z_MEM_ERROR; - case SYNC: - /* falls through */ - default: - return Z_STREAM_ERROR; - } - } - - // inf_leave <- here is real place for "goto inf_leave", emulated via "break inf_leave" - - /* - Return from inflate(), updating the total counts and the check value. - If there was no progress during the inflate() call, return a buffer - error. Call updatewindow() to create and/or update the window state. - Note: a memory error from inflate() is non-recoverable. - */ - - //--- RESTORE() --- - strm.next_out = put; - strm.avail_out = left; - strm.next_in = next; - strm.avail_in = have; - state.hold = hold; - state.bits = bits; - //--- - - if (state.wsize || (_out !== strm.avail_out && state.mode < BAD && - (state.mode < CHECK || flush !== Z_FINISH))) { - if (updatewindow(strm, strm.output, strm.next_out, _out - strm.avail_out)) { - state.mode = MEM; - return Z_MEM_ERROR; - } - } - _in -= strm.avail_in; - _out -= strm.avail_out; - strm.total_in += _in; - strm.total_out += _out; - state.total += _out; - if (state.wrap && _out) { - strm.adler = state.check = /*UPDATE(state.check, strm.next_out - _out, _out);*/ - (state.flags ? crc32(state.check, output, _out, strm.next_out - _out) : adler32(state.check, output, _out, strm.next_out - _out)); - } - strm.data_type = state.bits + (state.last ? 64 : 0) + - (state.mode === TYPE ? 128 : 0) + - (state.mode === LEN_ || state.mode === COPY_ ? 256 : 0); - if (((_in === 0 && _out === 0) || flush === Z_FINISH) && ret === Z_OK) { - ret = Z_BUF_ERROR; - } - return ret; -} - -function inflateEnd(strm) { - - if (!strm || !strm.state /*|| strm->zfree == (free_func)0*/) { - return Z_STREAM_ERROR; - } - - var state = strm.state; - if (state.window) { - state.window = null; - } - strm.state = null; - return Z_OK; -} - -function inflateGetHeader(strm, head) { - var state; - - /* check state */ - if (!strm || !strm.state) { return Z_STREAM_ERROR; } - state = strm.state; - if ((state.wrap & 2) === 0) { return Z_STREAM_ERROR; } - - /* save header structure */ - state.head = head; - head.done = false; - return Z_OK; -} - -function inflateSetDictionary(strm, dictionary) { - var dictLength = dictionary.length; - - var state; - var dictid; - var ret; - - /* check state */ - if (!strm /* == Z_NULL */ || !strm.state /* == Z_NULL */) { return Z_STREAM_ERROR; } - state = strm.state; - - if (state.wrap !== 0 && state.mode !== DICT) { - return Z_STREAM_ERROR; - } - - /* check for correct dictionary identifier */ - if (state.mode === DICT) { - dictid = 1; /* adler32(0, null, 0)*/ - /* dictid = adler32(dictid, dictionary, dictLength); */ - dictid = adler32(dictid, dictionary, dictLength, 0); - if (dictid !== state.check) { - return Z_DATA_ERROR; - } - } - /* copy dictionary to window using updatewindow(), which will amend the - existing dictionary if appropriate */ - ret = updatewindow(strm, dictionary, dictLength, dictLength); - if (ret) { - state.mode = MEM; - return Z_MEM_ERROR; - } - state.havedict = 1; - // Tracev((stderr, "inflate: dictionary set\n")); - return Z_OK; -} - -exports.inflateReset = inflateReset; -exports.inflateReset2 = inflateReset2; -exports.inflateResetKeep = inflateResetKeep; -exports.inflateInit = inflateInit; -exports.inflateInit2 = inflateInit2; -exports.inflate = inflate; -exports.inflateEnd = inflateEnd; -exports.inflateGetHeader = inflateGetHeader; -exports.inflateSetDictionary = inflateSetDictionary; -exports.inflateInfo = 'pako inflate (from Nodeca project)'; - -/* Not implemented -exports.inflateCopy = inflateCopy; -exports.inflateGetDictionary = inflateGetDictionary; -exports.inflateMark = inflateMark; -exports.inflatePrime = inflatePrime; -exports.inflateSync = inflateSync; -exports.inflateSyncPoint = inflateSyncPoint; -exports.inflateUndermine = inflateUndermine; -*/ - -},{"../utils/common":3,"./adler32":5,"./crc32":7,"./inffast":10,"./inftrees":12}],12:[function(require,module,exports){ -'use strict'; - - -var utils = require('../utils/common'); - -var MAXBITS = 15; -var ENOUGH_LENS = 852; -var ENOUGH_DISTS = 592; -//var ENOUGH = (ENOUGH_LENS+ENOUGH_DISTS); - -var CODES = 0; -var LENS = 1; -var DISTS = 2; - -var lbase = [ /* Length codes 257..285 base */ - 3, 4, 5, 6, 7, 8, 9, 10, 11, 13, 15, 17, 19, 23, 27, 31, - 35, 43, 51, 59, 67, 83, 99, 115, 131, 163, 195, 227, 258, 0, 0 -]; - -var lext = [ /* Length codes 257..285 extra */ - 16, 16, 16, 16, 16, 16, 16, 16, 17, 17, 17, 17, 18, 18, 18, 18, - 19, 19, 19, 19, 20, 20, 20, 20, 21, 21, 21, 21, 16, 72, 78 -]; - -var dbase = [ /* Distance codes 0..29 base */ - 1, 2, 3, 4, 5, 7, 9, 13, 17, 25, 33, 49, 65, 97, 129, 193, - 257, 385, 513, 769, 1025, 1537, 2049, 3073, 4097, 6145, - 8193, 12289, 16385, 24577, 0, 0 -]; - -var dext = [ /* Distance codes 0..29 extra */ - 16, 16, 16, 16, 17, 17, 18, 18, 19, 19, 20, 20, 21, 21, 22, 22, - 23, 23, 24, 24, 25, 25, 26, 26, 27, 27, - 28, 28, 29, 29, 64, 64 -]; - -module.exports = function inflate_table(type, lens, lens_index, codes, table, table_index, work, opts) -{ - var bits = opts.bits; - //here = opts.here; /* table entry for duplication */ - - var len = 0; /* a code's length in bits */ - var sym = 0; /* index of code symbols */ - var min = 0, max = 0; /* minimum and maximum code lengths */ - var root = 0; /* number of index bits for root table */ - var curr = 0; /* number of index bits for current table */ - var drop = 0; /* code bits to drop for sub-table */ - var left = 0; /* number of prefix codes available */ - var used = 0; /* code entries in table used */ - var huff = 0; /* Huffman code */ - var incr; /* for incrementing code, index */ - var fill; /* index for replicating entries */ - var low; /* low bits for current root entry */ - var mask; /* mask for low root bits */ - var next; /* next available space in table */ - var base = null; /* base value table to use */ - var base_index = 0; -// var shoextra; /* extra bits table to use */ - var end; /* use base and extra for symbol > end */ - var count = new utils.Buf16(MAXBITS + 1); //[MAXBITS+1]; /* number of codes of each length */ - var offs = new utils.Buf16(MAXBITS + 1); //[MAXBITS+1]; /* offsets in table for each length */ - var extra = null; - var extra_index = 0; - - var here_bits, here_op, here_val; - - /* - Process a set of code lengths to create a canonical Huffman code. The - code lengths are lens[0..codes-1]. Each length corresponds to the - symbols 0..codes-1. The Huffman code is generated by first sorting the - symbols by length from short to long, and retaining the symbol order - for codes with equal lengths. Then the code starts with all zero bits - for the first code of the shortest length, and the codes are integer - increments for the same length, and zeros are appended as the length - increases. For the deflate format, these bits are stored backwards - from their more natural integer increment ordering, and so when the - decoding tables are built in the large loop below, the integer codes - are incremented backwards. - - This routine assumes, but does not check, that all of the entries in - lens[] are in the range 0..MAXBITS. The caller must assure this. - 1..MAXBITS is interpreted as that code length. zero means that that - symbol does not occur in this code. - - The codes are sorted by computing a count of codes for each length, - creating from that a table of starting indices for each length in the - sorted table, and then entering the symbols in order in the sorted - table. The sorted table is work[], with that space being provided by - the caller. - - The length counts are used for other purposes as well, i.e. finding - the minimum and maximum length codes, determining if there are any - codes at all, checking for a valid set of lengths, and looking ahead - at length counts to determine sub-table sizes when building the - decoding tables. - */ - - /* accumulate lengths for codes (assumes lens[] all in 0..MAXBITS) */ - for (len = 0; len <= MAXBITS; len++) { - count[len] = 0; - } - for (sym = 0; sym < codes; sym++) { - count[lens[lens_index + sym]]++; - } - - /* bound code lengths, force root to be within code lengths */ - root = bits; - for (max = MAXBITS; max >= 1; max--) { - if (count[max] !== 0) { break; } - } - if (root > max) { - root = max; - } - if (max === 0) { /* no symbols to code at all */ - //table.op[opts.table_index] = 64; //here.op = (var char)64; /* invalid code marker */ - //table.bits[opts.table_index] = 1; //here.bits = (var char)1; - //table.val[opts.table_index++] = 0; //here.val = (var short)0; - table[table_index++] = (1 << 24) | (64 << 16) | 0; - - - //table.op[opts.table_index] = 64; - //table.bits[opts.table_index] = 1; - //table.val[opts.table_index++] = 0; - table[table_index++] = (1 << 24) | (64 << 16) | 0; - - opts.bits = 1; - return 0; /* no symbols, but wait for decoding to report error */ - } - for (min = 1; min < max; min++) { - if (count[min] !== 0) { break; } - } - if (root < min) { - root = min; - } - - /* check for an over-subscribed or incomplete set of lengths */ - left = 1; - for (len = 1; len <= MAXBITS; len++) { - left <<= 1; - left -= count[len]; - if (left < 0) { - return -1; - } /* over-subscribed */ - } - if (left > 0 && (type === CODES || max !== 1)) { - return -1; /* incomplete set */ - } - - /* generate offsets into symbol table for each length for sorting */ - offs[1] = 0; - for (len = 1; len < MAXBITS; len++) { - offs[len + 1] = offs[len] + count[len]; - } - - /* sort symbols by length, by symbol order within each length */ - for (sym = 0; sym < codes; sym++) { - if (lens[lens_index + sym] !== 0) { - work[offs[lens[lens_index + sym]]++] = sym; - } - } - - /* - Create and fill in decoding tables. In this loop, the table being - filled is at next and has curr index bits. The code being used is huff - with length len. That code is converted to an index by dropping drop - bits off of the bottom. For codes where len is less than drop + curr, - those top drop + curr - len bits are incremented through all values to - fill the table with replicated entries. - - root is the number of index bits for the root table. When len exceeds - root, sub-tables are created pointed to by the root entry with an index - of the low root bits of huff. This is saved in low to check for when a - new sub-table should be started. drop is zero when the root table is - being filled, and drop is root when sub-tables are being filled. - - When a new sub-table is needed, it is necessary to look ahead in the - code lengths to determine what size sub-table is needed. The length - counts are used for this, and so count[] is decremented as codes are - entered in the tables. - - used keeps track of how many table entries have been allocated from the - provided *table space. It is checked for LENS and DIST tables against - the constants ENOUGH_LENS and ENOUGH_DISTS to guard against changes in - the initial root table size constants. See the comments in inftrees.h - for more information. - - sym increments through all symbols, and the loop terminates when - all codes of length max, i.e. all codes, have been processed. This - routine permits incomplete codes, so another loop after this one fills - in the rest of the decoding tables with invalid code markers. - */ - - /* set up for code type */ - // poor man optimization - use if-else instead of switch, - // to avoid deopts in old v8 - if (type === CODES) { - base = extra = work; /* dummy value--not used */ - end = 19; - - } else if (type === LENS) { - base = lbase; - base_index -= 257; - extra = lext; - extra_index -= 257; - end = 256; - - } else { /* DISTS */ - base = dbase; - extra = dext; - end = -1; - } - - /* initialize opts for loop */ - huff = 0; /* starting code */ - sym = 0; /* starting code symbol */ - len = min; /* starting code length */ - next = table_index; /* current table to fill in */ - curr = root; /* current table index bits */ - drop = 0; /* current bits to drop from code for index */ - low = -1; /* trigger new sub-table when len > root */ - used = 1 << root; /* use root table entries */ - mask = used - 1; /* mask for comparing low */ - - /* check available table space */ - if ((type === LENS && used > ENOUGH_LENS) || - (type === DISTS && used > ENOUGH_DISTS)) { - return 1; - } - - var i = 0; - /* process all codes and make table entries */ - for (;;) { - i++; - /* create table entry */ - here_bits = len - drop; - if (work[sym] < end) { - here_op = 0; - here_val = work[sym]; - } - else if (work[sym] > end) { - here_op = extra[extra_index + work[sym]]; - here_val = base[base_index + work[sym]]; - } - else { - here_op = 32 + 64; /* end of block */ - here_val = 0; - } - - /* replicate for those indices with low len bits equal to huff */ - incr = 1 << (len - drop); - fill = 1 << curr; - min = fill; /* save offset to next table */ - do { - fill -= incr; - table[next + (huff >> drop) + fill] = (here_bits << 24) | (here_op << 16) | here_val |0; - } while (fill !== 0); - - /* backwards increment the len-bit code huff */ - incr = 1 << (len - 1); - while (huff & incr) { - incr >>= 1; - } - if (incr !== 0) { - huff &= incr - 1; - huff += incr; - } else { - huff = 0; - } - - /* go to next symbol, update count, len */ - sym++; - if (--count[len] === 0) { - if (len === max) { break; } - len = lens[lens_index + work[sym]]; - } - - /* create new sub-table if needed */ - if (len > root && (huff & mask) !== low) { - /* if first time, transition to sub-tables */ - if (drop === 0) { - drop = root; - } - - /* increment past last table */ - next += min; /* here min is 1 << curr */ - - /* determine length of next table */ - curr = len - drop; - left = 1 << curr; - while (curr + drop < max) { - left -= count[curr + drop]; - if (left <= 0) { break; } - curr++; - left <<= 1; - } - - /* check for enough space */ - used += 1 << curr; - if ((type === LENS && used > ENOUGH_LENS) || - (type === DISTS && used > ENOUGH_DISTS)) { - return 1; - } - - /* point entry in root table to sub-table */ - low = huff & mask; - /*table.op[low] = curr; - table.bits[low] = root; - table.val[low] = next - opts.table_index;*/ - table[low] = (root << 24) | (curr << 16) | (next - table_index) |0; - } - } - - /* fill in remaining table entry if code is incomplete (guaranteed to have - at most one remaining entry, since if the code is incomplete, the - maximum code length that was allowed to get this far is one bit) */ - if (huff !== 0) { - //table.op[next + huff] = 64; /* invalid code marker */ - //table.bits[next + huff] = len - drop; - //table.val[next + huff] = 0; - table[next + huff] = ((len - drop) << 24) | (64 << 16) |0; - } - - /* set return parameters */ - //opts.table_index += used; - opts.bits = root; - return 0; -}; - -},{"../utils/common":3}],13:[function(require,module,exports){ -'use strict'; - -module.exports = { - 2: 'need dictionary', /* Z_NEED_DICT 2 */ - 1: 'stream end', /* Z_STREAM_END 1 */ - 0: '', /* Z_OK 0 */ - '-1': 'file error', /* Z_ERRNO (-1) */ - '-2': 'stream error', /* Z_STREAM_ERROR (-2) */ - '-3': 'data error', /* Z_DATA_ERROR (-3) */ - '-4': 'insufficient memory', /* Z_MEM_ERROR (-4) */ - '-5': 'buffer error', /* Z_BUF_ERROR (-5) */ - '-6': 'incompatible version' /* Z_VERSION_ERROR (-6) */ -}; - -},{}],14:[function(require,module,exports){ -'use strict'; - - -var utils = require('../utils/common'); - -/* Public constants ==========================================================*/ -/* ===========================================================================*/ - - -//var Z_FILTERED = 1; -//var Z_HUFFMAN_ONLY = 2; -//var Z_RLE = 3; -var Z_FIXED = 4; -//var Z_DEFAULT_STRATEGY = 0; - -/* Possible values of the data_type field (though see inflate()) */ -var Z_BINARY = 0; -var Z_TEXT = 1; -//var Z_ASCII = 1; // = Z_TEXT -var Z_UNKNOWN = 2; - -/*============================================================================*/ - - -function zero(buf) { var len = buf.length; while (--len >= 0) { buf[len] = 0; } } - -// From zutil.h - -var STORED_BLOCK = 0; -var STATIC_TREES = 1; -var DYN_TREES = 2; -/* The three kinds of block type */ - -var MIN_MATCH = 3; -var MAX_MATCH = 258; -/* The minimum and maximum match lengths */ - -// From deflate.h -/* =========================================================================== - * Internal compression state. - */ - -var LENGTH_CODES = 29; -/* number of length codes, not counting the special END_BLOCK code */ - -var LITERALS = 256; -/* number of literal bytes 0..255 */ - -var L_CODES = LITERALS + 1 + LENGTH_CODES; -/* number of Literal or Length codes, including the END_BLOCK code */ - -var D_CODES = 30; -/* number of distance codes */ - -var BL_CODES = 19; -/* number of codes used to transfer the bit lengths */ - -var HEAP_SIZE = 2 * L_CODES + 1; -/* maximum heap size */ - -var MAX_BITS = 15; -/* All codes must not exceed MAX_BITS bits */ - -var Buf_size = 16; -/* size of bit buffer in bi_buf */ - - -/* =========================================================================== - * Constants - */ - -var MAX_BL_BITS = 7; -/* Bit length codes must not exceed MAX_BL_BITS bits */ - -var END_BLOCK = 256; -/* end of block literal code */ - -var REP_3_6 = 16; -/* repeat previous bit length 3-6 times (2 bits of repeat count) */ - -var REPZ_3_10 = 17; -/* repeat a zero length 3-10 times (3 bits of repeat count) */ - -var REPZ_11_138 = 18; -/* repeat a zero length 11-138 times (7 bits of repeat count) */ - -/* eslint-disable comma-spacing,array-bracket-spacing */ -var extra_lbits = /* extra bits for each length code */ - [0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0]; - -var extra_dbits = /* extra bits for each distance code */ - [0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13]; - -var extra_blbits = /* extra bits for each bit length code */ - [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7]; - -var bl_order = - [16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]; -/* eslint-enable comma-spacing,array-bracket-spacing */ - -/* The lengths of the bit length codes are sent in order of decreasing - * probability, to avoid transmitting the lengths for unused bit length codes. - */ - -/* =========================================================================== - * Local data. These are initialized only once. - */ - -// We pre-fill arrays with 0 to avoid uninitialized gaps - -var DIST_CODE_LEN = 512; /* see definition of array dist_code below */ - -// !!!! Use flat array insdead of structure, Freq = i*2, Len = i*2+1 -var static_ltree = new Array((L_CODES + 2) * 2); -zero(static_ltree); -/* The static literal tree. Since the bit lengths are imposed, there is no - * need for the L_CODES extra codes used during heap construction. However - * The codes 286 and 287 are needed to build a canonical tree (see _tr_init - * below). - */ - -var static_dtree = new Array(D_CODES * 2); -zero(static_dtree); -/* The static distance tree. (Actually a trivial tree since all codes use - * 5 bits.) - */ - -var _dist_code = new Array(DIST_CODE_LEN); -zero(_dist_code); -/* Distance codes. The first 256 values correspond to the distances - * 3 .. 258, the last 256 values correspond to the top 8 bits of - * the 15 bit distances. - */ - -var _length_code = new Array(MAX_MATCH - MIN_MATCH + 1); -zero(_length_code); -/* length code for each normalized match length (0 == MIN_MATCH) */ - -var base_length = new Array(LENGTH_CODES); -zero(base_length); -/* First normalized length for each code (0 = MIN_MATCH) */ - -var base_dist = new Array(D_CODES); -zero(base_dist); -/* First normalized distance for each code (0 = distance of 1) */ - - -function StaticTreeDesc(static_tree, extra_bits, extra_base, elems, max_length) { - - this.static_tree = static_tree; /* static tree or NULL */ - this.extra_bits = extra_bits; /* extra bits for each code or NULL */ - this.extra_base = extra_base; /* base index for extra_bits */ - this.elems = elems; /* max number of elements in the tree */ - this.max_length = max_length; /* max bit length for the codes */ - - // show if `static_tree` has data or dummy - needed for monomorphic objects - this.has_stree = static_tree && static_tree.length; -} - - -var static_l_desc; -var static_d_desc; -var static_bl_desc; - - -function TreeDesc(dyn_tree, stat_desc) { - this.dyn_tree = dyn_tree; /* the dynamic tree */ - this.max_code = 0; /* largest code with non zero frequency */ - this.stat_desc = stat_desc; /* the corresponding static tree */ -} - - - -function d_code(dist) { - return dist < 256 ? _dist_code[dist] : _dist_code[256 + (dist >>> 7)]; -} - - -/* =========================================================================== - * Output a short LSB first on the stream. - * IN assertion: there is enough room in pendingBuf. - */ -function put_short(s, w) { -// put_byte(s, (uch)((w) & 0xff)); -// put_byte(s, (uch)((ush)(w) >> 8)); - s.pending_buf[s.pending++] = (w) & 0xff; - s.pending_buf[s.pending++] = (w >>> 8) & 0xff; -} - - -/* =========================================================================== - * Send a value on a given number of bits. - * IN assertion: length <= 16 and value fits in length bits. - */ -function send_bits(s, value, length) { - if (s.bi_valid > (Buf_size - length)) { - s.bi_buf |= (value << s.bi_valid) & 0xffff; - put_short(s, s.bi_buf); - s.bi_buf = value >> (Buf_size - s.bi_valid); - s.bi_valid += length - Buf_size; - } else { - s.bi_buf |= (value << s.bi_valid) & 0xffff; - s.bi_valid += length; - } -} - - -function send_code(s, c, tree) { - send_bits(s, tree[c * 2]/*.Code*/, tree[c * 2 + 1]/*.Len*/); -} - - -/* =========================================================================== - * Reverse the first len bits of a code, using straightforward code (a faster - * method would use a table) - * IN assertion: 1 <= len <= 15 - */ -function bi_reverse(code, len) { - var res = 0; - do { - res |= code & 1; - code >>>= 1; - res <<= 1; - } while (--len > 0); - return res >>> 1; -} - - -/* =========================================================================== - * Flush the bit buffer, keeping at most 7 bits in it. - */ -function bi_flush(s) { - if (s.bi_valid === 16) { - put_short(s, s.bi_buf); - s.bi_buf = 0; - s.bi_valid = 0; - - } else if (s.bi_valid >= 8) { - s.pending_buf[s.pending++] = s.bi_buf & 0xff; - s.bi_buf >>= 8; - s.bi_valid -= 8; - } -} - - -/* =========================================================================== - * Compute the optimal bit lengths for a tree and update the total bit length - * for the current block. - * IN assertion: the fields freq and dad are set, heap[heap_max] and - * above are the tree nodes sorted by increasing frequency. - * OUT assertions: the field len is set to the optimal bit length, the - * array bl_count contains the frequencies for each bit length. - * The length opt_len is updated; static_len is also updated if stree is - * not null. - */ -function gen_bitlen(s, desc) -// deflate_state *s; -// tree_desc *desc; /* the tree descriptor */ -{ - var tree = desc.dyn_tree; - var max_code = desc.max_code; - var stree = desc.stat_desc.static_tree; - var has_stree = desc.stat_desc.has_stree; - var extra = desc.stat_desc.extra_bits; - var base = desc.stat_desc.extra_base; - var max_length = desc.stat_desc.max_length; - var h; /* heap index */ - var n, m; /* iterate over the tree elements */ - var bits; /* bit length */ - var xbits; /* extra bits */ - var f; /* frequency */ - var overflow = 0; /* number of elements with bit length too large */ - - for (bits = 0; bits <= MAX_BITS; bits++) { - s.bl_count[bits] = 0; - } - - /* In a first pass, compute the optimal bit lengths (which may - * overflow in the case of the bit length tree). - */ - tree[s.heap[s.heap_max] * 2 + 1]/*.Len*/ = 0; /* root of the heap */ - - for (h = s.heap_max + 1; h < HEAP_SIZE; h++) { - n = s.heap[h]; - bits = tree[tree[n * 2 + 1]/*.Dad*/ * 2 + 1]/*.Len*/ + 1; - if (bits > max_length) { - bits = max_length; - overflow++; - } - tree[n * 2 + 1]/*.Len*/ = bits; - /* We overwrite tree[n].Dad which is no longer needed */ - - if (n > max_code) { continue; } /* not a leaf node */ - - s.bl_count[bits]++; - xbits = 0; - if (n >= base) { - xbits = extra[n - base]; - } - f = tree[n * 2]/*.Freq*/; - s.opt_len += f * (bits + xbits); - if (has_stree) { - s.static_len += f * (stree[n * 2 + 1]/*.Len*/ + xbits); - } - } - if (overflow === 0) { return; } - - // Trace((stderr,"\nbit length overflow\n")); - /* This happens for example on obj2 and pic of the Calgary corpus */ - - /* Find the first bit length which could increase: */ - do { - bits = max_length - 1; - while (s.bl_count[bits] === 0) { bits--; } - s.bl_count[bits]--; /* move one leaf down the tree */ - s.bl_count[bits + 1] += 2; /* move one overflow item as its brother */ - s.bl_count[max_length]--; - /* The brother of the overflow item also moves one step up, - * but this does not affect bl_count[max_length] - */ - overflow -= 2; - } while (overflow > 0); - - /* Now recompute all bit lengths, scanning in increasing frequency. - * h is still equal to HEAP_SIZE. (It is simpler to reconstruct all - * lengths instead of fixing only the wrong ones. This idea is taken - * from 'ar' written by Haruhiko Okumura.) - */ - for (bits = max_length; bits !== 0; bits--) { - n = s.bl_count[bits]; - while (n !== 0) { - m = s.heap[--h]; - if (m > max_code) { continue; } - if (tree[m * 2 + 1]/*.Len*/ !== bits) { - // Trace((stderr,"code %d bits %d->%d\n", m, tree[m].Len, bits)); - s.opt_len += (bits - tree[m * 2 + 1]/*.Len*/) * tree[m * 2]/*.Freq*/; - tree[m * 2 + 1]/*.Len*/ = bits; - } - n--; - } - } -} - - -/* =========================================================================== - * Generate the codes for a given tree and bit counts (which need not be - * optimal). - * IN assertion: the array bl_count contains the bit length statistics for - * the given tree and the field len is set for all tree elements. - * OUT assertion: the field code is set for all tree elements of non - * zero code length. - */ -function gen_codes(tree, max_code, bl_count) -// ct_data *tree; /* the tree to decorate */ -// int max_code; /* largest code with non zero frequency */ -// ushf *bl_count; /* number of codes at each bit length */ -{ - var next_code = new Array(MAX_BITS + 1); /* next code value for each bit length */ - var code = 0; /* running code value */ - var bits; /* bit index */ - var n; /* code index */ - - /* The distribution counts are first used to generate the code values - * without bit reversal. - */ - for (bits = 1; bits <= MAX_BITS; bits++) { - next_code[bits] = code = (code + bl_count[bits - 1]) << 1; - } - /* Check that the bit counts in bl_count are consistent. The last code - * must be all ones. - */ - //Assert (code + bl_count[MAX_BITS]-1 == (1< length code (0..28) */ - length = 0; - for (code = 0; code < LENGTH_CODES - 1; code++) { - base_length[code] = length; - for (n = 0; n < (1 << extra_lbits[code]); n++) { - _length_code[length++] = code; - } - } - //Assert (length == 256, "tr_static_init: length != 256"); - /* Note that the length 255 (match length 258) can be represented - * in two different ways: code 284 + 5 bits or code 285, so we - * overwrite length_code[255] to use the best encoding: - */ - _length_code[length - 1] = code; - - /* Initialize the mapping dist (0..32K) -> dist code (0..29) */ - dist = 0; - for (code = 0; code < 16; code++) { - base_dist[code] = dist; - for (n = 0; n < (1 << extra_dbits[code]); n++) { - _dist_code[dist++] = code; - } - } - //Assert (dist == 256, "tr_static_init: dist != 256"); - dist >>= 7; /* from now on, all distances are divided by 128 */ - for (; code < D_CODES; code++) { - base_dist[code] = dist << 7; - for (n = 0; n < (1 << (extra_dbits[code] - 7)); n++) { - _dist_code[256 + dist++] = code; - } - } - //Assert (dist == 256, "tr_static_init: 256+dist != 512"); - - /* Construct the codes of the static literal tree */ - for (bits = 0; bits <= MAX_BITS; bits++) { - bl_count[bits] = 0; - } - - n = 0; - while (n <= 143) { - static_ltree[n * 2 + 1]/*.Len*/ = 8; - n++; - bl_count[8]++; - } - while (n <= 255) { - static_ltree[n * 2 + 1]/*.Len*/ = 9; - n++; - bl_count[9]++; - } - while (n <= 279) { - static_ltree[n * 2 + 1]/*.Len*/ = 7; - n++; - bl_count[7]++; - } - while (n <= 287) { - static_ltree[n * 2 + 1]/*.Len*/ = 8; - n++; - bl_count[8]++; - } - /* Codes 286 and 287 do not exist, but we must include them in the - * tree construction to get a canonical Huffman tree (longest code - * all ones) - */ - gen_codes(static_ltree, L_CODES + 1, bl_count); - - /* The static distance tree is trivial: */ - for (n = 0; n < D_CODES; n++) { - static_dtree[n * 2 + 1]/*.Len*/ = 5; - static_dtree[n * 2]/*.Code*/ = bi_reverse(n, 5); - } - - // Now data ready and we can init static trees - static_l_desc = new StaticTreeDesc(static_ltree, extra_lbits, LITERALS + 1, L_CODES, MAX_BITS); - static_d_desc = new StaticTreeDesc(static_dtree, extra_dbits, 0, D_CODES, MAX_BITS); - static_bl_desc = new StaticTreeDesc(new Array(0), extra_blbits, 0, BL_CODES, MAX_BL_BITS); - - //static_init_done = true; -} - - -/* =========================================================================== - * Initialize a new block. - */ -function init_block(s) { - var n; /* iterates over tree elements */ - - /* Initialize the trees. */ - for (n = 0; n < L_CODES; n++) { s.dyn_ltree[n * 2]/*.Freq*/ = 0; } - for (n = 0; n < D_CODES; n++) { s.dyn_dtree[n * 2]/*.Freq*/ = 0; } - for (n = 0; n < BL_CODES; n++) { s.bl_tree[n * 2]/*.Freq*/ = 0; } - - s.dyn_ltree[END_BLOCK * 2]/*.Freq*/ = 1; - s.opt_len = s.static_len = 0; - s.last_lit = s.matches = 0; -} - - -/* =========================================================================== - * Flush the bit buffer and align the output on a byte boundary - */ -function bi_windup(s) -{ - if (s.bi_valid > 8) { - put_short(s, s.bi_buf); - } else if (s.bi_valid > 0) { - //put_byte(s, (Byte)s->bi_buf); - s.pending_buf[s.pending++] = s.bi_buf; - } - s.bi_buf = 0; - s.bi_valid = 0; -} - -/* =========================================================================== - * Copy a stored block, storing first the length and its - * one's complement if requested. - */ -function copy_block(s, buf, len, header) -//DeflateState *s; -//charf *buf; /* the input data */ -//unsigned len; /* its length */ -//int header; /* true if block header must be written */ -{ - bi_windup(s); /* align on byte boundary */ - - if (header) { - put_short(s, len); - put_short(s, ~len); - } -// while (len--) { -// put_byte(s, *buf++); -// } - utils.arraySet(s.pending_buf, s.window, buf, len, s.pending); - s.pending += len; -} - -/* =========================================================================== - * Compares to subtrees, using the tree depth as tie breaker when - * the subtrees have equal frequency. This minimizes the worst case length. - */ -function smaller(tree, n, m, depth) { - var _n2 = n * 2; - var _m2 = m * 2; - return (tree[_n2]/*.Freq*/ < tree[_m2]/*.Freq*/ || - (tree[_n2]/*.Freq*/ === tree[_m2]/*.Freq*/ && depth[n] <= depth[m])); -} - -/* =========================================================================== - * Restore the heap property by moving down the tree starting at node k, - * exchanging a node with the smallest of its two sons if necessary, stopping - * when the heap property is re-established (each father smaller than its - * two sons). - */ -function pqdownheap(s, tree, k) -// deflate_state *s; -// ct_data *tree; /* the tree to restore */ -// int k; /* node to move down */ -{ - var v = s.heap[k]; - var j = k << 1; /* left son of k */ - while (j <= s.heap_len) { - /* Set j to the smallest of the two sons: */ - if (j < s.heap_len && - smaller(tree, s.heap[j + 1], s.heap[j], s.depth)) { - j++; - } - /* Exit if v is smaller than both sons */ - if (smaller(tree, v, s.heap[j], s.depth)) { break; } - - /* Exchange v with the smallest son */ - s.heap[k] = s.heap[j]; - k = j; - - /* And continue down the tree, setting j to the left son of k */ - j <<= 1; - } - s.heap[k] = v; -} - - -// inlined manually -// var SMALLEST = 1; - -/* =========================================================================== - * Send the block data compressed using the given Huffman trees - */ -function compress_block(s, ltree, dtree) -// deflate_state *s; -// const ct_data *ltree; /* literal tree */ -// const ct_data *dtree; /* distance tree */ -{ - var dist; /* distance of matched string */ - var lc; /* match length or unmatched char (if dist == 0) */ - var lx = 0; /* running index in l_buf */ - var code; /* the code to send */ - var extra; /* number of extra bits to send */ - - if (s.last_lit !== 0) { - do { - dist = (s.pending_buf[s.d_buf + lx * 2] << 8) | (s.pending_buf[s.d_buf + lx * 2 + 1]); - lc = s.pending_buf[s.l_buf + lx]; - lx++; - - if (dist === 0) { - send_code(s, lc, ltree); /* send a literal byte */ - //Tracecv(isgraph(lc), (stderr," '%c' ", lc)); - } else { - /* Here, lc is the match length - MIN_MATCH */ - code = _length_code[lc]; - send_code(s, code + LITERALS + 1, ltree); /* send the length code */ - extra = extra_lbits[code]; - if (extra !== 0) { - lc -= base_length[code]; - send_bits(s, lc, extra); /* send the extra length bits */ - } - dist--; /* dist is now the match distance - 1 */ - code = d_code(dist); - //Assert (code < D_CODES, "bad d_code"); - - send_code(s, code, dtree); /* send the distance code */ - extra = extra_dbits[code]; - if (extra !== 0) { - dist -= base_dist[code]; - send_bits(s, dist, extra); /* send the extra distance bits */ - } - } /* literal or match pair ? */ - - /* Check that the overlay between pending_buf and d_buf+l_buf is ok: */ - //Assert((uInt)(s->pending) < s->lit_bufsize + 2*lx, - // "pendingBuf overflow"); - - } while (lx < s.last_lit); - } - - send_code(s, END_BLOCK, ltree); -} - - -/* =========================================================================== - * Construct one Huffman tree and assigns the code bit strings and lengths. - * Update the total bit length for the current block. - * IN assertion: the field freq is set for all tree elements. - * OUT assertions: the fields len and code are set to the optimal bit length - * and corresponding code. The length opt_len is updated; static_len is - * also updated if stree is not null. The field max_code is set. - */ -function build_tree(s, desc) -// deflate_state *s; -// tree_desc *desc; /* the tree descriptor */ -{ - var tree = desc.dyn_tree; - var stree = desc.stat_desc.static_tree; - var has_stree = desc.stat_desc.has_stree; - var elems = desc.stat_desc.elems; - var n, m; /* iterate over heap elements */ - var max_code = -1; /* largest code with non zero frequency */ - var node; /* new node being created */ - - /* Construct the initial heap, with least frequent element in - * heap[SMALLEST]. The sons of heap[n] are heap[2*n] and heap[2*n+1]. - * heap[0] is not used. - */ - s.heap_len = 0; - s.heap_max = HEAP_SIZE; - - for (n = 0; n < elems; n++) { - if (tree[n * 2]/*.Freq*/ !== 0) { - s.heap[++s.heap_len] = max_code = n; - s.depth[n] = 0; - - } else { - tree[n * 2 + 1]/*.Len*/ = 0; - } - } - - /* The pkzip format requires that at least one distance code exists, - * and that at least one bit should be sent even if there is only one - * possible code. So to avoid special checks later on we force at least - * two codes of non zero frequency. - */ - while (s.heap_len < 2) { - node = s.heap[++s.heap_len] = (max_code < 2 ? ++max_code : 0); - tree[node * 2]/*.Freq*/ = 1; - s.depth[node] = 0; - s.opt_len--; - - if (has_stree) { - s.static_len -= stree[node * 2 + 1]/*.Len*/; - } - /* node is 0 or 1 so it does not have extra bits */ - } - desc.max_code = max_code; - - /* The elements heap[heap_len/2+1 .. heap_len] are leaves of the tree, - * establish sub-heaps of increasing lengths: - */ - for (n = (s.heap_len >> 1/*int /2*/); n >= 1; n--) { pqdownheap(s, tree, n); } - - /* Construct the Huffman tree by repeatedly combining the least two - * frequent nodes. - */ - node = elems; /* next internal node of the tree */ - do { - //pqremove(s, tree, n); /* n = node of least frequency */ - /*** pqremove ***/ - n = s.heap[1/*SMALLEST*/]; - s.heap[1/*SMALLEST*/] = s.heap[s.heap_len--]; - pqdownheap(s, tree, 1/*SMALLEST*/); - /***/ - - m = s.heap[1/*SMALLEST*/]; /* m = node of next least frequency */ - - s.heap[--s.heap_max] = n; /* keep the nodes sorted by frequency */ - s.heap[--s.heap_max] = m; - - /* Create a new node father of n and m */ - tree[node * 2]/*.Freq*/ = tree[n * 2]/*.Freq*/ + tree[m * 2]/*.Freq*/; - s.depth[node] = (s.depth[n] >= s.depth[m] ? s.depth[n] : s.depth[m]) + 1; - tree[n * 2 + 1]/*.Dad*/ = tree[m * 2 + 1]/*.Dad*/ = node; - - /* and insert the new node in the heap */ - s.heap[1/*SMALLEST*/] = node++; - pqdownheap(s, tree, 1/*SMALLEST*/); - - } while (s.heap_len >= 2); - - s.heap[--s.heap_max] = s.heap[1/*SMALLEST*/]; - - /* At this point, the fields freq and dad are set. We can now - * generate the bit lengths. - */ - gen_bitlen(s, desc); - - /* The field len is now set, we can generate the bit codes */ - gen_codes(tree, max_code, s.bl_count); -} - - -/* =========================================================================== - * Scan a literal or distance tree to determine the frequencies of the codes - * in the bit length tree. - */ -function scan_tree(s, tree, max_code) -// deflate_state *s; -// ct_data *tree; /* the tree to be scanned */ -// int max_code; /* and its largest code of non zero frequency */ -{ - var n; /* iterates over all tree elements */ - var prevlen = -1; /* last emitted length */ - var curlen; /* length of current code */ - - var nextlen = tree[0 * 2 + 1]/*.Len*/; /* length of next code */ - - var count = 0; /* repeat count of the current code */ - var max_count = 7; /* max repeat count */ - var min_count = 4; /* min repeat count */ - - if (nextlen === 0) { - max_count = 138; - min_count = 3; - } - tree[(max_code + 1) * 2 + 1]/*.Len*/ = 0xffff; /* guard */ - - for (n = 0; n <= max_code; n++) { - curlen = nextlen; - nextlen = tree[(n + 1) * 2 + 1]/*.Len*/; - - if (++count < max_count && curlen === nextlen) { - continue; - - } else if (count < min_count) { - s.bl_tree[curlen * 2]/*.Freq*/ += count; - - } else if (curlen !== 0) { - - if (curlen !== prevlen) { s.bl_tree[curlen * 2]/*.Freq*/++; } - s.bl_tree[REP_3_6 * 2]/*.Freq*/++; - - } else if (count <= 10) { - s.bl_tree[REPZ_3_10 * 2]/*.Freq*/++; - - } else { - s.bl_tree[REPZ_11_138 * 2]/*.Freq*/++; - } - - count = 0; - prevlen = curlen; - - if (nextlen === 0) { - max_count = 138; - min_count = 3; - - } else if (curlen === nextlen) { - max_count = 6; - min_count = 3; - - } else { - max_count = 7; - min_count = 4; - } - } -} - - -/* =========================================================================== - * Send a literal or distance tree in compressed form, using the codes in - * bl_tree. - */ -function send_tree(s, tree, max_code) -// deflate_state *s; -// ct_data *tree; /* the tree to be scanned */ -// int max_code; /* and its largest code of non zero frequency */ -{ - var n; /* iterates over all tree elements */ - var prevlen = -1; /* last emitted length */ - var curlen; /* length of current code */ - - var nextlen = tree[0 * 2 + 1]/*.Len*/; /* length of next code */ - - var count = 0; /* repeat count of the current code */ - var max_count = 7; /* max repeat count */ - var min_count = 4; /* min repeat count */ - - /* tree[max_code+1].Len = -1; */ /* guard already set */ - if (nextlen === 0) { - max_count = 138; - min_count = 3; - } - - for (n = 0; n <= max_code; n++) { - curlen = nextlen; - nextlen = tree[(n + 1) * 2 + 1]/*.Len*/; - - if (++count < max_count && curlen === nextlen) { - continue; - - } else if (count < min_count) { - do { send_code(s, curlen, s.bl_tree); } while (--count !== 0); - - } else if (curlen !== 0) { - if (curlen !== prevlen) { - send_code(s, curlen, s.bl_tree); - count--; - } - //Assert(count >= 3 && count <= 6, " 3_6?"); - send_code(s, REP_3_6, s.bl_tree); - send_bits(s, count - 3, 2); - - } else if (count <= 10) { - send_code(s, REPZ_3_10, s.bl_tree); - send_bits(s, count - 3, 3); - - } else { - send_code(s, REPZ_11_138, s.bl_tree); - send_bits(s, count - 11, 7); - } - - count = 0; - prevlen = curlen; - if (nextlen === 0) { - max_count = 138; - min_count = 3; - - } else if (curlen === nextlen) { - max_count = 6; - min_count = 3; - - } else { - max_count = 7; - min_count = 4; - } - } -} - - -/* =========================================================================== - * Construct the Huffman tree for the bit lengths and return the index in - * bl_order of the last bit length code to send. - */ -function build_bl_tree(s) { - var max_blindex; /* index of last bit length code of non zero freq */ - - /* Determine the bit length frequencies for literal and distance trees */ - scan_tree(s, s.dyn_ltree, s.l_desc.max_code); - scan_tree(s, s.dyn_dtree, s.d_desc.max_code); - - /* Build the bit length tree: */ - build_tree(s, s.bl_desc); - /* opt_len now includes the length of the tree representations, except - * the lengths of the bit lengths codes and the 5+5+4 bits for the counts. - */ - - /* Determine the number of bit length codes to send. The pkzip format - * requires that at least 4 bit length codes be sent. (appnote.txt says - * 3 but the actual value used is 4.) - */ - for (max_blindex = BL_CODES - 1; max_blindex >= 3; max_blindex--) { - if (s.bl_tree[bl_order[max_blindex] * 2 + 1]/*.Len*/ !== 0) { - break; - } - } - /* Update opt_len to include the bit length tree and counts */ - s.opt_len += 3 * (max_blindex + 1) + 5 + 5 + 4; - //Tracev((stderr, "\ndyn trees: dyn %ld, stat %ld", - // s->opt_len, s->static_len)); - - return max_blindex; -} - - -/* =========================================================================== - * Send the header for a block using dynamic Huffman trees: the counts, the - * lengths of the bit length codes, the literal tree and the distance tree. - * IN assertion: lcodes >= 257, dcodes >= 1, blcodes >= 4. - */ -function send_all_trees(s, lcodes, dcodes, blcodes) -// deflate_state *s; -// int lcodes, dcodes, blcodes; /* number of codes for each tree */ -{ - var rank; /* index in bl_order */ - - //Assert (lcodes >= 257 && dcodes >= 1 && blcodes >= 4, "not enough codes"); - //Assert (lcodes <= L_CODES && dcodes <= D_CODES && blcodes <= BL_CODES, - // "too many codes"); - //Tracev((stderr, "\nbl counts: ")); - send_bits(s, lcodes - 257, 5); /* not +255 as stated in appnote.txt */ - send_bits(s, dcodes - 1, 5); - send_bits(s, blcodes - 4, 4); /* not -3 as stated in appnote.txt */ - for (rank = 0; rank < blcodes; rank++) { - //Tracev((stderr, "\nbl code %2d ", bl_order[rank])); - send_bits(s, s.bl_tree[bl_order[rank] * 2 + 1]/*.Len*/, 3); - } - //Tracev((stderr, "\nbl tree: sent %ld", s->bits_sent)); - - send_tree(s, s.dyn_ltree, lcodes - 1); /* literal tree */ - //Tracev((stderr, "\nlit tree: sent %ld", s->bits_sent)); - - send_tree(s, s.dyn_dtree, dcodes - 1); /* distance tree */ - //Tracev((stderr, "\ndist tree: sent %ld", s->bits_sent)); -} - - -/* =========================================================================== - * Check if the data type is TEXT or BINARY, using the following algorithm: - * - TEXT if the two conditions below are satisfied: - * a) There are no non-portable control characters belonging to the - * "black list" (0..6, 14..25, 28..31). - * b) There is at least one printable character belonging to the - * "white list" (9 {TAB}, 10 {LF}, 13 {CR}, 32..255). - * - BINARY otherwise. - * - The following partially-portable control characters form a - * "gray list" that is ignored in this detection algorithm: - * (7 {BEL}, 8 {BS}, 11 {VT}, 12 {FF}, 26 {SUB}, 27 {ESC}). - * IN assertion: the fields Freq of dyn_ltree are set. - */ -function detect_data_type(s) { - /* black_mask is the bit mask of black-listed bytes - * set bits 0..6, 14..25, and 28..31 - * 0xf3ffc07f = binary 11110011111111111100000001111111 - */ - var black_mask = 0xf3ffc07f; - var n; - - /* Check for non-textual ("black-listed") bytes. */ - for (n = 0; n <= 31; n++, black_mask >>>= 1) { - if ((black_mask & 1) && (s.dyn_ltree[n * 2]/*.Freq*/ !== 0)) { - return Z_BINARY; - } - } - - /* Check for textual ("white-listed") bytes. */ - if (s.dyn_ltree[9 * 2]/*.Freq*/ !== 0 || s.dyn_ltree[10 * 2]/*.Freq*/ !== 0 || - s.dyn_ltree[13 * 2]/*.Freq*/ !== 0) { - return Z_TEXT; - } - for (n = 32; n < LITERALS; n++) { - if (s.dyn_ltree[n * 2]/*.Freq*/ !== 0) { - return Z_TEXT; - } - } - - /* There are no "black-listed" or "white-listed" bytes: - * this stream either is empty or has tolerated ("gray-listed") bytes only. - */ - return Z_BINARY; -} - - -var static_init_done = false; - -/* =========================================================================== - * Initialize the tree data structures for a new zlib stream. - */ -function _tr_init(s) -{ - - if (!static_init_done) { - tr_static_init(); - static_init_done = true; - } - - s.l_desc = new TreeDesc(s.dyn_ltree, static_l_desc); - s.d_desc = new TreeDesc(s.dyn_dtree, static_d_desc); - s.bl_desc = new TreeDesc(s.bl_tree, static_bl_desc); - - s.bi_buf = 0; - s.bi_valid = 0; - - /* Initialize the first block of the first file: */ - init_block(s); -} - - -/* =========================================================================== - * Send a stored block - */ -function _tr_stored_block(s, buf, stored_len, last) -//DeflateState *s; -//charf *buf; /* input block */ -//ulg stored_len; /* length of input block */ -//int last; /* one if this is the last block for a file */ -{ - send_bits(s, (STORED_BLOCK << 1) + (last ? 1 : 0), 3); /* send block type */ - copy_block(s, buf, stored_len, true); /* with header */ -} - - -/* =========================================================================== - * Send one empty static block to give enough lookahead for inflate. - * This takes 10 bits, of which 7 may remain in the bit buffer. - */ -function _tr_align(s) { - send_bits(s, STATIC_TREES << 1, 3); - send_code(s, END_BLOCK, static_ltree); - bi_flush(s); -} - - -/* =========================================================================== - * Determine the best encoding for the current block: dynamic trees, static - * trees or store, and output the encoded block to the zip file. - */ -function _tr_flush_block(s, buf, stored_len, last) -//DeflateState *s; -//charf *buf; /* input block, or NULL if too old */ -//ulg stored_len; /* length of input block */ -//int last; /* one if this is the last block for a file */ -{ - var opt_lenb, static_lenb; /* opt_len and static_len in bytes */ - var max_blindex = 0; /* index of last bit length code of non zero freq */ - - /* Build the Huffman trees unless a stored block is forced */ - if (s.level > 0) { - - /* Check if the file is binary or text */ - if (s.strm.data_type === Z_UNKNOWN) { - s.strm.data_type = detect_data_type(s); - } - - /* Construct the literal and distance trees */ - build_tree(s, s.l_desc); - // Tracev((stderr, "\nlit data: dyn %ld, stat %ld", s->opt_len, - // s->static_len)); - - build_tree(s, s.d_desc); - // Tracev((stderr, "\ndist data: dyn %ld, stat %ld", s->opt_len, - // s->static_len)); - /* At this point, opt_len and static_len are the total bit lengths of - * the compressed block data, excluding the tree representations. - */ - - /* Build the bit length tree for the above two trees, and get the index - * in bl_order of the last bit length code to send. - */ - max_blindex = build_bl_tree(s); - - /* Determine the best encoding. Compute the block lengths in bytes. */ - opt_lenb = (s.opt_len + 3 + 7) >>> 3; - static_lenb = (s.static_len + 3 + 7) >>> 3; - - // Tracev((stderr, "\nopt %lu(%lu) stat %lu(%lu) stored %lu lit %u ", - // opt_lenb, s->opt_len, static_lenb, s->static_len, stored_len, - // s->last_lit)); - - if (static_lenb <= opt_lenb) { opt_lenb = static_lenb; } - - } else { - // Assert(buf != (char*)0, "lost buf"); - opt_lenb = static_lenb = stored_len + 5; /* force a stored block */ - } - - if ((stored_len + 4 <= opt_lenb) && (buf !== -1)) { - /* 4: two words for the lengths */ - - /* The test buf != NULL is only necessary if LIT_BUFSIZE > WSIZE. - * Otherwise we can't have processed more than WSIZE input bytes since - * the last block flush, because compression would have been - * successful. If LIT_BUFSIZE <= WSIZE, it is never too late to - * transform a block into a stored block. - */ - _tr_stored_block(s, buf, stored_len, last); - - } else if (s.strategy === Z_FIXED || static_lenb === opt_lenb) { - - send_bits(s, (STATIC_TREES << 1) + (last ? 1 : 0), 3); - compress_block(s, static_ltree, static_dtree); - - } else { - send_bits(s, (DYN_TREES << 1) + (last ? 1 : 0), 3); - send_all_trees(s, s.l_desc.max_code + 1, s.d_desc.max_code + 1, max_blindex + 1); - compress_block(s, s.dyn_ltree, s.dyn_dtree); - } - // Assert (s->compressed_len == s->bits_sent, "bad compressed size"); - /* The above check is made mod 2^32, for files larger than 512 MB - * and uLong implemented on 32 bits. - */ - init_block(s); - - if (last) { - bi_windup(s); - } - // Tracev((stderr,"\ncomprlen %lu(%lu) ", s->compressed_len>>3, - // s->compressed_len-7*last)); -} - -/* =========================================================================== - * Save the match info and tally the frequency counts. Return true if - * the current block must be flushed. - */ -function _tr_tally(s, dist, lc) -// deflate_state *s; -// unsigned dist; /* distance of matched string */ -// unsigned lc; /* match length-MIN_MATCH or unmatched char (if dist==0) */ -{ - //var out_length, in_length, dcode; - - s.pending_buf[s.d_buf + s.last_lit * 2] = (dist >>> 8) & 0xff; - s.pending_buf[s.d_buf + s.last_lit * 2 + 1] = dist & 0xff; - - s.pending_buf[s.l_buf + s.last_lit] = lc & 0xff; - s.last_lit++; - - if (dist === 0) { - /* lc is the unmatched char */ - s.dyn_ltree[lc * 2]/*.Freq*/++; - } else { - s.matches++; - /* Here, lc is the match length - MIN_MATCH */ - dist--; /* dist = match distance - 1 */ - //Assert((ush)dist < (ush)MAX_DIST(s) && - // (ush)lc <= (ush)(MAX_MATCH-MIN_MATCH) && - // (ush)d_code(dist) < (ush)D_CODES, "_tr_tally: bad match"); - - s.dyn_ltree[(_length_code[lc] + LITERALS + 1) * 2]/*.Freq*/++; - s.dyn_dtree[d_code(dist) * 2]/*.Freq*/++; - } - -// (!) This block is disabled in zlib defailts, -// don't enable it for binary compatibility - -//#ifdef TRUNCATE_BLOCK -// /* Try to guess if it is profitable to stop the current block here */ -// if ((s.last_lit & 0x1fff) === 0 && s.level > 2) { -// /* Compute an upper bound for the compressed length */ -// out_length = s.last_lit*8; -// in_length = s.strstart - s.block_start; -// -// for (dcode = 0; dcode < D_CODES; dcode++) { -// out_length += s.dyn_dtree[dcode*2]/*.Freq*/ * (5 + extra_dbits[dcode]); -// } -// out_length >>>= 3; -// //Tracev((stderr,"\nlast_lit %u, in %ld, out ~%ld(%ld%%) ", -// // s->last_lit, in_length, out_length, -// // 100L - out_length*100L/in_length)); -// if (s.matches < (s.last_lit>>1)/*int /2*/ && out_length < (in_length>>1)/*int /2*/) { -// return true; -// } -// } -//#endif - - return (s.last_lit === s.lit_bufsize - 1); - /* We avoid equality with lit_bufsize because of wraparound at 64K - * on 16 bit machines and because stored blocks are restricted to - * 64K-1 bytes. - */ -} - -exports._tr_init = _tr_init; -exports._tr_stored_block = _tr_stored_block; -exports._tr_flush_block = _tr_flush_block; -exports._tr_tally = _tr_tally; -exports._tr_align = _tr_align; - -},{"../utils/common":3}],15:[function(require,module,exports){ -'use strict'; - - -function ZStream() { - /* next input byte */ - this.input = null; // JS specific, because we have no pointers - this.next_in = 0; - /* number of bytes available at input */ - this.avail_in = 0; - /* total number of input bytes read so far */ - this.total_in = 0; - /* next output byte should be put there */ - this.output = null; // JS specific, because we have no pointers - this.next_out = 0; - /* remaining free space at output */ - this.avail_out = 0; - /* total number of bytes output so far */ - this.total_out = 0; - /* last error message, NULL if no error */ - this.msg = ''/*Z_NULL*/; - /* not visible by applications */ - this.state = null; - /* best guess about the data type: binary or text */ - this.data_type = 2/*Z_UNKNOWN*/; - /* adler32 value of the uncompressed data */ - this.adler = 0; -} - -module.exports = ZStream; - -},{}],"/":[function(require,module,exports){ -// Top level file is just a mixin of submodules & constants -'use strict'; - -var assign = require('./lib/utils/common').assign; - -var deflate = require('./lib/deflate'); -var inflate = require('./lib/inflate'); -var constants = require('./lib/zlib/constants'); - -var pako = {}; - -assign(pako, deflate, inflate, constants); - -module.exports = pako; - -},{"./lib/deflate":1,"./lib/inflate":2,"./lib/utils/common":3,"./lib/zlib/constants":6}]},{},[])("/") -}); \ No newline at end of file diff --git a/node_modules/pako/dist/pako.min.js b/node_modules/pako/dist/pako.min.js deleted file mode 100644 index c2b86b63..00000000 --- a/node_modules/pako/dist/pako.min.js +++ /dev/null @@ -1,3 +0,0 @@ -/* pako 0.2.9 nodeca/pako */ -!function(t){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var e;e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,e.pako=t()}}(function(){return function t(e,a,i){function n(s,o){if(!a[s]){if(!e[s]){var l="function"==typeof require&&require;if(!o&&l)return l(s,!0);if(r)return r(s,!0);var h=new Error("Cannot find module '"+s+"'");throw h.code="MODULE_NOT_FOUND",h}var d=a[s]={exports:{}};e[s][0].call(d.exports,function(t){var a=e[s][1][t];return n(a?a:t)},d,d.exports,t,e,a,i)}return a[s].exports}for(var r="function"==typeof require&&require,s=0;s0?e.windowBits=-e.windowBits:e.gzip&&e.windowBits>0&&e.windowBits<16&&(e.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new f,this.strm.avail_out=0;var a=o.deflateInit2(this.strm,e.level,e.method,e.windowBits,e.memLevel,e.strategy);if(a!==b)throw new Error(d[a]);if(e.header&&o.deflateSetHeader(this.strm,e.header),e.dictionary){var n;if(n="string"==typeof e.dictionary?h.string2buf(e.dictionary):"[object ArrayBuffer]"===_.call(e.dictionary)?new Uint8Array(e.dictionary):e.dictionary,a=o.deflateSetDictionary(this.strm,n),a!==b)throw new Error(d[a]);this._dict_set=!0}}function n(t,e){var a=new i(e);if(a.push(t,!0),a.err)throw a.msg;return a.result}function r(t,e){return e=e||{},e.raw=!0,n(t,e)}function s(t,e){return e=e||{},e.gzip=!0,n(t,e)}var o=t("./zlib/deflate"),l=t("./utils/common"),h=t("./utils/strings"),d=t("./zlib/messages"),f=t("./zlib/zstream"),_=Object.prototype.toString,u=0,c=4,b=0,g=1,m=2,w=-1,p=0,v=8;i.prototype.push=function(t,e){var a,i,n=this.strm,r=this.options.chunkSize;if(this.ended)return!1;i=e===~~e?e:e===!0?c:u,"string"==typeof t?n.input=h.string2buf(t):"[object ArrayBuffer]"===_.call(t)?n.input=new Uint8Array(t):n.input=t,n.next_in=0,n.avail_in=n.input.length;do{if(0===n.avail_out&&(n.output=new l.Buf8(r),n.next_out=0,n.avail_out=r),a=o.deflate(n,i),a!==g&&a!==b)return this.onEnd(a),this.ended=!0,!1;0!==n.avail_out&&(0!==n.avail_in||i!==c&&i!==m)||("string"===this.options.to?this.onData(h.buf2binstring(l.shrinkBuf(n.output,n.next_out))):this.onData(l.shrinkBuf(n.output,n.next_out)))}while((n.avail_in>0||0===n.avail_out)&&a!==g);return i===c?(a=o.deflateEnd(this.strm),this.onEnd(a),this.ended=!0,a===b):i!==m||(this.onEnd(b),n.avail_out=0,!0)},i.prototype.onData=function(t){this.chunks.push(t)},i.prototype.onEnd=function(t){t===b&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=l.flattenChunks(this.chunks)),this.chunks=[],this.err=t,this.msg=this.strm.msg},a.Deflate=i,a.deflate=n,a.deflateRaw=r,a.gzip=s},{"./utils/common":3,"./utils/strings":4,"./zlib/deflate":8,"./zlib/messages":13,"./zlib/zstream":15}],2:[function(t,e,a){"use strict";function i(t){if(!(this instanceof i))return new i(t);this.options=o.assign({chunkSize:16384,windowBits:0,to:""},t||{});var e=this.options;e.raw&&e.windowBits>=0&&e.windowBits<16&&(e.windowBits=-e.windowBits,0===e.windowBits&&(e.windowBits=-15)),!(e.windowBits>=0&&e.windowBits<16)||t&&t.windowBits||(e.windowBits+=32),e.windowBits>15&&e.windowBits<48&&0===(15&e.windowBits)&&(e.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new f,this.strm.avail_out=0;var a=s.inflateInit2(this.strm,e.windowBits);if(a!==h.Z_OK)throw new Error(d[a]);this.header=new _,s.inflateGetHeader(this.strm,this.header)}function n(t,e){var a=new i(e);if(a.push(t,!0),a.err)throw a.msg;return a.result}function r(t,e){return e=e||{},e.raw=!0,n(t,e)}var s=t("./zlib/inflate"),o=t("./utils/common"),l=t("./utils/strings"),h=t("./zlib/constants"),d=t("./zlib/messages"),f=t("./zlib/zstream"),_=t("./zlib/gzheader"),u=Object.prototype.toString;i.prototype.push=function(t,e){var a,i,n,r,d,f,_=this.strm,c=this.options.chunkSize,b=this.options.dictionary,g=!1;if(this.ended)return!1;i=e===~~e?e:e===!0?h.Z_FINISH:h.Z_NO_FLUSH,"string"==typeof t?_.input=l.binstring2buf(t):"[object ArrayBuffer]"===u.call(t)?_.input=new Uint8Array(t):_.input=t,_.next_in=0,_.avail_in=_.input.length;do{if(0===_.avail_out&&(_.output=new o.Buf8(c),_.next_out=0,_.avail_out=c),a=s.inflate(_,h.Z_NO_FLUSH),a===h.Z_NEED_DICT&&b&&(f="string"==typeof b?l.string2buf(b):"[object ArrayBuffer]"===u.call(b)?new Uint8Array(b):b,a=s.inflateSetDictionary(this.strm,f)),a===h.Z_BUF_ERROR&&g===!0&&(a=h.Z_OK,g=!1),a!==h.Z_STREAM_END&&a!==h.Z_OK)return this.onEnd(a),this.ended=!0,!1;_.next_out&&(0!==_.avail_out&&a!==h.Z_STREAM_END&&(0!==_.avail_in||i!==h.Z_FINISH&&i!==h.Z_SYNC_FLUSH)||("string"===this.options.to?(n=l.utf8border(_.output,_.next_out),r=_.next_out-n,d=l.buf2string(_.output,n),_.next_out=r,_.avail_out=c-r,r&&o.arraySet(_.output,_.output,n,r,0),this.onData(d)):this.onData(o.shrinkBuf(_.output,_.next_out)))),0===_.avail_in&&0===_.avail_out&&(g=!0)}while((_.avail_in>0||0===_.avail_out)&&a!==h.Z_STREAM_END);return a===h.Z_STREAM_END&&(i=h.Z_FINISH),i===h.Z_FINISH?(a=s.inflateEnd(this.strm),this.onEnd(a),this.ended=!0,a===h.Z_OK):i!==h.Z_SYNC_FLUSH||(this.onEnd(h.Z_OK),_.avail_out=0,!0)},i.prototype.onData=function(t){this.chunks.push(t)},i.prototype.onEnd=function(t){t===h.Z_OK&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=o.flattenChunks(this.chunks)),this.chunks=[],this.err=t,this.msg=this.strm.msg},a.Inflate=i,a.inflate=n,a.inflateRaw=r,a.ungzip=n},{"./utils/common":3,"./utils/strings":4,"./zlib/constants":6,"./zlib/gzheader":9,"./zlib/inflate":11,"./zlib/messages":13,"./zlib/zstream":15}],3:[function(t,e,a){"use strict";var i="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Int32Array;a.assign=function(t){for(var e=Array.prototype.slice.call(arguments,1);e.length;){var a=e.shift();if(a){if("object"!=typeof a)throw new TypeError(a+"must be non-object");for(var i in a)a.hasOwnProperty(i)&&(t[i]=a[i])}}return t},a.shrinkBuf=function(t,e){return t.length===e?t:t.subarray?t.subarray(0,e):(t.length=e,t)};var n={arraySet:function(t,e,a,i,n){if(e.subarray&&t.subarray)return void t.set(e.subarray(a,a+i),n);for(var r=0;r=252?6:l>=248?5:l>=240?4:l>=224?3:l>=192?2:1;o[254]=o[254]=1,a.string2buf=function(t){var e,a,i,r,s,o=t.length,l=0;for(r=0;r>>6,e[s++]=128|63&a):a<65536?(e[s++]=224|a>>>12,e[s++]=128|a>>>6&63,e[s++]=128|63&a):(e[s++]=240|a>>>18,e[s++]=128|a>>>12&63,e[s++]=128|a>>>6&63,e[s++]=128|63&a);return e},a.buf2binstring=function(t){return i(t,t.length)},a.binstring2buf=function(t){for(var e=new n.Buf8(t.length),a=0,i=e.length;a4)h[n++]=65533,a+=s-1;else{for(r&=2===s?31:3===s?15:7;s>1&&a1?h[n++]=65533:r<65536?h[n++]=r:(r-=65536,h[n++]=55296|r>>10&1023,h[n++]=56320|1023&r)}return i(h,n)},a.utf8border=function(t,e){var a;for(e=e||t.length,e>t.length&&(e=t.length),a=e-1;a>=0&&128===(192&t[a]);)a--;return a<0?e:0===a?e:a+o[t[a]]>e?a:e}},{"./common":3}],5:[function(t,e,a){"use strict";function i(t,e,a,i){for(var n=65535&t|0,r=t>>>16&65535|0,s=0;0!==a;){s=a>2e3?2e3:a,a-=s;do n=n+e[i++]|0,r=r+n|0;while(--s);n%=65521,r%=65521}return n|r<<16|0}e.exports=i},{}],6:[function(t,e,a){"use strict";e.exports={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8}},{}],7:[function(t,e,a){"use strict";function i(){for(var t,e=[],a=0;a<256;a++){t=a;for(var i=0;i<8;i++)t=1&t?3988292384^t>>>1:t>>>1;e[a]=t}return e}function n(t,e,a,i){var n=r,s=i+a;t^=-1;for(var o=i;o>>8^n[255&(t^e[o])];return t^-1}var r=i();e.exports=n},{}],8:[function(t,e,a){"use strict";function i(t,e){return t.msg=D[e],e}function n(t){return(t<<1)-(t>4?9:0)}function r(t){for(var e=t.length;--e>=0;)t[e]=0}function s(t){var e=t.state,a=e.pending;a>t.avail_out&&(a=t.avail_out),0!==a&&(R.arraySet(t.output,e.pending_buf,e.pending_out,a,t.next_out),t.next_out+=a,e.pending_out+=a,t.total_out+=a,t.avail_out-=a,e.pending-=a,0===e.pending&&(e.pending_out=0))}function o(t,e){C._tr_flush_block(t,t.block_start>=0?t.block_start:-1,t.strstart-t.block_start,e),t.block_start=t.strstart,s(t.strm)}function l(t,e){t.pending_buf[t.pending++]=e}function h(t,e){t.pending_buf[t.pending++]=e>>>8&255,t.pending_buf[t.pending++]=255&e}function d(t,e,a,i){var n=t.avail_in;return n>i&&(n=i),0===n?0:(t.avail_in-=n,R.arraySet(e,t.input,t.next_in,n,a),1===t.state.wrap?t.adler=N(t.adler,e,n,a):2===t.state.wrap&&(t.adler=O(t.adler,e,n,a)),t.next_in+=n,t.total_in+=n,n)}function f(t,e){var a,i,n=t.max_chain_length,r=t.strstart,s=t.prev_length,o=t.nice_match,l=t.strstart>t.w_size-ft?t.strstart-(t.w_size-ft):0,h=t.window,d=t.w_mask,f=t.prev,_=t.strstart+dt,u=h[r+s-1],c=h[r+s];t.prev_length>=t.good_match&&(n>>=2),o>t.lookahead&&(o=t.lookahead);do if(a=e,h[a+s]===c&&h[a+s-1]===u&&h[a]===h[r]&&h[++a]===h[r+1]){r+=2,a++;do;while(h[++r]===h[++a]&&h[++r]===h[++a]&&h[++r]===h[++a]&&h[++r]===h[++a]&&h[++r]===h[++a]&&h[++r]===h[++a]&&h[++r]===h[++a]&&h[++r]===h[++a]&&r<_);if(i=dt-(_-r),r=_-dt,i>s){if(t.match_start=e,s=i,i>=o)break;u=h[r+s-1],c=h[r+s]}}while((e=f[e&d])>l&&0!==--n);return s<=t.lookahead?s:t.lookahead}function _(t){var e,a,i,n,r,s=t.w_size;do{if(n=t.window_size-t.lookahead-t.strstart,t.strstart>=s+(s-ft)){R.arraySet(t.window,t.window,s,s,0),t.match_start-=s,t.strstart-=s,t.block_start-=s,a=t.hash_size,e=a;do i=t.head[--e],t.head[e]=i>=s?i-s:0;while(--a);a=s,e=a;do i=t.prev[--e],t.prev[e]=i>=s?i-s:0;while(--a);n+=s}if(0===t.strm.avail_in)break;if(a=d(t.strm,t.window,t.strstart+t.lookahead,n),t.lookahead+=a,t.lookahead+t.insert>=ht)for(r=t.strstart-t.insert,t.ins_h=t.window[r],t.ins_h=(t.ins_h<t.pending_buf_size-5&&(a=t.pending_buf_size-5);;){if(t.lookahead<=1){if(_(t),0===t.lookahead&&e===I)return vt;if(0===t.lookahead)break}t.strstart+=t.lookahead,t.lookahead=0;var i=t.block_start+a;if((0===t.strstart||t.strstart>=i)&&(t.lookahead=t.strstart-i,t.strstart=i,o(t,!1),0===t.strm.avail_out))return vt;if(t.strstart-t.block_start>=t.w_size-ft&&(o(t,!1),0===t.strm.avail_out))return vt}return t.insert=0,e===F?(o(t,!0),0===t.strm.avail_out?yt:xt):t.strstart>t.block_start&&(o(t,!1),0===t.strm.avail_out)?vt:vt}function c(t,e){for(var a,i;;){if(t.lookahead=ht&&(t.ins_h=(t.ins_h<=ht)if(i=C._tr_tally(t,t.strstart-t.match_start,t.match_length-ht),t.lookahead-=t.match_length,t.match_length<=t.max_lazy_match&&t.lookahead>=ht){t.match_length--;do t.strstart++,t.ins_h=(t.ins_h<=ht&&(t.ins_h=(t.ins_h<4096)&&(t.match_length=ht-1)),t.prev_length>=ht&&t.match_length<=t.prev_length){n=t.strstart+t.lookahead-ht,i=C._tr_tally(t,t.strstart-1-t.prev_match,t.prev_length-ht),t.lookahead-=t.prev_length-1,t.prev_length-=2;do++t.strstart<=n&&(t.ins_h=(t.ins_h<=ht&&t.strstart>0&&(n=t.strstart-1,i=s[n],i===s[++n]&&i===s[++n]&&i===s[++n])){r=t.strstart+dt;do;while(i===s[++n]&&i===s[++n]&&i===s[++n]&&i===s[++n]&&i===s[++n]&&i===s[++n]&&i===s[++n]&&i===s[++n]&&nt.lookahead&&(t.match_length=t.lookahead)}if(t.match_length>=ht?(a=C._tr_tally(t,1,t.match_length-ht),t.lookahead-=t.match_length,t.strstart+=t.match_length,t.match_length=0):(a=C._tr_tally(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++),a&&(o(t,!1),0===t.strm.avail_out))return vt}return t.insert=0,e===F?(o(t,!0),0===t.strm.avail_out?yt:xt):t.last_lit&&(o(t,!1),0===t.strm.avail_out)?vt:kt}function m(t,e){for(var a;;){if(0===t.lookahead&&(_(t),0===t.lookahead)){if(e===I)return vt;break}if(t.match_length=0,a=C._tr_tally(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++,a&&(o(t,!1),0===t.strm.avail_out))return vt}return t.insert=0,e===F?(o(t,!0),0===t.strm.avail_out?yt:xt):t.last_lit&&(o(t,!1),0===t.strm.avail_out)?vt:kt}function w(t,e,a,i,n){this.good_length=t,this.max_lazy=e,this.nice_length=a,this.max_chain=i,this.func=n}function p(t){t.window_size=2*t.w_size,r(t.head),t.max_lazy_match=Z[t.level].max_lazy,t.good_match=Z[t.level].good_length,t.nice_match=Z[t.level].nice_length,t.max_chain_length=Z[t.level].max_chain,t.strstart=0,t.block_start=0,t.lookahead=0,t.insert=0,t.match_length=t.prev_length=ht-1,t.match_available=0,t.ins_h=0}function v(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=V,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new R.Buf16(2*ot),this.dyn_dtree=new R.Buf16(2*(2*rt+1)),this.bl_tree=new R.Buf16(2*(2*st+1)),r(this.dyn_ltree),r(this.dyn_dtree),r(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new R.Buf16(lt+1),this.heap=new R.Buf16(2*nt+1),r(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new R.Buf16(2*nt+1),r(this.depth),this.l_buf=0,this.lit_bufsize=0,this.last_lit=0,this.d_buf=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}function k(t){var e;return t&&t.state?(t.total_in=t.total_out=0,t.data_type=Q,e=t.state,e.pending=0,e.pending_out=0,e.wrap<0&&(e.wrap=-e.wrap),e.status=e.wrap?ut:wt,t.adler=2===e.wrap?0:1,e.last_flush=I,C._tr_init(e),H):i(t,K)}function y(t){var e=k(t);return e===H&&p(t.state),e}function x(t,e){return t&&t.state?2!==t.state.wrap?K:(t.state.gzhead=e,H):K}function z(t,e,a,n,r,s){if(!t)return K;var o=1;if(e===Y&&(e=6),n<0?(o=0,n=-n):n>15&&(o=2,n-=16),r<1||r>$||a!==V||n<8||n>15||e<0||e>9||s<0||s>W)return i(t,K);8===n&&(n=9);var l=new v;return t.state=l,l.strm=t,l.wrap=o,l.gzhead=null,l.w_bits=n,l.w_size=1<L||e<0)return t?i(t,K):K;if(o=t.state,!t.output||!t.input&&0!==t.avail_in||o.status===pt&&e!==F)return i(t,0===t.avail_out?P:K);if(o.strm=t,a=o.last_flush,o.last_flush=e,o.status===ut)if(2===o.wrap)t.adler=0,l(o,31),l(o,139),l(o,8),o.gzhead?(l(o,(o.gzhead.text?1:0)+(o.gzhead.hcrc?2:0)+(o.gzhead.extra?4:0)+(o.gzhead.name?8:0)+(o.gzhead.comment?16:0)),l(o,255&o.gzhead.time),l(o,o.gzhead.time>>8&255),l(o,o.gzhead.time>>16&255),l(o,o.gzhead.time>>24&255),l(o,9===o.level?2:o.strategy>=G||o.level<2?4:0),l(o,255&o.gzhead.os),o.gzhead.extra&&o.gzhead.extra.length&&(l(o,255&o.gzhead.extra.length),l(o,o.gzhead.extra.length>>8&255)),o.gzhead.hcrc&&(t.adler=O(t.adler,o.pending_buf,o.pending,0)),o.gzindex=0,o.status=ct):(l(o,0),l(o,0),l(o,0),l(o,0),l(o,0),l(o,9===o.level?2:o.strategy>=G||o.level<2?4:0),l(o,zt),o.status=wt);else{var _=V+(o.w_bits-8<<4)<<8,u=-1;u=o.strategy>=G||o.level<2?0:o.level<6?1:6===o.level?2:3,_|=u<<6,0!==o.strstart&&(_|=_t),_+=31-_%31,o.status=wt,h(o,_),0!==o.strstart&&(h(o,t.adler>>>16),h(o,65535&t.adler)),t.adler=1}if(o.status===ct)if(o.gzhead.extra){for(d=o.pending;o.gzindex<(65535&o.gzhead.extra.length)&&(o.pending!==o.pending_buf_size||(o.gzhead.hcrc&&o.pending>d&&(t.adler=O(t.adler,o.pending_buf,o.pending-d,d)),s(t),d=o.pending,o.pending!==o.pending_buf_size));)l(o,255&o.gzhead.extra[o.gzindex]),o.gzindex++;o.gzhead.hcrc&&o.pending>d&&(t.adler=O(t.adler,o.pending_buf,o.pending-d,d)),o.gzindex===o.gzhead.extra.length&&(o.gzindex=0,o.status=bt)}else o.status=bt;if(o.status===bt)if(o.gzhead.name){d=o.pending;do{if(o.pending===o.pending_buf_size&&(o.gzhead.hcrc&&o.pending>d&&(t.adler=O(t.adler,o.pending_buf,o.pending-d,d)),s(t),d=o.pending,o.pending===o.pending_buf_size)){f=1;break}f=o.gzindexd&&(t.adler=O(t.adler,o.pending_buf,o.pending-d,d)),0===f&&(o.gzindex=0,o.status=gt)}else o.status=gt;if(o.status===gt)if(o.gzhead.comment){d=o.pending;do{if(o.pending===o.pending_buf_size&&(o.gzhead.hcrc&&o.pending>d&&(t.adler=O(t.adler,o.pending_buf,o.pending-d,d)),s(t),d=o.pending,o.pending===o.pending_buf_size)){f=1;break}f=o.gzindexd&&(t.adler=O(t.adler,o.pending_buf,o.pending-d,d)),0===f&&(o.status=mt)}else o.status=mt;if(o.status===mt&&(o.gzhead.hcrc?(o.pending+2>o.pending_buf_size&&s(t),o.pending+2<=o.pending_buf_size&&(l(o,255&t.adler),l(o,t.adler>>8&255),t.adler=0,o.status=wt)):o.status=wt),0!==o.pending){if(s(t),0===t.avail_out)return o.last_flush=-1,H}else if(0===t.avail_in&&n(e)<=n(a)&&e!==F)return i(t,P);if(o.status===pt&&0!==t.avail_in)return i(t,P);if(0!==t.avail_in||0!==o.lookahead||e!==I&&o.status!==pt){var c=o.strategy===G?m(o,e):o.strategy===X?g(o,e):Z[o.level].func(o,e);if(c!==yt&&c!==xt||(o.status=pt),c===vt||c===yt)return 0===t.avail_out&&(o.last_flush=-1),H;if(c===kt&&(e===U?C._tr_align(o):e!==L&&(C._tr_stored_block(o,0,0,!1),e===T&&(r(o.head),0===o.lookahead&&(o.strstart=0,o.block_start=0,o.insert=0))),s(t),0===t.avail_out))return o.last_flush=-1,H}return e!==F?H:o.wrap<=0?j:(2===o.wrap?(l(o,255&t.adler),l(o,t.adler>>8&255),l(o,t.adler>>16&255),l(o,t.adler>>24&255),l(o,255&t.total_in),l(o,t.total_in>>8&255),l(o,t.total_in>>16&255),l(o,t.total_in>>24&255)):(h(o,t.adler>>>16),h(o,65535&t.adler)),s(t),o.wrap>0&&(o.wrap=-o.wrap),0!==o.pending?H:j)}function E(t){var e;return t&&t.state?(e=t.state.status,e!==ut&&e!==ct&&e!==bt&&e!==gt&&e!==mt&&e!==wt&&e!==pt?i(t,K):(t.state=null,e===wt?i(t,M):H)):K}function A(t,e){var a,i,n,s,o,l,h,d,f=e.length;if(!t||!t.state)return K;if(a=t.state,s=a.wrap,2===s||1===s&&a.status!==ut||a.lookahead)return K;for(1===s&&(t.adler=N(t.adler,e,f,0)),a.wrap=0,f>=a.w_size&&(0===s&&(r(a.head),a.strstart=0,a.block_start=0,a.insert=0),d=new R.Buf8(a.w_size),R.arraySet(d,e,f-a.w_size,a.w_size,0),e=d,f=a.w_size),o=t.avail_in,l=t.next_in,h=t.input,t.avail_in=f,t.next_in=0,t.input=e,_(a);a.lookahead>=ht;){i=a.strstart,n=a.lookahead-(ht-1);do a.ins_h=(a.ins_h<>>24,b>>>=y,g-=y,y=k>>>16&255,0===y)A[o++]=65535&k;else{if(!(16&y)){if(0===(64&y)){k=m[(65535&k)+(b&(1<>>=y,g-=y),g<15&&(b+=E[r++]<>>24,b>>>=y,g-=y,y=k>>>16&255,!(16&y)){if(0===(64&y)){k=w[(65535&k)+(b&(1<d){t.msg="invalid distance too far back",a.mode=i;break t}if(b>>>=y,g-=y,y=o-l,z>y){if(y=z-y,y>_&&a.sane){t.msg="invalid distance too far back",a.mode=i;break t}if(B=0,S=c,0===u){if(B+=f-y,y2;)A[o++]=S[B++],A[o++]=S[B++],A[o++]=S[B++],x-=3;x&&(A[o++]=S[B++],x>1&&(A[o++]=S[B++]))}else{B=o-z;do A[o++]=A[B++],A[o++]=A[B++],A[o++]=A[B++],x-=3;while(x>2);x&&(A[o++]=A[B++],x>1&&(A[o++]=A[B++]))}break}}break}}while(r>3,r-=x,g-=x<<3,b&=(1<>>24&255)+(t>>>8&65280)+((65280&t)<<8)+((255&t)<<24)}function n(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new w.Buf16(320),this.work=new w.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function r(t){var e;return t&&t.state?(e=t.state,t.total_in=t.total_out=e.total=0,t.msg="",e.wrap&&(t.adler=1&e.wrap),e.mode=T,e.last=0,e.havedict=0,e.dmax=32768,e.head=null,e.hold=0,e.bits=0,e.lencode=e.lendyn=new w.Buf32(bt),e.distcode=e.distdyn=new w.Buf32(gt),e.sane=1,e.back=-1,Z):N}function s(t){var e;return t&&t.state?(e=t.state,e.wsize=0,e.whave=0,e.wnext=0,r(t)):N}function o(t,e){var a,i;return t&&t.state?(i=t.state,e<0?(a=0,e=-e):(a=(e>>4)+1,e<48&&(e&=15)),e&&(e<8||e>15)?N:(null!==i.window&&i.wbits!==e&&(i.window=null),i.wrap=a,i.wbits=e,s(t))):N}function l(t,e){var a,i;return t?(i=new n,t.state=i,i.window=null,a=o(t,e),a!==Z&&(t.state=null),a):N}function h(t){return l(t,wt)}function d(t){if(pt){var e;for(g=new w.Buf32(512),m=new w.Buf32(32),e=0;e<144;)t.lens[e++]=8;for(;e<256;)t.lens[e++]=9;for(;e<280;)t.lens[e++]=7;for(;e<288;)t.lens[e++]=8;for(y(z,t.lens,0,288,g,0,t.work,{bits:9}),e=0;e<32;)t.lens[e++]=5;y(B,t.lens,0,32,m,0,t.work,{bits:5}),pt=!1}t.lencode=g,t.lenbits=9,t.distcode=m,t.distbits=5}function f(t,e,a,i){var n,r=t.state;return null===r.window&&(r.wsize=1<=r.wsize?(w.arraySet(r.window,e,a-r.wsize,r.wsize,0),r.wnext=0,r.whave=r.wsize):(n=r.wsize-r.wnext,n>i&&(n=i),w.arraySet(r.window,e,a-i,n,r.wnext),i-=n,i?(w.arraySet(r.window,e,a-i,i,0),r.wnext=i,r.whave=r.wsize):(r.wnext+=n,r.wnext===r.wsize&&(r.wnext=0),r.whave>>8&255,a.check=v(a.check,Et,2,0),_=0,u=0,a.mode=F;break}if(a.flags=0,a.head&&(a.head.done=!1),!(1&a.wrap)||(((255&_)<<8)+(_>>8))%31){t.msg="incorrect header check",a.mode=_t;break}if((15&_)!==U){t.msg="unknown compression method",a.mode=_t;break}if(_>>>=4,u-=4,yt=(15&_)+8,0===a.wbits)a.wbits=yt;else if(yt>a.wbits){t.msg="invalid window size",a.mode=_t;break}a.dmax=1<>8&1),512&a.flags&&(Et[0]=255&_,Et[1]=_>>>8&255,a.check=v(a.check,Et,2,0)),_=0,u=0,a.mode=L;case L:for(;u<32;){if(0===l)break t;l--,_+=n[s++]<>>8&255,Et[2]=_>>>16&255,Et[3]=_>>>24&255,a.check=v(a.check,Et,4,0)),_=0,u=0,a.mode=H;case H:for(;u<16;){if(0===l)break t;l--,_+=n[s++]<>8),512&a.flags&&(Et[0]=255&_,Et[1]=_>>>8&255,a.check=v(a.check,Et,2,0)),_=0,u=0,a.mode=j;case j:if(1024&a.flags){for(;u<16;){if(0===l)break t;l--,_+=n[s++]<>>8&255,a.check=v(a.check,Et,2,0)),_=0,u=0}else a.head&&(a.head.extra=null);a.mode=K;case K:if(1024&a.flags&&(g=a.length,g>l&&(g=l),g&&(a.head&&(yt=a.head.extra_len-a.length,a.head.extra||(a.head.extra=new Array(a.head.extra_len)),w.arraySet(a.head.extra,n,s,g,yt)),512&a.flags&&(a.check=v(a.check,n,g,s)),l-=g,s+=g,a.length-=g),a.length))break t;a.length=0,a.mode=M;case M:if(2048&a.flags){if(0===l)break t;g=0;do yt=n[s+g++],a.head&&yt&&a.length<65536&&(a.head.name+=String.fromCharCode(yt));while(yt&&g>9&1,a.head.done=!0),t.adler=a.check=0,a.mode=X;break;case q:for(;u<32;){if(0===l)break t;l--,_+=n[s++]<>>=7&u,u-=7&u,a.mode=ht;break}for(;u<3;){if(0===l)break t;l--,_+=n[s++]<>>=1,u-=1,3&_){case 0:a.mode=J;break;case 1:if(d(a),a.mode=at,e===A){_>>>=2,u-=2;break t}break;case 2:a.mode=$;break;case 3:t.msg="invalid block type",a.mode=_t}_>>>=2,u-=2;break;case J:for(_>>>=7&u,u-=7&u;u<32;){if(0===l)break t;l--,_+=n[s++]<>>16^65535)){t.msg="invalid stored block lengths",a.mode=_t;break}if(a.length=65535&_,_=0,u=0,a.mode=Q,e===A)break t;case Q:a.mode=V;case V:if(g=a.length){if(g>l&&(g=l),g>h&&(g=h),0===g)break t;w.arraySet(r,n,s,g,o),l-=g,s+=g,h-=g,o+=g,a.length-=g;break}a.mode=X;break;case $:for(;u<14;){if(0===l)break t; -l--,_+=n[s++]<>>=5,u-=5,a.ndist=(31&_)+1,_>>>=5,u-=5,a.ncode=(15&_)+4,_>>>=4,u-=4,a.nlen>286||a.ndist>30){t.msg="too many length or distance symbols",a.mode=_t;break}a.have=0,a.mode=tt;case tt:for(;a.have>>=3,u-=3}for(;a.have<19;)a.lens[At[a.have++]]=0;if(a.lencode=a.lendyn,a.lenbits=7,zt={bits:a.lenbits},xt=y(x,a.lens,0,19,a.lencode,0,a.work,zt),a.lenbits=zt.bits,xt){t.msg="invalid code lengths set",a.mode=_t;break}a.have=0,a.mode=et;case et:for(;a.have>>24,mt=St>>>16&255,wt=65535&St,!(gt<=u);){if(0===l)break t;l--,_+=n[s++]<>>=gt,u-=gt,a.lens[a.have++]=wt;else{if(16===wt){for(Bt=gt+2;u>>=gt,u-=gt,0===a.have){t.msg="invalid bit length repeat",a.mode=_t;break}yt=a.lens[a.have-1],g=3+(3&_),_>>>=2,u-=2}else if(17===wt){for(Bt=gt+3;u>>=gt,u-=gt,yt=0,g=3+(7&_),_>>>=3,u-=3}else{for(Bt=gt+7;u>>=gt,u-=gt,yt=0,g=11+(127&_),_>>>=7,u-=7}if(a.have+g>a.nlen+a.ndist){t.msg="invalid bit length repeat",a.mode=_t;break}for(;g--;)a.lens[a.have++]=yt}}if(a.mode===_t)break;if(0===a.lens[256]){t.msg="invalid code -- missing end-of-block",a.mode=_t;break}if(a.lenbits=9,zt={bits:a.lenbits},xt=y(z,a.lens,0,a.nlen,a.lencode,0,a.work,zt),a.lenbits=zt.bits,xt){t.msg="invalid literal/lengths set",a.mode=_t;break}if(a.distbits=6,a.distcode=a.distdyn,zt={bits:a.distbits},xt=y(B,a.lens,a.nlen,a.ndist,a.distcode,0,a.work,zt),a.distbits=zt.bits,xt){t.msg="invalid distances set",a.mode=_t;break}if(a.mode=at,e===A)break t;case at:a.mode=it;case it:if(l>=6&&h>=258){t.next_out=o,t.avail_out=h,t.next_in=s,t.avail_in=l,a.hold=_,a.bits=u,k(t,b),o=t.next_out,r=t.output,h=t.avail_out,s=t.next_in,n=t.input,l=t.avail_in,_=a.hold,u=a.bits,a.mode===X&&(a.back=-1);break}for(a.back=0;St=a.lencode[_&(1<>>24,mt=St>>>16&255,wt=65535&St,!(gt<=u);){if(0===l)break t;l--,_+=n[s++]<>pt)],gt=St>>>24,mt=St>>>16&255,wt=65535&St,!(pt+gt<=u);){if(0===l)break t;l--,_+=n[s++]<>>=pt,u-=pt,a.back+=pt}if(_>>>=gt,u-=gt,a.back+=gt,a.length=wt,0===mt){a.mode=lt;break}if(32&mt){a.back=-1,a.mode=X;break}if(64&mt){t.msg="invalid literal/length code",a.mode=_t;break}a.extra=15&mt,a.mode=nt;case nt:if(a.extra){for(Bt=a.extra;u>>=a.extra,u-=a.extra,a.back+=a.extra}a.was=a.length,a.mode=rt;case rt:for(;St=a.distcode[_&(1<>>24,mt=St>>>16&255,wt=65535&St,!(gt<=u);){if(0===l)break t;l--,_+=n[s++]<>pt)],gt=St>>>24,mt=St>>>16&255,wt=65535&St,!(pt+gt<=u);){if(0===l)break t;l--,_+=n[s++]<>>=pt,u-=pt,a.back+=pt}if(_>>>=gt,u-=gt,a.back+=gt,64&mt){t.msg="invalid distance code",a.mode=_t;break}a.offset=wt,a.extra=15&mt,a.mode=st;case st:if(a.extra){for(Bt=a.extra;u>>=a.extra,u-=a.extra,a.back+=a.extra}if(a.offset>a.dmax){t.msg="invalid distance too far back",a.mode=_t;break}a.mode=ot;case ot:if(0===h)break t;if(g=b-h,a.offset>g){if(g=a.offset-g,g>a.whave&&a.sane){t.msg="invalid distance too far back",a.mode=_t;break}g>a.wnext?(g-=a.wnext,m=a.wsize-g):m=a.wnext-g,g>a.length&&(g=a.length),bt=a.window}else bt=r,m=o-a.offset,g=a.length;g>h&&(g=h),h-=g,a.length-=g;do r[o++]=bt[m++];while(--g);0===a.length&&(a.mode=it);break;case lt:if(0===h)break t;r[o++]=a.length,h--,a.mode=it;break;case ht:if(a.wrap){for(;u<32;){if(0===l)break t;l--,_|=n[s++]<=1&&0===j[N];N--);if(O>N&&(O=N),0===N)return b[g++]=20971520,b[g++]=20971520,w.bits=1,0;for(C=1;C0&&(t===o||1!==N))return-1;for(K[1]=0,Z=1;Zr||t===h&&T>s)return 1;for(var Y=0;;){Y++,B=Z-I,m[R]z?(S=M[P+m[R]],E=L[H+m[R]]):(S=96,E=0),p=1<>I)+v]=B<<24|S<<16|E|0;while(0!==v);for(p=1<>=1;if(0!==p?(F&=p-1,F+=p):F=0,R++,0===--j[Z]){if(Z===N)break;Z=e[a+m[R]]}if(Z>O&&(F&y)!==k){for(0===I&&(I=O),x+=C,D=Z-I,U=1<r||t===h&&T>s)return 1;k=F&y,b[k]=O<<24|D<<16|x-g|0}}return 0!==F&&(b[x+F]=Z-I<<24|64<<16|0),w.bits=O,0}},{"../utils/common":3}],13:[function(t,e,a){"use strict";e.exports={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"}},{}],14:[function(t,e,a){"use strict";function i(t){for(var e=t.length;--e>=0;)t[e]=0}function n(t,e,a,i,n){this.static_tree=t,this.extra_bits=e,this.extra_base=a,this.elems=i,this.max_length=n,this.has_stree=t&&t.length}function r(t,e){this.dyn_tree=t,this.max_code=0,this.stat_desc=e}function s(t){return t<256?lt[t]:lt[256+(t>>>7)]}function o(t,e){t.pending_buf[t.pending++]=255&e,t.pending_buf[t.pending++]=e>>>8&255}function l(t,e,a){t.bi_valid>W-a?(t.bi_buf|=e<>W-t.bi_valid,t.bi_valid+=a-W):(t.bi_buf|=e<>>=1,a<<=1;while(--e>0);return a>>>1}function f(t){16===t.bi_valid?(o(t,t.bi_buf),t.bi_buf=0,t.bi_valid=0):t.bi_valid>=8&&(t.pending_buf[t.pending++]=255&t.bi_buf,t.bi_buf>>=8,t.bi_valid-=8)}function _(t,e){var a,i,n,r,s,o,l=e.dyn_tree,h=e.max_code,d=e.stat_desc.static_tree,f=e.stat_desc.has_stree,_=e.stat_desc.extra_bits,u=e.stat_desc.extra_base,c=e.stat_desc.max_length,b=0;for(r=0;r<=X;r++)t.bl_count[r]=0;for(l[2*t.heap[t.heap_max]+1]=0,a=t.heap_max+1;ac&&(r=c,b++),l[2*i+1]=r,i>h||(t.bl_count[r]++,s=0,i>=u&&(s=_[i-u]),o=l[2*i],t.opt_len+=o*(r+s),f&&(t.static_len+=o*(d[2*i+1]+s)));if(0!==b){do{for(r=c-1;0===t.bl_count[r];)r--;t.bl_count[r]--,t.bl_count[r+1]+=2,t.bl_count[c]--,b-=2}while(b>0);for(r=c;0!==r;r--)for(i=t.bl_count[r];0!==i;)n=t.heap[--a],n>h||(l[2*n+1]!==r&&(t.opt_len+=(r-l[2*n+1])*l[2*n],l[2*n+1]=r),i--)}}function u(t,e,a){var i,n,r=new Array(X+1),s=0;for(i=1;i<=X;i++)r[i]=s=s+a[i-1]<<1;for(n=0;n<=e;n++){var o=t[2*n+1];0!==o&&(t[2*n]=d(r[o]++,o))}}function c(){var t,e,a,i,r,s=new Array(X+1);for(a=0,i=0;i>=7;i8?o(t,t.bi_buf):t.bi_valid>0&&(t.pending_buf[t.pending++]=t.bi_buf),t.bi_buf=0,t.bi_valid=0}function m(t,e,a,i){g(t),i&&(o(t,a),o(t,~a)),N.arraySet(t.pending_buf,t.window,e,a,t.pending),t.pending+=a}function w(t,e,a,i){var n=2*e,r=2*a;return t[n]>1;a>=1;a--)p(t,r,a);n=l;do a=t.heap[1],t.heap[1]=t.heap[t.heap_len--],p(t,r,1),i=t.heap[1],t.heap[--t.heap_max]=a,t.heap[--t.heap_max]=i,r[2*n]=r[2*a]+r[2*i],t.depth[n]=(t.depth[a]>=t.depth[i]?t.depth[a]:t.depth[i])+1,r[2*a+1]=r[2*i+1]=n,t.heap[1]=n++,p(t,r,1);while(t.heap_len>=2);t.heap[--t.heap_max]=t.heap[1],_(t,e),u(r,h,t.bl_count)}function y(t,e,a){var i,n,r=-1,s=e[1],o=0,l=7,h=4;for(0===s&&(l=138,h=3),e[2*(a+1)+1]=65535,i=0;i<=a;i++)n=s,s=e[2*(i+1)+1],++o=3&&0===t.bl_tree[2*nt[e]+1];e--);return t.opt_len+=3*(e+1)+5+5+4,e}function B(t,e,a,i){var n;for(l(t,e-257,5),l(t,a-1,5),l(t,i-4,4),n=0;n>>=1)if(1&a&&0!==t.dyn_ltree[2*e])return D;if(0!==t.dyn_ltree[18]||0!==t.dyn_ltree[20]||0!==t.dyn_ltree[26])return I;for(e=32;e0?(t.strm.data_type===U&&(t.strm.data_type=S(t)),k(t,t.l_desc),k(t,t.d_desc),s=z(t),n=t.opt_len+3+7>>>3,r=t.static_len+3+7>>>3,r<=n&&(n=r)):n=r=a+5,a+4<=n&&e!==-1?A(t,e,a,i):t.strategy===O||r===n?(l(t,(F<<1)+(i?1:0),3),v(t,st,ot)):(l(t,(L<<1)+(i?1:0),3),B(t,t.l_desc.max_code+1,t.d_desc.max_code+1,s+1),v(t,t.dyn_ltree,t.dyn_dtree)),b(t),i&&g(t)}function C(t,e,a){return t.pending_buf[t.d_buf+2*t.last_lit]=e>>>8&255,t.pending_buf[t.d_buf+2*t.last_lit+1]=255&e,t.pending_buf[t.l_buf+t.last_lit]=255&a,t.last_lit++,0===e?t.dyn_ltree[2*a]++:(t.matches++,e--,t.dyn_ltree[2*(ht[a]+M+1)]++,t.dyn_dtree[2*s(e)]++),t.last_lit===t.lit_bufsize-1}var N=t("../utils/common"),O=4,D=0,I=1,U=2,T=0,F=1,L=2,H=3,j=258,K=29,M=256,P=M+1+K,Y=30,q=19,G=2*P+1,X=15,W=16,J=7,Q=256,V=16,$=17,tt=18,et=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],at=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],it=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],nt=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],rt=512,st=new Array(2*(P+2));i(st);var ot=new Array(2*Y);i(ot);var lt=new Array(rt);i(lt);var ht=new Array(j-H+1);i(ht);var dt=new Array(K);i(dt);var ft=new Array(Y);i(ft);var _t,ut,ct,bt=!1;a._tr_init=E,a._tr_stored_block=A,a._tr_flush_block=R,a._tr_tally=C,a._tr_align=Z},{"../utils/common":3}],15:[function(t,e,a){"use strict";function i(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}e.exports=i},{}],"/":[function(t,e,a){"use strict";var i=t("./lib/utils/common").assign,n=t("./lib/deflate"),r=t("./lib/inflate"),s=t("./lib/zlib/constants"),o={};i(o,n,r,s),e.exports=o},{"./lib/deflate":1,"./lib/inflate":2,"./lib/utils/common":3,"./lib/zlib/constants":6}]},{},[])("/")}); diff --git a/node_modules/pako/dist/pako_deflate.js b/node_modules/pako/dist/pako_deflate.js deleted file mode 100644 index a5f95720..00000000 --- a/node_modules/pako/dist/pako_deflate.js +++ /dev/null @@ -1,3879 +0,0 @@ -/* pako 0.2.9 nodeca/pako */(function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.pako = f()}})(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o= 252 ? 6 : q >= 248 ? 5 : q >= 240 ? 4 : q >= 224 ? 3 : q >= 192 ? 2 : 1); -} -_utf8len[254] = _utf8len[254] = 1; // Invalid sequence start - - -// convert string to array (typed, when possible) -exports.string2buf = function (str) { - var buf, c, c2, m_pos, i, str_len = str.length, buf_len = 0; - - // count binary size - for (m_pos = 0; m_pos < str_len; m_pos++) { - c = str.charCodeAt(m_pos); - if ((c & 0xfc00) === 0xd800 && (m_pos + 1 < str_len)) { - c2 = str.charCodeAt(m_pos + 1); - if ((c2 & 0xfc00) === 0xdc00) { - c = 0x10000 + ((c - 0xd800) << 10) + (c2 - 0xdc00); - m_pos++; - } - } - buf_len += c < 0x80 ? 1 : c < 0x800 ? 2 : c < 0x10000 ? 3 : 4; - } - - // allocate buffer - buf = new utils.Buf8(buf_len); - - // convert - for (i = 0, m_pos = 0; i < buf_len; m_pos++) { - c = str.charCodeAt(m_pos); - if ((c & 0xfc00) === 0xd800 && (m_pos + 1 < str_len)) { - c2 = str.charCodeAt(m_pos + 1); - if ((c2 & 0xfc00) === 0xdc00) { - c = 0x10000 + ((c - 0xd800) << 10) + (c2 - 0xdc00); - m_pos++; - } - } - if (c < 0x80) { - /* one byte */ - buf[i++] = c; - } else if (c < 0x800) { - /* two bytes */ - buf[i++] = 0xC0 | (c >>> 6); - buf[i++] = 0x80 | (c & 0x3f); - } else if (c < 0x10000) { - /* three bytes */ - buf[i++] = 0xE0 | (c >>> 12); - buf[i++] = 0x80 | (c >>> 6 & 0x3f); - buf[i++] = 0x80 | (c & 0x3f); - } else { - /* four bytes */ - buf[i++] = 0xf0 | (c >>> 18); - buf[i++] = 0x80 | (c >>> 12 & 0x3f); - buf[i++] = 0x80 | (c >>> 6 & 0x3f); - buf[i++] = 0x80 | (c & 0x3f); - } - } - - return buf; -}; - -// Helper (used in 2 places) -function buf2binstring(buf, len) { - // use fallback for big arrays to avoid stack overflow - if (len < 65537) { - if ((buf.subarray && STR_APPLY_UIA_OK) || (!buf.subarray && STR_APPLY_OK)) { - return String.fromCharCode.apply(null, utils.shrinkBuf(buf, len)); - } - } - - var result = ''; - for (var i = 0; i < len; i++) { - result += String.fromCharCode(buf[i]); - } - return result; -} - - -// Convert byte array to binary string -exports.buf2binstring = function (buf) { - return buf2binstring(buf, buf.length); -}; - - -// Convert binary string (typed, when possible) -exports.binstring2buf = function (str) { - var buf = new utils.Buf8(str.length); - for (var i = 0, len = buf.length; i < len; i++) { - buf[i] = str.charCodeAt(i); - } - return buf; -}; - - -// convert array to string -exports.buf2string = function (buf, max) { - var i, out, c, c_len; - var len = max || buf.length; - - // Reserve max possible length (2 words per char) - // NB: by unknown reasons, Array is significantly faster for - // String.fromCharCode.apply than Uint16Array. - var utf16buf = new Array(len * 2); - - for (out = 0, i = 0; i < len;) { - c = buf[i++]; - // quick process ascii - if (c < 0x80) { utf16buf[out++] = c; continue; } - - c_len = _utf8len[c]; - // skip 5 & 6 byte codes - if (c_len > 4) { utf16buf[out++] = 0xfffd; i += c_len - 1; continue; } - - // apply mask on first byte - c &= c_len === 2 ? 0x1f : c_len === 3 ? 0x0f : 0x07; - // join the rest - while (c_len > 1 && i < len) { - c = (c << 6) | (buf[i++] & 0x3f); - c_len--; - } - - // terminated by end of string? - if (c_len > 1) { utf16buf[out++] = 0xfffd; continue; } - - if (c < 0x10000) { - utf16buf[out++] = c; - } else { - c -= 0x10000; - utf16buf[out++] = 0xd800 | ((c >> 10) & 0x3ff); - utf16buf[out++] = 0xdc00 | (c & 0x3ff); - } - } - - return buf2binstring(utf16buf, out); -}; - - -// Calculate max possible position in utf8 buffer, -// that will not break sequence. If that's not possible -// - (very small limits) return max size as is. -// -// buf[] - utf8 bytes array -// max - length limit (mandatory); -exports.utf8border = function (buf, max) { - var pos; - - max = max || buf.length; - if (max > buf.length) { max = buf.length; } - - // go back from last position, until start of sequence found - pos = max - 1; - while (pos >= 0 && (buf[pos] & 0xC0) === 0x80) { pos--; } - - // Fuckup - very small and broken sequence, - // return max, because we should return something anyway. - if (pos < 0) { return max; } - - // If we came to start of buffer - that means vuffer is too small, - // return max too. - if (pos === 0) { return max; } - - return (pos + _utf8len[buf[pos]] > max) ? pos : max; -}; - -},{"./common":1}],3:[function(require,module,exports){ -'use strict'; - -// Note: adler32 takes 12% for level 0 and 2% for level 6. -// It doesn't worth to make additional optimizationa as in original. -// Small size is preferable. - -function adler32(adler, buf, len, pos) { - var s1 = (adler & 0xffff) |0, - s2 = ((adler >>> 16) & 0xffff) |0, - n = 0; - - while (len !== 0) { - // Set limit ~ twice less than 5552, to keep - // s2 in 31-bits, because we force signed ints. - // in other case %= will fail. - n = len > 2000 ? 2000 : len; - len -= n; - - do { - s1 = (s1 + buf[pos++]) |0; - s2 = (s2 + s1) |0; - } while (--n); - - s1 %= 65521; - s2 %= 65521; - } - - return (s1 | (s2 << 16)) |0; -} - - -module.exports = adler32; - -},{}],4:[function(require,module,exports){ -'use strict'; - -// Note: we can't get significant speed boost here. -// So write code to minimize size - no pregenerated tables -// and array tools dependencies. - - -// Use ordinary array, since untyped makes no boost here -function makeTable() { - var c, table = []; - - for (var n = 0; n < 256; n++) { - c = n; - for (var k = 0; k < 8; k++) { - c = ((c & 1) ? (0xEDB88320 ^ (c >>> 1)) : (c >>> 1)); - } - table[n] = c; - } - - return table; -} - -// Create table on load. Just 255 signed longs. Not a problem. -var crcTable = makeTable(); - - -function crc32(crc, buf, len, pos) { - var t = crcTable, - end = pos + len; - - crc ^= -1; - - for (var i = pos; i < end; i++) { - crc = (crc >>> 8) ^ t[(crc ^ buf[i]) & 0xFF]; - } - - return (crc ^ (-1)); // >>> 0; -} - - -module.exports = crc32; - -},{}],5:[function(require,module,exports){ -'use strict'; - -var utils = require('../utils/common'); -var trees = require('./trees'); -var adler32 = require('./adler32'); -var crc32 = require('./crc32'); -var msg = require('./messages'); - -/* Public constants ==========================================================*/ -/* ===========================================================================*/ - - -/* Allowed flush values; see deflate() and inflate() below for details */ -var Z_NO_FLUSH = 0; -var Z_PARTIAL_FLUSH = 1; -//var Z_SYNC_FLUSH = 2; -var Z_FULL_FLUSH = 3; -var Z_FINISH = 4; -var Z_BLOCK = 5; -//var Z_TREES = 6; - - -/* Return codes for the compression/decompression functions. Negative values - * are errors, positive values are used for special but normal events. - */ -var Z_OK = 0; -var Z_STREAM_END = 1; -//var Z_NEED_DICT = 2; -//var Z_ERRNO = -1; -var Z_STREAM_ERROR = -2; -var Z_DATA_ERROR = -3; -//var Z_MEM_ERROR = -4; -var Z_BUF_ERROR = -5; -//var Z_VERSION_ERROR = -6; - - -/* compression levels */ -//var Z_NO_COMPRESSION = 0; -//var Z_BEST_SPEED = 1; -//var Z_BEST_COMPRESSION = 9; -var Z_DEFAULT_COMPRESSION = -1; - - -var Z_FILTERED = 1; -var Z_HUFFMAN_ONLY = 2; -var Z_RLE = 3; -var Z_FIXED = 4; -var Z_DEFAULT_STRATEGY = 0; - -/* Possible values of the data_type field (though see inflate()) */ -//var Z_BINARY = 0; -//var Z_TEXT = 1; -//var Z_ASCII = 1; // = Z_TEXT -var Z_UNKNOWN = 2; - - -/* The deflate compression method */ -var Z_DEFLATED = 8; - -/*============================================================================*/ - - -var MAX_MEM_LEVEL = 9; -/* Maximum value for memLevel in deflateInit2 */ -var MAX_WBITS = 15; -/* 32K LZ77 window */ -var DEF_MEM_LEVEL = 8; - - -var LENGTH_CODES = 29; -/* number of length codes, not counting the special END_BLOCK code */ -var LITERALS = 256; -/* number of literal bytes 0..255 */ -var L_CODES = LITERALS + 1 + LENGTH_CODES; -/* number of Literal or Length codes, including the END_BLOCK code */ -var D_CODES = 30; -/* number of distance codes */ -var BL_CODES = 19; -/* number of codes used to transfer the bit lengths */ -var HEAP_SIZE = 2 * L_CODES + 1; -/* maximum heap size */ -var MAX_BITS = 15; -/* All codes must not exceed MAX_BITS bits */ - -var MIN_MATCH = 3; -var MAX_MATCH = 258; -var MIN_LOOKAHEAD = (MAX_MATCH + MIN_MATCH + 1); - -var PRESET_DICT = 0x20; - -var INIT_STATE = 42; -var EXTRA_STATE = 69; -var NAME_STATE = 73; -var COMMENT_STATE = 91; -var HCRC_STATE = 103; -var BUSY_STATE = 113; -var FINISH_STATE = 666; - -var BS_NEED_MORE = 1; /* block not completed, need more input or more output */ -var BS_BLOCK_DONE = 2; /* block flush performed */ -var BS_FINISH_STARTED = 3; /* finish started, need only more output at next deflate */ -var BS_FINISH_DONE = 4; /* finish done, accept no more input or output */ - -var OS_CODE = 0x03; // Unix :) . Don't detect, use this default. - -function err(strm, errorCode) { - strm.msg = msg[errorCode]; - return errorCode; -} - -function rank(f) { - return ((f) << 1) - ((f) > 4 ? 9 : 0); -} - -function zero(buf) { var len = buf.length; while (--len >= 0) { buf[len] = 0; } } - - -/* ========================================================================= - * Flush as much pending output as possible. All deflate() output goes - * through this function so some applications may wish to modify it - * to avoid allocating a large strm->output buffer and copying into it. - * (See also read_buf()). - */ -function flush_pending(strm) { - var s = strm.state; - - //_tr_flush_bits(s); - var len = s.pending; - if (len > strm.avail_out) { - len = strm.avail_out; - } - if (len === 0) { return; } - - utils.arraySet(strm.output, s.pending_buf, s.pending_out, len, strm.next_out); - strm.next_out += len; - s.pending_out += len; - strm.total_out += len; - strm.avail_out -= len; - s.pending -= len; - if (s.pending === 0) { - s.pending_out = 0; - } -} - - -function flush_block_only(s, last) { - trees._tr_flush_block(s, (s.block_start >= 0 ? s.block_start : -1), s.strstart - s.block_start, last); - s.block_start = s.strstart; - flush_pending(s.strm); -} - - -function put_byte(s, b) { - s.pending_buf[s.pending++] = b; -} - - -/* ========================================================================= - * Put a short in the pending buffer. The 16-bit value is put in MSB order. - * IN assertion: the stream state is correct and there is enough room in - * pending_buf. - */ -function putShortMSB(s, b) { -// put_byte(s, (Byte)(b >> 8)); -// put_byte(s, (Byte)(b & 0xff)); - s.pending_buf[s.pending++] = (b >>> 8) & 0xff; - s.pending_buf[s.pending++] = b & 0xff; -} - - -/* =========================================================================== - * Read a new buffer from the current input stream, update the adler32 - * and total number of bytes read. All deflate() input goes through - * this function so some applications may wish to modify it to avoid - * allocating a large strm->input buffer and copying from it. - * (See also flush_pending()). - */ -function read_buf(strm, buf, start, size) { - var len = strm.avail_in; - - if (len > size) { len = size; } - if (len === 0) { return 0; } - - strm.avail_in -= len; - - // zmemcpy(buf, strm->next_in, len); - utils.arraySet(buf, strm.input, strm.next_in, len, start); - if (strm.state.wrap === 1) { - strm.adler = adler32(strm.adler, buf, len, start); - } - - else if (strm.state.wrap === 2) { - strm.adler = crc32(strm.adler, buf, len, start); - } - - strm.next_in += len; - strm.total_in += len; - - return len; -} - - -/* =========================================================================== - * Set match_start to the longest match starting at the given string and - * return its length. Matches shorter or equal to prev_length are discarded, - * in which case the result is equal to prev_length and match_start is - * garbage. - * IN assertions: cur_match is the head of the hash chain for the current - * string (strstart) and its distance is <= MAX_DIST, and prev_length >= 1 - * OUT assertion: the match length is not greater than s->lookahead. - */ -function longest_match(s, cur_match) { - var chain_length = s.max_chain_length; /* max hash chain length */ - var scan = s.strstart; /* current string */ - var match; /* matched string */ - var len; /* length of current match */ - var best_len = s.prev_length; /* best match length so far */ - var nice_match = s.nice_match; /* stop if match long enough */ - var limit = (s.strstart > (s.w_size - MIN_LOOKAHEAD)) ? - s.strstart - (s.w_size - MIN_LOOKAHEAD) : 0/*NIL*/; - - var _win = s.window; // shortcut - - var wmask = s.w_mask; - var prev = s.prev; - - /* Stop when cur_match becomes <= limit. To simplify the code, - * we prevent matches with the string of window index 0. - */ - - var strend = s.strstart + MAX_MATCH; - var scan_end1 = _win[scan + best_len - 1]; - var scan_end = _win[scan + best_len]; - - /* The code is optimized for HASH_BITS >= 8 and MAX_MATCH-2 multiple of 16. - * It is easy to get rid of this optimization if necessary. - */ - // Assert(s->hash_bits >= 8 && MAX_MATCH == 258, "Code too clever"); - - /* Do not waste too much time if we already have a good match: */ - if (s.prev_length >= s.good_match) { - chain_length >>= 2; - } - /* Do not look for matches beyond the end of the input. This is necessary - * to make deflate deterministic. - */ - if (nice_match > s.lookahead) { nice_match = s.lookahead; } - - // Assert((ulg)s->strstart <= s->window_size-MIN_LOOKAHEAD, "need lookahead"); - - do { - // Assert(cur_match < s->strstart, "no future"); - match = cur_match; - - /* Skip to next match if the match length cannot increase - * or if the match length is less than 2. Note that the checks below - * for insufficient lookahead only occur occasionally for performance - * reasons. Therefore uninitialized memory will be accessed, and - * conditional jumps will be made that depend on those values. - * However the length of the match is limited to the lookahead, so - * the output of deflate is not affected by the uninitialized values. - */ - - if (_win[match + best_len] !== scan_end || - _win[match + best_len - 1] !== scan_end1 || - _win[match] !== _win[scan] || - _win[++match] !== _win[scan + 1]) { - continue; - } - - /* The check at best_len-1 can be removed because it will be made - * again later. (This heuristic is not always a win.) - * It is not necessary to compare scan[2] and match[2] since they - * are always equal when the other bytes match, given that - * the hash keys are equal and that HASH_BITS >= 8. - */ - scan += 2; - match++; - // Assert(*scan == *match, "match[2]?"); - - /* We check for insufficient lookahead only every 8th comparison; - * the 256th check will be made at strstart+258. - */ - do { - /*jshint noempty:false*/ - } while (_win[++scan] === _win[++match] && _win[++scan] === _win[++match] && - _win[++scan] === _win[++match] && _win[++scan] === _win[++match] && - _win[++scan] === _win[++match] && _win[++scan] === _win[++match] && - _win[++scan] === _win[++match] && _win[++scan] === _win[++match] && - scan < strend); - - // Assert(scan <= s->window+(unsigned)(s->window_size-1), "wild scan"); - - len = MAX_MATCH - (strend - scan); - scan = strend - MAX_MATCH; - - if (len > best_len) { - s.match_start = cur_match; - best_len = len; - if (len >= nice_match) { - break; - } - scan_end1 = _win[scan + best_len - 1]; - scan_end = _win[scan + best_len]; - } - } while ((cur_match = prev[cur_match & wmask]) > limit && --chain_length !== 0); - - if (best_len <= s.lookahead) { - return best_len; - } - return s.lookahead; -} - - -/* =========================================================================== - * Fill the window when the lookahead becomes insufficient. - * Updates strstart and lookahead. - * - * IN assertion: lookahead < MIN_LOOKAHEAD - * OUT assertions: strstart <= window_size-MIN_LOOKAHEAD - * At least one byte has been read, or avail_in == 0; reads are - * performed for at least two bytes (required for the zip translate_eol - * option -- not supported here). - */ -function fill_window(s) { - var _w_size = s.w_size; - var p, n, m, more, str; - - //Assert(s->lookahead < MIN_LOOKAHEAD, "already enough lookahead"); - - do { - more = s.window_size - s.lookahead - s.strstart; - - // JS ints have 32 bit, block below not needed - /* Deal with !@#$% 64K limit: */ - //if (sizeof(int) <= 2) { - // if (more == 0 && s->strstart == 0 && s->lookahead == 0) { - // more = wsize; - // - // } else if (more == (unsigned)(-1)) { - // /* Very unlikely, but possible on 16 bit machine if - // * strstart == 0 && lookahead == 1 (input done a byte at time) - // */ - // more--; - // } - //} - - - /* If the window is almost full and there is insufficient lookahead, - * move the upper half to the lower one to make room in the upper half. - */ - if (s.strstart >= _w_size + (_w_size - MIN_LOOKAHEAD)) { - - utils.arraySet(s.window, s.window, _w_size, _w_size, 0); - s.match_start -= _w_size; - s.strstart -= _w_size; - /* we now have strstart >= MAX_DIST */ - s.block_start -= _w_size; - - /* Slide the hash table (could be avoided with 32 bit values - at the expense of memory usage). We slide even when level == 0 - to keep the hash table consistent if we switch back to level > 0 - later. (Using level 0 permanently is not an optimal usage of - zlib, so we don't care about this pathological case.) - */ - - n = s.hash_size; - p = n; - do { - m = s.head[--p]; - s.head[p] = (m >= _w_size ? m - _w_size : 0); - } while (--n); - - n = _w_size; - p = n; - do { - m = s.prev[--p]; - s.prev[p] = (m >= _w_size ? m - _w_size : 0); - /* If n is not on any hash chain, prev[n] is garbage but - * its value will never be used. - */ - } while (--n); - - more += _w_size; - } - if (s.strm.avail_in === 0) { - break; - } - - /* If there was no sliding: - * strstart <= WSIZE+MAX_DIST-1 && lookahead <= MIN_LOOKAHEAD - 1 && - * more == window_size - lookahead - strstart - * => more >= window_size - (MIN_LOOKAHEAD-1 + WSIZE + MAX_DIST-1) - * => more >= window_size - 2*WSIZE + 2 - * In the BIG_MEM or MMAP case (not yet supported), - * window_size == input_size + MIN_LOOKAHEAD && - * strstart + s->lookahead <= input_size => more >= MIN_LOOKAHEAD. - * Otherwise, window_size == 2*WSIZE so more >= 2. - * If there was sliding, more >= WSIZE. So in all cases, more >= 2. - */ - //Assert(more >= 2, "more < 2"); - n = read_buf(s.strm, s.window, s.strstart + s.lookahead, more); - s.lookahead += n; - - /* Initialize the hash value now that we have some input: */ - if (s.lookahead + s.insert >= MIN_MATCH) { - str = s.strstart - s.insert; - s.ins_h = s.window[str]; - - /* UPDATE_HASH(s, s->ins_h, s->window[str + 1]); */ - s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[str + 1]) & s.hash_mask; -//#if MIN_MATCH != 3 -// Call update_hash() MIN_MATCH-3 more times -//#endif - while (s.insert) { - /* UPDATE_HASH(s, s->ins_h, s->window[str + MIN_MATCH-1]); */ - s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[str + MIN_MATCH - 1]) & s.hash_mask; - - s.prev[str & s.w_mask] = s.head[s.ins_h]; - s.head[s.ins_h] = str; - str++; - s.insert--; - if (s.lookahead + s.insert < MIN_MATCH) { - break; - } - } - } - /* If the whole input has less than MIN_MATCH bytes, ins_h is garbage, - * but this is not important since only literal bytes will be emitted. - */ - - } while (s.lookahead < MIN_LOOKAHEAD && s.strm.avail_in !== 0); - - /* If the WIN_INIT bytes after the end of the current data have never been - * written, then zero those bytes in order to avoid memory check reports of - * the use of uninitialized (or uninitialised as Julian writes) bytes by - * the longest match routines. Update the high water mark for the next - * time through here. WIN_INIT is set to MAX_MATCH since the longest match - * routines allow scanning to strstart + MAX_MATCH, ignoring lookahead. - */ -// if (s.high_water < s.window_size) { -// var curr = s.strstart + s.lookahead; -// var init = 0; -// -// if (s.high_water < curr) { -// /* Previous high water mark below current data -- zero WIN_INIT -// * bytes or up to end of window, whichever is less. -// */ -// init = s.window_size - curr; -// if (init > WIN_INIT) -// init = WIN_INIT; -// zmemzero(s->window + curr, (unsigned)init); -// s->high_water = curr + init; -// } -// else if (s->high_water < (ulg)curr + WIN_INIT) { -// /* High water mark at or above current data, but below current data -// * plus WIN_INIT -- zero out to current data plus WIN_INIT, or up -// * to end of window, whichever is less. -// */ -// init = (ulg)curr + WIN_INIT - s->high_water; -// if (init > s->window_size - s->high_water) -// init = s->window_size - s->high_water; -// zmemzero(s->window + s->high_water, (unsigned)init); -// s->high_water += init; -// } -// } -// -// Assert((ulg)s->strstart <= s->window_size - MIN_LOOKAHEAD, -// "not enough room for search"); -} - -/* =========================================================================== - * Copy without compression as much as possible from the input stream, return - * the current block state. - * This function does not insert new strings in the dictionary since - * uncompressible data is probably not useful. This function is used - * only for the level=0 compression option. - * NOTE: this function should be optimized to avoid extra copying from - * window to pending_buf. - */ -function deflate_stored(s, flush) { - /* Stored blocks are limited to 0xffff bytes, pending_buf is limited - * to pending_buf_size, and each stored block has a 5 byte header: - */ - var max_block_size = 0xffff; - - if (max_block_size > s.pending_buf_size - 5) { - max_block_size = s.pending_buf_size - 5; - } - - /* Copy as much as possible from input to output: */ - for (;;) { - /* Fill the window as much as possible: */ - if (s.lookahead <= 1) { - - //Assert(s->strstart < s->w_size+MAX_DIST(s) || - // s->block_start >= (long)s->w_size, "slide too late"); -// if (!(s.strstart < s.w_size + (s.w_size - MIN_LOOKAHEAD) || -// s.block_start >= s.w_size)) { -// throw new Error("slide too late"); -// } - - fill_window(s); - if (s.lookahead === 0 && flush === Z_NO_FLUSH) { - return BS_NEED_MORE; - } - - if (s.lookahead === 0) { - break; - } - /* flush the current block */ - } - //Assert(s->block_start >= 0L, "block gone"); -// if (s.block_start < 0) throw new Error("block gone"); - - s.strstart += s.lookahead; - s.lookahead = 0; - - /* Emit a stored block if pending_buf will be full: */ - var max_start = s.block_start + max_block_size; - - if (s.strstart === 0 || s.strstart >= max_start) { - /* strstart == 0 is possible when wraparound on 16-bit machine */ - s.lookahead = s.strstart - max_start; - s.strstart = max_start; - /*** FLUSH_BLOCK(s, 0); ***/ - flush_block_only(s, false); - if (s.strm.avail_out === 0) { - return BS_NEED_MORE; - } - /***/ - - - } - /* Flush if we may have to slide, otherwise block_start may become - * negative and the data will be gone: - */ - if (s.strstart - s.block_start >= (s.w_size - MIN_LOOKAHEAD)) { - /*** FLUSH_BLOCK(s, 0); ***/ - flush_block_only(s, false); - if (s.strm.avail_out === 0) { - return BS_NEED_MORE; - } - /***/ - } - } - - s.insert = 0; - - if (flush === Z_FINISH) { - /*** FLUSH_BLOCK(s, 1); ***/ - flush_block_only(s, true); - if (s.strm.avail_out === 0) { - return BS_FINISH_STARTED; - } - /***/ - return BS_FINISH_DONE; - } - - if (s.strstart > s.block_start) { - /*** FLUSH_BLOCK(s, 0); ***/ - flush_block_only(s, false); - if (s.strm.avail_out === 0) { - return BS_NEED_MORE; - } - /***/ - } - - return BS_NEED_MORE; -} - -/* =========================================================================== - * Compress as much as possible from the input stream, return the current - * block state. - * This function does not perform lazy evaluation of matches and inserts - * new strings in the dictionary only for unmatched strings or for short - * matches. It is used only for the fast compression options. - */ -function deflate_fast(s, flush) { - var hash_head; /* head of the hash chain */ - var bflush; /* set if current block must be flushed */ - - for (;;) { - /* Make sure that we always have enough lookahead, except - * at the end of the input file. We need MAX_MATCH bytes - * for the next match, plus MIN_MATCH bytes to insert the - * string following the next match. - */ - if (s.lookahead < MIN_LOOKAHEAD) { - fill_window(s); - if (s.lookahead < MIN_LOOKAHEAD && flush === Z_NO_FLUSH) { - return BS_NEED_MORE; - } - if (s.lookahead === 0) { - break; /* flush the current block */ - } - } - - /* Insert the string window[strstart .. strstart+2] in the - * dictionary, and set hash_head to the head of the hash chain: - */ - hash_head = 0/*NIL*/; - if (s.lookahead >= MIN_MATCH) { - /*** INSERT_STRING(s, s.strstart, hash_head); ***/ - s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[s.strstart + MIN_MATCH - 1]) & s.hash_mask; - hash_head = s.prev[s.strstart & s.w_mask] = s.head[s.ins_h]; - s.head[s.ins_h] = s.strstart; - /***/ - } - - /* Find the longest match, discarding those <= prev_length. - * At this point we have always match_length < MIN_MATCH - */ - if (hash_head !== 0/*NIL*/ && ((s.strstart - hash_head) <= (s.w_size - MIN_LOOKAHEAD))) { - /* To simplify the code, we prevent matches with the string - * of window index 0 (in particular we have to avoid a match - * of the string with itself at the start of the input file). - */ - s.match_length = longest_match(s, hash_head); - /* longest_match() sets match_start */ - } - if (s.match_length >= MIN_MATCH) { - // check_match(s, s.strstart, s.match_start, s.match_length); // for debug only - - /*** _tr_tally_dist(s, s.strstart - s.match_start, - s.match_length - MIN_MATCH, bflush); ***/ - bflush = trees._tr_tally(s, s.strstart - s.match_start, s.match_length - MIN_MATCH); - - s.lookahead -= s.match_length; - - /* Insert new strings in the hash table only if the match length - * is not too large. This saves time but degrades compression. - */ - if (s.match_length <= s.max_lazy_match/*max_insert_length*/ && s.lookahead >= MIN_MATCH) { - s.match_length--; /* string at strstart already in table */ - do { - s.strstart++; - /*** INSERT_STRING(s, s.strstart, hash_head); ***/ - s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[s.strstart + MIN_MATCH - 1]) & s.hash_mask; - hash_head = s.prev[s.strstart & s.w_mask] = s.head[s.ins_h]; - s.head[s.ins_h] = s.strstart; - /***/ - /* strstart never exceeds WSIZE-MAX_MATCH, so there are - * always MIN_MATCH bytes ahead. - */ - } while (--s.match_length !== 0); - s.strstart++; - } else - { - s.strstart += s.match_length; - s.match_length = 0; - s.ins_h = s.window[s.strstart]; - /* UPDATE_HASH(s, s.ins_h, s.window[s.strstart+1]); */ - s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[s.strstart + 1]) & s.hash_mask; - -//#if MIN_MATCH != 3 -// Call UPDATE_HASH() MIN_MATCH-3 more times -//#endif - /* If lookahead < MIN_MATCH, ins_h is garbage, but it does not - * matter since it will be recomputed at next deflate call. - */ - } - } else { - /* No match, output a literal byte */ - //Tracevv((stderr,"%c", s.window[s.strstart])); - /*** _tr_tally_lit(s, s.window[s.strstart], bflush); ***/ - bflush = trees._tr_tally(s, 0, s.window[s.strstart]); - - s.lookahead--; - s.strstart++; - } - if (bflush) { - /*** FLUSH_BLOCK(s, 0); ***/ - flush_block_only(s, false); - if (s.strm.avail_out === 0) { - return BS_NEED_MORE; - } - /***/ - } - } - s.insert = ((s.strstart < (MIN_MATCH - 1)) ? s.strstart : MIN_MATCH - 1); - if (flush === Z_FINISH) { - /*** FLUSH_BLOCK(s, 1); ***/ - flush_block_only(s, true); - if (s.strm.avail_out === 0) { - return BS_FINISH_STARTED; - } - /***/ - return BS_FINISH_DONE; - } - if (s.last_lit) { - /*** FLUSH_BLOCK(s, 0); ***/ - flush_block_only(s, false); - if (s.strm.avail_out === 0) { - return BS_NEED_MORE; - } - /***/ - } - return BS_BLOCK_DONE; -} - -/* =========================================================================== - * Same as above, but achieves better compression. We use a lazy - * evaluation for matches: a match is finally adopted only if there is - * no better match at the next window position. - */ -function deflate_slow(s, flush) { - var hash_head; /* head of hash chain */ - var bflush; /* set if current block must be flushed */ - - var max_insert; - - /* Process the input block. */ - for (;;) { - /* Make sure that we always have enough lookahead, except - * at the end of the input file. We need MAX_MATCH bytes - * for the next match, plus MIN_MATCH bytes to insert the - * string following the next match. - */ - if (s.lookahead < MIN_LOOKAHEAD) { - fill_window(s); - if (s.lookahead < MIN_LOOKAHEAD && flush === Z_NO_FLUSH) { - return BS_NEED_MORE; - } - if (s.lookahead === 0) { break; } /* flush the current block */ - } - - /* Insert the string window[strstart .. strstart+2] in the - * dictionary, and set hash_head to the head of the hash chain: - */ - hash_head = 0/*NIL*/; - if (s.lookahead >= MIN_MATCH) { - /*** INSERT_STRING(s, s.strstart, hash_head); ***/ - s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[s.strstart + MIN_MATCH - 1]) & s.hash_mask; - hash_head = s.prev[s.strstart & s.w_mask] = s.head[s.ins_h]; - s.head[s.ins_h] = s.strstart; - /***/ - } - - /* Find the longest match, discarding those <= prev_length. - */ - s.prev_length = s.match_length; - s.prev_match = s.match_start; - s.match_length = MIN_MATCH - 1; - - if (hash_head !== 0/*NIL*/ && s.prev_length < s.max_lazy_match && - s.strstart - hash_head <= (s.w_size - MIN_LOOKAHEAD)/*MAX_DIST(s)*/) { - /* To simplify the code, we prevent matches with the string - * of window index 0 (in particular we have to avoid a match - * of the string with itself at the start of the input file). - */ - s.match_length = longest_match(s, hash_head); - /* longest_match() sets match_start */ - - if (s.match_length <= 5 && - (s.strategy === Z_FILTERED || (s.match_length === MIN_MATCH && s.strstart - s.match_start > 4096/*TOO_FAR*/))) { - - /* If prev_match is also MIN_MATCH, match_start is garbage - * but we will ignore the current match anyway. - */ - s.match_length = MIN_MATCH - 1; - } - } - /* If there was a match at the previous step and the current - * match is not better, output the previous match: - */ - if (s.prev_length >= MIN_MATCH && s.match_length <= s.prev_length) { - max_insert = s.strstart + s.lookahead - MIN_MATCH; - /* Do not insert strings in hash table beyond this. */ - - //check_match(s, s.strstart-1, s.prev_match, s.prev_length); - - /***_tr_tally_dist(s, s.strstart - 1 - s.prev_match, - s.prev_length - MIN_MATCH, bflush);***/ - bflush = trees._tr_tally(s, s.strstart - 1 - s.prev_match, s.prev_length - MIN_MATCH); - /* Insert in hash table all strings up to the end of the match. - * strstart-1 and strstart are already inserted. If there is not - * enough lookahead, the last two strings are not inserted in - * the hash table. - */ - s.lookahead -= s.prev_length - 1; - s.prev_length -= 2; - do { - if (++s.strstart <= max_insert) { - /*** INSERT_STRING(s, s.strstart, hash_head); ***/ - s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[s.strstart + MIN_MATCH - 1]) & s.hash_mask; - hash_head = s.prev[s.strstart & s.w_mask] = s.head[s.ins_h]; - s.head[s.ins_h] = s.strstart; - /***/ - } - } while (--s.prev_length !== 0); - s.match_available = 0; - s.match_length = MIN_MATCH - 1; - s.strstart++; - - if (bflush) { - /*** FLUSH_BLOCK(s, 0); ***/ - flush_block_only(s, false); - if (s.strm.avail_out === 0) { - return BS_NEED_MORE; - } - /***/ - } - - } else if (s.match_available) { - /* If there was no match at the previous position, output a - * single literal. If there was a match but the current match - * is longer, truncate the previous match to a single literal. - */ - //Tracevv((stderr,"%c", s->window[s->strstart-1])); - /*** _tr_tally_lit(s, s.window[s.strstart-1], bflush); ***/ - bflush = trees._tr_tally(s, 0, s.window[s.strstart - 1]); - - if (bflush) { - /*** FLUSH_BLOCK_ONLY(s, 0) ***/ - flush_block_only(s, false); - /***/ - } - s.strstart++; - s.lookahead--; - if (s.strm.avail_out === 0) { - return BS_NEED_MORE; - } - } else { - /* There is no previous match to compare with, wait for - * the next step to decide. - */ - s.match_available = 1; - s.strstart++; - s.lookahead--; - } - } - //Assert (flush != Z_NO_FLUSH, "no flush?"); - if (s.match_available) { - //Tracevv((stderr,"%c", s->window[s->strstart-1])); - /*** _tr_tally_lit(s, s.window[s.strstart-1], bflush); ***/ - bflush = trees._tr_tally(s, 0, s.window[s.strstart - 1]); - - s.match_available = 0; - } - s.insert = s.strstart < MIN_MATCH - 1 ? s.strstart : MIN_MATCH - 1; - if (flush === Z_FINISH) { - /*** FLUSH_BLOCK(s, 1); ***/ - flush_block_only(s, true); - if (s.strm.avail_out === 0) { - return BS_FINISH_STARTED; - } - /***/ - return BS_FINISH_DONE; - } - if (s.last_lit) { - /*** FLUSH_BLOCK(s, 0); ***/ - flush_block_only(s, false); - if (s.strm.avail_out === 0) { - return BS_NEED_MORE; - } - /***/ - } - - return BS_BLOCK_DONE; -} - - -/* =========================================================================== - * For Z_RLE, simply look for runs of bytes, generate matches only of distance - * one. Do not maintain a hash table. (It will be regenerated if this run of - * deflate switches away from Z_RLE.) - */ -function deflate_rle(s, flush) { - var bflush; /* set if current block must be flushed */ - var prev; /* byte at distance one to match */ - var scan, strend; /* scan goes up to strend for length of run */ - - var _win = s.window; - - for (;;) { - /* Make sure that we always have enough lookahead, except - * at the end of the input file. We need MAX_MATCH bytes - * for the longest run, plus one for the unrolled loop. - */ - if (s.lookahead <= MAX_MATCH) { - fill_window(s); - if (s.lookahead <= MAX_MATCH && flush === Z_NO_FLUSH) { - return BS_NEED_MORE; - } - if (s.lookahead === 0) { break; } /* flush the current block */ - } - - /* See how many times the previous byte repeats */ - s.match_length = 0; - if (s.lookahead >= MIN_MATCH && s.strstart > 0) { - scan = s.strstart - 1; - prev = _win[scan]; - if (prev === _win[++scan] && prev === _win[++scan] && prev === _win[++scan]) { - strend = s.strstart + MAX_MATCH; - do { - /*jshint noempty:false*/ - } while (prev === _win[++scan] && prev === _win[++scan] && - prev === _win[++scan] && prev === _win[++scan] && - prev === _win[++scan] && prev === _win[++scan] && - prev === _win[++scan] && prev === _win[++scan] && - scan < strend); - s.match_length = MAX_MATCH - (strend - scan); - if (s.match_length > s.lookahead) { - s.match_length = s.lookahead; - } - } - //Assert(scan <= s->window+(uInt)(s->window_size-1), "wild scan"); - } - - /* Emit match if have run of MIN_MATCH or longer, else emit literal */ - if (s.match_length >= MIN_MATCH) { - //check_match(s, s.strstart, s.strstart - 1, s.match_length); - - /*** _tr_tally_dist(s, 1, s.match_length - MIN_MATCH, bflush); ***/ - bflush = trees._tr_tally(s, 1, s.match_length - MIN_MATCH); - - s.lookahead -= s.match_length; - s.strstart += s.match_length; - s.match_length = 0; - } else { - /* No match, output a literal byte */ - //Tracevv((stderr,"%c", s->window[s->strstart])); - /*** _tr_tally_lit(s, s.window[s.strstart], bflush); ***/ - bflush = trees._tr_tally(s, 0, s.window[s.strstart]); - - s.lookahead--; - s.strstart++; - } - if (bflush) { - /*** FLUSH_BLOCK(s, 0); ***/ - flush_block_only(s, false); - if (s.strm.avail_out === 0) { - return BS_NEED_MORE; - } - /***/ - } - } - s.insert = 0; - if (flush === Z_FINISH) { - /*** FLUSH_BLOCK(s, 1); ***/ - flush_block_only(s, true); - if (s.strm.avail_out === 0) { - return BS_FINISH_STARTED; - } - /***/ - return BS_FINISH_DONE; - } - if (s.last_lit) { - /*** FLUSH_BLOCK(s, 0); ***/ - flush_block_only(s, false); - if (s.strm.avail_out === 0) { - return BS_NEED_MORE; - } - /***/ - } - return BS_BLOCK_DONE; -} - -/* =========================================================================== - * For Z_HUFFMAN_ONLY, do not look for matches. Do not maintain a hash table. - * (It will be regenerated if this run of deflate switches away from Huffman.) - */ -function deflate_huff(s, flush) { - var bflush; /* set if current block must be flushed */ - - for (;;) { - /* Make sure that we have a literal to write. */ - if (s.lookahead === 0) { - fill_window(s); - if (s.lookahead === 0) { - if (flush === Z_NO_FLUSH) { - return BS_NEED_MORE; - } - break; /* flush the current block */ - } - } - - /* Output a literal byte */ - s.match_length = 0; - //Tracevv((stderr,"%c", s->window[s->strstart])); - /*** _tr_tally_lit(s, s.window[s.strstart], bflush); ***/ - bflush = trees._tr_tally(s, 0, s.window[s.strstart]); - s.lookahead--; - s.strstart++; - if (bflush) { - /*** FLUSH_BLOCK(s, 0); ***/ - flush_block_only(s, false); - if (s.strm.avail_out === 0) { - return BS_NEED_MORE; - } - /***/ - } - } - s.insert = 0; - if (flush === Z_FINISH) { - /*** FLUSH_BLOCK(s, 1); ***/ - flush_block_only(s, true); - if (s.strm.avail_out === 0) { - return BS_FINISH_STARTED; - } - /***/ - return BS_FINISH_DONE; - } - if (s.last_lit) { - /*** FLUSH_BLOCK(s, 0); ***/ - flush_block_only(s, false); - if (s.strm.avail_out === 0) { - return BS_NEED_MORE; - } - /***/ - } - return BS_BLOCK_DONE; -} - -/* Values for max_lazy_match, good_match and max_chain_length, depending on - * the desired pack level (0..9). The values given below have been tuned to - * exclude worst case performance for pathological files. Better values may be - * found for specific files. - */ -function Config(good_length, max_lazy, nice_length, max_chain, func) { - this.good_length = good_length; - this.max_lazy = max_lazy; - this.nice_length = nice_length; - this.max_chain = max_chain; - this.func = func; -} - -var configuration_table; - -configuration_table = [ - /* good lazy nice chain */ - new Config(0, 0, 0, 0, deflate_stored), /* 0 store only */ - new Config(4, 4, 8, 4, deflate_fast), /* 1 max speed, no lazy matches */ - new Config(4, 5, 16, 8, deflate_fast), /* 2 */ - new Config(4, 6, 32, 32, deflate_fast), /* 3 */ - - new Config(4, 4, 16, 16, deflate_slow), /* 4 lazy matches */ - new Config(8, 16, 32, 32, deflate_slow), /* 5 */ - new Config(8, 16, 128, 128, deflate_slow), /* 6 */ - new Config(8, 32, 128, 256, deflate_slow), /* 7 */ - new Config(32, 128, 258, 1024, deflate_slow), /* 8 */ - new Config(32, 258, 258, 4096, deflate_slow) /* 9 max compression */ -]; - - -/* =========================================================================== - * Initialize the "longest match" routines for a new zlib stream - */ -function lm_init(s) { - s.window_size = 2 * s.w_size; - - /*** CLEAR_HASH(s); ***/ - zero(s.head); // Fill with NIL (= 0); - - /* Set the default configuration parameters: - */ - s.max_lazy_match = configuration_table[s.level].max_lazy; - s.good_match = configuration_table[s.level].good_length; - s.nice_match = configuration_table[s.level].nice_length; - s.max_chain_length = configuration_table[s.level].max_chain; - - s.strstart = 0; - s.block_start = 0; - s.lookahead = 0; - s.insert = 0; - s.match_length = s.prev_length = MIN_MATCH - 1; - s.match_available = 0; - s.ins_h = 0; -} - - -function DeflateState() { - this.strm = null; /* pointer back to this zlib stream */ - this.status = 0; /* as the name implies */ - this.pending_buf = null; /* output still pending */ - this.pending_buf_size = 0; /* size of pending_buf */ - this.pending_out = 0; /* next pending byte to output to the stream */ - this.pending = 0; /* nb of bytes in the pending buffer */ - this.wrap = 0; /* bit 0 true for zlib, bit 1 true for gzip */ - this.gzhead = null; /* gzip header information to write */ - this.gzindex = 0; /* where in extra, name, or comment */ - this.method = Z_DEFLATED; /* can only be DEFLATED */ - this.last_flush = -1; /* value of flush param for previous deflate call */ - - this.w_size = 0; /* LZ77 window size (32K by default) */ - this.w_bits = 0; /* log2(w_size) (8..16) */ - this.w_mask = 0; /* w_size - 1 */ - - this.window = null; - /* Sliding window. Input bytes are read into the second half of the window, - * and move to the first half later to keep a dictionary of at least wSize - * bytes. With this organization, matches are limited to a distance of - * wSize-MAX_MATCH bytes, but this ensures that IO is always - * performed with a length multiple of the block size. - */ - - this.window_size = 0; - /* Actual size of window: 2*wSize, except when the user input buffer - * is directly used as sliding window. - */ - - this.prev = null; - /* Link to older string with same hash index. To limit the size of this - * array to 64K, this link is maintained only for the last 32K strings. - * An index in this array is thus a window index modulo 32K. - */ - - this.head = null; /* Heads of the hash chains or NIL. */ - - this.ins_h = 0; /* hash index of string to be inserted */ - this.hash_size = 0; /* number of elements in hash table */ - this.hash_bits = 0; /* log2(hash_size) */ - this.hash_mask = 0; /* hash_size-1 */ - - this.hash_shift = 0; - /* Number of bits by which ins_h must be shifted at each input - * step. It must be such that after MIN_MATCH steps, the oldest - * byte no longer takes part in the hash key, that is: - * hash_shift * MIN_MATCH >= hash_bits - */ - - this.block_start = 0; - /* Window position at the beginning of the current output block. Gets - * negative when the window is moved backwards. - */ - - this.match_length = 0; /* length of best match */ - this.prev_match = 0; /* previous match */ - this.match_available = 0; /* set if previous match exists */ - this.strstart = 0; /* start of string to insert */ - this.match_start = 0; /* start of matching string */ - this.lookahead = 0; /* number of valid bytes ahead in window */ - - this.prev_length = 0; - /* Length of the best match at previous step. Matches not greater than this - * are discarded. This is used in the lazy match evaluation. - */ - - this.max_chain_length = 0; - /* To speed up deflation, hash chains are never searched beyond this - * length. A higher limit improves compression ratio but degrades the - * speed. - */ - - this.max_lazy_match = 0; - /* Attempt to find a better match only when the current match is strictly - * smaller than this value. This mechanism is used only for compression - * levels >= 4. - */ - // That's alias to max_lazy_match, don't use directly - //this.max_insert_length = 0; - /* Insert new strings in the hash table only if the match length is not - * greater than this length. This saves time but degrades compression. - * max_insert_length is used only for compression levels <= 3. - */ - - this.level = 0; /* compression level (1..9) */ - this.strategy = 0; /* favor or force Huffman coding*/ - - this.good_match = 0; - /* Use a faster search when the previous match is longer than this */ - - this.nice_match = 0; /* Stop searching when current match exceeds this */ - - /* used by trees.c: */ - - /* Didn't use ct_data typedef below to suppress compiler warning */ - - // struct ct_data_s dyn_ltree[HEAP_SIZE]; /* literal and length tree */ - // struct ct_data_s dyn_dtree[2*D_CODES+1]; /* distance tree */ - // struct ct_data_s bl_tree[2*BL_CODES+1]; /* Huffman tree for bit lengths */ - - // Use flat array of DOUBLE size, with interleaved fata, - // because JS does not support effective - this.dyn_ltree = new utils.Buf16(HEAP_SIZE * 2); - this.dyn_dtree = new utils.Buf16((2 * D_CODES + 1) * 2); - this.bl_tree = new utils.Buf16((2 * BL_CODES + 1) * 2); - zero(this.dyn_ltree); - zero(this.dyn_dtree); - zero(this.bl_tree); - - this.l_desc = null; /* desc. for literal tree */ - this.d_desc = null; /* desc. for distance tree */ - this.bl_desc = null; /* desc. for bit length tree */ - - //ush bl_count[MAX_BITS+1]; - this.bl_count = new utils.Buf16(MAX_BITS + 1); - /* number of codes at each bit length for an optimal tree */ - - //int heap[2*L_CODES+1]; /* heap used to build the Huffman trees */ - this.heap = new utils.Buf16(2 * L_CODES + 1); /* heap used to build the Huffman trees */ - zero(this.heap); - - this.heap_len = 0; /* number of elements in the heap */ - this.heap_max = 0; /* element of largest frequency */ - /* The sons of heap[n] are heap[2*n] and heap[2*n+1]. heap[0] is not used. - * The same heap array is used to build all trees. - */ - - this.depth = new utils.Buf16(2 * L_CODES + 1); //uch depth[2*L_CODES+1]; - zero(this.depth); - /* Depth of each subtree used as tie breaker for trees of equal frequency - */ - - this.l_buf = 0; /* buffer index for literals or lengths */ - - this.lit_bufsize = 0; - /* Size of match buffer for literals/lengths. There are 4 reasons for - * limiting lit_bufsize to 64K: - * - frequencies can be kept in 16 bit counters - * - if compression is not successful for the first block, all input - * data is still in the window so we can still emit a stored block even - * when input comes from standard input. (This can also be done for - * all blocks if lit_bufsize is not greater than 32K.) - * - if compression is not successful for a file smaller than 64K, we can - * even emit a stored file instead of a stored block (saving 5 bytes). - * This is applicable only for zip (not gzip or zlib). - * - creating new Huffman trees less frequently may not provide fast - * adaptation to changes in the input data statistics. (Take for - * example a binary file with poorly compressible code followed by - * a highly compressible string table.) Smaller buffer sizes give - * fast adaptation but have of course the overhead of transmitting - * trees more frequently. - * - I can't count above 4 - */ - - this.last_lit = 0; /* running index in l_buf */ - - this.d_buf = 0; - /* Buffer index for distances. To simplify the code, d_buf and l_buf have - * the same number of elements. To use different lengths, an extra flag - * array would be necessary. - */ - - this.opt_len = 0; /* bit length of current block with optimal trees */ - this.static_len = 0; /* bit length of current block with static trees */ - this.matches = 0; /* number of string matches in current block */ - this.insert = 0; /* bytes at end of window left to insert */ - - - this.bi_buf = 0; - /* Output buffer. bits are inserted starting at the bottom (least - * significant bits). - */ - this.bi_valid = 0; - /* Number of valid bits in bi_buf. All bits above the last valid bit - * are always zero. - */ - - // Used for window memory init. We safely ignore it for JS. That makes - // sense only for pointers and memory check tools. - //this.high_water = 0; - /* High water mark offset in window for initialized bytes -- bytes above - * this are set to zero in order to avoid memory check warnings when - * longest match routines access bytes past the input. This is then - * updated to the new high water mark. - */ -} - - -function deflateResetKeep(strm) { - var s; - - if (!strm || !strm.state) { - return err(strm, Z_STREAM_ERROR); - } - - strm.total_in = strm.total_out = 0; - strm.data_type = Z_UNKNOWN; - - s = strm.state; - s.pending = 0; - s.pending_out = 0; - - if (s.wrap < 0) { - s.wrap = -s.wrap; - /* was made negative by deflate(..., Z_FINISH); */ - } - s.status = (s.wrap ? INIT_STATE : BUSY_STATE); - strm.adler = (s.wrap === 2) ? - 0 // crc32(0, Z_NULL, 0) - : - 1; // adler32(0, Z_NULL, 0) - s.last_flush = Z_NO_FLUSH; - trees._tr_init(s); - return Z_OK; -} - - -function deflateReset(strm) { - var ret = deflateResetKeep(strm); - if (ret === Z_OK) { - lm_init(strm.state); - } - return ret; -} - - -function deflateSetHeader(strm, head) { - if (!strm || !strm.state) { return Z_STREAM_ERROR; } - if (strm.state.wrap !== 2) { return Z_STREAM_ERROR; } - strm.state.gzhead = head; - return Z_OK; -} - - -function deflateInit2(strm, level, method, windowBits, memLevel, strategy) { - if (!strm) { // === Z_NULL - return Z_STREAM_ERROR; - } - var wrap = 1; - - if (level === Z_DEFAULT_COMPRESSION) { - level = 6; - } - - if (windowBits < 0) { /* suppress zlib wrapper */ - wrap = 0; - windowBits = -windowBits; - } - - else if (windowBits > 15) { - wrap = 2; /* write gzip wrapper instead */ - windowBits -= 16; - } - - - if (memLevel < 1 || memLevel > MAX_MEM_LEVEL || method !== Z_DEFLATED || - windowBits < 8 || windowBits > 15 || level < 0 || level > 9 || - strategy < 0 || strategy > Z_FIXED) { - return err(strm, Z_STREAM_ERROR); - } - - - if (windowBits === 8) { - windowBits = 9; - } - /* until 256-byte window bug fixed */ - - var s = new DeflateState(); - - strm.state = s; - s.strm = strm; - - s.wrap = wrap; - s.gzhead = null; - s.w_bits = windowBits; - s.w_size = 1 << s.w_bits; - s.w_mask = s.w_size - 1; - - s.hash_bits = memLevel + 7; - s.hash_size = 1 << s.hash_bits; - s.hash_mask = s.hash_size - 1; - s.hash_shift = ~~((s.hash_bits + MIN_MATCH - 1) / MIN_MATCH); - - s.window = new utils.Buf8(s.w_size * 2); - s.head = new utils.Buf16(s.hash_size); - s.prev = new utils.Buf16(s.w_size); - - // Don't need mem init magic for JS. - //s.high_water = 0; /* nothing written to s->window yet */ - - s.lit_bufsize = 1 << (memLevel + 6); /* 16K elements by default */ - - s.pending_buf_size = s.lit_bufsize * 4; - - //overlay = (ushf *) ZALLOC(strm, s->lit_bufsize, sizeof(ush)+2); - //s->pending_buf = (uchf *) overlay; - s.pending_buf = new utils.Buf8(s.pending_buf_size); - - // It is offset from `s.pending_buf` (size is `s.lit_bufsize * 2`) - //s->d_buf = overlay + s->lit_bufsize/sizeof(ush); - s.d_buf = 1 * s.lit_bufsize; - - //s->l_buf = s->pending_buf + (1+sizeof(ush))*s->lit_bufsize; - s.l_buf = (1 + 2) * s.lit_bufsize; - - s.level = level; - s.strategy = strategy; - s.method = method; - - return deflateReset(strm); -} - -function deflateInit(strm, level) { - return deflateInit2(strm, level, Z_DEFLATED, MAX_WBITS, DEF_MEM_LEVEL, Z_DEFAULT_STRATEGY); -} - - -function deflate(strm, flush) { - var old_flush, s; - var beg, val; // for gzip header write only - - if (!strm || !strm.state || - flush > Z_BLOCK || flush < 0) { - return strm ? err(strm, Z_STREAM_ERROR) : Z_STREAM_ERROR; - } - - s = strm.state; - - if (!strm.output || - (!strm.input && strm.avail_in !== 0) || - (s.status === FINISH_STATE && flush !== Z_FINISH)) { - return err(strm, (strm.avail_out === 0) ? Z_BUF_ERROR : Z_STREAM_ERROR); - } - - s.strm = strm; /* just in case */ - old_flush = s.last_flush; - s.last_flush = flush; - - /* Write the header */ - if (s.status === INIT_STATE) { - - if (s.wrap === 2) { // GZIP header - strm.adler = 0; //crc32(0L, Z_NULL, 0); - put_byte(s, 31); - put_byte(s, 139); - put_byte(s, 8); - if (!s.gzhead) { // s->gzhead == Z_NULL - put_byte(s, 0); - put_byte(s, 0); - put_byte(s, 0); - put_byte(s, 0); - put_byte(s, 0); - put_byte(s, s.level === 9 ? 2 : - (s.strategy >= Z_HUFFMAN_ONLY || s.level < 2 ? - 4 : 0)); - put_byte(s, OS_CODE); - s.status = BUSY_STATE; - } - else { - put_byte(s, (s.gzhead.text ? 1 : 0) + - (s.gzhead.hcrc ? 2 : 0) + - (!s.gzhead.extra ? 0 : 4) + - (!s.gzhead.name ? 0 : 8) + - (!s.gzhead.comment ? 0 : 16) - ); - put_byte(s, s.gzhead.time & 0xff); - put_byte(s, (s.gzhead.time >> 8) & 0xff); - put_byte(s, (s.gzhead.time >> 16) & 0xff); - put_byte(s, (s.gzhead.time >> 24) & 0xff); - put_byte(s, s.level === 9 ? 2 : - (s.strategy >= Z_HUFFMAN_ONLY || s.level < 2 ? - 4 : 0)); - put_byte(s, s.gzhead.os & 0xff); - if (s.gzhead.extra && s.gzhead.extra.length) { - put_byte(s, s.gzhead.extra.length & 0xff); - put_byte(s, (s.gzhead.extra.length >> 8) & 0xff); - } - if (s.gzhead.hcrc) { - strm.adler = crc32(strm.adler, s.pending_buf, s.pending, 0); - } - s.gzindex = 0; - s.status = EXTRA_STATE; - } - } - else // DEFLATE header - { - var header = (Z_DEFLATED + ((s.w_bits - 8) << 4)) << 8; - var level_flags = -1; - - if (s.strategy >= Z_HUFFMAN_ONLY || s.level < 2) { - level_flags = 0; - } else if (s.level < 6) { - level_flags = 1; - } else if (s.level === 6) { - level_flags = 2; - } else { - level_flags = 3; - } - header |= (level_flags << 6); - if (s.strstart !== 0) { header |= PRESET_DICT; } - header += 31 - (header % 31); - - s.status = BUSY_STATE; - putShortMSB(s, header); - - /* Save the adler32 of the preset dictionary: */ - if (s.strstart !== 0) { - putShortMSB(s, strm.adler >>> 16); - putShortMSB(s, strm.adler & 0xffff); - } - strm.adler = 1; // adler32(0L, Z_NULL, 0); - } - } - -//#ifdef GZIP - if (s.status === EXTRA_STATE) { - if (s.gzhead.extra/* != Z_NULL*/) { - beg = s.pending; /* start of bytes to update crc */ - - while (s.gzindex < (s.gzhead.extra.length & 0xffff)) { - if (s.pending === s.pending_buf_size) { - if (s.gzhead.hcrc && s.pending > beg) { - strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg); - } - flush_pending(strm); - beg = s.pending; - if (s.pending === s.pending_buf_size) { - break; - } - } - put_byte(s, s.gzhead.extra[s.gzindex] & 0xff); - s.gzindex++; - } - if (s.gzhead.hcrc && s.pending > beg) { - strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg); - } - if (s.gzindex === s.gzhead.extra.length) { - s.gzindex = 0; - s.status = NAME_STATE; - } - } - else { - s.status = NAME_STATE; - } - } - if (s.status === NAME_STATE) { - if (s.gzhead.name/* != Z_NULL*/) { - beg = s.pending; /* start of bytes to update crc */ - //int val; - - do { - if (s.pending === s.pending_buf_size) { - if (s.gzhead.hcrc && s.pending > beg) { - strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg); - } - flush_pending(strm); - beg = s.pending; - if (s.pending === s.pending_buf_size) { - val = 1; - break; - } - } - // JS specific: little magic to add zero terminator to end of string - if (s.gzindex < s.gzhead.name.length) { - val = s.gzhead.name.charCodeAt(s.gzindex++) & 0xff; - } else { - val = 0; - } - put_byte(s, val); - } while (val !== 0); - - if (s.gzhead.hcrc && s.pending > beg) { - strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg); - } - if (val === 0) { - s.gzindex = 0; - s.status = COMMENT_STATE; - } - } - else { - s.status = COMMENT_STATE; - } - } - if (s.status === COMMENT_STATE) { - if (s.gzhead.comment/* != Z_NULL*/) { - beg = s.pending; /* start of bytes to update crc */ - //int val; - - do { - if (s.pending === s.pending_buf_size) { - if (s.gzhead.hcrc && s.pending > beg) { - strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg); - } - flush_pending(strm); - beg = s.pending; - if (s.pending === s.pending_buf_size) { - val = 1; - break; - } - } - // JS specific: little magic to add zero terminator to end of string - if (s.gzindex < s.gzhead.comment.length) { - val = s.gzhead.comment.charCodeAt(s.gzindex++) & 0xff; - } else { - val = 0; - } - put_byte(s, val); - } while (val !== 0); - - if (s.gzhead.hcrc && s.pending > beg) { - strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg); - } - if (val === 0) { - s.status = HCRC_STATE; - } - } - else { - s.status = HCRC_STATE; - } - } - if (s.status === HCRC_STATE) { - if (s.gzhead.hcrc) { - if (s.pending + 2 > s.pending_buf_size) { - flush_pending(strm); - } - if (s.pending + 2 <= s.pending_buf_size) { - put_byte(s, strm.adler & 0xff); - put_byte(s, (strm.adler >> 8) & 0xff); - strm.adler = 0; //crc32(0L, Z_NULL, 0); - s.status = BUSY_STATE; - } - } - else { - s.status = BUSY_STATE; - } - } -//#endif - - /* Flush as much pending output as possible */ - if (s.pending !== 0) { - flush_pending(strm); - if (strm.avail_out === 0) { - /* Since avail_out is 0, deflate will be called again with - * more output space, but possibly with both pending and - * avail_in equal to zero. There won't be anything to do, - * but this is not an error situation so make sure we - * return OK instead of BUF_ERROR at next call of deflate: - */ - s.last_flush = -1; - return Z_OK; - } - - /* Make sure there is something to do and avoid duplicate consecutive - * flushes. For repeated and useless calls with Z_FINISH, we keep - * returning Z_STREAM_END instead of Z_BUF_ERROR. - */ - } else if (strm.avail_in === 0 && rank(flush) <= rank(old_flush) && - flush !== Z_FINISH) { - return err(strm, Z_BUF_ERROR); - } - - /* User must not provide more input after the first FINISH: */ - if (s.status === FINISH_STATE && strm.avail_in !== 0) { - return err(strm, Z_BUF_ERROR); - } - - /* Start a new block or continue the current one. - */ - if (strm.avail_in !== 0 || s.lookahead !== 0 || - (flush !== Z_NO_FLUSH && s.status !== FINISH_STATE)) { - var bstate = (s.strategy === Z_HUFFMAN_ONLY) ? deflate_huff(s, flush) : - (s.strategy === Z_RLE ? deflate_rle(s, flush) : - configuration_table[s.level].func(s, flush)); - - if (bstate === BS_FINISH_STARTED || bstate === BS_FINISH_DONE) { - s.status = FINISH_STATE; - } - if (bstate === BS_NEED_MORE || bstate === BS_FINISH_STARTED) { - if (strm.avail_out === 0) { - s.last_flush = -1; - /* avoid BUF_ERROR next call, see above */ - } - return Z_OK; - /* If flush != Z_NO_FLUSH && avail_out == 0, the next call - * of deflate should use the same flush parameter to make sure - * that the flush is complete. So we don't have to output an - * empty block here, this will be done at next call. This also - * ensures that for a very small output buffer, we emit at most - * one empty block. - */ - } - if (bstate === BS_BLOCK_DONE) { - if (flush === Z_PARTIAL_FLUSH) { - trees._tr_align(s); - } - else if (flush !== Z_BLOCK) { /* FULL_FLUSH or SYNC_FLUSH */ - - trees._tr_stored_block(s, 0, 0, false); - /* For a full flush, this empty block will be recognized - * as a special marker by inflate_sync(). - */ - if (flush === Z_FULL_FLUSH) { - /*** CLEAR_HASH(s); ***/ /* forget history */ - zero(s.head); // Fill with NIL (= 0); - - if (s.lookahead === 0) { - s.strstart = 0; - s.block_start = 0; - s.insert = 0; - } - } - } - flush_pending(strm); - if (strm.avail_out === 0) { - s.last_flush = -1; /* avoid BUF_ERROR at next call, see above */ - return Z_OK; - } - } - } - //Assert(strm->avail_out > 0, "bug2"); - //if (strm.avail_out <= 0) { throw new Error("bug2");} - - if (flush !== Z_FINISH) { return Z_OK; } - if (s.wrap <= 0) { return Z_STREAM_END; } - - /* Write the trailer */ - if (s.wrap === 2) { - put_byte(s, strm.adler & 0xff); - put_byte(s, (strm.adler >> 8) & 0xff); - put_byte(s, (strm.adler >> 16) & 0xff); - put_byte(s, (strm.adler >> 24) & 0xff); - put_byte(s, strm.total_in & 0xff); - put_byte(s, (strm.total_in >> 8) & 0xff); - put_byte(s, (strm.total_in >> 16) & 0xff); - put_byte(s, (strm.total_in >> 24) & 0xff); - } - else - { - putShortMSB(s, strm.adler >>> 16); - putShortMSB(s, strm.adler & 0xffff); - } - - flush_pending(strm); - /* If avail_out is zero, the application will call deflate again - * to flush the rest. - */ - if (s.wrap > 0) { s.wrap = -s.wrap; } - /* write the trailer only once! */ - return s.pending !== 0 ? Z_OK : Z_STREAM_END; -} - -function deflateEnd(strm) { - var status; - - if (!strm/*== Z_NULL*/ || !strm.state/*== Z_NULL*/) { - return Z_STREAM_ERROR; - } - - status = strm.state.status; - if (status !== INIT_STATE && - status !== EXTRA_STATE && - status !== NAME_STATE && - status !== COMMENT_STATE && - status !== HCRC_STATE && - status !== BUSY_STATE && - status !== FINISH_STATE - ) { - return err(strm, Z_STREAM_ERROR); - } - - strm.state = null; - - return status === BUSY_STATE ? err(strm, Z_DATA_ERROR) : Z_OK; -} - - -/* ========================================================================= - * Initializes the compression dictionary from the given byte - * sequence without producing any compressed output. - */ -function deflateSetDictionary(strm, dictionary) { - var dictLength = dictionary.length; - - var s; - var str, n; - var wrap; - var avail; - var next; - var input; - var tmpDict; - - if (!strm/*== Z_NULL*/ || !strm.state/*== Z_NULL*/) { - return Z_STREAM_ERROR; - } - - s = strm.state; - wrap = s.wrap; - - if (wrap === 2 || (wrap === 1 && s.status !== INIT_STATE) || s.lookahead) { - return Z_STREAM_ERROR; - } - - /* when using zlib wrappers, compute Adler-32 for provided dictionary */ - if (wrap === 1) { - /* adler32(strm->adler, dictionary, dictLength); */ - strm.adler = adler32(strm.adler, dictionary, dictLength, 0); - } - - s.wrap = 0; /* avoid computing Adler-32 in read_buf */ - - /* if dictionary would fill window, just replace the history */ - if (dictLength >= s.w_size) { - if (wrap === 0) { /* already empty otherwise */ - /*** CLEAR_HASH(s); ***/ - zero(s.head); // Fill with NIL (= 0); - s.strstart = 0; - s.block_start = 0; - s.insert = 0; - } - /* use the tail */ - // dictionary = dictionary.slice(dictLength - s.w_size); - tmpDict = new utils.Buf8(s.w_size); - utils.arraySet(tmpDict, dictionary, dictLength - s.w_size, s.w_size, 0); - dictionary = tmpDict; - dictLength = s.w_size; - } - /* insert dictionary into window and hash */ - avail = strm.avail_in; - next = strm.next_in; - input = strm.input; - strm.avail_in = dictLength; - strm.next_in = 0; - strm.input = dictionary; - fill_window(s); - while (s.lookahead >= MIN_MATCH) { - str = s.strstart; - n = s.lookahead - (MIN_MATCH - 1); - do { - /* UPDATE_HASH(s, s->ins_h, s->window[str + MIN_MATCH-1]); */ - s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[str + MIN_MATCH - 1]) & s.hash_mask; - - s.prev[str & s.w_mask] = s.head[s.ins_h]; - - s.head[s.ins_h] = str; - str++; - } while (--n); - s.strstart = str; - s.lookahead = MIN_MATCH - 1; - fill_window(s); - } - s.strstart += s.lookahead; - s.block_start = s.strstart; - s.insert = s.lookahead; - s.lookahead = 0; - s.match_length = s.prev_length = MIN_MATCH - 1; - s.match_available = 0; - strm.next_in = next; - strm.input = input; - strm.avail_in = avail; - s.wrap = wrap; - return Z_OK; -} - - -exports.deflateInit = deflateInit; -exports.deflateInit2 = deflateInit2; -exports.deflateReset = deflateReset; -exports.deflateResetKeep = deflateResetKeep; -exports.deflateSetHeader = deflateSetHeader; -exports.deflate = deflate; -exports.deflateEnd = deflateEnd; -exports.deflateSetDictionary = deflateSetDictionary; -exports.deflateInfo = 'pako deflate (from Nodeca project)'; - -/* Not implemented -exports.deflateBound = deflateBound; -exports.deflateCopy = deflateCopy; -exports.deflateParams = deflateParams; -exports.deflatePending = deflatePending; -exports.deflatePrime = deflatePrime; -exports.deflateTune = deflateTune; -*/ - -},{"../utils/common":1,"./adler32":3,"./crc32":4,"./messages":6,"./trees":7}],6:[function(require,module,exports){ -'use strict'; - -module.exports = { - 2: 'need dictionary', /* Z_NEED_DICT 2 */ - 1: 'stream end', /* Z_STREAM_END 1 */ - 0: '', /* Z_OK 0 */ - '-1': 'file error', /* Z_ERRNO (-1) */ - '-2': 'stream error', /* Z_STREAM_ERROR (-2) */ - '-3': 'data error', /* Z_DATA_ERROR (-3) */ - '-4': 'insufficient memory', /* Z_MEM_ERROR (-4) */ - '-5': 'buffer error', /* Z_BUF_ERROR (-5) */ - '-6': 'incompatible version' /* Z_VERSION_ERROR (-6) */ -}; - -},{}],7:[function(require,module,exports){ -'use strict'; - - -var utils = require('../utils/common'); - -/* Public constants ==========================================================*/ -/* ===========================================================================*/ - - -//var Z_FILTERED = 1; -//var Z_HUFFMAN_ONLY = 2; -//var Z_RLE = 3; -var Z_FIXED = 4; -//var Z_DEFAULT_STRATEGY = 0; - -/* Possible values of the data_type field (though see inflate()) */ -var Z_BINARY = 0; -var Z_TEXT = 1; -//var Z_ASCII = 1; // = Z_TEXT -var Z_UNKNOWN = 2; - -/*============================================================================*/ - - -function zero(buf) { var len = buf.length; while (--len >= 0) { buf[len] = 0; } } - -// From zutil.h - -var STORED_BLOCK = 0; -var STATIC_TREES = 1; -var DYN_TREES = 2; -/* The three kinds of block type */ - -var MIN_MATCH = 3; -var MAX_MATCH = 258; -/* The minimum and maximum match lengths */ - -// From deflate.h -/* =========================================================================== - * Internal compression state. - */ - -var LENGTH_CODES = 29; -/* number of length codes, not counting the special END_BLOCK code */ - -var LITERALS = 256; -/* number of literal bytes 0..255 */ - -var L_CODES = LITERALS + 1 + LENGTH_CODES; -/* number of Literal or Length codes, including the END_BLOCK code */ - -var D_CODES = 30; -/* number of distance codes */ - -var BL_CODES = 19; -/* number of codes used to transfer the bit lengths */ - -var HEAP_SIZE = 2 * L_CODES + 1; -/* maximum heap size */ - -var MAX_BITS = 15; -/* All codes must not exceed MAX_BITS bits */ - -var Buf_size = 16; -/* size of bit buffer in bi_buf */ - - -/* =========================================================================== - * Constants - */ - -var MAX_BL_BITS = 7; -/* Bit length codes must not exceed MAX_BL_BITS bits */ - -var END_BLOCK = 256; -/* end of block literal code */ - -var REP_3_6 = 16; -/* repeat previous bit length 3-6 times (2 bits of repeat count) */ - -var REPZ_3_10 = 17; -/* repeat a zero length 3-10 times (3 bits of repeat count) */ - -var REPZ_11_138 = 18; -/* repeat a zero length 11-138 times (7 bits of repeat count) */ - -/* eslint-disable comma-spacing,array-bracket-spacing */ -var extra_lbits = /* extra bits for each length code */ - [0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0]; - -var extra_dbits = /* extra bits for each distance code */ - [0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13]; - -var extra_blbits = /* extra bits for each bit length code */ - [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7]; - -var bl_order = - [16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]; -/* eslint-enable comma-spacing,array-bracket-spacing */ - -/* The lengths of the bit length codes are sent in order of decreasing - * probability, to avoid transmitting the lengths for unused bit length codes. - */ - -/* =========================================================================== - * Local data. These are initialized only once. - */ - -// We pre-fill arrays with 0 to avoid uninitialized gaps - -var DIST_CODE_LEN = 512; /* see definition of array dist_code below */ - -// !!!! Use flat array insdead of structure, Freq = i*2, Len = i*2+1 -var static_ltree = new Array((L_CODES + 2) * 2); -zero(static_ltree); -/* The static literal tree. Since the bit lengths are imposed, there is no - * need for the L_CODES extra codes used during heap construction. However - * The codes 286 and 287 are needed to build a canonical tree (see _tr_init - * below). - */ - -var static_dtree = new Array(D_CODES * 2); -zero(static_dtree); -/* The static distance tree. (Actually a trivial tree since all codes use - * 5 bits.) - */ - -var _dist_code = new Array(DIST_CODE_LEN); -zero(_dist_code); -/* Distance codes. The first 256 values correspond to the distances - * 3 .. 258, the last 256 values correspond to the top 8 bits of - * the 15 bit distances. - */ - -var _length_code = new Array(MAX_MATCH - MIN_MATCH + 1); -zero(_length_code); -/* length code for each normalized match length (0 == MIN_MATCH) */ - -var base_length = new Array(LENGTH_CODES); -zero(base_length); -/* First normalized length for each code (0 = MIN_MATCH) */ - -var base_dist = new Array(D_CODES); -zero(base_dist); -/* First normalized distance for each code (0 = distance of 1) */ - - -function StaticTreeDesc(static_tree, extra_bits, extra_base, elems, max_length) { - - this.static_tree = static_tree; /* static tree or NULL */ - this.extra_bits = extra_bits; /* extra bits for each code or NULL */ - this.extra_base = extra_base; /* base index for extra_bits */ - this.elems = elems; /* max number of elements in the tree */ - this.max_length = max_length; /* max bit length for the codes */ - - // show if `static_tree` has data or dummy - needed for monomorphic objects - this.has_stree = static_tree && static_tree.length; -} - - -var static_l_desc; -var static_d_desc; -var static_bl_desc; - - -function TreeDesc(dyn_tree, stat_desc) { - this.dyn_tree = dyn_tree; /* the dynamic tree */ - this.max_code = 0; /* largest code with non zero frequency */ - this.stat_desc = stat_desc; /* the corresponding static tree */ -} - - - -function d_code(dist) { - return dist < 256 ? _dist_code[dist] : _dist_code[256 + (dist >>> 7)]; -} - - -/* =========================================================================== - * Output a short LSB first on the stream. - * IN assertion: there is enough room in pendingBuf. - */ -function put_short(s, w) { -// put_byte(s, (uch)((w) & 0xff)); -// put_byte(s, (uch)((ush)(w) >> 8)); - s.pending_buf[s.pending++] = (w) & 0xff; - s.pending_buf[s.pending++] = (w >>> 8) & 0xff; -} - - -/* =========================================================================== - * Send a value on a given number of bits. - * IN assertion: length <= 16 and value fits in length bits. - */ -function send_bits(s, value, length) { - if (s.bi_valid > (Buf_size - length)) { - s.bi_buf |= (value << s.bi_valid) & 0xffff; - put_short(s, s.bi_buf); - s.bi_buf = value >> (Buf_size - s.bi_valid); - s.bi_valid += length - Buf_size; - } else { - s.bi_buf |= (value << s.bi_valid) & 0xffff; - s.bi_valid += length; - } -} - - -function send_code(s, c, tree) { - send_bits(s, tree[c * 2]/*.Code*/, tree[c * 2 + 1]/*.Len*/); -} - - -/* =========================================================================== - * Reverse the first len bits of a code, using straightforward code (a faster - * method would use a table) - * IN assertion: 1 <= len <= 15 - */ -function bi_reverse(code, len) { - var res = 0; - do { - res |= code & 1; - code >>>= 1; - res <<= 1; - } while (--len > 0); - return res >>> 1; -} - - -/* =========================================================================== - * Flush the bit buffer, keeping at most 7 bits in it. - */ -function bi_flush(s) { - if (s.bi_valid === 16) { - put_short(s, s.bi_buf); - s.bi_buf = 0; - s.bi_valid = 0; - - } else if (s.bi_valid >= 8) { - s.pending_buf[s.pending++] = s.bi_buf & 0xff; - s.bi_buf >>= 8; - s.bi_valid -= 8; - } -} - - -/* =========================================================================== - * Compute the optimal bit lengths for a tree and update the total bit length - * for the current block. - * IN assertion: the fields freq and dad are set, heap[heap_max] and - * above are the tree nodes sorted by increasing frequency. - * OUT assertions: the field len is set to the optimal bit length, the - * array bl_count contains the frequencies for each bit length. - * The length opt_len is updated; static_len is also updated if stree is - * not null. - */ -function gen_bitlen(s, desc) -// deflate_state *s; -// tree_desc *desc; /* the tree descriptor */ -{ - var tree = desc.dyn_tree; - var max_code = desc.max_code; - var stree = desc.stat_desc.static_tree; - var has_stree = desc.stat_desc.has_stree; - var extra = desc.stat_desc.extra_bits; - var base = desc.stat_desc.extra_base; - var max_length = desc.stat_desc.max_length; - var h; /* heap index */ - var n, m; /* iterate over the tree elements */ - var bits; /* bit length */ - var xbits; /* extra bits */ - var f; /* frequency */ - var overflow = 0; /* number of elements with bit length too large */ - - for (bits = 0; bits <= MAX_BITS; bits++) { - s.bl_count[bits] = 0; - } - - /* In a first pass, compute the optimal bit lengths (which may - * overflow in the case of the bit length tree). - */ - tree[s.heap[s.heap_max] * 2 + 1]/*.Len*/ = 0; /* root of the heap */ - - for (h = s.heap_max + 1; h < HEAP_SIZE; h++) { - n = s.heap[h]; - bits = tree[tree[n * 2 + 1]/*.Dad*/ * 2 + 1]/*.Len*/ + 1; - if (bits > max_length) { - bits = max_length; - overflow++; - } - tree[n * 2 + 1]/*.Len*/ = bits; - /* We overwrite tree[n].Dad which is no longer needed */ - - if (n > max_code) { continue; } /* not a leaf node */ - - s.bl_count[bits]++; - xbits = 0; - if (n >= base) { - xbits = extra[n - base]; - } - f = tree[n * 2]/*.Freq*/; - s.opt_len += f * (bits + xbits); - if (has_stree) { - s.static_len += f * (stree[n * 2 + 1]/*.Len*/ + xbits); - } - } - if (overflow === 0) { return; } - - // Trace((stderr,"\nbit length overflow\n")); - /* This happens for example on obj2 and pic of the Calgary corpus */ - - /* Find the first bit length which could increase: */ - do { - bits = max_length - 1; - while (s.bl_count[bits] === 0) { bits--; } - s.bl_count[bits]--; /* move one leaf down the tree */ - s.bl_count[bits + 1] += 2; /* move one overflow item as its brother */ - s.bl_count[max_length]--; - /* The brother of the overflow item also moves one step up, - * but this does not affect bl_count[max_length] - */ - overflow -= 2; - } while (overflow > 0); - - /* Now recompute all bit lengths, scanning in increasing frequency. - * h is still equal to HEAP_SIZE. (It is simpler to reconstruct all - * lengths instead of fixing only the wrong ones. This idea is taken - * from 'ar' written by Haruhiko Okumura.) - */ - for (bits = max_length; bits !== 0; bits--) { - n = s.bl_count[bits]; - while (n !== 0) { - m = s.heap[--h]; - if (m > max_code) { continue; } - if (tree[m * 2 + 1]/*.Len*/ !== bits) { - // Trace((stderr,"code %d bits %d->%d\n", m, tree[m].Len, bits)); - s.opt_len += (bits - tree[m * 2 + 1]/*.Len*/) * tree[m * 2]/*.Freq*/; - tree[m * 2 + 1]/*.Len*/ = bits; - } - n--; - } - } -} - - -/* =========================================================================== - * Generate the codes for a given tree and bit counts (which need not be - * optimal). - * IN assertion: the array bl_count contains the bit length statistics for - * the given tree and the field len is set for all tree elements. - * OUT assertion: the field code is set for all tree elements of non - * zero code length. - */ -function gen_codes(tree, max_code, bl_count) -// ct_data *tree; /* the tree to decorate */ -// int max_code; /* largest code with non zero frequency */ -// ushf *bl_count; /* number of codes at each bit length */ -{ - var next_code = new Array(MAX_BITS + 1); /* next code value for each bit length */ - var code = 0; /* running code value */ - var bits; /* bit index */ - var n; /* code index */ - - /* The distribution counts are first used to generate the code values - * without bit reversal. - */ - for (bits = 1; bits <= MAX_BITS; bits++) { - next_code[bits] = code = (code + bl_count[bits - 1]) << 1; - } - /* Check that the bit counts in bl_count are consistent. The last code - * must be all ones. - */ - //Assert (code + bl_count[MAX_BITS]-1 == (1< length code (0..28) */ - length = 0; - for (code = 0; code < LENGTH_CODES - 1; code++) { - base_length[code] = length; - for (n = 0; n < (1 << extra_lbits[code]); n++) { - _length_code[length++] = code; - } - } - //Assert (length == 256, "tr_static_init: length != 256"); - /* Note that the length 255 (match length 258) can be represented - * in two different ways: code 284 + 5 bits or code 285, so we - * overwrite length_code[255] to use the best encoding: - */ - _length_code[length - 1] = code; - - /* Initialize the mapping dist (0..32K) -> dist code (0..29) */ - dist = 0; - for (code = 0; code < 16; code++) { - base_dist[code] = dist; - for (n = 0; n < (1 << extra_dbits[code]); n++) { - _dist_code[dist++] = code; - } - } - //Assert (dist == 256, "tr_static_init: dist != 256"); - dist >>= 7; /* from now on, all distances are divided by 128 */ - for (; code < D_CODES; code++) { - base_dist[code] = dist << 7; - for (n = 0; n < (1 << (extra_dbits[code] - 7)); n++) { - _dist_code[256 + dist++] = code; - } - } - //Assert (dist == 256, "tr_static_init: 256+dist != 512"); - - /* Construct the codes of the static literal tree */ - for (bits = 0; bits <= MAX_BITS; bits++) { - bl_count[bits] = 0; - } - - n = 0; - while (n <= 143) { - static_ltree[n * 2 + 1]/*.Len*/ = 8; - n++; - bl_count[8]++; - } - while (n <= 255) { - static_ltree[n * 2 + 1]/*.Len*/ = 9; - n++; - bl_count[9]++; - } - while (n <= 279) { - static_ltree[n * 2 + 1]/*.Len*/ = 7; - n++; - bl_count[7]++; - } - while (n <= 287) { - static_ltree[n * 2 + 1]/*.Len*/ = 8; - n++; - bl_count[8]++; - } - /* Codes 286 and 287 do not exist, but we must include them in the - * tree construction to get a canonical Huffman tree (longest code - * all ones) - */ - gen_codes(static_ltree, L_CODES + 1, bl_count); - - /* The static distance tree is trivial: */ - for (n = 0; n < D_CODES; n++) { - static_dtree[n * 2 + 1]/*.Len*/ = 5; - static_dtree[n * 2]/*.Code*/ = bi_reverse(n, 5); - } - - // Now data ready and we can init static trees - static_l_desc = new StaticTreeDesc(static_ltree, extra_lbits, LITERALS + 1, L_CODES, MAX_BITS); - static_d_desc = new StaticTreeDesc(static_dtree, extra_dbits, 0, D_CODES, MAX_BITS); - static_bl_desc = new StaticTreeDesc(new Array(0), extra_blbits, 0, BL_CODES, MAX_BL_BITS); - - //static_init_done = true; -} - - -/* =========================================================================== - * Initialize a new block. - */ -function init_block(s) { - var n; /* iterates over tree elements */ - - /* Initialize the trees. */ - for (n = 0; n < L_CODES; n++) { s.dyn_ltree[n * 2]/*.Freq*/ = 0; } - for (n = 0; n < D_CODES; n++) { s.dyn_dtree[n * 2]/*.Freq*/ = 0; } - for (n = 0; n < BL_CODES; n++) { s.bl_tree[n * 2]/*.Freq*/ = 0; } - - s.dyn_ltree[END_BLOCK * 2]/*.Freq*/ = 1; - s.opt_len = s.static_len = 0; - s.last_lit = s.matches = 0; -} - - -/* =========================================================================== - * Flush the bit buffer and align the output on a byte boundary - */ -function bi_windup(s) -{ - if (s.bi_valid > 8) { - put_short(s, s.bi_buf); - } else if (s.bi_valid > 0) { - //put_byte(s, (Byte)s->bi_buf); - s.pending_buf[s.pending++] = s.bi_buf; - } - s.bi_buf = 0; - s.bi_valid = 0; -} - -/* =========================================================================== - * Copy a stored block, storing first the length and its - * one's complement if requested. - */ -function copy_block(s, buf, len, header) -//DeflateState *s; -//charf *buf; /* the input data */ -//unsigned len; /* its length */ -//int header; /* true if block header must be written */ -{ - bi_windup(s); /* align on byte boundary */ - - if (header) { - put_short(s, len); - put_short(s, ~len); - } -// while (len--) { -// put_byte(s, *buf++); -// } - utils.arraySet(s.pending_buf, s.window, buf, len, s.pending); - s.pending += len; -} - -/* =========================================================================== - * Compares to subtrees, using the tree depth as tie breaker when - * the subtrees have equal frequency. This minimizes the worst case length. - */ -function smaller(tree, n, m, depth) { - var _n2 = n * 2; - var _m2 = m * 2; - return (tree[_n2]/*.Freq*/ < tree[_m2]/*.Freq*/ || - (tree[_n2]/*.Freq*/ === tree[_m2]/*.Freq*/ && depth[n] <= depth[m])); -} - -/* =========================================================================== - * Restore the heap property by moving down the tree starting at node k, - * exchanging a node with the smallest of its two sons if necessary, stopping - * when the heap property is re-established (each father smaller than its - * two sons). - */ -function pqdownheap(s, tree, k) -// deflate_state *s; -// ct_data *tree; /* the tree to restore */ -// int k; /* node to move down */ -{ - var v = s.heap[k]; - var j = k << 1; /* left son of k */ - while (j <= s.heap_len) { - /* Set j to the smallest of the two sons: */ - if (j < s.heap_len && - smaller(tree, s.heap[j + 1], s.heap[j], s.depth)) { - j++; - } - /* Exit if v is smaller than both sons */ - if (smaller(tree, v, s.heap[j], s.depth)) { break; } - - /* Exchange v with the smallest son */ - s.heap[k] = s.heap[j]; - k = j; - - /* And continue down the tree, setting j to the left son of k */ - j <<= 1; - } - s.heap[k] = v; -} - - -// inlined manually -// var SMALLEST = 1; - -/* =========================================================================== - * Send the block data compressed using the given Huffman trees - */ -function compress_block(s, ltree, dtree) -// deflate_state *s; -// const ct_data *ltree; /* literal tree */ -// const ct_data *dtree; /* distance tree */ -{ - var dist; /* distance of matched string */ - var lc; /* match length or unmatched char (if dist == 0) */ - var lx = 0; /* running index in l_buf */ - var code; /* the code to send */ - var extra; /* number of extra bits to send */ - - if (s.last_lit !== 0) { - do { - dist = (s.pending_buf[s.d_buf + lx * 2] << 8) | (s.pending_buf[s.d_buf + lx * 2 + 1]); - lc = s.pending_buf[s.l_buf + lx]; - lx++; - - if (dist === 0) { - send_code(s, lc, ltree); /* send a literal byte */ - //Tracecv(isgraph(lc), (stderr," '%c' ", lc)); - } else { - /* Here, lc is the match length - MIN_MATCH */ - code = _length_code[lc]; - send_code(s, code + LITERALS + 1, ltree); /* send the length code */ - extra = extra_lbits[code]; - if (extra !== 0) { - lc -= base_length[code]; - send_bits(s, lc, extra); /* send the extra length bits */ - } - dist--; /* dist is now the match distance - 1 */ - code = d_code(dist); - //Assert (code < D_CODES, "bad d_code"); - - send_code(s, code, dtree); /* send the distance code */ - extra = extra_dbits[code]; - if (extra !== 0) { - dist -= base_dist[code]; - send_bits(s, dist, extra); /* send the extra distance bits */ - } - } /* literal or match pair ? */ - - /* Check that the overlay between pending_buf and d_buf+l_buf is ok: */ - //Assert((uInt)(s->pending) < s->lit_bufsize + 2*lx, - // "pendingBuf overflow"); - - } while (lx < s.last_lit); - } - - send_code(s, END_BLOCK, ltree); -} - - -/* =========================================================================== - * Construct one Huffman tree and assigns the code bit strings and lengths. - * Update the total bit length for the current block. - * IN assertion: the field freq is set for all tree elements. - * OUT assertions: the fields len and code are set to the optimal bit length - * and corresponding code. The length opt_len is updated; static_len is - * also updated if stree is not null. The field max_code is set. - */ -function build_tree(s, desc) -// deflate_state *s; -// tree_desc *desc; /* the tree descriptor */ -{ - var tree = desc.dyn_tree; - var stree = desc.stat_desc.static_tree; - var has_stree = desc.stat_desc.has_stree; - var elems = desc.stat_desc.elems; - var n, m; /* iterate over heap elements */ - var max_code = -1; /* largest code with non zero frequency */ - var node; /* new node being created */ - - /* Construct the initial heap, with least frequent element in - * heap[SMALLEST]. The sons of heap[n] are heap[2*n] and heap[2*n+1]. - * heap[0] is not used. - */ - s.heap_len = 0; - s.heap_max = HEAP_SIZE; - - for (n = 0; n < elems; n++) { - if (tree[n * 2]/*.Freq*/ !== 0) { - s.heap[++s.heap_len] = max_code = n; - s.depth[n] = 0; - - } else { - tree[n * 2 + 1]/*.Len*/ = 0; - } - } - - /* The pkzip format requires that at least one distance code exists, - * and that at least one bit should be sent even if there is only one - * possible code. So to avoid special checks later on we force at least - * two codes of non zero frequency. - */ - while (s.heap_len < 2) { - node = s.heap[++s.heap_len] = (max_code < 2 ? ++max_code : 0); - tree[node * 2]/*.Freq*/ = 1; - s.depth[node] = 0; - s.opt_len--; - - if (has_stree) { - s.static_len -= stree[node * 2 + 1]/*.Len*/; - } - /* node is 0 or 1 so it does not have extra bits */ - } - desc.max_code = max_code; - - /* The elements heap[heap_len/2+1 .. heap_len] are leaves of the tree, - * establish sub-heaps of increasing lengths: - */ - for (n = (s.heap_len >> 1/*int /2*/); n >= 1; n--) { pqdownheap(s, tree, n); } - - /* Construct the Huffman tree by repeatedly combining the least two - * frequent nodes. - */ - node = elems; /* next internal node of the tree */ - do { - //pqremove(s, tree, n); /* n = node of least frequency */ - /*** pqremove ***/ - n = s.heap[1/*SMALLEST*/]; - s.heap[1/*SMALLEST*/] = s.heap[s.heap_len--]; - pqdownheap(s, tree, 1/*SMALLEST*/); - /***/ - - m = s.heap[1/*SMALLEST*/]; /* m = node of next least frequency */ - - s.heap[--s.heap_max] = n; /* keep the nodes sorted by frequency */ - s.heap[--s.heap_max] = m; - - /* Create a new node father of n and m */ - tree[node * 2]/*.Freq*/ = tree[n * 2]/*.Freq*/ + tree[m * 2]/*.Freq*/; - s.depth[node] = (s.depth[n] >= s.depth[m] ? s.depth[n] : s.depth[m]) + 1; - tree[n * 2 + 1]/*.Dad*/ = tree[m * 2 + 1]/*.Dad*/ = node; - - /* and insert the new node in the heap */ - s.heap[1/*SMALLEST*/] = node++; - pqdownheap(s, tree, 1/*SMALLEST*/); - - } while (s.heap_len >= 2); - - s.heap[--s.heap_max] = s.heap[1/*SMALLEST*/]; - - /* At this point, the fields freq and dad are set. We can now - * generate the bit lengths. - */ - gen_bitlen(s, desc); - - /* The field len is now set, we can generate the bit codes */ - gen_codes(tree, max_code, s.bl_count); -} - - -/* =========================================================================== - * Scan a literal or distance tree to determine the frequencies of the codes - * in the bit length tree. - */ -function scan_tree(s, tree, max_code) -// deflate_state *s; -// ct_data *tree; /* the tree to be scanned */ -// int max_code; /* and its largest code of non zero frequency */ -{ - var n; /* iterates over all tree elements */ - var prevlen = -1; /* last emitted length */ - var curlen; /* length of current code */ - - var nextlen = tree[0 * 2 + 1]/*.Len*/; /* length of next code */ - - var count = 0; /* repeat count of the current code */ - var max_count = 7; /* max repeat count */ - var min_count = 4; /* min repeat count */ - - if (nextlen === 0) { - max_count = 138; - min_count = 3; - } - tree[(max_code + 1) * 2 + 1]/*.Len*/ = 0xffff; /* guard */ - - for (n = 0; n <= max_code; n++) { - curlen = nextlen; - nextlen = tree[(n + 1) * 2 + 1]/*.Len*/; - - if (++count < max_count && curlen === nextlen) { - continue; - - } else if (count < min_count) { - s.bl_tree[curlen * 2]/*.Freq*/ += count; - - } else if (curlen !== 0) { - - if (curlen !== prevlen) { s.bl_tree[curlen * 2]/*.Freq*/++; } - s.bl_tree[REP_3_6 * 2]/*.Freq*/++; - - } else if (count <= 10) { - s.bl_tree[REPZ_3_10 * 2]/*.Freq*/++; - - } else { - s.bl_tree[REPZ_11_138 * 2]/*.Freq*/++; - } - - count = 0; - prevlen = curlen; - - if (nextlen === 0) { - max_count = 138; - min_count = 3; - - } else if (curlen === nextlen) { - max_count = 6; - min_count = 3; - - } else { - max_count = 7; - min_count = 4; - } - } -} - - -/* =========================================================================== - * Send a literal or distance tree in compressed form, using the codes in - * bl_tree. - */ -function send_tree(s, tree, max_code) -// deflate_state *s; -// ct_data *tree; /* the tree to be scanned */ -// int max_code; /* and its largest code of non zero frequency */ -{ - var n; /* iterates over all tree elements */ - var prevlen = -1; /* last emitted length */ - var curlen; /* length of current code */ - - var nextlen = tree[0 * 2 + 1]/*.Len*/; /* length of next code */ - - var count = 0; /* repeat count of the current code */ - var max_count = 7; /* max repeat count */ - var min_count = 4; /* min repeat count */ - - /* tree[max_code+1].Len = -1; */ /* guard already set */ - if (nextlen === 0) { - max_count = 138; - min_count = 3; - } - - for (n = 0; n <= max_code; n++) { - curlen = nextlen; - nextlen = tree[(n + 1) * 2 + 1]/*.Len*/; - - if (++count < max_count && curlen === nextlen) { - continue; - - } else if (count < min_count) { - do { send_code(s, curlen, s.bl_tree); } while (--count !== 0); - - } else if (curlen !== 0) { - if (curlen !== prevlen) { - send_code(s, curlen, s.bl_tree); - count--; - } - //Assert(count >= 3 && count <= 6, " 3_6?"); - send_code(s, REP_3_6, s.bl_tree); - send_bits(s, count - 3, 2); - - } else if (count <= 10) { - send_code(s, REPZ_3_10, s.bl_tree); - send_bits(s, count - 3, 3); - - } else { - send_code(s, REPZ_11_138, s.bl_tree); - send_bits(s, count - 11, 7); - } - - count = 0; - prevlen = curlen; - if (nextlen === 0) { - max_count = 138; - min_count = 3; - - } else if (curlen === nextlen) { - max_count = 6; - min_count = 3; - - } else { - max_count = 7; - min_count = 4; - } - } -} - - -/* =========================================================================== - * Construct the Huffman tree for the bit lengths and return the index in - * bl_order of the last bit length code to send. - */ -function build_bl_tree(s) { - var max_blindex; /* index of last bit length code of non zero freq */ - - /* Determine the bit length frequencies for literal and distance trees */ - scan_tree(s, s.dyn_ltree, s.l_desc.max_code); - scan_tree(s, s.dyn_dtree, s.d_desc.max_code); - - /* Build the bit length tree: */ - build_tree(s, s.bl_desc); - /* opt_len now includes the length of the tree representations, except - * the lengths of the bit lengths codes and the 5+5+4 bits for the counts. - */ - - /* Determine the number of bit length codes to send. The pkzip format - * requires that at least 4 bit length codes be sent. (appnote.txt says - * 3 but the actual value used is 4.) - */ - for (max_blindex = BL_CODES - 1; max_blindex >= 3; max_blindex--) { - if (s.bl_tree[bl_order[max_blindex] * 2 + 1]/*.Len*/ !== 0) { - break; - } - } - /* Update opt_len to include the bit length tree and counts */ - s.opt_len += 3 * (max_blindex + 1) + 5 + 5 + 4; - //Tracev((stderr, "\ndyn trees: dyn %ld, stat %ld", - // s->opt_len, s->static_len)); - - return max_blindex; -} - - -/* =========================================================================== - * Send the header for a block using dynamic Huffman trees: the counts, the - * lengths of the bit length codes, the literal tree and the distance tree. - * IN assertion: lcodes >= 257, dcodes >= 1, blcodes >= 4. - */ -function send_all_trees(s, lcodes, dcodes, blcodes) -// deflate_state *s; -// int lcodes, dcodes, blcodes; /* number of codes for each tree */ -{ - var rank; /* index in bl_order */ - - //Assert (lcodes >= 257 && dcodes >= 1 && blcodes >= 4, "not enough codes"); - //Assert (lcodes <= L_CODES && dcodes <= D_CODES && blcodes <= BL_CODES, - // "too many codes"); - //Tracev((stderr, "\nbl counts: ")); - send_bits(s, lcodes - 257, 5); /* not +255 as stated in appnote.txt */ - send_bits(s, dcodes - 1, 5); - send_bits(s, blcodes - 4, 4); /* not -3 as stated in appnote.txt */ - for (rank = 0; rank < blcodes; rank++) { - //Tracev((stderr, "\nbl code %2d ", bl_order[rank])); - send_bits(s, s.bl_tree[bl_order[rank] * 2 + 1]/*.Len*/, 3); - } - //Tracev((stderr, "\nbl tree: sent %ld", s->bits_sent)); - - send_tree(s, s.dyn_ltree, lcodes - 1); /* literal tree */ - //Tracev((stderr, "\nlit tree: sent %ld", s->bits_sent)); - - send_tree(s, s.dyn_dtree, dcodes - 1); /* distance tree */ - //Tracev((stderr, "\ndist tree: sent %ld", s->bits_sent)); -} - - -/* =========================================================================== - * Check if the data type is TEXT or BINARY, using the following algorithm: - * - TEXT if the two conditions below are satisfied: - * a) There are no non-portable control characters belonging to the - * "black list" (0..6, 14..25, 28..31). - * b) There is at least one printable character belonging to the - * "white list" (9 {TAB}, 10 {LF}, 13 {CR}, 32..255). - * - BINARY otherwise. - * - The following partially-portable control characters form a - * "gray list" that is ignored in this detection algorithm: - * (7 {BEL}, 8 {BS}, 11 {VT}, 12 {FF}, 26 {SUB}, 27 {ESC}). - * IN assertion: the fields Freq of dyn_ltree are set. - */ -function detect_data_type(s) { - /* black_mask is the bit mask of black-listed bytes - * set bits 0..6, 14..25, and 28..31 - * 0xf3ffc07f = binary 11110011111111111100000001111111 - */ - var black_mask = 0xf3ffc07f; - var n; - - /* Check for non-textual ("black-listed") bytes. */ - for (n = 0; n <= 31; n++, black_mask >>>= 1) { - if ((black_mask & 1) && (s.dyn_ltree[n * 2]/*.Freq*/ !== 0)) { - return Z_BINARY; - } - } - - /* Check for textual ("white-listed") bytes. */ - if (s.dyn_ltree[9 * 2]/*.Freq*/ !== 0 || s.dyn_ltree[10 * 2]/*.Freq*/ !== 0 || - s.dyn_ltree[13 * 2]/*.Freq*/ !== 0) { - return Z_TEXT; - } - for (n = 32; n < LITERALS; n++) { - if (s.dyn_ltree[n * 2]/*.Freq*/ !== 0) { - return Z_TEXT; - } - } - - /* There are no "black-listed" or "white-listed" bytes: - * this stream either is empty or has tolerated ("gray-listed") bytes only. - */ - return Z_BINARY; -} - - -var static_init_done = false; - -/* =========================================================================== - * Initialize the tree data structures for a new zlib stream. - */ -function _tr_init(s) -{ - - if (!static_init_done) { - tr_static_init(); - static_init_done = true; - } - - s.l_desc = new TreeDesc(s.dyn_ltree, static_l_desc); - s.d_desc = new TreeDesc(s.dyn_dtree, static_d_desc); - s.bl_desc = new TreeDesc(s.bl_tree, static_bl_desc); - - s.bi_buf = 0; - s.bi_valid = 0; - - /* Initialize the first block of the first file: */ - init_block(s); -} - - -/* =========================================================================== - * Send a stored block - */ -function _tr_stored_block(s, buf, stored_len, last) -//DeflateState *s; -//charf *buf; /* input block */ -//ulg stored_len; /* length of input block */ -//int last; /* one if this is the last block for a file */ -{ - send_bits(s, (STORED_BLOCK << 1) + (last ? 1 : 0), 3); /* send block type */ - copy_block(s, buf, stored_len, true); /* with header */ -} - - -/* =========================================================================== - * Send one empty static block to give enough lookahead for inflate. - * This takes 10 bits, of which 7 may remain in the bit buffer. - */ -function _tr_align(s) { - send_bits(s, STATIC_TREES << 1, 3); - send_code(s, END_BLOCK, static_ltree); - bi_flush(s); -} - - -/* =========================================================================== - * Determine the best encoding for the current block: dynamic trees, static - * trees or store, and output the encoded block to the zip file. - */ -function _tr_flush_block(s, buf, stored_len, last) -//DeflateState *s; -//charf *buf; /* input block, or NULL if too old */ -//ulg stored_len; /* length of input block */ -//int last; /* one if this is the last block for a file */ -{ - var opt_lenb, static_lenb; /* opt_len and static_len in bytes */ - var max_blindex = 0; /* index of last bit length code of non zero freq */ - - /* Build the Huffman trees unless a stored block is forced */ - if (s.level > 0) { - - /* Check if the file is binary or text */ - if (s.strm.data_type === Z_UNKNOWN) { - s.strm.data_type = detect_data_type(s); - } - - /* Construct the literal and distance trees */ - build_tree(s, s.l_desc); - // Tracev((stderr, "\nlit data: dyn %ld, stat %ld", s->opt_len, - // s->static_len)); - - build_tree(s, s.d_desc); - // Tracev((stderr, "\ndist data: dyn %ld, stat %ld", s->opt_len, - // s->static_len)); - /* At this point, opt_len and static_len are the total bit lengths of - * the compressed block data, excluding the tree representations. - */ - - /* Build the bit length tree for the above two trees, and get the index - * in bl_order of the last bit length code to send. - */ - max_blindex = build_bl_tree(s); - - /* Determine the best encoding. Compute the block lengths in bytes. */ - opt_lenb = (s.opt_len + 3 + 7) >>> 3; - static_lenb = (s.static_len + 3 + 7) >>> 3; - - // Tracev((stderr, "\nopt %lu(%lu) stat %lu(%lu) stored %lu lit %u ", - // opt_lenb, s->opt_len, static_lenb, s->static_len, stored_len, - // s->last_lit)); - - if (static_lenb <= opt_lenb) { opt_lenb = static_lenb; } - - } else { - // Assert(buf != (char*)0, "lost buf"); - opt_lenb = static_lenb = stored_len + 5; /* force a stored block */ - } - - if ((stored_len + 4 <= opt_lenb) && (buf !== -1)) { - /* 4: two words for the lengths */ - - /* The test buf != NULL is only necessary if LIT_BUFSIZE > WSIZE. - * Otherwise we can't have processed more than WSIZE input bytes since - * the last block flush, because compression would have been - * successful. If LIT_BUFSIZE <= WSIZE, it is never too late to - * transform a block into a stored block. - */ - _tr_stored_block(s, buf, stored_len, last); - - } else if (s.strategy === Z_FIXED || static_lenb === opt_lenb) { - - send_bits(s, (STATIC_TREES << 1) + (last ? 1 : 0), 3); - compress_block(s, static_ltree, static_dtree); - - } else { - send_bits(s, (DYN_TREES << 1) + (last ? 1 : 0), 3); - send_all_trees(s, s.l_desc.max_code + 1, s.d_desc.max_code + 1, max_blindex + 1); - compress_block(s, s.dyn_ltree, s.dyn_dtree); - } - // Assert (s->compressed_len == s->bits_sent, "bad compressed size"); - /* The above check is made mod 2^32, for files larger than 512 MB - * and uLong implemented on 32 bits. - */ - init_block(s); - - if (last) { - bi_windup(s); - } - // Tracev((stderr,"\ncomprlen %lu(%lu) ", s->compressed_len>>3, - // s->compressed_len-7*last)); -} - -/* =========================================================================== - * Save the match info and tally the frequency counts. Return true if - * the current block must be flushed. - */ -function _tr_tally(s, dist, lc) -// deflate_state *s; -// unsigned dist; /* distance of matched string */ -// unsigned lc; /* match length-MIN_MATCH or unmatched char (if dist==0) */ -{ - //var out_length, in_length, dcode; - - s.pending_buf[s.d_buf + s.last_lit * 2] = (dist >>> 8) & 0xff; - s.pending_buf[s.d_buf + s.last_lit * 2 + 1] = dist & 0xff; - - s.pending_buf[s.l_buf + s.last_lit] = lc & 0xff; - s.last_lit++; - - if (dist === 0) { - /* lc is the unmatched char */ - s.dyn_ltree[lc * 2]/*.Freq*/++; - } else { - s.matches++; - /* Here, lc is the match length - MIN_MATCH */ - dist--; /* dist = match distance - 1 */ - //Assert((ush)dist < (ush)MAX_DIST(s) && - // (ush)lc <= (ush)(MAX_MATCH-MIN_MATCH) && - // (ush)d_code(dist) < (ush)D_CODES, "_tr_tally: bad match"); - - s.dyn_ltree[(_length_code[lc] + LITERALS + 1) * 2]/*.Freq*/++; - s.dyn_dtree[d_code(dist) * 2]/*.Freq*/++; - } - -// (!) This block is disabled in zlib defailts, -// don't enable it for binary compatibility - -//#ifdef TRUNCATE_BLOCK -// /* Try to guess if it is profitable to stop the current block here */ -// if ((s.last_lit & 0x1fff) === 0 && s.level > 2) { -// /* Compute an upper bound for the compressed length */ -// out_length = s.last_lit*8; -// in_length = s.strstart - s.block_start; -// -// for (dcode = 0; dcode < D_CODES; dcode++) { -// out_length += s.dyn_dtree[dcode*2]/*.Freq*/ * (5 + extra_dbits[dcode]); -// } -// out_length >>>= 3; -// //Tracev((stderr,"\nlast_lit %u, in %ld, out ~%ld(%ld%%) ", -// // s->last_lit, in_length, out_length, -// // 100L - out_length*100L/in_length)); -// if (s.matches < (s.last_lit>>1)/*int /2*/ && out_length < (in_length>>1)/*int /2*/) { -// return true; -// } -// } -//#endif - - return (s.last_lit === s.lit_bufsize - 1); - /* We avoid equality with lit_bufsize because of wraparound at 64K - * on 16 bit machines and because stored blocks are restricted to - * 64K-1 bytes. - */ -} - -exports._tr_init = _tr_init; -exports._tr_stored_block = _tr_stored_block; -exports._tr_flush_block = _tr_flush_block; -exports._tr_tally = _tr_tally; -exports._tr_align = _tr_align; - -},{"../utils/common":1}],8:[function(require,module,exports){ -'use strict'; - - -function ZStream() { - /* next input byte */ - this.input = null; // JS specific, because we have no pointers - this.next_in = 0; - /* number of bytes available at input */ - this.avail_in = 0; - /* total number of input bytes read so far */ - this.total_in = 0; - /* next output byte should be put there */ - this.output = null; // JS specific, because we have no pointers - this.next_out = 0; - /* remaining free space at output */ - this.avail_out = 0; - /* total number of bytes output so far */ - this.total_out = 0; - /* last error message, NULL if no error */ - this.msg = ''/*Z_NULL*/; - /* not visible by applications */ - this.state = null; - /* best guess about the data type: binary or text */ - this.data_type = 2/*Z_UNKNOWN*/; - /* adler32 value of the uncompressed data */ - this.adler = 0; -} - -module.exports = ZStream; - -},{}],"/lib/deflate.js":[function(require,module,exports){ -'use strict'; - - -var zlib_deflate = require('./zlib/deflate'); -var utils = require('./utils/common'); -var strings = require('./utils/strings'); -var msg = require('./zlib/messages'); -var ZStream = require('./zlib/zstream'); - -var toString = Object.prototype.toString; - -/* Public constants ==========================================================*/ -/* ===========================================================================*/ - -var Z_NO_FLUSH = 0; -var Z_FINISH = 4; - -var Z_OK = 0; -var Z_STREAM_END = 1; -var Z_SYNC_FLUSH = 2; - -var Z_DEFAULT_COMPRESSION = -1; - -var Z_DEFAULT_STRATEGY = 0; - -var Z_DEFLATED = 8; - -/* ===========================================================================*/ - - -/** - * class Deflate - * - * Generic JS-style wrapper for zlib calls. If you don't need - * streaming behaviour - use more simple functions: [[deflate]], - * [[deflateRaw]] and [[gzip]]. - **/ - -/* internal - * Deflate.chunks -> Array - * - * Chunks of output data, if [[Deflate#onData]] not overriden. - **/ - -/** - * Deflate.result -> Uint8Array|Array - * - * Compressed result, generated by default [[Deflate#onData]] - * and [[Deflate#onEnd]] handlers. Filled after you push last chunk - * (call [[Deflate#push]] with `Z_FINISH` / `true` param) or if you - * push a chunk with explicit flush (call [[Deflate#push]] with - * `Z_SYNC_FLUSH` param). - **/ - -/** - * Deflate.err -> Number - * - * Error code after deflate finished. 0 (Z_OK) on success. - * You will not need it in real life, because deflate errors - * are possible only on wrong options or bad `onData` / `onEnd` - * custom handlers. - **/ - -/** - * Deflate.msg -> String - * - * Error message, if [[Deflate.err]] != 0 - **/ - - -/** - * new Deflate(options) - * - options (Object): zlib deflate options. - * - * Creates new deflator instance with specified params. Throws exception - * on bad params. Supported options: - * - * - `level` - * - `windowBits` - * - `memLevel` - * - `strategy` - * - `dictionary` - * - * [http://zlib.net/manual.html#Advanced](http://zlib.net/manual.html#Advanced) - * for more information on these. - * - * Additional options, for internal needs: - * - * - `chunkSize` - size of generated data chunks (16K by default) - * - `raw` (Boolean) - do raw deflate - * - `gzip` (Boolean) - create gzip wrapper - * - `to` (String) - if equal to 'string', then result will be "binary string" - * (each char code [0..255]) - * - `header` (Object) - custom header for gzip - * - `text` (Boolean) - true if compressed data believed to be text - * - `time` (Number) - modification time, unix timestamp - * - `os` (Number) - operation system code - * - `extra` (Array) - array of bytes with extra data (max 65536) - * - `name` (String) - file name (binary string) - * - `comment` (String) - comment (binary string) - * - `hcrc` (Boolean) - true if header crc should be added - * - * ##### Example: - * - * ```javascript - * var pako = require('pako') - * , chunk1 = Uint8Array([1,2,3,4,5,6,7,8,9]) - * , chunk2 = Uint8Array([10,11,12,13,14,15,16,17,18,19]); - * - * var deflate = new pako.Deflate({ level: 3}); - * - * deflate.push(chunk1, false); - * deflate.push(chunk2, true); // true -> last chunk - * - * if (deflate.err) { throw new Error(deflate.err); } - * - * console.log(deflate.result); - * ``` - **/ -function Deflate(options) { - if (!(this instanceof Deflate)) return new Deflate(options); - - this.options = utils.assign({ - level: Z_DEFAULT_COMPRESSION, - method: Z_DEFLATED, - chunkSize: 16384, - windowBits: 15, - memLevel: 8, - strategy: Z_DEFAULT_STRATEGY, - to: '' - }, options || {}); - - var opt = this.options; - - if (opt.raw && (opt.windowBits > 0)) { - opt.windowBits = -opt.windowBits; - } - - else if (opt.gzip && (opt.windowBits > 0) && (opt.windowBits < 16)) { - opt.windowBits += 16; - } - - this.err = 0; // error code, if happens (0 = Z_OK) - this.msg = ''; // error message - this.ended = false; // used to avoid multiple onEnd() calls - this.chunks = []; // chunks of compressed data - - this.strm = new ZStream(); - this.strm.avail_out = 0; - - var status = zlib_deflate.deflateInit2( - this.strm, - opt.level, - opt.method, - opt.windowBits, - opt.memLevel, - opt.strategy - ); - - if (status !== Z_OK) { - throw new Error(msg[status]); - } - - if (opt.header) { - zlib_deflate.deflateSetHeader(this.strm, opt.header); - } - - if (opt.dictionary) { - var dict; - // Convert data if needed - if (typeof opt.dictionary === 'string') { - // If we need to compress text, change encoding to utf8. - dict = strings.string2buf(opt.dictionary); - } else if (toString.call(opt.dictionary) === '[object ArrayBuffer]') { - dict = new Uint8Array(opt.dictionary); - } else { - dict = opt.dictionary; - } - - status = zlib_deflate.deflateSetDictionary(this.strm, dict); - - if (status !== Z_OK) { - throw new Error(msg[status]); - } - - this._dict_set = true; - } -} - -/** - * Deflate#push(data[, mode]) -> Boolean - * - data (Uint8Array|Array|ArrayBuffer|String): input data. Strings will be - * converted to utf8 byte sequence. - * - mode (Number|Boolean): 0..6 for corresponding Z_NO_FLUSH..Z_TREE modes. - * See constants. Skipped or `false` means Z_NO_FLUSH, `true` meansh Z_FINISH. - * - * Sends input data to deflate pipe, generating [[Deflate#onData]] calls with - * new compressed chunks. Returns `true` on success. The last data block must have - * mode Z_FINISH (or `true`). That will flush internal pending buffers and call - * [[Deflate#onEnd]]. For interim explicit flushes (without ending the stream) you - * can use mode Z_SYNC_FLUSH, keeping the compression context. - * - * On fail call [[Deflate#onEnd]] with error code and return false. - * - * We strongly recommend to use `Uint8Array` on input for best speed (output - * array format is detected automatically). Also, don't skip last param and always - * use the same type in your code (boolean or number). That will improve JS speed. - * - * For regular `Array`-s make sure all elements are [0..255]. - * - * ##### Example - * - * ```javascript - * push(chunk, false); // push one of data chunks - * ... - * push(chunk, true); // push last chunk - * ``` - **/ -Deflate.prototype.push = function (data, mode) { - var strm = this.strm; - var chunkSize = this.options.chunkSize; - var status, _mode; - - if (this.ended) { return false; } - - _mode = (mode === ~~mode) ? mode : ((mode === true) ? Z_FINISH : Z_NO_FLUSH); - - // Convert data if needed - if (typeof data === 'string') { - // If we need to compress text, change encoding to utf8. - strm.input = strings.string2buf(data); - } else if (toString.call(data) === '[object ArrayBuffer]') { - strm.input = new Uint8Array(data); - } else { - strm.input = data; - } - - strm.next_in = 0; - strm.avail_in = strm.input.length; - - do { - if (strm.avail_out === 0) { - strm.output = new utils.Buf8(chunkSize); - strm.next_out = 0; - strm.avail_out = chunkSize; - } - status = zlib_deflate.deflate(strm, _mode); /* no bad return value */ - - if (status !== Z_STREAM_END && status !== Z_OK) { - this.onEnd(status); - this.ended = true; - return false; - } - if (strm.avail_out === 0 || (strm.avail_in === 0 && (_mode === Z_FINISH || _mode === Z_SYNC_FLUSH))) { - if (this.options.to === 'string') { - this.onData(strings.buf2binstring(utils.shrinkBuf(strm.output, strm.next_out))); - } else { - this.onData(utils.shrinkBuf(strm.output, strm.next_out)); - } - } - } while ((strm.avail_in > 0 || strm.avail_out === 0) && status !== Z_STREAM_END); - - // Finalize on the last chunk. - if (_mode === Z_FINISH) { - status = zlib_deflate.deflateEnd(this.strm); - this.onEnd(status); - this.ended = true; - return status === Z_OK; - } - - // callback interim results if Z_SYNC_FLUSH. - if (_mode === Z_SYNC_FLUSH) { - this.onEnd(Z_OK); - strm.avail_out = 0; - return true; - } - - return true; -}; - - -/** - * Deflate#onData(chunk) -> Void - * - chunk (Uint8Array|Array|String): ouput data. Type of array depends - * on js engine support. When string output requested, each chunk - * will be string. - * - * By default, stores data blocks in `chunks[]` property and glue - * those in `onEnd`. Override this handler, if you need another behaviour. - **/ -Deflate.prototype.onData = function (chunk) { - this.chunks.push(chunk); -}; - - -/** - * Deflate#onEnd(status) -> Void - * - status (Number): deflate status. 0 (Z_OK) on success, - * other if not. - * - * Called once after you tell deflate that the input stream is - * complete (Z_FINISH) or should be flushed (Z_SYNC_FLUSH) - * or if an error happened. By default - join collected chunks, - * free memory and fill `results` / `err` properties. - **/ -Deflate.prototype.onEnd = function (status) { - // On success - join - if (status === Z_OK) { - if (this.options.to === 'string') { - this.result = this.chunks.join(''); - } else { - this.result = utils.flattenChunks(this.chunks); - } - } - this.chunks = []; - this.err = status; - this.msg = this.strm.msg; -}; - - -/** - * deflate(data[, options]) -> Uint8Array|Array|String - * - data (Uint8Array|Array|String): input data to compress. - * - options (Object): zlib deflate options. - * - * Compress `data` with deflate algorithm and `options`. - * - * Supported options are: - * - * - level - * - windowBits - * - memLevel - * - strategy - * - dictionary - * - * [http://zlib.net/manual.html#Advanced](http://zlib.net/manual.html#Advanced) - * for more information on these. - * - * Sugar (options): - * - * - `raw` (Boolean) - say that we work with raw stream, if you don't wish to specify - * negative windowBits implicitly. - * - `to` (String) - if equal to 'string', then result will be "binary string" - * (each char code [0..255]) - * - * ##### Example: - * - * ```javascript - * var pako = require('pako') - * , data = Uint8Array([1,2,3,4,5,6,7,8,9]); - * - * console.log(pako.deflate(data)); - * ``` - **/ -function deflate(input, options) { - var deflator = new Deflate(options); - - deflator.push(input, true); - - // That will never happens, if you don't cheat with options :) - if (deflator.err) { throw deflator.msg; } - - return deflator.result; -} - - -/** - * deflateRaw(data[, options]) -> Uint8Array|Array|String - * - data (Uint8Array|Array|String): input data to compress. - * - options (Object): zlib deflate options. - * - * The same as [[deflate]], but creates raw data, without wrapper - * (header and adler32 crc). - **/ -function deflateRaw(input, options) { - options = options || {}; - options.raw = true; - return deflate(input, options); -} - - -/** - * gzip(data[, options]) -> Uint8Array|Array|String - * - data (Uint8Array|Array|String): input data to compress. - * - options (Object): zlib deflate options. - * - * The same as [[deflate]], but create gzip wrapper instead of - * deflate one. - **/ -function gzip(input, options) { - options = options || {}; - options.gzip = true; - return deflate(input, options); -} - - -exports.Deflate = Deflate; -exports.deflate = deflate; -exports.deflateRaw = deflateRaw; -exports.gzip = gzip; - -},{"./utils/common":1,"./utils/strings":2,"./zlib/deflate":5,"./zlib/messages":6,"./zlib/zstream":8}]},{},[])("/lib/deflate.js") -}); \ No newline at end of file diff --git a/node_modules/pako/dist/pako_deflate.min.js b/node_modules/pako/dist/pako_deflate.min.js deleted file mode 100644 index b307f853..00000000 --- a/node_modules/pako/dist/pako_deflate.min.js +++ /dev/null @@ -1,2 +0,0 @@ -/* pako 0.2.9 nodeca/pako */ -!function(t){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var e;e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,e.pako=t()}}(function(){return function t(e,a,n){function r(s,h){if(!a[s]){if(!e[s]){var l="function"==typeof require&&require;if(!h&&l)return l(s,!0);if(i)return i(s,!0);var o=new Error("Cannot find module '"+s+"'");throw o.code="MODULE_NOT_FOUND",o}var _=a[s]={exports:{}};e[s][0].call(_.exports,function(t){var a=e[s][1][t];return r(a?a:t)},_,_.exports,t,e,a,n)}return a[s].exports}for(var i="function"==typeof require&&require,s=0;s=252?6:l>=248?5:l>=240?4:l>=224?3:l>=192?2:1;h[254]=h[254]=1,a.string2buf=function(t){var e,a,n,i,s,h=t.length,l=0;for(i=0;i>>6,e[s++]=128|63&a):a<65536?(e[s++]=224|a>>>12,e[s++]=128|a>>>6&63,e[s++]=128|63&a):(e[s++]=240|a>>>18,e[s++]=128|a>>>12&63,e[s++]=128|a>>>6&63,e[s++]=128|63&a);return e},a.buf2binstring=function(t){return n(t,t.length)},a.binstring2buf=function(t){for(var e=new r.Buf8(t.length),a=0,n=e.length;a4)o[r++]=65533,a+=s-1;else{for(i&=2===s?31:3===s?15:7;s>1&&a1?o[r++]=65533:i<65536?o[r++]=i:(i-=65536,o[r++]=55296|i>>10&1023,o[r++]=56320|1023&i)}return n(o,r)},a.utf8border=function(t,e){var a;for(e=e||t.length,e>t.length&&(e=t.length),a=e-1;a>=0&&128===(192&t[a]);)a--;return a<0?e:0===a?e:a+h[t[a]]>e?a:e}},{"./common":1}],3:[function(t,e,a){"use strict";function n(t,e,a,n){for(var r=65535&t|0,i=t>>>16&65535|0,s=0;0!==a;){s=a>2e3?2e3:a,a-=s;do r=r+e[n++]|0,i=i+r|0;while(--s);r%=65521,i%=65521}return r|i<<16|0}e.exports=n},{}],4:[function(t,e,a){"use strict";function n(){for(var t,e=[],a=0;a<256;a++){t=a;for(var n=0;n<8;n++)t=1&t?3988292384^t>>>1:t>>>1;e[a]=t}return e}function r(t,e,a,n){var r=i,s=n+a;t^=-1;for(var h=n;h>>8^r[255&(t^e[h])];return t^-1}var i=n();e.exports=r},{}],5:[function(t,e,a){"use strict";function n(t,e){return t.msg=O[e],e}function r(t){return(t<<1)-(t>4?9:0)}function i(t){for(var e=t.length;--e>=0;)t[e]=0}function s(t){var e=t.state,a=e.pending;a>t.avail_out&&(a=t.avail_out),0!==a&&(j.arraySet(t.output,e.pending_buf,e.pending_out,a,t.next_out),t.next_out+=a,e.pending_out+=a,t.total_out+=a,t.avail_out-=a,e.pending-=a,0===e.pending&&(e.pending_out=0))}function h(t,e){U._tr_flush_block(t,t.block_start>=0?t.block_start:-1,t.strstart-t.block_start,e),t.block_start=t.strstart,s(t.strm)}function l(t,e){t.pending_buf[t.pending++]=e}function o(t,e){t.pending_buf[t.pending++]=e>>>8&255,t.pending_buf[t.pending++]=255&e}function _(t,e,a,n){var r=t.avail_in;return r>n&&(r=n),0===r?0:(t.avail_in-=r,j.arraySet(e,t.input,t.next_in,r,a),1===t.state.wrap?t.adler=D(t.adler,e,r,a):2===t.state.wrap&&(t.adler=I(t.adler,e,r,a)),t.next_in+=r,t.total_in+=r,r)}function d(t,e){var a,n,r=t.max_chain_length,i=t.strstart,s=t.prev_length,h=t.nice_match,l=t.strstart>t.w_size-dt?t.strstart-(t.w_size-dt):0,o=t.window,_=t.w_mask,d=t.prev,u=t.strstart+_t,f=o[i+s-1],c=o[i+s];t.prev_length>=t.good_match&&(r>>=2),h>t.lookahead&&(h=t.lookahead);do if(a=e,o[a+s]===c&&o[a+s-1]===f&&o[a]===o[i]&&o[++a]===o[i+1]){i+=2,a++;do;while(o[++i]===o[++a]&&o[++i]===o[++a]&&o[++i]===o[++a]&&o[++i]===o[++a]&&o[++i]===o[++a]&&o[++i]===o[++a]&&o[++i]===o[++a]&&o[++i]===o[++a]&&is){if(t.match_start=e,s=n,n>=h)break;f=o[i+s-1],c=o[i+s]}}while((e=d[e&_])>l&&0!==--r);return s<=t.lookahead?s:t.lookahead}function u(t){var e,a,n,r,i,s=t.w_size;do{if(r=t.window_size-t.lookahead-t.strstart,t.strstart>=s+(s-dt)){j.arraySet(t.window,t.window,s,s,0),t.match_start-=s,t.strstart-=s,t.block_start-=s,a=t.hash_size,e=a;do n=t.head[--e],t.head[e]=n>=s?n-s:0;while(--a);a=s,e=a;do n=t.prev[--e],t.prev[e]=n>=s?n-s:0;while(--a);r+=s}if(0===t.strm.avail_in)break;if(a=_(t.strm,t.window,t.strstart+t.lookahead,r),t.lookahead+=a,t.lookahead+t.insert>=ot)for(i=t.strstart-t.insert,t.ins_h=t.window[i],t.ins_h=(t.ins_h<t.pending_buf_size-5&&(a=t.pending_buf_size-5);;){if(t.lookahead<=1){if(u(t),0===t.lookahead&&e===q)return vt;if(0===t.lookahead)break}t.strstart+=t.lookahead,t.lookahead=0;var n=t.block_start+a;if((0===t.strstart||t.strstart>=n)&&(t.lookahead=t.strstart-n,t.strstart=n,h(t,!1),0===t.strm.avail_out))return vt;if(t.strstart-t.block_start>=t.w_size-dt&&(h(t,!1),0===t.strm.avail_out))return vt}return t.insert=0,e===N?(h(t,!0),0===t.strm.avail_out?kt:zt):t.strstart>t.block_start&&(h(t,!1),0===t.strm.avail_out)?vt:vt}function c(t,e){for(var a,n;;){if(t.lookahead=ot&&(t.ins_h=(t.ins_h<=ot)if(n=U._tr_tally(t,t.strstart-t.match_start,t.match_length-ot),t.lookahead-=t.match_length,t.match_length<=t.max_lazy_match&&t.lookahead>=ot){t.match_length--;do t.strstart++,t.ins_h=(t.ins_h<=ot&&(t.ins_h=(t.ins_h<4096)&&(t.match_length=ot-1)),t.prev_length>=ot&&t.match_length<=t.prev_length){r=t.strstart+t.lookahead-ot,n=U._tr_tally(t,t.strstart-1-t.prev_match,t.prev_length-ot),t.lookahead-=t.prev_length-1,t.prev_length-=2;do++t.strstart<=r&&(t.ins_h=(t.ins_h<=ot&&t.strstart>0&&(r=t.strstart-1,n=s[r],n===s[++r]&&n===s[++r]&&n===s[++r])){i=t.strstart+_t;do;while(n===s[++r]&&n===s[++r]&&n===s[++r]&&n===s[++r]&&n===s[++r]&&n===s[++r]&&n===s[++r]&&n===s[++r]&&rt.lookahead&&(t.match_length=t.lookahead)}if(t.match_length>=ot?(a=U._tr_tally(t,1,t.match_length-ot),t.lookahead-=t.match_length,t.strstart+=t.match_length,t.match_length=0):(a=U._tr_tally(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++),a&&(h(t,!1),0===t.strm.avail_out))return vt}return t.insert=0,e===N?(h(t,!0),0===t.strm.avail_out?kt:zt):t.last_lit&&(h(t,!1),0===t.strm.avail_out)?vt:yt}function m(t,e){for(var a;;){if(0===t.lookahead&&(u(t),0===t.lookahead)){if(e===q)return vt;break}if(t.match_length=0,a=U._tr_tally(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++,a&&(h(t,!1),0===t.strm.avail_out))return vt}return t.insert=0,e===N?(h(t,!0),0===t.strm.avail_out?kt:zt):t.last_lit&&(h(t,!1),0===t.strm.avail_out)?vt:yt}function b(t,e,a,n,r){this.good_length=t,this.max_lazy=e,this.nice_length=a,this.max_chain=n,this.func=r}function w(t){t.window_size=2*t.w_size,i(t.head),t.max_lazy_match=E[t.level].max_lazy,t.good_match=E[t.level].good_length,t.nice_match=E[t.level].nice_length,t.max_chain_length=E[t.level].max_chain,t.strstart=0,t.block_start=0,t.lookahead=0,t.insert=0,t.match_length=t.prev_length=ot-1,t.match_available=0,t.ins_h=0}function v(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=Z,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new j.Buf16(2*ht),this.dyn_dtree=new j.Buf16(2*(2*it+1)),this.bl_tree=new j.Buf16(2*(2*st+1)),i(this.dyn_ltree),i(this.dyn_dtree),i(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new j.Buf16(lt+1),this.heap=new j.Buf16(2*rt+1),i(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new j.Buf16(2*rt+1),i(this.depth),this.l_buf=0,this.lit_bufsize=0,this.last_lit=0,this.d_buf=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}function y(t){var e;return t&&t.state?(t.total_in=t.total_out=0,t.data_type=Y,e=t.state,e.pending=0,e.pending_out=0,e.wrap<0&&(e.wrap=-e.wrap),e.status=e.wrap?ft:bt,t.adler=2===e.wrap?0:1,e.last_flush=q,U._tr_init(e),H):n(t,K)}function k(t){var e=y(t);return e===H&&w(t.state),e}function z(t,e){return t&&t.state?2!==t.state.wrap?K:(t.state.gzhead=e,H):K}function x(t,e,a,r,i,s){if(!t)return K;var h=1;if(e===G&&(e=6),r<0?(h=0,r=-r):r>15&&(h=2,r-=16),i<1||i>$||a!==Z||r<8||r>15||e<0||e>9||s<0||s>W)return n(t,K);8===r&&(r=9);var l=new v;return t.state=l,l.strm=t,l.wrap=h,l.gzhead=null,l.w_bits=r,l.w_size=1<R||e<0)return t?n(t,K):K;if(h=t.state,!t.output||!t.input&&0!==t.avail_in||h.status===wt&&e!==N)return n(t,0===t.avail_out?P:K);if(h.strm=t,a=h.last_flush,h.last_flush=e,h.status===ft)if(2===h.wrap)t.adler=0,l(h,31),l(h,139),l(h,8),h.gzhead?(l(h,(h.gzhead.text?1:0)+(h.gzhead.hcrc?2:0)+(h.gzhead.extra?4:0)+(h.gzhead.name?8:0)+(h.gzhead.comment?16:0)),l(h,255&h.gzhead.time),l(h,h.gzhead.time>>8&255),l(h,h.gzhead.time>>16&255),l(h,h.gzhead.time>>24&255),l(h,9===h.level?2:h.strategy>=Q||h.level<2?4:0),l(h,255&h.gzhead.os),h.gzhead.extra&&h.gzhead.extra.length&&(l(h,255&h.gzhead.extra.length),l(h,h.gzhead.extra.length>>8&255)),h.gzhead.hcrc&&(t.adler=I(t.adler,h.pending_buf,h.pending,0)),h.gzindex=0,h.status=ct):(l(h,0),l(h,0),l(h,0),l(h,0),l(h,0),l(h,9===h.level?2:h.strategy>=Q||h.level<2?4:0),l(h,xt),h.status=bt);else{var u=Z+(h.w_bits-8<<4)<<8,f=-1;f=h.strategy>=Q||h.level<2?0:h.level<6?1:6===h.level?2:3,u|=f<<6,0!==h.strstart&&(u|=ut),u+=31-u%31,h.status=bt,o(h,u),0!==h.strstart&&(o(h,t.adler>>>16),o(h,65535&t.adler)),t.adler=1}if(h.status===ct)if(h.gzhead.extra){for(_=h.pending;h.gzindex<(65535&h.gzhead.extra.length)&&(h.pending!==h.pending_buf_size||(h.gzhead.hcrc&&h.pending>_&&(t.adler=I(t.adler,h.pending_buf,h.pending-_,_)),s(t),_=h.pending,h.pending!==h.pending_buf_size));)l(h,255&h.gzhead.extra[h.gzindex]),h.gzindex++;h.gzhead.hcrc&&h.pending>_&&(t.adler=I(t.adler,h.pending_buf,h.pending-_,_)),h.gzindex===h.gzhead.extra.length&&(h.gzindex=0,h.status=pt)}else h.status=pt;if(h.status===pt)if(h.gzhead.name){_=h.pending;do{if(h.pending===h.pending_buf_size&&(h.gzhead.hcrc&&h.pending>_&&(t.adler=I(t.adler,h.pending_buf,h.pending-_,_)),s(t),_=h.pending,h.pending===h.pending_buf_size)){d=1;break}d=h.gzindex_&&(t.adler=I(t.adler,h.pending_buf,h.pending-_,_)),0===d&&(h.gzindex=0,h.status=gt)}else h.status=gt;if(h.status===gt)if(h.gzhead.comment){_=h.pending;do{if(h.pending===h.pending_buf_size&&(h.gzhead.hcrc&&h.pending>_&&(t.adler=I(t.adler,h.pending_buf,h.pending-_,_)),s(t),_=h.pending,h.pending===h.pending_buf_size)){d=1;break}d=h.gzindex_&&(t.adler=I(t.adler,h.pending_buf,h.pending-_,_)),0===d&&(h.status=mt)}else h.status=mt;if(h.status===mt&&(h.gzhead.hcrc?(h.pending+2>h.pending_buf_size&&s(t),h.pending+2<=h.pending_buf_size&&(l(h,255&t.adler),l(h,t.adler>>8&255),t.adler=0,h.status=bt)):h.status=bt),0!==h.pending){if(s(t),0===t.avail_out)return h.last_flush=-1,H}else if(0===t.avail_in&&r(e)<=r(a)&&e!==N)return n(t,P);if(h.status===wt&&0!==t.avail_in)return n(t,P);if(0!==t.avail_in||0!==h.lookahead||e!==q&&h.status!==wt){var c=h.strategy===Q?m(h,e):h.strategy===V?g(h,e):E[h.level].func(h,e);if(c!==kt&&c!==zt||(h.status=wt),c===vt||c===kt)return 0===t.avail_out&&(h.last_flush=-1),H;if(c===yt&&(e===T?U._tr_align(h):e!==R&&(U._tr_stored_block(h,0,0,!1),e===L&&(i(h.head),0===h.lookahead&&(h.strstart=0,h.block_start=0,h.insert=0))),s(t),0===t.avail_out))return h.last_flush=-1,H}return e!==N?H:h.wrap<=0?F:(2===h.wrap?(l(h,255&t.adler),l(h,t.adler>>8&255),l(h,t.adler>>16&255),l(h,t.adler>>24&255),l(h,255&t.total_in),l(h,t.total_in>>8&255),l(h,t.total_in>>16&255),l(h,t.total_in>>24&255)):(o(h,t.adler>>>16),o(h,65535&t.adler)),s(t),h.wrap>0&&(h.wrap=-h.wrap),0!==h.pending?H:F)}function C(t){var e;return t&&t.state?(e=t.state.status,e!==ft&&e!==ct&&e!==pt&&e!==gt&&e!==mt&&e!==bt&&e!==wt?n(t,K):(t.state=null,e===bt?n(t,M):H)):K}function S(t,e){var a,n,r,s,h,l,o,_,d=e.length;if(!t||!t.state)return K;if(a=t.state,s=a.wrap,2===s||1===s&&a.status!==ft||a.lookahead)return K;for(1===s&&(t.adler=D(t.adler,e,d,0)),a.wrap=0,d>=a.w_size&&(0===s&&(i(a.head),a.strstart=0,a.block_start=0,a.insert=0),_=new j.Buf8(a.w_size),j.arraySet(_,e,d-a.w_size,a.w_size,0),e=_,d=a.w_size),h=t.avail_in,l=t.next_in,o=t.input,t.avail_in=d,t.next_in=0,t.input=e,u(a);a.lookahead>=ot;){n=a.strstart,r=a.lookahead-(ot-1);do a.ins_h=(a.ins_h<=0;)t[e]=0}function r(t,e,a,n,r){this.static_tree=t,this.extra_bits=e,this.extra_base=a,this.elems=n,this.max_length=r,this.has_stree=t&&t.length}function i(t,e){this.dyn_tree=t,this.max_code=0,this.stat_desc=e}function s(t){return t<256?lt[t]:lt[256+(t>>>7)]}function h(t,e){t.pending_buf[t.pending++]=255&e,t.pending_buf[t.pending++]=e>>>8&255}function l(t,e,a){t.bi_valid>W-a?(t.bi_buf|=e<>W-t.bi_valid,t.bi_valid+=a-W):(t.bi_buf|=e<>>=1,a<<=1;while(--e>0);return a>>>1}function d(t){16===t.bi_valid?(h(t,t.bi_buf),t.bi_buf=0,t.bi_valid=0):t.bi_valid>=8&&(t.pending_buf[t.pending++]=255&t.bi_buf,t.bi_buf>>=8,t.bi_valid-=8)}function u(t,e){var a,n,r,i,s,h,l=e.dyn_tree,o=e.max_code,_=e.stat_desc.static_tree,d=e.stat_desc.has_stree,u=e.stat_desc.extra_bits,f=e.stat_desc.extra_base,c=e.stat_desc.max_length,p=0;for(i=0;i<=V;i++)t.bl_count[i]=0;for(l[2*t.heap[t.heap_max]+1]=0,a=t.heap_max+1;ac&&(i=c,p++),l[2*n+1]=i,n>o||(t.bl_count[i]++,s=0,n>=f&&(s=u[n-f]),h=l[2*n],t.opt_len+=h*(i+s),d&&(t.static_len+=h*(_[2*n+1]+s)));if(0!==p){do{for(i=c-1;0===t.bl_count[i];)i--;t.bl_count[i]--,t.bl_count[i+1]+=2,t.bl_count[c]--,p-=2}while(p>0);for(i=c;0!==i;i--)for(n=t.bl_count[i];0!==n;)r=t.heap[--a],r>o||(l[2*r+1]!==i&&(t.opt_len+=(i-l[2*r+1])*l[2*r],l[2*r+1]=i),n--)}}function f(t,e,a){var n,r,i=new Array(V+1),s=0;for(n=1;n<=V;n++)i[n]=s=s+a[n-1]<<1;for(r=0;r<=e;r++){var h=t[2*r+1];0!==h&&(t[2*r]=_(i[h]++,h))}}function c(){var t,e,a,n,i,s=new Array(V+1);for(a=0,n=0;n>=7;n8?h(t,t.bi_buf):t.bi_valid>0&&(t.pending_buf[t.pending++]=t.bi_buf),t.bi_buf=0,t.bi_valid=0}function m(t,e,a,n){g(t),n&&(h(t,a),h(t,~a)),D.arraySet(t.pending_buf,t.window,e,a,t.pending),t.pending+=a}function b(t,e,a,n){var r=2*e,i=2*a;return t[r]>1;a>=1;a--)w(t,i,a);r=l;do a=t.heap[1],t.heap[1]=t.heap[t.heap_len--],w(t,i,1),n=t.heap[1],t.heap[--t.heap_max]=a,t.heap[--t.heap_max]=n,i[2*r]=i[2*a]+i[2*n],t.depth[r]=(t.depth[a]>=t.depth[n]?t.depth[a]:t.depth[n])+1,i[2*a+1]=i[2*n+1]=r,t.heap[1]=r++,w(t,i,1);while(t.heap_len>=2);t.heap[--t.heap_max]=t.heap[1],u(t,e),f(i,o,t.bl_count)}function k(t,e,a){var n,r,i=-1,s=e[1],h=0,l=7,o=4;for(0===s&&(l=138,o=3),e[2*(a+1)+1]=65535,n=0;n<=a;n++)r=s,s=e[2*(n+1)+1],++h=3&&0===t.bl_tree[2*rt[e]+1];e--);return t.opt_len+=3*(e+1)+5+5+4,e}function B(t,e,a,n){var r;for(l(t,e-257,5),l(t,a-1,5),l(t,n-4,4),r=0;r>>=1)if(1&a&&0!==t.dyn_ltree[2*e])return O;if(0!==t.dyn_ltree[18]||0!==t.dyn_ltree[20]||0!==t.dyn_ltree[26])return q;for(e=32;e0?(t.strm.data_type===T&&(t.strm.data_type=A(t)),y(t,t.l_desc),y(t,t.d_desc),s=x(t),r=t.opt_len+3+7>>>3,i=t.static_len+3+7>>>3,i<=r&&(r=i)):r=i=a+5,a+4<=r&&e!==-1?S(t,e,a,n):t.strategy===I||i===r?(l(t,(N<<1)+(n?1:0),3),v(t,st,ht)):(l(t,(R<<1)+(n?1:0),3),B(t,t.l_desc.max_code+1,t.d_desc.max_code+1,s+1),v(t,t.dyn_ltree,t.dyn_dtree)),p(t),n&&g(t)}function U(t,e,a){return t.pending_buf[t.d_buf+2*t.last_lit]=e>>>8&255,t.pending_buf[t.d_buf+2*t.last_lit+1]=255&e,t.pending_buf[t.l_buf+t.last_lit]=255&a,t.last_lit++,0===e?t.dyn_ltree[2*a]++:(t.matches++,e--,t.dyn_ltree[2*(ot[a]+M+1)]++,t.dyn_dtree[2*s(e)]++),t.last_lit===t.lit_bufsize-1}var D=t("../utils/common"),I=4,O=0,q=1,T=2,L=0,N=1,R=2,H=3,F=258,K=29,M=256,P=M+1+K,G=30,J=19,Q=2*P+1,V=15,W=16,X=7,Y=256,Z=16,$=17,tt=18,et=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],at=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],nt=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],rt=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],it=512,st=new Array(2*(P+2));n(st);var ht=new Array(2*G);n(ht);var lt=new Array(it);n(lt);var ot=new Array(F-H+1);n(ot);var _t=new Array(K);n(_t);var dt=new Array(G);n(dt);var ut,ft,ct,pt=!1;a._tr_init=C,a._tr_stored_block=S,a._tr_flush_block=j,a._tr_tally=U,a._tr_align=E},{"../utils/common":1}],8:[function(t,e,a){"use strict";function n(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}e.exports=n},{}],"/lib/deflate.js":[function(t,e,a){"use strict";function n(t){if(!(this instanceof n))return new n(t);this.options=l.assign({level:b,method:v,chunkSize:16384,windowBits:15,memLevel:8,strategy:w,to:""},t||{});var e=this.options;e.raw&&e.windowBits>0?e.windowBits=-e.windowBits:e.gzip&&e.windowBits>0&&e.windowBits<16&&(e.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new d,this.strm.avail_out=0;var a=h.deflateInit2(this.strm,e.level,e.method,e.windowBits,e.memLevel,e.strategy);if(a!==p)throw new Error(_[a]);if(e.header&&h.deflateSetHeader(this.strm,e.header),e.dictionary){var r;if(r="string"==typeof e.dictionary?o.string2buf(e.dictionary):"[object ArrayBuffer]"===u.call(e.dictionary)?new Uint8Array(e.dictionary):e.dictionary,a=h.deflateSetDictionary(this.strm,r),a!==p)throw new Error(_[a]);this._dict_set=!0}}function r(t,e){var a=new n(e);if(a.push(t,!0),a.err)throw a.msg;return a.result}function i(t,e){return e=e||{},e.raw=!0,r(t,e)}function s(t,e){return e=e||{},e.gzip=!0,r(t,e)}var h=t("./zlib/deflate"),l=t("./utils/common"),o=t("./utils/strings"),_=t("./zlib/messages"),d=t("./zlib/zstream"),u=Object.prototype.toString,f=0,c=4,p=0,g=1,m=2,b=-1,w=0,v=8;n.prototype.push=function(t,e){var a,n,r=this.strm,i=this.options.chunkSize;if(this.ended)return!1;n=e===~~e?e:e===!0?c:f,"string"==typeof t?r.input=o.string2buf(t):"[object ArrayBuffer]"===u.call(t)?r.input=new Uint8Array(t):r.input=t,r.next_in=0,r.avail_in=r.input.length;do{if(0===r.avail_out&&(r.output=new l.Buf8(i),r.next_out=0,r.avail_out=i),a=h.deflate(r,n),a!==g&&a!==p)return this.onEnd(a),this.ended=!0,!1;0!==r.avail_out&&(0!==r.avail_in||n!==c&&n!==m)||("string"===this.options.to?this.onData(o.buf2binstring(l.shrinkBuf(r.output,r.next_out))):this.onData(l.shrinkBuf(r.output,r.next_out)))}while((r.avail_in>0||0===r.avail_out)&&a!==g);return n===c?(a=h.deflateEnd(this.strm),this.onEnd(a),this.ended=!0,a===p):n!==m||(this.onEnd(p),r.avail_out=0,!0)},n.prototype.onData=function(t){this.chunks.push(t)},n.prototype.onEnd=function(t){t===p&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=l.flattenChunks(this.chunks)),this.chunks=[],this.err=t,this.msg=this.strm.msg},a.Deflate=n,a.deflate=r,a.deflateRaw=i,a.gzip=s},{"./utils/common":1,"./utils/strings":2,"./zlib/deflate":5,"./zlib/messages":6,"./zlib/zstream":8}]},{},[])("/lib/deflate.js")}); diff --git a/node_modules/pako/dist/pako_inflate.js b/node_modules/pako/dist/pako_inflate.js deleted file mode 100644 index c3e2e0e7..00000000 --- a/node_modules/pako/dist/pako_inflate.js +++ /dev/null @@ -1,3127 +0,0 @@ -/* pako 0.2.9 nodeca/pako */(function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.pako = f()}})(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o= 252 ? 6 : q >= 248 ? 5 : q >= 240 ? 4 : q >= 224 ? 3 : q >= 192 ? 2 : 1); -} -_utf8len[254] = _utf8len[254] = 1; // Invalid sequence start - - -// convert string to array (typed, when possible) -exports.string2buf = function (str) { - var buf, c, c2, m_pos, i, str_len = str.length, buf_len = 0; - - // count binary size - for (m_pos = 0; m_pos < str_len; m_pos++) { - c = str.charCodeAt(m_pos); - if ((c & 0xfc00) === 0xd800 && (m_pos + 1 < str_len)) { - c2 = str.charCodeAt(m_pos + 1); - if ((c2 & 0xfc00) === 0xdc00) { - c = 0x10000 + ((c - 0xd800) << 10) + (c2 - 0xdc00); - m_pos++; - } - } - buf_len += c < 0x80 ? 1 : c < 0x800 ? 2 : c < 0x10000 ? 3 : 4; - } - - // allocate buffer - buf = new utils.Buf8(buf_len); - - // convert - for (i = 0, m_pos = 0; i < buf_len; m_pos++) { - c = str.charCodeAt(m_pos); - if ((c & 0xfc00) === 0xd800 && (m_pos + 1 < str_len)) { - c2 = str.charCodeAt(m_pos + 1); - if ((c2 & 0xfc00) === 0xdc00) { - c = 0x10000 + ((c - 0xd800) << 10) + (c2 - 0xdc00); - m_pos++; - } - } - if (c < 0x80) { - /* one byte */ - buf[i++] = c; - } else if (c < 0x800) { - /* two bytes */ - buf[i++] = 0xC0 | (c >>> 6); - buf[i++] = 0x80 | (c & 0x3f); - } else if (c < 0x10000) { - /* three bytes */ - buf[i++] = 0xE0 | (c >>> 12); - buf[i++] = 0x80 | (c >>> 6 & 0x3f); - buf[i++] = 0x80 | (c & 0x3f); - } else { - /* four bytes */ - buf[i++] = 0xf0 | (c >>> 18); - buf[i++] = 0x80 | (c >>> 12 & 0x3f); - buf[i++] = 0x80 | (c >>> 6 & 0x3f); - buf[i++] = 0x80 | (c & 0x3f); - } - } - - return buf; -}; - -// Helper (used in 2 places) -function buf2binstring(buf, len) { - // use fallback for big arrays to avoid stack overflow - if (len < 65537) { - if ((buf.subarray && STR_APPLY_UIA_OK) || (!buf.subarray && STR_APPLY_OK)) { - return String.fromCharCode.apply(null, utils.shrinkBuf(buf, len)); - } - } - - var result = ''; - for (var i = 0; i < len; i++) { - result += String.fromCharCode(buf[i]); - } - return result; -} - - -// Convert byte array to binary string -exports.buf2binstring = function (buf) { - return buf2binstring(buf, buf.length); -}; - - -// Convert binary string (typed, when possible) -exports.binstring2buf = function (str) { - var buf = new utils.Buf8(str.length); - for (var i = 0, len = buf.length; i < len; i++) { - buf[i] = str.charCodeAt(i); - } - return buf; -}; - - -// convert array to string -exports.buf2string = function (buf, max) { - var i, out, c, c_len; - var len = max || buf.length; - - // Reserve max possible length (2 words per char) - // NB: by unknown reasons, Array is significantly faster for - // String.fromCharCode.apply than Uint16Array. - var utf16buf = new Array(len * 2); - - for (out = 0, i = 0; i < len;) { - c = buf[i++]; - // quick process ascii - if (c < 0x80) { utf16buf[out++] = c; continue; } - - c_len = _utf8len[c]; - // skip 5 & 6 byte codes - if (c_len > 4) { utf16buf[out++] = 0xfffd; i += c_len - 1; continue; } - - // apply mask on first byte - c &= c_len === 2 ? 0x1f : c_len === 3 ? 0x0f : 0x07; - // join the rest - while (c_len > 1 && i < len) { - c = (c << 6) | (buf[i++] & 0x3f); - c_len--; - } - - // terminated by end of string? - if (c_len > 1) { utf16buf[out++] = 0xfffd; continue; } - - if (c < 0x10000) { - utf16buf[out++] = c; - } else { - c -= 0x10000; - utf16buf[out++] = 0xd800 | ((c >> 10) & 0x3ff); - utf16buf[out++] = 0xdc00 | (c & 0x3ff); - } - } - - return buf2binstring(utf16buf, out); -}; - - -// Calculate max possible position in utf8 buffer, -// that will not break sequence. If that's not possible -// - (very small limits) return max size as is. -// -// buf[] - utf8 bytes array -// max - length limit (mandatory); -exports.utf8border = function (buf, max) { - var pos; - - max = max || buf.length; - if (max > buf.length) { max = buf.length; } - - // go back from last position, until start of sequence found - pos = max - 1; - while (pos >= 0 && (buf[pos] & 0xC0) === 0x80) { pos--; } - - // Fuckup - very small and broken sequence, - // return max, because we should return something anyway. - if (pos < 0) { return max; } - - // If we came to start of buffer - that means vuffer is too small, - // return max too. - if (pos === 0) { return max; } - - return (pos + _utf8len[buf[pos]] > max) ? pos : max; -}; - -},{"./common":1}],3:[function(require,module,exports){ -'use strict'; - -// Note: adler32 takes 12% for level 0 and 2% for level 6. -// It doesn't worth to make additional optimizationa as in original. -// Small size is preferable. - -function adler32(adler, buf, len, pos) { - var s1 = (adler & 0xffff) |0, - s2 = ((adler >>> 16) & 0xffff) |0, - n = 0; - - while (len !== 0) { - // Set limit ~ twice less than 5552, to keep - // s2 in 31-bits, because we force signed ints. - // in other case %= will fail. - n = len > 2000 ? 2000 : len; - len -= n; - - do { - s1 = (s1 + buf[pos++]) |0; - s2 = (s2 + s1) |0; - } while (--n); - - s1 %= 65521; - s2 %= 65521; - } - - return (s1 | (s2 << 16)) |0; -} - - -module.exports = adler32; - -},{}],4:[function(require,module,exports){ -'use strict'; - - -module.exports = { - - /* Allowed flush values; see deflate() and inflate() below for details */ - Z_NO_FLUSH: 0, - Z_PARTIAL_FLUSH: 1, - Z_SYNC_FLUSH: 2, - Z_FULL_FLUSH: 3, - Z_FINISH: 4, - Z_BLOCK: 5, - Z_TREES: 6, - - /* Return codes for the compression/decompression functions. Negative values - * are errors, positive values are used for special but normal events. - */ - Z_OK: 0, - Z_STREAM_END: 1, - Z_NEED_DICT: 2, - Z_ERRNO: -1, - Z_STREAM_ERROR: -2, - Z_DATA_ERROR: -3, - //Z_MEM_ERROR: -4, - Z_BUF_ERROR: -5, - //Z_VERSION_ERROR: -6, - - /* compression levels */ - Z_NO_COMPRESSION: 0, - Z_BEST_SPEED: 1, - Z_BEST_COMPRESSION: 9, - Z_DEFAULT_COMPRESSION: -1, - - - Z_FILTERED: 1, - Z_HUFFMAN_ONLY: 2, - Z_RLE: 3, - Z_FIXED: 4, - Z_DEFAULT_STRATEGY: 0, - - /* Possible values of the data_type field (though see inflate()) */ - Z_BINARY: 0, - Z_TEXT: 1, - //Z_ASCII: 1, // = Z_TEXT (deprecated) - Z_UNKNOWN: 2, - - /* The deflate compression method */ - Z_DEFLATED: 8 - //Z_NULL: null // Use -1 or null inline, depending on var type -}; - -},{}],5:[function(require,module,exports){ -'use strict'; - -// Note: we can't get significant speed boost here. -// So write code to minimize size - no pregenerated tables -// and array tools dependencies. - - -// Use ordinary array, since untyped makes no boost here -function makeTable() { - var c, table = []; - - for (var n = 0; n < 256; n++) { - c = n; - for (var k = 0; k < 8; k++) { - c = ((c & 1) ? (0xEDB88320 ^ (c >>> 1)) : (c >>> 1)); - } - table[n] = c; - } - - return table; -} - -// Create table on load. Just 255 signed longs. Not a problem. -var crcTable = makeTable(); - - -function crc32(crc, buf, len, pos) { - var t = crcTable, - end = pos + len; - - crc ^= -1; - - for (var i = pos; i < end; i++) { - crc = (crc >>> 8) ^ t[(crc ^ buf[i]) & 0xFF]; - } - - return (crc ^ (-1)); // >>> 0; -} - - -module.exports = crc32; - -},{}],6:[function(require,module,exports){ -'use strict'; - - -function GZheader() { - /* true if compressed data believed to be text */ - this.text = 0; - /* modification time */ - this.time = 0; - /* extra flags (not used when writing a gzip file) */ - this.xflags = 0; - /* operating system */ - this.os = 0; - /* pointer to extra field or Z_NULL if none */ - this.extra = null; - /* extra field length (valid if extra != Z_NULL) */ - this.extra_len = 0; // Actually, we don't need it in JS, - // but leave for few code modifications - - // - // Setup limits is not necessary because in js we should not preallocate memory - // for inflate use constant limit in 65536 bytes - // - - /* space at extra (only when reading header) */ - // this.extra_max = 0; - /* pointer to zero-terminated file name or Z_NULL */ - this.name = ''; - /* space at name (only when reading header) */ - // this.name_max = 0; - /* pointer to zero-terminated comment or Z_NULL */ - this.comment = ''; - /* space at comment (only when reading header) */ - // this.comm_max = 0; - /* true if there was or will be a header crc */ - this.hcrc = 0; - /* true when done reading gzip header (not used when writing a gzip file) */ - this.done = false; -} - -module.exports = GZheader; - -},{}],7:[function(require,module,exports){ -'use strict'; - -// See state defs from inflate.js -var BAD = 30; /* got a data error -- remain here until reset */ -var TYPE = 12; /* i: waiting for type bits, including last-flag bit */ - -/* - Decode literal, length, and distance codes and write out the resulting - literal and match bytes until either not enough input or output is - available, an end-of-block is encountered, or a data error is encountered. - When large enough input and output buffers are supplied to inflate(), for - example, a 16K input buffer and a 64K output buffer, more than 95% of the - inflate execution time is spent in this routine. - - Entry assumptions: - - state.mode === LEN - strm.avail_in >= 6 - strm.avail_out >= 258 - start >= strm.avail_out - state.bits < 8 - - On return, state.mode is one of: - - LEN -- ran out of enough output space or enough available input - TYPE -- reached end of block code, inflate() to interpret next block - BAD -- error in block data - - Notes: - - - The maximum input bits used by a length/distance pair is 15 bits for the - length code, 5 bits for the length extra, 15 bits for the distance code, - and 13 bits for the distance extra. This totals 48 bits, or six bytes. - Therefore if strm.avail_in >= 6, then there is enough input to avoid - checking for available input while decoding. - - - The maximum bytes that a single length/distance pair can output is 258 - bytes, which is the maximum length that can be coded. inflate_fast() - requires strm.avail_out >= 258 for each loop to avoid checking for - output space. - */ -module.exports = function inflate_fast(strm, start) { - var state; - var _in; /* local strm.input */ - var last; /* have enough input while in < last */ - var _out; /* local strm.output */ - var beg; /* inflate()'s initial strm.output */ - var end; /* while out < end, enough space available */ -//#ifdef INFLATE_STRICT - var dmax; /* maximum distance from zlib header */ -//#endif - var wsize; /* window size or zero if not using window */ - var whave; /* valid bytes in the window */ - var wnext; /* window write index */ - // Use `s_window` instead `window`, avoid conflict with instrumentation tools - var s_window; /* allocated sliding window, if wsize != 0 */ - var hold; /* local strm.hold */ - var bits; /* local strm.bits */ - var lcode; /* local strm.lencode */ - var dcode; /* local strm.distcode */ - var lmask; /* mask for first level of length codes */ - var dmask; /* mask for first level of distance codes */ - var here; /* retrieved table entry */ - var op; /* code bits, operation, extra bits, or */ - /* window position, window bytes to copy */ - var len; /* match length, unused bytes */ - var dist; /* match distance */ - var from; /* where to copy match from */ - var from_source; - - - var input, output; // JS specific, because we have no pointers - - /* copy state to local variables */ - state = strm.state; - //here = state.here; - _in = strm.next_in; - input = strm.input; - last = _in + (strm.avail_in - 5); - _out = strm.next_out; - output = strm.output; - beg = _out - (start - strm.avail_out); - end = _out + (strm.avail_out - 257); -//#ifdef INFLATE_STRICT - dmax = state.dmax; -//#endif - wsize = state.wsize; - whave = state.whave; - wnext = state.wnext; - s_window = state.window; - hold = state.hold; - bits = state.bits; - lcode = state.lencode; - dcode = state.distcode; - lmask = (1 << state.lenbits) - 1; - dmask = (1 << state.distbits) - 1; - - - /* decode literals and length/distances until end-of-block or not enough - input data or output space */ - - top: - do { - if (bits < 15) { - hold += input[_in++] << bits; - bits += 8; - hold += input[_in++] << bits; - bits += 8; - } - - here = lcode[hold & lmask]; - - dolen: - for (;;) { // Goto emulation - op = here >>> 24/*here.bits*/; - hold >>>= op; - bits -= op; - op = (here >>> 16) & 0xff/*here.op*/; - if (op === 0) { /* literal */ - //Tracevv((stderr, here.val >= 0x20 && here.val < 0x7f ? - // "inflate: literal '%c'\n" : - // "inflate: literal 0x%02x\n", here.val)); - output[_out++] = here & 0xffff/*here.val*/; - } - else if (op & 16) { /* length base */ - len = here & 0xffff/*here.val*/; - op &= 15; /* number of extra bits */ - if (op) { - if (bits < op) { - hold += input[_in++] << bits; - bits += 8; - } - len += hold & ((1 << op) - 1); - hold >>>= op; - bits -= op; - } - //Tracevv((stderr, "inflate: length %u\n", len)); - if (bits < 15) { - hold += input[_in++] << bits; - bits += 8; - hold += input[_in++] << bits; - bits += 8; - } - here = dcode[hold & dmask]; - - dodist: - for (;;) { // goto emulation - op = here >>> 24/*here.bits*/; - hold >>>= op; - bits -= op; - op = (here >>> 16) & 0xff/*here.op*/; - - if (op & 16) { /* distance base */ - dist = here & 0xffff/*here.val*/; - op &= 15; /* number of extra bits */ - if (bits < op) { - hold += input[_in++] << bits; - bits += 8; - if (bits < op) { - hold += input[_in++] << bits; - bits += 8; - } - } - dist += hold & ((1 << op) - 1); -//#ifdef INFLATE_STRICT - if (dist > dmax) { - strm.msg = 'invalid distance too far back'; - state.mode = BAD; - break top; - } -//#endif - hold >>>= op; - bits -= op; - //Tracevv((stderr, "inflate: distance %u\n", dist)); - op = _out - beg; /* max distance in output */ - if (dist > op) { /* see if copy from window */ - op = dist - op; /* distance back in window */ - if (op > whave) { - if (state.sane) { - strm.msg = 'invalid distance too far back'; - state.mode = BAD; - break top; - } - -// (!) This block is disabled in zlib defailts, -// don't enable it for binary compatibility -//#ifdef INFLATE_ALLOW_INVALID_DISTANCE_TOOFAR_ARRR -// if (len <= op - whave) { -// do { -// output[_out++] = 0; -// } while (--len); -// continue top; -// } -// len -= op - whave; -// do { -// output[_out++] = 0; -// } while (--op > whave); -// if (op === 0) { -// from = _out - dist; -// do { -// output[_out++] = output[from++]; -// } while (--len); -// continue top; -// } -//#endif - } - from = 0; // window index - from_source = s_window; - if (wnext === 0) { /* very common case */ - from += wsize - op; - if (op < len) { /* some from window */ - len -= op; - do { - output[_out++] = s_window[from++]; - } while (--op); - from = _out - dist; /* rest from output */ - from_source = output; - } - } - else if (wnext < op) { /* wrap around window */ - from += wsize + wnext - op; - op -= wnext; - if (op < len) { /* some from end of window */ - len -= op; - do { - output[_out++] = s_window[from++]; - } while (--op); - from = 0; - if (wnext < len) { /* some from start of window */ - op = wnext; - len -= op; - do { - output[_out++] = s_window[from++]; - } while (--op); - from = _out - dist; /* rest from output */ - from_source = output; - } - } - } - else { /* contiguous in window */ - from += wnext - op; - if (op < len) { /* some from window */ - len -= op; - do { - output[_out++] = s_window[from++]; - } while (--op); - from = _out - dist; /* rest from output */ - from_source = output; - } - } - while (len > 2) { - output[_out++] = from_source[from++]; - output[_out++] = from_source[from++]; - output[_out++] = from_source[from++]; - len -= 3; - } - if (len) { - output[_out++] = from_source[from++]; - if (len > 1) { - output[_out++] = from_source[from++]; - } - } - } - else { - from = _out - dist; /* copy direct from output */ - do { /* minimum length is three */ - output[_out++] = output[from++]; - output[_out++] = output[from++]; - output[_out++] = output[from++]; - len -= 3; - } while (len > 2); - if (len) { - output[_out++] = output[from++]; - if (len > 1) { - output[_out++] = output[from++]; - } - } - } - } - else if ((op & 64) === 0) { /* 2nd level distance code */ - here = dcode[(here & 0xffff)/*here.val*/ + (hold & ((1 << op) - 1))]; - continue dodist; - } - else { - strm.msg = 'invalid distance code'; - state.mode = BAD; - break top; - } - - break; // need to emulate goto via "continue" - } - } - else if ((op & 64) === 0) { /* 2nd level length code */ - here = lcode[(here & 0xffff)/*here.val*/ + (hold & ((1 << op) - 1))]; - continue dolen; - } - else if (op & 32) { /* end-of-block */ - //Tracevv((stderr, "inflate: end of block\n")); - state.mode = TYPE; - break top; - } - else { - strm.msg = 'invalid literal/length code'; - state.mode = BAD; - break top; - } - - break; // need to emulate goto via "continue" - } - } while (_in < last && _out < end); - - /* return unused bytes (on entry, bits < 8, so in won't go too far back) */ - len = bits >> 3; - _in -= len; - bits -= len << 3; - hold &= (1 << bits) - 1; - - /* update state and return */ - strm.next_in = _in; - strm.next_out = _out; - strm.avail_in = (_in < last ? 5 + (last - _in) : 5 - (_in - last)); - strm.avail_out = (_out < end ? 257 + (end - _out) : 257 - (_out - end)); - state.hold = hold; - state.bits = bits; - return; -}; - -},{}],8:[function(require,module,exports){ -'use strict'; - - -var utils = require('../utils/common'); -var adler32 = require('./adler32'); -var crc32 = require('./crc32'); -var inflate_fast = require('./inffast'); -var inflate_table = require('./inftrees'); - -var CODES = 0; -var LENS = 1; -var DISTS = 2; - -/* Public constants ==========================================================*/ -/* ===========================================================================*/ - - -/* Allowed flush values; see deflate() and inflate() below for details */ -//var Z_NO_FLUSH = 0; -//var Z_PARTIAL_FLUSH = 1; -//var Z_SYNC_FLUSH = 2; -//var Z_FULL_FLUSH = 3; -var Z_FINISH = 4; -var Z_BLOCK = 5; -var Z_TREES = 6; - - -/* Return codes for the compression/decompression functions. Negative values - * are errors, positive values are used for special but normal events. - */ -var Z_OK = 0; -var Z_STREAM_END = 1; -var Z_NEED_DICT = 2; -//var Z_ERRNO = -1; -var Z_STREAM_ERROR = -2; -var Z_DATA_ERROR = -3; -var Z_MEM_ERROR = -4; -var Z_BUF_ERROR = -5; -//var Z_VERSION_ERROR = -6; - -/* The deflate compression method */ -var Z_DEFLATED = 8; - - -/* STATES ====================================================================*/ -/* ===========================================================================*/ - - -var HEAD = 1; /* i: waiting for magic header */ -var FLAGS = 2; /* i: waiting for method and flags (gzip) */ -var TIME = 3; /* i: waiting for modification time (gzip) */ -var OS = 4; /* i: waiting for extra flags and operating system (gzip) */ -var EXLEN = 5; /* i: waiting for extra length (gzip) */ -var EXTRA = 6; /* i: waiting for extra bytes (gzip) */ -var NAME = 7; /* i: waiting for end of file name (gzip) */ -var COMMENT = 8; /* i: waiting for end of comment (gzip) */ -var HCRC = 9; /* i: waiting for header crc (gzip) */ -var DICTID = 10; /* i: waiting for dictionary check value */ -var DICT = 11; /* waiting for inflateSetDictionary() call */ -var TYPE = 12; /* i: waiting for type bits, including last-flag bit */ -var TYPEDO = 13; /* i: same, but skip check to exit inflate on new block */ -var STORED = 14; /* i: waiting for stored size (length and complement) */ -var COPY_ = 15; /* i/o: same as COPY below, but only first time in */ -var COPY = 16; /* i/o: waiting for input or output to copy stored block */ -var TABLE = 17; /* i: waiting for dynamic block table lengths */ -var LENLENS = 18; /* i: waiting for code length code lengths */ -var CODELENS = 19; /* i: waiting for length/lit and distance code lengths */ -var LEN_ = 20; /* i: same as LEN below, but only first time in */ -var LEN = 21; /* i: waiting for length/lit/eob code */ -var LENEXT = 22; /* i: waiting for length extra bits */ -var DIST = 23; /* i: waiting for distance code */ -var DISTEXT = 24; /* i: waiting for distance extra bits */ -var MATCH = 25; /* o: waiting for output space to copy string */ -var LIT = 26; /* o: waiting for output space to write literal */ -var CHECK = 27; /* i: waiting for 32-bit check value */ -var LENGTH = 28; /* i: waiting for 32-bit length (gzip) */ -var DONE = 29; /* finished check, done -- remain here until reset */ -var BAD = 30; /* got a data error -- remain here until reset */ -var MEM = 31; /* got an inflate() memory error -- remain here until reset */ -var SYNC = 32; /* looking for synchronization bytes to restart inflate() */ - -/* ===========================================================================*/ - - - -var ENOUGH_LENS = 852; -var ENOUGH_DISTS = 592; -//var ENOUGH = (ENOUGH_LENS+ENOUGH_DISTS); - -var MAX_WBITS = 15; -/* 32K LZ77 window */ -var DEF_WBITS = MAX_WBITS; - - -function zswap32(q) { - return (((q >>> 24) & 0xff) + - ((q >>> 8) & 0xff00) + - ((q & 0xff00) << 8) + - ((q & 0xff) << 24)); -} - - -function InflateState() { - this.mode = 0; /* current inflate mode */ - this.last = false; /* true if processing last block */ - this.wrap = 0; /* bit 0 true for zlib, bit 1 true for gzip */ - this.havedict = false; /* true if dictionary provided */ - this.flags = 0; /* gzip header method and flags (0 if zlib) */ - this.dmax = 0; /* zlib header max distance (INFLATE_STRICT) */ - this.check = 0; /* protected copy of check value */ - this.total = 0; /* protected copy of output count */ - // TODO: may be {} - this.head = null; /* where to save gzip header information */ - - /* sliding window */ - this.wbits = 0; /* log base 2 of requested window size */ - this.wsize = 0; /* window size or zero if not using window */ - this.whave = 0; /* valid bytes in the window */ - this.wnext = 0; /* window write index */ - this.window = null; /* allocated sliding window, if needed */ - - /* bit accumulator */ - this.hold = 0; /* input bit accumulator */ - this.bits = 0; /* number of bits in "in" */ - - /* for string and stored block copying */ - this.length = 0; /* literal or length of data to copy */ - this.offset = 0; /* distance back to copy string from */ - - /* for table and code decoding */ - this.extra = 0; /* extra bits needed */ - - /* fixed and dynamic code tables */ - this.lencode = null; /* starting table for length/literal codes */ - this.distcode = null; /* starting table for distance codes */ - this.lenbits = 0; /* index bits for lencode */ - this.distbits = 0; /* index bits for distcode */ - - /* dynamic table building */ - this.ncode = 0; /* number of code length code lengths */ - this.nlen = 0; /* number of length code lengths */ - this.ndist = 0; /* number of distance code lengths */ - this.have = 0; /* number of code lengths in lens[] */ - this.next = null; /* next available space in codes[] */ - - this.lens = new utils.Buf16(320); /* temporary storage for code lengths */ - this.work = new utils.Buf16(288); /* work area for code table building */ - - /* - because we don't have pointers in js, we use lencode and distcode directly - as buffers so we don't need codes - */ - //this.codes = new utils.Buf32(ENOUGH); /* space for code tables */ - this.lendyn = null; /* dynamic table for length/literal codes (JS specific) */ - this.distdyn = null; /* dynamic table for distance codes (JS specific) */ - this.sane = 0; /* if false, allow invalid distance too far */ - this.back = 0; /* bits back of last unprocessed length/lit */ - this.was = 0; /* initial length of match */ -} - -function inflateResetKeep(strm) { - var state; - - if (!strm || !strm.state) { return Z_STREAM_ERROR; } - state = strm.state; - strm.total_in = strm.total_out = state.total = 0; - strm.msg = ''; /*Z_NULL*/ - if (state.wrap) { /* to support ill-conceived Java test suite */ - strm.adler = state.wrap & 1; - } - state.mode = HEAD; - state.last = 0; - state.havedict = 0; - state.dmax = 32768; - state.head = null/*Z_NULL*/; - state.hold = 0; - state.bits = 0; - //state.lencode = state.distcode = state.next = state.codes; - state.lencode = state.lendyn = new utils.Buf32(ENOUGH_LENS); - state.distcode = state.distdyn = new utils.Buf32(ENOUGH_DISTS); - - state.sane = 1; - state.back = -1; - //Tracev((stderr, "inflate: reset\n")); - return Z_OK; -} - -function inflateReset(strm) { - var state; - - if (!strm || !strm.state) { return Z_STREAM_ERROR; } - state = strm.state; - state.wsize = 0; - state.whave = 0; - state.wnext = 0; - return inflateResetKeep(strm); - -} - -function inflateReset2(strm, windowBits) { - var wrap; - var state; - - /* get the state */ - if (!strm || !strm.state) { return Z_STREAM_ERROR; } - state = strm.state; - - /* extract wrap request from windowBits parameter */ - if (windowBits < 0) { - wrap = 0; - windowBits = -windowBits; - } - else { - wrap = (windowBits >> 4) + 1; - if (windowBits < 48) { - windowBits &= 15; - } - } - - /* set number of window bits, free window if different */ - if (windowBits && (windowBits < 8 || windowBits > 15)) { - return Z_STREAM_ERROR; - } - if (state.window !== null && state.wbits !== windowBits) { - state.window = null; - } - - /* update state and reset the rest of it */ - state.wrap = wrap; - state.wbits = windowBits; - return inflateReset(strm); -} - -function inflateInit2(strm, windowBits) { - var ret; - var state; - - if (!strm) { return Z_STREAM_ERROR; } - //strm.msg = Z_NULL; /* in case we return an error */ - - state = new InflateState(); - - //if (state === Z_NULL) return Z_MEM_ERROR; - //Tracev((stderr, "inflate: allocated\n")); - strm.state = state; - state.window = null/*Z_NULL*/; - ret = inflateReset2(strm, windowBits); - if (ret !== Z_OK) { - strm.state = null/*Z_NULL*/; - } - return ret; -} - -function inflateInit(strm) { - return inflateInit2(strm, DEF_WBITS); -} - - -/* - Return state with length and distance decoding tables and index sizes set to - fixed code decoding. Normally this returns fixed tables from inffixed.h. - If BUILDFIXED is defined, then instead this routine builds the tables the - first time it's called, and returns those tables the first time and - thereafter. This reduces the size of the code by about 2K bytes, in - exchange for a little execution time. However, BUILDFIXED should not be - used for threaded applications, since the rewriting of the tables and virgin - may not be thread-safe. - */ -var virgin = true; - -var lenfix, distfix; // We have no pointers in JS, so keep tables separate - -function fixedtables(state) { - /* build fixed huffman tables if first call (may not be thread safe) */ - if (virgin) { - var sym; - - lenfix = new utils.Buf32(512); - distfix = new utils.Buf32(32); - - /* literal/length table */ - sym = 0; - while (sym < 144) { state.lens[sym++] = 8; } - while (sym < 256) { state.lens[sym++] = 9; } - while (sym < 280) { state.lens[sym++] = 7; } - while (sym < 288) { state.lens[sym++] = 8; } - - inflate_table(LENS, state.lens, 0, 288, lenfix, 0, state.work, { bits: 9 }); - - /* distance table */ - sym = 0; - while (sym < 32) { state.lens[sym++] = 5; } - - inflate_table(DISTS, state.lens, 0, 32, distfix, 0, state.work, { bits: 5 }); - - /* do this just once */ - virgin = false; - } - - state.lencode = lenfix; - state.lenbits = 9; - state.distcode = distfix; - state.distbits = 5; -} - - -/* - Update the window with the last wsize (normally 32K) bytes written before - returning. If window does not exist yet, create it. This is only called - when a window is already in use, or when output has been written during this - inflate call, but the end of the deflate stream has not been reached yet. - It is also called to create a window for dictionary data when a dictionary - is loaded. - - Providing output buffers larger than 32K to inflate() should provide a speed - advantage, since only the last 32K of output is copied to the sliding window - upon return from inflate(), and since all distances after the first 32K of - output will fall in the output data, making match copies simpler and faster. - The advantage may be dependent on the size of the processor's data caches. - */ -function updatewindow(strm, src, end, copy) { - var dist; - var state = strm.state; - - /* if it hasn't been done already, allocate space for the window */ - if (state.window === null) { - state.wsize = 1 << state.wbits; - state.wnext = 0; - state.whave = 0; - - state.window = new utils.Buf8(state.wsize); - } - - /* copy state->wsize or less output bytes into the circular window */ - if (copy >= state.wsize) { - utils.arraySet(state.window, src, end - state.wsize, state.wsize, 0); - state.wnext = 0; - state.whave = state.wsize; - } - else { - dist = state.wsize - state.wnext; - if (dist > copy) { - dist = copy; - } - //zmemcpy(state->window + state->wnext, end - copy, dist); - utils.arraySet(state.window, src, end - copy, dist, state.wnext); - copy -= dist; - if (copy) { - //zmemcpy(state->window, end - copy, copy); - utils.arraySet(state.window, src, end - copy, copy, 0); - state.wnext = copy; - state.whave = state.wsize; - } - else { - state.wnext += dist; - if (state.wnext === state.wsize) { state.wnext = 0; } - if (state.whave < state.wsize) { state.whave += dist; } - } - } - return 0; -} - -function inflate(strm, flush) { - var state; - var input, output; // input/output buffers - var next; /* next input INDEX */ - var put; /* next output INDEX */ - var have, left; /* available input and output */ - var hold; /* bit buffer */ - var bits; /* bits in bit buffer */ - var _in, _out; /* save starting available input and output */ - var copy; /* number of stored or match bytes to copy */ - var from; /* where to copy match bytes from */ - var from_source; - var here = 0; /* current decoding table entry */ - var here_bits, here_op, here_val; // paked "here" denormalized (JS specific) - //var last; /* parent table entry */ - var last_bits, last_op, last_val; // paked "last" denormalized (JS specific) - var len; /* length to copy for repeats, bits to drop */ - var ret; /* return code */ - var hbuf = new utils.Buf8(4); /* buffer for gzip header crc calculation */ - var opts; - - var n; // temporary var for NEED_BITS - - var order = /* permutation of code lengths */ - [ 16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15 ]; - - - if (!strm || !strm.state || !strm.output || - (!strm.input && strm.avail_in !== 0)) { - return Z_STREAM_ERROR; - } - - state = strm.state; - if (state.mode === TYPE) { state.mode = TYPEDO; } /* skip check */ - - - //--- LOAD() --- - put = strm.next_out; - output = strm.output; - left = strm.avail_out; - next = strm.next_in; - input = strm.input; - have = strm.avail_in; - hold = state.hold; - bits = state.bits; - //--- - - _in = have; - _out = left; - ret = Z_OK; - - inf_leave: // goto emulation - for (;;) { - switch (state.mode) { - case HEAD: - if (state.wrap === 0) { - state.mode = TYPEDO; - break; - } - //=== NEEDBITS(16); - while (bits < 16) { - if (have === 0) { break inf_leave; } - have--; - hold += input[next++] << bits; - bits += 8; - } - //===// - if ((state.wrap & 2) && hold === 0x8b1f) { /* gzip header */ - state.check = 0/*crc32(0L, Z_NULL, 0)*/; - //=== CRC2(state.check, hold); - hbuf[0] = hold & 0xff; - hbuf[1] = (hold >>> 8) & 0xff; - state.check = crc32(state.check, hbuf, 2, 0); - //===// - - //=== INITBITS(); - hold = 0; - bits = 0; - //===// - state.mode = FLAGS; - break; - } - state.flags = 0; /* expect zlib header */ - if (state.head) { - state.head.done = false; - } - if (!(state.wrap & 1) || /* check if zlib header allowed */ - (((hold & 0xff)/*BITS(8)*/ << 8) + (hold >> 8)) % 31) { - strm.msg = 'incorrect header check'; - state.mode = BAD; - break; - } - if ((hold & 0x0f)/*BITS(4)*/ !== Z_DEFLATED) { - strm.msg = 'unknown compression method'; - state.mode = BAD; - break; - } - //--- DROPBITS(4) ---// - hold >>>= 4; - bits -= 4; - //---// - len = (hold & 0x0f)/*BITS(4)*/ + 8; - if (state.wbits === 0) { - state.wbits = len; - } - else if (len > state.wbits) { - strm.msg = 'invalid window size'; - state.mode = BAD; - break; - } - state.dmax = 1 << len; - //Tracev((stderr, "inflate: zlib header ok\n")); - strm.adler = state.check = 1/*adler32(0L, Z_NULL, 0)*/; - state.mode = hold & 0x200 ? DICTID : TYPE; - //=== INITBITS(); - hold = 0; - bits = 0; - //===// - break; - case FLAGS: - //=== NEEDBITS(16); */ - while (bits < 16) { - if (have === 0) { break inf_leave; } - have--; - hold += input[next++] << bits; - bits += 8; - } - //===// - state.flags = hold; - if ((state.flags & 0xff) !== Z_DEFLATED) { - strm.msg = 'unknown compression method'; - state.mode = BAD; - break; - } - if (state.flags & 0xe000) { - strm.msg = 'unknown header flags set'; - state.mode = BAD; - break; - } - if (state.head) { - state.head.text = ((hold >> 8) & 1); - } - if (state.flags & 0x0200) { - //=== CRC2(state.check, hold); - hbuf[0] = hold & 0xff; - hbuf[1] = (hold >>> 8) & 0xff; - state.check = crc32(state.check, hbuf, 2, 0); - //===// - } - //=== INITBITS(); - hold = 0; - bits = 0; - //===// - state.mode = TIME; - /* falls through */ - case TIME: - //=== NEEDBITS(32); */ - while (bits < 32) { - if (have === 0) { break inf_leave; } - have--; - hold += input[next++] << bits; - bits += 8; - } - //===// - if (state.head) { - state.head.time = hold; - } - if (state.flags & 0x0200) { - //=== CRC4(state.check, hold) - hbuf[0] = hold & 0xff; - hbuf[1] = (hold >>> 8) & 0xff; - hbuf[2] = (hold >>> 16) & 0xff; - hbuf[3] = (hold >>> 24) & 0xff; - state.check = crc32(state.check, hbuf, 4, 0); - //=== - } - //=== INITBITS(); - hold = 0; - bits = 0; - //===// - state.mode = OS; - /* falls through */ - case OS: - //=== NEEDBITS(16); */ - while (bits < 16) { - if (have === 0) { break inf_leave; } - have--; - hold += input[next++] << bits; - bits += 8; - } - //===// - if (state.head) { - state.head.xflags = (hold & 0xff); - state.head.os = (hold >> 8); - } - if (state.flags & 0x0200) { - //=== CRC2(state.check, hold); - hbuf[0] = hold & 0xff; - hbuf[1] = (hold >>> 8) & 0xff; - state.check = crc32(state.check, hbuf, 2, 0); - //===// - } - //=== INITBITS(); - hold = 0; - bits = 0; - //===// - state.mode = EXLEN; - /* falls through */ - case EXLEN: - if (state.flags & 0x0400) { - //=== NEEDBITS(16); */ - while (bits < 16) { - if (have === 0) { break inf_leave; } - have--; - hold += input[next++] << bits; - bits += 8; - } - //===// - state.length = hold; - if (state.head) { - state.head.extra_len = hold; - } - if (state.flags & 0x0200) { - //=== CRC2(state.check, hold); - hbuf[0] = hold & 0xff; - hbuf[1] = (hold >>> 8) & 0xff; - state.check = crc32(state.check, hbuf, 2, 0); - //===// - } - //=== INITBITS(); - hold = 0; - bits = 0; - //===// - } - else if (state.head) { - state.head.extra = null/*Z_NULL*/; - } - state.mode = EXTRA; - /* falls through */ - case EXTRA: - if (state.flags & 0x0400) { - copy = state.length; - if (copy > have) { copy = have; } - if (copy) { - if (state.head) { - len = state.head.extra_len - state.length; - if (!state.head.extra) { - // Use untyped array for more conveniend processing later - state.head.extra = new Array(state.head.extra_len); - } - utils.arraySet( - state.head.extra, - input, - next, - // extra field is limited to 65536 bytes - // - no need for additional size check - copy, - /*len + copy > state.head.extra_max - len ? state.head.extra_max : copy,*/ - len - ); - //zmemcpy(state.head.extra + len, next, - // len + copy > state.head.extra_max ? - // state.head.extra_max - len : copy); - } - if (state.flags & 0x0200) { - state.check = crc32(state.check, input, copy, next); - } - have -= copy; - next += copy; - state.length -= copy; - } - if (state.length) { break inf_leave; } - } - state.length = 0; - state.mode = NAME; - /* falls through */ - case NAME: - if (state.flags & 0x0800) { - if (have === 0) { break inf_leave; } - copy = 0; - do { - // TODO: 2 or 1 bytes? - len = input[next + copy++]; - /* use constant limit because in js we should not preallocate memory */ - if (state.head && len && - (state.length < 65536 /*state.head.name_max*/)) { - state.head.name += String.fromCharCode(len); - } - } while (len && copy < have); - - if (state.flags & 0x0200) { - state.check = crc32(state.check, input, copy, next); - } - have -= copy; - next += copy; - if (len) { break inf_leave; } - } - else if (state.head) { - state.head.name = null; - } - state.length = 0; - state.mode = COMMENT; - /* falls through */ - case COMMENT: - if (state.flags & 0x1000) { - if (have === 0) { break inf_leave; } - copy = 0; - do { - len = input[next + copy++]; - /* use constant limit because in js we should not preallocate memory */ - if (state.head && len && - (state.length < 65536 /*state.head.comm_max*/)) { - state.head.comment += String.fromCharCode(len); - } - } while (len && copy < have); - if (state.flags & 0x0200) { - state.check = crc32(state.check, input, copy, next); - } - have -= copy; - next += copy; - if (len) { break inf_leave; } - } - else if (state.head) { - state.head.comment = null; - } - state.mode = HCRC; - /* falls through */ - case HCRC: - if (state.flags & 0x0200) { - //=== NEEDBITS(16); */ - while (bits < 16) { - if (have === 0) { break inf_leave; } - have--; - hold += input[next++] << bits; - bits += 8; - } - //===// - if (hold !== (state.check & 0xffff)) { - strm.msg = 'header crc mismatch'; - state.mode = BAD; - break; - } - //=== INITBITS(); - hold = 0; - bits = 0; - //===// - } - if (state.head) { - state.head.hcrc = ((state.flags >> 9) & 1); - state.head.done = true; - } - strm.adler = state.check = 0; - state.mode = TYPE; - break; - case DICTID: - //=== NEEDBITS(32); */ - while (bits < 32) { - if (have === 0) { break inf_leave; } - have--; - hold += input[next++] << bits; - bits += 8; - } - //===// - strm.adler = state.check = zswap32(hold); - //=== INITBITS(); - hold = 0; - bits = 0; - //===// - state.mode = DICT; - /* falls through */ - case DICT: - if (state.havedict === 0) { - //--- RESTORE() --- - strm.next_out = put; - strm.avail_out = left; - strm.next_in = next; - strm.avail_in = have; - state.hold = hold; - state.bits = bits; - //--- - return Z_NEED_DICT; - } - strm.adler = state.check = 1/*adler32(0L, Z_NULL, 0)*/; - state.mode = TYPE; - /* falls through */ - case TYPE: - if (flush === Z_BLOCK || flush === Z_TREES) { break inf_leave; } - /* falls through */ - case TYPEDO: - if (state.last) { - //--- BYTEBITS() ---// - hold >>>= bits & 7; - bits -= bits & 7; - //---// - state.mode = CHECK; - break; - } - //=== NEEDBITS(3); */ - while (bits < 3) { - if (have === 0) { break inf_leave; } - have--; - hold += input[next++] << bits; - bits += 8; - } - //===// - state.last = (hold & 0x01)/*BITS(1)*/; - //--- DROPBITS(1) ---// - hold >>>= 1; - bits -= 1; - //---// - - switch ((hold & 0x03)/*BITS(2)*/) { - case 0: /* stored block */ - //Tracev((stderr, "inflate: stored block%s\n", - // state.last ? " (last)" : "")); - state.mode = STORED; - break; - case 1: /* fixed block */ - fixedtables(state); - //Tracev((stderr, "inflate: fixed codes block%s\n", - // state.last ? " (last)" : "")); - state.mode = LEN_; /* decode codes */ - if (flush === Z_TREES) { - //--- DROPBITS(2) ---// - hold >>>= 2; - bits -= 2; - //---// - break inf_leave; - } - break; - case 2: /* dynamic block */ - //Tracev((stderr, "inflate: dynamic codes block%s\n", - // state.last ? " (last)" : "")); - state.mode = TABLE; - break; - case 3: - strm.msg = 'invalid block type'; - state.mode = BAD; - } - //--- DROPBITS(2) ---// - hold >>>= 2; - bits -= 2; - //---// - break; - case STORED: - //--- BYTEBITS() ---// /* go to byte boundary */ - hold >>>= bits & 7; - bits -= bits & 7; - //---// - //=== NEEDBITS(32); */ - while (bits < 32) { - if (have === 0) { break inf_leave; } - have--; - hold += input[next++] << bits; - bits += 8; - } - //===// - if ((hold & 0xffff) !== ((hold >>> 16) ^ 0xffff)) { - strm.msg = 'invalid stored block lengths'; - state.mode = BAD; - break; - } - state.length = hold & 0xffff; - //Tracev((stderr, "inflate: stored length %u\n", - // state.length)); - //=== INITBITS(); - hold = 0; - bits = 0; - //===// - state.mode = COPY_; - if (flush === Z_TREES) { break inf_leave; } - /* falls through */ - case COPY_: - state.mode = COPY; - /* falls through */ - case COPY: - copy = state.length; - if (copy) { - if (copy > have) { copy = have; } - if (copy > left) { copy = left; } - if (copy === 0) { break inf_leave; } - //--- zmemcpy(put, next, copy); --- - utils.arraySet(output, input, next, copy, put); - //---// - have -= copy; - next += copy; - left -= copy; - put += copy; - state.length -= copy; - break; - } - //Tracev((stderr, "inflate: stored end\n")); - state.mode = TYPE; - break; - case TABLE: - //=== NEEDBITS(14); */ - while (bits < 14) { - if (have === 0) { break inf_leave; } - have--; - hold += input[next++] << bits; - bits += 8; - } - //===// - state.nlen = (hold & 0x1f)/*BITS(5)*/ + 257; - //--- DROPBITS(5) ---// - hold >>>= 5; - bits -= 5; - //---// - state.ndist = (hold & 0x1f)/*BITS(5)*/ + 1; - //--- DROPBITS(5) ---// - hold >>>= 5; - bits -= 5; - //---// - state.ncode = (hold & 0x0f)/*BITS(4)*/ + 4; - //--- DROPBITS(4) ---// - hold >>>= 4; - bits -= 4; - //---// -//#ifndef PKZIP_BUG_WORKAROUND - if (state.nlen > 286 || state.ndist > 30) { - strm.msg = 'too many length or distance symbols'; - state.mode = BAD; - break; - } -//#endif - //Tracev((stderr, "inflate: table sizes ok\n")); - state.have = 0; - state.mode = LENLENS; - /* falls through */ - case LENLENS: - while (state.have < state.ncode) { - //=== NEEDBITS(3); - while (bits < 3) { - if (have === 0) { break inf_leave; } - have--; - hold += input[next++] << bits; - bits += 8; - } - //===// - state.lens[order[state.have++]] = (hold & 0x07);//BITS(3); - //--- DROPBITS(3) ---// - hold >>>= 3; - bits -= 3; - //---// - } - while (state.have < 19) { - state.lens[order[state.have++]] = 0; - } - // We have separate tables & no pointers. 2 commented lines below not needed. - //state.next = state.codes; - //state.lencode = state.next; - // Switch to use dynamic table - state.lencode = state.lendyn; - state.lenbits = 7; - - opts = { bits: state.lenbits }; - ret = inflate_table(CODES, state.lens, 0, 19, state.lencode, 0, state.work, opts); - state.lenbits = opts.bits; - - if (ret) { - strm.msg = 'invalid code lengths set'; - state.mode = BAD; - break; - } - //Tracev((stderr, "inflate: code lengths ok\n")); - state.have = 0; - state.mode = CODELENS; - /* falls through */ - case CODELENS: - while (state.have < state.nlen + state.ndist) { - for (;;) { - here = state.lencode[hold & ((1 << state.lenbits) - 1)];/*BITS(state.lenbits)*/ - here_bits = here >>> 24; - here_op = (here >>> 16) & 0xff; - here_val = here & 0xffff; - - if ((here_bits) <= bits) { break; } - //--- PULLBYTE() ---// - if (have === 0) { break inf_leave; } - have--; - hold += input[next++] << bits; - bits += 8; - //---// - } - if (here_val < 16) { - //--- DROPBITS(here.bits) ---// - hold >>>= here_bits; - bits -= here_bits; - //---// - state.lens[state.have++] = here_val; - } - else { - if (here_val === 16) { - //=== NEEDBITS(here.bits + 2); - n = here_bits + 2; - while (bits < n) { - if (have === 0) { break inf_leave; } - have--; - hold += input[next++] << bits; - bits += 8; - } - //===// - //--- DROPBITS(here.bits) ---// - hold >>>= here_bits; - bits -= here_bits; - //---// - if (state.have === 0) { - strm.msg = 'invalid bit length repeat'; - state.mode = BAD; - break; - } - len = state.lens[state.have - 1]; - copy = 3 + (hold & 0x03);//BITS(2); - //--- DROPBITS(2) ---// - hold >>>= 2; - bits -= 2; - //---// - } - else if (here_val === 17) { - //=== NEEDBITS(here.bits + 3); - n = here_bits + 3; - while (bits < n) { - if (have === 0) { break inf_leave; } - have--; - hold += input[next++] << bits; - bits += 8; - } - //===// - //--- DROPBITS(here.bits) ---// - hold >>>= here_bits; - bits -= here_bits; - //---// - len = 0; - copy = 3 + (hold & 0x07);//BITS(3); - //--- DROPBITS(3) ---// - hold >>>= 3; - bits -= 3; - //---// - } - else { - //=== NEEDBITS(here.bits + 7); - n = here_bits + 7; - while (bits < n) { - if (have === 0) { break inf_leave; } - have--; - hold += input[next++] << bits; - bits += 8; - } - //===// - //--- DROPBITS(here.bits) ---// - hold >>>= here_bits; - bits -= here_bits; - //---// - len = 0; - copy = 11 + (hold & 0x7f);//BITS(7); - //--- DROPBITS(7) ---// - hold >>>= 7; - bits -= 7; - //---// - } - if (state.have + copy > state.nlen + state.ndist) { - strm.msg = 'invalid bit length repeat'; - state.mode = BAD; - break; - } - while (copy--) { - state.lens[state.have++] = len; - } - } - } - - /* handle error breaks in while */ - if (state.mode === BAD) { break; } - - /* check for end-of-block code (better have one) */ - if (state.lens[256] === 0) { - strm.msg = 'invalid code -- missing end-of-block'; - state.mode = BAD; - break; - } - - /* build code tables -- note: do not change the lenbits or distbits - values here (9 and 6) without reading the comments in inftrees.h - concerning the ENOUGH constants, which depend on those values */ - state.lenbits = 9; - - opts = { bits: state.lenbits }; - ret = inflate_table(LENS, state.lens, 0, state.nlen, state.lencode, 0, state.work, opts); - // We have separate tables & no pointers. 2 commented lines below not needed. - // state.next_index = opts.table_index; - state.lenbits = opts.bits; - // state.lencode = state.next; - - if (ret) { - strm.msg = 'invalid literal/lengths set'; - state.mode = BAD; - break; - } - - state.distbits = 6; - //state.distcode.copy(state.codes); - // Switch to use dynamic table - state.distcode = state.distdyn; - opts = { bits: state.distbits }; - ret = inflate_table(DISTS, state.lens, state.nlen, state.ndist, state.distcode, 0, state.work, opts); - // We have separate tables & no pointers. 2 commented lines below not needed. - // state.next_index = opts.table_index; - state.distbits = opts.bits; - // state.distcode = state.next; - - if (ret) { - strm.msg = 'invalid distances set'; - state.mode = BAD; - break; - } - //Tracev((stderr, 'inflate: codes ok\n')); - state.mode = LEN_; - if (flush === Z_TREES) { break inf_leave; } - /* falls through */ - case LEN_: - state.mode = LEN; - /* falls through */ - case LEN: - if (have >= 6 && left >= 258) { - //--- RESTORE() --- - strm.next_out = put; - strm.avail_out = left; - strm.next_in = next; - strm.avail_in = have; - state.hold = hold; - state.bits = bits; - //--- - inflate_fast(strm, _out); - //--- LOAD() --- - put = strm.next_out; - output = strm.output; - left = strm.avail_out; - next = strm.next_in; - input = strm.input; - have = strm.avail_in; - hold = state.hold; - bits = state.bits; - //--- - - if (state.mode === TYPE) { - state.back = -1; - } - break; - } - state.back = 0; - for (;;) { - here = state.lencode[hold & ((1 << state.lenbits) - 1)]; /*BITS(state.lenbits)*/ - here_bits = here >>> 24; - here_op = (here >>> 16) & 0xff; - here_val = here & 0xffff; - - if (here_bits <= bits) { break; } - //--- PULLBYTE() ---// - if (have === 0) { break inf_leave; } - have--; - hold += input[next++] << bits; - bits += 8; - //---// - } - if (here_op && (here_op & 0xf0) === 0) { - last_bits = here_bits; - last_op = here_op; - last_val = here_val; - for (;;) { - here = state.lencode[last_val + - ((hold & ((1 << (last_bits + last_op)) - 1))/*BITS(last.bits + last.op)*/ >> last_bits)]; - here_bits = here >>> 24; - here_op = (here >>> 16) & 0xff; - here_val = here & 0xffff; - - if ((last_bits + here_bits) <= bits) { break; } - //--- PULLBYTE() ---// - if (have === 0) { break inf_leave; } - have--; - hold += input[next++] << bits; - bits += 8; - //---// - } - //--- DROPBITS(last.bits) ---// - hold >>>= last_bits; - bits -= last_bits; - //---// - state.back += last_bits; - } - //--- DROPBITS(here.bits) ---// - hold >>>= here_bits; - bits -= here_bits; - //---// - state.back += here_bits; - state.length = here_val; - if (here_op === 0) { - //Tracevv((stderr, here.val >= 0x20 && here.val < 0x7f ? - // "inflate: literal '%c'\n" : - // "inflate: literal 0x%02x\n", here.val)); - state.mode = LIT; - break; - } - if (here_op & 32) { - //Tracevv((stderr, "inflate: end of block\n")); - state.back = -1; - state.mode = TYPE; - break; - } - if (here_op & 64) { - strm.msg = 'invalid literal/length code'; - state.mode = BAD; - break; - } - state.extra = here_op & 15; - state.mode = LENEXT; - /* falls through */ - case LENEXT: - if (state.extra) { - //=== NEEDBITS(state.extra); - n = state.extra; - while (bits < n) { - if (have === 0) { break inf_leave; } - have--; - hold += input[next++] << bits; - bits += 8; - } - //===// - state.length += hold & ((1 << state.extra) - 1)/*BITS(state.extra)*/; - //--- DROPBITS(state.extra) ---// - hold >>>= state.extra; - bits -= state.extra; - //---// - state.back += state.extra; - } - //Tracevv((stderr, "inflate: length %u\n", state.length)); - state.was = state.length; - state.mode = DIST; - /* falls through */ - case DIST: - for (;;) { - here = state.distcode[hold & ((1 << state.distbits) - 1)];/*BITS(state.distbits)*/ - here_bits = here >>> 24; - here_op = (here >>> 16) & 0xff; - here_val = here & 0xffff; - - if ((here_bits) <= bits) { break; } - //--- PULLBYTE() ---// - if (have === 0) { break inf_leave; } - have--; - hold += input[next++] << bits; - bits += 8; - //---// - } - if ((here_op & 0xf0) === 0) { - last_bits = here_bits; - last_op = here_op; - last_val = here_val; - for (;;) { - here = state.distcode[last_val + - ((hold & ((1 << (last_bits + last_op)) - 1))/*BITS(last.bits + last.op)*/ >> last_bits)]; - here_bits = here >>> 24; - here_op = (here >>> 16) & 0xff; - here_val = here & 0xffff; - - if ((last_bits + here_bits) <= bits) { break; } - //--- PULLBYTE() ---// - if (have === 0) { break inf_leave; } - have--; - hold += input[next++] << bits; - bits += 8; - //---// - } - //--- DROPBITS(last.bits) ---// - hold >>>= last_bits; - bits -= last_bits; - //---// - state.back += last_bits; - } - //--- DROPBITS(here.bits) ---// - hold >>>= here_bits; - bits -= here_bits; - //---// - state.back += here_bits; - if (here_op & 64) { - strm.msg = 'invalid distance code'; - state.mode = BAD; - break; - } - state.offset = here_val; - state.extra = (here_op) & 15; - state.mode = DISTEXT; - /* falls through */ - case DISTEXT: - if (state.extra) { - //=== NEEDBITS(state.extra); - n = state.extra; - while (bits < n) { - if (have === 0) { break inf_leave; } - have--; - hold += input[next++] << bits; - bits += 8; - } - //===// - state.offset += hold & ((1 << state.extra) - 1)/*BITS(state.extra)*/; - //--- DROPBITS(state.extra) ---// - hold >>>= state.extra; - bits -= state.extra; - //---// - state.back += state.extra; - } -//#ifdef INFLATE_STRICT - if (state.offset > state.dmax) { - strm.msg = 'invalid distance too far back'; - state.mode = BAD; - break; - } -//#endif - //Tracevv((stderr, "inflate: distance %u\n", state.offset)); - state.mode = MATCH; - /* falls through */ - case MATCH: - if (left === 0) { break inf_leave; } - copy = _out - left; - if (state.offset > copy) { /* copy from window */ - copy = state.offset - copy; - if (copy > state.whave) { - if (state.sane) { - strm.msg = 'invalid distance too far back'; - state.mode = BAD; - break; - } -// (!) This block is disabled in zlib defailts, -// don't enable it for binary compatibility -//#ifdef INFLATE_ALLOW_INVALID_DISTANCE_TOOFAR_ARRR -// Trace((stderr, "inflate.c too far\n")); -// copy -= state.whave; -// if (copy > state.length) { copy = state.length; } -// if (copy > left) { copy = left; } -// left -= copy; -// state.length -= copy; -// do { -// output[put++] = 0; -// } while (--copy); -// if (state.length === 0) { state.mode = LEN; } -// break; -//#endif - } - if (copy > state.wnext) { - copy -= state.wnext; - from = state.wsize - copy; - } - else { - from = state.wnext - copy; - } - if (copy > state.length) { copy = state.length; } - from_source = state.window; - } - else { /* copy from output */ - from_source = output; - from = put - state.offset; - copy = state.length; - } - if (copy > left) { copy = left; } - left -= copy; - state.length -= copy; - do { - output[put++] = from_source[from++]; - } while (--copy); - if (state.length === 0) { state.mode = LEN; } - break; - case LIT: - if (left === 0) { break inf_leave; } - output[put++] = state.length; - left--; - state.mode = LEN; - break; - case CHECK: - if (state.wrap) { - //=== NEEDBITS(32); - while (bits < 32) { - if (have === 0) { break inf_leave; } - have--; - // Use '|' insdead of '+' to make sure that result is signed - hold |= input[next++] << bits; - bits += 8; - } - //===// - _out -= left; - strm.total_out += _out; - state.total += _out; - if (_out) { - strm.adler = state.check = - /*UPDATE(state.check, put - _out, _out);*/ - (state.flags ? crc32(state.check, output, _out, put - _out) : adler32(state.check, output, _out, put - _out)); - - } - _out = left; - // NB: crc32 stored as signed 32-bit int, zswap32 returns signed too - if ((state.flags ? hold : zswap32(hold)) !== state.check) { - strm.msg = 'incorrect data check'; - state.mode = BAD; - break; - } - //=== INITBITS(); - hold = 0; - bits = 0; - //===// - //Tracev((stderr, "inflate: check matches trailer\n")); - } - state.mode = LENGTH; - /* falls through */ - case LENGTH: - if (state.wrap && state.flags) { - //=== NEEDBITS(32); - while (bits < 32) { - if (have === 0) { break inf_leave; } - have--; - hold += input[next++] << bits; - bits += 8; - } - //===// - if (hold !== (state.total & 0xffffffff)) { - strm.msg = 'incorrect length check'; - state.mode = BAD; - break; - } - //=== INITBITS(); - hold = 0; - bits = 0; - //===// - //Tracev((stderr, "inflate: length matches trailer\n")); - } - state.mode = DONE; - /* falls through */ - case DONE: - ret = Z_STREAM_END; - break inf_leave; - case BAD: - ret = Z_DATA_ERROR; - break inf_leave; - case MEM: - return Z_MEM_ERROR; - case SYNC: - /* falls through */ - default: - return Z_STREAM_ERROR; - } - } - - // inf_leave <- here is real place for "goto inf_leave", emulated via "break inf_leave" - - /* - Return from inflate(), updating the total counts and the check value. - If there was no progress during the inflate() call, return a buffer - error. Call updatewindow() to create and/or update the window state. - Note: a memory error from inflate() is non-recoverable. - */ - - //--- RESTORE() --- - strm.next_out = put; - strm.avail_out = left; - strm.next_in = next; - strm.avail_in = have; - state.hold = hold; - state.bits = bits; - //--- - - if (state.wsize || (_out !== strm.avail_out && state.mode < BAD && - (state.mode < CHECK || flush !== Z_FINISH))) { - if (updatewindow(strm, strm.output, strm.next_out, _out - strm.avail_out)) { - state.mode = MEM; - return Z_MEM_ERROR; - } - } - _in -= strm.avail_in; - _out -= strm.avail_out; - strm.total_in += _in; - strm.total_out += _out; - state.total += _out; - if (state.wrap && _out) { - strm.adler = state.check = /*UPDATE(state.check, strm.next_out - _out, _out);*/ - (state.flags ? crc32(state.check, output, _out, strm.next_out - _out) : adler32(state.check, output, _out, strm.next_out - _out)); - } - strm.data_type = state.bits + (state.last ? 64 : 0) + - (state.mode === TYPE ? 128 : 0) + - (state.mode === LEN_ || state.mode === COPY_ ? 256 : 0); - if (((_in === 0 && _out === 0) || flush === Z_FINISH) && ret === Z_OK) { - ret = Z_BUF_ERROR; - } - return ret; -} - -function inflateEnd(strm) { - - if (!strm || !strm.state /*|| strm->zfree == (free_func)0*/) { - return Z_STREAM_ERROR; - } - - var state = strm.state; - if (state.window) { - state.window = null; - } - strm.state = null; - return Z_OK; -} - -function inflateGetHeader(strm, head) { - var state; - - /* check state */ - if (!strm || !strm.state) { return Z_STREAM_ERROR; } - state = strm.state; - if ((state.wrap & 2) === 0) { return Z_STREAM_ERROR; } - - /* save header structure */ - state.head = head; - head.done = false; - return Z_OK; -} - -function inflateSetDictionary(strm, dictionary) { - var dictLength = dictionary.length; - - var state; - var dictid; - var ret; - - /* check state */ - if (!strm /* == Z_NULL */ || !strm.state /* == Z_NULL */) { return Z_STREAM_ERROR; } - state = strm.state; - - if (state.wrap !== 0 && state.mode !== DICT) { - return Z_STREAM_ERROR; - } - - /* check for correct dictionary identifier */ - if (state.mode === DICT) { - dictid = 1; /* adler32(0, null, 0)*/ - /* dictid = adler32(dictid, dictionary, dictLength); */ - dictid = adler32(dictid, dictionary, dictLength, 0); - if (dictid !== state.check) { - return Z_DATA_ERROR; - } - } - /* copy dictionary to window using updatewindow(), which will amend the - existing dictionary if appropriate */ - ret = updatewindow(strm, dictionary, dictLength, dictLength); - if (ret) { - state.mode = MEM; - return Z_MEM_ERROR; - } - state.havedict = 1; - // Tracev((stderr, "inflate: dictionary set\n")); - return Z_OK; -} - -exports.inflateReset = inflateReset; -exports.inflateReset2 = inflateReset2; -exports.inflateResetKeep = inflateResetKeep; -exports.inflateInit = inflateInit; -exports.inflateInit2 = inflateInit2; -exports.inflate = inflate; -exports.inflateEnd = inflateEnd; -exports.inflateGetHeader = inflateGetHeader; -exports.inflateSetDictionary = inflateSetDictionary; -exports.inflateInfo = 'pako inflate (from Nodeca project)'; - -/* Not implemented -exports.inflateCopy = inflateCopy; -exports.inflateGetDictionary = inflateGetDictionary; -exports.inflateMark = inflateMark; -exports.inflatePrime = inflatePrime; -exports.inflateSync = inflateSync; -exports.inflateSyncPoint = inflateSyncPoint; -exports.inflateUndermine = inflateUndermine; -*/ - -},{"../utils/common":1,"./adler32":3,"./crc32":5,"./inffast":7,"./inftrees":9}],9:[function(require,module,exports){ -'use strict'; - - -var utils = require('../utils/common'); - -var MAXBITS = 15; -var ENOUGH_LENS = 852; -var ENOUGH_DISTS = 592; -//var ENOUGH = (ENOUGH_LENS+ENOUGH_DISTS); - -var CODES = 0; -var LENS = 1; -var DISTS = 2; - -var lbase = [ /* Length codes 257..285 base */ - 3, 4, 5, 6, 7, 8, 9, 10, 11, 13, 15, 17, 19, 23, 27, 31, - 35, 43, 51, 59, 67, 83, 99, 115, 131, 163, 195, 227, 258, 0, 0 -]; - -var lext = [ /* Length codes 257..285 extra */ - 16, 16, 16, 16, 16, 16, 16, 16, 17, 17, 17, 17, 18, 18, 18, 18, - 19, 19, 19, 19, 20, 20, 20, 20, 21, 21, 21, 21, 16, 72, 78 -]; - -var dbase = [ /* Distance codes 0..29 base */ - 1, 2, 3, 4, 5, 7, 9, 13, 17, 25, 33, 49, 65, 97, 129, 193, - 257, 385, 513, 769, 1025, 1537, 2049, 3073, 4097, 6145, - 8193, 12289, 16385, 24577, 0, 0 -]; - -var dext = [ /* Distance codes 0..29 extra */ - 16, 16, 16, 16, 17, 17, 18, 18, 19, 19, 20, 20, 21, 21, 22, 22, - 23, 23, 24, 24, 25, 25, 26, 26, 27, 27, - 28, 28, 29, 29, 64, 64 -]; - -module.exports = function inflate_table(type, lens, lens_index, codes, table, table_index, work, opts) -{ - var bits = opts.bits; - //here = opts.here; /* table entry for duplication */ - - var len = 0; /* a code's length in bits */ - var sym = 0; /* index of code symbols */ - var min = 0, max = 0; /* minimum and maximum code lengths */ - var root = 0; /* number of index bits for root table */ - var curr = 0; /* number of index bits for current table */ - var drop = 0; /* code bits to drop for sub-table */ - var left = 0; /* number of prefix codes available */ - var used = 0; /* code entries in table used */ - var huff = 0; /* Huffman code */ - var incr; /* for incrementing code, index */ - var fill; /* index for replicating entries */ - var low; /* low bits for current root entry */ - var mask; /* mask for low root bits */ - var next; /* next available space in table */ - var base = null; /* base value table to use */ - var base_index = 0; -// var shoextra; /* extra bits table to use */ - var end; /* use base and extra for symbol > end */ - var count = new utils.Buf16(MAXBITS + 1); //[MAXBITS+1]; /* number of codes of each length */ - var offs = new utils.Buf16(MAXBITS + 1); //[MAXBITS+1]; /* offsets in table for each length */ - var extra = null; - var extra_index = 0; - - var here_bits, here_op, here_val; - - /* - Process a set of code lengths to create a canonical Huffman code. The - code lengths are lens[0..codes-1]. Each length corresponds to the - symbols 0..codes-1. The Huffman code is generated by first sorting the - symbols by length from short to long, and retaining the symbol order - for codes with equal lengths. Then the code starts with all zero bits - for the first code of the shortest length, and the codes are integer - increments for the same length, and zeros are appended as the length - increases. For the deflate format, these bits are stored backwards - from their more natural integer increment ordering, and so when the - decoding tables are built in the large loop below, the integer codes - are incremented backwards. - - This routine assumes, but does not check, that all of the entries in - lens[] are in the range 0..MAXBITS. The caller must assure this. - 1..MAXBITS is interpreted as that code length. zero means that that - symbol does not occur in this code. - - The codes are sorted by computing a count of codes for each length, - creating from that a table of starting indices for each length in the - sorted table, and then entering the symbols in order in the sorted - table. The sorted table is work[], with that space being provided by - the caller. - - The length counts are used for other purposes as well, i.e. finding - the minimum and maximum length codes, determining if there are any - codes at all, checking for a valid set of lengths, and looking ahead - at length counts to determine sub-table sizes when building the - decoding tables. - */ - - /* accumulate lengths for codes (assumes lens[] all in 0..MAXBITS) */ - for (len = 0; len <= MAXBITS; len++) { - count[len] = 0; - } - for (sym = 0; sym < codes; sym++) { - count[lens[lens_index + sym]]++; - } - - /* bound code lengths, force root to be within code lengths */ - root = bits; - for (max = MAXBITS; max >= 1; max--) { - if (count[max] !== 0) { break; } - } - if (root > max) { - root = max; - } - if (max === 0) { /* no symbols to code at all */ - //table.op[opts.table_index] = 64; //here.op = (var char)64; /* invalid code marker */ - //table.bits[opts.table_index] = 1; //here.bits = (var char)1; - //table.val[opts.table_index++] = 0; //here.val = (var short)0; - table[table_index++] = (1 << 24) | (64 << 16) | 0; - - - //table.op[opts.table_index] = 64; - //table.bits[opts.table_index] = 1; - //table.val[opts.table_index++] = 0; - table[table_index++] = (1 << 24) | (64 << 16) | 0; - - opts.bits = 1; - return 0; /* no symbols, but wait for decoding to report error */ - } - for (min = 1; min < max; min++) { - if (count[min] !== 0) { break; } - } - if (root < min) { - root = min; - } - - /* check for an over-subscribed or incomplete set of lengths */ - left = 1; - for (len = 1; len <= MAXBITS; len++) { - left <<= 1; - left -= count[len]; - if (left < 0) { - return -1; - } /* over-subscribed */ - } - if (left > 0 && (type === CODES || max !== 1)) { - return -1; /* incomplete set */ - } - - /* generate offsets into symbol table for each length for sorting */ - offs[1] = 0; - for (len = 1; len < MAXBITS; len++) { - offs[len + 1] = offs[len] + count[len]; - } - - /* sort symbols by length, by symbol order within each length */ - for (sym = 0; sym < codes; sym++) { - if (lens[lens_index + sym] !== 0) { - work[offs[lens[lens_index + sym]]++] = sym; - } - } - - /* - Create and fill in decoding tables. In this loop, the table being - filled is at next and has curr index bits. The code being used is huff - with length len. That code is converted to an index by dropping drop - bits off of the bottom. For codes where len is less than drop + curr, - those top drop + curr - len bits are incremented through all values to - fill the table with replicated entries. - - root is the number of index bits for the root table. When len exceeds - root, sub-tables are created pointed to by the root entry with an index - of the low root bits of huff. This is saved in low to check for when a - new sub-table should be started. drop is zero when the root table is - being filled, and drop is root when sub-tables are being filled. - - When a new sub-table is needed, it is necessary to look ahead in the - code lengths to determine what size sub-table is needed. The length - counts are used for this, and so count[] is decremented as codes are - entered in the tables. - - used keeps track of how many table entries have been allocated from the - provided *table space. It is checked for LENS and DIST tables against - the constants ENOUGH_LENS and ENOUGH_DISTS to guard against changes in - the initial root table size constants. See the comments in inftrees.h - for more information. - - sym increments through all symbols, and the loop terminates when - all codes of length max, i.e. all codes, have been processed. This - routine permits incomplete codes, so another loop after this one fills - in the rest of the decoding tables with invalid code markers. - */ - - /* set up for code type */ - // poor man optimization - use if-else instead of switch, - // to avoid deopts in old v8 - if (type === CODES) { - base = extra = work; /* dummy value--not used */ - end = 19; - - } else if (type === LENS) { - base = lbase; - base_index -= 257; - extra = lext; - extra_index -= 257; - end = 256; - - } else { /* DISTS */ - base = dbase; - extra = dext; - end = -1; - } - - /* initialize opts for loop */ - huff = 0; /* starting code */ - sym = 0; /* starting code symbol */ - len = min; /* starting code length */ - next = table_index; /* current table to fill in */ - curr = root; /* current table index bits */ - drop = 0; /* current bits to drop from code for index */ - low = -1; /* trigger new sub-table when len > root */ - used = 1 << root; /* use root table entries */ - mask = used - 1; /* mask for comparing low */ - - /* check available table space */ - if ((type === LENS && used > ENOUGH_LENS) || - (type === DISTS && used > ENOUGH_DISTS)) { - return 1; - } - - var i = 0; - /* process all codes and make table entries */ - for (;;) { - i++; - /* create table entry */ - here_bits = len - drop; - if (work[sym] < end) { - here_op = 0; - here_val = work[sym]; - } - else if (work[sym] > end) { - here_op = extra[extra_index + work[sym]]; - here_val = base[base_index + work[sym]]; - } - else { - here_op = 32 + 64; /* end of block */ - here_val = 0; - } - - /* replicate for those indices with low len bits equal to huff */ - incr = 1 << (len - drop); - fill = 1 << curr; - min = fill; /* save offset to next table */ - do { - fill -= incr; - table[next + (huff >> drop) + fill] = (here_bits << 24) | (here_op << 16) | here_val |0; - } while (fill !== 0); - - /* backwards increment the len-bit code huff */ - incr = 1 << (len - 1); - while (huff & incr) { - incr >>= 1; - } - if (incr !== 0) { - huff &= incr - 1; - huff += incr; - } else { - huff = 0; - } - - /* go to next symbol, update count, len */ - sym++; - if (--count[len] === 0) { - if (len === max) { break; } - len = lens[lens_index + work[sym]]; - } - - /* create new sub-table if needed */ - if (len > root && (huff & mask) !== low) { - /* if first time, transition to sub-tables */ - if (drop === 0) { - drop = root; - } - - /* increment past last table */ - next += min; /* here min is 1 << curr */ - - /* determine length of next table */ - curr = len - drop; - left = 1 << curr; - while (curr + drop < max) { - left -= count[curr + drop]; - if (left <= 0) { break; } - curr++; - left <<= 1; - } - - /* check for enough space */ - used += 1 << curr; - if ((type === LENS && used > ENOUGH_LENS) || - (type === DISTS && used > ENOUGH_DISTS)) { - return 1; - } - - /* point entry in root table to sub-table */ - low = huff & mask; - /*table.op[low] = curr; - table.bits[low] = root; - table.val[low] = next - opts.table_index;*/ - table[low] = (root << 24) | (curr << 16) | (next - table_index) |0; - } - } - - /* fill in remaining table entry if code is incomplete (guaranteed to have - at most one remaining entry, since if the code is incomplete, the - maximum code length that was allowed to get this far is one bit) */ - if (huff !== 0) { - //table.op[next + huff] = 64; /* invalid code marker */ - //table.bits[next + huff] = len - drop; - //table.val[next + huff] = 0; - table[next + huff] = ((len - drop) << 24) | (64 << 16) |0; - } - - /* set return parameters */ - //opts.table_index += used; - opts.bits = root; - return 0; -}; - -},{"../utils/common":1}],10:[function(require,module,exports){ -'use strict'; - -module.exports = { - 2: 'need dictionary', /* Z_NEED_DICT 2 */ - 1: 'stream end', /* Z_STREAM_END 1 */ - 0: '', /* Z_OK 0 */ - '-1': 'file error', /* Z_ERRNO (-1) */ - '-2': 'stream error', /* Z_STREAM_ERROR (-2) */ - '-3': 'data error', /* Z_DATA_ERROR (-3) */ - '-4': 'insufficient memory', /* Z_MEM_ERROR (-4) */ - '-5': 'buffer error', /* Z_BUF_ERROR (-5) */ - '-6': 'incompatible version' /* Z_VERSION_ERROR (-6) */ -}; - -},{}],11:[function(require,module,exports){ -'use strict'; - - -function ZStream() { - /* next input byte */ - this.input = null; // JS specific, because we have no pointers - this.next_in = 0; - /* number of bytes available at input */ - this.avail_in = 0; - /* total number of input bytes read so far */ - this.total_in = 0; - /* next output byte should be put there */ - this.output = null; // JS specific, because we have no pointers - this.next_out = 0; - /* remaining free space at output */ - this.avail_out = 0; - /* total number of bytes output so far */ - this.total_out = 0; - /* last error message, NULL if no error */ - this.msg = ''/*Z_NULL*/; - /* not visible by applications */ - this.state = null; - /* best guess about the data type: binary or text */ - this.data_type = 2/*Z_UNKNOWN*/; - /* adler32 value of the uncompressed data */ - this.adler = 0; -} - -module.exports = ZStream; - -},{}],"/lib/inflate.js":[function(require,module,exports){ -'use strict'; - - -var zlib_inflate = require('./zlib/inflate'); -var utils = require('./utils/common'); -var strings = require('./utils/strings'); -var c = require('./zlib/constants'); -var msg = require('./zlib/messages'); -var ZStream = require('./zlib/zstream'); -var GZheader = require('./zlib/gzheader'); - -var toString = Object.prototype.toString; - -/** - * class Inflate - * - * Generic JS-style wrapper for zlib calls. If you don't need - * streaming behaviour - use more simple functions: [[inflate]] - * and [[inflateRaw]]. - **/ - -/* internal - * inflate.chunks -> Array - * - * Chunks of output data, if [[Inflate#onData]] not overriden. - **/ - -/** - * Inflate.result -> Uint8Array|Array|String - * - * Uncompressed result, generated by default [[Inflate#onData]] - * and [[Inflate#onEnd]] handlers. Filled after you push last chunk - * (call [[Inflate#push]] with `Z_FINISH` / `true` param) or if you - * push a chunk with explicit flush (call [[Inflate#push]] with - * `Z_SYNC_FLUSH` param). - **/ - -/** - * Inflate.err -> Number - * - * Error code after inflate finished. 0 (Z_OK) on success. - * Should be checked if broken data possible. - **/ - -/** - * Inflate.msg -> String - * - * Error message, if [[Inflate.err]] != 0 - **/ - - -/** - * new Inflate(options) - * - options (Object): zlib inflate options. - * - * Creates new inflator instance with specified params. Throws exception - * on bad params. Supported options: - * - * - `windowBits` - * - `dictionary` - * - * [http://zlib.net/manual.html#Advanced](http://zlib.net/manual.html#Advanced) - * for more information on these. - * - * Additional options, for internal needs: - * - * - `chunkSize` - size of generated data chunks (16K by default) - * - `raw` (Boolean) - do raw inflate - * - `to` (String) - if equal to 'string', then result will be converted - * from utf8 to utf16 (javascript) string. When string output requested, - * chunk length can differ from `chunkSize`, depending on content. - * - * By default, when no options set, autodetect deflate/gzip data format via - * wrapper header. - * - * ##### Example: - * - * ```javascript - * var pako = require('pako') - * , chunk1 = Uint8Array([1,2,3,4,5,6,7,8,9]) - * , chunk2 = Uint8Array([10,11,12,13,14,15,16,17,18,19]); - * - * var inflate = new pako.Inflate({ level: 3}); - * - * inflate.push(chunk1, false); - * inflate.push(chunk2, true); // true -> last chunk - * - * if (inflate.err) { throw new Error(inflate.err); } - * - * console.log(inflate.result); - * ``` - **/ -function Inflate(options) { - if (!(this instanceof Inflate)) return new Inflate(options); - - this.options = utils.assign({ - chunkSize: 16384, - windowBits: 0, - to: '' - }, options || {}); - - var opt = this.options; - - // Force window size for `raw` data, if not set directly, - // because we have no header for autodetect. - if (opt.raw && (opt.windowBits >= 0) && (opt.windowBits < 16)) { - opt.windowBits = -opt.windowBits; - if (opt.windowBits === 0) { opt.windowBits = -15; } - } - - // If `windowBits` not defined (and mode not raw) - set autodetect flag for gzip/deflate - if ((opt.windowBits >= 0) && (opt.windowBits < 16) && - !(options && options.windowBits)) { - opt.windowBits += 32; - } - - // Gzip header has no info about windows size, we can do autodetect only - // for deflate. So, if window size not set, force it to max when gzip possible - if ((opt.windowBits > 15) && (opt.windowBits < 48)) { - // bit 3 (16) -> gzipped data - // bit 4 (32) -> autodetect gzip/deflate - if ((opt.windowBits & 15) === 0) { - opt.windowBits |= 15; - } - } - - this.err = 0; // error code, if happens (0 = Z_OK) - this.msg = ''; // error message - this.ended = false; // used to avoid multiple onEnd() calls - this.chunks = []; // chunks of compressed data - - this.strm = new ZStream(); - this.strm.avail_out = 0; - - var status = zlib_inflate.inflateInit2( - this.strm, - opt.windowBits - ); - - if (status !== c.Z_OK) { - throw new Error(msg[status]); - } - - this.header = new GZheader(); - - zlib_inflate.inflateGetHeader(this.strm, this.header); -} - -/** - * Inflate#push(data[, mode]) -> Boolean - * - data (Uint8Array|Array|ArrayBuffer|String): input data - * - mode (Number|Boolean): 0..6 for corresponding Z_NO_FLUSH..Z_TREE modes. - * See constants. Skipped or `false` means Z_NO_FLUSH, `true` meansh Z_FINISH. - * - * Sends input data to inflate pipe, generating [[Inflate#onData]] calls with - * new output chunks. Returns `true` on success. The last data block must have - * mode Z_FINISH (or `true`). That will flush internal pending buffers and call - * [[Inflate#onEnd]]. For interim explicit flushes (without ending the stream) you - * can use mode Z_SYNC_FLUSH, keeping the decompression context. - * - * On fail call [[Inflate#onEnd]] with error code and return false. - * - * We strongly recommend to use `Uint8Array` on input for best speed (output - * format is detected automatically). Also, don't skip last param and always - * use the same type in your code (boolean or number). That will improve JS speed. - * - * For regular `Array`-s make sure all elements are [0..255]. - * - * ##### Example - * - * ```javascript - * push(chunk, false); // push one of data chunks - * ... - * push(chunk, true); // push last chunk - * ``` - **/ -Inflate.prototype.push = function (data, mode) { - var strm = this.strm; - var chunkSize = this.options.chunkSize; - var dictionary = this.options.dictionary; - var status, _mode; - var next_out_utf8, tail, utf8str; - var dict; - - // Flag to properly process Z_BUF_ERROR on testing inflate call - // when we check that all output data was flushed. - var allowBufError = false; - - if (this.ended) { return false; } - _mode = (mode === ~~mode) ? mode : ((mode === true) ? c.Z_FINISH : c.Z_NO_FLUSH); - - // Convert data if needed - if (typeof data === 'string') { - // Only binary strings can be decompressed on practice - strm.input = strings.binstring2buf(data); - } else if (toString.call(data) === '[object ArrayBuffer]') { - strm.input = new Uint8Array(data); - } else { - strm.input = data; - } - - strm.next_in = 0; - strm.avail_in = strm.input.length; - - do { - if (strm.avail_out === 0) { - strm.output = new utils.Buf8(chunkSize); - strm.next_out = 0; - strm.avail_out = chunkSize; - } - - status = zlib_inflate.inflate(strm, c.Z_NO_FLUSH); /* no bad return value */ - - if (status === c.Z_NEED_DICT && dictionary) { - // Convert data if needed - if (typeof dictionary === 'string') { - dict = strings.string2buf(dictionary); - } else if (toString.call(dictionary) === '[object ArrayBuffer]') { - dict = new Uint8Array(dictionary); - } else { - dict = dictionary; - } - - status = zlib_inflate.inflateSetDictionary(this.strm, dict); - - } - - if (status === c.Z_BUF_ERROR && allowBufError === true) { - status = c.Z_OK; - allowBufError = false; - } - - if (status !== c.Z_STREAM_END && status !== c.Z_OK) { - this.onEnd(status); - this.ended = true; - return false; - } - - if (strm.next_out) { - if (strm.avail_out === 0 || status === c.Z_STREAM_END || (strm.avail_in === 0 && (_mode === c.Z_FINISH || _mode === c.Z_SYNC_FLUSH))) { - - if (this.options.to === 'string') { - - next_out_utf8 = strings.utf8border(strm.output, strm.next_out); - - tail = strm.next_out - next_out_utf8; - utf8str = strings.buf2string(strm.output, next_out_utf8); - - // move tail - strm.next_out = tail; - strm.avail_out = chunkSize - tail; - if (tail) { utils.arraySet(strm.output, strm.output, next_out_utf8, tail, 0); } - - this.onData(utf8str); - - } else { - this.onData(utils.shrinkBuf(strm.output, strm.next_out)); - } - } - } - - // When no more input data, we should check that internal inflate buffers - // are flushed. The only way to do it when avail_out = 0 - run one more - // inflate pass. But if output data not exists, inflate return Z_BUF_ERROR. - // Here we set flag to process this error properly. - // - // NOTE. Deflate does not return error in this case and does not needs such - // logic. - if (strm.avail_in === 0 && strm.avail_out === 0) { - allowBufError = true; - } - - } while ((strm.avail_in > 0 || strm.avail_out === 0) && status !== c.Z_STREAM_END); - - if (status === c.Z_STREAM_END) { - _mode = c.Z_FINISH; - } - - // Finalize on the last chunk. - if (_mode === c.Z_FINISH) { - status = zlib_inflate.inflateEnd(this.strm); - this.onEnd(status); - this.ended = true; - return status === c.Z_OK; - } - - // callback interim results if Z_SYNC_FLUSH. - if (_mode === c.Z_SYNC_FLUSH) { - this.onEnd(c.Z_OK); - strm.avail_out = 0; - return true; - } - - return true; -}; - - -/** - * Inflate#onData(chunk) -> Void - * - chunk (Uint8Array|Array|String): ouput data. Type of array depends - * on js engine support. When string output requested, each chunk - * will be string. - * - * By default, stores data blocks in `chunks[]` property and glue - * those in `onEnd`. Override this handler, if you need another behaviour. - **/ -Inflate.prototype.onData = function (chunk) { - this.chunks.push(chunk); -}; - - -/** - * Inflate#onEnd(status) -> Void - * - status (Number): inflate status. 0 (Z_OK) on success, - * other if not. - * - * Called either after you tell inflate that the input stream is - * complete (Z_FINISH) or should be flushed (Z_SYNC_FLUSH) - * or if an error happened. By default - join collected chunks, - * free memory and fill `results` / `err` properties. - **/ -Inflate.prototype.onEnd = function (status) { - // On success - join - if (status === c.Z_OK) { - if (this.options.to === 'string') { - // Glue & convert here, until we teach pako to send - // utf8 alligned strings to onData - this.result = this.chunks.join(''); - } else { - this.result = utils.flattenChunks(this.chunks); - } - } - this.chunks = []; - this.err = status; - this.msg = this.strm.msg; -}; - - -/** - * inflate(data[, options]) -> Uint8Array|Array|String - * - data (Uint8Array|Array|String): input data to decompress. - * - options (Object): zlib inflate options. - * - * Decompress `data` with inflate/ungzip and `options`. Autodetect - * format via wrapper header by default. That's why we don't provide - * separate `ungzip` method. - * - * Supported options are: - * - * - windowBits - * - * [http://zlib.net/manual.html#Advanced](http://zlib.net/manual.html#Advanced) - * for more information. - * - * Sugar (options): - * - * - `raw` (Boolean) - say that we work with raw stream, if you don't wish to specify - * negative windowBits implicitly. - * - `to` (String) - if equal to 'string', then result will be converted - * from utf8 to utf16 (javascript) string. When string output requested, - * chunk length can differ from `chunkSize`, depending on content. - * - * - * ##### Example: - * - * ```javascript - * var pako = require('pako') - * , input = pako.deflate([1,2,3,4,5,6,7,8,9]) - * , output; - * - * try { - * output = pako.inflate(input); - * } catch (err) - * console.log(err); - * } - * ``` - **/ -function inflate(input, options) { - var inflator = new Inflate(options); - - inflator.push(input, true); - - // That will never happens, if you don't cheat with options :) - if (inflator.err) { throw inflator.msg; } - - return inflator.result; -} - - -/** - * inflateRaw(data[, options]) -> Uint8Array|Array|String - * - data (Uint8Array|Array|String): input data to decompress. - * - options (Object): zlib inflate options. - * - * The same as [[inflate]], but creates raw data, without wrapper - * (header and adler32 crc). - **/ -function inflateRaw(input, options) { - options = options || {}; - options.raw = true; - return inflate(input, options); -} - - -/** - * ungzip(data[, options]) -> Uint8Array|Array|String - * - data (Uint8Array|Array|String): input data to decompress. - * - options (Object): zlib inflate options. - * - * Just shortcut to [[inflate]], because it autodetects format - * by header.content. Done for convenience. - **/ - - -exports.Inflate = Inflate; -exports.inflate = inflate; -exports.inflateRaw = inflateRaw; -exports.ungzip = inflate; - -},{"./utils/common":1,"./utils/strings":2,"./zlib/constants":4,"./zlib/gzheader":6,"./zlib/inflate":8,"./zlib/messages":10,"./zlib/zstream":11}]},{},[])("/lib/inflate.js") -}); \ No newline at end of file diff --git a/node_modules/pako/dist/pako_inflate.min.js b/node_modules/pako/dist/pako_inflate.min.js deleted file mode 100644 index d423de90..00000000 --- a/node_modules/pako/dist/pako_inflate.min.js +++ /dev/null @@ -1,2 +0,0 @@ -/* pako 0.2.9 nodeca/pako */ -!function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var t;t="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,t.pako=e()}}(function(){return function e(t,i,n){function a(o,s){if(!i[o]){if(!t[o]){var f="function"==typeof require&&require;if(!s&&f)return f(o,!0);if(r)return r(o,!0);var l=new Error("Cannot find module '"+o+"'");throw l.code="MODULE_NOT_FOUND",l}var d=i[o]={exports:{}};t[o][0].call(d.exports,function(e){var i=t[o][1][e];return a(i?i:e)},d,d.exports,e,t,i,n)}return i[o].exports}for(var r="function"==typeof require&&require,o=0;o=252?6:f>=248?5:f>=240?4:f>=224?3:f>=192?2:1;s[254]=s[254]=1,i.string2buf=function(e){var t,i,n,r,o,s=e.length,f=0;for(r=0;r>>6,t[o++]=128|63&i):i<65536?(t[o++]=224|i>>>12,t[o++]=128|i>>>6&63,t[o++]=128|63&i):(t[o++]=240|i>>>18,t[o++]=128|i>>>12&63,t[o++]=128|i>>>6&63,t[o++]=128|63&i);return t},i.buf2binstring=function(e){return n(e,e.length)},i.binstring2buf=function(e){for(var t=new a.Buf8(e.length),i=0,n=t.length;i4)l[a++]=65533,i+=o-1;else{for(r&=2===o?31:3===o?15:7;o>1&&i1?l[a++]=65533:r<65536?l[a++]=r:(r-=65536,l[a++]=55296|r>>10&1023,l[a++]=56320|1023&r)}return n(l,a)},i.utf8border=function(e,t){var i;for(t=t||e.length,t>e.length&&(t=e.length),i=t-1;i>=0&&128===(192&e[i]);)i--;return i<0?t:0===i?t:i+s[e[i]]>t?i:t}},{"./common":1}],3:[function(e,t,i){"use strict";function n(e,t,i,n){for(var a=65535&e|0,r=e>>>16&65535|0,o=0;0!==i;){o=i>2e3?2e3:i,i-=o;do a=a+t[n++]|0,r=r+a|0;while(--o);a%=65521,r%=65521}return a|r<<16|0}t.exports=n},{}],4:[function(e,t,i){"use strict";t.exports={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8}},{}],5:[function(e,t,i){"use strict";function n(){for(var e,t=[],i=0;i<256;i++){e=i;for(var n=0;n<8;n++)e=1&e?3988292384^e>>>1:e>>>1;t[i]=e}return t}function a(e,t,i,n){var a=r,o=n+i;e^=-1;for(var s=n;s>>8^a[255&(e^t[s])];return e^-1}var r=n();t.exports=a},{}],6:[function(e,t,i){"use strict";function n(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1}t.exports=n},{}],7:[function(e,t,i){"use strict";var n=30,a=12;t.exports=function(e,t){var i,r,o,s,f,l,d,u,c,h,b,w,m,k,_,g,v,p,x,y,S,E,B,Z,A;i=e.state,r=e.next_in,Z=e.input,o=r+(e.avail_in-5),s=e.next_out,A=e.output,f=s-(t-e.avail_out),l=s+(e.avail_out-257),d=i.dmax,u=i.wsize,c=i.whave,h=i.wnext,b=i.window,w=i.hold,m=i.bits,k=i.lencode,_=i.distcode,g=(1<>>24,w>>>=x,m-=x,x=p>>>16&255,0===x)A[s++]=65535&p;else{if(!(16&x)){if(0===(64&x)){p=k[(65535&p)+(w&(1<>>=x,m-=x),m<15&&(w+=Z[r++]<>>24,w>>>=x,m-=x,x=p>>>16&255,!(16&x)){if(0===(64&x)){p=_[(65535&p)+(w&(1<d){e.msg="invalid distance too far back",i.mode=n;break e}if(w>>>=x,m-=x,x=s-f,S>x){if(x=S-x,x>c&&i.sane){e.msg="invalid distance too far back",i.mode=n;break e}if(E=0,B=b,0===h){if(E+=u-x,x2;)A[s++]=B[E++],A[s++]=B[E++],A[s++]=B[E++],y-=3;y&&(A[s++]=B[E++],y>1&&(A[s++]=B[E++]))}else{E=s-S;do A[s++]=A[E++],A[s++]=A[E++],A[s++]=A[E++],y-=3;while(y>2);y&&(A[s++]=A[E++],y>1&&(A[s++]=A[E++]))}break}}break}}while(r>3,r-=y,m-=y<<3,w&=(1<>>24&255)+(e>>>8&65280)+((65280&e)<<8)+((255&e)<<24)}function a(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new _.Buf16(320),this.work=new _.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function r(e){var t;return e&&e.state?(t=e.state,e.total_in=e.total_out=t.total=0,e.msg="",t.wrap&&(e.adler=1&t.wrap),t.mode=D,t.last=0,t.havedict=0,t.dmax=32768,t.head=null,t.hold=0,t.bits=0,t.lencode=t.lendyn=new _.Buf32(we),t.distcode=t.distdyn=new _.Buf32(me),t.sane=1,t.back=-1,z):C}function o(e){var t;return e&&e.state?(t=e.state,t.wsize=0,t.whave=0,t.wnext=0,r(e)):C}function s(e,t){var i,n;return e&&e.state?(n=e.state,t<0?(i=0,t=-t):(i=(t>>4)+1,t<48&&(t&=15)),t&&(t<8||t>15)?C:(null!==n.window&&n.wbits!==t&&(n.window=null),n.wrap=i,n.wbits=t,o(e))):C}function f(e,t){var i,n;return e?(n=new a,e.state=n,n.window=null,i=s(e,t),i!==z&&(e.state=null),i):C}function l(e){return f(e,_e)}function d(e){if(ge){var t;for(m=new _.Buf32(512),k=new _.Buf32(32),t=0;t<144;)e.lens[t++]=8;for(;t<256;)e.lens[t++]=9;for(;t<280;)e.lens[t++]=7;for(;t<288;)e.lens[t++]=8;for(x(S,e.lens,0,288,m,0,e.work,{bits:9}),t=0;t<32;)e.lens[t++]=5;x(E,e.lens,0,32,k,0,e.work,{bits:5}),ge=!1}e.lencode=m,e.lenbits=9,e.distcode=k,e.distbits=5}function u(e,t,i,n){var a,r=e.state;return null===r.window&&(r.wsize=1<=r.wsize?(_.arraySet(r.window,t,i-r.wsize,r.wsize,0),r.wnext=0,r.whave=r.wsize):(a=r.wsize-r.wnext,a>n&&(a=n),_.arraySet(r.window,t,i-n,a,r.wnext),n-=a,n?(_.arraySet(r.window,t,i-n,n,0),r.wnext=n,r.whave=r.wsize):(r.wnext+=a,r.wnext===r.wsize&&(r.wnext=0),r.whave>>8&255,i.check=v(i.check,Ze,2,0),c=0,h=0,i.mode=F;break}if(i.flags=0,i.head&&(i.head.done=!1),!(1&i.wrap)||(((255&c)<<8)+(c>>8))%31){e.msg="incorrect header check",i.mode=ce;break}if((15&c)!==U){e.msg="unknown compression method",i.mode=ce;break}if(c>>>=4,h-=4,xe=(15&c)+8,0===i.wbits)i.wbits=xe;else if(xe>i.wbits){e.msg="invalid window size",i.mode=ce;break}i.dmax=1<>8&1),512&i.flags&&(Ze[0]=255&c,Ze[1]=c>>>8&255,i.check=v(i.check,Ze,2,0)),c=0,h=0,i.mode=L;case L:for(;h<32;){if(0===f)break e;f--,c+=a[o++]<>>8&255,Ze[2]=c>>>16&255,Ze[3]=c>>>24&255,i.check=v(i.check,Ze,4,0)),c=0,h=0,i.mode=H;case H:for(;h<16;){if(0===f)break e;f--,c+=a[o++]<>8),512&i.flags&&(Ze[0]=255&c,Ze[1]=c>>>8&255,i.check=v(i.check,Ze,2,0)),c=0,h=0,i.mode=M;case M:if(1024&i.flags){for(;h<16;){if(0===f)break e;f--,c+=a[o++]<>>8&255,i.check=v(i.check,Ze,2,0)),c=0,h=0}else i.head&&(i.head.extra=null);i.mode=j;case j:if(1024&i.flags&&(m=i.length,m>f&&(m=f),m&&(i.head&&(xe=i.head.extra_len-i.length,i.head.extra||(i.head.extra=new Array(i.head.extra_len)),_.arraySet(i.head.extra,a,o,m,xe)),512&i.flags&&(i.check=v(i.check,a,m,o)),f-=m,o+=m,i.length-=m),i.length))break e;i.length=0,i.mode=K;case K:if(2048&i.flags){if(0===f)break e;m=0;do xe=a[o+m++],i.head&&xe&&i.length<65536&&(i.head.name+=String.fromCharCode(xe));while(xe&&m>9&1,i.head.done=!0),e.adler=i.check=0,i.mode=X;break;case q:for(;h<32;){if(0===f)break e;f--,c+=a[o++]<>>=7&h,h-=7&h,i.mode=le;break}for(;h<3;){if(0===f)break e;f--,c+=a[o++]<>>=1,h-=1,3&c){case 0:i.mode=J;break;case 1:if(d(i),i.mode=ie,t===A){c>>>=2,h-=2;break e}break;case 2:i.mode=$;break;case 3:e.msg="invalid block type",i.mode=ce}c>>>=2,h-=2;break;case J:for(c>>>=7&h,h-=7&h;h<32;){if(0===f)break e;f--,c+=a[o++]<>>16^65535)){e.msg="invalid stored block lengths",i.mode=ce;break}if(i.length=65535&c,c=0,h=0,i.mode=Q,t===A)break e;case Q:i.mode=V;case V:if(m=i.length){if(m>f&&(m=f),m>l&&(m=l),0===m)break e;_.arraySet(r,a,o,m,s),f-=m,o+=m,l-=m,s+=m,i.length-=m;break}i.mode=X;break;case $:for(;h<14;){if(0===f)break e;f--,c+=a[o++]<>>=5,h-=5,i.ndist=(31&c)+1,c>>>=5,h-=5,i.ncode=(15&c)+4,c>>>=4,h-=4,i.nlen>286||i.ndist>30){e.msg="too many length or distance symbols",i.mode=ce;break}i.have=0,i.mode=ee;case ee:for(;i.have>>=3,h-=3}for(;i.have<19;)i.lens[Ae[i.have++]]=0;if(i.lencode=i.lendyn,i.lenbits=7,Se={bits:i.lenbits},ye=x(y,i.lens,0,19,i.lencode,0,i.work,Se),i.lenbits=Se.bits,ye){e.msg="invalid code lengths set",i.mode=ce;break}i.have=0,i.mode=te;case te:for(;i.have>>24,ke=Be>>>16&255,_e=65535&Be,!(me<=h);){if(0===f)break e;f--,c+=a[o++]<>>=me,h-=me,i.lens[i.have++]=_e;else{if(16===_e){for(Ee=me+2;h>>=me,h-=me,0===i.have){e.msg="invalid bit length repeat",i.mode=ce;break}xe=i.lens[i.have-1],m=3+(3&c),c>>>=2,h-=2}else if(17===_e){for(Ee=me+3;h>>=me,h-=me,xe=0,m=3+(7&c),c>>>=3,h-=3}else{for(Ee=me+7;h>>=me,h-=me,xe=0,m=11+(127&c),c>>>=7,h-=7}if(i.have+m>i.nlen+i.ndist){e.msg="invalid bit length repeat",i.mode=ce;break}for(;m--;)i.lens[i.have++]=xe}}if(i.mode===ce)break;if(0===i.lens[256]){e.msg="invalid code -- missing end-of-block",i.mode=ce;break}if(i.lenbits=9,Se={bits:i.lenbits},ye=x(S,i.lens,0,i.nlen,i.lencode,0,i.work,Se),i.lenbits=Se.bits,ye){e.msg="invalid literal/lengths set",i.mode=ce;break}if(i.distbits=6,i.distcode=i.distdyn,Se={bits:i.distbits},ye=x(E,i.lens,i.nlen,i.ndist,i.distcode,0,i.work,Se),i.distbits=Se.bits,ye){e.msg="invalid distances set",i.mode=ce;break}if(i.mode=ie,t===A)break e;case ie:i.mode=ne;case ne:if(f>=6&&l>=258){e.next_out=s,e.avail_out=l,e.next_in=o,e.avail_in=f,i.hold=c,i.bits=h,p(e,w),s=e.next_out,r=e.output,l=e.avail_out,o=e.next_in,a=e.input,f=e.avail_in,c=i.hold,h=i.bits,i.mode===X&&(i.back=-1);break}for(i.back=0;Be=i.lencode[c&(1<>>24,ke=Be>>>16&255,_e=65535&Be,!(me<=h);){if(0===f)break e;f--,c+=a[o++]<>ge)],me=Be>>>24,ke=Be>>>16&255,_e=65535&Be,!(ge+me<=h);){if(0===f)break e;f--,c+=a[o++]<>>=ge,h-=ge,i.back+=ge}if(c>>>=me,h-=me,i.back+=me,i.length=_e,0===ke){i.mode=fe;break}if(32&ke){i.back=-1,i.mode=X;break}if(64&ke){e.msg="invalid literal/length code",i.mode=ce;break}i.extra=15&ke,i.mode=ae;case ae:if(i.extra){for(Ee=i.extra;h>>=i.extra,h-=i.extra,i.back+=i.extra}i.was=i.length,i.mode=re;case re:for(;Be=i.distcode[c&(1<>>24,ke=Be>>>16&255,_e=65535&Be,!(me<=h);){if(0===f)break e;f--,c+=a[o++]<>ge)],me=Be>>>24,ke=Be>>>16&255,_e=65535&Be,!(ge+me<=h);){if(0===f)break e;f--,c+=a[o++]<>>=ge,h-=ge,i.back+=ge}if(c>>>=me,h-=me,i.back+=me,64&ke){e.msg="invalid distance code",i.mode=ce;break}i.offset=_e,i.extra=15&ke,i.mode=oe;case oe:if(i.extra){for(Ee=i.extra;h>>=i.extra,h-=i.extra,i.back+=i.extra}if(i.offset>i.dmax){e.msg="invalid distance too far back",i.mode=ce;break}i.mode=se;case se:if(0===l)break e;if(m=w-l,i.offset>m){if(m=i.offset-m,m>i.whave&&i.sane){e.msg="invalid distance too far back",i.mode=ce;break}m>i.wnext?(m-=i.wnext,k=i.wsize-m):k=i.wnext-m,m>i.length&&(m=i.length),we=i.window}else we=r,k=s-i.offset,m=i.length;m>l&&(m=l),l-=m,i.length-=m;do r[s++]=we[k++];while(--m);0===i.length&&(i.mode=ne);break;case fe:if(0===l)break e;r[s++]=i.length,l--,i.mode=ne;break;case le:if(i.wrap){for(;h<32;){if(0===f)break e;f--,c|=a[o++]<=1&&0===M[C];C--);if(O>C&&(O=C),0===C)return w[m++]=20971520,w[m++]=20971520,_.bits=1,0;for(N=1;N0&&(e===s||1!==C))return-1;for(j[1]=0,z=1;zr||e===l&&D>o)return 1;for(var Y=0;;){Y++,E=z-T,k[R]S?(B=K[P+k[R]],Z=L[H+k[R]]):(B=96,Z=0),g=1<>T)+v]=E<<24|B<<16|Z|0;while(0!==v);for(g=1<>=1;if(0!==g?(F&=g-1,F+=g):F=0,R++,0===--M[z]){if(z===C)break;z=t[i+k[R]]}if(z>O&&(F&x)!==p){for(0===T&&(T=O),y+=N,I=z-T,U=1<r||e===l&&D>o)return 1;p=F&x,w[p]=O<<24|I<<16|y-m|0}}return 0!==F&&(w[y+F]=z-T<<24|64<<16|0),_.bits=O,0}},{"../utils/common":1}],10:[function(e,t,i){"use strict";t.exports={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"}},{}],11:[function(e,t,i){"use strict";function n(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}t.exports=n},{}],"/lib/inflate.js":[function(e,t,i){"use strict";function n(e){if(!(this instanceof n))return new n(e);this.options=s.assign({chunkSize:16384,windowBits:0,to:""},e||{});var t=this.options;t.raw&&t.windowBits>=0&&t.windowBits<16&&(t.windowBits=-t.windowBits,0===t.windowBits&&(t.windowBits=-15)),!(t.windowBits>=0&&t.windowBits<16)||e&&e.windowBits||(t.windowBits+=32),t.windowBits>15&&t.windowBits<48&&0===(15&t.windowBits)&&(t.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new u,this.strm.avail_out=0;var i=o.inflateInit2(this.strm,t.windowBits);if(i!==l.Z_OK)throw new Error(d[i]);this.header=new c,o.inflateGetHeader(this.strm,this.header)}function a(e,t){var i=new n(t);if(i.push(e,!0),i.err)throw i.msg;return i.result}function r(e,t){return t=t||{},t.raw=!0,a(e,t)}var o=e("./zlib/inflate"),s=e("./utils/common"),f=e("./utils/strings"),l=e("./zlib/constants"),d=e("./zlib/messages"),u=e("./zlib/zstream"),c=e("./zlib/gzheader"),h=Object.prototype.toString;n.prototype.push=function(e,t){var i,n,a,r,d,u,c=this.strm,b=this.options.chunkSize,w=this.options.dictionary,m=!1;if(this.ended)return!1;n=t===~~t?t:t===!0?l.Z_FINISH:l.Z_NO_FLUSH,"string"==typeof e?c.input=f.binstring2buf(e):"[object ArrayBuffer]"===h.call(e)?c.input=new Uint8Array(e):c.input=e,c.next_in=0,c.avail_in=c.input.length;do{if(0===c.avail_out&&(c.output=new s.Buf8(b),c.next_out=0,c.avail_out=b),i=o.inflate(c,l.Z_NO_FLUSH),i===l.Z_NEED_DICT&&w&&(u="string"==typeof w?f.string2buf(w):"[object ArrayBuffer]"===h.call(w)?new Uint8Array(w):w,i=o.inflateSetDictionary(this.strm,u)),i===l.Z_BUF_ERROR&&m===!0&&(i=l.Z_OK,m=!1),i!==l.Z_STREAM_END&&i!==l.Z_OK)return this.onEnd(i),this.ended=!0,!1;c.next_out&&(0!==c.avail_out&&i!==l.Z_STREAM_END&&(0!==c.avail_in||n!==l.Z_FINISH&&n!==l.Z_SYNC_FLUSH)||("string"===this.options.to?(a=f.utf8border(c.output,c.next_out),r=c.next_out-a,d=f.buf2string(c.output,a),c.next_out=r,c.avail_out=b-r,r&&s.arraySet(c.output,c.output,a,r,0),this.onData(d)):this.onData(s.shrinkBuf(c.output,c.next_out)))),0===c.avail_in&&0===c.avail_out&&(m=!0)}while((c.avail_in>0||0===c.avail_out)&&i!==l.Z_STREAM_END);return i===l.Z_STREAM_END&&(n=l.Z_FINISH),n===l.Z_FINISH?(i=o.inflateEnd(this.strm),this.onEnd(i),this.ended=!0,i===l.Z_OK):n!==l.Z_SYNC_FLUSH||(this.onEnd(l.Z_OK),c.avail_out=0,!0)},n.prototype.onData=function(e){this.chunks.push(e)},n.prototype.onEnd=function(e){e===l.Z_OK&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=s.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg},i.Inflate=n,i.inflate=a,i.inflateRaw=r,i.ungzip=a},{"./utils/common":1,"./utils/strings":2,"./zlib/constants":4,"./zlib/gzheader":6,"./zlib/inflate":8,"./zlib/messages":10,"./zlib/zstream":11}]},{},[])("/lib/inflate.js")}); diff --git a/node_modules/pako/index.js b/node_modules/pako/index.js deleted file mode 100644 index cd072515..00000000 --- a/node_modules/pako/index.js +++ /dev/null @@ -1,14 +0,0 @@ -// Top level file is just a mixin of submodules & constants -'use strict'; - -var assign = require('./lib/utils/common').assign; - -var deflate = require('./lib/deflate'); -var inflate = require('./lib/inflate'); -var constants = require('./lib/zlib/constants'); - -var pako = {}; - -assign(pako, deflate, inflate, constants); - -module.exports = pako; diff --git a/node_modules/pako/lib/deflate.js b/node_modules/pako/lib/deflate.js deleted file mode 100644 index 11040d4e..00000000 --- a/node_modules/pako/lib/deflate.js +++ /dev/null @@ -1,400 +0,0 @@ -'use strict'; - - -var zlib_deflate = require('./zlib/deflate'); -var utils = require('./utils/common'); -var strings = require('./utils/strings'); -var msg = require('./zlib/messages'); -var ZStream = require('./zlib/zstream'); - -var toString = Object.prototype.toString; - -/* Public constants ==========================================================*/ -/* ===========================================================================*/ - -var Z_NO_FLUSH = 0; -var Z_FINISH = 4; - -var Z_OK = 0; -var Z_STREAM_END = 1; -var Z_SYNC_FLUSH = 2; - -var Z_DEFAULT_COMPRESSION = -1; - -var Z_DEFAULT_STRATEGY = 0; - -var Z_DEFLATED = 8; - -/* ===========================================================================*/ - - -/** - * class Deflate - * - * Generic JS-style wrapper for zlib calls. If you don't need - * streaming behaviour - use more simple functions: [[deflate]], - * [[deflateRaw]] and [[gzip]]. - **/ - -/* internal - * Deflate.chunks -> Array - * - * Chunks of output data, if [[Deflate#onData]] not overriden. - **/ - -/** - * Deflate.result -> Uint8Array|Array - * - * Compressed result, generated by default [[Deflate#onData]] - * and [[Deflate#onEnd]] handlers. Filled after you push last chunk - * (call [[Deflate#push]] with `Z_FINISH` / `true` param) or if you - * push a chunk with explicit flush (call [[Deflate#push]] with - * `Z_SYNC_FLUSH` param). - **/ - -/** - * Deflate.err -> Number - * - * Error code after deflate finished. 0 (Z_OK) on success. - * You will not need it in real life, because deflate errors - * are possible only on wrong options or bad `onData` / `onEnd` - * custom handlers. - **/ - -/** - * Deflate.msg -> String - * - * Error message, if [[Deflate.err]] != 0 - **/ - - -/** - * new Deflate(options) - * - options (Object): zlib deflate options. - * - * Creates new deflator instance with specified params. Throws exception - * on bad params. Supported options: - * - * - `level` - * - `windowBits` - * - `memLevel` - * - `strategy` - * - `dictionary` - * - * [http://zlib.net/manual.html#Advanced](http://zlib.net/manual.html#Advanced) - * for more information on these. - * - * Additional options, for internal needs: - * - * - `chunkSize` - size of generated data chunks (16K by default) - * - `raw` (Boolean) - do raw deflate - * - `gzip` (Boolean) - create gzip wrapper - * - `to` (String) - if equal to 'string', then result will be "binary string" - * (each char code [0..255]) - * - `header` (Object) - custom header for gzip - * - `text` (Boolean) - true if compressed data believed to be text - * - `time` (Number) - modification time, unix timestamp - * - `os` (Number) - operation system code - * - `extra` (Array) - array of bytes with extra data (max 65536) - * - `name` (String) - file name (binary string) - * - `comment` (String) - comment (binary string) - * - `hcrc` (Boolean) - true if header crc should be added - * - * ##### Example: - * - * ```javascript - * var pako = require('pako') - * , chunk1 = Uint8Array([1,2,3,4,5,6,7,8,9]) - * , chunk2 = Uint8Array([10,11,12,13,14,15,16,17,18,19]); - * - * var deflate = new pako.Deflate({ level: 3}); - * - * deflate.push(chunk1, false); - * deflate.push(chunk2, true); // true -> last chunk - * - * if (deflate.err) { throw new Error(deflate.err); } - * - * console.log(deflate.result); - * ``` - **/ -function Deflate(options) { - if (!(this instanceof Deflate)) return new Deflate(options); - - this.options = utils.assign({ - level: Z_DEFAULT_COMPRESSION, - method: Z_DEFLATED, - chunkSize: 16384, - windowBits: 15, - memLevel: 8, - strategy: Z_DEFAULT_STRATEGY, - to: '' - }, options || {}); - - var opt = this.options; - - if (opt.raw && (opt.windowBits > 0)) { - opt.windowBits = -opt.windowBits; - } - - else if (opt.gzip && (opt.windowBits > 0) && (opt.windowBits < 16)) { - opt.windowBits += 16; - } - - this.err = 0; // error code, if happens (0 = Z_OK) - this.msg = ''; // error message - this.ended = false; // used to avoid multiple onEnd() calls - this.chunks = []; // chunks of compressed data - - this.strm = new ZStream(); - this.strm.avail_out = 0; - - var status = zlib_deflate.deflateInit2( - this.strm, - opt.level, - opt.method, - opt.windowBits, - opt.memLevel, - opt.strategy - ); - - if (status !== Z_OK) { - throw new Error(msg[status]); - } - - if (opt.header) { - zlib_deflate.deflateSetHeader(this.strm, opt.header); - } - - if (opt.dictionary) { - var dict; - // Convert data if needed - if (typeof opt.dictionary === 'string') { - // If we need to compress text, change encoding to utf8. - dict = strings.string2buf(opt.dictionary); - } else if (toString.call(opt.dictionary) === '[object ArrayBuffer]') { - dict = new Uint8Array(opt.dictionary); - } else { - dict = opt.dictionary; - } - - status = zlib_deflate.deflateSetDictionary(this.strm, dict); - - if (status !== Z_OK) { - throw new Error(msg[status]); - } - - this._dict_set = true; - } -} - -/** - * Deflate#push(data[, mode]) -> Boolean - * - data (Uint8Array|Array|ArrayBuffer|String): input data. Strings will be - * converted to utf8 byte sequence. - * - mode (Number|Boolean): 0..6 for corresponding Z_NO_FLUSH..Z_TREE modes. - * See constants. Skipped or `false` means Z_NO_FLUSH, `true` meansh Z_FINISH. - * - * Sends input data to deflate pipe, generating [[Deflate#onData]] calls with - * new compressed chunks. Returns `true` on success. The last data block must have - * mode Z_FINISH (or `true`). That will flush internal pending buffers and call - * [[Deflate#onEnd]]. For interim explicit flushes (without ending the stream) you - * can use mode Z_SYNC_FLUSH, keeping the compression context. - * - * On fail call [[Deflate#onEnd]] with error code and return false. - * - * We strongly recommend to use `Uint8Array` on input for best speed (output - * array format is detected automatically). Also, don't skip last param and always - * use the same type in your code (boolean or number). That will improve JS speed. - * - * For regular `Array`-s make sure all elements are [0..255]. - * - * ##### Example - * - * ```javascript - * push(chunk, false); // push one of data chunks - * ... - * push(chunk, true); // push last chunk - * ``` - **/ -Deflate.prototype.push = function (data, mode) { - var strm = this.strm; - var chunkSize = this.options.chunkSize; - var status, _mode; - - if (this.ended) { return false; } - - _mode = (mode === ~~mode) ? mode : ((mode === true) ? Z_FINISH : Z_NO_FLUSH); - - // Convert data if needed - if (typeof data === 'string') { - // If we need to compress text, change encoding to utf8. - strm.input = strings.string2buf(data); - } else if (toString.call(data) === '[object ArrayBuffer]') { - strm.input = new Uint8Array(data); - } else { - strm.input = data; - } - - strm.next_in = 0; - strm.avail_in = strm.input.length; - - do { - if (strm.avail_out === 0) { - strm.output = new utils.Buf8(chunkSize); - strm.next_out = 0; - strm.avail_out = chunkSize; - } - status = zlib_deflate.deflate(strm, _mode); /* no bad return value */ - - if (status !== Z_STREAM_END && status !== Z_OK) { - this.onEnd(status); - this.ended = true; - return false; - } - if (strm.avail_out === 0 || (strm.avail_in === 0 && (_mode === Z_FINISH || _mode === Z_SYNC_FLUSH))) { - if (this.options.to === 'string') { - this.onData(strings.buf2binstring(utils.shrinkBuf(strm.output, strm.next_out))); - } else { - this.onData(utils.shrinkBuf(strm.output, strm.next_out)); - } - } - } while ((strm.avail_in > 0 || strm.avail_out === 0) && status !== Z_STREAM_END); - - // Finalize on the last chunk. - if (_mode === Z_FINISH) { - status = zlib_deflate.deflateEnd(this.strm); - this.onEnd(status); - this.ended = true; - return status === Z_OK; - } - - // callback interim results if Z_SYNC_FLUSH. - if (_mode === Z_SYNC_FLUSH) { - this.onEnd(Z_OK); - strm.avail_out = 0; - return true; - } - - return true; -}; - - -/** - * Deflate#onData(chunk) -> Void - * - chunk (Uint8Array|Array|String): ouput data. Type of array depends - * on js engine support. When string output requested, each chunk - * will be string. - * - * By default, stores data blocks in `chunks[]` property and glue - * those in `onEnd`. Override this handler, if you need another behaviour. - **/ -Deflate.prototype.onData = function (chunk) { - this.chunks.push(chunk); -}; - - -/** - * Deflate#onEnd(status) -> Void - * - status (Number): deflate status. 0 (Z_OK) on success, - * other if not. - * - * Called once after you tell deflate that the input stream is - * complete (Z_FINISH) or should be flushed (Z_SYNC_FLUSH) - * or if an error happened. By default - join collected chunks, - * free memory and fill `results` / `err` properties. - **/ -Deflate.prototype.onEnd = function (status) { - // On success - join - if (status === Z_OK) { - if (this.options.to === 'string') { - this.result = this.chunks.join(''); - } else { - this.result = utils.flattenChunks(this.chunks); - } - } - this.chunks = []; - this.err = status; - this.msg = this.strm.msg; -}; - - -/** - * deflate(data[, options]) -> Uint8Array|Array|String - * - data (Uint8Array|Array|String): input data to compress. - * - options (Object): zlib deflate options. - * - * Compress `data` with deflate algorithm and `options`. - * - * Supported options are: - * - * - level - * - windowBits - * - memLevel - * - strategy - * - dictionary - * - * [http://zlib.net/manual.html#Advanced](http://zlib.net/manual.html#Advanced) - * for more information on these. - * - * Sugar (options): - * - * - `raw` (Boolean) - say that we work with raw stream, if you don't wish to specify - * negative windowBits implicitly. - * - `to` (String) - if equal to 'string', then result will be "binary string" - * (each char code [0..255]) - * - * ##### Example: - * - * ```javascript - * var pako = require('pako') - * , data = Uint8Array([1,2,3,4,5,6,7,8,9]); - * - * console.log(pako.deflate(data)); - * ``` - **/ -function deflate(input, options) { - var deflator = new Deflate(options); - - deflator.push(input, true); - - // That will never happens, if you don't cheat with options :) - if (deflator.err) { throw deflator.msg; } - - return deflator.result; -} - - -/** - * deflateRaw(data[, options]) -> Uint8Array|Array|String - * - data (Uint8Array|Array|String): input data to compress. - * - options (Object): zlib deflate options. - * - * The same as [[deflate]], but creates raw data, without wrapper - * (header and adler32 crc). - **/ -function deflateRaw(input, options) { - options = options || {}; - options.raw = true; - return deflate(input, options); -} - - -/** - * gzip(data[, options]) -> Uint8Array|Array|String - * - data (Uint8Array|Array|String): input data to compress. - * - options (Object): zlib deflate options. - * - * The same as [[deflate]], but create gzip wrapper instead of - * deflate one. - **/ -function gzip(input, options) { - options = options || {}; - options.gzip = true; - return deflate(input, options); -} - - -exports.Deflate = Deflate; -exports.deflate = deflate; -exports.deflateRaw = deflateRaw; -exports.gzip = gzip; diff --git a/node_modules/pako/lib/inflate.js b/node_modules/pako/lib/inflate.js deleted file mode 100644 index 0ed4999d..00000000 --- a/node_modules/pako/lib/inflate.js +++ /dev/null @@ -1,418 +0,0 @@ -'use strict'; - - -var zlib_inflate = require('./zlib/inflate'); -var utils = require('./utils/common'); -var strings = require('./utils/strings'); -var c = require('./zlib/constants'); -var msg = require('./zlib/messages'); -var ZStream = require('./zlib/zstream'); -var GZheader = require('./zlib/gzheader'); - -var toString = Object.prototype.toString; - -/** - * class Inflate - * - * Generic JS-style wrapper for zlib calls. If you don't need - * streaming behaviour - use more simple functions: [[inflate]] - * and [[inflateRaw]]. - **/ - -/* internal - * inflate.chunks -> Array - * - * Chunks of output data, if [[Inflate#onData]] not overriden. - **/ - -/** - * Inflate.result -> Uint8Array|Array|String - * - * Uncompressed result, generated by default [[Inflate#onData]] - * and [[Inflate#onEnd]] handlers. Filled after you push last chunk - * (call [[Inflate#push]] with `Z_FINISH` / `true` param) or if you - * push a chunk with explicit flush (call [[Inflate#push]] with - * `Z_SYNC_FLUSH` param). - **/ - -/** - * Inflate.err -> Number - * - * Error code after inflate finished. 0 (Z_OK) on success. - * Should be checked if broken data possible. - **/ - -/** - * Inflate.msg -> String - * - * Error message, if [[Inflate.err]] != 0 - **/ - - -/** - * new Inflate(options) - * - options (Object): zlib inflate options. - * - * Creates new inflator instance with specified params. Throws exception - * on bad params. Supported options: - * - * - `windowBits` - * - `dictionary` - * - * [http://zlib.net/manual.html#Advanced](http://zlib.net/manual.html#Advanced) - * for more information on these. - * - * Additional options, for internal needs: - * - * - `chunkSize` - size of generated data chunks (16K by default) - * - `raw` (Boolean) - do raw inflate - * - `to` (String) - if equal to 'string', then result will be converted - * from utf8 to utf16 (javascript) string. When string output requested, - * chunk length can differ from `chunkSize`, depending on content. - * - * By default, when no options set, autodetect deflate/gzip data format via - * wrapper header. - * - * ##### Example: - * - * ```javascript - * var pako = require('pako') - * , chunk1 = Uint8Array([1,2,3,4,5,6,7,8,9]) - * , chunk2 = Uint8Array([10,11,12,13,14,15,16,17,18,19]); - * - * var inflate = new pako.Inflate({ level: 3}); - * - * inflate.push(chunk1, false); - * inflate.push(chunk2, true); // true -> last chunk - * - * if (inflate.err) { throw new Error(inflate.err); } - * - * console.log(inflate.result); - * ``` - **/ -function Inflate(options) { - if (!(this instanceof Inflate)) return new Inflate(options); - - this.options = utils.assign({ - chunkSize: 16384, - windowBits: 0, - to: '' - }, options || {}); - - var opt = this.options; - - // Force window size for `raw` data, if not set directly, - // because we have no header for autodetect. - if (opt.raw && (opt.windowBits >= 0) && (opt.windowBits < 16)) { - opt.windowBits = -opt.windowBits; - if (opt.windowBits === 0) { opt.windowBits = -15; } - } - - // If `windowBits` not defined (and mode not raw) - set autodetect flag for gzip/deflate - if ((opt.windowBits >= 0) && (opt.windowBits < 16) && - !(options && options.windowBits)) { - opt.windowBits += 32; - } - - // Gzip header has no info about windows size, we can do autodetect only - // for deflate. So, if window size not set, force it to max when gzip possible - if ((opt.windowBits > 15) && (opt.windowBits < 48)) { - // bit 3 (16) -> gzipped data - // bit 4 (32) -> autodetect gzip/deflate - if ((opt.windowBits & 15) === 0) { - opt.windowBits |= 15; - } - } - - this.err = 0; // error code, if happens (0 = Z_OK) - this.msg = ''; // error message - this.ended = false; // used to avoid multiple onEnd() calls - this.chunks = []; // chunks of compressed data - - this.strm = new ZStream(); - this.strm.avail_out = 0; - - var status = zlib_inflate.inflateInit2( - this.strm, - opt.windowBits - ); - - if (status !== c.Z_OK) { - throw new Error(msg[status]); - } - - this.header = new GZheader(); - - zlib_inflate.inflateGetHeader(this.strm, this.header); -} - -/** - * Inflate#push(data[, mode]) -> Boolean - * - data (Uint8Array|Array|ArrayBuffer|String): input data - * - mode (Number|Boolean): 0..6 for corresponding Z_NO_FLUSH..Z_TREE modes. - * See constants. Skipped or `false` means Z_NO_FLUSH, `true` meansh Z_FINISH. - * - * Sends input data to inflate pipe, generating [[Inflate#onData]] calls with - * new output chunks. Returns `true` on success. The last data block must have - * mode Z_FINISH (or `true`). That will flush internal pending buffers and call - * [[Inflate#onEnd]]. For interim explicit flushes (without ending the stream) you - * can use mode Z_SYNC_FLUSH, keeping the decompression context. - * - * On fail call [[Inflate#onEnd]] with error code and return false. - * - * We strongly recommend to use `Uint8Array` on input for best speed (output - * format is detected automatically). Also, don't skip last param and always - * use the same type in your code (boolean or number). That will improve JS speed. - * - * For regular `Array`-s make sure all elements are [0..255]. - * - * ##### Example - * - * ```javascript - * push(chunk, false); // push one of data chunks - * ... - * push(chunk, true); // push last chunk - * ``` - **/ -Inflate.prototype.push = function (data, mode) { - var strm = this.strm; - var chunkSize = this.options.chunkSize; - var dictionary = this.options.dictionary; - var status, _mode; - var next_out_utf8, tail, utf8str; - var dict; - - // Flag to properly process Z_BUF_ERROR on testing inflate call - // when we check that all output data was flushed. - var allowBufError = false; - - if (this.ended) { return false; } - _mode = (mode === ~~mode) ? mode : ((mode === true) ? c.Z_FINISH : c.Z_NO_FLUSH); - - // Convert data if needed - if (typeof data === 'string') { - // Only binary strings can be decompressed on practice - strm.input = strings.binstring2buf(data); - } else if (toString.call(data) === '[object ArrayBuffer]') { - strm.input = new Uint8Array(data); - } else { - strm.input = data; - } - - strm.next_in = 0; - strm.avail_in = strm.input.length; - - do { - if (strm.avail_out === 0) { - strm.output = new utils.Buf8(chunkSize); - strm.next_out = 0; - strm.avail_out = chunkSize; - } - - status = zlib_inflate.inflate(strm, c.Z_NO_FLUSH); /* no bad return value */ - - if (status === c.Z_NEED_DICT && dictionary) { - // Convert data if needed - if (typeof dictionary === 'string') { - dict = strings.string2buf(dictionary); - } else if (toString.call(dictionary) === '[object ArrayBuffer]') { - dict = new Uint8Array(dictionary); - } else { - dict = dictionary; - } - - status = zlib_inflate.inflateSetDictionary(this.strm, dict); - - } - - if (status === c.Z_BUF_ERROR && allowBufError === true) { - status = c.Z_OK; - allowBufError = false; - } - - if (status !== c.Z_STREAM_END && status !== c.Z_OK) { - this.onEnd(status); - this.ended = true; - return false; - } - - if (strm.next_out) { - if (strm.avail_out === 0 || status === c.Z_STREAM_END || (strm.avail_in === 0 && (_mode === c.Z_FINISH || _mode === c.Z_SYNC_FLUSH))) { - - if (this.options.to === 'string') { - - next_out_utf8 = strings.utf8border(strm.output, strm.next_out); - - tail = strm.next_out - next_out_utf8; - utf8str = strings.buf2string(strm.output, next_out_utf8); - - // move tail - strm.next_out = tail; - strm.avail_out = chunkSize - tail; - if (tail) { utils.arraySet(strm.output, strm.output, next_out_utf8, tail, 0); } - - this.onData(utf8str); - - } else { - this.onData(utils.shrinkBuf(strm.output, strm.next_out)); - } - } - } - - // When no more input data, we should check that internal inflate buffers - // are flushed. The only way to do it when avail_out = 0 - run one more - // inflate pass. But if output data not exists, inflate return Z_BUF_ERROR. - // Here we set flag to process this error properly. - // - // NOTE. Deflate does not return error in this case and does not needs such - // logic. - if (strm.avail_in === 0 && strm.avail_out === 0) { - allowBufError = true; - } - - } while ((strm.avail_in > 0 || strm.avail_out === 0) && status !== c.Z_STREAM_END); - - if (status === c.Z_STREAM_END) { - _mode = c.Z_FINISH; - } - - // Finalize on the last chunk. - if (_mode === c.Z_FINISH) { - status = zlib_inflate.inflateEnd(this.strm); - this.onEnd(status); - this.ended = true; - return status === c.Z_OK; - } - - // callback interim results if Z_SYNC_FLUSH. - if (_mode === c.Z_SYNC_FLUSH) { - this.onEnd(c.Z_OK); - strm.avail_out = 0; - return true; - } - - return true; -}; - - -/** - * Inflate#onData(chunk) -> Void - * - chunk (Uint8Array|Array|String): ouput data. Type of array depends - * on js engine support. When string output requested, each chunk - * will be string. - * - * By default, stores data blocks in `chunks[]` property and glue - * those in `onEnd`. Override this handler, if you need another behaviour. - **/ -Inflate.prototype.onData = function (chunk) { - this.chunks.push(chunk); -}; - - -/** - * Inflate#onEnd(status) -> Void - * - status (Number): inflate status. 0 (Z_OK) on success, - * other if not. - * - * Called either after you tell inflate that the input stream is - * complete (Z_FINISH) or should be flushed (Z_SYNC_FLUSH) - * or if an error happened. By default - join collected chunks, - * free memory and fill `results` / `err` properties. - **/ -Inflate.prototype.onEnd = function (status) { - // On success - join - if (status === c.Z_OK) { - if (this.options.to === 'string') { - // Glue & convert here, until we teach pako to send - // utf8 alligned strings to onData - this.result = this.chunks.join(''); - } else { - this.result = utils.flattenChunks(this.chunks); - } - } - this.chunks = []; - this.err = status; - this.msg = this.strm.msg; -}; - - -/** - * inflate(data[, options]) -> Uint8Array|Array|String - * - data (Uint8Array|Array|String): input data to decompress. - * - options (Object): zlib inflate options. - * - * Decompress `data` with inflate/ungzip and `options`. Autodetect - * format via wrapper header by default. That's why we don't provide - * separate `ungzip` method. - * - * Supported options are: - * - * - windowBits - * - * [http://zlib.net/manual.html#Advanced](http://zlib.net/manual.html#Advanced) - * for more information. - * - * Sugar (options): - * - * - `raw` (Boolean) - say that we work with raw stream, if you don't wish to specify - * negative windowBits implicitly. - * - `to` (String) - if equal to 'string', then result will be converted - * from utf8 to utf16 (javascript) string. When string output requested, - * chunk length can differ from `chunkSize`, depending on content. - * - * - * ##### Example: - * - * ```javascript - * var pako = require('pako') - * , input = pako.deflate([1,2,3,4,5,6,7,8,9]) - * , output; - * - * try { - * output = pako.inflate(input); - * } catch (err) - * console.log(err); - * } - * ``` - **/ -function inflate(input, options) { - var inflator = new Inflate(options); - - inflator.push(input, true); - - // That will never happens, if you don't cheat with options :) - if (inflator.err) { throw inflator.msg; } - - return inflator.result; -} - - -/** - * inflateRaw(data[, options]) -> Uint8Array|Array|String - * - data (Uint8Array|Array|String): input data to decompress. - * - options (Object): zlib inflate options. - * - * The same as [[inflate]], but creates raw data, without wrapper - * (header and adler32 crc). - **/ -function inflateRaw(input, options) { - options = options || {}; - options.raw = true; - return inflate(input, options); -} - - -/** - * ungzip(data[, options]) -> Uint8Array|Array|String - * - data (Uint8Array|Array|String): input data to decompress. - * - options (Object): zlib inflate options. - * - * Just shortcut to [[inflate]], because it autodetects format - * by header.content. Done for convenience. - **/ - - -exports.Inflate = Inflate; -exports.inflate = inflate; -exports.inflateRaw = inflateRaw; -exports.ungzip = inflate; diff --git a/node_modules/pako/lib/utils/common.js b/node_modules/pako/lib/utils/common.js deleted file mode 100644 index 1e159fec..00000000 --- a/node_modules/pako/lib/utils/common.js +++ /dev/null @@ -1,102 +0,0 @@ -'use strict'; - - -var TYPED_OK = (typeof Uint8Array !== 'undefined') && - (typeof Uint16Array !== 'undefined') && - (typeof Int32Array !== 'undefined'); - - -exports.assign = function (obj /*from1, from2, from3, ...*/) { - var sources = Array.prototype.slice.call(arguments, 1); - while (sources.length) { - var source = sources.shift(); - if (!source) { continue; } - - if (typeof source !== 'object') { - throw new TypeError(source + 'must be non-object'); - } - - for (var p in source) { - if (source.hasOwnProperty(p)) { - obj[p] = source[p]; - } - } - } - - return obj; -}; - - -// reduce buffer size, avoiding mem copy -exports.shrinkBuf = function (buf, size) { - if (buf.length === size) { return buf; } - if (buf.subarray) { return buf.subarray(0, size); } - buf.length = size; - return buf; -}; - - -var fnTyped = { - arraySet: function (dest, src, src_offs, len, dest_offs) { - if (src.subarray && dest.subarray) { - dest.set(src.subarray(src_offs, src_offs + len), dest_offs); - return; - } - // Fallback to ordinary array - for (var i = 0; i < len; i++) { - dest[dest_offs + i] = src[src_offs + i]; - } - }, - // Join array of chunks to single array. - flattenChunks: function (chunks) { - var i, l, len, pos, chunk, result; - - // calculate data length - len = 0; - for (i = 0, l = chunks.length; i < l; i++) { - len += chunks[i].length; - } - - // join chunks - result = new Uint8Array(len); - pos = 0; - for (i = 0, l = chunks.length; i < l; i++) { - chunk = chunks[i]; - result.set(chunk, pos); - pos += chunk.length; - } - - return result; - } -}; - -var fnUntyped = { - arraySet: function (dest, src, src_offs, len, dest_offs) { - for (var i = 0; i < len; i++) { - dest[dest_offs + i] = src[src_offs + i]; - } - }, - // Join array of chunks to single array. - flattenChunks: function (chunks) { - return [].concat.apply([], chunks); - } -}; - - -// Enable/Disable typed arrays use, for testing -// -exports.setTyped = function (on) { - if (on) { - exports.Buf8 = Uint8Array; - exports.Buf16 = Uint16Array; - exports.Buf32 = Int32Array; - exports.assign(exports, fnTyped); - } else { - exports.Buf8 = Array; - exports.Buf16 = Array; - exports.Buf32 = Array; - exports.assign(exports, fnUntyped); - } -}; - -exports.setTyped(TYPED_OK); diff --git a/node_modules/pako/lib/utils/strings.js b/node_modules/pako/lib/utils/strings.js deleted file mode 100644 index 1a0499c3..00000000 --- a/node_modules/pako/lib/utils/strings.js +++ /dev/null @@ -1,185 +0,0 @@ -// String encode/decode helpers -'use strict'; - - -var utils = require('./common'); - - -// Quick check if we can use fast array to bin string conversion -// -// - apply(Array) can fail on Android 2.2 -// - apply(Uint8Array) can fail on iOS 5.1 Safary -// -var STR_APPLY_OK = true; -var STR_APPLY_UIA_OK = true; - -try { String.fromCharCode.apply(null, [ 0 ]); } catch (__) { STR_APPLY_OK = false; } -try { String.fromCharCode.apply(null, new Uint8Array(1)); } catch (__) { STR_APPLY_UIA_OK = false; } - - -// Table with utf8 lengths (calculated by first byte of sequence) -// Note, that 5 & 6-byte values and some 4-byte values can not be represented in JS, -// because max possible codepoint is 0x10ffff -var _utf8len = new utils.Buf8(256); -for (var q = 0; q < 256; q++) { - _utf8len[q] = (q >= 252 ? 6 : q >= 248 ? 5 : q >= 240 ? 4 : q >= 224 ? 3 : q >= 192 ? 2 : 1); -} -_utf8len[254] = _utf8len[254] = 1; // Invalid sequence start - - -// convert string to array (typed, when possible) -exports.string2buf = function (str) { - var buf, c, c2, m_pos, i, str_len = str.length, buf_len = 0; - - // count binary size - for (m_pos = 0; m_pos < str_len; m_pos++) { - c = str.charCodeAt(m_pos); - if ((c & 0xfc00) === 0xd800 && (m_pos + 1 < str_len)) { - c2 = str.charCodeAt(m_pos + 1); - if ((c2 & 0xfc00) === 0xdc00) { - c = 0x10000 + ((c - 0xd800) << 10) + (c2 - 0xdc00); - m_pos++; - } - } - buf_len += c < 0x80 ? 1 : c < 0x800 ? 2 : c < 0x10000 ? 3 : 4; - } - - // allocate buffer - buf = new utils.Buf8(buf_len); - - // convert - for (i = 0, m_pos = 0; i < buf_len; m_pos++) { - c = str.charCodeAt(m_pos); - if ((c & 0xfc00) === 0xd800 && (m_pos + 1 < str_len)) { - c2 = str.charCodeAt(m_pos + 1); - if ((c2 & 0xfc00) === 0xdc00) { - c = 0x10000 + ((c - 0xd800) << 10) + (c2 - 0xdc00); - m_pos++; - } - } - if (c < 0x80) { - /* one byte */ - buf[i++] = c; - } else if (c < 0x800) { - /* two bytes */ - buf[i++] = 0xC0 | (c >>> 6); - buf[i++] = 0x80 | (c & 0x3f); - } else if (c < 0x10000) { - /* three bytes */ - buf[i++] = 0xE0 | (c >>> 12); - buf[i++] = 0x80 | (c >>> 6 & 0x3f); - buf[i++] = 0x80 | (c & 0x3f); - } else { - /* four bytes */ - buf[i++] = 0xf0 | (c >>> 18); - buf[i++] = 0x80 | (c >>> 12 & 0x3f); - buf[i++] = 0x80 | (c >>> 6 & 0x3f); - buf[i++] = 0x80 | (c & 0x3f); - } - } - - return buf; -}; - -// Helper (used in 2 places) -function buf2binstring(buf, len) { - // use fallback for big arrays to avoid stack overflow - if (len < 65537) { - if ((buf.subarray && STR_APPLY_UIA_OK) || (!buf.subarray && STR_APPLY_OK)) { - return String.fromCharCode.apply(null, utils.shrinkBuf(buf, len)); - } - } - - var result = ''; - for (var i = 0; i < len; i++) { - result += String.fromCharCode(buf[i]); - } - return result; -} - - -// Convert byte array to binary string -exports.buf2binstring = function (buf) { - return buf2binstring(buf, buf.length); -}; - - -// Convert binary string (typed, when possible) -exports.binstring2buf = function (str) { - var buf = new utils.Buf8(str.length); - for (var i = 0, len = buf.length; i < len; i++) { - buf[i] = str.charCodeAt(i); - } - return buf; -}; - - -// convert array to string -exports.buf2string = function (buf, max) { - var i, out, c, c_len; - var len = max || buf.length; - - // Reserve max possible length (2 words per char) - // NB: by unknown reasons, Array is significantly faster for - // String.fromCharCode.apply than Uint16Array. - var utf16buf = new Array(len * 2); - - for (out = 0, i = 0; i < len;) { - c = buf[i++]; - // quick process ascii - if (c < 0x80) { utf16buf[out++] = c; continue; } - - c_len = _utf8len[c]; - // skip 5 & 6 byte codes - if (c_len > 4) { utf16buf[out++] = 0xfffd; i += c_len - 1; continue; } - - // apply mask on first byte - c &= c_len === 2 ? 0x1f : c_len === 3 ? 0x0f : 0x07; - // join the rest - while (c_len > 1 && i < len) { - c = (c << 6) | (buf[i++] & 0x3f); - c_len--; - } - - // terminated by end of string? - if (c_len > 1) { utf16buf[out++] = 0xfffd; continue; } - - if (c < 0x10000) { - utf16buf[out++] = c; - } else { - c -= 0x10000; - utf16buf[out++] = 0xd800 | ((c >> 10) & 0x3ff); - utf16buf[out++] = 0xdc00 | (c & 0x3ff); - } - } - - return buf2binstring(utf16buf, out); -}; - - -// Calculate max possible position in utf8 buffer, -// that will not break sequence. If that's not possible -// - (very small limits) return max size as is. -// -// buf[] - utf8 bytes array -// max - length limit (mandatory); -exports.utf8border = function (buf, max) { - var pos; - - max = max || buf.length; - if (max > buf.length) { max = buf.length; } - - // go back from last position, until start of sequence found - pos = max - 1; - while (pos >= 0 && (buf[pos] & 0xC0) === 0x80) { pos--; } - - // Fuckup - very small and broken sequence, - // return max, because we should return something anyway. - if (pos < 0) { return max; } - - // If we came to start of buffer - that means vuffer is too small, - // return max too. - if (pos === 0) { return max; } - - return (pos + _utf8len[buf[pos]] > max) ? pos : max; -}; diff --git a/node_modules/pako/lib/zlib/adler32.js b/node_modules/pako/lib/zlib/adler32.js deleted file mode 100644 index dcefe937..00000000 --- a/node_modules/pako/lib/zlib/adler32.js +++ /dev/null @@ -1,32 +0,0 @@ -'use strict'; - -// Note: adler32 takes 12% for level 0 and 2% for level 6. -// It doesn't worth to make additional optimizationa as in original. -// Small size is preferable. - -function adler32(adler, buf, len, pos) { - var s1 = (adler & 0xffff) |0, - s2 = ((adler >>> 16) & 0xffff) |0, - n = 0; - - while (len !== 0) { - // Set limit ~ twice less than 5552, to keep - // s2 in 31-bits, because we force signed ints. - // in other case %= will fail. - n = len > 2000 ? 2000 : len; - len -= n; - - do { - s1 = (s1 + buf[pos++]) |0; - s2 = (s2 + s1) |0; - } while (--n); - - s1 %= 65521; - s2 %= 65521; - } - - return (s1 | (s2 << 16)) |0; -} - - -module.exports = adler32; diff --git a/node_modules/pako/lib/zlib/constants.js b/node_modules/pako/lib/zlib/constants.js deleted file mode 100644 index ece67001..00000000 --- a/node_modules/pako/lib/zlib/constants.js +++ /dev/null @@ -1,50 +0,0 @@ -'use strict'; - - -module.exports = { - - /* Allowed flush values; see deflate() and inflate() below for details */ - Z_NO_FLUSH: 0, - Z_PARTIAL_FLUSH: 1, - Z_SYNC_FLUSH: 2, - Z_FULL_FLUSH: 3, - Z_FINISH: 4, - Z_BLOCK: 5, - Z_TREES: 6, - - /* Return codes for the compression/decompression functions. Negative values - * are errors, positive values are used for special but normal events. - */ - Z_OK: 0, - Z_STREAM_END: 1, - Z_NEED_DICT: 2, - Z_ERRNO: -1, - Z_STREAM_ERROR: -2, - Z_DATA_ERROR: -3, - //Z_MEM_ERROR: -4, - Z_BUF_ERROR: -5, - //Z_VERSION_ERROR: -6, - - /* compression levels */ - Z_NO_COMPRESSION: 0, - Z_BEST_SPEED: 1, - Z_BEST_COMPRESSION: 9, - Z_DEFAULT_COMPRESSION: -1, - - - Z_FILTERED: 1, - Z_HUFFMAN_ONLY: 2, - Z_RLE: 3, - Z_FIXED: 4, - Z_DEFAULT_STRATEGY: 0, - - /* Possible values of the data_type field (though see inflate()) */ - Z_BINARY: 0, - Z_TEXT: 1, - //Z_ASCII: 1, // = Z_TEXT (deprecated) - Z_UNKNOWN: 2, - - /* The deflate compression method */ - Z_DEFLATED: 8 - //Z_NULL: null // Use -1 or null inline, depending on var type -}; diff --git a/node_modules/pako/lib/zlib/crc32.js b/node_modules/pako/lib/zlib/crc32.js deleted file mode 100644 index 0768b1c3..00000000 --- a/node_modules/pako/lib/zlib/crc32.js +++ /dev/null @@ -1,41 +0,0 @@ -'use strict'; - -// Note: we can't get significant speed boost here. -// So write code to minimize size - no pregenerated tables -// and array tools dependencies. - - -// Use ordinary array, since untyped makes no boost here -function makeTable() { - var c, table = []; - - for (var n = 0; n < 256; n++) { - c = n; - for (var k = 0; k < 8; k++) { - c = ((c & 1) ? (0xEDB88320 ^ (c >>> 1)) : (c >>> 1)); - } - table[n] = c; - } - - return table; -} - -// Create table on load. Just 255 signed longs. Not a problem. -var crcTable = makeTable(); - - -function crc32(crc, buf, len, pos) { - var t = crcTable, - end = pos + len; - - crc ^= -1; - - for (var i = pos; i < end; i++) { - crc = (crc >>> 8) ^ t[(crc ^ buf[i]) & 0xFF]; - } - - return (crc ^ (-1)); // >>> 0; -} - - -module.exports = crc32; diff --git a/node_modules/pako/lib/zlib/deflate.js b/node_modules/pako/lib/zlib/deflate.js deleted file mode 100644 index e461fb8b..00000000 --- a/node_modules/pako/lib/zlib/deflate.js +++ /dev/null @@ -1,1855 +0,0 @@ -'use strict'; - -var utils = require('../utils/common'); -var trees = require('./trees'); -var adler32 = require('./adler32'); -var crc32 = require('./crc32'); -var msg = require('./messages'); - -/* Public constants ==========================================================*/ -/* ===========================================================================*/ - - -/* Allowed flush values; see deflate() and inflate() below for details */ -var Z_NO_FLUSH = 0; -var Z_PARTIAL_FLUSH = 1; -//var Z_SYNC_FLUSH = 2; -var Z_FULL_FLUSH = 3; -var Z_FINISH = 4; -var Z_BLOCK = 5; -//var Z_TREES = 6; - - -/* Return codes for the compression/decompression functions. Negative values - * are errors, positive values are used for special but normal events. - */ -var Z_OK = 0; -var Z_STREAM_END = 1; -//var Z_NEED_DICT = 2; -//var Z_ERRNO = -1; -var Z_STREAM_ERROR = -2; -var Z_DATA_ERROR = -3; -//var Z_MEM_ERROR = -4; -var Z_BUF_ERROR = -5; -//var Z_VERSION_ERROR = -6; - - -/* compression levels */ -//var Z_NO_COMPRESSION = 0; -//var Z_BEST_SPEED = 1; -//var Z_BEST_COMPRESSION = 9; -var Z_DEFAULT_COMPRESSION = -1; - - -var Z_FILTERED = 1; -var Z_HUFFMAN_ONLY = 2; -var Z_RLE = 3; -var Z_FIXED = 4; -var Z_DEFAULT_STRATEGY = 0; - -/* Possible values of the data_type field (though see inflate()) */ -//var Z_BINARY = 0; -//var Z_TEXT = 1; -//var Z_ASCII = 1; // = Z_TEXT -var Z_UNKNOWN = 2; - - -/* The deflate compression method */ -var Z_DEFLATED = 8; - -/*============================================================================*/ - - -var MAX_MEM_LEVEL = 9; -/* Maximum value for memLevel in deflateInit2 */ -var MAX_WBITS = 15; -/* 32K LZ77 window */ -var DEF_MEM_LEVEL = 8; - - -var LENGTH_CODES = 29; -/* number of length codes, not counting the special END_BLOCK code */ -var LITERALS = 256; -/* number of literal bytes 0..255 */ -var L_CODES = LITERALS + 1 + LENGTH_CODES; -/* number of Literal or Length codes, including the END_BLOCK code */ -var D_CODES = 30; -/* number of distance codes */ -var BL_CODES = 19; -/* number of codes used to transfer the bit lengths */ -var HEAP_SIZE = 2 * L_CODES + 1; -/* maximum heap size */ -var MAX_BITS = 15; -/* All codes must not exceed MAX_BITS bits */ - -var MIN_MATCH = 3; -var MAX_MATCH = 258; -var MIN_LOOKAHEAD = (MAX_MATCH + MIN_MATCH + 1); - -var PRESET_DICT = 0x20; - -var INIT_STATE = 42; -var EXTRA_STATE = 69; -var NAME_STATE = 73; -var COMMENT_STATE = 91; -var HCRC_STATE = 103; -var BUSY_STATE = 113; -var FINISH_STATE = 666; - -var BS_NEED_MORE = 1; /* block not completed, need more input or more output */ -var BS_BLOCK_DONE = 2; /* block flush performed */ -var BS_FINISH_STARTED = 3; /* finish started, need only more output at next deflate */ -var BS_FINISH_DONE = 4; /* finish done, accept no more input or output */ - -var OS_CODE = 0x03; // Unix :) . Don't detect, use this default. - -function err(strm, errorCode) { - strm.msg = msg[errorCode]; - return errorCode; -} - -function rank(f) { - return ((f) << 1) - ((f) > 4 ? 9 : 0); -} - -function zero(buf) { var len = buf.length; while (--len >= 0) { buf[len] = 0; } } - - -/* ========================================================================= - * Flush as much pending output as possible. All deflate() output goes - * through this function so some applications may wish to modify it - * to avoid allocating a large strm->output buffer and copying into it. - * (See also read_buf()). - */ -function flush_pending(strm) { - var s = strm.state; - - //_tr_flush_bits(s); - var len = s.pending; - if (len > strm.avail_out) { - len = strm.avail_out; - } - if (len === 0) { return; } - - utils.arraySet(strm.output, s.pending_buf, s.pending_out, len, strm.next_out); - strm.next_out += len; - s.pending_out += len; - strm.total_out += len; - strm.avail_out -= len; - s.pending -= len; - if (s.pending === 0) { - s.pending_out = 0; - } -} - - -function flush_block_only(s, last) { - trees._tr_flush_block(s, (s.block_start >= 0 ? s.block_start : -1), s.strstart - s.block_start, last); - s.block_start = s.strstart; - flush_pending(s.strm); -} - - -function put_byte(s, b) { - s.pending_buf[s.pending++] = b; -} - - -/* ========================================================================= - * Put a short in the pending buffer. The 16-bit value is put in MSB order. - * IN assertion: the stream state is correct and there is enough room in - * pending_buf. - */ -function putShortMSB(s, b) { -// put_byte(s, (Byte)(b >> 8)); -// put_byte(s, (Byte)(b & 0xff)); - s.pending_buf[s.pending++] = (b >>> 8) & 0xff; - s.pending_buf[s.pending++] = b & 0xff; -} - - -/* =========================================================================== - * Read a new buffer from the current input stream, update the adler32 - * and total number of bytes read. All deflate() input goes through - * this function so some applications may wish to modify it to avoid - * allocating a large strm->input buffer and copying from it. - * (See also flush_pending()). - */ -function read_buf(strm, buf, start, size) { - var len = strm.avail_in; - - if (len > size) { len = size; } - if (len === 0) { return 0; } - - strm.avail_in -= len; - - // zmemcpy(buf, strm->next_in, len); - utils.arraySet(buf, strm.input, strm.next_in, len, start); - if (strm.state.wrap === 1) { - strm.adler = adler32(strm.adler, buf, len, start); - } - - else if (strm.state.wrap === 2) { - strm.adler = crc32(strm.adler, buf, len, start); - } - - strm.next_in += len; - strm.total_in += len; - - return len; -} - - -/* =========================================================================== - * Set match_start to the longest match starting at the given string and - * return its length. Matches shorter or equal to prev_length are discarded, - * in which case the result is equal to prev_length and match_start is - * garbage. - * IN assertions: cur_match is the head of the hash chain for the current - * string (strstart) and its distance is <= MAX_DIST, and prev_length >= 1 - * OUT assertion: the match length is not greater than s->lookahead. - */ -function longest_match(s, cur_match) { - var chain_length = s.max_chain_length; /* max hash chain length */ - var scan = s.strstart; /* current string */ - var match; /* matched string */ - var len; /* length of current match */ - var best_len = s.prev_length; /* best match length so far */ - var nice_match = s.nice_match; /* stop if match long enough */ - var limit = (s.strstart > (s.w_size - MIN_LOOKAHEAD)) ? - s.strstart - (s.w_size - MIN_LOOKAHEAD) : 0/*NIL*/; - - var _win = s.window; // shortcut - - var wmask = s.w_mask; - var prev = s.prev; - - /* Stop when cur_match becomes <= limit. To simplify the code, - * we prevent matches with the string of window index 0. - */ - - var strend = s.strstart + MAX_MATCH; - var scan_end1 = _win[scan + best_len - 1]; - var scan_end = _win[scan + best_len]; - - /* The code is optimized for HASH_BITS >= 8 and MAX_MATCH-2 multiple of 16. - * It is easy to get rid of this optimization if necessary. - */ - // Assert(s->hash_bits >= 8 && MAX_MATCH == 258, "Code too clever"); - - /* Do not waste too much time if we already have a good match: */ - if (s.prev_length >= s.good_match) { - chain_length >>= 2; - } - /* Do not look for matches beyond the end of the input. This is necessary - * to make deflate deterministic. - */ - if (nice_match > s.lookahead) { nice_match = s.lookahead; } - - // Assert((ulg)s->strstart <= s->window_size-MIN_LOOKAHEAD, "need lookahead"); - - do { - // Assert(cur_match < s->strstart, "no future"); - match = cur_match; - - /* Skip to next match if the match length cannot increase - * or if the match length is less than 2. Note that the checks below - * for insufficient lookahead only occur occasionally for performance - * reasons. Therefore uninitialized memory will be accessed, and - * conditional jumps will be made that depend on those values. - * However the length of the match is limited to the lookahead, so - * the output of deflate is not affected by the uninitialized values. - */ - - if (_win[match + best_len] !== scan_end || - _win[match + best_len - 1] !== scan_end1 || - _win[match] !== _win[scan] || - _win[++match] !== _win[scan + 1]) { - continue; - } - - /* The check at best_len-1 can be removed because it will be made - * again later. (This heuristic is not always a win.) - * It is not necessary to compare scan[2] and match[2] since they - * are always equal when the other bytes match, given that - * the hash keys are equal and that HASH_BITS >= 8. - */ - scan += 2; - match++; - // Assert(*scan == *match, "match[2]?"); - - /* We check for insufficient lookahead only every 8th comparison; - * the 256th check will be made at strstart+258. - */ - do { - /*jshint noempty:false*/ - } while (_win[++scan] === _win[++match] && _win[++scan] === _win[++match] && - _win[++scan] === _win[++match] && _win[++scan] === _win[++match] && - _win[++scan] === _win[++match] && _win[++scan] === _win[++match] && - _win[++scan] === _win[++match] && _win[++scan] === _win[++match] && - scan < strend); - - // Assert(scan <= s->window+(unsigned)(s->window_size-1), "wild scan"); - - len = MAX_MATCH - (strend - scan); - scan = strend - MAX_MATCH; - - if (len > best_len) { - s.match_start = cur_match; - best_len = len; - if (len >= nice_match) { - break; - } - scan_end1 = _win[scan + best_len - 1]; - scan_end = _win[scan + best_len]; - } - } while ((cur_match = prev[cur_match & wmask]) > limit && --chain_length !== 0); - - if (best_len <= s.lookahead) { - return best_len; - } - return s.lookahead; -} - - -/* =========================================================================== - * Fill the window when the lookahead becomes insufficient. - * Updates strstart and lookahead. - * - * IN assertion: lookahead < MIN_LOOKAHEAD - * OUT assertions: strstart <= window_size-MIN_LOOKAHEAD - * At least one byte has been read, or avail_in == 0; reads are - * performed for at least two bytes (required for the zip translate_eol - * option -- not supported here). - */ -function fill_window(s) { - var _w_size = s.w_size; - var p, n, m, more, str; - - //Assert(s->lookahead < MIN_LOOKAHEAD, "already enough lookahead"); - - do { - more = s.window_size - s.lookahead - s.strstart; - - // JS ints have 32 bit, block below not needed - /* Deal with !@#$% 64K limit: */ - //if (sizeof(int) <= 2) { - // if (more == 0 && s->strstart == 0 && s->lookahead == 0) { - // more = wsize; - // - // } else if (more == (unsigned)(-1)) { - // /* Very unlikely, but possible on 16 bit machine if - // * strstart == 0 && lookahead == 1 (input done a byte at time) - // */ - // more--; - // } - //} - - - /* If the window is almost full and there is insufficient lookahead, - * move the upper half to the lower one to make room in the upper half. - */ - if (s.strstart >= _w_size + (_w_size - MIN_LOOKAHEAD)) { - - utils.arraySet(s.window, s.window, _w_size, _w_size, 0); - s.match_start -= _w_size; - s.strstart -= _w_size; - /* we now have strstart >= MAX_DIST */ - s.block_start -= _w_size; - - /* Slide the hash table (could be avoided with 32 bit values - at the expense of memory usage). We slide even when level == 0 - to keep the hash table consistent if we switch back to level > 0 - later. (Using level 0 permanently is not an optimal usage of - zlib, so we don't care about this pathological case.) - */ - - n = s.hash_size; - p = n; - do { - m = s.head[--p]; - s.head[p] = (m >= _w_size ? m - _w_size : 0); - } while (--n); - - n = _w_size; - p = n; - do { - m = s.prev[--p]; - s.prev[p] = (m >= _w_size ? m - _w_size : 0); - /* If n is not on any hash chain, prev[n] is garbage but - * its value will never be used. - */ - } while (--n); - - more += _w_size; - } - if (s.strm.avail_in === 0) { - break; - } - - /* If there was no sliding: - * strstart <= WSIZE+MAX_DIST-1 && lookahead <= MIN_LOOKAHEAD - 1 && - * more == window_size - lookahead - strstart - * => more >= window_size - (MIN_LOOKAHEAD-1 + WSIZE + MAX_DIST-1) - * => more >= window_size - 2*WSIZE + 2 - * In the BIG_MEM or MMAP case (not yet supported), - * window_size == input_size + MIN_LOOKAHEAD && - * strstart + s->lookahead <= input_size => more >= MIN_LOOKAHEAD. - * Otherwise, window_size == 2*WSIZE so more >= 2. - * If there was sliding, more >= WSIZE. So in all cases, more >= 2. - */ - //Assert(more >= 2, "more < 2"); - n = read_buf(s.strm, s.window, s.strstart + s.lookahead, more); - s.lookahead += n; - - /* Initialize the hash value now that we have some input: */ - if (s.lookahead + s.insert >= MIN_MATCH) { - str = s.strstart - s.insert; - s.ins_h = s.window[str]; - - /* UPDATE_HASH(s, s->ins_h, s->window[str + 1]); */ - s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[str + 1]) & s.hash_mask; -//#if MIN_MATCH != 3 -// Call update_hash() MIN_MATCH-3 more times -//#endif - while (s.insert) { - /* UPDATE_HASH(s, s->ins_h, s->window[str + MIN_MATCH-1]); */ - s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[str + MIN_MATCH - 1]) & s.hash_mask; - - s.prev[str & s.w_mask] = s.head[s.ins_h]; - s.head[s.ins_h] = str; - str++; - s.insert--; - if (s.lookahead + s.insert < MIN_MATCH) { - break; - } - } - } - /* If the whole input has less than MIN_MATCH bytes, ins_h is garbage, - * but this is not important since only literal bytes will be emitted. - */ - - } while (s.lookahead < MIN_LOOKAHEAD && s.strm.avail_in !== 0); - - /* If the WIN_INIT bytes after the end of the current data have never been - * written, then zero those bytes in order to avoid memory check reports of - * the use of uninitialized (or uninitialised as Julian writes) bytes by - * the longest match routines. Update the high water mark for the next - * time through here. WIN_INIT is set to MAX_MATCH since the longest match - * routines allow scanning to strstart + MAX_MATCH, ignoring lookahead. - */ -// if (s.high_water < s.window_size) { -// var curr = s.strstart + s.lookahead; -// var init = 0; -// -// if (s.high_water < curr) { -// /* Previous high water mark below current data -- zero WIN_INIT -// * bytes or up to end of window, whichever is less. -// */ -// init = s.window_size - curr; -// if (init > WIN_INIT) -// init = WIN_INIT; -// zmemzero(s->window + curr, (unsigned)init); -// s->high_water = curr + init; -// } -// else if (s->high_water < (ulg)curr + WIN_INIT) { -// /* High water mark at or above current data, but below current data -// * plus WIN_INIT -- zero out to current data plus WIN_INIT, or up -// * to end of window, whichever is less. -// */ -// init = (ulg)curr + WIN_INIT - s->high_water; -// if (init > s->window_size - s->high_water) -// init = s->window_size - s->high_water; -// zmemzero(s->window + s->high_water, (unsigned)init); -// s->high_water += init; -// } -// } -// -// Assert((ulg)s->strstart <= s->window_size - MIN_LOOKAHEAD, -// "not enough room for search"); -} - -/* =========================================================================== - * Copy without compression as much as possible from the input stream, return - * the current block state. - * This function does not insert new strings in the dictionary since - * uncompressible data is probably not useful. This function is used - * only for the level=0 compression option. - * NOTE: this function should be optimized to avoid extra copying from - * window to pending_buf. - */ -function deflate_stored(s, flush) { - /* Stored blocks are limited to 0xffff bytes, pending_buf is limited - * to pending_buf_size, and each stored block has a 5 byte header: - */ - var max_block_size = 0xffff; - - if (max_block_size > s.pending_buf_size - 5) { - max_block_size = s.pending_buf_size - 5; - } - - /* Copy as much as possible from input to output: */ - for (;;) { - /* Fill the window as much as possible: */ - if (s.lookahead <= 1) { - - //Assert(s->strstart < s->w_size+MAX_DIST(s) || - // s->block_start >= (long)s->w_size, "slide too late"); -// if (!(s.strstart < s.w_size + (s.w_size - MIN_LOOKAHEAD) || -// s.block_start >= s.w_size)) { -// throw new Error("slide too late"); -// } - - fill_window(s); - if (s.lookahead === 0 && flush === Z_NO_FLUSH) { - return BS_NEED_MORE; - } - - if (s.lookahead === 0) { - break; - } - /* flush the current block */ - } - //Assert(s->block_start >= 0L, "block gone"); -// if (s.block_start < 0) throw new Error("block gone"); - - s.strstart += s.lookahead; - s.lookahead = 0; - - /* Emit a stored block if pending_buf will be full: */ - var max_start = s.block_start + max_block_size; - - if (s.strstart === 0 || s.strstart >= max_start) { - /* strstart == 0 is possible when wraparound on 16-bit machine */ - s.lookahead = s.strstart - max_start; - s.strstart = max_start; - /*** FLUSH_BLOCK(s, 0); ***/ - flush_block_only(s, false); - if (s.strm.avail_out === 0) { - return BS_NEED_MORE; - } - /***/ - - - } - /* Flush if we may have to slide, otherwise block_start may become - * negative and the data will be gone: - */ - if (s.strstart - s.block_start >= (s.w_size - MIN_LOOKAHEAD)) { - /*** FLUSH_BLOCK(s, 0); ***/ - flush_block_only(s, false); - if (s.strm.avail_out === 0) { - return BS_NEED_MORE; - } - /***/ - } - } - - s.insert = 0; - - if (flush === Z_FINISH) { - /*** FLUSH_BLOCK(s, 1); ***/ - flush_block_only(s, true); - if (s.strm.avail_out === 0) { - return BS_FINISH_STARTED; - } - /***/ - return BS_FINISH_DONE; - } - - if (s.strstart > s.block_start) { - /*** FLUSH_BLOCK(s, 0); ***/ - flush_block_only(s, false); - if (s.strm.avail_out === 0) { - return BS_NEED_MORE; - } - /***/ - } - - return BS_NEED_MORE; -} - -/* =========================================================================== - * Compress as much as possible from the input stream, return the current - * block state. - * This function does not perform lazy evaluation of matches and inserts - * new strings in the dictionary only for unmatched strings or for short - * matches. It is used only for the fast compression options. - */ -function deflate_fast(s, flush) { - var hash_head; /* head of the hash chain */ - var bflush; /* set if current block must be flushed */ - - for (;;) { - /* Make sure that we always have enough lookahead, except - * at the end of the input file. We need MAX_MATCH bytes - * for the next match, plus MIN_MATCH bytes to insert the - * string following the next match. - */ - if (s.lookahead < MIN_LOOKAHEAD) { - fill_window(s); - if (s.lookahead < MIN_LOOKAHEAD && flush === Z_NO_FLUSH) { - return BS_NEED_MORE; - } - if (s.lookahead === 0) { - break; /* flush the current block */ - } - } - - /* Insert the string window[strstart .. strstart+2] in the - * dictionary, and set hash_head to the head of the hash chain: - */ - hash_head = 0/*NIL*/; - if (s.lookahead >= MIN_MATCH) { - /*** INSERT_STRING(s, s.strstart, hash_head); ***/ - s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[s.strstart + MIN_MATCH - 1]) & s.hash_mask; - hash_head = s.prev[s.strstart & s.w_mask] = s.head[s.ins_h]; - s.head[s.ins_h] = s.strstart; - /***/ - } - - /* Find the longest match, discarding those <= prev_length. - * At this point we have always match_length < MIN_MATCH - */ - if (hash_head !== 0/*NIL*/ && ((s.strstart - hash_head) <= (s.w_size - MIN_LOOKAHEAD))) { - /* To simplify the code, we prevent matches with the string - * of window index 0 (in particular we have to avoid a match - * of the string with itself at the start of the input file). - */ - s.match_length = longest_match(s, hash_head); - /* longest_match() sets match_start */ - } - if (s.match_length >= MIN_MATCH) { - // check_match(s, s.strstart, s.match_start, s.match_length); // for debug only - - /*** _tr_tally_dist(s, s.strstart - s.match_start, - s.match_length - MIN_MATCH, bflush); ***/ - bflush = trees._tr_tally(s, s.strstart - s.match_start, s.match_length - MIN_MATCH); - - s.lookahead -= s.match_length; - - /* Insert new strings in the hash table only if the match length - * is not too large. This saves time but degrades compression. - */ - if (s.match_length <= s.max_lazy_match/*max_insert_length*/ && s.lookahead >= MIN_MATCH) { - s.match_length--; /* string at strstart already in table */ - do { - s.strstart++; - /*** INSERT_STRING(s, s.strstart, hash_head); ***/ - s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[s.strstart + MIN_MATCH - 1]) & s.hash_mask; - hash_head = s.prev[s.strstart & s.w_mask] = s.head[s.ins_h]; - s.head[s.ins_h] = s.strstart; - /***/ - /* strstart never exceeds WSIZE-MAX_MATCH, so there are - * always MIN_MATCH bytes ahead. - */ - } while (--s.match_length !== 0); - s.strstart++; - } else - { - s.strstart += s.match_length; - s.match_length = 0; - s.ins_h = s.window[s.strstart]; - /* UPDATE_HASH(s, s.ins_h, s.window[s.strstart+1]); */ - s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[s.strstart + 1]) & s.hash_mask; - -//#if MIN_MATCH != 3 -// Call UPDATE_HASH() MIN_MATCH-3 more times -//#endif - /* If lookahead < MIN_MATCH, ins_h is garbage, but it does not - * matter since it will be recomputed at next deflate call. - */ - } - } else { - /* No match, output a literal byte */ - //Tracevv((stderr,"%c", s.window[s.strstart])); - /*** _tr_tally_lit(s, s.window[s.strstart], bflush); ***/ - bflush = trees._tr_tally(s, 0, s.window[s.strstart]); - - s.lookahead--; - s.strstart++; - } - if (bflush) { - /*** FLUSH_BLOCK(s, 0); ***/ - flush_block_only(s, false); - if (s.strm.avail_out === 0) { - return BS_NEED_MORE; - } - /***/ - } - } - s.insert = ((s.strstart < (MIN_MATCH - 1)) ? s.strstart : MIN_MATCH - 1); - if (flush === Z_FINISH) { - /*** FLUSH_BLOCK(s, 1); ***/ - flush_block_only(s, true); - if (s.strm.avail_out === 0) { - return BS_FINISH_STARTED; - } - /***/ - return BS_FINISH_DONE; - } - if (s.last_lit) { - /*** FLUSH_BLOCK(s, 0); ***/ - flush_block_only(s, false); - if (s.strm.avail_out === 0) { - return BS_NEED_MORE; - } - /***/ - } - return BS_BLOCK_DONE; -} - -/* =========================================================================== - * Same as above, but achieves better compression. We use a lazy - * evaluation for matches: a match is finally adopted only if there is - * no better match at the next window position. - */ -function deflate_slow(s, flush) { - var hash_head; /* head of hash chain */ - var bflush; /* set if current block must be flushed */ - - var max_insert; - - /* Process the input block. */ - for (;;) { - /* Make sure that we always have enough lookahead, except - * at the end of the input file. We need MAX_MATCH bytes - * for the next match, plus MIN_MATCH bytes to insert the - * string following the next match. - */ - if (s.lookahead < MIN_LOOKAHEAD) { - fill_window(s); - if (s.lookahead < MIN_LOOKAHEAD && flush === Z_NO_FLUSH) { - return BS_NEED_MORE; - } - if (s.lookahead === 0) { break; } /* flush the current block */ - } - - /* Insert the string window[strstart .. strstart+2] in the - * dictionary, and set hash_head to the head of the hash chain: - */ - hash_head = 0/*NIL*/; - if (s.lookahead >= MIN_MATCH) { - /*** INSERT_STRING(s, s.strstart, hash_head); ***/ - s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[s.strstart + MIN_MATCH - 1]) & s.hash_mask; - hash_head = s.prev[s.strstart & s.w_mask] = s.head[s.ins_h]; - s.head[s.ins_h] = s.strstart; - /***/ - } - - /* Find the longest match, discarding those <= prev_length. - */ - s.prev_length = s.match_length; - s.prev_match = s.match_start; - s.match_length = MIN_MATCH - 1; - - if (hash_head !== 0/*NIL*/ && s.prev_length < s.max_lazy_match && - s.strstart - hash_head <= (s.w_size - MIN_LOOKAHEAD)/*MAX_DIST(s)*/) { - /* To simplify the code, we prevent matches with the string - * of window index 0 (in particular we have to avoid a match - * of the string with itself at the start of the input file). - */ - s.match_length = longest_match(s, hash_head); - /* longest_match() sets match_start */ - - if (s.match_length <= 5 && - (s.strategy === Z_FILTERED || (s.match_length === MIN_MATCH && s.strstart - s.match_start > 4096/*TOO_FAR*/))) { - - /* If prev_match is also MIN_MATCH, match_start is garbage - * but we will ignore the current match anyway. - */ - s.match_length = MIN_MATCH - 1; - } - } - /* If there was a match at the previous step and the current - * match is not better, output the previous match: - */ - if (s.prev_length >= MIN_MATCH && s.match_length <= s.prev_length) { - max_insert = s.strstart + s.lookahead - MIN_MATCH; - /* Do not insert strings in hash table beyond this. */ - - //check_match(s, s.strstart-1, s.prev_match, s.prev_length); - - /***_tr_tally_dist(s, s.strstart - 1 - s.prev_match, - s.prev_length - MIN_MATCH, bflush);***/ - bflush = trees._tr_tally(s, s.strstart - 1 - s.prev_match, s.prev_length - MIN_MATCH); - /* Insert in hash table all strings up to the end of the match. - * strstart-1 and strstart are already inserted. If there is not - * enough lookahead, the last two strings are not inserted in - * the hash table. - */ - s.lookahead -= s.prev_length - 1; - s.prev_length -= 2; - do { - if (++s.strstart <= max_insert) { - /*** INSERT_STRING(s, s.strstart, hash_head); ***/ - s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[s.strstart + MIN_MATCH - 1]) & s.hash_mask; - hash_head = s.prev[s.strstart & s.w_mask] = s.head[s.ins_h]; - s.head[s.ins_h] = s.strstart; - /***/ - } - } while (--s.prev_length !== 0); - s.match_available = 0; - s.match_length = MIN_MATCH - 1; - s.strstart++; - - if (bflush) { - /*** FLUSH_BLOCK(s, 0); ***/ - flush_block_only(s, false); - if (s.strm.avail_out === 0) { - return BS_NEED_MORE; - } - /***/ - } - - } else if (s.match_available) { - /* If there was no match at the previous position, output a - * single literal. If there was a match but the current match - * is longer, truncate the previous match to a single literal. - */ - //Tracevv((stderr,"%c", s->window[s->strstart-1])); - /*** _tr_tally_lit(s, s.window[s.strstart-1], bflush); ***/ - bflush = trees._tr_tally(s, 0, s.window[s.strstart - 1]); - - if (bflush) { - /*** FLUSH_BLOCK_ONLY(s, 0) ***/ - flush_block_only(s, false); - /***/ - } - s.strstart++; - s.lookahead--; - if (s.strm.avail_out === 0) { - return BS_NEED_MORE; - } - } else { - /* There is no previous match to compare with, wait for - * the next step to decide. - */ - s.match_available = 1; - s.strstart++; - s.lookahead--; - } - } - //Assert (flush != Z_NO_FLUSH, "no flush?"); - if (s.match_available) { - //Tracevv((stderr,"%c", s->window[s->strstart-1])); - /*** _tr_tally_lit(s, s.window[s.strstart-1], bflush); ***/ - bflush = trees._tr_tally(s, 0, s.window[s.strstart - 1]); - - s.match_available = 0; - } - s.insert = s.strstart < MIN_MATCH - 1 ? s.strstart : MIN_MATCH - 1; - if (flush === Z_FINISH) { - /*** FLUSH_BLOCK(s, 1); ***/ - flush_block_only(s, true); - if (s.strm.avail_out === 0) { - return BS_FINISH_STARTED; - } - /***/ - return BS_FINISH_DONE; - } - if (s.last_lit) { - /*** FLUSH_BLOCK(s, 0); ***/ - flush_block_only(s, false); - if (s.strm.avail_out === 0) { - return BS_NEED_MORE; - } - /***/ - } - - return BS_BLOCK_DONE; -} - - -/* =========================================================================== - * For Z_RLE, simply look for runs of bytes, generate matches only of distance - * one. Do not maintain a hash table. (It will be regenerated if this run of - * deflate switches away from Z_RLE.) - */ -function deflate_rle(s, flush) { - var bflush; /* set if current block must be flushed */ - var prev; /* byte at distance one to match */ - var scan, strend; /* scan goes up to strend for length of run */ - - var _win = s.window; - - for (;;) { - /* Make sure that we always have enough lookahead, except - * at the end of the input file. We need MAX_MATCH bytes - * for the longest run, plus one for the unrolled loop. - */ - if (s.lookahead <= MAX_MATCH) { - fill_window(s); - if (s.lookahead <= MAX_MATCH && flush === Z_NO_FLUSH) { - return BS_NEED_MORE; - } - if (s.lookahead === 0) { break; } /* flush the current block */ - } - - /* See how many times the previous byte repeats */ - s.match_length = 0; - if (s.lookahead >= MIN_MATCH && s.strstart > 0) { - scan = s.strstart - 1; - prev = _win[scan]; - if (prev === _win[++scan] && prev === _win[++scan] && prev === _win[++scan]) { - strend = s.strstart + MAX_MATCH; - do { - /*jshint noempty:false*/ - } while (prev === _win[++scan] && prev === _win[++scan] && - prev === _win[++scan] && prev === _win[++scan] && - prev === _win[++scan] && prev === _win[++scan] && - prev === _win[++scan] && prev === _win[++scan] && - scan < strend); - s.match_length = MAX_MATCH - (strend - scan); - if (s.match_length > s.lookahead) { - s.match_length = s.lookahead; - } - } - //Assert(scan <= s->window+(uInt)(s->window_size-1), "wild scan"); - } - - /* Emit match if have run of MIN_MATCH or longer, else emit literal */ - if (s.match_length >= MIN_MATCH) { - //check_match(s, s.strstart, s.strstart - 1, s.match_length); - - /*** _tr_tally_dist(s, 1, s.match_length - MIN_MATCH, bflush); ***/ - bflush = trees._tr_tally(s, 1, s.match_length - MIN_MATCH); - - s.lookahead -= s.match_length; - s.strstart += s.match_length; - s.match_length = 0; - } else { - /* No match, output a literal byte */ - //Tracevv((stderr,"%c", s->window[s->strstart])); - /*** _tr_tally_lit(s, s.window[s.strstart], bflush); ***/ - bflush = trees._tr_tally(s, 0, s.window[s.strstart]); - - s.lookahead--; - s.strstart++; - } - if (bflush) { - /*** FLUSH_BLOCK(s, 0); ***/ - flush_block_only(s, false); - if (s.strm.avail_out === 0) { - return BS_NEED_MORE; - } - /***/ - } - } - s.insert = 0; - if (flush === Z_FINISH) { - /*** FLUSH_BLOCK(s, 1); ***/ - flush_block_only(s, true); - if (s.strm.avail_out === 0) { - return BS_FINISH_STARTED; - } - /***/ - return BS_FINISH_DONE; - } - if (s.last_lit) { - /*** FLUSH_BLOCK(s, 0); ***/ - flush_block_only(s, false); - if (s.strm.avail_out === 0) { - return BS_NEED_MORE; - } - /***/ - } - return BS_BLOCK_DONE; -} - -/* =========================================================================== - * For Z_HUFFMAN_ONLY, do not look for matches. Do not maintain a hash table. - * (It will be regenerated if this run of deflate switches away from Huffman.) - */ -function deflate_huff(s, flush) { - var bflush; /* set if current block must be flushed */ - - for (;;) { - /* Make sure that we have a literal to write. */ - if (s.lookahead === 0) { - fill_window(s); - if (s.lookahead === 0) { - if (flush === Z_NO_FLUSH) { - return BS_NEED_MORE; - } - break; /* flush the current block */ - } - } - - /* Output a literal byte */ - s.match_length = 0; - //Tracevv((stderr,"%c", s->window[s->strstart])); - /*** _tr_tally_lit(s, s.window[s.strstart], bflush); ***/ - bflush = trees._tr_tally(s, 0, s.window[s.strstart]); - s.lookahead--; - s.strstart++; - if (bflush) { - /*** FLUSH_BLOCK(s, 0); ***/ - flush_block_only(s, false); - if (s.strm.avail_out === 0) { - return BS_NEED_MORE; - } - /***/ - } - } - s.insert = 0; - if (flush === Z_FINISH) { - /*** FLUSH_BLOCK(s, 1); ***/ - flush_block_only(s, true); - if (s.strm.avail_out === 0) { - return BS_FINISH_STARTED; - } - /***/ - return BS_FINISH_DONE; - } - if (s.last_lit) { - /*** FLUSH_BLOCK(s, 0); ***/ - flush_block_only(s, false); - if (s.strm.avail_out === 0) { - return BS_NEED_MORE; - } - /***/ - } - return BS_BLOCK_DONE; -} - -/* Values for max_lazy_match, good_match and max_chain_length, depending on - * the desired pack level (0..9). The values given below have been tuned to - * exclude worst case performance for pathological files. Better values may be - * found for specific files. - */ -function Config(good_length, max_lazy, nice_length, max_chain, func) { - this.good_length = good_length; - this.max_lazy = max_lazy; - this.nice_length = nice_length; - this.max_chain = max_chain; - this.func = func; -} - -var configuration_table; - -configuration_table = [ - /* good lazy nice chain */ - new Config(0, 0, 0, 0, deflate_stored), /* 0 store only */ - new Config(4, 4, 8, 4, deflate_fast), /* 1 max speed, no lazy matches */ - new Config(4, 5, 16, 8, deflate_fast), /* 2 */ - new Config(4, 6, 32, 32, deflate_fast), /* 3 */ - - new Config(4, 4, 16, 16, deflate_slow), /* 4 lazy matches */ - new Config(8, 16, 32, 32, deflate_slow), /* 5 */ - new Config(8, 16, 128, 128, deflate_slow), /* 6 */ - new Config(8, 32, 128, 256, deflate_slow), /* 7 */ - new Config(32, 128, 258, 1024, deflate_slow), /* 8 */ - new Config(32, 258, 258, 4096, deflate_slow) /* 9 max compression */ -]; - - -/* =========================================================================== - * Initialize the "longest match" routines for a new zlib stream - */ -function lm_init(s) { - s.window_size = 2 * s.w_size; - - /*** CLEAR_HASH(s); ***/ - zero(s.head); // Fill with NIL (= 0); - - /* Set the default configuration parameters: - */ - s.max_lazy_match = configuration_table[s.level].max_lazy; - s.good_match = configuration_table[s.level].good_length; - s.nice_match = configuration_table[s.level].nice_length; - s.max_chain_length = configuration_table[s.level].max_chain; - - s.strstart = 0; - s.block_start = 0; - s.lookahead = 0; - s.insert = 0; - s.match_length = s.prev_length = MIN_MATCH - 1; - s.match_available = 0; - s.ins_h = 0; -} - - -function DeflateState() { - this.strm = null; /* pointer back to this zlib stream */ - this.status = 0; /* as the name implies */ - this.pending_buf = null; /* output still pending */ - this.pending_buf_size = 0; /* size of pending_buf */ - this.pending_out = 0; /* next pending byte to output to the stream */ - this.pending = 0; /* nb of bytes in the pending buffer */ - this.wrap = 0; /* bit 0 true for zlib, bit 1 true for gzip */ - this.gzhead = null; /* gzip header information to write */ - this.gzindex = 0; /* where in extra, name, or comment */ - this.method = Z_DEFLATED; /* can only be DEFLATED */ - this.last_flush = -1; /* value of flush param for previous deflate call */ - - this.w_size = 0; /* LZ77 window size (32K by default) */ - this.w_bits = 0; /* log2(w_size) (8..16) */ - this.w_mask = 0; /* w_size - 1 */ - - this.window = null; - /* Sliding window. Input bytes are read into the second half of the window, - * and move to the first half later to keep a dictionary of at least wSize - * bytes. With this organization, matches are limited to a distance of - * wSize-MAX_MATCH bytes, but this ensures that IO is always - * performed with a length multiple of the block size. - */ - - this.window_size = 0; - /* Actual size of window: 2*wSize, except when the user input buffer - * is directly used as sliding window. - */ - - this.prev = null; - /* Link to older string with same hash index. To limit the size of this - * array to 64K, this link is maintained only for the last 32K strings. - * An index in this array is thus a window index modulo 32K. - */ - - this.head = null; /* Heads of the hash chains or NIL. */ - - this.ins_h = 0; /* hash index of string to be inserted */ - this.hash_size = 0; /* number of elements in hash table */ - this.hash_bits = 0; /* log2(hash_size) */ - this.hash_mask = 0; /* hash_size-1 */ - - this.hash_shift = 0; - /* Number of bits by which ins_h must be shifted at each input - * step. It must be such that after MIN_MATCH steps, the oldest - * byte no longer takes part in the hash key, that is: - * hash_shift * MIN_MATCH >= hash_bits - */ - - this.block_start = 0; - /* Window position at the beginning of the current output block. Gets - * negative when the window is moved backwards. - */ - - this.match_length = 0; /* length of best match */ - this.prev_match = 0; /* previous match */ - this.match_available = 0; /* set if previous match exists */ - this.strstart = 0; /* start of string to insert */ - this.match_start = 0; /* start of matching string */ - this.lookahead = 0; /* number of valid bytes ahead in window */ - - this.prev_length = 0; - /* Length of the best match at previous step. Matches not greater than this - * are discarded. This is used in the lazy match evaluation. - */ - - this.max_chain_length = 0; - /* To speed up deflation, hash chains are never searched beyond this - * length. A higher limit improves compression ratio but degrades the - * speed. - */ - - this.max_lazy_match = 0; - /* Attempt to find a better match only when the current match is strictly - * smaller than this value. This mechanism is used only for compression - * levels >= 4. - */ - // That's alias to max_lazy_match, don't use directly - //this.max_insert_length = 0; - /* Insert new strings in the hash table only if the match length is not - * greater than this length. This saves time but degrades compression. - * max_insert_length is used only for compression levels <= 3. - */ - - this.level = 0; /* compression level (1..9) */ - this.strategy = 0; /* favor or force Huffman coding*/ - - this.good_match = 0; - /* Use a faster search when the previous match is longer than this */ - - this.nice_match = 0; /* Stop searching when current match exceeds this */ - - /* used by trees.c: */ - - /* Didn't use ct_data typedef below to suppress compiler warning */ - - // struct ct_data_s dyn_ltree[HEAP_SIZE]; /* literal and length tree */ - // struct ct_data_s dyn_dtree[2*D_CODES+1]; /* distance tree */ - // struct ct_data_s bl_tree[2*BL_CODES+1]; /* Huffman tree for bit lengths */ - - // Use flat array of DOUBLE size, with interleaved fata, - // because JS does not support effective - this.dyn_ltree = new utils.Buf16(HEAP_SIZE * 2); - this.dyn_dtree = new utils.Buf16((2 * D_CODES + 1) * 2); - this.bl_tree = new utils.Buf16((2 * BL_CODES + 1) * 2); - zero(this.dyn_ltree); - zero(this.dyn_dtree); - zero(this.bl_tree); - - this.l_desc = null; /* desc. for literal tree */ - this.d_desc = null; /* desc. for distance tree */ - this.bl_desc = null; /* desc. for bit length tree */ - - //ush bl_count[MAX_BITS+1]; - this.bl_count = new utils.Buf16(MAX_BITS + 1); - /* number of codes at each bit length for an optimal tree */ - - //int heap[2*L_CODES+1]; /* heap used to build the Huffman trees */ - this.heap = new utils.Buf16(2 * L_CODES + 1); /* heap used to build the Huffman trees */ - zero(this.heap); - - this.heap_len = 0; /* number of elements in the heap */ - this.heap_max = 0; /* element of largest frequency */ - /* The sons of heap[n] are heap[2*n] and heap[2*n+1]. heap[0] is not used. - * The same heap array is used to build all trees. - */ - - this.depth = new utils.Buf16(2 * L_CODES + 1); //uch depth[2*L_CODES+1]; - zero(this.depth); - /* Depth of each subtree used as tie breaker for trees of equal frequency - */ - - this.l_buf = 0; /* buffer index for literals or lengths */ - - this.lit_bufsize = 0; - /* Size of match buffer for literals/lengths. There are 4 reasons for - * limiting lit_bufsize to 64K: - * - frequencies can be kept in 16 bit counters - * - if compression is not successful for the first block, all input - * data is still in the window so we can still emit a stored block even - * when input comes from standard input. (This can also be done for - * all blocks if lit_bufsize is not greater than 32K.) - * - if compression is not successful for a file smaller than 64K, we can - * even emit a stored file instead of a stored block (saving 5 bytes). - * This is applicable only for zip (not gzip or zlib). - * - creating new Huffman trees less frequently may not provide fast - * adaptation to changes in the input data statistics. (Take for - * example a binary file with poorly compressible code followed by - * a highly compressible string table.) Smaller buffer sizes give - * fast adaptation but have of course the overhead of transmitting - * trees more frequently. - * - I can't count above 4 - */ - - this.last_lit = 0; /* running index in l_buf */ - - this.d_buf = 0; - /* Buffer index for distances. To simplify the code, d_buf and l_buf have - * the same number of elements. To use different lengths, an extra flag - * array would be necessary. - */ - - this.opt_len = 0; /* bit length of current block with optimal trees */ - this.static_len = 0; /* bit length of current block with static trees */ - this.matches = 0; /* number of string matches in current block */ - this.insert = 0; /* bytes at end of window left to insert */ - - - this.bi_buf = 0; - /* Output buffer. bits are inserted starting at the bottom (least - * significant bits). - */ - this.bi_valid = 0; - /* Number of valid bits in bi_buf. All bits above the last valid bit - * are always zero. - */ - - // Used for window memory init. We safely ignore it for JS. That makes - // sense only for pointers and memory check tools. - //this.high_water = 0; - /* High water mark offset in window for initialized bytes -- bytes above - * this are set to zero in order to avoid memory check warnings when - * longest match routines access bytes past the input. This is then - * updated to the new high water mark. - */ -} - - -function deflateResetKeep(strm) { - var s; - - if (!strm || !strm.state) { - return err(strm, Z_STREAM_ERROR); - } - - strm.total_in = strm.total_out = 0; - strm.data_type = Z_UNKNOWN; - - s = strm.state; - s.pending = 0; - s.pending_out = 0; - - if (s.wrap < 0) { - s.wrap = -s.wrap; - /* was made negative by deflate(..., Z_FINISH); */ - } - s.status = (s.wrap ? INIT_STATE : BUSY_STATE); - strm.adler = (s.wrap === 2) ? - 0 // crc32(0, Z_NULL, 0) - : - 1; // adler32(0, Z_NULL, 0) - s.last_flush = Z_NO_FLUSH; - trees._tr_init(s); - return Z_OK; -} - - -function deflateReset(strm) { - var ret = deflateResetKeep(strm); - if (ret === Z_OK) { - lm_init(strm.state); - } - return ret; -} - - -function deflateSetHeader(strm, head) { - if (!strm || !strm.state) { return Z_STREAM_ERROR; } - if (strm.state.wrap !== 2) { return Z_STREAM_ERROR; } - strm.state.gzhead = head; - return Z_OK; -} - - -function deflateInit2(strm, level, method, windowBits, memLevel, strategy) { - if (!strm) { // === Z_NULL - return Z_STREAM_ERROR; - } - var wrap = 1; - - if (level === Z_DEFAULT_COMPRESSION) { - level = 6; - } - - if (windowBits < 0) { /* suppress zlib wrapper */ - wrap = 0; - windowBits = -windowBits; - } - - else if (windowBits > 15) { - wrap = 2; /* write gzip wrapper instead */ - windowBits -= 16; - } - - - if (memLevel < 1 || memLevel > MAX_MEM_LEVEL || method !== Z_DEFLATED || - windowBits < 8 || windowBits > 15 || level < 0 || level > 9 || - strategy < 0 || strategy > Z_FIXED) { - return err(strm, Z_STREAM_ERROR); - } - - - if (windowBits === 8) { - windowBits = 9; - } - /* until 256-byte window bug fixed */ - - var s = new DeflateState(); - - strm.state = s; - s.strm = strm; - - s.wrap = wrap; - s.gzhead = null; - s.w_bits = windowBits; - s.w_size = 1 << s.w_bits; - s.w_mask = s.w_size - 1; - - s.hash_bits = memLevel + 7; - s.hash_size = 1 << s.hash_bits; - s.hash_mask = s.hash_size - 1; - s.hash_shift = ~~((s.hash_bits + MIN_MATCH - 1) / MIN_MATCH); - - s.window = new utils.Buf8(s.w_size * 2); - s.head = new utils.Buf16(s.hash_size); - s.prev = new utils.Buf16(s.w_size); - - // Don't need mem init magic for JS. - //s.high_water = 0; /* nothing written to s->window yet */ - - s.lit_bufsize = 1 << (memLevel + 6); /* 16K elements by default */ - - s.pending_buf_size = s.lit_bufsize * 4; - - //overlay = (ushf *) ZALLOC(strm, s->lit_bufsize, sizeof(ush)+2); - //s->pending_buf = (uchf *) overlay; - s.pending_buf = new utils.Buf8(s.pending_buf_size); - - // It is offset from `s.pending_buf` (size is `s.lit_bufsize * 2`) - //s->d_buf = overlay + s->lit_bufsize/sizeof(ush); - s.d_buf = 1 * s.lit_bufsize; - - //s->l_buf = s->pending_buf + (1+sizeof(ush))*s->lit_bufsize; - s.l_buf = (1 + 2) * s.lit_bufsize; - - s.level = level; - s.strategy = strategy; - s.method = method; - - return deflateReset(strm); -} - -function deflateInit(strm, level) { - return deflateInit2(strm, level, Z_DEFLATED, MAX_WBITS, DEF_MEM_LEVEL, Z_DEFAULT_STRATEGY); -} - - -function deflate(strm, flush) { - var old_flush, s; - var beg, val; // for gzip header write only - - if (!strm || !strm.state || - flush > Z_BLOCK || flush < 0) { - return strm ? err(strm, Z_STREAM_ERROR) : Z_STREAM_ERROR; - } - - s = strm.state; - - if (!strm.output || - (!strm.input && strm.avail_in !== 0) || - (s.status === FINISH_STATE && flush !== Z_FINISH)) { - return err(strm, (strm.avail_out === 0) ? Z_BUF_ERROR : Z_STREAM_ERROR); - } - - s.strm = strm; /* just in case */ - old_flush = s.last_flush; - s.last_flush = flush; - - /* Write the header */ - if (s.status === INIT_STATE) { - - if (s.wrap === 2) { // GZIP header - strm.adler = 0; //crc32(0L, Z_NULL, 0); - put_byte(s, 31); - put_byte(s, 139); - put_byte(s, 8); - if (!s.gzhead) { // s->gzhead == Z_NULL - put_byte(s, 0); - put_byte(s, 0); - put_byte(s, 0); - put_byte(s, 0); - put_byte(s, 0); - put_byte(s, s.level === 9 ? 2 : - (s.strategy >= Z_HUFFMAN_ONLY || s.level < 2 ? - 4 : 0)); - put_byte(s, OS_CODE); - s.status = BUSY_STATE; - } - else { - put_byte(s, (s.gzhead.text ? 1 : 0) + - (s.gzhead.hcrc ? 2 : 0) + - (!s.gzhead.extra ? 0 : 4) + - (!s.gzhead.name ? 0 : 8) + - (!s.gzhead.comment ? 0 : 16) - ); - put_byte(s, s.gzhead.time & 0xff); - put_byte(s, (s.gzhead.time >> 8) & 0xff); - put_byte(s, (s.gzhead.time >> 16) & 0xff); - put_byte(s, (s.gzhead.time >> 24) & 0xff); - put_byte(s, s.level === 9 ? 2 : - (s.strategy >= Z_HUFFMAN_ONLY || s.level < 2 ? - 4 : 0)); - put_byte(s, s.gzhead.os & 0xff); - if (s.gzhead.extra && s.gzhead.extra.length) { - put_byte(s, s.gzhead.extra.length & 0xff); - put_byte(s, (s.gzhead.extra.length >> 8) & 0xff); - } - if (s.gzhead.hcrc) { - strm.adler = crc32(strm.adler, s.pending_buf, s.pending, 0); - } - s.gzindex = 0; - s.status = EXTRA_STATE; - } - } - else // DEFLATE header - { - var header = (Z_DEFLATED + ((s.w_bits - 8) << 4)) << 8; - var level_flags = -1; - - if (s.strategy >= Z_HUFFMAN_ONLY || s.level < 2) { - level_flags = 0; - } else if (s.level < 6) { - level_flags = 1; - } else if (s.level === 6) { - level_flags = 2; - } else { - level_flags = 3; - } - header |= (level_flags << 6); - if (s.strstart !== 0) { header |= PRESET_DICT; } - header += 31 - (header % 31); - - s.status = BUSY_STATE; - putShortMSB(s, header); - - /* Save the adler32 of the preset dictionary: */ - if (s.strstart !== 0) { - putShortMSB(s, strm.adler >>> 16); - putShortMSB(s, strm.adler & 0xffff); - } - strm.adler = 1; // adler32(0L, Z_NULL, 0); - } - } - -//#ifdef GZIP - if (s.status === EXTRA_STATE) { - if (s.gzhead.extra/* != Z_NULL*/) { - beg = s.pending; /* start of bytes to update crc */ - - while (s.gzindex < (s.gzhead.extra.length & 0xffff)) { - if (s.pending === s.pending_buf_size) { - if (s.gzhead.hcrc && s.pending > beg) { - strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg); - } - flush_pending(strm); - beg = s.pending; - if (s.pending === s.pending_buf_size) { - break; - } - } - put_byte(s, s.gzhead.extra[s.gzindex] & 0xff); - s.gzindex++; - } - if (s.gzhead.hcrc && s.pending > beg) { - strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg); - } - if (s.gzindex === s.gzhead.extra.length) { - s.gzindex = 0; - s.status = NAME_STATE; - } - } - else { - s.status = NAME_STATE; - } - } - if (s.status === NAME_STATE) { - if (s.gzhead.name/* != Z_NULL*/) { - beg = s.pending; /* start of bytes to update crc */ - //int val; - - do { - if (s.pending === s.pending_buf_size) { - if (s.gzhead.hcrc && s.pending > beg) { - strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg); - } - flush_pending(strm); - beg = s.pending; - if (s.pending === s.pending_buf_size) { - val = 1; - break; - } - } - // JS specific: little magic to add zero terminator to end of string - if (s.gzindex < s.gzhead.name.length) { - val = s.gzhead.name.charCodeAt(s.gzindex++) & 0xff; - } else { - val = 0; - } - put_byte(s, val); - } while (val !== 0); - - if (s.gzhead.hcrc && s.pending > beg) { - strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg); - } - if (val === 0) { - s.gzindex = 0; - s.status = COMMENT_STATE; - } - } - else { - s.status = COMMENT_STATE; - } - } - if (s.status === COMMENT_STATE) { - if (s.gzhead.comment/* != Z_NULL*/) { - beg = s.pending; /* start of bytes to update crc */ - //int val; - - do { - if (s.pending === s.pending_buf_size) { - if (s.gzhead.hcrc && s.pending > beg) { - strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg); - } - flush_pending(strm); - beg = s.pending; - if (s.pending === s.pending_buf_size) { - val = 1; - break; - } - } - // JS specific: little magic to add zero terminator to end of string - if (s.gzindex < s.gzhead.comment.length) { - val = s.gzhead.comment.charCodeAt(s.gzindex++) & 0xff; - } else { - val = 0; - } - put_byte(s, val); - } while (val !== 0); - - if (s.gzhead.hcrc && s.pending > beg) { - strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg); - } - if (val === 0) { - s.status = HCRC_STATE; - } - } - else { - s.status = HCRC_STATE; - } - } - if (s.status === HCRC_STATE) { - if (s.gzhead.hcrc) { - if (s.pending + 2 > s.pending_buf_size) { - flush_pending(strm); - } - if (s.pending + 2 <= s.pending_buf_size) { - put_byte(s, strm.adler & 0xff); - put_byte(s, (strm.adler >> 8) & 0xff); - strm.adler = 0; //crc32(0L, Z_NULL, 0); - s.status = BUSY_STATE; - } - } - else { - s.status = BUSY_STATE; - } - } -//#endif - - /* Flush as much pending output as possible */ - if (s.pending !== 0) { - flush_pending(strm); - if (strm.avail_out === 0) { - /* Since avail_out is 0, deflate will be called again with - * more output space, but possibly with both pending and - * avail_in equal to zero. There won't be anything to do, - * but this is not an error situation so make sure we - * return OK instead of BUF_ERROR at next call of deflate: - */ - s.last_flush = -1; - return Z_OK; - } - - /* Make sure there is something to do and avoid duplicate consecutive - * flushes. For repeated and useless calls with Z_FINISH, we keep - * returning Z_STREAM_END instead of Z_BUF_ERROR. - */ - } else if (strm.avail_in === 0 && rank(flush) <= rank(old_flush) && - flush !== Z_FINISH) { - return err(strm, Z_BUF_ERROR); - } - - /* User must not provide more input after the first FINISH: */ - if (s.status === FINISH_STATE && strm.avail_in !== 0) { - return err(strm, Z_BUF_ERROR); - } - - /* Start a new block or continue the current one. - */ - if (strm.avail_in !== 0 || s.lookahead !== 0 || - (flush !== Z_NO_FLUSH && s.status !== FINISH_STATE)) { - var bstate = (s.strategy === Z_HUFFMAN_ONLY) ? deflate_huff(s, flush) : - (s.strategy === Z_RLE ? deflate_rle(s, flush) : - configuration_table[s.level].func(s, flush)); - - if (bstate === BS_FINISH_STARTED || bstate === BS_FINISH_DONE) { - s.status = FINISH_STATE; - } - if (bstate === BS_NEED_MORE || bstate === BS_FINISH_STARTED) { - if (strm.avail_out === 0) { - s.last_flush = -1; - /* avoid BUF_ERROR next call, see above */ - } - return Z_OK; - /* If flush != Z_NO_FLUSH && avail_out == 0, the next call - * of deflate should use the same flush parameter to make sure - * that the flush is complete. So we don't have to output an - * empty block here, this will be done at next call. This also - * ensures that for a very small output buffer, we emit at most - * one empty block. - */ - } - if (bstate === BS_BLOCK_DONE) { - if (flush === Z_PARTIAL_FLUSH) { - trees._tr_align(s); - } - else if (flush !== Z_BLOCK) { /* FULL_FLUSH or SYNC_FLUSH */ - - trees._tr_stored_block(s, 0, 0, false); - /* For a full flush, this empty block will be recognized - * as a special marker by inflate_sync(). - */ - if (flush === Z_FULL_FLUSH) { - /*** CLEAR_HASH(s); ***/ /* forget history */ - zero(s.head); // Fill with NIL (= 0); - - if (s.lookahead === 0) { - s.strstart = 0; - s.block_start = 0; - s.insert = 0; - } - } - } - flush_pending(strm); - if (strm.avail_out === 0) { - s.last_flush = -1; /* avoid BUF_ERROR at next call, see above */ - return Z_OK; - } - } - } - //Assert(strm->avail_out > 0, "bug2"); - //if (strm.avail_out <= 0) { throw new Error("bug2");} - - if (flush !== Z_FINISH) { return Z_OK; } - if (s.wrap <= 0) { return Z_STREAM_END; } - - /* Write the trailer */ - if (s.wrap === 2) { - put_byte(s, strm.adler & 0xff); - put_byte(s, (strm.adler >> 8) & 0xff); - put_byte(s, (strm.adler >> 16) & 0xff); - put_byte(s, (strm.adler >> 24) & 0xff); - put_byte(s, strm.total_in & 0xff); - put_byte(s, (strm.total_in >> 8) & 0xff); - put_byte(s, (strm.total_in >> 16) & 0xff); - put_byte(s, (strm.total_in >> 24) & 0xff); - } - else - { - putShortMSB(s, strm.adler >>> 16); - putShortMSB(s, strm.adler & 0xffff); - } - - flush_pending(strm); - /* If avail_out is zero, the application will call deflate again - * to flush the rest. - */ - if (s.wrap > 0) { s.wrap = -s.wrap; } - /* write the trailer only once! */ - return s.pending !== 0 ? Z_OK : Z_STREAM_END; -} - -function deflateEnd(strm) { - var status; - - if (!strm/*== Z_NULL*/ || !strm.state/*== Z_NULL*/) { - return Z_STREAM_ERROR; - } - - status = strm.state.status; - if (status !== INIT_STATE && - status !== EXTRA_STATE && - status !== NAME_STATE && - status !== COMMENT_STATE && - status !== HCRC_STATE && - status !== BUSY_STATE && - status !== FINISH_STATE - ) { - return err(strm, Z_STREAM_ERROR); - } - - strm.state = null; - - return status === BUSY_STATE ? err(strm, Z_DATA_ERROR) : Z_OK; -} - - -/* ========================================================================= - * Initializes the compression dictionary from the given byte - * sequence without producing any compressed output. - */ -function deflateSetDictionary(strm, dictionary) { - var dictLength = dictionary.length; - - var s; - var str, n; - var wrap; - var avail; - var next; - var input; - var tmpDict; - - if (!strm/*== Z_NULL*/ || !strm.state/*== Z_NULL*/) { - return Z_STREAM_ERROR; - } - - s = strm.state; - wrap = s.wrap; - - if (wrap === 2 || (wrap === 1 && s.status !== INIT_STATE) || s.lookahead) { - return Z_STREAM_ERROR; - } - - /* when using zlib wrappers, compute Adler-32 for provided dictionary */ - if (wrap === 1) { - /* adler32(strm->adler, dictionary, dictLength); */ - strm.adler = adler32(strm.adler, dictionary, dictLength, 0); - } - - s.wrap = 0; /* avoid computing Adler-32 in read_buf */ - - /* if dictionary would fill window, just replace the history */ - if (dictLength >= s.w_size) { - if (wrap === 0) { /* already empty otherwise */ - /*** CLEAR_HASH(s); ***/ - zero(s.head); // Fill with NIL (= 0); - s.strstart = 0; - s.block_start = 0; - s.insert = 0; - } - /* use the tail */ - // dictionary = dictionary.slice(dictLength - s.w_size); - tmpDict = new utils.Buf8(s.w_size); - utils.arraySet(tmpDict, dictionary, dictLength - s.w_size, s.w_size, 0); - dictionary = tmpDict; - dictLength = s.w_size; - } - /* insert dictionary into window and hash */ - avail = strm.avail_in; - next = strm.next_in; - input = strm.input; - strm.avail_in = dictLength; - strm.next_in = 0; - strm.input = dictionary; - fill_window(s); - while (s.lookahead >= MIN_MATCH) { - str = s.strstart; - n = s.lookahead - (MIN_MATCH - 1); - do { - /* UPDATE_HASH(s, s->ins_h, s->window[str + MIN_MATCH-1]); */ - s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[str + MIN_MATCH - 1]) & s.hash_mask; - - s.prev[str & s.w_mask] = s.head[s.ins_h]; - - s.head[s.ins_h] = str; - str++; - } while (--n); - s.strstart = str; - s.lookahead = MIN_MATCH - 1; - fill_window(s); - } - s.strstart += s.lookahead; - s.block_start = s.strstart; - s.insert = s.lookahead; - s.lookahead = 0; - s.match_length = s.prev_length = MIN_MATCH - 1; - s.match_available = 0; - strm.next_in = next; - strm.input = input; - strm.avail_in = avail; - s.wrap = wrap; - return Z_OK; -} - - -exports.deflateInit = deflateInit; -exports.deflateInit2 = deflateInit2; -exports.deflateReset = deflateReset; -exports.deflateResetKeep = deflateResetKeep; -exports.deflateSetHeader = deflateSetHeader; -exports.deflate = deflate; -exports.deflateEnd = deflateEnd; -exports.deflateSetDictionary = deflateSetDictionary; -exports.deflateInfo = 'pako deflate (from Nodeca project)'; - -/* Not implemented -exports.deflateBound = deflateBound; -exports.deflateCopy = deflateCopy; -exports.deflateParams = deflateParams; -exports.deflatePending = deflatePending; -exports.deflatePrime = deflatePrime; -exports.deflateTune = deflateTune; -*/ diff --git a/node_modules/pako/lib/zlib/gzheader.js b/node_modules/pako/lib/zlib/gzheader.js deleted file mode 100644 index 300bdee8..00000000 --- a/node_modules/pako/lib/zlib/gzheader.js +++ /dev/null @@ -1,40 +0,0 @@ -'use strict'; - - -function GZheader() { - /* true if compressed data believed to be text */ - this.text = 0; - /* modification time */ - this.time = 0; - /* extra flags (not used when writing a gzip file) */ - this.xflags = 0; - /* operating system */ - this.os = 0; - /* pointer to extra field or Z_NULL if none */ - this.extra = null; - /* extra field length (valid if extra != Z_NULL) */ - this.extra_len = 0; // Actually, we don't need it in JS, - // but leave for few code modifications - - // - // Setup limits is not necessary because in js we should not preallocate memory - // for inflate use constant limit in 65536 bytes - // - - /* space at extra (only when reading header) */ - // this.extra_max = 0; - /* pointer to zero-terminated file name or Z_NULL */ - this.name = ''; - /* space at name (only when reading header) */ - // this.name_max = 0; - /* pointer to zero-terminated comment or Z_NULL */ - this.comment = ''; - /* space at comment (only when reading header) */ - // this.comm_max = 0; - /* true if there was or will be a header crc */ - this.hcrc = 0; - /* true when done reading gzip header (not used when writing a gzip file) */ - this.done = false; -} - -module.exports = GZheader; diff --git a/node_modules/pako/lib/zlib/inffast.js b/node_modules/pako/lib/zlib/inffast.js deleted file mode 100644 index a419f65d..00000000 --- a/node_modules/pako/lib/zlib/inffast.js +++ /dev/null @@ -1,326 +0,0 @@ -'use strict'; - -// See state defs from inflate.js -var BAD = 30; /* got a data error -- remain here until reset */ -var TYPE = 12; /* i: waiting for type bits, including last-flag bit */ - -/* - Decode literal, length, and distance codes and write out the resulting - literal and match bytes until either not enough input or output is - available, an end-of-block is encountered, or a data error is encountered. - When large enough input and output buffers are supplied to inflate(), for - example, a 16K input buffer and a 64K output buffer, more than 95% of the - inflate execution time is spent in this routine. - - Entry assumptions: - - state.mode === LEN - strm.avail_in >= 6 - strm.avail_out >= 258 - start >= strm.avail_out - state.bits < 8 - - On return, state.mode is one of: - - LEN -- ran out of enough output space or enough available input - TYPE -- reached end of block code, inflate() to interpret next block - BAD -- error in block data - - Notes: - - - The maximum input bits used by a length/distance pair is 15 bits for the - length code, 5 bits for the length extra, 15 bits for the distance code, - and 13 bits for the distance extra. This totals 48 bits, or six bytes. - Therefore if strm.avail_in >= 6, then there is enough input to avoid - checking for available input while decoding. - - - The maximum bytes that a single length/distance pair can output is 258 - bytes, which is the maximum length that can be coded. inflate_fast() - requires strm.avail_out >= 258 for each loop to avoid checking for - output space. - */ -module.exports = function inflate_fast(strm, start) { - var state; - var _in; /* local strm.input */ - var last; /* have enough input while in < last */ - var _out; /* local strm.output */ - var beg; /* inflate()'s initial strm.output */ - var end; /* while out < end, enough space available */ -//#ifdef INFLATE_STRICT - var dmax; /* maximum distance from zlib header */ -//#endif - var wsize; /* window size or zero if not using window */ - var whave; /* valid bytes in the window */ - var wnext; /* window write index */ - // Use `s_window` instead `window`, avoid conflict with instrumentation tools - var s_window; /* allocated sliding window, if wsize != 0 */ - var hold; /* local strm.hold */ - var bits; /* local strm.bits */ - var lcode; /* local strm.lencode */ - var dcode; /* local strm.distcode */ - var lmask; /* mask for first level of length codes */ - var dmask; /* mask for first level of distance codes */ - var here; /* retrieved table entry */ - var op; /* code bits, operation, extra bits, or */ - /* window position, window bytes to copy */ - var len; /* match length, unused bytes */ - var dist; /* match distance */ - var from; /* where to copy match from */ - var from_source; - - - var input, output; // JS specific, because we have no pointers - - /* copy state to local variables */ - state = strm.state; - //here = state.here; - _in = strm.next_in; - input = strm.input; - last = _in + (strm.avail_in - 5); - _out = strm.next_out; - output = strm.output; - beg = _out - (start - strm.avail_out); - end = _out + (strm.avail_out - 257); -//#ifdef INFLATE_STRICT - dmax = state.dmax; -//#endif - wsize = state.wsize; - whave = state.whave; - wnext = state.wnext; - s_window = state.window; - hold = state.hold; - bits = state.bits; - lcode = state.lencode; - dcode = state.distcode; - lmask = (1 << state.lenbits) - 1; - dmask = (1 << state.distbits) - 1; - - - /* decode literals and length/distances until end-of-block or not enough - input data or output space */ - - top: - do { - if (bits < 15) { - hold += input[_in++] << bits; - bits += 8; - hold += input[_in++] << bits; - bits += 8; - } - - here = lcode[hold & lmask]; - - dolen: - for (;;) { // Goto emulation - op = here >>> 24/*here.bits*/; - hold >>>= op; - bits -= op; - op = (here >>> 16) & 0xff/*here.op*/; - if (op === 0) { /* literal */ - //Tracevv((stderr, here.val >= 0x20 && here.val < 0x7f ? - // "inflate: literal '%c'\n" : - // "inflate: literal 0x%02x\n", here.val)); - output[_out++] = here & 0xffff/*here.val*/; - } - else if (op & 16) { /* length base */ - len = here & 0xffff/*here.val*/; - op &= 15; /* number of extra bits */ - if (op) { - if (bits < op) { - hold += input[_in++] << bits; - bits += 8; - } - len += hold & ((1 << op) - 1); - hold >>>= op; - bits -= op; - } - //Tracevv((stderr, "inflate: length %u\n", len)); - if (bits < 15) { - hold += input[_in++] << bits; - bits += 8; - hold += input[_in++] << bits; - bits += 8; - } - here = dcode[hold & dmask]; - - dodist: - for (;;) { // goto emulation - op = here >>> 24/*here.bits*/; - hold >>>= op; - bits -= op; - op = (here >>> 16) & 0xff/*here.op*/; - - if (op & 16) { /* distance base */ - dist = here & 0xffff/*here.val*/; - op &= 15; /* number of extra bits */ - if (bits < op) { - hold += input[_in++] << bits; - bits += 8; - if (bits < op) { - hold += input[_in++] << bits; - bits += 8; - } - } - dist += hold & ((1 << op) - 1); -//#ifdef INFLATE_STRICT - if (dist > dmax) { - strm.msg = 'invalid distance too far back'; - state.mode = BAD; - break top; - } -//#endif - hold >>>= op; - bits -= op; - //Tracevv((stderr, "inflate: distance %u\n", dist)); - op = _out - beg; /* max distance in output */ - if (dist > op) { /* see if copy from window */ - op = dist - op; /* distance back in window */ - if (op > whave) { - if (state.sane) { - strm.msg = 'invalid distance too far back'; - state.mode = BAD; - break top; - } - -// (!) This block is disabled in zlib defailts, -// don't enable it for binary compatibility -//#ifdef INFLATE_ALLOW_INVALID_DISTANCE_TOOFAR_ARRR -// if (len <= op - whave) { -// do { -// output[_out++] = 0; -// } while (--len); -// continue top; -// } -// len -= op - whave; -// do { -// output[_out++] = 0; -// } while (--op > whave); -// if (op === 0) { -// from = _out - dist; -// do { -// output[_out++] = output[from++]; -// } while (--len); -// continue top; -// } -//#endif - } - from = 0; // window index - from_source = s_window; - if (wnext === 0) { /* very common case */ - from += wsize - op; - if (op < len) { /* some from window */ - len -= op; - do { - output[_out++] = s_window[from++]; - } while (--op); - from = _out - dist; /* rest from output */ - from_source = output; - } - } - else if (wnext < op) { /* wrap around window */ - from += wsize + wnext - op; - op -= wnext; - if (op < len) { /* some from end of window */ - len -= op; - do { - output[_out++] = s_window[from++]; - } while (--op); - from = 0; - if (wnext < len) { /* some from start of window */ - op = wnext; - len -= op; - do { - output[_out++] = s_window[from++]; - } while (--op); - from = _out - dist; /* rest from output */ - from_source = output; - } - } - } - else { /* contiguous in window */ - from += wnext - op; - if (op < len) { /* some from window */ - len -= op; - do { - output[_out++] = s_window[from++]; - } while (--op); - from = _out - dist; /* rest from output */ - from_source = output; - } - } - while (len > 2) { - output[_out++] = from_source[from++]; - output[_out++] = from_source[from++]; - output[_out++] = from_source[from++]; - len -= 3; - } - if (len) { - output[_out++] = from_source[from++]; - if (len > 1) { - output[_out++] = from_source[from++]; - } - } - } - else { - from = _out - dist; /* copy direct from output */ - do { /* minimum length is three */ - output[_out++] = output[from++]; - output[_out++] = output[from++]; - output[_out++] = output[from++]; - len -= 3; - } while (len > 2); - if (len) { - output[_out++] = output[from++]; - if (len > 1) { - output[_out++] = output[from++]; - } - } - } - } - else if ((op & 64) === 0) { /* 2nd level distance code */ - here = dcode[(here & 0xffff)/*here.val*/ + (hold & ((1 << op) - 1))]; - continue dodist; - } - else { - strm.msg = 'invalid distance code'; - state.mode = BAD; - break top; - } - - break; // need to emulate goto via "continue" - } - } - else if ((op & 64) === 0) { /* 2nd level length code */ - here = lcode[(here & 0xffff)/*here.val*/ + (hold & ((1 << op) - 1))]; - continue dolen; - } - else if (op & 32) { /* end-of-block */ - //Tracevv((stderr, "inflate: end of block\n")); - state.mode = TYPE; - break top; - } - else { - strm.msg = 'invalid literal/length code'; - state.mode = BAD; - break top; - } - - break; // need to emulate goto via "continue" - } - } while (_in < last && _out < end); - - /* return unused bytes (on entry, bits < 8, so in won't go too far back) */ - len = bits >> 3; - _in -= len; - bits -= len << 3; - hold &= (1 << bits) - 1; - - /* update state and return */ - strm.next_in = _in; - strm.next_out = _out; - strm.avail_in = (_in < last ? 5 + (last - _in) : 5 - (_in - last)); - strm.avail_out = (_out < end ? 257 + (end - _out) : 257 - (_out - end)); - state.hold = hold; - state.bits = bits; - return; -}; diff --git a/node_modules/pako/lib/zlib/inflate.js b/node_modules/pako/lib/zlib/inflate.js deleted file mode 100644 index 3be8b62e..00000000 --- a/node_modules/pako/lib/zlib/inflate.js +++ /dev/null @@ -1,1538 +0,0 @@ -'use strict'; - - -var utils = require('../utils/common'); -var adler32 = require('./adler32'); -var crc32 = require('./crc32'); -var inflate_fast = require('./inffast'); -var inflate_table = require('./inftrees'); - -var CODES = 0; -var LENS = 1; -var DISTS = 2; - -/* Public constants ==========================================================*/ -/* ===========================================================================*/ - - -/* Allowed flush values; see deflate() and inflate() below for details */ -//var Z_NO_FLUSH = 0; -//var Z_PARTIAL_FLUSH = 1; -//var Z_SYNC_FLUSH = 2; -//var Z_FULL_FLUSH = 3; -var Z_FINISH = 4; -var Z_BLOCK = 5; -var Z_TREES = 6; - - -/* Return codes for the compression/decompression functions. Negative values - * are errors, positive values are used for special but normal events. - */ -var Z_OK = 0; -var Z_STREAM_END = 1; -var Z_NEED_DICT = 2; -//var Z_ERRNO = -1; -var Z_STREAM_ERROR = -2; -var Z_DATA_ERROR = -3; -var Z_MEM_ERROR = -4; -var Z_BUF_ERROR = -5; -//var Z_VERSION_ERROR = -6; - -/* The deflate compression method */ -var Z_DEFLATED = 8; - - -/* STATES ====================================================================*/ -/* ===========================================================================*/ - - -var HEAD = 1; /* i: waiting for magic header */ -var FLAGS = 2; /* i: waiting for method and flags (gzip) */ -var TIME = 3; /* i: waiting for modification time (gzip) */ -var OS = 4; /* i: waiting for extra flags and operating system (gzip) */ -var EXLEN = 5; /* i: waiting for extra length (gzip) */ -var EXTRA = 6; /* i: waiting for extra bytes (gzip) */ -var NAME = 7; /* i: waiting for end of file name (gzip) */ -var COMMENT = 8; /* i: waiting for end of comment (gzip) */ -var HCRC = 9; /* i: waiting for header crc (gzip) */ -var DICTID = 10; /* i: waiting for dictionary check value */ -var DICT = 11; /* waiting for inflateSetDictionary() call */ -var TYPE = 12; /* i: waiting for type bits, including last-flag bit */ -var TYPEDO = 13; /* i: same, but skip check to exit inflate on new block */ -var STORED = 14; /* i: waiting for stored size (length and complement) */ -var COPY_ = 15; /* i/o: same as COPY below, but only first time in */ -var COPY = 16; /* i/o: waiting for input or output to copy stored block */ -var TABLE = 17; /* i: waiting for dynamic block table lengths */ -var LENLENS = 18; /* i: waiting for code length code lengths */ -var CODELENS = 19; /* i: waiting for length/lit and distance code lengths */ -var LEN_ = 20; /* i: same as LEN below, but only first time in */ -var LEN = 21; /* i: waiting for length/lit/eob code */ -var LENEXT = 22; /* i: waiting for length extra bits */ -var DIST = 23; /* i: waiting for distance code */ -var DISTEXT = 24; /* i: waiting for distance extra bits */ -var MATCH = 25; /* o: waiting for output space to copy string */ -var LIT = 26; /* o: waiting for output space to write literal */ -var CHECK = 27; /* i: waiting for 32-bit check value */ -var LENGTH = 28; /* i: waiting for 32-bit length (gzip) */ -var DONE = 29; /* finished check, done -- remain here until reset */ -var BAD = 30; /* got a data error -- remain here until reset */ -var MEM = 31; /* got an inflate() memory error -- remain here until reset */ -var SYNC = 32; /* looking for synchronization bytes to restart inflate() */ - -/* ===========================================================================*/ - - - -var ENOUGH_LENS = 852; -var ENOUGH_DISTS = 592; -//var ENOUGH = (ENOUGH_LENS+ENOUGH_DISTS); - -var MAX_WBITS = 15; -/* 32K LZ77 window */ -var DEF_WBITS = MAX_WBITS; - - -function zswap32(q) { - return (((q >>> 24) & 0xff) + - ((q >>> 8) & 0xff00) + - ((q & 0xff00) << 8) + - ((q & 0xff) << 24)); -} - - -function InflateState() { - this.mode = 0; /* current inflate mode */ - this.last = false; /* true if processing last block */ - this.wrap = 0; /* bit 0 true for zlib, bit 1 true for gzip */ - this.havedict = false; /* true if dictionary provided */ - this.flags = 0; /* gzip header method and flags (0 if zlib) */ - this.dmax = 0; /* zlib header max distance (INFLATE_STRICT) */ - this.check = 0; /* protected copy of check value */ - this.total = 0; /* protected copy of output count */ - // TODO: may be {} - this.head = null; /* where to save gzip header information */ - - /* sliding window */ - this.wbits = 0; /* log base 2 of requested window size */ - this.wsize = 0; /* window size or zero if not using window */ - this.whave = 0; /* valid bytes in the window */ - this.wnext = 0; /* window write index */ - this.window = null; /* allocated sliding window, if needed */ - - /* bit accumulator */ - this.hold = 0; /* input bit accumulator */ - this.bits = 0; /* number of bits in "in" */ - - /* for string and stored block copying */ - this.length = 0; /* literal or length of data to copy */ - this.offset = 0; /* distance back to copy string from */ - - /* for table and code decoding */ - this.extra = 0; /* extra bits needed */ - - /* fixed and dynamic code tables */ - this.lencode = null; /* starting table for length/literal codes */ - this.distcode = null; /* starting table for distance codes */ - this.lenbits = 0; /* index bits for lencode */ - this.distbits = 0; /* index bits for distcode */ - - /* dynamic table building */ - this.ncode = 0; /* number of code length code lengths */ - this.nlen = 0; /* number of length code lengths */ - this.ndist = 0; /* number of distance code lengths */ - this.have = 0; /* number of code lengths in lens[] */ - this.next = null; /* next available space in codes[] */ - - this.lens = new utils.Buf16(320); /* temporary storage for code lengths */ - this.work = new utils.Buf16(288); /* work area for code table building */ - - /* - because we don't have pointers in js, we use lencode and distcode directly - as buffers so we don't need codes - */ - //this.codes = new utils.Buf32(ENOUGH); /* space for code tables */ - this.lendyn = null; /* dynamic table for length/literal codes (JS specific) */ - this.distdyn = null; /* dynamic table for distance codes (JS specific) */ - this.sane = 0; /* if false, allow invalid distance too far */ - this.back = 0; /* bits back of last unprocessed length/lit */ - this.was = 0; /* initial length of match */ -} - -function inflateResetKeep(strm) { - var state; - - if (!strm || !strm.state) { return Z_STREAM_ERROR; } - state = strm.state; - strm.total_in = strm.total_out = state.total = 0; - strm.msg = ''; /*Z_NULL*/ - if (state.wrap) { /* to support ill-conceived Java test suite */ - strm.adler = state.wrap & 1; - } - state.mode = HEAD; - state.last = 0; - state.havedict = 0; - state.dmax = 32768; - state.head = null/*Z_NULL*/; - state.hold = 0; - state.bits = 0; - //state.lencode = state.distcode = state.next = state.codes; - state.lencode = state.lendyn = new utils.Buf32(ENOUGH_LENS); - state.distcode = state.distdyn = new utils.Buf32(ENOUGH_DISTS); - - state.sane = 1; - state.back = -1; - //Tracev((stderr, "inflate: reset\n")); - return Z_OK; -} - -function inflateReset(strm) { - var state; - - if (!strm || !strm.state) { return Z_STREAM_ERROR; } - state = strm.state; - state.wsize = 0; - state.whave = 0; - state.wnext = 0; - return inflateResetKeep(strm); - -} - -function inflateReset2(strm, windowBits) { - var wrap; - var state; - - /* get the state */ - if (!strm || !strm.state) { return Z_STREAM_ERROR; } - state = strm.state; - - /* extract wrap request from windowBits parameter */ - if (windowBits < 0) { - wrap = 0; - windowBits = -windowBits; - } - else { - wrap = (windowBits >> 4) + 1; - if (windowBits < 48) { - windowBits &= 15; - } - } - - /* set number of window bits, free window if different */ - if (windowBits && (windowBits < 8 || windowBits > 15)) { - return Z_STREAM_ERROR; - } - if (state.window !== null && state.wbits !== windowBits) { - state.window = null; - } - - /* update state and reset the rest of it */ - state.wrap = wrap; - state.wbits = windowBits; - return inflateReset(strm); -} - -function inflateInit2(strm, windowBits) { - var ret; - var state; - - if (!strm) { return Z_STREAM_ERROR; } - //strm.msg = Z_NULL; /* in case we return an error */ - - state = new InflateState(); - - //if (state === Z_NULL) return Z_MEM_ERROR; - //Tracev((stderr, "inflate: allocated\n")); - strm.state = state; - state.window = null/*Z_NULL*/; - ret = inflateReset2(strm, windowBits); - if (ret !== Z_OK) { - strm.state = null/*Z_NULL*/; - } - return ret; -} - -function inflateInit(strm) { - return inflateInit2(strm, DEF_WBITS); -} - - -/* - Return state with length and distance decoding tables and index sizes set to - fixed code decoding. Normally this returns fixed tables from inffixed.h. - If BUILDFIXED is defined, then instead this routine builds the tables the - first time it's called, and returns those tables the first time and - thereafter. This reduces the size of the code by about 2K bytes, in - exchange for a little execution time. However, BUILDFIXED should not be - used for threaded applications, since the rewriting of the tables and virgin - may not be thread-safe. - */ -var virgin = true; - -var lenfix, distfix; // We have no pointers in JS, so keep tables separate - -function fixedtables(state) { - /* build fixed huffman tables if first call (may not be thread safe) */ - if (virgin) { - var sym; - - lenfix = new utils.Buf32(512); - distfix = new utils.Buf32(32); - - /* literal/length table */ - sym = 0; - while (sym < 144) { state.lens[sym++] = 8; } - while (sym < 256) { state.lens[sym++] = 9; } - while (sym < 280) { state.lens[sym++] = 7; } - while (sym < 288) { state.lens[sym++] = 8; } - - inflate_table(LENS, state.lens, 0, 288, lenfix, 0, state.work, { bits: 9 }); - - /* distance table */ - sym = 0; - while (sym < 32) { state.lens[sym++] = 5; } - - inflate_table(DISTS, state.lens, 0, 32, distfix, 0, state.work, { bits: 5 }); - - /* do this just once */ - virgin = false; - } - - state.lencode = lenfix; - state.lenbits = 9; - state.distcode = distfix; - state.distbits = 5; -} - - -/* - Update the window with the last wsize (normally 32K) bytes written before - returning. If window does not exist yet, create it. This is only called - when a window is already in use, or when output has been written during this - inflate call, but the end of the deflate stream has not been reached yet. - It is also called to create a window for dictionary data when a dictionary - is loaded. - - Providing output buffers larger than 32K to inflate() should provide a speed - advantage, since only the last 32K of output is copied to the sliding window - upon return from inflate(), and since all distances after the first 32K of - output will fall in the output data, making match copies simpler and faster. - The advantage may be dependent on the size of the processor's data caches. - */ -function updatewindow(strm, src, end, copy) { - var dist; - var state = strm.state; - - /* if it hasn't been done already, allocate space for the window */ - if (state.window === null) { - state.wsize = 1 << state.wbits; - state.wnext = 0; - state.whave = 0; - - state.window = new utils.Buf8(state.wsize); - } - - /* copy state->wsize or less output bytes into the circular window */ - if (copy >= state.wsize) { - utils.arraySet(state.window, src, end - state.wsize, state.wsize, 0); - state.wnext = 0; - state.whave = state.wsize; - } - else { - dist = state.wsize - state.wnext; - if (dist > copy) { - dist = copy; - } - //zmemcpy(state->window + state->wnext, end - copy, dist); - utils.arraySet(state.window, src, end - copy, dist, state.wnext); - copy -= dist; - if (copy) { - //zmemcpy(state->window, end - copy, copy); - utils.arraySet(state.window, src, end - copy, copy, 0); - state.wnext = copy; - state.whave = state.wsize; - } - else { - state.wnext += dist; - if (state.wnext === state.wsize) { state.wnext = 0; } - if (state.whave < state.wsize) { state.whave += dist; } - } - } - return 0; -} - -function inflate(strm, flush) { - var state; - var input, output; // input/output buffers - var next; /* next input INDEX */ - var put; /* next output INDEX */ - var have, left; /* available input and output */ - var hold; /* bit buffer */ - var bits; /* bits in bit buffer */ - var _in, _out; /* save starting available input and output */ - var copy; /* number of stored or match bytes to copy */ - var from; /* where to copy match bytes from */ - var from_source; - var here = 0; /* current decoding table entry */ - var here_bits, here_op, here_val; // paked "here" denormalized (JS specific) - //var last; /* parent table entry */ - var last_bits, last_op, last_val; // paked "last" denormalized (JS specific) - var len; /* length to copy for repeats, bits to drop */ - var ret; /* return code */ - var hbuf = new utils.Buf8(4); /* buffer for gzip header crc calculation */ - var opts; - - var n; // temporary var for NEED_BITS - - var order = /* permutation of code lengths */ - [ 16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15 ]; - - - if (!strm || !strm.state || !strm.output || - (!strm.input && strm.avail_in !== 0)) { - return Z_STREAM_ERROR; - } - - state = strm.state; - if (state.mode === TYPE) { state.mode = TYPEDO; } /* skip check */ - - - //--- LOAD() --- - put = strm.next_out; - output = strm.output; - left = strm.avail_out; - next = strm.next_in; - input = strm.input; - have = strm.avail_in; - hold = state.hold; - bits = state.bits; - //--- - - _in = have; - _out = left; - ret = Z_OK; - - inf_leave: // goto emulation - for (;;) { - switch (state.mode) { - case HEAD: - if (state.wrap === 0) { - state.mode = TYPEDO; - break; - } - //=== NEEDBITS(16); - while (bits < 16) { - if (have === 0) { break inf_leave; } - have--; - hold += input[next++] << bits; - bits += 8; - } - //===// - if ((state.wrap & 2) && hold === 0x8b1f) { /* gzip header */ - state.check = 0/*crc32(0L, Z_NULL, 0)*/; - //=== CRC2(state.check, hold); - hbuf[0] = hold & 0xff; - hbuf[1] = (hold >>> 8) & 0xff; - state.check = crc32(state.check, hbuf, 2, 0); - //===// - - //=== INITBITS(); - hold = 0; - bits = 0; - //===// - state.mode = FLAGS; - break; - } - state.flags = 0; /* expect zlib header */ - if (state.head) { - state.head.done = false; - } - if (!(state.wrap & 1) || /* check if zlib header allowed */ - (((hold & 0xff)/*BITS(8)*/ << 8) + (hold >> 8)) % 31) { - strm.msg = 'incorrect header check'; - state.mode = BAD; - break; - } - if ((hold & 0x0f)/*BITS(4)*/ !== Z_DEFLATED) { - strm.msg = 'unknown compression method'; - state.mode = BAD; - break; - } - //--- DROPBITS(4) ---// - hold >>>= 4; - bits -= 4; - //---// - len = (hold & 0x0f)/*BITS(4)*/ + 8; - if (state.wbits === 0) { - state.wbits = len; - } - else if (len > state.wbits) { - strm.msg = 'invalid window size'; - state.mode = BAD; - break; - } - state.dmax = 1 << len; - //Tracev((stderr, "inflate: zlib header ok\n")); - strm.adler = state.check = 1/*adler32(0L, Z_NULL, 0)*/; - state.mode = hold & 0x200 ? DICTID : TYPE; - //=== INITBITS(); - hold = 0; - bits = 0; - //===// - break; - case FLAGS: - //=== NEEDBITS(16); */ - while (bits < 16) { - if (have === 0) { break inf_leave; } - have--; - hold += input[next++] << bits; - bits += 8; - } - //===// - state.flags = hold; - if ((state.flags & 0xff) !== Z_DEFLATED) { - strm.msg = 'unknown compression method'; - state.mode = BAD; - break; - } - if (state.flags & 0xe000) { - strm.msg = 'unknown header flags set'; - state.mode = BAD; - break; - } - if (state.head) { - state.head.text = ((hold >> 8) & 1); - } - if (state.flags & 0x0200) { - //=== CRC2(state.check, hold); - hbuf[0] = hold & 0xff; - hbuf[1] = (hold >>> 8) & 0xff; - state.check = crc32(state.check, hbuf, 2, 0); - //===// - } - //=== INITBITS(); - hold = 0; - bits = 0; - //===// - state.mode = TIME; - /* falls through */ - case TIME: - //=== NEEDBITS(32); */ - while (bits < 32) { - if (have === 0) { break inf_leave; } - have--; - hold += input[next++] << bits; - bits += 8; - } - //===// - if (state.head) { - state.head.time = hold; - } - if (state.flags & 0x0200) { - //=== CRC4(state.check, hold) - hbuf[0] = hold & 0xff; - hbuf[1] = (hold >>> 8) & 0xff; - hbuf[2] = (hold >>> 16) & 0xff; - hbuf[3] = (hold >>> 24) & 0xff; - state.check = crc32(state.check, hbuf, 4, 0); - //=== - } - //=== INITBITS(); - hold = 0; - bits = 0; - //===// - state.mode = OS; - /* falls through */ - case OS: - //=== NEEDBITS(16); */ - while (bits < 16) { - if (have === 0) { break inf_leave; } - have--; - hold += input[next++] << bits; - bits += 8; - } - //===// - if (state.head) { - state.head.xflags = (hold & 0xff); - state.head.os = (hold >> 8); - } - if (state.flags & 0x0200) { - //=== CRC2(state.check, hold); - hbuf[0] = hold & 0xff; - hbuf[1] = (hold >>> 8) & 0xff; - state.check = crc32(state.check, hbuf, 2, 0); - //===// - } - //=== INITBITS(); - hold = 0; - bits = 0; - //===// - state.mode = EXLEN; - /* falls through */ - case EXLEN: - if (state.flags & 0x0400) { - //=== NEEDBITS(16); */ - while (bits < 16) { - if (have === 0) { break inf_leave; } - have--; - hold += input[next++] << bits; - bits += 8; - } - //===// - state.length = hold; - if (state.head) { - state.head.extra_len = hold; - } - if (state.flags & 0x0200) { - //=== CRC2(state.check, hold); - hbuf[0] = hold & 0xff; - hbuf[1] = (hold >>> 8) & 0xff; - state.check = crc32(state.check, hbuf, 2, 0); - //===// - } - //=== INITBITS(); - hold = 0; - bits = 0; - //===// - } - else if (state.head) { - state.head.extra = null/*Z_NULL*/; - } - state.mode = EXTRA; - /* falls through */ - case EXTRA: - if (state.flags & 0x0400) { - copy = state.length; - if (copy > have) { copy = have; } - if (copy) { - if (state.head) { - len = state.head.extra_len - state.length; - if (!state.head.extra) { - // Use untyped array for more conveniend processing later - state.head.extra = new Array(state.head.extra_len); - } - utils.arraySet( - state.head.extra, - input, - next, - // extra field is limited to 65536 bytes - // - no need for additional size check - copy, - /*len + copy > state.head.extra_max - len ? state.head.extra_max : copy,*/ - len - ); - //zmemcpy(state.head.extra + len, next, - // len + copy > state.head.extra_max ? - // state.head.extra_max - len : copy); - } - if (state.flags & 0x0200) { - state.check = crc32(state.check, input, copy, next); - } - have -= copy; - next += copy; - state.length -= copy; - } - if (state.length) { break inf_leave; } - } - state.length = 0; - state.mode = NAME; - /* falls through */ - case NAME: - if (state.flags & 0x0800) { - if (have === 0) { break inf_leave; } - copy = 0; - do { - // TODO: 2 or 1 bytes? - len = input[next + copy++]; - /* use constant limit because in js we should not preallocate memory */ - if (state.head && len && - (state.length < 65536 /*state.head.name_max*/)) { - state.head.name += String.fromCharCode(len); - } - } while (len && copy < have); - - if (state.flags & 0x0200) { - state.check = crc32(state.check, input, copy, next); - } - have -= copy; - next += copy; - if (len) { break inf_leave; } - } - else if (state.head) { - state.head.name = null; - } - state.length = 0; - state.mode = COMMENT; - /* falls through */ - case COMMENT: - if (state.flags & 0x1000) { - if (have === 0) { break inf_leave; } - copy = 0; - do { - len = input[next + copy++]; - /* use constant limit because in js we should not preallocate memory */ - if (state.head && len && - (state.length < 65536 /*state.head.comm_max*/)) { - state.head.comment += String.fromCharCode(len); - } - } while (len && copy < have); - if (state.flags & 0x0200) { - state.check = crc32(state.check, input, copy, next); - } - have -= copy; - next += copy; - if (len) { break inf_leave; } - } - else if (state.head) { - state.head.comment = null; - } - state.mode = HCRC; - /* falls through */ - case HCRC: - if (state.flags & 0x0200) { - //=== NEEDBITS(16); */ - while (bits < 16) { - if (have === 0) { break inf_leave; } - have--; - hold += input[next++] << bits; - bits += 8; - } - //===// - if (hold !== (state.check & 0xffff)) { - strm.msg = 'header crc mismatch'; - state.mode = BAD; - break; - } - //=== INITBITS(); - hold = 0; - bits = 0; - //===// - } - if (state.head) { - state.head.hcrc = ((state.flags >> 9) & 1); - state.head.done = true; - } - strm.adler = state.check = 0; - state.mode = TYPE; - break; - case DICTID: - //=== NEEDBITS(32); */ - while (bits < 32) { - if (have === 0) { break inf_leave; } - have--; - hold += input[next++] << bits; - bits += 8; - } - //===// - strm.adler = state.check = zswap32(hold); - //=== INITBITS(); - hold = 0; - bits = 0; - //===// - state.mode = DICT; - /* falls through */ - case DICT: - if (state.havedict === 0) { - //--- RESTORE() --- - strm.next_out = put; - strm.avail_out = left; - strm.next_in = next; - strm.avail_in = have; - state.hold = hold; - state.bits = bits; - //--- - return Z_NEED_DICT; - } - strm.adler = state.check = 1/*adler32(0L, Z_NULL, 0)*/; - state.mode = TYPE; - /* falls through */ - case TYPE: - if (flush === Z_BLOCK || flush === Z_TREES) { break inf_leave; } - /* falls through */ - case TYPEDO: - if (state.last) { - //--- BYTEBITS() ---// - hold >>>= bits & 7; - bits -= bits & 7; - //---// - state.mode = CHECK; - break; - } - //=== NEEDBITS(3); */ - while (bits < 3) { - if (have === 0) { break inf_leave; } - have--; - hold += input[next++] << bits; - bits += 8; - } - //===// - state.last = (hold & 0x01)/*BITS(1)*/; - //--- DROPBITS(1) ---// - hold >>>= 1; - bits -= 1; - //---// - - switch ((hold & 0x03)/*BITS(2)*/) { - case 0: /* stored block */ - //Tracev((stderr, "inflate: stored block%s\n", - // state.last ? " (last)" : "")); - state.mode = STORED; - break; - case 1: /* fixed block */ - fixedtables(state); - //Tracev((stderr, "inflate: fixed codes block%s\n", - // state.last ? " (last)" : "")); - state.mode = LEN_; /* decode codes */ - if (flush === Z_TREES) { - //--- DROPBITS(2) ---// - hold >>>= 2; - bits -= 2; - //---// - break inf_leave; - } - break; - case 2: /* dynamic block */ - //Tracev((stderr, "inflate: dynamic codes block%s\n", - // state.last ? " (last)" : "")); - state.mode = TABLE; - break; - case 3: - strm.msg = 'invalid block type'; - state.mode = BAD; - } - //--- DROPBITS(2) ---// - hold >>>= 2; - bits -= 2; - //---// - break; - case STORED: - //--- BYTEBITS() ---// /* go to byte boundary */ - hold >>>= bits & 7; - bits -= bits & 7; - //---// - //=== NEEDBITS(32); */ - while (bits < 32) { - if (have === 0) { break inf_leave; } - have--; - hold += input[next++] << bits; - bits += 8; - } - //===// - if ((hold & 0xffff) !== ((hold >>> 16) ^ 0xffff)) { - strm.msg = 'invalid stored block lengths'; - state.mode = BAD; - break; - } - state.length = hold & 0xffff; - //Tracev((stderr, "inflate: stored length %u\n", - // state.length)); - //=== INITBITS(); - hold = 0; - bits = 0; - //===// - state.mode = COPY_; - if (flush === Z_TREES) { break inf_leave; } - /* falls through */ - case COPY_: - state.mode = COPY; - /* falls through */ - case COPY: - copy = state.length; - if (copy) { - if (copy > have) { copy = have; } - if (copy > left) { copy = left; } - if (copy === 0) { break inf_leave; } - //--- zmemcpy(put, next, copy); --- - utils.arraySet(output, input, next, copy, put); - //---// - have -= copy; - next += copy; - left -= copy; - put += copy; - state.length -= copy; - break; - } - //Tracev((stderr, "inflate: stored end\n")); - state.mode = TYPE; - break; - case TABLE: - //=== NEEDBITS(14); */ - while (bits < 14) { - if (have === 0) { break inf_leave; } - have--; - hold += input[next++] << bits; - bits += 8; - } - //===// - state.nlen = (hold & 0x1f)/*BITS(5)*/ + 257; - //--- DROPBITS(5) ---// - hold >>>= 5; - bits -= 5; - //---// - state.ndist = (hold & 0x1f)/*BITS(5)*/ + 1; - //--- DROPBITS(5) ---// - hold >>>= 5; - bits -= 5; - //---// - state.ncode = (hold & 0x0f)/*BITS(4)*/ + 4; - //--- DROPBITS(4) ---// - hold >>>= 4; - bits -= 4; - //---// -//#ifndef PKZIP_BUG_WORKAROUND - if (state.nlen > 286 || state.ndist > 30) { - strm.msg = 'too many length or distance symbols'; - state.mode = BAD; - break; - } -//#endif - //Tracev((stderr, "inflate: table sizes ok\n")); - state.have = 0; - state.mode = LENLENS; - /* falls through */ - case LENLENS: - while (state.have < state.ncode) { - //=== NEEDBITS(3); - while (bits < 3) { - if (have === 0) { break inf_leave; } - have--; - hold += input[next++] << bits; - bits += 8; - } - //===// - state.lens[order[state.have++]] = (hold & 0x07);//BITS(3); - //--- DROPBITS(3) ---// - hold >>>= 3; - bits -= 3; - //---// - } - while (state.have < 19) { - state.lens[order[state.have++]] = 0; - } - // We have separate tables & no pointers. 2 commented lines below not needed. - //state.next = state.codes; - //state.lencode = state.next; - // Switch to use dynamic table - state.lencode = state.lendyn; - state.lenbits = 7; - - opts = { bits: state.lenbits }; - ret = inflate_table(CODES, state.lens, 0, 19, state.lencode, 0, state.work, opts); - state.lenbits = opts.bits; - - if (ret) { - strm.msg = 'invalid code lengths set'; - state.mode = BAD; - break; - } - //Tracev((stderr, "inflate: code lengths ok\n")); - state.have = 0; - state.mode = CODELENS; - /* falls through */ - case CODELENS: - while (state.have < state.nlen + state.ndist) { - for (;;) { - here = state.lencode[hold & ((1 << state.lenbits) - 1)];/*BITS(state.lenbits)*/ - here_bits = here >>> 24; - here_op = (here >>> 16) & 0xff; - here_val = here & 0xffff; - - if ((here_bits) <= bits) { break; } - //--- PULLBYTE() ---// - if (have === 0) { break inf_leave; } - have--; - hold += input[next++] << bits; - bits += 8; - //---// - } - if (here_val < 16) { - //--- DROPBITS(here.bits) ---// - hold >>>= here_bits; - bits -= here_bits; - //---// - state.lens[state.have++] = here_val; - } - else { - if (here_val === 16) { - //=== NEEDBITS(here.bits + 2); - n = here_bits + 2; - while (bits < n) { - if (have === 0) { break inf_leave; } - have--; - hold += input[next++] << bits; - bits += 8; - } - //===// - //--- DROPBITS(here.bits) ---// - hold >>>= here_bits; - bits -= here_bits; - //---// - if (state.have === 0) { - strm.msg = 'invalid bit length repeat'; - state.mode = BAD; - break; - } - len = state.lens[state.have - 1]; - copy = 3 + (hold & 0x03);//BITS(2); - //--- DROPBITS(2) ---// - hold >>>= 2; - bits -= 2; - //---// - } - else if (here_val === 17) { - //=== NEEDBITS(here.bits + 3); - n = here_bits + 3; - while (bits < n) { - if (have === 0) { break inf_leave; } - have--; - hold += input[next++] << bits; - bits += 8; - } - //===// - //--- DROPBITS(here.bits) ---// - hold >>>= here_bits; - bits -= here_bits; - //---// - len = 0; - copy = 3 + (hold & 0x07);//BITS(3); - //--- DROPBITS(3) ---// - hold >>>= 3; - bits -= 3; - //---// - } - else { - //=== NEEDBITS(here.bits + 7); - n = here_bits + 7; - while (bits < n) { - if (have === 0) { break inf_leave; } - have--; - hold += input[next++] << bits; - bits += 8; - } - //===// - //--- DROPBITS(here.bits) ---// - hold >>>= here_bits; - bits -= here_bits; - //---// - len = 0; - copy = 11 + (hold & 0x7f);//BITS(7); - //--- DROPBITS(7) ---// - hold >>>= 7; - bits -= 7; - //---// - } - if (state.have + copy > state.nlen + state.ndist) { - strm.msg = 'invalid bit length repeat'; - state.mode = BAD; - break; - } - while (copy--) { - state.lens[state.have++] = len; - } - } - } - - /* handle error breaks in while */ - if (state.mode === BAD) { break; } - - /* check for end-of-block code (better have one) */ - if (state.lens[256] === 0) { - strm.msg = 'invalid code -- missing end-of-block'; - state.mode = BAD; - break; - } - - /* build code tables -- note: do not change the lenbits or distbits - values here (9 and 6) without reading the comments in inftrees.h - concerning the ENOUGH constants, which depend on those values */ - state.lenbits = 9; - - opts = { bits: state.lenbits }; - ret = inflate_table(LENS, state.lens, 0, state.nlen, state.lencode, 0, state.work, opts); - // We have separate tables & no pointers. 2 commented lines below not needed. - // state.next_index = opts.table_index; - state.lenbits = opts.bits; - // state.lencode = state.next; - - if (ret) { - strm.msg = 'invalid literal/lengths set'; - state.mode = BAD; - break; - } - - state.distbits = 6; - //state.distcode.copy(state.codes); - // Switch to use dynamic table - state.distcode = state.distdyn; - opts = { bits: state.distbits }; - ret = inflate_table(DISTS, state.lens, state.nlen, state.ndist, state.distcode, 0, state.work, opts); - // We have separate tables & no pointers. 2 commented lines below not needed. - // state.next_index = opts.table_index; - state.distbits = opts.bits; - // state.distcode = state.next; - - if (ret) { - strm.msg = 'invalid distances set'; - state.mode = BAD; - break; - } - //Tracev((stderr, 'inflate: codes ok\n')); - state.mode = LEN_; - if (flush === Z_TREES) { break inf_leave; } - /* falls through */ - case LEN_: - state.mode = LEN; - /* falls through */ - case LEN: - if (have >= 6 && left >= 258) { - //--- RESTORE() --- - strm.next_out = put; - strm.avail_out = left; - strm.next_in = next; - strm.avail_in = have; - state.hold = hold; - state.bits = bits; - //--- - inflate_fast(strm, _out); - //--- LOAD() --- - put = strm.next_out; - output = strm.output; - left = strm.avail_out; - next = strm.next_in; - input = strm.input; - have = strm.avail_in; - hold = state.hold; - bits = state.bits; - //--- - - if (state.mode === TYPE) { - state.back = -1; - } - break; - } - state.back = 0; - for (;;) { - here = state.lencode[hold & ((1 << state.lenbits) - 1)]; /*BITS(state.lenbits)*/ - here_bits = here >>> 24; - here_op = (here >>> 16) & 0xff; - here_val = here & 0xffff; - - if (here_bits <= bits) { break; } - //--- PULLBYTE() ---// - if (have === 0) { break inf_leave; } - have--; - hold += input[next++] << bits; - bits += 8; - //---// - } - if (here_op && (here_op & 0xf0) === 0) { - last_bits = here_bits; - last_op = here_op; - last_val = here_val; - for (;;) { - here = state.lencode[last_val + - ((hold & ((1 << (last_bits + last_op)) - 1))/*BITS(last.bits + last.op)*/ >> last_bits)]; - here_bits = here >>> 24; - here_op = (here >>> 16) & 0xff; - here_val = here & 0xffff; - - if ((last_bits + here_bits) <= bits) { break; } - //--- PULLBYTE() ---// - if (have === 0) { break inf_leave; } - have--; - hold += input[next++] << bits; - bits += 8; - //---// - } - //--- DROPBITS(last.bits) ---// - hold >>>= last_bits; - bits -= last_bits; - //---// - state.back += last_bits; - } - //--- DROPBITS(here.bits) ---// - hold >>>= here_bits; - bits -= here_bits; - //---// - state.back += here_bits; - state.length = here_val; - if (here_op === 0) { - //Tracevv((stderr, here.val >= 0x20 && here.val < 0x7f ? - // "inflate: literal '%c'\n" : - // "inflate: literal 0x%02x\n", here.val)); - state.mode = LIT; - break; - } - if (here_op & 32) { - //Tracevv((stderr, "inflate: end of block\n")); - state.back = -1; - state.mode = TYPE; - break; - } - if (here_op & 64) { - strm.msg = 'invalid literal/length code'; - state.mode = BAD; - break; - } - state.extra = here_op & 15; - state.mode = LENEXT; - /* falls through */ - case LENEXT: - if (state.extra) { - //=== NEEDBITS(state.extra); - n = state.extra; - while (bits < n) { - if (have === 0) { break inf_leave; } - have--; - hold += input[next++] << bits; - bits += 8; - } - //===// - state.length += hold & ((1 << state.extra) - 1)/*BITS(state.extra)*/; - //--- DROPBITS(state.extra) ---// - hold >>>= state.extra; - bits -= state.extra; - //---// - state.back += state.extra; - } - //Tracevv((stderr, "inflate: length %u\n", state.length)); - state.was = state.length; - state.mode = DIST; - /* falls through */ - case DIST: - for (;;) { - here = state.distcode[hold & ((1 << state.distbits) - 1)];/*BITS(state.distbits)*/ - here_bits = here >>> 24; - here_op = (here >>> 16) & 0xff; - here_val = here & 0xffff; - - if ((here_bits) <= bits) { break; } - //--- PULLBYTE() ---// - if (have === 0) { break inf_leave; } - have--; - hold += input[next++] << bits; - bits += 8; - //---// - } - if ((here_op & 0xf0) === 0) { - last_bits = here_bits; - last_op = here_op; - last_val = here_val; - for (;;) { - here = state.distcode[last_val + - ((hold & ((1 << (last_bits + last_op)) - 1))/*BITS(last.bits + last.op)*/ >> last_bits)]; - here_bits = here >>> 24; - here_op = (here >>> 16) & 0xff; - here_val = here & 0xffff; - - if ((last_bits + here_bits) <= bits) { break; } - //--- PULLBYTE() ---// - if (have === 0) { break inf_leave; } - have--; - hold += input[next++] << bits; - bits += 8; - //---// - } - //--- DROPBITS(last.bits) ---// - hold >>>= last_bits; - bits -= last_bits; - //---// - state.back += last_bits; - } - //--- DROPBITS(here.bits) ---// - hold >>>= here_bits; - bits -= here_bits; - //---// - state.back += here_bits; - if (here_op & 64) { - strm.msg = 'invalid distance code'; - state.mode = BAD; - break; - } - state.offset = here_val; - state.extra = (here_op) & 15; - state.mode = DISTEXT; - /* falls through */ - case DISTEXT: - if (state.extra) { - //=== NEEDBITS(state.extra); - n = state.extra; - while (bits < n) { - if (have === 0) { break inf_leave; } - have--; - hold += input[next++] << bits; - bits += 8; - } - //===// - state.offset += hold & ((1 << state.extra) - 1)/*BITS(state.extra)*/; - //--- DROPBITS(state.extra) ---// - hold >>>= state.extra; - bits -= state.extra; - //---// - state.back += state.extra; - } -//#ifdef INFLATE_STRICT - if (state.offset > state.dmax) { - strm.msg = 'invalid distance too far back'; - state.mode = BAD; - break; - } -//#endif - //Tracevv((stderr, "inflate: distance %u\n", state.offset)); - state.mode = MATCH; - /* falls through */ - case MATCH: - if (left === 0) { break inf_leave; } - copy = _out - left; - if (state.offset > copy) { /* copy from window */ - copy = state.offset - copy; - if (copy > state.whave) { - if (state.sane) { - strm.msg = 'invalid distance too far back'; - state.mode = BAD; - break; - } -// (!) This block is disabled in zlib defailts, -// don't enable it for binary compatibility -//#ifdef INFLATE_ALLOW_INVALID_DISTANCE_TOOFAR_ARRR -// Trace((stderr, "inflate.c too far\n")); -// copy -= state.whave; -// if (copy > state.length) { copy = state.length; } -// if (copy > left) { copy = left; } -// left -= copy; -// state.length -= copy; -// do { -// output[put++] = 0; -// } while (--copy); -// if (state.length === 0) { state.mode = LEN; } -// break; -//#endif - } - if (copy > state.wnext) { - copy -= state.wnext; - from = state.wsize - copy; - } - else { - from = state.wnext - copy; - } - if (copy > state.length) { copy = state.length; } - from_source = state.window; - } - else { /* copy from output */ - from_source = output; - from = put - state.offset; - copy = state.length; - } - if (copy > left) { copy = left; } - left -= copy; - state.length -= copy; - do { - output[put++] = from_source[from++]; - } while (--copy); - if (state.length === 0) { state.mode = LEN; } - break; - case LIT: - if (left === 0) { break inf_leave; } - output[put++] = state.length; - left--; - state.mode = LEN; - break; - case CHECK: - if (state.wrap) { - //=== NEEDBITS(32); - while (bits < 32) { - if (have === 0) { break inf_leave; } - have--; - // Use '|' insdead of '+' to make sure that result is signed - hold |= input[next++] << bits; - bits += 8; - } - //===// - _out -= left; - strm.total_out += _out; - state.total += _out; - if (_out) { - strm.adler = state.check = - /*UPDATE(state.check, put - _out, _out);*/ - (state.flags ? crc32(state.check, output, _out, put - _out) : adler32(state.check, output, _out, put - _out)); - - } - _out = left; - // NB: crc32 stored as signed 32-bit int, zswap32 returns signed too - if ((state.flags ? hold : zswap32(hold)) !== state.check) { - strm.msg = 'incorrect data check'; - state.mode = BAD; - break; - } - //=== INITBITS(); - hold = 0; - bits = 0; - //===// - //Tracev((stderr, "inflate: check matches trailer\n")); - } - state.mode = LENGTH; - /* falls through */ - case LENGTH: - if (state.wrap && state.flags) { - //=== NEEDBITS(32); - while (bits < 32) { - if (have === 0) { break inf_leave; } - have--; - hold += input[next++] << bits; - bits += 8; - } - //===// - if (hold !== (state.total & 0xffffffff)) { - strm.msg = 'incorrect length check'; - state.mode = BAD; - break; - } - //=== INITBITS(); - hold = 0; - bits = 0; - //===// - //Tracev((stderr, "inflate: length matches trailer\n")); - } - state.mode = DONE; - /* falls through */ - case DONE: - ret = Z_STREAM_END; - break inf_leave; - case BAD: - ret = Z_DATA_ERROR; - break inf_leave; - case MEM: - return Z_MEM_ERROR; - case SYNC: - /* falls through */ - default: - return Z_STREAM_ERROR; - } - } - - // inf_leave <- here is real place for "goto inf_leave", emulated via "break inf_leave" - - /* - Return from inflate(), updating the total counts and the check value. - If there was no progress during the inflate() call, return a buffer - error. Call updatewindow() to create and/or update the window state. - Note: a memory error from inflate() is non-recoverable. - */ - - //--- RESTORE() --- - strm.next_out = put; - strm.avail_out = left; - strm.next_in = next; - strm.avail_in = have; - state.hold = hold; - state.bits = bits; - //--- - - if (state.wsize || (_out !== strm.avail_out && state.mode < BAD && - (state.mode < CHECK || flush !== Z_FINISH))) { - if (updatewindow(strm, strm.output, strm.next_out, _out - strm.avail_out)) { - state.mode = MEM; - return Z_MEM_ERROR; - } - } - _in -= strm.avail_in; - _out -= strm.avail_out; - strm.total_in += _in; - strm.total_out += _out; - state.total += _out; - if (state.wrap && _out) { - strm.adler = state.check = /*UPDATE(state.check, strm.next_out - _out, _out);*/ - (state.flags ? crc32(state.check, output, _out, strm.next_out - _out) : adler32(state.check, output, _out, strm.next_out - _out)); - } - strm.data_type = state.bits + (state.last ? 64 : 0) + - (state.mode === TYPE ? 128 : 0) + - (state.mode === LEN_ || state.mode === COPY_ ? 256 : 0); - if (((_in === 0 && _out === 0) || flush === Z_FINISH) && ret === Z_OK) { - ret = Z_BUF_ERROR; - } - return ret; -} - -function inflateEnd(strm) { - - if (!strm || !strm.state /*|| strm->zfree == (free_func)0*/) { - return Z_STREAM_ERROR; - } - - var state = strm.state; - if (state.window) { - state.window = null; - } - strm.state = null; - return Z_OK; -} - -function inflateGetHeader(strm, head) { - var state; - - /* check state */ - if (!strm || !strm.state) { return Z_STREAM_ERROR; } - state = strm.state; - if ((state.wrap & 2) === 0) { return Z_STREAM_ERROR; } - - /* save header structure */ - state.head = head; - head.done = false; - return Z_OK; -} - -function inflateSetDictionary(strm, dictionary) { - var dictLength = dictionary.length; - - var state; - var dictid; - var ret; - - /* check state */ - if (!strm /* == Z_NULL */ || !strm.state /* == Z_NULL */) { return Z_STREAM_ERROR; } - state = strm.state; - - if (state.wrap !== 0 && state.mode !== DICT) { - return Z_STREAM_ERROR; - } - - /* check for correct dictionary identifier */ - if (state.mode === DICT) { - dictid = 1; /* adler32(0, null, 0)*/ - /* dictid = adler32(dictid, dictionary, dictLength); */ - dictid = adler32(dictid, dictionary, dictLength, 0); - if (dictid !== state.check) { - return Z_DATA_ERROR; - } - } - /* copy dictionary to window using updatewindow(), which will amend the - existing dictionary if appropriate */ - ret = updatewindow(strm, dictionary, dictLength, dictLength); - if (ret) { - state.mode = MEM; - return Z_MEM_ERROR; - } - state.havedict = 1; - // Tracev((stderr, "inflate: dictionary set\n")); - return Z_OK; -} - -exports.inflateReset = inflateReset; -exports.inflateReset2 = inflateReset2; -exports.inflateResetKeep = inflateResetKeep; -exports.inflateInit = inflateInit; -exports.inflateInit2 = inflateInit2; -exports.inflate = inflate; -exports.inflateEnd = inflateEnd; -exports.inflateGetHeader = inflateGetHeader; -exports.inflateSetDictionary = inflateSetDictionary; -exports.inflateInfo = 'pako inflate (from Nodeca project)'; - -/* Not implemented -exports.inflateCopy = inflateCopy; -exports.inflateGetDictionary = inflateGetDictionary; -exports.inflateMark = inflateMark; -exports.inflatePrime = inflatePrime; -exports.inflateSync = inflateSync; -exports.inflateSyncPoint = inflateSyncPoint; -exports.inflateUndermine = inflateUndermine; -*/ diff --git a/node_modules/pako/lib/zlib/inftrees.js b/node_modules/pako/lib/zlib/inftrees.js deleted file mode 100644 index 16e4d520..00000000 --- a/node_modules/pako/lib/zlib/inftrees.js +++ /dev/null @@ -1,327 +0,0 @@ -'use strict'; - - -var utils = require('../utils/common'); - -var MAXBITS = 15; -var ENOUGH_LENS = 852; -var ENOUGH_DISTS = 592; -//var ENOUGH = (ENOUGH_LENS+ENOUGH_DISTS); - -var CODES = 0; -var LENS = 1; -var DISTS = 2; - -var lbase = [ /* Length codes 257..285 base */ - 3, 4, 5, 6, 7, 8, 9, 10, 11, 13, 15, 17, 19, 23, 27, 31, - 35, 43, 51, 59, 67, 83, 99, 115, 131, 163, 195, 227, 258, 0, 0 -]; - -var lext = [ /* Length codes 257..285 extra */ - 16, 16, 16, 16, 16, 16, 16, 16, 17, 17, 17, 17, 18, 18, 18, 18, - 19, 19, 19, 19, 20, 20, 20, 20, 21, 21, 21, 21, 16, 72, 78 -]; - -var dbase = [ /* Distance codes 0..29 base */ - 1, 2, 3, 4, 5, 7, 9, 13, 17, 25, 33, 49, 65, 97, 129, 193, - 257, 385, 513, 769, 1025, 1537, 2049, 3073, 4097, 6145, - 8193, 12289, 16385, 24577, 0, 0 -]; - -var dext = [ /* Distance codes 0..29 extra */ - 16, 16, 16, 16, 17, 17, 18, 18, 19, 19, 20, 20, 21, 21, 22, 22, - 23, 23, 24, 24, 25, 25, 26, 26, 27, 27, - 28, 28, 29, 29, 64, 64 -]; - -module.exports = function inflate_table(type, lens, lens_index, codes, table, table_index, work, opts) -{ - var bits = opts.bits; - //here = opts.here; /* table entry for duplication */ - - var len = 0; /* a code's length in bits */ - var sym = 0; /* index of code symbols */ - var min = 0, max = 0; /* minimum and maximum code lengths */ - var root = 0; /* number of index bits for root table */ - var curr = 0; /* number of index bits for current table */ - var drop = 0; /* code bits to drop for sub-table */ - var left = 0; /* number of prefix codes available */ - var used = 0; /* code entries in table used */ - var huff = 0; /* Huffman code */ - var incr; /* for incrementing code, index */ - var fill; /* index for replicating entries */ - var low; /* low bits for current root entry */ - var mask; /* mask for low root bits */ - var next; /* next available space in table */ - var base = null; /* base value table to use */ - var base_index = 0; -// var shoextra; /* extra bits table to use */ - var end; /* use base and extra for symbol > end */ - var count = new utils.Buf16(MAXBITS + 1); //[MAXBITS+1]; /* number of codes of each length */ - var offs = new utils.Buf16(MAXBITS + 1); //[MAXBITS+1]; /* offsets in table for each length */ - var extra = null; - var extra_index = 0; - - var here_bits, here_op, here_val; - - /* - Process a set of code lengths to create a canonical Huffman code. The - code lengths are lens[0..codes-1]. Each length corresponds to the - symbols 0..codes-1. The Huffman code is generated by first sorting the - symbols by length from short to long, and retaining the symbol order - for codes with equal lengths. Then the code starts with all zero bits - for the first code of the shortest length, and the codes are integer - increments for the same length, and zeros are appended as the length - increases. For the deflate format, these bits are stored backwards - from their more natural integer increment ordering, and so when the - decoding tables are built in the large loop below, the integer codes - are incremented backwards. - - This routine assumes, but does not check, that all of the entries in - lens[] are in the range 0..MAXBITS. The caller must assure this. - 1..MAXBITS is interpreted as that code length. zero means that that - symbol does not occur in this code. - - The codes are sorted by computing a count of codes for each length, - creating from that a table of starting indices for each length in the - sorted table, and then entering the symbols in order in the sorted - table. The sorted table is work[], with that space being provided by - the caller. - - The length counts are used for other purposes as well, i.e. finding - the minimum and maximum length codes, determining if there are any - codes at all, checking for a valid set of lengths, and looking ahead - at length counts to determine sub-table sizes when building the - decoding tables. - */ - - /* accumulate lengths for codes (assumes lens[] all in 0..MAXBITS) */ - for (len = 0; len <= MAXBITS; len++) { - count[len] = 0; - } - for (sym = 0; sym < codes; sym++) { - count[lens[lens_index + sym]]++; - } - - /* bound code lengths, force root to be within code lengths */ - root = bits; - for (max = MAXBITS; max >= 1; max--) { - if (count[max] !== 0) { break; } - } - if (root > max) { - root = max; - } - if (max === 0) { /* no symbols to code at all */ - //table.op[opts.table_index] = 64; //here.op = (var char)64; /* invalid code marker */ - //table.bits[opts.table_index] = 1; //here.bits = (var char)1; - //table.val[opts.table_index++] = 0; //here.val = (var short)0; - table[table_index++] = (1 << 24) | (64 << 16) | 0; - - - //table.op[opts.table_index] = 64; - //table.bits[opts.table_index] = 1; - //table.val[opts.table_index++] = 0; - table[table_index++] = (1 << 24) | (64 << 16) | 0; - - opts.bits = 1; - return 0; /* no symbols, but wait for decoding to report error */ - } - for (min = 1; min < max; min++) { - if (count[min] !== 0) { break; } - } - if (root < min) { - root = min; - } - - /* check for an over-subscribed or incomplete set of lengths */ - left = 1; - for (len = 1; len <= MAXBITS; len++) { - left <<= 1; - left -= count[len]; - if (left < 0) { - return -1; - } /* over-subscribed */ - } - if (left > 0 && (type === CODES || max !== 1)) { - return -1; /* incomplete set */ - } - - /* generate offsets into symbol table for each length for sorting */ - offs[1] = 0; - for (len = 1; len < MAXBITS; len++) { - offs[len + 1] = offs[len] + count[len]; - } - - /* sort symbols by length, by symbol order within each length */ - for (sym = 0; sym < codes; sym++) { - if (lens[lens_index + sym] !== 0) { - work[offs[lens[lens_index + sym]]++] = sym; - } - } - - /* - Create and fill in decoding tables. In this loop, the table being - filled is at next and has curr index bits. The code being used is huff - with length len. That code is converted to an index by dropping drop - bits off of the bottom. For codes where len is less than drop + curr, - those top drop + curr - len bits are incremented through all values to - fill the table with replicated entries. - - root is the number of index bits for the root table. When len exceeds - root, sub-tables are created pointed to by the root entry with an index - of the low root bits of huff. This is saved in low to check for when a - new sub-table should be started. drop is zero when the root table is - being filled, and drop is root when sub-tables are being filled. - - When a new sub-table is needed, it is necessary to look ahead in the - code lengths to determine what size sub-table is needed. The length - counts are used for this, and so count[] is decremented as codes are - entered in the tables. - - used keeps track of how many table entries have been allocated from the - provided *table space. It is checked for LENS and DIST tables against - the constants ENOUGH_LENS and ENOUGH_DISTS to guard against changes in - the initial root table size constants. See the comments in inftrees.h - for more information. - - sym increments through all symbols, and the loop terminates when - all codes of length max, i.e. all codes, have been processed. This - routine permits incomplete codes, so another loop after this one fills - in the rest of the decoding tables with invalid code markers. - */ - - /* set up for code type */ - // poor man optimization - use if-else instead of switch, - // to avoid deopts in old v8 - if (type === CODES) { - base = extra = work; /* dummy value--not used */ - end = 19; - - } else if (type === LENS) { - base = lbase; - base_index -= 257; - extra = lext; - extra_index -= 257; - end = 256; - - } else { /* DISTS */ - base = dbase; - extra = dext; - end = -1; - } - - /* initialize opts for loop */ - huff = 0; /* starting code */ - sym = 0; /* starting code symbol */ - len = min; /* starting code length */ - next = table_index; /* current table to fill in */ - curr = root; /* current table index bits */ - drop = 0; /* current bits to drop from code for index */ - low = -1; /* trigger new sub-table when len > root */ - used = 1 << root; /* use root table entries */ - mask = used - 1; /* mask for comparing low */ - - /* check available table space */ - if ((type === LENS && used > ENOUGH_LENS) || - (type === DISTS && used > ENOUGH_DISTS)) { - return 1; - } - - var i = 0; - /* process all codes and make table entries */ - for (;;) { - i++; - /* create table entry */ - here_bits = len - drop; - if (work[sym] < end) { - here_op = 0; - here_val = work[sym]; - } - else if (work[sym] > end) { - here_op = extra[extra_index + work[sym]]; - here_val = base[base_index + work[sym]]; - } - else { - here_op = 32 + 64; /* end of block */ - here_val = 0; - } - - /* replicate for those indices with low len bits equal to huff */ - incr = 1 << (len - drop); - fill = 1 << curr; - min = fill; /* save offset to next table */ - do { - fill -= incr; - table[next + (huff >> drop) + fill] = (here_bits << 24) | (here_op << 16) | here_val |0; - } while (fill !== 0); - - /* backwards increment the len-bit code huff */ - incr = 1 << (len - 1); - while (huff & incr) { - incr >>= 1; - } - if (incr !== 0) { - huff &= incr - 1; - huff += incr; - } else { - huff = 0; - } - - /* go to next symbol, update count, len */ - sym++; - if (--count[len] === 0) { - if (len === max) { break; } - len = lens[lens_index + work[sym]]; - } - - /* create new sub-table if needed */ - if (len > root && (huff & mask) !== low) { - /* if first time, transition to sub-tables */ - if (drop === 0) { - drop = root; - } - - /* increment past last table */ - next += min; /* here min is 1 << curr */ - - /* determine length of next table */ - curr = len - drop; - left = 1 << curr; - while (curr + drop < max) { - left -= count[curr + drop]; - if (left <= 0) { break; } - curr++; - left <<= 1; - } - - /* check for enough space */ - used += 1 << curr; - if ((type === LENS && used > ENOUGH_LENS) || - (type === DISTS && used > ENOUGH_DISTS)) { - return 1; - } - - /* point entry in root table to sub-table */ - low = huff & mask; - /*table.op[low] = curr; - table.bits[low] = root; - table.val[low] = next - opts.table_index;*/ - table[low] = (root << 24) | (curr << 16) | (next - table_index) |0; - } - } - - /* fill in remaining table entry if code is incomplete (guaranteed to have - at most one remaining entry, since if the code is incomplete, the - maximum code length that was allowed to get this far is one bit) */ - if (huff !== 0) { - //table.op[next + huff] = 64; /* invalid code marker */ - //table.bits[next + huff] = len - drop; - //table.val[next + huff] = 0; - table[next + huff] = ((len - drop) << 24) | (64 << 16) |0; - } - - /* set return parameters */ - //opts.table_index += used; - opts.bits = root; - return 0; -}; diff --git a/node_modules/pako/lib/zlib/messages.js b/node_modules/pako/lib/zlib/messages.js deleted file mode 100644 index d022f0f0..00000000 --- a/node_modules/pako/lib/zlib/messages.js +++ /dev/null @@ -1,13 +0,0 @@ -'use strict'; - -module.exports = { - 2: 'need dictionary', /* Z_NEED_DICT 2 */ - 1: 'stream end', /* Z_STREAM_END 1 */ - 0: '', /* Z_OK 0 */ - '-1': 'file error', /* Z_ERRNO (-1) */ - '-2': 'stream error', /* Z_STREAM_ERROR (-2) */ - '-3': 'data error', /* Z_DATA_ERROR (-3) */ - '-4': 'insufficient memory', /* Z_MEM_ERROR (-4) */ - '-5': 'buffer error', /* Z_BUF_ERROR (-5) */ - '-6': 'incompatible version' /* Z_VERSION_ERROR (-6) */ -}; diff --git a/node_modules/pako/lib/zlib/trees.js b/node_modules/pako/lib/zlib/trees.js deleted file mode 100644 index cef5f156..00000000 --- a/node_modules/pako/lib/zlib/trees.js +++ /dev/null @@ -1,1202 +0,0 @@ -'use strict'; - - -var utils = require('../utils/common'); - -/* Public constants ==========================================================*/ -/* ===========================================================================*/ - - -//var Z_FILTERED = 1; -//var Z_HUFFMAN_ONLY = 2; -//var Z_RLE = 3; -var Z_FIXED = 4; -//var Z_DEFAULT_STRATEGY = 0; - -/* Possible values of the data_type field (though see inflate()) */ -var Z_BINARY = 0; -var Z_TEXT = 1; -//var Z_ASCII = 1; // = Z_TEXT -var Z_UNKNOWN = 2; - -/*============================================================================*/ - - -function zero(buf) { var len = buf.length; while (--len >= 0) { buf[len] = 0; } } - -// From zutil.h - -var STORED_BLOCK = 0; -var STATIC_TREES = 1; -var DYN_TREES = 2; -/* The three kinds of block type */ - -var MIN_MATCH = 3; -var MAX_MATCH = 258; -/* The minimum and maximum match lengths */ - -// From deflate.h -/* =========================================================================== - * Internal compression state. - */ - -var LENGTH_CODES = 29; -/* number of length codes, not counting the special END_BLOCK code */ - -var LITERALS = 256; -/* number of literal bytes 0..255 */ - -var L_CODES = LITERALS + 1 + LENGTH_CODES; -/* number of Literal or Length codes, including the END_BLOCK code */ - -var D_CODES = 30; -/* number of distance codes */ - -var BL_CODES = 19; -/* number of codes used to transfer the bit lengths */ - -var HEAP_SIZE = 2 * L_CODES + 1; -/* maximum heap size */ - -var MAX_BITS = 15; -/* All codes must not exceed MAX_BITS bits */ - -var Buf_size = 16; -/* size of bit buffer in bi_buf */ - - -/* =========================================================================== - * Constants - */ - -var MAX_BL_BITS = 7; -/* Bit length codes must not exceed MAX_BL_BITS bits */ - -var END_BLOCK = 256; -/* end of block literal code */ - -var REP_3_6 = 16; -/* repeat previous bit length 3-6 times (2 bits of repeat count) */ - -var REPZ_3_10 = 17; -/* repeat a zero length 3-10 times (3 bits of repeat count) */ - -var REPZ_11_138 = 18; -/* repeat a zero length 11-138 times (7 bits of repeat count) */ - -/* eslint-disable comma-spacing,array-bracket-spacing */ -var extra_lbits = /* extra bits for each length code */ - [0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0]; - -var extra_dbits = /* extra bits for each distance code */ - [0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13]; - -var extra_blbits = /* extra bits for each bit length code */ - [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7]; - -var bl_order = - [16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]; -/* eslint-enable comma-spacing,array-bracket-spacing */ - -/* The lengths of the bit length codes are sent in order of decreasing - * probability, to avoid transmitting the lengths for unused bit length codes. - */ - -/* =========================================================================== - * Local data. These are initialized only once. - */ - -// We pre-fill arrays with 0 to avoid uninitialized gaps - -var DIST_CODE_LEN = 512; /* see definition of array dist_code below */ - -// !!!! Use flat array insdead of structure, Freq = i*2, Len = i*2+1 -var static_ltree = new Array((L_CODES + 2) * 2); -zero(static_ltree); -/* The static literal tree. Since the bit lengths are imposed, there is no - * need for the L_CODES extra codes used during heap construction. However - * The codes 286 and 287 are needed to build a canonical tree (see _tr_init - * below). - */ - -var static_dtree = new Array(D_CODES * 2); -zero(static_dtree); -/* The static distance tree. (Actually a trivial tree since all codes use - * 5 bits.) - */ - -var _dist_code = new Array(DIST_CODE_LEN); -zero(_dist_code); -/* Distance codes. The first 256 values correspond to the distances - * 3 .. 258, the last 256 values correspond to the top 8 bits of - * the 15 bit distances. - */ - -var _length_code = new Array(MAX_MATCH - MIN_MATCH + 1); -zero(_length_code); -/* length code for each normalized match length (0 == MIN_MATCH) */ - -var base_length = new Array(LENGTH_CODES); -zero(base_length); -/* First normalized length for each code (0 = MIN_MATCH) */ - -var base_dist = new Array(D_CODES); -zero(base_dist); -/* First normalized distance for each code (0 = distance of 1) */ - - -function StaticTreeDesc(static_tree, extra_bits, extra_base, elems, max_length) { - - this.static_tree = static_tree; /* static tree or NULL */ - this.extra_bits = extra_bits; /* extra bits for each code or NULL */ - this.extra_base = extra_base; /* base index for extra_bits */ - this.elems = elems; /* max number of elements in the tree */ - this.max_length = max_length; /* max bit length for the codes */ - - // show if `static_tree` has data or dummy - needed for monomorphic objects - this.has_stree = static_tree && static_tree.length; -} - - -var static_l_desc; -var static_d_desc; -var static_bl_desc; - - -function TreeDesc(dyn_tree, stat_desc) { - this.dyn_tree = dyn_tree; /* the dynamic tree */ - this.max_code = 0; /* largest code with non zero frequency */ - this.stat_desc = stat_desc; /* the corresponding static tree */ -} - - - -function d_code(dist) { - return dist < 256 ? _dist_code[dist] : _dist_code[256 + (dist >>> 7)]; -} - - -/* =========================================================================== - * Output a short LSB first on the stream. - * IN assertion: there is enough room in pendingBuf. - */ -function put_short(s, w) { -// put_byte(s, (uch)((w) & 0xff)); -// put_byte(s, (uch)((ush)(w) >> 8)); - s.pending_buf[s.pending++] = (w) & 0xff; - s.pending_buf[s.pending++] = (w >>> 8) & 0xff; -} - - -/* =========================================================================== - * Send a value on a given number of bits. - * IN assertion: length <= 16 and value fits in length bits. - */ -function send_bits(s, value, length) { - if (s.bi_valid > (Buf_size - length)) { - s.bi_buf |= (value << s.bi_valid) & 0xffff; - put_short(s, s.bi_buf); - s.bi_buf = value >> (Buf_size - s.bi_valid); - s.bi_valid += length - Buf_size; - } else { - s.bi_buf |= (value << s.bi_valid) & 0xffff; - s.bi_valid += length; - } -} - - -function send_code(s, c, tree) { - send_bits(s, tree[c * 2]/*.Code*/, tree[c * 2 + 1]/*.Len*/); -} - - -/* =========================================================================== - * Reverse the first len bits of a code, using straightforward code (a faster - * method would use a table) - * IN assertion: 1 <= len <= 15 - */ -function bi_reverse(code, len) { - var res = 0; - do { - res |= code & 1; - code >>>= 1; - res <<= 1; - } while (--len > 0); - return res >>> 1; -} - - -/* =========================================================================== - * Flush the bit buffer, keeping at most 7 bits in it. - */ -function bi_flush(s) { - if (s.bi_valid === 16) { - put_short(s, s.bi_buf); - s.bi_buf = 0; - s.bi_valid = 0; - - } else if (s.bi_valid >= 8) { - s.pending_buf[s.pending++] = s.bi_buf & 0xff; - s.bi_buf >>= 8; - s.bi_valid -= 8; - } -} - - -/* =========================================================================== - * Compute the optimal bit lengths for a tree and update the total bit length - * for the current block. - * IN assertion: the fields freq and dad are set, heap[heap_max] and - * above are the tree nodes sorted by increasing frequency. - * OUT assertions: the field len is set to the optimal bit length, the - * array bl_count contains the frequencies for each bit length. - * The length opt_len is updated; static_len is also updated if stree is - * not null. - */ -function gen_bitlen(s, desc) -// deflate_state *s; -// tree_desc *desc; /* the tree descriptor */ -{ - var tree = desc.dyn_tree; - var max_code = desc.max_code; - var stree = desc.stat_desc.static_tree; - var has_stree = desc.stat_desc.has_stree; - var extra = desc.stat_desc.extra_bits; - var base = desc.stat_desc.extra_base; - var max_length = desc.stat_desc.max_length; - var h; /* heap index */ - var n, m; /* iterate over the tree elements */ - var bits; /* bit length */ - var xbits; /* extra bits */ - var f; /* frequency */ - var overflow = 0; /* number of elements with bit length too large */ - - for (bits = 0; bits <= MAX_BITS; bits++) { - s.bl_count[bits] = 0; - } - - /* In a first pass, compute the optimal bit lengths (which may - * overflow in the case of the bit length tree). - */ - tree[s.heap[s.heap_max] * 2 + 1]/*.Len*/ = 0; /* root of the heap */ - - for (h = s.heap_max + 1; h < HEAP_SIZE; h++) { - n = s.heap[h]; - bits = tree[tree[n * 2 + 1]/*.Dad*/ * 2 + 1]/*.Len*/ + 1; - if (bits > max_length) { - bits = max_length; - overflow++; - } - tree[n * 2 + 1]/*.Len*/ = bits; - /* We overwrite tree[n].Dad which is no longer needed */ - - if (n > max_code) { continue; } /* not a leaf node */ - - s.bl_count[bits]++; - xbits = 0; - if (n >= base) { - xbits = extra[n - base]; - } - f = tree[n * 2]/*.Freq*/; - s.opt_len += f * (bits + xbits); - if (has_stree) { - s.static_len += f * (stree[n * 2 + 1]/*.Len*/ + xbits); - } - } - if (overflow === 0) { return; } - - // Trace((stderr,"\nbit length overflow\n")); - /* This happens for example on obj2 and pic of the Calgary corpus */ - - /* Find the first bit length which could increase: */ - do { - bits = max_length - 1; - while (s.bl_count[bits] === 0) { bits--; } - s.bl_count[bits]--; /* move one leaf down the tree */ - s.bl_count[bits + 1] += 2; /* move one overflow item as its brother */ - s.bl_count[max_length]--; - /* The brother of the overflow item also moves one step up, - * but this does not affect bl_count[max_length] - */ - overflow -= 2; - } while (overflow > 0); - - /* Now recompute all bit lengths, scanning in increasing frequency. - * h is still equal to HEAP_SIZE. (It is simpler to reconstruct all - * lengths instead of fixing only the wrong ones. This idea is taken - * from 'ar' written by Haruhiko Okumura.) - */ - for (bits = max_length; bits !== 0; bits--) { - n = s.bl_count[bits]; - while (n !== 0) { - m = s.heap[--h]; - if (m > max_code) { continue; } - if (tree[m * 2 + 1]/*.Len*/ !== bits) { - // Trace((stderr,"code %d bits %d->%d\n", m, tree[m].Len, bits)); - s.opt_len += (bits - tree[m * 2 + 1]/*.Len*/) * tree[m * 2]/*.Freq*/; - tree[m * 2 + 1]/*.Len*/ = bits; - } - n--; - } - } -} - - -/* =========================================================================== - * Generate the codes for a given tree and bit counts (which need not be - * optimal). - * IN assertion: the array bl_count contains the bit length statistics for - * the given tree and the field len is set for all tree elements. - * OUT assertion: the field code is set for all tree elements of non - * zero code length. - */ -function gen_codes(tree, max_code, bl_count) -// ct_data *tree; /* the tree to decorate */ -// int max_code; /* largest code with non zero frequency */ -// ushf *bl_count; /* number of codes at each bit length */ -{ - var next_code = new Array(MAX_BITS + 1); /* next code value for each bit length */ - var code = 0; /* running code value */ - var bits; /* bit index */ - var n; /* code index */ - - /* The distribution counts are first used to generate the code values - * without bit reversal. - */ - for (bits = 1; bits <= MAX_BITS; bits++) { - next_code[bits] = code = (code + bl_count[bits - 1]) << 1; - } - /* Check that the bit counts in bl_count are consistent. The last code - * must be all ones. - */ - //Assert (code + bl_count[MAX_BITS]-1 == (1< length code (0..28) */ - length = 0; - for (code = 0; code < LENGTH_CODES - 1; code++) { - base_length[code] = length; - for (n = 0; n < (1 << extra_lbits[code]); n++) { - _length_code[length++] = code; - } - } - //Assert (length == 256, "tr_static_init: length != 256"); - /* Note that the length 255 (match length 258) can be represented - * in two different ways: code 284 + 5 bits or code 285, so we - * overwrite length_code[255] to use the best encoding: - */ - _length_code[length - 1] = code; - - /* Initialize the mapping dist (0..32K) -> dist code (0..29) */ - dist = 0; - for (code = 0; code < 16; code++) { - base_dist[code] = dist; - for (n = 0; n < (1 << extra_dbits[code]); n++) { - _dist_code[dist++] = code; - } - } - //Assert (dist == 256, "tr_static_init: dist != 256"); - dist >>= 7; /* from now on, all distances are divided by 128 */ - for (; code < D_CODES; code++) { - base_dist[code] = dist << 7; - for (n = 0; n < (1 << (extra_dbits[code] - 7)); n++) { - _dist_code[256 + dist++] = code; - } - } - //Assert (dist == 256, "tr_static_init: 256+dist != 512"); - - /* Construct the codes of the static literal tree */ - for (bits = 0; bits <= MAX_BITS; bits++) { - bl_count[bits] = 0; - } - - n = 0; - while (n <= 143) { - static_ltree[n * 2 + 1]/*.Len*/ = 8; - n++; - bl_count[8]++; - } - while (n <= 255) { - static_ltree[n * 2 + 1]/*.Len*/ = 9; - n++; - bl_count[9]++; - } - while (n <= 279) { - static_ltree[n * 2 + 1]/*.Len*/ = 7; - n++; - bl_count[7]++; - } - while (n <= 287) { - static_ltree[n * 2 + 1]/*.Len*/ = 8; - n++; - bl_count[8]++; - } - /* Codes 286 and 287 do not exist, but we must include them in the - * tree construction to get a canonical Huffman tree (longest code - * all ones) - */ - gen_codes(static_ltree, L_CODES + 1, bl_count); - - /* The static distance tree is trivial: */ - for (n = 0; n < D_CODES; n++) { - static_dtree[n * 2 + 1]/*.Len*/ = 5; - static_dtree[n * 2]/*.Code*/ = bi_reverse(n, 5); - } - - // Now data ready and we can init static trees - static_l_desc = new StaticTreeDesc(static_ltree, extra_lbits, LITERALS + 1, L_CODES, MAX_BITS); - static_d_desc = new StaticTreeDesc(static_dtree, extra_dbits, 0, D_CODES, MAX_BITS); - static_bl_desc = new StaticTreeDesc(new Array(0), extra_blbits, 0, BL_CODES, MAX_BL_BITS); - - //static_init_done = true; -} - - -/* =========================================================================== - * Initialize a new block. - */ -function init_block(s) { - var n; /* iterates over tree elements */ - - /* Initialize the trees. */ - for (n = 0; n < L_CODES; n++) { s.dyn_ltree[n * 2]/*.Freq*/ = 0; } - for (n = 0; n < D_CODES; n++) { s.dyn_dtree[n * 2]/*.Freq*/ = 0; } - for (n = 0; n < BL_CODES; n++) { s.bl_tree[n * 2]/*.Freq*/ = 0; } - - s.dyn_ltree[END_BLOCK * 2]/*.Freq*/ = 1; - s.opt_len = s.static_len = 0; - s.last_lit = s.matches = 0; -} - - -/* =========================================================================== - * Flush the bit buffer and align the output on a byte boundary - */ -function bi_windup(s) -{ - if (s.bi_valid > 8) { - put_short(s, s.bi_buf); - } else if (s.bi_valid > 0) { - //put_byte(s, (Byte)s->bi_buf); - s.pending_buf[s.pending++] = s.bi_buf; - } - s.bi_buf = 0; - s.bi_valid = 0; -} - -/* =========================================================================== - * Copy a stored block, storing first the length and its - * one's complement if requested. - */ -function copy_block(s, buf, len, header) -//DeflateState *s; -//charf *buf; /* the input data */ -//unsigned len; /* its length */ -//int header; /* true if block header must be written */ -{ - bi_windup(s); /* align on byte boundary */ - - if (header) { - put_short(s, len); - put_short(s, ~len); - } -// while (len--) { -// put_byte(s, *buf++); -// } - utils.arraySet(s.pending_buf, s.window, buf, len, s.pending); - s.pending += len; -} - -/* =========================================================================== - * Compares to subtrees, using the tree depth as tie breaker when - * the subtrees have equal frequency. This minimizes the worst case length. - */ -function smaller(tree, n, m, depth) { - var _n2 = n * 2; - var _m2 = m * 2; - return (tree[_n2]/*.Freq*/ < tree[_m2]/*.Freq*/ || - (tree[_n2]/*.Freq*/ === tree[_m2]/*.Freq*/ && depth[n] <= depth[m])); -} - -/* =========================================================================== - * Restore the heap property by moving down the tree starting at node k, - * exchanging a node with the smallest of its two sons if necessary, stopping - * when the heap property is re-established (each father smaller than its - * two sons). - */ -function pqdownheap(s, tree, k) -// deflate_state *s; -// ct_data *tree; /* the tree to restore */ -// int k; /* node to move down */ -{ - var v = s.heap[k]; - var j = k << 1; /* left son of k */ - while (j <= s.heap_len) { - /* Set j to the smallest of the two sons: */ - if (j < s.heap_len && - smaller(tree, s.heap[j + 1], s.heap[j], s.depth)) { - j++; - } - /* Exit if v is smaller than both sons */ - if (smaller(tree, v, s.heap[j], s.depth)) { break; } - - /* Exchange v with the smallest son */ - s.heap[k] = s.heap[j]; - k = j; - - /* And continue down the tree, setting j to the left son of k */ - j <<= 1; - } - s.heap[k] = v; -} - - -// inlined manually -// var SMALLEST = 1; - -/* =========================================================================== - * Send the block data compressed using the given Huffman trees - */ -function compress_block(s, ltree, dtree) -// deflate_state *s; -// const ct_data *ltree; /* literal tree */ -// const ct_data *dtree; /* distance tree */ -{ - var dist; /* distance of matched string */ - var lc; /* match length or unmatched char (if dist == 0) */ - var lx = 0; /* running index in l_buf */ - var code; /* the code to send */ - var extra; /* number of extra bits to send */ - - if (s.last_lit !== 0) { - do { - dist = (s.pending_buf[s.d_buf + lx * 2] << 8) | (s.pending_buf[s.d_buf + lx * 2 + 1]); - lc = s.pending_buf[s.l_buf + lx]; - lx++; - - if (dist === 0) { - send_code(s, lc, ltree); /* send a literal byte */ - //Tracecv(isgraph(lc), (stderr," '%c' ", lc)); - } else { - /* Here, lc is the match length - MIN_MATCH */ - code = _length_code[lc]; - send_code(s, code + LITERALS + 1, ltree); /* send the length code */ - extra = extra_lbits[code]; - if (extra !== 0) { - lc -= base_length[code]; - send_bits(s, lc, extra); /* send the extra length bits */ - } - dist--; /* dist is now the match distance - 1 */ - code = d_code(dist); - //Assert (code < D_CODES, "bad d_code"); - - send_code(s, code, dtree); /* send the distance code */ - extra = extra_dbits[code]; - if (extra !== 0) { - dist -= base_dist[code]; - send_bits(s, dist, extra); /* send the extra distance bits */ - } - } /* literal or match pair ? */ - - /* Check that the overlay between pending_buf and d_buf+l_buf is ok: */ - //Assert((uInt)(s->pending) < s->lit_bufsize + 2*lx, - // "pendingBuf overflow"); - - } while (lx < s.last_lit); - } - - send_code(s, END_BLOCK, ltree); -} - - -/* =========================================================================== - * Construct one Huffman tree and assigns the code bit strings and lengths. - * Update the total bit length for the current block. - * IN assertion: the field freq is set for all tree elements. - * OUT assertions: the fields len and code are set to the optimal bit length - * and corresponding code. The length opt_len is updated; static_len is - * also updated if stree is not null. The field max_code is set. - */ -function build_tree(s, desc) -// deflate_state *s; -// tree_desc *desc; /* the tree descriptor */ -{ - var tree = desc.dyn_tree; - var stree = desc.stat_desc.static_tree; - var has_stree = desc.stat_desc.has_stree; - var elems = desc.stat_desc.elems; - var n, m; /* iterate over heap elements */ - var max_code = -1; /* largest code with non zero frequency */ - var node; /* new node being created */ - - /* Construct the initial heap, with least frequent element in - * heap[SMALLEST]. The sons of heap[n] are heap[2*n] and heap[2*n+1]. - * heap[0] is not used. - */ - s.heap_len = 0; - s.heap_max = HEAP_SIZE; - - for (n = 0; n < elems; n++) { - if (tree[n * 2]/*.Freq*/ !== 0) { - s.heap[++s.heap_len] = max_code = n; - s.depth[n] = 0; - - } else { - tree[n * 2 + 1]/*.Len*/ = 0; - } - } - - /* The pkzip format requires that at least one distance code exists, - * and that at least one bit should be sent even if there is only one - * possible code. So to avoid special checks later on we force at least - * two codes of non zero frequency. - */ - while (s.heap_len < 2) { - node = s.heap[++s.heap_len] = (max_code < 2 ? ++max_code : 0); - tree[node * 2]/*.Freq*/ = 1; - s.depth[node] = 0; - s.opt_len--; - - if (has_stree) { - s.static_len -= stree[node * 2 + 1]/*.Len*/; - } - /* node is 0 or 1 so it does not have extra bits */ - } - desc.max_code = max_code; - - /* The elements heap[heap_len/2+1 .. heap_len] are leaves of the tree, - * establish sub-heaps of increasing lengths: - */ - for (n = (s.heap_len >> 1/*int /2*/); n >= 1; n--) { pqdownheap(s, tree, n); } - - /* Construct the Huffman tree by repeatedly combining the least two - * frequent nodes. - */ - node = elems; /* next internal node of the tree */ - do { - //pqremove(s, tree, n); /* n = node of least frequency */ - /*** pqremove ***/ - n = s.heap[1/*SMALLEST*/]; - s.heap[1/*SMALLEST*/] = s.heap[s.heap_len--]; - pqdownheap(s, tree, 1/*SMALLEST*/); - /***/ - - m = s.heap[1/*SMALLEST*/]; /* m = node of next least frequency */ - - s.heap[--s.heap_max] = n; /* keep the nodes sorted by frequency */ - s.heap[--s.heap_max] = m; - - /* Create a new node father of n and m */ - tree[node * 2]/*.Freq*/ = tree[n * 2]/*.Freq*/ + tree[m * 2]/*.Freq*/; - s.depth[node] = (s.depth[n] >= s.depth[m] ? s.depth[n] : s.depth[m]) + 1; - tree[n * 2 + 1]/*.Dad*/ = tree[m * 2 + 1]/*.Dad*/ = node; - - /* and insert the new node in the heap */ - s.heap[1/*SMALLEST*/] = node++; - pqdownheap(s, tree, 1/*SMALLEST*/); - - } while (s.heap_len >= 2); - - s.heap[--s.heap_max] = s.heap[1/*SMALLEST*/]; - - /* At this point, the fields freq and dad are set. We can now - * generate the bit lengths. - */ - gen_bitlen(s, desc); - - /* The field len is now set, we can generate the bit codes */ - gen_codes(tree, max_code, s.bl_count); -} - - -/* =========================================================================== - * Scan a literal or distance tree to determine the frequencies of the codes - * in the bit length tree. - */ -function scan_tree(s, tree, max_code) -// deflate_state *s; -// ct_data *tree; /* the tree to be scanned */ -// int max_code; /* and its largest code of non zero frequency */ -{ - var n; /* iterates over all tree elements */ - var prevlen = -1; /* last emitted length */ - var curlen; /* length of current code */ - - var nextlen = tree[0 * 2 + 1]/*.Len*/; /* length of next code */ - - var count = 0; /* repeat count of the current code */ - var max_count = 7; /* max repeat count */ - var min_count = 4; /* min repeat count */ - - if (nextlen === 0) { - max_count = 138; - min_count = 3; - } - tree[(max_code + 1) * 2 + 1]/*.Len*/ = 0xffff; /* guard */ - - for (n = 0; n <= max_code; n++) { - curlen = nextlen; - nextlen = tree[(n + 1) * 2 + 1]/*.Len*/; - - if (++count < max_count && curlen === nextlen) { - continue; - - } else if (count < min_count) { - s.bl_tree[curlen * 2]/*.Freq*/ += count; - - } else if (curlen !== 0) { - - if (curlen !== prevlen) { s.bl_tree[curlen * 2]/*.Freq*/++; } - s.bl_tree[REP_3_6 * 2]/*.Freq*/++; - - } else if (count <= 10) { - s.bl_tree[REPZ_3_10 * 2]/*.Freq*/++; - - } else { - s.bl_tree[REPZ_11_138 * 2]/*.Freq*/++; - } - - count = 0; - prevlen = curlen; - - if (nextlen === 0) { - max_count = 138; - min_count = 3; - - } else if (curlen === nextlen) { - max_count = 6; - min_count = 3; - - } else { - max_count = 7; - min_count = 4; - } - } -} - - -/* =========================================================================== - * Send a literal or distance tree in compressed form, using the codes in - * bl_tree. - */ -function send_tree(s, tree, max_code) -// deflate_state *s; -// ct_data *tree; /* the tree to be scanned */ -// int max_code; /* and its largest code of non zero frequency */ -{ - var n; /* iterates over all tree elements */ - var prevlen = -1; /* last emitted length */ - var curlen; /* length of current code */ - - var nextlen = tree[0 * 2 + 1]/*.Len*/; /* length of next code */ - - var count = 0; /* repeat count of the current code */ - var max_count = 7; /* max repeat count */ - var min_count = 4; /* min repeat count */ - - /* tree[max_code+1].Len = -1; */ /* guard already set */ - if (nextlen === 0) { - max_count = 138; - min_count = 3; - } - - for (n = 0; n <= max_code; n++) { - curlen = nextlen; - nextlen = tree[(n + 1) * 2 + 1]/*.Len*/; - - if (++count < max_count && curlen === nextlen) { - continue; - - } else if (count < min_count) { - do { send_code(s, curlen, s.bl_tree); } while (--count !== 0); - - } else if (curlen !== 0) { - if (curlen !== prevlen) { - send_code(s, curlen, s.bl_tree); - count--; - } - //Assert(count >= 3 && count <= 6, " 3_6?"); - send_code(s, REP_3_6, s.bl_tree); - send_bits(s, count - 3, 2); - - } else if (count <= 10) { - send_code(s, REPZ_3_10, s.bl_tree); - send_bits(s, count - 3, 3); - - } else { - send_code(s, REPZ_11_138, s.bl_tree); - send_bits(s, count - 11, 7); - } - - count = 0; - prevlen = curlen; - if (nextlen === 0) { - max_count = 138; - min_count = 3; - - } else if (curlen === nextlen) { - max_count = 6; - min_count = 3; - - } else { - max_count = 7; - min_count = 4; - } - } -} - - -/* =========================================================================== - * Construct the Huffman tree for the bit lengths and return the index in - * bl_order of the last bit length code to send. - */ -function build_bl_tree(s) { - var max_blindex; /* index of last bit length code of non zero freq */ - - /* Determine the bit length frequencies for literal and distance trees */ - scan_tree(s, s.dyn_ltree, s.l_desc.max_code); - scan_tree(s, s.dyn_dtree, s.d_desc.max_code); - - /* Build the bit length tree: */ - build_tree(s, s.bl_desc); - /* opt_len now includes the length of the tree representations, except - * the lengths of the bit lengths codes and the 5+5+4 bits for the counts. - */ - - /* Determine the number of bit length codes to send. The pkzip format - * requires that at least 4 bit length codes be sent. (appnote.txt says - * 3 but the actual value used is 4.) - */ - for (max_blindex = BL_CODES - 1; max_blindex >= 3; max_blindex--) { - if (s.bl_tree[bl_order[max_blindex] * 2 + 1]/*.Len*/ !== 0) { - break; - } - } - /* Update opt_len to include the bit length tree and counts */ - s.opt_len += 3 * (max_blindex + 1) + 5 + 5 + 4; - //Tracev((stderr, "\ndyn trees: dyn %ld, stat %ld", - // s->opt_len, s->static_len)); - - return max_blindex; -} - - -/* =========================================================================== - * Send the header for a block using dynamic Huffman trees: the counts, the - * lengths of the bit length codes, the literal tree and the distance tree. - * IN assertion: lcodes >= 257, dcodes >= 1, blcodes >= 4. - */ -function send_all_trees(s, lcodes, dcodes, blcodes) -// deflate_state *s; -// int lcodes, dcodes, blcodes; /* number of codes for each tree */ -{ - var rank; /* index in bl_order */ - - //Assert (lcodes >= 257 && dcodes >= 1 && blcodes >= 4, "not enough codes"); - //Assert (lcodes <= L_CODES && dcodes <= D_CODES && blcodes <= BL_CODES, - // "too many codes"); - //Tracev((stderr, "\nbl counts: ")); - send_bits(s, lcodes - 257, 5); /* not +255 as stated in appnote.txt */ - send_bits(s, dcodes - 1, 5); - send_bits(s, blcodes - 4, 4); /* not -3 as stated in appnote.txt */ - for (rank = 0; rank < blcodes; rank++) { - //Tracev((stderr, "\nbl code %2d ", bl_order[rank])); - send_bits(s, s.bl_tree[bl_order[rank] * 2 + 1]/*.Len*/, 3); - } - //Tracev((stderr, "\nbl tree: sent %ld", s->bits_sent)); - - send_tree(s, s.dyn_ltree, lcodes - 1); /* literal tree */ - //Tracev((stderr, "\nlit tree: sent %ld", s->bits_sent)); - - send_tree(s, s.dyn_dtree, dcodes - 1); /* distance tree */ - //Tracev((stderr, "\ndist tree: sent %ld", s->bits_sent)); -} - - -/* =========================================================================== - * Check if the data type is TEXT or BINARY, using the following algorithm: - * - TEXT if the two conditions below are satisfied: - * a) There are no non-portable control characters belonging to the - * "black list" (0..6, 14..25, 28..31). - * b) There is at least one printable character belonging to the - * "white list" (9 {TAB}, 10 {LF}, 13 {CR}, 32..255). - * - BINARY otherwise. - * - The following partially-portable control characters form a - * "gray list" that is ignored in this detection algorithm: - * (7 {BEL}, 8 {BS}, 11 {VT}, 12 {FF}, 26 {SUB}, 27 {ESC}). - * IN assertion: the fields Freq of dyn_ltree are set. - */ -function detect_data_type(s) { - /* black_mask is the bit mask of black-listed bytes - * set bits 0..6, 14..25, and 28..31 - * 0xf3ffc07f = binary 11110011111111111100000001111111 - */ - var black_mask = 0xf3ffc07f; - var n; - - /* Check for non-textual ("black-listed") bytes. */ - for (n = 0; n <= 31; n++, black_mask >>>= 1) { - if ((black_mask & 1) && (s.dyn_ltree[n * 2]/*.Freq*/ !== 0)) { - return Z_BINARY; - } - } - - /* Check for textual ("white-listed") bytes. */ - if (s.dyn_ltree[9 * 2]/*.Freq*/ !== 0 || s.dyn_ltree[10 * 2]/*.Freq*/ !== 0 || - s.dyn_ltree[13 * 2]/*.Freq*/ !== 0) { - return Z_TEXT; - } - for (n = 32; n < LITERALS; n++) { - if (s.dyn_ltree[n * 2]/*.Freq*/ !== 0) { - return Z_TEXT; - } - } - - /* There are no "black-listed" or "white-listed" bytes: - * this stream either is empty or has tolerated ("gray-listed") bytes only. - */ - return Z_BINARY; -} - - -var static_init_done = false; - -/* =========================================================================== - * Initialize the tree data structures for a new zlib stream. - */ -function _tr_init(s) -{ - - if (!static_init_done) { - tr_static_init(); - static_init_done = true; - } - - s.l_desc = new TreeDesc(s.dyn_ltree, static_l_desc); - s.d_desc = new TreeDesc(s.dyn_dtree, static_d_desc); - s.bl_desc = new TreeDesc(s.bl_tree, static_bl_desc); - - s.bi_buf = 0; - s.bi_valid = 0; - - /* Initialize the first block of the first file: */ - init_block(s); -} - - -/* =========================================================================== - * Send a stored block - */ -function _tr_stored_block(s, buf, stored_len, last) -//DeflateState *s; -//charf *buf; /* input block */ -//ulg stored_len; /* length of input block */ -//int last; /* one if this is the last block for a file */ -{ - send_bits(s, (STORED_BLOCK << 1) + (last ? 1 : 0), 3); /* send block type */ - copy_block(s, buf, stored_len, true); /* with header */ -} - - -/* =========================================================================== - * Send one empty static block to give enough lookahead for inflate. - * This takes 10 bits, of which 7 may remain in the bit buffer. - */ -function _tr_align(s) { - send_bits(s, STATIC_TREES << 1, 3); - send_code(s, END_BLOCK, static_ltree); - bi_flush(s); -} - - -/* =========================================================================== - * Determine the best encoding for the current block: dynamic trees, static - * trees or store, and output the encoded block to the zip file. - */ -function _tr_flush_block(s, buf, stored_len, last) -//DeflateState *s; -//charf *buf; /* input block, or NULL if too old */ -//ulg stored_len; /* length of input block */ -//int last; /* one if this is the last block for a file */ -{ - var opt_lenb, static_lenb; /* opt_len and static_len in bytes */ - var max_blindex = 0; /* index of last bit length code of non zero freq */ - - /* Build the Huffman trees unless a stored block is forced */ - if (s.level > 0) { - - /* Check if the file is binary or text */ - if (s.strm.data_type === Z_UNKNOWN) { - s.strm.data_type = detect_data_type(s); - } - - /* Construct the literal and distance trees */ - build_tree(s, s.l_desc); - // Tracev((stderr, "\nlit data: dyn %ld, stat %ld", s->opt_len, - // s->static_len)); - - build_tree(s, s.d_desc); - // Tracev((stderr, "\ndist data: dyn %ld, stat %ld", s->opt_len, - // s->static_len)); - /* At this point, opt_len and static_len are the total bit lengths of - * the compressed block data, excluding the tree representations. - */ - - /* Build the bit length tree for the above two trees, and get the index - * in bl_order of the last bit length code to send. - */ - max_blindex = build_bl_tree(s); - - /* Determine the best encoding. Compute the block lengths in bytes. */ - opt_lenb = (s.opt_len + 3 + 7) >>> 3; - static_lenb = (s.static_len + 3 + 7) >>> 3; - - // Tracev((stderr, "\nopt %lu(%lu) stat %lu(%lu) stored %lu lit %u ", - // opt_lenb, s->opt_len, static_lenb, s->static_len, stored_len, - // s->last_lit)); - - if (static_lenb <= opt_lenb) { opt_lenb = static_lenb; } - - } else { - // Assert(buf != (char*)0, "lost buf"); - opt_lenb = static_lenb = stored_len + 5; /* force a stored block */ - } - - if ((stored_len + 4 <= opt_lenb) && (buf !== -1)) { - /* 4: two words for the lengths */ - - /* The test buf != NULL is only necessary if LIT_BUFSIZE > WSIZE. - * Otherwise we can't have processed more than WSIZE input bytes since - * the last block flush, because compression would have been - * successful. If LIT_BUFSIZE <= WSIZE, it is never too late to - * transform a block into a stored block. - */ - _tr_stored_block(s, buf, stored_len, last); - - } else if (s.strategy === Z_FIXED || static_lenb === opt_lenb) { - - send_bits(s, (STATIC_TREES << 1) + (last ? 1 : 0), 3); - compress_block(s, static_ltree, static_dtree); - - } else { - send_bits(s, (DYN_TREES << 1) + (last ? 1 : 0), 3); - send_all_trees(s, s.l_desc.max_code + 1, s.d_desc.max_code + 1, max_blindex + 1); - compress_block(s, s.dyn_ltree, s.dyn_dtree); - } - // Assert (s->compressed_len == s->bits_sent, "bad compressed size"); - /* The above check is made mod 2^32, for files larger than 512 MB - * and uLong implemented on 32 bits. - */ - init_block(s); - - if (last) { - bi_windup(s); - } - // Tracev((stderr,"\ncomprlen %lu(%lu) ", s->compressed_len>>3, - // s->compressed_len-7*last)); -} - -/* =========================================================================== - * Save the match info and tally the frequency counts. Return true if - * the current block must be flushed. - */ -function _tr_tally(s, dist, lc) -// deflate_state *s; -// unsigned dist; /* distance of matched string */ -// unsigned lc; /* match length-MIN_MATCH or unmatched char (if dist==0) */ -{ - //var out_length, in_length, dcode; - - s.pending_buf[s.d_buf + s.last_lit * 2] = (dist >>> 8) & 0xff; - s.pending_buf[s.d_buf + s.last_lit * 2 + 1] = dist & 0xff; - - s.pending_buf[s.l_buf + s.last_lit] = lc & 0xff; - s.last_lit++; - - if (dist === 0) { - /* lc is the unmatched char */ - s.dyn_ltree[lc * 2]/*.Freq*/++; - } else { - s.matches++; - /* Here, lc is the match length - MIN_MATCH */ - dist--; /* dist = match distance - 1 */ - //Assert((ush)dist < (ush)MAX_DIST(s) && - // (ush)lc <= (ush)(MAX_MATCH-MIN_MATCH) && - // (ush)d_code(dist) < (ush)D_CODES, "_tr_tally: bad match"); - - s.dyn_ltree[(_length_code[lc] + LITERALS + 1) * 2]/*.Freq*/++; - s.dyn_dtree[d_code(dist) * 2]/*.Freq*/++; - } - -// (!) This block is disabled in zlib defailts, -// don't enable it for binary compatibility - -//#ifdef TRUNCATE_BLOCK -// /* Try to guess if it is profitable to stop the current block here */ -// if ((s.last_lit & 0x1fff) === 0 && s.level > 2) { -// /* Compute an upper bound for the compressed length */ -// out_length = s.last_lit*8; -// in_length = s.strstart - s.block_start; -// -// for (dcode = 0; dcode < D_CODES; dcode++) { -// out_length += s.dyn_dtree[dcode*2]/*.Freq*/ * (5 + extra_dbits[dcode]); -// } -// out_length >>>= 3; -// //Tracev((stderr,"\nlast_lit %u, in %ld, out ~%ld(%ld%%) ", -// // s->last_lit, in_length, out_length, -// // 100L - out_length*100L/in_length)); -// if (s.matches < (s.last_lit>>1)/*int /2*/ && out_length < (in_length>>1)/*int /2*/) { -// return true; -// } -// } -//#endif - - return (s.last_lit === s.lit_bufsize - 1); - /* We avoid equality with lit_bufsize because of wraparound at 64K - * on 16 bit machines and because stored blocks are restricted to - * 64K-1 bytes. - */ -} - -exports._tr_init = _tr_init; -exports._tr_stored_block = _tr_stored_block; -exports._tr_flush_block = _tr_flush_block; -exports._tr_tally = _tr_tally; -exports._tr_align = _tr_align; diff --git a/node_modules/pako/lib/zlib/zstream.js b/node_modules/pako/lib/zlib/zstream.js deleted file mode 100644 index 2d93a391..00000000 --- a/node_modules/pako/lib/zlib/zstream.js +++ /dev/null @@ -1,29 +0,0 @@ -'use strict'; - - -function ZStream() { - /* next input byte */ - this.input = null; // JS specific, because we have no pointers - this.next_in = 0; - /* number of bytes available at input */ - this.avail_in = 0; - /* total number of input bytes read so far */ - this.total_in = 0; - /* next output byte should be put there */ - this.output = null; // JS specific, because we have no pointers - this.next_out = 0; - /* remaining free space at output */ - this.avail_out = 0; - /* total number of bytes output so far */ - this.total_out = 0; - /* last error message, NULL if no error */ - this.msg = ''/*Z_NULL*/; - /* not visible by applications */ - this.state = null; - /* best guess about the data type: binary or text */ - this.data_type = 2/*Z_UNKNOWN*/; - /* adler32 value of the uncompressed data */ - this.adler = 0; -} - -module.exports = ZStream; diff --git a/node_modules/pako/package.json b/node_modules/pako/package.json deleted file mode 100644 index 13fd1303..00000000 --- a/node_modules/pako/package.json +++ /dev/null @@ -1,115 +0,0 @@ -{ - "_args": [ - [ - { - "raw": "pako@~0.2.0", - "scope": null, - "escapedName": "pako", - "name": "pako", - "rawSpec": "~0.2.0", - "spec": ">=0.2.0 <0.3.0", - "type": "range" - }, - "/Users/benjaminarias/Desktop/poly/node_modules/browserify-zlib" - ] - ], - "_from": "pako@>=0.2.0 <0.3.0", - "_id": "pako@0.2.9", - "_inCache": true, - "_installable": true, - "_location": "/pako", - "_nodeVersion": "4.4.5", - "_npmOperationalInternal": { - "host": "packages-12-west.internal.npmjs.com", - "tmp": "tmp/pako-0.2.9.tgz_1469133699053_0.013920168625190854" - }, - "_npmUser": { - "name": "vitaly", - "email": "vitaly@rcdesign.ru" - }, - "_npmVersion": "2.15.5", - "_phantomChildren": {}, - "_requested": { - "raw": "pako@~0.2.0", - "scope": null, - "escapedName": "pako", - "name": "pako", - "rawSpec": "~0.2.0", - "spec": ">=0.2.0 <0.3.0", - "type": "range" - }, - "_requiredBy": [ - "/browserify-zlib" - ], - "_resolved": "https://registry.npmjs.org/pako/-/pako-0.2.9.tgz", - "_shasum": "f3f7522f4ef782348da8161bad9ecfd51bf83a75", - "_shrinkwrap": null, - "_spec": "pako@~0.2.0", - "_where": "/Users/benjaminarias/Desktop/poly/node_modules/browserify-zlib", - "bugs": { - "url": "https://github.com/nodeca/pako/issues" - }, - "contributors": [ - { - "name": "Andrei Tuputcyn", - "url": "https://github.com/andr83" - }, - { - "name": "Vitaly Puzrin", - "url": "https://github.com/puzrin" - } - ], - "dependencies": {}, - "description": "zlib port to javascript - fast, modularized, with browser support", - "devDependencies": { - "ansi": "*", - "async": "*", - "benchmark": "*", - "browserify": "*", - "eslint": "^2.1.0", - "eslint-plugin-nodeca": "~1.0.3", - "grunt": "~0.4.4", - "grunt-cli": "~0.1.13", - "grunt-contrib-connect": "~0.9.0", - "grunt-saucelabs": "~8.6.0", - "istanbul": "*", - "lodash": "*", - "mocha": "1.21.5", - "ndoc": "*", - "uglify-js": "*" - }, - "directories": {}, - "dist": { - "shasum": "f3f7522f4ef782348da8161bad9ecfd51bf83a75", - "tarball": "https://registry.npmjs.org/pako/-/pako-0.2.9.tgz" - }, - "files": [ - "index.js", - "dist/", - "lib/" - ], - "gitHead": "85d145e616967f3720382f416da530c23c02ad13", - "homepage": "https://github.com/nodeca/pako", - "keywords": [ - "zlib", - "deflate", - "inflate", - "gzip" - ], - "license": "MIT", - "maintainers": [ - { - "name": "vitaly", - "email": "vitaly@rcdesign.ru" - } - ], - "name": "pako", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git+https://github.com/nodeca/pako.git" - }, - "scripts": {}, - "version": "0.2.9" -} diff --git a/node_modules/parents/.travis.yml b/node_modules/parents/.travis.yml deleted file mode 100644 index 895dbd36..00000000 --- a/node_modules/parents/.travis.yml +++ /dev/null @@ -1,4 +0,0 @@ -language: node_js -node_js: - - 0.6 - - 0.8 diff --git a/node_modules/parents/LICENSE b/node_modules/parents/LICENSE deleted file mode 100644 index ee27ba4b..00000000 --- a/node_modules/parents/LICENSE +++ /dev/null @@ -1,18 +0,0 @@ -This software is released under the MIT license: - -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/node_modules/parents/example/dirname.js b/node_modules/parents/example/dirname.js deleted file mode 100644 index c9d381b2..00000000 --- a/node_modules/parents/example/dirname.js +++ /dev/null @@ -1,3 +0,0 @@ -var parents = require('../'); -var dirs = parents(__dirname); -console.dir(dirs); diff --git a/node_modules/parents/example/win32.js b/node_modules/parents/example/win32.js deleted file mode 100644 index 11b85d6e..00000000 --- a/node_modules/parents/example/win32.js +++ /dev/null @@ -1,5 +0,0 @@ -var parents = require('../'); -var dir = 'C:\\Program Files\\Maxis\\Sim City 2000\\cities'; - -var dirs = parents(dir, { platform : 'win32' }); -console.dir(dirs); diff --git a/node_modules/parents/index.js b/node_modules/parents/index.js deleted file mode 100644 index 84a96397..00000000 --- a/node_modules/parents/index.js +++ /dev/null @@ -1,48 +0,0 @@ -var pathPlatform = require('path-platform'); - -module.exports = function (cwd, opts) { - if (cwd === undefined) cwd = process.cwd(); - if (!opts) opts = {}; - var platform = opts.platform || process.platform; - - var isWindows = /^win/.test(platform); - var path = isWindows ? pathPlatform.win32 : pathPlatform; - var normalize = !isWindows ? path.normalize : - path.normalize('c:') === 'c:.' ? fixNormalize(path.normalize) : - path.normalize; - var sep = isWindows ? /[\\\/]/ : '/'; - var init = isWindows ? '' : '/'; - - var join = function (x, y) { - var ps = [ x, y ].filter(function (p) { - return p && typeof p === 'string' - }); - - return normalize(ps.join(isWindows ? '\\' : '/')); - }; - - var res = normalize(cwd) - .split(sep) - .reduce(function (acc,dir,ix) { - return acc.concat(join(acc[ix], dir)) - }, [init]) - .slice(1) - .reverse() - ; - if (res[0] === res[1]) return [ res[0] ]; - if (isWindows && /^\\/.test(cwd)) { - return res.slice(0,-1).map(function (d) { - var ch = d.charAt(0) - return ch === '\\' ? d : - ch === '.' ? '\\' + d.slice(1) : - '\\' + d - }); - } - return res; - - function fixNormalize(fn) { - return function(p) { - return fn(p).replace(/:\.$/, ':') - } - } -} diff --git a/node_modules/parents/package.json b/node_modules/parents/package.json deleted file mode 100644 index 1ede32ad..00000000 --- a/node_modules/parents/package.json +++ /dev/null @@ -1,100 +0,0 @@ -{ - "_args": [ - [ - { - "raw": "parents@^1.0.1", - "scope": null, - "escapedName": "parents", - "name": "parents", - "rawSpec": "^1.0.1", - "spec": ">=1.0.1 <2.0.0", - "type": "range" - }, - "/Users/benjaminarias/Desktop/poly/node_modules/browserify" - ] - ], - "_from": "parents@>=1.0.1 <2.0.0", - "_id": "parents@1.0.1", - "_inCache": true, - "_installable": true, - "_location": "/parents", - "_nodeVersion": "0.10.35", - "_npmUser": { - "name": "substack", - "email": "mail@substack.net" - }, - "_npmVersion": "2.1.16", - "_phantomChildren": {}, - "_requested": { - "raw": "parents@^1.0.1", - "scope": null, - "escapedName": "parents", - "name": "parents", - "rawSpec": "^1.0.1", - "spec": ">=1.0.1 <2.0.0", - "type": "range" - }, - "_requiredBy": [ - "/browserify", - "/module-deps" - ], - "_resolved": "https://registry.npmjs.org/parents/-/parents-1.0.1.tgz", - "_shasum": "fedd4d2bf193a77745fe71e371d73c3307d9c751", - "_shrinkwrap": null, - "_spec": "parents@^1.0.1", - "_where": "/Users/benjaminarias/Desktop/poly/node_modules/browserify", - "author": { - "name": "James Halliday", - "email": "mail@substack.net", - "url": "http://substack.net" - }, - "bin": {}, - "bugs": { - "url": "https://github.com/substack/node-parents/issues" - }, - "dependencies": { - "path-platform": "~0.11.15" - }, - "description": "return all the parent directories for a directory", - "devDependencies": { - "tap": "~0.2.5" - }, - "directories": { - "example": "example", - "test": "test" - }, - "dist": { - "shasum": "fedd4d2bf193a77745fe71e371d73c3307d9c751", - "tarball": "https://registry.npmjs.org/parents/-/parents-1.0.1.tgz" - }, - "engine": { - "node": ">=0.6" - }, - "gitHead": "1a90e0b70695f08e3eab32be2f1a867b4bbe6880", - "homepage": "https://github.com/substack/node-parents", - "keywords": [ - "directory", - "parent", - "path", - "tree" - ], - "license": "MIT", - "main": "index.js", - "maintainers": [ - { - "name": "substack", - "email": "mail@substack.net" - } - ], - "name": "parents", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git://github.com/substack/node-parents.git" - }, - "scripts": { - "test": "tap test/*.js" - }, - "version": "1.0.1" -} diff --git a/node_modules/parents/readme.markdown b/node_modules/parents/readme.markdown deleted file mode 100644 index fe3bc1f0..00000000 --- a/node_modules/parents/readme.markdown +++ /dev/null @@ -1,75 +0,0 @@ -# parents - -Return all the parent directories of a directory, inclusive of that directory. - -[![build status](https://secure.travis-ci.org/substack/node-parents.png)](http://travis-ci.org/substack/node-parents) - -# example - -## dirname - -``` js -var parents = require('parents'); -var dirs = parents(__dirname); -console.dir(dirs); -``` - -*** - -``` -[ '/home/substack/projects/node-parents/example', - '/home/substack/projects/node-parents', - '/home/substack/projects', - '/home/substack', - '/home', - '/' ] -``` - -## win32 - -``` js -var parents = require('parents'); -var dir = 'C:\\Program Files\\Maxis\\Sim City 2000\\cities'; - -var dirs = parents(dir, { platform : 'win32' }); -console.dir(dirs); -``` - -*** - -``` -[ 'C:\\Program Files\\Maxis\\Sim City 2000\\cities', - 'C:\\Program Files\\Maxis\\Sim City 2000', - 'C:\\Program Files\\Maxis', - 'C:\\Program Files', - 'C:' ] -``` - -# methods - -``` js -var parents = require('parents') -``` - -## parents(dir, opts) - -Return an array of the parent directories of `dir`, including and starting with -`dir`. If a `dir` isn't specified, `process.cwd()` will be used. - -Optionally specify an `opts.platform` to control whether the separator and paths -works the unixy way with `'/'` or the windowsy way where sometimes things use -`'/'` and sometimes they use `'\\'` and also there are leading drive letters and -other exotic features. If `opts.platform` isn't specified, `process.platform` -will be used. Anything that matches `/^win/` will use the windowsy behavior. - -# install - -With [npm](http://npmjs.org) do: - -``` -npm install parents -``` - -# licence - -MIT diff --git a/node_modules/parents/test/dirname.js b/node_modules/parents/test/dirname.js deleted file mode 100644 index 317d131c..00000000 --- a/node_modules/parents/test/dirname.js +++ /dev/null @@ -1,20 +0,0 @@ -var test = require('tap').test; -var parents = require('../'); - -test('dirname', function (t) { - var dirs = parents('/foo/bar/baz/quux'); - t.same(dirs, [ - '/foo/bar/baz/quux', - '/foo/bar/baz', - '/foo/bar', - '/foo', - '/', - ]); - t.end(); -}); - -test('root', function (t) { - var dirs = parents('/'); - t.same(dirs, [ '/' ]); - t.end(); -}); diff --git a/node_modules/parents/test/win32.js b/node_modules/parents/test/win32.js deleted file mode 100644 index c6f2ece8..00000000 --- a/node_modules/parents/test/win32.js +++ /dev/null @@ -1,34 +0,0 @@ -var test = require('tap').test; -var parents = require('../'); - -test('win32', function (t) { - var dir = 'c:\\Program Files\\Maxis\\Sim City 2000\\cities'; - var dirs = parents(dir, { platform : 'win32' }); - t.same(dirs, [ - 'c:\\Program Files\\Maxis\\Sim City 2000\\cities', - 'c:\\Program Files\\Maxis\\Sim City 2000', - 'c:\\Program Files\\Maxis', - 'c:\\Program Files', - 'c:', - ]); - t.end(); -}); - -test('win32 c:', function (t) { - var dirs = parents('c:\\', { platform : 'win32' }); - t.same(dirs, [ 'c:' ]); - t.end(); -}); - -test('win32 network drive', function (t) { - var dirs = parents( - '\\storageserver01\\Active Projects\\ProjectA', - { platform : 'win32' } - ); - t.same(dirs, [ - '\\storageserver01\\Active Projects\\ProjectA', - '\\storageserver01\\Active Projects', - '\\storageserver01' - ]); - t.end(); -}); diff --git a/node_modules/parse-asn1/.npmignore b/node_modules/parse-asn1/.npmignore deleted file mode 100644 index 4ebc8aea..00000000 --- a/node_modules/parse-asn1/.npmignore +++ /dev/null @@ -1 +0,0 @@ -coverage diff --git a/node_modules/parse-asn1/.travis.yml b/node_modules/parse-asn1/.travis.yml deleted file mode 100644 index ea321ccc..00000000 --- a/node_modules/parse-asn1/.travis.yml +++ /dev/null @@ -1,9 +0,0 @@ -sudo: false -language: node_js -node_js: - - "0.12" - - "iojs" -env: - - TEST_SUITE=standard - - TEST_SUITE=unit -script: "npm run-script $TEST_SUITE" diff --git a/node_modules/parse-asn1/README.md b/node_modules/parse-asn1/README.md deleted file mode 100644 index 89ed0746..00000000 --- a/node_modules/parse-asn1/README.md +++ /dev/null @@ -1,8 +0,0 @@ -#parse-asn1 - -[![TRAVIS](https://secure.travis-ci.org/crypto-browserify/parse-asn1.png)](http://travis-ci.org/crypto-browserify/parse-asn1) -[![NPM](http://img.shields.io/npm/v/parse-asn1.svg)](https://www.npmjs.org/package/parse-asn1) - -[![js-standard-style](https://cdn.rawgit.com/feross/standard/master/badge.svg)](https://github.com/feross/standard) - -utility library for parsing asn1 files for use with browserify-sign. diff --git a/node_modules/parse-asn1/aesid.json b/node_modules/parse-asn1/aesid.json deleted file mode 100644 index 24f653b4..00000000 --- a/node_modules/parse-asn1/aesid.json +++ /dev/null @@ -1,13 +0,0 @@ -{"2.16.840.1.101.3.4.1.1": "aes-128-ecb", -"2.16.840.1.101.3.4.1.2": "aes-128-cbc", -"2.16.840.1.101.3.4.1.3": "aes-128-ofb", -"2.16.840.1.101.3.4.1.4": "aes-128-cfb", -"2.16.840.1.101.3.4.1.21": "aes-192-ecb", -"2.16.840.1.101.3.4.1.22": "aes-192-cbc", -"2.16.840.1.101.3.4.1.23": "aes-192-ofb", -"2.16.840.1.101.3.4.1.24": "aes-192-cfb", -"2.16.840.1.101.3.4.1.41": "aes-256-ecb", -"2.16.840.1.101.3.4.1.42": "aes-256-cbc", -"2.16.840.1.101.3.4.1.43": "aes-256-ofb", -"2.16.840.1.101.3.4.1.44": "aes-256-cfb" -} \ No newline at end of file diff --git a/node_modules/parse-asn1/asn1.js b/node_modules/parse-asn1/asn1.js deleted file mode 100644 index cb2fcfce..00000000 --- a/node_modules/parse-asn1/asn1.js +++ /dev/null @@ -1,117 +0,0 @@ -// from https://github.com/indutny/self-signed/blob/gh-pages/lib/asn1.js -// Fedor, you are amazing. - -var asn1 = require('asn1.js') - -var RSAPrivateKey = asn1.define('RSAPrivateKey', function () { - this.seq().obj( - this.key('version').int(), - this.key('modulus').int(), - this.key('publicExponent').int(), - this.key('privateExponent').int(), - this.key('prime1').int(), - this.key('prime2').int(), - this.key('exponent1').int(), - this.key('exponent2').int(), - this.key('coefficient').int() - ) -}) -exports.RSAPrivateKey = RSAPrivateKey - -var RSAPublicKey = asn1.define('RSAPublicKey', function () { - this.seq().obj( - this.key('modulus').int(), - this.key('publicExponent').int() - ) -}) -exports.RSAPublicKey = RSAPublicKey - -var PublicKey = asn1.define('SubjectPublicKeyInfo', function () { - this.seq().obj( - this.key('algorithm').use(AlgorithmIdentifier), - this.key('subjectPublicKey').bitstr() - ) -}) -exports.PublicKey = PublicKey - -var AlgorithmIdentifier = asn1.define('AlgorithmIdentifier', function () { - this.seq().obj( - this.key('algorithm').objid(), - this.key('none').null_().optional(), - this.key('curve').objid().optional(), - this.key('params').seq().obj( - this.key('p').int(), - this.key('q').int(), - this.key('g').int() - ).optional() - ) -}) - -var PrivateKeyInfo = asn1.define('PrivateKeyInfo', function () { - this.seq().obj( - this.key('version').int(), - this.key('algorithm').use(AlgorithmIdentifier), - this.key('subjectPrivateKey').octstr() - ) -}) -exports.PrivateKey = PrivateKeyInfo -var EncryptedPrivateKeyInfo = asn1.define('EncryptedPrivateKeyInfo', function () { - this.seq().obj( - this.key('algorithm').seq().obj( - this.key('id').objid(), - this.key('decrypt').seq().obj( - this.key('kde').seq().obj( - this.key('id').objid(), - this.key('kdeparams').seq().obj( - this.key('salt').octstr(), - this.key('iters').int() - ) - ), - this.key('cipher').seq().obj( - this.key('algo').objid(), - this.key('iv').octstr() - ) - ) - ), - this.key('subjectPrivateKey').octstr() - ) -}) - -exports.EncryptedPrivateKey = EncryptedPrivateKeyInfo - -var DSAPrivateKey = asn1.define('DSAPrivateKey', function () { - this.seq().obj( - this.key('version').int(), - this.key('p').int(), - this.key('q').int(), - this.key('g').int(), - this.key('pub_key').int(), - this.key('priv_key').int() - ) -}) -exports.DSAPrivateKey = DSAPrivateKey - -exports.DSAparam = asn1.define('DSAparam', function () { - this.int() -}) -var ECPrivateKey = asn1.define('ECPrivateKey', function () { - this.seq().obj( - this.key('version').int(), - this.key('privateKey').octstr(), - this.key('parameters').optional().explicit(0).use(ECParameters), - this.key('publicKey').optional().explicit(1).bitstr() - ) -}) -exports.ECPrivateKey = ECPrivateKey -var ECParameters = asn1.define('ECParameters', function () { - this.choice({ - namedCurve: this.objid() - }) -}) - -exports.signature = asn1.define('signature', function () { - this.seq().obj( - this.key('r').int(), - this.key('s').int() - ) -}) diff --git a/node_modules/parse-asn1/fixProc.js b/node_modules/parse-asn1/fixProc.js deleted file mode 100644 index 5c4085ee..00000000 --- a/node_modules/parse-asn1/fixProc.js +++ /dev/null @@ -1,30 +0,0 @@ -// adapted from https://github.com/apatil/pemstrip -var findProc = /Proc-Type: 4,ENCRYPTED\r?\nDEK-Info: AES-((?:128)|(?:192)|(?:256))-CBC,([0-9A-H]+)\r?\n\r?\n([0-9A-z\n\r\+\/\=]+)\r?\n/m -var startRegex = /^-----BEGIN (.*) KEY-----\r?\n/m -var fullRegex = /^-----BEGIN (.*) KEY-----\r?\n([0-9A-z\n\r\+\/\=]+)\r?\n-----END \1 KEY-----$/m -var evp = require('evp_bytestokey') -var ciphers = require('browserify-aes') -module.exports = function (okey, password) { - var key = okey.toString() - var match = key.match(findProc) - var decrypted - if (!match) { - var match2 = key.match(fullRegex) - decrypted = new Buffer(match2[2].replace(/\r?\n/g, ''), 'base64') - } else { - var suite = 'aes' + match[1] - var iv = new Buffer(match[2], 'hex') - var cipherText = new Buffer(match[3].replace(/\r?\n/g, ''), 'base64') - var cipherKey = evp(password, iv.slice(0, 8), parseInt(match[1], 10)).key - var out = [] - var cipher = ciphers.createDecipheriv(suite, cipherKey, iv) - out.push(cipher.update(cipherText)) - out.push(cipher.final()) - decrypted = Buffer.concat(out) - } - var tag = key.match(startRegex)[1] + ' KEY' - return { - tag: tag, - data: decrypted - } -} diff --git a/node_modules/parse-asn1/index.js b/node_modules/parse-asn1/index.js deleted file mode 100644 index 5cc79677..00000000 --- a/node_modules/parse-asn1/index.js +++ /dev/null @@ -1,101 +0,0 @@ -var asn1 = require('./asn1') -var aesid = require('./aesid.json') -var fixProc = require('./fixProc') -var ciphers = require('browserify-aes') -var compat = require('pbkdf2') -module.exports = parseKeys - -function parseKeys (buffer) { - var password - if (typeof buffer === 'object' && !Buffer.isBuffer(buffer)) { - password = buffer.passphrase - buffer = buffer.key - } - if (typeof buffer === 'string') { - buffer = new Buffer(buffer) - } - - var stripped = fixProc(buffer, password) - - var type = stripped.tag - var data = stripped.data - var subtype, ndata - switch (type) { - case 'PUBLIC KEY': - ndata = asn1.PublicKey.decode(data, 'der') - subtype = ndata.algorithm.algorithm.join('.') - switch (subtype) { - case '1.2.840.113549.1.1.1': - return asn1.RSAPublicKey.decode(ndata.subjectPublicKey.data, 'der') - case '1.2.840.10045.2.1': - ndata.subjectPrivateKey = ndata.subjectPublicKey - return { - type: 'ec', - data: ndata - } - case '1.2.840.10040.4.1': - ndata.algorithm.params.pub_key = asn1.DSAparam.decode(ndata.subjectPublicKey.data, 'der') - return { - type: 'dsa', - data: ndata.algorithm.params - } - default: throw new Error('unknown key id ' + subtype) - } - throw new Error('unknown key type ' + type) - case 'ENCRYPTED PRIVATE KEY': - data = asn1.EncryptedPrivateKey.decode(data, 'der') - data = decrypt(data, password) - // falls through - case 'PRIVATE KEY': - ndata = asn1.PrivateKey.decode(data, 'der') - subtype = ndata.algorithm.algorithm.join('.') - switch (subtype) { - case '1.2.840.113549.1.1.1': - return asn1.RSAPrivateKey.decode(ndata.subjectPrivateKey, 'der') - case '1.2.840.10045.2.1': - return { - curve: ndata.algorithm.curve, - privateKey: asn1.ECPrivateKey.decode(ndata.subjectPrivateKey, 'der').privateKey - } - case '1.2.840.10040.4.1': - ndata.algorithm.params.priv_key = asn1.DSAparam.decode(ndata.subjectPrivateKey, 'der') - return { - type: 'dsa', - params: ndata.algorithm.params - } - default: throw new Error('unknown key id ' + subtype) - } - throw new Error('unknown key type ' + type) - case 'RSA PUBLIC KEY': - return asn1.RSAPublicKey.decode(data, 'der') - case 'RSA PRIVATE KEY': - return asn1.RSAPrivateKey.decode(data, 'der') - case 'DSA PRIVATE KEY': - return { - type: 'dsa', - params: asn1.DSAPrivateKey.decode(data, 'der') - } - case 'EC PRIVATE KEY': - data = asn1.ECPrivateKey.decode(data, 'der') - return { - curve: data.parameters.value, - privateKey: data.privateKey - } - default: throw new Error('unknown key type ' + type) - } -} -parseKeys.signature = asn1.signature -function decrypt (data, password) { - var salt = data.algorithm.decrypt.kde.kdeparams.salt - var iters = parseInt(data.algorithm.decrypt.kde.kdeparams.iters.toString(), 10) - var algo = aesid[data.algorithm.decrypt.cipher.algo.join('.')] - var iv = data.algorithm.decrypt.cipher.iv - var cipherText = data.subjectPrivateKey - var keylen = parseInt(algo.split('-')[1], 10) / 8 - var key = compat.pbkdf2Sync(password, salt, iters, keylen) - var cipher = ciphers.createDecipheriv(algo, key, iv) - var out = [] - out.push(cipher.update(cipherText)) - out.push(cipher.final()) - return Buffer.concat(out) -} diff --git a/node_modules/parse-asn1/package.json b/node_modules/parse-asn1/package.json deleted file mode 100644 index e44773d4..00000000 --- a/node_modules/parse-asn1/package.json +++ /dev/null @@ -1,106 +0,0 @@ -{ - "_args": [ - [ - { - "raw": "parse-asn1@^5.0.0", - "scope": null, - "escapedName": "parse-asn1", - "name": "parse-asn1", - "rawSpec": "^5.0.0", - "spec": ">=5.0.0 <6.0.0", - "type": "range" - }, - "/Users/benjaminarias/Desktop/poly/node_modules/browserify-sign" - ] - ], - "_from": "parse-asn1@>=5.0.0 <6.0.0", - "_id": "parse-asn1@5.0.0", - "_inCache": true, - "_installable": true, - "_location": "/parse-asn1", - "_nodeVersion": "4.2.1", - "_npmUser": { - "name": "cwmma", - "email": "calvin.metcalf@gmail.com" - }, - "_npmVersion": "2.9.0", - "_phantomChildren": {}, - "_requested": { - "raw": "parse-asn1@^5.0.0", - "scope": null, - "escapedName": "parse-asn1", - "name": "parse-asn1", - "rawSpec": "^5.0.0", - "spec": ">=5.0.0 <6.0.0", - "type": "range" - }, - "_requiredBy": [ - "/browserify-sign", - "/public-encrypt" - ], - "_resolved": "https://registry.npmjs.org/parse-asn1/-/parse-asn1-5.0.0.tgz", - "_shasum": "35060f6d5015d37628c770f4e091a0b5a278bc23", - "_shrinkwrap": null, - "_spec": "parse-asn1@^5.0.0", - "_where": "/Users/benjaminarias/Desktop/poly/node_modules/browserify-sign", - "author": "", - "bugs": { - "url": "https://github.com/crypto-browserify/parse-asn1/issues" - }, - "dependencies": { - "asn1.js": "^4.0.0", - "browserify-aes": "^1.0.0", - "create-hash": "^1.1.0", - "evp_bytestokey": "^1.0.0", - "pbkdf2": "^3.0.3" - }, - "description": "[![TRAVIS](https://secure.travis-ci.org/crypto-browserify/parse-asn1.png)](http://travis-ci.org/crypto-browserify/parse-asn1) [![NPM](http://img.shields.io/npm/v/parse-asn1.svg)](https://www.npmjs.org/package/parse-asn1)", - "devDependencies": { - "standard": "^5.0.0", - "tape": "^3.4.0" - }, - "directories": {}, - "dist": { - "shasum": "35060f6d5015d37628c770f4e091a0b5a278bc23", - "tarball": "https://registry.npmjs.org/parse-asn1/-/parse-asn1-5.0.0.tgz" - }, - "gitHead": "eb88523b7c6dc896a407b896bba470218fde70b4", - "homepage": "https://github.com/crypto-browserify/parse-asn1#readme", - "license": "ISC", - "main": "index.js", - "maintainers": [ - { - "name": "cwmma", - "email": "calvin.metcalf@gmail.com" - }, - { - "name": "dcousens", - "email": "email@dcousens.com" - }, - { - "name": "dominictarr", - "email": "dominic.tarr@gmail.com" - }, - { - "name": "jprichardson", - "email": "jprichardson@gmail.com" - }, - { - "name": "indutny", - "email": "fedor@indutny.com" - } - ], - "name": "parse-asn1", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git://github.com/crypto-browserify/parse-asn1.git" - }, - "scripts": { - "standard": "standard", - "test": "npm run standard && npm run unit", - "unit": "node ./test" - }, - "version": "5.0.0" -} diff --git a/node_modules/parse-asn1/test/1024.priv b/node_modules/parse-asn1/test/1024.priv deleted file mode 100644 index 72062169..00000000 --- a/node_modules/parse-asn1/test/1024.priv +++ /dev/null @@ -1,16 +0,0 @@ ------BEGIN PRIVATE KEY----- -MIICdwIBADANBgkqhkiG9w0BAQEFAASCAmEwggJdAgEAAoGBAKulUTZ8B1qccZ8c -DXRGSY08gW8KvLlcxxxGC4gZHNT3CBUF8n5R4KE30aZyYZ/rtsQZu05juZJxaJ0q -mbe75dlQ5d+Xc9BMXeQg/MpTZw5TAN7OIdGYYpFBe+1PLZ6wEfjkYrMqMUcfq2Lq -hTLdAbvBJnuRcYZLqmBeOQ8FTrKrAgMBAAECgYEAnkHRbEPU3/WISSQrP36iyCb2 -S/SBZwKkzmvCrBxDWhPeDswp9c/2JY76rNWfLzy8iXgUG8WUzvHje61Qh3gmBcKe -bUaTGl4Vy8Ha1YBADo5RfRrdm0FE4tvgvu/TkqFqpBBZweu54285hk5zlG7n/D7Y -dnNXUpu5MlNb5x3gW0kCQQDUL//cwcXUxY/evaJP4jSe+ZwEQZo+zXRLiPUulBoV -aw28CVMuxdgwqAo1X1IKefPeUaf7RQu8gCKaRnpGuEuXAkEAzxZTfMmvmCUDIew4 -5Gk6bK265XQWdhcgiq254lpBGOYmDj9yCE7yA+zmASQwMsXTdQOi1hOCEyrXuSJ5 -c++EDQJAFh3WrnzoEPByuYXMmET8tSFRWMQ5vpgNqh3haHR5b4gUC2hxaiunCBNL -1RpVY9AoUiDywGcG/SPh93CnKB3niwJBAKP7AtsifZgVXtiizB4aMThTjVYaSZrz -D0Kg9DuHylpkDChmFu77TGrNUQgAVuYtfhb/bRblVa/F0hJ4eQHT3JUCQBVT68tb -OgRUk0aP9tC3021VN82X6+klowSQN8oBPX8+TfDWSUilp/+j24Hky+Z29Do7yR/R -qutnL92CvBlVLV4= ------END PRIVATE KEY----- diff --git a/node_modules/parse-asn1/test/1024.pub b/node_modules/parse-asn1/test/1024.pub deleted file mode 100644 index 2dba785d..00000000 --- a/node_modules/parse-asn1/test/1024.pub +++ /dev/null @@ -1,6 +0,0 @@ ------BEGIN PUBLIC KEY----- -MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCrpVE2fAdanHGfHA10RkmNPIFv -Cry5XMccRguIGRzU9wgVBfJ+UeChN9GmcmGf67bEGbtOY7mScWidKpm3u+XZUOXf -l3PQTF3kIPzKU2cOUwDeziHRmGKRQXvtTy2esBH45GKzKjFHH6ti6oUy3QG7wSZ7 -kXGGS6pgXjkPBU6yqwIDAQAB ------END PUBLIC KEY----- diff --git a/node_modules/parse-asn1/test/dsa.1024.priv b/node_modules/parse-asn1/test/dsa.1024.priv deleted file mode 100644 index 1145b7d7..00000000 --- a/node_modules/parse-asn1/test/dsa.1024.priv +++ /dev/null @@ -1,18 +0,0 @@ ------BEGIN DSA PARAMETERS----- -MIIBHgKBgQDdFg3WQmpOZxObxraIe4rrbUhrBw99fbnz99IvLj60sM/7Uk7eHYvp -UrPaJBIcjPy68BjV4ekDljuPpFoAorsLzyvVSHuNvN6I/bRGm1TCOjDFVe98Oz6k -XmI6pRfIF0TiIPXkel/sWIfBYa1lqdoW82h9FIjhbxVHrKGfvMEc9wIVAOzmJHec -s6yBm+nE3+OmpWFYj0ylAoGAYxO6mFSoIY7PDRyRzKJEnULSzYXd3FoMkPwDCd5I -ch/piIoAUIIQ542TL54GT9wuiCL+0D48qi9GWKasPZABfPQ008WOzmKzD8ncrUTd -a7pzvUvdmwldA4Aa5/5xSXwtpK+DDye7KPlu+oi1BF6uj4TgfeGr1uxouxC2WhBE -qH0= ------END DSA PARAMETERS----- ------BEGIN PRIVATE KEY----- -MIIBSwIBADCCASwGByqGSM44BAEwggEfAoGBAOY0KsTt5EpJ4LtlD3xRS5mDiGE1 -CMNp0S9X0sK8kP8Aps8iYwMLbZYglk18GCNnCk4SjbAnZHSB3kaIv6AKQc2J8W2Y -V5se3VhpKOFst7bqRtkGsl8uJtGlKTiXNclkv2jsKOrsBokSD1USGCECTNeMt3Og -ziRcZ1dS+djSOZ2nAhUAzB96SpxlAak+K/QLVJ+lDe5DcY0CgYEAtxX1/Hckvhlh -HQyKZWLQsDfZBILbhc+OLDpOyT6cJS/sJzfFIYZgK5M3rOS4OmzdYfJccQAuGq+T -VJQ3VcYOdbrIANJV8CDrn4jkkejTzJI6fCwAkPWOyxw8kbV1Hsoy6WLfSCHKpBUc -rogAqRGESqBVTawjyF/ECX667y/P49MEFgIUSeRVRgAXsLmeWR/V4Rh9Hex+9+s= ------END PRIVATE KEY----- diff --git a/node_modules/parse-asn1/test/dsa.1024.pub b/node_modules/parse-asn1/test/dsa.1024.pub deleted file mode 100644 index 80a731ea..00000000 --- a/node_modules/parse-asn1/test/dsa.1024.pub +++ /dev/null @@ -1,12 +0,0 @@ ------BEGIN PUBLIC KEY----- -MIIBtzCCASwGByqGSM44BAEwggEfAoGBAOY0KsTt5EpJ4LtlD3xRS5mDiGE1CMNp -0S9X0sK8kP8Aps8iYwMLbZYglk18GCNnCk4SjbAnZHSB3kaIv6AKQc2J8W2YV5se -3VhpKOFst7bqRtkGsl8uJtGlKTiXNclkv2jsKOrsBokSD1USGCECTNeMt3OgziRc -Z1dS+djSOZ2nAhUAzB96SpxlAak+K/QLVJ+lDe5DcY0CgYEAtxX1/HckvhlhHQyK -ZWLQsDfZBILbhc+OLDpOyT6cJS/sJzfFIYZgK5M3rOS4OmzdYfJccQAuGq+TVJQ3 -VcYOdbrIANJV8CDrn4jkkejTzJI6fCwAkPWOyxw8kbV1Hsoy6WLfSCHKpBUcrogA -qRGESqBVTawjyF/ECX667y/P49MDgYQAAoGAXYmxO4+52C1gBzh7GgTwNLJl7bLn -gOhKTFlKhT36VjMjeFfdXmBVBVbfUottKZby/gVX1IXT38PStB/dswbF45bGDdoS -zMFjYmHTtLtrU/4hReVtvb5MYmrPDFX58SwcSRRO/cH6WJPvfu4Aq0cJZA9Kb0B9 -5Wo18JxAqvPtTB8= ------END PUBLIC KEY----- diff --git a/node_modules/parse-asn1/test/dsa.2048.priv b/node_modules/parse-asn1/test/dsa.2048.priv deleted file mode 100644 index 2a77c2ee..00000000 --- a/node_modules/parse-asn1/test/dsa.2048.priv +++ /dev/null @@ -1,20 +0,0 @@ ------BEGIN DSA PRIVATE KEY----- -MIIDVQIBAAKCAQEA0jDs9lLWX//NXYE1kNKw4UiDVMHHEtTF1OzJvBJvUh3/xMlU -ic8mUpIMU5mt7BTjcijyLLl/TeNBcI/xDvWH3PAfCjP1CmNzOMHwU6wKA4Q20m5v -zjauVycd7loRm5h+1XyD2JL1KmQTzhIIRAmRTeXMnr8LAHidYfUKmzCOCCrnctlE -EOh1S6e7BFxQBRrlUxZF0LTjcAz31rrjIH6wKkYR4mnpGuI2vVJ+qHGmEhvq1hAb -DvP0GN0iofxHlIVqOlfXYCZO388ZabfcBOQG57tTofm8aS4pnXCgbok9wEYPgbU5 -n6fEvDGOOObQyY109hZZaDJmfygr5mmD0TIXrQIhAMVBhV4liqAN2MrT/+ZUH6hY -+DhTazzSNLIZKQ5gfd+1AoIBADqHGUVQa9pbwyjbzooeWdijUM9W5P7UUj1OjrA0 -HIkcx37qHiYOVFqHpbjDs3tbgRBxBX5zBpwuhywC/6OetDiqzDy7zZCV/YMn06d2 -ncW2Ctjp3KPl7of39+HgXXePgTdKcfkjH9upJQTko88rA4NWwZbHYeA3Lv7DcA11 -XY3+TQHcxMtxf/E6aePjANJBsJsQjYLy3WyUiS87jkgi0Bigjg/cD3Nel4LToCTR -JvQ4m3w3T4W0xL1+8nPjRZ2q0GgmxZzPfwALrwiSYMgGZC/ov43wqOs6WXs0NnpJ -moU4oxutC/uDvTZmJvRj77FINjK0ZA20jmNvWmTIeEm1Xn4CggEABeRpOymQS5IS -X+u9ya7C+P3MPIRGm4dcWPWgPpD1QcclNYLGnhRp7JazNsbbPMjnx1qtF+2qjfy9 -JDeWTAR8qfCNVmQHPAhJsJtV0C/V4PUii71FRNPVC3EAYbcBk8deMGoUg99cxSac -6MCxIIOxuUKWpw8XPlMVpuXc8+lIMTYCPeLGinmT4DQ573t0MS6U3Ck/987xjkH9 -sos7zcYn3vnjywDCxXMidC0eUK1rxAAuY7PL4vQiKwXq8kFtWiKAnns/Zm5LTjiZ -NrwlhNlU2wQVvyIcKaGfSRPheb69IbP+9qp5b7Xe7DNWdo48S0jl2KAFeZ91BnhM -TH6WPtMpjQIgOaTTn6xYK0kZvvH3lZXrzkjp4aNlNY65R0JAKKNsx3s= ------END DSA PRIVATE KEY----- diff --git a/node_modules/parse-asn1/test/dsa.2048.pub b/node_modules/parse-asn1/test/dsa.2048.pub deleted file mode 100644 index 9f6cac1c..00000000 --- a/node_modules/parse-asn1/test/dsa.2048.pub +++ /dev/null @@ -1,20 +0,0 @@ ------BEGIN PUBLIC KEY----- -MIIDRjCCAjkGByqGSM44BAEwggIsAoIBAQDSMOz2UtZf/81dgTWQ0rDhSINUwccS -1MXU7Mm8Em9SHf/EyVSJzyZSkgxTma3sFONyKPIsuX9N40Fwj/EO9Yfc8B8KM/UK -Y3M4wfBTrAoDhDbSbm/ONq5XJx3uWhGbmH7VfIPYkvUqZBPOEghECZFN5cyevwsA -eJ1h9QqbMI4IKudy2UQQ6HVLp7sEXFAFGuVTFkXQtONwDPfWuuMgfrAqRhHiaeka -4ja9Un6ocaYSG+rWEBsO8/QY3SKh/EeUhWo6V9dgJk7fzxlpt9wE5Abnu1Oh+bxp -LimdcKBuiT3ARg+BtTmfp8S8MY445tDJjXT2FlloMmZ/KCvmaYPRMhetAiEAxUGF -XiWKoA3YytP/5lQfqFj4OFNrPNI0shkpDmB937UCggEAOocZRVBr2lvDKNvOih5Z -2KNQz1bk/tRSPU6OsDQciRzHfuoeJg5UWoeluMOze1uBEHEFfnMGnC6HLAL/o560 -OKrMPLvNkJX9gyfTp3adxbYK2Onco+Xuh/f34eBdd4+BN0px+SMf26klBOSjzysD -g1bBlsdh4Dcu/sNwDXVdjf5NAdzEy3F/8Tpp4+MA0kGwmxCNgvLdbJSJLzuOSCLQ -GKCOD9wPc16XgtOgJNEm9DibfDdPhbTEvX7yc+NFnarQaCbFnM9/AAuvCJJgyAZk -L+i/jfCo6zpZezQ2ekmahTijG60L+4O9NmYm9GPvsUg2MrRkDbSOY29aZMh4SbVe -fgOCAQUAAoIBAAXkaTspkEuSEl/rvcmuwvj9zDyERpuHXFj1oD6Q9UHHJTWCxp4U -aeyWszbG2zzI58darRftqo38vSQ3lkwEfKnwjVZkBzwISbCbVdAv1eD1Iou9RUTT -1QtxAGG3AZPHXjBqFIPfXMUmnOjAsSCDsblClqcPFz5TFabl3PPpSDE2Aj3ixop5 -k+A0Oe97dDEulNwpP/fO8Y5B/bKLO83GJ97548sAwsVzInQtHlCta8QALmOzy+L0 -IisF6vJBbVoigJ57P2ZuS044mTa8JYTZVNsEFb8iHCmhn0kT4Xm+vSGz/vaqeW+1 -3uwzVnaOPEtI5digBXmfdQZ4TEx+lj7TKY0= ------END PUBLIC KEY----- diff --git a/node_modules/parse-asn1/test/ec.pass.priv b/node_modules/parse-asn1/test/ec.pass.priv deleted file mode 100644 index bf1836d5..00000000 --- a/node_modules/parse-asn1/test/ec.pass.priv +++ /dev/null @@ -1,7 +0,0 @@ ------BEGIN ENCRYPTED PRIVATE KEY----- -MIHeMEkGCSqGSIb3DQEFDTA8MBsGCSqGSIb3DQEFDDAOBAi9LqZQx4JFXAICCAAw -HQYJYIZIAWUDBAECBBA+js1fG4Rv/yRN7oZvxbgyBIGQ/D4yj86M1x8lMsnAHQ/K -7/ryb/baDNHqN9LTZanEGBuyxgrTzt08SiL+h91yFGMoaly029K1VgEI8Lxu5Np/ -A+LK7ewh73ABzsbuxYdcXI+rKnrvLN9Tt6veDs4GlqTTsWwq5wF0C+6gaYRBXA74 -T1b6NykGh2UNL5U5pHZEYdOVLz+lRJL7gYqlweNHP/S3 ------END ENCRYPTED PRIVATE KEY----- diff --git a/node_modules/parse-asn1/test/ec.priv b/node_modules/parse-asn1/test/ec.priv deleted file mode 100644 index 25fffbd8..00000000 --- a/node_modules/parse-asn1/test/ec.priv +++ /dev/null @@ -1,5 +0,0 @@ ------BEGIN EC PRIVATE KEY----- -MHQCAQEEIDF6Xv8Sv//wGUWD+c780ppGrU0QdZWCAzxAQPQX8r/uoAcGBSuBBAAK -oUQDQgAEIZeowDylls4K/wfBjO18bYo7gGx8nYQRija4e/qEMikOHJai7geeUreU -r5Xky/Ax7s2dGtegsPNsPgGe5MpQvg== ------END EC PRIVATE KEY----- diff --git a/node_modules/parse-asn1/test/ec.pub b/node_modules/parse-asn1/test/ec.pub deleted file mode 100644 index 2e39e5bb..00000000 --- a/node_modules/parse-asn1/test/ec.pub +++ /dev/null @@ -1,4 +0,0 @@ ------BEGIN PUBLIC KEY----- -MFYwEAYHKoZIzj0CAQYFK4EEAAoDQgAEIZeowDylls4K/wfBjO18bYo7gGx8nYQR -ija4e/qEMikOHJai7geeUreUr5Xky/Ax7s2dGtegsPNsPgGe5MpQvg== ------END PUBLIC KEY----- diff --git a/node_modules/parse-asn1/test/index.js b/node_modules/parse-asn1/test/index.js deleted file mode 100644 index 4d160302..00000000 --- a/node_modules/parse-asn1/test/index.js +++ /dev/null @@ -1,92 +0,0 @@ -var test = require('tape') -var fs = require('fs') -var parseKey = require('../') -var crypto = require('crypto') -var rsa1024 = { - private: fs.readFileSync(__dirname + '/rsa.1024.priv'), - public: fs.readFileSync(__dirname + '/rsa.1024.pub') -} -var rsa2028 = { - private: fs.readFileSync(__dirname + '/rsa.2028.priv'), - public: fs.readFileSync(__dirname + '/rsa.2028.pub') -} -var nonrsa1024 = { - private: fs.readFileSync(__dirname + '/1024.priv'), - public: fs.readFileSync(__dirname + '/1024.pub') -} -var pass1024 = { - private: { - passphrase: 'fooo', - key: fs.readFileSync(__dirname + '/pass.1024.priv') - }, - public: fs.readFileSync(__dirname + '/pass.1024.pub') -} -var ec = { - private: fs.readFileSync(__dirname + '/ec.priv'), - public: fs.readFileSync(__dirname + '/ec.pub') -} -var ecpass = { - private: { - key: fs.readFileSync(__dirname + '/ec.pass.priv'), - passphrase: 'bard' - }, - public: fs.readFileSync(__dirname + '/ec.pub') -} -var dsa = { - private: fs.readFileSync(__dirname + '/dsa.1024.priv'), - public: fs.readFileSync(__dirname + '/dsa.1024.pub') -} -var dsa2 = { - private: fs.readFileSync(__dirname + '/dsa.2048.priv'), - public: fs.readFileSync(__dirname + '/dsa.2048.pub') -} -var dsapass = { - private: { - key: fs.readFileSync(__dirname + '/pass.dsa.1024.priv'), - passphrase: 'password' - }, - public: fs.readFileSync(__dirname + '/pass.dsa.1024.pub') -} -var dsapass2 = { - private: { - key: fs.readFileSync(__dirname + '/pass2.dsa.1024.priv'), - passphrase: 'password' - }, - public: fs.readFileSync(__dirname + '/pass2.dsa.1024.pub') -} -var rsapass = { - private: { - key: fs.readFileSync(__dirname + '/pass.rsa.1024.priv'), - passphrase: 'password' - }, - public: fs.readFileSync(__dirname + '/pass.rsa.1024.pub') -} -var rsapass2 = { - private: { - key: fs.readFileSync(__dirname + '/pass.rsa.2028.priv'), - passphrase: 'password' - }, - public: fs.readFileSync(__dirname + '/pass.rsa.2028.pub') -} -var i = 0 -function testIt (keys) { - test('key ' + (++i), function (t) { - t.plan(2) - t.ok(parseKey(keys.public, crypto), 'public key') - t.ok(parseKey(keys.private, crypto), 'private key') - }) -} - -testIt(dsa) -testIt(dsa2) -testIt(rsa1024) -testIt(ec) -testIt(rsa2028) -testIt(nonrsa1024) -testIt(ecpass) -testIt(dsapass) -testIt(dsapass2) -testIt(rsapass) -testIt(rsapass2) -testIt(pass1024) -testIt(pass1024) diff --git a/node_modules/parse-asn1/test/pass.1024.priv b/node_modules/parse-asn1/test/pass.1024.priv deleted file mode 100644 index b9f38845..00000000 --- a/node_modules/parse-asn1/test/pass.1024.priv +++ /dev/null @@ -1,18 +0,0 @@ ------BEGIN ENCRYPTED PRIVATE KEY----- -MIICzzBJBgkqhkiG9w0BBQ0wPDAbBgkqhkiG9w0BBQwwDgQIji3ZZ6JbsA4CAggA -MB0GCWCGSAFlAwQBFgQQC6MKblq8zyX90/KmgotsMQSCAoDghNf+yxPC/KRh7F3O -k0lMgtDkV+wCLDv7aBvUqy8Ry2zqFPIlfLb8XtSW943XEu6KUI13IZPEr8p9h1ve -Iye6L0g6uAgbFxBE2DwBBSI7mYr7lokr4v0k+inMKf4JeRdI9XWgwOILKTGf1vH7 -PhvBnqLhOg6BIOuF426qpiyYlmRda74d0Th4o6ZyhyMSzPI1XbWSg719Ew3N/tLe -OHdYl0eFrgNjq+xO4Ev+W7eNIh/XBMQtk9wo+mxeNdldRnX822HxTsL8fSSPs+9T -W5M/2EBTJMSsswSjZyFkq8ehtxovI2u0IBX1IiPulyUZLnSNPDV1eUVClK6rk+q1 -kVsfJhUr2qvIjNlQWlbEXQj4VwGtgl0++l8vdpj59MuN2J3Nx5TNMLjA6BYAa/tr -Bu928QoT7ET+SGx5XKCwKb5fwXmDlV5zZC4kZWTaF/d/Icvj5F+fDZuYFg1JOXNZ -+q2oA1qMYaHGX6lF3pbO84ebg1iwQTDM8iIqFeSMGUJTnk/3a7sqfaWQbEQwGb+X -fXnSTwkF+wO2rriPbFvWyzecWu67zDCP0ZWUgGb86sSJCM7xRGShESwCjOrb88F1 -5SZjyIqogrkc3IWiLH9gc5U8d86qoFjJnP6BfwYks1UIyXNGKfZTCqICpMphV+IS -b0N2jprjLTkWR6nxYGSH1bkKMs7x1M0FBLWWLAZqPn9X3pe6JwIBds04O6XjF0un -oxwDjcJdoxVs7PgRiM5d1Tubqu2zmpCCmXNiqi9B0+rV9/jHg9IA5gUfvYdCcEv+ -oAr90I+2+PuBFa9lgdbDV6DtZk4bSYluqamxVeLPg/vrewYfVfDv6jftfY1D0DEy -69H0 ------END ENCRYPTED PRIVATE KEY----- diff --git a/node_modules/parse-asn1/test/pass.1024.pub b/node_modules/parse-asn1/test/pass.1024.pub deleted file mode 100644 index 617e7fb1..00000000 --- a/node_modules/parse-asn1/test/pass.1024.pub +++ /dev/null @@ -1,6 +0,0 @@ ------BEGIN PUBLIC KEY----- -MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDSK/7i5BV0x+gmX16Wrm7kRkCZ -y1QUt6wiM2g+SAZTYR0381VnSMX2cv7CpN3499lZj1rL5S7YTaZZwX3RvU5fz56/ -eDX6ciL/PZsbclN2KdkMWYgmcb9J1zUeoMQ3cjfFUCdQZ/ZvDWa+wY2Zg8os2Bow -AoufHtYHm3eOly/cWwIDAQAB ------END PUBLIC KEY----- diff --git a/node_modules/parse-asn1/test/pass.dsa.1024.priv b/node_modules/parse-asn1/test/pass.dsa.1024.priv deleted file mode 100644 index aab5fc2f..00000000 --- a/node_modules/parse-asn1/test/pass.dsa.1024.priv +++ /dev/null @@ -1,11 +0,0 @@ ------BEGIN ENCRYPTED PRIVATE KEY----- -MIIBnzBJBgkqhkiG9w0BBQ0wPDAbBgkqhkiG9w0BBQwwDgQI1z4IJORFws4CAggA -MB0GCWCGSAFlAwQBAgQQq7f0CuKCTITfPS5Xax1H4wSCAVDFyIjYVXfBNe+BARqz -Tfo09y4vKkErOb7Sz4bQkAjRLjOXiUjM4eTNtivml8NqVrQTKAghN+ggxj416OD4 -oq6Ns7Ncbd4Xm5Ni8wrrWbJxVog6rAa/ioU0sfgRExYy/xE2Q9KkW+VE7SUwanwY -e81Od9qNM5KhZGM1yUSKa0JA6Xqb8dAqBo9rVt8DceumB9OP83xV3fLEimSZfR6p -slA1P/dTvKxwhpguQe4Z3OkzTzGCxyboqeRW1woNHKbxjzzSHcaki9SHQm3xpUW8 -hRAJd6OtDnLbkE9MnC+UcI3mjru1xfnR5MU7qG7e9nvOhEDVaDkiK3DbrSf0B0Bi -p1hyX1XsSXDewSEd/mlfMLdD8WecgUtl9ea7JzxY3/6R78yB951I5TmY45mp/v+N -tbxEv29B65UKf0ac7gVw4LNy8JF2ef/L/meEmBoIAE71f+8= ------END ENCRYPTED PRIVATE KEY----- diff --git a/node_modules/parse-asn1/test/pass.dsa.1024.pub b/node_modules/parse-asn1/test/pass.dsa.1024.pub deleted file mode 100644 index 80a731ea..00000000 --- a/node_modules/parse-asn1/test/pass.dsa.1024.pub +++ /dev/null @@ -1,12 +0,0 @@ ------BEGIN PUBLIC KEY----- -MIIBtzCCASwGByqGSM44BAEwggEfAoGBAOY0KsTt5EpJ4LtlD3xRS5mDiGE1CMNp -0S9X0sK8kP8Aps8iYwMLbZYglk18GCNnCk4SjbAnZHSB3kaIv6AKQc2J8W2YV5se -3VhpKOFst7bqRtkGsl8uJtGlKTiXNclkv2jsKOrsBokSD1USGCECTNeMt3OgziRc -Z1dS+djSOZ2nAhUAzB96SpxlAak+K/QLVJ+lDe5DcY0CgYEAtxX1/HckvhlhHQyK -ZWLQsDfZBILbhc+OLDpOyT6cJS/sJzfFIYZgK5M3rOS4OmzdYfJccQAuGq+TVJQ3 -VcYOdbrIANJV8CDrn4jkkejTzJI6fCwAkPWOyxw8kbV1Hsoy6WLfSCHKpBUcrogA -qRGESqBVTawjyF/ECX667y/P49MDgYQAAoGAXYmxO4+52C1gBzh7GgTwNLJl7bLn -gOhKTFlKhT36VjMjeFfdXmBVBVbfUottKZby/gVX1IXT38PStB/dswbF45bGDdoS -zMFjYmHTtLtrU/4hReVtvb5MYmrPDFX58SwcSRRO/cH6WJPvfu4Aq0cJZA9Kb0B9 -5Wo18JxAqvPtTB8= ------END PUBLIC KEY----- diff --git a/node_modules/parse-asn1/test/pass.rsa.1024.priv b/node_modules/parse-asn1/test/pass.rsa.1024.priv deleted file mode 100644 index b67bd804..00000000 --- a/node_modules/parse-asn1/test/pass.rsa.1024.priv +++ /dev/null @@ -1,18 +0,0 @@ ------BEGIN RSA PRIVATE KEY----- -Proc-Type: 4,ENCRYPTED -DEK-Info: AES-192-CBC,04D2D7882E0C474E07E542FE997D2A49 - -vfB5Gtm34n3SeI6JELjWiGw6O+j+tGR6Wbi3SNeAZkfSA8PTjei6PVHr+dGK5zMd -nTckd0EpxItqxEdtLK6GtBIa9KRd3cEbayHmyyybH2FC4STXJCUFBe2eb7ZKmnCl -RB5FcmAqExif+QOJwHnZw6DTzq+oGSwi9cSoy2qE62FgXkj8uKAYcBLONmsP1YQA -4zIub4bnEbIghL/swEB/HVS86FyMCsMXrHEOnSuUUBf/UfZFNypI6kVUNXlItnN1 -14eeRsBD37VkL7dAQPMx+Dwm7DbU07QWrVvzgmWlu3KqR0tRNA9e4a5f14XOYxgS -HZ+XVZK8iAd+76OnprlFtGDowDXGM0wUXPYq5j8WpKxNsVs2RV+S6U0gQLoSqNxt -We7UPWZufzEdjTUO8q9KhdGqFmJ53XIYClZf0bp148b+Bk3P+dN5TbmKQEfulScn -rTLTRo34fdTIAJr5BJh0OXGNs9rFlMJ9Nz4FwVTEB1DMerXtt9ICdhud9BktRhvq -axgoz+XA3LrBrlPPcrSCZyIYjZFydGSkzg439OyDEZ6+uRmc0qhWA4j6AgXx6gGR -NvvypoFVKvXqEq/2F+SVyyMGrm4xPmsr/HUBeE9SmuTzNzDfVAM/xerqIoR2szR0 -O0hwtOj4fk7//cd1CjFzd0JiF/SqMkHxkdbmIC9qlhshkWlQbvvhbefodYPuGxmj -L1TaPgX36OcrQSodzyWBN5tSmmX1Nmftcz7iwc4AKrqkdnM3sPS3SczsAjMWrjRr -7iYhdPQSZtxVCTjACU3h7scNAg9AU6l4YZrowR//J6U= ------END RSA PRIVATE KEY----- diff --git a/node_modules/parse-asn1/test/pass.rsa.1024.pub b/node_modules/parse-asn1/test/pass.rsa.1024.pub deleted file mode 100644 index 3506c331..00000000 --- a/node_modules/parse-asn1/test/pass.rsa.1024.pub +++ /dev/null @@ -1,6 +0,0 @@ ------BEGIN PUBLIC KEY----- -MIGcMA0GCSqGSIb3DQEBAQUAA4GKADCBhgJ/OwswbFo/uyC8ltGf/yA1A+gV5IGd -nAgPbUSI3GzbHCA+x+TLG/tLvbRw3r1smppY/jkkpiVW1ErSMuN0uixp5gb78Z9r -H1XpWb5WWgp3WaY/9EHMjMdOkQ/9LVZvRvl/M/Fi6owP+q+amJI1BEjECYfbhGL3 -rmlVdq4qXc40QwIDAQAB ------END PUBLIC KEY----- diff --git a/node_modules/parse-asn1/test/pass.rsa.2028.priv b/node_modules/parse-asn1/test/pass.rsa.2028.priv deleted file mode 100644 index 99e82135..00000000 --- a/node_modules/parse-asn1/test/pass.rsa.2028.priv +++ /dev/null @@ -1,30 +0,0 @@ ------BEGIN RSA PRIVATE KEY----- -Proc-Type: 4,ENCRYPTED -DEK-Info: AES-256-CBC,7A6A055AD675947A657041422F06D439 - -HQdjzAKUuqqKhZHmpzzY/monfqFhiHnZ5c24jtR9fM4aQJXf/e1fz6MEhyIz6XON -sb4CnXZstnxUuVWDkHEu6KWQ/dKALgiDUuT+UdMawVoVPGdgyWZp35pQPWi3fT2V -XZn58YkG8bO3Y403eZPyhadOefD1VtuFuK6/f90jjzx6ZDnwveXpYgFV7Jy1/pFd -cLLMf07C+hbk416nX6UVipWe4GH+ADFom5ZCfAaUotM7n8i149dULNF4YYi2wP31 -1YaDH5vf1CqiaieDY7xLzpEixwJz6ZEg3gLXaUvz2MpF8owiGI3eP0g7voWp3xt4 -TQx/qDURlaXiaRriWdWtpKyW1MFuJ5+KdNtR1/kXr2BLPB/ZLwyqtynUy8ZYpb4+ -WIRYpUGeb//ZHGhlCH7CRMdABsal4wTwnzi9fW4Ax96ecJ2SlwCuKxwS7iEq2y1/ -FAfGwsE+XufHhme5p6XjKfiHx+zJMIB2NMkrm+wm4PbMTrGVnw5/41/r6XxOB8fe -iKi12Jth4dusc1vYGYfzKop9uEM6CZ6+Chqzb+Zyh/xUiZVlCX/BYnxr7yXUm9aR -PHQgxkn2Act8FgQB3Kgs3jCiCRIJrlsnybeWzQ3YO9TjC4MxygmmwODDBpsOKnEi -kXXS54+cZFjcsva4uJVwhAywRPVUkLzmTkH0tGiwCHjeQNECm+TLahkkEIXrVTb9 -c9creNXMgE6jVVz+R43HXsGvTcgMcBLyFRQJe2nVaj/dQ5JbF4uqNnQzRjAbD34K -uTpFaJ/kmlgcmeScRLnwaoYwFlmhSC+bK0dfY1Jr6AQRA6IDP7nIjqWNDCHNBB8r -Qj1v2KWoVQe3xNHaXhkbJPbA2DKlUIqffkBVtMKtt9KuG3Rccf3bVYAW6oid73/D -z7DMAF5G/OpVR8VbGh1WxXuR7zEVDUwpwsp9ek5dqN8BnBz1ppdZNIKqzszneckU -s2l/6mZBmgV1Nfy/cQU6U5s3S1Xc75UDQVLms3CIOpFTRIpecNTdfa31fYy/svy0 -M2lWTbCva0dOyuvMUhTgBL4I7Qa2dUMPXHMZatV5ooHYq/BZJA1r84C5cM5r+umE -2LLv/BlUr7RaQHhaKGn4Qhpzo5yRDE9mEqDpLVkbg8SxMsdf/pEF5/VyUwA9t8RT -fKVsInRd386tDqJSDbSFqKTvLztr/5YCyzZzvC2YB1voko/caOGd2d/G51Ij+bXU -xEN8U4fHDBsHwPUGb31uZUhTXpL37KiOqZmXFoH2usmuvx882XvyGcV0F4tstMaR -KLKzl2PwqzAYGFexLkYKMz0TYIeN6h3b86ETazPPU49nkaEU23Dx21J2Rb3UlH+I -lDQF3wuH1QlYiTnlcVa/Zu4QQg0/iP8ALkZ06mvn9e9mOtnA8gsh4B2oLqc19VLU -bcpv40dV1H3W9Lcx9B8JYUp0c/Oyno1D7Yj3tjGcwMKECmUpHi4kksehVo0/P933 -xmFmC6eyWYVdO9upvY/vKSB7b1dMt85iWr3gnMsSfRYc6jsbSxdjOPST46UsIzjx -wa1DS6+Bv5tiaC4uC6X+0tCAZo+UOQMYUbTGRR/7g/c= ------END RSA PRIVATE KEY----- diff --git a/node_modules/parse-asn1/test/pass.rsa.2028.pub b/node_modules/parse-asn1/test/pass.rsa.2028.pub deleted file mode 100644 index 655cc3a4..00000000 --- a/node_modules/parse-asn1/test/pass.rsa.2028.pub +++ /dev/null @@ -1,9 +0,0 @@ ------BEGIN PUBLIC KEY----- -MIIBHjANBgkqhkiG9w0BAQEFAAOCAQsAMIIBBgKB/gy7mjaWgPeFdVYDZWRCA9BN -iv3pPb0es27+FKY0hszLaOw47ExCtAWpDsH48TXAfyHBYwBLguayfk4LGIupxb+C -GMbRo3xEp0CbfY1Jby26T9vGjRC1foHDDUJG84uaRbyHqaf4i6zt4gVR+xlAEIjk -aFAAK8cOoXAT1CVqGLLljUCchL8PjaHj/yriZ/S7rdwlI3LnABxwwmLrmR/v71Wt -pmO/aNG8N+1po+QwaghTkyQ59E/ZvAuOkFWHok2q/R6PYAa2jdZ9zim0FqOP+nkQ -aEDRbBFBmBqTv5fFGfk2WsAfKf/RG0/VFd+ZeM5251TeTvXH695nlSGauVl9AgMB -AAE= ------END PUBLIC KEY----- diff --git a/node_modules/parse-asn1/test/pass2.dsa.1024.priv b/node_modules/parse-asn1/test/pass2.dsa.1024.priv deleted file mode 100644 index 29e36734..00000000 --- a/node_modules/parse-asn1/test/pass2.dsa.1024.priv +++ /dev/null @@ -1,15 +0,0 @@ ------BEGIN DSA PRIVATE KEY----- -Proc-Type: 4,ENCRYPTED -DEK-Info: AES-128-CBC,DC173C6DFD455EBE462A35D6AB9A603A - -FoC3sxbdUFJTaNtRpooMxaX2lcQRLUz8qcRhzDBn5a1kaMHp2JM3KlHK5aauybT4 -ilmlKJ9sSm8pFLAWPKbkczSgZ+X6p/51v4zaEJSebZ98p32kQk87XJQE7aYroxYV -UfM5PSOoKWilj+LZQQEXV10qDoYGrnbSdoNSxYW5V1a1aP+ua0EO7m9MUYkoLxi3 -SJ/s2h/5KM3TOz7d7DOZuSoNm+0n6YC4aqQnR3lmEtAXEYLQqLhH2Q3FTKTHwBQw -HgMBAzcXOS1YSw6Ekwh1eZamizrOEC4I6oZEHoUBqRfbsQ8tu77kDq2ovQSyn8Fp -SeE64m3GgZOYdfcDuNZ0ccmm3shBBfTfD9AwR+1thklKO3oaaLEHb6TmnkD79rEz -9WsiVxoN7vqqWdgoeyl7REOB6WLQp8kYS4FoRG0QB/ZS8Hs/Tf17QPnrQNiMkvP7 -sJSHmlaMKXjWXK0VoN94kfZKUXwkzLD1VXuXFCnUkznWU0tahYi06b8/SVXc6EG+ -0mzylckH7UnjOQfxSFAlZ+e/PiX80tcPakxYbk+f1Nv7L0NOyhrDv18KUbv9mEpV -Ysild1m7/QSF0u1qmjmGNQ== ------END DSA PRIVATE KEY----- diff --git a/node_modules/parse-asn1/test/pass2.dsa.1024.pub b/node_modules/parse-asn1/test/pass2.dsa.1024.pub deleted file mode 100644 index 80a731ea..00000000 --- a/node_modules/parse-asn1/test/pass2.dsa.1024.pub +++ /dev/null @@ -1,12 +0,0 @@ ------BEGIN PUBLIC KEY----- -MIIBtzCCASwGByqGSM44BAEwggEfAoGBAOY0KsTt5EpJ4LtlD3xRS5mDiGE1CMNp -0S9X0sK8kP8Aps8iYwMLbZYglk18GCNnCk4SjbAnZHSB3kaIv6AKQc2J8W2YV5se -3VhpKOFst7bqRtkGsl8uJtGlKTiXNclkv2jsKOrsBokSD1USGCECTNeMt3OgziRc -Z1dS+djSOZ2nAhUAzB96SpxlAak+K/QLVJ+lDe5DcY0CgYEAtxX1/HckvhlhHQyK -ZWLQsDfZBILbhc+OLDpOyT6cJS/sJzfFIYZgK5M3rOS4OmzdYfJccQAuGq+TVJQ3 -VcYOdbrIANJV8CDrn4jkkejTzJI6fCwAkPWOyxw8kbV1Hsoy6WLfSCHKpBUcrogA -qRGESqBVTawjyF/ECX667y/P49MDgYQAAoGAXYmxO4+52C1gBzh7GgTwNLJl7bLn -gOhKTFlKhT36VjMjeFfdXmBVBVbfUottKZby/gVX1IXT38PStB/dswbF45bGDdoS -zMFjYmHTtLtrU/4hReVtvb5MYmrPDFX58SwcSRRO/cH6WJPvfu4Aq0cJZA9Kb0B9 -5Wo18JxAqvPtTB8= ------END PUBLIC KEY----- diff --git a/node_modules/parse-asn1/test/rsa.1024.priv b/node_modules/parse-asn1/test/rsa.1024.priv deleted file mode 100644 index d3b5fdab..00000000 --- a/node_modules/parse-asn1/test/rsa.1024.priv +++ /dev/null @@ -1,15 +0,0 @@ ------BEGIN RSA PRIVATE KEY----- -MIICVAIBAAJ/OwswbFo/uyC8ltGf/yA1A+gV5IGdnAgPbUSI3GzbHCA+x+TLG/tL -vbRw3r1smppY/jkkpiVW1ErSMuN0uixp5gb78Z9rH1XpWb5WWgp3WaY/9EHMjMdO -kQ/9LVZvRvl/M/Fi6owP+q+amJI1BEjECYfbhGL3rmlVdq4qXc40QwIDAQABAn8I -VZ0BPoAOhyF33KFMHxy8r28fsVgxJUYgM3NqQgdv4fFawCYXjhJz9duU5YJGFJGJ -WUGeHlkyYFlpi4f3m7tY7JawmQUWB0MNSoKHI3cgDX4/tfBN8ni+cO0eSoR5czBY -EsAHBU47p1awNFAHwd+ZEuv9H4RmMn7p279rQTtpAkAH3Nqs2/vrRF2cZUN4fIXf -4xHsQBByUayGq8a3J0UGaSFWv68zTUKFherr9uZotNp7NJ4jBXiARw0q8docXUG1 -AkAHgmOKHoORtAmikqpmFEJZOtsXMaLCIm4EszPo5ciYoLMBcVit09AdiQlt7ZJL -DY02svU1b0agCZ97kDkmHDkXAkACa8M9JELuDs/P/vIGYDkMVatIFfW6bWF02eFG -taWwMqCcSEsWvbw0xqYt34jURpNbCjmCyQVwYfAw/+TLhP9dAkAFwRjdwjw37qpj -ddg1mNiu37b7swFxmkiMOXZRxaNNsfb56A14RpN3zob3QdGUybGodMIKTFbmU/lu -CjqAxafJAkAG2yf6RWbwFIWfMyt7WYCh0VaGBCcgy574AinVieEo3ZZyFfC63+xm -3uoaNy4iLoJv4GCjqUBz3ZfcVaO/DDWG ------END RSA PRIVATE KEY----- diff --git a/node_modules/parse-asn1/test/rsa.1024.pub b/node_modules/parse-asn1/test/rsa.1024.pub deleted file mode 100644 index 7ba06369..00000000 --- a/node_modules/parse-asn1/test/rsa.1024.pub +++ /dev/null @@ -1,5 +0,0 @@ ------BEGIN RSA PUBLIC KEY----- -MIGGAn87CzBsWj+7ILyW0Z//IDUD6BXkgZ2cCA9tRIjcbNscID7H5Msb+0u9tHDe -vWyamlj+OSSmJVbUStIy43S6LGnmBvvxn2sfVelZvlZaCndZpj/0QcyMx06RD/0t -Vm9G+X8z8WLqjA/6r5qYkjUESMQJh9uEYveuaVV2ripdzjRDAgMBAAE= ------END RSA PUBLIC KEY----- diff --git a/node_modules/parse-asn1/test/rsa.2028.priv b/node_modules/parse-asn1/test/rsa.2028.priv deleted file mode 100644 index 10e651d8..00000000 --- a/node_modules/parse-asn1/test/rsa.2028.priv +++ /dev/null @@ -1,27 +0,0 @@ ------BEGIN RSA PRIVATE KEY----- -MIIEjwIBAAKB/gy7mjaWgPeFdVYDZWRCA9BNiv3pPb0es27+FKY0hszLaOw47ExC -tAWpDsH48TXAfyHBYwBLguayfk4LGIupxb+CGMbRo3xEp0CbfY1Jby26T9vGjRC1 -foHDDUJG84uaRbyHqaf4i6zt4gVR+xlAEIjkaFAAK8cOoXAT1CVqGLLljUCchL8P -jaHj/yriZ/S7rdwlI3LnABxwwmLrmR/v71WtpmO/aNG8N+1po+QwaghTkyQ59E/Z -vAuOkFWHok2q/R6PYAa2jdZ9zim0FqOP+nkQaEDRbBFBmBqTv5fFGfk2WsAfKf/R -G0/VFd+ZeM5251TeTvXH695nlSGauVl9AgMBAAECgf4LrWHY/l54ouThZWvvbrug -pfz6sJX2g9l7yXmWlEWsPECVo/7SUbpYFpt6OZy99zSg+IKbGqWKfdhoKrTwIVtC -L0YZ0NlmdnANSIz0roxQG7ZxkL5+vHSw/PmD9x4Uwf+Cz8hATCmNBv1qc60dkyuW -4CLqe72qaTiVWRoO1iagQghNcLoo6vSy65ExLaCDTPha7yu2vw4hFZpWiEjW4dxf -rFdLiix52BC86YlAlxME/rLg8IJVvilbyo9aWdXmxOaUTLRv6PkFD1/gVdw8V9Qr -SLN9FlK2kkjiX0dzoibvZw3tMnt3yydAx0X87+sMRVahC1bp3kVPz4Hy0EWX4QJ/ -PM31vGiuITk2NCd51DXt1Ltn2OP5FaJSmCaEjh0XkU4qouYyjXWt8Bu6BTCl2vua -Fg0Uji9C+IkPLmaUMbMIOwaTk8cWqLthSxsLe70J5OkGrgfKUM/w+BHH1Pt/Pjzj -C++l0kiFaOVDVaAV9GpLPLCBoK/PC9Rb/rxMMoCCNwJ/NZuedIny2w3LMii77h/T -zSvergNGhjY6Rnva8lLXJ6dlrkcPAyps3gWwxqj4NR0T+GM0bDUPVLb7M07XV7SX -v7VJGm52JbRGwM1ss+r8XTTNemeGk+WRxG7TgtsMqYGXLfB8Qxk/f5/Mcc00Tl8u -wXFNsfxJxmt6AbsTr3g36wJ/IhOnibz9Ad+nchlBnN3QeW3CKHqzaR18voqvtVm2 -kJfHK15prH/sSGmxmiEGgrCJTZxtDbaNCO7/VBjnKudUUIhCAwsLtuq0/zub9vAd -8G1scfIpv5qaSNzmKoX8bOwArvrS6wP7yKrcTsuWIlHD8rJVI7IEDnQoTp5G8fK1 -hwJ/MIh8M5v0r5dUYEv6oIJWGcle6AH1JmsP5WIafgq72Z2288pHcCFHwNY8Dg9J -76QswVLnUhPTlmm3EOOPGEtam2iAD5r0Afytlb4lbNoQsj2szeXONDXB+6oueajh -VNELUr8HcSP5lgzRZjJW6aFIzj9LDRmQnUAOjGSXVOQtEwJ/MCQZ7N/v4dIKeDRA -8d8UExZ3+gGHumziztGRJ0tQryZH2PakP5I7V+1l7qEUnJ2c3mF+e1v41Ep9LCvh -bzrPKw9dxh18g4b+7bMpsWPnsraKh6ipxc7aaOaZV0Dxgez4zcZu0P1olO0cN3KM -nxJ0Pds3R8bAhNCDdS2JZaRp5Q== ------END RSA PRIVATE KEY----- diff --git a/node_modules/parse-asn1/test/rsa.2028.pub b/node_modules/parse-asn1/test/rsa.2028.pub deleted file mode 100644 index b36dca4d..00000000 --- a/node_modules/parse-asn1/test/rsa.2028.pub +++ /dev/null @@ -1,8 +0,0 @@ ------BEGIN RSA PUBLIC KEY----- -MIIBBgKB/gy7mjaWgPeFdVYDZWRCA9BNiv3pPb0es27+FKY0hszLaOw47ExCtAWp -DsH48TXAfyHBYwBLguayfk4LGIupxb+CGMbRo3xEp0CbfY1Jby26T9vGjRC1foHD -DUJG84uaRbyHqaf4i6zt4gVR+xlAEIjkaFAAK8cOoXAT1CVqGLLljUCchL8PjaHj -/yriZ/S7rdwlI3LnABxwwmLrmR/v71WtpmO/aNG8N+1po+QwaghTkyQ59E/ZvAuO -kFWHok2q/R6PYAa2jdZ9zim0FqOP+nkQaEDRbBFBmBqTv5fFGfk2WsAfKf/RG0/V -Fd+ZeM5251TeTvXH695nlSGauVl9AgMBAAE= ------END RSA PUBLIC KEY----- diff --git a/node_modules/parse-asn1/test/vector.js b/node_modules/parse-asn1/test/vector.js deleted file mode 100644 index 4b8d8cf5..00000000 --- a/node_modules/parse-asn1/test/vector.js +++ /dev/null @@ -1,7 +0,0 @@ -module.exports = { - p: new Buffer('86F5CA03DCFEB225063FF830A0C769B9DD9D6153AD91D7CE27F787C43278B447E6533B86B18BED6E8A48B784A14C252C5BE0DBF60B86D6385BD2F12FB763ED8873ABFD3F5BA2E0A8C0A59082EAC056935E529DAF7C610467899C77ADEDFC846C881870B7B19B2B58F9BE0521A17002E3BDD6B86685EE90B3D9A1B02B782B1779', 'hex'), - q: new Buffer('996F967F6C8E388D9E28D01E205FBA957A5698B1', 'hex'), - g: new Buffer('07B0F92546150B62514BB771E2A0C0CE387F03BDA6C56B505209FF25FD3C133D89BBCD97E904E09114D9A7DEFDEADFC9078EA544D2E401AEECC40BB9FBBF78FD87995A10A1C27CB7789B594BA7EFB5C4326A9FE59A070E136DB77175464ADCA417BE5DCE2F40D10A46A3A3943F26AB7FD9C0398FF8C76EE0A56826A8A88F1DBD', 'hex'), - x: new Buffer('411602CB19A6CCC34494D79D98EF1E7ED5AF25F7', 'hex'), - y: new Buffer('5DF5E01DED31D0297E274E1691C192FE5868FEF9E19A84776454B100CF16F65392195A38B90523E2542EE61871C0440CB87C322FC4B4D2EC5E1E7EC766E1BE8D4CE935437DC11C3C8FD426338933EBFE739CB3465F4D3668C5E473508253B1E682F65CBDC4FAE93C2EA212390E54905A86E2223170B44EAA7DA5DD9FFCFB7F3B', 'hex') -} diff --git a/node_modules/parse-asn1/test/vector.priv b/node_modules/parse-asn1/test/vector.priv deleted file mode 100644 index 178bd1e6..00000000 --- a/node_modules/parse-asn1/test/vector.priv +++ /dev/null @@ -1,12 +0,0 @@ ------BEGIN DSA PRIVATE KEY----- -MIIBugIBAAKBgQCG9coD3P6yJQY/+DCgx2m53Z1hU62R184n94fEMni0R+ZTO4ax -i+1uiki3hKFMJSxb4Nv2C4bWOFvS8S+3Y+2Ic6v9P1ui4KjApZCC6sBWk15Sna98 -YQRniZx3re38hGyIGHC3sZsrWPm+BSGhcALjvda4ZoXukLPZobAreCsXeQIVAJlv -ln9sjjiNnijQHiBfupV6VpixAoGAB7D5JUYVC2JRS7dx4qDAzjh/A72mxWtQUgn/ -Jf08Ez2Ju82X6QTgkRTZp9796t/JB46lRNLkAa7sxAu5+794/YeZWhChwny3eJtZ -S6fvtcQyap/lmgcOE223cXVGStykF75dzi9A0QpGo6OUPyarf9nAOY/4x27gpWgm -qKiPHb0CgYBd9eAd7THQKX4nThaRwZL+WGj++eGahHdkVLEAzxb2U5IZWji5BSPi -VC7mGHHARAy4fDIvxLTS7F4efsdm4b6NTOk1Q33BHDyP1CYziTPr/nOcs0ZfTTZo -xeRzUIJTseaC9ly9xPrpPC6iEjkOVJBahuIiMXC0Tqp9pd2f/Pt/OwIUQRYCyxmm -zMNElNedmO8eftWvJfc= ------END DSA PRIVATE KEY----- diff --git a/node_modules/parse-asn1/test/vector2.priv b/node_modules/parse-asn1/test/vector2.priv deleted file mode 100644 index ef53f614..00000000 --- a/node_modules/parse-asn1/test/vector2.priv +++ /dev/null @@ -1,19 +0,0 @@ ------BEGIN DSA PRIVATE KEY----- -MIIDVQIBAAKCAQEAnbb7WVG2a7b+HhQPHSzlUCN0Fh/WU43xZIIYZC8LXEjI96Qa -rfoYcyS4dnT6GCKwDx7PgTaUPXxVdXJk5aGkT/4BLpk24AwdPpMQsBx9F5gF0wWL -Kp9Ltvlxa/5hF8a1s8xNm+NBEErUqArWyU4AX0uZPhTwketRdDvzMFDDjeI1Vn4b -NMPWpcDOqhoPNoITw9GYQ9C0sJ3Ln8ctOcjeQfG/FNS7RWPKKDcWIcrTMktqLTkh -Rb6/rHSIBSNvXKL+krhxzY+cNtMpK1UJyoyqd6Kt/Hv9d92m9xElp0Vv6hU+QzJW -oiYcagbtNpN5fnmV+tWqu8++PtonQeN1QEriWwIhAPLDEZN0znbJNWmQtGU3Shfy -P57TUIm9lp9hxt3pmYwfAoIBAFx/9rBvjxQ/6CiEM0k+R2nE2Yis5b4loOJICWcH -FsYT17DO5pMvj6p8RNLLJFI9pT++T27DWViS0apYxDKKBsRqFWYufqpwOh3s+Luy -0F2+LrlWwUKjOGYdEEYcDRNUcghQV/NJQwn/pzxhH3izKtu1dAw2HJ81vpCZfbIB -Ti71qmF4L1Kr64vWQyxN0Je8VCOyhdr7YNw2ToFh9KKjWso6ELHE0gPMdqRwozr9 -y92SlZhZq9i1bhclJS146sZucbqa4/HdJIcZmHQ5PNTYMhhoAGVHYOHjTAnk0VUX -n57A3ERz+Za9zm7tHKvti28Rb3rZz1Bd8PmY40qydRSw/+cCggEAZnCYxlRCbHjX -+CAerGwgPvAw1DYFAywvH6k35SN9vZSfNKCiVk/hJtyLcVxRQYAs4JecgkZGPEDm -tr2qJRP6YRcocWwuT9U7yVuJ5plJ2WUS6HO5yPjf1JnMMSiCVhreyzH2WOk0wMGX -8sTZawXLrWc4Hnt2iJHk2jhD0k2UzftRJum4vyHoNY7g4KMO8T/WpmTA3ONzH3+0 -mkhFpP2CVGh5cqLTglmcm6xODteZgZMHiRMDJVgTSXZBC4nSwXHRI6w1/ZdyGVl6p9FcGppCjlkZT3XHIevLz65EaWpJmvp04EKZ8TICZgFjjLh6t5GQ1KCYY -xXajuxlYck4mWvq3wIgacdUjCHQ3+prmlHJ6tTifDPTs/GAMW5byrkskz8OTbw= ------END DSA PRIVATE KEY----- diff --git a/node_modules/path-browserify/LICENSE b/node_modules/path-browserify/LICENSE deleted file mode 100644 index ee27ba4b..00000000 --- a/node_modules/path-browserify/LICENSE +++ /dev/null @@ -1,18 +0,0 @@ -This software is released under the MIT license: - -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/node_modules/path-browserify/index.js b/node_modules/path-browserify/index.js deleted file mode 100644 index 285e32d7..00000000 --- a/node_modules/path-browserify/index.js +++ /dev/null @@ -1,224 +0,0 @@ -// Copyright Joyent, Inc. and other Node contributors. -// -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to permit -// persons to whom the Software is furnished to do so, subject to the -// following conditions: -// -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -// USE OR OTHER DEALINGS IN THE SOFTWARE. - -// resolves . and .. elements in a path array with directory names there -// must be no slashes, empty elements, or device names (c:\) in the array -// (so also no leading and trailing slashes - it does not distinguish -// relative and absolute paths) -function normalizeArray(parts, allowAboveRoot) { - // if the path tries to go above the root, `up` ends up > 0 - var up = 0; - for (var i = parts.length - 1; i >= 0; i--) { - var last = parts[i]; - if (last === '.') { - parts.splice(i, 1); - } else if (last === '..') { - parts.splice(i, 1); - up++; - } else if (up) { - parts.splice(i, 1); - up--; - } - } - - // if the path is allowed to go above the root, restore leading ..s - if (allowAboveRoot) { - for (; up--; up) { - parts.unshift('..'); - } - } - - return parts; -} - -// Split a filename into [root, dir, basename, ext], unix version -// 'root' is just a slash, or nothing. -var splitPathRe = - /^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/; -var splitPath = function(filename) { - return splitPathRe.exec(filename).slice(1); -}; - -// path.resolve([from ...], to) -// posix version -exports.resolve = function() { - var resolvedPath = '', - resolvedAbsolute = false; - - for (var i = arguments.length - 1; i >= -1 && !resolvedAbsolute; i--) { - var path = (i >= 0) ? arguments[i] : process.cwd(); - - // Skip empty and invalid entries - if (typeof path !== 'string') { - throw new TypeError('Arguments to path.resolve must be strings'); - } else if (!path) { - continue; - } - - resolvedPath = path + '/' + resolvedPath; - resolvedAbsolute = path.charAt(0) === '/'; - } - - // At this point the path should be resolved to a full absolute path, but - // handle relative paths to be safe (might happen when process.cwd() fails) - - // Normalize the path - resolvedPath = normalizeArray(filter(resolvedPath.split('/'), function(p) { - return !!p; - }), !resolvedAbsolute).join('/'); - - return ((resolvedAbsolute ? '/' : '') + resolvedPath) || '.'; -}; - -// path.normalize(path) -// posix version -exports.normalize = function(path) { - var isAbsolute = exports.isAbsolute(path), - trailingSlash = substr(path, -1) === '/'; - - // Normalize the path - path = normalizeArray(filter(path.split('/'), function(p) { - return !!p; - }), !isAbsolute).join('/'); - - if (!path && !isAbsolute) { - path = '.'; - } - if (path && trailingSlash) { - path += '/'; - } - - return (isAbsolute ? '/' : '') + path; -}; - -// posix version -exports.isAbsolute = function(path) { - return path.charAt(0) === '/'; -}; - -// posix version -exports.join = function() { - var paths = Array.prototype.slice.call(arguments, 0); - return exports.normalize(filter(paths, function(p, index) { - if (typeof p !== 'string') { - throw new TypeError('Arguments to path.join must be strings'); - } - return p; - }).join('/')); -}; - - -// path.relative(from, to) -// posix version -exports.relative = function(from, to) { - from = exports.resolve(from).substr(1); - to = exports.resolve(to).substr(1); - - function trim(arr) { - var start = 0; - for (; start < arr.length; start++) { - if (arr[start] !== '') break; - } - - var end = arr.length - 1; - for (; end >= 0; end--) { - if (arr[end] !== '') break; - } - - if (start > end) return []; - return arr.slice(start, end - start + 1); - } - - var fromParts = trim(from.split('/')); - var toParts = trim(to.split('/')); - - var length = Math.min(fromParts.length, toParts.length); - var samePartsLength = length; - for (var i = 0; i < length; i++) { - if (fromParts[i] !== toParts[i]) { - samePartsLength = i; - break; - } - } - - var outputParts = []; - for (var i = samePartsLength; i < fromParts.length; i++) { - outputParts.push('..'); - } - - outputParts = outputParts.concat(toParts.slice(samePartsLength)); - - return outputParts.join('/'); -}; - -exports.sep = '/'; -exports.delimiter = ':'; - -exports.dirname = function(path) { - var result = splitPath(path), - root = result[0], - dir = result[1]; - - if (!root && !dir) { - // No dirname whatsoever - return '.'; - } - - if (dir) { - // It has a dirname, strip trailing slash - dir = dir.substr(0, dir.length - 1); - } - - return root + dir; -}; - - -exports.basename = function(path, ext) { - var f = splitPath(path)[2]; - // TODO: make this comparison case-insensitive on windows? - if (ext && f.substr(-1 * ext.length) === ext) { - f = f.substr(0, f.length - ext.length); - } - return f; -}; - - -exports.extname = function(path) { - return splitPath(path)[3]; -}; - -function filter (xs, f) { - if (xs.filter) return xs.filter(f); - var res = []; - for (var i = 0; i < xs.length; i++) { - if (f(xs[i], i, xs)) res.push(xs[i]); - } - return res; -} - -// String.prototype.substr - negative index don't work in IE8 -var substr = 'ab'.substr(-1) === 'b' - ? function (str, start, len) { return str.substr(start, len) } - : function (str, start, len) { - if (start < 0) start = str.length + start; - return str.substr(start, len); - } -; diff --git a/node_modules/path-browserify/package.json b/node_modules/path-browserify/package.json deleted file mode 100644 index 8e886a0d..00000000 --- a/node_modules/path-browserify/package.json +++ /dev/null @@ -1,87 +0,0 @@ -{ - "_args": [ - [ - { - "raw": "path-browserify@~0.0.0", - "scope": null, - "escapedName": "path-browserify", - "name": "path-browserify", - "rawSpec": "~0.0.0", - "spec": ">=0.0.0 <0.1.0", - "type": "range" - }, - "/Users/benjaminarias/Desktop/poly/node_modules/browserify" - ] - ], - "_from": "path-browserify@>=0.0.0 <0.1.0", - "_id": "path-browserify@0.0.0", - "_inCache": true, - "_installable": true, - "_location": "/path-browserify", - "_npmUser": { - "name": "substack", - "email": "mail@substack.net" - }, - "_npmVersion": "1.3.14", - "_phantomChildren": {}, - "_requested": { - "raw": "path-browserify@~0.0.0", - "scope": null, - "escapedName": "path-browserify", - "name": "path-browserify", - "rawSpec": "~0.0.0", - "spec": ">=0.0.0 <0.1.0", - "type": "range" - }, - "_requiredBy": [ - "/browserify" - ], - "_resolved": "https://registry.npmjs.org/path-browserify/-/path-browserify-0.0.0.tgz", - "_shasum": "a0b870729aae214005b7d5032ec2cbbb0fb4451a", - "_shrinkwrap": null, - "_spec": "path-browserify@~0.0.0", - "_where": "/Users/benjaminarias/Desktop/poly/node_modules/browserify", - "author": { - "name": "James Halliday", - "email": "mail@substack.net", - "url": "http://substack.net" - }, - "bugs": { - "url": "https://github.com/substack/path-browserify/issues" - }, - "dependencies": {}, - "description": "the path module from node core for browsers", - "devDependencies": { - "tape": "~1.0.4" - }, - "directories": {}, - "dist": { - "shasum": "a0b870729aae214005b7d5032ec2cbbb0fb4451a", - "tarball": "https://registry.npmjs.org/path-browserify/-/path-browserify-0.0.0.tgz" - }, - "homepage": "https://github.com/substack/path-browserify", - "keywords": [ - "path", - "browser", - "browserify" - ], - "license": "MIT", - "main": "index.js", - "maintainers": [ - { - "name": "substack", - "email": "mail@substack.net" - } - ], - "name": "path-browserify", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git://github.com/substack/path-browserify.git" - }, - "scripts": { - "test": "tape test/*.js" - }, - "version": "0.0.0" -} diff --git a/node_modules/path-browserify/readme.markdown b/node_modules/path-browserify/readme.markdown deleted file mode 100644 index 8ae1dd89..00000000 --- a/node_modules/path-browserify/readme.markdown +++ /dev/null @@ -1,3 +0,0 @@ -# path-browserify - -the path module from node core for browsers diff --git a/node_modules/path-platform/LICENSE b/node_modules/path-platform/LICENSE deleted file mode 100644 index cfa529ec..00000000 --- a/node_modules/path-platform/LICENSE +++ /dev/null @@ -1,3 +0,0 @@ -MIT -- see https://github.com/joyent/node for license - -This file is pulled directly from Node.js diff --git a/node_modules/path-platform/README.md b/node_modules/path-platform/README.md deleted file mode 100644 index 9892dbdc..00000000 --- a/node_modules/path-platform/README.md +++ /dev/null @@ -1,5 +0,0 @@ -# path-platform - -This is a transitional package for those not on 0.12 that provides a compatible -interface to the builtin `path` module, but adds `path.posix` and `path.win32` -so you can `path.posix.normalize` on a win32 platform, or vice versa. diff --git a/node_modules/path-platform/package.json b/node_modules/path-platform/package.json deleted file mode 100644 index 33e5c480..00000000 --- a/node_modules/path-platform/package.json +++ /dev/null @@ -1,88 +0,0 @@ -{ - "_args": [ - [ - { - "raw": "path-platform@~0.11.15", - "scope": null, - "escapedName": "path-platform", - "name": "path-platform", - "rawSpec": "~0.11.15", - "spec": ">=0.11.15 <0.12.0", - "type": "range" - }, - "/Users/benjaminarias/Desktop/poly/node_modules/parents" - ] - ], - "_from": "path-platform@>=0.11.15 <0.12.0", - "_id": "path-platform@0.11.15", - "_inCache": true, - "_installable": true, - "_location": "/path-platform", - "_npmUser": { - "name": "tjfontaine", - "email": "tjfontaine@gmail.com" - }, - "_npmVersion": "1.4.28", - "_phantomChildren": {}, - "_requested": { - "raw": "path-platform@~0.11.15", - "scope": null, - "escapedName": "path-platform", - "name": "path-platform", - "rawSpec": "~0.11.15", - "spec": ">=0.11.15 <0.12.0", - "type": "range" - }, - "_requiredBy": [ - "/parents" - ], - "_resolved": "https://registry.npmjs.org/path-platform/-/path-platform-0.11.15.tgz", - "_shasum": "e864217f74c36850f0852b78dc7bf7d4a5721bf2", - "_shrinkwrap": null, - "_spec": "path-platform@~0.11.15", - "_where": "/Users/benjaminarias/Desktop/poly/node_modules/parents", - "author": { - "name": "Timothy J Fontaine", - "email": "tjfontaine@gmail.com", - "url": "http://atxconsulting.com" - }, - "bugs": { - "url": "http://github.com/tjfontaine/node-path-platform/issues" - }, - "dependencies": {}, - "description": "Provide access to win32 and posix path operations; sourced directly from upstream Node.js", - "devDependencies": {}, - "directories": {}, - "dist": { - "shasum": "e864217f74c36850f0852b78dc7bf7d4a5721bf2", - "tarball": "https://registry.npmjs.org/path-platform/-/path-platform-0.11.15.tgz" - }, - "engines": { - "node": ">= 0.8.0" - }, - "gitHead": "901e4d8a69ed3906bbbec5f65e9b7eec6d033474", - "homepage": "http://github.com/tjfontaine/node-path-platform", - "keywords": [ - "path", - "platform", - "posix", - "win32" - ], - "license": "MIT", - "main": "path.js", - "maintainers": [ - { - "name": "tjfontaine", - "email": "tjfontaine@gmail.com" - } - ], - "name": "path-platform", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git+ssh://git@github.com/tjfontaine/node-path-platform.git" - }, - "scripts": {}, - "version": "0.11.15" -} diff --git a/node_modules/path-platform/path.js b/node_modules/path-platform/path.js deleted file mode 100644 index 0a7a7075..00000000 --- a/node_modules/path-platform/path.js +++ /dev/null @@ -1,643 +0,0 @@ -// Copyright Joyent, Inc. and other Node contributors. -// -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to permit -// persons to whom the Software is furnished to do so, subject to the -// following conditions: -// -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -// USE OR OTHER DEALINGS IN THE SOFTWARE. - - -var isWindows = process.platform === 'win32'; -var util = require('util'); - -var _path = require('path'); - -// we are new enough we already have this from the system, just export the -// system then -if (_path.posix) { - module.exports = _path; - return; -} - -// resolves . and .. elements in a path array with directory names there -// must be no slashes or device names (c:\) in the array -// (so also no leading and trailing slashes - it does not distinguish -// relative and absolute paths) -function normalizeArray(parts, allowAboveRoot) { - var res = []; - for (var i = 0; i < parts.length; i++) { - var p = parts[i]; - - // ignore empty parts - if (!p || p === '.') - continue; - - if (p === '..') { - if (res.length && res[res.length - 1] !== '..') { - res.pop(); - } else if (allowAboveRoot) { - res.push('..'); - } - } else { - res.push(p); - } - } - - return res; -} - -// Regex to split a windows path into three parts: [*, device, slash, -// tail] windows-only -var splitDeviceRe = - /^([a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/]+[^\\\/]+)?([\\\/])?([\s\S]*?)$/; - -// Regex to split the tail part of the above into [*, dir, basename, ext] -var splitTailRe = - /^([\s\S]*?)((?:\.{1,2}|[^\\\/]+?|)(\.[^.\/\\]*|))(?:[\\\/]*)$/; - -var win32 = {}; - -// Function to split a filename into [root, dir, basename, ext] -function win32SplitPath(filename) { - // Separate device+slash from tail - var result = splitDeviceRe.exec(filename), - device = (result[1] || '') + (result[2] || ''), - tail = result[3] || ''; - // Split the tail into dir, basename and extension - var result2 = splitTailRe.exec(tail), - dir = result2[1], - basename = result2[2], - ext = result2[3]; - return [device, dir, basename, ext]; -} - -var normalizeUNCRoot = function(device) { - return '\\\\' + device.replace(/^[\\\/]+/, '').replace(/[\\\/]+/g, '\\'); -}; - -// path.resolve([from ...], to) -win32.resolve = function() { - var resolvedDevice = '', - resolvedTail = '', - resolvedAbsolute = false; - - for (var i = arguments.length - 1; i >= -1; i--) { - var path; - if (i >= 0) { - path = arguments[i]; - } else if (!resolvedDevice) { - path = process.cwd(); - } else { - // Windows has the concept of drive-specific current working - // directories. If we've resolved a drive letter but not yet an - // absolute path, get cwd for that drive. We're sure the device is not - // an unc path at this points, because unc paths are always absolute. - path = process.env['=' + resolvedDevice]; - // Verify that a drive-local cwd was found and that it actually points - // to our drive. If not, default to the drive's root. - if (!path || path.substr(0, 3).toLowerCase() !== - resolvedDevice.toLowerCase() + '\\') { - path = resolvedDevice + '\\'; - } - } - - // Skip empty and invalid entries - if (!util.isString(path)) { - throw new TypeError('Arguments to path.resolve must be strings'); - } else if (!path) { - continue; - } - - var result = splitDeviceRe.exec(path), - device = result[1] || '', - isUnc = device && device.charAt(1) !== ':', - isAbsolute = win32.isAbsolute(path), - tail = result[3]; - - if (device && - resolvedDevice && - device.toLowerCase() !== resolvedDevice.toLowerCase()) { - // This path points to another device so it is not applicable - continue; - } - - if (!resolvedDevice) { - resolvedDevice = device; - } - if (!resolvedAbsolute) { - resolvedTail = tail + '\\' + resolvedTail; - resolvedAbsolute = isAbsolute; - } - - if (resolvedDevice && resolvedAbsolute) { - break; - } - } - - // Convert slashes to backslashes when `resolvedDevice` points to an UNC - // root. Also squash multiple slashes into a single one where appropriate. - if (isUnc) { - resolvedDevice = normalizeUNCRoot(resolvedDevice); - } - - // At this point the path should be resolved to a full absolute path, - // but handle relative paths to be safe (might happen when process.cwd() - // fails) - - // Normalize the tail path - resolvedTail = normalizeArray(resolvedTail.split(/[\\\/]+/), - !resolvedAbsolute).join('\\'); - - // If device is a drive letter, we'll normalize to lower case. - if (resolvedDevice && resolvedDevice.charAt(1) === ':') { - resolvedDevice = resolvedDevice[0].toLowerCase() + - resolvedDevice.substr(1); - } - - return (resolvedDevice + (resolvedAbsolute ? '\\' : '') + resolvedTail) || - '.'; -}; - - -win32.normalize = function(path) { - var result = splitDeviceRe.exec(path), - device = result[1] || '', - isUnc = device && device.charAt(1) !== ':', - isAbsolute = win32.isAbsolute(path), - tail = result[3], - trailingSlash = /[\\\/]$/.test(tail); - - // If device is a drive letter, we'll normalize to lower case. - if (device && device.charAt(1) === ':') { - device = device[0].toLowerCase() + device.substr(1); - } - - // Normalize the tail path - tail = normalizeArray(tail.split(/[\\\/]+/), !isAbsolute).join('\\'); - - if (!tail && !isAbsolute) { - tail = '.'; - } - if (tail && trailingSlash) { - tail += '\\'; - } - - // Convert slashes to backslashes when `device` points to an UNC root. - // Also squash multiple slashes into a single one where appropriate. - if (isUnc) { - device = normalizeUNCRoot(device); - } - - return device + (isAbsolute ? '\\' : '') + tail; -}; - - -win32.isAbsolute = function(path) { - var result = splitDeviceRe.exec(path), - device = result[1] || '', - isUnc = !!device && device.charAt(1) !== ':'; - // UNC paths are always absolute - return !!result[2] || isUnc; -}; - -win32.join = function() { - function f(p) { - if (!util.isString(p)) { - throw new TypeError('Arguments to path.join must be strings'); - } - return p; - } - - var paths = Array.prototype.filter.call(arguments, f); - var joined = paths.join('\\'); - - // Make sure that the joined path doesn't start with two slashes, because - // normalize() will mistake it for an UNC path then. - // - // This step is skipped when it is very clear that the user actually - // intended to point at an UNC path. This is assumed when the first - // non-empty string arguments starts with exactly two slashes followed by - // at least one more non-slash character. - // - // Note that for normalize() to treat a path as an UNC path it needs to - // have at least 2 components, so we don't filter for that here. - // This means that the user can use join to construct UNC paths from - // a server name and a share name; for example: - // path.join('//server', 'share') -> '\\\\server\\share\') - if (!/^[\\\/]{2}[^\\\/]/.test(paths[0])) { - joined = joined.replace(/^[\\\/]{2,}/, '\\'); - } - - return win32.normalize(joined); -}; - - -// path.relative(from, to) -// it will solve the relative path from 'from' to 'to', for instance: -// from = 'C:\\orandea\\test\\aaa' -// to = 'C:\\orandea\\impl\\bbb' -// The output of the function should be: '..\\..\\impl\\bbb' -win32.relative = function(from, to) { - from = win32.resolve(from); - to = win32.resolve(to); - - // windows is not case sensitive - var lowerFrom = from.toLowerCase(); - var lowerTo = to.toLowerCase(); - - function trim(arr) { - var start = 0; - for (; start < arr.length; start++) { - if (arr[start] !== '') break; - } - - var end = arr.length - 1; - for (; end >= 0; end--) { - if (arr[end] !== '') break; - } - - if (start > end) return []; - return arr.slice(start, end + 1); - } - - var toParts = trim(to.split('\\')); - - var lowerFromParts = trim(lowerFrom.split('\\')); - var lowerToParts = trim(lowerTo.split('\\')); - - var length = Math.min(lowerFromParts.length, lowerToParts.length); - var samePartsLength = length; - for (var i = 0; i < length; i++) { - if (lowerFromParts[i] !== lowerToParts[i]) { - samePartsLength = i; - break; - } - } - - if (samePartsLength == 0) { - return to; - } - - var outputParts = []; - for (var i = samePartsLength; i < lowerFromParts.length; i++) { - outputParts.push('..'); - } - - outputParts = outputParts.concat(toParts.slice(samePartsLength)); - - return outputParts.join('\\'); -}; - - -win32._makeLong = function(path) { - // Note: this will *probably* throw somewhere. - if (!util.isString(path)) - return path; - - if (!path) { - return ''; - } - - var resolvedPath = win32.resolve(path); - - if (/^[a-zA-Z]\:\\/.test(resolvedPath)) { - // path is local filesystem path, which needs to be converted - // to long UNC path. - return '\\\\?\\' + resolvedPath; - } else if (/^\\\\[^?.]/.test(resolvedPath)) { - // path is network UNC path, which needs to be converted - // to long UNC path. - return '\\\\?\\UNC\\' + resolvedPath.substring(2); - } - - return path; -}; - - -win32.dirname = function(path) { - var result = win32SplitPath(path), - root = result[0], - dir = result[1]; - - if (!root && !dir) { - // No dirname whatsoever - return '.'; - } - - if (dir) { - // It has a dirname, strip trailing slash - dir = dir.substr(0, dir.length - 1); - } - - return root + dir; -}; - - -win32.basename = function(path, ext) { - var f = win32SplitPath(path)[2]; - // TODO: make this comparison case-insensitive on windows? - if (ext && f.substr(-1 * ext.length) === ext) { - f = f.substr(0, f.length - ext.length); - } - return f; -}; - - -win32.extname = function(path) { - return win32SplitPath(path)[3]; -}; - - -win32.format = function(pathObject) { - if (!util.isObject(pathObject)) { - throw new TypeError( - "Parameter 'pathObject' must be an object, not " + typeof pathObject - ); - } - - var root = pathObject.root || ''; - - if (!util.isString(root)) { - throw new TypeError( - "'pathObject.root' must be a string or undefined, not " + - typeof pathObject.root - ); - } - - var dir = pathObject.dir; - var base = pathObject.base || ''; - if (dir.slice(dir.length - 1, dir.length) === win32.sep) { - return dir + base; - } - - if (dir) { - return dir + win32.sep + base; - } - - return base; -}; - - -win32.parse = function(pathString) { - if (!util.isString(pathString)) { - throw new TypeError( - "Parameter 'pathString' must be a string, not " + typeof pathString - ); - } - var allParts = win32SplitPath(pathString); - if (!allParts || allParts.length !== 4) { - throw new TypeError("Invalid path '" + pathString + "'"); - } - return { - root: allParts[0], - dir: allParts[0] + allParts[1].slice(0, allParts[1].length - 1), - base: allParts[2], - ext: allParts[3], - name: allParts[2].slice(0, allParts[2].length - allParts[3].length) - }; -}; - - -win32.sep = '\\'; -win32.delimiter = ';'; - - -// Split a filename into [root, dir, basename, ext], unix version -// 'root' is just a slash, or nothing. -var splitPathRe = - /^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/; -var posix = {}; - - -function posixSplitPath(filename) { - return splitPathRe.exec(filename).slice(1); -} - - -// path.resolve([from ...], to) -// posix version -posix.resolve = function() { - var resolvedPath = '', - resolvedAbsolute = false; - - for (var i = arguments.length - 1; i >= -1 && !resolvedAbsolute; i--) { - var path = (i >= 0) ? arguments[i] : process.cwd(); - - // Skip empty and invalid entries - if (!util.isString(path)) { - throw new TypeError('Arguments to path.resolve must be strings'); - } else if (!path) { - continue; - } - - resolvedPath = path + '/' + resolvedPath; - resolvedAbsolute = path.charAt(0) === '/'; - } - - // At this point the path should be resolved to a full absolute path, but - // handle relative paths to be safe (might happen when process.cwd() fails) - - // Normalize the path - resolvedPath = normalizeArray(resolvedPath.split('/'), - !resolvedAbsolute).join('/'); - - return ((resolvedAbsolute ? '/' : '') + resolvedPath) || '.'; -}; - -// path.normalize(path) -// posix version -posix.normalize = function(path) { - var isAbsolute = posix.isAbsolute(path), - trailingSlash = path.substr(-1) === '/'; - - // Normalize the path - path = normalizeArray(path.split('/'), !isAbsolute).join('/'); - - if (!path && !isAbsolute) { - path = '.'; - } - if (path && trailingSlash) { - path += '/'; - } - - return (isAbsolute ? '/' : '') + path; -}; - -// posix version -posix.isAbsolute = function(path) { - return path.charAt(0) === '/'; -}; - -// posix version -posix.join = function() { - var path = ''; - for (var i = 0; i < arguments.length; i++) { - var segment = arguments[i]; - if (!util.isString(segment)) { - throw new TypeError('Arguments to path.join must be strings'); - } - if (segment) { - if (!path) { - path += segment; - } else { - path += '/' + segment; - } - } - } - return posix.normalize(path); -}; - - -// path.relative(from, to) -// posix version -posix.relative = function(from, to) { - from = posix.resolve(from).substr(1); - to = posix.resolve(to).substr(1); - - function trim(arr) { - var start = 0; - for (; start < arr.length; start++) { - if (arr[start] !== '') break; - } - - var end = arr.length - 1; - for (; end >= 0; end--) { - if (arr[end] !== '') break; - } - - if (start > end) return []; - return arr.slice(start, end + 1); - } - - var fromParts = trim(from.split('/')); - var toParts = trim(to.split('/')); - - var length = Math.min(fromParts.length, toParts.length); - var samePartsLength = length; - for (var i = 0; i < length; i++) { - if (fromParts[i] !== toParts[i]) { - samePartsLength = i; - break; - } - } - - var outputParts = []; - for (var i = samePartsLength; i < fromParts.length; i++) { - outputParts.push('..'); - } - - outputParts = outputParts.concat(toParts.slice(samePartsLength)); - - return outputParts.join('/'); -}; - - -posix._makeLong = function(path) { - return path; -}; - - -posix.dirname = function(path) { - var result = posixSplitPath(path), - root = result[0], - dir = result[1]; - - if (!root && !dir) { - // No dirname whatsoever - return '.'; - } - - if (dir) { - // It has a dirname, strip trailing slash - dir = dir.substr(0, dir.length - 1); - } - - return root + dir; -}; - - -posix.basename = function(path, ext) { - var f = posixSplitPath(path)[2]; - // TODO: make this comparison case-insensitive on windows? - if (ext && f.substr(-1 * ext.length) === ext) { - f = f.substr(0, f.length - ext.length); - } - return f; -}; - - -posix.extname = function(path) { - return posixSplitPath(path)[3]; -}; - - -posix.format = function(pathObject) { - if (!util.isObject(pathObject)) { - throw new TypeError( - "Parameter 'pathObject' must be an object, not " + typeof pathObject - ); - } - - var root = pathObject.root || ''; - - if (!util.isString(root)) { - throw new TypeError( - "'pathObject.root' must be a string or undefined, not " + - typeof pathObject.root - ); - } - - var dir = pathObject.dir ? pathObject.dir + posix.sep : ''; - var base = pathObject.base || ''; - return dir + base; -}; - - -posix.parse = function(pathString) { - if (!util.isString(pathString)) { - throw new TypeError( - "Parameter 'pathString' must be a string, not " + typeof pathString - ); - } - var allParts = posixSplitPath(pathString); - if (!allParts || allParts.length !== 4) { - throw new TypeError("Invalid path '" + pathString + "'"); - } - allParts[1] = allParts[1] || ''; - allParts[2] = allParts[2] || ''; - allParts[3] = allParts[3] || ''; - - return { - root: allParts[0], - dir: allParts[0] + allParts[1].slice(0, allParts[1].length - 1), - base: allParts[2], - ext: allParts[3], - name: allParts[2].slice(0, allParts[2].length - allParts[3].length) - }; -}; - - -posix.sep = '/'; -posix.delimiter = ':'; - - -if (isWindows) - module.exports = win32; -else /* posix */ - module.exports = posix; - -module.exports.posix = posix; -module.exports.win32 = win32; diff --git a/node_modules/pbkdf2/LICENSE b/node_modules/pbkdf2/LICENSE deleted file mode 100644 index a115b524..00000000 --- a/node_modules/pbkdf2/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2014 Daniel Cousens - -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/node_modules/pbkdf2/README.md b/node_modules/pbkdf2/README.md deleted file mode 100644 index 05757828..00000000 --- a/node_modules/pbkdf2/README.md +++ /dev/null @@ -1,28 +0,0 @@ -# pbkdf2 - -[![NPM Package](https://img.shields.io/npm/v/pbkdf2.svg?style=flat-square)](https://www.npmjs.org/package/pbkdf2) -[![Build Status](https://img.shields.io/travis/crypto-browserify/pbkdf2.svg?branch=master&style=flat-square)](https://travis-ci.org/crypto-browserify/pbkdf2) -[![Dependency status](https://img.shields.io/david/crypto-browserify/pbkdf2.svg?style=flat-square)](https://david-dm.org/crypto-browserify/pbkdf2#info=dependencies) - -[![js-standard-style](https://cdn.rawgit.com/feross/standard/master/badge.svg)](https://github.com/feross/standard) - -This library provides the functionality of PBKDF2 with the ability to use any supported hashing algorithm returned from `crypto.getHashes()` - - -## Usage - -```js -var pbkdf2 = require('pbkdf2') -var derivedKey = pbkdf2.pbkdf2Sync('password', 'salt', 1, 32, 'sha512') - -... -``` - -For more information on the API, please see the relevant [Node documentation](https://nodejs.org/api/crypto.html#crypto_crypto_pbkdf2_password_salt_iterations_keylen_digest_callback). - - -## Credits - -This module is a derivative of [cryptocoinjs/pbkdf2-sha256](https://github.com/cryptocoinjs/pbkdf2-sha256/), so thanks to [JP Richardson](https://github.com/jprichardson/) for laying the ground work. - -Thank you to [FangDun Cai](https://github.com/fundon) for donating the package name on npm, if you're looking for his previous module it is located at [fundon/pbkdf2](https://github.com/fundon/pbkdf2). diff --git a/node_modules/pbkdf2/browser.js b/node_modules/pbkdf2/browser.js deleted file mode 100644 index e07b5ad5..00000000 --- a/node_modules/pbkdf2/browser.js +++ /dev/null @@ -1,68 +0,0 @@ -var createHmac = require('create-hmac') -var checkParameters = require('./precondition') - -exports.pbkdf2 = function (password, salt, iterations, keylen, digest, callback) { - if (typeof digest === 'function') { - callback = digest - digest = undefined - } - - checkParameters(iterations, keylen) - if (typeof callback !== 'function') throw new Error('No callback provided to pbkdf2') - - setTimeout(function () { - callback(null, exports.pbkdf2Sync(password, salt, iterations, keylen, digest)) - }) -} - -var defaultEncoding -if (process.browser) { - defaultEncoding = 'utf-8' -} else { - var pVersionMajor = parseInt(process.version.split('.')[0].slice(1), 10) - - defaultEncoding = pVersionMajor >= 6 ? 'utf-8' : 'binary' -} - -exports.pbkdf2Sync = function (password, salt, iterations, keylen, digest) { - if (!Buffer.isBuffer(password)) password = new Buffer(password, defaultEncoding) - if (!Buffer.isBuffer(salt)) salt = new Buffer(salt, defaultEncoding) - - checkParameters(iterations, keylen) - - digest = digest || 'sha1' - - var hLen - var l = 1 - var DK = new Buffer(keylen) - var block1 = new Buffer(salt.length + 4) - salt.copy(block1, 0, 0, salt.length) - - var r - var T - - for (var i = 1; i <= l; i++) { - block1.writeUInt32BE(i, salt.length) - var U = createHmac(digest, password).update(block1).digest() - - if (!hLen) { - hLen = U.length - T = new Buffer(hLen) - l = Math.ceil(keylen / hLen) - r = keylen - (l - 1) * hLen - } - - U.copy(T, 0, 0, hLen) - - for (var j = 1; j < iterations; j++) { - U = createHmac(digest, password).update(U).digest() - for (var k = 0; k < hLen; k++) T[k] ^= U[k] - } - - var destPos = (i - 1) * hLen - var len = (i === l ? r : hLen) - T.copy(DK, destPos, 0, len) - } - - return DK -} diff --git a/node_modules/pbkdf2/index.js b/node_modules/pbkdf2/index.js deleted file mode 100644 index 836202b9..00000000 --- a/node_modules/pbkdf2/index.js +++ /dev/null @@ -1,4 +0,0 @@ -var crypto = require('crypto') - -exports.pbkdf2Sync = crypto.pbkdf2Sync -exports.pbkdf2 = crypto.pbkdf2 diff --git a/node_modules/pbkdf2/package.json b/node_modules/pbkdf2/package.json deleted file mode 100644 index 24f4bb24..00000000 --- a/node_modules/pbkdf2/package.json +++ /dev/null @@ -1,139 +0,0 @@ -{ - "_args": [ - [ - { - "raw": "pbkdf2@^3.0.3", - "scope": null, - "escapedName": "pbkdf2", - "name": "pbkdf2", - "rawSpec": "^3.0.3", - "spec": ">=3.0.3 <4.0.0", - "type": "range" - }, - "/Users/benjaminarias/Desktop/poly/node_modules/crypto-browserify" - ] - ], - "_from": "pbkdf2@>=3.0.3 <4.0.0", - "_id": "pbkdf2@3.0.8", - "_inCache": true, - "_installable": true, - "_location": "/pbkdf2", - "_nodeVersion": "6.6.0", - "_npmOperationalInternal": { - "host": "packages-12-west.internal.npmjs.com", - "tmp": "tmp/pbkdf2-3.0.8.tgz_1474494107572_0.40838201879523695" - }, - "_npmUser": { - "name": "dcousens", - "email": "email@dcousens.com" - }, - "_npmVersion": "3.10.7", - "_phantomChildren": {}, - "_requested": { - "raw": "pbkdf2@^3.0.3", - "scope": null, - "escapedName": "pbkdf2", - "name": "pbkdf2", - "rawSpec": "^3.0.3", - "spec": ">=3.0.3 <4.0.0", - "type": "range" - }, - "_requiredBy": [ - "/crypto-browserify", - "/parse-asn1" - ], - "_resolved": "https://registry.npmjs.org/pbkdf2/-/pbkdf2-3.0.8.tgz", - "_shasum": "2f8abf16ebecc82277945d748aba1d78761f61e2", - "_shrinkwrap": null, - "_spec": "pbkdf2@^3.0.3", - "_where": "/Users/benjaminarias/Desktop/poly/node_modules/crypto-browserify", - "author": { - "name": "Daniel Cousens" - }, - "browser": "browser.js", - "bugs": { - "url": "https://github.com/crypto-browserify/pbkdf2/issues" - }, - "dependencies": { - "create-hmac": "^1.1.2" - }, - "description": "This library provides the functionality of PBKDF2 with the ability to use any supported hashing algorithm returned from crypto.getHashes()", - "devDependencies": { - "browserify": "*", - "nyc": "^6.4.0", - "standard": "*", - "tape": "^4.5.1" - }, - "directories": {}, - "dist": { - "shasum": "2f8abf16ebecc82277945d748aba1d78761f61e2", - "tarball": "https://registry.npmjs.org/pbkdf2/-/pbkdf2-3.0.8.tgz" - }, - "engines": { - "node": ">=0.12" - }, - "files": [ - "browser.js", - "index.js", - "node-shim-async.js", - "node-shim.js", - "precondition.js" - ], - "gitHead": "b218da3867aa6a1aa941cf0a8b3520bacbb6c75f", - "homepage": "https://github.com/crypto-browserify/pbkdf2", - "keywords": [ - "pbkdf2", - "kdf", - "salt", - "hash" - ], - "license": "MIT", - "main": "index.js", - "maintainers": [ - { - "name": "fundon", - "email": "cfddream@gmail.com" - }, - { - "name": "cwmma", - "email": "calvin.metcalf@gmail.com" - }, - { - "name": "dcousens", - "email": "email@dcousens.com" - }, - { - "name": "jprichardson", - "email": "jprichardson@gmail.com" - }, - { - "name": "dominictarr", - "email": "dominic.tarr@gmail.com" - }, - { - "name": "indutny", - "email": "fedor@indutny.com" - } - ], - "name": "pbkdf2", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git+https://github.com/crypto-browserify/pbkdf2.git" - }, - "scripts": { - "bundle-test": "browserify test/index.js > test/bundle.js", - "coverage": "nyc --check-coverage --branches 90 --functions 100 tape test/*.js", - "lint": "standard", - "prepublish": "npm run test", - "test": "npm run lint && npm run unit", - "unit": "tape test/*.js" - }, - "standard": { - "ignore": [ - "test/bundle.js" - ] - }, - "version": "3.0.8" -} diff --git a/node_modules/pbkdf2/precondition.js b/node_modules/pbkdf2/precondition.js deleted file mode 100644 index 1519b009..00000000 --- a/node_modules/pbkdf2/precondition.js +++ /dev/null @@ -1,18 +0,0 @@ -var MAX_ALLOC = Math.pow(2, 30) - 1 // default in iojs -module.exports = function (iterations, keylen) { - if (typeof iterations !== 'number') { - throw new TypeError('Iterations not a number') - } - - if (iterations < 0) { - throw new TypeError('Bad iterations') - } - - if (typeof keylen !== 'number') { - throw new TypeError('Key length not a number') - } - - if (keylen < 0 || keylen > MAX_ALLOC || keylen !== keylen) { /* eslint no-self-compare: 0 */ - throw new TypeError('Bad key length') - } -} diff --git a/node_modules/pinkie-promise/index.js b/node_modules/pinkie-promise/index.js deleted file mode 100644 index 777377a1..00000000 --- a/node_modules/pinkie-promise/index.js +++ /dev/null @@ -1,3 +0,0 @@ -'use strict'; - -module.exports = typeof Promise === 'function' ? Promise : require('pinkie'); diff --git a/node_modules/pinkie-promise/license b/node_modules/pinkie-promise/license deleted file mode 100644 index 1aeb74fd..00000000 --- a/node_modules/pinkie-promise/license +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) Vsevolod Strukchinsky (github.com/floatdrop) - -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/node_modules/pinkie-promise/package.json b/node_modules/pinkie-promise/package.json deleted file mode 100644 index d07bad44..00000000 --- a/node_modules/pinkie-promise/package.json +++ /dev/null @@ -1,103 +0,0 @@ -{ - "_args": [ - [ - { - "raw": "pinkie-promise@^2.0.0", - "scope": null, - "escapedName": "pinkie-promise", - "name": "pinkie-promise", - "rawSpec": "^2.0.0", - "spec": ">=2.0.0 <3.0.0", - "type": "range" - }, - "/Users/benjaminarias/Desktop/poly/node_modules/har-validator" - ] - ], - "_from": "pinkie-promise@>=2.0.0 <3.0.0", - "_id": "pinkie-promise@2.0.1", - "_inCache": true, - "_installable": true, - "_location": "/pinkie-promise", - "_nodeVersion": "4.4.1", - "_npmOperationalInternal": { - "host": "packages-16-east.internal.npmjs.com", - "tmp": "tmp/pinkie-promise-2.0.1.tgz_1460309839126_0.3422858319245279" - }, - "_npmUser": { - "name": "floatdrop", - "email": "floatdrop@gmail.com" - }, - "_npmVersion": "2.14.20", - "_phantomChildren": {}, - "_requested": { - "raw": "pinkie-promise@^2.0.0", - "scope": null, - "escapedName": "pinkie-promise", - "name": "pinkie-promise", - "rawSpec": "^2.0.0", - "spec": ">=2.0.0 <3.0.0", - "type": "range" - }, - "_requiredBy": [ - "/har-validator" - ], - "_resolved": "https://registry.npmjs.org/pinkie-promise/-/pinkie-promise-2.0.1.tgz", - "_shasum": "2135d6dfa7a358c069ac9b178776288228450ffa", - "_shrinkwrap": null, - "_spec": "pinkie-promise@^2.0.0", - "_where": "/Users/benjaminarias/Desktop/poly/node_modules/har-validator", - "author": { - "name": "Vsevolod Strukchinsky", - "email": "floatdrop@gmail.com", - "url": "github.com/floatdrop" - }, - "bugs": { - "url": "https://github.com/floatdrop/pinkie-promise/issues" - }, - "dependencies": { - "pinkie": "^2.0.0" - }, - "description": "ES2015 Promise ponyfill", - "devDependencies": { - "mocha": "*" - }, - "directories": {}, - "dist": { - "shasum": "2135d6dfa7a358c069ac9b178776288228450ffa", - "tarball": "https://registry.npmjs.org/pinkie-promise/-/pinkie-promise-2.0.1.tgz" - }, - "engines": { - "node": ">=0.10.0" - }, - "files": [ - "index.js" - ], - "gitHead": "4a936c09c34ad591a25db93f1216d242de0d6184", - "homepage": "https://github.com/floatdrop/pinkie-promise", - "keywords": [ - "promise", - "promises", - "es2015", - "es6", - "polyfill", - "ponyfill" - ], - "license": "MIT", - "maintainers": [ - { - "name": "floatdrop", - "email": "floatdrop@gmail.com" - } - ], - "name": "pinkie-promise", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git+https://github.com/floatdrop/pinkie-promise.git" - }, - "scripts": { - "test": "mocha" - }, - "version": "2.0.1" -} diff --git a/node_modules/pinkie-promise/readme.md b/node_modules/pinkie-promise/readme.md deleted file mode 100644 index 78477f42..00000000 --- a/node_modules/pinkie-promise/readme.md +++ /dev/null @@ -1,28 +0,0 @@ -# pinkie-promise [![Build Status](https://travis-ci.org/floatdrop/pinkie-promise.svg?branch=master)](https://travis-ci.org/floatdrop/pinkie-promise) - -> [ES2015 Promise](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-promise-objects) ponyfill - -Module exports global Promise object (if available) or [`pinkie`](http://github.com/floatdrop/pinkie) Promise polyfill. - -## Install - -``` -$ npm install --save pinkie-promise -``` - -## Usage - -```js -var Promise = require('pinkie-promise'); - -new Promise(function (resolve) { resolve('unicorns'); }); -//=> Promise { 'unicorns' } -``` - -## Related - -- [pify](https://github.com/sindresorhus/pify) - Promisify a callback-style function - -## License - -MIT © [Vsevolod Strukchinsky](http://github.com/floatdrop) diff --git a/node_modules/pinkie/index.js b/node_modules/pinkie/index.js deleted file mode 100644 index 14ce1bfe..00000000 --- a/node_modules/pinkie/index.js +++ /dev/null @@ -1,292 +0,0 @@ -'use strict'; - -var PENDING = 'pending'; -var SETTLED = 'settled'; -var FULFILLED = 'fulfilled'; -var REJECTED = 'rejected'; -var NOOP = function () {}; -var isNode = typeof global !== 'undefined' && typeof global.process !== 'undefined' && typeof global.process.emit === 'function'; - -var asyncSetTimer = typeof setImmediate === 'undefined' ? setTimeout : setImmediate; -var asyncQueue = []; -var asyncTimer; - -function asyncFlush() { - // run promise callbacks - for (var i = 0; i < asyncQueue.length; i++) { - asyncQueue[i][0](asyncQueue[i][1]); - } - - // reset async asyncQueue - asyncQueue = []; - asyncTimer = false; -} - -function asyncCall(callback, arg) { - asyncQueue.push([callback, arg]); - - if (!asyncTimer) { - asyncTimer = true; - asyncSetTimer(asyncFlush, 0); - } -} - -function invokeResolver(resolver, promise) { - function resolvePromise(value) { - resolve(promise, value); - } - - function rejectPromise(reason) { - reject(promise, reason); - } - - try { - resolver(resolvePromise, rejectPromise); - } catch (e) { - rejectPromise(e); - } -} - -function invokeCallback(subscriber) { - var owner = subscriber.owner; - var settled = owner._state; - var value = owner._data; - var callback = subscriber[settled]; - var promise = subscriber.then; - - if (typeof callback === 'function') { - settled = FULFILLED; - try { - value = callback(value); - } catch (e) { - reject(promise, e); - } - } - - if (!handleThenable(promise, value)) { - if (settled === FULFILLED) { - resolve(promise, value); - } - - if (settled === REJECTED) { - reject(promise, value); - } - } -} - -function handleThenable(promise, value) { - var resolved; - - try { - if (promise === value) { - throw new TypeError('A promises callback cannot return that same promise.'); - } - - if (value && (typeof value === 'function' || typeof value === 'object')) { - // then should be retrieved only once - var then = value.then; - - if (typeof then === 'function') { - then.call(value, function (val) { - if (!resolved) { - resolved = true; - - if (value === val) { - fulfill(promise, val); - } else { - resolve(promise, val); - } - } - }, function (reason) { - if (!resolved) { - resolved = true; - - reject(promise, reason); - } - }); - - return true; - } - } - } catch (e) { - if (!resolved) { - reject(promise, e); - } - - return true; - } - - return false; -} - -function resolve(promise, value) { - if (promise === value || !handleThenable(promise, value)) { - fulfill(promise, value); - } -} - -function fulfill(promise, value) { - if (promise._state === PENDING) { - promise._state = SETTLED; - promise._data = value; - - asyncCall(publishFulfillment, promise); - } -} - -function reject(promise, reason) { - if (promise._state === PENDING) { - promise._state = SETTLED; - promise._data = reason; - - asyncCall(publishRejection, promise); - } -} - -function publish(promise) { - promise._then = promise._then.forEach(invokeCallback); -} - -function publishFulfillment(promise) { - promise._state = FULFILLED; - publish(promise); -} - -function publishRejection(promise) { - promise._state = REJECTED; - publish(promise); - if (!promise._handled && isNode) { - global.process.emit('unhandledRejection', promise._data, promise); - } -} - -function notifyRejectionHandled(promise) { - global.process.emit('rejectionHandled', promise); -} - -/** - * @class - */ -function Promise(resolver) { - if (typeof resolver !== 'function') { - throw new TypeError('Promise resolver ' + resolver + ' is not a function'); - } - - if (this instanceof Promise === false) { - throw new TypeError('Failed to construct \'Promise\': Please use the \'new\' operator, this object constructor cannot be called as a function.'); - } - - this._then = []; - - invokeResolver(resolver, this); -} - -Promise.prototype = { - constructor: Promise, - - _state: PENDING, - _then: null, - _data: undefined, - _handled: false, - - then: function (onFulfillment, onRejection) { - var subscriber = { - owner: this, - then: new this.constructor(NOOP), - fulfilled: onFulfillment, - rejected: onRejection - }; - - if ((onRejection || onFulfillment) && !this._handled) { - this._handled = true; - if (this._state === REJECTED && isNode) { - asyncCall(notifyRejectionHandled, this); - } - } - - if (this._state === FULFILLED || this._state === REJECTED) { - // already resolved, call callback async - asyncCall(invokeCallback, subscriber); - } else { - // subscribe - this._then.push(subscriber); - } - - return subscriber.then; - }, - - catch: function (onRejection) { - return this.then(null, onRejection); - } -}; - -Promise.all = function (promises) { - if (!Array.isArray(promises)) { - throw new TypeError('You must pass an array to Promise.all().'); - } - - return new Promise(function (resolve, reject) { - var results = []; - var remaining = 0; - - function resolver(index) { - remaining++; - return function (value) { - results[index] = value; - if (!--remaining) { - resolve(results); - } - }; - } - - for (var i = 0, promise; i < promises.length; i++) { - promise = promises[i]; - - if (promise && typeof promise.then === 'function') { - promise.then(resolver(i), reject); - } else { - results[i] = promise; - } - } - - if (!remaining) { - resolve(results); - } - }); -}; - -Promise.race = function (promises) { - if (!Array.isArray(promises)) { - throw new TypeError('You must pass an array to Promise.race().'); - } - - return new Promise(function (resolve, reject) { - for (var i = 0, promise; i < promises.length; i++) { - promise = promises[i]; - - if (promise && typeof promise.then === 'function') { - promise.then(resolve, reject); - } else { - resolve(promise); - } - } - }); -}; - -Promise.resolve = function (value) { - if (value && typeof value === 'object' && value.constructor === Promise) { - return value; - } - - return new Promise(function (resolve) { - resolve(value); - }); -}; - -Promise.reject = function (reason) { - return new Promise(function (resolve, reject) { - reject(reason); - }); -}; - -module.exports = Promise; diff --git a/node_modules/pinkie/license b/node_modules/pinkie/license deleted file mode 100644 index 1aeb74fd..00000000 --- a/node_modules/pinkie/license +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) Vsevolod Strukchinsky (github.com/floatdrop) - -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/node_modules/pinkie/package.json b/node_modules/pinkie/package.json deleted file mode 100644 index 91318fb3..00000000 --- a/node_modules/pinkie/package.json +++ /dev/null @@ -1,101 +0,0 @@ -{ - "_args": [ - [ - { - "raw": "pinkie@^2.0.0", - "scope": null, - "escapedName": "pinkie", - "name": "pinkie", - "rawSpec": "^2.0.0", - "spec": ">=2.0.0 <3.0.0", - "type": "range" - }, - "/Users/benjaminarias/Desktop/poly/node_modules/pinkie-promise" - ] - ], - "_from": "pinkie@>=2.0.0 <3.0.0", - "_id": "pinkie@2.0.4", - "_inCache": true, - "_installable": true, - "_location": "/pinkie", - "_nodeVersion": "4.2.4", - "_npmUser": { - "name": "floatdrop", - "email": "floatdrop@gmail.com" - }, - "_npmVersion": "2.14.12", - "_phantomChildren": {}, - "_requested": { - "raw": "pinkie@^2.0.0", - "scope": null, - "escapedName": "pinkie", - "name": "pinkie", - "rawSpec": "^2.0.0", - "spec": ">=2.0.0 <3.0.0", - "type": "range" - }, - "_requiredBy": [ - "/pinkie-promise" - ], - "_resolved": "https://registry.npmjs.org/pinkie/-/pinkie-2.0.4.tgz", - "_shasum": "72556b80cfa0d48a974e80e77248e80ed4f7f870", - "_shrinkwrap": null, - "_spec": "pinkie@^2.0.0", - "_where": "/Users/benjaminarias/Desktop/poly/node_modules/pinkie-promise", - "author": { - "name": "Vsevolod Strukchinsky", - "email": "floatdrop@gmail.com", - "url": "github.com/floatdrop" - }, - "bugs": { - "url": "https://github.com/floatdrop/pinkie/issues" - }, - "dependencies": {}, - "description": "Itty bitty little widdle twinkie pinkie ES2015 Promise implementation", - "devDependencies": { - "core-assert": "^0.1.1", - "coveralls": "^2.11.4", - "mocha": "*", - "nyc": "^3.2.2", - "promises-aplus-tests": "*", - "xo": "^0.10.1" - }, - "directories": {}, - "dist": { - "shasum": "72556b80cfa0d48a974e80e77248e80ed4f7f870", - "tarball": "https://registry.npmjs.org/pinkie/-/pinkie-2.0.4.tgz" - }, - "engines": { - "node": ">=0.10.0" - }, - "files": [ - "index.js" - ], - "gitHead": "8d4a92447a5c62bff9f89756caeb4c9c8770579b", - "homepage": "https://github.com/floatdrop/pinkie", - "keywords": [ - "promise", - "promises", - "es2015", - "es6" - ], - "license": "MIT", - "maintainers": [ - { - "name": "floatdrop", - "email": "floatdrop@gmail.com" - } - ], - "name": "pinkie", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git+https://github.com/floatdrop/pinkie.git" - }, - "scripts": { - "coverage": "nyc report --reporter=text-lcov | coveralls", - "test": "xo && nyc mocha" - }, - "version": "2.0.4" -} diff --git a/node_modules/pinkie/readme.md b/node_modules/pinkie/readme.md deleted file mode 100644 index 1565f958..00000000 --- a/node_modules/pinkie/readme.md +++ /dev/null @@ -1,83 +0,0 @@ -

                    -
                    - pinkie -
                    -
                    -

                    - -> Itty bitty little widdle twinkie pinkie [ES2015 Promise](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-promise-objects) implementation - -[![Build Status](https://travis-ci.org/floatdrop/pinkie.svg?branch=master)](https://travis-ci.org/floatdrop/pinkie) [![Coverage Status](https://coveralls.io/repos/floatdrop/pinkie/badge.svg?branch=master&service=github)](https://coveralls.io/github/floatdrop/pinkie?branch=master) - -There are [tons of Promise implementations](https://github.com/promises-aplus/promises-spec/blob/master/implementations.md#standalone) out there, but all of them focus on browser compatibility and are often bloated with functionality. - -This module is an exact Promise specification polyfill (like [native-promise-only](https://github.com/getify/native-promise-only)), but in Node.js land (it should be browserify-able though). - - -## Install - -``` -$ npm install --save pinkie -``` - - -## Usage - -```js -var fs = require('fs'); -var Promise = require('pinkie'); - -new Promise(function (resolve, reject) { - fs.readFile('foo.json', 'utf8', function (err, data) { - if (err) { - reject(err); - return; - } - - resolve(data); - }); -}); -//=> Promise -``` - - -### API - -`pinkie` exports bare [ES2015 Promise](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-promise-objects) implementation and polyfills [Node.js rejection events](https://nodejs.org/api/process.html#process_event_unhandledrejection). In case you forgot: - -#### new Promise(executor) - -Returns new instance of `Promise`. - -##### executor - -*Required* -Type: `function` - -Function with two arguments `resolve` and `reject`. The first argument fulfills the promise, the second argument rejects it. - -#### pinkie.all(promises) - -Returns a promise that resolves when all of the promises in the `promises` Array argument have resolved. - -#### pinkie.race(promises) - -Returns a promise that resolves or rejects as soon as one of the promises in the `promises` Array resolves or rejects, with the value or reason from that promise. - -#### pinkie.reject(reason) - -Returns a Promise object that is rejected with the given `reason`. - -#### pinkie.resolve(value) - -Returns a Promise object that is resolved with the given `value`. If the `value` is a thenable (i.e. has a then method), the returned promise will "follow" that thenable, adopting its eventual state; otherwise the returned promise will be fulfilled with the `value`. - - -## Related - -- [pinkie-promise](https://github.com/floatdrop/pinkie-promise) - Returns the native Promise or this module - - -## License - -MIT © [Vsevolod Strukchinsky](http://github.com/floatdrop) diff --git a/node_modules/process-nextick-args/.travis.yml b/node_modules/process-nextick-args/.travis.yml deleted file mode 100644 index 36201b10..00000000 --- a/node_modules/process-nextick-args/.travis.yml +++ /dev/null @@ -1,12 +0,0 @@ -language: node_js -node_js: - - "0.8" - - "0.10" - - "0.11" - - "0.12" - - "1.7.1" - - 1 - - 2 - - 3 - - 4 - - 5 diff --git a/node_modules/process-nextick-args/index.js b/node_modules/process-nextick-args/index.js deleted file mode 100644 index a4f40f84..00000000 --- a/node_modules/process-nextick-args/index.js +++ /dev/null @@ -1,43 +0,0 @@ -'use strict'; - -if (!process.version || - process.version.indexOf('v0.') === 0 || - process.version.indexOf('v1.') === 0 && process.version.indexOf('v1.8.') !== 0) { - module.exports = nextTick; -} else { - module.exports = process.nextTick; -} - -function nextTick(fn, arg1, arg2, arg3) { - if (typeof fn !== 'function') { - throw new TypeError('"callback" argument must be a function'); - } - var len = arguments.length; - var args, i; - switch (len) { - case 0: - case 1: - return process.nextTick(fn); - case 2: - return process.nextTick(function afterTickOne() { - fn.call(null, arg1); - }); - case 3: - return process.nextTick(function afterTickTwo() { - fn.call(null, arg1, arg2); - }); - case 4: - return process.nextTick(function afterTickThree() { - fn.call(null, arg1, arg2, arg3); - }); - default: - args = new Array(len - 1); - i = 0; - while (i < args.length) { - args[i++] = arguments[i]; - } - return process.nextTick(function afterTick() { - fn.apply(null, args); - }); - } -} diff --git a/node_modules/process-nextick-args/license.md b/node_modules/process-nextick-args/license.md deleted file mode 100644 index c67e3532..00000000 --- a/node_modules/process-nextick-args/license.md +++ /dev/null @@ -1,19 +0,0 @@ -# Copyright (c) 2015 Calvin Metcalf - -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/node_modules/process-nextick-args/package.json b/node_modules/process-nextick-args/package.json deleted file mode 100644 index 9f079f7f..00000000 --- a/node_modules/process-nextick-args/package.json +++ /dev/null @@ -1,85 +0,0 @@ -{ - "_args": [ - [ - { - "raw": "process-nextick-args@~1.0.6", - "scope": null, - "escapedName": "process-nextick-args", - "name": "process-nextick-args", - "rawSpec": "~1.0.6", - "spec": ">=1.0.6 <1.1.0", - "type": "range" - }, - "/Users/benjaminarias/Desktop/poly/node_modules/browserify-cache-api/node_modules/readable-stream" - ] - ], - "_from": "process-nextick-args@>=1.0.6 <1.1.0", - "_id": "process-nextick-args@1.0.7", - "_inCache": true, - "_installable": true, - "_location": "/process-nextick-args", - "_nodeVersion": "5.11.0", - "_npmOperationalInternal": { - "host": "packages-12-west.internal.npmjs.com", - "tmp": "tmp/process-nextick-args-1.0.7.tgz_1462394251778_0.36989671061746776" - }, - "_npmUser": { - "name": "cwmma", - "email": "calvin.metcalf@gmail.com" - }, - "_npmVersion": "3.8.6", - "_phantomChildren": {}, - "_requested": { - "raw": "process-nextick-args@~1.0.6", - "scope": null, - "escapedName": "process-nextick-args", - "name": "process-nextick-args", - "rawSpec": "~1.0.6", - "spec": ">=1.0.6 <1.1.0", - "type": "range" - }, - "_requiredBy": [ - "/browserify-cache-api/readable-stream", - "/browserify-incremental/readable-stream" - ], - "_resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-1.0.7.tgz", - "_shasum": "150e20b756590ad3f91093f25a4f2ad8bff30ba3", - "_shrinkwrap": null, - "_spec": "process-nextick-args@~1.0.6", - "_where": "/Users/benjaminarias/Desktop/poly/node_modules/browserify-cache-api/node_modules/readable-stream", - "author": "", - "bugs": { - "url": "https://github.com/calvinmetcalf/process-nextick-args/issues" - }, - "dependencies": {}, - "description": "process.nextTick but always with args", - "devDependencies": { - "tap": "~0.2.6" - }, - "directories": {}, - "dist": { - "shasum": "150e20b756590ad3f91093f25a4f2ad8bff30ba3", - "tarball": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-1.0.7.tgz" - }, - "gitHead": "5c00899ab01dd32f93ad4b5743da33da91404f39", - "homepage": "https://github.com/calvinmetcalf/process-nextick-args", - "license": "MIT", - "main": "index.js", - "maintainers": [ - { - "name": "cwmma", - "email": "calvin.metcalf@gmail.com" - } - ], - "name": "process-nextick-args", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git+https://github.com/calvinmetcalf/process-nextick-args.git" - }, - "scripts": { - "test": "node test.js" - }, - "version": "1.0.7" -} diff --git a/node_modules/process-nextick-args/readme.md b/node_modules/process-nextick-args/readme.md deleted file mode 100644 index 78e7cfae..00000000 --- a/node_modules/process-nextick-args/readme.md +++ /dev/null @@ -1,18 +0,0 @@ -process-nextick-args -===== - -[![Build Status](https://travis-ci.org/calvinmetcalf/process-nextick-args.svg?branch=master)](https://travis-ci.org/calvinmetcalf/process-nextick-args) - -```bash -npm install --save process-nextick-args -``` - -Always be able to pass arguments to process.nextTick, no matter the platform - -```js -var nextTick = require('process-nextick-args'); - -nextTick(function (a, b, c) { - console.log(a, b, c); -}, 'step', 3, 'profit'); -``` diff --git a/node_modules/process-nextick-args/test.js b/node_modules/process-nextick-args/test.js deleted file mode 100644 index ef157215..00000000 --- a/node_modules/process-nextick-args/test.js +++ /dev/null @@ -1,24 +0,0 @@ -var test = require("tap").test; -var nextTick = require('./'); - -test('should work', function (t) { - t.plan(5); - nextTick(function (a) { - t.ok(a); - nextTick(function (thing) { - t.equals(thing, 7); - }, 7); - }, true); - nextTick(function (a, b, c) { - t.equals(a, 'step'); - t.equals(b, 3); - t.equals(c, 'profit'); - }, 'step', 3, 'profit'); -}); - -test('correct number of arguments', function (t) { - t.plan(1); - nextTick(function () { - t.equals(2, arguments.length, 'correct number'); - }, 1, 2); -}); diff --git a/node_modules/process/.eslintrc b/node_modules/process/.eslintrc deleted file mode 100644 index 1e7aab73..00000000 --- a/node_modules/process/.eslintrc +++ /dev/null @@ -1,21 +0,0 @@ -{ -extends: "eslint:recommended", - "env": { - "node": true, - "browser": true, - "es6" : true, - "mocha": true - }, - "rules": { - "indent": [2, 4], - "brace-style": [2, "1tbs"], - "quotes": [2, "single"], - "no-console": 0, - "no-shadow": 0, - "no-use-before-define": [2, "nofunc"], - "no-underscore-dangle": 0, - "no-constant-condition": 0, - "space-after-function-name": 0, - "consistent-return": 0 - } -} diff --git a/node_modules/process/LICENSE b/node_modules/process/LICENSE deleted file mode 100644 index b8c1246c..00000000 --- a/node_modules/process/LICENSE +++ /dev/null @@ -1,22 +0,0 @@ -(The MIT License) - -Copyright (c) 2013 Roman Shtylman - -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/node_modules/process/README.md b/node_modules/process/README.md deleted file mode 100644 index 6570729b..00000000 --- a/node_modules/process/README.md +++ /dev/null @@ -1,26 +0,0 @@ -# process - -```require('process');``` just like any other module. - -Works in node.js and browsers via the browser.js shim provided with the module. - -## browser implementation - -The goal of this module is not to be a full-fledged alternative to the builtin process module. This module mostly exists to provide the nextTick functionality and little more. We keep this module lean because it will often be included by default by tools like browserify when it detects a module has used the `process` global. - -It also exposes a "browser" member (i.e. `process.browser`) which is `true` in this implementation but `undefined` in node. This can be used in isomorphic code that adjusts it's behavior depending on which environment it's running in. - -If you are looking to provide other process methods, I suggest you monkey patch them onto the process global in your app. A list of user created patches is below. - -* [hrtime](https://github.com/kumavis/browser-process-hrtime) -* [stdout](https://github.com/kumavis/browser-stdout) - -## package manager notes - -If you are writing a bundler to package modules for client side use, make sure you use the ```browser``` field hint in package.json. - -See https://gist.github.com/4339901 for details. - -The [browserify](https://github.com/substack/node-browserify) module will properly handle this field when bundling your files. - - diff --git a/node_modules/process/browser.js b/node_modules/process/browser.js deleted file mode 100644 index d3e30e9b..00000000 --- a/node_modules/process/browser.js +++ /dev/null @@ -1,180 +0,0 @@ -// shim for using process in browser -var process = module.exports = {}; - -// cached from whatever global is present so that test runners that stub it -// don't break things. But we need to wrap it in a try catch in case it is -// wrapped in strict mode code which doesn't define any globals. It's inside a -// function because try/catches deoptimize in certain engines. - -var cachedSetTimeout; -var cachedClearTimeout; - -function defaultSetTimout() { - throw new Error('setTimeout has not been defined'); -} -function defaultClearTimeout () { - throw new Error('clearTimeout has not been defined'); -} -(function () { - try { - if (typeof setTimeout === 'function') { - cachedSetTimeout = setTimeout; - } else { - cachedSetTimeout = defaultSetTimout; - } - } catch (e) { - cachedSetTimeout = defaultSetTimout; - } - try { - if (typeof clearTimeout === 'function') { - cachedClearTimeout = clearTimeout; - } else { - cachedClearTimeout = defaultClearTimeout; - } - } catch (e) { - cachedClearTimeout = defaultClearTimeout; - } -} ()) -function runTimeout(fun) { - if (cachedSetTimeout === setTimeout) { - //normal enviroments in sane situations - return setTimeout(fun, 0); - } - // if setTimeout wasn't available but was latter defined - if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) { - cachedSetTimeout = setTimeout; - return setTimeout(fun, 0); - } - try { - // when when somebody has screwed with setTimeout but no I.E. maddness - return cachedSetTimeout(fun, 0); - } catch(e){ - try { - // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally - return cachedSetTimeout.call(null, fun, 0); - } catch(e){ - // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error - return cachedSetTimeout.call(this, fun, 0); - } - } - - -} -function runClearTimeout(marker) { - if (cachedClearTimeout === clearTimeout) { - //normal enviroments in sane situations - return clearTimeout(marker); - } - // if clearTimeout wasn't available but was latter defined - if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) { - cachedClearTimeout = clearTimeout; - return clearTimeout(marker); - } - try { - // when when somebody has screwed with setTimeout but no I.E. maddness - return cachedClearTimeout(marker); - } catch (e){ - try { - // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally - return cachedClearTimeout.call(null, marker); - } catch (e){ - // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error. - // Some versions of I.E. have different rules for clearTimeout vs setTimeout - return cachedClearTimeout.call(this, marker); - } - } - - - -} -var queue = []; -var draining = false; -var currentQueue; -var queueIndex = -1; - -function cleanUpNextTick() { - if (!draining || !currentQueue) { - return; - } - draining = false; - if (currentQueue.length) { - queue = currentQueue.concat(queue); - } else { - queueIndex = -1; - } - if (queue.length) { - drainQueue(); - } -} - -function drainQueue() { - if (draining) { - return; - } - var timeout = runTimeout(cleanUpNextTick); - draining = true; - - var len = queue.length; - while(len) { - currentQueue = queue; - queue = []; - while (++queueIndex < len) { - if (currentQueue) { - currentQueue[queueIndex].run(); - } - } - queueIndex = -1; - len = queue.length; - } - currentQueue = null; - draining = false; - runClearTimeout(timeout); -} - -process.nextTick = function (fun) { - var args = new Array(arguments.length - 1); - if (arguments.length > 1) { - for (var i = 1; i < arguments.length; i++) { - args[i - 1] = arguments[i]; - } - } - queue.push(new Item(fun, args)); - if (queue.length === 1 && !draining) { - runTimeout(drainQueue); - } -}; - -// v8 likes predictible objects -function Item(fun, array) { - this.fun = fun; - this.array = array; -} -Item.prototype.run = function () { - this.fun.apply(null, this.array); -}; -process.title = 'browser'; -process.browser = true; -process.env = {}; -process.argv = []; -process.version = ''; // empty string to avoid regexp issues -process.versions = {}; - -function noop() {} - -process.on = noop; -process.addListener = noop; -process.once = noop; -process.off = noop; -process.removeListener = noop; -process.removeAllListeners = noop; -process.emit = noop; - -process.binding = function (name) { - throw new Error('process.binding is not supported'); -}; - -process.cwd = function () { return '/' }; -process.chdir = function (dir) { - throw new Error('process.chdir is not supported'); -}; -process.umask = function() { return 0; }; diff --git a/node_modules/process/index.js b/node_modules/process/index.js deleted file mode 100644 index 8d8ed7df..00000000 --- a/node_modules/process/index.js +++ /dev/null @@ -1,2 +0,0 @@ -// for now just expose the builtin process global from node.js -module.exports = global.process; diff --git a/node_modules/process/package.json b/node_modules/process/package.json deleted file mode 100644 index f950f9a5..00000000 --- a/node_modules/process/package.json +++ /dev/null @@ -1,106 +0,0 @@ -{ - "_args": [ - [ - { - "raw": "process@~0.11.0", - "scope": null, - "escapedName": "process", - "name": "process", - "rawSpec": "~0.11.0", - "spec": ">=0.11.0 <0.12.0", - "type": "range" - }, - "/Users/benjaminarias/Desktop/poly/node_modules/browserify" - ] - ], - "_from": "process@>=0.11.0 <0.12.0", - "_id": "process@0.11.9", - "_inCache": true, - "_installable": true, - "_location": "/process", - "_nodeVersion": "5.12.0", - "_npmOperationalInternal": { - "host": "packages-16-east.internal.npmjs.com", - "tmp": "tmp/process-0.11.9.tgz_1472587751718_0.8843140550889075" - }, - "_npmUser": { - "name": "cwmma", - "email": "calvin.metcalf@gmail.com" - }, - "_npmVersion": "3.8.6", - "_phantomChildren": {}, - "_requested": { - "raw": "process@~0.11.0", - "scope": null, - "escapedName": "process", - "name": "process", - "rawSpec": "~0.11.0", - "spec": ">=0.11.0 <0.12.0", - "type": "range" - }, - "_requiredBy": [ - "/browserify", - "/insert-module-globals", - "/timers-browserify" - ], - "_resolved": "https://registry.npmjs.org/process/-/process-0.11.9.tgz", - "_shasum": "7bd5ad21aa6253e7da8682264f1e11d11c0318c1", - "_shrinkwrap": null, - "_spec": "process@~0.11.0", - "_where": "/Users/benjaminarias/Desktop/poly/node_modules/browserify", - "author": { - "name": "Roman Shtylman", - "email": "shtylman@gmail.com" - }, - "browser": "./browser.js", - "bugs": { - "url": "https://github.com/shtylman/node-process/issues" - }, - "dependencies": {}, - "description": "process information for node.js and browsers", - "devDependencies": { - "mocha": "2.2.1", - "zuul": "^3.10.3" - }, - "directories": {}, - "dist": { - "shasum": "7bd5ad21aa6253e7da8682264f1e11d11c0318c1", - "tarball": "https://registry.npmjs.org/process/-/process-0.11.9.tgz" - }, - "engines": { - "node": ">= 0.6.0" - }, - "gitHead": "7d8c3702a8bbc43fa55f4bab74b150aef37001dd", - "homepage": "https://github.com/shtylman/node-process#readme", - "keywords": [ - "process" - ], - "license": "MIT", - "main": "./index.js", - "maintainers": [ - { - "name": "coolaj86", - "email": "coolaj86@gmail.com" - }, - { - "name": "cwmma", - "email": "calvin.metcalf@gmail.com" - }, - { - "name": "defunctzombie", - "email": "shtylman@gmail.com" - } - ], - "name": "process", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git://github.com/shtylman/node-process.git" - }, - "scripts": { - "browser": "zuul --no-coverage --ui mocha-bdd --local 8080 -- test.js", - "test": "mocha test.js" - }, - "version": "0.11.9" -} diff --git a/node_modules/process/test.js b/node_modules/process/test.js deleted file mode 100644 index 8ba579c0..00000000 --- a/node_modules/process/test.js +++ /dev/null @@ -1,199 +0,0 @@ -var assert = require('assert'); -var ourProcess = require('./browser'); -describe('test against our process', function () { - test(ourProcess); -}); -if (!process.browser) { - describe('test against node', function () { - test(process); - }); - vmtest(); -} -function test (ourProcess) { - describe('test arguments', function () { - it ('works', function (done) { - var order = 0; - - - ourProcess.nextTick(function (num) { - assert.equal(num, order++, 'first one works'); - ourProcess.nextTick(function (num) { - assert.equal(num, order++, 'recursive one is 4th'); - }, 3); - }, 0); - ourProcess.nextTick(function (num) { - assert.equal(num, order++, 'second one starts'); - ourProcess.nextTick(function (num) { - assert.equal(num, order++, 'this is third'); - ourProcess.nextTick(function (num) { - assert.equal(num, order++, 'this is last'); - done(); - }, 5); - }, 4); - }, 1); - ourProcess.nextTick(function (num) { - - assert.equal(num, order++, '3rd schedualed happens after the error'); - }, 2); - }); - }); -if (!process.browser) { - describe('test errors', function (t) { - it ('works', function (done) { - var order = 0; - process.removeAllListeners('uncaughtException'); - process.once('uncaughtException', function(err) { - assert.equal(2, order++, 'error is third'); - ourProcess.nextTick(function () { - assert.equal(5, order++, 'schedualed in error is last'); - done(); - }); - }); - ourProcess.nextTick(function () { - assert.equal(0, order++, 'first one works'); - ourProcess.nextTick(function () { - assert.equal(4, order++, 'recursive one is 4th'); - }); - }); - ourProcess.nextTick(function () { - assert.equal(1, order++, 'second one starts'); - throw(new Error('an error is thrown')); - }); - ourProcess.nextTick(function () { - assert.equal(3, order++, '3rd schedualed happens after the error'); - }); - }); - }); -} - describe('rename globals', function (t) { - var oldTimeout = setTimeout; - var oldClear = clearTimeout; - - it('clearTimeout', function (done){ - - var ok = true; - clearTimeout = function () { - ok = false; - } - var ran = false; - function cleanup() { - clearTimeout = oldClear; - var err; - try { - assert.ok(ok, 'fake clearTimeout ran'); - assert.ok(ran, 'should have run'); - } catch (e) { - err = e; - } - done(err); - } - setTimeout(cleanup, 1000); - ourProcess.nextTick(function () { - ran = true; - }); - }); - it('just setTimeout', function (done){ - - - setTimeout = function () { - setTimeout = oldTimeout; - try { - assert.ok(false, 'fake setTimeout called') - } catch (e) { - done(e); - } - - } - - ourProcess.nextTick(function () { - setTimeout = oldTimeout; - done(); - }); - }); - }); -} -function vmtest() { - var vm = require('vm'); - var fs = require('fs'); - var process = fs.readFileSync('./browser.js', {encoding: 'utf8'}); - - - describe('should work in vm in strict mode with no globals', function () { - it('should parse', function (done) { - var str = '"use strict";var module = {exports:{}};'; - str += process; - str += 'this.works = process.browser;'; - var script = new vm.Script(str); - var context = { - works: false - }; - script.runInNewContext(context); - assert.ok(context.works); - done(); - }); - it('setTimeout throws error', function (done) { - var str = '"use strict";var module = {exports:{}};'; - str += process; - str += 'try {process.nextTick(function () {})} catch (e){this.works = e;}'; - var script = new vm.Script(str); - var context = { - works: false - }; - script.runInNewContext(context); - assert.ok(context.works); - done(); - }); - it('should generally work', function (done) { - var str = '"use strict";var module = {exports:{}};'; - str += process; - str += 'process.nextTick(function () {assert.ok(true);done();})'; - var script = new vm.Script(str); - var context = { - clearTimeout: clearTimeout, - setTimeout: setTimeout, - done: done, - assert: assert - }; - script.runInNewContext(context); - }); - it('late defs setTimeout', function (done) { - var str = '"use strict";var module = {exports:{}};'; - str += process; - str += 'var setTimeout = hiddenSetTimeout;process.nextTick(function () {assert.ok(true);done();})'; - var script = new vm.Script(str); - var context = { - clearTimeout: clearTimeout, - hiddenSetTimeout: setTimeout, - done: done, - assert: assert - }; - script.runInNewContext(context); - }); - it('late defs clearTimeout', function (done) { - var str = '"use strict";var module = {exports:{}};'; - str += process; - str += 'var clearTimeout = hiddenClearTimeout;process.nextTick(function () {assert.ok(true);done();})'; - var script = new vm.Script(str); - var context = { - hiddenClearTimeout: clearTimeout, - setTimeout: setTimeout, - done: done, - assert: assert - }; - script.runInNewContext(context); - }); - it('late defs setTimeout and then redefine', function (done) { - var str = '"use strict";var module = {exports:{}};'; - str += process; - str += 'var setTimeout = hiddenSetTimeout;process.nextTick(function () {setTimeout = function (){throw new Error("foo")};hiddenSetTimeout(function(){process.nextTick(function (){assert.ok(true);done();});});});'; - var script = new vm.Script(str); - var context = { - clearTimeout: clearTimeout, - hiddenSetTimeout: setTimeout, - done: done, - assert: assert - }; - script.runInNewContext(context); - }); - }); -} diff --git a/node_modules/prr/.jshintrc b/node_modules/prr/.jshintrc deleted file mode 100644 index 6a7a956c..00000000 --- a/node_modules/prr/.jshintrc +++ /dev/null @@ -1,61 +0,0 @@ -{ - "predef": [ ] - , "bitwise": false - , "camelcase": false - , "curly": false - , "eqeqeq": false - , "forin": false - , "immed": false - , "latedef": false - , "newcap": true - , "noarg": true - , "noempty": true - , "nonew": true - , "plusplus": false - , "quotmark": true - , "regexp": false - , "undef": true - , "unused": true - , "strict": false - , "trailing": true - , "maxlen": 120 - , "asi": true - , "boss": true - , "debug": true - , "eqnull": true - , "es5": true - , "esnext": true - , "evil": true - , "expr": true - , "funcscope": false - , "globalstrict": false - , "iterator": false - , "lastsemic": true - , "laxbreak": true - , "laxcomma": true - , "loopfunc": true - , "multistr": false - , "onecase": false - , "proto": false - , "regexdash": false - , "scripturl": true - , "smarttabs": false - , "shadow": false - , "sub": true - , "supernew": false - , "validthis": true - , "browser": true - , "couch": false - , "devel": false - , "dojo": false - , "mootools": false - , "node": true - , "nonstandard": true - , "prototypejs": false - , "rhino": false - , "worker": true - , "wsh": false - , "nomen": false - , "onevar": true - , "passfail": false -} \ No newline at end of file diff --git a/node_modules/prr/.npmignore b/node_modules/prr/.npmignore deleted file mode 100644 index b512c09d..00000000 --- a/node_modules/prr/.npmignore +++ /dev/null @@ -1 +0,0 @@ -node_modules \ No newline at end of file diff --git a/node_modules/prr/.travis.yml b/node_modules/prr/.travis.yml deleted file mode 100644 index fe3f4eb1..00000000 --- a/node_modules/prr/.travis.yml +++ /dev/null @@ -1,10 +0,0 @@ -language: node_js -node_js: - - 0.8 - - "0.10" -branches: - only: - - master -notifications: - email: - - rod@vagg.org diff --git a/node_modules/prr/LICENSE b/node_modules/prr/LICENSE deleted file mode 100644 index f6a0029d..00000000 --- a/node_modules/prr/LICENSE +++ /dev/null @@ -1,39 +0,0 @@ -Copyright 2013, Rod Vagg (the "Original Author") -All rights reserved. - -MIT +no-false-attribs License - -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. - -Distributions of all or part of the Software intended to be used -by the recipients as they would use the unmodified Software, -containing modifications that substantially alter, remove, or -disable functionality of the Software, outside of the documented -configuration mechanisms provided by the Software, shall be -modified such that the Original Author's bug reporting email -addresses and urls are either replaced with the contact information -of the parties responsible for the changes, or removed entirely. - -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. - - -Except where noted, this license applies to any and all software -programs and associated documentation files created by the -Original Author, when distributed with the Software. \ No newline at end of file diff --git a/node_modules/prr/README.md b/node_modules/prr/README.md deleted file mode 100644 index 3e709e3b..00000000 --- a/node_modules/prr/README.md +++ /dev/null @@ -1,45 +0,0 @@ -# prr [![Build Status](https://secure.travis-ci.org/rvagg/prr.png)](http://travis-ci.org/rvagg/prr) - -An sensible alternative to `Object.defineProperty()`. Available in npm and Ender as **prr**. - -## Usage - -Set the property `'foo'` (`obj.foo`) to have the value `'bar'` with default options (*enumerable, configurable and writable are all false*): - -```js -prr(obj, 'foo', 'bar') -``` - -Adjust the default options: - -```js -prr(obj, 'foo', 'bar', { enumerable: true, writable: true }) -``` - -Do the same operation for multiple properties: - -```js -prr(obj, { one: 'one', two: 'two' }) -// or with options: -prr(obj, { one: 'one', two: 'two' }, { enumerable: true, writable: true }) -``` - -But obviously, having to write out the full options object makes it nearly as bad as the original `Object.defineProperty()` so we can **simplify**. - -As an alternative method we can use an options string where each character represents a option: `'e'=='enumerable'`, `'c'=='configurable'` and `'w'=='writable'`: - -```js -prr(obj, 'foo', 'bar', 'ew') // enumerable and writable but not configurable -// muliple properties: -prr(obj, { one: 'one', two: 'two' }, 'ewc') // configurable too -``` - -## Where can I use it? - -Anywhere! For pre-ES5 environments *prr* will simply fall-back to an `object[property] = value` so you can get close to what you want. - -*prr* is Ender-compatible so you can include it in your Ender build and `$.prr(...)` or `var prr = require('prr'); prr(...)`. - -## Licence - -prr is Copyright (c) 2013 Rod Vagg [@rvagg](https://twitter.com/rvagg) and licensed under the MIT licence. All rights not explicitly granted in the MIT license are reserved. See the included LICENSE file for more details. \ No newline at end of file diff --git a/node_modules/prr/package.json b/node_modules/prr/package.json deleted file mode 100644 index 06ce1e5d..00000000 --- a/node_modules/prr/package.json +++ /dev/null @@ -1,87 +0,0 @@ -{ - "_args": [ - [ - { - "raw": "prr@~0.0.0", - "scope": null, - "escapedName": "prr", - "name": "prr", - "rawSpec": "~0.0.0", - "spec": ">=0.0.0 <0.1.0", - "type": "range" - }, - "/Users/benjaminarias/Desktop/poly/node_modules/errno" - ] - ], - "_from": "prr@>=0.0.0 <0.1.0", - "_id": "prr@0.0.0", - "_inCache": true, - "_installable": true, - "_location": "/prr", - "_npmUser": { - "name": "rvagg", - "email": "rod@vagg.org" - }, - "_npmVersion": "1.2.15", - "_phantomChildren": {}, - "_requested": { - "raw": "prr@~0.0.0", - "scope": null, - "escapedName": "prr", - "name": "prr", - "rawSpec": "~0.0.0", - "spec": ">=0.0.0 <0.1.0", - "type": "range" - }, - "_requiredBy": [ - "/errno", - "/levelup" - ], - "_resolved": "https://registry.npmjs.org/prr/-/prr-0.0.0.tgz", - "_shasum": "1a84b85908325501411853d0081ee3fa86e2926a", - "_shrinkwrap": null, - "_spec": "prr@~0.0.0", - "_where": "/Users/benjaminarias/Desktop/poly/node_modules/errno", - "authors": [ - "Rod Vagg (https://github.com/rvagg)" - ], - "bugs": { - "url": "https://github.com/rvagg/prr/issues" - }, - "dependencies": {}, - "description": "A better Object.defineProperty()", - "devDependencies": { - "tap": "*" - }, - "directories": {}, - "dist": { - "shasum": "1a84b85908325501411853d0081ee3fa86e2926a", - "tarball": "https://registry.npmjs.org/prr/-/prr-0.0.0.tgz" - }, - "homepage": "https://github.com/rvagg/prr", - "keywords": [ - "property", - "properties", - "defineProperty", - "ender" - ], - "license": "MIT", - "main": "./prr.js", - "maintainers": [ - { - "name": "rvagg", - "email": "rod@vagg.org" - } - ], - "name": "prr", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git+https://github.com/rvagg/prr.git" - }, - "scripts": { - "test": "node ./test.js" - }, - "version": "0.0.0" -} diff --git a/node_modules/prr/prr.js b/node_modules/prr/prr.js deleted file mode 100644 index 94f58628..00000000 --- a/node_modules/prr/prr.js +++ /dev/null @@ -1,63 +0,0 @@ -/*! - * prr - * (c) 2013 Rod Vagg - * https://github.com/rvagg/prr - * License: MIT - */ - -(function (name, context, definition) { - if (typeof module != 'undefined' && module.exports) - module.exports = definition() - else - context[name] = definition() -})('prr', this, function() { - - var setProperty = typeof Object.defineProperty == 'function' - ? function (obj, key, options) { - Object.defineProperty(obj, key, options) - return obj - } - : function (obj, key, options) { // < es5 - obj[key] = options.value - return obj - } - - , makeOptions = function (value, options) { - var oo = typeof options == 'object' - , os = !oo && typeof options == 'string' - , op = function (p) { - return oo - ? !!options[p] - : os - ? options.indexOf(p[0]) > -1 - : false - } - - return { - enumerable : op('enumerable') - , configurable : op('configurable') - , writable : op('writable') - , value : value - } - } - - , prr = function (obj, key, value, options) { - var k - - options = makeOptions(value, options) - - if (typeof key == 'object') { - for (k in key) { - if (Object.hasOwnProperty.call(key, k)) { - options.value = key[k] - setProperty(obj, k, options) - } - } - return obj - } - - return setProperty(obj, key, options) - } - - return prr -}) \ No newline at end of file diff --git a/node_modules/prr/test.js b/node_modules/prr/test.js deleted file mode 100644 index 5222e307..00000000 --- a/node_modules/prr/test.js +++ /dev/null @@ -1,169 +0,0 @@ -const test = require('tap').test - , prr = require('./') - -test('test prr(o, key, value) form', function (t) { - t.plan(2) - - var o = {} - prr(o, 'foo', 'bar') - t.equal(o.foo, 'bar', 'correct value') - t.deepEqual( - Object.getOwnPropertyDescriptor(o, 'foo') - , { - enumerable : false - , configurable : false - , writable : false - , value : 'bar' - } - , 'correct property descriptor' - ) - t.end() -}) - -test('test prr(o, { key: value }) form', function (t) { - t.plan(2) - - var o = {} - prr(o, { foo: 'bar' }) - - t.equal(o.foo, 'bar', 'correct value') - t.deepEqual( - Object.getOwnPropertyDescriptor(o, 'foo') - , { - enumerable : false - , configurable : false - , writable : false - , value : 'bar' - } - , 'correct property descriptor' - ) - t.end() -}) - -test('test multiple key:value pairs', function (t) { - var o = { foo: 'bar' } - - prr(o, { one: 'ONE', two: 'TWO', obj: { o: 'o' }}) - - t.deepEqual(o, { foo: 'bar' }, 'properties are not enumerable') - t.equal(o.one, 'ONE', 'correctly set property') - t.equal(o.two, 'TWO', 'correctly set property') - t.deepEqual(o.obj, { o: 'o' }, 'correctly set property') - - ;[ 'one', 'two', 'obj' ].forEach(function (p) { - t.deepEqual( - Object.getOwnPropertyDescriptor(o, p) - , { - enumerable : false - , configurable : false - , writable : false - , value : p == 'obj' ? { o: 'o' } : p.toUpperCase() - } - , 'correct property descriptor' - ) - }) - - t.end() -}) - -test('test descriptor options', function (t) { - var o = {} - - prr(o, 'foo', 'bar', { - enumerable : true - , configurable : false - }) - t.equal(o.foo, 'bar', 'correct value') - t.deepEqual( - Object.getOwnPropertyDescriptor(o, 'foo') - , { - enumerable : true - , configurable : false - , writable : false - , value : 'bar' - } - , 'correct property descriptor' - ) - - prr(o, 'foo2', 'bar2', { - enumerable : true - , configurable : true - , writable : false - }) - t.equal(o.foo2, 'bar2', 'correct value') - t.deepEqual( - Object.getOwnPropertyDescriptor(o, 'foo2') - , { - enumerable : true - , configurable : true - , writable : false - , value : 'bar2' - } - , 'correct property descriptor' - ) - - prr(o, 'foo3', 'bar3', { - enumerable : true - , configurable : true - , writable : true - }) - t.equal(o.foo3, 'bar3', 'correct value') - t.deepEqual( - Object.getOwnPropertyDescriptor(o, 'foo3') - , { - enumerable : true - , configurable : true - , writable : true - , value : 'bar3' - } - , 'correct property descriptor' - ) - - t.end() -}) - - -test('test descriptor options, string form', function (t) { - var o = {} - - prr(o, 'foo', 'bar', 'e') - t.equal(o.foo, 'bar', 'correct value') - t.deepEqual( - Object.getOwnPropertyDescriptor(o, 'foo') - , { - enumerable : true - , configurable : false - , writable : false - , value : 'bar' - } - , 'correct property descriptor' - ) - - prr(o, 'foo2', 'bar2', 'ec') - t.equal(o.foo2, 'bar2', 'correct value') - t.deepEqual( - Object.getOwnPropertyDescriptor(o, 'foo2') - , { - enumerable : true - , configurable : true - , writable : false - , value : 'bar2' - } - , 'correct property descriptor' - ) - - prr(o, 'foo3', 'bar3', 'ecw') - t.equal(o.foo3, 'bar3', 'correct value') - t.deepEqual( - Object.getOwnPropertyDescriptor(o, 'foo3') - , { - enumerable : true - , configurable : true - , writable : true - , value : 'bar3' - } - , 'correct property descriptor' - ) - - t.end() -}) diff --git a/node_modules/public-encrypt/.travis.yml b/node_modules/public-encrypt/.travis.yml deleted file mode 100644 index 1b726667..00000000 --- a/node_modules/public-encrypt/.travis.yml +++ /dev/null @@ -1,6 +0,0 @@ -language: node_js -node_js: - - "0.10" - - "0.11" - - "0.12" - - iojs \ No newline at end of file diff --git a/node_modules/public-encrypt/browser.js b/node_modules/public-encrypt/browser.js deleted file mode 100644 index 0e4fabf1..00000000 --- a/node_modules/public-encrypt/browser.js +++ /dev/null @@ -1,10 +0,0 @@ -exports.publicEncrypt = require('./publicEncrypt'); -exports.privateDecrypt = require('./privateDecrypt'); - -exports.privateEncrypt = function privateEncrypt(key, buf) { - return exports.publicEncrypt(key, buf, true); -}; - -exports.publicDecrypt = function publicDecrypt(key, buf) { - return exports.privateDecrypt(key, buf, true); -}; \ No newline at end of file diff --git a/node_modules/public-encrypt/index.js b/node_modules/public-encrypt/index.js deleted file mode 100644 index bec688e1..00000000 --- a/node_modules/public-encrypt/index.js +++ /dev/null @@ -1,18 +0,0 @@ -var crypto = require('crypto'); -if (typeof crypto.publicEncrypt !== 'function') { - crypto = require('./browser'); -} -exports.publicEncrypt = crypto.publicEncrypt; -exports.privateDecrypt = crypto.privateDecrypt; - -if (typeof crypto.privateEncrypt !== 'function') { - exports.privateEncrypt = require('./browser').privateEncrypt; -} else { - exports.privateEncrypt = crypto.privateEncrypt; -} - -if (typeof crypto.publicDecrypt !== 'function') { - exports.publicDecrypt = require('./browser').publicDecrypt; -} else { - exports.publicDecrypt = crypto.publicDecrypt; -} \ No newline at end of file diff --git a/node_modules/public-encrypt/mgf.js b/node_modules/public-encrypt/mgf.js deleted file mode 100644 index ff727448..00000000 --- a/node_modules/public-encrypt/mgf.js +++ /dev/null @@ -1,16 +0,0 @@ -var createHash = require('create-hash'); -module.exports = function (seed, len) { - var t = new Buffer(''); - var i = 0, c; - while (t.length < len) { - c = i2ops(i++); - t = Buffer.concat([t, createHash('sha1').update(seed).update(c).digest()]); - } - return t.slice(0, len); -}; - -function i2ops(c) { - var out = new Buffer(4); - out.writeUInt32BE(c,0); - return out; -} \ No newline at end of file diff --git a/node_modules/public-encrypt/package.json b/node_modules/public-encrypt/package.json deleted file mode 100644 index ae2b29bb..00000000 --- a/node_modules/public-encrypt/package.json +++ /dev/null @@ -1,106 +0,0 @@ -{ - "_args": [ - [ - { - "raw": "public-encrypt@^4.0.0", - "scope": null, - "escapedName": "public-encrypt", - "name": "public-encrypt", - "rawSpec": "^4.0.0", - "spec": ">=4.0.0 <5.0.0", - "type": "range" - }, - "/Users/benjaminarias/Desktop/poly/node_modules/crypto-browserify" - ] - ], - "_from": "public-encrypt@>=4.0.0 <5.0.0", - "_id": "public-encrypt@4.0.0", - "_inCache": true, - "_installable": true, - "_location": "/public-encrypt", - "_nodeVersion": "4.2.1", - "_npmUser": { - "name": "cwmma", - "email": "calvin.metcalf@gmail.com" - }, - "_npmVersion": "2.9.0", - "_phantomChildren": {}, - "_requested": { - "raw": "public-encrypt@^4.0.0", - "scope": null, - "escapedName": "public-encrypt", - "name": "public-encrypt", - "rawSpec": "^4.0.0", - "spec": ">=4.0.0 <5.0.0", - "type": "range" - }, - "_requiredBy": [ - "/crypto-browserify" - ], - "_resolved": "https://registry.npmjs.org/public-encrypt/-/public-encrypt-4.0.0.tgz", - "_shasum": "39f699f3a46560dd5ebacbca693caf7c65c18cc6", - "_shrinkwrap": null, - "_spec": "public-encrypt@^4.0.0", - "_where": "/Users/benjaminarias/Desktop/poly/node_modules/crypto-browserify", - "author": "", - "browser": "browser.js", - "bugs": { - "url": "https://github.com/crypto-browserify/publicEncrypt/issues" - }, - "dependencies": { - "bn.js": "^4.1.0", - "browserify-rsa": "^4.0.0", - "create-hash": "^1.1.0", - "parse-asn1": "^5.0.0", - "randombytes": "^2.0.1" - }, - "description": "browserify version of publicEncrypt & privateDecrypt", - "devDependencies": { - "tap-spec": "^2.1.2", - "tape": "^3.0.3" - }, - "directories": { - "test": "test" - }, - "dist": { - "shasum": "39f699f3a46560dd5ebacbca693caf7c65c18cc6", - "tarball": "https://registry.npmjs.org/public-encrypt/-/public-encrypt-4.0.0.tgz" - }, - "gitHead": "e7654c62f2929caeae09bcf6e3572b1aafcbd8b1", - "homepage": "https://github.com/crypto-browserify/publicEncrypt", - "license": "MIT", - "main": "index.js", - "maintainers": [ - { - "name": "cwmma", - "email": "calvin.metcalf@gmail.com" - }, - { - "name": "dcousens", - "email": "email@dcousens.com" - }, - { - "name": "dominictarr", - "email": "dominic.tarr@gmail.com" - }, - { - "name": "jprichardson", - "email": "jprichardson@gmail.com" - }, - { - "name": "indutny", - "email": "fedor@indutny.com" - } - ], - "name": "public-encrypt", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git+https://github.com/crypto-browserify/publicEncrypt.git" - }, - "scripts": { - "test": "node test/index.js | tspec" - }, - "version": "4.0.0" -} diff --git a/node_modules/public-encrypt/privateDecrypt.js b/node_modules/public-encrypt/privateDecrypt.js deleted file mode 100644 index 9047c0e0..00000000 --- a/node_modules/public-encrypt/privateDecrypt.js +++ /dev/null @@ -1,108 +0,0 @@ -var parseKeys = require('parse-asn1'); -var mgf = require('./mgf'); -var xor = require('./xor'); -var bn = require('bn.js'); -var crt = require('browserify-rsa'); -var createHash = require('create-hash'); -var withPublic = require('./withPublic'); -module.exports = function privateDecrypt(private_key, enc, reverse) { - var padding; - if (private_key.padding) { - padding = private_key.padding; - } else if (reverse) { - padding = 1; - } else { - padding = 4; - } - - var key = parseKeys(private_key); - var k = key.modulus.byteLength(); - if (enc.length > k || new bn(enc).cmp(key.modulus) >= 0) { - throw new Error('decryption error'); - } - var msg; - if (reverse) { - msg = withPublic(new bn(enc), key); - } else { - msg = crt(enc, key); - } - var zBuffer = new Buffer(k - msg.length); - zBuffer.fill(0); - msg = Buffer.concat([zBuffer, msg], k); - if (padding === 4) { - return oaep(key, msg); - } else if (padding === 1) { - return pkcs1(key, msg, reverse); - } else if (padding === 3) { - return msg; - } else { - throw new Error('unknown padding'); - } -}; - -function oaep(key, msg){ - var n = key.modulus; - var k = key.modulus.byteLength(); - var mLen = msg.length; - var iHash = createHash('sha1').update(new Buffer('')).digest(); - var hLen = iHash.length; - var hLen2 = 2 * hLen; - if (msg[0] !== 0) { - throw new Error('decryption error'); - } - var maskedSeed = msg.slice(1, hLen + 1); - var maskedDb = msg.slice(hLen + 1); - var seed = xor(maskedSeed, mgf(maskedDb, hLen)); - var db = xor(maskedDb, mgf(seed, k - hLen - 1)); - if (compare(iHash, db.slice(0, hLen))) { - throw new Error('decryption error'); - } - var i = hLen; - while (db[i] === 0) { - i++; - } - if (db[i++] !== 1) { - throw new Error('decryption error'); - } - return db.slice(i); -} - -function pkcs1(key, msg, reverse){ - var p1 = msg.slice(0, 2); - var i = 2; - var status = 0; - while (msg[i++] !== 0) { - if (i >= msg.length) { - status++; - break; - } - } - var ps = msg.slice(2, i - 1); - var p2 = msg.slice(i - 1, i); - - if ((p1.toString('hex') !== '0002' && !reverse) || (p1.toString('hex') !== '0001' && reverse)){ - status++; - } - if (ps.length < 8) { - status++; - } - if (status) { - throw new Error('decryption error'); - } - return msg.slice(i); -} -function compare(a, b){ - a = new Buffer(a); - b = new Buffer(b); - var dif = 0; - var len = a.length; - if (a.length !== b.length) { - dif++; - len = Math.min(a.length, b.length); - } - var i = -1; - while (++i < len) { - dif += (a[i] ^ b[i]); - } - return dif; -} \ No newline at end of file diff --git a/node_modules/public-encrypt/publicEncrypt.js b/node_modules/public-encrypt/publicEncrypt.js deleted file mode 100644 index f1ce4046..00000000 --- a/node_modules/public-encrypt/publicEncrypt.js +++ /dev/null @@ -1,95 +0,0 @@ -var parseKeys = require('parse-asn1'); -var randomBytes = require('randombytes'); -var createHash = require('create-hash'); -var mgf = require('./mgf'); -var xor = require('./xor'); -var bn = require('bn.js'); -var withPublic = require('./withPublic'); -var crt = require('browserify-rsa'); - -var constants = { - RSA_PKCS1_OAEP_PADDING: 4, - RSA_PKCS1_PADDIN: 1, - RSA_NO_PADDING: 3 -}; - -module.exports = function publicEncrypt(public_key, msg, reverse) { - var padding; - if (public_key.padding) { - padding = public_key.padding; - } else if (reverse) { - padding = 1; - } else { - padding = 4; - } - var key = parseKeys(public_key); - var paddedMsg; - if (padding === 4) { - paddedMsg = oaep(key, msg); - } else if (padding === 1) { - paddedMsg = pkcs1(key, msg, reverse); - } else if (padding === 3) { - paddedMsg = new bn(msg); - if (paddedMsg.cmp(key.modulus) >= 0) { - throw new Error('data too long for modulus'); - } - } else { - throw new Error('unknown padding'); - } - if (reverse) { - return crt(paddedMsg, key); - } else { - return withPublic(paddedMsg, key); - } -}; - -function oaep(key, msg){ - var k = key.modulus.byteLength(); - var mLen = msg.length; - var iHash = createHash('sha1').update(new Buffer('')).digest(); - var hLen = iHash.length; - var hLen2 = 2 * hLen; - if (mLen > k - hLen2 - 2) { - throw new Error('message too long'); - } - var ps = new Buffer(k - mLen - hLen2 - 2); - ps.fill(0); - var dblen = k - hLen - 1; - var seed = randomBytes(hLen); - var maskedDb = xor(Buffer.concat([iHash, ps, new Buffer([1]), msg], dblen), mgf(seed, dblen)); - var maskedSeed = xor(seed, mgf(maskedDb, hLen)); - return new bn(Buffer.concat([new Buffer([0]), maskedSeed, maskedDb], k)); -} -function pkcs1(key, msg, reverse){ - var mLen = msg.length; - var k = key.modulus.byteLength(); - if (mLen > k - 11) { - throw new Error('message too long'); - } - var ps; - if (reverse) { - ps = new Buffer(k - mLen - 3); - ps.fill(0xff); - } else { - ps = nonZero(k - mLen - 3); - } - return new bn(Buffer.concat([new Buffer([0, reverse?1:2]), ps, new Buffer([0]), msg], k)); -} -function nonZero(len, crypto) { - var out = new Buffer(len); - var i = 0; - var cache = randomBytes(len*2); - var cur = 0; - var num; - while (i < len) { - if (cur === cache.length) { - cache = randomBytes(len*2); - cur = 0; - } - num = cache[cur++]; - if (num) { - out[i++] = num; - } - } - return out; -} \ No newline at end of file diff --git a/node_modules/public-encrypt/readme.md b/node_modules/public-encrypt/readme.md deleted file mode 100644 index 47c69401..00000000 --- a/node_modules/public-encrypt/readme.md +++ /dev/null @@ -1,6 +0,0 @@ -publicEncrypt -=== - -[![Build Status](https://travis-ci.org/crypto-browserify/publicEncrypt.svg)](https://travis-ci.org/crypto-browserify/publicEncrypt) - -publicEncrypt/privateDecrypt for browserify \ No newline at end of file diff --git a/node_modules/public-encrypt/test/1024.priv b/node_modules/public-encrypt/test/1024.priv deleted file mode 100644 index 72062169..00000000 --- a/node_modules/public-encrypt/test/1024.priv +++ /dev/null @@ -1,16 +0,0 @@ ------BEGIN PRIVATE KEY----- -MIICdwIBADANBgkqhkiG9w0BAQEFAASCAmEwggJdAgEAAoGBAKulUTZ8B1qccZ8c -DXRGSY08gW8KvLlcxxxGC4gZHNT3CBUF8n5R4KE30aZyYZ/rtsQZu05juZJxaJ0q -mbe75dlQ5d+Xc9BMXeQg/MpTZw5TAN7OIdGYYpFBe+1PLZ6wEfjkYrMqMUcfq2Lq -hTLdAbvBJnuRcYZLqmBeOQ8FTrKrAgMBAAECgYEAnkHRbEPU3/WISSQrP36iyCb2 -S/SBZwKkzmvCrBxDWhPeDswp9c/2JY76rNWfLzy8iXgUG8WUzvHje61Qh3gmBcKe -bUaTGl4Vy8Ha1YBADo5RfRrdm0FE4tvgvu/TkqFqpBBZweu54285hk5zlG7n/D7Y -dnNXUpu5MlNb5x3gW0kCQQDUL//cwcXUxY/evaJP4jSe+ZwEQZo+zXRLiPUulBoV -aw28CVMuxdgwqAo1X1IKefPeUaf7RQu8gCKaRnpGuEuXAkEAzxZTfMmvmCUDIew4 -5Gk6bK265XQWdhcgiq254lpBGOYmDj9yCE7yA+zmASQwMsXTdQOi1hOCEyrXuSJ5 -c++EDQJAFh3WrnzoEPByuYXMmET8tSFRWMQ5vpgNqh3haHR5b4gUC2hxaiunCBNL -1RpVY9AoUiDywGcG/SPh93CnKB3niwJBAKP7AtsifZgVXtiizB4aMThTjVYaSZrz -D0Kg9DuHylpkDChmFu77TGrNUQgAVuYtfhb/bRblVa/F0hJ4eQHT3JUCQBVT68tb -OgRUk0aP9tC3021VN82X6+klowSQN8oBPX8+TfDWSUilp/+j24Hky+Z29Do7yR/R -qutnL92CvBlVLV4= ------END PRIVATE KEY----- diff --git a/node_modules/public-encrypt/test/1024.pub b/node_modules/public-encrypt/test/1024.pub deleted file mode 100644 index 2dba785d..00000000 --- a/node_modules/public-encrypt/test/1024.pub +++ /dev/null @@ -1,6 +0,0 @@ ------BEGIN PUBLIC KEY----- -MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCrpVE2fAdanHGfHA10RkmNPIFv -Cry5XMccRguIGRzU9wgVBfJ+UeChN9GmcmGf67bEGbtOY7mScWidKpm3u+XZUOXf -l3PQTF3kIPzKU2cOUwDeziHRmGKRQXvtTy2esBH45GKzKjFHH6ti6oUy3QG7wSZ7 -kXGGS6pgXjkPBU6yqwIDAQAB ------END PUBLIC KEY----- diff --git a/node_modules/public-encrypt/test/ec.pass.priv b/node_modules/public-encrypt/test/ec.pass.priv deleted file mode 100644 index bf1836d5..00000000 --- a/node_modules/public-encrypt/test/ec.pass.priv +++ /dev/null @@ -1,7 +0,0 @@ ------BEGIN ENCRYPTED PRIVATE KEY----- -MIHeMEkGCSqGSIb3DQEFDTA8MBsGCSqGSIb3DQEFDDAOBAi9LqZQx4JFXAICCAAw -HQYJYIZIAWUDBAECBBA+js1fG4Rv/yRN7oZvxbgyBIGQ/D4yj86M1x8lMsnAHQ/K -7/ryb/baDNHqN9LTZanEGBuyxgrTzt08SiL+h91yFGMoaly029K1VgEI8Lxu5Np/ -A+LK7ewh73ABzsbuxYdcXI+rKnrvLN9Tt6veDs4GlqTTsWwq5wF0C+6gaYRBXA74 -T1b6NykGh2UNL5U5pHZEYdOVLz+lRJL7gYqlweNHP/S3 ------END ENCRYPTED PRIVATE KEY----- diff --git a/node_modules/public-encrypt/test/ec.priv b/node_modules/public-encrypt/test/ec.priv deleted file mode 100644 index 25fffbd8..00000000 --- a/node_modules/public-encrypt/test/ec.priv +++ /dev/null @@ -1,5 +0,0 @@ ------BEGIN EC PRIVATE KEY----- -MHQCAQEEIDF6Xv8Sv//wGUWD+c780ppGrU0QdZWCAzxAQPQX8r/uoAcGBSuBBAAK -oUQDQgAEIZeowDylls4K/wfBjO18bYo7gGx8nYQRija4e/qEMikOHJai7geeUreU -r5Xky/Ax7s2dGtegsPNsPgGe5MpQvg== ------END EC PRIVATE KEY----- diff --git a/node_modules/public-encrypt/test/ec.pub b/node_modules/public-encrypt/test/ec.pub deleted file mode 100644 index 2e39e5bb..00000000 --- a/node_modules/public-encrypt/test/ec.pub +++ /dev/null @@ -1,4 +0,0 @@ ------BEGIN PUBLIC KEY----- -MFYwEAYHKoZIzj0CAQYFK4EEAAoDQgAEIZeowDylls4K/wfBjO18bYo7gGx8nYQR -ija4e/qEMikOHJai7geeUreUr5Xky/Ax7s2dGtegsPNsPgGe5MpQvg== ------END PUBLIC KEY----- diff --git a/node_modules/public-encrypt/test/index.js b/node_modules/public-encrypt/test/index.js deleted file mode 100644 index ea472b62..00000000 --- a/node_modules/public-encrypt/test/index.js +++ /dev/null @@ -1,117 +0,0 @@ -var test = require('tape'); -var fs = require('fs'); -var constants = require('constants'); -var parseKeys = require('parse-asn1'); -require('./nodeTests'); -var priv1024 = fs.readFileSync(__dirname + '/rsa.1024.priv'); -var rsa1024 = { - private: fs.readFileSync(__dirname + '/rsa.1024.priv'), - public: fs.readFileSync(__dirname + '/rsa.1024.pub') -}; -var rsa1024priv = { - private: fs.readFileSync(__dirname + '/rsa.1024.priv'), - public: fs.readFileSync(__dirname + '/rsa.1024.priv') -}; -var rsa1024 = { - private: fs.readFileSync(__dirname + '/rsa.1024.priv'), - public: fs.readFileSync(__dirname + '/rsa.1024.pub') -}; -var rsa2028 = { - private: fs.readFileSync(__dirname + '/rsa.2028.priv'), - public: fs.readFileSync(__dirname + '/rsa.2028.pub') -}; -var nonrsa1024 = { - private: fs.readFileSync(__dirname + '/1024.priv'), - public: fs.readFileSync(__dirname + '/1024.pub') -}; -var nonrsa1024str = { - private: fs.readFileSync(__dirname + '/1024.priv').toString(), - public: fs.readFileSync(__dirname + '/1024.pub').toString() -}; -var pass1024 = { - private: { - passphrase: 'fooo', - key:fs.readFileSync(__dirname + '/pass.1024.priv') - }, - public: fs.readFileSync(__dirname + '/pass.1024.pub') -}; -var pass2028 = { - private: { - passphrase: 'password', - key:fs.readFileSync(__dirname + '/rsa.pass.priv') - }, - public: fs.readFileSync(__dirname + '/rsa.pass.pub') -}; - -var nodeCrypto = require('../'); -var myCrypto = require('../browser'); -function _testIt(keys, message, t) { - var pub = keys.public; - var priv = keys.private; - t.test(message.toString(), function (t) { - t.plan(8); - - var myEnc = myCrypto.publicEncrypt(pub, message); - var nodeEnc = nodeCrypto.publicEncrypt(pub, message); - t.equals(myCrypto.privateDecrypt(priv, myEnc).toString('hex'), message.toString('hex'), 'my decrypter my message'); - t.equals(myCrypto.privateDecrypt(priv, nodeEnc).toString('hex'), message.toString('hex'), 'my decrypter node\'s message'); - t.equals(nodeCrypto.privateDecrypt(priv, myEnc).toString('hex'), message.toString('hex'), 'node decrypter my message'); - t.equals(nodeCrypto.privateDecrypt(priv, nodeEnc).toString('hex'), message.toString('hex'), 'node decrypter node\'s message'); - myEnc = myCrypto.privateEncrypt(priv, message); - nodeEnc = nodeCrypto.privateEncrypt(priv, message); - t.equals(myCrypto.publicDecrypt(pub, myEnc).toString('hex'), message.toString('hex'), 'reverse methods my decrypter my message'); - t.equals(myCrypto.publicDecrypt(pub, nodeEnc).toString('hex'), message.toString('hex'), 'reverse methods my decrypter node\'s message'); - t.equals(nodeCrypto.publicDecrypt(pub, myEnc).toString('hex'), message.toString('hex'), 'reverse methods node decrypter my message'); - t.equals(nodeCrypto.publicDecrypt(pub, nodeEnc).toString('hex'), message.toString('hex'), 'reverse methods node decrypter node\'s message'); - - }); -} -function testIt(keys, message, t) { - _testIt(keys, message, t); - _testIt(paddingObject(keys, 1), Buffer.concat([message, new Buffer(' with RSA_PKCS1_PADDING')]), t); - var parsedKey = parseKeys(keys.public); - var k = parsedKey.modulus.byteLength(); - var zBuf = new Buffer(k); - zBuf.fill(0); - var msg = Buffer.concat([zBuf, message, new Buffer(' with no padding')]).slice(-k); - _testIt(paddingObject(keys, 3), msg, t); -} -function paddingObject(keys, padding) { - return { - public: addPadding(keys.public, padding), - private: addPadding(keys.private, padding) - }; -} -function addPadding(key, padding) { - if (typeof key === 'string' || Buffer.isBuffer(key)) { - return { - key: key, - padding: padding - }; - } - var out = { - key: key.key, - padding:padding - }; - if ('passphrase' in key) { - out.passphrase = key.passphrase; - } - return out; -} -function testRun(i) { - test('run ' + i, function (t) { - testIt(rsa1024priv, new Buffer('1024 2 private keys'), t); - testIt(rsa1024, new Buffer('1024 keys'), t); - testIt(rsa2028, new Buffer('2028 keys'), t); - testIt(nonrsa1024, new Buffer('1024 keys non-rsa key'), t); - testIt(pass1024, new Buffer('1024 keys and password'), t); - testIt(nonrsa1024str, new Buffer('1024 keys non-rsa key as a string'), t); - testIt(pass2028, new Buffer('2028 rsa key with variant passwords'), t); - }); -} - -var i = 0; -var num = 20; -while (++i <= 20) { - testRun(i); -} diff --git a/node_modules/public-encrypt/test/nodeTests.js b/node_modules/public-encrypt/test/nodeTests.js deleted file mode 100644 index f168e934..00000000 --- a/node_modules/public-encrypt/test/nodeTests.js +++ /dev/null @@ -1,51 +0,0 @@ -var crypto = require('../browser'); -var test = require('tape'); -var fs = require('fs'); - -// Test RSA encryption/decryption -test('node tests', function (t) { - var certPem = fs.readFileSync(__dirname + '/test_cert.pem', 'ascii'); - var keyPem = fs.readFileSync(__dirname + '/test_key.pem', 'ascii'); - var rsaPubPem = fs.readFileSync(__dirname + '/test_rsa_pubkey.pem', - 'ascii'); - var rsaKeyPem = fs.readFileSync(__dirname + '/test_rsa_privkey.pem', - 'ascii'); - var rsaKeyPemEncrypted = fs.readFileSync( - __dirname + '/test_rsa_privkey_encrypted.pem', 'ascii'); - var input = 'I AM THE WALRUS'; - var bufferToEncrypt = new Buffer(input); - - var encryptedBuffer = crypto.publicEncrypt(rsaPubPem, bufferToEncrypt); - - var decryptedBuffer = crypto.privateDecrypt(rsaKeyPem, encryptedBuffer); - t.equal(input, decryptedBuffer.toString()); - - var decryptedBufferWithPassword = crypto.privateDecrypt({ - key: rsaKeyPemEncrypted, - passphrase: 'password' - }, encryptedBuffer); - t.equal(input, decryptedBufferWithPassword.toString()); - - // encryptedBuffer = crypto.publicEncrypt(certPem, bufferToEncrypt); - - // decryptedBuffer = crypto.privateDecrypt(keyPem, encryptedBuffer); - // t.equal(input, decryptedBuffer.toString()); - - encryptedBuffer = crypto.publicEncrypt(keyPem, bufferToEncrypt); - - decryptedBuffer = crypto.privateDecrypt(keyPem, encryptedBuffer); - t.equal(input, decryptedBuffer.toString()); - - encryptedBuffer = crypto.privateEncrypt(keyPem, bufferToEncrypt); - - decryptedBuffer = crypto.publicDecrypt(keyPem, encryptedBuffer); - t.equal(input, decryptedBuffer.toString()); - - t.throws(function() { - crypto.privateDecrypt({ - key: rsaKeyPemEncrypted, - passphrase: 'wrong' - }, encryptedBuffer); - }); - t.end(); -}); \ No newline at end of file diff --git a/node_modules/public-encrypt/test/pass.1024.priv b/node_modules/public-encrypt/test/pass.1024.priv deleted file mode 100644 index b9f38845..00000000 --- a/node_modules/public-encrypt/test/pass.1024.priv +++ /dev/null @@ -1,18 +0,0 @@ ------BEGIN ENCRYPTED PRIVATE KEY----- -MIICzzBJBgkqhkiG9w0BBQ0wPDAbBgkqhkiG9w0BBQwwDgQIji3ZZ6JbsA4CAggA -MB0GCWCGSAFlAwQBFgQQC6MKblq8zyX90/KmgotsMQSCAoDghNf+yxPC/KRh7F3O -k0lMgtDkV+wCLDv7aBvUqy8Ry2zqFPIlfLb8XtSW943XEu6KUI13IZPEr8p9h1ve -Iye6L0g6uAgbFxBE2DwBBSI7mYr7lokr4v0k+inMKf4JeRdI9XWgwOILKTGf1vH7 -PhvBnqLhOg6BIOuF426qpiyYlmRda74d0Th4o6ZyhyMSzPI1XbWSg719Ew3N/tLe -OHdYl0eFrgNjq+xO4Ev+W7eNIh/XBMQtk9wo+mxeNdldRnX822HxTsL8fSSPs+9T -W5M/2EBTJMSsswSjZyFkq8ehtxovI2u0IBX1IiPulyUZLnSNPDV1eUVClK6rk+q1 -kVsfJhUr2qvIjNlQWlbEXQj4VwGtgl0++l8vdpj59MuN2J3Nx5TNMLjA6BYAa/tr -Bu928QoT7ET+SGx5XKCwKb5fwXmDlV5zZC4kZWTaF/d/Icvj5F+fDZuYFg1JOXNZ -+q2oA1qMYaHGX6lF3pbO84ebg1iwQTDM8iIqFeSMGUJTnk/3a7sqfaWQbEQwGb+X -fXnSTwkF+wO2rriPbFvWyzecWu67zDCP0ZWUgGb86sSJCM7xRGShESwCjOrb88F1 -5SZjyIqogrkc3IWiLH9gc5U8d86qoFjJnP6BfwYks1UIyXNGKfZTCqICpMphV+IS -b0N2jprjLTkWR6nxYGSH1bkKMs7x1M0FBLWWLAZqPn9X3pe6JwIBds04O6XjF0un -oxwDjcJdoxVs7PgRiM5d1Tubqu2zmpCCmXNiqi9B0+rV9/jHg9IA5gUfvYdCcEv+ -oAr90I+2+PuBFa9lgdbDV6DtZk4bSYluqamxVeLPg/vrewYfVfDv6jftfY1D0DEy -69H0 ------END ENCRYPTED PRIVATE KEY----- diff --git a/node_modules/public-encrypt/test/pass.1024.pub b/node_modules/public-encrypt/test/pass.1024.pub deleted file mode 100644 index 617e7fb1..00000000 --- a/node_modules/public-encrypt/test/pass.1024.pub +++ /dev/null @@ -1,6 +0,0 @@ ------BEGIN PUBLIC KEY----- -MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDSK/7i5BV0x+gmX16Wrm7kRkCZ -y1QUt6wiM2g+SAZTYR0381VnSMX2cv7CpN3499lZj1rL5S7YTaZZwX3RvU5fz56/ -eDX6ciL/PZsbclN2KdkMWYgmcb9J1zUeoMQ3cjfFUCdQZ/ZvDWa+wY2Zg8os2Bow -AoufHtYHm3eOly/cWwIDAQAB ------END PUBLIC KEY----- diff --git a/node_modules/public-encrypt/test/rsa.1024.priv b/node_modules/public-encrypt/test/rsa.1024.priv deleted file mode 100644 index d3b5fdab..00000000 --- a/node_modules/public-encrypt/test/rsa.1024.priv +++ /dev/null @@ -1,15 +0,0 @@ ------BEGIN RSA PRIVATE KEY----- -MIICVAIBAAJ/OwswbFo/uyC8ltGf/yA1A+gV5IGdnAgPbUSI3GzbHCA+x+TLG/tL -vbRw3r1smppY/jkkpiVW1ErSMuN0uixp5gb78Z9rH1XpWb5WWgp3WaY/9EHMjMdO -kQ/9LVZvRvl/M/Fi6owP+q+amJI1BEjECYfbhGL3rmlVdq4qXc40QwIDAQABAn8I -VZ0BPoAOhyF33KFMHxy8r28fsVgxJUYgM3NqQgdv4fFawCYXjhJz9duU5YJGFJGJ -WUGeHlkyYFlpi4f3m7tY7JawmQUWB0MNSoKHI3cgDX4/tfBN8ni+cO0eSoR5czBY -EsAHBU47p1awNFAHwd+ZEuv9H4RmMn7p279rQTtpAkAH3Nqs2/vrRF2cZUN4fIXf -4xHsQBByUayGq8a3J0UGaSFWv68zTUKFherr9uZotNp7NJ4jBXiARw0q8docXUG1 -AkAHgmOKHoORtAmikqpmFEJZOtsXMaLCIm4EszPo5ciYoLMBcVit09AdiQlt7ZJL -DY02svU1b0agCZ97kDkmHDkXAkACa8M9JELuDs/P/vIGYDkMVatIFfW6bWF02eFG -taWwMqCcSEsWvbw0xqYt34jURpNbCjmCyQVwYfAw/+TLhP9dAkAFwRjdwjw37qpj -ddg1mNiu37b7swFxmkiMOXZRxaNNsfb56A14RpN3zob3QdGUybGodMIKTFbmU/lu -CjqAxafJAkAG2yf6RWbwFIWfMyt7WYCh0VaGBCcgy574AinVieEo3ZZyFfC63+xm -3uoaNy4iLoJv4GCjqUBz3ZfcVaO/DDWG ------END RSA PRIVATE KEY----- diff --git a/node_modules/public-encrypt/test/rsa.1024.pub b/node_modules/public-encrypt/test/rsa.1024.pub deleted file mode 100644 index 7ba06369..00000000 --- a/node_modules/public-encrypt/test/rsa.1024.pub +++ /dev/null @@ -1,5 +0,0 @@ ------BEGIN RSA PUBLIC KEY----- -MIGGAn87CzBsWj+7ILyW0Z//IDUD6BXkgZ2cCA9tRIjcbNscID7H5Msb+0u9tHDe -vWyamlj+OSSmJVbUStIy43S6LGnmBvvxn2sfVelZvlZaCndZpj/0QcyMx06RD/0t -Vm9G+X8z8WLqjA/6r5qYkjUESMQJh9uEYveuaVV2ripdzjRDAgMBAAE= ------END RSA PUBLIC KEY----- diff --git a/node_modules/public-encrypt/test/rsa.2028.priv b/node_modules/public-encrypt/test/rsa.2028.priv deleted file mode 100644 index 10e651d8..00000000 --- a/node_modules/public-encrypt/test/rsa.2028.priv +++ /dev/null @@ -1,27 +0,0 @@ ------BEGIN RSA PRIVATE KEY----- -MIIEjwIBAAKB/gy7mjaWgPeFdVYDZWRCA9BNiv3pPb0es27+FKY0hszLaOw47ExC -tAWpDsH48TXAfyHBYwBLguayfk4LGIupxb+CGMbRo3xEp0CbfY1Jby26T9vGjRC1 -foHDDUJG84uaRbyHqaf4i6zt4gVR+xlAEIjkaFAAK8cOoXAT1CVqGLLljUCchL8P -jaHj/yriZ/S7rdwlI3LnABxwwmLrmR/v71WtpmO/aNG8N+1po+QwaghTkyQ59E/Z -vAuOkFWHok2q/R6PYAa2jdZ9zim0FqOP+nkQaEDRbBFBmBqTv5fFGfk2WsAfKf/R -G0/VFd+ZeM5251TeTvXH695nlSGauVl9AgMBAAECgf4LrWHY/l54ouThZWvvbrug -pfz6sJX2g9l7yXmWlEWsPECVo/7SUbpYFpt6OZy99zSg+IKbGqWKfdhoKrTwIVtC -L0YZ0NlmdnANSIz0roxQG7ZxkL5+vHSw/PmD9x4Uwf+Cz8hATCmNBv1qc60dkyuW -4CLqe72qaTiVWRoO1iagQghNcLoo6vSy65ExLaCDTPha7yu2vw4hFZpWiEjW4dxf -rFdLiix52BC86YlAlxME/rLg8IJVvilbyo9aWdXmxOaUTLRv6PkFD1/gVdw8V9Qr -SLN9FlK2kkjiX0dzoibvZw3tMnt3yydAx0X87+sMRVahC1bp3kVPz4Hy0EWX4QJ/ -PM31vGiuITk2NCd51DXt1Ltn2OP5FaJSmCaEjh0XkU4qouYyjXWt8Bu6BTCl2vua -Fg0Uji9C+IkPLmaUMbMIOwaTk8cWqLthSxsLe70J5OkGrgfKUM/w+BHH1Pt/Pjzj -C++l0kiFaOVDVaAV9GpLPLCBoK/PC9Rb/rxMMoCCNwJ/NZuedIny2w3LMii77h/T -zSvergNGhjY6Rnva8lLXJ6dlrkcPAyps3gWwxqj4NR0T+GM0bDUPVLb7M07XV7SX -v7VJGm52JbRGwM1ss+r8XTTNemeGk+WRxG7TgtsMqYGXLfB8Qxk/f5/Mcc00Tl8u -wXFNsfxJxmt6AbsTr3g36wJ/IhOnibz9Ad+nchlBnN3QeW3CKHqzaR18voqvtVm2 -kJfHK15prH/sSGmxmiEGgrCJTZxtDbaNCO7/VBjnKudUUIhCAwsLtuq0/zub9vAd -8G1scfIpv5qaSNzmKoX8bOwArvrS6wP7yKrcTsuWIlHD8rJVI7IEDnQoTp5G8fK1 -hwJ/MIh8M5v0r5dUYEv6oIJWGcle6AH1JmsP5WIafgq72Z2288pHcCFHwNY8Dg9J -76QswVLnUhPTlmm3EOOPGEtam2iAD5r0Afytlb4lbNoQsj2szeXONDXB+6oueajh -VNELUr8HcSP5lgzRZjJW6aFIzj9LDRmQnUAOjGSXVOQtEwJ/MCQZ7N/v4dIKeDRA -8d8UExZ3+gGHumziztGRJ0tQryZH2PakP5I7V+1l7qEUnJ2c3mF+e1v41Ep9LCvh -bzrPKw9dxh18g4b+7bMpsWPnsraKh6ipxc7aaOaZV0Dxgez4zcZu0P1olO0cN3KM -nxJ0Pds3R8bAhNCDdS2JZaRp5Q== ------END RSA PRIVATE KEY----- diff --git a/node_modules/public-encrypt/test/rsa.2028.pub b/node_modules/public-encrypt/test/rsa.2028.pub deleted file mode 100644 index b36dca4d..00000000 --- a/node_modules/public-encrypt/test/rsa.2028.pub +++ /dev/null @@ -1,8 +0,0 @@ ------BEGIN RSA PUBLIC KEY----- -MIIBBgKB/gy7mjaWgPeFdVYDZWRCA9BNiv3pPb0es27+FKY0hszLaOw47ExCtAWp -DsH48TXAfyHBYwBLguayfk4LGIupxb+CGMbRo3xEp0CbfY1Jby26T9vGjRC1foHD -DUJG84uaRbyHqaf4i6zt4gVR+xlAEIjkaFAAK8cOoXAT1CVqGLLljUCchL8PjaHj -/yriZ/S7rdwlI3LnABxwwmLrmR/v71WtpmO/aNG8N+1po+QwaghTkyQ59E/ZvAuO -kFWHok2q/R6PYAa2jdZ9zim0FqOP+nkQaEDRbBFBmBqTv5fFGfk2WsAfKf/RG0/V -Fd+ZeM5251TeTvXH695nlSGauVl9AgMBAAE= ------END RSA PUBLIC KEY----- diff --git a/node_modules/public-encrypt/test/rsa.pass.priv b/node_modules/public-encrypt/test/rsa.pass.priv deleted file mode 100644 index 99e82135..00000000 --- a/node_modules/public-encrypt/test/rsa.pass.priv +++ /dev/null @@ -1,30 +0,0 @@ ------BEGIN RSA PRIVATE KEY----- -Proc-Type: 4,ENCRYPTED -DEK-Info: AES-256-CBC,7A6A055AD675947A657041422F06D439 - -HQdjzAKUuqqKhZHmpzzY/monfqFhiHnZ5c24jtR9fM4aQJXf/e1fz6MEhyIz6XON -sb4CnXZstnxUuVWDkHEu6KWQ/dKALgiDUuT+UdMawVoVPGdgyWZp35pQPWi3fT2V -XZn58YkG8bO3Y403eZPyhadOefD1VtuFuK6/f90jjzx6ZDnwveXpYgFV7Jy1/pFd -cLLMf07C+hbk416nX6UVipWe4GH+ADFom5ZCfAaUotM7n8i149dULNF4YYi2wP31 -1YaDH5vf1CqiaieDY7xLzpEixwJz6ZEg3gLXaUvz2MpF8owiGI3eP0g7voWp3xt4 -TQx/qDURlaXiaRriWdWtpKyW1MFuJ5+KdNtR1/kXr2BLPB/ZLwyqtynUy8ZYpb4+ -WIRYpUGeb//ZHGhlCH7CRMdABsal4wTwnzi9fW4Ax96ecJ2SlwCuKxwS7iEq2y1/ -FAfGwsE+XufHhme5p6XjKfiHx+zJMIB2NMkrm+wm4PbMTrGVnw5/41/r6XxOB8fe -iKi12Jth4dusc1vYGYfzKop9uEM6CZ6+Chqzb+Zyh/xUiZVlCX/BYnxr7yXUm9aR -PHQgxkn2Act8FgQB3Kgs3jCiCRIJrlsnybeWzQ3YO9TjC4MxygmmwODDBpsOKnEi -kXXS54+cZFjcsva4uJVwhAywRPVUkLzmTkH0tGiwCHjeQNECm+TLahkkEIXrVTb9 -c9creNXMgE6jVVz+R43HXsGvTcgMcBLyFRQJe2nVaj/dQ5JbF4uqNnQzRjAbD34K -uTpFaJ/kmlgcmeScRLnwaoYwFlmhSC+bK0dfY1Jr6AQRA6IDP7nIjqWNDCHNBB8r -Qj1v2KWoVQe3xNHaXhkbJPbA2DKlUIqffkBVtMKtt9KuG3Rccf3bVYAW6oid73/D -z7DMAF5G/OpVR8VbGh1WxXuR7zEVDUwpwsp9ek5dqN8BnBz1ppdZNIKqzszneckU -s2l/6mZBmgV1Nfy/cQU6U5s3S1Xc75UDQVLms3CIOpFTRIpecNTdfa31fYy/svy0 -M2lWTbCva0dOyuvMUhTgBL4I7Qa2dUMPXHMZatV5ooHYq/BZJA1r84C5cM5r+umE -2LLv/BlUr7RaQHhaKGn4Qhpzo5yRDE9mEqDpLVkbg8SxMsdf/pEF5/VyUwA9t8RT -fKVsInRd386tDqJSDbSFqKTvLztr/5YCyzZzvC2YB1voko/caOGd2d/G51Ij+bXU -xEN8U4fHDBsHwPUGb31uZUhTXpL37KiOqZmXFoH2usmuvx882XvyGcV0F4tstMaR -KLKzl2PwqzAYGFexLkYKMz0TYIeN6h3b86ETazPPU49nkaEU23Dx21J2Rb3UlH+I -lDQF3wuH1QlYiTnlcVa/Zu4QQg0/iP8ALkZ06mvn9e9mOtnA8gsh4B2oLqc19VLU -bcpv40dV1H3W9Lcx9B8JYUp0c/Oyno1D7Yj3tjGcwMKECmUpHi4kksehVo0/P933 -xmFmC6eyWYVdO9upvY/vKSB7b1dMt85iWr3gnMsSfRYc6jsbSxdjOPST46UsIzjx -wa1DS6+Bv5tiaC4uC6X+0tCAZo+UOQMYUbTGRR/7g/c= ------END RSA PRIVATE KEY----- diff --git a/node_modules/public-encrypt/test/rsa.pass.pub b/node_modules/public-encrypt/test/rsa.pass.pub deleted file mode 100644 index 655cc3a4..00000000 --- a/node_modules/public-encrypt/test/rsa.pass.pub +++ /dev/null @@ -1,9 +0,0 @@ ------BEGIN PUBLIC KEY----- -MIIBHjANBgkqhkiG9w0BAQEFAAOCAQsAMIIBBgKB/gy7mjaWgPeFdVYDZWRCA9BN -iv3pPb0es27+FKY0hszLaOw47ExCtAWpDsH48TXAfyHBYwBLguayfk4LGIupxb+C -GMbRo3xEp0CbfY1Jby26T9vGjRC1foHDDUJG84uaRbyHqaf4i6zt4gVR+xlAEIjk -aFAAK8cOoXAT1CVqGLLljUCchL8PjaHj/yriZ/S7rdwlI3LnABxwwmLrmR/v71Wt -pmO/aNG8N+1po+QwaghTkyQ59E/ZvAuOkFWHok2q/R6PYAa2jdZ9zim0FqOP+nkQ -aEDRbBFBmBqTv5fFGfk2WsAfKf/RG0/VFd+ZeM5251TeTvXH695nlSGauVl9AgMB -AAE= ------END PUBLIC KEY----- diff --git a/node_modules/public-encrypt/test/test_cert.pem b/node_modules/public-encrypt/test/test_cert.pem deleted file mode 100644 index a3c1e4a0..00000000 --- a/node_modules/public-encrypt/test/test_cert.pem +++ /dev/null @@ -1,20 +0,0 @@ ------BEGIN CERTIFICATE----- -MIIDXDCCAsWgAwIBAgIJAKL0UG+mRkSPMA0GCSqGSIb3DQEBBQUAMH0xCzAJBgNV -BAYTAlVLMRQwEgYDVQQIEwtBY2tuYWNrIEx0ZDETMBEGA1UEBxMKUmh5cyBKb25l -czEQMA4GA1UEChMHbm9kZS5qczEdMBsGA1UECxMUVGVzdCBUTFMgQ2VydGlmaWNh -dGUxEjAQBgNVBAMTCWxvY2FsaG9zdDAeFw0wOTExMTEwOTUyMjJaFw0yOTExMDYw -OTUyMjJaMH0xCzAJBgNVBAYTAlVLMRQwEgYDVQQIEwtBY2tuYWNrIEx0ZDETMBEG -A1UEBxMKUmh5cyBKb25lczEQMA4GA1UEChMHbm9kZS5qczEdMBsGA1UECxMUVGVz -dCBUTFMgQ2VydGlmaWNhdGUxEjAQBgNVBAMTCWxvY2FsaG9zdDCBnzANBgkqhkiG -9w0BAQEFAAOBjQAwgYkCgYEA8d8Hc6atq78Jt1HLp9agA/wpQfsFvkYUdZ1YsdvO -kL2janjwHQgMMCy/Njal3FUEW0OLPebKZUJ8L44JBXSlVxU4zyiiSOWld8EkTetR -AVT3WKQq3ud+cnxv7g8rGRQp1UHZwmdbZ1wEfAYq8QjYx6m1ciMgRo7DaDQhD29k -d+UCAwEAAaOB4zCB4DAdBgNVHQ4EFgQUL9miTJn+HKNuTmx/oMWlZP9cd4QwgbAG -A1UdIwSBqDCBpYAUL9miTJn+HKNuTmx/oMWlZP9cd4ShgYGkfzB9MQswCQYDVQQG -EwJVSzEUMBIGA1UECBMLQWNrbmFjayBMdGQxEzARBgNVBAcTClJoeXMgSm9uZXMx -EDAOBgNVBAoTB25vZGUuanMxHTAbBgNVBAsTFFRlc3QgVExTIENlcnRpZmljYXRl -MRIwEAYDVQQDEwlsb2NhbGhvc3SCCQCi9FBvpkZEjzAMBgNVHRMEBTADAQH/MA0G -CSqGSIb3DQEBBQUAA4GBADRXXA2xSUK5W1i3oLYWW6NEDVWkTQ9RveplyeS9MOkP -e7yPcpz0+O0ZDDrxR9chAiZ7fmdBBX1Tr+pIuCrG/Ud49SBqeS5aMJGVwiSd7o1n -dhU2Sz3Q60DwJEL1VenQHiVYlWWtqXBThe9ggqRPnCfsCRTP8qifKkjk45zWPcpN ------END CERTIFICATE----- diff --git a/node_modules/public-encrypt/test/test_key.pem b/node_modules/public-encrypt/test/test_key.pem deleted file mode 100644 index 48fd93c9..00000000 --- a/node_modules/public-encrypt/test/test_key.pem +++ /dev/null @@ -1,15 +0,0 @@ ------BEGIN RSA PRIVATE KEY----- -MIICXQIBAAKBgQDx3wdzpq2rvwm3Ucun1qAD/ClB+wW+RhR1nVix286QvaNqePAd -CAwwLL82NqXcVQRbQ4s95splQnwvjgkFdKVXFTjPKKJI5aV3wSRN61EBVPdYpCre -535yfG/uDysZFCnVQdnCZ1tnXAR8BirxCNjHqbVyIyBGjsNoNCEPb2R35QIDAQAB -AoGBAJNem9C4ftrFNGtQ2DB0Udz7uDuucepkErUy4MbFsc947GfENjDKJXr42Kx0 -kYx09ImS1vUpeKpH3xiuhwqe7tm4FsCBg4TYqQle14oxxm7TNeBwwGC3OB7hiokb -aAjbPZ1hAuNs6ms3Ybvvj6Lmxzx42m8O5DXCG2/f+KMvaNUhAkEA/ekrOsWkNoW9 -2n3m+msdVuxeek4B87EoTOtzCXb1dybIZUVv4J48VAiM43hhZHWZck2boD/hhwjC -M5NWd4oY6QJBAPPcgBVNdNZSZ8hR4ogI4nzwWrQhl9MRbqqtfOn2TK/tjMv10ALg -lPmn3SaPSNRPKD2hoLbFuHFERlcS79pbCZ0CQQChX3PuIna/gDitiJ8oQLOg7xEM -wk9TRiDK4kl2lnhjhe6PDpaQN4E4F0cTuwqLAoLHtrNWIcOAQvzKMrYdu1MhAkBm -Et3qDMnjDAs05lGT72QeN90/mPAcASf5eTTYGahv21cb6IBxM+AnwAPpqAAsHhYR -9h13Y7uYbaOjvuF23LRhAkBoI9eaSMn+l81WXOVUHnzh3ZwB4GuTyxMXXNOhuiFd -0z4LKAMh99Z4xQmqSoEkXsfM4KPpfhYjF/bwIcP5gOei ------END RSA PRIVATE KEY----- diff --git a/node_modules/public-encrypt/test/test_rsa_privkey.pem b/node_modules/public-encrypt/test/test_rsa_privkey.pem deleted file mode 100644 index 425518a0..00000000 --- a/node_modules/public-encrypt/test/test_rsa_privkey.pem +++ /dev/null @@ -1,15 +0,0 @@ ------BEGIN RSA PRIVATE KEY----- -MIICXgIBAAKBgQDCFENGw33yGihy92pDjZQhl0C36rPJj+CvfSC8+q28hxA161QF -NUd13wuCTUcq0Qd2qsBe/2hFyc2DCJJg0h1L78+6Z4UMR7EOcpfdUE9Hf3m/hs+F -UR45uBJeDK1HSFHD8bHKD6kv8FPGfJTotc+2xjJwoYi+1hqp1fIekaxsyQIDAQAB -AoGBAJR8ZkCUvx5kzv+utdl7T5MnordT1TvoXXJGXK7ZZ+UuvMNUCdN2QPc4sBiA -QWvLw1cSKt5DsKZ8UETpYPy8pPYnnDEz2dDYiaew9+xEpubyeW2oH4Zx71wqBtOK -kqwrXa/pzdpiucRRjk6vE6YY7EBBs/g7uanVpGibOVAEsqH1AkEA7DkjVH28WDUg -f1nqvfn2Kj6CT7nIcE3jGJsZZ7zlZmBmHFDONMLUrXR/Zm3pR5m0tCmBqa5RK95u -412jt1dPIwJBANJT3v8pnkth48bQo/fKel6uEYyboRtA5/uHuHkZ6FQF7OUkGogc -mSJluOdc5t6hI1VsLn0QZEjQZMEOWr+wKSMCQQCC4kXJEsHAve77oP6HtG/IiEn7 -kpyUXRNvFsDE0czpJJBvL/aRFUJxuRK91jhjC68sA7NsKMGg5OXb5I5Jj36xAkEA -gIT7aFOYBFwGgQAQkWNKLvySgKbAZRTeLBacpHMuQdl1DfdntvAyqpAZ0lY0RKmW -G6aFKaqQfOXKCyWoUiVknQJAXrlgySFci/2ueKlIE1QqIiLSZ8V8OlpFLRnb1pzI -7U1yQXnTAEFYM560yJlzUpOb1V4cScGd365tiSMvxLOvTA== ------END RSA PRIVATE KEY----- diff --git a/node_modules/public-encrypt/test/test_rsa_privkey_encrypted.pem b/node_modules/public-encrypt/test/test_rsa_privkey_encrypted.pem deleted file mode 100644 index 08e76171..00000000 --- a/node_modules/public-encrypt/test/test_rsa_privkey_encrypted.pem +++ /dev/null @@ -1,18 +0,0 @@ ------BEGIN RSA PRIVATE KEY----- -Proc-Type: 4,ENCRYPTED -DEK-Info: AES-128-CBC,9D916E00476DFF9E70FA4BA9E3A6CB0E - -oj0VC35ShSEqlfJ0rLGgkqJCyIK+mXSsa/X/xAur+lI/RVOVTWd7oQQGTdI/0rLX -PdQR02Na3X9Rptezh6J04PfMGeFysxdT6RpC+rkHRPVbN0F4TqxSNNXzkwK70+EF -dSuDMyVKv9YN4wWDf0g6VKe4ShAH/sqICQBrVyzWyYLvH/hwZmZZ1QEab6ylIKtb -EJunwu9BxVVA04bbuATKkKjJOqDn0fG8hb4bYbyD02dJwgLePzzn36F31kcBCEHI -tESlD3RsS+EtfpfgPkplXNOhqYzkD9auDb7Zy+ZwL20fjnJb75OSGu8gOg3KTljt -mApZOg0nJ5Jk9ATAdyzyVSFOM1Hhcw12ws06Dq9KRnXgO6bbuadLTFRDdvSYDFvD -ijUb+97UolQfYIXQMqXli3EIvHr7CTWe/3mpoDgK1mtr0+923Bm97XgE7KSr0L46 -n5QpNjCZf1vbXldNmW+TRifiJMgtVdS7x0N4vqDPNEe+FelVv3U4Pz3HIOtFuWLr -ZCxlgVxJY4IsyYlV0ItQjIv8fJiAyemZdO2lA9K6h0eEF+9Apr3i79JGWUi74p5D -Ooak4le0Va9O34f6FxCGn/a54A6bhKu24Ub/0gr/e4WRa7693euEdgIAZXhtMu2Z -taU5SKjjXPzjmRCM2kINHTCENlaU4oFzTmj3TYY/jdKyNP1bHa07NhlomladkIHK -GD6HaYkcbuwvh8hOPsopSwuS+NqjnGPq9Vv4ecBC+9veDEmpIE1iR6FK9Hjrre88 -kLoMQNmA+vuc8jG4/FIHM3SauQiR1ZJ6+zkz97kcmOf+X7LRaS4j6lfFR6qHiJ6y ------END RSA PRIVATE KEY----- diff --git a/node_modules/public-encrypt/test/test_rsa_pubkey.pem b/node_modules/public-encrypt/test/test_rsa_pubkey.pem deleted file mode 100644 index b3bbf6cb..00000000 --- a/node_modules/public-encrypt/test/test_rsa_pubkey.pem +++ /dev/null @@ -1,6 +0,0 @@ ------BEGIN PUBLIC KEY----- -MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDCFENGw33yGihy92pDjZQhl0C3 -6rPJj+CvfSC8+q28hxA161QFNUd13wuCTUcq0Qd2qsBe/2hFyc2DCJJg0h1L78+6 -Z4UMR7EOcpfdUE9Hf3m/hs+FUR45uBJeDK1HSFHD8bHKD6kv8FPGfJTotc+2xjJw -oYi+1hqp1fIekaxsyQIDAQAB ------END PUBLIC KEY----- diff --git a/node_modules/public-encrypt/withPublic.js b/node_modules/public-encrypt/withPublic.js deleted file mode 100644 index abdbe35c..00000000 --- a/node_modules/public-encrypt/withPublic.js +++ /dev/null @@ -1,10 +0,0 @@ -var bn = require('bn.js'); -function withPublic(paddedMsg, key) { - return new Buffer(paddedMsg - .toRed(bn.mont(key.modulus)) - .redPow(new bn(key.publicExponent)) - .fromRed() - .toArray()); -} - -module.exports = withPublic; \ No newline at end of file diff --git a/node_modules/public-encrypt/xor.js b/node_modules/public-encrypt/xor.js deleted file mode 100644 index aca81316..00000000 --- a/node_modules/public-encrypt/xor.js +++ /dev/null @@ -1,8 +0,0 @@ -module.exports = function xor(a, b) { - var len = a.length; - var i = -1; - while (++i < len) { - a[i] ^= b[i]; - } - return a -}; \ No newline at end of file diff --git a/node_modules/punycode/LICENSE-MIT.txt b/node_modules/punycode/LICENSE-MIT.txt deleted file mode 100644 index a41e0a7e..00000000 --- a/node_modules/punycode/LICENSE-MIT.txt +++ /dev/null @@ -1,20 +0,0 @@ -Copyright Mathias Bynens - -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/node_modules/punycode/README.md b/node_modules/punycode/README.md deleted file mode 100644 index 7ad7d1fa..00000000 --- a/node_modules/punycode/README.md +++ /dev/null @@ -1,176 +0,0 @@ -# Punycode.js [![Build status](https://travis-ci.org/bestiejs/punycode.js.svg?branch=master)](https://travis-ci.org/bestiejs/punycode.js) [![Code coverage status](http://img.shields.io/coveralls/bestiejs/punycode.js/master.svg)](https://coveralls.io/r/bestiejs/punycode.js) [![Dependency status](https://gemnasium.com/bestiejs/punycode.js.svg)](https://gemnasium.com/bestiejs/punycode.js) - -A robust Punycode converter that fully complies to [RFC 3492](https://tools.ietf.org/html/rfc3492) and [RFC 5891](https://tools.ietf.org/html/rfc5891), and works on nearly all JavaScript platforms. - -This JavaScript library is the result of comparing, optimizing and documenting different open-source implementations of the Punycode algorithm: - -* [The C example code from RFC 3492](https://tools.ietf.org/html/rfc3492#appendix-C) -* [`punycode.c` by _Markus W. Scherer_ (IBM)](http://opensource.apple.com/source/ICU/ICU-400.42/icuSources/common/punycode.c) -* [`punycode.c` by _Ben Noordhuis_](https://github.com/bnoordhuis/punycode/blob/master/punycode.c) -* [JavaScript implementation by _some_](http://stackoverflow.com/questions/183485/can-anyone-recommend-a-good-free-javascript-for-punycode-to-unicode-conversion/301287#301287) -* [`punycode.js` by _Ben Noordhuis_](https://github.com/joyent/node/blob/426298c8c1c0d5b5224ac3658c41e7c2a3fe9377/lib/punycode.js) (note: [not fully compliant](https://github.com/joyent/node/issues/2072)) - -This project is [bundled](https://github.com/joyent/node/blob/master/lib/punycode.js) with [Node.js v0.6.2+](https://github.com/joyent/node/compare/975f1930b1...61e796decc) and [io.js v1.0.0+](https://github.com/iojs/io.js/blob/v1.x/lib/punycode.js). - -## Installation - -Via [npm](https://www.npmjs.com/) (only required for Node.js releases older than v0.6.2): - -```bash -npm install punycode -``` - -Via [Bower](http://bower.io/): - -```bash -bower install punycode -``` - -Via [Component](https://github.com/component/component): - -```bash -component install bestiejs/punycode.js -``` - -In a browser: - -```html - -``` - -In [Node.js](https://nodejs.org/), [io.js](https://iojs.org/), [Narwhal](http://narwhaljs.org/), and [RingoJS](http://ringojs.org/): - -```js -var punycode = require('punycode'); -``` - -In [Rhino](http://www.mozilla.org/rhino/): - -```js -load('punycode.js'); -``` - -Using an AMD loader like [RequireJS](http://requirejs.org/): - -```js -require( - { - 'paths': { - 'punycode': 'path/to/punycode' - } - }, - ['punycode'], - function(punycode) { - console.log(punycode); - } -); -``` - -## API - -### `punycode.decode(string)` - -Converts a Punycode string of ASCII symbols to a string of Unicode symbols. - -```js -// decode domain name parts -punycode.decode('maana-pta'); // 'mañana' -punycode.decode('--dqo34k'); // '☃-⌘' -``` - -### `punycode.encode(string)` - -Converts a string of Unicode symbols to a Punycode string of ASCII symbols. - -```js -// encode domain name parts -punycode.encode('mañana'); // 'maana-pta' -punycode.encode('☃-⌘'); // '--dqo34k' -``` - -### `punycode.toUnicode(input)` - -Converts a Punycode string representing a domain name or an email address to Unicode. Only the Punycoded parts of the input will be converted, i.e. it doesn’t matter if you call it on a string that has already been converted to Unicode. - -```js -// decode domain names -punycode.toUnicode('xn--maana-pta.com'); -// → 'mañana.com' -punycode.toUnicode('xn----dqo34k.com'); -// → '☃-⌘.com' - -// decode email addresses -punycode.toUnicode('джумла@xn--p-8sbkgc5ag7bhce.xn--ba-lmcq'); -// → 'джумла@джpумлатест.bрфa' -``` - -### `punycode.toASCII(input)` - -Converts a lowercased Unicode string representing a domain name or an email address to Punycode. Only the non-ASCII parts of the input will be converted, i.e. it doesn’t matter if you call it with a domain that’s already in ASCII. - -```js -// encode domain names -punycode.toASCII('mañana.com'); -// → 'xn--maana-pta.com' -punycode.toASCII('☃-⌘.com'); -// → 'xn----dqo34k.com' - -// encode email addresses -punycode.toASCII('джумла@джpумлатест.bрфa'); -// → 'джумла@xn--p-8sbkgc5ag7bhce.xn--ba-lmcq' -``` - -### `punycode.ucs2` - -#### `punycode.ucs2.decode(string)` - -Creates an array containing the numeric code point values of each Unicode symbol in the string. While [JavaScript uses UCS-2 internally](https://mathiasbynens.be/notes/javascript-encoding), this function will convert a pair of surrogate halves (each of which UCS-2 exposes as separate characters) into a single code point, matching UTF-16. - -```js -punycode.ucs2.decode('abc'); -// → [0x61, 0x62, 0x63] -// surrogate pair for U+1D306 TETRAGRAM FOR CENTRE: -punycode.ucs2.decode('\uD834\uDF06'); -// → [0x1D306] -``` - -#### `punycode.ucs2.encode(codePoints)` - -Creates a string based on an array of numeric code point values. - -```js -punycode.ucs2.encode([0x61, 0x62, 0x63]); -// → 'abc' -punycode.ucs2.encode([0x1D306]); -// → '\uD834\uDF06' -``` - -### `punycode.version` - -A string representing the current Punycode.js version number. - -## Unit tests & code coverage - -After cloning this repository, run `npm install --dev` to install the dependencies needed for Punycode.js development and testing. You may want to install Istanbul _globally_ using `npm install istanbul -g`. - -Once that’s done, you can run the unit tests in Node using `npm test` or `node tests/tests.js`. To run the tests in Rhino, Ringo, Narwhal, PhantomJS, and web browsers as well, use `grunt test`. - -To generate the code coverage report, use `grunt cover`. - -Feel free to fork if you see possible improvements! - -## Author - -| [![twitter/mathias](https://gravatar.com/avatar/24e08a9ea84deb17ae121074d0f17125?s=70)](https://twitter.com/mathias "Follow @mathias on Twitter") | -|---| -| [Mathias Bynens](https://mathiasbynens.be/) | - -## Contributors - -| [![twitter/jdalton](https://gravatar.com/avatar/299a3d891ff1920b69c364d061007043?s=70)](https://twitter.com/jdalton "Follow @jdalton on Twitter") | -|---| -| [John-David Dalton](http://allyoucanleet.com/) | - -## License - -Punycode.js is available under the [MIT](https://mths.be/mit) license. diff --git a/node_modules/punycode/package.json b/node_modules/punycode/package.json deleted file mode 100644 index 69c674cc..00000000 --- a/node_modules/punycode/package.json +++ /dev/null @@ -1,128 +0,0 @@ -{ - "_args": [ - [ - { - "raw": "punycode@^1.3.2", - "scope": null, - "escapedName": "punycode", - "name": "punycode", - "rawSpec": "^1.3.2", - "spec": ">=1.3.2 <2.0.0", - "type": "range" - }, - "/Users/benjaminarias/Desktop/poly/node_modules/browserify" - ] - ], - "_from": "punycode@>=1.3.2 <2.0.0", - "_id": "punycode@1.4.1", - "_inCache": true, - "_installable": true, - "_location": "/punycode", - "_nodeVersion": "5.2.0", - "_npmOperationalInternal": { - "host": "packages-12-west.internal.npmjs.com", - "tmp": "tmp/punycode-1.4.1.tgz_1458437236261_0.07678767060860991" - }, - "_npmUser": { - "name": "mathias", - "email": "mathias@qiwi.be" - }, - "_npmVersion": "3.8.2", - "_phantomChildren": {}, - "_requested": { - "raw": "punycode@^1.3.2", - "scope": null, - "escapedName": "punycode", - "name": "punycode", - "rawSpec": "^1.3.2", - "spec": ">=1.3.2 <2.0.0", - "type": "range" - }, - "_requiredBy": [ - "/browserify" - ], - "_resolved": "https://registry.npmjs.org/punycode/-/punycode-1.4.1.tgz", - "_shasum": "c0d5a63b2718800ad8e1eb0fa5269c84dd41845e", - "_shrinkwrap": null, - "_spec": "punycode@^1.3.2", - "_where": "/Users/benjaminarias/Desktop/poly/node_modules/browserify", - "author": { - "name": "Mathias Bynens", - "url": "https://mathiasbynens.be/" - }, - "bugs": { - "url": "https://github.com/bestiejs/punycode.js/issues" - }, - "contributors": [ - { - "name": "Mathias Bynens", - "url": "https://mathiasbynens.be/" - }, - { - "name": "John-David Dalton", - "url": "http://allyoucanleet.com/" - } - ], - "dependencies": {}, - "description": "A robust Punycode converter that fully complies to RFC 3492 and RFC 5891, and works on nearly all JavaScript platforms.", - "devDependencies": { - "coveralls": "^2.11.4", - "grunt": "^0.4.5", - "grunt-contrib-uglify": "^0.11.0", - "grunt-shell": "^1.1.2", - "istanbul": "^0.4.1", - "qunit-extras": "^1.4.4", - "qunitjs": "~1.11.0", - "requirejs": "^2.1.22" - }, - "directories": {}, - "dist": { - "shasum": "c0d5a63b2718800ad8e1eb0fa5269c84dd41845e", - "tarball": "https://registry.npmjs.org/punycode/-/punycode-1.4.1.tgz" - }, - "files": [ - "LICENSE-MIT.txt", - "punycode.js" - ], - "gitHead": "0fbadd6e81f3a0ce06c38998040d6db6bdfbc5c9", - "homepage": "https://mths.be/punycode", - "jspm": { - "map": { - "./punycode.js": { - "node": "@node/punycode" - } - } - }, - "keywords": [ - "punycode", - "unicode", - "idn", - "idna", - "dns", - "url", - "domain" - ], - "license": "MIT", - "main": "punycode.js", - "maintainers": [ - { - "name": "mathias", - "email": "mathias@qiwi.be" - }, - { - "name": "reconbot", - "email": "wizard@roborooter.com" - } - ], - "name": "punycode", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git+https://github.com/bestiejs/punycode.js.git" - }, - "scripts": { - "test": "node tests/tests.js" - }, - "version": "1.4.1" -} diff --git a/node_modules/punycode/punycode.js b/node_modules/punycode/punycode.js deleted file mode 100644 index 2c87f6cc..00000000 --- a/node_modules/punycode/punycode.js +++ /dev/null @@ -1,533 +0,0 @@ -/*! https://mths.be/punycode v1.4.1 by @mathias */ -;(function(root) { - - /** Detect free variables */ - var freeExports = typeof exports == 'object' && exports && - !exports.nodeType && exports; - var freeModule = typeof module == 'object' && module && - !module.nodeType && module; - var freeGlobal = typeof global == 'object' && global; - if ( - freeGlobal.global === freeGlobal || - freeGlobal.window === freeGlobal || - freeGlobal.self === freeGlobal - ) { - root = freeGlobal; - } - - /** - * The `punycode` object. - * @name punycode - * @type Object - */ - var punycode, - - /** Highest positive signed 32-bit float value */ - maxInt = 2147483647, // aka. 0x7FFFFFFF or 2^31-1 - - /** Bootstring parameters */ - base = 36, - tMin = 1, - tMax = 26, - skew = 38, - damp = 700, - initialBias = 72, - initialN = 128, // 0x80 - delimiter = '-', // '\x2D' - - /** Regular expressions */ - regexPunycode = /^xn--/, - regexNonASCII = /[^\x20-\x7E]/, // unprintable ASCII chars + non-ASCII chars - regexSeparators = /[\x2E\u3002\uFF0E\uFF61]/g, // RFC 3490 separators - - /** Error messages */ - errors = { - 'overflow': 'Overflow: input needs wider integers to process', - 'not-basic': 'Illegal input >= 0x80 (not a basic code point)', - 'invalid-input': 'Invalid input' - }, - - /** Convenience shortcuts */ - baseMinusTMin = base - tMin, - floor = Math.floor, - stringFromCharCode = String.fromCharCode, - - /** Temporary variable */ - key; - - /*--------------------------------------------------------------------------*/ - - /** - * A generic error utility function. - * @private - * @param {String} type The error type. - * @returns {Error} Throws a `RangeError` with the applicable error message. - */ - function error(type) { - throw new RangeError(errors[type]); - } - - /** - * A generic `Array#map` utility function. - * @private - * @param {Array} array The array to iterate over. - * @param {Function} callback The function that gets called for every array - * item. - * @returns {Array} A new array of values returned by the callback function. - */ - function map(array, fn) { - var length = array.length; - var result = []; - while (length--) { - result[length] = fn(array[length]); - } - return result; - } - - /** - * A simple `Array#map`-like wrapper to work with domain name strings or email - * addresses. - * @private - * @param {String} domain The domain name or email address. - * @param {Function} callback The function that gets called for every - * character. - * @returns {Array} A new string of characters returned by the callback - * function. - */ - function mapDomain(string, fn) { - var parts = string.split('@'); - var result = ''; - if (parts.length > 1) { - // In email addresses, only the domain name should be punycoded. Leave - // the local part (i.e. everything up to `@`) intact. - result = parts[0] + '@'; - string = parts[1]; - } - // Avoid `split(regex)` for IE8 compatibility. See #17. - string = string.replace(regexSeparators, '\x2E'); - var labels = string.split('.'); - var encoded = map(labels, fn).join('.'); - return result + encoded; - } - - /** - * Creates an array containing the numeric code points of each Unicode - * character in the string. While JavaScript uses UCS-2 internally, - * this function will convert a pair of surrogate halves (each of which - * UCS-2 exposes as separate characters) into a single code point, - * matching UTF-16. - * @see `punycode.ucs2.encode` - * @see - * @memberOf punycode.ucs2 - * @name decode - * @param {String} string The Unicode input string (UCS-2). - * @returns {Array} The new array of code points. - */ - function ucs2decode(string) { - var output = [], - counter = 0, - length = string.length, - value, - extra; - while (counter < length) { - value = string.charCodeAt(counter++); - if (value >= 0xD800 && value <= 0xDBFF && counter < length) { - // high surrogate, and there is a next character - extra = string.charCodeAt(counter++); - if ((extra & 0xFC00) == 0xDC00) { // low surrogate - output.push(((value & 0x3FF) << 10) + (extra & 0x3FF) + 0x10000); - } else { - // unmatched surrogate; only append this code unit, in case the next - // code unit is the high surrogate of a surrogate pair - output.push(value); - counter--; - } - } else { - output.push(value); - } - } - return output; - } - - /** - * Creates a string based on an array of numeric code points. - * @see `punycode.ucs2.decode` - * @memberOf punycode.ucs2 - * @name encode - * @param {Array} codePoints The array of numeric code points. - * @returns {String} The new Unicode string (UCS-2). - */ - function ucs2encode(array) { - return map(array, function(value) { - var output = ''; - if (value > 0xFFFF) { - value -= 0x10000; - output += stringFromCharCode(value >>> 10 & 0x3FF | 0xD800); - value = 0xDC00 | value & 0x3FF; - } - output += stringFromCharCode(value); - return output; - }).join(''); - } - - /** - * Converts a basic code point into a digit/integer. - * @see `digitToBasic()` - * @private - * @param {Number} codePoint The basic numeric code point value. - * @returns {Number} The numeric value of a basic code point (for use in - * representing integers) in the range `0` to `base - 1`, or `base` if - * the code point does not represent a value. - */ - function basicToDigit(codePoint) { - if (codePoint - 48 < 10) { - return codePoint - 22; - } - if (codePoint - 65 < 26) { - return codePoint - 65; - } - if (codePoint - 97 < 26) { - return codePoint - 97; - } - return base; - } - - /** - * Converts a digit/integer into a basic code point. - * @see `basicToDigit()` - * @private - * @param {Number} digit The numeric value of a basic code point. - * @returns {Number} The basic code point whose value (when used for - * representing integers) is `digit`, which needs to be in the range - * `0` to `base - 1`. If `flag` is non-zero, the uppercase form is - * used; else, the lowercase form is used. The behavior is undefined - * if `flag` is non-zero and `digit` has no uppercase form. - */ - function digitToBasic(digit, flag) { - // 0..25 map to ASCII a..z or A..Z - // 26..35 map to ASCII 0..9 - return digit + 22 + 75 * (digit < 26) - ((flag != 0) << 5); - } - - /** - * Bias adaptation function as per section 3.4 of RFC 3492. - * https://tools.ietf.org/html/rfc3492#section-3.4 - * @private - */ - function adapt(delta, numPoints, firstTime) { - var k = 0; - delta = firstTime ? floor(delta / damp) : delta >> 1; - delta += floor(delta / numPoints); - for (/* no initialization */; delta > baseMinusTMin * tMax >> 1; k += base) { - delta = floor(delta / baseMinusTMin); - } - return floor(k + (baseMinusTMin + 1) * delta / (delta + skew)); - } - - /** - * Converts a Punycode string of ASCII-only symbols to a string of Unicode - * symbols. - * @memberOf punycode - * @param {String} input The Punycode string of ASCII-only symbols. - * @returns {String} The resulting string of Unicode symbols. - */ - function decode(input) { - // Don't use UCS-2 - var output = [], - inputLength = input.length, - out, - i = 0, - n = initialN, - bias = initialBias, - basic, - j, - index, - oldi, - w, - k, - digit, - t, - /** Cached calculation results */ - baseMinusT; - - // Handle the basic code points: let `basic` be the number of input code - // points before the last delimiter, or `0` if there is none, then copy - // the first basic code points to the output. - - basic = input.lastIndexOf(delimiter); - if (basic < 0) { - basic = 0; - } - - for (j = 0; j < basic; ++j) { - // if it's not a basic code point - if (input.charCodeAt(j) >= 0x80) { - error('not-basic'); - } - output.push(input.charCodeAt(j)); - } - - // Main decoding loop: start just after the last delimiter if any basic code - // points were copied; start at the beginning otherwise. - - for (index = basic > 0 ? basic + 1 : 0; index < inputLength; /* no final expression */) { - - // `index` is the index of the next character to be consumed. - // Decode a generalized variable-length integer into `delta`, - // which gets added to `i`. The overflow checking is easier - // if we increase `i` as we go, then subtract off its starting - // value at the end to obtain `delta`. - for (oldi = i, w = 1, k = base; /* no condition */; k += base) { - - if (index >= inputLength) { - error('invalid-input'); - } - - digit = basicToDigit(input.charCodeAt(index++)); - - if (digit >= base || digit > floor((maxInt - i) / w)) { - error('overflow'); - } - - i += digit * w; - t = k <= bias ? tMin : (k >= bias + tMax ? tMax : k - bias); - - if (digit < t) { - break; - } - - baseMinusT = base - t; - if (w > floor(maxInt / baseMinusT)) { - error('overflow'); - } - - w *= baseMinusT; - - } - - out = output.length + 1; - bias = adapt(i - oldi, out, oldi == 0); - - // `i` was supposed to wrap around from `out` to `0`, - // incrementing `n` each time, so we'll fix that now: - if (floor(i / out) > maxInt - n) { - error('overflow'); - } - - n += floor(i / out); - i %= out; - - // Insert `n` at position `i` of the output - output.splice(i++, 0, n); - - } - - return ucs2encode(output); - } - - /** - * Converts a string of Unicode symbols (e.g. a domain name label) to a - * Punycode string of ASCII-only symbols. - * @memberOf punycode - * @param {String} input The string of Unicode symbols. - * @returns {String} The resulting Punycode string of ASCII-only symbols. - */ - function encode(input) { - var n, - delta, - handledCPCount, - basicLength, - bias, - j, - m, - q, - k, - t, - currentValue, - output = [], - /** `inputLength` will hold the number of code points in `input`. */ - inputLength, - /** Cached calculation results */ - handledCPCountPlusOne, - baseMinusT, - qMinusT; - - // Convert the input in UCS-2 to Unicode - input = ucs2decode(input); - - // Cache the length - inputLength = input.length; - - // Initialize the state - n = initialN; - delta = 0; - bias = initialBias; - - // Handle the basic code points - for (j = 0; j < inputLength; ++j) { - currentValue = input[j]; - if (currentValue < 0x80) { - output.push(stringFromCharCode(currentValue)); - } - } - - handledCPCount = basicLength = output.length; - - // `handledCPCount` is the number of code points that have been handled; - // `basicLength` is the number of basic code points. - - // Finish the basic string - if it is not empty - with a delimiter - if (basicLength) { - output.push(delimiter); - } - - // Main encoding loop: - while (handledCPCount < inputLength) { - - // All non-basic code points < n have been handled already. Find the next - // larger one: - for (m = maxInt, j = 0; j < inputLength; ++j) { - currentValue = input[j]; - if (currentValue >= n && currentValue < m) { - m = currentValue; - } - } - - // Increase `delta` enough to advance the decoder's state to , - // but guard against overflow - handledCPCountPlusOne = handledCPCount + 1; - if (m - n > floor((maxInt - delta) / handledCPCountPlusOne)) { - error('overflow'); - } - - delta += (m - n) * handledCPCountPlusOne; - n = m; - - for (j = 0; j < inputLength; ++j) { - currentValue = input[j]; - - if (currentValue < n && ++delta > maxInt) { - error('overflow'); - } - - if (currentValue == n) { - // Represent delta as a generalized variable-length integer - for (q = delta, k = base; /* no condition */; k += base) { - t = k <= bias ? tMin : (k >= bias + tMax ? tMax : k - bias); - if (q < t) { - break; - } - qMinusT = q - t; - baseMinusT = base - t; - output.push( - stringFromCharCode(digitToBasic(t + qMinusT % baseMinusT, 0)) - ); - q = floor(qMinusT / baseMinusT); - } - - output.push(stringFromCharCode(digitToBasic(q, 0))); - bias = adapt(delta, handledCPCountPlusOne, handledCPCount == basicLength); - delta = 0; - ++handledCPCount; - } - } - - ++delta; - ++n; - - } - return output.join(''); - } - - /** - * Converts a Punycode string representing a domain name or an email address - * to Unicode. Only the Punycoded parts of the input will be converted, i.e. - * it doesn't matter if you call it on a string that has already been - * converted to Unicode. - * @memberOf punycode - * @param {String} input The Punycoded domain name or email address to - * convert to Unicode. - * @returns {String} The Unicode representation of the given Punycode - * string. - */ - function toUnicode(input) { - return mapDomain(input, function(string) { - return regexPunycode.test(string) - ? decode(string.slice(4).toLowerCase()) - : string; - }); - } - - /** - * Converts a Unicode string representing a domain name or an email address to - * Punycode. Only the non-ASCII parts of the domain name will be converted, - * i.e. it doesn't matter if you call it with a domain that's already in - * ASCII. - * @memberOf punycode - * @param {String} input The domain name or email address to convert, as a - * Unicode string. - * @returns {String} The Punycode representation of the given domain name or - * email address. - */ - function toASCII(input) { - return mapDomain(input, function(string) { - return regexNonASCII.test(string) - ? 'xn--' + encode(string) - : string; - }); - } - - /*--------------------------------------------------------------------------*/ - - /** Define the public API */ - punycode = { - /** - * A string representing the current Punycode.js version number. - * @memberOf punycode - * @type String - */ - 'version': '1.4.1', - /** - * An object of methods to convert from JavaScript's internal character - * representation (UCS-2) to Unicode code points, and back. - * @see - * @memberOf punycode - * @type Object - */ - 'ucs2': { - 'decode': ucs2decode, - 'encode': ucs2encode - }, - 'decode': decode, - 'encode': encode, - 'toASCII': toASCII, - 'toUnicode': toUnicode - }; - - /** Expose `punycode` */ - // Some AMD build optimizers, like r.js, check for specific condition patterns - // like the following: - if ( - typeof define == 'function' && - typeof define.amd == 'object' && - define.amd - ) { - define('punycode', function() { - return punycode; - }); - } else if (freeExports && freeModule) { - if (module.exports == freeExports) { - // in Node.js, io.js, or RingoJS v0.8.0+ - freeModule.exports = punycode; - } else { - // in Narwhal or RingoJS v0.7.0- - for (key in punycode) { - punycode.hasOwnProperty(key) && (freeExports[key] = punycode[key]); - } - } - } else { - // in Rhino or a web browser - root.punycode = punycode; - } - -}(this)); diff --git a/node_modules/qs/.eslintignore b/node_modules/qs/.eslintignore deleted file mode 100644 index 1521c8b7..00000000 --- a/node_modules/qs/.eslintignore +++ /dev/null @@ -1 +0,0 @@ -dist diff --git a/node_modules/qs/.eslintrc b/node_modules/qs/.eslintrc deleted file mode 100644 index 1faac273..00000000 --- a/node_modules/qs/.eslintrc +++ /dev/null @@ -1,19 +0,0 @@ -{ - "root": true, - - "extends": "@ljharb", - - "rules": { - "complexity": [2, 22], - "consistent-return": [1], - "id-length": [2, { "min": 1, "max": 25, "properties": "never" }], - "indent": [2, 4], - "max-params": [2, 9], - "max-statements": [2, 36], - "no-extra-parens": [1], - "no-continue": [1], - "no-magic-numbers": 0, - "no-restricted-syntax": [2, "BreakStatement", "DebuggerStatement", "ForInStatement", "LabeledStatement", "WithStatement"], - "operator-linebreak": 1 - } -} diff --git a/node_modules/qs/CHANGELOG.md b/node_modules/qs/CHANGELOG.md deleted file mode 100644 index 86bea763..00000000 --- a/node_modules/qs/CHANGELOG.md +++ /dev/null @@ -1,130 +0,0 @@ -## **6.2.1** -- [Fix] ensure `key[]=x&key[]&key[]=y` results in 3, not 2, values -- [Refactor] Be explicit and use `Object.prototype.hasOwnProperty.call` -- [Tests] remove `parallelshell` since it does not reliably report failures -- [Tests] up to `node` `v6.3`, `v5.12` -- [Dev Deps] update `tape`, `eslint`, `@ljharb/eslint-config`, `qs-iconv` - -## [**6.2.0**](https://github.com/ljharb/qs/issues?milestone=36&state=closed) -- [New] pass Buffers to the encoder/decoder directly (#161) -- [New] add "encoder" and "decoder" options, for custom param encoding/decoding (#160) -- [Fix] fix compacting of nested sparse arrays (#150) - -## [**6.1.0**](https://github.com/ljharb/qs/issues?milestone=35&state=closed) -- [New] allowDots option for `stringify` (#151) -- [Fix] "sort" option should work at a depth of 3 or more (#151) -- [Fix] Restore `dist` directory; will be removed in v7 (#148) - -## [**6.0.2**](https://github.com/ljharb/qs/issues?milestone=33&state=closed) -- Revert ES6 requirement and restore support for node down to v0.8. - -## [**6.0.1**](https://github.com/ljharb/qs/issues?milestone=32&state=closed) -- [**#127**](https://github.com/ljharb/qs/pull/127) Fix engines definition in package.json - -## [**6.0.0**](https://github.com/ljharb/qs/issues?milestone=31&state=closed) -- [**#124**](https://github.com/ljharb/qs/issues/124) Use ES6 and drop support for node < v4 - -## **5.2.1** -- [Fix] ensure `key[]=x&key[]&key[]=y` results in 3, not 2, values - -## [**5.2.0**](https://github.com/ljharb/qs/issues?milestone=30&state=closed) -- [**#64**](https://github.com/ljharb/qs/issues/64) Add option to sort object keys in the query string - -## [**5.1.0**](https://github.com/ljharb/qs/issues?milestone=29&state=closed) -- [**#117**](https://github.com/ljharb/qs/issues/117) make URI encoding stringified results optional -- [**#106**](https://github.com/ljharb/qs/issues/106) Add flag `skipNulls` to optionally skip null values in stringify - -## [**5.0.0**](https://github.com/ljharb/qs/issues?milestone=28&state=closed) -- [**#114**](https://github.com/ljharb/qs/issues/114) default allowDots to false -- [**#100**](https://github.com/ljharb/qs/issues/100) include dist to npm - -## [**4.0.0**](https://github.com/ljharb/qs/issues?milestone=26&state=closed) -- [**#98**](https://github.com/ljharb/qs/issues/98) make returning plain objects and allowing prototype overwriting properties optional - -## [**3.1.0**](https://github.com/ljharb/qs/issues?milestone=24&state=closed) -- [**#89**](https://github.com/ljharb/qs/issues/89) Add option to disable "Transform dot notation to bracket notation" - -## [**3.0.0**](https://github.com/ljharb/qs/issues?milestone=23&state=closed) -- [**#80**](https://github.com/ljharb/qs/issues/80) qs.parse silently drops properties -- [**#77**](https://github.com/ljharb/qs/issues/77) Perf boost -- [**#60**](https://github.com/ljharb/qs/issues/60) Add explicit option to disable array parsing -- [**#74**](https://github.com/ljharb/qs/issues/74) Bad parse when turning array into object -- [**#81**](https://github.com/ljharb/qs/issues/81) Add a `filter` option -- [**#68**](https://github.com/ljharb/qs/issues/68) Fixed issue with recursion and passing strings into objects. -- [**#66**](https://github.com/ljharb/qs/issues/66) Add mixed array and object dot notation support Closes: #47 -- [**#76**](https://github.com/ljharb/qs/issues/76) RFC 3986 -- [**#85**](https://github.com/ljharb/qs/issues/85) No equal sign -- [**#84**](https://github.com/ljharb/qs/issues/84) update license attribute - -## [**2.4.1**](https://github.com/ljharb/qs/issues?milestone=20&state=closed) -- [**#73**](https://github.com/ljharb/qs/issues/73) Property 'hasOwnProperty' of object # is not a function - -## [**2.4.0**](https://github.com/ljharb/qs/issues?milestone=19&state=closed) -- [**#70**](https://github.com/ljharb/qs/issues/70) Add arrayFormat option - -## [**2.3.3**](https://github.com/ljharb/qs/issues?milestone=18&state=closed) -- [**#59**](https://github.com/ljharb/qs/issues/59) make sure array indexes are >= 0, closes #57 -- [**#58**](https://github.com/ljharb/qs/issues/58) make qs usable for browser loader - -## [**2.3.2**](https://github.com/ljharb/qs/issues?milestone=17&state=closed) -- [**#55**](https://github.com/ljharb/qs/issues/55) allow merging a string into an object - -## [**2.3.1**](https://github.com/ljharb/qs/issues?milestone=16&state=closed) -- [**#52**](https://github.com/ljharb/qs/issues/52) Return "undefined" and "false" instead of throwing "TypeError". - -## [**2.3.0**](https://github.com/ljharb/qs/issues?milestone=15&state=closed) -- [**#50**](https://github.com/ljharb/qs/issues/50) add option to omit array indices, closes #46 - -## [**2.2.5**](https://github.com/ljharb/qs/issues?milestone=14&state=closed) -- [**#39**](https://github.com/ljharb/qs/issues/39) Is there an alternative to Buffer.isBuffer? -- [**#49**](https://github.com/ljharb/qs/issues/49) refactor utils.merge, fixes #45 -- [**#41**](https://github.com/ljharb/qs/issues/41) avoid browserifying Buffer, for #39 - -## [**2.2.4**](https://github.com/ljharb/qs/issues?milestone=13&state=closed) -- [**#38**](https://github.com/ljharb/qs/issues/38) how to handle object keys beginning with a number - -## [**2.2.3**](https://github.com/ljharb/qs/issues?milestone=12&state=closed) -- [**#37**](https://github.com/ljharb/qs/issues/37) parser discards first empty value in array -- [**#36**](https://github.com/ljharb/qs/issues/36) Update to lab 4.x - -## [**2.2.2**](https://github.com/ljharb/qs/issues?milestone=11&state=closed) -- [**#33**](https://github.com/ljharb/qs/issues/33) Error when plain object in a value -- [**#34**](https://github.com/ljharb/qs/issues/34) use Object.prototype.hasOwnProperty.call instead of obj.hasOwnProperty -- [**#24**](https://github.com/ljharb/qs/issues/24) Changelog? Semver? - -## [**2.2.1**](https://github.com/ljharb/qs/issues?milestone=10&state=closed) -- [**#32**](https://github.com/ljharb/qs/issues/32) account for circular references properly, closes #31 -- [**#31**](https://github.com/ljharb/qs/issues/31) qs.parse stackoverflow on circular objects - -## [**2.2.0**](https://github.com/ljharb/qs/issues?milestone=9&state=closed) -- [**#26**](https://github.com/ljharb/qs/issues/26) Don't use Buffer global if it's not present -- [**#30**](https://github.com/ljharb/qs/issues/30) Bug when merging non-object values into arrays -- [**#29**](https://github.com/ljharb/qs/issues/29) Don't call Utils.clone at the top of Utils.merge -- [**#23**](https://github.com/ljharb/qs/issues/23) Ability to not limit parameters? - -## [**2.1.0**](https://github.com/ljharb/qs/issues?milestone=8&state=closed) -- [**#22**](https://github.com/ljharb/qs/issues/22) Enable using a RegExp as delimiter - -## [**2.0.0**](https://github.com/ljharb/qs/issues?milestone=7&state=closed) -- [**#18**](https://github.com/ljharb/qs/issues/18) Why is there arrayLimit? -- [**#20**](https://github.com/ljharb/qs/issues/20) Configurable parametersLimit -- [**#21**](https://github.com/ljharb/qs/issues/21) make all limits optional, for #18, for #20 - -## [**1.2.2**](https://github.com/ljharb/qs/issues?milestone=6&state=closed) -- [**#19**](https://github.com/ljharb/qs/issues/19) Don't overwrite null values - -## [**1.2.1**](https://github.com/ljharb/qs/issues?milestone=5&state=closed) -- [**#16**](https://github.com/ljharb/qs/issues/16) ignore non-string delimiters -- [**#15**](https://github.com/ljharb/qs/issues/15) Close code block - -## [**1.2.0**](https://github.com/ljharb/qs/issues?milestone=4&state=closed) -- [**#12**](https://github.com/ljharb/qs/issues/12) Add optional delim argument -- [**#13**](https://github.com/ljharb/qs/issues/13) fix #11: flattened keys in array are now correctly parsed - -## [**1.1.0**](https://github.com/ljharb/qs/issues?milestone=3&state=closed) -- [**#7**](https://github.com/ljharb/qs/issues/7) Empty values of a POST array disappear after being submitted -- [**#9**](https://github.com/ljharb/qs/issues/9) Should not omit equals signs (=) when value is null -- [**#6**](https://github.com/ljharb/qs/issues/6) Minor grammar fix in README - -## [**1.0.2**](https://github.com/ljharb/qs/issues?milestone=2&state=closed) -- [**#5**](https://github.com/ljharb/qs/issues/5) array holes incorrectly copied into object on large index diff --git a/node_modules/qs/CONTRIBUTING.md b/node_modules/qs/CONTRIBUTING.md deleted file mode 100644 index 89283615..00000000 --- a/node_modules/qs/CONTRIBUTING.md +++ /dev/null @@ -1 +0,0 @@ -Please view our [hapijs contributing guide](https://github.com/hapijs/hapi/blob/master/CONTRIBUTING.md). diff --git a/node_modules/qs/LICENSE b/node_modules/qs/LICENSE deleted file mode 100644 index d4569487..00000000 --- a/node_modules/qs/LICENSE +++ /dev/null @@ -1,28 +0,0 @@ -Copyright (c) 2014 Nathan LaFreniere and other contributors. -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * The names of any contributors may not be used to endorse or promote - products derived from this software without specific prior written - permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS AND CONTRIBUTORS BE LIABLE FOR ANY -DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - * * * - -The complete list of contributors can be found at: https://github.com/hapijs/qs/graphs/contributors diff --git a/node_modules/qs/README.md b/node_modules/qs/README.md deleted file mode 100644 index 97e39079..00000000 --- a/node_modules/qs/README.md +++ /dev/null @@ -1,376 +0,0 @@ -# qs - -A querystring parsing and stringifying library with some added security. - -[![Build Status](https://api.travis-ci.org/ljharb/qs.svg)](http://travis-ci.org/ljharb/qs) - -Lead Maintainer: [Jordan Harband](https://github.com/ljharb) - -The **qs** module was originally created and maintained by [TJ Holowaychuk](https://github.com/visionmedia/node-querystring). - -## Usage - -```javascript -var qs = require('qs'); -var assert = require('assert'); - -var obj = qs.parse('a=c'); -assert.deepEqual(obj, { a: 'c' }); - -var str = qs.stringify(obj); -assert.equal(str, 'a=c'); -``` - -### Parsing Objects - -[](#preventEval) -```javascript -qs.parse(string, [options]); -``` - -**qs** allows you to create nested objects within your query strings, by surrounding the name of sub-keys with square brackets `[]`. -For example, the string `'foo[bar]=baz'` converts to: - -```javascript -assert.deepEqual(qs.parse('foo[bar]=baz'), { - foo: { - bar: 'baz' - } -}); -``` - -When using the `plainObjects` option the parsed value is returned as a plain object, created via `Object.create(null)` and as such you should be aware that prototype methods will not exist on it and a user may set those names to whatever value they like: - -```javascript -var plainObject = qs.parse('a[hasOwnProperty]=b', { plainObjects: true }); -assert.deepEqual(plainObject, { a: { hasOwnProperty: 'b' } }); -``` - -By default parameters that would overwrite properties on the object prototype are ignored, if you wish to keep the data from those fields either use `plainObjects` as mentioned above, or set `allowPrototypes` to `true` which will allow user input to overwrite those properties. *WARNING* It is generally a bad idea to enable this option as it can cause problems when attempting to use the properties that have been overwritten. Always be careful with this option. - -```javascript -var protoObject = qs.parse('a[hasOwnProperty]=b', { allowPrototypes: true }); -assert.deepEqual(protoObject, { a: { hasOwnProperty: 'b' } }); -``` - -URI encoded strings work too: - -```javascript -assert.deepEqual(qs.parse('a%5Bb%5D=c'), { - a: { b: 'c' } -}); -``` - -You can also nest your objects, like `'foo[bar][baz]=foobarbaz'`: - -```javascript -assert.deepEqual(qs.parse('foo[bar][baz]=foobarbaz'), { - foo: { - bar: { - baz: 'foobarbaz' - } - } -}); -``` - -By default, when nesting objects **qs** will only parse up to 5 children deep. This means if you attempt to parse a string like -`'a[b][c][d][e][f][g][h][i]=j'` your resulting object will be: - -```javascript -var expected = { - a: { - b: { - c: { - d: { - e: { - f: { - '[g][h][i]': 'j' - } - } - } - } - } - } -}; -var string = 'a[b][c][d][e][f][g][h][i]=j'; -assert.deepEqual(qs.parse(string), expected); -``` - -This depth can be overridden by passing a `depth` option to `qs.parse(string, [options])`: - -```javascript -var deep = qs.parse('a[b][c][d][e][f][g][h][i]=j', { depth: 1 }); -assert.deepEqual(deep, { a: { b: { '[c][d][e][f][g][h][i]': 'j' } } }); -``` - -The depth limit helps mitigate abuse when **qs** is used to parse user input, and it is recommended to keep it a reasonably small number. - -For similar reasons, by default **qs** will only parse up to 1000 parameters. This can be overridden by passing a `parameterLimit` option: - -```javascript -var limited = qs.parse('a=b&c=d', { parameterLimit: 1 }); -assert.deepEqual(limited, { a: 'b' }); -``` - -An optional delimiter can also be passed: - -```javascript -var delimited = qs.parse('a=b;c=d', { delimiter: ';' }); -assert.deepEqual(delimited, { a: 'b', c: 'd' }); -``` - -Delimiters can be a regular expression too: - -```javascript -var regexed = qs.parse('a=b;c=d,e=f', { delimiter: /[;,]/ }); -assert.deepEqual(regexed, { a: 'b', c: 'd', e: 'f' }); -``` - -Option `allowDots` can be used to enable dot notation: - -```javascript -var withDots = qs.parse('a.b=c', { allowDots: true }); -assert.deepEqual(withDots, { a: { b: 'c' } }); -``` - -### Parsing Arrays - -**qs** can also parse arrays using a similar `[]` notation: - -```javascript -var withArray = qs.parse('a[]=b&a[]=c'); -assert.deepEqual(withArray, { a: ['b', 'c'] }); -``` - -You may specify an index as well: - -```javascript -var withIndexes = qs.parse('a[1]=c&a[0]=b'); -assert.deepEqual(withIndexes, { a: ['b', 'c'] }); -``` - -Note that the only difference between an index in an array and a key in an object is that the value between the brackets must be a number -to create an array. When creating arrays with specific indices, **qs** will compact a sparse array to only the existing values preserving -their order: - -```javascript -var noSparse = qs.parse('a[1]=b&a[15]=c'); -assert.deepEqual(noSparse, { a: ['b', 'c'] }); -``` - -Note that an empty string is also a value, and will be preserved: - -```javascript -var withEmptyString = qs.parse('a[]=&a[]=b'); -assert.deepEqual(withEmptyString, { a: ['', 'b'] }); - -var withIndexedEmptyString = qs.parse('a[0]=b&a[1]=&a[2]=c'); -assert.deepEqual(withIndexedEmptyString, { a: ['b', '', 'c'] }); -``` - -**qs** will also limit specifying indices in an array to a maximum index of `20`. Any array members with an index of greater than `20` will -instead be converted to an object with the index as the key: - -```javascript -var withMaxIndex = qs.parse('a[100]=b'); -assert.deepEqual(withMaxIndex, { a: { '100': 'b' } }); -``` - -This limit can be overridden by passing an `arrayLimit` option: - -```javascript -var withArrayLimit = qs.parse('a[1]=b', { arrayLimit: 0 }); -assert.deepEqual(withArrayLimit, { a: { '1': 'b' } }); -``` - -To disable array parsing entirely, set `parseArrays` to `false`. - -```javascript -var noParsingArrays = qs.parse('a[]=b', { parseArrays: false }); -assert.deepEqual(noParsingArrays, { a: { '0': 'b' } }); -``` - -If you mix notations, **qs** will merge the two items into an object: - -```javascript -var mixedNotation = qs.parse('a[0]=b&a[b]=c'); -assert.deepEqual(mixedNotation, { a: { '0': 'b', b: 'c' } }); -``` - -You can also create arrays of objects: - -```javascript -var arraysOfObjects = qs.parse('a[][b]=c'); -assert.deepEqual(arraysOfObjects, { a: [{ b: 'c' }] }); -``` - -### Stringifying - -[](#preventEval) -```javascript -qs.stringify(object, [options]); -``` - -When stringifying, **qs** by default URI encodes output. Objects are stringified as you would expect: - -```javascript -assert.equal(qs.stringify({ a: 'b' }), 'a=b'); -assert.equal(qs.stringify({ a: { b: 'c' } }), 'a%5Bb%5D=c'); -``` - -This encoding can be disabled by setting the `encode` option to `false`: - -```javascript -var unencoded = qs.stringify({ a: { b: 'c' } }, { encode: false }); -assert.equal(unencoded, 'a[b]=c'); -``` - -This encoding can also be replaced by a custom encoding method set as `encoder` option: - -```javascript -var encoded = qs.stringify({ a: { b: 'c' } }, { encoder: function (str) { - // Passed in values `a`, `b`, `c` - return // Return encoded string -}}) -``` - -_(Note: the `encoder` option does not apply if `encode` is `false`)_ - -Analogue to the `encoder` there is a `decoder` option for `parse` to override decoding of properties and values: - -```javascript -var decoded = qs.parse('x=z', { decoder: function (str) { - // Passed in values `x`, `z` - return // Return decoded string -}}) -``` - -Examples beyond this point will be shown as though the output is not URI encoded for clarity. Please note that the return values in these cases *will* be URI encoded during real usage. - -When arrays are stringified, by default they are given explicit indices: - -```javascript -qs.stringify({ a: ['b', 'c', 'd'] }); -// 'a[0]=b&a[1]=c&a[2]=d' -``` - -You may override this by setting the `indices` option to `false`: - -```javascript -qs.stringify({ a: ['b', 'c', 'd'] }, { indices: false }); -// 'a=b&a=c&a=d' -``` - -You may use the `arrayFormat` option to specify the format of the output array - -```javascript -qs.stringify({ a: ['b', 'c'] }, { arrayFormat: 'indices' }) -// 'a[0]=b&a[1]=c' -qs.stringify({ a: ['b', 'c'] }, { arrayFormat: 'brackets' }) -// 'a[]=b&a[]=c' -qs.stringify({ a: ['b', 'c'] }, { arrayFormat: 'repeat' }) -// 'a=b&a=c' -``` - -Empty strings and null values will omit the value, but the equals sign (=) remains in place: - -```javascript -assert.equal(qs.stringify({ a: '' }), 'a='); -``` - -Properties that are set to `undefined` will be omitted entirely: - -```javascript -assert.equal(qs.stringify({ a: null, b: undefined }), 'a='); -``` - -The delimiter may be overridden with stringify as well: - -```javascript -assert.equal(qs.stringify({ a: 'b', c: 'd' }, { delimiter: ';' }), 'a=b;c=d'); -``` - -Finally, you can use the `filter` option to restrict which keys will be included in the stringified output. -If you pass a function, it will be called for each key to obtain the replacement value. Otherwise, if you -pass an array, it will be used to select properties and array indices for stringification: - -```javascript -function filterFunc(prefix, value) { - if (prefix == 'b') { - // Return an `undefined` value to omit a property. - return; - } - if (prefix == 'e[f]') { - return value.getTime(); - } - if (prefix == 'e[g][0]') { - return value * 2; - } - return value; -} -qs.stringify({ a: 'b', c: 'd', e: { f: new Date(123), g: [2] } }, { filter: filterFunc }); -// 'a=b&c=d&e[f]=123&e[g][0]=4' -qs.stringify({ a: 'b', c: 'd', e: 'f' }, { filter: ['a', 'e'] }); -// 'a=b&e=f' -qs.stringify({ a: ['b', 'c', 'd'], e: 'f' }, { filter: ['a', 0, 2] }); -// 'a[0]=b&a[2]=d' -``` - -### Handling of `null` values - -By default, `null` values are treated like empty strings: - -```javascript -var withNull = qs.stringify({ a: null, b: '' }); -assert.equal(withNull, 'a=&b='); -``` - -Parsing does not distinguish between parameters with and without equal signs. Both are converted to empty strings. - -```javascript -var equalsInsensitive = qs.parse('a&b='); -assert.deepEqual(equalsInsensitive, { a: '', b: '' }); -``` - -To distinguish between `null` values and empty strings use the `strictNullHandling` flag. In the result string the `null` -values have no `=` sign: - -```javascript -var strictNull = qs.stringify({ a: null, b: '' }, { strictNullHandling: true }); -assert.equal(strictNull, 'a&b='); -``` - -To parse values without `=` back to `null` use the `strictNullHandling` flag: - -```javascript -var parsedStrictNull = qs.parse('a&b=', { strictNullHandling: true }); -assert.deepEqual(parsedStrictNull, { a: null, b: '' }); -``` - -To completely skip rendering keys with `null` values, use the `skipNulls` flag: - -```javascript -var nullsSkipped = qs.stringify({ a: 'b', c: null}, { skipNulls: true }); -assert.equal(nullsSkipped, 'a=b'); -``` - -### Dealing with special character sets - -By default the encoding and decoding of characters is done in `utf-8`. If you -wish to encode querystrings to a different character set (i.e. -[Shift JIS](https://en.wikipedia.org/wiki/Shift_JIS)) you can use the -[`qs-iconv`](https://github.com/martinheidegger/qs-iconv) library: - -```javascript -var encoder = require('qs-iconv/encoder')('shift_jis'); -var shiftJISEncoded = qs.stringify({ a: 'こんにちは!' }, { encoder: encoder }); -assert.equal(shiftJISEncoded, 'a=%82%B1%82%F1%82%C9%82%BF%82%CD%81I'); -``` - -This also works for decoding of query strings: - -```javascript -var decoder = require('qs-iconv/decoder')('shift_jis'); -var obj = qs.parse('a=%82%B1%82%F1%82%C9%82%BF%82%CD%81I', { decoder: decoder }); -assert.deepEqual(obj, { a: 'こんにちは!' }); -``` diff --git a/node_modules/qs/dist/qs.js b/node_modules/qs/dist/qs.js deleted file mode 100644 index fcf825b5..00000000 --- a/node_modules/qs/dist/qs.js +++ /dev/null @@ -1,486 +0,0 @@ -(function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.Qs = f()}})(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o= 0 && - (options.parseArrays && index <= options.arrayLimit) - ) { - obj = []; - obj[index] = parseObject(chain, val, options); - } else { - obj[cleanRoot] = parseObject(chain, val, options); - } - } - - return obj; -}; - -var parseKeys = function parseKeys(givenKey, val, options) { - if (!givenKey) { - return; - } - - // Transform dot notation to bracket notation - var key = options.allowDots ? givenKey.replace(/\.([^\.\[]+)/g, '[$1]') : givenKey; - - // The regex chunks - - var parent = /^([^\[\]]*)/; - var child = /(\[[^\[\]]*\])/g; - - // Get the parent - - var segment = parent.exec(key); - - // Stash the parent if it exists - - var keys = []; - if (segment[1]) { - // If we aren't using plain objects, optionally prefix keys - // that would overwrite object prototype properties - if (!options.plainObjects && has.call(Object.prototype, segment[1])) { - if (!options.allowPrototypes) { - return; - } - } - - keys.push(segment[1]); - } - - // Loop through children appending to the array until we hit depth - - var i = 0; - while ((segment = child.exec(key)) !== null && i < options.depth) { - i += 1; - if (!options.plainObjects && has.call(Object.prototype, segment[1].replace(/\[|\]/g, ''))) { - if (!options.allowPrototypes) { - continue; - } - } - keys.push(segment[1]); - } - - // If there's a remainder, just add whatever is left - - if (segment) { - keys.push('[' + key.slice(segment.index) + ']'); - } - - return parseObject(keys, val, options); -}; - -module.exports = function (str, opts) { - var options = opts || {}; - - if (options.decoder !== null && options.decoder !== undefined && typeof options.decoder !== 'function') { - throw new TypeError('Decoder has to be a function.'); - } - - options.delimiter = typeof options.delimiter === 'string' || Utils.isRegExp(options.delimiter) ? options.delimiter : defaults.delimiter; - options.depth = typeof options.depth === 'number' ? options.depth : defaults.depth; - options.arrayLimit = typeof options.arrayLimit === 'number' ? options.arrayLimit : defaults.arrayLimit; - options.parseArrays = options.parseArrays !== false; - options.decoder = typeof options.decoder === 'function' ? options.decoder : defaults.decoder; - options.allowDots = typeof options.allowDots === 'boolean' ? options.allowDots : defaults.allowDots; - options.plainObjects = typeof options.plainObjects === 'boolean' ? options.plainObjects : defaults.plainObjects; - options.allowPrototypes = typeof options.allowPrototypes === 'boolean' ? options.allowPrototypes : defaults.allowPrototypes; - options.parameterLimit = typeof options.parameterLimit === 'number' ? options.parameterLimit : defaults.parameterLimit; - options.strictNullHandling = typeof options.strictNullHandling === 'boolean' ? options.strictNullHandling : defaults.strictNullHandling; - - if (str === '' || str === null || typeof str === 'undefined') { - return options.plainObjects ? Object.create(null) : {}; - } - - var tempObj = typeof str === 'string' ? parseValues(str, options) : str; - var obj = options.plainObjects ? Object.create(null) : {}; - - // Iterate over the keys and setup the new object - - var keys = Object.keys(tempObj); - for (var i = 0; i < keys.length; ++i) { - var key = keys[i]; - var newObj = parseKeys(key, tempObj[key], options); - obj = Utils.merge(obj, newObj, options); - } - - return Utils.compact(obj); -}; - -},{"./utils":4}],3:[function(require,module,exports){ -'use strict'; - -var Utils = require('./utils'); - -var arrayPrefixGenerators = { - brackets: function brackets(prefix) { - return prefix + '[]'; - }, - indices: function indices(prefix, key) { - return prefix + '[' + key + ']'; - }, - repeat: function repeat(prefix) { - return prefix; - } -}; - -var defaults = { - delimiter: '&', - strictNullHandling: false, - skipNulls: false, - encode: true, - encoder: Utils.encode -}; - -var stringify = function stringify(object, prefix, generateArrayPrefix, strictNullHandling, skipNulls, encoder, filter, sort, allowDots) { - var obj = object; - if (typeof filter === 'function') { - obj = filter(prefix, obj); - } else if (obj instanceof Date) { - obj = obj.toISOString(); - } else if (obj === null) { - if (strictNullHandling) { - return encoder ? encoder(prefix) : prefix; - } - - obj = ''; - } - - if (typeof obj === 'string' || typeof obj === 'number' || typeof obj === 'boolean' || Utils.isBuffer(obj)) { - if (encoder) { - return [encoder(prefix) + '=' + encoder(obj)]; - } - return [prefix + '=' + String(obj)]; - } - - var values = []; - - if (typeof obj === 'undefined') { - return values; - } - - var objKeys; - if (Array.isArray(filter)) { - objKeys = filter; - } else { - var keys = Object.keys(obj); - objKeys = sort ? keys.sort(sort) : keys; - } - - for (var i = 0; i < objKeys.length; ++i) { - var key = objKeys[i]; - - if (skipNulls && obj[key] === null) { - continue; - } - - if (Array.isArray(obj)) { - values = values.concat(stringify(obj[key], generateArrayPrefix(prefix, key), generateArrayPrefix, strictNullHandling, skipNulls, encoder, filter, sort, allowDots)); - } else { - values = values.concat(stringify(obj[key], prefix + (allowDots ? '.' + key : '[' + key + ']'), generateArrayPrefix, strictNullHandling, skipNulls, encoder, filter, sort, allowDots)); - } - } - - return values; -}; - -module.exports = function (object, opts) { - var obj = object; - var options = opts || {}; - var delimiter = typeof options.delimiter === 'undefined' ? defaults.delimiter : options.delimiter; - var strictNullHandling = typeof options.strictNullHandling === 'boolean' ? options.strictNullHandling : defaults.strictNullHandling; - var skipNulls = typeof options.skipNulls === 'boolean' ? options.skipNulls : defaults.skipNulls; - var encode = typeof options.encode === 'boolean' ? options.encode : defaults.encode; - var encoder = encode ? (typeof options.encoder === 'function' ? options.encoder : defaults.encoder) : null; - var sort = typeof options.sort === 'function' ? options.sort : null; - var allowDots = typeof options.allowDots === 'undefined' ? false : options.allowDots; - var objKeys; - var filter; - - if (options.encoder !== null && options.encoder !== undefined && typeof options.encoder !== 'function') { - throw new TypeError('Encoder has to be a function.'); - } - - if (typeof options.filter === 'function') { - filter = options.filter; - obj = filter('', obj); - } else if (Array.isArray(options.filter)) { - objKeys = filter = options.filter; - } - - var keys = []; - - if (typeof obj !== 'object' || obj === null) { - return ''; - } - - var arrayFormat; - if (options.arrayFormat in arrayPrefixGenerators) { - arrayFormat = options.arrayFormat; - } else if ('indices' in options) { - arrayFormat = options.indices ? 'indices' : 'repeat'; - } else { - arrayFormat = 'indices'; - } - - var generateArrayPrefix = arrayPrefixGenerators[arrayFormat]; - - if (!objKeys) { - objKeys = Object.keys(obj); - } - - if (sort) { - objKeys.sort(sort); - } - - for (var i = 0; i < objKeys.length; ++i) { - var key = objKeys[i]; - - if (skipNulls && obj[key] === null) { - continue; - } - - keys = keys.concat(stringify(obj[key], key, generateArrayPrefix, strictNullHandling, skipNulls, encoder, filter, sort, allowDots)); - } - - return keys.join(delimiter); -}; - -},{"./utils":4}],4:[function(require,module,exports){ -'use strict'; - -var hexTable = (function () { - var array = new Array(256); - for (var i = 0; i < 256; ++i) { - array[i] = '%' + ((i < 16 ? '0' : '') + i.toString(16)).toUpperCase(); - } - - return array; -}()); - -exports.arrayToObject = function (source, options) { - var obj = options.plainObjects ? Object.create(null) : {}; - for (var i = 0; i < source.length; ++i) { - if (typeof source[i] !== 'undefined') { - obj[i] = source[i]; - } - } - - return obj; -}; - -exports.merge = function (target, source, options) { - if (!source) { - return target; - } - - if (typeof source !== 'object') { - if (Array.isArray(target)) { - target.push(source); - } else if (typeof target === 'object') { - target[source] = true; - } else { - return [target, source]; - } - - return target; - } - - if (typeof target !== 'object') { - return [target].concat(source); - } - - var mergeTarget = target; - if (Array.isArray(target) && !Array.isArray(source)) { - mergeTarget = exports.arrayToObject(target, options); - } - - return Object.keys(source).reduce(function (acc, key) { - var value = source[key]; - - if (Object.prototype.hasOwnProperty.call(acc, key)) { - acc[key] = exports.merge(acc[key], value, options); - } else { - acc[key] = value; - } - return acc; - }, mergeTarget); -}; - -exports.decode = function (str) { - try { - return decodeURIComponent(str.replace(/\+/g, ' ')); - } catch (e) { - return str; - } -}; - -exports.encode = function (str) { - // This code was originally written by Brian White (mscdex) for the io.js core querystring library. - // It has been adapted here for stricter adherence to RFC 3986 - if (str.length === 0) { - return str; - } - - var string = typeof str === 'string' ? str : String(str); - - var out = ''; - for (var i = 0; i < string.length; ++i) { - var c = string.charCodeAt(i); - - if ( - c === 0x2D || // - - c === 0x2E || // . - c === 0x5F || // _ - c === 0x7E || // ~ - (c >= 0x30 && c <= 0x39) || // 0-9 - (c >= 0x41 && c <= 0x5A) || // a-z - (c >= 0x61 && c <= 0x7A) // A-Z - ) { - out += string.charAt(i); - continue; - } - - if (c < 0x80) { - out = out + hexTable[c]; - continue; - } - - if (c < 0x800) { - out = out + (hexTable[0xC0 | (c >> 6)] + hexTable[0x80 | (c & 0x3F)]); - continue; - } - - if (c < 0xD800 || c >= 0xE000) { - out = out + (hexTable[0xE0 | (c >> 12)] + hexTable[0x80 | ((c >> 6) & 0x3F)] + hexTable[0x80 | (c & 0x3F)]); - continue; - } - - i += 1; - c = 0x10000 + (((c & 0x3FF) << 10) | (string.charCodeAt(i) & 0x3FF)); - out += hexTable[0xF0 | (c >> 18)] + hexTable[0x80 | ((c >> 12) & 0x3F)] + hexTable[0x80 | ((c >> 6) & 0x3F)] + hexTable[0x80 | (c & 0x3F)]; - } - - return out; -}; - -exports.compact = function (obj, references) { - if (typeof obj !== 'object' || obj === null) { - return obj; - } - - var refs = references || []; - var lookup = refs.indexOf(obj); - if (lookup !== -1) { - return refs[lookup]; - } - - refs.push(obj); - - if (Array.isArray(obj)) { - var compacted = []; - - for (var i = 0; i < obj.length; ++i) { - if (obj[i] && typeof obj[i] === 'object') { - compacted.push(exports.compact(obj[i], refs)); - } else if (typeof obj[i] !== 'undefined') { - compacted.push(obj[i]); - } - } - - return compacted; - } - - var keys = Object.keys(obj); - for (var j = 0; j < keys.length; ++j) { - var key = keys[j]; - obj[key] = exports.compact(obj[key], refs); - } - - return obj; -}; - -exports.isRegExp = function (obj) { - return Object.prototype.toString.call(obj) === '[object RegExp]'; -}; - -exports.isBuffer = function (obj) { - if (obj === null || typeof obj === 'undefined') { - return false; - } - - return !!(obj.constructor && obj.constructor.isBuffer && obj.constructor.isBuffer(obj)); -}; - -},{}]},{},[1])(1) -}); \ No newline at end of file diff --git a/node_modules/qs/lib/index.js b/node_modules/qs/lib/index.js deleted file mode 100755 index 19019590..00000000 --- a/node_modules/qs/lib/index.js +++ /dev/null @@ -1,9 +0,0 @@ -'use strict'; - -var Stringify = require('./stringify'); -var Parse = require('./parse'); - -module.exports = { - stringify: Stringify, - parse: Parse -}; diff --git a/node_modules/qs/lib/parse.js b/node_modules/qs/lib/parse.js deleted file mode 100755 index 8b37cb3b..00000000 --- a/node_modules/qs/lib/parse.js +++ /dev/null @@ -1,166 +0,0 @@ -'use strict'; - -var Utils = require('./utils'); - -var has = Object.prototype.hasOwnProperty; - -var defaults = { - delimiter: '&', - depth: 5, - arrayLimit: 20, - parameterLimit: 1000, - strictNullHandling: false, - plainObjects: false, - allowPrototypes: false, - allowDots: false, - decoder: Utils.decode -}; - -var parseValues = function parseValues(str, options) { - var obj = {}; - var parts = str.split(options.delimiter, options.parameterLimit === Infinity ? undefined : options.parameterLimit); - - for (var i = 0; i < parts.length; ++i) { - var part = parts[i]; - var pos = part.indexOf(']=') === -1 ? part.indexOf('=') : part.indexOf(']=') + 1; - - var key, val; - if (pos === -1) { - key = options.decoder(part); - val = options.strictNullHandling ? null : ''; - } else { - key = options.decoder(part.slice(0, pos)); - val = options.decoder(part.slice(pos + 1)); - } - if (has.call(obj, key)) { - obj[key] = [].concat(obj[key]).concat(val); - } else { - obj[key] = val; - } - } - - return obj; -}; - -var parseObject = function parseObject(chain, val, options) { - if (!chain.length) { - return val; - } - - var root = chain.shift(); - - var obj; - if (root === '[]') { - obj = []; - obj = obj.concat(parseObject(chain, val, options)); - } else { - obj = options.plainObjects ? Object.create(null) : {}; - var cleanRoot = root[0] === '[' && root[root.length - 1] === ']' ? root.slice(1, root.length - 1) : root; - var index = parseInt(cleanRoot, 10); - if ( - !isNaN(index) && - root !== cleanRoot && - String(index) === cleanRoot && - index >= 0 && - (options.parseArrays && index <= options.arrayLimit) - ) { - obj = []; - obj[index] = parseObject(chain, val, options); - } else { - obj[cleanRoot] = parseObject(chain, val, options); - } - } - - return obj; -}; - -var parseKeys = function parseKeys(givenKey, val, options) { - if (!givenKey) { - return; - } - - // Transform dot notation to bracket notation - var key = options.allowDots ? givenKey.replace(/\.([^\.\[]+)/g, '[$1]') : givenKey; - - // The regex chunks - - var parent = /^([^\[\]]*)/; - var child = /(\[[^\[\]]*\])/g; - - // Get the parent - - var segment = parent.exec(key); - - // Stash the parent if it exists - - var keys = []; - if (segment[1]) { - // If we aren't using plain objects, optionally prefix keys - // that would overwrite object prototype properties - if (!options.plainObjects && has.call(Object.prototype, segment[1])) { - if (!options.allowPrototypes) { - return; - } - } - - keys.push(segment[1]); - } - - // Loop through children appending to the array until we hit depth - - var i = 0; - while ((segment = child.exec(key)) !== null && i < options.depth) { - i += 1; - if (!options.plainObjects && has.call(Object.prototype, segment[1].replace(/\[|\]/g, ''))) { - if (!options.allowPrototypes) { - continue; - } - } - keys.push(segment[1]); - } - - // If there's a remainder, just add whatever is left - - if (segment) { - keys.push('[' + key.slice(segment.index) + ']'); - } - - return parseObject(keys, val, options); -}; - -module.exports = function (str, opts) { - var options = opts || {}; - - if (options.decoder !== null && options.decoder !== undefined && typeof options.decoder !== 'function') { - throw new TypeError('Decoder has to be a function.'); - } - - options.delimiter = typeof options.delimiter === 'string' || Utils.isRegExp(options.delimiter) ? options.delimiter : defaults.delimiter; - options.depth = typeof options.depth === 'number' ? options.depth : defaults.depth; - options.arrayLimit = typeof options.arrayLimit === 'number' ? options.arrayLimit : defaults.arrayLimit; - options.parseArrays = options.parseArrays !== false; - options.decoder = typeof options.decoder === 'function' ? options.decoder : defaults.decoder; - options.allowDots = typeof options.allowDots === 'boolean' ? options.allowDots : defaults.allowDots; - options.plainObjects = typeof options.plainObjects === 'boolean' ? options.plainObjects : defaults.plainObjects; - options.allowPrototypes = typeof options.allowPrototypes === 'boolean' ? options.allowPrototypes : defaults.allowPrototypes; - options.parameterLimit = typeof options.parameterLimit === 'number' ? options.parameterLimit : defaults.parameterLimit; - options.strictNullHandling = typeof options.strictNullHandling === 'boolean' ? options.strictNullHandling : defaults.strictNullHandling; - - if (str === '' || str === null || typeof str === 'undefined') { - return options.plainObjects ? Object.create(null) : {}; - } - - var tempObj = typeof str === 'string' ? parseValues(str, options) : str; - var obj = options.plainObjects ? Object.create(null) : {}; - - // Iterate over the keys and setup the new object - - var keys = Object.keys(tempObj); - for (var i = 0; i < keys.length; ++i) { - var key = keys[i]; - var newObj = parseKeys(key, tempObj[key], options); - obj = Utils.merge(obj, newObj, options); - } - - return Utils.compact(obj); -}; diff --git a/node_modules/qs/lib/stringify.js b/node_modules/qs/lib/stringify.js deleted file mode 100755 index 6e1c9a26..00000000 --- a/node_modules/qs/lib/stringify.js +++ /dev/null @@ -1,137 +0,0 @@ -'use strict'; - -var Utils = require('./utils'); - -var arrayPrefixGenerators = { - brackets: function brackets(prefix) { - return prefix + '[]'; - }, - indices: function indices(prefix, key) { - return prefix + '[' + key + ']'; - }, - repeat: function repeat(prefix) { - return prefix; - } -}; - -var defaults = { - delimiter: '&', - strictNullHandling: false, - skipNulls: false, - encode: true, - encoder: Utils.encode -}; - -var stringify = function stringify(object, prefix, generateArrayPrefix, strictNullHandling, skipNulls, encoder, filter, sort, allowDots) { - var obj = object; - if (typeof filter === 'function') { - obj = filter(prefix, obj); - } else if (obj instanceof Date) { - obj = obj.toISOString(); - } else if (obj === null) { - if (strictNullHandling) { - return encoder ? encoder(prefix) : prefix; - } - - obj = ''; - } - - if (typeof obj === 'string' || typeof obj === 'number' || typeof obj === 'boolean' || Utils.isBuffer(obj)) { - if (encoder) { - return [encoder(prefix) + '=' + encoder(obj)]; - } - return [prefix + '=' + String(obj)]; - } - - var values = []; - - if (typeof obj === 'undefined') { - return values; - } - - var objKeys; - if (Array.isArray(filter)) { - objKeys = filter; - } else { - var keys = Object.keys(obj); - objKeys = sort ? keys.sort(sort) : keys; - } - - for (var i = 0; i < objKeys.length; ++i) { - var key = objKeys[i]; - - if (skipNulls && obj[key] === null) { - continue; - } - - if (Array.isArray(obj)) { - values = values.concat(stringify(obj[key], generateArrayPrefix(prefix, key), generateArrayPrefix, strictNullHandling, skipNulls, encoder, filter, sort, allowDots)); - } else { - values = values.concat(stringify(obj[key], prefix + (allowDots ? '.' + key : '[' + key + ']'), generateArrayPrefix, strictNullHandling, skipNulls, encoder, filter, sort, allowDots)); - } - } - - return values; -}; - -module.exports = function (object, opts) { - var obj = object; - var options = opts || {}; - var delimiter = typeof options.delimiter === 'undefined' ? defaults.delimiter : options.delimiter; - var strictNullHandling = typeof options.strictNullHandling === 'boolean' ? options.strictNullHandling : defaults.strictNullHandling; - var skipNulls = typeof options.skipNulls === 'boolean' ? options.skipNulls : defaults.skipNulls; - var encode = typeof options.encode === 'boolean' ? options.encode : defaults.encode; - var encoder = encode ? (typeof options.encoder === 'function' ? options.encoder : defaults.encoder) : null; - var sort = typeof options.sort === 'function' ? options.sort : null; - var allowDots = typeof options.allowDots === 'undefined' ? false : options.allowDots; - var objKeys; - var filter; - - if (options.encoder !== null && options.encoder !== undefined && typeof options.encoder !== 'function') { - throw new TypeError('Encoder has to be a function.'); - } - - if (typeof options.filter === 'function') { - filter = options.filter; - obj = filter('', obj); - } else if (Array.isArray(options.filter)) { - objKeys = filter = options.filter; - } - - var keys = []; - - if (typeof obj !== 'object' || obj === null) { - return ''; - } - - var arrayFormat; - if (options.arrayFormat in arrayPrefixGenerators) { - arrayFormat = options.arrayFormat; - } else if ('indices' in options) { - arrayFormat = options.indices ? 'indices' : 'repeat'; - } else { - arrayFormat = 'indices'; - } - - var generateArrayPrefix = arrayPrefixGenerators[arrayFormat]; - - if (!objKeys) { - objKeys = Object.keys(obj); - } - - if (sort) { - objKeys.sort(sort); - } - - for (var i = 0; i < objKeys.length; ++i) { - var key = objKeys[i]; - - if (skipNulls && obj[key] === null) { - continue; - } - - keys = keys.concat(stringify(obj[key], key, generateArrayPrefix, strictNullHandling, skipNulls, encoder, filter, sort, allowDots)); - } - - return keys.join(delimiter); -}; diff --git a/node_modules/qs/lib/utils.js b/node_modules/qs/lib/utils.js deleted file mode 100755 index 2c5c8ee5..00000000 --- a/node_modules/qs/lib/utils.js +++ /dev/null @@ -1,164 +0,0 @@ -'use strict'; - -var hexTable = (function () { - var array = new Array(256); - for (var i = 0; i < 256; ++i) { - array[i] = '%' + ((i < 16 ? '0' : '') + i.toString(16)).toUpperCase(); - } - - return array; -}()); - -exports.arrayToObject = function (source, options) { - var obj = options.plainObjects ? Object.create(null) : {}; - for (var i = 0; i < source.length; ++i) { - if (typeof source[i] !== 'undefined') { - obj[i] = source[i]; - } - } - - return obj; -}; - -exports.merge = function (target, source, options) { - if (!source) { - return target; - } - - if (typeof source !== 'object') { - if (Array.isArray(target)) { - target.push(source); - } else if (typeof target === 'object') { - target[source] = true; - } else { - return [target, source]; - } - - return target; - } - - if (typeof target !== 'object') { - return [target].concat(source); - } - - var mergeTarget = target; - if (Array.isArray(target) && !Array.isArray(source)) { - mergeTarget = exports.arrayToObject(target, options); - } - - return Object.keys(source).reduce(function (acc, key) { - var value = source[key]; - - if (Object.prototype.hasOwnProperty.call(acc, key)) { - acc[key] = exports.merge(acc[key], value, options); - } else { - acc[key] = value; - } - return acc; - }, mergeTarget); -}; - -exports.decode = function (str) { - try { - return decodeURIComponent(str.replace(/\+/g, ' ')); - } catch (e) { - return str; - } -}; - -exports.encode = function (str) { - // This code was originally written by Brian White (mscdex) for the io.js core querystring library. - // It has been adapted here for stricter adherence to RFC 3986 - if (str.length === 0) { - return str; - } - - var string = typeof str === 'string' ? str : String(str); - - var out = ''; - for (var i = 0; i < string.length; ++i) { - var c = string.charCodeAt(i); - - if ( - c === 0x2D || // - - c === 0x2E || // . - c === 0x5F || // _ - c === 0x7E || // ~ - (c >= 0x30 && c <= 0x39) || // 0-9 - (c >= 0x41 && c <= 0x5A) || // a-z - (c >= 0x61 && c <= 0x7A) // A-Z - ) { - out += string.charAt(i); - continue; - } - - if (c < 0x80) { - out = out + hexTable[c]; - continue; - } - - if (c < 0x800) { - out = out + (hexTable[0xC0 | (c >> 6)] + hexTable[0x80 | (c & 0x3F)]); - continue; - } - - if (c < 0xD800 || c >= 0xE000) { - out = out + (hexTable[0xE0 | (c >> 12)] + hexTable[0x80 | ((c >> 6) & 0x3F)] + hexTable[0x80 | (c & 0x3F)]); - continue; - } - - i += 1; - c = 0x10000 + (((c & 0x3FF) << 10) | (string.charCodeAt(i) & 0x3FF)); - out += hexTable[0xF0 | (c >> 18)] + hexTable[0x80 | ((c >> 12) & 0x3F)] + hexTable[0x80 | ((c >> 6) & 0x3F)] + hexTable[0x80 | (c & 0x3F)]; - } - - return out; -}; - -exports.compact = function (obj, references) { - if (typeof obj !== 'object' || obj === null) { - return obj; - } - - var refs = references || []; - var lookup = refs.indexOf(obj); - if (lookup !== -1) { - return refs[lookup]; - } - - refs.push(obj); - - if (Array.isArray(obj)) { - var compacted = []; - - for (var i = 0; i < obj.length; ++i) { - if (obj[i] && typeof obj[i] === 'object') { - compacted.push(exports.compact(obj[i], refs)); - } else if (typeof obj[i] !== 'undefined') { - compacted.push(obj[i]); - } - } - - return compacted; - } - - var keys = Object.keys(obj); - for (var j = 0; j < keys.length; ++j) { - var key = keys[j]; - obj[key] = exports.compact(obj[key], refs); - } - - return obj; -}; - -exports.isRegExp = function (obj) { - return Object.prototype.toString.call(obj) === '[object RegExp]'; -}; - -exports.isBuffer = function (obj) { - if (obj === null || typeof obj === 'undefined') { - return false; - } - - return !!(obj.constructor && obj.constructor.isBuffer && obj.constructor.isBuffer(obj)); -}; diff --git a/node_modules/qs/package.json b/node_modules/qs/package.json deleted file mode 100644 index 6241bf11..00000000 --- a/node_modules/qs/package.json +++ /dev/null @@ -1,121 +0,0 @@ -{ - "_args": [ - [ - { - "raw": "qs@~6.2.0", - "scope": null, - "escapedName": "qs", - "name": "qs", - "rawSpec": "~6.2.0", - "spec": ">=6.2.0 <6.3.0", - "type": "range" - }, - "/Users/benjaminarias/Desktop/poly/node_modules/request" - ] - ], - "_from": "qs@>=6.2.0 <6.3.0", - "_id": "qs@6.2.1", - "_inCache": true, - "_installable": true, - "_location": "/qs", - "_nodeVersion": "6.3.0", - "_npmOperationalInternal": { - "host": "packages-12-west.internal.npmjs.com", - "tmp": "tmp/qs-6.2.1.tgz_1469044929716_0.06957711698487401" - }, - "_npmUser": { - "name": "ljharb", - "email": "ljharb@gmail.com" - }, - "_npmVersion": "3.10.3", - "_phantomChildren": {}, - "_requested": { - "raw": "qs@~6.2.0", - "scope": null, - "escapedName": "qs", - "name": "qs", - "rawSpec": "~6.2.0", - "spec": ">=6.2.0 <6.3.0", - "type": "range" - }, - "_requiredBy": [ - "/request" - ], - "_resolved": "https://registry.npmjs.org/qs/-/qs-6.2.1.tgz", - "_shasum": "ce03c5ff0935bc1d9d69a9f14cbd18e568d67625", - "_shrinkwrap": null, - "_spec": "qs@~6.2.0", - "_where": "/Users/benjaminarias/Desktop/poly/node_modules/request", - "bugs": { - "url": "https://github.com/ljharb/qs/issues" - }, - "contributors": [ - { - "name": "Jordan Harband", - "email": "ljharb@gmail.com", - "url": "http://ljharb.codes" - } - ], - "dependencies": {}, - "description": "A querystring parser that supports nesting and arrays, with a depth limit", - "devDependencies": { - "@ljharb/eslint-config": "^6.0.0", - "browserify": "^13.0.1", - "covert": "^1.1.0", - "eslint": "^3.1.0", - "evalmd": "^0.0.17", - "iconv-lite": "^0.4.13", - "mkdirp": "^0.5.1", - "parallelshell": "^2.0.0", - "qs-iconv": "^1.0.3", - "tape": "^4.6.0" - }, - "directories": {}, - "dist": { - "shasum": "ce03c5ff0935bc1d9d69a9f14cbd18e568d67625", - "tarball": "https://registry.npmjs.org/qs/-/qs-6.2.1.tgz" - }, - "engines": { - "node": ">=0.6" - }, - "gitHead": "335f839142e6c2c69f5302c4940d92acb0e77561", - "homepage": "https://github.com/ljharb/qs", - "keywords": [ - "querystring", - "qs" - ], - "license": "BSD-3-Clause", - "main": "lib/index.js", - "maintainers": [ - { - "name": "hueniverse", - "email": "eran@hammer.io" - }, - { - "name": "ljharb", - "email": "ljharb@gmail.com" - }, - { - "name": "nlf", - "email": "quitlahok@gmail.com" - } - ], - "name": "qs", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git+https://github.com/ljharb/qs.git" - }, - "scripts": { - "coverage": "covert test", - "dist": "mkdirp dist && browserify --standalone Qs lib/index.js > dist/qs.js", - "lint": "eslint lib/*.js text/*.js", - "prepublish": "npm run dist", - "pretest": "npm run --silent readme && npm run --silent lint", - "readme": "evalmd README.md", - "test": "npm run --silent coverage", - "tests-only": "node test" - }, - "version": "6.2.1" -} diff --git a/node_modules/qs/test/index.js b/node_modules/qs/test/index.js deleted file mode 100644 index b6a7d952..00000000 --- a/node_modules/qs/test/index.js +++ /dev/null @@ -1,5 +0,0 @@ -require('./parse'); - -require('./stringify'); - -require('./utils'); diff --git a/node_modules/qs/test/parse.js b/node_modules/qs/test/parse.js deleted file mode 100755 index ccf8c8c4..00000000 --- a/node_modules/qs/test/parse.js +++ /dev/null @@ -1,451 +0,0 @@ -'use strict'; - -var test = require('tape'); -var qs = require('../'); -var iconv = require('iconv-lite'); - -test('parse()', function (t) { - t.test('parses a simple string', function (st) { - st.deepEqual(qs.parse('0=foo'), { '0': 'foo' }); - st.deepEqual(qs.parse('foo=c++'), { foo: 'c ' }); - st.deepEqual(qs.parse('a[>=]=23'), { a: { '>=': '23' } }); - st.deepEqual(qs.parse('a[<=>]==23'), { a: { '<=>': '=23' } }); - st.deepEqual(qs.parse('a[==]=23'), { a: { '==': '23' } }); - st.deepEqual(qs.parse('foo', { strictNullHandling: true }), { foo: null }); - st.deepEqual(qs.parse('foo'), { foo: '' }); - st.deepEqual(qs.parse('foo='), { foo: '' }); - st.deepEqual(qs.parse('foo=bar'), { foo: 'bar' }); - st.deepEqual(qs.parse(' foo = bar = baz '), { ' foo ': ' bar = baz ' }); - st.deepEqual(qs.parse('foo=bar=baz'), { foo: 'bar=baz' }); - st.deepEqual(qs.parse('foo=bar&bar=baz'), { foo: 'bar', bar: 'baz' }); - st.deepEqual(qs.parse('foo2=bar2&baz2='), { foo2: 'bar2', baz2: '' }); - st.deepEqual(qs.parse('foo=bar&baz', { strictNullHandling: true }), { foo: 'bar', baz: null }); - st.deepEqual(qs.parse('foo=bar&baz'), { foo: 'bar', baz: '' }); - st.deepEqual(qs.parse('cht=p3&chd=t:60,40&chs=250x100&chl=Hello|World'), { - cht: 'p3', - chd: 't:60,40', - chs: '250x100', - chl: 'Hello|World' - }); - st.end(); - }); - - t.test('allows enabling dot notation', function (st) { - st.deepEqual(qs.parse('a.b=c'), { 'a.b': 'c' }); - st.deepEqual(qs.parse('a.b=c', { allowDots: true }), { a: { b: 'c' } }); - st.end(); - }); - - t.deepEqual(qs.parse('a[b]=c'), { a: { b: 'c' } }, 'parses a single nested string'); - t.deepEqual(qs.parse('a[b][c]=d'), { a: { b: { c: 'd' } } }, 'parses a double nested string'); - t.deepEqual( - qs.parse('a[b][c][d][e][f][g][h]=i'), - { a: { b: { c: { d: { e: { f: { '[g][h]': 'i' } } } } } } }, - 'defaults to a depth of 5' - ); - - t.test('only parses one level when depth = 1', function (st) { - st.deepEqual(qs.parse('a[b][c]=d', { depth: 1 }), { a: { b: { '[c]': 'd' } } }); - st.deepEqual(qs.parse('a[b][c][d]=e', { depth: 1 }), { a: { b: { '[c][d]': 'e' } } }); - st.end(); - }); - - t.deepEqual(qs.parse('a=b&a=c'), { a: ['b', 'c'] }, 'parses a simple array'); - - t.test('parses an explicit array', function (st) { - st.deepEqual(qs.parse('a[]=b'), { a: ['b'] }); - st.deepEqual(qs.parse('a[]=b&a[]=c'), { a: ['b', 'c'] }); - st.deepEqual(qs.parse('a[]=b&a[]=c&a[]=d'), { a: ['b', 'c', 'd'] }); - st.end(); - }); - - t.test('parses a mix of simple and explicit arrays', function (st) { - st.deepEqual(qs.parse('a=b&a[]=c'), { a: ['b', 'c'] }); - st.deepEqual(qs.parse('a[]=b&a=c'), { a: ['b', 'c'] }); - st.deepEqual(qs.parse('a[0]=b&a=c'), { a: ['b', 'c'] }); - st.deepEqual(qs.parse('a=b&a[0]=c'), { a: ['b', 'c'] }); - st.deepEqual(qs.parse('a[1]=b&a=c'), { a: ['b', 'c'] }); - st.deepEqual(qs.parse('a=b&a[1]=c'), { a: ['b', 'c'] }); - st.end(); - }); - - t.test('parses a nested array', function (st) { - st.deepEqual(qs.parse('a[b][]=c&a[b][]=d'), { a: { b: ['c', 'd'] } }); - st.deepEqual(qs.parse('a[>=]=25'), { a: { '>=': '25' } }); - st.end(); - }); - - t.test('allows to specify array indices', function (st) { - st.deepEqual(qs.parse('a[1]=c&a[0]=b&a[2]=d'), { a: ['b', 'c', 'd'] }); - st.deepEqual(qs.parse('a[1]=c&a[0]=b'), { a: ['b', 'c'] }); - st.deepEqual(qs.parse('a[1]=c'), { a: ['c'] }); - st.end(); - }); - - t.test('limits specific array indices to 20', function (st) { - st.deepEqual(qs.parse('a[20]=a'), { a: ['a'] }); - st.deepEqual(qs.parse('a[21]=a'), { a: { '21': 'a' } }); - st.end(); - }); - - t.deepEqual(qs.parse('a[12b]=c'), { a: { '12b': 'c' } }, 'supports keys that begin with a number'); - - t.test('supports encoded = signs', function (st) { - st.deepEqual(qs.parse('he%3Dllo=th%3Dere'), { 'he=llo': 'th=ere' }); - st.end(); - }); - - t.test('is ok with url encoded strings', function (st) { - st.deepEqual(qs.parse('a[b%20c]=d'), { a: { 'b c': 'd' } }); - st.deepEqual(qs.parse('a[b]=c%20d'), { a: { b: 'c d' } }); - st.end(); - }); - - t.test('allows brackets in the value', function (st) { - st.deepEqual(qs.parse('pets=["tobi"]'), { pets: '["tobi"]' }); - st.deepEqual(qs.parse('operators=[">=", "<="]'), { operators: '[">=", "<="]' }); - st.end(); - }); - - t.test('allows empty values', function (st) { - st.deepEqual(qs.parse(''), {}); - st.deepEqual(qs.parse(null), {}); - st.deepEqual(qs.parse(undefined), {}); - st.end(); - }); - - t.test('transforms arrays to objects', function (st) { - st.deepEqual(qs.parse('foo[0]=bar&foo[bad]=baz'), { foo: { '0': 'bar', bad: 'baz' } }); - st.deepEqual(qs.parse('foo[bad]=baz&foo[0]=bar'), { foo: { bad: 'baz', '0': 'bar' } }); - st.deepEqual(qs.parse('foo[bad]=baz&foo[]=bar'), { foo: { bad: 'baz', '0': 'bar' } }); - st.deepEqual(qs.parse('foo[]=bar&foo[bad]=baz'), { foo: { '0': 'bar', bad: 'baz' } }); - st.deepEqual(qs.parse('foo[bad]=baz&foo[]=bar&foo[]=foo'), { foo: { bad: 'baz', '0': 'bar', '1': 'foo' } }); - st.deepEqual(qs.parse('foo[0][a]=a&foo[0][b]=b&foo[1][a]=aa&foo[1][b]=bb'), { foo: [{ a: 'a', b: 'b' }, { a: 'aa', b: 'bb' }] }); - - st.deepEqual(qs.parse('a[]=b&a[t]=u&a[hasOwnProperty]=c', { allowPrototypes: false }), { a: { '0': 'b', c: true, t: 'u' } }); - st.deepEqual(qs.parse('a[]=b&a[t]=u&a[hasOwnProperty]=c', { allowPrototypes: true }), { a: { '0': 'b', t: 'u', hasOwnProperty: 'c' } }); - st.deepEqual(qs.parse('a[]=b&a[hasOwnProperty]=c&a[x]=y', { allowPrototypes: false }), { a: { '0': 'b', '1': 'c', x: 'y' } }); - st.deepEqual(qs.parse('a[]=b&a[hasOwnProperty]=c&a[x]=y', { allowPrototypes: true }), { a: { '0': 'b', hasOwnProperty: 'c', x: 'y' } }); - st.end(); - }); - - t.test('transforms arrays to objects (dot notation)', function (st) { - st.deepEqual(qs.parse('foo[0].baz=bar&fool.bad=baz', { allowDots: true }), { foo: [{ baz: 'bar' }], fool: { bad: 'baz' } }); - st.deepEqual(qs.parse('foo[0].baz=bar&fool.bad.boo=baz', { allowDots: true }), { foo: [{ baz: 'bar' }], fool: { bad: { boo: 'baz' } } }); - st.deepEqual(qs.parse('foo[0][0].baz=bar&fool.bad=baz', { allowDots: true }), { foo: [[{ baz: 'bar' }]], fool: { bad: 'baz' } }); - st.deepEqual(qs.parse('foo[0].baz[0]=15&foo[0].bar=2', { allowDots: true }), { foo: [{ baz: ['15'], bar: '2' }] }); - st.deepEqual(qs.parse('foo[0].baz[0]=15&foo[0].baz[1]=16&foo[0].bar=2', { allowDots: true }), { foo: [{ baz: ['15', '16'], bar: '2' }] }); - st.deepEqual(qs.parse('foo.bad=baz&foo[0]=bar', { allowDots: true }), { foo: { bad: 'baz', '0': 'bar' } }); - st.deepEqual(qs.parse('foo.bad=baz&foo[]=bar', { allowDots: true }), { foo: { bad: 'baz', '0': 'bar' } }); - st.deepEqual(qs.parse('foo[]=bar&foo.bad=baz', { allowDots: true }), { foo: { '0': 'bar', bad: 'baz' } }); - st.deepEqual(qs.parse('foo.bad=baz&foo[]=bar&foo[]=foo', { allowDots: true }), { foo: { bad: 'baz', '0': 'bar', '1': 'foo' } }); - st.deepEqual(qs.parse('foo[0].a=a&foo[0].b=b&foo[1].a=aa&foo[1].b=bb', { allowDots: true }), { foo: [{ a: 'a', b: 'b' }, { a: 'aa', b: 'bb' }] }); - st.end(); - }); - - t.deepEqual(qs.parse('a[b]=c&a=d'), { a: { b: 'c', d: true } }, 'can add keys to objects'); - - t.test('correctly prunes undefined values when converting an array to an object', function (st) { - st.deepEqual(qs.parse('a[2]=b&a[99999999]=c'), { a: { '2': 'b', '99999999': 'c' } }); - st.end(); - }); - - t.test('supports malformed uri characters', function (st) { - st.deepEqual(qs.parse('{%:%}', { strictNullHandling: true }), { '{%:%}': null }); - st.deepEqual(qs.parse('{%:%}='), { '{%:%}': '' }); - st.deepEqual(qs.parse('foo=%:%}'), { foo: '%:%}' }); - st.end(); - }); - - t.test('doesn\'t produce empty keys', function (st) { - st.deepEqual(qs.parse('_r=1&'), { '_r': '1' }); - st.end(); - }); - - t.test('cannot access Object prototype', function (st) { - qs.parse('constructor[prototype][bad]=bad'); - qs.parse('bad[constructor][prototype][bad]=bad'); - st.equal(typeof Object.prototype.bad, 'undefined'); - st.end(); - }); - - t.test('parses arrays of objects', function (st) { - st.deepEqual(qs.parse('a[][b]=c'), { a: [{ b: 'c' }] }); - st.deepEqual(qs.parse('a[0][b]=c'), { a: [{ b: 'c' }] }); - st.end(); - }); - - t.test('allows for empty strings in arrays', function (st) { - st.deepEqual(qs.parse('a[]=b&a[]=&a[]=c'), { a: ['b', '', 'c'] }); - - st.deepEqual( - qs.parse('a[0]=b&a[1]&a[2]=c&a[19]=', { strictNullHandling: true, arrayLimit: 20 }), - { a: ['b', null, 'c', ''] }, - 'with arrayLimit 20 + array indices: null then empty string works' - ); - st.deepEqual( - qs.parse('a[]=b&a[]&a[]=c&a[]=', { strictNullHandling: true, arrayLimit: 0 }), - { a: ['b', null, 'c', ''] }, - 'with arrayLimit 0 + array brackets: null then empty string works' - ); - - st.deepEqual( - qs.parse('a[0]=b&a[1]=&a[2]=c&a[19]', { strictNullHandling: true, arrayLimit: 20 }), - { a: ['b', '', 'c', null] }, - 'with arrayLimit 20 + array indices: empty string then null works' - ); - st.deepEqual( - qs.parse('a[]=b&a[]=&a[]=c&a[]', { strictNullHandling: true, arrayLimit: 0 }), - { a: ['b', '', 'c', null] }, - 'with arrayLimit 0 + array brackets: empty string then null works' - ); - - st.deepEqual( - qs.parse('a[]=&a[]=b&a[]=c'), - { a: ['', 'b', 'c'] }, - 'array brackets: empty strings work' - ); - st.end(); - }); - - t.test('compacts sparse arrays', function (st) { - st.deepEqual(qs.parse('a[10]=1&a[2]=2'), { a: ['2', '1'] }); - st.deepEqual(qs.parse('a[1][b][2][c]=1'), { a: [{ b: [{ c: '1' }] }] }); - st.deepEqual(qs.parse('a[1][2][3][c]=1'), { a: [[[{ c: '1' }]]] }); - st.deepEqual(qs.parse('a[1][2][3][c][1]=1'), { a: [[[{ c: ['1'] }]]] }); - st.end(); - }); - - t.test('parses semi-parsed strings', function (st) { - st.deepEqual(qs.parse({ 'a[b]': 'c' }), { a: { b: 'c' } }); - st.deepEqual(qs.parse({ 'a[b]': 'c', 'a[d]': 'e' }), { a: { b: 'c', d: 'e' } }); - st.end(); - }); - - t.test('parses buffers correctly', function (st) { - var b = new Buffer('test'); - st.deepEqual(qs.parse({ a: b }), { a: b }); - st.end(); - }); - - t.test('continues parsing when no parent is found', function (st) { - st.deepEqual(qs.parse('[]=&a=b'), { '0': '', a: 'b' }); - st.deepEqual(qs.parse('[]&a=b', { strictNullHandling: true }), { '0': null, a: 'b' }); - st.deepEqual(qs.parse('[foo]=bar'), { foo: 'bar' }); - st.end(); - }); - - t.test('does not error when parsing a very long array', function (st) { - var str = 'a[]=a'; - while (Buffer.byteLength(str) < 128 * 1024) { - str = str + '&' + str; - } - - st.doesNotThrow(function () { qs.parse(str); }); - - st.end(); - }); - - t.test('should not throw when a native prototype has an enumerable property', { parallel: false }, function (st) { - Object.prototype.crash = ''; - Array.prototype.crash = ''; - st.doesNotThrow(qs.parse.bind(null, 'a=b')); - st.deepEqual(qs.parse('a=b'), { a: 'b' }); - st.doesNotThrow(qs.parse.bind(null, 'a[][b]=c')); - st.deepEqual(qs.parse('a[][b]=c'), { a: [{ b: 'c' }] }); - delete Object.prototype.crash; - delete Array.prototype.crash; - st.end(); - }); - - t.test('parses a string with an alternative string delimiter', function (st) { - st.deepEqual(qs.parse('a=b;c=d', { delimiter: ';' }), { a: 'b', c: 'd' }); - st.end(); - }); - - t.test('parses a string with an alternative RegExp delimiter', function (st) { - st.deepEqual(qs.parse('a=b; c=d', { delimiter: /[;,] */ }), { a: 'b', c: 'd' }); - st.end(); - }); - - t.test('does not use non-splittable objects as delimiters', function (st) { - st.deepEqual(qs.parse('a=b&c=d', { delimiter: true }), { a: 'b', c: 'd' }); - st.end(); - }); - - t.test('allows overriding parameter limit', function (st) { - st.deepEqual(qs.parse('a=b&c=d', { parameterLimit: 1 }), { a: 'b' }); - st.end(); - }); - - t.test('allows setting the parameter limit to Infinity', function (st) { - st.deepEqual(qs.parse('a=b&c=d', { parameterLimit: Infinity }), { a: 'b', c: 'd' }); - st.end(); - }); - - t.test('allows overriding array limit', function (st) { - st.deepEqual(qs.parse('a[0]=b', { arrayLimit: -1 }), { a: { '0': 'b' } }); - st.deepEqual(qs.parse('a[-1]=b', { arrayLimit: -1 }), { a: { '-1': 'b' } }); - st.deepEqual(qs.parse('a[0]=b&a[1]=c', { arrayLimit: 0 }), { a: { '0': 'b', '1': 'c' } }); - st.end(); - }); - - t.test('allows disabling array parsing', function (st) { - st.deepEqual(qs.parse('a[0]=b&a[1]=c', { parseArrays: false }), { a: { '0': 'b', '1': 'c' } }); - st.end(); - }); - - t.test('parses an object', function (st) { - var input = { - 'user[name]': { 'pop[bob]': 3 }, - 'user[email]': null - }; - - var expected = { - user: { - name: { 'pop[bob]': 3 }, - email: null - } - }; - - var result = qs.parse(input); - - st.deepEqual(result, expected); - st.end(); - }); - - t.test('parses an object in dot notation', function (st) { - var input = { - 'user.name': { 'pop[bob]': 3 }, - 'user.email.': null - }; - - var expected = { - user: { - name: { 'pop[bob]': 3 }, - email: null - } - }; - - var result = qs.parse(input, { allowDots: true }); - - st.deepEqual(result, expected); - st.end(); - }); - - t.test('parses an object and not child values', function (st) { - var input = { - 'user[name]': { 'pop[bob]': { 'test': 3 } }, - 'user[email]': null - }; - - var expected = { - user: { - name: { 'pop[bob]': { 'test': 3 } }, - email: null - } - }; - - var result = qs.parse(input); - - st.deepEqual(result, expected); - st.end(); - }); - - t.test('does not blow up when Buffer global is missing', function (st) { - var tempBuffer = global.Buffer; - delete global.Buffer; - var result = qs.parse('a=b&c=d'); - global.Buffer = tempBuffer; - st.deepEqual(result, { a: 'b', c: 'd' }); - st.end(); - }); - - t.test('does not crash when parsing circular references', function (st) { - var a = {}; - a.b = a; - - var parsed; - - st.doesNotThrow(function () { - parsed = qs.parse({ 'foo[bar]': 'baz', 'foo[baz]': a }); - }); - - st.equal('foo' in parsed, true, 'parsed has "foo" property'); - st.equal('bar' in parsed.foo, true); - st.equal('baz' in parsed.foo, true); - st.equal(parsed.foo.bar, 'baz'); - st.deepEqual(parsed.foo.baz, a); - st.end(); - }); - - t.test('parses plain objects correctly', function (st) { - var a = Object.create(null); - a.b = 'c'; - - st.deepEqual(qs.parse(a), { b: 'c' }); - var result = qs.parse({ a: a }); - st.equal('a' in result, true, 'result has "a" property'); - st.deepEqual(result.a, a); - st.end(); - }); - - t.test('parses dates correctly', function (st) { - var now = new Date(); - st.deepEqual(qs.parse({ a: now }), { a: now }); - st.end(); - }); - - t.test('parses regular expressions correctly', function (st) { - var re = /^test$/; - st.deepEqual(qs.parse({ a: re }), { a: re }); - st.end(); - }); - - t.test('can allow overwriting prototype properties', function (st) { - st.deepEqual(qs.parse('a[hasOwnProperty]=b', { allowPrototypes: true }), { a: { hasOwnProperty: 'b' } }, { prototype: false }); - st.deepEqual(qs.parse('hasOwnProperty=b', { allowPrototypes: true }), { hasOwnProperty: 'b' }, { prototype: false }); - st.end(); - }); - - t.test('can return plain objects', function (st) { - var expected = Object.create(null); - expected.a = Object.create(null); - expected.a.b = 'c'; - expected.a.hasOwnProperty = 'd'; - st.deepEqual(qs.parse('a[b]=c&a[hasOwnProperty]=d', { plainObjects: true }), expected); - st.deepEqual(qs.parse(null, { plainObjects: true }), Object.create(null)); - var expectedArray = Object.create(null); - expectedArray.a = Object.create(null); - expectedArray.a['0'] = 'b'; - expectedArray.a.c = 'd'; - st.deepEqual(qs.parse('a[]=b&a[c]=d', { plainObjects: true }), expectedArray); - st.end(); - }); - - t.test('can parse with custom encoding', function (st) { - st.deepEqual(qs.parse('%8c%a7=%91%e5%8d%e3%95%7b', { - decoder: function (str) { - var reg = /\%([0-9A-F]{2})/ig; - var result = []; - var parts; - var last = 0; - while (parts = reg.exec(str)) { - result.push(parseInt(parts[1], 16)); - last = parts.index + parts[0].length; - } - return iconv.decode(new Buffer(result), 'shift_jis').toString(); - } - }), { 県: '大阪府' }); - st.end(); - }); - - t.test('throws error with wrong decoder', function (st) { - st.throws(function () { - qs.parse({}, { - decoder: 'string' - }); - }, new TypeError('Decoder has to be a function.')); - st.end(); - }); -}); diff --git a/node_modules/qs/test/stringify.js b/node_modules/qs/test/stringify.js deleted file mode 100755 index 699397e3..00000000 --- a/node_modules/qs/test/stringify.js +++ /dev/null @@ -1,305 +0,0 @@ -'use strict'; - -var test = require('tape'); -var qs = require('../'); -var iconv = require('iconv-lite'); - -test('stringify()', function (t) { - t.test('stringifies a querystring object', function (st) { - st.equal(qs.stringify({ a: 'b' }), 'a=b'); - st.equal(qs.stringify({ a: 1 }), 'a=1'); - st.equal(qs.stringify({ a: 1, b: 2 }), 'a=1&b=2'); - st.equal(qs.stringify({ a: 'A_Z' }), 'a=A_Z'); - st.equal(qs.stringify({ a: '€' }), 'a=%E2%82%AC'); - st.equal(qs.stringify({ a: '' }), 'a=%EE%80%80'); - st.equal(qs.stringify({ a: 'א' }), 'a=%D7%90'); - st.equal(qs.stringify({ a: '𐐷' }), 'a=%F0%90%90%B7'); - st.end(); - }); - - t.test('stringifies a nested object', function (st) { - st.equal(qs.stringify({ a: { b: 'c' } }), 'a%5Bb%5D=c'); - st.equal(qs.stringify({ a: { b: { c: { d: 'e' } } } }), 'a%5Bb%5D%5Bc%5D%5Bd%5D=e'); - st.end(); - }); - - t.test('stringifies a nested object with dots notation', function (st) { - st.equal(qs.stringify({ a: { b: 'c' } }, { allowDots: true }), 'a.b=c'); - st.equal(qs.stringify({ a: { b: { c: { d: 'e' } } } }, { allowDots: true }), 'a.b.c.d=e'); - st.end(); - }); - - t.test('stringifies an array value', function (st) { - st.equal(qs.stringify({ a: ['b', 'c', 'd'] }), 'a%5B0%5D=b&a%5B1%5D=c&a%5B2%5D=d'); - st.end(); - }); - - t.test('omits nulls when asked', function (st) { - st.equal(qs.stringify({ a: 'b', c: null }, { skipNulls: true }), 'a=b'); - st.end(); - }); - - - t.test('omits nested nulls when asked', function (st) { - st.equal(qs.stringify({ a: { b: 'c', d: null } }, { skipNulls: true }), 'a%5Bb%5D=c'); - st.end(); - }); - - t.test('omits array indices when asked', function (st) { - st.equal(qs.stringify({ a: ['b', 'c', 'd'] }, { indices: false }), 'a=b&a=c&a=d'); - st.end(); - }); - - t.test('stringifies a nested array value', function (st) { - st.equal(qs.stringify({ a: { b: ['c', 'd'] } }), 'a%5Bb%5D%5B0%5D=c&a%5Bb%5D%5B1%5D=d'); - st.end(); - }); - - t.test('stringifies a nested array value with dots notation', function (st) { - st.equal(qs.stringify({ a: { b: ['c', 'd'] } }, { allowDots: true, encode: false }), 'a.b[0]=c&a.b[1]=d'); - st.end(); - }); - - t.test('stringifies an object inside an array', function (st) { - st.equal(qs.stringify({ a: [{ b: 'c' }] }), 'a%5B0%5D%5Bb%5D=c'); - st.equal(qs.stringify({ a: [{ b: { c: [1] } }] }), 'a%5B0%5D%5Bb%5D%5Bc%5D%5B0%5D=1'); - st.end(); - }); - - t.test('stringifies an array with mixed objects and primitives', function (st) { - st.equal(qs.stringify({ a: [{ b: 1 }, 2, 3] }, { encode: false }), 'a[0][b]=1&a[1]=2&a[2]=3'); - st.end(); - }); - - t.test('stringifies an object inside an array with dots notation', function (st) { - st.equal(qs.stringify({ a: [{ b: 'c' }] }, { allowDots: true, encode: false }), 'a[0].b=c'); - st.equal(qs.stringify({ a: [{ b: { c: [1] } }] }, { allowDots: true, encode: false }), 'a[0].b.c[0]=1'); - st.end(); - }); - - t.test('does not omit object keys when indices = false', function (st) { - st.equal(qs.stringify({ a: [{ b: 'c' }] }, { indices: false }), 'a%5Bb%5D=c'); - st.end(); - }); - - t.test('uses indices notation for arrays when indices=true', function (st) { - st.equal(qs.stringify({ a: ['b', 'c'] }, { indices: true }), 'a%5B0%5D=b&a%5B1%5D=c'); - st.end(); - }); - - t.test('uses indices notation for arrays when no arrayFormat is specified', function (st) { - st.equal(qs.stringify({ a: ['b', 'c'] }), 'a%5B0%5D=b&a%5B1%5D=c'); - st.end(); - }); - - t.test('uses indices notation for arrays when no arrayFormat=indices', function (st) { - st.equal(qs.stringify({ a: ['b', 'c'] }, { arrayFormat: 'indices' }), 'a%5B0%5D=b&a%5B1%5D=c'); - st.end(); - }); - - t.test('uses repeat notation for arrays when no arrayFormat=repeat', function (st) { - st.equal(qs.stringify({ a: ['b', 'c'] }, { arrayFormat: 'repeat' }), 'a=b&a=c'); - st.end(); - }); - - t.test('uses brackets notation for arrays when no arrayFormat=brackets', function (st) { - st.equal(qs.stringify({ a: ['b', 'c'] }, { arrayFormat: 'brackets' }), 'a%5B%5D=b&a%5B%5D=c'); - st.end(); - }); - - t.test('stringifies a complicated object', function (st) { - st.equal(qs.stringify({ a: { b: 'c', d: 'e' } }), 'a%5Bb%5D=c&a%5Bd%5D=e'); - st.end(); - }); - - t.test('stringifies an empty value', function (st) { - st.equal(qs.stringify({ a: '' }), 'a='); - st.equal(qs.stringify({ a: null }, { strictNullHandling: true }), 'a'); - - st.equal(qs.stringify({ a: '', b: '' }), 'a=&b='); - st.equal(qs.stringify({ a: null, b: '' }, { strictNullHandling: true }), 'a&b='); - - st.equal(qs.stringify({ a: { b: '' } }), 'a%5Bb%5D='); - st.equal(qs.stringify({ a: { b: null } }, { strictNullHandling: true }), 'a%5Bb%5D'); - st.equal(qs.stringify({ a: { b: null } }, { strictNullHandling: false }), 'a%5Bb%5D='); - - st.end(); - }); - - t.test('stringifies an empty object', function (st) { - var obj = Object.create(null); - obj.a = 'b'; - st.equal(qs.stringify(obj), 'a=b'); - st.end(); - }); - - t.test('returns an empty string for invalid input', function (st) { - st.equal(qs.stringify(undefined), ''); - st.equal(qs.stringify(false), ''); - st.equal(qs.stringify(null), ''); - st.equal(qs.stringify(''), ''); - st.end(); - }); - - t.test('stringifies an object with an empty object as a child', function (st) { - var obj = { - a: Object.create(null) - }; - - obj.a.b = 'c'; - st.equal(qs.stringify(obj), 'a%5Bb%5D=c'); - st.end(); - }); - - t.test('drops keys with a value of undefined', function (st) { - st.equal(qs.stringify({ a: undefined }), ''); - - st.equal(qs.stringify({ a: { b: undefined, c: null } }, { strictNullHandling: true }), 'a%5Bc%5D'); - st.equal(qs.stringify({ a: { b: undefined, c: null } }, { strictNullHandling: false }), 'a%5Bc%5D='); - st.equal(qs.stringify({ a: { b: undefined, c: '' } }), 'a%5Bc%5D='); - st.end(); - }); - - t.test('url encodes values', function (st) { - st.equal(qs.stringify({ a: 'b c' }), 'a=b%20c'); - st.end(); - }); - - t.test('stringifies a date', function (st) { - var now = new Date(); - var str = 'a=' + encodeURIComponent(now.toISOString()); - st.equal(qs.stringify({ a: now }), str); - st.end(); - }); - - t.test('stringifies the weird object from qs', function (st) { - st.equal(qs.stringify({ 'my weird field': '~q1!2"\'w$5&7/z8)?' }), 'my%20weird%20field=~q1%212%22%27w%245%267%2Fz8%29%3F'); - st.end(); - }); - - t.test('skips properties that are part of the object prototype', function (st) { - Object.prototype.crash = 'test'; - st.equal(qs.stringify({ a: 'b' }), 'a=b'); - st.equal(qs.stringify({ a: { b: 'c' } }), 'a%5Bb%5D=c'); - delete Object.prototype.crash; - st.end(); - }); - - t.test('stringifies boolean values', function (st) { - st.equal(qs.stringify({ a: true }), 'a=true'); - st.equal(qs.stringify({ a: { b: true } }), 'a%5Bb%5D=true'); - st.equal(qs.stringify({ b: false }), 'b=false'); - st.equal(qs.stringify({ b: { c: false } }), 'b%5Bc%5D=false'); - st.end(); - }); - - t.test('stringifies buffer values', function (st) { - st.equal(qs.stringify({ a: new Buffer('test') }), 'a=test'); - st.equal(qs.stringify({ a: { b: new Buffer('test') } }), 'a%5Bb%5D=test'); - st.end(); - }); - - t.test('stringifies an object using an alternative delimiter', function (st) { - st.equal(qs.stringify({ a: 'b', c: 'd' }, { delimiter: ';' }), 'a=b;c=d'); - st.end(); - }); - - t.test('doesn\'t blow up when Buffer global is missing', function (st) { - var tempBuffer = global.Buffer; - delete global.Buffer; - var result = qs.stringify({ a: 'b', c: 'd' }); - global.Buffer = tempBuffer; - st.equal(result, 'a=b&c=d'); - st.end(); - }); - - t.test('selects properties when filter=array', function (st) { - st.equal(qs.stringify({ a: 'b' }, { filter: ['a'] }), 'a=b'); - st.equal(qs.stringify({ a: 1 }, { filter: [] }), ''); - st.equal(qs.stringify({ a: { b: [1, 2, 3, 4], c: 'd' }, c: 'f' }, { filter: ['a', 'b', 0, 2] }), 'a%5Bb%5D%5B0%5D=1&a%5Bb%5D%5B2%5D=3'); - st.end(); - }); - - t.test('supports custom representations when filter=function', function (st) { - var calls = 0; - var obj = { a: 'b', c: 'd', e: { f: new Date(1257894000000) } }; - var filterFunc = function (prefix, value) { - calls++; - if (calls === 1) { - st.equal(prefix, '', 'prefix is empty'); - st.equal(value, obj); - } else if (prefix === 'c') { - return; - } else if (value instanceof Date) { - st.equal(prefix, 'e[f]'); - return value.getTime(); - } - return value; - }; - - st.equal(qs.stringify(obj, { filter: filterFunc }), 'a=b&e%5Bf%5D=1257894000000'); - st.equal(calls, 5); - st.end(); - }); - - t.test('can disable uri encoding', function (st) { - st.equal(qs.stringify({ a: 'b' }, { encode: false }), 'a=b'); - st.equal(qs.stringify({ a: { b: 'c' } }, { encode: false }), 'a[b]=c'); - st.equal(qs.stringify({ a: 'b', c: null }, { strictNullHandling: true, encode: false }), 'a=b&c'); - st.end(); - }); - - t.test('can sort the keys', function (st) { - var sort = function (a, b) { return a.localeCompare(b); }; - st.equal(qs.stringify({ a: 'c', z: 'y', b: 'f' }, { sort: sort }), 'a=c&b=f&z=y'); - st.equal(qs.stringify({ a: 'c', z: { j: 'a', i: 'b' }, b: 'f' }, { sort: sort }), 'a=c&b=f&z%5Bi%5D=b&z%5Bj%5D=a'); - st.end(); - }); - - t.test('can sort the keys at depth 3 or more too', function (st) { - var sort = function (a, b) { return a.localeCompare(b); }; - st.equal(qs.stringify({ a: 'a', z: { zj: {zjb: 'zjb', zja: 'zja'}, zi: {zib: 'zib', zia: 'zia'} }, b: 'b' }, { sort: sort, encode: false }), 'a=a&b=b&z[zi][zia]=zia&z[zi][zib]=zib&z[zj][zja]=zja&z[zj][zjb]=zjb'); - st.equal(qs.stringify({ a: 'a', z: { zj: {zjb: 'zjb', zja: 'zja'}, zi: {zib: 'zib', zia: 'zia'} }, b: 'b' }, { sort: null, encode: false }), 'a=a&z[zj][zjb]=zjb&z[zj][zja]=zja&z[zi][zib]=zib&z[zi][zia]=zia&b=b'); - st.end(); - }); - - t.test('can stringify with custom encoding', function (st) { - st.equal(qs.stringify({ 県: '大阪府', '': ''}, { - encoder: function (str) { - if (str.length === 0) { - return ''; - } - var buf = iconv.encode(str, 'shiftjis'); - var result = []; - for (var i=0; i < buf.length; ++i) { - result.push(buf.readUInt8(i).toString(16)); - } - return '%' + result.join('%'); - } - }), '%8c%a7=%91%e5%8d%e3%95%7b&='); - st.end(); - }); - - t.test('throws error with wrong encoder', function (st) { - st.throws(function () { - qs.stringify({}, { - encoder: 'string' - }); - }, new TypeError('Encoder has to be a function.')); - st.end(); - }); - - t.test('can use custom encoder for a buffer object', { - skip: typeof Buffer === 'undefined' - }, function (st) { - st.equal(qs.stringify({ a: new Buffer([1]) }, { - encoder: function (buffer) { - if (typeof buffer === 'string') { - return buffer; - } - return String.fromCharCode(buffer.readUInt8(0) + 97); - } - }), 'a=b'); - st.end(); - }); -}); diff --git a/node_modules/qs/test/utils.js b/node_modules/qs/test/utils.js deleted file mode 100755 index 4a8d8246..00000000 --- a/node_modules/qs/test/utils.js +++ /dev/null @@ -1,9 +0,0 @@ -'use strict'; - -var test = require('tape'); -var utils = require('../lib/utils'); - -test('merge()', function (t) { - t.deepEqual(utils.merge({ a: 'b' }, { a: 'c' }), { a: ['b', 'c'] }, 'merges two objects with the same key'); - t.end(); -}); diff --git a/node_modules/querystring-es3/.travis.yml b/node_modules/querystring-es3/.travis.yml deleted file mode 100644 index 895dbd36..00000000 --- a/node_modules/querystring-es3/.travis.yml +++ /dev/null @@ -1,4 +0,0 @@ -language: node_js -node_js: - - 0.6 - - 0.8 diff --git a/node_modules/querystring-es3/History.md b/node_modules/querystring-es3/History.md deleted file mode 100644 index 4fddbaf7..00000000 --- a/node_modules/querystring-es3/History.md +++ /dev/null @@ -1,20 +0,0 @@ -# 0.2.0 / 2013-02-21 - - - Refactor into function per-module idiomatic style. - - Improved test coverage. - -# 0.1.0 / 2011-12-13 - - - Minor project reorganization - -# 0.0.3 / 2011-04-16 - - Support for AMD module loaders - -# 0.0.2 / 2011-04-16 - - - Ported unit tests - - Removed functionality that depended on Buffers - -# 0.0.1 / 2011-04-15 - - - Initial release diff --git a/node_modules/querystring-es3/License.md b/node_modules/querystring-es3/License.md deleted file mode 100644 index fc80e85f..00000000 --- a/node_modules/querystring-es3/License.md +++ /dev/null @@ -1,19 +0,0 @@ - -Copyright 2012 Irakli Gozalishvili. All rights reserved. -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to -deal in the Software without restriction, including without limitation the -rights to use, copy, modify, merge, publish, distribute, sublicense, and/or -sell copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS -IN THE SOFTWARE. diff --git a/node_modules/querystring-es3/Readme.md b/node_modules/querystring-es3/Readme.md deleted file mode 100644 index be1668df..00000000 --- a/node_modules/querystring-es3/Readme.md +++ /dev/null @@ -1,15 +0,0 @@ -# querystring - -[![Build Status](https://secure.travis-ci.org/mike-spainhower/querystring.png)](http://travis-ci.org/mike-spainhower/querystring) - - -[![Browser support](http://ci.testling.com/mike-spainhower/querystring.png)](http://ci.testling.com/mike-spainhower/querystring) - - - -Node's querystring module for all engines. - -## Install ## - - npm install querystring - diff --git a/node_modules/querystring-es3/decode.js b/node_modules/querystring-es3/decode.js deleted file mode 100644 index b5825c0b..00000000 --- a/node_modules/querystring-es3/decode.js +++ /dev/null @@ -1,84 +0,0 @@ -// Copyright Joyent, Inc. and other Node contributors. -// -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to permit -// persons to whom the Software is furnished to do so, subject to the -// following conditions: -// -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -// USE OR OTHER DEALINGS IN THE SOFTWARE. - -'use strict'; - -// If obj.hasOwnProperty has been overridden, then calling -// obj.hasOwnProperty(prop) will break. -// See: https://github.com/joyent/node/issues/1707 -function hasOwnProperty(obj, prop) { - return Object.prototype.hasOwnProperty.call(obj, prop); -} - -module.exports = function(qs, sep, eq, options) { - sep = sep || '&'; - eq = eq || '='; - var obj = {}; - - if (typeof qs !== 'string' || qs.length === 0) { - return obj; - } - - var regexp = /\+/g; - qs = qs.split(sep); - - var maxKeys = 1000; - if (options && typeof options.maxKeys === 'number') { - maxKeys = options.maxKeys; - } - - var len = qs.length; - // maxKeys <= 0 means that we should not limit keys count - if (maxKeys > 0 && len > maxKeys) { - len = maxKeys; - } - - for (var i = 0; i < len; ++i) { - var x = qs[i].replace(regexp, '%20'), - idx = x.indexOf(eq), - kstr, vstr, k, v; - - if (idx >= 0) { - kstr = x.substr(0, idx); - vstr = x.substr(idx + 1); - } else { - kstr = x; - vstr = ''; - } - - k = decodeURIComponent(kstr); - v = decodeURIComponent(vstr); - - if (!hasOwnProperty(obj, k)) { - obj[k] = v; - } else if (isArray(obj[k])) { - obj[k].push(v); - } else { - obj[k] = [obj[k], v]; - } - } - - return obj; -}; - -var isArray = Array.isArray || function (xs) { - return Object.prototype.toString.call(xs) === '[object Array]'; -}; diff --git a/node_modules/querystring-es3/encode.js b/node_modules/querystring-es3/encode.js deleted file mode 100644 index 76e4cfb0..00000000 --- a/node_modules/querystring-es3/encode.js +++ /dev/null @@ -1,85 +0,0 @@ -// Copyright Joyent, Inc. and other Node contributors. -// -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to permit -// persons to whom the Software is furnished to do so, subject to the -// following conditions: -// -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -// USE OR OTHER DEALINGS IN THE SOFTWARE. - -'use strict'; - -var stringifyPrimitive = function(v) { - switch (typeof v) { - case 'string': - return v; - - case 'boolean': - return v ? 'true' : 'false'; - - case 'number': - return isFinite(v) ? v : ''; - - default: - return ''; - } -}; - -module.exports = function(obj, sep, eq, name) { - sep = sep || '&'; - eq = eq || '='; - if (obj === null) { - obj = undefined; - } - - if (typeof obj === 'object') { - return map(objectKeys(obj), function(k) { - var ks = encodeURIComponent(stringifyPrimitive(k)) + eq; - if (isArray(obj[k])) { - return map(obj[k], function(v) { - return ks + encodeURIComponent(stringifyPrimitive(v)); - }).join(sep); - } else { - return ks + encodeURIComponent(stringifyPrimitive(obj[k])); - } - }).join(sep); - - } - - if (!name) return ''; - return encodeURIComponent(stringifyPrimitive(name)) + eq + - encodeURIComponent(stringifyPrimitive(obj)); -}; - -var isArray = Array.isArray || function (xs) { - return Object.prototype.toString.call(xs) === '[object Array]'; -}; - -function map (xs, f) { - if (xs.map) return xs.map(f); - var res = []; - for (var i = 0; i < xs.length; i++) { - res.push(f(xs[i], i)); - } - return res; -} - -var objectKeys = Object.keys || function (obj) { - var res = []; - for (var key in obj) { - if (Object.prototype.hasOwnProperty.call(obj, key)) res.push(key); - } - return res; -}; diff --git a/node_modules/querystring-es3/index.js b/node_modules/querystring-es3/index.js deleted file mode 100644 index 99826ea8..00000000 --- a/node_modules/querystring-es3/index.js +++ /dev/null @@ -1,4 +0,0 @@ -'use strict'; - -exports.decode = exports.parse = require('./decode'); -exports.encode = exports.stringify = require('./encode'); diff --git a/node_modules/querystring-es3/package.json b/node_modules/querystring-es3/package.json deleted file mode 100644 index ad4fab32..00000000 --- a/node_modules/querystring-es3/package.json +++ /dev/null @@ -1,133 +0,0 @@ -{ - "_args": [ - [ - { - "raw": "querystring-es3@~0.2.0", - "scope": null, - "escapedName": "querystring-es3", - "name": "querystring-es3", - "rawSpec": "~0.2.0", - "spec": ">=0.2.0 <0.3.0", - "type": "range" - }, - "/Users/benjaminarias/Desktop/poly/node_modules/browserify" - ] - ], - "_from": "querystring-es3@>=0.2.0 <0.3.0", - "_id": "querystring-es3@0.2.1", - "_inCache": true, - "_installable": true, - "_location": "/querystring-es3", - "_nodeVersion": "0.10.26", - "_npmUser": { - "name": "spaintrain", - "email": "mc.s.pain.how.er+npm@gmail.com" - }, - "_npmVersion": "2.0.2", - "_phantomChildren": {}, - "_requested": { - "raw": "querystring-es3@~0.2.0", - "scope": null, - "escapedName": "querystring-es3", - "name": "querystring-es3", - "rawSpec": "~0.2.0", - "spec": ">=0.2.0 <0.3.0", - "type": "range" - }, - "_requiredBy": [ - "/browserify" - ], - "_resolved": "https://registry.npmjs.org/querystring-es3/-/querystring-es3-0.2.1.tgz", - "_shasum": "9ec61f79049875707d69414596fd907a4d711e73", - "_shrinkwrap": null, - "_spec": "querystring-es3@~0.2.0", - "_where": "/Users/benjaminarias/Desktop/poly/node_modules/browserify", - "author": { - "name": "Irakli Gozalishvili", - "email": "rfobic@gmail.com" - }, - "bugs": { - "url": "http://github.com/mike-spainhower/querystring/issues/" - }, - "dependencies": {}, - "description": "Node's querystring module for all engines. (ES3 compat fork)", - "devDependencies": { - "phantomify": "~0.x.0", - "retape": "~0.x.0", - "tape": "~0.1.5", - "test": "~0.x.0" - }, - "directories": {}, - "dist": { - "shasum": "9ec61f79049875707d69414596fd907a4d711e73", - "tarball": "https://registry.npmjs.org/querystring-es3/-/querystring-es3-0.2.1.tgz" - }, - "engines": { - "node": ">=0.4.x" - }, - "gitHead": "c58e18a37d9970e13a84dcc421ab682c7836fad2", - "homepage": "https://github.com/mike-spainhower/querystring", - "id": "querystring-es3", - "keywords": [ - "commonjs", - "query", - "querystring" - ], - "licenses": [ - { - "type": "MIT", - "url": "https://github.com/Gozala/enchain/License.md" - } - ], - "maintainers": [ - { - "name": "spaintrain", - "email": "mc.s.pain.how.er+npm@gmail.com" - } - ], - "name": "querystring-es3", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git://github.com/mike-spainhower/querystring.git", - "web": "https://github.com/mike-spainhower/querystring" - }, - "scripts": { - "test": "npm run test-node && npm run test-browser && npm run test-tap", - "test-browser": "node ./node_modules/phantomify/bin/cmd.js ./test/common-index.js", - "test-node": "node ./test/common-index.js", - "test-tap": "node ./test/tap-index.js" - }, - "testling": { - "files": "test/tap-index.js", - "browsers": { - "iexplore": [ - 9, - 10 - ], - "chrome": [ - 16, - 20, - 25, - "canary" - ], - "firefox": [ - 10, - 15, - 16, - 17, - 18, - "nightly" - ], - "safari": [ - 5, - 6 - ], - "opera": [ - 12 - ] - } - }, - "version": "0.2.1" -} diff --git a/node_modules/querystring-es3/test/common-index.js b/node_modules/querystring-es3/test/common-index.js deleted file mode 100644 index f356f987..00000000 --- a/node_modules/querystring-es3/test/common-index.js +++ /dev/null @@ -1,3 +0,0 @@ -"use strict"; - -require("test").run(require("./index")) \ No newline at end of file diff --git a/node_modules/querystring-es3/test/index.js b/node_modules/querystring-es3/test/index.js deleted file mode 100644 index 62eb2ac8..00000000 --- a/node_modules/querystring-es3/test/index.js +++ /dev/null @@ -1,210 +0,0 @@ -// Copyright Joyent, Inc. and other Node contributors. -// -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to permit -// persons to whom the Software is furnished to do so, subject to the -// following conditions: -// -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -// USE OR OTHER DEALINGS IN THE SOFTWARE. - -"use strict"; - -// test using assert -var qs = require('../'); - -// folding block, commented to pass gjslint -// {{{ -// [ wonkyQS, canonicalQS, obj ] -var qsTestCases = [ - ['foo=918854443121279438895193', - 'foo=918854443121279438895193', - {'foo': '918854443121279438895193'}], - ['foo=bar', 'foo=bar', {'foo': 'bar'}], - ['foo=bar&foo=quux', 'foo=bar&foo=quux', {'foo': ['bar', 'quux']}], - ['foo=1&bar=2', 'foo=1&bar=2', {'foo': '1', 'bar': '2'}], - ['my+weird+field=q1%212%22%27w%245%267%2Fz8%29%3F', - 'my%20weird%20field=q1!2%22\'w%245%267%2Fz8)%3F', - {'my weird field': 'q1!2"\'w$5&7/z8)?' }], - ['foo%3Dbaz=bar', 'foo%3Dbaz=bar', {'foo=baz': 'bar'}], - ['foo=baz=bar', 'foo=baz%3Dbar', {'foo': 'baz=bar'}], - ['str=foo&arr=1&arr=2&arr=3&somenull=&undef=', - 'str=foo&arr=1&arr=2&arr=3&somenull=&undef=', - { 'str': 'foo', - 'arr': ['1', '2', '3'], - 'somenull': '', - 'undef': ''}], - [' foo = bar ', '%20foo%20=%20bar%20', {' foo ': ' bar '}], - // disable test that fails ['foo=%zx', 'foo=%25zx', {'foo': '%zx'}], - ['foo=%EF%BF%BD', 'foo=%EF%BF%BD', {'foo': '\ufffd' }], - // See: https://github.com/joyent/node/issues/1707 - ['hasOwnProperty=x&toString=foo&valueOf=bar&__defineGetter__=baz', - 'hasOwnProperty=x&toString=foo&valueOf=bar&__defineGetter__=baz', - { hasOwnProperty: 'x', - toString: 'foo', - valueOf: 'bar', - __defineGetter__: 'baz' }], - // See: https://github.com/joyent/node/issues/3058 - ['foo&bar=baz', 'foo=&bar=baz', { foo: '', bar: 'baz' }] -]; - -// [ wonkyQS, canonicalQS, obj ] -var qsColonTestCases = [ - ['foo:bar', 'foo:bar', {'foo': 'bar'}], - ['foo:bar;foo:quux', 'foo:bar;foo:quux', {'foo': ['bar', 'quux']}], - ['foo:1&bar:2;baz:quux', - 'foo:1%26bar%3A2;baz:quux', - {'foo': '1&bar:2', 'baz': 'quux'}], - ['foo%3Abaz:bar', 'foo%3Abaz:bar', {'foo:baz': 'bar'}], - ['foo:baz:bar', 'foo:baz%3Abar', {'foo': 'baz:bar'}] -]; - -// [wonkyObj, qs, canonicalObj] -var extendedFunction = function() {}; -extendedFunction.prototype = {a: 'b'}; -var qsWeirdObjects = [ - [{regexp: /./g}, 'regexp=', {'regexp': ''}], - [{regexp: new RegExp('.', 'g')}, 'regexp=', {'regexp': ''}], - [{fn: function() {}}, 'fn=', {'fn': ''}], - [{fn: new Function('')}, 'fn=', {'fn': ''}], - [{math: Math}, 'math=', {'math': ''}], - [{e: extendedFunction}, 'e=', {'e': ''}], - [{d: new Date()}, 'd=', {'d': ''}], - [{d: Date}, 'd=', {'d': ''}], - [{f: new Boolean(false), t: new Boolean(true)}, 'f=&t=', {'f': '', 't': ''}], - [{f: false, t: true}, 'f=false&t=true', {'f': 'false', 't': 'true'}], - [{n: null}, 'n=', {'n': ''}], - [{nan: NaN}, 'nan=', {'nan': ''}], - [{inf: Infinity}, 'inf=', {'inf': ''}] -]; -// }}} - -var qsNoMungeTestCases = [ - ['', {}], - ['foo=bar&foo=baz', {'foo': ['bar', 'baz']}], - ['blah=burp', {'blah': 'burp'}], - ['gragh=1&gragh=3&goo=2', {'gragh': ['1', '3'], 'goo': '2'}], - ['frappucino=muffin&goat%5B%5D=scone&pond=moose', - {'frappucino': 'muffin', 'goat[]': 'scone', 'pond': 'moose'}], - ['trololol=yes&lololo=no', {'trololol': 'yes', 'lololo': 'no'}] -]; - -exports['test basic'] = function(assert) { - assert.strictEqual('918854443121279438895193', - qs.parse('id=918854443121279438895193').id, - 'prase id=918854443121279438895193'); -}; - -exports['test that the canonical qs is parsed properly'] = function(assert) { - qsTestCases.forEach(function(testCase) { - assert.deepEqual(testCase[2], qs.parse(testCase[0]), - 'parse ' + testCase[0]); - }); -}; - - -exports['test that the colon test cases can do the same'] = function(assert) { - qsColonTestCases.forEach(function(testCase) { - assert.deepEqual(testCase[2], qs.parse(testCase[0], ';', ':'), - 'parse ' + testCase[0] + ' -> ; :'); - }); -}; - -exports['test the weird objects, that they get parsed properly'] = function(assert) { - qsWeirdObjects.forEach(function(testCase) { - assert.deepEqual(testCase[2], qs.parse(testCase[1]), - 'parse ' + testCase[1]); - }); -}; - -exports['test non munge test cases'] = function(assert) { - qsNoMungeTestCases.forEach(function(testCase) { - assert.deepEqual(testCase[0], qs.stringify(testCase[1], '&', '=', false), - 'stringify ' + JSON.stringify(testCase[1]) + ' -> & ='); - }); -}; - -exports['test the nested qs-in-qs case'] = function(assert) { - var f = qs.parse('a=b&q=x%3Dy%26y%3Dz'); - f.q = qs.parse(f.q); - assert.deepEqual(f, { a: 'b', q: { x: 'y', y: 'z' } }, - 'parse a=b&q=x%3Dy%26y%3Dz'); -}; - -exports['test nested in colon'] = function(assert) { - var f = qs.parse('a:b;q:x%3Ay%3By%3Az', ';', ':'); - f.q = qs.parse(f.q, ';', ':'); - assert.deepEqual(f, { a: 'b', q: { x: 'y', y: 'z' } }, - 'parse a:b;q:x%3Ay%3By%3Az -> ; :'); -}; - -exports['test stringifying'] = function(assert) { - qsTestCases.forEach(function(testCase) { - assert.equal(testCase[1], qs.stringify(testCase[2]), - 'stringify ' + JSON.stringify(testCase[2])); - }); - - qsColonTestCases.forEach(function(testCase) { - assert.equal(testCase[1], qs.stringify(testCase[2], ';', ':'), - 'stringify ' + JSON.stringify(testCase[2]) + ' -> ; :'); - }); - - qsWeirdObjects.forEach(function(testCase) { - assert.equal(testCase[1], qs.stringify(testCase[0]), - 'stringify ' + JSON.stringify(testCase[0])); - }); -}; - -exports['test stringifying nested'] = function(assert) { - var f = qs.stringify({ - a: 'b', - q: qs.stringify({ - x: 'y', - y: 'z' - }) - }); - assert.equal(f, 'a=b&q=x%3Dy%26y%3Dz', - JSON.stringify({ - a: 'b', - 'qs.stringify -> q': { - x: 'y', - y: 'z' - } - })); - - var threw = false; - try { qs.parse(undefined); } catch(error) { threw = true; } - assert.ok(!threw, "does not throws on undefined"); -}; - -exports['test nested in colon'] = function(assert) { - var f = qs.stringify({ - a: 'b', - q: qs.stringify({ - x: 'y', - y: 'z' - }, ';', ':') - }, ';', ':'); - assert.equal(f, 'a:b;q:x%3Ay%3By%3Az', - 'stringify ' + JSON.stringify({ - a: 'b', - 'qs.stringify -> q': { - x: 'y', - y: 'z' - } - }) + ' -> ; : '); - - - assert.deepEqual({}, qs.parse(), 'parse undefined'); -}; diff --git a/node_modules/querystring-es3/test/tap-index.js b/node_modules/querystring-es3/test/tap-index.js deleted file mode 100644 index 70679b3f..00000000 --- a/node_modules/querystring-es3/test/tap-index.js +++ /dev/null @@ -1,3 +0,0 @@ -"use strict"; - -require("retape")(require("./index")) \ No newline at end of file diff --git a/node_modules/querystring/.History.md.un~ b/node_modules/querystring/.History.md.un~ deleted file mode 100644 index c96a7dd8..00000000 Binary files a/node_modules/querystring/.History.md.un~ and /dev/null differ diff --git a/node_modules/querystring/.Readme.md.un~ b/node_modules/querystring/.Readme.md.un~ deleted file mode 100644 index 71613b59..00000000 Binary files a/node_modules/querystring/.Readme.md.un~ and /dev/null differ diff --git a/node_modules/querystring/.package.json.un~ b/node_modules/querystring/.package.json.un~ deleted file mode 100644 index d86fe314..00000000 Binary files a/node_modules/querystring/.package.json.un~ and /dev/null differ diff --git a/node_modules/querystring/.travis.yml b/node_modules/querystring/.travis.yml deleted file mode 100644 index 895dbd36..00000000 --- a/node_modules/querystring/.travis.yml +++ /dev/null @@ -1,4 +0,0 @@ -language: node_js -node_js: - - 0.6 - - 0.8 diff --git a/node_modules/querystring/History.md b/node_modules/querystring/History.md deleted file mode 100644 index 4fddbaf7..00000000 --- a/node_modules/querystring/History.md +++ /dev/null @@ -1,20 +0,0 @@ -# 0.2.0 / 2013-02-21 - - - Refactor into function per-module idiomatic style. - - Improved test coverage. - -# 0.1.0 / 2011-12-13 - - - Minor project reorganization - -# 0.0.3 / 2011-04-16 - - Support for AMD module loaders - -# 0.0.2 / 2011-04-16 - - - Ported unit tests - - Removed functionality that depended on Buffers - -# 0.0.1 / 2011-04-15 - - - Initial release diff --git a/node_modules/querystring/License.md b/node_modules/querystring/License.md deleted file mode 100644 index fc80e85f..00000000 --- a/node_modules/querystring/License.md +++ /dev/null @@ -1,19 +0,0 @@ - -Copyright 2012 Irakli Gozalishvili. All rights reserved. -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to -deal in the Software without restriction, including without limitation the -rights to use, copy, modify, merge, publish, distribute, sublicense, and/or -sell copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS -IN THE SOFTWARE. diff --git a/node_modules/querystring/Readme.md b/node_modules/querystring/Readme.md deleted file mode 100644 index a4fe2520..00000000 --- a/node_modules/querystring/Readme.md +++ /dev/null @@ -1,15 +0,0 @@ -# querystring - -[![Build Status](https://secure.travis-ci.org/Gozala/querystring.png)](http://travis-ci.org/Gozala/querystring) - - -[![Browser support](http://ci.testling.com/Gozala/querystring.png)](http://ci.testling.com/Gozala/querystring) - - - -Node's querystring module for all engines. - -## Install ## - - npm install querystring - diff --git a/node_modules/querystring/decode.js b/node_modules/querystring/decode.js deleted file mode 100644 index a6518b8f..00000000 --- a/node_modules/querystring/decode.js +++ /dev/null @@ -1,80 +0,0 @@ -// Copyright Joyent, Inc. and other Node contributors. -// -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to permit -// persons to whom the Software is furnished to do so, subject to the -// following conditions: -// -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -// USE OR OTHER DEALINGS IN THE SOFTWARE. - -'use strict'; - -// If obj.hasOwnProperty has been overridden, then calling -// obj.hasOwnProperty(prop) will break. -// See: https://github.com/joyent/node/issues/1707 -function hasOwnProperty(obj, prop) { - return Object.prototype.hasOwnProperty.call(obj, prop); -} - -module.exports = function(qs, sep, eq, options) { - sep = sep || '&'; - eq = eq || '='; - var obj = {}; - - if (typeof qs !== 'string' || qs.length === 0) { - return obj; - } - - var regexp = /\+/g; - qs = qs.split(sep); - - var maxKeys = 1000; - if (options && typeof options.maxKeys === 'number') { - maxKeys = options.maxKeys; - } - - var len = qs.length; - // maxKeys <= 0 means that we should not limit keys count - if (maxKeys > 0 && len > maxKeys) { - len = maxKeys; - } - - for (var i = 0; i < len; ++i) { - var x = qs[i].replace(regexp, '%20'), - idx = x.indexOf(eq), - kstr, vstr, k, v; - - if (idx >= 0) { - kstr = x.substr(0, idx); - vstr = x.substr(idx + 1); - } else { - kstr = x; - vstr = ''; - } - - k = decodeURIComponent(kstr); - v = decodeURIComponent(vstr); - - if (!hasOwnProperty(obj, k)) { - obj[k] = v; - } else if (Array.isArray(obj[k])) { - obj[k].push(v); - } else { - obj[k] = [obj[k], v]; - } - } - - return obj; -}; diff --git a/node_modules/querystring/encode.js b/node_modules/querystring/encode.js deleted file mode 100644 index 4f2b561b..00000000 --- a/node_modules/querystring/encode.js +++ /dev/null @@ -1,64 +0,0 @@ -// Copyright Joyent, Inc. and other Node contributors. -// -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to permit -// persons to whom the Software is furnished to do so, subject to the -// following conditions: -// -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -// USE OR OTHER DEALINGS IN THE SOFTWARE. - -'use strict'; - -var stringifyPrimitive = function(v) { - switch (typeof v) { - case 'string': - return v; - - case 'boolean': - return v ? 'true' : 'false'; - - case 'number': - return isFinite(v) ? v : ''; - - default: - return ''; - } -}; - -module.exports = function(obj, sep, eq, name) { - sep = sep || '&'; - eq = eq || '='; - if (obj === null) { - obj = undefined; - } - - if (typeof obj === 'object') { - return Object.keys(obj).map(function(k) { - var ks = encodeURIComponent(stringifyPrimitive(k)) + eq; - if (Array.isArray(obj[k])) { - return obj[k].map(function(v) { - return ks + encodeURIComponent(stringifyPrimitive(v)); - }).join(sep); - } else { - return ks + encodeURIComponent(stringifyPrimitive(obj[k])); - } - }).join(sep); - - } - - if (!name) return ''; - return encodeURIComponent(stringifyPrimitive(name)) + eq + - encodeURIComponent(stringifyPrimitive(obj)); -}; diff --git a/node_modules/querystring/index.js b/node_modules/querystring/index.js deleted file mode 100644 index 99826ea8..00000000 --- a/node_modules/querystring/index.js +++ /dev/null @@ -1,4 +0,0 @@ -'use strict'; - -exports.decode = exports.parse = require('./decode'); -exports.encode = exports.stringify = require('./encode'); diff --git a/node_modules/querystring/package.json b/node_modules/querystring/package.json deleted file mode 100644 index e19b6e44..00000000 --- a/node_modules/querystring/package.json +++ /dev/null @@ -1,131 +0,0 @@ -{ - "_args": [ - [ - { - "raw": "querystring@0.2.0", - "scope": null, - "escapedName": "querystring", - "name": "querystring", - "rawSpec": "0.2.0", - "spec": "0.2.0", - "type": "version" - }, - "/Users/benjaminarias/Desktop/poly/node_modules/url" - ] - ], - "_from": "querystring@0.2.0", - "_id": "querystring@0.2.0", - "_inCache": true, - "_installable": true, - "_location": "/querystring", - "_npmUser": { - "name": "gozala", - "email": "rfobic@gmail.com" - }, - "_npmVersion": "1.1.65", - "_phantomChildren": {}, - "_requested": { - "raw": "querystring@0.2.0", - "scope": null, - "escapedName": "querystring", - "name": "querystring", - "rawSpec": "0.2.0", - "spec": "0.2.0", - "type": "version" - }, - "_requiredBy": [ - "/url" - ], - "_resolved": "https://registry.npmjs.org/querystring/-/querystring-0.2.0.tgz", - "_shasum": "b209849203bb25df820da756e747005878521620", - "_shrinkwrap": null, - "_spec": "querystring@0.2.0", - "_where": "/Users/benjaminarias/Desktop/poly/node_modules/url", - "author": { - "name": "Irakli Gozalishvili", - "email": "rfobic@gmail.com" - }, - "bugs": { - "url": "http://github.com/Gozala/querystring/issues/" - }, - "dependencies": {}, - "description": "Node's querystring module for all engines.", - "devDependencies": { - "phantomify": "~0.x.0", - "retape": "~0.x.0", - "tape": "~0.1.5", - "test": "~0.x.0" - }, - "directories": {}, - "dist": { - "shasum": "b209849203bb25df820da756e747005878521620", - "tarball": "https://registry.npmjs.org/querystring/-/querystring-0.2.0.tgz" - }, - "engines": { - "node": ">=0.4.x" - }, - "homepage": "https://github.com/Gozala/querystring#readme", - "id": "querystring", - "keywords": [ - "commonjs", - "query", - "querystring" - ], - "licenses": [ - { - "type": "MIT", - "url": "https://github.com/Gozala/enchain/License.md" - } - ], - "maintainers": [ - { - "name": "gozala", - "email": "rfobic@gmail.com" - } - ], - "name": "querystring", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git://github.com/Gozala/querystring.git", - "web": "https://github.com/Gozala/querystring" - }, - "scripts": { - "test": "npm run test-node && npm run test-browser && npm run test-tap", - "test-browser": "node ./node_modules/phantomify/bin/cmd.js ./test/common-index.js", - "test-node": "node ./test/common-index.js", - "test-tap": "node ./test/tap-index.js" - }, - "testling": { - "files": "test/tap-index.js", - "browsers": { - "iexplore": [ - 9, - 10 - ], - "chrome": [ - 16, - 20, - 25, - "canary" - ], - "firefox": [ - 10, - 15, - 16, - 17, - 18, - "nightly" - ], - "safari": [ - 5, - 6 - ], - "opera": [ - 12 - ] - } - }, - "version": "0.2.0" -} diff --git a/node_modules/querystring/test/.index.js.un~ b/node_modules/querystring/test/.index.js.un~ deleted file mode 100644 index 898ecedd..00000000 Binary files a/node_modules/querystring/test/.index.js.un~ and /dev/null differ diff --git a/node_modules/querystring/test/common-index.js b/node_modules/querystring/test/common-index.js deleted file mode 100644 index f356f987..00000000 --- a/node_modules/querystring/test/common-index.js +++ /dev/null @@ -1,3 +0,0 @@ -"use strict"; - -require("test").run(require("./index")) \ No newline at end of file diff --git a/node_modules/querystring/test/index.js b/node_modules/querystring/test/index.js deleted file mode 100644 index 62eb2ac8..00000000 --- a/node_modules/querystring/test/index.js +++ /dev/null @@ -1,210 +0,0 @@ -// Copyright Joyent, Inc. and other Node contributors. -// -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to permit -// persons to whom the Software is furnished to do so, subject to the -// following conditions: -// -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -// USE OR OTHER DEALINGS IN THE SOFTWARE. - -"use strict"; - -// test using assert -var qs = require('../'); - -// folding block, commented to pass gjslint -// {{{ -// [ wonkyQS, canonicalQS, obj ] -var qsTestCases = [ - ['foo=918854443121279438895193', - 'foo=918854443121279438895193', - {'foo': '918854443121279438895193'}], - ['foo=bar', 'foo=bar', {'foo': 'bar'}], - ['foo=bar&foo=quux', 'foo=bar&foo=quux', {'foo': ['bar', 'quux']}], - ['foo=1&bar=2', 'foo=1&bar=2', {'foo': '1', 'bar': '2'}], - ['my+weird+field=q1%212%22%27w%245%267%2Fz8%29%3F', - 'my%20weird%20field=q1!2%22\'w%245%267%2Fz8)%3F', - {'my weird field': 'q1!2"\'w$5&7/z8)?' }], - ['foo%3Dbaz=bar', 'foo%3Dbaz=bar', {'foo=baz': 'bar'}], - ['foo=baz=bar', 'foo=baz%3Dbar', {'foo': 'baz=bar'}], - ['str=foo&arr=1&arr=2&arr=3&somenull=&undef=', - 'str=foo&arr=1&arr=2&arr=3&somenull=&undef=', - { 'str': 'foo', - 'arr': ['1', '2', '3'], - 'somenull': '', - 'undef': ''}], - [' foo = bar ', '%20foo%20=%20bar%20', {' foo ': ' bar '}], - // disable test that fails ['foo=%zx', 'foo=%25zx', {'foo': '%zx'}], - ['foo=%EF%BF%BD', 'foo=%EF%BF%BD', {'foo': '\ufffd' }], - // See: https://github.com/joyent/node/issues/1707 - ['hasOwnProperty=x&toString=foo&valueOf=bar&__defineGetter__=baz', - 'hasOwnProperty=x&toString=foo&valueOf=bar&__defineGetter__=baz', - { hasOwnProperty: 'x', - toString: 'foo', - valueOf: 'bar', - __defineGetter__: 'baz' }], - // See: https://github.com/joyent/node/issues/3058 - ['foo&bar=baz', 'foo=&bar=baz', { foo: '', bar: 'baz' }] -]; - -// [ wonkyQS, canonicalQS, obj ] -var qsColonTestCases = [ - ['foo:bar', 'foo:bar', {'foo': 'bar'}], - ['foo:bar;foo:quux', 'foo:bar;foo:quux', {'foo': ['bar', 'quux']}], - ['foo:1&bar:2;baz:quux', - 'foo:1%26bar%3A2;baz:quux', - {'foo': '1&bar:2', 'baz': 'quux'}], - ['foo%3Abaz:bar', 'foo%3Abaz:bar', {'foo:baz': 'bar'}], - ['foo:baz:bar', 'foo:baz%3Abar', {'foo': 'baz:bar'}] -]; - -// [wonkyObj, qs, canonicalObj] -var extendedFunction = function() {}; -extendedFunction.prototype = {a: 'b'}; -var qsWeirdObjects = [ - [{regexp: /./g}, 'regexp=', {'regexp': ''}], - [{regexp: new RegExp('.', 'g')}, 'regexp=', {'regexp': ''}], - [{fn: function() {}}, 'fn=', {'fn': ''}], - [{fn: new Function('')}, 'fn=', {'fn': ''}], - [{math: Math}, 'math=', {'math': ''}], - [{e: extendedFunction}, 'e=', {'e': ''}], - [{d: new Date()}, 'd=', {'d': ''}], - [{d: Date}, 'd=', {'d': ''}], - [{f: new Boolean(false), t: new Boolean(true)}, 'f=&t=', {'f': '', 't': ''}], - [{f: false, t: true}, 'f=false&t=true', {'f': 'false', 't': 'true'}], - [{n: null}, 'n=', {'n': ''}], - [{nan: NaN}, 'nan=', {'nan': ''}], - [{inf: Infinity}, 'inf=', {'inf': ''}] -]; -// }}} - -var qsNoMungeTestCases = [ - ['', {}], - ['foo=bar&foo=baz', {'foo': ['bar', 'baz']}], - ['blah=burp', {'blah': 'burp'}], - ['gragh=1&gragh=3&goo=2', {'gragh': ['1', '3'], 'goo': '2'}], - ['frappucino=muffin&goat%5B%5D=scone&pond=moose', - {'frappucino': 'muffin', 'goat[]': 'scone', 'pond': 'moose'}], - ['trololol=yes&lololo=no', {'trololol': 'yes', 'lololo': 'no'}] -]; - -exports['test basic'] = function(assert) { - assert.strictEqual('918854443121279438895193', - qs.parse('id=918854443121279438895193').id, - 'prase id=918854443121279438895193'); -}; - -exports['test that the canonical qs is parsed properly'] = function(assert) { - qsTestCases.forEach(function(testCase) { - assert.deepEqual(testCase[2], qs.parse(testCase[0]), - 'parse ' + testCase[0]); - }); -}; - - -exports['test that the colon test cases can do the same'] = function(assert) { - qsColonTestCases.forEach(function(testCase) { - assert.deepEqual(testCase[2], qs.parse(testCase[0], ';', ':'), - 'parse ' + testCase[0] + ' -> ; :'); - }); -}; - -exports['test the weird objects, that they get parsed properly'] = function(assert) { - qsWeirdObjects.forEach(function(testCase) { - assert.deepEqual(testCase[2], qs.parse(testCase[1]), - 'parse ' + testCase[1]); - }); -}; - -exports['test non munge test cases'] = function(assert) { - qsNoMungeTestCases.forEach(function(testCase) { - assert.deepEqual(testCase[0], qs.stringify(testCase[1], '&', '=', false), - 'stringify ' + JSON.stringify(testCase[1]) + ' -> & ='); - }); -}; - -exports['test the nested qs-in-qs case'] = function(assert) { - var f = qs.parse('a=b&q=x%3Dy%26y%3Dz'); - f.q = qs.parse(f.q); - assert.deepEqual(f, { a: 'b', q: { x: 'y', y: 'z' } }, - 'parse a=b&q=x%3Dy%26y%3Dz'); -}; - -exports['test nested in colon'] = function(assert) { - var f = qs.parse('a:b;q:x%3Ay%3By%3Az', ';', ':'); - f.q = qs.parse(f.q, ';', ':'); - assert.deepEqual(f, { a: 'b', q: { x: 'y', y: 'z' } }, - 'parse a:b;q:x%3Ay%3By%3Az -> ; :'); -}; - -exports['test stringifying'] = function(assert) { - qsTestCases.forEach(function(testCase) { - assert.equal(testCase[1], qs.stringify(testCase[2]), - 'stringify ' + JSON.stringify(testCase[2])); - }); - - qsColonTestCases.forEach(function(testCase) { - assert.equal(testCase[1], qs.stringify(testCase[2], ';', ':'), - 'stringify ' + JSON.stringify(testCase[2]) + ' -> ; :'); - }); - - qsWeirdObjects.forEach(function(testCase) { - assert.equal(testCase[1], qs.stringify(testCase[0]), - 'stringify ' + JSON.stringify(testCase[0])); - }); -}; - -exports['test stringifying nested'] = function(assert) { - var f = qs.stringify({ - a: 'b', - q: qs.stringify({ - x: 'y', - y: 'z' - }) - }); - assert.equal(f, 'a=b&q=x%3Dy%26y%3Dz', - JSON.stringify({ - a: 'b', - 'qs.stringify -> q': { - x: 'y', - y: 'z' - } - })); - - var threw = false; - try { qs.parse(undefined); } catch(error) { threw = true; } - assert.ok(!threw, "does not throws on undefined"); -}; - -exports['test nested in colon'] = function(assert) { - var f = qs.stringify({ - a: 'b', - q: qs.stringify({ - x: 'y', - y: 'z' - }, ';', ':') - }, ';', ':'); - assert.equal(f, 'a:b;q:x%3Ay%3By%3Az', - 'stringify ' + JSON.stringify({ - a: 'b', - 'qs.stringify -> q': { - x: 'y', - y: 'z' - } - }) + ' -> ; : '); - - - assert.deepEqual({}, qs.parse(), 'parse undefined'); -}; diff --git a/node_modules/querystring/test/tap-index.js b/node_modules/querystring/test/tap-index.js deleted file mode 100644 index 70679b3f..00000000 --- a/node_modules/querystring/test/tap-index.js +++ /dev/null @@ -1,3 +0,0 @@ -"use strict"; - -require("retape")(require("./index")) \ No newline at end of file diff --git a/node_modules/randombytes/.travis.yml b/node_modules/randombytes/.travis.yml deleted file mode 100644 index f8eebd87..00000000 --- a/node_modules/randombytes/.travis.yml +++ /dev/null @@ -1,15 +0,0 @@ -sudo: false -language: node_js -matrix: - include: - - node_js: '0.10' - env: TEST_SUITE=test - - node_js: '0.12' - env: TEST_SUITE=test - - node_js: '5' - env: TEST_SUITE=test - - node_js: '4' - env: TEST_SUITE=test - - node_js: '4' - env: TEST_SUITE=phantom -script: "npm run-script $TEST_SUITE" diff --git a/node_modules/randombytes/.zuul.yml b/node_modules/randombytes/.zuul.yml deleted file mode 100644 index 96d9cfbd..00000000 --- a/node_modules/randombytes/.zuul.yml +++ /dev/null @@ -1 +0,0 @@ -ui: tape diff --git a/node_modules/randombytes/README.md b/node_modules/randombytes/README.md deleted file mode 100644 index 3bacba4d..00000000 --- a/node_modules/randombytes/README.md +++ /dev/null @@ -1,14 +0,0 @@ -randombytes -=== - -[![Version](http://img.shields.io/npm/v/randombytes.svg)](https://www.npmjs.org/package/randombytes) [![Build Status](https://travis-ci.org/crypto-browserify/randombytes.svg?branch=master)](https://travis-ci.org/crypto-browserify/randombytes) - -randombytes from node that works in the browser. In node you just get crypto.randomBytes, but in the browser it uses .crypto/msCrypto.getRandomValues - -```js -var randomBytes = require('randombytes'); -randomBytes(16);//get 16 random bytes -randomBytes(16, function (err, resp) { - // resp is 16 random bytes -}); -``` diff --git a/node_modules/randombytes/browser.js b/node_modules/randombytes/browser.js deleted file mode 100644 index 1aa3edcc..00000000 --- a/node_modules/randombytes/browser.js +++ /dev/null @@ -1,36 +0,0 @@ -'use strict' - -function oldBrowser () { - throw new Error('secure random number generation not supported by this browser\nuse chrome, FireFox or Internet Explorer 11') -} - -var crypto = global.crypto || global.msCrypto - -if (crypto && crypto.getRandomValues) { - module.exports = randomBytes -} else { - module.exports = oldBrowser -} - -function randomBytes (size, cb) { - // phantomjs needs to throw - if (size > 65536) throw new Error('requested too many random bytes') - // in case browserify isn't using the Uint8Array version - var rawBytes = new global.Uint8Array(size) - - // This will not work in older browsers. - // See https://developer.mozilla.org/en-US/docs/Web/API/window.crypto.getRandomValues - if (size > 0) { // getRandomValues fails on IE if size == 0 - crypto.getRandomValues(rawBytes) - } - // phantomjs doesn't like a buffer being passed here - var bytes = new Buffer(rawBytes.buffer) - - if (typeof cb === 'function') { - return process.nextTick(function () { - cb(null, bytes) - }) - } - - return bytes -} diff --git a/node_modules/randombytes/index.js b/node_modules/randombytes/index.js deleted file mode 100644 index a2d9e391..00000000 --- a/node_modules/randombytes/index.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('crypto').randomBytes diff --git a/node_modules/randombytes/package.json b/node_modules/randombytes/package.json deleted file mode 100644 index 548031c3..00000000 --- a/node_modules/randombytes/package.json +++ /dev/null @@ -1,114 +0,0 @@ -{ - "_args": [ - [ - { - "raw": "randombytes@^2.0.0", - "scope": null, - "escapedName": "randombytes", - "name": "randombytes", - "rawSpec": "^2.0.0", - "spec": ">=2.0.0 <3.0.0", - "type": "range" - }, - "/Users/benjaminarias/Desktop/poly/node_modules/crypto-browserify" - ] - ], - "_from": "randombytes@>=2.0.0 <3.0.0", - "_id": "randombytes@2.0.3", - "_inCache": true, - "_installable": true, - "_location": "/randombytes", - "_nodeVersion": "5.5.0", - "_npmOperationalInternal": { - "host": "packages-13-west.internal.npmjs.com", - "tmp": "tmp/randombytes-2.0.3.tgz_1456944700918_0.5908831511624157" - }, - "_npmUser": { - "name": "cwmma", - "email": "calvin.metcalf@gmail.com" - }, - "_npmVersion": "3.6.0", - "_phantomChildren": {}, - "_requested": { - "raw": "randombytes@^2.0.0", - "scope": null, - "escapedName": "randombytes", - "name": "randombytes", - "rawSpec": "^2.0.0", - "spec": ">=2.0.0 <3.0.0", - "type": "range" - }, - "_requiredBy": [ - "/browserify-rsa", - "/crypto-browserify", - "/diffie-hellman", - "/public-encrypt" - ], - "_resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.0.3.tgz", - "_shasum": "674c99760901c3c4112771a31e521dc349cc09ec", - "_shrinkwrap": null, - "_spec": "randombytes@^2.0.0", - "_where": "/Users/benjaminarias/Desktop/poly/node_modules/crypto-browserify", - "author": "", - "browser": "browser.js", - "bugs": { - "url": "https://github.com/crypto-browserify/randombytes/issues" - }, - "dependencies": {}, - "description": "random bytes from browserify stand alone", - "devDependencies": { - "phantomjs": "^1.9.9", - "standard": "^3.3.0", - "tap-spec": "^2.1.2", - "tape": "^3.0.3", - "zuul": "^3.7.2" - }, - "directories": {}, - "dist": { - "shasum": "674c99760901c3c4112771a31e521dc349cc09ec", - "tarball": "https://registry.npmjs.org/randombytes/-/randombytes-2.0.3.tgz" - }, - "gitHead": "f466c002a706ee11dadf3b6aa0a6e9bf1c37c82d", - "homepage": "https://github.com/crypto-browserify/randombytes", - "keywords": [ - "crypto", - "random" - ], - "license": "MIT", - "main": "index.js", - "maintainers": [ - { - "name": "cwmma", - "email": "calvin.metcalf@gmail.com" - }, - { - "name": "dcousens", - "email": "email@dcousens.com" - }, - { - "name": "dominictarr", - "email": "dominic.tarr@gmail.com" - }, - { - "name": "jprichardson", - "email": "jprichardson@gmail.com" - }, - { - "name": "indutny", - "email": "fedor@indutny.com" - } - ], - "name": "randombytes", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git+ssh://git@github.com/crypto-browserify/randombytes.git" - }, - "scripts": { - "local": "zuul --local --no-coverage -- test.js", - "phantom": "zuul --phantom -- test.js", - "test": "standard && node test.js | tspec" - }, - "version": "2.0.3" -} diff --git a/node_modules/randombytes/test.js b/node_modules/randombytes/test.js deleted file mode 100644 index 8e34dcaa..00000000 --- a/node_modules/randombytes/test.js +++ /dev/null @@ -1,56 +0,0 @@ -var test = require('tape') -var randomBytes = require('./') - -test('sync', function (t) { - t.plan(4) - t.equals(randomBytes(0).length, 0, 'len: ' + 0) - t.equals(randomBytes(3).length, 3, 'len: ' + 3) - t.equals(randomBytes(30).length, 30, 'len: ' + 30) - t.equals(randomBytes(300).length, 300, 'len: ' + 300) -}) - -test('async', function (t) { - t.plan(4) - - randomBytes(0, function (err, resp) { - if (err) throw err - - t.equals(resp.length, 0, 'len: ' + 0) - }) - - randomBytes(3, function (err, resp) { - if (err) throw err - - t.equals(resp.length, 3, 'len: ' + 3) - }) - - randomBytes(30, function (err, resp) { - if (err) throw err - - t.equals(resp.length, 30, 'len: ' + 30) - }) - - randomBytes(300, function (err, resp) { - if (err) throw err - - t.equals(resp.length, 300, 'len: ' + 300) - }) -}) - -if (process.browser) { - test('requesting to much throws', function (t) { - t.plan(1) - t.throws(function () { - randomBytes(65537) - }) - }) - - test('requesting to much throws async', function (t) { - t.plan(1) - t.throws(function () { - randomBytes(65537, function () { - t.ok(false, 'should not get here') - }) - }) - }) -} diff --git a/node_modules/read-only-stream/.travis.yml b/node_modules/read-only-stream/.travis.yml deleted file mode 100644 index 9672e129..00000000 --- a/node_modules/read-only-stream/.travis.yml +++ /dev/null @@ -1,6 +0,0 @@ -language: node_js -node_js: - - "0.8" - - "0.10" -before_install: - - npm install -g npm@~1.4.6 diff --git a/node_modules/read-only-stream/LICENSE b/node_modules/read-only-stream/LICENSE deleted file mode 100644 index ee27ba4b..00000000 --- a/node_modules/read-only-stream/LICENSE +++ /dev/null @@ -1,18 +0,0 @@ -This software is released under the MIT license: - -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/node_modules/read-only-stream/example/main.js b/node_modules/read-only-stream/example/main.js deleted file mode 100644 index 22720fe3..00000000 --- a/node_modules/read-only-stream/example/main.js +++ /dev/null @@ -1,3 +0,0 @@ -var wrap = require('./wrap.js'); -var ro = wrap(); // can't write to `ro` and muck up internal state -ro.pipe(process.stdout); diff --git a/node_modules/read-only-stream/example/wrap.js b/node_modules/read-only-stream/example/wrap.js deleted file mode 100644 index 55860810..00000000 --- a/node_modules/read-only-stream/example/wrap.js +++ /dev/null @@ -1,8 +0,0 @@ -var through = require('through2'); -var readonly = require('../'); - -module.exports = function () { - var stream = through(); - stream.end('wooooo\n'); - return readonly(stream); -}; diff --git a/node_modules/read-only-stream/index.js b/node_modules/read-only-stream/index.js deleted file mode 100644 index c2f27c9a..00000000 --- a/node_modules/read-only-stream/index.js +++ /dev/null @@ -1,29 +0,0 @@ -var Readable = require('readable-stream/readable'); -var rwrap = require('readable-wrap'); - -module.exports = function (stream) { - var opts = stream._readableState; - if (typeof stream.read !== 'function') stream = rwrap(stream, opts); - - var ro = new Readable({ objectMode: opts && opts.objectMode }); - var waiting = false; - - stream.on('readable', function () { - if (waiting) { - waiting = false; - ro._read(); - } - }); - - ro._read = function () { - var buf, reads = 0; - while ((buf = stream.read()) !== null) { - ro.push(buf); - reads ++; - } - if (reads === 0) waiting = true; - }; - stream.once('end', function () { ro.push(null) }); - stream.on('error', function (err) { ro.emit('error', err) }); - return ro; -}; diff --git a/node_modules/read-only-stream/package.json b/node_modules/read-only-stream/package.json deleted file mode 100644 index 728540a3..00000000 --- a/node_modules/read-only-stream/package.json +++ /dev/null @@ -1,95 +0,0 @@ -{ - "_args": [ - [ - { - "raw": "read-only-stream@^1.1.1", - "scope": null, - "escapedName": "read-only-stream", - "name": "read-only-stream", - "rawSpec": "^1.1.1", - "spec": ">=1.1.1 <2.0.0", - "type": "range" - }, - "/Users/benjaminarias/Desktop/poly/node_modules/browserify" - ] - ], - "_from": "read-only-stream@>=1.1.1 <2.0.0", - "_id": "read-only-stream@1.1.1", - "_inCache": true, - "_installable": true, - "_location": "/read-only-stream", - "_npmUser": { - "name": "substack", - "email": "mail@substack.net" - }, - "_npmVersion": "2.0.0", - "_phantomChildren": {}, - "_requested": { - "raw": "read-only-stream@^1.1.1", - "scope": null, - "escapedName": "read-only-stream", - "name": "read-only-stream", - "rawSpec": "^1.1.1", - "spec": ">=1.1.1 <2.0.0", - "type": "range" - }, - "_requiredBy": [ - "/browserify" - ], - "_resolved": "https://registry.npmjs.org/read-only-stream/-/read-only-stream-1.1.1.tgz", - "_shasum": "5da77c799ed1388d3ef88a18471bb5924f8a0ba1", - "_shrinkwrap": null, - "_spec": "read-only-stream@^1.1.1", - "_where": "/Users/benjaminarias/Desktop/poly/node_modules/browserify", - "author": { - "name": "James Halliday", - "email": "mail@substack.net", - "url": "http://substack.net" - }, - "bugs": { - "url": "https://github.com/substack/read-only-stream/issues" - }, - "dependencies": { - "readable-stream": "^1.0.31", - "readable-wrap": "^1.0.0" - }, - "description": "wrap a readable/writable stream to be read-only", - "devDependencies": { - "concat-stream": "^1.4.6", - "covert": "^1.0.0", - "tape": "^2.13.2", - "through": "^2.3.4", - "through2": "~0.6.1" - }, - "directories": {}, - "dist": { - "shasum": "5da77c799ed1388d3ef88a18471bb5924f8a0ba1", - "tarball": "https://registry.npmjs.org/read-only-stream/-/read-only-stream-1.1.1.tgz" - }, - "gitHead": "ab5c349f1819bd45c208e41dead2af33f44898a8", - "homepage": "https://github.com/substack/read-only-stream", - "keywords": [ - "stream", - "readonly" - ], - "license": "MIT", - "main": "index.js", - "maintainers": [ - { - "name": "substack", - "email": "mail@substack.net" - } - ], - "name": "read-only-stream", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git://github.com/substack/read-only-stream.git" - }, - "scripts": { - "coverage": "covert test/*.js", - "test": "tape test/*.js" - }, - "version": "1.1.1" -} diff --git a/node_modules/read-only-stream/readme.markdown b/node_modules/read-only-stream/readme.markdown deleted file mode 100644 index 05e6a9db..00000000 --- a/node_modules/read-only-stream/readme.markdown +++ /dev/null @@ -1,60 +0,0 @@ -# read-only-stream - -wrap a readable/writable stream to be read-only -to prevent mucking up the input side - -[![build status](https://secure.travis-ci.org/substack/read-only-stream.png)](http://travis-ci.org/substack/read-only-stream) - -# example - -Suppose you have a module that uses a readable/writable stream internally but -want to expose just the readable part of that internal stream. This is common if -you use the writable side internally and expose the readable side as the -interface. - -Now we can write some code like this with a `through` stream internally for -convenience: - -``` js -var through = require('through2'); -var readonly = require('read-only-stream'); - -module.exports = function () { - var stream = through(); - stream.end('wooooo\n'); - return readonly(stream); -}; -``` - -but consumers won't be able to write to the input side and break the api: - -``` js -var wrap = require('./wrap.js'); -var ro = wrap(); // can't write to `ro` and muck up internal state -ro.pipe(process.stdout); -``` - -# methods - -``` js -var readonly = require('read-only-stream') -``` - -## var ro = readonly(stream) - -Return a readable stream `ro` that wraps the readable/writable `stream` argument -given to only expose the readable side. - -`stream` can be a streams1 or streams2 stream. - -# install - -With [npm](https://npmjs.org) do: - -``` -npm install read-only-stream -``` - -# license - -MIT diff --git a/node_modules/read-only-stream/test/error.js b/node_modules/read-only-stream/test/error.js deleted file mode 100644 index e53447c6..00000000 --- a/node_modules/read-only-stream/test/error.js +++ /dev/null @@ -1,15 +0,0 @@ -var test = require('tape'); -var readonly = require('../'); -var through = require('through2'); - -test('error', function (t) { - t.plan(1); - - var stream = through(); - var ro = readonly(stream); - - ro.on('error', function (err) { - t.ok(err); - }); - stream.emit('error', new Error); -}); diff --git a/node_modules/read-only-stream/test/ro.js b/node_modules/read-only-stream/test/ro.js deleted file mode 100644 index b7f4a551..00000000 --- a/node_modules/read-only-stream/test/ro.js +++ /dev/null @@ -1,22 +0,0 @@ -var test = require('tape'); -var readonly = require('../'); -var through = require('through2'); -var concat = require('concat-stream'); - -test('readonly', function (t) { - t.plan(2); - - var stream = through(); - stream.write('woo'); - - var ro = readonly(stream); - ro.pipe(concat(function (body) { - t.equal(body.toString('utf8'), 'woo'); - })); - - t.throws(function () { - ro.write('beep'); - }); - - stream.end(); -}); diff --git a/node_modules/read-only-stream/test/streams1.js b/node_modules/read-only-stream/test/streams1.js deleted file mode 100644 index dfe408fa..00000000 --- a/node_modules/read-only-stream/test/streams1.js +++ /dev/null @@ -1,21 +0,0 @@ -var test = require('tape'); -var readonly = require('../'); -var through = require('through'); -var concat = require('concat-stream'); - -test('streams1', function (t) { - t.plan(2); - - var stream = through(); - - var ro = readonly(stream); - ro.pipe(concat(function (body) { - t.equal(body.toString('utf8'), 'woo'); - })); - - t.throws(function () { - ro.write('beep'); - }); - - stream.end('woo'); -}); diff --git a/node_modules/readable-stream/.npmignore b/node_modules/readable-stream/.npmignore deleted file mode 100644 index 38344f87..00000000 --- a/node_modules/readable-stream/.npmignore +++ /dev/null @@ -1,5 +0,0 @@ -build/ -test/ -examples/ -fs.js -zlib.js \ No newline at end of file diff --git a/node_modules/readable-stream/LICENSE b/node_modules/readable-stream/LICENSE deleted file mode 100644 index e3d4e695..00000000 --- a/node_modules/readable-stream/LICENSE +++ /dev/null @@ -1,18 +0,0 @@ -Copyright Joyent, Inc. and other Node contributors. All rights reserved. -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to -deal in the Software without restriction, including without limitation the -rights to use, copy, modify, merge, publish, distribute, sublicense, and/or -sell copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS -IN THE SOFTWARE. diff --git a/node_modules/readable-stream/README.md b/node_modules/readable-stream/README.md deleted file mode 100644 index e46b8239..00000000 --- a/node_modules/readable-stream/README.md +++ /dev/null @@ -1,15 +0,0 @@ -# readable-stream - -***Node-core streams for userland*** - -[![NPM](https://nodei.co/npm/readable-stream.png?downloads=true&downloadRank=true)](https://nodei.co/npm/readable-stream/) -[![NPM](https://nodei.co/npm-dl/readable-stream.png&months=6&height=3)](https://nodei.co/npm/readable-stream/) - -This package is a mirror of the Streams2 and Streams3 implementations in Node-core. - -If you want to guarantee a stable streams base, regardless of what version of Node you, or the users of your libraries are using, use **readable-stream** *only* and avoid the *"stream"* module in Node-core. - -**readable-stream** comes in two major versions, v1.0.x and v1.1.x. The former tracks the Streams2 implementation in Node 0.10, including bug-fixes and minor improvements as they are added. The latter tracks Streams3 as it develops in Node 0.11; we will likely see a v1.2.x branch for Node 0.12. - -**readable-stream** uses proper patch-level versioning so if you pin to `"~1.0.0"` you’ll get the latest Node 0.10 Streams2 implementation, including any fixes and minor non-breaking improvements. The patch-level versions of 1.0.x and 1.1.x should mirror the patch-level versions of Node-core releases. You should prefer the **1.0.x** releases for now and when you’re ready to start using Streams3, pin to `"~1.1.0"` - diff --git a/node_modules/readable-stream/duplex.js b/node_modules/readable-stream/duplex.js deleted file mode 100644 index ca807af8..00000000 --- a/node_modules/readable-stream/duplex.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require("./lib/_stream_duplex.js") diff --git a/node_modules/readable-stream/float.patch b/node_modules/readable-stream/float.patch deleted file mode 100644 index b984607a..00000000 --- a/node_modules/readable-stream/float.patch +++ /dev/null @@ -1,923 +0,0 @@ -diff --git a/lib/_stream_duplex.js b/lib/_stream_duplex.js -index c5a741c..a2e0d8e 100644 ---- a/lib/_stream_duplex.js -+++ b/lib/_stream_duplex.js -@@ -26,8 +26,8 @@ - - module.exports = Duplex; - var util = require('util'); --var Readable = require('_stream_readable'); --var Writable = require('_stream_writable'); -+var Readable = require('./_stream_readable'); -+var Writable = require('./_stream_writable'); - - util.inherits(Duplex, Readable); - -diff --git a/lib/_stream_passthrough.js b/lib/_stream_passthrough.js -index a5e9864..330c247 100644 ---- a/lib/_stream_passthrough.js -+++ b/lib/_stream_passthrough.js -@@ -25,7 +25,7 @@ - - module.exports = PassThrough; - --var Transform = require('_stream_transform'); -+var Transform = require('./_stream_transform'); - var util = require('util'); - util.inherits(PassThrough, Transform); - -diff --git a/lib/_stream_readable.js b/lib/_stream_readable.js -index 0c3fe3e..90a8298 100644 ---- a/lib/_stream_readable.js -+++ b/lib/_stream_readable.js -@@ -23,10 +23,34 @@ module.exports = Readable; - Readable.ReadableState = ReadableState; - - var EE = require('events').EventEmitter; -+if (!EE.listenerCount) EE.listenerCount = function(emitter, type) { -+ return emitter.listeners(type).length; -+}; -+ -+if (!global.setImmediate) global.setImmediate = function setImmediate(fn) { -+ return setTimeout(fn, 0); -+}; -+if (!global.clearImmediate) global.clearImmediate = function clearImmediate(i) { -+ return clearTimeout(i); -+}; -+ - var Stream = require('stream'); - var util = require('util'); -+if (!util.isUndefined) { -+ var utilIs = require('core-util-is'); -+ for (var f in utilIs) { -+ util[f] = utilIs[f]; -+ } -+} - var StringDecoder; --var debug = util.debuglog('stream'); -+var debug; -+if (util.debuglog) -+ debug = util.debuglog('stream'); -+else try { -+ debug = require('debuglog')('stream'); -+} catch (er) { -+ debug = function() {}; -+} - - util.inherits(Readable, Stream); - -@@ -380,7 +404,7 @@ function chunkInvalid(state, chunk) { - - - function onEofChunk(stream, state) { -- if (state.decoder && !state.ended) { -+ if (state.decoder && !state.ended && state.decoder.end) { - var chunk = state.decoder.end(); - if (chunk && chunk.length) { - state.buffer.push(chunk); -diff --git a/lib/_stream_transform.js b/lib/_stream_transform.js -index b1f9fcc..b0caf57 100644 ---- a/lib/_stream_transform.js -+++ b/lib/_stream_transform.js -@@ -64,8 +64,14 @@ - - module.exports = Transform; - --var Duplex = require('_stream_duplex'); -+var Duplex = require('./_stream_duplex'); - var util = require('util'); -+if (!util.isUndefined) { -+ var utilIs = require('core-util-is'); -+ for (var f in utilIs) { -+ util[f] = utilIs[f]; -+ } -+} - util.inherits(Transform, Duplex); - - -diff --git a/lib/_stream_writable.js b/lib/_stream_writable.js -index ba2e920..f49288b 100644 ---- a/lib/_stream_writable.js -+++ b/lib/_stream_writable.js -@@ -27,6 +27,12 @@ module.exports = Writable; - Writable.WritableState = WritableState; - - var util = require('util'); -+if (!util.isUndefined) { -+ var utilIs = require('core-util-is'); -+ for (var f in utilIs) { -+ util[f] = utilIs[f]; -+ } -+} - var Stream = require('stream'); - - util.inherits(Writable, Stream); -@@ -119,7 +125,7 @@ function WritableState(options, stream) { - function Writable(options) { - // Writable ctor is applied to Duplexes, though they're not - // instanceof Writable, they're instanceof Readable. -- if (!(this instanceof Writable) && !(this instanceof Stream.Duplex)) -+ if (!(this instanceof Writable) && !(this instanceof require('./_stream_duplex'))) - return new Writable(options); - - this._writableState = new WritableState(options, this); -diff --git a/test/simple/test-stream-big-push.js b/test/simple/test-stream-big-push.js -index e3787e4..8cd2127 100644 ---- a/test/simple/test-stream-big-push.js -+++ b/test/simple/test-stream-big-push.js -@@ -21,7 +21,7 @@ - - var common = require('../common'); - var assert = require('assert'); --var stream = require('stream'); -+var stream = require('../../'); - var str = 'asdfasdfasdfasdfasdf'; - - var r = new stream.Readable({ -diff --git a/test/simple/test-stream-end-paused.js b/test/simple/test-stream-end-paused.js -index bb73777..d40efc7 100644 ---- a/test/simple/test-stream-end-paused.js -+++ b/test/simple/test-stream-end-paused.js -@@ -25,7 +25,7 @@ var gotEnd = false; - - // Make sure we don't miss the end event for paused 0-length streams - --var Readable = require('stream').Readable; -+var Readable = require('../../').Readable; - var stream = new Readable(); - var calledRead = false; - stream._read = function() { -diff --git a/test/simple/test-stream-pipe-after-end.js b/test/simple/test-stream-pipe-after-end.js -index b46ee90..0be8366 100644 ---- a/test/simple/test-stream-pipe-after-end.js -+++ b/test/simple/test-stream-pipe-after-end.js -@@ -22,8 +22,8 @@ - var common = require('../common'); - var assert = require('assert'); - --var Readable = require('_stream_readable'); --var Writable = require('_stream_writable'); -+var Readable = require('../../lib/_stream_readable'); -+var Writable = require('../../lib/_stream_writable'); - var util = require('util'); - - util.inherits(TestReadable, Readable); -diff --git a/test/simple/test-stream-pipe-cleanup.js b/test/simple/test-stream-pipe-cleanup.js -deleted file mode 100644 -index f689358..0000000 ---- a/test/simple/test-stream-pipe-cleanup.js -+++ /dev/null -@@ -1,122 +0,0 @@ --// Copyright Joyent, Inc. and other Node contributors. --// --// Permission is hereby granted, free of charge, to any person obtaining a --// copy of this software and associated documentation files (the --// "Software"), to deal in the Software without restriction, including --// without limitation the rights to use, copy, modify, merge, publish, --// distribute, sublicense, and/or sell copies of the Software, and to permit --// persons to whom the Software is furnished to do so, subject to the --// following conditions: --// --// The above copyright notice and this permission notice shall be included --// in all copies or substantial portions of the Software. --// --// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS --// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF --// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN --// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, --// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR --// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE --// USE OR OTHER DEALINGS IN THE SOFTWARE. -- --// This test asserts that Stream.prototype.pipe does not leave listeners --// hanging on the source or dest. -- --var common = require('../common'); --var stream = require('stream'); --var assert = require('assert'); --var util = require('util'); -- --function Writable() { -- this.writable = true; -- this.endCalls = 0; -- stream.Stream.call(this); --} --util.inherits(Writable, stream.Stream); --Writable.prototype.end = function() { -- this.endCalls++; --}; -- --Writable.prototype.destroy = function() { -- this.endCalls++; --}; -- --function Readable() { -- this.readable = true; -- stream.Stream.call(this); --} --util.inherits(Readable, stream.Stream); -- --function Duplex() { -- this.readable = true; -- Writable.call(this); --} --util.inherits(Duplex, Writable); -- --var i = 0; --var limit = 100; -- --var w = new Writable(); -- --var r; -- --for (i = 0; i < limit; i++) { -- r = new Readable(); -- r.pipe(w); -- r.emit('end'); --} --assert.equal(0, r.listeners('end').length); --assert.equal(limit, w.endCalls); -- --w.endCalls = 0; -- --for (i = 0; i < limit; i++) { -- r = new Readable(); -- r.pipe(w); -- r.emit('close'); --} --assert.equal(0, r.listeners('close').length); --assert.equal(limit, w.endCalls); -- --w.endCalls = 0; -- --r = new Readable(); -- --for (i = 0; i < limit; i++) { -- w = new Writable(); -- r.pipe(w); -- w.emit('close'); --} --assert.equal(0, w.listeners('close').length); -- --r = new Readable(); --w = new Writable(); --var d = new Duplex(); --r.pipe(d); // pipeline A --d.pipe(w); // pipeline B --assert.equal(r.listeners('end').length, 2); // A.onend, A.cleanup --assert.equal(r.listeners('close').length, 2); // A.onclose, A.cleanup --assert.equal(d.listeners('end').length, 2); // B.onend, B.cleanup --assert.equal(d.listeners('close').length, 3); // A.cleanup, B.onclose, B.cleanup --assert.equal(w.listeners('end').length, 0); --assert.equal(w.listeners('close').length, 1); // B.cleanup -- --r.emit('end'); --assert.equal(d.endCalls, 1); --assert.equal(w.endCalls, 0); --assert.equal(r.listeners('end').length, 0); --assert.equal(r.listeners('close').length, 0); --assert.equal(d.listeners('end').length, 2); // B.onend, B.cleanup --assert.equal(d.listeners('close').length, 2); // B.onclose, B.cleanup --assert.equal(w.listeners('end').length, 0); --assert.equal(w.listeners('close').length, 1); // B.cleanup -- --d.emit('end'); --assert.equal(d.endCalls, 1); --assert.equal(w.endCalls, 1); --assert.equal(r.listeners('end').length, 0); --assert.equal(r.listeners('close').length, 0); --assert.equal(d.listeners('end').length, 0); --assert.equal(d.listeners('close').length, 0); --assert.equal(w.listeners('end').length, 0); --assert.equal(w.listeners('close').length, 0); -diff --git a/test/simple/test-stream-pipe-error-handling.js b/test/simple/test-stream-pipe-error-handling.js -index c5d724b..c7d6b7d 100644 ---- a/test/simple/test-stream-pipe-error-handling.js -+++ b/test/simple/test-stream-pipe-error-handling.js -@@ -21,7 +21,7 @@ - - var common = require('../common'); - var assert = require('assert'); --var Stream = require('stream').Stream; -+var Stream = require('../../').Stream; - - (function testErrorListenerCatches() { - var source = new Stream(); -diff --git a/test/simple/test-stream-pipe-event.js b/test/simple/test-stream-pipe-event.js -index cb9d5fe..56f8d61 100644 ---- a/test/simple/test-stream-pipe-event.js -+++ b/test/simple/test-stream-pipe-event.js -@@ -20,7 +20,7 @@ - // USE OR OTHER DEALINGS IN THE SOFTWARE. - - var common = require('../common'); --var stream = require('stream'); -+var stream = require('../../'); - var assert = require('assert'); - var util = require('util'); - -diff --git a/test/simple/test-stream-push-order.js b/test/simple/test-stream-push-order.js -index f2e6ec2..a5c9bf9 100644 ---- a/test/simple/test-stream-push-order.js -+++ b/test/simple/test-stream-push-order.js -@@ -20,7 +20,7 @@ - // USE OR OTHER DEALINGS IN THE SOFTWARE. - - var common = require('../common.js'); --var Readable = require('stream').Readable; -+var Readable = require('../../').Readable; - var assert = require('assert'); - - var s = new Readable({ -diff --git a/test/simple/test-stream-push-strings.js b/test/simple/test-stream-push-strings.js -index 06f43dc..1701a9a 100644 ---- a/test/simple/test-stream-push-strings.js -+++ b/test/simple/test-stream-push-strings.js -@@ -22,7 +22,7 @@ - var common = require('../common'); - var assert = require('assert'); - --var Readable = require('stream').Readable; -+var Readable = require('../../').Readable; - var util = require('util'); - - util.inherits(MyStream, Readable); -diff --git a/test/simple/test-stream-readable-event.js b/test/simple/test-stream-readable-event.js -index ba6a577..a8e6f7b 100644 ---- a/test/simple/test-stream-readable-event.js -+++ b/test/simple/test-stream-readable-event.js -@@ -22,7 +22,7 @@ - var common = require('../common'); - var assert = require('assert'); - --var Readable = require('stream').Readable; -+var Readable = require('../../').Readable; - - (function first() { - // First test, not reading when the readable is added. -diff --git a/test/simple/test-stream-readable-flow-recursion.js b/test/simple/test-stream-readable-flow-recursion.js -index 2891ad6..11689ba 100644 ---- a/test/simple/test-stream-readable-flow-recursion.js -+++ b/test/simple/test-stream-readable-flow-recursion.js -@@ -27,7 +27,7 @@ var assert = require('assert'); - // more data continuously, but without triggering a nextTick - // warning or RangeError. - --var Readable = require('stream').Readable; -+var Readable = require('../../').Readable; - - // throw an error if we trigger a nextTick warning. - process.throwDeprecation = true; -diff --git a/test/simple/test-stream-unshift-empty-chunk.js b/test/simple/test-stream-unshift-empty-chunk.js -index 0c96476..7827538 100644 ---- a/test/simple/test-stream-unshift-empty-chunk.js -+++ b/test/simple/test-stream-unshift-empty-chunk.js -@@ -24,7 +24,7 @@ var assert = require('assert'); - - // This test verifies that stream.unshift(Buffer(0)) or - // stream.unshift('') does not set state.reading=false. --var Readable = require('stream').Readable; -+var Readable = require('../../').Readable; - - var r = new Readable(); - var nChunks = 10; -diff --git a/test/simple/test-stream-unshift-read-race.js b/test/simple/test-stream-unshift-read-race.js -index 83fd9fa..17c18aa 100644 ---- a/test/simple/test-stream-unshift-read-race.js -+++ b/test/simple/test-stream-unshift-read-race.js -@@ -29,7 +29,7 @@ var assert = require('assert'); - // 3. push() after the EOF signaling null is an error. - // 4. _read() is not called after pushing the EOF null chunk. - --var stream = require('stream'); -+var stream = require('../../'); - var hwm = 10; - var r = stream.Readable({ highWaterMark: hwm }); - var chunks = 10; -@@ -51,7 +51,14 @@ r._read = function(n) { - - function push(fast) { - assert(!pushedNull, 'push() after null push'); -- var c = pos >= data.length ? null : data.slice(pos, pos + n); -+ var c; -+ if (pos >= data.length) -+ c = null; -+ else { -+ if (n + pos > data.length) -+ n = data.length - pos; -+ c = data.slice(pos, pos + n); -+ } - pushedNull = c === null; - if (fast) { - pos += n; -diff --git a/test/simple/test-stream-writev.js b/test/simple/test-stream-writev.js -index 5b49e6e..b5321f3 100644 ---- a/test/simple/test-stream-writev.js -+++ b/test/simple/test-stream-writev.js -@@ -22,7 +22,7 @@ - var common = require('../common'); - var assert = require('assert'); - --var stream = require('stream'); -+var stream = require('../../'); - - var queue = []; - for (var decode = 0; decode < 2; decode++) { -diff --git a/test/simple/test-stream2-basic.js b/test/simple/test-stream2-basic.js -index 3814bf0..248c1be 100644 ---- a/test/simple/test-stream2-basic.js -+++ b/test/simple/test-stream2-basic.js -@@ -21,7 +21,7 @@ - - - var common = require('../common.js'); --var R = require('_stream_readable'); -+var R = require('../../lib/_stream_readable'); - var assert = require('assert'); - - var util = require('util'); -diff --git a/test/simple/test-stream2-compatibility.js b/test/simple/test-stream2-compatibility.js -index 6cdd4e9..f0fa84b 100644 ---- a/test/simple/test-stream2-compatibility.js -+++ b/test/simple/test-stream2-compatibility.js -@@ -21,7 +21,7 @@ - - - var common = require('../common.js'); --var R = require('_stream_readable'); -+var R = require('../../lib/_stream_readable'); - var assert = require('assert'); - - var util = require('util'); -diff --git a/test/simple/test-stream2-finish-pipe.js b/test/simple/test-stream2-finish-pipe.js -index 39b274f..006a19b 100644 ---- a/test/simple/test-stream2-finish-pipe.js -+++ b/test/simple/test-stream2-finish-pipe.js -@@ -20,7 +20,7 @@ - // USE OR OTHER DEALINGS IN THE SOFTWARE. - - var common = require('../common.js'); --var stream = require('stream'); -+var stream = require('../../'); - var Buffer = require('buffer').Buffer; - - var r = new stream.Readable(); -diff --git a/test/simple/test-stream2-fs.js b/test/simple/test-stream2-fs.js -deleted file mode 100644 -index e162406..0000000 ---- a/test/simple/test-stream2-fs.js -+++ /dev/null -@@ -1,72 +0,0 @@ --// Copyright Joyent, Inc. and other Node contributors. --// --// Permission is hereby granted, free of charge, to any person obtaining a --// copy of this software and associated documentation files (the --// "Software"), to deal in the Software without restriction, including --// without limitation the rights to use, copy, modify, merge, publish, --// distribute, sublicense, and/or sell copies of the Software, and to permit --// persons to whom the Software is furnished to do so, subject to the --// following conditions: --// --// The above copyright notice and this permission notice shall be included --// in all copies or substantial portions of the Software. --// --// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS --// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF --// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN --// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, --// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR --// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE --// USE OR OTHER DEALINGS IN THE SOFTWARE. -- -- --var common = require('../common.js'); --var R = require('_stream_readable'); --var assert = require('assert'); -- --var fs = require('fs'); --var FSReadable = fs.ReadStream; -- --var path = require('path'); --var file = path.resolve(common.fixturesDir, 'x1024.txt'); -- --var size = fs.statSync(file).size; -- --var expectLengths = [1024]; -- --var util = require('util'); --var Stream = require('stream'); -- --util.inherits(TestWriter, Stream); -- --function TestWriter() { -- Stream.apply(this); -- this.buffer = []; -- this.length = 0; --} -- --TestWriter.prototype.write = function(c) { -- this.buffer.push(c.toString()); -- this.length += c.length; -- return true; --}; -- --TestWriter.prototype.end = function(c) { -- if (c) this.buffer.push(c.toString()); -- this.emit('results', this.buffer); --} -- --var r = new FSReadable(file); --var w = new TestWriter(); -- --w.on('results', function(res) { -- console.error(res, w.length); -- assert.equal(w.length, size); -- var l = 0; -- assert.deepEqual(res.map(function (c) { -- return c.length; -- }), expectLengths); -- console.log('ok'); --}); -- --r.pipe(w); -diff --git a/test/simple/test-stream2-httpclient-response-end.js b/test/simple/test-stream2-httpclient-response-end.js -deleted file mode 100644 -index 15cffc2..0000000 ---- a/test/simple/test-stream2-httpclient-response-end.js -+++ /dev/null -@@ -1,52 +0,0 @@ --// Copyright Joyent, Inc. and other Node contributors. --// --// Permission is hereby granted, free of charge, to any person obtaining a --// copy of this software and associated documentation files (the --// "Software"), to deal in the Software without restriction, including --// without limitation the rights to use, copy, modify, merge, publish, --// distribute, sublicense, and/or sell copies of the Software, and to permit --// persons to whom the Software is furnished to do so, subject to the --// following conditions: --// --// The above copyright notice and this permission notice shall be included --// in all copies or substantial portions of the Software. --// --// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS --// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF --// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN --// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, --// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR --// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE --// USE OR OTHER DEALINGS IN THE SOFTWARE. -- --var common = require('../common.js'); --var assert = require('assert'); --var http = require('http'); --var msg = 'Hello'; --var readable_event = false; --var end_event = false; --var server = http.createServer(function(req, res) { -- res.writeHead(200, {'Content-Type': 'text/plain'}); -- res.end(msg); --}).listen(common.PORT, function() { -- http.get({port: common.PORT}, function(res) { -- var data = ''; -- res.on('readable', function() { -- console.log('readable event'); -- readable_event = true; -- data += res.read(); -- }); -- res.on('end', function() { -- console.log('end event'); -- end_event = true; -- assert.strictEqual(msg, data); -- server.close(); -- }); -- }); --}); -- --process.on('exit', function() { -- assert(readable_event); -- assert(end_event); --}); -- -diff --git a/test/simple/test-stream2-large-read-stall.js b/test/simple/test-stream2-large-read-stall.js -index 2fbfbca..667985b 100644 ---- a/test/simple/test-stream2-large-read-stall.js -+++ b/test/simple/test-stream2-large-read-stall.js -@@ -30,7 +30,7 @@ var PUSHSIZE = 20; - var PUSHCOUNT = 1000; - var HWM = 50; - --var Readable = require('stream').Readable; -+var Readable = require('../../').Readable; - var r = new Readable({ - highWaterMark: HWM - }); -@@ -39,23 +39,23 @@ var rs = r._readableState; - r._read = push; - - r.on('readable', function() { -- console.error('>> readable'); -+ //console.error('>> readable'); - do { -- console.error(' > read(%d)', READSIZE); -+ //console.error(' > read(%d)', READSIZE); - var ret = r.read(READSIZE); -- console.error(' < %j (%d remain)', ret && ret.length, rs.length); -+ //console.error(' < %j (%d remain)', ret && ret.length, rs.length); - } while (ret && ret.length === READSIZE); - -- console.error('<< after read()', -- ret && ret.length, -- rs.needReadable, -- rs.length); -+ //console.error('<< after read()', -+ // ret && ret.length, -+ // rs.needReadable, -+ // rs.length); - }); - - var endEmitted = false; - r.on('end', function() { - endEmitted = true; -- console.error('end'); -+ //console.error('end'); - }); - - var pushes = 0; -@@ -64,11 +64,11 @@ function push() { - return; - - if (pushes++ === PUSHCOUNT) { -- console.error(' push(EOF)'); -+ //console.error(' push(EOF)'); - return r.push(null); - } - -- console.error(' push #%d', pushes); -+ //console.error(' push #%d', pushes); - if (r.push(new Buffer(PUSHSIZE))) - setTimeout(push); - } -diff --git a/test/simple/test-stream2-objects.js b/test/simple/test-stream2-objects.js -index 3e6931d..ff47d89 100644 ---- a/test/simple/test-stream2-objects.js -+++ b/test/simple/test-stream2-objects.js -@@ -21,8 +21,8 @@ - - - var common = require('../common.js'); --var Readable = require('_stream_readable'); --var Writable = require('_stream_writable'); -+var Readable = require('../../lib/_stream_readable'); -+var Writable = require('../../lib/_stream_writable'); - var assert = require('assert'); - - // tiny node-tap lookalike. -diff --git a/test/simple/test-stream2-pipe-error-handling.js b/test/simple/test-stream2-pipe-error-handling.js -index cf7531c..e3f3e4e 100644 ---- a/test/simple/test-stream2-pipe-error-handling.js -+++ b/test/simple/test-stream2-pipe-error-handling.js -@@ -21,7 +21,7 @@ - - var common = require('../common'); - var assert = require('assert'); --var stream = require('stream'); -+var stream = require('../../'); - - (function testErrorListenerCatches() { - var count = 1000; -diff --git a/test/simple/test-stream2-pipe-error-once-listener.js b/test/simple/test-stream2-pipe-error-once-listener.js -index 5e8e3cb..53b2616 100755 ---- a/test/simple/test-stream2-pipe-error-once-listener.js -+++ b/test/simple/test-stream2-pipe-error-once-listener.js -@@ -24,7 +24,7 @@ var common = require('../common.js'); - var assert = require('assert'); - - var util = require('util'); --var stream = require('stream'); -+var stream = require('../../'); - - - var Read = function() { -diff --git a/test/simple/test-stream2-push.js b/test/simple/test-stream2-push.js -index b63edc3..eb2b0e9 100644 ---- a/test/simple/test-stream2-push.js -+++ b/test/simple/test-stream2-push.js -@@ -20,7 +20,7 @@ - // USE OR OTHER DEALINGS IN THE SOFTWARE. - - var common = require('../common.js'); --var stream = require('stream'); -+var stream = require('../../'); - var Readable = stream.Readable; - var Writable = stream.Writable; - var assert = require('assert'); -diff --git a/test/simple/test-stream2-read-sync-stack.js b/test/simple/test-stream2-read-sync-stack.js -index e8a7305..9740a47 100644 ---- a/test/simple/test-stream2-read-sync-stack.js -+++ b/test/simple/test-stream2-read-sync-stack.js -@@ -21,7 +21,7 @@ - - var common = require('../common'); - var assert = require('assert'); --var Readable = require('stream').Readable; -+var Readable = require('../../').Readable; - var r = new Readable(); - var N = 256 * 1024; - -diff --git a/test/simple/test-stream2-readable-empty-buffer-no-eof.js b/test/simple/test-stream2-readable-empty-buffer-no-eof.js -index cd30178..4b1659d 100644 ---- a/test/simple/test-stream2-readable-empty-buffer-no-eof.js -+++ b/test/simple/test-stream2-readable-empty-buffer-no-eof.js -@@ -22,10 +22,9 @@ - var common = require('../common'); - var assert = require('assert'); - --var Readable = require('stream').Readable; -+var Readable = require('../../').Readable; - - test1(); --test2(); - - function test1() { - var r = new Readable(); -@@ -88,31 +87,3 @@ function test1() { - console.log('ok'); - }); - } -- --function test2() { -- var r = new Readable({ encoding: 'base64' }); -- var reads = 5; -- r._read = function(n) { -- if (!reads--) -- return r.push(null); // EOF -- else -- return r.push(new Buffer('x')); -- }; -- -- var results = []; -- function flow() { -- var chunk; -- while (null !== (chunk = r.read())) -- results.push(chunk + ''); -- } -- r.on('readable', flow); -- r.on('end', function() { -- results.push('EOF'); -- }); -- flow(); -- -- process.on('exit', function() { -- assert.deepEqual(results, [ 'eHh4', 'eHg=', 'EOF' ]); -- console.log('ok'); -- }); --} -diff --git a/test/simple/test-stream2-readable-from-list.js b/test/simple/test-stream2-readable-from-list.js -index 7c96ffe..04a96f5 100644 ---- a/test/simple/test-stream2-readable-from-list.js -+++ b/test/simple/test-stream2-readable-from-list.js -@@ -21,7 +21,7 @@ - - var assert = require('assert'); - var common = require('../common.js'); --var fromList = require('_stream_readable')._fromList; -+var fromList = require('../../lib/_stream_readable')._fromList; - - // tiny node-tap lookalike. - var tests = []; -diff --git a/test/simple/test-stream2-readable-legacy-drain.js b/test/simple/test-stream2-readable-legacy-drain.js -index 675da8e..51fd3d5 100644 ---- a/test/simple/test-stream2-readable-legacy-drain.js -+++ b/test/simple/test-stream2-readable-legacy-drain.js -@@ -22,7 +22,7 @@ - var common = require('../common'); - var assert = require('assert'); - --var Stream = require('stream'); -+var Stream = require('../../'); - var Readable = Stream.Readable; - - var r = new Readable(); -diff --git a/test/simple/test-stream2-readable-non-empty-end.js b/test/simple/test-stream2-readable-non-empty-end.js -index 7314ae7..c971898 100644 ---- a/test/simple/test-stream2-readable-non-empty-end.js -+++ b/test/simple/test-stream2-readable-non-empty-end.js -@@ -21,7 +21,7 @@ - - var assert = require('assert'); - var common = require('../common.js'); --var Readable = require('_stream_readable'); -+var Readable = require('../../lib/_stream_readable'); - - var len = 0; - var chunks = new Array(10); -diff --git a/test/simple/test-stream2-readable-wrap-empty.js b/test/simple/test-stream2-readable-wrap-empty.js -index 2e5cf25..fd8a3dc 100644 ---- a/test/simple/test-stream2-readable-wrap-empty.js -+++ b/test/simple/test-stream2-readable-wrap-empty.js -@@ -22,7 +22,7 @@ - var common = require('../common'); - var assert = require('assert'); - --var Readable = require('_stream_readable'); -+var Readable = require('../../lib/_stream_readable'); - var EE = require('events').EventEmitter; - - var oldStream = new EE(); -diff --git a/test/simple/test-stream2-readable-wrap.js b/test/simple/test-stream2-readable-wrap.js -index 90eea01..6b177f7 100644 ---- a/test/simple/test-stream2-readable-wrap.js -+++ b/test/simple/test-stream2-readable-wrap.js -@@ -22,8 +22,8 @@ - var common = require('../common'); - var assert = require('assert'); - --var Readable = require('_stream_readable'); --var Writable = require('_stream_writable'); -+var Readable = require('../../lib/_stream_readable'); -+var Writable = require('../../lib/_stream_writable'); - var EE = require('events').EventEmitter; - - var testRuns = 0, completedRuns = 0; -diff --git a/test/simple/test-stream2-set-encoding.js b/test/simple/test-stream2-set-encoding.js -index 5d2c32a..685531b 100644 ---- a/test/simple/test-stream2-set-encoding.js -+++ b/test/simple/test-stream2-set-encoding.js -@@ -22,7 +22,7 @@ - - var common = require('../common.js'); - var assert = require('assert'); --var R = require('_stream_readable'); -+var R = require('../../lib/_stream_readable'); - var util = require('util'); - - // tiny node-tap lookalike. -diff --git a/test/simple/test-stream2-transform.js b/test/simple/test-stream2-transform.js -index 9c9ddd8..a0cacc6 100644 ---- a/test/simple/test-stream2-transform.js -+++ b/test/simple/test-stream2-transform.js -@@ -21,8 +21,8 @@ - - var assert = require('assert'); - var common = require('../common.js'); --var PassThrough = require('_stream_passthrough'); --var Transform = require('_stream_transform'); -+var PassThrough = require('../../').PassThrough; -+var Transform = require('../../').Transform; - - // tiny node-tap lookalike. - var tests = []; -diff --git a/test/simple/test-stream2-unpipe-drain.js b/test/simple/test-stream2-unpipe-drain.js -index d66dc3c..365b327 100644 ---- a/test/simple/test-stream2-unpipe-drain.js -+++ b/test/simple/test-stream2-unpipe-drain.js -@@ -22,7 +22,7 @@ - - var common = require('../common.js'); - var assert = require('assert'); --var stream = require('stream'); -+var stream = require('../../'); - var crypto = require('crypto'); - - var util = require('util'); -diff --git a/test/simple/test-stream2-unpipe-leak.js b/test/simple/test-stream2-unpipe-leak.js -index 99f8746..17c92ae 100644 ---- a/test/simple/test-stream2-unpipe-leak.js -+++ b/test/simple/test-stream2-unpipe-leak.js -@@ -22,7 +22,7 @@ - - var common = require('../common.js'); - var assert = require('assert'); --var stream = require('stream'); -+var stream = require('../../'); - - var chunk = new Buffer('hallo'); - -diff --git a/test/simple/test-stream2-writable.js b/test/simple/test-stream2-writable.js -index 704100c..209c3a6 100644 ---- a/test/simple/test-stream2-writable.js -+++ b/test/simple/test-stream2-writable.js -@@ -20,8 +20,8 @@ - // USE OR OTHER DEALINGS IN THE SOFTWARE. - - var common = require('../common.js'); --var W = require('_stream_writable'); --var D = require('_stream_duplex'); -+var W = require('../../').Writable; -+var D = require('../../').Duplex; - var assert = require('assert'); - - var util = require('util'); -diff --git a/test/simple/test-stream3-pause-then-read.js b/test/simple/test-stream3-pause-then-read.js -index b91bde3..2f72c15 100644 ---- a/test/simple/test-stream3-pause-then-read.js -+++ b/test/simple/test-stream3-pause-then-read.js -@@ -22,7 +22,7 @@ - var common = require('../common'); - var assert = require('assert'); - --var stream = require('stream'); -+var stream = require('../../'); - var Readable = stream.Readable; - var Writable = stream.Writable; - diff --git a/node_modules/readable-stream/lib/_stream_duplex.js b/node_modules/readable-stream/lib/_stream_duplex.js deleted file mode 100644 index b513d61a..00000000 --- a/node_modules/readable-stream/lib/_stream_duplex.js +++ /dev/null @@ -1,89 +0,0 @@ -// Copyright Joyent, Inc. and other Node contributors. -// -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to permit -// persons to whom the Software is furnished to do so, subject to the -// following conditions: -// -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -// USE OR OTHER DEALINGS IN THE SOFTWARE. - -// a duplex stream is just a stream that is both readable and writable. -// Since JS doesn't have multiple prototypal inheritance, this class -// prototypally inherits from Readable, and then parasitically from -// Writable. - -module.exports = Duplex; - -/**/ -var objectKeys = Object.keys || function (obj) { - var keys = []; - for (var key in obj) keys.push(key); - return keys; -} -/**/ - - -/**/ -var util = require('core-util-is'); -util.inherits = require('inherits'); -/**/ - -var Readable = require('./_stream_readable'); -var Writable = require('./_stream_writable'); - -util.inherits(Duplex, Readable); - -forEach(objectKeys(Writable.prototype), function(method) { - if (!Duplex.prototype[method]) - Duplex.prototype[method] = Writable.prototype[method]; -}); - -function Duplex(options) { - if (!(this instanceof Duplex)) - return new Duplex(options); - - Readable.call(this, options); - Writable.call(this, options); - - if (options && options.readable === false) - this.readable = false; - - if (options && options.writable === false) - this.writable = false; - - this.allowHalfOpen = true; - if (options && options.allowHalfOpen === false) - this.allowHalfOpen = false; - - this.once('end', onend); -} - -// the no-half-open enforcer -function onend() { - // if we allow half-open state, or if the writable side ended, - // then we're ok. - if (this.allowHalfOpen || this._writableState.ended) - return; - - // no more data can be written. - // But allow more writes to happen in this tick. - process.nextTick(this.end.bind(this)); -} - -function forEach (xs, f) { - for (var i = 0, l = xs.length; i < l; i++) { - f(xs[i], i); - } -} diff --git a/node_modules/readable-stream/lib/_stream_passthrough.js b/node_modules/readable-stream/lib/_stream_passthrough.js deleted file mode 100644 index 895ca50a..00000000 --- a/node_modules/readable-stream/lib/_stream_passthrough.js +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright Joyent, Inc. and other Node contributors. -// -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to permit -// persons to whom the Software is furnished to do so, subject to the -// following conditions: -// -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -// USE OR OTHER DEALINGS IN THE SOFTWARE. - -// a passthrough stream. -// basically just the most minimal sort of Transform stream. -// Every written chunk gets output as-is. - -module.exports = PassThrough; - -var Transform = require('./_stream_transform'); - -/**/ -var util = require('core-util-is'); -util.inherits = require('inherits'); -/**/ - -util.inherits(PassThrough, Transform); - -function PassThrough(options) { - if (!(this instanceof PassThrough)) - return new PassThrough(options); - - Transform.call(this, options); -} - -PassThrough.prototype._transform = function(chunk, encoding, cb) { - cb(null, chunk); -}; diff --git a/node_modules/readable-stream/lib/_stream_readable.js b/node_modules/readable-stream/lib/_stream_readable.js deleted file mode 100644 index 19ab3588..00000000 --- a/node_modules/readable-stream/lib/_stream_readable.js +++ /dev/null @@ -1,951 +0,0 @@ -// Copyright Joyent, Inc. and other Node contributors. -// -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to permit -// persons to whom the Software is furnished to do so, subject to the -// following conditions: -// -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -// USE OR OTHER DEALINGS IN THE SOFTWARE. - -module.exports = Readable; - -/**/ -var isArray = require('isarray'); -/**/ - - -/**/ -var Buffer = require('buffer').Buffer; -/**/ - -Readable.ReadableState = ReadableState; - -var EE = require('events').EventEmitter; - -/**/ -if (!EE.listenerCount) EE.listenerCount = function(emitter, type) { - return emitter.listeners(type).length; -}; -/**/ - -var Stream = require('stream'); - -/**/ -var util = require('core-util-is'); -util.inherits = require('inherits'); -/**/ - -var StringDecoder; - - -/**/ -var debug = require('util'); -if (debug && debug.debuglog) { - debug = debug.debuglog('stream'); -} else { - debug = function () {}; -} -/**/ - - -util.inherits(Readable, Stream); - -function ReadableState(options, stream) { - var Duplex = require('./_stream_duplex'); - - options = options || {}; - - // the point at which it stops calling _read() to fill the buffer - // Note: 0 is a valid value, means "don't call _read preemptively ever" - var hwm = options.highWaterMark; - var defaultHwm = options.objectMode ? 16 : 16 * 1024; - this.highWaterMark = (hwm || hwm === 0) ? hwm : defaultHwm; - - // cast to ints. - this.highWaterMark = ~~this.highWaterMark; - - this.buffer = []; - this.length = 0; - this.pipes = null; - this.pipesCount = 0; - this.flowing = null; - this.ended = false; - this.endEmitted = false; - this.reading = false; - - // a flag to be able to tell if the onwrite cb is called immediately, - // or on a later tick. We set this to true at first, because any - // actions that shouldn't happen until "later" should generally also - // not happen before the first write call. - this.sync = true; - - // whenever we return null, then we set a flag to say - // that we're awaiting a 'readable' event emission. - this.needReadable = false; - this.emittedReadable = false; - this.readableListening = false; - - - // object stream flag. Used to make read(n) ignore n and to - // make all the buffer merging and length checks go away - this.objectMode = !!options.objectMode; - - if (stream instanceof Duplex) - this.objectMode = this.objectMode || !!options.readableObjectMode; - - // Crypto is kind of old and crusty. Historically, its default string - // encoding is 'binary' so we have to make this configurable. - // Everything else in the universe uses 'utf8', though. - this.defaultEncoding = options.defaultEncoding || 'utf8'; - - // when piping, we only care about 'readable' events that happen - // after read()ing all the bytes and not getting any pushback. - this.ranOut = false; - - // the number of writers that are awaiting a drain event in .pipe()s - this.awaitDrain = 0; - - // if true, a maybeReadMore has been scheduled - this.readingMore = false; - - this.decoder = null; - this.encoding = null; - if (options.encoding) { - if (!StringDecoder) - StringDecoder = require('string_decoder/').StringDecoder; - this.decoder = new StringDecoder(options.encoding); - this.encoding = options.encoding; - } -} - -function Readable(options) { - var Duplex = require('./_stream_duplex'); - - if (!(this instanceof Readable)) - return new Readable(options); - - this._readableState = new ReadableState(options, this); - - // legacy - this.readable = true; - - Stream.call(this); -} - -// Manually shove something into the read() buffer. -// This returns true if the highWaterMark has not been hit yet, -// similar to how Writable.write() returns true if you should -// write() some more. -Readable.prototype.push = function(chunk, encoding) { - var state = this._readableState; - - if (util.isString(chunk) && !state.objectMode) { - encoding = encoding || state.defaultEncoding; - if (encoding !== state.encoding) { - chunk = new Buffer(chunk, encoding); - encoding = ''; - } - } - - return readableAddChunk(this, state, chunk, encoding, false); -}; - -// Unshift should *always* be something directly out of read() -Readable.prototype.unshift = function(chunk) { - var state = this._readableState; - return readableAddChunk(this, state, chunk, '', true); -}; - -function readableAddChunk(stream, state, chunk, encoding, addToFront) { - var er = chunkInvalid(state, chunk); - if (er) { - stream.emit('error', er); - } else if (util.isNullOrUndefined(chunk)) { - state.reading = false; - if (!state.ended) - onEofChunk(stream, state); - } else if (state.objectMode || chunk && chunk.length > 0) { - if (state.ended && !addToFront) { - var e = new Error('stream.push() after EOF'); - stream.emit('error', e); - } else if (state.endEmitted && addToFront) { - var e = new Error('stream.unshift() after end event'); - stream.emit('error', e); - } else { - if (state.decoder && !addToFront && !encoding) - chunk = state.decoder.write(chunk); - - if (!addToFront) - state.reading = false; - - // if we want the data now, just emit it. - if (state.flowing && state.length === 0 && !state.sync) { - stream.emit('data', chunk); - stream.read(0); - } else { - // update the buffer info. - state.length += state.objectMode ? 1 : chunk.length; - if (addToFront) - state.buffer.unshift(chunk); - else - state.buffer.push(chunk); - - if (state.needReadable) - emitReadable(stream); - } - - maybeReadMore(stream, state); - } - } else if (!addToFront) { - state.reading = false; - } - - return needMoreData(state); -} - - - -// if it's past the high water mark, we can push in some more. -// Also, if we have no data yet, we can stand some -// more bytes. This is to work around cases where hwm=0, -// such as the repl. Also, if the push() triggered a -// readable event, and the user called read(largeNumber) such that -// needReadable was set, then we ought to push more, so that another -// 'readable' event will be triggered. -function needMoreData(state) { - return !state.ended && - (state.needReadable || - state.length < state.highWaterMark || - state.length === 0); -} - -// backwards compatibility. -Readable.prototype.setEncoding = function(enc) { - if (!StringDecoder) - StringDecoder = require('string_decoder/').StringDecoder; - this._readableState.decoder = new StringDecoder(enc); - this._readableState.encoding = enc; - return this; -}; - -// Don't raise the hwm > 128MB -var MAX_HWM = 0x800000; -function roundUpToNextPowerOf2(n) { - if (n >= MAX_HWM) { - n = MAX_HWM; - } else { - // Get the next highest power of 2 - n--; - for (var p = 1; p < 32; p <<= 1) n |= n >> p; - n++; - } - return n; -} - -function howMuchToRead(n, state) { - if (state.length === 0 && state.ended) - return 0; - - if (state.objectMode) - return n === 0 ? 0 : 1; - - if (isNaN(n) || util.isNull(n)) { - // only flow one buffer at a time - if (state.flowing && state.buffer.length) - return state.buffer[0].length; - else - return state.length; - } - - if (n <= 0) - return 0; - - // If we're asking for more than the target buffer level, - // then raise the water mark. Bump up to the next highest - // power of 2, to prevent increasing it excessively in tiny - // amounts. - if (n > state.highWaterMark) - state.highWaterMark = roundUpToNextPowerOf2(n); - - // don't have that much. return null, unless we've ended. - if (n > state.length) { - if (!state.ended) { - state.needReadable = true; - return 0; - } else - return state.length; - } - - return n; -} - -// you can override either this method, or the async _read(n) below. -Readable.prototype.read = function(n) { - debug('read', n); - var state = this._readableState; - var nOrig = n; - - if (!util.isNumber(n) || n > 0) - state.emittedReadable = false; - - // if we're doing read(0) to trigger a readable event, but we - // already have a bunch of data in the buffer, then just trigger - // the 'readable' event and move on. - if (n === 0 && - state.needReadable && - (state.length >= state.highWaterMark || state.ended)) { - debug('read: emitReadable', state.length, state.ended); - if (state.length === 0 && state.ended) - endReadable(this); - else - emitReadable(this); - return null; - } - - n = howMuchToRead(n, state); - - // if we've ended, and we're now clear, then finish it up. - if (n === 0 && state.ended) { - if (state.length === 0) - endReadable(this); - return null; - } - - // All the actual chunk generation logic needs to be - // *below* the call to _read. The reason is that in certain - // synthetic stream cases, such as passthrough streams, _read - // may be a completely synchronous operation which may change - // the state of the read buffer, providing enough data when - // before there was *not* enough. - // - // So, the steps are: - // 1. Figure out what the state of things will be after we do - // a read from the buffer. - // - // 2. If that resulting state will trigger a _read, then call _read. - // Note that this may be asynchronous, or synchronous. Yes, it is - // deeply ugly to write APIs this way, but that still doesn't mean - // that the Readable class should behave improperly, as streams are - // designed to be sync/async agnostic. - // Take note if the _read call is sync or async (ie, if the read call - // has returned yet), so that we know whether or not it's safe to emit - // 'readable' etc. - // - // 3. Actually pull the requested chunks out of the buffer and return. - - // if we need a readable event, then we need to do some reading. - var doRead = state.needReadable; - debug('need readable', doRead); - - // if we currently have less than the highWaterMark, then also read some - if (state.length === 0 || state.length - n < state.highWaterMark) { - doRead = true; - debug('length less than watermark', doRead); - } - - // however, if we've ended, then there's no point, and if we're already - // reading, then it's unnecessary. - if (state.ended || state.reading) { - doRead = false; - debug('reading or ended', doRead); - } - - if (doRead) { - debug('do read'); - state.reading = true; - state.sync = true; - // if the length is currently zero, then we *need* a readable event. - if (state.length === 0) - state.needReadable = true; - // call internal read method - this._read(state.highWaterMark); - state.sync = false; - } - - // If _read pushed data synchronously, then `reading` will be false, - // and we need to re-evaluate how much data we can return to the user. - if (doRead && !state.reading) - n = howMuchToRead(nOrig, state); - - var ret; - if (n > 0) - ret = fromList(n, state); - else - ret = null; - - if (util.isNull(ret)) { - state.needReadable = true; - n = 0; - } - - state.length -= n; - - // If we have nothing in the buffer, then we want to know - // as soon as we *do* get something into the buffer. - if (state.length === 0 && !state.ended) - state.needReadable = true; - - // If we tried to read() past the EOF, then emit end on the next tick. - if (nOrig !== n && state.ended && state.length === 0) - endReadable(this); - - if (!util.isNull(ret)) - this.emit('data', ret); - - return ret; -}; - -function chunkInvalid(state, chunk) { - var er = null; - if (!util.isBuffer(chunk) && - !util.isString(chunk) && - !util.isNullOrUndefined(chunk) && - !state.objectMode) { - er = new TypeError('Invalid non-string/buffer chunk'); - } - return er; -} - - -function onEofChunk(stream, state) { - if (state.decoder && !state.ended) { - var chunk = state.decoder.end(); - if (chunk && chunk.length) { - state.buffer.push(chunk); - state.length += state.objectMode ? 1 : chunk.length; - } - } - state.ended = true; - - // emit 'readable' now to make sure it gets picked up. - emitReadable(stream); -} - -// Don't emit readable right away in sync mode, because this can trigger -// another read() call => stack overflow. This way, it might trigger -// a nextTick recursion warning, but that's not so bad. -function emitReadable(stream) { - var state = stream._readableState; - state.needReadable = false; - if (!state.emittedReadable) { - debug('emitReadable', state.flowing); - state.emittedReadable = true; - if (state.sync) - process.nextTick(function() { - emitReadable_(stream); - }); - else - emitReadable_(stream); - } -} - -function emitReadable_(stream) { - debug('emit readable'); - stream.emit('readable'); - flow(stream); -} - - -// at this point, the user has presumably seen the 'readable' event, -// and called read() to consume some data. that may have triggered -// in turn another _read(n) call, in which case reading = true if -// it's in progress. -// However, if we're not ended, or reading, and the length < hwm, -// then go ahead and try to read some more preemptively. -function maybeReadMore(stream, state) { - if (!state.readingMore) { - state.readingMore = true; - process.nextTick(function() { - maybeReadMore_(stream, state); - }); - } -} - -function maybeReadMore_(stream, state) { - var len = state.length; - while (!state.reading && !state.flowing && !state.ended && - state.length < state.highWaterMark) { - debug('maybeReadMore read 0'); - stream.read(0); - if (len === state.length) - // didn't get any data, stop spinning. - break; - else - len = state.length; - } - state.readingMore = false; -} - -// abstract method. to be overridden in specific implementation classes. -// call cb(er, data) where data is <= n in length. -// for virtual (non-string, non-buffer) streams, "length" is somewhat -// arbitrary, and perhaps not very meaningful. -Readable.prototype._read = function(n) { - this.emit('error', new Error('not implemented')); -}; - -Readable.prototype.pipe = function(dest, pipeOpts) { - var src = this; - var state = this._readableState; - - switch (state.pipesCount) { - case 0: - state.pipes = dest; - break; - case 1: - state.pipes = [state.pipes, dest]; - break; - default: - state.pipes.push(dest); - break; - } - state.pipesCount += 1; - debug('pipe count=%d opts=%j', state.pipesCount, pipeOpts); - - var doEnd = (!pipeOpts || pipeOpts.end !== false) && - dest !== process.stdout && - dest !== process.stderr; - - var endFn = doEnd ? onend : cleanup; - if (state.endEmitted) - process.nextTick(endFn); - else - src.once('end', endFn); - - dest.on('unpipe', onunpipe); - function onunpipe(readable) { - debug('onunpipe'); - if (readable === src) { - cleanup(); - } - } - - function onend() { - debug('onend'); - dest.end(); - } - - // when the dest drains, it reduces the awaitDrain counter - // on the source. This would be more elegant with a .once() - // handler in flow(), but adding and removing repeatedly is - // too slow. - var ondrain = pipeOnDrain(src); - dest.on('drain', ondrain); - - function cleanup() { - debug('cleanup'); - // cleanup event handlers once the pipe is broken - dest.removeListener('close', onclose); - dest.removeListener('finish', onfinish); - dest.removeListener('drain', ondrain); - dest.removeListener('error', onerror); - dest.removeListener('unpipe', onunpipe); - src.removeListener('end', onend); - src.removeListener('end', cleanup); - src.removeListener('data', ondata); - - // if the reader is waiting for a drain event from this - // specific writer, then it would cause it to never start - // flowing again. - // So, if this is awaiting a drain, then we just call it now. - // If we don't know, then assume that we are waiting for one. - if (state.awaitDrain && - (!dest._writableState || dest._writableState.needDrain)) - ondrain(); - } - - src.on('data', ondata); - function ondata(chunk) { - debug('ondata'); - var ret = dest.write(chunk); - if (false === ret) { - debug('false write response, pause', - src._readableState.awaitDrain); - src._readableState.awaitDrain++; - src.pause(); - } - } - - // if the dest has an error, then stop piping into it. - // however, don't suppress the throwing behavior for this. - function onerror(er) { - debug('onerror', er); - unpipe(); - dest.removeListener('error', onerror); - if (EE.listenerCount(dest, 'error') === 0) - dest.emit('error', er); - } - // This is a brutally ugly hack to make sure that our error handler - // is attached before any userland ones. NEVER DO THIS. - if (!dest._events || !dest._events.error) - dest.on('error', onerror); - else if (isArray(dest._events.error)) - dest._events.error.unshift(onerror); - else - dest._events.error = [onerror, dest._events.error]; - - - - // Both close and finish should trigger unpipe, but only once. - function onclose() { - dest.removeListener('finish', onfinish); - unpipe(); - } - dest.once('close', onclose); - function onfinish() { - debug('onfinish'); - dest.removeListener('close', onclose); - unpipe(); - } - dest.once('finish', onfinish); - - function unpipe() { - debug('unpipe'); - src.unpipe(dest); - } - - // tell the dest that it's being piped to - dest.emit('pipe', src); - - // start the flow if it hasn't been started already. - if (!state.flowing) { - debug('pipe resume'); - src.resume(); - } - - return dest; -}; - -function pipeOnDrain(src) { - return function() { - var state = src._readableState; - debug('pipeOnDrain', state.awaitDrain); - if (state.awaitDrain) - state.awaitDrain--; - if (state.awaitDrain === 0 && EE.listenerCount(src, 'data')) { - state.flowing = true; - flow(src); - } - }; -} - - -Readable.prototype.unpipe = function(dest) { - var state = this._readableState; - - // if we're not piping anywhere, then do nothing. - if (state.pipesCount === 0) - return this; - - // just one destination. most common case. - if (state.pipesCount === 1) { - // passed in one, but it's not the right one. - if (dest && dest !== state.pipes) - return this; - - if (!dest) - dest = state.pipes; - - // got a match. - state.pipes = null; - state.pipesCount = 0; - state.flowing = false; - if (dest) - dest.emit('unpipe', this); - return this; - } - - // slow case. multiple pipe destinations. - - if (!dest) { - // remove all. - var dests = state.pipes; - var len = state.pipesCount; - state.pipes = null; - state.pipesCount = 0; - state.flowing = false; - - for (var i = 0; i < len; i++) - dests[i].emit('unpipe', this); - return this; - } - - // try to find the right one. - var i = indexOf(state.pipes, dest); - if (i === -1) - return this; - - state.pipes.splice(i, 1); - state.pipesCount -= 1; - if (state.pipesCount === 1) - state.pipes = state.pipes[0]; - - dest.emit('unpipe', this); - - return this; -}; - -// set up data events if they are asked for -// Ensure readable listeners eventually get something -Readable.prototype.on = function(ev, fn) { - var res = Stream.prototype.on.call(this, ev, fn); - - // If listening to data, and it has not explicitly been paused, - // then call resume to start the flow of data on the next tick. - if (ev === 'data' && false !== this._readableState.flowing) { - this.resume(); - } - - if (ev === 'readable' && this.readable) { - var state = this._readableState; - if (!state.readableListening) { - state.readableListening = true; - state.emittedReadable = false; - state.needReadable = true; - if (!state.reading) { - var self = this; - process.nextTick(function() { - debug('readable nexttick read 0'); - self.read(0); - }); - } else if (state.length) { - emitReadable(this, state); - } - } - } - - return res; -}; -Readable.prototype.addListener = Readable.prototype.on; - -// pause() and resume() are remnants of the legacy readable stream API -// If the user uses them, then switch into old mode. -Readable.prototype.resume = function() { - var state = this._readableState; - if (!state.flowing) { - debug('resume'); - state.flowing = true; - if (!state.reading) { - debug('resume read 0'); - this.read(0); - } - resume(this, state); - } - return this; -}; - -function resume(stream, state) { - if (!state.resumeScheduled) { - state.resumeScheduled = true; - process.nextTick(function() { - resume_(stream, state); - }); - } -} - -function resume_(stream, state) { - state.resumeScheduled = false; - stream.emit('resume'); - flow(stream); - if (state.flowing && !state.reading) - stream.read(0); -} - -Readable.prototype.pause = function() { - debug('call pause flowing=%j', this._readableState.flowing); - if (false !== this._readableState.flowing) { - debug('pause'); - this._readableState.flowing = false; - this.emit('pause'); - } - return this; -}; - -function flow(stream) { - var state = stream._readableState; - debug('flow', state.flowing); - if (state.flowing) { - do { - var chunk = stream.read(); - } while (null !== chunk && state.flowing); - } -} - -// wrap an old-style stream as the async data source. -// This is *not* part of the readable stream interface. -// It is an ugly unfortunate mess of history. -Readable.prototype.wrap = function(stream) { - var state = this._readableState; - var paused = false; - - var self = this; - stream.on('end', function() { - debug('wrapped end'); - if (state.decoder && !state.ended) { - var chunk = state.decoder.end(); - if (chunk && chunk.length) - self.push(chunk); - } - - self.push(null); - }); - - stream.on('data', function(chunk) { - debug('wrapped data'); - if (state.decoder) - chunk = state.decoder.write(chunk); - if (!chunk || !state.objectMode && !chunk.length) - return; - - var ret = self.push(chunk); - if (!ret) { - paused = true; - stream.pause(); - } - }); - - // proxy all the other methods. - // important when wrapping filters and duplexes. - for (var i in stream) { - if (util.isFunction(stream[i]) && util.isUndefined(this[i])) { - this[i] = function(method) { return function() { - return stream[method].apply(stream, arguments); - }}(i); - } - } - - // proxy certain important events. - var events = ['error', 'close', 'destroy', 'pause', 'resume']; - forEach(events, function(ev) { - stream.on(ev, self.emit.bind(self, ev)); - }); - - // when we try to consume some more bytes, simply unpause the - // underlying stream. - self._read = function(n) { - debug('wrapped _read', n); - if (paused) { - paused = false; - stream.resume(); - } - }; - - return self; -}; - - - -// exposed for testing purposes only. -Readable._fromList = fromList; - -// Pluck off n bytes from an array of buffers. -// Length is the combined lengths of all the buffers in the list. -function fromList(n, state) { - var list = state.buffer; - var length = state.length; - var stringMode = !!state.decoder; - var objectMode = !!state.objectMode; - var ret; - - // nothing in the list, definitely empty. - if (list.length === 0) - return null; - - if (length === 0) - ret = null; - else if (objectMode) - ret = list.shift(); - else if (!n || n >= length) { - // read it all, truncate the array. - if (stringMode) - ret = list.join(''); - else - ret = Buffer.concat(list, length); - list.length = 0; - } else { - // read just some of it. - if (n < list[0].length) { - // just take a part of the first list item. - // slice is the same for buffers and strings. - var buf = list[0]; - ret = buf.slice(0, n); - list[0] = buf.slice(n); - } else if (n === list[0].length) { - // first list is a perfect match - ret = list.shift(); - } else { - // complex case. - // we have enough to cover it, but it spans past the first buffer. - if (stringMode) - ret = ''; - else - ret = new Buffer(n); - - var c = 0; - for (var i = 0, l = list.length; i < l && c < n; i++) { - var buf = list[0]; - var cpy = Math.min(n - c, buf.length); - - if (stringMode) - ret += buf.slice(0, cpy); - else - buf.copy(ret, c, 0, cpy); - - if (cpy < buf.length) - list[0] = buf.slice(cpy); - else - list.shift(); - - c += cpy; - } - } - } - - return ret; -} - -function endReadable(stream) { - var state = stream._readableState; - - // If we get here before consuming all the bytes, then that is a - // bug in node. Should never happen. - if (state.length > 0) - throw new Error('endReadable called on non-empty stream'); - - if (!state.endEmitted) { - state.ended = true; - process.nextTick(function() { - // Check that we didn't get one last unshift. - if (!state.endEmitted && state.length === 0) { - state.endEmitted = true; - stream.readable = false; - stream.emit('end'); - } - }); - } -} - -function forEach (xs, f) { - for (var i = 0, l = xs.length; i < l; i++) { - f(xs[i], i); - } -} - -function indexOf (xs, x) { - for (var i = 0, l = xs.length; i < l; i++) { - if (xs[i] === x) return i; - } - return -1; -} diff --git a/node_modules/readable-stream/lib/_stream_transform.js b/node_modules/readable-stream/lib/_stream_transform.js deleted file mode 100644 index 905c5e45..00000000 --- a/node_modules/readable-stream/lib/_stream_transform.js +++ /dev/null @@ -1,209 +0,0 @@ -// Copyright Joyent, Inc. and other Node contributors. -// -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to permit -// persons to whom the Software is furnished to do so, subject to the -// following conditions: -// -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -// USE OR OTHER DEALINGS IN THE SOFTWARE. - - -// a transform stream is a readable/writable stream where you do -// something with the data. Sometimes it's called a "filter", -// but that's not a great name for it, since that implies a thing where -// some bits pass through, and others are simply ignored. (That would -// be a valid example of a transform, of course.) -// -// While the output is causally related to the input, it's not a -// necessarily symmetric or synchronous transformation. For example, -// a zlib stream might take multiple plain-text writes(), and then -// emit a single compressed chunk some time in the future. -// -// Here's how this works: -// -// The Transform stream has all the aspects of the readable and writable -// stream classes. When you write(chunk), that calls _write(chunk,cb) -// internally, and returns false if there's a lot of pending writes -// buffered up. When you call read(), that calls _read(n) until -// there's enough pending readable data buffered up. -// -// In a transform stream, the written data is placed in a buffer. When -// _read(n) is called, it transforms the queued up data, calling the -// buffered _write cb's as it consumes chunks. If consuming a single -// written chunk would result in multiple output chunks, then the first -// outputted bit calls the readcb, and subsequent chunks just go into -// the read buffer, and will cause it to emit 'readable' if necessary. -// -// This way, back-pressure is actually determined by the reading side, -// since _read has to be called to start processing a new chunk. However, -// a pathological inflate type of transform can cause excessive buffering -// here. For example, imagine a stream where every byte of input is -// interpreted as an integer from 0-255, and then results in that many -// bytes of output. Writing the 4 bytes {ff,ff,ff,ff} would result in -// 1kb of data being output. In this case, you could write a very small -// amount of input, and end up with a very large amount of output. In -// such a pathological inflating mechanism, there'd be no way to tell -// the system to stop doing the transform. A single 4MB write could -// cause the system to run out of memory. -// -// However, even in such a pathological case, only a single written chunk -// would be consumed, and then the rest would wait (un-transformed) until -// the results of the previous transformed chunk were consumed. - -module.exports = Transform; - -var Duplex = require('./_stream_duplex'); - -/**/ -var util = require('core-util-is'); -util.inherits = require('inherits'); -/**/ - -util.inherits(Transform, Duplex); - - -function TransformState(options, stream) { - this.afterTransform = function(er, data) { - return afterTransform(stream, er, data); - }; - - this.needTransform = false; - this.transforming = false; - this.writecb = null; - this.writechunk = null; -} - -function afterTransform(stream, er, data) { - var ts = stream._transformState; - ts.transforming = false; - - var cb = ts.writecb; - - if (!cb) - return stream.emit('error', new Error('no writecb in Transform class')); - - ts.writechunk = null; - ts.writecb = null; - - if (!util.isNullOrUndefined(data)) - stream.push(data); - - if (cb) - cb(er); - - var rs = stream._readableState; - rs.reading = false; - if (rs.needReadable || rs.length < rs.highWaterMark) { - stream._read(rs.highWaterMark); - } -} - - -function Transform(options) { - if (!(this instanceof Transform)) - return new Transform(options); - - Duplex.call(this, options); - - this._transformState = new TransformState(options, this); - - // when the writable side finishes, then flush out anything remaining. - var stream = this; - - // start out asking for a readable event once data is transformed. - this._readableState.needReadable = true; - - // we have implemented the _read method, and done the other things - // that Readable wants before the first _read call, so unset the - // sync guard flag. - this._readableState.sync = false; - - this.once('prefinish', function() { - if (util.isFunction(this._flush)) - this._flush(function(er) { - done(stream, er); - }); - else - done(stream); - }); -} - -Transform.prototype.push = function(chunk, encoding) { - this._transformState.needTransform = false; - return Duplex.prototype.push.call(this, chunk, encoding); -}; - -// This is the part where you do stuff! -// override this function in implementation classes. -// 'chunk' is an input chunk. -// -// Call `push(newChunk)` to pass along transformed output -// to the readable side. You may call 'push' zero or more times. -// -// Call `cb(err)` when you are done with this chunk. If you pass -// an error, then that'll put the hurt on the whole operation. If you -// never call cb(), then you'll never get another chunk. -Transform.prototype._transform = function(chunk, encoding, cb) { - throw new Error('not implemented'); -}; - -Transform.prototype._write = function(chunk, encoding, cb) { - var ts = this._transformState; - ts.writecb = cb; - ts.writechunk = chunk; - ts.writeencoding = encoding; - if (!ts.transforming) { - var rs = this._readableState; - if (ts.needTransform || - rs.needReadable || - rs.length < rs.highWaterMark) - this._read(rs.highWaterMark); - } -}; - -// Doesn't matter what the args are here. -// _transform does all the work. -// That we got here means that the readable side wants more data. -Transform.prototype._read = function(n) { - var ts = this._transformState; - - if (!util.isNull(ts.writechunk) && ts.writecb && !ts.transforming) { - ts.transforming = true; - this._transform(ts.writechunk, ts.writeencoding, ts.afterTransform); - } else { - // mark that we need a transform, so that any data that comes in - // will get processed, now that we've asked for it. - ts.needTransform = true; - } -}; - - -function done(stream, er) { - if (er) - return stream.emit('error', er); - - // if there's nothing in the write buffer, then that means - // that nothing more will ever be provided - var ws = stream._writableState; - var ts = stream._transformState; - - if (ws.length) - throw new Error('calling transform done when ws.length != 0'); - - if (ts.transforming) - throw new Error('calling transform done when still transforming'); - - return stream.push(null); -} diff --git a/node_modules/readable-stream/lib/_stream_writable.js b/node_modules/readable-stream/lib/_stream_writable.js deleted file mode 100644 index db8539cd..00000000 --- a/node_modules/readable-stream/lib/_stream_writable.js +++ /dev/null @@ -1,477 +0,0 @@ -// Copyright Joyent, Inc. and other Node contributors. -// -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to permit -// persons to whom the Software is furnished to do so, subject to the -// following conditions: -// -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -// USE OR OTHER DEALINGS IN THE SOFTWARE. - -// A bit simpler than readable streams. -// Implement an async ._write(chunk, cb), and it'll handle all -// the drain event emission and buffering. - -module.exports = Writable; - -/**/ -var Buffer = require('buffer').Buffer; -/**/ - -Writable.WritableState = WritableState; - - -/**/ -var util = require('core-util-is'); -util.inherits = require('inherits'); -/**/ - -var Stream = require('stream'); - -util.inherits(Writable, Stream); - -function WriteReq(chunk, encoding, cb) { - this.chunk = chunk; - this.encoding = encoding; - this.callback = cb; -} - -function WritableState(options, stream) { - var Duplex = require('./_stream_duplex'); - - options = options || {}; - - // the point at which write() starts returning false - // Note: 0 is a valid value, means that we always return false if - // the entire buffer is not flushed immediately on write() - var hwm = options.highWaterMark; - var defaultHwm = options.objectMode ? 16 : 16 * 1024; - this.highWaterMark = (hwm || hwm === 0) ? hwm : defaultHwm; - - // object stream flag to indicate whether or not this stream - // contains buffers or objects. - this.objectMode = !!options.objectMode; - - if (stream instanceof Duplex) - this.objectMode = this.objectMode || !!options.writableObjectMode; - - // cast to ints. - this.highWaterMark = ~~this.highWaterMark; - - this.needDrain = false; - // at the start of calling end() - this.ending = false; - // when end() has been called, and returned - this.ended = false; - // when 'finish' is emitted - this.finished = false; - - // should we decode strings into buffers before passing to _write? - // this is here so that some node-core streams can optimize string - // handling at a lower level. - var noDecode = options.decodeStrings === false; - this.decodeStrings = !noDecode; - - // Crypto is kind of old and crusty. Historically, its default string - // encoding is 'binary' so we have to make this configurable. - // Everything else in the universe uses 'utf8', though. - this.defaultEncoding = options.defaultEncoding || 'utf8'; - - // not an actual buffer we keep track of, but a measurement - // of how much we're waiting to get pushed to some underlying - // socket or file. - this.length = 0; - - // a flag to see when we're in the middle of a write. - this.writing = false; - - // when true all writes will be buffered until .uncork() call - this.corked = 0; - - // a flag to be able to tell if the onwrite cb is called immediately, - // or on a later tick. We set this to true at first, because any - // actions that shouldn't happen until "later" should generally also - // not happen before the first write call. - this.sync = true; - - // a flag to know if we're processing previously buffered items, which - // may call the _write() callback in the same tick, so that we don't - // end up in an overlapped onwrite situation. - this.bufferProcessing = false; - - // the callback that's passed to _write(chunk,cb) - this.onwrite = function(er) { - onwrite(stream, er); - }; - - // the callback that the user supplies to write(chunk,encoding,cb) - this.writecb = null; - - // the amount that is being written when _write is called. - this.writelen = 0; - - this.buffer = []; - - // number of pending user-supplied write callbacks - // this must be 0 before 'finish' can be emitted - this.pendingcb = 0; - - // emit prefinish if the only thing we're waiting for is _write cbs - // This is relevant for synchronous Transform streams - this.prefinished = false; - - // True if the error was already emitted and should not be thrown again - this.errorEmitted = false; -} - -function Writable(options) { - var Duplex = require('./_stream_duplex'); - - // Writable ctor is applied to Duplexes, though they're not - // instanceof Writable, they're instanceof Readable. - if (!(this instanceof Writable) && !(this instanceof Duplex)) - return new Writable(options); - - this._writableState = new WritableState(options, this); - - // legacy. - this.writable = true; - - Stream.call(this); -} - -// Otherwise people can pipe Writable streams, which is just wrong. -Writable.prototype.pipe = function() { - this.emit('error', new Error('Cannot pipe. Not readable.')); -}; - - -function writeAfterEnd(stream, state, cb) { - var er = new Error('write after end'); - // TODO: defer error events consistently everywhere, not just the cb - stream.emit('error', er); - process.nextTick(function() { - cb(er); - }); -} - -// If we get something that is not a buffer, string, null, or undefined, -// and we're not in objectMode, then that's an error. -// Otherwise stream chunks are all considered to be of length=1, and the -// watermarks determine how many objects to keep in the buffer, rather than -// how many bytes or characters. -function validChunk(stream, state, chunk, cb) { - var valid = true; - if (!util.isBuffer(chunk) && - !util.isString(chunk) && - !util.isNullOrUndefined(chunk) && - !state.objectMode) { - var er = new TypeError('Invalid non-string/buffer chunk'); - stream.emit('error', er); - process.nextTick(function() { - cb(er); - }); - valid = false; - } - return valid; -} - -Writable.prototype.write = function(chunk, encoding, cb) { - var state = this._writableState; - var ret = false; - - if (util.isFunction(encoding)) { - cb = encoding; - encoding = null; - } - - if (util.isBuffer(chunk)) - encoding = 'buffer'; - else if (!encoding) - encoding = state.defaultEncoding; - - if (!util.isFunction(cb)) - cb = function() {}; - - if (state.ended) - writeAfterEnd(this, state, cb); - else if (validChunk(this, state, chunk, cb)) { - state.pendingcb++; - ret = writeOrBuffer(this, state, chunk, encoding, cb); - } - - return ret; -}; - -Writable.prototype.cork = function() { - var state = this._writableState; - - state.corked++; -}; - -Writable.prototype.uncork = function() { - var state = this._writableState; - - if (state.corked) { - state.corked--; - - if (!state.writing && - !state.corked && - !state.finished && - !state.bufferProcessing && - state.buffer.length) - clearBuffer(this, state); - } -}; - -function decodeChunk(state, chunk, encoding) { - if (!state.objectMode && - state.decodeStrings !== false && - util.isString(chunk)) { - chunk = new Buffer(chunk, encoding); - } - return chunk; -} - -// if we're already writing something, then just put this -// in the queue, and wait our turn. Otherwise, call _write -// If we return false, then we need a drain event, so set that flag. -function writeOrBuffer(stream, state, chunk, encoding, cb) { - chunk = decodeChunk(state, chunk, encoding); - if (util.isBuffer(chunk)) - encoding = 'buffer'; - var len = state.objectMode ? 1 : chunk.length; - - state.length += len; - - var ret = state.length < state.highWaterMark; - // we must ensure that previous needDrain will not be reset to false. - if (!ret) - state.needDrain = true; - - if (state.writing || state.corked) - state.buffer.push(new WriteReq(chunk, encoding, cb)); - else - doWrite(stream, state, false, len, chunk, encoding, cb); - - return ret; -} - -function doWrite(stream, state, writev, len, chunk, encoding, cb) { - state.writelen = len; - state.writecb = cb; - state.writing = true; - state.sync = true; - if (writev) - stream._writev(chunk, state.onwrite); - else - stream._write(chunk, encoding, state.onwrite); - state.sync = false; -} - -function onwriteError(stream, state, sync, er, cb) { - if (sync) - process.nextTick(function() { - state.pendingcb--; - cb(er); - }); - else { - state.pendingcb--; - cb(er); - } - - stream._writableState.errorEmitted = true; - stream.emit('error', er); -} - -function onwriteStateUpdate(state) { - state.writing = false; - state.writecb = null; - state.length -= state.writelen; - state.writelen = 0; -} - -function onwrite(stream, er) { - var state = stream._writableState; - var sync = state.sync; - var cb = state.writecb; - - onwriteStateUpdate(state); - - if (er) - onwriteError(stream, state, sync, er, cb); - else { - // Check if we're actually ready to finish, but don't emit yet - var finished = needFinish(stream, state); - - if (!finished && - !state.corked && - !state.bufferProcessing && - state.buffer.length) { - clearBuffer(stream, state); - } - - if (sync) { - process.nextTick(function() { - afterWrite(stream, state, finished, cb); - }); - } else { - afterWrite(stream, state, finished, cb); - } - } -} - -function afterWrite(stream, state, finished, cb) { - if (!finished) - onwriteDrain(stream, state); - state.pendingcb--; - cb(); - finishMaybe(stream, state); -} - -// Must force callback to be called on nextTick, so that we don't -// emit 'drain' before the write() consumer gets the 'false' return -// value, and has a chance to attach a 'drain' listener. -function onwriteDrain(stream, state) { - if (state.length === 0 && state.needDrain) { - state.needDrain = false; - stream.emit('drain'); - } -} - - -// if there's something in the buffer waiting, then process it -function clearBuffer(stream, state) { - state.bufferProcessing = true; - - if (stream._writev && state.buffer.length > 1) { - // Fast case, write everything using _writev() - var cbs = []; - for (var c = 0; c < state.buffer.length; c++) - cbs.push(state.buffer[c].callback); - - // count the one we are adding, as well. - // TODO(isaacs) clean this up - state.pendingcb++; - doWrite(stream, state, true, state.length, state.buffer, '', function(err) { - for (var i = 0; i < cbs.length; i++) { - state.pendingcb--; - cbs[i](err); - } - }); - - // Clear buffer - state.buffer = []; - } else { - // Slow case, write chunks one-by-one - for (var c = 0; c < state.buffer.length; c++) { - var entry = state.buffer[c]; - var chunk = entry.chunk; - var encoding = entry.encoding; - var cb = entry.callback; - var len = state.objectMode ? 1 : chunk.length; - - doWrite(stream, state, false, len, chunk, encoding, cb); - - // if we didn't call the onwrite immediately, then - // it means that we need to wait until it does. - // also, that means that the chunk and cb are currently - // being processed, so move the buffer counter past them. - if (state.writing) { - c++; - break; - } - } - - if (c < state.buffer.length) - state.buffer = state.buffer.slice(c); - else - state.buffer.length = 0; - } - - state.bufferProcessing = false; -} - -Writable.prototype._write = function(chunk, encoding, cb) { - cb(new Error('not implemented')); - -}; - -Writable.prototype._writev = null; - -Writable.prototype.end = function(chunk, encoding, cb) { - var state = this._writableState; - - if (util.isFunction(chunk)) { - cb = chunk; - chunk = null; - encoding = null; - } else if (util.isFunction(encoding)) { - cb = encoding; - encoding = null; - } - - if (!util.isNullOrUndefined(chunk)) - this.write(chunk, encoding); - - // .end() fully uncorks - if (state.corked) { - state.corked = 1; - this.uncork(); - } - - // ignore unnecessary end() calls. - if (!state.ending && !state.finished) - endWritable(this, state, cb); -}; - - -function needFinish(stream, state) { - return (state.ending && - state.length === 0 && - !state.finished && - !state.writing); -} - -function prefinish(stream, state) { - if (!state.prefinished) { - state.prefinished = true; - stream.emit('prefinish'); - } -} - -function finishMaybe(stream, state) { - var need = needFinish(stream, state); - if (need) { - if (state.pendingcb === 0) { - prefinish(stream, state); - state.finished = true; - stream.emit('finish'); - } else - prefinish(stream, state); - } - return need; -} - -function endWritable(stream, state, cb) { - state.ending = true; - finishMaybe(stream, state); - if (cb) { - if (state.finished) - process.nextTick(cb); - else - stream.once('finish', cb); - } - state.ended = true; -} diff --git a/node_modules/readable-stream/package.json b/node_modules/readable-stream/package.json deleted file mode 100644 index 146ce070..00000000 --- a/node_modules/readable-stream/package.json +++ /dev/null @@ -1,121 +0,0 @@ -{ - "_args": [ - [ - { - "raw": "readable-stream@^1.1.13", - "scope": null, - "escapedName": "readable-stream", - "name": "readable-stream", - "rawSpec": "^1.1.13", - "spec": ">=1.1.13 <2.0.0", - "type": "range" - }, - "/Users/benjaminarias/Desktop/poly/node_modules/browserify" - ] - ], - "_from": "readable-stream@>=1.1.13 <2.0.0", - "_id": "readable-stream@1.1.14", - "_inCache": true, - "_installable": true, - "_location": "/readable-stream", - "_nodeVersion": "5.10.1", - "_npmOperationalInternal": { - "host": "packages-16-east.internal.npmjs.com", - "tmp": "tmp/readable-stream-1.1.14.tgz_1460563293219_0.5682175166439265" - }, - "_npmUser": { - "name": "cwmma", - "email": "calvin.metcalf@gmail.com" - }, - "_npmVersion": "3.8.3", - "_phantomChildren": {}, - "_requested": { - "raw": "readable-stream@^1.1.13", - "scope": null, - "escapedName": "readable-stream", - "name": "readable-stream", - "rawSpec": "^1.1.13", - "spec": ">=1.1.13 <2.0.0", - "type": "range" - }, - "_requiredBy": [ - "/browserify", - "/concat-stream", - "/duplexer2", - "/module-deps", - "/read-only-stream", - "/readable-wrap", - "/stream-browserify", - "/stream-splicer", - "/through2" - ], - "_resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.1.14.tgz", - "_shasum": "7cf4c54ef648e3813084c636dd2079e166c081d9", - "_shrinkwrap": null, - "_spec": "readable-stream@^1.1.13", - "_where": "/Users/benjaminarias/Desktop/poly/node_modules/browserify", - "author": { - "name": "Isaac Z. Schlueter", - "email": "i@izs.me", - "url": "http://blog.izs.me/" - }, - "browser": { - "util": false - }, - "bugs": { - "url": "https://github.com/isaacs/readable-stream/issues" - }, - "dependencies": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.1", - "isarray": "0.0.1", - "string_decoder": "~0.10.x" - }, - "description": "Streams3, a user-land copy of the stream library from Node.js v0.11.x", - "devDependencies": { - "tap": "~0.2.6" - }, - "directories": {}, - "dist": { - "shasum": "7cf4c54ef648e3813084c636dd2079e166c081d9", - "tarball": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.1.14.tgz" - }, - "gitHead": "52550840cb1d6e8a98ef9a909a4bea360bc6f7da", - "homepage": "https://github.com/isaacs/readable-stream#readme", - "keywords": [ - "readable", - "stream", - "pipe" - ], - "license": "MIT", - "main": "readable.js", - "maintainers": [ - { - "name": "isaacs", - "email": "isaacs@npmjs.com" - }, - { - "name": "tootallnate", - "email": "nathan@tootallnate.net" - }, - { - "name": "rvagg", - "email": "rod@vagg.org" - }, - { - "name": "cwmma", - "email": "calvin.metcalf@gmail.com" - } - ], - "name": "readable-stream", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git://github.com/isaacs/readable-stream.git" - }, - "scripts": { - "test": "tap test/simple/*.js" - }, - "version": "1.1.14" -} diff --git a/node_modules/readable-stream/passthrough.js b/node_modules/readable-stream/passthrough.js deleted file mode 100644 index 27e8d8a5..00000000 --- a/node_modules/readable-stream/passthrough.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require("./lib/_stream_passthrough.js") diff --git a/node_modules/readable-stream/readable.js b/node_modules/readable-stream/readable.js deleted file mode 100644 index 2a8b5c6b..00000000 --- a/node_modules/readable-stream/readable.js +++ /dev/null @@ -1,10 +0,0 @@ -exports = module.exports = require('./lib/_stream_readable.js'); -exports.Stream = require('stream'); -exports.Readable = exports; -exports.Writable = require('./lib/_stream_writable.js'); -exports.Duplex = require('./lib/_stream_duplex.js'); -exports.Transform = require('./lib/_stream_transform.js'); -exports.PassThrough = require('./lib/_stream_passthrough.js'); -if (!process.browser && process.env.READABLE_STREAM === 'disable') { - module.exports = require('stream'); -} diff --git a/node_modules/readable-stream/transform.js b/node_modules/readable-stream/transform.js deleted file mode 100644 index 5d482f07..00000000 --- a/node_modules/readable-stream/transform.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require("./lib/_stream_transform.js") diff --git a/node_modules/readable-stream/writable.js b/node_modules/readable-stream/writable.js deleted file mode 100644 index e1e9efdf..00000000 --- a/node_modules/readable-stream/writable.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require("./lib/_stream_writable.js") diff --git a/node_modules/readable-wrap/.travis.yml b/node_modules/readable-wrap/.travis.yml deleted file mode 100644 index 9672e129..00000000 --- a/node_modules/readable-wrap/.travis.yml +++ /dev/null @@ -1,6 +0,0 @@ -language: node_js -node_js: - - "0.8" - - "0.10" -before_install: - - npm install -g npm@~1.4.6 diff --git a/node_modules/readable-wrap/LICENSE b/node_modules/readable-wrap/LICENSE deleted file mode 100644 index 6de584a4..00000000 --- a/node_modules/readable-wrap/LICENSE +++ /dev/null @@ -1,20 +0,0 @@ -Copyright Joyent, Inc. and other Node contributors. - -Permission is hereby granted, free of charge, to any person obtaining a -copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to permit -persons to whom the Software is furnished to do so, subject to the -following conditions: - -The above copyright notice and this permission notice shall be included -in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/readable-wrap/example/split.js b/node_modules/readable-wrap/example/split.js deleted file mode 100644 index 40c13f50..00000000 --- a/node_modules/readable-wrap/example/split.js +++ /dev/null @@ -1,10 +0,0 @@ -var split = require('split'); -var wrap = require('../'); -var through = require('through2'); - -process.stdin.pipe(wrap.obj(split())).pipe(through.obj(write)); - -function write (buf, enc, next) { - console.log(buf.length + ': ' + buf); - next(); -} diff --git a/node_modules/readable-wrap/index.js b/node_modules/readable-wrap/index.js deleted file mode 100644 index ef7cee5a..00000000 --- a/node_modules/readable-wrap/index.js +++ /dev/null @@ -1,76 +0,0 @@ -var Readable = require('readable-stream').Readable; - -// wrap an old-style stream as the async data source. -// This is *not* part of the readable stream interface. -// It is an ugly unfortunate mess of history. -module.exports = wrap; -module.exports.obj = function (stream, opts) { - if (!opts) opts = {}; - opts.objectMode = true; - return wrap(stream, opts); -}; - -function wrap (stream, opts) { - var self = new Readable(opts) - var state = self._readableState; - var paused = false; - - stream.on('end', function() { - if (state.decoder && !state.ended) { - var chunk = state.decoder.end(); - if (chunk && chunk.length) - self.push(chunk); - } - - self.push(null); - }); - - stream.on('data', function(chunk) { - if (state.decoder) - chunk = state.decoder.write(chunk); - - // don't skip over falsy values in objectMode - //if (state.objectMode && util.isNullOrUndefined(chunk)) - if (state.objectMode && (chunk === null || chunk === undefined)) - return - else if (!state.objectMode && (!chunk || !chunk.length)) - return; - - var ret = self.push(chunk); - if (!ret) { - paused = true; - stream.pause(); - } - }); - - // proxy all the other methods. - // important when wrapping filters and duplexes. - for (var i in stream) { - if (typeof stream[i] === 'function' && - typeof self[i] === 'undefined') { - self[i] = function(method) { return function() { - return stream[method].apply(stream, arguments); - }}(i); - } - } - - // proxy certain important events. - var events = ['error', 'close', 'destroy', 'pause', 'resume']; - for (var i = 0; i < events.length; i++) (function (ev) { - stream.on(ev, function () { - var args = [ ev ].concat([].slice.call(arguments)); - self.emit.apply(self, args); - }) - })(events[i]); - - // when we try to consume some more bytes, simply unpause the - // underlying stream. - self._read = function(n) { - if (paused) { - paused = false; - stream.resume(); - } - }; - - return self; -}; diff --git a/node_modules/readable-wrap/package.json b/node_modules/readable-wrap/package.json deleted file mode 100644 index fa92c230..00000000 --- a/node_modules/readable-wrap/package.json +++ /dev/null @@ -1,111 +0,0 @@ -{ - "_args": [ - [ - { - "raw": "readable-wrap@^1.0.0", - "scope": null, - "escapedName": "readable-wrap", - "name": "readable-wrap", - "rawSpec": "^1.0.0", - "spec": ">=1.0.0 <2.0.0", - "type": "range" - }, - "/Users/benjaminarias/Desktop/poly/node_modules/stream-splicer" - ] - ], - "_from": "readable-wrap@>=1.0.0 <2.0.0", - "_id": "readable-wrap@1.0.0", - "_inCache": true, - "_installable": true, - "_location": "/readable-wrap", - "_npmUser": { - "name": "substack", - "email": "mail@substack.net" - }, - "_npmVersion": "1.4.3", - "_phantomChildren": {}, - "_requested": { - "raw": "readable-wrap@^1.0.0", - "scope": null, - "escapedName": "readable-wrap", - "name": "readable-wrap", - "rawSpec": "^1.0.0", - "spec": ">=1.0.0 <2.0.0", - "type": "range" - }, - "_requiredBy": [ - "/read-only-stream", - "/stream-splicer" - ], - "_resolved": "https://registry.npmjs.org/readable-wrap/-/readable-wrap-1.0.0.tgz", - "_shasum": "3b5a211c631e12303a54991c806c17e7ae206bff", - "_shrinkwrap": null, - "_spec": "readable-wrap@^1.0.0", - "_where": "/Users/benjaminarias/Desktop/poly/node_modules/stream-splicer", - "author": { - "name": "James Halliday", - "email": "mail@substack.net", - "url": "http://substack.net" - }, - "bugs": { - "url": "https://github.com/substack/readable-wrap/issues" - }, - "dependencies": { - "readable-stream": "^1.1.13-1" - }, - "description": "upgrade streams1 to streams2 streams as a standalone module", - "devDependencies": { - "tape": "~2.12.1", - "through2": "~1.0.0" - }, - "directories": {}, - "dist": { - "shasum": "3b5a211c631e12303a54991c806c17e7ae206bff", - "tarball": "https://registry.npmjs.org/readable-wrap/-/readable-wrap-1.0.0.tgz" - }, - "homepage": "https://github.com/substack/readable-wrap", - "keywords": [ - "streams1", - "streams2", - "readable-stream", - "streams", - "wrapper" - ], - "license": "MIT", - "main": "index.js", - "maintainers": [ - { - "name": "substack", - "email": "mail@substack.net" - } - ], - "name": "readable-wrap", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git://github.com/substack/readable-wrap.git" - }, - "scripts": { - "test": "tape test/*.js" - }, - "testling": { - "files": "test/*.js", - "browsers": [ - "ie/8..latest", - "firefox/15", - "firefox/latest", - "firefox/nightly", - "chrome/15", - "chrome/latest", - "chrome/canary", - "opera/12..latest", - "opera/next", - "safari/5.1..latest", - "ipad/6.0..latest", - "iphone/6.0..latest", - "android-browser/4.2..latest" - ] - }, - "version": "1.0.0" -} diff --git a/node_modules/readable-wrap/readme.markdown b/node_modules/readable-wrap/readme.markdown deleted file mode 100644 index d434e287..00000000 --- a/node_modules/readable-wrap/readme.markdown +++ /dev/null @@ -1,76 +0,0 @@ -# readable-wrap - -upgrade streams1 to streams2 streams as a standalone module - -This module provides a wrap function based on `Readable().wrap()` from node core -but as a standalone module. - -Use this module if you don't want to wait for -[a patch in node core](https://github.com/joyent/node/pull/7758) -to land that fixes falsey objectMode values in wrapped readable streams. - -[![build status](https://secure.travis-ci.org/substack/readable-wrap.png)](http://travis-ci.org/substack/readable-wrap) - -[![testling badge](https://ci.testling.com/substack/readable-wrap.png)](https://ci.testling.com/substack/readable-wrap) - -# example - -``` js -var split = require('split'); -var wrap = require('readable-wrap'); -var through = require('through2'); - -process.stdin.pipe(wrap.obj(split())).pipe(through.obj(write)); - -function write (buf, enc, next) { - console.log(buf.length + ': ' + buf); - next(); -} -``` - -output: - -``` -$ echo -e 'one\ntwo\n\nthree' | node example/split.js -3: one -3: two -0: -5: three -0: -``` - -In object mode you get the empty lines, which is handy if you need to perform a -special action on empty lines such as to partition an HTTP request header from a -body in a streaming fashion. - -In non-object mode the empty lines get ignored because that is how node core -streams work. - -# methods - -``` js -var wrap = require('readable-wrap') -``` - -## var stream = wrap(oldStream, opts) - -Return a new streams2 `stream` based on the streams1 stream `oldStream`. - -The `opts` will be passed to the underlying readable stream instance. - -## var stream = wrap.obj(oldStream, opts) - -Return a new streams2 `stream` based on the streams1 stream `oldStream` with -`opts.objectMode` set to `true`. - -# install - -With [npm](https://npmjs.org) do: - -``` -npm install readable-wrap -``` - -# license - -MIT diff --git a/node_modules/readable-wrap/test/buffer.js b/node_modules/readable-wrap/test/buffer.js deleted file mode 100644 index e65e841c..00000000 --- a/node_modules/readable-wrap/test/buffer.js +++ /dev/null @@ -1,30 +0,0 @@ -var test = require('tape'); -var through = require('through2'); -var EventEmitter = require('events').EventEmitter; -var wrap = require('../'); - -test('buffer', function (t) { - var oldStream = new EventEmitter; - var wrapped = wrap(oldStream); - - var input = [ Buffer('abc'), Buffer('def'), Buffer('ghi') ]; - var expected = input.slice(); - t.plan(expected.length + 1); - - wrapped.pipe(through.obj(write, end)); - - var iv = setInterval(function () { - if (input.length === 0) { - oldStream.emit('end'); - clearInterval(iv); - } - else oldStream.emit('data', input.shift()); - }, 5); - - function write (row, enc, next) { - t.deepEqual(row, expected.shift()); - next(); - } - - function end () { t.ok('ended') } -}); diff --git a/node_modules/readable-wrap/test/object_mode.js b/node_modules/readable-wrap/test/object_mode.js deleted file mode 100644 index 6c21e411..00000000 --- a/node_modules/readable-wrap/test/object_mode.js +++ /dev/null @@ -1,56 +0,0 @@ -var test = require('tape'); -var through = require('through2'); -var EventEmitter = require('events').EventEmitter; -var wrap = require('../'); - -test('falsey object mode', function (t) { - var oldStream = new EventEmitter; - var wrapped = wrap.obj(oldStream); - - var input = [ 5, 'a', false, 0, '', 'xyz', { x: 4 }, 7, [], 555 ]; - var expected = input.slice(); - t.plan(expected.length + 1); - - wrapped.pipe(through.obj(write, end)); - - var iv = setInterval(function () { - if (input.length === 0) { - oldStream.emit('end'); - clearInterval(iv); - } - else oldStream.emit('data', input.shift()); - }, 5); - - function write (row, enc, next) { - t.deepEqual(row, expected.shift()); - next(); - } - - function end () { t.ok('ended') } -}); - -test('falsey object mode option', function (t) { - var oldStream = new EventEmitter; - var wrapped = wrap(oldStream, { objectMode: true }); - - var input = [ 5, 'a', false, 0, '', 'xyz', { x: 4 }, 7, [], 555 ]; - var expected = input.slice(); - t.plan(expected.length + 1); - - wrapped.pipe(through.obj(write, end)); - - var iv = setInterval(function () { - if (input.length === 0) { - oldStream.emit('end'); - clearInterval(iv); - } - else oldStream.emit('data', input.shift()); - }, 5); - - function write (row, enc, next) { - t.deepEqual(row, expected.shift()); - next(); - } - - function end () { t.ok('ended') } -}); diff --git a/node_modules/readable-wrap/test/string.js b/node_modules/readable-wrap/test/string.js deleted file mode 100644 index b6fd2c5a..00000000 --- a/node_modules/readable-wrap/test/string.js +++ /dev/null @@ -1,33 +0,0 @@ -var test = require('tape'); -var through = require('through2'); -var EventEmitter = require('events').EventEmitter; -var wrap = require('../'); - -test('string', function (t) { - var oldStream = new EventEmitter; - var wrapped = wrap(oldStream); - - var input = [ 'abc', 'def', 'ghi' ]; - var expected = []; - for (var i = 0; i < input.length; i++) { - expected.push(Buffer(input[i])); - } - t.plan(expected.length + 1); - - wrapped.pipe(through.obj(write, end)); - - var iv = setInterval(function () { - if (input.length === 0) { - oldStream.emit('end'); - clearInterval(iv); - } - else oldStream.emit('data', input.shift()); - }, 5); - - function write (row, enc, next) { - t.deepEqual(row, expected.shift()); - next(); - } - - function end () { t.ok('ended') } -}); diff --git a/node_modules/recordrtc/README.md b/node_modules/recordrtc/README.md deleted file mode 100644 index 4a13ba3f..00000000 --- a/node_modules/recordrtc/README.md +++ /dev/null @@ -1,822 +0,0 @@ -# [RecordRTC](https://github.com/muaz-khan/RecordRTC): [WebRTC](https://www.webrtc-experiment.com/) audio/video recording - -[RecordRTC Documentation](http://RecordRTC.org/) / [RecordRTC Wiki Pages](https://github.com/muaz-khan/RecordRTC/wiki) / [RecordRTC Demo](https://www.webrtc-experiment.com/RecordRTC/) / [WebRTC Experiments](https://www.webrtc-experiment.com/) - -[![npm](https://img.shields.io/npm/v/recordrtc.svg)](https://npmjs.org/package/recordrtc) [![downloads](https://img.shields.io/npm/dm/recordrtc.svg)](https://npmjs.org/package/recordrtc) [![Build Status: Linux](https://travis-ci.org/muaz-khan/RecordRTC.png?branch=master)](https://travis-ci.org/muaz-khan/RecordRTC) - -> [RecordRTC](https://www.webrtc-experiment.com/RecordRTC/) is a JavaScript-based media-recording library for modern web-browsers (supporting WebRTC getUserMedia API). It is optimized for different devices and browsers to bring all client-side (pluginfree) recording solutions in single place. - -YouTube Video Tutorial for RecordRTC! - -# Check all releases: - -* https://github.com/muaz-khan/RecordRTC/releases - -Please check [dev](https://github.com/muaz-khan/RecordRTC/tree/master/dev) directory for development files. - -1. [RecordRTC API Reference](http://RecordRTC.org/RecordRTC.html) -2. [MRecordRTC API Reference](http://RecordRTC.org/MRecordRTC.html) -3. [MediaStreamRecorder API Reference](http://RecordRTC.org/MediaStreamRecorder.html) -5. [StereoAudioRecorder API Reference](http://RecordRTC.org/StereoAudioRecorder.html) -6. [WhammyRecorder API Reference](http://RecordRTC.org/WhammyRecorder.html) -7. [Whammy API Reference](http://RecordRTC.org/Whammy.html) -8. [CanvasRecorder API Reference](http://RecordRTC.org/CanvasRecorder.html) -9. [GifRecorder API Reference](http://RecordRTC.org/GifRecorder.html) -10. [Global API Reference](http://RecordRTC.org/global.html) - -## Browsers Support: - -| Browser | Support | Features | -| ------------- |-------------|-------------| -| Firefox | [Stable](http://www.mozilla.org/en-US/firefox/new/) / [Aurora](http://www.mozilla.org/en-US/firefox/aurora/) / [Nightly](http://nightly.mozilla.org/) | Audio+Video (Both local/remote) | -| Google Chrome | [Stable](https://www.google.com/intl/en_uk/chrome/browser/) / [Canary](https://www.google.com/intl/en/chrome/browser/canary.html) / [Beta](https://www.google.com/intl/en/chrome/browser/beta.html) / [Dev](https://www.google.com/intl/en/chrome/browser/index.html?extra=devchannel#eula) | Audio+Video (Both local/remote) | -| Opera | [Stable](http://www.opera.com/) / [NEXT](http://www.opera.com/computer/next) | Audio/Video Separately | -| Android | [Chrome](https://play.google.com/store/apps/details?id=com.chrome.beta&hl=en) / [Firefox](https://play.google.com/store/apps/details?id=org.mozilla.firefox) / [Opera](https://play.google.com/store/apps/details?id=com.opera.browser) | Audio/Video Separately | -| Microsoft Edge | [Normal Build](https://www.microsoft.com/en-us/windows/microsoft-edge) | Only Audio | - -## How RecordRTC encodes wav/webm? - -|Media File|Bitrate/Framerate|encoders|Framesize|additional info| -| ------------- |-------------|-------------|-------------|-------------| -|Audio File (WAV) | 1411 kbps | pcm_s16le |44100 Hz|stereo, s16| -|Video File (WebM)|60 kb/s | (whammy) vp8 codec yuv420p|--|SAR 1:1 DAR 4:3, 1k tbr, 1k tbn, 1k tbc (default)| - -## RecordRTC Demos - -1. [RecordRTC to Node.js](https://github.com/muaz-khan/RecordRTC/tree/master/RecordRTC-to-Nodejs) -2. [RecordRTC to PHP](https://github.com/muaz-khan/RecordRTC/tree/master/RecordRTC-to-PHP) -3. [RecordRTC to ASP.NET MVC](https://github.com/muaz-khan/RecordRTC/tree/master/RecordRTC-to-ASPNETMVC) -4. [RecordRTC & HTML-2-Canvas i.e. Canvas/HTML Recording!](https://github.com/muaz-khan/RecordRTC/tree/master/Canvas-Recording) -5. [MRecordRTC i.e. Multi-RecordRTC!](https://github.com/muaz-khan/RecordRTC/tree/master/MRecordRTC) -6. [RecordRTC on Ruby!](https://github.com/cbetta/record-rtc-experiment) -7. [RecordRTC over Socket.io](https://github.com/muaz-khan/RecordRTC/tree/master/RecordRTC-over-Socketio) -8. [ffmpeg-asm.js and RecordRTC! Audio/Video Merging & Transcoding!](https://github.com/muaz-khan/WebRTC-Experiment/tree/master/ffmpeg) -9. [RecordRTC / PHP / FFmpeg](https://github.com/muaz-khan/RecordRTC/tree/master/PHP-and-FFmpeg) -10. [Record Audio and upload to Nodejs server](https://www.npmjs.org/package/record-audio) -11. [ConcatenateBlobs.js](https://github.com/muaz-khan/ConcatenateBlobs) - Concatenate multiple recordings in single Blob! -12. [Remote audio-stream recording](https://www.webrtc-experiment.com/demos/remote-stream-recording.html) or [a real p2p demo](https://www.webrtc-experiment.com/RTCMultiConnection/RecordRTC-and-RTCMultiConnection.html) -13. [Mp3 or Wav Recording](https://www.webrtc-experiment.com/RecordRTC/Record-Mp3-or-Wav.html) -14. [Record entire DIV including video, image, textarea, input, drag/move/resize, everything](https://www.webrtc-experiment.com/RecordRTC/Canvas-Recording/) -15. [Record canvas 2D drawings, lines, shapes, texts, images, drag/resize/enlarge/move via a huge drawing tool!](https://www.webrtc-experiment.com/RecordRTC/Canvas-Recording/record-canvas-drawings.html) -16. [Record Canvas2D Animation](https://www.webrtc-experiment.com/RecordRTC/Canvas-Recording/Canvas-Animation-Recording.html) -17. [WebGL animation recording](https://www.webrtc-experiment.com/RecordRTC/webgl/) -18. [Plotly - WebGL animation recording](https://www.webrtc-experiment.com/RecordRTC/webgl/plotly.html) - -You can also try a chrome extension for screen recording: - -* https://chrome.google.com/webstore/detail/recordrtc/ndcljioonkecdnaaihodjgiliohngojp - -# How to link? - -## [NPM](https://www.npmjs.com/package/recordrtc) install - -``` -npm install recordrtc - -# you can use with "require" (browserify/nodejs) -var RecordRTC = require('recordrtc'); - -var recorder = RecordRTC({}, { - type: 'video', - recorderType: RecordRTC.WhammyRecorder -}); - -console.log('\n--------\nRecordRTC\n--------\n'); -console.log(recorder); - -console.log('\n--------\nstartRecording\n--------\n'); -recorder.startRecording(); -console.log('\n--------\nprocess.exit()\n--------\n'); - -process.exit() -``` - -* https://tonicdev.com/npm/recordrtc - -Here is how to use `require`: - -```javascript -var RecordRTC = require('recordrtc'); -var Whammy = RecordRTC.Whammy; -var WhammyRecorder = RecordRTC.WhammyRecorder; -var StereoAudioRecorder = RecordRTC.StereoAudioRecorder; -// and so on - -var video = new Whammy.Video(100); -var recorder = new StereoAudioRecorder(stream, options); -``` - -```html - - -``` - -There are some other NPM packages regarding RecordRTC: - -* [https://www.npmjs.org/search?q=RecordRTC](https://www.npmjs.org/search?q=RecordRTC) - -## [bower](http://bower.io) install - -``` -bower install recordrtc -``` - -```html - - -``` - -## CDN - -```html - - - - - -``` - -## Releases - -You can even link specific [releases](https://github.com/muaz-khan/RecordRTC/releases): - -```html - - -``` - -## How to capture stream? - -```html - - - -``` - -## Record audio+video in Firefox - -You'll be recording both audio/video in single WebM container. Though you can edit RecordRTC.js to record in mp4. - -```javascript -var recordRTC; - -function successCallback(stream) { - // RecordRTC usage goes here - - var options = { - mimeType: 'video/webm', // or video/mp4 or audio/ogg - audioBitsPerSecond: 128000, - videoBitsPerSecond: 128000, - bitsPerSecond: 128000 // if this line is provided, skip above two - }; - recordRTC = RecordRTC(stream, options); - recordRTC.startRecording(); -} - -function errorCallback(error) { - // maybe another application is using the device -} - -var mediaConstraints = { video: true, audio: true }; - -navigator.mediaDevices.getUserMedia(mediaConstraints).then(successCallback).catch(errorCallback); - -btnStopRecording.onclick = function () { - recordRTC.stopRecording(function (audioVideoWebMURL) { - video.src = audioVideoWebMURL; - - var recordedBlob = recordRTC.getBlob(); - recordRTC.getDataURL(function(dataURL) { }); - }); -}; -``` - -Demo: [AudioVideo-on-Firefox.html](https://www.webrtc-experiment.com/RecordRTC/AudioVideo-on-Firefox.html) - -## Record only Audio - -```javascript -var recordRTC = RecordRTC(mediaStream); -recordRTC.startRecording(); -recordRTC.stopRecording(function(audioURL) { - audio.src = audioURL; - - var recordedBlob = recordRTC.getBlob(); - recordRTC.getDataURL(function(dataURL) { }); -}); -``` - -## Echo Issues - -Simply set `volume=0` or `muted=true` over `